summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore104
-rw-r--r--.gitmodules9
-rwxr-xr-xBUILD/SETUP.sh2
-rwxr-xr-xBUILD/check-cpu3
-rwxr-xr-xBUILD/compile-pentium64-ubsan29
-rwxr-xr-xBUILD/compile-pentium64-valgrind-max2
-rw-r--r--CMakeLists.txt71
-rw-r--r--CONTRIBUTING.md47
-rw-r--r--Docs/INSTALL-BINARY24
-rw-r--r--Docs/glibc-2.2.5.patch137
-rw-r--r--Docs/linuxthreads.txt19
-rw-r--r--Docs/sp-imp-spec.txt1100
-rw-r--r--KNOWN_BUGS.txt38
-rw-r--r--README.md29
-rw-r--r--VERSION4
-rw-r--r--client/CMakeLists.txt5
-rw-r--r--client/client_priv.h7
-rw-r--r--client/mysql.cc55
-rw-r--r--client/mysql_upgrade.c19
-rw-r--r--client/mysqladmin.cc45
-rw-r--r--client/mysqlbinlog.cc37
-rw-r--r--client/mysqlcheck.c16
-rw-r--r--client/mysqldump.c34
-rw-r--r--client/mysqlimport.c27
-rw-r--r--client/mysqlshow.c29
-rw-r--r--client/mysqlslap.c24
-rw-r--r--client/mysqltest.cc636
-rw-r--r--cmake/aws_sdk.cmake98
-rw-r--r--cmake/build_configurations/mysql_release.cmake7
-rw-r--r--cmake/configure.pl10
-rw-r--r--cmake/cpack_rpm.cmake4
-rw-r--r--cmake/create_initial_db.cmake2
-rw-r--r--cmake/install_macros.cmake15
-rw-r--r--cmake/libutils.cmake2
-rw-r--r--cmake/maintainer.cmake2
-rw-r--r--cmake/make_dist.cmake.in8
-rw-r--r--cmake/mariadb_connector_c.cmake2
-rw-r--r--cmake/mysql_add_executable.cmake12
-rw-r--r--cmake/os/GNU.cmake30
-rw-r--r--cmake/os/SunOS.cmake2
-rw-r--r--cmake/os/Windows.cmake19
-rw-r--r--cmake/os/WindowsCache.cmake4
-rw-r--r--cmake/plugin.cmake26
-rw-r--r--cmake/readline.cmake19
-rw-r--r--cmake/ssl.cmake37
-rw-r--r--cmake/submodules.cmake2
-rw-r--r--cmake/symlinks.cmake76
-rw-r--r--cmake/wsrep.cmake44
-rw-r--r--config.h.cmake6
-rw-r--r--configure.cmake43
-rwxr-xr-xdebian/additions/debian-start1
-rwxr-xr-xdebian/additions/debian-start.inc.sh2
-rw-r--r--debian/additions/mysql.init193
-rw-r--r--debian/changelog6
-rw-r--r--debian/control247
-rw-r--r--debian/libmariadb-dev.README.Maintainer3
-rw-r--r--debian/mariadb-backup.install2
-rw-r--r--debian/mariadb-backup.links1
-rw-r--r--debian/mariadb-client-10.3.install22
-rw-r--r--debian/mariadb-client-10.3.links6
-rw-r--r--debian/mariadb-client-10.3.menu3
-rw-r--r--debian/mariadb-client-10.4.README.Debian (renamed from debian/mariadb-client-10.3.README.Debian)0
-rw-r--r--debian/mariadb-client-10.4.docs (renamed from debian/mariadb-client-10.3.docs)0
-rw-r--r--debian/mariadb-client-10.4.install33
-rw-r--r--debian/mariadb-client-10.4.links25
-rw-r--r--debian/mariadb-client-10.4.manpages (renamed from debian/mariadb-client-10.3.manpages)0
-rw-r--r--debian/mariadb-client-10.4.menu3
-rw-r--r--debian/mariadb-client-core-10.3.install4
-rw-r--r--debian/mariadb-client-core-10.4.install6
-rw-r--r--debian/mariadb-client-core-10.4.links2
-rw-r--r--debian/mariadb-plugin-rocksdb.install2
-rw-r--r--debian/mariadb-plugin-rocksdb.links1
-rw-r--r--debian/mariadb-plugin-tokudb.install2
-rw-r--r--debian/mariadb-server-10.3.README.Debian106
-rw-r--r--debian/mariadb-server-10.3.config45
-rw-r--r--debian/mariadb-server-10.3.install102
-rw-r--r--debian/mariadb-server-10.3.mysql-server.logrotate20
-rw-r--r--debian/mariadb-server-10.3.mysql.init193
-rw-r--r--debian/mariadb-server-10.3.postinst273
-rw-r--r--debian/mariadb-server-10.3.postrm83
-rw-r--r--debian/mariadb-server-10.3.preinst213
-rw-r--r--debian/mariadb-server-10.3.py52
-rw-r--r--debian/mariadb-server-10.3.templates76
-rw-r--r--debian/mariadb-server-10.4.README.Debian95
-rw-r--r--debian/mariadb-server-10.4.config14
-rw-r--r--debian/mariadb-server-10.4.dirs (renamed from debian/mariadb-server-10.3.dirs)0
-rw-r--r--debian/mariadb-server-10.4.install113
-rw-r--r--debian/mariadb-server-10.4.links9
-rw-r--r--debian/mariadb-server-10.4.logcheck.ignore.paranoid (renamed from debian/mariadb-server-10.3.logcheck.ignore.paranoid)0
-rw-r--r--debian/mariadb-server-10.4.logcheck.ignore.server (renamed from debian/mariadb-server-10.3.logcheck.ignore.server)0
-rw-r--r--debian/mariadb-server-10.4.logcheck.ignore.workstation (renamed from debian/mariadb-server-10.3.logcheck.ignore.workstation)0
-rw-r--r--debian/mariadb-server-10.4.mysql-server.logrotate20
-rw-r--r--debian/mariadb-server-10.4.mysql.default (renamed from debian/mariadb-server-10.3.mysql.default)0
-rw-r--r--debian/mariadb-server-10.4.postinst190
-rw-r--r--debian/mariadb-server-10.4.postrm79
-rw-r--r--debian/mariadb-server-10.4.preinst206
-rw-r--r--debian/mariadb-server-10.4.prerm (renamed from debian/mariadb-server-10.3.prerm)0
-rw-r--r--debian/mariadb-server-10.4.py52
-rw-r--r--debian/mariadb-server-10.4.templates76
-rw-r--r--debian/mariadb-server-10.4.triggers (renamed from debian/mariadb-server-10.3.triggers)0
-rw-r--r--debian/mariadb-server-core-10.3.install33
-rw-r--r--debian/mariadb-server-core-10.4.install38
-rw-r--r--debian/mariadb-server-core-10.4.links3
-rw-r--r--debian/mariadb-test.install4
-rw-r--r--debian/mariadb-test.links4
-rw-r--r--debian/not-installed18
-rw-r--r--debian/po/POTFILES.in2
-rw-r--r--debian/po/ar.po103
-rw-r--r--debian/po/ca.po207
-rw-r--r--debian/po/cs.po197
-rw-r--r--debian/po/da.po231
-rw-r--r--debian/po/de.po77
-rw-r--r--debian/po/es.po213
-rw-r--r--debian/po/eu.po89
-rw-r--r--debian/po/fr.po102
-rw-r--r--debian/po/gl.po105
-rw-r--r--debian/po/it.po79
-rw-r--r--debian/po/ja.po80
-rw-r--r--debian/po/nb.po140
-rw-r--r--debian/po/nl.po145
-rw-r--r--debian/po/pt.po160
-rw-r--r--debian/po/pt_BR.po297
-rw-r--r--debian/po/ro.po161
-rw-r--r--debian/po/ru.po78
-rw-r--r--debian/po/sv.po85
-rw-r--r--debian/po/templates.pot46
-rw-r--r--debian/po/tr.po206
-rwxr-xr-xdebian/rules17
-rw-r--r--extra/CMakeLists.txt3
-rw-r--r--extra/aws_sdk/CMakeLists.txt74
-rw-r--r--extra/innochecksum.cc294
-rw-r--r--extra/mariabackup/CMakeLists.txt13
-rw-r--r--extra/mariabackup/backup_copy.cc28
-rw-r--r--extra/mariabackup/backup_mysql.cc122
-rw-r--r--extra/mariabackup/changed_page_bitmap.cc16
-rw-r--r--extra/mariabackup/ds_local.cc8
-rw-r--r--extra/mariabackup/fil_cur.cc38
-rw-r--r--extra/mariabackup/fil_cur.h7
-rw-r--r--extra/mariabackup/innobackupex.cc14
-rw-r--r--extra/mariabackup/read_filt.cc2
-rw-r--r--extra/mariabackup/read_filt.h2
-rw-r--r--extra/mariabackup/write_filt.cc12
-rw-r--r--extra/mariabackup/xtrabackup.cc732
-rw-r--r--extra/mariabackup/xtrabackup.h58
-rw-r--r--extra/my_print_defaults.c29
-rw-r--r--extra/perror.c29
-rw-r--r--extra/resolve_stack_dump.c2
-rw-r--r--extra/wolfssl/CMakeLists.txt166
-rw-r--r--extra/wolfssl/user_settings.h.in61
m---------extra/wolfssl/wolfssl0
-rw-r--r--extra/yassl/AUTHORS0
-rw-r--r--extra/yassl/CMakeLists.txt29
-rw-r--r--extra/yassl/COPYING340
-rw-r--r--extra/yassl/ChangeLog0
-rw-r--r--extra/yassl/FLOSS-EXCEPTIONS121
-rw-r--r--extra/yassl/INSTALL234
-rw-r--r--extra/yassl/NEWS0
-rw-r--r--extra/yassl/README786
-rw-r--r--extra/yassl/certs/ca-cert.pem87
-rw-r--r--extra/yassl/certs/ca-key.pem27
-rw-r--r--extra/yassl/certs/client-cert.derbin1198 -> 0 bytes
-rw-r--r--extra/yassl/certs/client-cert.pem87
-rw-r--r--extra/yassl/certs/client-key.derbin1192 -> 0 bytes
-rw-r--r--extra/yassl/certs/client-key.pem27
-rw-r--r--extra/yassl/certs/client-keyEnc.pem12
-rw-r--r--extra/yassl/certs/client-keyEnc3.pem12
-rw-r--r--extra/yassl/certs/dh1024.dat1
-rw-r--r--extra/yassl/certs/dsa-cert.pem22
-rw-r--r--extra/yassl/certs/dsa1024.derbin448 -> 0 bytes
-rw-r--r--extra/yassl/certs/dsa1024.pem12
-rw-r--r--extra/yassl/certs/server-cert.pem173
-rw-r--r--extra/yassl/certs/server-key.pem27
-rw-r--r--extra/yassl/certs/server-keyEnc.pem30
-rw-r--r--extra/yassl/certs/taoCert.txt62
-rw-r--r--extra/yassl/examples/client/client.cpp179
-rw-r--r--extra/yassl/examples/client/client.dsp102
-rw-r--r--extra/yassl/examples/echoclient/echoclient.cpp120
-rw-r--r--extra/yassl/examples/echoclient/echoclient.dsp102
-rw-r--r--extra/yassl/examples/echoclient/input93
-rw-r--r--extra/yassl/examples/echoclient/quit2
-rw-r--r--extra/yassl/examples/echoserver/echoserver.cpp167
-rw-r--r--extra/yassl/examples/echoserver/echoserver.dsp102
-rw-r--r--extra/yassl/examples/server/server.cpp155
-rw-r--r--extra/yassl/examples/server/server.dsp109
-rw-r--r--extra/yassl/include/buffer.hpp211
-rw-r--r--extra/yassl/include/cert_wrapper.hpp137
-rw-r--r--extra/yassl/include/crypto_wrapper.hpp429
-rw-r--r--extra/yassl/include/factory.hpp102
-rw-r--r--extra/yassl/include/handshake.hpp70
-rw-r--r--extra/yassl/include/lock.hpp96
-rw-r--r--extra/yassl/include/log.hpp56
-rw-r--r--extra/yassl/include/openssl/crypto.h37
-rw-r--r--extra/yassl/include/openssl/des.h20
-rw-r--r--extra/yassl/include/openssl/des_old.h20
-rw-r--r--extra/yassl/include/openssl/engine.h24
-rw-r--r--extra/yassl/include/openssl/err.h27
-rw-r--r--extra/yassl/include/openssl/evp.h29
-rwxr-xr-xextra/yassl/include/openssl/generate_prefix_files.pl62
-rw-r--r--extra/yassl/include/openssl/hmac.h20
-rw-r--r--extra/yassl/include/openssl/lhash.h21
-rw-r--r--extra/yassl/include/openssl/md4.h20
-rw-r--r--extra/yassl/include/openssl/md5.h23
-rw-r--r--extra/yassl/include/openssl/objects.h20
-rw-r--r--extra/yassl/include/openssl/opensslv.h31
-rw-r--r--extra/yassl/include/openssl/pem.h20
-rw-r--r--extra/yassl/include/openssl/pkcs12.h24
-rw-r--r--extra/yassl/include/openssl/prefix_crypto.h20
-rw-r--r--extra/yassl/include/openssl/prefix_ssl.h188
-rw-r--r--extra/yassl/include/openssl/rand.h21
-rw-r--r--extra/yassl/include/openssl/rsa.h29
-rw-r--r--extra/yassl/include/openssl/sha.h20
-rw-r--r--extra/yassl/include/openssl/ssl.h566
-rw-r--r--extra/yassl/include/openssl/transport_types.h26
-rw-r--r--extra/yassl/include/openssl/x509.h20
-rw-r--r--extra/yassl/include/openssl/x509v3.h20
-rw-r--r--extra/yassl/include/socket_wrapper.hpp105
-rw-r--r--extra/yassl/include/timer.hpp41
-rw-r--r--extra/yassl/include/yassl.hpp86
-rw-r--r--extra/yassl/include/yassl_error.hpp88
-rw-r--r--extra/yassl/include/yassl_imp.hpp748
-rw-r--r--extra/yassl/include/yassl_int.hpp724
-rw-r--r--extra/yassl/include/yassl_types.hpp540
-rw-r--r--extra/yassl/lib/dummy1
-rw-r--r--extra/yassl/src/buffer.cpp331
-rw-r--r--extra/yassl/src/cert_wrapper.cpp408
-rw-r--r--extra/yassl/src/crypto_wrapper.cpp998
-rw-r--r--extra/yassl/src/dummy.cpp4
-rw-r--r--extra/yassl/src/handshake.cpp1203
-rw-r--r--extra/yassl/src/lock.cpp87
-rw-r--r--extra/yassl/src/log.cpp146
-rwxr-xr-xextra/yassl/src/make.bat42
-rw-r--r--extra/yassl/src/socket_wrapper.cpp261
-rw-r--r--extra/yassl/src/ssl.cpp1782
-rw-r--r--extra/yassl/src/timer.cpp82
-rw-r--r--extra/yassl/src/yassl.cpp229
-rw-r--r--extra/yassl/src/yassl_error.cpp288
-rw-r--r--extra/yassl/src/yassl_imp.cpp2636
-rw-r--r--extra/yassl/src/yassl_int.cpp2705
-rw-r--r--extra/yassl/taocrypt/CMakeLists.txt34
-rw-r--r--extra/yassl/taocrypt/COPYING340
-rw-r--r--extra/yassl/taocrypt/INSTALL229
-rw-r--r--extra/yassl/taocrypt/README48
-rw-r--r--extra/yassl/taocrypt/benchmark/benchmark.cpp462
-rw-r--r--extra/yassl/taocrypt/benchmark/benchmark.dsp101
-rw-r--r--extra/yassl/taocrypt/benchmark/dh1024.derbin138 -> 0 bytes
-rw-r--r--extra/yassl/taocrypt/benchmark/dsa1024.derbin445 -> 0 bytes
-rwxr-xr-xextra/yassl/taocrypt/benchmark/make.bat24
-rw-r--r--extra/yassl/taocrypt/benchmark/rsa1024.derbin606 -> 0 bytes
-rw-r--r--extra/yassl/taocrypt/certs/client-cert.derbin782 -> 0 bytes
-rw-r--r--extra/yassl/taocrypt/certs/client-key.derbin319 -> 0 bytes
-rw-r--r--extra/yassl/taocrypt/certs/dh1024.dat1
-rw-r--r--extra/yassl/taocrypt/certs/dsa512.derbin249 -> 0 bytes
-rw-r--r--extra/yassl/taocrypt/include/aes.hpp155
-rw-r--r--extra/yassl/taocrypt/include/algebra.hpp227
-rw-r--r--extra/yassl/taocrypt/include/arc4.hpp59
-rw-r--r--extra/yassl/taocrypt/include/asn.hpp392
-rw-r--r--extra/yassl/taocrypt/include/block.hpp203
-rw-r--r--extra/yassl/taocrypt/include/blowfish.hpp88
-rw-r--r--extra/yassl/taocrypt/include/coding.hpp92
-rw-r--r--extra/yassl/taocrypt/include/des.hpp130
-rw-r--r--extra/yassl/taocrypt/include/dh.hpp87
-rw-r--r--extra/yassl/taocrypt/include/dsa.hpp127
-rw-r--r--extra/yassl/taocrypt/include/error.hpp89
-rw-r--r--extra/yassl/taocrypt/include/file.hpp130
-rw-r--r--extra/yassl/taocrypt/include/hash.hpp110
-rw-r--r--extra/yassl/taocrypt/include/hc128.hpp63
-rw-r--r--extra/yassl/taocrypt/include/hmac.hpp139
-rw-r--r--extra/yassl/taocrypt/include/integer.hpp332
-rw-r--r--extra/yassl/taocrypt/include/kernelc.hpp34
-rw-r--r--extra/yassl/taocrypt/include/md2.hpp65
-rw-r--r--extra/yassl/taocrypt/include/md4.hpp63
-rw-r--r--extra/yassl/taocrypt/include/md5.hpp71
-rw-r--r--extra/yassl/taocrypt/include/misc.hpp889
-rw-r--r--extra/yassl/taocrypt/include/modarith.hpp166
-rw-r--r--extra/yassl/taocrypt/include/modes.hpp155
-rw-r--r--extra/yassl/taocrypt/include/pwdbased.hpp91
-rw-r--r--extra/yassl/taocrypt/include/rabbit.hpp65
-rw-r--r--extra/yassl/taocrypt/include/random.hpp85
-rw-r--r--extra/yassl/taocrypt/include/ripemd.hpp70
-rw-r--r--extra/yassl/taocrypt/include/rsa.hpp250
-rw-r--r--extra/yassl/taocrypt/include/runtime.hpp68
-rw-r--r--extra/yassl/taocrypt/include/sha.hpp174
-rw-r--r--extra/yassl/taocrypt/include/twofish.hpp95
-rw-r--r--extra/yassl/taocrypt/include/type_traits.hpp78
-rw-r--r--extra/yassl/taocrypt/include/types.hpp99
-rw-r--r--extra/yassl/taocrypt/mySTL/algorithm.hpp109
-rw-r--r--extra/yassl/taocrypt/mySTL/helpers.hpp154
-rw-r--r--extra/yassl/taocrypt/mySTL/list.hpp368
-rw-r--r--extra/yassl/taocrypt/mySTL/memory.hpp137
-rw-r--r--extra/yassl/taocrypt/mySTL/memory_array.hpp136
-rw-r--r--extra/yassl/taocrypt/mySTL/pair.hpp59
-rw-r--r--extra/yassl/taocrypt/mySTL/stdexcept.hpp76
-rw-r--r--extra/yassl/taocrypt/mySTL/vector.hpp153
-rw-r--r--extra/yassl/taocrypt/src/aes.cpp1885
-rw-r--r--extra/yassl/taocrypt/src/aestables.cpp36
-rw-r--r--extra/yassl/taocrypt/src/algebra.cpp327
-rw-r--r--extra/yassl/taocrypt/src/arc4.cpp243
-rw-r--r--extra/yassl/taocrypt/src/asn.cpp1344
-rw-r--r--extra/yassl/taocrypt/src/bftables.cpp304
-rw-r--r--extra/yassl/taocrypt/src/blowfish.cpp364
-rw-r--r--extra/yassl/taocrypt/src/coding.cpp266
-rw-r--r--extra/yassl/taocrypt/src/des.cpp778
-rw-r--r--extra/yassl/taocrypt/src/dh.cpp104
-rw-r--r--extra/yassl/taocrypt/src/dsa.cpp274
-rw-r--r--extra/yassl/taocrypt/src/file.cpp116
-rw-r--r--extra/yassl/taocrypt/src/hash.cpp191
-rw-r--r--extra/yassl/taocrypt/src/hc128.cpp317
-rw-r--r--extra/yassl/taocrypt/src/integer.cpp3892
-rwxr-xr-xextra/yassl/taocrypt/src/make.bat53
-rw-r--r--extra/yassl/taocrypt/src/md2.cpp126
-rw-r--r--extra/yassl/taocrypt/src/md4.cpp157
-rw-r--r--extra/yassl/taocrypt/src/md5.cpp506
-rw-r--r--extra/yassl/taocrypt/src/misc.cpp296
-rw-r--r--extra/yassl/taocrypt/src/rabbit.cpp255
-rw-r--r--extra/yassl/taocrypt/src/random.cpp138
-rw-r--r--extra/yassl/taocrypt/src/ripemd.cpp844
-rw-r--r--extra/yassl/taocrypt/src/rsa.cpp215
-rw-r--r--extra/yassl/taocrypt/src/sha.cpp1033
-rw-r--r--extra/yassl/taocrypt/src/tftables.cpp350
-rw-r--r--extra/yassl/taocrypt/src/twofish.cpp582
-rw-r--r--extra/yassl/taocrypt/taocrypt.dsp321
-rw-r--r--extra/yassl/taocrypt/taocrypt.dsw59
-rw-r--r--extra/yassl/taocrypt/test.dsw29
-rwxr-xr-xextra/yassl/taocrypt/test/make.bat24
-rw-r--r--extra/yassl/taocrypt/test/memory.cpp359
-rw-r--r--extra/yassl/taocrypt/test/test.cpp1358
-rw-r--r--extra/yassl/taocrypt/test/test.dsp102
-rw-r--r--extra/yassl/testsuite/cipher-test.sh131
-rw-r--r--extra/yassl/testsuite/input107
-rwxr-xr-xextra/yassl/testsuite/make.bat29
-rw-r--r--extra/yassl/testsuite/quit2
-rw-r--r--extra/yassl/testsuite/test.hpp553
-rw-r--r--extra/yassl/testsuite/testsuite.cpp174
-rw-r--r--extra/yassl/testsuite/testsuite.dsp127
-rw-r--r--extra/yassl/yassl.dsp192
-rw-r--r--extra/yassl/yassl.dsw149
-rw-r--r--include/aria_backup.h37
-rw-r--r--include/atomic/gcc_sync.h106
-rw-r--r--include/byte_order_generic.h8
-rw-r--r--include/byte_order_generic_x86.h1
-rw-r--r--include/ilist.h107
-rw-r--r--include/json_lib.h18
-rw-r--r--include/lf.h3
-rw-r--r--include/m_ctype.h63
-rw-r--r--include/m_string.h2
-rw-r--r--include/maria.h3
-rw-r--r--include/my_atomic.h20
-rw-r--r--include/my_atomic_wrapper.h65
-rw-r--r--include/my_base.h22
-rw-r--r--include/my_bit.h8
-rw-r--r--include/my_byteorder.h4
-rw-r--r--include/my_compare.h59
-rw-r--r--include/my_counter.h49
-rw-r--r--include/my_cpu.h13
-rw-r--r--include/my_getopt.h1
-rw-r--r--include/my_global.h8
-rw-r--r--include/my_handler_errors.h1
-rw-r--r--include/my_pthread.h35
-rw-r--r--include/my_rdtsc.h135
-rw-r--r--include/my_sys.h33
-rw-r--r--include/my_time.h87
-rw-r--r--include/myisam.h3
-rw-r--r--include/myisammrg.h2
-rw-r--r--include/myisampack.h10
-rw-r--r--include/mysql/plugin.h2
-rw-r--r--include/mysql/plugin_audit.h.pp45
-rw-r--r--include/mysql/plugin_auth.h47
-rw-r--r--include/mysql/plugin_auth.h.pp49
-rw-r--r--include/mysql/plugin_encryption.h.pp45
-rw-r--r--include/mysql/plugin_ftparser.h.pp45
-rw-r--r--include/mysql/plugin_password_validation.h4
-rw-r--r--include/mysql/plugin_password_validation.h.pp49
-rw-r--r--include/mysql/service_json.h119
-rw-r--r--include/mysql/service_my_crypt.h2
-rw-r--r--include/mysql/service_my_print_error.h11
-rw-r--r--include/mysql/service_wsrep.h353
-rw-r--r--include/mysql/services.h1
-rw-r--r--include/mysql_com.h11
-rw-r--r--include/mysql_embed.h1
-rw-r--r--include/mysql_version.h.in1
-rw-r--r--include/mysqld_default_groups.h1
-rw-r--r--include/scope.h74
-rw-r--r--include/service_versions.h3
-rw-r--r--include/ssl_compat.h39
-rw-r--r--include/sslopt-case.h4
-rw-r--r--include/sslopt-longopts.h5
-rw-r--r--include/sslopt-vars.h1
-rw-r--r--include/thr_lock.h6
-rw-r--r--include/thread_pool_priv.h3
-rw-r--r--include/violite.h40
-rw-r--r--include/wsrep.h77
-rw-r--r--libmysqld/CMakeLists.txt13
-rw-r--r--libmysqld/lib_sql.cc241
-rw-r--r--libmysqld/libmysql.c19
-rw-r--r--libservices/CMakeLists.txt1
-rw-r--r--libservices/json_service.c19
-rw-r--r--man/CMakeLists.txt40
-rw-r--r--man/comp_err.12
-rw-r--r--man/galera_new_cluster.12
-rw-r--r--man/galera_recovery.12
-rw-r--r--man/innochecksum.12
-rw-r--r--man/mariabackup.12
-rw-r--r--man/mariadb-service-convert.12
-rw-r--r--man/mbstream.12
-rw-r--r--man/msql2mysql.12
-rw-r--r--man/my_print_defaults.19
-rw-r--r--man/my_safe_process.12
-rw-r--r--man/myisam_ftdump.12
-rw-r--r--man/myisamchk.12
-rw-r--r--man/myisamlog.12
-rw-r--r--man/myisampack.12
-rw-r--r--man/mysql-stress-test.pl.12
-rw-r--r--man/mysql-test-run.pl.12
-rw-r--r--man/mysql.12
-rw-r--r--man/mysql.server.12
-rw-r--r--man/mysql_client_test.12
-rw-r--r--man/mysql_config.12
-rw-r--r--man/mysql_convert_table_format.12
-rw-r--r--man/mysql_find_rows.12
-rw-r--r--man/mysql_fix_extensions.12
-rw-r--r--man/mysql_install_db.12
-rw-r--r--man/mysql_ldb.12
-rw-r--r--man/mysql_plugin.12
-rw-r--r--man/mysql_secure_installation.12
-rw-r--r--man/mysql_setpermission.12
-rw-r--r--man/mysql_tzinfo_to_sql.12
-rw-r--r--man/mysql_upgrade.12
-rw-r--r--man/mysql_waitpid.12
-rw-r--r--man/mysqlaccess.12
-rw-r--r--man/mysqladmin.136
-rw-r--r--man/mysqlbinlog.12
-rw-r--r--man/mysqlcheck.12
-rw-r--r--man/mysqld.82
-rw-r--r--man/mysqld_multi.12
-rw-r--r--man/mysqld_safe.12
-rw-r--r--man/mysqld_safe_helper.12
-rw-r--r--man/mysqldump.12
-rw-r--r--man/mysqldumpslow.12
-rw-r--r--man/mysqlhotcopy.12
-rw-r--r--man/mysqlimport.12
-rw-r--r--man/mysqlshow.12
-rw-r--r--man/mysqlslap.12
-rw-r--r--man/mysqltest.12
-rw-r--r--man/perror.12
-rw-r--r--man/replace.12
-rw-r--r--man/resolve_stack_dump.12
-rw-r--r--man/resolveip.12
-rw-r--r--man/wsrep_sst_common.12
-rw-r--r--man/wsrep_sst_mariabackup.12
-rw-r--r--man/wsrep_sst_mysqldump.12
-rw-r--r--man/wsrep_sst_rsync.12
-rw-r--r--man/wsrep_sst_rsync_wan.12
-rw-r--r--mysql-test/collections/smoke_test2
-rw-r--r--mysql-test/include/add_anonymous_users.inc2
-rw-r--r--mysql-test/include/analyze-format.inc2
-rw-r--r--mysql-test/include/check-testcase.test63
-rw-r--r--mysql-test/include/check_ftwrl_incompatible.inc6
-rw-r--r--mysql-test/include/ctype_numconv.inc4
-rw-r--r--mysql-test/include/deadlock.inc2
-rw-r--r--mysql-test/include/default_mysqld.cnf1
-rw-r--r--mysql-test/include/default_optimizer_switch.inc4
-rw-r--r--mysql-test/include/diff_tables.inc2
-rw-r--r--mysql-test/include/explain_non_select.inc4
-rw-r--r--mysql-test/include/galera_cluster.inc6
-rw-r--r--mysql-test/include/galera_no_debug_sync.inc9
-rw-r--r--mysql-test/include/galera_variables_ok.inc9
-rw-r--r--mysql-test/include/galera_variables_ok_debug.inc9
-rw-r--r--mysql-test/include/galera_wait_sync_point.inc11
-rw-r--r--mysql-test/include/gis_keys.inc4
-rw-r--r--mysql-test/include/have_auth_named_pipe.inc13
-rw-r--r--mysql-test/include/have_garbd.inc4
-rw-r--r--mysql-test/include/have_mariabackup.inc11
-rw-r--r--mysql-test/include/have_unix_socket.inc5
-rw-r--r--mysql-test/include/have_unix_socket.opt1
-rw-r--r--mysql-test/include/have_wsrep_enabled.inc1
-rw-r--r--mysql-test/include/icp_tests.inc19
-rw-r--r--mysql-test/include/index_merge1.inc16
-rw-r--r--mysql-test/include/innodb_checksum_algorithm.combinations11
-rw-r--r--mysql-test/include/innodb_checksum_algorithm.inc1
-rw-r--r--mysql-test/include/install_plugin_if_exists.inc45
-rw-r--r--mysql-test/include/kill_galera.inc20
-rw-r--r--mysql-test/include/maria_empty_logs.inc12
-rw-r--r--mysql-test/include/maria_verify_recovery.inc12
-rw-r--r--mysql-test/include/mix1.inc13
-rw-r--r--mysql-test/include/mtr_check.sql3
-rw-r--r--mysql-test/include/not_asan.inc8
-rw-r--r--mysql-test/include/not_ubsan.inc8
-rw-r--r--mysql-test/include/rowid_filter_debug_kill.inc68
-rw-r--r--mysql-test/include/start_mysqld.inc25
-rw-r--r--mysql-test/include/switch_to_mysql_global_priv.inc7
-rw-r--r--mysql-test/include/switch_to_mysql_user.inc57
-rw-r--r--mysql-test/include/system_db_struct.inc2
-rw-r--r--mysql-test/include/type_hrtime.inc8
-rw-r--r--mysql-test/include/wait_until_connected_again.inc19
-rw-r--r--mysql-test/include/wsrep_wait_disconnect.inc20
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm21
-rw-r--r--mysql-test/lib/My/SafeProcess.pm6
-rw-r--r--mysql-test/lib/My/SafeProcess/CMakeLists.txt2
-rw-r--r--mysql-test/lib/My/SafeProcess/wsrep_check_version.c134
-rwxr-xr-xmysql-test/lib/generate-ssl-certs.sh3
-rw-r--r--mysql-test/lib/mtr_cases.pm1
-rw-r--r--mysql-test/lib/openssl.cnf12
-rw-r--r--mysql-test/main/1st.result2
-rw-r--r--mysql-test/main/alias.result19
-rw-r--r--mysql-test/main/alias.test17
-rw-r--r--mysql-test/main/alter_table.result41
-rw-r--r--mysql-test/main/alter_table.test44
-rw-r--r--mysql-test/main/alter_user.result40
-rw-r--r--mysql-test/main/alter_user.test13
-rw-r--r--mysql-test/main/analyze.result7
-rw-r--r--mysql-test/main/analyze_format_json.result14
-rw-r--r--mysql-test/main/analyze_stmt_orderby.result12
-rw-r--r--mysql-test/main/auth_rpl.result2
-rw-r--r--mysql-test/main/backup_aria.result158
-rw-r--r--mysql-test/main/backup_aria.test157
-rw-r--r--mysql-test/main/backup_interaction.result528
-rw-r--r--mysql-test/main/backup_interaction.test517
-rw-r--r--mysql-test/main/backup_lock.result219
-rw-r--r--mysql-test/main/backup_lock.test284
-rw-r--r--mysql-test/main/backup_lock_binlog.result37
-rw-r--r--mysql-test/main/backup_lock_binlog.test48
-rw-r--r--mysql-test/main/backup_lock_debug.result53
-rw-r--r--mysql-test/main/backup_lock_debug.test78
-rw-r--r--mysql-test/main/backup_locks.result167
-rw-r--r--mysql-test/main/backup_locks.test192
-rw-r--r--mysql-test/main/backup_priv.result40
-rw-r--r--mysql-test/main/backup_priv.test52
-rw-r--r--mysql-test/main/backup_stages.result335
-rw-r--r--mysql-test/main/backup_stages.test385
-rw-r--r--mysql-test/main/backup_syntax.result163
-rw-r--r--mysql-test/main/backup_syntax.test181
-rw-r--r--mysql-test/main/bootstrap.result16
-rw-r--r--mysql-test/main/bootstrap.test19
-rw-r--r--mysql-test/main/bootstrap_innodb.result1
-rw-r--r--mysql-test/main/brackets.result4517
-rw-r--r--mysql-test/main/brackets.test2498
-rw-r--r--mysql-test/main/bug12427262.result6
-rw-r--r--mysql-test/main/cast.result111
-rw-r--r--mysql-test/main/cast.test54
-rw-r--r--mysql-test/main/check_constraint.result27
-rw-r--r--mysql-test/main/check_constraint.test12
-rw-r--r--mysql-test/main/column_compression.result2
-rw-r--r--mysql-test/main/column_compression_parts.result1
-rw-r--r--mysql-test/main/column_compression_parts.test2
-rw-r--r--mysql-test/main/connect-abstract.cnf6
-rw-r--r--mysql-test/main/connect-abstract.result3
-rw-r--r--mysql-test/main/connect-abstract.test9
-rw-r--r--mysql-test/main/connect.result66
-rw-r--r--mysql-test/main/connect.test90
-rw-r--r--mysql-test/main/create-big.result12
-rw-r--r--mysql-test/main/create-big.test12
-rw-r--r--mysql-test/main/create.result114
-rw-r--r--mysql-test/main/create.test114
-rw-r--r--mysql-test/main/create_drop_binlog.result4
-rw-r--r--mysql-test/main/create_drop_user.result24
-rw-r--r--mysql-test/main/create_drop_user.test8
-rw-r--r--mysql-test/main/create_or_replace.result56
-rw-r--r--mysql-test/main/create_or_replace.test25
-rw-r--r--mysql-test/main/create_select.result24
-rw-r--r--mysql-test/main/create_select.test16
-rw-r--r--mysql-test/main/create_user.result24
-rw-r--r--mysql-test/main/create_utf8.result89
-rw-r--r--mysql-test/main/create_utf8.test80
-rw-r--r--mysql-test/main/cte_nonrecursive.result53
-rw-r--r--mysql-test/main/cte_nonrecursive.test14
-rw-r--r--mysql-test/main/cte_recursive.result63
-rw-r--r--mysql-test/main/cte_recursive.test17
-rw-r--r--mysql-test/main/ctype_binary.result16
-rw-r--r--mysql-test/main/ctype_cp1251.result14
-rw-r--r--mysql-test/main/ctype_gbk.result4
-rw-r--r--mysql-test/main/ctype_latin1.result14
-rw-r--r--mysql-test/main/ctype_many.result1
-rw-r--r--mysql-test/main/ctype_many.test2
-rw-r--r--mysql-test/main/ctype_sjis.result16
-rw-r--r--mysql-test/main/ctype_sjis.test19
-rw-r--r--mysql-test/main/ctype_ucs.result64
-rw-r--r--mysql-test/main/ctype_ucs.test30
-rw-r--r--mysql-test/main/ctype_upgrade.result8
-rw-r--r--mysql-test/main/ctype_utf16.result4
-rw-r--r--mysql-test/main/ctype_utf16_uca.result8
-rw-r--r--mysql-test/main/ctype_utf16le.result4
-rw-r--r--mysql-test/main/ctype_utf32.result8
-rw-r--r--mysql-test/main/ctype_utf32_uca.result20
-rw-r--r--mysql-test/main/ctype_utf32_uca.test18
-rw-r--r--mysql-test/main/ctype_utf8.result14
-rw-r--r--mysql-test/main/custom_aggregate_functions.result36
-rw-r--r--mysql-test/main/custom_aggregate_functions.test52
-rw-r--r--mysql-test/main/date_formats.result2
-rw-r--r--mysql-test/main/deadlock_ftwrl.result21
-rw-r--r--mysql-test/main/deadlock_ftwrl.test36
-rw-r--r--mysql-test/main/deadlock_innodb.result2
-rw-r--r--mysql-test/main/default.result36
-rw-r--r--mysql-test/main/default.test49
-rw-r--r--mysql-test/main/default_storage_engine.result2
-rw-r--r--mysql-test/main/default_storage_engine.test4
-rw-r--r--mysql-test/main/delayed.result12
-rw-r--r--mysql-test/main/delayed.test12
-rw-r--r--mysql-test/main/delete_use_source.result3
-rw-r--r--mysql-test/main/deprecated_features.result2
-rw-r--r--mysql-test/main/derived.result2
-rw-r--r--mysql-test/main/derived_cond_pushdown.result505
-rw-r--r--mysql-test/main/derived_cond_pushdown.test42
-rw-r--r--mysql-test/main/derived_opt.result2
-rw-r--r--mysql-test/main/derived_split_innodb.result27
-rw-r--r--mysql-test/main/derived_split_innodb.test4
-rw-r--r--mysql-test/main/derived_view.result10
-rw-r--r--mysql-test/main/distinct.result6
-rw-r--r--mysql-test/main/drop.test20
-rw-r--r--mysql-test/main/dyncol.result4
-rw-r--r--mysql-test/main/empty_user_table.result13
-rw-r--r--mysql-test/main/empty_user_table.test22
-rw-r--r--mysql-test/main/errors.result35
-rw-r--r--mysql-test/main/errors.test36
-rw-r--r--mysql-test/main/events_restart.result5
-rw-r--r--mysql-test/main/except.result16
-rw-r--r--mysql-test/main/except.test4
-rw-r--r--mysql-test/main/explain.result10
-rw-r--r--mysql-test/main/explain.test6
-rw-r--r--mysql-test/main/explain_json.result19
-rw-r--r--mysql-test/main/explain_non_select.result2
-rw-r--r--mysql-test/main/failed_auth_3909.result35
-rw-r--r--mysql-test/main/failed_auth_3909.test28
-rw-r--r--mysql-test/main/failed_auth_unixsocket.result13
-rw-r--r--mysql-test/main/failed_auth_unixsocket.test25
-rw-r--r--mysql-test/main/features.result1
-rw-r--r--mysql-test/main/flush.result21
-rw-r--r--mysql-test/main/flush.test48
-rw-r--r--mysql-test/main/flush_and_binlog.result33
-rw-r--r--mysql-test/main/flush_and_binlog.test43
-rw-r--r--mysql-test/main/flush_block_commit.test2
-rw-r--r--mysql-test/main/flush_block_commit_notembedded.test2
-rw-r--r--mysql-test/main/flush_read_lock.result109
-rw-r--r--mysql-test/main/flush_read_lock.test175
-rw-r--r--mysql-test/main/flush_read_lock_kill.test2
-rw-r--r--mysql-test/main/flush_ssl.result28
-rw-r--r--mysql-test/main/flush_ssl.test61
-rw-r--r--mysql-test/main/fulltext_order_by.result4
-rw-r--r--mysql-test/main/func_analyse.result55
-rw-r--r--mysql-test/main/func_analyse.test53
-rw-r--r--mysql-test/main/func_debug.result290
-rw-r--r--mysql-test/main/func_debug.test102
-rw-r--r--mysql-test/main/func_default.result4
-rw-r--r--mysql-test/main/func_default.test2
-rw-r--r--mysql-test/main/func_extract.result592
-rw-r--r--mysql-test/main/func_extract.test257
-rw-r--r--mysql-test/main/func_group.result23
-rw-r--r--mysql-test/main/func_group.test11
-rw-r--r--mysql-test/main/func_group_innodb.result14
-rw-r--r--mysql-test/main/func_group_innodb.test15
-rw-r--r--mysql-test/main/func_hybrid_type.result219
-rw-r--r--mysql-test/main/func_hybrid_type.test102
-rw-r--r--mysql-test/main/func_in.result47
-rw-r--r--mysql-test/main/func_in.test24
-rw-r--r--mysql-test/main/func_json.result88
-rw-r--r--mysql-test/main/func_json.test50
-rw-r--r--mysql-test/main/func_like.result4
-rw-r--r--mysql-test/main/func_math.result1508
-rw-r--r--mysql-test/main/func_math.test717
-rw-r--r--mysql-test/main/func_misc.result26
-rw-r--r--mysql-test/main/func_misc.test30
-rw-r--r--mysql-test/main/func_sapdb.result6
-rw-r--r--mysql-test/main/func_str.result33
-rw-r--r--mysql-test/main/func_str.test27
-rw-r--r--mysql-test/main/func_time.result2614
-rw-r--r--mysql-test/main/func_time.test903
-rw-r--r--mysql-test/main/func_time_round.result1374
-rw-r--r--mysql-test/main/func_time_round.test461
-rw-r--r--mysql-test/main/get_diagnostics.result21
-rw-r--r--mysql-test/main/get_diagnostics.test16
-rw-r--r--mysql-test/main/gis-debug.result90
-rw-r--r--mysql-test/main/gis-debug.test36
-rw-r--r--mysql-test/main/gis-precise.result2
-rw-r--r--mysql-test/main/gis-rtree.result1
-rw-r--r--mysql-test/main/gis.result79
-rw-r--r--mysql-test/main/gis.test75
-rw-r--r--mysql-test/main/gis_notembedded.result4
-rw-r--r--mysql-test/main/grant.result86
-rw-r--r--mysql-test/main/grant.test57
-rw-r--r--mysql-test/main/grant2.result114
-rw-r--r--mysql-test/main/grant2.test81
-rw-r--r--mysql-test/main/grant3.result24
-rw-r--r--mysql-test/main/grant4.result24
-rw-r--r--mysql-test/main/grant4.test4
-rw-r--r--mysql-test/main/grant5.result157
-rw-r--r--mysql-test/main/grant5.test136
-rw-r--r--mysql-test/main/grant_4332.result8
-rw-r--r--mysql-test/main/grant_4332.test8
-rw-r--r--mysql-test/main/grant_lowercase.result6
-rw-r--r--mysql-test/main/grant_lowercase.test4
-rw-r--r--mysql-test/main/grant_repair.result9
-rw-r--r--mysql-test/main/grant_repair.test21
-rw-r--r--mysql-test/main/group_by.result19
-rw-r--r--mysql-test/main/group_by.test6
-rw-r--r--mysql-test/main/group_by_innodb.result1
-rw-r--r--mysql-test/main/group_min_max.result357
-rw-r--r--mysql-test/main/group_min_max.test38
-rw-r--r--mysql-test/main/group_min_max_innodb.result13
-rw-r--r--mysql-test/main/group_min_max_innodb.test12
-rw-r--r--mysql-test/main/handlersocket.result2
-rw-r--r--mysql-test/main/having.result49
-rw-r--r--mysql-test/main/having.test60
-rw-r--r--mysql-test/main/having_cond_pushdown.result4972
-rw-r--r--mysql-test/main/having_cond_pushdown.test1485
-rw-r--r--mysql-test/main/help.result8
-rw-r--r--mysql-test/main/help.test8
-rw-r--r--mysql-test/main/implicit_commit.result10
-rw-r--r--mysql-test/main/implicit_commit.test10
-rw-r--r--mysql-test/main/in_subq_cond_pushdown.result3889
-rw-r--r--mysql-test/main/in_subq_cond_pushdown.test862
-rw-r--r--mysql-test/main/index_intersect.result159
-rw-r--r--mysql-test/main/index_intersect.test35
-rw-r--r--mysql-test/main/index_intersect_innodb.result189
-rw-r--r--mysql-test/main/index_intersect_innodb.test9
-rw-r--r--mysql-test/main/index_merge_innodb.result3
-rw-r--r--mysql-test/main/index_merge_innodb.test1
-rw-r--r--mysql-test/main/index_merge_myisam.result150
-rw-r--r--mysql-test/main/index_merge_myisam.test29
-rw-r--r--mysql-test/main/information_schema.result32
-rw-r--r--mysql-test/main/information_schema.test11
-rw-r--r--mysql-test/main/information_schema_all_engines.result8
-rw-r--r--mysql-test/main/information_schema_db.result2
-rw-r--r--mysql-test/main/init_file_set_password-7656.result8
-rw-r--r--mysql-test/main/init_file_set_password-7656.test2
-rw-r--r--mysql-test/main/innodb_ext_key,off.rdiff92
-rw-r--r--mysql-test/main/innodb_ext_key.result47
-rw-r--r--mysql-test/main/innodb_ext_key.test25
-rw-r--r--mysql-test/main/innodb_icp.result38
-rw-r--r--mysql-test/main/innodb_icp.test11
-rw-r--r--mysql-test/main/innodb_mysql_lock2.result14
-rw-r--r--mysql-test/main/innodb_mysql_sync.result12
-rw-r--r--mysql-test/main/innodb_mysql_sync.test13
-rw-r--r--mysql-test/main/insert.result28
-rw-r--r--mysql-test/main/insert.test36
-rw-r--r--mysql-test/main/intersect.result51
-rw-r--r--mysql-test/main/intersect.test31
-rw-r--r--mysql-test/main/invisible_field.result4
-rw-r--r--mysql-test/main/invisible_field_debug.result15
-rw-r--r--mysql-test/main/invisible_field_debug.test3
-rw-r--r--mysql-test/main/join.result24
-rw-r--r--mysql-test/main/join.test3
-rw-r--r--mysql-test/main/join_cache.result1560
-rw-r--r--mysql-test/main/join_cache.test63
-rw-r--r--mysql-test/main/join_nested.result16
-rw-r--r--mysql-test/main/join_nested.test2
-rw-r--r--mysql-test/main/join_nested_jcl6.result20
-rw-r--r--mysql-test/main/join_outer.result13
-rw-r--r--mysql-test/main/join_outer_innodb.result28
-rw-r--r--mysql-test/main/join_outer_jcl6.result13
-rw-r--r--mysql-test/main/key.result6
-rw-r--r--mysql-test/main/key.test1
-rw-r--r--mysql-test/main/key_cache.result8
-rw-r--r--mysql-test/main/kill.result4
-rw-r--r--mysql-test/main/kill.test10
-rw-r--r--mysql-test/main/limit_rows_examined.result27
-rw-r--r--mysql-test/main/limit_rows_examined.test14
-rw-r--r--mysql-test/main/loaddata.result2
-rw-r--r--mysql-test/main/loaddata.test2
-rw-r--r--mysql-test/main/lock.result3
-rw-r--r--mysql-test/main/lock.test2
-rw-r--r--mysql-test/main/lock_multi.result20
-rw-r--r--mysql-test/main/lock_multi.test70
-rw-r--r--mysql-test/main/lock_sync.result18
-rw-r--r--mysql-test/main/lock_sync.test4
-rw-r--r--mysql-test/main/lock_user.result173
-rw-r--r--mysql-test/main/lock_user.test168
-rw-r--r--mysql-test/main/log_tables_upgrade.result4
-rw-r--r--mysql-test/main/long_unique.result1438
-rw-r--r--mysql-test/main/long_unique.test535
-rw-r--r--mysql-test/main/long_unique_big.result38
-rw-r--r--mysql-test/main/long_unique_big.test26
-rw-r--r--mysql-test/main/long_unique_bugs.result338
-rw-r--r--mysql-test/main/long_unique_bugs.test428
-rw-r--r--mysql-test/main/long_unique_debug.result579
-rw-r--r--mysql-test/main/long_unique_debug.test95
-rw-r--r--mysql-test/main/long_unique_innodb.opt1
-rw-r--r--mysql-test/main/long_unique_innodb.result136
-rw-r--r--mysql-test/main/long_unique_innodb.test145
-rw-r--r--mysql-test/main/long_unique_update.result317
-rw-r--r--mysql-test/main/long_unique_update.test141
-rw-r--r--mysql-test/main/long_unique_using_hash.result54
-rw-r--r--mysql-test/main/long_unique_using_hash.test28
-rw-r--r--mysql-test/main/lowercase_fs_off.result4
-rw-r--r--mysql-test/main/lowercase_fs_off.test1
-rw-r--r--mysql-test/main/max_password_errors.result45
-rw-r--r--mysql-test/main/max_password_errors.test64
-rw-r--r--mysql-test/main/mdev-25830.result56
-rw-r--r--mysql-test/main/mdev-25830.test104
-rw-r--r--mysql-test/main/mdev13607.result3
-rw-r--r--mysql-test/main/mdev_22370.result1
-rw-r--r--mysql-test/main/mdl.result74
-rw-r--r--mysql-test/main/mdl.test64
-rw-r--r--mysql-test/main/mdl_sync.result63
-rw-r--r--mysql-test/main/mdl_sync.test95
-rw-r--r--mysql-test/main/merge.result21
-rw-r--r--mysql-test/main/metadata.result40
-rw-r--r--mysql-test/main/mix2_myisam.result1
-rw-r--r--mysql-test/main/mrr_icp_extra.result11
-rw-r--r--mysql-test/main/mrr_icp_extra.test1
-rw-r--r--mysql-test/main/multi_update.result8
-rw-r--r--mysql-test/main/myisam.result18
-rw-r--r--mysql-test/main/myisam.test8
-rw-r--r--mysql-test/main/myisam_debug.result2
-rw-r--r--mysql-test/main/myisam_explain_non_select_all.result594
-rw-r--r--mysql-test/main/myisam_icp.result61
-rw-r--r--mysql-test/main/myisam_icp.test15
-rw-r--r--mysql-test/main/myisam_mrr,32bit.rdiff13
-rw-r--r--mysql-test/main/myisam_mrr.result12
-rw-r--r--mysql-test/main/myisam_mrr.test3
-rw-r--r--mysql-test/main/myisam_recover.result4
-rw-r--r--mysql-test/main/myisam_repair.result51
-rw-r--r--mysql-test/main/myisam_repair.test57
-rw-r--r--mysql-test/main/mysql_client_test.result24
-rw-r--r--mysql-test/main/mysql_client_test.test4
-rw-r--r--mysql-test/main/mysql_install_db_win.result17
-rw-r--r--mysql-test/main/mysql_install_db_win.test48
-rw-r--r--mysql-test/main/mysql_protocols.result5
-rw-r--r--mysql-test/main/mysql_tzinfo_to_sql_symlink.result323
-rw-r--r--mysql-test/main/mysql_tzinfo_to_sql_symlink.test110
-rw-r--r--mysql-test/main/mysql_upgrade-20228.result69
-rw-r--r--mysql-test/main/mysql_upgrade-20228.test55
-rw-r--r--mysql-test/main/mysql_upgrade-6984.result8
-rw-r--r--mysql-test/main/mysql_upgrade-6984.test4
-rw-r--r--mysql-test/main/mysql_upgrade.result347
-rw-r--r--mysql-test/main/mysql_upgrade.test162
-rw-r--r--mysql-test/main/mysql_upgrade_no_innodb.result3
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.result18
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.test16
-rw-r--r--mysql-test/main/mysql_upgrade_ssl.result4
-rw-r--r--mysql-test/main/mysql_upgrade_view.result12
-rw-r--r--mysql-test/main/mysqlcheck-master.opt1
-rw-r--r--mysql-test/main/mysqlcheck.result25
-rw-r--r--mysql-test/main/mysqlcheck.test5
-rw-r--r--mysql-test/main/mysqld--help,win.rdiff39
-rw-r--r--mysql-test/main/mysqld--help.result84
-rw-r--r--mysql-test/main/mysqld--help.test4
-rw-r--r--mysql-test/main/mysqldump-compat-102.result2
-rw-r--r--mysql-test/main/mysqldump-compat-102.test2
-rw-r--r--mysql-test/main/mysqldump-system,win.rdiff107
-rw-r--r--mysql-test/main/mysqldump-system.result84
-rw-r--r--mysql-test/main/mysqldump-system.test44
-rw-r--r--mysql-test/main/mysqldump.result9
-rw-r--r--mysql-test/main/mysqldump.test7
-rw-r--r--mysql-test/main/mysqltest_tracking_info.result2
-rw-r--r--mysql-test/main/negation_elimination.result38
-rw-r--r--mysql-test/main/no_password_column-mdev-11170.result169
-rw-r--r--mysql-test/main/no_password_column-mdev-11170.test95
-rw-r--r--mysql-test/main/not_embedded_server.result4
-rw-r--r--mysql-test/main/not_embedded_server.test2
-rw-r--r--mysql-test/main/null.result18
-rw-r--r--mysql-test/main/null_key.result17
-rw-r--r--mysql-test/main/null_key.test4
-rw-r--r--mysql-test/main/olap.result10
-rw-r--r--mysql-test/main/old-mode.result41
-rw-r--r--mysql-test/main/old-mode.test29
-rw-r--r--mysql-test/main/openssl_6975.test24
-rw-r--r--mysql-test/main/opt_trace.result8647
-rw-r--r--mysql-test/main/opt_trace.test658
-rw-r--r--mysql-test/main/opt_trace_default.result8
-rw-r--r--mysql-test/main/opt_trace_default.test11
-rw-r--r--mysql-test/main/opt_trace_index_merge.result754
-rw-r--r--mysql-test/main/opt_trace_index_merge.test133
-rw-r--r--mysql-test/main/opt_trace_index_merge_innodb.result274
-rw-r--r--mysql-test/main/opt_trace_index_merge_innodb.test54
-rw-r--r--mysql-test/main/opt_trace_security.result410
-rw-r--r--mysql-test/main/opt_trace_security.test197
-rw-r--r--mysql-test/main/opt_trace_ucs2.result54
-rw-r--r--mysql-test/main/opt_trace_ucs2.test10
-rw-r--r--mysql-test/main/order_by.result200
-rw-r--r--mysql-test/main/order_by.test43
-rw-r--r--mysql-test/main/outfile_loaddata.result5
-rw-r--r--mysql-test/main/parser.result272
-rw-r--r--mysql-test/main/parser.test276
-rw-r--r--mysql-test/main/partition.result28
-rw-r--r--mysql-test/main/partition_binlog.result1
-rw-r--r--mysql-test/main/partition_explicit_prune.result18
-rw-r--r--mysql-test/main/partition_explicit_prune.test9
-rw-r--r--mysql-test/main/partition_innodb.result45
-rw-r--r--mysql-test/main/partition_innodb.test34
-rw-r--r--mysql-test/main/partition_mrr_aria.result28
-rw-r--r--mysql-test/main/partition_mrr_innodb.result28
-rw-r--r--mysql-test/main/partition_mrr_myisam.result39
-rw-r--r--mysql-test/main/partition_pruning.result136
-rw-r--r--mysql-test/main/partition_pruning.test2
-rw-r--r--mysql-test/main/partition_range.result12
-rw-r--r--mysql-test/main/partition_range.test2
-rw-r--r--mysql-test/main/password_expiration.result266
-rw-r--r--mysql-test/main/password_expiration.test263
-rw-r--r--mysql-test/main/password_expiration_unix_socket.result8
-rw-r--r--mysql-test/main/password_expiration_unix_socket.test24
-rw-r--r--mysql-test/main/perror-win.result10
-rw-r--r--mysql-test/main/perror.result8
-rw-r--r--mysql-test/main/plugin.result69
-rw-r--r--mysql-test/main/plugin.test19
-rw-r--r--mysql-test/main/plugin_auth.result32
-rw-r--r--mysql-test/main/plugin_auth.test36
-rw-r--r--mysql-test/main/plugin_auth_qa.result158
-rw-r--r--mysql-test/main/plugin_auth_qa_1.result100
-rw-r--r--mysql-test/main/plugin_auth_qa_1.test18
-rw-r--r--mysql-test/main/plugin_auth_qa_2.result49
-rw-r--r--mysql-test/main/plugin_innodb.result3
-rw-r--r--mysql-test/main/plugin_innodb.test2
-rw-r--r--mysql-test/main/plugin_not_embedded.result1
-rw-r--r--mysql-test/main/processlist_notembedded.result2
-rw-r--r--mysql-test/main/profiling.test2
-rw-r--r--mysql-test/main/ps.result149
-rw-r--r--mysql-test/main/ps.test96
-rw-r--r--mysql-test/main/ps_1general.result14
-rw-r--r--mysql-test/main/ps_2myisam.result2
-rw-r--r--mysql-test/main/ps_3innodb.result2
-rw-r--r--mysql-test/main/ps_4heap.result2
-rw-r--r--mysql-test/main/ps_5merge.result4
-rw-r--r--mysql-test/main/ps_ddl.result14
-rw-r--r--mysql-test/main/ps_ddl.test2
-rw-r--r--mysql-test/main/ps_ddl1.result2
-rw-r--r--mysql-test/main/ps_error.result1
-rw-r--r--mysql-test/main/ps_grant.result18
-rw-r--r--mysql-test/main/ps_grant.test7
-rw-r--r--mysql-test/main/ps_innodb.result6
-rw-r--r--mysql-test/main/query_cache.result44
-rw-r--r--mysql-test/main/query_cache.test27
-rw-r--r--mysql-test/main/range.result414
-rw-r--r--mysql-test/main/range.test145
-rw-r--r--mysql-test/main/range_innodb.result21
-rw-r--r--mysql-test/main/range_innodb.test21
-rw-r--r--mysql-test/main/range_mrr_icp.result433
-rw-r--r--mysql-test/main/range_mrr_icp.test1
-rw-r--r--mysql-test/main/range_notembedded.result31
-rw-r--r--mysql-test/main/range_notembedded.test33
-rw-r--r--mysql-test/main/range_vs_index_merge.result206
-rw-r--r--mysql-test/main/range_vs_index_merge.test62
-rw-r--r--mysql-test/main/range_vs_index_merge_innodb.result214
-rw-r--r--mysql-test/main/range_vs_index_merge_innodb.test9
-rw-r--r--mysql-test/main/repair.result2
-rw-r--r--mysql-test/main/row.result34
-rw-r--r--mysql-test/main/rowid_filter.result2171
-rw-r--r--mysql-test/main/rowid_filter.test409
-rw-r--r--mysql-test/main/rowid_filter_innodb.result2963
-rw-r--r--mysql-test/main/rowid_filter_innodb.test566
-rw-r--r--mysql-test/main/rowid_filter_innodb_debug.result83
-rw-r--r--mysql-test/main/rowid_filter_innodb_debug.test51
-rw-r--r--mysql-test/main/rowid_filter_myisam.result21
-rw-r--r--mysql-test/main/rowid_filter_myisam.test1625
-rw-r--r--mysql-test/main/rowid_filter_myisam_debug.result54
-rw-r--r--mysql-test/main/rowid_filter_myisam_debug.test3
-rw-r--r--mysql-test/main/secure_file_priv_win.result10
-rw-r--r--mysql-test/main/select.result143
-rw-r--r--mysql-test/main/select.test8
-rw-r--r--mysql-test/main/select_jcl6.result143
-rw-r--r--mysql-test/main/select_pkeycache.result143
-rw-r--r--mysql-test/main/select_safe.result9
-rw-r--r--mysql-test/main/selectivity.result29
-rw-r--r--mysql-test/main/selectivity.test7
-rw-r--r--mysql-test/main/selectivity_innodb.result19
-rw-r--r--mysql-test/main/selectivity_no_engine.result9
-rw-r--r--mysql-test/main/selectivity_no_engine.test1
-rw-r--r--mysql-test/main/set_password.result44
-rw-r--r--mysql-test/main/set_password.test26
-rw-r--r--mysql-test/main/set_statement.result18
-rw-r--r--mysql-test/main/set_statement.test19
-rw-r--r--mysql-test/main/shm-master.opt1
-rw-r--r--mysql-test/main/shm.result2173
-rw-r--r--mysql-test/main/shm.test47
-rw-r--r--mysql-test/main/show_check.result10
-rw-r--r--mysql-test/main/show_check.test2
-rw-r--r--mysql-test/main/show_create_user.result4
-rw-r--r--mysql-test/main/show_create_user.test2
-rw-r--r--mysql-test/main/show_explain.result4
-rw-r--r--mysql-test/main/show_explain.test3
-rw-r--r--mysql-test/main/show_grants_with_plugin-7985.result197
-rw-r--r--mysql-test/main/show_grants_with_plugin-7985.test160
-rw-r--r--mysql-test/main/shutdown_not_windows.combinations5
-rw-r--r--mysql-test/main/shutdown_not_windows.result8
-rw-r--r--mysql-test/main/shutdown_not_windows.test14
-rw-r--r--mysql-test/main/signal.result12
-rw-r--r--mysql-test/main/signal.test13
-rw-r--r--mysql-test/main/signal_demo1.result7
-rw-r--r--mysql-test/main/skip_grants.result30
-rw-r--r--mysql-test/main/skip_grants.test29
-rw-r--r--mysql-test/main/sp-anchor-row-type-cursor.result6
-rw-r--r--mysql-test/main/sp-anchor-row-type-table.result6
-rw-r--r--mysql-test/main/sp-anchor-type.result2
-rw-r--r--mysql-test/main/sp-big.result2
-rw-r--r--mysql-test/main/sp-bugs.result24
-rw-r--r--mysql-test/main/sp-bugs.test36
-rw-r--r--mysql-test/main/sp-destruct.result42
-rw-r--r--mysql-test/main/sp-destruct.test34
-rw-r--r--mysql-test/main/sp-error.result22
-rw-r--r--mysql-test/main/sp-error.test19
-rw-r--r--mysql-test/main/sp-row.result6
-rw-r--r--mysql-test/main/sp-security.result36
-rw-r--r--mysql-test/main/sp-security.test24
-rw-r--r--mysql-test/main/sp.result116
-rw-r--r--mysql-test/main/sp.test69
-rw-r--r--mysql-test/main/sp2.result4
-rw-r--r--mysql-test/main/sp_notembedded.result8
-rw-r--r--mysql-test/main/sp_notembedded.test10
-rw-r--r--mysql-test/main/sp_trans.result2
-rw-r--r--mysql-test/main/sp_trans_log.result2
-rw-r--r--mysql-test/main/sql_mode.result8
-rw-r--r--mysql-test/main/sql_mode.test4
-rw-r--r--mysql-test/main/ssl_cipher.opt1
-rw-r--r--mysql-test/main/ssl_cipher.result1
-rw-r--r--mysql-test/main/ssl_cipher.test2
-rw-r--r--mysql-test/main/stat_tables.result107
-rw-r--r--mysql-test/main/stat_tables.test63
-rw-r--r--mysql-test/main/stat_tables_disabled.result13
-rw-r--r--mysql-test/main/stat_tables_disabled.test11
-rw-r--r--mysql-test/main/stat_tables_innodb.result117
-rw-r--r--mysql-test/main/stat_tables_innodb.test9
-rw-r--r--mysql-test/main/stat_tables_missing.result11
-rw-r--r--mysql-test/main/stat_tables_missing.test10
-rw-r--r--mysql-test/main/stat_tables_rbr.result4
-rw-r--r--mysql-test/main/stat_tables_rbr.test5
-rw-r--r--mysql-test/main/statement-expr.result16
-rw-r--r--mysql-test/main/statement-expr.test16
-rw-r--r--mysql-test/main/statistics.result121
-rw-r--r--mysql-test/main/statistics.test105
-rw-r--r--mysql-test/main/status.result8
-rw-r--r--mysql-test/main/str_to_datetime_457.result7
-rw-r--r--mysql-test/main/subselect.result113
-rw-r--r--mysql-test/main/subselect.test59
-rw-r--r--mysql-test/main/subselect2.result14
-rw-r--r--mysql-test/main/subselect4.result51
-rw-r--r--mysql-test/main/subselect4.test42
-rw-r--r--mysql-test/main/subselect_exists2in.result3
-rw-r--r--mysql-test/main/subselect_exists2in_costmat.result4
-rw-r--r--mysql-test/main/subselect_extra.result4
-rw-r--r--mysql-test/main/subselect_extra_no_semijoin.result4
-rw-r--r--mysql-test/main/subselect_innodb.result69
-rw-r--r--mysql-test/main/subselect_innodb.test65
-rw-r--r--mysql-test/main/subselect_mat.result87
-rw-r--r--mysql-test/main/subselect_mat_cost.result38
-rw-r--r--mysql-test/main/subselect_mat_cost.test4
-rw-r--r--mysql-test/main/subselect_mat_cost_bugs.result11
-rw-r--r--mysql-test/main/subselect_mat_cost_bugs.test8
-rw-r--r--mysql-test/main/subselect_no_exists_to_in.result111
-rw-r--r--mysql-test/main/subselect_no_mat.result109
-rw-r--r--mysql-test/main/subselect_no_opts.result103
-rw-r--r--mysql-test/main/subselect_no_scache.result113
-rw-r--r--mysql-test/main/subselect_no_semijoin.result101
-rw-r--r--mysql-test/main/subselect_notembedded.result2
-rw-r--r--mysql-test/main/subselect_notembedded.test2
-rw-r--r--mysql-test/main/subselect_sj.result37
-rw-r--r--mysql-test/main/subselect_sj.test8
-rw-r--r--mysql-test/main/subselect_sj2.result82
-rw-r--r--mysql-test/main/subselect_sj2.test28
-rw-r--r--mysql-test/main/subselect_sj2_jcl6.result90
-rw-r--r--mysql-test/main/subselect_sj2_jcl6.test11
-rw-r--r--mysql-test/main/subselect_sj2_mat.result143
-rw-r--r--mysql-test/main/subselect_sj2_mat.test21
-rw-r--r--mysql-test/main/subselect_sj_jcl6.result41
-rw-r--r--mysql-test/main/subselect_sj_mat.result157
-rw-r--r--mysql-test/main/subselect_sj_mat.test18
-rw-r--r--mysql-test/main/system_mysql_db.result114
-rw-r--r--mysql-test/main/system_mysql_db_507.result226
-rw-r--r--mysql-test/main/system_mysql_db_507.test132
-rw-r--r--mysql-test/main/system_mysql_db_fix40123.result152
-rw-r--r--mysql-test/main/system_mysql_db_fix40123.test55
-rw-r--r--mysql-test/main/system_mysql_db_fix50030.result156
-rw-r--r--mysql-test/main/system_mysql_db_fix50030.test62
-rw-r--r--mysql-test/main/system_mysql_db_fix50117.result136
-rw-r--r--mysql-test/main/system_mysql_db_fix50117.test83
-rw-r--r--mysql-test/main/system_mysql_db_refs.result16
-rw-r--r--mysql-test/main/system_mysql_db_refs.test11
-rw-r--r--mysql-test/main/table_elim.result6
-rw-r--r--mysql-test/main/table_value_constr.result40
-rw-r--r--mysql-test/main/table_value_constr.test19
-rw-r--r--mysql-test/main/tc_heuristic_recover.result1
-rw-r--r--mysql-test/main/temp_table_frm.result6
-rw-r--r--mysql-test/main/temp_table_frm.test9
-rw-r--r--mysql-test/main/temporal_literal.result12
-rw-r--r--mysql-test/main/timezone2.result311
-rw-r--r--mysql-test/main/timezone2.test274
-rw-r--r--mysql-test/main/tls_version.opt1
-rw-r--r--mysql-test/main/tls_version.result14
-rw-r--r--mysql-test/main/tls_version.test24
-rw-r--r--mysql-test/main/tls_version1.opt1
-rw-r--r--mysql-test/main/tls_version1.result6
-rw-r--r--mysql-test/main/tls_version1.test12
-rw-r--r--mysql-test/main/tmp_table_count-7586.result2
-rw-r--r--mysql-test/main/trigger-compat.result295
-rw-r--r--mysql-test/main/trigger-compat.test216
-rw-r--r--mysql-test/main/trigger.result8
-rw-r--r--mysql-test/main/trigger_notembedded.test2
-rw-r--r--mysql-test/main/truncate_coverage.result2
-rw-r--r--mysql-test/main/truncate_coverage.test4
-rw-r--r--mysql-test/main/type_bit.result1011
-rw-r--r--mysql-test/main/type_bit.test48
-rw-r--r--mysql-test/main/type_blob.result68
-rw-r--r--mysql-test/main/type_blob.test62
-rw-r--r--mysql-test/main/type_date.result178
-rw-r--r--mysql-test/main/type_date.test104
-rw-r--r--mysql-test/main/type_date_round.result174
-rw-r--r--mysql-test/main/type_date_round.test113
-rw-r--r--mysql-test/main/type_datetime.result185
-rw-r--r--mysql-test/main/type_datetime.test81
-rw-r--r--mysql-test/main/type_datetime_hires.result719
-rw-r--r--mysql-test/main/type_datetime_hires.test178
-rw-r--r--mysql-test/main/type_datetime_round.result205
-rw-r--r--mysql-test/main/type_datetime_round.test147
-rw-r--r--mysql-test/main/type_decimal.result111
-rw-r--r--mysql-test/main/type_decimal.test64
-rw-r--r--mysql-test/main/type_enum.result21
-rw-r--r--mysql-test/main/type_enum.test13
-rw-r--r--mysql-test/main/type_float.result202
-rw-r--r--mysql-test/main/type_float.test40
-rw-r--r--mysql-test/main/type_hex_hybrid.result236
-rw-r--r--mysql-test/main/type_hex_hybrid.test87
-rw-r--r--mysql-test/main/type_int.result1205
-rw-r--r--mysql-test/main/type_int.test215
-rw-r--r--mysql-test/main/type_interval.result83
-rw-r--r--mysql-test/main/type_interval.test54
-rw-r--r--mysql-test/main/type_json.result67
-rw-r--r--mysql-test/main/type_json.test35
-rw-r--r--mysql-test/main/type_newdecimal.result320
-rw-r--r--mysql-test/main/type_newdecimal.test67
-rw-r--r--mysql-test/main/type_num.result30
-rw-r--r--mysql-test/main/type_set.result21
-rw-r--r--mysql-test/main/type_set.test13
-rw-r--r--mysql-test/main/type_temporal_innodb.result49
-rw-r--r--mysql-test/main/type_temporal_innodb.test13
-rw-r--r--mysql-test/main/type_temporal_mysql56_debug.result416
-rw-r--r--mysql-test/main/type_temporal_mysql56_debug.test107
-rw-r--r--mysql-test/main/type_time.result409
-rw-r--r--mysql-test/main/type_time.test220
-rw-r--r--mysql-test/main/type_time_hires.result559
-rw-r--r--mysql-test/main/type_time_hires.test186
-rw-r--r--mysql-test/main/type_time_round.result260
-rw-r--r--mysql-test/main/type_time_round.test184
-rw-r--r--mysql-test/main/type_timestamp.result310
-rw-r--r--mysql-test/main/type_timestamp.test272
-rw-r--r--mysql-test/main/type_timestamp_hires.result311
-rw-r--r--mysql-test/main/type_timestamp_hires.test80
-rw-r--r--mysql-test/main/type_timestamp_round.result191
-rw-r--r--mysql-test/main/type_timestamp_round.test160
-rw-r--r--mysql-test/main/type_varchar.result60
-rw-r--r--mysql-test/main/type_varchar.test26
-rw-r--r--mysql-test/main/type_varchar_mysql41.result113
-rw-r--r--mysql-test/main/type_varchar_mysql41.test59
-rw-r--r--mysql-test/main/type_year.result112
-rw-r--r--mysql-test/main/type_year.test72
-rw-r--r--mysql-test/main/udf.result107
-rw-r--r--mysql-test/main/udf.test68
-rw-r--r--mysql-test/main/udf_notembedded.result1
-rw-r--r--mysql-test/main/union.result39
-rw-r--r--mysql-test/main/union.test18
-rw-r--r--mysql-test/main/unique.result9
-rw-r--r--mysql-test/main/unique.test22
-rw-r--r--mysql-test/main/update.result8
-rw-r--r--mysql-test/main/update_innodb.result54
-rw-r--r--mysql-test/main/update_innodb.test57
-rw-r--r--mysql-test/main/update_use_source.result1
-rw-r--r--mysql-test/main/upgrade_MDEV-19650.result208
-rw-r--r--mysql-test/main/upgrade_MDEV-19650.test159
-rw-r--r--mysql-test/main/upgrade_MDEV-23102-1.result286
-rw-r--r--mysql-test/main/upgrade_MDEV-23102-1.test162
-rw-r--r--mysql-test/main/upgrade_MDEV-23102-2.result262
-rw-r--r--mysql-test/main/upgrade_MDEV-23102-2.test140
-rw-r--r--mysql-test/main/upgrade_geometrycolumn_procedure_definer.result123
-rw-r--r--mysql-test/main/upgrade_geometrycolumn_procedure_definer.test66
-rw-r--r--mysql-test/main/upgrade_mdev_24363.result129
-rw-r--r--mysql-test/main/upgrade_mdev_24363.test71
-rw-r--r--mysql-test/main/user_var.result4
-rw-r--r--mysql-test/main/userstat.result6
-rw-r--r--mysql-test/main/varbinary.result4
-rw-r--r--mysql-test/main/view.result43
-rw-r--r--mysql-test/main/view.test42
-rw-r--r--mysql-test/main/view_grant.result14
-rw-r--r--mysql-test/main/view_grant.test16
-rw-r--r--mysql-test/main/win.result11
-rw-r--r--mysql-test/main/win.test9
-rw-r--r--mysql-test/main/win_big-mdev-11697.result2
-rw-r--r--mysql-test/main/win_sum.result12
-rw-r--r--mysql-test/main/win_sum.test13
-rw-r--r--mysql-test/main/wolfssl.opt1
-rw-r--r--mysql-test/main/wolfssl.result3
-rw-r--r--mysql-test/main/wolfssl.test6
-rw-r--r--mysql-test/main/xtradb_mrr.result4
-rwxr-xr-xmysql-test/mysql-test-run.pl327
-rw-r--r--mysql-test/std_data/binlog-header.binlogbin0 -> 256 bytes
-rw-r--r--mysql-test/std_data/client-certkey.pem108
-rw-r--r--mysql-test/std_data/galera_certs/INFORMATION2
-rw-r--r--mysql-test/std_data/galera_certs/galera.1.crt25
-rw-r--r--mysql-test/std_data/galera_certs/galera.1.csr16
-rw-r--r--mysql-test/std_data/galera_certs/galera.1.key27
-rw-r--r--mysql-test/std_data/galera_certs/galera.2.crt25
-rw-r--r--mysql-test/std_data/galera_certs/galera.2.csr16
-rw-r--r--mysql-test/std_data/galera_certs/galera.2.key27
-rw-r--r--mysql-test/std_data/galera_certs/galera.root.crt32
-rw-r--r--mysql-test/std_data/galera_certs/galera.root.key54
-rw-r--r--mysql-test/std_data/galera_certs/galera.root.srl1
-rw-r--r--mysql-test/std_data/mdev-28727-pet4.frmbin0 -> 934 bytes
-rw-r--r--mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001bin0 -> 514 bytes
-rw-r--r--mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001bin0 -> 892 bytes
-rwxr-xr-xmysql-test/std_data/wsrep_notify.sh18
-rw-r--r--mysql-test/suite.pm42
-rw-r--r--mysql-test/suite/archive/disabled.def11
-rw-r--r--mysql-test/suite/archive/flush.result18
-rw-r--r--mysql-test/suite/archive/flush.test25
-rw-r--r--mysql-test/suite/archive/rnd_pos.result56
-rw-r--r--mysql-test/suite/archive/rnd_pos.test31
-rw-r--r--mysql-test/suite/binlog/include/binlog.test8
-rw-r--r--mysql-test/suite/binlog/include/binlog_write_error.inc110
-rw-r--r--mysql-test/suite/binlog/r/backup.result21
-rw-r--r--mysql-test/suite/binlog/r/binlog_checkpoint_flush_logs.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_index.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_frag.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_suppress_O_TMPFILE.result21
-rw-r--r--mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_recover_checksum_error.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_rotate_perf.result945
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_binlog.result18
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result16
-rw-r--r--mysql-test/suite/binlog/r/binlog_write_error.result25
-rw-r--r--mysql-test/suite/binlog/r/read_only.result1
-rw-r--r--mysql-test/suite/binlog/r/read_only_statement.result1
-rw-r--r--mysql-test/suite/binlog/r/show_concurrent_rotate.result17
-rw-r--r--mysql-test/suite/binlog/t/backup.test19
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog_suppress_O_TMPFILE.test51
-rw-r--r--mysql-test/suite/binlog/t/binlog_rotate_perf.test102
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_binlog.test4
-rw-r--r--mysql-test/suite/binlog/t/binlog_write_error.test85
-rw-r--r--mysql-test/suite/binlog/t/show_concurrent_rotate.test29
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_index.result2
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_write_error.result25
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_write_error.test2
-rw-r--r--mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.test2
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel.result1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result2
-rw-r--r--mysql-test/suite/compat/mssql/parser.result87
-rw-r--r--mysql-test/suite/compat/mssql/parser.test68
-rw-r--r--mysql-test/suite/compat/oracle/r/column_compression.result2
-rw-r--r--mysql-test/suite/compat/oracle/r/custom_aggregate_functions.result136
-rw-r--r--mysql-test/suite/compat/oracle/r/parser.result115
-rw-r--r--mysql-test/suite/compat/oracle/r/plugin.result48
-rw-r--r--mysql-test/suite/compat/oracle/r/ps.result10
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result2
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package-innodb.result2
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package-mdl.result4
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package.result51
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-row.result18
-rw-r--r--mysql-test/suite/compat/oracle/r/sp.result32
-rw-r--r--mysql-test/suite/compat/oracle/r/statement-expr.result16
-rw-r--r--mysql-test/suite/compat/oracle/r/table_value_constr.result20
-rw-r--r--mysql-test/suite/compat/oracle/r/update_innodb.result26
-rw-r--r--mysql-test/suite/compat/oracle/r/versioning.result8
-rw-r--r--mysql-test/suite/compat/oracle/t/custom_aggregate_functions.test170
-rw-r--r--mysql-test/suite/compat/oracle/t/parser.test132
-rw-r--r--mysql-test/suite/compat/oracle/t/plugin.test3
-rw-r--r--mysql-test/suite/compat/oracle/t/ps.test8
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test2
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-package.test7
-rw-r--r--mysql-test/suite/compat/oracle/t/sp.test39
-rw-r--r--mysql-test/suite/compat/oracle/t/statement-expr.test16
-rw-r--r--mysql-test/suite/compat/oracle/t/update_innodb.test28
-rw-r--r--mysql-test/suite/compat/oracle/t/versioning.test10
-rw-r--r--mysql-test/suite/csv/flush.result25
-rw-r--r--mysql-test/suite/csv/flush.test30
-rw-r--r--mysql-test/suite/encryption/r/create_or_replace_big.result1
-rw-r--r--mysql-test/suite/encryption/r/debug_key_management.result10
-rw-r--r--mysql-test/suite/encryption/r/encryption_key_corruption.result2
-rw-r--r--mysql-test/suite/encryption/r/innochecksum.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result7
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change2.result7
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change3.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change4.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb-checksum-algorithm.result18
-rw-r--r--mysql-test/suite/encryption/r/innodb-compressed-blob.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-disable.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb-first-page-read.result98
-rw-r--r--mysql-test/suite/encryption/r/innodb-force-corrupt.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb-key-rotation-disable.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-missing-key.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_compression.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-read-only.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-badkey.result9
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-nokeys.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-remove-encryption.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-spatial-index,full_crc32.rdiff36
-rw-r--r--mysql-test/suite/encryption/r/innodb-spatial-index,strict_full_crc32.rdiff36
-rw-r--r--mysql-test/suite/encryption/r/innodb-spatial-index.result21
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_freed.result100
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_log.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result21
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption-page-compression.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_discard_import.result5
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_tables.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb_first_page.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result4
-rw-r--r--mysql-test/suite/encryption/r/instant_alter_import.result24
-rw-r--r--mysql-test/suite/encryption/r/key_version_rotation.result1
-rw-r--r--mysql-test/suite/encryption/r/tempfiles_encrypted.result24
-rw-r--r--mysql-test/suite/encryption/t/compressed_import_tablespace.test5
-rw-r--r--mysql-test/suite/encryption/t/corrupted_during_recovery.combinations5
-rw-r--r--mysql-test/suite/encryption/t/corrupted_during_recovery.test7
-rw-r--r--mysql-test/suite/encryption/t/debug_key_management.test18
-rw-r--r--mysql-test/suite/encryption/t/encryption_key_corruption.test2
-rw-r--r--mysql-test/suite/encryption/t/file_creation.test2
-rw-r--r--mysql-test/suite/encryption/t/innochecksum.test18
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change2.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change2.test14
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change3.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change3.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change4.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change4.test8
-rw-r--r--mysql-test/suite/encryption/t/innodb-discard-import-change.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb-discard-import.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-alter.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-disable.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb-first-page-read.test111
-rw-r--r--mysql-test/suite/encryption/t/innodb-force-corrupt.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-badkey.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-badkey.test10
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-nokeys.test3
-rw-r--r--mysql-test/suite/encryption/t/innodb-remove-encryption.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb-spatial-index.test41
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_freed.opt5
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_freed.test121
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.combinations5
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb_import.test3
-rw-r--r--mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test2
-rw-r--r--mysql-test/suite/encryption/t/instant_alter_import.test52
-rw-r--r--mysql-test/suite/encryption/t/tempfiles_encrypted.test16
-rw-r--r--mysql-test/suite/engines/README5
-rw-r--r--mysql-test/suite/engines/funcs/r/an_calendar.result4
-rw-r--r--mysql-test/suite/engines/funcs/r/an_number.result14
-rw-r--r--mysql-test/suite/engines/funcs/r/an_string.result10
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_do_grant.result23
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_drop_db.result2
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_ignore_revoke.result10
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_misc_functions.result2
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result2
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_partition_analyze.result1
-rw-r--r--mysql-test/suite/engines/funcs/t/ai_init_alter_table.test120
-rw-r--r--mysql-test/suite/engines/funcs/t/ai_init_create_table.test120
-rw-r--r--mysql-test/suite/engines/funcs/t/ai_init_insert.test20
-rw-r--r--mysql-test/suite/engines/funcs/t/ai_init_insert_id.test120
-rw-r--r--mysql-test/suite/engines/funcs/t/ai_overflow_error.test120
-rw-r--r--mysql-test/suite/engines/funcs/t/ai_reset_by_truncate.test240
-rw-r--r--mysql-test/suite/engines/funcs/t/comment_column.test22
-rw-r--r--mysql-test/suite/engines/funcs/t/comment_index.test20
-rw-r--r--mysql-test/suite/engines/funcs/t/comment_table.test6
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_index_decimals.test40
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_index_lob.test32
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_index_non_string.test64
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_index_string.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_index_string_length.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_unique_decimals.test40
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_unique_lob.test32
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_unique_non_string.test64
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_unique_string.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_unique_string_length.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/ix_using_order.test22
-rw-r--r--mysql-test/suite/engines/funcs/t/jp_comment_column.test22
-rw-r--r--mysql-test/suite/engines/funcs/t/jp_comment_index.test20
-rw-r--r--mysql-test/suite/engines/funcs/t/jp_comment_older_compatibility1.test10
-rw-r--r--mysql-test/suite/engines/funcs/t/jp_comment_table.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/ld_unique_error3.test2
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_2part_column_to_pk.test64
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_2part_diff_string_to_pk.test64
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_2part_diff_to_pk.test1024
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_2part_string_to_pk.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_3part_column_to_pk.test64
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_3part_string_to_pk.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_column.test4608
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_column2.test768
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_column_first.test4416
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_column_first2.test768
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_column_middle.test4608
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_column_middle2.test768
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_string.test128
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_string2.test768
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_string_first.test128
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_string_first2.test768
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_string_middle.test128
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_string_middle2.test512
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_string_unique_index.test288
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_add_unique_index.test1152
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_from_unsigned.test176
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_from_zerofill.test352
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_to_index.test768
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_to_not_null.test192
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_to_null.test192
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_to_pk.test64
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_to_unsigned.test176
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_column_to_zerofill.test352
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_drop_column.test128
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_drop_index.test384
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_drop_pk_autoincrement.test48
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_drop_pk_number.test64
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_drop_pk_string.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_drop_string_index.test96
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_orderby.test12
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_rename.test128
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_set_drop_default.test132
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_string_drop_column.test32
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_string_to_index.test192
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_string_to_not_null.test32
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_string_to_null.test32
-rw-r--r--mysql-test/suite/engines/funcs/t/ta_string_to_pk.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_autoincrement.test12
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_comment.test56
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_comment_string.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_default_decimal.test32
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_default_number.test24
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_default_string.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_enum.test4
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_enum_long.test4
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_key.test40
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_key_length.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_length.test44
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_length_decimals.test32
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_length_zero.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_not_null.test56
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_null.test56
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_primary_key_number.test40
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_primary_key_string.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_serial.test2
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_set.test4
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_set_long.test4
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_unique_key.test40
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_unique_key_string.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_unsigned.test56
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_column_zerofill.test112
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_multicolumn_different.test3840
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_multicolumn_same.test40
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_multicolumn_same_string.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_partition_remove.test48
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_rename.test4
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_rename_across_database.test10
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_rename_error.test6
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_structure_comment.test50
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_structure_create_like.test50
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_structure_create_like_string.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_structure_create_select.test50
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_structure_create_select_string.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_structure_string_comment.test8
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_temporary_column.test112
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_temporary_column_length.test44
-rw-r--r--mysql-test/suite/federated/error_on_close-8313.result1
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.result429
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.test271
-rw-r--r--mysql-test/suite/federated/federatedx_versioning.result12
-rw-r--r--mysql-test/suite/federated/federatedx_versioning.test13
-rw-r--r--mysql-test/suite/federated/net_thd_crash-12725.result1
-rw-r--r--mysql-test/suite/federated/net_thd_crash-12951.result1
-rw-r--r--mysql-test/suite/federated/optimizer.result52
-rw-r--r--mysql-test/suite/federated/optimizer.test39
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_func_view.result126
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result1
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is_embedded.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql.result237
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result237
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_routines_embedded.result18
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result10
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result12
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_privileges.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_is.result50
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_is_embedded.result50
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql.result78
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result156
-rw-r--r--mysql-test/suite/funcs_1/r/is_user_privileges.result1872
-rw-r--r--mysql-test/suite/funcs_1/r/is_views.result1
-rw-r--r--mysql-test/suite/funcs_1/r/is_views_embedded.result1
-rw-r--r--mysql-test/suite/funcs_1/r/memory_func_view.result126
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_func_view.result126
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0407.result2
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result3
-rw-r--r--mysql-test/suite/funcs_1/t/is_user_privileges.test22
-rw-r--r--mysql-test/suite/funcs_1/t/row_count_func.test2
-rw-r--r--mysql-test/suite/funcs_1/t/storedproc.test1
-rw-r--r--mysql-test/suite/galera/disabled.def20
-rw-r--r--mysql-test/suite/galera/galera_2nodes.cnf18
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_master.cnf36
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_slave.cnf62
-rw-r--r--mysql-test/suite/galera/galera_3nodes_as_slave.cnf75
-rw-r--r--mysql-test/suite/galera/galera_4nodes.cnf18
-rw-r--r--mysql-test/suite/galera/include/galera_concurrent_test.inc90
-rw-r--r--mysql-test/suite/galera/include/galera_dump_sr_table.inc28
-rw-r--r--mysql-test/suite/galera/include/galera_have_debug_sync.inc9
-rw-r--r--mysql-test/suite/galera/include/galera_sst_restore.inc2
-rw-r--r--mysql-test/suite/galera/include/galera_st_clean_slave.inc106
-rw-r--r--mysql-test/suite/galera/include/galera_st_disconnect_slave.inc113
-rw-r--r--mysql-test/suite/galera/include/galera_st_kill_slave.inc106
-rw-r--r--mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc114
-rw-r--r--mysql-test/suite/galera/include/galera_st_shutdown_slave.inc105
-rw-r--r--mysql-test/suite/galera/include/galera_start_replication.inc67
-rw-r--r--mysql-test/suite/galera/include/galera_stop_replication.inc8
-rw-r--r--mysql-test/suite/galera/r/GAL-382.result2
-rw-r--r--mysql-test/suite/galera/r/GAL-401.result2
-rw-r--r--mysql-test/suite/galera/r/GAL-419.result2
-rw-r--r--mysql-test/suite/galera/r/GAL-480.result2
-rw-r--r--mysql-test/suite/galera/r/GCF-939.result13
-rw-r--r--mysql-test/suite/galera/r/MDEV-15443.result2
-rw-r--r--mysql-test/suite/galera/r/MDEV-16509.result76
-rw-r--r--mysql-test/suite/galera/r/MDEV-18832.result17
-rw-r--r--mysql-test/suite/galera/r/MDEV-20225.result5
-rw-r--r--mysql-test/suite/galera/r/MDEV-20616.result114
-rw-r--r--mysql-test/suite/galera/r/MDEV-20793.result44
-rw-r--r--mysql-test/suite/galera/r/MDEV-22021.result2
-rw-r--r--mysql-test/suite/galera/r/MDEV-22051.result21
-rw-r--r--mysql-test/suite/galera/r/MDEV-22055.result18
-rw-r--r--mysql-test/suite/galera/r/MDEV-22227.result16
-rw-r--r--mysql-test/suite/galera/r/MDEV-22421.result7
-rw-r--r--mysql-test/suite/galera/r/MDEV-22458.result10
-rw-r--r--mysql-test/suite/galera/r/MDEV-22707.result26
-rw-r--r--mysql-test/suite/galera/r/MDEV-22708.result11
-rw-r--r--mysql-test/suite/galera/r/MDEV-24063.result10
-rw-r--r--mysql-test/suite/galera/r/MDEV-24143.result23
-rw-r--r--mysql-test/suite/galera/r/MDEV-24327.result6
-rw-r--r--mysql-test/suite/galera/r/MDEV-25494.result14
-rw-r--r--mysql-test/suite/galera/r/MDEV-25562.result6
-rw-r--r--mysql-test/suite/galera/r/MDEV-25740.result9
-rw-r--r--mysql-test/suite/galera/r/MDEV-26575.result11
-rw-r--r--mysql-test/suite/galera/r/MDEV-27276.result36
-rw-r--r--mysql-test/suite/galera/r/MDEV-27713.result46
-rw-r--r--mysql-test/suite/galera/r/MDEV-27862.result54
-rw-r--r--mysql-test/suite/galera/r/MDEV-28053.result14
-rw-r--r--mysql-test/suite/galera/r/MDEV-6860.result14
-rw-r--r--mysql-test/suite/galera/r/MENT-1047.result4
-rw-r--r--mysql-test/suite/galera/r/MW-252.result2
-rw-r--r--mysql-test/suite/galera/r/MW-258.result2
-rw-r--r--mysql-test/suite/galera/r/MW-259.result2
-rw-r--r--mysql-test/suite/galera/r/MW-284.result2
-rw-r--r--mysql-test/suite/galera/r/MW-285.result2
-rw-r--r--mysql-test/suite/galera/r/MW-286.result21
-rw-r--r--mysql-test/suite/galera/r/MW-292.result27
-rw-r--r--mysql-test/suite/galera/r/MW-309.result2
-rw-r--r--mysql-test/suite/galera/r/MW-313.result2
-rw-r--r--mysql-test/suite/galera/r/MW-328A.result42
-rw-r--r--mysql-test/suite/galera/r/MW-328B.result23
-rw-r--r--mysql-test/suite/galera/r/MW-328D.result20
-rw-r--r--mysql-test/suite/galera/r/MW-328E.result20
-rw-r--r--mysql-test/suite/galera/r/MW-329.result7
-rw-r--r--mysql-test/suite/galera/r/MW-336.result2
-rw-r--r--mysql-test/suite/galera/r/MW-357.result2
-rw-r--r--mysql-test/suite/galera/r/MW-369.result112
-rw-r--r--mysql-test/suite/galera/r/MW-388.result4
-rw-r--r--mysql-test/suite/galera/r/MW-402.result84
-rw-r--r--mysql-test/suite/galera/r/MW-416.result2
-rw-r--r--mysql-test/suite/galera/r/MW-44.result2
-rw-r--r--mysql-test/suite/galera/r/MW-86-wait1.result10
-rw-r--r--mysql-test/suite/galera/r/MW-86-wait8.result9
-rw-r--r--mysql-test/suite/galera/r/basic.result2
-rw-r--r--mysql-test/suite/galera/r/binlog_checksum.result2
-rw-r--r--mysql-test/suite/galera/r/create.result2
-rw-r--r--mysql-test/suite/galera/r/enforce_storage_engine.result2
-rw-r--r--mysql-test/suite/galera/r/enforce_storage_engine2.result2
-rw-r--r--mysql-test/suite/galera/r/ev51914.result2
-rw-r--r--mysql-test/suite/galera/r/fk.result2
-rw-r--r--mysql-test/suite/galera/r/galera#414.result2
-rw-r--r--mysql-test/suite/galera/r/galera#500.result2
-rw-r--r--mysql-test/suite/galera/r/galera#505.result3
-rw-r--r--mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result2
-rw-r--r--mysql-test/suite/galera/r/galera_UK_conflict.result97
-rw-r--r--mysql-test/suite/galera/r/galera_admin.result4
-rw-r--r--mysql-test/suite/galera/r/galera_alter_engine_innodb.result2
-rw-r--r--mysql-test/suite/galera/r/galera_alter_engine_myisam.result2
-rw-r--r--mysql-test/suite/galera/r/galera_alter_table_force.result2
-rw-r--r--mysql-test/suite/galera/r/galera_applier_ftwrl_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result2
-rw-r--r--mysql-test/suite/galera/r/galera_as_master.result4
-rw-r--r--mysql-test/suite/galera/r/galera_as_master_large.result2
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave.result12
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_autoinc.result22
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_ctas.result19
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid.result17
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid_auto_engine.result41
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result35
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_nonprim.result17
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_replay.result51
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_replication_bundle.result15
-rw-r--r--mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result2
-rw-r--r--mysql-test/suite/galera/r/galera_backup_stage.result78
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_at_after_statement.result27
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_for_update.result6
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_get_lock.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_group_commit.result685
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_lock_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_ps.result16
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_ps_bind.result38
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_ps_threadpool.result22
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_shutdown.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_sleep.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_background_statistics.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_kill.result23
-rw-r--r--mysql-test/suite/galera/r/galera_bf_lock_wait.result5
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_cache_size.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_checksum.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_row_image.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result10
-rw-r--r--mysql-test/suite/galera/r/galera_change_user.result14
-rw-r--r--mysql-test/suite/galera/r/galera_commit_empty.result15
-rw-r--r--mysql-test/suite/galera/r/galera_concurrent_ctas.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_function.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_procedure.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_table_as_select.result103
-rw-r--r--mysql-test/suite/galera/r/galera_create_table_like.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_trigger.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ctas.result88
-rw-r--r--mysql-test/suite/galera/r/galera_ddl_fk_conflict.result274
-rw-r--r--mysql-test/suite/galera/r/galera_ddl_fk_no_conflict.result330
-rw-r--r--mysql-test/suite/galera/r/galera_ddl_multiline.result2
-rw-r--r--mysql-test/suite/galera/r/galera_defaults.result17
-rw-r--r--mysql-test/suite/galera/r/galera_delete_limit.result2
-rw-r--r--mysql-test/suite/galera/r/galera_desync_overlapped.result2
-rw-r--r--mysql-test/suite/galera/r/galera_drop_database.result2
-rw-r--r--mysql-test/suite/galera/r/galera_drop_multi.result2
-rw-r--r--mysql-test/suite/galera/r/galera_encrypt_tmp_files.result2
-rw-r--r--mysql-test/suite/galera/r/galera_enum.result4
-rw-r--r--mysql-test/suite/galera/r/galera_events.result2
-rw-r--r--mysql-test/suite/galera/r/galera_events2.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_cascade_delete.result112
-rw-r--r--mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_cascade_update.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_conflict.result4
-rw-r--r--mysql-test/suite/galera/r/galera_fk_lock_wait.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_mismatch.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_multibyte.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_multicolumn.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_multitable.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_no_pk.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_selfreferential.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_setnull.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_truncate.result47
-rw-r--r--mysql-test/suite/galera/r/galera_flush_local.result6
-rw-r--r--mysql-test/suite/galera/r/galera_forced_binlog_format.result22
-rw-r--r--mysql-test/suite/galera/r/galera_ftwrl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ftwrl_drain.result4
-rw-r--r--mysql-test/suite/galera/r/galera_fulltext.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gcache_recover.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gcs_fc_limit.result3
-rw-r--r--mysql-test/suite/galera/r/galera_gcs_fragment.result4
-rw-r--r--mysql-test/suite/galera/r/galera_gcs_max_packet_size.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gra_log.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gtid.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_slave.result26
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result106
-rw-r--r--mysql-test/suite/galera/r/galera_inject_bf_long_wait.result2
-rw-r--r--mysql-test/suite/galera/r/galera_insert_ignore.result2
-rw-r--r--mysql-test/suite/galera/r/galera_insert_multi.result4
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff200
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28423.result558
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff200
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28583.result558
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup.result558
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result186
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mysqldump.result371
-rw-r--r--mysql-test/suite/galera/r/galera_ist_progress.result9
-rw-r--r--mysql-test/suite/galera/r/galera_ist_recv_bind.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ist_restart_joiner.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_ist_rsync.result558
-rw-r--r--mysql-test/suite/galera/r/galera_kill_applier.result12
-rw-r--r--mysql-test/suite/galera/r/galera_kill_ddl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_kill_largechanges.result22
-rw-r--r--mysql-test/suite/galera/r/galera_kill_nochanges.result2
-rw-r--r--mysql-test/suite/galera/r/galera_kill_smallchanges.result2
-rw-r--r--mysql-test/suite/galera/r/galera_last_committed_id.result38
-rw-r--r--mysql-test/suite/galera/r/galera_load_data.result6
-rw-r--r--mysql-test/suite/galera/r/galera_lock_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_lock_tables_in_transaction.result12
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin.result8
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin_ext.result8
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result8
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin_opt.result8
-rw-r--r--mysql-test/suite/galera/r/galera_log_output_csv.result2
-rw-r--r--mysql-test/suite/galera/r/galera_many_columns.result4
-rw-r--r--mysql-test/suite/galera/r/galera_many_indexes.result6
-rw-r--r--mysql-test/suite/galera/r/galera_many_rows.result4
-rw-r--r--mysql-test/suite/galera/r/galera_many_tables_nopk.result10
-rw-r--r--mysql-test/suite/galera/r/galera_many_tables_pk.result4
-rw-r--r--mysql-test/suite/galera/r/galera_mdev_10812.result2
-rw-r--r--mysql-test/suite/galera/r/galera_mdev_13787.result2
-rw-r--r--mysql-test/suite/galera/r/galera_mdev_15611.result2
-rw-r--r--mysql-test/suite/galera/r/galera_mdl_race.result4
-rw-r--r--mysql-test/suite/galera/r/galera_multi_database.result2
-rw-r--r--mysql-test/suite/galera/r/galera_multirow_rollback.result73
-rw-r--r--mysql-test/suite/galera/r/galera_myisam_autocommit.result2
-rw-r--r--mysql-test/suite/galera/r/galera_myisam_transactions.result2
-rw-r--r--mysql-test/suite/galera/r/galera_nonPK_and_PA.result63
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_bit.result4
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_blob.result4
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_large_varchar.result4
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_unicode.result4
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result8
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result14
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result2
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_simple.result22
-rw-r--r--mysql-test/suite/galera/r/galera_partition.result16
-rw-r--r--mysql-test/suite/galera/r/galera_password.result5
-rw-r--r--mysql-test/suite/galera/r/galera_pc_ignore_sb.result2
-rw-r--r--mysql-test/suite/galera/r/galera_pc_recovery.result37
-rw-r--r--mysql-test/suite/galera/r/galera_performance_schema.result13
-rw-r--r--mysql-test/suite/galera/r/galera_pk_bigint_signed.result4
-rw-r--r--mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result4
-rw-r--r--mysql-test/suite/galera/r/galera_prepared_statement.result2
-rw-r--r--mysql-test/suite/galera/r/galera_query_cache.result2
-rw-r--r--mysql-test/suite/galera/r/galera_query_cache_sync_wait.result2
-rw-r--r--mysql-test/suite/galera/r/galera_read_only.result14
-rw-r--r--mysql-test/suite/galera/r/galera_repair_view.result17
-rw-r--r--mysql-test/suite/galera/r/galera_repl_key_format_flat16.result2
-rw-r--r--mysql-test/suite/galera/r/galera_repl_max_ws_size.result4
-rw-r--r--mysql-test/suite/galera/r/galera_restart_nochanges.result2
-rw-r--r--mysql-test/suite/galera/r/galera_restart_on_unknown_option.result2
-rw-r--r--mysql-test/suite/galera/r/galera_roles.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_add_pk.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_drop_pk.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_error.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_simple.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sbr.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sbr_binlog.result2
-rw-r--r--mysql-test/suite/galera/r/galera_schema.result114
-rw-r--r--mysql-test/suite/galera/r/galera_schema_dirty_reads.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sequences.result52
-rw-r--r--mysql-test/suite/galera/r/galera_serializable.result8
-rw-r--r--mysql-test/suite/galera/r/galera_server.result2
-rw-r--r--mysql-test/suite/galera/r/galera_set_position_after_cert_failure.result36
-rw-r--r--mysql-test/suite/galera/r/galera_set_position_after_dummy_writeset.result36
-rw-r--r--mysql-test/suite/galera/r/galera_shutdown_nonprim.result2
-rw-r--r--mysql-test/suite/galera/r/galera_slave_replay.result34
-rw-r--r--mysql-test/suite/galera/r/galera_sp_bf_abort.result8
-rw-r--r--mysql-test/suite/galera/r/galera_sp_insert_parallel.result41
-rw-r--r--mysql-test/suite/galera/r/galera_split_brain.result6
-rw-r--r--mysql-test/suite/galera/r/galera_sql_log_bin_zero.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ssl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ssl_compression.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ssl_upgrade.result3
-rw-r--r--mysql-test/suite/galera/r/galera_sst_encrypted.result370
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup.result554
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result554
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key-openssl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key_server.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery.result554
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive,debug.rdiff200
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive.result554
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_lost_found.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_qpress.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump.result743
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result371
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff200
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync.result554
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync2.result554
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_binlogname.result186
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff204
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result554
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff191
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result658
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key,debug.rdiff191
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result658
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server,debug.rdiff191
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result658
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result186
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_recv_auto,debug.rdiff202
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_recv_auto.result554
-rw-r--r--mysql-test/suite/galera/r/galera_status_cluster.result2
-rw-r--r--mysql-test/suite/galera/r/galera_status_local_index.result2
-rw-r--r--mysql-test/suite/galera/r/galera_status_local_state.result2
-rw-r--r--mysql-test/suite/galera/r/galera_suspend_slave.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sync_wait_show.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sync_wait_upto.result43
-rw-r--r--mysql-test/suite/galera/r/galera_to_error.result30
-rw-r--r--mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_error.result5
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_locking.result33
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_sequential.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_drop_database.result6
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ftwrl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_lock_exclusive.result4
-rw-r--r--mysql-test/suite/galera/r/galera_toi_lock_shared.result23
-rw-r--r--mysql-test/suite/galera/r/galera_toi_truncate.result25
-rw-r--r--mysql-test/suite/galera/r/galera_transaction_read_only.result2
-rw-r--r--mysql-test/suite/galera/r/galera_transaction_replay.result96
-rw-r--r--mysql-test/suite/galera/r/galera_trigger.result2
-rw-r--r--mysql-test/suite/galera/r/galera_truncate.result13
-rw-r--r--mysql-test/suite/galera/r/galera_truncate_temporary.result2
-rw-r--r--mysql-test/suite/galera/r/galera_unicode_identifiers.result2
-rw-r--r--mysql-test/suite/galera/r/galera_unicode_pk.result7
-rw-r--r--mysql-test/suite/galera/r/galera_update_limit.result6
-rw-r--r--mysql-test/suite/galera/r/galera_v1_row_events.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_OSU_method.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_OSU_method2.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result4
-rw-r--r--mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_cluster_address.result8
-rw-r--r--mysql-test/suite/galera/r/galera_var_cluster_conf_id.result10
-rw-r--r--mysql-test/suite/galera/r/galera_var_desync_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_dirty_reads.result5
-rw-r--r--mysql-test/suite/galera/r/galera_var_fkchecks.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_gtid_domain_id.result6
-rw-r--r--mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result186
-rw-r--r--mysql-test/suite/galera/r/galera_var_load_data_splitting.result12
-rw-r--r--mysql-test/suite/galera/r/galera_var_log_bin.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_max_ws_rows.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_max_ws_size.result4
-rw-r--r--mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_node_address.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_notify_cmd.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_reject_queries.result9
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result150
-rw-r--r--mysql-test/suite/galera/r/galera_var_retry_autocommit.result55
-rw-r--r--mysql-test/suite/galera/r/galera_var_slave_threads.result5
-rw-r--r--mysql-test/suite/galera/r/galera_var_sst_auth.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_sync_wait.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_trx_fragment_size.result95
-rw-r--r--mysql-test/suite/galera/r/galera_var_wsrep_on_off.result110
-rw-r--r--mysql-test/suite/galera/r/galera_var_wsrep_provider_options.result10
-rw-r--r--mysql-test/suite/galera/r/galera_var_wsrep_start_position.result105
-rw-r--r--mysql-test/suite/galera/r/galera_virtual_blob.result2
-rw-r--r--mysql-test/suite/galera/r/galera_virtual_column.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wan.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wan_restart_ist.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wan_restart_sst.result22
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_log_conficts.result4
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_new_cluster.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result21
-rw-r--r--mysql-test/suite/galera/r/galera_zero_length_column.result2
-rw-r--r--mysql-test/suite/galera/r/grant.result4
-rw-r--r--mysql-test/suite/galera/r/lp1276424.result2
-rw-r--r--mysql-test/suite/galera/r/lp1347768.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747-2.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747-3.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747-4.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747.result2
-rw-r--r--mysql-test/suite/galera/r/lp1438990.result2
-rw-r--r--mysql-test/suite/galera/r/lp959512.result2
-rw-r--r--mysql-test/suite/galera/r/mdev-22543.result2
-rw-r--r--mysql-test/suite/galera/r/mdev_10518.result6
-rw-r--r--mysql-test/suite/galera/r/mdev_18730.result27
-rw-r--r--mysql-test/suite/galera/r/mdev_21025.result11
-rw-r--r--mysql-test/suite/galera/r/mdev_21718.result16
-rw-r--r--mysql-test/suite/galera/r/mdev_9290.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#110.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#198.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#201.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#237.result4
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#247.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#31.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#33,debug.rdiff193
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#33.result700
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#332.result20
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#90.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep-bugs-607.result31
-rw-r--r--mysql-test/suite/galera/r/mysql_tzinfo_to_sql.result2
-rw-r--r--mysql-test/suite/galera/r/partition.result16
-rw-r--r--mysql-test/suite/galera/r/pxc-421.result44
-rw-r--r--mysql-test/suite/galera/r/query_cache.result6
-rw-r--r--mysql-test/suite/galera/r/rename.result2
-rw-r--r--mysql-test/suite/galera/r/rpl_row_annotate.result8
-rw-r--r--mysql-test/suite/galera/r/sql_log_bin.result2
-rw-r--r--mysql-test/suite/galera/r/unique_key.result2
-rw-r--r--mysql-test/suite/galera/r/versioning_trx_id.result9
-rw-r--r--mysql-test/suite/galera/r/view.result2
-rw-r--r--mysql-test/suite/galera/r/wsrep_slave_threads_basic.result2
-rw-r--r--mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result15
-rw-r--r--mysql-test/suite/galera/suite.pm24
-rw-r--r--mysql-test/suite/galera/t/GCF-939.test31
-rw-r--r--mysql-test/suite/galera/t/MDEV-16509.test145
-rw-r--r--mysql-test/suite/galera/t/MDEV-18832.cnf4
-rw-r--r--mysql-test/suite/galera/t/MDEV-18832.test23
-rw-r--r--mysql-test/suite/galera/t/MDEV-20225.test13
-rw-r--r--mysql-test/suite/galera/t/MDEV-20616.test244
-rw-r--r--mysql-test/suite/galera/t/MDEV-20793.test102
-rw-r--r--mysql-test/suite/galera/t/MDEV-22021.test2
-rw-r--r--mysql-test/suite/galera/t/MDEV-22051.test34
-rw-r--r--mysql-test/suite/galera/t/MDEV-22055.test19
-rw-r--r--mysql-test/suite/galera/t/MDEV-22227.test26
-rw-r--r--mysql-test/suite/galera/t/MDEV-22421.test12
-rw-r--r--mysql-test/suite/galera/t/MDEV-22458.test21
-rw-r--r--mysql-test/suite/galera/t/MDEV-22707.test52
-rw-r--r--mysql-test/suite/galera/t/MDEV-22708.cnf4
-rw-r--r--mysql-test/suite/galera/t/MDEV-22708.test14
-rw-r--r--mysql-test/suite/galera/t/MDEV-24063.test26
-rw-r--r--mysql-test/suite/galera/t/MDEV-24143.test20
-rw-r--r--mysql-test/suite/galera/t/MDEV-24327.test6
-rw-r--r--mysql-test/suite/galera/t/MDEV-25494.test7
-rw-r--r--mysql-test/suite/galera/t/MDEV-25562.test11
-rw-r--r--mysql-test/suite/galera/t/MDEV-25740.test14
-rw-r--r--mysql-test/suite/galera/t/MDEV-26575.test23
-rw-r--r--mysql-test/suite/galera/t/MDEV-27276.test44
-rw-r--r--mysql-test/suite/galera/t/MDEV-27713.test67
-rw-r--r--mysql-test/suite/galera/t/MDEV-27862.combinations4
-rw-r--r--mysql-test/suite/galera/t/MDEV-27862.test67
-rw-r--r--mysql-test/suite/galera/t/MDEV-28053.cnf6
-rw-r--r--mysql-test/suite/galera/t/MDEV-28053.test61
-rw-r--r--mysql-test/suite/galera/t/MDEV-6860.cnf7
-rw-r--r--mysql-test/suite/galera/t/MDEV-6860.test42
-rw-r--r--mysql-test/suite/galera/t/MENT-1047.test7
-rw-r--r--mysql-test/suite/galera/t/MW-284.test2
-rw-r--r--mysql-test/suite/galera/t/MW-286.test50
-rw-r--r--mysql-test/suite/galera/t/MW-292.test50
-rw-r--r--mysql-test/suite/galera/t/MW-328-footer.inc18
-rw-r--r--mysql-test/suite/galera/t/MW-328-header.inc29
-rw-r--r--mysql-test/suite/galera/t/MW-328A.cnf7
-rw-r--r--mysql-test/suite/galera/t/MW-328A.test78
-rw-r--r--mysql-test/suite/galera/t/MW-328B.cnf7
-rw-r--r--mysql-test/suite/galera/t/MW-328B.test36
-rw-r--r--mysql-test/suite/galera/t/MW-328D.test39
-rw-r--r--mysql-test/suite/galera/t/MW-328E.test40
-rw-r--r--mysql-test/suite/galera/t/MW-329.test28
-rw-r--r--mysql-test/suite/galera/t/MW-336.cnf5
-rw-r--r--mysql-test/suite/galera/t/MW-360-master.opt2
-rw-r--r--mysql-test/suite/galera/t/MW-369.inc7
-rw-r--r--mysql-test/suite/galera/t/MW-369.test100
-rw-r--r--mysql-test/suite/galera/t/MW-402.test56
-rw-r--r--mysql-test/suite/galera/t/MW-44.test6
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait1.test12
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait8.test10
-rw-r--r--mysql-test/suite/galera/t/galera#505.test5
-rw-r--r--mysql-test/suite/galera/t/galera_UK_conflict.test181
-rw-r--r--mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test9
-rw-r--r--mysql-test/suite/galera/t/galera_as_master.test2
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave.test17
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_autoinc.test20
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_ctas.test35
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid.inc1
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid.test69
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.cnf8
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.test14
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test39
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_nonprim.test27
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_replay.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_replay.test86
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_replication_bundle.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test48
-rw-r--r--mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test1
-rw-r--r--mysql-test/suite/galera/t/galera_backup_stage.test120
-rw-r--r--mysql-test/suite/galera/t/galera_bad_wsrep_new_cluster.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.test58
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf15
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_group_commit.test77
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_ps.cnf3
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_ps.test34
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_ps_bind.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_ps_bind.test61
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.test54
-rw-r--r--mysql-test/suite/galera/t/galera_bf_kill.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_bf_kill.test67
-rw-r--r--mysql-test/suite/galera/t/galera_bf_lock_wait.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_bf_lock_wait.test6
-rw-r--r--mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test8
-rw-r--r--mysql-test/suite/galera/t/galera_change_user.test29
-rw-r--r--mysql-test/suite/galera/t/galera_commit_empty.test35
-rw-r--r--mysql-test/suite/galera/t/galera_concurrent_ctas.test36
-rw-r--r--mysql-test/suite/galera/t/galera_create_table_as_select.test145
-rw-r--r--mysql-test/suite/galera/t/galera_ctas.test39
-rw-r--r--mysql-test/suite/galera/t/galera_ddl_fk_conflict.inc192
-rw-r--r--mysql-test/suite/galera/t/galera_ddl_fk_conflict.test29
-rw-r--r--mysql-test/suite/galera/t/galera_ddl_fk_conflict_with_tmp.inc69
-rw-r--r--mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.inc34
-rw-r--r--mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.test57
-rw-r--r--mysql-test/suite/galera/t/galera_defaults.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_defaults.test11
-rw-r--r--mysql-test/suite/galera/t/galera_fk_cascade_delete.test186
-rw-r--r--mysql-test/suite/galera/t/galera_fk_truncate.test39
-rw-r--r--mysql-test/suite/galera/t/galera_flush_local.cnf12
-rw-r--r--mysql-test/suite/galera/t/galera_forced_binlog_format.test7
-rw-r--r--mysql-test/suite/galera/t/galera_ftwrl_drain.test4
-rw-r--r--mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test8
-rw-r--r--mysql-test/suite/galera/t/galera_gcs_fc_limit.test8
-rw-r--r--mysql-test/suite/galera/t/galera_gcs_fragment.test4
-rw-r--r--mysql-test/suite/galera/t/galera_gtid-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_slave.test33
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test111
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mariabackup.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf3
-rw-r--r--mysql-test/suite/galera/t/galera_ist_progress.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_ist_progress.test27
-rw-r--r--mysql-test/suite/galera/t/galera_ist_restart_joiner.test4
-rw-r--r--mysql-test/suite/galera/t/galera_kill_applier.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_kill_applier.test12
-rw-r--r--mysql-test/suite/galera/t/galera_kill_largechanges.test50
-rw-r--r--mysql-test/suite/galera/t/galera_last_committed_id.test68
-rw-r--r--mysql-test/suite/galera/t/galera_load_data.test7
-rw-r--r--mysql-test/suite/galera/t/galera_lock_tables_in_transaction.test21
-rw-r--r--mysql-test/suite/galera/t/galera_log_bin.inc6
-rw-r--r--mysql-test/suite/galera/t/galera_log_bin_sst.inc6
-rw-r--r--mysql-test/suite/galera/t/galera_many_tables_nopk.test23
-rw-r--r--mysql-test/suite/galera/t/galera_multirow_rollback.combinations4
-rw-r--r--mysql-test/suite/galera/t/galera_multirow_rollback.test89
-rw-r--r--mysql-test/suite/galera/t/galera_nonPK_and_PA.test168
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test6
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test9
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_simple.test16
-rw-r--r--mysql-test/suite/galera/t/galera_partition.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_partition.test19
-rw-r--r--mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf11
-rw-r--r--mysql-test/suite/galera/t/galera_pc_recovery.test102
-rw-r--r--mysql-test/suite/galera/t/galera_read_only.test13
-rw-r--r--mysql-test/suite/galera/t/galera_repair_view.test12
-rw-r--r--mysql-test/suite/galera/t/galera_schema.test61
-rw-r--r--mysql-test/suite/galera/t/galera_sequences.test52
-rw-r--r--mysql-test/suite/galera/t/galera_set_position_after_cert_failure.test98
-rw-r--r--mysql-test/suite/galera/t/galera_set_position_after_dummy_writeset.test101
-rw-r--r--mysql-test/suite/galera/t/galera_slave_replay.test56
-rw-r--r--mysql-test/suite/galera/t/galera_sp_bf_abort.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_sp_bf_abort.inc2
-rw-r--r--mysql-test/suite/galera/t/galera_sp_bf_abort.test7
-rw-r--r--mysql-test/suite/galera/t/galera_sp_insert_parallel.test55
-rw-r--r--mysql-test/suite/galera/t/galera_split_brain.test16
-rw-r--r--mysql-test/suite/galera/t/galera_ssl_upgrade.test4
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key-openssl.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key_server.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_force_recovery.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.test17
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_qpress.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mysqldump.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mysqldump.test2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf5
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test2
-rw-r--r--mysql-test/suite/galera/t/galera_sync_wait_upto-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_sync_wait_upto.test115
-rw-r--r--mysql-test/suite/galera/t/galera_to_error.test71
-rw-r--r--mysql-test/suite/galera/t/galera_toi_ddl_error.test5
-rw-r--r--mysql-test/suite/galera/t/galera_toi_ddl_locking.test54
-rw-r--r--mysql-test/suite/galera/t/galera_toi_ddl_nonconflicting.test2
-rw-r--r--mysql-test/suite/galera/t/galera_toi_lock_shared.test14
-rw-r--r--mysql-test/suite/galera/t/galera_toi_truncate.test40
-rw-r--r--mysql-test/suite/galera/t/galera_transaction_replay.test201
-rw-r--r--mysql-test/suite/galera/t/galera_truncate.test20
-rw-r--r--mysql-test/suite/galera/t/galera_unicode_pk.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_unicode_pk.test11
-rw-r--r--mysql-test/suite/galera/t/galera_update_limit.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_update_limit.test5
-rw-r--r--mysql-test/suite/galera/t/galera_var_cluster_address.test11
-rw-r--r--mysql-test/suite/galera/t/galera_var_cluster_conf_id.test9
-rw-r--r--mysql-test/suite/galera/t/galera_var_dirty_reads.test7
-rw-r--r--mysql-test/suite/galera/t/galera_var_gtid_domain_id.test4
-rw-r--r--mysql-test/suite/galera/t/galera_var_ignore_apply_errors.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test291
-rw-r--r--mysql-test/suite/galera/t/galera_var_load_data_splitting.test3
-rw-r--r--mysql-test/suite/galera/t/galera_var_log_bin.cnf5
-rw-r--r--mysql-test/suite/galera/t/galera_var_reject_queries.test6
-rw-r--r--mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test96
-rw-r--r--mysql-test/suite/galera/t/galera_var_retry_autocommit.test40
-rw-r--r--mysql-test/suite/galera/t/galera_var_slave_threads.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_var_slave_threads.test10
-rw-r--r--mysql-test/suite/galera/t/galera_var_trx_fragment_size.test43
-rw-r--r--mysql-test/suite/galera/t/galera_var_wsrep_on_off.test153
-rw-r--r--mysql-test/suite/galera/t/galera_var_wsrep_provider_options.test11
-rw-r--r--mysql-test/suite/galera/t/galera_var_wsrep_start_position.test76
-rw-r--r--mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_wan_restart_sst.test30
-rw-r--r--mysql-test/suite/galera/t/galera_wsrep_new_cluster.test1
-rw-r--r--mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test50
-rw-r--r--mysql-test/suite/galera/t/mdev_10518.test4
-rw-r--r--mysql-test/suite/galera/t/mdev_18730.test71
-rw-r--r--mysql-test/suite/galera/t/mdev_21025.test22
-rw-r--r--mysql-test/suite/galera/t/mdev_21718.cnf4
-rw-r--r--mysql-test/suite/galera/t/mdev_21718.test35
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#198.cnf9
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#198.test1
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#237.test4
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#33.test16
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#332.test3
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep-bugs-607.test70
-rw-r--r--mysql-test/suite/galera/t/partition.test16
-rw-r--r--mysql-test/suite/galera/t/pxc-421.test67
-rw-r--r--mysql-test/suite/galera/t/rpl_row_annotate.test5
-rw-r--r--mysql-test/suite/galera/t/versioning_trx_id.test16
-rw-r--r--mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test22
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def1
-rw-r--r--mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf44
-rw-r--r--mysql-test/suite/galera_3nodes/galera_3nodes.cnf21
-rw-r--r--mysql-test/suite/galera_3nodes/include/galera_resume.inc (renamed from mysql-test/include/galera_resume.inc)0
-rw-r--r--mysql-test/suite/galera_3nodes/include/have_garbd.inc3
-rw-r--r--mysql-test/suite/galera_3nodes/r/GAL-501.result3
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_2_cluster.result89
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result5
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result8
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_garbd.result4
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result4
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result48
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result3
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_load_data_ist.result36
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result28
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result5
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_weight.result4
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result14
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ssl_reload.result16
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result77
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result94
-rw-r--r--mysql-test/suite/galera_3nodes/suite.pm25
-rw-r--r--mysql-test/suite/galera_3nodes/t/GAL-501.test6
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_2_cluster.cnf25
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_2_cluster.test148
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test11
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_garbd.test23
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test48
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test11
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test13
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test6
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_load_data_ist.cnf4
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_load_data_ist.test124
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test59
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test16
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf8
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.test18
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test34
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test1
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ssl_reload.cnf10
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ssl_reload.test71
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test3
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test81
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.test58
-rw-r--r--mysql-test/suite/galera_3nodes_sr/disabled.def6
-rw-r--r--mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf1
-rw-r--r--mysql-test/suite/galera_3nodes_sr/my.cnf1
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-336.result26
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-582.result23
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-606.result38
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-609.result78
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result256
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result100
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result177
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-817.result54
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-832.result25
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result86
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result80
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result40
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result34
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result54
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result59
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result31
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result49
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result117
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split_no_primary.result85
-rw-r--r--mysql-test/suite/galera_3nodes_sr/suite.pm46
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-336.test47
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-582.test39
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-606.test80
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-609.test37
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test137
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test49
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test70
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-817.test109
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-832.test43
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test162
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test127
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test59
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_master.test58
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply.test81
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test80
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test56
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test90
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test177
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split_no_primary.test126
-rw-r--r--mysql-test/suite/galera_sr/disabled.def13
-rw-r--r--mysql-test/suite/galera_sr/galera_2nodes.cnf1
-rw-r--r--mysql-test/suite/galera_sr/my.cnf1
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1008.result70
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1018.result25
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1018B.result12
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1051.result46
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1060.result21
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-561.result52
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-571.result67
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-572.result59
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-580.result13
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-585.result28
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-597.result27
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-620.result18
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-623.result29
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-627.result24
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-845.result21
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-851.result30
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-867.result4
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-889.result25
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-900.result21
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-18585.result36
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-21613.result20
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-22616.result13
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-23623.result26
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-25226.result24
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-25717.result47
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-25718.result27
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-27553.result36
-rw-r--r--mysql-test/suite/galera_sr/r/MDEV-27615.result27
-rw-r--r--mysql-test/suite/galera_sr/r/galera-features#56.result38
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result555
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_blob.result23
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_cc_master.result66
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_cc_no_primary.result70
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result61
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_concurrent.result36
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict.result21
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result31
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result28
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result29
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_create_drop.result28
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result65
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result23
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result50
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result42
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result46
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result39
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_gtid.result57
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_insert_select.result18
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result31
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result35
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result32
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result32
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_query.result41
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result54
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result33
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_load_data.result14
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result19
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_log_bin.result124
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result33
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_multirow_rollback.result127
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_myisam.result16
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result60
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_nonPK_and_PA.result46
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result37
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback.result42
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result34
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result42
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result33
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result32
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result48
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_slow.result13
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result15
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result121
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result54
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result20
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ws_size.result36
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result34
-rw-r--r--mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result29
-rw-r--r--mysql-test/suite/galera_sr/r/mdev_18631.result21
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep#215.result137
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-bugs-900.result15
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result63
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result24
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result12
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result39
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result11
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result1045
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result35
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result23
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result27
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result37
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result39
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result21
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result18
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result33
-rw-r--r--mysql-test/suite/galera_sr/suite.pm70
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1008.inc38
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1008.test18
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1018.test39
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1018B.test40
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1051.test51
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1060.test9
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-561.test72
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-571.test54
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-572.test78
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-580.test27
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-585.test44
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-597.test42
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-620.test22
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-623.test31
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-627.test31
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-845.test30
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-851.test24
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-867.test42
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-889.test29
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-900.test31
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-18585.cnf5
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-18585.test42
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-21613.cnf7
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-21613.test36
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-22616.test18
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-23623.test50
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-25226.test33
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-25717.test113
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-25718.cnf7
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-25718.test63
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-27553.test80
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-27615.test72
-rw-r--r--mysql-test/suite/galera_sr/t/galera-features#56.test62
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc145
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test50
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_blob.test38
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_cc_master.test100
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_cc_no_primary.test85
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test105
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_concurrent.test45
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict.test45
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test45
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test46
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test44
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_create_drop.test33
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test66
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test43
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test65
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test53
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test60
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test62
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_gtid.test46
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_insert_select.test33
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test52
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf8
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test71
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test54
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test59
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_query.test59
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf4
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test85
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test58
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_load_data.test49
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test50
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_log_bin.test70
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test53
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.combinations4
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.test156
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_myisam.test29
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf11
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test87
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_nonPK_and_PA.test109
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test59
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback.test76
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test57
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test51
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test59
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test53
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test74
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_slow.test11
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf6
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test21
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test260
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test54
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test27
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ws_size.test70
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test62
-rw-r--r--mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test38
-rw-r--r--mysql-test/suite/galera_sr/t/mdev_18631.cnf23
-rw-r--r--mysql-test/suite/galera_sr/t/mdev_18631.test24
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep#215.test176
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test22
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test41
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test25
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test21
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test62
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test17
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc109
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test41
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test47
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test29
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test44
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test48
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test63
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test44
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test29
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test45
-rw-r--r--mysql-test/suite/gcol/inc/gcol_ins_upd.inc2
-rw-r--r--mysql-test/suite/gcol/inc/gcol_select.inc2
-rw-r--r--mysql-test/suite/gcol/r/gcol_bug20746926.result8
-rw-r--r--mysql-test/suite/gcol/r/gcol_bugfixes.result2
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result7
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result7
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_innodb.result6
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_myisam.result8
-rw-r--r--mysql-test/suite/gcol/r/gcol_rollback.result1
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_innodb.result32
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_myisam.result58
-rw-r--r--mysql-test/suite/gcol/r/gcol_view_innodb.result1
-rw-r--r--mysql-test/suite/gcol/r/gcol_view_myisam.result1
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result28
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_fk.result2
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result2
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_rebuild.result16
-rw-r--r--mysql-test/suite/gcol/r/virtual_index_drop.result3
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test47
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_rebuild.test5
-rw-r--r--mysql-test/suite/gcol/t/virtual_index_drop.test2
-rw-r--r--mysql-test/suite/handler/aria.result6
-rw-r--r--mysql-test/suite/handler/heap.result7
-rw-r--r--mysql-test/suite/handler/innodb.result6
-rw-r--r--mysql-test/suite/handler/interface.result6
-rw-r--r--mysql-test/suite/handler/interface.test6
-rw-r--r--mysql-test/suite/handler/myisam.result6
-rw-r--r--mysql-test/suite/heap/heap.result23
-rw-r--r--mysql-test/suite/heap/heap.test1
-rw-r--r--mysql-test/suite/heap/heap_btree.result2
-rw-r--r--mysql-test/suite/heap/heap_btree.test1
-rw-r--r--mysql-test/suite/heap/heap_hash.result9
-rw-r--r--mysql-test/suite/heap/heap_hash.test4
-rw-r--r--mysql-test/suite/innodb/include/show_i_s_tablespaces.inc2
-rw-r--r--mysql-test/suite/innodb/r/101_compatibility.result3
-rw-r--r--mysql-test/suite/innodb/r/alter_algorithm2.result9
-rw-r--r--mysql-test/suite/innodb/r/alter_candidate_key.result2
-rw-r--r--mysql-test/suite/innodb/r/alter_copy.result3
-rw-r--r--mysql-test/suite/innodb/r/alter_crash.result4
-rw-r--r--mysql-test/suite/innodb/r/alter_foreign_crash.result1
-rw-r--r--mysql-test/suite/innodb/r/alter_kill.result6
-rw-r--r--mysql-test/suite/innodb/r/alter_missing_tablespace.result1
-rw-r--r--mysql-test/suite/innodb/r/alter_not_null_debug.result26
-rw-r--r--mysql-test/suite/innodb/r/alter_persistent_autoinc.result42
-rw-r--r--mysql-test/suite/innodb/r/alter_primary_key.result2
-rw-r--r--mysql-test/suite/innodb/r/alter_rename_files.result3
-rw-r--r--mysql-test/suite/innodb/r/alter_table.result33
-rw-r--r--mysql-test/suite/innodb/r/alter_varchar_change.result34
-rw-r--r--mysql-test/suite/innodb/r/autoinc_debug.result1
-rw-r--r--mysql-test/suite/innodb/r/autoinc_persist.result8
-rw-r--r--mysql-test/suite/innodb/r/buf_pool_resize_oom.result1
-rw-r--r--mysql-test/suite/innodb/r/change_column_collation.result19
-rw-r--r--mysql-test/suite/innodb/r/ddl_purge.result1
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff19
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff19
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_alter.result23
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_compatibility.result3
-rw-r--r--mysql-test/suite/innodb/r/doublewrite.result19
-rw-r--r--mysql-test/suite/innodb/r/drop_table_background.result1
-rw-r--r--mysql-test/suite/innodb/r/foreign-keys.result2
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result34
-rw-r--r--mysql-test/suite/innodb/r/foreign_key_debug.result4
-rw-r--r--mysql-test/suite/innodb/r/full_crc32_import.result187
-rw-r--r--mysql-test/suite/innodb/r/ibuf_not_empty.result3
-rw-r--r--mysql-test/suite/innodb/r/import_bugs.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb-32k-crash.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-32k.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-64k-crash.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-64k.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-table.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-tempfile.result7
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc-44030.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb-blob.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb-fk.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-get-fk.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-index-debug.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb-index-online-fk.result18
-rw-r--r--mysql-test/suite/innodb/r/innodb-index-online.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb-index.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb-isolation.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-lock-schedule-algorithm.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-mdev-7513.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_default.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lz4.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lzma.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lzo.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_snappy.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_tables.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_zip.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-rollback.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-system-table-view.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-table-online.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff5
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff5
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb_28867993.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_buffer_pool_fail.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug12902967.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug14147491.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug14676111.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30113362.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30423.result11
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30919.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug51920.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53046.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53756.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug57252.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug59641.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug60049.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug68148.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_defrag_stats.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_defragment.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_defragment_fill_factor.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_force_recovery.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_gis.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result43
-rw-r--r--mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_drop_locked.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch.result7
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_persistent.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_wl6326.result14
-rw-r--r--mysql-test/suite/innodb/r/instant_alter,32k.rdiff20
-rw-r--r--mysql-test/suite/innodb/r/instant_alter,4k.rdiff83
-rw-r--r--mysql-test/suite/innodb/r/instant_alter,64k.rdiff20
-rw-r--r--mysql-test/suite/innodb/r/instant_alter,8k.rdiff42
-rw-r--r--mysql-test/suite/innodb/r/instant_alter.result1398
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_bugs.result265
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_charset,redundant.rdiff54
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_charset.result2228
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_crash.result75
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug.result145
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_extend,utf8.rdiff38
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_extend.resultbin0 -> 9115 bytes
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_import.result109
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_index_rename.result236
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_limit,16k.rdiff13
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_limit,32k.rdiff16
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_limit,4k.rdiff313
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_limit,64k.rdiff16
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_limit,8k.rdiff63
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_limit.result47
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_null.result56
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff19
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_purge.result47
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_rollback.result28
-rw-r--r--mysql-test/suite/innodb/r/instant_auto_inc.result21
-rw-r--r--mysql-test/suite/innodb/r/instant_drop.result205
-rw-r--r--mysql-test/suite/innodb/r/log_alter_table.result3
-rw-r--r--mysql-test/suite/innodb/r/log_corruption.result21
-rw-r--r--mysql-test/suite/innodb/r/log_file.result15
-rw-r--r--mysql-test/suite/innodb/r/log_file_name.result11
-rw-r--r--mysql-test/suite/innodb/r/log_file_name_debug.result4
-rw-r--r--mysql-test/suite/innodb/r/log_file_size.result21
-rw-r--r--mysql-test/suite/innodb/r/monitor.result14
-rw-r--r--mysql-test/suite/innodb/r/no_pad.result7
-rw-r--r--mysql-test/suite/innodb/r/purge_secondary.result1
-rw-r--r--mysql-test/suite/innodb/r/purge_thread_shutdown.result1
-rw-r--r--mysql-test/suite/innodb/r/read_only_recover_committed.result4
-rw-r--r--mysql-test/suite/innodb/r/read_only_recovery.result3
-rw-r--r--mysql-test/suite/innodb/r/readahead.result1
-rw-r--r--mysql-test/suite/innodb/r/recovery_shutdown.result3
-rw-r--r--mysql-test/suite/innodb/r/rename_table.result2
-rw-r--r--mysql-test/suite/innodb/r/rename_table_debug.result1
-rw-r--r--mysql-test/suite/innodb/r/restart.result4
-rw-r--r--mysql-test/suite/innodb/r/row_format_redundant.result5
-rw-r--r--mysql-test/suite/innodb/r/skip_symbolic_links.result2
-rw-r--r--mysql-test/suite/innodb/r/stats_persistent.result1
-rw-r--r--mysql-test/suite/innodb/r/stored_fk.result6
-rw-r--r--mysql-test/suite/innodb/r/system_tables.result3
-rw-r--r--mysql-test/suite/innodb/r/table_flags.result14
-rw-r--r--mysql-test/suite/innodb/r/temporary_table.result7
-rw-r--r--mysql-test/suite/innodb/r/truncate_crash.result1
-rw-r--r--mysql-test/suite/innodb/r/truncate_missing.result1
-rw-r--r--mysql-test/suite/innodb/r/undo_truncate.result4
-rw-r--r--mysql-test/suite/innodb/r/undo_truncate_recover.result2
-rw-r--r--mysql-test/suite/innodb/r/update_time.result1
-rw-r--r--mysql-test/suite/innodb/r/update_time_wl6658.result1
-rw-r--r--mysql-test/suite/innodb/r/xa_recovery.result3
-rw-r--r--mysql-test/suite/innodb/r/xa_recovery_debug.result1
-rw-r--r--mysql-test/suite/innodb/t/alter_algorithm2.test8
-rw-r--r--mysql-test/suite/innodb/t/alter_candidate_key.test2
-rw-r--r--mysql-test/suite/innodb/t/alter_kill.test36
-rw-r--r--mysql-test/suite/innodb/t/alter_not_null_debug.test29
-rw-r--r--mysql-test/suite/innodb/t/alter_persistent_autoinc.test86
-rw-r--r--mysql-test/suite/innodb/t/alter_primary_key.test1
-rw-r--r--mysql-test/suite/innodb/t/alter_rename_files.test2
-rw-r--r--mysql-test/suite/innodb/t/alter_table.test30
-rw-r--r--mysql-test/suite/innodb/t/alter_varchar_change.test24
-rw-r--r--mysql-test/suite/innodb/t/blob-crash.test1
-rw-r--r--mysql-test/suite/innodb/t/change_column_collation.test24
-rw-r--r--mysql-test/suite/innodb/t/corrupted_during_recovery.test1
-rw-r--r--mysql-test/suite/innodb/t/ddl_purge.test1
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_alter.test22
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_compatibility.test5
-rw-r--r--mysql-test/suite/innodb/t/doublewrite.combinations7
-rw-r--r--mysql-test/suite/innodb/t/doublewrite.test42
-rw-r--r--mysql-test/suite/innodb/t/foreign-keys.test1
-rw-r--r--mysql-test/suite/innodb/t/foreign_key.test22
-rw-r--r--mysql-test/suite/innodb/t/foreign_key_debug.test3
-rw-r--r--mysql-test/suite/innodb/t/full_crc32_import.opt1
-rw-r--r--mysql-test/suite/innodb/t/full_crc32_import.test210
-rw-r--r--mysql-test/suite/innodb/t/ibuf_not_empty.combinations5
-rw-r--r--mysql-test/suite/innodb/t/ibuf_not_empty.test36
-rw-r--r--mysql-test/suite/innodb/t/import_bugs.test19
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-tempfile.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-index-debug.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-index-online.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-rollback.test17
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test17
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522.test15
-rw-r--r--mysql-test/suite/innodb/t/innodb.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug68148.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats_fetch.test4
-rw-r--r--mysql-test/suite/innodb/t/instant_alter.test503
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_bugs.test282
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_charset.test913
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_crash.test71
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_debug.test161
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_extend.combinations5
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_extend.test258
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_import.test177
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_index_rename.test229
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_limit.test76
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_null.test57
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_purge.test76
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_rollback.test24
-rw-r--r--mysql-test/suite/innodb/t/instant_auto_inc.test13
-rw-r--r--mysql-test/suite/innodb/t/instant_drop.test108
-rw-r--r--mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.combinations5
-rw-r--r--mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test3
-rw-r--r--mysql-test/suite/innodb/t/log_data_file_size.test1
-rw-r--r--mysql-test/suite/innodb/t/missing_tablespaces.test1
-rw-r--r--mysql-test/suite/innodb/t/no_pad.test10
-rw-r--r--mysql-test/suite/innodb/t/page_id_innochecksum.test34
-rw-r--r--mysql-test/suite/innodb/t/purge_thread_shutdown.test4
-rw-r--r--mysql-test/suite/innodb/t/redo_log_during_checkpoint.test1
-rw-r--r--mysql-test/suite/innodb/t/restart.test2
-rw-r--r--mysql-test/suite/innodb/t/row_format_redundant.opt1
-rw-r--r--mysql-test/suite/innodb/t/row_format_redundant.test15
-rw-r--r--mysql-test/suite/innodb/t/system_tables.test2
-rw-r--r--mysql-test/suite/innodb/t/table_flags.combinations5
-rw-r--r--mysql-test/suite/innodb/t/table_flags.opt1
-rw-r--r--mysql-test/suite/innodb/t/table_flags.test31
-rw-r--r--mysql-test/suite/innodb/t/trx_id_future.combinations5
-rw-r--r--mysql-test/suite/innodb/t/trx_id_future.test17
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate.opt1
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate.test3
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate_recover.combinations5
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate_recover.test16
-rw-r--r--mysql-test/suite/innodb_fts/r/crash_recovery.result4
-rw-r--r--mysql-test/suite/innodb_fts/r/fulltext2.result1
-rw-r--r--mysql-test/suite/innodb_fts/r/fulltext_order_by.result4
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-fic.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result4
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_misc.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result4
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug2.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/stopword.result4
-rw-r--r--mysql-test/suite/innodb_fts/r/sync.result2
-rw-r--r--mysql-test/suite/innodb_fts/t/innodb_fts_misc.test1
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug.test1
-rw-r--r--mysql-test/suite/innodb_gis/r/0.result10
-rw-r--r--mysql-test/suite/innodb_gis/r/1.result10
-rw-r--r--mysql-test/suite/innodb_gis/r/alter_spatial_index.result17
-rw-r--r--mysql-test/suite/innodb_gis/r/create_spatial_index.result3
-rw-r--r--mysql-test/suite/innodb_gis/r/gis.result10
-rw-r--r--mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result1
-rw-r--r--mysql-test/suite/innodb_gis/r/precise.result2
-rw-r--r--mysql-test/suite/innodb_gis/r/rt_precise.result1
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree.result2
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_drop_index.result1
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_estimate.result7
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_multi_pk.result1
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_recovery.result3
-rw-r--r--mysql-test/suite/innodb_gis/r/types.result1
-rw-r--r--mysql-test/suite/innodb_gis/t/alter_spatial_index.test6
-rw-r--r--mysql-test/suite/innodb_gis/t/kill_server.test1
-rw-r--r--mysql-test/suite/innodb_gis/t/rtree_compress2.test1
-rw-r--r--mysql-test/suite/innodb_gis/t/rtree_estimate.test1
-rw-r--r--mysql-test/suite/innodb_gis/t/rtree_split.test1
-rw-r--r--mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff16
-rw-r--r--mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff16
-rw-r--r--mysql-test/suite/innodb_zip/r/8k,full_crc32.rdiff16
-rw-r--r--mysql-test/suite/innodb_zip/r/8k,strict_full_crc32.rdiff16
-rw-r--r--mysql-test/suite/innodb_zip/r/bug56680.result1
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum.result5
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_3.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-zip.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/page_size,4k.rdiff14
-rw-r--r--mysql-test/suite/innodb_zip/r/page_size,8k.rdiff14
-rw-r--r--mysql-test/suite/innodb_zip/r/page_size.result12
-rw-r--r--mysql-test/suite/innodb_zip/r/recover.result1
-rw-r--r--mysql-test/suite/innodb_zip/r/restart.result177
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result8
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_zip.result2
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result6
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum.combinations5
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum.test22
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_2.test1
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_3.combinations5
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_3.opt1
-rw-r--r--mysql-test/suite/innodb_zip/t/page_size.test2
-rw-r--r--mysql-test/suite/innodb_zip/t/restart.test2
-rw-r--r--mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test16
-rw-r--r--mysql-test/suite/large_tests/r/maria_recover_encrypted.result53
-rw-r--r--mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result4
-rw-r--r--mysql-test/suite/large_tests/t/maria_recover_encrypted.test90
-rw-r--r--mysql-test/suite/maria/alter.result82
-rw-r--r--mysql-test/suite/maria/alter.test102
-rw-r--r--mysql-test/suite/maria/aria_pack_mdev14183.result1
-rw-r--r--mysql-test/suite/maria/disabled.def13
-rw-r--r--mysql-test/suite/maria/encrypt-wrong-key.test6
-rw-r--r--mysql-test/suite/maria/icp.result32
-rw-r--r--mysql-test/suite/maria/maria-autozerofill.result1
-rw-r--r--mysql-test/suite/maria/maria-autozerofill.test14
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.result1
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.result1
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.result1
-rw-r--r--mysql-test/suite/maria/maria-no-logging.result6
-rw-r--r--mysql-test/suite/maria/maria-no-logging.test2
-rw-r--r--mysql-test/suite/maria/maria-recover.result2
-rw-r--r--mysql-test/suite/maria/maria-recover.test12
-rw-r--r--mysql-test/suite/maria/maria-ucs2.result2
-rw-r--r--mysql-test/suite/maria/maria.result21
-rw-r--r--mysql-test/suite/maria/maria.test11
-rw-r--r--mysql-test/suite/maria/maria3.result4
-rw-r--r--mysql-test/suite/maria/mrr.result4
-rw-r--r--mysql-test/suite/maria/ps_maria.result2
-rw-r--r--mysql-test/suite/maria/system_tables.result14
-rw-r--r--mysql-test/suite/maria/system_tables.test27
-rw-r--r--mysql-test/suite/mariabackup/absolute_ibdata_paths.result2
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only-incr.result3
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only-incr.test4
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only.test2
-rw-r--r--mysql-test/suite/mariabackup/backup_ssl.result2
-rw-r--r--mysql-test/suite/mariabackup/big_innodb_log.result4
-rw-r--r--mysql-test/suite/mariabackup/binlog.test2
-rw-r--r--mysql-test/suite/mariabackup/compress_qpress.result2
-rw-r--r--mysql-test/suite/mariabackup/create_during_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/data_directory.result2
-rw-r--r--mysql-test/suite/mariabackup/ddl_incremental_encrypted.result2
-rw-r--r--mysql-test/suite/mariabackup/drop_table_during_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_compressed.result2
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_compressed.test1
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption,full_crc32.rdiff9
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption.combinations5
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption.result1
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption.test44
-rw-r--r--mysql-test/suite/mariabackup/error_during_copyback.result1
-rw-r--r--mysql-test/suite/mariabackup/full_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/huge_lsn.combinations5
-rw-r--r--mysql-test/suite/mariabackup/huge_lsn.result5
-rw-r--r--mysql-test/suite/mariabackup/huge_lsn.test10
-rw-r--r--mysql-test/suite/mariabackup/include/restart_and_restore.inc1
-rw-r--r--mysql-test/suite/mariabackup/incremental_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/incremental_ddl_before_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/incremental_ddl_before_backup.test2
-rw-r--r--mysql-test/suite/mariabackup/incremental_ddl_during_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/incremental_ddl_during_backup.test2
-rw-r--r--mysql-test/suite/mariabackup/incremental_encrypted.result2
-rw-r--r--mysql-test/suite/mariabackup/incremental_newdb_while_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/incremental_newdb_while_backup.test2
-rw-r--r--mysql-test/suite/mariabackup/incremental_rocksdb.result2
-rw-r--r--mysql-test/suite/mariabackup/innodb_force_recovery.result2
-rw-r--r--mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result2
-rw-r--r--mysql-test/suite/mariabackup/innodb_xa_rollback.result8
-rw-r--r--mysql-test/suite/mariabackup/log_checksum_mismatch.result2
-rw-r--r--mysql-test/suite/mariabackup/log_page_corruption.result6
-rw-r--r--mysql-test/suite/mariabackup/mdev-14447.result1
-rw-r--r--mysql-test/suite/mariabackup/mdev-14447.test5
-rw-r--r--mysql-test/suite/mariabackup/missing_ibd.result1
-rw-r--r--mysql-test/suite/mariabackup/mlog_index_load.result2
-rw-r--r--mysql-test/suite/mariabackup/options_check.result8
-rw-r--r--mysql-test/suite/mariabackup/options_check.test69
-rw-r--r--mysql-test/suite/mariabackup/partition_datadir.result2
-rw-r--r--mysql-test/suite/mariabackup/recreate_table_during_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/rename_during_backup.result2
-rw-r--r--mysql-test/suite/mariabackup/rename_during_mdl_lock.result2
-rw-r--r--mysql-test/suite/mariabackup/skip_innodb.result2
-rw-r--r--mysql-test/suite/mariabackup/suite.pm3
-rw-r--r--mysql-test/suite/mariabackup/system_versioning.result4
-rw-r--r--mysql-test/suite/mariabackup/undo_space_id.test2
-rw-r--r--mysql-test/suite/mariabackup/unencrypted_page_compressed.result1
-rw-r--r--mysql-test/suite/mariabackup/xb_aws_key_management.result5
-rw-r--r--mysql-test/suite/mariabackup/xb_compressed_encrypted.result2
-rw-r--r--mysql-test/suite/mariabackup/xb_file_key_management.result2
-rw-r--r--mysql-test/suite/mariabackup/xb_fulltext_encrypted.result2
-rw-r--r--mysql-test/suite/mariabackup/xb_fulltext_encrypted.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_partition.result2
-rw-r--r--mysql-test/suite/mariabackup/xb_partition.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_rocksdb.result3
-rw-r--r--mysql-test/suite/mariabackup/xb_rocksdb_datadir.result1
-rw-r--r--mysql-test/suite/mariabackup/xb_rocksdb_datadir_debug.result1
-rw-r--r--mysql-test/suite/mariabackup/xbstream.result2
-rw-r--r--mysql-test/suite/multi_source/gtid_ignore_duplicates.result8
-rw-r--r--mysql-test/suite/multi_source/gtid_ignore_duplicates.test8
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test4
-rw-r--r--mysql-test/suite/parts/r/optimizer.result4
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result56
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result16
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_innodb.result32
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_myisam.result16
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_innodb.result80
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_myisam.result32
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_maria.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_myisam.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_maria.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_myisam.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result216
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result216
-rw-r--r--mysql-test/suite/parts/r/partition_alter_instant.result34
-rw-r--r--mysql-test/suite/parts/r/partition_basic_innodb.result64
-rw-r--r--mysql-test/suite/parts/r/partition_basic_myisam.result32
-rw-r--r--mysql-test/suite/parts/r/partition_basic_symlink_myisam.result39
-rw-r--r--mysql-test/suite/parts/r/partition_engine_innodb.result11
-rw-r--r--mysql-test/suite/parts/r/partition_engine_myisam.result11
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_memory.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_memory.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc2_memory.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result1
-rw-r--r--mysql-test/suite/parts/r/partition_recover_myisam.result12
-rw-r--r--mysql-test/suite/parts/r/partition_repair_myisam.result3
-rw-r--r--mysql-test/suite/parts/r/partition_special_innodb.result8
-rw-r--r--mysql-test/suite/parts/r/rpl_partition.result12
-rw-r--r--mysql-test/suite/parts/t/partition_alter_instant.test43
-rw-r--r--mysql-test/suite/parts/t/partition_special_innodb.test10
-rw-r--r--mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf53
-rw-r--r--mysql-test/suite/perfschema/include/have_aligned_memory.inc5
-rw-r--r--mysql-test/suite/perfschema/include/sizing_auto.inc4
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_1.result2
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_2.result2
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_3.result2
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_4.result2
-rw-r--r--mysql-test/suite/perfschema/r/bad_option_5.result2
-rw-r--r--mysql-test/suite/perfschema/r/dml_handler.result2
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result4
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate.result412
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a.result344
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result268
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result272
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result196
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_h.result336
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u.result340
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result264
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result22
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result295
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result4
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result19
-rw-r--r--mysql-test/suite/perfschema/r/selects.result2
-rw-r--r--mysql-test/suite/perfschema/r/server_init.result4
-rw-r--r--mysql-test/suite/perfschema/r/setup_instruments_defaults.result2
-rw-r--r--mysql-test/suite/perfschema/r/sizing_default.result41
-rw-r--r--mysql-test/suite/perfschema/r/sizing_high.result39
-rw-r--r--mysql-test/suite/perfschema/r/sizing_low.result43
-rw-r--r--mysql-test/suite/perfschema/r/sizing_med.result25
-rw-r--r--mysql-test/suite/perfschema/r/sizing_off.result4
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_global.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_variables.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_schema.result8
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_1.test5
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_2.test5
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_3.test5
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_4.test5
-rw-r--r--mysql-test/suite/perfschema/t/bad_option_5.test5
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_auth_ed25519.test5
-rw-r--r--mysql-test/suite/perfschema/t/nesting.test2
-rw-r--r--mysql-test/suite/perfschema/t/privilege_table_io.test1
-rw-r--r--mysql-test/suite/perfschema/t/server_init.test3
-rw-r--r--mysql-test/suite/perfschema/t/sizing_default.cnf4
-rw-r--r--mysql-test/suite/perfschema/t/sizing_default.test22
-rw-r--r--mysql-test/suite/perfschema/t/sizing_high.cnf3
-rw-r--r--mysql-test/suite/perfschema/t/sizing_low.cnf3
-rw-r--r--mysql-test/suite/perfschema/t/sizing_med.cnf3
-rw-r--r--mysql-test/suite/perfschema/t/sizing_off.cnf2
-rw-r--r--mysql-test/suite/perfschema/t/stage_mdl_global.test4
-rw-r--r--mysql-test/suite/period/create_triggers.inc38
-rw-r--r--mysql-test/suite/period/engines.combinations6
-rw-r--r--mysql-test/suite/period/engines.inc3
-rw-r--r--mysql-test/suite/period/r/alter.result206
-rw-r--r--mysql-test/suite/period/r/create.result102
-rw-r--r--mysql-test/suite/period/r/delete,myisam.rdiff18
-rw-r--r--mysql-test/suite/period/r/delete.result390
-rw-r--r--mysql-test/suite/period/r/update.result309
-rw-r--r--mysql-test/suite/period/r/versioning.result90
-rw-r--r--mysql-test/suite/period/t/alter.test176
-rw-r--r--mysql-test/suite/period/t/create.test87
-rw-r--r--mysql-test/suite/period/t/delete.test227
-rw-r--r--mysql-test/suite/period/t/update.test207
-rw-r--r--mysql-test/suite/period/t/versioning.test61
-rw-r--r--mysql-test/suite/plugins/r/audit_null.result6
-rw-r--r--mysql-test/suite/plugins/r/audit_null_debug.result4
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result31
-rw-r--r--mysql-test/suite/plugins/r/cracklib_password_check.result2
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_load.result6
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_send.result7
-rw-r--r--mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result12
-rw-r--r--mysql-test/suite/plugins/r/max_password_errors_auth_socket.result12
-rw-r--r--mysql-test/suite/plugins/r/multiauth.result208
-rw-r--r--mysql-test/suite/plugins/r/pam.result82
-rw-r--r--mysql-test/suite/plugins/r/pam_cleartext.result8
-rw-r--r--mysql-test/suite/plugins/r/pam_v1.result38
-rw-r--r--mysql-test/suite/plugins/r/server_audit.result38
-rw-r--r--mysql-test/suite/plugins/r/show_all_plugins.result4
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result29
-rw-r--r--mysql-test/suite/plugins/r/thread_pool_server_audit.result24
-rw-r--r--mysql-test/suite/plugins/r/unix_socket.result2
-rw-r--r--mysql-test/suite/plugins/suite.pm11
-rw-r--r--mysql-test/suite/plugins/t/audit_null_debug.test4
-rw-r--r--mysql-test/suite/plugins/t/auth_ed25519.test13
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_load.test4
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt1
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test22
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt1
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_socket.test23
-rw-r--r--mysql-test/suite/plugins/t/multiauth.test208
-rw-r--r--mysql-test/suite/plugins/t/pam.test78
-rw-r--r--mysql-test/suite/plugins/t/pam_cleartext.test15
-rw-r--r--mysql-test/suite/plugins/t/pam_init.inc4
-rw-r--r--mysql-test/suite/plugins/t/pam_v1.test52
-rw-r--r--mysql-test/suite/plugins/t/server_audit.test4
-rw-r--r--mysql-test/suite/plugins/t/simple_password_check.test22
-rw-r--r--mysql-test/suite/plugins/t/unix_socket.test17
-rw-r--r--mysql-test/suite/roles/acl_statistics.result16
-rw-r--r--mysql-test/suite/roles/create_and_drop_role.result6
-rw-r--r--mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result3
-rw-r--r--mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test7
-rw-r--r--mysql-test/suite/roles/default_create_user_not_role.result2
-rw-r--r--mysql-test/suite/roles/flush_roles-17898.result8
-rw-r--r--mysql-test/suite/roles/flush_roles-17898.test3
-rw-r--r--mysql-test/suite/roles/grant_revoke_current.result3
-rw-r--r--mysql-test/suite/roles/grant_revoke_current.test5
-rw-r--r--mysql-test/suite/roles/grant_role_auto_create_user.result2
-rw-r--r--mysql-test/suite/roles/i_s_applicable_roles_is_default.result1
-rw-r--r--mysql-test/suite/roles/i_s_applicable_roles_is_default.test2
-rw-r--r--mysql-test/suite/roles/none_public.result12
-rw-r--r--mysql-test/suite/roles/none_public.test6
-rw-r--r--mysql-test/suite/roles/prepare_stmt_with_role.result6
-rw-r--r--mysql-test/suite/roles/rename_user.result2
-rw-r--r--mysql-test/suite/roles/role_case_sensitive-10744.result2
-rw-r--r--mysql-test/suite/roles/set_default_role_clear.result8
-rw-r--r--mysql-test/suite/roles/set_default_role_for.result13
-rw-r--r--mysql-test/suite/roles/set_default_role_for.test3
-rw-r--r--mysql-test/suite/roles/set_default_role_invalid.result8
-rw-r--r--mysql-test/suite/roles/set_default_role_new_connection.result10
-rw-r--r--mysql-test/suite/roles/set_default_role_ps-6960.result3
-rw-r--r--mysql-test/suite/roles/set_default_role_ps-6960.test7
-rw-r--r--mysql-test/suite/roles/set_role-database-recursive.result3
-rw-r--r--mysql-test/suite/roles/set_role-database-simple.result3
-rw-r--r--mysql-test/suite/roles/set_role-recursive.result3
-rw-r--r--mysql-test/suite/roles/set_role-routine-simple.result3
-rw-r--r--mysql-test/suite/roles/set_role-simple.result3
-rw-r--r--mysql-test/suite/roles/set_role-table-column-priv.result4
-rw-r--r--mysql-test/suite/roles/set_role-table-simple.result4
-rw-r--r--mysql-test/suite/roles/show_grants.result3
-rw-r--r--mysql-test/suite/roles/show_grants_replicated.result2
-rw-r--r--mysql-test/suite/rpl/disabled.def2
-rw-r--r--mysql-test/suite/rpl/include/rpl_EE_err.test2
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_dml.inc1
-rw-r--r--mysql-test/suite/rpl/include/rpl_row_001.test96
-rw-r--r--mysql-test/suite/rpl/include/rpl_row_annotate.test2
-rw-r--r--mysql-test/suite/rpl/include/rpl_row_delayed_ins.test2
-rw-r--r--mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc91
-rw-r--r--mysql-test/suite/rpl/r/parallel_backup.result40
-rw-r--r--mysql-test/suite/rpl/r/password_expiration.result28
-rw-r--r--mysql-test/suite/rpl/r/rpl_EE_err.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_drop_user.result44
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_if_not_exists.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_ddl.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_do_grant.result23
-rw-r--r--mysql-test/suite/rpl/r/rpl_drop_db.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_drop_temp_table_invalid_lex.result11
-rw-r--r--mysql-test/suite/rpl/r/rpl_grant.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_ignored.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_stop_start.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_revoke.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_table.result37
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_bug28430.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_bug30888.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result40
-rw-r--r--mysql-test/suite/rpl/r/rpl_mark_optimize_tbl_ddl.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev10863.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev12179.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_misc_functions.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result23
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql_manager_race_condition.result27
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic.result16
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_retry.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_read_only2.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_001.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_annotate_do.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_annotate_dont.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff24
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_big_table_id.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_delayed_ins.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_shutdown_await_ack.result517
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_wait_point.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result52
-rw-r--r--mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result29
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_000001.result38
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_round.result50
-rw-r--r--mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result22
-rw-r--r--mysql-test/suite/rpl/t/parallel_backup.test75
-rw-r--r--mysql-test/suite/rpl/t/password_expiration.test53
-rw-r--r--mysql-test/suite/rpl/t/rpl_create_drop_user.test18
-rw-r--r--mysql-test/suite/rpl/t/rpl_do_grant.test29
-rw-r--r--mysql-test/suite/rpl/t/rpl_drop_temp_table_invalid_lex.test41
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_ignored.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test70
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_stop_start.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_ignore_table.test17
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev10863.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev12179.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test58
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test62
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition.test67
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic.test42
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_retry.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_001.test48
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.cnf14
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.inc163
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.test214
-rw-r--r--mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf16
-rw-r--r--mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.test46
-rw-r--r--mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf16
-rw-r--r--mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.test11
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_000001.test24
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporal_round.test35
-rw-r--r--mysql-test/suite/sql_sequence/alter.result11
-rw-r--r--mysql-test/suite/sql_sequence/alter.test3
-rw-r--r--mysql-test/suite/sql_sequence/aria.result2
-rw-r--r--mysql-test/suite/sql_sequence/binlog.result1
-rw-r--r--mysql-test/suite/sql_sequence/create.result42
-rw-r--r--mysql-test/suite/sql_sequence/create.test42
-rw-r--r--mysql-test/suite/sql_sequence/gtid.result10
-rw-r--r--mysql-test/suite/sql_sequence/next.result2
-rw-r--r--mysql-test/suite/sql_sequence/next.test2
-rw-r--r--mysql-test/suite/sql_sequence/other.result6
-rw-r--r--mysql-test/suite/sql_sequence/read_only.result2
-rw-r--r--mysql-test/suite/sql_sequence/rebuild.result4
-rw-r--r--mysql-test/suite/sql_sequence/replication.result12
-rw-r--r--mysql-test/suite/sys_vars/inc/sysvars_server.inc2
-rw-r--r--mysql-test/suite/sys_vars/r/histogram_size_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/histogram_type_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_abort_loads.result3
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_fil_make_page_dirty_debug_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_method_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_instant_alter_column_allowed_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_saved_page_number_debug_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result1
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_stats_method_func.result7
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_switch_basic.result32
-rw-r--r--mysql-test/suite/sys_vars/r/secure_file_priv.result2
-rw-r--r--mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/shared_memory_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/slave_transaction_retry_errors.result10
-rw-r--r--mysql-test/suite/sys_vars/r/sql_mode_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_aria.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result8
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff296
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result100
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff320
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result112
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_wsrep.result74
-rw-r--r--mysql-test/suite/sys_vars/r/tcp_nodelay.result5
-rw-r--r--mysql-test/suite/sys_vars/r/tmp_disk_table_size_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/use_stat_tables_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_debug_basic.result26
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_load_data_splitting_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_on_basic.result50
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result5
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result57
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_instant_alter_column_allowed_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/myisam_stats_method_func.test4
-rw-r--r--mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test25
-rw-r--r--mysql-test/suite/sys_vars/t/shared_memory_basic.test20
-rw-r--r--mysql-test/suite/sys_vars/t/sql_mode_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/tcp_nodelay.test7
-rw-r--r--mysql-test/suite/sys_vars/t/thread_stack_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/tmp_disk_table_size_basic.test16
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_debug_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_on_basic.test45
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test9
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test56
-rw-r--r--mysql-test/suite/vcol/inc/vcol_select.inc2
-rw-r--r--mysql-test/suite/vcol/r/update.result4
-rw-r--r--mysql-test/suite/vcol/r/update_binlog.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_innodb.result5
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_myisam.result3
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result28
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_innodb.result16
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_myisam.result32
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode.result3
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result125
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_time.result125
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result118
-rw-r--r--mysql-test/suite/vcol/r/vcol_syntax.result8
-rw-r--r--mysql-test/suite/vcol/r/wrong_arena.result28
-rw-r--r--mysql-test/suite/vcol/t/update.test4
-rw-r--r--mysql-test/suite/vcol/t/vcol_keys_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_misc.test27
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test138
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_time.test139
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test124
-rw-r--r--mysql-test/suite/versioning/r/alter.result15
-rw-r--r--mysql-test/suite/versioning/r/commit_id.result14
-rw-r--r--mysql-test/suite/versioning/r/create.result14
-rw-r--r--mysql-test/suite/versioning/r/cte.result2
-rw-r--r--mysql-test/suite/versioning/r/debug.result2
-rw-r--r--mysql-test/suite/versioning/r/delete_history.result37
-rw-r--r--mysql-test/suite/versioning/r/foreign.result8
-rw-r--r--mysql-test/suite/versioning/r/insert.result2
-rw-r--r--mysql-test/suite/versioning/r/load_data.result2
-rw-r--r--mysql-test/suite/versioning/r/online.result42
-rw-r--r--mysql-test/suite/versioning/r/partition.result65
-rw-r--r--mysql-test/suite/versioning/r/select,trx_id.rdiff11
-rw-r--r--mysql-test/suite/versioning/r/select.result42
-rw-r--r--mysql-test/suite/versioning/r/select2,trx_id.rdiff16
-rw-r--r--mysql-test/suite/versioning/r/select2.result6
-rw-r--r--mysql-test/suite/versioning/r/sysvars.result25
-rw-r--r--mysql-test/suite/versioning/r/trx_id.result54
-rw-r--r--mysql-test/suite/versioning/r/update.result19
-rw-r--r--mysql-test/suite/versioning/t/alter.test9
-rw-r--r--mysql-test/suite/versioning/t/create.test2
-rw-r--r--mysql-test/suite/versioning/t/debug.test2
-rw-r--r--mysql-test/suite/versioning/t/delete_history.test42
-rw-r--r--mysql-test/suite/versioning/t/foreign.test6
-rw-r--r--mysql-test/suite/versioning/t/online.test61
-rw-r--r--mysql-test/suite/versioning/t/partition.test40
-rw-r--r--mysql-test/suite/versioning/t/select.test26
-rw-r--r--mysql-test/suite/versioning/t/sysvars.test22
-rw-r--r--mysql-test/suite/versioning/t/trx_id.test35
-rw-r--r--mysql-test/suite/versioning/t/update.test28
-rw-r--r--mysql-test/suite/wsrep/common.pm117
-rw-r--r--mysql-test/suite/wsrep/disabled.def3
-rw-r--r--mysql-test/suite/wsrep/include/check_galera_version.inc12
-rw-r--r--mysql-test/suite/wsrep/my.cnf2
-rw-r--r--mysql-test/suite/wsrep/r/MDEV-20625.result5
-rw-r--r--mysql-test/suite/wsrep/r/MDEV-22443.result3
-rw-r--r--mysql-test/suite/wsrep/r/MDEV-23081.result24
-rw-r--r--mysql-test/suite/wsrep/r/MDEV-23092.result13
-rw-r--r--mysql-test/suite/wsrep/r/MDEV-23466.result3
-rw-r--r--mysql-test/suite/wsrep/r/mdev_22681.result3
-rw-r--r--mysql-test/suite/wsrep/r/mdev_7798.result1
-rw-r--r--mysql-test/suite/wsrep/r/trans.result1
-rw-r--r--mysql-test/suite/wsrep/r/variables.result243
-rw-r--r--mysql-test/suite/wsrep/r/variables_debug.result140
-rw-r--r--mysql-test/suite/wsrep/r/wsrep-recover-v25,binlogon.rdiff32
-rw-r--r--mysql-test/suite/wsrep/r/wsrep-recover-v25.result27
-rw-r--r--mysql-test/suite/wsrep/r/wsrep-recover.result64
-rw-r--r--mysql-test/suite/wsrep/r/wsrep_on_basic.result50
-rw-r--r--mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result44
-rw-r--r--mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result39
-rw-r--r--mysql-test/suite/wsrep/suite.pm13
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-20625.cnf8
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-20625.test10
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-22443.cnf8
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-22443.test12
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-23081.cnf9
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-23081.combinations4
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-23081.test57
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-23092.cnf8
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-23092.test22
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-23466.cnf8
-rw-r--r--mysql-test/suite/wsrep/t/MDEV-23466.test10
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.cnf8
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.opt2
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.test1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_10186.test1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_22681.cnf10
-rw-r--r--mysql-test/suite/wsrep/t/mdev_22681.test15
-rw-r--r--mysql-test/suite/wsrep/t/mdev_6832.cnf7
-rw-r--r--mysql-test/suite/wsrep/t/mdev_6832.opt1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_6832.test4
-rw-r--r--mysql-test/suite/wsrep/t/mdev_7798.cnf7
-rw-r--r--mysql-test/suite/wsrep/t/mdev_7798.opt1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_7798.test1
-rw-r--r--mysql-test/suite/wsrep/t/plugin.opt1
-rw-r--r--mysql-test/suite/wsrep/t/plugin.test1
-rw-r--r--mysql-test/suite/wsrep/t/trans.opt1
-rw-r--r--mysql-test/suite/wsrep/t/trans.test1
-rw-r--r--mysql-test/suite/wsrep/t/variables.test139
-rw-r--r--mysql-test/suite/wsrep/t/variables_debug.cnf7
-rw-r--r--mysql-test/suite/wsrep/t/variables_debug.test28
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover-v25.test64
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover.cnf9
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover.combinations4
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover.test194
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_on_basic.opt1
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_on_basic.test47
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf12
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test38
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf12
-rw-r--r--mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test30
-rw-r--r--mysql-test/unstable-tests188
-rw-r--r--mysql-test/valgrind.supp2
-rw-r--r--mysys/CMakeLists.txt15
-rw-r--r--mysys/errors.c4
-rw-r--r--mysys/lf_alloc-pin.c1
-rw-r--r--mysys/lf_hash.c1
-rw-r--r--mysys/ma_dyncol.c6
-rw-r--r--mysys/mf_cache.c2
-rw-r--r--mysys/mf_iocache.c22
-rw-r--r--mysys/mf_keycache.c2
-rw-r--r--mysys/mf_tempfile.c35
-rw-r--r--mysys/my_alloc.c15
-rw-r--r--mysys/my_atomic_writes.c2
-rw-r--r--mysys/my_bitmap.c11
-rw-r--r--mysys/my_chsize.c2
-rw-r--r--mysys/my_copy.c4
-rw-r--r--mysys/my_cpu.c21
-rw-r--r--mysys/my_delete.c6
-rw-r--r--mysys/my_fopen.c11
-rw-r--r--mysys/my_fstream.c8
-rw-r--r--mysys/my_getopt.c9
-rw-r--r--mysys/my_getwd.c4
-rw-r--r--mysys/my_lib.c6
-rw-r--r--mysys/my_lock.c4
-rw-r--r--mysys/my_lockmem.c2
-rw-r--r--mysys/my_malloc.c5
-rw-r--r--mysys/my_mess.c2
-rw-r--r--mysys/my_mkdir.c2
-rw-r--r--mysys/my_once.c2
-rw-r--r--mysys/my_open.c9
-rw-r--r--mysys/my_pread.c6
-rw-r--r--mysys/my_rdtsc.c223
-rw-r--r--mysys/my_read.c4
-rw-r--r--mysys/my_redel.c6
-rw-r--r--mysys/my_rename.c2
-rw-r--r--mysys/my_rnd.c13
-rw-r--r--mysys/my_setuser.c8
-rw-r--r--mysys/my_static.c2
-rw-r--r--mysys/my_sync.c2
-rw-r--r--mysys/my_timer_cycles.il39
-rw-r--r--mysys/my_win_popen.cc170
-rw-r--r--mysys/my_windac.c202
-rw-r--r--mysys/my_write.c2
-rw-r--r--mysys/thr_alarm.c6
-rw-r--r--mysys/thr_lock.c127
-rw-r--r--mysys/waiting_threads.c1
-rw-r--r--mysys_ssl/CMakeLists.txt1
-rw-r--r--mysys_ssl/my_crypt.cc47
-rw-r--r--mysys_ssl/my_md5.cc17
-rw-r--r--mysys_ssl/my_sha.inl41
-rw-r--r--mysys_ssl/yassl.cc191
-rw-r--r--plugin/auth_ed25519/CMakeLists.txt4
-rw-r--r--plugin/auth_ed25519/server_ed25519.c56
-rw-r--r--plugin/auth_examples/dialog_examples.c6
-rw-r--r--plugin/auth_examples/qa_auth_interface.c3
-rw-r--r--plugin/auth_examples/qa_auth_server.c3
-rw-r--r--plugin/auth_examples/test_plugin.c6
-rw-r--r--plugin/auth_gssapi/CMakeLists.txt2
-rw-r--r--plugin/auth_gssapi/gssapi_server.cc20
-rw-r--r--plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.result34
-rw-r--r--plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.test36
-rw-r--r--plugin/auth_gssapi/server_plugin.cc36
-rw-r--r--plugin/auth_gssapi/server_plugin.h2
-rw-r--r--plugin/auth_gssapi/sspi_server.cc17
-rw-r--r--plugin/auth_pam/CMakeLists.txt18
-rw-r--r--plugin/auth_pam/auth_pam.c340
-rw-r--r--plugin/auth_pam/auth_pam_base.c179
-rw-r--r--plugin/auth_pam/auth_pam_common.c56
-rw-r--r--plugin/auth_pam/auth_pam_tool.c120
-rw-r--r--plugin/auth_pam/auth_pam_tool.h81
-rw-r--r--plugin/auth_pam/auth_pam_v1.c86
-rw-r--r--plugin/auth_pam/testing/CMakeLists.txt15
-rw-r--r--plugin/auth_pam/testing/mariadb_mtr.conf4
-rw-r--r--plugin/auth_pam/testing/pam_mariadb_mtr.c52
-rw-r--r--plugin/auth_socket/CMakeLists.txt2
-rw-r--r--plugin/auth_socket/auth_socket.c3
-rw-r--r--plugin/aws_key_management/CMakeLists.txt181
-rw-r--r--plugin/aws_key_management/aws_key_management_plugin.cc34
-rw-r--r--plugin/cracklib_password_check/cracklib_password_check.c3
-rw-r--r--plugin/disks/information_schema_disks.cc2
-rw-r--r--plugin/feedback/sender_thread.cc14
-rw-r--r--plugin/file_key_management/CMakeLists.txt2
-rw-r--r--plugin/file_key_management/parser.cc8
-rw-r--r--plugin/handler_socket/handlersocket/database.cpp10
-rw-r--r--plugin/locale_info/CMakeLists.txt3
-rw-r--r--plugin/metadata_lock_info/metadata_lock_info.cc29
-rw-r--r--plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result3
-rw-r--r--plugin/qc_info/CMakeLists.txt3
-rw-r--r--plugin/query_response_time/query_response_time.cc39
-rw-r--r--plugin/server_audit/server_audit.c11
-rw-r--r--plugin/simple_password_check/simple_password_check.c4
-rw-r--r--plugin/wsrep_info/mysql-test/wsrep_info/my.cnf5
-rw-r--r--plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result10
-rw-r--r--plugin/wsrep_info/mysql-test/wsrep_info/suite.pm12
-rw-r--r--plugin/wsrep_info/plugin.cc87
-rw-r--r--scripts/CMakeLists.txt10
-rw-r--r--scripts/comp_sql.c13
-rw-r--r--scripts/fill_help_tables.sql2942
-rw-r--r--scripts/maria_add_gis_sp.sql.in4
-rw-r--r--scripts/mysql_config.pl.in2
-rw-r--r--scripts/mysql_install_db.sh79
-rw-r--r--scripts/mysql_secure_installation.pl.in390
-rw-r--r--scripts/mysql_secure_installation.sh65
-rw-r--r--scripts/mysql_system_tables.sql143
-rw-r--r--scripts/mysql_system_tables_data.sql29
-rw-r--r--scripts/mysql_system_tables_fix.sql252
-rw-r--r--scripts/mysql_test_db.sql4
-rw-r--r--scripts/mysqld_safe.sh17
-rw-r--r--sql-common/client.c329
-rw-r--r--sql-common/my_time.c778
-rw-r--r--sql/CMakeLists.txt74
-rw-r--r--sql/MSG00001.binbin184 -> 36 bytes
-rw-r--r--sql/backup.cc429
-rw-r--r--sql/backup.h34
-rw-r--r--sql/compat56.cc21
-rw-r--r--sql/compat56.h13
-rw-r--r--sql/datadict.cc29
-rw-r--r--sql/datadict.h3
-rw-r--r--sql/derived_handler.cc125
-rw-r--r--sql/derived_handler.h85
-rw-r--r--sql/encryption.cc3
-rw-r--r--sql/event_data_objects.cc41
-rw-r--r--sql/event_data_objects.h6
-rw-r--r--sql/event_parse_data.cc18
-rw-r--r--sql/event_scheduler.cc24
-rw-r--r--sql/events.cc61
-rw-r--r--sql/field.cc2207
-rw-r--r--sql/field.h824
-rw-r--r--sql/field_conv.cc37
-rw-r--r--sql/filesort.cc155
-rw-r--r--sql/filesort.h3
-rw-r--r--sql/gcalc_tools.cc2
-rw-r--r--sql/gcalc_tools.h22
-rw-r--r--sql/ha_partition.cc270
-rw-r--r--sql/ha_partition.h391
-rw-r--r--sql/ha_sequence.cc22
-rw-r--r--sql/ha_sequence.h2
-rw-r--r--sql/handle_connections_win.cc613
-rw-r--r--sql/handle_connections_win.h20
-rw-r--r--sql/handler.cc1255
-rw-r--r--sql/handler.h440
-rw-r--r--sql/init.cc4
-rw-r--r--sql/init.h1
-rw-r--r--sql/innodb_priv.h4
-rw-r--r--sql/item.cc1645
-rw-r--r--sql/item.h1869
-rw-r--r--sql/item_buff.cc29
-rw-r--r--sql/item_cmpfunc.cc911
-rw-r--r--sql/item_cmpfunc.h160
-rw-r--r--sql/item_create.cc214
-rw-r--r--sql/item_create.h15
-rw-r--r--sql/item_func.cc826
-rw-r--r--sql/item_func.h566
-rw-r--r--sql/item_geofunc.cc2
-rw-r--r--sql/item_geofunc.h2
-rw-r--r--sql/item_inetfunc.cc627
-rw-r--r--sql/item_inetfunc.h60
-rw-r--r--sql/item_jsonfunc.cc15
-rw-r--r--sql/item_row.cc4
-rw-r--r--sql/item_row.h30
-rw-r--r--sql/item_strfunc.cc257
-rw-r--r--sql/item_strfunc.h97
-rw-r--r--sql/item_subselect.cc155
-rw-r--r--sql/item_subselect.h30
-rw-r--r--sql/item_sum.cc322
-rw-r--r--sql/item_sum.h122
-rw-r--r--sql/item_timefunc.cc977
-rw-r--r--sql/item_timefunc.h708
-rw-r--r--sql/item_vers.cc9
-rw-r--r--sql/item_vers.h2
-rw-r--r--sql/item_windowfunc.cc21
-rw-r--r--sql/item_windowfunc.h39
-rw-r--r--sql/item_xmlfunc.cc129
-rw-r--r--sql/lex.h5
-rw-r--r--sql/lex_string.h4
-rw-r--r--sql/lock.cc204
-rw-r--r--sql/log.cc509
-rw-r--r--sql/log.h45
-rw-r--r--sql/log_event.cc270
-rw-r--r--sql/log_event.h53
-rw-r--r--sql/mdl.cc662
-rw-r--r--sql/mdl.h129
-rw-r--r--sql/mem_root_array.h3
-rw-r--r--sql/message.h29
-rw-r--r--sql/message.mc3
-rw-r--r--sql/message.rc2
-rw-r--r--sql/multi_range_read.cc131
-rw-r--r--sql/multi_range_read.h16
-rw-r--r--sql/my_decimal.cc52
-rw-r--r--sql/my_decimal.h148
-rw-r--r--sql/my_json_writer.cc157
-rw-r--r--sql/my_json_writer.h577
-rw-r--r--sql/mysql_install_db.cc43
-rw-r--r--sql/mysql_upgrade_service.cc4
-rw-r--r--sql/mysqld.cc2370
-rw-r--r--sql/mysqld.h74
-rw-r--r--sql/opt_index_cond_pushdown.cc15
-rw-r--r--sql/opt_range.cc1679
-rw-r--r--sql/opt_range.h15
-rw-r--r--sql/opt_range_mrr.cc22
-rw-r--r--sql/opt_split.cc2
-rw-r--r--sql/opt_subselect.cc1302
-rw-r--r--sql/opt_subselect.h8
-rw-r--r--sql/opt_sum.cc2
-rw-r--r--sql/opt_table_elimination.cc37
-rw-r--r--sql/opt_trace.cc745
-rw-r--r--sql/opt_trace.h210
-rw-r--r--sql/opt_trace_context.h135
-rw-r--r--sql/partition_element.h1
-rw-r--r--sql/partition_info.h2
-rw-r--r--sql/procedure.h18
-rw-r--r--sql/protocol.cc333
-rw-r--r--sql/protocol.h39
-rw-r--r--sql/repl_failsafe.cc158
-rw-r--r--sql/repl_failsafe.h7
-rw-r--r--sql/rowid_filter.cc666
-rw-r--r--sql/rowid_filter.h470
-rw-r--r--sql/rpl_gtid.cc443
-rw-r--r--sql/rpl_gtid.h19
-rw-r--r--sql/rpl_mi.cc10
-rw-r--r--sql/rpl_mi.h6
-rw-r--r--sql/rpl_parallel.cc41
-rw-r--r--sql/rpl_record.cc23
-rw-r--r--sql/rpl_rli.cc134
-rw-r--r--sql/rpl_rli.h28
-rw-r--r--sql/select_handler.cc173
-rw-r--r--sql/select_handler.h72
-rw-r--r--sql/semisync_master.cc65
-rw-r--r--sql/semisync_master.h39
-rw-r--r--sql/semisync_master_ack_receiver.cc3
-rw-r--r--sql/semisync_slave.cc40
-rw-r--r--sql/semisync_slave.h1
-rw-r--r--sql/service_wsrep.cc391
-rw-r--r--sql/session_tracker.cc7
-rw-r--r--sql/set_var.cc2
-rw-r--r--sql/set_var.h9
-rw-r--r--sql/share/CMakeLists.txt30
-rw-r--r--sql/share/errmsg-utf8.txt2926
-rw-r--r--sql/signal_handler.cc5
-rw-r--r--sql/slave.cc287
-rw-r--r--sql/slave.h2
-rw-r--r--sql/sp.cc9
-rw-r--r--sql/sp.h3
-rw-r--r--sql/sp_head.cc161
-rw-r--r--sql/sp_head.h50
-rw-r--r--sql/sp_pcontext.h1
-rw-r--r--sql/sp_rcontext.cc27
-rw-r--r--sql/sql_acl.cc4396
-rw-r--r--sql/sql_acl_getsort.ic205
-rw-r--r--sql/sql_admin.cc47
-rw-r--r--sql/sql_alloc.h3
-rw-r--r--sql/sql_alter.cc40
-rw-r--r--sql/sql_analyse.cc103
-rw-r--r--sql/sql_analyze_stmt.h79
-rw-r--r--sql/sql_array.h13
-rw-r--r--sql/sql_audit.h2
-rw-r--r--sql/sql_base.cc820
-rw-r--r--sql/sql_base.h36
-rw-r--r--sql/sql_basic_types.h310
-rw-r--r--sql/sql_binlog.cc6
-rw-r--r--sql/sql_bitmap.h425
-rw-r--r--sql/sql_builtin.cc.in6
-rw-r--r--sql/sql_cache.cc18
-rw-r--r--sql/sql_class.cc790
-rw-r--r--sql/sql_class.h666
-rw-r--r--sql/sql_cmd.h1
-rw-r--r--sql/sql_connect.cc54
-rw-r--r--sql/sql_connect.h3
-rw-r--r--sql/sql_const.h6
-rw-r--r--sql/sql_cte.cc48
-rw-r--r--sql/sql_cte.h29
-rw-r--r--sql/sql_db.cc2
-rw-r--r--sql/sql_delete.cc167
-rw-r--r--sql/sql_derived.cc451
-rw-r--r--sql/sql_derived.h6
-rw-r--r--sql/sql_do.cc2
-rw-r--r--sql/sql_error.cc2
-rw-r--r--sql/sql_error.h59
-rw-r--r--sql/sql_explain.cc171
-rw-r--r--sql/sql_explain.h46
-rw-r--r--sql/sql_handler.cc14
-rw-r--r--sql/sql_handler.h1
-rw-r--r--sql/sql_help.cc11
-rw-r--r--sql/sql_insert.cc343
-rw-r--r--sql/sql_join_cache.cc2
-rw-r--r--sql/sql_lex.cc2614
-rw-r--r--sql/sql_lex.h775
-rw-r--r--sql/sql_list.h60
-rw-r--r--sql/sql_load.cc124
-rw-r--r--sql/sql_manager.cc1
-rw-r--r--sql/sql_mode.cc2
-rw-r--r--sql/sql_mode.h2
-rw-r--r--sql/sql_parse.cc1274
-rw-r--r--sql/sql_parse.h3
-rw-r--r--sql/sql_partition.cc69
-rw-r--r--sql/sql_partition_admin.cc5
-rw-r--r--sql/sql_plugin.cc148
-rw-r--r--sql/sql_plugin.h5
-rw-r--r--sql/sql_plugin_services.inl67
-rw-r--r--sql/sql_prepare.cc222
-rw-r--r--sql/sql_priv.h27
-rw-r--r--sql/sql_profile.cc4
-rw-r--r--sql/sql_reload.cc86
-rw-r--r--sql/sql_repl.cc360
-rw-r--r--sql/sql_repl.h11
-rw-r--r--sql/sql_select.cc2631
-rw-r--r--sql/sql_select.h188
-rw-r--r--sql/sql_sequence.cc31
-rw-r--r--sql/sql_sequence.h4
-rw-r--r--sql/sql_show.cc706
-rw-r--r--sql/sql_signal.cc2
-rw-r--r--sql/sql_sort.h1
-rw-r--r--sql/sql_statistics.cc305
-rw-r--r--sql/sql_statistics.h27
-rw-r--r--sql/sql_string.cc220
-rw-r--r--sql/sql_string.h975
-rw-r--r--sql/sql_table.cc1387
-rw-r--r--sql/sql_table.h6
-rw-r--r--sql/sql_test.cc39
-rw-r--r--sql/sql_test.h2
-rw-r--r--sql/sql_time.cc378
-rw-r--r--sql/sql_time.h120
-rw-r--r--sql/sql_trigger.cc67
-rw-r--r--sql/sql_truncate.cc72
-rw-r--r--sql/sql_tvc.cc19
-rw-r--r--sql/sql_type.cc3179
-rw-r--r--sql/sql_type.h3441
-rw-r--r--sql/sql_type_int.h50
-rw-r--r--sql/sql_type_json.cc55
-rw-r--r--sql/sql_type_json.h38
-rw-r--r--sql/sql_udf.cc3
-rw-r--r--sql/sql_udf.h15
-rw-r--r--sql/sql_union.cc67
-rw-r--r--sql/sql_update.cc242
-rw-r--r--sql/sql_view.cc66
-rw-r--r--sql/sql_yacc.yy3288
-rw-r--r--sql/sql_yacc_ora.yy3201
-rw-r--r--sql/strfunc.cc16
-rw-r--r--sql/structs.h91
-rw-r--r--sql/sys_vars.cc309
-rw-r--r--sql/sys_vars.inl8
-rw-r--r--sql/table.cc1591
-rw-r--r--sql/table.h223
-rw-r--r--sql/table_cache.cc70
-rw-r--r--sql/table_cache.h5
-rw-r--r--sql/temporary_tables.cc53
-rw-r--r--sql/threadpool.h9
-rw-r--r--sql/threadpool_common.cc21
-rw-r--r--sql/threadpool_generic.cc64
-rw-r--r--sql/threadpool_win.cc98
-rw-r--r--sql/transaction.cc402
-rw-r--r--sql/transaction.h8
-rw-r--r--sql/tztime.cc97
-rw-r--r--sql/udf_example.c139
-rw-r--r--sql/udf_example.def7
-rw-r--r--sql/unireg.cc279
-rw-r--r--sql/unireg.h29
-rw-r--r--sql/vers_string.h8
-rw-r--r--sql/vers_utils.h39
-rw-r--r--sql/wsrep_applier.cc320
-rw-r--r--sql/wsrep_applier.h67
-rw-r--r--sql/wsrep_binlog.cc419
-rw-r--r--sql/wsrep_binlog.h61
-rw-r--r--sql/wsrep_check_opts.cc7
-rw-r--r--sql/wsrep_client_service.cc369
-rw-r--r--sql/wsrep_client_service.h74
-rw-r--r--sql/wsrep_client_state.h47
-rw-r--r--sql/wsrep_condition_variable.h54
-rw-r--r--sql/wsrep_dummy.cc138
-rw-r--r--sql/wsrep_high_priority_service.cc735
-rw-r--r--sql/wsrep_high_priority_service.h135
-rw-r--r--sql/wsrep_hton.cc675
-rw-r--r--sql/wsrep_mutex.h50
-rw-r--r--sql/wsrep_mysqld.cc3107
-rw-r--r--sql/wsrep_mysqld.h426
-rw-r--r--sql/wsrep_notify.cc71
-rw-r--r--sql/wsrep_on.h63
-rw-r--r--sql/wsrep_plugin.cc53
-rw-r--r--sql/wsrep_priv.h28
-rw-r--r--sql/wsrep_schema.cc1466
-rw-r--r--sql/wsrep_schema.h144
-rw-r--r--sql/wsrep_server_service.cc399
-rw-r--r--sql/wsrep_server_service.h101
-rw-r--r--sql/wsrep_server_state.cc85
-rw-r--r--sql/wsrep_server_state.h74
-rw-r--r--sql/wsrep_sst.cc813
-rw-r--r--sql/wsrep_sst.h30
-rw-r--r--sql/wsrep_storage_service.cc206
-rw-r--r--sql/wsrep_storage_service.h49
-rw-r--r--sql/wsrep_thd.cc1052
-rw-r--r--sql/wsrep_thd.h292
-rw-r--r--sql/wsrep_trans_observer.h567
-rw-r--r--sql/wsrep_types.h29
-rw-r--r--sql/wsrep_utils.cc108
-rw-r--r--sql/wsrep_utils.h55
-rw-r--r--sql/wsrep_var.cc654
-rw-r--r--sql/wsrep_var.h14
-rw-r--r--sql/wsrep_xid.cc90
-rw-r--r--sql/wsrep_xid.h12
-rw-r--r--sql/xa.cc877
-rw-r--r--sql/xa.h44
-rw-r--r--storage/archive/azio.c5
-rw-r--r--storage/archive/ha_archive.cc45
-rw-r--r--storage/archive/ha_archive.h25
-rw-r--r--storage/blackhole/ha_blackhole.cc2
-rw-r--r--storage/blackhole/ha_blackhole.h4
-rw-r--r--storage/cassandra/ha_cassandra.cc2
-rw-r--r--storage/cassandra/ha_cassandra.h2
-rw-r--r--storage/connect/colblk.h2
-rw-r--r--storage/connect/connect.cc17
-rw-r--r--storage/connect/filamap.cpp3
-rw-r--r--storage/connect/filamdbf.cpp3
-rw-r--r--storage/connect/filamfix.cpp2
-rw-r--r--storage/connect/filamgz.cpp7
-rw-r--r--storage/connect/filamtxt.cpp3
-rw-r--r--storage/connect/filamvct.cpp8
-rw-r--r--storage/connect/filter.cpp6
-rw-r--r--storage/connect/fmdlex.c14
-rw-r--r--storage/connect/ha_connect.cc109
-rw-r--r--storage/connect/ha_connect.h6
-rw-r--r--storage/connect/inihandl.cpp5
-rw-r--r--storage/connect/json.cpp2
-rw-r--r--storage/connect/jsonudf.cpp32
-rw-r--r--storage/connect/libdoc.cpp66
-rw-r--r--storage/connect/maputil.cpp2
-rw-r--r--storage/connect/myconn.cpp2
-rw-r--r--storage/connect/mysql-test/connect/r/general.result14
-rw-r--r--storage/connect/mysql-test/connect/r/mysql_index.result319
-rw-r--r--storage/connect/mysql-test/connect/r/part_file.result9
-rw-r--r--storage/connect/mysql-test/connect/r/xml2_mult.result2
-rw-r--r--storage/connect/mysql-test/connect/r/xml_mult.result2
-rw-r--r--storage/connect/mysql-test/connect/t/general.test17
-rw-r--r--storage/connect/mysql-test/connect/t/mysql_index.test16
-rw-r--r--storage/connect/mysql-test/connect/t/part_file.test4
-rw-r--r--storage/connect/myutil.cpp4
-rw-r--r--storage/connect/plgdbutl.cpp2
-rw-r--r--storage/connect/plugutil.cpp36
-rw-r--r--storage/connect/reldef.cpp4
-rw-r--r--storage/connect/tabdos.cpp28
-rw-r--r--storage/connect/tabext.cpp6
-rw-r--r--storage/connect/tabfmt.cpp3
-rw-r--r--storage/connect/tabjson.cpp33
-rw-r--r--storage/connect/tabmul.cpp10
-rw-r--r--storage/connect/tabmysql.cpp5
-rw-r--r--storage/connect/taboccur.cpp6
-rw-r--r--storage/connect/tabpivot.cpp9
-rw-r--r--storage/connect/tabutil.cpp2
-rw-r--r--storage/connect/tabxcl.cpp3
-rw-r--r--storage/connect/tabxml.cpp26
-rw-r--r--storage/connect/user_connect.h2
-rw-r--r--storage/connect/valblk.cpp2
-rw-r--r--storage/connect/value.cpp3
-rw-r--r--storage/connect/xindex.cpp7
-rw-r--r--storage/connect/zip.c16
-rw-r--r--storage/csv/ha_tina.cc34
-rw-r--r--storage/csv/ha_tina.h4
-rw-r--r--storage/example/ha_example.cc2
-rw-r--r--storage/example/ha_example.h2
-rw-r--r--storage/federated/ha_federated.cc2
-rw-r--r--storage/federated/ha_federated.h16
-rw-r--r--storage/federatedx/TODO30
-rw-r--r--storage/federatedx/federatedx_pushdown.cc304
-rw-r--r--storage/federatedx/federatedx_pushdown.h63
-rw-r--r--storage/federatedx/ha_federatedx.cc27
-rw-r--r--storage/federatedx/ha_federatedx.h28
-rw-r--r--storage/heap/ha_heap.cc2
-rw-r--r--storage/heap/ha_heap.h11
-rw-r--r--storage/innobase/CMakeLists.txt4
-rw-r--r--storage/innobase/btr/btr0btr.cc567
-rw-r--r--storage/innobase/btr/btr0bulk.cc27
-rw-r--r--storage/innobase/btr/btr0cur.cc754
-rw-r--r--storage/innobase/btr/btr0defragment.cc33
-rw-r--r--storage/innobase/btr/btr0pcur.cc29
-rw-r--r--storage/innobase/btr/btr0scrub.cc24
-rw-r--r--storage/innobase/btr/btr0sea.cc45
-rw-r--r--storage/innobase/buf/buf0buf.cc744
-rw-r--r--storage/innobase/buf/buf0checksum.cc36
-rw-r--r--storage/innobase/buf/buf0dblwr.cc162
-rw-r--r--storage/innobase/buf/buf0dump.cc12
-rw-r--r--storage/innobase/buf/buf0flu.cc269
-rw-r--r--storage/innobase/buf/buf0lru.cc51
-rw-r--r--storage/innobase/buf/buf0rea.cc112
-rw-r--r--storage/innobase/data/data0data.cc69
-rw-r--r--storage/innobase/data/data0type.cc70
-rw-r--r--storage/innobase/dict/dict0boot.cc80
-rw-r--r--storage/innobase/dict/dict0crea.cc245
-rw-r--r--storage/innobase/dict/dict0defrag_bg.cc24
-rw-r--r--storage/innobase/dict/dict0dict.cc856
-rw-r--r--storage/innobase/dict/dict0load.cc100
-rw-r--r--storage/innobase/dict/dict0mem.cc425
-rw-r--r--storage/innobase/dict/dict0stats.cc215
-rw-r--r--storage/innobase/dict/dict0stats_bg.cc33
-rw-r--r--storage/innobase/fil/fil0crypt.cc411
-rw-r--r--storage/innobase/fil/fil0fil.cc816
-rw-r--r--storage/innobase/fil/fil0pagecompress.cc529
-rw-r--r--storage/innobase/fsp/fsp0file.cc77
-rw-r--r--storage/innobase/fsp/fsp0fsp.cc611
-rw-r--r--storage/innobase/fsp/fsp0space.cc14
-rw-r--r--storage/innobase/fsp/fsp0sysspace.cc4
-rw-r--r--storage/innobase/fts/fts0config.cc4
-rw-r--r--storage/innobase/fts/fts0fts.cc190
-rw-r--r--storage/innobase/fts/fts0opt.cc31
-rw-r--r--storage/innobase/fts/fts0que.cc8
-rw-r--r--storage/innobase/fts/fts0sql.cc22
-rw-r--r--storage/innobase/fut/fut0lst.cc68
-rw-r--r--storage/innobase/gis/gis0rtree.cc10
-rw-r--r--storage/innobase/gis/gis0sea.cc44
-rw-r--r--storage/innobase/ha/ha0ha.cc20
-rw-r--r--storage/innobase/handler/ha_innodb.cc1576
-rw-r--r--storage/innobase/handler/ha_innodb.h259
-rw-r--r--storage/innobase/handler/handler0alter.cc3484
-rw-r--r--storage/innobase/handler/i_s.cc166
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.cc384
-rw-r--r--storage/innobase/include/btr0btr.h93
-rw-r--r--storage/innobase/include/btr0btr.inl7
-rw-r--r--storage/innobase/include/btr0bulk.h6
-rw-r--r--storage/innobase/include/btr0cur.h18
-rw-r--r--storage/innobase/include/btr0defragment.h6
-rw-r--r--storage/innobase/include/btr0types.h34
-rw-r--r--storage/innobase/include/buf0buddy.h5
-rw-r--r--storage/innobase/include/buf0buddy.inl10
-rw-r--r--storage/innobase/include/buf0buf.h265
-rw-r--r--storage/innobase/include/buf0buf.inl81
-rw-r--r--storage/innobase/include/buf0checksum.h15
-rw-r--r--storage/innobase/include/buf0flu.h29
-rw-r--r--storage/innobase/include/buf0flu.inl79
-rw-r--r--storage/innobase/include/buf0rea.h37
-rw-r--r--storage/innobase/include/buf0types.h17
-rw-r--r--storage/innobase/include/data0data.h28
-rw-r--r--storage/innobase/include/data0type.h115
-rw-r--r--storage/innobase/include/data0type.inl12
-rw-r--r--storage/innobase/include/db0err.h2
-rw-r--r--storage/innobase/include/dict0boot.h14
-rw-r--r--storage/innobase/include/dict0boot.inl8
-rw-r--r--storage/innobase/include/dict0crea.h29
-rw-r--r--storage/innobase/include/dict0dict.h415
-rw-r--r--storage/innobase/include/dict0dict.inl240
-rw-r--r--storage/innobase/include/dict0load.h2
-rw-r--r--storage/innobase/include/dict0mem.h544
-rw-r--r--storage/innobase/include/dict0priv.h12
-rw-r--r--storage/innobase/include/dict0priv.inl41
-rw-r--r--storage/innobase/include/dict0stats.h13
-rw-r--r--storage/innobase/include/dict0stats.inl6
-rw-r--r--storage/innobase/include/dict0stats_bg.h4
-rw-r--r--storage/innobase/include/dict0types.h1
-rw-r--r--storage/innobase/include/fil0crypt.h61
-rw-r--r--storage/innobase/include/fil0fil.h539
-rw-r--r--storage/innobase/include/fil0fil.inl42
-rw-r--r--storage/innobase/include/fil0pagecompress.h18
-rw-r--r--storage/innobase/include/fsp0file.h8
-rw-r--r--storage/innobase/include/fsp0fsp.h128
-rw-r--r--storage/innobase/include/fsp0fsp.inl74
-rw-r--r--storage/innobase/include/fsp0pagecompress.h11
-rw-r--r--storage/innobase/include/fsp0space.h2
-rw-r--r--storage/innobase/include/fsp0sysspace.h2
-rw-r--r--storage/innobase/include/fsp0types.h129
-rw-r--r--storage/innobase/include/fts0fts.h36
-rw-r--r--storage/innobase/include/fts0priv.h4
-rw-r--r--storage/innobase/include/fut0fut.h29
-rw-r--r--storage/innobase/include/fut0fut.inl68
-rw-r--r--storage/innobase/include/fut0lst.h62
-rw-r--r--storage/innobase/include/fut0lst.inl34
-rw-r--r--storage/innobase/include/gis0rtree.h19
-rw-r--r--storage/innobase/include/gis0rtree.inl25
-rw-r--r--storage/innobase/include/gis0type.h15
-rw-r--r--storage/innobase/include/ha_prototypes.h21
-rw-r--r--storage/innobase/include/ib0mutex.h130
-rw-r--r--storage/innobase/include/ibuf0ibuf.h93
-rw-r--r--storage/innobase/include/ibuf0ibuf.inl56
-rw-r--r--storage/innobase/include/log0crypt.h19
-rw-r--r--storage/innobase/include/log0log.h96
-rw-r--r--storage/innobase/include/log0log.inl10
-rw-r--r--storage/innobase/include/log0recv.h67
-rw-r--r--storage/innobase/include/mach0data.h16
-rw-r--r--storage/innobase/include/mach0data.inl27
-rw-r--r--storage/innobase/include/mtr0log.h20
-rw-r--r--storage/innobase/include/mtr0mtr.h11
-rw-r--r--storage/innobase/include/mtr0mtr.inl20
-rw-r--r--storage/innobase/include/mtr0types.h13
-rw-r--r--storage/innobase/include/os0api.h20
-rw-r--r--storage/innobase/include/os0file.h93
-rw-r--r--storage/innobase/include/os0proc.h2
-rw-r--r--storage/innobase/include/os0thread.h2
-rw-r--r--storage/innobase/include/page0cur.inl6
-rw-r--r--storage/innobase/include/page0page.h54
-rw-r--r--storage/innobase/include/page0page.inl39
-rw-r--r--storage/innobase/include/page0size.h197
-rw-r--r--storage/innobase/include/page0types.h12
-rw-r--r--storage/innobase/include/page0zip.h48
-rw-r--r--storage/innobase/include/page0zip.inl33
-rw-r--r--storage/innobase/include/que0que.h6
-rw-r--r--storage/innobase/include/read0types.h34
-rw-r--r--storage/innobase/include/rem0rec.h174
-rw-r--r--storage/innobase/include/rem0rec.inl32
-rw-r--r--storage/innobase/include/row0ext.h9
-rw-r--r--storage/innobase/include/row0ftsort.h26
-rw-r--r--storage/innobase/include/row0log.h2
-rw-r--r--storage/innobase/include/row0mysql.h15
-rw-r--r--storage/innobase/include/row0row.h19
-rw-r--r--storage/innobase/include/row0row.inl8
-rw-r--r--storage/innobase/include/row0trunc.h416
-rw-r--r--storage/innobase/include/row0types.h8
-rw-r--r--storage/innobase/include/row0undo.h15
-rw-r--r--storage/innobase/include/row0upd.h34
-rw-r--r--storage/innobase/include/row0upd.inl8
-rw-r--r--storage/innobase/include/srv0mon.h26
-rw-r--r--storage/innobase/include/srv0srv.h28
-rw-r--r--storage/innobase/include/sync0arr.inl3
-rw-r--r--storage/innobase/include/sync0policy.h522
-rw-r--r--storage/innobase/include/sync0policy.inl101
-rw-r--r--storage/innobase/include/sync0rw.h12
-rw-r--r--storage/innobase/include/sync0rw.inl99
-rw-r--r--storage/innobase/include/sync0sync.h3
-rw-r--r--storage/innobase/include/sync0types.h83
-rw-r--r--storage/innobase/include/trx0purge.h254
-rw-r--r--storage/innobase/include/trx0roll.h10
-rw-r--r--storage/innobase/include/trx0rseg.inl5
-rw-r--r--storage/innobase/include/trx0sys.h95
-rw-r--r--storage/innobase/include/trx0trx.h71
-rw-r--r--storage/innobase/include/trx0undo.h77
-rw-r--r--storage/innobase/include/trx0undo.inl39
-rw-r--r--storage/innobase/include/univ.i1
-rw-r--r--storage/innobase/include/ut0counter.h136
-rw-r--r--storage/innobase/include/ut0crc32.h6
-rw-r--r--storage/innobase/include/ut0mutex.h2
-rw-r--r--storage/innobase/include/ut0rnd.h9
-rw-r--r--storage/innobase/include/ut0ut.h13
-rw-r--r--storage/innobase/innodb.cmake7
-rw-r--r--storage/innobase/lock/lock0lock.cc100
-rw-r--r--storage/innobase/lock/lock0wait.cc9
-rw-r--r--storage/innobase/log/log0crypt.cc174
-rw-r--r--storage/innobase/log/log0log.cc78
-rw-r--r--storage/innobase/log/log0recv.cc1182
-rw-r--r--storage/innobase/mtr/mtr0log.cc126
-rw-r--r--storage/innobase/mtr/mtr0mtr.cc11
-rw-r--r--storage/innobase/os/os0event.cc2
-rw-r--r--storage/innobase/os/os0file.cc844
-rw-r--r--storage/innobase/os/os0proc.cc23
-rw-r--r--storage/innobase/os/os0thread.cc8
-rw-r--r--storage/innobase/page/page0cur.cc31
-rw-r--r--storage/innobase/page/page0page.cc63
-rw-r--r--storage/innobase/page/page0zip.cc173
-rw-r--r--storage/innobase/pars/pars0pars.cc2
-rw-r--r--storage/innobase/pars/pars0sym.cc2
-rw-r--r--storage/innobase/que/que0que.cc14
-rw-r--r--storage/innobase/read/read0read.cc10
-rw-r--r--storage/innobase/rem/rem0cmp.cc181
-rw-r--r--storage/innobase/rem/rem0rec.cc600
-rw-r--r--storage/innobase/row/row0ext.cc28
-rw-r--r--storage/innobase/row/row0ftsort.cc32
-rw-r--r--storage/innobase/row/row0import.cc916
-rw-r--r--storage/innobase/row/row0ins.cc189
-rw-r--r--storage/innobase/row/row0log.cc101
-rw-r--r--storage/innobase/row/row0merge.cc48
-rw-r--r--storage/innobase/row/row0mysql.cc127
-rw-r--r--storage/innobase/row/row0purge.cc59
-rw-r--r--storage/innobase/row/row0quiesce.cc25
-rw-r--r--storage/innobase/row/row0row.cc399
-rw-r--r--storage/innobase/row/row0sel.cc265
-rw-r--r--storage/innobase/row/row0trunc.cc1742
-rw-r--r--storage/innobase/row/row0uins.cc244
-rw-r--r--storage/innobase/row/row0umod.cc201
-rw-r--r--storage/innobase/row/row0undo.cc195
-rw-r--r--storage/innobase/row/row0upd.cc208
-rw-r--r--storage/innobase/srv/srv0conc.cc42
-rw-r--r--storage/innobase/srv/srv0mon.cc24
-rw-r--r--storage/innobase/srv/srv0srv.cc146
-rw-r--r--storage/innobase/srv/srv0start.cc233
-rw-r--r--storage/innobase/sync/sync0arr.cc34
-rw-r--r--storage/innobase/sync/sync0debug.cc11
-rw-r--r--storage/innobase/sync/sync0rw.cc82
-rw-r--r--storage/innobase/sync/sync0sync.cc4
-rw-r--r--storage/innobase/trx/trx0i_s.cc26
-rw-r--r--storage/innobase/trx/trx0purge.cc785
-rw-r--r--storage/innobase/trx/trx0rec.cc363
-rw-r--r--storage/innobase/trx/trx0roll.cc174
-rw-r--r--storage/innobase/trx/trx0rseg.cc62
-rw-r--r--storage/innobase/trx/trx0sys.cc9
-rw-r--r--storage/innobase/trx/trx0trx.cc514
-rw-r--r--storage/innobase/trx/trx0undo.cc96
-rw-r--r--storage/innobase/ut/ut0crc32.cc82
-rw-r--r--storage/innobase/ut/ut0new.cc1
-rw-r--r--storage/innobase/ut/ut0rnd.cc4
-rw-r--r--storage/innobase/ut/ut0ut.cc2
-rw-r--r--storage/maria/CMakeLists.txt10
-rw-r--r--storage/maria/ha_maria.cc167
-rw-r--r--storage/maria/ha_maria.h7
-rw-r--r--storage/maria/lockman.c1
-rw-r--r--storage/maria/ma_backup.c281
-rw-r--r--storage/maria/ma_bitmap.c5
-rw-r--r--storage/maria/ma_blockrec.c37
-rw-r--r--storage/maria/ma_check.c60
-rw-r--r--storage/maria/ma_checkpoint.h4
-rw-r--r--storage/maria/ma_control_file.c122
-rw-r--r--storage/maria/ma_control_file.h1
-rw-r--r--storage/maria/ma_create.c40
-rw-r--r--storage/maria/ma_crypt.c28
-rw-r--r--storage/maria/ma_dynrec.c13
-rw-r--r--storage/maria/ma_extra.c10
-rw-r--r--storage/maria/ma_info.c2
-rw-r--r--storage/maria/ma_init.c2
-rw-r--r--storage/maria/ma_key.c22
-rw-r--r--storage/maria/ma_key_recover.c3
-rw-r--r--storage/maria/ma_locking.c9
-rw-r--r--storage/maria/ma_loghandler.c44
-rw-r--r--storage/maria/ma_loghandler.h3
-rw-r--r--storage/maria/ma_open.c78
-rw-r--r--storage/maria/ma_packrec.c23
-rw-r--r--storage/maria/ma_pagecache.c5
-rw-r--r--storage/maria/ma_pagecrc.c10
-rw-r--r--storage/maria/ma_recovery.c17
-rw-r--r--storage/maria/ma_rkey.c8
-rw-r--r--storage/maria/ma_rnext.c6
-rw-r--r--storage/maria/ma_rnext_same.c6
-rw-r--r--storage/maria/ma_rprev.c6
-rw-r--r--storage/maria/ma_sort.c2
-rw-r--r--storage/maria/ma_state.c27
-rw-r--r--storage/maria/ma_test2.c5
-rw-r--r--storage/maria/ma_trnman.h36
-rw-r--r--storage/maria/ma_write.c2
-rw-r--r--storage/maria/maria_chk.c2
-rw-r--r--storage/maria/maria_def.h12
-rw-r--r--storage/maria/maria_pack.c116
-rw-r--r--storage/maria/maria_read_log.c30
-rwxr-xr-xstorage/maria/maria_rename.sh17
-rw-r--r--storage/maria/test_ma_backup.c444
-rw-r--r--storage/maria/trnman.c3
-rw-r--r--storage/maria/unittest/lockman-t.c1
-rw-r--r--storage/maria/unittest/lockman1-t.c1
-rw-r--r--storage/maria/unittest/lockman2-t.c1
-rwxr-xr-xstorage/maria/unittest/ma_test_all-t7
-rw-r--r--storage/maria/unittest/ma_test_recovery.expected192
-rw-r--r--storage/maria/unittest/trnman-t.c1
-rw-r--r--storage/mroonga/CMakeLists.txt7
-rw-r--r--storage/mroonga/ha_mroonga.cpp43
-rw-r--r--storage/mroonga/ha_mroonga.hpp14
-rw-r--r--storage/mroonga/lib/mrn_condition_converter.cpp29
-rw-r--r--storage/mroonga/lib/mrn_multiple_column_key_codec.cpp3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test1
-rw-r--r--storage/mroonga/vendor/groonga/lib/alloc.c14
-rw-r--r--storage/mroonga/vendor/groonga/lib/db.c2
-rw-r--r--storage/mroonga/vendor/groonga/lib/ii.c48
-rw-r--r--storage/mroonga/vendor/groonga/lib/pat.c4
-rw-r--r--storage/mroonga/vendor/groonga/lib/proc/proc_select.c3
-rw-r--r--storage/mroonga/vendor/groonga/lib/str.c5
-rw-r--r--storage/mroonga/vendor/groonga/vendor/plugins/CMakeLists.txt3
-rw-r--r--storage/myisam/TODO7
-rw-r--r--storage/myisam/ha_myisam.cc124
-rw-r--r--storage/myisam/ha_myisam.h8
-rw-r--r--storage/myisam/mi_check.c40
-rw-r--r--storage/myisam/mi_extra.c15
-rw-r--r--storage/myisam/mi_info.c2
-rw-r--r--storage/myisam/mi_key.c86
-rw-r--r--storage/myisam/mi_locking.c6
-rw-r--r--storage/myisam/mi_range.c75
-rw-r--r--storage/myisam/mi_rkey.c9
-rw-r--r--storage/myisam/mi_rnext.c7
-rw-r--r--storage/myisam/mi_rnext_same.c7
-rw-r--r--storage/myisam/mi_rprev.c7
-rw-r--r--storage/myisam/mi_write.c2
-rw-r--r--storage/myisam/myisamdef.h15
-rw-r--r--storage/myisam/myisamlog.c3
-rw-r--r--storage/myisam/myisampack.c17
-rw-r--r--storage/myisam/sort.c2
-rw-r--r--storage/myisammrg/ha_myisammrg.cc2
-rw-r--r--storage/myisammrg/ha_myisammrg.h2
-rw-r--r--storage/myisammrg/myrg_write.c2
-rw-r--r--storage/oqgraph/CMakeLists.txt27
-rw-r--r--storage/oqgraph/ha_oqgraph.cc4
-rw-r--r--storage/oqgraph/ha_oqgraph.h2
-rw-r--r--storage/oqgraph/oqgraph_thunk.cc12
-rw-r--r--storage/perfschema/ha_perfschema.cc3
-rw-r--r--storage/perfschema/ha_perfschema.h2
-rw-r--r--storage/perfschema/pfs_engine_table.cc6
-rw-r--r--storage/perfschema/pfs_engine_table.h4
-rw-r--r--storage/perfschema/pfs_instr.cc20
-rw-r--r--storage/perfschema/pfs_instr.h2
-rw-r--r--storage/perfschema/pfs_server.h2
-rw-r--r--storage/perfschema/table_setup_actors.cc2
-rw-r--r--storage/perfschema/table_setup_actors.h2
-rw-r--r--storage/perfschema/table_setup_objects.cc2
-rw-r--r--storage/perfschema/table_setup_objects.h2
-rw-r--r--storage/perfschema/unittest/pfs_server_stubs.cc2
-rw-r--r--storage/rocksdb/CMakeLists.txt25
-rw-r--r--storage/rocksdb/build_rocksdb.cmake2
-rw-r--r--storage/rocksdb/ha_rocksdb.cc23
-rw-r--r--storage/rocksdb/ha_rocksdb.h3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result14
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key_with_sk.result9
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result6
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/autoinc_secondary.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread_2.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bloomfilter3.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bloomfilter4.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/cardinality.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/compression_zstd.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result10
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/drop_table2.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/drop_table3.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result480
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb2.result8
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/issue884.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/max_open_files.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/misc.result6
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/no_merge_sort.result60
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/partition.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_options.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/select.result6
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/skip_validate_tmp_table.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/statistics.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/truncate_table3.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_char_indexes.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_date_time_indexes.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result8
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result5
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/use_direct_reads_writes.result4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/xa.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption.test2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/cardinality.test2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/disabled.def1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result18
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test85
-rw-r--r--storage/rocksdb/rdb_datadic.cc3
-rw-r--r--storage/sequence/mysql-test/sequence/simple.result4
-rw-r--r--storage/sequence/mysql-test/sequence/simple.test2
-rw-r--r--storage/sphinx/ha_sphinx.cc10
-rw-r--r--storage/sphinx/ha_sphinx.h2
-rw-r--r--storage/spider/ha_spider.cc258
-rw-r--r--storage/spider/ha_spider.h35
-rw-r--r--storage/spider/mysql-test/spider/bugfix/disabled.def1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/cp932_column_deinit.inc13
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/cp932_column_init.inc29
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_deinit.inc13
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_init.inc24
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_deinit.inc4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_init.inc14
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_deinit.inc4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_init.inc16
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_deinit.inc9
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_init.inc11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_deinit.inc14
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_init.inc54
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/mdev_22246_deinit.inc14
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/mdev_22246_init.inc48
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/mdev_22265_deinit.inc7
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/mdev_22265_init.inc7
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_deinit.inc11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_init.inc27
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_deinit.inc11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_init.inc26
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/same_server_link_deinit.inc11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/same_server_link_init.inc15
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_deinit.inc11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_init.inc25
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_deinit.inc10
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_init.inc10
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_deinit.inc12
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_init.inc13
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/sql_mode_deinit.inc13
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/sql_mode_init.inc40
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_deinit.inc1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_init.inc3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_deinit.inc1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_init.inc3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/wait_timeout_deinit.inc18
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/wait_timeout_init.inc56
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/xa_cmd_deinit.inc11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/include/xa_cmd_init.inc24
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result6
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/cp932_column.result84
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mariadb.result85
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mysql.result85
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/direct_sql_with_comma_pwd.result37
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/group_by_order_by_limit.result117
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_21884.result7
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_22246.result79
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_22265.result23
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_24343.result75
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_26013.result42
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result21
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/return_found_rows_insert.result179
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/return_found_rows_update.result99
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/same_server_link.result42
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/select_with_backquote.result75
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/slave_transaction_retry_errors_5digit.result22
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/spider_table_sts.result38
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/sql_mode_mariadb.result83
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/sql_mode_mysql.result83
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/wait_timeout.result130
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/xa_cmd.result68
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/cp932_column.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/cp932_column.test80
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc100
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.cnf4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.test5
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.cnf4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.test5
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test35
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.cnf4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test97
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_22246.cnf4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_22246.test92
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_22265.cnf2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_22265.test28
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_24343.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_24343.test84
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_26013.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_26013.test51
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test31
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test98
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test78
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/same_server_link.cnf2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/same_server_link.test55
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test74
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.cnf6
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.test9
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.cnf2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.test46
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc65
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.test5
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.test5
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/wait_timeout.cnf4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/wait_timeout.test109
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/xa_cmd.cnf3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test69
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc16
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc1
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc2
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc53
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc1
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc2
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc1
-rw-r--r--storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc2
-rw-r--r--storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_deinit.inc10
-rw-r--r--storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_init.inc10
-rw-r--r--storage/spider/mysql-test/spider/feature/my.cnf2
-rw-r--r--storage/spider/mysql-test/spider/feature/my_1_1.cnf44
-rw-r--r--storage/spider/mysql-test/spider/feature/my_2_1.cnf56
-rw-r--r--storage/spider/mysql-test/spider/feature/my_2_2.cnf38
-rw-r--r--storage/spider/mysql-test/spider/feature/my_2_3.cnf8
-rw-r--r--storage/spider/mysql-test/spider/feature/my_3_1.cnf11
-rw-r--r--storage/spider/mysql-test/spider/feature/my_3_2.cnf9
-rw-r--r--storage/spider/mysql-test/spider/feature/my_3_3.cnf9
-rw-r--r--storage/spider/mysql-test/spider/feature/my_4_1.cnf9
-rw-r--r--storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result130
-rw-r--r--storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result128
-rw-r--r--storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result128
-rw-r--r--storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result22
-rw-r--r--storage/spider/mysql-test/spider/feature/suite.opt1
-rw-r--r--storage/spider/mysql-test/spider/feature/suite.pm11
-rw-r--r--storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc107
-rw-r--r--storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf4
-rw-r--r--storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test5
-rw-r--r--storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf4
-rw-r--r--storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test5
-rw-r--r--storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf4
-rw-r--r--storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test5
-rw-r--r--storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.cnf4
-rw-r--r--storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.test9
-rw-r--r--storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_deinit.inc2
-rw-r--r--storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc2
-rw-r--r--storage/spider/mysql-test/spider/include/deinit_spider.inc99
-rw-r--r--storage/spider/mysql-test/spider/include/init_spider.inc541
-rw-r--r--storage/spider/mysql-test/spider/r/basic_sql.result10
-rw-r--r--storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result6
-rw-r--r--storage/spider/mysql-test/spider/r/direct_join.result4
-rw-r--r--storage/spider/mysql-test/spider/r/direct_join_using.result2
-rw-r--r--storage/spider/mysql-test/spider/r/partition_fulltext.result6
-rw-r--r--storage/spider/mysql-test/spider/r/show_system_tables.result18
-rw-r--r--storage/spider/mysql-test/spider/r/slave_trx_isolation.result2
-rw-r--r--storage/spider/mysql-test/spider/r/timestamp.result20
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_deinit.inc12
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_init.inc36
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_deinit.inc12
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_init.inc36
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_deinit.inc3
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_init.inc4
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_deinit.inc3
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_init.inc4
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/load_data_deinit.inc11
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/include/load_data_init.inc25
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/my.cnf3
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/my_1_1.cnf44
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/my_2_1.cnf56
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_key.result94
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_pkey.result94
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi0.result75
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi1.result75
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi0.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi1.result75
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi0.result84
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi1.result75
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi0.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi1.result75
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi0.result104
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi1.result75
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi0.result104
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi1.result75
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/suite.opt1
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/suite.pm11
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test86
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test86
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc76
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_deinit.inc14
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_init.inc54
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_deinit.inc3
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_init.inc4
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_deinit.inc3
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_init.inc4
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_deinit.inc14
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_init.inc52
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/my.cnf4
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/my_1_1.cnf44
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/my_2_1.cnf56
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/my_2_2.cnf38
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/group_by_order_by_limit_ok.result117
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi0.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi1.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi0.result114
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi1.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi0.result103
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi1.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi0.result114
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi1.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi0.result123
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi1.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi0.result123
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi1.result95
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/suite.opt1
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/suite.pm11
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test97
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc100
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi0.test8
-rw-r--r--storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi1.test8
-rw-r--r--storage/spider/mysql-test/spider/t/basic_sql.test13
-rw-r--r--storage/spider/mysql-test/spider/t/connect_child2_1.inc1
-rw-r--r--storage/spider/mysql-test/spider/t/connect_child2_2.inc1
-rw-r--r--storage/spider/mysql-test/spider/t/test_deinit.inc2
-rw-r--r--storage/spider/scripts/install_spider.sql543
-rw-r--r--storage/spider/spd_conn.cc58
-rw-r--r--storage/spider/spd_conn.h24
-rw-r--r--storage/spider/spd_copy_tables.cc21
-rw-r--r--storage/spider/spd_db_conn.cc527
-rw-r--r--storage/spider/spd_db_conn.h32
-rw-r--r--storage/spider/spd_db_handlersocket.cc143
-rw-r--r--storage/spider/spd_db_handlersocket.h44
-rw-r--r--storage/spider/spd_db_include.cc27
-rw-r--r--storage/spider/spd_db_include.h68
-rw-r--r--storage/spider/spd_db_mysql.cc1914
-rw-r--r--storage/spider/spd_db_mysql.h133
-rw-r--r--storage/spider/spd_db_oracle.cc204
-rw-r--r--storage/spider/spd_db_oracle.h44
-rw-r--r--storage/spider/spd_direct_sql.cc21
-rw-r--r--storage/spider/spd_environ.h2
-rw-r--r--storage/spider/spd_err.h3
-rw-r--r--storage/spider/spd_include.h39
-rw-r--r--storage/spider/spd_init_query.h782
-rw-r--r--storage/spider/spd_malloc.cc19
-rw-r--r--storage/spider/spd_malloc.h5
-rw-r--r--storage/spider/spd_param.cc73
-rw-r--r--storage/spider/spd_param.h12
-rw-r--r--storage/spider/spd_sys_table.cc462
-rw-r--r--storage/spider/spd_sys_table.h85
-rw-r--r--storage/spider/spd_table.cc419
-rw-r--r--storage/spider/spd_table.h104
-rw-r--r--storage/spider/spd_trx.cc75
-rw-r--r--storage/spider/spd_trx.h17
-rw-r--r--storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake1
-rw-r--r--storage/tokudb/PerconaFT/portability/toku_crash.cc2
-rw-r--r--storage/tokudb/ha_tokudb.cc50
-rw-r--r--storage/tokudb/ha_tokudb.h12
-rw-r--r--storage/tokudb/ha_tokudb_alter_56.cc18
-rw-r--r--storage/tokudb/ha_tokudb_update.cc6
-rw-r--r--storage/tokudb/hatoku_hton.cc3
-rw-r--r--storage/tokudb/man/tokuft_logprint.12
-rw-r--r--storage/tokudb/man/tokuftdump.12
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug28430.result12
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug30888.result4
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result40
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_tokudb_read_only_ft.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/include/cluster_key.inc73
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_add_drop.result5
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_add_index.result6
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_drop_index.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_drop_index_2.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_drop_pk.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_no_keys.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_pk.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_pk_2.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_pk_sk.result5
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_scale_percent.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_sk.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_sk_2.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/card_unique_sk.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result8
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_delete.result128
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result13
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_key.result165
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result8
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_update.result115
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/compressions.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/dir_per_db_rename_to_nonexisting_schema.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result12
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_bit.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_blob.result11
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_datetime.result10
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_varchar.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_add_drop.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_add_index.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_drop_index.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_drop_index_2.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_drop_pk.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_pk_2.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_pk_sk.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_scale_percent.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_sk.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/card_sk_2.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_delete.test50
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test8
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test8
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_update.test43
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test8
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/type_blob.test5
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result12
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/disabled.def1
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result8
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/PS-3773.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/bulk_fetch.result8
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1_pick.result6
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2_pick.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db757_part_alter_analyze.result7
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/frm_store.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/frm_store2.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/frm_store3.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/index_read.result6
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/bulk_fetch.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash.test3
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1_pick.test3
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2_pick.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db757_part_alter_analyze.test3
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/index_read.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_mariadb/r/clustering.result17
-rw-r--r--storage/tokudb/mysql-test/tokudb_mariadb/t/clustering.test5
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result56
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result32
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result80
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result40
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result40
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result40
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result40
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result216
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result64
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result11
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc0_tokudb.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc10_tokudb.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc1_tokudb.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb_rpl/r/mdev12179.result18
-rw-r--r--storage/tokudb/mysql-test/tokudb_rpl/t/mdev12179.test85
-rw-r--r--storage/tokudb/tokudb_dir_cmd.cc4
-rw-r--r--storage/tokudb/tokudb_sysvars.cc2
-rw-r--r--strings/ctype-big5.c4
-rw-r--r--strings/ctype-bin.c27
-rw-r--r--strings/ctype-cp932.c4
-rw-r--r--strings/ctype-czech.c1
-rw-r--r--strings/ctype-euc_kr.c4
-rw-r--r--strings/ctype-eucjpms.c4
-rw-r--r--strings/ctype-gb2312.c4
-rw-r--r--strings/ctype-gbk.c4
-rw-r--r--strings/ctype-latin1.c1
-rw-r--r--strings/ctype-simple.c23
-rw-r--r--strings/ctype-sjis.c4
-rw-r--r--strings/ctype-tis620.c2
-rw-r--r--strings/ctype-uca-scanner_next.inl179
-rw-r--r--strings/ctype-uca.c1515
-rw-r--r--strings/ctype-uca.inl911
-rw-r--r--strings/ctype-ucs2.c161
-rw-r--r--strings/ctype-ucs2.h32
-rw-r--r--strings/ctype-ujis.c4
-rw-r--r--strings/ctype-unidata.h31
-rw-r--r--strings/ctype-utf16.h80
-rw-r--r--strings/ctype-utf32.h33
-rw-r--r--strings/ctype-utf8.c375
-rw-r--r--strings/ctype-utf8.h190
-rw-r--r--strings/ctype-win1250ch.c1
-rw-r--r--strings/ctype.c29
-rw-r--r--strings/json_lib.c262
-rw-r--r--strings/strcoll.inl317
-rw-r--r--strings/strings_def.h10
-rw-r--r--support-files/CMakeLists.txt24
-rw-r--r--support-files/compiler_warnings.supp12
-rw-r--r--support-files/mariadb.service.in13
-rw-r--r--support-files/mariadb@.service.in213
-rw-r--r--support-files/rpm/server-postin.sh3
-rw-r--r--support-files/rpm/server-posttrans.sh2
-rw-r--r--support-files/rpm/server-preun.sh6
-rw-r--r--support-files/rpm/server.cnf4
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/mysql_client_fw.c12
-rw-r--r--tests/mysql_client_test.c142
-rw-r--r--unittest/json_lib/CMakeLists.txt1
-rw-r--r--unittest/my_decimal/CMakeLists.txt1
-rw-r--r--unittest/mysys/byte_order-t.c2
-rw-r--r--unittest/mysys/my_atomic-t.c1
-rw-r--r--unittest/mysys/thr_template.c1
-rw-r--r--unittest/sql/CMakeLists.txt13
-rw-r--r--unittest/sql/dummy_builtins.cc26
-rw-r--r--unittest/sql/my_json_writer-t.cc128
-rw-r--r--unittest/strings/CMakeLists.txt2
-rw-r--r--unittest/strings/json-t.c103
-rw-r--r--unittest/strings/strings-t.c508
-rw-r--r--vio/CMakeLists.txt2
-rw-r--r--vio/docs/TODO3
-rw-r--r--vio/vio.c65
-rw-r--r--vio/vio_priv.h8
-rw-r--r--vio/vioshm.c217
-rw-r--r--vio/viosocket.c56
-rw-r--r--vio/viossl.c49
-rw-r--r--vio/viosslfactories.c112
-rw-r--r--win/packaging/CMakeLists.txt58
-rw-r--r--win/packaging/CPackWixConfig.cmake2
-rw-r--r--win/packaging/ca/CMakeLists.txt22
-rw-r--r--win/packaging/ca/CustomAction.cpp473
-rw-r--r--win/packaging/ca/CustomAction.def3
-rw-r--r--win/packaging/ca/symlinks.cc.in6
-rw-r--r--win/packaging/ca/symlinks.h8
-rw-r--r--win/packaging/create_msi.cmake12
-rw-r--r--win/packaging/extra.wxs.in36
-rw-r--r--win/packaging/mysql_server.wxs.in2
-rw-r--r--win/upgrade_wizard/CMakeLists.txt18
m---------wsrep-lib0
-rw-r--r--wsrep/CMakeLists.txt26
-rw-r--r--wsrep/wsrep_api.h1117
-rw-r--r--wsrep/wsrep_dummy.c413
-rw-r--r--wsrep/wsrep_gtid.c74
-rw-r--r--wsrep/wsrep_loader.c226
-rw-r--r--wsrep/wsrep_uuid.c83
4592 files changed, 270432 insertions, 148878 deletions
diff --git a/.gitignore b/.gitignore
index 57e50ad2e46..437bd2023d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
*.ninja
.ninja_*
.gdb_history
+.vs/
errmsg.sys
typescript
_CPack_Packages
@@ -58,6 +59,7 @@ extra/perror
extra/replace
extra/resolve_stack_dump
extra/resolveip
+extra/wolfssl/user_settings.h
import_executables.cmake
include/*.h.tmp
include/config.h
@@ -100,6 +102,7 @@ pcre/pcre_chartables.c
pcre/pcregrep
pcre/pcretest
pcre/test*grep
+plugin/auth_pam/auth_pam_tool
plugin/auth_pam/config_auth_pam.h
plugin/aws_key_management/aws-sdk-cpp
plugin/aws_key_management/aws_sdk_cpp
@@ -137,6 +140,10 @@ scripts/maria_add_gis_sp.sql
scripts/maria_add_gis_sp_bootstrap.sql
scripts/galera_new_cluster
scripts/galera_recovery
+scripts/mysql_convert_table_format.pl
+scripts/mysqld_multi.pl
+scripts/mysqldumpslow.pl
+scripts/mysqlhotcopy.pl
sql-bench/bench-count-distinct
sql-bench/bench-init.pl
sql-bench/compare-results
@@ -161,6 +168,30 @@ sql-bench/test-select
sql-bench/test-table-elimination
sql-bench/test-transactions
sql-bench/test-wisconsin
+sql-bench/bench-count-distinct.pl
+sql-bench/compare-results.pl
+sql-bench/copy-db.pl
+sql-bench/crash-me.pl
+sql-bench/graph-compare-results.pl
+sql-bench/innotest1.pl
+sql-bench/innotest1a.pl
+sql-bench/innotest1b.pl
+sql-bench/innotest2.pl
+sql-bench/innotest2a.pl
+sql-bench/innotest2b.pl
+sql-bench/run-all-tests.pl
+sql-bench/server-cfg.pl
+sql-bench/test-ATIS.pl
+sql-bench/test-alter-table.pl
+sql-bench/test-big-tables.pl
+sql-bench/test-connect.pl
+sql-bench/test-create.pl
+sql-bench/test-insert.pl
+sql-bench/test-select.pl
+sql-bench/test-table-elimination.pl
+sql-bench/test-transactions.pl
+sql-bench/test-wisconsin.pl
+sql/make_mysqld_lib.cmake
sql/lex_token.h
sql/gen_lex_token
sql/gen_lex_hash
@@ -184,6 +215,7 @@ storage/maria/ma_sp_test
storage/maria/ma_test1
storage/maria/ma_test2
storage/maria/ma_test3
+storage/maria/test_ma_backup
storage/myisam/mi_test1
storage/myisam/mi_test2
storage/myisam/mi_test3
@@ -196,6 +228,7 @@ storage/myisam/sp_test
storage/rocksdb/ldb
storage/rocksdb/myrocks_hotbackup
storage/rocksdb/mysql_ldb
+storage/rocksdb/myrocks_hotbackup
storage/rocksdb/rdb_source_revision.h
storage/rocksdb/sst_dump
storage/tokudb/PerconaFT/buildheader/db.h
@@ -523,5 +556,76 @@ compile_commands.json
# Visual Studio Code workspace
.vscode/
+# Clion && other JetBrains ides
/.idea/
+
.cache/clangd
+
+
+client/mariadb
+client/mariadb-admin
+client/mariadb-binlog
+client/mariadb-check
+client/mariadb-dump
+client/mariadb-import
+client/mariadb-plugin
+client/mariadb-show
+client/mariadb-slap
+client/mariadb-test
+client/mariadb-upgrade
+extra/mariabackup/mariadb-backup
+extra/mariadb-waitpid
+extra/mariadbd-safe-helper
+libmysqld/examples/mariadb-client-test-embedded
+libmysqld/examples/mariadb-embedded
+libmysqld/examples/mariadb-test-embedded
+man/mariadb-access.1
+man/mariadb-admin.1
+man/mariadb-backup.1
+man/mariadb-binlog.1
+man/mariadb-check.1
+man/mariadb-client-test-embedded.1
+man/mariadb-client-test.1
+man/mariadb-convert-table-format.1
+man/mariadb-dump.1
+man/mariadb-dumpslow.1
+man/mariadb-embedded.1
+man/mariadb-find-rows.1
+man/mariadb-fix-extensions.1
+man/mariadb-hotcopy.1
+man/mariadb-import.1
+man/mariadb-install-db.1
+man/mariadb-ldb.1
+man/mariadb-plugin.1
+man/mariadb-secure-installation.1
+man/mariadb-setpermission.1
+man/mariadb-show.1
+man/mariadb-slap.1
+man/mariadb-test-embedded.1
+man/mariadb-test.1
+man/mariadb-tzinfo-to-sql.1
+man/mariadb-upgrade.1
+man/mariadb-waitpid.1
+man/mariadb.1
+man/mariadbd-multi.1
+man/mariadbd-safe-helper.1
+man/mariadbd-safe.1
+man/mariadbd.8
+scripts/mariadb-access
+scripts/mariadb-convert-table-format
+scripts/mariadb-dumpslow
+scripts/mariadb-find-rows
+scripts/mariadb-fix-extensions
+scripts/mariadb-hotcopy
+scripts/mariadb-install-db
+scripts/mariadb-secure-installation
+scripts/mariadb-setpermission
+scripts/mariadbd-multi
+scripts/mariadbd-safe
+sql/mariadb-tzinfo-to-sql
+sql/mariadbd
+storage/rocksdb/mariadb-ldb
+tests/mariadb-client-test
+versioninfo_dll.rc
+versioninfo_exe.rc
+win/packaging/ca/symlinks.cc
diff --git a/.gitmodules b/.gitmodules
index 6419657e501..921a4782f4f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,13 @@
[submodule "libmariadb"]
path = libmariadb
- url = https://github.com/MariaDB/mariadb-connector-c
+ url = https://github.com/MariaDB/mariadb-connector-c.git
[submodule "storage/rocksdb/rocksdb"]
path = storage/rocksdb/rocksdb
url = https://github.com/facebook/rocksdb.git
+[submodule "wsrep-lib"]
+ path = wsrep-lib
+ url = https://github.com/codership/wsrep-lib.git
+ branch = master
+[submodule "extra/wolfssl/wolfssl"]
+ path = extra/wolfssl/wolfssl
+ url = https://github.com/wolfSSL/wolfssl.git
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index ff34bddab37..546955b60a1 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -141,7 +141,7 @@ elif [ "x$warning_mode" = "xmaintainer" ]; then
debug_extra_cflags="-g3"
else
# Both C and C++ warnings
- warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing"
+ warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing -Wimplicit-fallthrough=2 -Wformat-security -Wvla"
# For more warnings, uncomment the following line
# warnings="$warnings -Wshadow"
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index 814c217c070..d62e154588f 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -262,6 +262,9 @@ check_cpu () {
*AuthenticAMD*)
cpu_arg="k6"
;;
+ *HygonGenuine*)
+ cpu_arg="k8"
+ ;;
*VIA\ *)
cpu_arg="i686"
;;
diff --git a/BUILD/compile-pentium64-ubsan b/BUILD/compile-pentium64-ubsan
new file mode 100755
index 00000000000..bf56d84283f
--- /dev/null
+++ b/BUILD/compile-pentium64-ubsan
@@ -0,0 +1,29 @@
+#! /bin/sh
+# Copyright (c) 2018, 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 Street, Fifth Floor, Boston, MA 02110-1335 USA
+
+# Compilation with UBSAN, The Undefined Behavior Sanitizer
+# We have to use -Wno-uninitialized and -Wno-unitialized we get a lot of false
+# positive warnings for this when compiling with -fsanitize=undefined.
+# We also have to compile without Spider as linking with Spider library does
+# not work. (errno: 11, undefined symbol: _ZTI12ha_partition)
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium64_cflags $debug_cflags -fsanitize=undefined -DWITH_UBSAN -Wno-conversion -Wno-uninitialized"
+extra_configs="$pentium_configs $debug_configs -DWITH_UBSAN=ON -DMYSQL_MAINTAINER_MODE=NO --without-spider --without-tokudb"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max
index 0653fb7fe75..84e78805246 100755
--- a/BUILD/compile-pentium64-valgrind-max
+++ b/BUILD/compile-pentium64-valgrind-max
@@ -33,6 +33,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
-extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
+extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs --without-plugin-tokudb"
. "$path/FINISH.sh"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5aad228843f..94b459c583b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 2017, Oracle and/or its affiliates.
-# Copyright (c) 2008, 2021, MariaDB Corporation.
+# Copyright (c) 2008, 2022, 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
@@ -55,10 +55,7 @@ IF(NOT DEFINED MANUFACTURER)
ENDIF()
# MAX_INDEXES - Set the maximum number of indexes per table, default 64
-IF (NOT MAX_INDEXES)
- SET(MAX_INDEXES 64)
-ENDIF(NOT MAX_INDEXES)
-
+SET(MAX_INDEXES 64 CACHE STRING "Max number of indexes")
IF (${MAX_INDEXES} GREATER 128)
MESSAGE(FATAL_ERROR "MAX_INDEXES values greater than 128 is not supported!")
ENDIF()
@@ -84,6 +81,16 @@ ENDIF()
# This is used by TokuDB only
SET(MYSQL_PROJECT_NAME_DOCSTRING "MySQL project name")
+IF(CMAKE_VERSION VERSION_LESS "3.1")
+ IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+ ENDIF()
+ELSE()
+ SET(CMAKE_C_STANDARD 99)
+ SET(CMAKE_CXX_STANDARD 11)
+ENDIF()
+
SET(CPACK_PACKAGE_NAME "MariaDB")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB: a very fast and robust SQL database server")
SET(CPACK_PACKAGE_URL "http://mariadb.org")
@@ -145,7 +152,7 @@ INCLUDE(misc)
INCLUDE(mysql_version)
INCLUDE(cpack_source_ignore_files)
INCLUDE(install_layout)
-INCLUDE(wsrep)
+INCLUDE(submodules)
# Add macros
INCLUDE(character_sets)
@@ -161,6 +168,7 @@ INCLUDE(plugin)
INCLUDE(install_macros)
INCLUDE(systemd)
INCLUDE(mysql_add_executable)
+INCLUDE(symlinks)
INCLUDE(compile_flags)
INCLUDE(crc32)
@@ -214,9 +222,6 @@ ENDIF()
OPTION(WITH_TSAN "Enable thread sanitizer" OFF)
IF (WITH_TSAN)
- IF(SECURITY_HARDENED)
- MESSAGE(FATAL_ERROR "WITH_TSAN and SECURITY_HARDENED are mutually exclusive")
- ENDIF()
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=thread" DEBUG RELWITHDEBINFO)
ENDIF()
@@ -230,27 +235,19 @@ IF (WITH_MSAN)
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
ENDIF()
-IF(NOT WITH_TSAN)
- # enable security hardening features, like most distributions do
- # in our benchmarks that costs about ~1% of performance, depending on the load
- IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6" OR WITH_ASAN OR WITH_UBSAN)
- SET(security_default OFF)
- ELSE()
- SET(security_default ON)
- ENDIF()
- OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ${security_default})
- IF(SECURITY_HARDENED)
- IF(WITH_ASAN OR WITH_UBSAN)
- MESSAGE(FATAL_ERROR "WITH_ASAN/WITH_UBSAN and SECURITY_HARDENED are mutually exclusive")
- ENDIF()
- # security-enhancing flags
- MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
- MY_CHECK_AND_SET_LINKER_FLAG("-Wl,-z,relro,-z,now")
- MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4")
- MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
- ENDIF()
+# enable security hardening features, like most distributions do
+# in our benchmarks that costs about ~1% of performance, depending on the load
+OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ON)
+IF(SECURITY_HARDENED AND NOT WITH_ASAN AND NOT WITH_UBSAN AND NOT WITH_TSAN)
+ # security-enhancing flags
+ MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
+ MY_CHECK_AND_SET_LINKER_FLAG("-Wl,-z,relro,-z,now")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
ENDIF()
+INCLUDE(wsrep)
+
OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_EXIT()" ON)
IF(WITH_DBUG_TRACE)
ADD_DEFINITIONS(-DDBUG_TRACE)
@@ -356,7 +353,7 @@ IF(NOT HAVE_CXX_NEW)
ENDIF()
# Find header files from the bundled libraries
-# (yassl, readline, pcre, etc)
+# (wolfssl, readline, pcre, etc)
# before the ones installed in the system
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
@@ -369,7 +366,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
# Add bundled or system zlib.
MYSQL_CHECK_ZLIB_WITH_COMPRESS()
-# Add bundled yassl/taocrypt or system openssl.
+# Add bundled wolfssl/wolfcrypt or system openssl.
MYSQL_CHECK_SSL()
# Add readline or libedit.
MYSQL_CHECK_READLINE()
@@ -408,9 +405,8 @@ IF(WITH_UNIT_TESTS)
ENDIF()
-SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
+UNSET (MYSQLD_STATIC_PLUGIN_LIBS CACHE)
-INCLUDE(submodules)
INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)
INCLUDE(cpack_tgz)
@@ -447,10 +443,6 @@ IF(NOT WITHOUT_SERVER)
ADD_FEATURE_INFO(EMBEDDED_SERVER WITH_EMBEDDED_SERVER "Embedded MariaDB Server Library")
ENDIF()
- IF(WITH_WSREP)
- ADD_SUBDIRECTORY(wsrep)
- ENDIF()
-
ADD_SUBDIRECTORY(mysql-test)
ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
ADD_SUBDIRECTORY(sql-bench)
@@ -466,13 +458,10 @@ ENDIF()
INCLUDE(cmake/abi_check.cmake)
INCLUDE(cmake/tags.cmake)
-
-
-
-
INCLUDE(for_clients)
ADD_SUBDIRECTORY(scripts)
ADD_SUBDIRECTORY(support-files)
+ADD_SUBDIRECTORY(extra/aws_sdk)
IF(NOT CMAKE_CROSSCOMPILING)
SET(EXPORTED comp_err comp_sql factorial)
@@ -588,7 +577,7 @@ IF(NOT WITHOUT_SERVER)
perror
replace)
IF(WIN32)
- ADD_DEPENDENCIES(minbuild echo my_safe_kill)
+ ADD_DEPENDENCIES(minbuild echo mysql_install_db my_safe_kill)
ENDIF()
ADD_CUSTOM_TARGET(smoketest
COMMAND perl ./mysql-test-run.pl main.1st
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000000..64af450d29f
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,47 @@
+# How to contribute
+
+MariaDB Server has a vibrant community contributing in a wide range of areas. There are many valuable ways you can contribute to MariaDB.
+
+### Engage online with other community members
+---
+- [MariaDB on Zulip](https://mariadb.zulipchat.com/)
+- [maria-developers mailing list](http://launchpad.net/~maria-developers)
+- [maria-discuss mailing list](http://launchpad.net/~maria-discuss)
+- [maria-docs mailing list](http://launchpad.net/~maria-docs)
+- ircs://chat.freenode.net/maria ([see the IRC page on the Knowledge Base](https://mariadb.com/kb/en/meta/irc-chat-servers-and-zulip-instance/) for help with IRC).
+- The MariaDB Foundation and MariaDB Corporation have a presence on Reddit, Twitter, Facebook and Google Plus. See the [social media page](https://mariadb.com/kb/en/mariadb/social-media/).
+
+### Help document MariaDB
+----
+- Contribute towards [documenting MariaDB Server](https://mariadb.com/kb/en/meta/writing-editing-library-articles/) and its ecosystem by adding new content or improving existing content.
+- [Translate](https://mariadb.com/kb/en/meta/translating-library-articles/) existing documentation.
+
+### Help debug and develop MariaDB
+-----
+- [Report bugs](https://jira.mariadb.org/)
+- Test development versions
+- Write code to fix bugs or develop new features (see [Getting Started for Developers](https://mariadb.org/getting-started-for-developers)).See also [list of beginner friendly tasks](https://jira.mariadb.org/browse/MDEV-15736?jql=resolution%20%3D%20Unresolved%20AND%20labels%20%3D%20beginner-friendly%20ORDER%20BY%20updated%20DESC)
+- Help with code quality control
+- Participate in packaging for different Linux distributions
+
+### Sponsor or donate
+---
+You’re very welcome to support MariaDB Server as an individual, or talk your company into joining the Foundation as a sponsoring member. See the [Sponsor page](https://mariadb.org/donate/).
+
+### Events, meetups and conferences
+---
+- Attend an event
+ - [Events and Conferences page](https://mariadb.org/events/)
+ - [mariadb.meetup.com](http://mariadb.meetup.com/)
+
+### Live QA for beginner contributors
+----
+MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip and IRC.
+From 8:00 to 10:00 UTC on Mondays, and 10:00 to 12:00 UTC on Thursdays, anyone can ask any questions they’d like,
+and a live developer will be available to assist.
+New contributors can ask questions any time, but we will provide immediate feedback during that interval.
+
+### Additional resources
+----
+ - [MariaDB Foundation ](https://mariadb.org/)
+ - [Knowledge Base](https://mariadb.com/kb/en/)
diff --git a/Docs/INSTALL-BINARY b/Docs/INSTALL-BINARY
index e2689723656..025ce984db2 100644
--- a/Docs/INSTALL-BINARY
+++ b/Docs/INSTALL-BINARY
@@ -1,7 +1,9 @@
MariaDB and MySQL have identical install methods. In this document we
-describe how to install MariaDB; However all documentation at www.mysql.com
-also applies.
+describe how to install MariaDB.
+The full documentation for installing MariaDB can be found at
+https://mariadb.com/kb/en/library/binary-packages/
+However most documentation at www.mysql.com also applies.
2.2. Installing MariaDB from Generic Binaries on Unix/Linux
@@ -33,7 +35,8 @@ also applies.
If you run into problems and need to file a bug report,
please report them to: http://mariadb.org/jira
- See the instructions in Section 1.6, "How to Report Bugs or Problems."
+ See the instructions at
+ https://mariadb.com/kb/en/mariadb-community-bug-reporting
The basic commands that you must execute to install and use a
MariaDB binary distribution are:
@@ -79,10 +82,9 @@ shell> useradd -g mysql mysql
is protected, you must perform the installation as root.)
shell> cd /usr/local
- 3. Obtain a distribution file using the instructions in Section
- 2.1.3, "How to Get MariaDB." For a given release, binary
- distributions for all platforms are built from the same MariaDB
- source distribution.
+ 3. Obtain a distribution file using the instructions at
+ https://mariadb.com/kb/en/library/where-to-download-mariadb/
+ The description below describes how to install a MariaDB tar file.
4. Unpack the distribution, which creates the installation
directory. Then create a symbolic link to that directory:
@@ -149,8 +151,8 @@ shell> chown -R mysql data
machine, you can copy support-files/mysql.server to the
location where your system has its startup files. More
information can be found in the support-files/mysql.server
- script itself and in Section 2.13.1.2, "Starting and Stopping
- MariaDB Automatically."
+ script itself and at
+ https://mariadb.com/kb/en/starting-and-stopping-mariadb-automatically.
10. You can set up new accounts using the bin/mysql_setpermission
script if you install the DBI and DBD::mysql Perl modules. See
Section 4.6.14, "mysql_setpermission --- Interactively Set
@@ -181,8 +183,8 @@ shell> bin/mysqld_safe --user=mysql &
find some information in the host_name.err file in the data
directory.
- More information about mysqld_safe is given in Section 4.3.2,
- "mysqld_safe --- MySQL Server Startup Script."
+ More information about mysqld_safe can be found at
+ https://mariadb.com/kb/en/mysqld_safe
Note
diff --git a/Docs/glibc-2.2.5.patch b/Docs/glibc-2.2.5.patch
deleted file mode 100644
index ef5d40b6899..00000000000
--- a/Docs/glibc-2.2.5.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -r -c --exclude='*.info*' glibc-2.2.5.org/linuxthreads/internals.h glibc-2.2.5/linuxthreads/internals.h
-*** glibc-2.2.5.org/linuxthreads/internals.h Thu Nov 29 08:44:16 2001
---- glibc-2.2.5/linuxthreads/internals.h Tue May 21 10:51:53 2002
-***************
-*** 343,349 ****
- THREAD_SELF implementation is used, this must be a power of two and
- a multiple of PAGE_SIZE. */
- #ifndef STACK_SIZE
-! #define STACK_SIZE (2 * 1024 * 1024)
- #endif
-
- /* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
---- 343,349 ----
- THREAD_SELF implementation is used, this must be a power of two and
- a multiple of PAGE_SIZE. */
- #ifndef STACK_SIZE
-! #define STACK_SIZE (128 * 1024)
- #endif
-
- /* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
-diff -r -c --exclude='*.info*' glibc-2.2.5.org/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h
-*** glibc-2.2.5.org/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h Thu Jun 8 21:49:49 2000
---- glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h Tue May 21 10:52:58 2002
-***************
-*** 64,70 ****
- /* The number of threads per process. */
- #define _POSIX_THREAD_THREADS_MAX 64
- /* This is the value this implementation supports. */
-! #define PTHREAD_THREADS_MAX 1024
-
- /* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
---- 64,70 ----
- /* The number of threads per process. */
- #define _POSIX_THREAD_THREADS_MAX 64
- /* This is the value this implementation supports. */
-! #define PTHREAD_THREADS_MAX 4096
-
- /* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-diff -r -c --exclude='*.info*' glibc-2.2.5.org/nss/nsswitch.c glibc-2.2.5/nss/nsswitch.c
-*** glibc-2.2.5.org/nss/nsswitch.c Tue Jul 17 10:21:36 2001
---- glibc-2.2.5/nss/nsswitch.c Tue May 21 10:59:55 2002
-***************
-*** 496,501 ****
---- 496,502 ----
- {
- service_user *new_service;
- const char *name;
-+ int name_alloc_len;
-
- while (isspace (line[0]))
- ++line;
-***************
-*** 510,522 ****
- if (name == line)
- return result;
-
-
- new_service = (service_user *) malloc (sizeof (service_user)
-! + (line - name + 1));
- if (new_service == NULL)
- return result;
-
-! *((char *) __mempcpy (new_service->name, name, line - name)) = '\0';
-
- /* Set default actions. */
- new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
---- 511,534 ----
- if (name == line)
- return result;
-
-+ name_alloc_len = line - name + 1;
-+
-+ #ifdef DO_STATIC_NSS
-+ if (!((name_alloc_len == 6 && strncmp(name,"files",5) == 0) ||
-+ (name_alloc_len == 4 && strncmp(name,"dns",3) == 0)))
-+ {
-+ name = (char*) "files";
-+ name_alloc_len = 6;
-+ }
-+ #endif
-
- new_service = (service_user *) malloc (sizeof (service_user)
-! + name_alloc_len);
- if (new_service == NULL)
- return result;
-
-! *((char *) __mempcpy (new_service->name, name, name_alloc_len-1)) = '\0';
-!
-
- /* Set default actions. */
- new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
-diff -r -c --exclude='*.info*' glibc-2.2.5.org/time/Makefile glibc-2.2.5/time/Makefile
-*** glibc-2.2.5.org/time/Makefile Fri Aug 10 01:59:41 2001
---- glibc-2.2.5/time/Makefile Tue May 21 11:01:11 2002
-***************
-*** 37,44 ****
-
- include ../Rules
-
-! tz-cflags = -DTZDIR='"$(zonedir)"' \
-! -DTZDEFAULT='"$(localtime-file)"' \
- -DTZDEFRULES='"$(posixrules-file)"'
-
- CFLAGS-tzfile.c = $(tz-cflags)
---- 37,44 ----
-
- include ../Rules
-
-! tz-cflags = -DTZDIR='"/usr/share/zoneinfo/"' \
-! -DTZDEFAULT='"/etc/localtime"' \
- -DTZDEFRULES='"$(posixrules-file)"'
-
- CFLAGS-tzfile.c = $(tz-cflags)
-diff -r -c --exclude='*.info*' glibc-2.2.5.org/timezone/Makefile glibc-2.2.5/timezone/Makefile
-*** glibc-2.2.5.org/timezone/Makefile Thu Aug 30 00:45:25 2001
---- glibc-2.2.5/timezone/Makefile Tue May 21 11:01:57 2002
-***************
-*** 159,166 ****
-
- $(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
-
-! tz-cflags = -DTZDIR='"$(zonedir)"' \
-! -DTZDEFAULT='"$(localtime-file)"' \
- -DTZDEFRULES='"$(posixrules-file)"' \
- -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
-
---- 159,166 ----
-
- $(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
-
-! tz-cflags = -DTZDIR='"/usr/share/zoneinfo/"' \
-! -DTZDEFAULT='"/etc/localtime"' \
- -DTZDEFRULES='"$(posixrules-file)"' \
- -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
-
diff --git a/Docs/linuxthreads.txt b/Docs/linuxthreads.txt
deleted file mode 100644
index 552415fe794..00000000000
--- a/Docs/linuxthreads.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-[Note this information is obsolete]
-
-Notes on compiling glibc for the standard MySQL binary:
-
- - make sure you have gcc 2.95 and gmake 3.79 or newer
- - wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.2.5.tar.gz
- - wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-2.2.5.tar.gz
- - tar zxvf glibc-2.2.5.tar.gz ; cd glibc-2.2.5 ;
- tar zxvf ../glibc-linuxthreads-2.2.5.tar.gz
- - patch -p1 < ~/bk/mysql/Docs/glibc-2.2.5.patch
- - ./configure --prefix=/usr/local/mysql-glibc --enable-static-nss \
- --disable-shared --enable-add-ons=linuxthreads --target=i386 \
- --host=i386-pc-linux-gnu
- - make
- - possible problems - if compiler is not properly installed, one can get
- "cpp: too many input" files error - easiest way to solve - SUSE RPM for gcc
- 2.95
- - surun make install
- - To build the binaries, run Build-tools/Do-linux-build
diff --git a/Docs/sp-imp-spec.txt b/Docs/sp-imp-spec.txt
deleted file mode 100644
index 52389ea50f4..00000000000
--- a/Docs/sp-imp-spec.txt
+++ /dev/null
@@ -1,1100 +0,0 @@
-
- Implementation specification for Stored Procedures
- ==================================================
-
-
-- How parsing and execution of queries work
-
- In order to execute a query, the function sql_parse.cc:mysql_parse() is
- called, which in turn calls the parser (yyparse()) with an updated Lex
- structure as the result. mysql_parse() then calls mysql_execute_command()
- which dispatches on the command code (in Lex) to the corresponding code for
- executing that particular query.
-
- There are three structures involved in the execution of a query which are of
- interest to the stored procedure implementation:
-
- - Lex (mentioned above) is the "compiled" query, that is the output from
- the parser and what is then interpreted to do the actual work.
- It constains an enum value (sql_command) which is the query type, and
- all the data collected by the parser needed for the execution (table
- names, fields, values, etc).
- - THD is the "run-time" state of a connection, containing all that is
- needed for a particular client connection, and, among other things, the
- Lex structure currently being executed.
- - Item_*: During parsing, all data is translated into "items", objects of
- the subclasses of "Item", such as Item_int, Item_real, Item_string, etc,
- for basic datatypes, and also various more specialized Item types for
- expressions to be evaluated (Item_func objects).
-
-
-- How to fit Stored Procedure into this scheme
-
- - An overview of the classes and files for stored procedures
- (More detailed APIs at the end of this file)
-
- - class sp_head (sp_head.{cc,h})
- This contains, among other things, an array of "instructions" and the
- method for executing the procedure.
-
- - class sp_pcontext (sp_pcontext.{cc,h}
- This is the parse context for the procedure. It's primarily used during
- parsing to keep track of local parameters, variables and labels, but
- it's also used at CALL time do find parameters mode (IN, OUT or INOUT)
- and type when setting up the runtime context.
-
- - class sp_instr (sp_head.{cc,h})
- This is the base class for "instructions", that is, what is generated
- by the parser. It turns out that we only need a minimum of 5 different
- sub classes:
- - sp_instr_stmt
- Execute a statement. This is the "call-out" any normal SQL statement,
- like a SELECT, INSERT etc. It contains the Lex structure for the
- statement in question.
- - sp_instr_set
- Set the value of a local variable (or parameter)
- - sp_instr_jump
- An unconditional jump.
- - sp_instr_jump_if_not
- Jump if condition is not true. It turns out that the negative test is
- most convenient when generating the code for the flow control
- constructs.
- - sp_instr_freturn
- Return a value from a FUNCTION and exit.
- For condition HANDLERs some special instructions are also needed, see
- that section below.
-
- - class sp_rcontext (sp_rcontext.h)
- This is the runtime context in the THD structure.
- It contains an array of items, the parameters and local variables for
- the currently executing stored procedure.
- This means that variable value lookup is in runtime is constant time,
- a simple index operation.
-
- - class Item_splocal (Item.{cc,h})
- This is a subclass of Item. Its sole purpose is to hide the fact that
- the real Item is actually in the current frame (runtime context).
- It contains the frame offset and defers all methods to the real Item
- in the frame. This is what the parser generates for local variables.
-
- - Utility functions (sp.{cc,h})
- This contains functions for creating, dropping and finding a stored
- procedure in the mysql.proc table (or the internal cache).
-
-
- - Parsing CREATE PROCEDURE ...
-
- When parsing a CREATE PROCEDURE the parser first initializes the
- sphead and spcont (runtime context) fields in the Lex.
- The sql_command code for the result of parsing a is
- SQLCOM_CREATE_PROCEDURE.
-
- The parsing of the parameter list and body is relatively
- straight-forward:
-
- - Parameters:
- name, type and mode (IN/OUT/INOUT) is pushed to spcont
- - Declared local variables:
- Same as parameters (mode is then IN)
- - Local Variable references:
- If an identifier is found in in spcont, an Item_splocal is created
- with the variable's frame index, otherwise an Item_field or Item_ref
- is created (as before).
- - Statements:
- The Lex in THD is replaced by a new Lex structure and the statement,
- is parsed as usual. A sp_instr_stmt is created, containing the new
- Lex, and added to the instructions in sphead.
- Afterwards, the procedure's Lex is restored in THD.
- - SET var:
- Setting a local variable generates a sp_instr_set instruction,
- containing the variable's frame offset, the expression (an Item),
- and the type.
- - Flow control:
- Flow control constructs like, IF, WHILE, etc, generate a conditional
- and unconditional jumps in the "obvious" way, but a few notes may
- be required:
- - Forward jumps: When jumping forward, the exact destination is not
- known at the time of the creation of the jump instruction. The
- sphead therefore contains list of instruction-label pairs for
- each forward reference. When the position later is known, the
- instructions in the list are updated with the correct location.
- - Loop constructs have optional labels. If a loop doesn't have a
- label, an anonymous label is generated to simplify the parsing.
- - There are two types of CASE. The "simple" case is implemented
- with an anonymous variable bound to the value to be tested.
-
-
- - A simple example
-
- Parsing the procedure:
-
- create procedure a(s char(16))
- begin
- declare x int;
- set x = 3;
- while x > 0 do
- set x = x-1;
- insert into db.tab values (x, s);
- end while;
- end
-
- would generate the following structures:
- ______
- thd: | | _________
- | lex -+--->| | ___________________
- |______| | spcont -+------------------->| "s",in,char(16):0 |
- | sphead -+------ |("x",in,int :1)|
- |_________| | |___________________|
- ____V__________________
- | m_name: "a" |
- | m_defstr: "create ..."|
- | m_instr: ... |
- |_______________________|
-
- Note that the contents of the spcont is changing during the parsing,
- at all times reflecting the state of the would-be runtime frame.
- The m_instr is an array of instructions:
-
- Pos. Instruction
- 0 sp_instr_set(1, '3')
- 1 sp_instr_jump_if_not(5, 'x>0')
- 2 sp_instr_set(1, 'x-1')
- 3 sp_instr_stmt('insert into ...')
- 4 sp_instr_jump(1)
- 5 <end>
-
- Here, '3', 'x>0', etc, represent the Items or Lex for the respective
- expressions or statements.
-
-
- - Parsing CREATE FUNCTION ...
-
- Creating a functions is essentially the same thing as for a PROCEDURE,
- with the addition that a FUNCTION has a return type and a RETURN
- statement, but no OUT or INOUT parameters.
-
- The main difference during parsing is that we store the result type
- in the sp_head. However, there are big differences when it comes to
- invoking a FUNCTION. (See below.)
-
-
- - Storing, caching, dropping...
-
- As seen above, the entired definition string, including the "CREATE
- PROCEDURE" (or "FUNCTION") is kept. The procedure definition string is
- stored in the table mysql.proc with the name and type as the key, the
- type being one of the enum ("procedure","function").
-
- A PROCEDURE is just stored in the mysql.proc table. A FUNCTION has an
- additional requirement. They will be called in expressions with the same
- syntax as UDFs, so UDFs and stored FUNCTIONs share the namespace. Thus,
- we must make sure that we do not have UDFs and FUNCTIONs with the same
- name (even if they are stored in different places).
-
- This means that we can reparse the procedure as many time as we want.
- The first time, the resulting Lex is used to store the procedure in
- the database (using the function sp.c:sp_create_procedure()).
-
- The simplest way would be to just leave it at that, and re-read the
- procedure from the database each time it is called. (And in fact, that's
- the way the earliest implementation will work.)
- However, this is not very efficient, and we can do better. The full
- implementation should work like this:
-
- 1) Upon creation time, parse and store the procedure. Note that we still
- need to parse it to catch syntax errors, but we can't check if called
- procedures exists for instance.
- 2) Upon first CALL, read from the database, parse it, and cache the
- resulting Lex in memory. This time we can do more error checking.
- 3) Upon subsequent CALLs, use the cached Lex.
-
- Note that this implies that the Lex structure with its sphead must be
- reentrant, that is, reusable and shareable between different threads
- and calls. The runtime state for a procedure is kept in the sp_rcontext
- in THD.
-
- The mechanisms of storing, finding, and dropping procedures are
- encapsulated in the files sp.{cc,h}.
-
-
- - CALLing a procedure
-
- A CALL is parsed just like any statement. The resulting Lex has the
- sql_command SQLCOM_CALL, the procedure's name and the parameters are
- pushed to the Lex' value_list.
-
- sql_parse.cc:mysql_execute_command() then uses sp.cc:sp_find() to
- get the sp_head for the procedure (which may have been read from the
- database or fetched from the in-memory cache) and calls the sp_head's
- method execute().
- Note: It's important that substatements called by the procedure do not
- do send_ok(). Fortunately, there is a flag in THD->net to disable
- this during CALLs. If a substatement fails, it will however send
- an error back to the client, so the CALL mechanism must return
- immediately and without sending an error.
-
- The sp_head::execute() method works as follows:
-
- 1) Keep a pointer to the old runtime context in THD (if any)
- 2) Create a new runtime context. The information about the required size
- is in sp_head's parse time context.
- 3) Push each parameter (from the CALL's Lex->value_list) to the new
- context. If it's an OUT or INOUT parameter, the parameter's offset
- in the caller's frame is set in the new context as well.
- 4) For each instruction, call its execute() method.
- The result is a pointer to the next instruction to execute (or NULL)
- if an error occurred.
- 5) On success, set the new values of the OUT and INOUT parameters in
- the caller's frame.
-
- - USE database
-
- Before executing the instruction we also keeps the current default
- database (if any). If this was changed during execution (i.e. a "USE"
- statement has been executed), we restore the current database to the
- original.
-
- This is the most useful way to handle USE in procedures. If we didn't,
- the caller would find himself in a different database after calling
- a function, which can be confusing.
- Restoring the database also gives full freedom to the procedure writer:
- - It's possible to write "general" procedures that are independent of
- the actual database name.
- - It's possible to write procedures that work on a particular database
- by calling USE, without having to use fully qualified table names
- everywhere (which doesn't help if you want to call other, "general",
- procedures anyway).
-
- - Evaluating Items
-
- There are three occasions where we need to evaluate an expression:
-
- - When SETing a variable
- - When CALLing a procedure
- - When testing an expression for a branch (in IF, WHILE, etc)
-
- The semantics in stored procedures is "call-by-value", so we have to
- evaluate any "func" Items at the point of the CALL or SET, otherwise
- we would get a kind of "lazy" evaluation with unexpected results with
- respect to OUT parameters for instance.
- For this the support function, sp_head.cc:eval_func_item() is needed.
-
-
- - Calling a FUNCTION
-
- Functions don't have an explicit call keyword like procedures. Instead,
- they appear in expressions with the conventional syntax "fun(arg, ...)".
- The problem is that we already have User Defined Functions (UDFs) which
- are called the same way. A UDF is detected by the lexical analyzer (not
- the parser!), in the find_keyword() function, and returns a UDF_*_FUNC
- or UDA_*_SUM token with the udf_func object as the yylval.
-
- So, stored functions must be handled in a simpilar way, and as a
- consequence, UDFs and functions must not have the same name.
-
- - Detecting and parsing a FUNCTION invocation
-
- The existence of UDFs are checked during the lexical analysis (in
- sql_lex.cc:find_keyword()). This has the drawback that they must
- exist before they are referred to, which was ok before SPs existed,
- but then it becomes a problem. The first implementation of SP FUNCTIONs
- will work the same way, but this should be fixed a.s.a.p. (This will
- required some reworking of the way UDFs are handled, which is why it's
- not done from the start.)
- For the time being, a FUNCTION is detected the same way, and returns
- the token SP_FUNC. During the parsing we only check for the *existence*
- of the function, we don't parse it, since wa can't call the parser
- recursively.
-
- When encountering a SP_FUNC with parameters in the expression parser,
- an instance of the new Item_func_sp class is created. Unlike UDFs, we
- don't have different classes for different return types, since we at
- this point don't know the type.
-
- - Collecting FUNCTIONs to invoke
-
- A FUNCTION differs from a PROCEDURE in one important aspect: Whereas a
- PROCEDURE is CALLed as statement by itself, a FUNCTION is invoked
- "on-the-fly" during the execution of *another* statement.
- This makes things a lot more complicated compared to CALL:
- - We can't read and parse the FUNCTION from the mysql.proc table at the
- point of invocation; the server requires that all tables used are
- opened and locked at the beginning of the query execution.
- One "obvious" solution would be to simply push "mysql.proc" to the list
- of tables used by the query, but this implies a "join" with this table
- if the query is a select, so it doesn't work (and we can't exclude this
- table easily; since a privileged used might in fact want to search
- the proc table).
- Another solution would of course be to allow the opening and closing
- of the mysql.proc table during a query execution, but this it not
- possible at the present.
-
- So, the solution is to collect the names of the referred FUNCTIONs during
- parsing in the lex.
- Then, before doing anything else in mysql_execute_command(), read all
- functions from the database an keep them in the THD, where the function
- sp_find_function() can find them during the execution.
- Note: Even with an in-memory cache, we must still make sure that the
- functions are indeed read and cached at this point.
- The code that read and cache functions from the database must also be
- invoked recursively for each read FUNCTION to make sure we have *all* the
- functions we need.
-
-
- - Parsing DROP PROCEDURE/FUNCTION
-
- The procedure name is pushed to Lex->value_list.
- The sql_command code for the result of parsing a is
- SQLCOM_DROP_PROCEDURE/SQLCOM_DROP_FUNCTION.
-
- Dropping is done by simply getting the procedure with the sp_find()
- function and calling sp_drop() (both in sp.{cc,h}).
-
- DROP PROCEDURE/FUNCTION also supports the non-standard "IF EXISTS",
- analogous to other DROP statements in MySQL.
-
-
- - Condition and Handlers
-
- Condition names are lexical entities and are kept in the parser context
- just like variables. But, condition are just "aliases" for SQLSTATE
- strings, or mysqld error codes (which is a non-standard extension in
- MySQL), and are only used during parsing.
-
- Handlers comes in three types, CONTINUE, EXIT and UNDO. The latter is
- like an EXIT handler with an implicit rollback, and is currently not
- implemented.
- The EXIT handler jumps to the end of its BEGIN-END block when finished.
- The CONTINUE handler returns to the statement following that which
- invoked the handler.
-
- The handlers in effect at any point is part of each thread's runtime
- state, so we need to push and pop handlers in the sp_rcontext during
- execution. We use special instructions for this:
- - sp_instr_hpush_jump
- Push a handler. The instruction contains the necessary information,
- like which conditions we handle and the location of the handler.
- The jump takes us to the location after the handler code.
- - sp_instr_hpop
- Pop the handlers of the current frame (which we are just leaving).
-
- It might seems strange to jump past the handlers like that, but there's
- no extra cost in doing this, and for technical reasons it's easiest for
- the parser to generate the handler instructions when they occur in the
- source.
-
- When an error occurs, one of the error routines is called and an error
- message is normally sent back to the client immediately.
- Catching a condition must be done in these error routines (there are
- quite a few) to prevent them from doing this. We do this by calling
- a method in the THD's sp_rcontext (if there is one). If a handler is
- found, this is recorded in the context and the routine returns without
- sending the error message.
- The execution loop (sp_head::execute()) checks for this after each
- statement and invokes the handler that has been found. If several
- errors or warnings occurs during one statement, only the first is
- caught, the rest are ignored.
-
- Invoking and returning from a handler is trivial in the EXIT case.
- We simply jump to it, and it will have an sp_instr_jump as its last
- instruction.
-
- Calling and returning from a CONTINUE handler poses some special
- problems. Since we need to return to the point after its invocation,
- we push the return location on a stack in the sp_rcontext (this is
- done by the execution loop). The handler then ends with a special
- instruction, sp_instr_hreturn, which returns to this location.
-
- CONTINUE handlers have one additional problem: They are parsed at
- the lexical level where they occur, so variable offsets will assume
- that it's actually called at that level. However, a handler might be
- invoked from a sub-block where additional local variables have been
- declared, which will then share the location of any local variables
- in the handler itself. So, when calling a CONTINUE handler, we need
- to save any local variables above the handler's frame offset, and
- restore them upon return. (This is not a problem for EXIT handlers,
- since they will leave the block anyway.)
- This is taken care of by the execution loop and the sp_instr_hreturn
- instruction.
-
- - Examples:
-
- - EXIT handler
- begin
- declare x int default 0;
-
- begin
- declare exit handler for 'XXXXX' set x = 1;
-
- (statement1);
- (statement2);
- end;
- (statement3);
- end
-
- Pos. Instruction
- 0 sp_instr_set(0, '0')
- 1 sp_instr_hpush_jump(4, 1) # location and frame size
- 2 sp_instr_set(0, '1')
- 3 sp_instr_jump(6)
- 4 sp_instr_stmt('statement1')
- 5 sp_instr_stmt('statement2')
- 6 sp_instr_hpop(1)
- 7 sp_instr_stmt('statement3')
-
- - CONTINUE handler
- create procedure hndlr1(val int)
- begin
- declare x int default 0;
- declare foo condition for 1146;
- declare continue handler for foo set x = 1;
-
- insert into t3 values ("hndlr1", val); # Non-existing table?
- if x>0 then
- insert into t1 values ("hndlr1", val); # This instead then
- end if;
- end|
-
- Pos. Instruction
- 0 sp_instr_set(1, '0')
- 1 sp_instr_hpush_jump(4, 2)
- 2 sp_instr_set(1, '1')
- 3 sp_instr_hreturn(2) # frame size
- 4 sp_instr_stmt('insert ... t3 ...')
- 5 sp_instr_jump_if_not(7, 'x>0')
- 6 sp_instr_stmt('insert ... t1 ...')
- 7 sp_instr_hpop(2)
-
-
- - Cursors
-
- For stored procedures to be really useful, you want to have cursors.
- MySQL doesn't yet have "real" cursor support (with API and ODBC support,
- allowing updating, arbitrary scrolling, etc), but a simple asensitive,
- non-scrolling, read-only cursor can be implemented in SPs using the
- class Protocol_cursor.
- This class intecepts the creation and sending of results sets and instead
- stores it in-memory, as MYSQL_FIELDS and MYSQL_ROWS (as in the client API).
-
- To support this, we need the usual name binding support in sp_pcontext
- (similar to variables and conditions) to keep track on declared cursor
- names, and a corresponding run-time mechanism in sp_rcontext.
- Cursors are lexically scoped like everything with a body or BEGIN/END
- block, so they are pushed and poped as usual (see conditions and variables
- above).
- The basic operations on a cursor are OPEN, FETCH and CLOSE, which will
- each have a corresponding instruction. In addition, we need instructions
- to push a new cursor (this will encapsulate the LEX of the SELECT statement
- of the cursor), and a pop instruction:
- - sp_instr_cpush
- Push a cursor to the sp_rcontext. This instruction contains the LEX
- for the select statement
- - sp_instr_cpop
- Pop a number of cursors from the sp_rcontext.
- - sp_instr_copen
- Open a cursor: This will execute the select and get the result set
- in a sepeate memroot.
- - sp_instr_cfetch
- Fetch the next row from the in-memory result set. The instruction
- contains a list of the variables (frame offsets) to set.
- - sp_instr_cclose
- Free the result set.
-
- A cursor is a separate class, sp_cursor (defined in sp_rcontex.h) which
- encapsulates the basic operations used by the above instructions.
- This class contains the LEX, Protocol_cursor object, and its memroot,
- as well as the cursor's current state.
- Compiling and executing is fairly straight-forward. sp_instr_copen is
- a subclass of sp_instr_stmt and uses its mechanism to execute a
- substatement.
-
- - Example:
-
- begin
- declare x int;
- declare c cursor for select a from t1;
-
- open c;
- fetch c into x;
- close c;
- end
-
- Pos. Instruction
- 0 sp_instr_cpush('select a from ...')
- 1 sp_instr_copen(0) # The 0'th cursor
- 2 sp_instr_cfetch(0) # Contains the variable list
- 3 sp_instr_cclose(0)
- 4 sp_instr_cpop(1)
-
-
-
- - The SP cache
-
- There are two ways to cache SPs:
-
- 1) one global cache, share by all threads/connections,
- 2) one cache per thread.
-
- There are pros and cons with both methods:
-
- 1) Pros: Save memory, each SP only read from table once,
- Cons: Needs locking (= serialization at access), requires thread-safe
- data structures,
- 2) Pros: Fast, no locking required (almost), limited thread-safe
- requirement,
- Cons: Uses more memory, each SP read from table once per thread.
-
- Unfortunately, we cannot use alternative 1 for the time being, as most
- of the data structures to be cached (lex and items) are not reentrant
- and thread-safe. (Things are modified at execution, we have THD pointers
- stored everywhere, etc.)
- This leaves us with alternative 2, one cache per thread; or actually
- two, since we keep FUNCTIONs and PROCEDUREs in separate caches.
- This is not that terrible; the only case when it will perform
- significantly worse than a global cache is when we have an application
- where new threads are connecting, calling a procedure, and disconnecting,
- over and over again.
-
- The cache implementation itself is simple and straightforward, a hashtable
- wrapped in a class and a C API (see APIs below).
-
- There is however one issue with multiple caches: dropping and altering
- procedures. Normally, this should be a very rare event in a running
- system; it's typically something you do during development and testing,
- so it's not unthinkable that we would simply ignore the issue and let
- any threads running with a cached version of an SP keep doing so until
- its disconnected.
- But assuming we want to keep the caches consistent with respect to drop
- and alter, it can be done:
-
- 1) A global counter is needed, initialized to 0 at start.
- 2) At each DROP or ALTER, increase the counter by one.
- 3) Each cache has its own copy of the counter, copied at the last read.
- 4) When looking up a name in the cache, first check if the global counter
- is larger than the local copy.
- If so, clear the cache and return "not found", and update the local
- counter; otherwise, lookup as usual.
-
- This minimizes the cost to a single brief lock for the access of an
- integer when operating normally. Only in the event of an actual drop or
- alter, is the cache cleared. This may seem to be drastic, but since we
- assume that this is a rare event, it's not a problem.
- It would of course be possible to have a much more fine-grained solution,
- keeping track of each SP, but the overhead of doing so is not worth the
- effort.
-
-
- - Class and function APIs
- This is an outline of the key types. Some types and other details
- in the actual files have been omitted for readability.
-
- - The parser context: sp_pcontext.h
-
- typedef enum
- {
- sp_param_in,
- sp_param_out,
- sp_param_inout
- } sp_param_mode_t;
-
- typedef struct
- {
- LEX_STRING name;
- enum enum_field_types type;
- sp_param_mode_t mode;
- uint offset; // Offset in current frame
- my_bool isset;
- } sp_pvar_t;
-
- typedef struct sp_cond_type
- {
- enum { number, state, warning, notfound, exception } type;
- char sqlstate[6];
- uint mysqlerr;
- } sp_cond_type_t;
-
- class sp_pcontext
- {
- sp_pcontext();
-
- // Return the maximum frame size
- uint max_framesize();
-
- // Return the current frame size
- uint current_framesize();
-
- // Return the number of parameters
- uint params();
-
- // Set the number of parameters to the current frame size
- void set_params();
-
- // Set type of the variable at offset 'i' in the frame
- void set_type(uint i, enum enum_field_types type);
-
- // Mark the i:th variable to "set" (i.e. having a value) with
- // 'val' true.
- void set_isset(uint i, my_bool val);
-
- // Push the variable 'name' to the frame.
- void push_var(LEX_STRING *name,
- enum enum_field_types type, sp_param_mode_t mode);
-
- // Pop 'num' variables from the frame.
- void pop_var(uint num = 1);
-
- // Find variable by name
- sp_pvar_t *find_pvar(LEX_STRING *name);
-
- // Find variable by index
- sp_pvar_t *find_pvar(uint i);
-
- // Push label 'name' of instruction index 'ip' to the label context
- sp_label_t *push_label(char *name, uint ip);
-
- // Find label 'name' in the context
- sp_label_t *find_label(char *name);
-
- // Return the last pushed label
- sp_label_t *last_label();
-
- // Return and remove the last pushed label.
- sp_label_t *pop_label();
-
- // Push a condition to the context
- void push_cond(LEX_STRING *name, sp_cond_type_t *val);
-
- // Pop a 'num' condition from the context
- void pop_cond(uint num);
-
- // Find a condition in the context
- sp_cond_type_t *find_cond(LEX_STRING *name);
-
- // Increase the handler count
- void add_handler();
-
- // Returns the handler count
- uint handlers();
-
- // Push a cursor
- void push_cursor(LEX_STRING *name);
-
- // Find a cursor
- my_bool find_cursor(LEX_STRING *name, uint *poff);
-
- // Pop 'num' cursors
- void pop_cursor(uint num);
-
- // Return the number of cursors
- uint cursors();
- }
-
-
- - The run-time context (call frame): sp_rcontext.h
-
- #define SP_HANDLER_NONE 0
- #define SP_HANDLER_EXIT 1
- #define SP_HANDLER_CONTINUE 2
- #define SP_HANDLER_UNDO 3
-
- typedef struct
- {
- struct sp_cond_type *cond;
- uint handler; // Location of handler
- int type;
- uint foffset; // Frame offset for the handlers declare level
- } sp_handler_t;
-
- class sp_rcontext
- {
- // 'fsize' is the max size of the context, 'hmax' the number of handlers,
- // 'cmax' the number of cursors
- sp_rcontext(uint fsize, uint hmax, , uint cmax);
-
- // Push value (parameter) 'i' to the frame
- void push_item(Item *i);
-
- // Set slot 'idx' to value 'i'
- void set_item(uint idx, Item *i);
-
- // Return the item in slot 'idx'
- Item *get_item(uint idx);
-
- // Set the "out" index 'oidx' for slot 'idx. If it's an IN slot,
- // use 'oidx' -1.
- void set_oindex(uint idx, int oidx);
-
- // Return the "out" index for slot 'idx'
- int get_oindex(uint idx);
-
- // Set the FUNCTION result
- void set_result(Item *i);
-
- // Get the FUNCTION result
- Item *get_result();
-
- // Push handler at location 'h' for condition 'cond'. 'f' is the
- // current variable frame size.
- void push_handler(sp_cond_type_t *cond, uint h, int type, uint f);
-
- // Pop 'count' handlers
- void pop_handlers(uint count);
-
- // Find a handler for this error. This sets the state for a found
- // handler in the context. If called repeatedly without clearing,
- // only the first call's state is kept.
- int find_handler(uint sql_errno);
-
- // Returns 1 if a handler has been found, with '*ip' and '*fp' set
- // to the handler location and frame size respectively.
- int found_handler(uint *ip, uint *fp);
-
- // Clear the found handler state.
- void clear_handler();
-
- // Push a return address for a CONTINUE handler
- void push_hstack(uint ip);
-
- // Pop the CONTINUE handler return stack
- uint pop_hstack();
-
- // Save variables from frame index 'fp' and up.
- void save_variables(uint fp);
-
- // Restore saved variables from to frame index 'fp' and up.
- void restore_variables(uint fp);
-
- // Push a cursor for the statement (lex)
- void push_cursor(LEX *lex);
-
- // Pop 'count' cursors
- void pop_cursors(uint count);
-
- // Pop all cursors
- void pop_all_cursors();
-
- // Get the 'i'th cursor
- sp_cursor *get_cursor(uint i);
-
- }
-
-
- - The procedure: sp_head.h
-
- #define TYPE_ENUM_FUNCTION 1
- #define TYPE_ENUM_PROCEDURE 2
-
- class sp_head
- {
- int m_type; // TYPE_ENUM_FUNCTION or TYPE_ENUM_PROCEDURE
-
- sp_head();
-
- void init(LEX_STRING *name, LEX *lex, LEX_STRING *comment, char suid);
-
- // Store this procedure in the database. This is a wrapper around
- // the function sp_create_procedure().
- int create(THD *);
-
- // Invoke a FUNCTION
- int
- execute_function(THD *thd, Item **args, uint argcount, Item **resp);
-
- // CALL a PROCEDURE
- int
- execute_procedure(THD *thd, List<Item> *args);
-
- // Add the instruction to this procedure.
- void add_instr(sp_instr *);
-
- // Returns the number of instructions.
- uint instructions();
-
- // Returns the last instruction
- sp_instr *last_instruction();
-
- // Resets lex in 'thd' and keeps a copy of the old one.
- void reset_lex(THD *);
-
- // Restores lex in 'thd' from our copy, but keeps some status from the
- // one in 'thd', like ptr, tables, fields, etc.
- void restore_lex(THD *);
-
- // Put the instruction on the backpatch list, associated with
- // the label.
- void push_backpatch(sp_instr *, struct sp_label *);
-
- // Update all instruction with this label in the backpatch list to
- // the current position.
- void backpatch(struct sp_label *);
-
- // Returns the SP name (with optional length in '*lenp').
- char *name(uint *lenp = 0);
-
- // Returns the result type for a function
- Item_result result();
-
- // Sets various attributes
- void sp_set_info(char *creator, uint creatorlen,
- longlong created, longlong modified,
- bool suid, char *comment, uint commentlen);
- }
-
-
- - Instructions
-
- - The base class:
- class sp_instr
- {
- // 'ip' is the index of this instruction
- sp_instr(uint ip);
-
- // Execute this instrution.
- // '*nextp' will be set to the index of the next instruction
- // to execute. (For most instruction this will be the
- // instruction following this one.)
- // Returns 0 on success, non-zero if some error occurred.
- virtual int execute(THD *, uint *nextp)
- }
-
- - Statement instruction:
- class sp_instr_stmt : public sp_instr
- {
- sp_instr_stmt(uint ip);
-
- int execute(THD *, uint *nextp);
-
- // Set the statement's Lex
- void set_lex(LEX *);
-
- // Return the statement's Lex
- LEX *get_lex();
- }
-
- - SET instruction:
- class sp_instr_set : public sp_instr
- {
- // 'offset' is the variable's frame offset, 'val' the value,
- // and 'type' the variable type.
- sp_instr_set(uint ip,
- uint offset, Item *val, enum enum_field_types type);
-
- int execute(THD *, uint *nextp);
- }
-
- - Unconditional jump
- class sp_instr_jump : public sp_instr
- {
- // No destination, must be set.
- sp_instr_jump(uint ip);
-
- // 'dest' is the destination instruction index.
- sp_instr_jump(uint ip, uint dest);
-
- int execute(THD *, uint *nextp);
-
- // Set the destination instruction 'dest'.
- void set_destination(uint dest);
- }
-
- - Conditional jump
- class sp_instr_jump_if_not : public sp_instr_jump
- {
- // Jump if 'i' evaluates to false. Destination not set yet.
- sp_instr_jump_if_not(uint ip, Item *i);
-
- // Jump to 'dest' if 'i' evaluates to false.
- sp_instr_jump_if_not(uint ip, Item *i, uint dest)
-
- int execute(THD *, uint *nextp);
- }
-
- - Return a function value
- class sp_instr_freturn : public sp_instr
- {
- // Return the value 'val'
- sp_instr_freturn(uint ip, Item *val, enum enum_field_types type);
-
- int execute(THD *thd, uint *nextp);
- }
-
- - Push a handler and jump
- class sp_instr_hpush_jump : public sp_instr_jump
- {
- // Push handler of type 'htype', with current frame size 'fp'
- sp_instr_hpush_jump(uint ip, int htype, uint fp);
-
- int execute(THD *thd, uint *nextp);
-
- // Add condition for this handler
- void add_condition(struct sp_cond_type *cond);
- }
-
- - Pops handlers
- class sp_instr_hpop : public sp_instr
- {
- // Pop 'count' handlers
- sp_instr_hpop(uint ip, uint count);
-
- int execute(THD *thd, uint *nextp);
- }
-
- - Return from a CONTINUE handler
- class sp_instr_hreturn : public sp_instr
- {
- // Return from handler, and restore variables to 'fp'.
- sp_instr_hreturn(uint ip, uint fp);
-
- int execute(THD *thd, uint *nextp);
- }
-
- - Push a CURSOR
- class sp_instr_cpush : public sp_instr_stmt
- {
- // Push a cursor for statement 'lex'
- sp_instr_cpush(uint ip, LEX *lex)
-
- int execute(THD *thd, uint *nextp);
- }
-
- - Pop CURSORs
- class sp_instr_cpop : public sp_instr_stmt
- {
- // Pop 'count' cursors
- sp_instr_cpop(uint ip, uint count)
-
- int execute(THD *thd, uint *nextp);
- }
-
- - Open a CURSOR
- class sp_instr_copen : public sp_instr_stmt
- {
- // Open the 'c'th cursor
- sp_instr_copen(uint ip, uint c);
-
- int execute(THD *thd, uint *nextp);
- }
-
- - Close a CURSOR
- class sp_instr_cclose : public sp_instr
- {
- // Close the 'c'th cursor
- sp_instr_cclose(uint ip, uint c);
-
- int execute(THD *thd, uint *nextp);
- }
-
- - Fetch a row with CURSOR
- class sp_instr_cfetch : public sp_instr
- {
- // Fetch next with the 'c'th cursor
- sp_instr_cfetch(uint ip, uint c);
-
- int execute(THD *thd, uint *nextp);
-
- // Add a target variable for the fetch
- void add_to_varlist(struct sp_pvar *var);
- }
-
-
- - Utility functions: sp.h
-
- #define SP_OK 0
- #define SP_KEY_NOT_FOUND -1
- #define SP_OPEN_TABLE_FAILED -2
- #define SP_WRITE_ROW_FAILED -3
- #define SP_DELETE_ROW_FAILED -4
- #define SP_GET_FIELD_FAILED -5
- #define SP_PARSE_ERROR -6
-
- // Finds a stored procedure given its name. Returns NULL if not found.
- sp_head *sp_find_procedure(THD *, LEX_STRING *name);
-
- // Store the procedure 'name' in the database. 'def' is the complete
- // definition string ("create procedure ...").
- int sp_create_procedure(THD *,
- char *name, uint namelen,
- char *def, uint deflen,
- char *comment, uint commentlen, bool suid);
-
- // Drop the procedure 'name' from the database.
- int sp_drop_procedure(THD *, char *name, uint namelen);
-
- // Finds a stored function given its name. Returns NULL if not found.
- sp_head *sp_find_function(THD *, LEX_STRING *name);
-
- // Store the function 'name' in the database. 'def' is the complete
- // definition string ("create function ...").
- int sp_create_function(THD *,
- char *name, uint namelen,
- char *def, uint deflen,
- char *comment, uint commentlen, bool suid);
-
- // Drop the function 'name' from the database.
- int sp_drop_function(THD *, char *name, uint namelen);
-
-
- - The cache: sp_cache.h
-
- /* Initialize the SP caching once at startup */
- void sp_cache_init();
-
- /* Clear the cache *cp and set *cp to NULL */
- void sp_cache_clear(sp_cache **cp);
-
- /* Insert an SP to cache. If **cp points to NULL, it's set to a
- new cache */
- void sp_cache_insert(sp_cache **cp, sp_head *sp);
-
- /* Lookup an SP in cache */
- sp_head *sp_cache_lookup(sp_cache **cp, char *name, uint namelen);
-
- /* Remove an SP from cache */
- void sp_cache_remove(sp_cache **cp, sp_head *sp);
-
-
- - The mysql.proc schema:
-
- CREATE TABLE proc (
- db char(64) binary DEFAULT '' NOT NULL,
- name char(64) DEFAULT '' NOT NULL,
- type enum('FUNCTION','PROCEDURE') NOT NULL,
- specific_name char(64) DEFAULT '' NOT NULL,
- language enum('SQL') DEFAULT 'SQL' NOT NULL,
- sql_data_access enum('CONTAINS_SQL') DEFAULT 'CONTAINS_SQL' NOT NULL,
- is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL,
- security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,
- param_list blob DEFAULT '' NOT NULL,
- returns char(64) DEFAULT '' NOT NULL,
- body blob DEFAULT '' NOT NULL,
- definer char(77) binary DEFAULT '' NOT NULL,
- created timestamp,
- modified timestamp,
- sql_mode set(
- 'REAL_AS_FLOAT',
- 'PIPES_AS_CONCAT',
- 'ANSI_QUOTES',
- 'IGNORE_SPACE',
- 'IGNORE_BAD_TABLE_OPTIONS',
- 'ONLY_FULL_GROUP_BY',
- 'NO_UNSIGNED_SUBTRACTION',
- 'NO_DIR_IN_CREATE',
- 'POSTGRESQL',
- 'ORACLE',
- 'MSSQL',
- 'DB2',
- 'MAXDB',
- 'NO_KEY_OPTIONS',
- 'NO_TABLE_OPTIONS',
- 'NO_FIELD_OPTIONS',
- 'MYSQL323',
- 'MYSQL40',
- 'ANSI',
- 'NO_AUTO_VALUE_ON_ZERO'
- ) DEFAULT 0 NOT NULL,
- comment char(64) binary DEFAULT '' NOT NULL,
- PRIMARY KEY (db,name,type)
- ) comment='Stored Procedures';
-
- --
-
diff --git a/KNOWN_BUGS.txt b/KNOWN_BUGS.txt
index 56c9102b0cd..af65c98590d 100644
--- a/KNOWN_BUGS.txt
+++ b/KNOWN_BUGS.txt
@@ -1,35 +1,15 @@
-This file should contain all known fatal bugs in Mariadb and the Aria
-storage engine for the last source or binary release. Minor bugs,
-extensions and feature requests, and bugs found since this release can
-be found in the MariaDB bugs database at: http://mariadb.org/jira and
-in the MySQL bugs databases at: http://bugs.mysql.com/ (category
-"Maria storage engine").
+This file should contain all known fatal bugs in MariaDB for the last
+source or binary release. Minor bugs, extensions and feature requests,
+and bugs found since this release can be found in the MariaDB bugs
+database at: https://jira.mariadb.org
There should not normally be any bugs which affect normal operations
in any MariaDB release. Still, there are always exceptions and edge
cases and that is what this file is for.
-If you have found a bug that is not listed here, please add it to
-http://mariadb.org/jira so we can either fix it for next release or in
-the worst case add it here for others to know!
+If you have find bug please add it to https://jira.mariadb.org so
+that we are can try to fix it for the next release. You can also add
+feature request to the JIRA.
-
-IMPORTANT:
-
-If you have been using the Maria (now Aria) storage engine with the
-MySQL-5.1-Maria-alpha build and are upgrading to a newer MariaDB you
-MUST run [m]aria_chk --recover on all your Aria tables. This is because
-we made an incompatible change with how the transaction id is stored
-and old transaction id's must be reset!
-
-cd mysql-data-directory
-aria_chk --recover */*.MAI
-
-Going forward, we will do our best to not introduce any incompatible
-changes in the data format for Aria tables. If this would be ever be
-needed, we will, if possible, support both the old and the new version
-to make upgrades as easy as possible.
-
-Note that for the MariaDB 5.1 release the Aria storage engine is
-classified as 'beta'; It should work, but use it with caution. Please
-report all bugs to http://mariadb.org/jira so we can fix them!
+The latest documentation for the MariaDB server can be found at:
+https://mariadb.com/kb
diff --git a/README.md b/README.md
index d208d171377..6ea89565bfb 100644
--- a/README.md
+++ b/README.md
@@ -8,13 +8,13 @@ Code status:
MariaDB is designed as a drop-in replacement of MySQL(R) with more
features, new storage engines, fewer bugs, and better performance.
-MariaDB is brought to you by the MariaDB Foundation.
+MariaDB is brought to you by the MariaDB Foundation and the MariaDB corporation.
Please read the CREDITS file for details about the MariaDB Foundation,
and who is developing MariaDB.
MariaDB is developed by many of the original developers of MySQL who
-now work for the MariaDB Foundation and the MariaDB Corporation, and by many people in
-the community.
+now work for the MariaDB Corporation, the MariaDB Foundation and by
+many people in the community.
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
Corporation, Inc. For a list of developers and other contributors,
@@ -23,29 +23,36 @@ list of active contributors.
A description of the MariaDB project and a manual can be found at:
-https://mariadb.org/
-
https://mariadb.com/kb/en/
https://mariadb.com/kb/en/mariadb-vs-mysql-features/
-https://mariadb.com/kb/en/mariadb-versus-mysql-features/
-
https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/
+https://mariadb.com/kb/en/library/new-and-old-releases/
+
+https://mariadb.org/
+
As MariaDB is a full replacement of MySQL, the MySQL manual at
http://dev.mysql.com/doc is generally applicable.
-Help:
+Help
-----
More help is available from the Maria Discuss mailing list
https://launchpad.net/~maria-discuss
and the #maria IRC channel on Freenode.
+Live QA for beginner contributors
+----
+MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip and IRC.
+From 8:00 to 10:00 UTC on Mondays, and 10:00 to 12:00 UTC on Thursdays,
+anyone can ask any questions they’d like, and a live developer will be available to assist.
+
+New contributors can ask questions any time, but we will provide immediate feedback during that interval.
-Licensing:
-----------
+Licensing
+---------
***************************************************************************
@@ -61,7 +68,7 @@ license information can be found in the THIRDPARTY file.
***************************************************************************
-Bug Reports:
+Bug Reports
------------
Bug and/or error reports regarding MariaDB should be submitted at:
diff --git a/VERSION b/VERSION
index 92848892dc8..ec02fb54be8 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
MYSQL_VERSION_MAJOR=10
-MYSQL_VERSION_MINOR=3
-MYSQL_VERSION_PATCH=37
+MYSQL_VERSION_MINOR=4
+MYSQL_VERSION_PATCH=27
SERVER_MATURITY=stable
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 5822c9f6f08..2267f1df446 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -56,7 +56,6 @@ TARGET_LINK_LIBRARIES(mysqlcheck ${CLIENT_LIB})
MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
TARGET_LINK_LIBRARIES(mysqldump ${CLIENT_LIB})
-
MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c)
SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqlimport ${CLIENT_LIB})
@@ -92,11 +91,9 @@ TARGET_LINK_LIBRARIES(async_example ${CLIENT_LIB})
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin async_example
PROPERTIES HAS_CXX TRUE)
-
-FOREACH(t mysql mysqltest mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysql_plugin mysqlbinlog
+FOREACH(t mysql mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysql_plugin mysqlbinlog
mysqladmin mysqlslap async_example)
ADD_DEPENDENCIES(${t} GenError ${CLIENT_LIB})
ENDFOREACH()
ADD_DEFINITIONS(-DHAVE_DLOPEN)
-
diff --git a/client/client_priv.h b/client/client_priv.h
index 275d3c6853b..a063dbe724c 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -1,6 +1,6 @@
/*
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
- Copyright (c) 2009, 2020, MariaDB
+ Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@ enum options_client
OPT_MAX_ALLOWED_PACKET, OPT_NET_BUFFER_LENGTH,
OPT_SELECT_LIMIT, OPT_MAX_JOIN_SIZE, OPT_SSL_SSL,
OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH,
- OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
+ OPT_SSL_CIPHER, OPT_TLS_VERSION, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
OPT_DELETE_MASTER_LOGS, OPT_COMPACT,
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
- OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
+ OPT_FRM, OPT_SKIP_OPTIMIZATION,
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
@@ -103,6 +103,7 @@ enum options_client
OPT_PRINT_ROW_COUNT, OPT_PRINT_ROW_EVENT_POSITIONS,
OPT_CHECK_IF_UPGRADE_NEEDED,
OPT_COMPATIBILTY_CLEARTEXT_PLUGIN,
+ OPT_SHUTDOWN_WAIT_FOR_SLAVES,
OPT_MAX_CLIENT_OPTION /* should be always the last */
};
diff --git a/client/mysql.cc b/client/mysql.cc
index 4d14dc0f5f6..6c4245fcd90 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -168,6 +168,7 @@ static uint my_end_arg;
static char * opt_mysql_unix_port=0;
static int connect_flag=CLIENT_INTERACTIVE;
static my_bool opt_binary_mode= FALSE;
+static my_bool opt_connect_expired_password= FALSE;
static int interrupted_query= 0;
static char *current_host,*current_db,*current_user=0,*opt_password=0,
*current_prompt=0, *delimiter_str= 0,
@@ -204,10 +205,8 @@ static char delimiter[16]= DEFAULT_DELIMITER;
static uint delimiter_length= 1;
unsigned short terminal_width= 80;
-#ifdef HAVE_SMEM
-static char *shared_memory_base_name=0;
-#endif
static uint opt_protocol=0;
+static const char *opt_protocol_type= "";
static CHARSET_INFO *charset_info= &my_charset_latin1;
#include "sslopt-vars.h"
@@ -289,9 +288,9 @@ static COMMANDS commands[] = {
{ "edit", 'e', com_edit, 0, "Edit command with $EDITOR."},
#endif
{ "ego", 'G', com_ego, 0,
- "Send command to mysql server, display result vertically."},
+ "Send command to MariaDB server, display result vertically."},
{ "exit", 'q', com_quit, 0, "Exit mysql. Same as quit."},
- { "go", 'g', com_go, 0, "Send command to mysql server." },
+ { "go", 'g', com_go, 0, "Send command to MariaDB server." },
{ "help", 'h', com_help, 1, "Display this help." },
#ifdef USE_POPEN
{ "nopager",'n', com_nopager,0, "Disable pager, print to stdout." },
@@ -1042,7 +1041,7 @@ static COMMANDS commands[] = {
};
static const char *load_default_groups[]=
-{ "mysql", "client", "client-server", "client-mariadb", 0 };
+{ "mysql", "mariadb-client", "client", "client-server", "client-mariadb", 0 };
static int embedded_server_arg_count= 0;
static char *embedded_server_args[MAX_SERVER_ARGS];
@@ -1332,9 +1331,6 @@ sig_handler mysql_end(int sig)
my_free(full_username);
my_free(part_username);
my_free(default_prompt);
-#ifdef HAVE_SMEM
- my_free(shared_memory_base_name);
-#endif
my_free(current_prompt);
while (embedded_server_arg_count > 1)
my_free(embedded_server_args[--embedded_server_arg_count]);
@@ -1359,16 +1355,13 @@ static bool do_connect(MYSQL *mysql, const char *host, const char *user,
opt_ssl_capath, opt_ssl_cipher);
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ mysql_options(mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
}
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
(char*)&opt_ssl_verify_server_cert);
#endif
if (opt_protocol)
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
@@ -1541,7 +1534,7 @@ static struct my_option my_long_options[] =
&ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0},
{"init-command", OPT_INIT_COMMAND,
- "SQL Command to execute when connecting to MySQL server. Will "
+ "SQL Command to execute when connecting to MariaDB server. Will "
"automatically be re-executed when reconnecting.",
&opt_init_command, &opt_init_command, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1603,11 +1596,12 @@ static struct my_option my_long_options[] =
"Get progress reports for long running commands (like ALTER TABLE)",
&opt_progress_reports, &opt_progress_reports, 0, GET_BOOL, NO_ARG, 1, 0,
0, 0, 0, 0},
- {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
+ {"prompt", OPT_PROMPT, "Set the command line prompt to this value.",
&current_prompt, &current_prompt, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
- 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
+ &opt_protocol_type, &opt_protocol_type, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
{"quick", 'q',
"Don't cache result, print it row by row. This may slow down the server "
"if the output is suspended. Doesn't use history file.",
@@ -1620,11 +1614,6 @@ static struct my_option my_long_options[] =
&opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"silent", 's', "Be more silent. Print results with a tab as separator, "
"each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name,
- &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"socket", 'S', "The socket file to use for connection.",
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1698,6 +1687,11 @@ static struct my_option my_long_options[] =
"ASCII '\\0' are preserved within strings, whereas by default, '\\r\\n' is "
"translated to '\\n' and '\\0' is disallowed in user input.",
&opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"connect-expired-password", 0,
+ "Notify the server that this client is prepared to handle expired "
+ "password sandbox mode even if --batch was specified.",
+ &opt_connect_expired_password, &opt_connect_expired_password, 0, GET_BOOL,
+ NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
@@ -1791,8 +1785,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case OPT_MYSQL_PROTOCOL:
#ifndef EMBEDDED_LIBRARY
- if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
- opt->name)) <= 0)
+ if (!argument[0])
+ opt_protocol= 0;
+ else if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
+ opt->name)) <= 0)
exit(1);
#endif
break;
@@ -1887,6 +1883,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case 'W':
#ifdef __WIN__
opt_protocol = MYSQL_PROTOCOL_PIPE;
+ opt_protocol_type= "pipe";
#endif
break;
#include <sslopt-case.h>
@@ -3155,7 +3152,7 @@ com_help(String *buffer __attribute__((unused)),
put_info("\nGeneral information about MariaDB can be found at\n"
"http://mariadb.org\n", INFO_INFO);
- put_info("List of all MySQL commands:", INFO_INFO);
+ put_info("List of all client commands:", INFO_INFO);
if (!named_cmds)
put_info("Note that all text commands must be first on line and end with ';'",INFO_INFO);
for (i = 0; commands[i].name; i++)
@@ -3530,6 +3527,7 @@ print_field_types(MYSQL_RES *result)
while ((field = mysql_fetch_field(result)))
{
tee_fprintf(PAGER, "Field %3u: `%s`\n"
+ "Org_field: `%s`\n"
"Catalog: `%s`\n"
"Database: `%s`\n"
"Table: `%s`\n"
@@ -3541,8 +3539,8 @@ print_field_types(MYSQL_RES *result)
"Decimals: %u\n"
"Flags: %s\n\n",
++i,
- field->name, field->catalog, field->db, field->table,
- field->org_table, fieldtype2str(field->type),
+ field->name, field->org_name, field->catalog, field->db,
+ field->table, field->org_table, fieldtype2str(field->type),
get_charset_name(field->charsetnr), field->charsetnr,
field->length, field->max_length, field->decimals,
fieldflags2str(field->flags));
@@ -4708,6 +4706,9 @@ sql_real_connect(char *host,char *database,char *user,char *password,
default_charset= (char *)my_default_csname();
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
+ my_bool can_handle_expired= opt_connect_expired_password || !status.batch;
+ mysql_options(&mysql, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, &can_handle_expired);
+
if (!do_connect(&mysql, host, user, password, database,
connect_flag | CLIENT_MULTI_STATEMENTS))
{
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 0c60ce5bd6e..cd70f14e94a 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -140,13 +140,8 @@ static struct my_option my_long_options[]=
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL,
- "The protocol to use for connection (tcp, socket, pipe, memory).",
+ "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", 0,
- 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"silent", OPT_SILENT, "Print less information", &opt_silent,
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "The socket file to use for connection.",
@@ -182,6 +177,7 @@ static const char *load_default_groups[]=
{
"client", /* Read settings how to connect to server */
"mysql_upgrade", /* Read special settings for mysql_upgrade */
+ "mariadb-upgrade", /* Read special settings for mysql_upgrade */
"client-server", /* Reads settings common between client & server */
"client-mariadb", /* Read mariadb unique client settings */
0
@@ -378,7 +374,6 @@ get_one_option(int optid, const struct my_option *opt,
case 'P': /* --port */
case 'S': /* --socket */
case OPT_MYSQL_PROTOCOL: /* --protocol */
- case OPT_SHARED_MEMORY_BASE_NAME: /* --shared-memory-base-name */
case OPT_PLUGIN_DIR: /* --plugin-dir */
case OPT_DEFAULT_AUTH: /* --default-auth */
add_one_option_cmd_line(&conn_args, opt->name, argument);
@@ -424,7 +419,7 @@ static int run_command(char* cmd,
if (opt_verbose >= 4)
puts(cmd);
- if (!(res_file= popen(cmd, "r")))
+ if (!(res_file= my_popen(cmd, IF_WIN("rt","r"))))
die("popen(\"%s\", \"r\") failed", cmd);
while (fgets(buf, sizeof(buf), res_file))
@@ -442,7 +437,7 @@ static int run_command(char* cmd,
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
return WEXITSTATUS(error);
}
@@ -1025,10 +1020,16 @@ static int run_mysqlcheck_fixnames(void)
static const char *expected_errors[]=
{
+ "ERROR 1051", /* Unknown table */
"ERROR 1060", /* Duplicate column name */
"ERROR 1061", /* Duplicate key name */
"ERROR 1054", /* Unknown column */
+ "ERROR 1146", /* Table does not exist */
"ERROR 1290", /* RR_OPTION_PREVENTS_STATEMENT */
+ "ERROR 1347", /* 'mysql.user' is not of type 'BASE TABLE' */
+ "ERROR 1348", /* Column 'Show_db_priv' is not updatable */
+ "ERROR 1356", /* definer of view lack rights (UPDATE) */
+ "ERROR 1449", /* definer ('mariadb.sys'@'localhost') of mysql.user does not exist */
0
};
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index a1d16f763f3..6cf553c2ca9 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2010, 2017, MariaDB
+ Copyright (c) 2010, 2019, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,8 @@ ulonglong last_values[MAX_MYSQL_VAR+100];
static int interval=0;
static my_bool option_force=0,interrupted=0,new_line=0,
opt_compress= 0, opt_local= 0, opt_relative= 0, opt_verbose= 0,
- opt_vertical= 0, tty_password= 0, opt_nobeep;
+ opt_vertical= 0, tty_password= 0, opt_nobeep,
+ opt_shutdown_wait_for_slaves= 0;
static my_bool debug_info_flag= 0, debug_check_flag= 0;
static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
static uint opt_count_iterations= 0, my_end_arg;
@@ -50,9 +51,6 @@ static char * unix_port=0;
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
static bool sql_log_bin_off= false;
-#ifdef HAVE_SMEM
-static char *shared_memory_base_name=0;
-#endif
static uint opt_protocol=0;
static myf error_flags; /* flags to pass to my_printf_error, like ME_BELL */
@@ -186,18 +184,13 @@ static struct my_option my_long_options[] =
#endif
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
&tcp_port, &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
+ {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"relative", 'r',
"Show difference between current and previous values when used with -i. "
"Currently only works with extended-status.",
&opt_relative, &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
- 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"silent", 's', "Silently exit if one can't connect to server.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "The socket file to use for connection.",
@@ -227,6 +220,11 @@ static struct my_option my_long_options[] =
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
+ {"wait_for_all_slaves", OPT_SHUTDOWN_WAIT_FOR_SLAVES,
+ "Defers shutdown until after all binlogged events have been sent to "
+ "all connected slaves", &opt_shutdown_wait_for_slaves,
+ &opt_shutdown_wait_for_slaves, 0, GET_BOOL, NO_ARG, 0, 0, 0,
+ 0, 0, 0},
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -239,7 +237,8 @@ static struct my_option my_long_options[] =
static const char *load_default_groups[]=
-{ "mysqladmin", "client", "client-server", "client-mariadb", 0 };
+{ "mysqladmin", "mariadb-admin", "client", "client-server", "client-mariadb",
+ 0 };
my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
@@ -362,16 +361,13 @@ int main(int argc,char *argv[])
opt_ssl_capath, opt_ssl_cipher);
mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ mysql_options(&mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
}
mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
(char*)&opt_ssl_verify_server_cert);
#endif
if (opt_protocol)
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
@@ -499,9 +495,6 @@ err2:
mysql_library_end();
my_free(opt_password);
my_free(user);
-#ifdef HAVE_SMEM
- my_free(shared_memory_base_name);
-#endif
free_defaults(save_argv);
my_end(my_end_arg);
return error;
@@ -591,7 +584,7 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
if (!info)
{
info=1;
- fputs("Waiting for MySQL server to answer",stderr);
+ fputs("Waiting for MariaDB server to answer",stderr);
(void) fflush(stderr);
}
else
@@ -711,7 +704,17 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
!stat(pidfile, &pidfile_status))
last_modified= pidfile_status.st_mtime;
- if (mysql_shutdown(mysql, SHUTDOWN_DEFAULT))
+ if (opt_shutdown_wait_for_slaves)
+ {
+ sprintf(buff, "SHUTDOWN WAIT FOR ALL SLAVES");
+ if (mysql_query(mysql, buff))
+ {
+ my_printf_error(0, "%s failed; error: '%-.200s'",
+ error_flags, buff, mysql_error(mysql));
+ return -1;
+ }
+ }
+ else if (mysql_shutdown(mysql, SHUTDOWN_DEFAULT))
{
my_printf_error(0, "shutdown failed; error: '%s'", error_flags,
mysql_error(mysql));
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 1f1bb204493..a7421024f92 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -41,6 +41,7 @@
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
#include "sql_priv.h"
#include "sql_basic_types.h"
+#include <atomic>
#include "log_event.h"
#include "compat56.h"
#include "sql_common.h"
@@ -94,7 +95,8 @@ static const char *default_dbug_option = "d:t:o,/tmp/mysqlbinlog.trace";
const char *current_dbug_option= default_dbug_option;
#endif
static const char *load_groups[]=
-{ "mysqlbinlog", "client", "client-server", "client-mariadb", 0 };
+{ "mysqlbinlog", "mariadb-binlog", "client", "client-server", "client-mariadb",
+ 0 };
static void error(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
@@ -125,9 +127,6 @@ static uint my_end_arg;
static const char* sock= 0;
static char *opt_plugindir= 0, *opt_default_auth= 0;
-#ifdef HAVE_SMEM
-static const char *shared_memory_base_name= 0;
-#endif
static char* user = 0;
static char* pass = 0;
static char *charset= 0;
@@ -1611,7 +1610,7 @@ static struct my_option my_options[] =
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
- "enabled --to-last-log and are sending the output to the same MySQL server. "
+ "enabled --to-last-log and are sending the output to the same MariaDB server. "
"This way you could avoid an endless loop. You would also like to use it "
"when restoring after a crash to avoid duplication of the statements you "
"already have. NOTE: you will need a SUPER privilege to use this option.",
@@ -1654,9 +1653,9 @@ static struct my_option my_options[] =
&port, &port, 0, GET_INT, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL,
- "The protocol to use for connection (tcp, socket, pipe, memory).",
+ "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"read-from-remote-server", 'R', "Read binary logs from a MySQL server.",
+ {"read-from-remote-server", 'R', "Read binary logs from a MariaDB server.",
&remote_opt, &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"raw", 0, "Requires -R. Output raw binlog data instead of SQL "
@@ -1695,12 +1694,6 @@ static struct my_option my_options[] =
{"set-charset", OPT_SET_CHARSET,
"Add 'SET NAMES character_set' to the output.", &charset,
&charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name,
- &shared_memory_base_name,
- 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"short-form", 's', "Just show regular queries: no extra info, no "
"row-based events and no row counts. This is mainly for testing only, "
"and should not be used to feed to the MariaDB server. "
@@ -1715,7 +1708,7 @@ static struct my_option my_options[] =
{"start-datetime", OPT_START_DATETIME,
"Start reading the binlog at first event having a datetime equal or "
"posterior to the argument; the argument must be a date and time "
- "in the local time zone, in any format accepted by the MySQL server "
+ "in the local time zone, in any format accepted by the MariaDB server "
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
"(you should probably use quotes for your shell to set it properly).",
&start_datetime_str, &start_datetime_str,
@@ -1733,7 +1726,7 @@ static struct my_option my_options[] =
{"stop-datetime", OPT_STOP_DATETIME,
"Stop reading the binlog at first event having a datetime equal or "
"posterior to the argument; the argument must be a date and time "
- "in the local time zone, in any format accepted by the MySQL server "
+ "in the local time zone, in any format accepted by the MariaDB server "
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
"(you should probably use quotes for your shell to set it properly).",
&stop_datetime_str, &stop_datetime_str,
@@ -1757,7 +1750,7 @@ static struct my_option my_options[] =
0, 0, 0, 0, 0, 0},
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \
requested binlog but rather continue printing until the end of the last \
-binlog of the MySQL server. If you send the output to the same MySQL server, \
+binlog of the MariaDB server. If you send the output to the same MariaDB server, \
that may lead to an endless loop.",
&to_last_remote_log, &to_last_remote_log, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -1903,7 +1896,7 @@ static void usage()
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
printf("\
-Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
+Dumps a MariaDB binary log in a format usable for viewing or for piping to\n\
the mysql command line client.\n\n");
printf("Usage: %s [options] log-files\n", my_progname);
print_defaults("my",load_groups);
@@ -1921,7 +1914,7 @@ static my_time_t convert_str_to_timestamp(const char* str)
uint dummy_in_dst_time_gap;
/* We require a total specification (date AND time) */
- if (str_to_datetime(str, (uint) strlen(str), &l_time, 0, &status) ||
+ if (str_to_datetime_or_date(str, (uint) strlen(str), &l_time, 0, &status) ||
l_time.time_type != MYSQL_TIMESTAMP_DATETIME || status.warnings)
{
error("Incorrect date and time argument: %s", str);
@@ -2140,6 +2133,7 @@ static Exit_status safe_connect()
opt_ssl_capath, opt_ssl_cipher);
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ mysql_options(mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
}
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
(char*)&opt_ssl_verify_server_cert);
@@ -2153,11 +2147,6 @@ static Exit_status safe_connect()
if (opt_protocol)
mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
- shared_memory_base_name);
-#endif
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
"program_name", "mysqlbinlog");
@@ -2314,7 +2303,7 @@ static Exit_status check_master_version()
break;
default:
error("Could not find server version: "
- "Master reported unrecognized MySQL version '%s'.", row[0]);
+ "Master reported unrecognized MariaDB version '%s'.", row[0]);
goto err;
}
if (!glob_description_event || !glob_description_event->is_valid())
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 090644e5cb0..1b15da4921a 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -55,7 +55,6 @@ static int first_error = 0;
static char *opt_skip_database;
DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
DYNAMIC_ARRAY views4repair;
-static char *shared_memory_base_name=0;
static uint opt_protocol=0;
enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_FIX_NAMES };
@@ -179,7 +178,7 @@ static struct my_option my_long_options[] =
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
&opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0},
- {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
+ {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"quick", 'q',
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
@@ -188,11 +187,6 @@ static struct my_option my_long_options[] =
{"repair", 'r',
"Can fix almost anything except unique keys that aren't unique.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
- 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"silent", 's', "Print only error messages.", &opt_silent,
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip_database", 0, "Don't process the database specified as argument",
@@ -228,7 +222,8 @@ static struct my_option my_long_options[] =
};
static const char *load_default_groups[]=
-{ "mysqlcheck", "client", "client-server", "client-mariadb", 0 };
+{ "mysqlcheck", "mariadb-check", "client", "client-server", "client-mariadb",
+ 0 };
static void print_version(void);
@@ -1114,8 +1109,6 @@ static int dbConnect(char *host, char *user, char *passwd)
#endif
if (opt_protocol)
mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
- if (shared_memory_base_name)
- mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(&mysql_connection, MYSQL_PLUGIN_DIR, opt_plugin_dir);
@@ -1255,8 +1248,7 @@ int main(int argc, char **argv)
delete_dynamic(&alter_table_cmds);
}
end1:
- my_free(opt_password);
- my_free(shared_memory_base_name);
+ my_free(opt_password);;
mysql_library_end();
free_defaults(defaults_argv);
my_end(my_end_arg);
diff --git a/client/mysqldump.c b/client/mysqldump.c
index fba8eec60f3..716eefe4667 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -189,9 +189,6 @@ static MYSQL_RES *routine_res, *routine_list_res;
FILE *md_result_file= 0;
FILE *stderror_file=0;
-#ifdef HAVE_SMEM
-static char *shared_memory_base_name=0;
-#endif
static uint opt_protocol= 0;
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
@@ -287,10 +284,10 @@ static struct my_option my_long_options[] =
1, 0, 0, 0, 0, 0},
{"compatible", OPT_COMPATIBLE,
"Change the dump to be compatible with a given mode. By default tables "
- "are dumped in a format optimized for MySQL. Legal modes are: ansi, "
+ "are dumped in a format optimized for MariaDB. Legal modes are: ansi, "
"mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, "
"no_table_options, no_field_options. One can use several modes separated "
- "by commas. Note: Requires MySQL server version 4.1.0 or higher. "
+ "by commas. Note: Requires MariaDB server version 4.1.0 or higher. "
"This option is ignored with earlier server versions.",
&opt_compatible_mode_str, &opt_compatible_mode_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -307,7 +304,7 @@ static struct my_option my_long_options[] =
&opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"create-options", 'a',
- "Include all MySQL specific create options.",
+ "Include all MariaDB specific create options.",
&create_options, &create_options, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0},
{"databases", 'B',
@@ -512,7 +509,7 @@ static struct my_option my_long_options[] =
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0},
{"protocol", OPT_MYSQL_PROTOCOL,
- "The protocol to use for connection (tcp, socket, pipe, memory).",
+ "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"quick", 'q', "Don't buffer query, dump directly to stdout.",
&quick, &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
@@ -534,11 +531,6 @@ static struct my_option my_long_options[] =
"Add 'SET NAMES default_character_set' to the output.",
&opt_set_charset, &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
- 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
/*
Note that the combination --single-transaction --master-data
will give bullet-proof binlog position only if server >=4.1.3. That's the
@@ -605,7 +597,8 @@ static struct my_option my_long_options[] =
};
static const char *load_default_groups[]=
-{ "mysqldump", "client", "client-server", "client-mariadb", 0 };
+{ "mysqldump", "mariadb-dump", "client", "client-server", "client-mariadb",
+ 0 };
static void maybe_exit(int error);
static void die(int error, const char* reason, ...);
@@ -699,7 +692,7 @@ static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
- puts("Dumping structure and contents of MySQL databases and tables.");
+ puts("Dumping structure and contents of MariaDB databases and tables.");
short_usage_sub(stdout);
print_defaults("my",load_default_groups);
puts("");
@@ -757,7 +750,7 @@ static void write_header(FILE *sql_file, const char *db_name)
else if (!opt_compact)
{
print_comment(sql_file, 0,
- "-- MySQL dump %s Distrib %s, for %s (%s)\n--\n",
+ "-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n",
DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
MACHINE_TYPE);
print_comment(sql_file, 0, "-- Host: %s ",
@@ -1870,16 +1863,13 @@ static int connect_to_db(char *host, char *user,char *passwd)
opt_ssl_capath, opt_ssl_cipher);
mysql_options(&mysql_connection, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(&mysql_connection, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ mysql_options(&mysql_connection, MARIADB_OPT_TLS_VERSION, opt_tls_version);
}
mysql_options(&mysql_connection,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
(char*)&opt_ssl_verify_server_cert);
#endif
if (opt_protocol)
mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
if (opt_plugin_dir && *opt_plugin_dir)
@@ -6244,7 +6234,7 @@ static int start_transaction(MYSQL *mysql_con)
if ((mysql_get_server_version(mysql_con) < 40100) && opt_master_data)
{
fprintf(stderr, "-- %s: the combination of --single-transaction and "
- "--master-data requires a MySQL server version of at least 4.1 "
+ "--master-data requires a MariaDB server version of at least 4.1 "
"(current server's version is %s). %s\n",
ignore_errors ? "Warning" : "Error",
mysql_con->server_version ? mysql_con->server_version : "unknown",
@@ -6993,10 +6983,6 @@ err:
if (opt_slave_data)
do_start_slave_sql(mysql);
-#ifdef HAVE_SMEM
- my_free(shared_memory_base_name);
-#endif
-
dbDisconnect(current_host);
if (!path)
write_footer(md_result_file);
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 3ec23b874ca..c5c1554ca6a 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -67,10 +67,6 @@ static longlong opt_ignore_lines= -1;
static char **argv_to_free;
-#ifdef HAVE_SMEM
-static char *shared_memory_base_name=0;
-#endif
-
static struct my_option my_long_options[] =
{
{"character-sets-dir", OPT_CHARSETS_DIR,
@@ -163,15 +159,10 @@ static struct my_option my_long_options[] =
&opt_mysql_port,
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0},
- {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
+ {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"replace", 'r', "If duplicate unique key was found, replace old row.",
&replace, &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
- 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"silent", 's', "Be more silent.", &silent, &silent, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "The socket file to use for connection.",
@@ -196,7 +187,8 @@ static struct my_option my_long_options[] =
static const char *load_default_groups[]=
-{ "mysqlimport","client", "client-server", "client-mariadb", 0 };
+{ "mysqlimport", "mariadb-import", "client", "client-server", "client-mariadb",
+ 0 };
static void print_version(void)
@@ -210,13 +202,14 @@ static void usage(void)
{
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
puts("Copyright 2008-2011 Oracle and Monty Program Ab.");
+ puts("Copyright 2012-2019 MariaDB Corporation Ab.");
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
printf("\
Loads tables from text files in various formats. The base name of the\n\
text file must be the name of the table that should be used.\n\
-If one uses sockets to connect to the MySQL server, the server will open and\n\
-read the text file directly. In other cases the client will open the text\n\
+If one uses sockets to connect to the MariaDB server, the server will open\n\
+and read the text file directly. In other cases the client will open the text\n\
file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n");
printf("\nUsage: %s [OPTIONS] database textfile...\n",my_progname);
@@ -458,16 +451,13 @@ static MYSQL *db_connect(char *host, char *database,
opt_ssl_capath, opt_ssl_cipher);
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ mysql_options(mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
}
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
(char*)&opt_ssl_verify_server_cert);
#endif
if (opt_protocol)
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
@@ -529,9 +519,6 @@ static void safe_exit(int error, MYSQL *mysql)
else
{
mysql_library_end();
-#ifdef HAVE_SMEM
- my_free(shared_memory_base_name);
-#endif
free_defaults(argv_to_free);
my_free(opt_password);
my_end(my_end_arg); /* clean exit */
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index dfa1eac3673..db5c2bbbbe6 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2017, MariaDB
+ Copyright (c) 2010, 2019, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -39,9 +39,6 @@ static uint opt_verbose=0;
static char *default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME;
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
-#ifdef HAVE_SMEM
-static char *shared_memory_base_name=0;
-#endif
static uint opt_protocol=0;
static void get_options(int *argc,char ***argv);
@@ -59,7 +56,8 @@ static void print_res_top(MYSQL_RES *result);
static void print_res_row(MYSQL_RES *result,MYSQL_ROW cur);
static const char *load_default_groups[]=
-{ "mysqlshow","client", "client-server", "client-mariadb", 0 };
+{ "mysqlshow", "mariadb-show", "client", "client-server", "client-mariadb",
+ 0 };
static char * opt_mysql_unix_port=0;
int main(int argc, char **argv)
@@ -125,16 +123,14 @@ int main(int argc, char **argv)
opt_ssl_capath, opt_ssl_cipher);
mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ mysql_options(&mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
}
mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
(char*)&opt_ssl_verify_server_cert);
#endif
if (opt_protocol)
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
+
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
@@ -179,9 +175,6 @@ error:
mysql_close(&mysql); /* Close & free connection */
my_free(opt_password);
mysql_server_end();
-#ifdef HAVE_SMEM
- my_free(shared_memory_base_name);
-#endif
free_defaults(defaults_argv);
my_end(my_end_arg);
exit(error ? 1 : 0);
@@ -245,14 +238,8 @@ static struct my_option my_long_options[] =
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"protocol", OPT_MYSQL_PROTOCOL,
- "The protocol to use for connection (tcp, socket, pipe, memory).",
+ "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name,
- &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
- 0, 0, 0, 0, 0, 0},
-#endif
{"show-table-type", 't', "Show table type column.",
&opt_table_type, &opt_table_type, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -285,7 +272,7 @@ static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
- puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
+ puts("Shows the structure of a MariaDB database (databases, tables, and columns).\n");
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
puts("\n\
If last argument contains a shell or SQL wildcard (*,?,% or _) then only\n\
@@ -675,7 +662,7 @@ list_table_status(MYSQL *mysql,const char *db,const char *wild)
fprintf(stderr,"%s: Cannot get status for db: %s, table: %s: %s\n",
my_progname,db,wild ? wild : "",mysql_error(mysql));
if (mysql_errno(mysql) == ER_PARSE_ERROR)
- fprintf(stderr,"This error probably means that your MySQL server doesn't support the\n\'show table status' command.\n");
+ fprintf(stderr,"This error probably means that your MariaDB server doesn't support the\n\'show table status' command.\n");
return 1;
}
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 6a41d595bff..f491bea6c79 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -98,9 +98,6 @@ TODO:
#define snprintf _snprintf
#endif
-#ifdef HAVE_SMEM
-static char *shared_memory_base_name=0;
-#endif
/* Global Thread counter */
uint thread_counter;
@@ -180,7 +177,8 @@ static int get_options(int *argc,char ***argv);
static uint opt_mysql_port= 0;
static const char *load_default_groups[]=
-{ "mysqlslap", "client", "client-server", "client-mariadb", 0 };
+{ "mysqlslap", "mariadb-slap", "client", "client-server", "client-mariadb",
+ 0 };
typedef struct statement statement;
@@ -309,10 +307,6 @@ void set_mysql_connect_options(MYSQL *mysql)
#endif
if (opt_protocol)
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset);
}
@@ -423,10 +417,6 @@ int main(int argc, char **argv)
statement_cleanup(pre_statements);
statement_cleanup(post_statements);
option_cleanup(engine_options);
-
-#ifdef HAVE_SMEM
- my_free(shared_memory_base_name);
-#endif
free_defaults(defaults_argv);
mysql_library_end();
my_end(my_end_arg);
@@ -634,7 +624,7 @@ static struct my_option my_long_options[] =
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"init-command", OPT_INIT_COMMAND,
- "SQL Command to execute when connecting to MySQL server. Will "
+ "SQL Command to execute when connecting to MariaDB server. Will "
"automatically be re-executed when reconnecting.",
&opt_init_command, &opt_init_command, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -689,17 +679,11 @@ static struct my_option my_long_options[] =
&pre_system, &pre_system,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL,
- "The protocol to use for connection (tcp, socket, pipe, memory).",
+ "The protocol to use for connection (tcp, socket, pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"query", 'q', "Query to run or file containing query to run.",
&user_supplied_query, &user_supplied_query,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
- "Base name of shared memory.", &shared_memory_base_name,
- &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
- 0, 0, 0, 0, 0, 0},
-#endif
{"silent", 's', "Run program in silent mode - no output.",
&opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 2a6d4265e59..6ecc338490c 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -105,7 +105,6 @@ enum {
static int record= 0, opt_sleep= -1;
static char *opt_db= 0, *opt_pass= 0;
const char *opt_user= 0, *opt_host= 0, *unix_sock= 0, *opt_basedir= "./";
-static char *shared_memory_base_name=0;
const char *opt_logdir= "";
const char *opt_prologue= 0, *opt_charsets_dir;
static int opt_port= 0;
@@ -133,9 +132,11 @@ static my_bool disable_info= 1;
static my_bool abort_on_error= 1, opt_continue_on_error= 0;
static my_bool server_initialized= 0;
static my_bool is_windows= 0;
+static my_bool optimizer_trace_active= 0;
static char **default_argv;
static const char *load_default_groups[]=
-{ "mysqltest", "client", "client-server", "client-mariadb", 0 };
+{ "mysqltest", "mariadb-test", "client", "client-server", "client-mariadb",
+ 0 };
static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;
/* Info on properties that can be set with --enable_X and --disable_X */
@@ -318,6 +319,7 @@ struct st_connection
char *name;
size_t name_len;
MYSQL_STMT* stmt;
+ MYSQL_BIND *ps_params;
/* Set after send to disallow other queries before reap */
my_bool pending;
@@ -391,6 +393,11 @@ enum enum_commands {
Q_MOVE_FILE, Q_REMOVE_FILES_WILDCARD, Q_SEND_EVAL,
Q_ENABLE_PREPARE_WARNINGS, Q_DISABLE_PREPARE_WARNINGS,
Q_RESET_CONNECTION,
+ Q_OPTIMIZER_TRACE,
+ Q_PS_PREPARE,
+ Q_PS_BIND,
+ Q_PS_EXECUTE,
+ Q_PS_CLOSE,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
Q_COMMENT_WITH_COMMAND,
@@ -503,7 +510,11 @@ const char *command_names[]=
"enable_prepare_warnings",
"disable_prepare_warnings",
"reset_connection",
-
+ "optimizer_trace",
+ "PS_prepare",
+ "PS_bind",
+ "PS_execute",
+ "PS_close",
0
};
@@ -648,6 +659,9 @@ void free_all_replace(){
}
void var_set_int(const char* name, int value);
+void enable_optimizer_trace(struct st_connection *con);
+void display_optimizer_trace(struct st_connection *con,
+ DYNAMIC_STRING *ds);
class LogFile {
@@ -874,21 +888,6 @@ static char *my_fgets(char * s, int n, FILE * stream, int *len)
return buf;
}
-/*
- Wrapper for popen().
- On Windows, uses binary mode to workaround
- C runtime bug mentioned in MDEV-9409
-*/
-static FILE* my_popen(const char *cmd, const char *mode)
-{
- FILE *f= popen(cmd, mode);
-#ifdef _WIN32
- if (f)
- _setmode(fileno(f), O_BINARY);
-#endif
- return f;
-}
-
#ifdef EMBEDDED_LIBRARY
#define EMB_SEND_QUERY 1
@@ -1571,6 +1570,8 @@ static void die(const char *fmt, ...)
{
char buff[DIE_BUFF_SIZE];
va_list args;
+ DBUG_ENTER("die");
+
va_start(args, fmt);
make_error_message(buff, sizeof(buff), fmt, args);
really_die(buff);
@@ -1807,7 +1808,7 @@ static int run_command(char* cmd,
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
DBUG_RETURN(WEXITSTATUS(error));
}
@@ -3364,7 +3365,7 @@ void do_exec(struct st_command *command)
{
replace_dynstr_append_mem(ds_result, buf, len);
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
if (display_result_sorted)
{
@@ -4586,7 +4587,7 @@ void do_perl(struct st_command *command)
replace_dynstr_append_mem(&ds_res, buf, len);
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
/* Remove the temporary file, but keep it if perl failed */
if (!error)
@@ -5853,7 +5854,6 @@ do_handle_error:
<opts> - options to use for the connection
* SSL - use SSL if available
* COMPRESS - use compression if available
- * SHM - use shared memory if available
* PIPE - use named pipe if available
*/
@@ -5865,7 +5865,6 @@ void do_connect(struct st_command *command)
char *ssl_cipher __attribute__((unused))= 0;
my_bool con_ssl= 0, con_compress= 0;
my_bool con_pipe= 0;
- my_bool con_shm __attribute__ ((unused))= 0;
int read_timeout= 0;
int write_timeout= 0;
int connect_timeout= 0;
@@ -5881,9 +5880,6 @@ void do_connect(struct st_command *command)
static DYNAMIC_STRING ds_sock;
static DYNAMIC_STRING ds_options;
static DYNAMIC_STRING ds_default_auth;
-#ifdef HAVE_SMEM
- static DYNAMIC_STRING ds_shm;
-#endif
const struct command_arg connect_args[] = {
{ "connection name", ARG_STRING, TRUE, &ds_connection_name, "Name of the connection" },
{ "host", ARG_STRING, TRUE, &ds_host, "Host to connect to" },
@@ -5912,19 +5908,15 @@ void do_connect(struct st_command *command)
die("Illegal argument for port: '%s'", ds_port.str);
}
-#ifdef HAVE_SMEM
- /* Shared memory */
- init_dynamic_string(&ds_shm, ds_sock.str, 0, 0);
-#endif
-
/* Sock */
if (ds_sock.length)
{
/*
If the socket is specified just as a name without path
+ or an abstract socket indicator ('@'), then
append tmpdir in front
*/
- if (*ds_sock.str != FN_LIBCHAR)
+ if (*ds_sock.str != FN_LIBCHAR && *ds_sock.str != '@')
{
char buff[FN_REFLEN];
fn_format(buff, ds_sock.str, TMPDIR, "", 0);
@@ -5964,8 +5956,6 @@ void do_connect(struct st_command *command)
con_compress= 1;
else if (length == 4 && !strncmp(con_options, "PIPE", 4))
con_pipe= 1;
- else if (length == 3 && !strncmp(con_options, "SHM", 3))
- con_shm= 1;
else if (strncasecmp(con_options, "read_timeout=",
sizeof("read_timeout=")-1) == 0)
{
@@ -6038,6 +6028,7 @@ void do_connect(struct st_command *command)
opt_ssl_capath, ssl_cipher ? ssl_cipher : opt_ssl_cipher);
mysql_options(con_slot->mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(con_slot->mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
+ mysql_options(con_slot->mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
#if MYSQL_VERSION_ID >= 50000
/* Turn on ssl_verify_server_cert only if host is "localhost" */
opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost");
@@ -6075,22 +6066,6 @@ void do_connect(struct st_command *command)
(char*)&connect_timeout);
}
-#ifdef HAVE_SMEM
- if (con_shm)
- {
- uint protocol= MYSQL_PROTOCOL_MEMORY;
- if (!ds_shm.length)
- die("Missing shared memory base name");
- mysql_options(con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
- mysql_options(con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
- }
- else if (shared_memory_base_name)
- {
- mysql_options(con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
- shared_memory_base_name);
- }
-#endif
-
/* Use default db name */
if (ds_database.length == 0)
dynstr_set(&ds_database, opt_db);
@@ -6135,9 +6110,6 @@ void do_connect(struct st_command *command)
dynstr_free(&ds_sock);
dynstr_free(&ds_options);
dynstr_free(&ds_default_auth);
-#ifdef HAVE_SMEM
- dynstr_free(&ds_shm);
-#endif
free(csname);
DBUG_VOID_RETURN;
}
@@ -7029,7 +7001,7 @@ static struct my_option my_long_options[] =
GET_INT, REQUIRED_ARG, DEFAULT_MAX_CONN, 8, 5120, 0, 0, 0},
{"password", 'p', "Password to use when connecting to server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
+ {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
@@ -7062,10 +7034,6 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-file", 'F', "Read embedded server arguments from file.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"shared-memory-base-name", 0,
- "Base name of shared memory.", &shared_memory_base_name,
- &shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
- 0, 0, 0},
{"silent", 's', "Suppress all normal output. Synonym for --quiet.",
&silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"sleep", 'T', "Always sleep this many seconds on sleep commands.",
@@ -7126,7 +7094,7 @@ void usage()
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
- printf("Runs a test against the mysql server and compares output with a results file.\n\n");
+ printf("Runs a test against the MariaDB server and compares output with a results file.\n\n");
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
print_defaults("my",load_default_groups);
puts("");
@@ -7884,11 +7852,20 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
static void handle_no_active_connection(struct st_command *command,
struct st_connection *cn, DYNAMIC_STRING *ds)
{
- handle_error(command, 2006, "MySQL server has gone away", "000000", ds);
+ handle_error(command, 2006, "MariaDB server has gone away", "000000", ds);
cn->pending= FALSE;
var_set_errno(2006);
}
+/* handler functions to execute prepared statement calls in client C API */
+void run_prepare_stmt(struct st_connection *cn, struct st_command *command, const char *query,
+ size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings);
+void run_bind_stmt(struct st_connection *cn, struct st_command *command, const char *query,
+ size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings);
+void run_execute_stmt(struct st_connection *cn, struct st_command *command, const char *query,
+ size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings);
+void run_close_stmt(struct st_connection *cn, struct st_command *command, const char *query,
+ size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings);
/*
Run query using MySQL C API
@@ -7904,7 +7881,7 @@ static void handle_no_active_connection(struct st_command *command,
*/
void run_query_normal(struct st_connection *cn, struct st_command *command,
- int flags, char *query, size_t query_len,
+ int flags, const char *query, size_t query_len,
DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings)
{
MYSQL_RES *res= 0;
@@ -7920,6 +7897,32 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
DBUG_VOID_RETURN;
}
+ /* handle prepared statement commands */
+ switch (command->type) {
+ case Q_PS_PREPARE:
+ run_prepare_stmt(cn, command, query, query_len, ds, ds_warnings);
+ flags &= ~QUERY_SEND_FLAG;
+ goto end;
+ break;
+ case Q_PS_BIND:
+ run_bind_stmt(cn, command, query, query_len, ds, ds_warnings);
+ flags &= ~QUERY_SEND_FLAG;
+ goto end;
+ break;
+ case Q_PS_EXECUTE:
+ run_execute_stmt(cn, command, query, query_len, ds, ds_warnings);
+ flags &= ~QUERY_SEND_FLAG;
+ goto end;
+ break;
+ case Q_PS_CLOSE:
+ run_close_stmt(cn, command, query, query_len, ds, ds_warnings);
+ flags &= ~QUERY_SEND_FLAG;
+ goto end;
+ break;
+ default: /* not a prepared statement command */
+ break;
+ }
+
if (flags & QUERY_SEND_FLAG)
{
/*
@@ -8023,6 +8026,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
/* If we come here the query is both executed and read successfully */
handle_no_error(command);
+ display_optimizer_trace(cn, ds);
revert_properties();
end:
@@ -8475,6 +8479,411 @@ end:
DBUG_VOID_RETURN;
}
+/*
+ prepare query using prepared statement C API
+
+ SYNPOSIS
+ run_prepare_stmt
+ mysql - mysql handle
+ command - current command pointer
+ query - query string to execute
+ query_len - length query string to execute
+ ds - output buffer where to store result form query
+
+ RETURN VALUE
+ error - function will not return
+*/
+
+void run_prepare_stmt(struct st_connection *cn, struct st_command *command, const char *query, size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings)
+{
+
+ MYSQL *mysql= cn->mysql;
+ MYSQL_STMT *stmt;
+ DYNAMIC_STRING ds_prepare_warnings;
+ DBUG_ENTER("run_prepare_stmt");
+ DBUG_PRINT("query", ("'%-.60s'", query));
+
+ /*
+ Init a new stmt if it's not already one created for this connection
+ */
+ if(!(stmt= cn->stmt))
+ {
+ if (!(stmt= mysql_stmt_init(mysql)))
+ die("unable to init stmt structure");
+ cn->stmt= stmt;
+ }
+
+ /* Init dynamic strings for warnings */
+ if (!disable_warnings)
+ {
+ init_dynamic_string(&ds_prepare_warnings, NULL, 0, 256);
+ }
+
+ /*
+ Prepare the query
+ */
+ char* PS_query= command->first_argument;
+ size_t PS_query_len= command->end - command->first_argument;
+ if (do_stmt_prepare(cn, PS_query, PS_query_len))
+ {
+ handle_error(command, mysql_stmt_errno(stmt),
+ mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
+ goto end;
+ }
+
+ /*
+ Get the warnings from mysql_stmt_prepare and keep them in a
+ separate string
+ */
+ if (!disable_warnings)
+ {
+ append_warnings(&ds_prepare_warnings, mysql);
+ dynstr_free(&ds_prepare_warnings);
+ }
+ end:
+ DBUG_VOID_RETURN;
+}
+
+/*
+ bind parameters for a prepared statement C API
+
+ SYNPOSIS
+ run_bind_stmt
+ mysql - mysql handle
+ command - current command pointer
+ query - query string to execute
+ query_len - length query string to execute
+ ds - output buffer where to store result form query
+
+ RETURN VALUE
+ error - function will not return
+*/
+
+void run_bind_stmt(struct st_connection *cn, struct st_command *command,
+ const char *query, size_t query_len, DYNAMIC_STRING *ds,
+ DYNAMIC_STRING *ds_warnings
+ )
+{
+ MYSQL_STMT *stmt= cn->stmt;
+ DBUG_ENTER("run_bind_stmt");
+ DBUG_PRINT("query", ("'%-.60s'", query));
+ MYSQL_BIND *ps_params= cn->ps_params;
+ if (ps_params)
+ {
+ for (size_t i=0; i<stmt->param_count; i++)
+ {
+ my_free(ps_params[i].buffer);
+ ps_params[i].buffer= NULL;
+ }
+ my_free(ps_params);
+ ps_params= NULL;
+ }
+
+ /* Init PS-parameters. */
+ cn->ps_params= ps_params = (MYSQL_BIND*)my_malloc(sizeof(MYSQL_BIND) * stmt->param_count,
+ MYF(MY_WME));
+ bzero((char *) ps_params, sizeof(MYSQL_BIND) * stmt->param_count);
+
+ int i=0;
+ char *c;
+ long *l;
+ double *d;
+
+ char *p= strtok((char*)command->first_argument, " ");
+ while (p != nullptr)
+ {
+ (void)strtol(p, &c, 10);
+ if (!*c)
+ {
+ ps_params[i].buffer_type= MYSQL_TYPE_LONG;
+ l= (long*)my_malloc(sizeof(long), MYF(MY_WME));
+ *l= strtol(p, &c, 10);
+ ps_params[i].buffer= (void*)l;
+ ps_params[i].buffer_length= 8;
+ }
+ else
+ {
+ (void)strtod(p, &c);
+ if (!*c)
+ {
+ ps_params[i].buffer_type= MYSQL_TYPE_DECIMAL;
+ d= (double*)my_malloc(sizeof(double), MYF(MY_WME));
+ *d= strtod(p, &c);
+ ps_params[i].buffer= (void*)d;
+ ps_params[i].buffer_length= 8;
+ }
+ else
+ {
+ ps_params[i].buffer_type= MYSQL_TYPE_STRING;
+ ps_params[i].buffer= my_strdup(p, MYF(MY_WME));
+ ps_params[i].buffer_length= (unsigned long)strlen(p);
+ }
+ }
+
+ p= strtok(nullptr, " ");
+ i++;
+ }
+
+ int rc= mysql_stmt_bind_param(stmt, ps_params);
+ if (rc)
+ {
+ die("mysql_stmt_bind_param() failed': %d %s",
+ mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
+ }
+
+ DBUG_VOID_RETURN;
+}
+
+/*
+ execute query using prepared statement C API
+
+ SYNPOSIS
+ run_axecute_stmt
+ mysql - mysql handle
+ command - current command pointer
+ query - query string to execute
+ query_len - length query string to execute
+ ds - output buffer where to store result form query
+
+ RETURN VALUE
+ error - function will not return
+*/
+
+void run_execute_stmt(struct st_connection *cn, struct st_command *command,
+ const char *query, size_t query_len, DYNAMIC_STRING *ds,
+ DYNAMIC_STRING *ds_warnings
+ )
+{
+ MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
+ MYSQL *mysql= cn->mysql;
+ MYSQL_STMT *stmt= cn->stmt;
+ DYNAMIC_STRING ds_execute_warnings;
+ DBUG_ENTER("run_execute_stmt");
+ DBUG_PRINT("query", ("'%-.60s'", query));
+
+ /* Init dynamic strings for warnings */
+ if (!disable_warnings)
+ {
+ init_dynamic_string(&ds_execute_warnings, NULL, 0, 256);
+ }
+
+#if MYSQL_VERSION_ID >= 50000
+ if (cursor_protocol_enabled)
+ {
+ /*
+ Use cursor when retrieving result
+ */
+ ulong type= CURSOR_TYPE_READ_ONLY;
+ if (mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*) &type))
+ die("mysql_stmt_attr_set(STMT_ATTR_CURSOR_TYPE) failed': %d %s",
+ mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
+ }
+#endif
+
+ /*
+ Execute the query
+ */
+ if (do_stmt_execute(cn))
+ {
+ handle_error(command, mysql_stmt_errno(stmt),
+ mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
+ goto end;
+ }
+
+ /*
+ When running in cursor_protocol get the warnings from execute here
+ and keep them in a separate string for later.
+ */
+ if (cursor_protocol_enabled && !disable_warnings)
+ append_warnings(&ds_execute_warnings, mysql);
+
+ /*
+ We instruct that we want to update the "max_length" field in
+ mysql_stmt_store_result(), this is our only way to know how much
+ buffer to allocate for result data
+ */
+ {
+ my_bool one= 1;
+ if (mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &one))
+ die("mysql_stmt_attr_set(STMT_ATTR_UPDATE_MAX_LENGTH) failed': %d %s",
+ mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
+ }
+
+ /*
+ If we got here the statement succeeded and was expected to do so,
+ get data. Note that this can still give errors found during execution!
+ Store the result of the query if if will return any fields
+ */
+ if (mysql_stmt_field_count(stmt) && mysql_stmt_store_result(stmt))
+ {
+ handle_error(command, mysql_stmt_errno(stmt),
+ mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
+ goto end;
+ }
+
+ /* If we got here the statement was both executed and read successfully */
+ handle_no_error(command);
+ if (!disable_result_log)
+ {
+ /*
+ Not all statements creates a result set. If there is one we can
+ now create another normal result set that contains the meta
+ data. This set can be handled almost like any other non prepared
+ statement result set.
+ */
+ if ((res= mysql_stmt_result_metadata(stmt)) != NULL)
+ {
+ /* Take the column count from meta info */
+ MYSQL_FIELD *fields= mysql_fetch_fields(res);
+ uint num_fields= mysql_num_fields(res);
+
+ if (display_metadata)
+ append_metadata(ds, fields, num_fields);
+
+ if (!display_result_vertically)
+ append_table_headings(ds, fields, num_fields);
+
+ append_stmt_result(ds, stmt, fields, num_fields);
+
+ mysql_free_result(res); /* Free normal result set with meta data */
+
+ /*
+ Normally, if there is a result set, we do not show warnings from the
+ prepare phase. This is because some warnings are generated both during
+ prepare and execute; this would generate different warning output
+ between normal and ps-protocol test runs.
+
+ The --enable_prepare_warnings command can be used to change this so
+ that warnings from both the prepare and execute phase are shown.
+ */
+ }
+ else
+ {
+ /*
+ This is a query without resultset
+ */
+ }
+
+ /*
+ Fetch info before fetching warnings, since it will be reset
+ otherwise.
+ */
+ if (!disable_info)
+ append_info(ds, mysql_stmt_affected_rows(stmt), mysql_info(mysql));
+
+ if (display_session_track_info)
+ append_session_track_info(ds, mysql);
+
+
+ if (!disable_warnings)
+ {
+ /* Get the warnings from execute */
+
+ /* Append warnings to ds - if there are any */
+ if (append_warnings(&ds_execute_warnings, mysql) ||
+ ds_execute_warnings.length ||
+ ds_warnings->length)
+ {
+ dynstr_append_mem(ds, "Warnings:\n", 10);
+ if (ds_warnings->length)
+ dynstr_append_mem(ds, ds_warnings->str,
+ ds_warnings->length);
+ if (ds_execute_warnings.length)
+ dynstr_append_mem(ds, ds_execute_warnings.str,
+ ds_execute_warnings.length);
+ }
+ }
+ }
+
+end:
+ if (!disable_warnings)
+ {
+ dynstr_free(&ds_execute_warnings);
+ }
+
+ /*
+ We save the return code (mysql_stmt_errno(stmt)) from the last call sent
+ to the server into the mysqltest builtin variable $mysql_errno. This
+ variable then can be used from the test case itself.
+ */
+
+ var_set_errno(mysql_stmt_errno(stmt));
+
+ revert_properties();
+
+ /* Close the statement if reconnect, need new prepare */
+ {
+#ifndef EMBEDDED_LIBRARY
+ my_bool reconnect;
+ mysql_get_option(mysql, MYSQL_OPT_RECONNECT, &reconnect);
+ if (reconnect)
+#else
+ if (mysql->reconnect)
+#endif
+ {
+ if (cn->ps_params)
+ {
+ for (size_t i=0; i<stmt->param_count; i++)
+ {
+ my_free(cn->ps_params[i].buffer);
+ cn->ps_params[i].buffer= NULL;
+ }
+ my_free(cn->ps_params);
+ }
+ mysql_stmt_close(stmt);
+ cn->stmt= NULL;
+ cn->ps_params= NULL;
+ }
+ }
+ DBUG_VOID_RETURN;
+}
+
+/*
+ close a prepared statement C API
+
+ SYNPOSIS
+ run_close_stmt
+ mysql - mysql handle
+ command - current command pointer
+ query - query string to execute
+ query_len - length query string to execute
+ ds - output buffer where to store result form query
+
+ RETURN VALUE
+ error - function will not return
+*/
+
+void run_close_stmt(struct st_connection *cn, struct st_command *command,
+ const char *query, size_t query_len, DYNAMIC_STRING *ds,
+ DYNAMIC_STRING *ds_warnings
+ )
+{
+ MYSQL_STMT *stmt= cn->stmt;
+ DBUG_ENTER("run_close_stmt");
+ DBUG_PRINT("query", ("'%-.60s'", query));
+
+ if (cn->ps_params)
+ {
+
+ for (size_t i=0; i<stmt->param_count; i++)
+ {
+ my_free(cn->ps_params[i].buffer);
+ cn->ps_params[i].buffer= NULL;
+ }
+ my_free(cn->ps_params);
+ }
+
+ /* Close the statement */
+ if (stmt)
+ {
+ mysql_stmt_close(stmt);
+ cn->stmt= NULL;
+ }
+ cn->ps_params= NULL;
+
+ DBUG_VOID_RETURN;
+}
+
/*
@@ -9241,7 +9650,7 @@ int main(int argc, char **argv)
if (mysql_server_init(embedded_server_arg_count,
embedded_server_args,
(char**) embedded_server_groups))
- die("Can't initialize MySQL server");
+ die("Can't initialize MariaDB server");
server_initialized= 1;
if (cur_file == file_stack && cur_file->file == 0)
{
@@ -9299,11 +9708,6 @@ int main(int argc, char **argv)
}
#endif
-#ifdef HAVE_SMEM
- if (shared_memory_base_name)
- mysql_options(con->mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
-#endif
-
if (!(con->name = my_strdup("default", MYF(MY_WME))))
die("Out of memory");
mysql_options(con->mysql, MYSQL_OPT_NONBLOCK, 0);
@@ -9520,6 +9924,10 @@ int main(int argc, char **argv)
/* fall through */
case Q_QUERY:
case Q_REAP:
+ case Q_PS_PREPARE:
+ case Q_PS_BIND:
+ case Q_PS_EXECUTE:
+ case Q_PS_CLOSE:
{
my_bool old_display_result_vertically= display_result_vertically;
/* Default is full query, both reap and send */
@@ -9649,6 +10057,9 @@ int main(int argc, char **argv)
case Q_RESET_CONNECTION:
do_reset_connection();
break;
+ case Q_OPTIMIZER_TRACE:
+ enable_optimizer_trace(cur_con);
+ break;
case Q_SEND_SHUTDOWN:
handle_command_error(command,
mysql_shutdown(cur_con->mysql,
@@ -9981,7 +10392,7 @@ void do_get_replace(struct st_command *command)
char *buff, *start;
char word_end_chars[256], *pos;
POINTER_ARRAY to_array, from_array;
- DBUG_ENTER("get_replace");
+ DBUG_ENTER("do_get_replace");
free_replace();
@@ -10979,7 +11390,7 @@ int get_next_bit(REP_SET *set,uint lastpos)
start=set->bits+ ((lastpos+1) / WORD_BIT);
end=set->bits + set->size_of_bits;
- bits=start[0] & ~((1 << ((lastpos+1) % WORD_BIT)) -1);
+ bits=start[0] & ~((1U << ((lastpos+1) % WORD_BIT)) -1);
while (! bits && ++start < end)
bits=start[0];
@@ -11315,3 +11726,90 @@ char *mysql_authentication_dialog_ask(MYSQL *mysql, int type,
return buf;
}
+
+/*
+ Enable optimizer trace for the next command
+*/
+
+LEX_CSTRING enable_optimizer_trace_query=
+{
+ STRING_WITH_LEN("set @mysqltest_save_optimzer_trace=@@optimizer_trace,@@optimizer_trace=\"enabled=on\"")
+};
+
+LEX_CSTRING restore_optimizer_trace_query=
+{
+ STRING_WITH_LEN("set @@optimizer_trace=@mysqltest_save_optimzer_trace")
+};
+
+
+LEX_CSTRING display_optimizer_trace_query
+{
+ STRING_WITH_LEN("SELECT * from information_schema.optimizer_trace")
+};
+
+
+void enable_optimizer_trace(struct st_connection *con)
+{
+ MYSQL *mysql= con->mysql;
+ my_bool save_ps_protocol_enabled= ps_protocol_enabled;
+ my_bool save_view_protocol_enabled= view_protocol_enabled;
+ DYNAMIC_STRING ds_result;
+ DYNAMIC_STRING ds_warnings;
+ struct st_command command;
+ DBUG_ENTER("enable_optimizer_trace");
+
+ if (!mysql)
+ DBUG_VOID_RETURN;
+ ps_protocol_enabled= view_protocol_enabled= 0;
+
+ init_dynamic_string(&ds_result, NULL, 0, 256);
+ init_dynamic_string(&ds_warnings, NULL, 0, 256);
+ bzero(&command, sizeof(command));
+
+ run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG,
+ enable_optimizer_trace_query.str,
+ enable_optimizer_trace_query.length,
+ &ds_result, &ds_warnings);
+ dynstr_free(&ds_result);
+ dynstr_free(&ds_warnings);
+ ps_protocol_enabled= save_ps_protocol_enabled;
+ view_protocol_enabled= save_view_protocol_enabled;
+ optimizer_trace_active= 1;
+ DBUG_VOID_RETURN;
+}
+
+
+void display_optimizer_trace(struct st_connection *con,
+ DYNAMIC_STRING *ds)
+{
+ my_bool save_ps_protocol_enabled= ps_protocol_enabled;
+ my_bool save_view_protocol_enabled= view_protocol_enabled;
+ DYNAMIC_STRING ds_result;
+ DYNAMIC_STRING ds_warnings;
+ struct st_command command;
+ DBUG_ENTER("display_optimizer_trace");
+
+ if (!optimizer_trace_active)
+ DBUG_VOID_RETURN;
+
+ optimizer_trace_active= 0;
+ ps_protocol_enabled= view_protocol_enabled= 0;
+
+ init_dynamic_string(&ds_result, NULL, 0, 256);
+ init_dynamic_string(&ds_warnings, NULL, 0, 256);
+ bzero(&command, sizeof(command));
+
+ run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG,
+ display_optimizer_trace_query.str,
+ display_optimizer_trace_query.length,
+ ds, &ds_warnings);
+ run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG,
+ restore_optimizer_trace_query.str,
+ restore_optimizer_trace_query.length,
+ ds, &ds_warnings);
+ dynstr_free(&ds_result);
+ dynstr_free(&ds_warnings);
+ ps_protocol_enabled= save_ps_protocol_enabled;
+ view_protocol_enabled= save_view_protocol_enabled;
+ DBUG_VOID_RETURN;
+}
diff --git a/cmake/aws_sdk.cmake b/cmake/aws_sdk.cmake
new file mode 100644
index 00000000000..f6f88f2b880
--- /dev/null
+++ b/cmake/aws_sdk.cmake
@@ -0,0 +1,98 @@
+MACRO (SKIP_AWS_SDK MSG)
+ SET(${RETVAL} OFF PARENT_SCOPE)
+ SET(${REASON} ${MSG} PARENT_SCOPE)
+ RETURN()
+ENDMACRO()
+
+FUNCTION (CHECK_AWS_SDK RETVAL REASON)
+ # AWS_SDK_EXTERNAL_PROJECT must be ON
+ IF(NOT AWS_SDK_EXTERNAL_PROJECT)
+ SKIP_AWS_SDK("AWS_SDK_EXTERNAL_PROJECT is not ON")
+ ENDIF()
+ IF(NOT NOT_FOR_DISTRIBUTION)
+ SKIP_AWS_SDK("AWS SDK has Apache 2.0 License which is not complatible with GPLv2. Set -DNOT_FOR_DISTRIBUTION=ON if you need it")
+ ENDIF()
+ # Check compiler support
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+ IF (GCC_VERSION VERSION_LESS 4.8)
+ SKIP_AWS_SDK("GCC VERSION too old (${GCC_VERSION}, required is 4.8 or later")
+ ENDIF()
+ ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ IF ((CMAKE_CXX_COMPILER_VERSION AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3) OR
+ (CLANG_VERSION_STRING AND CLANG_VERSION_STRING VERSION_LESS 3.3))
+ SKIP_AWS_SDK("Clang version too old, required is 3.3 or later")
+ ENDIF()
+ ELSEIF(MSVC)
+ IF (MSVC_VERSION LESS 1800)
+ SKIP_AWS_SDK("MSVC version too old, required is VS2015 or later")
+ ENDIF()
+ ELSE()
+ SKIP_AWS_SDK("Unsupported compiler")
+ ENDIF()
+
+ # Check OS support
+ IF (NOT(WIN32 OR APPLE OR (CMAKE_SYSTEM_NAME MATCHES "Linux")))
+ SKIP_AWS_SDK("OS unsupported by AWS SDK")
+ ENDIF()
+
+ # Build from source, using ExternalProject_Add
+ # AWS C++ SDK requires cmake 2.8.12
+ IF(CMAKE_VERSION VERSION_LESS "2.8.12")
+ SKIP_AWS_SDK("CMake is too old")
+ ENDIF()
+
+ IF(UNIX)
+ # Check librairies required for building SDK
+ FIND_PACKAGE(CURL)
+ SET_PACKAGE_PROPERTIES(CURL PROPERTIES TYPE REQUIRED)
+ IF(NOT CURL_FOUND)
+ SKIP_AWS_SDK("AWS C++ SDK requires libcurl development package")
+ ENDIF()
+ FIND_PATH(UUID_INCLUDE_DIR uuid/uuid.h)
+ IF(NOT UUID_INCLUDE_DIR)
+ SKIP_AWS_SDK("AWS C++ SDK requires uuid development package")
+ ENDIF()
+ IF(NOT APPLE)
+ FIND_LIBRARY(UUID_LIBRARIES uuid)
+ SET_PACKAGE_PROPERTIES(UUID_LIBRARIES PROPERTIES TYPE REQUIRED)
+ IF(NOT UUID_LIBRARIES)
+ SKIP_AWS_SDK("AWS C++ SDK requires uuid development package")
+ ENDIF()
+ FIND_PACKAGE(OpenSSL)
+ SET_PACKAGE_PROPERTIES(OpenSSL PROPERTIES TYPE REQUIRED)
+ IF(NOT OPENSSL_FOUND)
+ SKIP_AWS_SDK("AWS C++ SDK requires openssl development package")
+ ENDIF()
+ ENDIF()
+ ENDIF()
+ SET(${RETVAL} ON PARENT_SCOPE)
+ENDFUNCTION()
+
+
+# USE_AWS_SDK_LIBS(target sdk_component1 ... sdk_component_N)
+# Example usage
+# USE_AWS_SDK_LIBS(aws_key_management kms s3)
+FUNCTION(USE_AWS_SDK_LIBS)
+ SET(SDK_COMPONENTS ${ARGN})
+ LIST(GET SDK_COMPONENTS 0 target)
+ IF(NOT TARGET ${target})
+ MESSAGE(FATAL_ERROR "${target} is not a valid target")
+ ENDIF()
+ SET(NON_DISTRIBUTABLE_WARNING "Apache 2.0" CACHE INTERNAL "")
+ LIST(REMOVE_AT SDK_COMPONENTS 0)
+ FOREACH(comp ${SDK_COMPONENTS})
+ SET_PROPERTY(GLOBAL PROPERTY AWS_SDK_LIBS ${comp} APPEND)
+ TARGET_LINK_LIBRARIES(${target} aws-cpp-sdk-${comp})
+ ENDFOREACH()
+ TARGET_LINK_LIBRARIES(${target} aws-cpp-sdk-core)
+ TARGET_INCLUDE_DIRECTORIES(${target} PRIVATE ${PROJECT_BINARY_DIR}/extra/aws_sdk/aws_sdk_cpp/include)
+ # Link OS libraries that AWS SDK depends on
+ IF(WIN32)
+ TARGET_LINK_LIBRARIES(${target} bcrypt winhttp wininet userenv version)
+ ELSE()
+ FIND_PACKAGE(CURL REQUIRED)
+ FIND_PACKAGE(OpenSSL REQUIRED)
+ TARGET_LINK_LIBRARIES(${target} ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} ${UUID_LIBRARIES})
+ ENDIF()
+ENDFUNCTION()
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index 2db09ed2e37..a19470e6df1 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -1,5 +1,5 @@
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2011, 2018, MariaDB Corporation
+# Copyright (c) 2011, 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
@@ -104,6 +104,7 @@ ELSEIF(RPM)
SET(CHECKMODULE /usr/bin/checkmodule CACHE FILEPATH "")
SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE FILEPATH "")
SET(WITH_JEMALLOC "yes" CACHE STRING "")
+ SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "")
IF(RPM MATCHES "fedora|centos|rhel")
SET(WITH_INNODB_BZIP2 OFF CACHE STRING "")
SET(WITH_INNODB_LZO OFF CACHE STRING "")
@@ -120,6 +121,7 @@ ELSEIF(DEB)
SET(WITH_LIBWRAP ON)
SET(HAVE_EMBEDDED_PRIVILEGE_CONTROL ON)
SET(WITH_JEMALLOC "yes" CACHE STRING "")
+ SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "")
SET(WITH_INNODB_BZIP2 OFF CACHE STRING "")
SET(WITH_INNODB_LZMA OFF CACHE STRING "")
SET(WITH_INNODB_LZO OFF CACHE STRING "")
@@ -129,6 +131,7 @@ ELSE()
SET(WITH_PCRE bundled CACHE STRING "")
SET(WITH_ZLIB bundled CACHE STRING "")
SET(WITH_JEMALLOC static CACHE STRING "")
+ SET(PLUGIN_AUTH_SOCKET STATIC CACHE STRING "")
SET(WITH_INNODB_BZIP2 OFF CACHE STRING "")
SET(WITH_INNODB_LZ4 OFF CACHE STRING "")
SET(WITH_INNODB_LZO OFF CACHE STRING "")
@@ -234,7 +237,7 @@ IF(UNIX)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
SET(COMMON_C_FLAGS "-static-intel -static-libgcc -g -mp -restrict")
- SET(COMMON_CXX_FLAGS "-static-intel -static-libgcc -g -mp -restrict -fno-exceptions -fno-rtti")
+ SET(COMMON_CXX_FLAGS "-static-intel -static-libgcc -g -mp -restrict -fno-exceptions")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -no-ftz -no-prefetch")
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -no-ftz -no-prefetch")
diff --git a/cmake/configure.pl b/cmake/configure.pl
index c296c5ba4b8..4085110b6fa 100644
--- a/cmake/configure.pl
+++ b/cmake/configure.pl
@@ -93,6 +93,11 @@ foreach my $option (@ARGV)
{
$option = substr($option, 2);
}
+ elsif (substr ($option, 0, 2) eq "-D")
+ {
+ # Must be cmake config option
+ $option = substr($option, 1);
+ }
else
{
# This must be environment variable
@@ -119,6 +124,11 @@ foreach my $option (@ARGV)
$just_print=1;
next;
}
+ if ($option =~ /D.*=/)
+ {
+ $cmakeargs = $cmakeargs." -".$option;
+ next;
+ }
if($option =~ /with-plugins=/)
{
my @plugins= split(/,/, substr($option,13));
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake
index 80b11185f9b..85edf0c1cbc 100644
--- a/cmake/cpack_rpm.cmake
+++ b/cmake/cpack_rpm.cmake
@@ -214,7 +214,7 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES
IF(WITH_WSREP)
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
- "galera" "rsync" "lsof" "grep" "gawk" "iproute"
+ "galera-4" "rsync" "lsof" "grep" "gawk" "iproute"
"coreutils" "findutils" "tar")
ENDIF()
@@ -283,7 +283,7 @@ ELSEIF(RPM MATCHES "sles")
"mariadb-server = %{version}-%{release}"
)
ENDIF()
-IF(RPM MATCHES "fedora31" OR RPM MATCHES "(rhel|centos)8")
+IF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)8")
SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang")
ENDIF()
diff --git a/cmake/create_initial_db.cmake b/cmake/create_initial_db.cmake
index 9d061d86711..3c42bb24ead 100644
--- a/cmake/create_initial_db.cmake
+++ b/cmake/create_initial_db.cmake
@@ -52,7 +52,7 @@ SET(BOOTSTRAP_COMMAND
--datadir=.
--default-storage-engine=MyISAM
--max_allowed_packet=8M
- --net_buffer_length=16K
+ --net_buffer_length=32K
)
GET_FILENAME_COMPONENT(CWD . ABSOLUTE)
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
index ee1a39066b1..6bcafbe766e 100644
--- a/cmake/install_macros.cmake
+++ b/cmake/install_macros.cmake
@@ -71,9 +71,10 @@ FUNCTION(INSTALL_MANPAGE file)
${MYSQL_DOC_DIR}/man/*${file}.8*
${GLOB_EXPR}
)
- ENDIF()
+ ENDIF()
FILE(GLOB_RECURSE MANPAGES ${GLOB_EXPR})
+
IF(MANPAGES)
LIST(GET MANPAGES 0 MANPAGE)
STRING(REPLACE "${file}man.1" "${file}.1" MANPAGE "${MANPAGE}")
@@ -100,19 +101,17 @@ FUNCTION(INSTALL_SCRIPT)
IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF()
- IF(ARG_COMPONENT)
- SET(COMP COMPONENT ${ARG_COMPONENT})
- ELSE()
- SET(COMP)
- ENDIF()
+ SET(COMP ${ARG_COMPONENT})
IF (COMP MATCHES ${SKIP_COMPONENTS})
RETURN()
ENDIF()
- INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} ${COMP})
+ INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
+ get_filename_component(dest "${script}" NAME)
+ CREATE_MARIADB_SYMLINK(${dest} ${ARG_DESTINATION} ${COMP})
- INSTALL_MANPAGE(${script})
+ INSTALL_MANPAGE(${dest})
ENDFUNCTION()
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index 4112faa341c..0f8786fc264 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -317,7 +317,7 @@ ELSEIF(UNIX)
ENDIF()
ENDIF()
-# We try to hide the symbols in yassl/zlib to avoid name clashes with
+# We try to hide the symbols in bundled libraries to avoid name clashes with
# other libraries like openssl.
FUNCTION(RESTRICT_SYMBOL_EXPORTS target)
IF(VISIBILITY_HIDDEN_FLAG)
diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake
index 8dbe7a6df47..5a1d186cf58 100644
--- a/cmake/maintainer.cmake
+++ b/cmake/maintainer.cmake
@@ -22,6 +22,8 @@ ENDIF()
SET(MY_WARNING_FLAGS
-Wall
-Wdeclaration-after-statement
+ -Wenum-compare
+ -Wenum-conversion
-Wextra
-Wformat-security
-Wno-format-truncation
diff --git a/cmake/make_dist.cmake.in b/cmake/make_dist.cmake.in
index 75691f944d6..d662dd76730 100644
--- a/cmake/make_dist.cmake.in
+++ b/cmake/make_dist.cmake.in
@@ -57,6 +57,14 @@ IF(GIT_EXECUTABLE)
IF(NOT RESULT EQUAL 0)
SET(GIT_EXECUTABLE)
ENDIF()
+ EXECUTE_PROCESS(
+ COMMAND "${GIT_EXECUTABLE}" submodule foreach "${GIT_EXECUTABLE} checkout-index --all --prefix=${PACKAGE_DIR}/wsrep-lib/$path/"
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/wsrep-lib
+ RESULT_VARIABLE RESULT
+ )
+ IF(NOT RESULT EQUAL 0)
+ SET(GIT_EXECUTABLE)
+ ENDIF()
ENDIF()
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/include/source_revision.h
diff --git a/cmake/mariadb_connector_c.cmake b/cmake/mariadb_connector_c.cmake
index ca0e16c8518..1ec62c6f6b2 100644
--- a/cmake/mariadb_connector_c.cmake
+++ b/cmake/mariadb_connector_c.cmake
@@ -8,7 +8,7 @@ SET(CONC_WITH_SIGNCODE ${SIGNCODE})
SET(SIGN_OPTIONS ${SIGNTOOL_PARAMETERS})
SET(CONC_WITH_EXTERNAL_ZLIB ON)
-IF(SSL_DEFINES MATCHES "YASSL")
+IF(SSL_DEFINES MATCHES "WOLFSSL")
IF(WIN32)
SET(CONC_WITH_SSL "SCHANNEL")
ELSE()
diff --git a/cmake/mysql_add_executable.cmake b/cmake/mysql_add_executable.cmake
index 6650b088281..f63fcbe3265 100644
--- a/cmake/mysql_add_executable.cmake
+++ b/cmake/mysql_add_executable.cmake
@@ -63,21 +63,25 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
UNSET(EXCLUDE_FROM_ALL)
ENDIF()
ADD_EXECUTABLE(${target} ${WIN32} ${MACOSX_BUNDLE} ${EXCLUDE_FROM_ALL} ${sources})
+
# tell CPack where to install
IF(NOT ARG_EXCLUDE_FROM_ALL)
IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF()
IF(ARG_COMPONENT)
- SET(COMP COMPONENT ${ARG_COMPONENT})
+ SET(COMP ${ARG_COMPONENT})
ELSEIF(MYSQL_INSTALL_COMPONENT)
- SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
+ SET(COMP ${MYSQL_INSTALL_COMPONENT})
ELSE()
- SET(COMP COMPONENT Client)
+ SET(COMP Client)
ENDIF()
IF (COMP MATCHES ${SKIP_COMPONENTS})
RETURN()
ENDIF()
- MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
+ MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
ENDIF()
+
+ # create mariadb named symlink
+ CREATE_MARIADB_SYMLINK(${target} ${ARG_DESTINATION} ${COMP})
ENDFUNCTION()
diff --git a/cmake/os/GNU.cmake b/cmake/os/GNU.cmake
new file mode 100644
index 00000000000..898241e6c9e
--- /dev/null
+++ b/cmake/os/GNU.cmake
@@ -0,0 +1,30 @@
+# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+# This file includes GNU/Hurd specific options and quirks, related to system checks
+
+# Something that needs to be set on legacy reasons
+SET(_GNU_SOURCE 1)
+SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1)
+
+# Ensure we have clean build for shared libraries
+# without unresolved symbols
+# Not supported with AddressSanitizer and ThreadSanitizer
+IF(NOT WITH_ASAN AND NOT WITH_TSAN)
+ SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
+ENDIF()
+
+# 64 bit file offset support flag
+SET(_FILE_OFFSET_BITS 64)
diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake
index 4a77b53fb31..27daf2dff1c 100644
--- a/cmake/os/SunOS.cmake
+++ b/cmake/os/SunOS.cmake
@@ -70,7 +70,7 @@ CHECK_C_SOURCE_RUNS(
# Check is special processor flag needs to be set on older GCC
-#that defaults to v8 sparc . Code here is taken from my_rdtsc.c
+#that defaults to v8 sparc . Code here is taken from my_rdtsc.h
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4
AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
SET(SOURCE
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake
index dbb18a488c7..29891dfdabd 100644
--- a/cmake/os/Windows.cmake
+++ b/cmake/os/Windows.cmake
@@ -96,7 +96,8 @@ IF(MSVC)
# Disable mingw based pkg-config found in Strawberry perl
SET(PKG_CONFIG_EXECUTABLE 0 CACHE INTERNAL "")
- SET(MSVC_CRT_TYPE /MT CACHE STRING
+
+ SET(MSVC_CRT_TYPE /MD CACHE STRING
"Runtime library - specify runtime library for linking (/MT,/MTd,/MD,/MDd)"
)
SET(VALID_CRT_TYPES /MTd /MDd /MD /MT)
@@ -106,9 +107,7 @@ IF(MSVC)
IF(MSVC_CRT_TYPE MATCHES "/MD")
# Dynamic runtime (DLLs), need to install CRT libraries.
- SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)# upgrade wizard
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT VCCRT)
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS TRUE)
SET(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
IF(MSVC_CRT_TYPE STREQUAL "/MDd")
SET (CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE)
@@ -284,3 +283,17 @@ ENDIF()
SET(FN_NO_CASE_SENSE 1)
SET(USE_SYMDIR 1)
+
+# Force static C runtime for targets in current directory
+# (useful to get rid of MFC dll's dependency, or in installer)
+MACRO(FORCE_STATIC_CRT)
+ FOREACH(flag
+ CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
+ CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
+ CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL
+ )
+ STRING(REGEX REPLACE "/MD[d]?" "/MT" "${flag}" "${${flag}}" )
+ ENDFOREACH()
+ENDMACRO()
diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake
index 5628db7f989..11ff5670d28 100644
--- a/cmake/os/WindowsCache.cmake
+++ b/cmake/os/WindowsCache.cmake
@@ -25,7 +25,6 @@ SET(HAVE_ACCESS 1 CACHE INTERNAL "")
SET(HAVE_ALARM CACHE INTERNAL "")
SET(HAVE_ALLOCA_H CACHE INTERNAL "")
SET(HAVE_ARPA_INET_H CACHE INTERNAL "")
-SET(HAVE_ASM_MSR_H CACHE INTERNAL "")
SET(HAVE_BACKTRACE CACHE INTERNAL "")
SET(HAVE_BACKTRACE_SYMBOLS CACHE INTERNAL "")
SET(HAVE_BACKTRACE_SYMBOLS_FD CACHE INTERNAL "")
@@ -137,7 +136,6 @@ SET(HAVE_PTHREAD_YIELD_NP CACHE INTERNAL "")
SET(HAVE_PTHREAD_YIELD_ZERO_ARG CACHE INTERNAL "")
SET(HAVE_PUTENV 1 CACHE INTERNAL "")
SET(HAVE_PWD_H CACHE INTERNAL "")
-SET(HAVE_RDTSCLL CACHE INTERNAL "")
SET(HAVE_READDIR_R CACHE INTERNAL "")
SET(HAVE_READLINK CACHE INTERNAL "")
SET(HAVE_READ_REAL_TIME CACHE INTERNAL "")
@@ -159,6 +157,7 @@ SET(HAVE_SIGSET CACHE INTERNAL "")
SET(HAVE_SIGTERM 1 CACHE INTERNAL "")
SET(HAVE_SIGTHREADMASK CACHE INTERNAL "")
SET(HAVE_SIGWAIT CACHE INTERNAL "")
+SET(HAVE_SIGWAITINFO CACHE INTERNAL "")
SET(HAVE_SIZEOF_CHARP TRUE CACHE INTERNAL "")
SET(SIZEOF_CHARP ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "")
SET(HAVE_SIZEOF_IN6_ADDR TRUE CACHE INTERNAL "")
@@ -306,7 +305,6 @@ SET(HAVE_SYS_UTSNAME_H CACHE INTERNAL "")
SET(HAVE_PTHREAD_ATTR_GETGUARDSIZE CACHE INTERNAL "")
SET(HAVE_SOCKPEERCRED CACHE INTERNAL "")
SET(HAVE_ABI_CXA_DEMANGLE CACHE INTERNAL "")
-SET(HAVE_GCC_ATOMIC_BUILTINS CACHE INTERNAL "")
SET(HAVE_GCC_C11_ATOMICS CACHE INTERNAL "")
SET(HAVE_VISIBILITY_HIDDEN CACHE INTERNAL "")
SET(HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC CACHE INTERNAL "")
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index e7e9d2a3642..008ac9e9471 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -25,12 +25,13 @@ INCLUDE(CMakeParseArguments)
# [MODULE_OUTPUT_NAME module_name]
# [STATIC_OUTPUT_NAME static_name]
# [RECOMPILE_FOR_EMBEDDED]
+# [NOT_EMBEDDED]
# [LINK_LIBRARIES lib1...libN]
# [DEPENDS target1...targetN]
MACRO(MYSQL_ADD_PLUGIN)
CMAKE_PARSE_ARGUMENTS(ARG
- "STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;RECOMPILE_FOR_EMBEDDED;CLIENT"
+ "STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;NOT_EMBEDDED;RECOMPILE_FOR_EMBEDDED;CLIENT;EXPORT_SYMBOLS"
"MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG"
"LINK_LIBRARIES;DEPENDS"
${ARGN}
@@ -139,8 +140,10 @@ MACRO(MYSQL_ADD_PLUGIN)
ADD_LIBRARY(${target} STATIC ${SOURCES})
DTRACE_INSTRUMENT(${target})
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDS})
- RESTRICT_SYMBOL_EXPORTS(${target})
- IF(WITH_EMBEDDED_SERVER)
+ IF(NOT ARG_EXPORT_SYMBOLS)
+ RESTRICT_SYMBOL_EXPORTS(${target})
+ ENDIF()
+ IF(WITH_EMBEDDED_SERVER AND (NOT ARG_NOT_EMBEDDED))
# Embedded library should contain PIC code and be linkable
# to shared libraries (on systems that need PIC)
IF(ARG_RECOMPILE_FOR_EMBEDDED OR NOT _SKIP_PIC)
@@ -165,19 +168,30 @@ MACRO(MYSQL_ADD_PLUGIN)
TARGET_LINK_LIBRARIES (${target} ${ARG_LINK_LIBRARIES})
ENDIF()
+ SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server" FORCE)
+
# Update mysqld dependencies
SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
${target} ${ARG_LINK_LIBRARIES} CACHE INTERNAL "" FORCE)
- SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server" FORCE)
+ IF(WITH_EMBEDDED_SERVER AND (NOT ARG_NOT_EMBEDDED))
+ SET (EMBEDDED_PLUGIN_LIBS ${EMBEDDED_PLUGIN_LIBS}
+ ${target} ${ARG_LINK_LIBRARIES} CACHE INTERNAL "" FORCE)
+ ENDIF()
+
+ IF(ARG_NOT_EMBEDDED)
+ SET(builtin_entry "#ifndef EMBEDDED_LIBRARY\n builtin_maria_${target}_plugin,\n#endif")
+ ELSE()
+ SET(builtin_entry " builtin_maria_${target}_plugin,")
+ ENDIF()
IF(ARG_MANDATORY)
SET (mysql_mandatory_plugins
- "${mysql_mandatory_plugins} builtin_maria_${target}_plugin,")
+ "${mysql_mandatory_plugins}${builtin_entry}\n")
SET (mysql_mandatory_plugins ${mysql_mandatory_plugins} PARENT_SCOPE)
ELSE()
SET (mysql_optional_plugins
- "${mysql_optional_plugins} builtin_maria_${target}_plugin,")
+ "${mysql_optional_plugins}${builtin_entry}\n")
SET (mysql_optional_plugins ${mysql_optional_plugins} PARENT_SCOPE)
ENDIF()
ELSEIF(PLUGIN_${plugin} MATCHES "(DYNAMIC|AUTO|YES)"
diff --git a/cmake/readline.cmake b/cmake/readline.cmake
index 916504f96ac..9c35d8c7d22 100644
--- a/cmake/readline.cmake
+++ b/cmake/readline.cmake
@@ -134,7 +134,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
IF(NOT_FOR_DISTRIBUTION)
- SET(NON_DISTRIBUTABLE_WARNING "GPLv3")
+ SET(NON_DISTRIBUTABLE_WARNING "GPLv3" CACHE INTERNAL "")
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
SET(USE_NEW_READLINE_INTERFACE 0)
@@ -160,8 +160,20 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
int res= (*rl_completion_entry_function)(0,0);
completion_matches(0,0);
}"
- LIBEDIT_INTERFACE)
- SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE})
+ LIBEDIT_HAVE_COMPLETION_INT)
+
+ CHECK_CXX_SOURCE_COMPILES("
+ #include <stdio.h>
+ #include <readline.h>
+ int main(int argc, char **argv)
+ {
+ char res= *(*rl_completion_entry_function)(0,0);
+ completion_matches(0,0);
+ }"
+ LIBEDIT_HAVE_COMPLETION_CHAR)
+ IF(LIBEDIT_HAVE_COMPLETION_INT OR LIBEDIT_HAVE_COMPLETION_CHAR)
+ SET(USE_LIBEDIT_INTERFACE 1)
+ ENDIF()
ENDIF()
ENDMACRO()
@@ -187,6 +199,7 @@ MACRO (MYSQL_CHECK_READLINE)
IF(USE_LIBEDIT_INTERFACE)
SET(MY_READLINE_INCLUDE_DIR ${LIBEDIT_INCLUDE_DIR})
SET(MY_READLINE_LIBRARY ${LIBEDIT_LIBRARY} ${CURSES_LIBRARY})
+ SET(USE_NEW_READLINE_INTERFACE ${LIBEDIT_HAVE_COMPLETION_CHAR})
ELSE()
MYSQL_USE_BUNDLED_READLINE()
ENDIF()
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index 1db6787aeb6..a6793cf3c55 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -15,7 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
# We support different versions of SSL:
-# - "bundled" uses source code in <source dir>/extra/yassl
+# - "bundled" uses source code in <source dir>/extra/wolfssl
# - "system" (typically) uses headers/libraries in /usr/lib and /usr/lib64
# - a custom installation of openssl can be used like this
# - cmake -DCMAKE_PREFIX_PATH=</path/to/custom/openssl> -DWITH_SSL="system"
@@ -35,7 +35,7 @@
# 'set path=</path/to/custom/openssl>\bin;%PATH%
# in order to find the .dll files at runtime.
-SET(WITH_SSL_DOC "bundled (use yassl)")
+SET(WITH_SSL_DOC "bundled (use wolfssl)")
SET(WITH_SSL_DOC
"${WITH_SSL_DOC}, yes (prefer os library if present, otherwise use bundled)")
SET(WITH_SSL_DOC
@@ -48,29 +48,20 @@ MACRO (CHANGE_SSL_SETTINGS string)
ENDMACRO()
MACRO (MYSQL_USE_BUNDLED_SSL)
- SET(INC_DIRS
- ${CMAKE_SOURCE_DIR}/extra/yassl/include
- ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include
+ SET(INC_DIRS
+ ${CMAKE_BINARY_DIR}/extra/wolfssl
+ ${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl
+ ${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl/wolfssl
)
- SET(SSL_LIBRARIES yassl taocrypt)
+ SET(SSL_LIBRARIES wolfssl wolfcrypt)
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
- SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
- SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED")
- SET(HAVE_ERR_remove_thread_state OFF CACHE INTERNAL "yassl doesn't have ERR_remove_thread_state")
- SET(HAVE_EncryptAes128Ctr OFF CACHE INTERNAL "yassl doesn't support AES-CTR")
- SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "yassl doesn't support AES-GCM")
+ SET(SSL_DEFINES "-DHAVE_OPENSSL -DHAVE_WOLFSSL -DWOLFSSL_USER_SETTINGS")
+ SET(HAVE_ERR_remove_thread_state ON CACHE INTERNAL "wolfssl doesn't have ERR_remove_thread_state")
+ SET(HAVE_EncryptAes128Ctr OFF CACHE INTERNAL "wolfssl does support AES-CTR, but differently from openssl")
+ SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "wolfssl does not support AES-GCM")
+ SET(HAVE_X509_check_host ON CACHE INTERNAL "wolfssl does support X509_check_host")
CHANGE_SSL_SETTINGS("bundled")
- ADD_SUBDIRECTORY(extra/yassl)
- ADD_SUBDIRECTORY(extra/yassl/taocrypt)
- GET_TARGET_PROPERTY(src yassl SOURCES)
- FOREACH(file ${src})
- SET(SSL_SOURCES ${SSL_SOURCES} ${CMAKE_SOURCE_DIR}/extra/yassl/${file})
- ENDFOREACH()
- GET_TARGET_PROPERTY(src taocrypt SOURCES)
- FOREACH(file ${src})
- SET(SSL_SOURCES ${SSL_SOURCES}
- ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/${file})
- ENDFOREACH()
+ ADD_SUBDIRECTORY(extra/wolfssl)
MESSAGE_ONCE(SSL_LIBRARIES "SSL_LIBRARIES = ${SSL_LIBRARIES}")
ENDMACRO()
@@ -157,6 +148,8 @@ MACRO (MYSQL_CHECK_SSL)
HAVE_EncryptAes128Ctr)
CHECK_SYMBOL_EXISTS(EVP_aes_128_gcm "openssl/evp.h"
HAVE_EncryptAes128Gcm)
+ CHECK_SYMBOL_EXISTS(X509_check_host "openssl/x509v3.h"
+ HAVE_X509_check_host)
SET(CMAKE_REQUIRED_INCLUDES)
SET(CMAKE_REQUIRED_LIBRARIES)
ELSE()
diff --git a/cmake/submodules.cmake b/cmake/submodules.cmake
index fca67a0508b..34dcfbea77a 100644
--- a/cmake/submodules.cmake
+++ b/cmake/submodules.cmake
@@ -45,6 +45,6 @@ ENDIF()
IF(update_result OR NOT EXISTS ${CMAKE_SOURCE_DIR}/libmariadb/CMakeLists.txt)
MESSAGE(FATAL_ERROR "No MariaDB Connector/C! Run
- ${GIT_EXECUTABLE} submodule update --init
+ ${GIT_EXECUTABLE} submodule update --init --recursive
Then restart the build.${SUBMODULE_UPDATE_CONFIG_MESSAGE}")
ENDIF()
diff --git a/cmake/symlinks.cmake b/cmake/symlinks.cmake
new file mode 100644
index 00000000000..ec638bc82de
--- /dev/null
+++ b/cmake/symlinks.cmake
@@ -0,0 +1,76 @@
+# Create lists
+if(COMMAND REGISTER_SYMLINK)
+ return()
+endif()
+
+macro(REGISTER_SYMLINK from to)
+ list(APPEND MARIADB_SYMLINK_FROMS ${from})
+ list(APPEND MARIADB_SYMLINK_TOS ${to})
+endmacro()
+
+# MariaDB names for executables
+REGISTER_SYMLINK("mysql" "mariadb")
+REGISTER_SYMLINK("mysqlaccess" "mariadb-access")
+REGISTER_SYMLINK("mysqladmin" "mariadb-admin")
+REGISTER_SYMLINK("mariabackup" "mariadb-backup")
+REGISTER_SYMLINK("mysqlbinlog" "mariadb-binlog")
+REGISTER_SYMLINK("mysqlcheck" "mariadb-check")
+REGISTER_SYMLINK("mysql_client_test_embedded" "mariadb-client-test-embedded")
+REGISTER_SYMLINK("mysql_client_test" "mariadb-client-test")
+REGISTER_SYMLINK("mariadb_config" "mariadb-config")
+REGISTER_SYMLINK("mysql_convert_table_format" "mariadb-convert-table-format")
+REGISTER_SYMLINK("mysqldump" "mariadb-dump")
+REGISTER_SYMLINK("mysqldumpslow" "mariadb-dumpslow")
+REGISTER_SYMLINK("mysql_embedded" "mariadb-embedded")
+REGISTER_SYMLINK("mysql_find_rows" "mariadb-find-rows")
+REGISTER_SYMLINK("mysql_fix_extensions" "mariadb-fix-extensions")
+REGISTER_SYMLINK("mysqlhotcopy" "mariadb-hotcopy")
+REGISTER_SYMLINK("mysqlimport" "mariadb-import")
+REGISTER_SYMLINK("mysql_install_db" "mariadb-install-db")
+REGISTER_SYMLINK("mysql_ldb" "mariadb-ldb")
+REGISTER_SYMLINK("mysql_plugin" "mariadb-plugin")
+REGISTER_SYMLINK("mysql_secure_installation" "mariadb-secure-installation")
+REGISTER_SYMLINK("mysql_setpermission" "mariadb-setpermission")
+REGISTER_SYMLINK("mysqlshow" "mariadb-show")
+REGISTER_SYMLINK("mysqlslap" "mariadb-slap")
+REGISTER_SYMLINK("mysqltest" "mariadb-test")
+REGISTER_SYMLINK("mysqltest_embedded" "mariadb-test-embedded")
+REGISTER_SYMLINK("mysql_tzinfo_to_sql" "mariadb-tzinfo-to-sql")
+REGISTER_SYMLINK("mysql_upgrade" "mariadb-upgrade")
+REGISTER_SYMLINK("mysql_upgrade_service" "mariadb-upgrade-service")
+REGISTER_SYMLINK("mysql_upgrade_wizard" "mariadb-upgrade-wizard")
+REGISTER_SYMLINK("mysql_waitpid" "mariadb-waitpid")
+REGISTER_SYMLINK("mysqld" "mariadbd")
+REGISTER_SYMLINK("mysqld_multi" "mariadbd-multi")
+REGISTER_SYMLINK("mysqld_safe" "mariadbd-safe")
+REGISTER_SYMLINK("mysqld_safe_helper" "mariadbd-safe-helper")
+
+# Add MariaDB symlinks
+macro(CREATE_MARIADB_SYMLINK src dir comp)
+ # Find the MariaDB name for executable
+ list(FIND MARIADB_SYMLINK_FROMS ${src} _index)
+
+ if (${_index} GREATER -1)
+ list(GET MARIADB_SYMLINK_TOS ${_index} mariadbname)
+ endif()
+
+ if (mariadbname)
+ CREATE_MARIADB_SYMLINK_IN_DIR(${src} ${mariadbname} ${dir} ${comp})
+ endif()
+endmacro(CREATE_MARIADB_SYMLINK)
+
+# Add MariaDB symlinks in directory
+macro(CREATE_MARIADB_SYMLINK_IN_DIR src dest dir comp)
+ if(UNIX)
+ add_custom_target(
+ SYM_${dest} ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${dest}
+ )
+
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${dest} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${src} ${dest}
+ COMMENT "mklink ${src} -> ${dest}")
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${dest} DESTINATION ${dir} COMPONENT ${comp})
+ endif()
+endmacro(CREATE_MARIADB_SYMLINK_IN_DIR)
diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake
index 990198ecf72..368ae61d1d3 100644
--- a/cmake/wsrep.cmake
+++ b/cmake/wsrep.cmake
@@ -17,6 +17,7 @@
#
# Galera library does not compile with windows
#
+IF (NOT WITHOUT_SERVER)
IF(UNIX)
SET(with_wsrep_default ON)
ELSE()
@@ -24,23 +25,46 @@ ELSE()
ENDIF()
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
+OPTION(WITH_WSREP_ALL
+ "Build all components of WSREP (unit tests, sample programs)"
+ OFF)
-# Set the patch version
-SET(WSREP_PATCH_VERSION "24")
+IF(WITH_WSREP)
+ # Set the patch version
+ SET(WSREP_PATCH_VERSION "22")
-# Obtain wsrep API version
-FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
- LIMIT_COUNT 1 REGEX "WSREP_INTERFACE_VERSION")
-STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}")
+ IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26/wsrep_api.h")
+ MESSAGE(FATAL_ERROR "No MariaDB wsrep-API code! Run
+ ${GIT_EXECUTABLE} submodule update --init --recursive
+Then restart the build.
+")
+ ENDIF()
+ # Obtain wsrep API version
+ FILE(STRINGS "${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26/wsrep_api.h" WSREP_API_VERSION
+ LIMIT_COUNT 1 REGEX "WSREP_INTERFACE_VERSION")
+ STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}")
-SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
- CACHE INTERNAL "WSREP version")
+ SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
+ CACHE INTERNAL "WSREP version")
-SET(WSREP_PROC_INFO ${WITH_WSREP})
+ SET(WSREP_PROC_INFO ${WITH_WSREP})
-IF(WITH_WSREP)
SET(WSREP_PATCH_VERSION "wsrep_${WSREP_VERSION}")
+ if (NOT WITH_WSREP_ALL)
+ SET(WSREP_LIB_WITH_UNIT_TESTS OFF CACHE BOOL
+ "Disable unit tests for wsrep-lib")
+ SET(WSREP_LIB_WITH_DBSIM OFF CACHE BOOL
+ "Disable building dbsim for wsrep-lib")
+ endif()
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/wsrep-lib/include)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26)
+
+ SET(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ SET(BUILD_SHARED_LIBS OFF)
+ ADD_SUBDIRECTORY(wsrep-lib)
+ SET(BUILD_SHARED_LIBS ${old_BUILD_SHARED_LIBS})
ENDIF()
IF (NOT WIN32)
ADD_FEATURE_INFO(WSREP WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)")
ENDIF()
+ENDIF(NOT WITHOUT_SERVER)
diff --git a/config.h.cmake b/config.h.cmake
index 962efeb13ba..3a4a030fd59 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -21,7 +21,6 @@
#cmakedefine _GNU_SOURCE 1
#cmakedefine HAVE_ALLOCA_H 1
#cmakedefine HAVE_ARPA_INET_H 1
-#cmakedefine HAVE_ASM_MSR_H 1
#cmakedefine HAVE_ASM_TERMBITS_H 1
#cmakedefine HAVE_CRYPT_H 1
#cmakedefine HAVE_CURSES_H 1
@@ -190,10 +189,8 @@
#cmakedefine HAVE_PERROR 1
#cmakedefine HAVE_POLL 1
#cmakedefine HAVE_POSIX_FALLOCATE 1
-#cmakedefine HAVE_LINUX_FALLOC_H 1
#cmakedefine HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE 1
#cmakedefine HAVE_PREAD 1
-#cmakedefine HAVE_RDTSCLL 1
#cmakedefine HAVE_READ_REAL_TIME 1
#cmakedefine HAVE_PTHREAD_ATTR_CREATE 1
#cmakedefine HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
@@ -225,6 +222,7 @@
#cmakedefine HAVE_SIGACTION 1
#cmakedefine HAVE_SIGTHREADMASK 1
#cmakedefine HAVE_SIGWAIT 1
+#cmakedefine HAVE_SIGWAITINFO 1
#cmakedefine HAVE_SLEEP 1
#cmakedefine HAVE_SNPRINTF 1
#cmakedefine HAVE_STPCPY 1
@@ -385,10 +383,10 @@
#cmakedefine HAVE_SVR3_SIGNALS 1
#cmakedefine HAVE_V7_SIGNALS 1
#cmakedefine HAVE_ERR_remove_thread_state 1
+#cmakedefine HAVE_X509_check_host 1
#cmakedefine HAVE_SOLARIS_STYLE_GETHOST 1
-#cmakedefine HAVE_GCC_ATOMIC_BUILTINS 1
#cmakedefine HAVE_GCC_C11_ATOMICS 1
#cmakedefine HAVE_SOLARIS_ATOMIC 1
#cmakedefine HAVE_DECL_SHM_HUGETLB 1
diff --git a/configure.cmake b/configure.cmake
index 974086b2abe..a899c2fd671 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -53,11 +53,6 @@ IF(NOT SYSTEM_TYPE)
ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND (NOT MSVC))
- # MySQL "canonical" GCC flags. At least -fno-rtti flag affects
- # ABI and cannot be simply removed.
- SET(CMAKE_CXX_FLAGS
- "${CMAKE_CXX_FLAGS} -fno-rtti")
-
IF (CMAKE_EXE_LINKER_FLAGS MATCHES " -static "
OR CMAKE_EXE_LINKER_FLAGS MATCHES " -static$")
SET(HAVE_DLOPEN FALSE CACHE "Disable dlopen due to -static flag" FORCE)
@@ -74,6 +69,11 @@ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
SET(PLUGIN_QUERY_RESPONSE_TIME NO CACHE BOOL "Disabled, gcc is too old")
ENDIF()
+# use runtime atomic-support detection in aarch64
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics")
+ENDIF()
+
IF(WITHOUT_DYNAMIC_PLUGINS)
MESSAGE("Dynamic plugins are disabled.")
ENDIF(WITHOUT_DYNAMIC_PLUGINS)
@@ -199,7 +199,6 @@ CHECK_INCLUDE_FILES (inttypes.h HAVE_INTTYPES_H)
CHECK_INCLUDE_FILES (langinfo.h HAVE_LANGINFO_H)
CHECK_INCLUDE_FILES (link.h HAVE_LINK_H)
CHECK_INCLUDE_FILES (linux/unistd.h HAVE_LINUX_UNISTD_H)
-CHECK_INCLUDE_FILES (linux/falloc.h HAVE_LINUX_FALLOC_H)
CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H)
CHECK_INCLUDE_FILES (locale.h HAVE_LOCALE_H)
CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
@@ -263,7 +262,7 @@ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DPACKAGE=test) # b
CHECK_INCLUDE_FILES (bfd.h BFD_H_EXISTS)
IF(BFD_H_EXISTS)
IF(NOT_FOR_DISTRIBUTION)
- SET(NON_DISTRIBUTABLE_WARNING "GPLv3")
+ SET(NON_DISTRIBUTABLE_WARNING "GPLv3" CACHE INTERNAL "")
SET(HAVE_BFD_H 1)
ENDIF()
ENDIF()
@@ -405,6 +404,7 @@ CHECK_FUNCTION_EXISTS (setlocale HAVE_SETLOCALE)
CHECK_FUNCTION_EXISTS (sigaction HAVE_SIGACTION)
CHECK_FUNCTION_EXISTS (sigthreadmask HAVE_SIGTHREADMASK)
CHECK_FUNCTION_EXISTS (sigwait HAVE_SIGWAIT)
+CHECK_FUNCTION_EXISTS (sigwaitinfo HAVE_SIGWAITINFO)
CHECK_FUNCTION_EXISTS (sigset HAVE_SIGSET)
CHECK_FUNCTION_EXISTS (sleep HAVE_SLEEP)
CHECK_FUNCTION_EXISTS (snprintf HAVE_SNPRINTF)
@@ -447,8 +447,6 @@ SET(CMAKE_REQUIRED_FLAGS)
CHECK_INCLUDE_FILES(time.h HAVE_TIME_H)
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES(sys/times.h HAVE_SYS_TIMES_H)
-CHECK_INCLUDE_FILES(asm/msr.h HAVE_ASM_MSR_H)
-#msr.h has rdtscll()
CHECK_INCLUDE_FILES(ia64intrin.h HAVE_IA64INTRIN_H)
@@ -463,9 +461,6 @@ CHECK_FUNCTION_EXISTS(ftime HAVE_FTIME)
CHECK_FUNCTION_EXISTS(time HAVE_TIME)
# We can use time() on Macintosh if there is no ftime().
-CHECK_FUNCTION_EXISTS(rdtscll HAVE_RDTSCLL)
-# I doubt that we'll ever reach the check for this.
-
#
# Tests for symbols
@@ -869,30 +864,6 @@ MARK_AS_ADVANCED(NO_ALARM)
CHECK_CXX_SOURCE_COMPILES("
int main()
{
- int foo= -10; int bar= 10;
- long long int foo64= -10; long long int bar64= 10;
- if (!__sync_fetch_and_add(&foo, bar) || foo)
- return -1;
- bar= __sync_lock_test_and_set(&foo, bar);
- if (bar || foo != 10)
- return -1;
- bar= __sync_val_compare_and_swap(&bar, foo, 15);
- if (bar)
- return -1;
- if (!__sync_fetch_and_add(&foo64, bar64) || foo64)
- return -1;
- bar64= __sync_lock_test_and_set(&foo64, bar64);
- if (bar64 || foo64 != 10)
- return -1;
- bar64= __sync_val_compare_and_swap(&bar64, foo, 15);
- if (bar64)
- return -1;
- return 0;
-}"
-HAVE_GCC_ATOMIC_BUILTINS)
-CHECK_CXX_SOURCE_COMPILES("
-int main()
-{
char x=1;
short y=1;
int z=1;
diff --git a/debian/additions/debian-start b/debian/additions/debian-start
index d22463dc95c..5c15e1e0130 100755
--- a/debian/additions/debian-start
+++ b/debian/additions/debian-start
@@ -15,6 +15,7 @@ fi
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+# Don't run full mysql_upgrade on every server restart, use --version-check to do it only once
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
diff --git a/debian/additions/debian-start.inc.sh b/debian/additions/debian-start.inc.sh
index 0640bf9c2a6..fa5b1299bdc 100755
--- a/debian/additions/debian-start.inc.sh
+++ b/debian/additions/debian-start.inc.sh
@@ -60,7 +60,7 @@ function upgrade_system_tables_if_necessary() {
# errors as the script is designed to be idempotent.
LC_ALL=C $MYUPGRADE \
2>&1 \
- | egrep -v '^(1|@had|ERROR (1054|1060|1061))' \
+ | egrep -v '^(1|@had|ERROR (1051|1054|1060|1061|1146|1347|1348))' \
| logger -p daemon.warn -i -t$0
}
diff --git a/debian/additions/mysql.init b/debian/additions/mysql.init
new file mode 100644
index 00000000000..bcc366e95b7
--- /dev/null
+++ b/debian/additions/mysql.init
@@ -0,0 +1,193 @@
+#!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides: mysql
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Should-Start: $network $named $time
+# Should-Stop: $network $named $time
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start and stop the mysql database server daemon
+# Description: Controls the main MariaDB database server daemon "mysqld"
+# and its wrapper script "mysqld_safe".
+### END INIT INFO
+#
+set -e
+set -u
+${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
+
+test -x /usr/sbin/mysqld || exit 0
+
+. /lib/lsb/init-functions
+
+SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
+
+MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+
+# priority can be overridden and "-s" adds output to stderr
+ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"
+
+if [ -f /etc/default/mysql ]; then
+ . /etc/default/mysql
+fi
+
+# Safeguard (relative paths, core dumps..)
+cd /
+umask 077
+
+# mysqladmin likes to read /root/.my.cnf. This is usually not what I want
+# as many admins e.g. only store a password without a username there and
+# so break my scripts.
+export HOME=/etc/mysql/
+
+## Fetch a particular option from mysql's invocation.
+#
+# Usage: void mysqld_get_param option
+mysqld_get_param() {
+ /usr/sbin/mysqld --print-defaults \
+ | tr " " "\n" \
+ | grep -- "--$1" \
+ | tail -n 1 \
+ | cut -d= -f2
+}
+
+## Do some sanity checks before even trying to start mysqld.
+sanity_checks() {
+ # check for config file
+ if [ ! -r /etc/mysql/my.cnf ]; then
+ log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz"
+ echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER
+ fi
+
+ # check for diskspace shortage
+ datadir=`mysqld_get_param datadir`
+ if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4>4096) }'; then
+ log_failure_msg "$0: ERROR: The partition with $datadir is too full!"
+ echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER
+ exit 1
+ fi
+}
+
+## Checks if there is a server running and if so if it is accessible.
+#
+# check_alive insists on a pingable server
+# check_dead also fails if there is a lost mysqld in the process list
+#
+# Usage: boolean mysqld_status [check_alive|check_dead] [warn|nowarn]
+mysqld_status () {
+ ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? ))
+
+ ps_alive=0
+ pidfile=`mysqld_get_param pid-file`
+ if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi
+
+ if [ "$1" = "check_alive" -a $ping_alive = 1 ] ||
+ [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then
+ return 0 # EXIT_SUCCESS
+ else
+ if [ "$2" = "warn" ]; then
+ echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug
+ fi
+ return 1 # EXIT_FAILURE
+ fi
+}
+
+#
+# main()
+#
+
+case "${1:-''}" in
+
+ 'start')
+ sanity_checks;
+ # Start daemon
+ log_daemon_msg "Starting MariaDB database server" "mysqld"
+ if mysqld_status check_alive nowarn; then
+ log_progress_msg "already running"
+ log_end_msg 0
+ else
+ # Could be removed during boot
+ test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
+
+ # Start MariaDB!
+ /usr/bin/mysqld_safe "${@:2}" 2>&1 >/dev/null | $ERR_LOGGER &
+
+ for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do
+ sleep 1
+ if mysqld_status check_alive nowarn ; then break; fi
+ log_progress_msg "."
+ done
+ if mysqld_status check_alive warn; then
+ log_end_msg 0
+ # Now start mysqlcheck or whatever the admin wants.
+ output=$(/etc/mysql/debian-start)
+ if [ -n "$output" ]; then
+ log_action_msg "$output"
+ fi
+ else
+ log_end_msg 1
+ log_failure_msg "Please take a look at the syslog"
+ fi
+ fi
+ ;;
+
+ 'stop')
+ # * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible
+ # at least for cron, we can rely on it here, too. (although we have
+ # to specify it explicit as e.g. sudo environments points to the normal
+ # users home and not /root)
+ log_daemon_msg "Stopping MariaDB database server" "mysqld"
+ if ! mysqld_status check_dead nowarn; then
+ set +e
+ shutdown_out=`$MYADMIN shutdown 2>&1`; r=$?
+ set -e
+ if [ "$r" -ne 0 ]; then
+ log_end_msg 1
+ [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out"
+ log_daemon_msg "Killing MariaDB database server by signal" "mysqld"
+ killall -15 mysqld
+ server_down=
+ for i in `seq 1 600`; do
+ sleep 1
+ if mysqld_status check_dead nowarn; then server_down=1; break; fi
+ done
+ if test -z "$server_down"; then killall -9 mysqld; fi
+ fi
+ fi
+
+ if ! mysqld_status check_dead warn; then
+ log_end_msg 1
+ log_failure_msg "Please stop MariaDB manually and read /usr/share/doc/mariadb-server-10.4/README.Debian.gz!"
+ exit -1
+ else
+ log_end_msg 0
+ fi
+ ;;
+
+ 'restart')
+ set +e; $SELF stop; set -e
+ shift
+ $SELF start "${@}"
+ ;;
+
+ 'reload'|'force-reload')
+ log_daemon_msg "Reloading MariaDB database server" "mysqld"
+ $MYADMIN reload
+ log_end_msg 0
+ ;;
+
+ 'status')
+ if mysqld_status check_alive nowarn; then
+ log_action_msg "$($MYADMIN version)"
+ else
+ log_action_msg "MariaDB is stopped."
+ exit 3
+ fi
+ ;;
+
+ *)
+ echo "Usage: $SELF start|stop|restart|reload|force-reload|status"
+ exit 1
+ ;;
+esac
diff --git a/debian/changelog b/debian/changelog
index dec49bd4282..053727796d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mariadb-10.4 (1:10.4.0) unstable; urgency=low
+
+ * Initial release.
+
+ -- Otto Kekäläinen <otto@debian.org> Sun, 05 Aug 2018 00:06:30 -0500
+
mariadb-10.3 (1:10.3.0) unstable; urgency=low
* Bump epoch to supersede 1:10.1.29-6 in Debian
diff --git a/debian/control b/debian/control
index aed073e5c8c..85d131bbd11 100644
--- a/debian/control
+++ b/debian/control
@@ -1,4 +1,4 @@
-Source: mariadb-10.3
+Source: mariadb-10.4
Section: database
Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
@@ -38,6 +38,53 @@ Homepage: http://mariadb.org/
Vcs-Browser: https://github.com/MariaDB/server/
Vcs-Git: https://github.com/MariaDB/server.git
+Package: libmariadb3
+Architecture: any
+Multi-Arch: same
+Section: libs
+Depends: mariadb-common,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Conflicts: libmariadbclient18 (<< 10.2.0),
+ mariadb-galera-server-10.0 (<< 10.0.5),
+ mariadb-galera-server-5.5 (<< 5.5.33),
+ mariadb-server-10.0 (<< 10.0.5),
+ mariadb-server-5.1,
+ mariadb-server-5.2,
+ mariadb-server-5.3,
+ mariadb-server-5.5 (<< 5.5.33)
+Breaks: libmariadbclient18 (<< ${source:Version})
+Replaces: libmariadbclient18 (<< ${source:Version})
+Description: MariaDB database client library
+ MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MariaDB are speed, robustness and
+ ease of use.
+ .
+ This package includes the client library.
+
+Package: libmariadb3-compat
+Architecture: any
+Section: libs
+Depends: libmariadb3,
+ mariadb-common,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Breaks: libmysqlclient19,
+ libmysqlclient20
+Replaces: libmysqlclient19,
+ libmysqlclient20
+Provides: libmysqlclient19,
+ libmysqlclient20
+Description: MariaDB database client library MySQL compat package
+ MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MariaDB are speed, robustness and
+ ease of use.
+ .
+ This package includes the client runtime libraries that simulate and replace
+ the equivalents found in MySQL 5.6 and 5.7 (mysqlclient19 and 20).
+
Package: libmariadb-dev
Architecture: any
Multi-Arch: same
@@ -90,53 +137,6 @@ Description: MariaDB Connector/C, compatibility symlinks
This package includes compatibility symlinks to allow sources expecting the
MySQL client libraries to be built against MariaDB Connector/C.
-Package: libmariadb3
-Architecture: any
-Multi-Arch: same
-Section: libs
-Depends: mariadb-common,
- ${misc:Depends},
- ${shlibs:Depends}
-Conflicts: libmariadbclient18 (<< 10.2.0),
- mariadb-galera-server-10.0 (<< 10.0.5),
- mariadb-galera-server-5.5 (<< 5.5.33),
- mariadb-server-10.0 (<< 10.0.5),
- mariadb-server-5.1,
- mariadb-server-5.2,
- mariadb-server-5.3,
- mariadb-server-5.5 (<< 5.5.33)
-Breaks: libmariadbclient18 (<< ${source:Version})
-Replaces: libmariadbclient18 (<< ${source:Version})
-Description: MariaDB database client library
- MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
- server. SQL (Structured Query Language) is the most popular database query
- language in the world. The main goals of MariaDB are speed, robustness and
- ease of use.
- .
- This package includes the client library.
-
-Package: libmariadb3-compat
-Architecture: any
-Section: libs
-Depends: libmariadb3,
- mariadb-common,
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: libmysqlclient19,
- libmysqlclient20
-Replaces: libmysqlclient19,
- libmysqlclient20
-Provides: libmysqlclient19,
- libmysqlclient20
-Description: MariaDB database client library MySQL compat package
- MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
- server. SQL (Structured Query Language) is the most popular database query
- language in the world. The main goals of MariaDB are speed, robustness and
- ease of use.
- .
- This package includes the client runtime libraries that simulate and replace
- the equivalents found in MySQL 5.6 and 5.7 (mysqlclient19 and 20).
-
Package: libmariadbclient18
Section: libs
Architecture: any
@@ -169,6 +169,22 @@ Description: Virtual package to satisfy external libmysqlclient18 depends
This package provides compatibility symlinks for binaries that expect to find
libmysqlclient.so.18 will automatically use libmariadb.so.3 instead.
+Package: libmariadbd19
+Architecture: any
+Multi-Arch: same
+Section: libs
+Depends: ${misc:Depends},
+ ${shlibs:Depends}
+Breaks: libmariadbd-dev (<< ${source:Version})
+Replaces: libmariadbd-dev (<< ${source:Version})
+Description: MariaDB embedded database, shared library
+ MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MariaDB are speed, robustness and
+ ease of use.
+ .
+ This package includes a shared library for embedded MariaDB applications
+
Package: libmariadbd-dev
Architecture: any
Multi-Arch: same
@@ -190,22 +206,6 @@ Description: MariaDB embedded database, development files
.
This package includes the embedded server library development and header files.
-Package: libmariadbd19
-Architecture: any
-Multi-Arch: same
-Section: libs
-Depends: ${misc:Depends},
- ${shlibs:Depends}
-Breaks: libmariadbd-dev (<< ${source:Version})
-Replaces: libmariadbd-dev (<< ${source:Version})
-Description: MariaDB embedded database, shared library
- MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
- server. SQL (Structured Query Language) is the most popular database query
- language in the world. The main goals of MariaDB are speed, robustness and
- ease of use.
- .
- This package includes a shared library for embedded MariaDB applications
-
Package: mysql-common
Architecture: all
Depends: ${misc:Depends},
@@ -233,7 +233,7 @@ Description: MariaDB database common files (e.g. /etc/mysql/mariadb.conf.d/)
This package includes files needed by all versions of the client library
(e.g. /etc/mysql/mariadb.conf.d/ or /etc/mysql/mariadb.cnf).
-Package: mariadb-client-core-10.3
+Package: mariadb-client-core-10.4
Architecture: any
Depends: libmariadb3,
mariadb-common (>= ${source:Version}),
@@ -242,6 +242,7 @@ Depends: libmariadb3,
Conflicts: mariadb-client-10.0,
mariadb-client-10.1,
mariadb-client-10.2,
+ mariadb-client-10.3,
mariadb-client-5.1,
mariadb-client-5.2,
mariadb-client-5.3,
@@ -249,6 +250,7 @@ Conflicts: mariadb-client-10.0,
mariadb-client-core-10.0,
mariadb-client-core-10.1,
mariadb-client-core-10.2,
+ mariadb-client-core-10.3,
mariadb-client-core-5.1,
mariadb-client-core-5.2,
mariadb-client-core-5.3,
@@ -265,6 +267,7 @@ Conflicts: mariadb-client-10.0,
Replaces: mariadb-client-10.0,
mariadb-client-10.1,
mariadb-client-10.2,
+ mariadb-client-10.3,
mariadb-client-5.1,
mariadb-client-5.2,
mariadb-client-5.3,
@@ -272,6 +275,7 @@ Replaces: mariadb-client-10.0,
mariadb-client-core-10.0,
mariadb-client-core-10.1,
mariadb-client-core-10.2,
+ mariadb-client-core-10.3,
mariadb-client-core-5.1,
mariadb-client-core-5.2,
mariadb-client-core-5.3,
@@ -300,10 +304,10 @@ Description: MariaDB database core client binaries
.
This package includes the core client files, as used by Akonadi.
-Package: mariadb-client-10.3
+Package: mariadb-client-10.4
Architecture: any
Depends: debianutils (>=1.6),
- mariadb-client-core-10.3 (>= ${source:Version}),
+ mariadb-client-core-10.4 (>= ${source:Version}),
mariadb-common,
${misc:Depends},
${perl:Depends},
@@ -312,6 +316,7 @@ Conflicts: mariadb-client (<< ${source:Version}),
mariadb-client-10.0,
mariadb-client-10.1,
mariadb-client-10.2,
+ mariadb-client-10.3,
mariadb-client-5.1,
mariadb-client-5.2,
mariadb-client-5.3,
@@ -327,6 +332,7 @@ Replaces: mariadb-client (<< ${source:Version}),
mariadb-client-10.0,
mariadb-client-10.1,
mariadb-client-10.2,
+ mariadb-client-10.3,
mariadb-client-5.1,
mariadb-client-5.2,
mariadb-client-5.3,
@@ -358,13 +364,15 @@ Description: MariaDB database client binaries
This package includes the client binaries and the additional tools
innotop and mysqlreport.
-Package: mariadb-server-core-10.3
+Package: mariadb-server-core-10.4
Architecture: any
Depends: mariadb-common (>= ${source:Version}),
${misc:Depends},
${shlibs:Depends}
Conflicts: mariadb-server-core-10.0,
mariadb-server-core-10.1,
+ mariadb-server-core-10.2,
+ mariadb-server-core-10.3,
mariadb-server-core-5.1,
mariadb-server-core-5.2,
mariadb-server-core-5.3,
@@ -379,16 +387,17 @@ Conflicts: mariadb-server-core-10.0,
Breaks: mariadb-client-10.0,
mariadb-client-10.1,
mariadb-client-10.2,
- mariadb-client-10.3 (<< ${source:Version}),
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-client-10.3,
+ mariadb-server-10.3
Replaces: mariadb-client-10.0,
mariadb-client-10.1,
mariadb-client-10.2,
- mariadb-client-10.3 (<< ${source:Version}),
- mariadb-server-10.3 (<< ${source:Version}),
+ mariadb-client-10.3,
+ mariadb-server-10.3,
mariadb-server-core-10.0,
mariadb-server-core-10.1,
mariadb-server-core-10.2,
+ mariadb-server-core-10.3,
mariadb-server-core-5.1,
mariadb-server-core-5.2,
mariadb-server-core-5.3,
@@ -415,7 +424,7 @@ Description: MariaDB database core server files
.
This package includes the core server files, as used by Akonadi.
-Package: mariadb-server-10.3
+Package: mariadb-server-10.4
Architecture: any
Suggests: mailx,
mariadb-test,
@@ -425,14 +434,14 @@ Recommends: libhtml-template-perl
Pre-Depends: adduser (>= 3.40),
debconf,
mariadb-common (>= ${source:Version})
-Depends: galera-3 (>=25.3),
+Depends: galera-4 (>=26.4),
gawk,
iproute2,
libdbi-perl,
lsb-base (>= 3.0-10),
lsof,
- mariadb-client-10.3 (>= ${source:Version}),
- mariadb-server-core-10.3 (>= ${binary:Version}),
+ mariadb-client-10.4 (>= ${source:Version}),
+ mariadb-server-core-10.4 (>= ${binary:Version}),
passwd,
perl (>= 5.6),
psmisc,
@@ -444,6 +453,7 @@ Conflicts: mariadb-server (<< ${source:Version}),
mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
+ mariadb-server-10.3,
mariadb-server-5.1,
mariadb-server-5.2,
mariadb-server-5.3,
@@ -466,6 +476,7 @@ Replaces: libmariadbclient-dev (<< 5.5.0),
mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
+ mariadb-server-10.3,
mariadb-server-5.1,
mariadb-server-5.2,
mariadb-server-5.3,
@@ -494,11 +505,11 @@ Description: MariaDB database server binaries
Package: mariadb-server
Architecture: all
-Depends: mariadb-server-10.3 (>= ${source:Version}),
+Depends: mariadb-server-10.4 (>= ${source:Version}),
${misc:Depends}
Description: MariaDB database server (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of
- mariadb-server (currently mariadb-server-10.3), as determined by the MariaDB
+ mariadb-server (currently mariadb-server-10.4), as determined by the MariaDB
maintainers. Install this package if in doubt about which MariaDB
version you need. That will install the version recommended by the
package maintainers.
@@ -510,18 +521,34 @@ Description: MariaDB database server (metapackage depending on the latest versio
Package: mariadb-client
Architecture: all
-Depends: mariadb-client-10.3 (>= ${source:Version}),
+Depends: mariadb-client-10.4 (>= ${source:Version}),
${misc:Depends}
Description: MariaDB database client (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of
- mariadb-client (currently mariadb-client-10.3), as determined by the MariaDB
+ mariadb-client (currently mariadb-client-10.4), as determined by the MariaDB
maintainers. Install this package if in doubt about which MariaDB version
you want, as this is the one considered to be in the best shape.
+Package: mariadb-backup
+Architecture: any
+Breaks: mariadb-backup-10.1,
+ mariadb-backup-10.2
+Replaces: mariadb-backup-10.1,
+ mariadb-backup-10.2
+Depends: mariadb-client-core-10.4 (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends}
+Description: Backup tool for MariaDB server
+ This backup tool is guaranteed to be compatible with MariaDB.
+ Based on Xtrabackup, but improved to work with MariaDB.
+ .
+ Plese refer to the MariaDB Knowledge Base on more information on
+ how to use this tool.
+
Package: mariadb-plugin-connect
Architecture: any
Depends: libxml2,
- mariadb-server-10.3 (= ${binary:Version}),
+ mariadb-server-10.4 (= ${binary:Version}),
unixodbc,
${misc:Depends},
${shlibs:Depends}
@@ -539,7 +566,7 @@ Description: Connect storage engine for MariaDB
Package: mariadb-plugin-rocksdb
Architecture: amd64 arm64 mips64el ppc64el
-Depends: mariadb-server-10.3 (= ${binary:Version}),
+Depends: mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-rocksdb-engine-10.2,
@@ -555,7 +582,7 @@ Description: RocksDB storage engine for MariaDB
Package: mariadb-plugin-oqgraph
Architecture: any
Depends: libjudydebian1,
- mariadb-server-10.3 (= ${binary:Version}),
+ mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-oqgraph-engine-10.1,
@@ -572,17 +599,17 @@ Description: OQGraph storage engine for MariaDB
Package: mariadb-plugin-tokudb
Architecture: amd64
Depends: libjemalloc1 (>= 3.0.0~) | libjemalloc2,
- mariadb-server-10.3 (= ${binary:Version}),
+ mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Replaces: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Description: TokuDB storage engine for MariaDB
The TokuDB storage engine is for use in high-performance and write-intensive
environments, offering increased compression and better performance based
@@ -591,17 +618,17 @@ Description: TokuDB storage engine for MariaDB
Package: mariadb-plugin-mroonga
Architecture: any-alpha any-amd64 any-arm any-arm64 any-i386 any-ia64 any-mips64el any-mips64r6el any-mipsel any-mipsr6el any-nios2 any-powerpcel any-ppc64el any-sh3 any-sh4 any-tilegx
-Depends: mariadb-server-10.3 (= ${binary:Version}),
+Depends: mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Replaces: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Description: Mroonga storage engine for MariaDB
Mroonga (formerly named Groonga Storage Engine) is a storage engine that
provides fast CJK-ready full text searching using column store.
@@ -609,17 +636,17 @@ Description: Mroonga storage engine for MariaDB
Package: mariadb-plugin-spider
Architecture: any
-Depends: mariadb-server-10.3 (= ${binary:Version}),
+Depends: mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Replaces: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Description: Spider storage engine for MariaDB
The Spider storage engine with built-in sharding features. It supports
partitioning and xa transactions, and allows tables of different MariaDB
@@ -628,17 +655,17 @@ Description: Spider storage engine for MariaDB
Package: mariadb-plugin-cassandra
Architecture: any
-Depends: mariadb-server-10.3 (= ${binary:Version}),
+Depends: mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Replaces: mariadb-server-10.0,
mariadb-server-10.1,
mariadb-server-10.2,
- mariadb-server-10.3 (<< ${source:Version})
+ mariadb-server-10.3
Description: Cassandra storage engine for MariaDB
The Cassandra Storage Engine allows access to data in a Cassandra cluster from
MariaDB, combining the best of SQL and no-SQL worlds. Cassandra SE (storage
@@ -650,7 +677,7 @@ Description: Cassandra storage engine for MariaDB
Package: mariadb-plugin-gssapi-server
Architecture: any
Depends: libgssapi-krb5-2,
- mariadb-server-10.3,
+ mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-gssapi-server-10.1,
@@ -668,7 +695,7 @@ Description: GSSAPI authentication plugin for MariaDB server
Package: mariadb-plugin-gssapi-client
Architecture: any
Depends: libgssapi-krb5-2,
- mariadb-client-10.3,
+ mariadb-client-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Breaks: mariadb-gssapi-client-10.1,
@@ -683,36 +710,22 @@ Description: GSSAPI authentication plugin for MariaDB client
.
This package contains the client parts.
-Package: mariadb-backup
-Architecture: any
-Breaks: mariadb-backup-10.1,
- mariadb-backup-10.2
-Replaces: mariadb-backup-10.1,
- mariadb-backup-10.2
-Depends: mariadb-client-core-10.3 (= ${binary:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Description: Backup tool for MariaDB server
- This backup tool is guaranteed to be compatible with MariaDB.
- Based on Xtrabackup, but improved to work with MariaDB.
- .
- Plese refer to the MariaDB Knowledge Base on more information on
- how to use this tool.
-
Package: mariadb-plugin-cracklib-password-check
Architecture: any
Depends: libcrack2 (>= 2.9.0),
- mariadb-server-10.3,
+ mariadb-server-10.4 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Description: CrackLib Password Validation Plugin for MariaDB
This password validation plugin uses cracklib to allow only
sufficiently secure (as defined by cracklib) user passwords in MariaDB.
+ .
+ Install and configure this to enforce stronger passwords for MariaDB users.
Package: mariadb-test
Architecture: any
-Depends: mariadb-client-10.3 (= ${binary:Version}),
- mariadb-server-10.3 (= ${binary:Version}),
+Depends: mariadb-client-10.4 (= ${binary:Version}),
+ mariadb-server-10.4 (= ${binary:Version}),
mariadb-test-data (= ${source:Version}),
${misc:Depends},
${shlibs:Depends}
@@ -720,6 +733,7 @@ Breaks: mariadb-server-5.5,
mariadb-test-10.0,
mariadb-test-10.1,
mariadb-test-10.2,
+ mariadb-test-10.3,
mariadb-test-5.5,
mysql-testsuite,
mysql-testsuite-5.5,
@@ -730,6 +744,7 @@ Replaces: mariadb-server-5.5,
mariadb-test-10.0,
mariadb-test-10.1,
mariadb-test-10.2,
+ mariadb-test-10.3,
mariadb-test-5.5,
mysql-testsuite,
mysql-testsuite-5.5,
diff --git a/debian/libmariadb-dev.README.Maintainer b/debian/libmariadb-dev.README.Maintainer
index 99e1c662c14..40942827d63 100644
--- a/debian/libmariadb-dev.README.Maintainer
+++ b/debian/libmariadb-dev.README.Maintainer
@@ -1,3 +1,6 @@
The examples directory includes files that might be needed by some
developers:
- the example file udf_example.c
+
+For more information, see MariaDB Connector/C docs at:
+https://github.com/MariaDB/mariadb-connector-c/wiki/libmysql_libmariadb
diff --git a/debian/mariadb-backup.install b/debian/mariadb-backup.install
index 734117c92e2..21a32860b0c 100644
--- a/debian/mariadb-backup.install
+++ b/debian/mariadb-backup.install
@@ -1,2 +1,4 @@
usr/bin/mariabackup
usr/bin/mbstream
+usr/share/man/man1/mariabackup.1
+usr/share/man/man1/mariadb-backup.1
diff --git a/debian/mariadb-backup.links b/debian/mariadb-backup.links
new file mode 100644
index 00000000000..7980ef5e54d
--- /dev/null
+++ b/debian/mariadb-backup.links
@@ -0,0 +1 @@
+usr/bin/mariabackup usr/bin/mariadb-backup
diff --git a/debian/mariadb-client-10.3.install b/debian/mariadb-client-10.3.install
deleted file mode 100644
index 945bf77c689..00000000000
--- a/debian/mariadb-client-10.3.install
+++ /dev/null
@@ -1,22 +0,0 @@
-debian/additions/innotop/innotop usr/bin/
-debian/additions/mysqlreport usr/bin/
-usr/bin/mysql_find_rows
-usr/bin/mysql_fix_extensions
-usr/bin/mysql_waitpid
-usr/bin/mysqlaccess
-usr/bin/mysqladmin
-usr/bin/mysqldump
-usr/bin/mysqldumpslow
-usr/bin/mysqlimport
-usr/bin/mysqlshow
-usr/bin/mysqlslap
-usr/share/man/man1/mysql_find_rows.1
-usr/share/man/man1/mysql_fix_extensions.1
-usr/share/man/man1/mysql_waitpid.1
-usr/share/man/man1/mysqlaccess.1
-usr/share/man/man1/mysqladmin.1
-usr/share/man/man1/mysqldump.1
-usr/share/man/man1/mysqldumpslow.1
-usr/share/man/man1/mysqlimport.1
-usr/share/man/man1/mysqlshow.1
-usr/share/man/man1/mysqlslap.1
diff --git a/debian/mariadb-client-10.3.links b/debian/mariadb-client-10.3.links
deleted file mode 100644
index 4a504969246..00000000000
--- a/debian/mariadb-client-10.3.links
+++ /dev/null
@@ -1,6 +0,0 @@
-usr/bin/mysqlcheck usr/bin/mysqlanalyze
-usr/bin/mysqlcheck usr/bin/mysqloptimize
-usr/bin/mysqlcheck usr/bin/mysqlrepair
-usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlanalyze.1.gz
-usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqloptimize.1.gz
-usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz
diff --git a/debian/mariadb-client-10.3.menu b/debian/mariadb-client-10.3.menu
deleted file mode 100644
index 1894442ca20..00000000000
--- a/debian/mariadb-client-10.3.menu
+++ /dev/null
@@ -1,3 +0,0 @@
-# According to /usr/share/menu/ policy 1.4, not /usr/share/doc/debian-policy/
-?package(mariadb-client-10.3):needs="text" section="Applications/Data Management"\
- title="Innotop" command="/usr/bin/innotop"
diff --git a/debian/mariadb-client-10.3.README.Debian b/debian/mariadb-client-10.4.README.Debian
index 64f0f509951..64f0f509951 100644
--- a/debian/mariadb-client-10.3.README.Debian
+++ b/debian/mariadb-client-10.4.README.Debian
diff --git a/debian/mariadb-client-10.3.docs b/debian/mariadb-client-10.4.docs
index c09092629c3..c09092629c3 100644
--- a/debian/mariadb-client-10.3.docs
+++ b/debian/mariadb-client-10.4.docs
diff --git a/debian/mariadb-client-10.4.install b/debian/mariadb-client-10.4.install
new file mode 100644
index 00000000000..4cd0af71c24
--- /dev/null
+++ b/debian/mariadb-client-10.4.install
@@ -0,0 +1,33 @@
+debian/additions/innotop/innotop usr/bin/
+debian/additions/mysqlreport usr/bin/
+usr/bin/mysql_find_rows
+usr/bin/mysql_fix_extensions
+usr/bin/mysql_waitpid
+usr/bin/mysqlaccess
+usr/bin/mysqladmin
+usr/bin/mysqldump
+usr/bin/mysqldumpslow
+usr/bin/mysqlimport
+usr/bin/mysqlshow
+usr/bin/mysqlslap
+usr/share/man/man1/mariadb-access.1
+usr/share/man/man1/mariadb-admin.1
+usr/share/man/man1/mariadb-binlog.1
+usr/share/man/man1/mariadb-dump.1
+usr/share/man/man1/mariadb-dumpslow.1
+usr/share/man/man1/mariadb-find-rows.1
+usr/share/man/man1/mariadb-fix-extensions.1
+usr/share/man/man1/mariadb-import.1
+usr/share/man/man1/mariadb-plugin.1
+usr/share/man/man1/mariadb-slap.1
+usr/share/man/man1/mariadb-waitpid.1
+usr/share/man/man1/mysql_find_rows.1
+usr/share/man/man1/mysql_fix_extensions.1
+usr/share/man/man1/mysql_waitpid.1
+usr/share/man/man1/mysqlaccess.1
+usr/share/man/man1/mysqladmin.1
+usr/share/man/man1/mysqldump.1
+usr/share/man/man1/mysqldumpslow.1
+usr/share/man/man1/mysqlimport.1
+usr/share/man/man1/mysqlshow.1
+usr/share/man/man1/mysqlslap.1
diff --git a/debian/mariadb-client-10.4.links b/debian/mariadb-client-10.4.links
new file mode 100644
index 00000000000..5d966575b76
--- /dev/null
+++ b/debian/mariadb-client-10.4.links
@@ -0,0 +1,25 @@
+usr/bin/mysql_find_rows usr/bin/mariadb-find-rows
+usr/bin/mysql_fix_extensions usr/bin/mariadb-fix-extensions
+usr/bin/mysql_plugin usr/bin/mariadb-plugin
+usr/bin/mysql_waitpid usr/bin/mariadb-waitpid
+usr/bin/mysqlaccess usr/bin/mariadb-access
+usr/bin/mysqladmin usr/bin/mariadb-admin
+usr/bin/mysqlbinlog usr/bin/mariadb-binlog
+usr/bin/mysqlcheck usr/bin/mariadb-analyze
+usr/bin/mysqlcheck usr/bin/mariadb-optimize
+usr/bin/mysqlcheck usr/bin/mariadb-repair
+usr/bin/mysqlcheck usr/bin/mysqlanalyze
+usr/bin/mysqlcheck usr/bin/mysqloptimize
+usr/bin/mysqlcheck usr/bin/mysqlrepair
+usr/bin/mysqldump usr/bin/mariadb-dump
+usr/bin/mysqldumpslow usr/bin/mariadb-dumpslow
+usr/bin/mysqlimport usr/bin/mariadb-import
+usr/bin/mysqlreport usr/bin/mariadb-report
+usr/bin/mysqlslap usr/bin/mariadb-slap
+usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-analyze.1.gz
+usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-optimize.1.gz
+usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-repair.1.gz
+usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlanalyze.1.gz
+usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqloptimize.1.gz
+usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz
+usr/share/man/man1/mysqlreport.1.gz usr/share/man/man1/mariadb-report.1.gz
diff --git a/debian/mariadb-client-10.3.manpages b/debian/mariadb-client-10.4.manpages
index 6f3e2bc188c..6f3e2bc188c 100644
--- a/debian/mariadb-client-10.3.manpages
+++ b/debian/mariadb-client-10.4.manpages
diff --git a/debian/mariadb-client-10.4.menu b/debian/mariadb-client-10.4.menu
new file mode 100644
index 00000000000..58f7ebfc45f
--- /dev/null
+++ b/debian/mariadb-client-10.4.menu
@@ -0,0 +1,3 @@
+# According to /usr/share/menu/ policy 1.4, not /usr/share/doc/debian-policy/
+?package(mariadb-client-10.4):needs="text" section="Applications/Data Management"\
+ title="Innotop" command="/usr/bin/innotop"
diff --git a/debian/mariadb-client-core-10.3.install b/debian/mariadb-client-core-10.3.install
deleted file mode 100644
index a2781309439..00000000000
--- a/debian/mariadb-client-core-10.3.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/bin/mysql
-usr/bin/mysqlcheck
-usr/share/man/man1/mysql.1
-usr/share/man/man1/mysqlcheck.1
diff --git a/debian/mariadb-client-core-10.4.install b/debian/mariadb-client-core-10.4.install
new file mode 100644
index 00000000000..4cc61674770
--- /dev/null
+++ b/debian/mariadb-client-core-10.4.install
@@ -0,0 +1,6 @@
+usr/bin/mysql
+usr/bin/mysqlcheck
+usr/share/man/man1/mariadb-check.1
+usr/share/man/man1/mariadb.1
+usr/share/man/man1/mysql.1
+usr/share/man/man1/mysqlcheck.1
diff --git a/debian/mariadb-client-core-10.4.links b/debian/mariadb-client-core-10.4.links
new file mode 100644
index 00000000000..d889e7164b0
--- /dev/null
+++ b/debian/mariadb-client-core-10.4.links
@@ -0,0 +1,2 @@
+usr/bin/mysql usr/bin/mariadb
+usr/bin/mysqlcheck usr/bin/mariadb-check
diff --git a/debian/mariadb-plugin-rocksdb.install b/debian/mariadb-plugin-rocksdb.install
index 403c7f291b6..3e6e3d4b00e 100644
--- a/debian/mariadb-plugin-rocksdb.install
+++ b/debian/mariadb-plugin-rocksdb.install
@@ -3,3 +3,5 @@ usr/bin/myrocks_hotbackup
usr/bin/mysql_ldb
usr/bin/sst_dump
usr/lib/mysql/plugin/ha_rocksdb.so
+usr/share/man/man1/mariadb-ldb.1
+usr/share/man/man1/mysql_ldb.1
diff --git a/debian/mariadb-plugin-rocksdb.links b/debian/mariadb-plugin-rocksdb.links
new file mode 100644
index 00000000000..78e47d43359
--- /dev/null
+++ b/debian/mariadb-plugin-rocksdb.links
@@ -0,0 +1 @@
+usr/bin/mysql_ldb usr/bin/mariadb-ldb
diff --git a/debian/mariadb-plugin-tokudb.install b/debian/mariadb-plugin-tokudb.install
index e8925c1d4f1..40dd0e78c65 100644
--- a/debian/mariadb-plugin-tokudb.install
+++ b/debian/mariadb-plugin-tokudb.install
@@ -3,6 +3,6 @@ etc/systemd/system/mariadb.service.d/tokudb.conf
usr/bin/tokuft_logprint
usr/bin/tokuftdump
usr/lib/mysql/plugin/ha_tokudb.so
-usr/share/doc/mariadb-server-10.3/README.md usr/share/doc/mariadb-plugin-tokudb/README.md
+usr/share/doc/mariadb-server-10.4/README.md usr/share/doc/mariadb-plugin-tokudb/README.md
usr/share/man/man1/tokuft_logprint.1
usr/share/man/man1/tokuftdump.1
diff --git a/debian/mariadb-server-10.3.README.Debian b/debian/mariadb-server-10.3.README.Debian
deleted file mode 100644
index 1e8b86f867c..00000000000
--- a/debian/mariadb-server-10.3.README.Debian
+++ /dev/null
@@ -1,106 +0,0 @@
-* MYSQL WON'T START OR STOP?:
-=============================
-You may never ever delete the mysql user "root". Although it has no password
-is set, the unix_auth plugin ensure that it can only be run locally as the root
-user. The credentials in /etc/mysql/debian.cnf specify the user are used by the
-init scripts to stop the server and perform logrotation. So in most of the
-time you can fix the situation by making sure that the /etc/mysql/debian.cnf
-file specifies the root user and no password.
-
-This used to be the debian-sys-maint user which is no longer used.
-
-* WHAT TO DO AFTER UPGRADES:
-============================
-The privilege tables are automatically updated so all there is left is read
-the release notes on https://mariadb.com/kb/en/release-notes/ to see if any
-changes affect custom apps.
-
-* WHAT TO DO AFTER INSTALLATION:
-================================
-The MySQL manual describes certain steps to do at this stage in a separate
-chapter. They are not necessary as the Debian packages does them
-automatically.
-
-The only thing that is left over for the admin is
- - setting the passwords
- - creating new users and databases
- - read the rest of this text
-
-* NETWORKING:
-=============
-For security reasons, the Debian package has enabled networking only on the
-loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with
-"netstat -tlnp" where it is listening. If your connection is aborted
-immediately check your firewall rules or network routes.
-
-* WHERE IS THE DOCUMENTATION?:
-==============================
-https://mariadb.com/kb
-
-* PASSWORDS:
-============
-It is strongly recommended you create an admin users for your database
-administration needs.
-
-If your local unix account is the one you want to have local super user
-access on your database with you can create the following account that will
-only work for the local unix user connecting to the database locally.
-
- sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO '$USER'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION"
-
-To create a local machine account username=USERNAME with a password:
-
- sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'USERNAME'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION"
-
-To create a USERNAME user with password 'password' admin user that can access
-the DB server over the network:
-
- sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION"
-
-Scripts should run as a user have the required grants and be identified via unix_socket.
-
-If you are too tired to type the password in every time and unix_socket auth
-doesn't suit your needs, you can store it in the file $HOME/.my.cnf. It should
-be chmod 0600 (-rw------- username usergroup .my.cnf) to ensure that nobody else
-can read it. Every other configuration parameter can be stored there, too.
-
-For more information in the MariaDB manual in/usr/share/doc/mariadb-doc or
-https://mariadb.com/kb/en/configuring-mariadb-with-mycnf/.
-
-ATTENTION: It is necessary, that a ~/.my.cnf from root always contains a "user"
-line wherever there is a "password" line, else, the Debian maintenance
-scripts, that use /etc/mysql/debian.cnf, will use the username
-"root" but the password that is in root's .my.cnf. Also note,
-that every change you make in the /root/.my.cnf will affect the mysql cron
-script, too.
-
- # an example of $HOME/.my.cnf
- [client]
- user = your-mysql-username
- password = enter-your-good-new-password-here
-
-* FURTHER NOTES ON REPLICATION
-===============================
-If the MySQL server is acting as a replication slave, you should not
-set --tmpdir to point to a directory on a memory-based filesystem or to
-a directory that is cleared when the server host restarts. A replication
-slave needs some of its temporary files to survive a machine restart so
-that it can replicate temporary tables or LOAD DATA INFILE operations. If
-files in the temporary file directory are lost when the server restarts,
-replication fails.
-
-* DOWNGRADING
-============================
-Unsupported. Period.
-
-You might get lucky downgrading a few minor versions without issued. Take a
-backup first. If you break it you get to keep both pieces. Do a restore from
-backup or upgrade to the previous version.
-
-If doing a major version downgrade, take a mysqldump/mydumpber consistent
-backup using the current version and reload after downgrading and purging
-existing databases.
-
-* BACKUPS
-============================
-Backups save jobs. Don't get caught without one.
diff --git a/debian/mariadb-server-10.3.config b/debian/mariadb-server-10.3.config
deleted file mode 100644
index 44640f2a441..00000000000
--- a/debian/mariadb-server-10.3.config
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-set -e
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-# Beware that there are two ypwhich one of them needs the 2>/dev/null!
-if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
- db_input high mariadb-server-10.0/nis_warning || true
- db_go
-fi
-# only ask this question on fresh installs, during "reconfiguration" and when
-# not upgrading from an existing 5.0 installation.
-# there is also an additional check for empty root passwords in the
-# postinst script when the tools are available for us to use.
-if [ "$1" = "configure" ] && ([ -z "$2" ] && [ ! -e "/var/lib/mysql/debian-5.0.flag" ] ) || [ "$1" = "reconfigure" ]; then
- while :; do
- RET=""
- db_input high mysql-server/root_password || true
- db_go
- db_get mysql-server/root_password
- # if password isn't empty we ask for password verification
- if [ -z "$RET" ]; then
- db_fset mysql-server/root_password seen false
- db_fset mysql-server/root_password_again seen false
- break
- fi
- ROOT_PW="$RET"
- db_input high mysql-server/root_password_again || true
- db_go
- db_get mysql-server/root_password_again
- if [ "$RET" == "$ROOT_PW" ]; then
- ROOT_PW=''
- break
- fi
- db_fset mysql-server/password_mismatch seen false
- db_input critical mysql-server/password_mismatch
- db_set mysql-server/root_password ""
- db_set mysql-server/root_password_again ""
- db_go
- done
-fi
diff --git a/debian/mariadb-server-10.3.install b/debian/mariadb-server-10.3.install
deleted file mode 100644
index 7cd81e785bf..00000000000
--- a/debian/mariadb-server-10.3.install
+++ /dev/null
@@ -1,102 +0,0 @@
-debian/additions/debian-start etc/mysql
-debian/additions/debian-start.inc.sh usr/share/mysql
-debian/additions/echo_stderr usr/share/mysql
-debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
-etc/apparmor.d/usr.sbin.mysqld
-etc/security/user_map.conf
-lib/*/security/pam_user_map.so
-lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
-usr/bin/aria_chk
-usr/bin/aria_dump_log
-usr/bin/aria_ftdump
-usr/bin/aria_pack
-usr/bin/aria_read_log
-usr/bin/galera_new_cluster
-usr/bin/galera_recovery
-usr/bin/mariadb-service-convert
-usr/bin/msql2mysql
-usr/bin/my_print_defaults
-usr/bin/myisam_ftdump
-usr/bin/myisamchk
-usr/bin/myisamlog
-usr/bin/myisampack
-usr/bin/mysql_convert_table_format
-usr/bin/mysql_plugin
-usr/bin/mysql_secure_installation
-usr/bin/mysql_setpermission
-usr/bin/mysql_tzinfo_to_sql
-usr/bin/mysqlbinlog
-usr/bin/mysqld_multi
-usr/bin/mysqld_safe
-usr/bin/mysqld_safe_helper
-usr/bin/mysqlhotcopy
-usr/bin/perror
-usr/bin/replace
-usr/bin/resolve_stack_dump
-usr/bin/resolveip
-usr/bin/wsrep_sst_common
-usr/bin/wsrep_sst_mariabackup
-usr/bin/wsrep_sst_mysqldump
-usr/bin/wsrep_sst_rsync
-usr/lib/mysql/plugin/auth_ed25519.so
-usr/lib/mysql/plugin/auth_pam.so
-usr/lib/mysql/plugin/auth_socket.so
-usr/lib/mysql/plugin/disks.so
-usr/lib/mysql/plugin/file_key_management.so
-usr/lib/mysql/plugin/ha_archive.so
-usr/lib/mysql/plugin/ha_blackhole.so
-usr/lib/mysql/plugin/ha_federated.so
-usr/lib/mysql/plugin/ha_federatedx.so
-usr/lib/mysql/plugin/ha_sphinx.so
-usr/lib/mysql/plugin/handlersocket.so
-usr/lib/mysql/plugin/locales.so
-usr/lib/mysql/plugin/metadata_lock_info.so
-usr/lib/mysql/plugin/query_cache_info.so
-usr/lib/mysql/plugin/query_response_time.so
-usr/lib/mysql/plugin/server_audit.so
-usr/lib/mysql/plugin/simple_password_check.so
-usr/lib/mysql/plugin/sql_errlog.so
-usr/lib/mysql/plugin/wsrep_info.so
-usr/share/apport/package-hooks/source_mariadb-10.3.py
-usr/share/doc/mariadb-server-10.3/mysqld.sym.gz
-usr/share/man/man1/aria_chk.1
-usr/share/man/man1/aria_dump_log.1
-usr/share/man/man1/aria_ftdump.1
-usr/share/man/man1/aria_pack.1
-usr/share/man/man1/aria_read_log.1
-usr/share/man/man1/galera_new_cluster.1
-usr/share/man/man1/galera_recovery.1
-usr/share/man/man1/mariadb-service-convert.1
-usr/share/man/man1/msql2mysql.1
-usr/share/man/man1/my_print_defaults.1
-usr/share/man/man1/myisam_ftdump.1
-usr/share/man/man1/myisamchk.1
-usr/share/man/man1/myisamlog.1
-usr/share/man/man1/myisampack.1
-usr/share/man/man1/mysql_convert_table_format.1
-usr/share/man/man1/mysql_plugin.1
-usr/share/man/man1/mysql_secure_installation.1
-usr/share/man/man1/mysql_setpermission.1
-usr/share/man/man1/mysql_tzinfo_to_sql.1
-usr/share/man/man1/mysqlbinlog.1
-usr/share/man/man1/mysqld_multi.1
-usr/share/man/man1/mysqld_safe.1
-usr/share/man/man1/mysqld_safe_helper.1
-usr/share/man/man1/mysqlhotcopy.1
-usr/share/man/man1/perror.1
-usr/share/man/man1/replace.1
-usr/share/man/man1/resolve_stack_dump.1
-usr/share/man/man1/resolveip.1
-usr/share/man/man1/wsrep_sst_common.1
-usr/share/man/man1/wsrep_sst_mariabackup.1
-usr/share/man/man1/wsrep_sst_mysqldump.1
-usr/share/man/man1/wsrep_sst_rsync.1
-usr/share/mysql/errmsg-utf8.txt
-usr/share/mysql/fill_help_tables.sql
-usr/share/mysql/maria_add_gis_sp_bootstrap.sql
-usr/share/mysql/mysql_performance_tables.sql
-usr/share/mysql/mysql_system_tables.sql
-usr/share/mysql/mysql_system_tables_data.sql
-usr/share/mysql/mysql_test_data_timezone.sql
-usr/share/mysql/mysql_test_db.sql
-usr/share/mysql/wsrep_notify
diff --git a/debian/mariadb-server-10.3.mysql-server.logrotate b/debian/mariadb-server-10.3.mysql-server.logrotate
deleted file mode 100644
index 4111a276dc3..00000000000
--- a/debian/mariadb-server-10.3.mysql-server.logrotate
+++ /dev/null
@@ -1,20 +0,0 @@
-# - I put everything in one block and added sharedscripts, so that mysql gets
-# flush-logs'd only once.
-# Else the binary logs would automatically increase by n times every day.
-# - The error log is obsolete, messages go to syslog now.
-/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log {
- daily
- rotate 7
- missingok
- create 640 mysql adm
- compress
- sharedscripts
- postrotate
- test -x /usr/bin/mysqladmin || exit 0
- if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
- # If this fails, check debian.conf!
- mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
- flush-engine-log flush-general-log flush-slow-log
- fi
- endscript
-}
diff --git a/debian/mariadb-server-10.3.mysql.init b/debian/mariadb-server-10.3.mysql.init
deleted file mode 100644
index 35a52d5d8db..00000000000
--- a/debian/mariadb-server-10.3.mysql.init
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/bin/bash
-#
-### BEGIN INIT INFO
-# Provides: mysql
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Should-Start: $network $named $time
-# Should-Stop: $network $named $time
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Start and stop the mysql database server daemon
-# Description: Controls the main MariaDB database server daemon "mysqld"
-# and its wrapper script "mysqld_safe".
-### END INIT INFO
-#
-set -e
-set -u
-${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
-
-test -x /usr/sbin/mysqld || exit 0
-
-. /lib/lsb/init-functions
-
-SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
-
-MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
-
-# priority can be overridden and "-s" adds output to stderr
-ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"
-
-if [ -f /etc/default/mysql ]; then
- . /etc/default/mysql
-fi
-
-# Safeguard (relative paths, core dumps..)
-cd /
-umask 077
-
-# mysqladmin likes to read /root/.my.cnf. This is usually not what I want
-# as many admins e.g. only store a password without a username there and
-# so break my scripts.
-export HOME=/etc/mysql/
-
-## Fetch a particular option from mysql's invocation.
-#
-# Usage: void mysqld_get_param option
-mysqld_get_param() {
- /usr/sbin/mysqld --print-defaults \
- | tr " " "\n" \
- | grep -- "--$1" \
- | tail -n 1 \
- | cut -d= -f2
-}
-
-## Do some sanity checks before even trying to start mysqld.
-sanity_checks() {
- # check for config file
- if [ ! -r /etc/mysql/my.cnf ]; then
- log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz"
- echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER
- fi
-
- # check for diskspace shortage
- datadir=`mysqld_get_param datadir`
- if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4>4096) }'; then
- log_failure_msg "$0: ERROR: The partition with $datadir is too full!"
- echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER
- exit 1
- fi
-}
-
-## Checks if there is a server running and if so if it is accessible.
-#
-# check_alive insists on a pingable server
-# check_dead also fails if there is a lost mysqld in the process list
-#
-# Usage: boolean mysqld_status [check_alive|check_dead] [warn|nowarn]
-mysqld_status () {
- ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? ))
-
- ps_alive=0
- pidfile=`mysqld_get_param pid-file`
- if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi
-
- if [ "$1" = "check_alive" -a $ping_alive = 1 ] ||
- [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then
- return 0 # EXIT_SUCCESS
- else
- if [ "$2" = "warn" ]; then
- echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug
- fi
- return 1 # EXIT_FAILURE
- fi
-}
-
-#
-# main()
-#
-
-case "${1:-''}" in
-
- 'start')
- sanity_checks;
- # Start daemon
- log_daemon_msg "Starting MariaDB database server" "mysqld"
- if mysqld_status check_alive nowarn; then
- log_progress_msg "already running"
- log_end_msg 0
- else
- # Could be removed during boot
- test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
-
- # Start MariaDB!
- /usr/bin/mysqld_safe "${@:2}" 2>&1 >/dev/null | $ERR_LOGGER &
-
- for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do
- sleep 1
- if mysqld_status check_alive nowarn ; then break; fi
- log_progress_msg "."
- done
- if mysqld_status check_alive warn; then
- log_end_msg 0
- # Now start mysqlcheck or whatever the admin wants.
- output=$(/etc/mysql/debian-start)
- if [ -n "$output" ]; then
- log_action_msg "$output"
- fi
- else
- log_end_msg 1
- log_failure_msg "Please take a look at the syslog"
- fi
- fi
- ;;
-
- 'stop')
- # * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible
- # at least for cron, we can rely on it here, too. (although we have
- # to specify it explicit as e.g. sudo environments points to the normal
- # users home and not /root)
- log_daemon_msg "Stopping MariaDB database server" "mysqld"
- if ! mysqld_status check_dead nowarn; then
- set +e
- shutdown_out=`$MYADMIN shutdown 2>&1`; r=$?
- set -e
- if [ "$r" -ne 0 ]; then
- log_end_msg 1
- [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out"
- log_daemon_msg "Killing MariaDB database server by signal" "mysqld"
- killall -15 mysqld
- server_down=
- for i in `seq 1 600`; do
- sleep 1
- if mysqld_status check_dead nowarn; then server_down=1; break; fi
- done
- if test -z "$server_down"; then killall -9 mysqld; fi
- fi
- fi
-
- if ! mysqld_status check_dead warn; then
- log_end_msg 1
- log_failure_msg "Please stop MariaDB manually and read /usr/share/doc/mariadb-server-10.3/README.Debian.gz!"
- exit -1
- else
- log_end_msg 0
- fi
- ;;
-
- 'restart')
- set +e; $SELF stop; set -e
- shift
- $SELF start "${@}"
- ;;
-
- 'reload'|'force-reload')
- log_daemon_msg "Reloading MariaDB database server" "mysqld"
- $MYADMIN reload
- log_end_msg 0
- ;;
-
- 'status')
- if mysqld_status check_alive nowarn; then
- log_action_msg "$($MYADMIN version)"
- else
- log_action_msg "MariaDB is stopped."
- exit 3
- fi
- ;;
-
- *)
- echo "Usage: $SELF start|stop|restart|reload|force-reload|status"
- exit 1
- ;;
-esac
diff --git a/debian/mariadb-server-10.3.postinst b/debian/mariadb-server-10.3.postinst
deleted file mode 100644
index 38f20ec4774..00000000000
--- a/debian/mariadb-server-10.3.postinst
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/bin/bash -e
-
-. /usr/share/debconf/confmodule
-
-# Automatically set version to ease maintenance of this file
-MAJOR_VER="${DPKG_MAINTSCRIPT_PACKAGE#mariadb-server-}"
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
-
-# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
-ERR_LOGGER="logger -p daemon.err -t mariadb-server-$MAJOR_VER.postinst -i"
-# This will make an error in a logged command immediately apparent by aborting
-# the install, rather than failing silently and leaving a broken install.
-set -o pipefail
-
-invoke() {
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d mysql $1
- else
- /etc/init.d/mysql $1
- fi
-}
-
-MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam"
-
-set_mysql_rootpw() {
- # forget we ever saw the password. don't use reset to keep the seen status
- db_set mysql-server/root_password ""
- db_set mysql-server/root_password_again ""
-
- tfile=`mktemp`
- if [ ! -f "$tfile" ]; then
- return 1
- fi
-
- # this avoids us having to call "test" or "[" on $rootpw
- cat << EOF > $tfile
-USE mysql;
-SET sql_log_bin=0;
-UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
-FLUSH PRIVILEGES;
-EOF
- if grep -q 'PASSWORD("")' $tfile; then
- retval=0
- else
- $MYSQL_BOOTSTRAP <$tfile
- retval=$?
- fi
- rm -f $tfile
- return $retval
-}
-
-case "$1" in
- configure)
- # This is needed because mysql_install_db removes the pid file in /var/run
- # and because changed configuration options should take effect immediately.
- # In case the server wasn't running at all it should be ok if the stop
- # script fails. I can't tell at this point because of the cleaned /var/run.
- set +e; invoke stop; set -e
-
- mysql_statedir=/usr/share/mysql
- mysql_datadir=/var/lib/mysql
- mysql_logdir=/var/log/mysql
- mysql_rundir=/var/run/mysqld
- mysql_cfgdir=/etc/mysql
- mysql_upgradedir=/var/lib/mysql-upgrade
-
- # If the following symlink exists, it is a preserved copy the old data dir
- # created by the preinst script during a upgrade that would have otherwise
- # been replaced by an empty mysql dir. This should restore it.
- for dir in DATADIR LOGDIR; do
-
- if [ "$dir" = "DATADIR" ]; then
- targetdir=$mysql_datadir
- else
- targetdir=$mysql_logdir
- fi
-
- savelink="$mysql_upgradedir/$dir.link"
- if [ -L "$savelink" ]; then
- # If the targetdir was a symlink before we upgraded it is supposed
- # to be either still be present or not existing anymore now.
- if [ -L "$targetdir" ]; then
- rm "$savelink"
- elif [ ! -d "$targetdir" ]; then
- mv "$savelink" "$targetdir"
- else
- # this should never even happen, but just in case...
- mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX`
- echo "this is very strange! see $mysql_tmp/README..." >&2
- mv "$targetdir" "$mysql_tmp"
- cat << EOF > "$mysql_tmp/README"
-
-If you're reading this, it's most likely because you had replaced /var/lib/mysql
-with a symlink, then upgraded to a new version of mysql, and then dpkg
-removed your symlink (see #182747 and others). The mysql packages noticed
-that this happened, and as a workaround have restored it. However, because
-/var/lib/mysql seems to have been re-created in the meantime, and because
-we don't want to rm -rf something we don't know as much about, we are going
-to leave this unexpected directory here. If your database looks normal,
-and this is not a symlink to your database, you should be able to blow
-this all away.
-
-EOF
- fi
- fi
- rmdir $mysql_upgradedir 2>/dev/null || true
-
- done
-
- # Ensure the existence and right permissions for the database and
- # log files.
- if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi
- if [ ! -d "$mysql_datadir" -a ! -L "$mysql_datadir" ]; then mkdir "$mysql_datadir" ; fi
- if [ ! -d "$mysql_logdir" -a ! -L "$mysql_logdir" ]; then mkdir "$mysql_logdir" ; fi
- # When creating an ext3 jounal on an already mounted filesystem like e.g.
- # /var/lib/mysql, you get a .journal file that is not modifiable by chown.
- # The mysql_statedir must not be writable by the mysql user under any
- # circumstances as it contains scripts that are executed by root.
- set +e
- chown -R 0:0 $mysql_statedir
- find $mysql_datadir ! -uid $(id -u mysql) -print0 | xargs -0 -r chown mysql
- chown -R mysql:adm $mysql_logdir
- chmod 2750 $mysql_logdir
- set -e
-
- # This is important to avoid dataloss when there is a removed
- # mysql-server version from Woody lying around which used the same
- # data directory and then somewhen gets purged by the admin.
- db_set mariadb-server/postrm_remove_database false || true
-
- # Clean up old flags before setting new one
- rm -f $mysql_datadir/debian-*.flag
- # Flag data dir to avoid downgrades
- touch $mysql_datadir/debian-10.3.flag
-
- # initiate databases. Output is not allowed by debconf :-(
- # This will fail if we are upgrading an existing database; in this case
- # mysql_upgrade, called from the /etc/init.d/mysql start script, will
- # handle things.
- # Debian: beware of the bashisms...
- # Debian: can safely run on upgrades with existing databases
- set +e
- bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql \
- --disable-log-bin --skip-test-db 2>&1 | \
- $ERR_LOGGER
- set -e
-
- ## On every reconfiguration the maintenance user is recreated.
- #
- # - It is easier to regenerate the password every time but as people
- # use fancy rsync scripts and file alteration monitors, the existing
- # password is used and existing files not touched.
- # - The mysqld statement is like that in mysql_install_db because the
- # server is not already running. This has some implications:
- # - The amount of newlines and semicolons in the query is important!
- # - GRANT is not possible with --skip-grant-tables and "INSERT
- # (user,host..) VALUES" is not --ansi compliant
- # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo.
- # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv
- # may not be present as old Woody 3.23 databases did not have it and the
- # admin might not already have run mysql_upgrade which adds them.
- # As the binlog cron scripts to need at least the Super_priv, I do first
- # the old query which always succeeds and then the new which may or may not.
-
- # recreate the credentials file if not present or without mysql_upgrade stanza
- dc=$mysql_cfgdir/debian.cnf;
- if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then
- pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`"
- else
- pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
- if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
- umask 066
- cat /dev/null > $dc
- umask 022
- echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
- echo "[client]" >>$dc
- echo "host = localhost" >>$dc
- echo "user = debian-sys-maint" >>$dc
- echo "password = $pass" >>$dc
- echo "socket = $mysql_rundir/mysqld.sock" >>$dc
- echo "[mysql_upgrade]" >>$dc
- echo "host = localhost" >>$dc
- echo "user = debian-sys-maint" >>$dc
- echo "password = $pass" >>$dc
- echo "socket = $mysql_rundir/mysqld.sock" >>$dc
- echo "basedir = /usr" >>$dc
- fi
- # If this dir chmod go+w then the admin did it. But this file should not.
- chown 0:0 $dc
- chmod 0600 $dc
-
- replace_query=`/bin/echo -e \
- "USE mysql;\n" \
- "SET sql_mode='';\n" \
- "REPLACE INTO user SET " \
- " host='localhost', user='debian-sys-maint', password=password('$pass'), " \
- " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
- " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
- " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
- " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
- " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
- " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
- " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
- " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\
- " ssl_cipher='', x509_issuer='', x509_subject='';"`;
-
- db_get mysql-server/root_password && rootpw="$RET"
- if ! set_mysql_rootpw; then
- db_input high mysql-server/error_setting_password || true
- db_go
- fi
-
- set +e
- echo "$replace_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
- set -e
-
- # If there is a real AppArmor profile, we reload it.
- # If the default empty profile is installed, then we remove any old
- # profile that may be loaded.
- # This allows upgrade from old versions (that have an apparmor profile
- # on by default) to work both to disable a default profile, and to keep
- # any profile installed and maintained by users themselves.
- profile="/etc/apparmor.d/usr.sbin.mysqld"
- if [ -f "$profile" ] && aa-status --enabled 2>/dev/null; then
- if grep -q /usr/sbin/mysqld "$profile" 2>/dev/null ; then
- apparmor_parser -r "$profile" || true
- else
- echo "/usr/sbin/mysqld { }" | apparmor_parser --remove 2>/dev/null || true
- fi
- fi
-
- # copy out any mysqld_safe settings
- systemd_conf=/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
- if [ -x /usr/bin/mariadb-service-convert -a ! -f "${systemd_conf}" ]; then
- mkdir -p /etc/systemd/system/mariadb.service.d
- /usr/bin/mariadb-service-convert > "${systemd_conf}"
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-configure)
- ;;
-
- triggered)
- if [ -d /run/systemd/system ]; then
- systemctl --system daemon-reload
- fi
- invoke restart
- ;;
-
- *)
- echo "postinst called with unknown argument '$1'" 1>&2
- exit 1
- ;;
-esac
-
-db_stop # in case invoke fails
-
-# dh_systemd_start doesn't emit anything since we still ship /etc/init.d/mysql.
-# Thus MariaDB server is started via init.d script, which in turn redirects to
-# systemctl. If we upgrade from MySQL mysql.service may be masked, which also
-# means init.d script is disabled. Unmask mysql service explicitly.
-# Check first that the command exists, to avoid emitting any warning messages.
-if [ -x "$(command -v deb-systemd-helper)" ]; then
- deb-systemd-helper unmask mysql.service > /dev/null
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/mariadb-server-10.3.postrm b/debian/mariadb-server-10.3.postrm
deleted file mode 100644
index 62ddba7d02b..00000000000
--- a/debian/mariadb-server-10.3.postrm
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash -e
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
-
-# Try to stop the server in a sane way. If it does not success let the admin
-# do it himself. No database directories should be removed while the server
-# is running!
-stop_server() {
- # Return immediately if there are no mysql processes running
- # as there is no point in trying to shutdown in that case.
- # Compatibility with versions that ran 'mariadbd'
- if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
-
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d mysql stop
- else
- /etc/init.d/mysql stop
- fi
- errno=$?
- set -e
-
- if [ "$?" != 0 ]; then
- echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2
- echo "Stop it yourself and try again!" 1>&2
- exit 1
- fi
-}
-
-case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then
- stop_server
- sleep 2
- fi
- ;;
- *)
- echo "postrm called with unknown argument '$1'" 1>&2
- exit 1
- ;;
-esac
-
-#
-# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473)
-# - Remove the mysql user only after all his owned files are purged.
-#
-if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then
- # we remove the mysql user only after all his owned files are purged
- rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz}
- rm -rf /var/log/mysql
-
- db_input high mariadb-server-10.3/postrm_remove_databases || true
- db_go || true
- db_get mariadb-server-10.3/postrm_remove_databases || true
- if [ "$RET" = "true" ]; then
- # never remove the debian.cnf when the databases are still existing
- # else we ran into big trouble on the next install!
- rm -f /etc/mysql/debian.cnf
- # Remove all contents from /var/lib/mysql except if it's a
- # directory with file system data. See #829491 for details and
- # #608938 for potential mysql-server leftovers which erroneously
- # had been renamed.
- find /var/lib/mysql -mindepth 1 \
- -not -path '*/lost+found/*' -not -name 'lost+found' \
- -not -path '*/lost@002bfound/*' -not -name 'lost@002bfound' \
- -delete
- # "|| true" still needed as rmdir still exits with non-zero if
- # /var/lib/mysql is a mount point
- rmdir --ignore-fail-on-non-empty /var/lib/mysql || true
- rm -rf /var/run/mysqld # this directory is created by the init script, don't leave behind
- userdel mysql || true
- fi
-
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/mariadb-server-10.3.preinst b/debian/mariadb-server-10.3.preinst
deleted file mode 100644
index 1132184997e..00000000000
--- a/debian/mariadb-server-10.3.preinst
+++ /dev/null
@@ -1,213 +0,0 @@
-#!/bin/bash -e
-#
-# summary of how this script can be called:
-# * <new-preinst> install
-# * <new-preinst> install <old-version>
-# * <new-preinst> upgrade <old-version>
-# * <old-preinst> abort-upgrade <new-version>
-#
-
-. /usr/share/debconf/confmodule
-
-if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
-${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-
-export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
-MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
-mysql_datadir=/var/lib/mysql
-mysql_upgradedir=/var/lib/mysql-upgrade
-
-# Try to stop the server in a sane way. If it does not success let the admin
-# do it himself. No database directories should be removed while the server
-# is running! Another mysqld in e.g. a different chroot is fine for us.
-stop_server() {
- if [ ! -x /etc/init.d/mysql ]; then return; fi
- # Return immediately if there are no mysql processes running on a host
- # (leave containerized processes with the same name in other namespaces)
- # as there is no point in trying to shutdown in that case.
- # Compatibility with versions that ran 'mariadbd'
- if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
-
- set +e
- if [ -x /usr/sbin/invoke-rc.d ]; then
- cmd="invoke-rc.d mysql stop"
- else
- cmd="/etc/init.d/mysql stop"
- fi
- $cmd
- errno=$?
- set -e
-
- # 0=ok, 100=no init script (fresh install)
- if [ "$errno" != 0 -a "$errno" != 100 ]; then
- echo "${cmd/ */} returned $errno" 1>&2
- echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
- echo "Stop it yourself and try again!" 1>&2
- db_stop
- exit 1
- fi
-}
-
-################################ main() ##########################
-
-this_version=10.3
-max_upgradeable_version=5.7
-
-# Check if a flag file is found that indicates a previous MariaDB or MySQL
-# version was installed. If multiple flags are found, check which one was
-# the biggest version number.
-for flag in $mysql_datadir/debian-*.flag
-do
-
- # The for loop leaves $flag as the query string if there are no results,
- # so the check below is needed to stop further processing when there are
- # no real results.
- if [ $flag = "$mysql_datadir/debian-*.flag" ]
- then
- break
- fi
-
- flag_version=`echo $flag | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'`
-
- # Initialize value if empty
- if [ -z "$found_version" ]
- then
- found_version=$flag_version
- fi
-
- # Update value if now bigger then before
- if dpkg --compare-versions "$flag_version" '>>' "$found_version"
- then
- found_version=$flag_version
- fi
-
-done
-
-
-# If an upgrade is detected, proceed with it automatically without
-# requiring any user interaction.
-#
-# However, if the user attempts to downgrade, warn about the incompatibility.
-# Downgrade is detected if the flag version is bigger than $this_version
-# (e.g. 10.1 > 10.0) or the flag version is smaller than 10.0 but bigger
-# than $max_upgradeable_version.
-if [ ! -z "$found_version" ]
-then
-
- echo "$mysql_datadir: found previous version $found_version"
-
- if dpkg --compare-versions "$found_version" '>>' "$this_version"
- then
- downgrade_detected=true
- fi
-
- if dpkg --compare-versions "$found_version" '>>' "$max_upgradeable_version" \
- && dpkg --compare-versions "$found_version" '<<' "10.0"
- then
- downgrade_detected=true
- fi
-
-fi
-
-
-# Don't abort dpkg if downgrade is detected (as was done previously).
-# Instead simply move the old datadir and create a new for this_version.
-if [ ! -z "$downgrade_detected" ]
-then
- db_input critical mariadb-server-10.3/old_data_directory_saved || true
- db_go
- echo "The file $mysql_datadir/debian-$found_version.flag indicates a" 1>&2
- echo "version that cannot automatically be upgraded. Therefore the" 1>&2
- echo "previous data directory will be renamed to $mysql_datadir-$found_version and" 1>&2
- echo "a new data directory will be initialized at $mysql_datadir." 1>&2
- echo "Please manually export/import your data (e.g. with mysqldump) if needed." 1>&2
- mv -f $mysql_datadir $mysql_datadir-$found_version
- # Also move away the old debian.cnf file that included credentials that are
- # no longer valid
- mv -f /etc/mysql/debian.cnf /etc/mysql/debian.cnf-$found_version
-fi
-
-# to be sure
-stop_server
-
-# If we use NIS then errors should be tolerated. It's up to the
-# user to ensure that the mysql user is correctly setup.
-# Beware that there are two ypwhich one of them needs the 2>/dev/null!
-if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
- set +e
-fi
-
-#
-# Now we have to ensure the following state:
-# /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false
-# /etc/group: mysql:x:101:
-#
-# Sadly there could any state be present on the system so we have to
-# modify everything carefully i.e. not doing a chown before creating
-# the user etc...
-#
-
-# creating mysql group if he isn't already there
-if ! getent group mysql >/dev/null; then
- # Adding system group: mysql.
- addgroup --system mysql >/dev/null
-fi
-
-# creating mysql user if he isn't already there
-if ! getent passwd mysql >/dev/null; then
- # Adding system user: mysql.
- adduser \
- --system \
- --disabled-login \
- --ingroup mysql \
- --no-create-home \
- --home /nonexistent \
- --gecos "MySQL Server" \
- --shell /bin/false \
- mysql >/dev/null
-fi
-
-# end of NIS tolerance zone
-set -e
-
-# if there's a symlink, let's store where it's pointing, because otherwise
-# it's going to be lost in some situations
-for dir in DATADIR LOGDIR; do
- checkdir=`eval echo "$"$dir`
- if [ -L "$checkdir" ]; then
- mkdir -p "$mysql_upgradedir"
- cp -dT "$checkdir" "$mysql_upgradedir/$dir.link"
- fi
-done
-
-# creating mysql home directory
-if [ ! -d $mysql_datadir -a ! -L $mysql_datadir ]; then
- mkdir $mysql_datadir
-fi
-
-# checking disc space
-if LC_ALL=C BLOCKSIZE= df --portability $mysql_datadir/. | tail -n 1 | awk '{ exit ($4>1000) }'; then
- echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2
- db_stop
- exit 1
-fi
-
-# Since the home directory was created before putting the user into
-# the mysql group and moreover we cannot guarantee that the
-# permissions were correctly *before* calling this script, we fix them now.
-# In case we use NIS and no mysql user is present then this script should
-# better fail now than later..
-# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is
-# not chgrp'able (#318435).
-set +e
-find $mysql_datadir ! -uid $(id -u mysql) -print0 | xargs -0 -r chown mysql
-find $mysql_datadir -follow -not -group mysql -print0 2>/dev/null \
- | xargs -0 --no-run-if-empty chgrp mysql
-set -e
-
-
-db_stop
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/mariadb-server-10.3.py b/debian/mariadb-server-10.3.py
deleted file mode 100644
index 99d3f0fd913..00000000000
--- a/debian/mariadb-server-10.3.py
+++ /dev/null
@@ -1,52 +0,0 @@
-'''apport package hook for mariadb-10.3
-
-(c) 2009 Canonical Ltd.
-Author: Mathias Gug <mathias.gug@canonical.com>
-'''
-
-import os, os.path
-
-from apport.hookutils import *
-
-def _add_my_conf_files(report, filename):
- key = 'MySQLConf' + path_to_key(filename)
- report[key] = ""
- for line in read_file(filename).split('\n'):
- try:
- if 'password' in line.split('=')[0]:
- line = "%s = @@APPORTREPLACED@@" % (line.split('=')[0])
- report[key] += line + '\n'
- except IndexError:
- continue
-
-def add_info(report):
- attach_conffiles(report, 'mariadb-server-10.3', conffiles=None)
- key = 'Logs' + path_to_key('/var/log/daemon.log')
- report[key] = ""
- for line in read_file('/var/log/daemon.log').split('\n'):
- try:
- if 'mysqld' in line.split()[4]:
- report[key] += line + '\n'
- except IndexError:
- continue
- key = 'Logs' + path_to_key('/var/log/kern.log')
- report[key] = ""
- for line in read_file('/var/log/kern.log').split('\n'):
- try:
- if '/usr/sbin/mysqld' in string.join(line.split()[4:]):
- report[key] += line + '\n'
- except IndexError:
- continue
- _add_my_conf_files(report, '/etc/mysql/my.cnf')
- for f in os.listdir('/etc/mysql/conf.d'):
- _add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f))
- try:
- report['MySQLVarLibDirListing'] = unicode(os.listdir('/var/lib/mysql'))
- except OSError:
- report['MySQLVarLibDirListing'] = unicode(False)
-
-if __name__ == '__main__':
- report = {}
- add_info(report)
- for key in report:
- print '%s: %s' % (key, report[key].split('\n', 1)[0])
diff --git a/debian/mariadb-server-10.3.templates b/debian/mariadb-server-10.3.templates
deleted file mode 100644
index 8ef29264678..00000000000
--- a/debian/mariadb-server-10.3.templates
+++ /dev/null
@@ -1,76 +0,0 @@
-# These templates have been reviewed by the debian-l10n-english
-# team
-#
-# If modifications/additions/rewording are needed, please ask
-# for an advice to debian-l10n-english@lists.debian.org
-#
-# Even minor modifications require translation updates and such
-# changes should be coordinated with translators and reviewers.
-
-Template: mariadb-server-10.3/old_data_directory_saved
-Type: note
-_Description: The old data directory will be saved at new location
- A file named /var/lib/mysql/debian-*.flag exists on this system.
- The number indicates a database binary format version that cannot automatically
- be upgraded (or downgraded).
- .
- Therefore the previous data directory will be renamed to /var/lib/mysql-* and
- a new data directory will be initialized at /var/lib/mysql.
- .
- Please manually export/import your data (e.g. with mysqldump) if needed.
-
-Template: mariadb-server-10.3/nis_warning
-Type: note
-#flag:translate!:3,5
-_Description: Important note for NIS/YP users
- Using MariaDB under NIS/YP requires a mysql user account to be added on
- the local system with:
- .
- adduser --system --group --home /var/lib/mysql mysql
- .
- You should also check the permissions and ownership of the
- /var/lib/mysql directory:
- .
- /var/lib/mysql: drwxr-xr-x mysql mysql
-
-Template: mariadb-server-10.3/postrm_remove_databases
-Type: boolean
-Default: false
-_Description: Remove all MariaDB databases?
- The /var/lib/mysql directory which contains the MariaDB databases is about
- to be removed.
- .
- If you're removing the MariaDB package in order to later install a more
- recent version or if a different mariadb-server package is already
- using it, the data should be kept.
-
-Template: mysql-server/root_password
-Type: password
-_Description: New password for the MariaDB "root" user:
- While not mandatory, it is highly recommended that you set a password
- for the MariaDB administrative "root" user.
- .
- If this field is left blank, the password will not be changed.
-
-Template: mysql-server/root_password_again
-Type: password
-_Description: Repeat password for the MariaDB "root" user:
-
-Template: mysql-server/error_setting_password
-Type: error
-_Description: Unable to set password for the MariaDB "root" user
- An error occurred while setting the password for the MariaDB
- administrative user. This may have happened because the account
- already has a password, or because of a communication problem with
- the MariaDB server.
- .
- You should check the account's password after the package installation.
- .
- Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file
- for more information.
-
-Template: mysql-server/password_mismatch
-Type: error
-_Description: Password input error
- The two passwords you entered were not the same. Please try again.
-
diff --git a/debian/mariadb-server-10.4.README.Debian b/debian/mariadb-server-10.4.README.Debian
new file mode 100644
index 00000000000..5a05f196042
--- /dev/null
+++ b/debian/mariadb-server-10.4.README.Debian
@@ -0,0 +1,95 @@
+* MYSQL WON'T START OR STOP?:
+=============================
+You may never ever delete the mysql user "root". Although it has no password
+is set, the unix_auth plugin ensure that it can only be run locally as the root
+user.
+
+* WHAT TO DO AFTER UPGRADES:
+============================
+The privilege tables are automatically updated so all there is left is read
+the release notes on https://mariadb.com/kb/en/release-notes/ to see if any
+changes affect custom apps.
+
+* WHAT TO DO AFTER INSTALLATION:
+================================
+The MySQL manual describes certain steps to do at this stage in a separate
+chapter. They are not necessary as the Debian packages does them
+automatically.
+
+The only thing that is left over for the admin is
+ - setting the passwords
+ - creating new users and databases
+ - read the rest of this text
+
+* NETWORKING:
+=============
+For security reasons, the Debian package has enabled networking only on the
+loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with
+"netstat -tlnp" where it is listening. If your connection is aborted
+immediately check your firewall rules or network routes.
+
+* WHERE IS THE DOCUMENTATION?:
+==============================
+https://mariadb.com/kb
+
+* PASSWORDS:
+============
+It is strongly recommended you create an admin users for your database
+administration needs.
+
+If your local unix account is the one you want to have local super user
+access on your database with you can create the following account that will
+only work for the local unix user connecting to the database locally.
+
+ sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO '$USER'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION"
+
+To create a local machine account username=USERNAME with a password:
+
+ sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'USERNAME'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION"
+
+To create a USERNAME user with password 'password' admin user that can access
+the DB server over the network:
+
+ sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION"
+
+Scripts should run as a user have the required grants and be authenticated via
+unix_socket.
+
+It is wise to run scripts as the "mysql" system user. Like root,
+mysql@localhost is created by default to have all privileges in MariaDB
+and to use unix_socket authentication. But scripts running under "mysql"
+won't have system-wide root so they won't be able to corrupt your system.
+
+If you are too tired to type the password in every time and unix_socket auth
+doesn't suit your needs, you can store it in the file $HOME/.my.cnf. It should
+be chmod 0600 (-rw------- username usergroup .my.cnf) to ensure that nobody else
+can read it. Every other configuration parameter can be stored there, too.
+
+For more information in the MariaDB manual in/usr/share/doc/mariadb-doc or
+https://mariadb.com/kb/en/configuring-mariadb-with-mycnf/.
+
+* FURTHER NOTES ON REPLICATION
+===============================
+If the MySQL server is acting as a replication slave, you should not
+set --tmpdir to point to a directory on a memory-based filesystem or to
+a directory that is cleared when the server host restarts. A replication
+slave needs some of its temporary files to survive a machine restart so
+that it can replicate temporary tables or LOAD DATA INFILE operations. If
+files in the temporary file directory are lost when the server restarts,
+replication fails.
+
+* DOWNGRADING
+============================
+Unsupported. Period.
+
+You might get lucky downgrading a few minor versions without issued. Take a
+backup first. If you break it you get to keep both pieces. Do a restore from
+backup or upgrade to the previous version.
+
+If doing a major version downgrade, take a mysqldump/mydumpber consistent
+backup using the current version and reload after downgrading and purging
+existing databases.
+
+* BACKUPS
+============================
+Backups save jobs. Don't get caught without one.
diff --git a/debian/mariadb-server-10.4.config b/debian/mariadb-server-10.4.config
new file mode 100644
index 00000000000..1929c370d6d
--- /dev/null
+++ b/debian/mariadb-server-10.4.config
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+# Beware that there are two ypwhich one of them needs the 2>/dev/null!
+if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
+ db_input high mariadb-server-10.0/nis_warning || true
+ db_go
+fi
diff --git a/debian/mariadb-server-10.3.dirs b/debian/mariadb-server-10.4.dirs
index 5057fe806c3..5057fe806c3 100644
--- a/debian/mariadb-server-10.3.dirs
+++ b/debian/mariadb-server-10.4.dirs
diff --git a/debian/mariadb-server-10.4.install b/debian/mariadb-server-10.4.install
new file mode 100644
index 00000000000..9b131782f4a
--- /dev/null
+++ b/debian/mariadb-server-10.4.install
@@ -0,0 +1,113 @@
+debian/additions/debian-start etc/mysql
+debian/additions/debian-start.inc.sh usr/share/mysql
+debian/additions/echo_stderr usr/share/mysql
+debian/additions/mysql.init usr/share/mysql
+debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
+etc/apparmor.d/usr.sbin.mysqld
+etc/security/user_map.conf
+lib/*/security/pam_user_map.so
+lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
+usr/bin/aria_chk
+usr/bin/aria_dump_log
+usr/bin/aria_ftdump
+usr/bin/aria_pack
+usr/bin/aria_read_log
+usr/bin/galera_new_cluster
+usr/bin/galera_recovery
+usr/bin/mariadb-service-convert
+usr/bin/msql2mysql
+usr/bin/my_print_defaults
+usr/bin/myisam_ftdump
+usr/bin/myisamchk
+usr/bin/myisamlog
+usr/bin/myisampack
+usr/bin/mysql_convert_table_format
+usr/bin/mysql_plugin
+usr/bin/mysql_secure_installation
+usr/bin/mysql_setpermission
+usr/bin/mysql_tzinfo_to_sql
+usr/bin/mysqlbinlog
+usr/bin/mysqld_multi
+usr/bin/mysqld_safe
+usr/bin/mysqld_safe_helper
+usr/bin/mysqlhotcopy
+usr/bin/perror
+usr/bin/replace
+usr/bin/resolve_stack_dump
+usr/bin/resolveip
+usr/bin/wsrep_sst_common
+usr/bin/wsrep_sst_mariabackup
+usr/bin/wsrep_sst_mysqldump
+usr/bin/wsrep_sst_rsync
+usr/lib/mysql/plugin/auth_ed25519.so
+usr/lib/mysql/plugin/auth_pam.so
+usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool
+usr/lib/mysql/plugin/auth_pam_v1.so
+usr/lib/mysql/plugin/disks.so
+usr/lib/mysql/plugin/file_key_management.so
+usr/lib/mysql/plugin/ha_archive.so
+usr/lib/mysql/plugin/ha_blackhole.so
+usr/lib/mysql/plugin/ha_federated.so
+usr/lib/mysql/plugin/ha_federatedx.so
+usr/lib/mysql/plugin/ha_sphinx.so
+usr/lib/mysql/plugin/handlersocket.so
+usr/lib/mysql/plugin/locales.so
+usr/lib/mysql/plugin/metadata_lock_info.so
+usr/lib/mysql/plugin/query_cache_info.so
+usr/lib/mysql/plugin/query_response_time.so
+usr/lib/mysql/plugin/server_audit.so
+usr/lib/mysql/plugin/simple_password_check.so
+usr/lib/mysql/plugin/sql_errlog.so
+usr/lib/mysql/plugin/wsrep_info.so
+usr/share/apport/package-hooks/source_mariadb-10.4.py
+usr/share/doc/mariadb-server-10.4/mysqld.sym.gz
+usr/share/man/man1/aria_chk.1
+usr/share/man/man1/aria_dump_log.1
+usr/share/man/man1/aria_ftdump.1
+usr/share/man/man1/aria_pack.1
+usr/share/man/man1/aria_read_log.1
+usr/share/man/man1/galera_new_cluster.1
+usr/share/man/man1/galera_recovery.1
+usr/share/man/man1/mariadb-convert-table-format.1
+usr/share/man/man1/mariadb-hotcopy.1
+usr/share/man/man1/mariadb-secure-installation.1
+usr/share/man/man1/mariadb-service-convert.1
+usr/share/man/man1/mariadb-setpermission.1
+usr/share/man/man1/mariadb-show.1
+usr/share/man/man1/mariadb-tzinfo-to-sql.1
+usr/share/man/man1/mariadbd-multi.1
+usr/share/man/man1/mariadbd-safe-helper.1
+usr/share/man/man1/mariadbd-safe.1
+usr/share/man/man1/msql2mysql.1
+usr/share/man/man1/my_print_defaults.1
+usr/share/man/man1/myisam_ftdump.1
+usr/share/man/man1/myisamchk.1
+usr/share/man/man1/myisamlog.1
+usr/share/man/man1/myisampack.1
+usr/share/man/man1/mysql_convert_table_format.1
+usr/share/man/man1/mysql_plugin.1
+usr/share/man/man1/mysql_secure_installation.1
+usr/share/man/man1/mysql_setpermission.1
+usr/share/man/man1/mysql_tzinfo_to_sql.1
+usr/share/man/man1/mysqlbinlog.1
+usr/share/man/man1/mysqld_multi.1
+usr/share/man/man1/mysqld_safe.1
+usr/share/man/man1/mysqld_safe_helper.1
+usr/share/man/man1/mysqlhotcopy.1
+usr/share/man/man1/perror.1
+usr/share/man/man1/replace.1
+usr/share/man/man1/resolve_stack_dump.1
+usr/share/man/man1/resolveip.1
+usr/share/man/man1/wsrep_sst_common.1
+usr/share/man/man1/wsrep_sst_mariabackup.1
+usr/share/man/man1/wsrep_sst_mysqldump.1
+usr/share/man/man1/wsrep_sst_rsync.1
+usr/share/mysql/errmsg-utf8.txt
+usr/share/mysql/fill_help_tables.sql
+usr/share/mysql/maria_add_gis_sp_bootstrap.sql
+usr/share/mysql/mysql_performance_tables.sql
+usr/share/mysql/mysql_system_tables.sql
+usr/share/mysql/mysql_system_tables_data.sql
+usr/share/mysql/mysql_test_data_timezone.sql
+usr/share/mysql/mysql_test_db.sql
+usr/share/mysql/wsrep_notify
diff --git a/debian/mariadb-server-10.4.links b/debian/mariadb-server-10.4.links
new file mode 100644
index 00000000000..f2d97460371
--- /dev/null
+++ b/debian/mariadb-server-10.4.links
@@ -0,0 +1,9 @@
+usr/bin/mysql_convert_table_format usr/bin/mariadb-convert-table-format
+usr/bin/mysql_secure_installation usr/bin/mariadb-secure-installation
+usr/bin/mysql_setpermission usr/bin/mariadb-setpermission
+usr/bin/mysql_tzinfo_to_sql usr/bin/mariadb-tzinfo-to-sql
+usr/bin/mysqld_multi usr/bin/mariadbd-multi
+usr/bin/mysqld_safe usr/bin/mariadbd-safe
+usr/bin/mysqld_safe_helper usr/bin/mariadbd-safe-helper
+usr/bin/mysqlhotcopy usr/bin/mariadb-hotcopy
+usr/bin/mysqlshow usr/bin/mariadb-show
diff --git a/debian/mariadb-server-10.3.logcheck.ignore.paranoid b/debian/mariadb-server-10.4.logcheck.ignore.paranoid
index 00cc5c3e29d..00cc5c3e29d 100644
--- a/debian/mariadb-server-10.3.logcheck.ignore.paranoid
+++ b/debian/mariadb-server-10.4.logcheck.ignore.paranoid
diff --git a/debian/mariadb-server-10.3.logcheck.ignore.server b/debian/mariadb-server-10.4.logcheck.ignore.server
index a0b4792ecda..a0b4792ecda 100644
--- a/debian/mariadb-server-10.3.logcheck.ignore.server
+++ b/debian/mariadb-server-10.4.logcheck.ignore.server
diff --git a/debian/mariadb-server-10.3.logcheck.ignore.workstation b/debian/mariadb-server-10.4.logcheck.ignore.workstation
index a0b4792ecda..a0b4792ecda 100644
--- a/debian/mariadb-server-10.3.logcheck.ignore.workstation
+++ b/debian/mariadb-server-10.4.logcheck.ignore.workstation
diff --git a/debian/mariadb-server-10.4.mysql-server.logrotate b/debian/mariadb-server-10.4.mysql-server.logrotate
new file mode 100644
index 00000000000..11e4480c427
--- /dev/null
+++ b/debian/mariadb-server-10.4.mysql-server.logrotate
@@ -0,0 +1,20 @@
+# - I put everything in one block and added sharedscripts, so that mysql gets
+# flush-logs'd only once.
+# Else the binary logs would automatically increase by n times every day.
+# - The error log is obsolete, messages go to syslog now.
+/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log {
+ daily
+ rotate 7
+ missingok
+ create 640 mysql adm
+ compress
+ sharedscripts
+ postrotate
+ test -x /usr/bin/mysqladmin || exit 0
+ # check if server is running
+ if mysqladmin ping > /dev/null 2>&1; then
+ mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
+ flush-engine-log flush-general-log flush-slow-log
+ fi
+ endscript
+}
diff --git a/debian/mariadb-server-10.3.mysql.default b/debian/mariadb-server-10.4.mysql.default
index 146c5a87a84..146c5a87a84 100644
--- a/debian/mariadb-server-10.3.mysql.default
+++ b/debian/mariadb-server-10.4.mysql.default
diff --git a/debian/mariadb-server-10.4.postinst b/debian/mariadb-server-10.4.postinst
new file mode 100644
index 00000000000..0a191e75ef1
--- /dev/null
+++ b/debian/mariadb-server-10.4.postinst
@@ -0,0 +1,190 @@
+#!/bin/bash -e
+
+. /usr/share/debconf/confmodule
+
+# Automatically set version to ease maintenance of this file
+MAJOR_VER="${DPKG_MAINTSCRIPT_PACKAGE#mariadb-server-}"
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
+
+# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
+ERR_LOGGER="logger -p daemon.err -t mariadb-server-$MAJOR_VER.postinst -i"
+# This will make an error in a logged command immediately apparent by aborting
+# the install, rather than failing silently and leaving a broken install.
+set -o pipefail
+
+invoke() {
+ systemctl $1 mysql
+}
+
+case "$1" in
+ configure)
+ # This is needed because mysql_install_db removes the pid file in /var/run
+ # and because changed configuration options should take effect immediately.
+ # In case the server wasn't running at all it should be ok if the stop
+ # script fails. I can't tell at this point because of the cleaned /var/run.
+ set +e; invoke stop; set -e
+
+ mysql_statedir=/usr/share/mysql
+ mysql_datadir=/var/lib/mysql
+ mysql_logdir=/var/log/mysql
+ mysql_rundir=/var/run/mysqld
+ mysql_cfgdir=/etc/mysql
+ mysql_upgradedir=/var/lib/mysql-upgrade
+
+ # If the following symlink exists, it is a preserved copy the old data dir
+ # created by the preinst script during a upgrade that would have otherwise
+ # been replaced by an empty mysql dir. This should restore it.
+ for dir in DATADIR LOGDIR; do
+
+ if [ "$dir" = "DATADIR" ]; then
+ targetdir=$mysql_datadir
+ else
+ targetdir=$mysql_logdir
+ fi
+
+ savelink="$mysql_upgradedir/$dir.link"
+ if [ -L "$savelink" ]; then
+ # If the targetdir was a symlink before we upgraded it is supposed
+ # to be either still be present or not existing anymore now.
+ if [ -L "$targetdir" ]; then
+ rm "$savelink"
+ elif [ ! -d "$targetdir" ]; then
+ mv "$savelink" "$targetdir"
+ else
+ # this should never even happen, but just in case...
+ mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX`
+ echo "this is very strange! see $mysql_tmp/README..." >&2
+ mv "$targetdir" "$mysql_tmp"
+ cat << EOF > "$mysql_tmp/README"
+
+If you're reading this, it's most likely because you had replaced /var/lib/mysql
+with a symlink, then upgraded to a new version of mysql, and then dpkg
+removed your symlink (see #182747 and others). The mysql packages noticed
+that this happened, and as a workaround have restored it. However, because
+/var/lib/mysql seems to have been re-created in the meantime, and because
+we don't want to rm -rf something we don't know as much about, we are going
+to leave this unexpected directory here. If your database looks normal,
+and this is not a symlink to your database, you should be able to blow
+this all away.
+
+EOF
+ fi
+ fi
+ rmdir $mysql_upgradedir 2>/dev/null || true
+
+ done
+
+ # Ensure the existence and right permissions for the database and
+ # log files.
+ if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi
+ if [ ! -d "$mysql_datadir" -a ! -L "$mysql_datadir" ]; then mkdir "$mysql_datadir" ; fi
+ if [ ! -d "$mysql_logdir" -a ! -L "$mysql_logdir" ]; then mkdir "$mysql_logdir" ; fi
+ # When creating an ext3 jounal on an already mounted filesystem like e.g.
+ # /var/lib/mysql, you get a .journal file that is not modifiable by chown.
+ # The mysql_statedir must not be writable by the mysql user under any
+ # circumstances as it contains scripts that are executed by root.
+ set +e
+ chown -R 0:0 $mysql_statedir
+ find $mysql_datadir ! -uid $(id -u mysql) -print0 | xargs -0 -r chown mysql
+ chown -R mysql:adm $mysql_logdir
+ chmod 2750 $mysql_logdir
+ set -e
+
+ # Set the correct filesystem ownership for the PAM v2 plugin
+ chown mysql /usr/lib/mysql/plugin/auth_pam_tool_dir
+
+ # This is important to avoid dataloss when there is a removed
+ # mysql-server version from Woody lying around which used the same
+ # data directory and then somewhen gets purged by the admin.
+ db_set mariadb-server/postrm_remove_database false || true
+
+ # Clean up old flags before setting new one
+ rm -f $mysql_datadir/debian-*.flag
+ # Flag data dir to avoid downgrades
+ touch $mysql_datadir/debian-10.4.flag
+
+ # initiate databases. Output is not allowed by debconf :-(
+ # This will fail if we are upgrading an existing database; in this case
+ # mysql_upgrade, called from the /etc/init.d/mysql start script, will
+ # handle things.
+ # Debian: beware of the bashisms...
+ # Debian: can safely run on upgrades with existing databases
+ set +e
+ bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql \
+ --disable-log-bin --skip-test-db 2>&1 | \
+ $ERR_LOGGER
+ set -e
+
+ # On new installations root user can connect via unix_socket.
+ # But on upgrades, scripts rely on debian-sys-maint user and
+ # credentials in /etc/mysql/debian.cnf
+ # All tools use --defaults-file=/etc/mysql/debian.cnf
+ # And while it's not needed for new installations, we keep using
+ # --defaults-file option for tools (for the sake of upgrades)
+ # and thus need /etc/mysql/debian.cnf to exist, even if it's empty.
+ dc=$mysql_cfgdir/debian.cnf;
+ if [ ! -e "$dc" ]; then
+ cat /dev/null > $dc
+ echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
+ fi
+ # Keep it only root-readable, as it always was
+ chown 0:0 $dc
+ chmod 0600 $dc
+
+ # If there is a real AppArmor profile, we reload it.
+ # If the default empty profile is installed, then we remove any old
+ # profile that may be loaded.
+ # This allows upgrade from old versions (that have an apparmor profile
+ # on by default) to work both to disable a default profile, and to keep
+ # any profile installed and maintained by users themselves.
+ profile="/etc/apparmor.d/usr.sbin.mysqld"
+ if [ -f "$profile" ] && aa-status --enabled 2>/dev/null; then
+ if grep -q /usr/sbin/mysqld "$profile" 2>/dev/null ; then
+ apparmor_parser -r "$profile" || true
+ else
+ echo "/usr/sbin/mysqld { }" | apparmor_parser --remove 2>/dev/null || true
+ fi
+ fi
+
+ # copy out any mysqld_safe settings
+ systemd_conf=/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
+ if [ -x /usr/bin/mariadb-service-convert -a ! -f "${systemd_conf}" ]; then
+ mkdir -p /etc/systemd/system/mariadb.service.d
+ /usr/bin/mariadb-service-convert > "${systemd_conf}"
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-configure)
+ ;;
+
+ triggered)
+ if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload
+ fi
+ invoke restart
+ ;;
+
+ *)
+ echo "postinst called with unknown argument '$1'" 1>&2
+ exit 1
+ ;;
+esac
+
+db_stop # in case invoke fails
+
+# dh_systemd_start doesn't emit anything since we still ship /etc/init.d/mysql.
+# Thus MariaDB server is started via init.d script, which in turn redirects to
+# systemctl. If we upgrade from MySQL mysql.service may be masked, which also
+# means init.d script is disabled. Unmask mysql service explicitly.
+# Check first that the command exists, to avoid emitting any warning messages.
+if [ -x "$(command -v deb-systemd-helper)" ]; then
+ deb-systemd-helper unmask mysql.service > /dev/null
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mariadb-server-10.4.postrm b/debian/mariadb-server-10.4.postrm
new file mode 100644
index 00000000000..60d90c36280
--- /dev/null
+++ b/debian/mariadb-server-10.4.postrm
@@ -0,0 +1,79 @@
+#!/bin/bash -e
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+
+# Try to stop the server in a sane way. If it does not success let the admin
+# do it himself. No database directories should be removed while the server
+# is running!
+stop_server() {
+ # Return immediately if there are no mysql processes running
+ # as there is no point in trying to shutdown in that case.
+ # Compatibility with versions that ran 'mariadbd'
+ if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
+
+ set +e
+ systemctl stop mysql
+ errno=$?
+ set -e
+
+ if [ "$?" != 0 ]; then
+ echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2
+ echo "Stop it yourself and try again!" 1>&2
+ exit 1
+ fi
+}
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then
+ stop_server
+ sleep 2
+ fi
+ ;;
+ *)
+ echo "postrm called with unknown argument '$1'" 1>&2
+ exit 1
+ ;;
+esac
+
+#
+# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473)
+# - Remove the mysql user only after all his owned files are purged.
+#
+if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then
+ # we remove the mysql user only after all his owned files are purged
+ rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz}
+ rm -rf /var/log/mysql
+
+ db_input high mariadb-server-10.4/postrm_remove_databases || true
+ db_go || true
+ db_get mariadb-server-10.4/postrm_remove_databases || true
+ if [ "$RET" = "true" ]; then
+ # never remove the debian.cnf when the databases are still existing
+ # else we ran into big trouble on the next install!
+ rm -f /etc/mysql/debian.cnf
+ # Remove all contents from /var/lib/mysql except if it's a
+ # directory with file system data. See #829491 for details and
+ # #608938 for potential mysql-server leftovers which erroneously
+ # had been renamed.
+ find /var/lib/mysql -mindepth 1 \
+ -not -path '*/lost+found/*' -not -name 'lost+found' \
+ -not -path '*/lost@002bfound/*' -not -name 'lost@002bfound' \
+ -delete
+ # "|| true" still needed as rmdir still exits with non-zero if
+ # /var/lib/mysql is a mount point
+ rmdir --ignore-fail-on-non-empty /var/lib/mysql || true
+ rm -rf /var/run/mysqld # this directory is created by the init script, don't leave behind
+ userdel mysql || true
+ fi
+
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mariadb-server-10.4.preinst b/debian/mariadb-server-10.4.preinst
new file mode 100644
index 00000000000..b3977a40bac
--- /dev/null
+++ b/debian/mariadb-server-10.4.preinst
@@ -0,0 +1,206 @@
+#!/bin/bash -e
+#
+# summary of how this script can be called:
+# * <new-preinst> install
+# * <new-preinst> install <old-version>
+# * <new-preinst> upgrade <old-version>
+# * <old-preinst> abort-upgrade <new-version>
+#
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
+mysql_datadir=/var/lib/mysql
+mysql_upgradedir=/var/lib/mysql-upgrade
+
+# Try to stop the server in a sane way. If it does not success let the admin
+# do it himself. No database directories should be removed while the server
+# is running! Another mysqld in e.g. a different chroot is fine for us.
+stop_server() {
+ # Return immediately if there are no mysql processes running on a host
+ # (leave containerized processes with the same name in other namespaces)
+ # as there is no point in trying to shutdown in that case.
+ # Compatibility with versions that ran 'mariadbd'
+ if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
+
+ set +e
+ systemctl stop mysql
+ errno=$?
+ set -e
+
+ # 0=ok, 100=no init script (fresh install)
+ if [ "$errno" != 0 -a "$errno" != 100 ]; then
+ echo "'systemctl stop mysql' returned $errno" 1>&2
+ echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
+ echo "Stop it yourself and try again!" 1>&2
+ db_stop
+ exit 1
+ fi
+}
+
+################################ main() ##########################
+
+this_version=10.4
+max_upgradeable_version=5.7
+
+# Check if a flag file is found that indicates a previous MariaDB or MySQL
+# version was installed. If multiple flags are found, check which one was
+# the biggest version number.
+for flag in $mysql_datadir/debian-*.flag
+do
+
+ # The for loop leaves $flag as the query string if there are no results,
+ # so the check below is needed to stop further processing when there are
+ # no real results.
+ if [ $flag = "$mysql_datadir/debian-*.flag" ]
+ then
+ break
+ fi
+
+ flag_version=`echo $flag | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'`
+
+ # Initialize value if empty
+ if [ -z "$found_version" ]
+ then
+ found_version=$flag_version
+ fi
+
+ # Update value if now bigger then before
+ if dpkg --compare-versions "$flag_version" '>>' "$found_version"
+ then
+ found_version=$flag_version
+ fi
+
+done
+
+
+# If an upgrade is detected, proceed with it automatically without
+# requiring any user interaction.
+#
+# However, if the user attempts to downgrade, warn about the incompatibility.
+# Downgrade is detected if the flag version is bigger than $this_version
+# (e.g. 10.1 > 10.0) or the flag version is smaller than 10.0 but bigger
+# than $max_upgradeable_version.
+if [ ! -z "$found_version" ]
+then
+
+ echo "$mysql_datadir: found previous version $found_version"
+
+ if dpkg --compare-versions "$found_version" '>>' "$this_version"
+ then
+ downgrade_detected=true
+ fi
+
+ if dpkg --compare-versions "$found_version" '>>' "$max_upgradeable_version" \
+ && dpkg --compare-versions "$found_version" '<<' "10.0"
+ then
+ downgrade_detected=true
+ fi
+
+fi
+
+
+# Don't abort dpkg if downgrade is detected (as was done previously).
+# Instead simply move the old datadir and create a new for this_version.
+if [ ! -z "$downgrade_detected" ]
+then
+ db_input critical mariadb-server-10.4/old_data_directory_saved || true
+ db_go
+ echo "The file $mysql_datadir/debian-$found_version.flag indicates a" 1>&2
+ echo "version that cannot automatically be upgraded. Therefore the" 1>&2
+ echo "previous data directory will be renamed to $mysql_datadir-$found_version and" 1>&2
+ echo "a new data directory will be initialized at $mysql_datadir." 1>&2
+ echo "Please manually export/import your data (e.g. with mysqldump) if needed." 1>&2
+ mv -f $mysql_datadir $mysql_datadir-$found_version
+ # Also move away the old debian.cnf file that included credentials that are
+ # no longer valid
+ mv -f /etc/mysql/debian.cnf /etc/mysql/debian.cnf-$found_version
+fi
+
+# to be sure
+stop_server
+
+# If we use NIS then errors should be tolerated. It's up to the
+# user to ensure that the mysql user is correctly setup.
+# Beware that there are two ypwhich one of them needs the 2>/dev/null!
+if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
+ set +e
+fi
+
+#
+# Now we have to ensure the following state:
+# /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false
+# /etc/group: mysql:x:101:
+#
+# Sadly there could any state be present on the system so we have to
+# modify everything carefully i.e. not doing a chown before creating
+# the user etc...
+#
+
+# creating mysql group if he isn't already there
+if ! getent group mysql >/dev/null; then
+ # Adding system group: mysql.
+ addgroup --system mysql >/dev/null
+fi
+
+# creating mysql user if he isn't already there
+if ! getent passwd mysql >/dev/null; then
+ # Adding system user: mysql.
+ adduser \
+ --system \
+ --disabled-login \
+ --ingroup mysql \
+ --no-create-home \
+ --home /nonexistent \
+ --gecos "MySQL Server" \
+ --shell /bin/false \
+ mysql >/dev/null
+fi
+
+# end of NIS tolerance zone
+set -e
+
+# if there's a symlink, let's store where it's pointing, because otherwise
+# it's going to be lost in some situations
+for dir in DATADIR LOGDIR; do
+ checkdir=`eval echo "$"$dir`
+ if [ -L "$checkdir" ]; then
+ mkdir -p "$mysql_upgradedir"
+ cp -dT "$checkdir" "$mysql_upgradedir/$dir.link"
+ fi
+done
+
+# creating mysql home directory
+if [ ! -d $mysql_datadir -a ! -L $mysql_datadir ]; then
+ mkdir $mysql_datadir
+fi
+
+# checking disc space
+if LC_ALL=C BLOCKSIZE= df --portability $mysql_datadir/. | tail -n 1 | awk '{ exit ($4>1000) }'; then
+ echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2
+ db_stop
+ exit 1
+fi
+
+# Since the home directory was created before putting the user into
+# the mysql group and moreover we cannot guarantee that the
+# permissions were correctly *before* calling this script, we fix them now.
+# In case we use NIS and no mysql user is present then this script should
+# better fail now than later..
+# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is
+# not chgrp'able (#318435).
+set +e
+find $mysql_datadir ! -uid $(id -u mysql) -print0 | xargs -0 -r chown mysql
+find $mysql_datadir -follow -not -group mysql -print0 2>/dev/null \
+ | xargs -0 --no-run-if-empty chgrp mysql
+set -e
+
+
+db_stop
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mariadb-server-10.3.prerm b/debian/mariadb-server-10.4.prerm
index 0371bbfc844..0371bbfc844 100644
--- a/debian/mariadb-server-10.3.prerm
+++ b/debian/mariadb-server-10.4.prerm
diff --git a/debian/mariadb-server-10.4.py b/debian/mariadb-server-10.4.py
new file mode 100644
index 00000000000..b44228daf8b
--- /dev/null
+++ b/debian/mariadb-server-10.4.py
@@ -0,0 +1,52 @@
+'''apport package hook for mariadb-10.4
+
+(c) 2009 Canonical Ltd.
+Author: Mathias Gug <mathias.gug@canonical.com>
+'''
+
+import os, os.path
+
+from apport.hookutils import *
+
+def _add_my_conf_files(report, filename):
+ key = 'MySQLConf' + path_to_key(filename)
+ report[key] = ""
+ for line in read_file(filename).split('\n'):
+ try:
+ if 'password' in line.split('=')[0]:
+ line = "%s = @@APPORTREPLACED@@" % (line.split('=')[0])
+ report[key] += line + '\n'
+ except IndexError:
+ continue
+
+def add_info(report):
+ attach_conffiles(report, 'mariadb-server-10.4', conffiles=None)
+ key = 'Logs' + path_to_key('/var/log/daemon.log')
+ report[key] = ""
+ for line in read_file('/var/log/daemon.log').split('\n'):
+ try:
+ if 'mysqld' in line.split()[4]:
+ report[key] += line + '\n'
+ except IndexError:
+ continue
+ key = 'Logs' + path_to_key('/var/log/kern.log')
+ report[key] = ""
+ for line in read_file('/var/log/kern.log').split('\n'):
+ try:
+ if '/usr/sbin/mysqld' in string.join(line.split()[4:]):
+ report[key] += line + '\n'
+ except IndexError:
+ continue
+ _add_my_conf_files(report, '/etc/mysql/my.cnf')
+ for f in os.listdir('/etc/mysql/conf.d'):
+ _add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f))
+ try:
+ report['MySQLVarLibDirListing'] = unicode(os.listdir('/var/lib/mysql'))
+ except OSError:
+ report['MySQLVarLibDirListing'] = unicode(False)
+
+if __name__ == '__main__':
+ report = {}
+ add_info(report)
+ for key in report:
+ print '%s: %s' % (key, report[key].split('\n', 1)[0])
diff --git a/debian/mariadb-server-10.4.templates b/debian/mariadb-server-10.4.templates
new file mode 100644
index 00000000000..a761ad76c6a
--- /dev/null
+++ b/debian/mariadb-server-10.4.templates
@@ -0,0 +1,76 @@
+# These templates have been reviewed by the debian-l10n-english
+# team
+#
+# If modifications/additions/rewording are needed, please ask
+# for an advice to debian-l10n-english@lists.debian.org
+#
+# Even minor modifications require translation updates and such
+# changes should be coordinated with translators and reviewers.
+
+Template: mariadb-server-10.4/old_data_directory_saved
+Type: note
+_Description: The old data directory will be saved at new location
+ A file named /var/lib/mysql/debian-*.flag exists on this system.
+ The number indicates a database binary format version that cannot automatically
+ be upgraded (or downgraded).
+ .
+ Therefore the previous data directory will be renamed to /var/lib/mysql-* and
+ a new data directory will be initialized at /var/lib/mysql.
+ .
+ Please manually export/import your data (e.g. with mysqldump) if needed.
+
+Template: mariadb-server-10.4/nis_warning
+Type: note
+#flag:translate!:3,5
+_Description: Important note for NIS/YP users
+ Using MariaDB under NIS/YP requires a mysql user account to be added on
+ the local system with:
+ .
+ adduser --system --group --home /var/lib/mysql mysql
+ .
+ You should also check the permissions and ownership of the
+ /var/lib/mysql directory:
+ .
+ /var/lib/mysql: drwxr-xr-x mysql mysql
+
+Template: mariadb-server-10.4/postrm_remove_databases
+Type: boolean
+Default: false
+_Description: Remove all MariaDB databases?
+ The /var/lib/mysql directory which contains the MariaDB databases is about
+ to be removed.
+ .
+ If you're removing the MariaDB package in order to later install a more
+ recent version or if a different mariadb-server package is already
+ using it, the data should be kept.
+
+Template: mysql-server/root_password
+Type: password
+_Description: New password for the MariaDB "root" user:
+ While not mandatory, it is highly recommended that you set a password
+ for the MariaDB administrative "root" user.
+ .
+ If this field is left blank, the password will not be changed.
+
+Template: mysql-server/root_password_again
+Type: password
+_Description: Repeat password for the MariaDB "root" user:
+
+Template: mysql-server/error_setting_password
+Type: error
+_Description: Unable to set password for the MariaDB "root" user
+ An error occurred while setting the password for the MariaDB
+ administrative user. This may have happened because the account
+ already has a password, or because of a communication problem with
+ the MariaDB server.
+ .
+ You should check the account's password after the package installation.
+ .
+ Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file
+ for more information.
+
+Template: mysql-server/password_mismatch
+Type: error
+_Description: Password input error
+ The two passwords you entered were not the same. Please try again.
+
diff --git a/debian/mariadb-server-10.3.triggers b/debian/mariadb-server-10.4.triggers
index d1f5f5e14f1..d1f5f5e14f1 100644
--- a/debian/mariadb-server-10.3.triggers
+++ b/debian/mariadb-server-10.4.triggers
diff --git a/debian/mariadb-server-core-10.3.install b/debian/mariadb-server-core-10.3.install
deleted file mode 100644
index 46c116b618d..00000000000
--- a/debian/mariadb-server-core-10.3.install
+++ /dev/null
@@ -1,33 +0,0 @@
-usr/bin/innochecksum
-usr/bin/mysql_install_db
-usr/bin/mysql_upgrade
-usr/sbin/mysqld
-usr/share/man/man1/innochecksum.1
-usr/share/man/man1/mysql_install_db.1
-usr/share/man/man1/mysql_upgrade.1
-usr/share/man/man8/mysqld.8
-usr/share/mysql/charsets
-usr/share/mysql/czech
-usr/share/mysql/danish
-usr/share/mysql/dutch
-usr/share/mysql/english
-usr/share/mysql/estonian
-usr/share/mysql/french
-usr/share/mysql/german
-usr/share/mysql/greek
-usr/share/mysql/hindi
-usr/share/mysql/hungarian
-usr/share/mysql/italian
-usr/share/mysql/japanese
-usr/share/mysql/korean
-usr/share/mysql/norwegian
-usr/share/mysql/norwegian-ny
-usr/share/mysql/polish
-usr/share/mysql/portuguese
-usr/share/mysql/romanian
-usr/share/mysql/russian
-usr/share/mysql/serbian
-usr/share/mysql/slovak
-usr/share/mysql/spanish
-usr/share/mysql/swedish
-usr/share/mysql/ukrainian
diff --git a/debian/mariadb-server-core-10.4.install b/debian/mariadb-server-core-10.4.install
new file mode 100644
index 00000000000..36c62a29895
--- /dev/null
+++ b/debian/mariadb-server-core-10.4.install
@@ -0,0 +1,38 @@
+usr/bin/innochecksum
+usr/bin/mysql_install_db
+usr/bin/mysql_upgrade
+usr/sbin/mysqld
+usr/share/man/man1/innochecksum.1
+usr/share/man/man1/mariadb-install-db.1
+usr/share/man/man1/mariadb-upgrade.1
+usr/share/man/man1/mysql_install_db.1
+usr/share/man/man1/mysql_upgrade.1
+usr/share/man/man8/mariadbd.8
+usr/share/man/man8/mysqld.8
+usr/share/mysql/bulgarian
+usr/share/mysql/chinese
+usr/share/mysql/charsets
+usr/share/mysql/czech
+usr/share/mysql/danish
+usr/share/mysql/dutch
+usr/share/mysql/english
+usr/share/mysql/estonian
+usr/share/mysql/french
+usr/share/mysql/german
+usr/share/mysql/greek
+usr/share/mysql/hindi
+usr/share/mysql/hungarian
+usr/share/mysql/italian
+usr/share/mysql/japanese
+usr/share/mysql/korean
+usr/share/mysql/norwegian
+usr/share/mysql/norwegian-ny
+usr/share/mysql/polish
+usr/share/mysql/portuguese
+usr/share/mysql/romanian
+usr/share/mysql/russian
+usr/share/mysql/serbian
+usr/share/mysql/slovak
+usr/share/mysql/spanish
+usr/share/mysql/swedish
+usr/share/mysql/ukrainian
diff --git a/debian/mariadb-server-core-10.4.links b/debian/mariadb-server-core-10.4.links
new file mode 100644
index 00000000000..b7873f93141
--- /dev/null
+++ b/debian/mariadb-server-core-10.4.links
@@ -0,0 +1,3 @@
+usr/bin/mysql_install_db usr/bin/mariadb-install-db
+usr/bin/mysql_upgrade usr/bin/mariadb-upgrade
+usr/sbin/mysqld usr/sbin/mariadbd
diff --git a/debian/mariadb-test.install b/debian/mariadb-test.install
index f715825274c..fc7a707c007 100644
--- a/debian/mariadb-test.install
+++ b/debian/mariadb-test.install
@@ -17,6 +17,10 @@ usr/lib/mysql/plugin/qa_auth_client.so
usr/lib/mysql/plugin/qa_auth_interface.so
usr/lib/mysql/plugin/qa_auth_server.so
usr/lib/mysql/plugin/test_versioning.so
+usr/share/man/man1/mariadb-client-test-embedded.1
+usr/share/man/man1/mariadb-client-test.1
+usr/share/man/man1/mariadb-test-embedded.1
+usr/share/man/man1/mariadb-test.1
usr/share/man/man1/mysql-stress-test.pl.1
usr/share/man/man1/mysql-test-run.pl.1
usr/share/man/man1/mysql_client_test.1
diff --git a/debian/mariadb-test.links b/debian/mariadb-test.links
index 884b25a81da..504e0a0b557 100644
--- a/debian/mariadb-test.links
+++ b/debian/mariadb-test.links
@@ -1,2 +1,6 @@
+usr/bin/mysql_client_test usr/bin/mariadb-client-test
+usr/bin/mysql_client_test_embedded usr/bin/mariadb-client-test-embedded
+usr/bin/mysqltest usr/bin/mariadb-test
+usr/bin/mysqltest_embedded usr/bin/mariadb-test-embedded
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
diff --git a/debian/not-installed b/debian/not-installed
index c151cf753e6..5341f6ca438 100644
--- a/debian/not-installed
+++ b/debian/not-installed
@@ -7,15 +7,15 @@ usr/lib/sysusers.d/sysusers.conf
usr/lib/tmpfiles.d/tmpfiles.conf
usr/lib/mysql/plugin/JavaWrappers.jar # These are only built if JNI/libjawt.so is installed from e.g. openjdk-8-jre-headless
usr/lib/mysql/plugin/JdbcInterface.jar # These are only built if JNI/libjawt.so is installed from e.g. openjdk-8-jre-headless
-usr/share/doc/mariadb-server-10.3/COPYING
-usr/share/doc/mariadb-server-10.3/COPYING.AGPLv3
-usr/share/doc/mariadb-server-10.3/COPYING.GPLv2
-usr/share/doc/mariadb-server-10.3/COPYING.thirdparty
-usr/share/doc/mariadb-server-10.3/CREDITS
-usr/share/doc/mariadb-server-10.3/EXCEPTIONS-CLIENT
-usr/share/doc/mariadb-server-10.3/INSTALL-BINARY
-usr/share/doc/mariadb-server-10.3/PATENTS
-usr/share/doc/mariadb-server-10.3/README-wsrep
+usr/share/doc/mariadb-server-10.4/COPYING
+usr/share/doc/mariadb-server-10.4/COPYING.AGPLv3
+usr/share/doc/mariadb-server-10.4/COPYING.GPLv2
+usr/share/doc/mariadb-server-10.4/COPYING.thirdparty
+usr/share/doc/mariadb-server-10.4/CREDITS
+usr/share/doc/mariadb-server-10.4/EXCEPTIONS-CLIENT
+usr/share/doc/mariadb-server-10.4/INSTALL-BINARY
+usr/share/doc/mariadb-server-10.4/PATENTS
+usr/share/doc/mariadb-server-10.4/README-wsrep
usr/share/groonga/COPYING
usr/share/groonga-normalizer-mysql/lgpl-2.0.txt
usr/share/groonga-normalizer-mysql/README.md
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
index f2af9ac992f..9499932064b 100644
--- a/debian/po/POTFILES.in
+++ b/debian/po/POTFILES.in
@@ -1 +1 @@
-[type: gettext/rfc822deb] mariadb-server-10.3.templates
+[type: gettext/rfc822deb] mariadb-server-10.4.templates
diff --git a/debian/po/ar.po b/debian/po/ar.po
index 69ff80df4fa..3cc38aa9c1a 100644
--- a/debian/po/ar.po
+++ b/debian/po/ar.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: templates\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-05-01 13:04+0300\n"
"Last-Translator: Ossama M. Khayat <okhayat@yahoo.com>\n"
@@ -27,13 +27,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -42,7 +42,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -50,20 +50,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "ملاحظة هامة لمستخدمي NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -71,7 +71,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -83,13 +83,13 @@ msgstr "عليك أيضاً أن تقوم بالتأكد من صلاحيات Ù…Ø
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "إزالة جميع قواعد بيانات MariaDB؟"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -97,7 +97,7 @@ msgstr "الدليل /var/lib/mysql الذي يحتوي قواعد بيانات
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -108,13 +108,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMariaDB:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -124,7 +124,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -132,7 +132,7 @@ msgstr "إن ترك الحقل Ùارغاً، Ùلن يتم تغيير كلمة
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for the MariaDB \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -140,13 +140,13 @@ msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص ب
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "تعذر تعيين كلمة مرور للمستخدم \"root\" الخاص بـMariaDB."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -158,7 +158,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "You should check the account's password after tha package installation."
@@ -167,83 +167,26 @@ msgstr "يجب عليك التحقق من كلمة مرور الحساب عقب
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"الرجاء قراءة المل٠/usr/share/doc/mariadb-server-10.3/README.Debian للمزيد "
+"الرجاء قراءة المل٠/usr/share/doc/mariadb-server-10.4/README.Debian للمزيد "
"من المعلومات."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "هل Ùعلاً تريد التثبيط؟"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "هناك مل٠مسمى /var/lib/mysql/debian-*.flag موجود على هذا النظام."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "هذا المل٠دلالة على أن نسخة أحدث من حزمة mariadb-server تم تثبيتها مسبقاً."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "ليست هناك أية ضمانة أن النسخة التي تقوم بتثبيتها ستكون قادرة على استخدام "
-#~ "قواعد البيانات الحالية."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "تشغيل خادم MariaDB عند الإقلاع؟"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "يمكن تشغيل خادم MariaDB آلياً وقت الإقلاع أو يدوياً باستخدام الأمر '/etc/"
-#~ "init.d/mysql start'."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "كي تستخدم MariaDBØŒ يجب إضاÙØ© المÙدخلات التالية الخاصة بالمستخدمين "
-#~ "والمجموعات إلى النظام:"
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "هل تريد دعم اتصالات MySQL من الأجهزة التي تعمل على ديبيان \"sarge\" أو "
-#~ "أقدم؟"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "ÙÙŠ إصدارات عملاء MySQL القديمة من ديبيان، لم تكن كلمات المرور تحÙظ بشكل "
-#~ "آمن. ولقد حل هذه المشكلة بعدها، غير أن العملاء (مثل PHP) المتصلين من "
-#~ "أجهزة تعمل على ديبيان Sarge 3.1 لن يكونوا قادرين على الاتصال باستخدام "
-#~ "الحسابات الحديثة أو الحسابات التي تم تغيير كلمة مرورها."
diff --git a/debian/po/ca.po b/debian/po/ca.po
index 3e1465208d5..925c749600c 100644
--- a/debian/po/ca.po
+++ b/debian/po/ca.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2004-01-31 19:20GMT\n"
"Last-Translator: Aleix Badia i Bosch <abadia@ica.es>\n"
@@ -17,13 +17,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -32,7 +32,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -40,14 +40,14 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid "Important note for NIS/YP users!"
msgid "Important note for NIS/YP users"
@@ -55,7 +55,7 @@ msgstr "Nota important pels usuaris de NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -63,7 +63,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -71,13 +71,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -85,7 +85,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -94,13 +94,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -108,25 +108,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -135,189 +135,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#, fuzzy
-#~| msgid "Should MySQL start on boot?"
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Voleu que el MariaDB s'iniciï a l'arrencada ?"
-
-#, fuzzy
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "El MariaDB es pot executar a l'arrencada o només si executeu manualment '/"
-#~ "etc/init.d/mysql start'. Seleccioneu 'sí' si voleu que s'inicialitzi "
-#~ "automàticament."
-
-#, fuzzy
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Per utilitzar la base de dades de MySQL heu d'afegir un usuari i grup "
-#~ "equivalent al següent i assegurar-vos que el directori /var/lib/mysql "
-#~ "tingui els permisos correctes."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#, fuzzy
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr ""
-#~ "Feu una ullada al document: http://www.mysql.com/doc/en/Upgrade.html"
-
-#, fuzzy
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "El MySQL només s'instal·la en cas de tenir un nom d'ordinador central que "
-#~ "no sigui numèric i que es pugui resoldre a través del fitxer /etc/hosts. "
-#~ "Ex. si l'ordre \"hostname\" retorna \"myhostname\", llavors hi ha d'haver "
-#~ "una línia com la següent \"10.0.0.1 myhostname\"."
-
-#, fuzzy
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Es crea un nou usuari de mysql \"debian-sys-maint\". S'utilitza per les "
-#~ "seqüències d'inicialització i aturada del cron, no el suprimiu."
-
-#, fuzzy
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Recordeu posar una contrasenya al superusuari del MySQL. Si utilitzeu un "
-#~ "fitxer /root/.my.cnf, escriviu sempre allà les línies \"user\" i "
-#~ "\"password\".; mai només la contrasenya. Per a més informació feu una "
-#~ "ullada a /usr/share/doc/mysql-server/README.Debian."
-
-#, fuzzy
-#~ msgid ""
-#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
-#~ "mysql-server package?"
-#~ msgstr ""
-#~ "Voleu suprimir totes les bases de dades en purgar el paquet mysql-server ?"
-
-#~ msgid ""
-#~ "Networking is disabled by default for security reasons. You can enable it "
-#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
-#~ msgstr ""
-#~ "La xarxa està inhabilitada per defecte per a raons de seguretat. La podeu "
-#~ "habilitar descomentant l'opció de skip-networking del fitxer /etc/mysql/"
-#~ "my.cnf."
-
-#~ msgid "security and update notice"
-#~ msgstr "Avís de seguretat i actualització"
-
-#~ msgid "Please run mysql_fix_privilege_tables !"
-#~ msgstr "Executeu mysql_fix_privilege_tables"
-
-#~ msgid ""
-#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
-#~ "other than root and mysql with mysql."
-#~ msgstr ""
-#~ "S'asseguren els permisos de seguretat de /var/lib/mysql canviant a mysql "
-#~ "tots els GIDs diferents a root i mysql."
-
-#~ msgid ""
-#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
-#~ msgstr ""
-#~ "Per habilitar el suport de SSL podeu seguir les instruccions de /usr/"
-#~ "share/doc/mysql-server/"
-
-#~ msgid "mysql_fix_privileges_tables will be executed"
-#~ msgstr "s'executa mysql_fix_privileges_tables"
-
-#~ msgid ""
-#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
-#~ "system. To make use of it, some new fields must be added to the tables "
-#~ "in the \"mysql\" database. This is done by the "
-#~ "mysql_fix_privilege_tables script during this upgrade regardless of if "
-#~ "the server is currently running or not!"
-#~ msgstr ""
-#~ "Les últimes versions de MySQL tenen un sistema de privilegis més "
-#~ "elaborat. Per utilitzar-lo cal afegir nous camps a les taules de la base "
-#~ "de dades \"mysql\". Aquesta tasca la realitza la seqüència "
-#~ "mysql_fix_privilege_tables durant l'actualització independentment de si "
-#~ "el servidor s'està executant o no!"
-
-#~ msgid ""
-#~ "This script is not supposed to give any user more rights that he had "
-#~ "before, if you encounter such a case, please contact me."
-#~ msgstr ""
-#~ "Aquesta seqüència no assigna privilegis d'usuari diferents als que ja "
-#~ "tenia, en cas que us trobéssiu en aquesta situació, poseu-vos en contacte "
-#~ "amb mi."
-
-#~ msgid ""
-#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
-#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
-#~ "remove everything including the configuration) somewhen? (default is not)"
-#~ msgstr ""
-#~ "Voleu suprimir tots els continguts de /var/lib/mysql quan es purgui el "
-#~ "paquet mysql-server amb l'ordre \"dpkg --purge mysql-server\". (ex. "
-#~ "suprimir-ho tot inclòs la configuració) ? (per defecte no)"
-
-#~ msgid "Make MySQL reachable via network?"
-#~ msgstr "Voleu fer accessible el MySQL via xarxa ?"
-
-#~ msgid ""
-#~ "Should MySQL listen on a network reachable TCP port? This is not "
-#~ "necessary for use on a single computer and could be a security problem."
-#~ msgstr ""
-#~ "Voleu que el MySQL escolti a un port TCP accessible des de la xarxa ? "
-#~ "Aquesta opció no és imprescindible en ordinadors aïllats i podria "
-#~ "provocar un problema de seguretat."
-
-#~ msgid "Enable chroot mode?"
-#~ msgstr "Permetre el mode chroot ?"
-
-#~ msgid ""
-#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
-#~ "that users cannot modify any files outside this directory. This improves "
-#~ "resistence against crackers, too, as they are not able to modify system "
-#~ "files."
-#~ msgstr ""
-#~ "El MySQL es pot executar en una entorn tancat al directori /var/lib/"
-#~ "mysql_jail perquè els usuaris no puguin modificar cap fitxer fora del "
-#~ "directori.Aquesta opció també augmenta la seguretat envers els crackers, "
-#~ "jaque no poden modificar els fitxers del sistema."
diff --git a/debian/po/cs.po b/debian/po/cs.po
index 8c8d812636e..ecb70c5f2b5 100644
--- a/debian/po/cs.po
+++ b/debian/po/cs.po
@@ -14,7 +14,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-05-01 13:01+0200\n"
"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
@@ -26,13 +26,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -41,7 +41,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -49,20 +49,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Důležitá poznámka pro uživatele NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -70,7 +70,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -83,13 +83,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Odstranit všechny MariaDB databáze?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -99,7 +99,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -111,13 +111,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Nové heslo MariaDB uživatele \"root\":"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -127,7 +127,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -135,7 +135,7 @@ msgstr "Ponecháte-li pole prázdné, heslo se nezmění."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for the MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -143,13 +143,13 @@ msgstr "Nové heslo MariaDB uživatele \"root\":"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Nelze nastavit heslo MariaDB uživatele \"root\""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -161,7 +161,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "You should check the account's password after tha package installation."
@@ -170,176 +170,25 @@ msgstr "Po instalaci balíku byste měli heslo ověřit."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Více informací naleznete v /usr/share/doc/mariadb-server-10.3/README.Debian."
+"Více informací naleznete v /usr/share/doc/mariadb-server-10.4/README.Debian."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Opravdu pokraÄovat v degradaci?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "V systému existuje soubor /var/lib/mysql/debian-*.flag."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "To znamená, že již byl nainstalován balík mariadb-server s vyšší verzí."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Neexistuje žádná záruka, že momentálně instalovaná verze bude umět "
-#~ "pracovat se stávajícími databázemi."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Spustit MariaDB server při startu systému?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB se může spouÅ¡tÄ›t automaticky pÅ™i startu systému, nebo ruÄnÄ› "
-#~ "příkazem '/etc/init.d/mysql start'."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "Abyste mohli MariaDB používat, musíte v systému založit následující "
-#~ "uživatele a skupiny:"
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Aktualizace nelze provést pokud jsou přítomny tabulky ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.1 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Poslední verze MySQL již nemohou používat starý formát tabulek ISAM a "
-#~ "před aktualizací je nutné převést tyto tabulky např. do formátu MyISAM "
-#~ "pomocí \"mysql_convert_table_format\" nebo \"ALTER TABLE x ENGINE=MyISAM"
-#~ "\". Instalace mysql-server-5.1 se nyní přeruší. V případě, že se mezitím "
-#~ "odinstaloval původní mysql-server-4.1, jednoduše jej znovu nainstalujte a "
-#~ "tabulky pÅ™eveÄte."
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Podporovat MySQL pÅ™ipojení z poÄítaÄů používajících Debian Sarge nebo "
-#~ "starší?"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "Způsob, jakým se dříve ukládala hesla, nebyl příliÅ¡ bezpeÄný. To se nyní "
-#~ "zlepšilo, ale nevýhodou je, že se klienti z Debianu 3.1 Sarge (např. PHP) "
-#~ "nebudou moci pÅ™ipojit na nové úÄty, nebo na úÄty, u nichž se heslo "
-#~ "změnilo."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Abyste mohli mysql používat, musíte do následujících souborů přidat "
-#~ "ekvivalentního uživatele a skupinu a zajistit, že /var/lib/mysql má "
-#~ "správná práva (uid/gid se mohou lišit)."
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr "Odstranit databáze používané všemi verzemi MySQL?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr "Nezadáte-li heslo, žádné zmÄ›ny se s úÄtem neprovedou."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "Po skonÄení instalace byste mÄ›li ověřit, že je úÄet chránÄ›n heslem (více "
-#~ "informací naleznete v souboru README.Debian)."
-
-#~ msgid "Update Hints"
-#~ msgstr "Poznámky k aktualizaci"
-
-#~ msgid ""
-#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be "
-#~ "corrupted! This script also enhances the privilege tables but is not "
-#~ "supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Po aktualizaci ještě musíte spustit \"mysql_upgrade\", protože jinak by "
-#~ "se tabulky mohly narušit! Tento skript také rozšiřuje tabulky privilegií, "
-#~ "ovšem neměl by uživatelům přidat více práv, než měli dosud."
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Také si pÅ™eÄtÄ›te http://www.mysql.com/doc/en/Upgrade.html"
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL se nainstaluje pouze v případě, že používáte nenumerické jméno "
-#~ "poÄítaÄe, které se dá pÅ™eložit pÅ™es soubor /etc/hosts. NapÅ™. když příkaz "
-#~ "\"hostname\" vrátí \"diamond\", tak v /etc/hosts musí existovat obdobný "
-#~ "řádek jako \"10.0.0.1 diamond\"."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Bude vytvoÅ™en nový mysql uživatel \"debian-sys-maint\". Tento mysql úÄet "
-#~ "se používá ve startovacích, ukonÄovacích a cronových skriptech. Nemažte "
-#~ "jej."
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Nezapomeňte nastavit heslo pro úÄet administrátora MySQL! Používáte-li /"
-#~ "root/.my.cnf, vždy zde zadejte jak řádek \"user\", tak řádek \"password"
-#~ "\". Nikdy zde nezadávejte jenom heslo!"
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "Mám odstranit kompletní adresářový strom /var/lib/mysql, který se používá "
-#~ "pro všechny verze MySQL, tedy ne nutně pouze pro verzi, kterou se "
-#~ "chystáte vyÄistit?"
diff --git a/debian/po/da.po b/debian/po/da.po
index 06f2cd0ffee..23c481768f7 100644
--- a/debian/po/da.po
+++ b/debian/po/da.po
@@ -14,7 +14,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-05-30 22:41+0200\n"
"Last-Translator: Claus Hindsgaul <claus.hindsgaul@gmail.com>\n"
@@ -27,13 +27,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -42,7 +42,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -50,20 +50,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Vigtig oplysning til NIS/YP-brugere"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -71,7 +71,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -84,13 +84,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Fjern alle MariaDB-databaser?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -100,7 +100,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -112,13 +112,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Ny adgangskode for MariaDB's \"root\"-bruger:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -128,7 +128,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -136,7 +136,7 @@ msgstr "Hvis du lader dette felt stå tomt, vil adgangskoden ikke blive ændret."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for the MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -144,13 +144,13 @@ msgstr "Ny adgangskode for MariaDB's \"root\"-bruger:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Kunne ikke sætte adgangskoden for MariaDB's \"root\"-bruger"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -163,217 +163,32 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr "Du bør tjekke kontoens adgangskode efter pakkeinstallationen."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Se filen /usr/share/doc/mariadb-server-10.3/README.Debian for yderligere "
+"Se filen /usr/share/doc/mariadb-server-10.4/README.Debian for yderligere "
"oplysninger."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Ønsker du virkelig at fortsætte nedgraderingen?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr ""
-#~ "Der er en fil med navnet /var/lib/mysql/debian-*.flag på dette system."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Sådan en fil tyder på at der tidligere har været installeret en højere "
-#~ "version af mariadb-server-pakken."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Det kan ikke garanteres at den version, du er ved at installere, kan "
-#~ "benytte data fra de eksisterende databaser."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Start MariaDB-serveren under systemopstart?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB-serveren kan enten startes op automatisk under systemopstarten, "
-#~ "eller manuelt med kommandoen '/etc/init.d/mysql start'."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "Nedenstående linjer for brugere og grupper skal tilføjes dette system for "
-#~ "at benytte MariaDB:"
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Kan ikke opgradere hvis der er ISAM-tabeller!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.1 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Nyere versioner af MySQL kan ikke længere benytte det gamle ISAM-"
-#~ "tabelformat, og det er derfor nødvendigt at konvertere dine tabeller til "
-#~ "f.eks. MyISAM forud for opgraderingen med \"mysql_convert_table_format\" "
-#~ "eller \"ALTER TABLE x ENGINE=MyISAM\". Installationen af mysql-server-5.1 "
-#~ "afbrydes nu. Skulle din gamle mysql-server-4.1 alligevel bliver "
-#~ "afinstalleret, så geninstallér den blot og konverter tabellerne."
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Understøt MySQL-forbindelser fra maskiner, der kører Debian \"Sarge\" "
-#~ "eller ældre?"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "Gamle udgaver af MySQL-klienter på Debian gemte ikke adgangskoderne "
-#~ "sikkert. Dette er blevet forbedret siden da, men klienter (f.eks. PHP) "
-#~ "fra maskiner, der kører Debian 3.1 Sarge vil ikke kunne forbinde til "
-#~ "nyere konti eller konti, hvis adgangskode er blevet ændret."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "For at kunne bruge mysql skal du installere en bruger og en gruppe, der "
-#~ "svarer til nedenstående, og sikre dig at /var/lib/mysql har de rigtige "
-#~ "adgangsrettigheder (uid/gid kan afvige)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr "Fjern de databaser, der benyttes af samtlige MySQL-versioner?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr "Hvis du ikke angiver en adgangskode, vil kontoen ikke blive ændret."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "Når installationen afsluttes, bør du tjekke at kontoen er ordentligt "
-#~ "beskyttet med en adgangskode (se README.Debian for yderligere "
-#~ "oplysninger)."
-
-#~ msgid "Update Hints"
-#~ msgstr "Opdateringstips"
-
-#~ msgid ""
-#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be "
-#~ "corrupted! This script also enhances the privilege tables but is not "
-#~ "supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Du skal køre \"mysql_upgrade\" efter opgraderingen, da tabellerne eller "
-#~ "kan blive ødelagt! Dette script forbedrer også rettighedstabellerne, men "
-#~ "burde ikke give nogen bruger flere rettigheder, end han havde tidligere,"
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Læs også http://www.mysql.com/doc/en/Upgrade.html"
-
-#~ msgid "Install Hints"
-#~ msgstr "Installationstips"
-
-#~ msgid ""
-#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
-#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
-#~ "have manually be restored."
-#~ msgstr ""
-#~ "Ved opgraderinger fra MySQL 3.23, der fulgte med Debian Woody, kan de "
-#~ "symbolske /var/lib/mysql or /var/log/mysql blive fjernet ved et uheld, og "
-#~ "må genskabes manuelt."
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL vil kun blive installeret, hvis du har et ikke-numerisk værtsnavn, "
-#~ "som kan slås op i filen /ets/hosts. Hvis f.eks. kommandoen \"hostname\" "
-#~ "svarer med \"mitvaertsnavn\", skal du have en linje a'la \"10.0.0.1 "
-#~ "mitvaertsnavn\" i /etc/hosts."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Det vil blive oprettet en ny mysql-bruger, \"debian-sys-maint\". Denne "
-#~ "mysql-konto bruges i start/stop-cron-scripterne. Slet den ikke."
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Husk at sætte en ADGANGSKODE for MySQLs root-bruger! Hvis du bruger en /"
-#~ "etc/.my.cnf, så skriv altid \"user\"- og \"password\"-linjer ind her, "
-#~ "ikke kun adgangskoden!"
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "Skal jeg fjerne hele mappetræet /var/lib/mysql, som benyttes af alle "
-#~ "MySQL-versioner, ikke kun den version, du er ved at slette?"
-
-#~ msgid ""
-#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
-#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
-#~ "script is not supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "En sjælden gang imellem, f.eks. ved nye hovedversioner, sker det at "
-#~ "rettighedssystemet forbedres. For at gøre brug af dette, skal "
-#~ "mysql_fix_privilege_tables køres manuelt. Scriptet vil ikke give nogen "
-#~ "bruger flere rettigheder, end vedkommende havde tidligere,"
diff --git a/debian/po/de.po b/debian/po/de.po
index 2e75376cc21..b61c4c12dec 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -15,7 +15,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1_5.1.37-1_de\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2009-08-27 22:41+0200\n"
"Last-Translator: Thomas Mueller <thomas.mueller@tmit.eu>\n"
@@ -29,13 +29,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -44,7 +44,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -52,20 +52,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Wichtige Anmerkung für NIS/YP-Benutzer!"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -75,7 +75,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -85,13 +85,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Alle MariaDB-Datenbanken entfernen?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -101,7 +101,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -113,13 +113,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Neues Passwort für den MariaDB »root«-Benutzer:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -129,25 +129,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr "Wenn dieses Feld freigelassen wird, wird das Passwort nicht geändert."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr "Wiederholen Sie das Passwort für den MariaDB-»root«-Benutzer:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Konnte für den MariaDB-»root«-Benutzer kein Passwort setzen"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -160,7 +160,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
"Sie sollten das Passwort des administrativen Benutzers nach der "
@@ -168,13 +168,13 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mariadb-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
"Für weitere Informationen lesen Sie /usr/share/doc/mariadb-server-5.1/README."
@@ -182,47 +182,14 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr "Passwort-Eingabefehler"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
"Die beiden von Ihnen eingegebenen Passwörter sind nicht identisch. Bitte "
"erneut versuchen."
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Möchten Sie wirklich eine ältere Version einspielen?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr ""
-#~ "Auf diesem System existiert eine Datei mit dem Namen /var/lib/mysql/"
-#~ "debian-*.flag"
-
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Diese Datei ist ein Hinweis darauf, dass früher ein MariaDB-Server-Paket "
-#~ "mit einer höheren Version installiert war."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Es kann nicht garantiert werden, dass die gegenwärtig zu installierende "
-#~ "Version dessen Daten benutzen kann."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Soll der MariaDB-Server automatisch beim Booten starten?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "Der MariaDB-Dienst kann entweder automatisch beim Systemstart oder "
-#~ "manuell durch Eingabe des Befehls »/etc/init.d/mysql start« gestartet "
-#~ "werden."
diff --git a/debian/po/es.po b/debian/po/es.po
index d44b29e5d5c..3760e4f30f8 100644
--- a/debian/po/es.po
+++ b/debian/po/es.po
@@ -40,7 +40,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1_5.0.24-3\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-05-28 22:21+0200\n"
"Last-Translator: Javier Fernández-Sanguino <jfs@debian.org>\n"
@@ -52,13 +52,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -67,7 +67,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -75,20 +75,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Nota importante para los usuarios de NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -96,7 +96,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -110,13 +110,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "¿Desea eliminar todas las bases de datos MariaDB?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -126,7 +126,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -138,13 +138,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Nueva contraseña para el usuario «root» de MariaDB:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -154,7 +154,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -162,7 +162,7 @@ msgstr "No se modificará la contraseña si deja el espacio en blanco."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for the MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -170,13 +170,13 @@ msgstr "Nueva contraseña para el usuario «root» de MariaDB:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "No se pudo fijar la contraseña para el usuario «root» de MariaDB"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -189,7 +189,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
"Debería comprobar la contraseña de la cuenta después de la instalación del "
@@ -197,193 +197,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Consulte /usr/share/doc/mariadb-server-10.3/README.Debian para más "
+"Consulte /usr/share/doc/mariadb-server-10.4/README.Debian para más "
"información."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "¿Desea realmente continuar con la desactualización?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr ""
-#~ "Existe un archivo con el nombre /var/lib/mysql/debian-*.flag en este "
-#~ "sistema."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Este fichero indica que se instaló previamente una versión superior del "
-#~ "paquete mariadb-server."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "No se puede garantizar que la versión que está instalando pueda usar la "
-#~ "base de datos actual."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "¿Debería ejecutarse el servidor MariaDB al iniciarse el sistema?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "El servidor MariaDB puede iniciarse en el momento de arranque del sistema "
-#~ "o manualmente si escribe la orden «/etc/init.d/mysql start»."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "Deben añadirse las siguientes entradas para usuarios y grupos en el "
-#~ "sistema para poder utilizar MariaDB:"
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "¡No se puede actualizar si ya hay tablas ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.1 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Las versiones recientes de MySQL ya no soportan el antiguo formato de "
-#~ "tabla ISAM. Antes de realizar la actualización es necesario convertir sus "
-#~ "tablas a por ejemplo, MyISAM, usando «mysql_convert_table_format» o "
-#~ "«ALTER TABLE x ENGINE=MyISAM». Se va a interrumpir ahora la instalación "
-#~ "de mysql-server-5.1. Si aún así su mysql-server-4.1 se elimina aún así, "
-#~ "puede reinstalarlo para convertir ese tipo de tablas."
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "¿Soportar las conexiones MySQL establecidadas desde sistemas que ejecutan "
-#~ "Debian Sarge o versiones anteriores?"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "No era muy segura la forma en la que se almacenaban las contraseñas en "
-#~ "versiones anteriores del cliente de MySQL en Debian. Este problema se ha "
-#~ "mejorado posteriormente con el inconveniente, sin embargo, de que "
-#~ "clientes (por ejemplo, PHP) en sistemas que ejecutan Debian 3.1 «Sarge» "
-#~ "no podrán conectarse a cuentas que son nuevas o a las que se le haya "
-#~ "cambiado la contraseña."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Para utilizar mysql debe instalar un usuario y grupo equivalente al "
-#~ "siguiente y asegurarse de que /var/lib/mysql tiene los permisos correctos "
-#~ "(los valores del «uid» y del «gid» pueden ser diferentes)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr ""
-#~ "¿Eliminar las bases de datos utilizadas por todas las versiones de MySQL?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr ""
-#~ "No se hará ningún cambio en la cuenta si no introduce una contraseña."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "Debería confirmar que la contraseña está correctamente protegida con una "
-#~ "contraseña cuando termine la instalación (consulte el fichero README."
-#~ "Debian si desea más información)."
-
-#~ msgid "Install Hints"
-#~ msgstr "Sugerencias para la instalación"
-
-#~ msgid ""
-#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
-#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
-#~ "have manually be restored."
-#~ msgstr ""
-#~ "Al actualizar a la versión de MySQL 3.23, la vrsión proporcionada en "
-#~ "Debian Woody, se eliminan de manera accidental, los enlaces simbólicos a "
-#~ "«/var/lib/mysql» o «/var/log/mysql» y tienen que restaurarse manualmente."
-
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "Sólo se instalará MySQL si tiene un nombre de equipo que no sea una "
-#~ "dirección IP y pueda resolverse a través del archivo /etc/hosts. Por "
-#~ "ejemplo, si la orden «hostname» devuelve «MiNombreEquipo» entonces deberá "
-#~ "existir una línea «10.0.0.1 MiNombreEquipo» en dicho archivo."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Se creará un nuevo usuario «debian-sys-maint». Esta cuenta de mysql se "
-#~ "utilizará en los scripts de inicio y parada y en los scripts «cron». No "
-#~ "la elimine."
-
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "¡Por favor, recuerde crear una CONTRASEÑA para el usuario «root» de "
-#~ "MySQL! ¡Si utiliza /root/.my.cnf debe escribir las líneas «user» y "
-#~ "«password» en dicho archivo, no incluya sólo la contraseña!"
-
-#~ msgid ""
-#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
-#~ "by all MySQL versions, not necessarily only the one you are about to "
-#~ "purge?"
-#~ msgstr ""
-#~ "¿Debería eliminar el árbol de directorio /var/lib/mysql completo? Tenga "
-#~ "en cuenta que lo utilizan todas las versiones de MySQL y no sólo la que "
-#~ "está a punto de purgar."
diff --git a/debian/po/eu.po b/debian/po/eu.po
index 91b7f1e341d..0e8b74da486 100644
--- a/debian/po/eu.po
+++ b/debian/po/eu.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: eu\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2009-07-29 11:59+0200\n"
"Last-Translator: Piarres Beobide <pi@beobide.net>\n"
@@ -20,13 +20,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -35,7 +35,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -43,20 +43,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "NIS/YP erabiltzaileentzat ohar garrantzitsua"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -64,7 +64,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -78,13 +78,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Ezabatu MariaDB datubase guztiak?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -93,7 +93,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -105,13 +105,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "MariaDB \"root\" erabiltzailearen pasahitz berria:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -121,7 +121,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -129,19 +129,19 @@ msgstr "Eremua hau zurian utziaz gero ez da pasahitza aldatuko."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr "Errepikatu MariaDB \"root\" erabiltzailearen pasahitza:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Ezin da MariaDB \"root\" erabiltzailearen pasahitza ezarri"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -153,74 +153,33 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
"Kontuaren pasahitza egiaztatu beharko zenuke paketea instalatu aurretik."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
-#| "Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+#| "Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Mesedez irakurri /usr/share/doc/mariadb-server-10.3/README.Debian fitxategia "
+"Mesedez irakurri /usr/share/doc/mariadb-server-10.4/README.Debian fitxategia "
"xehetasun gehiagorako."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr "Pasahitz sarrera errorea"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr "Idatzi dituzun bi pasahitzak ez dira berdina. Mesedez saiatu berriz."
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Benetan bertsio zaharragora itzuli nahi duzu?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "Sisteman badago /var/lib/mysql/debian-*.flag izeneko fitxategi bat."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Fitxategi honek aurretik bertsio berriagoko mysql-zerbitzari pakete bat "
-#~ "instalatu dela adierazten du."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Ezin da ziurtatu instalatzen ari zaren bertsio honek dauden datubaseak "
-#~ "erabili ahal izango dituenik."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Abioan MariaDB zerbitzaria abiarazi?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "Sistema abioan MariaDB automatikoki abiarazi daiteke edo eskuz '/etc/init."
-#~ "d/mysql start' eginaz."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "MariaDB erabili ahal izateko, hurrengo erabiltzaile eta taldeak gehitu "
-#~ "behar dira sisteman:"
diff --git a/debian/po/fr.po b/debian/po/fr.po
index 192d7de496e..ef91a14b334 100644
--- a/debian/po/fr.po
+++ b/debian/po/fr.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: fr\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2009-08-08 14:56+0200\n"
"Last-Translator: Christian Perrier <bubulle@debian.org>\n"
@@ -22,13 +22,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -37,7 +37,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -45,20 +45,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Note importante pour les utilisateurs NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -68,7 +68,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -78,13 +78,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Faut-il supprimer toutes les bases de données MariaDB ?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -94,7 +94,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -105,13 +105,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Nouveau mot de passe du superutilisateur de MariaDB :"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -121,26 +121,26 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr "Si ce champ est laissé vide, le mot de passe ne sera pas changé."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr "Confirmation du mot de passe du superutilisateur de MariaDB :"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr ""
"Impossible de changer le mot de passe de l'utilisateur « root » de MariaDB"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -152,7 +152,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
"Vous devriez vérifier le mot de passe de ce compte après l'installation du "
@@ -160,82 +160,28 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
-#| "Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+#| "Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Veuillez consulter le fichier /usr/share/doc/mysql-server-10.3/README.Debian "
+"Veuillez consulter le fichier /usr/share/doc/mysql-server-10.4/README.Debian "
"pour plus d'informations."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr "Erreur de saisie du mot de passe"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
"Le mot de passe et sa confirmation ne sont pas identiques. Veuillez "
"recommencer."
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Faut-il vraiment revenir à la version précédente ?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "Un fichier /var/lib/mysql/debian-*.flag est présent sur ce système."
-
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Cela indique qu'une version plus récente du paquet mariadb-server a été "
-#~ "précédemment installée."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Il n'est pas garanti que cette version puisse en utiliser les données."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Faut-il lancer MariaDB au démarrage ?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB peut être lancé soit au démarrage, soit en entrant la commande « /"
-#~ "etc/init.d/mysql start »."
-
-#~ msgid ""
-#~ "To use MySQL, the following entries for users and groups should be added "
-#~ "to the system:"
-#~ msgstr ""
-#~ "Pour pouvoir utiliser MySQL, les utilisateurs et les groupes suivants "
-#~ "doivent être ajoutés au système :"
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Gérer les connexions d'hôtes qui utilisent les versions Debian « sarge » "
-#~ "ou antérieures  ?"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "La méthode de stockage des mots de passe n'était pas très sûre dans les "
-#~ "version précédentes de ce paquet. Cette méthode a été améliorée mais les "
-#~ "modifications empêchent la connexion avec de nouveaux comptes ou des "
-#~ "comptes dont le mot de passe a été modifié, pour les clients (p. ex. PHP) "
-#~ "depuis des hôtes qui utilisent Debian 3.1 « sarge »."
diff --git a/debian/po/gl.po b/debian/po/gl.po
index cc17ee481a8..8ea79f2add5 100644
--- a/debian/po/gl.po
+++ b/debian/po/gl.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-04-20 09:44+0200\n"
"Last-Translator: Jacobo Tarrio <jtarrio@debian.org>\n"
@@ -17,13 +17,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -32,7 +32,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -40,20 +40,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Nota importante para os usuarios de NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -61,7 +61,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -75,13 +75,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "¿Eliminar tódalas bases de datos de MariaDB?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -91,7 +91,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -103,13 +103,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Novo contrasinal para o usuario \"root\" de MariaDB:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -119,7 +119,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -127,7 +127,7 @@ msgstr "Se deixa o campo en branco, non se ha cambiar o contrasinal."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for the MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -135,13 +135,13 @@ msgstr "Novo contrasinal para o usuario \"root\" de MariaDB:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Non se puido establecer o contrasinal do usuario \"root\" de MariaDB"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -153,7 +153,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "You should check the account's password after tha package installation."
@@ -162,85 +162,26 @@ msgstr "Debería comprobar o contrasinal da conta trala instalación do paquete.
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Consulte o ficheiro /usr/share/doc/mariadb-server-10.3/README.Debian para "
+"Consulte o ficheiro /usr/share/doc/mariadb-server-10.4/README.Debian para "
"máis información."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "¿Quere pasar a unha versión anterior?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "Neste sistema hai un ficheiro chamado /var/lib/mysql/debian-*.flag."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Este ficheiro indica que antes se instalou un paquete mariadb-server "
-#~ "cunha versión superior."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Non se pode garantir que a versión que está a instalar poida empregar as "
-#~ "bases de datos actuais."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "¿Iniciar o servidor MariaDB co ordenador?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "Pódese iniciar automaticamente o servidor MariaDB ao iniciar o ordenador, "
-#~ "ou manualmente coa orde \"/etc/init.d/mysql start\"."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "Para empregar MariaDB deberían engadirse ao sistema as seguintes entradas "
-#~ "de usuarios e grupos:"
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "¿Soportar as conexións a MySQL de máquinas que empreguen Debian \"sarge\" "
-#~ "ou anterior?"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "Nas versións antigas dos clientes MySQL de Debian, os contrasinais non se "
-#~ "armacenaban de xeito seguro. Isto mellorouse desde aquela; nembargantes, "
-#~ "os clientes (tales coma PHP) das máquinas que executen Debian 3.1 Sarge "
-#~ "non se han poder conectar a contas recentes ou a contas nas que se "
-#~ "cambiara o contrasinal."
diff --git a/debian/po/it.po b/debian/po/it.po
index d1761b879e4..d9b3fec0d49 100644
--- a/debian/po/it.po
+++ b/debian/po/it.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1 5.1.37 italian debconf templates\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2009-08-08 11:03+0200\n"
"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
@@ -18,13 +18,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -33,7 +33,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -41,20 +41,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Nota importante per gli utenti NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -64,7 +64,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -74,13 +74,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Eliminare tutti i database MariaDB?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -90,7 +90,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -102,13 +102,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Nuova password per l'utente «root» di MariaDB:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -118,25 +118,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr "Se questo campo è lasciato vuoto, la password non viene cambiata."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr "Ripetere la password per l'utente «root» di MariaDB:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Impossibile impostare la password per l'utente «root» di MariaDB"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -149,64 +149,33 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
"Al termine dell'installazione si deve verificare la password dell'account."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
-#| "Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+#| "Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
"Per maggiori informazioni si consulti il file /usr/share/doc/mariadb-"
-"server-10.3/README.Debian."
+"server-10.4/README.Debian."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr "Errore di inserimento della password"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr "Le due password inserite sono diverse. Riprovare."
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Procedere realmente con l'abbassamento di versione?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr ""
-#~ "Su questo sistema esiste un file con nome /var/lib/mysql/debian-*.flag."
-
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Quel file indica che in precedenza è stata installata una versione "
-#~ "superiore del pacchetto mariadb-server."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Non è garantito che la versione che si sta installando sia in grado di "
-#~ "usare i database presenti."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Lanciare il server MariaDB all'avvio?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "Il server MariaDB può essere lanciato automaticamente all'avvio del "
-#~ "sistema oppure manualmente con il comando «/etc/init.d/mysql start»."
diff --git a/debian/po/ja.po b/debian/po/ja.po
index 8ca7993a140..85ead48cccd 100644
--- a/debian/po/ja.po
+++ b/debian/po/ja.po
@@ -15,7 +15,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1 5.1.37-1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2009-09-01 08:25+0900\n"
"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
@@ -27,13 +27,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -42,7 +42,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -50,20 +50,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "NIS/YP ユーザã¸ã®é‡è¦ãªæ³¨æ„"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -73,7 +73,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -81,13 +81,13 @@ msgstr "/var/lib/mysql ã®æ‰€æœ‰è€…権é™ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹å¿…è¦ã‚‚ã‚ã‚Šã¾
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "ã™ã¹ã¦ã® MariaDB データベースを削除ã—ã¾ã™ã‹?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -97,7 +97,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -109,13 +109,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "MariaDB ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -125,25 +125,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr "ã“ã®å€¤ã‚’空ã®ã¾ã¾ã«ã—ã¦ãŠã„ãŸå ´åˆã¯ã€ãƒ‘スワードã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr "MariaDB ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "MariaDB ã® \"root\" ユーザã®ãƒ‘スワードを設定ã§ãã¾ã›ã‚“"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -155,64 +155,32 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
"パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å¾Œã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®ãƒ‘スワードを確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
-#| "Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+#| "Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"詳細㯠/usr/share/doc/mariadb-server-10.3/README.Debian ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
+"詳細㯠/usr/share/doc/mariadb-server-10.4/README.Debian ã‚’å‚ç…§ã—ã¦ãã ã•ã„。"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr "パスワード入力エラー"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr "入力ã•ã‚ŒãŸäºŒã¤ã®ãƒ‘スワードãŒä¸€è‡´ã—ã¾ã›ã‚“。å†å…¥åŠ›ã—ã¦ãã ã•ã„。"
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "本当ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã‹?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr ""
-#~ "ã“ã®ã‚·ã‚¹ãƒ†ãƒ ã«ã¯ /var/lib/mysql/debian-*.flag ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨"
-#~ "ã—ã¦ã„ã¾ã™ã€‚"
-
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ„味ã™ã‚‹ã®ã¯ã€ä»¥å‰ã«ã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® mariadb-server "
-#~ "パッケージãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚"
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ç¾åœ¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—よã†ã¨ã—ã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½¿ãˆã‚‹ã‹ã©ã†"
-#~ "ã‹ã¯ä¿è¨¼ã§ãã¾ã›ã‚“。"
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "MariaDB をシステム起動時ã«é–‹å§‹ã—ã¾ã™ã‹?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB ã®èµ·å‹•æ–¹æ³•ã«ã¤ã„ã¦ã€ã‚·ã‚¹ãƒ†ãƒ èµ·å‹•æ™‚ã«è‡ªå‹•çš„ã«é–‹å§‹ã™ã‚‹ã‹ã€ã‚ã‚‹ã„㯠"
-#~ "'/etc/init.d/mysql start' ã¨æ‰‹ã§å…¥åŠ›ã—ã¦èµ·å‹•ã™ã‚‹ã‹ã‚’é¸ã¹ã¾ã™ã€‚"
diff --git a/debian/po/nb.po b/debian/po/nb.po
index 06acfd8c25c..651f2f8ad5d 100644
--- a/debian/po/nb.po
+++ b/debian/po/nb.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql_nb\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-02-18 12:13+0100\n"
"Last-Translator: Bjørn Steensrud <bjornst@powertech.no>\n"
@@ -19,13 +19,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -34,7 +34,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -42,14 +42,14 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid "Important note for NIS/YP users!"
msgid "Important note for NIS/YP users"
@@ -57,7 +57,7 @@ msgstr "Viktig merknad for NIS/YP-brukere!"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -65,7 +65,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -73,13 +73,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -87,7 +87,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
#, fuzzy
#| msgid ""
#| "The script is about to remove the data directory /var/lib/mysql. If it is "
@@ -104,7 +104,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "New password for MySQL \"root\" user:"
msgid "New password for the MariaDB \"root\" user:"
@@ -112,7 +112,7 @@ msgstr "Nytt passord for MariaDBs «root»-bruker:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid ""
#| "It is highly recommended that you set a password for the MySQL "
@@ -126,13 +126,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -140,7 +140,7 @@ msgstr "Nytt passord for MariaDBs «root»-bruker:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid "Unable to set password for MySQL \"root\" user"
msgid "Unable to set password for the MariaDB \"root\" user"
@@ -148,7 +148,7 @@ msgstr "Klarer ikke angi passord for MariaDBs «root»-bruker"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "It seems an error occurred while setting the password for the MySQL "
@@ -167,122 +167,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#, fuzzy
-#~| msgid "Do you really want to downgrade?"
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Er du sikker på at du vil nedgradere?"
-
-#, fuzzy
-#~| msgid ""
-#~| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates "
-#~| "that a mysql-server package with a higher version has been installed "
-#~| "before. It can not be guaranteed that this version can use its data."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "ADVARSEL: Fila /var/lib/mysql/debian-*.flag finnes. Dette viser at en "
-#~ "mariadb-server-pakke med et høyere versjonsnummer har vært installert "
-#~ "før. Det kan ikke garanteres at denne versjonen kan bruke data fra den "
-#~ "høyere versjonen."
-
-#, fuzzy
-#~| msgid "Should MySQL start on boot?"
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Skal MariaDB startes ved maskinoppstart?"
-
-#, fuzzy
-#~| msgid ""
-#~| "The MySQL can start automatically on boot time or only if you manually "
-#~| "type '/etc/init.d/mysql start'."
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB kan startes automatisk når maskinen starter, eller bare hvis du "
-#~ "skriver «/etc/init.d/mysql start»."
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Skal MySQL-tilkoblinger støttes fra vertsmaskiner som kjører Debian "
-#~ "«sarge» eller eldre?"
-
-#, fuzzy
-#~| msgid ""
-#~| "The way passwords were stored was not very secure. This has been "
-#~| "improved with the drawback that clients (e.g. PHP) from hosts running "
-#~| "Debian 3.1 Sarge will not be able to connect to account which are new or "
-#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.1/"
-#~| "README.Debian."
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "Passord ble tidligere lagret på en lite sikker måte. Dette er nå "
-#~ "forbedret, med den ulempen at klienter (f.eks. PHP) fra verter som kjører "
-#~ "Debian 3.1 Sarge ikke vil kunne koble til en konto som er ny eller har "
-#~ "fått endret passordet. Se /usr/share/doc/mysql-server-5.1/README.Debian."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "For å bruke MySQL må du installere en bruker og gruppe tilsvarende den "
-#~ "nedenfor og se til at /var/lib/mysql har riktige rettigheter (uid/gid kan "
-#~ "være forskjellig)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr "Skal databasene brukt av alle MySQL-versjoner fjernes?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr ""
-#~ "Hvis du ikke oppgir et passord blir det ikke gjort noen endringer med "
-#~ "kontoen."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "Når installasjonen er ferdig bør det sjekkes at kontoen er ordentlig "
-#~ "beskyttet med et passord (mer informasjon finnes i README.Debian)."
diff --git a/debian/po/nl.po b/debian/po/nl.po
index 65112a9f0a0..7da4a752b4d 100644
--- a/debian/po/nl.po
+++ b/debian/po/nl.po
@@ -6,9 +6,9 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1 5.0.30-1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
-"PO-Revision-Date: 2006-02-19 10.30+0100\n"
+"PO-Revision-Date: 2006-02-19 10.40+0100\n"
"Last-Translator: Thijs Kinkhorst <thijs@debian.org>\n"
"Language-Team: Debian-Dutch <debian-l10n-dutch@lists.debian.org>\n"
"Language: \n"
@@ -18,13 +18,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -33,7 +33,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -41,14 +41,14 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid "Important note for NIS/YP users!"
msgid "Important note for NIS/YP users"
@@ -56,7 +56,7 @@ msgstr "Belangrijke opmerking voor gebruikers van NIS/YP!"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -64,7 +64,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -72,13 +72,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -86,7 +86,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
#, fuzzy
#| msgid ""
#| "The script is about to remove the data directory /var/lib/mysql. If it is "
@@ -104,7 +104,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "New password for MySQL \"root\" user:"
msgid "New password for the MariaDB \"root\" user:"
@@ -112,7 +112,7 @@ msgstr "Nieuw wachtwoord voor de MariaDB \"root\"-gebruiker:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid ""
#| "It is highly recommended that you set a password for the MySQL "
@@ -126,13 +126,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -140,7 +140,7 @@ msgstr "Nieuw wachtwoord voor de MariaDB \"root\"-gebruiker:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid "Unable to set password for MySQL \"root\" user"
msgid "Unable to set password for the MariaDB \"root\" user"
@@ -148,7 +148,7 @@ msgstr "Kan het wachtwoord voor de MariaDB \"root\"-gebruiker niet instellen"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "It seems an error occurred while setting the password for the MySQL "
@@ -167,125 +167,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#, fuzzy
-#~| msgid "Do you really want to downgrade?"
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Wilt u echt een oude versie herstellen?"
-
-#, fuzzy
-#~| msgid ""
-#~| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates "
-#~| "that a mysql-server package with a higher version has been installed "
-#~| "before. It can not be guaranteed that this version can use its data."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Waarschuwing: waarschijnlijk is een hogere versie van het mariadb-server "
-#~ "pakket geïnstalleerd geweest (het bestand /var/lib/mysql/debian-*.flag "
-#~ "bestaat). Er is geen garantie dat de gegevensbestanden, bewerkt met die "
-#~ "hogere versie, kunnen worden gebruikt met de versie van mysql die u nu "
-#~ "installeert."
-
-#, fuzzy
-#~| msgid "Should MySQL start on boot?"
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Moet MariaDB starten als de computer start?"
-
-#, fuzzy
-#~| msgid ""
-#~| "The MySQL can start automatically on boot time or only if you manually "
-#~| "type '/etc/init.d/mysql start'."
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB kan automatisch starten bij het starten van de computer, of "
-#~ "slechts wanneer u '/etc/init.d/mysql start' handmatig uitvoert."
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Moet u MySQL-verbindingen accepteren van computers die Debian \"sarge\" "
-#~ "of ouder draaien?"
-
-#, fuzzy
-#~| msgid ""
-#~| "The way passwords were stored was not very secure. This has been "
-#~| "improved with the drawback that clients (e.g. PHP) from hosts running "
-#~| "Debian 3.1 Sarge will not be able to connect to account which are new or "
-#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.1/"
-#~| "README.Debian."
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "De wijze waarop wachtwoorden werden bewaard was niet erg veilig. Dit is "
-#~ "verbeterd, maar helaas zullen programma's van computers die Debian 3.1 "
-#~ "Sarge draaien, geen verbinding meer kunnen maken met accounts die nieuw "
-#~ "zijn, of waarvan het wachtwoord is gewijzigd. Zie /usr/share/doc/mysql-"
-#~ "server-5.1/README.Debian."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Om mysql te gebruiken dient u een gebruiker en groep aan te maken, "
-#~ "gelijkwaardig aan onderstaand voorbeeld, en u dient ervoor te zorgen dat /"
-#~ "var/lib/mysql de bijbehorende toegangsrechten heeft (uid en gid mogen "
-#~ "anders zijn)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr "Databases verwijderen die door alle MySQL versies worden gebruikt?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr ""
-#~ "Indien u geen wachtwoord opgeeft zal het account niet worden gewijzigd."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "Wanneer de installatie klaar is, dient u te verifiëren dat het account "
-#~ "netjes beschermd is met een wachtwoord (zie README.Debian voor meer "
-#~ "informatie)."
diff --git a/debian/po/pt.po b/debian/po/pt.po
index 106802ee87b..b0150c1890f 100644
--- a/debian/po/pt.po
+++ b/debian/po/pt.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-05-05 21:01+0100\n"
"Last-Translator: Miguel Figueiredo <elmig@debianpt.org>\n"
@@ -18,13 +18,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -33,7 +33,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -41,20 +41,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Nota importante para utilizadores de NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -62,7 +62,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -75,13 +75,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Remover todas as bases de dados MariaDB?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -91,7 +91,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -103,13 +103,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Nova palavra-passe para o utilizador \"root\" do MariaDB:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -119,7 +119,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -128,7 +128,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for the MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -136,7 +136,7 @@ msgstr "Nova palavra-passe para o utilizador \"root\" do MariaDB:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr ""
"Não foi possível definir a palavra-passe para o utilizador \"root\" do "
@@ -144,7 +144,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -157,7 +157,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "You should check the account's password after tha package installation."
@@ -167,140 +167,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
"Para mais informação por favor leia o ficheiro /usr/share/doc/mariadb-"
-"server-10.3/README.Debian."
+"server-10.4/README.Debian."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Deseja mesmo fazer downgrade?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr ""
-#~ "Existe um ficheiro chamado /var/lib/mysql/debian-*.flag neste sistema."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Tal ficheiro significa que anteriormente foi instalado um pacote mariadb-"
-#~ "server com um número de versão superior."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Não existe nenhuma garantia que a versão que está actualmente a instalar "
-#~ "seja capaz de utilizar as bases de dados actuais."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Iniciar o servidor MariaDB no arranque?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "O MariaDB pode ser automaticamente lançado no arranque ou manualmente "
-#~ "através do comando '/etc/init.d/mysql start'."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "Para utilizar o MariaDB, têm de ser acrescentadas as seguintes entradas "
-#~ "para os utilizadores e grupos:"
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Não é possível actualizar se estiverem presentes tabelas ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.1 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "As versões recentes de MySQL já não podem utilizar o antigo formato de "
-#~ "tabelas ISAM e é por isso necessário converter as suas tabelas pra e.g. "
-#~ "MyISAM antes da actualização, utilizando \"mysql_convert_table_format\" "
-#~ "ou \"ALTER TABLE x ENGINE=MyISAM\". A instalação de mysql-server-5.1 irá "
-#~ "agora ser cancelada. Se o seu antigo mysql-server-4.1 for removido apenas "
-#~ "reinstale para converter essas tabelas."
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Suportar ligações MySQL de máquinas que corram Debian \"sarge\" ou mais "
-#~ "antigos?"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "Nas versões antigas de clientes de MySQL em Debian, as palavras-passe não "
-#~ "eram guardadas de forma segura. Isto foi melhorado desde aí, no entanto "
-#~ "os clientes (como o PHP) de máquinas que corram Debian 3.1 Sarge não irão "
-#~ "conseguir ligar-se a contas novas ou cuja palavra-passe foi alterada."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Para utilizar mysql e instalar um utilizador e grupo equivalentes para o "
-#~ "seguinte e assegurar-se que /var/lib/mysql têm as permissões correctas (o "
-#~ "uid/gid podem ser diferentes)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr "Remover as bases de dados utilizadas por todas as versões de MySQL?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr ""
-#~ "Se não disponibilizar uma password não serão feitas alterações nesta "
-#~ "conta."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "Quando terminar a instalação, deve verificar se a conta está devidamente "
-#~ "protegida com uma password (para mais informações veja README.Debian)."
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
index 5451f163a1e..001d4b4bd14 100644
--- a/debian/po/pt_BR.po
+++ b/debian/po/pt_BR.po
@@ -8,7 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2007-04-21 15:59-0300\n"
"Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
@@ -21,13 +21,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -36,7 +36,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -44,20 +44,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Aviso importante para usuários NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -65,7 +65,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid ""
#| "You should also check the permissions and the owner of the /var/lib/mysql "
@@ -78,13 +78,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Remover todas as bases de dados do MariaDB?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -94,7 +94,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -106,13 +106,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Nova senha para o usuário \"root\" do MariaDB:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -122,7 +122,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "If that field is left blank, the password will not be changed."
msgid "If this field is left blank, the password will not be changed."
@@ -130,7 +130,7 @@ msgstr "Caso este campo seja deixado em branco, a senha não sera mudada."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for the MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -138,13 +138,13 @@ msgstr "Nova senha para o usuário \"root\" do MariaDB:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Impossível definir senha para o usuário \"root\" do MariaDB"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -157,7 +157,7 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "You should check the account's password after tha package installation."
@@ -166,277 +166,26 @@ msgstr "Você deverá checar a senha dessa conta após a instalação deste paco
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Por favor, leia o arquivo /usr/share/doc/mariadb-server-10.3/README.Debian "
+"Por favor, leia o arquivo /usr/share/doc/mariadb-server-10.4/README.Debian "
"para maiores informações."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Realmente proceder com o rebaixamento de versão?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "Um arquivo de nome /var/lib/mysql/debian-*.flag existe no sistema."
-
-#, fuzzy
-#~| msgid ""
-#~| "Such file is an indication that a mariadb-server package with a higher "
-#~| "version has been installed earlier."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "A presença de um arquivo como este é uma indicação de que um pacote "
-#~ "mariadb-server com um número de versão mais alto já foi instalado "
-#~ "anteriormente."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Não há garantias de que a versão que você está instalando no momento "
-#~ "conseguirá utilizar as bases de dados existentes."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Iniciar o servidor MariaDB junto a inicialização da máquina?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "O servidor MariaDB pode ser iniciado automaticamente junto a "
-#~ "inicialização da máquina ou manualmente com o comando '/etc/init.d/mysql "
-#~ "start'."
-
-#~ msgid ""
-#~ "To use MariaDB, the following entries for users and groups should be "
-#~ "added to the system:"
-#~ msgstr ""
-#~ "Para utilizar o MariaDB, as seguintes entradas para usuários e grupos "
-#~ "devem ser adicionadas ao sistema:"
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Suportar conexões MySQL originadas de hosts executando o Debian \"sarge\" "
-#~ "ou mais antigos ?"
-
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "Em versões antigas dos clientes MySQL no Debian, as senhas não eram "
-#~ "armazenadas de forma segura. Isto foi corrigido desde então, porém, "
-#~ "clientes (como o PHP) em hosts executando o Debian 3.1 Sarge não serão "
-#~ "capazes de conectar em contas recentes ou contas as quais as senhas "
-#~ "tenham sido modificadas."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Para utilizar o MySQL, você deve instalar um usuário e um grupo "
-#~ "equivalentes ao usuário e grupo a seguir para se certificar de que o "
-#~ "diretório /var/lib/mysql possua as permissões correctas (o uid/gid podem "
-#~ "ser diferentes)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr "Remover as bases de dados utilizadas por todas as versões do MySQL?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr ""
-#~ "Caso você não forneça uma senha, nenhuma mudança será feita na conta."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "Quando a instalação finalizar, você deverá verificar se a conta está "
-#~ "apropriadamente protegida com uma senha (consulte o arquivo README.Debian "
-#~ "para maiores informações)."
-
-#~ msgid "internal"
-#~ msgstr "interno"
-
-#~ msgid "Only internally used."
-#~ msgstr "Somente utilizado internamente."
-
-#, fuzzy
-#~ msgid "Update Hints"
-#~ msgstr "Dicas de atualização"
-
-#, fuzzy
-#~ msgid ""
-#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
-#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
-#~ "script is not supposed to give any user more rights that he had before,"
-#~ msgstr ""
-#~ "Raramente, por exemplo, em novas versões maiores, o sistema de "
-#~ "privilégios é melhorado. Para fazer uso disso, o script "
-#~ "mysql_fix_privilege_tables deve ser executado manualmente. O script não "
-#~ "atribuirá a nenhum usuário mais direitos do que os mesmos já possuíam "
-#~ "anteriormente."
-
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Por favor, leia http://www.mysql.com/doc/en/Upgrade.html"
-
-#, fuzzy
-#~ msgid "Install Hints"
-#~ msgstr "Dicas de instalação"
-
-#, fuzzy
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "O MySQL será instalado somente caso você possua um nome de host NÃO "
-#~ "NUMÉRICO que possa ser resolvido através do arquivo /etc/hosts, ou seja, "
-#~ "caso o comando \"hostname\" retorne \"myhostname\", uma linha como "
-#~ "\"10.0.0.1 myhostname\" deverá existir no arquivo /etc/hosts."
-
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Um novo usuário MySQL de nome \"debian-sys-maint\" será criado. Essa "
-#~ "conta MySQL é utilizada pelos scripts de inicialização/parada e pelos "
-#~ "scripts cron. Não remova esse usuário."
-
-#, fuzzy
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Por favor, lembre-se de definir uma SENHA para o usuário root do MySQL ! "
-#~ "Caso você utilize um arquivo /root/.my.cnf, sempre inclua as linhas \"user"
-#~ "\" e \"password\" nesse arquivo, nunca somente a senha ! Consulte o "
-#~ "arquivo /usr/share/doc/mysql-server/README.Debian para mais informações."
-
-#~ msgid ""
-#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
-#~ "mysql-server package?"
-#~ msgstr ""
-#~ "Todas as base de dados sob o diretório /var/lib/mysql devem ser removidas "
-#~ "quando você remover o pacote pacote mysql-server ?"
-
-#~ msgid ""
-#~ "Networking is disabled by default for security reasons. You can enable it "
-#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
-#~ msgstr ""
-#~ "O suporte ao funcionamento em rede está desativado por padrão por "
-#~ "questões de segurança. Você poderá ativá-lo comentando a opção 'skip-"
-#~ "networking' no arquivo /etc/mysql/my.cnf."
-
-#~ msgid "security and update notice"
-#~ msgstr "aviso de segurança e actualização"
-
-#~ msgid ""
-#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
-#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
-#~ "remove everything including the configuration) somewhen? (default is not)"
-#~ msgstr ""
-#~ "Devo remover tudo abaixo de /var/lib/mysql quando fizer o purge do pacote "
-#~ "mysql-server com o comando \"dpkg --purge mysql-server\" (ou seja, "
-#~ "remover tudo incluíndo a configuração)? (o padrão é não remover)"
-
-#~ msgid "Make MySQL reachable via network?"
-#~ msgstr "Fazer com que o MySQL seja acessível via rede?"
-
-#~ msgid ""
-#~ "Should MySQL listen on a network reachable TCP port? This is not "
-#~ "necessary for use on a single computer and could be a security problem."
-#~ msgstr ""
-#~ "O MySQL deve aguardar ligações numa porta TCP acessível via rede? Isto "
-#~ "não é necessário para uso num único computador e pode ser um problema de "
-#~ "segurança."
-
-#~ msgid "Enable chroot mode?"
-#~ msgstr "Activar o modo chroot?"
-
-#~ msgid ""
-#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
-#~ "that users cannot modify any files outside this directory. This improves "
-#~ "resistence against crackers, too, as they are not able to modify system "
-#~ "files."
-#~ msgstr ""
-#~ "O MySQL é capaz de se prender no diretório /var/lib/mysql_jail, assim os "
-#~ "utilizadores não poderão modificar ficheiros fora deste directório. Isto "
-#~ "aumenta também a resistência contra crackers, pois eles não poderão "
-#~ "modificar arquivos de sistema."
-
-#~ msgid "Please run mysql_fix_privilege_tables !"
-#~ msgstr "Por favor execute mysql_fix_privilege_tables !"
-
-#~ msgid ""
-#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
-#~ "other than root and mysql with mysql."
-#~ msgstr ""
-#~ "Permissões seguras para o diretório /var/lib/mysql serão asseguradas "
-#~ "substituíndo GIDs diferentes de root e mysql por mysql."
-
-#~ msgid ""
-#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
-#~ msgstr ""
-#~ "Instruções sobre como activar o suporte de SSL estão disponíveis no "
-#~ "directório /usr/share/doc/mysql-server/."
-
-#, fuzzy
-#~ msgid "mysql_fix_privileges_tables should be executed"
-#~ msgstr "mysql_fix_privileges_tables será executado"
-
-#, fuzzy
-#~ msgid ""
-#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
-#~ "system. To make use of it, some new fields must be added to the tables "
-#~ "in the \"mysql\" database. This will not happen automatically."
-#~ msgstr ""
-#~ "As últimas versões do MySQL possuem um sistema de privilégios melhorado e "
-#~ "mais refinado. Para utilizá-lo, alguns novos campos devem ser adicionados "
-#~ "as tabelas na base de dados \"mysql\". Isto é feito pelo script "
-#~ "mysql_fix_privileges_tables durante esta actualização independente do "
-#~ "servidor estar a correr ou não !"
-
-#~ msgid ""
-#~ "This script is not supposed to give any user more rights that he had "
-#~ "before, if you encounter such a case, please contact me."
-#~ msgstr ""
-#~ "Este script não deverá fornecer mais direitos a um utilizador além dos "
-#~ "quais ele já possua anteriormente. SE encontrar um caso desses, por favor "
-#~ "entre em contacto com o mantainer deste pacote Debian."
diff --git a/debian/po/ro.po b/debian/po/ro.po
index ad2516da21e..b77bc30c1ed 100644
--- a/debian/po/ro.po
+++ b/debian/po/ro.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: po-debconf://mysql-dfsg\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2006-12-20 21:27+0200\n"
"Last-Translator: stan ioan-eugen <stan.ieugen@gmail.com>\n"
@@ -19,13 +19,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -34,7 +34,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -42,14 +42,14 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid "Important note for NIS/YP users!"
msgid "Important note for NIS/YP users"
@@ -57,7 +57,7 @@ msgstr "Notă importantă pentru utilizatorii NIS/YP!"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -65,7 +65,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -73,13 +73,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -87,7 +87,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
#, fuzzy
#| msgid ""
#| "The script is about to remove the data directory /var/lib/mysql. If it is "
@@ -104,7 +104,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid "New password for MySQL \"root\" user:"
msgid "New password for the MariaDB \"root\" user:"
@@ -112,7 +112,7 @@ msgstr "Noua parolă pentru utilizatorul „root†al MariaDB:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
#, fuzzy
#| msgid ""
#| "It is highly recommended that you set a password for the MySQL "
@@ -126,13 +126,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
#, fuzzy
#| msgid "New password for MySQL \"root\" user:"
msgid "Repeat password for the MariaDB \"root\" user:"
@@ -140,7 +140,7 @@ msgstr "Noua parolă pentru utilizatorul „root†al MariaDB:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid "Unable to set password for MySQL \"root\" user"
msgid "Unable to set password for the MariaDB \"root\" user"
@@ -148,7 +148,7 @@ msgstr "Nu s-a putut stabili parola pentru utilizatorul „root†al MariaDB"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
#| "It seems an error occurred while setting the password for the MySQL "
@@ -167,143 +167,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#, fuzzy
-#~| msgid "Do you really want to downgrade?"
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Sunteţi sigur că doriţi să instalaţi o versiune mai veche?"
-
-#, fuzzy
-#~| msgid ""
-#~| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates "
-#~| "that a mysql-server package with a higher version has been installed "
-#~| "before. It can not be guaranteed that this version can use its data."
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "AVERTISMENT: Fişierul /var/lib/mysql/debian-*.flag există. Acest lucru "
-#~ "indică faptul că anterior a fost instalată o versiune nouă a pachetului "
-#~ "mariadb-server. Nu se poate garanta că versiunea instalată acum poate "
-#~ "folosi datele versiunii instalate anterior."
-
-#, fuzzy
-#~| msgid "Should MySQL start on boot?"
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Doriţi ca MariaDB să pornească la initializarea sistemului?"
-
-#, fuzzy
-#~| msgid ""
-#~| "The MySQL can start automatically on boot time or only if you manually "
-#~| "type '/etc/init.d/mysql start'."
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB poate porni automat la iniţializarea sistemului sau doar dacă "
-#~ "rulaÅ£i comanda „/etc/init.d/mysql startâ€."
-
-#~ msgid "Cannot upgrade if ISAM tables are present!"
-#~ msgstr "Nu se poate face actualizarea dacă sunt prezente tabele ISAM!"
-
-#~ msgid ""
-#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
-#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
-#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
-#~ "The installation of mysql-server-5.1 will now abort. In case your old "
-#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
-#~ "those tables."
-#~ msgstr ""
-#~ "Versiunile recente MySQL nu mai pot folosi vechiul format de tabele ISAM "
-#~ "şieste necesar să convertiţi tabelele dumneavoastră de ex. la formatul "
-#~ "MyISAM înainte de a face actualizarea folosind comanda "
-#~ "„mysql_convert_table_format†sau „ALTER TABLE x ENGINE=MyISAMâ€. "
-#~ "Instalarea mysql-server-5.1 va eşua. În caz că ştergeţiversiunea "
-#~ "anterioară mysql-server-4.1 va trebui reinstalată pentru a converti "
-#~ "tabelele."
-
-#~ msgid ""
-#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?"
-#~ msgstr ""
-#~ "Suportaţi conexiuni MySQL de la staţii ce rulează sistemul Debian „sarge†"
-#~ "sau mai vechi?"
-
-#, fuzzy
-#~| msgid ""
-#~| "The way passwords were stored was not very secure. This has been "
-#~| "improved with the drawback that clients (e.g. PHP) from hosts running "
-#~| "Debian 3.1 Sarge will not be able to connect to account which are new or "
-#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.1/"
-#~| "README.Debian."
-#~ msgid ""
-#~ "In old versions of MySQL clients on Debian, passwords were not stored "
-#~ "securely. This has been improved since then, however clients (such as "
-#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to "
-#~ "recent accounts or accounts whose password have been changed."
-#~ msgstr ""
-#~ "Modul în care erau păstrate parolele nu era foarte sigur. Acest lucru a "
-#~ "fost îmbunătăţitcu dezajantajul că clienţii (de ex. PHP) de pe staţii ce "
-#~ "rulează sistemul Debian 3.1 Sargenu se vor putea conecta la conturi noi "
-#~ "sau ale căror parole au fost schimbate. Citiţi /usr/share/doc/mysql-"
-#~ "server-5.1/README.Debian."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Pentru a folosi mysql trebuie să adăugaţi un utilizator şi grup "
-#~ "echivalent şi să vă asiguraţi că /var/lib/mysql are permisiunile "
-#~ "stabilite corect (uid/gid pot aveavalori diferite)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd:\tmysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group:\tmysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql:\tdrwxr-xr-x\tmysql\tmysql"
-
-#~ msgid "Remove the databases used by all MySQL versions?"
-#~ msgstr "Doriţi să ştergeţi bazele de date folosite de toate versiune MySQL?"
-
-#~ msgid ""
-#~ "If you do not provide a password no changes will be made to the account."
-#~ msgstr ""
-#~ "Dacă nu introduceţi nici o parolă, nici o schimbare nu va fi luată în "
-#~ "considerare."
-
-#~ msgid ""
-#~ "When installation finishes, you should verify that the account is "
-#~ "properly protected with a password (see README.Debian for more "
-#~ "information)."
-#~ msgstr ""
-#~ "După finalizarea instalării, ar trebui să verificaţi dacă contul este "
-#~ "protejat cu o parolă (citiţi fişierul README.Debian pentru informaţii "
-#~ "suplimentare)."
diff --git a/debian/po/ru.po b/debian/po/ru.po
index 2c0bc7fee1f..00496bd1e06 100644
--- a/debian/po/ru.po
+++ b/debian/po/ru.po
@@ -17,7 +17,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1 5.1.37-1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2009-08-06 20:27+0400\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
@@ -32,13 +32,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -47,7 +47,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -55,20 +55,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Важное замечание Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ NIS/YP"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -78,7 +78,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -86,13 +86,13 @@ msgstr "Также проверьте права доÑтупа и владелÑ
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Удалить вÑе базы данных MariaDB?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -101,7 +101,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -113,13 +113,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Ðовый пароль Ð´Ð»Ñ MariaDB Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\":"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -129,25 +129,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr "ЕÑли оÑтавить поле пуÑтым, то пароль изменён не будет."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr "Повторите ввод Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ MariaDB Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\":"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Ðевозможно задать пароль MariaDB пользователю \"root\""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -159,61 +159,31 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr "Проверьте пароль учётной запиÑи поÑле уÑтановки пакета."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
-#| "Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+#| "Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"ПодробноÑти Ñм. в файле /usr/share/doc/mariadb-server-10.3/README.Debian."
+"ПодробноÑти Ñм. в файле /usr/share/doc/mariadb-server-10.4/README.Debian."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr "Ошибка ввода паролÑ"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr "Два введённых Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ одинаковы. Повторите ввод."
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "ДейÑтвительно уÑтановить более Ñтарую верÑию?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "Ð’ ÑиÑтеме найден файл /var/lib/mysql/debian-*.flag."
-
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "Это означает, что ранее уже был уÑтановлен пакет mariadb-server более "
-#~ "новой верÑии."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Ðет гарантий, что верÑиÑ, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑƒÑтанавливаетÑÑ ÑейчаÑ, будет ÑпоÑобна "
-#~ "работать Ñ Ð¸Ð¼ÐµÑŽÑ‰Ð¸Ð¼Ð¸ÑÑ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "ЗапуÑкать MariaDB при загрузке ÑиÑтемы?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "Сервер MariaDB можно запуÑкать автоматичеÑки при загрузке ÑиÑтемы или "
-#~ "вручную по команде '/etc/init.d/mysql start'."
diff --git a/debian/po/sv.po b/debian/po/sv.po
index ce830bd2319..46a64ff81fa 100644
--- a/debian/po/sv.po
+++ b/debian/po/sv.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-5.1 5.0.21-3\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2009-09-08 21:42+0100\n"
"Last-Translator: Martin Bagge <brother@bsnet.se>\n"
@@ -21,13 +21,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -36,7 +36,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -44,20 +44,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr "Viktig information för NIS/YP-användare"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -67,7 +67,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -77,13 +77,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr "Ta bort alla MariaDB-databaser?"
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -93,7 +93,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -105,13 +105,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr "Nytt lösenord för MariaDBs \"root\"-användare:"
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -121,25 +121,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr "Om detta fält lämnas tom kommer lösenordet inte att ändras."
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr "Repetera lösenordet för MariaDBs \"root\"-användare:"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr "Kunde inte sätta lösenord för MariaDBs \"root\"-användare"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -152,69 +152,32 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr "Du bör kontrollera kontots lösenord efter installationen av paketet."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
#, fuzzy
#| msgid ""
-#| "Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+#| "Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
#| "more information."
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
-"Läs filen /usr/share/doc/mariadb-server-10.3/README.Debian för mer "
+"Läs filen /usr/share/doc/mariadb-server-10.4/README.Debian för mer "
"information."
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr "Fel vid inmatning av lösenord"
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr "De två lösenorden du angav stämde inte överrens. Prova igen."
-
-#~ msgid "Really proceed with downgrade?"
-#~ msgstr "Vill du verkligen genomföra nedgraderingen?"
-
-#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
-#~ msgstr "En fil med namnet /var/lib/mysql/debian-*.flag hittades i systemet."
-
-#~ msgid ""
-#~ "Such a file is an indication that a mariadb-server package with a higher "
-#~ "version has been installed previously."
-#~ msgstr ""
-#~ "En sådan fil är en indikation på att paketet mariadb-server med ett högre "
-#~ "versionsnummer har installerats tidigare."
-
-#~ msgid ""
-#~ "There is no guarantee that the version you're currently installing will "
-#~ "be able to use the current databases."
-#~ msgstr ""
-#~ "Det finns ingen garanti för att den version som du håller på att "
-#~ "installera kommer att kunna använda de aktuella databaserna."
-
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "Ska MariaDB startas vid systemets uppstart?"
-
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB-servern kan startas vid systemets uppstart eller manuellt med "
-#~ "kommandot \"/etc/init.d/mysql start\"."
-
-#~ msgid ""
-#~ "To use MySQL, the following entries for users and groups should be added "
-#~ "to the system:"
-#~ msgstr ""
-#~ "För att använda MySQL måste följande användare och grupper läggas till i "
-#~ "systemet:"
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index b0e3ee82576..46a4487480e 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -6,8 +6,8 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: mariadb-10.3\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Project-Id-Version: mariadb-10.4\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -19,13 +19,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -34,7 +34,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -42,20 +42,20 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid "Important note for NIS/YP users"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -63,7 +63,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -71,13 +71,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -85,7 +85,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -94,13 +94,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -108,25 +108,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -135,26 +135,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
diff --git a/debian/po/tr.po b/debian/po/tr.po
index 9264cfcceb6..e62399f3b36 100644
--- a/debian/po/tr.po
+++ b/debian/po/tr.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: mariadb-10.3@packages.debian.org\n"
+"Report-Msgid-Bugs-To: mariadb-10.4@packages.debian.org\n"
"POT-Creation-Date: 2016-10-08 01:26+0300\n"
"PO-Revision-Date: 2004-06-05 08:53+0300\n"
"Last-Translator: Gürkan Aslan <gurkan@iaslan.com>\n"
@@ -18,13 +18,13 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid "The old data directory will be saved at new location"
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"A file named /var/lib/mysql/debian-*.flag exists on this system. The number "
"indicates a database binary format version that cannot automatically be "
@@ -33,7 +33,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Therefore the previous data directory will be renamed to /var/lib/mysql-* "
"and a new data directory will be initialized at /var/lib/mysql."
@@ -41,14 +41,14 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:2001
+#: ../mariadb-server-10.4.templates:2001
msgid ""
"Please manually export/import your data (e.g. with mysqldump) if needed."
msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
#, fuzzy
#| msgid "Important note for NIS/YP users!"
msgid "Important note for NIS/YP users"
@@ -56,7 +56,7 @@ msgstr "NIS/YP kullanıcıları için önemli not!"
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
"local system with:"
@@ -64,7 +64,7 @@ msgstr ""
#. Type: note
#. Description
-#: ../mariadb-server-10.3.templates:3001
+#: ../mariadb-server-10.4.templates:3001
msgid ""
"You should also check the permissions and ownership of the /var/lib/mysql "
"directory:"
@@ -72,13 +72,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid "Remove all MariaDB databases?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"The /var/lib/mysql directory which contains the MariaDB databases is about "
"to be removed."
@@ -86,7 +86,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mariadb-server-10.3.templates:4001
+#: ../mariadb-server-10.4.templates:4001
msgid ""
"If you're removing the MariaDB package in order to later install a more "
"recent version or if a different mariadb-server package is already using it, "
@@ -95,13 +95,13 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "New password for the MariaDB \"root\" user:"
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid ""
"While not mandatory, it is highly recommended that you set a password for "
"the MariaDB administrative \"root\" user."
@@ -109,25 +109,25 @@ msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:5001
+#: ../mariadb-server-10.4.templates:5001
msgid "If this field is left blank, the password will not be changed."
msgstr ""
#. Type: password
#. Description
-#: ../mariadb-server-10.3.templates:6001
+#: ../mariadb-server-10.4.templates:6001
msgid "Repeat password for the MariaDB \"root\" user:"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "Unable to set password for the MariaDB \"root\" user"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
"An error occurred while setting the password for the MariaDB administrative "
"user. This may have happened because the account already has a password, or "
@@ -136,188 +136,26 @@ msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid "You should check the account's password after the package installation."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:7001
+#: ../mariadb-server-10.4.templates:7001
msgid ""
-"Please read the /usr/share/doc/mariadb-server-10.3/README.Debian file for "
+"Please read the /usr/share/doc/mariadb-server-10.4/README.Debian file for "
"more information."
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
-#: ../mariadb-server-10.3.templates:8001
+#: ../mariadb-server-10.4.templates:8001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
-
-#, fuzzy
-#~| msgid "Should MySQL start on boot?"
-#~ msgid "Start the MariaDB server on boot?"
-#~ msgstr "MariaDB açılış sırasında başlatılsın mı?"
-
-#, fuzzy
-#~ msgid ""
-#~ "The MariaDB server can be launched automatically at boot time or manually "
-#~ "with the '/etc/init.d/mysql start' command."
-#~ msgstr ""
-#~ "MariaDB açılış sırasında veya '/etc/init.d/mysql start' komutunu vermeniz "
-#~ "halinde elle başlatılabilir. Eğer açılışta otomatik olarak başlatılmasını "
-#~ "istiyorsanız burada 'evet'i seçin."
-
-#~ msgid ""
-#~ "To use mysql you must install an equivalent user and group to the "
-#~ "following and ensure yourself that /var/lib/mysql has the right "
-#~ "permissions (the uid/gid may be different)."
-#~ msgstr ""
-#~ "Mysql'i kullanmak için aşağıdakiyle eşdeğer bir kullanıcı ve grup "
-#~ "tanımlamalı, ve /var/lib/mysql izinlerinin uygun şekilde ayarlandığından "
-#~ "emin olmalısınız (uid/gid farklı olabilir)."
-
-#~ msgid ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-#~ msgstr ""
-#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
-
-#~ msgid "/etc/group: mysql:x:101:"
-#~ msgstr "/etc/group: mysql:x:101:"
-
-#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql"
-#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql"
-
-#, fuzzy
-#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
-#~ msgstr "Lütfen http://www.mysql.com/doc/en/Upgrade.html belgesini okuyun"
-
-#, fuzzy
-#~ msgid ""
-#~ "MySQL will only install if you have a non-numeric hostname that is "
-#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
-#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
-#~ "myhostname\"."
-#~ msgstr ""
-#~ "MySQL sadece /etc/hosts dosyası yoluyla çözülebilir NUMERİK OLMAYAN bir "
-#~ "makine adına sahipseniz kurulacaktır. Örneğin, eğer \"hostname\" komutu "
-#~ "\"makinem\" ismini döndürüyorsa, bu dosya içinde \"10.0.0.1 makinem\" "
-#~ "gibi bir satır olmalıdır."
-
-#, fuzzy
-#~ msgid ""
-#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
-#~ "is used in the start/stop and cron scripts. Don't delete."
-#~ msgstr ""
-#~ "Yeni mysql kullanıcısı \"debian-sys-maint\" yaratılacak. Bu hesap, "
-#~ "başlangıç betiklerinde ve cron içinde kullanılıyor. Bu hesabı silmeyin."
-
-#, fuzzy
-#~ msgid ""
-#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
-#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
-#~ "there, never only the password!"
-#~ msgstr ""
-#~ "Lütfen MySQL root kullanıcısı için bir PAROLA girmeyi unutmayın! Eğer /"
-#~ "root/.my.cnf kullanıyorsanız, \"user\" ve \"password\" satırlarını her "
-#~ "zaman buraya ekleyin, sadece parolayı değil! Daha fazla bilgi için /usr/"
-#~ "share/doc/mysql-server/README.Debian dosyasını okuyun."
-
-#, fuzzy
-#~ msgid ""
-#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
-#~ "mysql-server package?"
-#~ msgstr ""
-#~ "mysql-server paketi kaldırıldıktan sonra bütün veritabanları silinsin mi?"
-
-#~ msgid ""
-#~ "Networking is disabled by default for security reasons. You can enable it "
-#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
-#~ msgstr ""
-#~ "Ağ, öntanımlı olarak güvenlik gerekçeleriyle devre dışı bırakıldı. Bu "
-#~ "özelliği /etc/mysql/my.cnf dosyası içindeki \"skip-networking\" "
-#~ "seçeneğini kaldırarak etkinleştirebilirsiniz."
-
-#~ msgid "security and update notice"
-#~ msgstr "güvenlik ve güncelleme duyurusu"
-
-#~ msgid ""
-#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
-#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
-#~ "remove everything including the configuration) somewhen? (default is not)"
-#~ msgstr ""
-#~ "mysql-server paketini temizlemek için \"dpkg --purge mysql-server\" "
-#~ "komutunu kullandığınızda (yani yapılandırma dahil herşeyi silmek) /var/"
-#~ "lib/mysql altındaki herşeyi sileyim mi? (öntanımlı cevap hayır'dır)."
-
-#~ msgid "Please run mysql_fix_privilege_tables !"
-#~ msgstr "Lütfen mysql_fix_privilege_tables komutunu çalıştırın!"
-
-#~ msgid ""
-#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
-#~ "other than root and mysql with mysql."
-#~ msgstr ""
-#~ "/var/lib/mysql'in izinlerinin güvenli olmasını sağlamak amacıyla, buna "
-#~ "ait GID'leri root ve mysql'den farklı olacak şekilde değiştireceğim."
-
-#~ msgid ""
-#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
-#~ msgstr ""
-#~ "SSL desteğini nasıl etkinleştirebileceğinize ilişkin talimatlar /usr/"
-#~ "share/doc/mysql-server/ içinde."
-
-#~ msgid "mysql_fix_privileges_tables will be executed"
-#~ msgstr "mysql_fix_privileges_tables çalıştırılacak"
-
-#~ msgid ""
-#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
-#~ "system. To make use of it, some new fields must be added to the tables "
-#~ "in the \"mysql\" database. This is done by the "
-#~ "mysql_fix_privilege_tables script during this upgrade regardless of if "
-#~ "the server is currently running or not!"
-#~ msgstr ""
-#~ "En son MySQL sürümleri zenginleştirilmiş, daha ayrıntılandırılmış bir "
-#~ "ayrıcalık (privilege) sistemine sahiptir. Yeni sistemi kullanmak için, "
-#~ "\"mysql\" veritabanındaki tablolara bazı yeni alanlar eklenmelidir. Bu "
-#~ "işlem, sunucunun çalışıp çalışmamasına bağlı olmaksızın "
-#~ "mysql_fix_privilege_tables betiği tarafından bu yükseltme sırasında "
-#~ "yapılır."
-
-#~ msgid ""
-#~ "This script is not supposed to give any user more rights that he had "
-#~ "before, if you encounter such a case, please contact me."
-#~ msgstr ""
-#~ "Bu betiğin hiç bir kullanıcıya öncekinden daha fazla hak kazandırmadığı "
-#~ "varsayılıyor. Eğer bunun aksinde bir durumla karşılaşırsanız, lütfen "
-#~ "benimle bağlantıya geçin."
-
-#~ msgid "Make MySQL reachable via network?"
-#~ msgstr "MySQL network üzerinden ulaşılabilir olsun mu?"
-
-#~ msgid ""
-#~ "Should MySQL listen on a network reachable TCP port? This is not "
-#~ "necessary for use on a single computer and could be a security problem."
-#~ msgstr ""
-#~ "MySQL ağ üzerinde ulaşılabilen bir TCP portunu dinlesin mi? Tek olan bir "
-#~ "bilgisayar için bu ayar gerekli değildir ve bir güvenlik sorunu "
-#~ "oluÅŸturabilir."
-
-#~ msgid "Enable chroot mode?"
-#~ msgstr "chroot kipi etkinleÅŸtirilsin mi?"
-
-#~ msgid ""
-#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
-#~ "that users cannot modify any files outside this directory. This improves "
-#~ "resistence against crackers, too, as they are not able to modify system "
-#~ "files."
-#~ msgstr ""
-#~ "MySQL kendini /var/lib/mysql_jail dizinine hapsederek kullanıcıların bu "
-#~ "dizin dışındaki hiç bir dosyayı değiştirmemesini sağlayabilir. Bu "
-#~ "düzenleme, sistem dosyalarını değiştirmelerini engelleyeceğinden, "
-#~ "cracker'lara karşı dayanıklılığı arttırır."
diff --git a/debian/rules b/debian/rules
index 6c46c2f4670..c7862141c71 100755
--- a/debian/rules
+++ b/debian/rules
@@ -113,8 +113,8 @@ override_dh_auto_install:
ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS)))
# Copy systemd files to a location available for dh_installinit
- cp $(BUILDDIR)/support-files/mariadb.service debian/mariadb-server-10.3.mariadb.service
- cp $(BUILDDIR)/support-files/mariadb@.service debian/mariadb-server-10.3.mariadb@.service
+ cp $(BUILDDIR)/support-files/mariadb.service debian/mariadb-server-10.4.mariadb.service
+ cp $(BUILDDIR)/support-files/mariadb@.service debian/mariadb-server-10.4.mariadb@.service
endif
# Run 'make install' without output since it is uninteresting and
@@ -132,12 +132,12 @@ endif
# nm numeric soft is not enough, therefore extra sort in command
# to satisfy Debian reproducible build requirements
- nm --defined-only $(BUILDDIR)/sql/mysqld | LC_ALL=C sort | gzip -n -9 > $(TMP)/usr/share/doc/mariadb-server-10.3/mysqld.sym.gz
+ nm --defined-only $(BUILDDIR)/sql/mysqld | LC_ALL=C sort | gzip -n -9 > $(TMP)/usr/share/doc/mariadb-server-10.4/mysqld.sym.gz
# rename and install AppArmor profile
install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld
# install Apport hook
- install -D -m 644 debian/mariadb-server-10.3.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.3.py
+ install -D -m 644 debian/mariadb-server-10.4.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.4.py
# Install libmariadbclient18 compatibility links
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so
@@ -148,6 +148,10 @@ endif
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.19
ln -s libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.20
+override_dh_fixperms:
+ dh_fixperms
+ chmod 04755 debian/mariadb-server-10.4/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool
+ chmod 0700 debian/mariadb-server-10.4/usr/lib/mysql/plugin/auth_pam_tool_dir
override_dh_installlogrotate-arch:
dh_installlogrotate --name mysql-server
@@ -159,15 +163,12 @@ override_dh_systemd_enable:
# Start mysql at sequence number 19 before 20 where apache, proftpd etc gets
# started which might depend on a running database server.
override_dh_installinit-arch:
- dh_installinit --name=mysql -- defaults 19 21
+ #dh_installinit --name=mysql -- defaults 19 21
dh_systemd_start --restart-after-upgrade
override_dh_installcron-arch:
dh_installcron --name mysql-server
-get-orig-source:
- uscan --force-download --verbose
-
# If a file is not supposed to be included anywhere, add it to the not-installed
# file and document the reason. Note that dh_install supports the above mentioned
# white list file only starting from Debian Stretch and Ubuntu Xenial.
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index 5a6bc0986f6..2fc56ce5e98 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -72,9 +72,6 @@ IF(WITH_INNOBASE_STORAGE_ENGINE)
# We use the InnoDB code directly in case the code changes.
ADD_DEFINITIONS("-DUNIV_INNOCHECKSUM")
- IF(WITH_INNODB_BUG_ENDIAN_CRC32)
- ADD_DEFINITIONS(-DINNODB_BUG_ENDIAN_CRC32)
- ENDIF()
# Avoid generating Hardware Capabilities due to crc32 instructions
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
diff --git a/extra/aws_sdk/CMakeLists.txt b/extra/aws_sdk/CMakeLists.txt
new file mode 100644
index 00000000000..7c4b8d8195c
--- /dev/null
+++ b/extra/aws_sdk/CMakeLists.txt
@@ -0,0 +1,74 @@
+OPTION(AWS_SDK_EXTERNAL_PROJECT "Allow to download and build AWS C++ SDK" OFF)
+INCLUDE(aws_sdk)
+INCLUDE(ExternalProject)
+
+GET_PROPERTY(SDK_LIBS GLOBAL PROPERTY AWS_SDK_LIBS)
+LIST(LENGTH SDK_LIBS SDK_LIBS_COUNT)
+IF(SDK_LIBS_COUNT EQUAL 0)
+ RETURN()
+ENDIF()
+
+CHECK_AWS_SDK(RETVAL REASON)
+IF(NOT RETVAL)
+ MESSAGE(FATAL_ERROR
+ "AWS C++ will not be built (${REASON}), but dependency on following components is found ${SDK_LIBS}.
+ Use CHECK_AWS_SDK() function before trying to build with SDK components")
+ENDIF()
+
+
+SET(byproducts)
+
+FOREACH(lib ${SDK_LIBS} core)
+ SET(lib aws-cpp-sdk-${lib})
+ ADD_LIBRARY(${lib} STATIC IMPORTED GLOBAL)
+ ADD_DEPENDENCIES(${lib} aws_sdk_cpp)
+
+ SET (loc "${CMAKE_CURRENT_BINARY_DIR}/aws_sdk_cpp/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ IF(CMAKE_VERSION VERSION_GREATER "3.1")
+ SET(byproducts ${byproducts} BUILD_BYPRODUCTS ${loc})
+ ENDIF()
+ SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION ${loc})
+ENDFOREACH()
+
+# To be compatible with older cmake, we use older version of the SDK
+IF(CMAKE_VERSION LESS "3.0")
+ SET(GIT_TAG "1.0.8")
+ELSE()
+ SET(GIT_TAG "1.8.29")
+ENDIF()
+
+IF(MSVC_CRT_TYPE MATCHES "/MD")
+ SET(FORCE_SHARED_CRT ON)
+ELSE()
+ SET(FORCE_SHARED_CRT OFF)
+ENDIF()
+
+LIST(REMOVE_DUPLICATES SDK_LIBS)
+STRING( REPLACE ";" "!" SDK_LIBS_STR "${SDK_LIBS}")
+#MESSAGE("SDK_LIBS_STR=${SDK_LIBS_STR}")
+
+ExternalProject_Add(
+ aws_sdk_cpp
+ GIT_REPOSITORY "https://github.com/awslabs/aws-sdk-cpp.git"
+ GIT_TAG ${GIT_TAG}
+ UPDATE_COMMAND ""
+ SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp"
+ LIST_SEPARATOR !
+ ${byproducts}
+ CMAKE_ARGS
+ -DBUILD_ONLY=${SDK_LIBS_STR}
+ -DBUILD_SHARED_LIBS=OFF
+ -DFORCE_SHARED_CRT=${FORCE_SHARED_CRT}
+ -DENABLE_TESTING=OFF
+ "-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} ${PIC_FLAG}"
+ "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${PIC_FLAG}"
+ "-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} ${PIC_FLAG}"
+ "-DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL} ${PIC_FLAG}"
+ "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
+ "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
+ ${EXTRA_SDK_CMAKE_FLAGS}
+ -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/aws_sdk_cpp
+ -DCMAKE_INSTALL_LIBDIR=lib
+ TEST_COMMAND ""
+)
+SET_TARGET_PROPERTIES(aws_sdk_cpp PROPERTIES EXCLUDE_FROM_ALL TRUE)
diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc
index 3169b647ea2..7252d008ea7 100644
--- a/extra/innochecksum.cc
+++ b/extra/innochecksum.cc
@@ -42,30 +42,12 @@
/* Only parts of these files are included from the InnoDB codebase.
The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
-typedef void fil_space_t;
-
-#include "page0size.h"
-
-#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
-#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)
-#define FSEG_PAGE_DATA FIL_PAGE_DATA
-#define FSEG_HEADER_SIZE 10
-#define UT_BITS_IN_BYTES(b) (((b) + 7) / 8)
-
-#include "ut0ut.h"
-#include "ut0byte.h"
-#include "mtr0types.h"
#include "mach0data.h"
-#include "fsp0types.h"
-#include "rem0rec.h"
+#include "page0page.h"
#include "buf0checksum.h" /* buf_calc_page_*() */
#include "buf0buf.h" /* buf_page_is_corrupted */
-#include "fil0fil.h" /* FIL_* */
-#include "page0page.h" /* PAGE_* */
#include "page0zip.h" /* page_zip_*() */
#include "trx0undo.h" /* TRX_* */
-#include "fsp0fsp.h" /* fsp_flags_get_page_size() &
- fsp_flags_get_zip_size() */
#include "ut0crc32.h" /* ut_crc32_init() */
#include "fsp0pagecompress.h" /* fil_get_compression_alg_name */
#include "fil0crypt.h" /* fil_space_verify_crypt_checksum */
@@ -95,10 +77,8 @@ static my_bool per_page_details;
static ulint n_merge;
extern ulong srv_checksum_algorithm;
static ulint physical_page_size; /* Page size in bytes on disk. */
-static ulint logical_page_size; /* Page size when uncompressed. */
ulong srv_page_size;
ulong srv_page_size_shift;
-page_size_t univ_page_size(0, 0, false);
/* Current page number (0 based). */
uint32_t cur_page_num;
/* Current space. */
@@ -299,29 +279,29 @@ void print_leaf_stats(
}
}
-/** Get the page size of the filespace from the filespace header.
-@param[in] buf buffer used to read the page.
-@return page size */
-static
-const page_size_t
-get_page_size(
- byte* buf)
+/** Init the page size for the tablespace.
+@param[in] buf buffer used to read the page */
+static void init_page_size(const byte* buf)
{
const unsigned flags = mach_read_from_4(buf + FIL_PAGE_DATA
+ FSP_SPACE_FLAGS);
+ if (fil_space_t::full_crc32(flags)) {
+ const ulong ssize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags);
+ srv_page_size_shift = UNIV_ZIP_SIZE_SHIFT_MIN - 1 + ssize;
+ srv_page_size = 512U << ssize;
+ physical_page_size = srv_page_size;
+ return;
+ }
+
const ulong ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
srv_page_size_shift = ssize
? UNIV_ZIP_SIZE_SHIFT_MIN - 1 + ssize
: UNIV_PAGE_SIZE_SHIFT_ORIG;
- srv_page_size = 1U << srv_page_size_shift;
-
- univ_page_size.copy_from(
- page_size_t(srv_page_size, srv_page_size, false));
-
- return(page_size_t(flags));
+ srv_page_size = fil_space_t::logical_size(flags);
+ physical_page_size = fil_space_t::physical_size(flags);
}
#ifdef _WIN32
@@ -474,19 +454,16 @@ static bool is_page_all_zeroes(
/** Check if page is corrupted or not.
@param[in] buf page frame
-@param[in] page_size page size
@param[in] is_encrypted true if page0 contained cryp_data
with crypt_scheme encrypted
-@param[in] is_compressed true if page0 fsp_flags contained
- page compression flag
+@param[in] flags tablespace flags
@retval true if page is corrupted otherwise false. */
static
bool
is_page_corrupted(
- byte* buf,
- const page_size_t& page_size,
- bool is_encrypted,
- bool is_compressed)
+ byte* buf,
+ bool is_encrypted,
+ ulint flags)
{
/* enable if page is corrupted. */
@@ -495,15 +472,20 @@ is_page_corrupted(
uint32_t logseq;
uint32_t logseqfield;
ulint page_type = mach_read_from_2(buf+FIL_PAGE_TYPE);
- uint32_t key_version = mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+ uint32_t key_version = buf_page_get_key_version(buf, flags);
uint32_t space_id = mach_read_from_4(
buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+ ulint zip_size = fil_space_t::zip_size(flags);
+ ulint is_compressed = fil_space_t::is_compressed(flags);
+ const bool use_full_crc32 = fil_space_t::full_crc32(flags);
if (mach_read_from_4(buf + FIL_PAGE_OFFSET) != cur_page_num
- || space_id != cur_space) {
+ || (space_id != cur_space
+ && (!use_full_crc32 || (!is_encrypted && !is_compressed)))) {
/* On pages that are not all zero, the page number
must match. */
- if (is_page_all_zeroes(buf, page_size.physical())) {
+ if (is_page_all_zeroes(buf,
+ fil_space_t::physical_size(flags))) {
return false;
}
@@ -527,13 +509,15 @@ is_page_corrupted(
return (false);
}
- if (page_size.is_compressed()) {
+ if (!zip_size && (!is_compressed || !use_full_crc32)) {
/* check the stored log sequence numbers
for uncompressed tablespace. */
logseq = mach_read_from_4(buf + FIL_PAGE_LSN + 4);
- logseqfield = mach_read_from_4(
- buf + page_size.logical() -
- FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
+ logseqfield = use_full_crc32
+ ? mach_read_from_4(buf + srv_page_size
+ - FIL_PAGE_FCRC32_END_LSN)
+ : mach_read_from_4(buf + srv_page_size
+ - FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
if (is_log_enabled) {
fprintf(log_file,
@@ -562,25 +546,23 @@ is_page_corrupted(
so if crypt checksum does not match we verify checksum using
normal method. */
if (is_encrypted && key_version != 0) {
- is_corrupted = !fil_space_verify_crypt_checksum(buf,
- page_size);
+ is_corrupted = use_full_crc32
+ ? buf_page_is_corrupted(true, buf, flags)
+ : !fil_space_verify_crypt_checksum(buf, zip_size);
+
if (is_corrupted && log_file) {
fprintf(log_file,
"[page id: space=" UINT32PF
", page_number=" UINT32PF "] may be corrupted;"
" key_version=" UINT32PF "\n",
- space_id, cur_page_num,
- mach_read_from_4(
- FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
- + buf));
+ space_id, cur_page_num, key_version);
}
} else {
is_corrupted = true;
}
if (is_corrupted) {
- is_corrupted = buf_page_is_corrupted(
- true, buf, page_size, NULL);
+ is_corrupted = buf_page_is_corrupted(true, buf, flags);
}
return(is_corrupted);
@@ -632,19 +614,13 @@ is_page_empty(
/********************************************************************//**
Rewrite the checksum for the page.
@param [in/out] page page buffer
-@param [in] physical_page_size page size in bytes on disk.
-@param [in] iscompressed Is compressed/Uncompressed Page.
+@param [in] flags tablespace flags
@retval true : do rewrite
@retval false : skip the rewrite as checksum stored match with
calculated or page is doublwrite buffer.
*/
-
-bool
-update_checksum(
- byte* page,
- ulong physical_page_size,
- bool iscompressed)
+static bool update_checksum(byte* page, ulint flags)
{
ib_uint32_t checksum = 0;
byte stored1[4]; /* get FIL_PAGE_SPACE_OR_CHKSUM field checksum */
@@ -656,6 +632,9 @@ update_checksum(
return (false);
}
+ const bool use_full_crc32 = fil_space_t::full_crc32(flags);
+ const bool iscompressed = fil_space_t::zip_size(flags);
+
memcpy(stored1, page + FIL_PAGE_SPACE_OR_CHKSUM, 4);
memcpy(stored2, page + physical_page_size -
FIL_PAGE_END_LSN_OLD_CHKSUM, 4);
@@ -683,12 +662,26 @@ update_checksum(
" " UINT32PF "\n", cur_page_num, checksum);
}
+ } else if (use_full_crc32) {
+ ulint payload = buf_page_full_crc32_size(page, NULL, NULL)
+ - FIL_PAGE_FCRC32_CHECKSUM;
+ checksum = ut_crc32(page, payload);
+ byte* c = page + payload;
+ if (mach_read_from_4(c) == checksum) return false;
+ mach_write_to_4(c, checksum);
+ if (is_log_enabled) {
+ fprintf(log_file, "page::" UINT32PF "; Updated checksum"
+ " = %u\n", cur_page_num, checksum);
+ }
+ return true;
} else {
/* page is uncompressed. */
/* Store the new formula checksum */
switch ((srv_checksum_algorithm_t) write_check) {
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
checksum = buf_calc_page_crc32(page);
@@ -704,6 +697,7 @@ update_checksum(
case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
checksum = BUF_NO_CHECKSUM_MAGIC;
break;
+
/* no default so the compiler will emit a warning if new
enum is added and not handled here */
}
@@ -757,10 +751,8 @@ func_exit:
@param[in,out] file file pointer where content
have to be written
@param[in] buf file buffer read
-@param[in] compressed Enabled if tablespace is
- compressed.
+@param[in] flags tablespace flags
@param[in,out] pos current file position.
-@param[in] page_size page size in bytes on disk.
@retval true if successfully written
@retval false if a non-recoverable error occurred
@@ -771,13 +763,12 @@ write_file(
const char* filename,
FILE* file,
byte* buf,
- bool compressed,
- fpos_t* pos,
- ulong page_size)
+ ulint flags,
+ fpos_t* pos)
{
bool do_update;
- do_update = update_checksum(buf, page_size, compressed);
+ do_update = update_checksum(buf, flags);
if (file != stdin) {
if (do_update) {
@@ -797,9 +788,11 @@ write_file(
}
}
- if (page_size
- != fwrite(buf, 1, page_size, file == stdin ? stdout : file)) {
- fprintf(stderr, "Failed to write page::" UINT32PF " to %s: %s\n",
+ if (physical_page_size
+ != fwrite(buf, 1, physical_page_size,
+ file == stdin ? stdout : file)) {
+ fprintf(stderr,
+ "Failed to write page::" UINT32PF " to %s: %s\n",
cur_page_num, filename, strerror(errno));
return(false);
@@ -817,12 +810,12 @@ write_file(
}
// checks using current xdes page whether the page is free
-static inline bool is_page_free(const byte *xdes, page_size_t page_size,
+static inline bool is_page_free(const byte *xdes, ulint physical_page_size,
uint32_t page_no)
{
const byte *des=
xdes + XDES_ARR_OFFSET +
- XDES_SIZE * ((page_no & (page_size.physical() - 1)) / FSP_EXTENT_SIZE);
+ XDES_SIZE * ((page_no & (physical_page_size - 1)) / FSP_EXTENT_SIZE);
return xdes_get_bit(des, XDES_FREE_BIT, page_no % FSP_EXTENT_SIZE);
}
@@ -831,7 +824,6 @@ Parse the page and collect/dump the information about page type
@param [in] page buffer page
@param [out] xdes extend descriptor page
@param [in] file file for diagnosis.
-@param [in] page_size page_size
@param [in] is_encrypted tablespace is encrypted
*/
void
@@ -839,7 +831,6 @@ parse_page(
const byte* page,
byte* xdes,
FILE* file,
- const page_size_t& page_size,
bool is_encrypted)
{
unsigned long long id;
@@ -896,8 +887,7 @@ parse_page(
}
size_range_id = (data_bytes * SIZE_RANGES_FOR_PAGE
- + page_size.logical() - 1) /
- page_size.logical();
+ + srv_page_size - 1) / srv_page_size;
if (size_range_id > SIZE_RANGES_FOR_PAGE + 1) {
/* data_bytes is bigger than logical_page_size */
@@ -910,7 +900,8 @@ parse_page(
/* update per-index statistics */
{
per_index_stats &index = index_ids[id];
- if (is_page_free(xdes, page_size, page_no)) {
+ if (is_page_free(xdes, physical_page_size,
+ page_no)) {
index.free_pages++;
return;
}
@@ -1366,6 +1357,13 @@ innochecksum_get_one_option(
srv_checksum_algorithm =
SRV_CHECKSUM_ALGORITHM_STRICT_NONE;
break;
+
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ srv_checksum_algorithm =
+ SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32;
+ break;
+
default:
return(true);
}
@@ -1420,18 +1418,13 @@ get_options(
/** Check from page 0 if table is encrypted.
@param[in] filename Filename
-@param[in] page_size page size
@param[in] page Page 0
@retval true if tablespace is encrypted, false if not
*/
-static
-bool check_encryption(
- const char* filename,
- const page_size_t& page_size,
- byte * page)
+static bool check_encryption(const char* filename, const byte* page)
{
- ulint offset = (FSP_HEADER_OFFSET + (XDES_ARR_OFFSET + XDES_SIZE *
- (page_size.physical()) / FSP_EXTENT_SIZE));
+ ulint offset = FSP_HEADER_OFFSET + XDES_ARR_OFFSET + XDES_SIZE *
+ physical_page_size / FSP_EXTENT_SIZE;
if (memcmp(page + offset, CRYPT_MAGIC, MAGIC_SZ) != 0) {
return false;
@@ -1464,30 +1457,21 @@ bool check_encryption(
return (type == CRYPT_SCHEME_1);
}
-/**
-Verify page checksum.
+/** Verify page checksum.
@param[in] buf page to verify
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] is_encrypted true if tablespace is encrypted
-@param[in] is_compressed true if tablespace is page compressed
@param[in,out] mismatch_count Number of pages failed in checksum verify
-@retval 0 if page checksum matches or 1 if it does not match
-*/
-static
-int verify_checksum(
- byte* buf,
- const page_size_t& page_size,
- bool is_encrypted,
- bool is_compressed,
- unsigned long long* mismatch_count)
+@param[in] flags tablespace flags
+@retval 0 if page checksum matches or 1 if it does not match */
+static int verify_checksum(
+ byte* buf,
+ bool is_encrypted,
+ unsigned long long* mismatch_count,
+ ulint flags)
{
int exit_status = 0;
- bool is_corrupted = false;
-
- is_corrupted = is_page_corrupted(
- buf, page_size, is_encrypted, is_compressed);
-
- if (is_corrupted) {
+ if (is_page_corrupted(buf, is_encrypted, flags)) {
fprintf(stderr, "Fail: page::" UINT32PF " invalid\n",
cur_page_num);
@@ -1513,10 +1497,9 @@ int verify_checksum(
@param[in] filename File name
@param[in] fil_in File pointer
@param[in] buf page
-@param[in] page_size page size
@param[in] pos File position
@param[in] is_encrypted true if tablespace is encrypted
-@param[in] is_compressed true if tablespace is page compressed
+@param[in] flags tablespace flags
@retval 0 if checksum rewrite was successful, 1 if error was detected */
static
int
@@ -1524,25 +1507,16 @@ rewrite_checksum(
const char* filename,
FILE* fil_in,
byte* buf,
- const page_size_t& page_size,
fpos_t* pos,
- bool is_encrypted,
- bool is_compressed)
+ bool is_encrypted,
+ ulint flags)
{
- int exit_status = 0;
+ bool is_compressed = fil_space_t::is_compressed(flags);
+
/* Rewrite checksum. Note that for encrypted and
page compressed tables this is not currently supported. */
- if (do_write &&
- !is_encrypted &&
- !is_compressed
- && !write_file(filename, fil_in, buf,
- page_size.is_compressed(), pos,
- static_cast<ulong>(page_size.physical()))) {
-
- exit_status = 1;
- }
-
- return (exit_status);
+ return do_write && !is_encrypted && !is_compressed
+ && !write_file(filename, fil_in, buf, flags, pos);
}
int main(
@@ -1712,24 +1686,20 @@ int main(
/* Determine page size, zip_size and page compression
from fsp_flags and encryption metadata from page 0 */
- const page_size_t& page_size = get_page_size(buf);
+ init_page_size(buf);
ulint flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + buf);
- ulint zip_size = page_size.is_compressed() ? page_size.logical() : 0;
- logical_page_size = page_size.is_compressed() ? zip_size : 0;
- physical_page_size = page_size.physical();
- bool is_compressed = FSP_FLAGS_HAS_PAGE_COMPRESSION(flags);
if (physical_page_size == UNIV_ZIP_SIZE_MIN) {
partial_page_read = false;
} else {
/* Read rest of the page 0 to determine crypt_data */
- bytes = read_file(buf, partial_page_read, page_size.physical(), fil_in);
- if (bytes != page_size.physical()) {
+ bytes = read_file(buf, partial_page_read, physical_page_size, fil_in);
+ if (bytes != physical_page_size) {
fprintf(stderr, "Error: Was not able to read the "
"rest of the page ");
fprintf(stderr, "of " ULINTPF " bytes. Bytes read was " ULINTPF "\n",
- page_size.physical() - UNIV_ZIP_SIZE_MIN, bytes);
+ physical_page_size - UNIV_ZIP_SIZE_MIN, bytes);
exit_status = 1;
goto my_exit;
@@ -1739,7 +1709,7 @@ int main(
/* Now that we have full page 0 in buffer, check encryption */
- bool is_encrypted = check_encryption(filename, page_size, buf);
+ bool is_encrypted = check_encryption(filename, buf);
/* Verify page 0 contents. Note that we can't allow
checksum mismatch on page 0, because that would mean we
@@ -1748,9 +1718,8 @@ int main(
unsigned long long tmp_allow_mismatches = allow_mismatches;
allow_mismatches = 0;
- exit_status = verify_checksum(
- buf, page_size, is_encrypted,
- is_compressed, &mismatch_count);
+ exit_status = verify_checksum(buf, is_encrypted,
+ &mismatch_count, flags);
if (exit_status) {
fprintf(stderr, "Error: Page 0 checksum mismatch, can't continue. \n");
@@ -1759,8 +1728,9 @@ int main(
allow_mismatches = tmp_allow_mismatches;
}
- if ((exit_status = rewrite_checksum(filename, fil_in, buf,
- page_size, &pos, is_encrypted, is_compressed))) {
+ if ((exit_status = rewrite_checksum(
+ filename, fil_in, buf,
+ &pos, is_encrypted, flags))) {
goto my_exit;
}
@@ -1785,10 +1755,10 @@ int main(
memcpy(xdes, buf, physical_page_size);
if (page_type_summary || page_type_dump) {
- parse_page(buf, xdes, fil_page_type, page_size, is_encrypted);
+ parse_page(buf, xdes, fil_page_type, is_encrypted);
}
- pages = uint32_t(size / page_size.physical());
+ pages = uint32_t(size / physical_page_size);
if (just_count) {
fprintf(read_from_stdin ? stderr : stdout,
@@ -1855,12 +1825,9 @@ int main(
partial_page_read = false;
offset = off_t(ulonglong(start_page)
- * page_size.physical());
-#ifdef _WIN32
- if (_fseeki64(fil_in, offset, SEEK_SET)) {
-#else
- if (fseeko(fil_in, offset, SEEK_SET)) {
-#endif /* _WIN32 */
+ * physical_page_size);
+ if (IF_WIN(_fseeki64,fseeko)(fil_in, offset,
+ SEEK_SET)) {
perror("Error: Unable to seek to "
"necessary offset");
@@ -1892,8 +1859,7 @@ int main(
if partial_page_read is enable. */
bytes = read_file(buf,
partial_page_read,
- static_cast<ulong>(
- page_size.physical()),
+ physical_page_size,
fil_in);
partial_page_read = false;
@@ -1912,8 +1878,7 @@ int main(
while (!feof(fil_in)) {
bytes = read_file(buf, partial_page_read,
- static_cast<ulong>(
- page_size.physical()), fil_in);
+ physical_page_size, fil_in);
partial_page_read = false;
if (!bytes && feof(fil_in)) {
@@ -1931,17 +1896,17 @@ unexpected_eof:
if (ferror(fil_in)) {
fprintf(stderr, "Error reading " ULINTPF " bytes",
- page_size.physical());
+ physical_page_size);
perror(" ");
exit_status = 1;
goto my_exit;
}
- if (bytes != page_size.physical()) {
+ if (bytes != physical_page_size) {
fprintf(stderr, "Error: bytes read (" ULINTPF ") "
"doesn't match page size (" ULINTPF ")\n",
- bytes, page_size.physical());
+ bytes, physical_page_size);
exit_status = 1;
goto my_exit;
}
@@ -1965,18 +1930,19 @@ first_non_zero:
/* If no-check is enabled, skip the
checksum verification.*/
- if (!no_check &&
- !is_page_free(xdes, page_size, cur_page_num) &&
- !skip_page &&
- (exit_status = verify_checksum(
- buf, page_size,
- is_encrypted, is_compressed,
- &mismatch_count))) {
+ if (!no_check
+ && !skip_page
+ && !is_page_free(xdes, physical_page_size,
+ cur_page_num)
+ && (exit_status = verify_checksum(
+ buf, is_encrypted,
+ &mismatch_count, flags))) {
goto my_exit;
}
- if ((exit_status = rewrite_checksum(filename, fil_in, buf,
- page_size, &pos, is_encrypted, is_compressed))) {
+ if ((exit_status = rewrite_checksum(
+ filename, fil_in, buf,
+ &pos, is_encrypted, flags))) {
goto my_exit;
}
@@ -1994,7 +1960,7 @@ first_non_zero:
}
if (page_type_summary || page_type_dump) {
- parse_page(buf, xdes, fil_page_type, page_size, is_encrypted);
+ parse_page(buf, xdes, fil_page_type, is_encrypted);
}
/* do counter increase and progress printing */
diff --git a/extra/mariabackup/CMakeLists.txt b/extra/mariabackup/CMakeLists.txt
index aad30ba9b11..f89dfe722b0 100644
--- a/extra/mariabackup/CMakeLists.txt
+++ b/extra/mariabackup/CMakeLists.txt
@@ -40,9 +40,6 @@ IF(NOT HAVE_SYSTEM_REGEX)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/pcre)
ENDIF()
-IF(WITH_WSREP)
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/wsrep)
-ENDIF()
ADD_DEFINITIONS(-UMYSQL_SERVER)
########################################################################
@@ -55,8 +52,8 @@ ELSE()
SET(NT_SERVICE_SOURCE)
ENDIF()
-ADD_DEFINITIONS(-DPCRE_STATIC=1 -DHAVE_OPENSSL=1)
-
+ADD_DEFINITIONS(-DPCRE_STATIC=1)
+ADD_DEFINITIONS(${SSL_DEFINES})
MYSQL_ADD_EXECUTABLE(mariabackup
xtrabackup.cc
innobackupex.cc
@@ -77,6 +74,7 @@ MYSQL_ADD_EXECUTABLE(mariabackup
backup_mysql.cc
backup_copy.cc
encryption_plugin.cc
+ ${PROJECT_BINARY_DIR}/sql/sql_builtin.cc
${PROJECT_SOURCE_DIR}/sql/net_serv.cc
${NT_SERVICE_SOURCE}
${PROJECT_SOURCE_DIR}/libmysqld/libmysql.c
@@ -84,13 +82,14 @@ MYSQL_ADD_EXECUTABLE(mariabackup
)
+
+
# Export all symbols on Unix, for better crash callstacks
SET_TARGET_PROPERTIES(mariabackup PROPERTIES ENABLE_EXPORTS TRUE)
ADD_SUBDIRECTORY(crc)
-TARGET_LINK_LIBRARIES(mariabackup sql crc)
-
+TARGET_LINK_LIBRARIES(mariabackup sql sql_builtins crc)
IF(NOT HAVE_SYSTEM_REGEX)
TARGET_LINK_LIBRARIES(mariabackup pcreposix)
ENDIF()
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index b1655c95998..26bb245c760 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -202,9 +202,9 @@ datadir_iter_new(const char *path, bool skip_first_level = true)
pthread_mutex_init(&it->mutex, NULL);
it->datadir_path = strdup(path);
- it->dir = os_file_opendir(it->datadir_path, TRUE);
+ it->dir = os_file_opendir(it->datadir_path);
- if (it->dir == NULL) {
+ if (it->dir == IF_WIN(INVALID_HANDLE_VALUE, nullptr)) {
goto error;
}
@@ -235,11 +235,9 @@ bool
datadir_iter_next_database(datadir_iter_t *it)
{
if (it->dbdir != NULL) {
- if (os_file_closedir(it->dbdir) != 0) {
-
+ if (os_file_closedir_failed(it->dbdir)) {
msg("Warning: could not"
" close database directory %s", it->dbpath);
-
it->err = DB_ERROR;
}
@@ -285,10 +283,9 @@ datadir_iter_next_database(datadir_iter_t *it)
/* We want wrong directory permissions to be a fatal error for
XtraBackup. */
- it->dbdir = os_file_opendir(it->dbpath, TRUE);
-
- if (it->dbdir != NULL) {
+ it->dbdir = os_file_opendir(it->dbpath);
+ if (it->dir != IF_WIN(INVALID_HANDLE_VALUE, nullptr)) {
it->is_file = false;
return(true);
}
@@ -729,9 +726,9 @@ directory_exists(const char *dir, bool create)
}
/* could be symlink */
- os_dir = os_file_opendir(dir, FALSE);
+ os_dir = os_file_opendir(dir);
- if (os_dir == NULL) {
+ if (os_dir == IF_WIN(INVALID_HANDLE_VALUE, nullptr)) {
my_strerror(errbuf, sizeof(errbuf), my_errno);
msg("Can not open directory %s: %s", dir,
errbuf);
@@ -759,9 +756,9 @@ directory_exists_and_empty(const char *dir, const char *comment)
return(false);
}
- os_dir = os_file_opendir(dir, FALSE);
+ os_dir = os_file_opendir(dir);
- if (os_dir == NULL) {
+ if (os_dir == IF_WIN(INVALID_HANDLE_VALUE, nullptr)) {
msg("%s can not open directory %s", comment, dir);
return(false);
}
@@ -1015,7 +1012,6 @@ static int fix_win_file_permissions(const char *file)
ACL* pOldDACL;
SECURITY_DESCRIPTOR* pSD = NULL;
EXPLICIT_ACCESS ea = { 0 };
- BOOL isWellKnownSID = FALSE;
PSID pSid = NULL;
GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL,
@@ -1035,7 +1031,7 @@ static int fix_win_file_permissions(const char *file)
ea.grfInheritance = CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE;
ea.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
ACL* pNewDACL = 0;
- DWORD err = SetEntriesInAcl(1, &ea, pOldDACL, &pNewDACL);
+ SetEntriesInAcl(1, &ea, pOldDACL, &pNewDACL);
if (pNewDACL)
{
SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL,
@@ -2159,7 +2155,9 @@ decrypt_decompress()
*/
static bool backup_files_from_datadir(const char *dir_path)
{
- os_file_dir_t dir = os_file_opendir(dir_path, TRUE);
+ os_file_dir_t dir = os_file_opendir(dir_path);
+ if (dir == IF_WIN(INVALID_HANDLE_VALUE, nullptr)) return false;
+
os_file_stat_t info;
bool ret = true;
while (os_file_readdir_next_file(dir_path, dir, &info) == 0) {
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index 05fc01305b7..f814a8e13a1 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -897,82 +897,6 @@ stop_query_killer()
}
-/*
-Killing connections that wait for MDL lock.
-If lock-ddl-per-table is used, there can be some DDL statements
-
-FLUSH TABLES would hang infinitely, if DDL statements are waiting for
-MDL lock, which mariabackup currently holds. Therefore we start killing
-those statements from a dedicated thread, until FLUSH TABLES WITH READ LOCK
-succeeds.
-*/
-
-static os_event_t mdl_killer_stop_event;
-static os_event_t mdl_killer_finished_event;
-
-static
-os_thread_ret_t
-DECLARE_THREAD(kill_mdl_waiters_thread(void *))
-{
- MYSQL *mysql;
- if ((mysql = xb_mysql_connect()) == NULL) {
- msg("Error: kill mdl waiters thread failed to connect");
- goto stop_thread;
- }
-
- for(;;){
- if (os_event_wait_time(mdl_killer_stop_event, 1000) == 0)
- break;
-
- MYSQL_RES *result = xb_mysql_query(mysql,
- "SELECT ID, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST "
- " WHERE State='Waiting for table metadata lock'",
- true, true);
- while (MYSQL_ROW row = mysql_fetch_row(result))
- {
- char query[64];
-
- if (row[1] && !strcmp(row[1], "Killed"))
- continue;
-
- msg("Killing MDL waiting %s ('%s') on connection %s",
- row[1], row[2], row[0]);
- snprintf(query, sizeof(query), "KILL QUERY %s", row[0]);
- if (mysql_query(mysql, query) && (mysql_errno(mysql) != ER_NO_SUCH_THREAD)) {
- die("failed to execute query %s: %s", query,mysql_error(mysql));
- }
- }
- mysql_free_result(result);
- }
-
- mysql_close(mysql);
-
-stop_thread:
- msg("Kill mdl waiters thread stopped");
- os_event_set(mdl_killer_finished_event);
- os_thread_exit();
- return os_thread_ret_t(0);
-}
-
-
-static void start_mdl_waiters_killer()
-{
- mdl_killer_stop_event = os_event_create(0);
- mdl_killer_finished_event = os_event_create(0);
- os_thread_create(kill_mdl_waiters_thread, 0, 0);
-}
-
-
-/* Tell MDL killer to stop and finish for its completion*/
-static void stop_mdl_waiters_killer()
-{
- os_event_set(mdl_killer_stop_event);
- os_event_wait(mdl_killer_finished_event);
-
- os_event_destroy(mdl_killer_stop_event);
- os_event_destroy(mdl_killer_finished_event);
-}
-
/*********************************************************************//**
Function acquires either a backup tables lock, if supported
by the server, or a global read lock (FLUSH TABLES WITH READ LOCK)
@@ -998,31 +922,6 @@ bool lock_tables(MYSQL *connection)
return (true);
}
- if (opt_lock_ddl_per_table)
- {
- start_mdl_waiters_killer();
- }
-
- if (!opt_lock_wait_timeout && !opt_kill_long_queries_timeout)
- {
-
- /* We do first a FLUSH TABLES. If a long update is running, the
- FLUSH TABLES will wait but will not stall the whole mysqld, and
- when the long update is done the FLUSH TABLES WITH READ LOCK
- will start and succeed quickly. So, FLUSH TABLES is to lower
- the probability of a stage where both mysqldump and most client
- connections are stalled. Of course, if a second long update
- starts between the two FLUSHes, we have that bad stall.
-
- Option lock_wait_timeout serve the same purpose and is not
- compatible with this trick.
- */
-
- msg("Executing FLUSH NO_WRITE_TO_BINLOG TABLES...");
-
- xb_mysql_query(connection, "FLUSH NO_WRITE_TO_BINLOG TABLES", false);
- }
-
if (opt_lock_wait_timeout)
{
if (!wait_for_no_updates(connection, opt_lock_wait_timeout,
@@ -1032,7 +931,7 @@ bool lock_tables(MYSQL *connection)
}
}
- msg("Executing FLUSH TABLES WITH READ LOCK...");
+ msg("Acquiring BACKUP LOCKS...");
if (opt_kill_long_queries_timeout)
{
@@ -1041,10 +940,11 @@ bool lock_tables(MYSQL *connection)
if (have_galera_enabled)
{
- xb_mysql_query(connection, "SET SESSION wsrep_causal_reads=0", false);
+ xb_mysql_query(connection, "SET SESSION wsrep_sync_wait=0", false);
}
- xb_mysql_query(connection, "FLUSH TABLES WITH READ LOCK", false, true);
+ xb_mysql_query(connection, "BACKUP STAGE START", true);
+ xb_mysql_query(connection, "BACKUP STAGE BLOCK_COMMIT", true);
/* Set the maximum supported session value for
lock_wait_timeout to prevent unnecessary timeouts when the
global value is changed from the default */
@@ -1052,11 +952,6 @@ bool lock_tables(MYSQL *connection)
xb_mysql_query(connection, "SET SESSION lock_wait_timeout=31536000",
false);
- if (opt_lock_ddl_per_table)
- {
- stop_mdl_waiters_killer();
- }
-
if (opt_kill_long_queries_timeout)
{
stop_query_killer();
@@ -1097,13 +992,8 @@ unlock_all(MYSQL *connection)
os_thread_sleep(opt_debug_sleep_before_unlock * 1000);
}
- if (binlog_locked) {
- msg("Executing UNLOCK BINLOG");
- xb_mysql_query(connection, "UNLOCK BINLOG", false);
- }
-
- msg("Executing UNLOCK TABLES");
- xb_mysql_query(connection, "UNLOCK TABLES", false);
+ msg("Executing BACKUP STAGE END");
+ xb_mysql_query(connection, "BACKUP STAGE END", false);
msg("All tables unlocked");
}
diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc
index 5266bed800d..ac67bb9b924 100644
--- a/extra/mariabackup/changed_page_bitmap.cc
+++ b/extra/mariabackup/changed_page_bitmap.cc
@@ -279,9 +279,8 @@ log_online_setup_bitmap_file_range(
/* 1st pass: size the info array */
- bitmap_dir = os_file_opendir(srv_data_home, FALSE);
- if (UNIV_UNLIKELY(!bitmap_dir)) {
-
+ bitmap_dir = os_file_opendir(srv_data_home);
+ if (UNIV_UNLIKELY(bitmap_dir == IF_WIN(INVALID_HANDLE_VALUE, NULL))) {
msg("InnoDB: Error: failed to open bitmap directory \'%s\'",
srv_data_home);
return FALSE;
@@ -329,8 +328,7 @@ log_online_setup_bitmap_file_range(
}
}
- if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) {
-
+ if (UNIV_UNLIKELY(os_file_closedir_failed(bitmap_dir))) {
os_file_get_last_error(TRUE);
msg("InnoDB: Error: cannot close \'%s\'",srv_data_home);
return FALSE;
@@ -346,9 +344,8 @@ log_online_setup_bitmap_file_range(
/* 2nd pass: get the file names in the file_seq_num order */
- bitmap_dir = os_file_opendir(srv_data_home, FALSE);
- if (UNIV_UNLIKELY(!bitmap_dir)) {
-
+ bitmap_dir = os_file_opendir(srv_data_home);
+ if (UNIV_UNLIKELY(bitmap_dir == IF_WIN(INVALID_HANDLE_VALUE, NULL))) {
msg("InnoDB: Error: failed to open bitmap directory \'%s\'",
srv_data_home);
return FALSE;
@@ -398,8 +395,7 @@ log_online_setup_bitmap_file_range(
}
}
- if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) {
-
+ if (UNIV_UNLIKELY(os_file_closedir_failed(bitmap_dir))) {
os_file_get_last_error(TRUE);
msg("InnoDB: Error: cannot close \'%s\'", srv_data_home);
free(bitmap_files->files);
diff --git a/extra/mariabackup/ds_local.cc b/extra/mariabackup/ds_local.cc
index 189533d734a..41a00dd9c39 100644
--- a/extra/mariabackup/ds_local.cc
+++ b/extra/mariabackup/ds_local.cc
@@ -70,7 +70,7 @@ local_init(const char *root)
{
char errbuf[MYSYS_STRERROR_SIZE];
my_strerror(errbuf, sizeof(errbuf),my_errno);
- my_error(EE_CANT_MKDIR, MYF(ME_BELL | ME_WAITTANG),
+ my_error(EE_CANT_MKDIR, MYF(ME_BELL),
root, my_errno,errbuf, my_errno);
return NULL;
}
@@ -102,7 +102,7 @@ local_open(ds_ctxt_t *ctxt, const char *path,
if (my_mkdir(dirpath, 0777, MYF(0)) < 0 && my_errno != EEXIST) {
char errbuf[MYSYS_STRERROR_SIZE];
my_strerror(errbuf, sizeof(errbuf), my_errno);
- my_error(EE_CANT_MKDIR, MYF(ME_BELL | ME_WAITTANG),
+ my_error(EE_CANT_MKDIR, MYF(ME_BELL),
dirpath, my_errno, errbuf);
return NULL;
}
@@ -184,7 +184,9 @@ static void init_ibd_data(ds_local_file_t *local_file, const uchar *buf, size_t
ulint flags = mach_read_from_4(&buf[FIL_PAGE_DATA + FSP_SPACE_FLAGS]);
ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
local_file->pagesize= ssize == 0 ? UNIV_PAGE_SIZE_ORIG : ((UNIV_ZIP_SIZE_MIN >> 1) << ssize);
- local_file->compressed = (my_bool)FSP_FLAGS_HAS_PAGE_COMPRESSION(flags);
+ local_file->compressed = fil_space_t::full_crc32(flags)
+ ? fil_space_t::is_compressed(flags)
+ : bool(FSP_FLAGS_HAS_PAGE_COMPRESSION(flags));
#if defined(_WIN32) && (MYSQL_VERSION_ID > 100200)
/* Make compressed file sparse, on Windows.
diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc
index 16342768ce9..6a0720f8626 100644
--- a/extra/mariabackup/fil_cur.cc
+++ b/extra/mariabackup/fil_cur.cc
@@ -234,11 +234,11 @@ xb_fil_cur_open(
posix_fadvise(cursor->file, 0, 0, POSIX_FADV_SEQUENTIAL);
- const page_size_t page_size(node->space->flags);
- cursor->page_size = page_size;
+ cursor->page_size = node->space->physical_size();
+ cursor->zip_size = node->space->zip_size();
/* Allocate read buffer */
- cursor->buf_size = XB_FIL_CUR_PAGES * page_size.physical();
+ cursor->buf_size = XB_FIL_CUR_PAGES * cursor->page_size;
cursor->orig_buf = static_cast<byte *>
(malloc(cursor->buf_size + srv_page_size));
cursor->buf = static_cast<byte *>
@@ -253,18 +253,17 @@ xb_fil_cur_open(
if (!node->space->crypt_data
&& os_file_read(IORequestRead,
node->handle, cursor->buf, 0,
- page_size.physical()) == DB_SUCCESS) {
+ cursor->page_size) == DB_SUCCESS) {
mutex_enter(&fil_system.mutex);
if (!node->space->crypt_data) {
- node->space->crypt_data
- = fil_space_read_crypt_data(page_size,
- cursor->buf);
+ node->space->crypt_data = fil_space_read_crypt_data(
+ node->space->zip_size(), cursor->buf);
}
mutex_exit(&fil_system.mutex);
}
cursor->space_size = (ulint)(cursor->statinfo.st_size
- / page_size.physical());
+ / cursor->page_size);
cursor->read_filter = read_filter;
cursor->read_filter->init(&cursor->read_filter_ctxt, cursor,
@@ -279,7 +278,7 @@ static bool page_is_corrupted(const byte *page, ulint page_no,
{
byte tmp_frame[UNIV_PAGE_SIZE_MAX];
byte tmp_page[UNIV_PAGE_SIZE_MAX];
- const ulint page_size = cursor->page_size.physical();
+ const ulint page_size = cursor->page_size;
ulint page_type = mach_read_from_2(page + FIL_PAGE_TYPE);
/* We ignore the doublewrite buffer pages.*/
@@ -316,6 +315,10 @@ static bool page_is_corrupted(const byte *page, ulint page_no,
return false;
}
+ if (space->full_crc32()) {
+ return buf_page_is_corrupted(true, page, space->flags);
+ }
+
/* Validate encrypted pages. The first page is never encrypted.
In the system tablespace, the first page would be written with
FIL_PAGE_FILE_FLUSH_LSN at shutdown, and if the LSN exceeds
@@ -328,7 +331,7 @@ static bool page_is_corrupted(const byte *page, ulint page_no,
|| (space->crypt_data
&& space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED))) {
- if (!fil_space_verify_crypt_checksum(page, cursor->page_size))
+ if (!fil_space_verify_crypt_checksum(page, space->zip_size()))
return true;
/* Compressed encrypted need to be decrypted
@@ -347,7 +350,7 @@ static bool page_is_corrupted(const byte *page, ulint page_no,
if (page_type != FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED) {
return buf_page_is_corrupted(true, tmp_page,
- cursor->page_size, space);
+ space->flags);
}
}
@@ -357,19 +360,20 @@ static bool page_is_corrupted(const byte *page, ulint page_no,
if (page_type == FIL_PAGE_PAGE_COMPRESSED
|| page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED) {
- ulint decomp = fil_page_decompress(tmp_frame, tmp_page);
+ ulint decomp = fil_page_decompress(tmp_frame, tmp_page,
+ space->flags);
page_type = mach_read_from_2(tmp_page + FIL_PAGE_TYPE);
return (!decomp
|| (decomp != srv_page_size
- && cursor->page_size.is_compressed())
+ && cursor->zip_size)
|| page_type == FIL_PAGE_PAGE_COMPRESSED
|| page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED
|| buf_page_is_corrupted(true, tmp_page,
- cursor->page_size, space));
+ space->flags));
}
- return buf_page_is_corrupted(true, page, cursor->page_size, space);
+ return buf_page_is_corrupted(true, page, space->flags);
}
/** Reads and verifies the next block of pages from the source
@@ -389,7 +393,7 @@ xb_fil_cur_result_t xb_fil_cur_read(xb_fil_cur_t* cursor,
xb_fil_cur_result_t ret;
ib_int64_t offset;
ib_int64_t to_read;
- const ulint page_size = cursor->page_size.physical();
+ const ulint page_size = cursor->page_size;
xb_ad(!cursor->is_system() || page_size == srv_page_size);
cursor->read_filter->get_next_batch(&cursor->read_filter_ctxt,
@@ -462,7 +466,7 @@ read_retry:
"Error: failed to read page after "
"10 retries. File %s seems to be "
"corrupted.%s", cursor->abs_path, ignore_corruption_warn);
- buf_page_print(page, cursor->page_size);
+ ut_print_buf(stderr, page, page_size);
if (opt_log_innodb_page_corruption) {
corrupted_pages.add_page(cursor->node->name, cursor->node->space->id,
page_no);
diff --git a/extra/mariabackup/fil_cur.h b/extra/mariabackup/fil_cur.h
index b534aa31c28..c0d0af40f8f 100644
--- a/extra/mariabackup/fil_cur.h
+++ b/extra/mariabackup/fil_cur.h
@@ -39,7 +39,9 @@ struct xb_fil_cur_t {
char abs_path[FN_REFLEN];
/*!< absolute file path */
MY_STAT statinfo; /*!< information about the file */
- page_size_t page_size; /*!< page size */
+ ulint zip_size; /*!< compressed page size in bytes or 0
+ for uncompressed pages */
+ ulint page_size; /*!< physical page size */
xb_read_filt_t* read_filter; /*!< read filter */
xb_read_filt_ctxt_t read_filter_ctxt;
/*!< read filter context */
@@ -58,9 +60,6 @@ struct xb_fil_cur_t {
ulint space_id; /*!< ID of tablespace */
ulint space_size; /*!< space size in pages */
- /** TODO: remove this default constructor */
- xb_fil_cur_t() : page_size(0), read_filter(0), read_filter_ctxt() {}
-
/** @return whether this is not a file-per-table tablespace */
bool is_system() const
{
diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc
index 0a963c25ee3..5cc9ffb906d 100644
--- a/extra/mariabackup/innobackupex.cc
+++ b/extra/mariabackup/innobackupex.cc
@@ -112,6 +112,8 @@ bool ibx_partial_backup = false;
char *ibx_position_arg = NULL;
char *ibx_backup_directory = NULL;
+extern bool xb_opt_destroy_password;
+
/* copy of proxied xtrabackup options */
my_bool ibx_xb_close_files;
const char *ibx_xtrabackup_compress_alg;
@@ -763,17 +765,7 @@ ibx_get_one_option(int optid,
xtrabackup_compress = TRUE;
break;
case 'p':
- if (argument)
- {
- char *start = argument;
- my_free(opt_ibx_password);
- opt_ibx_password= my_strdup(argument, MYF(MY_FAE));
- /* Destroy argument */
- while (*argument)
- *argument++= 'x';
- if (*start)
- start[1]=0 ;
- }
+ opt_ibx_password= argument;
break;
}
return(0);
diff --git a/extra/mariabackup/read_filt.cc b/extra/mariabackup/read_filt.cc
index 72f63bf972a..589200552a2 100644
--- a/extra/mariabackup/read_filt.cc
+++ b/extra/mariabackup/read_filt.cc
@@ -127,7 +127,7 @@ rf_bitmap_get_next_batch(
of pages */
{
ulint start_page_id;
- const ulint page_size = ctxt->page_size.physical();
+ const ulint page_size = ctxt->page_size;
start_page_id = (ulint)(ctxt->offset / page_size);
diff --git a/extra/mariabackup/read_filt.h b/extra/mariabackup/read_filt.h
index e1faa96ef0c..2cd52d3d581 100644
--- a/extra/mariabackup/read_filt.h
+++ b/extra/mariabackup/read_filt.h
@@ -41,7 +41,7 @@ struct xb_read_filt_ctxt_t {
/* Move these to union if any other filters are added in future */
xb_page_bitmap_range *bitmap_range; /*!< changed page bitmap range
iterator for space_id */
- page_size_t page_size; /*!< page size */
+ ulint page_size; /*!< page size */
ulint filter_batch_end;/*!< the ending page id of the
current changed page block in
the bitmap */
diff --git a/extra/mariabackup/write_filt.cc b/extra/mariabackup/write_filt.cc
index 6341d90ab0f..c144a60e378 100644
--- a/extra/mariabackup/write_filt.cc
+++ b/extra/mariabackup/write_filt.cc
@@ -74,8 +74,7 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name,
ctxt->cursor = cursor;
/* allocate buffer for incremental backup (4096 pages) */
- cp->delta_buf_size = (cursor->page_size.physical() / 4)
- * cursor->page_size.physical();
+ cp->delta_buf_size = (cursor->page_size / 4) * cursor->page_size;
cp->delta_buf = (unsigned char *)os_mem_alloc_large(&cp->delta_buf_size);
if (!cp->delta_buf) {
@@ -87,7 +86,8 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name,
/* write delta meta info */
snprintf(meta_name, sizeof(meta_name), "%s%s", dst_name,
XB_DELTA_INFO_SUFFIX);
- const xb_delta_info_t info(cursor->page_size, cursor->space_id);
+ const xb_delta_info_t info(cursor->page_size, cursor->zip_size,
+ cursor->space_id);
if (!xb_write_delta_metadata(meta_name, &info)) {
msg(cursor->thread_n,"Error: "
"failed to write meta info for %s",
@@ -117,8 +117,7 @@ wf_incremental_process(xb_write_filt_ctxt_t *ctxt, ds_file_t *dstfile)
ulint i;
xb_fil_cur_t *cursor = ctxt->cursor;
byte *page;
- const ulint page_size
- = cursor->page_size.physical();
+ const ulint page_size = cursor->page_size;
xb_wf_incremental_ctxt_t *cp = &(ctxt->wf_incremental_ctxt);
for (i = 0, page = cursor->buf; i < cursor->buf_npages;
@@ -164,8 +163,7 @@ static my_bool
wf_incremental_finalize(xb_write_filt_ctxt_t *ctxt, ds_file_t *dstfile)
{
xb_fil_cur_t *cursor = ctxt->cursor;
- const ulint page_size
- = cursor->page_size.physical();
+ const ulint page_size = cursor->page_size;
xb_wf_incremental_ctxt_t *cp = &(ctxt->wf_incremental_ctxt);
if (cp->npages != page_size / 4) {
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 2b276856303..fa3bb2c0279 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -4,7 +4,7 @@ MariaBackup: hot backup tool for InnoDB
Originally Created 3/3/2009 Yasufumi Kinoshita
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
Yasufumi Kinoshita, Ignacio Nin and Baron Schwartz.
-(c) 2017, 2021, MariaDB Corporation.
+(c) 2017, 2022, MariaDB Corporation.
Portions written by Marko Mäkelä.
This program is free software; you can redistribute it and/or modify
@@ -51,7 +51,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <my_getopt.h>
#include <mysql_com.h>
#include <my_default.h>
-#include <mysqld.h>
+#include <sql_class.h>
#include <fcntl.h>
#include <string.h>
@@ -61,6 +61,10 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <sys/resource.h>
#endif
+#ifdef __APPLE__
+# include "libproc.h"
+#endif
+
#include <btr0sea.h>
#include <dict0priv.h>
@@ -122,6 +126,8 @@ my_bool xtrabackup_copy_back;
my_bool xtrabackup_move_back;
my_bool xtrabackup_decrypt_decompress;
my_bool xtrabackup_print_param;
+my_bool xtrabackup_mysqld_args;
+my_bool xtrabackup_help;
my_bool xtrabackup_export;
@@ -207,6 +213,7 @@ static char* log_ignored_opt;
extern my_bool opt_use_ssl;
+extern char *opt_tls_version;
my_bool opt_ssl_verify_server_cert;
my_bool opt_extended_validation;
my_bool opt_encrypted_backup;
@@ -558,8 +565,8 @@ void CorruptedPages::zero_out_free_pages()
else
{
const page_id_t page_id(space->id, *page_it);
- dberr_t err= fil_io(IORequestWrite, true, page_id, univ_page_size, 0,
- univ_page_size.physical(), zero_page, NULL);
+ dberr_t err= fil_io(IORequestWrite, true, page_id, 0, 0,
+ srv_page_size, zero_page, NULL);
if (err != DB_SUCCESS)
die("Can't zero out corrupted page " ULINTPF " of tablespace %s",
*page_it, space_name.c_str());
@@ -684,9 +691,18 @@ DECLARE_THREAD(dbug_execute_in_new_connection)(void *arg)
dbug_thread_param_t *par= (dbug_thread_param_t *)arg;
int err = mysql_query(par->con, par->query);
int err_no = mysql_errno(par->con);
- DBUG_ASSERT(par->expect_err == err);
- if (err && par->expect_errno)
- DBUG_ASSERT(err_no == par->expect_errno);
+ if(par->expect_err != err)
+ {
+ msg("FATAL: dbug_execute_in_new_connection : mysql_query '%s' returns %d, instead of expected %d",
+ par->query, err, par->expect_err);
+ _exit(1);
+ }
+ if (err && par->expect_errno && par->expect_errno != err_no)
+ {
+ msg("FATAL: dbug_execute_in_new_connection: mysql_query '%s' returns mysql_errno %d, instead of expected %d",
+ par->query, err_no, par->expect_errno);
+ _exit(1);
+ }
mysql_close(par->con);
mysql_thread_end();
os_event_t done = par->done_event;
@@ -842,7 +858,6 @@ static void backup_file_op_fail(ulint space_id, const byte* flags,
const byte* name, ulint len,
const byte* new_name, ulint new_len)
{
- ut_a(opt_no_lock);
bool fail;
if (flags) {
msg("DDL tracking : create %zu \"%.*s\": %x",
@@ -863,6 +878,7 @@ static void backup_file_op_fail(ulint space_id, const byte* flags,
msg("DDL tracking : delete %zu \"%.*s\"", space_id, int(len), name);
}
if (fail) {
+ ut_a(opt_no_lock);
die("DDL operation detected in the late phase of backup."
"Backup is inconsistent. Remove --no-lock option to fix.");
}
@@ -883,9 +899,9 @@ static void backup_optimized_ddl_op(ulint space_id)
run with --no-lock. Usually aborts the backup.
*/
static void backup_optimized_ddl_op_fail(ulint space_id) {
- ut_a(opt_no_lock);
msg("DDL tracking : optimized DDL on space %zu", space_id);
if (ddl_tracker.tables_in_backup.find(space_id) != ddl_tracker.tables_in_backup.end()) {
+ ut_a(opt_no_lock);
msg("ERROR : Optimized DDL operation detected in the late phase of backup."
"Backup is inconsistent. Remove --no-lock option to fix.");
exit(EXIT_FAILURE);
@@ -893,16 +909,6 @@ static void backup_optimized_ddl_op_fail(ulint space_id) {
}
-/** Callback whenever MLOG_TRUNCATE happens. */
-static void backup_truncate_fail()
-{
- msg("mariabackup: Incompatible TRUNCATE operation detected.%s",
- opt_lock_ddl_per_table
- ? ""
- : " Use --lock-ddl-per-table to lock all tables before backup.");
-}
-
-
/*
Retrieve default data directory, to be used with --copy-back.
@@ -1046,6 +1052,7 @@ enum options_xtrabackup
OPT_ROCKSDB_DATADIR,
OPT_BACKUP_ROCKSDB,
OPT_XTRA_CHECK_PRIVILEGES,
+ OPT_XTRA_MYSQLD_ARGS,
OPT_XB_IGNORE_INNODB_PAGE_CORRUPTION,
OPT_INNODB_FORCE_RECOVERY
};
@@ -1453,7 +1460,6 @@ struct my_option xb_client_options[]= {
#define MYSQL_CLIENT
#include "sslopt-longopts.h"
#undef MYSQL_CLIENT
-
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}};
uint xb_client_options_count = array_elements(xb_client_options);
@@ -1670,6 +1676,18 @@ struct my_option xb_server_options[] =
(G_PTR*)&srv_force_recovery,
0, GET_ULONG, OPT_ARG, 0, 0, SRV_FORCE_IGNORE_CORRUPT, 0, 0, 0},
+ {"mysqld-args", OPT_XTRA_MYSQLD_ARGS,
+ "All arguments that follow this argument are considered as server "
+ "options, and if some of them are not supported by mariabackup, they "
+ "will be ignored.",
+ (G_PTR *) &xtrabackup_mysqld_args, (G_PTR *) &xtrabackup_mysqld_args, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+
+ {"help", '?',
+ "Display this help and exit.",
+ (G_PTR *) &xtrabackup_help, (G_PTR *) &xtrabackup_help, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
@@ -1786,24 +1804,11 @@ end:
return err;
}
+static const char *xb_client_default_groups[]= {
+ "client", "client-server", "client-mariadb", 0, 0, 0};
-static const char *xb_client_default_groups[]={
- "xtrabackup", "mariabackup",
- "client", "client-server",
- "client-mariadb",
- 0, 0, 0
-};
-
-static const char *xb_server_default_groups[]={
- "xtrabackup", "mariabackup",
- "mysqld", "server", MYSQL_BASE_VERSION,
- "mariadb", MARIADB_BASE_VERSION,
- "client-server",
- #ifdef WITH_WSREP
- "galera",
- #endif
- 0, 0, 0
-};
+static const char *backup_default_groups[]= {
+ "xtrabackup", "mariabackup", "mariadb-backup", 0, 0, 0};
static void print_version(void)
{
@@ -1831,7 +1836,7 @@ GNU General Public License for more details.\n\
You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt\n");
printf("Usage: %s [--defaults-file=#] [--backup | --prepare | --copy-back | --move-back] [OPTIONS]\n",my_progname);
- print_defaults("my", xb_server_default_groups);
+ print_defaults("my", load_default_groups);
my_print_help(xb_client_options);
my_print_help(xb_server_options);
my_print_variables(xb_server_options);
@@ -1913,7 +1918,7 @@ xb_get_one_option(int optid,
case OPT_INNODB_CHECKSUM_ALGORITHM:
- ut_a(srv_checksum_algorithm <= SRV_CHECKSUM_ALGORITHM_STRICT_NONE);
+ ut_a(srv_checksum_algorithm <= SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32);
ADD_PRINT_PARAM_OPT(innodb_checksum_algorithm_names[srv_checksum_algorithm]);
break;
@@ -1974,15 +1979,7 @@ xb_get_one_option(int optid,
}
break;
case 'p':
- if (argument)
- {
- char *start= argument;
- my_free(opt_password);
- opt_password= my_strdup(argument, MYF(MY_FAE));
- while (*argument) *argument++= 'x'; // Destroy argument
- if (*start)
- start[1]=0 ;
- }
+ opt_password = argument;
break;
case OPT_PROTOCOL:
if (argument)
@@ -2090,15 +2087,18 @@ static bool innodb_init_param()
msg("innodb_data_file_path = %s",
innobase_data_file_path);
- /* This is the first time univ_page_size is used.
- It was initialized to 16k pages before srv_page_size was set */
- univ_page_size.copy_from(
- page_size_t(srv_page_size, srv_page_size, false));
-
srv_sys_space.set_space_id(TRX_SYS_SPACE);
srv_sys_space.set_name("innodb_system");
srv_sys_space.set_path(srv_data_home);
- srv_sys_space.set_flags(FSP_FLAGS_PAGE_SSIZE());
+ switch (srv_checksum_algorithm) {
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ srv_sys_space.set_flags(FSP_FLAGS_FCRC32_MASK_MARKER
+ | FSP_FLAGS_FCRC32_PAGE_SSIZE());
+ break;
+ default:
+ srv_sys_space.set_flags(FSP_FLAGS_PAGE_SSIZE());
+ }
if (!srv_sys_space.parse_params(innobase_data_file_path, true)) {
goto error;
@@ -2411,8 +2411,7 @@ xb_read_delta_metadata(const char *filepath, xb_delta_info_t *info)
msg("page_size is required in %s", filepath);
r = FALSE;
} else {
- info->page_size = page_size_t(zip_size ? zip_size : page_size,
- page_size, zip_size != 0);
+ info->page_size = zip_size ? zip_size : page_size;
}
if (info->space_id == ULINT_UNDEFINED) {
@@ -2440,9 +2439,8 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
"page_size = " ULINTPF "\n"
"zip_size = " ULINTPF " \n"
"space_id = " ULINTPF "\n",
- info->page_size.logical(),
- info->page_size.is_compressed()
- ? info->page_size.physical() : 0,
+ info->page_size,
+ info->zip_size,
info->space_id);
len = strlen(buf);
@@ -2625,6 +2623,18 @@ check_if_skip_table(
const char *ptr;
char *eptr;
+
+ dbname = NULL;
+ tbname = name;
+ while ((ptr = strchr(tbname, '/')) != NULL) {
+ dbname = tbname;
+ tbname = ptr + 1;
+ }
+
+ if (strncmp(tbname, tmp_file_prefix, tmp_file_prefix_length) == 0) {
+ return TRUE;
+ }
+
if (regex_exclude_list.empty() &&
regex_include_list.empty() &&
tables_include_hash == NULL &&
@@ -2634,13 +2644,6 @@ check_if_skip_table(
return(FALSE);
}
- dbname = NULL;
- tbname = name;
- while ((ptr = strchr(tbname, '/')) != NULL) {
- dbname = tbname;
- tbname = ptr + 1;
- }
-
if (dbname == NULL) {
return(FALSE);
}
@@ -2916,13 +2919,12 @@ static lsn_t xtrabackup_copy_log(lsn_t start_lsn, lsn_t end_lsn, bool last)
log_block,
scanned_lsn + data_len);
- recv_sys->scanned_lsn = scanned_lsn + data_len;
+ recv_sys.scanned_lsn = scanned_lsn + data_len;
if (data_len == OS_FILE_LOG_BLOCK_SIZE) {
/* We got a full log block. */
scanned_lsn += data_len;
- } else if (data_len
- >= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE
+ } else if (data_len >= log_sys.trailer_offset()
|| data_len < LOG_BLOCK_HDR_SIZE) {
/* We got a garbage block (abrupt end of the log). */
msg(0,"garbage block: " LSN_PF ",%zu",scanned_lsn, data_len);
@@ -2971,14 +2973,14 @@ static lsn_t xtrabackup_copy_log(lsn_t start_lsn, lsn_t end_lsn, bool last)
static bool xtrabackup_copy_logfile(bool last = false)
{
ut_a(dst_log_file != NULL);
- ut_ad(recv_sys != NULL);
+ ut_ad(recv_sys.is_initialised());
bool overwritten_block = false;
lsn_t start_lsn;
lsn_t end_lsn;
- recv_sys->parse_start_lsn = log_copy_scanned_lsn;
- recv_sys->scanned_lsn = log_copy_scanned_lsn;
+ recv_sys.parse_start_lsn = log_copy_scanned_lsn;
+ recv_sys.scanned_lsn = log_copy_scanned_lsn;
start_lsn = ut_uint64_align_down(log_copy_scanned_lsn,
OS_FILE_LOG_BLOCK_SIZE);
@@ -2999,7 +3001,7 @@ static bool xtrabackup_copy_logfile(bool last = false)
}
if (lsn == start_lsn) {
- overwritten_block= !recv_sys->found_corrupt_log
+ overwritten_block= !recv_sys.found_corrupt_log
&& (innodb_log_checksums || log_sys.log.is_encrypted())
&& log_block_calc_checksum_crc32(log_sys.buf) ==
log_block_get_checksum(log_sys.buf)
@@ -3007,15 +3009,15 @@ static bool xtrabackup_copy_logfile(bool last = false)
log_block_convert_lsn_to_no(start_lsn);
start_lsn = 0;
} else {
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
start_lsn = xtrabackup_copy_log(start_lsn, lsn, last);
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
}
log_mutex_exit();
if (!start_lsn) {
- const char *reason = recv_sys->found_corrupt_log
+ const char *reason = recv_sys.found_corrupt_log
? "corrupt log."
: (overwritten_block
? "redo log block is overwritten, please increase redo log size with innodb_log_file_size parameter."
@@ -3377,7 +3379,7 @@ static void xb_load_single_table_tablespace(const char *dirname,
if (set_size) {
os_offset_t node_size = os_file_get_size(file->handle());
ut_a(node_size != (os_offset_t) -1);
- n_pages = node_size / page_size_t(file->flags()).physical();
+ n_pages = node_size / fil_space_t::physical_size(file->flags());
}
space = fil_space_create(
name, file->space_id(), file->flags(),
@@ -3427,6 +3429,222 @@ static void xb_load_single_table_tablespace(const std::string &space_name,
xb_load_single_table_tablespace(dbname, tablename, is_remote, set_size);
}
+#ifdef _WIN32
+/**
+The os_file_opendir() function opens a directory stream corresponding to the
+directory named by the dirname argument. The directory stream is positioned
+at the first entry. In both Unix and Windows we automatically skip the '.'
+and '..' items at the start of the directory listing.
+@param[in] dirname directory name; it must not contain a trailing
+ '\' or '/'
+@return directory stream, NULL if error */
+os_file_dir_t os_file_opendir(const char *dirname)
+{
+ char path[OS_FILE_MAX_PATH + 3];
+
+ ut_a(strlen(dirname) < OS_FILE_MAX_PATH);
+
+ strcpy(path, dirname);
+ strcpy(path + strlen(path), "\\*");
+
+ /* Note that in Windows opening the 'directory stream' also retrieves
+ the first entry in the directory. Since it is '.', that is no problem,
+ as we will skip over the '.' and '..' entries anyway. */
+
+ LPWIN32_FIND_DATA lpFindFileData= static_cast<LPWIN32_FIND_DATA>
+ (ut_malloc_nokey(sizeof(WIN32_FIND_DATA)));
+ os_file_dir_t dir= FindFirstFile((LPCTSTR) path, lpFindFileData);
+ ut_free(lpFindFileData);
+
+ return dir;
+}
+#endif
+
+/** This function returns information of the next file in the directory. We jump
+over the '.' and '..' entries in the directory.
+@param[in] dirname directory name or path
+@param[in] dir directory stream
+@param[out] info buffer where the info is returned
+@return 0 if ok, -1 if error, 1 if at the end of the directory */
+int
+os_file_readdir_next_file(
+ const char* dirname,
+ os_file_dir_t dir,
+ os_file_stat_t* info)
+{
+#ifdef _WIN32
+ BOOL ret;
+ int status;
+ WIN32_FIND_DATA find_data;
+
+next_file:
+ ret = FindNextFile(dir, &find_data);
+
+ if (ret > 0) {
+
+ const char* name;
+
+ name = static_cast<const char*>(find_data.cFileName);
+
+ ut_a(strlen(name) < OS_FILE_MAX_PATH);
+
+ if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) {
+
+ goto next_file;
+ }
+
+ strcpy(info->name, name);
+
+ info->size = find_data.nFileSizeHigh;
+ info->size <<= 32;
+ info->size |= find_data.nFileSizeLow;
+
+ if (find_data.dwFileAttributes
+ & FILE_ATTRIBUTE_REPARSE_POINT) {
+
+ /* TODO: test Windows symlinks */
+ /* TODO: MySQL has apparently its own symlink
+ implementation in Windows, dbname.sym can
+ redirect a database directory:
+ REFMAN "windows-symbolic-links.html" */
+
+ info->type = OS_FILE_TYPE_LINK;
+
+ } else if (find_data.dwFileAttributes
+ & FILE_ATTRIBUTE_DIRECTORY) {
+
+ info->type = OS_FILE_TYPE_DIR;
+
+ } else {
+
+ /* It is probably safest to assume that all other
+ file types are normal. Better to check them rather
+ than blindly skip them. */
+
+ info->type = OS_FILE_TYPE_FILE;
+ }
+
+ status = 0;
+
+ } else {
+ DWORD err = GetLastError();
+ if (err == ERROR_NO_MORE_FILES) {
+ status = 1;
+ } else {
+ msg("FindNextFile in %s returned %lu", dirname, err);
+ status = -1;
+ }
+ }
+
+ return(status);
+#else
+ struct dirent* ent;
+ char* full_path;
+ int ret;
+ struct stat statinfo;
+
+next_file:
+
+ ent = readdir(dir);
+
+ if (ent == NULL) {
+
+ return(1);
+ }
+
+ ut_a(strlen(ent->d_name) < OS_FILE_MAX_PATH);
+
+ if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
+
+ goto next_file;
+ }
+
+ strcpy(info->name, ent->d_name);
+
+ full_path = static_cast<char*>(
+ ut_malloc_nokey(strlen(dirname) + strlen(ent->d_name) + 10));
+
+ sprintf(full_path, "%s/%s", dirname, ent->d_name);
+
+ ret = stat(full_path, &statinfo);
+
+ if (ret) {
+
+ if (errno == ENOENT) {
+ /* readdir() returned a file that does not exist,
+ it must have been deleted in the meantime. Do what
+ would have happened if the file was deleted before
+ readdir() - ignore and go to the next entry.
+ If this is the last entry then info->name will still
+ contain the name of the deleted file when this
+ function returns, but this is not an issue since the
+ caller shouldn't be looking at info when end of
+ directory is returned. */
+
+ ut_free(full_path);
+
+ goto next_file;
+ }
+
+ msg("stat %s: Got error %d", full_path, errno);
+
+ ut_free(full_path);
+
+ return(-1);
+ }
+
+ info->size = statinfo.st_size;
+
+ if (S_ISDIR(statinfo.st_mode)) {
+ info->type = OS_FILE_TYPE_DIR;
+ } else if (S_ISLNK(statinfo.st_mode)) {
+ info->type = OS_FILE_TYPE_LINK;
+ } else if (S_ISREG(statinfo.st_mode)) {
+ info->type = OS_FILE_TYPE_FILE;
+ } else {
+ info->type = OS_FILE_TYPE_UNKNOWN;
+ }
+
+ ut_free(full_path);
+ return(0);
+#endif
+}
+
+/***********************************************************************//**
+A fault-tolerant function that tries to read the next file name in the
+directory. We retry 100 times if os_file_readdir_next_file() returns -1. The
+idea is to read as much good data as we can and jump over bad data.
+@return 0 if ok, -1 if error even after the retries, 1 if at the end
+of the directory */
+int
+fil_file_readdir_next_file(
+/*=======================*/
+ dberr_t* err, /*!< out: this is set to DB_ERROR if an error
+ was encountered, otherwise not changed */
+ const char* dirname,/*!< in: directory name or path */
+ os_file_dir_t dir, /*!< in: directory stream */
+ os_file_stat_t* info) /*!< in/out: buffer where the
+ info is returned */
+{
+ for (ulint i = 0; i < 100; i++) {
+ int ret = os_file_readdir_next_file(dirname, dir, info);
+
+ if (ret != -1) {
+
+ return(ret);
+ }
+
+ ib::error() << "os_file_readdir_next_file() returned -1 in"
+ " directory " << dirname
+ << ", crash recovery may have failed"
+ " for some .ibd files!";
+
+ *err = DB_ERROR;
+ }
+
+ return(-1);
+}
+
/** Scan the database directories under the MySQL datadir, looking for
.ibd files and determining the space id in each of them.
@return DB_SUCCESS or error number */
@@ -3445,10 +3663,10 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
/* The datadir of MySQL is always the default directory of mysqld */
- dir = os_file_opendir(fil_path_to_mysql_datadir, true);
-
- if (dir == NULL) {
+ dir = os_file_opendir(fil_path_to_mysql_datadir);
+ if (UNIV_UNLIKELY(dir == IF_WIN(INVALID_HANDLE_VALUE, nullptr))) {
+ msg("cannot open dir %s", fil_path_to_mysql_datadir);
return(DB_ERROR);
}
@@ -3501,12 +3719,9 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
goto next_datadir_item;
}
- /* We want wrong directory permissions to be a fatal error for
- XtraBackup. */
- dbdir = os_file_opendir(dbpath, true);
-
- if (dbdir != NULL) {
+ dbdir = os_file_opendir(dbpath);
+ if (UNIV_UNLIKELY(dbdir != IF_WIN(INVALID_HANDLE_VALUE,NULL))){
/* We found a database directory; loop through it,
looking for possible .ibd files in it */
@@ -3529,7 +3744,7 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
}
}
- if (0 != os_file_closedir(dbdir)) {
+ if (os_file_closedir_failed(dbdir)) {
fprintf(stderr, "InnoDB: Warning: could not"
" close database directory %s\n",
dbpath);
@@ -3538,7 +3753,7 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
}
} else {
-
+ msg("Can't open dir %s", dbpath);
err = DB_ERROR;
break;
@@ -3552,10 +3767,9 @@ next_datadir_item:
ut_free(dbpath);
- if (0 != os_file_closedir(dir)) {
+ if (os_file_closedir_failed(dir)) {
fprintf(stderr,
"InnoDB: Error: could not close MySQL datadir\n");
-
return(DB_ERROR);
}
@@ -3576,7 +3790,8 @@ static dberr_t xb_assign_undo_space_start()
bool ret;
dberr_t error = DB_SUCCESS;
ulint space;
- int n_retries = 5;
+ int n_retries = 5;
+ ulint fsp_flags;
if (srv_undo_tablespaces == 0) {
return error;
@@ -3593,6 +3808,15 @@ static dberr_t xb_assign_undo_space_start()
buf = static_cast<byte*>(ut_malloc_nokey(2U << srv_page_size_shift));
page = static_cast<byte*>(ut_align(buf, srv_page_size));
+ if (os_file_read(IORequestRead, file, page, 0, srv_page_size)
+ != DB_SUCCESS) {
+ msg("Reading first page failed.\n");
+ error = DB_ERROR;
+ goto func_exit;
+ }
+
+ fsp_flags = mach_read_from_4(
+ page + FSP_HEADER_OFFSET + FSP_SPACE_FLAGS);
retry:
if (os_file_read(IORequestRead, file, page,
TRX_SYS_PAGE_NO << srv_page_size_shift,
@@ -3603,7 +3827,7 @@ retry:
}
/* TRX_SYS page can't be compressed or encrypted. */
- if (buf_page_is_corrupted(false, page, univ_page_size)) {
+ if (buf_page_is_corrupted(false, page, fsp_flags)) {
if (n_retries--) {
os_thread_sleep(1000);
goto retry;
@@ -3622,9 +3846,9 @@ retry:
+ TRX_SYS_RSEG_PAGE_NO + page)
!= FIL_NULL);
- space = mach_read_ulint(TRX_SYS + TRX_SYS_RSEGS
- + TRX_SYS_RSEG_SLOT_SIZE
- + TRX_SYS_RSEG_SPACE + page, MLOG_4BYTES);
+ space = mach_read_from_4(TRX_SYS + TRX_SYS_RSEGS
+ + TRX_SYS_RSEG_SLOT_SIZE
+ + TRX_SYS_RSEG_SPACE + page);
srv_undo_space_id_start = space;
@@ -4356,7 +4580,7 @@ fail:
ut_crc32_init();
crc_init();
- recv_sys_init();
+ recv_sys.create();
xb_filters_init();
@@ -4511,9 +4735,8 @@ fail_before_log_copying_thread_start:
/* copy log file by current position */
log_copy_scanned_lsn = checkpoint_lsn_start;
- recv_sys->recovered_lsn = log_copy_scanned_lsn;
+ recv_sys.recovered_lsn = log_copy_scanned_lsn;
log_optimized_ddl_op = backup_optimized_ddl_op;
- log_truncate = backup_truncate_fail;
if (xtrabackup_copy_logfile())
goto fail_before_log_copying_thread_start;
@@ -4541,7 +4764,7 @@ fail_before_log_copying_thread_start:
DBUG_EXECUTE_IF("check_mdl_lock_works",
dbug_alter_thread_done =
dbug_start_query_thread("ALTER TABLE test.t ADD COLUMN mdl_lock_column int",
- "Waiting for table metadata lock", 1, ER_QUERY_INTERRUPTED););
+ "Waiting for table metadata lock", 0, 0););
}
datafiles_iter_t *it = datafiles_iter_new();
@@ -4777,6 +5000,7 @@ void backup_fix_ddl(CorruptedPages &corrupted_pages)
}
datafiles_iter_free(it);
+ DBUG_EXECUTE_IF("check_mdl_lock_works", DBUG_ASSERT(new_tables.size() == 0););
for (std::set<std::string>::iterator iter = new_tables.begin();
iter != new_tables.end(); iter++) {
const char *space_name = iter->c_str();
@@ -4873,16 +5097,17 @@ xb_space_create_file(
fsp_header_init_fields(page, space_id, flags);
mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, space_id);
- const page_size_t page_size(flags);
+ const ulint zip_size = fil_space_t::zip_size(flags);
- if (!page_size.is_compressed()) {
- buf_flush_init_for_writing(NULL, page, NULL, 0);
+ if (!zip_size) {
+ buf_flush_init_for_writing(
+ NULL, page, NULL, 0,
+ fil_space_t::full_crc32(flags));
ret = os_file_write(IORequestWrite, path, *file, page, 0,
srv_page_size);
} else {
page_zip_des_t page_zip;
- ulint zip_size = page_size.physical();
page_zip_set_size(&page_zip, zip_size);
page_zip.data = page + srv_page_size;
fprintf(stderr, "zip_size = " ULINTPF "\n", zip_size);
@@ -4893,7 +5118,7 @@ xb_space_create_file(
page_zip.m_end = page_zip.m_nonempty =
page_zip.n_blobs = 0;
- buf_flush_init_for_writing(NULL, page, &page_zip, 0);
+ buf_flush_init_for_writing(NULL, page, &page_zip, 0, false);
ret = os_file_write(IORequestWrite, path, *file,
page_zip.data, 0, zip_size);
@@ -5059,19 +5284,20 @@ exit:
}
/* No matching space found. create the new one. */
- const ulint flags = info.page_size.is_compressed()
- ? get_bit_shift(info.page_size.physical()
+ const ulint flags = info.zip_size
+ ? get_bit_shift(info.page_size
>> (UNIV_ZIP_SIZE_SHIFT_MIN - 1))
<< FSP_FLAGS_POS_ZIP_SSIZE
| FSP_FLAGS_MASK_POST_ANTELOPE
| FSP_FLAGS_MASK_ATOMIC_BLOBS
- | (info.page_size.logical() == UNIV_PAGE_SIZE_ORIG
+ | (srv_page_size == UNIV_PAGE_SIZE_ORIG
? 0
- : get_bit_shift(info.page_size.logical()
+ : get_bit_shift(srv_page_size
>> (UNIV_ZIP_SIZE_SHIFT_MIN - 1))
<< FSP_FLAGS_POS_PAGE_SSIZE)
: FSP_FLAGS_PAGE_SSIZE();
- ut_ad(page_size_t(flags).equals_to(info.page_size));
+ ut_ad(fil_space_t::zip_size(flags) == info.zip_size);
+ ut_ad(fil_space_t::physical_size(flags) == info.page_size);
if (fil_space_create(dest_space_name, info.space_id, flags,
FIL_TYPE_TABLESPACE, 0)) {
@@ -5108,7 +5334,7 @@ xtrabackup_apply_delta(
ulint page_in_buffer;
ulint incremental_buffers = 0;
- xb_delta_info_t info(univ_page_size, SRV_TMP_SPACE_ID);
+ xb_delta_info_t info(srv_page_size, 0, SRV_TMP_SPACE_ID);
ulint page_size;
ulint page_size_shift;
byte* incremental_buffer_base = NULL;
@@ -5147,7 +5373,7 @@ xtrabackup_apply_delta(
goto error;
}
- page_size = info.page_size.physical();
+ page_size = info.page_size;
page_size_shift = get_bit_shift(page_size);
msg("page size for %s is %zu bytes",
src_path, page_size);
@@ -5195,9 +5421,9 @@ xtrabackup_apply_delta(
/* first block of block cluster */
offset = ((incremental_buffers * (page_size / 4))
<< page_size_shift);
- success = os_file_read(IORequestRead, src_file,
- incremental_buffer, offset, page_size);
- if (success != DB_SUCCESS) {
+ if (os_file_read(IORequestRead, src_file,
+ incremental_buffer, offset, page_size)
+ != DB_SUCCESS) {
goto error;
}
@@ -5227,10 +5453,10 @@ xtrabackup_apply_delta(
ut_a(last_buffer || page_in_buffer == page_size / 4);
/* read whole of the cluster */
- success = os_file_read(IORequestRead, src_file,
- incremental_buffer,
- offset, page_in_buffer * page_size);
- if (success != DB_SUCCESS) {
+ if (os_file_read(IORequestRead, src_file,
+ incremental_buffer,
+ offset, page_in_buffer * page_size)
+ != DB_SUCCESS) {
goto error;
}
@@ -5276,9 +5502,9 @@ xtrabackup_apply_delta(
}
}
- success = os_file_write(IORequestWrite,
- dst_path, dst_file, buf, off, page_size);
- if (success != DB_SUCCESS) {
+ if (os_file_write(IORequestWrite,
+ dst_path, dst_file, buf, off,
+ page_size) != DB_SUCCESS) {
goto error;
}
}
@@ -5478,7 +5704,7 @@ static ibool xb_process_datadir(const char *path, const char *suffix,
void *func_arg = NULL)
{
ulint ret;
- char dbpath[OS_FILE_MAX_PATH+1];
+ char dbpath[OS_FILE_MAX_PATH+2];
os_file_dir_t dir;
os_file_dir_t dbdir;
os_file_stat_t dbinfo;
@@ -5494,11 +5720,9 @@ static ibool xb_process_datadir(const char *path, const char *suffix,
suffix_len = strlen(suffix);
/* datafile */
- dbdir = os_file_opendir(path, FALSE);
-
- if (dbdir != NULL) {
- ret = fil_file_readdir_next_file(&err, path, dbdir,
- &fileinfo);
+ dbdir = os_file_opendir(path);
+ if (UNIV_UNLIKELY(dbdir != IF_WIN(INVALID_HANDLE_VALUE, nullptr))) {
+ ret = fil_file_readdir_next_file(&err, path, dbdir, &fileinfo);
while (ret == 0) {
if (fileinfo.type == OS_FILE_TYPE_DIR) {
goto next_file_item_1;
@@ -5528,14 +5752,14 @@ next_file_item_1:
}
/* single table tablespaces */
- dir = os_file_opendir(path, FALSE);
+ dir = os_file_opendir(path);
- if (dir == NULL) {
+ if (UNIV_UNLIKELY(dbdir == IF_WIN(INVALID_HANDLE_VALUE, nullptr))) {
msg("Can't open dir %s", path);
+ return TRUE;
}
- ret = fil_file_readdir_next_file(&err, path, dir,
- &dbinfo);
+ ret = fil_file_readdir_next_file(&err, path, dir, &dbinfo);
while (ret == 0) {
if (dbinfo.type == OS_FILE_TYPE_FILE
|| dbinfo.type == OS_FILE_TYPE_UNKNOWN) {
@@ -5551,10 +5775,9 @@ next_file_item_1:
os_normalize_path(dbpath);
- dbdir = os_file_opendir(dbpath, FALSE);
-
- if (dbdir != NULL) {
+ dbdir = os_file_opendir(dbpath);
+ if (dbdir != IF_WIN(INVALID_HANDLE_VALUE, nullptr)) {
ret = fil_file_readdir_next_file(&err, dbpath, dbdir,
&fileinfo);
while (ret == 0) {
@@ -5826,7 +6049,7 @@ static bool xtrabackup_prepare_func(char** argv)
sync_check_init();
ut_d(sync_check_enable());
ut_crc32_init();
- recv_sys_init();
+ recv_sys.create();
log_sys.create();
recv_recovery_on = true;
@@ -5976,7 +6199,7 @@ static bool xtrabackup_prepare_func(char** argv)
// See innobase_end() and thd_destructor_proxy()
while (srv_fast_shutdown == 0 &&
(trx_sys.any_active_transactions() ||
- static_cast<uint>(thread_count) > srv_n_purge_threads + 1))
+ THD_count::value() > srv_n_purge_threads + 1))
os_thread_sleep(1000);
srv_shutdown_bg_undo_sources();
@@ -6134,26 +6357,24 @@ int check_privilege(
}
-/******************************************************************//**
+/**
Check DB user privileges according to the intended actions.
Fetches DB user privileges, determines intended actions based on
command-line arguments and prints missing privileges.
-May terminate application with EXIT_FAILURE exit code.*/
-static void
-check_all_privileges()
+@return whether all the necessary privileges are granted */
+static bool check_all_privileges()
{
if (!mysql_connection) {
/* Not connected, no queries is going to be executed. */
- return;
+ return true;
}
/* Fetch effective privileges. */
std::list<std::string> granted_privileges;
- MYSQL_ROW row = 0;
MYSQL_RES* result = xb_mysql_query(mysql_connection, "SHOW GRANTS",
- true);
- while ((row = mysql_fetch_row(result))) {
+ true);
+ while (MYSQL_ROW row = mysql_fetch_row(result)) {
granted_privileges.push_back(*row);
}
mysql_free_result(result);
@@ -6166,13 +6387,9 @@ check_all_privileges()
check_result |= check_privilege(
granted_privileges,
"RELOAD", "*", "*");
- }
-
- if (!opt_no_lock)
- {
check_result |= check_privilege(
granted_privileges,
- "PROCESS", "*", "*");
+ "PROCESS", "*", "*");
}
/* KILL ... */
@@ -6196,7 +6413,6 @@ check_all_privileges()
}
if (check_result & PRIVILEGE_ERROR) {
- mysql_close(mysql_connection);
msg("Current privileges, as reported by 'SHOW GRANTS': ");
int n=1;
for (std::list<std::string>::const_iterator it = granted_privileges.begin();
@@ -6204,8 +6420,10 @@ check_all_privileges()
it++,n++) {
msg(" %d.%s", n, it->c_str());
}
- die("Insufficient privileges");
+ return false;
}
+
+ return true;
}
bool
@@ -6273,8 +6491,8 @@ xb_init()
return(false);
}
- if (opt_check_privileges) {
- check_all_privileges();
+ if (opt_check_privileges && !check_all_privileges()) {
+ return(false);
}
history_start_time = time(NULL);
}
@@ -6295,11 +6513,23 @@ void setup_error_messages()
die("could not initialize error messages");
}
-void
-handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
+/** Handle mariabackup options. The options are handled with the following
+order:
+
+1) Load server groups and process server options, ignore unknown options
+2) Load client groups and process client options, ignore unknown options
+3) Load backup groups and process client-server options, exit on unknown option
+4) Process --mysqld-args options, ignore unknown options
+
+@param[in] argc arguments count
+@param[in] argv arguments array
+@param[out] argv_server server options including loaded from server groups
+@param[out] argv_client client options including loaded from client groups
+@param[out] argv_backup backup options including loaded from backup groups */
+void handle_options(int argc, char **argv, char ***argv_server,
+ char ***argv_client, char ***argv_backup)
{
/* Setup some variables for Innodb.*/
-
srv_operation = SRV_OPERATION_RESTORE;
files_charset_info = &my_charset_utf8_general_ci;
@@ -6326,49 +6556,64 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
bool prepare = false;
char conf_file[FN_REFLEN];
- int argc_client = argc;
- int argc_server = argc;
- /* scan options for group and config file to load defaults from */
- for (i = 1; i < argc; i++) {
+ // array_elements() will not work for load_defaults, as it is defined
+ // as external symbol, so let's use dynamic array to have ability to
+ // add new server default groups
+ std::vector<const char *> server_default_groups;
- char *optend = strcend(argv[i], '=');
+ for (const char **default_group= load_default_groups; *default_group;
+ ++default_group)
+ server_default_groups.push_back(*default_group);
- if (strncmp(argv[i], "--defaults-group",
- optend - argv[i]) == 0) {
- defaults_group = optend + 1;
- append_defaults_group(defaults_group,
- xb_server_default_groups,
- array_elements(xb_server_default_groups));
- }
-
- if (strncmp(argv[i], "--login-path",
- optend - argv[i]) == 0) {
- append_defaults_group(optend + 1,
- xb_client_default_groups,
- array_elements(xb_client_default_groups));
- }
-
- if (!strncmp(argv[i], "--prepare",
- optend - argv[i])) {
- prepare = true;
- }
-
- if (!strncmp(argv[i], "--apply-log",
- optend - argv[i])) {
- prepare = true;
- }
+ std::vector<char *> mysqld_args;
+ std::vector<char *> mariabackup_args;
+ mysqld_args.push_back(argv[0]);
+ mariabackup_args.push_back(argv[0]);
- if (!strncmp(argv[i], "--target-dir",
- optend - argv[i]) && *optend) {
- target_dir = optend + 1;
- }
+ /* scan options for group and config file to load defaults from */
+ for (i= 1; i < argc; i++)
+ {
+ char *optend= strcend(argv[i], '=');
+ if (mysqld_args.size() > 1 ||
+ strncmp(argv[i], "--mysqld-args", optend - argv[i]) == 0)
+ {
+ mysqld_args.push_back(argv[i]);
+ continue;
+ }
+ else
+ mariabackup_args.push_back(argv[i]);
- if (!*optend && argv[i][0] != '-') {
- target_dir = argv[i];
- }
- }
+ if (strncmp(argv[i], "--defaults-group", optend - argv[i]) == 0)
+ {
+ defaults_group= optend + 1;
+ server_default_groups.push_back(defaults_group);
+ }
+ else if (strncmp(argv[i], "--login-path", optend - argv[i]) == 0)
+ {
+ append_defaults_group(optend + 1, xb_client_default_groups,
+ array_elements(xb_client_default_groups));
+ }
+ else if (!strncmp(argv[i], "--prepare", optend - argv[i]))
+ {
+ prepare= true;
+ }
+ else if (!strncmp(argv[i], "--apply-log", optend - argv[i]))
+ {
+ prepare= true;
+ }
+ else if (!strncmp(argv[i], "--target-dir", optend - argv[i]) &&
+ *optend)
+ {
+ target_dir= optend + 1;
+ }
+ else if (!*optend && argv[i][0] != '-')
+ {
+ target_dir= argv[i];
+ }
+ }
+ server_default_groups.push_back(NULL);
snprintf(conf_file, sizeof(conf_file), "my");
if (prepare && target_dir) {
@@ -6384,10 +6629,17 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
}
}
- *argv_client = argv;
- *argv_server = argv;
- load_defaults_or_exit(conf_file, xb_server_default_groups,
- &argc_server, argv_server);
+ mariabackup_args.push_back(nullptr);
+ *argv_client= *argv_server= *argv_backup= &mariabackup_args[0];
+ int argc_backup= static_cast<int>(mariabackup_args.size() - 1);
+ int argc_client= argc_backup;
+ int argc_server= argc_backup;
+
+ /* 1) Load server groups and process server options, ignore unknown
+ options */
+
+ load_defaults_or_exit(conf_file, &server_default_groups[0],
+ &argc_server, argv_server);
int n;
for (n = 0; (*argv_server)[n]; n++) {};
@@ -6407,7 +6659,6 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
optp->u_max_value = (G_PTR *) &global_max_value;
}
-
/* Throw a descriptive error if --defaults-file or --defaults-extra-file
is not the first command line argument */
for (int i = 2 ; i < argc ; i++) {
@@ -6429,6 +6680,9 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
xb_server_options, xb_get_one_option)))
exit(ho_error);
+ /* 2) Load client groups and process client options, ignore unknown
+ options */
+
load_defaults_or_exit(conf_file, xb_client_default_groups,
&argc_client, argv_client);
@@ -6436,8 +6690,6 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
argc_client = n;
if (innobackupex_mode && argc_client > 0) {
- /* emulate innobackupex script */
- innobackupex_mode = true;
if (!ibx_handle_options(&argc_client, argv_client)) {
exit(EXIT_FAILURE);
}
@@ -6448,18 +6700,76 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
xb_client_options, xb_get_one_option)))
exit(ho_error);
+ /* 3) Load backup groups and process client-server options, exit on
+ unknown option */
+
+ load_defaults_or_exit(conf_file, backup_default_groups, &argc_backup,
+ argv_backup);
+ for (n= 0; (*argv_backup)[n]; n++)
+ {
+ };
+ argc_backup= n;
+
+ my_handle_options_init_variables = FALSE;
+
+ if (argc_backup > 0 &&
+ (ho_error= handle_options(&argc_backup, argv_backup,
+ xb_server_options, xb_get_one_option)))
+ exit(ho_error);
+
+ /* Add back the program name handle_options removes */
+ ++argc_backup;
+ --(*argv_backup);
+
+ if (innobackupex_mode && argc_backup > 0 &&
+ !ibx_handle_options(&argc_backup, argv_backup))
+ exit(EXIT_FAILURE);
+
+ my_getopt_skip_unknown = FALSE;
+
+ if (argc_backup > 0 &&
+ (ho_error= handle_options(&argc_backup, argv_backup,
+ xb_client_options, xb_get_one_option)))
+ exit(ho_error);
+
+ if (opt_password)
+ {
+ char *argument= opt_password;
+ char *start= argument;
+ opt_password= my_strdup(opt_password, MYF(MY_FAE));
+ while (*argument)
+ *argument++= 'x'; // Destroy argument
+ if (*start)
+ start[1]= 0;
+ }
+
+ /* 4) Process --mysqld-args options, ignore unknown options */
+
+ my_getopt_skip_unknown = TRUE;
+
+ int argc_mysqld = static_cast<int>(mysqld_args.size());
+ if (argc_mysqld > 1)
+ {
+ char **argv_mysqld= &mysqld_args[0];
+ if ((ho_error= handle_options(&argc_mysqld, &argv_mysqld,
+ xb_server_options, xb_get_one_option)))
+ exit(ho_error);
+ }
+
+ my_handle_options_init_variables = TRUE;
+
/* Reject command line arguments that don't look like options, i.e. are
not of the form '-X' (single-character options) or '--option' (long
options) */
- for (int i = 0 ; i < argc_client ; i++) {
- const char * const opt = (*argv_client)[i];
+ for (int i = 0 ; i < argc_backup ; i++) {
+ const char * const opt = (*argv_backup)[i];
if (strncmp(opt, "--", 2) &&
!(strlen(opt) == 2 && opt[0] == '-')) {
bool server_option = true;
- for (int j = 0; j < argc_server; j++) {
- if (opt == (*argv_server)[j]) {
+ for (int j = 0; j < argc_backup; j++) {
+ if (opt == (*argv_backup)[j]) {
server_option = false;
break;
}
@@ -6480,7 +6790,9 @@ static int get_exepath(char *buf, size_t size, const char *argv0);
/* ================= main =================== */
int main(int argc, char **argv)
{
- char **client_defaults, **server_defaults;
+ char **server_defaults;
+ char **client_defaults;
+ char **backup_defaults;
my_getopt_prefix_matching= 0;
@@ -6536,7 +6848,8 @@ int main(int argc, char **argv)
mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log,
MY_MUTEX_INIT_FAST);
- handle_options(argc, argv, &client_defaults, &server_defaults);
+ handle_options(argc, argv, &server_defaults, &client_defaults,
+ &backup_defaults);
#ifndef DBUG_OFF
if (dbug_option) {
@@ -6553,8 +6866,9 @@ int main(int argc, char **argv)
ibx_cleanup();
}
- free_defaults(client_defaults);
free_defaults(server_defaults);
+ free_defaults(client_defaults);
+ free_defaults(backup_defaults);
#ifndef DBUG_OFF
if (dbug_option) {
@@ -6778,6 +7092,12 @@ static int get_exepath(char *buf, size_t size, const char *argv0)
ssize_t ret = readlink("/proc/self/exe", buf, size-1);
if(ret > 0)
return 0;
+#elif defined(__APPLE__)
+ size_t ret = proc_pidpath(getpid(), buf, static_cast<uint32_t>(size));
+ if (ret > 0) {
+ buf[ret] = 0;
+ return 0;
+ }
#endif
return my_realpath(buf, argv0, 0);
diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h
index 061057a604f..854456c3afd 100644
--- a/extra/mariabackup/xtrabackup.h
+++ b/extra/mariabackup/xtrabackup.h
@@ -29,11 +29,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
struct xb_delta_info_t
{
- xb_delta_info_t(page_size_t page_size, ulint space_id)
- : page_size(page_size), space_id(space_id) {}
+ xb_delta_info_t(ulint page_size, ulint zip_size, ulint space_id)
+ : page_size(page_size), zip_size(zip_size), space_id(space_id) {}
- page_size_t page_size;
- ulint space_id;
+ ulint page_size;
+ ulint zip_size;
+ ulint space_id;
};
class CorruptedPages
@@ -234,4 +235,53 @@ typedef void (*insert_entry_func_t)(const char*);
void xb_load_list_string(char *list, const char *delimiters,
insert_entry_func_t ins);
void register_ignore_db_dirs_filter(const char *name);
+
+#ifdef _WIN32
+typedef HANDLE os_file_dir_t; /*!< directory stream */
+/** The os_file_opendir() function opens a directory stream corresponding to the
+directory named by the dirname argument. The directory stream is positioned
+at the first entry. In both Unix and Windows we automatically skip the '.'
+and '..' items at the start of the directory listing.
+
+@param[in] dirname directory name; it must not contain a trailing
+ '\' or '/'
+@return directory stream
+@retval INVALID_HANDLE_VALUE on error */
+HANDLE os_file_opendir(const char *dirname);
+# define os_file_closedir(dir) static_cast<void>(FindClose(dir))
+# define os_file_closedir_failed(dir) !FindClose(dir)
+#else
+typedef DIR* os_file_dir_t;
+# define os_file_opendir(dirname) opendir(dirname)
+# define os_file_closedir(dir) static_cast<void>(closedir(dir))
+# define os_file_closedir_failed(dir) closedir(dir)
+#endif
+
+/** This function returns information of the next file in the directory. We jump
+over the '.' and '..' entries in the directory.
+@param[in] dirname directory name or path
+@param[in] dir directory stream
+@param[out] info buffer where the info is returned
+@return 0 if ok, -1 if error, 1 if at the end of the directory */
+int
+os_file_readdir_next_file(
+ const char* dirname,
+ os_file_dir_t dir,
+ os_file_stat_t* info);
+
+/***********************************************************************//**
+A fault-tolerant function that tries to read the next file name in the
+directory. We retry 100 times if os_file_readdir_next_file() returns -1. The
+idea is to read as much good data as we can and jump over bad data.
+@return 0 if ok, -1 if error even after the retries, 1 if at the end
+of the directory */
+int
+fil_file_readdir_next_file(
+/*=======================*/
+ dberr_t* err, /*!< out: this is set to DB_ERROR if an error
+ was encountered, otherwise not changed */
+ const char* dirname,/*!< in: directory name or path */
+ os_file_dir_t dir, /*!< in: directory stream */
+ os_file_stat_t* info); /*!< in/out: buffer where the
+ info is returned */
#endif /* XB_XTRABACKUP_H */
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index d75c3f51319..9880d4d60d7 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -41,24 +41,6 @@ const char *default_dbug_option="d:t:o,/tmp/my_print_defaults.trace";
static struct my_option my_long_options[] =
{
- /*
- NB: --config-file is troublesome, because get_defaults_options() doesn't
- know about it, but we pretend --config-file is like --defaults-file. In
- fact they behave differently: see the comments at the top of
- mysys/default.c for how --defaults-file should behave.
-
- This --config-file option behaves as:
- - If it has a directory name part (absolute or relative), then only this
- file is read; no error is given if the file doesn't exist
- - If the file has no directory name part, the standard locations are
- searched for a file of this name (and standard filename extensions are
- added if the file has no extension)
- */
- {"config-file", 'c', "Deprecated, please use --defaults-file instead. "
- "Name of config file to read; if no extension is given, default "
- "extension (e.g., .ini or .cnf) will be added",
- (char**) &config_file, (char**) &config_file, 0, GET_STR, REQUIRED_ARG,
- 0, 0, 0, 0, 0, 0},
#ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
@@ -66,8 +48,8 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log", (char**) &default_dbug_option,
(char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"defaults-file", 'c', "Like --config-file, except: if first option, "
- "then read this file only, do not read global or per-user config "
+ {"defaults-file", 'c',
+ "Read this file only, do not read global or per-user config "
"files; should be the first option",
(char**) &config_file, (char*) &config_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
@@ -80,11 +62,6 @@ static struct my_option my_long_options[] =
"In addition to the given groups, read also groups with this suffix",
(char**) &my_defaults_group_suffix, (char**) &my_defaults_group_suffix,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"extra-file", 'e',
- "Deprecated. Synonym for --defaults-extra-file.",
- (void *)&my_defaults_extra_file,
- (void *)&my_defaults_extra_file, 0, GET_STR,
- REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"mysqld", 0, "Read the same set of groups that the mysqld binary does.",
&opt_mysqld, &opt_mysqld, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
@@ -107,7 +84,7 @@ static void cleanup_and_exit(int exit_code)
static void version()
{
- printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
+ printf("%s Ver 1.7 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
}
diff --git a/extra/perror.c b/extra/perror.c
index c14b9d5bee5..afbd734ce16 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -87,7 +87,7 @@ static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
- printf("Print a description for a system error code or a MySQL error code.\n");
+ printf("Print a description for a system error code or a MariaDB error code.\n");
printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
my_print_help(my_long_options);
@@ -199,19 +199,22 @@ int get_ER_error_msg(uint code, const char **name_ptr, const char **msg_ptr)
return 0;
}
-#if defined(__WIN__)
+#if defined(_WIN32)
static my_bool print_win_error_msg(DWORD error, my_bool verbose)
{
- LPTSTR s;
- if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ char *s;
+ if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, error, 0, (LPTSTR)&s, 0,
+ NULL, error, 0, (char *)&s, 0,
NULL))
{
+ char* end = s + strlen(s) - 1;
+ while (end > s && (*end == '\r' || *end == '\n'))
+ *end-- = 0;
if (verbose)
- printf("Win32 error code %lu: %s", error, s);
+ printf("Win32 error code %lu: %s\n", error, s);
else
- puts(s);
+ printf("%s\n",s);
LocalFree(s);
return 0;
}
@@ -259,7 +262,7 @@ int main(int argc,char *argv[])
const char *msg;
const char *name;
char *unknown_error = 0;
-#if defined(__WIN__)
+#if defined(_WIN32)
my_bool skip_win_message= 0;
#endif
MY_INIT(argv[0]);
@@ -336,7 +339,7 @@ int main(int argc,char *argv[])
{
found= 1;
if (verbose)
- printf("MySQL error code %3d: %s\n", code, msg);
+ printf("MariaDB error code %3d: %s\n", code, msg);
else
puts(msg);
}
@@ -344,23 +347,23 @@ int main(int argc,char *argv[])
{
found= 1;
if (verbose)
- printf("MySQL error code %3d (%s): %s\n", code, name, msg);
+ printf("MariaDB error code %3d (%s): %s\n", code, name, msg);
else
puts(msg);
}
if (!found)
{
-#if defined(__WIN__)
+#if defined(_WIN32)
if (!(skip_win_message= !print_win_error_msg((DWORD)code, verbose)))
{
#endif
fprintf(stderr,"Illegal error code: %d\n",code);
error=1;
-#if defined(__WIN__)
+#if defined(_WIN32)
}
#endif
}
-#if defined(__WIN__)
+#if defined(_WIN32)
if (!skip_win_message)
print_win_error_msg((DWORD)code, verbose);
#endif
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c
index 6d6adccfe32..b76cc2aa249 100644
--- a/extra/resolve_stack_dump.c
+++ b/extra/resolve_stack_dump.c
@@ -75,7 +75,7 @@ static void print_version(void)
static void usage()
{
print_version();
- printf("MySQL AB, by Sasha Pachev\n");
+ printf("MariaDB Corporation, originally created by Sasha Pachev\n");
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
printf("Resolve numeric stack strace dump into symbols.\n\n");
printf("Usage: %s [OPTIONS] symbols-file [numeric-dump-file]\n",
diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt
new file mode 100644
index 00000000000..35c3b735bdd
--- /dev/null
+++ b/extra/wolfssl/CMakeLists.txt
@@ -0,0 +1,166 @@
+IF(MSVC)
+ PROJECT(wolfssl C ASM_MASM)
+ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
+ PROJECT(wolfssl C ASM)
+ELSE()
+ PROJECT(wolfssl C)
+ENDIF()
+
+IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
+IF(MSVC)
+ SET(WOLFSSL_INTELASM ON)
+ SET(WOLFSSL_X86_64_BUILD 1)
+ SET(HAVE_INTEL_RDSEED 1)
+ SET(HAVE_INTEL_RDRAND 1)
+ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
+ SET(WOLFSSL_X86_64_BUILD 1)
+ IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
+ MESSAGE_ONCE(NO_INTEL_ASSEMBLY "Disable Intel assembly for WolfSSL - compiler is too old")
+ ELSE()
+ IF(WITH_MSAN)
+ MESSAGE_ONCE(MSAN_CANT_HANDLE_IT
+ "Disable Intel assembly for WolfSSL - MSAN can't handle it")
+ ELSE()
+ MY_CHECK_C_COMPILER_FLAG(-maes)
+ MY_CHECK_C_COMPILER_FLAG(-msse4)
+ MY_CHECK_C_COMPILER_FLAG(-mpclmul)
+ IF(have_C__maes AND have_C__msse4 AND have_C__mpclmul)
+ SET(WOLFSSL_INTELASM ON)
+ ENDIF()
+ ENDIF()
+ MY_CHECK_C_COMPILER_FLAG(-mrdrnd)
+ MY_CHECK_C_COMPILER_FLAG(-mrdseed)
+ IF(have_C__mrdrnd)
+ SET(HAVE_INTEL_RDRAND ON)
+ ENDIF()
+ IF(have_C__mrdseed)
+ SET(HAVE_INTEL_RDSEED ON)
+ ENDIF()
+ ENDIF()
+ENDIF()
+ENDIF()
+
+SET(WOLFSSL_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/src)
+ADD_DEFINITIONS(${SSL_DEFINES})
+
+SET(WOLFSSL_SOURCES
+ ${WOLFSSL_SRCDIR}/crl.c
+ ${WOLFSSL_SRCDIR}/internal.c
+ ${WOLFSSL_SRCDIR}/keys.c
+ ${WOLFSSL_SRCDIR}/tls.c
+ ${WOLFSSL_SRCDIR}/wolfio.c
+ ${WOLFSSL_SRCDIR}/ocsp.c
+ ${WOLFSSL_SRCDIR}/ssl.c
+ ${WOLFSSL_SRCDIR}/tls13.c)
+
+ADD_DEFINITIONS(-DWOLFSSL_LIB -DBUILDING_WOLFSSL)
+
+INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl)
+IF(MSVC)
+ # size_t to long truncation warning
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267 -wd4334 -wd4028 -wd4244")
+ENDIF()
+
+ADD_CONVENIENCE_LIBRARY(wolfssl ${WOLFSSL_SOURCES})
+
+# Workaround linker crash with older Ubuntu binutils
+# e.g aborting at ../../bfd/merge.c line 873 in _bfd_merged_section_offset
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ STRING(REPLACE "-g " "-g1 " CMAKE_C_FLAGS_RELWITHDEBINFO
+ ${CMAKE_C_FLAGS_RELWITHDEBINFO})
+ STRING(REPLACE "-g " "-g1 " CMAKE_C_FLAGS_DEBUG
+ ${CMAKE_C_FLAGS_DEBUG})
+ STRING(REPLACE "-ggdb3 " " " CMAKE_C_FLAGS_RELWITHDEBINFO
+ ${CMAKE_C_FLAGS_RELWITHDEBINFO})
+ STRING(REPLACE "-ggdb3 " " " CMAKE_C_FLAGS_DEBUG
+ ${CMAKE_C_FLAGS_DEBUG})
+ENDIF()
+
+SET(WOLFCRYPT_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/wolfcrypt/src)
+SET(WOLFCRYPT_SOURCES
+${WOLFCRYPT_SRCDIR}/aes.c
+${WOLFCRYPT_SRCDIR}/arc4.c
+${WOLFCRYPT_SRCDIR}/asn.c
+${WOLFCRYPT_SRCDIR}/coding.c
+${WOLFCRYPT_SRCDIR}/des3.c
+${WOLFCRYPT_SRCDIR}/dh.c
+${WOLFCRYPT_SRCDIR}/dsa.c
+${WOLFCRYPT_SRCDIR}/ecc.c
+${WOLFCRYPT_SRCDIR}/error.c
+${WOLFCRYPT_SRCDIR}/hmac.c
+${WOLFCRYPT_SRCDIR}/logging.c
+${WOLFCRYPT_SRCDIR}/md4.c
+${WOLFCRYPT_SRCDIR}/md5.c
+${WOLFCRYPT_SRCDIR}/memory.c
+${WOLFCRYPT_SRCDIR}/pkcs12.c
+${WOLFCRYPT_SRCDIR}/pwdbased.c
+${WOLFCRYPT_SRCDIR}/random.c
+${WOLFCRYPT_SRCDIR}/rsa.c
+${WOLFCRYPT_SRCDIR}/sha.c
+${WOLFCRYPT_SRCDIR}/sha256.c
+${WOLFCRYPT_SRCDIR}/sha512.c
+${WOLFCRYPT_SRCDIR}/wc_port.c
+${WOLFCRYPT_SRCDIR}/wc_encrypt.c
+${WOLFCRYPT_SRCDIR}/hash.c
+${WOLFCRYPT_SRCDIR}/wolfmath.c
+${WOLFCRYPT_SRCDIR}/kdf.c
+)
+
+# Use fastmath large number math library.
+IF(NOT (MSVC AND CMAKE_C_COMPILER_ID MATCHES Clang))
+ # Can't use clang-cl with WOLFSSL_FASTMATH
+ # due to https://bugs.llvm.org/show_bug.cgi?id=25305
+ SET(WOLFSSL_FASTMATH 1)
+ENDIF()
+
+IF(WOLFSSL_FASTMATH)
+ SET(USE_FAST_MATH 1)
+ SET(TFM_TIMING_RESISTANT 1)
+ # FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test
+ # WolfSSL will use more stack space with it
+ SET(FP_MAX_BITS 16384)
+ SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/tfm.c)
+ IF((CMAKE_SIZEOF_VOID_P MATCHES 4) AND (CMAKE_SYSTEM_PROCESSOR MATCHES "86")
+ AND (NOT MSVC))
+ # Workaround https://github.com/wolfSSL/wolfssl/issues/4245
+ # On 32bit Intel, to satisfy inline assembly's wish for free registers
+ # 1. use -fomit-frame-pointer
+ # 2. With GCC 4, additionally use -fno-PIC, which works on x86
+ # (modern GCC has PIC optimizations, that make it unnecessary)
+ # The following assumes GCC or Clang
+ SET(TFM_COMPILE_FLAGS "-fomit-frame-pointer")
+ IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "5")
+ SET(TFM_COMPILE_FLAGS "${TFM_COMPILE_FLAGS} -fno-PIC")
+ ENDIF()
+ SET_SOURCE_FILES_PROPERTIES(${WOLFCRYPT_SRCDIR}/tfm.c
+ PROPERTIES COMPILE_FLAGS ${TFM_COMPILE_FLAGS})
+ ENDIF()
+ELSE()
+ SET(WOLFSSL_SP_MATH_ALL 1)
+ SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/sp_int.c)
+ENDIF()
+
+IF(WOLFSSL_X86_64_BUILD)
+ LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/cpuid.c)
+ IF(MSVC)
+ SET(WOLFSSL_AESNI 1)
+ LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/aes_asm.asm)
+ IF(CMAKE_C_COMPILER_ID MATCHES Clang)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -msse4.2 -mpclmul -mrdrnd -mrdseed")
+ ENDIF()
+ ELSEIF(WOLFSSL_INTELASM)
+ SET(WOLFSSL_AESNI 1)
+ SET(USE_INTEL_SPEEDUP 1)
+ LIST(APPEND WOLFCRYPT_SOURCES
+ ${WOLFCRYPT_SRCDIR}/aes_asm.S
+ ${WOLFCRYPT_SRCDIR}/aes_gcm_asm.S
+ ${WOLFCRYPT_SRCDIR}/sha512_asm.S
+ ${WOLFCRYPT_SRCDIR}/sha256_asm.S)
+ ADD_DEFINITIONS(-maes -msse4.2 -mpclmul)
+ ENDIF()
+ENDIF()
+
+CONFIGURE_FILE(user_settings.h.in user_settings.h)
+INCLUDE_DIRECTORIES(${SSL_INCLUDE_DIRS})
+ADD_CONVENIENCE_LIBRARY(wolfcrypt ${WOLFCRYPT_SOURCES})
+
diff --git a/extra/wolfssl/user_settings.h.in b/extra/wolfssl/user_settings.h.in
new file mode 100644
index 00000000000..2355fd1691c
--- /dev/null
+++ b/extra/wolfssl/user_settings.h.in
@@ -0,0 +1,61 @@
+#ifndef WOLFSSL_USER_SETTINGS_H
+#define WOLFSSL_USER_SETTINGS_H
+
+#define HAVE_CRL
+#define WOLFSSL_HAVE_ERROR_QUEUE
+#define WOLFSSL_MYSQL_COMPATIBLE
+#define HAVE_ECC
+#define ECC_TIMING_RESISTANT
+#define HAVE_HASHDRBG
+#define WOLFSSL_AES_DIRECT
+#define WOLFSSL_SHA384
+#define WOLFSSL_SHA512
+#define WOLFSSL_SHA224
+#define SESSION_CERT
+#define KEEP_OUR_CERT
+#define WOLFSSL_STATIC_RSA
+#define WOLFSSL_USER_IO
+#define WC_RSA_BLINDING
+#define HAVE_TLS_EXTENSIONS
+#define HAVE_AES_ECB
+#define HAVE_AESGCM
+#define WOLFSSL_AES_COUNTER
+#define NO_WOLFSSL_STUB
+#define OPENSSL_ALL
+#define WOLFSSL_ALLOW_TLSV10
+#define NO_OLD_TIMEVAL_NAME
+
+/* TLSv1.3 definitions (all needed to build) */
+#define WOLFSSL_TLS13
+#define HAVE_HKDF
+#define HAVE_TLS_EXTENSIONS
+#define HAVE_SUPPORTED_CURVES
+#define HAVE_FFDHE_2048
+#define WC_RSA_PSS
+/* End of TLSv1.3 defines */
+
+/* Features we exclude */
+#define NO_DSA
+#define NO_HC128
+#define NO_MD4
+#define NO_PSK
+#define NO_RABBIT
+#define NO_RC4
+
+/*
+ FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test
+ WolfSSL will use more stack space with it, with fastmath
+*/
+#cmakedefine FP_MAX_BITS 16384
+#define RSA_MAX_SIZE 8192
+#cmakedefine WOLFSSL_AESNI
+#cmakedefine USE_FAST_MATH
+#cmakedefine TFM_TIMING_RESISTANT
+#cmakedefine HAVE_INTEL_RDSEED
+#cmakedefine HAVE_INTEL_RDRAND
+#cmakedefine USE_INTEL_SPEEDUP
+#cmakedefine USE_FAST_MATH
+#cmakedefine WOLFSSL_X86_64_BUILD
+#cmakedefine WOLFSSL_SP_MATH_ALL
+
+#endif /* WOLFSSL_USER_SETTINGS_H */
diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl
new file mode 160000
+Subproject 57aac1c50b45275c7a99eca32ad985998b292dc
diff --git a/extra/yassl/AUTHORS b/extra/yassl/AUTHORS
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/extra/yassl/AUTHORS
+++ /dev/null
diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt
deleted file mode 100644
index 49826d54144..00000000000
--- a/extra/yassl/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
-
-INCLUDE_DIRECTORIES(
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_SOURCE_DIR}/extra/yassl/include
- ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include
- ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
-
-ADD_DEFINITIONS(${SSL_DEFINES})
-SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
- src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
- src/yassl_imp.cpp src/yassl_int.cpp)
-
-ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
-RESTRICT_SYMBOL_EXPORTS(yassl)
-
diff --git a/extra/yassl/COPYING b/extra/yassl/COPYING
deleted file mode 100644
index 98861a5402d..00000000000
--- a/extra/yassl/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/extra/yassl/ChangeLog b/extra/yassl/ChangeLog
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/extra/yassl/ChangeLog
+++ /dev/null
diff --git a/extra/yassl/FLOSS-EXCEPTIONS b/extra/yassl/FLOSS-EXCEPTIONS
deleted file mode 100644
index 47f86ff65f2..00000000000
--- a/extra/yassl/FLOSS-EXCEPTIONS
+++ /dev/null
@@ -1,121 +0,0 @@
-yaSSL FLOSS License Exception
-****************************************
-
-Version 0.2, 31 August 2006
-
-The Sawtooth Consulting Ltd. Exception for Free/Libre and Open Source
-Software-only Applications Using yaSSL Libraries (the "FLOSS Exception").
-
-*Exception Intent*
-
-We want specified Free/Libre and Open Source Software ("FLOSS")
-applications to be able to use specified GPL-licensed yaSSL
-libraries (the "Program") despite the fact that not all FLOSS
-licenses are compatible with version 2 of the GNU General Public
-License (the "GPL").
-
-*Legal Terms and Conditions*
-
-As a special exception to the terms and conditions of version 2.0 of
-the GPL:
-
- 1. You are free to distribute a Derivative Work that is formed
- entirely from the Program and one or more works (each, a "FLOSS
- Work") licensed under one or more of the licenses listed below
- in section 1, as long as:
-
- 1. You obey the GPL in all respects for the Program and the
- Derivative Work, except for identifiable sections of the
- Derivative Work which are not derived from the Program,
- and which can reasonably be considered independent and
- separate works in themselves,
-
- 2. all identifiable sections of the Derivative Work which
- are not derived from the Program, and which can reasonably be
- considered independent and separate works in themselves,
-
- * i
-
- are distributed subject to one of the FLOSS licenses
- listed below, and
-
- * ii
-
- the object code or executable form of those sections are
- accompanied by the complete corresponding machine-readable
- source code for those sections on the same medium and under
- the same FLOSS license as the corresponding object code or
- executable forms of those sections, and
-
-
- 3. any works which are aggregated with the Program or with
- a Derivative Work on a volume of a storage or distribution
- medium in accordance with the GPL, can reasonably be considered
- independent and separate works in themselves which are not
- derivatives of either the Program, a Derivative Work or a FLOSS
- Work.
-
-
- If the above conditions are not met, then the Program may only be
- copied, modified, distributed or used under the terms and
- conditions of the GPL or another valid licensing option from
- Sawtooth Consulting Ltd.
-
- 2. FLOSS License List
-
- *License name* *Version(s)/Copyright Date*
- Academic Free License 2.0
- Apache Software License 1.0/1.1/2.0
- Apple Public Source License 2.0
- Artistic license From Perl 5.8.0
- BSD license "July 22 1999"
- Common Development and Distribution License (CDDL) 1.0
- Common Public License 1.0
- GNU Library or "Lesser" General Public 2.0/2.1
- License (LGPL)
- Jabber Open Source License 1.0
- MIT license -
- Mozilla Public License (MPL) 1.0/1.1
- Open Software License 2.0
- PHP License 3.0
- Python license (CNRI Python License) -
- Python Software Foundation License 2.1.1
- Sleepycat License "1999"
- University of Illinois/NCSA Open Source License -
- W3C License "2001"
- X11 License "2001"
- Zlib/libpng License -
- Zope Public License 2.0
-
- Due to the many variants of some of the above licenses, we require
- that any version follow the 2003 version of the Free Software
- Foundation's Free Software Definition
- (http://www.gnu.org/philosophy/free-sw.html
- (http://www.gnu.org/philosophy/free-sw.html)) or version 1.9 of
- the Open Source Definition by the Open Source Initiative
- (http://www.opensource.org/docs/definition.php
- (http://www.opensource.org/docs/definition.php)).
-
- 3. Definitions
-
- 1. Terms used, but not defined, herein shall have the
- meaning provided in the GPL.
-
- 2. Derivative Work means a derivative work under copyright
- law.
-
-
- 4. Applicability This FLOSS Exception applies to all Programs that
- contain a notice placed by Sawtooth Consulting Ltd. saying that the
- Program may be distributed under the terms of this FLOSS Exception.
- If you create or distribute a work which is a Derivative Work of
- both the Program and any other work licensed under the GPL, then
- this FLOSS Exception is not available for that work; thus, you
- must remove the FLOSS Exception notice from that work and
- comply with the GPL in all respects, including by retaining all
- GPL notices. You may choose to redistribute a copy of the
- Program exclusively under the terms of the GPL by removing the
- FLOSS Exception notice from that copy of the Program, provided
- that the copy has never been modified by you or any third party.
-
-
diff --git a/extra/yassl/INSTALL b/extra/yassl/INSTALL
deleted file mode 100644
index 5458714e1e2..00000000000
--- a/extra/yassl/INSTALL
+++ /dev/null
@@ -1,234 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006 Free Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug. Until the bug is fixed you can use this workaround:
-
- CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
- Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
-
diff --git a/extra/yassl/NEWS b/extra/yassl/NEWS
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/extra/yassl/NEWS
+++ /dev/null
diff --git a/extra/yassl/README b/extra/yassl/README
deleted file mode 100644
index de1bf5132aa..00000000000
--- a/extra/yassl/README
+++ /dev/null
@@ -1,786 +0,0 @@
-*** Note, Please read ***
-
-yaSSL takes a different approach to certificate verification than OpenSSL does.
-The default policy for the client is to verify the server, this means that if
-you don't load CAs to verify the server you'll get a connect error, unable to
-verify. It you want to mimic OpenSSL behavior of not verifying the server and
-reducing security you can do this by calling:
-
-SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
-
-before calling SSL_new();
-
-*** end Note ***
-
-yaSSL Release notes, version 2.4.4 (8/8/2017)
- This release of yaSSL fixes an interop issue. A fix for detecting cipher
- suites with non leading zeros is included as yaSSL only supports cipher
- suites with leading zeros. Thanks for the report from Security Innovation
- and Oracle.
-
- Users interoping with other SSL stacks should update.
-
-yaSSL Release notes, version 2.4.2 (9/22/2016)
- This release of yaSSL fixes a medium security vulnerability. A fix for
- potential AES side channel leaks is included that a local user monitoring
- the same CPU core cache could exploit. VM users, hyper-threading users,
- and users where potential attackers have access to the CPU cache will need
- to update if they utilize AES.
-
- DSA padding fixes for unusual sizes is included as well. Users with DSA
- certficiates should update.
-
-yaSSL Release notes, version 2.4.0 (5/20/2016)
- This release of yaSSL fixes the OpenSSL compatibility function
- SSL_CTX_load_verify_locations() when using the path directory to allow
- unlimited path sizes. Minor Windows build fixes are included.
- No high level security fixes in this version but we always recommend
- updating.
-
-
-yaSSL Release notes, version 2.3.9b (2/03/2016)
- This release of yaSSL fixes the OpenSSL compatibility function
- X509_NAME_get_index_by_NID() to use the actual index of the common name
- instead of searching on the format prefix. Thanks for the report from
- yashwant.sahu@oracle.com . Anyone using this function should update.
-
-yaSSL Release notes, version 2.3.9 (12/01/2015)
- This release of yaSSL fixes two client side Diffie-Hellman problems.
- yaSSL was only handling the cases of zero or one leading zeros for the key
- agreement instead of potentially any number. This caused about 1 in 50,000
- connections to fail when using DHE cipher suites. The second problem was
- the case where a server would send a public value shorter than the prime
- value, causing about 1 in 128 client connections to fail, and also
- caused the yaSSL client to read off the end of memory. All client side
- DHE cipher suite users should update.
- Thanks to Adam Langely (agl@imperialviolet.org) for the detailed report!
-
-yaSSL Release notes, version 2.3.8 (9/17/2015)
- This release of yaSSL fixes a high security vulnerability. All users
- SHOULD update. If using yaSSL for TLS on the server side with private
- RSA keys allowing ephemeral key exchange you MUST update and regenerate
- the RSA private keys. This report is detailed in:
- https://people.redhat.com/~fweimer/rsa-crt-leaks.pdf
- yaSSL now detects RSA signature faults and returns an error.
-
-yaSSL Patch notes, version 2.3.7e (6/26/2015)
- This release of yaSSL includes a fix for Date less than comparison.
- Previously yaSSL would return true on less than comparisons if the Dates
- were equal. Reported by Oracle. No security problem, but if a cert was
- generated right now, a server started using it in the same second, and a
- client tried to verify it in the same second it would report not yet valid.
-
-yaSSL Patch notes, version 2.3.7d (6/22/2015)
- This release of yaSSL includes a fix for input_buffer set_current with
- index 0. SSL_peek() at front of waiting data could trigger. Robert
- Golebiowski of Oracle identified and suggested a fix, thanks!
-
-yaSSL Patch notes, version 2.3.7c (6/12/2015)
- This release of yaSSL does certificate DATE comparisons to the second
- instead of to the minute, helpful when using freshly generated certs.
- Though keep in mind that time sync differences could still show up.
-
-yaSSL Patch notes, version 2.3.7b (3/18/2015)
- This release of yaSSL fixes a potential crash with corrupted private keys.
- Also detects bad keys earlier for user.
-
-yaSSL Release notes, version 2.3.7 (12/10/2014)
- This release of yaSSL fixes the potential to process duplicate handshake
- messages by explicitly marking/checking received handshake messages.
-
-yaSSL Release notes, version 2.3.6 (11/25/2014)
-
- This release of yaSSL fixes some valgrind warnings/errors including
- uninitialized reads and off by one index errors induced from fuzzing
- the handshake. These were reported by Oracle.
-
-yaSSL Release notes, version 2.3.5 (9/29/2014)
-
- This release of yaSSL fixes an RSA Padding check vulnerability reported by
- Intel Security Advanced Threat Research team
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-yaSSL Release notes, version 2.3.4 (8/15/2014)
-
- This release of yaSSL adds checking to the input_buffer class itself.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-yaSSL Release notes, version 2.3.2 (7/25/2014)
-
- This release of yaSSL updates test certs.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 2.3.0 (12/5/2013)
-
- This release of yaSSL updates asm for newer GCC versions.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 2.2.3 (4/23/2013)
-
- This release of yaSSL updates the test certificates as they were expired
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 2.2.2d (2/5/2013)
-
- This release of yaSSL contains countermeasuers for the Lucky 13 TLS 1.1
- CBC timing padding attack identified by Nadhem AlFardan and Kenneth Paterson
- see: http://www.isg.rhul.ac.uk/tls/
-
- It also adds SHA2 certificate verification and better checks for malicious
- input.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 2.2.2 (7/5/2012)
-
- This release of yaSSL contains bug fixes and more security checks around
- malicious certificates.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 2.1.2 (9/2/2011)
-
- This release of yaSSL contains bug fixes, better non-blocking support with
- SSL_write, and OpenSSL RSA public key format support.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 2.0.0 (7/6/2010)
-
- This release of yaSSL contains bug fixes, new testing certs,
- and a security patch for a potential heap overflow on forged application
- data processing. Vulnerability discovered by Matthieu Bonetti from VUPEN
- Security http://www.vupen.com.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.9.9 (1/26/2010)
-
- This release of yaSSL contains bug fixes, the removal of assert() s and
- a security patch for a buffer overflow possibility in certificate name
- processing.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.9.8 (10/14/09)
-
- This release of yaSSL contains bug fixes and adds new stream ciphers
- Rabbit and HC-128
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.9.6 (11/13/08)
-
- This release of yaSSL contains bug fixes, adds autconf shared library
- support and has better server suite detection based on certficate and
- private key.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.9.2 (9/24/08)
-
- This release of yaSSL contains bug fixes and improved certificate verify
- callback support.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.8.8 (5/7/08)
-
- This release of yaSSL contains bug fixes, and better socket handling.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.8.6 (1/31/08)
-
- This release of yaSSL contains bug fixes, and fixes security problems
- associated with using SSL 2.0 client hellos and improper input handling.
- Please upgrade to this version if you are using a previous one.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.7.5 (10/15/07)
-
- This release of yaSSL contains bug fixes, adds MSVC 2005 project support,
- GCC 4.2 support, IPV6 support and test, and new test certificates.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.7.2 (8/20/07)
-
- This release of yaSSL contains bug fixes and adds initial OpenVPN support.
- Just configure at this point and beginning of build.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.6.8 (4/16/07)
-
- This release of yaSSL contains bug fixes and adds SHA-256, SHA-512, SHA-224,
- and SHA-384.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-
-*****************yaSSL Release notes, version 1.6.0 (2/22/07)
-
- This release of yaSSL contains bug fixes, portability enhancements, and
- better X509 support.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0 and note in 1.5.8.
-
-*****************yaSSL Release notes, version 1.5.8 (1/10/07)
-
- This release of yaSSL contains bug fixes, portability enhancements, and
- support for GCC 4.1.1 and vs2005 sp1.
-
-
-
- Since yaSSL now supports zlib, as does libcurl, the libcurl build test can
- fail if yaSSL is built with zlib support since the zlib library isn't
- passed. You can do two things to fix this:
-
- 1) build yaSSL w/o zlib --without-zlib
- 2) or add flags to curl configure LDFLAGS="-lm -lz"
-
-
-
-*****************yaSSL Release notes, version 1.5.0 (11/09/06)
-
- This release of yaSSL contains bug fixes, portability enhancements,
- and full TLS 1.1 support. Use the functions:
-
- SSL_METHOD *TLSv1_1_server_method(void);
- SSL_METHOD *TLSv1_1_client_method(void);
-
- or the SSLv23 versions (even though yaSSL doesn't support SSL 2.0 the v23
- means to pick the highest of SSL 3.0, TLS 1.0, or TLS 1.1).
-
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0.
-
-
-
-****************yaSSL Release notes, version 1.4.5 (10/15/06)
-
-
- This release of yaSSL contains bug fixes, portability enhancements,
- zlib compression support, removal of assembly instructions at runtime if
- not supported, and initial TLS 1.1 support.
-
-
- Compression Notes: yaSSL uses zlib for compression and the compression
- should only be used if yaSSL is at both ends because the implementation
- details aren't yet standard. If you'd like to turn compression on use
- the SSL_set_compression() function on the client before calling
- SSL_connect(). If both the client and server were built with zlib support
- then the connection will use compression. If the client isn't built with
- support then SSL_set_compression() will return an error (-1).
-
- To build yaSSL with zlib support on Unix simply have zlib support on your
- system and configure will find it if it's in the standard locations. If
- it's somewhere else use the option ./configure --with-zlib=DIR. If you'd
- like to disable compression support in yaSSL use ./configure --without-zlib.
-
- To build yaSSL with zlib support on Windows:
-
- 1) download zlib from http://www.zlib.net/
- 2) follow the instructions in zlib from projects/visualc6/README.txt
- for how to add the zlib project into the yaSSL workspace noting that
- you'll need to add configuration support for "Win32 Debug" and
- "Win32 Release" in note 3 under "To use:".
- 3) define HAVE_LIBZ when building yaSSL
-
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0.
-
-
-********************yaSSL Release notes, version 1.4.0 (08/13/06)
-
-
- This release of yaSSL contains bug fixes, portability enhancements,
- nonblocking connect and accept, better OpenSSL error mapping, and
- certificate caching for session resumption.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0.
-
-
-********************yaSSL Release notes, version 1.3.7 (06/26/06)
-
-
- This release of yaSSL contains bug fixes, portability enhancements,
- and libcurl 7.15.4 support (any newer versions may not build).
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0.
-
-
-********************yaSSL Release notes, version 1.3.5 (06/01/06)
-
-
- This release of yaSSL contains bug fixes, portability enhancements,
- better libcurl support, and improved non-blocking I/O.
-
-See normal build instructions below under 1.0.6.
-See libcurl build instructions below under 1.3.0.
-
-
-********************yaSSL Release notes, version 1.3.0 (04/26/06)
-
-
- This release of yaSSL contains minor bug fixes, portability enhancements,
- and libcurl support.
-
-See normal build instructions below under 1.0.6.
-
-
---To build for libcurl on Linux, Solaris, *BSD, Mac OS X, or Cygwin:
-
- To build for libcurl the library needs to be built without C++ globals since
- the linker will be called in a C context, also libcurl configure will expect
- OpenSSL library names so some symbolic links are created.
-
- ./configure --enable-pure-c
- make
- make openssl-links
-
- (then go to your libcurl home and tell libcurl about yaSSL build dir)
- ./configure --with-ssl=/yaSSL-BuildDir LDFLAGS=-lm
- make
-
-
---To build for libcurl on Win32:
-
- Simply add the yaSSL project as a dependency to libcurl, add
- yaSSL-Home\include and yaSSL-Home\include\openssl to the include list, and
- define USE_SSLEAY and USE_OPENSSL
-
- please email todd@yassl.com if you have any questions.
-
-
-*******************yaSSL Release notes, version 1.2.2 (03/27/06)
-
-
- This release of yaSSL contains minor bug fixes and portability enhancements.
-
-See build instructions below under 1.0.6:
-
-
-
-*******************yaSSL Release notes, version 1.2.0
-
-
- This release of yaSSL contains minor bug fixes, portability enhancements,
- Diffie-Hellman compatibility fixes for other servers and client,
- optimization improvements, and x86 ASM changes.
-
-See build instructions below under 1.0.6:
-
-
-
-*****************yaSSL Release notes, version 1.1.5
-
- This release of yaSSL contains minor bug fixes, portability enhancements,
- and user requested changes including the ability to add all certificates in
- a directory, more robust socket handling, no new overloading unless
- requested, and an SSL_VERIFY_NONE option.
-
-
-See build instructions below under 1.0.6:
-
-
-
-******************yaSSL Release notes, version 1.0.6
-
-This release of yaSSL contains minor bug fixes, portability enhancements,
-x86 assembly for ARC4, SHA, MD5, and RIPEMD, --enable-ia32-asm configure
-option, and a security patch for certificate chain processing.
-
---To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin:
-
- ./configure
- make
-
- run testsuite from yaSSL-Home/testsuite to test the build
-
-to make a release build:
-
- ./configure --disable-debug
- make
-
- run testsuite from yaSSL-Home/testsuite to test the build
-
-
---To build on Win32
-
-Choose (Re)Build All from the project workspace
-
-run Debug\testsuite.exe from yaSSL-Home\testsuite to test the build
-
-
-
-***************** yaSSL Release notes, version 1.0.5
-
-This release of yaSSL contains minor bug fixes, portability enhancements,
-x86 assembly for AES, 3DES, BLOWFISH, and TWOFISH, --without-debug configure
-option, and --enable-kernel-mode configure option for using TaoCrypt with
-kernel modules.
-
---To build on Linux, Solaris, *BSD, Mac OS X, or Cygwin:
-
- ./configure
- make
-
- run testsuite from yaSSL-Home/testsuite to test the build
-
-to make a release build:
-
- ./configure --without-debug
- make
-
- run testsuite from yaSSL-Home/testsuite to test the build
-
-
---To build on Win32
-
-Choose (Re)Build All from the project workspace
-
-run Debug\testsuite.exe from yaSSL-Home\testsuite to test the build
-
-
-******************yaSSL Release notes, version 1.0.1
-
-This release of yaSSL contains minor bug fixes, portability enhancements,
-GCC 3.4.4 support, MSVC 2003 support, and more documentation.
-
-Please see build instructions in the release notes for 0.9.6 below.
-
-
-******************yaSSL Release notes, version 1.0
-
-This release of yaSSL contains minor bug fixes, portability enhancements,
-GCC 4.0 support, testsuite, improvements, and API additions.
-
-Please see build instructions in the release notes for 0.9.6 below.
-
-
-******************yaSSL Release notes, version 0.9.9
-
-This release of yaSSL contains minor bug fixes, portability enchancements,
-MSVC 7 support, memory improvements, and API additions.
-
-Please see build instructions in the release notes for 0.9.6 below.
-
-
-******************yaSSL Release notes, version 0.9.8
-
-This release of yaSSL contains minor bug fixes and portability enchancements.
-
-Please see build instructions in the release notes for 0.9.6 below.
-
-
-******************yaSSL Release notes, version 0.9.6
-
-This release of yaSSL contains minor bug fixes, removal of STL support, and
-removal of exceptions and rtti so that the library can be linked without the
-std c++ library.
-
---To build on Linux, Solaris, FreeBSD, Mac OS X, or Cygwin
-
-./configure
-make
-
-run testsuite from yaSSL-Home/testsuite to test the build
-
-
---To build on Win32
-
-Choose (Re)Build All from the project workspace
-
-run Debug\testsuite.exe from yaSSL-Home\testsuite to test the build
-
-
-
-******************yaSSL Release notes, version 0.9.2
-
-This release of yaSSL contains minor bug fixes, expanded certificate
-verification and chaining, and improved documentation.
-
-Please see build instructions in release notes 0.3.0.
-
-
-
-******************yaSSL Release notes, version 0.9.0
-
-This release of yaSSL contains minor bug fixes, client verification handling,
-hex and base64 encoing/decoding, and an improved test suite.
-
-Please see build instructions in release notes 0.3.0.
-
-
-******************yaSSL Release notes, version 0.8.0
-
-This release of yaSSL contains minor bug fixes, and initial porting effort to
-64bit, BigEndian, and more UNIX systems.
-
-Please see build instructions in release notes 0.3.0.
-
-
-******************yaSSL Release notes, version 0.6.0
-
-This release of yaSSL contains minor bug fixes, source cleanup, and binary beta
-(1) of the yaSSL libraries.
-
-Please see build instructions in release notes 0.3.0.
-
-
-
-******************yaSSL Release notes, version 0.5.0
-
-This release of yaSSL contains minor bug fixes, full session resumption
-support, and initial testing suite support.
-
-
-
-Please see build instructions in release notes 0.3.0.
-
-
-
-******************yaSSL Release notes, version 0.4.0
-
-This release of yaSSL contains minor bug fixes, an optional memory tracker,
-an echo client and server with input/output redirection for load testing,
-and initial session caching support.
-
-
-Please see build instructions in release notes 0.3.0.
-
-
-******************yaSSL Release notes, version 0.3.5
-
-This release of yaSSL contains minor bug fixes and extensions to the crypto
-library including a full test suite.
-
-
-*******************yaSSL Release notes, version 0.3.0
-
-This release of yaSSL contains minor bug fixes and extensions to the crypto
-library including AES and an improved random number generator. GNU autoconf
-and automake are now used to simplify the build process on Linux.
-
-*** Linux Build process
-
-./configure
-make
-
-*** Windows Build process
-
-open the yassl workspace and build the project
-
-
-*******************yaSSL Release notes, version 0.2.9
-
-This release of yaSSL contains minor bug fixes and extensions to the crypto
-library.
-
-See the notes at the bottom of this page for build instructions.
-
-
-*******************yaSSL Release notes, version 0.2.5
-
-This release of yaSSL contains minor bug fixes and a beta binary of the yaSSL
-libraries for win32 and linux.
-
-See the notes at the bottom of this page for build instructions.
-
-
-
-*******************yaSSL Release notes, version 0.2.0
-
-This release of yaSSL contains minor bug fixes and initial alternate crypto
-functionality.
-
-*** Complete Build ***
-
-See the notes in Readme.txt for build instructions.
-
-*** Update Build ***
-
-If you have already done a complete build of yaSSL as described in the release
-0.0.1 - 0.1.0 notes and downloaded the update to 0.2.0, place the update file
-yassl-update-0.2.0.tar.gz in the yaSSL home directory and issue the command:
-
-gzip -cd yassl-update-0.2.0.tar.gz | tar xvf -
-
-to update the previous release.
-
-Then issue the make command on linux or rebuild the yaSSL project on Windows.
-
-*******************yaSSL Release notes, version 0.1.0
-
-This release of yaSSL contains minor bug fixes, full client and server TLSv1
-support including full ephemeral Diffie-Hellman support, SSL type RSA and DSS
-signing and verification, and initial stunnel 4.05 build support.
-
-
-
-*********************yaSSL Release notes, version 0.0.3
-
-The third release of yaSSL contains minor bug fixes, client certificate
-enhancements, and initial ephemeral Diffie-Hellman integration:
-
-
-
-*********************
-
-yaSSL Release notes, version 0.0.2
-
-The second release of yaSSL contains minor bug fixes, client certificate
-enhancements, session resumption, and improved TLS support including:
-
-- HMAC for MD5 and SHA-1
-- PRF (pseudo random function)
-- Master Secret and Key derivation routines
-- Record Authentication codes
-- Finish verify data check
-
-Once ephemeral RSA and DH are added yaSSL will be fully complaint with TLS.
-
-
-
-**********************
-
-yassl Release notes, version 0.0.1
-
-The first release of yassl supports normal RSA mode SSLv3 connections with
-support for SHA-1 and MD5 digests. Ciphers include DES, 3DES, and RC4.
-
-yassl uses the CryptoPP library for cryptography, the source is available at
-www.cryptopp.com .
-
-yassl uses CML (the Certificate Management Library) for x509 support. More
-features will be in future versions. The CML source is available for download
-from www.digitalnet.com/knowledge/cml_home.htm .
-
-The next release of yassl will support the 3 lesser-used SSL connection modes;
-HandShake resumption, Ephemeral RSA (or DH), and Client Authentication as well
-as full support for TLS. Backwards support for SSLv2 is not planned at this
-time.
-
-
-**********************
-
-Building yassl on linux:
-
-use the ./buildall script to build everything.
-
-buildall will configure and build CML, CryptoPP, and yassl. Testing was
-preformed with gcc version 3.3.2 on kernel 2.4.22.
-
-
-**********************
-
-Building yassl on Windows:
-
-Testing was preformed on Windows 2000 with Visual C++ 6 sp5.
-
-1) decompress esnacc_r16.tgz in place, see buildall for syntax if unsure
-
-2) decompress smp_r23.tgz in place
-
-3) unzip cryptopp51/crypto51.zip in place
-
-4) Build SNACC (part of CML) using snacc_builds.dsw in the SNACC directory
-
-5) Build SMP (part of CMP) using smp.dsw in the smp directory
-
-6) Build yassl using yassl.dsw
-
-
-**********************
-
-examples, server and client:
-
-Please see the server and client examples in both versions to see how to link
-to yassl and the support libraries. On linux do 'make server' and 'make
-client' to build them. On Windows you will find the example projects in the
-main workspace, yassl.dsw.
-
-The example server and client are compatible with openssl.
-
-
-**********************
-
-Building yassl into mysql on linux:
-
-Testing was done using mysql version 4.0.17.
-
-alter openssl_libs in the configure file, line 21056. Change '-lssl -lcrypto'
-to '-lyassl -lcryptopp -lcmapi -lcmlasn -lctil -lc++asn1'.
-
-see build/config_command for the configure command used to configure mysql
-please change /home/touska/ to the relevant directory of course.
-
-add yassl/lib to the LD_LIBRARY_PATH because libmysql/conf_to_src does not
-use the ssl lib directory though it does use the ssl libraries.
-
-make
-
-make install
-
-
-*********************
-
-License: yassl is currently under the GPL, please see license information
-in the source and include files.
-
-
-*********************
-
-Contact: please send comments or questions to Todd A Ouska at todd@yassl.com
-and/or Larry Stefonic at larry@yassl.com.
-
-
-
diff --git a/extra/yassl/certs/ca-cert.pem b/extra/yassl/certs/ca-cert.pem
deleted file mode 100644
index 7e64eb47961..00000000000
--- a/extra/yassl/certs/ca-cert.pem
+++ /dev/null
@@ -1,87 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEqjCCA5KgAwIBAgIJAJpBR82hFGKMMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
-VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G
-A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3
-dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
-Fw0xNDA3MTEwMzIwMDhaFw0xNzA0MDYwMzIwMDhaMIGUMQswCQYDVQQGEwJVUzEQ
-MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8GA1UECgwIU2F3
-dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns
-LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAL8Myi0Ush6EQlvNOB9K8k11EPG2NZ/fyn0D
-mNOs3gNm7irx2LB9bgdUCxCYIU2AyxIg58xP3kV9yXJ3MurKkLtpUhADL6jzlcXx
-i2JWG+9nb6QQQZWtCpvjpcCw0nB2UDBbqOgILHztp6J6jTgpHKzH7fJ8lbCVgn1J
-XDjNdyXvvYB1U5Q8PcpjW58VtdMdEy8Z0TzbdjrMuH3J5cLX2kBv2CHccxtCLVOc
-/hr8fat6Nj+Y3oR8BWfOahQ4h6nxjLVoy2h/cSAr9aBj9VYvoybSt2+xWhfXOJkI
-/pNYb/7DE0kIFgunTWcAUjFnI06Y7VFFHbkE2Qvs2CizS73tNnkCAwEAAaOB/DCB
-+TAdBgNVHQ4EFgQUJ45nEXTDJh0/7TNjs6TYHTDl6NUwgckGA1UdIwSBwTCBvoAU
-J45nEXTDJh0/7TNjs6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD
-VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290
-aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t
-MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYD
-VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAeXgMbXmIkfw6FZz5J2IW8CEf
-+n0/oqgyHvfyEal0FnRe3BjK8AAq1QMGJjDxR4P9Mm787apPfQxjYDEvfAy/mWaH
-7ScIhi3EM+iYIxz+o9uaSU78WkLvccM/rdxKqNKjHQmsMwR7hvNtAFmjyNvRPHP2
-DpDWXkngvzZjCHulsI81O1aMETVJBBzQ57pWxQ0KkY3Wt2IZNBJSTNJtfMU9DxiB
-VMv2POWE0tZxFewaNAvwoCF0Q8ijsN/ZZ9rirZNI+KCHvXkU4GIK3/cxLjF70TIq
-Cv5dFO/ZZFDkg5G8cA3XiI3ZvIQOxRqzv2QCTlGRpKKFFYOv8FubKElfsrMD2A==
------END CERTIFICATE-----
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- 9a:41:47:cd:a1:14:62:8c
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Validity
- Not Before: Jul 11 03:20:08 2014 GMT
- Not After : Apr 6 03:20:08 2017 GMT
- Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- Public-Key: (2048 bit)
- Modulus:
- 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a:
- f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac:
- de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98:
- 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77:
- 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1:
- 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3:
- a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed:
- a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95:
- 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c:
- 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db:
- 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc:
- 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98:
- de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68:
- cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2:
- b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3:
- 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98:
- ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed:
- 36:79
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- X509v3 Authority Key Identifier:
- keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- serial:9A:41:47:CD:A1:14:62:8C
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: sha1WithRSAEncryption
- 79:78:0c:6d:79:88:91:fc:3a:15:9c:f9:27:62:16:f0:21:1f:
- fa:7d:3f:a2:a8:32:1e:f7:f2:11:a9:74:16:74:5e:dc:18:ca:
- f0:00:2a:d5:03:06:26:30:f1:47:83:fd:32:6e:fc:ed:aa:4f:
- 7d:0c:63:60:31:2f:7c:0c:bf:99:66:87:ed:27:08:86:2d:c4:
- 33:e8:98:23:1c:fe:a3:db:9a:49:4e:fc:5a:42:ef:71:c3:3f:
- ad:dc:4a:a8:d2:a3:1d:09:ac:33:04:7b:86:f3:6d:00:59:a3:
- c8:db:d1:3c:73:f6:0e:90:d6:5e:49:e0:bf:36:63:08:7b:a5:
- b0:8f:35:3b:56:8c:11:35:49:04:1c:d0:e7:ba:56:c5:0d:0a:
- 91:8d:d6:b7:62:19:34:12:52:4c:d2:6d:7c:c5:3d:0f:18:81:
- 54:cb:f6:3c:e5:84:d2:d6:71:15:ec:1a:34:0b:f0:a0:21:74:
- 43:c8:a3:b0:df:d9:67:da:e2:ad:93:48:f8:a0:87:bd:79:14:
- e0:62:0a:df:f7:31:2e:31:7b:d1:32:2a:0a:fe:5d:14:ef:d9:
- 64:50:e4:83:91:bc:70:0d:d7:88:8d:d9:bc:84:0e:c5:1a:b3:
- bf:64:02:4e:51:91:a4:a2:85:15:83:af:f0:5b:9b:28:49:5f:
- b2:b3:03:d8
diff --git a/extra/yassl/certs/ca-key.pem b/extra/yassl/certs/ca-key.pem
deleted file mode 100644
index 774feba0548..00000000000
--- a/extra/yassl/certs/ca-key.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEAvwzKLRSyHoRCW804H0ryTXUQ8bY1n9/KfQOY06zeA2buKvHY
-sH1uB1QLEJghTYDLEiDnzE/eRX3Jcncy6sqQu2lSEAMvqPOVxfGLYlYb72dvpBBB
-la0Km+OlwLDScHZQMFuo6AgsfO2nonqNOCkcrMft8nyVsJWCfUlcOM13Je+9gHVT
-lDw9ymNbnxW10x0TLxnRPNt2Osy4fcnlwtfaQG/YIdxzG0ItU5z+Gvx9q3o2P5je
-hHwFZ85qFDiHqfGMtWjLaH9xICv1oGP1Vi+jJtK3b7FaF9c4mQj+k1hv/sMTSQgW
-C6dNZwBSMWcjTpjtUUUduQTZC+zYKLNLve02eQIDAQABAoIBAD1uTmAahH+dhXzh
-Swd84NaZKt6d+TY0DncOPgjqT+UGJtT2OPffDQ8cLgai9CponGNy4zXmBJGRtcGx
-pFSs18b7QaDWdW+9C06/sVLoX0kmmFZHx97p6jxgAb8o3DG/SV+TSYd6gVuWS03K
-XDhPt+Gy08ch2jwShwfkG9xD7OjsVGHn9u2mCy7134J/xh9hGZykgznfIYWJb3ev
-hhUyCKJaCyZh+3AMypw4fbwi7uujqBYA+YqAHgCEqEpB+IQDZy8jWy+baybDBzSU
-owM7ctWfcuCtzDSrvcfV9SYwhQ8wIzlS/zzLmSFNiKWr7mK5x+C7R4fBac9z8zC+
-zjkEnOUCgYEA4XZFgFm200nfCu8S1g/wt8sqN7+n+LVN9TE1reSjlKHb8ZattQVk
-hYP8G1spqr74Jj92fq0c8MvXJrQbBY5Whn4IYiHBhtZHeT63XaTGOtexdCD2UJdB
-BFPtPybWb5H6aCbsKtya8efc+3PweUMbIaNZBGNSB8nX5tEbXV6W+lMCgYEA2O1O
-ZGFrkQxhAbUPu0RnUx7cB8Qkfp5shCORDOQSBBZNeJjMlj0gTg9Fmrb4s5MNsqIb
-KfImecjF0nh+XnPy13Bhu0DOYQX+aR6CKeYUuKHnltAjPwWTAPLhTX7tt5Zs9/Dk
-0c8BmE/cdFSqbV5aQTH+/5q2oAXdqRBU+GvQqoMCgYAh0wSKROtQt3xmv4cr5ihO
-6oPi6TXh8hFH/6H1/J8t5TqB/AEDb1OtVCe2Uu7lVtETq+GzD3WQCoS0ocCMDNae
-RrorPrUx7WO7pNUNj3LN0R4mNeu+G3L9mzm0h7cT9eqDRZOYuo/kSsy0TKh/CLpB
-SahJKD1ePcHONwDL+SzdUQKBgQChV58+udavg22DP4/70NyozgMJI7GhG2PKxElW
-NSvRLmVglQVVmRE1/dXfRMeliHJfsoJRqHFFkzbPXB9hUQwFgOivxXu6XiLjPHXD
-hAVVbdY6LYSJkzPLONqqMQXNzmwt3VXTVwvwpTVqsK4xukOWygDHS+MZEkPTQvpv
-6oDA0QKBgQC524kgNCdwYjTqXyViEvOdgb9I7poOwY0Q/2WanS0aipRayMClpYRh
-ntQkue+pncl3C8dwZj26yFTf0jPh9X/5J2G+V0Xdt0UXJPUj5DgOkSfu4yDYFMiU
-R3dAd0UYng3OeT9XMVYJSWe+lFhP9sSr4onj44rABVUsJMBKlwQnmg==
------END RSA PRIVATE KEY-----
diff --git a/extra/yassl/certs/client-cert.der b/extra/yassl/certs/client-cert.der
deleted file mode 100644
index 293985adb97..00000000000
--- a/extra/yassl/certs/client-cert.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/certs/client-cert.pem b/extra/yassl/certs/client-cert.pem
deleted file mode 100644
index 38330d5380e..00000000000
--- a/extra/yassl/certs/client-cert.pem
+++ /dev/null
@@ -1,87 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- b6:63:af:8f:5d:62:57:a0
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Programming, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Validity
- Not Before: Jul 11 17:39:44 2014 GMT
- Not After : Apr 6 17:39:44 2017 GMT
- Subject: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Programming, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- Public-Key: (2048 bit)
- Modulus:
- 00:c3:03:d1:2b:fe:39:a4:32:45:3b:53:c8:84:2b:
- 2a:7c:74:9a:bd:aa:2a:52:07:47:d6:a6:36:b2:07:
- 32:8e:d0:ba:69:7b:c6:c3:44:9e:d4:81:48:fd:2d:
- 68:a2:8b:67:bb:a1:75:c8:36:2c:4a:d2:1b:f7:8b:
- ba:cf:0d:f9:ef:ec:f1:81:1e:7b:9b:03:47:9a:bf:
- 65:cc:7f:65:24:69:a6:e8:14:89:5b:e4:34:f7:c5:
- b0:14:93:f5:67:7b:3a:7a:78:e1:01:56:56:91:a6:
- 13:42:8d:d2:3c:40:9c:4c:ef:d1:86:df:37:51:1b:
- 0c:a1:3b:f5:f1:a3:4a:35:e4:e1:ce:96:df:1b:7e:
- bf:4e:97:d0:10:e8:a8:08:30:81:af:20:0b:43:14:
- c5:74:67:b4:32:82:6f:8d:86:c2:88:40:99:36:83:
- ba:1e:40:72:22:17:d7:52:65:24:73:b0:ce:ef:19:
- cd:ae:ff:78:6c:7b:c0:12:03:d4:4e:72:0d:50:6d:
- 3b:a3:3b:a3:99:5e:9d:c8:d9:0c:85:b3:d9:8a:d9:
- 54:26:db:6d:fa:ac:bb:ff:25:4c:c4:d1:79:f4:71:
- d3:86:40:18:13:b0:63:b5:72:4e:30:c4:97:84:86:
- 2d:56:2f:d7:15:f7:7f:c0:ae:f5:fc:5b:e5:fb:a1:
- ba:d3
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0
- X509v3 Authority Key Identifier:
- keyid:33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0
- DirName:/C=US/ST=Montana/L=Bozeman/O=wolfSSL/OU=Programming/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- serial:B6:63:AF:8F:5D:62:57:A0
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: sha1WithRSAEncryption
- 85:10:90:c5:5d:de:25:8c:f2:57:7b:2d:14:1c:05:f9:71:63:
- 40:b0:e3:c1:c1:2e:13:2a:7a:b7:d6:24:58:87:eb:03:fb:0d:
- af:e0:f4:d0:c8:bc:51:36:10:4f:79:cc:4f:66:7d:af:99:cb:
- 7b:ce:68:94:c6:36:aa:42:6e:8c:78:5b:b2:85:ca:d1:e1:a8:
- 31:d1:81:d9:f9:c1:a3:9e:34:43:ef:0a:79:7d:3e:83:61:fc:
- 14:5c:d1:dd:bc:0e:d7:51:b7:71:6e:41:7e:8b:2c:5a:9a:cb:
- 77:4b:6a:f5:06:ff:02:af:1e:e6:63:4f:bc:44:d9:3f:56:9e:
- 09:9c:43:f9:55:21:32:46:82:09:86:a9:7b:74:1c:9e:5a:2a:
- bf:03:79:91:cb:f2:29:7f:c9:15:82:89:b9:53:cd:7e:07:90:
- a9:5d:76:e1:19:5e:0d:58:b8:59:d5:0d:df:23:ab:6b:63:76:
- 19:9e:9c:df:b0:57:49:6c:d0:86:97:c3:6c:3c:fa:e0:56:c2:
- 1b:e3:a1:42:1a:58:62:85:9d:74:19:83:08:af:59:90:f8:99:
- bd:67:d3:4a:ea:0e:c9:ca:61:8a:0d:8a:42:cc:90:e9:2e:c2:
- 54:73:7f:5e:af:8d:e2:32:cb:45:20:d6:19:4d:5b:77:31:cc:
- 0f:2d:c0:7e
------BEGIN CERTIFICATE-----
-MIIEqjCCA5KgAwIBAgIJALZjr49dYlegMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
-VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEQMA4G
-A1UECgwHd29sZlNTTDEUMBIGA1UECwwLUHJvZ3JhbW1pbmcxGDAWBgNVBAMMD3d3
-dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
-Fw0xNDA3MTExNzM5NDRaFw0xNzA0MDYxNzM5NDRaMIGUMQswCQYDVQQGEwJVUzEQ
-MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEQMA4GA1UECgwHd29s
-ZlNTTDEUMBIGA1UECwwLUHJvZ3JhbW1pbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns
-LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAMMD0Sv+OaQyRTtTyIQrKnx0mr2qKlIHR9am
-NrIHMo7Quml7xsNEntSBSP0taKKLZ7uhdcg2LErSG/eLus8N+e/s8YEee5sDR5q/
-Zcx/ZSRppugUiVvkNPfFsBST9Wd7Onp44QFWVpGmE0KN0jxAnEzv0YbfN1EbDKE7
-9fGjSjXk4c6W3xt+v06X0BDoqAgwga8gC0MUxXRntDKCb42GwohAmTaDuh5AciIX
-11JlJHOwzu8Zza7/eGx7wBID1E5yDVBtO6M7o5lencjZDIWz2YrZVCbbbfqsu/8l
-TMTRefRx04ZAGBOwY7VyTjDEl4SGLVYv1xX3f8Cu9fxb5fuhutMCAwEAAaOB/DCB
-+TAdBgNVHQ4EFgQUM9hFZtdohxh+VA1wJ5HHJteFZcAwgckGA1UdIwSBwTCBvoAU
-M9hFZtdohxh+VA1wJ5HHJteFZcChgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD
-VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMRAwDgYDVQQKDAd3b2xmU1NM
-MRQwEgYDVQQLDAtQcm9ncmFtbWluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t
-MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAtmOvj11iV6AwDAYD
-VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAhRCQxV3eJYzyV3stFBwF+XFj
-QLDjwcEuEyp6t9YkWIfrA/sNr+D00Mi8UTYQT3nMT2Z9r5nLe85olMY2qkJujHhb
-soXK0eGoMdGB2fnBo540Q+8KeX0+g2H8FFzR3bwO11G3cW5BfossWprLd0tq9Qb/
-Aq8e5mNPvETZP1aeCZxD+VUhMkaCCYape3QcnloqvwN5kcvyKX/JFYKJuVPNfgeQ
-qV124RleDVi4WdUN3yOra2N2GZ6c37BXSWzQhpfDbDz64FbCG+OhQhpYYoWddBmD
-CK9ZkPiZvWfTSuoOycphig2KQsyQ6S7CVHN/Xq+N4jLLRSDWGU1bdzHMDy3Afg==
------END CERTIFICATE-----
diff --git a/extra/yassl/certs/client-key.der b/extra/yassl/certs/client-key.der
deleted file mode 100644
index 94dc253a2bd..00000000000
--- a/extra/yassl/certs/client-key.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/certs/client-key.pem b/extra/yassl/certs/client-key.pem
deleted file mode 100644
index c4e7ad22c09..00000000000
--- a/extra/yassl/certs/client-key.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEAwwPRK/45pDJFO1PIhCsqfHSavaoqUgdH1qY2sgcyjtC6aXvG
-w0Se1IFI/S1oootnu6F1yDYsStIb94u6zw357+zxgR57mwNHmr9lzH9lJGmm6BSJ
-W+Q098WwFJP1Z3s6enjhAVZWkaYTQo3SPECcTO/Rht83URsMoTv18aNKNeThzpbf
-G36/TpfQEOioCDCBryALQxTFdGe0MoJvjYbCiECZNoO6HkByIhfXUmUkc7DO7xnN
-rv94bHvAEgPUTnINUG07ozujmV6dyNkMhbPZitlUJttt+qy7/yVMxNF59HHThkAY
-E7BjtXJOMMSXhIYtVi/XFfd/wK71/Fvl+6G60wIDAQABAoIBAQCi5thfEHFkCJ4u
-bdFtHoXSCrGMR84sUWqgEp5T3pFMHW3qWXvyd6rZxtmKq9jhFuRjJv+1bBNZuOOl
-yHIXLgyfb+VZP3ZvSbERwlouFikN3reO3EDVou7gHqH0vpfbhmOWFM2YCWAtMHac
-PM3miO5HknkLWgDiXl8RfH35CLcgBokqXf0AqyLh8LO8JKleJg4fAC3+IZpTW23T
-K6uUgmhDNtj2L8Yi/LVBXQ0zYOqkfX7oS1WRVtNcV48flBcvqt7pnqj0z4pMjqDk
-VnOyz0+GxWk88yQgi1yWDPprEjuaZ8HfxpaypdWSDZsJQmgkEEXUUOQXOUjQNYuU
-bRHej8pZAoGBAOokp/lpM+lx3FJ9iCEoL0neunIW6cxHeogNlFeEWBY6gbA/os+m
-bB6wBikAj+d3dqzbysfZXps/JpBSrvw4kAAUu7QPWJTnL2p+HE9BIdQxWR9OihqN
-p1dsItjl9H4yphDLZKVVA4emJwWMw9e2J7JNujDaR49U0z2LhI2UmFilAoGBANU4
-G8OPxZMMRwtvNZLFsI1GyJIYj/WACvfvof6AubUqusoYsF2lB9CTjdicBBzUYo6m
-JoEB/86KKmM0NUCqbYDeiSNqV02ebq2TTlaQC22dc4sMric93k7wqsVseGdslFKc
-N2dsLe+7r9+mkDzER8+Nlp6YqbSfxaZQ3LPw+3QXAoGAXoMJYr26fKK/QnT1fBzS
-ackEDYV+Pj0kEsMYe/Mp818OdmxZdeRBhGmdMvPNIquwNbpKsjzl2Vi2Yk9d3uWe
-CspTsiz3nrNrClt5ZexukU6SIPb8/Bbt03YM4ux/smkTa3gOWkZktF63JaBadTpL
-78c8Pvf9JrggxJkKmnO+wxkCgYEAukSTFKw0GTtfkWCs97TWgQU2UVM96GXcry7c
-YT7Jfbh/h/A7mwOCKTfOck4R1bHBDAegmZFKjX/sec/xObXphexi99p9vGRNIjwO
-8tZR9YfYmcARIF0PKf1b4q7ZHNkhVm38hNBf7RAVHBgh58Q9S9fQnmqVzyLJA3ue
-42AB/C8CgYAR0EvPG2e5nxB1R4ZlrjHCxjCsWQZQ2Q+1cAb38NPIYnyo2m72IT/T
-f1/qiqs/2Spe81HSwjA34y2jdQ0eTSE01VdwXIm/cuxKbmjVzRh0M06MOkWP5pZA
-62P5GYY6Ud2JS7Dz+Z9dKJU4vjWrylznk1M0oUVdEzllQkahn831vw==
------END RSA PRIVATE KEY-----
diff --git a/extra/yassl/certs/client-keyEnc.pem b/extra/yassl/certs/client-keyEnc.pem
deleted file mode 100644
index 0097c0760a5..00000000000
--- a/extra/yassl/certs/client-keyEnc.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,BDE979D13CCC0ABD
-
-N7yz2JV13EmQ7MZPL5wamid5+G1V1gp8FKqMemAC5JDxonS/W9oViMLUcxbfPTDx
-FznKdYSVTIQ7vv3ofmDG4MEyV/2C568N2kdtAw+jTfrZFN+IU9CI+W+In/nacirF
-02sAcvDMofustnooKNOO7/iyb5+3vRvEt5vSSRQn5WuSQ9sUKjuzoLs/lbf7fyAt
-4NeqfI3rYBZXxiUOLITOGXzGNRuFoY+o2uDCfelLAJ8uhiVG6ME3LeJEo1dT5lZ8
-CSJOLPasKg0iG4V7olM4j9FvAfZr48RRsSfUen756Jo2HpI4bad8LKhFYIdNs2Au
-WwKLmjpo6QB9hBmRshR04rEXPdrgTqLBExCE08PyaGYnWU8ggWritCeBzDQFj/n4
-sI+NO0Mymuvg98e5RpO52lg3Xnqv9RIK3guLFOmI6aEHC0PS4WwOEQ==
------END RSA PRIVATE KEY-----
diff --git a/extra/yassl/certs/client-keyEnc3.pem b/extra/yassl/certs/client-keyEnc3.pem
deleted file mode 100644
index 0097c0760a5..00000000000
--- a/extra/yassl/certs/client-keyEnc3.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,BDE979D13CCC0ABD
-
-N7yz2JV13EmQ7MZPL5wamid5+G1V1gp8FKqMemAC5JDxonS/W9oViMLUcxbfPTDx
-FznKdYSVTIQ7vv3ofmDG4MEyV/2C568N2kdtAw+jTfrZFN+IU9CI+W+In/nacirF
-02sAcvDMofustnooKNOO7/iyb5+3vRvEt5vSSRQn5WuSQ9sUKjuzoLs/lbf7fyAt
-4NeqfI3rYBZXxiUOLITOGXzGNRuFoY+o2uDCfelLAJ8uhiVG6ME3LeJEo1dT5lZ8
-CSJOLPasKg0iG4V7olM4j9FvAfZr48RRsSfUen756Jo2HpI4bad8LKhFYIdNs2Au
-WwKLmjpo6QB9hBmRshR04rEXPdrgTqLBExCE08PyaGYnWU8ggWritCeBzDQFj/n4
-sI+NO0Mymuvg98e5RpO52lg3Xnqv9RIK3guLFOmI6aEHC0PS4WwOEQ==
------END RSA PRIVATE KEY-----
diff --git a/extra/yassl/certs/dh1024.dat b/extra/yassl/certs/dh1024.dat
deleted file mode 100644
index 86a95518278..00000000000
--- a/extra/yassl/certs/dh1024.dat
+++ /dev/null
@@ -1 +0,0 @@
-30818702818100DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F020102 \ No newline at end of file
diff --git a/extra/yassl/certs/dsa-cert.pem b/extra/yassl/certs/dsa-cert.pem
deleted file mode 100644
index 10794cbee73..00000000000
--- a/extra/yassl/certs/dsa-cert.pem
+++ /dev/null
@@ -1,22 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDrzCCA2+gAwIBAgIJAK1zRM7YFcNjMAkGByqGSM44BAMwgZAxCzAJBgNVBAYT
-AlVTMQ8wDQYDVQQIDAZPcmVnb24xETAPBgNVBAcMCFBvcnRsYW5kMRAwDgYDVQQK
-DAd3b2xmU1NMMRAwDgYDVQQLDAd0ZXN0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz
-bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMTYwOTIy
-MjEyMzA0WhcNMjIwMzE1MjEyMzA0WjCBkDELMAkGA1UEBhMCVVMxDzANBgNVBAgM
-Bk9yZWdvbjERMA8GA1UEBwwIUG9ydGxhbmQxEDAOBgNVBAoMB3dvbGZTU0wxEDAO
-BgNVBAsMB3Rlc3RpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
-SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCAbgwggEsBgcqhkjOOAQBMIIBHwKB
-gQC9Ue5KMuCKx+rG4epwxFFDzyoH4ccSwlglXsRdvqswDRK/oQvTNNNoWiVxTn3k
-vQ8qDlhWy9KjGTrqr/ttgmh56FFpe6tz4yTgCNyR9D+eGclD7lNfdPUc4E3SA6ef
-opG6+ymI55bS+9xUFTG402UCrYSKT59zI2HBfuI6dltsxQIVAJHJ7WDQ+jBn/nmM
-yCQzdi+0qJx1AoGBAJJacRK36s5yGY1b6qhxWqvpoAC+SfEKylZnYWGYf2PM+Iwo
-6AgPKEw6BSsX+7Nmc4Gjyr4JWhComKi6onPamO/A2CbMM0DCxb47BeLBWfqWAgXV
-j0CODT4MQos5yugnviR/YpEgbzLxvrXr469lKWsAyB19/gFmGmQWcCgAwGm6A4GF
-AAKBgQCdy2PPch8r0P07EOs5WG6L425P6IJ3bDKj3TVLy+Ebj04CT/3Gmgw2tFye
-2pOgO0yfkIXizcDl6GT2CQuBBhUgwF6WJ4hoW1iK1UwhnupZmQ358eNFl0tJJN5v
-wx2gtNxJSwIsm8VRscqqFH2092b9ScH7VjLoqhx+bgA4XV7l1aNQME4wHQYDVR0O
-BBYEFCCY5ONeqOL/KqR/SwbV5Ufb/IHHMB8GA1UdIwQYMBaAFCCY5ONeqOL/KqR/
-SwbV5Ufb/IHHMAwGA1UdEwQFMAMBAf8wCQYHKoZIzjgEAwMvADAsAhQRYSCVN/Ge
-agV3mffU3qNZ92fI0QIUPH7Jp+iASI7U1ocaYDc10qXGaGY=
------END CERTIFICATE-----
diff --git a/extra/yassl/certs/dsa1024.der b/extra/yassl/certs/dsa1024.der
deleted file mode 100644
index db880d51480..00000000000
--- a/extra/yassl/certs/dsa1024.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/certs/dsa1024.pem b/extra/yassl/certs/dsa1024.pem
deleted file mode 100644
index 5478ebfc2b2..00000000000
--- a/extra/yassl/certs/dsa1024.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN DSA PRIVATE KEY-----
-MIIBvAIBAAKBgQC9Ue5KMuCKx+rG4epwxFFDzyoH4ccSwlglXsRdvqswDRK/oQvT
-NNNoWiVxTn3kvQ8qDlhWy9KjGTrqr/ttgmh56FFpe6tz4yTgCNyR9D+eGclD7lNf
-dPUc4E3SA6efopG6+ymI55bS+9xUFTG402UCrYSKT59zI2HBfuI6dltsxQIVAJHJ
-7WDQ+jBn/nmMyCQzdi+0qJx1AoGBAJJacRK36s5yGY1b6qhxWqvpoAC+SfEKylZn
-YWGYf2PM+Iwo6AgPKEw6BSsX+7Nmc4Gjyr4JWhComKi6onPamO/A2CbMM0DCxb47
-BeLBWfqWAgXVj0CODT4MQos5yugnviR/YpEgbzLxvrXr469lKWsAyB19/gFmGmQW
-cCgAwGm6AoGBAJ3LY89yHyvQ/TsQ6zlYbovjbk/ogndsMqPdNUvL4RuPTgJP/caa
-DDa0XJ7ak6A7TJ+QheLNwOXoZPYJC4EGFSDAXpYniGhbWIrVTCGe6lmZDfnx40WX
-S0kk3m/DHaC03ElLAiybxVGxyqoUfbT3Zv1JwftWMuiqHH5uADhdXuXVAhQ01VXa
-Rr8IPem35lKghVKnq/kGQw==
------END DSA PRIVATE KEY-----
diff --git a/extra/yassl/certs/server-cert.pem b/extra/yassl/certs/server-cert.pem
deleted file mode 100644
index f56cba9de70..00000000000
--- a/extra/yassl/certs/server-cert.pem
+++ /dev/null
@@ -1,173 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 1 (0x1)
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Validity
- Not Before: Jul 11 17:20:14 2014 GMT
- Not After : Apr 6 17:20:14 2017 GMT
- Subject: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Support, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- Public-Key: (2048 bit)
- Modulus:
- 00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27:
- 01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6:
- f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75:
- f7:8a:ca:07:e7:35:2f:8f:e1:bd:7b:c0:2f:7c:ab:
- 64:a8:17:fc:ca:5d:7b:ba:e0:21:e5:72:2e:6f:2e:
- 86:d8:95:73:da:ac:1b:53:b9:5f:3f:d7:19:0d:25:
- 4f:e1:63:63:51:8b:0b:64:3f:ad:43:b8:a5:1c:5c:
- 34:b3:ae:00:a0:63:c5:f6:7f:0b:59:68:78:73:a6:
- 8c:18:a9:02:6d:af:c3:19:01:2e:b8:10:e3:c6:cc:
- 40:b4:69:a3:46:33:69:87:6e:c4:bb:17:a6:f3:e8:
- dd:ad:73:bc:7b:2f:21:b5:fd:66:51:0c:bd:54:b3:
- e1:6d:5f:1c:bc:23:73:d1:09:03:89:14:d2:10:b9:
- 64:c3:2a:d0:a1:96:4a:bc:e1:d4:1a:5b:c7:a0:c0:
- c1:63:78:0f:44:37:30:32:96:80:32:23:95:a1:77:
- ba:13:d2:97:73:e2:5d:25:c9:6a:0d:c3:39:60:a4:
- b4:b0:69:42:42:09:e9:d8:08:bc:33:20:b3:58:22:
- a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f:
- ad:d7
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- B3:11:32:C9:92:98:84:E2:C9:F8:D0:3B:6E:03:42:CA:1F:0E:8E:3C
- X509v3 Authority Key Identifier:
- keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- serial:9A:41:47:CD:A1:14:62:8C
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: sha1WithRSAEncryption
- 3d:8c:70:05:5b:62:4b:bf:6c:b6:48:61:01:10:1d:5e:05:ba:
- 55:94:2c:ae:59:6f:97:80:5d:6c:86:ec:9a:eb:15:45:44:e4:
- 56:f8:75:ca:8a:45:32:f4:c7:e1:fa:f2:98:1c:91:d3:3f:e8:
- 0e:c9:1b:fa:e1:79:99:67:0e:0d:6b:8a:ec:1a:2c:59:c4:34:
- 04:8d:39:77:cd:b5:e9:60:5b:82:bf:34:ce:ed:c6:4f:3f:b4:
- 5c:4d:8a:b4:f4:0a:04:12:a0:56:c1:e1:33:37:a1:54:87:48:
- e9:81:c2:0f:8f:6f:d3:52:4c:4c:32:4c:6b:9f:3a:04:8f:77:
- 5d:ad:dc:3d:2b:f2:c9:df:3c:60:5d:d8:fc:86:72:7c:3d:d0:
- 84:4b:8c:df:26:43:fe:c0:cc:5b:e1:36:b3:3d:32:28:a3:ef:
- 0c:20:d6:b1:50:39:d6:67:a9:8b:84:bc:92:34:eb:19:23:e8:
- 10:8f:ea:bd:18:8c:93:27:3c:74:75:8e:58:04:fa:2a:74:44:
- 7d:fc:4d:39:df:54:17:ba:78:e1:5d:6a:70:d3:7c:a2:80:81:
- e6:19:51:91:c3:44:51:ec:bb:88:a9:53:e1:d7:a9:8c:28:f4:
- 21:1c:42:51:09:b4:12:6d:a0:d6:25:09:85:c6:2a:0c:af:a7:
- 58:e6:52:8b
------BEGIN CERTIFICATE-----
-MIIEnjCCA4agAwIBAgIBATANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCVVMx
-EDAOBgNVBAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNh
-d3Rvb3RoMRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz
-bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMTQwNzEx
-MTcyMDE0WhcNMTcwNDA2MTcyMDE0WjCBkDELMAkGA1UEBhMCVVMxEDAOBgNVBAgM
-B01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xEDAOBgNVBAoMB3dvbGZTU0wxEDAO
-BgNVBAsMB1N1cHBvcnQxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
-SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAMCVCOFXQfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hn
-f/5cnFF194rKB+c1L4/hvXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/X
-GQ0lT+FjY1GLC2Q/rUO4pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bM
-QLRpo0YzaYduxLsXpvPo3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq
-0KGWSrzh1Bpbx6DAwWN4D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ
-6dgIvDMgs1gip6rrxOHmYYPF0pbf2dBPrdcCAwEAAaOB/DCB+TAdBgNVHQ4EFgQU
-sxEyyZKYhOLJ+NA7bgNCyh8OjjwwgckGA1UdIwSBwTCBvoAUJ45nEXTDJh0/7TNj
-s6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdNb250YW5h
-MRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290aDETMBEGA1UECwwK
-Q29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcN
-AQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYDVR0TBAUwAwEB/zAN
-BgkqhkiG9w0BAQUFAAOCAQEAPYxwBVtiS79stkhhARAdXgW6VZQsrllvl4BdbIbs
-musVRUTkVvh1yopFMvTH4frymByR0z/oDskb+uF5mWcODWuK7BosWcQ0BI05d821
-6WBbgr80zu3GTz+0XE2KtPQKBBKgVsHhMzehVIdI6YHCD49v01JMTDJMa586BI93
-Xa3cPSvyyd88YF3Y/IZyfD3QhEuM3yZD/sDMW+E2sz0yKKPvDCDWsVA51mepi4S8
-kjTrGSPoEI/qvRiMkyc8dHWOWAT6KnREffxNOd9UF7p44V1qcNN8ooCB5hlRkcNE
-Uey7iKlT4depjCj0IRxCUQm0Em2g1iUJhcYqDK+nWOZSiw==
------END CERTIFICATE-----
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- 9a:41:47:cd:a1:14:62:8c
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Validity
- Not Before: Jul 11 03:20:08 2014 GMT
- Not After : Apr 6 03:20:08 2017 GMT
- Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- Public-Key: (2048 bit)
- Modulus:
- 00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a:
- f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac:
- de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98:
- 21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77:
- 32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1:
- 8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3:
- a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed:
- a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95:
- 82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c:
- 3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db:
- 76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc:
- 73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98:
- de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68:
- cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2:
- b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3:
- 13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98:
- ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed:
- 36:79
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- X509v3 Authority Key Identifier:
- keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
- DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
- serial:9A:41:47:CD:A1:14:62:8C
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: sha1WithRSAEncryption
- 79:78:0c:6d:79:88:91:fc:3a:15:9c:f9:27:62:16:f0:21:1f:
- fa:7d:3f:a2:a8:32:1e:f7:f2:11:a9:74:16:74:5e:dc:18:ca:
- f0:00:2a:d5:03:06:26:30:f1:47:83:fd:32:6e:fc:ed:aa:4f:
- 7d:0c:63:60:31:2f:7c:0c:bf:99:66:87:ed:27:08:86:2d:c4:
- 33:e8:98:23:1c:fe:a3:db:9a:49:4e:fc:5a:42:ef:71:c3:3f:
- ad:dc:4a:a8:d2:a3:1d:09:ac:33:04:7b:86:f3:6d:00:59:a3:
- c8:db:d1:3c:73:f6:0e:90:d6:5e:49:e0:bf:36:63:08:7b:a5:
- b0:8f:35:3b:56:8c:11:35:49:04:1c:d0:e7:ba:56:c5:0d:0a:
- 91:8d:d6:b7:62:19:34:12:52:4c:d2:6d:7c:c5:3d:0f:18:81:
- 54:cb:f6:3c:e5:84:d2:d6:71:15:ec:1a:34:0b:f0:a0:21:74:
- 43:c8:a3:b0:df:d9:67:da:e2:ad:93:48:f8:a0:87:bd:79:14:
- e0:62:0a:df:f7:31:2e:31:7b:d1:32:2a:0a:fe:5d:14:ef:d9:
- 64:50:e4:83:91:bc:70:0d:d7:88:8d:d9:bc:84:0e:c5:1a:b3:
- bf:64:02:4e:51:91:a4:a2:85:15:83:af:f0:5b:9b:28:49:5f:
- b2:b3:03:d8
------BEGIN CERTIFICATE-----
-MIIEqjCCA5KgAwIBAgIJAJpBR82hFGKMMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
-VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G
-A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3
-dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
-Fw0xNDA3MTEwMzIwMDhaFw0xNzA0MDYwMzIwMDhaMIGUMQswCQYDVQQGEwJVUzEQ
-MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8GA1UECgwIU2F3
-dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns
-LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAL8Myi0Ush6EQlvNOB9K8k11EPG2NZ/fyn0D
-mNOs3gNm7irx2LB9bgdUCxCYIU2AyxIg58xP3kV9yXJ3MurKkLtpUhADL6jzlcXx
-i2JWG+9nb6QQQZWtCpvjpcCw0nB2UDBbqOgILHztp6J6jTgpHKzH7fJ8lbCVgn1J
-XDjNdyXvvYB1U5Q8PcpjW58VtdMdEy8Z0TzbdjrMuH3J5cLX2kBv2CHccxtCLVOc
-/hr8fat6Nj+Y3oR8BWfOahQ4h6nxjLVoy2h/cSAr9aBj9VYvoybSt2+xWhfXOJkI
-/pNYb/7DE0kIFgunTWcAUjFnI06Y7VFFHbkE2Qvs2CizS73tNnkCAwEAAaOB/DCB
-+TAdBgNVHQ4EFgQUJ45nEXTDJh0/7TNjs6TYHTDl6NUwgckGA1UdIwSBwTCBvoAU
-J45nEXTDJh0/7TNjs6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD
-VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290
-aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t
-MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYD
-VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAeXgMbXmIkfw6FZz5J2IW8CEf
-+n0/oqgyHvfyEal0FnRe3BjK8AAq1QMGJjDxR4P9Mm787apPfQxjYDEvfAy/mWaH
-7ScIhi3EM+iYIxz+o9uaSU78WkLvccM/rdxKqNKjHQmsMwR7hvNtAFmjyNvRPHP2
-DpDWXkngvzZjCHulsI81O1aMETVJBBzQ57pWxQ0KkY3Wt2IZNBJSTNJtfMU9DxiB
-VMv2POWE0tZxFewaNAvwoCF0Q8ijsN/ZZ9rirZNI+KCHvXkU4GIK3/cxLjF70TIq
-Cv5dFO/ZZFDkg5G8cA3XiI3ZvIQOxRqzv2QCTlGRpKKFFYOv8FubKElfsrMD2A==
------END CERTIFICATE-----
diff --git a/extra/yassl/certs/server-key.pem b/extra/yassl/certs/server-key.pem
deleted file mode 100644
index d1627f4d4a7..00000000000
--- a/extra/yassl/certs/server-key.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAwJUI4VdB8nFtt9JFQScBZcZFrvK8JDC4lc4vTtb2HIi8fJ/7
-qGd//lycUXX3isoH5zUvj+G9e8AvfKtkqBf8yl17uuAh5XIuby6G2JVz2qwbU7lf
-P9cZDSVP4WNjUYsLZD+tQ7ilHFw0s64AoGPF9n8LWWh4c6aMGKkCba/DGQEuuBDj
-xsxAtGmjRjNph27Euxem8+jdrXO8ey8htf1mUQy9VLPhbV8cvCNz0QkDiRTSELlk
-wyrQoZZKvOHUGlvHoMDBY3gPRDcwMpaAMiOVoXe6E9KXc+JdJclqDcM5YKS0sGlC
-Qgnp2Ai8MyCzWCKnquvE4eZhg8XSlt/Z0E+t1wIDAQABAoIBAQCa0DQPUmIFUAHv
-n+1kbsLE2hryhNeSEEiSxOlq64t1bMZ5OPLJckqGZFSVd8vDmp231B2kAMieTuTd
-x7pnFsF0vKnWlI8rMBr77d8hBSPZSjm9mGtlmrjcxH3upkMVLj2+HSJgKnMw1T7Y
-oqyGQy7E9WReP4l1DxHYUSVOn9iqo85gs+KK2X4b8GTKmlsFC1uqy+XjP24yIgXz
-0PrvdFKB4l90073/MYNFdfpjepcu1rYZxpIm5CgGUFAOeC6peA0Ul7QS2DFAq6EB
-QcIw+AdfFuRhd9Jg8p+N6PS662PeKpeB70xs5lU0USsoNPRTHMRYCj+7r7X3SoVD
-LTzxWFiBAoGBAPIsVHY5I2PJEDK3k62vvhl1loFk5rW4iUJB0W3QHBv4G6xpyzY8
-ZH3c9Bm4w2CxV0hfUk9ZOlV/MsAZQ1A/rs5vF/MOn0DKTq0VO8l56cBZOHNwnAp8
-yTpIMqfYSXUKhcLC/RVz2pkJKmmanwpxv7AEpox6Wm9IWlQ7xrFTF9/nAoGBAMuT
-3ncVXbdcXHzYkKmYLdZpDmOzo9ymzItqpKISjI57SCyySzfcBhh96v52odSh6T8N
-zRtfr1+elltbD6F8r7ObkNtXczrtsCNErkFPHwdCEyNMy/r0FKTV9542fFufqDzB
-hV900jkt/9CE3/uzIHoumxeu5roLrl9TpFLtG8SRAoGBAOyY2rvV/vlSSn0CVUlv
-VW5SL4SjK7OGYrNU0mNS2uOIdqDvixWl0xgUcndex6MEH54ZYrUbG57D8rUy+UzB
-qusMJn3UX0pRXKRFBnBEp1bA1CIUdp7YY1CJkNPiv4GVkjFBhzkaQwsYpVMfORpf
-H0O8h2rfbtMiAP4imHBOGhkpAoGBAIpBVihRnl/Ungs7mKNU8mxW1KrpaTOFJAza
-1AwtxL9PAmk4fNTm3Ezt1xYRwz4A58MmwFEC3rt1nG9WnHrzju/PisUr0toGakTJ
-c/5umYf4W77xfOZltU9s8MnF/xbKixsX4lg9ojerAby/QM5TjI7t7+5ZneBj5nxe
-9Y5L8TvBAoGATUX5QIzFW/QqGoq08hysa+kMVja3TnKW1eWK0uL/8fEYEz2GCbjY
-dqfJHHFSlDBD4PF4dP1hG0wJzOZoKnGtHN9DvFbbpaS+NXCkXs9P/ABVmTo9I89n
-WvUi+LUp0EQR6zUuRr79jhiyX6i/GTKh9dwD5nyaHwx8qbAOITc78bA=
------END RSA PRIVATE KEY-----
diff --git a/extra/yassl/certs/server-keyEnc.pem b/extra/yassl/certs/server-keyEnc.pem
deleted file mode 100644
index e5ab57d4c9e..00000000000
--- a/extra/yassl/certs/server-keyEnc.pem
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-CBC,136C7D8A69656668
-
-jvNTyPaztxPIoAzbdmZnD0Zw2+60tMxNc0GMHNmeOyG25aHP/dT+TWiKFpFVkkkY
-uoCIhYUyw7gmpw+CnRJwWd+ans4nrvAjwy5oWJvarvsyUpjqvnPoIlAqd+d4TDKN
-eESzcI76+gHdisAtCrQD+fGqgTZhli5TgDbnpasL/QnY2qDlutvakkVw7gPXe156
-2Phy8WN+efr65J6wt3K/dj7Datl9u4JeHQK81gYyWBVX+EagEjPGDzkFQCj9Z0q7
-8K3iB5GW1JAqJS0IfZPB40AnSTF/n1TL1SN3qfU3l7hTGNrx9o7580bgDEoAR7pI
-F8eZlS15KHtZmh11AnU1KTKZ6kmgnNqeMTGMN6N0ct2wMKW1dV87eTDlF0oiR2ol
-XwtFgKmrIjfpmzkdWjbJmWnGMjD56KdiFZga/ZyKMsPrVoYLgfJEpn36iQspfygx
-HCGNTf0PjIsjEWU0WyQiF86t+c45W3wNFsv/AxVyfMl+su02yrd6u2ecuQDir3Cs
-b2k8IKtQgVe/NIpEWLKuiHG5oedIPPQyDYK5uq+gHxCGeOoKnWlsWFEHZRiza4X5
-tbgTrJB8Sw0ENWrvVGGmQZN4pSImlsMwzQ2qik5CQ00N1b3+56/obn0z75I3bUSb
-tC5g8DRjl6oclAenNgh/MYMT287y5W2dD4npxHcekX4O3J2CDXNfg4vV2j5GRxtg
-LVJdYE2p7bpYePCDHrYng8b9ubBprx0CrEnkIvvtUjzNPf6VDL0+MBKl+XgR2/nz
-iRqTuZnlGGOyM+KYDwXpgwfs/HfvFGksxTAlO/40GkGh+WGPaIoNyCK0SgQKhyb4
-JIkR0vd2/yLg3lWMJrGwh7A0Gm07Z/781oURP3uWd+PaCOgGcd5ipcAjcEyuxNly
-AthipWqmQWUcbf6Z2N9j3OA22Hv2Uzk8HSfi9VOZtL9svdEEZ0NnOekJgnc6stQp
-bXiknlK/T5WdrWxSyCfgUq68Vf6DFfIRAVuFdJ3WHT2wVXHrDfft6D+Ne/XCxPoE
-8zGmkyusaph33UHQ1oNyUbLbwcDCDSmOo8gYoedD3IwxtMA3wJRugomqosItwV8X
-vkgmcy8eSE/+gZUxJEN2gnLcfKFhCkC80J6oFhmoDD6vuUnPHcFdKZgVPw2rzPk5
-Vb1kX+gpORplYmKpq1vz/ujscL4T0TmYLz02hkIS4edpW55ncTTv7JWefpRiTB1J
-RB3td3me4htqR+YIDWJ+emrOmqsCG2WvpAS+MTw2mj1jYk9LL/ZYobTjSCEWmuwT
-yVK6m303irR7HQDauxhslRFgoK21w63viOyj5NKIU1gQtaAANGDxcgORC1XLjjgt
-oNutSQA+7P42vfHSHK4cnTBXl6V32H/GyVpdHQOZqSrqIjgLmUZodSmRPROxosZF
-a46B1O7m/rJFxkiKW4vod+/WqjoE0Hhfrb8rRrkRjzGeCqqSSnQ3vrunVkvF8hlA
-b6FOv4ZBJL4piC1GKH+rscqke9NEiDqXN8C3iYz86jbck/Ha21yUS8T3X7N52sg+
-B3AmOGnLK6BebYeto9vZxQjacChJZSixSxLV+l9/nVQ0+mW42azHdzk0ru59TGAj
------END RSA PRIVATE KEY-----
diff --git a/extra/yassl/certs/taoCert.txt b/extra/yassl/certs/taoCert.txt
deleted file mode 100644
index f1132c0b5b8..00000000000
--- a/extra/yassl/certs/taoCert.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-
-***** Create a self signed cert ************
-
-1) openssl genrsa 512 > client-key.pem
-
-2) openssl req -new -x509 -nodes -md5 -days 1000 -key client-key.pem > client-cert.pem
-
--- adding metadata to beginning
-
-3) openssl x509 -in client-cert.pem -text > tmp.pem
-
-4) mv tmp.pem client-cert.pem
-
-
-***** Create a CA, signing authority **********
-
-same as self signed, use ca prefix instead of client
-
-
-***** Create a cert signed by CA **************
-
-1) openssl req -newkey rsa:512 -md5 -days 1000 -nodes -keyout server-key.pem > server-req.pem
-
-2) copy ca-key.pem ca-cert.srl (why ????)
-
-3) openssl x509 -req -in server-req.pem -days 1000 -md5 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem
-
-
-
-***** To create a dsa cert ********************
-
-1) openssl dsaparam 512 > dsa512.param # creates group params
-
-2) openssl gendsa dsa512.param > dsa512.pem # creates private key
-
-3) openssl req -new -x509 -nodes -days 1000 -key dsa512.pem > dsa-cert.pem
-
-
-
-
-***** To convert from PEM to DER **************
-
-a) openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER
-
-to convert rsa private PEM to DER :
-
-b) openssl rsa -in key.pem -outform DER -out key.der
-
-
-**** To encrypt rsa key already in pem **********
-
-a) openssl rsa <server-key.pem.bak -des >server-keyEnc.pem
-
-note location of des, pass = yassl123
-
-
-*** To make a public key from a private key ******
-
-
-openssl rsa -in 1024rsa.priv -pubout -out 1024rsa.pub
-
-
diff --git a/extra/yassl/examples/client/client.cpp b/extra/yassl/examples/client/client.cpp
deleted file mode 100644
index d2c07897f3c..00000000000
--- a/extra/yassl/examples/client/client.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* client.cpp */
-
-// takes an optional command line argument of cipher list to make scripting
-// easier
-
-
-#include "../../testsuite/test.hpp"
-
-//#define TEST_RESUME
-
-
-void ClientError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& sockfd, const char* msg)
-{
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys(msg);
-}
-
-
-#ifdef NON_BLOCKING
- void NonBlockingSSL_Connect(SSL* ssl, SSL_CTX* ctx, SOCKET_T& sockfd)
- {
- int ret = SSL_connect(ssl);
- int err = SSL_get_error(ssl, 0);
- while (ret != SSL_SUCCESS && (err == SSL_ERROR_WANT_READ ||
- err == SSL_ERROR_WANT_WRITE)) {
- if (err == SSL_ERROR_WANT_READ)
- printf("... client would read block\n");
- else
- printf("... client would write block\n");
- #ifdef _WIN32
- Sleep(1000);
- #else
- sleep(1);
- #endif
- ret = SSL_connect(ssl);
- err = SSL_get_error(ssl, 0);
- }
- if (ret != SSL_SUCCESS)
- ClientError(ctx, ssl, sockfd, "SSL_connect failed");
- }
-#endif
-
-
-void client_test(void* args)
-{
-#ifdef _WIN32
- WSADATA wsd;
- WSAStartup(0x0002, &wsd);
-#endif
-
- SOCKET_T sockfd = 0;
- int argc = 0;
- char** argv = 0;
-
- set_args(argc, argv, *static_cast<func_args*>(args));
- tcp_connect(sockfd);
-#ifdef NON_BLOCKING
- tcp_set_nonblocking(sockfd);
-#endif
- SSL_METHOD* method = TLSv1_client_method();
- SSL_CTX* ctx = SSL_CTX_new(method);
-
- set_certs(ctx);
- if (argc >= 2) {
- printf("setting cipher list to %s\n", argv[1]);
- if (SSL_CTX_set_cipher_list(ctx, argv[1]) != SSL_SUCCESS) {
- ClientError(ctx, NULL, sockfd, "set_cipher_list error\n");
- }
- }
- SSL* ssl = SSL_new(ctx);
-
- SSL_set_fd(ssl, sockfd);
-
-
-#ifdef NON_BLOCKING
- NonBlockingSSL_Connect(ssl, ctx, sockfd);
-#else
- // if you get an error here see note at top of README
- if (SSL_connect(ssl) != SSL_SUCCESS)
- ClientError(ctx, ssl, sockfd, "SSL_connect failed");
-#endif
- showPeer(ssl);
-
- const char* cipher = 0;
- int index = 0;
- char list[1024];
- strncpy(list, "cipherlist", 11);
- while ( (cipher = SSL_get_cipher_list(ssl, index++)) ) {
- strncat(list, ":", 2);
- strncat(list, cipher, strlen(cipher) + 1);
- }
- printf("%s\n", list);
- printf("Using Cipher Suite: %s\n", SSL_get_cipher(ssl));
-
- char msg[] = "hello yassl!";
- if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
- ClientError(ctx, ssl, sockfd, "SSL_write failed");
-
- char reply[1024];
- int input = SSL_read(ssl, reply, sizeof(reply));
- if (input > 0) {
- reply[input] = 0;
- printf("Server response: %s\n", reply);
- }
-
-#ifdef TEST_RESUME
- SSL_SESSION* session = SSL_get_session(ssl);
- SSL* sslResume = SSL_new(ctx);
-#endif
-
- SSL_shutdown(ssl);
- SSL_free(ssl);
- tcp_close(sockfd);
-
-#ifdef TEST_RESUME
- tcp_connect(sockfd);
- SSL_set_fd(sslResume, sockfd);
- SSL_set_session(sslResume, session);
-
- if (SSL_connect(sslResume) != SSL_SUCCESS)
- ClientError(ctx, sslResume, sockfd, "SSL_resume failed");
- showPeer(sslResume);
-
- if (SSL_write(sslResume, msg, sizeof(msg)) != sizeof(msg))
- ClientError(ctx, sslResume, sockfd, "SSL_write failed");
-
- input = SSL_read(sslResume, reply, sizeof(reply));
- if (input > 0) {
- reply[input] = 0;
- printf("Server response: %s\n", reply);
- }
-
- SSL_shutdown(sslResume);
- SSL_free(sslResume);
- tcp_close(sockfd);
-#endif // TEST_RESUME
-
- SSL_CTX_free(ctx);
- ((func_args*)args)->return_code = 0;
-}
-
-
-#ifndef NO_MAIN_DRIVER
-
- int main(int argc, char** argv)
- {
- func_args args;
-
- args.argc = argc;
- args.argv = argv;
-
- client_test(&args);
- yaSSL_CleanUp();
-
- return args.return_code;
- }
-
-#endif // NO_MAIN_DRIVER
-
diff --git a/extra/yassl/examples/client/client.dsp b/extra/yassl/examples/client/client.dsp
deleted file mode 100644
index 1caa585dadb..00000000000
--- a/extra/yassl/examples/client/client.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=client - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "client - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /O2 /I "..\..\taocrypt\include" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "client - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "..\..\include" /I "..\..\taocrypt\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "client - Win32 Release"
-# Name "client - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\client.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/examples/echoclient/echoclient.cpp b/extra/yassl/examples/echoclient/echoclient.cpp
deleted file mode 100644
index 99a8b4d9c88..00000000000
--- a/extra/yassl/examples/echoclient/echoclient.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* echoclient.cpp */
-
-#include "../../testsuite/test.hpp"
-
-
-void EchoClientError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& sockfd, const char* msg)
-{
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys(msg);
-}
-
-
-void echoclient_test(void* args)
-{
-#ifdef _WIN32
- WSADATA wsd;
- WSAStartup(0x0002, &wsd);
-#endif
-
- SOCKET_T sockfd = 0;
- int argc = 0;
- char** argv = 0;
-
- FILE* fin = stdin;
- FILE* fout = stdout;
-
- bool inCreated = false;
- bool outCreated = false;
-
- set_args(argc, argv, *static_cast<func_args*>(args));
- if (argc >= 2) {
- fin = fopen(argv[1], "r");
- inCreated = true;
- }
- if (argc >= 3) {
- fout = fopen(argv[2], "w");
- outCreated = true;
- }
-
- if (!fin) err_sys("can't open input file");
- if (!fout) err_sys("can't open output file");
-
- tcp_connect(sockfd);
-
- SSL_METHOD* method = SSLv23_client_method();
- SSL_CTX* ctx = SSL_CTX_new(method);
- set_certs(ctx);
- SSL* ssl = SSL_new(ctx);
-
- SSL_set_fd(ssl, sockfd);
-
- if (SSL_connect(ssl) != SSL_SUCCESS)
- EchoClientError(ctx, ssl, sockfd, "SSL_connect failed");
-
- char send[1024];
- char reply[1024];
-
- while (fgets(send, sizeof(send), fin)) {
-
- int sendSz = (int)strlen(send) + 1;
- if (SSL_write(ssl, send, sendSz) != sendSz)
- EchoClientError(ctx, ssl, sockfd, "SSL_write failed");
-
- if (strncmp(send, "quit", 4) == 0) {
- fputs("sending server shutdown command: quit!\n", fout);
- break;
- }
-
- if (SSL_read(ssl, reply, sizeof(reply)) > 0)
- fputs(reply, fout);
- }
-
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
-
- fflush(fout);
- if (inCreated) fclose(fin);
- if (outCreated) fclose(fout);
-
- ((func_args*)args)->return_code = 0;
-}
-
-
-#ifndef NO_MAIN_DRIVER
-
- int main(int argc, char** argv)
- {
- func_args args;
-
- args.argc = argc;
- args.argv = argv;
-
- echoclient_test(&args);
- yaSSL_CleanUp();
-
- return args.return_code;
- }
-
-#endif // NO_MAIN_DRIVER
diff --git a/extra/yassl/examples/echoclient/echoclient.dsp b/extra/yassl/examples/echoclient/echoclient.dsp
deleted file mode 100644
index 52052c6dc44..00000000000
--- a/extra/yassl/examples/echoclient/echoclient.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="echoclient" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=echoclient - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "echoclient.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "echoclient.mak" CFG="echoclient - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "echoclient - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "echoclient - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "echoclient - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /O2 /I "..\..\include" /I "..\..\taocrypt\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "echoclient - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "..\..\include" /I "..\..\taocrypt\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "echoclient - Win32 Release"
-# Name "echoclient - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\echoclient.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/examples/echoclient/input b/extra/yassl/examples/echoclient/input
deleted file mode 100644
index 438a592852c..00000000000
--- a/extra/yassl/examples/echoclient/input
+++ /dev/null
@@ -1,93 +0,0 @@
-/* echoclient.cpp */
-
-#include "openssl/ssl.h" /* openssl compatibility test */
-#include <stdio.h>
-#include <stdlib.h>
-
-
-#ifdef WIN32
- #include <winsock2.h>
-#else
- #include <string.h>
- #include <unistd.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <sys/ioctl.h>
- #include <sys/time.h>
- #include <sys/types.h>
- #include <sys/socket.h>
-#endif /* WIN32 */
-
-
-void err_sys(const char* msg)
-{
- fputs("yassl client error: ", stderr);
- fputs(msg, stderr);
- exit(EXIT_FAILURE);
-}
-
-const char* loopback = "127.0.0.1";
-const short yasslPort = 11111;
-
-using namespace yaSSL;
-
-
-int main(int argc, char** argv)
-{
-#ifdef WIN32
- WSADATA wsd;
- WSAStartup(0x0002, &wsd);
- int sockfd;
-#else
- unsigned int sockfd;
-#endif /* WIN32 */
-
- FILE* fin = stdin;
- FILE* fout = stdout;
-
- if (argc >= 2) fin = fopen(argv[1], "r");
- if (argc >= 3) fout = fopen(argv[2], "w");
-
- if (!fin) err_sys("can't open input file");
- if (!fout) err_sys("can't open output file");
-
- sockfd = socket(AF_INET, SOCK_STREAM, 0);
- sockaddr_in servaddr;
- memset(&servaddr, 0, sizeof(servaddr));
- servaddr.sin_family = AF_INET;
-
- servaddr.sin_port = htons(yasslPort);
- servaddr.sin_addr.s_addr = inet_addr(loopback);
- if (connect(sockfd, (const sockaddr*)&servaddr, sizeof(servaddr)) != 0)
- err_sys("tcp connect failed");
-
- SSL_METHOD* method = TLSv1_client_method();
- SSL_CTX* ctx = SSL_CTX_new(method);
- SSL* ssl = SSL_new(ctx);
-
- SSL_set_fd(ssl, sockfd);
- if (SSL_connect(ssl) != SSL_SUCCESS) err_sys("SSL_connect failed");
-
- char send[1024];
- char reply[1024];
-
- while (fgets(send, sizeof(send), fin)) {
-
- int sendSz = strlen(send) + 1;
- if (SSL_write(ssl, send, sendSz) != sendSz)
- err_sys("SSL_write failed");
-
- if (strncmp(send, "quit", 4) == 0) {
- fputs("sending server shutdown command: quit!", fout);
- break;
- }
-
- if (SSL_read(ssl, reply, sizeof(reply)) > 0)
- fputs(reply, fout);
- }
-
- SSL_CTX_free(ctx);
- SSL_free(ssl);
-
- return 0;
-}
diff --git a/extra/yassl/examples/echoclient/quit b/extra/yassl/examples/echoclient/quit
deleted file mode 100644
index 3db49b3ad12..00000000000
--- a/extra/yassl/examples/echoclient/quit
+++ /dev/null
@@ -1,2 +0,0 @@
-quit
-
diff --git a/extra/yassl/examples/echoserver/echoserver.cpp b/extra/yassl/examples/echoserver/echoserver.cpp
deleted file mode 100644
index 3f639469895..00000000000
--- a/extra/yassl/examples/echoserver/echoserver.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* echoserver.cpp */
-
-#include "../../testsuite/test.hpp"
-
-
-#ifndef NO_MAIN_DRIVER
- #define ECHO_OUT
-
- THREAD_RETURN YASSL_API echoserver_test(void*);
- int main(int argc, char** argv)
- {
- func_args args;
-
- args.argc = argc;
- args.argv = argv;
-
- echoserver_test(&args);
- yaSSL_CleanUp();
-
- return args.return_code;
- }
-
-#endif // NO_MAIN_DRIVER
-
-
-
-void EchoError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& s1, SOCKET_T& s2,
- const char* msg)
-{
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(s1);
- tcp_close(s2);
- err_sys(msg);
-}
-
-
-THREAD_RETURN YASSL_API echoserver_test(void* args)
-{
-#ifdef _WIN32
- WSADATA wsd;
- WSAStartup(0x0002, &wsd);
-#endif
-
- SOCKET_T sockfd = 0;
- int argc = 0;
- char** argv = 0;
-
- set_args(argc, argv, *static_cast<func_args*>(args));
-
-#ifdef ECHO_OUT
- FILE* fout = stdout;
- if (argc >= 2) fout = fopen(argv[1], "w");
- if (!fout) err_sys("can't open output file");
-#endif
-
- tcp_listen(sockfd);
-
- SSL_METHOD* method = SSLv23_server_method();
- SSL_CTX* ctx = SSL_CTX_new(method);
-
- set_serverCerts(ctx);
- DH* dh = set_tmpDH(ctx);
-
- bool shutdown(false);
-
-#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER)
- // signal ready to tcp_accept
- func_args& server_args = *((func_args*)args);
- tcp_ready& ready = *server_args.signal_;
- pthread_mutex_lock(&ready.mutex_);
- ready.ready_ = true;
- pthread_cond_signal(&ready.cond_);
- pthread_mutex_unlock(&ready.mutex_);
-#endif
-
- while (!shutdown) {
- SOCKADDR_IN_T client;
- socklen_t client_len = sizeof(client);
- SOCKET_T clientfd = accept(sockfd, (sockaddr*)&client,
- (ACCEPT_THIRD_T)&client_len);
- if (clientfd == (SOCKET_T) -1) {
- SSL_CTX_free(ctx);
- tcp_close(sockfd);
- err_sys("tcp accept failed");
- }
-
- SSL* ssl = SSL_new(ctx);
- SSL_set_fd(ssl, clientfd);
- if (SSL_accept(ssl) != SSL_SUCCESS) {
- printf("SSL_accept failed\n");
- SSL_free(ssl);
- tcp_close(clientfd);
- continue;
- }
-
- char command[1024];
- int echoSz(0);
- while ( (echoSz = SSL_read(ssl, command, sizeof(command))) > 0) {
-
- if ( strncmp(command, "quit", 4) == 0) {
- printf("client sent quit command: shutting down!\n");
- shutdown = true;
- break;
- }
- else if ( strncmp(command, "GET", 3) == 0) {
- char type[] = "HTTP/1.0 200 ok\r\nContent-type:"
- " text/html\r\n\r\n";
- char header[] = "<html><body BGCOLOR=\"#ffffff\">\n<pre>\n";
- char body[] = "greetings from yaSSL\n";
- char footer[] = "</body></html>\r\n\r\n";
-
- strncpy(command, type, sizeof(type));
- echoSz = sizeof(type) - 1;
-
- strncpy(&command[echoSz], header, sizeof(header));
- echoSz += sizeof(header) - 1;
- strncpy(&command[echoSz], body, sizeof(body));
- echoSz += sizeof(body) - 1;
- strncpy(&command[echoSz], footer, sizeof(footer));
- echoSz += sizeof(footer);
-
- if (SSL_write(ssl, command, echoSz) != echoSz)
- EchoError(ctx, ssl, sockfd, clientfd, "SSL_write failed");
-
- break;
- }
- command[echoSz] = 0;
-
- #ifdef ECHO_OUT
- fputs(command, fout);
- #endif
-
- if (SSL_write(ssl, command, echoSz) != echoSz)
- EchoError(ctx, ssl, sockfd, clientfd, "SSL_write failed");
- }
- SSL_shutdown(ssl);
- SSL_free(ssl);
- tcp_close(clientfd);
- }
-
- tcp_close(sockfd);
-
- DH_free(dh);
- SSL_CTX_free(ctx);
-
- ((func_args*)args)->return_code = 0;
- return 0;
-}
diff --git a/extra/yassl/examples/echoserver/echoserver.dsp b/extra/yassl/examples/echoserver/echoserver.dsp
deleted file mode 100644
index 21a965b013c..00000000000
--- a/extra/yassl/examples/echoserver/echoserver.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="echoserver" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=echoserver - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "echoserver.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "echoserver.mak" CFG="echoserver - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "echoserver - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "echoserver - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "echoserver - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /O2 /I "..\..\include" /I "..\..\taocrypt\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "echoserver - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "..\..\include" /I "..\..\taocrypt\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "echoserver - Win32 Release"
-# Name "echoserver - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\echoserver.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/examples/server/server.cpp b/extra/yassl/examples/server/server.cpp
deleted file mode 100644
index 8a3a0a7db0e..00000000000
--- a/extra/yassl/examples/server/server.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* server.cpp */
-
-// takes 2 optional command line argument to make scripting
-// if the first command line argument is 'n' client auth is disabled
-// if the second command line argument is 'd' DSA certs are used instead of RSA
-
-#include "../../testsuite/test.hpp"
-
-
-void ServerError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& sockfd, const char* msg)
-{
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys(msg);
-}
-
-
-#ifdef NON_BLOCKING
- void NonBlockingSSL_Accept(SSL* ssl, SSL_CTX* ctx, SOCKET_T& clientfd)
- {
- int ret = SSL_accept(ssl);
- int err = SSL_get_error(ssl, 0);
- while (ret != SSL_SUCCESS && (err == SSL_ERROR_WANT_READ ||
- err == SSL_ERROR_WANT_WRITE)) {
- if (err == SSL_ERROR_WANT_READ)
- printf("... server would read block\n");
- else
- printf("... server would write block\n");
- #ifdef _WIN32
- Sleep(1000);
- #else
- sleep(1);
- #endif
- ret = SSL_accept(ssl);
- err = SSL_get_error(ssl, 0);
- }
- if (ret != SSL_SUCCESS)
- ServerError(ctx, ssl, clientfd, "SSL_accept failed");
- }
-#endif
-
-
-THREAD_RETURN YASSL_API server_test(void* args)
-{
-#ifdef _WIN32
- WSADATA wsd;
- WSAStartup(0x0002, &wsd);
-#endif
-
- SOCKET_T sockfd = 0;
- SOCKET_T clientfd = 0;
- int argc = 0;
- char** argv = 0;
-
- set_args(argc, argv, *static_cast<func_args*>(args));
-#ifdef SERVER_READY_FILE
- set_file_ready("server_ready", *static_cast<func_args*>(args));
-#endif
- tcp_accept(sockfd, clientfd, *static_cast<func_args*>(args));
-
- tcp_close(sockfd);
-
- SSL_METHOD* method = TLSv1_server_method();
- SSL_CTX* ctx = SSL_CTX_new(method);
-
- //SSL_CTX_set_cipher_list(ctx, "RC4-SHA:RC4-MD5");
-
- // should we disable client auth
- if (argc >= 2 && argv[1][0] == 'n')
- printf("disabling client auth\n");
- else
- SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, 0);
-
- // are we using DSA certs
- if (argc >= 3 && argv[2][0] == 'd') {
- printf("using DSA certs\n");
- set_dsaServerCerts(ctx);
- }
- else {
- set_serverCerts(ctx);
- }
- DH* dh = set_tmpDH(ctx);
-
- SSL* ssl = SSL_new(ctx);
- SSL_set_fd(ssl, clientfd);
-
-#ifdef NON_BLOCKING
- NonBlockingSSL_Accept(ssl, ctx, clientfd);
-#else
- if (SSL_accept(ssl) != SSL_SUCCESS)
- ServerError(ctx, ssl, clientfd, "SSL_accept failed");
-#endif
-
- showPeer(ssl);
- printf("Using Cipher Suite: %s\n", SSL_get_cipher(ssl));
-
- char command[1024];
- int input = SSL_read(ssl, command, sizeof(command));
- if (input > 0) {
- command[input] = 0;
- printf("First client command: %s\n", command);
- }
-
- char msg[] = "I hear you, fa shizzle!";
- if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
- ServerError(ctx, ssl, clientfd, "SSL_write failed");
-
- DH_free(dh);
- SSL_CTX_free(ctx);
- SSL_shutdown(ssl);
- SSL_free(ssl);
-
- tcp_close(clientfd);
-
- ((func_args*)args)->return_code = 0;
- return 0;
-}
-
-
-#ifndef NO_MAIN_DRIVER
-
- int main(int argc, char** argv)
- {
- func_args args;
-
- args.argc = argc;
- args.argv = argv;
-
- server_test(&args);
- yaSSL_CleanUp();
-
- return args.return_code;
- }
-
-#endif // NO_MAIN_DRIVER
-
diff --git a/extra/yassl/examples/server/server.dsp b/extra/yassl/examples/server/server.dsp
deleted file mode 100644
index 9c797c54dfe..00000000000
--- a/extra/yassl/examples/server/server.dsp
+++ /dev/null
@@ -1,109 +0,0 @@
-# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=server - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "server - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /O2 /I "..\..\include" /I "..\..\taocrypt\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /machine:I386
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "server - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "..\..\include" /I "..\..\taocrypt\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "server - Win32 Release"
-# Name "server - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\server.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/include/buffer.hpp b/extra/yassl/include/buffer.hpp
deleted file mode 100644
index 71bea3c109a..00000000000
--- a/extra/yassl/include/buffer.hpp
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL buffer header defines input and output buffers to simulate streaming
- * with SSL types and sockets
- */
-
-#ifndef yaSSL_BUFFER_HPP
-#define yaSSL_BUFFER_HPP
-
-#include <assert.h> // assert
-#include "yassl_types.hpp" // ysDelete
-#include "memory.hpp" // mySTL::auto_ptr
-#include STL_ALGORITHM_FILE
-
-
-namespace STL = STL_NAMESPACE;
-
-
-#ifdef _MSC_VER
- // disable truncated debug symbols
- #pragma warning(disable:4786)
-#endif
-
-
-namespace yaSSL {
-
-typedef unsigned char byte;
-typedef unsigned int uint;
-const uint AUTO = 0xFEEDBEEF;
-
-
-
-struct NoCheck {
- int check(uint, uint);
-};
-
-struct Check {
- int check(uint, uint);
-};
-
-/* input_buffer operates like a smart c style array with a checking option,
- * meant to be read from through [] with AUTO index or read().
- * Should only write to at/near construction with assign() or raw (e.g., recv)
- * followed by add_size with the number of elements added by raw write.
- *
- * Not using vector because need checked []access, offset, and the ability to
- * write to the buffer bulk wise and have the correct size
- */
-
-class input_buffer : public Check {
- uint size_; // number of elements in buffer
- uint current_; // current offset position in buffer
- byte* buffer_; // storage for buffer
- byte* end_; // end of storage marker
- int error_; // error number
- byte zero_; // for returning const reference to zero byte
-public:
- input_buffer();
-
- explicit input_buffer(uint s);
-
- // with assign
- input_buffer(uint s, const byte* t, uint len);
-
- ~input_buffer();
-
- // users can pass defualt zero length buffer and then allocate
- void allocate(uint s);
-
- // for passing to raw writing functions at beginning, then use add_size
- byte* get_buffer() const;
-
- // after a raw write user can set new size
- // if you know the size before the write use assign()
- void add_size(uint i);
-
- uint get_capacity() const;
-
- uint get_current() const;
-
- uint get_size() const;
-
- uint get_remaining() const;
-
- int get_error() const;
-
- void set_error();
-
- void set_current(uint i);
-
- // read only access through [], advance current
- // user passes in AUTO index for ease of use
- const byte& operator[](uint i);
-
- // end of input test
- bool eof();
-
- // peek ahead
- byte peek();
-
- // write function, should use at/near construction
- void assign(const byte* t, uint s);
-
- // use read to query input, adjusts current
- void read(byte* dst, uint length);
-
-private:
- input_buffer(const input_buffer&); // hide copy
- input_buffer& operator=(const input_buffer&); // and assign
-};
-
-
-/* output_buffer operates like a smart c style array with a checking option.
- * Meant to be written to through [] with AUTO index or write().
- * Size (current) counter increases when written to. Can be constructed with
- * zero length buffer but be sure to allocate before first use.
- * Don't use add write for a couple bytes, use [] instead, way less overhead.
- *
- * Not using vector because need checked []access and the ability to
- * write to the buffer bulk wise and retain correct size
- */
-class output_buffer : public NoCheck {
- uint current_; // current offset and elements in buffer
- byte* buffer_; // storage for buffer
- byte* end_; // end of storage marker
-public:
- // default
- output_buffer();
-
- // with allocate
- explicit output_buffer(uint s);
-
- // with assign
- output_buffer(uint s, const byte* t, uint len);
-
- ~output_buffer();
-
- uint get_size() const;
-
- uint get_capacity() const;
-
- void set_current(uint c);
-
- // users can pass defualt zero length buffer and then allocate
- void allocate(uint s);
-
- // for passing to reading functions when finished
- const byte* get_buffer() const;
-
- // allow write access through [], update current
- // user passes in AUTO as index for ease of use
- byte& operator[](uint i);
-
- // end of output test
- bool eof();
-
- void write(const byte* t, uint s);
-
-private:
- output_buffer(const output_buffer&); // hide copy
- output_buffer& operator=(const output_buffer&); // and assign
-};
-
-
-
-
-// turn delete an incomplete type into comipler error instead of warning
-template <typename T>
-inline void checked_delete(T* p)
-{
- typedef char complete_type[sizeof(T) ? 1 : -1];
- (void)sizeof(complete_type);
- ysDelete(p);
-}
-
-
-// checked delete functor increases effeciency, no indirection on function call
-// sets pointer to zero so safe for std conatiners
-struct del_ptr_zero
-{
- template <typename T>
- void operator()(T*& p) const
- {
- T* tmp = 0;
- STL::swap(tmp, p);
- checked_delete(tmp);
- }
-};
-
-
-
-} // naemspace
-
-#endif // yaSSL_BUUFER_HPP
diff --git a/extra/yassl/include/cert_wrapper.hpp b/extra/yassl/include/cert_wrapper.hpp
deleted file mode 100644
index d32870fcfc1..00000000000
--- a/extra/yassl/include/cert_wrapper.hpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* The certificate wrapper header defines certificate management functions
- *
- */
-
-
-#ifndef yaSSL_CERT_WRAPPER_HPP
-#define yaSSL_CERT_WRAPPER_HPP
-
-#ifdef _MSC_VER
- // disable truncated debug symbols
- #pragma warning(disable:4786)
-#endif
-
-
-#include "yassl_types.hpp" // SignatureAlgorithm
-#include "buffer.hpp" // input_buffer
-#include "asn.hpp" // SignerList
-#include "openssl/ssl.h" // internal and external use
-#include STL_LIST_FILE
-#include STL_ALGORITHM_FILE
-
-
-namespace STL = STL_NAMESPACE;
-
-
-namespace yaSSL {
-
-typedef unsigned char opaque;
-class X509; // forward openSSL type
-
-using TaoCrypt::SignerList;
-
-// an x509 version 3 certificate
-class x509 {
- uint length_;
- opaque* buffer_;
-public:
- explicit x509(uint sz);
- ~x509();
-
- uint get_length() const;
- const opaque* get_buffer() const;
- opaque* use_buffer();
-
- x509(const x509&);
- x509& operator=(const x509&);
-private:
- void Swap(x509&);
-};
-
-
-// Certificate Manager keeps a list of the cert chain and public key
-class CertManager {
- typedef STL::list<x509*> CertList;
-
- CertList list_; // self
- input_buffer privateKey_;
-
- CertList peerList_; // peer
- input_buffer peerPublicKey_;
- X509* peerX509_; // peer's openSSL X509
- X509* selfX509_; // our own openSSL X509
-
- SignatureAlgorithm keyType_; // self key type
- SignatureAlgorithm peerKeyType_; // peer's key type
-
- SignerList signers_; // decoded CA keys and names
- // plus verified chained certs
- bool verifyPeer_;
- bool verifyNone_; // no error if verify fails
- bool failNoCert_;
- bool sendVerify_;
- bool sendBlankCert_;
- VerifyCallback verifyCallback_; // user verify callback
-public:
- CertManager();
- ~CertManager();
-
- void AddPeerCert(x509* x); // take ownership
- void CopySelfCert(const x509* x);
- int CopyCaCert(const x509* x);
- int Validate();
-
- int SetPrivateKey(const x509&);
-
- const x509* get_cert() const;
- const opaque* get_peerKey() const;
- const opaque* get_privateKey() const;
- X509* get_peerX509() const;
- X509* get_selfX509() const;
- SignatureAlgorithm get_keyType() const;
- SignatureAlgorithm get_peerKeyType() const;
-
- uint get_peerKeyLength() const;
- uint get_privateKeyLength() const;
-
- bool verifyPeer() const;
- bool verifyNone() const;
- bool failNoCert() const;
- bool sendVerify() const;
- bool sendBlankCert() const;
-
- void setVerifyPeer();
- void setVerifyNone();
- void setFailNoCert();
- void setSendVerify();
- void setSendBlankCert();
- void setPeerX509(X509*);
- void setVerifyCallback(VerifyCallback);
-private:
- CertManager(const CertManager&); // hide copy
- CertManager& operator=(const CertManager&); // and assigin
-};
-
-
-} // naemspace
-
-#endif // yaSSL_CERT_WRAPPER_HPP
diff --git a/extra/yassl/include/crypto_wrapper.hpp b/extra/yassl/include/crypto_wrapper.hpp
deleted file mode 100644
index 97cd989b78d..00000000000
--- a/extra/yassl/include/crypto_wrapper.hpp
+++ /dev/null
@@ -1,429 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* The crypto wrapper header is used to define policies for the cipher
- * components used by SSL. There are 3 policies to consider:
- *
- * 1) MAC, the Message Authentication Code used for each Message
- * 2) Bulk Cipher, the Cipher used to encrypt/decrypt each Message
- * 3) Atuhentication, the Digitial Signing/Verifiaction scheme used
- *
- * This header doesn't rely on a specific crypto libraries internals,
- * only the implementation should.
- */
-
-
-#ifndef yaSSL_CRYPTO_WRAPPER_HPP
-#define yaSSL_CRYPTO_WRAPPER_HPP
-
-#include "yassl_types.hpp"
-#include <stdio.h> // FILE
-
-
-namespace yaSSL {
-
-
-// Digest policy should implement a get_digest, update, and get sizes for pad
-// and digest
-struct Digest : public virtual_base {
- virtual void get_digest(byte*) = 0;
- virtual void get_digest(byte*, const byte*, unsigned int) = 0;
- virtual void update(const byte*, unsigned int) = 0;
- virtual uint get_digestSize() const = 0;
- virtual uint get_padSize() const = 0;
- virtual ~Digest() {}
-};
-
-
-// For use with NULL Digests
-struct NO_MAC : public Digest {
- void get_digest(byte*);
- void get_digest(byte*, const byte*, unsigned int);
- void update(const byte*, unsigned int);
- uint get_digestSize() const;
- uint get_padSize() const;
-};
-
-
-// MD5 Digest
-class MD5 : public Digest {
-public:
- void get_digest(byte*);
- void get_digest(byte*, const byte*, unsigned int);
- void update(const byte*, unsigned int);
- uint get_digestSize() const;
- uint get_padSize() const;
- MD5();
- ~MD5();
- MD5(const MD5&);
- MD5& operator=(const MD5&);
-private:
- struct MD5Impl;
- MD5Impl* pimpl_;
-};
-
-
-// SHA-1 Digest
-class SHA : public Digest {
-public:
- void get_digest(byte*);
- void get_digest(byte*, const byte*, unsigned int);
- void update(const byte*, unsigned int);
- uint get_digestSize() const;
- uint get_padSize() const;
- SHA();
- ~SHA();
- SHA(const SHA&);
- SHA& operator=(const SHA&);
-private:
- struct SHAImpl;
- SHAImpl* pimpl_;
-
-};
-
-
-// RIPEMD-160 Digest
-class RMD : public Digest {
-public:
- void get_digest(byte*);
- void get_digest(byte*, const byte*, unsigned int);
- void update(const byte*, unsigned int);
- uint get_digestSize() const;
- uint get_padSize() const;
- RMD();
- ~RMD();
- RMD(const RMD&);
- RMD& operator=(const RMD&);
-private:
- struct RMDImpl;
- RMDImpl* pimpl_;
-
-};
-
-
-// HMAC_MD5
-class HMAC_MD5 : public Digest {
-public:
- void get_digest(byte*);
- void get_digest(byte*, const byte*, unsigned int);
- void update(const byte*, unsigned int);
- uint get_digestSize() const;
- uint get_padSize() const;
- HMAC_MD5(const byte*, unsigned int);
- ~HMAC_MD5();
-private:
- struct HMAC_MD5Impl;
- HMAC_MD5Impl* pimpl_;
-
- HMAC_MD5(const HMAC_MD5&);
- HMAC_MD5& operator=(const HMAC_MD5&);
-};
-
-
-// HMAC_SHA-1
-class HMAC_SHA : public Digest {
-public:
- void get_digest(byte*);
- void get_digest(byte*, const byte*, unsigned int);
- void update(const byte*, unsigned int);
- uint get_digestSize() const;
- uint get_padSize() const;
- HMAC_SHA(const byte*, unsigned int);
- ~HMAC_SHA();
-private:
- struct HMAC_SHAImpl;
- HMAC_SHAImpl* pimpl_;
-
- HMAC_SHA(const HMAC_SHA&);
- HMAC_SHA& operator=(const HMAC_SHA&);
-};
-
-
-// HMAC_RMD
-class HMAC_RMD : public Digest {
-public:
- void get_digest(byte*);
- void get_digest(byte*, const byte*, unsigned int);
- void update(const byte*, unsigned int);
- uint get_digestSize() const;
- uint get_padSize() const;
- HMAC_RMD(const byte*, unsigned int);
- ~HMAC_RMD();
-private:
- struct HMAC_RMDImpl;
- HMAC_RMDImpl* pimpl_;
-
- HMAC_RMD(const HMAC_RMD&);
- HMAC_RMD& operator=(const HMAC_RMD&);
-};
-
-
-// BulkCipher policy should implement encrypt, decrypt, get block size,
-// and set keys for encrypt and decrypt
-struct BulkCipher : public virtual_base {
- virtual void encrypt(byte*, const byte*, unsigned int) = 0;
- virtual void decrypt(byte*, const byte*, unsigned int) = 0;
- virtual void set_encryptKey(const byte*, const byte* = 0) = 0;
- virtual void set_decryptKey(const byte*, const byte* = 0) = 0;
- virtual uint get_blockSize() const = 0;
- virtual int get_keySize() const = 0;
- virtual int get_ivSize() const = 0;
- virtual ~BulkCipher() {}
-};
-
-
-// For use with NULL Ciphers
-struct NO_Cipher : public BulkCipher {
- void encrypt(byte*, const byte*, unsigned int) {}
- void decrypt(byte*, const byte*, unsigned int) {}
- void set_encryptKey(const byte*, const byte*) {}
- void set_decryptKey(const byte*, const byte*) {}
- uint get_blockSize() const { return 0; }
- int get_keySize() const { return 0; }
- int get_ivSize() const { return 0; }
-};
-
-
-// SSLv3 and TLSv1 always use DES in CBC mode so IV is required
-class DES : public BulkCipher {
-public:
- void encrypt(byte*, const byte*, unsigned int);
- void decrypt(byte*, const byte*, unsigned int);
- void set_encryptKey(const byte*, const byte*);
- void set_decryptKey(const byte*, const byte*);
- uint get_blockSize() const { return DES_BLOCK; }
- int get_keySize() const { return DES_KEY_SZ; }
- int get_ivSize() const { return DES_IV_SZ; }
- DES();
- ~DES();
-private:
- struct DESImpl;
- DESImpl* pimpl_;
-
- DES(const DES&); // hide copy
- DES& operator=(const DES&); // & assign
-};
-
-
-// 3DES Encrypt-Decrypt-Encrypt in CBC mode
-class DES_EDE : public BulkCipher {
-public:
- void encrypt(byte*, const byte*, unsigned int);
- void decrypt(byte*, const byte*, unsigned int);
- void set_encryptKey(const byte*, const byte*);
- void set_decryptKey(const byte*, const byte*);
- uint get_blockSize() const { return DES_BLOCK; }
- int get_keySize() const { return DES_EDE_KEY_SZ; }
- int get_ivSize() const { return DES_IV_SZ; }
- DES_EDE();
- ~DES_EDE();
-private:
- struct DES_EDEImpl;
- DES_EDEImpl* pimpl_;
-
- DES_EDE(const DES_EDE&); // hide copy
- DES_EDE& operator=(const DES_EDE&); // & assign
-};
-
-
-// Alledged RC4
-class RC4 : public BulkCipher {
-public:
- void encrypt(byte*, const byte*, unsigned int);
- void decrypt(byte*, const byte*, unsigned int);
- void set_encryptKey(const byte*, const byte*);
- void set_decryptKey(const byte*, const byte*);
- uint get_blockSize() const { return 0; }
- int get_keySize() const { return RC4_KEY_SZ; }
- int get_ivSize() const { return 0; }
- RC4();
- ~RC4();
-private:
- struct RC4Impl;
- RC4Impl* pimpl_;
-
- RC4(const RC4&); // hide copy
- RC4& operator=(const RC4&); // & assign
-};
-
-
-// AES
-class AES : public BulkCipher {
-public:
- void encrypt(byte*, const byte*, unsigned int);
- void decrypt(byte*, const byte*, unsigned int);
- void set_encryptKey(const byte*, const byte*);
- void set_decryptKey(const byte*, const byte*);
- uint get_blockSize() const { return AES_BLOCK_SZ; }
- int get_keySize() const;
- int get_ivSize() const { return AES_IV_SZ; }
- explicit AES(unsigned int = AES_128_KEY_SZ);
- ~AES();
-private:
- struct AESImpl;
- AESImpl* pimpl_;
-
- AES(const AES&); // hide copy
- AES& operator=(const AES&); // & assign
-};
-
-
-// Random number generator
-class RandomPool {
-public:
- void Fill(opaque* dst, uint sz) const;
- RandomPool();
- ~RandomPool();
-
- int GetError() const;
-
- friend class RSA;
- friend class DSS;
- friend class DiffieHellman;
-private:
- struct RandomImpl;
- RandomImpl* pimpl_;
-
- RandomPool(const RandomPool&); // hide copy
- RandomPool& operator=(const RandomPool&); // & assign
-};
-
-
-// Authentication policy should implement sign, and verify
-struct Auth : public virtual_base {
- virtual void sign(byte*, const byte*, unsigned int, const RandomPool&) = 0;
- virtual bool verify(const byte*, unsigned int, const byte*,
- unsigned int) = 0;
- virtual uint get_signatureLength() const = 0;
- virtual ~Auth() {}
-};
-
-
-// For use with NULL Authentication schemes
-struct NO_Auth : public Auth {
- void sign(byte*, const byte*, unsigned int, const RandomPool&) {}
- bool verify(const byte*, unsigned int, const byte*, unsigned int)
- { return true; }
-};
-
-
-// Digitial Signature Standard scheme
-class DSS : public Auth {
-public:
- void sign(byte*, const byte*, unsigned int, const RandomPool&);
- bool verify(const byte*, unsigned int, const byte*, unsigned int);
- uint get_signatureLength() const;
- DSS(const byte*, unsigned int, bool publicKey = true);
- ~DSS();
-private:
- struct DSSImpl;
- DSSImpl* pimpl_;
-
- DSS(const DSS&);
- DSS& operator=(const DSS&);
-};
-
-
-// RSA Authentication and exchange
-class RSA : public Auth {
-public:
- void sign(byte*, const byte*, unsigned int, const RandomPool&);
- bool verify(const byte*, unsigned int, const byte*, unsigned int);
- void encrypt(byte*, const byte*, unsigned int, const RandomPool&);
- void decrypt(byte*, const byte*, unsigned int, const RandomPool&);
- uint get_signatureLength() const;
- uint get_cipherLength() const;
- RSA(const byte*, unsigned int, bool publicKey = true);
- ~RSA();
-private:
- struct RSAImpl;
- RSAImpl* pimpl_;
-
- RSA(const RSA&); // hide copy
- RSA& operator=(const RSA&); // & assing
-};
-
-
-class Integer;
-
-// Diffie-Hellman agreement
-// hide for now TODO: figure out a way to give access to C clients p and g args
-class DiffieHellman {
-public:
- DiffieHellman(const byte*, unsigned int, const byte*, unsigned int,
- const byte*, unsigned int, const RandomPool& random);
- //DiffieHellman(const char*, const RandomPool&);
- DiffieHellman(const Integer&, const Integer&, const RandomPool&);
- ~DiffieHellman();
-
- DiffieHellman(const DiffieHellman&);
- DiffieHellman& operator=(const DiffieHellman&);
-
- uint get_agreedKeyLength() const;
- const byte* get_agreedKey() const;
- uint get_publicKeyLength() const;
- const byte* get_publicKey() const;
- void makeAgreement(const byte*, unsigned int);
-
- void set_sizes(int&, int&, int&) const;
- void get_parms(byte*, byte*, byte*) const;
-private:
- struct DHImpl;
- DHImpl* pimpl_;
-};
-
-
-// Lagrge Integer
-class Integer {
-public:
- Integer();
- ~Integer();
-
- Integer(const Integer&);
- Integer& operator=(const Integer&);
-
- void assign(const byte*, unsigned int);
-
- friend class DiffieHellman;
-private:
- struct IntegerImpl;
- IntegerImpl* pimpl_;
-};
-
-
-class x509;
-
-
-struct EncryptedInfo {
- enum { IV_SZ = 32, NAME_SZ = 80 };
- char name[NAME_SZ]; // max one line
- byte iv[IV_SZ]; // in base16 rep
- uint ivSz;
- bool set;
-
- EncryptedInfo() : ivSz(0), set(false) {}
-};
-
-x509* PemToDer(FILE*, CertType, EncryptedInfo* info = 0);
-
-
-} // naemspace
-
-#endif // yaSSL_CRYPTO_WRAPPER_HPP
diff --git a/extra/yassl/include/factory.hpp b/extra/yassl/include/factory.hpp
deleted file mode 100644
index e0f420844fb..00000000000
--- a/extra/yassl/include/factory.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* The factory header defines an Object Factory, used by SSL message and
- * handshake types.
- *
- * See Desgin Pattern in GoF and Alexandrescu's chapter in Modern C++ Design,
- * page 208
- */
-
-
-
-#ifndef yaSSL_FACTORY_HPP
-#define yaSSL_FACTORY_HPP
-
-#include STL_VECTOR_FILE
-#include STL_PAIR_FILE
-
-
-namespace STL = STL_NAMESPACE;
-
-
-
-
-
-namespace yaSSL {
-
-
-// Factory uses its callback map to create objects by id,
-// returning an abstract base pointer
-template<class AbstractProduct,
- typename IdentifierType = int,
- typename ProductCreator = AbstractProduct* (*)()
- >
-class Factory {
- typedef STL::pair<IdentifierType, ProductCreator> CallBack;
- typedef STL::vector<CallBack> CallBackVector;
-
- CallBackVector callbacks_;
-public:
- // pass function pointer to register all callbacks upon creation
- explicit Factory(void (*init)(Factory<AbstractProduct, IdentifierType,
- ProductCreator>&))
- {
- init(*this);
- }
-
- // reserve place in vector before registering, used by init funcion
- void Reserve(size_t sz)
- {
- callbacks_.reserve(sz);
- }
-
- // register callback
- void Register(const IdentifierType& id, ProductCreator pc)
- {
- callbacks_.push_back(STL::make_pair(id, pc));
- }
-
- // THE Creator, returns a new object of the proper type or 0
- AbstractProduct* CreateObject(const IdentifierType& id) const
- {
- typedef typename STL::vector<CallBack>::const_iterator cIter;
-
- cIter first = callbacks_.begin();
- cIter last = callbacks_.end();
-
- while (first != last) {
- if (first->first == id)
- break;
- ++first;
- }
-
- if (first == callbacks_.end())
- return 0;
- return (first->second)();
- }
-private:
- Factory(const Factory&); // hide copy
- Factory& operator=(const Factory&); // and assign
-};
-
-
-} // naemspace
-
-#endif // yaSSL_FACTORY_HPP
diff --git a/extra/yassl/include/handshake.hpp b/extra/yassl/include/handshake.hpp
deleted file mode 100644
index dc472690c73..00000000000
--- a/extra/yassl/include/handshake.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* The handshake header declares function prototypes for creating and reading
- * the various handshake messages.
- */
-
-
-
-#ifndef yaSSL_HANDSHAKE_HPP
-#define yaSSL_HANDSHAKE_HPP
-
-#include "yassl_types.hpp"
-
-
-namespace yaSSL {
-
-// forward decls
-class SSL;
-class Finished;
-class Data;
-class Alert;
-struct Hashes;
-
-enum BufferOutput { buffered, unbuffered };
-
-void sendClientHello(SSL&);
-void sendServerHello(SSL&, BufferOutput = buffered);
-void sendServerHelloDone(SSL&, BufferOutput = buffered);
-void sendClientKeyExchange(SSL&, BufferOutput = buffered);
-void sendServerKeyExchange(SSL&, BufferOutput = buffered);
-void sendChangeCipher(SSL&, BufferOutput = buffered);
-void sendFinished(SSL&, ConnectionEnd, BufferOutput = buffered);
-void sendCertificate(SSL&, BufferOutput = buffered);
-void sendCertificateRequest(SSL&, BufferOutput = buffered);
-void sendCertificateVerify(SSL&, BufferOutput = buffered);
-int sendData(SSL&, const void*, int);
-int sendAlert(SSL& ssl, const Alert& alert);
-
-int receiveData(SSL&, Data&, bool peek = false);
-void processReply(SSL&);
-
-void buildFinished(SSL&, Finished&, const opaque*);
-void build_certHashes(SSL&, Hashes&);
-
-void hmac(SSL&, byte*, const byte*, uint, ContentType, bool verify = false);
-void TLS_hmac(SSL&, byte*, const byte*, uint, ContentType,
- bool verify = false);
-void PRF(byte* digest, uint digLen, const byte* secret, uint secLen,
- const byte* label, uint labLen, const byte* seed, uint seedLen);
-
-} // naemspace
-
-#endif // yaSSL_HANDSHAKE_HPP
diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp
deleted file mode 100644
index 3f66ea145bf..00000000000
--- a/extra/yassl/include/lock.hpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* lock.hpp provides an os specific Lock, locks mutex on entry and unlocks
- * automatically upon exit, no-ops provided for Single Threaded
-*/
-
-#ifndef yaSSL_LOCK_HPP
-#define yaSSL_LOCK_HPP
-
-/*
- Visual Studio Source Annotations header (sourceannotations.h) fails
- to compile if outside of the global namespace.
-*/
-#ifdef MULTI_THREADED
-#ifdef _WIN32
-#include <windows.h>
-#endif
-#endif
-
-namespace yaSSL {
-
-
-#ifdef MULTI_THREADED
- #ifdef _WIN32
- #include <windows.h>
-
- class Mutex {
- CRITICAL_SECTION cs_;
- public:
- Mutex();
- ~Mutex();
-
- class Lock;
- friend class Lock;
-
- class Lock {
- Mutex& mutex_;
- public:
- explicit Lock(Mutex& lm);
- ~Lock();
- };
- };
- #else // _WIN32
- #include <pthread.h>
-
- class Mutex {
- pthread_mutex_t mutex_;
- public:
-
- Mutex();
- ~Mutex();
-
- class Lock;
- friend class Lock;
-
- class Lock {
- Mutex& mutex_;
- public:
- explicit Lock(Mutex& lm);
- ~Lock();
- };
- };
-
- #endif // _WIN32
-#else // MULTI_THREADED (WE'RE SINGLE)
-
- class Mutex {
- public:
- class Lock {
- public:
- explicit Lock(Mutex&) {}
- };
- };
-
-#endif // MULTI_THREADED
-
-
-
-} // namespace
-#endif // yaSSL_LOCK_HPP
diff --git a/extra/yassl/include/log.hpp b/extra/yassl/include/log.hpp
deleted file mode 100644
index 8dc33684a43..00000000000
--- a/extra/yassl/include/log.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL log interface
- *
- */
-
-#ifndef yaSSL_LOG_HPP
-#define yaSSL_LOG_HPP
-
-#include "socket_wrapper.hpp"
-
-#ifdef YASSL_LOG
-#include <stdio.h>
-#endif
-
-namespace yaSSL {
-
-typedef unsigned int uint;
-
-
-// Debug logger
-class Log {
-#ifdef YASSL_LOG
- FILE* log_;
-#endif
-public:
- explicit Log(const char* str = "yaSSL.log");
- ~Log();
-
- void Trace(const char*);
- void ShowTCP(socket_t, bool ended = false);
- void ShowData(uint, bool sent = false);
-};
-
-
-} // naemspace
-
-#endif // yaSSL_LOG_HPP
diff --git a/extra/yassl/include/openssl/crypto.h b/extra/yassl/include/openssl/crypto.h
deleted file mode 100644
index f229f8b612c..00000000000
--- a/extra/yassl/include/openssl/crypto.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- Copyright (C) 2005, 2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* crypto.h for openSSL */
-
-#ifndef yaSSL_crypto_h__
-#define yaSSL_crypto_h__
-
-#ifdef YASSL_PREFIX
-#include "prefix_crypto.h"
-#endif
-
-const char* SSLeay_version(int type);
-
-#define SSLEAY_NUMBER_DEFINED
-#define SSLEAY_VERSION 0x0900L
-#define SSLEAY_VERSION_NUMBER SSLEAY_VERSION
-
-
-#endif /* yaSSL_crypto_h__ */
-
diff --git a/extra/yassl/include/openssl/des.h b/extra/yassl/include/openssl/des.h
deleted file mode 100644
index 71cd7e9b1a9..00000000000
--- a/extra/yassl/include/openssl/des.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2005 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* des.h for openssl */
diff --git a/extra/yassl/include/openssl/des_old.h b/extra/yassl/include/openssl/des_old.h
deleted file mode 100644
index b2467185445..00000000000
--- a/extra/yassl/include/openssl/des_old.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* des_old.h for openvn */
diff --git a/extra/yassl/include/openssl/engine.h b/extra/yassl/include/openssl/engine.h
deleted file mode 100644
index 52c43f08010..00000000000
--- a/extra/yassl/include/openssl/engine.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Copyright (C) 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* engine.h for libcurl */
-
-#undef HAVE_OPENSSL_ENGINE_H
-
-
diff --git a/extra/yassl/include/openssl/err.h b/extra/yassl/include/openssl/err.h
deleted file mode 100644
index fc96330e90e..00000000000
--- a/extra/yassl/include/openssl/err.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Copyright (C) 2005, 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* err.h for openssl */
-
-#ifndef yaSSL_err_h__
-#define yaSSL_err_h__
-
-
-
-#endif /* yaSSL_err_h__ */
diff --git a/extra/yassl/include/openssl/evp.h b/extra/yassl/include/openssl/evp.h
deleted file mode 100644
index a57c4a9088b..00000000000
--- a/extra/yassl/include/openssl/evp.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* evp.h for openSSL */
-
-#ifndef SSLEAY_NUMBER_DEFINED
-#define SSLEAY_NUMBER_DEFINED
-
-/* for OpenVPN */
-#define SSLEAY_VERSION_NUMBER 0x0090700f
-
-
-#endif /* SSLEAY_NUMBER_DEFINED */
diff --git a/extra/yassl/include/openssl/generate_prefix_files.pl b/extra/yassl/include/openssl/generate_prefix_files.pl
deleted file mode 100755
index b66ffae6642..00000000000
--- a/extra/yassl/include/openssl/generate_prefix_files.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env perl
-
-# Copyright (C) 2006 MySQL AB
-# Use is subject to license terms
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-#
-# This script generates defines for all functions
-# in yassl/include/openssl/ so they are renamed to
-# ya<old_function_name>. Hopefully that is unique enough.
-#
-# The script is to be run manually when we import
-# a new version of yaSSL
-#
-
-
-
-# Find all functions in "input" and add macros
-# to prefix/rename them into "output
-sub generate_prefix($$)
-{
- my $input= shift;
- my $output= shift;
- open(IN, $input)
- or die("Can't open input file $input: $!");
- open(OUT, ">", $output)
- or mtr_error("Can't open output file $output: $!");
-
- while (<IN>)
- {
- chomp;
-
- if ( /typedef/ )
- {
- next;
- }
-
- if ( /^\s*[a-zA-Z0-9*_ ]+\s+\*?([_a-zA-Z0-9]+)\s*\(/ )
- {
- print OUT "#define $1 ya$1\n";
- }
- }
-
- close OUT;
- close IN;
-}
-
-generate_prefix("ssl.h", "prefix_ssl.h");
-generate_prefix("crypto.h", "prefix_crypto.h");
-
diff --git a/extra/yassl/include/openssl/hmac.h b/extra/yassl/include/openssl/hmac.h
deleted file mode 100644
index 0a3861c0937..00000000000
--- a/extra/yassl/include/openssl/hmac.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* hmac.h for openvpn */
diff --git a/extra/yassl/include/openssl/lhash.h b/extra/yassl/include/openssl/lhash.h
deleted file mode 100644
index bde2d3742b3..00000000000
--- a/extra/yassl/include/openssl/lhash.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright (C) 2005 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* lhash.h for openSSL */
-
diff --git a/extra/yassl/include/openssl/md4.h b/extra/yassl/include/openssl/md4.h
deleted file mode 100644
index 360499018cb..00000000000
--- a/extra/yassl/include/openssl/md4.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* md4.h for libcurl */
diff --git a/extra/yassl/include/openssl/md5.h b/extra/yassl/include/openssl/md5.h
deleted file mode 100644
index abe6200a4cc..00000000000
--- a/extra/yassl/include/openssl/md5.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Copyright (C) 2005, 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* md5.h for openssl */
-
-#include "ssl.h" /* in there for now */
-
diff --git a/extra/yassl/include/openssl/objects.h b/extra/yassl/include/openssl/objects.h
deleted file mode 100644
index fb9a265a19c..00000000000
--- a/extra/yassl/include/openssl/objects.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* objects.h for openvpn */
diff --git a/extra/yassl/include/openssl/opensslv.h b/extra/yassl/include/openssl/opensslv.h
deleted file mode 100644
index 477d2656650..00000000000
--- a/extra/yassl/include/openssl/opensslv.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Copyright (C) 2005 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* opensslv.h compatibility */
-
-#ifndef yaSSL_opensslv_h__
-#define yaSSL_opensslv_h__
-
-
-/* api version compatibility */
-#define OPENSSL_VERSION_NUMBER 0x0090700f
-
-
-#endif /* yaSSLopensslv_h__ */
-
diff --git a/extra/yassl/include/openssl/pem.h b/extra/yassl/include/openssl/pem.h
deleted file mode 100644
index 4b308a58ad8..00000000000
--- a/extra/yassl/include/openssl/pem.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* pem.h for libcurl */
diff --git a/extra/yassl/include/openssl/pkcs12.h b/extra/yassl/include/openssl/pkcs12.h
deleted file mode 100644
index 4f848209cdb..00000000000
--- a/extra/yassl/include/openssl/pkcs12.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Copyright (C) 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* pkcs12.h for libcurl */
-
-
-#undef HAVE_OPENSSL_PKCS12_H
-
diff --git a/extra/yassl/include/openssl/prefix_crypto.h b/extra/yassl/include/openssl/prefix_crypto.h
deleted file mode 100644
index acf3e7bd7d3..00000000000
--- a/extra/yassl/include/openssl/prefix_crypto.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-#define SSLeay_version yaSSLeay_version
diff --git a/extra/yassl/include/openssl/prefix_ssl.h b/extra/yassl/include/openssl/prefix_ssl.h
deleted file mode 100644
index 7698dcf73b5..00000000000
--- a/extra/yassl/include/openssl/prefix_ssl.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-#define Copyright yaCopyright
-#define yaSSL_CleanUp yayaSSL_CleanUp
-#define BN_bin2bn yaBN_bin2bn
-#define DH_new yaDH_new
-#define DH_free yaDH_free
-#define RSA_free yaRSA_free
-#define RSA_generate_key yaRSA_generate_key
-#define X509_free yaX509_free
-#define X509_STORE_CTX_get_current_cert yaX509_STORE_CTX_get_current_cert
-#define X509_STORE_CTX_get_error yaX509_STORE_CTX_get_error
-#define X509_STORE_CTX_get_error_depth yaX509_STORE_CTX_get_error_depth
-#define X509_NAME_oneline yaX509_NAME_oneline
-#define X509_get_issuer_name yaX509_get_issuer_name
-#define X509_get_subject_name yaX509_get_subject_name
-#define X509_verify_cert_error_string yaX509_verify_cert_error_string
-#define X509_LOOKUP_add_dir yaX509_LOOKUP_add_dir
-#define X509_LOOKUP_load_file yaX509_LOOKUP_load_file
-#define X509_LOOKUP_hash_dir yaX509_LOOKUP_hash_dir
-#define X509_LOOKUP_file yaX509_LOOKUP_file
-#define X509_STORE_add_lookup yaX509_STORE_add_lookup
-#define X509_STORE_new yaX509_STORE_new
-#define X509_STORE_get_by_subject yaX509_STORE_get_by_subject
-#define ERR_get_error_line_data yaERR_get_error_line_data
-#define ERR_print_errors_fp yaERR_print_errors_fp
-#define ERR_error_string yaERR_error_string
-#define ERR_remove_state yaERR_remove_state
-#define ERR_get_error yaERR_get_error
-#define ERR_peek_error yaERR_peek_error
-#define ERR_GET_REASON yaERR_GET_REASON
-#define SSL_CTX_new yaSSL_CTX_new
-#define SSL_new yaSSL_new
-#define SSL_set_fd yaSSL_set_fd
-#define SSL_get_fd yaSSL_get_fd
-#define SSL_connect yaSSL_connect
-#define SSL_write yaSSL_write
-#define SSL_read yaSSL_read
-#define SSL_accept yaSSL_accept
-#define SSL_CTX_free yaSSL_CTX_free
-#define SSL_free yaSSL_free
-#define SSL_clear yaSSL_clear
-#define SSL_shutdown yaSSL_shutdown
-#define SSL_set_connect_state yaSSL_set_connect_state
-#define SSL_set_accept_state yaSSL_set_accept_state
-#define SSL_do_handshake yaSSL_do_handshake
-#define SSL_get_cipher yaSSL_get_cipher
-#define SSL_get_cipher_name yaSSL_get_cipher_name
-#define SSL_get_shared_ciphers yaSSL_get_shared_ciphers
-#define SSL_get_cipher_list yaSSL_get_cipher_list
-#define SSL_get_version yaSSL_get_version
-#define SSLeay_version yaSSLeay_version
-#define SSL_get_error yaSSL_get_error
-#define SSL_load_error_strings yaSSL_load_error_strings
-#define SSL_set_session yaSSL_set_session
-#define SSL_get_session yaSSL_get_session
-#define SSL_flush_sessions yaSSL_flush_sessions
-#define SSL_SESSION_set_timeout yaSSL_SESSION_set_timeout
-#define SSL_CTX_set_session_cache_mode yaSSL_CTX_set_session_cache_mode
-#define SSL_get_peer_certificate yaSSL_get_peer_certificate
-#define SSL_get_verify_result yaSSL_get_verify_result
-#define SSL_CTX_set_verify yaSSL_CTX_set_verify
-#define SSL_CTX_load_verify_locations yaSSL_CTX_load_verify_locations
-#define SSL_CTX_set_default_verify_paths yaSSL_CTX_set_default_verify_paths
-#define SSL_CTX_check_private_key yaSSL_CTX_check_private_key
-#define SSL_CTX_set_session_id_context yaSSL_CTX_set_session_id_context
-#define SSL_CTX_set_tmp_rsa_callback yaSSL_CTX_set_tmp_rsa_callback
-#define SSL_CTX_set_options yaSSL_CTX_set_options
-#define SSL_CTX_set_session_cache_mode yaSSL_CTX_set_session_cache_mode
-#define SSL_CTX_set_timeout yaSSL_CTX_set_timeout
-#define SSL_CTX_use_certificate_chain_file yaSSL_CTX_use_certificate_chain_file
-#define SSL_CTX_set_default_passwd_cb yaSSL_CTX_set_default_passwd_cb
-#define SSL_CTX_use_RSAPrivateKey_file yaSSL_CTX_use_RSAPrivateKey_file
-#define SSL_CTX_set_info_callback yaSSL_CTX_set_info_callback
-#define SSL_CTX_sess_accept yaSSL_CTX_sess_accept
-#define SSL_CTX_sess_connect yaSSL_CTX_sess_connect
-#define SSL_CTX_sess_accept_good yaSSL_CTX_sess_accept_good
-#define SSL_CTX_sess_connect_good yaSSL_CTX_sess_connect_good
-#define SSL_CTX_sess_accept_renegotiate yaSSL_CTX_sess_accept_renegotiate
-#define SSL_CTX_sess_connect_renegotiate yaSSL_CTX_sess_connect_renegotiate
-#define SSL_CTX_sess_hits yaSSL_CTX_sess_hits
-#define SSL_CTX_sess_cb_hits yaSSL_CTX_sess_cb_hits
-#define SSL_CTX_sess_cache_full yaSSL_CTX_sess_cache_full
-#define SSL_CTX_sess_misses yaSSL_CTX_sess_misses
-#define SSL_CTX_sess_timeouts yaSSL_CTX_sess_timeouts
-#define SSL_CTX_sess_number yaSSL_CTX_sess_number
-#define SSL_CTX_sess_get_cache_size yaSSL_CTX_sess_get_cache_size
-#define SSL_CTX_get_verify_mode yaSSL_CTX_get_verify_mode
-#define SSL_get_verify_mode yaSSL_get_verify_mode
-#define SSL_CTX_get_verify_depth yaSSL_CTX_get_verify_depth
-#define SSL_get_verify_depth yaSSL_get_verify_depth
-#define SSL_get_default_timeout yaSSL_get_default_timeout
-#define SSL_CTX_get_session_cache_mode yaSSL_CTX_get_session_cache_mode
-#define SSL_session_reused yaSSL_session_reused
-#define SSL_set_rfd yaSSL_set_rfd
-#define SSL_set_wfd yaSSL_set_wfd
-#define SSL_set_shutdown yaSSL_set_shutdown
-#define SSL_set_quiet_shutdown yaSSL_set_quiet_shutdown
-#define SSL_get_quiet_shutdown yaSSL_get_quiet_shutdown
-#define SSL_want_read yaSSL_want_read
-#define SSL_want_write yaSSL_want_write
-#define SSL_pending yaSSL_pending
-#define SSLv3_method yaSSLv3_method
-#define SSLv3_server_method yaSSLv3_server_method
-#define SSLv3_client_method yaSSLv3_client_method
-#define TLSv1_server_method yaTLSv1_server_method
-#define TLSv1_client_method yaTLSv1_client_method
-#define TLSv1_1_server_method yaTLSv1_1_server_method
-#define TLSv1_1_client_method yaTLSv1_1_client_method
-#define SSLv23_server_method yaSSLv23_server_method
-#define SSL_CTX_use_certificate_file yaSSL_CTX_use_certificate_file
-#define SSL_CTX_use_PrivateKey_file yaSSL_CTX_use_PrivateKey_file
-#define SSL_CTX_set_cipher_list yaSSL_CTX_set_cipher_list
-#define SSL_CTX_sess_set_cache_size yaSSL_CTX_sess_set_cache_size
-#define SSL_CTX_set_tmp_dh yaSSL_CTX_set_tmp_dh
-#define OpenSSL_add_all_algorithms yaOpenSSL_add_all_algorithms
-#define SSL_library_init yaSSL_library_init
-#define SSLeay_add_ssl_algorithms yaSSLeay_add_ssl_algorithms
-#define SSL_get_current_cipher yaSSL_get_current_cipher
-#define SSL_CIPHER_description yaSSL_CIPHER_description
-#define SSL_alert_type_string_long yaSSL_alert_type_string_long
-#define SSL_alert_desc_string_long yaSSL_alert_desc_string_long
-#define SSL_state_string_long yaSSL_state_string_long
-#define EVP_md5 yaEVP_md5
-#define EVP_des_ede3_cbc yaEVP_des_ede3_cbc
-#define EVP_BytesToKey yaEVP_BytesToKey
-#define DES_set_key_unchecked yaDES_set_key_unchecked
-#define DES_ede3_cbc_encrypt yaDES_ede3_cbc_encrypt
-#define RAND_screen yaRAND_screen
-#define RAND_file_name yaRAND_file_name
-#define RAND_write_file yaRAND_write_file
-#define RAND_load_file yaRAND_load_file
-#define RAND_status yaRAND_status
-#define RAND_bytes yaRAND_bytes
-#define DES_set_key yaDES_set_key
-#define DES_set_odd_parity yaDES_set_odd_parity
-#define DES_ecb_encrypt yaDES_ecb_encrypt
-#define SSL_CTX_set_default_passwd_cb_userdata yaSSL_CTX_set_default_passwd_cb_userdata
-#define SSL_SESSION_free yaSSL_SESSION_free
-#define SSL_peek yaSSL_peek
-#define SSL_get_certificate yaSSL_get_certificate
-#define SSL_get_privatekey yaSSL_get_privatekey
-#define X509_get_pubkey yaX509_get_pubkey
-#define EVP_PKEY_copy_parameters yaEVP_PKEY_copy_parameters
-#define EVP_PKEY_free yaEVP_PKEY_free
-#define ERR_error_string_n yaERR_error_string_n
-#define ERR_free_strings yaERR_free_strings
-#define EVP_cleanup yaEVP_cleanup
-#define X509_get_ext_d2i yaX509_get_ext_d2i
-#define GENERAL_NAMES_free yaGENERAL_NAMES_free
-#define sk_GENERAL_NAME_num yask_GENERAL_NAME_num
-#define sk_GENERAL_NAME_value yask_GENERAL_NAME_value
-#define ASN1_STRING_data yaASN1_STRING_data
-#define ASN1_STRING_length yaASN1_STRING_length
-#define ASN1_STRING_type yaASN1_STRING_type
-#define X509_NAME_get_index_by_NID yaX509_NAME_get_index_by_NID
-#define X509_NAME_ENTRY_get_data yaX509_NAME_ENTRY_get_data
-#define X509_NAME_get_entry yaX509_NAME_get_entry
-#define ASN1_STRING_to_UTF8 yaASN1_STRING_to_UTF8
-#define SSLv23_client_method yaSSLv23_client_method
-#define SSLv2_client_method yaSSLv2_client_method
-#define SSL_get1_session yaSSL_get1_session
-#define X509_get_notBefore yaX509_get_notBefore
-#define X509_get_notAfter yaX509_get_notAfter
-#define yaSSL_ASN1_TIME_to_string ya_SSL_ASN1_TIME_to_string
-#define MD4_Init yaMD4_Init
-#define MD4_Update yaMD4_Update
-#define MD4_Final yaMD4_Final
-#define MD5_Init yaMD5_Init
-#define MD5_Update yaMD5_Update
-#define MD5_Final yaMD5_Final
-#define SSL_set_compression yaSSL_set_compression
diff --git a/extra/yassl/include/openssl/rand.h b/extra/yassl/include/openssl/rand.h
deleted file mode 100644
index 7f605915efd..00000000000
--- a/extra/yassl/include/openssl/rand.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright (C) 2005 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* rand.h for openSSL */
-
diff --git a/extra/yassl/include/openssl/rsa.h b/extra/yassl/include/openssl/rsa.h
deleted file mode 100644
index 453161a7c21..00000000000
--- a/extra/yassl/include/openssl/rsa.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2005, 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* rsa.h for openSSL */
-
-
-#ifndef yaSSL_rsa_h__
-#define yaSSL_rsa_h__
-
-enum { RSA_F4 = 1 };
-
-
-#endif /* yaSSL_rsa_h__ */
diff --git a/extra/yassl/include/openssl/sha.h b/extra/yassl/include/openssl/sha.h
deleted file mode 100644
index af097309846..00000000000
--- a/extra/yassl/include/openssl/sha.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* sha.h for openvpn */
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
deleted file mode 100644
index fe9beb1356d..00000000000
--- a/extra/yassl/include/openssl/ssl.h
+++ /dev/null
@@ -1,566 +0,0 @@
-/*
- Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
- Use is subject to license terms.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* ssl.h defines openssl compatibility layer
- *
- */
-
-
-
-#ifndef yaSSL_openssl_h__
-#define yaSSL_openssl_h__
-
-#ifdef YASSL_PREFIX
-#include "prefix_ssl.h"
-#endif
-
-#include <stdio.h> /* ERR_print fp */
-#include "opensslv.h" /* for version number */
-#include "rsa.h"
-
-
-#define YASSL_VERSION "2.4.4"
-
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
- void yaSSL_CleanUp(); /* call once at end of application use to
- free static singleton memory holders,
- not a leak per se, but helpful when
- looking for them */
-
-#if defined(__cplusplus)
-} // extern
-#endif
-
-#if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE)
-namespace yaSSL {
-extern "C" {
-#endif
-
-#undef X509_NAME /* wincrypt.h clash */
-
-#if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE)
- class SSL;
- class SSL_SESSION;
- class SSL_METHOD;
- class SSL_CTX;
- class SSL_CIPHER;
-
- class RSA;
-
- class X509;
- class X509_NAME;
-#else
- typedef struct SSL SSL;
- typedef struct SSL_SESSION SSL_SESSION;
- typedef struct SSL_METHOD SSL_METHOD;
- typedef struct SSL_CTX SSL_CTX;
- typedef struct SSL_CIPHER SSL_CIPHER;
-
- typedef struct RSA RSA;
-
- typedef struct X509 X509;
- typedef struct X509_NAME X509_NAME;
-#endif
-
-
-/* Big Number stuff, different file? */
-typedef struct BIGNUM BIGNUM;
-
-BIGNUM *BN_bin2bn(const unsigned char*, int, BIGNUM*);
-
-
-/* Diffie-Hellman stuff, different file? */
-/* mySQL deferences to set group parameters */
-typedef struct DH {
- BIGNUM* p;
- BIGNUM* g;
-} DH;
-
-DH* DH_new(void);
-void DH_free(DH*);
-
-/* RSA stuff */
-
-void RSA_free(RSA*);
-RSA* RSA_generate_key(int, unsigned long, void(*)(int, int, void*), void*);
-
-
-/* X509 stuff, different file? */
-
-/* because mySQL dereferences to use error and current_cert, even after calling
- * get functions for local references */
-typedef struct X509_STORE_CTX {
- int error;
- int error_depth;
- X509* current_cert;
-} X509_STORE_CTX;
-
-
-typedef struct X509_STORE X509_STORE;
-typedef struct X509_LOOKUP X509_LOOKUP;
-typedef struct X509_OBJECT { char c; } X509_OBJECT;
-typedef struct X509_CRL X509_CRL;
-typedef struct X509_REVOKED X509_REVOKED;
-typedef struct X509_LOOKUP_METHOD X509_LOOKUP_METHOD;
-
-
-void X509_free(X509*);
-
-
-/* bio stuff */
-typedef struct BIO BIO;
-
-/* ASN stuff */
-
-
-
-X509* X509_STORE_CTX_get_current_cert(X509_STORE_CTX*);
-int X509_STORE_CTX_get_error(X509_STORE_CTX*);
-int X509_STORE_CTX_get_error_depth(X509_STORE_CTX*);
-
-char* X509_NAME_oneline(X509_NAME*, char*, int);
-X509_NAME* X509_get_issuer_name(X509*);
-X509_NAME* X509_get_subject_name(X509*);
-const char* X509_verify_cert_error_string(long);
-
-int X509_LOOKUP_add_dir(X509_LOOKUP*, const char*, long);
-int X509_LOOKUP_load_file(X509_LOOKUP*, const char*, long);
-X509_LOOKUP_METHOD* X509_LOOKUP_hash_dir(void);
-X509_LOOKUP_METHOD* X509_LOOKUP_file(void);
-
-X509_LOOKUP* X509_STORE_add_lookup(X509_STORE*, X509_LOOKUP_METHOD*);
-X509_STORE* X509_STORE_new(void);
-int X509_STORE_get_by_subject(X509_STORE_CTX*, int, X509_NAME*,
- X509_OBJECT*);
-
-
-
-
-enum { /* X509 Constants */
- X509_V_OK = 0,
- X509_V_ERR_CERT_CHAIN_TOO_LONG = 1,
- X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT = 2,
- X509_V_ERR_CERT_NOT_YET_VALID = 3,
- X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD = 4,
- X509_V_ERR_CERT_HAS_EXPIRED = 5,
- X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD = 6,
- X509_FILETYPE_PEM = 7,
- X509_LU_X509 = 8,
- X509_LU_CRL = 9,
- X509_V_ERR_CRL_SIGNATURE_FAILURE = 10,
- X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 11,
- X509_V_ERR_CRL_HAS_EXPIRED = 12,
- X509_V_ERR_CERT_REVOKED = 13,
- X509_V_FLAG_CRL_CHECK = 14,
- X509_V_FLAG_CRL_CHECK_ALL = 15
-};
-
-
-/* Error stuff, could move to yassl_error */
-unsigned long ERR_get_error_line_data(const char**, int*, const char**, int *);
-void ERR_print_errors_fp(FILE*);
-char* ERR_error_string(unsigned long,char*);
-void ERR_remove_state(unsigned long);
-unsigned long ERR_get_error(void);
-unsigned long ERR_peek_error(void);
-int ERR_GET_REASON(int);
-
-
-enum { /* ERR Constants */
- ERR_TXT_STRING = 1,
- EVP_R_BAD_DECRYPT = 2
-};
-
-/*
- Allow type used by SSL_set_fd to be changed, default to int
- in order to be compatible with OpenSSL
- */
-#ifndef YASSL_SOCKET_T_DEFINED
-typedef int YASSL_SOCKET_T;
-#endif
-
-SSL_CTX* SSL_CTX_new(SSL_METHOD*);
-SSL* SSL_new(SSL_CTX*);
-int SSL_set_fd (SSL*, YASSL_SOCKET_T);
-YASSL_SOCKET_T SSL_get_fd(const SSL*);
-int SSL_connect(SSL*); /* if you get an error from connect
- see note at top of README */
-int SSL_write(SSL*, const void*, int);
-int SSL_read(SSL*, void*, int);
-int SSL_accept(SSL*);
-void SSL_CTX_free(SSL_CTX*);
-void SSL_free(SSL*);
-int SSL_clear(SSL*);
-int SSL_shutdown(SSL*);
-
-void SSL_set_connect_state(SSL*);
-void SSL_set_accept_state(SSL*);
-int SSL_do_handshake(SSL*);
-
-const char* SSL_get_cipher(SSL*);
-const char* SSL_get_cipher_name(SSL*); /* uses SSL_get_cipher */
-char* SSL_get_shared_ciphers(SSL*, char*, int);
-const char* SSL_get_cipher_list(SSL*, int);
-const char* SSL_get_version(SSL*);
-const char* SSLeay_version(int);
-
-int SSL_get_error(SSL*, int);
-void SSL_load_error_strings(void);
-
-int SSL_set_session(SSL *ssl, SSL_SESSION *session);
-SSL_SESSION* SSL_get_session(SSL* ssl);
-void SSL_flush_sessions(SSL_CTX *ctx, long tm);
-long SSL_SESSION_set_timeout(SSL_SESSION*, long);
-long SSL_CTX_set_session_cache_mode(SSL_CTX* ctx, long mode);
-X509* SSL_get_peer_certificate(SSL*);
-long SSL_get_verify_result(SSL*);
-
-
-typedef int (*VerifyCallback)(int, X509_STORE_CTX*);
-typedef int (*pem_password_cb)(char*, int, int, void*);
-
-void SSL_CTX_set_verify(SSL_CTX*, int, VerifyCallback verify_callback);
-int SSL_CTX_load_verify_locations(SSL_CTX*, const char*, const char*);
-int SSL_CTX_set_default_verify_paths(SSL_CTX*);
-int SSL_CTX_check_private_key(SSL_CTX*);
-int SSL_CTX_set_session_id_context(SSL_CTX*, const unsigned char*,
- unsigned int);
-
-void SSL_CTX_set_tmp_rsa_callback(SSL_CTX*, RSA*(*)(SSL*, int, int));
-long SSL_CTX_set_options(SSL_CTX*, long);
-long SSL_CTX_set_session_cache_mode(SSL_CTX*, long);
-long SSL_CTX_set_timeout(SSL_CTX*, long);
-int SSL_CTX_use_certificate_chain_file(SSL_CTX*, const char*);
-void SSL_CTX_set_default_passwd_cb(SSL_CTX*, pem_password_cb);
-int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX*, const char*, int);
-void SSL_CTX_set_info_callback(SSL_CTX*, void (*)());
-
-long SSL_CTX_sess_accept(SSL_CTX*);
-long SSL_CTX_sess_connect(SSL_CTX*);
-long SSL_CTX_sess_accept_good(SSL_CTX*);
-long SSL_CTX_sess_connect_good(SSL_CTX*);
-long SSL_CTX_sess_accept_renegotiate(SSL_CTX*);
-long SSL_CTX_sess_connect_renegotiate(SSL_CTX*);
-long SSL_CTX_sess_hits(SSL_CTX*);
-long SSL_CTX_sess_cb_hits(SSL_CTX*);
-long SSL_CTX_sess_cache_full(SSL_CTX*);
-long SSL_CTX_sess_misses(SSL_CTX*);
-long SSL_CTX_sess_timeouts(SSL_CTX*);
-long SSL_CTX_sess_number(SSL_CTX*);
-long SSL_CTX_sess_get_cache_size(SSL_CTX*);
-
-int SSL_CTX_get_verify_mode(SSL_CTX*);
-int SSL_get_verify_mode(SSL*);
-int SSL_CTX_get_verify_depth(SSL_CTX*);
-int SSL_get_verify_depth(SSL*);
-
-long SSL_get_default_timeout(SSL*);
-long SSL_CTX_get_session_cache_mode(SSL_CTX*);
-int SSL_session_reused(SSL*);
-
-int SSL_set_rfd(SSL*, int);
-int SSL_set_wfd(SSL*, int);
-void SSL_set_shutdown(SSL*, int);
-void SSL_set_quiet_shutdown(SSL *ssl,int mode);
-int SSL_get_quiet_shutdown(SSL *ssl);
-
-int SSL_want_read(SSL*);
-int SSL_want_write(SSL*);
-
-int SSL_pending(SSL*);
-
-
-enum { /* ssl Constants */
- SSL_WOULD_BLOCK = -8,
- SSL_BAD_STAT = -7,
- SSL_BAD_PATH = -6,
- SSL_BAD_FILETYPE = -5,
- SSL_BAD_FILE = -4,
- SSL_NOT_IMPLEMENTED = -3,
- SSL_UNKNOWN = -2,
- SSL_FATAL_ERROR = -1,
- SSL_NORMAL_SHUTDOWN = 0,
- SSL_ERROR_NONE = 0, /* for most functions */
- SSL_FAILURE = 0, /* for some functions */
- SSL_SUCCESS = 1,
-
- SSL_FILETYPE_ASN1 = 10,
- SSL_FILETYPE_PEM = 11,
- SSL_FILETYPE_DEFAULT = 10, /* ASN1 */
-
- SSL_VERIFY_NONE = 0,
- SSL_VERIFY_PEER = 1,
- SSL_VERIFY_FAIL_IF_NO_PEER_CERT = 2,
- SSL_VERIFY_CLIENT_ONCE = 4,
-
- SSL_SESS_CACHE_OFF = 30,
- SSL_SESS_CACHE_CLIENT = 31,
- SSL_SESS_CACHE_SERVER = 32,
- SSL_SESS_CACHE_BOTH = 33,
- SSL_SESS_CACHE_NO_AUTO_CLEAR = 34,
- SSL_SESS_CACHE_NO_INTERNAL_LOOKUP = 35,
-
- SSL_OP_MICROSOFT_SESS_ID_BUG = 50,
- SSL_OP_NETSCAPE_CHALLENGE_BUG = 51,
- SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG = 52,
- SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG = 53,
- SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = 54,
- SSL_OP_MSIE_SSLV2_RSA_PADDING = 55,
- SSL_OP_SSLEAY_080_CLIENT_DH_BUG = 56,
- SSL_OP_TLS_D5_BUG = 57,
- SSL_OP_TLS_BLOCK_PADDING_BUG = 58,
- SSL_OP_TLS_ROLLBACK_BUG = 59,
- SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 60,
- SSL_OP_ALL = 61,
- SSL_OP_SINGLE_DH_USE = 62,
- SSL_OP_EPHEMERAL_RSA = 63,
- SSL_OP_NO_SSLv2 = 64,
- SSL_OP_NO_SSLv3 = 65,
- SSL_OP_NO_TLSv1 = 66,
- SSL_OP_PKCS1_CHECK_1 = 67,
- SSL_OP_PKCS1_CHECK_2 = 68,
- SSL_OP_NETSCAPE_CA_DN_BUG = 69,
- SSL_OP_NON_EXPORT_FIRST = 70,
- SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG = 71,
-
- SSL_ERROR_WANT_READ = 80,
- SSL_ERROR_WANT_WRITE = 81,
- SSL_ERROR_SYSCALL = 82,
- SSL_ERROR_WANT_X509_LOOKUP = 83,
- SSL_ERROR_ZERO_RETURN = 84,
- SSL_ERROR_SSL = 85,
-
- SSL_ST_CONNECT = 90,
- SSL_ST_ACCEPT = 91,
- SSL_CB_LOOP = 92,
- SSL_SENT_SHUTDOWN = 93,
- SSL_RECEIVED_SHUTDOWN = 94,
- SSL_CB_ALERT = 95,
- SSL_CB_READ = 96,
- SSL_CB_HANDSHAKE_DONE = 97
-
-};
-
-
-SSL_METHOD *SSLv3_method(void);
-SSL_METHOD *SSLv3_server_method(void);
-SSL_METHOD *SSLv3_client_method(void);
-SSL_METHOD *TLSv1_server_method(void);
-SSL_METHOD *TLSv1_client_method(void);
-SSL_METHOD *TLSv1_1_server_method(void);
-SSL_METHOD *TLSv1_1_client_method(void);
-SSL_METHOD *SSLv23_server_method(void);
-
-int SSL_CTX_use_certificate_file(SSL_CTX*, const char*, int);
-int SSL_CTX_use_PrivateKey_file(SSL_CTX*, const char*, int);
-int SSL_CTX_set_cipher_list(SSL_CTX*, const char*);
-
-long SSL_CTX_sess_set_cache_size(SSL_CTX*, long);
-long SSL_CTX_set_tmp_dh(SSL_CTX*, DH*);
-
-void OpenSSL_add_all_algorithms(void);
-int SSL_library_init();
-int SSLeay_add_ssl_algorithms(void);
-
-
-SSL_CIPHER* SSL_get_current_cipher(SSL*);
-char* SSL_CIPHER_description(SSL_CIPHER*, char*, int);
-
-
-char* SSL_alert_type_string_long(int);
-char* SSL_alert_desc_string_long(int);
-char* SSL_state_string_long(SSL*);
-
-
-/* EVP stuff, des and md5, different file? */
-typedef char EVP_MD;
-
-typedef char EVP_CIPHER;
-
-typedef struct EVP_PKEY EVP_PKEY;
-
-typedef unsigned char DES_cblock[8];
-typedef const DES_cblock const_DES_cblock;
-typedef DES_cblock DES_key_schedule;
-
-enum {
- DES_ENCRYPT = 1,
- DES_DECRYPT = 0
-};
-
-const EVP_MD* EVP_md5(void);
-const EVP_CIPHER* EVP_des_ede3_cbc(void);
-
-typedef unsigned char opaque;
-
-int EVP_BytesToKey(const EVP_CIPHER*, const EVP_MD*, const opaque*,
- const opaque*, int, int, opaque*, opaque*);
-
-void DES_set_key_unchecked(const_DES_cblock*, DES_key_schedule*);
-void DES_ede3_cbc_encrypt(const opaque*, opaque*, long, DES_key_schedule*,
- DES_key_schedule*, DES_key_schedule*, DES_cblock*, int);
-
-
-/* RAND stuff */
-void RAND_screen(void);
-const char* RAND_file_name(char*, size_t);
-int RAND_write_file(const char*);
-int RAND_load_file(const char*, long);
-
-
-/* for libcurl */
-int RAND_status(void);
-int RAND_bytes(unsigned char* buf, int num);
-
-int DES_set_key(const_DES_cblock*, DES_key_schedule*);
-void DES_set_odd_parity(DES_cblock*);
-void DES_ecb_encrypt(DES_cblock*, DES_cblock*, DES_key_schedule*, int);
-
-void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX*, void* userdata);
-void SSL_SESSION_free(SSL_SESSION* session);
-int SSL_peek(SSL* ssl, void* buf, int num);
-
-X509* SSL_get_certificate(SSL* ssl);
-EVP_PKEY* SSL_get_privatekey(SSL* ssl);
-EVP_PKEY* X509_get_pubkey(X509* x);
-
-int EVP_PKEY_copy_parameters(EVP_PKEY* to, const EVP_PKEY* from);
-void EVP_PKEY_free(EVP_PKEY* pkey);
-void ERR_error_string_n(unsigned long e, char *buf, size_t len);
-void ERR_free_strings(void);
-void EVP_cleanup(void);
-
-void* X509_get_ext_d2i(X509* x, int nid, int* crit, int* idx);
-
-#define GEN_IPADD 7
-#define NID_subject_alt_name 85
-#define STACK_OF(x) x
-
-
-/* defined here because libcurl dereferences */
-typedef struct ASN1_STRING {
- int type;
- int length;
- unsigned char* data;
-} ASN1_STRING;
-
-
-typedef struct GENERAL_NAME {
- int type;
- union {
- ASN1_STRING* ia5;
- } d;
-} GENERAL_NAME;
-
-void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *x);
-
-int sk_GENERAL_NAME_num(STACK_OF(GENERAL_NAME) *x);
-GENERAL_NAME* sk_GENERAL_NAME_value(STACK_OF(GENERAL_NAME) *x, int i);
-
-
-unsigned char* ASN1_STRING_data(ASN1_STRING* x);
-int ASN1_STRING_length(ASN1_STRING* x);
-int ASN1_STRING_type(ASN1_STRING *x);
-
-typedef ASN1_STRING X509_NAME_ENTRY;
-
-int X509_NAME_get_index_by_NID(X509_NAME* name,int nid, int lastpos);
-
-ASN1_STRING* X509_NAME_ENTRY_get_data(X509_NAME_ENTRY* ne);
-X509_NAME_ENTRY* X509_NAME_get_entry(X509_NAME* name, int loc);
-
-#define OPENSSL_malloc(x) malloc(x)
-#define OPENSSL_free(x) free(x)
-
-int ASN1_STRING_to_UTF8(unsigned char** out, ASN1_STRING* in);
-
-SSL_METHOD* SSLv23_client_method(void); /* doesn't actually roll back */
-SSL_METHOD* SSLv2_client_method(void); /* will never work, no v 2 */
-
-
-SSL_SESSION* SSL_get1_session(SSL* ssl); /* what's ref count */
-
-
-#define CRYPTO_free(x) free(x)
-#define ASN1_TIME ASN1_STRING
-
-ASN1_TIME* X509_get_notBefore(X509* x);
-ASN1_TIME* X509_get_notAfter(X509* x);
-
-
-#define ASN1_UTCTIME ASN1_STRING
-#define NID_commonName 13
-#define V_ASN1_UTF8STRING 12
-#define GEN_DNS 2
-
-#define CERTFICATE_ERROR 0x14090086 /* SSLv3 error */
-
-
-typedef struct MD4_CTX {
- int buffer[32]; /* big enough to hold, check size in Init */
-} MD4_CTX;
-
-void MD4_Init(MD4_CTX*);
-void MD4_Update(MD4_CTX*, const void*, unsigned long);
-void MD4_Final(unsigned char*, MD4_CTX*);
-
-
-typedef struct MD5_CTX {
- int buffer[32]; /* big enough to hold, check size in Init */
-} MD5_CTX;
-
-void MD5_Init(MD5_CTX*);
-void MD5_Update(MD5_CTX*, const void*, unsigned long);
-void MD5_Final(unsigned char*, MD5_CTX*);
-
-#define MD5_DIGEST_LENGTH 16
-
-
-#define SSL_DEFAULT_CIPHER_LIST "" /* default all */
-
-
-/* yaSSL extensions */
-int SSL_set_compression(SSL*); /* turn on yaSSL zlib compression */
-char *yaSSL_ASN1_TIME_to_string(const ASN1_TIME *time, char *buf, size_t len);
-
-#include "transport_types.h"
-
-/*
- Set functions for yaSSL to use in order to send and receive data.
-
- These hooks are offered in order to enable non-blocking I/O. If
- not set, yaSSL defaults to using send() and recv().
-
- @todo Remove hooks and accompanying code when yaSSL is fixed.
-*/
-void yaSSL_transport_set_ptr(SSL *, void *);
-void yaSSL_transport_set_recv_function(SSL *, yaSSL_recv_func_t);
-void yaSSL_transport_set_send_function(SSL *, yaSSL_send_func_t);
-
-#if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE)
-} /* namespace */
-} /* extern "C" */
-#endif
-
-
-#endif /* yaSSL_openssl_h__ */
diff --git a/extra/yassl/include/openssl/transport_types.h b/extra/yassl/include/openssl/transport_types.h
deleted file mode 100644
index 3c31eb3d822..00000000000
--- a/extra/yassl/include/openssl/transport_types.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-#ifndef yaSSL_transport_types_h__
-#define yaSSL_transport_types_h__
-
-/* Type of transport functions used for sending and receiving data. */
-typedef long (*yaSSL_recv_func_t) (void *, void *, size_t, int);
-typedef long (*yaSSL_send_func_t) (void *, const void *, size_t, int);
-
-#endif
diff --git a/extra/yassl/include/openssl/x509.h b/extra/yassl/include/openssl/x509.h
deleted file mode 100644
index dd79e6833ec..00000000000
--- a/extra/yassl/include/openssl/x509.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* x509.h for libcurl */
diff --git a/extra/yassl/include/openssl/x509v3.h b/extra/yassl/include/openssl/x509v3.h
deleted file mode 100644
index 4a7a2175ebe..00000000000
--- a/extra/yassl/include/openssl/x509v3.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2006 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* x509v3.h for libcurl */
diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp
deleted file mode 100644
index 3fc9c7ee95a..00000000000
--- a/extra/yassl/include/socket_wrapper.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* The socket wrapper header defines a Socket class that hides the differences
- * between Berkely style sockets and Windows sockets, allowing transparent TCP
- * access.
- */
-
-
-#ifndef yaSSL_SOCKET_WRAPPER_HPP
-#define yaSSL_SOCKET_WRAPPER_HPP
-
-
-#ifdef _WIN32
- #include <winsock2.h>
-#else
- #include <sys/time.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <unistd.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
-#endif
-
-
-namespace yaSSL {
-
-typedef unsigned int uint;
-
-#ifdef _WIN32
- typedef SOCKET socket_t;
-#else
- typedef int socket_t;
- const socket_t INVALID_SOCKET = -1;
- const int SD_RECEIVE = 0;
- const int SD_SEND = 1;
- const int SD_BOTH = 2;
- const int SOCKET_ERROR = -1;
-#endif
-
- extern "C" {
- #include "openssl/transport_types.h"
- }
-
-typedef unsigned char byte;
-
-
-// Wraps Windows Sockets and BSD Sockets
-class Socket {
- socket_t socket_; // underlying socket descriptor
- bool wouldBlock_; // if non-blocking data, for last read
- bool nonBlocking_; // is option set
- void *ptr_; // Argument to transport function
- yaSSL_send_func_t send_func_; // Function to send data
- yaSSL_recv_func_t recv_func_; // Function to receive data
-public:
- explicit Socket(socket_t s = INVALID_SOCKET);
- ~Socket();
-
- void set_fd(socket_t s);
- uint get_ready() const;
- socket_t get_fd() const;
-
- void set_transport_ptr(void *ptr);
- void set_transport_recv_function(yaSSL_recv_func_t recv_func);
- void set_transport_send_function(yaSSL_send_func_t send_func);
-
- uint send(const byte* buf, unsigned int len, unsigned int& sent,
- int flags = 0);
- uint receive(byte* buf, unsigned int len, int flags = 0);
- bool wait();
-
- bool WouldBlock() const;
- bool IsNonBlocking() const;
-
- void closeSocket();
- void shutDown(int how = SD_SEND);
-
- static int get_lastError();
- static void set_lastError(int error);
-private:
- Socket(const Socket&); // hide copy
- Socket& operator= (const Socket&); // and assign
-};
-
-
-} // naemspace
-
-#endif // yaSSL_SOCKET_WRAPPER_HPP
diff --git a/extra/yassl/include/timer.hpp b/extra/yassl/include/timer.hpp
deleted file mode 100644
index 57b4022484b..00000000000
--- a/extra/yassl/include/timer.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* timer.hpp provides a high res and low res timers
- *
-*/
-
-
-#ifndef yaSSL_TIMER_HPP
-#define yaSSL_TIMER_HPP
-
-namespace yaSSL {
-
-typedef double timer_d;
-typedef unsigned int uint;
-
-
-
-timer_d timer();
-uint lowResTimer();
-
-
-
-} // namespace
-#endif // yaSSL_TIMER_HPP
diff --git a/extra/yassl/include/yassl.hpp b/extra/yassl/include/yassl.hpp
deleted file mode 100644
index ff6869a3ec4..00000000000
--- a/extra/yassl/include/yassl.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL externel header defines yaSSL API
- */
-
-
-#ifndef yaSSL_EXT_HPP
-#define yaSSL_EXT_HPP
-
-
-namespace yaSSL {
-
-
-#ifdef _WIN32
- typedef unsigned int SOCKET_T;
-#else
- typedef int SOCKET_T;
-#endif
-
-
-class Client {
-public:
- Client();
- ~Client();
-
- // basics
- int Connect(SOCKET_T);
- int Write(const void*, int);
- int Read(void*, int);
-
- // options
- void SetCA(const char*);
- void SetCert(const char*);
- void SetKey(const char*);
-private:
- struct ClientImpl;
- ClientImpl* pimpl_;
-
- Client(const Client&); // hide copy
- Client& operator=(const Client&); // and assign
-};
-
-
-class Server {
-public:
- Server();
- ~Server();
-
- // basics
- int Accept(SOCKET_T);
- int Write(const void*, int);
- int Read(void*, int);
-
- // options
- void SetCA(const char*);
- void SetCert(const char*);
- void SetKey(const char*);
-private:
- struct ServerImpl;
- ServerImpl* pimpl_;
-
- Server(const Server&); // hide copy
- Server& operator=(const Server&); // and assign
-};
-
-
-} // namespace yaSSL
-#endif // yaSSL_EXT_HPP
diff --git a/extra/yassl/include/yassl_error.hpp b/extra/yassl/include/yassl_error.hpp
deleted file mode 100644
index bc97058d881..00000000000
--- a/extra/yassl/include/yassl_error.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL error header defines error codes and an exception class
- */
-
-#ifndef yaSSL_ERROR_HPP
-#define yaSSL_ERROR_HPP
-
-
-
-namespace yaSSL {
-
-
-enum YasslError {
- no_error = 0,
-
- // 10 - 47 from AlertDescription, 0 also close_notify
-
- range_error = 101,
- realloc_error = 102,
- factory_error = 103,
- unknown_cipher = 104,
- prefix_error = 105,
- record_layer = 106,
- handshake_layer = 107,
- out_of_order = 108,
- bad_input = 109,
- match_error = 110,
- no_key_file = 111,
- verify_error = 112,
- send_error = 113,
- receive_error = 114,
- certificate_error = 115,
- privateKey_error = 116,
- badVersion_error = 117,
- compress_error = 118,
- decompress_error = 119,
- pms_version_error = 120,
- sanityCipher_error = 121,
- rsaSignFault_error = 122
-
- // !!!! add error message to .cpp !!!!
-
- // 1000+ from TaoCrypt error.hpp
-
-};
-
-
-enum Library { yaSSL_Lib = 0, CryptoLib, SocketLib };
-enum { MAX_ERROR_SZ = 80 };
-
-void SetErrorString(YasslError, char*);
-
-/* remove for now, if go back to exceptions use this wrapper
-// Base class for all yaSSL exceptions
-class Error : public mySTL::runtime_error {
- YasslError error_;
- Library lib_;
-public:
- explicit Error(const char* s = "", YasslError e = no_error,
- Library l = yaSSL_Lib);
-
- YasslError get_number() const;
- Library get_lib() const;
-};
-*/
-
-
-} // naemspace
-
-#endif // yaSSL_ERROR_HPP
diff --git a/extra/yassl/include/yassl_imp.hpp b/extra/yassl/include/yassl_imp.hpp
deleted file mode 100644
index fbd2ebb93a7..00000000000
--- a/extra/yassl/include/yassl_imp.hpp
+++ /dev/null
@@ -1,748 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* yaSSL implementation header defines all strucutres from the SSL.v3
- * specification "draft-freier-ssl-version3-02.txt"
- * all page citations refer to this document unless otherwise noted.
- */
-
-
-#ifndef yaSSL_IMP_HPP
-#define yaSSL_IMP_HPP
-
-#ifdef _MSC_VER
- // disable truncated debug symbols
- #pragma warning(disable:4786)
-#endif
-
-#include "yassl_types.hpp"
-#include "factory.hpp"
-#include STL_LIST_FILE
-
-
-namespace STL = STL_NAMESPACE;
-
-
-namespace yaSSL {
-
-
-class SSL; // forward decls
-class input_buffer;
-class output_buffer;
-
-
-struct ProtocolVersion {
- uint8 major_;
- uint8 minor_; // major and minor SSL/TLS version numbers
-
- ProtocolVersion(uint8 maj = 3, uint8 min = 0);
-};
-
-
-// Record Layer Header for PlainText, Compressed, and CipherText
-struct RecordLayerHeader {
- ContentType type_;
- ProtocolVersion version_;
- uint16 length_; // should not exceed 2^14
-};
-
-
-// base for all messages
-struct Message : public virtual_base {
- virtual input_buffer& set(input_buffer&) =0;
- virtual output_buffer& get(output_buffer&) const =0;
-
- virtual void Process(input_buffer&, SSL&) =0;
- virtual ContentType get_type() const =0;
- virtual uint16 get_length() const =0;
-
- virtual ~Message() {}
-};
-
-
-class ChangeCipherSpec : public Message {
- CipherChoice type_;
-public:
- ChangeCipherSpec();
-
- friend input_buffer& operator>>(input_buffer&, ChangeCipherSpec&);
- friend output_buffer& operator<<(output_buffer&, const ChangeCipherSpec&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- ContentType get_type() const;
- uint16 get_length() const;
- void Process(input_buffer&, SSL&);
-private:
- ChangeCipherSpec(const ChangeCipherSpec&); // hide copy
- ChangeCipherSpec& operator=(const ChangeCipherSpec&); // and assign
-};
-
-
-
-class Alert : public Message {
- AlertLevel level_;
- AlertDescription description_;
-public:
- Alert() {}
- Alert(AlertLevel al, AlertDescription ad);
-
- ContentType get_type() const;
- uint16 get_length() const;
- void Process(input_buffer&, SSL&);
-
- friend input_buffer& operator>>(input_buffer&, Alert&);
- friend output_buffer& operator<<(output_buffer&, const Alert&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-private:
- Alert(const Alert&); // hide copy
- Alert& operator=(const Alert&); // and assign
-};
-
-
-class Data : public Message {
- uint16 length_;
- opaque* buffer_; // read buffer used by fillData input
- const opaque* write_buffer_; // write buffer used by output operator
-public:
- Data();
- Data(uint16 len, opaque* b);
-
- friend output_buffer& operator<<(output_buffer&, const Data&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- ContentType get_type() const;
- uint16 get_length() const;
- void set_length(uint16 l);
- opaque* set_buffer();
- void SetData(uint16, const opaque*);
- void Process(input_buffer&, SSL&);
-private:
- Data(const Data&); // hide copy
- Data& operator=(const Data&); // and assign
-};
-
-
-uint32 c24to32(const uint24); // forward form internal header
-void c32to24(uint32, uint24&);
-
-
-// HandShake header, same for each message type from page 20/21
-class HandShakeHeader : public Message {
- HandShakeType type_;
- uint24 length_; // length of message
-public:
- HandShakeHeader() {}
-
- ContentType get_type() const;
- uint16 get_length() const;
- HandShakeType get_handshakeType() const;
- void Process(input_buffer&, SSL&);
-
- void set_type(HandShakeType hst);
- void set_length(uint32 u32);
-
- friend input_buffer& operator>>(input_buffer&, HandShakeHeader&);
- friend output_buffer& operator<<(output_buffer&, const HandShakeHeader&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-private:
- HandShakeHeader(const HandShakeHeader&); // hide copy
- HandShakeHeader& operator=(const HandShakeHeader&); // and assign
-};
-
-
-// Base Class for all handshake messages
-class HandShakeBase : public virtual_base {
- int length_;
-public:
- int get_length() const;
- void set_length(int);
-
- // for building buffer's type field
- virtual HandShakeType get_type() const =0;
-
- // handles dispactch of proper >>
- virtual input_buffer& set(input_buffer& in) =0;
- virtual output_buffer& get(output_buffer& out) const =0;
-
- virtual void Process(input_buffer&, SSL&) =0;
-
- virtual ~HandShakeBase() {}
-};
-
-
-struct HelloRequest : public HandShakeBase {
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- void Process(input_buffer&, SSL&);
-
- HandShakeType get_type() const;
-};
-
-
-// The Client's Hello Message from page 23
-class ClientHello : public HandShakeBase {
- ProtocolVersion client_version_;
- Random random_;
- uint8 id_len_; // session id length
- opaque session_id_[ID_LEN];
- uint16 suite_len_; // cipher suite length
- opaque cipher_suites_[MAX_SUITE_SZ];
- uint8 comp_len_; // compression length
- CompressionMethod compression_methods_;
-public:
- friend input_buffer& operator>>(input_buffer&, ClientHello&);
- friend output_buffer& operator<<(output_buffer&, const ClientHello&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- HandShakeType get_type() const;
- void Process(input_buffer&, SSL&);
-
- const opaque* get_random() const;
- friend void buildClientHello(SSL&, ClientHello&);
- friend void ProcessOldClientHello(input_buffer& input, SSL& ssl);
-
- ClientHello();
- ClientHello(ProtocolVersion pv, bool useCompression);
-private:
- ClientHello(const ClientHello&); // hide copy
- ClientHello& operator=(const ClientHello&); // and assign
-};
-
-
-
-// The Server's Hello Message from page 24
-class ServerHello : public HandShakeBase {
- ProtocolVersion server_version_;
- Random random_;
- uint8 id_len_; // session id length
- opaque session_id_[ID_LEN];
- opaque cipher_suite_[SUITE_LEN];
- CompressionMethod compression_method_;
-public:
- ServerHello(ProtocolVersion pv, bool useCompression);
- ServerHello();
-
- friend input_buffer& operator>>(input_buffer&, ServerHello&);
- friend output_buffer& operator<<(output_buffer&, const ServerHello&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- HandShakeType get_type() const;
- void Process(input_buffer&, SSL&);
-
- const opaque* get_random() const;
- friend void buildServerHello(SSL&, ServerHello&);
-private:
- ServerHello(const ServerHello&); // hide copy
- ServerHello& operator=(const ServerHello&); // and assign
-};
-
-
-class x509;
-
-// Certificate could be a chain
-class Certificate : public HandShakeBase {
- const x509* cert_;
-public:
- Certificate();
- explicit Certificate(const x509* cert);
- friend output_buffer& operator<<(output_buffer&, const Certificate&);
-
- const opaque* get_buffer() const;
-
- // Process handles input, needs SSL
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- HandShakeType get_type() const;
- void Process(input_buffer&, SSL&);
-private:
- Certificate(const Certificate&); // hide copy
- Certificate& operator=(const Certificate&); // and assign
-};
-
-
-
-// RSA Public Key
-struct ServerRSAParams {
- opaque* rsa_modulus_;
- opaque* rsa_exponent_;
-};
-
-
-// Ephemeral Diffie-Hellman Parameters
-class ServerDHParams {
- int pSz_;
- int gSz_;
- int pubSz_;
- opaque* p_;
- opaque* g_;
- opaque* Ys_;
-public:
- ServerDHParams();
- ~ServerDHParams();
-
- int get_pSize() const;
- int get_gSize() const;
- int get_pubSize() const;
-
- const opaque* get_p() const;
- const opaque* get_g() const;
- const opaque* get_pub() const;
-
- opaque* alloc_p(int sz);
- opaque* alloc_g(int sz);
- opaque* alloc_pub(int sz);
-private:
- ServerDHParams(const ServerDHParams&); // hide copy
- ServerDHParams& operator=(const ServerDHParams&); // and assign
-};
-
-
-struct ServerKeyBase : public virtual_base {
- virtual ~ServerKeyBase() {}
- virtual void build(SSL&) {}
- virtual void read(SSL&, input_buffer&) {}
- virtual int get_length() const;
- virtual opaque* get_serverKey() const;
-};
-
-
-// Server random number for FORTEZZA KEA
-struct Fortezza_Server : public ServerKeyBase {
- opaque r_s_[FORTEZZA_MAX];
-};
-
-
-struct SignatureBase : public virtual_base {
- virtual ~SignatureBase() {}
-};
-
-struct anonymous_sa : public SignatureBase {};
-
-
-struct Hashes {
- uint8 md5_[MD5_LEN];
- uint8 sha_[SHA_LEN];
-};
-
-
-struct rsa_sa : public SignatureBase {
- Hashes hashes_;
-};
-
-
-struct dsa_sa : public SignatureBase {
- uint8 sha_[SHA_LEN];
-};
-
-
-// Server's Diffie-Hellman exchange
-class DH_Server : public ServerKeyBase {
- ServerDHParams parms_;
- opaque* signature_;
-
- int length_; // total length of message
- opaque* keyMessage_; // total exchange message
-public:
- DH_Server();
- ~DH_Server();
-
- void build(SSL&);
- void read(SSL&, input_buffer&);
- int get_length() const;
- opaque* get_serverKey() const;
-private:
- DH_Server(const DH_Server&); // hide copy
- DH_Server& operator=(const DH_Server&); // and assign
-};
-
-
-// Server's RSA exchange
-struct RSA_Server : public ServerKeyBase {
- ServerRSAParams params_;
- opaque* signature_; // signed rsa_sa hashes
-};
-
-
-class ServerKeyExchange : public HandShakeBase {
- ServerKeyBase* server_key_;
-public:
- explicit ServerKeyExchange(SSL&);
- ServerKeyExchange();
- ~ServerKeyExchange();
-
- void createKey(SSL&);
- void build(SSL& ssl);
-
- const opaque* getKey() const;
- int getKeyLength() const;
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- friend output_buffer& operator<<(output_buffer&, const ServerKeyExchange&);
-
- void Process(input_buffer&, SSL&);
- HandShakeType get_type() const;
-private:
- ServerKeyExchange(const ServerKeyExchange&); // hide copy
- ServerKeyExchange& operator=(const ServerKeyExchange&); // and assign
-};
-
-
-
-class CertificateRequest : public HandShakeBase {
- ClientCertificateType certificate_types_[CERT_TYPES];
- int typeTotal_;
- STL::list<DistinguishedName> certificate_authorities_;
-public:
- CertificateRequest();
- ~CertificateRequest();
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- friend input_buffer& operator>>(input_buffer&, CertificateRequest&);
- friend output_buffer& operator<<(output_buffer&,
- const CertificateRequest&);
-
- void Process(input_buffer&, SSL&);
- HandShakeType get_type() const;
-
- void Build();
-private:
- CertificateRequest(const CertificateRequest&); // hide copy
- CertificateRequest& operator=(const CertificateRequest&); // and assign
-};
-
-
-struct ServerHelloDone : public HandShakeBase {
- ServerHelloDone();
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- void Process(input_buffer& input, SSL& ssl);
-
- HandShakeType get_type() const;
-};
-
-
-struct PreMasterSecret {
- opaque random_[SECRET_LEN]; // first two bytes Protocol Version
-};
-
-
-struct ClientKeyBase : public virtual_base {
- virtual ~ClientKeyBase() {}
- virtual void build(SSL&) {}
- virtual void read(SSL&, input_buffer&) {}
- virtual int get_length() const;
- virtual opaque* get_clientKey() const;
-};
-
-
-class EncryptedPreMasterSecret : public ClientKeyBase {
- opaque* secret_;
- int length_;
-public:
- EncryptedPreMasterSecret();
- ~EncryptedPreMasterSecret();
-
- void build(SSL&);
- void read(SSL&, input_buffer&);
- int get_length() const;
- opaque* get_clientKey() const;
- void alloc(int sz);
-private:
- // hide copy and assign
- EncryptedPreMasterSecret(const EncryptedPreMasterSecret&);
- EncryptedPreMasterSecret& operator=(const EncryptedPreMasterSecret&);
-};
-
-
-// Fortezza Key Parameters from page 29
-// hard code lengths cause only used here
-struct FortezzaKeys : public ClientKeyBase {
- opaque y_c_ [128]; // client's Yc, public value
- opaque r_c_ [128]; // client's Rc
- opaque y_signature_ [40]; // DSS signed public key
- opaque wrapped_client_write_key_ [12]; // wrapped by the TEK
- opaque wrapped_server_write_key_ [12]; // wrapped by the TEK
- opaque client_write_iv_ [24];
- opaque server_write_iv_ [24];
- opaque master_secret_iv_ [24]; // IV used to encrypt preMaster
- opaque encrypted_preMasterSecret_[48]; // random & crypted by the TEK
-};
-
-
-
-// Diffie-Hellman public key from page 40/41
-class ClientDiffieHellmanPublic : public ClientKeyBase {
- PublicValueEncoding public_value_encoding_;
- int length_; // includes two byte length for message
- opaque* Yc_; // length + Yc_
- // dh_Yc only if explicit, otherwise sent in certificate
- enum { KEY_OFFSET = 2 };
-public:
- ClientDiffieHellmanPublic();
- ~ClientDiffieHellmanPublic();
-
- void build(SSL&);
- void read(SSL&, input_buffer&);
- int get_length() const;
- opaque* get_clientKey() const;
- void alloc(int sz, bool offset = false);
-private:
- // hide copy and assign
- ClientDiffieHellmanPublic(const ClientDiffieHellmanPublic&);
- ClientDiffieHellmanPublic& operator=(const ClientDiffieHellmanPublic&);
-};
-
-
-class ClientKeyExchange : public HandShakeBase {
- ClientKeyBase* client_key_;
-public:
- explicit ClientKeyExchange(SSL& ssl);
- ClientKeyExchange();
- ~ClientKeyExchange();
-
- void createKey(SSL&);
- void build(SSL& ssl);
-
- const opaque* getKey() const;
- int getKeyLength() const;
-
- friend output_buffer& operator<<(output_buffer&, const ClientKeyExchange&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- HandShakeType get_type() const;
- void Process(input_buffer&, SSL&);
-private:
- ClientKeyExchange(const ClientKeyExchange&); // hide copy
- ClientKeyExchange& operator=(const ClientKeyExchange&); // and assign
-};
-
-
-class CertificateVerify : public HandShakeBase {
- Hashes hashes_;
- byte* signature_; // owns
-public:
- CertificateVerify();
- ~CertificateVerify();
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- friend input_buffer& operator>>(input_buffer&, CertificateVerify&);
- friend output_buffer& operator<<(output_buffer&, const CertificateVerify&);
-
- void Process(input_buffer&, SSL&);
- HandShakeType get_type() const;
-
- void Build(SSL&);
-private:
- CertificateVerify(const CertificateVerify&); // hide copy
- CertificateVerify& operator=(const CertificateVerify&); // and assign
-};
-
-
-class Finished : public HandShakeBase {
- Hashes hashes_;
-public:
- Finished();
-
- uint8* set_md5();
- uint8* set_sha();
-
- friend input_buffer& operator>>(input_buffer&, Finished&);
- friend output_buffer& operator<<(output_buffer&, const Finished&);
-
- input_buffer& set(input_buffer& in);
- output_buffer& get(output_buffer& out) const;
-
- void Process(input_buffer&, SSL&);
-
- HandShakeType get_type() const;
-private:
- Finished(const Finished&); // hide copy
- Finished& operator=(const Finished&); // and assign
-};
-
-
-class RandomPool; // forward for connection
-
-
-// SSL Connection defined on page 11
-struct Connection {
- opaque *pre_master_secret_;
- opaque master_secret_[SECRET_LEN];
- opaque client_random_[RAN_LEN];
- opaque server_random_[RAN_LEN];
- opaque sessionID_[ID_LEN];
- opaque client_write_MAC_secret_[SHA_LEN]; // sha is max size
- opaque server_write_MAC_secret_[SHA_LEN];
- opaque client_write_key_[AES_256_KEY_SZ]; // aes 256bit is max sz
- opaque server_write_key_[AES_256_KEY_SZ];
- opaque client_write_IV_[AES_IV_SZ]; // aes is max size
- opaque server_write_IV_[AES_IV_SZ];
- uint32 sequence_number_;
- uint32 peer_sequence_number_;
- uint32 pre_secret_len_; // pre master length
- bool send_server_key_; // server key exchange?
- bool master_clean_; // master secret clean?
- bool TLS_; // TLSv1 or greater
- bool TLSv1_1_; // TLSv1.1 or greater
- bool sessionID_Set_; // do we have a session
- bool compression_; // zlib compression?
- ProtocolVersion version_; // negotiated version
- ProtocolVersion chVersion_; // client hello version
- RandomPool& random_;
-
- Connection(ProtocolVersion v, RandomPool& ran);
- ~Connection();
-
- void AllocPreSecret(uint sz);
- void CleanPreMaster();
- void CleanMaster();
- void TurnOffTLS();
- void TurnOffTLS1_1();
-private:
- Connection(const Connection&); // hide copy
- Connection& operator=(const Connection&); // and assign
-};
-
-
-struct Ciphers; // forward
-
-
-// TLSv1 Security Spec, defined on page 56 of RFC 2246
-struct Parameters {
- ConnectionEnd entity_;
- BulkCipherAlgorithm bulk_cipher_algorithm_;
- CipherType cipher_type_;
- uint8 key_size_;
- uint8 iv_size_;
- IsExportable is_exportable_;
- MACAlgorithm mac_algorithm_;
- uint8 hash_size_;
- CompressionMethod compression_algorithm_;
- KeyExchangeAlgorithm kea_; // yassl additions
- SignatureAlgorithm sig_algo_; // signature auth type
- SignatureAlgorithm verify_algo_; // cert verify auth type
- bool pending_;
- bool resumable_; // new conns by session
- uint16 encrypt_size_; // current msg encrypt sz
- Cipher suite_[SUITE_LEN]; // choosen suite
- uint8 suites_size_;
- Cipher suites_[MAX_SUITE_SZ];
- char cipher_name_[MAX_SUITE_NAME];
- char cipher_list_[MAX_CIPHERS][MAX_SUITE_NAME];
- bool removeDH_; // for server's later use
-
- Parameters(ConnectionEnd, const Ciphers&, ProtocolVersion, bool haveDH);
-
- void SetSuites(ProtocolVersion pv, bool removeDH = false,
- bool removeRSA = false, bool removeDSA = false);
- void SetCipherNames();
-private:
- Parameters(const Parameters&); // hide copy
- Parameters& operator=(const Parameters&); // and assing
-};
-
-
-input_buffer& operator>>(input_buffer&, RecordLayerHeader&);
-output_buffer& operator<<(output_buffer&, const RecordLayerHeader&);
-
-input_buffer& operator>>(input_buffer&, Message&);
-output_buffer& operator<<(output_buffer&, const Message&);
-
-input_buffer& operator>>(input_buffer&, HandShakeBase&);
-output_buffer& operator<<(output_buffer&, const HandShakeBase&);
-
-
-// Message Factory definition
-// uses the ContentType enumeration for unique id
-typedef Factory<Message> MessageFactory;
-void InitMessageFactory(MessageFactory&); // registers derived classes
-
-// HandShake Factory definition
-// uses the HandShakeType enumeration for unique id
-typedef Factory<HandShakeBase> HandShakeFactory;
-void InitHandShakeFactory(HandShakeFactory&); // registers derived classes
-
-// ServerKey Factory definition
-// uses KeyExchangeAlgorithm enumeration for unique id
-typedef Factory<ServerKeyBase> ServerKeyFactory;
-void InitServerKeyFactory(ServerKeyFactory&);
-
-// ClientKey Factory definition
-// uses KeyExchangeAlgorithm enumeration for unique id
-typedef Factory<ClientKeyBase> ClientKeyFactory;
-void InitClientKeyFactory(ClientKeyFactory&);
-
-
-// Message Creators
-Message* CreateHandShake();
-Message* CreateCipherSpec();
-Message* CreateAlert();
-Message* CreateData();
-
-
-// HandShake Creators
-HandShakeBase* CreateCertificate();
-HandShakeBase* CreateHelloRequest();
-HandShakeBase* CreateClientHello();
-HandShakeBase* CreateServerHello();
-HandShakeBase* CreateServerKeyExchange();
-HandShakeBase* CreateCertificateRequest();
-HandShakeBase* CreateServerHelloDone();
-HandShakeBase* CreateClientKeyExchange();
-HandShakeBase* CreateCertificateVerify();
-HandShakeBase* CreateFinished();
-
-
-// ServerKey Exchange Creators
-ServerKeyBase* CreateRSAServerKEA();
-ServerKeyBase* CreateDHServerKEA();
-ServerKeyBase* CreateFortezzaServerKEA();
-
-// ClientKey Exchange Creators
-ClientKeyBase* CreateRSAClient();
-ClientKeyBase* CreateDHClient();
-ClientKeyBase* CreateFortezzaClient();
-
-
-
-} // naemspace
-
-#endif // yaSSL_IMP_HPP
diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp
deleted file mode 100644
index b029f6af5f9..00000000000
--- a/extra/yassl/include/yassl_int.hpp
+++ /dev/null
@@ -1,724 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL internal header defines SSL supporting types not specified in the
- * draft along with type conversion functions and openssl compatibility
- */
-
-
-#ifndef yaSSL_INT_HPP
-#define yaSSL_INT_HPP
-
-#include "yassl_imp.hpp"
-#include "yassl_error.hpp"
-#include "crypto_wrapper.hpp"
-#include "cert_wrapper.hpp"
-#include "log.hpp"
-#include "lock.hpp"
-#include "openssl/ssl.h" // ASN1_STRING and DH
-
-// Check if _POSIX_THREADS should be forced
-#if !defined(_POSIX_THREADS) && defined(__hpux)
-// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
-#define _POSIX_THREADS
-#endif
-
-#ifdef _POSIX_THREADS
- #include <pthread.h>
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-namespace yaSSL {
-
-
-// State Machine for Record Layer Protocol
-enum RecordLayerState {
- recordNotReady = 0, // fatal error, no more processing
- recordReady
-};
-
-
-// State Machine for HandShake Protocol
-enum HandShakeState {
- handShakeNotReady = 0, // fatal error, no more processing
- preHandshake, // initial state
- inHandshake, // handshake started
- handShakeReady // handshake done
-};
-
-
-// client input HandShake state, use if HandShakeState == inHandShake
-enum ClientState {
- serverNull = 0,
- serverHelloComplete,
- serverCertComplete,
- serverKeyExchangeComplete,
- serverHelloDoneComplete,
- serverFinishedComplete
-};
-
-
-// server input HandShake state, use if HandShakeState == inHandShake
-enum ServerState {
- clientNull = 0,
- clientHelloComplete,
- clientKeyExchangeComplete,
- clientFinishedComplete
-};
-
-
-// client connect state for nonblocking restart
-enum ConnectState {
- CONNECT_BEGIN = 0,
- CLIENT_HELLO_SENT,
- FIRST_REPLY_DONE,
- FINISHED_DONE,
- SECOND_REPLY_DONE
-};
-
-
-// server accpet state for nonblocking restart
-enum AcceptState {
- ACCEPT_BEGIN = 0,
- ACCEPT_FIRST_REPLY_DONE,
- SERVER_HELLO_DONE,
- ACCEPT_SECOND_REPLY_DONE,
- ACCEPT_FINISHED_DONE,
- ACCEPT_THIRD_REPLY_DONE
-};
-
-
-// track received messages to explicitly disallow duplicate messages
-struct RecvdMessages {
- uint8 gotClientHello_;
- uint8 gotServerHello_;
- uint8 gotCert_;
- uint8 gotServerKeyExchange_;
- uint8 gotCertRequest_;
- uint8 gotServerHelloDone_;
- uint8 gotCertVerify_;
- uint8 gotClientKeyExchange_;
- uint8 gotFinished_;
- RecvdMessages() : gotClientHello_(0), gotServerHello_(0), gotCert_(0),
- gotServerKeyExchange_(0), gotCertRequest_(0),
- gotServerHelloDone_(0), gotCertVerify_(0),
- gotClientKeyExchange_(0), gotFinished_(0)
- {}
-};
-
-
-// combines all states
-class States {
- RecordLayerState recordLayer_;
- HandShakeState handshakeLayer_;
- ClientState clientState_;
- ServerState serverState_;
- ConnectState connectState_;
- AcceptState acceptState_;
- RecvdMessages recvdMessages_;
- char errorString_[MAX_ERROR_SZ];
- YasslError what_;
-public:
- States();
-
- const RecordLayerState& getRecord() const;
- const HandShakeState& getHandShake() const;
- const ClientState& getClient() const;
- const ServerState& getServer() const;
- const ConnectState& GetConnect() const;
- const AcceptState& GetAccept() const;
- const char* getString() const;
- YasslError What() const;
-
- RecordLayerState& useRecord();
- HandShakeState& useHandShake();
- ClientState& useClient();
- ServerState& useServer();
- ConnectState& UseConnect();
- AcceptState& UseAccept();
- char* useString();
- void SetError(YasslError);
- int SetMessageRecvd(HandShakeType);
-private:
- States(const States&); // hide copy
- States& operator=(const States&); // and assign
-};
-
-
-// holds all factories
-class sslFactory {
- MessageFactory messageFactory_; // creates new messages by type
- HandShakeFactory handShakeFactory_; // creates new handshake types
- ServerKeyFactory serverKeyFactory_; // creates new server key types
- ClientKeyFactory clientKeyFactory_; // creates new client key types
-
- sslFactory(); // only GetSSL_Factory creates
-public:
- const MessageFactory& getMessage() const;
- const HandShakeFactory& getHandShake() const;
- const ServerKeyFactory& getServerKey() const;
- const ClientKeyFactory& getClientKey() const;
-
- friend sslFactory& GetSSL_Factory(); // singleton creator
-private:
- sslFactory(const sslFactory&); // hide copy
- sslFactory& operator=(const sslFactory&); // and assign
-};
-
-
-#undef X509_NAME // wincrypt.h clash
-
-// openSSL X509 names
-class X509_NAME {
- char* name_;
- size_t sz_;
- int cnPosition_; // start of common name, -1 is none
- int cnLen_; // length of above
- ASN1_STRING entry_;
-public:
- X509_NAME(const char*, size_t sz, int pos, int len);
- ~X509_NAME();
-
- const char* GetName() const;
- ASN1_STRING* GetEntry(int i);
- size_t GetLength() const;
- int GetCnPosition() const { return cnPosition_; }
- int GetCnLength() const { return cnLen_; }
-private:
- X509_NAME(const X509_NAME&); // hide copy
- X509_NAME& operator=(const X509_NAME&); // and assign
-};
-
-
-class StringHolder {
- ASN1_STRING asnString_;
-public:
- StringHolder(const char* str, int sz, byte type= 0);
- ~StringHolder();
-
- ASN1_STRING* GetString();
-private:
- StringHolder(const StringHolder&); // hide copy
- StringHolder& operator=(const StringHolder&); // and assign
-};
-
-
-// openSSL X509
-class X509 {
- X509_NAME issuer_;
- X509_NAME subject_;
- StringHolder beforeDate_; // not valid before
- StringHolder afterDate_; // not valid after
-public:
- X509(const char* i, size_t, const char* s, size_t,
- ASN1_STRING *b, ASN1_STRING *a, int, int, int, int);
- ~X509() {}
-
- X509_NAME* GetIssuer();
- X509_NAME* GetSubject();
-
- ASN1_STRING* GetBefore();
- ASN1_STRING* GetAfter();
-
-private:
- X509(const X509&); // hide copy
- X509& operator=(const X509&); // and assign
-};
-
-
-// openSSL bignum
-struct BIGNUM {
- /*
- gcc 2.96 fix: because of two Integer classes (yaSSL::Integer and
- TaoCrypt::Integer), we need to explicitly state the namespace
- here to let gcc 2.96 deduce the correct type.
- */
- yaSSL::Integer int_;
- void assign(const byte* b, uint s) { int_.assign(b,s); }
-};
-
-
-// openSSL session
-class SSL_SESSION {
- opaque sessionID_[ID_LEN];
- opaque master_secret_[SECRET_LEN];
- Cipher suite_[SUITE_LEN];
- uint bornOn_; // create time in seconds
- uint timeout_; // timeout in seconds
- RandomPool& random_; // will clean master secret
- X509* peerX509_;
-public:
- explicit SSL_SESSION(RandomPool&);
- SSL_SESSION(const SSL&, RandomPool&);
- ~SSL_SESSION();
-
- const opaque* GetID() const;
- const opaque* GetSecret() const;
- const Cipher* GetSuite() const;
- uint GetBornOn() const;
- uint GetTimeOut() const;
- X509* GetPeerX509() const;
- void SetTimeOut(uint);
-
- SSL_SESSION& operator=(const SSL_SESSION&); // allow assign for resumption
-private:
- SSL_SESSION(const SSL_SESSION&); // hide copy
-
- void CopyX509(X509*);
-};
-
-
-// holds all sessions
-class Sessions {
- STL::list<SSL_SESSION*> list_;
- RandomPool random_; // for session cleaning
- Mutex mutex_; // no-op for single threaded
- int count_; // flush counter
-
- Sessions() : count_(0) {} // only GetSessions can create
-public:
- SSL_SESSION* lookup(const opaque*, SSL_SESSION* copy = 0);
- void add(const SSL&);
- void remove(const opaque*);
- void Flush();
-
- ~Sessions();
-
- friend Sessions& GetSessions(); // singleton creator
-private:
- Sessions(const Sessions&); // hide copy
- Sessions& operator=(const Sessions&); // and assign
-};
-
-
-#ifdef _POSIX_THREADS
- typedef pthread_t THREAD_ID_T;
-#else
- typedef DWORD THREAD_ID_T;
-#endif
-
-// thread error data
-struct ThreadError {
- THREAD_ID_T threadID_;
- int errorID_;
-};
-
-
-// holds all errors
-class Errors {
- STL::list<ThreadError> list_;
- Mutex mutex_;
-
- Errors() {} // only GetErrors can create
-public:
- int Lookup(bool peek); // self lookup
- void Add(int);
- void Remove(); // remove self
-
- ~Errors() {}
-
- friend Errors& GetErrors(); // singleton creator
-private:
- Errors(const Errors&); // hide copy
- Errors& operator=(const Errors); // and assign
-};
-
-
-Sessions& GetSessions(); // forward singletons
-sslFactory& GetSSL_Factory();
-Errors& GetErrors();
-bool HasErrors();
-
-
-// openSSL method and context types
-class SSL_METHOD {
- ProtocolVersion version_;
- ConnectionEnd side_;
- bool verifyPeer_; // request or send certificate
- bool verifyNone_; // whether to verify certificate
- bool failNoCert_;
- bool multipleProtocol_; // for SSLv23 compatibility
-public:
- SSL_METHOD(ConnectionEnd ce, ProtocolVersion pv,
- bool multipleProtocol = false);
-
- ProtocolVersion getVersion() const;
- ConnectionEnd getSide() const;
-
- void setVerifyPeer();
- void setVerifyNone();
- void setFailNoCert();
-
- bool verifyPeer() const;
- bool verifyNone() const;
- bool failNoCert() const;
- bool multipleProtocol() const;
-private:
- SSL_METHOD(const SSL_METHOD&); // hide copy
- SSL_METHOD& operator=(const SSL_METHOD&); // and assign
-};
-
-
-struct Ciphers {
- bool setSuites_; // user set suites from default
- byte suites_[MAX_SUITE_SZ]; // new suites
- int suiteSz_; // suite length in bytes
-
- Ciphers() : setSuites_(false), suiteSz_(0) {}
-};
-
-
-struct DH; // forward
-
-
-// save for SSL construction
-struct DH_Parms {
- Integer p_;
- Integer g_;
- bool set_; // if set by user
-
- DH_Parms() : set_(false) {}
-};
-
-
-enum StatsField {
- Accept, Connect, AcceptGood, ConnectGood, AcceptRenegotiate,
- ConnectRenegotiate, Hits, CbHits, CacheFull, Misses, Timeouts, Number,
- GetCacheSize, VerifyMode, VerifyDepth
-};
-
-
-// SSL stats
-struct Stats {
- long accept_;
- long connect_;
- long acceptGood_;
- long connectGood_;
- long acceptRenegotiate_;
- long connectRenegotiate_;
-
- long hits_;
- long cbHits_;
- long cacheFull_;
- long misses_;
- long timeouts_;
- long number_;
- long getCacheSize_;
-
- int verifyMode_;
- int verifyDepth_;
-public:
- Stats() : accept_(0), connect_(0), acceptGood_(0), connectGood_(0),
- acceptRenegotiate_(0), connectRenegotiate_(0), hits_(0), cbHits_(0),
- cacheFull_(0), misses_(0), timeouts_(0), number_(0), getCacheSize_(0),
- verifyMode_(0), verifyDepth_(0)
- {}
-private:
- Stats(const Stats&); // hide copy
- Stats& operator=(const Stats&); // and assign
-};
-
-
-// the SSL context
-class SSL_CTX {
-public:
- typedef STL::list<x509*> CertList;
-private:
- SSL_METHOD* method_;
- x509* certificate_;
- x509* privateKey_;
- CertList caList_;
- Ciphers ciphers_;
- DH_Parms dhParms_;
- pem_password_cb passwordCb_;
- void* userData_;
- bool sessionCacheOff_;
- bool sessionCacheFlushOff_;
- Stats stats_;
- Mutex mutex_; // for Stats
- VerifyCallback verifyCallback_;
-public:
- explicit SSL_CTX(SSL_METHOD* meth);
- ~SSL_CTX();
-
- const x509* getCert() const;
- const x509* getKey() const;
- const SSL_METHOD* getMethod() const;
- const Ciphers& GetCiphers() const;
- const DH_Parms& GetDH_Parms() const;
- const Stats& GetStats() const;
- VerifyCallback getVerifyCallback() const;
- pem_password_cb GetPasswordCb() const;
- void* GetUserData() const;
- bool GetSessionCacheOff() const;
- bool GetSessionCacheFlushOff() const;
-
- void setVerifyPeer();
- void setVerifyNone();
- void setFailNoCert();
- void setVerifyCallback(VerifyCallback);
- bool SetCipherList(const char*);
- bool SetDH(const DH&);
- void SetPasswordCb(pem_password_cb cb);
- void SetUserData(void*);
- void SetSessionCacheOff();
- void SetSessionCacheFlushOff();
-
- void IncrementStats(StatsField);
- void AddCA(x509* ca);
- const CertList& GetCA_List() const;
-
- friend int read_file(SSL_CTX*, const char*, int, CertType);
-private:
- SSL_CTX(const SSL_CTX&); // hide copy
- SSL_CTX& operator=(const SSL_CTX&); // and assign
-};
-
-
-// holds all cryptographic types
-class Crypto {
- Digest* digest_; // agreed upon digest
- BulkCipher* cipher_; // agreed upon cipher
- DiffieHellman* dh_; // dh parms
- RandomPool random_; // random number generator
- CertManager cert_; // manages certificates
-public:
- explicit Crypto();
- ~Crypto();
-
- const Digest& get_digest() const;
- const BulkCipher& get_cipher() const;
- const DiffieHellman& get_dh() const;
- const RandomPool& get_random() const;
- const CertManager& get_certManager() const;
-
- Digest& use_digest();
- BulkCipher& use_cipher();
- DiffieHellman& use_dh();
- RandomPool& use_random();
- CertManager& use_certManager();
-
- void SetDH(DiffieHellman*);
- void SetDH(const DH_Parms&);
- void setDigest(Digest*);
- void setCipher(BulkCipher*);
-
- bool DhSet();
-private:
- Crypto(const Crypto&); // hide copy
- Crypto& operator=(const Crypto&); // and assign
-};
-
-
-// holds all handshake and verify hashes
-class sslHashes {
- MD5 md5HandShake_; // md5 handshake hash
- SHA shaHandShake_; // sha handshake hash
- Finished verify_; // peer's verify hash
- Hashes certVerify_; // peer's cert verify hash
-public:
- sslHashes() {}
-
- const MD5& get_MD5() const;
- const SHA& get_SHA() const;
- const Finished& get_verify() const;
- const Hashes& get_certVerify() const;
-
- MD5& use_MD5();
- SHA& use_SHA();
- Finished& use_verify();
- Hashes& use_certVerify();
-private:
- sslHashes(const sslHashes&); // hide copy
- sslHashes& operator=(const sslHashes&); // and assign
-};
-
-
-// holds input and output buffers
-class Buffers {
-public:
- typedef STL::list<input_buffer*> inputList;
- typedef STL::list<output_buffer*> outputList;
- int prevSent; // previous plain text bytes sent when got WANT_WRITE
- int plainSz; // plain text bytes in buffer to send when got WANT_WRITE
-private:
- inputList dataList_; // list of users app data / handshake
- outputList handShakeList_; // buffered handshake msgs
- input_buffer* rawInput_; // buffered raw input yet to process
- output_buffer* output_; // WANT_WRITE buffered output
-public:
- Buffers();
- ~Buffers();
-
- const inputList& getData() const;
- const outputList& getHandShake() const;
-
- inputList& useData();
- outputList& useHandShake();
-
- void SetRawInput(input_buffer*); // takes ownership
- input_buffer* TakeRawInput(); // takes ownership
- void SetOutput(output_buffer*); // takes ownership
- output_buffer* TakeOutput(); // takes ownership
-private:
- Buffers(const Buffers&); // hide copy
- Buffers& operator=(const Buffers&); // and assign
-};
-
-
-// wraps security parameters
-class Security {
- Connection conn_; // connection information
- Parameters parms_; // may be pending
- SSL_SESSION resumeSession_; // if resuming
- SSL_CTX* ctx_; // context used to init
- bool resuming_; // trying to resume
-public:
- Security(ProtocolVersion, RandomPool&, ConnectionEnd, const Ciphers&,
- SSL_CTX*, bool);
-
- const SSL_CTX* GetContext() const;
- const Connection& get_connection() const;
- const Parameters& get_parms() const;
- const SSL_SESSION& get_resume() const;
- bool get_resuming() const;
-
- Connection& use_connection();
- Parameters& use_parms();
- SSL_SESSION& use_resume();
-
- void set_resuming(bool b);
-private:
- Security(const Security&); // hide copy
- Security& operator=(const Security&); // and assign
-};
-
-
-// THE SSL type
-class SSL {
- Crypto crypto_; // agreed crypto agents
- Security secure_; // Connection and Session parms
- States states_; // Record and HandShake states
- sslHashes hashes_; // handshake, finished hashes
- Socket socket_; // socket wrapper
- Buffers buffers_; // buffered handshakes and data
- Log log_; // logger
- bool quietShutdown_;
-
- // optimization variables
- bool has_data_; // buffered data ready?
-public:
- SSL(SSL_CTX* ctx);
-
- // gets and uses
- const Crypto& getCrypto() const;
- const Security& getSecurity() const;
- const States& getStates() const;
- const sslHashes& getHashes() const;
- const sslFactory& getFactory() const;
- const Socket& getSocket() const;
- YasslError GetError() const;
- bool GetMultiProtocol() const;
- bool CompressionOn() const;
-
- Crypto& useCrypto();
- Security& useSecurity();
- States& useStates();
- sslHashes& useHashes();
- Socket& useSocket();
- Log& useLog();
- Buffers& useBuffers();
-
- bool HasData() const;
- bool GetQuietShutdown() const;
-
- // sets
- void set_pending(Cipher suite);
- void set_random(const opaque*, ConnectionEnd);
- void set_sessionID(const opaque*);
- void set_session(SSL_SESSION*);
- void set_preMaster(const opaque*, uint);
- void set_masterSecret(const opaque*);
- void SetError(YasslError);
- int SetCompression();
- void UnSetCompression();
- void SetQuietShutdown(bool mode);
-
- // helpers
- bool isTLS() const;
- bool isTLSv1_1() const;
- void order_error();
- void makeMasterSecret();
- void makeTLSMasterSecret();
- void addData(input_buffer* data);
- void fillData(Data&);
- void PeekData(Data&);
- void addBuffer(output_buffer* b);
- void flushBuffer();
- void verifyState(const RecordLayerHeader&);
- void verifyState(const HandShakeHeader&);
- void verifyState(ClientState);
- void verifyState(ServerState);
- void verfiyHandShakeComplete();
- void matchSuite(const opaque*, uint length);
- void deriveKeys();
- void deriveTLSKeys();
- void Send(const byte*, uint);
- void SendWriteBuffered();
-
- uint bufferedData();
- uint get_SEQIncrement(bool);
-
- const byte* get_macSecret(bool);
-private:
- void storeKeys(const opaque*);
- void setKeys();
- void verifyClientState(HandShakeType);
- void verifyServerState(HandShakeType);
-
- SSL(const SSL&); // hide copy
- const SSL& operator=(const SSL&); // and assign
-};
-
-
-// compression
-int Compress(const byte*, int, input_buffer&);
-int DeCompress(input_buffer&, int, input_buffer&);
-
-
-// conversion functions
-void c32to24(uint32, uint24&);
-void c24to32(const uint24, uint32&);
-
-uint32 c24to32(const uint24);
-
-void ato16(const opaque*, uint16&);
-void ato24(const opaque*, uint24&);
-
-void c16toa(uint16, opaque*);
-void c24toa(const uint24, opaque*);
-void c32toa(uint32 u32, opaque*);
-
-
-} // naemspace
-
-#endif // yaSSL_INT_HPP
diff --git a/extra/yassl/include/yassl_types.hpp b/extra/yassl/include/yassl_types.hpp
deleted file mode 100644
index 3132d75a6ff..00000000000
--- a/extra/yassl/include/yassl_types.hpp
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* yaSSL types header defines all constants, enums, and typedefs
- * from the SSL.v3 specification "draft-freier-ssl-version3-02.txt"
- */
-
-
-#ifndef yaSSL_TYPES_HPP
-#define yaSSL_TYPES_HPP
-
-#include <stddef.h>
-#include "type_traits.hpp"
-
-
-#ifdef _MSC_VER
- // disable conversion warning
- // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy
- #pragma warning(disable:4244 4996)
-#endif
-
-
-#ifdef _MSC_VER
- // disable conversion warning
- // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy
- #pragma warning(disable:4244 4996)
-#endif
-
-
-namespace yaSSL {
-
-#define YASSL_LIB
-
-
-#ifdef YASSL_PURE_C
-
- // library allocation
- struct new_t {}; // yaSSL New type
- extern new_t ys; // pass in parameter
-
- } // namespace yaSSL
-
- void* operator new (size_t, yaSSL::new_t);
- void* operator new[](size_t, yaSSL::new_t);
-
- void operator delete (void*, yaSSL::new_t);
- void operator delete[](void*, yaSSL::new_t);
-
-
- namespace yaSSL {
-
-
- template<typename T>
- void ysDelete(T* ptr)
- {
- if (ptr) ptr->~T();
- ::operator delete(ptr, yaSSL::ys);
- }
-
- template<typename T>
- void ysArrayDelete(T* ptr)
- {
- // can't do array placement destruction since not tracking size in
- // allocation, only allow builtins to use array placement since they
- // don't need destructors called
- typedef char builtin[TaoCrypt::IsFundamentalType<T>::Yes ? 1 : -1];
- (void)sizeof(builtin);
-
- ::operator delete[](ptr, yaSSL::ys);
- }
-
- #define NEW_YS new (yaSSL::ys)
-
- // to resolve compiler generated operator delete on base classes with
- // virtual destructors (when on stack)
- class virtual_base {
- public:
- static void operator delete(void*) { }
- };
-
-
-#else // YASSL_PURE_C
-
-
- template<typename T>
- void ysDelete(T* ptr)
- {
- delete ptr;
- }
-
- template<typename T>
- void ysArrayDelete(T* ptr)
- {
- delete[] ptr;
- }
-
- #define NEW_YS new
-
- class virtual_base {};
-
-
-
-#endif // YASSL_PURE_C
-
-
-typedef unsigned char uint8;
-typedef unsigned short uint16;
-typedef unsigned int uint32;
-typedef uint8 uint24[3];
-typedef uint32 uint64[2];
-
-typedef uint8 opaque;
-typedef opaque byte;
-
-typedef unsigned int uint;
-
-
-#ifdef USE_SYS_STL
- // use system STL
- #define STL_VECTOR_FILE <vector>
- #define STL_LIST_FILE <list>
- #define STL_ALGORITHM_FILE <algorithm>
- #define STL_MEMORY_FILE <memory>
- #define STL_PAIR_FILE <utility>
-
- #define STL_NAMESPACE std
-#else
- // use mySTL
- #define STL_VECTOR_FILE "vector.hpp"
- #define STL_LIST_FILE "list.hpp"
- #define STL_ALGORITHM_FILE "algorithm.hpp"
- #define STL_MEMORY_FILE "memory.hpp"
- #define STL_PAIR_FILE "pair.hpp"
-
- #define STL_NAMESPACE mySTL
-#endif
-
-
-#ifdef min
- #undef min
-#endif
-
-template <typename T>
-T min(T a, T b)
-{
- return a < b ? a : b;
-}
-
-
-
-// all length constants in bytes
-const int ID_LEN = 32; // session id length
-const int SUITE_LEN = 2; // cipher suite length
-const int SECRET_LEN = 48; // pre RSA and all master secret length
-const int MASTER_ROUNDS = 3; // master secret derivation rounds
-const int RAN_LEN = 32; // client and server random length
-const int MAC_BLOCK_SZ = 64; // MAC block size, & padding
-const int MD5_LEN = 16; // MD5 digest length
-const int SHA_LEN = 20; // SHA digest length
-const int RMD_LEN = 20; // RIPEMD-160 digest length
-const int PREFIX = 3; // up to 3 prefix letters for secret rounds
-const int KEY_PREFIX = 7; // up to 7 prefix letters for key rounds
-const int FORTEZZA_MAX = 128; // Maximum Fortezza Key length
-const int MAX_SUITE_SZ = 128; // 64 max suites * sizeof(suite)
-const int MAX_SUITE_NAME = 48; // max length of suite name
-const int MAX_CIPHERS = 32; // max supported ciphers for cipher list
-const int SIZEOF_ENUM = 1; // SSL considers an enum 1 byte, not 4
-const int SIZEOF_SENDER = 4; // Sender constant, for finished generation
-const int PAD_MD5 = 48; // pad length 1 and 2 for md5 finished
-const int PAD_SHA = 40; // should be 44, specd wrong by netscape
-const int PAD_RMD = 44; // pad length for RIPEMD-160, some use 40??
-const int CERT_HEADER = 3; // always use 3 bytes for certificate
-const int CERT_TYPES = 7; // certificate request types
-const int REQUEST_HEADER = 2; // request uses 2 bytes
-const int VERIFY_HEADER = 2; // verify length field
-const int MIN_CERT_TYPES = 1; // minimum certificate request types
-const int MIN_DIS_NAMES = 3; // minimum distinguished names
-const int MIN_DIS_SIZE = 1; // minimum distinguished name size
-const int RECORD_HEADER = 5; // type + version + length(2)
-const int HANDSHAKE_HEADER = 4; // type + length(3)
-const int FINISHED_SZ = MD5_LEN + SHA_LEN; // sizeof finished data
-const int TLS_FINISHED_SZ = 12; // TLS verify data size
-const int SEQ_SZ = 8; // 64 bit sequence number
-const int LENGTH_SZ = 2; // length field for HMAC, data only
-const int VERSION_SZ = SIZEOF_ENUM * 2; // SSL/TLS length of version
-const int DES_KEY_SZ = 8; // DES Key length
-const int DES_EDE_KEY_SZ = 24; // DES EDE Key length
-const int DES_BLOCK = 8; // DES is always fixed block size 8
-const int DES_IV_SZ = DES_BLOCK; // Init Vector length for DES
-const int RC4_KEY_SZ = 16; // RC4 Key length
-const int AES_128_KEY_SZ = 16; // AES 128bit Key length
-const int AES_192_KEY_SZ = 24; // AES 192bit Key length
-const int AES_256_KEY_SZ = 32; // AES 256bit Key length
-const int AES_BLOCK_SZ = 16; // AES 128bit block size, rfc 3268
-const int AES_IV_SZ = AES_BLOCK_SZ; // AES Init Vector length
-const int DSS_SIG_SZ = 40; // two 20 byte high byte first Integers
-const int DSS_ENCODED_EXTRA = 6; // seqID + len(1) + (intID + len(1)) * 2
-const int EVP_SALT_SZ = 8;
-const int MASTER_LABEL_SZ = 13; // TLS master secret label size
-const int KEY_LABEL_SZ = 13; // TLS key block expansion size
-const int FINISHED_LABEL_SZ = 15; // TLS finished lable length
-const int SEED_LEN = RAN_LEN * 2; // TLS seed, client + server random
-const int DEFAULT_TIMEOUT = 500; // Default Session timeout in seconds
-const int MAX_RECORD_SIZE = 16384; // 2^14, max size by standard
-const int COMPRESS_EXTRA = 1024; // extra compression possible addition
-const int SESSION_FLUSH_COUNT = 256; // when to flush session cache
-const int MAX_PAD_SIZE = 256; // max TLS padding size
-const int COMPRESS_CONSTANT = 13; // compression calculation constant
-const int COMPRESS_UPPER = 55; // compression calculation numerator
-const int COMPRESS_LOWER = 64; // compression calculation denominator
-const int COMPRESS_DUMMY_SIZE = 64; // compression dummy round size
-
-typedef uint8 Cipher; // first byte is always 0x00 for SSLv3 & TLS
-
-typedef opaque Random[RAN_LEN];
-
-typedef opaque* DistinguishedName;
-
-typedef bool IsExportable;
-
-
-enum CompressionMethod { no_compression = 0, zlib = 221 };
-
-enum CipherType { stream, block };
-
-enum CipherChoice { change_cipher_spec_choice = 1 };
-
-enum PublicValueEncoding { implicit_encoding, explicit_encoding };
-
-enum ConnectionEnd { server_end, client_end };
-
-enum AlertLevel { warning = 1, fatal = 2 };
-
-
-
-// Record Layer Header identifier from page 12
-enum ContentType {
- no_type = 0,
- change_cipher_spec = 20,
- alert = 21,
- handshake = 22,
- application_data = 23
-};
-
-
-// HandShake Layer Header identifier from page 20
-enum HandShakeType {
- no_shake = -1,
- hello_request = 0,
- client_hello = 1,
- server_hello = 2,
- certificate = 11,
- server_key_exchange = 12,
- certificate_request = 13,
- server_hello_done = 14,
- certificate_verify = 15,
- client_key_exchange = 16,
- finished = 20
-};
-
-
-// Valid Alert types from page 16/17
-enum AlertDescription {
- close_notify = 0,
- unexpected_message = 10,
- bad_record_mac = 20,
- decompression_failure = 30,
- handshake_failure = 40,
- no_certificate = 41,
- bad_certificate = 42,
- unsupported_certificate = 43,
- certificate_revoked = 44,
- certificate_expired = 45,
- certificate_unknown = 46,
- illegal_parameter = 47
-};
-
-
-// Supported Key Exchange Protocols
-enum KeyExchangeAlgorithm {
- no_kea = 0,
- rsa_kea,
- diffie_hellman_kea,
- fortezza_kea
-};
-
-
-// Supported Authentication Schemes
-enum SignatureAlgorithm {
- anonymous_sa_algo = 0,
- rsa_sa_algo,
- dsa_sa_algo
-};
-
-
-// Valid client certificate request types from page 27
-enum ClientCertificateType {
- rsa_sign = 1,
- dss_sign = 2,
- rsa_fixed_dh = 3,
- dss_fixed_dh = 4,
- rsa_ephemeral_dh = 5,
- dss_ephemeral_dh = 6,
- fortezza_kea_cert = 20
-};
-
-
-// Supported Ciphers from page 43
-enum BulkCipherAlgorithm {
- cipher_null,
- rc4,
- rc2,
- des,
- triple_des, // leading 3 (3des) not valid identifier
- des40,
- idea,
- aes
-};
-
-
-// Supported Message Authentication Codes from page 43
-enum MACAlgorithm {
- no_mac,
- md5,
- sha,
- rmd
-};
-
-
-// Certificate file Type
-enum CertType { Cert = 0, PrivateKey, CA };
-
-
-// all Cipher Suites from pages 41/42
-const Cipher SSL_NULL_WITH_NULL_NULL = 0; // { 0x00, 0x00 }
-const Cipher SSL_RSA_WITH_NULL_MD5 = 1; // { 0x00, 0x01 }
-const Cipher SSL_RSA_WITH_NULL_SHA = 2; // { 0x00, 0x02 }
-const Cipher SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; // { 0x00, 0x03 }
-const Cipher SSL_RSA_WITH_RC4_128_MD5 = 4; // { 0x00, 0x04 }
-const Cipher SSL_RSA_WITH_RC4_128_SHA = 5; // { 0x00, 0x05 }
-const Cipher SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; // { 0x00, 0x06 }
-const Cipher SSL_RSA_WITH_IDEA_CBC_SHA = 7; // { 0x00, 0x07 }
-const Cipher SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; // { 0x00, 0x08 }
-const Cipher SSL_RSA_WITH_DES_CBC_SHA = 9; // { 0x00, 0x09 }
-const Cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; // { 0x00, 0x0A }
-const Cipher SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; // { 0x00, 0x0B }
-const Cipher SSL_DH_DSS_WITH_DES_CBC_SHA = 12; // { 0x00, 0x0C }
-const Cipher SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; // { 0x00, 0x0D }
-const Cipher SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; // { 0x00, 0x0E }
-const Cipher SSL_DH_RSA_WITH_DES_CBC_SHA = 15; // { 0x00, 0x0F }
-const Cipher SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; // { 0x00, 0x10 }
-const Cipher SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; // { 0x00, 0x11 }
-const Cipher SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; // { 0x00, 0x12 }
-const Cipher SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; // { 0x00, 0x13 }
-const Cipher SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; // { 0x00, 0x14 }
-const Cipher SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; // { 0x00, 0x15 }
-const Cipher SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; // { 0x00, 0x16 }
-const Cipher SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; // { 0x00, 0x17 }
-const Cipher SSL_DH_anon_WITH_RC4_128_MD5 = 24; // { 0x00, 0x18 }
-const Cipher SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; // { 0x00, 0x19 }
-const Cipher SSL_DH_anon_WITH_DES_CBC_SHA = 26; // { 0x00, 0x1A }
-const Cipher SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; // { 0x00, 0x1B }
-const Cipher SSL_FORTEZZA_KEA_WITH_NULL_SHA = 28; // { 0x00, 0x1C }
-const Cipher SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA = 29; // { 0x00, 0x1D }
-const Cipher SSL_FORTEZZA_KEA_WITH_RC4_128_SHA = 30; // { 0x00, 0x1E }
-
-// .. to 0x2B uses Kerberos Authentication
-
-
-// TLS AES extensions
-const Cipher TLS_RSA_WITH_AES_128_CBC_SHA = 47; // { 0x00, 0x2F }
-const Cipher TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; // { 0x00, 0x30 }
-const Cipher TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; // { 0x00, 0x31 }
-const Cipher TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; // { 0x00, 0x32 }
-const Cipher TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; // { 0x00, 0x33 }
-const Cipher TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; // { 0x00, 0x34 }
-
-const Cipher TLS_RSA_WITH_AES_256_CBC_SHA = 53; // { 0x00, 0x35 }
-const Cipher TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; // { 0x00, 0x36 }
-const Cipher TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; // { 0x00, 0x37 }
-const Cipher TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; // { 0x00, 0x38 }
-const Cipher TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; // { 0x00, 0x39 }
-const Cipher TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; // { 0x00, 0x3A }
-
-
-// OpenPGP extensions
-
-const Cipher TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160 = 114; // { 0x00, 0x72 };
-const Cipher TLS_DHE_DSS_WITH_AES_128_CBC_RMD160 = 115; // { 0x00, 0x73 };
-const Cipher TLS_DHE_DSS_WITH_AES_256_CBC_RMD160 = 116; // { 0x00, 0x74 };
-const Cipher TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160 = 119; // { 0x00, 0x77 };
-const Cipher TLS_DHE_RSA_WITH_AES_128_CBC_RMD160 = 120; // { 0x00, 0x78 };
-const Cipher TLS_DHE_RSA_WITH_AES_256_CBC_RMD160 = 121; // { 0x00, 0x79 };
-const Cipher TLS_RSA_WITH_3DES_EDE_CBC_RMD160 = 124; // { 0x00, 0x7C };
-const Cipher TLS_RSA_WITH_AES_128_CBC_RMD160 = 125; // { 0x00, 0x7D };
-const Cipher TLS_RSA_WITH_AES_256_CBC_RMD160 = 126; // { 0x00, 0x7E };
-
-
-const char* const null_str = "";
-
-const char* const cipher_names[128] =
-{
- null_str, // SSL_NULL_WITH_NULL_NULL = 0
- null_str, // SSL_RSA_WITH_NULL_MD5 = 1
- null_str, // SSL_RSA_WITH_NULL_SHA = 2
- null_str, // SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3
- "RC4-MD5", // SSL_RSA_WITH_RC4_128_MD5 = 4
- "RC4-SHA", // SSL_RSA_WITH_RC4_128_SHA = 5
- null_str, // SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6
- null_str, // SSL_RSA_WITH_IDEA_CBC_SHA = 7
- null_str, // SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8
- "DES-CBC-SHA", // SSL_RSA_WITH_DES_CBC_SHA = 9
- "DES-CBC3-SHA", // SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10
-
- null_str, // SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11
- null_str, // SSL_DH_DSS_WITH_DES_CBC_SHA = 12
- null_str, // SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13
- null_str, // SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14
- null_str, // SSL_DH_RSA_WITH_DES_CBC_SHA = 15
- null_str, // SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16
- null_str, // SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17
- "EDH-DSS-DES-CBC-SHA", // SSL_DHE_DSS_WITH_DES_CBC_SHA = 18
- "EDH-DSS-DES-CBC3-SHA", // SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19
- null_str, // SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20
-
- "EDH-RSA-DES-CBC-SHA", // SSL_DHE_RSA_WITH_DES_CBC_SHA = 21
- "EDH-RSA-DES-CBC3-SHA", // SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22
- null_str, // SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23
- null_str, // SSL_DH_anon_WITH_RC4_128_MD5 = 24
- null_str, // SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25
- null_str, // SSL_DH_anon_WITH_DES_CBC_SHA = 26
- null_str, // SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27
- null_str, // SSL_FORTEZZA_KEA_WITH_NULL_SHA = 28
- null_str, // SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA = 29
- null_str, // SSL_FORTEZZA_KEA_WITH_RC4_128_SHA = 30
-
- null_str, null_str, null_str, null_str, null_str, // 31 - 35
- null_str, null_str, null_str, null_str, null_str, // 36 - 40
- null_str, null_str, null_str, null_str, null_str, // 41 - 45
- null_str, // 46
-
- // TLS AES extensions
- "AES128-SHA", // TLS_RSA_WITH_AES_128_CBC_SHA = 47
- null_str, // TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48
- null_str, // TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49
- "DHE-DSS-AES128-SHA", // TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50
- "DHE-RSA-AES128-SHA", // TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51
- null_str, // TLS_DH_anon_WITH_AES_128_CBC_SHA = 52
-
- "AES256-SHA", // TLS_RSA_WITH_AES_256_CBC_SHA = 53
- null_str, // TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54
- null_str, // TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55
- "DHE-DSS-AES256-SHA", // TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56
- "DHE-RSA-AES256-SHA", // TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57
- null_str, // TLS_DH_anon_WITH_AES_256_CBC_SHA = 58
-
- null_str, // 59
- null_str, // 60
- null_str, null_str, null_str, null_str, null_str, // 61 - 65
- null_str, null_str, null_str, null_str, null_str, // 66 - 70
- null_str, null_str, null_str, null_str, null_str, // 71 - 75
- null_str, null_str, null_str, null_str, null_str, // 76 - 80
- null_str, null_str, null_str, null_str, null_str, // 81 - 85
- null_str, null_str, null_str, null_str, null_str, // 86 - 90
- null_str, null_str, null_str, null_str, null_str, // 91 - 95
- null_str, null_str, null_str, null_str, null_str, // 96 - 100
- null_str, null_str, null_str, null_str, null_str, // 101 - 105
- null_str, null_str, null_str, null_str, null_str, // 106 - 110
- null_str, null_str, null_str, // 111 - 113
-
- "DHE-DSS-DES-CBC3-RMD", // TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160 = 114
- "DHE-DSS-AES128-RMD", // TLS_DHE_DSS_WITH_AES_128_CBC_RMD160 = 115
- "DHE-DSS-AES256-RMD", // TLS_DHE_DSS_WITH_AES_256_CBC_RMD160 = 116
- null_str, // 117
- null_str, // 118
- "DHE-RSA-DES-CBC3-RMD", // TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160 = 119
- "DHE-RSA-AES128-RMD", // TLS_DHE_RSA_WITH_AES_128_CBC_RMD160 = 120
- "DHE-RSA-AES256-RMD", // TLS_DHE_RSA_WITH_AES_256_CBC_RMD160 = 121
- null_str, // 122
- null_str, // 123
- "DES-CBC3-RMD", // TLS_RSA_WITH_3DES_EDE_CBC_RMD160 = 124
- "AES128-RMD", // TLS_RSA_WITH_AES_128_CBC_RMD160 = 125
- "AES256-RMD", // TLS_RSA_WITH_AES_256_CBC_RMD160 = 126
- null_str // 127
-};
-
-// fill with MD5 pad size since biggest required
-const opaque PAD1[PAD_MD5] = { 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
- 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36
- };
-const opaque PAD2[PAD_MD5] = { 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
- 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c
- };
-
-const opaque client[SIZEOF_SENDER] = { 0x43, 0x4C, 0x4E, 0x54 };
-const opaque server[SIZEOF_SENDER] = { 0x53, 0x52, 0x56, 0x52 };
-
-const opaque tls_client[FINISHED_LABEL_SZ + 1] = "client finished";
-const opaque tls_server[FINISHED_LABEL_SZ + 1] = "server finished";
-
-const opaque master_label[MASTER_LABEL_SZ + 1] = "master secret";
-const opaque key_label [KEY_LABEL_SZ + 1] = "key expansion";
-
-
-} // naemspace
-
-#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
-/*
- gcc 2.96 bails out because of two declarations of byte: yaSSL::byte and
- TaoCrypt::byte. TODO: define global types.hpp and move the declaration of
- 'byte' there.
-*/
-using yaSSL::byte;
-#endif
-
-
-#endif // yaSSL_TYPES_HPP
diff --git a/extra/yassl/lib/dummy b/extra/yassl/lib/dummy
deleted file mode 100644
index 85c1efd587f..00000000000
--- a/extra/yassl/lib/dummy
+++ /dev/null
@@ -1 +0,0 @@
-// this is a dummy file
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp
deleted file mode 100644
index 919aa9c7436..00000000000
--- a/extra/yassl/src/buffer.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL buffer header implements input/output buffers to simulate streaming
- * with SSL types and sockets
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string.h> // memcpy
-#include "runtime.hpp"
-#include "buffer.hpp"
-#include "yassl_types.hpp"
-
-namespace yaSSL {
-
-
-
-
-/* return 0 on check success, always true for NoCheck policy */
-int NoCheck::check(uint, uint)
-{
- return 0;
-}
-
-/* return 0 on check success */
-int Check::check(uint i, uint max)
-{
- if (i < max)
- return 0;
-
- return -1;
-}
-
-
-/* input_buffer operates like a smart c style array with a checking option,
- * meant to be read from through [] with AUTO index or read().
- * Should only write to at/near construction with assign() or raw (e.g., recv)
- * followed by add_size with the number of elements added by raw write.
- *
- * Not using vector because need checked []access, offset, and the ability to
- * write to the buffer bulk wise and have the correct size
- */
-
-
-input_buffer::input_buffer()
- : size_(0), current_(0), buffer_(0), end_(0), error_(0), zero_(0)
-{}
-
-
-input_buffer::input_buffer(uint s)
- : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s),
- error_(0), zero_(0)
-{}
-
-
-// with assign
-input_buffer::input_buffer(uint s, const byte* t, uint len)
- : size_(0), current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s),
- error_(0), zero_(0)
-{
- assign(t, len);
-}
-
-
-input_buffer::~input_buffer()
-{
- ysArrayDelete(buffer_);
-}
-
-
-// users can pass defualt zero length buffer and then allocate
-void input_buffer::allocate(uint s)
-{
- if (error_ == 0) {
- buffer_ = NEW_YS byte[s];
- end_ = buffer_ + s;
- }
-}
-
-
-// for passing to raw writing functions at beginning, then use add_size
-byte* input_buffer::get_buffer() const
-{
- return buffer_;
-}
-
-
-// after a raw write user can set NEW_YS size
-// if you know the size before the write use assign()
-void input_buffer::add_size(uint i)
-{
- if (error_ == 0 && check(size_ + i-1, get_capacity()) == 0)
- size_ += i;
- else
- error_ = -1;
-}
-
-
-uint input_buffer::get_capacity() const
-{
- if (error_ == 0)
- return end_ - buffer_;
-
- return 0;
-}
-
-
-uint input_buffer::get_current() const
-{
- if (error_ == 0)
- return current_;
-
- return 0;
-}
-
-
-uint input_buffer::get_size() const
-{
- if (error_ == 0)
- return size_;
-
- return 0;
-}
-
-
-uint input_buffer::get_remaining() const
-{
- if (error_ == 0)
- return size_ - current_;
-
- return 0;
-}
-
-
-int input_buffer::get_error() const
-{
- return error_;
-}
-
-
-void input_buffer::set_error()
-{
- error_ = -1;
-}
-
-
-void input_buffer::set_current(uint i)
-{
- if (error_ == 0 && check(i ? i - 1 : 0, size_) == 0)
- current_ = i;
- else
- error_ = -1;
-}
-
-
-// read only access through [], advance current
-// user passes in AUTO index for ease of use
-const byte& input_buffer::operator[](uint i)
-{
- if (error_ == 0 && check(current_, size_) == 0)
- return buffer_[current_++];
-
- error_ = -1;
- return zero_;
-}
-
-
-// end of input test
-bool input_buffer::eof()
-{
- if (error_ != 0)
- return true;
-
- return current_ >= size_;
-}
-
-
-// peek ahead
-byte input_buffer::peek()
-{
- if (error_ == 0 && check(current_, size_) == 0)
- return buffer_[current_];
-
- error_ = -1;
- return 0;
-}
-
-
-// write function, should use at/near construction
-void input_buffer::assign(const byte* t, uint s)
-{
- if (t && error_ == 0 && check(current_, get_capacity()) == 0) {
- add_size(s);
- if (error_ == 0) {
- memcpy(&buffer_[current_], t, s);
- return; // success
- }
- }
-
- error_ = -1;
-}
-
-
-// use read to query input, adjusts current
-void input_buffer::read(byte* dst, uint length)
-{
- if (dst && error_ == 0 && check(current_ + length - 1, size_) == 0) {
- memcpy(dst, &buffer_[current_], length);
- current_ += length;
- } else {
- error_ = -1;
- }
-}
-
-
-
-/* output_buffer operates like a smart c style array with a checking option.
- * Meant to be written to through [] with AUTO index or write().
- * Size (current) counter increases when written to. Can be constructed with
- * zero length buffer but be sure to allocate before first use.
- * Don't use add write for a couple bytes, use [] instead, way less overhead.
- *
- * Not using vector because need checked []access and the ability to
- * write to the buffer bulk wise and retain correct size
- */
-
-
-output_buffer::output_buffer()
- : current_(0), buffer_(0), end_(0)
-{}
-
-
-// with allocate
-output_buffer::output_buffer(uint s)
- : current_(0), buffer_(NEW_YS byte[s]), end_(buffer_ + s)
-{}
-
-
-// with assign
-output_buffer::output_buffer(uint s, const byte* t, uint len)
- : current_(0), buffer_(NEW_YS byte[s]), end_(buffer_+ s)
-{
- write(t, len);
-}
-
-
-output_buffer::~output_buffer()
-{
- ysArrayDelete(buffer_);
-}
-
-
-uint output_buffer::get_size() const
-{
- return current_;
-}
-
-
-uint output_buffer::get_capacity() const
-{
- return (uint) (end_ - buffer_);
-}
-
-
-void output_buffer::set_current(uint c)
-{
- check(c, get_capacity());
- current_ = c;
-}
-
-
-// users can pass defualt zero length buffer and then allocate
-void output_buffer::allocate(uint s)
-{
- buffer_ = NEW_YS byte[s]; end_ = buffer_ + s;
-}
-
-
-// for passing to reading functions when finished
-const byte* output_buffer::get_buffer() const
-{
- return buffer_;
-}
-
-
-// allow write access through [], update current
-// user passes in AUTO as index for ease of use
-byte& output_buffer::operator[](uint i)
-{
- check(current_, get_capacity());
- return buffer_[current_++];
-}
-
-
-// end of output test
-bool output_buffer::eof()
-{
- return current_ >= get_capacity();
-}
-
-
-void output_buffer::write(const byte* t, uint s)
-{
- check(current_ + s - 1, get_capacity());
- memcpy(&buffer_[current_], t, s);
- current_ += s;
-}
-
-
-
-} // naemspace
-
diff --git a/extra/yassl/src/cert_wrapper.cpp b/extra/yassl/src/cert_wrapper.cpp
deleted file mode 100644
index 7e2c179f964..00000000000
--- a/extra/yassl/src/cert_wrapper.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* The certificate wrapper source implements certificate management functions
- *
- */
-
-#include "runtime.hpp"
-#include "cert_wrapper.hpp"
-#include "yassl_int.hpp"
-#include "error.hpp"
-
-#if defined(USE_CML_LIB)
- #include "cmapi_cpp.h"
-#else
- #include "asn.hpp"
- #include "file.hpp"
-#endif // USE_CML_LIB
-
-
-namespace yaSSL {
-
-
-x509::x509(uint sz) : length_(sz), buffer_(NEW_YS opaque[sz])
-{
-}
-
-
-x509::~x509()
-{
- ysArrayDelete(buffer_);
-}
-
-
-x509::x509(const x509& that) : length_(that.length_),
- buffer_(NEW_YS opaque[length_])
-{
- memcpy(buffer_, that.buffer_, length_);
-}
-
-
-void x509::Swap(x509& that)
-{
- STL::swap(length_, that.length_);
- STL::swap(buffer_, that.buffer_);
-}
-
-
-x509& x509::operator=(const x509& that)
-{
- x509 temp(that);
- Swap(temp);
- return *this;
-}
-
-
-uint x509::get_length() const
-{
- return length_;
-}
-
-
-const opaque* x509::get_buffer() const
-{
- return buffer_;
-}
-
-
-opaque* x509::use_buffer()
-{
- return buffer_;
-}
-
-
-//CertManager
-CertManager::CertManager()
- : peerX509_(0), selfX509_(0), verifyPeer_(false), verifyNone_(false), failNoCert_(false),
- sendVerify_(false), sendBlankCert_(false), verifyCallback_(0)
-{}
-
-
-CertManager::~CertManager()
-{
- ysDelete(peerX509_);
- ysDelete(selfX509_);
-
- STL::for_each(signers_.begin(), signers_.end(), del_ptr_zero()) ;
-
- STL::for_each(peerList_.begin(), peerList_.end(), del_ptr_zero()) ;
-
- STL::for_each(list_.begin(), list_.end(), del_ptr_zero()) ;
-}
-
-
-bool CertManager::verifyPeer() const
-{
- return verifyPeer_;
-}
-
-
-bool CertManager::verifyNone() const
-{
- return verifyNone_;
-}
-
-
-bool CertManager::failNoCert() const
-{
- return failNoCert_;
-}
-
-
-bool CertManager::sendVerify() const
-{
- return sendVerify_;
-}
-
-
-void CertManager::setVerifyPeer()
-{
- verifyPeer_ = true;
-}
-
-
-void CertManager::setVerifyNone()
-{
- verifyNone_ = true;
-}
-
-bool CertManager::sendBlankCert() const
-{
- return sendBlankCert_;
-}
-
-
-void CertManager::setFailNoCert()
-{
- failNoCert_ = true;
-}
-
-
-void CertManager::setSendVerify()
-{
- sendVerify_ = true;
-}
-
-void CertManager::setSendBlankCert()
-{
- sendBlankCert_ = true;
-}
-
-
-void CertManager::setVerifyCallback(VerifyCallback vc)
-{
- verifyCallback_ = vc;
-}
-
-
-void CertManager::AddPeerCert(x509* x)
-{
- peerList_.push_back(x); // take ownership
-}
-
-
-void CertManager::CopySelfCert(const x509* x)
-{
- if (x)
- list_.push_back(NEW_YS x509(*x));
-}
-
-
-// add to signers
-int CertManager::CopyCaCert(const x509* x)
-{
- TaoCrypt::Source source(x->get_buffer(), x->get_length());
- TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_,
- TaoCrypt::CertDecoder::CA);
-
- if (!cert.GetError().What()) {
- const TaoCrypt::PublicKey& key = cert.GetPublicKey();
- signers_.push_back(NEW_YS TaoCrypt::Signer(key.GetKey(), key.size(),
- cert.GetCommonName(), cert.GetHash()));
- }
- // just don't add, not an error return cert.GetError().What();
- return 0;
-}
-
-
-const x509* CertManager::get_cert() const
-{
- return list_.front();
-}
-
-
-const opaque* CertManager::get_peerKey() const
-{
- return peerPublicKey_.get_buffer();
-}
-
-
-X509* CertManager::get_peerX509() const
-{
- return peerX509_;
-}
-
-
-X509* CertManager::get_selfX509() const
-{
- return selfX509_;
-}
-
-
-SignatureAlgorithm CertManager::get_peerKeyType() const
-{
- return peerKeyType_;
-}
-
-
-SignatureAlgorithm CertManager::get_keyType() const
-{
- return keyType_;
-}
-
-
-uint CertManager::get_peerKeyLength() const
-{
- return peerPublicKey_.get_size();
-}
-
-
-const opaque* CertManager::get_privateKey() const
-{
- return privateKey_.get_buffer();
-}
-
-
-uint CertManager::get_privateKeyLength() const
-{
- return privateKey_.get_size();
-}
-
-
-// Validate the peer's certificate list, from root to peer (last to first)
-int CertManager::Validate()
-{
- CertList::reverse_iterator last = peerList_.rbegin();
- size_t count = peerList_.size();
-
- while ( count > 1 ) {
- TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length());
- TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_);
-
- if (int err = cert.GetError().What())
- return err;
-
- const TaoCrypt::PublicKey& key = cert.GetPublicKey();
- signers_.push_back(NEW_YS TaoCrypt::Signer(key.GetKey(), key.size(),
- cert.GetCommonName(), cert.GetHash()));
- ++last;
- --count;
- }
-
- if (count) {
- // peer's is at the front
- TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length());
- TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_);
-
- int err = cert.GetError().What();
- if ( err && err != TaoCrypt::SIG_OTHER_E)
- return err;
-
- uint sz = cert.GetPublicKey().size();
- peerPublicKey_.allocate(sz);
- peerPublicKey_.assign(cert.GetPublicKey().GetKey(), sz);
-
- if (cert.GetKeyType() == TaoCrypt::RSAk)
- peerKeyType_ = rsa_sa_algo;
- else
- peerKeyType_ = dsa_sa_algo;
-
- size_t iSz = strlen(cert.GetIssuer()) + 1;
- size_t sSz = strlen(cert.GetCommonName()) + 1;
- ASN1_STRING beforeDate, afterDate;
- beforeDate.data= (unsigned char *) cert.GetBeforeDate();
- beforeDate.type= cert.GetBeforeDateType();
- beforeDate.length= (int)strlen((char *) beforeDate.data) + 1;
- afterDate.data= (unsigned char *) cert.GetAfterDate();
- afterDate.type= cert.GetAfterDateType();
- afterDate.length= (int)strlen((char *) afterDate.data) + 1;
- peerX509_ = NEW_YS X509(cert.GetIssuer(), iSz, cert.GetCommonName(),
- sSz, &beforeDate, &afterDate,
- cert.GetIssuerCnStart(), cert.GetIssuerCnLength(),
- cert.GetSubjectCnStart(), cert.GetSubjectCnLength()
- );
-
- if (err == TaoCrypt::SIG_OTHER_E && verifyCallback_) {
- X509_STORE_CTX store;
- store.error = err;
- store.error_depth = static_cast<int>(count) - 1;
- store.current_cert = peerX509_;
-
- int ok = verifyCallback_(0, &store);
- if (ok) return 0;
- }
-
- if (err == TaoCrypt::SIG_OTHER_E) return err;
- }
- return 0;
-}
-
-
-// Set the private key
-int CertManager::SetPrivateKey(const x509& key)
-{
- privateKey_.allocate(key.get_length());
- privateKey_.assign(key.get_buffer(), key.get_length());
-
- // set key type
- if (x509* cert = list_.front()) {
- TaoCrypt::Source source(cert->get_buffer(), cert->get_length());
- TaoCrypt::CertDecoder cd(source, false);
- cd.DecodeToKey();
- if (int err = cd.GetError().What())
- return err;
- if (cd.GetKeyType() == TaoCrypt::RSAk)
- keyType_ = rsa_sa_algo;
- else
- keyType_ = dsa_sa_algo;
-
- size_t iSz = strlen(cd.GetIssuer()) + 1;
- size_t sSz = strlen(cd.GetCommonName()) + 1;
- ASN1_STRING beforeDate, afterDate;
- beforeDate.data= (unsigned char *) cd.GetBeforeDate();
- beforeDate.type= cd.GetBeforeDateType();
- beforeDate.length= (int)strlen((char *) beforeDate.data) + 1;
- afterDate.data= (unsigned char *) cd.GetAfterDate();
- afterDate.type= cd.GetAfterDateType();
- afterDate.length= (int)strlen((char *) afterDate.data) + 1;
- selfX509_ = NEW_YS X509(cd.GetIssuer(), iSz, cd.GetCommonName(),
- sSz, &beforeDate, &afterDate,
- cd.GetIssuerCnStart(), cd.GetIssuerCnLength(),
- cd.GetSubjectCnStart(), cd.GetSubjectCnLength());
- }
- return 0;
-}
-
-
-// Store OpenSSL type peer's cert
-void CertManager::setPeerX509(X509* x)
-{
- if (x == 0) return;
-
- X509_NAME* issuer = x->GetIssuer();
- X509_NAME* subject = x->GetSubject();
- ASN1_STRING* before = x->GetBefore();
- ASN1_STRING* after = x->GetAfter();
-
- peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(),
- subject->GetName(), subject->GetLength(), before, after,
- issuer->GetCnPosition(), issuer->GetCnLength(),
- subject->GetCnPosition(), subject->GetCnLength());
-}
-
-
-#if defined(USE_CML_LIB)
-
-// Get the peer's certificate, extract and save public key
-void CertManager::SetPeerKey()
-{
- // first cert is the peer's
- x509* main = peerList_.front();
-
- Bytes_struct cert;
- cert.num = main->get_length();
- cert.data = main->set_buffer();
-
- CML::Certificate cm(cert);
- const CML::ASN::Cert& raw = cm.base();
- CTIL::CSM_Buffer key = raw.pubKeyInfo.key;
-
- uint sz;
- opaque* key_buffer = reinterpret_cast<opaque*>(key.Get(sz));
- peerPublicKey_.allocate(sz);
- peerPublicKey_.assign(key_buffer, sz);
-}
-
-
-#endif // USE_CML_LIB
-
-
-
-} // namespace
diff --git a/extra/yassl/src/crypto_wrapper.cpp b/extra/yassl/src/crypto_wrapper.cpp
deleted file mode 100644
index acafea5005e..00000000000
--- a/extra/yassl/src/crypto_wrapper.cpp
+++ /dev/null
@@ -1,998 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* The crypto wrapper source implements the policies for the cipher
- * components used by SSL.
- *
- * The implementation relies on a specfic library, taoCrypt.
- */
-
-#if !defined(USE_CRYPTOPP_LIB)
-
-#include "runtime.hpp"
-#include "crypto_wrapper.hpp"
-#include "cert_wrapper.hpp"
-
-#include "md5.hpp"
-#include "sha.hpp"
-#include "ripemd.hpp"
-#include "hmac.hpp"
-#include "modes.hpp"
-#include "des.hpp"
-#include "arc4.hpp"
-#include "aes.hpp"
-#include "rsa.hpp"
-#include "dsa.hpp"
-#include "dh.hpp"
-#include "random.hpp"
-#include "file.hpp"
-#include "coding.hpp"
-
-
-namespace yaSSL {
-
-
-// MD5 Implementation
-struct MD5::MD5Impl {
- TaoCrypt::MD5 md5_;
- MD5Impl() {}
- explicit MD5Impl(const TaoCrypt::MD5& md5) : md5_(md5) {}
-};
-
-
-MD5::MD5() : pimpl_(NEW_YS MD5Impl) {}
-
-
-MD5::~MD5() { ysDelete(pimpl_); }
-
-
-MD5::MD5(const MD5& that) : Digest(), pimpl_(NEW_YS
- MD5Impl(that.pimpl_->md5_)) {}
-
-
-MD5& MD5::operator=(const MD5& that)
-{
- pimpl_->md5_ = that.pimpl_->md5_;
- return *this;
-}
-
-
-uint MD5::get_digestSize() const
-{
- return MD5_LEN;
-}
-
-
-uint MD5::get_padSize() const
-{
- return PAD_MD5;
-}
-
-
-// Fill out with MD5 digest from in that is sz bytes, out must be >= digest sz
-void MD5::get_digest(byte* out, const byte* in, unsigned int sz)
-{
- pimpl_->md5_.Update(in, sz);
- pimpl_->md5_.Final(out);
-}
-
-// Fill out with MD5 digest from previous updates
-void MD5::get_digest(byte* out)
-{
- pimpl_->md5_.Final(out);
-}
-
-
-// Update the current digest
-void MD5::update(const byte* in, unsigned int sz)
-{
- pimpl_->md5_.Update(in, sz);
-}
-
-
-// SHA Implementation
-struct SHA::SHAImpl {
- TaoCrypt::SHA sha_;
- SHAImpl() {}
- explicit SHAImpl(const TaoCrypt::SHA& sha) : sha_(sha) {}
-};
-
-
-SHA::SHA() : pimpl_(NEW_YS SHAImpl) {}
-
-
-SHA::~SHA() { ysDelete(pimpl_); }
-
-
-SHA::SHA(const SHA& that) : Digest(), pimpl_(NEW_YS SHAImpl(that.pimpl_->sha_)) {}
-
-SHA& SHA::operator=(const SHA& that)
-{
- pimpl_->sha_ = that.pimpl_->sha_;
- return *this;
-}
-
-
-uint SHA::get_digestSize() const
-{
- return SHA_LEN;
-}
-
-
-uint SHA::get_padSize() const
-{
- return PAD_SHA;
-}
-
-
-// Fill out with SHA digest from in that is sz bytes, out must be >= digest sz
-void SHA::get_digest(byte* out, const byte* in, unsigned int sz)
-{
- pimpl_->sha_.Update(in, sz);
- pimpl_->sha_.Final(out);
-}
-
-
-// Fill out with SHA digest from previous updates
-void SHA::get_digest(byte* out)
-{
- pimpl_->sha_.Final(out);
-}
-
-
-// Update the current digest
-void SHA::update(const byte* in, unsigned int sz)
-{
- pimpl_->sha_.Update(in, sz);
-}
-
-
-// RMD-160 Implementation
-struct RMD::RMDImpl {
- TaoCrypt::RIPEMD160 rmd_;
- RMDImpl() {}
- explicit RMDImpl(const TaoCrypt::RIPEMD160& rmd) : rmd_(rmd) {}
-};
-
-
-RMD::RMD() : pimpl_(NEW_YS RMDImpl) {}
-
-
-RMD::~RMD() { ysDelete(pimpl_); }
-
-
-RMD::RMD(const RMD& that) : Digest(), pimpl_(NEW_YS RMDImpl(that.pimpl_->rmd_)) {}
-
-RMD& RMD::operator=(const RMD& that)
-{
- pimpl_->rmd_ = that.pimpl_->rmd_;
- return *this;
-}
-
-
-uint RMD::get_digestSize() const
-{
- return RMD_LEN;
-}
-
-
-uint RMD::get_padSize() const
-{
- return PAD_RMD;
-}
-
-
-// Fill out with RMD digest from in that is sz bytes, out must be >= digest sz
-void RMD::get_digest(byte* out, const byte* in, unsigned int sz)
-{
- pimpl_->rmd_.Update(in, sz);
- pimpl_->rmd_.Final(out);
-}
-
-
-// Fill out with RMD digest from previous updates
-void RMD::get_digest(byte* out)
-{
- pimpl_->rmd_.Final(out);
-}
-
-
-// Update the current digest
-void RMD::update(const byte* in, unsigned int sz)
-{
- pimpl_->rmd_.Update(in, sz);
-}
-
-
-// HMAC_MD5 Implementation
-struct HMAC_MD5::HMAC_MD5Impl {
- TaoCrypt::HMAC<TaoCrypt::MD5> mac_;
- HMAC_MD5Impl() {}
-};
-
-
-HMAC_MD5::HMAC_MD5(const byte* secret, unsigned int len)
- : pimpl_(NEW_YS HMAC_MD5Impl)
-{
- pimpl_->mac_.SetKey(secret, len);
-}
-
-
-HMAC_MD5::~HMAC_MD5() { ysDelete(pimpl_); }
-
-
-uint HMAC_MD5::get_digestSize() const
-{
- return MD5_LEN;
-}
-
-
-uint HMAC_MD5::get_padSize() const
-{
- return PAD_MD5;
-}
-
-
-// Fill out with MD5 digest from in that is sz bytes, out must be >= digest sz
-void HMAC_MD5::get_digest(byte* out, const byte* in, unsigned int sz)
-{
- pimpl_->mac_.Update(in, sz);
- pimpl_->mac_.Final(out);
-}
-
-// Fill out with MD5 digest from previous updates
-void HMAC_MD5::get_digest(byte* out)
-{
- pimpl_->mac_.Final(out);
-}
-
-
-// Update the current digest
-void HMAC_MD5::update(const byte* in, unsigned int sz)
-{
- pimpl_->mac_.Update(in, sz);
-}
-
-
-// HMAC_SHA Implementation
-struct HMAC_SHA::HMAC_SHAImpl {
- TaoCrypt::HMAC<TaoCrypt::SHA> mac_;
- HMAC_SHAImpl() {}
-};
-
-
-HMAC_SHA::HMAC_SHA(const byte* secret, unsigned int len)
- : pimpl_(NEW_YS HMAC_SHAImpl)
-{
- pimpl_->mac_.SetKey(secret, len);
-}
-
-
-HMAC_SHA::~HMAC_SHA() { ysDelete(pimpl_); }
-
-
-uint HMAC_SHA::get_digestSize() const
-{
- return SHA_LEN;
-}
-
-
-uint HMAC_SHA::get_padSize() const
-{
- return PAD_SHA;
-}
-
-
-// Fill out with SHA digest from in that is sz bytes, out must be >= digest sz
-void HMAC_SHA::get_digest(byte* out, const byte* in, unsigned int sz)
-{
- pimpl_->mac_.Update(in, sz);
- pimpl_->mac_.Final(out);
-}
-
-// Fill out with SHA digest from previous updates
-void HMAC_SHA::get_digest(byte* out)
-{
- pimpl_->mac_.Final(out);
-}
-
-
-// Update the current digest
-void HMAC_SHA::update(const byte* in, unsigned int sz)
-{
- pimpl_->mac_.Update(in, sz);
-}
-
-
-
-// HMAC_RMD Implementation
-struct HMAC_RMD::HMAC_RMDImpl {
- TaoCrypt::HMAC<TaoCrypt::RIPEMD160> mac_;
- HMAC_RMDImpl() {}
-};
-
-
-HMAC_RMD::HMAC_RMD(const byte* secret, unsigned int len)
- : pimpl_(NEW_YS HMAC_RMDImpl)
-{
- pimpl_->mac_.SetKey(secret, len);
-}
-
-
-HMAC_RMD::~HMAC_RMD() { ysDelete(pimpl_); }
-
-
-uint HMAC_RMD::get_digestSize() const
-{
- return RMD_LEN;
-}
-
-
-uint HMAC_RMD::get_padSize() const
-{
- return PAD_RMD;
-}
-
-
-// Fill out with RMD digest from in that is sz bytes, out must be >= digest sz
-void HMAC_RMD::get_digest(byte* out, const byte* in, unsigned int sz)
-{
- pimpl_->mac_.Update(in, sz);
- pimpl_->mac_.Final(out);
-}
-
-// Fill out with RMD digest from previous updates
-void HMAC_RMD::get_digest(byte* out)
-{
- pimpl_->mac_.Final(out);
-}
-
-
-// Update the current digest
-void HMAC_RMD::update(const byte* in, unsigned int sz)
-{
- pimpl_->mac_.Update(in, sz);
-}
-
-
-struct DES::DESImpl {
- TaoCrypt::DES_CBC_Encryption encryption;
- TaoCrypt::DES_CBC_Decryption decryption;
-};
-
-
-DES::DES() : pimpl_(NEW_YS DESImpl) {}
-
-DES::~DES() { ysDelete(pimpl_); }
-
-
-void DES::set_encryptKey(const byte* k, const byte* iv)
-{
- pimpl_->encryption.SetKey(k, DES_KEY_SZ, iv);
-}
-
-
-void DES::set_decryptKey(const byte* k, const byte* iv)
-{
- pimpl_->decryption.SetKey(k, DES_KEY_SZ, iv);
-}
-
-// DES encrypt plain of length sz into cipher
-void DES::encrypt(byte* cipher, const byte* plain, unsigned int sz)
-{
- pimpl_->encryption.Process(cipher, plain, sz);
-}
-
-
-// DES decrypt cipher of length sz into plain
-void DES::decrypt(byte* plain, const byte* cipher, unsigned int sz)
-{
- pimpl_->decryption.Process(plain, cipher, sz);
-}
-
-
-struct DES_EDE::DES_EDEImpl {
- TaoCrypt::DES_EDE3_CBC_Encryption encryption;
- TaoCrypt::DES_EDE3_CBC_Decryption decryption;
-};
-
-
-DES_EDE::DES_EDE() : pimpl_(NEW_YS DES_EDEImpl) {}
-
-DES_EDE::~DES_EDE() { ysDelete(pimpl_); }
-
-
-void DES_EDE::set_encryptKey(const byte* k, const byte* iv)
-{
- pimpl_->encryption.SetKey(k, DES_EDE_KEY_SZ, iv);
-}
-
-
-void DES_EDE::set_decryptKey(const byte* k, const byte* iv)
-{
- pimpl_->decryption.SetKey(k, DES_EDE_KEY_SZ, iv);
-}
-
-
-// 3DES encrypt plain of length sz into cipher
-void DES_EDE::encrypt(byte* cipher, const byte* plain, unsigned int sz)
-{
- pimpl_->encryption.Process(cipher, plain, sz);
-}
-
-
-// 3DES decrypt cipher of length sz into plain
-void DES_EDE::decrypt(byte* plain, const byte* cipher, unsigned int sz)
-{
- pimpl_->decryption.Process(plain, cipher, sz);
-}
-
-
-// Implementation of alledged RC4
-struct RC4::RC4Impl {
- TaoCrypt::ARC4::Encryption encryption;
- TaoCrypt::ARC4::Decryption decryption;
-};
-
-
-RC4::RC4() : pimpl_(NEW_YS RC4Impl) {}
-
-RC4::~RC4() { ysDelete(pimpl_); }
-
-
-void RC4::set_encryptKey(const byte* k, const byte*)
-{
- pimpl_->encryption.SetKey(k, RC4_KEY_SZ);
-}
-
-
-void RC4::set_decryptKey(const byte* k, const byte*)
-{
- pimpl_->decryption.SetKey(k, RC4_KEY_SZ);
-}
-
-
-// RC4 encrypt plain of length sz into cipher
-void RC4::encrypt(byte* cipher, const byte* plain, unsigned int sz)
-{
- pimpl_->encryption.Process(cipher, plain, sz);
-}
-
-
-// RC4 decrypt cipher of length sz into plain
-void RC4::decrypt(byte* plain, const byte* cipher, unsigned int sz)
-{
- pimpl_->decryption.Process(plain, cipher, sz);
-}
-
-
-
-// Implementation of AES
-struct AES::AESImpl {
- TaoCrypt::AES_CBC_Encryption encryption;
- TaoCrypt::AES_CBC_Decryption decryption;
- unsigned int keySz_;
-
- AESImpl(unsigned int ks) : keySz_(ks) {}
-};
-
-
-AES::AES(unsigned int ks) : pimpl_(NEW_YS AESImpl(ks)) {}
-
-AES::~AES() { ysDelete(pimpl_); }
-
-
-int AES::get_keySize() const
-{
- return pimpl_->keySz_;
-}
-
-
-void AES::set_encryptKey(const byte* k, const byte* iv)
-{
- pimpl_->encryption.SetKey(k, pimpl_->keySz_, iv);
-}
-
-
-void AES::set_decryptKey(const byte* k, const byte* iv)
-{
- pimpl_->decryption.SetKey(k, pimpl_->keySz_, iv);
-}
-
-
-// AES encrypt plain of length sz into cipher
-void AES::encrypt(byte* cipher, const byte* plain, unsigned int sz)
-{
- pimpl_->encryption.Process(cipher, plain, sz);
-}
-
-
-// AES decrypt cipher of length sz into plain
-void AES::decrypt(byte* plain, const byte* cipher, unsigned int sz)
-{
- pimpl_->decryption.Process(plain, cipher, sz);
-}
-
-
-struct RandomPool::RandomImpl {
- TaoCrypt::RandomNumberGenerator RNG_;
-};
-
-RandomPool::RandomPool() : pimpl_(NEW_YS RandomImpl) {}
-
-RandomPool::~RandomPool() { ysDelete(pimpl_); }
-
-int RandomPool::GetError() const
-{
- return pimpl_->RNG_.GetError();
-}
-
-void RandomPool::Fill(opaque* dst, uint sz) const
-{
- pimpl_->RNG_.GenerateBlock(dst, sz);
-}
-
-
-// Implementation of DSS Authentication
-struct DSS::DSSImpl {
- void SetPublic (const byte*, unsigned int);
- void SetPrivate(const byte*, unsigned int);
- TaoCrypt::DSA_PublicKey publicKey_;
- TaoCrypt::DSA_PrivateKey privateKey_;
-};
-
-
-// Decode and store the public key
-void DSS::DSSImpl::SetPublic(const byte* key, unsigned int sz)
-{
- TaoCrypt::Source source(key, sz);
- publicKey_.Initialize(source);
-}
-
-
-// Decode and store the public key
-void DSS::DSSImpl::SetPrivate(const byte* key, unsigned int sz)
-{
- TaoCrypt::Source source(key, sz);
- privateKey_.Initialize(source);
- publicKey_ = TaoCrypt::DSA_PublicKey(privateKey_);
-
-}
-
-
-// Set public or private key
-DSS::DSS(const byte* key, unsigned int sz, bool publicKey)
- : pimpl_(NEW_YS DSSImpl)
-{
- if (publicKey)
- pimpl_->SetPublic(key, sz);
- else
- pimpl_->SetPrivate(key, sz);
-}
-
-
-DSS::~DSS()
-{
- ysDelete(pimpl_);
-}
-
-
-uint DSS::get_signatureLength() const
-{
- return pimpl_->publicKey_.SignatureLength();
-}
-
-
-// DSS Sign message of length sz into sig
-void DSS::sign(byte* sig, const byte* sha_digest, unsigned int /* shaSz */,
- const RandomPool& random)
-{
- using namespace TaoCrypt;
-
- DSA_Signer signer(pimpl_->privateKey_);
- signer.Sign(sha_digest, sig, random.pimpl_->RNG_);
-}
-
-
-// DSS Verify message of length sz against sig, is it correct?
-bool DSS::verify(const byte* sha_digest, unsigned int /* shaSz */,
- const byte* sig, unsigned int /* sigSz */)
-{
- using namespace TaoCrypt;
-
- DSA_Verifier ver(pimpl_->publicKey_);
- return ver.Verify(sha_digest, sig);
-}
-
-
-// Implementation of RSA key interface
-struct RSA::RSAImpl {
- void SetPublic (const byte*, unsigned int);
- void SetPrivate(const byte*, unsigned int);
- TaoCrypt::RSA_PublicKey publicKey_;
- TaoCrypt::RSA_PrivateKey privateKey_;
-};
-
-
-// Decode and store the public key
-void RSA::RSAImpl::SetPublic(const byte* key, unsigned int sz)
-{
- TaoCrypt::Source source(key, sz);
- publicKey_.Initialize(source);
-}
-
-
-// Decode and store the private key
-void RSA::RSAImpl::SetPrivate(const byte* key, unsigned int sz)
-{
- TaoCrypt::Source source(key, sz);
- privateKey_.Initialize(source);
- publicKey_ = TaoCrypt::RSA_PublicKey(privateKey_);
-}
-
-
-// Set public or private key
-RSA::RSA(const byte* key, unsigned int sz, bool publicKey)
- : pimpl_(NEW_YS RSAImpl)
-{
- if (publicKey)
- pimpl_->SetPublic(key, sz);
- else
- pimpl_->SetPrivate(key, sz);
-}
-
-RSA::~RSA()
-{
- ysDelete(pimpl_);
-}
-
-
-// get cipher text length, varies on key size
-unsigned int RSA::get_cipherLength() const
-{
- return pimpl_->publicKey_.FixedCiphertextLength();
-}
-
-
-// get signautre length, varies on key size
-unsigned int RSA::get_signatureLength() const
-{
- return get_cipherLength();
-}
-
-
-// RSA Sign message of length sz into sig
-void RSA::sign(byte* sig, const byte* message, unsigned int sz,
- const RandomPool& random)
-{
- TaoCrypt::RSAES_Decryptor dec(pimpl_->privateKey_);
- dec.SSL_Sign(message, sz, sig, random.pimpl_->RNG_);
-}
-
-
-// RSA Verify message of length sz against sig
-bool RSA::verify(const byte* message, unsigned int sz, const byte* sig,
- unsigned int)
-{
- TaoCrypt::RSAES_Encryptor enc(pimpl_->publicKey_);
- return enc.SSL_Verify(message, sz, sig);
-}
-
-
-// RSA public encrypt plain of length sz into cipher
-void RSA::encrypt(byte* cipher, const byte* plain, unsigned int sz,
- const RandomPool& random)
-{
-
- TaoCrypt::RSAES_Encryptor enc(pimpl_->publicKey_);
- enc.Encrypt(plain, sz, cipher, random.pimpl_->RNG_);
-}
-
-
-// RSA private decrypt cipher of length sz into plain
-void RSA::decrypt(byte* plain, const byte* cipher, unsigned int sz,
- const RandomPool& random)
-{
- TaoCrypt::RSAES_Decryptor dec(pimpl_->privateKey_);
- dec.Decrypt(cipher, sz, plain, random.pimpl_->RNG_);
-}
-
-
-struct Integer::IntegerImpl {
- TaoCrypt::Integer int_;
-
- IntegerImpl() {}
- explicit IntegerImpl(const TaoCrypt::Integer& i) : int_(i) {}
-};
-
-Integer::Integer() : pimpl_(NEW_YS IntegerImpl) {}
-
-Integer::~Integer() { ysDelete(pimpl_); }
-
-
-
-Integer::Integer(const Integer& other) : pimpl_(NEW_YS
- IntegerImpl(other.pimpl_->int_))
-{}
-
-
-Integer& Integer::operator=(const Integer& that)
-{
- pimpl_->int_ = that.pimpl_->int_;
-
- return *this;
-}
-
-
-void Integer::assign(const byte* num, unsigned int sz)
-{
- pimpl_->int_ = TaoCrypt::Integer(num, sz);
-}
-
-
-struct DiffieHellman::DHImpl {
- TaoCrypt::DH dh_;
- TaoCrypt::RandomNumberGenerator& ranPool_;
- byte* publicKey_;
- byte* privateKey_;
- byte* agreedKey_;
- uint pubKeyLength_;
-
- DHImpl(TaoCrypt::RandomNumberGenerator& r) : ranPool_(r), publicKey_(0),
- privateKey_(0), agreedKey_(0), pubKeyLength_(0) {}
- ~DHImpl()
- {
- ysArrayDelete(agreedKey_);
- ysArrayDelete(privateKey_);
- ysArrayDelete(publicKey_);
- }
-
- DHImpl(const DHImpl& that) : dh_(that.dh_), ranPool_(that.ranPool_),
- publicKey_(0), privateKey_(0), agreedKey_(0), pubKeyLength_(0)
- {
- uint length = dh_.GetByteLength();
- AllocKeys(length, length, length);
- }
-
- void AllocKeys(unsigned int pubSz, unsigned int privSz, unsigned int agrSz)
- {
- publicKey_ = NEW_YS byte[pubSz];
- privateKey_ = NEW_YS byte[privSz];
- agreedKey_ = NEW_YS byte[agrSz];
- }
-};
-
-
-
-/*
-// server Side DH, server's view
-DiffieHellman::DiffieHellman(const char* file, const RandomPool& random)
- : pimpl_(NEW_YS DHImpl(random.pimpl_->RNG_))
-{
- using namespace TaoCrypt;
- Source source;
- FileSource(file, source);
- if (source.size() == 0)
- return; // TODO add error state, and force check
- HexDecoder hd(source);
-
- pimpl_->dh_.Initialize(source);
-
- uint length = pimpl_->dh_.GetByteLength();
-
- pimpl_->AllocKeys(length, length, length);
- pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_,
- pimpl_->publicKey_);
-}
-*/
-
-
-// server Side DH, client's view
-DiffieHellman::DiffieHellman(const byte* p, unsigned int pSz, const byte* g,
- unsigned int gSz, const byte* pub,
- unsigned int pubSz, const RandomPool& random)
- : pimpl_(NEW_YS DHImpl(random.pimpl_->RNG_))
-{
- using TaoCrypt::Integer;
-
- pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref());
- pimpl_->publicKey_ = NEW_YS opaque[pimpl_->pubKeyLength_ = pubSz];
- memcpy(pimpl_->publicKey_, pub, pubSz);
-}
-
-
-// Server Side DH, server's view
-DiffieHellman::DiffieHellman(const Integer& p, const Integer& g,
- const RandomPool& random)
-: pimpl_(NEW_YS DHImpl(random.pimpl_->RNG_))
-{
- using TaoCrypt::Integer;
-
- pimpl_->dh_.Initialize(p.pimpl_->int_, g.pimpl_->int_);
-
- uint length = pimpl_->dh_.GetByteLength();
-
- pimpl_->AllocKeys(length, length, length);
- pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_,
- pimpl_->publicKey_);
-}
-
-DiffieHellman::~DiffieHellman() { ysDelete(pimpl_); }
-
-
-// Client side and view, use server that for p and g
-DiffieHellman::DiffieHellman(const DiffieHellman& that)
- : pimpl_(NEW_YS DHImpl(*that.pimpl_))
-{
- pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_,
- pimpl_->publicKey_);
-}
-
-
-DiffieHellman& DiffieHellman::operator=(const DiffieHellman& that)
-{
- pimpl_->dh_ = that.pimpl_->dh_;
- pimpl_->dh_.GenerateKeyPair(pimpl_->ranPool_, pimpl_->privateKey_,
- pimpl_->publicKey_);
- return *this;
-}
-
-
-void DiffieHellman::makeAgreement(const byte* other, unsigned int otherSz)
-{
- pimpl_->dh_.Agree(pimpl_->agreedKey_, pimpl_->privateKey_, other, otherSz);
-}
-
-
-uint DiffieHellman::get_agreedKeyLength() const
-{
- return pimpl_->dh_.GetByteLength();
-}
-
-
-const byte* DiffieHellman::get_agreedKey() const
-{
- return pimpl_->agreedKey_;
-}
-
-uint DiffieHellman::get_publicKeyLength() const
-{
- return pimpl_->pubKeyLength_;
-}
-
-const byte* DiffieHellman::get_publicKey() const
-{
- return pimpl_->publicKey_;
-}
-
-
-void DiffieHellman::set_sizes(int& pSz, int& gSz, int& pubSz) const
-{
- using TaoCrypt::Integer;
- Integer p = pimpl_->dh_.GetP();
- Integer g = pimpl_->dh_.GetG();
-
- pSz = p.ByteCount();
- gSz = g.ByteCount();
- pubSz = pimpl_->dh_.GetByteLength();
-}
-
-
-void DiffieHellman::get_parms(byte* bp, byte* bg, byte* bpub) const
-{
- using TaoCrypt::Integer;
- Integer p = pimpl_->dh_.GetP();
- Integer g = pimpl_->dh_.GetG();
-
- p.Encode(bp, p.ByteCount());
- g.Encode(bg, g.ByteCount());
- memcpy(bpub, pimpl_->publicKey_, pimpl_->dh_.GetByteLength());
-}
-
-
-// convert PEM file to DER x509 type
-x509* PemToDer(FILE* file, CertType type, EncryptedInfo* info)
-{
- using namespace TaoCrypt;
-
- char header[80];
- char footer[80];
-
- if (type == Cert) {
- strncpy(header, "-----BEGIN CERTIFICATE-----", sizeof(header));
- strncpy(footer, "-----END CERTIFICATE-----", sizeof(footer));
- } else {
- strncpy(header, "-----BEGIN RSA PRIVATE KEY-----", sizeof(header));
- strncpy(footer, "-----END RSA PRIVATE KEY-----", sizeof(header));
- }
-
- long begin = -1;
- long end = 0;
- bool foundEnd = false;
-
- char line[80];
-
- while(fgets(line, sizeof(line), file))
- if (strncmp(header, line, strlen(header)) == 0) {
- begin = ftell(file);
- break;
- }
-
- // remove encrypted header if there
- if (fgets(line, sizeof(line), file)) {
- char encHeader[] = "Proc-Type";
- if (strncmp(encHeader, line, strlen(encHeader)) == 0 &&
- fgets(line,sizeof(line), file)) {
-
- char* start = strstr(line, "DES");
- char* finish = strstr(line, ",");
- if (!start)
- start = strstr(line, "AES");
-
- if (!info) return 0;
-
- if ( start && finish && (start < finish)) {
- memcpy(info->name, start, finish - start);
- info->name[finish - start] = 0;
- memcpy(info->iv, finish + 1, sizeof(info->iv));
-
- char* newline = strstr(line, "\r");
- if (!newline) newline = strstr(line, "\n");
- if (newline && (newline > finish)) {
- info->ivSz = newline - (finish + 1);
- info->set = true;
- }
- }
- begin = ftell(file);
- if (fgets(line,sizeof(line), file)) // get blank line
- begin = ftell(file);
- }
-
- }
-
- while(fgets(line, sizeof(line), file))
- if (strncmp(footer, line, strlen(footer)) == 0) {
- foundEnd = true;
- break;
- }
- else
- end = ftell(file);
-
- if (begin == -1 || !foundEnd)
- return 0;
-
- input_buffer tmp(end - begin);
- fseek(file, begin, SEEK_SET);
- size_t bytes = fread(tmp.get_buffer(), end - begin, 1, file);
- if (bytes != 1)
- return 0;
-
- Source der(tmp.get_buffer(), end - begin);
- Base64Decoder b64Dec(der);
-
- uint sz = der.size();
- mySTL::auto_ptr<x509> x(NEW_YS x509(sz));
- memcpy(x->use_buffer(), der.get_buffer(), sz);
-
- return x.release();
-}
-
-
-} // namespace
-
-#endif // !USE_CRYPTOPP_LIB
diff --git a/extra/yassl/src/dummy.cpp b/extra/yassl/src/dummy.cpp
deleted file mode 100644
index 19b7fe887cd..00000000000
--- a/extra/yassl/src/dummy.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
- To make libtool always use a C++ linker when compiling with yaSSL we need
- to add a dummy C++ file to the source list.
-*/
diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp
deleted file mode 100644
index 91d3d6b5914..00000000000
--- a/extra/yassl/src/handshake.cpp
+++ /dev/null
@@ -1,1203 +0,0 @@
-/*
- Copyright (c) 2005, 2014, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* The handshake source implements functions for creating and reading
- * the various handshake messages.
- */
-
-
-
-#include "runtime.hpp"
-#include "handshake.hpp"
-#include "yassl_int.hpp"
-
-
-namespace yaSSL {
-
-
-
-// Build a client hello message from cipher suites and compression method
-void buildClientHello(SSL& ssl, ClientHello& hello)
-{
- // store for pre master secret
- ssl.useSecurity().use_connection().chVersion_ = hello.client_version_;
-
- ssl.getCrypto().get_random().Fill(hello.random_, RAN_LEN);
- if (ssl.getSecurity().get_resuming()) {
- hello.id_len_ = ID_LEN;
- memcpy(hello.session_id_, ssl.getSecurity().get_resume().GetID(),
- ID_LEN);
- }
- else
- hello.id_len_ = 0;
- hello.suite_len_ = ssl.getSecurity().get_parms().suites_size_;
- memcpy(hello.cipher_suites_, ssl.getSecurity().get_parms().suites_,
- hello.suite_len_);
- hello.comp_len_ = 1;
-
- hello.set_length(sizeof(ProtocolVersion) +
- RAN_LEN +
- hello.id_len_ + sizeof(hello.id_len_) +
- hello.suite_len_ + sizeof(hello.suite_len_) +
- hello.comp_len_ + sizeof(hello.comp_len_));
-}
-
-
-// Build a server hello message
-void buildServerHello(SSL& ssl, ServerHello& hello)
-{
- if (ssl.getSecurity().get_resuming()) {
- memcpy(hello.random_,ssl.getSecurity().get_connection().server_random_,
- RAN_LEN);
- memcpy(hello.session_id_, ssl.getSecurity().get_resume().GetID(),
- ID_LEN);
- }
- else {
- ssl.getCrypto().get_random().Fill(hello.random_, RAN_LEN);
- ssl.getCrypto().get_random().Fill(hello.session_id_, ID_LEN);
- }
- hello.id_len_ = ID_LEN;
- ssl.set_sessionID(hello.session_id_);
-
- hello.cipher_suite_[0] = ssl.getSecurity().get_parms().suite_[0];
- hello.cipher_suite_[1] = ssl.getSecurity().get_parms().suite_[1];
- hello.compression_method_ = hello.compression_method_;
-
- hello.set_length(sizeof(ProtocolVersion) + RAN_LEN + ID_LEN +
- sizeof(hello.id_len_) + SUITE_LEN + SIZEOF_ENUM);
-}
-
-
-// add handshake from buffer into md5 and sha hashes, use handshake header
-void hashHandShake(SSL& ssl, const input_buffer& input, uint sz)
-{
- const opaque* buffer = input.get_buffer() + input.get_current() -
- HANDSHAKE_HEADER;
- sz += HANDSHAKE_HEADER;
- ssl.useHashes().use_MD5().update(buffer, sz);
- ssl.useHashes().use_SHA().update(buffer, sz);
-}
-
-
-// locals
-namespace {
-
-// Write a plaintext record to buffer
-void buildOutput(output_buffer& buffer, const RecordLayerHeader& rlHdr,
- const Message& msg)
-{
- buffer.allocate(RECORD_HEADER + rlHdr.length_);
- buffer << rlHdr << msg;
-}
-
-
-// Write a plaintext record to buffer
-void buildOutput(output_buffer& buffer, const RecordLayerHeader& rlHdr,
- const HandShakeHeader& hsHdr, const HandShakeBase& shake)
-{
- buffer.allocate(RECORD_HEADER + rlHdr.length_);
- buffer << rlHdr << hsHdr << shake;
-}
-
-
-// Build Record Layer header for Message without handshake header
-void buildHeader(SSL& ssl, RecordLayerHeader& rlHeader, const Message& msg)
-{
- ProtocolVersion pv = ssl.getSecurity().get_connection().version_;
- rlHeader.type_ = msg.get_type();
- rlHeader.version_.major_ = pv.major_;
- rlHeader.version_.minor_ = pv.minor_;
- rlHeader.length_ = msg.get_length();
-}
-
-
-// Build HandShake and RecordLayer Headers for handshake output
-void buildHeaders(SSL& ssl, HandShakeHeader& hsHeader,
- RecordLayerHeader& rlHeader, const HandShakeBase& shake)
-{
- int sz = shake.get_length();
-
- hsHeader.set_type(shake.get_type());
- hsHeader.set_length(sz);
-
- ProtocolVersion pv = ssl.getSecurity().get_connection().version_;
- rlHeader.type_ = handshake;
- rlHeader.version_.major_ = pv.major_;
- rlHeader.version_.minor_ = pv.minor_;
- rlHeader.length_ = sz + HANDSHAKE_HEADER;
-}
-
-
-// add handshake from buffer into md5 and sha hashes, exclude record header
-void hashHandShake(SSL& ssl, const output_buffer& output, bool removeIV = false)
-{
- uint sz = output.get_size() - RECORD_HEADER;
-
- const opaque* buffer = output.get_buffer() + RECORD_HEADER;
-
- if (removeIV) { // TLSv1_1 IV
- uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
- sz -= blockSz;
- buffer += blockSz;
- }
-
- ssl.useHashes().use_MD5().update(buffer, sz);
- ssl.useHashes().use_SHA().update(buffer, sz);
-}
-
-
-// calculate MD5 hash for finished
-void buildMD5(SSL& ssl, Finished& fin, const opaque* sender)
-{
-
- opaque md5_result[MD5_LEN];
- opaque md5_inner[SIZEOF_SENDER + SECRET_LEN + PAD_MD5];
- opaque md5_outer[SECRET_LEN + PAD_MD5 + MD5_LEN];
-
- const opaque* master_secret =
- ssl.getSecurity().get_connection().master_secret_;
-
- // make md5 inner
- memcpy(md5_inner, sender, SIZEOF_SENDER);
- memcpy(&md5_inner[SIZEOF_SENDER], master_secret, SECRET_LEN);
- memcpy(&md5_inner[SIZEOF_SENDER + SECRET_LEN], PAD1, PAD_MD5);
-
- ssl.useHashes().use_MD5().get_digest(md5_result, md5_inner,
- sizeof(md5_inner));
-
- // make md5 outer
- memcpy(md5_outer, master_secret, SECRET_LEN);
- memcpy(&md5_outer[SECRET_LEN], PAD2, PAD_MD5);
- memcpy(&md5_outer[SECRET_LEN + PAD_MD5], md5_result, MD5_LEN);
-
- ssl.useHashes().use_MD5().get_digest(fin.set_md5(), md5_outer,
- sizeof(md5_outer));
-}
-
-
-// calculate SHA hash for finished
-void buildSHA(SSL& ssl, Finished& fin, const opaque* sender)
-{
-
- opaque sha_result[SHA_LEN];
- opaque sha_inner[SIZEOF_SENDER + SECRET_LEN + PAD_SHA];
- opaque sha_outer[SECRET_LEN + PAD_SHA + SHA_LEN];
-
- const opaque* master_secret =
- ssl.getSecurity().get_connection().master_secret_;
-
- // make sha inner
- memcpy(sha_inner, sender, SIZEOF_SENDER);
- memcpy(&sha_inner[SIZEOF_SENDER], master_secret, SECRET_LEN);
- memcpy(&sha_inner[SIZEOF_SENDER + SECRET_LEN], PAD1, PAD_SHA);
-
- ssl.useHashes().use_SHA().get_digest(sha_result, sha_inner,
- sizeof(sha_inner));
-
- // make sha outer
- memcpy(sha_outer, master_secret, SECRET_LEN);
- memcpy(&sha_outer[SECRET_LEN], PAD2, PAD_SHA);
- memcpy(&sha_outer[SECRET_LEN + PAD_SHA], sha_result, SHA_LEN);
-
- ssl.useHashes().use_SHA().get_digest(fin.set_sha(), sha_outer,
- sizeof(sha_outer));
-}
-
-
-// sanity checks on encrypted message size
-static int sanity_check_message(SSL& ssl, uint msgSz)
-{
- uint minSz = 0;
-
- if (ssl.getSecurity().get_parms().cipher_type_ == block) {
- uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
- if (msgSz % blockSz)
- return -1;
-
- minSz = ssl.getSecurity().get_parms().hash_size_ + 1; // pad byte too
- if (blockSz > minSz)
- minSz = blockSz;
-
- if (ssl.isTLSv1_1())
- minSz += blockSz; // explicit IV
- }
- else { // stream
- minSz = ssl.getSecurity().get_parms().hash_size_;
- }
-
- if (msgSz < minSz)
- return -1;
-
- return 0;
-}
-
-
-// decrypt input message in place, store size in case needed later
-void decrypt_message(SSL& ssl, input_buffer& input, uint sz)
-{
- input_buffer plain(sz);
- opaque* cipher = input.get_buffer() + input.get_current();
-
- if (sanity_check_message(ssl, sz) != 0) {
- ssl.SetError(sanityCipher_error);
- return;
- }
-
- ssl.useCrypto().use_cipher().decrypt(plain.get_buffer(), cipher, sz);
- memcpy(cipher, plain.get_buffer(), sz);
- ssl.useSecurity().use_parms().encrypt_size_ = sz;
-
- if (ssl.isTLSv1_1()) // IV
- input.set_current(input.get_current() +
- ssl.getCrypto().get_cipher().get_blockSize());
-}
-
-
-// output operator for input_buffer
-output_buffer& operator<<(output_buffer& output, const input_buffer& input)
-{
- output.write(input.get_buffer(), input.get_size());
- return output;
-}
-
-
-// write headers, handshake hash, mac, pad, and encrypt
-void cipherFinished(SSL& ssl, Finished& fin, output_buffer& output)
-{
- uint digestSz = ssl.getCrypto().get_digest().get_digestSize();
- uint finishedSz = ssl.isTLS() ? TLS_FINISHED_SZ : FINISHED_SZ;
- uint sz = RECORD_HEADER + HANDSHAKE_HEADER + finishedSz + digestSz;
- uint pad = 0;
- uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
-
- if (ssl.getSecurity().get_parms().cipher_type_ == block) {
- if (ssl.isTLSv1_1())
- sz += blockSz; // IV
- sz += 1; // pad byte
- pad = (sz - RECORD_HEADER) % blockSz;
- pad = blockSz - pad;
- sz += pad;
- }
-
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- buildHeaders(ssl, hsHeader, rlHeader, fin);
- rlHeader.length_ = sz - RECORD_HEADER; // record header includes mac
- // and pad, hanshake doesn't
- input_buffer iv;
- if (ssl.isTLSv1_1() && ssl.getSecurity().get_parms().cipher_type_== block){
- iv.allocate(blockSz);
- ssl.getCrypto().get_random().Fill(iv.get_buffer(), blockSz);
- iv.add_size(blockSz);
- }
- uint ivSz = iv.get_size();
- output.allocate(sz);
- output << rlHeader << iv << hsHeader << fin;
-
- hashHandShake(ssl, output, ssl.isTLSv1_1() ? true : false);
- opaque digest[SHA_LEN]; // max size
- if (ssl.isTLS())
- TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER + ivSz,
- output.get_size() - RECORD_HEADER - ivSz, handshake);
- else
- hmac(ssl, digest, output.get_buffer() + RECORD_HEADER,
- output.get_size() - RECORD_HEADER, handshake);
- output.write(digest, digestSz);
-
- if (ssl.getSecurity().get_parms().cipher_type_ == block)
- for (uint i = 0; i <= pad; i++) output[AUTO] = pad; // pad byte gets
- // pad value too
- input_buffer cipher(rlHeader.length_);
- ssl.useCrypto().use_cipher().encrypt(cipher.get_buffer(),
- output.get_buffer() + RECORD_HEADER, output.get_size() - RECORD_HEADER);
- output.set_current(RECORD_HEADER);
- output.write(cipher.get_buffer(), cipher.get_capacity());
-}
-
-
-// build an encrypted data or alert message for output
-void buildMessage(SSL& ssl, output_buffer& output, const Message& msg)
-{
- uint digestSz = ssl.getCrypto().get_digest().get_digestSize();
- uint sz = RECORD_HEADER + msg.get_length() + digestSz;
- uint pad = 0;
- uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
-
- if (ssl.getSecurity().get_parms().cipher_type_ == block) {
- if (ssl.isTLSv1_1()) // IV
- sz += blockSz;
- sz += 1; // pad byte
- pad = (sz - RECORD_HEADER) % blockSz;
- pad = blockSz - pad;
- sz += pad;
- }
-
- RecordLayerHeader rlHeader;
- buildHeader(ssl, rlHeader, msg);
- rlHeader.length_ = sz - RECORD_HEADER; // record header includes mac
- // and pad, hanshake doesn't
- input_buffer iv;
- if (ssl.isTLSv1_1() && ssl.getSecurity().get_parms().cipher_type_== block){
- iv.allocate(blockSz);
- ssl.getCrypto().get_random().Fill(iv.get_buffer(), blockSz);
- iv.add_size(blockSz);
- }
-
- uint ivSz = iv.get_size();
- output.allocate(sz);
- output << rlHeader << iv << msg;
-
- opaque digest[SHA_LEN]; // max size
- if (ssl.isTLS())
- TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER + ivSz,
- output.get_size() - RECORD_HEADER - ivSz, msg.get_type());
- else
- hmac(ssl, digest, output.get_buffer() + RECORD_HEADER,
- output.get_size() - RECORD_HEADER, msg.get_type());
- output.write(digest, digestSz);
-
- if (ssl.getSecurity().get_parms().cipher_type_ == block)
- for (uint i = 0; i <= pad; i++) output[AUTO] = pad; // pad byte gets
- // pad value too
- input_buffer cipher(rlHeader.length_);
- ssl.useCrypto().use_cipher().encrypt(cipher.get_buffer(),
- output.get_buffer() + RECORD_HEADER, output.get_size() - RECORD_HEADER);
- output.set_current(RECORD_HEADER);
- output.write(cipher.get_buffer(), cipher.get_capacity());
-}
-
-
-// build alert message
-void buildAlert(SSL& ssl, output_buffer& output, const Alert& alert)
-{
- if (ssl.getSecurity().get_parms().pending_ == false) // encrypted
- buildMessage(ssl, output, alert);
- else {
- RecordLayerHeader rlHeader;
- buildHeader(ssl, rlHeader, alert);
- buildOutput(output, rlHeader, alert);
- }
-}
-
-
-// build TLS finished message
-void buildFinishedTLS(SSL& ssl, Finished& fin, const opaque* sender)
-{
- opaque handshake_hash[FINISHED_SZ];
-
- ssl.useHashes().use_MD5().get_digest(handshake_hash);
- ssl.useHashes().use_SHA().get_digest(&handshake_hash[MD5_LEN]);
-
- const opaque* side;
- if ( strncmp((const char*)sender, (const char*)client, SIZEOF_SENDER) == 0)
- side = tls_client;
- else
- side = tls_server;
-
- PRF(fin.set_md5(), TLS_FINISHED_SZ,
- ssl.getSecurity().get_connection().master_secret_, SECRET_LEN,
- side, FINISHED_LABEL_SZ,
- handshake_hash, FINISHED_SZ);
-
- fin.set_length(TLS_FINISHED_SZ); // shorter length for TLS
-}
-
-
-// compute p_hash for MD5 or SHA-1 for TLSv1 PRF
-void p_hash(output_buffer& result, const output_buffer& secret,
- const output_buffer& seed, MACAlgorithm hash)
-{
- uint len = hash == md5 ? MD5_LEN : SHA_LEN;
- uint times = result.get_capacity() / len;
- uint lastLen = result.get_capacity() % len;
- opaque previous[SHA_LEN]; // max size
- opaque current[SHA_LEN]; // max size
- mySTL::auto_ptr<Digest> hmac;
-
- if (lastLen) times += 1;
-
- if (hash == md5)
- hmac.reset(NEW_YS HMAC_MD5(secret.get_buffer(), secret.get_size()));
- else
- hmac.reset(NEW_YS HMAC_SHA(secret.get_buffer(), secret.get_size()));
- // A0 = seed
- hmac->get_digest(previous, seed.get_buffer(), seed.get_size());// A1
- uint lastTime = times - 1;
-
- for (uint i = 0; i < times; i++) {
- hmac->update(previous, len);
- hmac->get_digest(current, seed.get_buffer(), seed.get_size());
-
- if (lastLen && (i == lastTime))
- result.write(current, lastLen);
- else {
- result.write(current, len);
- //memcpy(previous, current, len);
- hmac->get_digest(previous, previous, len);
- }
- }
-}
-
-
-// calculate XOR for TLSv1 PRF
-void get_xor(byte *digest, uint digLen, output_buffer& md5,
- output_buffer& sha)
-{
- for (uint i = 0; i < digLen; i++)
- digest[i] = md5[AUTO] ^ sha[AUTO];
-}
-
-
-// build MD5 part of certificate verify
-void buildMD5_CertVerify(SSL& ssl, byte* digest)
-{
- opaque md5_result[MD5_LEN];
- opaque md5_inner[SECRET_LEN + PAD_MD5];
- opaque md5_outer[SECRET_LEN + PAD_MD5 + MD5_LEN];
-
- const opaque* master_secret =
- ssl.getSecurity().get_connection().master_secret_;
-
- // make md5 inner
- memcpy(md5_inner, master_secret, SECRET_LEN);
- memcpy(&md5_inner[SECRET_LEN], PAD1, PAD_MD5);
-
- ssl.useHashes().use_MD5().get_digest(md5_result, md5_inner,
- sizeof(md5_inner));
-
- // make md5 outer
- memcpy(md5_outer, master_secret, SECRET_LEN);
- memcpy(&md5_outer[SECRET_LEN], PAD2, PAD_MD5);
- memcpy(&md5_outer[SECRET_LEN + PAD_MD5], md5_result, MD5_LEN);
-
- ssl.useHashes().use_MD5().get_digest(digest, md5_outer, sizeof(md5_outer));
-}
-
-
-// build SHA part of certificate verify
-void buildSHA_CertVerify(SSL& ssl, byte* digest)
-{
- opaque sha_result[SHA_LEN];
- opaque sha_inner[SECRET_LEN + PAD_SHA];
- opaque sha_outer[SECRET_LEN + PAD_SHA + SHA_LEN];
-
- const opaque* master_secret =
- ssl.getSecurity().get_connection().master_secret_;
-
- // make sha inner
- memcpy(sha_inner, master_secret, SECRET_LEN);
- memcpy(&sha_inner[SECRET_LEN], PAD1, PAD_SHA);
-
- ssl.useHashes().use_SHA().get_digest(sha_result, sha_inner,
- sizeof(sha_inner));
-
- // make sha outer
- memcpy(sha_outer, master_secret, SECRET_LEN);
- memcpy(&sha_outer[SECRET_LEN], PAD2, PAD_SHA);
- memcpy(&sha_outer[SECRET_LEN + PAD_SHA], sha_result, SHA_LEN);
-
- ssl.useHashes().use_SHA().get_digest(digest, sha_outer, sizeof(sha_outer));
-}
-
-
-} // namespace for locals
-
-
-// some clients still send sslv2 client hello
-void ProcessOldClientHello(input_buffer& input, SSL& ssl)
-{
- if (input.get_error() || input.get_remaining() < 2) {
- ssl.SetError(bad_input);
- return;
- }
- byte b0 = input[AUTO];
- byte b1 = input[AUTO];
-
- uint16 sz = ((b0 & 0x7f) << 8) | b1;
-
- if (sz > input.get_remaining()) {
- ssl.SetError(bad_input);
- return;
- }
-
- // hashHandShake manually
- const opaque* buffer = input.get_buffer() + input.get_current();
- ssl.useHashes().use_MD5().update(buffer, sz);
- ssl.useHashes().use_SHA().update(buffer, sz);
-
- b1 = input[AUTO]; // does this value mean client_hello?
-
- ClientHello ch;
- ch.client_version_.major_ = input[AUTO];
- ch.client_version_.minor_ = input[AUTO];
-
- byte len[2];
-
- len[0] = input[AUTO];
- len[1] = input[AUTO];
- ato16(len, ch.suite_len_);
-
- len[0] = input[AUTO];
- len[1] = input[AUTO];
- uint16 sessionLen;
- ato16(len, sessionLen);
- ch.id_len_ = sessionLen;
-
- len[0] = input[AUTO];
- len[1] = input[AUTO];
- uint16 randomLen;
- ato16(len, randomLen);
-
- if (input.get_error() || ch.suite_len_ > MAX_SUITE_SZ ||
- ch.suite_len_ > input.get_remaining() ||
- sessionLen > ID_LEN || randomLen > RAN_LEN) {
- ssl.SetError(bad_input);
- return;
- }
-
- int j = 0;
- for (uint16 i = 0; i < ch.suite_len_; i += 3) {
- byte first = input[AUTO];
- if (first) // sslv2 type
- input.read(len, SUITE_LEN); // skip
- else {
- input.read(&ch.cipher_suites_[j], SUITE_LEN);
- j += SUITE_LEN;
- }
- }
- ch.suite_len_ = j;
-
- if (ch.id_len_)
- input.read(ch.session_id_, ch.id_len_); // id_len_ from sessionLen
-
- if (randomLen < RAN_LEN)
- memset(ch.random_, 0, RAN_LEN - randomLen);
- input.read(&ch.random_[RAN_LEN - randomLen], randomLen);
-
- ch.Process(input, ssl);
-}
-
-
-// Build a finished message, see 7.6.9
-void buildFinished(SSL& ssl, Finished& fin, const opaque* sender)
-{
- // store current states, building requires get_digest which resets state
- MD5 md5(ssl.getHashes().get_MD5());
- SHA sha(ssl.getHashes().get_SHA());
-
- if (ssl.isTLS())
- buildFinishedTLS(ssl, fin, sender);
- else {
- buildMD5(ssl, fin, sender);
- buildSHA(ssl, fin, sender);
- }
-
- // restore
- ssl.useHashes().use_MD5() = md5;
- ssl.useHashes().use_SHA() = sha;
-}
-
-
-/* compute SSLv3 HMAC into digest see
- * buffer is of sz size and includes HandShake Header but not a Record Header
- * verify means to check peers hmac
-*/
-void hmac(SSL& ssl, byte* digest, const byte* buffer, uint sz,
- ContentType content, bool verify)
-{
- Digest& mac = ssl.useCrypto().use_digest();
- opaque inner[SHA_LEN + PAD_MD5 + SEQ_SZ + SIZEOF_ENUM + LENGTH_SZ];
- opaque outer[SHA_LEN + PAD_MD5 + SHA_LEN];
- opaque result[SHA_LEN]; // max possible sizes
- uint digestSz = mac.get_digestSize(); // actual sizes
- uint padSz = mac.get_padSize();
- uint innerSz = digestSz + padSz + SEQ_SZ + SIZEOF_ENUM + LENGTH_SZ;
- uint outerSz = digestSz + padSz + digestSz;
-
- // data
- const opaque* mac_secret = ssl.get_macSecret(verify);
- opaque seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 };
- opaque length[LENGTH_SZ];
- c16toa(sz, length);
- c32toa(ssl.get_SEQIncrement(verify), &seq[sizeof(uint32)]);
-
- // make inner
- memcpy(inner, mac_secret, digestSz);
- memcpy(&inner[digestSz], PAD1, padSz);
- memcpy(&inner[digestSz + padSz], seq, SEQ_SZ);
- inner[digestSz + padSz + SEQ_SZ] = content;
- memcpy(&inner[digestSz + padSz + SEQ_SZ + SIZEOF_ENUM], length, LENGTH_SZ);
-
- mac.update(inner, innerSz);
- mac.get_digest(result, buffer, sz); // append content buffer
-
- // make outer
- memcpy(outer, mac_secret, digestSz);
- memcpy(&outer[digestSz], PAD2, padSz);
- memcpy(&outer[digestSz + padSz], result, digestSz);
-
- mac.get_digest(digest, outer, outerSz);
-}
-
-
-// TLS type HAMC
-void TLS_hmac(SSL& ssl, byte* digest, const byte* buffer, uint sz,
- ContentType content, bool verify)
-{
- mySTL::auto_ptr<Digest> hmac;
- opaque seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 };
- opaque length[LENGTH_SZ];
- opaque inner[SIZEOF_ENUM + VERSION_SZ + LENGTH_SZ]; // type + version + len
-
- c16toa(sz, length);
- c32toa(ssl.get_SEQIncrement(verify), &seq[sizeof(uint32)]);
-
- MACAlgorithm algo = ssl.getSecurity().get_parms().mac_algorithm_;
-
- if (algo == sha)
- hmac.reset(NEW_YS HMAC_SHA(ssl.get_macSecret(verify), SHA_LEN));
- else if (algo == rmd)
- hmac.reset(NEW_YS HMAC_RMD(ssl.get_macSecret(verify), RMD_LEN));
- else
- hmac.reset(NEW_YS HMAC_MD5(ssl.get_macSecret(verify), MD5_LEN));
-
- hmac->update(seq, SEQ_SZ); // seq_num
- inner[0] = content; // type
- inner[SIZEOF_ENUM] = ssl.getSecurity().get_connection().version_.major_;
- inner[SIZEOF_ENUM + SIZEOF_ENUM] =
- ssl.getSecurity().get_connection().version_.minor_; // version
- memcpy(&inner[SIZEOF_ENUM + VERSION_SZ], length, LENGTH_SZ); // length
- hmac->update(inner, sizeof(inner));
- hmac->get_digest(digest, buffer, sz); // content
-}
-
-
-// compute TLSv1 PRF (pseudo random function using HMAC)
-void PRF(byte* digest, uint digLen, const byte* secret, uint secLen,
- const byte* label, uint labLen, const byte* seed, uint seedLen)
-{
- uint half = (secLen + 1) / 2;
-
- output_buffer md5_half(half);
- output_buffer sha_half(half);
- output_buffer labelSeed(labLen + seedLen);
-
- md5_half.write(secret, half);
- sha_half.write(secret + half - secLen % 2, half);
- labelSeed.write(label, labLen);
- labelSeed.write(seed, seedLen);
-
- output_buffer md5_result(digLen);
- output_buffer sha_result(digLen);
-
- p_hash(md5_result, md5_half, labelSeed, md5);
- p_hash(sha_result, sha_half, labelSeed, sha);
-
- md5_result.set_current(0);
- sha_result.set_current(0);
- get_xor(digest, digLen, md5_result, sha_result);
-}
-
-
-// build certificate hashes
-void build_certHashes(SSL& ssl, Hashes& hashes)
-{
- // store current states, building requires get_digest which resets state
- MD5 md5(ssl.getHashes().get_MD5());
- SHA sha(ssl.getHashes().get_SHA());
-
- if (ssl.isTLS()) {
- ssl.useHashes().use_MD5().get_digest(hashes.md5_);
- ssl.useHashes().use_SHA().get_digest(hashes.sha_);
- }
- else {
- buildMD5_CertVerify(ssl, hashes.md5_);
- buildSHA_CertVerify(ssl, hashes.sha_);
- }
-
- // restore
- ssl.useHashes().use_MD5() = md5;
- ssl.useHashes().use_SHA() = sha;
-}
-
-
-
-// do process input requests, return 0 is done, 1 is call again to complete
-int DoProcessReply(SSL& ssl)
-{
- // wait for input if blocking
- if (!ssl.useSocket().wait()) {
- ssl.SetError(receive_error);
- return 0;
- }
- uint ready = ssl.getSocket().get_ready();
- if (!ready)
- ready= 64;
-
- // add buffered data if its there
- input_buffer* buffered = ssl.useBuffers().TakeRawInput();
- uint buffSz = buffered ? buffered->get_size() : 0;
- input_buffer buffer(buffSz + ready);
- if (buffSz) {
- buffer.assign(buffered->get_buffer(), buffSz);
- ysDelete(buffered);
- buffered = 0;
- }
-
- // add new data
- uint read = ssl.useSocket().receive(buffer.get_buffer() + buffSz, ready);
- if (read == static_cast<uint>(-1)) {
- ssl.SetError(receive_error);
- return 0;
- }
- buffer.add_size(read);
- uint offset = 0;
- const MessageFactory& mf = ssl.getFactory().getMessage();
-
- // old style sslv2 client hello?
- if (ssl.getSecurity().get_parms().entity_ == server_end &&
- ssl.getStates().getServer() == clientNull)
- if (buffer.peek() != handshake) {
- ProcessOldClientHello(buffer, ssl);
- if (ssl.GetError())
- return 0;
- }
-
- while(!buffer.eof()) {
- // each record
- RecordLayerHeader hdr;
- bool needHdr = false;
-
- if (static_cast<uint>(RECORD_HEADER) > buffer.get_remaining())
- needHdr = true;
- else {
- buffer >> hdr;
- /*
- According to RFC 4346 (see "7.4.1.3. Server Hello"), the Server Hello
- packet needs to specify the highest supported TLS version, but not
- higher than what client requests. YaSSL highest supported version is
- TLSv1.1 (=3.2) - if the client requests a higher version, downgrade it
- here to 3.2.
- See also Appendix E of RFC 5246 (TLS 1.2)
- */
- if (hdr.version_.major_ == 3 && hdr.version_.minor_ > 2)
- hdr.version_.minor_ = 2;
- ssl.verifyState(hdr);
- }
-
- if (ssl.GetError())
- return 0;
-
- // make sure we have enough input in buffer to process this record
- if (needHdr || hdr.length_ > buffer.get_remaining()) {
- // put header in front for next time processing
- uint extra = needHdr ? 0 : RECORD_HEADER;
- uint sz = buffer.get_remaining() + extra;
- ssl.useBuffers().SetRawInput(NEW_YS input_buffer(sz,
- buffer.get_buffer() + buffer.get_current() - extra, sz));
- return 1;
- }
-
- while (buffer.get_current() < hdr.length_ + RECORD_HEADER + offset) {
- // each message in record, can be more than 1 if not encrypted
- if (ssl.GetError())
- return 0;
-
- if (ssl.getSecurity().get_parms().pending_ == false) { // cipher on
- // sanity check for malicious/corrupted/illegal input
- if (buffer.get_remaining() < hdr.length_) {
- ssl.SetError(bad_input);
- return 0;
- }
- decrypt_message(ssl, buffer, hdr.length_);
- if (ssl.GetError())
- return 0;
- }
-
- mySTL::auto_ptr<Message> msg(mf.CreateObject(hdr.type_));
- if (!msg.get()) {
- ssl.SetError(factory_error);
- return 0;
- }
- buffer >> *msg;
- msg->Process(buffer, ssl);
- if (ssl.GetError())
- return 0;
- }
- offset += hdr.length_ + RECORD_HEADER;
- }
- return 0;
-}
-
-
-// process input requests
-void processReply(SSL& ssl)
-{
- if (ssl.GetError()) return;
-
- if (DoProcessReply(ssl)) {
- // didn't complete process
- if (!ssl.getSocket().IsNonBlocking()) {
- // keep trying now, blocking ok
- while (!ssl.GetError())
- if (DoProcessReply(ssl) == 0) break;
- }
- else
- // user will have try again later, non blocking
- ssl.SetError(YasslError(SSL_ERROR_WANT_READ));
- }
-}
-
-
-// send client_hello, no buffering
-void sendClientHello(SSL& ssl)
-{
- ssl.verifyState(serverNull);
- if (ssl.GetError()) return;
-
- ClientHello ch(ssl.getSecurity().get_connection().version_,
- ssl.getSecurity().get_connection().compression_);
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- output_buffer out;
-
- buildClientHello(ssl, ch);
- ssl.set_random(ch.get_random(), client_end);
- buildHeaders(ssl, hsHeader, rlHeader, ch);
- buildOutput(out, rlHeader, hsHeader, ch);
- hashHandShake(ssl, out);
-
- ssl.Send(out.get_buffer(), out.get_size());
-}
-
-
-// send client key exchange
-void sendClientKeyExchange(SSL& ssl, BufferOutput buffer)
-{
- ssl.verifyState(serverHelloDoneComplete);
- if (ssl.GetError()) return;
-
- ClientKeyExchange ck(ssl);
- ck.build(ssl);
- ssl.makeMasterSecret();
-
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
- buildHeaders(ssl, hsHeader, rlHeader, ck);
- buildOutput(*out.get(), rlHeader, hsHeader, ck);
- hashHandShake(ssl, *out.get());
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send server key exchange
-void sendServerKeyExchange(SSL& ssl, BufferOutput buffer)
-{
- if (ssl.GetError()) return;
- ServerKeyExchange sk(ssl);
- sk.build(ssl);
- if (ssl.GetError()) return;
-
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
- buildHeaders(ssl, hsHeader, rlHeader, sk);
- buildOutput(*out.get(), rlHeader, hsHeader, sk);
- hashHandShake(ssl, *out.get());
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send change cipher
-void sendChangeCipher(SSL& ssl, BufferOutput buffer)
-{
- if (ssl.getSecurity().get_parms().entity_ == server_end) {
- if (ssl.getSecurity().get_resuming())
- ssl.verifyState(clientKeyExchangeComplete);
- else
- ssl.verifyState(clientFinishedComplete);
- }
- if (ssl.GetError()) return;
-
- ChangeCipherSpec ccs;
- RecordLayerHeader rlHeader;
- buildHeader(ssl, rlHeader, ccs);
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
- buildOutput(*out.get(), rlHeader, ccs);
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send finished
-void sendFinished(SSL& ssl, ConnectionEnd side, BufferOutput buffer)
-{
- if (ssl.GetError()) return;
-
- Finished fin;
- buildFinished(ssl, fin, side == client_end ? client : server);
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
- cipherFinished(ssl, fin, *out.get()); // hashes handshake
-
- if (ssl.getSecurity().get_resuming()) {
- if (side == server_end)
- buildFinished(ssl, ssl.useHashes().use_verify(), client); // client
- }
- else {
- if (!ssl.getSecurity().GetContext()->GetSessionCacheOff())
- GetSessions().add(ssl); // store session
- if (side == client_end)
- buildFinished(ssl, ssl.useHashes().use_verify(), server); // server
- }
- ssl.useSecurity().use_connection().CleanMaster();
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send data
-int sendData(SSL& ssl, const void* buffer, int sz)
-{
- int sent = 0;
-
- if (ssl.GetError() == YasslError(SSL_ERROR_WANT_READ))
- ssl.SetError(no_error);
-
- if (ssl.GetError() == YasslError(SSL_ERROR_WANT_WRITE)) {
- ssl.SetError(no_error);
- ssl.SendWriteBuffered();
- if (!ssl.GetError()) {
- // advance sent to prvevious sent + plain size just sent
- sent = ssl.useBuffers().prevSent + ssl.useBuffers().plainSz;
- }
- }
-
- ssl.verfiyHandShakeComplete();
- if (ssl.GetError()) return -1;
-
- for (;;) {
- int len = min(sz - sent, MAX_RECORD_SIZE);
- output_buffer out;
- input_buffer tmp;
-
- Data data;
-
- if (sent == sz) break;
-
- if (ssl.CompressionOn()) {
- if (Compress(static_cast<const opaque*>(buffer) + sent, len,
- tmp) == -1) {
- ssl.SetError(compress_error);
- return -1;
- }
- data.SetData(tmp.get_size(), tmp.get_buffer());
- }
- else
- data.SetData(len, static_cast<const opaque*>(buffer) + sent);
-
- buildMessage(ssl, out, data);
- ssl.Send(out.get_buffer(), out.get_size());
-
- if (ssl.GetError()) {
- if (ssl.GetError() == YasslError(SSL_ERROR_WANT_WRITE)) {
- ssl.useBuffers().plainSz = len;
- ssl.useBuffers().prevSent = sent;
- }
- return -1;
- }
- sent += len;
- }
- ssl.useLog().ShowData(sent, true);
- return sent;
-}
-
-
-// send alert
-int sendAlert(SSL& ssl, const Alert& alert)
-{
- output_buffer out;
- buildAlert(ssl, out, alert);
- ssl.Send(out.get_buffer(), out.get_size());
-
- return alert.get_length();
-}
-
-
-// process input data
-int receiveData(SSL& ssl, Data& data, bool peek)
-{
- if (ssl.GetError() == YasslError(SSL_ERROR_WANT_READ))
- ssl.SetError(no_error);
-
- ssl.verfiyHandShakeComplete();
- if (ssl.GetError()) return -1;
-
- if (!ssl.HasData())
- processReply(ssl);
-
- if (peek)
- ssl.PeekData(data);
- else
- ssl.fillData(data);
-
- ssl.useLog().ShowData(data.get_length());
- if (ssl.GetError()) return -1;
-
- if (data.get_length() == 0 && ssl.getSocket().WouldBlock()) {
- ssl.SetError(YasslError(SSL_ERROR_WANT_READ));
- return SSL_WOULD_BLOCK;
- }
- return data.get_length();
-}
-
-
-// send server hello
-void sendServerHello(SSL& ssl, BufferOutput buffer)
-{
- if (ssl.getSecurity().get_resuming())
- ssl.verifyState(clientKeyExchangeComplete);
- else
- ssl.verifyState(clientHelloComplete);
- if (ssl.GetError()) return;
-
- ServerHello sh(ssl.getSecurity().get_connection().version_,
- ssl.getSecurity().get_connection().compression_);
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
-
- buildServerHello(ssl, sh);
- ssl.set_random(sh.get_random(), server_end);
- buildHeaders(ssl, hsHeader, rlHeader, sh);
- buildOutput(*out.get(), rlHeader, hsHeader, sh);
- hashHandShake(ssl, *out.get());
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send server hello done
-void sendServerHelloDone(SSL& ssl, BufferOutput buffer)
-{
- if (ssl.GetError()) return;
-
- ServerHelloDone shd;
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
-
- buildHeaders(ssl, hsHeader, rlHeader, shd);
- buildOutput(*out.get(), rlHeader, hsHeader, shd);
- hashHandShake(ssl, *out.get());
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send certificate
-void sendCertificate(SSL& ssl, BufferOutput buffer)
-{
- if (ssl.GetError()) return;
-
- Certificate cert(ssl.getCrypto().get_certManager().get_cert());
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
-
- buildHeaders(ssl, hsHeader, rlHeader, cert);
- buildOutput(*out.get(), rlHeader, hsHeader, cert);
- hashHandShake(ssl, *out.get());
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send certificate request
-void sendCertificateRequest(SSL& ssl, BufferOutput buffer)
-{
- if (ssl.GetError()) return;
-
- CertificateRequest request;
- request.Build();
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
-
- buildHeaders(ssl, hsHeader, rlHeader, request);
- buildOutput(*out.get(), rlHeader, hsHeader, request);
- hashHandShake(ssl, *out.get());
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-// send certificate verify
-void sendCertificateVerify(SSL& ssl, BufferOutput buffer)
-{
- if (ssl.GetError()) return;
-
- if(ssl.getCrypto().get_certManager().sendBlankCert()) return;
-
- CertificateVerify verify;
- verify.Build(ssl);
- if (ssl.GetError()) return;
-
- RecordLayerHeader rlHeader;
- HandShakeHeader hsHeader;
- mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
-
- buildHeaders(ssl, hsHeader, rlHeader, verify);
- buildOutput(*out.get(), rlHeader, hsHeader, verify);
- hashHandShake(ssl, *out.get());
-
- if (buffer == buffered)
- ssl.addBuffer(out.release());
- else
- ssl.Send(out->get_buffer(), out->get_size());
-}
-
-
-} // namespace
diff --git a/extra/yassl/src/lock.cpp b/extra/yassl/src/lock.cpp
deleted file mode 100644
index 44cbcc1151f..00000000000
--- a/extra/yassl/src/lock.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* Locking functions
- */
-
-#include "runtime.hpp"
-#include "lock.hpp"
-
-
-namespace yaSSL {
-
-
-#ifdef MULTI_THREADED
- #ifdef _WIN32
-
- Mutex::Mutex()
- {
- InitializeCriticalSection(&cs_);
- }
-
-
- Mutex::~Mutex()
- {
- DeleteCriticalSection(&cs_);
- }
-
-
- Mutex::Lock::Lock(Mutex& lm) : mutex_(lm)
- {
- EnterCriticalSection(&mutex_.cs_);
- }
-
-
- Mutex::Lock::~Lock()
- {
- LeaveCriticalSection(&mutex_.cs_);
- }
-
- #else // _WIN32
-
- Mutex::Mutex()
- {
- pthread_mutex_init(&mutex_, 0);
- }
-
-
- Mutex::~Mutex()
- {
- pthread_mutex_destroy(&mutex_);
- }
-
-
- Mutex::Lock::Lock(Mutex& lm) : mutex_(lm)
- {
- pthread_mutex_lock(&mutex_.mutex_);
- }
-
-
- Mutex::Lock::~Lock()
- {
- pthread_mutex_unlock(&mutex_.mutex_);
- }
-
-
- #endif // _WIN32
-#endif // MULTI_THREADED
-
-
-
-} // namespace yaSSL
-
diff --git a/extra/yassl/src/log.cpp b/extra/yassl/src/log.cpp
deleted file mode 100644
index 5adbe401d7a..00000000000
--- a/extra/yassl/src/log.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* Debug logging functions
- */
-
-
-#include "runtime.hpp"
-#include "log.hpp"
-
-#ifdef YASSL_LOG
- #include <time.h>
- #include <stdio.h>
- #include <string.h>
-#endif
-
-
-
-namespace yaSSL {
-
-
-#ifdef YASSL_LOG
-
- enum { MAX_MSG = 81 };
-
- Log::Log(const char* str)
- {
- log_ = fopen(str, "w");
- Trace("********** Logger Attached **********");
- }
-
-
- Log::~Log()
- {
- Trace("********** Logger Detached **********");
- fclose(log_);
- }
-
-
- // Trace a message
- void Log::Trace(const char* str)
- {
- if (!log_) return;
-
- time_t clicks = time(0);
- char timeStr[32];
-
- // get rid of newline
- strncpy(timeStr, ctime(&clicks), sizeof(timeStr));
- unsigned int len = strlen(timeStr);
- timeStr[len - 1] = 0;
-
- char msg[MAX_MSG];
-
- strncpy(msg, timeStr, sizeof(timeStr));
- strncat(msg, ":", 1);
- strncat(msg, str, MAX_MSG - sizeof(timeStr) - 2);
- strncat(msg, "\n", 1);
- msg[MAX_MSG - 1] = 0;
-
- fputs(msg, log_);
- }
-
-
- #if defined(_WIN32) || defined(__MACH__) || defined(__hpux__)
- typedef int socklen_t;
- #endif
-
-
- // write tcp address
- void Log::ShowTCP(socket_t fd, bool ended)
- {
- sockaddr_in peeraddr;
- socklen_t len = sizeof(peeraddr);
- if (getpeername(fd, (sockaddr*)&peeraddr, &len) != 0)
- return;
-
- const char* p = reinterpret_cast<const char*>(&peeraddr.sin_addr);
- char msg[MAX_MSG];
- char number[16];
-
- if (ended)
- strncpy(msg, "yaSSL conn DONE w/ peer ", 26);
- else
- strncpy(msg, "yaSSL conn BEGUN w/ peer ", 26);
- for (int i = 0; i < 4; ++i) {
- sprintf(number, "%u", static_cast<unsigned short>(p[i]));
- strncat(msg, number, 8);
- if (i < 3)
- strncat(msg, ".", 1);
- }
- strncat(msg, " port ", 8);
- sprintf(number, "%d", htons(peeraddr.sin_port));
- strncat(msg, number, 8);
-
- msg[MAX_MSG - 1] = 0;
- Trace(msg);
- }
-
-
- // log processed data
- void Log::ShowData(uint bytes, bool sent)
- {
- char msg[MAX_MSG];
- char number[16];
-
- if (sent)
- strncpy(msg, "Sent ", 10);
- else
- strncpy(msg, "Received ", 10);
- sprintf(number, "%u", bytes);
- strncat(msg, number, 8);
- strncat(msg, " bytes of application data", 27);
-
- msg[MAX_MSG - 1] = 0;
- Trace(msg);
- }
-
-
-#else // no YASSL_LOG
-
-
- Log::Log(const char*) {}
- Log::~Log() {}
- void Log::Trace(const char*) {}
- void Log::ShowTCP(socket_t, bool) {}
- void Log::ShowData(uint, bool) {}
-
-
-#endif // YASSL_LOG
-} // namespace
diff --git a/extra/yassl/src/make.bat b/extra/yassl/src/make.bat
deleted file mode 100755
index da7cc315382..00000000000
--- a/extra/yassl/src/make.bat
+++ /dev/null
@@ -1,42 +0,0 @@
-REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-REM
-REM This program is free software; you can redistribute it and/or modify
-REM it under the terms of the GNU General Public License as published by
-REM the Free Software Foundation; version 2 of the License.
-REM
-REM This program is distributed in the hope that it will be useful,
-REM but WITHOUT ANY WARRANTY; without even the implied warranty of
-REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-REM GNU General Public License for more details.
-REM
-REM You should have received a copy of the GNU General Public License
-REM along with this program; if not, write to the Free Software
-REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-REM quick and dirty build file for testing different MSDEVs
-setlocal
-
-set myFLAGS= /I../include /I../taocrypt/mySTL /I../taocrypt/include /W3 /c /ZI
-
-cl %myFLAGS% buffer.cpp
-cl %myFLAGS% cert_wrapper.cpp
-cl %myFLAGS% crypto_wrapper.cpp
-cl %myFLAGS% handshake.cpp
-
-cl %myFLAGS% lock.cpp
-cl %myFLAGS% log.cpp
-cl %myFLAGS% socket_wrapper.cpp
-cl %myFLAGS% ssl.cpp
-
-cl %myFLAGS% template_instnt.cpp
-cl %myFLAGS% timer.cpp
-cl %myFLAGS% yassl.cpp
-cl %myFLAGS% yassl_error.cpp
-
-cl %myFLAGS% yassl_imp.cpp
-cl %myFLAGS% yassl_int.cpp
-
-link.exe -lib /out:yassl.lib buffer.obj cert_wrapper.obj crypto_wrapper.obj handshake.obj lock.obj log.obj socket_wrapper.obj ssl.obj template_instnt.obj timer.obj yassl.obj yassl_error.obj yassl_imp.obj yassl_int.obj
-
-
-
diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp
deleted file mode 100644
index a9db842d01b..00000000000
--- a/extra/yassl/src/socket_wrapper.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* The socket wrapper source implements a Socket class that hides the
- * differences between Berkely style sockets and Windows sockets, allowing
- * transparent TCP access.
- */
-
-
-#include "runtime.hpp"
-#include "socket_wrapper.hpp"
-
-#ifndef _WIN32
- #include <errno.h>
- #include <netdb.h>
- #include <unistd.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
- #include <sys/ioctl.h>
- #include <string.h>
- #include <fcntl.h>
-#endif // _WIN32
-
-#if defined(__sun) || defined(__SCO_VERSION__)
- #include <sys/filio.h>
-#endif
-
-#ifdef _WIN32
- const int SOCKET_EWOULDBLOCK = WSAEWOULDBLOCK;
- const int SOCKET_EAGAIN = WSAEWOULDBLOCK;
-#else
- const int SOCKET_EINVAL = EINVAL;
- const int SOCKET_EWOULDBLOCK = EWOULDBLOCK;
- const int SOCKET_EAGAIN = EAGAIN;
-#endif // _WIN32
-
-
-namespace {
-
-
-extern "C" long system_recv(void *ptr, void *buf, size_t count, int flags)
-{
- yaSSL::socket_t *socket = (yaSSL::socket_t *) ptr;
- return ::recv(*socket, reinterpret_cast<char *>(buf), (int)count, flags);
-}
-
-
-extern "C" long system_send(void *ptr, const void *buf, size_t count,
- int flags)
-{
- yaSSL::socket_t *socket = (yaSSL::socket_t *) ptr;
- return ::send(*socket, reinterpret_cast<const char *>(buf), (int)count, flags);
-}
-
-
-}
-
-
-namespace yaSSL {
-
-
-Socket::Socket(socket_t s)
- : socket_(s), wouldBlock_(false), nonBlocking_(false),
- ptr_(&socket_), send_func_(system_send), recv_func_(system_recv)
-{}
-
-
-void Socket::set_fd(socket_t s)
-{
- socket_ = s;
-}
-
-
-socket_t Socket::get_fd() const
-{
- return socket_;
-}
-
-
-Socket::~Socket()
-{
- // don't close automatically now
-}
-
-
-void Socket::closeSocket()
-{
- if (socket_ != INVALID_SOCKET) {
-#ifdef _WIN32
- closesocket(socket_);
-#else
- close(socket_);
-#endif
- socket_ = INVALID_SOCKET;
- }
-}
-
-
-uint Socket::get_ready() const
-{
-#ifdef _WIN32
- unsigned long ready = 0;
- ioctlsocket(socket_, FIONREAD, &ready);
-#else
- /*
- 64-bit Solaris requires the variable passed to
- FIONREAD be a 32-bit value.
- */
- unsigned int ready = 0;
- ioctl(socket_, FIONREAD, &ready);
-#endif
-
- return ready;
-}
-
-void Socket::set_transport_ptr(void *ptr)
-{
- ptr_ = ptr;
-}
-
-
-void Socket::set_transport_recv_function(yaSSL_recv_func_t recv_func)
-{
- recv_func_ = recv_func;
-}
-
-
-void Socket::set_transport_send_function(yaSSL_send_func_t send_func)
-{
- send_func_ = send_func;
-}
-
-
-uint Socket::send(const byte* buf, unsigned int sz, unsigned int &written,
- int flags)
-{
- const byte* pos = buf;
- const byte* end = pos + sz;
-
- wouldBlock_ = false;
-
- while (pos != end)
- {
- int sent = send_func_(ptr_, pos, static_cast<int>(end - pos), flags);
- if (sent == -1)
- {
- if (get_lastError() == SOCKET_EWOULDBLOCK ||
- get_lastError() == SOCKET_EAGAIN)
- {
- wouldBlock_ = true; // would have blocked this time only
- nonBlocking_ = true; // nonblocking, win32 only way to tell
- return 0;
- }
- return static_cast<uint>(-1);
- }
- pos += sent;
- written += sent;
- }
- return sz;
-}
-
-
-uint Socket::receive(byte* buf, unsigned int sz, int flags)
-{
- wouldBlock_ = false;
-
- int recvd = recv_func_(ptr_, buf, sz, flags);
-
- // idea to seperate error from would block by arnetheduck@gmail.com
- if (recvd == -1) {
- if (get_lastError() == SOCKET_EWOULDBLOCK ||
- get_lastError() == SOCKET_EAGAIN) {
- wouldBlock_ = true; // would have blocked this time only
- nonBlocking_ = true; // socket nonblocking, win32 only way to tell
- return 0;
- }
- }
- else if (recvd == 0)
- return static_cast<uint>(-1);
-
- return recvd;
-}
-
-
-// wait if blocking for input, return false for error
-bool Socket::wait()
-{
- char b;
- int recvd = ::recv(socket_, &b, 1, MSG_PEEK);
-
- if (recvd == -1) {
- if (get_lastError() == SOCKET_EWOULDBLOCK ||
- get_lastError() == SOCKET_EAGAIN) {
- wouldBlock_ = true; // would have blocked this time only
- nonBlocking_ = true; // socket nonblocking, win32 only way to tell
- return 1;
- }
- }
- else if (recvd == 0)
- return 0; // Non blocking & no data
-
- return 1; // Data can be read
-
-}
-
-
-void Socket::shutDown(int how)
-{
- shutdown(socket_, how);
-}
-
-
-int Socket::get_lastError()
-{
-#ifdef _WIN32
- return WSAGetLastError();
-#else
- return errno;
-#endif
-}
-
-
-bool Socket::WouldBlock() const
-{
- return wouldBlock_;
-}
-
-
-bool Socket::IsNonBlocking() const
-{
- return nonBlocking_;
-}
-
-
-void Socket::set_lastError(int errorCode)
-{
-#ifdef _WIN32
- WSASetLastError(errorCode);
-#else
- errno = errorCode;
-#endif
-}
-
-
-} // namespace
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
deleted file mode 100644
index 445c21e0179..00000000000
--- a/extra/yassl/src/ssl.cpp
+++ /dev/null
@@ -1,1782 +0,0 @@
-/*
- Copyright (c) 2005, 2014, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* SSL source implements all openssl compatibility API functions
- *
- * TODO: notes are mostly api additions to allow compilation with mysql
- * they don't affect normal modes but should be provided for completeness
-
- * stunnel functions at end of file
- */
-
-
-
-/* see man pages for function descriptions */
-
-#include "runtime.hpp"
-#include "openssl/ssl.h"
-#include "handshake.hpp"
-#include "yassl_int.hpp"
-#include "md5.hpp" // for TaoCrypt MD5 size assert
-#include "md4.hpp" // for TaoCrypt MD4 size assert
-#include "file.hpp" // for TaoCrypt Source
-#include "coding.hpp" // HexDecoder
-#include "helpers.hpp" // for placement new hack
-#include "rsa.hpp" // for TaoCrypt RSA key decode
-#include "dsa.hpp" // for TaoCrypt DSA key decode
-#include <stdio.h>
-#include <time.h>
-
-#ifdef _WIN32
- #include <windows.h> // FindFirstFile etc..
-#else
- #include <sys/types.h> // file helper
- #include <sys/stat.h> // stat
- #include <dirent.h> // opendir
-#endif
-
-
-namespace yaSSL {
-
-
-
-int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
-{
- int ret = SSL_SUCCESS;
-
- if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)
- return SSL_BAD_FILETYPE;
-
- if (file == NULL || !file[0])
- return SSL_BAD_FILE;
-
- FILE* input = fopen(file, "rb");
- if (!input)
- return SSL_BAD_FILE;
-
- if (type == CA) {
- // may have a bunch of CAs
- x509* ptr;
- while ( (ptr = PemToDer(input, Cert)) )
- ctx->AddCA(ptr);
-
- if (!feof(input)) {
- fclose(input);
- return SSL_BAD_FILE;
- }
- }
- else {
- x509*& x = (type == Cert) ? ctx->certificate_ : ctx->privateKey_;
-
- if (format == SSL_FILETYPE_ASN1) {
- fseek(input, 0, SEEK_END);
- long sz = ftell(input);
- rewind(input);
- x = NEW_YS x509(sz); // takes ownership
- size_t bytes = fread(x->use_buffer(), sz, 1, input);
- if (bytes != 1) {
- fclose(input);
- return SSL_BAD_FILE;
- }
- }
- else {
- EncryptedInfo info;
- x = PemToDer(input, type, &info);
- if (!x) {
- fclose(input);
- return SSL_BAD_FILE;
- }
- if (info.set) {
- // decrypt
- char password[80];
- pem_password_cb cb = ctx->GetPasswordCb();
- if (!cb) {
- fclose(input);
- return SSL_BAD_FILE;
- }
- int passwordSz = cb(password, sizeof(password), 0,
- ctx->GetUserData());
- byte key[AES_256_KEY_SZ]; // max sizes
- byte iv[AES_IV_SZ];
-
- // use file's salt for key derivation, but not real iv
- TaoCrypt::Source source(info.iv, info.ivSz);
- TaoCrypt::HexDecoder dec(source);
- memcpy(info.iv, source.get_buffer(), min((uint)sizeof(info.iv),
- source.size()));
- EVP_BytesToKey(info.name, "MD5", info.iv, (byte*)password,
- passwordSz, 1, key, iv);
-
- mySTL::auto_ptr<BulkCipher> cipher;
- if (strncmp(info.name, "DES-CBC", 7) == 0)
- cipher.reset(NEW_YS DES);
- else if (strncmp(info.name, "DES-EDE3-CBC", 13) == 0)
- cipher.reset(NEW_YS DES_EDE);
- else if (strncmp(info.name, "AES-128-CBC", 13) == 0)
- cipher.reset(NEW_YS AES(AES_128_KEY_SZ));
- else if (strncmp(info.name, "AES-192-CBC", 13) == 0)
- cipher.reset(NEW_YS AES(AES_192_KEY_SZ));
- else if (strncmp(info.name, "AES-256-CBC", 13) == 0)
- cipher.reset(NEW_YS AES(AES_256_KEY_SZ));
- else {
- fclose(input);
- return SSL_BAD_FILE;
- }
- cipher->set_decryptKey(key, info.iv);
- mySTL::auto_ptr<x509> newx(NEW_YS x509(x->get_length()));
- cipher->decrypt(newx->use_buffer(), x->get_buffer(),
- x->get_length());
- ysDelete(x);
- x = newx.release();
- }
- }
- }
-
- if (type == PrivateKey && ctx->privateKey_) {
- // see if key is valid early
- TaoCrypt::Source rsaSource(ctx->privateKey_->get_buffer(),
- ctx->privateKey_->get_length());
- TaoCrypt::RSA_PrivateKey rsaKey;
- rsaKey.Initialize(rsaSource);
-
- if (rsaSource.GetError().What()) {
- // rsa failed see if DSA works
-
- TaoCrypt::Source dsaSource(ctx->privateKey_->get_buffer(),
- ctx->privateKey_->get_length());
- TaoCrypt::DSA_PrivateKey dsaKey;
- dsaKey.Initialize(dsaSource);
-
- if (dsaSource.GetError().What()) {
- // neither worked
- ret = SSL_FAILURE;
- }
- }
- }
-
- fclose(input);
- return ret;
-}
-
-
-extern "C" {
-
-
-SSL_METHOD* SSLv3_method()
-{
- return SSLv3_client_method();
-}
-
-
-SSL_METHOD* SSLv3_server_method()
-{
- return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,0));
-}
-
-
-SSL_METHOD* SSLv3_client_method()
-{
- return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,0));
-}
-
-
-SSL_METHOD* TLSv1_server_method()
-{
- return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,1));
-}
-
-
-SSL_METHOD* TLSv1_client_method()
-{
- return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,1));
-}
-
-
-SSL_METHOD* TLSv1_1_server_method()
-{
- return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,2));
-}
-
-
-SSL_METHOD* TLSv1_1_client_method()
-{
- return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,2));
-}
-
-
-SSL_METHOD* SSLv23_server_method()
-{
- // compatibility only, no version 2 support, but does SSL 3 and TLS 1
- return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,2), true);
-}
-
-
-SSL_METHOD* SSLv23_client_method()
-{
- // compatibility only, no version 2 support, but does SSL 3 and TLS 1
- // though it sends TLS1 hello not SSLv2 so SSLv3 only servers will decline
- // TODO: maybe add support to send SSLv2 hello ???
- return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,2), true);
-}
-
-
-SSL_CTX* SSL_CTX_new(SSL_METHOD* method)
-{
- return NEW_YS SSL_CTX(method);
-}
-
-
-void SSL_CTX_free(SSL_CTX* ctx)
-{
- ysDelete(ctx);
-}
-
-
-SSL* SSL_new(SSL_CTX* ctx)
-{
- return NEW_YS SSL(ctx);
-}
-
-
-void SSL_free(SSL* ssl)
-{
- ysDelete(ssl);
-}
-
-
-int SSL_set_fd(SSL* ssl, YASSL_SOCKET_T fd)
-{
- ssl->useSocket().set_fd(fd);
- return SSL_SUCCESS;
-}
-
-
-YASSL_SOCKET_T SSL_get_fd(const SSL* ssl)
-{
- return ssl->getSocket().get_fd();
-}
-
-
-// if you get an error from connect see note at top of README
-int SSL_connect(SSL* ssl)
-{
- if (ssl->GetError() == YasslError(SSL_ERROR_WANT_READ))
- ssl->SetError(no_error);
-
- if (ssl->GetError() == YasslError(SSL_ERROR_WANT_WRITE)) {
-
- ssl->SetError(no_error);
- ssl->SendWriteBuffered();
- if (!ssl->GetError())
- ssl->useStates().UseConnect() =
- ConnectState(ssl->getStates().GetConnect() + 1);
- }
-
- ClientState neededState;
-
- switch (ssl->getStates().GetConnect()) {
-
- case CONNECT_BEGIN :
- sendClientHello(*ssl);
- if (!ssl->GetError())
- ssl->useStates().UseConnect() = CLIENT_HELLO_SENT;
- /* fall through */
-
- case CLIENT_HELLO_SENT :
- neededState = ssl->getSecurity().get_resuming() ?
- serverFinishedComplete : serverHelloDoneComplete;
- while (ssl->getStates().getClient() < neededState) {
- if (ssl->GetError()) break;
- processReply(*ssl);
- // if resumption failed, reset needed state
- if (neededState == serverFinishedComplete)
- if (!ssl->getSecurity().get_resuming())
- neededState = serverHelloDoneComplete;
- }
- if (!ssl->GetError())
- ssl->useStates().UseConnect() = FIRST_REPLY_DONE;
- /* fall through */
-
- case FIRST_REPLY_DONE :
- if(ssl->getCrypto().get_certManager().sendVerify())
- sendCertificate(*ssl);
-
- if (!ssl->getSecurity().get_resuming())
- sendClientKeyExchange(*ssl);
-
- if(ssl->getCrypto().get_certManager().sendVerify())
- sendCertificateVerify(*ssl);
-
- sendChangeCipher(*ssl);
- sendFinished(*ssl, client_end);
- ssl->flushBuffer();
-
- if (!ssl->GetError())
- ssl->useStates().UseConnect() = FINISHED_DONE;
- /* fall through */
-
- case FINISHED_DONE :
- if (!ssl->getSecurity().get_resuming())
- while (ssl->getStates().getClient() < serverFinishedComplete) {
- if (ssl->GetError()) break;
- processReply(*ssl);
- }
- if (!ssl->GetError())
- ssl->useStates().UseConnect() = SECOND_REPLY_DONE;
- /* fall through */
-
- case SECOND_REPLY_DONE :
- ssl->verifyState(serverFinishedComplete);
- ssl->useLog().ShowTCP(ssl->getSocket().get_fd());
-
- if (ssl->GetError()) {
- GetErrors().Add(ssl->GetError());
- return SSL_FATAL_ERROR;
- }
- return SSL_SUCCESS;
-
- default :
- return SSL_FATAL_ERROR; // unkown state
- }
-}
-
-
-int SSL_write(SSL* ssl, const void* buffer, int sz)
-{
- return sendData(*ssl, buffer, sz);
-}
-
-
-int SSL_read(SSL* ssl, void* buffer, int sz)
-{
- Data data(min(sz, MAX_RECORD_SIZE), static_cast<opaque*>(buffer));
- return receiveData(*ssl, data);
-}
-
-
-int SSL_accept(SSL* ssl)
-{
- if (ssl->GetError() == YasslError(SSL_ERROR_WANT_READ))
- ssl->SetError(no_error);
-
- if (ssl->GetError() == YasslError(SSL_ERROR_WANT_WRITE)) {
- ssl->SetError(no_error);
- ssl->SendWriteBuffered();
- if (!ssl->GetError())
- ssl->useStates().UseAccept() =
- AcceptState(ssl->getStates().GetAccept() + 1);
- }
-
- switch (ssl->getStates().GetAccept()) {
-
- case ACCEPT_BEGIN :
- processReply(*ssl);
- if (!ssl->GetError())
- ssl->useStates().UseAccept() = ACCEPT_FIRST_REPLY_DONE;
- /* fall through */
-
- case ACCEPT_FIRST_REPLY_DONE :
- sendServerHello(*ssl);
-
- if (!ssl->getSecurity().get_resuming()) {
- sendCertificate(*ssl);
-
- if (ssl->getSecurity().get_connection().send_server_key_)
- sendServerKeyExchange(*ssl);
-
- if(ssl->getCrypto().get_certManager().verifyPeer())
- sendCertificateRequest(*ssl);
-
- sendServerHelloDone(*ssl);
- ssl->flushBuffer();
- }
-
- if (!ssl->GetError())
- ssl->useStates().UseAccept() = SERVER_HELLO_DONE;
- /* fall through */
-
- case SERVER_HELLO_DONE :
- if (!ssl->getSecurity().get_resuming()) {
- while (ssl->getStates().getServer() < clientFinishedComplete) {
- if (ssl->GetError()) break;
- processReply(*ssl);
- }
- }
- if (!ssl->GetError())
- ssl->useStates().UseAccept() = ACCEPT_SECOND_REPLY_DONE;
- /* fall through */
-
- case ACCEPT_SECOND_REPLY_DONE :
- sendChangeCipher(*ssl);
- sendFinished(*ssl, server_end);
- ssl->flushBuffer();
-
- if (!ssl->GetError())
- ssl->useStates().UseAccept() = ACCEPT_FINISHED_DONE;
- /* fall through */
-
- case ACCEPT_FINISHED_DONE :
- if (ssl->getSecurity().get_resuming()) {
- while (ssl->getStates().getServer() < clientFinishedComplete) {
- if (ssl->GetError()) break;
- processReply(*ssl);
- }
- }
- if (!ssl->GetError())
- ssl->useStates().UseAccept() = ACCEPT_THIRD_REPLY_DONE;
- /* fall through */
-
- case ACCEPT_THIRD_REPLY_DONE :
- ssl->useLog().ShowTCP(ssl->getSocket().get_fd());
-
- if (ssl->GetError()) {
- GetErrors().Add(ssl->GetError());
- return SSL_FATAL_ERROR;
- }
- return SSL_SUCCESS;
-
- default:
- return SSL_FATAL_ERROR; // unknown state
- }
-}
-
-
-int SSL_do_handshake(SSL* ssl)
-{
- if (ssl->getSecurity().get_parms().entity_ == client_end)
- return SSL_connect(ssl);
- else
- return SSL_accept(ssl);
-}
-
-
-int SSL_clear(SSL* ssl)
-{
- GetErrors().Remove();
-
- return SSL_SUCCESS;
-}
-
-
-int SSL_shutdown(SSL* ssl)
-{
- if (!ssl->GetQuietShutdown()) {
- Alert alert(warning, close_notify);
- sendAlert(*ssl, alert);
- }
- ssl->useLog().ShowTCP(ssl->getSocket().get_fd(), true);
-
- GetErrors().Remove();
-
- return SSL_SUCCESS;
-}
-
-
-void SSL_set_quiet_shutdown(SSL *ssl,int mode)
-{
- ssl->SetQuietShutdown(mode != 0);
-}
-
-
-int SSL_get_quiet_shutdown(SSL *ssl)
-{
- return ssl->GetQuietShutdown();
-}
-
-
-/* on by default but allow user to turn off */
-long SSL_CTX_set_session_cache_mode(SSL_CTX* ctx, long mode)
-{
- if (mode == SSL_SESS_CACHE_OFF)
- ctx->SetSessionCacheOff();
-
- if (mode == SSL_SESS_CACHE_NO_AUTO_CLEAR)
- ctx->SetSessionCacheFlushOff();
-
- return SSL_SUCCESS;
-}
-
-
-SSL_SESSION* SSL_get_session(SSL* ssl)
-{
- if (ssl->getSecurity().GetContext()->GetSessionCacheOff())
- return 0;
-
- return GetSessions().lookup(
- ssl->getSecurity().get_connection().sessionID_);
-}
-
-
-int SSL_set_session(SSL* ssl, SSL_SESSION* session)
-{
- if (ssl->getSecurity().GetContext()->GetSessionCacheOff())
- return SSL_FAILURE;
-
- ssl->set_session(session);
- return SSL_SUCCESS;
-}
-
-
-int SSL_session_reused(SSL* ssl)
-{
- return ssl->getSecurity().get_resuming();
-}
-
-
-long SSL_SESSION_set_timeout(SSL_SESSION* sess, long t)
-{
- if (!sess)
- return SSL_ERROR_NONE;
-
- sess->SetTimeOut(t);
- return SSL_SUCCESS;
-}
-
-
-long SSL_get_default_timeout(SSL* /*ssl*/)
-{
- return DEFAULT_TIMEOUT;
-}
-
-
-void SSL_flush_sessions(SSL_CTX *ctx, long /* tm */)
-{
- if (ctx->GetSessionCacheOff())
- return;
-
- GetSessions().Flush();
-}
-
-
-const char* SSL_get_cipher_name(SSL* ssl)
-{
- return SSL_get_cipher(ssl);
-}
-
-
-const char* SSL_get_cipher(SSL* ssl)
-{
- return ssl->getSecurity().get_parms().cipher_name_;
-}
-
-
-// SSLv2 only, not implemented
-char* SSL_get_shared_ciphers(SSL* /*ssl*/, char* buf, int len)
-{
- return strncpy(buf, "Not Implemented, SSLv2 only", len);
-}
-
-
-const char* SSL_get_cipher_list(SSL* ssl, int priority)
-{
- if (priority < 0 || priority >= MAX_CIPHERS)
- return 0;
-
- if (ssl->getSecurity().get_parms().cipher_list_[priority][0])
- return ssl->getSecurity().get_parms().cipher_list_[priority];
-
- return 0;
-}
-
-
-int SSL_CTX_set_cipher_list(SSL_CTX* ctx, const char* list)
-{
- if (ctx->SetCipherList(list))
- return SSL_SUCCESS;
- else
- return SSL_FAILURE;
-}
-
-
-const char* SSL_get_version(SSL* ssl)
-{
- static const char* version3 = "SSLv3";
- static const char* version31 = "TLSv1";
-
- return ssl->isTLS() ? version31 : version3;
-}
-
-const char* SSLeay_version(int)
-{
- static const char* version = "SSLeay yaSSL compatibility";
- return version;
-}
-
-
-int SSL_get_error(SSL* ssl, int /*previous*/)
-{
- return ssl->getStates().What();
-}
-
-
-
-/* turn on yaSSL zlib compression
- returns 0 for success, else error (not built in)
- only need to turn on for client, becuase server on by default if built in
- but calling for server will tell you whether it's available or not
-*/
-int SSL_set_compression(SSL* ssl) /* Chad didn't rename to ya~ because it is prob. bug. */
-{
- return ssl->SetCompression();
-}
-
-
-
-X509* SSL_get_peer_certificate(SSL* ssl)
-{
- return ssl->getCrypto().get_certManager().get_peerX509();
-}
-
-
-void X509_free(X509* /*x*/)
-{
- // peer cert set for deletion during destruction
- // no need to delete now
-}
-
-
-X509* X509_STORE_CTX_get_current_cert(X509_STORE_CTX* ctx)
-{
- return ctx->current_cert;
-}
-
-
-int X509_STORE_CTX_get_error(X509_STORE_CTX* ctx)
-{
- return ctx->error;
-}
-
-
-int X509_STORE_CTX_get_error_depth(X509_STORE_CTX* ctx)
-{
- return ctx->error_depth;
-}
-
-
-// copy name into buffer, at most sz bytes, if buffer is null
-// will malloc buffer, caller responsible for freeing
-char* X509_NAME_oneline(X509_NAME* name, char* buffer, int sz)
-{
- if (!name->GetName()) return buffer;
-
- int len = (int)strlen(name->GetName()) + 1;
- int copySz = min(len, sz);
-
- if (!buffer) {
- buffer = (char*)malloc(len);
- if (!buffer) return buffer;
- copySz = len;
- }
-
- if (copySz == 0)
- return buffer;
-
- memcpy(buffer, name->GetName(), copySz - 1);
- buffer[copySz - 1] = 0;
-
- return buffer;
-}
-
-
-X509_NAME* X509_get_issuer_name(X509* x)
-{
- return x->GetIssuer();
-}
-
-
-X509_NAME* X509_get_subject_name(X509* x)
-{
- return x->GetSubject();
-}
-
-
-void SSL_load_error_strings() // compatibility only
-{}
-
-
-void SSL_set_connect_state(SSL*)
-{
- // already a client by default
-}
-
-
-void SSL_set_accept_state(SSL* ssl)
-{
- ssl->useSecurity().use_parms().entity_ = server_end;
-}
-
-
-long SSL_get_verify_result(SSL*)
-{
- // won't get here if not OK
- return X509_V_OK;
-}
-
-
-long SSL_CTX_sess_set_cache_size(SSL_CTX* /*ctx*/, long /*sz*/)
-{
- // unlimited size, can't set for now
- return 0;
-}
-
-
-long SSL_CTX_get_session_cache_mode(SSL_CTX*)
-{
- // always 0, unlimited size for now
- return 0;
-}
-
-
-long SSL_CTX_set_tmp_dh(SSL_CTX* ctx, DH* dh)
-{
- if (ctx->SetDH(*dh))
- return SSL_SUCCESS;
- else
- return SSL_FAILURE;
-}
-
-
-int SSL_CTX_use_certificate_file(SSL_CTX* ctx, const char* file, int format)
-{
- return read_file(ctx, file, format, Cert);
-}
-
-
-int SSL_CTX_use_PrivateKey_file(SSL_CTX* ctx, const char* file, int format)
-{
- return read_file(ctx, file, format, PrivateKey);
-}
-
-
-void SSL_CTX_set_verify(SSL_CTX* ctx, int mode, VerifyCallback vc)
-{
- if (mode & SSL_VERIFY_PEER)
- ctx->setVerifyPeer();
-
- if (mode == SSL_VERIFY_NONE)
- ctx->setVerifyNone();
-
- if (mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
- ctx->setFailNoCert();
-
- ctx->setVerifyCallback(vc);
-}
-
-
-int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
- const char* path)
-{
- int ret = SSL_SUCCESS;
-
- if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA);
-
- if (ret == SSL_SUCCESS && path) {
- // call read_file for each reqular file in path
-#ifdef _WIN32
-
- WIN32_FIND_DATA FindFileData;
- HANDLE hFind;
-
- const int DELIMITER_SZ = 2;
- const int DELIMITER_STAR_SZ = 3;
- int pathSz = (int)strlen(path);
- int nameSz = pathSz + DELIMITER_STAR_SZ + 1; // plus 1 for terminator
- char* name = NEW_YS char[nameSz]; // directory specification
- memset(name, 0, nameSz);
- strncpy(name, path, nameSz - DELIMITER_STAR_SZ - 1);
- strncat(name, "\\*", DELIMITER_STAR_SZ);
-
- hFind = FindFirstFile(name, &FindFileData);
- if (hFind == INVALID_HANDLE_VALUE) {
- ysArrayDelete(name);
- return SSL_BAD_PATH;
- }
-
- do {
- if (!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
- int curSz = (int)strlen(FindFileData.cFileName);
- if (pathSz + curSz + DELIMITER_SZ + 1 > nameSz) {
- ysArrayDelete(name);
- // plus 1 for terminator
- nameSz = pathSz + curSz + DELIMITER_SZ + 1;
- name = NEW_YS char[nameSz];
- }
- memset(name, 0, nameSz);
- strncpy(name, path, nameSz - curSz - DELIMITER_SZ - 1);
- strncat(name, "\\", DELIMITER_SZ);
- strncat(name, FindFileData.cFileName,
- nameSz - pathSz - DELIMITER_SZ - 1);
- ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
- }
- } while (ret == SSL_SUCCESS && FindNextFile(hFind, &FindFileData));
-
- ysArrayDelete(name);
- FindClose(hFind);
-
-#else // _WIN32
- DIR* dir = opendir(path);
- if (!dir) return SSL_BAD_PATH;
-
- struct dirent* entry;
- struct stat buf;
- const int DELIMITER_SZ = 1;
- int pathSz = (int)strlen(path);
- int nameSz = pathSz + DELIMITER_SZ + 1; //plus 1 for null terminator
- char* name = NEW_YS char[nameSz]; // directory specification
-
- while (ret == SSL_SUCCESS && (entry = readdir(dir))) {
- int curSz = (int)strlen(entry->d_name);
- if (pathSz + curSz + DELIMITER_SZ + 1 > nameSz) {
- ysArrayDelete(name);
- nameSz = pathSz + DELIMITER_SZ + curSz + 1;
- name = NEW_YS char[nameSz];
- }
- memset(name, 0, nameSz);
- strncpy(name, path, nameSz - curSz - 1);
- strncat(name, "/", DELIMITER_SZ);
- strncat(name, entry->d_name, nameSz - pathSz - DELIMITER_SZ - 1);
-
- if (stat(name, &buf) < 0) {
- ysArrayDelete(name);
- closedir(dir);
- return SSL_BAD_STAT;
- }
-
- if (S_ISREG(buf.st_mode))
- ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
- }
-
- ysArrayDelete(name);
- closedir(dir);
-
-#endif
- }
-
- return ret;
-}
-
-
-int SSL_CTX_set_default_verify_paths(SSL_CTX* /*ctx*/)
-{
- // TODO: figure out way to set/store default path, then call load_verify
- return SSL_NOT_IMPLEMENTED;
-}
-
-
-int SSL_CTX_set_session_id_context(SSL_CTX*, const unsigned char*,
- unsigned int)
-{
- // No application specific context needed for yaSSL
- return SSL_SUCCESS;
-}
-
-
-int SSL_CTX_check_private_key(SSL_CTX* /*ctx*/)
-{
- // TODO: check private against public for RSA match
- return SSL_NOT_IMPLEMENTED;
-}
-
-
-// TODO: all session stats
-long SSL_CTX_sess_accept(SSL_CTX* ctx)
-{
- return ctx->GetStats().accept_;
-}
-
-
-long SSL_CTX_sess_connect(SSL_CTX* ctx)
-{
- return ctx->GetStats().connect_;
-}
-
-
-long SSL_CTX_sess_accept_good(SSL_CTX* ctx)
-{
- return ctx->GetStats().acceptGood_;
-}
-
-
-long SSL_CTX_sess_connect_good(SSL_CTX* ctx)
-{
- return ctx->GetStats().connectGood_;
-}
-
-
-long SSL_CTX_sess_accept_renegotiate(SSL_CTX* ctx)
-{
- return ctx->GetStats().acceptRenegotiate_;
-}
-
-
-long SSL_CTX_sess_connect_renegotiate(SSL_CTX* ctx)
-{
- return ctx->GetStats().connectRenegotiate_;
-}
-
-
-long SSL_CTX_sess_hits(SSL_CTX* ctx)
-{
- return ctx->GetStats().hits_;
-}
-
-
-long SSL_CTX_sess_cb_hits(SSL_CTX* ctx)
-{
- return ctx->GetStats().cbHits_;
-}
-
-
-long SSL_CTX_sess_cache_full(SSL_CTX* ctx)
-{
- return ctx->GetStats().cacheFull_;
-}
-
-
-long SSL_CTX_sess_misses(SSL_CTX* ctx)
-{
- return ctx->GetStats().misses_;
-}
-
-
-long SSL_CTX_sess_timeouts(SSL_CTX* ctx)
-{
- return ctx->GetStats().timeouts_;
-}
-
-
-long SSL_CTX_sess_number(SSL_CTX* ctx)
-{
- return ctx->GetStats().number_;
-}
-
-
-long SSL_CTX_sess_get_cache_size(SSL_CTX* ctx)
-{
- return ctx->GetStats().getCacheSize_;
-}
-// end session stats TODO:
-
-
-int SSL_CTX_get_verify_mode(SSL_CTX* ctx)
-{
- return ctx->GetStats().verifyMode_;
-}
-
-
-int SSL_get_verify_mode(SSL* ssl)
-{
- return ssl->getSecurity().GetContext()->GetStats().verifyMode_;
-}
-
-
-int SSL_CTX_get_verify_depth(SSL_CTX* ctx)
-{
- return ctx->GetStats().verifyDepth_;
-}
-
-
-int SSL_get_verify_depth(SSL* ssl)
-{
- return ssl->getSecurity().GetContext()->GetStats().verifyDepth_;
-}
-
-
-long SSL_CTX_set_options(SSL_CTX*, long)
-{
- // TDOD:
- return SSL_SUCCESS;
-}
-
-
-void SSL_CTX_set_info_callback(SSL_CTX*, void (*)())
-{
- // TDOD:
-}
-
-
-void OpenSSL_add_all_algorithms() // compatibility only
-{}
-
-
-int SSL_library_init() // compatibility only
-{
- return 1;
-}
-
-
-DH* DH_new(void)
-{
- DH* dh = NEW_YS DH;
- if (dh)
- dh->p = dh->g = 0;
- return dh;
-}
-
-
-void DH_free(DH* dh)
-{
- ysDelete(dh->g);
- ysDelete(dh->p);
- ysDelete(dh);
-}
-
-
-// convert positive big-endian num of length sz into retVal, which may need to
-// be created
-BIGNUM* BN_bin2bn(const unsigned char* num, int sz, BIGNUM* retVal)
-{
- bool created = false;
- mySTL::auto_ptr<BIGNUM> bn;
-
- if (!retVal) {
- created = true;
- bn.reset(NEW_YS BIGNUM);
- retVal = bn.get();
- }
-
- retVal->assign(num, sz);
-
- if (created)
- return bn.release();
- else
- return retVal;
-}
-
-
-unsigned long ERR_get_error_line_data(const char**, int*, const char**, int *)
-{
- //return SSL_NOT_IMPLEMENTED;
- return 0;
-}
-
-
-void ERR_print_errors_fp(FILE* /*fp*/)
-{
- // need ssl access to implement TODO:
- //fprintf(fp, "%s", ssl.get_states().errorString_.c_str());
-}
-
-
-char* ERR_error_string(unsigned long errNumber, char* buffer)
-{
- static char* msg = (char*)"Please supply a buffer for error string";
-
- if (buffer) {
- SetErrorString(YasslError(errNumber), buffer);
- return buffer;
- }
-
- return msg;
-}
-
-
-const char* X509_verify_cert_error_string(long /* error */)
-{
- // TODO:
- static const char* msg = "Not Implemented";
- return msg;
-}
-
-
-const EVP_MD* EVP_md5(void)
-{
- static const char* type = "MD5";
- return type;
-}
-
-
-const EVP_CIPHER* EVP_des_ede3_cbc(void)
-{
- static const char* type = "DES-EDE3-CBC";
- return type;
-}
-
-
-int EVP_BytesToKey(const EVP_CIPHER* type, const EVP_MD* md, const byte* salt,
- const byte* data, int sz, int count, byte* key, byte* iv)
-{
- // only support MD5 for now
- if (strncmp(md, "MD5", 3)) return 0;
-
- int keyLen = 0;
- int ivLen = 0;
-
- // only support CBC DES and AES for now
- if (strncmp(type, "DES-CBC", 7) == 0) {
- keyLen = DES_KEY_SZ;
- ivLen = DES_IV_SZ;
- }
- else if (strncmp(type, "DES-EDE3-CBC", 12) == 0) {
- keyLen = DES_EDE_KEY_SZ;
- ivLen = DES_IV_SZ;
- }
- else if (strncmp(type, "AES-128-CBC", 11) == 0) {
- keyLen = AES_128_KEY_SZ;
- ivLen = AES_IV_SZ;
- }
- else if (strncmp(type, "AES-192-CBC", 11) == 0) {
- keyLen = AES_192_KEY_SZ;
- ivLen = AES_IV_SZ;
- }
- else if (strncmp(type, "AES-256-CBC", 11) == 0) {
- keyLen = AES_256_KEY_SZ;
- ivLen = AES_IV_SZ;
- }
- else
- return 0;
-
- yaSSL::MD5 myMD;
- uint digestSz = myMD.get_digestSize();
- byte digest[SHA_LEN]; // max size
-
- int keyLeft = keyLen;
- int ivLeft = ivLen;
- int keyOutput = 0;
-
- while (keyOutput < (keyLen + ivLen)) {
- int digestLeft = digestSz;
- // D_(i - 1)
- if (keyOutput) // first time D_0 is empty
- myMD.update(digest, digestSz);
- // data
- myMD.update(data, sz);
- // salt
- if (salt)
- myMD.update(salt, EVP_SALT_SZ);
- myMD.get_digest(digest);
- // count
- for (int j = 1; j < count; j++) {
- myMD.update(digest, digestSz);
- myMD.get_digest(digest);
- }
-
- if (keyLeft) {
- int store = min(keyLeft, static_cast<int>(digestSz));
- memcpy(&key[keyLen - keyLeft], digest, store);
-
- keyOutput += store;
- keyLeft -= store;
- digestLeft -= store;
- }
-
- if (ivLeft && digestLeft) {
- int store = min(ivLeft, digestLeft);
- memcpy(&iv[ivLen - ivLeft], &digest[digestSz - digestLeft], store);
-
- keyOutput += store;
- ivLeft -= store;
- }
- }
- return keyOutput;
-}
-
-
-
-void DES_set_key_unchecked(const_DES_cblock* key, DES_key_schedule* schedule)
-{
- memcpy(schedule, key, sizeof(const_DES_cblock));
-}
-
-
-void DES_ede3_cbc_encrypt(const byte* input, byte* output, long sz,
- DES_key_schedule* ks1, DES_key_schedule* ks2,
- DES_key_schedule* ks3, DES_cblock* ivec, int enc)
-{
- DES_EDE des;
- byte key[DES_EDE_KEY_SZ];
-
- memcpy(key, *ks1, DES_BLOCK);
- memcpy(&key[DES_BLOCK], *ks2, DES_BLOCK);
- memcpy(&key[DES_BLOCK * 2], *ks3, DES_BLOCK);
-
- if (enc) {
- des.set_encryptKey(key, *ivec);
- des.encrypt(output, input, sz);
- }
- else {
- des.set_decryptKey(key, *ivec);
- des.decrypt(output, input, sz);
- }
-}
-
-
-// functions for libcurl
-int RAND_status()
-{
- return 1; /* TaoCrypt provides enough seed */
-}
-
-
-int DES_set_key(const_DES_cblock* key, DES_key_schedule* schedule)
-{
- memcpy(schedule, key, sizeof(const_DES_cblock));
- return 1;
-}
-
-
-void DES_set_odd_parity(DES_cblock* key)
-{
- // not needed now for TaoCrypt
-}
-
-
-void DES_ecb_encrypt(DES_cblock* input, DES_cblock* output,
- DES_key_schedule* key, int enc)
-{
- DES des;
-
- if (enc) {
- des.set_encryptKey(*key, 0);
- des.encrypt(*output, *input, DES_BLOCK);
- }
- else {
- des.set_decryptKey(*key, 0);
- des.decrypt(*output, *input, DES_BLOCK);
- }
-}
-
-
-void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX* ctx, void* userdata)
-{
- ctx->SetUserData(userdata);
-}
-
-
-X509* SSL_get_certificate(SSL* ssl)
-{
- return ssl->getCrypto().get_certManager().get_selfX509();
-}
-
-
-EVP_PKEY* SSL_get_privatekey(SSL* ssl)
-{
- // only called, not used
- return 0;
-}
-
-
-void SSL_SESSION_free(SSL_SESSION* session)
-{
- // managed by singleton
-}
-
-
-
-EVP_PKEY* X509_get_pubkey(X509* x)
-{
- // called, not used though
- return 0;
-}
-
-
-int EVP_PKEY_copy_parameters(EVP_PKEY* to, const EVP_PKEY* from)
-{
- // called, not used though
- return 0;
-}
-
-
-void EVP_PKEY_free(EVP_PKEY* pkey)
-{
- // never allocated from above
-}
-
-
-void ERR_error_string_n(unsigned long e, char *buf, size_t len)
-{
- if (len) ERR_error_string(e, buf);
-}
-
-
-void ERR_free_strings(void)
-{
- // handled internally
-}
-
-
-void EVP_cleanup(void)
-{
- // nothing to do yet
-}
-
-
-ASN1_TIME* X509_get_notBefore(X509* x)
-{
- if (x) return x->GetBefore();
- return 0;
-}
-
-
-ASN1_TIME* X509_get_notAfter(X509* x)
-{
- if (x) return x->GetAfter();
- return 0;
-}
-
-
-SSL_METHOD* SSLv2_client_method(void) /* will never work, no v 2 */
-{
- return 0;
-}
-
-
-SSL_SESSION* SSL_get1_session(SSL* ssl) /* what's ref count */
-{
- return SSL_get_session(ssl);
-}
-
-
-void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *x)
-{
- // no extension names supported yet
-}
-
-
-int sk_GENERAL_NAME_num(STACK_OF(GENERAL_NAME) *x)
-{
- // no extension names supported yet
- return 0;
-}
-
-
-GENERAL_NAME* sk_GENERAL_NAME_value(STACK_OF(GENERAL_NAME) *x, int i)
-{
- // no extension names supported yet
- return 0;
-}
-
-
-unsigned char* ASN1_STRING_data(ASN1_STRING* x)
-{
- if (x) return x->data;
- return 0;
-}
-
-
-int ASN1_STRING_length(ASN1_STRING* x)
-{
- if (x) return x->length;
- return 0;
-}
-
-
-int ASN1_STRING_type(ASN1_STRING *x)
-{
- if (x) return x->type;
- return 0;
-}
-
-
-int X509_NAME_get_index_by_NID(X509_NAME* name,int nid, int lastpos)
-{
- int idx = -1; // not found
- int cnPos = -1;
-
- switch (nid) {
- case NID_commonName:
- cnPos = name->GetCnPosition();
- if (lastpos < cnPos)
- idx = cnPos;
- break;
- }
-
- return idx;
-}
-
-
-ASN1_STRING* X509_NAME_ENTRY_get_data(X509_NAME_ENTRY* ne)
-{
- // the same in yaSSL
- return ne;
-}
-
-
-X509_NAME_ENTRY* X509_NAME_get_entry(X509_NAME* name, int loc)
-{
- return name->GetEntry(loc);
-}
-
-
-// already formatted, caller responsible for freeing *out
-int ASN1_STRING_to_UTF8(unsigned char** out, ASN1_STRING* in)
-{
- if (!in) return 0;
-
- *out = (unsigned char*)malloc(in->length + 1);
- if (*out) {
- memcpy(*out, in->data, in->length);
- (*out)[in->length] = 0;
- }
- return in->length;
-}
-
-
-void* X509_get_ext_d2i(X509* x, int nid, int* crit, int* idx)
-{
- // no extensions supported yet
- return 0;
-}
-
-
-void MD4_Init(MD4_CTX* md4)
-{
- // make sure we have a big enough buffer
- typedef char ok[sizeof(md4->buffer) >= sizeof(TaoCrypt::MD4) ? 1 : -1];
- (void) sizeof(ok);
-
- // using TaoCrypt since no dynamic memory allocated
- // and no destructor will be called
- new (reinterpret_cast<yassl_pointer>(md4->buffer)) TaoCrypt::MD4();
-}
-
-
-void MD4_Update(MD4_CTX* md4, const void* data, unsigned long sz)
-{
- reinterpret_cast<TaoCrypt::MD4*>(md4->buffer)->Update(
- static_cast<const byte*>(data), static_cast<unsigned int>(sz));
-}
-
-
-void MD4_Final(unsigned char* hash, MD4_CTX* md4)
-{
- reinterpret_cast<TaoCrypt::MD4*>(md4->buffer)->Final(hash);
-}
-
-
-void MD5_Init(MD5_CTX* md5)
-{
- // make sure we have a big enough buffer
- typedef char ok[sizeof(md5->buffer) >= sizeof(TaoCrypt::MD5) ? 1 : -1];
- (void) sizeof(ok);
-
- // using TaoCrypt since no dynamic memory allocated
- // and no destructor will be called
- new (reinterpret_cast<yassl_pointer>(md5->buffer)) TaoCrypt::MD5();
-}
-
-
-void MD5_Update(MD5_CTX* md5, const void* data, unsigned long sz)
-{
- reinterpret_cast<TaoCrypt::MD5*>(md5->buffer)->Update(
- static_cast<const byte*>(data), static_cast<unsigned int>(sz));
-}
-
-
-void MD5_Final(unsigned char* hash, MD5_CTX* md5)
-{
- reinterpret_cast<TaoCrypt::MD5*>(md5->buffer)->Final(hash);
-}
-
-
-int RAND_bytes(unsigned char* buf, int num)
-{
- RandomPool ran;
-
- if (ran.GetError()) return 0;
-
- ran.Fill(buf, num);
- return 1;
-}
-
-
-int SSL_peek(SSL* ssl, void* buffer, int sz)
-{
- Data data(min(sz, MAX_RECORD_SIZE), static_cast<opaque*>(buffer));
- return receiveData(*ssl, data, true);
-}
-
-
-int SSL_pending(SSL* ssl)
-{
- return ssl->bufferedData();
-}
-
-
-void SSL_CTX_set_default_passwd_cb(SSL_CTX* ctx, pem_password_cb cb)
-{
- ctx->SetPasswordCb(cb);
-}
-
-
-int SSLeay_add_ssl_algorithms() // compatibility only
-{
- return 1;
-}
-
-
-void ERR_remove_state(unsigned long)
-{
- if (HasErrors())
- GetErrors().Remove();
-}
-
-
-int ERR_GET_REASON(int l)
-{
- return l & 0xfff;
-}
-
-
-unsigned long err_helper(bool peek = false)
-{
- int ysError = GetErrors().Lookup(peek);
-
- // translate cert error for libcurl, it uses OpenSSL hex code
- switch (ysError) {
- case TaoCrypt::SIG_OTHER_E:
- return CERTFICATE_ERROR;
- break;
- default :
- return 0;
- }
-
- return 0; // shut up compiler
-}
-
-
-unsigned long ERR_peek_error()
-{
- return err_helper(true);
-}
-
-
-unsigned long ERR_get_error()
-{
- return err_helper();
-}
-
-
- // functions for stunnel
-
- void RAND_screen()
- {
- // TODO:
- }
-
-
- const char* RAND_file_name(char*, size_t)
- {
- // TODO:
- return 0;
- }
-
-
- int RAND_write_file(const char*)
- {
- // TODO:
- return 0;
- }
-
-
- int RAND_load_file(const char*, long)
- {
- // TODO:
- return 0;
- }
-
-
- void RSA_free(RSA*)
- {
- // TODO:
- }
-
-
- RSA* RSA_generate_key(int, unsigned long, void(*)(int, int, void*), void*)
- {
- // TODO:
- return 0;
- }
-
-
- int X509_LOOKUP_add_dir(X509_LOOKUP*, const char*, long)
- {
- // TODO:
- return SSL_SUCCESS;
- }
-
-
- int X509_LOOKUP_load_file(X509_LOOKUP*, const char*, long)
- {
- // TODO:
- return SSL_SUCCESS;
- }
-
-
- X509_LOOKUP_METHOD* X509_LOOKUP_hash_dir(void)
- {
- // TODO:
- return 0;
- }
-
-
- X509_LOOKUP_METHOD* X509_LOOKUP_file(void)
- {
- // TODO:
- return 0;
- }
-
-
- X509_LOOKUP* X509_STORE_add_lookup(X509_STORE*, X509_LOOKUP_METHOD*)
- {
- // TODO:
- return 0;
- }
-
-
- int X509_STORE_get_by_subject(X509_STORE_CTX*, int, X509_NAME*, X509_OBJECT*)
- {
- // TODO:
- return SSL_SUCCESS;
- }
-
-
- X509_STORE* X509_STORE_new(void)
- {
- // TODO:
- return 0;
- }
-
- char* SSL_alert_type_string_long(int)
- {
- // TODO:
- return 0;
- }
-
-
- char* SSL_alert_desc_string_long(int)
- {
- // TODO:
- return 0;
- }
-
-
- char* SSL_state_string_long(SSL*)
- {
- // TODO:
- return 0;
- }
-
-
- void SSL_CTX_set_tmp_rsa_callback(SSL_CTX*, RSA*(*)(SSL*, int, int))
- {
- // TDOD:
- }
-
-
- long SSL_CTX_set_timeout(SSL_CTX*, long)
- {
- // TDOD:
- return SSL_SUCCESS;
- }
-
-
- int SSL_CTX_use_certificate_chain_file(SSL_CTX* ctx, const char* file)
- {
- // For the moment, treat like use_certificate_file
- return read_file(ctx, file, SSL_FILETYPE_PEM, Cert);
- }
-
-
- int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX*, const char*, int)
- {
- // TDOD:
- return SSL_SUCCESS;
- }
-
-
- int SSL_set_rfd(SSL*, int)
- {
- return SSL_SUCCESS; // TODO:
- }
-
-
- int SSL_set_wfd(SSL*, int)
- {
- return SSL_SUCCESS; // TODO:
- }
-
-
- int SSL_want_read(SSL*)
- {
- return 0; // TODO:
- }
-
-
- int SSL_want_write(SSL*)
- {
- return 0; // TODO:
- }
-
-
- void SSL_set_shutdown(SSL*, int)
- {
- // TODO:
- }
-
- SSL_CIPHER* SSL_get_current_cipher(SSL*)
- {
- // TODO:
- return 0;
- }
-
-
- char* SSL_CIPHER_description(SSL_CIPHER*, char*, int)
- {
- // TODO:
- return 0;
- }
-
- // end stunnel needs
-
- char *yaSSL_ASN1_TIME_to_string(const ASN1_TIME *time, char *buf, size_t len)
- {
- tm t;
- static const char *month_names[12]=
- {
- "Jan","Feb","Mar","Apr","May","Jun",
- "Jul","Aug","Sep","Oct","Nov","Dec"
- };
-
- TaoCrypt::ASN1_TIME_extract(time->data, time->type, &t);
- snprintf(buf, len, "%s %2d %02d:%02d:%02d %d GMT",
- month_names[t.tm_mon], t.tm_mday, t.tm_hour, t.tm_min,
- t.tm_sec, t.tm_year + 1900);
- return buf;
- }
-
-
- void yaSSL_transport_set_ptr(SSL *ssl, void *ptr)
- {
- ssl->useSocket().set_transport_ptr(ptr);
- }
-
-
- void yaSSL_transport_set_recv_function(SSL *ssl, yaSSL_recv_func_t func)
- {
- ssl->useSocket().set_transport_recv_function(func);
- }
-
-
- void yaSSL_transport_set_send_function(SSL *ssl, yaSSL_send_func_t func)
- {
- ssl->useSocket().set_transport_send_function(func);
- }
-
-} // extern "C"
-} // namespace
diff --git a/extra/yassl/src/timer.cpp b/extra/yassl/src/timer.cpp
deleted file mode 100644
index dadb3ebf378..00000000000
--- a/extra/yassl/src/timer.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* timer.cpp implements a high res and low res timer
- *
-*/
-
-#include "runtime.hpp"
-#include "timer.hpp"
-
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
-#else
-#include <sys/time.h>
-#endif
-
-namespace yaSSL {
-
-#ifdef _WIN32
-
- timer_d timer()
- {
- static bool init(false);
- static LARGE_INTEGER freq;
-
- if (!init) {
- QueryPerformanceFrequency(&freq);
- init = true;
- }
-
- LARGE_INTEGER count;
- QueryPerformanceCounter(&count);
-
- return static_cast<double>(count.QuadPart) / freq.QuadPart;
- }
-
-
- uint lowResTimer()
- {
- return static_cast<uint>(timer());
- }
-
-#else // _WIN32
-
- timer_d timer()
- {
- struct timeval tv;
- gettimeofday(&tv, 0);
-
- return static_cast<double>(tv.tv_sec)
- + static_cast<double>(tv.tv_usec) / 1000000;
- }
-
-
- uint lowResTimer()
- {
- struct timeval tv;
- gettimeofday(&tv, 0);
-
- return tv.tv_sec;
- }
-
-
-#endif // _WIN32
-} // namespace yaSSL
diff --git a/extra/yassl/src/yassl.cpp b/extra/yassl/src/yassl.cpp
deleted file mode 100644
index 89600359401..00000000000
--- a/extra/yassl/src/yassl.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL implements external API
- */
-
-#include "runtime.hpp"
-#include "yassl.hpp"
-#include "yassl_int.hpp"
-#include "handshake.hpp"
-#include <stdio.h>
-
-#include "openssl/ssl.h" // get rid of this
-
-
-
-namespace yaSSL {
-
-
-
-struct Base {
- SSL_METHOD* method_;
- SSL_CTX* ctx_;
- SSL* ssl_;
-
- char* ca_;
- char* cert_;
- char* key_;
-
- DH* dh_;
-
- Base() : method_(0), ctx_(0), ssl_(0), ca_(0), cert_(0), key_(0), dh_(0)
- {}
-
- ~Base()
- {
- if (dh_) DH_free(dh_);
- delete[] key_;
- delete[] cert_;
- delete[] ca_;
- SSL_CTX_free(ctx_); // frees method_ too
- SSL_free(ssl_);
- }
-};
-
-
-void SetDH(Base&);
-
-void SetUpBase(Base& base, ConnectionEnd end, SOCKET_T s)
-{
- base.method_ = new SSL_METHOD(end, ProtocolVersion(3,1));
- base.ctx_ = new SSL_CTX(base.method_);
-
- if (base.ca_)
- if (SSL_CTX_load_verify_locations(base.ctx_,
- base.ca_, 0) != SSL_SUCCESS) throw(0);
- if (base.cert_)
- if (SSL_CTX_use_certificate_file(base.ctx_,
- base.cert_, SSL_FILETYPE_PEM) != SSL_SUCCESS) throw(0);
- if (base.key_)
- if (SSL_CTX_use_PrivateKey_file(base.ctx_, base.key_,
- SSL_FILETYPE_PEM) != SSL_SUCCESS) throw(0);
-
- if (end == server_end) SetDH(base);
-
- base.ssl_ = new SSL(base.ctx_);
- base.ssl_->useSocket().set_fd(s);
-}
-
-
-void SetDH(Base& base)
-{
- static unsigned char dh512_p[] =
- {
- 0xDA,0x58,0x3C,0x16,0xD9,0x85,0x22,0x89,0xD0,0xE4,0xAF,0x75,
- 0x6F,0x4C,0xCA,0x92,0xDD,0x4B,0xE5,0x33,0xB8,0x04,0xFB,0x0F,
- 0xED,0x94,0xEF,0x9C,0x8A,0x44,0x03,0xED,0x57,0x46,0x50,0xD3,
- 0x69,0x99,0xDB,0x29,0xD7,0x76,0x27,0x6B,0xA2,0xD3,0xD4,0x12,
- 0xE2,0x18,0xF4,0xDD,0x1E,0x08,0x4C,0xF6,0xD8,0x00,0x3E,0x7C,
- 0x47,0x74,0xE8,0x33,
- };
-
- static unsigned char dh512_g[] =
- {
- 0x02,
- };
-
- if ( (base.dh_ = DH_new()) ) {
- base.dh_->p = BN_bin2bn(dh512_p, sizeof(dh512_p), 0);
- base.dh_->g = BN_bin2bn(dh512_g, sizeof(dh512_g), 0);
- }
- if (!base.dh_->p || !base.dh_->g) {
- DH_free(base.dh_);
- base.dh_ = 0;
- }
- SSL_CTX_set_tmp_dh(base.ctx_, base.dh_);
-}
-
-
-void NewCopy(char*& dst, const char* src)
-{
- size_t len = strlen(src) + 1;
- dst = new char[len];
-
- strncpy(dst, src, len);
-}
-
-
-// Client Implementation
-struct Client::ClientImpl {
- Base base_;
-};
-
-
-Client::Client() : pimpl_(new ClientImpl)
-{}
-
-
-Client::~Client() { delete pimpl_; }
-
-
-int Client::Connect(SOCKET_T s)
-{
- SetUpBase(pimpl_->base_, client_end, s);
- return SSL_connect(pimpl_->base_.ssl_);
-}
-
-
-int Client::Write(const void* buffer, int sz)
-{
- return sendData(*pimpl_->base_.ssl_, buffer, sz);
-}
-
-
-int Client::Read(void* buffer, int sz)
-{
- Data data(min(sz, MAX_RECORD_SIZE), static_cast<opaque*>(buffer));
- return receiveData(*pimpl_->base_.ssl_, data);
-}
-
-
-void Client::SetCA(const char* name)
-{
- NewCopy(pimpl_->base_.ca_, name);
-}
-
-
-void Client::SetCert(const char* name)
-{
- NewCopy(pimpl_->base_.cert_, name);
-}
-
-
-void Client::SetKey(const char* name)
-{
- NewCopy(pimpl_->base_.key_, name);
-}
-
-
-
-// Server Implementation
-struct Server::ServerImpl {
- Base base_;
-};
-
-
-Server::Server() : pimpl_(new ServerImpl)
-{}
-
-
-Server::~Server() { delete pimpl_; }
-
-
-int Server::Accept(SOCKET_T s)
-{
- SetUpBase(pimpl_->base_, server_end, s);
- return SSL_accept(pimpl_->base_.ssl_);
-}
-
-
-int Server::Write(const void* buffer, int sz)
-{
- return sendData(*pimpl_->base_.ssl_, buffer, sz);
-}
-
-
-int Server::Read(void* buffer, int sz)
-{
- Data data(min(sz, MAX_RECORD_SIZE), static_cast<opaque*>(buffer));
- return receiveData(*pimpl_->base_.ssl_, data);
-}
-
-
-void Server::SetCA(const char* name)
-{
- NewCopy(pimpl_->base_.ca_, name);
-}
-
-
-void Server::SetCert(const char* name)
-{
- NewCopy(pimpl_->base_.cert_, name);
-}
-
-
-void Server::SetKey(const char* name)
-{
- NewCopy(pimpl_->base_.key_, name);
-}
-
-
-
-} // namespace yaSSL
diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp
deleted file mode 100644
index 61dbbfcee65..00000000000
--- a/extra/yassl/src/yassl_error.cpp
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- Copyright (c) 2005, 2013, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL error implements and an exception class
- */
-
-#include "runtime.hpp"
-#include "yassl_error.hpp"
-#include "error.hpp" // TaoCrypt error numbers
-#include "openssl/ssl.h" // SSL_ERROR_WANT_READ
-#include <string.h> // strncpy
-
-#ifdef _MSC_VER
- // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy
- #pragma warning(disable: 4996)
-#endif
-
-namespace yaSSL {
-
-
-/* may bring back in future
-Error::Error(const char* s, YasslError e, Library l)
- : mySTL::runtime_error(s), error_(e), lib_(l)
-{
-}
-
-
-YasslError Error::get_number() const
-{
- return error_;
-}
-
-
-Library Error::get_lib() const
-{
-
- return lib_;
-}
-*/
-
-
-void SetErrorString(YasslError error, char* buffer)
-{
- using namespace TaoCrypt;
- const int max = MAX_ERROR_SZ; // shorthand
- int localError = error; // errors from a few enums
-
- switch (localError) {
-
- // yaSSL proper errors
- case range_error :
- strncpy(buffer, "buffer index error, out of range", max);
- break;
-
- case realloc_error :
- strncpy(buffer, "trying to realloc a fixed buffer", max);
- break;
-
- case factory_error :
- strncpy(buffer, "unknown factory create request", max);
- break;
-
- case unknown_cipher :
- strncpy(buffer, "trying to use an unknown cipher", max);
- break;
-
- case prefix_error :
- strncpy(buffer, "bad master secret derivation, prefix too big", max);
- break;
-
- case record_layer :
- strncpy(buffer, "record layer not ready yet", max);
- break;
-
- case handshake_layer :
- strncpy(buffer, "handshake layer not ready yet", max);
- break;
-
- case out_of_order :
- strncpy(buffer, "handshake message received in wrong order", max);
- break;
-
- case bad_input :
- strncpy(buffer, "bad cipher suite input", max);
- break;
-
- case match_error :
- strncpy(buffer, "unable to match a supported cipher suite", max);
- break;
-
- case no_key_file :
- strncpy(buffer, "the server needs a private key file", max);
- break;
-
- case verify_error :
- strncpy(buffer, "unable to verify peer checksum", max);
- break;
-
- case send_error :
- strncpy(buffer, "socket layer send error", max);
- break;
-
- case receive_error :
- strncpy(buffer, "socket layer receive error", max);
- break;
-
- case certificate_error :
- strncpy(buffer, "unable to process cerificate", max);
- break;
-
- case privateKey_error :
- strncpy(buffer, "unable to process private key, bad format", max);
- break;
-
- case badVersion_error :
- strncpy(buffer, "protocol version mismatch", max);
- break;
-
- case compress_error :
- strncpy(buffer, "compression error", max);
- break;
-
- case decompress_error :
- strncpy(buffer, "decompression error", max);
- break;
-
- case pms_version_error :
- strncpy(buffer, "bad PreMasterSecret version error", max);
- break;
-
- case sanityCipher_error :
- strncpy(buffer, "sanity check on cipher text size error", max);
- break;
-
- case rsaSignFault_error:
- strncpy(buffer, "rsa signature fault error", max);
- break;
-
- // openssl errors
- case SSL_ERROR_WANT_READ :
- strncpy(buffer, "the read operation would block", max);
- break;
-
- case SSL_ERROR_WANT_WRITE :
- strncpy(buffer, "the write operation would block", max);
- break;
-
- case CERTFICATE_ERROR :
- strncpy(buffer, "Unable to verify certificate", max);
- break;
-
- // TaoCrypt errors
- case NO_ERROR_E :
- strncpy(buffer, "not in error state", max);
- break;
-
- case WINCRYPT_E :
- strncpy(buffer, "bad wincrypt acquire", max);
- break;
-
- case CRYPTGEN_E :
- strncpy(buffer, "CryptGenRandom error", max);
- break;
-
- case OPEN_RAN_E :
- strncpy(buffer, "unable to use random device", max);
- break;
-
- case READ_RAN_E :
- strncpy(buffer, "unable to use random device", max);
- break;
-
- case INTEGER_E :
- strncpy(buffer, "ASN: bad DER Integer Header", max);
- break;
-
- case SEQUENCE_E :
- strncpy(buffer, "ASN: bad Sequence Header", max);
- break;
-
- case SET_E :
- strncpy(buffer, "ASN: bad Set Header", max);
- break;
-
- case VERSION_E :
- strncpy(buffer, "ASN: version length not 1", max);
- break;
-
- case SIG_OID_E :
- strncpy(buffer, "ASN: signature OID mismatch", max);
- break;
-
- case BIT_STR_E :
- strncpy(buffer, "ASN: bad BitString Header", max);
- break;
-
- case UNKNOWN_OID_E :
- strncpy(buffer, "ASN: unknown key OID type", max);
- break;
-
- case OBJECT_ID_E :
- strncpy(buffer, "ASN: bad Ojbect ID Header", max);
- break;
-
- case TAG_NULL_E :
- strncpy(buffer, "ASN: expected TAG NULL", max);
- break;
-
- case EXPECT_0_E :
- strncpy(buffer, "ASN: expected 0", max);
- break;
-
- case OCTET_STR_E :
- strncpy(buffer, "ASN: bad Octet String Header", max);
- break;
-
- case TIME_E :
- strncpy(buffer, "ASN: bad TIME", max);
- break;
-
- case DATE_SZ_E :
- strncpy(buffer, "ASN: bad Date Size", max);
- break;
-
- case SIG_LEN_E :
- strncpy(buffer, "ASN: bad Signature Length", max);
- break;
-
- case UNKNOWN_SIG_E :
- strncpy(buffer, "ASN: unknown signature OID", max);
- break;
-
- case UNKNOWN_HASH_E :
- strncpy(buffer, "ASN: unknown hash OID", max);
- break;
-
- case DSA_SZ_E :
- strncpy(buffer, "ASN: bad DSA r or s size", max);
- break;
-
- case BEFORE_DATE_E :
- strncpy(buffer, "ASN: before date in the future", max);
- break;
-
- case AFTER_DATE_E :
- strncpy(buffer, "ASN: after date in the past", max);
- break;
-
- case SIG_CONFIRM_E :
- strncpy(buffer, "ASN: bad self signature confirmation", max);
- break;
-
- case SIG_OTHER_E :
- strncpy(buffer, "ASN: bad other signature confirmation", max);
- break;
-
- case CONTENT_E :
- strncpy(buffer, "bad content processing", max);
- break;
-
- case PEM_E :
- strncpy(buffer, "bad PEM format processing", max);
- break;
-
- default :
- strncpy(buffer, "unknown error number", max);
- }
-}
-
-
-
-} // namespace yaSSL
diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp
deleted file mode 100644
index a4b1b50e10f..00000000000
--- a/extra/yassl/src/yassl_imp.cpp
+++ /dev/null
@@ -1,2636 +0,0 @@
-/*
- Copyright (c) 2005, 2017, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* yaSSL source implements all SSL.v3 secification structures.
- */
-
-#include "runtime.hpp"
-#include "yassl_int.hpp"
-#include "handshake.hpp"
-
-#include "asn.hpp" // provide crypto wrapper??
-#include <my_attribute.h>
-
-
-namespace yaSSL {
-
-
-namespace { // locals
-
-bool isTLS(ProtocolVersion pv)
-{
- if (pv.major_ >= 3 && pv.minor_ >= 1)
- return true;
-
- return false;
-}
-
-
-} // namespace (locals)
-
-
-void hashHandShake(SSL&, const input_buffer&, uint);
-
-
-ProtocolVersion::ProtocolVersion(uint8 maj, uint8 min)
- : major_(maj), minor_(min)
-{}
-
-
-// construct key exchange with known ssl parms
-void ClientKeyExchange::createKey(SSL& ssl)
-{
- const ClientKeyFactory& ckf = ssl.getFactory().getClientKey();
- client_key_ = ckf.CreateObject(ssl.getSecurity().get_parms().kea_);
-
- if (!client_key_)
- ssl.SetError(factory_error);
-}
-
-
-// construct key exchange with known ssl parms
-void ServerKeyExchange::createKey(SSL& ssl)
-{
- const ServerKeyFactory& skf = ssl.getFactory().getServerKey();
- server_key_ = skf.CreateObject(ssl.getSecurity().get_parms().kea_);
-
- if (!server_key_)
- ssl.SetError(factory_error);
-}
-
-
-// build/set PreMaster secret and encrypt, client side
-void EncryptedPreMasterSecret::build(SSL& ssl)
-{
- opaque tmp[SECRET_LEN];
- memset(tmp, 0, sizeof(tmp));
- ssl.getCrypto().get_random().Fill(tmp, SECRET_LEN);
- ProtocolVersion pv = ssl.getSecurity().get_connection().chVersion_;
- tmp[0] = pv.major_;
- tmp[1] = pv.minor_;
- ssl.set_preMaster(tmp, SECRET_LEN);
-
- const CertManager& cert = ssl.getCrypto().get_certManager();
- RSA rsa(cert.get_peerKey(), cert.get_peerKeyLength());
- bool tls = ssl.isTLS(); // if TLS, put length for encrypted data
- alloc(rsa.get_cipherLength() + (tls ? 2 : 0));
- byte* holder = secret_;
- if (tls) {
- byte len[2];
- c16toa(rsa.get_cipherLength(), len);
- memcpy(secret_, len, sizeof(len));
- holder += 2;
- }
- rsa.encrypt(holder, tmp, SECRET_LEN, ssl.getCrypto().get_random());
-}
-
-
-// build/set premaster and Client Public key, client side
-void ClientDiffieHellmanPublic::build(SSL& ssl)
-{
- DiffieHellman& dhServer = ssl.useCrypto().use_dh();
- DiffieHellman dhClient(dhServer);
-
- uint keyLength = dhClient.get_agreedKeyLength(); // pub and agree same
-
- alloc(keyLength, true);
- dhClient.makeAgreement(dhServer.get_publicKey(),
- dhServer.get_publicKeyLength());
- c16toa(keyLength, Yc_);
- memcpy(Yc_ + KEY_OFFSET, dhClient.get_publicKey(), keyLength);
-
- ssl.set_preMaster(dhClient.get_agreedKey(), keyLength);
-}
-
-
-// build server exhange, server side
-void DH_Server::build(SSL& ssl)
-{
- DiffieHellman& dhServer = ssl.useCrypto().use_dh();
-
- int pSz, gSz, pubSz;
- dhServer.set_sizes(pSz, gSz, pubSz);
- dhServer.get_parms(parms_.alloc_p(pSz), parms_.alloc_g(gSz),
- parms_.alloc_pub(pubSz));
-
- short sigSz = 0;
- mySTL::auto_ptr<Auth> auth;
- const CertManager& cert = ssl.getCrypto().get_certManager();
-
- if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) {
- if (cert.get_keyType() != rsa_sa_algo) {
- ssl.SetError(privateKey_error);
- return;
- }
- auth.reset(NEW_YS RSA(cert.get_privateKey(),
- cert.get_privateKeyLength(), false));
- }
- else {
- if (cert.get_keyType() != dsa_sa_algo) {
- ssl.SetError(privateKey_error);
- return;
- }
- auth.reset(NEW_YS DSS(cert.get_privateKey(),
- cert.get_privateKeyLength(), false));
- sigSz += DSS_ENCODED_EXTRA;
- }
-
- sigSz += auth->get_signatureLength();
- if (!sigSz) {
- ssl.SetError(privateKey_error);
- return;
- }
-
- length_ = 8; // pLen + gLen + YsLen + SigLen
- length_ += pSz + gSz + pubSz + sigSz;
-
- output_buffer tmp(length_);
- byte len[2];
- // P
- c16toa(pSz, len);
- tmp.write(len, sizeof(len));
- tmp.write(parms_.get_p(), pSz);
- // G
- c16toa(gSz, len);
- tmp.write(len, sizeof(len));
- tmp.write(parms_.get_g(), gSz);
- // Ys
- c16toa(pubSz, len);
- tmp.write(len, sizeof(len));
- tmp.write(parms_.get_pub(), pubSz);
-
- // Sig
- byte hash[FINISHED_SZ];
- MD5 md5;
- SHA sha;
- signature_ = NEW_YS byte[sigSz];
-
- const Connection& conn = ssl.getSecurity().get_connection();
- // md5
- md5.update(conn.client_random_, RAN_LEN);
- md5.update(conn.server_random_, RAN_LEN);
- md5.update(tmp.get_buffer(), tmp.get_size());
- md5.get_digest(hash);
-
- // sha
- sha.update(conn.client_random_, RAN_LEN);
- sha.update(conn.server_random_, RAN_LEN);
- sha.update(tmp.get_buffer(), tmp.get_size());
- sha.get_digest(&hash[MD5_LEN]);
-
- if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) {
- auth->sign(signature_, hash, sizeof(hash),
- ssl.getCrypto().get_random());
- // check for rsa signautre fault
- if (!auth->verify(hash, sizeof(hash), signature_,
- auth->get_signatureLength())) {
- ssl.SetError(rsaSignFault_error);
- return;
- }
- }
- else {
- auth->sign(signature_, &hash[MD5_LEN], SHA_LEN,
- ssl.getCrypto().get_random());
- byte encoded[DSS_SIG_SZ + DSS_ENCODED_EXTRA];
- TaoCrypt::EncodeDSA_Signature(signature_, encoded);
- memcpy(signature_, encoded, sizeof(encoded));
- }
-
- c16toa(sigSz, len);
- tmp.write(len, sizeof(len));
- tmp.write(signature_, sigSz);
-
- // key message
- keyMessage_ = NEW_YS opaque[length_];
- memcpy(keyMessage_, tmp.get_buffer(), tmp.get_size());
-}
-
-
-// read PreMaster secret and decrypt, server side
-void EncryptedPreMasterSecret::read(SSL& ssl, input_buffer& input)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- const CertManager& cert = ssl.getCrypto().get_certManager();
- RSA rsa(cert.get_privateKey(), cert.get_privateKeyLength(), false);
- uint16 cipherLen = rsa.get_cipherLength();
- if (ssl.isTLS()) {
- byte len[2];
- len[0] = input[AUTO];
- len[1] = input[AUTO];
- ato16(len, cipherLen);
- }
- alloc(cipherLen);
- input.read(secret_, length_);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- opaque preMasterSecret[SECRET_LEN];
- memset(preMasterSecret, 0, sizeof(preMasterSecret));
- rsa.decrypt(preMasterSecret, secret_, length_,
- ssl.getCrypto().get_random());
-
- ProtocolVersion pv = ssl.getSecurity().get_connection().chVersion_;
- if (pv.major_ != preMasterSecret[0] || pv.minor_ != preMasterSecret[1])
- ssl.SetError(pms_version_error); // continue deriving for timing attack
-
- ssl.set_preMaster(preMasterSecret, SECRET_LEN);
- ssl.makeMasterSecret();
-}
-
-
-EncryptedPreMasterSecret::EncryptedPreMasterSecret()
- : secret_(0), length_(0)
-{}
-
-
-EncryptedPreMasterSecret::~EncryptedPreMasterSecret()
-{
- ysArrayDelete(secret_);
-}
-
-
-int EncryptedPreMasterSecret::get_length() const
-{
- return length_;
-}
-
-
-opaque* EncryptedPreMasterSecret::get_clientKey() const
-{
- return secret_;
-}
-
-
-void EncryptedPreMasterSecret::alloc(int sz)
-{
- length_ = sz;
- secret_ = NEW_YS opaque[sz];
-}
-
-
-// read client's public key, server side
-void ClientDiffieHellmanPublic::read(SSL& ssl, input_buffer& input)
-{
- if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) {
- ssl.SetError(bad_input);
- return;
- }
-
- DiffieHellman& dh = ssl.useCrypto().use_dh();
-
- uint16 keyLength;
- byte tmp[2];
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, keyLength);
-
- if (keyLength < dh.get_agreedKeyLength()/2) {
- ssl.SetError(bad_input);
- return;
- }
-
- alloc(keyLength);
- input.read(Yc_, keyLength);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
- dh.makeAgreement(Yc_, keyLength);
-
- ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength());
- ssl.makeMasterSecret();
-}
-
-
-ClientDiffieHellmanPublic::ClientDiffieHellmanPublic()
- : length_(0), Yc_(0)
-{}
-
-
-ClientDiffieHellmanPublic::~ClientDiffieHellmanPublic()
-{
- ysArrayDelete(Yc_);
-}
-
-
-int ClientDiffieHellmanPublic::get_length() const
-{
- return length_;
-}
-
-
-opaque* ClientDiffieHellmanPublic::get_clientKey() const
-{
- return Yc_;
-}
-
-
-void ClientDiffieHellmanPublic::alloc(int sz, bool offset)
-{
- length_ = sz + (offset ? KEY_OFFSET : 0);
- Yc_ = NEW_YS opaque[length_];
-}
-
-
-// read server's p, g, public key and sig, client side
-void DH_Server::read(SSL& ssl, input_buffer& input)
-{
- if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) {
- ssl.SetError(bad_input);
- return;
- }
- uint16 length, messageTotal = 6; // pSz + gSz + pubSz
- byte tmp[2];
-
- // p
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, length);
- messageTotal += length;
-
- input.read(parms_.alloc_p(length), length);
- if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) {
- ssl.SetError(bad_input);
- return;
- }
-
- // g
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, length);
- messageTotal += length;
-
- input.read(parms_.alloc_g(length), length);
- if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) {
- ssl.SetError(bad_input);
- return;
- }
-
- // pub
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, length);
- messageTotal += length;
-
- input.read(parms_.alloc_pub(length), length);
- if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) {
- ssl.SetError(bad_input);
- return;
- }
-
- // save message for hash verify
- input_buffer message(messageTotal);
- input.set_current(input.get_current() - messageTotal);
- input.read(message.get_buffer(), messageTotal);
- message.add_size(messageTotal);
- if (input.get_error() || input.get_remaining() < (uint)LENGTH_SZ) {
- ssl.SetError(bad_input);
- return;
- }
-
- // signature
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, length);
-
- if (length == 0) {
- ssl.SetError(bad_input);
- return;
- }
- signature_ = NEW_YS byte[length];
- input.read(signature_, length);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- // verify signature
- byte hash[FINISHED_SZ];
- MD5 md5;
- SHA sha;
-
- const Connection& conn = ssl.getSecurity().get_connection();
- // md5
- md5.update(conn.client_random_, RAN_LEN);
- md5.update(conn.server_random_, RAN_LEN);
- md5.update(message.get_buffer(), message.get_size());
- md5.get_digest(hash);
-
- // sha
- sha.update(conn.client_random_, RAN_LEN);
- sha.update(conn.server_random_, RAN_LEN);
- sha.update(message.get_buffer(), message.get_size());
- sha.get_digest(&hash[MD5_LEN]);
-
- const CertManager& cert = ssl.getCrypto().get_certManager();
-
- if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) {
- RSA rsa(cert.get_peerKey(), cert.get_peerKeyLength());
- if (!rsa.verify(hash, sizeof(hash), signature_, length))
- ssl.SetError(verify_error);
- }
- else {
- byte decodedSig[DSS_SIG_SZ];
- length = TaoCrypt::DecodeDSA_Signature(decodedSig, signature_, length);
-
- DSS dss(cert.get_peerKey(), cert.get_peerKeyLength());
- if (!dss.verify(&hash[MD5_LEN], SHA_LEN, decodedSig, length))
- ssl.SetError(verify_error);
- }
-
- // save input
- ssl.useCrypto().SetDH(NEW_YS DiffieHellman(parms_.get_p(),
- parms_.get_pSize(), parms_.get_g(), parms_.get_gSize(),
- parms_.get_pub(), parms_.get_pubSize(),
- ssl.getCrypto().get_random()));
-}
-
-
-DH_Server::DH_Server()
- : signature_(0), length_(0), keyMessage_(0)
-{}
-
-
-DH_Server::~DH_Server()
-{
- ysArrayDelete(keyMessage_);
- ysArrayDelete(signature_);
-}
-
-
-int DH_Server::get_length() const
-{
- return length_;
-}
-
-
-opaque* DH_Server::get_serverKey() const
-{
- return keyMessage_;
-}
-
-
-// set available suites
-Parameters::Parameters(ConnectionEnd ce, const Ciphers& ciphers,
- ProtocolVersion pv, bool haveDH) : entity_(ce)
-{
- pending_ = true; // suite not set yet
- strncpy(cipher_name_, "NONE", 5);
-
- removeDH_ = !haveDH; // only use on server side for set suites
-
- if (ciphers.setSuites_) { // use user set list
- suites_size_ = ciphers.suiteSz_;
- memcpy(suites_, ciphers.suites_, ciphers.suiteSz_);
- SetCipherNames();
- }
- else
- SetSuites(pv, ce == server_end && removeDH_); // defaults
-
-}
-
-
-void Parameters::SetSuites(ProtocolVersion pv, bool removeDH, bool removeRSA,
- bool removeDSA)
-{
- int i = 0;
- // available suites, best first
- // when adding more, make sure cipher_names is updated and
- // MAX_CIPHERS is big enough
-
- if (isTLS(pv)) {
- if (!removeDH) {
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_SHA;
- }
- if (!removeDSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_DSS_WITH_AES_256_CBC_SHA;
- }
- }
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_RSA_WITH_AES_256_CBC_SHA;
- }
- if (!removeDH) {
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_RSA_WITH_AES_128_CBC_SHA;
- }
- if (!removeDSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_DSS_WITH_AES_128_CBC_SHA;
- }
- }
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_RSA_WITH_AES_128_CBC_SHA;
- suites_[i++] = 0x00;
- suites_[i++] = TLS_RSA_WITH_AES_256_CBC_RMD160;
- suites_[i++] = 0x00;
- suites_[i++] = TLS_RSA_WITH_AES_128_CBC_RMD160;
- suites_[i++] = 0x00;
- suites_[i++] = TLS_RSA_WITH_3DES_EDE_CBC_RMD160;
- }
- if (!removeDH) {
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_RSA_WITH_AES_256_CBC_RMD160;
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_RSA_WITH_AES_128_CBC_RMD160;
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160;
- }
- if (!removeDSA) {
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_DSS_WITH_AES_256_CBC_RMD160;
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_DSS_WITH_AES_128_CBC_RMD160;
- suites_[i++] = 0x00;
- suites_[i++] = TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160;
- }
- }
- }
-
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = SSL_RSA_WITH_RC4_128_SHA;
- suites_[i++] = 0x00;
- suites_[i++] = SSL_RSA_WITH_RC4_128_MD5;
-
- suites_[i++] = 0x00;
- suites_[i++] = SSL_RSA_WITH_3DES_EDE_CBC_SHA;
- suites_[i++] = 0x00;
- suites_[i++] = SSL_RSA_WITH_DES_CBC_SHA;
- }
- if (!removeDH) {
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA;
- }
- if (!removeDSA) {
- suites_[i++] = 0x00;
- suites_[i++] = SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA;
- }
- if (!removeRSA) {
- suites_[i++] = 0x00;
- suites_[i++] = SSL_DHE_RSA_WITH_DES_CBC_SHA;
- }
- if (!removeDSA) {
- suites_[i++] = 0x00;
- suites_[i++] = SSL_DHE_DSS_WITH_DES_CBC_SHA;
- }
- }
-
- suites_size_ = i;
-
- SetCipherNames();
-}
-
-
-void Parameters::SetCipherNames()
-{
- const int suites = suites_size_ / 2;
- int pos = 0;
-
- for (int j = 0; j < suites; j++) {
- int index = suites_[j*2 + 1]; // every other suite is suite id
- size_t len = strlen(cipher_names[index]) + 1;
- strncpy(cipher_list_[pos++], cipher_names[index], len);
- }
- cipher_list_[pos][0] = 0;
-}
-
-
-// input operator for RecordLayerHeader, adjust stream
-input_buffer& operator>>(input_buffer& input, RecordLayerHeader& hdr)
-{
- hdr.type_ = ContentType(input[AUTO]);
- hdr.version_.major_ = input[AUTO];
- hdr.version_.minor_ = input[AUTO];
-
- // length
- byte tmp[2];
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, hdr.length_);
-
- return input;
-}
-
-
-// output operator for RecordLayerHeader
-output_buffer& operator<<(output_buffer& output, const RecordLayerHeader& hdr)
-{
- output[AUTO] = hdr.type_;
- output[AUTO] = hdr.version_.major_;
- output[AUTO] = hdr.version_.minor_;
-
- // length
- byte tmp[2];
- c16toa(hdr.length_, tmp);
- output[AUTO] = tmp[0];
- output[AUTO] = tmp[1];
-
- return output;
-}
-
-
-// virtual input operator for Messages
-input_buffer& operator>>(input_buffer& input, Message& msg)
-{
- return msg.set(input);
-}
-
-// virtual output operator for Messages
-output_buffer& operator<<(output_buffer& output, const Message& msg)
-{
- return msg.get(output);
-}
-
-
-// input operator for HandShakeHeader
-input_buffer& operator>>(input_buffer& input, HandShakeHeader& hs)
-{
- hs.type_ = HandShakeType(input[AUTO]);
-
- hs.length_[0] = input[AUTO];
- hs.length_[1] = input[AUTO];
- hs.length_[2] = input[AUTO];
-
- return input;
-}
-
-
-// output operator for HandShakeHeader
-output_buffer& operator<<(output_buffer& output, const HandShakeHeader& hdr)
-{
- output[AUTO] = hdr.type_;
- output.write(hdr.length_, sizeof(hdr.length_));
- return output;
-}
-
-
-// HandShake Header Processing function
-void HandShakeHeader::Process(input_buffer& input, SSL& ssl)
-{
- ssl.verifyState(*this);
- if (ssl.GetError()) return;
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
- const HandShakeFactory& hsf = ssl.getFactory().getHandShake();
- mySTL::auto_ptr<HandShakeBase> hs(hsf.CreateObject(type_));
- if (!hs.get()) {
- ssl.SetError(factory_error);
- return;
- }
-
- uint len = c24to32(length_);
- if (len > input.get_remaining()) {
- ssl.SetError(bad_input);
- return;
- }
- hashHandShake(ssl, input, len);
-
- hs->set_length(len);
- input >> *hs;
- hs->Process(input, ssl);
-}
-
-
-ContentType HandShakeHeader::get_type() const
-{
- return handshake;
-}
-
-
-uint16 HandShakeHeader::get_length() const
-{
- return c24to32(length_);
-}
-
-
-HandShakeType HandShakeHeader::get_handshakeType() const
-{
- return type_;
-}
-
-
-void HandShakeHeader::set_type(HandShakeType hst)
-{
- type_ = hst;
-}
-
-
-void HandShakeHeader::set_length(uint32 u32)
-{
- c32to24(u32, length_);
-}
-
-
-input_buffer& HandShakeHeader::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& HandShakeHeader::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-
-int HandShakeBase::get_length() const
-{
- return length_;
-}
-
-
-void HandShakeBase::set_length(int l)
-{
- length_ = l;
-}
-
-
-// for building buffer's type field
-HandShakeType HandShakeBase::get_type() const
-{
- return no_shake;
-}
-
-
-input_buffer& HandShakeBase::set(input_buffer& in)
-{
- return in;
-}
-
-
-output_buffer& HandShakeBase::get(output_buffer& out) const
-{
- return out;
-}
-
-
-void HandShakeBase::Process(input_buffer&, SSL&)
-{}
-
-
-input_buffer& HelloRequest::set(input_buffer& in)
-{
- return in;
-}
-
-
-output_buffer& HelloRequest::get(output_buffer& out) const
-{
- return out;
-}
-
-
-void HelloRequest::Process(input_buffer&, SSL&)
-{}
-
-
-HandShakeType HelloRequest::get_type() const
-{
- return hello_request;
-}
-
-
-// input operator for CipherSpec
-input_buffer& operator>>(input_buffer& input, ChangeCipherSpec& cs)
-{
- cs.type_ = CipherChoice(input[AUTO]);
- return input;
-}
-
-// output operator for CipherSpec
-output_buffer& operator<<(output_buffer& output, const ChangeCipherSpec& cs)
-{
- output[AUTO] = cs.type_;
- return output;
-}
-
-
-ChangeCipherSpec::ChangeCipherSpec()
- : type_(change_cipher_spec_choice)
-{}
-
-
-input_buffer& ChangeCipherSpec::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& ChangeCipherSpec::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-ContentType ChangeCipherSpec::get_type() const
-{
- return change_cipher_spec;
-}
-
-
-uint16 ChangeCipherSpec::get_length() const
-{
- return SIZEOF_ENUM;
-}
-
-
-// CipherSpec processing handler
-void ChangeCipherSpec::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- // detect duplicate change_cipher
- if (ssl.getSecurity().get_parms().pending_ == false) {
- ssl.order_error();
- return;
- }
-
- ssl.useSecurity().use_parms().pending_ = false;
- if (ssl.getSecurity().get_resuming()) {
- if (ssl.getSecurity().get_parms().entity_ == client_end)
- buildFinished(ssl, ssl.useHashes().use_verify(), server); // server
- }
- else if (ssl.getSecurity().get_parms().entity_ == server_end)
- buildFinished(ssl, ssl.useHashes().use_verify(), client); // client
-}
-
-
-Alert::Alert(AlertLevel al, AlertDescription ad)
- : level_(al), description_(ad)
-{}
-
-
-ContentType Alert::get_type() const
-{
- return alert;
-}
-
-
-uint16 Alert::get_length() const
-{
- return SIZEOF_ENUM * 2;
-}
-
-
-input_buffer& Alert::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& Alert::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-// input operator for Alert
-input_buffer& operator>>(input_buffer& input, Alert& a)
-{
- a.level_ = AlertLevel(input[AUTO]);
- a.description_ = AlertDescription(input[AUTO]);
-
- return input;
-}
-
-
-// output operator for Alert
-output_buffer& operator<<(output_buffer& output, const Alert& a)
-{
- output[AUTO] = a.level_;
- output[AUTO] = a.description_;
- return output;
-}
-
-
-// Alert processing handler
-void Alert::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- if (ssl.getSecurity().get_parms().pending_ == false) { // encrypted alert
- int aSz = get_length(); // alert size already read on input
- opaque verify[SHA_LEN];
- const opaque* data = input.get_buffer() + input.get_current() - aSz;
-
- if (ssl.isTLS())
- TLS_hmac(ssl, verify, data, aSz, alert, true);
- else
- hmac(ssl, verify, data, aSz, alert, true);
-
- // read mac and skip fill
- int digestSz = ssl.getCrypto().get_digest().get_digestSize();
- opaque mac[SHA_LEN];
- input.read(mac, digestSz);
-
- if (ssl.getSecurity().get_parms().cipher_type_ == block) {
- int ivExtra = 0;
- opaque fill __attribute__((unused));
-
- if (ssl.isTLSv1_1())
- ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
- int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra -
- aSz - digestSz;
- for (int i = 0; i < padSz; i++)
- fill = input[AUTO];
- }
-
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- // verify
- if (memcmp(mac, verify, digestSz)) {
- ssl.SetError(verify_error);
- return;
- }
- }
- if (level_ == fatal) {
- ssl.useStates().useRecord() = recordNotReady;
- ssl.useStates().useHandShake() = handShakeNotReady;
- ssl.SetError(YasslError(description_));
- }
-}
-
-
-Data::Data()
- : length_(0), buffer_(0), write_buffer_(0)
-{}
-
-
-Data::Data(uint16 len, opaque* b)
- : length_(len), buffer_(b), write_buffer_(0)
-{}
-
-
-void Data::SetData(uint16 len, const opaque* buffer)
-{
- length_ = len;
- write_buffer_ = buffer;
-}
-
-input_buffer& Data::set(input_buffer& in)
-{
- return in;
-}
-
-
-output_buffer& Data::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-ContentType Data::get_type() const
-{
- return application_data;
-}
-
-
-uint16 Data::get_length() const
-{
- return length_;
-}
-
-
-void Data::set_length(uint16 l)
-{
- length_ = l;
-}
-
-
-opaque* Data::set_buffer()
-{
- return buffer_;
-}
-
-
-// output operator for Data
-output_buffer& operator<<(output_buffer& output, const Data& data)
-{
- output.write(data.write_buffer_, data.length_);
- return output;
-}
-
-
-// check all bytes for equality
-static int constant_compare(const byte* a, const byte* b, int len)
-{
- int good = 0;
- int bad = 0;
-
- for (int i = 0; i < len; i++) {
- if (a[i] == b[i])
- good++;
- else
- bad++;
- }
-
- if (good == len)
- return 0;
- else
- return 0 - bad; // failure
-}
-
-
-// check bytes for pad value
-static int pad_check(const byte* input, byte pad, int len)
-{
- int good = 0;
- int bad = 0;
-
- for (int i = 0; i < len; i++) {
- if (input[i] == pad)
- good++;
- else
- bad++;
- }
-
- if (good == len)
- return 0;
- else
- return 0 - bad; // failure
-}
-
-
-// get number of compression rounds
-static inline int get_rounds(int pLen, int padLen, int t)
-{
- int roundL1 = 1; // round ups
- int roundL2 = 1;
-
- int L1 = COMPRESS_CONSTANT + pLen - t;
- int L2 = COMPRESS_CONSTANT + pLen - padLen - 1 - t;
-
- L1 -= COMPRESS_UPPER;
- L2 -= COMPRESS_UPPER;
-
- if ( (L1 % COMPRESS_LOWER) == 0)
- roundL1 = 0;
- if ( (L2 % COMPRESS_LOWER) == 0)
- roundL2 = 0;
-
- L1 /= COMPRESS_LOWER;
- L2 /= COMPRESS_LOWER;
-
- L1 += roundL1;
- L2 += roundL2;
-
- return L1 - L2;
-}
-
-
-// do compression rounds on dummy data
-static inline void compress_rounds(SSL& ssl, int rounds, const byte* dummy)
-{
- if (rounds) {
- Digest* digest = NULL;
-
- MACAlgorithm ma = ssl.getSecurity().get_parms().mac_algorithm_;
- if (ma == sha)
- digest = NEW_YS SHA;
- else if (ma == md5)
- digest = NEW_YS MD5;
- else if (ma == rmd)
- digest = NEW_YS RMD;
- else
- return;
-
- for (int i = 0; i < rounds; i++)
- digest->update(dummy, COMPRESS_LOWER);
-
- ysDelete(digest);
- }
-}
-
-
-// timing resistant pad verification
-static int timing_verify(SSL& ssl, const byte* input, int padLen, int t,
- int pLen)
-{
- byte verify[SHA_LEN];
- byte dummy[MAX_PAD_SIZE];
-
- memset(dummy, 1, sizeof(dummy));
-
- if ( (t + padLen + 1) > pLen) {
- pad_check(dummy, (byte)padLen, MAX_PAD_SIZE);
- if (ssl.isTLS())
- TLS_hmac(ssl, verify, input, pLen - t, application_data, 1);
- else
- hmac(ssl, verify, input, pLen - t, application_data, 1);
- constant_compare(verify, input + pLen - t, t);
-
- return -1;
- }
-
- if (pad_check(input + pLen - (padLen + 1), (byte)padLen, padLen + 1) != 0) {
- pad_check(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1);
- if (ssl.isTLS())
- TLS_hmac(ssl, verify, input, pLen - t, application_data, 1);
- else
- hmac(ssl, verify, input, pLen - t, application_data, 1);
- constant_compare(verify, input + pLen - t, t);
-
- return -1;
- }
-
- pad_check(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1);
- if (ssl.isTLS())
- TLS_hmac(ssl, verify, input, pLen - padLen - 1 - t, application_data,1);
- else
- hmac(ssl, verify, input, pLen - padLen - 1 - t, application_data, 1);
-
- compress_rounds(ssl, get_rounds(pLen, padLen, t), dummy);
-
- if (constant_compare(verify, input + (pLen - padLen - 1 - t), t) != 0)
- return -1;
-
- return 0;
-}
-
-
-// Process handler for Data
-void Data::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- int msgSz = ssl.getSecurity().get_parms().encrypt_size_;
- int pad = 0, padSz = 0;
- int ivExtra = 0;
- int digestSz = ssl.getCrypto().get_digest().get_digestSize();
- const byte* rawData = input.get_buffer() + input.get_current();
- opaque verify[SHA_LEN];
-
- if (ssl.getSecurity().get_parms().cipher_type_ == block) {
- if (ssl.isTLSv1_1()) // IV
- ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
- pad = *(input.get_buffer() + input.get_current() + msgSz -ivExtra - 1);
- padSz = 1;
-
- if (ssl.isTLS()) {
- if (timing_verify(ssl, rawData, pad,digestSz, msgSz-ivExtra) != 0) {
- ssl.SetError(verify_error);
- return;
- }
- }
- else { // SSLv3, some don't do this padding right
- int sz3 = msgSz - digestSz - pad - 1;
- hmac(ssl, verify, rawData, sz3, application_data, true);
- if (constant_compare(verify, rawData + sz3, digestSz) != 0) {
- ssl.SetError(verify_error);
- return;
- }
- }
- }
- else { // stream
- int streamSz = msgSz - digestSz;
- if (ssl.isTLS())
- TLS_hmac(ssl, verify, rawData, streamSz, application_data, true);
- else
- hmac(ssl, verify, rawData, streamSz, application_data, true);
- if (constant_compare(verify, rawData + streamSz, digestSz) != 0) {
- ssl.SetError(verify_error);
- return;
- }
- }
-
- int dataSz = msgSz - ivExtra - digestSz - pad - padSz;
-
- if (dataSz < 0 || dataSz > (MAX_RECORD_SIZE + COMPRESS_EXTRA)) {
- ssl.SetError(bad_input);
- return;
- }
-
- // read data
- if (dataSz) { // could be compressed
- if (ssl.CompressionOn()) {
- input_buffer tmp;
- if (DeCompress(input, dataSz, tmp) == -1) {
- ssl.SetError(decompress_error);
- return;
- }
- ssl.addData(NEW_YS input_buffer(tmp.get_size(),
- tmp.get_buffer(), tmp.get_size()));
- }
- else {
- input_buffer* data;
- ssl.addData(data = NEW_YS input_buffer(dataSz));
- input.read(data->get_buffer(), dataSz);
- data->add_size(dataSz);
- }
- }
-
- // advance past mac and fill
- input.set_current(input.get_current() + digestSz + pad + padSz);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-}
-
-
-// virtual input operator for HandShakes
-input_buffer& operator>>(input_buffer& input, HandShakeBase& hs)
-{
- return hs.set(input);
-}
-
-
-// virtual output operator for HandShakes
-output_buffer& operator<<(output_buffer& output, const HandShakeBase& hs)
-{
- return hs.get(output);
-}
-
-
-Certificate::Certificate(const x509* cert) : cert_(cert)
-{
- if (cert)
- set_length(cert_->get_length() + 2 * CERT_HEADER); // list and cert size
- else
- set_length(CERT_HEADER); // total blank cert size, just list header
-}
-
-
-const opaque* Certificate::get_buffer() const
-{
- if (cert_)
- return cert_->get_buffer();
-
- return NULL;
-}
-
-
-// output operator for Certificate
-output_buffer& operator<<(output_buffer& output, const Certificate& cert)
-{
- uint sz = cert.get_length();
- opaque tmp[CERT_HEADER];
-
- if ((int)sz > CERT_HEADER)
- sz -= 2 * CERT_HEADER; // actual cert, not including headers
- else {
- sz = 0; // blank cert case
- c32to24(sz, tmp);
- output.write(tmp, CERT_HEADER);
-
- return output;
- }
-
- c32to24(sz + CERT_HEADER, tmp);
- output.write(tmp, CERT_HEADER);
- c32to24(sz, tmp);
- output.write(tmp, CERT_HEADER);
- output.write(cert.get_buffer(), sz);
-
- return output;
-}
-
-
-// certificate processing handler
-void Certificate::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- CertManager& cm = ssl.useCrypto().use_certManager();
-
- uint32 list_sz;
- byte tmp[3];
-
- if (input.get_remaining() < sizeof(tmp)) {
- ssl.SetError(YasslError(bad_input));
- return;
- }
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- tmp[2] = input[AUTO];
- c24to32(tmp, list_sz);
-
- if (list_sz > (uint)MAX_RECORD_SIZE) { // sanity check
- ssl.SetError(YasslError(bad_input));
- return;
- }
-
- while (list_sz) {
- // cert size
- uint32 cert_sz;
-
- if (input.get_remaining() < sizeof(tmp)) {
- ssl.SetError(YasslError(bad_input));
- return;
- }
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- tmp[2] = input[AUTO];
- c24to32(tmp, cert_sz);
-
- if (cert_sz > (uint)MAX_RECORD_SIZE || input.get_remaining() < cert_sz){
- ssl.SetError(YasslError(bad_input));
- return;
- }
- if (cert_sz) {
- x509* myCert;
- cm.AddPeerCert(myCert = NEW_YS x509(cert_sz));
- input.read(myCert->use_buffer(), myCert->get_length());
- }
-
- list_sz -= cert_sz + CERT_HEADER;
- }
- if (int err = cm.Validate())
- ssl.SetError(YasslError(err));
- else if (ssl.getSecurity().get_parms().entity_ == client_end)
- ssl.useStates().useClient() = serverCertComplete;
-}
-
-
-Certificate::Certificate()
- : cert_(0)
-{}
-
-
-input_buffer& Certificate::set(input_buffer& in)
-{
- return in;
-}
-
-
-output_buffer& Certificate::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-HandShakeType Certificate::get_type() const
-{
- return certificate;
-}
-
-
-ServerDHParams::ServerDHParams()
- : pSz_(0), gSz_(0), pubSz_(0), p_(0), g_(0), Ys_(0)
-{}
-
-
-ServerDHParams::~ServerDHParams()
-{
- ysArrayDelete(Ys_);
- ysArrayDelete(g_);
- ysArrayDelete(p_);
-}
-
-
-int ServerDHParams::get_pSize() const
-{
- return pSz_;
-}
-
-
-int ServerDHParams::get_gSize() const
-{
- return gSz_;
-}
-
-
-int ServerDHParams::get_pubSize() const
-{
- return pubSz_;
-}
-
-
-const opaque* ServerDHParams::get_p() const
-{
- return p_;
-}
-
-
-const opaque* ServerDHParams::get_g() const
-{
- return g_;
-}
-
-
-const opaque* ServerDHParams::get_pub() const
-{
- return Ys_;
-}
-
-
-opaque* ServerDHParams::alloc_p(int sz)
-{
- p_ = NEW_YS opaque[pSz_ = sz];
- return p_;
-}
-
-
-opaque* ServerDHParams::alloc_g(int sz)
-{
- g_ = NEW_YS opaque[gSz_ = sz];
- return g_;
-}
-
-
-opaque* ServerDHParams::alloc_pub(int sz)
-{
- Ys_ = NEW_YS opaque[pubSz_ = sz];
- return Ys_;
-}
-
-
-int ServerKeyBase::get_length() const
-{
- return 0;
-}
-
-
-opaque* ServerKeyBase::get_serverKey() const
-{
- return 0;
-}
-
-
-// input operator for ServerHello
-input_buffer& operator>>(input_buffer& input, ServerHello& hello)
-{
- // Protocol
- hello.server_version_.major_ = input[AUTO];
- hello.server_version_.minor_ = input[AUTO];
-
- // Random
- input.read(hello.random_, RAN_LEN);
-
- // Session
- hello.id_len_ = input[AUTO];
- if (hello.id_len_ > ID_LEN) {
- input.set_error();
- return input;
- }
- if (hello.id_len_)
- input.read(hello.session_id_, hello.id_len_);
-
- // Suites
- hello.cipher_suite_[0] = input[AUTO];
- hello.cipher_suite_[1] = input[AUTO];
-
- // Compression
- hello.compression_method_ = CompressionMethod(input[AUTO]);
-
- return input;
-}
-
-
-// output operator for ServerHello
-output_buffer& operator<<(output_buffer& output, const ServerHello& hello)
-{
- // Protocol
- output[AUTO] = hello.server_version_.major_;
- output[AUTO] = hello.server_version_.minor_;
-
- // Random
- output.write(hello.random_, RAN_LEN);
-
- // Session
- output[AUTO] = hello.id_len_;
- output.write(hello.session_id_, ID_LEN);
-
- // Suites
- output[AUTO] = hello.cipher_suite_[0];
- output[AUTO] = hello.cipher_suite_[1];
-
- // Compression
- output[AUTO] = hello.compression_method_;
-
- return output;
-}
-
-
-// Server Hello processing handler
-void ServerHello::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- if (ssl.GetMultiProtocol()) { // SSLv23 support
- if (ssl.isTLS() && server_version_.minor_ < 1)
- // downgrade to SSLv3
- ssl.useSecurity().use_connection().TurnOffTLS();
- else if (ssl.isTLSv1_1() && server_version_.minor_ == 1)
- // downdrage to TLSv1
- ssl.useSecurity().use_connection().TurnOffTLS1_1();
- }
- else if (ssl.isTLSv1_1() && server_version_.minor_ < 2) {
- ssl.SetError(badVersion_error);
- return;
- }
- else if (ssl.isTLS() && server_version_.minor_ < 1) {
- ssl.SetError(badVersion_error);
- return;
- }
- else if (!ssl.isTLS() && (server_version_.major_ == 3 &&
- server_version_.minor_ >= 1)) {
- ssl.SetError(badVersion_error);
- return;
- }
- if (cipher_suite_[0] != 0x00) {
- ssl.SetError(unknown_cipher);
- return;
- }
- ssl.set_pending(cipher_suite_[1]);
- ssl.set_random(random_, server_end);
- if (id_len_)
- ssl.set_sessionID(session_id_);
- else
- ssl.useSecurity().use_connection().sessionID_Set_ = false;
-
- if (ssl.getSecurity().get_resuming()) {
- if (memcmp(session_id_, ssl.getSecurity().get_resume().GetID(),
- ID_LEN) == 0) {
- ssl.set_masterSecret(ssl.getSecurity().get_resume().GetSecret());
- if (ssl.isTLS())
- ssl.deriveTLSKeys();
- else
- ssl.deriveKeys();
- ssl.useStates().useClient() = serverHelloDoneComplete;
- return;
- }
- else {
- ssl.useSecurity().set_resuming(false);
- ssl.useLog().Trace("server denied resumption");
- }
- }
-
- if (ssl.CompressionOn() && !compression_method_)
- ssl.UnSetCompression(); // server isn't supporting yaSSL zlib request
-
- ssl.useStates().useClient() = serverHelloComplete;
-}
-
-
-ServerHello::ServerHello()
-{
- memset(random_, 0, RAN_LEN);
- memset(session_id_, 0, ID_LEN);
-}
-
-
-ServerHello::ServerHello(ProtocolVersion pv, bool useCompression)
- : server_version_(pv),
- compression_method_(useCompression ? zlib : no_compression)
-{
- memset(random_, 0, RAN_LEN);
- memset(session_id_, 0, ID_LEN);
-}
-
-
-input_buffer& ServerHello::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& ServerHello::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-HandShakeType ServerHello::get_type() const
-{
- return server_hello;
-}
-
-
-const opaque* ServerHello::get_random() const
-{
- return random_;
-}
-
-
-// Server Hello Done processing handler
-void ServerHelloDone::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
- ssl.useStates().useClient() = serverHelloDoneComplete;
-}
-
-
-ServerHelloDone::ServerHelloDone()
-{
- set_length(0);
-}
-
-
-input_buffer& ServerHelloDone::set(input_buffer& in)
-{
- return in;
-}
-
-
-output_buffer& ServerHelloDone::get(output_buffer& out) const
-{
- return out;
-}
-
-
-HandShakeType ServerHelloDone::get_type() const
-{
- return server_hello_done;
-}
-
-
-int ClientKeyBase::get_length() const
-{
- return 0;
-}
-
-
-opaque* ClientKeyBase::get_clientKey() const
-{
- return 0;
-}
-
-
-// input operator for Client Hello
-input_buffer& operator>>(input_buffer& input, ClientHello& hello)
-{
- uint begin = input.get_current(); // could have extensions at end
-
- // Protocol
- hello.client_version_.major_ = input[AUTO];
- hello.client_version_.minor_ = input[AUTO];
-
- // Random
- input.read(hello.random_, RAN_LEN);
-
- // Session
- hello.id_len_ = input[AUTO];
- if (hello.id_len_) input.read(hello.session_id_, ID_LEN);
-
- // Suites
- byte tmp[2];
- uint16 len;
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, len);
-
- hello.suite_len_ = min(len, static_cast<uint16>(MAX_SUITE_SZ));
- input.read(hello.cipher_suites_, hello.suite_len_);
- if (len > hello.suite_len_) // ignore extra suites
- input.set_current(input.get_current() + len - hello.suite_len_);
-
- // Compression
- hello.comp_len_ = input[AUTO];
- hello.compression_methods_ = no_compression;
- while (hello.comp_len_--) {
- CompressionMethod cm = CompressionMethod(input[AUTO]);
- if (cm == zlib)
- hello.compression_methods_ = zlib;
- }
-
- uint read = input.get_current() - begin;
- uint expected = hello.get_length();
-
- // ignore client hello extensions for now
- if (read < expected)
- input.set_current(input.get_current() + expected - read);
-
- return input;
-}
-
-
-// output operaotr for Client Hello
-output_buffer& operator<<(output_buffer& output, const ClientHello& hello)
-{
- // Protocol
- output[AUTO] = hello.client_version_.major_;
- output[AUTO] = hello.client_version_.minor_;
-
- // Random
- output.write(hello.random_, RAN_LEN);
-
- // Session
- output[AUTO] = hello.id_len_;
- if (hello.id_len_) output.write(hello.session_id_, ID_LEN);
-
- // Suites
- byte tmp[2];
- c16toa(hello.suite_len_, tmp);
- output[AUTO] = tmp[0];
- output[AUTO] = tmp[1];
- output.write(hello.cipher_suites_, hello.suite_len_);
-
- // Compression
- output[AUTO] = hello.comp_len_;
- output[AUTO] = hello.compression_methods_;
-
- return output;
-}
-
-
-// Client Hello processing handler
-void ClientHello::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- // store version for pre master secret
- ssl.useSecurity().use_connection().chVersion_ = client_version_;
-
- if (client_version_.major_ != 3) {
- ssl.SetError(badVersion_error);
- return;
- }
- if (ssl.GetMultiProtocol()) { // SSLv23 support
- if (ssl.isTLS() && client_version_.minor_ < 1) {
- // downgrade to SSLv3
- ssl.useSecurity().use_connection().TurnOffTLS();
-
- ProtocolVersion pv = ssl.getSecurity().get_connection().version_;
- bool removeDH = ssl.getSecurity().get_parms().removeDH_;
- bool removeRSA = false;
- bool removeDSA = false;
-
- const CertManager& cm = ssl.getCrypto().get_certManager();
- if (cm.get_keyType() == rsa_sa_algo)
- removeDSA = true;
- else
- removeRSA = true;
-
- // reset w/ SSL suites
- ssl.useSecurity().use_parms().SetSuites(pv, removeDH, removeRSA,
- removeDSA);
- }
- else if (ssl.isTLSv1_1() && client_version_.minor_ == 1)
- // downgrade to TLSv1, but use same suites
- ssl.useSecurity().use_connection().TurnOffTLS1_1();
- }
- else if (ssl.isTLSv1_1() && client_version_.minor_ < 2) {
- ssl.SetError(badVersion_error);
- return;
- }
- else if (ssl.isTLS() && client_version_.minor_ < 1) {
- ssl.SetError(badVersion_error);
- return;
- }
- else if (!ssl.isTLS() && client_version_.minor_ >= 1) {
- ssl.SetError(badVersion_error);
- return;
- }
-
- ssl.set_random(random_, client_end);
-
- while (id_len_) { // trying to resume
- SSL_SESSION* session = 0;
- if (!ssl.getSecurity().GetContext()->GetSessionCacheOff())
- session = GetSessions().lookup(session_id_);
- if (!session) {
- ssl.useLog().Trace("session lookup failed");
- break;
- }
- ssl.set_session(session);
- ssl.useSecurity().set_resuming(true);
- ssl.matchSuite(session->GetSuite(), SUITE_LEN);
- if (ssl.GetError()) return;
- ssl.set_pending(ssl.getSecurity().get_parms().suite_[1]);
- ssl.set_masterSecret(session->GetSecret());
-
- opaque serverRandom[RAN_LEN];
- ssl.getCrypto().get_random().Fill(serverRandom, sizeof(serverRandom));
- ssl.set_random(serverRandom, server_end);
- if (ssl.isTLS())
- ssl.deriveTLSKeys();
- else
- ssl.deriveKeys();
- ssl.useStates().useServer() = clientKeyExchangeComplete;
- return;
- }
- ssl.matchSuite(cipher_suites_, suite_len_);
- if (ssl.GetError()) return;
- ssl.set_pending(ssl.getSecurity().get_parms().suite_[1]);
-
- if (compression_methods_ == zlib)
- ssl.SetCompression();
-
- ssl.useStates().useServer() = clientHelloComplete;
-}
-
-
-input_buffer& ClientHello::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& ClientHello::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-HandShakeType ClientHello::get_type() const
-{
- return client_hello;
-}
-
-
-const opaque* ClientHello::get_random() const
-{
- return random_;
-}
-
-
-ClientHello::ClientHello()
-{
- memset(random_, 0, RAN_LEN);
-}
-
-
-ClientHello::ClientHello(ProtocolVersion pv, bool useCompression)
- : client_version_(pv),
- compression_methods_(useCompression ? zlib : no_compression)
-{
- memset(random_, 0, RAN_LEN);
-}
-
-
-// output operator for ServerKeyExchange
-output_buffer& operator<<(output_buffer& output, const ServerKeyExchange& sk)
-{
- output.write(sk.getKey(), sk.getKeyLength());
- return output;
-}
-
-
-// Server Key Exchange processing handler
-void ServerKeyExchange::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
- createKey(ssl);
- if (ssl.GetError()) return;
- server_key_->read(ssl, input);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- ssl.useStates().useClient() = serverKeyExchangeComplete;
-}
-
-
-ServerKeyExchange::ServerKeyExchange(SSL& ssl)
-{
- createKey(ssl);
-}
-
-
-ServerKeyExchange::ServerKeyExchange()
- : server_key_(0)
-{}
-
-
-ServerKeyExchange::~ServerKeyExchange()
-{
- ysDelete(server_key_);
-}
-
-
-void ServerKeyExchange::build(SSL& ssl)
-{
- server_key_->build(ssl);
- set_length(server_key_->get_length());
-}
-
-
-const opaque* ServerKeyExchange::getKey() const
-{
- return server_key_->get_serverKey();
-}
-
-
-int ServerKeyExchange::getKeyLength() const
-{
- return server_key_->get_length();
-}
-
-
-input_buffer& ServerKeyExchange::set(input_buffer& in)
-{
- return in; // process does
-}
-
-
-output_buffer& ServerKeyExchange::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-HandShakeType ServerKeyExchange::get_type() const
-{
- return server_key_exchange;
-}
-
-
-// CertificateRequest
-CertificateRequest::CertificateRequest()
- : typeTotal_(0)
-{
- memset(certificate_types_, 0, sizeof(certificate_types_));
-}
-
-
-CertificateRequest::~CertificateRequest()
-{
-
- STL::for_each(certificate_authorities_.begin(),
- certificate_authorities_.end(),
- del_ptr_zero()) ;
-}
-
-
-void CertificateRequest::Build()
-{
- certificate_types_[0] = rsa_sign;
- certificate_types_[1] = dss_sign;
-
- typeTotal_ = 2;
-
- uint16 authCount = 0;
- uint16 authSz = 0;
-
- for (int j = 0; j < authCount; j++) {
- int sz = REQUEST_HEADER + MIN_DIS_SIZE;
- DistinguishedName dn;
- certificate_authorities_.push_back(dn = NEW_YS byte[sz]);
-
- opaque tmp[REQUEST_HEADER];
- c16toa(MIN_DIS_SIZE, tmp);
- memcpy(dn, tmp, sizeof(tmp));
-
- // fill w/ junk for now
- memcpy(dn, tmp, MIN_DIS_SIZE);
- authSz += sz;
- }
-
- set_length(SIZEOF_ENUM + typeTotal_ + REQUEST_HEADER + authSz);
-}
-
-
-input_buffer& CertificateRequest::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& CertificateRequest::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-// input operator for CertificateRequest
-input_buffer& operator>>(input_buffer& input, CertificateRequest& request)
-{
- // types
- request.typeTotal_ = input[AUTO];
- if (request.typeTotal_ > CERT_TYPES) {
- input.set_error();
- return input;
- }
- for (int i = 0; i < request.typeTotal_; i++)
- request.certificate_types_[i] = ClientCertificateType(input[AUTO]);
-
- byte tmp[2];
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- uint16 sz;
- ato16(tmp, sz);
-
- // authorities
- while (sz) {
- uint16 dnSz;
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
- ato16(tmp, dnSz);
-
- input.set_current(input.get_current() + dnSz);
-
- sz -= dnSz + REQUEST_HEADER;
-
- if (input.get_error())
- break;
- }
-
- return input;
-}
-
-
-// output operator for CertificateRequest
-output_buffer& operator<<(output_buffer& output,
- const CertificateRequest& request)
-{
- // types
- output[AUTO] = request.typeTotal_;
- for (int i = 0; i < request.typeTotal_; i++)
- output[AUTO] = request.certificate_types_[i];
-
- // authorities
- opaque tmp[REQUEST_HEADER];
- c16toa(request.get_length() - SIZEOF_ENUM -
- request.typeTotal_ - REQUEST_HEADER, tmp);
- output.write(tmp, sizeof(tmp));
-
- STL::list<DistinguishedName>::const_iterator first =
- request.certificate_authorities_.begin();
- STL::list<DistinguishedName>::const_iterator last =
- request.certificate_authorities_.end();
- while (first != last) {
- uint16 sz;
- ato16(*first, sz);
- output.write(*first, sz + REQUEST_HEADER);
-
- ++first;
- }
-
- return output;
-}
-
-
-// CertificateRequest processing handler
-void CertificateRequest::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
- CertManager& cm = ssl.useCrypto().use_certManager();
-
- cm.setSendVerify();
- if (cm.get_cert() == NULL || cm.get_privateKey() == NULL)
- cm.setSendBlankCert(); // send blank cert, OpenSSL requires now
-}
-
-
-HandShakeType CertificateRequest::get_type() const
-{
- return certificate_request;
-}
-
-
-// CertificateVerify
-CertificateVerify::CertificateVerify() : signature_(0)
-{}
-
-
-CertificateVerify::~CertificateVerify()
-{
- ysArrayDelete(signature_);
-}
-
-
-void CertificateVerify::Build(SSL& ssl)
-{
- build_certHashes(ssl, hashes_);
-
- uint16 sz = 0;
- byte len[VERIFY_HEADER];
- mySTL::auto_array<byte> sig;
-
- // sign
- const CertManager& cert = ssl.getCrypto().get_certManager();
- if (cert.get_keyType() == rsa_sa_algo) {
- RSA rsa(cert.get_privateKey(), cert.get_privateKeyLength(), false);
-
- sz = rsa.get_cipherLength() + VERIFY_HEADER;
- sig.reset(NEW_YS byte[sz]);
-
- c16toa(sz - VERIFY_HEADER, len);
- memcpy(sig.get(), len, VERIFY_HEADER);
- rsa.sign(sig.get() + VERIFY_HEADER, hashes_.md5_, sizeof(Hashes),
- ssl.getCrypto().get_random());
- // check for rsa signautre fault
- if (!rsa.verify(hashes_.md5_, sizeof(Hashes), sig.get() + VERIFY_HEADER,
- rsa.get_cipherLength())) {
- ssl.SetError(rsaSignFault_error);
- return;
- }
- }
- else { // DSA
- DSS dss(cert.get_privateKey(), cert.get_privateKeyLength(), false);
-
- sz = DSS_SIG_SZ + DSS_ENCODED_EXTRA + VERIFY_HEADER;
- sig.reset(NEW_YS byte[sz]);
-
- c16toa(sz - VERIFY_HEADER, len);
- memcpy(sig.get(), len, VERIFY_HEADER);
- dss.sign(sig.get() + VERIFY_HEADER, hashes_.sha_, SHA_LEN,
- ssl.getCrypto().get_random());
-
- byte encoded[DSS_SIG_SZ + DSS_ENCODED_EXTRA];
- TaoCrypt::EncodeDSA_Signature(sig.get() + VERIFY_HEADER, encoded);
- memcpy(sig.get() + VERIFY_HEADER, encoded, sizeof(encoded));
- }
- set_length(sz);
- signature_ = sig.release();
-}
-
-
-input_buffer& CertificateVerify::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& CertificateVerify::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-// input operator for CertificateVerify
-input_buffer& operator>>(input_buffer& input, CertificateVerify& request)
-{
- byte tmp[VERIFY_HEADER];
- tmp[0] = input[AUTO];
- tmp[1] = input[AUTO];
-
- uint16 sz = 0;
- ato16(tmp, sz);
- request.set_length(sz);
-
- if (sz == 0) {
- input.set_error();
- return input;
- }
-
- request.signature_ = NEW_YS byte[sz];
- input.read(request.signature_, sz);
-
- return input;
-}
-
-
-// output operator for CertificateVerify
-output_buffer& operator<<(output_buffer& output,
- const CertificateVerify& verify)
-{
- output.write(verify.signature_, verify.get_length());
-
- return output;
-}
-
-
-// CertificateVerify processing handler
-void CertificateVerify::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- const Hashes& hashVerify = ssl.getHashes().get_certVerify();
- const CertManager& cert = ssl.getCrypto().get_certManager();
-
- if (cert.get_peerKeyType() == rsa_sa_algo) {
- RSA rsa(cert.get_peerKey(), cert.get_peerKeyLength());
-
- if (!rsa.verify(hashVerify.md5_, sizeof(hashVerify), signature_,
- get_length()))
- ssl.SetError(verify_error);
- }
- else { // DSA
- byte decodedSig[DSS_SIG_SZ];
- TaoCrypt::DecodeDSA_Signature(decodedSig, signature_, get_length());
-
- DSS dss(cert.get_peerKey(), cert.get_peerKeyLength());
- if (!dss.verify(hashVerify.sha_, SHA_LEN, decodedSig, get_length()))
- ssl.SetError(verify_error);
- }
-}
-
-
-HandShakeType CertificateVerify::get_type() const
-{
- return certificate_verify;
-}
-
-
-// output operator for ClientKeyExchange
-output_buffer& operator<<(output_buffer& output, const ClientKeyExchange& ck)
-{
- output.write(ck.getKey(), ck.getKeyLength());
- return output;
-}
-
-
-// Client Key Exchange processing handler
-void ClientKeyExchange::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
- createKey(ssl);
- if (ssl.GetError()) return;
- client_key_->read(ssl, input);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- if (ssl.getCrypto().get_certManager().verifyPeer())
- build_certHashes(ssl, ssl.useHashes().use_certVerify());
-
- ssl.useStates().useServer() = clientKeyExchangeComplete;
-}
-
-
-ClientKeyExchange::ClientKeyExchange(SSL& ssl)
-{
- createKey(ssl);
-}
-
-
-ClientKeyExchange::ClientKeyExchange()
- : client_key_(0)
-{}
-
-
-ClientKeyExchange::~ClientKeyExchange()
-{
- ysDelete(client_key_);
-}
-
-
-void ClientKeyExchange::build(SSL& ssl)
-{
- client_key_->build(ssl);
- set_length(client_key_->get_length());
-}
-
-const opaque* ClientKeyExchange::getKey() const
-{
- return client_key_->get_clientKey();
-}
-
-
-int ClientKeyExchange::getKeyLength() const
-{
- return client_key_->get_length();
-}
-
-
-input_buffer& ClientKeyExchange::set(input_buffer& in)
-{
- return in;
-}
-
-
-output_buffer& ClientKeyExchange::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-HandShakeType ClientKeyExchange::get_type() const
-{
- return client_key_exchange;
-}
-
-
-// input operator for Finished
-input_buffer& operator>>(input_buffer& input, Finished&)
-{
- /* do in process */
-
- return input;
-}
-
-// output operator for Finished
-output_buffer& operator<<(output_buffer& output, const Finished& fin)
-{
- if (fin.get_length() == FINISHED_SZ) {
- output.write(fin.hashes_.md5_, MD5_LEN);
- output.write(fin.hashes_.sha_, SHA_LEN);
- }
- else // TLS_FINISHED_SZ
- output.write(fin.hashes_.md5_, TLS_FINISHED_SZ);
-
- return output;
-}
-
-
-// Finished processing handler
-void Finished::Process(input_buffer& input, SSL& ssl)
-{
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
- // verify hashes
- const Finished& verify = ssl.getHashes().get_verify();
- uint finishedSz = ssl.isTLS() ? TLS_FINISHED_SZ : FINISHED_SZ;
-
- input.read(hashes_.md5_, finishedSz);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- if (memcmp(&hashes_, &verify.hashes_, finishedSz)) {
- ssl.SetError(verify_error);
- return;
- }
-
- // read verify mac
- opaque verifyMAC[SHA_LEN];
- uint macSz = finishedSz + HANDSHAKE_HEADER;
-
- if (ssl.isTLS())
- TLS_hmac(ssl, verifyMAC, input.get_buffer() + input.get_current()
- - macSz, macSz, handshake, true);
- else
- hmac(ssl, verifyMAC, input.get_buffer() + input.get_current() - macSz,
- macSz, handshake, true);
-
- // read mac and fill
- opaque mac[SHA_LEN]; // max size
- int digestSz = ssl.getCrypto().get_digest().get_digestSize();
- input.read(mac, digestSz);
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- uint ivExtra = 0;
- if (ssl.getSecurity().get_parms().cipher_type_ == block)
- if (ssl.isTLSv1_1())
- ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
-
- opaque fill __attribute__((unused));
- int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra -
- HANDSHAKE_HEADER - finishedSz - digestSz;
- for (int i = 0; i < padSz; i++)
- fill = input[AUTO];
- if (input.get_error()) {
- ssl.SetError(bad_input);
- return;
- }
-
- // update states
- ssl.useStates().useHandShake() = handShakeReady;
- if (ssl.getSecurity().get_parms().entity_ == client_end)
- ssl.useStates().useClient() = serverFinishedComplete;
- else
- ssl.useStates().useServer() = clientFinishedComplete;
-}
-
-
-Finished::Finished()
-{
- set_length(FINISHED_SZ);
-}
-
-
-uint8* Finished::set_md5()
-{
- return hashes_.md5_;
-}
-
-
-uint8* Finished::set_sha()
-{
- return hashes_.sha_;
-}
-
-
-input_buffer& Finished::set(input_buffer& in)
-{
- return in >> *this;
-}
-
-
-output_buffer& Finished::get(output_buffer& out) const
-{
- return out << *this;
-}
-
-
-HandShakeType Finished::get_type() const
-{
- return finished;
-}
-
-
-void clean(volatile opaque* p, uint sz, RandomPool& ran)
-{
- uint i(0);
-
- for (i = 0; i < sz; ++i)
- p[i] = 0;
-
- ran.Fill(const_cast<opaque*>(p), sz);
-
- for (i = 0; i < sz; ++i)
- p[i] = 0;
-}
-
-
-
-Connection::Connection(ProtocolVersion v, RandomPool& ran)
- : pre_master_secret_(0), sequence_number_(0), peer_sequence_number_(0),
- pre_secret_len_(0), send_server_key_(false), master_clean_(false),
- TLS_(v.major_ >= 3 && v.minor_ >= 1),
- TLSv1_1_(v.major_ >= 3 && v.minor_ >= 2), compression_(false),
- version_(v), random_(ran)
-{
- memset(sessionID_, 0, sizeof(sessionID_));
-}
-
-
-Connection::~Connection()
-{
- CleanMaster(); CleanPreMaster(); ysArrayDelete(pre_master_secret_);
-}
-
-
-void Connection::AllocPreSecret(uint sz)
-{
- pre_master_secret_ = NEW_YS opaque[pre_secret_len_ = sz];
-}
-
-
-void Connection::TurnOffTLS()
-{
- TLS_ = false;
- version_.minor_ = 0;
-}
-
-
-void Connection::TurnOffTLS1_1()
-{
- TLSv1_1_ = false;
- version_.minor_ = 1;
-}
-
-
-// wipeout master secret
-void Connection::CleanMaster()
-{
- if (!master_clean_) {
- volatile opaque* p = master_secret_;
- clean(p, SECRET_LEN, random_);
- master_clean_ = true;
- }
-}
-
-
-// wipeout pre master secret
-void Connection::CleanPreMaster()
-{
- if (pre_master_secret_) {
- volatile opaque* p = pre_master_secret_;
- clean(p, pre_secret_len_, random_);
-
- ysArrayDelete(pre_master_secret_);
- pre_master_secret_ = 0;
- }
-}
-
-
-// Create functions for message factory
-Message* CreateCipherSpec() { return NEW_YS ChangeCipherSpec; }
-Message* CreateAlert() { return NEW_YS Alert; }
-Message* CreateHandShake() { return NEW_YS HandShakeHeader; }
-Message* CreateData() { return NEW_YS Data; }
-
-// Create functions for handshake factory
-HandShakeBase* CreateHelloRequest() { return NEW_YS HelloRequest; }
-HandShakeBase* CreateClientHello() { return NEW_YS ClientHello; }
-HandShakeBase* CreateServerHello() { return NEW_YS ServerHello; }
-HandShakeBase* CreateCertificate() { return NEW_YS Certificate; }
-HandShakeBase* CreateServerKeyExchange() { return NEW_YS ServerKeyExchange;}
-HandShakeBase* CreateCertificateRequest() { return NEW_YS
- CertificateRequest; }
-HandShakeBase* CreateServerHelloDone() { return NEW_YS ServerHelloDone; }
-HandShakeBase* CreateCertificateVerify() { return NEW_YS CertificateVerify;}
-HandShakeBase* CreateClientKeyExchange() { return NEW_YS ClientKeyExchange;}
-HandShakeBase* CreateFinished() { return NEW_YS Finished; }
-
-// Create functions for server key exchange factory
-ServerKeyBase* CreateRSAServerKEA() { return NEW_YS RSA_Server; }
-ServerKeyBase* CreateDHServerKEA() { return NEW_YS DH_Server; }
-ServerKeyBase* CreateFortezzaServerKEA() { return NEW_YS Fortezza_Server; }
-
-// Create functions for client key exchange factory
-ClientKeyBase* CreateRSAClient() { return NEW_YS
- EncryptedPreMasterSecret; }
-ClientKeyBase* CreateDHClient() { return NEW_YS
- ClientDiffieHellmanPublic; }
-ClientKeyBase* CreateFortezzaClient() { return NEW_YS FortezzaKeys; }
-
-
-// Constructor calls this to Register compile time callbacks
-void InitMessageFactory(MessageFactory& mf)
-{
- mf.Reserve(4);
- mf.Register(alert, CreateAlert);
- mf.Register(change_cipher_spec, CreateCipherSpec);
- mf.Register(handshake, CreateHandShake);
- mf.Register(application_data, CreateData);
-}
-
-
-// Constructor calls this to Register compile time callbacks
-void InitHandShakeFactory(HandShakeFactory& hsf)
-{
- hsf.Reserve(10);
- hsf.Register(hello_request, CreateHelloRequest);
- hsf.Register(client_hello, CreateClientHello);
- hsf.Register(server_hello, CreateServerHello);
- hsf.Register(certificate, CreateCertificate);
- hsf.Register(server_key_exchange, CreateServerKeyExchange);
- hsf.Register(certificate_request, CreateCertificateRequest);
- hsf.Register(server_hello_done, CreateServerHelloDone);
- hsf.Register(certificate_verify, CreateCertificateVerify);
- hsf.Register(client_key_exchange, CreateClientKeyExchange);
- hsf.Register(finished, CreateFinished);
-}
-
-
-// Constructor calls this to Register compile time callbacks
-void InitServerKeyFactory(ServerKeyFactory& skf)
-{
- skf.Reserve(3);
- skf.Register(rsa_kea, CreateRSAServerKEA);
- skf.Register(diffie_hellman_kea, CreateDHServerKEA);
- skf.Register(fortezza_kea, CreateFortezzaServerKEA);
-}
-
-
-// Constructor calls this to Register compile time callbacks
-void InitClientKeyFactory(ClientKeyFactory& ckf)
-{
- ckf.Reserve(3);
- ckf.Register(rsa_kea, CreateRSAClient);
- ckf.Register(diffie_hellman_kea, CreateDHClient);
- ckf.Register(fortezza_kea, CreateFortezzaClient);
-}
-
-
-} // namespace
diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp
deleted file mode 100644
index e244761e647..00000000000
--- a/extra/yassl/src/yassl_int.cpp
+++ /dev/null
@@ -1,2705 +0,0 @@
-/*
- Copyright (c) 2005, 2017, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* yaSSL internal source implements SSL supporting types not specified in the
- * draft along with type conversion functions.
- */
-
-#include "runtime.hpp"
-#include "yassl_int.hpp"
-#include "handshake.hpp"
-#include "timer.hpp"
-
-#ifdef _POSIX_THREADS
- #include "pthread.h"
-#endif
-
-
-#ifdef HAVE_LIBZ
- #include "zlib.h"
-#endif
-
-
-#ifdef YASSL_PURE_C
-
- void* operator new(size_t sz, yaSSL::new_t)
- {
- void* ptr = malloc(sz ? sz : 1);
- if (!ptr) abort();
-
- return ptr;
- }
-
-
- void operator delete(void* ptr, yaSSL::new_t)
- {
- if (ptr) free(ptr);
- }
-
-
- void* operator new[](size_t sz, yaSSL::new_t nt)
- {
- return ::operator new(sz, nt);
- }
-
-
- void operator delete[](void* ptr, yaSSL::new_t nt)
- {
- ::operator delete(ptr, nt);
- }
-
- namespace yaSSL {
-
- new_t ys; // for yaSSL library new
-
- }
-
-#endif // YASSL_PURE_C
-
-
-namespace yaSSL {
-
-
-
-
-
-
-// convert a 32 bit integer into a 24 bit one
-void c32to24(uint32 u32, uint24& u24)
-{
- u24[0] = (u32 >> 16) & 0xff;
- u24[1] = (u32 >> 8) & 0xff;
- u24[2] = u32 & 0xff;
-}
-
-
-// convert a 24 bit integer into a 32 bit one
-void c24to32(const uint24 u24, uint32& u32)
-{
- u32 = 0;
- u32 = (u24[0] << 16) | (u24[1] << 8) | u24[2];
-}
-
-
-// convert with return for ease of use
-uint32 c24to32(const uint24 u24)
-{
- uint32 ret;
- c24to32(u24, ret);
-
- return ret;
-}
-
-
-// using a for opaque since underlying type is unsgined char and o is not a
-// good leading identifier
-
-// convert opaque to 16 bit integer
-void ato16(const opaque* c, uint16& u16)
-{
- u16 = 0;
- u16 = (c[0] << 8) | (c[1]);
-}
-
-
-// convert (copy) opaque to 24 bit integer
-void ato24(const opaque* c, uint24& u24)
-{
- u24[0] = c[0];
- u24[1] = c[1];
- u24[2] = c[2];
-}
-
-
-// convert 16 bit integer to opaque
-void c16toa(uint16 u16, opaque* c)
-{
- c[0] = (u16 >> 8) & 0xff;
- c[1] = u16 & 0xff;
-}
-
-
-// convert 24 bit integer to opaque
-void c24toa(const uint24 u24, opaque* c)
-{
- c[0] = u24[0];
- c[1] = u24[1];
- c[2] = u24[2];
-}
-
-
-// convert 32 bit integer to opaque
-void c32toa(uint32 u32, opaque* c)
-{
- c[0] = (u32 >> 24) & 0xff;
- c[1] = (u32 >> 16) & 0xff;
- c[2] = (u32 >> 8) & 0xff;
- c[3] = u32 & 0xff;
-}
-
-
-States::States() : recordLayer_(recordReady), handshakeLayer_(preHandshake),
- clientState_(serverNull), serverState_(clientNull),
- connectState_(CONNECT_BEGIN), acceptState_(ACCEPT_BEGIN),
- what_(no_error) {}
-
-const RecordLayerState& States::getRecord() const
-{
- return recordLayer_;
-}
-
-
-const HandShakeState& States::getHandShake() const
-{
- return handshakeLayer_;
-}
-
-
-const ClientState& States::getClient() const
-{
- return clientState_;
-}
-
-
-const ServerState& States::getServer() const
-{
- return serverState_;
-}
-
-
-const ConnectState& States::GetConnect() const
-{
- return connectState_;
-}
-
-
-const AcceptState& States::GetAccept() const
-{
- return acceptState_;
-}
-
-
-const char* States::getString() const
-{
- return errorString_;
-}
-
-
-YasslError States::What() const
-{
- return what_;
-}
-
-
-RecordLayerState& States::useRecord()
-{
- return recordLayer_;
-}
-
-
-HandShakeState& States::useHandShake()
-{
- return handshakeLayer_;
-}
-
-
-ClientState& States::useClient()
-{
- return clientState_;
-}
-
-
-ServerState& States::useServer()
-{
- return serverState_;
-}
-
-
-ConnectState& States::UseConnect()
-{
- return connectState_;
-}
-
-
-AcceptState& States::UseAccept()
-{
- return acceptState_;
-}
-
-
-char* States::useString()
-{
- return errorString_;
-}
-
-
-void States::SetError(YasslError ye)
-{
- what_ = ye;
-}
-
-
-// mark message recvd, check for duplicates, return 0 on success
-int States::SetMessageRecvd(HandShakeType hst)
-{
- switch (hst) {
- case hello_request:
- break; // could send more than one
-
- case client_hello:
- if (recvdMessages_.gotClientHello_)
- return -1;
- recvdMessages_.gotClientHello_ = 1;
- break;
-
- case server_hello:
- if (recvdMessages_.gotServerHello_)
- return -1;
- recvdMessages_.gotServerHello_ = 1;
- break;
-
- case certificate:
- if (recvdMessages_.gotCert_)
- return -1;
- recvdMessages_.gotCert_ = 1;
- break;
-
- case server_key_exchange:
- if (recvdMessages_.gotServerKeyExchange_)
- return -1;
- recvdMessages_.gotServerKeyExchange_ = 1;
- break;
-
- case certificate_request:
- if (recvdMessages_.gotCertRequest_)
- return -1;
- recvdMessages_.gotCertRequest_ = 1;
- break;
-
- case server_hello_done:
- if (recvdMessages_.gotServerHelloDone_)
- return -1;
- recvdMessages_.gotServerHelloDone_ = 1;
- break;
-
- case certificate_verify:
- if (recvdMessages_.gotCertVerify_)
- return -1;
- recvdMessages_.gotCertVerify_ = 1;
- break;
-
- case client_key_exchange:
- if (recvdMessages_.gotClientKeyExchange_)
- return -1;
- recvdMessages_.gotClientKeyExchange_ = 1;
- break;
-
- case finished:
- if (recvdMessages_.gotFinished_)
- return -1;
- recvdMessages_.gotFinished_ = 1;
- break;
-
-
- default:
- return -1;
-
- }
-
- return 0;
-}
-
-
-sslFactory::sslFactory() :
- messageFactory_(InitMessageFactory),
- handShakeFactory_(InitHandShakeFactory),
- serverKeyFactory_(InitServerKeyFactory),
- clientKeyFactory_(InitClientKeyFactory)
-{}
-
-
-const MessageFactory& sslFactory::getMessage() const
-{
- return messageFactory_;
-}
-
-
-const HandShakeFactory& sslFactory::getHandShake() const
-{
- return handShakeFactory_;
-}
-
-
-const ServerKeyFactory& sslFactory::getServerKey() const
-{
- return serverKeyFactory_;
-}
-
-
-const ClientKeyFactory& sslFactory::getClientKey() const
-{
- return clientKeyFactory_;
-}
-
-
-// extract context parameters and store
-SSL::SSL(SSL_CTX* ctx)
- : secure_(ctx->getMethod()->getVersion(), crypto_.use_random(),
- ctx->getMethod()->getSide(), ctx->GetCiphers(), ctx,
- ctx->GetDH_Parms().set_), quietShutdown_(false), has_data_(false)
-{
- if (int err = crypto_.get_random().GetError()) {
- SetError(YasslError(err));
- return;
- }
-
- CertManager& cm = crypto_.use_certManager();
- cm.CopySelfCert(ctx->getCert());
-
- bool serverSide = secure_.use_parms().entity_ == server_end;
-
- if (ctx->getKey()) {
- if (int err = cm.SetPrivateKey(*ctx->getKey())) {
- SetError(YasslError(err));
- return;
- }
- else if (serverSide && ctx->GetCiphers().setSuites_ == 0) {
- // remove RSA or DSA suites depending on cert key type
- // but don't override user sets
- ProtocolVersion pv = secure_.get_connection().version_;
-
- bool removeDH = secure_.use_parms().removeDH_;
- bool removeRSA = false;
- bool removeDSA = false;
-
- if (cm.get_keyType() == rsa_sa_algo)
- removeDSA = true;
- else
- removeRSA = true;
- secure_.use_parms().SetSuites(pv, removeDH, removeRSA, removeDSA);
- }
- }
- else if (serverSide) {
- SetError(no_key_file);
- return;
- }
-
- if (ctx->getMethod()->verifyPeer())
- cm.setVerifyPeer();
- if (ctx->getMethod()->verifyNone())
- cm.setVerifyNone();
- if (ctx->getMethod()->failNoCert())
- cm.setFailNoCert();
- cm.setVerifyCallback(ctx->getVerifyCallback());
-
- if (serverSide)
- crypto_.SetDH(ctx->GetDH_Parms());
-
- const SSL_CTX::CertList& ca = ctx->GetCA_List();
- SSL_CTX::CertList::const_iterator first(ca.begin());
- SSL_CTX::CertList::const_iterator last(ca.end());
-
- while (first != last) {
- if (int err = cm.CopyCaCert(*first)) {
- SetError(YasslError(err));
- return;
- }
- ++first;
- }
-}
-
-
-// store pending security parameters from Server Hello
-void SSL::set_pending(Cipher suite)
-{
- Parameters& parms = secure_.use_parms();
-
- switch (suite) {
-
- case TLS_RSA_WITH_AES_256_CBC_SHA:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = sha;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = AES_256_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ));
- strncpy(parms.cipher_name_, cipher_names[TLS_RSA_WITH_AES_256_CBC_SHA],
- MAX_SUITE_NAME);
- break;
-
- case TLS_RSA_WITH_AES_128_CBC_SHA:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = sha;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = AES_128_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS AES);
- strncpy(parms.cipher_name_, cipher_names[TLS_RSA_WITH_AES_128_CBC_SHA],
- MAX_SUITE_NAME);
- break;
-
- case SSL_RSA_WITH_3DES_EDE_CBC_SHA:
- parms.bulk_cipher_algorithm_ = triple_des;
- parms.mac_algorithm_ = sha;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = DES_EDE_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS DES_EDE);
- strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_3DES_EDE_CBC_SHA]
- , MAX_SUITE_NAME);
- break;
-
- case SSL_RSA_WITH_DES_CBC_SHA:
- parms.bulk_cipher_algorithm_ = des;
- parms.mac_algorithm_ = sha;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = DES_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS DES);
- strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_DES_CBC_SHA],
- MAX_SUITE_NAME);
- break;
-
- case SSL_RSA_WITH_RC4_128_SHA:
- parms.bulk_cipher_algorithm_ = rc4;
- parms.mac_algorithm_ = sha;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = RC4_KEY_SZ;
- parms.iv_size_ = 0;
- parms.cipher_type_ = stream;
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS RC4);
- strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_RC4_128_SHA],
- MAX_SUITE_NAME);
- break;
-
- case SSL_RSA_WITH_RC4_128_MD5:
- parms.bulk_cipher_algorithm_ = rc4;
- parms.mac_algorithm_ = md5;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = MD5_LEN;
- parms.key_size_ = RC4_KEY_SZ;
- parms.iv_size_ = 0;
- parms.cipher_type_ = stream;
- crypto_.setDigest(NEW_YS MD5);
- crypto_.setCipher(NEW_YS RC4);
- strncpy(parms.cipher_name_, cipher_names[SSL_RSA_WITH_RC4_128_MD5],
- MAX_SUITE_NAME);
- break;
-
- case SSL_DHE_RSA_WITH_DES_CBC_SHA:
- parms.bulk_cipher_algorithm_ = des;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = rsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = DES_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS DES);
- strncpy(parms.cipher_name_, cipher_names[SSL_DHE_RSA_WITH_DES_CBC_SHA],
- MAX_SUITE_NAME);
- break;
-
- case SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
- parms.bulk_cipher_algorithm_ = triple_des;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = rsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = DES_EDE_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS DES_EDE);
- strncpy(parms.cipher_name_,
- cipher_names[SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA], MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = rsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = AES_256_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ));
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_RSA_WITH_AES_256_CBC_SHA], MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = rsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = AES_128_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS AES);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_RSA_WITH_AES_128_CBC_SHA], MAX_SUITE_NAME);
- break;
-
- case SSL_DHE_DSS_WITH_DES_CBC_SHA:
- parms.bulk_cipher_algorithm_ = des;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = dsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = DES_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS DES);
- strncpy(parms.cipher_name_, cipher_names[SSL_DHE_DSS_WITH_DES_CBC_SHA],
- MAX_SUITE_NAME);
- break;
-
- case SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
- parms.bulk_cipher_algorithm_ = triple_des;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = dsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = DES_EDE_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS DES_EDE);
- strncpy(parms.cipher_name_,
- cipher_names[SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA], MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = dsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = AES_256_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ));
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_DSS_WITH_AES_256_CBC_SHA], MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = sha;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = dsa_sa_algo;
- parms.hash_size_ = SHA_LEN;
- parms.key_size_ = AES_128_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS SHA);
- crypto_.setCipher(NEW_YS AES);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_DSS_WITH_AES_128_CBC_SHA], MAX_SUITE_NAME);
- break;
-
- case TLS_RSA_WITH_AES_256_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = AES_256_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ));
- strncpy(parms.cipher_name_,
- cipher_names[TLS_RSA_WITH_AES_256_CBC_RMD160], MAX_SUITE_NAME);
- break;
-
- case TLS_RSA_WITH_AES_128_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = AES_128_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS AES);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_RSA_WITH_AES_128_CBC_RMD160], MAX_SUITE_NAME);
- break;
-
- case TLS_RSA_WITH_3DES_EDE_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = triple_des;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = rsa_kea;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = DES_EDE_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS DES_EDE);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_RSA_WITH_3DES_EDE_CBC_RMD160], MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = triple_des;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = rsa_sa_algo;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = DES_EDE_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS DES_EDE);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_RSA_WITH_3DES_EDE_CBC_RMD160],
- MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_RSA_WITH_AES_256_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = rsa_sa_algo;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = AES_256_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ));
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_RSA_WITH_AES_256_CBC_RMD160],
- MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_RSA_WITH_AES_128_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = rsa_sa_algo;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = AES_128_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS AES);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_RSA_WITH_AES_128_CBC_RMD160],
- MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = triple_des;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = dsa_sa_algo;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = DES_EDE_KEY_SZ;
- parms.iv_size_ = DES_IV_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS DES_EDE);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_DSS_WITH_3DES_EDE_CBC_RMD160],
- MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_DSS_WITH_AES_256_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = dsa_sa_algo;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = AES_256_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS AES(AES_256_KEY_SZ));
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_DSS_WITH_AES_256_CBC_RMD160],
- MAX_SUITE_NAME);
- break;
-
- case TLS_DHE_DSS_WITH_AES_128_CBC_RMD160:
- parms.bulk_cipher_algorithm_ = aes;
- parms.mac_algorithm_ = rmd;
- parms.kea_ = diffie_hellman_kea;
- parms.sig_algo_ = dsa_sa_algo;
- parms.hash_size_ = RMD_LEN;
- parms.key_size_ = AES_128_KEY_SZ;
- parms.iv_size_ = AES_BLOCK_SZ;
- parms.cipher_type_ = block;
- secure_.use_connection().send_server_key_ = true; // eph
- crypto_.setDigest(NEW_YS RMD);
- crypto_.setCipher(NEW_YS AES);
- strncpy(parms.cipher_name_,
- cipher_names[TLS_DHE_DSS_WITH_AES_128_CBC_RMD160],
- MAX_SUITE_NAME);
- break;
-
- default:
- SetError(unknown_cipher);
- }
-}
-
-
-// store peer's random
-void SSL::set_random(const opaque* random, ConnectionEnd sender)
-{
- if (sender == client_end)
- memcpy(secure_.use_connection().client_random_, random, RAN_LEN);
- else
- memcpy(secure_.use_connection().server_random_, random, RAN_LEN);
-}
-
-
-// store client pre master secret
-void SSL::set_preMaster(const opaque* pre, uint sz)
-{
- uint i(0); // trim leading zeros
- uint fullSz(sz);
-
- while (i++ < fullSz && *pre == 0) {
- sz--;
- pre++;
- }
-
- if (sz == 0) {
- SetError(bad_input);
- return;
- }
-
- secure_.use_connection().AllocPreSecret(sz);
- memcpy(secure_.use_connection().pre_master_secret_, pre, sz);
-}
-
-
-// set yaSSL zlib type compression
-int SSL::SetCompression()
-{
-#ifdef HAVE_LIBZ
- secure_.use_connection().compression_ = true;
- return 0;
-#else
- return -1; // not built in
-#endif
-}
-
-
-// unset yaSSL zlib type compression
-void SSL::UnSetCompression()
-{
- secure_.use_connection().compression_ = false;
-}
-
-
-// is yaSSL zlib compression on
-bool SSL::CompressionOn() const
-{
- return secure_.get_connection().compression_;
-}
-
-
-// store master secret
-void SSL::set_masterSecret(const opaque* sec)
-{
- memcpy(secure_.use_connection().master_secret_, sec, SECRET_LEN);
-}
-
-// store server issued id
-void SSL::set_sessionID(const opaque* sessionID)
-{
- memcpy(secure_.use_connection().sessionID_, sessionID, ID_LEN);
- secure_.use_connection().sessionID_Set_ = true;
-}
-
-
-// store error
-void SSL::SetError(YasslError ye)
-{
- states_.SetError(ye);
- //strncpy(states_.useString(), e.what(), mySTL::named_exception::NAME_SIZE);
- // TODO: add string here
-}
-
-
-// set the quiet shutdown mode (close_nofiy not sent or received on shutdown)
-void SSL::SetQuietShutdown(bool mode)
-{
- quietShutdown_ = mode;
-}
-
-
-Buffers& SSL::useBuffers()
-{
- return buffers_;
-}
-
-
-// locals
-namespace {
-
-// DeriveKeys and MasterSecret helper sets prefix letters
-static bool setPrefix(opaque* sha_input, int i)
-{
- switch (i) {
- case 0:
- memcpy(sha_input, "A", 1);
- break;
- case 1:
- memcpy(sha_input, "BB", 2);
- break;
- case 2:
- memcpy(sha_input, "CCC", 3);
- break;
- case 3:
- memcpy(sha_input, "DDDD", 4);
- break;
- case 4:
- memcpy(sha_input, "EEEEE", 5);
- break;
- case 5:
- memcpy(sha_input, "FFFFFF", 6);
- break;
- case 6:
- memcpy(sha_input, "GGGGGGG", 7);
- break;
- default:
- return false; // prefix_error
- }
- return true;
-}
-
-} // namespcae for locals
-
-
-void SSL::order_error()
-{
- SetError(out_of_order);
-}
-
-
-// Create and store the master secret see page 32, 6.1
-void SSL::makeMasterSecret()
-{
- if (GetError()) return;
-
- if (isTLS())
- makeTLSMasterSecret();
- else {
- opaque sha_output[SHA_LEN];
-
- const uint& preSz = secure_.get_connection().pre_secret_len_;
- output_buffer md5_input(preSz + SHA_LEN);
- output_buffer sha_input(PREFIX + preSz + 2 * RAN_LEN);
-
- MD5 md5;
- SHA sha;
-
- md5_input.write(secure_.get_connection().pre_master_secret_, preSz);
-
- for (int i = 0; i < MASTER_ROUNDS; ++i) {
- opaque prefix[PREFIX];
- if (!setPrefix(prefix, i)) {
- SetError(prefix_error);
- return;
- }
-
- sha_input.set_current(0);
- sha_input.write(prefix, i + 1);
-
- sha_input.write(secure_.get_connection().pre_master_secret_,preSz);
- sha_input.write(secure_.get_connection().client_random_, RAN_LEN);
- sha_input.write(secure_.get_connection().server_random_, RAN_LEN);
- sha.get_digest(sha_output, sha_input.get_buffer(),
- sha_input.get_size());
-
- md5_input.set_current(preSz);
- md5_input.write(sha_output, SHA_LEN);
- md5.get_digest(&secure_.use_connection().master_secret_[i*MD5_LEN],
- md5_input.get_buffer(), md5_input.get_size());
- }
- deriveKeys();
- }
- secure_.use_connection().CleanPreMaster();
-}
-
-
-// create TLSv1 master secret
-void SSL::makeTLSMasterSecret()
-{
- opaque seed[SEED_LEN];
-
- memcpy(seed, secure_.get_connection().client_random_, RAN_LEN);
- memcpy(&seed[RAN_LEN], secure_.get_connection().server_random_, RAN_LEN);
-
- PRF(secure_.use_connection().master_secret_, SECRET_LEN,
- secure_.get_connection().pre_master_secret_,
- secure_.get_connection().pre_secret_len_,
- master_label, MASTER_LABEL_SZ,
- seed, SEED_LEN);
-
- deriveTLSKeys();
-}
-
-
-// derive mac, write, and iv keys for server and client, see page 34, 6.2.2
-void SSL::deriveKeys()
-{
- int length = 2 * secure_.get_parms().hash_size_ +
- 2 * secure_.get_parms().key_size_ +
- 2 * secure_.get_parms().iv_size_;
- int rounds = (length + MD5_LEN - 1 ) / MD5_LEN;
- input_buffer key_data(rounds * MD5_LEN);
-
- opaque sha_output[SHA_LEN];
- opaque md5_input[SECRET_LEN + SHA_LEN];
- opaque sha_input[KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN];
-
- MD5 md5;
- SHA sha;
-
- memcpy(md5_input, secure_.get_connection().master_secret_, SECRET_LEN);
-
- for (int i = 0; i < rounds; ++i) {
- int j = i + 1;
- if (!setPrefix(sha_input, i)) {
- SetError(prefix_error);
- return;
- }
-
- memcpy(&sha_input[j], secure_.get_connection().master_secret_,
- SECRET_LEN);
- memcpy(&sha_input[j+SECRET_LEN],
- secure_.get_connection().server_random_, RAN_LEN);
- memcpy(&sha_input[j + SECRET_LEN + RAN_LEN],
- secure_.get_connection().client_random_, RAN_LEN);
- sha.get_digest(sha_output, sha_input,
- sizeof(sha_input) - KEY_PREFIX + j);
-
- memcpy(&md5_input[SECRET_LEN], sha_output, SHA_LEN);
- md5.get_digest(key_data.get_buffer() + i * MD5_LEN,
- md5_input, sizeof(md5_input));
- }
- storeKeys(key_data.get_buffer());
-}
-
-
-// derive mac, write, and iv keys for server and client
-void SSL::deriveTLSKeys()
-{
- int length = 2 * secure_.get_parms().hash_size_ +
- 2 * secure_.get_parms().key_size_ +
- 2 * secure_.get_parms().iv_size_;
- opaque seed[SEED_LEN];
- input_buffer key_data(length);
-
- memcpy(seed, secure_.get_connection().server_random_, RAN_LEN);
- memcpy(&seed[RAN_LEN], secure_.get_connection().client_random_, RAN_LEN);
-
- PRF(key_data.get_buffer(), length, secure_.get_connection().master_secret_,
- SECRET_LEN, key_label, KEY_LABEL_SZ, seed, SEED_LEN);
-
- storeKeys(key_data.get_buffer());
-}
-
-
-// store mac, write, and iv keys for client and server
-void SSL::storeKeys(const opaque* key_data)
-{
- int sz = secure_.get_parms().hash_size_;
- memcpy(secure_.use_connection().client_write_MAC_secret_, key_data, sz);
- int i = sz;
- memcpy(secure_.use_connection().server_write_MAC_secret_,&key_data[i], sz);
- i += sz;
-
- sz = secure_.get_parms().key_size_;
- memcpy(secure_.use_connection().client_write_key_, &key_data[i], sz);
- i += sz;
- memcpy(secure_.use_connection().server_write_key_, &key_data[i], sz);
- i += sz;
-
- sz = secure_.get_parms().iv_size_;
- memcpy(secure_.use_connection().client_write_IV_, &key_data[i], sz);
- i += sz;
- memcpy(secure_.use_connection().server_write_IV_, &key_data[i], sz);
-
- setKeys();
-}
-
-
-// set encrypt/decrypt keys and ivs
-void SSL::setKeys()
-{
- Connection& conn = secure_.use_connection();
-
- if (secure_.get_parms().entity_ == client_end) {
- crypto_.use_cipher().set_encryptKey(conn.client_write_key_,
- conn.client_write_IV_);
- crypto_.use_cipher().set_decryptKey(conn.server_write_key_,
- conn.server_write_IV_);
- }
- else {
- crypto_.use_cipher().set_encryptKey(conn.server_write_key_,
- conn.server_write_IV_);
- crypto_.use_cipher().set_decryptKey(conn.client_write_key_,
- conn.client_write_IV_);
- }
-}
-
-
-
-// local functors
-namespace yassl_int_cpp_local1 { // for explicit templates
-
-struct SumData {
- uint total_;
- SumData() : total_(0) {}
- void operator()(input_buffer* data) { total_ += data->get_remaining(); }
-};
-
-
-struct SumBuffer {
- uint total_;
- SumBuffer() : total_(0) {}
- void operator()(output_buffer* buffer) { total_ += buffer->get_size(); }
-};
-
-} // namespace for locals
-using namespace yassl_int_cpp_local1;
-
-
-uint SSL::bufferedData()
-{
- return STL::for_each(buffers_.getData().begin(),buffers_.getData().end(),
- SumData()).total_;
-}
-
-
-// use input buffer to fill data
-void SSL::fillData(Data& data)
-{
- if (GetError()) return;
- uint dataSz = data.get_length(); // input, data size to fill
- size_t elements = buffers_.getData().size();
-
- data.set_length(0); // output, actual data filled
- dataSz = min(dataSz, bufferedData());
-
- for (size_t i = 0; i < elements; i++) {
- input_buffer* front = buffers_.getData().front();
- uint frontSz = front->get_remaining();
- uint readSz = min(dataSz - data.get_length(), frontSz);
-
- front->read(data.set_buffer() + data.get_length(), readSz);
- data.set_length(data.get_length() + readSz);
-
- if (readSz == frontSz) {
- buffers_.useData().pop_front();
- ysDelete(front);
- }
- if (data.get_length() == dataSz)
- break;
- }
-
- if (buffers_.getData().size() == 0) has_data_ = false; // none left
-}
-
-
-// like Fill but keep data in buffer
-void SSL::PeekData(Data& data)
-{
- if (GetError()) return;
- uint dataSz = data.get_length(); // input, data size to fill
- size_t elements = buffers_.getData().size();
-
- data.set_length(0); // output, actual data filled
- dataSz = min(dataSz, bufferedData());
-
- Buffers::inputList::iterator front = buffers_.useData().begin();
-
- while (elements) {
- uint frontSz = (*front)->get_remaining();
- uint readSz = min(dataSz - data.get_length(), frontSz);
- uint before = (*front)->get_current();
-
- (*front)->read(data.set_buffer() + data.get_length(), readSz);
- data.set_length(data.get_length() + readSz);
- (*front)->set_current(before);
-
- if (data.get_length() == dataSz)
- break;
-
- elements--;
- front++;
- }
-}
-
-
-// flush output buffer
-void SSL::flushBuffer()
-{
- if (GetError()) return;
-
- uint sz = STL::for_each(buffers_.getHandShake().begin(),
- buffers_.getHandShake().end(),
- SumBuffer()).total_;
- output_buffer out(sz);
- size_t elements = buffers_.getHandShake().size();
-
- for (size_t i = 0; i < elements; i++) {
- output_buffer* front = buffers_.getHandShake().front();
- out.write(front->get_buffer(), front->get_size());
-
- buffers_.useHandShake().pop_front();
- ysDelete(front);
- }
- Send(out.get_buffer(), out.get_size());
-}
-
-
-void SSL::Send(const byte* buffer, uint sz)
-{
- unsigned int sent = 0;
-
- if (socket_.send(buffer, sz, sent) != sz) {
- if (socket_.WouldBlock()) {
- buffers_.SetOutput(NEW_YS output_buffer(sz - sent, buffer + sent,
- sz - sent));
- SetError(YasslError(SSL_ERROR_WANT_WRITE));
- }
- else
- SetError(send_error);
- }
-}
-
-
-void SSL::SendWriteBuffered()
-{
- output_buffer* out = buffers_.TakeOutput();
-
- if (out) {
- mySTL::auto_ptr<output_buffer> tmp(out);
- Send(out->get_buffer(), out->get_size());
- }
-}
-
-
-// get sequence number, if verify get peer's
-uint SSL::get_SEQIncrement(bool verify)
-{
- if (verify)
- return secure_.use_connection().peer_sequence_number_++;
- else
- return secure_.use_connection().sequence_number_++;
-}
-
-
-const byte* SSL::get_macSecret(bool verify)
-{
- if ( (secure_.get_parms().entity_ == client_end && !verify) ||
- (secure_.get_parms().entity_ == server_end && verify) )
- return secure_.get_connection().client_write_MAC_secret_;
- else
- return secure_.get_connection().server_write_MAC_secret_;
-}
-
-
-void SSL::verifyState(const RecordLayerHeader& rlHeader)
-{
- if (GetError()) return;
-
- if (rlHeader.version_.major_ != 3 || rlHeader.version_.minor_ > 2) {
- SetError(badVersion_error);
- return;
- }
-
- if (states_.getRecord() == recordNotReady ||
- (rlHeader.type_ == application_data && // data and handshake
- states_.getHandShake() != handShakeReady) ) // isn't complete yet
- SetError(record_layer);
-}
-
-
-void SSL::verifyState(const HandShakeHeader& hsHeader)
-{
- if (GetError()) return;
-
- if (states_.getHandShake() == handShakeNotReady) {
- SetError(handshake_layer);
- return;
- }
-
- if (states_.SetMessageRecvd(hsHeader.get_handshakeType()) != 0) {
- order_error();
- return;
- }
-
- if (secure_.get_parms().entity_ == client_end)
- verifyClientState(hsHeader.get_handshakeType());
- else
- verifyServerState(hsHeader.get_handshakeType());
-}
-
-
-void SSL::verifyState(ClientState cs)
-{
- if (GetError()) return;
- if (states_.getClient() != cs) order_error();
-}
-
-
-void SSL::verifyState(ServerState ss)
-{
- if (GetError()) return;
- if (states_.getServer() != ss) order_error();
-}
-
-
-void SSL::verfiyHandShakeComplete()
-{
- if (GetError()) return;
- if (states_.getHandShake() != handShakeReady) order_error();
-}
-
-
-void SSL::verifyClientState(HandShakeType hsType)
-{
- if (GetError()) return;
-
- switch(hsType) {
- case server_hello :
- if (states_.getClient() != serverNull)
- order_error();
- break;
- case certificate :
- if (states_.getClient() != serverHelloComplete)
- order_error();
- break;
- case server_key_exchange :
- if (states_.getClient() != serverCertComplete)
- order_error();
- break;
- case certificate_request :
- if (states_.getClient() != serverCertComplete &&
- states_.getClient() != serverKeyExchangeComplete)
- order_error();
- break;
- case server_hello_done :
- if (states_.getClient() != serverCertComplete &&
- states_.getClient() != serverKeyExchangeComplete)
- order_error();
- break;
- case finished :
- if (states_.getClient() != serverHelloDoneComplete ||
- secure_.get_parms().pending_) // no change
- order_error(); // cipher yet
- break;
- default :
- order_error();
- };
-}
-
-
-void SSL::verifyServerState(HandShakeType hsType)
-{
- if (GetError()) return;
-
- switch(hsType) {
- case client_hello :
- if (states_.getServer() != clientNull)
- order_error();
- break;
- case certificate :
- if (states_.getServer() != clientHelloComplete)
- order_error();
- break;
- case client_key_exchange :
- if (states_.getServer() != clientHelloComplete)
- order_error();
- break;
- case certificate_verify :
- if (states_.getServer() != clientKeyExchangeComplete)
- order_error();
- break;
- case finished :
- if (states_.getServer() != clientKeyExchangeComplete ||
- secure_.get_parms().pending_) // no change
- order_error(); // cipher yet
- break;
- default :
- order_error();
- };
-}
-
-
-// try to find a suite match
-void SSL::matchSuite(const opaque* peer, uint length)
-{
- if (length == 0 || (length % 2) != 0) {
- SetError(bad_input);
- return;
- }
-
- // start with best, if a match we are good, Ciphers are at odd index
- // since all SSL and TLS ciphers have 0x00 first byte
- for (uint i = 1; i < secure_.get_parms().suites_size_; i += 2)
- for (uint j = 0; (j + 1) < length; j+= 2) {
- if (peer[j] != 0x00) {
- continue; // only 0x00 first byte supported
- }
-
- if (secure_.use_parms().suites_[i] == peer[j + 1]) {
- secure_.use_parms().suite_[0] = 0x00;
- secure_.use_parms().suite_[1] = peer[j + 1];
- return;
- }
- }
-
- SetError(match_error);
-}
-
-
-void SSL::set_session(SSL_SESSION* s)
-{
- if (getSecurity().GetContext()->GetSessionCacheOff())
- return;
-
- if (s && GetSessions().lookup(s->GetID(), &secure_.use_resume())) {
- secure_.set_resuming(true);
- crypto_.use_certManager().setPeerX509(s->GetPeerX509());
- }
-}
-
-
-const Crypto& SSL::getCrypto() const
-{
- return crypto_;
-}
-
-
-const Security& SSL::getSecurity() const
-{
- return secure_;
-}
-
-
-const States& SSL::getStates() const
-{
- return states_;
-}
-
-
-const sslHashes& SSL::getHashes() const
-{
- return hashes_;
-}
-
-
-const sslFactory& SSL::getFactory() const
-{
- return GetSSL_Factory();
-}
-
-
-const Socket& SSL::getSocket() const
-{
- return socket_;
-}
-
-
-YasslError SSL::GetError() const
-{
- return states_.What();
-}
-
-
-bool SSL::GetQuietShutdown() const
-{
- return quietShutdown_;
-}
-
-
-bool SSL::GetMultiProtocol() const
-{
- return secure_.GetContext()->getMethod()->multipleProtocol();
-}
-
-
-Crypto& SSL::useCrypto()
-{
- return crypto_;
-}
-
-
-Security& SSL::useSecurity()
-{
- return secure_;
-}
-
-
-States& SSL::useStates()
-{
- return states_;
-}
-
-
-sslHashes& SSL::useHashes()
-{
- return hashes_;
-}
-
-
-Socket& SSL::useSocket()
-{
- return socket_;
-}
-
-
-Log& SSL::useLog()
-{
- return log_;
-}
-
-
-bool SSL::isTLS() const
-{
- return secure_.get_connection().TLS_;
-}
-
-
-bool SSL::isTLSv1_1() const
-{
- return secure_.get_connection().TLSv1_1_;
-}
-
-
-// is there buffered data available, optimization to remove iteration on buffer
-bool SSL::HasData() const
-{
- return has_data_;
-}
-
-
-void SSL::addData(input_buffer* data)
-{
- buffers_.useData().push_back(data);
- if (!has_data_) has_data_ = true;
-}
-
-
-void SSL::addBuffer(output_buffer* b)
-{
- buffers_.useHandShake().push_back(b);
-}
-
-
-void SSL_SESSION::CopyX509(X509* x)
-{
- if (x == 0) return;
-
- X509_NAME* issuer = x->GetIssuer();
- X509_NAME* subject = x->GetSubject();
- ASN1_TIME* before = x->GetBefore();
- ASN1_TIME* after = x->GetAfter();
-
- peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(),
- subject->GetName(), subject->GetLength(), before, after,
- issuer->GetCnPosition(), issuer->GetCnLength(),
- subject->GetCnPosition(), subject->GetCnLength());
-}
-
-
-// store connection parameters
-SSL_SESSION::SSL_SESSION(const SSL& ssl, RandomPool& ran)
- : timeout_(DEFAULT_TIMEOUT), random_(ran), peerX509_(0)
-{
- const Connection& conn = ssl.getSecurity().get_connection();
-
- memcpy(sessionID_, conn.sessionID_, ID_LEN);
- memcpy(master_secret_, conn.master_secret_, SECRET_LEN);
- memcpy(suite_, ssl.getSecurity().get_parms().suite_, SUITE_LEN);
-
- bornOn_ = lowResTimer();
-
- CopyX509(ssl.getCrypto().get_certManager().get_peerX509());
-}
-
-
-// for resumption copy in ssl::parameters
-SSL_SESSION::SSL_SESSION(RandomPool& ran)
- : bornOn_(0), timeout_(0), random_(ran), peerX509_(0)
-{
- memset(sessionID_, 0, ID_LEN);
- memset(master_secret_, 0, SECRET_LEN);
- memset(suite_, 0, SUITE_LEN);
-}
-
-
-SSL_SESSION& SSL_SESSION::operator=(const SSL_SESSION& that)
-{
- memcpy(sessionID_, that.sessionID_, ID_LEN);
- memcpy(master_secret_, that.master_secret_, SECRET_LEN);
- memcpy(suite_, that.suite_, SUITE_LEN);
-
- bornOn_ = that.bornOn_;
- timeout_ = that.timeout_;
-
- if (peerX509_) {
- ysDelete(peerX509_);
- peerX509_ = 0;
- }
- CopyX509(that.peerX509_);
-
- return *this;
-}
-
-
-const opaque* SSL_SESSION::GetID() const
-{
- return sessionID_;
-}
-
-
-const opaque* SSL_SESSION::GetSecret() const
-{
- return master_secret_;
-}
-
-
-const Cipher* SSL_SESSION::GetSuite() const
-{
- return suite_;
-}
-
-
-X509* SSL_SESSION::GetPeerX509() const
-{
- return peerX509_;
-}
-
-
-uint SSL_SESSION::GetBornOn() const
-{
- return bornOn_;
-}
-
-
-uint SSL_SESSION::GetTimeOut() const
-{
- return timeout_;
-}
-
-
-void SSL_SESSION::SetTimeOut(uint t)
-{
- timeout_ = t;
-}
-
-
-extern void clean(volatile opaque*, uint, RandomPool&);
-
-
-// clean up secret data
-SSL_SESSION::~SSL_SESSION()
-{
- volatile opaque* p = master_secret_;
- clean(p, SECRET_LEN, random_);
-
- ysDelete(peerX509_);
-}
-
-
-static Sessions* sessionsInstance = 0;
-
-Sessions& GetSessions()
-{
- if (!sessionsInstance)
- sessionsInstance = NEW_YS Sessions;
- return *sessionsInstance;
-}
-
-
-static sslFactory* sslFactoryInstance = 0;
-
-sslFactory& GetSSL_Factory()
-{
- if (!sslFactoryInstance)
- sslFactoryInstance = NEW_YS sslFactory;
- return *sslFactoryInstance;
-}
-
-
-static Errors* errorsInstance = 0;
-
-Errors& GetErrors()
-{
- if (!errorsInstance)
- errorsInstance = NEW_YS Errors;
- return *errorsInstance;
-}
-
-bool HasErrors()
-{
- return (errorsInstance != 0);
-}
-
-
-typedef Mutex::Lock Lock;
-
-
-
-void Sessions::add(const SSL& ssl)
-{
- if (ssl.getSecurity().get_connection().sessionID_Set_) {
- Lock guard(mutex_);
- list_.push_back(NEW_YS SSL_SESSION(ssl, random_));
- count_++;
- }
-
- if (count_ > SESSION_FLUSH_COUNT)
- if (!ssl.getSecurity().GetContext()->GetSessionCacheFlushOff())
- Flush();
-}
-
-
-Sessions::~Sessions()
-{
- STL::for_each(list_.begin(), list_.end(), del_ptr_zero());
-}
-
-
-// locals
-namespace yassl_int_cpp_local2 { // for explicit templates
-
-typedef STL::list<SSL_SESSION*>::iterator sess_iterator;
-typedef STL::list<ThreadError>::iterator thr_iterator;
-
-struct sess_match {
- const opaque* id_;
- explicit sess_match(const opaque* p) : id_(p) {}
-
- bool operator()(SSL_SESSION* sess)
- {
- if ( memcmp(sess->GetID(), id_, ID_LEN) == 0)
- return true;
- return false;
- }
-};
-
-
-THREAD_ID_T GetSelf()
-{
-#ifndef _POSIX_THREADS
- return GetCurrentThreadId();
-#else
- return pthread_self();
-#endif
-}
-
-struct thr_match {
- THREAD_ID_T id_;
- explicit thr_match() : id_(GetSelf()) {}
-
- bool operator()(ThreadError thr)
- {
- if (thr.threadID_ == id_)
- return true;
- return false;
- }
-};
-
-
-} // local namespace
-using namespace yassl_int_cpp_local2;
-
-
-// lookup session by id, return a copy if space provided
-SSL_SESSION* Sessions::lookup(const opaque* id, SSL_SESSION* copy)
-{
- Lock guard(mutex_);
- sess_iterator find = STL::find_if(list_.begin(), list_.end(),
- sess_match(id));
- if (find != list_.end()) {
- uint current = lowResTimer();
- if ( ((*find)->GetBornOn() + (*find)->GetTimeOut()) < current) {
- del_ptr_zero()(*find);
- list_.erase(find);
- return 0;
- }
- if (copy)
- *copy = *(*find);
- return *find;
- }
- return 0;
-}
-
-
-// remove a session by id
-void Sessions::remove(const opaque* id)
-{
- Lock guard(mutex_);
- sess_iterator find = STL::find_if(list_.begin(), list_.end(),
- sess_match(id));
- if (find != list_.end()) {
- del_ptr_zero()(*find);
- list_.erase(find);
- }
-}
-
-
-// flush expired sessions from cache
-void Sessions::Flush()
-{
- Lock guard(mutex_);
- sess_iterator next = list_.begin();
- uint current = lowResTimer();
-
- while (next != list_.end()) {
- sess_iterator si = next;
- ++next;
- if ( ((*si)->GetBornOn() + (*si)->GetTimeOut()) < current) {
- del_ptr_zero()(*si);
- list_.erase(si);
- }
- }
- count_ = 0; // reset flush counter
-}
-
-
-// remove a self thread error
-void Errors::Remove()
-{
- Lock guard(mutex_);
- thr_iterator find = STL::find_if(list_.begin(), list_.end(),
- thr_match());
- if (find != list_.end())
- list_.erase(find);
-}
-
-
-// lookup self error code
-int Errors::Lookup(bool peek)
-{
- Lock guard(mutex_);
- thr_iterator find = STL::find_if(list_.begin(), list_.end(),
- thr_match());
- if (find != list_.end()) {
- int ret = find->errorID_;
- if (!peek)
- list_.erase(find);
- return ret;
- }
- else
- return 0;
-}
-
-
-// add a new error code for self
-void Errors::Add(int error)
-{
- ThreadError add;
- add.errorID_ = error;
- add.threadID_ = GetSelf();
-
- Remove(); // may have old error
-
- Lock guard(mutex_);
- list_.push_back(add);
-}
-
-
-SSL_METHOD::SSL_METHOD(ConnectionEnd ce, ProtocolVersion pv, bool multiProto)
- : version_(pv), side_(ce), verifyPeer_(false), verifyNone_(false),
- failNoCert_(false), multipleProtocol_(multiProto)
-{}
-
-
-ProtocolVersion SSL_METHOD::getVersion() const
-{
- return version_;
-}
-
-
-ConnectionEnd SSL_METHOD::getSide() const
-{
- return side_;
-}
-
-
-void SSL_METHOD::setVerifyPeer()
-{
- verifyPeer_ = true;
-}
-
-
-void SSL_METHOD::setVerifyNone()
-{
- verifyNone_ = true;
-}
-
-
-void SSL_METHOD::setFailNoCert()
-{
- failNoCert_ = true;
-}
-
-
-bool SSL_METHOD::verifyPeer() const
-{
- return verifyPeer_;
-}
-
-
-bool SSL_METHOD::verifyNone() const
-{
- return verifyNone_;
-}
-
-
-bool SSL_METHOD::failNoCert() const
-{
- return failNoCert_;
-}
-
-
-bool SSL_METHOD::multipleProtocol() const
-{
- return multipleProtocol_;
-}
-
-
-SSL_CTX::SSL_CTX(SSL_METHOD* meth)
- : method_(meth), certificate_(0), privateKey_(0), passwordCb_(0),
- userData_(0), sessionCacheOff_(false), sessionCacheFlushOff_(false),
- verifyCallback_(0)
-{}
-
-
-SSL_CTX::~SSL_CTX()
-{
- ysDelete(method_);
- ysDelete(certificate_);
- ysDelete(privateKey_);
-
- STL::for_each(caList_.begin(), caList_.end(), del_ptr_zero());
-}
-
-
-void SSL_CTX::AddCA(x509* ca)
-{
- caList_.push_back(ca);
-}
-
-
-const SSL_CTX::CertList&
-SSL_CTX::GetCA_List() const
-{
- return caList_;
-}
-
-
-VerifyCallback SSL_CTX::getVerifyCallback() const
-{
- return verifyCallback_;
-}
-
-
-const x509* SSL_CTX::getCert() const
-{
- return certificate_;
-}
-
-
-const x509* SSL_CTX::getKey() const
-{
- return privateKey_;
-}
-
-
-const SSL_METHOD* SSL_CTX::getMethod() const
-{
- return method_;
-}
-
-
-const Ciphers& SSL_CTX::GetCiphers() const
-{
- return ciphers_;
-}
-
-
-const DH_Parms& SSL_CTX::GetDH_Parms() const
-{
- return dhParms_;
-}
-
-
-const Stats& SSL_CTX::GetStats() const
-{
- return stats_;
-}
-
-
-pem_password_cb SSL_CTX::GetPasswordCb() const
-{
- return passwordCb_;
-}
-
-
-void SSL_CTX::SetPasswordCb(pem_password_cb cb)
-{
- passwordCb_ = cb;
-}
-
-
-void* SSL_CTX::GetUserData() const
-{
- return userData_;
-}
-
-
-bool SSL_CTX::GetSessionCacheOff() const
-{
- return sessionCacheOff_;
-}
-
-
-bool SSL_CTX::GetSessionCacheFlushOff() const
-{
- return sessionCacheFlushOff_;
-}
-
-
-void SSL_CTX::SetUserData(void* data)
-{
- userData_ = data;
-}
-
-
-void SSL_CTX::SetSessionCacheOff()
-{
- sessionCacheOff_ = true;
-}
-
-
-void SSL_CTX::SetSessionCacheFlushOff()
-{
- sessionCacheFlushOff_ = true;
-}
-
-
-void SSL_CTX::setVerifyPeer()
-{
- method_->setVerifyPeer();
-}
-
-
-void SSL_CTX::setVerifyNone()
-{
- method_->setVerifyNone();
-}
-
-
-void SSL_CTX::setFailNoCert()
-{
- method_->setFailNoCert();
-}
-
-
-void SSL_CTX::setVerifyCallback(VerifyCallback vc)
-{
- verifyCallback_ = vc;
-}
-
-
-bool SSL_CTX::SetDH(const DH& dh)
-{
- dhParms_.p_ = dh.p->int_;
- dhParms_.g_ = dh.g->int_;
-
- return dhParms_.set_ = true;
-}
-
-
-bool SSL_CTX::SetCipherList(const char* list)
-{
- if (!list)
- return false;
-
- bool ret = false;
- char name[MAX_SUITE_NAME];
-
- char needle[] = ":";
- char* haystack = const_cast<char*>(list);
- char* prev;
-
- const int suiteSz = sizeof(cipher_names) / sizeof(cipher_names[0]);
- int idx = 0;
-
- for(;;) {
- size_t len;
- prev = haystack;
- haystack = strstr(haystack, needle);
-
- if (!haystack) // last cipher
- len = min(sizeof(name), strlen(prev));
- else
- len = min(sizeof(name), (size_t)(haystack - prev));
-
- strncpy(name, prev, len);
- name[(len == sizeof(name)) ? len - 1 : len] = 0;
-
- for (int i = 0; i < suiteSz; i++)
- if (strncmp(name, cipher_names[i], sizeof(name)) == 0) {
-
- ciphers_.suites_[idx++] = 0x00; // first byte always zero
- ciphers_.suites_[idx++] = i;
-
- if (!ret) ret = true; // found at least one
- break;
- }
- if (!haystack) break;
- haystack++;
- }
-
- if (ret) {
- ciphers_.setSuites_ = true;
- ciphers_.suiteSz_ = idx;
- }
-
- return ret;
-}
-
-
-void SSL_CTX::IncrementStats(StatsField fd)
-{
-
- Lock guard(mutex_);
-
- switch (fd) {
-
- case Accept:
- ++stats_.accept_;
- break;
-
- case Connect:
- ++stats_.connect_;
- break;
-
- case AcceptGood:
- ++stats_.acceptGood_;
- break;
-
- case ConnectGood:
- ++stats_.connectGood_;
- break;
-
- case AcceptRenegotiate:
- ++stats_.acceptRenegotiate_;
- break;
-
- case ConnectRenegotiate:
- ++stats_.connectRenegotiate_;
- break;
-
- case Hits:
- ++stats_.hits_;
- break;
-
- case CbHits:
- ++stats_.cbHits_;
- break;
-
- case CacheFull:
- ++stats_.cacheFull_;
- break;
-
- case Misses:
- ++stats_.misses_;
- break;
-
- case Timeouts:
- ++stats_.timeouts_;
- break;
-
- case Number:
- ++stats_.number_;
- break;
-
- case GetCacheSize:
- ++stats_.getCacheSize_;
- break;
-
- case VerifyMode:
- ++stats_.verifyMode_;
- break;
-
- case VerifyDepth:
- ++stats_.verifyDepth_;
- break;
-
- default:
- break;
- }
-}
-
-
-Crypto::Crypto()
- : digest_(0), cipher_(0), dh_(0)
-{}
-
-
-Crypto::~Crypto()
-{
- ysDelete(dh_);
- ysDelete(cipher_);
- ysDelete(digest_);
-}
-
-
-const Digest& Crypto::get_digest() const
-{
- return *digest_;
-}
-
-
-const BulkCipher& Crypto::get_cipher() const
-{
- return *cipher_;
-}
-
-
-const DiffieHellman& Crypto::get_dh() const
-{
- return *dh_;
-}
-
-
-const RandomPool& Crypto::get_random() const
-{
- return random_;
-}
-
-
-const CertManager& Crypto::get_certManager() const
-{
- return cert_;
-}
-
-
-
-Digest& Crypto::use_digest()
-{
- return *digest_;
-}
-
-
-BulkCipher& Crypto::use_cipher()
-{
- return *cipher_;
-}
-
-
-DiffieHellman& Crypto::use_dh()
-{
- return *dh_;
-}
-
-
-RandomPool& Crypto::use_random()
-{
- return random_;
-}
-
-
-CertManager& Crypto::use_certManager()
-{
- return cert_;
-}
-
-
-
-void Crypto::SetDH(DiffieHellman* dh)
-{
- dh_ = dh;
-}
-
-
-void Crypto::SetDH(const DH_Parms& dh)
-{
- if (dh.set_)
- dh_ = NEW_YS DiffieHellman(dh.p_, dh.g_, random_);
-}
-
-
-bool Crypto::DhSet()
-{
- return dh_ != 0;
-}
-
-
-void Crypto::setDigest(Digest* digest)
-{
- digest_ = digest;
-}
-
-
-void Crypto::setCipher(BulkCipher* c)
-{
- cipher_ = c;
-}
-
-
-const MD5& sslHashes::get_MD5() const
-{
- return md5HandShake_;
-}
-
-
-const SHA& sslHashes::get_SHA() const
-{
- return shaHandShake_;
-}
-
-
-const Finished& sslHashes::get_verify() const
-{
- return verify_;
-}
-
-
-const Hashes& sslHashes::get_certVerify() const
-{
- return certVerify_;
-}
-
-
-MD5& sslHashes::use_MD5(){
- return md5HandShake_;
-}
-
-
-SHA& sslHashes::use_SHA()
-{
- return shaHandShake_;
-}
-
-
-Finished& sslHashes::use_verify()
-{
- return verify_;
-}
-
-
-Hashes& sslHashes::use_certVerify()
-{
- return certVerify_;
-}
-
-
-Buffers::Buffers() : prevSent(0), plainSz(0), rawInput_(0), output_(0)
-{}
-
-
-Buffers::~Buffers()
-{
- STL::for_each(handShakeList_.begin(), handShakeList_.end(),
- del_ptr_zero()) ;
- STL::for_each(dataList_.begin(), dataList_.end(),
- del_ptr_zero()) ;
- ysDelete(rawInput_);
- ysDelete(output_);
-}
-
-
-void Buffers::SetOutput(output_buffer* ob)
-{
- output_ = ob;
-}
-
-
-void Buffers::SetRawInput(input_buffer* ib)
-{
- rawInput_ = ib;
-}
-
-
-input_buffer* Buffers::TakeRawInput()
-{
- input_buffer* ret = rawInput_;
- rawInput_ = 0;
-
- return ret;
-}
-
-
-output_buffer* Buffers::TakeOutput()
-{
- output_buffer* ret = output_;
- output_ = 0;
-
- return ret;
-}
-
-
-const Buffers::inputList& Buffers::getData() const
-{
- return dataList_;
-}
-
-
-const Buffers::outputList& Buffers::getHandShake() const
-{
- return handShakeList_;
-}
-
-
-Buffers::inputList& Buffers::useData()
-{
- return dataList_;
-}
-
-
-Buffers::outputList& Buffers::useHandShake()
-{
- return handShakeList_;
-}
-
-
-Security::Security(ProtocolVersion pv, RandomPool& ran, ConnectionEnd ce,
- const Ciphers& ciphers, SSL_CTX* ctx, bool haveDH)
- : conn_(pv, ran), parms_(ce, ciphers, pv, haveDH), resumeSession_(ran),
- ctx_(ctx), resuming_(false)
-{}
-
-
-const Connection& Security::get_connection() const
-{
- return conn_;
-}
-
-
-const SSL_CTX* Security::GetContext() const
-{
- return ctx_;
-}
-
-
-const Parameters& Security::get_parms() const
-{
- return parms_;
-}
-
-
-const SSL_SESSION& Security::get_resume() const
-{
- return resumeSession_;
-}
-
-
-bool Security::get_resuming() const
-{
- return resuming_;
-}
-
-
-Connection& Security::use_connection()
-{
- return conn_;
-}
-
-
-Parameters& Security::use_parms()
-{
- return parms_;
-}
-
-
-SSL_SESSION& Security::use_resume()
-{
- return resumeSession_;
-}
-
-
-void Security::set_resuming(bool b)
-{
- resuming_ = b;
-}
-
-
-X509_NAME::X509_NAME(const char* n, size_t sz, int pos, int len)
- : name_(0), sz_(sz), cnPosition_(pos), cnLen_(len)
-{
- if (sz) {
- name_ = NEW_YS char[sz];
- memcpy(name_, n, sz);
- }
- entry_.data = 0;
-}
-
-
-X509_NAME::~X509_NAME()
-{
- ysArrayDelete(name_);
- ysArrayDelete(entry_.data);
-}
-
-
-const char* X509_NAME::GetName() const
-{
- return name_;
-}
-
-
-size_t X509_NAME::GetLength() const
-{
- return sz_;
-}
-
-
-X509::X509(const char* i, size_t iSz, const char* s, size_t sSz,
- ASN1_STRING *b, ASN1_STRING *a,
- int issPos, int issLen,
- int subPos, int subLen)
- : issuer_(i, iSz, issPos, issLen), subject_(s, sSz, subPos, subLen),
- beforeDate_((char *) b->data, b->length, b->type),
- afterDate_((char *) a->data, a->length, a->type)
-{}
-
-
-X509_NAME* X509::GetIssuer()
-{
- return &issuer_;
-}
-
-
-X509_NAME* X509::GetSubject()
-{
- return &subject_;
-}
-
-
-ASN1_TIME* X509::GetBefore()
-{
- return beforeDate_.GetString();
-}
-
-
-ASN1_TIME* X509::GetAfter()
-{
- return afterDate_.GetString();
-}
-
-
-ASN1_STRING* X509_NAME::GetEntry(int i)
-{
- if (i < 0 || i >= int(sz_))
- return 0;
-
- if (i != cnPosition_ || cnLen_ <= 0) // only entry currently supported
- return 0;
-
- if (cnLen_ > int(sz_-i)) // make sure there's room in read buffer
- return 0;
-
- if (entry_.data)
- ysArrayDelete(entry_.data);
- entry_.data = NEW_YS byte[cnLen_+1]; // max size;
-
- memcpy(entry_.data, &name_[i], cnLen_);
- entry_.data[cnLen_] = 0;
- entry_.length = cnLen_;
- entry_.type = 0;
-
- return &entry_;
-}
-
-
-StringHolder::StringHolder(const char* str, int sz, byte type)
-{
- asnString_.length = sz;
- asnString_.data = NEW_YS byte[sz + 1];
- memcpy(asnString_.data, str, sz);
- asnString_.type = type;
-}
-
-
-StringHolder::~StringHolder()
-{
- ysArrayDelete(asnString_.data);
-}
-
-
-ASN1_STRING* StringHolder::GetString()
-{
- return &asnString_;
-}
-
-
-#ifdef HAVE_LIBZ
-
- void* myAlloc(void* /* opaque */, unsigned int item, unsigned int size)
- {
- return NEW_YS unsigned char[item * size];
- }
-
-
- void myFree(void* /* opaque */, void* memory)
- {
- unsigned char* ptr = static_cast<unsigned char*>(memory);
- yaSSL::ysArrayDelete(ptr);
- }
-
-
- // put size in front of compressed data
- int Compress(const byte* in, int sz, input_buffer& buffer)
- {
- byte tmp[LENGTH_SZ];
- z_stream c_stream; /* compression stream */
-
- buffer.allocate(sz + sizeof(uint16) + COMPRESS_EXTRA);
-
- c_stream.zalloc = myAlloc;
- c_stream.zfree = myFree;
- c_stream.opaque = (voidpf)0;
-
- c_stream.next_in = const_cast<byte*>(in);
- c_stream.avail_in = sz;
- c_stream.next_out = buffer.get_buffer() + sizeof(tmp);
- c_stream.avail_out = buffer.get_capacity() - sizeof(tmp);
-
- if (deflateInit(&c_stream, 8) != Z_OK) return -1;
- int err = deflate(&c_stream, Z_FINISH);
- deflateEnd(&c_stream);
- if (err != Z_OK && err != Z_STREAM_END) return -1;
-
- c16toa(sz, tmp);
- memcpy(buffer.get_buffer(), tmp, sizeof(tmp));
- buffer.add_size(c_stream.total_out + sizeof(tmp));
-
- return 0;
- }
-
-
- // get uncompressed size in front
- int DeCompress(input_buffer& in, int sz, input_buffer& out)
- {
- byte tmp[LENGTH_SZ];
-
- tmp[0] = in[AUTO];
- tmp[1] = in[AUTO];
-
- uint16 len;
- ato16(tmp, len);
-
- out.allocate(len);
-
- z_stream d_stream; /* decompression stream */
-
- d_stream.zalloc = myAlloc;
- d_stream.zfree = myFree;
- d_stream.opaque = (voidpf)0;
-
- d_stream.next_in = in.get_buffer() + in.get_current();
- d_stream.avail_in = sz - sizeof(tmp);
- d_stream.next_out = out.get_buffer();
- d_stream.avail_out = out.get_capacity();
-
- if (inflateInit(&d_stream) != Z_OK) return -1;
- int err = inflate(&d_stream, Z_FINISH);
- inflateEnd(&d_stream);
- if (err != Z_OK && err != Z_STREAM_END) return -1;
-
- out.add_size(d_stream.total_out);
- in.set_current(in.get_current() + sz - sizeof(tmp));
-
- return 0;
- }
-
-
-#else // LIBZ
-
- // these versions should never get called
- int Compress(const byte* in, int sz, input_buffer& buffer)
- {
- return -1;
- }
-
-
- int DeCompress(input_buffer& in, int sz, input_buffer& out)
- {
- return -1;
- }
-
-
-#endif // LIBZ
-
-
-} // namespace
-
-
-
-extern "C" void yaSSL_CleanUp()
-{
- TaoCrypt::CleanUp();
- yaSSL::ysDelete(yaSSL::sslFactoryInstance);
- yaSSL::ysDelete(yaSSL::sessionsInstance);
- yaSSL::ysDelete(yaSSL::errorsInstance);
-
- // In case user calls more than once, prevent seg fault
- yaSSL::sslFactoryInstance = 0;
- yaSSL::sessionsInstance = 0;
- yaSSL::errorsInstance = 0;
-}
diff --git a/extra/yassl/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt
deleted file mode 100644
index ebfa70e8799..00000000000
--- a/extra/yassl/taocrypt/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL
- ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include)
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
-ADD_DEFINITIONS(${SSL_DEFINES})
-SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
- src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp
- src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp
- src/rabbit.cpp src/hc128.cpp
- include/aes.hpp include/algebra.hpp include/arc4.hpp include/asn.hpp include/block.hpp
- include/coding.hpp include/des.hpp include/dh.hpp include/dsa.hpp include/dsa.hpp
- include/error.hpp include/file.hpp include/hash.hpp include/hmac.hpp include/integer.hpp
- include/md2.hpp include/md5.hpp include/misc.hpp include/modarith.hpp include/modes.hpp
- include/random.hpp include/ripemd.hpp include/rsa.hpp include/sha.hpp
- include/rabbit.hpp include/hc128.hpp)
-
-ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
-RESTRICT_SYMBOL_EXPORTS(taocrypt)
-
diff --git a/extra/yassl/taocrypt/COPYING b/extra/yassl/taocrypt/COPYING
deleted file mode 100644
index 98861a5402d..00000000000
--- a/extra/yassl/taocrypt/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/extra/yassl/taocrypt/INSTALL b/extra/yassl/taocrypt/INSTALL
deleted file mode 100644
index 54caf7c190f..00000000000
--- a/extra/yassl/taocrypt/INSTALL
+++ /dev/null
@@ -1,229 +0,0 @@
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
-Foundation, Inc.
-
- This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
- These are generic installation instructions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
-
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
-for details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
-
-Installation Names
-==================
-
- By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc. You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
- There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the `--target=TYPE' option to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
- Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-will cause the specified gcc to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-`configure' Invocation
-======================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
- Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
-
diff --git a/extra/yassl/taocrypt/README b/extra/yassl/taocrypt/README
deleted file mode 100644
index bd786b7ce54..00000000000
--- a/extra/yassl/taocrypt/README
+++ /dev/null
@@ -1,48 +0,0 @@
-TaoCrypt release 0.9.2 02/5/2007
-
-
-This release includes bug fixes, portability enhancements, and some
-optimiations.
-
-See 0.9.0 for build instructions.
-
-
-
-
-******************TaoCrypt release 0.9.0 09/18/2006
-
-This is the first release of TaoCrypt, it was previously only included with
-yaSSL. TaoCrypt is highly portable and fast, its features include:
-
-One way hash functions: SHA-1, MD2, MD4, MD5, RIPEMD-160
-Message authentication codes: HMAC
-Block Ciphers: DES, Triple-DES, AES, Blowfish, Twofish
-Stream Ciphers: ARC4
-Public Key Crypto: RSA, DSA, Diffie-Hellman
-Password based key derivation: PBKDF2 from PKCS #5
-Pseudo Random Number Generators
-Large Integer Support
-Base 16/64 encoding/decoding
-DER encoding/decoding
-X.509 processing
-SSE2 and ia32 asm for the right processors and compilers
-
-
-To build on Unix
-
- ./configure
- make
-
- To test the build, from the ./test directory run ./test
-
-
-On Windows
-
- Open the taocrypt project workspace
- Choose (Re)Build All
-
- To test the build, run the test executable
-
-
-Please send any questions or comments to todd@yassl.com.
-
diff --git a/extra/yassl/taocrypt/benchmark/benchmark.cpp b/extra/yassl/taocrypt/benchmark/benchmark.cpp
deleted file mode 100644
index 6afad32ed41..00000000000
--- a/extra/yassl/taocrypt/benchmark/benchmark.cpp
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-// benchmark.cpp
-// TaoCrypt benchmark
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string.h>
-#include <stdio.h>
-
-#include "runtime.hpp"
-#include "des.hpp"
-#include "aes.hpp"
-#include "twofish.hpp"
-#include "blowfish.hpp"
-#include "arc4.hpp"
-#include "md5.hpp"
-#include "sha.hpp"
-#include "ripemd.hpp"
-#include "rsa.hpp"
-#include "dh.hpp"
-#include "dsa.hpp"
-
-
-using namespace TaoCrypt;
-
-void bench_aes(bool show);
-void bench_des();
-void bench_blowfish();
-void bench_twofish();
-void bench_arc4();
-
-void bench_md5();
-void bench_sha();
-void bench_ripemd();
-
-void bench_rsa();
-void bench_dh();
-void bench_dsa();
-
-double current_time();
-
-
-
-
-int main(int argc, char** argv)
-{
- bench_aes(false);
- bench_aes(true);
- bench_blowfish();
- bench_twofish();
- bench_arc4();
- bench_des();
-
- printf("\n");
-
- bench_md5();
- bench_sha();
- bench_ripemd();
-
- printf("\n");
-
- bench_rsa();
- bench_dh();
- bench_dsa();
-
- return 0;
-}
-
-const int megs = 5; // how much to test
-
-const byte key[] =
-{
- 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
- 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10,
- 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67
-};
-
-const byte iv[] =
-{
- 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef,
- 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
- 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81
-
-};
-
-
-byte plain [1024*1024];
-byte cipher[1024*1024];
-
-
-void bench_des()
-{
- DES_EDE3_CBC_Encryption enc;
- enc.SetKey(key, 16, iv);
-
- double start = current_time();
-
- for(int i = 0; i < megs; i++)
- enc.Process(plain, cipher, sizeof(plain));
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- printf("3DES %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-}
-
-
-void bench_aes(bool show)
-{
- AES_CBC_Encryption enc;
- enc.SetKey(key, 16, iv);
-
- double start = current_time();
-
- for(int i = 0; i < megs; i++)
- enc.Process(plain, cipher, sizeof(plain));
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- if (show)
- printf("AES %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-}
-
-
-void bench_twofish()
-{
- Twofish_CBC_Encryption enc;
- enc.SetKey(key, 16, iv);
-
- double start = current_time();
-
- for(int i = 0; i < megs; i++)
- enc.Process(plain, cipher, sizeof(plain));
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- printf("Twofish %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-
-}
-
-
-void bench_blowfish()
-{
- Blowfish_CBC_Encryption enc;
- enc.SetKey(key, 16, iv);
-
- double start = current_time();
-
- for(int i = 0; i < megs; i++)
- enc.Process(plain, cipher, sizeof(plain));
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- printf("Blowfish %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-}
-
-
-void bench_arc4()
-{
- ARC4 enc;
- enc.SetKey(key, 16);
-
- double start = current_time();
-
- for(int i = 0; i < megs; i++)
- enc.Process(cipher, plain, sizeof(plain));
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- printf("ARC4 %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-}
-
-
-void bench_md5()
-{
- MD5 hash;
- byte digest[MD5::DIGEST_SIZE];
-
- double start = current_time();
-
-
- for(int i = 0; i < megs; i++)
- hash.Update(plain, sizeof(plain));
-
- hash.Final(digest);
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- printf("MD5 %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-}
-
-
-void bench_sha()
-{
- SHA hash;
- byte digest[SHA::DIGEST_SIZE];
-
- double start = current_time();
-
-
- for(int i = 0; i < megs; i++)
- hash.Update(plain, sizeof(plain));
-
- hash.Final(digest);
-
- /*
- for(int i = 0; i < megs; i++)
- hash.AsmTransform(plain, 16384);
- */
-
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- printf("SHA %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-}
-
-
-void bench_ripemd()
-{
- RIPEMD160 hash;
- byte digest[RIPEMD160::DIGEST_SIZE];
-
- double start = current_time();
-
-
- for(int i = 0; i < megs; i++)
- hash.Update(plain, sizeof(plain));
-
- hash.Final(digest);
-
- double total = current_time() - start;
-
- double persec = 1 / total * megs;
-
- printf("RIPEMD %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
- persec);
-}
-
-RandomNumberGenerator rng;
-
-void bench_rsa()
-{
- const int times = 100;
-
- Source source;
- FileSource("./rsa1024.der", source);
-
- if (source.size() == 0) {
- printf("can't find ./rsa1024.der\n");
- return;
- }
- RSA_PrivateKey priv(source);
- RSAES_Encryptor enc(priv);
-
- byte message[] = "Everyone gets Friday off.";
- byte cipher[128]; // for 1024 bit
- byte plain[128]; // for 1024 bit
- const int len = (word32)strlen((char*)message);
-
- int i;
- double start = current_time();
-
- for (i = 0; i < times; i++)
- enc.Encrypt(message, len, cipher, rng);
-
- double total = current_time() - start;
- double each = total / times; // per second
- double milliEach = each * 1000; // milliseconds
-
- printf("RSA 1024 encryption took %6.2f milliseconds, avg over %d"
- " iterations\n", milliEach, times);
-
- RSAES_Decryptor dec(priv);
-
- start = current_time();
-
- for (i = 0; i < times; i++)
- dec.Decrypt(cipher, 128, plain, rng);
-
- total = current_time() - start;
- each = total / times; // per second
- milliEach = each * 1000; // milliseconds
-
- printf("RSA 1024 decryption took %6.2f milliseconds, avg over %d"
- " iterations\n", milliEach, times);
-}
-
-
-void bench_dh()
-{
- const int times = 100;
-
- Source source;
- FileSource("./dh1024.der", source);
-
- if (source.size() == 0) {
- printf("can't find ./dh1024.der\n");
- return;
- }
- DH dh(source);
-
- byte pub[128]; // for 1024 bit
- byte priv[128]; // for 1024 bit
-
- int i;
- double start = current_time();
-
- for (i = 0; i < times; i++)
- dh.GenerateKeyPair(rng, priv, pub);
-
- double total = current_time() - start;
- double each = total / times; // per second
- double milliEach = each * 1000; // milliseconds
-
- printf("DH 1024 key generation %6.2f milliseconds, avg over %d"
- " iterations\n", milliEach, times);
-
- DH dh2(dh);
- byte pub2[128]; // for 1024 bit
- byte priv2[128]; // for 1024 bit
- dh2.GenerateKeyPair(rng, priv2, pub2);
- unsigned char key[256];
-
- start = current_time();
-
- for (i = 0; i < times; i++)
- dh.Agree(key, priv, pub2);
-
- total = current_time() - start;
- each = total / times; // per second
- milliEach = each * 1000; // in milliseconds
-
- printf("DH 1024 key agreement %6.2f milliseconds, avg over %d"
- " iterations\n", milliEach, times);
-}
-
-void bench_dsa()
-{
- const int times = 100;
-
- Source source;
- FileSource("./dsa1024.der", source);
-
- if (source.size() == 0) {
- printf("can't find ./dsa1024.der\n");
- return;
- }
-
- DSA_PrivateKey key(source);
- DSA_Signer signer(key);
-
- SHA sha;
- byte digest[SHA::DIGEST_SIZE];
- byte signature[40];
- const char msg[] = "this is the message";
- sha.Update((byte*)msg, sizeof(msg));
- sha.Final(digest);
-
- int i;
- double start = current_time();
-
- for (i = 0; i < times; i++)
- signer.Sign(digest, signature, rng);
-
- double total = current_time() - start;
- double each = total / times; // per second
- double milliEach = each * 1000; // milliseconds
-
- printf("DSA 1024 sign took %6.2f milliseconds, avg over %d"
- " iterations\n", milliEach, times);
-
- DSA_Verifier verifier(key);
-
- start = current_time();
-
- for (i = 0; i < times; i++)
- verifier.Verify(digest, signature);
-
- total = current_time() - start;
- each = total / times; // per second
- milliEach = each * 1000; // in milliseconds
-
- printf("DSA 1024 verify took %6.2f milliseconds, avg over %d"
- " iterations\n", milliEach, times);
-}
-
-
-
-#ifdef _WIN32
-
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
-
- double current_time()
- {
- static bool init(false);
- static LARGE_INTEGER freq;
-
- if (!init) {
- QueryPerformanceFrequency(&freq);
- init = true;
- }
-
- LARGE_INTEGER count;
- QueryPerformanceCounter(&count);
-
- return static_cast<double>(count.QuadPart) / freq.QuadPart;
- }
-
-#else
-
- #include <sys/time.h>
-
- double current_time()
- {
- struct timeval tv;
- gettimeofday(&tv, 0);
-
- return static_cast<double>(tv.tv_sec)
- + static_cast<double>(tv.tv_usec) / 1000000;
- }
-
-#endif // _WIN32
diff --git a/extra/yassl/taocrypt/benchmark/benchmark.dsp b/extra/yassl/taocrypt/benchmark/benchmark.dsp
deleted file mode 100644
index 449299a1c8d..00000000000
--- a/extra/yassl/taocrypt/benchmark/benchmark.dsp
+++ /dev/null
@@ -1,101 +0,0 @@
-# Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=benchmark - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "benchmark.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "benchmark - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "benchmark___Win32_Release"
-# PROP BASE Intermediate_Dir "benchmark___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\include" /I "..\mySTL" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "benchmark - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "benchmark___Win32_Debug"
-# PROP BASE Intermediate_Dir "benchmark___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\mySTL" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "benchmark - Win32 Release"
-# Name "benchmark - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\benchmark.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/taocrypt/benchmark/dh1024.der b/extra/yassl/taocrypt/benchmark/dh1024.der
deleted file mode 100644
index 09f81ee14c1..00000000000
--- a/extra/yassl/taocrypt/benchmark/dh1024.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/taocrypt/benchmark/dsa1024.der b/extra/yassl/taocrypt/benchmark/dsa1024.der
deleted file mode 100644
index 3a6dfca4b8f..00000000000
--- a/extra/yassl/taocrypt/benchmark/dsa1024.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/taocrypt/benchmark/make.bat b/extra/yassl/taocrypt/benchmark/make.bat
deleted file mode 100755
index 8f445986c7e..00000000000
--- a/extra/yassl/taocrypt/benchmark/make.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-REM
-REM This program is free software; you can redistribute it and/or modify
-REM it under the terms of the GNU General Public License as published by
-REM the Free Software Foundation; version 2 of the License.
-REM
-REM This program is distributed in the hope that it will be useful,
-REM but WITHOUT ANY WARRANTY; without even the implied warranty of
-REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-REM GNU General Public License for more details.
-REM
-REM You should have received a copy of the GNU General Public License
-REM along with this program; if not, write to the Free Software
-REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-REM quick and dirty build file for testing different MSDEVs
-setlocal
-
-set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2
-
-cl %myFLAGS% benchmark.cpp
-
-link.exe /out:benchmark.exe ../src/taocrypt.lib benchmark.obj advapi32.lib
-
diff --git a/extra/yassl/taocrypt/benchmark/rsa1024.der b/extra/yassl/taocrypt/benchmark/rsa1024.der
deleted file mode 100644
index 5ba3fbe6c9c..00000000000
--- a/extra/yassl/taocrypt/benchmark/rsa1024.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/taocrypt/certs/client-cert.der b/extra/yassl/taocrypt/certs/client-cert.der
deleted file mode 100644
index 9c2ef138bf6..00000000000
--- a/extra/yassl/taocrypt/certs/client-cert.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/taocrypt/certs/client-key.der b/extra/yassl/taocrypt/certs/client-key.der
deleted file mode 100644
index 649406c4417..00000000000
--- a/extra/yassl/taocrypt/certs/client-key.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/taocrypt/certs/dh1024.dat b/extra/yassl/taocrypt/certs/dh1024.dat
deleted file mode 100644
index 86a95518278..00000000000
--- a/extra/yassl/taocrypt/certs/dh1024.dat
+++ /dev/null
@@ -1 +0,0 @@
-30818702818100DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F020102 \ No newline at end of file
diff --git a/extra/yassl/taocrypt/certs/dsa512.der b/extra/yassl/taocrypt/certs/dsa512.der
deleted file mode 100644
index 027bedeffb1..00000000000
--- a/extra/yassl/taocrypt/certs/dsa512.der
+++ /dev/null
Binary files differ
diff --git a/extra/yassl/taocrypt/include/aes.hpp b/extra/yassl/taocrypt/include/aes.hpp
deleted file mode 100644
index 191f294b2b5..00000000000
--- a/extra/yassl/taocrypt/include/aes.hpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* aes.hpp defines AES
-*/
-
-
-#ifndef TAO_CRYPT_AES_HPP
-#define TAO_CRYPT_AES_HPP
-
-#include "misc.hpp"
-#include "modes.hpp"
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_AES_ASM
-#endif
-
-
-
-namespace TaoCrypt {
-
-
-enum { AES_BLOCK_SIZE = 16 };
-
-
-// AES encryption and decryption, see FIPS-197
-class AES : public Mode_BASE {
-public:
- enum { BLOCK_SIZE = AES_BLOCK_SIZE };
-
- AES(CipherDir DIR, Mode MODE)
- : Mode_BASE(BLOCK_SIZE, DIR, MODE) {}
-
-#ifdef DO_AES_ASM
- void Process(byte*, const byte*, word32);
-#endif
- void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION);
- void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); }
-private:
- static const word32 rcon_[];
-
- word32 rounds_;
- word32 key_[60]; // max size
-
- static const word32 Te[5][256];
- static const word32 Td[5][256];
- static const byte CTd4[256];
-
- static const word32* Te0;
- static const word32* Te1;
- static const word32* Te2;
- static const word32* Te3;
- static const word32* Te4;
-
- static const word32* Td0;
- static const word32* Td1;
- static const word32* Td2;
- static const word32* Td3;
- static const word32* Td4;
-
- void encrypt(const byte*, const byte*, byte*) const;
- void AsmEncrypt(const byte*, byte*, void*) const;
- void decrypt(const byte*, const byte*, byte*) const;
- void AsmDecrypt(const byte*, byte*, void*) const;
-
- void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
-
- word32 PreFetchTe() const;
- word32 PreFetchTd() const;
- word32 PreFetchCTd4() const;
-
- AES(const AES&); // hide copy
- AES& operator=(const AES&); // and assign
-};
-
-
-#if defined(__x86_64__) || defined(_M_X64) || \
- (defined(__ILP32__) && (__ILP32__ >= 1))
- #define TC_CACHE_LINE_SZ 64
-#else
- /* default cache line size */
- #define TC_CACHE_LINE_SZ 32
-#endif
-
-inline word32 AES::PreFetchTe() const
-{
- word32 x = 0;
-
- /* 4 tables of 256 entries */
- for (int i = 0; i < 4; i++) {
- /* each entry is 4 bytes */
- for (int j = 0; j < 256; j += TC_CACHE_LINE_SZ/4) {
- x &= Te[i][j];
- }
- }
-
- return x;
-}
-
-
-inline word32 AES::PreFetchTd() const
-{
- word32 x = 0;
-
- /* 4 tables of 256 entries */
- for (int i = 0; i < 4; i++) {
- /* each entry is 4 bytes */
- for (int j = 0; j < 256; j += TC_CACHE_LINE_SZ/4) {
- x &= Td[i][j];
- }
- }
-
- return x;
-}
-
-
-inline word32 AES::PreFetchCTd4() const
-{
- word32 x = 0;
- int i;
-
- for (i = 0; i < 256; i += TC_CACHE_LINE_SZ) {
- x &= CTd4[i];
- }
-
- return x;
-}
-
-
-typedef BlockCipher<ENCRYPTION, AES, ECB> AES_ECB_Encryption;
-typedef BlockCipher<DECRYPTION, AES, ECB> AES_ECB_Decryption;
-
-typedef BlockCipher<ENCRYPTION, AES, CBC> AES_CBC_Encryption;
-typedef BlockCipher<DECRYPTION, AES, CBC> AES_CBC_Decryption;
-
-
-} // naemspace
-
-#endif // TAO_CRYPT_AES_HPP
diff --git a/extra/yassl/taocrypt/include/algebra.hpp b/extra/yassl/taocrypt/include/algebra.hpp
deleted file mode 100644
index b216e5cccca..00000000000
--- a/extra/yassl/taocrypt/include/algebra.hpp
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's algebra.h from CryptoPP */
-
-#ifndef TAO_CRYPT_ALGEBRA_HPP
-#define TAO_CRYPT_ALGEBRA_HPP
-
-#include "integer.hpp"
-
-namespace TaoCrypt {
-
-
-// "const Element&" returned by member functions are references
-// to internal data members. Since each object may have only
-// one such data member for holding results, the following code
-// will produce incorrect results:
-// abcd = group.Add(group.Add(a,b), group.Add(c,d));
-// But this should be fine:
-// abcd = group.Add(a, group.Add(b, group.Add(c,d));
-
-// Abstract Group
-class TAOCRYPT_NO_VTABLE AbstractGroup : public virtual_base
-{
-public:
- typedef Integer Element;
-
- virtual ~AbstractGroup() {}
-
- virtual bool Equal(const Element &a, const Element &b) const =0;
- virtual const Element& Identity() const =0;
- virtual const Element& Add(const Element &a, const Element &b) const =0;
- virtual const Element& Inverse(const Element &a) const =0;
- virtual bool InversionIsFast() const {return false;}
-
- virtual const Element& Double(const Element &a) const;
- virtual const Element& Subtract(const Element &a, const Element &b) const;
- virtual Element& Accumulate(Element &a, const Element &b) const;
- virtual Element& Reduce(Element &a, const Element &b) const;
-
- virtual Element ScalarMultiply(const Element &a, const Integer &e) const;
- virtual Element CascadeScalarMultiply(const Element &x, const Integer &e1,
- const Element &y, const Integer &e2) const;
-
- virtual void SimultaneousMultiply(Element *results, const Element &base,
- const Integer *exponents, unsigned int exponentsCount) const;
-};
-
-// Abstract Ring
-class TAOCRYPT_NO_VTABLE AbstractRing : public AbstractGroup
-{
-public:
- typedef Integer Element;
-
- AbstractRing() : AbstractGroup() {m_mg.m_pRing = this;}
- AbstractRing(const AbstractRing &source) : AbstractGroup()
- {m_mg.m_pRing = this;}
- AbstractRing& operator=(const AbstractRing &source) {return *this;}
-
- virtual bool IsUnit(const Element &a) const =0;
- virtual const Element& MultiplicativeIdentity() const =0;
- virtual const Element& Multiply(const Element&, const Element&) const =0;
- virtual const Element& MultiplicativeInverse(const Element &a) const =0;
-
- virtual const Element& Square(const Element &a) const;
- virtual const Element& Divide(const Element &a, const Element &b) const;
-
- virtual Element Exponentiate(const Element &a, const Integer &e) const;
- virtual Element CascadeExponentiate(const Element &x, const Integer &e1,
- const Element &y, const Integer &e2) const;
-
- virtual void SimultaneousExponentiate(Element *results, const Element&,
- const Integer *exponents, unsigned int exponentsCount) const;
-
- virtual const AbstractGroup& MultiplicativeGroup() const
- {return m_mg;}
-
-private:
- class MultiplicativeGroupT : public AbstractGroup
- {
- public:
- const AbstractRing& GetRing() const
- {return *m_pRing;}
-
- bool Equal(const Element &a, const Element &b) const
- {return GetRing().Equal(a, b);}
-
- const Element& Identity() const
- {return GetRing().MultiplicativeIdentity();}
-
- const Element& Add(const Element &a, const Element &b) const
- {return GetRing().Multiply(a, b);}
-
- Element& Accumulate(Element &a, const Element &b) const
- {return a = GetRing().Multiply(a, b);}
-
- const Element& Inverse(const Element &a) const
- {return GetRing().MultiplicativeInverse(a);}
-
- const Element& Subtract(const Element &a, const Element &b) const
- {return GetRing().Divide(a, b);}
-
- Element& Reduce(Element &a, const Element &b) const
- {return a = GetRing().Divide(a, b);}
-
- const Element& Double(const Element &a) const
- {return GetRing().Square(a);}
-
- Element ScalarMultiply(const Element &a, const Integer &e) const
- {return GetRing().Exponentiate(a, e);}
-
- Element CascadeScalarMultiply(const Element &x, const Integer &e1,
- const Element &y, const Integer &e2) const
- {return GetRing().CascadeExponentiate(x, e1, y, e2);}
-
- void SimultaneousMultiply(Element *results, const Element &base,
- const Integer *exponents, unsigned int exponentsCount) const
- {GetRing().SimultaneousExponentiate(results, base, exponents,
- exponentsCount);}
-
- const AbstractRing* m_pRing;
- };
-
- MultiplicativeGroupT m_mg;
-};
-
-
-// Abstract Euclidean Domain
-class TAOCRYPT_NO_VTABLE AbstractEuclideanDomain
- : public AbstractRing
-{
-public:
- typedef Integer Element;
-
- virtual void DivisionAlgorithm(Element &r, Element &q, const Element &a,
- const Element &d) const =0;
-
- virtual const Element& Mod(const Element &a, const Element &b) const =0;
- virtual const Element& Gcd(const Element &a, const Element &b) const;
-
-protected:
- mutable Element result;
-};
-
-
-// EuclideanDomainOf
-class EuclideanDomainOf : public AbstractEuclideanDomain
-{
-public:
- typedef Integer Element;
-
- EuclideanDomainOf() {}
-
- bool Equal(const Element &a, const Element &b) const
- {return a==b;}
-
- const Element& Identity() const
- {return Element::Zero();}
-
- const Element& Add(const Element &a, const Element &b) const
- {return result = a+b;}
-
- Element& Accumulate(Element &a, const Element &b) const
- {return a+=b;}
-
- const Element& Inverse(const Element &a) const
- {return result = -a;}
-
- const Element& Subtract(const Element &a, const Element &b) const
- {return result = a-b;}
-
- Element& Reduce(Element &a, const Element &b) const
- {return a-=b;}
-
- const Element& Double(const Element &a) const
- {return result = a.Doubled();}
-
- const Element& MultiplicativeIdentity() const
- {return Element::One();}
-
- const Element& Multiply(const Element &a, const Element &b) const
- {return result = a*b;}
-
- const Element& Square(const Element &a) const
- {return result = a.Squared();}
-
- bool IsUnit(const Element &a) const
- {return a.IsUnit();}
-
- const Element& MultiplicativeInverse(const Element &a) const
- {return result = a.MultiplicativeInverse();}
-
- const Element& Divide(const Element &a, const Element &b) const
- {return result = a/b;}
-
- const Element& Mod(const Element &a, const Element &b) const
- {return result = a%b;}
-
- void DivisionAlgorithm(Element &r, Element &q, const Element &a,
- const Element &d) const
- {Element::Divide(r, q, a, d);}
-
-private:
- mutable Element result;
-};
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_ALGEBRA_HPP
diff --git a/extra/yassl/taocrypt/include/arc4.hpp b/extra/yassl/taocrypt/include/arc4.hpp
deleted file mode 100644
index ed6a35e054a..00000000000
--- a/extra/yassl/taocrypt/include/arc4.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* arc4.hpp defines ARC4
-*/
-
-
-#ifndef TAO_CRYPT_ARC4_HPP
-#define TAO_CRYPT_ARC4_HPP
-
-#include "misc.hpp"
-
-namespace TaoCrypt {
-
-
-// ARC4 encryption and decryption
-class ARC4 {
-public:
- enum { STATE_SIZE = 256 };
-
- typedef ARC4 Encryption;
- typedef ARC4 Decryption;
-
- ARC4() {}
-
- void Process(byte*, const byte*, word32);
- void SetKey(const byte*, word32);
-private:
- byte x_;
- byte y_;
- byte state_[STATE_SIZE];
-
- ARC4(const ARC4&); // hide copy
- const ARC4 operator=(const ARC4&); // and assign
-
- void AsmProcess(byte*, const byte*, word32);
-};
-
-} // namespace
-
-
-#endif // TAO_CRYPT_ARC4_HPP
-
diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp
deleted file mode 100644
index e8a8820ed1a..00000000000
--- a/extra/yassl/taocrypt/include/asn.hpp
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* asn.hpp provides ASN1 BER, PublicKey, and x509v3 decoding
-*/
-
-
-#ifndef TAO_CRYPT_ASN_HPP
-#define TAO_CRYPT_ASN_HPP
-
-
-#include "misc.hpp"
-#include "block.hpp"
-#include "error.hpp"
-#ifdef USE_SYS_STL
- #include <list>
-#else
- #include "list.hpp"
-#endif
-#include <time.h>
-
-namespace STL = STL_NAMESPACE;
-
-
-namespace TaoCrypt {
-
-// these tags and flags are not complete
-enum ASNTag
-{
- BOOLEAN = 0x01,
- INTEGER = 0x02,
- BIT_STRING = 0x03,
- OCTET_STRING = 0x04,
- TAG_NULL = 0x05,
- OBJECT_IDENTIFIER = 0x06,
- OBJECT_DESCRIPTOR = 0x07,
- EXTERNAL = 0x08,
- REAL = 0x09,
- ENUMERATED = 0x0a,
- UTF8_STRING = 0x0c,
- SEQUENCE = 0x10,
- SET = 0x11,
- NUMERIC_STRING = 0x12,
- PRINTABLE_STRING = 0x13,
- T61_STRING = 0x14,
- VIDEOTEXT_STRING = 0x15,
- IA5_STRING = 0x16,
- UTC_TIME = 0x17,
- GENERALIZED_TIME = 0x18,
- GRAPHIC_STRING = 0x19,
- VISIBLE_STRING = 0x1a,
- GENERAL_STRING = 0x1b,
- LONG_LENGTH = 0x80
-};
-
-enum ASNIdFlag
-{
- UNIVERSAL = 0x00,
- DATA = 0x01,
- HEADER = 0x02,
- CONSTRUCTED = 0x20,
- APPLICATION = 0x40,
- CONTEXT_SPECIFIC = 0x80,
- PRIVATE = 0xc0
-};
-
-
-enum DNTags
-{
- COMMON_NAME = 0x03, // CN
- SUR_NAME = 0x04, // SN
- COUNTRY_NAME = 0x06, // C
- LOCALITY_NAME = 0x07, // L
- STATE_NAME = 0x08, // ST
- ORG_NAME = 0x0a, // O
- ORGUNIT_NAME = 0x0b // OU
-};
-
-
-enum PCKS12_Tags
-{
- /* DATA = 1, */ // from ASN1
- SIGNED_DATA = 2,
- ENVELOPED_DATA = 3,
- SIGNED_AND_ENVELOPED_DATA = 4,
- DIGESTED_DATA = 5,
- ENCRYPTED_DATA = 6
-};
-
-
-enum Constants
-{
- MIN_DATE_SZ = 13,
- MAX_DATE_SZ = 16,
- MAX_ALGO_SZ = 16,
- MAX_LENGTH_SZ = 5,
- MAX_SEQ_SZ = 5, // enum(seq|con) + length(4)
- MAX_ALGO_SIZE = 9,
- MAX_DIGEST_SZ = 69, // SHA512 + enum(Bit or Octet) + length(4)
- DSA_SIG_SZ = 40,
- ASN_NAME_MAX = 512 // max total of all included names
-};
-
-
-class Source;
-class RSA_PublicKey;
-class RSA_PrivateKey;
-class DSA_PublicKey;
-class DSA_PrivateKey;
-class Integer;
-class DH;
-
-
-// General BER decoding
-class BER_Decoder : public virtual_base {
-protected:
- Source& source_;
-public:
- explicit BER_Decoder(Source& s) : source_(s) {}
- virtual ~BER_Decoder() {}
-
- Integer& GetInteger(Integer&);
- word32 GetSequence();
- word32 GetSet();
- word32 GetVersion();
- word32 GetExplicitVersion();
-
- Error GetError();
-private:
- virtual void ReadHeader() = 0;
-
- BER_Decoder(const BER_Decoder&); // hide copy
- BER_Decoder& operator=(const BER_Decoder&); // and assign
-};
-
-
-// RSA Private Key BER Decoder
-class RSA_Private_Decoder : public BER_Decoder {
-public:
- explicit RSA_Private_Decoder(Source& s) : BER_Decoder(s) {}
- void Decode(RSA_PrivateKey&);
-private:
- void ReadHeader();
-};
-
-
-// RSA Public Key BER Decoder
-class RSA_Public_Decoder : public BER_Decoder {
-public:
- explicit RSA_Public_Decoder(Source& s) : BER_Decoder(s) {}
- void Decode(RSA_PublicKey&);
-private:
- void ReadHeader();
- void ReadHeaderOpenSSL();
-};
-
-
-// DSA Private Key BER Decoder
-class DSA_Private_Decoder : public BER_Decoder {
-public:
- explicit DSA_Private_Decoder(Source& s) : BER_Decoder(s) {}
- void Decode(DSA_PrivateKey&);
-private:
- void ReadHeader();
-};
-
-
-// DSA Public Key BER Decoder
-class DSA_Public_Decoder : public BER_Decoder {
-public:
- explicit DSA_Public_Decoder(Source& s) : BER_Decoder(s) {}
- void Decode(DSA_PublicKey&);
-private:
- void ReadHeader();
-};
-
-
-// DH Key BER Decoder
-class DH_Decoder : public BER_Decoder {
-public:
- explicit DH_Decoder(Source& s) : BER_Decoder(s) {}
- void Decode(DH&);
-private:
- void ReadHeader();
-};
-
-
-// PKCS12 BER Decoder
-class PKCS12_Decoder : public BER_Decoder {
-public:
- explicit PKCS12_Decoder(Source& s) : BER_Decoder(s) {}
- void Decode();
-private:
- void ReadHeader();
-};
-
-
-// General PublicKey
-class PublicKey {
- byte* key_;
- word32 sz_;
-public:
- explicit PublicKey(const byte* k = 0, word32 s = 0);
- ~PublicKey() { tcArrayDelete(key_); }
-
- const byte* GetKey() const { return key_; }
- word32 size() const { return sz_; }
-
- void SetKey(const byte*);
- void SetSize(word32 s);
-
- void AddToEnd(const byte*, word32);
-private:
- PublicKey(const PublicKey&); // hide copy
- PublicKey& operator=(const PublicKey&); // and assign
-};
-
-
-enum { SHA_SIZE = 20 };
-
-
-// A Signing Authority
-class Signer {
- PublicKey key_;
- char name_[ASN_NAME_MAX];
- byte hash_[SHA_SIZE];
-public:
- Signer(const byte* k, word32 kSz, const char* n, const byte* h);
- ~Signer();
-
- const PublicKey& GetPublicKey() const { return key_; }
- const char* GetName() const { return name_; }
- const byte* GetHash() const { return hash_; }
-
-private:
- Signer(const Signer&); // hide copy
- Signer& operator=(const Signer&); // and assign
-};
-
-
-typedef STL::list<Signer*> SignerList;
-
-
-enum ContentType { HUH = 651 };
-enum SigType { SHAwDSA = 517, MD2wRSA = 646, MD5wRSA = 648, SHAwRSA = 649,
- SHA256wRSA = 655, SHA384wRSA = 656, SHA512wRSA = 657,
- SHA256wDSA = 416 };
-enum HashType { MD2h = 646, MD5h = 649, SHAh = 88, SHA256h = 414, SHA384h = 415,
- SHA512h = 416 };
-enum KeyType { DSAk = 515, RSAk = 645 }; // sums of algo OID
-
-
-// an x509v Certificate BER Decoder
-class CertDecoder : public BER_Decoder {
-public:
- enum DateType { BEFORE, AFTER };
- enum NameType { ISSUER, SUBJECT };
- enum CertType { CA, USER };
-
- explicit CertDecoder(Source&, bool decode = true, SignerList* sl = 0,
- bool noVerify = false, CertType ct = USER);
- ~CertDecoder();
-
- const PublicKey& GetPublicKey() const { return key_; }
- KeyType GetKeyType() const { return KeyType(keyOID_); }
- const char* GetIssuer() const { return issuer_; }
- const char* GetCommonName() const { return subject_; }
- const byte* GetHash() const { return subjectHash_; }
- const char* GetBeforeDate() const { return beforeDate_; }
- byte GetBeforeDateType() const { return beforeDateType_; }
- const char* GetAfterDate() const { return afterDate_; }
- byte GetAfterDateType() const { return afterDateType_; }
- int GetSubjectCnStart() const { return subCnPos_; }
- int GetIssuerCnStart() const { return issCnPos_; }
- int GetSubjectCnLength() const { return subCnLen_; }
- int GetIssuerCnLength() const { return issCnLen_; }
-
- void DecodeToKey();
-private:
- PublicKey key_;
- word32 certBegin_; // offset to start of cert
- word32 sigIndex_; // offset to start of signature
- word32 sigLength_; // length of signature
- word32 signatureOID_; // sum of algorithm object id
- word32 keyOID_; // sum of key algo object id
- int subCnPos_; // subject common name start, -1 is none
- int subCnLen_; // length of above
- int issCnPos_; // issuer common name start, -1 is none
- int issCnLen_; // length of above
- byte subjectHash_[SHA_SIZE]; // hash of all Names
- byte issuerHash_[SHA_SIZE]; // hash of all Names
- byte* signature_;
- char issuer_[ASN_NAME_MAX]; // Names
- char subject_[ASN_NAME_MAX]; // Names
- char beforeDate_[MAX_DATE_SZ+1]; // valid before date, +null term
- byte beforeDateType_; // beforeDate time type
- char afterDate_[MAX_DATE_SZ+1]; // valid after date, +null term
- byte afterDateType_; // afterDate time type
- bool verify_; // Default to yes, but could be off
-
- void ReadHeader();
- void Decode(SignerList*, CertType);
- void StoreKey();
- void AddDSA();
- bool ValidateSelfSignature();
- bool ValidateSignature(SignerList*);
- bool ConfirmSignature(Source&);
- void GetKey();
- char* AddTag(char*, const char*, const char*, word32, word32);
- void GetName(NameType);
- void GetValidity();
- void GetDate(DateType);
- void GetCompareHash(const byte*, word32, byte*, word32);
- word32 GetAlgoId();
- word32 GetSignature();
- word32 GetDigest();
-};
-
-
-word32 GetLength(Source&);
-
-word32 SetLength(word32, byte*);
-word32 SetSequence(word32, byte*);
-
-word32 EncodeDSA_Signature(const byte* signature, byte* output);
-word32 EncodeDSA_Signature(const Integer& r, const Integer& s, byte* output);
-word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz);
-
-
-// General DER encoding
-class DER_Encoder : public virtual_base {
-public:
- DER_Encoder() {}
- virtual ~DER_Encoder() {}
-
- word32 SetAlgoID(HashType, byte*);
-
- Error GetError() const { return error_; }
-private:
- //virtual void WriteHeader() = 0;
- Error error_;
-
- DER_Encoder(const DER_Encoder&); // hide copy
- DER_Encoder& operator=(const DER_Encoder&); // and assign
-};
-
-
-
-class Signature_Encoder : public DER_Encoder {
- const byte* digest_;
- word32 digestSz_;
- SigType digestOID_;
-public:
- explicit Signature_Encoder(const byte*, word32, HashType, Source&);
-
-private:
- void WriteHeader();
- word32 SetDigest(const byte*, word32, byte*);
-
- Signature_Encoder(const Signature_Encoder&); // hide copy
- Signature_Encoder& operator=(const Signature_Encoder&); // and assign
-};
-
-
-// Get Cert in PEM format from BEGIN to END
-int GetCert(Source&);
-
-// Get Cert in PEM format from pkcs12 file
-int GetPKCS_Cert(const char* password, Source&);
-
-void ASN1_TIME_extract(const unsigned char* date, unsigned char format,
- tm *parsed_time);
-
-} // namespace
-
-
-#endif // TAO_CRYPT_ASN_HPP
diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp
deleted file mode 100644
index b5958a06955..00000000000
--- a/extra/yassl/taocrypt/include/block.hpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* block.hpp provides word and byte blocks with configurable allocators
-*/
-
-
-#ifndef TAO_CRYPT_BLOCK_HPP
-#define TAO_CRYPT_BLOCK_HPP
-
-#include "misc.hpp"
-#include <string.h> // memcpy
-#include <stddef.h> // ptrdiff_t
-
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-namespace TaoCrypt {
-
-
-// a Base class for Allocators
-template<class T>
-class AllocatorBase
-{
-public:
- typedef T value_type;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef T* pointer;
- typedef const T* const_pointer;
- typedef T& reference;
- typedef const T& const_reference;
-
- pointer address(reference r) const {return (&r);}
- const_pointer address(const_reference r) const {return (&r); }
- void construct(pointer p, const T& val) {new (p) T(val);}
- void destroy(pointer p) {p->~T();}
- size_type max_size() const {return ~size_type(0)/sizeof(T);}
-protected:
-};
-
-
-// General purpose realloc
-template<typename T, class A>
-typename A::pointer StdReallocate(A& a, T* p, typename A::size_type oldSize,
- typename A::size_type newSize, bool preserve)
-{
- if (oldSize == newSize)
- return p;
-
- if (preserve) {
- A b = A();
- typename A::pointer newPointer = b.allocate(newSize, 0);
- memcpy(newPointer, p, sizeof(T) * min(oldSize, newSize));
- a.deallocate(p, oldSize);
- STL::swap(a, b);
- return newPointer;
- }
- else {
- a.deallocate(p, oldSize);
- return a.allocate(newSize, 0);
- }
-}
-
-
-// Allocator that zeros out memory on deletion
-template <class T>
-class AllocatorWithCleanup : public AllocatorBase<T>
-{
-public:
- typedef typename AllocatorBase<T>::pointer pointer;
- typedef typename AllocatorBase<T>::size_type size_type;
-
- pointer allocate(size_type n, const void* = 0)
- {
- if (n > this->max_size())
- return 0;
- if (n == 0)
- return 0;
- return NEW_TC T[n];
- }
-
- void deallocate(void* p, size_type n)
- {
- memset(p, 0, n * sizeof(T));
- tcArrayDelete((T*)p);
- }
-
- pointer reallocate(T* p, size_type oldSize, size_type newSize,
- bool preserve)
- {
- return StdReallocate(*this, p, oldSize, newSize, preserve);
- }
-
- // VS.NET STL enforces the policy of "All STL-compliant allocators have to
- // provide a template class member called rebind".
- template <class U> struct rebind { typedef AllocatorWithCleanup<U> other;};
-};
-
-
-// Block class template
-template<typename T, class A = AllocatorWithCleanup<T> >
-class Block {
-public:
- explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
- { CleanNew(sz_); }
-
- Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
- { memcpy(buffer_, buff, sz_ * sizeof(T)); }
-
- Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
- { memcpy(buffer_, that.buffer_, sz_ * sizeof(T)); }
-
- Block& operator=(const Block& that) {
- Block tmp(that);
- Swap(tmp);
- return *this;
- }
-
- T& operator[] (word32 i) { return buffer_[i]; }
- const T& operator[] (word32 i) const { return buffer_[i]; }
-
- T* operator+ (word32 i) { return buffer_ + i; }
- const T* operator+ (word32 i) const { return buffer_ + i; }
-
- word32 size() const { return sz_; }
-
- T* get_buffer() const { return buffer_; }
- T* begin() const { return get_buffer(); }
-
- void CleanGrow(word32 newSize)
- {
- if (newSize > sz_) {
- buffer_ = allocator_.reallocate(buffer_, sz_, newSize, true);
- memset(buffer_ + sz_, 0, (newSize - sz_) * sizeof(T));
- sz_ = newSize;
- }
- }
-
- void CleanNew(word32 newSize)
- {
- New(newSize);
- if (sz_ > 0)
- memset(buffer_, 0, sz_ * sizeof(T));
- }
-
- void New(word32 newSize)
- {
- buffer_ = allocator_.reallocate(buffer_, sz_, newSize, false);
- sz_ = newSize;
- }
-
- void resize(word32 newSize)
- {
- buffer_ = allocator_.reallocate(buffer_, sz_, newSize, true);
- sz_ = newSize;
- }
-
- void Swap(Block& other) {
- STL::swap(sz_, other.sz_);
- STL::swap(buffer_, other.buffer_);
- STL::swap(allocator_, other.allocator_);
- }
-
- ~Block() { allocator_.deallocate(buffer_, sz_); }
-private:
- A allocator_;
- word32 sz_; // size in Ts
- T* buffer_;
-};
-
-
-typedef Block<byte> ByteBlock;
-typedef Block<word> WordBlock;
-typedef Block<word32> Word32Block;
-
-
-} // namespace
-
-#endif // TAO_CRYPT_BLOCK_HPP
diff --git a/extra/yassl/taocrypt/include/blowfish.hpp b/extra/yassl/taocrypt/include/blowfish.hpp
deleted file mode 100644
index 74ea7f99480..00000000000
--- a/extra/yassl/taocrypt/include/blowfish.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* blowfish.hpp defines Blowfish
-*/
-
-
-#ifndef TAO_CRYPT_BLOWFISH_HPP
-#define TAO_CRYPT_BLOWFISH_HPP
-
-#include "misc.hpp"
-#include "modes.hpp"
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_BLOWFISH_ASM
-#endif
-
-
-namespace TaoCrypt {
-
-enum { BLOWFISH_BLOCK_SIZE = 8 };
-
-
-// Blowfish encryption and decryption, see
-class Blowfish : public Mode_BASE {
-public:
- enum { BLOCK_SIZE = BLOWFISH_BLOCK_SIZE, ROUNDS = 16 };
-
- Blowfish(CipherDir DIR, Mode MODE)
- : Mode_BASE(BLOCK_SIZE, DIR, MODE), sbox_(pbox_ + ROUNDS + 2) {}
-
-#ifdef DO_BLOWFISH_ASM
- void Process(byte*, const byte*, word32);
-#endif
- void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION);
- void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); }
-private:
- static const word32 p_init_[ROUNDS + 2];
- static const word32 s_init_[4 * 256];
-
- word32 pbox_[ROUNDS + 2 + 4 * 256];
- word32* sbox_;
-
- void crypt_block(const word32 in[2], word32 out[2]) const;
- void AsmProcess(const byte* in, byte* out) const;
- void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
-
- Blowfish(const Blowfish&); // hide copy
- Blowfish& operator=(const Blowfish&); // and assign
-};
-
-
-typedef BlockCipher<ENCRYPTION, Blowfish, ECB> Blowfish_ECB_Encryption;
-typedef BlockCipher<DECRYPTION, Blowfish, ECB> Blowfish_ECB_Decryption;
-
-typedef BlockCipher<ENCRYPTION, Blowfish, CBC> Blowfish_CBC_Encryption;
-typedef BlockCipher<DECRYPTION, Blowfish, CBC> Blowfish_CBC_Decryption;
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_BLOWFISH_HPP
-
diff --git a/extra/yassl/taocrypt/include/coding.hpp b/extra/yassl/taocrypt/include/coding.hpp
deleted file mode 100644
index 758ac452673..00000000000
--- a/extra/yassl/taocrypt/include/coding.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* coding.hpp defines hex and base64 encoding/decoing
-*/
-
-#ifndef TAO_CRYPT_CODING_HPP
-#define TAO_CRYPT_CODING_HPP
-
-#include "misc.hpp"
-#include "block.hpp"
-
-namespace TaoCrypt {
-
-class Source;
-
-
-// Hex Encoding, see RFC 3548
-class HexEncoder {
- ByteBlock encoded_;
- Source& plain_;
-public:
- explicit HexEncoder(Source& s) : plain_(s) { Encode(); }
-private:
- void Encode();
-
- HexEncoder(const HexEncoder&); // hide copy
- HexEncoder& operator=(const HexEncoder&); // and assign
-};
-
-
-// Hex Decoding, see RFC 3548
-class HexDecoder {
- ByteBlock decoded_;
- Source& coded_;
-public:
- explicit HexDecoder(Source& s) : coded_(s) { Decode(); }
-private:
- void Decode();
-
- HexDecoder(const HexDecoder&); // hide copy
- HexDecoder& operator=(const HexDecoder&); // and assign
-};
-
-
-// Base 64 encoding, see RFC 3548
-class Base64Encoder {
- ByteBlock encoded_;
- Source& plain_;
-public:
- explicit Base64Encoder(Source& s) : plain_(s) { Encode(); }
-private:
- void Encode();
-
- Base64Encoder(const Base64Encoder&); // hide copy
- Base64Encoder& operator=(const Base64Encoder&); // and assign
-};
-
-
-// Base 64 decoding, see RFC 3548
-class Base64Decoder {
- ByteBlock decoded_;
- Source& coded_;
-public:
- explicit Base64Decoder(Source& s) : coded_(s) { Decode(); }
-private:
- void Decode();
-
- Base64Decoder(const Base64Decoder&); // hide copy
- Base64Decoder& operator=(const Base64Decoder&); // and assign
-};
-
-
-} // namespace
-
-#endif // TAO_CRYPT_CODING_HPP
diff --git a/extra/yassl/taocrypt/include/des.hpp b/extra/yassl/taocrypt/include/des.hpp
deleted file mode 100644
index 074cc80d3dd..00000000000
--- a/extra/yassl/taocrypt/include/des.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* des.hpp defines DES, DES_EDE2, and DES_EDE3
- see FIPS 46-2 and FIPS 81
-*/
-
-
-#ifndef TAO_CRYPT_DES_HPP
-#define TAO_CRYPT_DES_HPP
-
-#include "misc.hpp"
-#include "modes.hpp"
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_DES_ASM
-#endif
-
-
-namespace TaoCrypt {
-
-
-enum { DES_BLOCK_SIZE = 8, DES_KEY_SIZE = 32 };
-
-
-class BasicDES {
-public:
- void SetKey(const byte*, word32, CipherDir dir);
- void RawProcessBlock(word32&, word32&) const;
-protected:
- word32 k_[DES_KEY_SIZE];
-};
-
-
-// DES
-class DES : public Mode_BASE, public BasicDES {
-public:
- DES(CipherDir DIR, Mode MODE)
- : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {}
-
-private:
- void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
-
- DES(const DES&); // hide copy
- DES& operator=(const DES&); // and assign
-};
-
-
-// DES_EDE2
-class DES_EDE2 : public Mode_BASE {
-public:
- DES_EDE2(CipherDir DIR, Mode MODE)
- : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {}
-
- void SetKey(const byte*, word32, CipherDir dir);
-private:
- BasicDES des1_;
- BasicDES des2_;
-
- void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
-
- DES_EDE2(const DES_EDE2&); // hide copy
- DES_EDE2& operator=(const DES_EDE2&); // and assign
-};
-
-
-
-// DES_EDE3
-class DES_EDE3 : public Mode_BASE {
-public:
- DES_EDE3(CipherDir DIR, Mode MODE)
- : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {}
-
- void SetKey(const byte*, word32, CipherDir dir);
- void SetIV(const byte* iv) { memcpy(r_, iv, DES_BLOCK_SIZE); }
-#ifdef DO_DES_ASM
- void Process(byte*, const byte*, word32);
-#endif
-private:
- BasicDES des1_;
- BasicDES des2_;
- BasicDES des3_;
-
- void AsmProcess(const byte* in, byte* out, void* box) const;
- void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
-
- DES_EDE3(const DES_EDE3&); // hide copy
- DES_EDE3& operator=(const DES_EDE3&); // and assign
-};
-
-
-typedef BlockCipher<ENCRYPTION, DES, ECB> DES_ECB_Encryption;
-typedef BlockCipher<DECRYPTION, DES, ECB> DES_ECB_Decryption;
-
-typedef BlockCipher<ENCRYPTION, DES, CBC> DES_CBC_Encryption;
-typedef BlockCipher<DECRYPTION, DES, CBC> DES_CBC_Decryption;
-
-typedef BlockCipher<ENCRYPTION, DES_EDE2, ECB> DES_EDE2_ECB_Encryption;
-typedef BlockCipher<DECRYPTION, DES_EDE2, ECB> DES_EDE2_ECB_Decryption;
-
-typedef BlockCipher<ENCRYPTION, DES_EDE2, CBC> DES_EDE2_CBC_Encryption;
-typedef BlockCipher<DECRYPTION, DES_EDE2, CBC> DES_EDE2_CBC_Decryption;
-
-typedef BlockCipher<ENCRYPTION, DES_EDE3, ECB> DES_EDE3_ECB_Encryption;
-typedef BlockCipher<DECRYPTION, DES_EDE3, ECB> DES_EDE3_ECB_Decryption;
-
-typedef BlockCipher<ENCRYPTION, DES_EDE3, CBC> DES_EDE3_CBC_Encryption;
-typedef BlockCipher<DECRYPTION, DES_EDE3, CBC> DES_EDE3_CBC_Decryption;
-
-
-} // namespace
-
-
-#endif // TAO_CRYPT_DES_HPP
diff --git a/extra/yassl/taocrypt/include/dh.hpp b/extra/yassl/taocrypt/include/dh.hpp
deleted file mode 100644
index 84c41004107..00000000000
--- a/extra/yassl/taocrypt/include/dh.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* dh.hpp provides Diffie-Hellman support
-*/
-
-
-#ifndef TAO_CRYPT_DH_HPP
-#define TAO_CRYPT_DH_HPP
-
-#include "misc.hpp"
-#include "integer.hpp"
-
-namespace TaoCrypt {
-
-
-class Source;
-
-
-// Diffie-Hellman
-class DH {
-public:
- DH() {}
- DH(Integer& p, Integer& g) : p_(p), g_(g) {}
- explicit DH(Source&);
-
- DH(const DH& that) : p_(that.p_), g_(that.g_) {}
- DH& operator=(const DH& that)
- {
- DH tmp(that);
- Swap(tmp);
- return *this;
- }
-
- void Swap(DH& other)
- {
- p_.Swap(other.p_);
- g_.Swap(other.g_);
- }
-
- void Initialize(Source&);
- void Initialize(Integer& p, Integer& g)
- {
- SetP(p);
- SetG(g);
- }
-
- void GenerateKeyPair(RandomNumberGenerator&, byte*, byte*);
- void Agree(byte*, const byte*, const byte*, word32 otherSz = 0);
-
- void SetP(const Integer& p) { p_ = p; }
- void SetG(const Integer& g) { g_ = g; }
-
- Integer& GetP() { return p_; }
- Integer& GetG() { return g_; }
-
- // for p and agree
- word32 GetByteLength() const { return p_.ByteCount(); }
-private:
- // group parms
- Integer p_;
- Integer g_;
-
- void GeneratePrivate(RandomNumberGenerator&, byte*);
- void GeneratePublic(const byte*, byte*);
-};
-
-
-} // namespace
-
-#endif // TAO_CRYPT_DH_HPP
diff --git a/extra/yassl/taocrypt/include/dsa.hpp b/extra/yassl/taocrypt/include/dsa.hpp
deleted file mode 100644
index e35b56a1d91..00000000000
--- a/extra/yassl/taocrypt/include/dsa.hpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* dsa.hpp provides Digitial Signautre Algorithm see FIPS 186-2
-*/
-
-#ifndef TAO_CRYPT_DSA_HPP
-#define TAO_CRYPT_DSA_HPP
-
-#include "integer.hpp"
-
-
-namespace TaoCrypt {
-
-class Source;
-
-
-class DSA_PublicKey {
-protected:
- Integer p_;
- Integer q_;
- Integer g_;
- Integer y_;
-public:
- DSA_PublicKey() {}
- explicit DSA_PublicKey(Source&);
-
- void Initialize(Source&);
- void Initialize(const Integer& p, const Integer& q, const Integer& g,
- const Integer& y);
-
- const Integer& GetModulus() const;
- const Integer& GetSubGroupOrder() const;
- const Integer& GetSubGroupGenerator() const;
- const Integer& GetPublicPart() const;
-
- void SetModulus(const Integer&);
- void SetSubGroupOrder(const Integer&);
- void SetSubGroupGenerator(const Integer&);
- void SetPublicPart(const Integer&);
-
- word32 SignatureLength() const;
-
- DSA_PublicKey(const DSA_PublicKey&);
- DSA_PublicKey& operator=(const DSA_PublicKey&);
-
- void Swap(DSA_PublicKey& other);
-};
-
-
-
-class DSA_PrivateKey : public DSA_PublicKey {
- Integer x_;
-public:
- DSA_PrivateKey() {}
- explicit DSA_PrivateKey(Source&);
-
- void Initialize(Source&);
- void Initialize(const Integer& p, const Integer& q, const Integer& g,
- const Integer& y, const Integer& x);
-
- const Integer& GetPrivatePart() const;
-
- void SetPrivatePart(const Integer&);
-private:
- DSA_PrivateKey(const DSA_PrivateKey&); // hide copy
- DSA_PrivateKey& operator=(const DSA_PrivateKey&); // and assign
-};
-
-
-
-class DSA_Signer {
- const DSA_PrivateKey& key_;
- Integer r_;
- Integer s_;
-public:
- explicit DSA_Signer(const DSA_PrivateKey&);
-
- word32 Sign(const byte* sha_digest, byte* sig, RandomNumberGenerator&);
-
- const Integer& GetR() const;
- const Integer& GetS() const;
-private:
- DSA_Signer(const DSA_Signer&); // hide copy
- DSA_Signer& operator=(DSA_Signer&); // and assign
-};
-
-
-class DSA_Verifier {
- const DSA_PublicKey& key_;
- Integer r_;
- Integer s_;
-public:
- explicit DSA_Verifier(const DSA_PublicKey&);
-
- bool Verify(const byte* sha_digest, const byte* sig);
-
- const Integer& GetR() const;
- const Integer& GetS() const;
-private:
- DSA_Verifier(const DSA_Verifier&); // hide copy
- DSA_Verifier& operator=(const DSA_Verifier&); // and assign
-};
-
-
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_DSA_HPP
diff --git a/extra/yassl/taocrypt/include/error.hpp b/extra/yassl/taocrypt/include/error.hpp
deleted file mode 100644
index 080542a5195..00000000000
--- a/extra/yassl/taocrypt/include/error.hpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* error.hpp provides a taocrypt error numbers
- *
- */
-
-
-#ifndef TAO_CRYPT_ERROR_HPP
-#define TAO_CRYPT_ERROR_HPP
-
-
-namespace TaoCrypt {
-
-
-enum ErrorNumber {
-
-NO_ERROR_E = 0, // "not in error state"
-
-// RandomNumberGenerator
-WINCRYPT_E = 1001, // "bad wincrypt acquire"
-CRYPTGEN_E = 1002, // "CryptGenRandom error"
-OPEN_RAN_E = 1003, // "open /dev/urandom error"
-READ_RAN_E = 1004, // "read /dev/urandom error"
-
-// Integer
-INTEGER_E = 1010, // "bad DER Integer Header"
-
-
-// ASN.1
-SEQUENCE_E = 1020, // "bad Sequence Header"
-SET_E = 1021, // "bad Set Header"
-VERSION_E = 1022, // "version length not 1"
-SIG_OID_E = 1023, // "signature OID mismatch"
-BIT_STR_E = 1024, // "bad BitString Header"
-UNKNOWN_OID_E = 1025, // "unknown key OID type"
-OBJECT_ID_E = 1026, // "bad Ojbect ID Header"
-TAG_NULL_E = 1027, // "expected TAG NULL"
-EXPECT_0_E = 1028, // "expected 0"
-OCTET_STR_E = 1029, // "bad Octet String Header"
-TIME_E = 1030, // "bad TIME"
-
-DATE_SZ_E = 1031, // "bad Date Size"
-SIG_LEN_E = 1032, // "bad Signature Length"
-UNKNOWN_SIG_E = 1033, // "unknown signature OID"
-UNKNOWN_HASH_E = 1034, // "unknown hash OID"
-DSA_SZ_E = 1035, // "bad DSA r or s size"
-BEFORE_DATE_E = 1036, // "before date in the future"
-AFTER_DATE_E = 1037, // "after date in the past"
-SIG_CONFIRM_E = 1038, // "bad self signature confirmation"
-SIG_OTHER_E = 1039, // "bad other signature confirmation"
-
-CONTENT_E = 1040, // "bad content processing"
-PEM_E = 1041 // "bad pem format error"
-
- // add error string to yassl/src/yassl_error.cpp !!!
-};
-
-
-struct Error {
- ErrorNumber what_; // description number, 0 for no error
-
- explicit Error(ErrorNumber w = NO_ERROR_E) : what_(w) {}
-
- ErrorNumber What() const { return what_; }
- void SetError(ErrorNumber w) { what_ = w; }
-};
-
-
-
-} // namespace TaoCrypt
-
-#endif // TAO_CRYPT_ERROR_HPP
diff --git a/extra/yassl/taocrypt/include/file.hpp b/extra/yassl/taocrypt/include/file.hpp
deleted file mode 100644
index 1e2955d8737..00000000000
--- a/extra/yassl/taocrypt/include/file.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- Copyright (C) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* file.hpp provies File Sources and Sinks
-*/
-
-
-#ifndef TAO_CRYPT_FILE_HPP
-#define TAO_CRYPT_FILE_HPP
-
-#include "misc.hpp"
-#include "block.hpp"
-#include "error.hpp"
-#include <stdio.h>
-
-namespace TaoCrypt {
-
-
-class Source {
- ByteBlock buffer_;
- word32 current_;
- Error error_;
-public:
- explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
- Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
-
- word32 remaining() { if (GetError().What()) return 0;
- else return buffer_.size() - current_; }
- word32 size() const { return buffer_.size(); }
- void grow(word32 sz) { buffer_.CleanGrow(sz); }
-
- bool IsLeft(word32 sz) { if (remaining() >= sz) return true;
- else { SetError(CONTENT_E); return false; } }
-
- const byte* get_buffer() const { return buffer_.get_buffer(); }
- const byte* get_current() const { return &buffer_[current_]; }
- word32 get_index() const { return current_; }
- void set_index(word32 i) { if (i < size()) current_ = i; }
-
- byte operator[] (word32 i) { current_ = i; return next(); }
- byte next() { if (IsLeft(1)) return buffer_[current_++]; else return 0; }
- byte prev() { if (current_) return buffer_[--current_]; else return 0; }
-
- void add(const byte* data, word32 len)
- {
- if (IsLeft(len)) {
- memcpy(buffer_.get_buffer() + current_, data, len);
- current_ += len;
- }
- }
-
- void advance(word32 i) { if (IsLeft(i)) current_ += i; }
- void reset(ByteBlock&);
-
- Error GetError() { return error_; }
- void SetError(ErrorNumber w) { error_.SetError(w); }
-
- friend class FileSource; // for get()
-
- Source(const Source& that)
- : buffer_(that.buffer_), current_(that.current_) {}
-
- Source& operator=(const Source& that)
- {
- Source tmp(that);
- Swap(tmp);
- return *this;
- }
-
- void Swap(Source& other)
- {
- buffer_.Swap(other.buffer_);
- STL::swap(current_, other.current_);
- }
-
-};
-
-
-// File Source
-class FileSource {
- FILE* file_;
-public:
- FileSource(const char* fname, Source& source);
- ~FileSource();
-
- word32 size(bool use_current = false);
-private:
- word32 get(Source&);
- word32 size_left();
-
- FileSource(const FileSource&); // hide
- FileSource& operator=(const FileSource&); // hide
-};
-
-
-// File Sink
-class FileSink {
- FILE* file_;
-public:
- FileSink(const char* fname, Source& source);
- ~FileSink();
-
- word32 size(bool use_current = false);
-private:
- size_t put(Source&);
-
- FileSink(const FileSink&); // hide
- FileSink& operator=(const FileSink&); // hide
-};
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_FILE_HPP
diff --git a/extra/yassl/taocrypt/include/hash.hpp b/extra/yassl/taocrypt/include/hash.hpp
deleted file mode 100644
index 4ffb305869a..00000000000
--- a/extra/yassl/taocrypt/include/hash.hpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* hash.hpp provides a base for digest types
-*/
-
-
-#ifndef TAO_CRYPT_HASH_HPP
-#define TAO_CRYPT_HASH_HPP
-
-#include "misc.hpp"
-
-namespace TaoCrypt {
-
-
-// HASH
-class HASH : public virtual_base {
-public:
- virtual ~HASH() {}
-
- virtual void Update(const byte*, word32) = 0;
- virtual void Final(byte*) = 0;
-
- virtual void Init() = 0;
-
- virtual word32 getBlockSize() const = 0;
- virtual word32 getDigestSize() const = 0;
-};
-
-
-// HASH with Transform
-class HASHwithTransform : public HASH {
-public:
- HASHwithTransform(word32 digSz, word32 buffSz);
- virtual ~HASHwithTransform() {}
- virtual ByteOrder getByteOrder() const = 0;
- virtual word32 getPadSize() const = 0;
-
- virtual void Update(const byte*, word32);
- virtual void Final(byte*);
-
- word32 GetBitCountLo() const { return loLen_ << 3; }
- word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) +
- (hiLen_ << 3); }
- enum { MaxDigestSz = 8, MaxBufferSz = 64 };
-protected:
- typedef word32 HashLengthType;
- word32 buffLen_; // in bytes
- HashLengthType loLen_; // length in bytes
- HashLengthType hiLen_; // length in bytes
- word32 digest_[MaxDigestSz];
- word32 buffer_[MaxBufferSz / sizeof(word32)];
-
- virtual void Transform() = 0;
-
- void AddLength(word32);
-};
-
-
-#ifdef WORD64_AVAILABLE
-
-// 64-bit HASH with Transform
-class HASH64withTransform : public HASH {
-public:
- HASH64withTransform(word32 digSz, word32 buffSz);
- virtual ~HASH64withTransform() {}
- virtual ByteOrder getByteOrder() const = 0;
- virtual word32 getPadSize() const = 0;
-
- virtual void Update(const byte*, word32);
- virtual void Final(byte*);
-
- word32 GetBitCountLo() const { return loLen_ << 3; }
- word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) +
- (hiLen_ << 3); }
- enum { MaxDigestSz = 8, MaxBufferSz = 128 };
-protected:
- typedef word32 HashLengthType;
- word32 buffLen_; // in bytes
- HashLengthType loLen_; // length in bytes
- HashLengthType hiLen_; // length in bytes
- word64 digest_[MaxDigestSz];
- word64 buffer_[MaxBufferSz / sizeof(word64)];
-
- virtual void Transform() = 0;
-
- void AddLength(word32);
-};
-
-#endif // WORD64_AVAILABLE
-
-
-} // namespace
-
-#endif // TAO_CRYPT_HASH_HPP
diff --git a/extra/yassl/taocrypt/include/hc128.hpp b/extra/yassl/taocrypt/include/hc128.hpp
deleted file mode 100644
index e1ed337de6a..00000000000
--- a/extra/yassl/taocrypt/include/hc128.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* hc128.hpp defines HC128
-*/
-
-
-#ifndef TAO_CRYPT_HC128_HPP
-#define TAO_CRYPT_HC128_HPP
-
-#include "misc.hpp"
-
-namespace TaoCrypt {
-
-
-// HC128 encryption and decryption
-class HC128 {
-public:
-
- typedef HC128 Encryption;
- typedef HC128 Decryption;
-
-
- HC128() {}
-
- void Process(byte*, const byte*, word32);
- void SetKey(const byte*, const byte*);
-private:
- word32 T_[1024]; /* P[i] = T[i]; Q[i] = T[1024 + i ]; */
- word32 X_[16];
- word32 Y_[16];
- word32 counter1024_; /* counter1024 = i mod 1024 at the ith step */
- word32 key_[8];
- word32 iv_[8];
-
- void SetIV(const byte*);
- void GenerateKeystream(word32*);
- void SetupUpdate();
-
- HC128(const HC128&); // hide copy
- const HC128 operator=(const HC128&); // and assign
-};
-
-} // namespace
-
-
-#endif // TAO_CRYPT_HC128_HPP
-
diff --git a/extra/yassl/taocrypt/include/hmac.hpp b/extra/yassl/taocrypt/include/hmac.hpp
deleted file mode 100644
index a5b16cdaf38..00000000000
--- a/extra/yassl/taocrypt/include/hmac.hpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* hamc.hpp implements HMAC, see RFC 2104
-*/
-
-
-#ifndef TAO_CRYPT_HMAC_HPP
-#define TAO_CRYPT_HMAC_HPP
-
-#include "hash.hpp"
-
-namespace TaoCrypt {
-
-
-// HMAC class template
-template <class T>
-class HMAC {
-public:
- enum { IPAD = 0x36, OPAD = 0x5C };
-
- HMAC() : ipad_(reinterpret_cast<byte*>(&ip_)),
- opad_(reinterpret_cast<byte*>(&op_)),
- innerHash_(reinterpret_cast<byte*>(&innerH_))
- {
- Init();
- }
- void Update(const byte*, word32);
- void Final(byte*);
- void Init();
-
- void SetKey(const byte*, word32);
-private:
- byte* ipad_;
- byte* opad_;
- byte* innerHash_;
- bool innerHashKeyed_;
- T mac_;
-
- // MSVC 6 HACK, gives compiler error if calculated in array
- enum { HMAC_BSIZE = T::BLOCK_SIZE / sizeof(word32),
- HMAC_DSIZE = T::DIGEST_SIZE / sizeof(word32) };
-
- word32 ip_[HMAC_BSIZE]; // align ipad_ on word32
- word32 op_[HMAC_BSIZE]; // align opad_ on word32
- word32 innerH_[HMAC_DSIZE]; // align innerHash_ on word32
-
- void KeyInnerHash();
-
- HMAC(const HMAC&);
- HMAC& operator= (const HMAC&);
-};
-
-
-// Setup
-template <class T>
-void HMAC<T>::Init()
-{
- mac_.Init();
- innerHashKeyed_ = false;
-}
-
-
-// Key generation
-template <class T>
-void HMAC<T>::SetKey(const byte* key, word32 length)
-{
- Init();
-
- if (length <= T::BLOCK_SIZE)
- memcpy(ipad_, key, length);
- else {
- mac_.Update(key, length);
- mac_.Final(ipad_);
- length = T::DIGEST_SIZE;
- }
- memset(ipad_ + length, 0, T::BLOCK_SIZE - length);
-
- for (word32 i = 0; i < T::BLOCK_SIZE; i++) {
- opad_[i] = ipad_[i] ^ OPAD;
- ipad_[i] ^= IPAD;
- }
-}
-
-
-// Inner Key Hash
-template <class T>
-void HMAC<T>::KeyInnerHash()
-{
- mac_.Update(ipad_, T::BLOCK_SIZE);
- innerHashKeyed_ = true;
-}
-
-
-// Update
-template <class T>
-void HMAC<T>::Update(const byte* msg, word32 length)
-{
- if (!innerHashKeyed_)
- KeyInnerHash();
- mac_.Update(msg, length);
-}
-
-
-// Final
-template <class T>
-void HMAC<T>::Final(byte* hash)
-{
- if (!innerHashKeyed_)
- KeyInnerHash();
- mac_.Final(innerHash_);
-
- mac_.Update(opad_, T::BLOCK_SIZE);
- mac_.Update(innerHash_, T::DIGEST_SIZE);
- mac_.Final(hash);
-
- innerHashKeyed_ = false;
-}
-
-
-} // namespace
-
-#endif // TAO_CRYPT_HMAC_HPP
diff --git a/extra/yassl/taocrypt/include/integer.hpp b/extra/yassl/taocrypt/include/integer.hpp
deleted file mode 100644
index 613ed44b13d..00000000000
--- a/extra/yassl/taocrypt/include/integer.hpp
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's integer.h from CryptoPP */
-
-
-#ifndef TAO_CRYPT_INTEGER_HPP
-#define TAO_CRYPT_INTEGER_HPP
-
-
-#ifdef _MSC_VER
- // 4250: dominance
- // 4660: explicitly instantiating a class already implicitly instantiated
- // 4661: no suitable definition provided for explicit template request
- // 4786: identifer was truncated in debug information
- // 4355: 'this' : used in base member initializer list
-# pragma warning(disable: 4250 4660 4661 4786 4355)
-#endif
-
-
-#include "misc.hpp"
-#include "block.hpp"
-#include "random.hpp"
-#include "file.hpp"
-#include <string.h>
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-#ifdef TAOCRYPT_X86ASM_AVAILABLE
- #if defined(__GNUC__) && (__GNUC__ >= 4)
- // GCC 4 or greater optimizes too much inline on recursive for bigint,
- // -O3 just as fast without asm here anyway
- #undef TAOCRYPT_X86ASM_AVAILABLE
- #endif
-#endif
-
-#ifdef TAOCRYPT_X86ASM_AVAILABLE
-
-#ifdef _M_IX86
- #if (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 500)) || \
- (defined(__ICL) && (__ICL >= 500))
- #define SSE2_INTRINSICS_AVAILABLE
- #define TAOCRYPT_MM_MALLOC_AVAILABLE
- #elif defined(_MSC_VER)
- // _mm_free seems to be the only way to tell if the Processor Pack is
- //installed or not
- #include <malloc.h>
- #if defined(_mm_free)
- #define SSE2_INTRINSICS_AVAILABLE
- #define TAOCRYPT_MM_MALLOC_AVAILABLE
- #endif
- #endif
-#endif
-
-// SSE2 intrinsics work in GCC 3.3 or later
-#if defined(__SSE2__) && (__GNUC__ == 4 || __GNUC_MAJOR__ > 3 || \
- __GNUC_MINOR__ > 2)
- #define SSE2_INTRINSICS_AVAILABLE
-#endif
-
-#endif // X86ASM
-
-
-
-
-namespace TaoCrypt {
-
-#if defined(SSE2_INTRINSICS_AVAILABLE)
-
- // Allocator handling proper alignment
- template <class T>
- class AlignedAllocator : public AllocatorBase<T>
- {
- public:
- typedef typename AllocatorBase<T>::pointer pointer;
- typedef typename AllocatorBase<T>::size_type size_type;
-
- pointer allocate(size_type n, const void* = 0);
- void deallocate(void* p, size_type n);
- pointer reallocate(T* p, size_type oldSize, size_type newSize,
- bool preserve)
- {
- return StdReallocate(*this, p, oldSize, newSize, preserve);
- }
-
- #if !(defined(TAOCRYPT_MALLOC_ALIGNMENT_IS_16) || \
- defined(TAOCRYPT_MEMALIGN_AVAILABLE) || \
- defined(TAOCRYPT_MM_MALLOC_AVAILABLE))
- #define TAOCRYPT_NO_ALIGNED_ALLOC
- AlignedAllocator() : m_pBlock(0) {}
- protected:
- void *m_pBlock;
- #endif
- };
-
- typedef Block<word, AlignedAllocator<word> > AlignedWordBlock;
-#else
- typedef WordBlock AlignedWordBlock;
-#endif
-
-
-
-#ifdef _WIN32
- #undef max // avoid name clash
-#endif
-// general MAX
-template<typename T> inline
-const T& max(const T& a, const T& b)
-{
- return a > b ? a : b;
-}
-
-
-// Large Integer class
-class Integer {
-public:
- enum Sign {POSITIVE = 0, NEGATIVE = 1 };
- enum Signedness { UNSIGNED, SIGNED };
- enum RandomNumberType { ANY, PRIME };
-
- class DivideByZero {};
-
- Integer();
- Integer(const Integer& t);
- Integer(signed long value);
- Integer(Sign s, word highWord, word lowWord);
-
- // BER Decode Source
- explicit Integer(Source&);
-
- Integer(const byte* encodedInteger, unsigned int byteCount,
- Signedness s = UNSIGNED);
-
- ~Integer() {}
-
- static const Integer& Zero();
- static const Integer& One();
-
- Integer& Ref() { return *this; }
-
- Integer(RandomNumberGenerator& rng, const Integer& min,
- const Integer& max);
-
- static Integer Power2(unsigned int e);
-
- unsigned int MinEncodedSize(Signedness = UNSIGNED) const;
- unsigned int Encode(byte* output, unsigned int outputLen,
- Signedness = UNSIGNED) const;
-
- void Decode(const byte* input, unsigned int inputLen,
- Signedness = UNSIGNED);
- void Decode(Source&);
-
- bool IsConvertableToLong() const;
- signed long ConvertToLong() const;
-
- unsigned int BitCount() const;
- unsigned int ByteCount() const;
- unsigned int WordCount() const;
-
- bool GetBit(unsigned int i) const;
- byte GetByte(unsigned int i) const;
- unsigned long GetBits(unsigned int i, unsigned int n) const;
-
- bool IsZero() const { return !*this; }
- bool NotZero() const { return !IsZero(); }
- bool IsNegative() const { return sign_ == NEGATIVE; }
- bool NotNegative() const { return !IsNegative(); }
- bool IsPositive() const { return NotNegative() && NotZero(); }
- bool NotPositive() const { return !IsPositive(); }
- bool IsEven() const { return GetBit(0) == 0; }
- bool IsOdd() const { return GetBit(0) == 1; }
-
- Integer& operator=(const Integer& t);
- Integer& operator+=(const Integer& t);
- Integer& operator-=(const Integer& t);
- Integer& operator*=(const Integer& t) { return *this = Times(t); }
- Integer& operator/=(const Integer& t)
- { return *this = DividedBy(t);}
- Integer& operator%=(const Integer& t) { return *this = Modulo(t); }
- Integer& operator/=(word t) { return *this = DividedBy(t); }
- Integer& operator%=(word t) { return *this = Modulo(t); }
- Integer& operator<<=(unsigned int);
- Integer& operator>>=(unsigned int);
-
-
- void Randomize(RandomNumberGenerator &rng, unsigned int bitcount);
- void Randomize(RandomNumberGenerator &rng, const Integer &min,
- const Integer &max);
-
- void SetBit(unsigned int n, bool value = 1);
- void SetByte(unsigned int n, byte value);
-
- void Negate();
- void SetPositive() { sign_ = POSITIVE; }
- void SetNegative() { if (!!(*this)) sign_ = NEGATIVE; }
- void Swap(Integer& a);
-
- bool operator!() const;
- Integer operator+() const {return *this;}
- Integer operator-() const;
- Integer& operator++();
- Integer& operator--();
- Integer operator++(int)
- { Integer temp = *this; ++*this; return temp; }
- Integer operator--(int)
- { Integer temp = *this; --*this; return temp; }
-
- int Compare(const Integer& a) const;
-
- Integer Plus(const Integer &b) const;
- Integer Minus(const Integer &b) const;
- Integer Times(const Integer &b) const;
- Integer DividedBy(const Integer &b) const;
- Integer Modulo(const Integer &b) const;
- Integer DividedBy(word b) const;
- word Modulo(word b) const;
-
- Integer operator>>(unsigned int n) const { return Integer(*this)>>=n; }
- Integer operator<<(unsigned int n) const { return Integer(*this)<<=n; }
-
- Integer AbsoluteValue() const;
- Integer Doubled() const { return Plus(*this); }
- Integer Squared() const { return Times(*this); }
- Integer SquareRoot() const;
-
- bool IsSquare() const;
- bool IsUnit() const;
-
- Integer MultiplicativeInverse() const;
-
- friend Integer a_times_b_mod_c(const Integer& x, const Integer& y,
- const Integer& m);
- friend Integer a_exp_b_mod_c(const Integer& x, const Integer& e,
- const Integer& m);
-
- static void Divide(Integer& r, Integer& q, const Integer& a,
- const Integer& d);
- static void Divide(word& r, Integer& q, const Integer& a, word d);
- static void DivideByPowerOf2(Integer& r, Integer& q, const Integer& a,
- unsigned int n);
- static Integer Gcd(const Integer& a, const Integer& n);
-
- Integer InverseMod(const Integer& n) const;
- word InverseMod(word n) const;
-
-private:
- friend class ModularArithmetic;
- friend class MontgomeryRepresentation;
-
- Integer(word value, unsigned int length);
- int PositiveCompare(const Integer& t) const;
-
- friend void PositiveAdd(Integer& sum, const Integer& a, const Integer& b);
- friend void PositiveSubtract(Integer& diff, const Integer& a,
- const Integer& b);
- friend void PositiveMultiply(Integer& product, const Integer& a,
- const Integer& b);
- friend void PositiveDivide(Integer& remainder, Integer& quotient, const
- Integer& dividend, const Integer& divisor);
- AlignedWordBlock reg_;
- Sign sign_;
-};
-
-inline bool operator==(const Integer& a, const Integer& b)
- {return a.Compare(b)==0;}
-inline bool operator!=(const Integer& a, const Integer& b)
- {return a.Compare(b)!=0;}
-inline bool operator> (const Integer& a, const Integer& b)
- {return a.Compare(b)> 0;}
-inline bool operator>=(const Integer& a, const Integer& b)
- {return a.Compare(b)>=0;}
-inline bool operator< (const Integer& a, const Integer& b)
- {return a.Compare(b)< 0;}
-inline bool operator<=(const Integer& a, const Integer& b)
- {return a.Compare(b)<=0;}
-
-inline Integer operator+(const Integer &a, const Integer &b)
- {return a.Plus(b);}
-inline Integer operator-(const Integer &a, const Integer &b)
- {return a.Minus(b);}
-inline Integer operator*(const Integer &a, const Integer &b)
- {return a.Times(b);}
-inline Integer operator/(const Integer &a, const Integer &b)
- {return a.DividedBy(b);}
-inline Integer operator%(const Integer &a, const Integer &b)
- {return a.Modulo(b);}
-inline Integer operator/(const Integer &a, word b) {return a.DividedBy(b);}
-inline word operator%(const Integer &a, word b) {return a.Modulo(b);}
-
-inline void swap(Integer &a, Integer &b)
-{
- a.Swap(b);
-}
-
-
-Integer CRT(const Integer& xp, const Integer& p, const Integer& xq,
- const Integer& q, const Integer& u);
-
-inline Integer ModularExponentiation(const Integer& a, const Integer& e,
- const Integer& m)
-{
- return a_exp_b_mod_c(a, e, m);
-}
-
-Integer ModularRoot(const Integer& a, const Integer& dp, const Integer& dq,
- const Integer& p, const Integer& q, const Integer& u);
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_INTEGER_HPP
diff --git a/extra/yassl/taocrypt/include/kernelc.hpp b/extra/yassl/taocrypt/include/kernelc.hpp
deleted file mode 100644
index 5d0ceadc4d0..00000000000
--- a/extra/yassl/taocrypt/include/kernelc.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* kernelc.hpp provides support for C std lib when compiled in kernel mode
-*/
-
-#ifndef TAOCRYPT_KERNELC_HPP
-#define TAOCRYPT_KERNELC_HPP
-
-#include <linux/types.h> // get right size_t
-
-// system functions that c++ doesn't like headers for
-
-extern "C" void* memcpy(void*, const void*, size_t);
-extern "C" void* memset(void*, int, size_t);
-extern "C" void printk(char *fmt, ...);
-
-
-#endif // TAOCRYPT_KERNELC_HPP
diff --git a/extra/yassl/taocrypt/include/md2.hpp b/extra/yassl/taocrypt/include/md2.hpp
deleted file mode 100644
index 89226fc93a1..00000000000
--- a/extra/yassl/taocrypt/include/md2.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* md2.hpp provides MD2 digest support, see RFC 1319
-*/
-
-#ifndef TAO_CRYPT_MD2_HPP
-#define TAO_CRYPT_MD2_HPP
-
-
-#include "hash.hpp"
-#include "block.hpp"
-
-
-namespace TaoCrypt {
-
-
-// MD2 digest
-class MD2 : public HASH {
-public:
- enum { BLOCK_SIZE = 16, DIGEST_SIZE = 16, PAD_SIZE = 16, X_SIZE = 48 };
- MD2();
-
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
-
- void Update(const byte*, word32);
- void Final(byte*);
-
- void Init();
- void Swap(MD2&);
-private:
- ByteBlock X_, C_, buffer_;
- word32 count_; // bytes % PAD_SIZE
-
- MD2(const MD2&);
- MD2& operator=(const MD2&);
-};
-
-inline void swap(MD2& a, MD2& b)
-{
- a.Swap(b);
-}
-
-
-} // namespace
-
-#endif // TAO_CRYPT_MD2_HPP
-
diff --git a/extra/yassl/taocrypt/include/md4.hpp b/extra/yassl/taocrypt/include/md4.hpp
deleted file mode 100644
index a4e87b5ccf5..00000000000
--- a/extra/yassl/taocrypt/include/md4.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* md4.hpp provides MD4 digest support
- * WANRING: MD4 is considered insecure, only use if you have to, e.g., yaSSL
- * libcurl supports needs this for NTLM authentication
-*/
-
-#ifndef TAO_CRYPT_MD4_HPP
-#define TAO_CRYPT_MD4_HPP
-
-#include "hash.hpp"
-
-namespace TaoCrypt {
-
-
-// MD4 digest
-class MD4 : public HASHwithTransform {
-public:
- enum { BLOCK_SIZE = 64, DIGEST_SIZE = 16, PAD_SIZE = 56,
- TAO_BYTE_ORDER = LittleEndianOrder }; // in Bytes
- MD4() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
- MD4(const MD4&);
- MD4& operator= (const MD4&);
-
- void Init();
- void Swap(MD4&);
-private:
- void Transform();
-};
-
-inline void swap(MD4& a, MD4& b)
-{
- a.Swap(b);
-}
-
-
-} // namespace
-
-#endif // TAO_CRYPT_MD4_HPP
-
diff --git a/extra/yassl/taocrypt/include/md5.hpp b/extra/yassl/taocrypt/include/md5.hpp
deleted file mode 100644
index a065d3d6e52..00000000000
--- a/extra/yassl/taocrypt/include/md5.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* md5.hpp provides MD5 digest support, see RFC 1321
-*/
-
-#ifndef TAO_CRYPT_MD5_HPP
-#define TAO_CRYPT_MD5_HPP
-
-#include "hash.hpp"
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_MD5_ASM
-#endif
-
-namespace TaoCrypt {
-
-
-// MD5 digest
-class MD5 : public HASHwithTransform {
-public:
- enum { BLOCK_SIZE = 64, DIGEST_SIZE = 16, PAD_SIZE = 56,
- TAO_BYTE_ORDER = LittleEndianOrder }; // in Bytes
- MD5() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
- MD5(const MD5&);
- MD5& operator= (const MD5&);
-
-#ifdef DO_MD5_ASM
- void Update(const byte*, word32);
-#endif
-
- void Init();
- void Swap(MD5&);
-private:
- void Transform();
- void AsmTransform(const byte* data, word32 times);
-};
-
-inline void swap(MD5& a, MD5& b)
-{
- a.Swap(b);
-}
-
-
-} // namespace
-
-#endif // TAO_CRYPT_MD5_HPP
-
diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp
deleted file mode 100644
index 8147832d28a..00000000000
--- a/extra/yassl/taocrypt/include/misc.hpp
+++ /dev/null
@@ -1,889 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
- Copyright (c) 2017, 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's misc.h from CryptoPP */
-
-#ifndef TAO_CRYPT_MISC_HPP
-#define TAO_CRYPT_MISC_HPP
-
-
-#if !defined(DO_TAOCRYPT_KERNEL_MODE)
- #include <stdlib.h>
- #include <string.h>
-#else
- #include "kernelc.hpp"
-#endif
-
-#include "types.hpp"
-#include "type_traits.hpp"
-
-
-
-namespace TaoCrypt {
-
-
-// Delete static singleton holders
-void CleanUp();
-
-
-#ifdef YASSL_PURE_C
-
- // library allocation
- struct new_t {}; // TaoCrypt New type
- extern new_t tc; // pass in parameter
-
- } // namespace TaoCrypt
-
- void* operator new (size_t, TaoCrypt::new_t);
- void* operator new[](size_t, TaoCrypt::new_t);
-
- void operator delete (void*, TaoCrypt::new_t);
- void operator delete[](void*, TaoCrypt::new_t);
-
-
- namespace TaoCrypt {
-
- template<typename T>
- void tcDelete(T* ptr)
- {
- if (ptr) ptr->~T();
- ::operator delete(ptr, TaoCrypt::tc);
- }
-
- template<typename T>
- void tcArrayDelete(T* ptr)
- {
- // can't do array placement destruction since not tracking size in
- // allocation, only allow builtins to use array placement since they
- // don't need destructors called
- typedef char builtin[IsFundamentalType<T>::Yes ? 1 : -1];
- (void)sizeof(builtin);
-
- ::operator delete[](ptr, TaoCrypt::tc);
- }
-
- #define NEW_TC new (TaoCrypt::tc)
-
-
- // to resolve compiler generated operator delete on base classes with
- // virtual destructors (when on stack)
- class virtual_base {
- public:
- static void operator delete(void*) { }
- };
-
-#else // YASSL_PURE_C
-
-
- template<typename T>
- void tcDelete(T* ptr)
- {
- delete ptr;
- }
-
- template<typename T>
- void tcArrayDelete(T* ptr)
- {
- delete[] ptr;
- }
-
- #define NEW_TC new
-
- class virtual_base {};
-
-
-#endif // YASSL_PURE_C
-
-
-#if defined(_MSC_VER) || defined(__BCPLUSPLUS__)
- #define INTEL_INTRINSICS
- #define FAST_ROTATE
-#elif defined(__MWERKS__) && TARGET_CPU_PPC
- #define PPC_INTRINSICS
- #define FAST_ROTATE
-#elif defined(__GNUC__) && defined(__i386__)
- // GCC does peephole optimizations which should result in using rotate
- // instructions
- #define FAST_ROTATE
-#endif
-
-
-// no gas on these systems ?, disable for now
-#if defined(__sun__)
- #undef TAOCRYPT_DISABLE_X86ASM
- #define TAOCRYPT_DISABLE_X86ASM
-#endif
-
-// icc problem with -03 and integer, disable for now
-#if defined(__INTEL_COMPILER)
- #undef TAOCRYPT_DISABLE_X86ASM
- #define TAOCRYPT_DISABLE_X86ASM
-#endif
-
-// indpedent of build system, unless ia32 asm is enabled disable it
-#if !defined(TAOCRYPT_ENABLE_X86ASM)
- #undef TAOCRYPT_DISABLE_X86ASM
- #define TAOCRYPT_DISABLE_X86ASM
-#endif
-
-// Turn on ia32 ASM for Big Integer
-// CodeWarrior defines _MSC_VER
-#if !defined(TAOCRYPT_DISABLE_X86ASM) && ((defined(_MSC_VER) && \
- !defined(__MWERKS__) && defined(_M_IX86)) || \
- (defined(__GNUC__) && defined(__i386__)))
- #define TAOCRYPT_X86ASM_AVAILABLE
-#endif
-
-
-#ifdef TAOCRYPT_X86ASM_AVAILABLE
- bool HaveCpuId();
- bool IsPentium();
- void CpuId(word32 input, word32 *output);
-
- extern bool isMMX;
-#endif
-
-
-
-
-// Turn on ia32 ASM for Ciphers and Message Digests
-// Seperate define since these are more complex, use member offsets
-// and user may want to turn off while leaving Big Integer optos on
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && !defined(DISABLE_TAO_ASM)
- #define TAO_ASM
-#endif
-
-
-// Extra word in older vtable implementations, for ASM member offset
-#if defined(__GNUC__) && __GNUC__ < 3
- #define OLD_GCC_OFFSET
-#endif
-
-
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-# define TAOCRYPT_MALLOC_ALIGNMENT_IS_16
-#endif
-
-#if defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
-# define TAOCRYPT_MEMALIGN_AVAILABLE
-#endif
-
-
-#if defined(_WIN32) || defined(__CYGWIN__)
- #define TAOCRYPT_WIN32_AVAILABLE
-#endif
-
-#if defined(__unix__) || defined(__MACH__)
- #define TAOCRYPT_UNIX_AVAILABLE
-#endif
-
-
-// VC60 workaround: it doesn't allow typename in some places
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
- #define CPP_TYPENAME
-#else
- #define CPP_TYPENAME typename
-#endif
-
-
-#ifdef _MSC_VER
- #define TAOCRYPT_NO_VTABLE __declspec(novtable)
-#else
- #define TAOCRYPT_NO_VTABLE
-#endif
-
-
-#ifdef USE_SYS_STL
- // use system STL
- #define STL_NAMESPACE std
-#else
- // use mySTL
- #define STL_NAMESPACE mySTL
-#endif
-
-
-// ***************** DLL related ********************
-
-#ifdef TAOCRYPT_WIN32_AVAILABLE
-
-#ifdef TAOCRYPT_EXPORTS
- #define TAOCRYPT_IS_DLL
- #define TAOCRYPT_DLL __declspec(dllexport)
-#elif defined(TAOCRYPT_IMPORTS)
- #define TAOCRYPT_IS_DLL
- #define TAOCRYPT_DLL __declspec(dllimport)
-#else
- #define TAOCRYPT_DLL
-#endif // EXPORTS
-
-#define TAOCRYPT_API __stdcall
-#define TAOCRYPT_CDECL __cdecl
-
-#else // TAOCRYPT_WIN32_AVAILABLE
-
-#define TAOCRYPT_DLL
-#define TAOCRYPT_API
-#define TAOCRYPT_CDECL
-
-#endif // TAOCRYPT_WIN32_AVAILABLE
-
-
-// ****************** tempalte stuff *******************
-
-
-#if defined(TAOCRYPT_MANUALLY_INSTANTIATE_TEMPLATES) && \
- !defined(TAOCRYPT_IMPORTS)
- #define TAOCRYPT_DLL_TEMPLATE_CLASS template class TAOCRYPT_DLL
-#elif defined(__MWERKS__)
- #define TAOCRYPT_DLL_TEMPLATE_CLASS extern class TAOCRYPT_DLL
-#else
- #define TAOCRYPT_DLL_TEMPLATE_CLASS extern template class TAOCRYPT_DLL
-#endif
-
-
-#if defined(TAOCRYPT_MANUALLY_INSTANTIATE_TEMPLATES) && \
- !defined(TAOCRYPT_EXPORTS)
- #define TAOCRYPT_STATIC_TEMPLATE_CLASS template class
-#elif defined(__MWERKS__)
- #define TAOCRYPT_STATIC_TEMPLATE_CLASS extern class
-#else
- #define TAOCRYPT_STATIC_TEMPLATE_CLASS extern template class
-#endif
-
-
-// ************** compile-time assertion ***************
-
-template <bool b>
-struct CompileAssert
-{
- static char dummy[2*b-1];
-};
-
-#define TAOCRYPT_COMPILE_ASSERT(assertion) \
- TAOCRYPT_COMPILE_ASSERT_INSTANCE(assertion, __LINE__)
-
-#if defined(TAOCRYPT_EXPORTS) || defined(TAOCRYPT_IMPORTS)
- #define TAOCRYPT_COMPILE_ASSERT_INSTANCE(assertion, instance)
-#else
- #define TAOCRYPT_COMPILE_ASSERT_INSTANCE(assertion, instance) \
- (void)sizeof(CompileAssert<(assertion)>)
-#endif
-
-#define TAOCRYPT_ASSERT_JOIN(X, Y) TAOCRYPT_DO_ASSERT_JOIN(X, Y)
-
-#define TAOCRYPT_DO_ASSERT_JOIN(X, Y) X##Y
-
-
-/*************** helpers *****************************/
-
-inline unsigned int BitsToBytes(unsigned int bitCount)
-{
- return ((bitCount+7)/(8));
-}
-
-inline unsigned int BytesToWords(unsigned int byteCount)
-{
- return ((byteCount+WORD_SIZE-1)/WORD_SIZE);
-}
-
-inline unsigned int BitsToWords(unsigned int bitCount)
-{
- return ((bitCount+WORD_BITS-1)/(WORD_BITS));
-}
-
-inline void CopyWords(word* r, const word* a, word32 n)
-{
- for (word32 i = 0; i < n; i++)
- r[i] = a[i];
-}
-
-inline unsigned int CountWords(const word* X, unsigned int N)
-{
- while (N && X[N-1]==0)
- N--;
- return N;
-}
-
-inline void SetWords(word* r, word a, unsigned int n)
-{
- for (unsigned int i=0; i<n; i++)
- r[i] = a;
-}
-
-enum ByteOrder { LittleEndianOrder = 0, BigEndianOrder = 1 };
-enum CipherDir {ENCRYPTION, DECRYPTION};
-
-inline CipherDir ReverseDir(CipherDir dir)
-{
- return (dir == ENCRYPTION) ? DECRYPTION : ENCRYPTION;
-}
-
-template <typename ENUM_TYPE, int VALUE>
-struct EnumToType
-{
- static ENUM_TYPE ToEnum() { return (ENUM_TYPE)VALUE; }
-};
-
-typedef EnumToType<ByteOrder, LittleEndianOrder> LittleEndian;
-typedef EnumToType<ByteOrder, BigEndianOrder> BigEndian;
-
-
-#ifndef BIG_ENDIAN_ORDER
- typedef LittleEndian HostByteOrder;
-#else
- typedef BigEndian HostByteOrder;
-#endif
-
-inline ByteOrder GetHostByteOrder()
-{
- return HostByteOrder::ToEnum();
-}
-
-inline bool HostByteOrderIs(ByteOrder order)
-{
- return order == GetHostByteOrder();
-}
-
-
-void xorbuf(byte*, const byte*, unsigned int);
-
-
-template <class T>
-inline bool IsPowerOf2(T n)
-{
- return n > 0 && (n & (n-1)) == 0;
-}
-
-template <class T1, class T2>
-inline T2 ModPowerOf2(T1 a, T2 b)
-{
- return T2(a) & (b-1);
-}
-
-template <class T>
-inline T RoundDownToMultipleOf(T n, T m)
-{
- return n - (IsPowerOf2(m) ? ModPowerOf2(n, m) : (n%m));
-}
-
-template <class T>
-inline T RoundUpToMultipleOf(T n, T m)
-{
- return RoundDownToMultipleOf(n+m-1, m);
-}
-
-template <class T>
-inline unsigned int GetAlignment(T* dummy = 0) // VC60 workaround
-{
-#if (_MSC_VER >= 1300)
- return __alignof(T);
-#elif defined(__GNUC__)
- return __alignof__(T);
-#else
- return sizeof(T);
-#endif
-}
-
-inline bool IsAlignedOn(const void* p, unsigned int alignment)
-{
- return IsPowerOf2(alignment) ? ModPowerOf2((size_t)p, alignment) == 0
- : (size_t)p % alignment == 0;
-}
-
-template <class T>
-inline bool IsAligned(const void* p, T* dummy = 0) // VC60 workaround
-{
- return IsAlignedOn(p, GetAlignment<T>());
-}
-
-
-template <class T> inline T rotlFixed(T x, unsigned int y)
-{
- return (x<<y) | (x>>(sizeof(T)*8-y));
-}
-
-template <class T> inline T rotrFixed(T x, unsigned int y)
-{
- return (x>>y) | (x<<(sizeof(T)*8-y));
-}
-
-#ifdef INTEL_INTRINSICS
-
-#pragma intrinsic(_lrotl, _lrotr)
-
-template<> inline word32 rotlFixed(word32 x, word32 y)
-{
- return y ? _lrotl(x, y) : x;
-}
-
-template<> inline word32 rotrFixed(word32 x, word32 y)
-{
- return y ? _lrotr(x, y) : x;
-}
-
-#endif // INTEL_INTRINSICS
-
-#ifdef min
-#undef min
-#endif
-
-
-template <class T>
-inline const T& min(const T& a, const T& b)
-{
- return a < b ? a : b;
-}
-
-
-inline word32 ByteReverse(word32 value)
-{
-#ifdef PPC_INTRINSICS
- // PPC: load reverse indexed instruction
- return (word32)__lwbrx(&value,0);
-#elif defined(FAST_ROTATE)
- // 5 instructions with rotate instruction, 9 without
- return (rotrFixed(value, 8U) & 0xff00ff00) |
- (rotlFixed(value, 8U) & 0x00ff00ff);
-#else
- // 6 instructions with rotate instruction, 8 without
- value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
- return rotlFixed(value, 16U);
-#endif
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-inline word64 ByteReverse(word64 value)
-{
-#ifdef TAOCRYPT_SLOW_WORD64
- return (word64(ByteReverse(word32(value))) << 32) |
- ByteReverse(word32(value>>32));
-#else
- value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) |
- ((value & W64LIT(0x00FF00FF00FF00FF)) << 8);
- value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) |
- ((value & W64LIT(0x0000FFFF0000FFFF)) << 16);
- return rotlFixed(value, 32U);
-#endif
-}
-
-#endif // WORD64_AVAILABLE
-
-
-template <typename T>
-inline void ByteReverse(T* out, const T* in, word32 byteCount)
-{
- word32 count = byteCount/sizeof(T);
- for (word32 i=0; i<count; i++)
- out[i] = ByteReverse(in[i]);
-}
-
-inline void ByteReverse(byte* out, const byte* in, word32 byteCount)
-{
- word32* o = reinterpret_cast<word32*>(out);
- const word32* i = reinterpret_cast<const word32*>(in);
- ByteReverse(o, i, byteCount);
-}
-
-
-template <class T>
-inline T ByteReverseIf(T value, ByteOrder order)
-{
- return HostByteOrderIs(order) ? value : ByteReverse(value);
-}
-
-
-template <typename T>
-inline void ByteReverseIf(T* out, const T* in, word32 bc, ByteOrder order)
-{
- if (!HostByteOrderIs(order))
- ByteReverse(out, in, bc);
- else if (out != in)
- memcpy(out, in, bc);
-}
-
-
-
-// do Asm Reverse is host is Little and x86asm
-#ifdef LITTLE_ENDIAN_ORDER
- #ifdef TAOCRYPT_X86ASM_AVAILABLE
- #define LittleReverse AsmReverse
- #else
- #define LittleReverse ByteReverse
- #endif
-#else
- #define LittleReverse
-#endif
-
-
-// do Asm Reverse is host is Big and x86asm
-#ifdef BIG_ENDIAN_ORDER
- #ifdef TAOCRYPT_X86ASM_AVAILABLE
- #define BigReverse AsmReverse
- #else
- #define BigReverse ByteReverse
- #endif
-#else
- #define BigReverse
-#endif
-
-
-#ifdef TAOCRYPT_X86ASM_AVAILABLE
-
- // faster than rotate, use bswap
-
- inline word32 AsmReverse(word32 wd)
- {
- #ifdef __GNUC__
- __asm__
- (
- "bswap %1"
- : "=r"(wd)
- : "0"(wd)
- );
- #else
- __asm
- {
- mov eax, wd
- bswap eax
- mov wd, eax
- }
- #endif
- return wd;
- }
-
-#endif
-
-
-template <class T>
-inline void GetUserKey(ByteOrder order, T* out, word32 outlen, const byte* in,
- word32 inlen)
-{
- const unsigned int U = sizeof(T);
- memcpy(out, in, inlen);
- memset((byte *)out+inlen, 0, outlen*U-inlen);
- ByteReverseIf(out, out, RoundUpToMultipleOf(inlen, U), order);
-}
-
-
-#ifdef _MSC_VER
- // disable conversion warning
- // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy
- #pragma warning(disable:4244 4996)
-#endif
-
-
-inline byte UnalignedGetWordNonTemplate(ByteOrder order, const byte *block,
- byte*)
-{
- return block[0];
-}
-
-inline word16 UnalignedGetWordNonTemplate(ByteOrder order, const byte* block,
- word16*)
-{
- return (order == BigEndianOrder)
- ? word16(block[1] | (word16(block[0]) << 8))
- : word16(block[0] | (word16(block[1]) << 8));
-}
-
-inline word32 UnalignedGetWordNonTemplate(ByteOrder order, const byte* block,
- word32*)
-{
- return (order == BigEndianOrder)
- ? word32(block[3]) | (word32(block[2]) << 8) | (word32(block[1]) << 16)
- | (word32(block[0]) << 24)
- : word32(block[0]) | (word32(block[1]) << 8) | (word32(block[2]) << 16)
- | (word32(block[3]) << 24);
-}
-
-template <class T>
-inline T UnalignedGetWord(ByteOrder order, const byte *block, T* dummy = 0)
-{
- return UnalignedGetWordNonTemplate(order, block, dummy);
-}
-
-inline void UnalignedPutWord(ByteOrder order, byte *block, byte value,
- const byte *xorBlock = 0)
-{
- block[0] = xorBlock ? (value ^ xorBlock[0]) : value;
-}
-
-#define GETBYTE(x, y) byte((x)>>(8*(y)))
-
-inline void UnalignedPutWord(ByteOrder order, byte *block, word16 value,
- const byte *xorBlock = 0)
-{
- if (order == BigEndianOrder)
- {
- block[0] = GETBYTE(value, 1);
- block[1] = GETBYTE(value, 0);
- }
- else
- {
- block[0] = GETBYTE(value, 0);
- block[1] = GETBYTE(value, 1);
- }
-
- if (xorBlock)
- {
- block[0] ^= xorBlock[0];
- block[1] ^= xorBlock[1];
- }
-}
-
-inline void UnalignedPutWord(ByteOrder order, byte* block, word32 value,
- const byte* xorBlock = 0)
-{
- if (order == BigEndianOrder)
- {
- block[0] = GETBYTE(value, 3);
- block[1] = GETBYTE(value, 2);
- block[2] = GETBYTE(value, 1);
- block[3] = GETBYTE(value, 0);
- }
- else
- {
- block[0] = GETBYTE(value, 0);
- block[1] = GETBYTE(value, 1);
- block[2] = GETBYTE(value, 2);
- block[3] = GETBYTE(value, 3);
- }
-
- if (xorBlock)
- {
- block[0] ^= xorBlock[0];
- block[1] ^= xorBlock[1];
- block[2] ^= xorBlock[2];
- block[3] ^= xorBlock[3];
- }
-}
-
-
-template <class T>
-inline T GetWord(bool assumeAligned, ByteOrder order, const byte *block)
-{
- if (assumeAligned)
- return ByteReverseIf(*reinterpret_cast<const T *>(block), order);
- else
- return UnalignedGetWord<T>(order, block);
-}
-
-template <class T>
-inline void GetWord(bool assumeAligned, ByteOrder order, T &result,
- const byte *block)
-{
- result = GetWord<T>(assumeAligned, order, block);
-}
-
-template <class T>
-inline void PutWord(bool assumeAligned, ByteOrder order, byte* block, T value,
- const byte *xorBlock = 0)
-{
- if (assumeAligned)
- {
- if (xorBlock)
- *reinterpret_cast<T *>(block) = ByteReverseIf(value, order)
- ^ *reinterpret_cast<const T *>(xorBlock);
- else
- *reinterpret_cast<T *>(block) = ByteReverseIf(value, order);
- }
- else
- UnalignedPutWord(order, block, value, xorBlock);
-}
-
-template <class T, class B, bool A=true>
-class GetBlock
-{
-public:
- GetBlock(const void *block)
- : m_block((const byte *)block) {}
-
- template <class U>
- inline GetBlock<T, B, A> & operator()(U &x)
- {
- TAOCRYPT_COMPILE_ASSERT(sizeof(U) >= sizeof(T));
- x = GetWord<T>(A, B::ToEnum(), m_block);
- m_block += sizeof(T);
- return *this;
- }
-
-private:
- const byte *m_block;
-};
-
-template <class T, class B, bool A = true>
-class PutBlock
-{
-public:
- PutBlock(const void *xorBlock, void *block)
- : m_xorBlock((const byte *)xorBlock), m_block((byte *)block) {}
-
- template <class U>
- inline PutBlock<T, B, A> & operator()(U x)
- {
- PutWord(A, B::ToEnum(), m_block, (T)x, m_xorBlock);
- m_block += sizeof(T);
- if (m_xorBlock)
- m_xorBlock += sizeof(T);
- return *this;
- }
-
-private:
- const byte *m_xorBlock;
- byte *m_block;
-};
-
-/*
- XXX MYSQL: Setting A (assumeAligned) to false,
- keeping it true might trigger segfault on SPARC.
-*/
-template <class T, class B, bool A= false>
-struct BlockGetAndPut
-{
- // function needed because of C++ grammatical ambiguity between
- // expression-statements and declarations
- static inline GetBlock<T, B, A> Get(const void *block)
- {return GetBlock<T, B, A>(block);}
- typedef PutBlock<T, B, A> Put;
-};
-
-
-
-template <bool overflow> struct SafeShifter;
-
-template<> struct SafeShifter<true>
-{
- template <class T>
- static inline T RightShift(T value, unsigned int bits)
- {
- return 0;
- }
-
- template <class T>
- static inline T LeftShift(T value, unsigned int bits)
- {
- return 0;
- }
-};
-
-template<> struct SafeShifter<false>
-{
- template <class T>
- static inline T RightShift(T value, unsigned int bits)
- {
- return value >> bits;
- }
-
- template <class T>
- static inline T LeftShift(T value, unsigned int bits)
- {
- return value << bits;
- }
-};
-
-template <unsigned int bits, class T>
-inline T SafeRightShift(T value)
-{
- return SafeShifter<(bits>=(8*sizeof(T)))>::RightShift(value, bits);
-}
-
-template <unsigned int bits, class T>
-inline T SafeLeftShift(T value)
-{
- return SafeShifter<(bits>=(8*sizeof(T)))>::LeftShift(value, bits);
-}
-
-
-inline
-word ShiftWordsLeftByBits(word* r, unsigned int n, unsigned int shiftBits)
-{
- word u, carry=0;
- if (shiftBits)
- for (unsigned int i=0; i<n; i++)
- {
- u = r[i];
- r[i] = (u << shiftBits) | carry;
- carry = u >> (WORD_BITS-shiftBits);
- }
- return carry;
-}
-
-
-inline
-word ShiftWordsRightByBits(word* r, int n, unsigned int shiftBits)
-{
- word u, carry=0;
- if (shiftBits)
- for (int i=n-1; i>=0; i--)
- {
- u = r[i];
- r[i] = (u >> shiftBits) | carry;
- carry = u << (WORD_BITS-shiftBits);
- }
- return carry;
-}
-
-
-inline
-void ShiftWordsLeftByWords(word* r, unsigned int n, unsigned int shiftWords)
-{
- shiftWords = min(shiftWords, n);
- if (shiftWords)
- {
- for (unsigned int i=n-1; i>=shiftWords; i--)
- r[i] = r[i-shiftWords];
- SetWords(r, 0, shiftWords);
- }
-}
-
-
-inline
-void ShiftWordsRightByWords(word* r, unsigned int n, unsigned int shiftWords)
-{
- shiftWords = min(shiftWords, n);
- if (shiftWords)
- {
- for (unsigned int i=0; i+shiftWords<n; i++)
- r[i] = r[i+shiftWords];
- SetWords(r+n-shiftWords, 0, shiftWords);
- }
-}
-
-
-template <class T1, class T2>
-inline T1 SaturatingSubtract(T1 a, T2 b)
-{
- TAOCRYPT_COMPILE_ASSERT_INSTANCE(T1(-1)>0, 0); // T1 is unsigned type
- TAOCRYPT_COMPILE_ASSERT_INSTANCE(T2(-1)>0, 1); // T2 is unsigned type
- return T1((a > b) ? (a - b) : 0);
-}
-
-
-// declares
-unsigned int BytePrecision(word value);
-unsigned int BitPrecision(word);
-word Crop(word value, unsigned int size);
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_MISC_HPP
diff --git a/extra/yassl/taocrypt/include/modarith.hpp b/extra/yassl/taocrypt/include/modarith.hpp
deleted file mode 100644
index e536b5722e3..00000000000
--- a/extra/yassl/taocrypt/include/modarith.hpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* based on Wei Dai's modarith.h from CryptoPP */
-
-
-#ifndef TAO_CRYPT_MODARITH_HPP
-#define TAO_CRYPT_MODARITH_HPP
-
-#include "misc.hpp"
-#include "algebra.hpp"
-
-namespace TaoCrypt {
-
-
-// ModularArithmetic
-class ModularArithmetic : public AbstractRing
-{
-public:
-
- typedef int RandomizationParameter;
- typedef Integer Element;
-
- ModularArithmetic(const Integer &modulus = Integer::One())
- : modulus(modulus), result((word)0, modulus.reg_.size()) {}
-
- ModularArithmetic(const ModularArithmetic &ma)
- : AbstractRing(),
- modulus(ma.modulus), result((word)0, modulus.reg_.size()) {}
-
- const Integer& GetModulus() const {return modulus;}
- void SetModulus(const Integer &newModulus)
- {
- modulus = newModulus;
- result.reg_.resize(modulus.reg_.size());
- }
-
- virtual bool IsMontgomeryRepresentation() const {return false;}
-
- virtual Integer ConvertIn(const Integer &a) const
- {return a%modulus;}
-
- virtual Integer ConvertOut(const Integer &a) const
- {return a;}
-
- const Integer& Half(const Integer &a) const;
-
- bool Equal(const Integer &a, const Integer &b) const
- {return a==b;}
-
- const Integer& Identity() const
- {return Integer::Zero();}
-
- const Integer& Add(const Integer &a, const Integer &b) const;
-
- Integer& Accumulate(Integer &a, const Integer &b) const;
-
- const Integer& Inverse(const Integer &a) const;
-
- const Integer& Subtract(const Integer &a, const Integer &b) const;
-
- Integer& Reduce(Integer &a, const Integer &b) const;
-
- const Integer& Double(const Integer &a) const
- {return Add(a, a);}
-
- const Integer& MultiplicativeIdentity() const
- {return Integer::One();}
-
- const Integer& Multiply(const Integer &a, const Integer &b) const
- {return result1 = a*b%modulus;}
-
- const Integer& Square(const Integer &a) const
- {return result1 = a.Squared()%modulus;}
-
- bool IsUnit(const Integer &a) const
- {return Integer::Gcd(a, modulus).IsUnit();}
-
- const Integer& MultiplicativeInverse(const Integer &a) const
- {return result1 = a.InverseMod(modulus);}
-
- const Integer& Divide(const Integer &a, const Integer &b) const
- {return Multiply(a, MultiplicativeInverse(b));}
-
- Integer CascadeExponentiate(const Integer &x, const Integer &e1,
- const Integer &y, const Integer &e2) const;
-
- void SimultaneousExponentiate(Element *results, const Element &base,
- const Integer *exponents, unsigned int exponentsCount) const;
-
- unsigned int MaxElementBitLength() const
- {return (modulus-1).BitCount();}
-
- unsigned int MaxElementByteLength() const
- {return (modulus-1).ByteCount();}
-
-
- static const RandomizationParameter DefaultRandomizationParameter;
-
-protected:
- Integer modulus;
- mutable Integer result, result1;
-
-};
-
-
-
-//! do modular arithmetics in Montgomery representation for increased speed
-class MontgomeryRepresentation : public ModularArithmetic
-{
-public:
- MontgomeryRepresentation(const Integer &modulus); // modulus must be odd
-
- bool IsMontgomeryRepresentation() const {return true;}
-
- Integer ConvertIn(const Integer &a) const
- {return (a<<(WORD_BITS*modulus.reg_.size()))%modulus;}
-
- Integer ConvertOut(const Integer &a) const;
-
- const Integer& MultiplicativeIdentity() const
- {return result1 = Integer::Power2(WORD_BITS*modulus.reg_.size())%modulus;}
-
- const Integer& Multiply(const Integer &a, const Integer &b) const;
-
- const Integer& Square(const Integer &a) const;
-
- const Integer& MultiplicativeInverse(const Integer &a) const;
-
- Integer CascadeExponentiate(const Integer &x, const Integer &e1,
- const Integer &y, const Integer &e2) const
- {return AbstractRing::CascadeExponentiate(x, e1, y, e2);}
-
- void SimultaneousExponentiate(Element *results, const Element &base,
- const Integer *exponents, unsigned int exponentsCount) const
- {AbstractRing::SimultaneousExponentiate(results, base,
- exponents, exponentsCount);}
-
-private:
- Integer u;
- mutable AlignedWordBlock workspace;
-};
-
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_MODARITH_HPP
diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp
deleted file mode 100644
index 71d2fd908c5..00000000000
--- a/extra/yassl/taocrypt/include/modes.hpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
- Copyright (c) 2017, 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* modes.hpp provides ECB and CBC modes for block cipher encryption/decryption
-*/
-
-
-#ifndef TAO_CRYPT_MODES_HPP
-#define TAO_CRYPT_MODES_HPP
-
-#include "misc.hpp"
-
-namespace TaoCrypt {
-
-
-enum Mode { ECB, CBC };
-
-
-
-// BlockCipher abstraction
-template<CipherDir DIR, class T, Mode MODE>
-class BlockCipher {
-public:
- BlockCipher() : cipher_(DIR, MODE) {}
-
- void Process(byte* c, const byte* p, word32 sz)
- { cipher_.Process(c, p, sz); }
- void SetKey(const byte* k, word32 sz)
- { cipher_.SetKey(k, sz, DIR); }
- void SetKey(const byte* k, word32 sz, const byte* iv)
- { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv); }
-private:
- T cipher_;
-
- BlockCipher(const BlockCipher&); // hide copy
- BlockCipher& operator=(const BlockCipher&); // and assign
-};
-
-
-// Mode Base for block ciphers, static size
-class Mode_BASE : public virtual_base {
-public:
- enum { MaxBlockSz = 16 };
-
- explicit Mode_BASE(unsigned sz, CipherDir dir, Mode mode)
- : blockSz_(sz), reg_(reinterpret_cast<byte*>(r_)),
- tmp_(reinterpret_cast<byte*>(t_)), dir_(dir), mode_(mode)
- {}
- virtual ~Mode_BASE() {}
-
- virtual void Process(byte*, const byte*, word32);
-
- void SetIV(const byte* iv) { memcpy(reg_, iv, blockSz_); }
-protected:
- unsigned blockSz_;
- byte* reg_;
- byte* tmp_;
-
- word32 r_[MaxBlockSz / sizeof(word32)]; // align reg_ on word32
- word32 t_[MaxBlockSz / sizeof(word32)]; // align tmp_ on word32
-
- CipherDir dir_;
- Mode mode_;
-
- void ECB_Process(byte*, const byte*, word32);
- void CBC_Encrypt(byte*, const byte*, word32);
- void CBC_Decrypt(byte*, const byte*, word32);
-
- Mode_BASE(const Mode_BASE&); // hide copy
- Mode_BASE& operator=(const Mode_BASE&); // and assign
-
-private:
- virtual void ProcessAndXorBlock(const byte*, const byte*, byte*) const = 0;
-};
-
-
-inline void Mode_BASE::Process(byte* out, const byte* in, word32 sz)
-{
- if (mode_ == ECB)
- ECB_Process(out, in, sz);
- else if (mode_ == CBC) {
- if (dir_ == ENCRYPTION)
- CBC_Encrypt(out, in, sz);
- else
- CBC_Decrypt(out, in, sz);
- }
-}
-
-
-// ECB Process blocks
-inline void Mode_BASE::ECB_Process(byte* out, const byte* in, word32 sz)
-{
- word32 blocks = sz / blockSz_;
-
- while (blocks--) {
- ProcessAndXorBlock(in, 0, out);
- out += blockSz_;
- in += blockSz_;
- }
-}
-
-
-// CBC Encrypt
-inline void Mode_BASE::CBC_Encrypt(byte* out, const byte* in, word32 sz)
-{
- word32 blocks = sz / blockSz_;
-
- while (blocks--) {
- xorbuf(reg_, in, blockSz_);
- ProcessAndXorBlock(reg_, 0, reg_);
- memcpy(out, reg_, blockSz_);
- out += blockSz_;
- in += blockSz_;
- }
-}
-
-
-// CBC Decrypt
-inline void Mode_BASE::CBC_Decrypt(byte* out, const byte* in, word32 sz)
-{
- word32 blocks = sz / blockSz_;
- byte hold[MaxBlockSz];
-
- while (blocks--) {
- memcpy(tmp_, in, blockSz_);
- ProcessAndXorBlock(tmp_, 0, out);
- xorbuf(out, reg_, blockSz_);
- memcpy(hold, reg_, blockSz_); // swap reg_ and tmp_
- memcpy(reg_, tmp_, blockSz_);
- memcpy(tmp_, hold, blockSz_);
- out += blockSz_;
- in += blockSz_;
- }
-}
-
-
-} // namespace
-
-#endif // TAO_CRYPT_MODES_HPP
diff --git a/extra/yassl/taocrypt/include/pwdbased.hpp b/extra/yassl/taocrypt/include/pwdbased.hpp
deleted file mode 100644
index 57495d01b50..00000000000
--- a/extra/yassl/taocrypt/include/pwdbased.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* pwdbased.hpp defines PBKDF2 from PKCS #5
-*/
-
-
-#ifndef TAO_CRYPT_PWDBASED_HPP
-#define TAO_CRYPT_PWDBASED_HPP
-
-#include <string.h>
-#include "misc.hpp"
-#include "block.hpp"
-#include "hmac.hpp"
-
-namespace TaoCrypt {
-
-
-// From PKCS #5, T must be type suitable for HMAC<T>
-template <class T>
-class PBKDF2_HMAC {
-public:
- word32 MaxDerivedKeyLength() const { return 0xFFFFFFFFU;} // avoid overflow
-
- word32 DeriveKey(byte* derived, word32 dLen, const byte* pwd, word32 pLen,
- const byte* salt, word32 sLen, word32 iterations) const;
-};
-
-
-
-template <class T>
-word32 PBKDF2_HMAC<T>::DeriveKey(byte* derived, word32 dLen, const byte* pwd,
- word32 pLen, const byte* salt, word32 sLen,
- word32 iterations) const
-{
- if (dLen > MaxDerivedKeyLength())
- return 0;
-
- ByteBlock buffer(T::DIGEST_SIZE);
- HMAC<T> hmac;
-
- hmac.SetKey(pwd, pLen);
-
- word32 i = 1;
-
- while (dLen > 0) {
- hmac.Update(salt, sLen);
- word32 j;
- for (j = 0; j < 4; j++) {
- byte b = i >> ((3-j)*8);
- hmac.Update(&b, 1);
- }
- hmac.Final(buffer.get_buffer());
-
- word32 segmentLen = min(dLen, buffer.size());
- memcpy(derived, buffer.get_buffer(), segmentLen);
-
- for (j = 1; j < iterations; j++) {
- hmac.Update(buffer.get_buffer(), buffer.size());
- hmac.Final(buffer.get_buffer());
- xorbuf(derived, buffer.get_buffer(), segmentLen);
- }
- derived += segmentLen;
- dLen -= segmentLen;
- i++;
- }
- return iterations;
-}
-
-
-
-
-} // naemspace
-
-#endif // TAO_CRYPT_PWDBASED_HPP
diff --git a/extra/yassl/taocrypt/include/rabbit.hpp b/extra/yassl/taocrypt/include/rabbit.hpp
deleted file mode 100644
index e9af478fedf..00000000000
--- a/extra/yassl/taocrypt/include/rabbit.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* rabbit.hpp defines Rabbit
-*/
-
-
-#ifndef TAO_CRYPT_RABBIT_HPP
-#define TAO_CRYPT_RABBIT_HPP
-
-#include "misc.hpp"
-
-namespace TaoCrypt {
-
-
-// Rabbit encryption and decryption
-class Rabbit {
-public:
-
- typedef Rabbit Encryption;
- typedef Rabbit Decryption;
-
- enum RabbitCtx { Master = 0, Work = 1 };
-
- Rabbit() {}
-
- void Process(byte*, const byte*, word32);
- void SetKey(const byte*, const byte*);
-private:
- struct Ctx {
- word32 x[8];
- word32 c[8];
- word32 carry;
- };
-
- Ctx masterCtx_;
- Ctx workCtx_;
-
- void NextState(RabbitCtx);
- void SetIV(const byte*);
-
- Rabbit(const Rabbit&); // hide copy
- const Rabbit operator=(const Rabbit&); // and assign
-};
-
-} // namespace
-
-
-#endif // TAO_CRYPT_RABBIT_HPP
-
diff --git a/extra/yassl/taocrypt/include/random.hpp b/extra/yassl/taocrypt/include/random.hpp
deleted file mode 100644
index 90d38de7943..00000000000
--- a/extra/yassl/taocrypt/include/random.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* random.hpp provides a crypto secure Random Number Generator using an OS
- specific seed
-*/
-
-
-#ifndef TAO_CRYPT_RANDOM_HPP
-#define TAO_CRYPT_RANDOM_HPP
-
-#include "arc4.hpp"
-#include "error.hpp"
-
-namespace TaoCrypt {
-
-
-// OS specific seeder
-class OS_Seed {
-public:
- OS_Seed();
- ~OS_Seed();
-
- void GenerateSeed(byte*, word32 sz);
- Error GetError() const { return error_; }
-private:
-#if defined(_WIN32)
- #if defined(_WIN64)
- typedef unsigned __int64 ProviderHandle;
- // type HCRYPTPROV, avoid #include <windows.h>
- #else
- typedef unsigned long ProviderHandle;
- #endif
- ProviderHandle handle_;
-#else
- int fd_;
-#endif
- Error error_;
-
- OS_Seed(const OS_Seed&); // hide copy
- OS_Seed& operator=(const OS_Seed&); // hide assign
-};
-
-
-// secure Random Nnumber Generator
-class RandomNumberGenerator {
-public:
- RandomNumberGenerator();
- ~RandomNumberGenerator() {}
-
- void GenerateBlock(byte*, word32 sz);
- byte GenerateByte();
-
- ErrorNumber GetError() const { return seed_.GetError().What(); }
-private:
- OS_Seed seed_;
- ARC4 cipher_;
-
- RandomNumberGenerator(const RandomNumberGenerator&); // hide copy
- RandomNumberGenerator operator=(const RandomNumberGenerator&); // && assign
-};
-
-
-
-
-} // namespace
-
-#endif // TAO_CRYPT_RANDOM_HPP
-
diff --git a/extra/yassl/taocrypt/include/ripemd.hpp b/extra/yassl/taocrypt/include/ripemd.hpp
deleted file mode 100644
index d50a1714232..00000000000
--- a/extra/yassl/taocrypt/include/ripemd.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* ripemd.hpp provides RIPEMD digest support
-*/
-
-#ifndef TAO_CRYPT_RIPEMD_HPP
-#define TAO_CRYPT_RIPEMD_HPP
-
-#include "hash.hpp"
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_RIPEMD_ASM
-#endif
-
-namespace TaoCrypt {
-
-
-// RIPEMD160 digest
-class RIPEMD160 : public HASHwithTransform {
-public:
- enum { BLOCK_SIZE = 64, DIGEST_SIZE = 20, PAD_SIZE = 56,
- TAO_BYTE_ORDER = LittleEndianOrder }; // in Bytes
- RIPEMD160() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
- RIPEMD160(const RIPEMD160&);
- RIPEMD160& operator= (const RIPEMD160&);
-
-#ifdef DO_RIPEMD_ASM
- void Update(const byte*, word32);
-#endif
- void Init();
- void Swap(RIPEMD160&);
-private:
- void Transform();
- void AsmTransform(const byte* data, word32 times);
-};
-
-inline void swap(RIPEMD160& a, RIPEMD160& b)
-{
- a.Swap(b);
-}
-
-
-} // namespace
-
-#endif // TAO_CRYPT_RIPEMD_HPP
-
diff --git a/extra/yassl/taocrypt/include/rsa.hpp b/extra/yassl/taocrypt/include/rsa.hpp
deleted file mode 100644
index 446752c64b6..00000000000
--- a/extra/yassl/taocrypt/include/rsa.hpp
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* rsa.hpp provides RSA ES encrypt/decrypt, SSL (block type 1) sign and verify
-*/
-
-#ifndef TAO_CRYPT_RSA_HPP
-#define TAO_CRYPT_RSA_HPP
-
-#include "integer.hpp"
-#include "random.hpp"
-
-
-namespace TaoCrypt {
-
-class Source;
-
-
-// Public Key Length helper
-class PK_Lengths {
- const Integer& image_;
-public:
- explicit PK_Lengths(const Integer& i) : image_(i) {}
-
- word32 PaddedBlockBitLength() const {return image_.BitCount() - 1;}
- word32 PaddedBlockByteLength() const
- {return BitsToBytes(PaddedBlockBitLength());}
-
- word32 FixedCiphertextLength() const {return image_.ByteCount();}
- word32 FixedMaxPlaintextLength() const
- {return SaturatingSubtract(PaddedBlockBitLength() / 8, 10U); }
-};
-
-
-// RSA Public Key
-class RSA_PublicKey {
-protected:
- Integer n_;
- Integer e_;
-public:
- RSA_PublicKey() {}
- explicit RSA_PublicKey(Source&);
-
- void Initialize(const Integer& n, const Integer& e) {n_ = n; e_ = e;}
- void Initialize(Source&);
-
- Integer ApplyFunction(const Integer& x) const;
-
- const Integer& GetModulus() const {return n_;}
- const Integer& GetPublicExponent() const {return e_;}
-
- void SetModulus(const Integer& n) {n_ = n;}
- void SetPublicExponent(const Integer& e) {e_ = e;}
-
- word32 FixedCiphertextLength()
- {
- return PK_Lengths(n_).FixedCiphertextLength();
- }
-
- RSA_PublicKey(const RSA_PublicKey& other) : n_(other.n_), e_(other.e_) {}
- RSA_PublicKey& operator=(const RSA_PublicKey& that)
- {
- RSA_PublicKey tmp(that);
- Swap(tmp);
- return *this;
- }
-
- void Swap(RSA_PublicKey& other)
- {
- n_.Swap(other.n_);
- e_.Swap(other.e_);
- }
-};
-
-
-// RSA Private Key
-class RSA_PrivateKey : public RSA_PublicKey {
- Integer d_;
- Integer p_;
- Integer q_;
- Integer dp_;
- Integer dq_;
- Integer u_;
-public:
- RSA_PrivateKey() {}
- explicit RSA_PrivateKey(Source&);
-
- void Initialize(const Integer& n, const Integer& e, const Integer& d,
- const Integer& p, const Integer& q, const Integer& dp,
- const Integer& dq, const Integer& u)
- {n_ = n; e_ = e; d_ = d; p_ = p; q_ = q; dp_ = dp; dq_ = dq; u_ = u;}
- void Initialize(Source&);
-
- Integer CalculateInverse(RandomNumberGenerator&, const Integer&) const;
-
- const Integer& GetPrime1() const {return p_;}
- const Integer& GetPrime2() const {return q_;}
- const Integer& GetPrivateExponent() const {return d_;}
- const Integer& GetModPrime1PrivateExponent() const {return dp_;}
- const Integer& GetModPrime2PrivateExponent() const {return dq_;}
- const Integer& GetMultiplicativeInverseOfPrime2ModPrime1() const
- {return u_;}
-
- void SetPrime1(const Integer& p) {p_ = p;}
- void SetPrime2(const Integer& q) {q_ = q;}
- void SetPrivateExponent(const Integer& d) {d_ = d;}
- void SetModPrime1PrivateExponent(const Integer& dp) {dp_ = dp;}
- void SetModPrime2PrivateExponent(const Integer& dq) {dq_ = dq;}
- void SetMultiplicativeInverseOfPrime2ModPrime1(const Integer& u) {u_ = u;}
-private:
- RSA_PrivateKey(const RSA_PrivateKey&); // hide copy
- RSA_PrivateKey& operator=(const RSA_PrivateKey&); // and assign
-};
-
-
-// block type 2 padding
-class RSA_BlockType2 {
-public:
- void Pad(const byte*, word32, byte*, word32,
- RandomNumberGenerator&) const;
- word32 UnPad(const byte*, word32, byte*) const;
-};
-
-
-// block type 1 padding
-class RSA_BlockType1 {
-public:
- void Pad(const byte*, word32, byte*, word32,
- RandomNumberGenerator&) const;
- word32 UnPad(const byte*, word32, byte*) const;
-};
-
-
-// RSA Encryptor, can use any padding
-template<class Pad = RSA_BlockType2>
-class RSA_Encryptor {
- const RSA_PublicKey& key_;
- Pad padding_;
-public:
- explicit RSA_Encryptor(const RSA_PublicKey& k) : key_(k) {}
-
- void Encrypt(const byte*, word32, byte*, RandomNumberGenerator&);
- bool SSL_Verify(const byte* msg, word32 sz, const byte* sig);
-};
-
-
-// RSA Decryptor, can use any padding
-template<class Pad = RSA_BlockType2>
-class RSA_Decryptor {
- const RSA_PrivateKey& key_;
- Pad padding_;
-public:
- explicit RSA_Decryptor(const RSA_PrivateKey& k) : key_(k) {}
-
- word32 Decrypt(const byte*, word32, byte*, RandomNumberGenerator&);
- void SSL_Sign(const byte*, word32, byte*, RandomNumberGenerator&);
-};
-
-
-// Public Encrypt
-template<class Pad>
-void RSA_Encryptor<Pad>::Encrypt(const byte* plain, word32 sz, byte* cipher,
- RandomNumberGenerator& rng)
-{
- PK_Lengths lengths(key_.GetModulus());
- if (sz > lengths.FixedMaxPlaintextLength())
- return;
-
- ByteBlock paddedBlock(lengths.PaddedBlockByteLength());
- padding_.Pad(plain, sz, paddedBlock.get_buffer(),
- lengths.PaddedBlockBitLength(), rng);
-
- key_.ApplyFunction(Integer(paddedBlock.get_buffer(), paddedBlock.size())).
- Encode(cipher, lengths.FixedCiphertextLength());
-}
-
-
-// Private Decrypt
-template<class Pad>
-word32 RSA_Decryptor<Pad>::Decrypt(const byte* cipher, word32 sz, byte* plain,
- RandomNumberGenerator& rng)
-{
- PK_Lengths lengths(key_.GetModulus());
-
- if (sz != lengths.FixedCiphertextLength())
- return 0;
-
- ByteBlock paddedBlock(lengths.PaddedBlockByteLength());
- Integer x = key_.CalculateInverse(rng, Integer(cipher,
- lengths.FixedCiphertextLength()).Ref());
- if (x.ByteCount() > paddedBlock.size())
- x = Integer::Zero(); // don't return false, prevents timing attack
- x.Encode(paddedBlock.get_buffer(), paddedBlock.size());
- return padding_.UnPad(paddedBlock.get_buffer(),
- lengths.PaddedBlockBitLength(), plain);
-}
-
-
-// Private SSL type (block 1) Encrypt
-template<class Pad>
-void RSA_Decryptor<Pad>::SSL_Sign(const byte* message, word32 sz, byte* sig,
- RandomNumberGenerator& rng)
-{
- RSA_PublicKey inverse;
- inverse.Initialize(key_.GetModulus(), key_.GetPrivateExponent());
- RSA_Encryptor<RSA_BlockType1> enc(inverse); // SSL Type
- enc.Encrypt(message, sz, sig, rng);
-}
-
-
-word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain);
-
-
-// Public SSL type (block 1) Decrypt
-template<class Pad>
-bool RSA_Encryptor<Pad>::SSL_Verify(const byte* message, word32 sz,
- const byte* sig)
-{
- ByteBlock plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength());
- if (SSL_Decrypt(key_, sig, plain.get_buffer()) != sz)
- return false; // not right justified or bad padding
-
- if ( (memcmp(plain.get_buffer(), message, sz)) == 0)
- return true;
- return false;
-}
-
-
-typedef RSA_Encryptor<> RSAES_Encryptor;
-typedef RSA_Decryptor<> RSAES_Decryptor;
-
-
-} // namespace
-
-#endif // TAO_CRYPT_RSA_HPP
diff --git a/extra/yassl/taocrypt/include/runtime.hpp b/extra/yassl/taocrypt/include/runtime.hpp
deleted file mode 100644
index 90f084320cb..00000000000
--- a/extra/yassl/taocrypt/include/runtime.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- Copyright (c) 2005, 2014, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* runtime.hpp provides C++ runtime support functions when building a pure C
- * version of yaSSL, user must define YASSL_PURE_C
-*/
-
-
-
-#ifndef yaSSL_NEW_HPP
-#define yaSSL_NEW_HPP
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef __sun
-
-
-// Handler for pure virtual functions
-namespace __Crun {
- static void pure_error(void)
- {
- // "Pure virtual method called, Aborted", GCC 4.2 str cmp fix
- }
-} // namespace __Crun
-
-#endif // __sun
-
-
-#if defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
-
-#if __GNUC__ > 2
-
-extern "C" {
-#if defined(DO_TAOCRYPT_KERNEL_MODE)
- #include "kernelc.hpp"
-#endif
-
-/* Disallow inline __cxa_pure_virtual() */
-static int __cxa_pure_virtual() __attribute__((noinline, used));
-static int __cxa_pure_virtual()
-{
- // oops, pure virtual called!
- return 0;
-}
-
-} // extern "C"
-
-#endif // __GNUC__ > 2
-#endif // compiler check
-#endif // yaSSL_NEW_HPP
-
diff --git a/extra/yassl/taocrypt/include/sha.hpp b/extra/yassl/taocrypt/include/sha.hpp
deleted file mode 100644
index 8b18b7a66ae..00000000000
--- a/extra/yassl/taocrypt/include/sha.hpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* sha.hpp provides SHA-1 digests, see RFC 3174
-*/
-
-#ifndef TAO_CRYPT_SHA_HPP
-#define TAO_CRYPT_SHA_HPP
-
-#include "hash.hpp"
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_SHA_ASM
-#endif
-
-namespace TaoCrypt {
-
-
-// SHA-1 digest
-class SHA : public HASHwithTransform {
-public:
- enum { BLOCK_SIZE = 64, DIGEST_SIZE = 20, PAD_SIZE = 56,
- TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes
- SHA() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
-#ifdef DO_SHA_ASM
- void Update(const byte* data, word32 len);
-#endif
- void Init();
-
- SHA(const SHA&);
- SHA& operator= (const SHA&);
-
- void Swap(SHA&);
-private:
- void Transform();
- void AsmTransform(const byte* data, word32 times);
-};
-
-
-inline void swap(SHA& a, SHA& b)
-{
- a.Swap(b);
-}
-
-// SHA-256 digest
-class SHA256 : public HASHwithTransform {
-public:
- enum { BLOCK_SIZE = 64, DIGEST_SIZE = 32, PAD_SIZE = 56,
- TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes
- SHA256() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
- void Init();
-
- SHA256(const SHA256&);
- SHA256& operator= (const SHA256&);
-
- void Swap(SHA256&);
-private:
- void Transform();
-};
-
-
-// SHA-224 digest
-class SHA224 : public HASHwithTransform {
-public:
- enum { BLOCK_SIZE = 64, DIGEST_SIZE = 28, PAD_SIZE = 56,
- TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes
- SHA224() : HASHwithTransform(SHA256::DIGEST_SIZE /sizeof(word32),BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
- void Init();
-
- SHA224(const SHA224&);
- SHA224& operator= (const SHA224&);
-
- void Swap(SHA224&);
-private:
- void Transform();
-};
-
-
-#ifdef WORD64_AVAILABLE
-
-// SHA-512 digest
-class SHA512 : public HASH64withTransform {
-public:
- enum { BLOCK_SIZE = 128, DIGEST_SIZE = 64, PAD_SIZE = 112,
- TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes
- SHA512() : HASH64withTransform(DIGEST_SIZE / sizeof(word64), BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
- void Init();
-
- SHA512(const SHA512&);
- SHA512& operator= (const SHA512&);
-
- void Swap(SHA512&);
-private:
- void Transform();
-};
-
-
-// SHA-384 digest
-class SHA384 : public HASH64withTransform {
-public:
- enum { BLOCK_SIZE = 128, DIGEST_SIZE = 48, PAD_SIZE = 112,
- TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes
- SHA384() : HASH64withTransform(SHA512::DIGEST_SIZE/ sizeof(word64),
- BLOCK_SIZE)
- { Init(); }
- ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); }
- word32 getBlockSize() const { return BLOCK_SIZE; }
- word32 getDigestSize() const { return DIGEST_SIZE; }
- word32 getPadSize() const { return PAD_SIZE; }
-
- void Init();
-
- SHA384(const SHA384&);
- SHA384& operator= (const SHA384&);
-
- void Swap(SHA384&);
-private:
- void Transform();
-};
-
-enum { MAX_SHA2_DIGEST_SIZE = 64 }; // SHA512
-
-#else
-
-enum { MAX_SHA2_DIGEST_SIZE = 32 }; // SHA256
-
-#endif // WORD64_AVAILABLE
-
-
-} // namespace
-
-
-#endif // TAO_CRYPT_SHA_HPP
-
diff --git a/extra/yassl/taocrypt/include/twofish.hpp b/extra/yassl/taocrypt/include/twofish.hpp
deleted file mode 100644
index c2b0e6f75ad..00000000000
--- a/extra/yassl/taocrypt/include/twofish.hpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* twofish.hpp defines Twofish
-*/
-
-
-#ifndef TAO_CRYPT_TWOFISH_HPP
-#define TAO_CRYPT_TWOFISH_HPP
-
-#include "misc.hpp"
-#include "modes.hpp"
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_TWOFISH_ASM
-#endif
-
-namespace TaoCrypt {
-
-enum { TWOFISH_BLOCK_SIZE = 16 };
-
-
-// Twofish encryption and decryption, see
-class Twofish : public Mode_BASE {
-public:
- enum { BLOCK_SIZE = TWOFISH_BLOCK_SIZE };
-
- Twofish(CipherDir DIR, Mode MODE)
- : Mode_BASE(BLOCK_SIZE, DIR, MODE) {}
-
-#ifdef DO_TWOFISH_ASM
- void Process(byte*, const byte*, word32);
-#endif
- void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION);
- void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); }
-private:
- static const byte q_[2][256];
- static const word32 mds_[4][256];
-
- word32 k_[40];
- word32 s_[4][256];
-
- static word32 h0(word32 x, const word32 *key, unsigned int kLen);
- static word32 h(word32 x, const word32 *key, unsigned int kLen);
-
- void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
-
- void encrypt(const byte*, const byte*, byte*) const;
- void decrypt(const byte*, const byte*, byte*) const;
-
- void AsmEncrypt(const byte* inBlock, byte* outBlock) const;
- void AsmDecrypt(const byte* inBlock, byte* outBlock) const;
-
- Twofish(const Twofish&); // hide copy
- Twofish& operator=(const Twofish&); // and assign
-};
-
-
-typedef BlockCipher<ENCRYPTION, Twofish, ECB> Twofish_ECB_Encryption;
-typedef BlockCipher<DECRYPTION, Twofish, ECB> Twofish_ECB_Decryption;
-
-typedef BlockCipher<ENCRYPTION, Twofish, CBC> Twofish_CBC_Encryption;
-typedef BlockCipher<DECRYPTION, Twofish, CBC> Twofish_CBC_Decryption;
-
-
-
-} // naemspace
-
-#endif // TAO_CRYPT_TWOFISH_HPP
-
diff --git a/extra/yassl/taocrypt/include/type_traits.hpp b/extra/yassl/taocrypt/include/type_traits.hpp
deleted file mode 100644
index f85ae552c18..00000000000
--- a/extra/yassl/taocrypt/include/type_traits.hpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* type_traits defines fundamental types
- * see discussion in C++ Templates, $19.1
-*/
-
-
-#ifndef TAO_CRYPT_TYPE_TRAITS_HPP
-#define TAO_CRYPT_TYPE_TRAITS_HPP
-
-#include "types.hpp"
-
-namespace TaoCrypt {
-
-
-// primary template: in general T is not a fundamental type
-
-template <typename T>
-class IsFundamentalType {
- public:
- enum { Yes = 0, No = 1 };
-};
-
-
-// macro to specialize for fundamental types
-#define MK_FUNDAMENTAL_TYPE(T) \
- template<> class IsFundamentalType<T> { \
- public: \
- enum { Yes = 1, No = 0 }; \
- };
-
-
-MK_FUNDAMENTAL_TYPE(void)
-
-MK_FUNDAMENTAL_TYPE(bool)
-MK_FUNDAMENTAL_TYPE( char)
-MK_FUNDAMENTAL_TYPE(signed char)
-MK_FUNDAMENTAL_TYPE(unsigned char)
-
-MK_FUNDAMENTAL_TYPE(signed short)
-MK_FUNDAMENTAL_TYPE(unsigned short)
-MK_FUNDAMENTAL_TYPE(signed int)
-MK_FUNDAMENTAL_TYPE(unsigned int)
-MK_FUNDAMENTAL_TYPE(signed long)
-MK_FUNDAMENTAL_TYPE(unsigned long)
-
-MK_FUNDAMENTAL_TYPE(float)
-MK_FUNDAMENTAL_TYPE( double)
-MK_FUNDAMENTAL_TYPE(long double)
-
-#if defined(WORD64_AVAILABLE) && defined(WORD64_IS_DISTINCT_TYPE)
- MK_FUNDAMENTAL_TYPE(word64)
-#endif
-
-
-#undef MK_FUNDAMENTAL_TYPE
-
-
-} // namespace
-
-#endif // TAO_CRYPT_TYPE_TRAITS_HPP
diff --git a/extra/yassl/taocrypt/include/types.hpp b/extra/yassl/taocrypt/include/types.hpp
deleted file mode 100644
index 97136970e13..00000000000
--- a/extra/yassl/taocrypt/include/types.hpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's misc.h from CryptoPP, basic crypt types */
-
-
-#ifndef TAO_CRYPT_TYPES_HPP
-#define TAO_CRYPT_TYPES_HPP
-
-#ifdef HAVE_CONFIG_H
- #include "config.h"
-#endif
-
-namespace TaoCrypt {
-
-
-#if defined(WORDS_BIGENDIAN) || (defined(__MWERKS__) && !defined(__INTEL__))
- #define BIG_ENDIAN_ORDER
-#endif
-
-#ifndef BIG_ENDIAN_ORDER
- #define LITTLE_ENDIAN_ORDER
-#endif
-
-
-typedef unsigned char byte;
-typedef unsigned short word16;
-typedef unsigned int word32;
-
-#if defined(_MSC_VER) || defined(__BCPLUSPLUS__)
- #define WORD64_AVAILABLE
- #define WORD64_IS_DISTINCT_TYPE
- typedef unsigned __int64 word64;
- #define W64LIT(x) x##ui64
-#elif SIZEOF_LONG == 8
- #define WORD64_AVAILABLE
- typedef unsigned long word64;
- #define W64LIT(x) x##LL
-#elif SIZEOF_LONG_LONG == 8
- #define WORD64_AVAILABLE
- #define WORD64_IS_DISTINCT_TYPE
- typedef unsigned long long word64;
- #define W64LIT(x) x##LL
-#endif
-
-
-// compilers we've found 64-bit multiply insructions for
-#if defined(__GNUC__) || defined(_MSC_VER) || defined(__DECCXX)
- #if !(defined(__ICC) || defined(__INTEL_COMPILER))
- #define HAVE_64_MULTIPLY
- #endif
-#endif
-
-
-#if defined(HAVE_64_MULTIPLY) && (defined(__alpha__) || defined(__ia64__) \
- || defined(_ARCH_PPC64) || defined(__mips64) || defined(__x86_64__) \
- || defined(_M_X64) || defined(_M_IA64))
-// These platforms have 64-bit CPU registers. Unfortunately most C++ compilers
-// don't allow any way to access the 64-bit by 64-bit multiply instruction
-// without using assembly, so in order to use word64 as word, the assembly
-// instruction must be defined in Dword::Multiply().
- typedef word32 hword;
- typedef word64 word;
-#else
- #define TAOCRYPT_NATIVE_DWORD_AVAILABLE
- #ifdef WORD64_AVAILABLE
- #define TAOCRYPT_SLOW_WORD64
- typedef word16 hword;
- typedef word32 word;
- typedef word64 dword;
- #else
- typedef byte hword;
- typedef word16 word;
- typedef word32 dword;
- #endif
-#endif
-
-const word32 WORD_SIZE = sizeof(word);
-const word32 WORD_BITS = WORD_SIZE * 8;
-
-
-} // namespace
-
-#endif // TAO_CRYPT_TYPES_HPP
diff --git a/extra/yassl/taocrypt/mySTL/algorithm.hpp b/extra/yassl/taocrypt/mySTL/algorithm.hpp
deleted file mode 100644
index 06731525bf1..00000000000
--- a/extra/yassl/taocrypt/mySTL/algorithm.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL algorithm implements max, min, for_each, swap, find_if, copy,
- * copy_backward, fill
- */
-
-#ifndef mySTL_ALGORITHM_HPP
-#define mySTL_ALGORITHM_HPP
-
-
-namespace mySTL {
-
-
-template<typename T>
-inline const T& max(const T& a, const T&b)
-{
- return a < b ? b : a;
-}
-
-
-template<typename T>
-inline const T& min(const T& a, const T&b)
-{
- return b < a ? b : a;
-}
-
-
-template<typename InIter, typename Func>
-Func for_each(InIter first, InIter last, Func op)
-{
- while (first != last) {
- op(*first);
- ++first;
- }
- return op;
-}
-
-
-template<typename T>
-inline void swap(T& a, T& b)
-{
- T tmp = a;
- a = b;
- b = tmp;
-}
-
-
-template<typename InIter, typename Pred>
-InIter find_if(InIter first, InIter last, Pred pred)
-{
- while (first != last && !pred(*first))
- ++first;
- return first;
-}
-
-
-template<typename InputIter, typename OutputIter>
-inline OutputIter copy(InputIter first, InputIter last, OutputIter place)
-{
- while (first != last) {
- *place = *first;
- ++first;
- ++place;
- }
- return place;
-}
-
-
-template<typename InputIter, typename OutputIter>
-inline OutputIter
-copy_backward(InputIter first, InputIter last, OutputIter place)
-{
- while (first != last)
- *--place = *--last;
- return place;
-}
-
-
-template<typename InputIter, typename T>
-void fill(InputIter first, InputIter last, const T& v)
-{
- while (first != last) {
- *first = v;
- ++first;
- }
-}
-
-
-} // namespace mySTL
-
-#endif // mySTL_ALGORITHM_HPP
diff --git a/extra/yassl/taocrypt/mySTL/helpers.hpp b/extra/yassl/taocrypt/mySTL/helpers.hpp
deleted file mode 100644
index ec9266ddf2a..00000000000
--- a/extra/yassl/taocrypt/mySTL/helpers.hpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL helpers implements misc constructs for vector and list
- *
- */
-
-#ifndef mySTL_HELPERS_HPP
-#define mySTL_HELPERS_HPP
-
-#include <stdlib.h>
-#ifdef _MSC_VER
- #include <new>
-#endif
-
-/*
- Workaround for the lack of operator new(size_t, void*)
- in IBM VA C++ 6.0
- Also used as a workaround to avoid including <new>
-*/
- struct Dummy {};
-
- inline void* operator new(size_t size, Dummy* d)
- {
- return static_cast<void*>(d);
- }
-
- // for compilers that want matching delete
- inline void operator delete(void* ptr, Dummy* d)
- {
- }
-
- typedef Dummy* yassl_pointer;
-
-namespace mySTL {
-
-
-template <typename T, typename T2>
-inline void construct(T* p, const T2& value)
-{
- new (reinterpret_cast<yassl_pointer>(p)) T(value);
-}
-
-
-template <typename T>
-inline void construct(T* p)
-{
- new (reinterpret_cast<yassl_pointer>(p)) T();
-}
-
-
-template <typename T>
-inline void destroy(T* p)
-{
- p->~T();
-}
-
-
-template <typename Iter>
-void destroy(Iter first, Iter last)
-{
- while (first != last) {
- destroy(&*first);
- ++first;
- }
-}
-
-
-template <typename Iter, typename PlaceIter>
-PlaceIter uninit_copy(Iter first, Iter last, PlaceIter place)
-{
- while (first != last) {
- construct(&*place, *first);
- ++first;
- ++place;
- }
- return place;
-}
-
-
-template <typename PlaceIter, typename Size, typename T>
-PlaceIter uninit_fill_n(PlaceIter place, Size n, const T& value)
-{
- while (n) {
- construct(&*place, value);
- --n;
- ++place;
- }
- return place;
-}
-
-
-template <typename T>
-T* GetArrayMemory(size_t items)
-{
- unsigned char* ret;
-
- #ifdef YASSL_LIB
- ret = NEW_YS unsigned char[sizeof(T) * items];
- #else
- ret = NEW_TC unsigned char[sizeof(T) * items];
- #endif
-
- return reinterpret_cast<T*>(ret);
-}
-
-
-template <typename T>
-void FreeArrayMemory(T* ptr)
-{
- unsigned char* p = reinterpret_cast<unsigned char*>(ptr);
-
- #ifdef YASSL_LIB
- yaSSL::ysArrayDelete(p);
- #else
- TaoCrypt::tcArrayDelete(p);
- #endif
-}
-
-
-
-inline void* GetMemory(size_t bytes)
-{
- return GetArrayMemory<unsigned char>(bytes);
-}
-
-
-inline void FreeMemory(void* ptr)
-{
- FreeArrayMemory(ptr);
-}
-
-
-
-} // namespace mySTL
-
-#endif // mySTL_HELPERS_HPP
diff --git a/extra/yassl/taocrypt/mySTL/list.hpp b/extra/yassl/taocrypt/mySTL/list.hpp
deleted file mode 100644
index c71ebc8def5..00000000000
--- a/extra/yassl/taocrypt/mySTL/list.hpp
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL list implements a simple list
- *
- */
-
-#ifndef mySTL_LIST_HPP
-#define mySTL_LIST_HPP
-
-
-#include "helpers.hpp"
-
-
-namespace mySTL {
-
-
-
-template<typename T>
-class list {
-
-#ifdef __SUNPRO_CC
-/*
- Sun Forte 7 C++ v. 5.4 needs class 'node' public to be visible to
- the nested class 'iterator' (a non-standard behaviour).
-*/
-public:
-#endif
-
- struct node {
- node(T t) : prev_(0), next_(0), value_(t) {}
-
- node* prev_;
- node* next_;
- T value_;
- };
-public:
- list() : head_(0), tail_(0), sz_(0) {}
- ~list();
-
- void push_front(T);
- void pop_front();
- T front() const;
- void push_back(T);
- void pop_back();
- T back() const;
- bool remove(T);
- size_t size() const { return sz_; }
- bool empty() const { return sz_ == 0; }
-
- class iterator {
- node* current_;
- public:
- explicit iterator(node* p = 0) : current_(p) {}
-
- T& operator*() const
- {
- return current_->value_;
- }
-
- T* operator->() const
- {
- return &(operator*());
- }
-
- iterator& operator++()
- {
- current_ = current_->next_;
- return *this;
- }
-
- iterator& operator--()
- {
- current_ = current_->prev_;
- return *this;
- }
-
- iterator operator++(int)
- {
- iterator tmp = *this;
- current_ = current_->next_;
- return tmp;
- }
-
- iterator operator--(int)
- {
- iterator tmp = *this;
- current_ = current_->prev_;
- return tmp;
- }
-
- bool operator==(const iterator& other) const
- {
- return current_ == other.current_;
- }
-
- bool operator!=(const iterator& other) const
- {
- return current_ != other.current_;
- }
-
- friend class list<T>;
- };
-
-
- class reverse_iterator {
- node* current_;
- public:
- explicit reverse_iterator(node* p = 0) : current_(p) {}
-
- T& operator*() const
- {
- return current_->value_;
- }
-
- T* operator->() const
- {
- return &(operator*());
- }
-
- reverse_iterator& operator++()
- {
- current_ = current_->prev_;
- return *this;
- }
-
- reverse_iterator& operator--()
- {
- current_ = current_->next_;
- return *this;
- }
-
- reverse_iterator operator++(int)
- {
- reverse_iterator tmp = *this;
- current_ = current_->prev_;
- return tmp;
- }
-
- reverse_iterator operator--(int)
- {
- reverse_iterator tmp = *this;
- current_ = current_->next_;
- return tmp;
- }
-
- bool operator==(const reverse_iterator& other) const
- {
- return current_ == other.current_;
- }
-
- bool operator!=(const reverse_iterator& other) const
- {
- return current_ != other.current_;
- }
-
- friend class list<T>;
- };
-
- bool erase(iterator);
-
- iterator begin() const { return iterator(head_); }
- reverse_iterator rbegin() const { return reverse_iterator(tail_); }
- iterator end() const { return iterator(); }
- reverse_iterator rend() const { return reverse_iterator(); }
-
- typedef iterator const_iterator; // for now
-
- class underflow {};
- class overflow {};
-private:
- node* head_;
- node* tail_;
- size_t sz_;
-
- node* look_up(T);
-
- list(const list&); // hide copy
- list& operator=(const list&); // and assign
-};
-
-
-template<typename T>
-list<T>::~list()
-{
- node* start = head_;
- node* next_;
-
- for (; start; start = next_) {
- next_ = start->next_;
- destroy(start);
- FreeMemory(start);
- }
-}
-
-
-template<typename T>
-void list<T>::push_front(T t)
-{
- void* mem = GetMemory(sizeof(node));
- node* add = new (reinterpret_cast<yassl_pointer>(mem)) node(t);
-
- if (head_) {
- add->next_ = head_;
- head_->prev_ = add;
- }
- else
- tail_ = add;
-
- head_ = add;
- ++sz_;
-}
-
-
-template<typename T>
-void list<T>::pop_front()
-{
- node* front = head_;
-
- if (head_ == 0)
- return;
- else if (head_ == tail_)
- head_ = tail_ = 0;
- else {
- head_ = head_->next_;
- head_->prev_ = 0;
- }
- destroy(front);
- FreeMemory(front);
- --sz_;
-}
-
-
-template<typename T>
-T list<T>::front() const
-{
- if (head_ == 0) return T();
- return head_->value_;
-}
-
-
-template<typename T>
-void list<T>::push_back(T t)
-{
- void* mem = GetMemory(sizeof(node));
- node* add = new (reinterpret_cast<yassl_pointer>(mem)) node(t);
-
- if (tail_) {
- tail_->next_ = add;
- add->prev_ = tail_;
- }
- else
- head_ = add;
-
- tail_ = add;
- ++sz_;
-}
-
-
-template<typename T>
-void list<T>::pop_back()
-{
- node* rear = tail_;
-
- if (tail_ == 0)
- return;
- else if (tail_ == head_)
- tail_ = head_ = 0;
- else {
- tail_ = tail_->prev_;
- tail_->next_ = 0;
- }
- destroy(rear);
- FreeMemory(rear);
- --sz_;
-}
-
-
-template<typename T>
-T list<T>::back() const
-{
- if (tail_ == 0) return T();
- return tail_->value_;
-}
-
-
-template<typename T>
-typename list<T>::node* list<T>::look_up(T t)
-{
- node* list = head_;
-
- if (list == 0) return 0;
-
- for (; list; list = list->next_)
- if (list->value_ == t)
- return list;
-
- return 0;
-}
-
-
-template<typename T>
-bool list<T>::remove(T t)
-{
- node* del = look_up(t);
-
- if (del == 0)
- return false;
- else if (del == head_)
- pop_front();
- else if (del == tail_)
- pop_back();
- else {
- del->prev_->next_ = del->next_;
- del->next_->prev_ = del->prev_;
-
- destroy(del);
- FreeMemory(del);
- --sz_;
- }
- return true;
-}
-
-
-template<typename T>
-bool list<T>::erase(iterator iter)
-{
- node* del = iter.current_;
-
- if (del == 0)
- return false;
- else if (del == head_)
- pop_front();
- else if (del == tail_)
- pop_back();
- else {
- del->prev_->next_ = del->next_;
- del->next_->prev_ = del->prev_;
-
- destroy(del);
- FreeMemory(del);
- --sz_;
- }
- return true;
-}
-
-
-
-} // namespace mySTL
-
-#endif // mySTL_LIST_HPP
diff --git a/extra/yassl/taocrypt/mySTL/memory.hpp b/extra/yassl/taocrypt/mySTL/memory.hpp
deleted file mode 100644
index fdd34cda125..00000000000
--- a/extra/yassl/taocrypt/mySTL/memory.hpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL memory implements auto_ptr
- *
- */
-
-#ifndef mySTL_MEMORY_HPP
-#define mySTL_MEMORY_HPP
-
-#include "memory_array.hpp" // for auto_array
-
-#ifdef _MSC_VER
- // disable operator-> warning for builtins
- #pragma warning(disable:4284)
-#endif
-
-
-namespace mySTL {
-
-
-template<typename T>
-struct auto_ptr_ref {
- T* ptr_;
- explicit auto_ptr_ref(T* p) : ptr_(p) {}
-};
-
-
-template<typename T>
-class auto_ptr {
- T* ptr_;
-
- void Destroy()
- {
- #ifdef YASSL_LIB
- yaSSL::ysDelete(ptr_);
- #else
- TaoCrypt::tcDelete(ptr_);
- #endif
- }
-public:
- explicit auto_ptr(T* p = 0) : ptr_(p) {}
-
- ~auto_ptr()
- {
- Destroy();
- }
-
-
- auto_ptr(auto_ptr& other) : ptr_(other.release()) {}
-
- auto_ptr& operator=(auto_ptr& that)
- {
- if (this != &that) {
- Destroy();
- ptr_ = that.release();
- }
- return *this;
- }
-
-
- T* operator->() const
- {
- return ptr_;
- }
-
- T& operator*() const
- {
- return *ptr_;
- }
-
- T* get() const
- {
- return ptr_;
- }
-
- T* release()
- {
- T* tmp = ptr_;
- ptr_ = 0;
- return tmp;
- }
-
- void reset(T* p = 0)
- {
- if (ptr_ != p) {
- Destroy();
- ptr_ = p;
- }
- }
-
- // auto_ptr_ref conversions
- auto_ptr(auto_ptr_ref<T> ref) : ptr_(ref.ptr_) {}
-
- auto_ptr& operator=(auto_ptr_ref<T> ref)
- {
- if (this->ptr_ != ref.ptr_) {
- Destroy();
- ptr_ = ref.ptr_;
- }
- return *this;
- }
-
- template<typename T2>
- operator auto_ptr<T2>()
- {
- return auto_ptr<T2>(this->release());
- }
-
- template<typename T2>
- operator auto_ptr_ref<T2>()
- {
- return auto_ptr_ref<T2>(this->release());
- }
-};
-
-
-} // namespace mySTL
-
-#endif // mySTL_MEMORY_HPP
diff --git a/extra/yassl/taocrypt/mySTL/memory_array.hpp b/extra/yassl/taocrypt/mySTL/memory_array.hpp
deleted file mode 100644
index af4c2cdf232..00000000000
--- a/extra/yassl/taocrypt/mySTL/memory_array.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL memory_arry implements auto_array
- *
- */
-
-#ifndef mySTL_MEMORY_ARRAY_HPP
-#define mySTL_MEMORY_ARRAY_HPP
-
-
-#ifdef _MSC_VER
- // disable operator-> warning for builtins
- #pragma warning(disable:4284)
-#endif
-
-
-namespace mySTL {
-
-
-template<typename T>
-struct auto_array_ref {
- T* ptr_;
- explicit auto_array_ref(T* p) : ptr_(p) {}
-};
-
-
-template<typename T>
-class auto_array {
- T* ptr_;
-
- void Destroy()
- {
- #ifdef YASSL_LIB
- yaSSL::ysArrayDelete(ptr_);
- #else
- TaoCrypt::tcArrayDelete(ptr_);
- #endif
- }
-public:
- explicit auto_array(T* p = 0) : ptr_(p) {}
-
- ~auto_array()
- {
- Destroy();
- }
-
-
- auto_array(auto_array& other) : ptr_(other.release()) {}
-
- auto_array& operator=(auto_array& that)
- {
- if (this != &that) {
- Destroy();
- ptr_ = that.release();
- }
- return *this;
- }
-
-
- T* operator->() const
- {
- return ptr_;
- }
-
- T& operator*() const
- {
- return *ptr_;
- }
-
- T* get() const
- {
- return ptr_;
- }
-
- T* release()
- {
- T* tmp = ptr_;
- ptr_ = 0;
- return tmp;
- }
-
- void reset(T* p = 0)
- {
- if (ptr_ != p) {
- Destroy();
- ptr_ = p;
- }
- }
-
- // auto_array_ref conversions
- auto_array(auto_array_ref<T> ref) : ptr_(ref.ptr_) {}
-
- auto_array& operator=(auto_array_ref<T> ref)
- {
- if (this->ptr_ != ref.ptr_) {
- Destroy();
- ptr_ = ref.ptr_;
- }
- return *this;
- }
-
- template<typename T2>
- operator auto_array<T2>()
- {
- return auto_array<T2>(this->release());
- }
-
- template<typename T2>
- operator auto_array_ref<T2>()
- {
- return auto_array_ref<T2>(this->release());
- }
-};
-
-
-} // namespace mySTL
-
-#endif // mySTL_MEMORY_ARRAY_HPP
diff --git a/extra/yassl/taocrypt/mySTL/pair.hpp b/extra/yassl/taocrypt/mySTL/pair.hpp
deleted file mode 100644
index 9dd97f63bfa..00000000000
--- a/extra/yassl/taocrypt/mySTL/pair.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL pair implements pair
- *
- */
-
-#ifndef mySTL_PAIR_HPP
-#define mySTL_PAIR_HPP
-
-
-
-namespace mySTL {
-
-
-template<typename T1, typename T2>
-struct pair {
- typedef T1 first_type;
- typedef T2 second_type;
-
- first_type first;
- second_type second;
-
- pair() {}
- pair(const T1& t1, const T2& t2) : first(t1), second(t2) {}
-
- template<typename U1, typename U2>
- pair(const pair<U1, U2>& p) : first(p.first), second(p.second) {}
-};
-
-
-template<typename T1, typename T2>
-inline pair<T1, T2> make_pair(const T1& a, const T2& b)
-{
- return pair<T1, T2>(a, b);
-}
-
-
-
-} // namespace mySTL
-
-#endif // mySTL_PAIR_HPP
diff --git a/extra/yassl/taocrypt/mySTL/stdexcept.hpp b/extra/yassl/taocrypt/mySTL/stdexcept.hpp
deleted file mode 100644
index 8c12b51e130..00000000000
--- a/extra/yassl/taocrypt/mySTL/stdexcept.hpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL memory implements exception, runtime_error
- *
- */
-
-#ifndef mySTL_STDEXCEPT_HPP
-#define mySTL_STDEXCEPT_HPP
-
-
-#include <string.h> // strncpy
-#include <stdlib.h> // size_t
-
-
-namespace mySTL {
-
-
-class exception {
-public:
- exception() {}
- virtual ~exception() {} // to shut up compiler warnings
-
- virtual const char* what() const { return ""; }
-
- // for compiler generated call, never used
- static void operator delete(void*) { }
-private:
- // don't allow dynamic creation of exceptions
- static void* operator new(size_t);
-};
-
-
-class named_exception : public exception {
-public:
- enum { NAME_SIZE = 80 };
-
- explicit named_exception(const char* str)
- {
- strncpy(name_, str, NAME_SIZE);
- name_[NAME_SIZE - 1] = 0;
- }
-
- virtual const char* what() const { return name_; }
-private:
- char name_[NAME_SIZE];
-};
-
-
-class runtime_error : public named_exception {
-public:
- explicit runtime_error(const char* str) : named_exception(str) {}
-};
-
-
-
-
-} // namespace mySTL
-
-#endif // mySTL_STDEXCEPT_HPP
diff --git a/extra/yassl/taocrypt/mySTL/vector.hpp b/extra/yassl/taocrypt/mySTL/vector.hpp
deleted file mode 100644
index 0abcf910baf..00000000000
--- a/extra/yassl/taocrypt/mySTL/vector.hpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* mySTL vector implements simple vector, w/ swap
- *
- */
-
-#ifndef mySTL_VECTOR_HPP
-#define mySTL_VECTOR_HPP
-
-#include "helpers.hpp" // construct, destory, fill, etc.
-#include "algorithm.hpp" // swap
-
-
-namespace mySTL {
-
-
-template <typename T>
-struct vector_base {
- T* start_;
- T* finish_;
- T* end_of_storage_;
-
- vector_base() : start_(0), finish_(0), end_of_storage_(0) {}
- vector_base(size_t n)
- {
- start_ = GetArrayMemory<T>(n);
- finish_ = start_;
- end_of_storage_ = start_ + n;
- }
-
- ~vector_base()
- {
- FreeArrayMemory(start_);
- }
-
- void Swap(vector_base& that)
- {
- swap(start_, that.start_);
- swap(finish_, that.finish_);
- swap(end_of_storage_, that.end_of_storage_);
- }
-};
-
-
-
-template <typename T>
-class vector {
-public:
- typedef T* iterator;
- typedef const T* const_iterator;
-
- vector() {}
- explicit vector(size_t n) : vec_(n)
- {
- vec_.finish_ = uninit_fill_n(vec_.start_, n, T());
- }
-
- ~vector() { destroy(vec_.start_, vec_.finish_); }
-
- vector(const vector& other) : vec_(other.size())
- {
- vec_.finish_ = uninit_copy(other.vec_.start_, other.vec_.finish_,
- vec_.start_);
- }
-
- size_t capacity() const { return vec_.end_of_storage_ - vec_.start_; }
-
- size_t size() const { return vec_.finish_ - vec_.start_; }
-
- T& operator[](size_t idx) { return *(vec_.start_ + idx); }
- const T& operator[](size_t idx) const { return *(vec_.start_ + idx); }
-
- const T* begin() const { return vec_.start_; }
- const T* end() const { return vec_.finish_; }
-
- void push_back(const T& v)
- {
- if (vec_.finish_ != vec_.end_of_storage_) {
- construct(vec_.finish_, v);
- ++vec_.finish_;
- }
- else {
- vector tmp(size() * 2 + 1, *this);
- construct(tmp.vec_.finish_, v);
- ++tmp.vec_.finish_;
- Swap(tmp);
- }
- }
-
- void resize(size_t n, const T& v)
- {
- if (n == size()) return;
-
- if (n < size()) {
- T* first = vec_.start_ + n;
- destroy(first, vec_.finish_);
- vec_.finish_ -= vec_.finish_ - first;
- }
- else {
- vector tmp(n, *this);
- tmp.vec_.finish_ = uninit_fill_n(tmp.vec_.finish_, n - size(), v);
- Swap(tmp);
- }
- }
-
- void reserve(size_t n)
- {
- if (capacity() < n) {
- vector tmp(n, *this);
- Swap(tmp);
- }
- }
-
- void Swap(vector& that)
- {
- vec_.Swap(that.vec_);
- }
-private:
- vector_base<T> vec_;
-
- vector& operator=(const vector&); // hide assign
-
- // for growing, n must be bigger than other size
- vector(size_t n, const vector& other) : vec_(n)
- {
- if (n > other.size())
- vec_.finish_ = uninit_copy(other.vec_.start_, other.vec_.finish_,
- vec_.start_);
- }
-};
-
-
-
-} // namespace mySTL
-
-#endif // mySTL_VECTOR_HPP
diff --git a/extra/yassl/taocrypt/src/aes.cpp b/extra/yassl/taocrypt/src/aes.cpp
deleted file mode 100644
index 4e4ea849c21..00000000000
--- a/extra/yassl/taocrypt/src/aes.cpp
+++ /dev/null
@@ -1,1885 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* C++ based on Wei Dai's aes.cpp from CryptoPP */
-/* x86 asm original */
-
-#if defined(TAOCRYPT_KERNEL_MODE)
- #define DO_TAOCRYPT_KERNEL_MODE
-#endif // only some modules now support this
-
-#include "runtime.hpp"
-#include "aes.hpp"
-
-
-namespace TaoCrypt {
-
-
-#if defined(DO_AES_ASM)
-
-// ia32 optimized version
-void AES::Process(byte* out, const byte* in, word32 sz)
-{
- if (!isMMX) {
- Mode_BASE::Process(out, in, sz);
- return;
- }
-
- word32 blocks = sz / BLOCK_SIZE;
-
- if (mode_ == ECB)
- while (blocks--) {
- if (dir_ == ENCRYPTION)
- AsmEncrypt(in, out, (void*)Te0);
- else
- AsmDecrypt(in, out, (void*)Td0);
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- else if (mode_ == CBC) {
- if (dir_ == ENCRYPTION) {
- while (blocks--) {
- r_[0] ^= *(word32*)in;
- r_[1] ^= *(word32*)(in + 4);
- r_[2] ^= *(word32*)(in + 8);
- r_[3] ^= *(word32*)(in + 12);
-
- AsmEncrypt((byte*)r_, (byte*)r_, (void*)Te0);
-
- memcpy(out, r_, BLOCK_SIZE);
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- }
- else {
- while (blocks--) {
- AsmDecrypt(in, out, (void*)Td0);
-
- *(word32*)out ^= r_[0];
- *(word32*)(out + 4) ^= r_[1];
- *(word32*)(out + 8) ^= r_[2];
- *(word32*)(out + 12) ^= r_[3];
-
- memcpy(r_, in, BLOCK_SIZE);
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- }
- }
-}
-
-#endif // DO_AES_ASM
-
-
-void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/)
-{
- if (keylen <= 16)
- keylen = 16;
- else if (keylen >= 32)
- keylen = 32;
- else if (keylen != 24)
- keylen = 24;
-
- rounds_ = keylen/4 + 6;
-
- word32 temp, *rk = key_;
- unsigned int i=0;
-
- GetUserKey(BigEndianOrder, rk, keylen/4, userKey, keylen);
-
- switch(keylen)
- {
- case 16:
- while (true)
- {
- temp = rk[3];
- rk[4] = rk[0] ^
- (Te2[GETBYTE(temp, 2)] & 0xff000000) ^
- (Te3[GETBYTE(temp, 1)] & 0x00ff0000) ^
- (Te0[GETBYTE(temp, 0)] & 0x0000ff00) ^
- (Te1[GETBYTE(temp, 3)] & 0x000000ff) ^
- rcon_[i];
- rk[5] = rk[1] ^ rk[4];
- rk[6] = rk[2] ^ rk[5];
- rk[7] = rk[3] ^ rk[6];
- if (++i == 10)
- break;
- rk += 4;
- }
- break;
-
- case 24:
- while (true) // for (;;) here triggers a bug in VC60 SP4 w/ Pro Pack
- {
- temp = rk[ 5];
- rk[ 6] = rk[ 0] ^
- (Te2[GETBYTE(temp, 2)] & 0xff000000) ^
- (Te3[GETBYTE(temp, 1)] & 0x00ff0000) ^
- (Te0[GETBYTE(temp, 0)] & 0x0000ff00) ^
- (Te1[GETBYTE(temp, 3)] & 0x000000ff) ^
- rcon_[i];
- rk[ 7] = rk[ 1] ^ rk[ 6];
- rk[ 8] = rk[ 2] ^ rk[ 7];
- rk[ 9] = rk[ 3] ^ rk[ 8];
- if (++i == 8)
- break;
- rk[10] = rk[ 4] ^ rk[ 9];
- rk[11] = rk[ 5] ^ rk[10];
- rk += 6;
- }
- break;
-
- case 32:
- while (true)
- {
- temp = rk[ 7];
- rk[ 8] = rk[ 0] ^
- (Te2[GETBYTE(temp, 2)] & 0xff000000) ^
- (Te3[GETBYTE(temp, 1)] & 0x00ff0000) ^
- (Te0[GETBYTE(temp, 0)] & 0x0000ff00) ^
- (Te1[GETBYTE(temp, 3)] & 0x000000ff) ^
- rcon_[i];
- rk[ 9] = rk[ 1] ^ rk[ 8];
- rk[10] = rk[ 2] ^ rk[ 9];
- rk[11] = rk[ 3] ^ rk[10];
- if (++i == 7)
- break;
- temp = rk[11];
- rk[12] = rk[ 4] ^
- (Te2[GETBYTE(temp, 3)] & 0xff000000) ^
- (Te3[GETBYTE(temp, 2)] & 0x00ff0000) ^
- (Te0[GETBYTE(temp, 1)] & 0x0000ff00) ^
- (Te1[GETBYTE(temp, 0)] & 0x000000ff);
- rk[13] = rk[ 5] ^ rk[12];
- rk[14] = rk[ 6] ^ rk[13];
- rk[15] = rk[ 7] ^ rk[14];
-
- rk += 8;
- }
- break;
- }
-
- if (dir_ == DECRYPTION)
- {
- unsigned int i, j;
- rk = key_;
-
- /* invert the order of the round keys: */
- for (i = 0, j = 4*rounds_; i < j; i += 4, j -= 4) {
- temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp;
- temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp;
- temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp;
- temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp;
- }
- // apply the inverse MixColumn transform to all round keys but the
- // first and the last:
- for (i = 1; i < rounds_; i++) {
- rk += 4;
- rk[0] =
- Td0[Te1[GETBYTE(rk[0], 3)] & 0xff] ^
- Td1[Te1[GETBYTE(rk[0], 2)] & 0xff] ^
- Td2[Te1[GETBYTE(rk[0], 1)] & 0xff] ^
- Td3[Te1[GETBYTE(rk[0], 0)] & 0xff];
- rk[1] =
- Td0[Te1[GETBYTE(rk[1], 3)] & 0xff] ^
- Td1[Te1[GETBYTE(rk[1], 2)] & 0xff] ^
- Td2[Te1[GETBYTE(rk[1], 1)] & 0xff] ^
- Td3[Te1[GETBYTE(rk[1], 0)] & 0xff];
- rk[2] =
- Td0[Te1[GETBYTE(rk[2], 3)] & 0xff] ^
- Td1[Te1[GETBYTE(rk[2], 2)] & 0xff] ^
- Td2[Te1[GETBYTE(rk[2], 1)] & 0xff] ^
- Td3[Te1[GETBYTE(rk[2], 0)] & 0xff];
- rk[3] =
- Td0[Te1[GETBYTE(rk[3], 3)] & 0xff] ^
- Td1[Te1[GETBYTE(rk[3], 2)] & 0xff] ^
- Td2[Te1[GETBYTE(rk[3], 1)] & 0xff] ^
- Td3[Te1[GETBYTE(rk[3], 0)] & 0xff];
- }
- }
-}
-
-
-void AES::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) const
-{
- if (dir_ == ENCRYPTION)
- encrypt(in, xOr, out);
- else
- decrypt(in, xOr, out);
-}
-
-
-typedef BlockGetAndPut<word32, BigEndian> gpBlock;
-
-
-void AES::encrypt(const byte* inBlock, const byte* xorBlock,
- byte* outBlock) const
-{
- word32 s0, s1, s2, s3;
- word32 t0, t1, t2, t3;
-
- const word32 *rk = key_;
- /*
- * map byte array block to cipher state
- * and add initial round key:
- */
- gpBlock::Get(inBlock)(s0)(s1)(s2)(s3);
- s0 ^= rk[0];
- s1 ^= rk[1];
- s2 ^= rk[2];
- s3 ^= rk[3];
-
- s0 |= PreFetchTe();
- /*
- * Nr - 1 full rounds:
- */
-
- unsigned int r = rounds_ >> 1;
- for (;;) {
- t0 =
- Te0[GETBYTE(s0, 3)] ^
- Te1[GETBYTE(s1, 2)] ^
- Te2[GETBYTE(s2, 1)] ^
- Te3[GETBYTE(s3, 0)] ^
- rk[4];
- t1 =
- Te0[GETBYTE(s1, 3)] ^
- Te1[GETBYTE(s2, 2)] ^
- Te2[GETBYTE(s3, 1)] ^
- Te3[GETBYTE(s0, 0)] ^
- rk[5];
- t2 =
- Te0[GETBYTE(s2, 3)] ^
- Te1[GETBYTE(s3, 2)] ^
- Te2[GETBYTE(s0, 1)] ^
- Te3[GETBYTE(s1, 0)] ^
- rk[6];
- t3 =
- Te0[GETBYTE(s3, 3)] ^
- Te1[GETBYTE(s0, 2)] ^
- Te2[GETBYTE(s1, 1)] ^
- Te3[GETBYTE(s2, 0)] ^
- rk[7];
-
- rk += 8;
- if (--r == 0) {
- break;
- }
-
- s0 =
- Te0[GETBYTE(t0, 3)] ^
- Te1[GETBYTE(t1, 2)] ^
- Te2[GETBYTE(t2, 1)] ^
- Te3[GETBYTE(t3, 0)] ^
- rk[0];
- s1 =
- Te0[GETBYTE(t1, 3)] ^
- Te1[GETBYTE(t2, 2)] ^
- Te2[GETBYTE(t3, 1)] ^
- Te3[GETBYTE(t0, 0)] ^
- rk[1];
- s2 =
- Te0[GETBYTE(t2, 3)] ^
- Te1[GETBYTE(t3, 2)] ^
- Te2[GETBYTE(t0, 1)] ^
- Te3[GETBYTE(t1, 0)] ^
- rk[2];
- s3 =
- Te0[GETBYTE(t3, 3)] ^
- Te1[GETBYTE(t0, 2)] ^
- Te2[GETBYTE(t1, 1)] ^
- Te3[GETBYTE(t2, 0)] ^
- rk[3];
- }
-
- /*
- * apply last round and
- * map cipher state to byte array block:
- */
-
- s0 =
- (Te2[GETBYTE(t0, 3)] & 0xff000000) ^
- (Te3[GETBYTE(t1, 2)] & 0x00ff0000) ^
- (Te0[GETBYTE(t2, 1)] & 0x0000ff00) ^
- (Te1[GETBYTE(t3, 0)] & 0x000000ff) ^
- rk[0];
- s1 =
- (Te2[GETBYTE(t1, 3)] & 0xff000000) ^
- (Te3[GETBYTE(t2, 2)] & 0x00ff0000) ^
- (Te0[GETBYTE(t3, 1)] & 0x0000ff00) ^
- (Te1[GETBYTE(t0, 0)] & 0x000000ff) ^
- rk[1];
- s2 =
- (Te2[GETBYTE(t2, 3)] & 0xff000000) ^
- (Te3[GETBYTE(t3, 2)] & 0x00ff0000) ^
- (Te0[GETBYTE(t0, 1)] & 0x0000ff00) ^
- (Te1[GETBYTE(t1, 0)] & 0x000000ff) ^
- rk[2];
- s3 =
- (Te2[GETBYTE(t3, 3)] & 0xff000000) ^
- (Te3[GETBYTE(t0, 2)] & 0x00ff0000) ^
- (Te0[GETBYTE(t1, 1)] & 0x0000ff00) ^
- (Te1[GETBYTE(t2, 0)] & 0x000000ff) ^
- rk[3];
-
-
- gpBlock::Put(xorBlock, outBlock)(s0)(s1)(s2)(s3);
-}
-
-
-void AES::decrypt(const byte* inBlock, const byte* xorBlock,
- byte* outBlock) const
-{
- word32 s0, s1, s2, s3;
- word32 t0, t1, t2, t3;
- const word32* rk = key_;
-
- /*
- * map byte array block to cipher state
- * and add initial round key:
- */
- gpBlock::Get(inBlock)(s0)(s1)(s2)(s3);
- s0 ^= rk[0];
- s1 ^= rk[1];
- s2 ^= rk[2];
- s3 ^= rk[3];
-
- s0 |= PreFetchTd();
-
- /*
- * Nr - 1 full rounds:
- */
-
- unsigned int r = rounds_ >> 1;
- for (;;) {
- t0 =
- Td0[GETBYTE(s0, 3)] ^
- Td1[GETBYTE(s3, 2)] ^
- Td2[GETBYTE(s2, 1)] ^
- Td3[GETBYTE(s1, 0)] ^
- rk[4];
- t1 =
- Td0[GETBYTE(s1, 3)] ^
- Td1[GETBYTE(s0, 2)] ^
- Td2[GETBYTE(s3, 1)] ^
- Td3[GETBYTE(s2, 0)] ^
- rk[5];
- t2 =
- Td0[GETBYTE(s2, 3)] ^
- Td1[GETBYTE(s1, 2)] ^
- Td2[GETBYTE(s0, 1)] ^
- Td3[GETBYTE(s3, 0)] ^
- rk[6];
- t3 =
- Td0[GETBYTE(s3, 3)] ^
- Td1[GETBYTE(s2, 2)] ^
- Td2[GETBYTE(s1, 1)] ^
- Td3[GETBYTE(s0, 0)] ^
- rk[7];
-
- rk += 8;
- if (--r == 0) {
- break;
- }
-
- s0 =
- Td0[GETBYTE(t0, 3)] ^
- Td1[GETBYTE(t3, 2)] ^
- Td2[GETBYTE(t2, 1)] ^
- Td3[GETBYTE(t1, 0)] ^
- rk[0];
- s1 =
- Td0[GETBYTE(t1, 3)] ^
- Td1[GETBYTE(t0, 2)] ^
- Td2[GETBYTE(t3, 1)] ^
- Td3[GETBYTE(t2, 0)] ^
- rk[1];
- s2 =
- Td0[GETBYTE(t2, 3)] ^
- Td1[GETBYTE(t1, 2)] ^
- Td2[GETBYTE(t0, 1)] ^
- Td3[GETBYTE(t3, 0)] ^
- rk[2];
- s3 =
- Td0[GETBYTE(t3, 3)] ^
- Td1[GETBYTE(t2, 2)] ^
- Td2[GETBYTE(t1, 1)] ^
- Td3[GETBYTE(t0, 0)] ^
- rk[3];
- }
- /*
- * apply last round and
- * map cipher state to byte array block:
- */
-
- t0 |= PreFetchCTd4();
-
- s0 =
- ((word32)CTd4[GETBYTE(t0, 3)] << 24) ^
- ((word32)CTd4[GETBYTE(t3, 2)] << 16) ^
- ((word32)CTd4[GETBYTE(t2, 1)] << 8) ^
- ((word32)CTd4[GETBYTE(t1, 0)]) ^
- rk[0];
- s1 =
- ((word32)CTd4[GETBYTE(t1, 3)] << 24) ^
- ((word32)CTd4[GETBYTE(t0, 2)] << 16) ^
- ((word32)CTd4[GETBYTE(t3, 1)] << 8) ^
- ((word32)CTd4[GETBYTE(t2, 0)]) ^
- rk[1];
- s2 =
- ((word32)CTd4[GETBYTE(t2, 3)] << 24 ) ^
- ((word32)CTd4[GETBYTE(t1, 2)] << 16 ) ^
- ((word32)CTd4[GETBYTE(t0, 1)] << 8 ) ^
- ((word32)CTd4[GETBYTE(t3, 0)]) ^
- rk[2];
- s3 =
- ((word32)CTd4[GETBYTE(t3, 3)] << 24) ^
- ((word32)CTd4[GETBYTE(t2, 2)] << 16) ^
- ((word32)CTd4[GETBYTE(t1, 1)] << 8) ^
- ((word32)CTd4[GETBYTE(t0, 0)]) ^
- rk[3];
-
- gpBlock::Put(xorBlock, outBlock)(s0)(s1)(s2)(s3);
-}
-
-
-#if defined(DO_AES_ASM)
- #ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;" \
- "movd mm7, ebp;" \
- "movd mm4, eax;" \
- "mov ebp, edx;" \
- "sub esp, 4;"
- #define EPILOG() \
- "add esp, 4;" \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "c" (this), "S" (inBlock), "d" (boxes), "a" (outBlock) \
- : "%edi", "memory", "cc" \
- );
-
- #else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( sub esp, 4 ) \
- AS2( movd mm7, ebp ) \
- AS2( mov [ebp - 4], esi ) \
- AS2( mov esi, DWORD PTR [ebp + 8] ) \
- AS2( mov ebp, DWORD PTR [ebp + 16] )
-
- // ebp is restored at end
- #define EPILOG() \
- AS2( mov esi, [ebp - 4] ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd edi, mm3 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 12 )
-
-
- #endif
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void AES::AsmEncrypt(const byte* inBlock, byte* outBlock, void* boxes) const
-{
-
- PROLOG()
-
- #ifdef OLD_GCC_OFFSET
- AS2( mov edx, DWORD PTR [ecx + 60] ) // rounds
- AS2( lea edi, [ecx + 64] ) // rk
- #else
- AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds
- AS2( lea edi, [ecx + 60] ) // rk
- #endif
-
- AS1( dec edx )
- AS2( movd mm6, edi ) // save rk
- AS2( movd mm5, edx ) // save rounds
-
- AS2( mov eax, DWORD PTR [esi] )
- AS2( mov ebx, DWORD PTR [esi + 4] )
- AS2( mov ecx, DWORD PTR [esi + 8] )
- AS2( mov edx, DWORD PTR [esi + 12] )
-
- AS1( bswap eax )
- AS1( bswap ebx )
- AS1( bswap ecx )
- AS1( bswap edx )
-
- AS2( xor eax, DWORD PTR [edi] ) // s0
- AS2( xor ebx, DWORD PTR [edi + 4] ) // s1
- AS2( xor ecx, DWORD PTR [edi + 8] ) // s2
- AS2( xor edx, DWORD PTR [edi + 12] ) // s3
-
-#ifdef _MSC_VER
- AS1( loop1: ) // loop1
-#else
- AS1(1: ) // loop1
-#endif
- /* Put0 (mm0) =
- Te0[get0,rs 24] ^
- Te1[get1,rs 16] ^
- Te2[get2,rs 8] ^
- Te3[get3,rs 0]
- */
-
- AS2( mov esi, eax )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, ebx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx edi, ch )
- AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] )
-
- AS2( movzx edi, dl )
- AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] )
-
- AS2( movd mm0, esi )
-
- /* Put1 (mm1) =
- Te0[get1,rs 24] ^
- Te1[get2,rs 16] ^
- Te2[get3,rs 8] ^
- Te3[get0,rs 0]
- */
-
- AS2( mov esi, ebx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, ecx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx edi, dh )
- AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] )
-
- AS2( movzx edi, al )
- AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] )
-
- AS2( movd mm1, esi )
-
-
- /* Put2 (mm2) =
- Te0[get2,rs 24] ^
- Te1[get3,rs 16] ^
- Te2[get0,rs 8] ^
- Te3[get1,rs 0]
- */
-
- AS2( mov esi, ecx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, edx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx edi, ah )
- AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] )
-
- AS2( movzx edi, bl )
- AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] )
-
- AS2( movd mm2, esi )
-
- /* Put3 (edx) =
- Te0[get3,rs 24] ^
- Te1[get0,rs 16] ^
- Te2[get1,rs 8] ^
- Te3[get2,rs 0]
- */
-
- AS2( mov esi, edx )
- AS2( shr esi, 24 )
- AS2( mov edx, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, eax )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor edx, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx esi, bh )
- AS2( xor edx, DWORD PTR [ebp + 2048 + esi*4] )
-
- AS2( movzx edi, cl )
- AS2( xor edx, DWORD PTR [ebp + 3072 + edi*4] )
-
- // xOr
-
- AS2( movd esi, mm6 ) // rk
-
- AS2( movd eax, mm0 )
- AS2( add esi, 16 )
- AS2( movd ebx, mm1 )
- AS2( movd mm6, esi ) // save back
- AS2( movd ecx, mm2 )
-
- AS2( xor eax, DWORD PTR [esi] )
- AS2( xor ebx, DWORD PTR [esi + 4] )
- AS2( movd edi, mm5 )
- AS2( xor ecx, DWORD PTR [esi + 8] )
- AS2( xor edx, DWORD PTR [esi + 12] )
-
- AS1( dec edi )
- AS2( movd mm5, edi )
-
-#ifdef _MSC_VER
- AS1( jnz loop1) // loop1
-#else
- AS1( jnz 1b ) // loop1
-#endif
-
- // last round
- /*
- Put0 (mm0) =
- (Te4[get0, rs24] & 0xff000000) ^ h = 4278190080
- (Te4[get1, rs16] & 0x00ff0000) ^ h = 16711680
- (Te4[get2, rs 8] & 0x0000ff00) ^ h = 65280
- (Te4[get3, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, eax )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and esi, 4278190080 )
-
- AS2( mov edi, ebx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 16711680 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, ch )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 65280 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, dl )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 255 )
- AS2( xor esi, edi )
-
- AS2( movd mm0, esi )
-
- /*
- Put1 (mm1) =
- (Te4[get1, rs24] & 0xff000000) ^ h = 4278190080
- (Te4[get2, rs16] & 0x00ff0000) ^ h = 16711680
- (Te4[get3, rs 8] & 0x0000ff00) ^ h = 65280
- (Te4[get0, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, ebx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and esi, 4278190080 )
-
- AS2( mov edi, ecx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 16711680 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, dh )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 65280 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, al )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 255 )
- AS2( xor esi, edi )
-
- AS2( movd mm1, esi )
-
- /*
- Put2 (mm2) =
- (Te4[get2, rs24] & 0xff000000) ^ h = 4278190080
- (Te4[get3, rs16] & 0x00ff0000) ^ h = 16711680
- (Te4[get0, rs 8] & 0x0000ff00) ^ h = 65280
- (Te4[get1, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, ecx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and esi, 4278190080 )
-
- AS2( mov edi, edx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 16711680 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, ah )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 65280 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, bl )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 255 )
- AS2( xor esi, edi )
-
- AS2( movd mm2, esi )
-
- /*
- Put3 (edx) =
- (Te4[get3, rs24] & 0xff000000) ^ h = 4278190080
- (Te4[get0, rs16] & 0x00ff0000) ^ h = 16711680
- (Te4[get1, rs 8] & 0x0000ff00) ^ h = 65280
- (Te4[get2, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, edx )
- AS2( shr esi, 24 )
- AS2( mov edx, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and edx, 4278190080 )
-
- AS2( mov edi, eax )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and esi, 16711680 )
- AS2( xor edx, esi )
-
- AS2( movzx esi, bh )
- AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and edi, 65280 )
- AS2( xor edx, edi )
-
- AS2( movzx edi, cl )
- AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and esi, 255 )
- AS2( xor edx, esi )
-
-
- // xOr
- AS2( movd eax, mm0 )
- AS2( movd esi, mm6 ) // rk
- AS2( movd ebx, mm1 )
- AS2( add esi, 16 )
- AS2( movd ecx, mm2 )
-
- AS2( xor eax, DWORD PTR [esi] )
- AS2( xor ebx, DWORD PTR [esi + 4] )
- AS2( xor ecx, DWORD PTR [esi + 8] )
- AS2( xor edx, DWORD PTR [esi + 12] )
-
- // end
- AS2( movd ebp, mm7 )
-
- // swap
- AS1( bswap eax )
- AS1( bswap ebx )
-
- // store
- #ifdef __GNUC__
- AS2( movd esi, mm4 ) // outBlock
- #else
- AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock
- #endif
-
- AS1( bswap ecx )
- AS1( bswap edx )
-
- AS2( mov DWORD PTR [esi], eax )
- AS2( mov DWORD PTR [esi + 4], ebx )
- AS2( mov DWORD PTR [esi + 8], ecx )
- AS2( mov DWORD PTR [esi + 12], edx )
-
-
- EPILOG()
-}
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void AES::AsmDecrypt(const byte* inBlock, byte* outBlock, void* boxes) const
-{
-
- PROLOG()
-
- #ifdef OLD_GCC_OFFSET
- AS2( mov edx, DWORD PTR [ecx + 60] ) // rounds
- AS2( lea edi, [ecx + 64] ) // rk
- #else
- AS2( mov edx, DWORD PTR [ecx + 56] ) // rounds
- AS2( lea edi, [ecx + 60] ) // rk
- #endif
-
- AS1( dec edx )
- AS2( movd mm6, edi ) // save rk
- AS2( movd mm5, edx ) // save rounds
-
- AS2( mov eax, DWORD PTR [esi] )
- AS2( mov ebx, DWORD PTR [esi + 4] )
- AS2( mov ecx, DWORD PTR [esi + 8] )
- AS2( mov edx, DWORD PTR [esi + 12] )
-
- AS1( bswap eax )
- AS1( bswap ebx )
- AS1( bswap ecx )
- AS1( bswap edx )
-
- AS2( xor eax, DWORD PTR [edi] ) // s0
- AS2( xor ebx, DWORD PTR [edi + 4] ) // s1
- AS2( xor ecx, DWORD PTR [edi + 8] ) // s2
- AS2( xor edx, DWORD PTR [edi + 12] ) // s3
-
-
-#ifdef _MSC_VER
- AS1( loop2: ) // loop2
-#else
- AS1(2: ) // loop2
-#endif
- /* Put0 (mm0) =
- Td0[GETBYTE(get0, rs24)] ^
- Td1[GETBYTE(get3, rs16)] ^
- Td2[GETBYTE(get2, rs 8)] ^
- Td3[GETBYTE(tet1, )]
- */
- AS2( mov esi, eax )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, edx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx edi, ch )
- AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] )
-
- AS2( movzx edi, bl )
- AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] )
-
- AS2( movd mm0, esi )
-
- /* Put1 (mm1) =
- Td0[GETBYTE(get1, rs24)] ^
- Td1[GETBYTE(get0, rs16)] ^
- Td2[GETBYTE(get3, rs 8)] ^
- Td3[GETBYTE(tet2, )]
- */
- AS2( mov esi, ebx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, eax )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx edi, dh )
- AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] )
-
- AS2( movzx edi, cl )
- AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] )
-
- AS2( movd mm1, esi )
-
- /* Put2 (mm2) =
- Td0[GETBYTE(get2, rs24)] ^
- Td1[GETBYTE(get1, rs16)] ^
- Td2[GETBYTE(get0, rs 8)] ^
- Td3[GETBYTE(tet3, )]
- */
- AS2( mov esi, ecx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, ebx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor esi, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx edi, ah )
- AS2( xor esi, DWORD PTR [ebp + 2048 + edi*4] )
-
- AS2( movzx edi, dl )
- AS2( xor esi, DWORD PTR [ebp + 3072 + edi*4] )
-
- AS2( movd mm2, esi )
-
- /* Put3 (edx) =
- Td0[GETBYTE(get3, rs24)] ^
- Td1[GETBYTE(get2, rs16)] ^
- Td2[GETBYTE(get1, rs 8)] ^
- Td3[GETBYTE(tet0, )]
- */
- AS2( mov esi, edx )
- AS2( shr esi, 24 )
- AS2( mov edx, DWORD PTR [ebp + esi*4] )
-
- AS2( mov edi, ecx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( xor edx, DWORD PTR [ebp + 1024 + edi*4] )
-
- AS2( movzx esi, bh )
- AS2( xor edx, DWORD PTR [ebp + 2048 + esi*4] )
-
- AS2( movzx edi, al )
- AS2( xor edx, DWORD PTR [ebp + 3072 + edi*4] )
-
-
- // xOr
-
- AS2( movd esi, mm6 ) // rk
- AS2( add esi, 16 )
- AS2( movd mm6, esi ) // save back
-
- AS2( movd eax, mm0 )
- AS2( movd ebx, mm1 )
- AS2( movd ecx, mm2 )
-
- AS2( xor eax, DWORD PTR [esi] )
- AS2( xor ebx, DWORD PTR [esi + 4] )
- AS2( xor ecx, DWORD PTR [esi + 8] )
- AS2( xor edx, DWORD PTR [esi + 12] )
-
- AS2( movd edi, mm5 )
- AS1( dec edi )
- AS2( movd mm5, edi )
-
-#ifdef _MSC_VER
- AS1( jnz loop2) // loop2
-#else
- AS1( jnz 2b ) // loop2
-#endif
-
- // last round
- /*
- Put0 (mm0) =
- (Td4[get0, rs24] & 0xff000000) ^ h = 4278190080
- (Td4[get3, rs16] & 0x00ff0000) ^ h = 16711680
- (Td4[get2, rs 8] & 0x0000ff00) ^ h = 65280
- (Td4[get1, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, eax )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and esi, 4278190080 )
-
- AS2( mov edi, edx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 16711680 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, ch )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 65280 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, bl )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 255 )
- AS2( xor esi, edi )
-
- AS2( movd mm0, esi )
-
- /*
- Put1 (mm1) =
- (Td4[get1, rs24] & 0xff000000) ^ h = 4278190080
- (Td4[get0, rs16] & 0x00ff0000) ^ h = 16711680
- (Td4[get3, rs 8] & 0x0000ff00) ^ h = 65280
- (Td4[get2, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, ebx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and esi, 4278190080 )
-
- AS2( mov edi, eax )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 16711680 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, dh )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 65280 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, cl )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 255 )
- AS2( xor esi, edi )
-
- AS2( movd mm1, esi )
-
- /*
- Put2 (mm2) =
- (Td4[get2, rs24] & 0xff000000) ^ h = 4278190080
- (Td4[get1, rs16] & 0x00ff0000) ^ h = 16711680
- (Td4[get0, rs 8] & 0x0000ff00) ^ h = 65280
- (Td4[get3, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, ecx )
- AS2( shr esi, 24 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and esi, 4278190080 )
-
- AS2( mov edi, ebx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 16711680 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, ah )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 65280 )
- AS2( xor esi, edi )
-
- AS2( movzx edi, dl )
- AS2( mov edi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and edi, 255 )
- AS2( xor esi, edi )
-
- AS2( movd mm2, esi )
-
- /*
- Put3 (edx) =
- (Td4[get3, rs24] & 0xff000000) ^ h = 4278190080
- (Td4[get2, rs16] & 0x00ff0000) ^ h = 16711680
- (Td4[get1, rs 8] & 0x0000ff00) ^ h = 65280
- (Td4[get0, rs 0] & 0x000000ff) h = 255
- */
- AS2( mov esi, edx )
- AS2( shr esi, 24 )
- AS2( mov edx, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and edx, 4278190080 )
-
- AS2( mov edi, ecx )
- AS2( shr edi, 16 )
- AS2( and edi, 255 )
- AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and esi, 16711680 )
- AS2( xor edx, esi )
-
- AS2( movzx esi, bh )
- AS2( mov edi, DWORD PTR [ebp + 4096 + esi*4] )
- AS2( and edi, 65280 )
- AS2( xor edx, edi )
-
- AS2( movzx edi, al )
- AS2( mov esi, DWORD PTR [ebp + 4096 + edi*4] )
- AS2( and esi, 255 )
- AS2( xor edx, esi )
-
-
- // xOr
- AS2( movd esi, mm6 ) // rk
- AS2( add esi, 16 )
-
- AS2( movd eax, mm0 )
- AS2( movd ebx, mm1 )
- AS2( movd ecx, mm2 )
-
- AS2( xor eax, DWORD PTR [esi] )
- AS2( xor ebx, DWORD PTR [esi + 4] )
- AS2( xor ecx, DWORD PTR [esi + 8] )
- AS2( xor edx, DWORD PTR [esi + 12] )
-
- // end
- AS2( movd ebp, mm7 )
-
- // swap
- AS1( bswap eax )
- AS1( bswap ebx )
- AS1( bswap ecx )
- AS1( bswap edx )
-
- // store
- #ifdef __GNUC__
- AS2( movd esi, mm4 ) // outBlock
- #else
- AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock
- #endif
- AS2( mov DWORD PTR [esi], eax )
- AS2( mov DWORD PTR [esi + 4], ebx )
- AS2( mov DWORD PTR [esi + 8], ecx )
- AS2( mov DWORD PTR [esi + 12], edx )
-
-
- EPILOG()
-}
-
-
-
-#endif // defined(DO_AES_ASM)
-
-
-
-const word32 AES::Te[5][256] = {
-{
- 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,
- 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U,
- 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU,
- 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU,
- 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U,
- 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU,
- 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU,
- 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU,
- 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU,
- 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU,
- 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U,
- 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU,
- 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU,
- 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U,
- 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU,
- 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU,
- 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU,
- 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU,
- 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU,
- 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U,
- 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU,
- 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU,
- 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU,
- 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU,
- 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U,
- 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U,
- 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U,
- 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U,
- 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU,
- 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U,
- 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U,
- 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU,
- 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU,
- 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U,
- 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U,
- 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U,
- 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU,
- 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U,
- 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU,
- 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U,
- 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU,
- 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U,
- 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U,
- 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU,
- 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U,
- 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U,
- 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U,
- 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U,
- 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U,
- 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U,
- 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U,
- 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U,
- 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU,
- 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U,
- 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U,
- 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U,
- 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U,
- 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U,
- 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U,
- 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU,
- 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U,
- 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U,
- 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U,
- 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU,
-},
-{
- 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU,
- 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U,
- 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU,
- 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U,
- 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU,
- 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U,
- 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU,
- 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U,
- 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U,
- 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU,
- 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U,
- 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U,
- 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U,
- 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU,
- 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U,
- 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U,
- 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU,
- 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U,
- 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U,
- 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U,
- 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU,
- 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU,
- 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U,
- 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU,
- 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU,
- 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U,
- 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU,
- 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U,
- 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU,
- 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U,
- 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U,
- 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U,
- 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU,
- 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U,
- 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU,
- 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U,
- 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU,
- 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U,
- 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U,
- 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU,
- 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU,
- 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU,
- 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U,
- 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U,
- 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU,
- 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U,
- 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU,
- 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U,
- 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU,
- 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U,
- 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU,
- 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU,
- 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U,
- 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU,
- 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U,
- 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU,
- 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U,
- 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U,
- 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U,
- 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU,
- 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU,
- 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U,
- 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU,
- 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U,
-},
-{
- 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU,
- 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U,
- 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU,
- 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U,
- 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU,
- 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U,
- 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU,
- 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U,
- 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U,
- 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU,
- 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U,
- 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U,
- 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U,
- 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU,
- 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U,
- 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U,
- 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU,
- 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U,
- 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U,
- 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U,
- 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU,
- 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU,
- 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U,
- 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU,
- 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU,
- 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U,
- 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU,
- 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U,
- 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU,
- 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U,
- 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U,
- 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U,
- 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU,
- 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U,
- 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU,
- 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U,
- 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU,
- 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U,
- 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U,
- 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU,
- 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU,
- 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU,
- 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U,
- 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U,
- 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU,
- 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U,
- 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU,
- 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U,
- 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU,
- 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U,
- 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU,
- 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU,
- 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U,
- 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU,
- 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U,
- 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU,
- 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U,
- 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U,
- 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U,
- 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU,
- 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU,
- 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U,
- 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU,
- 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U,
-},
-{
- 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U,
- 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U,
- 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U,
- 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU,
- 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU,
- 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU,
- 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U,
- 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU,
- 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU,
- 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U,
- 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U,
- 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU,
- 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU,
- 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU,
- 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU,
- 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU,
- 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U,
- 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU,
- 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU,
- 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U,
- 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U,
- 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U,
- 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U,
- 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U,
- 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU,
- 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U,
- 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU,
- 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU,
- 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U,
- 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U,
- 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U,
- 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU,
- 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U,
- 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU,
- 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU,
- 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U,
- 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U,
- 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU,
- 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U,
- 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU,
- 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U,
- 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U,
- 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U,
- 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U,
- 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU,
- 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U,
- 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU,
- 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U,
- 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU,
- 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U,
- 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU,
- 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU,
- 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU,
- 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU,
- 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U,
- 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U,
- 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U,
- 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U,
- 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U,
- 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U,
- 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU,
- 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U,
- 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU,
- 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU,
-},
-{
- 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU,
- 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U,
- 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU,
- 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U,
- 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU,
- 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U,
- 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU,
- 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U,
- 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U,
- 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU,
- 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U,
- 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U,
- 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U,
- 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU,
- 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U,
- 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U,
- 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU,
- 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U,
- 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U,
- 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U,
- 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU,
- 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU,
- 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U,
- 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU,
- 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU,
- 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U,
- 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU,
- 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U,
- 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU,
- 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U,
- 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U,
- 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U,
- 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU,
- 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U,
- 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU,
- 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U,
- 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU,
- 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U,
- 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U,
- 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU,
- 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU,
- 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU,
- 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U,
- 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U,
- 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU,
- 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U,
- 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU,
- 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U,
- 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU,
- 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U,
- 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU,
- 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU,
- 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U,
- 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU,
- 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U,
- 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU,
- 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U,
- 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U,
- 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U,
- 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU,
- 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU,
- 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U,
- 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU,
- 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U,
-}
-};
-
-
-const word32 AES::Td[5][256] = {
-{
- 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
- 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
- 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U,
- 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU,
- 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U,
- 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U,
- 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU,
- 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U,
- 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU,
- 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U,
- 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U,
- 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U,
- 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U,
- 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU,
- 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U,
- 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU,
- 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U,
- 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU,
- 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U,
- 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U,
- 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U,
- 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU,
- 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U,
- 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU,
- 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U,
- 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU,
- 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U,
- 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU,
- 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU,
- 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U,
- 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU,
- 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U,
- 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU,
- 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U,
- 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U,
- 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U,
- 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU,
- 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U,
- 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U,
- 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU,
- 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U,
- 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U,
- 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U,
- 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U,
- 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U,
- 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU,
- 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U,
- 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U,
- 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U,
- 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U,
- 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U,
- 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU,
- 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU,
- 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU,
- 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU,
- 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U,
- 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U,
- 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU,
- 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU,
- 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U,
- 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU,
- 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U,
- 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U,
- 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U,
-},
-{
- 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU,
- 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U,
- 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU,
- 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U,
- 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U,
- 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U,
- 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U,
- 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U,
- 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U,
- 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU,
- 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU,
- 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU,
- 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U,
- 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU,
- 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U,
- 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U,
- 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U,
- 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU,
- 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU,
- 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U,
- 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU,
- 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U,
- 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU,
- 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU,
- 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U,
- 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U,
- 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U,
- 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU,
- 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U,
- 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU,
- 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U,
- 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U,
- 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U,
- 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU,
- 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U,
- 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U,
- 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U,
- 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U,
- 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U,
- 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U,
- 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU,
- 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU,
- 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U,
- 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU,
- 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U,
- 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU,
- 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU,
- 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U,
- 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU,
- 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U,
- 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U,
- 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U,
- 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U,
- 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U,
- 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U,
- 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U,
- 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU,
- 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U,
- 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U,
- 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU,
- 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U,
- 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U,
- 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U,
- 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U,
-},
-{
- 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U,
- 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U,
- 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U,
- 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U,
- 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU,
- 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U,
- 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U,
- 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U,
- 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U,
- 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU,
- 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U,
- 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U,
- 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU,
- 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U,
- 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U,
- 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U,
- 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U,
- 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U,
- 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U,
- 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU,
-
- 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U,
- 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U,
- 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U,
- 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U,
- 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U,
- 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU,
- 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU,
- 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U,
- 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU,
- 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U,
- 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU,
- 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU,
- 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU,
- 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU,
- 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U,
- 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U,
- 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U,
- 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U,
- 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U,
- 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U,
- 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U,
- 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU,
- 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU,
- 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U,
- 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U,
- 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU,
- 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU,
- 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U,
- 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U,
- 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U,
- 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U,
- 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U,
- 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U,
- 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U,
- 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU,
- 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U,
- 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U,
- 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U,
- 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U,
- 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U,
- 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U,
- 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU,
- 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U,
- 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U,
-},
-{
- 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU,
- 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU,
- 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U,
- 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U,
- 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU,
- 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU,
- 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U,
- 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU,
- 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U,
- 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU,
- 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U,
- 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U,
- 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U,
- 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U,
- 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U,
- 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU,
- 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU,
- 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U,
- 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U,
- 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU,
- 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU,
- 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U,
- 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U,
- 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U,
- 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U,
- 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU,
- 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U,
- 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U,
- 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU,
- 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU,
- 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U,
- 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U,
- 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U,
- 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU,
- 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U,
- 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U,
- 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U,
- 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U,
- 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U,
- 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U,
- 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U,
- 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU,
- 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U,
- 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U,
- 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU,
- 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU,
- 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U,
- 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU,
- 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U,
- 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U,
- 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U,
- 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U,
- 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U,
- 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U,
- 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU,
- 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU,
- 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU,
- 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU,
- 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U,
- 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U,
- 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U,
- 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU,
- 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U,
- 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U,
-},
-{
- 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U,
- 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U,
- 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU,
- 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU,
- 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U,
- 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U,
- 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U,
- 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU,
- 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U,
- 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU,
- 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU,
- 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU,
- 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U,
- 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U,
- 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U,
- 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U,
- 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U,
- 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U,
- 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU,
- 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U,
- 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U,
- 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU,
- 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U,
- 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U,
- 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U,
- 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU,
- 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U,
- 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U,
- 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU,
- 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U,
- 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U,
- 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU,
- 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U,
- 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU,
- 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU,
- 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U,
- 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U,
- 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U,
- 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U,
- 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU,
- 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U,
- 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U,
- 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU,
- 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU,
- 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU,
- 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U,
- 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU,
- 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U,
- 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U,
- 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U,
- 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U,
- 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU,
- 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U,
- 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU,
- 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU,
- 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU,
- 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU,
- 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U,
- 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU,
- 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U,
- 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU,
- 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U,
- 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U,
- 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU,
-}
-};
-
-const byte AES::CTd4[256] =
-{
- 0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U,
- 0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU,
- 0x7cU, 0xe3U, 0x39U, 0x82U, 0x9bU, 0x2fU, 0xffU, 0x87U,
- 0x34U, 0x8eU, 0x43U, 0x44U, 0xc4U, 0xdeU, 0xe9U, 0xcbU,
- 0x54U, 0x7bU, 0x94U, 0x32U, 0xa6U, 0xc2U, 0x23U, 0x3dU,
- 0xeeU, 0x4cU, 0x95U, 0x0bU, 0x42U, 0xfaU, 0xc3U, 0x4eU,
- 0x08U, 0x2eU, 0xa1U, 0x66U, 0x28U, 0xd9U, 0x24U, 0xb2U,
- 0x76U, 0x5bU, 0xa2U, 0x49U, 0x6dU, 0x8bU, 0xd1U, 0x25U,
- 0x72U, 0xf8U, 0xf6U, 0x64U, 0x86U, 0x68U, 0x98U, 0x16U,
- 0xd4U, 0xa4U, 0x5cU, 0xccU, 0x5dU, 0x65U, 0xb6U, 0x92U,
- 0x6cU, 0x70U, 0x48U, 0x50U, 0xfdU, 0xedU, 0xb9U, 0xdaU,
- 0x5eU, 0x15U, 0x46U, 0x57U, 0xa7U, 0x8dU, 0x9dU, 0x84U,
- 0x90U, 0xd8U, 0xabU, 0x00U, 0x8cU, 0xbcU, 0xd3U, 0x0aU,
- 0xf7U, 0xe4U, 0x58U, 0x05U, 0xb8U, 0xb3U, 0x45U, 0x06U,
- 0xd0U, 0x2cU, 0x1eU, 0x8fU, 0xcaU, 0x3fU, 0x0fU, 0x02U,
- 0xc1U, 0xafU, 0xbdU, 0x03U, 0x01U, 0x13U, 0x8aU, 0x6bU,
- 0x3aU, 0x91U, 0x11U, 0x41U, 0x4fU, 0x67U, 0xdcU, 0xeaU,
- 0x97U, 0xf2U, 0xcfU, 0xceU, 0xf0U, 0xb4U, 0xe6U, 0x73U,
- 0x96U, 0xacU, 0x74U, 0x22U, 0xe7U, 0xadU, 0x35U, 0x85U,
- 0xe2U, 0xf9U, 0x37U, 0xe8U, 0x1cU, 0x75U, 0xdfU, 0x6eU,
- 0x47U, 0xf1U, 0x1aU, 0x71U, 0x1dU, 0x29U, 0xc5U, 0x89U,
- 0x6fU, 0xb7U, 0x62U, 0x0eU, 0xaaU, 0x18U, 0xbeU, 0x1bU,
- 0xfcU, 0x56U, 0x3eU, 0x4bU, 0xc6U, 0xd2U, 0x79U, 0x20U,
- 0x9aU, 0xdbU, 0xc0U, 0xfeU, 0x78U, 0xcdU, 0x5aU, 0xf4U,
- 0x1fU, 0xddU, 0xa8U, 0x33U, 0x88U, 0x07U, 0xc7U, 0x31U,
- 0xb1U, 0x12U, 0x10U, 0x59U, 0x27U, 0x80U, 0xecU, 0x5fU,
- 0x60U, 0x51U, 0x7fU, 0xa9U, 0x19U, 0xb5U, 0x4aU, 0x0dU,
- 0x2dU, 0xe5U, 0x7aU, 0x9fU, 0x93U, 0xc9U, 0x9cU, 0xefU,
- 0xa0U, 0xe0U, 0x3bU, 0x4dU, 0xaeU, 0x2aU, 0xf5U, 0xb0U,
- 0xc8U, 0xebU, 0xbbU, 0x3cU, 0x83U, 0x53U, 0x99U, 0x61U,
- 0x17U, 0x2bU, 0x04U, 0x7eU, 0xbaU, 0x77U, 0xd6U, 0x26U,
- 0xe1U, 0x69U, 0x14U, 0x63U, 0x55U, 0x21U, 0x0cU, 0x7dU,
-};
-
-
-const word32* AES::Te0 = AES::Te[0];
-const word32* AES::Te1 = AES::Te[1];
-const word32* AES::Te2 = AES::Te[2];
-const word32* AES::Te3 = AES::Te[3];
-
-const word32* AES::Td0 = AES::Td[0];
-const word32* AES::Td1 = AES::Td[1];
-const word32* AES::Td2 = AES::Td[2];
-const word32* AES::Td3 = AES::Td[3];
-
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/aestables.cpp b/extra/yassl/taocrypt/src/aestables.cpp
deleted file mode 100644
index 7c6a53bdcd5..00000000000
--- a/extra/yassl/taocrypt/src/aestables.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's aestables.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "aes.hpp"
-
-
-namespace TaoCrypt {
-
-
-const word32 AES::rcon_[] = {
- 0x01000000, 0x02000000, 0x04000000, 0x08000000,
- 0x10000000, 0x20000000, 0x40000000, 0x80000000,
- 0x1B000000, 0x36000000,
- /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
-};
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp
deleted file mode 100644
index f12947a71c4..00000000000
--- a/extra/yassl/taocrypt/src/algebra.cpp
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's algebra.cpp from CryptoPP */
-#undef NDEBUG
-
-#include "runtime.hpp"
-#include "algebra.hpp"
-#ifdef USE_SYS_STL
- #include <vector>
-#else
- #include "vector.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-namespace TaoCrypt {
-
-
-const Integer& AbstractGroup::Double(const Element &a) const
-{
- return Add(a, a);
-}
-
-const Integer& AbstractGroup::Subtract(const Element &a, const Element &b) const
-{
- // make copy of a in case Inverse() overwrites it
- Element a1(a);
- return Add(a1, Inverse(b));
-}
-
-Integer& AbstractGroup::Accumulate(Element &a, const Element &b) const
-{
- return a = Add(a, b);
-}
-
-Integer& AbstractGroup::Reduce(Element &a, const Element &b) const
-{
- return a = Subtract(a, b);
-}
-
-const Integer& AbstractRing::Square(const Element &a) const
-{
- return Multiply(a, a);
-}
-
-
-const Integer& AbstractRing::Divide(const Element &a, const Element &b) const
-{
- // make copy of a in case MultiplicativeInverse() overwrites it
- Element a1(a);
- return Multiply(a1, MultiplicativeInverse(b));
-}
-
-
-const Integer& AbstractEuclideanDomain::Mod(const Element &a,
- const Element &b) const
-{
- Element q;
- DivisionAlgorithm(result, q, a, b);
- return result;
-}
-
-const Integer& AbstractEuclideanDomain::Gcd(const Element &a,
- const Element &b) const
-{
- STL::vector<Element> g(3);
- g[0]= b;
- g[1]= a;
- unsigned int i0=0, i1=1, i2=2;
-
- while (!Equal(g[i1], this->Identity()))
- {
- g[i2] = Mod(g[i0], g[i1]);
- unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;
- }
-
- return result = g[i0];
-}
-
-
-Integer AbstractGroup::ScalarMultiply(const Element &base,
- const Integer &exponent) const
-{
- Element result;
- SimultaneousMultiply(&result, base, &exponent, 1);
- return result;
-}
-
-
-Integer AbstractGroup::CascadeScalarMultiply(const Element &x,
- const Integer &e1, const Element &y, const Integer &e2) const
-{
- const unsigned expLen = max(e1.BitCount(), e2.BitCount());
- if (expLen==0)
- return Identity();
-
- const unsigned w = (expLen <= 46 ? 1 : (expLen <= 260 ? 2 : 3));
- const unsigned tableSize = 1<<w;
- STL::vector<Element> powerTable(tableSize << w);
-
- powerTable[1] = x;
- powerTable[tableSize] = y;
- if (w==1)
- powerTable[3] = Add(x,y);
- else
- {
- powerTable[2] = Double(x);
- powerTable[2*tableSize] = Double(y);
-
- unsigned i, j;
-
- for (i=3; i<tableSize; i+=2)
- powerTable[i] = Add(powerTable[i-2], powerTable[2]);
- for (i=1; i<tableSize; i+=2)
- for (j=i+tableSize; j<(tableSize<<w); j+=tableSize)
- powerTable[j] = Add(powerTable[j-tableSize], y);
-
- for (i=3*tableSize; i<(tableSize<<w); i+=2*tableSize)
- powerTable[i] = Add(powerTable[i-2*tableSize],
- powerTable[2*tableSize]);
- for (i=tableSize; i<(tableSize<<w); i+=2*tableSize)
- for (j=i+2; j<i+tableSize; j+=2)
- powerTable[j] = Add(powerTable[j-1], x);
- }
-
- Element result;
- unsigned power1 = 0, power2 = 0, prevPosition = expLen-1;
- bool firstTime = true;
-
- for (int i = expLen-1; i>=0; i--)
- {
- power1 = 2*power1 + e1.GetBit(i);
- power2 = 2*power2 + e2.GetBit(i);
-
- if (i==0 || 2*power1 >= tableSize || 2*power2 >= tableSize)
- {
- unsigned squaresBefore = prevPosition-i;
- unsigned squaresAfter = 0;
- prevPosition = i;
- while ((power1 || power2) && power1%2 == 0 && power2%2==0)
- {
- power1 /= 2;
- power2 /= 2;
- squaresBefore--;
- squaresAfter++;
- }
- if (firstTime)
- {
- result = powerTable[(power2<<w) + power1];
- firstTime = false;
- }
- else
- {
- while (squaresBefore--)
- result = Double(result);
- if (power1 || power2)
- Accumulate(result, powerTable[(power2<<w) + power1]);
- }
- while (squaresAfter--)
- result = Double(result);
- power1 = power2 = 0;
- }
- }
- return result;
-}
-
-
-struct WindowSlider
-{
- WindowSlider(const Integer &exp, bool fastNegate,
- unsigned int windowSizeIn=0)
- : exp(exp), windowModulus(Integer::One()), windowSize(windowSizeIn),
- windowBegin(0), fastNegate(fastNegate), firstTime(true),
- finished(false)
- {
- if (windowSize == 0)
- {
- unsigned int expLen = exp.BitCount();
- windowSize = expLen <= 17 ? 1 : (expLen <= 24 ? 2 :
- (expLen <= 70 ? 3 : (expLen <= 197 ? 4 : (expLen <= 539 ? 5 :
- (expLen <= 1434 ? 6 : 7)))));
- }
- windowModulus <<= windowSize;
- }
-
- void FindNextWindow()
- {
- unsigned int expLen = exp.WordCount() * WORD_BITS;
- unsigned int skipCount = firstTime ? 0 : windowSize;
- firstTime = false;
- while (!exp.GetBit(skipCount))
- {
- if (skipCount >= expLen)
- {
- finished = true;
- return;
- }
- skipCount++;
- }
-
- exp >>= skipCount;
- windowBegin += skipCount;
- expWindow = (unsigned int)(exp % (1LL << windowSize));
-
- if (fastNegate && exp.GetBit(windowSize))
- {
- negateNext = true;
- expWindow = (1 << windowSize) - expWindow;
- exp += windowModulus;
- }
- else
- negateNext = false;
- }
-
- Integer exp, windowModulus;
- unsigned int windowSize, windowBegin, expWindow;
- bool fastNegate, negateNext, firstTime, finished;
-};
-
-
-void AbstractGroup::SimultaneousMultiply(Integer *results, const Integer &base,
- const Integer *expBegin, unsigned int expCount) const
-{
- STL::vector<STL::vector<Element> > buckets(expCount);
- STL::vector<WindowSlider> exponents;
- exponents.reserve(expCount);
- unsigned int i;
-
- for (i=0; i<expCount; i++)
- {
- exponents.push_back(WindowSlider(*expBegin++, InversionIsFast(), 0));
- exponents[i].FindNextWindow();
- buckets[i].resize(size_t(1)<<(exponents[i].windowSize-1), Identity());
- }
-
- unsigned int expBitPosition = 0;
- Element g = base;
- bool notDone = true;
-
- while (notDone)
- {
- notDone = false;
- for (i=0; i<expCount; i++)
- {
- if (!exponents[i].finished && expBitPosition ==
- exponents[i].windowBegin)
- {
- Element &bucket = buckets[i][exponents[i].expWindow/2];
- if (exponents[i].negateNext)
- Accumulate(bucket, Inverse(g));
- else
- Accumulate(bucket, g);
- exponents[i].FindNextWindow();
- }
- notDone = notDone || !exponents[i].finished;
- }
-
- if (notDone)
- {
- g = Double(g);
- expBitPosition++;
- }
- }
-
- for (i=0; i<expCount; i++)
- {
- Element &r = *results++;
- r = buckets[i][buckets[i].size()-1];
- if (buckets[i].size() > 1)
- {
- for (size_t j = buckets[i].size()-2; j >= 1; j--)
- {
- Accumulate(buckets[i][j], buckets[i][j+1]);
- Accumulate(r, buckets[i][j]);
- }
- Accumulate(buckets[i][0], buckets[i][1]);
- r = Add(Double(r), buckets[i][0]);
- }
- }
-}
-
-Integer AbstractRing::Exponentiate(const Element &base,
- const Integer &exponent) const
-{
- Element result;
- SimultaneousExponentiate(&result, base, &exponent, 1);
- return result;
-}
-
-
-Integer AbstractRing::CascadeExponentiate(const Element &x,
- const Integer &e1, const Element &y, const Integer &e2) const
-{
- return MultiplicativeGroup().AbstractGroup::CascadeScalarMultiply(
- x, e1, y, e2);
-}
-
-
-void AbstractRing::SimultaneousExponentiate(Integer *results,
- const Integer &base,
- const Integer *exponents, unsigned int expCount) const
-{
- MultiplicativeGroup().AbstractGroup::SimultaneousMultiply(results, base,
- exponents, expCount);
-}
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/arc4.cpp b/extra/yassl/taocrypt/src/arc4.cpp
deleted file mode 100644
index 6d11f5c113a..00000000000
--- a/extra/yassl/taocrypt/src/arc4.cpp
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's arc4.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "arc4.hpp"
-
-
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_ARC4_ASM
-#endif
-
-
-namespace TaoCrypt {
-
-void ARC4::SetKey(const byte* key, word32 length)
-{
- x_ = 1;
- y_ = 0;
-
- word32 i;
-
- for (i = 0; i < STATE_SIZE; i++)
- state_[i] = i;
-
- word32 keyIndex = 0, stateIndex = 0;
-
- for (i = 0; i < STATE_SIZE; i++) {
- word32 a = state_[i];
- stateIndex += key[keyIndex] + a;
- stateIndex &= 0xFF;
- state_[i] = state_[stateIndex];
- state_[stateIndex] = a;
-
- if (++keyIndex >= length)
- keyIndex = 0;
- }
-}
-
-
-// local
-namespace {
-
-inline unsigned int MakeByte(word32& x, word32& y, byte* s)
-{
- word32 a = s[x];
- y = (y+a) & 0xff;
-
- word32 b = s[y];
- s[x] = b;
- s[y] = a;
- x = (x+1) & 0xff;
-
- return s[(a+b) & 0xff];
-}
-
-} // namespace
-
-
-
-void ARC4::Process(byte* out, const byte* in, word32 length)
-{
- if (length == 0) return;
-
-#ifdef DO_ARC4_ASM
- if (isMMX) {
- AsmProcess(out, in, length);
- return;
- }
-#endif
-
- byte *const s = state_;
- word32 x = x_;
- word32 y = y_;
-
- if (in == out)
- while (length--)
- *out++ ^= MakeByte(x, y, s);
- else
- while(length--)
- *out++ = *in++ ^ MakeByte(x, y, s);
- x_ = x;
- y_ = y;
-}
-
-
-
-#ifdef DO_ARC4_ASM
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void ARC4::AsmProcess(byte* out, const byte* in, word32 length)
-{
-#ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;" \
- "mov ebp, eax;"
- #define EPILOG() \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "c" (this), "D" (out), "S" (in), "a" (length) \
- : "%edx", "memory", "cc" \
- );
-
-#else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( movd mm5, esi ) \
- AS2( movd mm6, ebp ) \
- AS2( mov edi, DWORD PTR [ebp + 8] ) \
- AS2( mov esi, DWORD PTR [ebp + 12] ) \
- AS2( mov ebp, DWORD PTR [ebp + 16] )
-
- #define EPILOG() \
- AS2( movd ebp, mm6 ) \
- AS2( movd esi, mm5 ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd edi, mm3 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 12 )
-
-#endif
-
- PROLOG()
-
- AS2( sub esp, 4 ) // make room
-
- AS2( cmp ebp, 0 )
- AS1( jz nothing )
-
- AS2( mov [esp], ebp ) // length
-
- AS2( movzx edx, BYTE PTR [ecx + 1] ) // y
- AS2( lea ebp, [ecx + 2] ) // state_
- AS2( movzx ecx, BYTE PTR [ecx] ) // x
-
- // setup loop
- // a = s[x];
- AS2( movzx eax, BYTE PTR [ebp + ecx] )
-
-
-#ifdef _MSC_VER
- AS1( loopStart: ) // loopStart
-#else
- AS1( 0: ) // loopStart for some gas (need numeric for jump back
-#endif
-
- // y = (y+a) & 0xff;
- AS2( add edx, eax )
- AS2( and edx, 255 )
-
- // b = s[y];
- AS2( movzx ebx, BYTE PTR [ebp + edx] )
-
- // s[x] = b;
- AS2( mov [ebp + ecx], bl )
-
- // s[y] = a;
- AS2( mov [ebp + edx], al )
-
- // x = (x+1) & 0xff;
- AS1( inc ecx )
- AS2( and ecx, 255 )
-
- //return s[(a+b) & 0xff];
- AS2( add eax, ebx )
- AS2( and eax, 255 )
-
- AS2( movzx ebx, BYTE PTR [ebp + eax] )
-
- // a = s[x]; for next round
- AS2( movzx eax, BYTE PTR [ebp + ecx] )
-
- // xOr w/ inByte
- AS2( xor bl, BYTE PTR [esi] )
- AS1( inc esi )
-
- // write to outByte
- AS2( mov [edi], bl )
- AS1( inc edi )
-
- AS1( dec DWORD PTR [esp] )
-#ifdef _MSC_VER
- AS1( jnz loopStart ) // loopStart
-#else
- AS1( jnz 0b ) // loopStart
-#endif
-
-
- // write back to x_ and y_
- AS2( mov [ebp - 2], cl )
- AS2( mov [ebp - 1], dl )
-
-
-AS1( nothing: )
-
- // inline adjust
- AS2( add esp, 4 ) // fix room on stack
-
- EPILOG()
-}
-
-#endif // DO_ARC4_ASM
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp
deleted file mode 100644
index ed073567193..00000000000
--- a/extra/yassl/taocrypt/src/asn.cpp
+++ /dev/null
@@ -1,1344 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* asn.cpp implements ASN1 BER, PublicKey, and x509v3 decoding
-*/
-
-#include "runtime.hpp"
-#include "asn.hpp"
-#include "file.hpp"
-#include "integer.hpp"
-#include "rsa.hpp"
-#include "dsa.hpp"
-#include "dh.hpp"
-#include "md5.hpp"
-#include "md2.hpp"
-#include "sha.hpp"
-#include "coding.hpp"
-#include <time.h> // gmtime();
-#include "memory.hpp" // some auto_ptr don't have reset, also need auto_array
-#include <assert.h>
-
-namespace TaoCrypt {
-
-// like atoi but only use first byte
-word32 btoi(byte b)
-{
- return b - 0x30;
-}
-
-
-// two byte date/time, add to value
-void GetTime(int *value, const byte* date, int& i)
-{
- *value += btoi(date[i++]) * 10;
- *value += btoi(date[i++]);
-}
-
-
-void ASN1_TIME_extract(const unsigned char* date, unsigned char format,
- tm *t)
-{
- int i = 0;
- memset(t, 0, sizeof (tm));
-
- assert(format == UTC_TIME || format == GENERALIZED_TIME);
-
- if (format == UTC_TIME) {
- if (btoi(date[0]) >= 5)
- t->tm_year = 1900;
- else
- t->tm_year = 2000;
- }
- else { // format == GENERALIZED_TIME
- t->tm_year += btoi(date[i++]) * 1000;
- t->tm_year += btoi(date[i++]) * 100;
- }
-
- GetTime(&t->tm_year, date, i); t->tm_year -= 1900; // adjust
- GetTime(&t->tm_mon, date, i); t->tm_mon -= 1; // adjust
- GetTime(&t->tm_mday, date, i);
- GetTime(&t->tm_hour, date, i);
- GetTime(&t->tm_min, date, i);
- GetTime(&t->tm_sec, date, i);
-
- assert(date[i] == 'Z'); // only Zulu supported for this profile
-}
-
-
-namespace { // locals
-
-
-// to the second
-bool operator>(tm& a, tm& b)
-{
- if (a.tm_year > b.tm_year)
- return true;
-
- if (a.tm_year == b.tm_year && a.tm_mon > b.tm_mon)
- return true;
-
- if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon && a.tm_mday >b.tm_mday)
- return true;
-
- if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon &&
- a.tm_mday == b.tm_mday && a.tm_hour > b.tm_hour)
- return true;
-
- if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon &&
- a.tm_mday == b.tm_mday && a.tm_hour == b.tm_hour &&
- a.tm_min > b.tm_min)
- return true;
-
- if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon &&
- a.tm_mday == b.tm_mday && a.tm_hour == b.tm_hour &&
- a.tm_min == b.tm_min && a.tm_sec > b.tm_sec)
- return true;
-
- return false;
-}
-
-
-bool operator<(tm& a, tm&b)
-{
- return (b>a);
-}
-
-
-// Make sure before and after dates are valid
-bool ValidateDate(const byte* date, byte format, CertDecoder::DateType dt)
-{
- tm certTime;
- time_t ltime = time(0);
- tm* localTime = gmtime(&ltime);
-
- ASN1_TIME_extract(date, format, &certTime);
-
- if (dt == CertDecoder::BEFORE) {
- if (*localTime < certTime)
- return false;
- }
- else
- if (*localTime > certTime)
- return false;
-
- return true;
-}
-
-
-class BadCertificate {};
-
-} // local namespace
-
-
-
-// used by Integer as well
-word32 GetLength(Source& source)
-{
- word32 length = 0;
-
- byte b = source.next();
- if (b >= LONG_LENGTH) {
- word32 bytes = b & 0x7F;
-
- if (source.IsLeft(bytes) == false) return 0;
-
- while (bytes--) {
- b = source.next();
- length = (length << 8) | b;
- }
- }
- else
- length = b;
-
- if (source.IsLeft(length) == false) return 0;
-
- return length;
-}
-
-
-word32 SetLength(word32 length, byte* output)
-{
- word32 i = 0;
-
- if (length < LONG_LENGTH)
- output[i++] = length;
- else {
- output[i++] = BytePrecision(length) | 0x80;
-
- for (int j = BytePrecision(length); j; --j) {
- output[i] = length >> (j - 1) * 8;
- i++;
- }
- }
- return i;
-}
-
-
-PublicKey::PublicKey(const byte* k, word32 s) : key_(0), sz_(0)
-{
- if (s) {
- SetSize(s);
- SetKey(k);
- }
-}
-
-
-void PublicKey::SetSize(word32 s)
-{
- sz_ = s;
- key_ = NEW_TC byte[sz_];
-}
-
-
-void PublicKey::SetKey(const byte* k)
-{
- memcpy(key_, k, sz_);
-}
-
-
-void PublicKey::AddToEnd(const byte* data, word32 len)
-{
- mySTL::auto_array<byte> tmp(NEW_TC byte[sz_ + len]);
-
- memcpy(tmp.get(), key_, sz_);
- memcpy(tmp.get() + sz_, data, len);
-
- byte* del = 0;
- STL::swap(del, key_);
- tcArrayDelete(del);
-
- key_ = tmp.release();
- sz_ += len;
-}
-
-
-Signer::Signer(const byte* k, word32 kSz, const char* n, const byte* h)
- : key_(k, kSz)
-{
- size_t sz = strlen(n);
- memcpy(name_, n, sz);
- name_[sz] = 0;
-
- memcpy(hash_, h, SHA::DIGEST_SIZE);
-}
-
-Signer::~Signer()
-{
-}
-
-
-Error BER_Decoder::GetError()
-{
- return source_.GetError();
-}
-
-
-Integer& BER_Decoder::GetInteger(Integer& integer)
-{
- if (!source_.GetError().What())
- integer.Decode(source_);
- return integer;
-}
-
-
-// Read a Sequence, return length
-word32 BER_Decoder::GetSequence()
-{
- if (source_.GetError().What()) return 0;
-
- byte b = source_.next();
- if (b != (SEQUENCE | CONSTRUCTED)) {
- source_.SetError(SEQUENCE_E);
- return 0;
- }
-
- return GetLength(source_);
-}
-
-
-// Read a Sequence, return length
-word32 BER_Decoder::GetSet()
-{
- if (source_.GetError().What()) return 0;
-
- byte b = source_.next();
- if (b != (SET | CONSTRUCTED)) {
- source_.SetError(SET_E);
- return 0;
- }
-
- return GetLength(source_);
-}
-
-
-// Read Version, return it
-word32 BER_Decoder::GetVersion()
-{
- if (source_.GetError().What()) return 0;
-
- byte b = source_.next();
- if (b != INTEGER) {
- source_.SetError(INTEGER_E);
- return 0;
- }
-
- b = source_.next();
- if (b != 0x01) {
- source_.SetError(VERSION_E);
- return 0;
- }
-
- return source_.next();
-}
-
-
-// Read ExplicitVersion, return it or 0 if not there (not an error)
-word32 BER_Decoder::GetExplicitVersion()
-{
- if (source_.GetError().What()) return 0;
-
- byte b = source_.next();
-
- if (b == (CONTEXT_SPECIFIC | CONSTRUCTED)) { // not an error if not here
- source_.next();
- return GetVersion();
- }
- else
- source_.prev(); // put back
-
- return 0;
-}
-
-
-// Decode a BER encoded RSA Private Key
-void RSA_Private_Decoder::Decode(RSA_PrivateKey& key)
-{
- ReadHeader();
- if (source_.GetError().What()) return;
- // public
- key.SetModulus(GetInteger(Integer().Ref()));
- key.SetPublicExponent(GetInteger(Integer().Ref()));
-
- // private
- key.SetPrivateExponent(GetInteger(Integer().Ref()));
- key.SetPrime1(GetInteger(Integer().Ref()));
- key.SetPrime2(GetInteger(Integer().Ref()));
- key.SetModPrime1PrivateExponent(GetInteger(Integer().Ref()));
- key.SetModPrime2PrivateExponent(GetInteger(Integer().Ref()));
- key.SetMultiplicativeInverseOfPrime2ModPrime1(GetInteger(Integer().Ref()));
-}
-
-
-void RSA_Private_Decoder::ReadHeader()
-{
- GetSequence();
- GetVersion();
-}
-
-
-// Decode a BER encoded DSA Private Key
-void DSA_Private_Decoder::Decode(DSA_PrivateKey& key)
-{
- ReadHeader();
- if (source_.GetError().What()) return;
- // group parameters
- key.SetModulus(GetInteger(Integer().Ref()));
- key.SetSubGroupOrder(GetInteger(Integer().Ref()));
- key.SetSubGroupGenerator(GetInteger(Integer().Ref()));
-
- // key
- key.SetPublicPart(GetInteger(Integer().Ref()));
- key.SetPrivatePart(GetInteger(Integer().Ref()));
-}
-
-
-void DSA_Private_Decoder::ReadHeader()
-{
- GetSequence();
- GetVersion();
-}
-
-
-// Decode a BER encoded RSA Public Key
-void RSA_Public_Decoder::Decode(RSA_PublicKey& key)
-{
- ReadHeader();
- if (source_.GetError().What()) return;
-
- ReadHeaderOpenSSL(); // may or may not be
- if (source_.GetError().What()) return;
-
- // public key
- key.SetModulus(GetInteger(Integer().Ref()));
- key.SetPublicExponent(GetInteger(Integer().Ref()));
-}
-
-
-// Read OpenSSL format public header
-void RSA_Public_Decoder::ReadHeaderOpenSSL()
-{
- byte b = source_.next(); // peek
- source_.prev();
-
- if (b != INTEGER) { // have OpenSSL public format
- GetSequence();
- b = source_.next();
- if (b != OBJECT_IDENTIFIER) {
- source_.SetError(OBJECT_ID_E);
- return;
- }
-
- word32 len = GetLength(source_);
- source_.advance(len);
-
- b = source_.next();
- if (b == TAG_NULL) { // could have NULL tag and 0 terminator, may not
- b = source_.next();
- if (b != 0) {
- source_.SetError(EXPECT_0_E);
- return;
- }
- }
- else
- source_.prev(); // put back
-
- b = source_.next();
- if (b != BIT_STRING) {
- source_.SetError(BIT_STR_E);
- return;
- }
-
- len = GetLength(source_);
- b = source_.next();
- if (b != 0) // could have 0
- source_.prev(); // put back
-
- GetSequence();
- }
-}
-
-
-void RSA_Public_Decoder::ReadHeader()
-{
- GetSequence();
-}
-
-
-// Decode a BER encoded DSA Public Key
-void DSA_Public_Decoder::Decode(DSA_PublicKey& key)
-{
- ReadHeader();
- if (source_.GetError().What()) return;
-
- // group parameters
- key.SetModulus(GetInteger(Integer().Ref()));
- key.SetSubGroupOrder(GetInteger(Integer().Ref()));
- key.SetSubGroupGenerator(GetInteger(Integer().Ref()));
-
- // key
- key.SetPublicPart(GetInteger(Integer().Ref()));
-}
-
-
-void DSA_Public_Decoder::ReadHeader()
-{
- GetSequence();
-}
-
-
-void DH_Decoder::ReadHeader()
-{
- GetSequence();
-}
-
-
-// Decode a BER encoded Diffie-Hellman Key
-void DH_Decoder::Decode(DH& key)
-{
- ReadHeader();
- if (source_.GetError().What()) return;
-
- // group parms
- key.SetP(GetInteger(Integer().Ref()));
- key.SetG(GetInteger(Integer().Ref()));
-}
-
-
-CertDecoder::CertDecoder(Source& s, bool decode, SignerList* signers,
- bool noVerify, CertType ct)
- : BER_Decoder(s), certBegin_(0), sigIndex_(0), sigLength_(0), subCnPos_(-1),
- subCnLen_(0), issCnPos_(-1), issCnLen_(0), signature_(0),
- verify_(!noVerify)
-{
- issuer_[0] = 0;
- subject_[0] = 0;
-
- if (decode)
- Decode(signers, ct);
-
-}
-
-
-CertDecoder::~CertDecoder()
-{
- tcArrayDelete(signature_);
-}
-
-
-// process certificate header, set signature offset
-void CertDecoder::ReadHeader()
-{
- if (source_.GetError().What()) return;
-
- GetSequence(); // total
- certBegin_ = source_.get_index();
-
- sigIndex_ = GetSequence(); // this cert
- sigIndex_ += source_.get_index();
-
- GetExplicitVersion(); // version
- GetInteger(Integer().Ref()); // serial number
-}
-
-
-// Decode a x509v3 Certificate
-void CertDecoder::Decode(SignerList* signers, CertType ct)
-{
- if (source_.GetError().What()) return;
- DecodeToKey();
- if (source_.GetError().What()) return;
-
- if (source_.get_index() != sigIndex_)
- source_.set_index(sigIndex_);
-
- word32 confirmOID = GetAlgoId();
- GetSignature();
- if (source_.GetError().What()) return;
-
- if ( confirmOID != signatureOID_ ) {
- source_.SetError(SIG_OID_E);
- return;
- }
-
- if (ct != CA && verify_ && !ValidateSignature(signers))
- source_.SetError(SIG_OTHER_E);
-}
-
-
-void CertDecoder::DecodeToKey()
-{
- ReadHeader();
- signatureOID_ = GetAlgoId();
- GetName(ISSUER);
- GetValidity();
- GetName(SUBJECT);
- GetKey();
-}
-
-
-// Read public key
-void CertDecoder::GetKey()
-{
- if (source_.GetError().What()) return;
-
- GetSequence();
- keyOID_ = GetAlgoId();
-
- if (keyOID_ == RSAk) {
- byte b = source_.next();
- if (b != BIT_STRING) {
- source_.SetError(BIT_STR_E);
- return;
- }
- b = source_.next(); // length, future
- b = source_.next();
- while(b != 0)
- b = source_.next();
- }
- else if (keyOID_ == DSAk)
- ; // do nothing
- else {
- source_.SetError(UNKNOWN_OID_E);
- return;
- }
-
- StoreKey();
- if (keyOID_ == DSAk)
- AddDSA();
-}
-
-
-// Save public key
-void CertDecoder::StoreKey()
-{
- if (source_.GetError().What()) return;
-
- word32 read = source_.get_index();
- word32 length = GetSequence();
-
- read = source_.get_index() - read;
- length += read;
-
- if (source_.GetError().What()) return;
- while (read--) source_.prev();
-
- if (source_.IsLeft(length) == false) return;
- key_.SetSize(length);
- key_.SetKey(source_.get_current());
- source_.advance(length);
-}
-
-
-// DSA has public key after group
-void CertDecoder::AddDSA()
-{
- if (source_.GetError().What()) return;
-
- byte b = source_.next();
- if (b != BIT_STRING) {
- source_.SetError(BIT_STR_E);
- return;
- }
- b = source_.next(); // length, future
- b = source_.next();
- while(b != 0)
- b = source_.next();
-
- word32 idx = source_.get_index();
- b = source_.next();
- if (b != INTEGER) {
- source_.SetError(INTEGER_E);
- return;
- }
-
- word32 length = GetLength(source_);
- length += source_.get_index() - idx;
-
- if (source_.IsLeft(length) == false) return;
-
- key_.AddToEnd(source_.get_buffer() + idx, length);
-}
-
-
-// process algo OID by summing, return it
-word32 CertDecoder::GetAlgoId()
-{
- if (source_.GetError().What()) return 0;
- word32 length = GetSequence();
-
- if (source_.GetError().What()) return 0;
-
- byte b = source_.next();
- if (b != OBJECT_IDENTIFIER) {
- source_.SetError(OBJECT_ID_E);
- return 0;
- }
-
- length = GetLength(source_);
- if (source_.IsLeft(length) == false) return 0;
-
- word32 oid = 0;
- while(length--)
- oid += source_.next(); // just sum it up for now
-
- // could have NULL tag and 0 terminator, but may not
- b = source_.next();
- if (b == TAG_NULL) {
- b = source_.next();
- if (b != 0) {
- source_.SetError(EXPECT_0_E);
- return 0;
- }
- }
- else
- // go back, didn't have it
- b = source_.prev();
-
- return oid;
-}
-
-
-// read cert signature, store in signature_
-word32 CertDecoder::GetSignature()
-{
- if (source_.GetError().What()) return 0;
- byte b = source_.next();
-
- if (b != BIT_STRING) {
- source_.SetError(BIT_STR_E);
- return 0;
- }
-
- sigLength_ = GetLength(source_);
- if (sigLength_ <= 1 || source_.IsLeft(sigLength_) == false) {
- source_.SetError(CONTENT_E);
- return 0;
- }
-
- b = source_.next();
- if (b != 0) {
- source_.SetError(EXPECT_0_E);
- return 0;
- }
- sigLength_--;
-
- signature_ = NEW_TC byte[sigLength_];
- memcpy(signature_, source_.get_current(), sigLength_);
- source_.advance(sigLength_);
-
- return sigLength_;
-}
-
-
-// read cert digest, store in signature_
-word32 CertDecoder::GetDigest()
-{
- if (source_.GetError().What()) return 0;
- byte b = source_.next();
-
- if (b != OCTET_STRING) {
- source_.SetError(OCTET_STR_E);
- return 0;
- }
-
- sigLength_ = GetLength(source_);
-
- signature_ = NEW_TC byte[sigLength_];
- memcpy(signature_, source_.get_current(), sigLength_);
- source_.advance(sigLength_);
-
- return sigLength_;
-}
-
-
-// memory length checked add tag to buffer
-char* CertDecoder::AddTag(char* ptr, const char* buf_end, const char* tag_name,
- word32 tag_name_length, word32 tag_value_length)
-{
- if (ptr + tag_name_length + tag_value_length > buf_end) {
- source_.SetError(CONTENT_E);
- return 0;
- }
-
- memcpy(ptr, tag_name, tag_name_length);
- ptr += tag_name_length;
-
- memcpy(ptr, source_.get_current(), tag_value_length);
- ptr += tag_value_length;
-
- return ptr;
-}
-
-
-// process NAME, either issuer or subject
-void CertDecoder::GetName(NameType nt)
-{
- if (source_.GetError().What()) return;
-
- SHA sha;
- word32 length = GetSequence(); // length of all distinguished names
-
- if (length >= ASN_NAME_MAX)
- return;
- if (source_.IsLeft(length) == false) return;
- length += source_.get_index();
-
- char* ptr;
- char* buf_end;
-
- if (nt == ISSUER) {
- ptr = issuer_;
- buf_end = ptr + sizeof(issuer_) - 1; // 1 byte for trailing 0
- }
- else {
- ptr = subject_;
- buf_end = ptr + sizeof(subject_) - 1; // 1 byte for trailing 0
- }
-
- while (source_.get_index() < length) {
- GetSet();
- if (source_.GetError().What() == SET_E) {
- source_.SetError(NO_ERROR_E); // extensions may only have sequence
- source_.prev();
- }
- GetSequence();
-
- byte b = source_.next();
- if (b != OBJECT_IDENTIFIER) {
- source_.SetError(OBJECT_ID_E);
- return;
- }
-
- word32 oidSz = GetLength(source_);
- if (source_.IsLeft(oidSz) == false) return;
-
- byte joint[2];
- if (source_.IsLeft(sizeof(joint)) == false) return;
- memcpy(joint, source_.get_current(), sizeof(joint));
-
- // v1 name types
- if (joint[0] == 0x55 && joint[1] == 0x04) {
- source_.advance(2);
- byte id = source_.next();
- b = source_.next(); // strType
- word32 strLen = GetLength(source_);
-
- if (source_.IsLeft(strLen) == false) return;
-
- switch (id) {
- case COMMON_NAME:
- if (!(ptr = AddTag(ptr, buf_end, "/CN=", 4, strLen)))
- return;
- if (nt == ISSUER) {
- issCnPos_ = (int)(ptr - strLen - issuer_);
- issCnLen_ = (int)strLen;
- } else {
- subCnPos_ = (int)(ptr - strLen - subject_);
- subCnLen_ = (int)strLen;
- }
- break;
- case SUR_NAME:
- if (!(ptr = AddTag(ptr, buf_end, "/SN=", 4, strLen)))
- return;
- break;
- case COUNTRY_NAME:
- if (!(ptr = AddTag(ptr, buf_end, "/C=", 3, strLen)))
- return;
- break;
- case LOCALITY_NAME:
- if (!(ptr = AddTag(ptr, buf_end, "/L=", 3, strLen)))
- return;
- break;
- case STATE_NAME:
- if (!(ptr = AddTag(ptr, buf_end, "/ST=", 4, strLen)))
- return;
- break;
- case ORG_NAME:
- if (!(ptr = AddTag(ptr, buf_end, "/O=", 3, strLen)))
- return;
- break;
- case ORGUNIT_NAME:
- if (!(ptr = AddTag(ptr, buf_end, "/OU=", 4, strLen)))
- return;
- break;
- }
-
- sha.Update(source_.get_current(), strLen);
- source_.advance(strLen);
- }
- else {
- bool email = false;
- if (joint[0] == 0x2a && joint[1] == 0x86) // email id hdr
- email = true;
-
- source_.advance(oidSz + 1);
- word32 length = GetLength(source_);
- if (source_.IsLeft(length) == false) return;
-
- if (email) {
- if (!(ptr = AddTag(ptr, buf_end, "/emailAddress=", 14, length)))
- return;
- }
-
- source_.advance(length);
- }
- }
-
- *ptr = 0;
-
- if (nt == ISSUER)
- sha.Final(issuerHash_);
- else
- sha.Final(subjectHash_);
-}
-
-
-// process a Date, either BEFORE or AFTER
-void CertDecoder::GetDate(DateType dt)
-{
- if (source_.GetError().What()) return;
-
- byte b = source_.next();
- if (b != UTC_TIME && b != GENERALIZED_TIME) {
- source_.SetError(TIME_E);
- return;
- }
-
- word32 length = GetLength(source_);
- if (source_.IsLeft(length) == false) return;
-
- byte date[MAX_DATE_SZ];
- if (length > MAX_DATE_SZ || length < MIN_DATE_SZ) {
- source_.SetError(DATE_SZ_E);
- return;
- }
-
- memcpy(date, source_.get_current(), length);
- source_.advance(length);
-
- if (!ValidateDate(date, b, dt) && verify_) {
- if (dt == BEFORE)
- source_.SetError(BEFORE_DATE_E);
- else
- source_.SetError(AFTER_DATE_E);
- }
-
- // save for later use
- if (dt == BEFORE) {
- memcpy(beforeDate_, date, length);
- beforeDate_[length] = 0;
- beforeDateType_= b;
- }
- else { // after
- memcpy(afterDate_, date, length);
- afterDate_[length] = 0;
- afterDateType_= b;
- }
-}
-
-
-void CertDecoder::GetValidity()
-{
- if (source_.GetError().What()) return;
-
- GetSequence();
- GetDate(BEFORE);
- GetDate(AFTER);
-}
-
-
-bool CertDecoder::ValidateSelfSignature()
-{
- Source pub(key_.GetKey(), key_.size());
- return ConfirmSignature(pub);
-}
-
-
-// extract compare signature hash from plain and place into digest
-void CertDecoder::GetCompareHash(const byte* plain, word32 sz, byte* digest,
- word32 digSz)
-{
- if (source_.GetError().What()) return;
-
- Source s(plain, sz);
- CertDecoder dec(s, false);
-
- dec.GetSequence();
- dec.GetAlgoId();
- dec.GetDigest();
-
- if (dec.sigLength_ > digSz) {
- source_.SetError(SIG_LEN_E);
- return;
- }
-
- memcpy(digest, dec.signature_, dec.sigLength_);
-}
-
-
-// validate signature signed by someone else
-bool CertDecoder::ValidateSignature(SignerList* signers)
-{
- if (!signers)
- return false;
-
- SignerList::iterator first = signers->begin();
- SignerList::iterator last = signers->end();
-
- while (first != last) {
- if ( memcmp(issuerHash_, (*first)->GetHash(), SHA::DIGEST_SIZE) == 0) {
-
- const PublicKey& iKey = (*first)->GetPublicKey();
- Source pub(iKey.GetKey(), iKey.size());
- return ConfirmSignature(pub);
- }
- ++first;
- }
- return false;
-}
-
-
-// confirm certificate signature
-bool CertDecoder::ConfirmSignature(Source& pub)
-{
- HashType ht;
- mySTL::auto_ptr<HASH> hasher;
-
- if (signatureOID_ == MD5wRSA) {
- hasher.reset(NEW_TC MD5);
- ht = MD5h;
- }
- else if (signatureOID_ == MD2wRSA) {
- hasher.reset(NEW_TC MD2);
- ht = MD2h;
- }
- else if (signatureOID_ == SHAwRSA || signatureOID_ == SHAwDSA) {
- hasher.reset(NEW_TC SHA);
- ht = SHAh;
- }
- else if (signatureOID_ == SHA256wRSA || signatureOID_ == SHA256wDSA) {
- hasher.reset(NEW_TC SHA256);
- ht = SHA256h;
- }
-#ifdef WORD64_AVAILABLE
- else if (signatureOID_ == SHA384wRSA) {
- hasher.reset(NEW_TC SHA384);
- ht = SHA384h;
- }
- else if (signatureOID_ == SHA512wRSA) {
- hasher.reset(NEW_TC SHA512);
- ht = SHA512h;
- }
-#endif
- else {
- source_.SetError(UNKNOWN_SIG_E);
- return false;
- }
-
- byte digest[MAX_SHA2_DIGEST_SIZE]; // largest size
-
- hasher->Update(source_.get_buffer() + certBegin_, sigIndex_ - certBegin_);
- hasher->Final(digest);
-
- if (keyOID_ == RSAk) {
- // put in ASN.1 signature format
- Source build;
- Signature_Encoder(digest, hasher->getDigestSize(), ht, build);
-
- RSA_PublicKey pubKey(pub);
- RSAES_Encryptor enc(pubKey);
-
- if (pubKey.FixedCiphertextLength() != sigLength_) {
- source_.SetError(SIG_LEN_E);
- return false;
- }
-
- return enc.SSL_Verify(build.get_buffer(), build.size(), signature_);
- }
- else { // DSA
- // extract r and s from sequence
- byte seqDecoded[DSA_SIG_SZ];
- memset(seqDecoded, 0, sizeof(seqDecoded));
- DecodeDSA_Signature(seqDecoded, signature_, sigLength_);
-
- DSA_PublicKey pubKey(pub);
- DSA_Verifier ver(pubKey);
-
- return ver.Verify(digest, seqDecoded);
- }
-}
-
-
-Signature_Encoder::Signature_Encoder(const byte* dig, word32 digSz,
- HashType digOID, Source& source)
-{
- // build bottom up
-
- // Digest
- byte digArray[MAX_DIGEST_SZ];
- word32 digestSz = SetDigest(dig, digSz, digArray);
-
- // AlgoID
- byte algoArray[MAX_ALGO_SZ];
- word32 algoSz = SetAlgoID(digOID, algoArray);
-
- // Sequence
- byte seqArray[MAX_SEQ_SZ];
- word32 seqSz = SetSequence(digestSz + algoSz, seqArray);
-
- source.grow(seqSz + algoSz + digestSz); // make sure enough room
- source.add(seqArray, seqSz);
- source.add(algoArray, algoSz);
- source.add(digArray, digestSz);
-}
-
-
-
-word32 Signature_Encoder::SetDigest(const byte* d, word32 dSz, byte* output)
-{
- output[0] = OCTET_STRING;
- output[1] = dSz;
- memcpy(&output[2], d, dSz);
-
- return dSz + 2;
-}
-
-
-
-word32 DER_Encoder::SetAlgoID(HashType aOID, byte* output)
-{
- // adding TAG_NULL and 0 to end
- static const byte shaAlgoID[] = { 0x2b, 0x0e, 0x03, 0x02, 0x1a,
- 0x05, 0x00 };
- static const byte md5AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
- 0x02, 0x05, 0x05, 0x00 };
- static const byte md2AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
- 0x02, 0x02, 0x05, 0x00};
- static const byte sha256AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03,
- 0x04, 0x02, 0x01, 0x05, 0x00 };
- static const byte sha384AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03,
- 0x04, 0x02, 0x02, 0x05, 0x00 };
- static const byte sha512AlgoID[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03,
- 0x04, 0x02, 0x03, 0x05, 0x00 };
-
- int algoSz = 0;
- const byte* algoName = 0;
-
- switch (aOID) {
- case SHAh:
- algoSz = sizeof(shaAlgoID);
- algoName = shaAlgoID;
- break;
-
- case SHA256h:
- algoSz = sizeof(sha256AlgoID);
- algoName = sha256AlgoID;
- break;
-
- case SHA384h:
- algoSz = sizeof(sha384AlgoID);
- algoName = sha384AlgoID;
- break;
-
- case SHA512h:
- algoSz = sizeof(sha512AlgoID);
- algoName = sha512AlgoID;
- break;
-
- case MD2h:
- algoSz = sizeof(md2AlgoID);
- algoName = md2AlgoID;
- break;
-
- case MD5h:
- algoSz = sizeof(md5AlgoID);
- algoName = md5AlgoID;
- break;
-
- default:
- error_.SetError(UNKNOWN_HASH_E);
- return 0;
- }
-
-
- byte ID_Length[MAX_LENGTH_SZ];
- word32 idSz = SetLength(algoSz - 2, ID_Length); // don't include TAG_NULL/0
-
- byte seqArray[MAX_SEQ_SZ + 1]; // add object_id to end
- word32 seqSz = SetSequence(idSz + algoSz + 1, seqArray);
- seqArray[seqSz++] = OBJECT_IDENTIFIER;
-
- memcpy(output, seqArray, seqSz);
- memcpy(output + seqSz, ID_Length, idSz);
- memcpy(output + seqSz + idSz, algoName, algoSz);
-
- return seqSz + idSz + algoSz;
-}
-
-
-word32 SetSequence(word32 len, byte* output)
-{
-
- output[0] = SEQUENCE | CONSTRUCTED;
- return SetLength(len, output + 1) + 1;
-}
-
-
-word32 EncodeDSA_Signature(const byte* signature, byte* output)
-{
- Integer r(signature, 20);
- Integer s(signature + 20, 20);
-
- return EncodeDSA_Signature(r, s, output);
-}
-
-
-word32 EncodeDSA_Signature(const Integer& r, const Integer& s, byte* output)
-{
- word32 rSz = r.ByteCount();
- word32 sSz = s.ByteCount();
-
- byte rLen[MAX_LENGTH_SZ + 1];
- byte sLen[MAX_LENGTH_SZ + 1];
-
- rLen[0] = INTEGER;
- sLen[0] = INTEGER;
-
- word32 rLenSz = SetLength(rSz, &rLen[1]) + 1;
- word32 sLenSz = SetLength(sSz, &sLen[1]) + 1;
-
- byte seqArray[MAX_SEQ_SZ];
-
- word32 seqSz = SetSequence(rLenSz + rSz + sLenSz + sSz, seqArray);
-
- // seq
- memcpy(output, seqArray, seqSz);
- // r
- memcpy(output + seqSz, rLen, rLenSz);
- r.Encode(output + seqSz + rLenSz, rSz);
- // s
- memcpy(output + seqSz + rLenSz + rSz, sLen, sLenSz);
- s.Encode(output + seqSz + rLenSz + rSz + sLenSz, sSz);
-
- return seqSz + rLenSz + rSz + sLenSz + sSz;
-}
-
-
-// put sequence encoded dsa signature into decoded in 2 20 byte integers
-word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
-{
- Source source(encoded, sz);
-
- if (source.next() != (SEQUENCE | CONSTRUCTED)) {
- source.SetError(SEQUENCE_E);
- return 0;
- }
-
- GetLength(source); // total
-
- // r
- if (source.next() != INTEGER) {
- source.SetError(INTEGER_E);
- return 0;
- }
- word32 rLen = GetLength(source);
- if (rLen != 20) {
- while (rLen > 20 && source.remaining() > 0) { // zero's at front, eat
- source.next();
- --rLen;
- }
- if (rLen < 20) { // add zero's to front so 20 bytes
- word32 tmpLen = rLen;
- while (tmpLen < 20) {
- decoded[0] = 0;
- decoded++;
- tmpLen++;
- }
- }
- }
- memcpy(decoded, source.get_buffer() + source.get_index(), rLen);
- source.advance(rLen);
-
- // s
- if (source.next() != INTEGER) {
- source.SetError(INTEGER_E);
- return 0;
- }
- word32 sLen = GetLength(source);
- if (sLen != 20) {
- while (sLen > 20 && source.remaining() > 0) {
- source.next(); // zero's at front, eat
- --sLen;
- }
- if (sLen < 20) { // add zero's to front so 20 bytes
- word32 tmpLen = sLen;
- while (tmpLen < 20) {
- decoded[rLen] = 0;
- decoded++;
- tmpLen++;
- }
- }
- }
- memcpy(decoded + rLen, source.get_buffer() + source.get_index(), sLen);
- source.advance(sLen);
-
- return 40;
-}
-
-
-/*
-// Get Cert in PEM format from BEGIN to END
-int GetCert(Source& source)
-{
- char header[] = "-----BEGIN CERTIFICATE-----";
- char footer[] = "-----END CERTIFICATE-----";
-
- char* begin = strstr((char*)source.get_buffer(), header);
- char* end = strstr((char*)source.get_buffer(), footer);
-
- if (!begin || !end || begin >= end) return -1;
-
- end += strlen(footer);
- if (*end == '\r') end++;
-
- Source tmp((byte*)begin, end - begin + 1);
- source.Swap(tmp);
-
- return 0;
-}
-
-
-
-// Decode a BER encoded PKCS12 structure
-void PKCS12_Decoder::Decode()
-{
- ReadHeader();
- if (source_.GetError().What()) return;
-
- // Get AuthSafe
-
- GetSequence();
-
- // get object id
- byte obj_id = source_.next();
- if (obj_id != OBJECT_IDENTIFIER) {
- source_.SetError(OBJECT_ID_E);
- return;
- }
-
- word32 length = GetLength(source_);
-
- word32 algo_sum = 0;
- while (length--)
- algo_sum += source_.next();
-
-
-
-
-
-
- // Get MacData optional
- // mac digestInfo like certdecoder::getdigest?
- // macsalt octet string
- // iter integer
-
-}
-
-
-void PKCS12_Decoder::ReadHeader()
-{
- // Gets Version
- GetSequence();
- GetVersion();
-}
-
-
-// Get Cert in PEM format from pkcs12 file
-int GetPKCS_Cert(const char* password, Source& source)
-{
- PKCS12_Decoder pkcs12(source);
- pkcs12.Decode();
-
- return 0;
-}
-*/
-
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/bftables.cpp b/extra/yassl/taocrypt/src/bftables.cpp
deleted file mode 100644
index 088f9778da1..00000000000
--- a/extra/yassl/taocrypt/src/bftables.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's bfinit.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "blowfish.hpp"
-
-
-namespace TaoCrypt {
-
-const word32 Blowfish::p_init_[Blowfish::ROUNDS+2] =
-{
- 608135816U, 2242054355U, 320440878U, 57701188U,
- 2752067618U, 698298832U, 137296536U, 3964562569U,
- 1160258022U, 953160567U, 3193202383U, 887688300U,
- 3232508343U, 3380367581U, 1065670069U, 3041331479U,
- 2450970073U, 2306472731U
-} ;
-
-
-const word32 Blowfish::s_init_[4*256] = {
- 3509652390U, 2564797868U, 805139163U, 3491422135U,
- 3101798381U, 1780907670U, 3128725573U, 4046225305U,
- 614570311U, 3012652279U, 134345442U, 2240740374U,
- 1667834072U, 1901547113U, 2757295779U, 4103290238U,
- 227898511U, 1921955416U, 1904987480U, 2182433518U,
- 2069144605U, 3260701109U, 2620446009U, 720527379U,
- 3318853667U, 677414384U, 3393288472U, 3101374703U,
- 2390351024U, 1614419982U, 1822297739U, 2954791486U,
- 3608508353U, 3174124327U, 2024746970U, 1432378464U,
- 3864339955U, 2857741204U, 1464375394U, 1676153920U,
- 1439316330U, 715854006U, 3033291828U, 289532110U,
- 2706671279U, 2087905683U, 3018724369U, 1668267050U,
- 732546397U, 1947742710U, 3462151702U, 2609353502U,
- 2950085171U, 1814351708U, 2050118529U, 680887927U,
- 999245976U, 1800124847U, 3300911131U, 1713906067U,
- 1641548236U, 4213287313U, 1216130144U, 1575780402U,
- 4018429277U, 3917837745U, 3693486850U, 3949271944U,
- 596196993U, 3549867205U, 258830323U, 2213823033U,
- 772490370U, 2760122372U, 1774776394U, 2652871518U,
- 566650946U, 4142492826U, 1728879713U, 2882767088U,
- 1783734482U, 3629395816U, 2517608232U, 2874225571U,
- 1861159788U, 326777828U, 3124490320U, 2130389656U,
- 2716951837U, 967770486U, 1724537150U, 2185432712U,
- 2364442137U, 1164943284U, 2105845187U, 998989502U,
- 3765401048U, 2244026483U, 1075463327U, 1455516326U,
- 1322494562U, 910128902U, 469688178U, 1117454909U,
- 936433444U, 3490320968U, 3675253459U, 1240580251U,
- 122909385U, 2157517691U, 634681816U, 4142456567U,
- 3825094682U, 3061402683U, 2540495037U, 79693498U,
- 3249098678U, 1084186820U, 1583128258U, 426386531U,
- 1761308591U, 1047286709U, 322548459U, 995290223U,
- 1845252383U, 2603652396U, 3431023940U, 2942221577U,
- 3202600964U, 3727903485U, 1712269319U, 422464435U,
- 3234572375U, 1170764815U, 3523960633U, 3117677531U,
- 1434042557U, 442511882U, 3600875718U, 1076654713U,
- 1738483198U, 4213154764U, 2393238008U, 3677496056U,
- 1014306527U, 4251020053U, 793779912U, 2902807211U,
- 842905082U, 4246964064U, 1395751752U, 1040244610U,
- 2656851899U, 3396308128U, 445077038U, 3742853595U,
- 3577915638U, 679411651U, 2892444358U, 2354009459U,
- 1767581616U, 3150600392U, 3791627101U, 3102740896U,
- 284835224U, 4246832056U, 1258075500U, 768725851U,
- 2589189241U, 3069724005U, 3532540348U, 1274779536U,
- 3789419226U, 2764799539U, 1660621633U, 3471099624U,
- 4011903706U, 913787905U, 3497959166U, 737222580U,
- 2514213453U, 2928710040U, 3937242737U, 1804850592U,
- 3499020752U, 2949064160U, 2386320175U, 2390070455U,
- 2415321851U, 4061277028U, 2290661394U, 2416832540U,
- 1336762016U, 1754252060U, 3520065937U, 3014181293U,
- 791618072U, 3188594551U, 3933548030U, 2332172193U,
- 3852520463U, 3043980520U, 413987798U, 3465142937U,
- 3030929376U, 4245938359U, 2093235073U, 3534596313U,
- 375366246U, 2157278981U, 2479649556U, 555357303U,
- 3870105701U, 2008414854U, 3344188149U, 4221384143U,
- 3956125452U, 2067696032U, 3594591187U, 2921233993U,
- 2428461U, 544322398U, 577241275U, 1471733935U,
- 610547355U, 4027169054U, 1432588573U, 1507829418U,
- 2025931657U, 3646575487U, 545086370U, 48609733U,
- 2200306550U, 1653985193U, 298326376U, 1316178497U,
- 3007786442U, 2064951626U, 458293330U, 2589141269U,
- 3591329599U, 3164325604U, 727753846U, 2179363840U,
- 146436021U, 1461446943U, 4069977195U, 705550613U,
- 3059967265U, 3887724982U, 4281599278U, 3313849956U,
- 1404054877U, 2845806497U, 146425753U, 1854211946U,
-
- 1266315497U, 3048417604U, 3681880366U, 3289982499U,
- 2909710000U, 1235738493U, 2632868024U, 2414719590U,
- 3970600049U, 1771706367U, 1449415276U, 3266420449U,
- 422970021U, 1963543593U, 2690192192U, 3826793022U,
- 1062508698U, 1531092325U, 1804592342U, 2583117782U,
- 2714934279U, 4024971509U, 1294809318U, 4028980673U,
- 1289560198U, 2221992742U, 1669523910U, 35572830U,
- 157838143U, 1052438473U, 1016535060U, 1802137761U,
- 1753167236U, 1386275462U, 3080475397U, 2857371447U,
- 1040679964U, 2145300060U, 2390574316U, 1461121720U,
- 2956646967U, 4031777805U, 4028374788U, 33600511U,
- 2920084762U, 1018524850U, 629373528U, 3691585981U,
- 3515945977U, 2091462646U, 2486323059U, 586499841U,
- 988145025U, 935516892U, 3367335476U, 2599673255U,
- 2839830854U, 265290510U, 3972581182U, 2759138881U,
- 3795373465U, 1005194799U, 847297441U, 406762289U,
- 1314163512U, 1332590856U, 1866599683U, 4127851711U,
- 750260880U, 613907577U, 1450815602U, 3165620655U,
- 3734664991U, 3650291728U, 3012275730U, 3704569646U,
- 1427272223U, 778793252U, 1343938022U, 2676280711U,
- 2052605720U, 1946737175U, 3164576444U, 3914038668U,
- 3967478842U, 3682934266U, 1661551462U, 3294938066U,
- 4011595847U, 840292616U, 3712170807U, 616741398U,
- 312560963U, 711312465U, 1351876610U, 322626781U,
- 1910503582U, 271666773U, 2175563734U, 1594956187U,
- 70604529U, 3617834859U, 1007753275U, 1495573769U,
- 4069517037U, 2549218298U, 2663038764U, 504708206U,
- 2263041392U, 3941167025U, 2249088522U, 1514023603U,
- 1998579484U, 1312622330U, 694541497U, 2582060303U,
- 2151582166U, 1382467621U, 776784248U, 2618340202U,
- 3323268794U, 2497899128U, 2784771155U, 503983604U,
- 4076293799U, 907881277U, 423175695U, 432175456U,
- 1378068232U, 4145222326U, 3954048622U, 3938656102U,
- 3820766613U, 2793130115U, 2977904593U, 26017576U,
- 3274890735U, 3194772133U, 1700274565U, 1756076034U,
- 4006520079U, 3677328699U, 720338349U, 1533947780U,
- 354530856U, 688349552U, 3973924725U, 1637815568U,
- 332179504U, 3949051286U, 53804574U, 2852348879U,
- 3044236432U, 1282449977U, 3583942155U, 3416972820U,
- 4006381244U, 1617046695U, 2628476075U, 3002303598U,
- 1686838959U, 431878346U, 2686675385U, 1700445008U,
- 1080580658U, 1009431731U, 832498133U, 3223435511U,
- 2605976345U, 2271191193U, 2516031870U, 1648197032U,
- 4164389018U, 2548247927U, 300782431U, 375919233U,
- 238389289U, 3353747414U, 2531188641U, 2019080857U,
- 1475708069U, 455242339U, 2609103871U, 448939670U,
- 3451063019U, 1395535956U, 2413381860U, 1841049896U,
- 1491858159U, 885456874U, 4264095073U, 4001119347U,
- 1565136089U, 3898914787U, 1108368660U, 540939232U,
- 1173283510U, 2745871338U, 3681308437U, 4207628240U,
- 3343053890U, 4016749493U, 1699691293U, 1103962373U,
- 3625875870U, 2256883143U, 3830138730U, 1031889488U,
- 3479347698U, 1535977030U, 4236805024U, 3251091107U,
- 2132092099U, 1774941330U, 1199868427U, 1452454533U,
- 157007616U, 2904115357U, 342012276U, 595725824U,
- 1480756522U, 206960106U, 497939518U, 591360097U,
- 863170706U, 2375253569U, 3596610801U, 1814182875U,
- 2094937945U, 3421402208U, 1082520231U, 3463918190U,
- 2785509508U, 435703966U, 3908032597U, 1641649973U,
- 2842273706U, 3305899714U, 1510255612U, 2148256476U,
- 2655287854U, 3276092548U, 4258621189U, 236887753U,
- 3681803219U, 274041037U, 1734335097U, 3815195456U,
- 3317970021U, 1899903192U, 1026095262U, 4050517792U,
- 356393447U, 2410691914U, 3873677099U, 3682840055U,
-
- 3913112168U, 2491498743U, 4132185628U, 2489919796U,
- 1091903735U, 1979897079U, 3170134830U, 3567386728U,
- 3557303409U, 857797738U, 1136121015U, 1342202287U,
- 507115054U, 2535736646U, 337727348U, 3213592640U,
- 1301675037U, 2528481711U, 1895095763U, 1721773893U,
- 3216771564U, 62756741U, 2142006736U, 835421444U,
- 2531993523U, 1442658625U, 3659876326U, 2882144922U,
- 676362277U, 1392781812U, 170690266U, 3921047035U,
- 1759253602U, 3611846912U, 1745797284U, 664899054U,
- 1329594018U, 3901205900U, 3045908486U, 2062866102U,
- 2865634940U, 3543621612U, 3464012697U, 1080764994U,
- 553557557U, 3656615353U, 3996768171U, 991055499U,
- 499776247U, 1265440854U, 648242737U, 3940784050U,
- 980351604U, 3713745714U, 1749149687U, 3396870395U,
- 4211799374U, 3640570775U, 1161844396U, 3125318951U,
- 1431517754U, 545492359U, 4268468663U, 3499529547U,
- 1437099964U, 2702547544U, 3433638243U, 2581715763U,
- 2787789398U, 1060185593U, 1593081372U, 2418618748U,
- 4260947970U, 69676912U, 2159744348U, 86519011U,
- 2512459080U, 3838209314U, 1220612927U, 3339683548U,
- 133810670U, 1090789135U, 1078426020U, 1569222167U,
- 845107691U, 3583754449U, 4072456591U, 1091646820U,
- 628848692U, 1613405280U, 3757631651U, 526609435U,
- 236106946U, 48312990U, 2942717905U, 3402727701U,
- 1797494240U, 859738849U, 992217954U, 4005476642U,
- 2243076622U, 3870952857U, 3732016268U, 765654824U,
- 3490871365U, 2511836413U, 1685915746U, 3888969200U,
- 1414112111U, 2273134842U, 3281911079U, 4080962846U,
- 172450625U, 2569994100U, 980381355U, 4109958455U,
- 2819808352U, 2716589560U, 2568741196U, 3681446669U,
- 3329971472U, 1835478071U, 660984891U, 3704678404U,
- 4045999559U, 3422617507U, 3040415634U, 1762651403U,
- 1719377915U, 3470491036U, 2693910283U, 3642056355U,
- 3138596744U, 1364962596U, 2073328063U, 1983633131U,
- 926494387U, 3423689081U, 2150032023U, 4096667949U,
- 1749200295U, 3328846651U, 309677260U, 2016342300U,
- 1779581495U, 3079819751U, 111262694U, 1274766160U,
- 443224088U, 298511866U, 1025883608U, 3806446537U,
- 1145181785U, 168956806U, 3641502830U, 3584813610U,
- 1689216846U, 3666258015U, 3200248200U, 1692713982U,
- 2646376535U, 4042768518U, 1618508792U, 1610833997U,
- 3523052358U, 4130873264U, 2001055236U, 3610705100U,
- 2202168115U, 4028541809U, 2961195399U, 1006657119U,
- 2006996926U, 3186142756U, 1430667929U, 3210227297U,
- 1314452623U, 4074634658U, 4101304120U, 2273951170U,
- 1399257539U, 3367210612U, 3027628629U, 1190975929U,
- 2062231137U, 2333990788U, 2221543033U, 2438960610U,
- 1181637006U, 548689776U, 2362791313U, 3372408396U,
- 3104550113U, 3145860560U, 296247880U, 1970579870U,
- 3078560182U, 3769228297U, 1714227617U, 3291629107U,
- 3898220290U, 166772364U, 1251581989U, 493813264U,
- 448347421U, 195405023U, 2709975567U, 677966185U,
- 3703036547U, 1463355134U, 2715995803U, 1338867538U,
- 1343315457U, 2802222074U, 2684532164U, 233230375U,
- 2599980071U, 2000651841U, 3277868038U, 1638401717U,
- 4028070440U, 3237316320U, 6314154U, 819756386U,
- 300326615U, 590932579U, 1405279636U, 3267499572U,
- 3150704214U, 2428286686U, 3959192993U, 3461946742U,
- 1862657033U, 1266418056U, 963775037U, 2089974820U,
- 2263052895U, 1917689273U, 448879540U, 3550394620U,
- 3981727096U, 150775221U, 3627908307U, 1303187396U,
- 508620638U, 2975983352U, 2726630617U, 1817252668U,
- 1876281319U, 1457606340U, 908771278U, 3720792119U,
- 3617206836U, 2455994898U, 1729034894U, 1080033504U,
-
- 976866871U, 3556439503U, 2881648439U, 1522871579U,
- 1555064734U, 1336096578U, 3548522304U, 2579274686U,
- 3574697629U, 3205460757U, 3593280638U, 3338716283U,
- 3079412587U, 564236357U, 2993598910U, 1781952180U,
- 1464380207U, 3163844217U, 3332601554U, 1699332808U,
- 1393555694U, 1183702653U, 3581086237U, 1288719814U,
- 691649499U, 2847557200U, 2895455976U, 3193889540U,
- 2717570544U, 1781354906U, 1676643554U, 2592534050U,
- 3230253752U, 1126444790U, 2770207658U, 2633158820U,
- 2210423226U, 2615765581U, 2414155088U, 3127139286U,
- 673620729U, 2805611233U, 1269405062U, 4015350505U,
- 3341807571U, 4149409754U, 1057255273U, 2012875353U,
- 2162469141U, 2276492801U, 2601117357U, 993977747U,
- 3918593370U, 2654263191U, 753973209U, 36408145U,
- 2530585658U, 25011837U, 3520020182U, 2088578344U,
- 530523599U, 2918365339U, 1524020338U, 1518925132U,
- 3760827505U, 3759777254U, 1202760957U, 3985898139U,
- 3906192525U, 674977740U, 4174734889U, 2031300136U,
- 2019492241U, 3983892565U, 4153806404U, 3822280332U,
- 352677332U, 2297720250U, 60907813U, 90501309U,
- 3286998549U, 1016092578U, 2535922412U, 2839152426U,
- 457141659U, 509813237U, 4120667899U, 652014361U,
- 1966332200U, 2975202805U, 55981186U, 2327461051U,
- 676427537U, 3255491064U, 2882294119U, 3433927263U,
- 1307055953U, 942726286U, 933058658U, 2468411793U,
- 3933900994U, 4215176142U, 1361170020U, 2001714738U,
- 2830558078U, 3274259782U, 1222529897U, 1679025792U,
- 2729314320U, 3714953764U, 1770335741U, 151462246U,
- 3013232138U, 1682292957U, 1483529935U, 471910574U,
- 1539241949U, 458788160U, 3436315007U, 1807016891U,
- 3718408830U, 978976581U, 1043663428U, 3165965781U,
- 1927990952U, 4200891579U, 2372276910U, 3208408903U,
- 3533431907U, 1412390302U, 2931980059U, 4132332400U,
- 1947078029U, 3881505623U, 4168226417U, 2941484381U,
- 1077988104U, 1320477388U, 886195818U, 18198404U,
- 3786409000U, 2509781533U, 112762804U, 3463356488U,
- 1866414978U, 891333506U, 18488651U, 661792760U,
- 1628790961U, 3885187036U, 3141171499U, 876946877U,
- 2693282273U, 1372485963U, 791857591U, 2686433993U,
- 3759982718U, 3167212022U, 3472953795U, 2716379847U,
- 445679433U, 3561995674U, 3504004811U, 3574258232U,
- 54117162U, 3331405415U, 2381918588U, 3769707343U,
- 4154350007U, 1140177722U, 4074052095U, 668550556U,
- 3214352940U, 367459370U, 261225585U, 2610173221U,
- 4209349473U, 3468074219U, 3265815641U, 314222801U,
- 3066103646U, 3808782860U, 282218597U, 3406013506U,
- 3773591054U, 379116347U, 1285071038U, 846784868U,
- 2669647154U, 3771962079U, 3550491691U, 2305946142U,
- 453669953U, 1268987020U, 3317592352U, 3279303384U,
- 3744833421U, 2610507566U, 3859509063U, 266596637U,
- 3847019092U, 517658769U, 3462560207U, 3443424879U,
- 370717030U, 4247526661U, 2224018117U, 4143653529U,
- 4112773975U, 2788324899U, 2477274417U, 1456262402U,
- 2901442914U, 1517677493U, 1846949527U, 2295493580U,
- 3734397586U, 2176403920U, 1280348187U, 1908823572U,
- 3871786941U, 846861322U, 1172426758U, 3287448474U,
- 3383383037U, 1655181056U, 3139813346U, 901632758U,
- 1897031941U, 2986607138U, 3066810236U, 3447102507U,
- 1393639104U, 373351379U, 950779232U, 625454576U,
- 3124240540U, 4148612726U, 2007998917U, 544563296U,
- 2244738638U, 2330496472U, 2058025392U, 1291430526U,
- 424198748U, 50039436U, 29584100U, 3605783033U,
- 2429876329U, 2791104160U, 1057563949U, 3255363231U,
- 3075367218U, 3463963227U, 1469046755U, 985887462U
-};
-
-
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/blowfish.cpp b/extra/yassl/taocrypt/src/blowfish.cpp
deleted file mode 100644
index 45f6fb793f8..00000000000
--- a/extra/yassl/taocrypt/src/blowfish.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* C++ code based on Wei Dai's blowfish.cpp from CryptoPP */
-/* x86 asm is original */
-
-
-#if defined(TAOCRYPT_KERNEL_MODE)
- #define DO_TAOCRYPT_KERNEL_MODE
-#endif // only some modules now support this
-
-
-#include "runtime.hpp"
-#include "blowfish.hpp"
-
-
-
-
-
-namespace TaoCrypt {
-
-
-#if defined(DO_BLOWFISH_ASM)
-
-// ia32 optimized version
-void Blowfish::Process(byte* out, const byte* in, word32 sz)
-{
- if (!isMMX) {
- Mode_BASE::Process(out, in, sz);
- return;
- }
-
- word32 blocks = sz / BLOCK_SIZE;
-
- if (mode_ == ECB)
- while (blocks--) {
- AsmProcess(in, out);
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- else if (mode_ == CBC) {
- if (dir_ == ENCRYPTION) {
- while (blocks--) {
- r_[0] ^= *(word32*)in;
- r_[1] ^= *(word32*)(in + 4);
-
- AsmProcess((byte*)r_, (byte*)r_);
-
- memcpy(out, r_, BLOCK_SIZE);
-
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- }
- else {
- while (blocks--) {
- AsmProcess(in, out);
-
- *(word32*)out ^= r_[0];
- *(word32*)(out + 4) ^= r_[1];
-
- memcpy(r_, in, BLOCK_SIZE);
-
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- }
- }
-}
-
-#endif // DO_BLOWFISH_ASM
-
-
-void Blowfish::SetKey(const byte* key_string, word32 keylength, CipherDir dir)
-{
- if (keylength < 4)
- keylength = 4;
- else if (keylength > 56)
- keylength = 56;
-
- unsigned i, j=0, k;
- word32 data, dspace[2] = {0, 0};
-
- memcpy(pbox_, p_init_, sizeof(p_init_));
- memcpy(sbox_, s_init_, sizeof(s_init_));
-
- // Xor key string into encryption key vector
- for (i=0 ; i<ROUNDS+2 ; ++i) {
- data = 0;
- for (k=0 ; k<4 ; ++k )
- data = (data << 8) | key_string[j++ % keylength];
- pbox_[i] ^= data;
- }
-
- crypt_block(dspace, pbox_);
-
- for (i=0; i<ROUNDS; i+=2)
- crypt_block(pbox_ + i, pbox_ + i + 2);
-
- crypt_block(pbox_ + ROUNDS, sbox_);
-
- for (i=0; i < 4*256-2; i+=2)
- crypt_block(sbox_ + i, sbox_ + i + 2);
-
- if (dir==DECRYPTION)
- for (i=0; i<(ROUNDS+2)/2; i++)
- STL::swap(pbox_[i], pbox_[ROUNDS+1-i]);
-}
-
-
-#define BFBYTE_0(x) ( x &0xFF)
-#define BFBYTE_1(x) ((x>> 8)&0xFF)
-#define BFBYTE_2(x) ((x>>16)&0xFF)
-#define BFBYTE_3(x) ( x>>24)
-
-
-#define BF_S(Put, Get, I) (\
- Put ^= p[I], \
- tmp = p[18 + BFBYTE_3(Get)], \
- tmp += p[274+ BFBYTE_2(Get)], \
- tmp ^= p[530+ BFBYTE_1(Get)], \
- tmp += p[786+ BFBYTE_0(Get)], \
- Put ^= tmp \
- )
-
-
-#define BF_ROUNDS \
- BF_S(right, left, 1); \
- BF_S(left, right, 2); \
- BF_S(right, left, 3); \
- BF_S(left, right, 4); \
- BF_S(right, left, 5); \
- BF_S(left, right, 6); \
- BF_S(right, left, 7); \
- BF_S(left, right, 8); \
- BF_S(right, left, 9); \
- BF_S(left, right, 10); \
- BF_S(right, left, 11); \
- BF_S(left, right, 12); \
- BF_S(right, left, 13); \
- BF_S(left, right, 14); \
- BF_S(right, left, 15); \
- BF_S(left, right, 16);
-
-#define BF_EXTRA_ROUNDS \
- BF_S(right, left, 17); \
- BF_S(left, right, 18); \
- BF_S(right, left, 19); \
- BF_S(left, right, 20);
-
-
-// Used by key setup, no byte swapping
-void Blowfish::crypt_block(const word32 in[2], word32 out[2]) const
-{
- word32 left = in[0];
- word32 right = in[1];
-
- const word32 *const s = sbox_;
- const word32* p = pbox_;
-
- left ^= p[0];
-
- // roll back up and use s and p index instead of just p
- for (unsigned i = 0; i < ROUNDS / 2; i++) {
- right ^= (((s[GETBYTE(left,3)] + s[256+GETBYTE(left,2)])
- ^ s[2*256+GETBYTE(left,1)]) + s[3*256+GETBYTE(left,0)])
- ^ p[2*i+1];
-
- left ^= (((s[GETBYTE(right,3)] + s[256+GETBYTE(right,2)])
- ^ s[2*256+GETBYTE(right,1)]) + s[3*256+GETBYTE(right,0)])
- ^ p[2*i+2];
- }
-
- right ^= p[ROUNDS + 1];
-
- out[0] = right;
- out[1] = left;
-}
-
-
-typedef BlockGetAndPut<word32, BigEndian> gpBlock;
-
-void Blowfish::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out)
- const
-{
- word32 left, right;
- const word32 *const s = sbox_;
- const word32* p = pbox_;
-
- gpBlock::Get(in)(left)(right);
- left ^= p[0];
-
- // roll back up and use s and p index instead of just p
- for (unsigned i = 0; i < ROUNDS / 2; i++) {
- right ^= (((s[GETBYTE(left,3)] + s[256+GETBYTE(left,2)])
- ^ s[2*256+GETBYTE(left,1)]) + s[3*256+GETBYTE(left,0)])
- ^ p[2*i+1];
-
- left ^= (((s[GETBYTE(right,3)] + s[256+GETBYTE(right,2)])
- ^ s[2*256+GETBYTE(right,1)]) + s[3*256+GETBYTE(right,0)])
- ^ p[2*i+2];
- }
-
- right ^= p[ROUNDS + 1];
-
- gpBlock::Put(xOr, out)(right)(left);
-}
-
-
-#if defined(DO_BLOWFISH_ASM)
- #ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;" \
- "movd mm3, eax;"
- #define EPILOG() \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "c" (this), "S" (inBlock), "a" (outBlock) \
- : "%edi", "%edx", "memory", "cc" \
- );
-
- #else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( movd mm5, esi ) \
- AS2( mov esi, DWORD PTR [ebp + 8] )
-
- #define EPILOG() \
- AS2( movd esi, mm5 ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd edi, mm3 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 8 )
-
- #endif
-
-
-#define BF_ROUND(P, G, I) \
- /* Put ^= p[I] */ \
- AS2( xor P, [edi + I*4] ) \
- /* tmp = p[18 + BFBYTE_3(Get)] */ \
- AS2( mov ecx, G ) \
- AS2( shr ecx, 16 ) \
- AS2( movzx edx, ch ) \
- AS2( mov esi, [edi + edx*4 + 72] ) \
- /* tmp += p[274+ BFBYTE_2(Get)] */ \
- AS2( movzx ecx, cl ) \
- AS2( add esi, [edi + ecx*4 + 1096] ) \
- /* tmp ^= p[530+ BFBYTE_1(Get)] */ \
- AS2( mov ecx, G ) \
- AS2( movzx edx, ch ) \
- AS2( xor esi, [edi + edx*4 + 2120] ) \
- /* tmp += p[786+ BFBYTE_0(Get)] */ \
- AS2( movzx ecx, cl ) \
- AS2( add esi, [edi + ecx*4 + 3144] ) \
- /* Put ^= tmp */ \
- AS2( xor P, esi )
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void Blowfish::AsmProcess(const byte* inBlock, byte* outBlock) const
-{
- PROLOG()
-
- #ifdef OLD_GCC_OFFSET
- AS2( lea edi, [ecx + 60] ) // pbox
- #else
- AS2( lea edi, [ecx + 56] ) // pbox
- #endif
-
- AS2( mov eax, DWORD PTR [esi] )
- AS2( mov edx, DWORD PTR [edi] )
- AS1( bswap eax )
-
- AS2( mov ebx, DWORD PTR [esi + 4] )
- AS2( xor eax, edx ) // left
- AS1( bswap ebx ) // right
-
-
- BF_ROUND(ebx, eax, 1)
- BF_ROUND(eax, ebx, 2)
- BF_ROUND(ebx, eax, 3)
- BF_ROUND(eax, ebx, 4)
- BF_ROUND(ebx, eax, 5)
- BF_ROUND(eax, ebx, 6)
- BF_ROUND(ebx, eax, 7)
- BF_ROUND(eax, ebx, 8)
- BF_ROUND(ebx, eax, 9)
- BF_ROUND(eax, ebx, 10)
- BF_ROUND(ebx, eax, 11)
- BF_ROUND(eax, ebx, 12)
- BF_ROUND(ebx, eax, 13)
- BF_ROUND(eax, ebx, 14)
- BF_ROUND(ebx, eax, 15)
- BF_ROUND(eax, ebx, 16)
- #if ROUNDS == 20
- BF_ROUND(ebx, eax, 17)
- BF_ROUND(eax, ebx, 18)
- BF_ROUND(ebx, eax, 19)
- BF_ROUND(eax, ebx, 20)
-
- AS2( xor ebx, [edi + 84] ) // 20 + 1 (x4)
- #else
- AS2( xor ebx, [edi + 68] ) // 16 + 1 (x4)
- #endif
-
- #ifdef __GNUC__
- AS2( movd edi, mm3 ) // outBlock
- #else
- AS2( mov edi, [ebp + 12] ) // outBlock
- #endif
-
- AS1( bswap ebx )
- AS1( bswap eax )
-
- AS2( mov [edi] , ebx )
- AS2( mov [edi + 4], eax )
-
- EPILOG()
-}
-
-
-#endif // DO_BLOWFISH_ASM
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/coding.cpp b/extra/yassl/taocrypt/src/coding.cpp
deleted file mode 100644
index 85d657c352d..00000000000
--- a/extra/yassl/taocrypt/src/coding.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* coding.cpp implements hex and base64 encoding/decoing
-*/
-
-#include "runtime.hpp"
-#include "coding.hpp"
-#include "file.hpp"
-
-
-namespace TaoCrypt {
-
-
-namespace { // locals
-
-const byte bad = 0xFF; // invalid encoding
-
-const byte hexEncode[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- 'A', 'B', 'C', 'D', 'E', 'F'
- };
-
-const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- bad, bad, bad, bad, bad, bad, bad,
- 10, 11, 12, 13, 14, 15
- }; // A starts at 0x41 not 0x3A
-
-
-const byte base64Encode[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
- 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
- 'U', 'V', 'W', 'X', 'Y', 'Z',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
- 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
- 'u', 'v', 'w', 'x', 'y', 'z',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- '+', '/'
- };
-
-const byte base64Decode[] = { 62, bad, bad, bad, 63, // + starts at 0x2B
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- bad, bad, bad, bad, bad, bad, bad,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25,
- bad, bad, bad, bad, bad, bad,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51
- };
-
-const byte pad = '=';
-const int pemLineSz = 64;
-
-} // local namespace
-
-
-// Hex Encode
-void HexEncoder::Encode()
-{
- word32 bytes = plain_.size();
- encoded_.New(bytes * 2);
-
- word32 i = 0;
-
- while (bytes--) {
- byte p = plain_.next();
-
- byte b = p >> 4;
- byte b2 = p & 0xF;
-
- encoded_[i++] = hexEncode[b];
- encoded_[i++] = hexEncode[b2];
- }
-
- plain_.reset(encoded_);
-}
-
-
-// Hex Decode
-void HexDecoder::Decode()
-{
- word32 bytes = coded_.size();
- decoded_.New(bytes / 2);
-
- word32 i(0);
-
- while (bytes) {
- byte b = coded_.next() - 0x30; // 0 starts at 0x30
- byte b2 = coded_.next() - 0x30;
-
- // sanity checks
- if (b >= sizeof(hexDecode)/sizeof(hexDecode[0])) {
- coded_.SetError(PEM_E);
- return;
- }
- if (b2 >= sizeof(hexDecode)/sizeof(hexDecode[0])) {
- coded_.SetError(PEM_E);
- return;
- }
-
- b = hexDecode[b];
- b2 = hexDecode[b2];
-
- decoded_[i++] = (b << 4) | b2;
- bytes -= 2;
- }
-
- coded_.reset(decoded_);
-}
-
-
-// Base 64 Encode
-void Base64Encoder::Encode()
-{
- word32 bytes = plain_.size();
- word32 outSz = (bytes + 3 - 1) / 3 * 4;
-
- outSz += (outSz + pemLineSz - 1) / pemLineSz; // new lines
- encoded_.New(outSz);
-
- word32 i = 0;
- word32 j = 0;
-
- while (bytes > 2) {
- byte b1 = plain_.next();
- byte b2 = plain_.next();
- byte b3 = plain_.next();
-
- // encoded idx
- byte e1 = b1 >> 2;
- byte e2 = ((b1 & 0x3) << 4) | (b2 >> 4);
- byte e3 = ((b2 & 0xF) << 2) | (b3 >> 6);
- byte e4 = b3 & 0x3F;
-
- // store
- encoded_[i++] = base64Encode[e1];
- encoded_[i++] = base64Encode[e2];
- encoded_[i++] = base64Encode[e3];
- encoded_[i++] = base64Encode[e4];
-
- bytes -= 3;
-
- if ((++j % 16) == 0 && bytes)
- encoded_[i++] = '\n';
- }
-
- // last integral
- if (bytes) {
- bool twoBytes = (bytes == 2);
-
- byte b1 = plain_.next();
- byte b2 = (twoBytes) ? plain_.next() : 0;
-
- byte e1 = b1 >> 2;
- byte e2 = ((b1 & 0x3) << 4) | (b2 >> 4);
- byte e3 = (b2 & 0xF) << 2;
-
- encoded_[i++] = base64Encode[e1];
- encoded_[i++] = base64Encode[e2];
- encoded_[i++] = (twoBytes) ? base64Encode[e3] : pad;
- encoded_[i++] = pad;
- }
-
- encoded_[i++] = '\n';
-
- if (i == outSz)
- plain_.reset(encoded_);
-}
-
-
-// Base 64 Decode
-void Base64Decoder::Decode()
-{
- word32 bytes = coded_.size();
- word32 plainSz = bytes - ((bytes + (pemLineSz - 1)) / pemLineSz);
- const byte maxIdx = (byte)sizeof(base64Decode) + 0x2B - 1;
- plainSz = ((plainSz * 3) / 4) + 3;
- decoded_.New(plainSz);
-
- word32 i = 0;
- word32 j = 0;
-
- while (bytes > 3) {
- byte e1 = coded_.next();
- byte e2 = coded_.next();
- byte e3 = coded_.next();
- byte e4 = coded_.next();
-
- if (e1 == 0) // end file 0's
- break;
-
- bool pad3 = false;
- bool pad4 = false;
- if (e3 == pad)
- pad3 = true;
- if (e4 == pad)
- pad4 = true;
-
- if (e1 < 0x2B || e2 < 0x2B || e3 < 0x2B || e4 < 0x2B) {
- coded_.SetError(PEM_E);
- return;
- }
-
- if (e1 > maxIdx || e2 > maxIdx || e3 > maxIdx || e4 > maxIdx) {
- coded_.SetError(PEM_E);
- return;
- }
-
- e1 = base64Decode[e1 - 0x2B];
- e2 = base64Decode[e2 - 0x2B];
- e3 = (e3 == pad) ? 0 : base64Decode[e3 - 0x2B];
- e4 = (e4 == pad) ? 0 : base64Decode[e4 - 0x2B];
-
- byte b1 = (e1 << 2) | (e2 >> 4);
- byte b2 = ((e2 & 0xF) << 4) | (e3 >> 2);
- byte b3 = ((e3 & 0x3) << 6) | e4;
-
- decoded_[i++] = b1;
- if (!pad3)
- decoded_[i++] = b2;
- if (!pad4)
- decoded_[i++] = b3;
- else
- break;
-
- bytes -= 4;
- if ((++j % 16) == 0) {
- byte endLine = coded_.next();
- bytes--;
- while (endLine == ' ') { // remove possible whitespace
- endLine = coded_.next();
- bytes--;
- }
- if (endLine == '\r') {
- endLine = coded_.next();
- bytes--;
- }
- if (endLine != '\n') {
- coded_.SetError(PEM_E);
- return;
- }
- }
- }
-
- if (i != decoded_.size())
- decoded_.resize(i);
- coded_.reset(decoded_);
-}
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/des.cpp b/extra/yassl/taocrypt/src/des.cpp
deleted file mode 100644
index f921cfcc977..00000000000
--- a/extra/yassl/taocrypt/src/des.cpp
+++ /dev/null
@@ -1,778 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* C++ part based on Wei Dai's des.cpp from CryptoPP */
-/* x86 asm is original */
-
-
-#if defined(TAOCRYPT_KERNEL_MODE)
- #define DO_TAOCRYPT_KERNEL_MODE
-#endif // only some modules now support this
-
-
-#include "runtime.hpp"
-#include "des.hpp"
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-
-namespace TaoCrypt {
-
-
-/* permuted choice table (key) */
-static const byte pc1[] = {
- 57, 49, 41, 33, 25, 17, 9,
- 1, 58, 50, 42, 34, 26, 18,
- 10, 2, 59, 51, 43, 35, 27,
- 19, 11, 3, 60, 52, 44, 36,
-
- 63, 55, 47, 39, 31, 23, 15,
- 7, 62, 54, 46, 38, 30, 22,
- 14, 6, 61, 53, 45, 37, 29,
- 21, 13, 5, 28, 20, 12, 4
-};
-
-/* number left rotations of pc1 */
-static const byte totrot[] = {
- 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28
-};
-
-/* permuted choice key (table) */
-static const byte pc2[] = {
- 14, 17, 11, 24, 1, 5,
- 3, 28, 15, 6, 21, 10,
- 23, 19, 12, 4, 26, 8,
- 16, 7, 27, 20, 13, 2,
- 41, 52, 31, 37, 47, 55,
- 30, 40, 51, 45, 33, 48,
- 44, 49, 39, 56, 34, 53,
- 46, 42, 50, 36, 29, 32
-};
-
-/* End of DES-defined tables */
-
-/* bit 0 is left-most in byte */
-static const int bytebit[] = {
- 0200,0100,040,020,010,04,02,01
-};
-
-const word32 Spbox[8][64] = {
-{
-0x01010400,0x00000000,0x00010000,0x01010404,
-0x01010004,0x00010404,0x00000004,0x00010000,
-0x00000400,0x01010400,0x01010404,0x00000400,
-0x01000404,0x01010004,0x01000000,0x00000004,
-0x00000404,0x01000400,0x01000400,0x00010400,
-0x00010400,0x01010000,0x01010000,0x01000404,
-0x00010004,0x01000004,0x01000004,0x00010004,
-0x00000000,0x00000404,0x00010404,0x01000000,
-0x00010000,0x01010404,0x00000004,0x01010000,
-0x01010400,0x01000000,0x01000000,0x00000400,
-0x01010004,0x00010000,0x00010400,0x01000004,
-0x00000400,0x00000004,0x01000404,0x00010404,
-0x01010404,0x00010004,0x01010000,0x01000404,
-0x01000004,0x00000404,0x00010404,0x01010400,
-0x00000404,0x01000400,0x01000400,0x00000000,
-0x00010004,0x00010400,0x00000000,0x01010004},
-{
-0x80108020,0x80008000,0x00008000,0x00108020,
-0x00100000,0x00000020,0x80100020,0x80008020,
-0x80000020,0x80108020,0x80108000,0x80000000,
-0x80008000,0x00100000,0x00000020,0x80100020,
-0x00108000,0x00100020,0x80008020,0x00000000,
-0x80000000,0x00008000,0x00108020,0x80100000,
-0x00100020,0x80000020,0x00000000,0x00108000,
-0x00008020,0x80108000,0x80100000,0x00008020,
-0x00000000,0x00108020,0x80100020,0x00100000,
-0x80008020,0x80100000,0x80108000,0x00008000,
-0x80100000,0x80008000,0x00000020,0x80108020,
-0x00108020,0x00000020,0x00008000,0x80000000,
-0x00008020,0x80108000,0x00100000,0x80000020,
-0x00100020,0x80008020,0x80000020,0x00100020,
-0x00108000,0x00000000,0x80008000,0x00008020,
-0x80000000,0x80100020,0x80108020,0x00108000},
-{
-0x00000208,0x08020200,0x00000000,0x08020008,
-0x08000200,0x00000000,0x00020208,0x08000200,
-0x00020008,0x08000008,0x08000008,0x00020000,
-0x08020208,0x00020008,0x08020000,0x00000208,
-0x08000000,0x00000008,0x08020200,0x00000200,
-0x00020200,0x08020000,0x08020008,0x00020208,
-0x08000208,0x00020200,0x00020000,0x08000208,
-0x00000008,0x08020208,0x00000200,0x08000000,
-0x08020200,0x08000000,0x00020008,0x00000208,
-0x00020000,0x08020200,0x08000200,0x00000000,
-0x00000200,0x00020008,0x08020208,0x08000200,
-0x08000008,0x00000200,0x00000000,0x08020008,
-0x08000208,0x00020000,0x08000000,0x08020208,
-0x00000008,0x00020208,0x00020200,0x08000008,
-0x08020000,0x08000208,0x00000208,0x08020000,
-0x00020208,0x00000008,0x08020008,0x00020200},
-{
-0x00802001,0x00002081,0x00002081,0x00000080,
-0x00802080,0x00800081,0x00800001,0x00002001,
-0x00000000,0x00802000,0x00802000,0x00802081,
-0x00000081,0x00000000,0x00800080,0x00800001,
-0x00000001,0x00002000,0x00800000,0x00802001,
-0x00000080,0x00800000,0x00002001,0x00002080,
-0x00800081,0x00000001,0x00002080,0x00800080,
-0x00002000,0x00802080,0x00802081,0x00000081,
-0x00800080,0x00800001,0x00802000,0x00802081,
-0x00000081,0x00000000,0x00000000,0x00802000,
-0x00002080,0x00800080,0x00800081,0x00000001,
-0x00802001,0x00002081,0x00002081,0x00000080,
-0x00802081,0x00000081,0x00000001,0x00002000,
-0x00800001,0x00002001,0x00802080,0x00800081,
-0x00002001,0x00002080,0x00800000,0x00802001,
-0x00000080,0x00800000,0x00002000,0x00802080},
-{
-0x00000100,0x02080100,0x02080000,0x42000100,
-0x00080000,0x00000100,0x40000000,0x02080000,
-0x40080100,0x00080000,0x02000100,0x40080100,
-0x42000100,0x42080000,0x00080100,0x40000000,
-0x02000000,0x40080000,0x40080000,0x00000000,
-0x40000100,0x42080100,0x42080100,0x02000100,
-0x42080000,0x40000100,0x00000000,0x42000000,
-0x02080100,0x02000000,0x42000000,0x00080100,
-0x00080000,0x42000100,0x00000100,0x02000000,
-0x40000000,0x02080000,0x42000100,0x40080100,
-0x02000100,0x40000000,0x42080000,0x02080100,
-0x40080100,0x00000100,0x02000000,0x42080000,
-0x42080100,0x00080100,0x42000000,0x42080100,
-0x02080000,0x00000000,0x40080000,0x42000000,
-0x00080100,0x02000100,0x40000100,0x00080000,
-0x00000000,0x40080000,0x02080100,0x40000100},
-{
-0x20000010,0x20400000,0x00004000,0x20404010,
-0x20400000,0x00000010,0x20404010,0x00400000,
-0x20004000,0x00404010,0x00400000,0x20000010,
-0x00400010,0x20004000,0x20000000,0x00004010,
-0x00000000,0x00400010,0x20004010,0x00004000,
-0x00404000,0x20004010,0x00000010,0x20400010,
-0x20400010,0x00000000,0x00404010,0x20404000,
-0x00004010,0x00404000,0x20404000,0x20000000,
-0x20004000,0x00000010,0x20400010,0x00404000,
-0x20404010,0x00400000,0x00004010,0x20000010,
-0x00400000,0x20004000,0x20000000,0x00004010,
-0x20000010,0x20404010,0x00404000,0x20400000,
-0x00404010,0x20404000,0x00000000,0x20400010,
-0x00000010,0x00004000,0x20400000,0x00404010,
-0x00004000,0x00400010,0x20004010,0x00000000,
-0x20404000,0x20000000,0x00400010,0x20004010},
-{
-0x00200000,0x04200002,0x04000802,0x00000000,
-0x00000800,0x04000802,0x00200802,0x04200800,
-0x04200802,0x00200000,0x00000000,0x04000002,
-0x00000002,0x04000000,0x04200002,0x00000802,
-0x04000800,0x00200802,0x00200002,0x04000800,
-0x04000002,0x04200000,0x04200800,0x00200002,
-0x04200000,0x00000800,0x00000802,0x04200802,
-0x00200800,0x00000002,0x04000000,0x00200800,
-0x04000000,0x00200800,0x00200000,0x04000802,
-0x04000802,0x04200002,0x04200002,0x00000002,
-0x00200002,0x04000000,0x04000800,0x00200000,
-0x04200800,0x00000802,0x00200802,0x04200800,
-0x00000802,0x04000002,0x04200802,0x04200000,
-0x00200800,0x00000000,0x00000002,0x04200802,
-0x00000000,0x00200802,0x04200000,0x00000800,
-0x04000002,0x04000800,0x00000800,0x00200002},
-{
-0x10001040,0x00001000,0x00040000,0x10041040,
-0x10000000,0x10001040,0x00000040,0x10000000,
-0x00040040,0x10040000,0x10041040,0x00041000,
-0x10041000,0x00041040,0x00001000,0x00000040,
-0x10040000,0x10000040,0x10001000,0x00001040,
-0x00041000,0x00040040,0x10040040,0x10041000,
-0x00001040,0x00000000,0x00000000,0x10040040,
-0x10000040,0x10001000,0x00041040,0x00040000,
-0x00041040,0x00040000,0x10041000,0x00001000,
-0x00000040,0x10040040,0x00001000,0x00041040,
-0x10001000,0x00000040,0x10000040,0x10040000,
-0x10040040,0x10000000,0x00040000,0x10001040,
-0x00000000,0x10041040,0x00040040,0x10000040,
-0x10040000,0x10001000,0x10001040,0x00000000,
-0x10041040,0x00041000,0x00041000,0x00001040,
-0x00001040,0x00040040,0x10000000,0x10041000}
-};
-
-
-void BasicDES::SetKey(const byte* key, word32 /*length*/, CipherDir dir)
-{
- byte buffer[56+56+8];
- byte *const pc1m = buffer; /* place to modify pc1 into */
- byte *const pcr = pc1m + 56; /* place to rotate pc1 into */
- byte *const ks = pcr + 56;
- int i,j,l;
- int m;
-
- for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */
- l = pc1[j] - 1; /* integer bit location */
- m = l & 07; /* find bit */
- pc1m[j] = (key[l >> 3] & /* find which key byte l is in */
- bytebit[m]) /* and which bit of that byte */
- ? 1 : 0; /* and store 1-bit result */
- }
- for (i = 0; i < 16; i++) { /* key chunk for each iteration */
- memset(ks, 0, 8); /* Clear key schedule */
- for (j = 0; j < 56; j++) /* rotate pc1 the right amount */
- pcr[j] = pc1m[(l = j + totrot[i]) < (j < 28 ? 28 : 56) ? l: l-28];
- /* rotate left and right halves independently */
- for (j = 0; j < 48; j++){ /* select bits individually */
- /* check bit that goes to ks[j] */
- if (pcr[pc2[j] - 1]){
- /* mask it in if it's there */
- l= j % 6;
- ks[j/6] |= bytebit[l] >> 2;
- }
- }
- /* Now convert to odd/even interleaved form for use in F */
- k_[2*i] = ((word32)ks[0] << 24)
- | ((word32)ks[2] << 16)
- | ((word32)ks[4] << 8)
- | ((word32)ks[6]);
- k_[2*i + 1] = ((word32)ks[1] << 24)
- | ((word32)ks[3] << 16)
- | ((word32)ks[5] << 8)
- | ((word32)ks[7]);
- }
-
- // reverse key schedule order
- if (dir == DECRYPTION)
- for (i = 0; i < 16; i += 2) {
- STL::swap(k_[i], k_[32 - 2 - i]);
- STL::swap(k_[i+1], k_[32 - 1 - i]);
- }
-
-}
-
-static inline void IPERM(word32& left, word32& right)
-{
- word32 work;
-
- right = rotlFixed(right, 4U);
- work = (left ^ right) & 0xf0f0f0f0;
- left ^= work;
-
- right = rotrFixed(right^work, 20U);
- work = (left ^ right) & 0xffff0000;
- left ^= work;
-
- right = rotrFixed(right^work, 18U);
- work = (left ^ right) & 0x33333333;
- left ^= work;
-
- right = rotrFixed(right^work, 6U);
- work = (left ^ right) & 0x00ff00ff;
- left ^= work;
-
- right = rotlFixed(right^work, 9U);
- work = (left ^ right) & 0xaaaaaaaa;
- left = rotlFixed(left^work, 1U);
- right ^= work;
-}
-
-static inline void FPERM(word32& left, word32& right)
-{
- word32 work;
-
- right = rotrFixed(right, 1U);
- work = (left ^ right) & 0xaaaaaaaa;
- right ^= work;
- left = rotrFixed(left^work, 9U);
- work = (left ^ right) & 0x00ff00ff;
- right ^= work;
- left = rotlFixed(left^work, 6U);
- work = (left ^ right) & 0x33333333;
- right ^= work;
- left = rotlFixed(left^work, 18U);
- work = (left ^ right) & 0xffff0000;
- right ^= work;
- left = rotlFixed(left^work, 20U);
- work = (left ^ right) & 0xf0f0f0f0;
- right ^= work;
- left = rotrFixed(left^work, 4U);
-}
-
-
-void BasicDES::RawProcessBlock(word32& lIn, word32& rIn) const
-{
- word32 l = lIn, r = rIn;
- const word32* kptr = k_;
-
- for (unsigned i=0; i<8; i++)
- {
- word32 work = rotrFixed(r, 4U) ^ kptr[4*i+0];
- l ^= Spbox[6][(work) & 0x3f]
- ^ Spbox[4][(work >> 8) & 0x3f]
- ^ Spbox[2][(work >> 16) & 0x3f]
- ^ Spbox[0][(work >> 24) & 0x3f];
- work = r ^ kptr[4*i+1];
- l ^= Spbox[7][(work) & 0x3f]
- ^ Spbox[5][(work >> 8) & 0x3f]
- ^ Spbox[3][(work >> 16) & 0x3f]
- ^ Spbox[1][(work >> 24) & 0x3f];
-
- work = rotrFixed(l, 4U) ^ kptr[4*i+2];
- r ^= Spbox[6][(work) & 0x3f]
- ^ Spbox[4][(work >> 8) & 0x3f]
- ^ Spbox[2][(work >> 16) & 0x3f]
- ^ Spbox[0][(work >> 24) & 0x3f];
- work = l ^ kptr[4*i+3];
- r ^= Spbox[7][(work) & 0x3f]
- ^ Spbox[5][(work >> 8) & 0x3f]
- ^ Spbox[3][(work >> 16) & 0x3f]
- ^ Spbox[1][(work >> 24) & 0x3f];
- }
-
- lIn = l; rIn = r;
-}
-
-
-
-typedef BlockGetAndPut<word32, BigEndian> Block;
-
-
-void DES::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) const
-{
- word32 l,r;
- Block::Get(in)(l)(r);
- IPERM(l,r);
-
- RawProcessBlock(l, r);
-
- FPERM(l,r);
- Block::Put(xOr, out)(r)(l);
-}
-
-
-void DES_EDE2::SetKey(const byte* key, word32 sz, CipherDir dir)
-{
- des1_.SetKey(key, sz, dir);
- des2_.SetKey(key + 8, sz, ReverseDir(dir));
-}
-
-
-void DES_EDE2::ProcessAndXorBlock(const byte* in, const byte* xOr,
- byte* out) const
-{
- word32 l,r;
- Block::Get(in)(l)(r);
- IPERM(l,r);
-
- des1_.RawProcessBlock(l, r);
- des2_.RawProcessBlock(r, l);
- des1_.RawProcessBlock(l, r);
-
- FPERM(l,r);
- Block::Put(xOr, out)(r)(l);
-}
-
-
-void DES_EDE3::SetKey(const byte* key, word32 sz, CipherDir dir)
-{
- des1_.SetKey(key+(dir==ENCRYPTION?0:2*8), sz, dir);
- des2_.SetKey(key+8, sz, ReverseDir(dir));
- des3_.SetKey(key+(dir==DECRYPTION?0:2*8), sz, dir);
-}
-
-
-
-#if defined(DO_DES_ASM)
-
-// ia32 optimized version
-void DES_EDE3::Process(byte* out, const byte* in, word32 sz)
-{
- if (!isMMX) {
- Mode_BASE::Process(out, in, sz);
- return;
- }
-
- word32 blocks = sz / DES_BLOCK_SIZE;
-
- if (mode_ == CBC)
- if (dir_ == ENCRYPTION)
- while (blocks--) {
- r_[0] ^= *(word32*)in;
- r_[1] ^= *(word32*)(in + 4);
-
- AsmProcess((byte*)r_, (byte*)r_, (void*)Spbox);
-
- memcpy(out, r_, DES_BLOCK_SIZE);
-
- in += DES_BLOCK_SIZE;
- out += DES_BLOCK_SIZE;
- }
- else
- while (blocks--) {
- AsmProcess(in, out, (void*)Spbox);
-
- *(word32*)out ^= r_[0];
- *(word32*)(out + 4) ^= r_[1];
-
- memcpy(r_, in, DES_BLOCK_SIZE);
-
- out += DES_BLOCK_SIZE;
- in += DES_BLOCK_SIZE;
- }
- else
- while (blocks--) {
- AsmProcess(in, out, (void*)Spbox);
-
- out += DES_BLOCK_SIZE;
- in += DES_BLOCK_SIZE;
- }
-}
-
-#endif // DO_DES_ASM
-
-
-void DES_EDE3::ProcessAndXorBlock(const byte* in, const byte* xOr,
- byte* out) const
-{
- word32 l,r;
- Block::Get(in)(l)(r);
- IPERM(l,r);
-
- des1_.RawProcessBlock(l, r);
- des2_.RawProcessBlock(r, l);
- des3_.RawProcessBlock(l, r);
-
- FPERM(l,r);
- Block::Put(xOr, out)(r)(l);
-}
-
-
-#if defined(DO_DES_ASM)
-
-/* Uses IPERM algorithm from above
-
- left is in eax
- right is in ebx
-
- uses ecx
-*/
-#define AsmIPERM() \
- AS2( rol ebx, 4 ) \
- AS2( mov ecx, eax ) \
- AS2( xor ecx, ebx ) \
- AS2( and ecx, 0xf0f0f0f0 ) \
- AS2( xor ebx, ecx ) \
- AS2( xor eax, ecx ) \
- AS2( ror ebx, 20 ) \
- AS2( mov ecx, eax ) \
- AS2( xor ecx, ebx ) \
- AS2( and ecx, 0xffff0000 ) \
- AS2( xor ebx, ecx ) \
- AS2( xor eax, ecx ) \
- AS2( ror ebx, 18 ) \
- AS2( mov ecx, eax ) \
- AS2( xor ecx, ebx ) \
- AS2( and ecx, 0x33333333 ) \
- AS2( xor ebx, ecx ) \
- AS2( xor eax, ecx ) \
- AS2( ror ebx, 6 ) \
- AS2( mov ecx, eax ) \
- AS2( xor ecx, ebx ) \
- AS2( and ecx, 0x00ff00ff ) \
- AS2( xor ebx, ecx ) \
- AS2( xor eax, ecx ) \
- AS2( rol ebx, 9 ) \
- AS2( mov ecx, eax ) \
- AS2( xor ecx, ebx ) \
- AS2( and ecx, 0xaaaaaaaa ) \
- AS2( xor eax, ecx ) \
- AS2( rol eax, 1 ) \
- AS2( xor ebx, ecx )
-
-
-/* Uses FPERM algorithm from above
-
- left is in eax
- right is in ebx
-
- uses ecx
-*/
-#define AsmFPERM() \
- AS2( ror ebx, 1 ) \
- AS2( mov ecx, eax ) \
- AS2( xor ecx, ebx ) \
- AS2( and ecx, 0xaaaaaaaa ) \
- AS2( xor eax, ecx ) \
- AS2( xor ebx, ecx ) \
- AS2( ror eax, 9 ) \
- AS2( mov ecx, ebx ) \
- AS2( xor ecx, eax ) \
- AS2( and ecx, 0x00ff00ff ) \
- AS2( xor eax, ecx ) \
- AS2( xor ebx, ecx ) \
- AS2( rol eax, 6 ) \
- AS2( mov ecx, ebx ) \
- AS2( xor ecx, eax ) \
- AS2( and ecx, 0x33333333 ) \
- AS2( xor eax, ecx ) \
- AS2( xor ebx, ecx ) \
- AS2( rol eax, 18 ) \
- AS2( mov ecx, ebx ) \
- AS2( xor ecx, eax ) \
- AS2( and ecx, 0xffff0000 ) \
- AS2( xor eax, ecx ) \
- AS2( xor ebx, ecx ) \
- AS2( rol eax, 20 ) \
- AS2( mov ecx, ebx ) \
- AS2( xor ecx, eax ) \
- AS2( and ecx, 0xf0f0f0f0 ) \
- AS2( xor eax, ecx ) \
- AS2( xor ebx, ecx ) \
- AS2( ror eax, 4 )
-
-
-
-
-/* DesRound implements this algorithm:
-
- word32 work = rotrFixed(r, 4U) ^ key[0];
- l ^= Spbox[6][(work) & 0x3f]
- ^ Spbox[4][(work >> 8) & 0x3f]
- ^ Spbox[2][(work >> 16) & 0x3f]
- ^ Spbox[0][(work >> 24) & 0x3f];
- work = r ^ key[1];
- l ^= Spbox[7][(work) & 0x3f]
- ^ Spbox[5][(work >> 8) & 0x3f]
- ^ Spbox[3][(work >> 16) & 0x3f]
- ^ Spbox[1][(work >> 24) & 0x3f];
-
- work = rotrFixed(l, 4U) ^ key[2];
- r ^= Spbox[6][(work) & 0x3f]
- ^ Spbox[4][(work >> 8) & 0x3f]
- ^ Spbox[2][(work >> 16) & 0x3f]
- ^ Spbox[0][(work >> 24) & 0x3f];
- work = l ^ key[3];
- r ^= Spbox[7][(work) & 0x3f]
- ^ Spbox[5][(work >> 8) & 0x3f]
- ^ Spbox[3][(work >> 16) & 0x3f]
- ^ Spbox[1][(work >> 24) & 0x3f];
-
- left is in aex
- right is in ebx
- key is in edx
-
- edvances key for next round
-
- uses ecx, esi, and edi
-*/
-#define DesRound() \
- AS2( mov ecx, ebx )\
- AS2( mov esi, DWORD PTR [edx] )\
- AS2( ror ecx, 4 )\
- AS2( xor ecx, esi )\
- AS2( and ecx, 0x3f3f3f3f )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor eax, [ebp + esi*4 + 6*256] )\
- AS2( shr ecx, 16 )\
- AS2( xor eax, [ebp + edi*4 + 4*256] )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor eax, [ebp + esi*4 + 2*256] )\
- AS2( mov esi, DWORD PTR [edx + 4] )\
- AS2( xor eax, [ebp + edi*4] )\
- AS2( mov ecx, ebx )\
- AS2( xor ecx, esi )\
- AS2( and ecx, 0x3f3f3f3f )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor eax, [ebp + esi*4 + 7*256] )\
- AS2( shr ecx, 16 )\
- AS2( xor eax, [ebp + edi*4 + 5*256] )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor eax, [ebp + esi*4 + 3*256] )\
- AS2( mov esi, DWORD PTR [edx + 8] )\
- AS2( xor eax, [ebp + edi*4 + 1*256] )\
- AS2( mov ecx, eax )\
- AS2( ror ecx, 4 )\
- AS2( xor ecx, esi )\
- AS2( and ecx, 0x3f3f3f3f )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor ebx, [ebp + esi*4 + 6*256] )\
- AS2( shr ecx, 16 )\
- AS2( xor ebx, [ebp + edi*4 + 4*256] )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor ebx, [ebp + esi*4 + 2*256] )\
- AS2( mov esi, DWORD PTR [edx + 12] )\
- AS2( xor ebx, [ebp + edi*4] )\
- AS2( mov ecx, eax )\
- AS2( xor ecx, esi )\
- AS2( and ecx, 0x3f3f3f3f )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor ebx, [ebp + esi*4 + 7*256] )\
- AS2( shr ecx, 16 )\
- AS2( xor ebx, [ebp + edi*4 + 5*256] )\
- AS2( movzx esi, cl )\
- AS2( movzx edi, ch )\
- AS2( xor ebx, [ebp + esi*4 + 3*256] )\
- AS2( add edx, 16 )\
- AS2( xor ebx, [ebp + edi*4 + 1*256] )
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void DES_EDE3::AsmProcess(const byte* in, byte* out, void* box) const
-{
-#ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;" \
- "movd mm6, ebp;" \
- "movd mm7, ecx;" \
- "mov ebp, eax;"
- #define EPILOG() \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "d" (this), "S" (in), "a" (box), "c" (out) \
- : "%edi", "memory", "cc" \
- );
-
-#else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( movd mm5, esi ) \
- AS2( movd mm6, ebp ) \
- AS2( mov esi, DWORD PTR [ebp + 8] ) \
- AS2( mov edx, ecx ) \
- AS2( mov ebp, DWORD PTR [ebp + 16] )
-
- // ebp restored at end
- #define EPILOG() \
- AS2( movd edi, mm3 ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd esi, mm5 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 12 )
-
-#endif
-
-
- PROLOG()
-
- AS2( movd mm2, edx )
-
- #ifdef OLD_GCC_OFFSET
- AS2( add edx, 60 ) // des1 = des1 key
- #else
- AS2( add edx, 56 ) // des1 = des1 key
- #endif
-
- AS2( mov eax, DWORD PTR [esi] )
- AS2( mov ebx, DWORD PTR [esi + 4] )
- AS1( bswap eax ) // left
- AS1( bswap ebx ) // right
-
- AsmIPERM()
-
- DesRound() // 1
- DesRound() // 2
- DesRound() // 3
- DesRound() // 4
- DesRound() // 5
- DesRound() // 6
- DesRound() // 7
- DesRound() // 8
-
- // swap left and right
- AS2( xchg eax, ebx )
-
- DesRound() // 1
- DesRound() // 2
- DesRound() // 3
- DesRound() // 4
- DesRound() // 5
- DesRound() // 6
- DesRound() // 7
- DesRound() // 8
-
- // swap left and right
- AS2( xchg eax, ebx )
-
- DesRound() // 1
- DesRound() // 2
- DesRound() // 3
- DesRound() // 4
- DesRound() // 5
- DesRound() // 6
- DesRound() // 7
- DesRound() // 8
-
- AsmFPERM()
-
- //end
- AS2( movd ebp, mm6 )
-
- // swap and write out
- AS1( bswap ebx )
- AS1( bswap eax )
-
-#ifdef __GNUC__
- AS2( movd esi, mm7 ) // outBlock
-#else
- AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock
-#endif
-
- AS2( mov DWORD PTR [esi], ebx ) // right first
- AS2( mov DWORD PTR [esi + 4], eax )
-
-
- EPILOG()
-}
-
-
-
-#endif // defined(DO_DES_ASM)
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/dh.cpp b/extra/yassl/taocrypt/src/dh.cpp
deleted file mode 100644
index cc677cba458..00000000000
--- a/extra/yassl/taocrypt/src/dh.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* dh.cpp implements Diffie-Hellman support
-*/
-
-#include "runtime.hpp"
-#include "dh.hpp"
-#include "asn.hpp"
-#include <math.h>
-
-namespace TaoCrypt {
-
-
-namespace { // locals
-
-unsigned int DiscreteLogWorkFactor(unsigned int n)
-{
- // assuming discrete log takes about the same time as factoring
- if (n<5)
- return 0;
- else
- return (unsigned int)(2.4 * pow((double)n, 1.0/3.0) *
- pow(log(double(n)), 2.0/3.0) - 5);
-}
-
-} // namespace locals
-
-
-// Generate a DH Key Pair
-void DH::GenerateKeyPair(RandomNumberGenerator& rng, byte* priv, byte* pub)
-{
- GeneratePrivate(rng, priv);
- GeneratePublic(priv, pub);
-}
-
-
-// Generate private value
-void DH::GeneratePrivate(RandomNumberGenerator& rng, byte* priv)
-{
- Integer x(rng, Integer::One(), min(p_ - 1,
- Integer::Power2(2*DiscreteLogWorkFactor(p_.BitCount())) ) );
- x.Encode(priv, p_.ByteCount());
-}
-
-
-// Generate public value
-void DH::GeneratePublic(const byte* priv, byte* pub)
-{
- const word32 bc(p_.ByteCount());
- Integer x(priv, bc);
- Integer y(a_exp_b_mod_c(g_, x, p_));
- y.Encode(pub, bc);
-}
-
-
-// Generate Agreement
-void DH::Agree(byte* agree, const byte* priv, const byte* otherPub, word32
- otherSz)
-{
- const word32 bc(p_.ByteCount());
- Integer x(priv, bc);
- Integer y;
- if (otherSz)
- y.Decode(otherPub, otherSz);
- else
- y.Decode(otherPub, bc);
-
- Integer z(a_exp_b_mod_c(y, x, p_));
- z.Encode(agree, bc);
-}
-
-
-DH::DH(Source& source)
-{
- Initialize(source);
-}
-
-
-void DH::Initialize(Source& source)
-{
- DH_Decoder decoder(source);
- decoder.Decode(*this);
-}
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/dsa.cpp b/extra/yassl/taocrypt/src/dsa.cpp
deleted file mode 100644
index ccdefa46025..00000000000
--- a/extra/yassl/taocrypt/src/dsa.cpp
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-#include "runtime.hpp"
-#include "dsa.hpp"
-#include "sha.hpp"
-#include "asn.hpp"
-#include "modarith.hpp"
-
-
-namespace TaoCrypt {
-
-
-void DSA_PublicKey::Swap(DSA_PublicKey& other)
-{
- p_.Swap(other.p_);
- q_.Swap(other.q_);
- g_.Swap(other.g_);
- y_.Swap(other.y_);
-}
-
-
-DSA_PublicKey::DSA_PublicKey(const DSA_PublicKey& other)
- : p_(other.p_), q_(other.q_), g_(other.g_), y_(other.y_)
-{}
-
-
-DSA_PublicKey& DSA_PublicKey::operator=(const DSA_PublicKey& that)
-{
- DSA_PublicKey tmp(that);
- Swap(tmp);
- return *this;
-}
-
-
-DSA_PublicKey::DSA_PublicKey(Source& source)
-{
- Initialize(source);
-}
-
-
-void DSA_PublicKey::Initialize(Source& source)
-{
- DSA_Public_Decoder decoder(source);
- decoder.Decode(*this);
-}
-
-
-void DSA_PublicKey::Initialize(const Integer& p, const Integer& q,
- const Integer& g, const Integer& y)
-{
- p_ = p;
- q_ = q;
- g_ = g;
- y_ = y;
-}
-
-
-const Integer& DSA_PublicKey::GetModulus() const
-{
- return p_;
-}
-
-const Integer& DSA_PublicKey::GetSubGroupOrder() const
-{
- return q_;
-}
-
-
-const Integer& DSA_PublicKey::GetSubGroupGenerator() const
-{
- return g_;
-}
-
-
-const Integer& DSA_PublicKey::GetPublicPart() const
-{
- return y_;
-}
-
-
-void DSA_PublicKey::SetModulus(const Integer& p)
-{
- p_ = p;
-}
-
-
-void DSA_PublicKey::SetSubGroupOrder(const Integer& q)
-{
- q_ = q;
-}
-
-
-void DSA_PublicKey::SetSubGroupGenerator(const Integer& g)
-{
- g_ = g;
-}
-
-
-void DSA_PublicKey::SetPublicPart(const Integer& y)
-{
- y_ = y;
-}
-
-
-word32 DSA_PublicKey::SignatureLength() const
-{
- return GetSubGroupOrder().ByteCount() * 2; // r and s
-}
-
-
-
-DSA_PrivateKey::DSA_PrivateKey(Source& source)
-{
- Initialize(source);
-}
-
-
-void DSA_PrivateKey::Initialize(Source& source)
-{
- DSA_Private_Decoder decoder(source);
- decoder.Decode(*this);
-}
-
-
-void DSA_PrivateKey::Initialize(const Integer& p, const Integer& q,
- const Integer& g, const Integer& y,
- const Integer& x)
-{
- DSA_PublicKey::Initialize(p, q, g, y);
- x_ = x;
-}
-
-
-const Integer& DSA_PrivateKey::GetPrivatePart() const
-{
- return x_;
-}
-
-
-void DSA_PrivateKey::SetPrivatePart(const Integer& x)
-{
- x_ = x;
-}
-
-
-DSA_Signer::DSA_Signer(const DSA_PrivateKey& key)
- : key_(key)
-{}
-
-
-word32 DSA_Signer::Sign(const byte* sha_digest, byte* sig,
- RandomNumberGenerator& rng)
-{
- const Integer& p = key_.GetModulus();
- const Integer& q = key_.GetSubGroupOrder();
- const Integer& g = key_.GetSubGroupGenerator();
- const Integer& x = key_.GetPrivatePart();
- byte* tmpPtr = sig; // initial signature output
-
- Integer k(rng, 1, q - 1);
-
- r_ = a_exp_b_mod_c(g, k, p);
- r_ %= q;
-
- Integer H(sha_digest, SHA::DIGEST_SIZE); // sha Hash(m)
-
- Integer kInv = k.InverseMod(q);
- s_ = (kInv * (H + x*r_)) % q;
-
- if (!(!!r_ && !!s_))
- return (word32) -1;
-
- int rSz = r_.ByteCount();
- int tmpSz = rSz;
-
- while (tmpSz++ < SHA::DIGEST_SIZE) {
- *sig++ = 0;
- }
-
- r_.Encode(sig, rSz);
-
- sig = tmpPtr + SHA::DIGEST_SIZE; // advance sig output to s
- int sSz = s_.ByteCount();
- tmpSz = sSz;
-
- while (tmpSz++ < SHA::DIGEST_SIZE) {
- *sig++ = 0;
- }
-
- s_.Encode(sig, sSz);
-
- return 40;
-}
-
-
-DSA_Verifier::DSA_Verifier(const DSA_PublicKey& key)
- : key_(key)
-{}
-
-
-bool DSA_Verifier::Verify(const byte* sha_digest, const byte* sig)
-{
- const Integer& p = key_.GetModulus();
- const Integer& q = key_.GetSubGroupOrder();
- const Integer& g = key_.GetSubGroupGenerator();
- const Integer& y = key_.GetPublicPart();
-
- int sz = q.ByteCount();
-
- r_.Decode(sig, sz);
- s_.Decode(sig + sz, sz);
-
- if (r_ >= q || r_ < 1 || s_ >= q || s_ < 1)
- return false;
-
- Integer H(sha_digest, SHA::DIGEST_SIZE); // sha Hash(m)
-
- Integer w = s_.InverseMod(q);
- Integer u1 = (H * w) % q;
- Integer u2 = (r_ * w) % q;
-
- // verify r == ((g^u1 * y^u2) mod p) mod q
- ModularArithmetic ma(p);
- Integer v = ma.CascadeExponentiate(g, u1, y, u2);
- v %= q;
-
- return r_ == v;
-}
-
-
-
-
-const Integer& DSA_Signer::GetR() const
-{
- return r_;
-}
-
-
-const Integer& DSA_Signer::GetS() const
-{
- return s_;
-}
-
-
-const Integer& DSA_Verifier::GetR() const
-{
- return r_;
-}
-
-
-const Integer& DSA_Verifier::GetS() const
-{
- return s_;
-}
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/file.cpp b/extra/yassl/taocrypt/src/file.cpp
deleted file mode 100644
index 5dfc19ca7bd..00000000000
--- a/extra/yassl/taocrypt/src/file.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* file.cpp implements File Sources and Sinks
-*/
-
-#include "runtime.hpp"
-#include "file.hpp"
-
-
-namespace TaoCrypt {
-
-
-FileSource::FileSource(const char* fname, Source& source)
-{
- file_ = fopen(fname, "rb");
- if (file_) get(source);
-}
-
-
-FileSource::~FileSource()
-{
- if (file_)
- fclose(file_);
-}
-
-
-
-// return size of source from beginning or current position
-word32 FileSource::size(bool use_current)
-{
- long current = ftell(file_);
- long begin = current;
-
- if (!use_current) {
- fseek(file_, 0, SEEK_SET);
- begin = ftell(file_);
- }
-
- fseek(file_, 0, SEEK_END);
- long end = ftell(file_);
-
- fseek(file_, current, SEEK_SET);
-
- return end - begin;
-}
-
-
-word32 FileSource::size_left()
-{
- return size(true);
-}
-
-
-// fill file source from source
-word32 FileSource::get(Source& source)
-{
- word32 sz(size());
- if (source.size() < sz)
- source.grow(sz);
-
- size_t bytes = fread(source.buffer_.get_buffer(), 1, sz, file_);
-
- if (bytes == 1)
- return sz;
- else
- return 0;
-}
-
-
-FileSink::FileSink(const char* fname, Source& source)
-{
- file_ = fopen(fname, "wb");
- if (file_) put(source);
-}
-
-
-FileSink::~FileSink()
-{
- if (file_)
- fclose(file_);
-}
-
-
-// fill source from file sink
-size_t FileSink::put(Source& source)
-{
- return fwrite(source.get_buffer(), 1, source.size(), file_);
-}
-
-
-// swap with other and reset to beginning
-void Source::reset(ByteBlock& otherBlock)
-{
- buffer_.Swap(otherBlock);
- current_ = 0;
-}
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/hash.cpp b/extra/yassl/taocrypt/src/hash.cpp
deleted file mode 100644
index 9fa65a36074..00000000000
--- a/extra/yassl/taocrypt/src/hash.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* hash.cpp implements a base for digest types
-*/
-
-#include "runtime.hpp"
-#include <string.h>
-
-#include "hash.hpp"
-
-
-namespace TaoCrypt {
-
-
-HASHwithTransform::HASHwithTransform(word32 digSz, word32 buffSz)
-{
-}
-
-
-void HASHwithTransform::AddLength(word32 len)
-{
- HashLengthType tmp = loLen_;
- if ( (loLen_ += len) < tmp)
- hiLen_++; // carry low to high
- hiLen_ += SafeRightShift<8*sizeof(HashLengthType)>(len);
-}
-
-
-// Update digest with data of size len, do in blocks
-void HASHwithTransform::Update(const byte* data, word32 len)
-{
- // do block size increments
- word32 blockSz = getBlockSize();
- byte* local = reinterpret_cast<byte*>(buffer_);
-
- while (len) {
- word32 add = min(len, blockSz - buffLen_);
- memcpy(&local[buffLen_], data, add);
-
- buffLen_ += add;
- data += add;
- len -= add;
-
- if (buffLen_ == blockSz) {
- ByteReverseIf(local, local, blockSz, getByteOrder());
- Transform();
- AddLength(blockSz);
- buffLen_ = 0;
- }
- }
-}
-
-
-// Final process, place digest in hash
-void HASHwithTransform::Final(byte* hash)
-{
- word32 blockSz = getBlockSize();
- word32 digestSz = getDigestSize();
- word32 padSz = getPadSize();
- ByteOrder order = getByteOrder();
-
- AddLength(buffLen_); // before adding pads
- HashLengthType preLoLen = GetBitCountLo();
- HashLengthType preHiLen = GetBitCountHi();
- byte* local = reinterpret_cast<byte*>(buffer_);
-
- local[buffLen_++] = 0x80; // add 1
-
- // pad with zeros
- if (buffLen_ > padSz) {
- memset(&local[buffLen_], 0, blockSz - buffLen_);
- buffLen_ += blockSz - buffLen_;
-
- ByteReverseIf(local, local, blockSz, order);
- Transform();
- buffLen_ = 0;
- }
- memset(&local[buffLen_], 0, padSz - buffLen_);
-
- ByteReverseIf(local, local, blockSz, order);
-
- memcpy(&local[padSz], order ? &preHiLen : &preLoLen, sizeof(preLoLen));
- memcpy(&local[padSz+4], order ? &preLoLen : &preHiLen, sizeof(preLoLen));
-
- Transform();
- ByteReverseIf(digest_, digest_, digestSz, order);
- memcpy(hash, digest_, digestSz);
-
- Init(); // reset state
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-HASH64withTransform::HASH64withTransform(word32 digSz, word32 buffSz)
-{
-}
-
-
-void HASH64withTransform::AddLength(word32 len)
-{
- HashLengthType tmp = loLen_;
- if ( (loLen_ += len) < tmp)
- hiLen_++; // carry low to high
- hiLen_ += SafeRightShift<8*sizeof(HashLengthType)>(len);
-}
-
-
-// Update digest with data of size len, do in blocks
-void HASH64withTransform::Update(const byte* data, word32 len)
-{
- // do block size increments
- word32 blockSz = getBlockSize();
- byte* local = reinterpret_cast<byte*>(buffer_);
-
- while (len) {
- word32 add = min(len, blockSz - buffLen_);
- memcpy(&local[buffLen_], data, add);
-
- buffLen_ += add;
- data += add;
- len -= add;
-
- if (buffLen_ == blockSz) {
- ByteReverseIf(buffer_, buffer_, blockSz, getByteOrder());
- Transform();
- AddLength(blockSz);
- buffLen_ = 0;
- }
- }
-}
-
-
-// Final process, place digest in hash
-void HASH64withTransform::Final(byte* hash)
-{
- word32 blockSz = getBlockSize();
- word32 digestSz = getDigestSize();
- word32 padSz = getPadSize();
- ByteOrder order = getByteOrder();
-
- AddLength(buffLen_); // before adding pads
- HashLengthType preLoLen = GetBitCountLo();
- HashLengthType preHiLen = GetBitCountHi();
- byte* local = reinterpret_cast<byte*>(buffer_);
-
- local[buffLen_++] = 0x80; // add 1
-
- // pad with zeros
- if (buffLen_ > padSz) {
- memset(&local[buffLen_], 0, blockSz - buffLen_);
- buffLen_ += blockSz - buffLen_;
-
- ByteReverseIf(buffer_, buffer_, blockSz, order);
- Transform();
- buffLen_ = 0;
- }
- memset(&local[buffLen_], 0, padSz - buffLen_);
-
- ByteReverseIf(buffer_, buffer_, padSz, order);
-
- buffer_[blockSz / sizeof(word64) - 2] = order ? preHiLen : preLoLen;
- buffer_[blockSz / sizeof(word64) - 1] = order ? preLoLen : preHiLen;
-
- Transform();
- ByteReverseIf(digest_, digest_, digestSz, order);
- memcpy(hash, digest_, digestSz);
-
- Init(); // reset state
-}
-
-#endif // WORD64_AVAILABLE
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/hc128.cpp b/extra/yassl/taocrypt/src/hc128.cpp
deleted file mode 100644
index 4e1542097d0..00000000000
--- a/extra/yassl/taocrypt/src/hc128.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-#include "runtime.hpp"
-#include "hc128.hpp"
-
-
-
-namespace TaoCrypt {
-
-
-
-
-#ifdef BIG_ENDIAN_ORDER
- #define LITTLE32(x) ByteReverse((word32)x)
-#else
- #define LITTLE32(x) (x)
-#endif
-
-
-/*h1 function*/
-#define h1(x, y) { \
- byte a,c; \
- a = (byte) (x); \
- c = (byte) ((x) >> 16); \
- y = (T_[512+a])+(T_[512+256+c]); \
-}
-
-/*h2 function*/
-#define h2(x, y) { \
- byte a,c; \
- a = (byte) (x); \
- c = (byte) ((x) >> 16); \
- y = (T_[a])+(T_[256+c]); \
-}
-
-/*one step of HC-128, update P and generate 32 bits keystream*/
-#define step_P(u,v,a,b,c,d,n){ \
- word32 tem0,tem1,tem2,tem3; \
- h1((X_[(d)]),tem3); \
- tem0 = rotrFixed((T_[(v)]),23); \
- tem1 = rotrFixed((X_[(c)]),10); \
- tem2 = rotrFixed((X_[(b)]),8); \
- (T_[(u)]) += tem2+(tem0 ^ tem1); \
- (X_[(a)]) = (T_[(u)]); \
- (n) = tem3 ^ (T_[(u)]) ; \
-}
-
-/*one step of HC-128, update Q and generate 32 bits keystream*/
-#define step_Q(u,v,a,b,c,d,n){ \
- word32 tem0,tem1,tem2,tem3; \
- h2((Y_[(d)]),tem3); \
- tem0 = rotrFixed((T_[(v)]),(32-23)); \
- tem1 = rotrFixed((Y_[(c)]),(32-10)); \
- tem2 = rotrFixed((Y_[(b)]),(32-8)); \
- (T_[(u)]) += tem2 + (tem0 ^ tem1); \
- (Y_[(a)]) = (T_[(u)]); \
- (n) = tem3 ^ (T_[(u)]) ; \
-}
-
-
-/*16 steps of HC-128, generate 512 bits keystream*/
-void HC128::GenerateKeystream(word32* keystream)
-{
- word32 cc,dd;
- cc = counter1024_ & 0x1ff;
- dd = (cc+16)&0x1ff;
-
- if (counter1024_ < 512)
- {
- counter1024_ = (counter1024_ + 16) & 0x3ff;
- step_P(cc+0, cc+1, 0, 6, 13,4, keystream[0]);
- step_P(cc+1, cc+2, 1, 7, 14,5, keystream[1]);
- step_P(cc+2, cc+3, 2, 8, 15,6, keystream[2]);
- step_P(cc+3, cc+4, 3, 9, 0, 7, keystream[3]);
- step_P(cc+4, cc+5, 4, 10,1, 8, keystream[4]);
- step_P(cc+5, cc+6, 5, 11,2, 9, keystream[5]);
- step_P(cc+6, cc+7, 6, 12,3, 10,keystream[6]);
- step_P(cc+7, cc+8, 7, 13,4, 11,keystream[7]);
- step_P(cc+8, cc+9, 8, 14,5, 12,keystream[8]);
- step_P(cc+9, cc+10,9, 15,6, 13,keystream[9]);
- step_P(cc+10,cc+11,10,0, 7, 14,keystream[10]);
- step_P(cc+11,cc+12,11,1, 8, 15,keystream[11]);
- step_P(cc+12,cc+13,12,2, 9, 0, keystream[12]);
- step_P(cc+13,cc+14,13,3, 10,1, keystream[13]);
- step_P(cc+14,cc+15,14,4, 11,2, keystream[14]);
- step_P(cc+15,dd+0, 15,5, 12,3, keystream[15]);
- }
- else
- {
- counter1024_ = (counter1024_ + 16) & 0x3ff;
- step_Q(512+cc+0, 512+cc+1, 0, 6, 13,4, keystream[0]);
- step_Q(512+cc+1, 512+cc+2, 1, 7, 14,5, keystream[1]);
- step_Q(512+cc+2, 512+cc+3, 2, 8, 15,6, keystream[2]);
- step_Q(512+cc+3, 512+cc+4, 3, 9, 0, 7, keystream[3]);
- step_Q(512+cc+4, 512+cc+5, 4, 10,1, 8, keystream[4]);
- step_Q(512+cc+5, 512+cc+6, 5, 11,2, 9, keystream[5]);
- step_Q(512+cc+6, 512+cc+7, 6, 12,3, 10,keystream[6]);
- step_Q(512+cc+7, 512+cc+8, 7, 13,4, 11,keystream[7]);
- step_Q(512+cc+8, 512+cc+9, 8, 14,5, 12,keystream[8]);
- step_Q(512+cc+9, 512+cc+10,9, 15,6, 13,keystream[9]);
- step_Q(512+cc+10,512+cc+11,10,0, 7, 14,keystream[10]);
- step_Q(512+cc+11,512+cc+12,11,1, 8, 15,keystream[11]);
- step_Q(512+cc+12,512+cc+13,12,2, 9, 0, keystream[12]);
- step_Q(512+cc+13,512+cc+14,13,3, 10,1, keystream[13]);
- step_Q(512+cc+14,512+cc+15,14,4, 11,2, keystream[14]);
- step_Q(512+cc+15,512+dd+0, 15,5, 12,3, keystream[15]);
- }
-}
-
-
-/* The following defines the initialization functions */
-#define f1(x) (rotrFixed((x),7) ^ rotrFixed((x),18) ^ ((x) >> 3))
-#define f2(x) (rotrFixed((x),17) ^ rotrFixed((x),19) ^ ((x) >> 10))
-
-/*update table P*/
-#define update_P(u,v,a,b,c,d){ \
- word32 tem0,tem1,tem2,tem3; \
- tem0 = rotrFixed((T_[(v)]),23); \
- tem1 = rotrFixed((X_[(c)]),10); \
- tem2 = rotrFixed((X_[(b)]),8); \
- h1((X_[(d)]),tem3); \
- (T_[(u)]) = ((T_[(u)]) + tem2+(tem0^tem1)) ^ tem3; \
- (X_[(a)]) = (T_[(u)]); \
-}
-
-/*update table Q*/
-#define update_Q(u,v,a,b,c,d){ \
- word32 tem0,tem1,tem2,tem3; \
- tem0 = rotrFixed((T_[(v)]),(32-23)); \
- tem1 = rotrFixed((Y_[(c)]),(32-10)); \
- tem2 = rotrFixed((Y_[(b)]),(32-8)); \
- h2((Y_[(d)]),tem3); \
- (T_[(u)]) = ((T_[(u)]) + tem2+(tem0^tem1)) ^ tem3; \
- (Y_[(a)]) = (T_[(u)]); \
-}
-
-/*16 steps of HC-128, without generating keystream, */
-/*but use the outputs to update P and Q*/
-void HC128::SetupUpdate() /*each time 16 steps*/
-{
- word32 cc,dd;
- cc = counter1024_ & 0x1ff;
- dd = (cc+16)&0x1ff;
-
- if (counter1024_ < 512)
- {
- counter1024_ = (counter1024_ + 16) & 0x3ff;
- update_P(cc+0, cc+1, 0, 6, 13, 4);
- update_P(cc+1, cc+2, 1, 7, 14, 5);
- update_P(cc+2, cc+3, 2, 8, 15, 6);
- update_P(cc+3, cc+4, 3, 9, 0, 7);
- update_P(cc+4, cc+5, 4, 10,1, 8);
- update_P(cc+5, cc+6, 5, 11,2, 9);
- update_P(cc+6, cc+7, 6, 12,3, 10);
- update_P(cc+7, cc+8, 7, 13,4, 11);
- update_P(cc+8, cc+9, 8, 14,5, 12);
- update_P(cc+9, cc+10,9, 15,6, 13);
- update_P(cc+10,cc+11,10,0, 7, 14);
- update_P(cc+11,cc+12,11,1, 8, 15);
- update_P(cc+12,cc+13,12,2, 9, 0);
- update_P(cc+13,cc+14,13,3, 10, 1);
- update_P(cc+14,cc+15,14,4, 11, 2);
- update_P(cc+15,dd+0, 15,5, 12, 3);
- }
- else
- {
- counter1024_ = (counter1024_ + 16) & 0x3ff;
- update_Q(512+cc+0, 512+cc+1, 0, 6, 13, 4);
- update_Q(512+cc+1, 512+cc+2, 1, 7, 14, 5);
- update_Q(512+cc+2, 512+cc+3, 2, 8, 15, 6);
- update_Q(512+cc+3, 512+cc+4, 3, 9, 0, 7);
- update_Q(512+cc+4, 512+cc+5, 4, 10,1, 8);
- update_Q(512+cc+5, 512+cc+6, 5, 11,2, 9);
- update_Q(512+cc+6, 512+cc+7, 6, 12,3, 10);
- update_Q(512+cc+7, 512+cc+8, 7, 13,4, 11);
- update_Q(512+cc+8, 512+cc+9, 8, 14,5, 12);
- update_Q(512+cc+9, 512+cc+10,9, 15,6, 13);
- update_Q(512+cc+10,512+cc+11,10,0, 7, 14);
- update_Q(512+cc+11,512+cc+12,11,1, 8, 15);
- update_Q(512+cc+12,512+cc+13,12,2, 9, 0);
- update_Q(512+cc+13,512+cc+14,13,3, 10, 1);
- update_Q(512+cc+14,512+cc+15,14,4, 11, 2);
- update_Q(512+cc+15,512+dd+0, 15,5, 12, 3);
- }
-}
-
-
-/* for the 128-bit key: key[0]...key[15]
-* key[0] is the least significant byte of ctx->key[0] (K_0);
-* key[3] is the most significant byte of ctx->key[0] (K_0);
-* ...
-* key[12] is the least significant byte of ctx->key[3] (K_3)
-* key[15] is the most significant byte of ctx->key[3] (K_3)
-*
-* for the 128-bit iv: iv[0]...iv[15]
-* iv[0] is the least significant byte of ctx->iv[0] (IV_0);
-* iv[3] is the most significant byte of ctx->iv[0] (IV_0);
-* ...
-* iv[12] is the least significant byte of ctx->iv[3] (IV_3)
-* iv[15] is the most significant byte of ctx->iv[3] (IV_3)
-*/
-
-
-
-void HC128::SetIV(const byte* iv)
-{
- word32 i;
-
- for (i = 0; i < (128 >> 5); i++)
- iv_[i] = LITTLE32(((word32*)iv)[i]);
-
- for (; i < 8; i++) iv_[i] = iv_[i-4];
-
- /* expand the key and IV into the table T */
- /* (expand the key and IV into the table P and Q) */
-
- for (i = 0; i < 8; i++) T_[i] = key_[i];
- for (i = 8; i < 16; i++) T_[i] = iv_[i-8];
-
- for (i = 16; i < (256+16); i++)
- T_[i] = f2(T_[i-2]) + T_[i-7] + f1(T_[i-15]) + T_[i-16]+i;
-
- for (i = 0; i < 16; i++) T_[i] = T_[256+i];
-
- for (i = 16; i < 1024; i++)
- T_[i] = f2(T_[i-2]) + T_[i-7] + f1(T_[i-15]) + T_[i-16]+256+i;
-
- /* initialize counter1024, X and Y */
- counter1024_ = 0;
- for (i = 0; i < 16; i++) X_[i] = T_[512-16+i];
- for (i = 0; i < 16; i++) Y_[i] = T_[512+512-16+i];
-
- /* run the cipher 1024 steps before generating the output */
- for (i = 0; i < 64; i++) SetupUpdate();
-}
-
-
-void HC128::SetKey(const byte* key, const byte* iv)
-{
- word32 i;
-
- /* Key size in bits 128 */
- for (i = 0; i < (128 >> 5); i++)
- key_[i] = LITTLE32(((word32*)key)[i]);
-
- for ( ; i < 8 ; i++) key_[i] = key_[i-4];
-
- SetIV(iv);
-}
-
-
-/* The following defines the encryption of data stream */
-void HC128::Process(byte* output, const byte* input, word32 msglen)
-{
- word32 i, keystream[16];
-
- for ( ; msglen >= 64; msglen -= 64, input += 64, output += 64)
- {
- GenerateKeystream(keystream);
-
- /* unroll loop */
- ((word32*)output)[0] = ((word32*)input)[0] ^ LITTLE32(keystream[0]);
- ((word32*)output)[1] = ((word32*)input)[1] ^ LITTLE32(keystream[1]);
- ((word32*)output)[2] = ((word32*)input)[2] ^ LITTLE32(keystream[2]);
- ((word32*)output)[3] = ((word32*)input)[3] ^ LITTLE32(keystream[3]);
- ((word32*)output)[4] = ((word32*)input)[4] ^ LITTLE32(keystream[4]);
- ((word32*)output)[5] = ((word32*)input)[5] ^ LITTLE32(keystream[5]);
- ((word32*)output)[6] = ((word32*)input)[6] ^ LITTLE32(keystream[6]);
- ((word32*)output)[7] = ((word32*)input)[7] ^ LITTLE32(keystream[7]);
- ((word32*)output)[8] = ((word32*)input)[8] ^ LITTLE32(keystream[8]);
- ((word32*)output)[9] = ((word32*)input)[9] ^ LITTLE32(keystream[9]);
- ((word32*)output)[10] = ((word32*)input)[10] ^ LITTLE32(keystream[10]);
- ((word32*)output)[11] = ((word32*)input)[11] ^ LITTLE32(keystream[11]);
- ((word32*)output)[12] = ((word32*)input)[12] ^ LITTLE32(keystream[12]);
- ((word32*)output)[13] = ((word32*)input)[13] ^ LITTLE32(keystream[13]);
- ((word32*)output)[14] = ((word32*)input)[14] ^ LITTLE32(keystream[14]);
- ((word32*)output)[15] = ((word32*)input)[15] ^ LITTLE32(keystream[15]);
- }
-
- if (msglen > 0)
- {
- GenerateKeystream(keystream);
-
-#ifdef BIG_ENDIAN_ORDER
- {
- word32 wordsLeft = msglen / sizeof(word32);
- if (msglen % sizeof(word32)) wordsLeft++;
-
- ByteReverse(keystream, keystream, wordsLeft * sizeof(word32));
- }
-#endif
-
- for (i = 0; i < msglen; i++)
- output[i] = input[i] ^ ((byte*)keystream)[i];
- }
-
-}
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp
deleted file mode 100644
index 432a0ad20af..00000000000
--- a/extra/yassl/taocrypt/src/integer.cpp
+++ /dev/null
@@ -1,3892 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-
-/* based on Wei Dai's integer.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "integer.hpp"
-#include "modarith.hpp"
-#include "asn.hpp"
-
-
-
-#ifdef __DECCXX
- #include <c_asm.h> // for asm overflow assembly
-#endif
-
-#if defined(_M_X64) || defined(_M_IA64)
- #include <intrin.h>
-#pragma intrinsic(_umul128)
-#endif
-
-
-#ifdef __GNUC__
- #include <signal.h>
- #include <setjmp.h>
-#endif
-
-
-#ifdef SSE2_INTRINSICS_AVAILABLE
- #ifdef __GNUC__
- #include <xmmintrin.h>
- #ifdef TAOCRYPT_MEMALIGN_AVAILABLE
- #include <malloc.h>
- #else
- #include <stdlib.h>
- #endif
- #else
- #include <emmintrin.h>
- #endif
-#elif defined(_MSC_VER) && defined(_M_IX86)
-/* #pragma message("You do not seem to have the Visual C++ Processor Pack ")
- #pragma message("installed, so use of SSE2 intrinsics will be disabled.")
-*/
-#elif defined(__GNUC__) && defined(__i386__)
-/* #warning You do not have GCC 3.3 or later, or did not specify the -msse2 \
- compiler option. Use of SSE2 intrinsics will be disabled.
-*/
-#endif
-
-
-namespace TaoCrypt {
-
-
-#ifdef SSE2_INTRINSICS_AVAILABLE
-
-template <class T>
-CPP_TYPENAME AlignedAllocator<T>::pointer AlignedAllocator<T>::allocate(
- size_type n, const void *)
-{
- if (n > this->max_size())
- return 0;
- if (n == 0)
- return 0;
- if (n >= 4)
- {
- void* p;
- #ifdef TAOCRYPT_MM_MALLOC_AVAILABLE
- p = _mm_malloc(sizeof(T)*n, 16);
- #elif defined(TAOCRYPT_MEMALIGN_AVAILABLE)
- p = memalign(16, sizeof(T)*n);
- #elif defined(TAOCRYPT_MALLOC_ALIGNMENT_IS_16)
- p = malloc(sizeof(T)*n);
- #else
- p = (byte *)malloc(sizeof(T)*n + 8);
- // assume malloc alignment is at least 8
- #endif
-
- #ifdef TAOCRYPT_NO_ALIGNED_ALLOC
- m_pBlock = p;
- if (!IsAlignedOn(p, 16))
- {
- p = (byte *)p + 8;
- }
- #endif
-
- return (T*)p;
- }
- return NEW_TC T[n];
-}
-
-
-template <class T>
-void AlignedAllocator<T>::deallocate(void* p, size_type n)
-{
- memset(p, 0, n*sizeof(T));
- if (n >= 4)
- {
- #ifdef TAOCRYPT_MM_MALLOC_AVAILABLE
- _mm_free(p);
- #elif defined(TAOCRYPT_NO_ALIGNED_ALLOC)
- free(m_pBlock);
- m_pBlock = 0;
- #else
- free(p);
- #endif
- }
- else
- tcArrayDelete((T *)p);
-}
-
-#endif // SSE2
-
-
-// ******** start of integer needs
-
-// start 5.2.1 adds DWord and Word ********
-
-// ********************************************************
-
-class DWord {
-public:
-DWord() {}
-
-#ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- explicit DWord(word low)
- {
- whole_ = low;
- }
-#else
- explicit DWord(word low)
- {
- halfs_.low = low;
- halfs_.high = 0;
- }
-#endif
-
- DWord(word low, word high)
- {
- halfs_.low = low;
- halfs_.high = high;
- }
-
- static DWord Multiply(word a, word b)
- {
- DWord r;
-
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- r.whole_ = (dword)a * b;
-
- #elif defined(_M_X64) || defined(_M_IA64)
- r.halfs_.low = _umul128(a, b, &r.halfs_.high);
-
- #elif defined(__alpha__)
- r.halfs_.low = a*b;
- #ifdef __GNUC__
- __asm__("umulh %1,%2,%0" : "=r" (r.halfs_.high)
- : "r" (a), "r" (b));
- #elif defined(__DECCXX)
- r.halfs_.high = asm("umulh %a0, %a1, %v0", a, b);
- #else
- #error unknown alpha compiler
- #endif
-
- #elif defined(__ia64__)
- r.halfs_.low = a*b;
- __asm__("xmpy.hu %0=%1,%2" : "=f" (r.halfs_.high)
- : "f" (a), "f" (b));
-
- #elif defined(_ARCH_PPC64)
- r.halfs_.low = a*b;
- __asm__("mulhdu %0,%1,%2" : "=r" (r.halfs_.high)
- : "r" (a), "r" (b) : "cc");
-
- #elif defined(__x86_64__)
- __asm__("mulq %3" : "=d" (r.halfs_.high), "=a" (r.halfs_.low) :
- "a" (a), "rm" (b) : "cc");
-
- #elif defined(__mips64)
- unsigned __int128 t = (unsigned __int128) a * b;
- r.halfs_.high = t >> 64;
- r.halfs_.low = (word) t;
-
- #elif defined(_M_IX86)
- // for testing
- word64 t = (word64)a * b;
- r.halfs_.high = ((word32 *)(&t))[1];
- r.halfs_.low = (word32)t;
- #else
- #error can not implement DWord
- #endif
-
- return r;
- }
-
- static DWord MultiplyAndAdd(word a, word b, word c)
- {
- DWord r = Multiply(a, b);
- return r += c;
- }
-
- DWord & operator+=(word a)
- {
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- whole_ = whole_ + a;
- #else
- halfs_.low += a;
- halfs_.high += (halfs_.low < a);
- #endif
- return *this;
- }
-
- DWord operator+(word a)
- {
- DWord r;
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- r.whole_ = whole_ + a;
- #else
- r.halfs_.low = halfs_.low + a;
- r.halfs_.high = halfs_.high + (r.halfs_.low < a);
- #endif
- return r;
- }
-
- DWord operator-(DWord a)
- {
- DWord r;
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- r.whole_ = whole_ - a.whole_;
- #else
- r.halfs_.low = halfs_.low - a.halfs_.low;
- r.halfs_.high = halfs_.high - a.halfs_.high -
- (r.halfs_.low > halfs_.low);
- #endif
- return r;
- }
-
- DWord operator-(word a)
- {
- DWord r;
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- r.whole_ = whole_ - a;
- #else
- r.halfs_.low = halfs_.low - a;
- r.halfs_.high = halfs_.high - (r.halfs_.low > halfs_.low);
- #endif
- return r;
- }
-
- // returns quotient, which must fit in a word
- word operator/(word divisor);
-
- word operator%(word a);
-
- bool operator!() const
- {
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- return !whole_;
- #else
- return !halfs_.high && !halfs_.low;
- #endif
- }
-
- word GetLowHalf() const {return halfs_.low;}
- word GetHighHalf() const {return halfs_.high;}
- word GetHighHalfAsBorrow() const {return 0-halfs_.high;}
-
-private:
- union
- {
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- dword whole_;
- #endif
- struct
- {
- #ifdef LITTLE_ENDIAN_ORDER
- word low;
- word high;
- #else
- word high;
- word low;
- #endif
- } halfs_;
- };
-};
-
-
-class Word {
-public:
- Word() {}
-
- Word(word value)
- {
- whole_ = value;
- }
-
- Word(hword low, hword high)
- {
- whole_ = low | (word(high) << (WORD_BITS/2));
- }
-
- static Word Multiply(hword a, hword b)
- {
- Word r;
- r.whole_ = (word)a * b;
- return r;
- }
-
- Word operator-(Word a)
- {
- Word r;
- r.whole_ = whole_ - a.whole_;
- return r;
- }
-
- Word operator-(hword a)
- {
- Word r;
- r.whole_ = whole_ - a;
- return r;
- }
-
- // returns quotient, which must fit in a word
- hword operator/(hword divisor)
- {
- return hword(whole_ / divisor);
- }
-
- bool operator!() const
- {
- return !whole_;
- }
-
- word GetWhole() const {return whole_;}
- hword GetLowHalf() const {return hword(whole_);}
- hword GetHighHalf() const {return hword(whole_>>(WORD_BITS/2));}
- hword GetHighHalfAsBorrow() const {return 0-hword(whole_>>(WORD_BITS/2));}
-
-private:
- word whole_;
-};
-
-
-// dummy is VC60 compiler bug workaround
-// do a 3 word by 2 word divide, returns quotient and leaves remainder in A
-template <class S, class D>
-S DivideThreeWordsByTwo(S* A, S B0, S B1, D* dummy_VC6_WorkAround = 0)
-{
- // estimate the quotient: do a 2 S by 1 S divide
- S Q;
- if (S(B1+1) == 0)
- Q = A[2];
- else
- Q = D(A[1], A[2]) / S(B1+1);
-
- // now subtract Q*B from A
- D p = D::Multiply(B0, Q);
- D u = (D) A[0] - p.GetLowHalf();
- A[0] = u.GetLowHalf();
- u = (D) A[1] - p.GetHighHalf() - u.GetHighHalfAsBorrow() -
- D::Multiply(B1, Q);
- A[1] = u.GetLowHalf();
- A[2] += u.GetHighHalf();
-
- // Q <= actual quotient, so fix it
- while (A[2] || A[1] > B1 || (A[1]==B1 && A[0]>=B0))
- {
- u = (D) A[0] - B0;
- A[0] = u.GetLowHalf();
- u = (D) A[1] - B1 - u.GetHighHalfAsBorrow();
- A[1] = u.GetLowHalf();
- A[2] += u.GetHighHalf();
- Q++;
- }
-
- return Q;
-}
-
-
-// do a 4 word by 2 word divide, returns 2 word quotient in Q0 and Q1
-template <class S, class D>
-inline D DivideFourWordsByTwo(S *T, const D &Al, const D &Ah, const D &B)
-{
- if (!B) // if divisor is 0, we assume divisor==2**(2*WORD_BITS)
- return D(Ah.GetLowHalf(), Ah.GetHighHalf());
- else
- {
- S Q[2];
- T[0] = Al.GetLowHalf();
- T[1] = Al.GetHighHalf();
- T[2] = Ah.GetLowHalf();
- T[3] = Ah.GetHighHalf();
- Q[1] = DivideThreeWordsByTwo<S, D>(T+1, B.GetLowHalf(),
- B.GetHighHalf());
- Q[0] = DivideThreeWordsByTwo<S, D>(T, B.GetLowHalf(), B.GetHighHalf());
- return D(Q[0], Q[1]);
- }
-}
-
-
-// returns quotient, which must fit in a word
-inline word DWord::operator/(word a)
-{
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- return word(whole_ / a);
- #else
- hword r[4];
- return DivideFourWordsByTwo<hword, Word>(r, halfs_.low,
- halfs_.high, a).GetWhole();
- #endif
-}
-
-inline word DWord::operator%(word a)
-{
- #ifdef TAOCRYPT_NATIVE_DWORD_AVAILABLE
- return word(whole_ % a);
- #else
- if (a < (word(1) << (WORD_BITS/2)))
- {
- hword h = hword(a);
- word r = halfs_.high % h;
- r = ((halfs_.low >> (WORD_BITS/2)) + (r << (WORD_BITS/2))) % h;
- return hword((hword(halfs_.low) + (r << (WORD_BITS/2))) % h);
- }
- else
- {
- hword r[4];
- DivideFourWordsByTwo<hword, Word>(r, halfs_.low, halfs_.high, a);
- return Word(r[0], r[1]).GetWhole();
- }
- #endif
-}
-
-
-
-// end 5.2.1 DWord and Word adds
-
-
-
-
-
-static const unsigned int RoundupSizeTable[] = {2, 2, 2, 4, 4, 8, 8, 8, 8};
-
-static inline unsigned int RoundupSize(unsigned int n)
-{
- if (n<=8)
- return RoundupSizeTable[n];
- else if (n<=16)
- return 16;
- else if (n<=32)
- return 32;
- else if (n<=64)
- return 64;
- else return 1U << BitPrecision(n-1);
-}
-
-
-static int Compare(const word *A, const word *B, unsigned int N)
-{
- while (N--)
- if (A[N] > B[N])
- return 1;
- else if (A[N] < B[N])
- return -1;
-
- return 0;
-}
-
-static word Increment(word *A, unsigned int N, word B=1)
-{
- word t = A[0];
- A[0] = t+B;
- if (A[0] >= t)
- return 0;
- for (unsigned i=1; i<N; i++)
- if (++A[i])
- return 0;
- return 1;
-}
-
-static word Decrement(word *A, unsigned int N, word B=1)
-{
- word t = A[0];
- A[0] = t-B;
- if (A[0] <= t)
- return 0;
- for (unsigned i=1; i<N; i++)
- if (A[i]--)
- return 0;
- return 1;
-}
-
-static void TwosComplement(word *A, unsigned int N)
-{
- Decrement(A, N);
- for (unsigned i=0; i<N; i++)
- A[i] = ~A[i];
-}
-
-
-static word LinearMultiply(word *C, const word *A, word B, unsigned int N)
-{
- word carry=0;
- for(unsigned i=0; i<N; i++)
- {
- DWord p = DWord::MultiplyAndAdd(A[i], B, carry);
- C[i] = p.GetLowHalf();
- carry = p.GetHighHalf();
- }
- return carry;
-}
-
-
-static word AtomicInverseModPower2(word A)
-{
- word R=A%8;
-
- for (unsigned i=3; i<WORD_BITS; i*=2)
- R = R*(2-R*A);
-
- return R;
-}
-
-
-// ********************************************************
-
-class Portable
-{
-public:
- static word TAOCRYPT_CDECL Add(word *C, const word *A, const word *B,
- unsigned int N);
- static word TAOCRYPT_CDECL Subtract(word *C, const word *A, const word*B,
- unsigned int N);
- static void TAOCRYPT_CDECL Multiply2(word *C, const word *A, const word *B);
- static word TAOCRYPT_CDECL Multiply2Add(word *C,
- const word *A, const word *B);
- static void TAOCRYPT_CDECL Multiply4(word *C, const word *A, const word *B);
- static void TAOCRYPT_CDECL Multiply8(word *C, const word *A, const word *B);
- static unsigned int TAOCRYPT_CDECL MultiplyRecursionLimit() {return 8;}
-
- static void TAOCRYPT_CDECL Multiply2Bottom(word *C, const word *A,
- const word *B);
- static void TAOCRYPT_CDECL Multiply4Bottom(word *C, const word *A,
- const word *B);
- static void TAOCRYPT_CDECL Multiply8Bottom(word *C, const word *A,
- const word *B);
- static unsigned int TAOCRYPT_CDECL MultiplyBottomRecursionLimit(){return 8;}
-
- static void TAOCRYPT_CDECL Square2(word *R, const word *A);
- static void TAOCRYPT_CDECL Square4(word *R, const word *A);
- static unsigned int TAOCRYPT_CDECL SquareRecursionLimit() {return 4;}
-};
-
-word Portable::Add(word *C, const word *A, const word *B, unsigned int N)
-{
- DWord u(0, 0);
- for (unsigned int i = 0; i < N; i+=2)
- {
- u = DWord(A[i]) + B[i] + u.GetHighHalf();
- C[i] = u.GetLowHalf();
- u = DWord(A[i+1]) + B[i+1] + u.GetHighHalf();
- C[i+1] = u.GetLowHalf();
- }
- return u.GetHighHalf();
-}
-
-word Portable::Subtract(word *C, const word *A, const word *B, unsigned int N)
-{
- DWord u(0, 0);
- for (unsigned int i = 0; i < N; i+=2)
- {
- u = (DWord) A[i] - B[i] - u.GetHighHalfAsBorrow();
- C[i] = u.GetLowHalf();
- u = (DWord) A[i+1] - B[i+1] - u.GetHighHalfAsBorrow();
- C[i+1] = u.GetLowHalf();
- }
- return 0-u.GetHighHalf();
-}
-
-void Portable::Multiply2(word *C, const word *A, const word *B)
-{
-/*
- word s;
- dword d;
-
- if (A1 >= A0)
- if (B0 >= B1)
- {
- s = 0;
- d = (dword)(A1-A0)*(B0-B1);
- }
- else
- {
- s = (A1-A0);
- d = (dword)s*(word)(B0-B1);
- }
- else
- if (B0 > B1)
- {
- s = (B0-B1);
- d = (word)(A1-A0)*(dword)s;
- }
- else
- {
- s = 0;
- d = (dword)(A0-A1)*(B1-B0);
- }
-*/
- // this segment is the branchless equivalent of above
- word D[4] = {A[1]-A[0], A[0]-A[1], B[0]-B[1], B[1]-B[0]};
- unsigned int ai = A[1] < A[0];
- unsigned int bi = B[0] < B[1];
- unsigned int di = ai & bi;
- DWord d = DWord::Multiply(D[di], D[di+2]);
- D[1] = D[3] = 0;
- unsigned int si = ai + !bi;
- word s = D[si];
-
- DWord A0B0 = DWord::Multiply(A[0], B[0]);
- C[0] = A0B0.GetLowHalf();
-
- DWord A1B1 = DWord::Multiply(A[1], B[1]);
- DWord t = (DWord) A0B0.GetHighHalf() + A0B0.GetLowHalf() + d.GetLowHalf()
- + A1B1.GetLowHalf();
- C[1] = t.GetLowHalf();
-
- t = A1B1 + t.GetHighHalf() + A0B0.GetHighHalf() + d.GetHighHalf()
- + A1B1.GetHighHalf() - s;
- C[2] = t.GetLowHalf();
- C[3] = t.GetHighHalf();
-}
-
-void Portable::Multiply2Bottom(word *C, const word *A, const word *B)
-{
- DWord t = DWord::Multiply(A[0], B[0]);
- C[0] = t.GetLowHalf();
- C[1] = t.GetHighHalf() + A[0]*B[1] + A[1]*B[0];
-}
-
-word Portable::Multiply2Add(word *C, const word *A, const word *B)
-{
- word D[4] = {A[1]-A[0], A[0]-A[1], B[0]-B[1], B[1]-B[0]};
- unsigned int ai = A[1] < A[0];
- unsigned int bi = B[0] < B[1];
- unsigned int di = ai & bi;
- DWord d = DWord::Multiply(D[di], D[di+2]);
- D[1] = D[3] = 0;
- unsigned int si = ai + !bi;
- word s = D[si];
-
- DWord A0B0 = DWord::Multiply(A[0], B[0]);
- DWord t = A0B0 + C[0];
- C[0] = t.GetLowHalf();
-
- DWord A1B1 = DWord::Multiply(A[1], B[1]);
- t = (DWord) t.GetHighHalf() + A0B0.GetLowHalf() + d.GetLowHalf() +
- A1B1.GetLowHalf() + C[1];
- C[1] = t.GetLowHalf();
-
- t = (DWord) t.GetHighHalf() + A1B1.GetLowHalf() + A0B0.GetHighHalf() +
- d.GetHighHalf() + A1B1.GetHighHalf() - s + C[2];
- C[2] = t.GetLowHalf();
-
- t = (DWord) t.GetHighHalf() + A1B1.GetHighHalf() + C[3];
- C[3] = t.GetLowHalf();
- return t.GetHighHalf();
-}
-
-
-#define MulAcc(x, y) \
- p = DWord::MultiplyAndAdd(A[x], B[y], c); \
- c = p.GetLowHalf(); \
- p = (DWord) d + p.GetHighHalf(); \
- d = p.GetLowHalf(); \
- e += p.GetHighHalf();
-
-#define SaveMulAcc(s, x, y) \
- R[s] = c; \
- p = DWord::MultiplyAndAdd(A[x], B[y], d); \
- c = p.GetLowHalf(); \
- p = (DWord) e + p.GetHighHalf(); \
- d = p.GetLowHalf(); \
- e = p.GetHighHalf();
-
-#define SquAcc(x, y) \
- q = DWord::Multiply(A[x], A[y]); \
- p = q + c; \
- c = p.GetLowHalf(); \
- p = (DWord) d + p.GetHighHalf(); \
- d = p.GetLowHalf(); \
- e += p.GetHighHalf(); \
- p = q + c; \
- c = p.GetLowHalf(); \
- p = (DWord) d + p.GetHighHalf(); \
- d = p.GetLowHalf(); \
- e += p.GetHighHalf();
-
-#define SaveSquAcc(s, x, y) \
- R[s] = c; \
- q = DWord::Multiply(A[x], A[y]); \
- p = q + d; \
- c = p.GetLowHalf(); \
- p = (DWord) e + p.GetHighHalf(); \
- d = p.GetLowHalf(); \
- e = p.GetHighHalf(); \
- p = q + c; \
- c = p.GetLowHalf(); \
- p = (DWord) d + p.GetHighHalf(); \
- d = p.GetLowHalf(); \
- e += p.GetHighHalf();
-
-
-void Portable::Multiply4(word *R, const word *A, const word *B)
-{
- DWord p;
- word c, d, e;
-
- p = DWord::Multiply(A[0], B[0]);
- R[0] = p.GetLowHalf();
- c = p.GetHighHalf();
- d = e = 0;
-
- MulAcc(0, 1);
- MulAcc(1, 0);
-
- SaveMulAcc(1, 2, 0);
- MulAcc(1, 1);
- MulAcc(0, 2);
-
- SaveMulAcc(2, 0, 3);
- MulAcc(1, 2);
- MulAcc(2, 1);
- MulAcc(3, 0);
-
- SaveMulAcc(3, 3, 1);
- MulAcc(2, 2);
- MulAcc(1, 3);
-
- SaveMulAcc(4, 2, 3);
- MulAcc(3, 2);
-
- R[5] = c;
- p = DWord::MultiplyAndAdd(A[3], B[3], d);
- R[6] = p.GetLowHalf();
- R[7] = e + p.GetHighHalf();
-}
-
-void Portable::Square2(word *R, const word *A)
-{
- DWord p, q;
- word c, d, e;
-
- p = DWord::Multiply(A[0], A[0]);
- R[0] = p.GetLowHalf();
- c = p.GetHighHalf();
- d = e = 0;
-
- SquAcc(0, 1);
-
- R[1] = c;
- p = DWord::MultiplyAndAdd(A[1], A[1], d);
- R[2] = p.GetLowHalf();
- R[3] = e + p.GetHighHalf();
-}
-
-void Portable::Square4(word *R, const word *A)
-{
-#ifdef _MSC_VER
- // VC60 workaround: MSVC 6.0 has an optimization bug that makes
- // (dword)A*B where either A or B has been cast to a dword before
- // very expensive. Revisit this function when this
- // bug is fixed.
- Multiply4(R, A, A);
-#else
- const word *B = A;
- DWord p, q;
- word c, d, e;
-
- p = DWord::Multiply(A[0], A[0]);
- R[0] = p.GetLowHalf();
- c = p.GetHighHalf();
- d = e = 0;
-
- SquAcc(0, 1);
-
- SaveSquAcc(1, 2, 0);
- MulAcc(1, 1);
-
- SaveSquAcc(2, 0, 3);
- SquAcc(1, 2);
-
- SaveSquAcc(3, 3, 1);
- MulAcc(2, 2);
-
- SaveSquAcc(4, 2, 3);
-
- R[5] = c;
- p = DWord::MultiplyAndAdd(A[3], A[3], d);
- R[6] = p.GetLowHalf();
- R[7] = e + p.GetHighHalf();
-#endif
-}
-
-void Portable::Multiply8(word *R, const word *A, const word *B)
-{
- DWord p;
- word c, d, e;
-
- p = DWord::Multiply(A[0], B[0]);
- R[0] = p.GetLowHalf();
- c = p.GetHighHalf();
- d = e = 0;
-
- MulAcc(0, 1);
- MulAcc(1, 0);
-
- SaveMulAcc(1, 2, 0);
- MulAcc(1, 1);
- MulAcc(0, 2);
-
- SaveMulAcc(2, 0, 3);
- MulAcc(1, 2);
- MulAcc(2, 1);
- MulAcc(3, 0);
-
- SaveMulAcc(3, 0, 4);
- MulAcc(1, 3);
- MulAcc(2, 2);
- MulAcc(3, 1);
- MulAcc(4, 0);
-
- SaveMulAcc(4, 0, 5);
- MulAcc(1, 4);
- MulAcc(2, 3);
- MulAcc(3, 2);
- MulAcc(4, 1);
- MulAcc(5, 0);
-
- SaveMulAcc(5, 0, 6);
- MulAcc(1, 5);
- MulAcc(2, 4);
- MulAcc(3, 3);
- MulAcc(4, 2);
- MulAcc(5, 1);
- MulAcc(6, 0);
-
- SaveMulAcc(6, 0, 7);
- MulAcc(1, 6);
- MulAcc(2, 5);
- MulAcc(3, 4);
- MulAcc(4, 3);
- MulAcc(5, 2);
- MulAcc(6, 1);
- MulAcc(7, 0);
-
- SaveMulAcc(7, 1, 7);
- MulAcc(2, 6);
- MulAcc(3, 5);
- MulAcc(4, 4);
- MulAcc(5, 3);
- MulAcc(6, 2);
- MulAcc(7, 1);
-
- SaveMulAcc(8, 2, 7);
- MulAcc(3, 6);
- MulAcc(4, 5);
- MulAcc(5, 4);
- MulAcc(6, 3);
- MulAcc(7, 2);
-
- SaveMulAcc(9, 3, 7);
- MulAcc(4, 6);
- MulAcc(5, 5);
- MulAcc(6, 4);
- MulAcc(7, 3);
-
- SaveMulAcc(10, 4, 7);
- MulAcc(5, 6);
- MulAcc(6, 5);
- MulAcc(7, 4);
-
- SaveMulAcc(11, 5, 7);
- MulAcc(6, 6);
- MulAcc(7, 5);
-
- SaveMulAcc(12, 6, 7);
- MulAcc(7, 6);
-
- R[13] = c;
- p = DWord::MultiplyAndAdd(A[7], B[7], d);
- R[14] = p.GetLowHalf();
- R[15] = e + p.GetHighHalf();
-}
-
-void Portable::Multiply4Bottom(word *R, const word *A, const word *B)
-{
- DWord p;
- word c, d, e;
-
- p = DWord::Multiply(A[0], B[0]);
- R[0] = p.GetLowHalf();
- c = p.GetHighHalf();
- d = e = 0;
-
- MulAcc(0, 1);
- MulAcc(1, 0);
-
- SaveMulAcc(1, 2, 0);
- MulAcc(1, 1);
- MulAcc(0, 2);
-
- R[2] = c;
- R[3] = d + A[0] * B[3] + A[1] * B[2] + A[2] * B[1] + A[3] * B[0];
-}
-
-void Portable::Multiply8Bottom(word *R, const word *A, const word *B)
-{
- DWord p;
- word c, d, e;
-
- p = DWord::Multiply(A[0], B[0]);
- R[0] = p.GetLowHalf();
- c = p.GetHighHalf();
- d = e = 0;
-
- MulAcc(0, 1);
- MulAcc(1, 0);
-
- SaveMulAcc(1, 2, 0);
- MulAcc(1, 1);
- MulAcc(0, 2);
-
- SaveMulAcc(2, 0, 3);
- MulAcc(1, 2);
- MulAcc(2, 1);
- MulAcc(3, 0);
-
- SaveMulAcc(3, 0, 4);
- MulAcc(1, 3);
- MulAcc(2, 2);
- MulAcc(3, 1);
- MulAcc(4, 0);
-
- SaveMulAcc(4, 0, 5);
- MulAcc(1, 4);
- MulAcc(2, 3);
- MulAcc(3, 2);
- MulAcc(4, 1);
- MulAcc(5, 0);
-
- SaveMulAcc(5, 0, 6);
- MulAcc(1, 5);
- MulAcc(2, 4);
- MulAcc(3, 3);
- MulAcc(4, 2);
- MulAcc(5, 1);
- MulAcc(6, 0);
-
- R[6] = c;
- R[7] = d + A[0] * B[7] + A[1] * B[6] + A[2] * B[5] + A[3] * B[4] +
- A[4] * B[3] + A[5] * B[2] + A[6] * B[1] + A[7] * B[0];
-}
-
-
-#undef MulAcc
-#undef SaveMulAcc
-#undef SquAcc
-#undef SaveSquAcc
-
-// optimized
-
-#ifdef TAOCRYPT_X86ASM_AVAILABLE
-
-// ************** x86 feature detection ***************
-
-
-#ifdef SSE2_INTRINSICS_AVAILABLE
-
-#ifndef _MSC_VER
- static jmp_buf s_env;
- static void SigIllHandler(int)
- {
- longjmp(s_env, 1);
- }
-#endif
-
-static bool HasSSE2()
-{
- if (!IsPentium())
- return false;
-
- word32 cpuid[4];
- CpuId(1, cpuid);
- if ((cpuid[3] & (1 << 26)) == 0)
- return false;
-
-#ifdef _MSC_VER
- __try
- {
- __asm xorpd xmm0, xmm0 // executing SSE2 instruction
- }
- __except (1)
- {
- return false;
- }
- return true;
-#else
- typedef void (*SigHandler)(int);
-
- SigHandler oldHandler = signal(SIGILL, SigIllHandler);
- if (oldHandler == SIG_ERR)
- return false;
-
- bool result = true;
- if (setjmp(s_env))
- result = false;
- else
- __asm __volatile ("xorpd %xmm0, %xmm0");
-
- signal(SIGILL, oldHandler);
- return result;
-#endif
-}
-#endif // SSE2_INTRINSICS_AVAILABLE
-
-
-static bool IsP4()
-{
- if (!IsPentium())
- return false;
-
- word32 cpuid[4];
-
- CpuId(1, cpuid);
- return ((cpuid[0] >> 8) & 0xf) == 0xf;
-}
-
-// ************** Pentium/P4 optimizations ***************
-
-class PentiumOptimized : public Portable
-{
-public:
- static word TAOCRYPT_CDECL Add(word *C, const word *A, const word *B,
- unsigned int N);
- static word TAOCRYPT_CDECL Subtract(word *C, const word *A, const word *B,
- unsigned int N);
- static void TAOCRYPT_CDECL Multiply4(word *C, const word *A,
- const word *B);
- static void TAOCRYPT_CDECL Multiply8(word *C, const word *A,
- const word *B);
- static void TAOCRYPT_CDECL Multiply8Bottom(word *C, const word *A,
- const word *B);
-};
-
-class P4Optimized
-{
-public:
- static word TAOCRYPT_CDECL Add(word *C, const word *A, const word *B,
- unsigned int N);
- static word TAOCRYPT_CDECL Subtract(word *C, const word *A, const word *B,
- unsigned int N);
-#ifdef SSE2_INTRINSICS_AVAILABLE
- static void TAOCRYPT_CDECL Multiply4(word *C, const word *A,
- const word *B);
- static void TAOCRYPT_CDECL Multiply8(word *C, const word *A,
- const word *B);
- static void TAOCRYPT_CDECL Multiply8Bottom(word *C, const word *A,
- const word *B);
-#endif
-};
-
-typedef word (TAOCRYPT_CDECL * PAddSub)(word *C, const word *A, const word *B,
- unsigned int N);
-typedef void (TAOCRYPT_CDECL * PMul)(word *C, const word *A, const word *B);
-
-static PAddSub s_pAdd, s_pSub;
-#ifdef SSE2_INTRINSICS_AVAILABLE
-static PMul s_pMul4, s_pMul8, s_pMul8B;
-#endif
-
-static void SetPentiumFunctionPointers()
-{
- if (!IsPentium())
- {
- s_pAdd = &Portable::Add;
- s_pSub = &Portable::Subtract;
- }
- else if (IsP4())
- {
- s_pAdd = &P4Optimized::Add;
- s_pSub = &P4Optimized::Subtract;
- }
- else
- {
- s_pAdd = &PentiumOptimized::Add;
- s_pSub = &PentiumOptimized::Subtract;
- }
-
-#ifdef SSE2_INTRINSICS_AVAILABLE
- if (!IsPentium())
- {
- s_pMul4 = &Portable::Multiply4;
- s_pMul8 = &Portable::Multiply8;
- s_pMul8B = &Portable::Multiply8Bottom;
- }
- else if (HasSSE2())
- {
- s_pMul4 = &P4Optimized::Multiply4;
- s_pMul8 = &P4Optimized::Multiply8;
- s_pMul8B = &P4Optimized::Multiply8Bottom;
- }
- else
- {
- s_pMul4 = &PentiumOptimized::Multiply4;
- s_pMul8 = &PentiumOptimized::Multiply8;
- s_pMul8B = &PentiumOptimized::Multiply8Bottom;
- }
-#endif
-}
-
-static const char s_RunAtStartupSetPentiumFunctionPointers =
- (SetPentiumFunctionPointers(), 0);
-
-
-class LowLevel : public PentiumOptimized
-{
-public:
- inline static word Add(word *C, const word *A, const word *B,
- unsigned int N)
- {return s_pAdd(C, A, B, N);}
- inline static word Subtract(word *C, const word *A, const word *B,
- unsigned int N)
- {return s_pSub(C, A, B, N);}
- inline static void Square4(word *R, const word *A)
- {Multiply4(R, A, A);}
-#ifdef SSE2_INTRINSICS_AVAILABLE
- inline static void Multiply4(word *C, const word *A, const word *B)
- {s_pMul4(C, A, B);}
- inline static void Multiply8(word *C, const word *A, const word *B)
- {s_pMul8(C, A, B);}
- inline static void Multiply8Bottom(word *C, const word *A, const word *B)
- {s_pMul8B(C, A, B);}
-#endif
-};
-
-// use some tricks to share assembly code between MSVC and GCC
-#ifdef _MSC_VER
- #define TAOCRYPT_NAKED __declspec(naked)
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
- #define AddPrologue \
- __asm push ebp \
- __asm push ebx \
- __asm push esi \
- __asm push edi \
- __asm mov ecx, [esp+20] \
- __asm mov edx, [esp+24] \
- __asm mov ebx, [esp+28] \
- __asm mov esi, [esp+32]
- #define AddEpilogue \
- __asm pop edi \
- __asm pop esi \
- __asm pop ebx \
- __asm pop ebp \
- __asm ret
- #define MulPrologue \
- __asm push ebp \
- __asm push ebx \
- __asm push esi \
- __asm push edi \
- __asm mov ecx, [esp+28] \
- __asm mov esi, [esp+24] \
- __asm push [esp+20]
- #define MulEpilogue \
- __asm add esp, 4 \
- __asm pop edi \
- __asm pop esi \
- __asm pop ebx \
- __asm pop ebp \
- __asm ret
-#else
- #define TAOCRYPT_NAKED
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
- #define AddPrologue \
- __asm__ __volatile__ \
- ( \
- "push %%ebx;" /* save this manually, in case of -fPIC */ \
- "mov %2, %%ebx;" \
- ".intel_syntax noprefix;" \
- "push ebp;"
- #define AddEpilogue \
- "pop ebp;" \
- ".att_syntax prefix;" \
- "pop %%ebx;" \
- : \
- : "c" (C), "d" (A), "m" (B), "S" (N) \
- : "%edi", "memory", "cc" \
- );
- #define MulPrologue \
- __asm__ __volatile__ \
- ( \
- "push %%ebx;" /* save this manually, in case of -fPIC */ \
- "push %%ebp;" \
- "push %0;" \
- ".intel_syntax noprefix;"
- #define MulEpilogue \
- "add esp, 4;" \
- "pop ebp;" \
- "pop ebx;" \
- ".att_syntax prefix;" \
- : \
- : "rm" (Z), "S" (X), "c" (Y) \
- : "%eax", "%edx", "%edi", "memory", "cc" \
- );
-#endif
-
-TAOCRYPT_NAKED word PentiumOptimized::Add(word *C, const word *A,
- const word *B, unsigned int N)
-{
- AddPrologue
-
- // now: ebx = B, ecx = C, edx = A, esi = N
- AS2( sub ecx, edx) // hold the distance between C & A so we
- // can add this to A to get C
- AS2( xor eax, eax) // clear eax
-
- AS2( sub eax, esi) // eax is a negative index from end of B
- AS2( lea ebx, [ebx+4*esi]) // ebx is end of B
-
- AS2( sar eax, 1) // unit of eax is now dwords; this also
- // clears the carry flag
- AS1( jz loopendAdd) // if no dwords then nothing to do
-
- AS1(loopstartAdd:)
- AS2( mov esi,[edx]) // load lower word of A
- AS2( mov ebp,[edx+4]) // load higher word of A
-
- AS2( mov edi,[ebx+8*eax]) // load lower word of B
- AS2( lea edx,[edx+8]) // advance A and C
-
- AS2( adc esi,edi) // add lower words
- AS2( mov edi,[ebx+8*eax+4]) // load higher word of B
-
- AS2( adc ebp,edi) // add higher words
- AS1( inc eax) // advance B
-
- AS2( mov [edx+ecx-8],esi) // store lower word result
- AS2( mov [edx+ecx-4],ebp) // store higher word result
-
- AS1( jnz loopstartAdd) // loop until eax overflows and becomes zero
-
- AS1(loopendAdd:)
- AS2( adc eax, 0) // store carry into eax (return result register)
-
- AddEpilogue
-}
-
-TAOCRYPT_NAKED word PentiumOptimized::Subtract(word *C, const word *A,
- const word *B, unsigned int N)
-{
- AddPrologue
-
- // now: ebx = B, ecx = C, edx = A, esi = N
- AS2( sub ecx, edx) // hold the distance between C & A so we
- // can add this to A to get C
- AS2( xor eax, eax) // clear eax
-
- AS2( sub eax, esi) // eax is a negative index from end of B
- AS2( lea ebx, [ebx+4*esi]) // ebx is end of B
-
- AS2( sar eax, 1) // unit of eax is now dwords; this also
- // clears the carry flag
- AS1( jz loopendSub) // if no dwords then nothing to do
-
- AS1(loopstartSub:)
- AS2( mov esi,[edx]) // load lower word of A
- AS2( mov ebp,[edx+4]) // load higher word of A
-
- AS2( mov edi,[ebx+8*eax]) // load lower word of B
- AS2( lea edx,[edx+8]) // advance A and C
-
- AS2( sbb esi,edi) // subtract lower words
- AS2( mov edi,[ebx+8*eax+4]) // load higher word of B
-
- AS2( sbb ebp,edi) // subtract higher words
- AS1( inc eax) // advance B
-
- AS2( mov [edx+ecx-8],esi) // store lower word result
- AS2( mov [edx+ecx-4],ebp) // store higher word result
-
- AS1( jnz loopstartSub) // loop until eax overflows and becomes zero
-
- AS1(loopendSub:)
- AS2( adc eax, 0) // store carry into eax (return result register)
-
- AddEpilogue
-}
-
-// On Pentium 4, the adc and sbb instructions are very expensive, so avoid them.
-
-TAOCRYPT_NAKED word P4Optimized::Add(word *C, const word *A, const word *B,
- unsigned int N)
-{
- AddPrologue
-
- // now: ebx = B, ecx = C, edx = A, esi = N
- AS2( xor eax, eax)
- AS1( neg esi)
- AS1( jz loopendAddP4) // if no dwords then nothing to do
-
- AS2( mov edi, [edx])
- AS2( mov ebp, [ebx])
- AS1( jmp carry1AddP4)
-
- AS1(loopstartAddP4:)
- AS2( mov edi, [edx+8])
- AS2( add ecx, 8)
- AS2( add edx, 8)
- AS2( mov ebp, [ebx])
- AS2( add edi, eax)
- AS1( jc carry1AddP4)
- AS2( xor eax, eax)
-
- AS1(carry1AddP4:)
- AS2( add edi, ebp)
- AS2( mov ebp, 1)
- AS2( mov [ecx], edi)
- AS2( mov edi, [edx+4])
- AS2( cmovc eax, ebp)
- AS2( mov ebp, [ebx+4])
- AS2( add ebx, 8)
- AS2( add edi, eax)
- AS1( jc carry2AddP4)
- AS2( xor eax, eax)
-
- AS1(carry2AddP4:)
- AS2( add edi, ebp)
- AS2( mov ebp, 1)
- AS2( cmovc eax, ebp)
- AS2( mov [ecx+4], edi)
- AS2( add esi, 2)
- AS1( jnz loopstartAddP4)
-
- AS1(loopendAddP4:)
-
- AddEpilogue
-}
-
-TAOCRYPT_NAKED word P4Optimized::Subtract(word *C, const word *A,
- const word *B, unsigned int N)
-{
- AddPrologue
-
- // now: ebx = B, ecx = C, edx = A, esi = N
- AS2( xor eax, eax)
- AS1( neg esi)
- AS1( jz loopendSubP4) // if no dwords then nothing to do
-
- AS2( mov edi, [edx])
- AS2( mov ebp, [ebx])
- AS1( jmp carry1SubP4)
-
- AS1(loopstartSubP4:)
- AS2( mov edi, [edx+8])
- AS2( add edx, 8)
- AS2( add ecx, 8)
- AS2( mov ebp, [ebx])
- AS2( sub edi, eax)
- AS1( jc carry1SubP4)
- AS2( xor eax, eax)
-
- AS1(carry1SubP4:)
- AS2( sub edi, ebp)
- AS2( mov ebp, 1)
- AS2( mov [ecx], edi)
- AS2( mov edi, [edx+4])
- AS2( cmovc eax, ebp)
- AS2( mov ebp, [ebx+4])
- AS2( add ebx, 8)
- AS2( sub edi, eax)
- AS1( jc carry2SubP4)
- AS2( xor eax, eax)
-
- AS1(carry2SubP4:)
- AS2( sub edi, ebp)
- AS2( mov ebp, 1)
- AS2( cmovc eax, ebp)
- AS2( mov [ecx+4], edi)
- AS2( add esi, 2)
- AS1( jnz loopstartSubP4)
-
- AS1(loopendSubP4:)
-
- AddEpilogue
-}
-
-// multiply assembly code originally contributed by Leonard Janke
-
-#define MulStartup \
- AS2(xor ebp, ebp) \
- AS2(xor edi, edi) \
- AS2(xor ebx, ebx)
-
-#define MulShiftCarry \
- AS2(mov ebp, edx) \
- AS2(mov edi, ebx) \
- AS2(xor ebx, ebx)
-
-#define MulAccumulateBottom(i,j) \
- AS2(mov eax, [ecx+4*j]) \
- AS2(imul eax, dword ptr [esi+4*i]) \
- AS2(add ebp, eax)
-
-#define MulAccumulate(i,j) \
- AS2(mov eax, [ecx+4*j]) \
- AS1(mul dword ptr [esi+4*i]) \
- AS2(add ebp, eax) \
- AS2(adc edi, edx) \
- AS2(adc bl, bh)
-
-#define MulStoreDigit(i) \
- AS2(mov edx, edi) \
- AS2(mov edi, [esp]) \
- AS2(mov [edi+4*i], ebp)
-
-#define MulLastDiagonal(digits) \
- AS2(mov eax, [ecx+4*(digits-1)]) \
- AS1(mul dword ptr [esi+4*(digits-1)]) \
- AS2(add ebp, eax) \
- AS2(adc edx, edi) \
- AS2(mov edi, [esp]) \
- AS2(mov [edi+4*(2*digits-2)], ebp) \
- AS2(mov [edi+4*(2*digits-1)], edx)
-
-TAOCRYPT_NAKED void PentiumOptimized::Multiply4(word* Z, const word* X,
- const word* Y)
-{
- MulPrologue
- // now: [esp] = Z, esi = X, ecx = Y
- MulStartup
- MulAccumulate(0,0)
- MulStoreDigit(0)
- MulShiftCarry
-
- MulAccumulate(1,0)
- MulAccumulate(0,1)
- MulStoreDigit(1)
- MulShiftCarry
-
- MulAccumulate(2,0)
- MulAccumulate(1,1)
- MulAccumulate(0,2)
- MulStoreDigit(2)
- MulShiftCarry
-
- MulAccumulate(3,0)
- MulAccumulate(2,1)
- MulAccumulate(1,2)
- MulAccumulate(0,3)
- MulStoreDigit(3)
- MulShiftCarry
-
- MulAccumulate(3,1)
- MulAccumulate(2,2)
- MulAccumulate(1,3)
- MulStoreDigit(4)
- MulShiftCarry
-
- MulAccumulate(3,2)
- MulAccumulate(2,3)
- MulStoreDigit(5)
- MulShiftCarry
-
- MulLastDiagonal(4)
- MulEpilogue
-}
-
-TAOCRYPT_NAKED void PentiumOptimized::Multiply8(word* Z, const word* X,
- const word* Y)
-{
- MulPrologue
- // now: [esp] = Z, esi = X, ecx = Y
- MulStartup
- MulAccumulate(0,0)
- MulStoreDigit(0)
- MulShiftCarry
-
- MulAccumulate(1,0)
- MulAccumulate(0,1)
- MulStoreDigit(1)
- MulShiftCarry
-
- MulAccumulate(2,0)
- MulAccumulate(1,1)
- MulAccumulate(0,2)
- MulStoreDigit(2)
- MulShiftCarry
-
- MulAccumulate(3,0)
- MulAccumulate(2,1)
- MulAccumulate(1,2)
- MulAccumulate(0,3)
- MulStoreDigit(3)
- MulShiftCarry
-
- MulAccumulate(4,0)
- MulAccumulate(3,1)
- MulAccumulate(2,2)
- MulAccumulate(1,3)
- MulAccumulate(0,4)
- MulStoreDigit(4)
- MulShiftCarry
-
- MulAccumulate(5,0)
- MulAccumulate(4,1)
- MulAccumulate(3,2)
- MulAccumulate(2,3)
- MulAccumulate(1,4)
- MulAccumulate(0,5)
- MulStoreDigit(5)
- MulShiftCarry
-
- MulAccumulate(6,0)
- MulAccumulate(5,1)
- MulAccumulate(4,2)
- MulAccumulate(3,3)
- MulAccumulate(2,4)
- MulAccumulate(1,5)
- MulAccumulate(0,6)
- MulStoreDigit(6)
- MulShiftCarry
-
- MulAccumulate(7,0)
- MulAccumulate(6,1)
- MulAccumulate(5,2)
- MulAccumulate(4,3)
- MulAccumulate(3,4)
- MulAccumulate(2,5)
- MulAccumulate(1,6)
- MulAccumulate(0,7)
- MulStoreDigit(7)
- MulShiftCarry
-
- MulAccumulate(7,1)
- MulAccumulate(6,2)
- MulAccumulate(5,3)
- MulAccumulate(4,4)
- MulAccumulate(3,5)
- MulAccumulate(2,6)
- MulAccumulate(1,7)
- MulStoreDigit(8)
- MulShiftCarry
-
- MulAccumulate(7,2)
- MulAccumulate(6,3)
- MulAccumulate(5,4)
- MulAccumulate(4,5)
- MulAccumulate(3,6)
- MulAccumulate(2,7)
- MulStoreDigit(9)
- MulShiftCarry
-
- MulAccumulate(7,3)
- MulAccumulate(6,4)
- MulAccumulate(5,5)
- MulAccumulate(4,6)
- MulAccumulate(3,7)
- MulStoreDigit(10)
- MulShiftCarry
-
- MulAccumulate(7,4)
- MulAccumulate(6,5)
- MulAccumulate(5,6)
- MulAccumulate(4,7)
- MulStoreDigit(11)
- MulShiftCarry
-
- MulAccumulate(7,5)
- MulAccumulate(6,6)
- MulAccumulate(5,7)
- MulStoreDigit(12)
- MulShiftCarry
-
- MulAccumulate(7,6)
- MulAccumulate(6,7)
- MulStoreDigit(13)
- MulShiftCarry
-
- MulLastDiagonal(8)
- MulEpilogue
-}
-
-TAOCRYPT_NAKED void PentiumOptimized::Multiply8Bottom(word* Z, const word* X,
- const word* Y)
-{
- MulPrologue
- // now: [esp] = Z, esi = X, ecx = Y
- MulStartup
- MulAccumulate(0,0)
- MulStoreDigit(0)
- MulShiftCarry
-
- MulAccumulate(1,0)
- MulAccumulate(0,1)
- MulStoreDigit(1)
- MulShiftCarry
-
- MulAccumulate(2,0)
- MulAccumulate(1,1)
- MulAccumulate(0,2)
- MulStoreDigit(2)
- MulShiftCarry
-
- MulAccumulate(3,0)
- MulAccumulate(2,1)
- MulAccumulate(1,2)
- MulAccumulate(0,3)
- MulStoreDigit(3)
- MulShiftCarry
-
- MulAccumulate(4,0)
- MulAccumulate(3,1)
- MulAccumulate(2,2)
- MulAccumulate(1,3)
- MulAccumulate(0,4)
- MulStoreDigit(4)
- MulShiftCarry
-
- MulAccumulate(5,0)
- MulAccumulate(4,1)
- MulAccumulate(3,2)
- MulAccumulate(2,3)
- MulAccumulate(1,4)
- MulAccumulate(0,5)
- MulStoreDigit(5)
- MulShiftCarry
-
- MulAccumulate(6,0)
- MulAccumulate(5,1)
- MulAccumulate(4,2)
- MulAccumulate(3,3)
- MulAccumulate(2,4)
- MulAccumulate(1,5)
- MulAccumulate(0,6)
- MulStoreDigit(6)
- MulShiftCarry
-
- MulAccumulateBottom(7,0)
- MulAccumulateBottom(6,1)
- MulAccumulateBottom(5,2)
- MulAccumulateBottom(4,3)
- MulAccumulateBottom(3,4)
- MulAccumulateBottom(2,5)
- MulAccumulateBottom(1,6)
- MulAccumulateBottom(0,7)
- MulStoreDigit(7)
- MulEpilogue
-}
-
-#undef AS1
-#undef AS2
-
-#else // not x86 - no processor specific code at this layer
-
-typedef Portable LowLevel;
-
-#endif
-
-#ifdef SSE2_INTRINSICS_AVAILABLE
-
-#ifdef __GNUC__
-#define TAOCRYPT_FASTCALL
-#else
-#define TAOCRYPT_FASTCALL __fastcall
-#endif
-
-static void TAOCRYPT_FASTCALL P4_Mul(__m128i *C, const __m128i *A,
- const __m128i *B)
-{
- __m128i a3210 = _mm_load_si128(A);
- __m128i b3210 = _mm_load_si128(B);
-
- __m128i sum;
-
- __m128i z = _mm_setzero_si128();
- __m128i a2b2_a0b0 = _mm_mul_epu32(a3210, b3210);
- C[0] = a2b2_a0b0;
-
- __m128i a3120 = _mm_shuffle_epi32(a3210, _MM_SHUFFLE(3, 1, 2, 0));
- __m128i b3021 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(3, 0, 2, 1));
- __m128i a1b0_a0b1 = _mm_mul_epu32(a3120, b3021);
- __m128i a1b0 = _mm_unpackhi_epi32(a1b0_a0b1, z);
- __m128i a0b1 = _mm_unpacklo_epi32(a1b0_a0b1, z);
- C[1] = _mm_add_epi64(a1b0, a0b1);
-
- __m128i a31 = _mm_srli_epi64(a3210, 32);
- __m128i b31 = _mm_srli_epi64(b3210, 32);
- __m128i a3b3_a1b1 = _mm_mul_epu32(a31, b31);
- C[6] = a3b3_a1b1;
-
- __m128i a1b1 = _mm_unpacklo_epi32(a3b3_a1b1, z);
- __m128i b3012 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(3, 0, 1, 2));
- __m128i a2b0_a0b2 = _mm_mul_epu32(a3210, b3012);
- __m128i a0b2 = _mm_unpacklo_epi32(a2b0_a0b2, z);
- __m128i a2b0 = _mm_unpackhi_epi32(a2b0_a0b2, z);
- sum = _mm_add_epi64(a1b1, a0b2);
- C[2] = _mm_add_epi64(sum, a2b0);
-
- __m128i a2301 = _mm_shuffle_epi32(a3210, _MM_SHUFFLE(2, 3, 0, 1));
- __m128i b2103 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(2, 1, 0, 3));
- __m128i a3b0_a1b2 = _mm_mul_epu32(a2301, b3012);
- __m128i a2b1_a0b3 = _mm_mul_epu32(a3210, b2103);
- __m128i a3b0 = _mm_unpackhi_epi32(a3b0_a1b2, z);
- __m128i a1b2 = _mm_unpacklo_epi32(a3b0_a1b2, z);
- __m128i a2b1 = _mm_unpackhi_epi32(a2b1_a0b3, z);
- __m128i a0b3 = _mm_unpacklo_epi32(a2b1_a0b3, z);
- __m128i sum1 = _mm_add_epi64(a3b0, a1b2);
- sum = _mm_add_epi64(a2b1, a0b3);
- C[3] = _mm_add_epi64(sum, sum1);
-
- __m128i a3b1_a1b3 = _mm_mul_epu32(a2301, b2103);
- __m128i a2b2 = _mm_unpackhi_epi32(a2b2_a0b0, z);
- __m128i a3b1 = _mm_unpackhi_epi32(a3b1_a1b3, z);
- __m128i a1b3 = _mm_unpacklo_epi32(a3b1_a1b3, z);
- sum = _mm_add_epi64(a2b2, a3b1);
- C[4] = _mm_add_epi64(sum, a1b3);
-
- __m128i a1302 = _mm_shuffle_epi32(a3210, _MM_SHUFFLE(1, 3, 0, 2));
- __m128i b1203 = _mm_shuffle_epi32(b3210, _MM_SHUFFLE(1, 2, 0, 3));
- __m128i a3b2_a2b3 = _mm_mul_epu32(a1302, b1203);
- __m128i a3b2 = _mm_unpackhi_epi32(a3b2_a2b3, z);
- __m128i a2b3 = _mm_unpacklo_epi32(a3b2_a2b3, z);
- C[5] = _mm_add_epi64(a3b2, a2b3);
-}
-
-void P4Optimized::Multiply4(word *C, const word *A, const word *B)
-{
- __m128i temp[7];
- const word *w = (word *)temp;
- const __m64 *mw = (__m64 *)w;
-
- P4_Mul(temp, (__m128i *)A, (__m128i *)B);
-
- C[0] = w[0];
-
- __m64 s1, s2;
-
- __m64 w1 = _mm_cvtsi32_si64(w[1]);
- __m64 w4 = mw[2];
- __m64 w6 = mw[3];
- __m64 w8 = mw[4];
- __m64 w10 = mw[5];
- __m64 w12 = mw[6];
- __m64 w14 = mw[7];
- __m64 w16 = mw[8];
- __m64 w18 = mw[9];
- __m64 w20 = mw[10];
- __m64 w22 = mw[11];
- __m64 w26 = _mm_cvtsi32_si64(w[26]);
-
- s1 = _mm_add_si64(w1, w4);
- C[1] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w6, w8);
- s1 = _mm_add_si64(s1, s2);
- C[2] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w10, w12);
- s1 = _mm_add_si64(s1, s2);
- C[3] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w14, w16);
- s1 = _mm_add_si64(s1, s2);
- C[4] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w18, w20);
- s1 = _mm_add_si64(s1, s2);
- C[5] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w22, w26);
- s1 = _mm_add_si64(s1, s2);
- C[6] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- C[7] = _mm_cvtsi64_si32(s1) + w[27];
- _mm_empty();
-}
-
-void P4Optimized::Multiply8(word *C, const word *A, const word *B)
-{
- __m128i temp[28];
- const word *w = (word *)temp;
- const __m64 *mw = (__m64 *)w;
- const word *x = (word *)temp+7*4;
- const __m64 *mx = (__m64 *)x;
- const word *y = (word *)temp+7*4*2;
- const __m64 *my = (__m64 *)y;
- const word *z = (word *)temp+7*4*3;
- const __m64 *mz = (__m64 *)z;
-
- P4_Mul(temp, (__m128i *)A, (__m128i *)B);
-
- P4_Mul(temp+7, (__m128i *)A+1, (__m128i *)B);
-
- P4_Mul(temp+14, (__m128i *)A, (__m128i *)B+1);
-
- P4_Mul(temp+21, (__m128i *)A+1, (__m128i *)B+1);
-
- C[0] = w[0];
-
- __m64 s1, s2, s3, s4;
-
- __m64 w1 = _mm_cvtsi32_si64(w[1]);
- __m64 w4 = mw[2];
- __m64 w6 = mw[3];
- __m64 w8 = mw[4];
- __m64 w10 = mw[5];
- __m64 w12 = mw[6];
- __m64 w14 = mw[7];
- __m64 w16 = mw[8];
- __m64 w18 = mw[9];
- __m64 w20 = mw[10];
- __m64 w22 = mw[11];
- __m64 w26 = _mm_cvtsi32_si64(w[26]);
- __m64 w27 = _mm_cvtsi32_si64(w[27]);
-
- __m64 x0 = _mm_cvtsi32_si64(x[0]);
- __m64 x1 = _mm_cvtsi32_si64(x[1]);
- __m64 x4 = mx[2];
- __m64 x6 = mx[3];
- __m64 x8 = mx[4];
- __m64 x10 = mx[5];
- __m64 x12 = mx[6];
- __m64 x14 = mx[7];
- __m64 x16 = mx[8];
- __m64 x18 = mx[9];
- __m64 x20 = mx[10];
- __m64 x22 = mx[11];
- __m64 x26 = _mm_cvtsi32_si64(x[26]);
- __m64 x27 = _mm_cvtsi32_si64(x[27]);
-
- __m64 y0 = _mm_cvtsi32_si64(y[0]);
- __m64 y1 = _mm_cvtsi32_si64(y[1]);
- __m64 y4 = my[2];
- __m64 y6 = my[3];
- __m64 y8 = my[4];
- __m64 y10 = my[5];
- __m64 y12 = my[6];
- __m64 y14 = my[7];
- __m64 y16 = my[8];
- __m64 y18 = my[9];
- __m64 y20 = my[10];
- __m64 y22 = my[11];
- __m64 y26 = _mm_cvtsi32_si64(y[26]);
- __m64 y27 = _mm_cvtsi32_si64(y[27]);
-
- __m64 z0 = _mm_cvtsi32_si64(z[0]);
- __m64 z1 = _mm_cvtsi32_si64(z[1]);
- __m64 z4 = mz[2];
- __m64 z6 = mz[3];
- __m64 z8 = mz[4];
- __m64 z10 = mz[5];
- __m64 z12 = mz[6];
- __m64 z14 = mz[7];
- __m64 z16 = mz[8];
- __m64 z18 = mz[9];
- __m64 z20 = mz[10];
- __m64 z22 = mz[11];
- __m64 z26 = _mm_cvtsi32_si64(z[26]);
-
- s1 = _mm_add_si64(w1, w4);
- C[1] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w6, w8);
- s1 = _mm_add_si64(s1, s2);
- C[2] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w10, w12);
- s1 = _mm_add_si64(s1, s2);
- C[3] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x0, y0);
- s2 = _mm_add_si64(w14, w16);
- s1 = _mm_add_si64(s1, s3);
- s1 = _mm_add_si64(s1, s2);
- C[4] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x1, y1);
- s4 = _mm_add_si64(x4, y4);
- s1 = _mm_add_si64(s1, w18);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, w20);
- s1 = _mm_add_si64(s1, s3);
- C[5] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x6, y6);
- s4 = _mm_add_si64(x8, y8);
- s1 = _mm_add_si64(s1, w22);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, w26);
- s1 = _mm_add_si64(s1, s3);
- C[6] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x10, y10);
- s4 = _mm_add_si64(x12, y12);
- s1 = _mm_add_si64(s1, w27);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, s3);
- C[7] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x14, y14);
- s4 = _mm_add_si64(x16, y16);
- s1 = _mm_add_si64(s1, z0);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, s3);
- C[8] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x18, y18);
- s4 = _mm_add_si64(x20, y20);
- s1 = _mm_add_si64(s1, z1);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, z4);
- s1 = _mm_add_si64(s1, s3);
- C[9] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x22, y22);
- s4 = _mm_add_si64(x26, y26);
- s1 = _mm_add_si64(s1, z6);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, z8);
- s1 = _mm_add_si64(s1, s3);
- C[10] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x27, y27);
- s1 = _mm_add_si64(s1, z10);
- s1 = _mm_add_si64(s1, z12);
- s1 = _mm_add_si64(s1, s3);
- C[11] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(z14, z16);
- s1 = _mm_add_si64(s1, s3);
- C[12] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(z18, z20);
- s1 = _mm_add_si64(s1, s3);
- C[13] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(z22, z26);
- s1 = _mm_add_si64(s1, s3);
- C[14] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- C[15] = z[27] + _mm_cvtsi64_si32(s1);
- _mm_empty();
-}
-
-void P4Optimized::Multiply8Bottom(word *C, const word *A, const word *B)
-{
- __m128i temp[21];
- const word *w = (word *)temp;
- const __m64 *mw = (__m64 *)w;
- const word *x = (word *)temp+7*4;
- const __m64 *mx = (__m64 *)x;
- const word *y = (word *)temp+7*4*2;
- const __m64 *my = (__m64 *)y;
-
- P4_Mul(temp, (__m128i *)A, (__m128i *)B);
-
- P4_Mul(temp+7, (__m128i *)A+1, (__m128i *)B);
-
- P4_Mul(temp+14, (__m128i *)A, (__m128i *)B+1);
-
- C[0] = w[0];
-
- __m64 s1, s2, s3, s4;
-
- __m64 w1 = _mm_cvtsi32_si64(w[1]);
- __m64 w4 = mw[2];
- __m64 w6 = mw[3];
- __m64 w8 = mw[4];
- __m64 w10 = mw[5];
- __m64 w12 = mw[6];
- __m64 w14 = mw[7];
- __m64 w16 = mw[8];
- __m64 w18 = mw[9];
- __m64 w20 = mw[10];
- __m64 w22 = mw[11];
- __m64 w26 = _mm_cvtsi32_si64(w[26]);
-
- __m64 x0 = _mm_cvtsi32_si64(x[0]);
- __m64 x1 = _mm_cvtsi32_si64(x[1]);
- __m64 x4 = mx[2];
- __m64 x6 = mx[3];
- __m64 x8 = mx[4];
-
- __m64 y0 = _mm_cvtsi32_si64(y[0]);
- __m64 y1 = _mm_cvtsi32_si64(y[1]);
- __m64 y4 = my[2];
- __m64 y6 = my[3];
- __m64 y8 = my[4];
-
- s1 = _mm_add_si64(w1, w4);
- C[1] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w6, w8);
- s1 = _mm_add_si64(s1, s2);
- C[2] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s2 = _mm_add_si64(w10, w12);
- s1 = _mm_add_si64(s1, s2);
- C[3] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x0, y0);
- s2 = _mm_add_si64(w14, w16);
- s1 = _mm_add_si64(s1, s3);
- s1 = _mm_add_si64(s1, s2);
- C[4] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x1, y1);
- s4 = _mm_add_si64(x4, y4);
- s1 = _mm_add_si64(s1, w18);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, w20);
- s1 = _mm_add_si64(s1, s3);
- C[5] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- s3 = _mm_add_si64(x6, y6);
- s4 = _mm_add_si64(x8, y8);
- s1 = _mm_add_si64(s1, w22);
- s3 = _mm_add_si64(s3, s4);
- s1 = _mm_add_si64(s1, w26);
- s1 = _mm_add_si64(s1, s3);
- C[6] = _mm_cvtsi64_si32(s1);
- s1 = _mm_srli_si64(s1, 32);
-
- C[7] = _mm_cvtsi64_si32(s1) + w[27] + x[10] + y[10] + x[12] + y[12];
- _mm_empty();
-}
-
-#endif // #ifdef SSE2_INTRINSICS_AVAILABLE
-
-// end optimized
-
-// ********************************************************
-
-#define A0 A
-#define A1 (A+N2)
-#define B0 B
-#define B1 (B+N2)
-
-#define T0 T
-#define T1 (T+N2)
-#define T2 (T+N)
-#define T3 (T+N+N2)
-
-#define R0 R
-#define R1 (R+N2)
-#define R2 (R+N)
-#define R3 (R+N+N2)
-
-//VC60 workaround: compiler bug triggered without the extra dummy parameters
-
-// R[2*N] - result = A*B
-// T[2*N] - temporary work space
-// A[N] --- multiplier
-// B[N] --- multiplicant
-
-
-void RecursiveMultiply(word *R, word *T, const word *A, const word *B,
- unsigned int N)
-{
- if (LowLevel::MultiplyRecursionLimit() >= 8 && N==8)
- LowLevel::Multiply8(R, A, B);
- else if (LowLevel::MultiplyRecursionLimit() >= 4 && N==4)
- LowLevel::Multiply4(R, A, B);
- else if (N==2)
- LowLevel::Multiply2(R, A, B);
- else
- {
- const unsigned int N2 = N/2;
- int carry;
-
- int aComp = Compare(A0, A1, N2);
- int bComp = Compare(B0, B1, N2);
-
- switch (2*aComp + aComp + bComp)
- {
- case -4:
- LowLevel::Subtract(R0, A1, A0, N2);
- LowLevel::Subtract(R1, B0, B1, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- LowLevel::Subtract(T1, T1, R0, N2);
- carry = -1;
- break;
- case -2:
- LowLevel::Subtract(R0, A1, A0, N2);
- LowLevel::Subtract(R1, B0, B1, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- carry = 0;
- break;
- case 2:
- LowLevel::Subtract(R0, A0, A1, N2);
- LowLevel::Subtract(R1, B1, B0, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- carry = 0;
- break;
- case 4:
- LowLevel::Subtract(R0, A1, A0, N2);
- LowLevel::Subtract(R1, B0, B1, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- LowLevel::Subtract(T1, T1, R1, N2);
- carry = -1;
- break;
- default:
- SetWords(T0, 0, N);
- carry = 0;
- }
-
- RecursiveMultiply(R0, T2, A0, B0, N2);
- RecursiveMultiply(R2, T2, A1, B1, N2);
-
- // now T[01] holds (A1-A0)*(B0-B1),R[01] holds A0*B0, R[23] holds A1*B1
-
- carry += LowLevel::Add(T0, T0, R0, N);
- carry += LowLevel::Add(T0, T0, R2, N);
- carry += LowLevel::Add(R1, R1, T0, N);
-
- Increment(R3, N2, carry);
- }
-}
-
-
-void RecursiveSquare(word *R, word *T, const word *A, unsigned int N)
-{
- if (LowLevel::SquareRecursionLimit() >= 4 && N==4)
- LowLevel::Square4(R, A);
- else if (N==2)
- LowLevel::Square2(R, A);
- else
- {
- const unsigned int N2 = N/2;
-
- RecursiveSquare(R0, T2, A0, N2);
- RecursiveSquare(R2, T2, A1, N2);
- RecursiveMultiply(T0, T2, A0, A1, N2);
-
- word carry = LowLevel::Add(R1, R1, T0, N);
- carry += LowLevel::Add(R1, R1, T0, N);
- Increment(R3, N2, carry);
- }
-}
-
-
-// R[N] - bottom half of A*B
-// T[N] - temporary work space
-// A[N] - multiplier
-// B[N] - multiplicant
-
-
-void RecursiveMultiplyBottom(word *R, word *T, const word *A, const word *B,
- unsigned int N)
-{
- if (LowLevel::MultiplyBottomRecursionLimit() >= 8 && N==8)
- LowLevel::Multiply8Bottom(R, A, B);
- else if (LowLevel::MultiplyBottomRecursionLimit() >= 4 && N==4)
- LowLevel::Multiply4Bottom(R, A, B);
- else if (N==2)
- LowLevel::Multiply2Bottom(R, A, B);
- else
- {
- const unsigned int N2 = N/2;
-
- RecursiveMultiply(R, T, A0, B0, N2);
- RecursiveMultiplyBottom(T0, T1, A1, B0, N2);
- LowLevel::Add(R1, R1, T0, N2);
- RecursiveMultiplyBottom(T0, T1, A0, B1, N2);
- LowLevel::Add(R1, R1, T0, N2);
- }
-}
-
-
-void RecursiveMultiplyTop(word *R, word *T, const word *L, const word *A,
- const word *B, unsigned int N)
-{
- if (N==4)
- {
- LowLevel::Multiply4(T, A, B);
- memcpy(R, T+4, 4*WORD_SIZE);
- }
- else if (N==2)
- {
- LowLevel::Multiply2(T, A, B);
- memcpy(R, T+2, 2*WORD_SIZE);
- }
- else
- {
- const unsigned int N2 = N/2;
- int carry;
-
- int aComp = Compare(A0, A1, N2);
- int bComp = Compare(B0, B1, N2);
-
- switch (2*aComp + aComp + bComp)
- {
- case -4:
- LowLevel::Subtract(R0, A1, A0, N2);
- LowLevel::Subtract(R1, B0, B1, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- LowLevel::Subtract(T1, T1, R0, N2);
- carry = -1;
- break;
- case -2:
- LowLevel::Subtract(R0, A1, A0, N2);
- LowLevel::Subtract(R1, B0, B1, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- carry = 0;
- break;
- case 2:
- LowLevel::Subtract(R0, A0, A1, N2);
- LowLevel::Subtract(R1, B1, B0, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- carry = 0;
- break;
- case 4:
- LowLevel::Subtract(R0, A1, A0, N2);
- LowLevel::Subtract(R1, B0, B1, N2);
- RecursiveMultiply(T0, T2, R0, R1, N2);
- LowLevel::Subtract(T1, T1, R1, N2);
- carry = -1;
- break;
- default:
- SetWords(T0, 0, N);
- carry = 0;
- }
-
- RecursiveMultiply(T2, R0, A1, B1, N2);
-
- // now T[01] holds (A1-A0)*(B0-B1), T[23] holds A1*B1
-
- word c2 = LowLevel::Subtract(R0, L+N2, L, N2);
- c2 += LowLevel::Subtract(R0, R0, T0, N2);
- word t = (Compare(R0, T2, N2) == -1);
-
- carry += t;
- carry += Increment(R0, N2, c2+t);
- carry += LowLevel::Add(R0, R0, T1, N2);
- carry += LowLevel::Add(R0, R0, T3, N2);
-
- CopyWords(R1, T3, N2);
- Increment(R1, N2, carry);
- }
-}
-
-
-inline word Add(word *C, const word *A, const word *B, unsigned int N)
-{
- return LowLevel::Add(C, A, B, N);
-}
-
-inline word Subtract(word *C, const word *A, const word *B, unsigned int N)
-{
- return LowLevel::Subtract(C, A, B, N);
-}
-
-inline void Multiply(word *R, word *T, const word *A, const word *B,
- unsigned int N)
-{
- RecursiveMultiply(R, T, A, B, N);
-}
-
-inline void Square(word *R, word *T, const word *A, unsigned int N)
-{
- RecursiveSquare(R, T, A, N);
-}
-
-
-void AsymmetricMultiply(word *R, word *T, const word *A, unsigned int NA,
- const word *B, unsigned int NB)
-{
- if (NA == NB)
- {
- if (A == B)
- Square(R, T, A, NA);
- else
- Multiply(R, T, A, B, NA);
-
- return;
- }
-
- if (NA > NB)
- {
- STL::swap(A, B);
- STL::swap(NA, NB);
- }
-
- if (NA==2 && !A[1])
- {
- switch (A[0])
- {
- case 0:
- SetWords(R, 0, NB+2);
- return;
- case 1:
- CopyWords(R, B, NB);
- R[NB] = R[NB+1] = 0;
- return;
- default:
- R[NB] = LinearMultiply(R, B, A[0], NB);
- R[NB+1] = 0;
- return;
- }
- }
-
- Multiply(R, T, A, B, NA);
- CopyWords(T+2*NA, R+NA, NA);
-
- unsigned i;
-
- for (i=2*NA; i<NB; i+=2*NA)
- Multiply(T+NA+i, T, A, B+i, NA);
- for (i=NA; i<NB; i+=2*NA)
- Multiply(R+i, T, A, B+i, NA);
-
- if (Add(R+NA, R+NA, T+2*NA, NB-NA))
- Increment(R+NB, NA);
-}
-
-
-void PositiveMultiply(Integer& product, const Integer& a, const Integer& b)
-{
- unsigned int aSize = RoundupSize(a.WordCount());
- unsigned int bSize = RoundupSize(b.WordCount());
-
- product.reg_.CleanNew(RoundupSize(aSize + bSize));
- product.sign_ = Integer::POSITIVE;
-
- AlignedWordBlock workspace(aSize + bSize);
- AsymmetricMultiply(product.reg_.get_buffer(), workspace.get_buffer(),
- a.reg_.get_buffer(), aSize, b.reg_.get_buffer(), bSize);
-}
-
-void Multiply(Integer &product, const Integer &a, const Integer &b)
-{
- PositiveMultiply(product, a, b);
-
- if (a.NotNegative() != b.NotNegative())
- product.Negate();
-}
-
-
-static inline unsigned int EvenWordCount(const word *X, unsigned int N)
-{
- while (N && X[N-2]==0 && X[N-1]==0)
- N-=2;
- return N;
-}
-
-
-unsigned int AlmostInverse(word *R, word *T, const word *A, unsigned int NA,
- const word *M, unsigned int N)
-{
- word *b = T;
- word *c = T+N;
- word *f = T+2*N;
- word *g = T+3*N;
- unsigned int bcLen=2, fgLen=EvenWordCount(M, N);
- unsigned int k=0, s=0;
-
- SetWords(T, 0, 3*N);
- b[0]=1;
- CopyWords(f, A, NA);
- CopyWords(g, M, N);
-
- while (1)
- {
- word t=f[0];
- while (!t)
- {
- if (EvenWordCount(f, fgLen)==0)
- {
- SetWords(R, 0, N);
- return 0;
- }
-
- ShiftWordsRightByWords(f, fgLen, 1);
- if (c[bcLen-1]) bcLen+=2;
- ShiftWordsLeftByWords(c, bcLen, 1);
- k+=WORD_BITS;
- t=f[0];
- }
-
- unsigned int i=0;
- while (t%2 == 0)
- {
- t>>=1;
- i++;
- }
- k+=i;
-
- if (t==1 && f[1]==0 && EvenWordCount(f, fgLen)==2)
- {
- if (s%2==0)
- CopyWords(R, b, N);
- else
- Subtract(R, M, b, N);
- return k;
- }
-
- ShiftWordsRightByBits(f, fgLen, i);
- t=ShiftWordsLeftByBits(c, bcLen, i);
- if (t)
- {
- c[bcLen] = t;
- bcLen+=2;
- }
-
- if (f[fgLen-2]==0 && g[fgLen-2]==0 && f[fgLen-1]==0 && g[fgLen-1]==0)
- fgLen-=2;
-
- if (Compare(f, g, fgLen)==-1)
- {
- STL::swap(f, g);
- STL::swap(b, c);
- s++;
- }
-
- Subtract(f, f, g, fgLen);
-
- if (Add(b, b, c, bcLen))
- {
- b[bcLen] = 1;
- bcLen+=2;
- }
- }
-}
-
-// R[N] - result = A/(2^k) mod M
-// A[N] - input
-// M[N] - modulus
-
-void DivideByPower2Mod(word *R, const word *A, unsigned int k, const word *M,
- unsigned int N)
-{
- CopyWords(R, A, N);
-
- while (k--)
- {
- if (R[0]%2==0)
- ShiftWordsRightByBits(R, N, 1);
- else
- {
- word carry = Add(R, R, M, N);
- ShiftWordsRightByBits(R, N, 1);
- R[N-1] += carry<<(WORD_BITS-1);
- }
- }
-}
-
-// R[N] - result = A*(2^k) mod M
-// A[N] - input
-// M[N] - modulus
-
-void MultiplyByPower2Mod(word *R, const word *A, unsigned int k, const word *M,
- unsigned int N)
-{
- CopyWords(R, A, N);
-
- while (k--)
- if (ShiftWordsLeftByBits(R, N, 1) || Compare(R, M, N)>=0)
- Subtract(R, R, M, N);
-}
-
-
-// ********** end of integer needs
-
-
-Integer::Integer()
- : reg_(2), sign_(POSITIVE)
-{
- reg_[0] = reg_[1] = 0;
-}
-
-
-Integer::Integer(const Integer& t)
- : reg_(RoundupSize(t.WordCount())), sign_(t.sign_)
-{
- CopyWords(reg_.get_buffer(), t.reg_.get_buffer(), reg_.size());
-}
-
-
-Integer::Integer(signed long value)
- : reg_(2)
-{
- if (value >= 0)
- sign_ = POSITIVE;
- else
- {
- sign_ = NEGATIVE;
- value = -value;
- }
- reg_[0] = word(value);
- reg_[1] = word(SafeRightShift<WORD_BITS, unsigned long>(value));
-}
-
-
-Integer::Integer(Sign s, word high, word low)
- : reg_(2), sign_(s)
-{
- reg_[0] = low;
- reg_[1] = high;
-}
-
-
-Integer::Integer(word value, unsigned int length)
- : reg_(RoundupSize(length)), sign_(POSITIVE)
-{
- reg_[0] = value;
- SetWords(reg_ + 1, 0, reg_.size() - 1);
-}
-
-
-Integer::Integer(const byte *encodedInteger, unsigned int byteCount,
- Signedness s)
-{
- Decode(encodedInteger, byteCount, s);
-}
-
-class BadBER {};
-
-// BER Decode Source
-Integer::Integer(Source& source)
- : reg_(2), sign_(POSITIVE)
-{
- Decode(source);
-}
-
-void Integer::Decode(Source& source)
-{
- byte b = source.next();
- if (b != INTEGER) {
- source.SetError(INTEGER_E);
- return;
- }
-
- word32 length = GetLength(source);
- if (length == 0 || source.GetError().What()) return;
-
- if ( (b = source.next()) == 0x00)
- length--;
- else
- source.prev();
-
- if (source.IsLeft(length) == false) return;
-
- unsigned int words = (length + WORD_SIZE - 1) / WORD_SIZE;
- words = RoundupSize(words);
- if (words > reg_.size()) reg_.CleanNew(words);
-
- for (int j = length; j > 0; j--) {
- b = source.next();
- reg_ [(j-1) / WORD_SIZE] |= (word)b << ((j-1) % WORD_SIZE) * 8;
- }
-}
-
-
-void Integer::Decode(const byte* input, unsigned int inputLen, Signedness s)
-{
- unsigned int idx(0);
- byte b = 0;
- if (inputLen>0)
- b = input[idx]; // peek
- sign_ = ((s==SIGNED) && (b & 0x80)) ? NEGATIVE : POSITIVE;
-
- while (inputLen>0 && (sign_==POSITIVE ? b==0 : b==0xff))
- {
- idx++; // skip
- if (--inputLen>0)
- b = input[idx]; // peek
- }
-
- reg_.CleanNew(RoundupSize(BytesToWords(inputLen)));
-
- for (unsigned int i=inputLen; i > 0; i--)
- {
- b = input[idx++];
- reg_[(i-1)/WORD_SIZE] |= (word)b << ((i-1)%WORD_SIZE)*8;
- }
-
- if (sign_ == NEGATIVE)
- {
- for (unsigned i=inputLen; i<reg_.size()*WORD_SIZE; i++)
- reg_[i/WORD_SIZE] |= (word)0xff << (i%WORD_SIZE)*8;
- TwosComplement(reg_.get_buffer(), reg_.size());
- }
-}
-
-
-unsigned int Integer::Encode(byte* output, unsigned int outputLen,
- Signedness signedness) const
-{
- unsigned int idx(0);
- if (signedness == UNSIGNED || NotNegative())
- {
- for (unsigned int i=outputLen; i > 0; i--)
- output[idx++] = GetByte(i-1);
- }
- else
- {
- // take two's complement of *this
- Integer temp = Integer::Power2(8*max(ByteCount(), outputLen)) + *this;
- for (unsigned i=0; i<outputLen; i++)
- output[idx++] = temp.GetByte(outputLen-i-1);
- }
- return outputLen;
-}
-
-
-static Integer* zero = 0;
-
-const Integer &Integer::Zero()
-{
- if (!zero)
- zero = NEW_TC Integer;
- return *zero;
-}
-
-
-static Integer* one = 0;
-
-const Integer &Integer::One()
-{
- if (!one)
- one = NEW_TC Integer(1,2);
- return *one;
-}
-
-
-// Clean up static singleton holders, not a leak, but helpful to have gone
-// when checking for leaks
-void CleanUp()
-{
- tcDelete(one);
- tcDelete(zero);
-
- // In case user calls more than once, prevent seg fault
- one = 0;
- zero = 0;
-}
-
-Integer::Integer(RandomNumberGenerator& rng, const Integer& min,
- const Integer& max)
-{
- Randomize(rng, min, max);
-}
-
-
-void Integer::Randomize(RandomNumberGenerator& rng, unsigned int nbits)
-{
- const unsigned int nbytes = nbits/8 + 1;
- ByteBlock buf(nbytes);
- rng.GenerateBlock(buf.get_buffer(), nbytes);
- if (nbytes)
- buf[0] = (byte)Crop(buf[0], nbits % 8);
- Decode(buf.get_buffer(), nbytes, UNSIGNED);
-}
-
-void Integer::Randomize(RandomNumberGenerator& rng, const Integer& min,
- const Integer& max)
-{
- Integer range = max - min;
- const unsigned int nbits = range.BitCount();
-
- do
- {
- Randomize(rng, nbits);
- }
- while (*this > range);
-
- *this += min;
-}
-
-
-Integer Integer::Power2(unsigned int e)
-{
- Integer r((word)0, BitsToWords(e + 1));
- r.SetBit(e);
- return r;
-}
-
-
-void Integer::SetBit(unsigned int n, bool value)
-{
- if (value)
- {
- reg_.CleanGrow(RoundupSize(BitsToWords(n + 1)));
- reg_[n / WORD_BITS] |= (word(1) << (n % WORD_BITS));
- }
- else
- {
- if (n / WORD_BITS < reg_.size())
- reg_[n / WORD_BITS] &= ~(word(1) << (n % WORD_BITS));
- }
-}
-
-
-void Integer::SetByte(unsigned int n, byte value)
-{
- reg_.CleanGrow(RoundupSize(BytesToWords(n+1)));
- reg_[n/WORD_SIZE] &= ~(word(0xff) << 8*(n%WORD_SIZE));
- reg_[n/WORD_SIZE] |= (word(value) << 8*(n%WORD_SIZE));
-}
-
-
-void Integer::Negate()
-{
- if (!!(*this)) // don't flip sign if *this==0
- sign_ = Sign(1 - sign_);
-}
-
-
-bool Integer::operator!() const
-{
- return IsNegative() ? false : (reg_[0]==0 && WordCount()==0);
-}
-
-
-Integer& Integer::operator=(const Integer& t)
-{
- if (this != &t)
- {
- reg_.New(RoundupSize(t.WordCount()));
- CopyWords(reg_.get_buffer(), t.reg_.get_buffer(), reg_.size());
- sign_ = t.sign_;
- }
- return *this;
-}
-
-
-Integer& Integer::operator+=(const Integer& t)
-{
- reg_.CleanGrow(t.reg_.size());
- if (NotNegative())
- {
- if (t.NotNegative())
- PositiveAdd(*this, *this, t);
- else
- PositiveSubtract(*this, *this, t);
- }
- else
- {
- if (t.NotNegative())
- PositiveSubtract(*this, t, *this);
- else
- {
- PositiveAdd(*this, *this, t);
- sign_ = Integer::NEGATIVE;
- }
- }
- return *this;
-}
-
-
-Integer Integer::operator-() const
-{
- Integer result(*this);
- result.Negate();
- return result;
-}
-
-
-Integer& Integer::operator-=(const Integer& t)
-{
- reg_.CleanGrow(t.reg_.size());
- if (NotNegative())
- {
- if (t.NotNegative())
- PositiveSubtract(*this, *this, t);
- else
- PositiveAdd(*this, *this, t);
- }
- else
- {
- if (t.NotNegative())
- {
- PositiveAdd(*this, *this, t);
- sign_ = Integer::NEGATIVE;
- }
- else
- PositiveSubtract(*this, t, *this);
- }
- return *this;
-}
-
-
-Integer& Integer::operator++()
-{
- if (NotNegative())
- {
- if (Increment(reg_.get_buffer(), reg_.size()))
- {
- reg_.CleanGrow(2*reg_.size());
- reg_[reg_.size()/2]=1;
- }
- }
- else
- {
- word borrow = Decrement(reg_.get_buffer(), reg_.size());
- (void)borrow; // shut up compiler
- if (WordCount()==0)
- *this = Zero();
- }
- return *this;
-}
-
-Integer& Integer::operator--()
-{
- if (IsNegative())
- {
- if (Increment(reg_.get_buffer(), reg_.size()))
- {
- reg_.CleanGrow(2*reg_.size());
- reg_[reg_.size()/2]=1;
- }
- }
- else
- {
- if (Decrement(reg_.get_buffer(), reg_.size()))
- *this = -One();
- }
- return *this;
-}
-
-
-Integer& Integer::operator<<=(unsigned int n)
-{
- const unsigned int wordCount = WordCount();
- const unsigned int shiftWords = n / WORD_BITS;
- const unsigned int shiftBits = n % WORD_BITS;
-
- reg_.CleanGrow(RoundupSize(wordCount+BitsToWords(n)));
- ShiftWordsLeftByWords(reg_.get_buffer(), wordCount + shiftWords,
- shiftWords);
- ShiftWordsLeftByBits(reg_+shiftWords, wordCount+BitsToWords(shiftBits),
- shiftBits);
- return *this;
-}
-
-Integer& Integer::operator>>=(unsigned int n)
-{
- const unsigned int wordCount = WordCount();
- const unsigned int shiftWords = n / WORD_BITS;
- const unsigned int shiftBits = n % WORD_BITS;
-
- ShiftWordsRightByWords(reg_.get_buffer(), wordCount, shiftWords);
- if (wordCount > shiftWords)
- ShiftWordsRightByBits(reg_.get_buffer(), wordCount-shiftWords,
- shiftBits);
- if (IsNegative() && WordCount()==0) // avoid -0
- *this = Zero();
- return *this;
-}
-
-
-void PositiveAdd(Integer& sum, const Integer& a, const Integer& b)
-{
- word carry;
- if (a.reg_.size() == b.reg_.size())
- carry = Add(sum.reg_.get_buffer(), a.reg_.get_buffer(),
- b.reg_.get_buffer(), a.reg_.size());
- else if (a.reg_.size() > b.reg_.size())
- {
- carry = Add(sum.reg_.get_buffer(), a.reg_.get_buffer(),
- b.reg_.get_buffer(), b.reg_.size());
- CopyWords(sum.reg_+b.reg_.size(), a.reg_+b.reg_.size(),
- a.reg_.size()-b.reg_.size());
- carry = Increment(sum.reg_+b.reg_.size(), a.reg_.size()-b.reg_.size(),
- carry);
- }
- else
- {
- carry = Add(sum.reg_.get_buffer(), a.reg_.get_buffer(),
- b.reg_.get_buffer(), a.reg_.size());
- CopyWords(sum.reg_+a.reg_.size(), b.reg_+a.reg_.size(),
- b.reg_.size()-a.reg_.size());
- carry = Increment(sum.reg_+a.reg_.size(), b.reg_.size()-a.reg_.size(),
- carry);
- }
-
- if (carry)
- {
- sum.reg_.CleanGrow(2*sum.reg_.size());
- sum.reg_[sum.reg_.size()/2] = 1;
- }
- sum.sign_ = Integer::POSITIVE;
-}
-
-void PositiveSubtract(Integer &diff, const Integer &a, const Integer& b)
-{
- unsigned aSize = a.WordCount();
- aSize += aSize%2;
- unsigned bSize = b.WordCount();
- bSize += bSize%2;
-
- if (aSize == bSize)
- {
- if (Compare(a.reg_.get_buffer(), b.reg_.get_buffer(), aSize) >= 0)
- {
- Subtract(diff.reg_.get_buffer(), a.reg_.get_buffer(),
- b.reg_.get_buffer(), aSize);
- diff.sign_ = Integer::POSITIVE;
- }
- else
- {
- Subtract(diff.reg_.get_buffer(), b.reg_.get_buffer(),
- a.reg_.get_buffer(), aSize);
- diff.sign_ = Integer::NEGATIVE;
- }
- }
- else if (aSize > bSize)
- {
- word borrow = Subtract(diff.reg_.get_buffer(), a.reg_.get_buffer(),
- b.reg_.get_buffer(), bSize);
- CopyWords(diff.reg_+bSize, a.reg_+bSize, aSize-bSize);
- borrow = Decrement(diff.reg_+bSize, aSize-bSize, borrow);
- diff.sign_ = Integer::POSITIVE;
- }
- else
- {
- word borrow = Subtract(diff.reg_.get_buffer(), b.reg_.get_buffer(),
- a.reg_.get_buffer(), aSize);
- CopyWords(diff.reg_+aSize, b.reg_+aSize, bSize-aSize);
- borrow = Decrement(diff.reg_+aSize, bSize-aSize, borrow);
- diff.sign_ = Integer::NEGATIVE;
- }
-}
-
-
-unsigned int Integer::MinEncodedSize(Signedness signedness) const
-{
- unsigned int outputLen = max(1U, ByteCount());
- if (signedness == UNSIGNED)
- return outputLen;
- if (NotNegative() && (GetByte(outputLen-1) & 0x80))
- outputLen++;
- if (IsNegative() && *this < -Power2(outputLen*8-1))
- outputLen++;
- return outputLen;
-}
-
-
-int Integer::Compare(const Integer& t) const
-{
- if (NotNegative())
- {
- if (t.NotNegative())
- return PositiveCompare(t);
- else
- return 1;
- }
- else
- {
- if (t.NotNegative())
- return -1;
- else
- return -PositiveCompare(t);
- }
-}
-
-
-int Integer::PositiveCompare(const Integer& t) const
-{
- unsigned size = WordCount(), tSize = t.WordCount();
-
- if (size == tSize)
- return TaoCrypt::Compare(reg_.get_buffer(), t.reg_.get_buffer(), size);
- else
- return size > tSize ? 1 : -1;
-}
-
-
-bool Integer::GetBit(unsigned int n) const
-{
- if (n/WORD_BITS >= reg_.size())
- return 0;
- else
- return bool((reg_[n/WORD_BITS] >> (n % WORD_BITS)) & 1);
-}
-
-
-unsigned long Integer::GetBits(unsigned int i, unsigned int n) const
-{
- unsigned long v = 0;
- for (unsigned int j=0; j<n; j++)
- v |= GetBit(i+j) << j;
- return v;
-}
-
-
-byte Integer::GetByte(unsigned int n) const
-{
- if (n/WORD_SIZE >= reg_.size())
- return 0;
- else
- return byte(reg_[n/WORD_SIZE] >> ((n%WORD_SIZE)*8));
-}
-
-
-unsigned int Integer::BitCount() const
-{
- unsigned wordCount = WordCount();
- if (wordCount)
- return (wordCount-1)*WORD_BITS + BitPrecision(reg_[wordCount-1]);
- else
- return 0;
-}
-
-
-unsigned int Integer::ByteCount() const
-{
- unsigned wordCount = WordCount();
- if (wordCount)
- return (wordCount-1)*WORD_SIZE + BytePrecision(reg_[wordCount-1]);
- else
- return 0;
-}
-
-
-unsigned int Integer::WordCount() const
-{
- return CountWords(reg_.get_buffer(), reg_.size());
-}
-
-
-bool Integer::IsConvertableToLong() const
-{
- if (ByteCount() > sizeof(long))
- return false;
-
- unsigned long value = reg_[0];
- value += SafeLeftShift<WORD_BITS, unsigned long>(reg_[1]);
-
- if (sign_ == POSITIVE)
- return (signed long)value >= 0;
- else
- return -(signed long)value < 0;
-}
-
-
-signed long Integer::ConvertToLong() const
-{
- unsigned long value = reg_[0];
- value += SafeLeftShift<WORD_BITS, unsigned long>(reg_[1]);
- return sign_ == POSITIVE ? value : -(signed long)value;
-}
-
-
-void Integer::Swap(Integer& a)
-{
- reg_.Swap(a.reg_);
- STL::swap(sign_, a.sign_);
-}
-
-
-Integer Integer::Plus(const Integer& b) const
-{
- Integer sum((word)0, max(reg_.size(), b.reg_.size()));
- if (NotNegative())
- {
- if (b.NotNegative())
- PositiveAdd(sum, *this, b);
- else
- PositiveSubtract(sum, *this, b);
- }
- else
- {
- if (b.NotNegative())
- PositiveSubtract(sum, b, *this);
- else
- {
- PositiveAdd(sum, *this, b);
- sum.sign_ = Integer::NEGATIVE;
- }
- }
- return sum;
-}
-
-
-Integer Integer::Minus(const Integer& b) const
-{
- Integer diff((word)0, max(reg_.size(), b.reg_.size()));
- if (NotNegative())
- {
- if (b.NotNegative())
- PositiveSubtract(diff, *this, b);
- else
- PositiveAdd(diff, *this, b);
- }
- else
- {
- if (b.NotNegative())
- {
- PositiveAdd(diff, *this, b);
- diff.sign_ = Integer::NEGATIVE;
- }
- else
- PositiveSubtract(diff, b, *this);
- }
- return diff;
-}
-
-
-Integer Integer::Times(const Integer &b) const
-{
- Integer product;
- Multiply(product, *this, b);
- return product;
-}
-
-
-#undef A0
-#undef A1
-#undef B0
-#undef B1
-
-#undef T0
-#undef T1
-#undef T2
-#undef T3
-
-#undef R0
-#undef R1
-#undef R2
-#undef R3
-
-
-static inline void AtomicDivide(word *Q, const word *A, const word *B)
-{
- word T[4];
- DWord q = DivideFourWordsByTwo<word, DWord>(T, DWord(A[0], A[1]),
- DWord(A[2], A[3]), DWord(B[0], B[1]));
- Q[0] = q.GetLowHalf();
- Q[1] = q.GetHighHalf();
-
-#ifndef NDEBUG
- if (B[0] || B[1])
- {
- // multiply quotient and divisor and add remainder, make sure it
- // equals dividend
- word P[4];
- Portable::Multiply2(P, Q, B);
- Add(P, P, T, 4);
- }
-#endif
-}
-
-
-// for use by Divide(), corrects the underestimated quotient {Q1,Q0}
-static void CorrectQuotientEstimate(word *R, word *T, word *Q, const word *B,
- unsigned int N)
-{
- if (Q[1])
- {
- T[N] = T[N+1] = 0;
- unsigned i;
- for (i=0; i<N; i+=4)
- LowLevel::Multiply2(T+i, Q, B+i);
- for (i=2; i<N; i+=4)
- if (LowLevel::Multiply2Add(T+i, Q, B+i))
- T[i+5] += (++T[i+4]==0);
- }
- else
- {
- T[N] = LinearMultiply(T, B, Q[0], N);
- T[N+1] = 0;
- }
-
- word borrow = Subtract(R, R, T, N+2);
- (void)borrow; // shut up compiler
-
- while (R[N] || Compare(R, B, N) >= 0)
- {
- R[N] -= Subtract(R, R, B, N);
- Q[1] += (++Q[0]==0);
- }
-}
-
-// R[NB] -------- remainder = A%B
-// Q[NA-NB+2] --- quotient = A/B
-// T[NA+2*NB+4] - temp work space
-// A[NA] -------- dividend
-// B[NB] -------- divisor
-
-
-void Divide(word* R, word* Q, word* T, const word* A, unsigned int NA,
- const word* B, unsigned int NB)
-{
- // set up temporary work space
- word *const TA=T;
- word *const TB=T+NA+2;
- word *const TP=T+NA+2+NB;
-
- // copy B into TB and normalize it so that TB has highest bit set to 1
- unsigned shiftWords = (B[NB-1]==0);
- TB[0] = TB[NB-1] = 0;
- CopyWords(TB+shiftWords, B, NB-shiftWords);
- unsigned shiftBits = WORD_BITS - BitPrecision(TB[NB-1]);
- ShiftWordsLeftByBits(TB, NB, shiftBits);
-
- // copy A into TA and normalize it
- TA[0] = TA[NA] = TA[NA+1] = 0;
- CopyWords(TA+shiftWords, A, NA);
- ShiftWordsLeftByBits(TA, NA+2, shiftBits);
-
- if (TA[NA+1]==0 && TA[NA] <= 1)
- {
- Q[NA-NB+1] = Q[NA-NB] = 0;
- while (TA[NA] || Compare(TA+NA-NB, TB, NB) >= 0)
- {
- TA[NA] -= Subtract(TA+NA-NB, TA+NA-NB, TB, NB);
- ++Q[NA-NB];
- }
- }
- else
- {
- NA+=2;
- }
-
- word BT[2];
- BT[0] = TB[NB-2] + 1;
- BT[1] = TB[NB-1] + (BT[0]==0);
-
- // start reducing TA mod TB, 2 words at a time
- for (unsigned i=NA-2; i>=NB; i-=2)
- {
- AtomicDivide(Q+i-NB, TA+i-2, BT);
- CorrectQuotientEstimate(TA+i-NB, TP, Q+i-NB, TB, NB);
- }
-
- // copy TA into R, and denormalize it
- CopyWords(R, TA+shiftWords, NB);
- ShiftWordsRightByBits(R, NB, shiftBits);
-}
-
-
-void PositiveDivide(Integer& remainder, Integer& quotient,
- const Integer& a, const Integer& b)
-{
- unsigned aSize = a.WordCount();
- unsigned bSize = b.WordCount();
-
- if (a.PositiveCompare(b) == -1)
- {
- remainder = a;
- remainder.sign_ = Integer::POSITIVE;
- quotient = Integer::Zero();
- return;
- }
-
- aSize += aSize%2; // round up to next even number
- bSize += bSize%2;
-
- remainder.reg_.CleanNew(RoundupSize(bSize));
- remainder.sign_ = Integer::POSITIVE;
- quotient.reg_.CleanNew(RoundupSize(aSize-bSize+2));
- quotient.sign_ = Integer::POSITIVE;
-
- AlignedWordBlock T(aSize+2*bSize+4);
- Divide(remainder.reg_.get_buffer(), quotient.reg_.get_buffer(),
- T.get_buffer(), a.reg_.get_buffer(), aSize, b.reg_.get_buffer(),
- bSize);
-}
-
-void Integer::Divide(Integer &remainder, Integer &quotient,
- const Integer &dividend, const Integer &divisor)
-{
- PositiveDivide(remainder, quotient, dividend, divisor);
-
- if (dividend.IsNegative())
- {
- quotient.Negate();
- if (remainder.NotZero())
- {
- --quotient;
- remainder = divisor.AbsoluteValue() - remainder;
- }
- }
-
- if (divisor.IsNegative())
- quotient.Negate();
-}
-
-void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a,
- unsigned int n)
-{
- q = a;
- q >>= n;
-
- const unsigned int wordCount = BitsToWords(n);
- if (wordCount <= a.WordCount())
- {
- r.reg_.resize(RoundupSize(wordCount));
- CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount);
- SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount);
- if (n % WORD_BITS != 0)
- r.reg_[wordCount-1] %= (word(1) << (n % WORD_BITS));
- }
- else
- {
- r.reg_.resize(RoundupSize(a.WordCount()));
- CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), r.reg_.size());
- }
- r.sign_ = POSITIVE;
-
- if (a.IsNegative() && r.NotZero())
- {
- --q;
- r = Power2(n) - r;
- }
-}
-
-Integer Integer::DividedBy(const Integer &b) const
-{
- Integer remainder, quotient;
- Integer::Divide(remainder, quotient, *this, b);
- return quotient;
-}
-
-Integer Integer::Modulo(const Integer &b) const
-{
- Integer remainder, quotient;
- Integer::Divide(remainder, quotient, *this, b);
- return remainder;
-}
-
-void Integer::Divide(word &remainder, Integer &quotient,
- const Integer &dividend, word divisor)
-{
- if ((divisor & (divisor-1)) == 0) // divisor is a power of 2
- {
- quotient = dividend >> (BitPrecision(divisor)-1);
- remainder = dividend.reg_[0] & (divisor-1);
- return;
- }
-
- unsigned int i = dividend.WordCount();
- quotient.reg_.CleanNew(RoundupSize(i));
- remainder = 0;
- while (i--)
- {
- quotient.reg_[i] = DWord(dividend.reg_[i], remainder) / divisor;
- remainder = DWord(dividend.reg_[i], remainder) % divisor;
- }
-
- if (dividend.NotNegative())
- quotient.sign_ = POSITIVE;
- else
- {
- quotient.sign_ = NEGATIVE;
- if (remainder)
- {
- --quotient;
- remainder = divisor - remainder;
- }
- }
-}
-
-Integer Integer::DividedBy(word b) const
-{
- word remainder;
- Integer quotient;
- Integer::Divide(remainder, quotient, *this, b);
- return quotient;
-}
-
-word Integer::Modulo(word divisor) const
-{
- word remainder;
-
- if ((divisor & (divisor-1)) == 0) // divisor is a power of 2
- remainder = reg_[0] & (divisor-1);
- else
- {
- unsigned int i = WordCount();
-
- if (divisor <= 5)
- {
- DWord sum(0, 0);
- while (i--)
- sum += reg_[i];
- remainder = sum % divisor;
- }
- else
- {
- remainder = 0;
- while (i--)
- remainder = DWord(reg_[i], remainder) % divisor;
- }
- }
-
- if (IsNegative() && remainder)
- remainder = divisor - remainder;
-
- return remainder;
-}
-
-
-Integer Integer::AbsoluteValue() const
-{
- Integer result(*this);
- result.sign_ = POSITIVE;
- return result;
-}
-
-
-Integer Integer::SquareRoot() const
-{
- if (!IsPositive())
- return Zero();
-
- // overestimate square root
- Integer x, y = Power2((BitCount()+1)/2);
-
- do
- {
- x = y;
- y = (x + *this/x) >> 1;
- } while (y<x);
-
- return x;
-}
-
-bool Integer::IsSquare() const
-{
- Integer r = SquareRoot();
- return *this == r.Squared();
-}
-
-bool Integer::IsUnit() const
-{
- return (WordCount() == 1) && (reg_[0] == 1);
-}
-
-Integer Integer::MultiplicativeInverse() const
-{
- return IsUnit() ? *this : Zero();
-}
-
-Integer a_times_b_mod_c(const Integer &x, const Integer& y, const Integer& m)
-{
- return x*y%m;
-}
-
-Integer a_exp_b_mod_c(const Integer &x, const Integer& e, const Integer& m)
-{
- ModularArithmetic mr(m);
- return mr.Exponentiate(x, e);
-}
-
-Integer Integer::Gcd(const Integer &a, const Integer &b)
-{
- return EuclideanDomainOf().Gcd(a, b);
-}
-
-Integer Integer::InverseMod(const Integer &m) const
-{
- if (IsNegative() || *this>=m)
- return (*this%m).InverseMod(m);
-
- if (m.IsEven())
- {
- if (!m || IsEven())
- return Zero(); // no inverse
- if (*this == One())
- return One();
-
- Integer u = m.InverseMod(*this);
- return !u ? Zero() : (m*(*this-u)+1)/(*this);
- }
-
- AlignedWordBlock T(m.reg_.size() * 4);
- Integer r((word)0, m.reg_.size());
- unsigned k = AlmostInverse(r.reg_.get_buffer(), T.get_buffer(),
- reg_.get_buffer(), reg_.size(),
- m.reg_.get_buffer(), m.reg_.size());
- DivideByPower2Mod(r.reg_.get_buffer(), r.reg_.get_buffer(), k,
- m.reg_.get_buffer(), m.reg_.size());
- return r;
-}
-
-word Integer::InverseMod(const word mod) const
-{
- word g0 = mod, g1 = *this % mod;
- word v0 = 0, v1 = 1;
- word y;
-
- while (g1)
- {
- if (g1 == 1)
- return v1;
- y = g0 / g1;
- g0 = g0 % g1;
- v0 += y * v1;
-
- if (!g0)
- break;
- if (g0 == 1)
- return mod-v0;
- y = g1 / g0;
- g1 = g1 % g0;
- v1 += y * v0;
- }
- return 0;
-}
-
-// ********* ModArith stuff
-
-const Integer& ModularArithmetic::Half(const Integer &a) const
-{
- if (a.reg_.size()==modulus.reg_.size())
- {
- TaoCrypt::DivideByPower2Mod(result.reg_.begin(), a.reg_.begin(), 1,
- modulus.reg_.begin(), a.reg_.size());
- return result;
- }
- else
- return result1 = (a.IsEven() ? (a >> 1) : ((a+modulus) >> 1));
-}
-
-const Integer& ModularArithmetic::Add(const Integer &a, const Integer &b) const
-{
- if (a.reg_.size()==modulus.reg_.size() &&
- b.reg_.size()==modulus.reg_.size())
- {
- if (TaoCrypt::Add(result.reg_.begin(), a.reg_.begin(), b.reg_.begin(),
- a.reg_.size())
- || Compare(result.reg_.get_buffer(), modulus.reg_.get_buffer(),
- a.reg_.size()) >= 0)
- {
- TaoCrypt::Subtract(result.reg_.begin(), result.reg_.begin(),
- modulus.reg_.begin(), a.reg_.size());
- }
- return result;
- }
- else
- {
- result1 = a+b;
- if (result1 >= modulus)
- result1 -= modulus;
- return result1;
- }
-}
-
-Integer& ModularArithmetic::Accumulate(Integer &a, const Integer &b) const
-{
- if (a.reg_.size()==modulus.reg_.size() &&
- b.reg_.size()==modulus.reg_.size())
- {
- if (TaoCrypt::Add(a.reg_.get_buffer(), a.reg_.get_buffer(),
- b.reg_.get_buffer(), a.reg_.size())
- || Compare(a.reg_.get_buffer(), modulus.reg_.get_buffer(),
- a.reg_.size()) >= 0)
- {
- TaoCrypt::Subtract(a.reg_.get_buffer(), a.reg_.get_buffer(),
- modulus.reg_.get_buffer(), a.reg_.size());
- }
- }
- else
- {
- a+=b;
- if (a>=modulus)
- a-=modulus;
- }
-
- return a;
-}
-
-const Integer& ModularArithmetic::Subtract(const Integer &a,
- const Integer &b) const
-{
- if (a.reg_.size()==modulus.reg_.size() &&
- b.reg_.size()==modulus.reg_.size())
- {
- if (TaoCrypt::Subtract(result.reg_.begin(), a.reg_.begin(),
- b.reg_.begin(), a.reg_.size()))
- TaoCrypt::Add(result.reg_.begin(), result.reg_.begin(),
- modulus.reg_.begin(), a.reg_.size());
- return result;
- }
- else
- {
- result1 = a-b;
- if (result1.IsNegative())
- result1 += modulus;
- return result1;
- }
-}
-
-Integer& ModularArithmetic::Reduce(Integer &a, const Integer &b) const
-{
- if (a.reg_.size()==modulus.reg_.size() &&
- b.reg_.size()==modulus.reg_.size())
- {
- if (TaoCrypt::Subtract(a.reg_.get_buffer(), a.reg_.get_buffer(),
- b.reg_.get_buffer(), a.reg_.size()))
- TaoCrypt::Add(a.reg_.get_buffer(), a.reg_.get_buffer(),
- modulus.reg_.get_buffer(), a.reg_.size());
- }
- else
- {
- a-=b;
- if (a.IsNegative())
- a+=modulus;
- }
-
- return a;
-}
-
-const Integer& ModularArithmetic::Inverse(const Integer &a) const
-{
- if (!a)
- return a;
-
- CopyWords(result.reg_.begin(), modulus.reg_.begin(), modulus.reg_.size());
- if (TaoCrypt::Subtract(result.reg_.begin(), result.reg_.begin(),
- a.reg_.begin(), a.reg_.size()))
- Decrement(result.reg_.begin()+a.reg_.size(), 1,
- modulus.reg_.size()-a.reg_.size());
-
- return result;
-}
-
-Integer ModularArithmetic::CascadeExponentiate(const Integer &x,
- const Integer &e1, const Integer &y, const Integer &e2) const
-{
- if (modulus.IsOdd())
- {
- MontgomeryRepresentation dr(modulus);
- return dr.ConvertOut(dr.CascadeExponentiate(dr.ConvertIn(x), e1,
- dr.ConvertIn(y), e2));
- }
- else
- return AbstractRing::CascadeExponentiate(x, e1, y, e2);
-}
-
-void ModularArithmetic::SimultaneousExponentiate(Integer *results,
- const Integer &base, const Integer *exponents,
- unsigned int exponentsCount) const
-{
- if (modulus.IsOdd())
- {
- MontgomeryRepresentation dr(modulus);
- dr.SimultaneousExponentiate(results, dr.ConvertIn(base), exponents,
- exponentsCount);
- for (unsigned int i=0; i<exponentsCount; i++)
- results[i] = dr.ConvertOut(results[i]);
- }
- else
- AbstractRing::SimultaneousExponentiate(results, base,
- exponents, exponentsCount);
-}
-
-
-// ********************************************************
-
-#define A0 A
-#define A1 (A+N2)
-#define B0 B
-#define B1 (B+N2)
-
-#define T0 T
-#define T1 (T+N2)
-#define T2 (T+N)
-#define T3 (T+N+N2)
-
-#define R0 R
-#define R1 (R+N2)
-#define R2 (R+N)
-#define R3 (R+N+N2)
-
-
-inline void MultiplyBottom(word *R, word *T, const word *A, const word *B,
- unsigned int N)
-{
- RecursiveMultiplyBottom(R, T, A, B, N);
-}
-
-inline void MultiplyTop(word *R, word *T, const word *L, const word *A,
- const word *B, unsigned int N)
-{
- RecursiveMultiplyTop(R, T, L, A, B, N);
-}
-
-
-// R[N] --- result = X/(2**(WORD_BITS*N)) mod M
-// T[3*N] - temporary work space
-// X[2*N] - number to be reduced
-// M[N] --- modulus
-// U[N] --- multiplicative inverse of M mod 2**(WORD_BITS*N)
-
-void MontgomeryReduce(word *R, word *T, const word *X, const word *M,
- const word *U, unsigned int N)
-{
- MultiplyBottom(R, T, X, U, N);
- MultiplyTop(T, T+N, X, R, M, N);
- word borrow = Subtract(T, X+N, T, N);
- // defend against timing attack by doing this Add even when not needed
- word carry = Add(T+N, T, M, N);
- (void)carry; // shut up compiler
- CopyWords(R, T + (borrow ? N : 0), N);
-}
-
-// R[N] ----- result = A inverse mod 2**(WORD_BITS*N)
-// T[3*N/2] - temporary work space
-// A[N] ----- an odd number as input
-
-void RecursiveInverseModPower2(word *R, word *T, const word *A, unsigned int N)
-{
- if (N==2)
- {
- T[0] = AtomicInverseModPower2(A[0]);
- T[1] = 0;
- LowLevel::Multiply2Bottom(T+2, T, A);
- TwosComplement(T+2, 2);
- Increment(T+2, 2, 2);
- LowLevel::Multiply2Bottom(R, T, T+2);
- }
- else
- {
- const unsigned int N2 = N/2;
- RecursiveInverseModPower2(R0, T0, A0, N2);
- T0[0] = 1;
- SetWords(T0+1, 0, N2-1);
- MultiplyTop(R1, T1, T0, R0, A0, N2);
- MultiplyBottom(T0, T1, R0, A1, N2);
- Add(T0, R1, T0, N2);
- TwosComplement(T0, N2);
- MultiplyBottom(R1, T1, R0, T0, N2);
- }
-}
-
-
-#undef A0
-#undef A1
-#undef B0
-#undef B1
-
-#undef T0
-#undef T1
-#undef T2
-#undef T3
-
-#undef R0
-#undef R1
-#undef R2
-#undef R3
-
-
-// modulus must be odd
-MontgomeryRepresentation::MontgomeryRepresentation(const Integer &m)
- : ModularArithmetic(m),
- u((word)0, modulus.reg_.size()),
- workspace(5*modulus.reg_.size())
-{
- RecursiveInverseModPower2(u.reg_.get_buffer(), workspace.get_buffer(),
- modulus.reg_.get_buffer(), modulus.reg_.size());
-}
-
-const Integer& MontgomeryRepresentation::Multiply(const Integer &a,
- const Integer &b) const
-{
- word *const T = workspace.begin();
- word *const R = result.reg_.begin();
- const unsigned int N = modulus.reg_.size();
-
- AsymmetricMultiply(T, T+2*N, a.reg_.get_buffer(), a.reg_.size(),
- b.reg_.get_buffer(), b.reg_.size());
- SetWords(T+a.reg_.size()+b.reg_.size(),0, 2*N-a.reg_.size()-b.reg_.size());
- MontgomeryReduce(R, T+2*N, T, modulus.reg_.get_buffer(),
- u.reg_.get_buffer(), N);
- return result;
-}
-
-const Integer& MontgomeryRepresentation::Square(const Integer &a) const
-{
- word *const T = workspace.begin();
- word *const R = result.reg_.begin();
- const unsigned int N = modulus.reg_.size();
-
- TaoCrypt::Square(T, T+2*N, a.reg_.get_buffer(), a.reg_.size());
- SetWords(T+2*a.reg_.size(), 0, 2*N-2*a.reg_.size());
- MontgomeryReduce(R, T+2*N, T, modulus.reg_.get_buffer(),
- u.reg_.get_buffer(), N);
- return result;
-}
-
-Integer MontgomeryRepresentation::ConvertOut(const Integer &a) const
-{
- word *const T = workspace.begin();
- word *const R = result.reg_.begin();
- const unsigned int N = modulus.reg_.size();
-
- CopyWords(T, a.reg_.get_buffer(), a.reg_.size());
- SetWords(T+a.reg_.size(), 0, 2*N-a.reg_.size());
- MontgomeryReduce(R, T+2*N, T, modulus.reg_.get_buffer(),
- u.reg_.get_buffer(), N);
- return result;
-}
-
-const Integer& MontgomeryRepresentation::MultiplicativeInverse(
- const Integer &a) const
-{
-// return (EuclideanMultiplicativeInverse(a, modulus)<<
-// (2*WORD_BITS*modulus.reg_.size()))%modulus;
- word *const T = workspace.begin();
- word *const R = result.reg_.begin();
- const unsigned int N = modulus.reg_.size();
-
- CopyWords(T, a.reg_.get_buffer(), a.reg_.size());
- SetWords(T+a.reg_.size(), 0, 2*N-a.reg_.size());
- MontgomeryReduce(R, T+2*N, T, modulus.reg_.get_buffer(),
- u.reg_.get_buffer(), N);
- unsigned k = AlmostInverse(R, T, R, N, modulus.reg_.get_buffer(), N);
-
-// cout << "k=" << k << " N*32=" << 32*N << endl;
-
- if (k>N*WORD_BITS)
- DivideByPower2Mod(R, R, k-N*WORD_BITS, modulus.reg_.get_buffer(), N);
- else
- MultiplyByPower2Mod(R, R, N*WORD_BITS-k, modulus.reg_.get_buffer(), N);
-
- return result;
-}
-
-
-// mod Root stuff
-Integer ModularRoot(const Integer &a, const Integer &dp, const Integer &dq,
- const Integer &p, const Integer &q, const Integer &u)
-{
- Integer p2 = ModularExponentiation((a % p), dp, p);
- Integer q2 = ModularExponentiation((a % q), dq, q);
- return CRT(p2, p, q2, q, u);
-}
-
-Integer CRT(const Integer &xp, const Integer &p, const Integer &xq,
- const Integer &q, const Integer &u)
-{
- // isn't operator overloading great?
- return p * (u * (xq-xp) % q) + xp;
-}
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/make.bat b/extra/yassl/taocrypt/src/make.bat
deleted file mode 100755
index 6572d7f354a..00000000000
--- a/extra/yassl/taocrypt/src/make.bat
+++ /dev/null
@@ -1,53 +0,0 @@
-REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-REM
-REM This program is free software; you can redistribute it and/or modify
-REM it under the terms of the GNU General Public License as published by
-REM the Free Software Foundation; version 2 of the License.
-REM
-REM This program is distributed in the hope that it will be useful,
-REM but WITHOUT ANY WARRANTY; without even the implied warranty of
-REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-REM GNU General Public License for more details.
-REM
-REM You should have received a copy of the GNU General Public License
-REM along with this program; if not, write to the Free Software
-REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-REM quick and dirty build file for testing different MSDEVs
-setlocal
-
-set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2
-
-cl %myFLAGS% aes.cpp
-cl %myFLAGS% aestables.cpp
-cl %myFLAGS% algebra.cpp
-cl %myFLAGS% arc4.cpp
-
-cl %myFLAGS% asn.cpp
-cl %myFLAGS% bftables.cpp
-cl %myFLAGS% blowfish.cpp
-cl %myFLAGS% coding.cpp
-
-cl %myFLAGS% des.cpp
-cl %myFLAGS% dh.cpp
-cl %myFLAGS% dsa.cpp
-cl %myFLAGS% file.cpp
-
-cl %myFLAGS% hash.cpp
-cl %myFLAGS% integer.cpp
-cl %myFLAGS% md2.cpp
-cl %myFLAGS% md4.cpp
-cl %myFLAGS% md5.cpp
-
-cl %myFLAGS% misc.cpp
-cl %myFLAGS% random.cpp
-cl %myFLAGS% ripemd.cpp
-cl %myFLAGS% rsa.cpp
-
-cl %myFLAGS% sha.cpp
-cl %myFLAGS% template_instnt.cpp
-cl %myFLAGS% tftables.cpp
-cl %myFLAGS% twofish.cpp
-
-link.exe -lib /out:taocrypt.lib aes.obj aestables.obj algebra.obj arc4.obj asn.obj bftables.obj blowfish.obj coding.obj des.obj dh.obj dsa.obj file.obj hash.obj integer.obj md2.obj md4.obj md5.obj misc.obj random.obj ripemd.obj rsa.obj sha.obj template_instnt.obj tftables.obj twofish.obj
-
diff --git a/extra/yassl/taocrypt/src/md2.cpp b/extra/yassl/taocrypt/src/md2.cpp
deleted file mode 100644
index b1a7190d1f8..00000000000
--- a/extra/yassl/taocrypt/src/md2.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* based on Wei Dai's md2.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "md2.hpp"
-#include <string.h>
-
-namespace TaoCrypt {
-
-
-MD2::MD2()
- : X_(X_SIZE), C_(BLOCK_SIZE), buffer_(BLOCK_SIZE)
-{
- Init();
-}
-
-void MD2::Init()
-{
- memset(X_.get_buffer(), 0, X_SIZE);
- memset(C_.get_buffer(), 0, BLOCK_SIZE);
- memset(buffer_.get_buffer(), 0, BLOCK_SIZE);
- count_ = 0;
-}
-
-
-void MD2::Update(const byte* data, word32 len)
-{
-
- static const byte S[256] =
- {
- 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6,
- 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188,
- 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24,
- 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251,
- 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63,
- 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50,
- 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165,
- 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210,
- 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157,
- 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27,
- 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15,
- 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197,
- 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65,
- 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123,
- 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233,
- 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228,
- 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237,
- 31, 26, 219, 153, 141, 51, 159, 17, 131, 20
- };
-
- while (len) {
- word32 L = (PAD_SIZE - count_) < len ? (PAD_SIZE - count_) : len;
- memcpy(buffer_.get_buffer() + count_, data, L);
- count_ += L;
- data += L;
- len -= L;
-
- if (count_==PAD_SIZE) {
- count_ = 0;
- memcpy(X_.get_buffer() + PAD_SIZE, buffer_.get_buffer(), PAD_SIZE);
- byte t = C_[15];
-
- int i;
- for(i = 0; i < PAD_SIZE; i++) {
- X_[32 + i] = X_[PAD_SIZE + i] ^ X_[i];
- t = C_[i] ^= S[buffer_[i] ^ t];
- }
-
- t=0;
- for(i = 0; i < 18; i++) {
- for(int j = 0; j < X_SIZE; j += 8) {
- t = X_[j+0] ^= S[t];
- t = X_[j+1] ^= S[t];
- t = X_[j+2] ^= S[t];
- t = X_[j+3] ^= S[t];
- t = X_[j+4] ^= S[t];
- t = X_[j+5] ^= S[t];
- t = X_[j+6] ^= S[t];
- t = X_[j+7] ^= S[t];
- }
- t = (t + i) & 0xFF;
- }
- }
- }
-}
-
-
-void MD2::Final(byte *hash)
-{
- byte padding[BLOCK_SIZE];
- word32 padLen = PAD_SIZE - count_;
-
- for (word32 i = 0; i < padLen; i++)
- padding[i] = static_cast<byte>(padLen);
-
- Update(padding, padLen);
- Update(C_.get_buffer(), BLOCK_SIZE);
-
- memcpy(hash, X_.get_buffer(), DIGEST_SIZE);
-
- Init();
-}
-
-
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/md4.cpp b/extra/yassl/taocrypt/src/md4.cpp
deleted file mode 100644
index 02613fcf1e3..00000000000
--- a/extra/yassl/taocrypt/src/md4.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* based on Wei Dai's md4.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "md4.hpp"
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-namespace TaoCrypt {
-
-void MD4::Init()
-{
- digest_[0] = 0x67452301L;
- digest_[1] = 0xefcdab89L;
- digest_[2] = 0x98badcfeL;
- digest_[3] = 0x10325476L;
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-
-MD4::MD4(const MD4& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32),
- BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-MD4& MD4::operator= (const MD4& that)
-{
- MD4 tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-
-void MD4::Swap(MD4& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-
-void MD4::Transform()
-{
-#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
-#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-
- word32 A, B, C, D;
-
- A = digest_[0];
- B = digest_[1];
- C = digest_[2];
- D = digest_[3];
-
-#define function(a,b,c,d,k,s) a=rotlFixed(a+F(b,c,d)+buffer_[k],s);
- function(A,B,C,D, 0, 3);
- function(D,A,B,C, 1, 7);
- function(C,D,A,B, 2,11);
- function(B,C,D,A, 3,19);
- function(A,B,C,D, 4, 3);
- function(D,A,B,C, 5, 7);
- function(C,D,A,B, 6,11);
- function(B,C,D,A, 7,19);
- function(A,B,C,D, 8, 3);
- function(D,A,B,C, 9, 7);
- function(C,D,A,B,10,11);
- function(B,C,D,A,11,19);
- function(A,B,C,D,12, 3);
- function(D,A,B,C,13, 7);
- function(C,D,A,B,14,11);
- function(B,C,D,A,15,19);
-
-#undef function
-#define function(a,b,c,d,k,s) a=rotlFixed(a+G(b,c,d)+buffer_[k]+0x5a827999,s);
- function(A,B,C,D, 0, 3);
- function(D,A,B,C, 4, 5);
- function(C,D,A,B, 8, 9);
- function(B,C,D,A,12,13);
- function(A,B,C,D, 1, 3);
- function(D,A,B,C, 5, 5);
- function(C,D,A,B, 9, 9);
- function(B,C,D,A,13,13);
- function(A,B,C,D, 2, 3);
- function(D,A,B,C, 6, 5);
- function(C,D,A,B,10, 9);
- function(B,C,D,A,14,13);
- function(A,B,C,D, 3, 3);
- function(D,A,B,C, 7, 5);
- function(C,D,A,B,11, 9);
- function(B,C,D,A,15,13);
-
-#undef function
-#define function(a,b,c,d,k,s) a=rotlFixed(a+H(b,c,d)+buffer_[k]+0x6ed9eba1,s);
- function(A,B,C,D, 0, 3);
- function(D,A,B,C, 8, 9);
- function(C,D,A,B, 4,11);
- function(B,C,D,A,12,15);
- function(A,B,C,D, 2, 3);
- function(D,A,B,C,10, 9);
- function(C,D,A,B, 6,11);
- function(B,C,D,A,14,15);
- function(A,B,C,D, 1, 3);
- function(D,A,B,C, 9, 9);
- function(C,D,A,B, 5,11);
- function(B,C,D,A,13,15);
- function(A,B,C,D, 3, 3);
- function(D,A,B,C,11, 9);
- function(C,D,A,B, 7,11);
- function(B,C,D,A,15,15);
-
- digest_[0] += A;
- digest_[1] += B;
- digest_[2] += C;
- digest_[3] += D;
-}
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/md5.cpp b/extra/yassl/taocrypt/src/md5.cpp
deleted file mode 100644
index b68be738e83..00000000000
--- a/extra/yassl/taocrypt/src/md5.cpp
+++ /dev/null
@@ -1,506 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* based on Wei Dai's md5.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "md5.hpp"
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-
-namespace TaoCrypt {
-
-void MD5::Init()
-{
- digest_[0] = 0x67452301L;
- digest_[1] = 0xefcdab89L;
- digest_[2] = 0x98badcfeL;
- digest_[3] = 0x10325476L;
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-
-MD5::MD5(const MD5& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32),
- BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-MD5& MD5::operator= (const MD5& that)
-{
- MD5 tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-
-void MD5::Swap(MD5& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-
-#ifdef DO_MD5_ASM
-
-// Update digest with data of size len
-void MD5::Update(const byte* data, word32 len)
-{
- if (!isMMX) {
- HASHwithTransform::Update(data, len);
- return;
- }
-
- byte* local = reinterpret_cast<byte*>(buffer_);
-
- // remove buffered data if possible
- if (buffLen_) {
- word32 add = min(len, BLOCK_SIZE - buffLen_);
- memcpy(&local[buffLen_], data, add);
-
- buffLen_ += add;
- data += add;
- len -= add;
-
- if (buffLen_ == BLOCK_SIZE) {
- Transform();
- AddLength(BLOCK_SIZE);
- buffLen_ = 0;
- }
- }
-
- // at once for asm
- if (buffLen_ == 0) {
- word32 times = len / BLOCK_SIZE;
- if (times) {
- AsmTransform(data, times);
- const word32 add = BLOCK_SIZE * times;
- AddLength(add);
- len -= add;
- data += add;
- }
- }
-
- // cache any data left
- if (len) {
- memcpy(&local[buffLen_], data, len);
- buffLen_ += len;
- }
-}
-
-
-
-
-/*
- // w = rotlFixed(w + f(x, y, z) + index[edi] + data, s) + x
-#define ASMMD5STEP(f, w, x, y, z, index, data, s) \
- f(x, y, z) \
- AS2( mov ebp, [edi + index * 4] ) \
- AS2( lea w, [esi + w + data] ) \
- AS2( add w, ebp ) \
- AS2( rol w, s ) \
- AS2( add w, x )
-
-
- // F1(x, y, z) (z ^ (x & (y ^ z)))
- // place in esi
-#define ASMF1(x, y, z) \
- AS2( mov esi, y ) \
- AS2( xor esi, z ) \
- AS2( and esi, x ) \
- AS2( xor esi, z )
-
-
-#define ASMF2(x, y, z) ASMF1(z, x, y)
-
-
- // F3(x ^ y ^ z)
- // place in esi
-#define ASMF3(x, y, z) \
- AS2( mov esi, x ) \
- AS2( xor esi, y ) \
- AS2( xor esi, z )
-
-
-
- // F4(x, y, z) (y ^ (x | ~z))
- // place in esi
-#define ASMF4(x, y, z) \
- AS2( mov esi, z ) \
- AS1( not esi ) \
- AS2( or esi, x ) \
- AS2( xor esi, y )
-*/
-
-
- // combine above ASMMD5STEP(f w/ each f ASMF1 - F4
-
- // esi already set up, after using set for next round
- // ebp already set up, set up using next round index
-
-#define MD5STEP1(w, x, y, z, index, data, s) \
- AS2( xor esi, z ) \
- AS2( and esi, x ) \
- AS2( lea w, [ebp + w + data] ) \
- AS2( xor esi, z ) \
- AS2( add w, esi ) \
- AS2( mov esi, x ) \
- AS2( rol w, s ) \
- AS2( mov ebp, [edi + index * 4] ) \
- AS2( add w, x )
-
-#define MD5STEP2(w, x, y, z, index, data, s) \
- AS2( xor esi, x ) \
- AS2( and esi, z ) \
- AS2( lea w, [ebp + w + data] ) \
- AS2( xor esi, y ) \
- AS2( add w, esi ) \
- AS2( mov esi, x ) \
- AS2( rol w, s ) \
- AS2( mov ebp, [edi + index * 4] ) \
- AS2( add w, x )
-
-
-#define MD5STEP3(w, x, y, z, index, data, s) \
- AS2( xor esi, z ) \
- AS2( lea w, [ebp + w + data] ) \
- AS2( xor esi, x ) \
- AS2( add w, esi ) \
- AS2( mov esi, x ) \
- AS2( rol w, s ) \
- AS2( mov ebp, [edi + index * 4] ) \
- AS2( add w, x )
-
-
-#define MD5STEP4(w, x, y, z, index, data, s) \
- AS2( or esi, x ) \
- AS2( lea w, [ebp + w + data] ) \
- AS2( xor esi, y ) \
- AS2( add w, esi ) \
- AS2( mov esi, y ) \
- AS2( rol w, s ) \
- AS1( not esi ) \
- AS2( mov ebp, [edi + index * 4] ) \
- AS2( add w, x )
-
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void MD5::AsmTransform(const byte* data, word32 times)
-{
-#ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;"
- #define EPILOG() \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "c" (this), "D" (data), "a" (times) \
- : "%esi", "%edx", "memory", "cc" \
- );
-
-#else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( movd mm5, esi ) \
- AS2( movd mm6, ebp ) \
- AS2( mov edi, DWORD PTR [ebp + 8] ) \
- AS2( mov eax, DWORD PTR [ebp + 12] )
-
- #define EPILOG() \
- AS2( movd ebp, mm6 ) \
- AS2( movd esi, mm5 ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd edi, mm3 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 8 )
-
-#endif
-
-
- PROLOG()
-
- AS2( mov esi, ecx )
-
- #ifdef OLD_GCC_OFFSET
- AS2( add esi, 20 ) // digest_[0]
- #else
- AS2( add esi, 16 ) // digest_[0]
- #endif
-
- AS2( movd mm2, eax ) // store times_
- AS2( movd mm1, esi ) // store digest_
-
- AS2( mov eax, [esi] ) // a
- AS2( mov ebx, [esi + 4] ) // b
- AS2( mov ecx, [esi + 8] ) // c
- AS2( mov edx, [esi + 12] ) // d
-
-#ifdef _MSC_VER
- AS1( loopStart: ) // loopStart
-#else
- AS1( 0: ) // loopStart for some gas (need numeric for jump back
-#endif
-
- // set up
- AS2( mov esi, ecx )
- AS2( mov ebp, [edi] )
-
- MD5STEP1( eax, ebx, ecx, edx, 1, 0xd76aa478, 7)
- MD5STEP1( edx, eax, ebx, ecx, 2, 0xe8c7b756, 12)
- MD5STEP1( ecx, edx, eax, ebx, 3, 0x242070db, 17)
- MD5STEP1( ebx, ecx, edx, eax, 4, 0xc1bdceee, 22)
- MD5STEP1( eax, ebx, ecx, edx, 5, 0xf57c0faf, 7)
- MD5STEP1( edx, eax, ebx, ecx, 6, 0x4787c62a, 12)
- MD5STEP1( ecx, edx, eax, ebx, 7, 0xa8304613, 17)
- MD5STEP1( ebx, ecx, edx, eax, 8, 0xfd469501, 22)
- MD5STEP1( eax, ebx, ecx, edx, 9, 0x698098d8, 7)
- MD5STEP1( edx, eax, ebx, ecx, 10, 0x8b44f7af, 12)
- MD5STEP1( ecx, edx, eax, ebx, 11, 0xffff5bb1, 17)
- MD5STEP1( ebx, ecx, edx, eax, 12, 0x895cd7be, 22)
- MD5STEP1( eax, ebx, ecx, edx, 13, 0x6b901122, 7)
- MD5STEP1( edx, eax, ebx, ecx, 14, 0xfd987193, 12)
- MD5STEP1( ecx, edx, eax, ebx, 15, 0xa679438e, 17)
- MD5STEP1( ebx, ecx, edx, eax, 1, 0x49b40821, 22)
-
- MD5STEP2( eax, ebx, ecx, edx, 6, 0xf61e2562, 5)
- MD5STEP2( edx, eax, ebx, ecx, 11, 0xc040b340, 9)
- MD5STEP2( ecx, edx, eax, ebx, 0, 0x265e5a51, 14)
- MD5STEP2( ebx, ecx, edx, eax, 5, 0xe9b6c7aa, 20)
- MD5STEP2( eax, ebx, ecx, edx, 10, 0xd62f105d, 5)
- MD5STEP2( edx, eax, ebx, ecx, 15, 0x02441453, 9)
- MD5STEP2( ecx, edx, eax, ebx, 4, 0xd8a1e681, 14)
- MD5STEP2( ebx, ecx, edx, eax, 9, 0xe7d3fbc8, 20)
- MD5STEP2( eax, ebx, ecx, edx, 14, 0x21e1cde6, 5)
- MD5STEP2( edx, eax, ebx, ecx, 3, 0xc33707d6, 9)
- MD5STEP2( ecx, edx, eax, ebx, 8, 0xf4d50d87, 14)
- MD5STEP2( ebx, ecx, edx, eax, 13, 0x455a14ed, 20)
- MD5STEP2( eax, ebx, ecx, edx, 2, 0xa9e3e905, 5)
- MD5STEP2( edx, eax, ebx, ecx, 7, 0xfcefa3f8, 9)
- MD5STEP2( ecx, edx, eax, ebx, 12, 0x676f02d9, 14)
- MD5STEP2( ebx, ecx, edx, eax, 5, 0x8d2a4c8a, 20)
-
- MD5STEP3( eax, ebx, ecx, edx, 8, 0xfffa3942, 4)
- MD5STEP3( edx, eax, ebx, ecx, 11, 0x8771f681, 11)
- MD5STEP3( ecx, edx, eax, ebx, 14, 0x6d9d6122, 16)
- MD5STEP3( ebx, ecx, edx, eax, 1, 0xfde5380c, 23)
- MD5STEP3( eax, ebx, ecx, edx, 4, 0xa4beea44, 4)
- MD5STEP3( edx, eax, ebx, ecx, 7, 0x4bdecfa9, 11)
- MD5STEP3( ecx, edx, eax, ebx, 10, 0xf6bb4b60, 16)
- MD5STEP3( ebx, ecx, edx, eax, 13, 0xbebfbc70, 23)
- MD5STEP3( eax, ebx, ecx, edx, 0, 0x289b7ec6, 4)
- MD5STEP3( edx, eax, ebx, ecx, 3, 0xeaa127fa, 11)
- MD5STEP3( ecx, edx, eax, ebx, 6, 0xd4ef3085, 16)
- MD5STEP3( ebx, ecx, edx, eax, 9, 0x04881d05, 23)
- MD5STEP3( eax, ebx, ecx, edx, 12, 0xd9d4d039, 4)
- MD5STEP3( edx, eax, ebx, ecx, 15, 0xe6db99e5, 11)
- MD5STEP3( ecx, edx, eax, ebx, 2, 0x1fa27cf8, 16)
- MD5STEP3( ebx, ecx, edx, eax, 0, 0xc4ac5665, 23)
-
- // setup
- AS2( mov esi, edx )
- AS1( not esi )
-
- MD5STEP4( eax, ebx, ecx, edx, 7, 0xf4292244, 6)
- MD5STEP4( edx, eax, ebx, ecx, 14, 0x432aff97, 10)
- MD5STEP4( ecx, edx, eax, ebx, 5, 0xab9423a7, 15)
- MD5STEP4( ebx, ecx, edx, eax, 12, 0xfc93a039, 21)
- MD5STEP4( eax, ebx, ecx, edx, 3, 0x655b59c3, 6)
- MD5STEP4( edx, eax, ebx, ecx, 10, 0x8f0ccc92, 10)
- MD5STEP4( ecx, edx, eax, ebx, 1, 0xffeff47d, 15)
- MD5STEP4( ebx, ecx, edx, eax, 8, 0x85845dd1, 21)
- MD5STEP4( eax, ebx, ecx, edx, 15, 0x6fa87e4f, 6)
- MD5STEP4( edx, eax, ebx, ecx, 6, 0xfe2ce6e0, 10)
- MD5STEP4( ecx, edx, eax, ebx, 13, 0xa3014314, 15)
- MD5STEP4( ebx, ecx, edx, eax, 4, 0x4e0811a1, 21)
- MD5STEP4( eax, ebx, ecx, edx, 11, 0xf7537e82, 6)
- MD5STEP4( edx, eax, ebx, ecx, 2, 0xbd3af235, 10)
- MD5STEP4( ecx, edx, eax, ebx, 9, 0x2ad7d2bb, 15)
- MD5STEP4( ebx, ecx, edx, eax, 9, 0xeb86d391, 21)
-
- AS2( movd esi, mm1 ) // digest_
-
- AS2( add [esi], eax ) // write out
- AS2( add [esi + 4], ebx )
- AS2( add [esi + 8], ecx )
- AS2( add [esi + 12], edx )
-
- AS2( add edi, 64 )
-
- AS2( mov eax, [esi] )
- AS2( mov ebx, [esi + 4] )
- AS2( mov ecx, [esi + 8] )
- AS2( mov edx, [esi + 12] )
-
- AS2( movd ebp, mm2 ) // times
- AS1( dec ebp )
- AS2( movd mm2, ebp )
-#ifdef _MSC_VER
- AS1( jnz loopStart ) // loopStart
-#else
- AS1( jnz 0b ) // loopStart
-#endif
-
-
- EPILOG()
-}
-
-
-#endif // DO_MD5_ASM
-
-
-void MD5::Transform()
-{
-#define F1(x, y, z) (z ^ (x & (y ^ z)))
-#define F2(x, y, z) F1(z, x, y)
-#define F3(x, y, z) (x ^ y ^ z)
-#define F4(x, y, z) (y ^ (x | ~z))
-
-#define MD5STEP(f, w, x, y, z, data, s) \
- w = rotlFixed(w + f(x, y, z) + data, s) + x
-
- // Copy context->state[] to working vars
- word32 a = digest_[0];
- word32 b = digest_[1];
- word32 c = digest_[2];
- word32 d = digest_[3];
-
- MD5STEP(F1, a, b, c, d, buffer_[0] + 0xd76aa478, 7);
- MD5STEP(F1, d, a, b, c, buffer_[1] + 0xe8c7b756, 12);
- MD5STEP(F1, c, d, a, b, buffer_[2] + 0x242070db, 17);
- MD5STEP(F1, b, c, d, a, buffer_[3] + 0xc1bdceee, 22);
- MD5STEP(F1, a, b, c, d, buffer_[4] + 0xf57c0faf, 7);
- MD5STEP(F1, d, a, b, c, buffer_[5] + 0x4787c62a, 12);
- MD5STEP(F1, c, d, a, b, buffer_[6] + 0xa8304613, 17);
- MD5STEP(F1, b, c, d, a, buffer_[7] + 0xfd469501, 22);
- MD5STEP(F1, a, b, c, d, buffer_[8] + 0x698098d8, 7);
- MD5STEP(F1, d, a, b, c, buffer_[9] + 0x8b44f7af, 12);
- MD5STEP(F1, c, d, a, b, buffer_[10] + 0xffff5bb1, 17);
- MD5STEP(F1, b, c, d, a, buffer_[11] + 0x895cd7be, 22);
- MD5STEP(F1, a, b, c, d, buffer_[12] + 0x6b901122, 7);
- MD5STEP(F1, d, a, b, c, buffer_[13] + 0xfd987193, 12);
- MD5STEP(F1, c, d, a, b, buffer_[14] + 0xa679438e, 17);
- MD5STEP(F1, b, c, d, a, buffer_[15] + 0x49b40821, 22);
-
- MD5STEP(F2, a, b, c, d, buffer_[1] + 0xf61e2562, 5);
- MD5STEP(F2, d, a, b, c, buffer_[6] + 0xc040b340, 9);
- MD5STEP(F2, c, d, a, b, buffer_[11] + 0x265e5a51, 14);
- MD5STEP(F2, b, c, d, a, buffer_[0] + 0xe9b6c7aa, 20);
- MD5STEP(F2, a, b, c, d, buffer_[5] + 0xd62f105d, 5);
- MD5STEP(F2, d, a, b, c, buffer_[10] + 0x02441453, 9);
- MD5STEP(F2, c, d, a, b, buffer_[15] + 0xd8a1e681, 14);
- MD5STEP(F2, b, c, d, a, buffer_[4] + 0xe7d3fbc8, 20);
- MD5STEP(F2, a, b, c, d, buffer_[9] + 0x21e1cde6, 5);
- MD5STEP(F2, d, a, b, c, buffer_[14] + 0xc33707d6, 9);
- MD5STEP(F2, c, d, a, b, buffer_[3] + 0xf4d50d87, 14);
- MD5STEP(F2, b, c, d, a, buffer_[8] + 0x455a14ed, 20);
- MD5STEP(F2, a, b, c, d, buffer_[13] + 0xa9e3e905, 5);
- MD5STEP(F2, d, a, b, c, buffer_[2] + 0xfcefa3f8, 9);
- MD5STEP(F2, c, d, a, b, buffer_[7] + 0x676f02d9, 14);
- MD5STEP(F2, b, c, d, a, buffer_[12] + 0x8d2a4c8a, 20);
-
- MD5STEP(F3, a, b, c, d, buffer_[5] + 0xfffa3942, 4);
- MD5STEP(F3, d, a, b, c, buffer_[8] + 0x8771f681, 11);
- MD5STEP(F3, c, d, a, b, buffer_[11] + 0x6d9d6122, 16);
- MD5STEP(F3, b, c, d, a, buffer_[14] + 0xfde5380c, 23);
- MD5STEP(F3, a, b, c, d, buffer_[1] + 0xa4beea44, 4);
- MD5STEP(F3, d, a, b, c, buffer_[4] + 0x4bdecfa9, 11);
- MD5STEP(F3, c, d, a, b, buffer_[7] + 0xf6bb4b60, 16);
- MD5STEP(F3, b, c, d, a, buffer_[10] + 0xbebfbc70, 23);
- MD5STEP(F3, a, b, c, d, buffer_[13] + 0x289b7ec6, 4);
- MD5STEP(F3, d, a, b, c, buffer_[0] + 0xeaa127fa, 11);
- MD5STEP(F3, c, d, a, b, buffer_[3] + 0xd4ef3085, 16);
- MD5STEP(F3, b, c, d, a, buffer_[6] + 0x04881d05, 23);
- MD5STEP(F3, a, b, c, d, buffer_[9] + 0xd9d4d039, 4);
- MD5STEP(F3, d, a, b, c, buffer_[12] + 0xe6db99e5, 11);
- MD5STEP(F3, c, d, a, b, buffer_[15] + 0x1fa27cf8, 16);
- MD5STEP(F3, b, c, d, a, buffer_[2] + 0xc4ac5665, 23);
-
- MD5STEP(F4, a, b, c, d, buffer_[0] + 0xf4292244, 6);
- MD5STEP(F4, d, a, b, c, buffer_[7] + 0x432aff97, 10);
- MD5STEP(F4, c, d, a, b, buffer_[14] + 0xab9423a7, 15);
- MD5STEP(F4, b, c, d, a, buffer_[5] + 0xfc93a039, 21);
- MD5STEP(F4, a, b, c, d, buffer_[12] + 0x655b59c3, 6);
- MD5STEP(F4, d, a, b, c, buffer_[3] + 0x8f0ccc92, 10);
- MD5STEP(F4, c, d, a, b, buffer_[10] + 0xffeff47d, 15);
- MD5STEP(F4, b, c, d, a, buffer_[1] + 0x85845dd1, 21);
- MD5STEP(F4, a, b, c, d, buffer_[8] + 0x6fa87e4f, 6);
- MD5STEP(F4, d, a, b, c, buffer_[15] + 0xfe2ce6e0, 10);
- MD5STEP(F4, c, d, a, b, buffer_[6] + 0xa3014314, 15);
- MD5STEP(F4, b, c, d, a, buffer_[13] + 0x4e0811a1, 21);
- MD5STEP(F4, a, b, c, d, buffer_[4] + 0xf7537e82, 6);
- MD5STEP(F4, d, a, b, c, buffer_[11] + 0xbd3af235, 10);
- MD5STEP(F4, c, d, a, b, buffer_[2] + 0x2ad7d2bb, 15);
- MD5STEP(F4, b, c, d, a, buffer_[9] + 0xeb86d391, 21);
-
- // Add the working vars back into digest state[]
- digest_[0] += a;
- digest_[1] += b;
- digest_[2] += c;
- digest_[3] += d;
-
- // Wipe variables
- a = b = c = d = 0;
-}
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/misc.cpp b/extra/yassl/taocrypt/src/misc.cpp
deleted file mode 100644
index 41249bcf373..00000000000
--- a/extra/yassl/taocrypt/src/misc.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- Copyright (c) 2005, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's misc.cpp from CryptoPP */
-
-
-#include "runtime.hpp"
-#include "misc.hpp"
-
-
-#ifdef __GNUC__
- #include <signal.h>
- #include <setjmp.h>
-#endif
-
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-namespace STL = STL_NAMESPACE;
-
-
-#ifdef YASSL_PURE_C
-
- void* operator new(size_t sz, TaoCrypt::new_t)
- {
- void* ptr = malloc(sz ? sz : 1);
- if (!ptr) abort();
-
- return ptr;
- }
-
-
- void operator delete(void* ptr, TaoCrypt::new_t)
- {
- if (ptr) free(ptr);
- }
-
-
- void* operator new[](size_t sz, TaoCrypt::new_t nt)
- {
- return ::operator new(sz, nt);
- }
-
-
- void operator delete[](void* ptr, TaoCrypt::new_t nt)
- {
- ::operator delete(ptr, nt);
- }
-
-
- /* uncomment to test
- // make sure not using globals anywhere by forgetting to use overloaded
- void* operator new(size_t sz);
-
- void operator delete(void* ptr);
-
- void* operator new[](size_t sz);
-
- void operator delete[](void* ptr);
- */
-
-
- namespace TaoCrypt {
-
- new_t tc; // for library new
-
- }
-
-#if defined(__ICC) || defined(__INTEL_COMPILER)
-
-extern "C" {
-
- int __cxa_pure_virtual() {
- return 0;
- }
-
-} // extern "C"
-
-#endif
-
-#endif // YASSL_PURE_C
-
-
-namespace TaoCrypt {
-
-
-inline void XorWords(word* r, const word* a, unsigned int n)
-{
- for (unsigned int i=0; i<n; i++)
- r[i] ^= a[i];
-}
-
-
-void xorbuf(byte* buf, const byte* mask, unsigned int count)
-{
- if (((size_t)buf | (size_t)mask | count) % WORD_SIZE == 0)
- XorWords((word *)buf, (const word *)mask, count/WORD_SIZE);
- else
- {
- for (unsigned int i=0; i<count; i++)
- buf[i] ^= mask[i];
- }
-}
-
-
-unsigned int BytePrecision(word value)
-{
- unsigned int i;
- for (i=sizeof(value); i; --i)
- if (value >> (i-1)*8)
- break;
-
- return i;
-}
-
-
-unsigned int BitPrecision(word value)
-{
- if (!value)
- return 0;
-
- unsigned int l = 0,
- h = 8 * sizeof(value);
-
- while (h-l > 1)
- {
- unsigned int t = (l+h)/2;
- if (value >> t)
- l = t;
- else
- h = t;
- }
-
- return h;
-}
-
-
-word Crop(word value, unsigned int size)
-{
- if (size < 8*sizeof(value))
- return (value & ((1L << size) - 1));
- else
- return value;
-}
-
-
-
-#ifdef TAOCRYPT_X86ASM_AVAILABLE
-
-#ifdef NOT_USED
-#ifndef _MSC_VER
- static jmp_buf s_env;
- static void SigIllHandler(int)
- {
- longjmp(s_env, 1);
- }
-#endif
-#endif
-
-bool HaveCpuId()
-{
-#ifdef _MSC_VER
- __try
- {
- __asm
- {
- mov eax, 0
- cpuid
- }
- }
- __except (1)
- {
- return false;
- }
- return true;
-#else
- word32 eax, ebx;
- __asm__ __volatile
- (
- /* Put EFLAGS in eax and ebx */
- "pushf;"
- "pushf;"
- "pop %0;"
- "movl %0,%1;"
-
- /* Flip the cpuid bit and store back in EFLAGS */
- "xorl $0x200000,%0;"
- "push %0;"
- "popf;"
-
- /* Read EFLAGS again */
- "pushf;"
- "pop %0;"
- "popf"
- : "=r" (eax), "=r" (ebx)
- :
- : "cc"
- );
-
- if (eax == ebx)
- return false;
- return true;
-#endif
-}
-
-
-void CpuId(word32 input, word32 *output)
-{
-#ifdef __GNUC__
- __asm__
- (
- // save ebx in case -fPIC is being used
- "push %%ebx; cpuid; mov %%ebx, %%edi; pop %%ebx"
- : "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d"(output[3])
- : "a" (input)
- );
-#else
- __asm
- {
- mov eax, input
- cpuid
- mov edi, output
- mov [edi], eax
- mov [edi+4], ebx
- mov [edi+8], ecx
- mov [edi+12], edx
- }
-#endif
-}
-
-
-bool IsPentium()
-{
- if (!HaveCpuId())
- return false;
-
- word32 cpuid[4];
-
- CpuId(0, cpuid);
- STL::swap(cpuid[2], cpuid[3]);
- if (memcmp(cpuid+1, "GenuineIntel", 12) != 0)
- return false;
-
- CpuId(1, cpuid);
- byte family = ((cpuid[0] >> 8) & 0xf);
- if (family < 5)
- return false;
-
- return true;
-}
-
-
-
-static bool IsMmx()
-{
- if (!IsPentium())
- return false;
-
- word32 cpuid[4];
-
- CpuId(1, cpuid);
- if ((cpuid[3] & (1 << 23)) == 0)
- return false;
-
- return true;
-}
-
-
-bool isMMX = IsMmx();
-
-
-#endif // TAOCRYPT_X86ASM_AVAILABLE
-
-
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/rabbit.cpp b/extra/yassl/taocrypt/src/rabbit.cpp
deleted file mode 100644
index d0d4b0ef3ba..00000000000
--- a/extra/yassl/taocrypt/src/rabbit.cpp
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-#include "runtime.hpp"
-#include "rabbit.hpp"
-
-
-
-namespace TaoCrypt {
-
-
-#define U32V(x) (word32)(x)
-
-
-#ifdef BIG_ENDIAN_ORDER
- #define LITTLE32(x) ByteReverse((word32)x)
-#else
- #define LITTLE32(x) (x)
-#endif
-
-
-// local
-namespace {
-
-
-/* Square a 32-bit unsigned integer to obtain the 64-bit result and return */
-/* the upper 32 bits XOR the lower 32 bits */
-word32 RABBIT_g_func(word32 x)
-{
- /* Temporary variables */
- word32 a, b, h, l;
-
- /* Construct high and low argument for squaring */
- a = x&0xFFFF;
- b = x>>16;
-
- /* Calculate high and low result of squaring */
- h = (((U32V(a*a)>>17) + U32V(a*b))>>15) + b*b;
- l = x*x;
-
- /* Return high XOR low */
- return U32V(h^l);
-}
-
-
-} // namespace local
-
-
-/* Calculate the next internal state */
-void Rabbit::NextState(RabbitCtx which)
-{
- /* Temporary variables */
- word32 g[8], c_old[8], i;
-
- Ctx* ctx;
-
- if (which == Master)
- ctx = &masterCtx_;
- else
- ctx = &workCtx_;
-
- /* Save old counter values */
- for (i=0; i<8; i++)
- c_old[i] = ctx->c[i];
-
- /* Calculate new counter values */
- ctx->c[0] = U32V(ctx->c[0] + 0x4D34D34D + ctx->carry);
- ctx->c[1] = U32V(ctx->c[1] + 0xD34D34D3 + (ctx->c[0] < c_old[0]));
- ctx->c[2] = U32V(ctx->c[2] + 0x34D34D34 + (ctx->c[1] < c_old[1]));
- ctx->c[3] = U32V(ctx->c[3] + 0x4D34D34D + (ctx->c[2] < c_old[2]));
- ctx->c[4] = U32V(ctx->c[4] + 0xD34D34D3 + (ctx->c[3] < c_old[3]));
- ctx->c[5] = U32V(ctx->c[5] + 0x34D34D34 + (ctx->c[4] < c_old[4]));
- ctx->c[6] = U32V(ctx->c[6] + 0x4D34D34D + (ctx->c[5] < c_old[5]));
- ctx->c[7] = U32V(ctx->c[7] + 0xD34D34D3 + (ctx->c[6] < c_old[6]));
- ctx->carry = (ctx->c[7] < c_old[7]);
-
- /* Calculate the g-values */
- for (i=0;i<8;i++)
- g[i] = RABBIT_g_func(U32V(ctx->x[i] + ctx->c[i]));
-
- /* Calculate new state values */
- ctx->x[0] = U32V(g[0] + rotlFixed(g[7],16) + rotlFixed(g[6], 16));
- ctx->x[1] = U32V(g[1] + rotlFixed(g[0], 8) + g[7]);
- ctx->x[2] = U32V(g[2] + rotlFixed(g[1],16) + rotlFixed(g[0], 16));
- ctx->x[3] = U32V(g[3] + rotlFixed(g[2], 8) + g[1]);
- ctx->x[4] = U32V(g[4] + rotlFixed(g[3],16) + rotlFixed(g[2], 16));
- ctx->x[5] = U32V(g[5] + rotlFixed(g[4], 8) + g[3]);
- ctx->x[6] = U32V(g[6] + rotlFixed(g[5],16) + rotlFixed(g[4], 16));
- ctx->x[7] = U32V(g[7] + rotlFixed(g[6], 8) + g[5]);
-}
-
-
-/* IV setup */
-void Rabbit::SetIV(const byte* iv)
-{
- /* Temporary variables */
- word32 i0, i1, i2, i3, i;
-
- /* Generate four subvectors */
- i0 = LITTLE32(*(word32*)(iv+0));
- i2 = LITTLE32(*(word32*)(iv+4));
- i1 = (i0>>16) | (i2&0xFFFF0000);
- i3 = (i2<<16) | (i0&0x0000FFFF);
-
- /* Modify counter values */
- workCtx_.c[0] = masterCtx_.c[0] ^ i0;
- workCtx_.c[1] = masterCtx_.c[1] ^ i1;
- workCtx_.c[2] = masterCtx_.c[2] ^ i2;
- workCtx_.c[3] = masterCtx_.c[3] ^ i3;
- workCtx_.c[4] = masterCtx_.c[4] ^ i0;
- workCtx_.c[5] = masterCtx_.c[5] ^ i1;
- workCtx_.c[6] = masterCtx_.c[6] ^ i2;
- workCtx_.c[7] = masterCtx_.c[7] ^ i3;
-
- /* Copy state variables */
- for (i=0; i<8; i++)
- workCtx_.x[i] = masterCtx_.x[i];
- workCtx_.carry = masterCtx_.carry;
-
- /* Iterate the system four times */
- for (i=0; i<4; i++)
- NextState(Work);
-}
-
-
-/* Key setup */
-void Rabbit::SetKey(const byte* key, const byte* iv)
-{
- /* Temporary variables */
- word32 k0, k1, k2, k3, i;
-
- /* Generate four subkeys */
- k0 = LITTLE32(*(word32*)(key+ 0));
- k1 = LITTLE32(*(word32*)(key+ 4));
- k2 = LITTLE32(*(word32*)(key+ 8));
- k3 = LITTLE32(*(word32*)(key+12));
-
- /* Generate initial state variables */
- masterCtx_.x[0] = k0;
- masterCtx_.x[2] = k1;
- masterCtx_.x[4] = k2;
- masterCtx_.x[6] = k3;
- masterCtx_.x[1] = U32V(k3<<16) | (k2>>16);
- masterCtx_.x[3] = U32V(k0<<16) | (k3>>16);
- masterCtx_.x[5] = U32V(k1<<16) | (k0>>16);
- masterCtx_.x[7] = U32V(k2<<16) | (k1>>16);
-
- /* Generate initial counter values */
- masterCtx_.c[0] = rotlFixed(k2, 16);
- masterCtx_.c[2] = rotlFixed(k3, 16);
- masterCtx_.c[4] = rotlFixed(k0, 16);
- masterCtx_.c[6] = rotlFixed(k1, 16);
- masterCtx_.c[1] = (k0&0xFFFF0000) | (k1&0xFFFF);
- masterCtx_.c[3] = (k1&0xFFFF0000) | (k2&0xFFFF);
- masterCtx_.c[5] = (k2&0xFFFF0000) | (k3&0xFFFF);
- masterCtx_.c[7] = (k3&0xFFFF0000) | (k0&0xFFFF);
-
- /* Clear carry bit */
- masterCtx_.carry = 0;
-
- /* Iterate the system four times */
- for (i=0; i<4; i++)
- NextState(Master);
-
- /* Modify the counters */
- for (i=0; i<8; i++)
- masterCtx_.c[i] ^= masterCtx_.x[(i+4)&0x7];
-
- /* Copy master instance to work instance */
- for (i=0; i<8; i++) {
- workCtx_.x[i] = masterCtx_.x[i];
- workCtx_.c[i] = masterCtx_.c[i];
- }
- workCtx_.carry = masterCtx_.carry;
-
- if (iv) SetIV(iv);
-}
-
-
-/* Encrypt/decrypt a message of any size */
-void Rabbit::Process(byte* output, const byte* input, word32 msglen)
-{
- /* Temporary variables */
- word32 i;
-
- /* Encrypt/decrypt all full blocks */
- while (msglen >= 16) {
- /* Iterate the system */
- NextState(Work);
-
- /* Encrypt/decrypt 16 bytes of data */
- *(word32*)(output+ 0) = *(word32*)(input+ 0) ^
- LITTLE32(workCtx_.x[0] ^ (workCtx_.x[5]>>16) ^
- U32V(workCtx_.x[3]<<16));
- *(word32*)(output+ 4) = *(word32*)(input+ 4) ^
- LITTLE32(workCtx_.x[2] ^ (workCtx_.x[7]>>16) ^
- U32V(workCtx_.x[5]<<16));
- *(word32*)(output+ 8) = *(word32*)(input+ 8) ^
- LITTLE32(workCtx_.x[4] ^ (workCtx_.x[1]>>16) ^
- U32V(workCtx_.x[7]<<16));
- *(word32*)(output+12) = *(word32*)(input+12) ^
- LITTLE32(workCtx_.x[6] ^ (workCtx_.x[3]>>16) ^
- U32V(workCtx_.x[1]<<16));
-
- /* Increment pointers and decrement length */
- input += 16;
- output += 16;
- msglen -= 16;
- }
-
- /* Encrypt/decrypt remaining data */
- if (msglen) {
-
- word32 tmp[4];
- byte* buffer = (byte*)tmp;
-
- memset(tmp, 0, sizeof(tmp)); /* help static analysis */
-
- /* Iterate the system */
- NextState(Work);
-
- /* Generate 16 bytes of pseudo-random data */
- tmp[0] = LITTLE32(workCtx_.x[0] ^
- (workCtx_.x[5]>>16) ^ U32V(workCtx_.x[3]<<16));
- tmp[1] = LITTLE32(workCtx_.x[2] ^
- (workCtx_.x[7]>>16) ^ U32V(workCtx_.x[5]<<16));
- tmp[2] = LITTLE32(workCtx_.x[4] ^
- (workCtx_.x[1]>>16) ^ U32V(workCtx_.x[7]<<16));
- tmp[3] = LITTLE32(workCtx_.x[6] ^
- (workCtx_.x[3]>>16) ^ U32V(workCtx_.x[1]<<16));
-
- /* Encrypt/decrypt the data */
- for (i=0; i<msglen; i++)
- output[i] = input[i] ^ buffer[i];
- }
-}
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/random.cpp b/extra/yassl/taocrypt/src/random.cpp
deleted file mode 100644
index 6bca7eaa933..00000000000
--- a/extra/yassl/taocrypt/src/random.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* random.cpp implements a crypto secure Random Number Generator using an OS
- specific seed, switch to /dev/random for more security but may block
-*/
-
-#include "runtime.hpp"
-#include "random.hpp"
-#include <string.h>
-#include <time.h>
-
-#if defined(_WIN32)
- #include <windows.h>
- #include <wincrypt.h>
-#else
- #include <errno.h>
- #include <fcntl.h>
- #include <unistd.h>
-#endif // _WIN32
-
-namespace TaoCrypt {
-
-
-// Get seed and key cipher
-RandomNumberGenerator::RandomNumberGenerator()
-{
- byte key[32];
- byte junk[256];
-
- seed_.GenerateSeed(key, sizeof(key));
- cipher_.SetKey(key, sizeof(key));
- GenerateBlock(junk, sizeof(junk)); // rid initial state
-}
-
-
-// place a generated block in output
-void RandomNumberGenerator::GenerateBlock(byte* output, word32 sz)
-{
- memset(output, 0, sz);
- cipher_.Process(output, output, sz);
-}
-
-
-byte RandomNumberGenerator::GenerateByte()
-{
- byte b;
- GenerateBlock(&b, 1);
-
- return b;
-}
-
-
-#if defined(_WIN32)
-
-/* The OS_Seed implementation for windows */
-
-OS_Seed::OS_Seed()
-{
- if(!CryptAcquireContext(&handle_, 0, 0, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT))
- error_.SetError(WINCRYPT_E);
-}
-
-
-OS_Seed::~OS_Seed()
-{
- CryptReleaseContext(handle_, 0);
-}
-
-
-void OS_Seed::GenerateSeed(byte* output, word32 sz)
-{
- if (!CryptGenRandom(handle_, sz, output))
- error_.SetError(CRYPTGEN_E);
-}
-
-
-#else
-
-/* The default OS_Seed implementation */
-
-OS_Seed::OS_Seed()
-{
- fd_ = open("/dev/urandom",O_RDONLY);
- if (fd_ == -1) {
- fd_ = open("/dev/random",O_RDONLY);
- if (fd_ == -1)
- error_.SetError(OPEN_RAN_E);
- }
-}
-
-
-OS_Seed::~OS_Seed()
-{
- close(fd_);
-}
-
-
-// may block
-void OS_Seed::GenerateSeed(byte* output, word32 sz)
-{
- while (sz) {
- int len = read(fd_, output, sz);
- if (len == -1) {
- error_.SetError(READ_RAN_E);
- return;
- }
-
- sz -= len;
- output += len;
-
- if (sz)
- sleep(1);
- }
-}
-
-#endif // _WIN32
-
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/ripemd.cpp b/extra/yassl/taocrypt/src/ripemd.cpp
deleted file mode 100644
index 04b8f82ffcc..00000000000
--- a/extra/yassl/taocrypt/src/ripemd.cpp
+++ /dev/null
@@ -1,844 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-
-/* based on Wei Dai's ripemd.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "ripemd.hpp"
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-
-namespace TaoCrypt {
-
-void RIPEMD160::Init()
-{
- digest_[0] = 0x67452301L;
- digest_[1] = 0xefcdab89L;
- digest_[2] = 0x98badcfeL;
- digest_[3] = 0x10325476L;
- digest_[4] = 0xc3d2e1f0L;
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-
-RIPEMD160::RIPEMD160(const RIPEMD160& that)
- : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-
-RIPEMD160& RIPEMD160::operator= (const RIPEMD160& that)
-{
- RIPEMD160 tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-
-void RIPEMD160::Swap(RIPEMD160& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-
-#ifdef DO_RIPEMD_ASM
-
-// Update digest with data of size len
-void RIPEMD160::Update(const byte* data, word32 len)
-{
- if (!isMMX) {
- HASHwithTransform::Update(data, len);
- return;
- }
-
- byte* local = reinterpret_cast<byte*>(buffer_);
-
- // remove buffered data if possible
- if (buffLen_) {
- word32 add = min(len, BLOCK_SIZE - buffLen_);
- memcpy(&local[buffLen_], data, add);
-
- buffLen_ += add;
- data += add;
- len -= add;
-
- if (buffLen_ == BLOCK_SIZE) {
- Transform();
- AddLength(BLOCK_SIZE);
- buffLen_ = 0;
- }
- }
-
- // all at once for asm
- if (buffLen_ == 0) {
- word32 times = len / BLOCK_SIZE;
- if (times) {
- AsmTransform(data, times);
- const word32 add = BLOCK_SIZE * times;
- AddLength(add);
- len -= add;
- data += add;
- }
- }
-
- // cache any data left
- if (len) {
- memcpy(&local[buffLen_], data, len);
- buffLen_ += len;
- }
-}
-
-#endif // DO_RIPEMD_ASM
-
-
-// for all
-#define F(x, y, z) (x ^ y ^ z)
-#define G(x, y, z) (z ^ (x & (y^z)))
-#define H(x, y, z) (z ^ (x | ~y))
-#define I(x, y, z) (y ^ (z & (x^y)))
-#define J(x, y, z) (x ^ (y | ~z))
-
-#define k0 0
-#define k1 0x5a827999
-#define k2 0x6ed9eba1
-#define k3 0x8f1bbcdc
-#define k4 0xa953fd4e
-#define k5 0x50a28be6
-#define k6 0x5c4dd124
-#define k7 0x6d703ef3
-#define k8 0x7a6d76e9
-#define k9 0
-
-// for 160 and 320
-#define Subround(f, a, b, c, d, e, x, s, k) \
- a += f(b, c, d) + x + k;\
- a = rotlFixed((word32)a, s) + e;\
- c = rotlFixed((word32)c, 10U)
-
-
-void RIPEMD160::Transform()
-{
- unsigned long a1, b1, c1, d1, e1, a2, b2, c2, d2, e2;
- a1 = a2 = digest_[0];
- b1 = b2 = digest_[1];
- c1 = c2 = digest_[2];
- d1 = d2 = digest_[3];
- e1 = e2 = digest_[4];
-
- Subround(F, a1, b1, c1, d1, e1, buffer_[ 0], 11, k0);
- Subround(F, e1, a1, b1, c1, d1, buffer_[ 1], 14, k0);
- Subround(F, d1, e1, a1, b1, c1, buffer_[ 2], 15, k0);
- Subround(F, c1, d1, e1, a1, b1, buffer_[ 3], 12, k0);
- Subround(F, b1, c1, d1, e1, a1, buffer_[ 4], 5, k0);
- Subround(F, a1, b1, c1, d1, e1, buffer_[ 5], 8, k0);
- Subround(F, e1, a1, b1, c1, d1, buffer_[ 6], 7, k0);
- Subround(F, d1, e1, a1, b1, c1, buffer_[ 7], 9, k0);
- Subround(F, c1, d1, e1, a1, b1, buffer_[ 8], 11, k0);
- Subround(F, b1, c1, d1, e1, a1, buffer_[ 9], 13, k0);
- Subround(F, a1, b1, c1, d1, e1, buffer_[10], 14, k0);
- Subround(F, e1, a1, b1, c1, d1, buffer_[11], 15, k0);
- Subround(F, d1, e1, a1, b1, c1, buffer_[12], 6, k0);
- Subround(F, c1, d1, e1, a1, b1, buffer_[13], 7, k0);
- Subround(F, b1, c1, d1, e1, a1, buffer_[14], 9, k0);
- Subround(F, a1, b1, c1, d1, e1, buffer_[15], 8, k0);
-
- Subround(G, e1, a1, b1, c1, d1, buffer_[ 7], 7, k1);
- Subround(G, d1, e1, a1, b1, c1, buffer_[ 4], 6, k1);
- Subround(G, c1, d1, e1, a1, b1, buffer_[13], 8, k1);
- Subround(G, b1, c1, d1, e1, a1, buffer_[ 1], 13, k1);
- Subround(G, a1, b1, c1, d1, e1, buffer_[10], 11, k1);
- Subround(G, e1, a1, b1, c1, d1, buffer_[ 6], 9, k1);
- Subround(G, d1, e1, a1, b1, c1, buffer_[15], 7, k1);
- Subround(G, c1, d1, e1, a1, b1, buffer_[ 3], 15, k1);
- Subround(G, b1, c1, d1, e1, a1, buffer_[12], 7, k1);
- Subround(G, a1, b1, c1, d1, e1, buffer_[ 0], 12, k1);
- Subround(G, e1, a1, b1, c1, d1, buffer_[ 9], 15, k1);
- Subround(G, d1, e1, a1, b1, c1, buffer_[ 5], 9, k1);
- Subround(G, c1, d1, e1, a1, b1, buffer_[ 2], 11, k1);
- Subround(G, b1, c1, d1, e1, a1, buffer_[14], 7, k1);
- Subround(G, a1, b1, c1, d1, e1, buffer_[11], 13, k1);
- Subround(G, e1, a1, b1, c1, d1, buffer_[ 8], 12, k1);
-
- Subround(H, d1, e1, a1, b1, c1, buffer_[ 3], 11, k2);
- Subround(H, c1, d1, e1, a1, b1, buffer_[10], 13, k2);
- Subround(H, b1, c1, d1, e1, a1, buffer_[14], 6, k2);
- Subround(H, a1, b1, c1, d1, e1, buffer_[ 4], 7, k2);
- Subround(H, e1, a1, b1, c1, d1, buffer_[ 9], 14, k2);
- Subround(H, d1, e1, a1, b1, c1, buffer_[15], 9, k2);
- Subround(H, c1, d1, e1, a1, b1, buffer_[ 8], 13, k2);
- Subround(H, b1, c1, d1, e1, a1, buffer_[ 1], 15, k2);
- Subround(H, a1, b1, c1, d1, e1, buffer_[ 2], 14, k2);
- Subround(H, e1, a1, b1, c1, d1, buffer_[ 7], 8, k2);
- Subround(H, d1, e1, a1, b1, c1, buffer_[ 0], 13, k2);
- Subround(H, c1, d1, e1, a1, b1, buffer_[ 6], 6, k2);
- Subround(H, b1, c1, d1, e1, a1, buffer_[13], 5, k2);
- Subround(H, a1, b1, c1, d1, e1, buffer_[11], 12, k2);
- Subround(H, e1, a1, b1, c1, d1, buffer_[ 5], 7, k2);
- Subround(H, d1, e1, a1, b1, c1, buffer_[12], 5, k2);
-
- Subround(I, c1, d1, e1, a1, b1, buffer_[ 1], 11, k3);
- Subround(I, b1, c1, d1, e1, a1, buffer_[ 9], 12, k3);
- Subround(I, a1, b1, c1, d1, e1, buffer_[11], 14, k3);
- Subround(I, e1, a1, b1, c1, d1, buffer_[10], 15, k3);
- Subround(I, d1, e1, a1, b1, c1, buffer_[ 0], 14, k3);
- Subround(I, c1, d1, e1, a1, b1, buffer_[ 8], 15, k3);
- Subround(I, b1, c1, d1, e1, a1, buffer_[12], 9, k3);
- Subround(I, a1, b1, c1, d1, e1, buffer_[ 4], 8, k3);
- Subround(I, e1, a1, b1, c1, d1, buffer_[13], 9, k3);
- Subround(I, d1, e1, a1, b1, c1, buffer_[ 3], 14, k3);
- Subround(I, c1, d1, e1, a1, b1, buffer_[ 7], 5, k3);
- Subround(I, b1, c1, d1, e1, a1, buffer_[15], 6, k3);
- Subround(I, a1, b1, c1, d1, e1, buffer_[14], 8, k3);
- Subround(I, e1, a1, b1, c1, d1, buffer_[ 5], 6, k3);
- Subround(I, d1, e1, a1, b1, c1, buffer_[ 6], 5, k3);
- Subround(I, c1, d1, e1, a1, b1, buffer_[ 2], 12, k3);
-
- Subround(J, b1, c1, d1, e1, a1, buffer_[ 4], 9, k4);
- Subround(J, a1, b1, c1, d1, e1, buffer_[ 0], 15, k4);
- Subround(J, e1, a1, b1, c1, d1, buffer_[ 5], 5, k4);
- Subround(J, d1, e1, a1, b1, c1, buffer_[ 9], 11, k4);
- Subround(J, c1, d1, e1, a1, b1, buffer_[ 7], 6, k4);
- Subround(J, b1, c1, d1, e1, a1, buffer_[12], 8, k4);
- Subround(J, a1, b1, c1, d1, e1, buffer_[ 2], 13, k4);
- Subround(J, e1, a1, b1, c1, d1, buffer_[10], 12, k4);
- Subround(J, d1, e1, a1, b1, c1, buffer_[14], 5, k4);
- Subround(J, c1, d1, e1, a1, b1, buffer_[ 1], 12, k4);
- Subround(J, b1, c1, d1, e1, a1, buffer_[ 3], 13, k4);
- Subround(J, a1, b1, c1, d1, e1, buffer_[ 8], 14, k4);
- Subround(J, e1, a1, b1, c1, d1, buffer_[11], 11, k4);
- Subround(J, d1, e1, a1, b1, c1, buffer_[ 6], 8, k4);
- Subround(J, c1, d1, e1, a1, b1, buffer_[15], 5, k4);
- Subround(J, b1, c1, d1, e1, a1, buffer_[13], 6, k4);
-
- Subround(J, a2, b2, c2, d2, e2, buffer_[ 5], 8, k5);
- Subround(J, e2, a2, b2, c2, d2, buffer_[14], 9, k5);
- Subround(J, d2, e2, a2, b2, c2, buffer_[ 7], 9, k5);
- Subround(J, c2, d2, e2, a2, b2, buffer_[ 0], 11, k5);
- Subround(J, b2, c2, d2, e2, a2, buffer_[ 9], 13, k5);
- Subround(J, a2, b2, c2, d2, e2, buffer_[ 2], 15, k5);
- Subround(J, e2, a2, b2, c2, d2, buffer_[11], 15, k5);
- Subround(J, d2, e2, a2, b2, c2, buffer_[ 4], 5, k5);
- Subround(J, c2, d2, e2, a2, b2, buffer_[13], 7, k5);
- Subround(J, b2, c2, d2, e2, a2, buffer_[ 6], 7, k5);
- Subround(J, a2, b2, c2, d2, e2, buffer_[15], 8, k5);
- Subround(J, e2, a2, b2, c2, d2, buffer_[ 8], 11, k5);
- Subround(J, d2, e2, a2, b2, c2, buffer_[ 1], 14, k5);
- Subround(J, c2, d2, e2, a2, b2, buffer_[10], 14, k5);
- Subround(J, b2, c2, d2, e2, a2, buffer_[ 3], 12, k5);
- Subround(J, a2, b2, c2, d2, e2, buffer_[12], 6, k5);
-
- Subround(I, e2, a2, b2, c2, d2, buffer_[ 6], 9, k6);
- Subround(I, d2, e2, a2, b2, c2, buffer_[11], 13, k6);
- Subround(I, c2, d2, e2, a2, b2, buffer_[ 3], 15, k6);
- Subround(I, b2, c2, d2, e2, a2, buffer_[ 7], 7, k6);
- Subround(I, a2, b2, c2, d2, e2, buffer_[ 0], 12, k6);
- Subround(I, e2, a2, b2, c2, d2, buffer_[13], 8, k6);
- Subround(I, d2, e2, a2, b2, c2, buffer_[ 5], 9, k6);
- Subround(I, c2, d2, e2, a2, b2, buffer_[10], 11, k6);
- Subround(I, b2, c2, d2, e2, a2, buffer_[14], 7, k6);
- Subround(I, a2, b2, c2, d2, e2, buffer_[15], 7, k6);
- Subround(I, e2, a2, b2, c2, d2, buffer_[ 8], 12, k6);
- Subround(I, d2, e2, a2, b2, c2, buffer_[12], 7, k6);
- Subround(I, c2, d2, e2, a2, b2, buffer_[ 4], 6, k6);
- Subround(I, b2, c2, d2, e2, a2, buffer_[ 9], 15, k6);
- Subround(I, a2, b2, c2, d2, e2, buffer_[ 1], 13, k6);
- Subround(I, e2, a2, b2, c2, d2, buffer_[ 2], 11, k6);
-
- Subround(H, d2, e2, a2, b2, c2, buffer_[15], 9, k7);
- Subround(H, c2, d2, e2, a2, b2, buffer_[ 5], 7, k7);
- Subround(H, b2, c2, d2, e2, a2, buffer_[ 1], 15, k7);
- Subround(H, a2, b2, c2, d2, e2, buffer_[ 3], 11, k7);
- Subround(H, e2, a2, b2, c2, d2, buffer_[ 7], 8, k7);
- Subround(H, d2, e2, a2, b2, c2, buffer_[14], 6, k7);
- Subround(H, c2, d2, e2, a2, b2, buffer_[ 6], 6, k7);
- Subround(H, b2, c2, d2, e2, a2, buffer_[ 9], 14, k7);
- Subround(H, a2, b2, c2, d2, e2, buffer_[11], 12, k7);
- Subround(H, e2, a2, b2, c2, d2, buffer_[ 8], 13, k7);
- Subround(H, d2, e2, a2, b2, c2, buffer_[12], 5, k7);
- Subround(H, c2, d2, e2, a2, b2, buffer_[ 2], 14, k7);
- Subround(H, b2, c2, d2, e2, a2, buffer_[10], 13, k7);
- Subround(H, a2, b2, c2, d2, e2, buffer_[ 0], 13, k7);
- Subround(H, e2, a2, b2, c2, d2, buffer_[ 4], 7, k7);
- Subround(H, d2, e2, a2, b2, c2, buffer_[13], 5, k7);
-
- Subround(G, c2, d2, e2, a2, b2, buffer_[ 8], 15, k8);
- Subround(G, b2, c2, d2, e2, a2, buffer_[ 6], 5, k8);
- Subround(G, a2, b2, c2, d2, e2, buffer_[ 4], 8, k8);
- Subround(G, e2, a2, b2, c2, d2, buffer_[ 1], 11, k8);
- Subround(G, d2, e2, a2, b2, c2, buffer_[ 3], 14, k8);
- Subround(G, c2, d2, e2, a2, b2, buffer_[11], 14, k8);
- Subround(G, b2, c2, d2, e2, a2, buffer_[15], 6, k8);
- Subround(G, a2, b2, c2, d2, e2, buffer_[ 0], 14, k8);
- Subround(G, e2, a2, b2, c2, d2, buffer_[ 5], 6, k8);
- Subround(G, d2, e2, a2, b2, c2, buffer_[12], 9, k8);
- Subround(G, c2, d2, e2, a2, b2, buffer_[ 2], 12, k8);
- Subround(G, b2, c2, d2, e2, a2, buffer_[13], 9, k8);
- Subround(G, a2, b2, c2, d2, e2, buffer_[ 9], 12, k8);
- Subround(G, e2, a2, b2, c2, d2, buffer_[ 7], 5, k8);
- Subround(G, d2, e2, a2, b2, c2, buffer_[10], 15, k8);
- Subround(G, c2, d2, e2, a2, b2, buffer_[14], 8, k8);
-
- Subround(F, b2, c2, d2, e2, a2, buffer_[12], 8, k9);
- Subround(F, a2, b2, c2, d2, e2, buffer_[15], 5, k9);
- Subround(F, e2, a2, b2, c2, d2, buffer_[10], 12, k9);
- Subround(F, d2, e2, a2, b2, c2, buffer_[ 4], 9, k9);
- Subround(F, c2, d2, e2, a2, b2, buffer_[ 1], 12, k9);
- Subround(F, b2, c2, d2, e2, a2, buffer_[ 5], 5, k9);
- Subround(F, a2, b2, c2, d2, e2, buffer_[ 8], 14, k9);
- Subround(F, e2, a2, b2, c2, d2, buffer_[ 7], 6, k9);
- Subround(F, d2, e2, a2, b2, c2, buffer_[ 6], 8, k9);
- Subround(F, c2, d2, e2, a2, b2, buffer_[ 2], 13, k9);
- Subround(F, b2, c2, d2, e2, a2, buffer_[13], 6, k9);
- Subround(F, a2, b2, c2, d2, e2, buffer_[14], 5, k9);
- Subround(F, e2, a2, b2, c2, d2, buffer_[ 0], 15, k9);
- Subround(F, d2, e2, a2, b2, c2, buffer_[ 3], 13, k9);
- Subround(F, c2, d2, e2, a2, b2, buffer_[ 9], 11, k9);
- Subround(F, b2, c2, d2, e2, a2, buffer_[11], 11, k9);
-
- c1 = digest_[1] + c1 + d2;
- digest_[1] = digest_[2] + d1 + e2;
- digest_[2] = digest_[3] + e1 + a2;
- digest_[3] = digest_[4] + a1 + b2;
- digest_[4] = digest_[0] + b1 + c2;
- digest_[0] = c1;
-}
-
-
-#ifdef DO_RIPEMD_ASM
-
-/*
- // F(x ^ y ^ z)
- // place in esi
-#define ASMF(x, y, z) \
- AS2( mov esi, x ) \
- AS2( xor esi, y ) \
- AS2( xor esi, z )
-
-
- // G(z ^ (x & (y^z)))
- // place in esi
-#define ASMG(x, y, z) \
- AS2( mov esi, z ) \
- AS2( xor esi, y ) \
- AS2( and esi, x ) \
- AS2( xor esi, z )
-
-
- // H(z ^ (x | ~y))
- // place in esi
-#define ASMH(x, y, z) \
- AS2( mov esi, y ) \
- AS1( not esi ) \
- AS2( or esi, x ) \
- AS2( xor esi, z )
-
-
- // I(y ^ (z & (x^y)))
- // place in esi
-#define ASMI(x, y, z) \
- AS2( mov esi, y ) \
- AS2( xor esi, x ) \
- AS2( and esi, z ) \
- AS2( xor esi, y )
-
-
- // J(x ^ (y | ~z)))
- // place in esi
-#define ASMJ(x, y, z) \
- AS2( mov esi, z ) \
- AS1( not esi ) \
- AS2( or esi, y ) \
- AS2( xor esi, x )
-
-
-// for 160 and 320
-// #define ASMSubround(f, a, b, c, d, e, i, s, k)
-// a += f(b, c, d) + data[i] + k;
-// a = rotlFixed((word32)a, s) + e;
-// c = rotlFixed((word32)c, 10U)
-
-#define ASMSubround(f, a, b, c, d, e, index, s, k) \
- // a += f(b, c, d) + data[i] + k \
- AS2( mov esp, [edi + index * 4] ) \
- f(b, c, d) \
- AS2( add esi, k ) \
- AS2( add esi, esp ) \
- AS2( add a, esi ) \
- // a = rotlFixed((word32)a, s) + e \
- AS2( rol a, s ) \
- AS2( rol c, 10 ) \
- // c = rotlFixed((word32)c, 10U) \
- AS2( add a, e )
-*/
-
-
-// combine F into subround w/ setup
-// esi already has c, setup for next round when done
-// esp already has edi[index], setup for next round when done
-
-#define ASMSubroundF(a, b, c, d, e, index, s) \
- /* a += (b ^ c ^ d) + data[i] + k */ \
- AS2( xor esi, b ) \
- AS2( add a, [edi + index * 4] ) \
- AS2( xor esi, d ) \
- AS2( add a, esi ) \
- /* a = rotlFixed((word32)a, s) + e */ \
- AS2( mov esi, b ) \
- AS2( rol a, s ) \
- /* c = rotlFixed((word32)c, 10U) */ \
- AS2( rol c, 10 ) \
- AS2( add a, e )
-
-
-// combine G into subround w/ setup
-// esi already has c, setup for next round when done
-// esp already has edi[index], setup for next round when done
-
-#define ASMSubroundG(a, b, c, d, e, index, s, k) \
- /* a += (d ^ (b & (c^d))) + data[i] + k */ \
- AS2( xor esi, d ) \
- AS2( and esi, b ) \
- AS2( add a, [edi + index * 4] ) \
- AS2( xor esi, d ) \
- AS2( lea a, [esi + a + k] ) \
- /* a = rotlFixed((word32)a, s) + e */ \
- AS2( mov esi, b ) \
- AS2( rol a, s ) \
- /* c = rotlFixed((word32)c, 10U) */ \
- AS2( rol c, 10 ) \
- AS2( add a, e )
-
-
-// combine H into subround w/ setup
-// esi already has c, setup for next round when done
-// esp already has edi[index], setup for next round when done
-
-#define ASMSubroundH(a, b, c, d, e, index, s, k) \
- /* a += (d ^ (b | ~c)) + data[i] + k */ \
- AS1( not esi ) \
- AS2( or esi, b ) \
- AS2( add a, [edi + index * 4] ) \
- AS2( xor esi, d ) \
- AS2( lea a, [esi + a + k] ) \
- /* a = rotlFixed((word32)a, s) + e */ \
- AS2( mov esi, b ) \
- AS2( rol a, s ) \
- /* c = rotlFixed((word32)c, 10U) */ \
- AS2( rol c, 10 ) \
- AS2( add a, e )
-
-
-// combine I into subround w/ setup
-// esi already has c, setup for next round when done
-// esp already has edi[index], setup for next round when done
-
-#define ASMSubroundI(a, b, c, d, e, index, s, k) \
- /* a += (c ^ (d & (b^c))) + data[i] + k */ \
- AS2( xor esi, b ) \
- AS2( and esi, d ) \
- AS2( add a, [edi + index * 4] ) \
- AS2( xor esi, c ) \
- AS2( lea a, [esi + a + k] ) \
- /* a = rotlFixed((word32)a, s) + e */ \
- AS2( mov esi, b ) \
- AS2( rol a, s ) \
- /* c = rotlFixed((word32)c, 10U) */ \
- AS2( rol c, 10 ) \
- AS2( add a, e )
-
-
-// combine J into subround w/ setup
-// esi already has d, setup for next round when done
-// esp already has edi[index], setup for next round when done
-
-#define ASMSubroundJ(a, b, c, d, e, index, s, k) \
- /* a += (b ^ (c | ~d))) + data[i] + k */ \
- AS1( not esi ) \
- AS2( or esi, c ) \
- /* c = rotlFixed((word32)c, 10U) */ \
- AS2( add a, [edi + index * 4] ) \
- AS2( xor esi, b ) \
- AS2( rol c, 10 ) \
- AS2( lea a, [esi + a + k] ) \
- /* a = rotlFixed((word32)a, s) + e */ \
- AS2( rol a, s ) \
- AS2( mov esi, c ) \
- AS2( add a, e )
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void RIPEMD160::AsmTransform(const byte* data, word32 times)
-{
-#ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;"
- #define EPILOG() \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "c" (this), "D" (data), "d" (times) \
- : "%esi", "%eax", "memory", "cc" \
- );
-
-#else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( movd mm5, esi ) \
- AS2( movd mm6, ebp ) \
- AS2( mov edi, DWORD PTR [ebp + 8] ) \
- AS2( mov edx, DWORD PTR [ebp + 12] )
-
- #define EPILOG() \
- AS2( movd ebp, mm6 ) \
- AS2( movd esi, mm5 ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd edi, mm3 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 8 )
-
-#endif
-
- PROLOG()
-
- #ifdef OLD_GCC_OFFSET
- AS2( lea esi, [ecx + 20] ) // digest_[0]
- #else
- AS2( lea esi, [ecx + 16] ) // digest_[0]
- #endif
-
- AS2( sub esp, 24 ) // make room for tmp a1 - e1
- AS2( movd mm1, esi ) // store digest_
-
-#ifdef _MSC_VER
- AS1( loopStart: ) // loopStart
-#else
- AS1( 0: ) // loopStart for some gas (need numeric for jump back
-#endif
-
- AS2( movd mm2, edx ) // store times_
-
- AS2( mov eax, [esi] ) // a1
- AS2( mov ebx, [esi + 4] ) // b1
- AS2( mov ecx, [esi + 8] ) // c1
- AS2( mov edx, [esi + 12] ) // d1
- AS2( mov ebp, [esi + 16] ) // e1
-
- // setup
- AS2( mov esi, ecx )
-
- ASMSubroundF( eax, ebx, ecx, edx, ebp, 0, 11)
- ASMSubroundF( ebp, eax, ebx, ecx, edx, 1, 14)
- ASMSubroundF( edx, ebp, eax, ebx, ecx, 2, 15)
- ASMSubroundF( ecx, edx, ebp, eax, ebx, 3, 12)
- ASMSubroundF( ebx, ecx, edx, ebp, eax, 4, 5)
- ASMSubroundF( eax, ebx, ecx, edx, ebp, 5, 8)
- ASMSubroundF( ebp, eax, ebx, ecx, edx, 6, 7)
- ASMSubroundF( edx, ebp, eax, ebx, ecx, 7, 9)
- ASMSubroundF( ecx, edx, ebp, eax, ebx, 8, 11)
- ASMSubroundF( ebx, ecx, edx, ebp, eax, 9, 13)
- ASMSubroundF( eax, ebx, ecx, edx, ebp, 10, 14)
- ASMSubroundF( ebp, eax, ebx, ecx, edx, 11, 15)
- ASMSubroundF( edx, ebp, eax, ebx, ecx, 12, 6)
- ASMSubroundF( ecx, edx, ebp, eax, ebx, 13, 7)
- ASMSubroundF( ebx, ecx, edx, ebp, eax, 14, 9)
- ASMSubroundF( eax, ebx, ecx, edx, ebp, 15, 8)
-
- ASMSubroundG( ebp, eax, ebx, ecx, edx, 7, 7, k1)
- ASMSubroundG( edx, ebp, eax, ebx, ecx, 4, 6, k1)
- ASMSubroundG( ecx, edx, ebp, eax, ebx, 13, 8, k1)
- ASMSubroundG( ebx, ecx, edx, ebp, eax, 1, 13, k1)
- ASMSubroundG( eax, ebx, ecx, edx, ebp, 10, 11, k1)
- ASMSubroundG( ebp, eax, ebx, ecx, edx, 6, 9, k1)
- ASMSubroundG( edx, ebp, eax, ebx, ecx, 15, 7, k1)
- ASMSubroundG( ecx, edx, ebp, eax, ebx, 3, 15, k1)
- ASMSubroundG( ebx, ecx, edx, ebp, eax, 12, 7, k1)
- ASMSubroundG( eax, ebx, ecx, edx, ebp, 0, 12, k1)
- ASMSubroundG( ebp, eax, ebx, ecx, edx, 9, 15, k1)
- ASMSubroundG( edx, ebp, eax, ebx, ecx, 5, 9, k1)
- ASMSubroundG( ecx, edx, ebp, eax, ebx, 2, 11, k1)
- ASMSubroundG( ebx, ecx, edx, ebp, eax, 14, 7, k1)
- ASMSubroundG( eax, ebx, ecx, edx, ebp, 11, 13, k1)
- ASMSubroundG( ebp, eax, ebx, ecx, edx, 8, 12, k1)
-
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 3, 11, k2)
- ASMSubroundH( ecx, edx, ebp, eax, ebx, 10, 13, k2)
- ASMSubroundH( ebx, ecx, edx, ebp, eax, 14, 6, k2)
- ASMSubroundH( eax, ebx, ecx, edx, ebp, 4, 7, k2)
- ASMSubroundH( ebp, eax, ebx, ecx, edx, 9, 14, k2)
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 15, 9, k2)
- ASMSubroundH( ecx, edx, ebp, eax, ebx, 8, 13, k2)
- ASMSubroundH( ebx, ecx, edx, ebp, eax, 1, 15, k2)
- ASMSubroundH( eax, ebx, ecx, edx, ebp, 2, 14, k2)
- ASMSubroundH( ebp, eax, ebx, ecx, edx, 7, 8, k2)
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 0, 13, k2)
- ASMSubroundH( ecx, edx, ebp, eax, ebx, 6, 6, k2)
- ASMSubroundH( ebx, ecx, edx, ebp, eax, 13, 5, k2)
- ASMSubroundH( eax, ebx, ecx, edx, ebp, 11, 12, k2)
- ASMSubroundH( ebp, eax, ebx, ecx, edx, 5, 7, k2)
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 12, 5, k2)
-
- ASMSubroundI( ecx, edx, ebp, eax, ebx, 1, 11, k3)
- ASMSubroundI( ebx, ecx, edx, ebp, eax, 9, 12, k3)
- ASMSubroundI( eax, ebx, ecx, edx, ebp, 11, 14, k3)
- ASMSubroundI( ebp, eax, ebx, ecx, edx, 10, 15, k3)
- ASMSubroundI( edx, ebp, eax, ebx, ecx, 0, 14, k3)
- ASMSubroundI( ecx, edx, ebp, eax, ebx, 8, 15, k3)
- ASMSubroundI( ebx, ecx, edx, ebp, eax, 12, 9, k3)
- ASMSubroundI( eax, ebx, ecx, edx, ebp, 4, 8, k3)
- ASMSubroundI( ebp, eax, ebx, ecx, edx, 13, 9, k3)
- ASMSubroundI( edx, ebp, eax, ebx, ecx, 3, 14, k3)
- ASMSubroundI( ecx, edx, ebp, eax, ebx, 7, 5, k3)
- ASMSubroundI( ebx, ecx, edx, ebp, eax, 15, 6, k3)
- ASMSubroundI( eax, ebx, ecx, edx, ebp, 14, 8, k3)
- ASMSubroundI( ebp, eax, ebx, ecx, edx, 5, 6, k3)
- ASMSubroundI( edx, ebp, eax, ebx, ecx, 6, 5, k3)
- ASMSubroundI( ecx, edx, ebp, eax, ebx, 2, 12, k3)
-
- // setup
- AS2( mov esi, ebp )
-
- ASMSubroundJ( ebx, ecx, edx, ebp, eax, 4, 9, k4)
- ASMSubroundJ( eax, ebx, ecx, edx, ebp, 0, 15, k4)
- ASMSubroundJ( ebp, eax, ebx, ecx, edx, 5, 5, k4)
- ASMSubroundJ( edx, ebp, eax, ebx, ecx, 9, 11, k4)
- ASMSubroundJ( ecx, edx, ebp, eax, ebx, 7, 6, k4)
- ASMSubroundJ( ebx, ecx, edx, ebp, eax, 12, 8, k4)
- ASMSubroundJ( eax, ebx, ecx, edx, ebp, 2, 13, k4)
- ASMSubroundJ( ebp, eax, ebx, ecx, edx, 10, 12, k4)
- ASMSubroundJ( edx, ebp, eax, ebx, ecx, 14, 5, k4)
- ASMSubroundJ( ecx, edx, ebp, eax, ebx, 1, 12, k4)
- ASMSubroundJ( ebx, ecx, edx, ebp, eax, 3, 13, k4)
- ASMSubroundJ( eax, ebx, ecx, edx, ebp, 8, 14, k4)
- ASMSubroundJ( ebp, eax, ebx, ecx, edx, 11, 11, k4)
- ASMSubroundJ( edx, ebp, eax, ebx, ecx, 6, 8, k4)
- ASMSubroundJ( ecx, edx, ebp, eax, ebx, 15, 5, k4)
- ASMSubroundJ( ebx, ecx, edx, ebp, eax, 13, 6, k4)
-
- // store a1 - e1 on stack
- AS2( movd esi, mm1 ) // digest_
-
- AS2( mov [esp], eax )
- AS2( mov [esp + 4], ebx )
- AS2( mov [esp + 8], ecx )
- AS2( mov [esp + 12], edx )
- AS2( mov [esp + 16], ebp )
-
- AS2( mov eax, [esi] ) // a2
- AS2( mov ebx, [esi + 4] ) // b2
- AS2( mov ecx, [esi + 8] ) // c2
- AS2( mov edx, [esi + 12] ) // d2
- AS2( mov ebp, [esi + 16] ) // e2
-
-
- // setup
- AS2( mov esi, edx )
-
- ASMSubroundJ( eax, ebx, ecx, edx, ebp, 5, 8, k5)
- ASMSubroundJ( ebp, eax, ebx, ecx, edx, 14, 9, k5)
- ASMSubroundJ( edx, ebp, eax, ebx, ecx, 7, 9, k5)
- ASMSubroundJ( ecx, edx, ebp, eax, ebx, 0, 11, k5)
- ASMSubroundJ( ebx, ecx, edx, ebp, eax, 9, 13, k5)
- ASMSubroundJ( eax, ebx, ecx, edx, ebp, 2, 15, k5)
- ASMSubroundJ( ebp, eax, ebx, ecx, edx, 11, 15, k5)
- ASMSubroundJ( edx, ebp, eax, ebx, ecx, 4, 5, k5)
- ASMSubroundJ( ecx, edx, ebp, eax, ebx, 13, 7, k5)
- ASMSubroundJ( ebx, ecx, edx, ebp, eax, 6, 7, k5)
- ASMSubroundJ( eax, ebx, ecx, edx, ebp, 15, 8, k5)
- ASMSubroundJ( ebp, eax, ebx, ecx, edx, 8, 11, k5)
- ASMSubroundJ( edx, ebp, eax, ebx, ecx, 1, 14, k5)
- ASMSubroundJ( ecx, edx, ebp, eax, ebx, 10, 14, k5)
- ASMSubroundJ( ebx, ecx, edx, ebp, eax, 3, 12, k5)
- ASMSubroundJ( eax, ebx, ecx, edx, ebp, 12, 6, k5)
-
- // setup
- AS2( mov esi, ebx )
-
- ASMSubroundI( ebp, eax, ebx, ecx, edx, 6, 9, k6)
- ASMSubroundI( edx, ebp, eax, ebx, ecx, 11, 13, k6)
- ASMSubroundI( ecx, edx, ebp, eax, ebx, 3, 15, k6)
- ASMSubroundI( ebx, ecx, edx, ebp, eax, 7, 7, k6)
- ASMSubroundI( eax, ebx, ecx, edx, ebp, 0, 12, k6)
- ASMSubroundI( ebp, eax, ebx, ecx, edx, 13, 8, k6)
- ASMSubroundI( edx, ebp, eax, ebx, ecx, 5, 9, k6)
- ASMSubroundI( ecx, edx, ebp, eax, ebx, 10, 11, k6)
- ASMSubroundI( ebx, ecx, edx, ebp, eax, 14, 7, k6)
- ASMSubroundI( eax, ebx, ecx, edx, ebp, 15, 7, k6)
- ASMSubroundI( ebp, eax, ebx, ecx, edx, 8, 12, k6)
- ASMSubroundI( edx, ebp, eax, ebx, ecx, 12, 7, k6)
- ASMSubroundI( ecx, edx, ebp, eax, ebx, 4, 6, k6)
- ASMSubroundI( ebx, ecx, edx, ebp, eax, 9, 15, k6)
- ASMSubroundI( eax, ebx, ecx, edx, ebp, 1, 13, k6)
- ASMSubroundI( ebp, eax, ebx, ecx, edx, 2, 11, k6)
-
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 15, 9, k7)
- ASMSubroundH( ecx, edx, ebp, eax, ebx, 5, 7, k7)
- ASMSubroundH( ebx, ecx, edx, ebp, eax, 1, 15, k7)
- ASMSubroundH( eax, ebx, ecx, edx, ebp, 3, 11, k7)
- ASMSubroundH( ebp, eax, ebx, ecx, edx, 7, 8, k7)
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 14, 6, k7)
- ASMSubroundH( ecx, edx, ebp, eax, ebx, 6, 6, k7)
- ASMSubroundH( ebx, ecx, edx, ebp, eax, 9, 14, k7)
- ASMSubroundH( eax, ebx, ecx, edx, ebp, 11, 12, k7)
- ASMSubroundH( ebp, eax, ebx, ecx, edx, 8, 13, k7)
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 12, 5, k7)
- ASMSubroundH( ecx, edx, ebp, eax, ebx, 2, 14, k7)
- ASMSubroundH( ebx, ecx, edx, ebp, eax, 10, 13, k7)
- ASMSubroundH( eax, ebx, ecx, edx, ebp, 0, 13, k7)
- ASMSubroundH( ebp, eax, ebx, ecx, edx, 4, 7, k7)
- ASMSubroundH( edx, ebp, eax, ebx, ecx, 13, 5, k7)
-
- ASMSubroundG( ecx, edx, ebp, eax, ebx, 8, 15, k8)
- ASMSubroundG( ebx, ecx, edx, ebp, eax, 6, 5, k8)
- ASMSubroundG( eax, ebx, ecx, edx, ebp, 4, 8, k8)
- ASMSubroundG( ebp, eax, ebx, ecx, edx, 1, 11, k8)
- ASMSubroundG( edx, ebp, eax, ebx, ecx, 3, 14, k8)
- ASMSubroundG( ecx, edx, ebp, eax, ebx, 11, 14, k8)
- ASMSubroundG( ebx, ecx, edx, ebp, eax, 15, 6, k8)
- ASMSubroundG( eax, ebx, ecx, edx, ebp, 0, 14, k8)
- ASMSubroundG( ebp, eax, ebx, ecx, edx, 5, 6, k8)
- ASMSubroundG( edx, ebp, eax, ebx, ecx, 12, 9, k8)
- ASMSubroundG( ecx, edx, ebp, eax, ebx, 2, 12, k8)
- ASMSubroundG( ebx, ecx, edx, ebp, eax, 13, 9, k8)
- ASMSubroundG( eax, ebx, ecx, edx, ebp, 9, 12, k8)
- ASMSubroundG( ebp, eax, ebx, ecx, edx, 7, 5, k8)
- ASMSubroundG( edx, ebp, eax, ebx, ecx, 10, 15, k8)
- ASMSubroundG( ecx, edx, ebp, eax, ebx, 14, 8, k8)
-
- ASMSubroundF( ebx, ecx, edx, ebp, eax, 12, 8)
- ASMSubroundF( eax, ebx, ecx, edx, ebp, 15, 5)
- ASMSubroundF( ebp, eax, ebx, ecx, edx, 10, 12)
- ASMSubroundF( edx, ebp, eax, ebx, ecx, 4, 9)
- ASMSubroundF( ecx, edx, ebp, eax, ebx, 1, 12)
- ASMSubroundF( ebx, ecx, edx, ebp, eax, 5, 5)
- ASMSubroundF( eax, ebx, ecx, edx, ebp, 8, 14)
- ASMSubroundF( ebp, eax, ebx, ecx, edx, 7, 6)
- ASMSubroundF( edx, ebp, eax, ebx, ecx, 6, 8)
- ASMSubroundF( ecx, edx, ebp, eax, ebx, 2, 13)
- ASMSubroundF( ebx, ecx, edx, ebp, eax, 13, 6)
- ASMSubroundF( eax, ebx, ecx, edx, ebp, 14, 5)
- ASMSubroundF( ebp, eax, ebx, ecx, edx, 0, 15)
- ASMSubroundF( edx, ebp, eax, ebx, ecx, 3, 13)
- ASMSubroundF( ecx, edx, ebp, eax, ebx, 9, 11)
- ASMSubroundF( ebx, ecx, edx, ebp, eax, 11, 11)
-
- // advance data and store for next round
- AS2( add edi, 64 )
- AS2( movd esi, mm1 ) // digest_
- AS2( movd mm0, edi ) // store
-
- // now edi as tmp
-
- // c1 = digest_[1] + c1 + d2;
- AS2( add [esp + 8], edx ) // + d2
- AS2( mov edi, [esi + 4] ) // digest_[1]
- AS2( add [esp + 8], edi )
-
- // digest_[1] = digest_[2] + d1 + e2;
- AS2( mov [esi + 4], ebp ) // e2
- AS2( mov edi, [esp + 12] ) // d1
- AS2( add edi, [esi + 8] ) // digest_[2]
- AS2( add [esi + 4], edi )
-
- // digest_[2] = digest_[3] + e1 + a2;
- AS2( mov [esi + 8], eax ) // a2
- AS2( mov edi, [esp + 16] ) // e1
- AS2( add edi, [esi + 12] ) // digest_[3]
- AS2( add [esi + 8], edi )
-
- // digest_[3] = digest_[4] + a1 + b2;
- AS2( mov [esi + 12], ebx ) // b2
- AS2( mov edi, [esp] ) // a1
- AS2( add edi, [esi + 16] ) // digest_[4]
- AS2( add [esi + 12], edi )
-
- // digest_[4] = digest_[0] + b1 + c2;
- AS2( mov [esi + 16], ecx ) // c2
- AS2( mov edi, [esp + 4] ) // b1
- AS2( add edi, [esi] ) // digest_[0]
- AS2( add [esi + 16], edi )
-
- // digest_[0] = c1;
- AS2( mov edi, [esp + 8] ) // c1
- AS2( mov [esi], edi )
-
- // setup for loop back
- AS2( movd edx, mm2 ) // times
- AS2( movd edi, mm0 ) // data, already advanced
- AS1( dec edx )
-#ifdef _MSC_VER
- AS1( jnz loopStart ) // loopStart
-#else
- AS1( jnz 0b ) // loopStart
-#endif
-
- // inline adjust
- AS2( add esp, 24 ) // fix room on stack
-
- EPILOG()
-}
-
-
-#endif // DO_RIPEMD_ASM
-
-
-} // namespace TaoCrypt
diff --git a/extra/yassl/taocrypt/src/rsa.cpp b/extra/yassl/taocrypt/src/rsa.cpp
deleted file mode 100644
index e458a1adb21..00000000000
--- a/extra/yassl/taocrypt/src/rsa.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's rsa.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "rsa.hpp"
-#include "asn.hpp"
-#include "modarith.hpp"
-
-
-
-namespace TaoCrypt {
-
-
-Integer RSA_PublicKey::ApplyFunction(const Integer& x) const
-{
- return a_exp_b_mod_c(x, e_, n_);
-}
-
-
-RSA_PublicKey::RSA_PublicKey(Source& source)
-{
- Initialize(source);
-}
-
-
-void RSA_PublicKey::Initialize(Source& source)
-{
- RSA_Public_Decoder decoder(source);
- decoder.Decode(*this);
-}
-
-
-Integer RSA_PrivateKey::CalculateInverse(RandomNumberGenerator& rng,
- const Integer& x) const
-{
- ModularArithmetic modn(n_);
-
- Integer r(rng, Integer::One(), n_ - Integer::One());
- Integer re = modn.Exponentiate(r, e_);
- re = modn.Multiply(re, x); // blind
-
- // here we follow the notation of PKCS #1 and let u=q inverse mod p
- // but in ModRoot, u=p inverse mod q, so we reverse the order of p and q
-
- Integer y = ModularRoot(re, dq_, dp_, q_, p_, u_);
- y = modn.Divide(y, r); // unblind
-
- return y;
-}
-
-
-RSA_PrivateKey::RSA_PrivateKey(Source& source)
-{
- Initialize(source);
-}
-
-
-void RSA_PrivateKey::Initialize(Source& source)
-{
- RSA_Private_Decoder decoder(source);
- decoder.Decode(*this);
-}
-
-
-void RSA_BlockType2::Pad(const byte *input, word32 inputLen, byte *pkcsBlock,
- word32 pkcsBlockLen, RandomNumberGenerator& rng) const
-{
- // convert from bit length to byte length
- if (pkcsBlockLen % 8 != 0)
- {
- pkcsBlock[0] = 0;
- pkcsBlock++;
- }
- pkcsBlockLen /= 8;
-
- pkcsBlock[0] = 2; // block type 2
-
- // pad with non-zero random bytes
- word32 padLen = pkcsBlockLen - inputLen - 1;
- rng.GenerateBlock(&pkcsBlock[1], padLen);
- for (word32 i = 1; i < padLen; i++)
- if (pkcsBlock[i] == 0) pkcsBlock[i] = 0x01;
-
- pkcsBlock[pkcsBlockLen-inputLen-1] = 0; // separator
- memcpy(pkcsBlock+pkcsBlockLen-inputLen, input, inputLen);
-}
-
-word32 RSA_BlockType2::UnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen,
- byte *output) const
-{
- bool invalid = false;
- unsigned int maxOutputLen = SaturatingSubtract(pkcsBlockLen / 8, 10U);
-
- // convert from bit length to byte length
- if (pkcsBlockLen % 8 != 0)
- {
- invalid = (pkcsBlock[0] != 0) || invalid;
- pkcsBlock++;
- }
- pkcsBlockLen /= 8;
-
- // Require block type 2.
- invalid = (pkcsBlock[0] != 2) || invalid;
-
- // skip past the padding until we find the separator
- unsigned i=1;
- while (i<pkcsBlockLen && pkcsBlock[i++]) { // null body
- }
- if (!(i==pkcsBlockLen || pkcsBlock[i-1]==0))
- return 0;
-
- unsigned int outputLen = pkcsBlockLen - i;
- invalid = (outputLen > maxOutputLen) || invalid;
-
- if (invalid)
- return 0;
-
- memcpy (output, pkcsBlock+i, outputLen);
- return outputLen;
-}
-
-
-void RSA_BlockType1::Pad(const byte* input, word32 inputLen, byte* pkcsBlock,
- word32 pkcsBlockLen, RandomNumberGenerator&) const
-{
- // sanity checks
- if (input == NULL || pkcsBlock == NULL)
- return;
-
- // convert from bit length to byte length
- if (pkcsBlockLen % 8 != 0)
- {
- pkcsBlock[0] = 0;
- pkcsBlock++;
- }
- pkcsBlockLen /= 8;
-
- pkcsBlock[0] = 1; // block type 1 for SSL
-
- // pad with 0xff bytes
- memset(&pkcsBlock[1], 0xFF, pkcsBlockLen - inputLen - 2);
-
- pkcsBlock[pkcsBlockLen-inputLen-1] = 0; // separator
- memcpy(pkcsBlock+pkcsBlockLen-inputLen, input, inputLen);
-}
-
-
-word32 RSA_BlockType1::UnPad(const byte* pkcsBlock, word32 pkcsBlockLen,
- byte* output) const
-{
- bool invalid = false;
- unsigned int maxOutputLen = SaturatingSubtract(pkcsBlockLen / 8, 10U);
-
- // convert from bit length to byte length
- if (pkcsBlockLen % 8 != 0)
- {
- invalid = (pkcsBlock[0] != 0) || invalid;
- pkcsBlock++;
- }
- pkcsBlockLen /= 8;
-
- // Require block type 1 for SSL.
- invalid = (pkcsBlock[0] != 1) || invalid;
-
- // skip past the padding until we find the separator
- unsigned i=1;
- while (i<pkcsBlockLen && pkcsBlock[i++] == 0xFF) { // null body
- }
- if (!(i==pkcsBlockLen || pkcsBlock[i-1]==0))
- return 0;
-
- unsigned int outputLen = pkcsBlockLen - i;
- invalid = (outputLen > maxOutputLen) || invalid;
-
- if (invalid)
- return 0;
-
- memcpy(output, pkcsBlock+i, outputLen);
- return outputLen;
-}
-
-
-word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain)
-{
- PK_Lengths lengths(key.GetModulus());
-
- ByteBlock paddedBlock(BitsToBytes(lengths.PaddedBlockBitLength()));
- Integer x = key.ApplyFunction(Integer(sig,
- lengths.FixedCiphertextLength()));
- if (x.ByteCount() > paddedBlock.size())
- x = Integer::Zero();
- x.Encode(paddedBlock.get_buffer(), paddedBlock.size());
- return RSA_BlockType1().UnPad(paddedBlock.get_buffer(),
- lengths.PaddedBlockBitLength(), plain);
-}
-
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/sha.cpp b/extra/yassl/taocrypt/src/sha.cpp
deleted file mode 100644
index e7ba5582d38..00000000000
--- a/extra/yassl/taocrypt/src/sha.cpp
+++ /dev/null
@@ -1,1033 +0,0 @@
-/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's sha.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include <string.h>
-#include "sha.hpp"
-#ifdef USE_SYS_STL
- #include <algorithm>
-#else
- #include "algorithm.hpp"
-#endif
-
-
-namespace STL = STL_NAMESPACE;
-
-
-
-namespace TaoCrypt {
-
-#define blk0(i) (W[i] = buffer_[i])
-#define blk1(i) (W[i&15] = \
- rotlFixed(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1))
-
-#define f1(x,y,z) (z^(x &(y^z)))
-#define f2(x,y,z) (x^y^z)
-#define f3(x,y,z) ((x&y)|(z&(x|y)))
-#define f4(x,y,z) (x^y^z)
-
-// (R0+R1), R2, R3, R4 are the different operations used in SHA1
-#define R0(v,w,x,y,z,i) z+= f1(w,x,y) + blk0(i) + 0x5A827999+ \
- rotlFixed(v,5); w = rotlFixed(w,30);
-#define R1(v,w,x,y,z,i) z+= f1(w,x,y) + blk1(i) + 0x5A827999+ \
- rotlFixed(v,5); w = rotlFixed(w,30);
-#define R2(v,w,x,y,z,i) z+= f2(w,x,y) + blk1(i) + 0x6ED9EBA1+ \
- rotlFixed(v,5); w = rotlFixed(w,30);
-#define R3(v,w,x,y,z,i) z+= f3(w,x,y) + blk1(i) + 0x8F1BBCDC+ \
- rotlFixed(v,5); w = rotlFixed(w,30);
-#define R4(v,w,x,y,z,i) z+= f4(w,x,y) + blk1(i) + 0xCA62C1D6+ \
- rotlFixed(v,5); w = rotlFixed(w,30);
-
-
-void SHA::Init()
-{
- digest_[0] = 0x67452301L;
- digest_[1] = 0xEFCDAB89L;
- digest_[2] = 0x98BADCFEL;
- digest_[3] = 0x10325476L;
- digest_[4] = 0xC3D2E1F0L;
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-void SHA256::Init()
-{
- digest_[0] = 0x6A09E667L;
- digest_[1] = 0xBB67AE85L;
- digest_[2] = 0x3C6EF372L;
- digest_[3] = 0xA54FF53AL;
- digest_[4] = 0x510E527FL;
- digest_[5] = 0x9B05688CL;
- digest_[6] = 0x1F83D9ABL;
- digest_[7] = 0x5BE0CD19L;
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-
-void SHA224::Init()
-{
- digest_[0] = 0xc1059ed8;
- digest_[1] = 0x367cd507;
- digest_[2] = 0x3070dd17;
- digest_[3] = 0xf70e5939;
- digest_[4] = 0xffc00b31;
- digest_[5] = 0x68581511;
- digest_[6] = 0x64f98fa7;
- digest_[7] = 0xbefa4fa4;
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-void SHA512::Init()
-{
- digest_[0] = W64LIT(0x6a09e667f3bcc908);
- digest_[1] = W64LIT(0xbb67ae8584caa73b);
- digest_[2] = W64LIT(0x3c6ef372fe94f82b);
- digest_[3] = W64LIT(0xa54ff53a5f1d36f1);
- digest_[4] = W64LIT(0x510e527fade682d1);
- digest_[5] = W64LIT(0x9b05688c2b3e6c1f);
- digest_[6] = W64LIT(0x1f83d9abfb41bd6b);
- digest_[7] = W64LIT(0x5be0cd19137e2179);
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-
-void SHA384::Init()
-{
- digest_[0] = W64LIT(0xcbbb9d5dc1059ed8);
- digest_[1] = W64LIT(0x629a292a367cd507);
- digest_[2] = W64LIT(0x9159015a3070dd17);
- digest_[3] = W64LIT(0x152fecd8f70e5939);
- digest_[4] = W64LIT(0x67332667ffc00b31);
- digest_[5] = W64LIT(0x8eb44a8768581511);
- digest_[6] = W64LIT(0xdb0c2e0d64f98fa7);
- digest_[7] = W64LIT(0x47b5481dbefa4fa4);
-
- buffLen_ = 0;
- loLen_ = 0;
- hiLen_ = 0;
-}
-
-#endif // WORD64_AVAILABLE
-
-
-SHA::SHA(const SHA& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32),
- BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-
-SHA256::SHA256(const SHA256& that) : HASHwithTransform(DIGEST_SIZE /
- sizeof(word32), BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-
-SHA224::SHA224(const SHA224& that) : HASHwithTransform(SHA256::DIGEST_SIZE /
- sizeof(word32), BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-SHA512::SHA512(const SHA512& that) : HASH64withTransform(DIGEST_SIZE /
- sizeof(word64), BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-
-SHA384::SHA384(const SHA384& that) : HASH64withTransform(SHA512::DIGEST_SIZE /
- sizeof(word64), BLOCK_SIZE)
-{
- buffLen_ = that.buffLen_;
- loLen_ = that.loLen_;
- hiLen_ = that.hiLen_;
-
- memcpy(digest_, that.digest_, DIGEST_SIZE);
- memcpy(buffer_, that.buffer_, BLOCK_SIZE);
-}
-
-#endif // WORD64_AVAILABLE
-
-
-SHA& SHA::operator= (const SHA& that)
-{
- SHA tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-
-SHA256& SHA256::operator= (const SHA256& that)
-{
- SHA256 tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-
-SHA224& SHA224::operator= (const SHA224& that)
-{
- SHA224 tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-SHA512& SHA512::operator= (const SHA512& that)
-{
- SHA512 tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-
-SHA384& SHA384::operator= (const SHA384& that)
-{
- SHA384 tmp(that);
- Swap(tmp);
-
- return *this;
-}
-
-#endif // WORD64_AVAILABLE
-
-
-void SHA::Swap(SHA& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-
-void SHA256::Swap(SHA256& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-
-void SHA224::Swap(SHA224& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-void SHA512::Swap(SHA512& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-
-void SHA384::Swap(SHA384& other)
-{
- STL::swap(loLen_, other.loLen_);
- STL::swap(hiLen_, other.hiLen_);
- STL::swap(buffLen_, other.buffLen_);
-
- memcpy(digest_, other.digest_, DIGEST_SIZE);
- memcpy(buffer_, other.buffer_, BLOCK_SIZE);
-}
-
-#endif // WORD64_AVIALABLE
-
-
-#ifdef DO_SHA_ASM
-
-// Update digest with data of size len
-void SHA::Update(const byte* data, word32 len)
-{
- if (!isMMX) {
- HASHwithTransform::Update(data, len);
- return;
- }
-
- byte* local = reinterpret_cast<byte*>(buffer_);
-
- // remove buffered data if possible
- if (buffLen_) {
- word32 add = min(len, BLOCK_SIZE - buffLen_);
- memcpy(&local[buffLen_], data, add);
-
- buffLen_ += add;
- data += add;
- len -= add;
-
- if (buffLen_ == BLOCK_SIZE) {
- ByteReverse(local, local, BLOCK_SIZE);
- Transform();
- AddLength(BLOCK_SIZE);
- buffLen_ = 0;
- }
- }
-
- // all at once for asm
- if (buffLen_ == 0) {
- word32 times = len / BLOCK_SIZE;
- if (times) {
- AsmTransform(data, times);
- const word32 add = BLOCK_SIZE * times;
- AddLength(add);
- len -= add;
- data += add;
- }
- }
-
- // cache any data left
- if (len) {
- memcpy(&local[buffLen_], data, len);
- buffLen_ += len;
- }
-}
-
-#endif // DO_SHA_ASM
-
-
-void SHA::Transform()
-{
- word32 W[BLOCK_SIZE / sizeof(word32)];
-
- // Copy context->state[] to working vars
- word32 a = digest_[0];
- word32 b = digest_[1];
- word32 c = digest_[2];
- word32 d = digest_[3];
- word32 e = digest_[4];
-
- // 4 rounds of 20 operations each. Loop unrolled.
- R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
- R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
- R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
- R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
-
- R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
-
- R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
- R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
- R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
- R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
- R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
-
- R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
- R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
- R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
- R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
- R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
-
- R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
- R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
- R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
- R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
- R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
-
- // Add the working vars back into digest state[]
- digest_[0] += a;
- digest_[1] += b;
- digest_[2] += c;
- digest_[3] += d;
- digest_[4] += e;
-
- // Wipe variables
- a = b = c = d = e = 0;
- memset(W, 0, sizeof(W));
-}
-
-
-#define blk2(i) (W[i&15]+=s1(W[(i-2)&15])+W[(i-7)&15]+s0(W[(i-15)&15]))
-
-#define Ch(x,y,z) (z^(x&(y^z)))
-#define Maj(x,y,z) ((x&y)|(z&(x|y)))
-
-#define a(i) T[(0-i)&7]
-#define b(i) T[(1-i)&7]
-#define c(i) T[(2-i)&7]
-#define d(i) T[(3-i)&7]
-#define e(i) T[(4-i)&7]
-#define f(i) T[(5-i)&7]
-#define g(i) T[(6-i)&7]
-#define h(i) T[(7-i)&7]
-
-#define R(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk0(i));\
- d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i))
-
-// for SHA256
-#define S0(x) (rotrFixed(x,2)^rotrFixed(x,13)^rotrFixed(x,22))
-#define S1(x) (rotrFixed(x,6)^rotrFixed(x,11)^rotrFixed(x,25))
-#define s0(x) (rotrFixed(x,7)^rotrFixed(x,18)^(x>>3))
-#define s1(x) (rotrFixed(x,17)^rotrFixed(x,19)^(x>>10))
-
-
-static const word32 K256[64] = {
- 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
- 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
- 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
- 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
- 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
- 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
- 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
- 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
- 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
- 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
- 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
- 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
- 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
- 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
- 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
- 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
-};
-
-
-static void Transform256(word32* digest_, word32* buffer_)
-{
- const word32* K = K256;
-
- word32 W[16];
- word32 T[8];
-
- // Copy digest to working vars
- memcpy(T, digest_, sizeof(T));
-
- // 64 operations, partially loop unrolled
- for (unsigned int j = 0; j < 64; j += 16) {
- R( 0); R( 1); R( 2); R( 3);
- R( 4); R( 5); R( 6); R( 7);
- R( 8); R( 9); R(10); R(11);
- R(12); R(13); R(14); R(15);
- }
-
- // Add the working vars back into digest
- digest_[0] += a(0);
- digest_[1] += b(0);
- digest_[2] += c(0);
- digest_[3] += d(0);
- digest_[4] += e(0);
- digest_[5] += f(0);
- digest_[6] += g(0);
- digest_[7] += h(0);
-
- // Wipe variables
- memset(W, 0, sizeof(W));
- memset(T, 0, sizeof(T));
-}
-
-
-// undef for 256
-#undef S0
-#undef S1
-#undef s0
-#undef s1
-
-
-void SHA256::Transform()
-{
- Transform256(digest_, buffer_);
-}
-
-
-void SHA224::Transform()
-{
- Transform256(digest_, buffer_);
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-static const word64 K512[80] = {
- W64LIT(0x428a2f98d728ae22), W64LIT(0x7137449123ef65cd),
- W64LIT(0xb5c0fbcfec4d3b2f), W64LIT(0xe9b5dba58189dbbc),
- W64LIT(0x3956c25bf348b538), W64LIT(0x59f111f1b605d019),
- W64LIT(0x923f82a4af194f9b), W64LIT(0xab1c5ed5da6d8118),
- W64LIT(0xd807aa98a3030242), W64LIT(0x12835b0145706fbe),
- W64LIT(0x243185be4ee4b28c), W64LIT(0x550c7dc3d5ffb4e2),
- W64LIT(0x72be5d74f27b896f), W64LIT(0x80deb1fe3b1696b1),
- W64LIT(0x9bdc06a725c71235), W64LIT(0xc19bf174cf692694),
- W64LIT(0xe49b69c19ef14ad2), W64LIT(0xefbe4786384f25e3),
- W64LIT(0x0fc19dc68b8cd5b5), W64LIT(0x240ca1cc77ac9c65),
- W64LIT(0x2de92c6f592b0275), W64LIT(0x4a7484aa6ea6e483),
- W64LIT(0x5cb0a9dcbd41fbd4), W64LIT(0x76f988da831153b5),
- W64LIT(0x983e5152ee66dfab), W64LIT(0xa831c66d2db43210),
- W64LIT(0xb00327c898fb213f), W64LIT(0xbf597fc7beef0ee4),
- W64LIT(0xc6e00bf33da88fc2), W64LIT(0xd5a79147930aa725),
- W64LIT(0x06ca6351e003826f), W64LIT(0x142929670a0e6e70),
- W64LIT(0x27b70a8546d22ffc), W64LIT(0x2e1b21385c26c926),
- W64LIT(0x4d2c6dfc5ac42aed), W64LIT(0x53380d139d95b3df),
- W64LIT(0x650a73548baf63de), W64LIT(0x766a0abb3c77b2a8),
- W64LIT(0x81c2c92e47edaee6), W64LIT(0x92722c851482353b),
- W64LIT(0xa2bfe8a14cf10364), W64LIT(0xa81a664bbc423001),
- W64LIT(0xc24b8b70d0f89791), W64LIT(0xc76c51a30654be30),
- W64LIT(0xd192e819d6ef5218), W64LIT(0xd69906245565a910),
- W64LIT(0xf40e35855771202a), W64LIT(0x106aa07032bbd1b8),
- W64LIT(0x19a4c116b8d2d0c8), W64LIT(0x1e376c085141ab53),
- W64LIT(0x2748774cdf8eeb99), W64LIT(0x34b0bcb5e19b48a8),
- W64LIT(0x391c0cb3c5c95a63), W64LIT(0x4ed8aa4ae3418acb),
- W64LIT(0x5b9cca4f7763e373), W64LIT(0x682e6ff3d6b2b8a3),
- W64LIT(0x748f82ee5defb2fc), W64LIT(0x78a5636f43172f60),
- W64LIT(0x84c87814a1f0ab72), W64LIT(0x8cc702081a6439ec),
- W64LIT(0x90befffa23631e28), W64LIT(0xa4506cebde82bde9),
- W64LIT(0xbef9a3f7b2c67915), W64LIT(0xc67178f2e372532b),
- W64LIT(0xca273eceea26619c), W64LIT(0xd186b8c721c0c207),
- W64LIT(0xeada7dd6cde0eb1e), W64LIT(0xf57d4f7fee6ed178),
- W64LIT(0x06f067aa72176fba), W64LIT(0x0a637dc5a2c898a6),
- W64LIT(0x113f9804bef90dae), W64LIT(0x1b710b35131c471b),
- W64LIT(0x28db77f523047d84), W64LIT(0x32caab7b40c72493),
- W64LIT(0x3c9ebe0a15c9bebc), W64LIT(0x431d67c49c100d4c),
- W64LIT(0x4cc5d4becb3e42b6), W64LIT(0x597f299cfc657e2a),
- W64LIT(0x5fcb6fab3ad6faec), W64LIT(0x6c44198c4a475817)
-};
-
-
-// for SHA512
-#define S0(x) (rotrFixed(x,28)^rotrFixed(x,34)^rotrFixed(x,39))
-#define S1(x) (rotrFixed(x,14)^rotrFixed(x,18)^rotrFixed(x,41))
-#define s0(x) (rotrFixed(x,1)^rotrFixed(x,8)^(x>>7))
-#define s1(x) (rotrFixed(x,19)^rotrFixed(x,61)^(x>>6))
-
-
-static void Transform512(word64* digest_, word64* buffer_)
-{
- const word64* K = K512;
-
- word64 W[16];
- word64 T[8];
-
- // Copy digest to working vars
- memcpy(T, digest_, sizeof(T));
-
- // 64 operations, partially loop unrolled
- for (unsigned int j = 0; j < 80; j += 16) {
- R( 0); R( 1); R( 2); R( 3);
- R( 4); R( 5); R( 6); R( 7);
- R( 8); R( 9); R(10); R(11);
- R(12); R(13); R(14); R(15);
- }
-
- // Add the working vars back into digest
-
- digest_[0] += a(0);
- digest_[1] += b(0);
- digest_[2] += c(0);
- digest_[3] += d(0);
- digest_[4] += e(0);
- digest_[5] += f(0);
- digest_[6] += g(0);
- digest_[7] += h(0);
-
- // Wipe variables
- memset(W, 0, sizeof(W));
- memset(T, 0, sizeof(T));
-}
-
-
-void SHA512::Transform()
-{
- Transform512(digest_, buffer_);
-}
-
-
-void SHA384::Transform()
-{
- Transform512(digest_, buffer_);
-}
-
-#endif // WORD64_AVIALABLE
-
-
-#ifdef DO_SHA_ASM
-
-// f1(x,y,z) (z^(x &(y^z)))
-// place in esi
-#define ASMf1(x,y,z) \
- AS2( mov esi, y ) \
- AS2( xor esi, z ) \
- AS2( and esi, x ) \
- AS2( xor esi, z )
-
-
-// R0(v,w,x,y,z,i) =
-// z+= f1(w,x,y) + W[i] + 0x5A827999 + rotlFixed(v,5);
-// w = rotlFixed(w,30);
-
-// use esi for f
-// use edi as tmp
-
-
-#define ASMR0(v,w,x,y,z,i) \
- AS2( mov esi, x ) \
- AS2( mov edi, [esp + i * 4] ) \
- AS2( xor esi, y ) \
- AS2( and esi, w ) \
- AS2( lea z, [edi + z + 0x5A827999] ) \
- AS2( mov edi, v ) \
- AS2( xor esi, y ) \
- AS2( rol edi, 5 ) \
- AS2( add z, esi ) \
- AS2( rol w, 30 ) \
- AS2( add z, edi )
-
-
-/* Some macro stuff, but older gas ( < 2,16 ) can't process &, so do by hand
- % won't work on gas at all
-
-#define xstr(s) str(s)
-#define str(s) #s
-
-#define WOFF1(a) ( a & 15)
-#define WOFF2(a) ((a + 2) & 15)
-#define WOFF3(a) ((a + 8) & 15)
-#define WOFF4(a) ((a + 13) & 15)
-
-#ifdef __GNUC__
- #define WGET1(i) asm("mov esp, [edi - "xstr(WOFF1(i))" * 4] ");
- #define WGET2(i) asm("xor esp, [edi - "xstr(WOFF2(i))" * 4] ");
- #define WGET3(i) asm("xor esp, [edi - "xstr(WOFF3(i))" * 4] ");
- #define WGET4(i) asm("xor esp, [edi - "xstr(WOFF4(i))" * 4] ");
- #define WPUT1(i) asm("mov [edi - "xstr(WOFF1(i))" * 4], esp ");
-#else
- #define WGET1(i) AS2( mov esp, [edi - WOFF1(i) * 4] )
- #define WGET2(i) AS2( xor esp, [edi - WOFF2(i) * 4] )
- #define WGET3(i) AS2( xor esp, [edi - WOFF3(i) * 4] )
- #define WGET4(i) AS2( xor esp, [edi - WOFF4(i) * 4] )
- #define WPUT1(i) AS2( mov [edi - WOFF1(i) * 4], esp )
-#endif
-*/
-
-// ASMR1 = ASMR0 but use esp for W calcs
-
-#define ASMR1(v,w,x,y,z,i,W1,W2,W3,W4) \
- AS2( mov edi, [esp + W1 * 4] ) \
- AS2( mov esi, x ) \
- AS2( xor edi, [esp + W2 * 4] ) \
- AS2( xor esi, y ) \
- AS2( xor edi, [esp + W3 * 4] ) \
- AS2( and esi, w ) \
- AS2( xor edi, [esp + W4 * 4] ) \
- AS2( rol edi, 1 ) \
- AS2( xor esi, y ) \
- AS2( mov [esp + W1 * 4], edi ) \
- AS2( lea z, [edi + z + 0x5A827999] ) \
- AS2( mov edi, v ) \
- AS2( rol edi, 5 ) \
- AS2( add z, esi ) \
- AS2( rol w, 30 ) \
- AS2( add z, edi )
-
-
-// ASMR2 = ASMR1 but f is xor, xor instead
-
-#define ASMR2(v,w,x,y,z,i,W1,W2,W3,W4) \
- AS2( mov edi, [esp + W1 * 4] ) \
- AS2( mov esi, x ) \
- AS2( xor edi, [esp + W2 * 4] ) \
- AS2( xor esi, y ) \
- AS2( xor edi, [esp + W3 * 4] ) \
- AS2( xor esi, w ) \
- AS2( xor edi, [esp + W4 * 4] ) \
- AS2( rol edi, 1 ) \
- AS2( add z, esi ) \
- AS2( mov [esp + W1 * 4], edi ) \
- AS2( lea z, [edi + z + 0x6ED9EBA1] ) \
- AS2( mov edi, v ) \
- AS2( rol edi, 5 ) \
- AS2( rol w, 30 ) \
- AS2( add z, edi )
-
-
-// ASMR3 = ASMR2 but f is (x&y)|(z&(x|y))
-// which is (w&x)|(y&(w|x))
-
-#define ASMR3(v,w,x,y,z,i,W1,W2,W3,W4) \
- AS2( mov edi, [esp + W1 * 4] ) \
- AS2( mov esi, x ) \
- AS2( xor edi, [esp + W2 * 4] ) \
- AS2( or esi, w ) \
- AS2( xor edi, [esp + W3 * 4] ) \
- AS2( and esi, y ) \
- AS2( xor edi, [esp + W4 * 4] ) \
- AS2( movd mm0, esi ) \
- AS2( rol edi, 1 ) \
- AS2( mov esi, x ) \
- AS2( mov [esp + W1 * 4], edi ) \
- AS2( and esi, w ) \
- AS2( lea z, [edi + z + 0x8F1BBCDC] ) \
- AS2( movd edi, mm0 ) \
- AS2( or esi, edi ) \
- AS2( mov edi, v ) \
- AS2( rol edi, 5 ) \
- AS2( add z, esi ) \
- AS2( rol w, 30 ) \
- AS2( add z, edi )
-
-
-// ASMR4 = ASMR2 but different constant
-
-#define ASMR4(v,w,x,y,z,i,W1,W2,W3,W4) \
- AS2( mov edi, [esp + W1 * 4] ) \
- AS2( mov esi, x ) \
- AS2( xor edi, [esp + W2 * 4] ) \
- AS2( xor esi, y ) \
- AS2( xor edi, [esp + W3 * 4] ) \
- AS2( xor esi, w ) \
- AS2( xor edi, [esp + W4 * 4] ) \
- AS2( rol edi, 1 ) \
- AS2( add z, esi ) \
- AS2( mov [esp + W1 * 4], edi ) \
- AS2( lea z, [edi + z + 0xCA62C1D6] ) \
- AS2( mov edi, v ) \
- AS2( rol edi, 5 ) \
- AS2( rol w, 30 ) \
- AS2( add z, edi )
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void SHA::AsmTransform(const byte* data, word32 times)
-{
-#ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;"
- #define EPILOG() \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "c" (this), "D" (data), "a" (times) \
- : "%esi", "%edx", "memory", "cc" \
- );
-
-#else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( movd mm5, esi ) \
- AS2( movd mm6, ebp ) \
- AS2( mov edi, data ) \
- AS2( mov eax, times )
-
- #define EPILOG() \
- AS2( movd ebp, mm6 ) \
- AS2( movd esi, mm5 ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd edi, mm3 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 8 )
-#endif
-
- PROLOG()
-
- AS2( mov esi, ecx )
-
- #ifdef OLD_GCC_OFFSET
- AS2( add esi, 20 ) // digest_[0]
- #else
- AS2( add esi, 16 ) // digest_[0]
- #endif
-
- AS2( movd mm2, eax ) // store times_
- AS2( movd mm1, esi ) // store digest_
-
- AS2( sub esp, 68 ) // make room on stack
-
-#ifdef _MSC_VER
- AS1( loopStart: ) // loopStart
-#else
- AS1( 0: ) // loopStart for some gas (need numeric for jump back
-#endif
-
- // byte reverse 16 words of input, 4 at a time, put on stack for W[]
-
- // part 1
- AS2( mov eax, [edi] )
- AS2( mov ebx, [edi + 4] )
- AS2( mov ecx, [edi + 8] )
- AS2( mov edx, [edi + 12] )
-
- AS1( bswap eax )
- AS1( bswap ebx )
- AS1( bswap ecx )
- AS1( bswap edx )
-
- AS2( mov [esp], eax )
- AS2( mov [esp + 4], ebx )
- AS2( mov [esp + 8], ecx )
- AS2( mov [esp + 12], edx )
-
- // part 2
- AS2( mov eax, [edi + 16] )
- AS2( mov ebx, [edi + 20] )
- AS2( mov ecx, [edi + 24] )
- AS2( mov edx, [edi + 28] )
-
- AS1( bswap eax )
- AS1( bswap ebx )
- AS1( bswap ecx )
- AS1( bswap edx )
-
- AS2( mov [esp + 16], eax )
- AS2( mov [esp + 20], ebx )
- AS2( mov [esp + 24], ecx )
- AS2( mov [esp + 28], edx )
-
-
- // part 3
- AS2( mov eax, [edi + 32] )
- AS2( mov ebx, [edi + 36] )
- AS2( mov ecx, [edi + 40] )
- AS2( mov edx, [edi + 44] )
-
- AS1( bswap eax )
- AS1( bswap ebx )
- AS1( bswap ecx )
- AS1( bswap edx )
-
- AS2( mov [esp + 32], eax )
- AS2( mov [esp + 36], ebx )
- AS2( mov [esp + 40], ecx )
- AS2( mov [esp + 44], edx )
-
-
- // part 4
- AS2( mov eax, [edi + 48] )
- AS2( mov ebx, [edi + 52] )
- AS2( mov ecx, [edi + 56] )
- AS2( mov edx, [edi + 60] )
-
- AS1( bswap eax )
- AS1( bswap ebx )
- AS1( bswap ecx )
- AS1( bswap edx )
-
- AS2( mov [esp + 48], eax )
- AS2( mov [esp + 52], ebx )
- AS2( mov [esp + 56], ecx )
- AS2( mov [esp + 60], edx )
-
- AS2( mov [esp + 64], edi ) // store edi for end
-
- // read from digest_
- AS2( mov eax, [esi] ) // a1
- AS2( mov ebx, [esi + 4] ) // b1
- AS2( mov ecx, [esi + 8] ) // c1
- AS2( mov edx, [esi + 12] ) // d1
- AS2( mov ebp, [esi + 16] ) // e1
-
-
- ASMR0(eax, ebx, ecx, edx, ebp, 0)
- ASMR0(ebp, eax, ebx, ecx, edx, 1)
- ASMR0(edx, ebp, eax, ebx, ecx, 2)
- ASMR0(ecx, edx, ebp, eax, ebx, 3)
- ASMR0(ebx, ecx, edx, ebp, eax, 4)
- ASMR0(eax, ebx, ecx, edx, ebp, 5)
- ASMR0(ebp, eax, ebx, ecx, edx, 6)
- ASMR0(edx, ebp, eax, ebx, ecx, 7)
- ASMR0(ecx, edx, ebp, eax, ebx, 8)
- ASMR0(ebx, ecx, edx, ebp, eax, 9)
- ASMR0(eax, ebx, ecx, edx, ebp, 10)
- ASMR0(ebp, eax, ebx, ecx, edx, 11)
- ASMR0(edx, ebp, eax, ebx, ecx, 12)
- ASMR0(ecx, edx, ebp, eax, ebx, 13)
- ASMR0(ebx, ecx, edx, ebp, eax, 14)
- ASMR0(eax, ebx, ecx, edx, ebp, 15)
-
- ASMR1(ebp, eax, ebx, ecx, edx, 16, 0, 2, 8, 13)
- ASMR1(edx, ebp, eax, ebx, ecx, 17, 1, 3, 9, 14)
- ASMR1(ecx, edx, ebp, eax, ebx, 18, 2, 4, 10, 15)
- ASMR1(ebx, ecx, edx, ebp, eax, 19, 3, 5, 11, 0)
-
- ASMR2(eax, ebx, ecx, edx, ebp, 20, 4, 6, 12, 1)
- ASMR2(ebp, eax, ebx, ecx, edx, 21, 5, 7, 13, 2)
- ASMR2(edx, ebp, eax, ebx, ecx, 22, 6, 8, 14, 3)
- ASMR2(ecx, edx, ebp, eax, ebx, 23, 7, 9, 15, 4)
- ASMR2(ebx, ecx, edx, ebp, eax, 24, 8, 10, 0, 5)
- ASMR2(eax, ebx, ecx, edx, ebp, 25, 9, 11, 1, 6)
- ASMR2(ebp, eax, ebx, ecx, edx, 26, 10, 12, 2, 7)
- ASMR2(edx, ebp, eax, ebx, ecx, 27, 11, 13, 3, 8)
- ASMR2(ecx, edx, ebp, eax, ebx, 28, 12, 14, 4, 9)
- ASMR2(ebx, ecx, edx, ebp, eax, 29, 13, 15, 5, 10)
- ASMR2(eax, ebx, ecx, edx, ebp, 30, 14, 0, 6, 11)
- ASMR2(ebp, eax, ebx, ecx, edx, 31, 15, 1, 7, 12)
- ASMR2(edx, ebp, eax, ebx, ecx, 32, 0, 2, 8, 13)
- ASMR2(ecx, edx, ebp, eax, ebx, 33, 1, 3, 9, 14)
- ASMR2(ebx, ecx, edx, ebp, eax, 34, 2, 4, 10, 15)
- ASMR2(eax, ebx, ecx, edx, ebp, 35, 3, 5, 11, 0)
- ASMR2(ebp, eax, ebx, ecx, edx, 36, 4, 6, 12, 1)
- ASMR2(edx, ebp, eax, ebx, ecx, 37, 5, 7, 13, 2)
- ASMR2(ecx, edx, ebp, eax, ebx, 38, 6, 8, 14, 3)
- ASMR2(ebx, ecx, edx, ebp, eax, 39, 7, 9, 15, 4)
-
-
- ASMR3(eax, ebx, ecx, edx, ebp, 40, 8, 10, 0, 5)
- ASMR3(ebp, eax, ebx, ecx, edx, 41, 9, 11, 1, 6)
- ASMR3(edx, ebp, eax, ebx, ecx, 42, 10, 12, 2, 7)
- ASMR3(ecx, edx, ebp, eax, ebx, 43, 11, 13, 3, 8)
- ASMR3(ebx, ecx, edx, ebp, eax, 44, 12, 14, 4, 9)
- ASMR3(eax, ebx, ecx, edx, ebp, 45, 13, 15, 5, 10)
- ASMR3(ebp, eax, ebx, ecx, edx, 46, 14, 0, 6, 11)
- ASMR3(edx, ebp, eax, ebx, ecx, 47, 15, 1, 7, 12)
- ASMR3(ecx, edx, ebp, eax, ebx, 48, 0, 2, 8, 13)
- ASMR3(ebx, ecx, edx, ebp, eax, 49, 1, 3, 9, 14)
- ASMR3(eax, ebx, ecx, edx, ebp, 50, 2, 4, 10, 15)
- ASMR3(ebp, eax, ebx, ecx, edx, 51, 3, 5, 11, 0)
- ASMR3(edx, ebp, eax, ebx, ecx, 52, 4, 6, 12, 1)
- ASMR3(ecx, edx, ebp, eax, ebx, 53, 5, 7, 13, 2)
- ASMR3(ebx, ecx, edx, ebp, eax, 54, 6, 8, 14, 3)
- ASMR3(eax, ebx, ecx, edx, ebp, 55, 7, 9, 15, 4)
- ASMR3(ebp, eax, ebx, ecx, edx, 56, 8, 10, 0, 5)
- ASMR3(edx, ebp, eax, ebx, ecx, 57, 9, 11, 1, 6)
- ASMR3(ecx, edx, ebp, eax, ebx, 58, 10, 12, 2, 7)
- ASMR3(ebx, ecx, edx, ebp, eax, 59, 11, 13, 3, 8)
-
- ASMR4(eax, ebx, ecx, edx, ebp, 60, 12, 14, 4, 9)
- ASMR4(ebp, eax, ebx, ecx, edx, 61, 13, 15, 5, 10)
- ASMR4(edx, ebp, eax, ebx, ecx, 62, 14, 0, 6, 11)
- ASMR4(ecx, edx, ebp, eax, ebx, 63, 15, 1, 7, 12)
- ASMR4(ebx, ecx, edx, ebp, eax, 64, 0, 2, 8, 13)
- ASMR4(eax, ebx, ecx, edx, ebp, 65, 1, 3, 9, 14)
- ASMR4(ebp, eax, ebx, ecx, edx, 66, 2, 4, 10, 15)
- ASMR4(edx, ebp, eax, ebx, ecx, 67, 3, 5, 11, 0)
- ASMR4(ecx, edx, ebp, eax, ebx, 68, 4, 6, 12, 1)
- ASMR4(ebx, ecx, edx, ebp, eax, 69, 5, 7, 13, 2)
- ASMR4(eax, ebx, ecx, edx, ebp, 70, 6, 8, 14, 3)
- ASMR4(ebp, eax, ebx, ecx, edx, 71, 7, 9, 15, 4)
- ASMR4(edx, ebp, eax, ebx, ecx, 72, 8, 10, 0, 5)
- ASMR4(ecx, edx, ebp, eax, ebx, 73, 9, 11, 1, 6)
- ASMR4(ebx, ecx, edx, ebp, eax, 74, 10, 12, 2, 7)
- ASMR4(eax, ebx, ecx, edx, ebp, 75, 11, 13, 3, 8)
- ASMR4(ebp, eax, ebx, ecx, edx, 76, 12, 14, 4, 9)
- ASMR4(edx, ebp, eax, ebx, ecx, 77, 13, 15, 5, 10)
- ASMR4(ecx, edx, ebp, eax, ebx, 78, 14, 0, 6, 11)
- ASMR4(ebx, ecx, edx, ebp, eax, 79, 15, 1, 7, 12)
-
-
- AS2( movd esi, mm1 ) // digest_
-
- AS2( add [esi], eax ) // write out
- AS2( add [esi + 4], ebx )
- AS2( add [esi + 8], ecx )
- AS2( add [esi + 12], edx )
- AS2( add [esi + 16], ebp )
-
- // setup next round
- AS2( movd ebp, mm2 ) // times
-
- AS2( mov edi, DWORD PTR [esp + 64] ) // data
-
- AS2( add edi, 64 ) // next round of data
- AS2( mov [esp + 64], edi ) // restore
-
- AS1( dec ebp )
- AS2( movd mm2, ebp )
-#ifdef _MSC_VER
- AS1( jnz loopStart ) // loopStart
-#else
- AS1( jnz 0b ) // loopStart
-#endif
-
- // inline adjust
- AS2( add esp, 68 ) // fix room on stack
-
- EPILOG()
-}
-
-
-#endif // DO_SHA_ASM
-
-} // namespace
diff --git a/extra/yassl/taocrypt/src/tftables.cpp b/extra/yassl/taocrypt/src/tftables.cpp
deleted file mode 100644
index 1dd4a846abd..00000000000
--- a/extra/yassl/taocrypt/src/tftables.cpp
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- Copyright (C) 2000-2007 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* based on Wei Dai's tftables.cpp from CryptoPP */
-
-#include "runtime.hpp"
-#include "twofish.hpp"
-
-
-namespace TaoCrypt {
-
-
-const byte Twofish::q_[2][256] = {
-{
- 0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78,
- 0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C,
- 0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30,
- 0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82,
- 0x63, 0x01, 0x83, 0x2E, 0xD9, 0x51, 0x9B, 0x7C, 0xA6, 0xEB, 0xA5, 0xBE,
- 0x16, 0x0C, 0xE3, 0x61, 0xC0, 0x8C, 0x3A, 0xF5, 0x73, 0x2C, 0x25, 0x0B,
- 0xBB, 0x4E, 0x89, 0x6B, 0x53, 0x6A, 0xB4, 0xF1, 0xE1, 0xE6, 0xBD, 0x45,
- 0xE2, 0xF4, 0xB6, 0x66, 0xCC, 0x95, 0x03, 0x56, 0xD4, 0x1C, 0x1E, 0xD7,
- 0xFB, 0xC3, 0x8E, 0xB5, 0xE9, 0xCF, 0xBF, 0xBA, 0xEA, 0x77, 0x39, 0xAF,
- 0x33, 0xC9, 0x62, 0x71, 0x81, 0x79, 0x09, 0xAD, 0x24, 0xCD, 0xF9, 0xD8,
- 0xE5, 0xC5, 0xB9, 0x4D, 0x44, 0x08, 0x86, 0xE7, 0xA1, 0x1D, 0xAA, 0xED,
- 0x06, 0x70, 0xB2, 0xD2, 0x41, 0x7B, 0xA0, 0x11, 0x31, 0xC2, 0x27, 0x90,
- 0x20, 0xF6, 0x60, 0xFF, 0x96, 0x5C, 0xB1, 0xAB, 0x9E, 0x9C, 0x52, 0x1B,
- 0x5F, 0x93, 0x0A, 0xEF, 0x91, 0x85, 0x49, 0xEE, 0x2D, 0x4F, 0x8F, 0x3B,
- 0x47, 0x87, 0x6D, 0x46, 0xD6, 0x3E, 0x69, 0x64, 0x2A, 0xCE, 0xCB, 0x2F,
- 0xFC, 0x97, 0x05, 0x7A, 0xAC, 0x7F, 0xD5, 0x1A, 0x4B, 0x0E, 0xA7, 0x5A,
- 0x28, 0x14, 0x3F, 0x29, 0x88, 0x3C, 0x4C, 0x02, 0xB8, 0xDA, 0xB0, 0x17,
- 0x55, 0x1F, 0x8A, 0x7D, 0x57, 0xC7, 0x8D, 0x74, 0xB7, 0xC4, 0x9F, 0x72,
- 0x7E, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, 0x6E, 0x50, 0xDE, 0x68,
- 0x65, 0xBC, 0xDB, 0xF8, 0xC8, 0xA8, 0x2B, 0x40, 0xDC, 0xFE, 0x32, 0xA4,
- 0xCA, 0x10, 0x21, 0xF0, 0xD3, 0x5D, 0x0F, 0x00, 0x6F, 0x9D, 0x36, 0x42,
- 0x4A, 0x5E, 0xC1, 0xE0
-},
-{
- 0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B,
- 0x45, 0x7D, 0xE8, 0x4B, 0xD6, 0x32, 0xD8, 0xFD, 0x37, 0x71, 0xF1, 0xE1,
- 0x30, 0x0F, 0xF8, 0x1B, 0x87, 0xFA, 0x06, 0x3F, 0x5E, 0xBA, 0xAE, 0x5B,
- 0x8A, 0x00, 0xBC, 0x9D, 0x6D, 0xC1, 0xB1, 0x0E, 0x80, 0x5D, 0xD2, 0xD5,
- 0xA0, 0x84, 0x07, 0x14, 0xB5, 0x90, 0x2C, 0xA3, 0xB2, 0x73, 0x4C, 0x54,
- 0x92, 0x74, 0x36, 0x51, 0x38, 0xB0, 0xBD, 0x5A, 0xFC, 0x60, 0x62, 0x96,
- 0x6C, 0x42, 0xF7, 0x10, 0x7C, 0x28, 0x27, 0x8C, 0x13, 0x95, 0x9C, 0xC7,
- 0x24, 0x46, 0x3B, 0x70, 0xCA, 0xE3, 0x85, 0xCB, 0x11, 0xD0, 0x93, 0xB8,
- 0xA6, 0x83, 0x20, 0xFF, 0x9F, 0x77, 0xC3, 0xCC, 0x03, 0x6F, 0x08, 0xBF,
- 0x40, 0xE7, 0x2B, 0xE2, 0x79, 0x0C, 0xAA, 0x82, 0x41, 0x3A, 0xEA, 0xB9,
- 0xE4, 0x9A, 0xA4, 0x97, 0x7E, 0xDA, 0x7A, 0x17, 0x66, 0x94, 0xA1, 0x1D,
- 0x3D, 0xF0, 0xDE, 0xB3, 0x0B, 0x72, 0xA7, 0x1C, 0xEF, 0xD1, 0x53, 0x3E,
- 0x8F, 0x33, 0x26, 0x5F, 0xEC, 0x76, 0x2A, 0x49, 0x81, 0x88, 0xEE, 0x21,
- 0xC4, 0x1A, 0xEB, 0xD9, 0xC5, 0x39, 0x99, 0xCD, 0xAD, 0x31, 0x8B, 0x01,
- 0x18, 0x23, 0xDD, 0x1F, 0x4E, 0x2D, 0xF9, 0x48, 0x4F, 0xF2, 0x65, 0x8E,
- 0x78, 0x5C, 0x58, 0x19, 0x8D, 0xE5, 0x98, 0x57, 0x67, 0x7F, 0x05, 0x64,
- 0xAF, 0x63, 0xB6, 0xFE, 0xF5, 0xB7, 0x3C, 0xA5, 0xCE, 0xE9, 0x68, 0x44,
- 0xE0, 0x4D, 0x43, 0x69, 0x29, 0x2E, 0xAC, 0x15, 0x59, 0xA8, 0x0A, 0x9E,
- 0x6E, 0x47, 0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B,
- 0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9,
- 0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56,
- 0x55, 0x09, 0xBE, 0x91
-}
-};
-
-
-const word32 Twofish::mds_[4][256] = {
- {
- 0xbcbc3275, 0xecec21f3, 0x202043c6, 0xb3b3c9f4,
- 0xdada03db, 0x02028b7b, 0xe2e22bfb, 0x9e9efac8,
- 0xc9c9ec4a, 0xd4d409d3, 0x18186be6, 0x1e1e9f6b,
- 0x98980e45, 0xb2b2387d, 0xa6a6d2e8, 0x2626b74b,
- 0x3c3c57d6, 0x93938a32, 0x8282eed8, 0x525298fd,
- 0x7b7bd437, 0xbbbb3771, 0x5b5b97f1, 0x474783e1,
- 0x24243c30, 0x5151e20f, 0xbabac6f8, 0x4a4af31b,
- 0xbfbf4887, 0x0d0d70fa, 0xb0b0b306, 0x7575de3f,
- 0xd2d2fd5e, 0x7d7d20ba, 0x666631ae, 0x3a3aa35b,
- 0x59591c8a, 0x00000000, 0xcdcd93bc, 0x1a1ae09d,
- 0xaeae2c6d, 0x7f7fabc1, 0x2b2bc7b1, 0xbebeb90e,
- 0xe0e0a080, 0x8a8a105d, 0x3b3b52d2, 0x6464bad5,
- 0xd8d888a0, 0xe7e7a584, 0x5f5fe807, 0x1b1b1114,
- 0x2c2cc2b5, 0xfcfcb490, 0x3131272c, 0x808065a3,
- 0x73732ab2, 0x0c0c8173, 0x79795f4c, 0x6b6b4154,
- 0x4b4b0292, 0x53536974, 0x94948f36, 0x83831f51,
- 0x2a2a3638, 0xc4c49cb0, 0x2222c8bd, 0xd5d5f85a,
- 0xbdbdc3fc, 0x48487860, 0xffffce62, 0x4c4c0796,
- 0x4141776c, 0xc7c7e642, 0xebeb24f7, 0x1c1c1410,
- 0x5d5d637c, 0x36362228, 0x6767c027, 0xe9e9af8c,
- 0x4444f913, 0x1414ea95, 0xf5f5bb9c, 0xcfcf18c7,
- 0x3f3f2d24, 0xc0c0e346, 0x7272db3b, 0x54546c70,
- 0x29294cca, 0xf0f035e3, 0x0808fe85, 0xc6c617cb,
- 0xf3f34f11, 0x8c8ce4d0, 0xa4a45993, 0xcaca96b8,
- 0x68683ba6, 0xb8b84d83, 0x38382820, 0xe5e52eff,
- 0xadad569f, 0x0b0b8477, 0xc8c81dc3, 0x9999ffcc,
- 0x5858ed03, 0x19199a6f, 0x0e0e0a08, 0x95957ebf,
- 0x70705040, 0xf7f730e7, 0x6e6ecf2b, 0x1f1f6ee2,
- 0xb5b53d79, 0x09090f0c, 0x616134aa, 0x57571682,
- 0x9f9f0b41, 0x9d9d803a, 0x111164ea, 0x2525cdb9,
- 0xafafdde4, 0x4545089a, 0xdfdf8da4, 0xa3a35c97,
- 0xeaead57e, 0x353558da, 0xededd07a, 0x4343fc17,
- 0xf8f8cb66, 0xfbfbb194, 0x3737d3a1, 0xfafa401d,
- 0xc2c2683d, 0xb4b4ccf0, 0x32325dde, 0x9c9c71b3,
- 0x5656e70b, 0xe3e3da72, 0x878760a7, 0x15151b1c,
- 0xf9f93aef, 0x6363bfd1, 0x3434a953, 0x9a9a853e,
- 0xb1b1428f, 0x7c7cd133, 0x88889b26, 0x3d3da65f,
- 0xa1a1d7ec, 0xe4e4df76, 0x8181942a, 0x91910149,
- 0x0f0ffb81, 0xeeeeaa88, 0x161661ee, 0xd7d77321,
- 0x9797f5c4, 0xa5a5a81a, 0xfefe3feb, 0x6d6db5d9,
- 0x7878aec5, 0xc5c56d39, 0x1d1de599, 0x7676a4cd,
- 0x3e3edcad, 0xcbcb6731, 0xb6b6478b, 0xefef5b01,
- 0x12121e18, 0x6060c523, 0x6a6ab0dd, 0x4d4df61f,
- 0xcecee94e, 0xdede7c2d, 0x55559df9, 0x7e7e5a48,
- 0x2121b24f, 0x03037af2, 0xa0a02665, 0x5e5e198e,
- 0x5a5a6678, 0x65654b5c, 0x62624e58, 0xfdfd4519,
- 0x0606f48d, 0x404086e5, 0xf2f2be98, 0x3333ac57,
- 0x17179067, 0x05058e7f, 0xe8e85e05, 0x4f4f7d64,
- 0x89896aaf, 0x10109563, 0x74742fb6, 0x0a0a75fe,
- 0x5c5c92f5, 0x9b9b74b7, 0x2d2d333c, 0x3030d6a5,
- 0x2e2e49ce, 0x494989e9, 0x46467268, 0x77775544,
- 0xa8a8d8e0, 0x9696044d, 0x2828bd43, 0xa9a92969,
- 0xd9d97929, 0x8686912e, 0xd1d187ac, 0xf4f44a15,
- 0x8d8d1559, 0xd6d682a8, 0xb9b9bc0a, 0x42420d9e,
- 0xf6f6c16e, 0x2f2fb847, 0xdddd06df, 0x23233934,
- 0xcccc6235, 0xf1f1c46a, 0xc1c112cf, 0x8585ebdc,
- 0x8f8f9e22, 0x7171a1c9, 0x9090f0c0, 0xaaaa539b,
- 0x0101f189, 0x8b8be1d4, 0x4e4e8ced, 0x8e8e6fab,
- 0xababa212, 0x6f6f3ea2, 0xe6e6540d, 0xdbdbf252,
- 0x92927bbb, 0xb7b7b602, 0x6969ca2f, 0x3939d9a9,
- 0xd3d30cd7, 0xa7a72361, 0xa2a2ad1e, 0xc3c399b4,
- 0x6c6c4450, 0x07070504, 0x04047ff6, 0x272746c2,
- 0xacaca716, 0xd0d07625, 0x50501386, 0xdcdcf756,
- 0x84841a55, 0xe1e15109, 0x7a7a25be, 0x1313ef91
- },
- {
- 0xa9d93939, 0x67901717, 0xb3719c9c, 0xe8d2a6a6,
- 0x04050707, 0xfd985252, 0xa3658080, 0x76dfe4e4,
- 0x9a084545, 0x92024b4b, 0x80a0e0e0, 0x78665a5a,
- 0xe4ddafaf, 0xddb06a6a, 0xd1bf6363, 0x38362a2a,
- 0x0d54e6e6, 0xc6432020, 0x3562cccc, 0x98bef2f2,
- 0x181e1212, 0xf724ebeb, 0xecd7a1a1, 0x6c774141,
- 0x43bd2828, 0x7532bcbc, 0x37d47b7b, 0x269b8888,
- 0xfa700d0d, 0x13f94444, 0x94b1fbfb, 0x485a7e7e,
- 0xf27a0303, 0xd0e48c8c, 0x8b47b6b6, 0x303c2424,
- 0x84a5e7e7, 0x54416b6b, 0xdf06dddd, 0x23c56060,
- 0x1945fdfd, 0x5ba33a3a, 0x3d68c2c2, 0x59158d8d,
- 0xf321ecec, 0xae316666, 0xa23e6f6f, 0x82165757,
- 0x63951010, 0x015befef, 0x834db8b8, 0x2e918686,
- 0xd9b56d6d, 0x511f8383, 0x9b53aaaa, 0x7c635d5d,
- 0xa63b6868, 0xeb3ffefe, 0xa5d63030, 0xbe257a7a,
- 0x16a7acac, 0x0c0f0909, 0xe335f0f0, 0x6123a7a7,
- 0xc0f09090, 0x8cafe9e9, 0x3a809d9d, 0xf5925c5c,
- 0x73810c0c, 0x2c273131, 0x2576d0d0, 0x0be75656,
- 0xbb7b9292, 0x4ee9cece, 0x89f10101, 0x6b9f1e1e,
- 0x53a93434, 0x6ac4f1f1, 0xb499c3c3, 0xf1975b5b,
- 0xe1834747, 0xe66b1818, 0xbdc82222, 0x450e9898,
- 0xe26e1f1f, 0xf4c9b3b3, 0xb62f7474, 0x66cbf8f8,
- 0xccff9999, 0x95ea1414, 0x03ed5858, 0x56f7dcdc,
- 0xd4e18b8b, 0x1c1b1515, 0x1eada2a2, 0xd70cd3d3,
- 0xfb2be2e2, 0xc31dc8c8, 0x8e195e5e, 0xb5c22c2c,
- 0xe9894949, 0xcf12c1c1, 0xbf7e9595, 0xba207d7d,
- 0xea641111, 0x77840b0b, 0x396dc5c5, 0xaf6a8989,
- 0x33d17c7c, 0xc9a17171, 0x62ceffff, 0x7137bbbb,
- 0x81fb0f0f, 0x793db5b5, 0x0951e1e1, 0xaddc3e3e,
- 0x242d3f3f, 0xcda47676, 0xf99d5555, 0xd8ee8282,
- 0xe5864040, 0xc5ae7878, 0xb9cd2525, 0x4d049696,
- 0x44557777, 0x080a0e0e, 0x86135050, 0xe730f7f7,
- 0xa1d33737, 0x1d40fafa, 0xaa346161, 0xed8c4e4e,
- 0x06b3b0b0, 0x706c5454, 0xb22a7373, 0xd2523b3b,
- 0x410b9f9f, 0x7b8b0202, 0xa088d8d8, 0x114ff3f3,
- 0x3167cbcb, 0xc2462727, 0x27c06767, 0x90b4fcfc,
- 0x20283838, 0xf67f0404, 0x60784848, 0xff2ee5e5,
- 0x96074c4c, 0x5c4b6565, 0xb1c72b2b, 0xab6f8e8e,
- 0x9e0d4242, 0x9cbbf5f5, 0x52f2dbdb, 0x1bf34a4a,
- 0x5fa63d3d, 0x9359a4a4, 0x0abcb9b9, 0xef3af9f9,
- 0x91ef1313, 0x85fe0808, 0x49019191, 0xee611616,
- 0x2d7cdede, 0x4fb22121, 0x8f42b1b1, 0x3bdb7272,
- 0x47b82f2f, 0x8748bfbf, 0x6d2caeae, 0x46e3c0c0,
- 0xd6573c3c, 0x3e859a9a, 0x6929a9a9, 0x647d4f4f,
- 0x2a948181, 0xce492e2e, 0xcb17c6c6, 0x2fca6969,
- 0xfcc3bdbd, 0x975ca3a3, 0x055ee8e8, 0x7ad0eded,
- 0xac87d1d1, 0x7f8e0505, 0xd5ba6464, 0x1aa8a5a5,
- 0x4bb72626, 0x0eb9bebe, 0xa7608787, 0x5af8d5d5,
- 0x28223636, 0x14111b1b, 0x3fde7575, 0x2979d9d9,
- 0x88aaeeee, 0x3c332d2d, 0x4c5f7979, 0x02b6b7b7,
- 0xb896caca, 0xda583535, 0xb09cc4c4, 0x17fc4343,
- 0x551a8484, 0x1ff64d4d, 0x8a1c5959, 0x7d38b2b2,
- 0x57ac3333, 0xc718cfcf, 0x8df40606, 0x74695353,
- 0xb7749b9b, 0xc4f59797, 0x9f56adad, 0x72dae3e3,
- 0x7ed5eaea, 0x154af4f4, 0x229e8f8f, 0x12a2abab,
- 0x584e6262, 0x07e85f5f, 0x99e51d1d, 0x34392323,
- 0x6ec1f6f6, 0x50446c6c, 0xde5d3232, 0x68724646,
- 0x6526a0a0, 0xbc93cdcd, 0xdb03dada, 0xf8c6baba,
- 0xc8fa9e9e, 0xa882d6d6, 0x2bcf6e6e, 0x40507070,
- 0xdceb8585, 0xfe750a0a, 0x328a9393, 0xa48ddfdf,
- 0xca4c2929, 0x10141c1c, 0x2173d7d7, 0xf0ccb4b4,
- 0xd309d4d4, 0x5d108a8a, 0x0fe25151, 0x00000000,
- 0x6f9a1919, 0x9de01a1a, 0x368f9494, 0x42e6c7c7,
- 0x4aecc9c9, 0x5efdd2d2, 0xc1ab7f7f, 0xe0d8a8a8
- },
- {
- 0xbc75bc32, 0xecf3ec21, 0x20c62043, 0xb3f4b3c9,
- 0xdadbda03, 0x027b028b, 0xe2fbe22b, 0x9ec89efa,
- 0xc94ac9ec, 0xd4d3d409, 0x18e6186b, 0x1e6b1e9f,
- 0x9845980e, 0xb27db238, 0xa6e8a6d2, 0x264b26b7,
- 0x3cd63c57, 0x9332938a, 0x82d882ee, 0x52fd5298,
- 0x7b377bd4, 0xbb71bb37, 0x5bf15b97, 0x47e14783,
- 0x2430243c, 0x510f51e2, 0xbaf8bac6, 0x4a1b4af3,
- 0xbf87bf48, 0x0dfa0d70, 0xb006b0b3, 0x753f75de,
- 0xd25ed2fd, 0x7dba7d20, 0x66ae6631, 0x3a5b3aa3,
- 0x598a591c, 0x00000000, 0xcdbccd93, 0x1a9d1ae0,
- 0xae6dae2c, 0x7fc17fab, 0x2bb12bc7, 0xbe0ebeb9,
- 0xe080e0a0, 0x8a5d8a10, 0x3bd23b52, 0x64d564ba,
- 0xd8a0d888, 0xe784e7a5, 0x5f075fe8, 0x1b141b11,
- 0x2cb52cc2, 0xfc90fcb4, 0x312c3127, 0x80a38065,
- 0x73b2732a, 0x0c730c81, 0x794c795f, 0x6b546b41,
- 0x4b924b02, 0x53745369, 0x9436948f, 0x8351831f,
- 0x2a382a36, 0xc4b0c49c, 0x22bd22c8, 0xd55ad5f8,
- 0xbdfcbdc3, 0x48604878, 0xff62ffce, 0x4c964c07,
- 0x416c4177, 0xc742c7e6, 0xebf7eb24, 0x1c101c14,
- 0x5d7c5d63, 0x36283622, 0x672767c0, 0xe98ce9af,
- 0x441344f9, 0x149514ea, 0xf59cf5bb, 0xcfc7cf18,
- 0x3f243f2d, 0xc046c0e3, 0x723b72db, 0x5470546c,
- 0x29ca294c, 0xf0e3f035, 0x088508fe, 0xc6cbc617,
- 0xf311f34f, 0x8cd08ce4, 0xa493a459, 0xcab8ca96,
- 0x68a6683b, 0xb883b84d, 0x38203828, 0xe5ffe52e,
- 0xad9fad56, 0x0b770b84, 0xc8c3c81d, 0x99cc99ff,
- 0x580358ed, 0x196f199a, 0x0e080e0a, 0x95bf957e,
- 0x70407050, 0xf7e7f730, 0x6e2b6ecf, 0x1fe21f6e,
- 0xb579b53d, 0x090c090f, 0x61aa6134, 0x57825716,
- 0x9f419f0b, 0x9d3a9d80, 0x11ea1164, 0x25b925cd,
- 0xafe4afdd, 0x459a4508, 0xdfa4df8d, 0xa397a35c,
- 0xea7eead5, 0x35da3558, 0xed7aedd0, 0x431743fc,
- 0xf866f8cb, 0xfb94fbb1, 0x37a137d3, 0xfa1dfa40,
- 0xc23dc268, 0xb4f0b4cc, 0x32de325d, 0x9cb39c71,
- 0x560b56e7, 0xe372e3da, 0x87a78760, 0x151c151b,
- 0xf9eff93a, 0x63d163bf, 0x345334a9, 0x9a3e9a85,
- 0xb18fb142, 0x7c337cd1, 0x8826889b, 0x3d5f3da6,
- 0xa1eca1d7, 0xe476e4df, 0x812a8194, 0x91499101,
- 0x0f810ffb, 0xee88eeaa, 0x16ee1661, 0xd721d773,
- 0x97c497f5, 0xa51aa5a8, 0xfeebfe3f, 0x6dd96db5,
- 0x78c578ae, 0xc539c56d, 0x1d991de5, 0x76cd76a4,
- 0x3ead3edc, 0xcb31cb67, 0xb68bb647, 0xef01ef5b,
- 0x1218121e, 0x602360c5, 0x6add6ab0, 0x4d1f4df6,
- 0xce4ecee9, 0xde2dde7c, 0x55f9559d, 0x7e487e5a,
- 0x214f21b2, 0x03f2037a, 0xa065a026, 0x5e8e5e19,
- 0x5a785a66, 0x655c654b, 0x6258624e, 0xfd19fd45,
- 0x068d06f4, 0x40e54086, 0xf298f2be, 0x335733ac,
- 0x17671790, 0x057f058e, 0xe805e85e, 0x4f644f7d,
- 0x89af896a, 0x10631095, 0x74b6742f, 0x0afe0a75,
- 0x5cf55c92, 0x9bb79b74, 0x2d3c2d33, 0x30a530d6,
- 0x2ece2e49, 0x49e94989, 0x46684672, 0x77447755,
- 0xa8e0a8d8, 0x964d9604, 0x284328bd, 0xa969a929,
- 0xd929d979, 0x862e8691, 0xd1acd187, 0xf415f44a,
- 0x8d598d15, 0xd6a8d682, 0xb90ab9bc, 0x429e420d,
- 0xf66ef6c1, 0x2f472fb8, 0xdddfdd06, 0x23342339,
- 0xcc35cc62, 0xf16af1c4, 0xc1cfc112, 0x85dc85eb,
- 0x8f228f9e, 0x71c971a1, 0x90c090f0, 0xaa9baa53,
- 0x018901f1, 0x8bd48be1, 0x4eed4e8c, 0x8eab8e6f,
- 0xab12aba2, 0x6fa26f3e, 0xe60de654, 0xdb52dbf2,
- 0x92bb927b, 0xb702b7b6, 0x692f69ca, 0x39a939d9,
- 0xd3d7d30c, 0xa761a723, 0xa21ea2ad, 0xc3b4c399,
- 0x6c506c44, 0x07040705, 0x04f6047f, 0x27c22746,
- 0xac16aca7, 0xd025d076, 0x50865013, 0xdc56dcf7,
- 0x8455841a, 0xe109e151, 0x7abe7a25, 0x139113ef
- },
- {
- 0xd939a9d9, 0x90176790, 0x719cb371, 0xd2a6e8d2,
- 0x05070405, 0x9852fd98, 0x6580a365, 0xdfe476df,
- 0x08459a08, 0x024b9202, 0xa0e080a0, 0x665a7866,
- 0xddafe4dd, 0xb06addb0, 0xbf63d1bf, 0x362a3836,
- 0x54e60d54, 0x4320c643, 0x62cc3562, 0xbef298be,
- 0x1e12181e, 0x24ebf724, 0xd7a1ecd7, 0x77416c77,
- 0xbd2843bd, 0x32bc7532, 0xd47b37d4, 0x9b88269b,
- 0x700dfa70, 0xf94413f9, 0xb1fb94b1, 0x5a7e485a,
- 0x7a03f27a, 0xe48cd0e4, 0x47b68b47, 0x3c24303c,
- 0xa5e784a5, 0x416b5441, 0x06dddf06, 0xc56023c5,
- 0x45fd1945, 0xa33a5ba3, 0x68c23d68, 0x158d5915,
- 0x21ecf321, 0x3166ae31, 0x3e6fa23e, 0x16578216,
- 0x95106395, 0x5bef015b, 0x4db8834d, 0x91862e91,
- 0xb56dd9b5, 0x1f83511f, 0x53aa9b53, 0x635d7c63,
- 0x3b68a63b, 0x3ffeeb3f, 0xd630a5d6, 0x257abe25,
- 0xa7ac16a7, 0x0f090c0f, 0x35f0e335, 0x23a76123,
- 0xf090c0f0, 0xafe98caf, 0x809d3a80, 0x925cf592,
- 0x810c7381, 0x27312c27, 0x76d02576, 0xe7560be7,
- 0x7b92bb7b, 0xe9ce4ee9, 0xf10189f1, 0x9f1e6b9f,
- 0xa93453a9, 0xc4f16ac4, 0x99c3b499, 0x975bf197,
- 0x8347e183, 0x6b18e66b, 0xc822bdc8, 0x0e98450e,
- 0x6e1fe26e, 0xc9b3f4c9, 0x2f74b62f, 0xcbf866cb,
- 0xff99ccff, 0xea1495ea, 0xed5803ed, 0xf7dc56f7,
- 0xe18bd4e1, 0x1b151c1b, 0xada21ead, 0x0cd3d70c,
- 0x2be2fb2b, 0x1dc8c31d, 0x195e8e19, 0xc22cb5c2,
- 0x8949e989, 0x12c1cf12, 0x7e95bf7e, 0x207dba20,
- 0x6411ea64, 0x840b7784, 0x6dc5396d, 0x6a89af6a,
- 0xd17c33d1, 0xa171c9a1, 0xceff62ce, 0x37bb7137,
- 0xfb0f81fb, 0x3db5793d, 0x51e10951, 0xdc3eaddc,
- 0x2d3f242d, 0xa476cda4, 0x9d55f99d, 0xee82d8ee,
- 0x8640e586, 0xae78c5ae, 0xcd25b9cd, 0x04964d04,
- 0x55774455, 0x0a0e080a, 0x13508613, 0x30f7e730,
- 0xd337a1d3, 0x40fa1d40, 0x3461aa34, 0x8c4eed8c,
- 0xb3b006b3, 0x6c54706c, 0x2a73b22a, 0x523bd252,
- 0x0b9f410b, 0x8b027b8b, 0x88d8a088, 0x4ff3114f,
- 0x67cb3167, 0x4627c246, 0xc06727c0, 0xb4fc90b4,
- 0x28382028, 0x7f04f67f, 0x78486078, 0x2ee5ff2e,
- 0x074c9607, 0x4b655c4b, 0xc72bb1c7, 0x6f8eab6f,
- 0x0d429e0d, 0xbbf59cbb, 0xf2db52f2, 0xf34a1bf3,
- 0xa63d5fa6, 0x59a49359, 0xbcb90abc, 0x3af9ef3a,
- 0xef1391ef, 0xfe0885fe, 0x01914901, 0x6116ee61,
- 0x7cde2d7c, 0xb2214fb2, 0x42b18f42, 0xdb723bdb,
- 0xb82f47b8, 0x48bf8748, 0x2cae6d2c, 0xe3c046e3,
- 0x573cd657, 0x859a3e85, 0x29a96929, 0x7d4f647d,
- 0x94812a94, 0x492ece49, 0x17c6cb17, 0xca692fca,
- 0xc3bdfcc3, 0x5ca3975c, 0x5ee8055e, 0xd0ed7ad0,
- 0x87d1ac87, 0x8e057f8e, 0xba64d5ba, 0xa8a51aa8,
- 0xb7264bb7, 0xb9be0eb9, 0x6087a760, 0xf8d55af8,
- 0x22362822, 0x111b1411, 0xde753fde, 0x79d92979,
- 0xaaee88aa, 0x332d3c33, 0x5f794c5f, 0xb6b702b6,
- 0x96cab896, 0x5835da58, 0x9cc4b09c, 0xfc4317fc,
- 0x1a84551a, 0xf64d1ff6, 0x1c598a1c, 0x38b27d38,
- 0xac3357ac, 0x18cfc718, 0xf4068df4, 0x69537469,
- 0x749bb774, 0xf597c4f5, 0x56ad9f56, 0xdae372da,
- 0xd5ea7ed5, 0x4af4154a, 0x9e8f229e, 0xa2ab12a2,
- 0x4e62584e, 0xe85f07e8, 0xe51d99e5, 0x39233439,
- 0xc1f66ec1, 0x446c5044, 0x5d32de5d, 0x72466872,
- 0x26a06526, 0x93cdbc93, 0x03dadb03, 0xc6baf8c6,
- 0xfa9ec8fa, 0x82d6a882, 0xcf6e2bcf, 0x50704050,
- 0xeb85dceb, 0x750afe75, 0x8a93328a, 0x8ddfa48d,
- 0x4c29ca4c, 0x141c1014, 0x73d72173, 0xccb4f0cc,
- 0x09d4d309, 0x108a5d10, 0xe2510fe2, 0x00000000,
- 0x9a196f9a, 0xe01a9de0, 0x8f94368f, 0xe6c742e6,
- 0xecc94aec, 0xfdd25efd, 0xab7fc1ab, 0xd8a8e0d8
- }
-};
-
-
-} // namespace
-
diff --git a/extra/yassl/taocrypt/src/twofish.cpp b/extra/yassl/taocrypt/src/twofish.cpp
deleted file mode 100644
index 2e28ae52cd3..00000000000
--- a/extra/yassl/taocrypt/src/twofish.cpp
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-/* C++ based on Wei Dai's twofish.cpp from CryptoPP */
-/* x86 asm original */
-
-
-#if defined(TAOCRYPT_KERNEL_MODE)
- #define DO_TAOCRYPT_KERNEL_MODE
-#endif // only some modules now support this
-
-#include "runtime.hpp"
-#include "twofish.hpp"
-
-
-
-namespace TaoCrypt {
-
-
-#if defined(DO_TWOFISH_ASM)
-
-// ia32 optimized version
-void Twofish::Process(byte* out, const byte* in, word32 sz)
-{
- if (!isMMX) {
- Mode_BASE::Process(out, in, sz);
- return;
- }
-
- word32 blocks = sz / BLOCK_SIZE;
-
- if (mode_ == ECB)
- while (blocks--) {
- if (dir_ == ENCRYPTION)
- AsmEncrypt(in, out);
- else
- AsmDecrypt(in, out);
-
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- else if (mode_ == CBC) {
- if (dir_ == ENCRYPTION) {
- while (blocks--) {
- r_[0] ^= *(word32*)in;
- r_[1] ^= *(word32*)(in + 4);
- r_[2] ^= *(word32*)(in + 8);
- r_[3] ^= *(word32*)(in + 12);
-
- AsmEncrypt((byte*)r_, (byte*)r_);
- memcpy(out, r_, BLOCK_SIZE);
-
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- }
- else {
- while (blocks--) {
- AsmDecrypt(in, out);
-
- *(word32*)out ^= r_[0];
- *(word32*)(out + 4) ^= r_[1];
- *(word32*)(out + 8) ^= r_[2];
- *(word32*)(out + 12) ^= r_[3];
-
- memcpy(r_, in, BLOCK_SIZE);
-
- out += BLOCK_SIZE;
- in += BLOCK_SIZE;
- }
- }
- }
-}
-
-#endif // DO_TWOFISH_ASM
-
-
-namespace { // locals
-
-// compute (c * x^4) mod (x^4 + (a + 1/a) * x^3 + a * x^2 + (a + 1/a) * x + 1)
-// over GF(256)
-static inline unsigned int Mod(unsigned int c)
-{
- static const unsigned int modulus = 0x14d;
- unsigned int c2 = (c<<1) ^ ((c & 0x80) ? modulus : 0);
- unsigned int c1 = c2 ^ (c>>1) ^ ((c & 1) ? (modulus>>1) : 0);
- return c | (c1 << 8) | (c2 << 16) | (c1 << 24);
-}
-
-// compute RS(12,8) code with the above polynomial as generator
-// this is equivalent to multiplying by the RS matrix
-static word32 ReedSolomon(word32 high, word32 low)
-{
- for (unsigned int i=0; i<8; i++) {
- high = Mod(high>>24) ^ (high<<8) ^ (low>>24);
- low <<= 8;
- }
- return high;
-}
-
-} // local namespace
-
-
-
-inline word32 Twofish::h0(word32 x, const word32* key, unsigned int kLen)
-{
- x = x | (x<<8) | (x<<16) | (x<<24);
- switch(kLen)
- {
-#define Q(a, b, c, d, t) q_[a][GETBYTE(t,0)] ^ (q_[b][GETBYTE(t,1)] << 8) ^ \
- (q_[c][GETBYTE(t,2)] << 16) ^ (q_[d][GETBYTE(t,3)] << 24)
- case 4: x = Q(1, 0, 0, 1, x) ^ key[6];
- case 3: x = Q(1, 1, 0, 0, x) ^ key[4];
- case 2: x = Q(0, 1, 0, 1, x) ^ key[2];
- x = Q(0, 0, 1, 1, x) ^ key[0];
- }
- return x;
-}
-
-inline word32 Twofish::h(word32 x, const word32* key, unsigned int kLen)
-{
- x = h0(x, key, kLen);
- return mds_[0][GETBYTE(x,0)] ^ mds_[1][GETBYTE(x,1)] ^
- mds_[2][GETBYTE(x,2)] ^ mds_[3][GETBYTE(x,3)];
-}
-
-
-void Twofish::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/)
-{
- unsigned int len = (keylen <= 16 ? 2 : (keylen <= 24 ? 3 : 4));
- word32 key[8];
- GetUserKey(LittleEndianOrder, key, len*2, userKey, keylen);
-
- unsigned int i;
- for (i=0; i<40; i+=2) {
- word32 a = h(i, key, len);
- word32 b = rotlFixed(h(i+1, key+1, len), 8);
- k_[i] = a+b;
- k_[i+1] = rotlFixed(a+2*b, 9);
- }
-
- word32 svec[8];
- for (i=0; i<len; i++)
- svec[2*(len-i-1)] = ReedSolomon(key[2*i+1], key[2*i]);
-
- for (i=0; i<256; i++) {
- word32 t = h0(i, svec, len);
- s_[0][i] = mds_[0][GETBYTE(t, 0)];
- s_[1][i] = mds_[1][GETBYTE(t, 1)];
- s_[2][i] = mds_[2][GETBYTE(t, 2)];
- s_[3][i] = mds_[3][GETBYTE(t, 3)];
- }
-}
-
-
-void Twofish::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out)
- const
-{
- if (dir_ == ENCRYPTION)
- encrypt(in, xOr, out);
- else
- decrypt(in, xOr, out);
-}
-
-#define G1(x) (s_[0][GETBYTE(x,0)] ^ s_[1][GETBYTE(x,1)] ^ \
- s_[2][GETBYTE(x,2)] ^ s_[3][GETBYTE(x,3)])
-#define G2(x) (s_[0][GETBYTE(x,3)] ^ s_[1][GETBYTE(x,0)] ^ \
- s_[2][GETBYTE(x,1)] ^ s_[3][GETBYTE(x,2)])
-
-#define ENCROUND(n, a, b, c, d) \
- x = G1 (a); y = G2 (b); \
- x += y; y += x + k[2 * (n) + 1]; \
- (c) ^= x + k[2 * (n)]; \
- (c) = rotrFixed(c, 1); \
- (d) = rotlFixed(d, 1) ^ y
-
-#define ENCCYCLE(n) \
- ENCROUND (2 * (n), a, b, c, d); \
- ENCROUND (2 * (n) + 1, c, d, a, b)
-
-#define DECROUND(n, a, b, c, d) \
- x = G1 (a); y = G2 (b); \
- x += y; y += x; \
- (d) ^= y + k[2 * (n) + 1]; \
- (d) = rotrFixed(d, 1); \
- (c) = rotlFixed(c, 1); \
- (c) ^= (x + k[2 * (n)])
-
-#define DECCYCLE(n) \
- DECROUND (2 * (n) + 1, c, d, a, b); \
- DECROUND (2 * (n), a, b, c, d)
-
-
-typedef BlockGetAndPut<word32, LittleEndian> gpBlock;
-
-void Twofish::encrypt(const byte* inBlock, const byte* xorBlock,
- byte* outBlock) const
-{
- word32 x, y, a, b, c, d;
-
- gpBlock::Get(inBlock)(a)(b)(c)(d);
-
- a ^= k_[0];
- b ^= k_[1];
- c ^= k_[2];
- d ^= k_[3];
-
- const word32 *k = k_+8;
-
- ENCCYCLE (0);
- ENCCYCLE (1);
- ENCCYCLE (2);
- ENCCYCLE (3);
- ENCCYCLE (4);
- ENCCYCLE (5);
- ENCCYCLE (6);
- ENCCYCLE (7);
-
- c ^= k_[4];
- d ^= k_[5];
- a ^= k_[6];
- b ^= k_[7];
-
- gpBlock::Put(xorBlock, outBlock)(c)(d)(a)(b);
-}
-
-
-void Twofish::decrypt(const byte* inBlock, const byte* xorBlock,
- byte* outBlock) const
-{
- word32 x, y, a, b, c, d;
-
- gpBlock::Get(inBlock)(c)(d)(a)(b);
-
- c ^= k_[4];
- d ^= k_[5];
- a ^= k_[6];
- b ^= k_[7];
-
- const word32 *k = k_+8;
- DECCYCLE (7);
- DECCYCLE (6);
- DECCYCLE (5);
- DECCYCLE (4);
- DECCYCLE (3);
- DECCYCLE (2);
- DECCYCLE (1);
- DECCYCLE (0);
-
- a ^= k_[0];
- b ^= k_[1];
- c ^= k_[2];
- d ^= k_[3];
-
- gpBlock::Put(xorBlock, outBlock)(a)(b)(c)(d);
-}
-
-
-
-#if defined(DO_TWOFISH_ASM)
- #ifdef __GNUC__
- #define AS1(x) #x ";"
- #define AS2(x, y) #x ", " #y ";"
-
- #define PROLOG() \
- __asm__ __volatile__ \
- ( \
- ".intel_syntax noprefix;" \
- "push ebx;" \
- "push ebp;" \
- "movd mm3, eax;" \
- "movd mm6, ebp;"
- #define EPILOG() \
- "pop ebp;" \
- "pop ebx;" \
- "emms;" \
- ".att_syntax;" \
- : \
- : "D" (this), "S" (inBlock), "a" (outBlock) \
- : "%ecx", "%edx", "memory", "cc" \
- );
-
- #else
- #define AS1(x) __asm x
- #define AS2(x, y) __asm x, y
-
- #define PROLOG() \
- AS1( push ebp ) \
- AS2( mov ebp, esp ) \
- AS2( movd mm3, edi ) \
- AS2( movd mm4, ebx ) \
- AS2( movd mm5, esi ) \
- AS2( movd mm6, ebp ) \
- AS2( mov edi, ecx ) \
- AS2( mov esi, DWORD PTR [ebp + 8] )
-
- /* ebp already set */
- #define EPILOG() \
- AS2( movd esi, mm5 ) \
- AS2( movd ebx, mm4 ) \
- AS2( movd edi, mm3 ) \
- AS2( mov esp, ebp ) \
- AS1( pop ebp ) \
- AS1( emms ) \
- AS1( ret 8 )
-
- #endif
-
-
-
-
- // x = esi, y = [esp], s_ = ebp
- // edi always open for G1 and G2
- // G1 also uses edx after save and restore
- // G2 also uses eax after save and restore
- // and ecx for tmp [esp] which Rounds also use
- // and restore from mm7
-
- // x = G1(a) bytes(0,1,2,3)
-#define ASMG1(z, zl, zh) \
- AS2( movd mm2, edx ) \
- AS2( movzx edi, zl ) \
- AS2( mov esi, DWORD PTR [ebp + edi*4] ) \
- AS2( movzx edx, zh ) \
- AS2( xor esi, DWORD PTR 1024[ebp + edx*4] ) \
- \
- AS2( mov edx, z ) \
- AS2( shr edx, 16 ) \
- AS2( movzx edi, dl ) \
- AS2( xor esi, DWORD PTR 2048[ebp + edi*4] ) \
- AS2( movzx edx, dh ) \
- AS2( xor esi, DWORD PTR 3072[ebp + edx*4] ) \
- AS2( movd edx, mm2 )
-
-
- // y = G2(b) bytes(3,0,1,2) [ put y into ecx for Rounds ]
-#define ASMG2(z, zl, zh) \
- AS2( movd mm7, ecx ) \
- AS2( movd mm2, eax ) \
- AS2( mov edi, z ) \
- AS2( shr edi, 24 ) \
- AS2( mov ecx, DWORD PTR [ebp + edi*4] ) \
- AS2( movzx eax, zl ) \
- AS2( xor ecx, DWORD PTR 1024[ebp + eax*4] ) \
- \
- AS2( mov eax, z ) \
- AS2( shr eax, 16 ) \
- AS2( movzx edi, zh ) \
- AS2( xor ecx, DWORD PTR 2048[ebp + edi*4] ) \
- AS2( movzx eax, al ) \
- AS2( xor ecx, DWORD PTR 3072[ebp + eax*4] ) \
- AS2( movd eax, mm2 )
-
-
- // encrypt Round (n),
- // x = esi, k = ebp, edi open
- // y is in ecx from G2, restore when done from mm7
- // before C (which be same register!)
-#define ASMENCROUND(N, A, A2, A3, B, B2, B3, C, D) \
- /* setup s_ */ \
- AS2( movd ebp, mm1 ) \
- ASMG1(A, A2, A3) \
- ASMG2(B, B2, B3) \
- /* setup k */ \
- AS2( movd ebp, mm0 ) \
- /* x += y */ \
- AS2( add esi, ecx ) \
- AS2( add ebp, 32 ) \
- /* y += x + k[2 * (n) + 1] */ \
- AS2( add ecx, esi ) \
- AS2( rol D, 1 ) \
- AS2( add ecx, DWORD PTR [ebp + 8 * N + 4] ) \
- /* (d) = rotlFixed(d, 1) ^ y */ \
- AS2( xor D, ecx ) \
- AS2( movd ecx, mm7 ) \
- /* (c) ^= x + k[2 * (n)] */ \
- AS2( mov edi, esi ) \
- AS2( add edi, DWORD PTR [ebp + 8 * N] ) \
- AS2( xor C, edi ) \
- /* (c) = rotrFixed(c, 1) */ \
- AS2( ror C, 1 )
-
-
- // decrypt Round (n),
- // x = esi, k = ebp, edi open
- // y is in ecx from G2, restore ecx from mm7 when done
-#define ASMDECROUND(N, A, A2, A3, B, B2, B3, C, D) \
- /* setup s_ */ \
- AS2( movd ebp, mm1 ) \
- ASMG1(A, A2, A3) \
- ASMG2(B, B2, B3) \
- /* setup k */ \
- AS2( movd ebp, mm0 ) \
- /* x += y */ \
- AS2( add esi, ecx ) \
- AS2( add ebp, 32 ) \
- /* y += x */ \
- AS2( add ecx, esi ) \
- /* (d) ^= y + k[2 * (n) + 1] */ \
- AS2( mov edi, DWORD PTR [ebp + 8 * N + 4] ) \
- AS2( add edi, ecx ) \
- AS2( movd ecx, mm7 ) \
- AS2( xor D, edi ) \
- /* (d) = rotrFixed(d, 1) */ \
- AS2( ror D, 1 ) \
- /* (c) = rotlFixed(c, 1) */ \
- AS2( rol C, 1 ) \
- /* (c) ^= (x + k[2 * (n)]) */ \
- AS2( mov edi, esi ) \
- AS2( add edi, DWORD PTR [ebp + 8 * N] ) \
- AS2( xor C, edi )
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void Twofish::AsmEncrypt(const byte* inBlock, byte* outBlock) const
-{
- PROLOG()
-
- #ifdef OLD_GCC_OFFSET
- AS2( add edi, 60 ) // k_
- #else
- AS2( add edi, 56 ) // k_
- #endif
-
- AS2( mov ebp, edi )
-
- AS2( mov eax, DWORD PTR [esi] ) // a
- AS2( movd mm0, edi ) // store k_
- AS2( mov ebx, DWORD PTR [esi + 4] ) // b
- AS2( add ebp, 160 ) // s_[0]
- AS2( mov ecx, DWORD PTR [esi + 8] ) // c
- AS2( movd mm1, ebp ) // store s_
- AS2( mov edx, DWORD PTR [esi + 12] ) // d
-
- AS2( xor eax, DWORD PTR [edi] ) // k_[0]
- AS2( xor ebx, DWORD PTR [edi + 4] ) // [1]
- AS2( xor ecx, DWORD PTR [edi + 8] ) // [2]
- AS2( xor edx, DWORD PTR [edi + 12] ) // [3]
-
-
- ASMENCROUND( 0, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND( 1, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMENCROUND( 2, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND( 3, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMENCROUND( 4, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND( 5, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMENCROUND( 6, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND( 7, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMENCROUND( 8, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND( 9, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMENCROUND(10, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND(11, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMENCROUND(12, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND(13, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMENCROUND(14, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMENCROUND(15, ecx, cl, ch, edx, dl, dh, eax, ebx)
-
-
- AS2( movd ebp, mm6 )
- AS2( movd esi, mm0 ) // k_
- #ifdef __GNUC__
- AS2( movd edi, mm3 ) // outBlock
- #else
- AS2( mov edi, [ebp + 12] ) // outBlock
- #endif
-
- AS2( xor ecx, DWORD PTR [esi + 16] ) // k_[4]
- AS2( xor edx, DWORD PTR [esi + 20] ) // k_[5]
- AS2( xor eax, DWORD PTR [esi + 24] ) // k_[6]
- AS2( xor ebx, DWORD PTR [esi + 28] ) // k_[7]
-
- AS2( mov [edi], ecx ) // write out
- AS2( mov [edi + 4], edx ) // write out
- AS2( mov [edi + 8], eax ) // write out
- AS2( mov [edi + 12], ebx ) // write out
-
-
- EPILOG()
-}
-
-
-#ifdef _MSC_VER
- __declspec(naked)
-#else
- __attribute__ ((noinline))
-#endif
-void Twofish::AsmDecrypt(const byte* inBlock, byte* outBlock) const
-{
- PROLOG()
-
- #ifdef OLD_GCC_OFFSET
- AS2( add edi, 60 ) // k_
- #else
- AS2( add edi, 56 ) // k_
- #endif
-
- AS2( mov ebp, edi )
-
- AS2( mov ecx, DWORD PTR [esi] ) // c
- AS2( movd mm0, edi ) // store k_
- AS2( mov edx, DWORD PTR [esi + 4] ) // d
- AS2( add ebp, 160 ) // s_[0]
- AS2( mov eax, DWORD PTR [esi + 8] ) // a
- AS2( movd mm1, ebp ) // store s_
- AS2( mov ebx, DWORD PTR [esi + 12] ) // b
-
- AS2( xor ecx, DWORD PTR [edi + 16] ) // k_[4]
- AS2( xor edx, DWORD PTR [edi + 20] ) // [5]
- AS2( xor eax, DWORD PTR [edi + 24] ) // [6]
- AS2( xor ebx, DWORD PTR [edi + 28] ) // [7]
-
-
- ASMDECROUND(15, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND(14, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMDECROUND(13, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND(12, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMDECROUND(11, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND(10, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMDECROUND( 9, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND( 8, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMDECROUND( 7, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND( 6, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMDECROUND( 5, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND( 4, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMDECROUND( 3, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND( 2, eax, al, ah, ebx, bl, bh, ecx, edx)
- ASMDECROUND( 1, ecx, cl, ch, edx, dl, dh, eax, ebx)
- ASMDECROUND( 0, eax, al, ah, ebx, bl, bh, ecx, edx)
-
-
- AS2( movd ebp, mm6 )
- AS2( movd esi, mm0 ) // k_
- #ifdef __GNUC__
- AS2( movd edi, mm3 ) // outBlock
- #else
- AS2( mov edi, [ebp + 12] ) // outBlock
- #endif
-
- AS2( xor eax, DWORD PTR [esi ] ) // k_[0]
- AS2( xor ebx, DWORD PTR [esi + 4] ) // k_[1]
- AS2( xor ecx, DWORD PTR [esi + 8] ) // k_[2]
- AS2( xor edx, DWORD PTR [esi + 12] ) // k_[3]
-
- AS2( mov [edi], eax ) // write out
- AS2( mov [edi + 4], ebx ) // write out
- AS2( mov [edi + 8], ecx ) // write out
- AS2( mov [edi + 12], edx ) // write out
-
-
- EPILOG()
-}
-
-
-
-#endif // defined(DO_TWOFISH_ASM)
-
-
-
-
-
-} // namespace
-
-
diff --git a/extra/yassl/taocrypt/taocrypt.dsp b/extra/yassl/taocrypt/taocrypt.dsp
deleted file mode 100644
index 9c8e74da8c8..00000000000
--- a/extra/yassl/taocrypt/taocrypt.dsp
+++ /dev/null
@@ -1,321 +0,0 @@
-# Microsoft Developer Studio Project File - Name="taocrypt" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=taocrypt - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "taocrypt.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "taocrypt.mak" CFG="taocrypt - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "taocrypt - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "taocrypt - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "taocrypt - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "taocrypt___Win32_Release"
-# PROP BASE Intermediate_Dir "taocrypt___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /O2 /I "include" /I "mySTL" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "taocrypt - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "taocrypt___Win32_Debug"
-# PROP BASE Intermediate_Dir "taocrypt___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "include" /I "mySTL" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# SUBTRACT CPP /Fr
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "taocrypt - Win32 Release"
-# Name "taocrypt - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\src\aes.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\aestables.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\algebra.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\arc4.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\asn.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\bftables.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\blowfish.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\coding.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\des.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\dh.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\dsa.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\file.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\hash.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\hc128.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\integer.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\md2.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\md4.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\md5.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\misc.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\rabbit.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\random.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\ripemd.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\rsa.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\sha.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\tftables.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\twofish.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\include\aes.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\algebra.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arc4.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\asn.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\block.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\blowfish.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\coding.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\des.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\dh.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\dsa.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\error.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\file.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\hash.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\hc128.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\hmac.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\integer.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\md2.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\md4.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\md5.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\misc.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\modarith.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\modes.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\pwdbased.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\rabbit.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\random.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\ripemd.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\rsa.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\sha.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\twofish.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\type_traits.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\types.hpp
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/taocrypt/taocrypt.dsw b/extra/yassl/taocrypt/taocrypt.dsw
deleted file mode 100644
index 43115069160..00000000000
--- a/extra/yassl/taocrypt/taocrypt.dsw
+++ /dev/null
@@ -1,59 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "benchmark"=.\benchmark\benchmark.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name taocrypt
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "taocrypt"=.\taocrypt.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "test"=.\test\test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name taocrypt
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/extra/yassl/taocrypt/test.dsw b/extra/yassl/taocrypt/test.dsw
deleted file mode 100644
index b5c03bc6e03..00000000000
--- a/extra/yassl/taocrypt/test.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "test"=.\test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/extra/yassl/taocrypt/test/make.bat b/extra/yassl/taocrypt/test/make.bat
deleted file mode 100755
index cfb762ce847..00000000000
--- a/extra/yassl/taocrypt/test/make.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-REM
-REM This program is free software; you can redistribute it and/or modify
-REM it under the terms of the GNU General Public License as published by
-REM the Free Software Foundation; version 2 of the License.
-REM
-REM This program is distributed in the hope that it will be useful,
-REM but WITHOUT ANY WARRANTY; without even the implied warranty of
-REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-REM GNU General Public License for more details.
-REM
-REM You should have received a copy of the GNU General Public License
-REM along with this program; if not, write to the Free Software
-REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-REM quick and dirty build file for testing different MSDEVs
-setlocal
-
-set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2
-
-cl %myFLAGS% test.cpp
-
-link.exe /out:test.exe ../src/taocrypt.lib test.obj advapi32.lib
-
diff --git a/extra/yassl/taocrypt/test/memory.cpp b/extra/yassl/taocrypt/test/memory.cpp
deleted file mode 100644
index 99f1fd646d4..00000000000
--- a/extra/yassl/taocrypt/test/memory.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-// memory.cpp
-#include "../../include/lock.hpp" // locking
-#include <new> // std::bad_alloc
-#include <cstdlib> // malloc
-#include <cstring> // memset
-#include <fstream> // ofstream
-#include <sstream> // stringstream
-#include <cassert> // assert
-#include <iomanip> // setiosflags
-
-/*********************************************************************
-
-To use MemoryTracker merely add this file to your project
-No need to instantiate anything
-
-If your app is multi threaded define MULTI_THREADED
-
-*********************************************************************/
-
-
-// locals
-namespace {
-
-class MemoryTracker {
- std::ofstream log_;
-public:
- MemoryTracker();
- ~MemoryTracker();
-private:
- MemoryTracker(const MemoryTracker&); // hide copy
- MemoryTracker& operator=(const MemoryTracker&); // and assign
-
- void LogStats();
-};
-
-
-struct alloc_node {
- alloc_node* left_;
- alloc_node* right_;
-
- alloc_node() : left_(0), right_(0) {}
-};
-
-
-alloc_node* Root = 0;
-
-size_t Allocs = 0;
-size_t DeAllocs = 0;
-size_t Bytes = 0;
-
-
-struct size_tracker {
- size_t size_;
- size_t count_;
-};
-
-size_tracker sizes[] =
-{
- {0,0},
- {2,0},
- {4,0},
- {8,0},
- {16,0},
- {32,0},
- {64,0},
- {128,0},
- {256,0},
- {512,0},
- {1024,0},
- {2048,0},
- {4096,0},
- {8192,0},
-};
-
-const size_t size_elements(sizeof(sizes) / sizeof(size_tracker));
-
-bool Tracking(false);
-
-using yaSSL::Mutex;
-typedef Mutex::Lock Lock;
-
-Mutex mutex;
-
-MemoryTracker theTracker;
-
-
-bool lookup(alloc_node*& find, void* key, alloc_node*& prev)
-{
- bool found(false);
-
- while (find) {
- if (find == key) {
- found = true;
- break;
- }
- prev = find;
- if (key < find)
- find = find->left_;
- else
- find = find->right_;
- }
- return found;
-}
-
-
-// iterative insert
-void insert(alloc_node* entry)
-{
- if (!Root) {
- Root = entry;
- return;
- }
-
- alloc_node* tmp = Root;
- alloc_node* prev = 0;
-
- if (lookup(tmp, entry, prev))
- assert(0); // duplicate
-
- if (entry < prev)
- prev->left_ = entry;
- else
- prev->right_ = entry;
-}
-
-
-alloc_node* predecessorSwap(alloc_node* del)
-{
- alloc_node* pred = del->left_;
- alloc_node* predPrev = del;
-
- while (pred->right_) {
- predPrev = pred;
- pred = pred->right_;
- }
- if (predPrev == del)
- predPrev->left_ = pred->left_;
- else
- predPrev->right_ = pred->left_;
-
- pred->left_ = del->left_;
- pred->right_ = del->right_;
-
- return pred;
-}
-
-
-// iterative remove
-void remove(void* ptr)
-{
- alloc_node* del = Root;
- alloc_node* prev = 0;
- alloc_node* replace = 0;
-
- if ( lookup(del, ptr, prev) == false)
- assert(0); // oops, not there
-
- if (del->left_ && del->right_) // two children
- replace = predecessorSwap(del);
- else if (!del->left_ && !del->right_) // no children
- replace = 0;
- else // one child
- replace = (del->left_) ? del->left_ : del->right_;
-
- if (del == Root)
- Root = replace;
- else if (prev->left_ == del)
- prev->left_ = replace;
- else
- prev->right_ = replace;
-}
-
-
-typedef void (*fp)(alloc_node*, void*);
-
-void applyInOrder(alloc_node* root, fp f, void* arg)
-{
- if (root == 0)
- return;
-
- applyInOrder(root->left_, f, arg);
- f(root, arg);
- applyInOrder(root->right_, f, arg);
-}
-
-
-void show(alloc_node* ptr, void* arg)
-{
- std::ofstream* log = static_cast<std::ofstream*>(arg);
- *log << ptr << '\n';
-}
-
-
-MemoryTracker::MemoryTracker() : log_("memory.log")
-{
-#ifdef __GNUC__
- // Force pool allocator to cleanup at exit
- setenv("GLIBCPP_FORCE_NEW", "1", 0);
-#endif
-
-#ifdef _MSC_VER
- // msvc6 needs to create Facility for ostream before main starts, otherwise
- // if another ostream is created and destroyed in main scope, log stats
- // will access a dead Facility reference (std::numput)
- int msvcFac = 6;
- log_ << "MSVC " << msvcFac << "workaround" << std::endl;
-#endif
-
-
- Tracking = true;
-}
-
-
-MemoryTracker::~MemoryTracker()
-{
- // stop tracking before log (which will alloc on output)
- Tracking = false;
- LogStats();
-
- //assert(Allocs == DeAllocs);
- //assert(Root == 0);
-}
-
-
-void MemoryTracker::LogStats()
-{
- log_ << "Number of Allocs: " << Allocs << '\n';
- log_ << "Number of DeAllocs: " << DeAllocs << '\n';
- log_ << "Number of bytes used: " << Bytes << '\n';
-
- log_ << "Alloc size table:\n";
- log_ << " Bytes " << '\t' << " Times\n";
-
- for (size_t i = 0; i < size_elements; ++i) {
- log_ << " " << sizes[i].size_ << " " << '\t';
- log_ << std::setiosflags(std::ios::right) << std::setw(8);
- log_ << sizes[i].count_ << '\n';
- }
-
- if (Allocs != DeAllocs) {
- log_<< "Showing new'd allocs with no deletes" << '\n';
- applyInOrder(Root, show, &log_);
- }
- log_.flush();
-}
-
-
-// return power of 2 up to size_tracker elements
-size_t powerOf2(size_t sz)
-{
- size_t shifts = 0;
-
- if (sz)
- sz -= 1;
- else
- return 0;
-
- while (sz) {
- sz >>= 1;
- ++shifts;
- }
-
- return shifts < size_elements ? shifts : size_elements;
-}
-
-
-} // namespace local
-
-
-void* operator new(size_t sz)
-{
- // put alloc node in front of requested memory
- void* ptr = malloc(sz + sizeof(alloc_node));
- if (ptr) {
- if (Tracking) {
- Lock l(mutex);
- ++Allocs;
- Bytes += sz;
- ++sizes[powerOf2(sz)].count_;
- insert(new (ptr) alloc_node);
- }
- return static_cast<char*>(ptr) + sizeof(alloc_node);
- }
- else
- assert(0);
-}
-
-
-void operator delete(void* ptr)
-{
- if (ptr) {
- ptr = static_cast<char*>(ptr) - sizeof(alloc_node); // correct offset
- if (Tracking) {
- Lock l(mutex);
- ++DeAllocs;
- remove(ptr);
- }
- free(ptr);
- }
-}
-
-
-void* operator new[](size_t sz)
-{
- return ::operator new(sz);
-}
-
-
-void operator delete[](void* ptr)
-{
- ::operator delete(ptr);
-}
-
-
-extern "C" {
-
-void* XMALLOC(size_t sz, void* head)
-{
- return ::operator new(sz);
-}
-
-void* XREALLOC(void* ptr, size_t sz, void* heap)
-{
- void* ret = ::operator new(sz);
-
- if (ret && ptr)
- memcpy(ret, ptr, sz);
-
- if (ret)
- ::operator delete(ptr);
- return ret;
-}
-
-
-void XFREE(void* ptr, void* heap)
-{
- ::operator delete(ptr);
-}
-
-} // extern "C"
-
diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp
deleted file mode 100644
index cf1ec551fe3..00000000000
--- a/extra/yassl/taocrypt/test/test.cpp
+++ /dev/null
@@ -1,1358 +0,0 @@
-/*
- Copyright (c) 2006, 2014, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-// test.cpp
-// test taocrypt functionality
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string.h>
-#include <stdio.h>
-
-#include "runtime.hpp"
-#include "sha.hpp"
-#include "md5.hpp"
-#include "md2.hpp"
-#include "md4.hpp"
-#include "ripemd.hpp"
-#include "hmac.hpp"
-#include "arc4.hpp"
-#include "des.hpp"
-#include "rsa.hpp"
-#include "dsa.hpp"
-#include "aes.hpp"
-#include "twofish.hpp"
-#include "blowfish.hpp"
-#include "asn.hpp"
-#include "dh.hpp"
-#include "coding.hpp"
-#include "random.hpp"
-#include "pwdbased.hpp"
-#include "rabbit.hpp"
-#include "hc128.hpp"
-
-
-
-using TaoCrypt::byte;
-using TaoCrypt::word32;
-using TaoCrypt::SHA;
-using TaoCrypt::SHA256;
-using TaoCrypt::SHA224;
-#ifdef WORD64_AVAILABLE
- using TaoCrypt::SHA512;
- using TaoCrypt::SHA384;
-#endif
-using TaoCrypt::MD5;
-using TaoCrypt::MD2;
-using TaoCrypt::MD4;
-using TaoCrypt::RIPEMD160;
-using TaoCrypt::HMAC;
-using TaoCrypt::ARC4;
-using TaoCrypt::DES_EDE3_CBC_Encryption;
-using TaoCrypt::DES_EDE3_CBC_Decryption;
-using TaoCrypt::DES_CBC_Encryption;
-using TaoCrypt::DES_CBC_Decryption;
-using TaoCrypt::DES_ECB_Encryption;
-using TaoCrypt::DES_ECB_Decryption;
-using TaoCrypt::AES_CBC_Encryption;
-using TaoCrypt::AES_CBC_Decryption;
-using TaoCrypt::AES_ECB_Encryption;
-using TaoCrypt::AES_ECB_Decryption;
-using TaoCrypt::Twofish_CBC_Encryption;
-using TaoCrypt::Twofish_CBC_Decryption;
-using TaoCrypt::Twofish_ECB_Encryption;
-using TaoCrypt::Twofish_ECB_Decryption;
-using TaoCrypt::Blowfish_CBC_Encryption;
-using TaoCrypt::Blowfish_CBC_Decryption;
-using TaoCrypt::Blowfish_ECB_Encryption;
-using TaoCrypt::Blowfish_ECB_Decryption;
-using TaoCrypt::RSA_PrivateKey;
-using TaoCrypt::RSA_PublicKey;
-using TaoCrypt::DSA_PrivateKey;
-using TaoCrypt::DSA_PublicKey;
-using TaoCrypt::DSA_Signer;
-using TaoCrypt::DSA_Verifier;
-using TaoCrypt::RSAES_Encryptor;
-using TaoCrypt::RSAES_Decryptor;
-using TaoCrypt::Source;
-using TaoCrypt::FileSource;
-using TaoCrypt::FileSource;
-using TaoCrypt::HexDecoder;
-using TaoCrypt::HexEncoder;
-using TaoCrypt::Base64Decoder;
-using TaoCrypt::Base64Encoder;
-using TaoCrypt::CertDecoder;
-using TaoCrypt::DH;
-using TaoCrypt::EncodeDSA_Signature;
-using TaoCrypt::DecodeDSA_Signature;
-using TaoCrypt::PBKDF2_HMAC;
-using TaoCrypt::tcArrayDelete;
-using TaoCrypt::GetCert;
-using TaoCrypt::GetPKCS_Cert;
-using TaoCrypt::Rabbit;
-using TaoCrypt::HC128;
-
-struct testVector {
- byte* input_;
- byte* output_;
- word32 inLen_;
- word32 outLen_;
-
- testVector(const char* in, const char* out) : input_((byte*)in),
- output_((byte*)out), inLen_((word32)strlen(in)),
- outLen_((word32)strlen(out)) {}
-};
-
-int sha_test();
-int sha256_test();
-#ifdef WORD64_AVAILABLE
- int sha512_test();
- int sha384_test();
-#endif
-int sha224_test();
-int md5_test();
-int md2_test();
-int md4_test();
-int ripemd_test();
-int hmac_test();
-int arc4_test();
-int des_test();
-int aes_test();
-int twofish_test();
-int blowfish_test();
-int rsa_test();
-int dsa_test();
-int dh_test();
-int pwdbased_test();
-int pkcs12_test();
-int rabbit_test();
-int hc128_test();
-
-TaoCrypt::RandomNumberGenerator rng;
-
-
-void err_sys(const char* msg, int es)
-{
- printf("%s\n", msg);
- exit(es);
-}
-
-// func_args from test.hpp, so don't have to pull in other junk
-struct func_args {
- int argc;
- char** argv;
- int return_code;
-};
-
-
-/*
- DES, AES, Blowfish, and Twofish need aligned (4 byte) input/output for
- processing, can turn this off by setting gpBlock(assumeAligned = false)
- but would hurt performance. yaSSL always uses dynamic memory so we have
- at least 8 byte alignment. This test tried to force alignment for stack
- variables (for convenience) but some compiler versions and optimizations
- seemed to be off. So we have msgTmp variable which we copy into dynamic
- memory at runtime to ensure proper alignment, along with plain/cipher.
- Whew!
-*/
-const byte msgTmp[] = { // "now is the time for all " w/o trailing 0
- 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
- 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
- 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
-};
-
-byte* msg = 0; // for block cipher input
-byte* plain = 0; // for cipher decrypt comparison
-byte* cipher = 0; // block output
-
-
-void taocrypt_test(void* args)
-{
- ((func_args*)args)->return_code = -1; // error state
-
- msg = NEW_TC byte[24];
- plain = NEW_TC byte[24];
- cipher = NEW_TC byte[24];
-
- memcpy(msg, msgTmp, 24);
-
- int ret = 0;
- if ( (ret = sha_test()) )
- err_sys("SHA test failed!\n", ret);
- else
- printf( "SHA test passed!\n");
-
- if ( (ret = sha256_test()) )
- err_sys("SHA-256 test failed!\n", ret);
- else
- printf( "SHA-256 test passed!\n");
-
- if ( (ret = sha224_test()) )
- err_sys("SHA-224 test failed!\n", ret);
- else
- printf( "SHA-224 test passed!\n");
-
-#ifdef WORD64_AVAILABLE
-
- if ( (ret = sha512_test()) )
- err_sys("SHA-512 test failed!\n", ret);
- else
- printf( "SHA-512 test passed!\n");
-
- if ( (ret = sha384_test()) )
- err_sys("SHA-384 test failed!\n", ret);
- else
- printf( "SHA-384 test passed!\n");
-
-#endif
-
- if ( (ret = md5_test()) )
- err_sys("MD5 test failed!\n", ret);
- else
- printf( "MD5 test passed!\n");
-
- if ( (ret = md2_test()) )
- err_sys("MD2 test failed!\n", ret);
- else
- printf( "MD2 test passed!\n");
-
- if ( (ret = md4_test()) )
- err_sys("MD4 test failed!\n", ret);
- else
- printf( "MD4 test passed!\n");
-
- if ( (ret = ripemd_test()) )
- err_sys("RIPEMD test failed!\n", ret);
- else
- printf( "RIPEMD test passed!\n");
-
- if ( ( ret = hmac_test()) )
- err_sys("HMAC test failed!\n", ret);
- else
- printf( "HMAC test passed!\n");
-
- if ( (ret = arc4_test()) )
- err_sys("ARC4 test failed!\n", ret);
- else
- printf( "ARC4 test passed!\n");
-
- if ( (ret = rabbit_test()) )
- err_sys("Rabbit test failed!\n", ret);
- else
- printf( "Rabbit test passed!\n");
-
- if ( (ret = hc128_test()) )
- err_sys("HC128 test failed!\n", ret);
- else
- printf( "HC128 test passed!\n");
-
- if ( (ret = des_test()) )
- err_sys("DES test failed!\n", ret);
- else
- printf( "DES test passed!\n");
-
- if ( (ret = aes_test()) )
- err_sys("AES test failed!\n", ret);
- else
- printf( "AES test passed!\n");
-
- if ( (ret = twofish_test()) )
- err_sys("Twofish test failed!\n", ret);
- else
- printf( "Twofish test passed!\n");
-
- if ( (ret = blowfish_test()) )
- err_sys("Blowfish test failed!\n", ret);
- else
- printf( "Blowfish test passed!\n");
-
- if ( (ret = rsa_test()) )
- err_sys("RSA test failed!\n", ret);
- else
- printf( "RSA test passed!\n");
-
- if ( (ret = dh_test()) )
- err_sys("DH test failed!\n", ret);
- else
- printf( "DH test passed!\n");
-
- if ( (ret = dsa_test()) )
- err_sys("DSA test failed!\n", ret);
- else
- printf( "DSA test passed!\n");
-
- if ( (ret = pwdbased_test()) )
- err_sys("PBKDF2 test failed!\n", ret);
- else
- printf( "PBKDF2 test passed!\n");
-
- /* not ready yet
- if ( (ret = pkcs12_test()) )
- err_sys("PKCS12 test failed!\n", ret);
- else
- printf( "PKCS12 test passed!\n");
- */
-
- tcArrayDelete(cipher);
- tcArrayDelete(plain);
- tcArrayDelete(msg);
-
- ((func_args*)args)->return_code = ret;
-}
-
-
-// so overall tests can pull in test function
-#ifndef NO_MAIN_DRIVER
-
- int main(int argc, char** argv)
- {
- func_args args;
-
- args.argc = argc;
- args.argv = argv;
-
- taocrypt_test(&args);
- TaoCrypt::CleanUp();
-
- return args.return_code;
- }
-
-#endif // NO_MAIN_DRIVER
-
-
-void file_test(const char* file, byte* check)
-{
- FILE* f;
- int i = 0;
- MD5 md5;
- byte buf[1024];
- byte md5sum[MD5::DIGEST_SIZE];
-
- if( !( f = fopen( file, "rb" ) )) {
- printf("Can't open %s\n", file);
- return;
- }
- while( ( i = (int)fread(buf, 1, sizeof(buf), f )) > 0 )
- md5.Update(buf, i);
-
- md5.Final(md5sum);
- memcpy(check, md5sum, sizeof(md5sum));
-
- for(int j = 0; j < MD5::DIGEST_SIZE; ++j )
- printf( "%02x", md5sum[j] );
-
- printf(" %s\n", file);
-
- fclose(f);
-}
-
-
-int sha_test()
-{
- SHA sha;
- byte hash[SHA::DIGEST_SIZE];
-
- testVector test_sha[] =
- {
- testVector("abc",
- "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E\x25\x71\x78\x50\xC2"
- "\x6C\x9C\xD0\xD8\x9D"),
- testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
- "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE\x4A\xA1\xF9\x51\x29"
- "\xE5\xE5\x46\x70\xF1"),
- testVector("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
- "aaaaaa",
- "\x00\x98\xBA\x82\x4B\x5C\x16\x42\x7B\xD7\xA1\x12\x2A\x5A\x44"
- "\x2A\x25\xEC\x64\x4D"),
- testVector("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
- "aaaaaaaaaa",
- "\xAD\x5B\x3F\xDB\xCB\x52\x67\x78\xC2\x83\x9D\x2F\x15\x1E\xA7"
- "\x53\x99\x5E\x26\xA0")
- };
-
- int times( sizeof(test_sha) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- sha.Update(test_sha[i].input_, test_sha[i].inLen_);
- sha.Final(hash);
-
- if (memcmp(hash, test_sha[i].output_, SHA::DIGEST_SIZE) != 0)
- return -1 - i;
- }
-
- return 0;
-}
-
-
-int sha256_test()
-{
- SHA256 sha;
- byte hash[SHA256::DIGEST_SIZE];
-
- testVector test_sha[] =
- {
- testVector("abc",
- "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22"
- "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00"
- "\x15\xAD"),
- testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
- "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60"
- "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB"
- "\x06\xC1")
- };
-
- int times( sizeof(test_sha) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- sha.Update(test_sha[i].input_, test_sha[i].inLen_);
- sha.Final(hash);
-
- if (memcmp(hash, test_sha[i].output_, SHA256::DIGEST_SIZE) != 0)
- return -1 - i;
- }
-
- return 0;
-}
-
-
-#ifdef WORD64_AVAILABLE
-
-int sha512_test()
-{
- SHA512 sha;
- byte hash[SHA512::DIGEST_SIZE];
-
- testVector test_sha[] =
- {
- testVector("abc",
- "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41"
- "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55"
- "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3"
- "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f"
- "\xa5\x4c\xa4\x9f"),
- testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
- "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
- "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14"
- "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88"
- "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4"
- "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b"
- "\x87\x4b\xe9\x09")
- };
-
- int times( sizeof(test_sha) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- sha.Update(test_sha[i].input_, test_sha[i].inLen_);
- sha.Final(hash);
-
- if (memcmp(hash, test_sha[i].output_, SHA512::DIGEST_SIZE) != 0)
- return -1 - i;
- }
-
- return 0;
-}
-
-
-int sha384_test()
-{
- SHA384 sha;
- byte hash[SHA384::DIGEST_SIZE];
-
- testVector test_sha[] =
- {
- testVector("abc",
- "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50"
- "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff"
- "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34"
- "\xc8\x25\xa7"),
- testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
- "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
- "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b"
- "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0"
- "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91"
- "\x74\x60\x39")
- };
-
- int times( sizeof(test_sha) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- sha.Update(test_sha[i].input_, test_sha[i].inLen_);
- sha.Final(hash);
-
- if (memcmp(hash, test_sha[i].output_, SHA384::DIGEST_SIZE) != 0)
- return -1 - i;
- }
-
- return 0;
-}
-
-#endif // WORD64_AVAILABLE
-
-
-int sha224_test()
-{
- SHA224 sha;
- byte hash[SHA224::DIGEST_SIZE];
-
- testVector test_sha[] =
- {
- testVector("abc",
- "\x23\x09\x7d\x22\x34\x05\xd8\x22\x86\x42\xa4\x77\xbd\xa2\x55"
- "\xb3\x2a\xad\xbc\xe4\xbd\xa0\xb3\xf7\xe3\x6c\x9d\xa7"),
- testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
- "\x75\x38\x8b\x16\x51\x27\x76\xcc\x5d\xba\x5d\xa1\xfd\x89\x01"
- "\x50\xb0\xc6\x45\x5c\xb4\xf5\x8b\x19\x52\x52\x25\x25")
- };
-
- int times( sizeof(test_sha) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- sha.Update(test_sha[i].input_, test_sha[i].inLen_);
- sha.Final(hash);
-
- if (memcmp(hash, test_sha[i].output_, SHA224::DIGEST_SIZE) != 0)
- return -1 - i;
- }
-
- return 0;
-}
-
-
-int md5_test()
-{
- MD5 md5;
- byte hash[MD5::DIGEST_SIZE];
-
- testVector test_md5[] =
- {
- testVector("abc",
- "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f"
- "\x72"),
- testVector("message digest",
- "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d\x52\x5a\x2f\x31\xaa\xf1\x61"
- "\xd0"),
- testVector("abcdefghijklmnopqrstuvwxyz",
- "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1"
- "\x3b"),
- testVector("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
- "6789",
- "\xd1\x74\xab\x98\xd2\x77\xd9\xf5\xa5\x61\x1c\x2c\x9f\x41\x9d"
- "\x9f"),
- testVector("1234567890123456789012345678901234567890123456789012345678"
- "9012345678901234567890",
- "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55\xac\x49\xda\x2e\x21\x07\xb6"
- "\x7a")
- };
-
- int times( sizeof(test_md5) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- md5.Update(test_md5[i].input_, test_md5[i].inLen_);
- md5.Final(hash);
-
- if (memcmp(hash, test_md5[i].output_, MD5::DIGEST_SIZE) != 0)
- return -5 - i;
- }
-
- return 0;
-}
-
-
-int md4_test()
-{
- MD4 md4;
- byte hash[MD4::DIGEST_SIZE];
-
- testVector test_md4[] =
- {
- testVector("",
- "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89"
- "\xc0"),
- testVector("a",
- "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb"
- "\x24"),
- testVector("abc",
- "\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72"
- "\x9d"),
- testVector("message digest",
- "\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01"
- "\x4b"),
- testVector("abcdefghijklmnopqrstuvwxyz",
- "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d"
- "\xa9"),
- testVector("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345"
- "6789",
- "\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0"
- "\xe4"),
- testVector("1234567890123456789012345678901234567890123456789012345678"
- "9012345678901234567890",
- "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05"
- "\x36")
- };
-
- int times( sizeof(test_md4) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- md4.Update(test_md4[i].input_, test_md4[i].inLen_);
- md4.Final(hash);
-
- if (memcmp(hash, test_md4[i].output_, MD4::DIGEST_SIZE) != 0)
- return -5 - i;
- }
-
- return 0;
-}
-
-
-int md2_test()
-{
- MD2 md5;
- byte hash[MD2::DIGEST_SIZE];
-
- testVector test_md2[] =
- {
- testVector("",
- "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69"
- "\x27\x73"),
- testVector("a",
- "\x32\xec\x01\xec\x4a\x6d\xac\x72\xc0\xab\x96\xfb\x34\xc0"
- "\xb5\xd1"),
- testVector("abc",
- "\xda\x85\x3b\x0d\x3f\x88\xd9\x9b\x30\x28\x3a\x69\xe6\xde"
- "\xd6\xbb"),
- testVector("message digest",
- "\xab\x4f\x49\x6b\xfb\x2a\x53\x0b\x21\x9f\xf3\x30\x31\xfe"
- "\x06\xb0"),
- testVector("abcdefghijklmnopqrstuvwxyz",
- "\x4e\x8d\xdf\xf3\x65\x02\x92\xab\x5a\x41\x08\xc3\xaa\x47"
- "\x94\x0b"),
- testVector("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- "0123456789",
- "\xda\x33\xde\xf2\xa4\x2d\xf1\x39\x75\x35\x28\x46\xc3\x03"
- "\x38\xcd"),
- testVector("12345678901234567890123456789012345678901234567890123456"
- "789012345678901234567890",
- "\xd5\x97\x6f\x79\xd8\x3d\x3a\x0d\xc9\x80\x6c\x3c\x66\xf3"
- "\xef\xd8")
- };
-
- int times( sizeof(test_md2) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- md5.Update(test_md2[i].input_, test_md2[i].inLen_);
- md5.Final(hash);
-
- if (memcmp(hash, test_md2[i].output_, MD2::DIGEST_SIZE) != 0)
- return -10 - i;
- }
-
- return 0;
-}
-
-
-int ripemd_test()
-{
- RIPEMD160 ripe160;
- byte hash[RIPEMD160::DIGEST_SIZE];
-
- testVector test_ripemd[] =
- {
- testVector("",
- "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28\x08\x97\x7e\xe8"
- "\xf5\x48\xb2\x25\x8d\x31"),
- testVector("a",
- "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae\x34\x7b\xe6\xf4"
- "\xdc\x83\x5a\x46\x7f\xfe"),
- testVector("abc",
- "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6"
- "\xb0\x87\xf1\x5a\x0b\xfc"),
- testVector("message digest",
- "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8\x81\xb1\x23\xa8"
- "\x5f\xfa\x21\x59\x5f\x36"),
- testVector("abcdefghijklmnopqrstuvwxyz",
- "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb\xdc\xeb\x5b\x9d"
- "\x28\x65\xb3\x70\x8d\xbc"),
- testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
- "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05\xa0\x6c\x27\xdc"
- "\xf4\x9a\xda\x62\xeb\x2b"),
- testVector("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123"
- "456789",
- "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed\x3a\x87\xa5\x71"
- "\x30\x79\xb2\x1f\x51\x89"),
- testVector("12345678901234567890123456789012345678901234567890123456"
- "789012345678901234567890",
- "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb\xd3\x32\x3c\xab"
- "\x82\xbf\x63\x32\x6b\xfb"),
- };
-
- int times( sizeof(test_ripemd) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- ripe160.Update(test_ripemd[i].input_, test_ripemd[i].inLen_);
- ripe160.Final(hash);
-
- if (memcmp(hash, test_ripemd[i].output_, RIPEMD160::DIGEST_SIZE) != 0)
- return -100 - i;
- }
-
- return 0;
-}
-
-
-int hmac_test()
-{
- HMAC<MD5> hmacMD5;
- byte hash[MD5::DIGEST_SIZE];
-
- const char* keys[]=
- {
- "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
- "Jefe",
- "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"
- };
-
- testVector test_hmacMD5[] =
- {
- testVector("Hi There",
- "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc"
- "\x9d"),
- testVector("what do ya want for nothing?",
- "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7"
- "\x38"),
- testVector("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD",
- "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3"
- "\xf6")
- };
-
- int times( sizeof(test_hmacMD5) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- hmacMD5.SetKey((byte*)keys[i], (word32)strlen(keys[i]));
- hmacMD5.Update(test_hmacMD5[i].input_, test_hmacMD5[i].inLen_);
- hmacMD5.Final(hash);
-
- if (memcmp(hash, test_hmacMD5[i].output_, MD5::DIGEST_SIZE) != 0)
- return -20 - i;
- }
-
- return 0;
-}
-
-
-int arc4_test()
-{
- byte cipher[16];
- byte plain[16];
-
- const char* keys[] =
- {
- "\x01\x23\x45\x67\x89\xab\xcd\xef",
- "\x01\x23\x45\x67\x89\xab\xcd\xef",
- "\x00\x00\x00\x00\x00\x00\x00\x00",
- "\xef\x01\x23\x45"
- };
-
- testVector test_arc4[] =
- {
- testVector("\x01\x23\x45\x67\x89\xab\xcd\xef",
- "\x75\xb7\x87\x80\x99\xe0\xc5\x96"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x74\x94\xc2\xe7\x10\x4b\x08\x79"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\xde\x18\x89\x41\xa3\x37\x5d\x3a"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf\xbd\x61")
- };
-
-
- int times( sizeof(test_arc4) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- ARC4::Encryption enc;
- ARC4::Decryption dec;
-
- enc.SetKey((byte*)keys[i], (word32)strlen(keys[i]));
- dec.SetKey((byte*)keys[i], (word32)strlen(keys[i]));
-
- enc.Process(cipher, test_arc4[i].input_, test_arc4[i].outLen_);
- dec.Process(plain, cipher, test_arc4[i].outLen_);
-
- if (memcmp(plain, test_arc4[i].input_, test_arc4[i].outLen_))
- return -30 - i;
-
- if (memcmp(cipher, test_arc4[i].output_, test_arc4[i].outLen_))
- return -40 - i;
- }
-
- return 0;
-}
-
-
-int rabbit_test()
-{
- byte cipher[16];
- byte plain[16];
-
- const char* keys[] =
- {
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\xAC\xC3\x51\xDC\xF1\x62\xFC\x3B\xFE\x36\x3D\x2E\x29\x13\x28\x91"
- };
-
- const char* ivs[] =
- {
- "\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x59\x7E\x26\xC1\x75\xF5\x73\xC3",
- 0
- };
-
-
- testVector test_rabbit[] =
- {
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\xED\xB7\x05\x67\x37\x5D\xCD\x7C"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x6D\x7D\x01\x22\x92\xCC\xDC\xE0"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x9C\x51\xE2\x87\x84\xC3\x7F\xE9")
- };
-
-
- int times( sizeof(test_rabbit) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- Rabbit::Encryption enc;
- Rabbit::Decryption dec;
-
- enc.SetKey((byte*)keys[i], (byte*)ivs[i]);
- dec.SetKey((byte*)keys[i], (byte*)ivs[i]);
-
- enc.Process(cipher, test_rabbit[i].input_, test_rabbit[i].outLen_);
- dec.Process(plain, cipher, test_rabbit[i].outLen_);
-
- if (memcmp(plain, test_rabbit[i].input_, test_rabbit[i].outLen_))
- return -230 - i;
-
- if (memcmp(cipher, test_rabbit[i].output_, test_rabbit[i].outLen_))
- return -240 - i;
- }
-
- return 0;
-}
-
-
-int hc128_test()
-{
- byte cipher[16];
- byte plain[16];
-
- const char* keys[] =
- {
- "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x00\x53\xA6\xF9\x4C\x9F\xF2\x45\x98\xEB\x3E\x91\xE4\x37\x8A\xDD",
- "\x0F\x62\xB5\x08\x5B\xAE\x01\x54\xA7\xFA\x4D\xA0\xF3\x46\x99\xEC"
- };
-
- const char* ivs[] =
- {
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x0D\x74\xDB\x42\xA9\x10\x77\xDE\x45\xAC\x13\x7A\xE1\x48\xAF\x16",
- "\x28\x8F\xF6\x5D\xC4\x2B\x92\xF9\x60\xC7\x2E\x95\xFC\x63\xCA\x31"
- };
-
- testVector test_hc128[] =
- {
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x37\x86\x02\xB9\x8F\x32\xA7\x48"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x33\x7F\x86\x11\xC6\xED\x61\x5F"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x2E\x1E\xD1\x2A\x85\x51\xC0\x5A"),
- testVector("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- "\x1C\xD8\xAE\xDD\xFE\x52\xE2\x17\xE8\x35\xD0\xB7\xE8\x4E\x29")
- };
-
- int times( sizeof(test_hc128) / sizeof(testVector) );
- for (int i = 0; i < times; ++i) {
- HC128::Encryption enc;
- HC128::Decryption dec;
-
- enc.SetKey((byte*)keys[i], (byte*)ivs[i]);
- dec.SetKey((byte*)keys[i], (byte*)ivs[i]);
-
- enc.Process(cipher, test_hc128[i].input_, test_hc128[i].outLen_);
- dec.Process(plain, cipher, test_hc128[i].outLen_);
-
- if (memcmp(plain, test_hc128[i].input_, test_hc128[i].outLen_))
- return -330 - i;
-
- if (memcmp(cipher, test_hc128[i].output_, test_hc128[i].outLen_))
- return -340 - i;
- }
-
- return 0;
-}
-
-
-int des_test()
-{
- //ECB mode
- DES_ECB_Encryption enc;
- DES_ECB_Decryption dec;
-
- const int sz = TaoCrypt::DES_BLOCK_SIZE * 3;
- const byte key[] = { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef };
- const byte iv[] = { 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef };
-
- enc.SetKey(key, sizeof(key));
- enc.Process(cipher, msg, sz);
- dec.SetKey(key, sizeof(key));
- dec.Process(plain, cipher, sz);
-
- if (memcmp(plain, msg, sz))
- return -50;
-
- const byte verify1[] =
- {
- 0xf9,0x99,0xb8,0x8e,0xaf,0xea,0x71,0x53,
- 0x6a,0x27,0x17,0x87,0xab,0x88,0x83,0xf9,
- 0x89,0x3d,0x51,0xec,0x4b,0x56,0x3b,0x53
- };
-
- if (memcmp(cipher, verify1, sz))
- return -51;
-
- // CBC mode
- DES_CBC_Encryption enc2;
- DES_CBC_Decryption dec2;
-
- enc2.SetKey(key, sizeof(key), iv);
- enc2.Process(cipher, msg, sz);
- dec2.SetKey(key, sizeof(key), iv);
- dec2.Process(plain, cipher, sz);
-
- if (memcmp(plain, msg, sz))
- return -52;
-
- const byte verify2[] =
- {
- 0x8b,0x7c,0x52,0xb0,0x01,0x2b,0x6c,0xb8,
- 0x4f,0x0f,0xeb,0xf3,0xfb,0x5f,0x86,0x73,
- 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b
- };
-
- if (memcmp(cipher, verify2, sz))
- return -53;
-
- // EDE3 CBC mode
- DES_EDE3_CBC_Encryption enc3;
- DES_EDE3_CBC_Decryption dec3;
-
- const byte key3[] =
- {
- 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
- 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10,
- 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67
- };
- const byte iv3[] =
- {
- 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef,
- 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
- 0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81
-
- };
-
- enc3.SetKey(key3, sizeof(key3), iv3);
- enc3.Process(cipher, msg, sz);
- dec3.SetKey(key3, sizeof(key3), iv3);
- dec3.Process(plain, cipher, sz);
-
- if (memcmp(plain, msg, sz))
- return -54;
-
- const byte verify3[] =
- {
- 0x08,0x8a,0xae,0xe6,0x9a,0xa9,0xc1,0x13,
- 0x93,0x7d,0xf7,0x3a,0x11,0x56,0x66,0xb3,
- 0x18,0xbc,0xbb,0x6d,0xd2,0xb1,0x16,0xda
- };
-
- if (memcmp(cipher, verify3, sz))
- return -55;
-
- return 0;
-}
-
-
-int aes_test()
-{
- AES_CBC_Encryption enc;
- AES_CBC_Decryption dec;
- const int bs(TaoCrypt::AES::BLOCK_SIZE);
-
- byte key[] = "0123456789abcdef "; // align
- byte iv[] = "1234567890abcdef "; // align
-
- enc.SetKey(key, bs, iv);
- dec.SetKey(key, bs, iv);
-
- enc.Process(cipher, msg, bs);
- dec.Process(plain, cipher, bs);
-
- if (memcmp(plain, msg, bs))
- return -60;
-
- const byte verify[] =
- {
- 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53,
- 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
- };
-
- if (memcmp(cipher, verify, bs))
- return -61;
-
- AES_ECB_Encryption enc2;
- AES_ECB_Decryption dec2;
-
- enc2.SetKey(key, bs, iv);
- dec2.SetKey(key, bs, iv);
-
- enc2.Process(cipher, msg, bs);
- dec2.Process(plain, cipher, bs);
-
- if (memcmp(plain, msg, bs))
- return -62;
-
- const byte verify2[] =
- {
- 0xd0,0xc9,0xd9,0xc9,0x40,0xe8,0x97,0xb6,
- 0xc8,0x8c,0x33,0x3b,0xb5,0x8f,0x85,0xd1
- };
-
- if (memcmp(cipher, verify2, bs))
- return -63;
-
- return 0;
-}
-
-
-int twofish_test()
-{
- Twofish_CBC_Encryption enc;
- Twofish_CBC_Decryption dec;
- const int bs(TaoCrypt::Twofish::BLOCK_SIZE);
-
- byte key[] = "0123456789abcdef "; // align
- byte iv[] = "1234567890abcdef "; // align
-
- enc.SetKey(key, bs, iv);
- dec.SetKey(key, bs, iv);
-
- enc.Process(cipher, msg, bs);
- dec.Process(plain, cipher, bs);
-
- if (memcmp(plain, msg, bs))
- return -60;
-
- const byte verify[] =
- {
- 0xD2,0xD7,0x47,0x47,0x4A,0x65,0x4E,0x16,
- 0x21,0x03,0x58,0x79,0x5F,0x02,0x27,0x2C
- };
-
- if (memcmp(cipher, verify, bs))
- return -61;
-
- Twofish_ECB_Encryption enc2;
- Twofish_ECB_Decryption dec2;
-
- enc2.SetKey(key, bs, iv);
- dec2.SetKey(key, bs, iv);
-
- enc2.Process(cipher, msg, bs);
- dec2.Process(plain, cipher, bs);
-
- if (memcmp(plain, msg, bs))
- return -62;
-
- const byte verify2[] =
- {
- 0x3B,0x6C,0x63,0x10,0x34,0xAB,0xB2,0x87,
- 0xC4,0xCD,0x6B,0x91,0x14,0xC5,0x3A,0x09
- };
-
- if (memcmp(cipher, verify2, bs))
- return -63;
-
- return 0;
-}
-
-
-int blowfish_test()
-{
- Blowfish_CBC_Encryption enc;
- Blowfish_CBC_Decryption dec;
- const int bs(TaoCrypt::Blowfish::BLOCK_SIZE);
-
- byte key[] = "0123456789abcdef "; // align
- byte iv[] = "1234567890abcdef "; // align
-
- enc.SetKey(key, 16, iv);
- dec.SetKey(key, 16, iv);
-
- enc.Process(cipher, msg, bs * 2);
- dec.Process(plain, cipher, bs * 2);
-
- if (memcmp(plain, msg, bs))
- return -60;
-
- const byte verify[] =
- {
- 0x0E,0x26,0xAA,0x29,0x11,0x25,0xAB,0xB5,
- 0xBC,0xD9,0x08,0xC4,0x94,0x6C,0x89,0xA3
- };
-
- if (memcmp(cipher, verify, bs))
- return -61;
-
- Blowfish_ECB_Encryption enc2;
- Blowfish_ECB_Decryption dec2;
-
- enc2.SetKey(key, 16, iv);
- dec2.SetKey(key, 16, iv);
-
- enc2.Process(cipher, msg, bs * 2);
- dec2.Process(plain, cipher, bs * 2);
-
- if (memcmp(plain, msg, bs))
- return -62;
-
- const byte verify2[] =
- {
- 0xE7,0x42,0xB9,0x37,0xC8,0x7D,0x93,0xCA,
- 0x8F,0xCE,0x39,0x32,0xDE,0xD7,0xBC,0x5B
- };
-
- if (memcmp(cipher, verify2, bs))
- return -63;
-
- return 0;
-}
-
-
-int rsa_test()
-{
- Source source;
- FileSource("../certs/client-key.der", source);
- if (source.size() == 0) {
- FileSource("../../certs/client-key.der", source); // for testsuite
- if (source.size() == 0) {
- FileSource("../../../certs/client-key.der", source); // Debug dir
- if (source.size() == 0)
- err_sys("where's your certs dir?", -79);
- }
- }
- RSA_PrivateKey priv(source);
-
- RSAES_Encryptor enc(priv);
- byte message[] = "Everyone gets Friday off.";
- const word32 len = (word32)strlen((char*)message);
- byte cipher[512];
- enc.Encrypt(message, len, cipher, rng);
-
- RSAES_Decryptor dec(priv);
- byte plain[512];
- dec.Decrypt(cipher, priv.FixedCiphertextLength(), plain, rng);
-
- if (memcmp(plain, message, len))
- return -70;
-
- dec.SSL_Sign(message, len, cipher, rng);
- if (!enc.SSL_Verify(message, len, cipher))
- return -71;
-
-
- // test decode
- Source source2;
- FileSource("../certs/client-cert.der", source2);
- if (source2.size() == 0) {
- FileSource("../../certs/client-cert.der", source2); // for testsuite
- if (source2.size() == 0) {
- FileSource("../../../certs/client-cert.der", source2); // Debug dir
- if (source2.size() == 0)
- err_sys("where's your certs dir?", -79);
- }
- }
- CertDecoder cd(source2, true, 0, false, CertDecoder::CA);
- if (cd.GetError().What())
- err_sys("cert error", -80);
- Source source3(cd.GetPublicKey().GetKey(), cd.GetPublicKey().size());
- RSA_PublicKey pub(source3);
-
- return 0;
-}
-
-
-int dh_test()
-{
- Source source;
- FileSource("../certs/dh1024.dat", source);
- if (source.size() == 0) {
- FileSource("../../certs/dh1024.dat", source); // for testsuite
- if (source.size() == 0) {
- FileSource("../../../certs/dh1024.dat", source); // win32 Debug dir
- if (source.size() == 0)
- err_sys("where's your certs dir?", -79);
- }
- }
- HexDecoder hDec(source);
-
- DH dh(source);
-
- byte pub[128];
- byte priv[128];
- byte agree[128];
- byte pub2[128];
- byte priv2[128];
- byte agree2[128];
-
- DH dh2(dh);
-
- dh.GenerateKeyPair(rng, priv, pub);
- dh2.GenerateKeyPair(rng, priv2, pub2);
- dh.Agree(agree, priv, pub2);
- dh2.Agree(agree2, priv2, pub);
-
-
- if ( memcmp(agree, agree2, dh.GetByteLength()) )
- return -80;
-
- return 0;
-}
-
-
-int dsa_test()
-{
- Source source;
- FileSource("../certs/dsa1024.der", source);
- if (source.size() == 0) {
- FileSource("../../certs/dsa1024.der", source); // for testsuite
- if (source.size() == 0) {
- FileSource("../../../certs/dsa1024.der", source); // win32 Debug dir
- if (source.size() == 0)
- err_sys("where's your certs dir?", -89);
- }
- }
-
- const char msg[] = "this is the message";
- byte signature[40];
-
- DSA_PrivateKey priv(source);
- DSA_Signer signer(priv);
-
- SHA sha;
- byte digest[SHA::DIGEST_SIZE];
- sha.Update((byte*)msg, sizeof(msg));
- sha.Final(digest);
-
- signer.Sign(digest, signature, rng);
-
- byte encoded[sizeof(signature) + 6];
- byte decoded[40];
-
- word32 encSz = EncodeDSA_Signature(signer.GetR(), signer.GetS(), encoded);
- DecodeDSA_Signature(decoded, encoded, encSz);
-
- DSA_PublicKey pub(priv);
- DSA_Verifier verifier(pub);
-
- if (!verifier.Verify(digest, decoded))
- return -90;
-
- if (!verifier.Verify(digest, signature))
- return -91;
-
- return 0;
-}
-
-
-int pwdbased_test()
-{
- PBKDF2_HMAC<SHA> pb;
-
- byte derived[32];
- const byte pwd1[] = "password "; // align
- const byte salt[] = { 0x12, 0x34, 0x56, 0x78, 0x78, 0x56, 0x34, 0x12 };
-
- pb.DeriveKey(derived, 8, pwd1, 8, salt, sizeof(salt), 5);
-
- const byte verify1[] = { 0xD1, 0xDA, 0xA7, 0x86, 0x15, 0xF2, 0x87, 0xE6 };
-
- if ( memcmp(derived, verify1, sizeof(verify1)) )
- return -101;
-
-
- const byte pwd2[] = "All n-entities must communicate with other n-entities"
- " via n-1 entiteeheehees "; // align
-
- pb.DeriveKey(derived, 24, pwd2, 76, salt, sizeof(salt), 500);
-
- const byte verify2[] = { 0x6A, 0x89, 0x70, 0xBF, 0x68, 0xC9, 0x2C, 0xAE,
- 0xA8, 0x4A, 0x8D, 0xF2, 0x85, 0x10, 0x85, 0x86,
- 0x07, 0x12, 0x63, 0x80, 0xCC, 0x47, 0xAB, 0x2D
- };
-
- if ( memcmp(derived, verify2, sizeof(verify2)) )
- return -102;
-
- return 0;
-}
-
-
-/*
-int pkcs12_test()
-{
- Source cert;
- FileSource("../certs/server-cert.pem", cert);
- if (cert.size() == 0) {
- FileSource("../../certs/server-cert.pem", cert); // for testsuite
- if (cert.size() == 0) {
- FileSource("../../../certs/server-cert.pem", cert); // Debug dir
- if (cert.size() == 0)
- err_sys("where's your certs dir?", -109);
- }
- }
-
- if (GetCert(cert) != 0)
- return -110;
-
- Source source;
- FileSource("../certs/server.p12", source);
- if (source.size() == 0) {
- FileSource("../../certs/server.p12", source); // for testsuite
- if (source.size() == 0) {
- FileSource("../../../certs/server.p12", source); // Debug dir
- if (source.size() == 0)
- err_sys("where's your certs dir?", -111);
- }
- }
-
- if (GetPKCS_Cert("password", source) != 0)
- return -112;
-
- return 0;
-}
-*/
-
diff --git a/extra/yassl/taocrypt/test/test.dsp b/extra/yassl/taocrypt/test/test.dsp
deleted file mode 100644
index 93b369de3d9..00000000000
--- a/extra/yassl/taocrypt/test/test.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test.mak" CFG="test - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "test___Win32_Release"
-# PROP BASE Intermediate_Dir "test___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /I "../include" /I "../mySTL" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "test - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test___Win32_Debug"
-# PROP BASE Intermediate_Dir "test___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "../include" /I "../mySTL" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "test - Win32 Release"
-# Name "test - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\test.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/testsuite/cipher-test.sh b/extra/yassl/testsuite/cipher-test.sh
deleted file mode 100644
index d3e69146097..00000000000
--- a/extra/yassl/testsuite/cipher-test.sh
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/bash
-
-# test all yassl cipher suties
-#
-
-
-no_pid=-1
-server_pid=$no_pid
-
-
-do_cleanup() {
- echo "in cleanup"
-
- if [[ $server_pid != $no_pid ]]
- then
- echo "killing server"
- kill -9 $server_pid
- fi
-}
-
-do_trap() {
- echo "got trap"
- do_cleanup
- exit -1
-}
-
-trap do_trap INT TERM
-
-
-# make sure example server and client are built
-if test ! -s ../examples/server/server; then
- echo "Please build yaSSL first, example server missing"
- exit -1
-fi
-
-if test ! -s ../examples/client/client; then
- echo "Please build yaSSL first, example client missing"
- exit -1
-fi
-
-
-# non DSA suites
-for suite in {"DHE-RSA-AES256-SHA","AES256-SHA","DHE-RSA-AES128-SHA","AES128-SHA","AES256-RMD","AES128-RMD","DES-CBC3-RMD","DHE-RSA-AES256-RMD","DHE-RSA-AES128-RMD","DHE-RSA-DES-CBC3-RMD","RC4-SHA","RC4-MD5","DES-CBC3-SHA","DES-CBC-SHA","EDH-RSA-DES-CBC3-SHA","EDH-RSA-DES-CBC-SHA"}
-do
- for client_auth in {y,n}
- do
- echo "Trying $suite client auth = $client_auth ..."
-
- if test -e server_ready; then
- echo -e "removing exisitng server_ready file"
- rm server_ready
- fi
- ../examples/server/server $client_auth &
- server_pid=$!
-
- while [ ! -s server_ready ]; do
- echo -e "waiting for server_ready file..."
- sleep 0.1
- done
-
- ../examples/client/client $suite
- client_result=$?
-
- wait $server_pid
- server_result=$?
-
- server_pid=$no_pid
-
- if [[ $client_result != 0 ]]
- then
- echo "Client Error"
- exit $client_result
- fi
-
- if [[ $server_result != 0 ]]
- then
- echo "Server Error"
- exit $server_result
- fi
-
- done # end client auth loop
-done # end non dsa suite list
-echo -e "Non DSA Loop SUCCESS"
-
-
-
-# DSA suites
-for suite in {"DHE-DSS-AES256-SHA","DHE-DSS-AES128-SHA","DHE-DSS-AES256-RMD","DHE-DSS-AES128-RMD","DHE-DSS-DES-CBC3-RMD","EDH-DSS-DES-CBC3-SHA","EDH-DSS-DES-CBC-SHA"}
-do
- for client_auth in {y,n}
- do
- echo "Trying $suite client auth = $client_auth ..."
-
- if test -e server_ready; then
- echo -e "removing exisitng server_ready file"
- rm server_ready
- fi
- # d signifies DSA
- ../examples/server/server $client_auth d &
- server_pid=$!
-
- while [ ! -s server_ready ]; do
- echo -e "waiting for server_ready file..."
- sleep 0.1
- done
-
- ../examples/client/client $suite
- client_result=$?
-
- wait $server_pid
- server_result=$?
-
- server_pid=$no_pid
-
- if [[ $client_result != 0 ]]
- then
- echo "Client Error"
- exit $client_result
- fi
-
- if [[ $server_result != 0 ]]
- then
- echo "Server Error"
- exit $server_result
- fi
-
- done # end client auth loop
-done # end dsa suite list
-echo -e "DSA Loop SUCCESS"
-
-exit 0
diff --git a/extra/yassl/testsuite/input b/extra/yassl/testsuite/input
deleted file mode 100644
index d16cbc40750..00000000000
--- a/extra/yassl/testsuite/input
+++ /dev/null
@@ -1,107 +0,0 @@
-// testsuite.cpp
-
-#include "test.hpp"
-#include "md5.hpp"
-
-typedef unsigned char byte;
-
-void taocrypt_test(void*);
-void file_test(char*, byte*);
-
-void client_test(void*);
-void echoclient_test(void*);
-
-THREAD_RETURN YASSL_API server_test(void*);
-THREAD_RETURN YASSL_API echoserver_test(void*);
-
-int main(int argc, char** argv)
-{
- func_args args(argc, argv);
- func_args server_args(args);
-
- // *** Crypto Test ***
- taocrypt_test(&args);
- assert(args.return_code == 0);
-
-
- // *** Simple yaSSL client server test ***
- THREAD_TYPE thread;
-
- start_thread(server_test, &server_args, &thread);
- client_test(&args);
-
- assert(args.return_code == 0);
- join_thread(thread);
- assert(server_args.return_code == 0);
-
-
- // *** Echo input yaSSL client server test ***
- start_thread(echoserver_test, &server_args, &thread);
- func_args echo_args;
-
- // setup args
- echo_args.argc = 3;
- echo_args.argv = new char*[echo_args.argc];
- for (int i = 0; i < echo_args.argc; i++)
- echo_args.argv[i] = new char[32];
-
- strcpy(echo_args.argv[0], "echoclient");
- strcpy(echo_args.argv[1], "input");
- strcpy(echo_args.argv[2], "output");
- remove("output");
-
- // make sure OK
- echoclient_test(&echo_args);
- assert(echo_args.return_code == 0);
-
-
- // *** Echo quit yaSSL client server test ***
- echo_args.argc = 2;
- strcpy(echo_args.argv[1], "quit");
-
- echoclient_test(&echo_args);
- assert(echo_args.return_code == 0);
- join_thread(thread);
- assert(server_args.return_code == 0);
-
-
- // input output compare
- byte input[TaoCrypt::MD5::DIGEST_SIZE];
- byte output[TaoCrypt::MD5::DIGEST_SIZE];
- file_test("input", input);
- file_test("output", output);
- assert(memcmp(input, output, sizeof(input)) == 0);
-
- printf("\nAll tests passed!\n");
-
- // cleanup
- for (int j = echo_args.argc; j >= 0; j--)
- delete[] echo_args.argv[j];
- delete[] echo_args.argv;
-
- return 0;
-}
-
-
-
-void start_thread(THREAD_FUNC fun, func_args* args, THREAD_TYPE* thread)
-{
-#ifdef _WIN32
- *thread = _beginthreadex(0, 0, fun, args, 0, 0);
-#else
- pthread_create(thread, 0, fun, args);
-#endif
-}
-
-
-void join_thread(THREAD_TYPE thread)
-{
-#ifdef _WIN32
- int res = WaitForSingleObject(reinterpret_cast<HANDLE>(thread), INFINITE);
- assert(res == WAIT_OBJECT_0);
- res = CloseHandle(reinterpret_cast<HANDLE>(thread));
- assert(res);
-#else
- pthread_join(thread, 0);
-#endif
-}
diff --git a/extra/yassl/testsuite/make.bat b/extra/yassl/testsuite/make.bat
deleted file mode 100755
index eddbe90c400..00000000000
--- a/extra/yassl/testsuite/make.bat
+++ /dev/null
@@ -1,29 +0,0 @@
-REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-REM
-REM This program is free software; you can redistribute it and/or modify
-REM it under the terms of the GNU General Public License as published by
-REM the Free Software Foundation; version 2 of the License.
-REM
-REM This program is distributed in the hope that it will be useful,
-REM but WITHOUT ANY WARRANTY; without even the implied warranty of
-REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-REM GNU General Public License for more details.
-REM
-REM You should have received a copy of the GNU General Public License
-REM along with this program; if not, write to the Free Software
-REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-REM quick and dirty build file for testing different MSDEVs
-setlocal
-
-set myFLAGS= /I../include /I../taocrypt/include /I../taocrypt/mySTL /c /W3 /G6 /O2 /MT /D"WIN32" /D"NO_MAIN_DRIVER"
-
-cl %myFLAGS% testsuite.cpp
-cl %myFLAGS% ../examples/client/client.cpp
-cl %myFLAGS% ../examples/echoclient/echoclient.cpp
-cl %myFLAGS% ../examples/server/server.cpp
-cl %myFLAGS% ../examples/echoserver/echoserver.cpp
-cl %myFLAGS% ../taocrypt/test/test.cpp
-
-link.exe /out:testsuite.exe ../src/yassl.lib ../taocrypt/src/taocrypt.lib testsuite.obj client.obj server.obj echoclient.obj echoserver.obj test.obj advapi32.lib Ws2_32.lib
-
diff --git a/extra/yassl/testsuite/quit b/extra/yassl/testsuite/quit
deleted file mode 100644
index 3db49b3ad12..00000000000
--- a/extra/yassl/testsuite/quit
+++ /dev/null
@@ -1,2 +0,0 @@
-quit
-
diff --git a/extra/yassl/testsuite/test.hpp b/extra/yassl/testsuite/test.hpp
deleted file mode 100644
index 12da450fffe..00000000000
--- a/extra/yassl/testsuite/test.hpp
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates.
-
- 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; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-// test.hpp
-
-#ifndef yaSSL_TEST_HPP
-#define yaSSL_TEST_HPP
-
-#include "runtime.hpp"
-#include "error.hpp"
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-//#define NON_BLOCKING // test server and client example (not echos)
-
-#ifdef _WIN32
- #include <winsock2.h>
- #include <process.h>
- #ifdef TEST_IPV6 // don't require newer SDK for IPV4
- #include <ws2tcpip.h>
- #include <wspiapi.h>
- #endif
- #define SOCKET_T unsigned int
-#else
- #include <string.h>
- #include <unistd.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <sys/ioctl.h>
- #include <sys/time.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #ifdef TEST_IPV6
- #include <netdb.h>
- #endif
- #include <pthread.h>
-#ifdef NON_BLOCKING
- #include <fcntl.h>
-#endif
- #define SOCKET_T int
-#endif /* _WIN32 */
-#include "openssl/ssl.h" /* openssl compatibility test */
-
-
-#ifdef _MSC_VER
- // disable conversion warning
- // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy
- #pragma warning(disable:4244 4996)
-#endif
-
-
-#if !defined(_SOCKLEN_T) && (defined(_WIN32) || defined(__APPLE__))
- typedef int socklen_t;
-#endif
-
-
-// Check type of third arg to accept
-#if defined(__hpux)
-// HPUX uses int* for third parameter to accept
- typedef int* ACCEPT_THIRD_T;
-#else
- typedef socklen_t* ACCEPT_THIRD_T;
-#endif
-
-
-#ifdef TEST_IPV6
- typedef sockaddr_in6 SOCKADDR_IN_T;
- #define AF_INET_V AF_INET6
-#else
- typedef sockaddr_in SOCKADDR_IN_T;
- #define AF_INET_V AF_INET
-#endif
-
-
-// Check if _POSIX_THREADS should be forced
-#if !defined(_POSIX_THREADS) && defined(__hpux)
-// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
-#define _POSIX_THREADS
-#endif
-
-
-#ifndef _POSIX_THREADS
- typedef unsigned int THREAD_RETURN;
- typedef HANDLE THREAD_TYPE;
- #define YASSL_API __stdcall
-#else
- typedef void* THREAD_RETURN;
- typedef pthread_t THREAD_TYPE;
- #define YASSL_API
-#endif
-
-
-struct tcp_ready {
-#ifdef _POSIX_THREADS
- pthread_mutex_t mutex_;
- pthread_cond_t cond_;
- bool ready_; // predicate
-
- tcp_ready() : ready_(false)
- {
- pthread_mutex_init(&mutex_, 0);
- pthread_cond_init(&cond_, 0);
- }
-
- ~tcp_ready()
- {
- pthread_mutex_destroy(&mutex_);
- pthread_cond_destroy(&cond_);
- }
-#endif
-};
-
-
-struct func_args {
- int argc;
- char** argv;
- int return_code;
- const char* file_ready;
- tcp_ready* signal_;
-
- func_args(int c = 0, char** v = 0) : argc(c), argv(v), file_ready(0) {}
-
- void SetSignal(tcp_ready* p) { signal_ = p; }
-};
-
-typedef THREAD_RETURN YASSL_API THREAD_FUNC(void*);
-
-void start_thread(THREAD_FUNC, func_args*, THREAD_TYPE*);
-void join_thread(THREAD_TYPE);
-
-// yaSSL
-const char* const yasslIP = "127.0.0.1";
-const unsigned short yasslPort = 11111;
-const unsigned short proxyPort = 12345;
-
-
-// client
-const char* const cert = "../certs/client-cert.pem";
-const char* const key = "../certs/client-key.pem";
-
-const char* const certSuite = "../../certs/client-cert.pem";
-const char* const keySuite = "../../certs/client-key.pem";
-
-const char* const certDebug = "../../../certs/client-cert.pem";
-const char* const keyDebug = "../../../certs/client-key.pem";
-
-
-// server
-const char* const svrCert = "../certs/server-cert.pem";
-const char* const svrKey = "../certs/server-key.pem";
-
-const char* const svrCert2 = "../../certs/server-cert.pem";
-const char* const svrKey2 = "../../certs/server-key.pem";
-
-const char* const svrCert3 = "../../../certs/server-cert.pem";
-const char* const svrKey3 = "../../../certs/server-key.pem";
-
-
-// server dsa
-const char* const dsaCert = "../certs/dsa-cert.pem";
-const char* const dsaKey = "../certs/dsa1024.der";
-
-const char* const dsaCert2 = "../../certs/dsa-cert.pem";
-const char* const dsaKey2 = "../../certs/dsa1024.der";
-
-const char* const dsaCert3 = "../../../certs/dsa-cert.pem";
-const char* const dsaKey3 = "../../../certs/dsa1024.der";
-
-
-// CA
-const char* const caCert = "../certs/ca-cert.pem";
-const char* const caCert2 = "../../certs/ca-cert.pem";
-const char* const caCert3 = "../../../certs/ca-cert.pem";
-
-
-using namespace yaSSL;
-
-
-inline void err_sys(const char* msg)
-{
- printf("yassl error: %s\n", msg);
- exit(EXIT_FAILURE);
-}
-
-
-extern "C" {
- static int PasswordCallBack(char*, int, int, void*);
-}
-
-
-static int PasswordCallBack(char* passwd, int sz, int rw, void* userdata)
-{
- strncpy(passwd, "yassl123", sz);
- return 8;
-}
-
-
-inline void store_ca(SSL_CTX* ctx)
-{
- // To allow testing from serveral dirs
- if (SSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS)
- if (SSL_CTX_load_verify_locations(ctx, caCert2, 0) != SSL_SUCCESS)
- if (SSL_CTX_load_verify_locations(ctx, caCert3, 0) != SSL_SUCCESS)
- err_sys("failed to use certificate: certs/cacert.pem");
-
- // load client CA for server verify
- if (SSL_CTX_load_verify_locations(ctx, cert, 0) != SSL_SUCCESS)
- if (SSL_CTX_load_verify_locations(ctx, certSuite, 0) != SSL_SUCCESS)
- if (SSL_CTX_load_verify_locations(ctx, certDebug,0) != SSL_SUCCESS)
- err_sys("failed to use certificate: certs/client-cert.pem");
-
- // DSA cert
- if (SSL_CTX_load_verify_locations(ctx, dsaCert, 0) != SSL_SUCCESS)
- if (SSL_CTX_load_verify_locations(ctx, dsaCert2, 0) != SSL_SUCCESS)
- if (SSL_CTX_load_verify_locations(ctx, dsaCert3, 0) != SSL_SUCCESS)
- err_sys("failed to use certificate: certs/dsa-cert.pem");
-
-}
-
-
-// client
-inline void set_certs(SSL_CTX* ctx)
-{
- store_ca(ctx);
- SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack);
-
- // To allow testing from serveral dirs
- if (SSL_CTX_use_certificate_file(ctx, cert, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_certificate_file(ctx, certSuite, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_certificate_file(ctx, certDebug, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- err_sys("failed to use certificate: certs/client-cert.pem");
-
- // To allow testing from several dirs
- if (SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_PrivateKey_file(ctx, keySuite, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_PrivateKey_file(ctx,keyDebug,SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- err_sys("failed to use key file: certs/client-key.pem");
-}
-
-
-// server
-inline void set_serverCerts(SSL_CTX* ctx)
-{
- store_ca(ctx);
- SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack);
-
- // To allow testing from serveral dirs
- if (SSL_CTX_use_certificate_file(ctx, svrCert, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_certificate_file(ctx, svrCert2, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_certificate_file(ctx, svrCert3, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- err_sys("failed to use certificate: certs/server-cert.pem");
-
- // To allow testing from several dirs
- if (SSL_CTX_use_PrivateKey_file(ctx, svrKey, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_PrivateKey_file(ctx, svrKey2, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_PrivateKey_file(ctx, svrKey3,SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- err_sys("failed to use key file: certs/server-key.pem");
-}
-
-
-// dsa server
-inline void set_dsaServerCerts(SSL_CTX* ctx)
-{
- store_ca(ctx);
-
- // To allow testing from serveral dirs
- if (SSL_CTX_use_certificate_file(ctx, dsaCert, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_certificate_file(ctx, dsaCert2, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- if (SSL_CTX_use_certificate_file(ctx, dsaCert3, SSL_FILETYPE_PEM)
- != SSL_SUCCESS)
- err_sys("failed to use certificate: certs/dsa-cert.pem");
-
- // To allow testing from several dirs
- if (SSL_CTX_use_PrivateKey_file(ctx, dsaKey, SSL_FILETYPE_ASN1)
- != SSL_SUCCESS)
- if (SSL_CTX_use_PrivateKey_file(ctx, dsaKey2, SSL_FILETYPE_ASN1)
- != SSL_SUCCESS)
- if (SSL_CTX_use_PrivateKey_file(ctx, dsaKey3,SSL_FILETYPE_ASN1)
- != SSL_SUCCESS)
- err_sys("failed to use key file: certs/dsa1024.der");
-}
-
-
-inline void set_args(int& argc, char**& argv, func_args& args)
-{
- argc = args.argc;
- argv = args.argv;
- args.return_code = -1; // error state
-}
-
-
-inline void set_file_ready(const char* name, func_args& args)
-{
- args.file_ready = name;
-}
-
-
-inline void tcp_set_nonblocking(SOCKET_T& sockfd)
-{
-#ifdef NON_BLOCKING
- #ifdef _WIN32
- unsigned long blocking = 1;
- int ret = ioctlsocket(sockfd, FIONBIO, &blocking);
- #else
- int flags = fcntl(sockfd, F_GETFL, 0);
- int ret = fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
- #endif
-#endif
-}
-
-
-inline void tcp_socket(SOCKET_T& sockfd, SOCKADDR_IN_T& addr)
-{
- sockfd = socket(AF_INET_V, SOCK_STREAM, 0);
- memset(&addr, 0, sizeof(addr));
-
-#ifdef TEST_IPV6
- addr.sin6_family = AF_INET_V;
- addr.sin6_port = htons(yasslPort);
- addr.sin6_addr = in6addr_loopback;
-
- /* // for external testing later
- addrinfo hints;
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_INET_V;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_PASSIVE;
-
- getaddrinfo(yasslIP6, yasslPortStr, &hints, info);
- // then use info connect(sockfd, info->ai_addr, info->ai_addrlen)
-
- if (*info == 0)
- err_sys("getaddrinfo failed");
- */ // end external testing later
-#else
- addr.sin_family = AF_INET_V;
-#ifdef YASSL_PROXY_PORT
- addr.sin_port = htons(proxyPort);
-#else
- addr.sin_port = htons(yasslPort);
-#endif
- addr.sin_addr.s_addr = inet_addr(yasslIP);
-#endif
-
-}
-
-
-inline void tcp_close(SOCKET_T& sockfd)
-{
-#ifdef _WIN32
- closesocket(sockfd);
-#else
- close(sockfd);
-#endif
- sockfd = (SOCKET_T) -1;
-}
-
-
-inline void tcp_connect(SOCKET_T& sockfd)
-{
- SOCKADDR_IN_T addr;
- tcp_socket(sockfd, addr);
-
- if (connect(sockfd, (const sockaddr*)&addr, sizeof(addr)) != 0) {
- tcp_close(sockfd);
- err_sys("tcp connect failed");
- }
-}
-
-
-inline void tcp_listen(SOCKET_T& sockfd)
-{
- SOCKADDR_IN_T addr;
- tcp_socket(sockfd, addr);
-
-#ifndef _WIN32
- int on = 1;
- socklen_t len = sizeof(on);
- setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &on, len);
-#endif
-
- if (bind(sockfd, (const sockaddr*)&addr, sizeof(addr)) != 0) {
- tcp_close(sockfd);
- err_sys("tcp bind failed");
- }
- if (listen(sockfd, 3) != 0) {
- tcp_close(sockfd);
- err_sys("tcp listen failed");
- }
-}
-
-
-inline void create_ready_file(func_args& args)
-{
- FILE* f = fopen(args.file_ready, "w+");
-
- if (f) {
- fputs("ready", f);
- fclose(f);
- }
-}
-
-
-inline void tcp_accept(SOCKET_T& sockfd, SOCKET_T& clientfd, func_args& args)
-{
- tcp_listen(sockfd);
-
- SOCKADDR_IN_T client;
- socklen_t client_len = sizeof(client);
-
-#if defined(_POSIX_THREADS) && defined(NO_MAIN_DRIVER)
- // signal ready to tcp_accept
- tcp_ready& ready = *args.signal_;
- pthread_mutex_lock(&ready.mutex_);
- ready.ready_ = true;
- pthread_cond_signal(&ready.cond_);
- pthread_mutex_unlock(&ready.mutex_);
-#endif
-
- if (args.file_ready)
- create_ready_file(args);
-
- clientfd = accept(sockfd, (sockaddr*)&client, (ACCEPT_THIRD_T)&client_len);
-
- if (clientfd == (SOCKET_T) -1) {
- tcp_close(sockfd);
- err_sys("tcp accept failed");
- }
-
-#ifdef NON_BLOCKING
- tcp_set_nonblocking(clientfd);
-#endif
-}
-
-
-inline void showPeer(SSL* ssl)
-{
- X509* peer = SSL_get_peer_certificate(ssl);
- if (peer) {
- char* issuer = X509_NAME_oneline(X509_get_issuer_name(peer), 0, 0);
- char* subject = X509_NAME_oneline(X509_get_subject_name(peer), 0, 0);
-
- X509_NAME_ENTRY* se = NULL;
- ASN1_STRING* sd = NULL;
- char* subCN = NULL;
-
- X509_NAME* sub = X509_get_subject_name(peer);
- int lastpos = -1;
- if (sub)
- lastpos = X509_NAME_get_index_by_NID(sub, NID_commonName, lastpos);
- if (lastpos >= 0) {
- se = X509_NAME_get_entry(sub, lastpos);
- if (se)
- sd = X509_NAME_ENTRY_get_data(se);
- if (sd)
- subCN = (char*)ASN1_STRING_data(sd);
- }
-
- printf("peer's cert info:\n issuer : %s\n subject: %s\n"
- " subject cn: %s\n", issuer, subject, subCN);
-
- free(subject);
- free(issuer);
-
- }
- else
- printf("peer has no cert!\n");
-}
-
-
-
-inline DH* set_tmpDH(SSL_CTX* ctx)
-{
- static unsigned char dh1024_p[] =
- {
- 0xE6, 0x96, 0x9D, 0x3D, 0x49, 0x5B, 0xE3, 0x2C, 0x7C, 0xF1, 0x80, 0xC3,
- 0xBD, 0xD4, 0x79, 0x8E, 0x91, 0xB7, 0x81, 0x82, 0x51, 0xBB, 0x05, 0x5E,
- 0x2A, 0x20, 0x64, 0x90, 0x4A, 0x79, 0xA7, 0x70, 0xFA, 0x15, 0xA2, 0x59,
- 0xCB, 0xD5, 0x23, 0xA6, 0xA6, 0xEF, 0x09, 0xC4, 0x30, 0x48, 0xD5, 0xA2,
- 0x2F, 0x97, 0x1F, 0x3C, 0x20, 0x12, 0x9B, 0x48, 0x00, 0x0E, 0x6E, 0xDD,
- 0x06, 0x1C, 0xBC, 0x05, 0x3E, 0x37, 0x1D, 0x79, 0x4E, 0x53, 0x27, 0xDF,
- 0x61, 0x1E, 0xBB, 0xBE, 0x1B, 0xAC, 0x9B, 0x5C, 0x60, 0x44, 0xCF, 0x02,
- 0x3D, 0x76, 0xE0, 0x5E, 0xEA, 0x9B, 0xAD, 0x99, 0x1B, 0x13, 0xA6, 0x3C,
- 0x97, 0x4E, 0x9E, 0xF1, 0x83, 0x9E, 0xB5, 0xDB, 0x12, 0x51, 0x36, 0xF7,
- 0x26, 0x2E, 0x56, 0xA8, 0x87, 0x15, 0x38, 0xDF, 0xD8, 0x23, 0xC6, 0x50,
- 0x50, 0x85, 0xE2, 0x1F, 0x0D, 0xD5, 0xC8, 0x6B,
- };
-
- static unsigned char dh1024_g[] =
- {
- 0x02,
- };
-
- DH* dh;
- if ( (dh = DH_new()) ) {
- dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0);
- dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0);
- }
- if (!dh->p || !dh->g) {
- DH_free(dh);
- dh = 0;
- }
- SSL_CTX_set_tmp_dh(ctx, dh);
- return dh;
-}
-
-
-inline int verify_callback(int preverify_ok, X509_STORE_CTX* ctx)
-{
- X509* err_cert = X509_STORE_CTX_get_current_cert(ctx);
- int err = X509_STORE_CTX_get_error(ctx);
- int depth = X509_STORE_CTX_get_error_depth(ctx);
-
- // test allow self signed
- if (err_cert && depth == 0 && err == TaoCrypt::SIG_OTHER_E)
- return 1;
-
- return 0;
-}
-
-
-#endif // yaSSL_TEST_HPP
-
diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp
deleted file mode 100644
index 1792a2a3d9a..00000000000
--- a/extra/yassl/testsuite/testsuite.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1335 USA.
-*/
-
-// testsuite.cpp
-
-#include "test.hpp"
-#include "md5.hpp"
-
-
-typedef unsigned char byte;
-
-void taocrypt_test(void*);
-void file_test(const char*, byte*);
-
-void client_test(void*);
-void echoclient_test(void*);
-
-THREAD_RETURN YASSL_API server_test(void*);
-THREAD_RETURN YASSL_API echoserver_test(void*);
-
-void wait_tcp_ready(func_args&);
-
-
-
-int main(int argc, char** argv)
-{
- func_args args(argc, argv);
- func_args server_args(argc, argv);
-
- // *** Crypto Test ***
- taocrypt_test(&args);
- assert(args.return_code == 0);
-
-
- // *** Simple yaSSL client server test ***
- tcp_ready ready;
- server_args.SetSignal(&ready);
-
- THREAD_TYPE serverThread;
- start_thread(server_test, &server_args, &serverThread);
- wait_tcp_ready(server_args);
-
- client_test(&args);
- assert(args.return_code == 0);
- join_thread(serverThread);
- assert(server_args.return_code == 0);
-
-
- // *** Echo input yaSSL client server test ***
- start_thread(echoserver_test, &server_args, &serverThread);
- wait_tcp_ready(server_args);
- func_args echo_args;
-
- // setup args
- const int numArgs = 3;
- echo_args.argc = numArgs;
- char* myArgv[numArgs];
-
- char argc0[32];
- char argc1[32];
- char argc2[32];
-
- myArgv[0] = argc0;
- myArgv[1] = argc1;
- myArgv[2] = argc2;
-
- echo_args.argv = myArgv;
-
- strcpy(echo_args.argv[0], "echoclient");
- strcpy(echo_args.argv[1], "input");
- strcpy(echo_args.argv[2], "output");
- remove("output");
-
- // make sure OK
- echoclient_test(&echo_args);
- assert(echo_args.return_code == 0);
-
-
- // *** Echo quit yaSSL client server test ***
- echo_args.argc = 2;
- strcpy(echo_args.argv[1], "quit");
-
- echoclient_test(&echo_args);
- assert(echo_args.return_code == 0);
- join_thread(serverThread);
- assert(server_args.return_code == 0);
-
-
- // input output compare
- byte input[TaoCrypt::MD5::DIGEST_SIZE];
- byte output[TaoCrypt::MD5::DIGEST_SIZE];
- file_test("input", input);
- file_test("output", output);
- assert(memcmp(input, output, sizeof(input)) == 0);
-
- printf("\nAll tests passed!\n");
- yaSSL_CleanUp();
-
- return 0;
-}
-
-
-
-void start_thread(THREAD_FUNC fun, func_args* args, THREAD_TYPE* thread)
-{
-#ifndef _POSIX_THREADS
- *thread = (HANDLE)_beginthreadex(0, 0, fun, args, 0, 0);
-#else
- pthread_create(thread, 0, fun, args);
-#endif
-}
-
-
-void join_thread(THREAD_TYPE thread)
-{
-#ifndef _POSIX_THREADS
- int res = WaitForSingleObject(thread, INFINITE);
- assert(res == WAIT_OBJECT_0);
- res = CloseHandle(thread);
- assert(res);
-#else
- pthread_join(thread, 0);
-#endif
-}
-
-
-
-void wait_tcp_ready(func_args& args)
-{
-#ifdef _POSIX_THREADS
- pthread_mutex_lock(&args.signal_->mutex_);
-
- if (!args.signal_->ready_)
- pthread_cond_wait(&args.signal_->cond_, &args.signal_->mutex_);
- args.signal_->ready_ = false; // reset
-
- pthread_mutex_unlock(&args.signal_->mutex_);
-#endif
-}
-
-
-int test_openSSL_des()
-{
- /* test des encrypt/decrypt */
- char data[] = "this is my data ";
- int dataSz = (int)strlen(data);
- DES_key_schedule key[3];
- byte iv[8];
- EVP_BytesToKey(EVP_des_ede3_cbc(), EVP_md5(), NULL, (byte*)data, dataSz, 1,
- (byte*)key, iv);
-
- byte cipher[16];
- DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz, &key[0], &key[1],
- &key[2], &iv, true);
- byte plain[16];
- DES_ede3_cbc_encrypt(cipher, plain, 16, &key[0], &key[1], &key[2],
- &iv, false);
- return 0;
-}
diff --git a/extra/yassl/testsuite/testsuite.dsp b/extra/yassl/testsuite/testsuite.dsp
deleted file mode 100644
index 2a7f5a77433..00000000000
--- a/extra/yassl/testsuite/testsuite.dsp
+++ /dev/null
@@ -1,127 +0,0 @@
-# Microsoft Developer Studio Project File - Name="testsuite" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=testsuite - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "testsuite.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "testsuite.mak" CFG="testsuite - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "testsuite - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "testsuite - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "testsuite - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /O2 /I "../taocrypt/include" /I "../include" /I "../taocrypt/mySTL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "NO_MAIN_DRIVER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"LIBC"
-# SUBTRACT LINK32 /nodefaultlib
-
-!ELSEIF "$(CFG)" == "testsuite - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "../taocrypt/include" /I "../include" /I "../taocrypt/mySTL" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "NO_MAIN_DRIVER" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCD" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "testsuite - Win32 Release"
-# Name "testsuite - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\examples\client\client.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\examples\echoclient\echoclient.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\examples\echoserver\echoserver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\examples\server\server.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\taocrypt\test\test.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\testsuite.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\test.hpp
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/yassl.dsp b/extra/yassl/yassl.dsp
deleted file mode 100644
index f9b1699e667..00000000000
--- a/extra/yassl/yassl.dsp
+++ /dev/null
@@ -1,192 +0,0 @@
-# Microsoft Developer Studio Project File - Name="yassl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=yassl - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "yassl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "yassl.mak" CFG="yassl - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "yassl - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "yassl - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "yassl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "YASSL_PREFIX" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /O2 /I "include" /I "taocrypt\include" /I "taocrypt\mySTL" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "YASSL_PREFIX" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "yassl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "YASSL_PREFIX" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "include" /I "taocrypt\include" /I "taocrypt\mySTL" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "YASSL_PREFIX" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "yassl - Win32 Release"
-# Name "yassl - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\src\buffer.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\cert_wrapper.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\crypto_wrapper.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\handshake.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\lock.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\log.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\socket_wrapper.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\ssl.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\timer.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\yassl_error.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\yassl_imp.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\yassl_int.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\include\buffer.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\cert_wrapper.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\crypto_wrapper.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\factory.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\handshake.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\lock.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\log.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\socket_wrapper.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\timer.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\yassl_error.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\yassl_imp.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\yassl_int.hpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\yassl_types.hpp
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extra/yassl/yassl.dsw b/extra/yassl/yassl.dsw
deleted file mode 100644
index 8da089fc1fa..00000000000
--- a/extra/yassl/yassl.dsw
+++ /dev/null
@@ -1,149 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "benchmark"=.\taocrypt\benchmark\benchmark.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name taocrypt
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "client"=.\examples\client\client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name yassl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "echoclient"=.\examples\echoclient\echoclient.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name yassl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "echoserver"=.\examples\echoserver\echoserver.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name yassl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "server"=.\examples\server\server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name yassl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "taocrypt"=.\taocrypt\taocrypt.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "test"=.\taocrypt\test\test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name taocrypt
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "testsuite"=.\testsuite\testsuite.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name yassl
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "yassl"=.\yassl.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name taocrypt
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/include/aria_backup.h b/include/aria_backup.h
new file mode 100644
index 00000000000..1a1c437d0b9
--- /dev/null
+++ b/include/aria_backup.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+/* Interfaces for doing backups of Aria tables */
+
+C_MODE_START
+
+typedef struct st_aria_table_capabilities
+{
+ my_off_t header_size;
+ ulong bitmap_pages_covered;
+ uint block_size;
+ uint keypage_header;
+ my_bool checksum;
+ my_bool transactional;
+ /* This is true if the table can be copied without any locks */
+ my_bool online_backup_safe;
+} ARIA_TABLE_CAPABILITIES;
+
+int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap);
+int aria_read_index(File kfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block,
+ uchar *buffer);
+int aria_read_data(File dfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block,
+ uchar *buffer, size_t *bytes_read);
+C_MODE_END
diff --git a/include/atomic/gcc_sync.h b/include/atomic/gcc_sync.h
deleted file mode 100644
index 82eea35b2ce..00000000000
--- a/include/atomic/gcc_sync.h
+++ /dev/null
@@ -1,106 +0,0 @@
-#ifndef GCC_SYNC_INCLUDED
-#define GCC_SYNC_INCLUDED
-
-/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-
-/* Old GCC __sync builtins introduced in GCC 4.1 */
-
-static inline int my_atomic_cas32(int32 volatile *a, int32 *cmp, int32 set)
-{
- int32 cmp_val= *cmp;
- int32 sav= __sync_val_compare_and_swap(a, cmp_val, set);
- int ret= (sav == cmp_val);
- if (!ret)
- *cmp = sav;
- return ret;
-}
-
-static inline int my_atomic_cas64(int64 volatile *a, int64 *cmp, int64 set)
-{
- int64 cmp_val= *cmp;
- int64 sav= __sync_val_compare_and_swap(a, cmp_val, set);
- int ret= (sav == cmp_val);
- if (!ret)
- *cmp = sav;
- return ret;
-}
-
-static inline int my_atomic_casptr(void * volatile *a, void **cmp, void *set)
-{
- void *cmp_val= *cmp;
- void *sav= __sync_val_compare_and_swap(a, cmp_val, set);
- int ret= (sav == cmp_val);
- if (!ret)
- *cmp = sav;
- return ret;
-}
-
-static inline int32 my_atomic_add32(int32 volatile *a, int32 v)
-{
- return __sync_fetch_and_add(a, v);
-}
-
-static inline int64 my_atomic_add64(int64 volatile *a, int64 v)
-{
- return __sync_fetch_and_add(a, v);
-}
-
-static inline int32 my_atomic_fas32(int32 volatile *a, int32 v)
-{
- return __sync_lock_test_and_set(a, v);
-}
-
-static inline int64 my_atomic_fas64(int64 volatile *a, int64 v)
-{
- return __sync_lock_test_and_set(a, v);
-}
-
-static inline void * my_atomic_fasptr(void * volatile *a, void * v)
-{
- return __sync_lock_test_and_set(a, v);
-}
-
-static inline int32 my_atomic_load32(int32 volatile *a)
-{
- return __sync_fetch_and_or(a, 0);
-}
-
-static inline int64 my_atomic_load64(int64 volatile *a)
-{
- return __sync_fetch_and_or(a, 0);
-}
-
-static inline void* my_atomic_loadptr(void * volatile *a)
-{
- return __sync_fetch_and_or(a, 0);
-}
-
-static inline void my_atomic_store32(int32 volatile *a, int32 v)
-{
- (void) __sync_lock_test_and_set(a, v);
-}
-
-static inline void my_atomic_store64(int64 volatile *a, int64 v)
-{
- (void) __sync_lock_test_and_set(a, v);
-}
-
-static inline void my_atomic_storeptr(void * volatile *a, void *v)
-{
- (void) __sync_lock_test_and_set(a, v);
-}
-
-#endif /* GCC_SYNC_INCLUDED */
diff --git a/include/byte_order_generic.h b/include/byte_order_generic.h
index 8381941b9b9..d2b729a241d 100644
--- a/include/byte_order_generic.h
+++ b/include/byte_order_generic.h
@@ -28,10 +28,10 @@
(((uint32) (uchar) (A)[2]) << 16) |\
(((uint32) (uchar) (A)[1]) << 8) | \
((uint32) (uchar) (A)[0])))
-#define sint4korr(A) (int32) (((int32) ((uchar) (A)[0])) |\
- (((int32) ((uchar) (A)[1]) << 8)) |\
- (((int32) ((uchar) (A)[2]) << 16)) |\
- (((int32) ((int16) (A)[3]) << 24)))
+#define sint4korr(A) (int32) (((uint32) ((uchar) (A)[0])) |\
+ (((uint32) ((uchar) (A)[1]) << 8)) |\
+ (((uint32) ((uchar) (A)[2]) << 16)) |\
+ (((uint32) ((uchar) (A)[3]) << 24)))
#define sint8korr(A) (longlong) uint8korr(A)
#define uint2korr(A) (uint16) (((uint16) ((uchar) (A)[0])) |\
((uint16) ((uchar) (A)[1]) << 8))
diff --git a/include/byte_order_generic_x86.h b/include/byte_order_generic_x86.h
index 72e00be8c2c..c47564478c6 100644
--- a/include/byte_order_generic_x86.h
+++ b/include/byte_order_generic_x86.h
@@ -17,6 +17,7 @@
/*
Optimized function-like macros for the x86 architecture (_WIN32 included).
*/
+
#define sint2korr(A) (*((const int16 *) (A)))
#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
(((uint32) 255L << 24) | \
diff --git a/include/ilist.h b/include/ilist.h
index f0d15054ab8..6e7219937dd 100644
--- a/include/ilist.h
+++ b/include/ilist.h
@@ -16,7 +16,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
*/
-#pragma once
+#ifndef ILIST_H
+#define ILIST_H
#include "my_dbug.h"
@@ -26,14 +27,17 @@
// Derive your class from this struct to insert to a linked list.
template <class Tag= void> struct ilist_node
{
- ilist_node()
+ ilist_node() noexcept
#ifndef DBUG_OFF
: next(NULL), prev(NULL)
#endif
{
}
- ilist_node(ilist_node *next, ilist_node *prev) : next(next), prev(prev) {}
+ ilist_node(ilist_node *next, ilist_node *prev) noexcept
+ : next(next), prev(prev)
+ {
+ }
ilist_node *next;
ilist_node *prev;
@@ -71,42 +75,43 @@ public:
typedef T *pointer;
typedef T &reference;
- Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_ != NULL); }
+ Iterator(ListNode *node) noexcept : node_(node)
+ { DBUG_ASSERT(node_ != nullptr); }
- Iterator &operator++()
+ Iterator &operator++() noexcept
{
node_= node_->next;
- DBUG_ASSERT(node_ != NULL);
+ DBUG_ASSERT(node_ != nullptr);
return *this;
}
- Iterator operator++(int)
+ Iterator operator++(int) noexcept
{
Iterator tmp(*this);
operator++();
return tmp;
}
- Iterator &operator--()
+ Iterator &operator--() noexcept
{
node_= node_->prev;
DBUG_ASSERT(node_);
return *this;
}
- Iterator operator--(int)
+ Iterator operator--(int) noexcept
{
Iterator tmp(*this);
operator--();
return tmp;
}
- reference operator*() { return *static_cast<pointer>(node_); }
- pointer operator->() { return static_cast<pointer>(node_); }
+ reference operator*() noexcept { return *static_cast<pointer>(node_); }
+ pointer operator->() noexcept { return static_cast<pointer>(node_); }
- friend bool operator==(const Iterator &lhs, const Iterator &rhs)
+ friend bool operator==(const Iterator &lhs, const Iterator &rhs) noexcept
{
return lhs.node_ == rhs.node_;
}
- friend bool operator!=(const Iterator &lhs, const Iterator &rhs)
+ friend bool operator!=(const Iterator &lhs, const Iterator &rhs) noexcept
{
return !(lhs == rhs);
}
@@ -117,30 +122,36 @@ public:
friend class ilist;
};
- ilist() : sentinel_(&sentinel_, &sentinel_) {}
+ ilist() noexcept : sentinel_(&sentinel_, &sentinel_) {}
- reference front() { return *begin(); }
- reference back() { return *--end(); }
- const_reference front() const { return *begin(); }
- const_reference back() const { return *--end(); }
+ reference front() noexcept { return *begin(); }
+ reference back() noexcept { return *--end(); }
+ const_reference front() const noexcept { return *begin(); }
+ const_reference back() const noexcept { return *--end(); }
- iterator begin() { return iterator(sentinel_.next); }
- const_iterator begin() const
+ iterator begin() noexcept { return iterator(sentinel_.next); }
+ const_iterator begin() const noexcept
{
return iterator(const_cast<ListNode *>(sentinel_.next));
}
- iterator end() { return iterator(&sentinel_); }
- const_iterator end() const
+ iterator end() noexcept { return iterator(&sentinel_); }
+ const_iterator end() const noexcept
{
return iterator(const_cast<ListNode *>(&sentinel_));
}
- reverse_iterator rbegin() { return reverse_iterator(end()); }
- const_reverse_iterator rbegin() const { return reverse_iterator(end()); }
- reverse_iterator rend() { return reverse_iterator(begin()); }
- const_reverse_iterator rend() const { return reverse_iterator(begin()); }
+ reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const noexcept
+ {
+ return reverse_iterator(end());
+ }
+ reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const noexcept
+ {
+ return reverse_iterator(begin());
+ }
- bool empty() const { return sentinel_.next == &sentinel_; }
+ bool empty() const noexcept { return sentinel_.next == &sentinel_; }
// Not implemented because it's O(N)
// size_type size() const
@@ -148,13 +159,13 @@ public:
// return static_cast<size_type>(std::distance(begin(), end()));
// }
- void clear()
+ void clear() noexcept
{
sentinel_.next= &sentinel_;
sentinel_.prev= &sentinel_;
}
- iterator insert(iterator pos, reference value)
+ iterator insert(iterator pos, reference value) noexcept
{
ListNode *curr= pos.node_;
ListNode *prev= pos.node_->prev;
@@ -168,7 +179,7 @@ public:
return iterator(&value);
}
- iterator erase(iterator pos)
+ iterator erase(iterator pos) noexcept
{
ListNode *prev= pos.node_->prev;
ListNode *next= pos.node_->next;
@@ -178,22 +189,22 @@ public:
#ifndef DBUG_OFF
ListNode *curr= pos.node_;
- curr->prev= NULL;
- curr->next= NULL;
+ curr->prev= nullptr;
+ curr->next= nullptr;
#endif
return next;
}
- void push_back(reference value) { insert(end(), value); }
- void pop_back() { erase(end()); }
+ void push_back(reference value) noexcept { insert(end(), value); }
+ void pop_back() noexcept { erase(end()); }
- void push_front(reference value) { insert(begin(), value); }
- void pop_front() { erase(begin()); }
+ void push_front(reference value) noexcept { insert(begin(), value); }
+ void pop_front() noexcept { erase(begin()); }
// STL version is O(n) but this is O(1) because an element can't be inserted
// several times in the same ilist.
- void remove(reference value) { erase(iterator(&value)); }
+ void remove(reference value) noexcept { erase(iterator(&value)); }
private:
ListNode sentinel_;
@@ -219,36 +230,38 @@ public:
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const iterator> const_reverse_iterator;
- sized_ilist() : size_(0) {}
+ sized_ilist() noexcept : size_(0) {}
- size_type size() const { return size_; }
+ size_type size() const noexcept { return size_; }
- void clear()
+ void clear() noexcept
{
BASE::clear();
size_= 0;
}
- iterator insert(iterator pos, reference value)
+ iterator insert(iterator pos, reference value) noexcept
{
++size_;
return BASE::insert(pos, value);
}
- iterator erase(iterator pos)
+ iterator erase(iterator pos) noexcept
{
--size_;
return BASE::erase(pos);
}
- void push_back(reference value) { insert(BASE::end(), value); }
- void pop_back() { erase(BASE::end()); }
+ void push_back(reference value) noexcept { insert(BASE::end(), value); }
+ void pop_back() noexcept { erase(BASE::end()); }
- void push_front(reference value) { insert(BASE::begin(), value); }
- void pop_front() { erase(BASE::begin()); }
+ void push_front(reference value) noexcept { insert(BASE::begin(), value); }
+ void pop_front() noexcept { erase(BASE::begin()); }
- void remove(reference value) { erase(iterator(&value)); }
+ void remove(reference value) noexcept { erase(iterator(&value)); }
private:
size_type size_;
};
+
+#endif
diff --git a/include/json_lib.h b/include/json_lib.h
index fed85b516d9..bb649928eaa 100644
--- a/include/json_lib.h
+++ b/include/json_lib.h
@@ -172,13 +172,14 @@ enum json_states {
enum json_value_types
{
+ JSON_VALUE_UNINITALIZED=0,
JSON_VALUE_OBJECT=1,
JSON_VALUE_ARRAY=2,
- JSON_VALUE_STRING,
- JSON_VALUE_NUMBER,
- JSON_VALUE_TRUE,
- JSON_VALUE_FALSE,
- JSON_VALUE_NULL
+ JSON_VALUE_STRING=3,
+ JSON_VALUE_NUMBER=4,
+ JSON_VALUE_TRUE=5,
+ JSON_VALUE_FALSE=6,
+ JSON_VALUE_NULL=7
};
@@ -423,10 +424,15 @@ int json_path_parts_compare(
int json_path_compare(const json_path_t *a, const json_path_t *b,
enum json_value_types vt);
+int json_valid(const char *js, size_t js_len, CHARSET_INFO *cs);
+
+int json_locate_key(const char *js, const char *js_end,
+ const char *kname,
+ const char **key_start, const char **key_end,
+ int *comma_pos);
#ifdef __cplusplus
}
#endif
#endif /* JSON_LIB_INCLUDED */
-
diff --git a/include/lf.h b/include/lf.h
index 10a60c5c949..88ac644c349 100644
--- a/include/lf.h
+++ b/include/lf.h
@@ -17,7 +17,6 @@
#define INCLUDE_LF_INCLUDED
#include <my_atomic.h>
-#include <my_cpu.h>
C_MODE_START
@@ -166,6 +165,8 @@ void *lf_hash_search_using_hash_value(LF_HASH *hash, LF_PINS *pins,
int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen);
int lf_hash_iterate(LF_HASH *hash, LF_PINS *pins,
my_hash_walk_action action, void *argument);
+#define lf_hash_size(hash) \
+ my_atomic_load32_explicit(&(hash)->count, MY_MEMORY_ORDER_RELAXED)
/*
shortcut macros to access underlying pinbox functions from an LF_HASH
see lf_pinbox_get_pins() and lf_pinbox_put_pins()
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 1cdff1f54cc..187c8710929 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -330,6 +330,60 @@ struct my_collation_handler_st
const uchar *, size_t, const uchar *, size_t, my_bool);
int (*strnncollsp)(CHARSET_INFO *,
const uchar *, size_t, const uchar *, size_t);
+ /*
+ strnncollsp_nchars() - similar to strnncollsp() but assumes that both
+ strings were originally CHAR(N) values with the
+ same N, then were optionally space-padded,
+ or optionally space-trimmed.
+
+ In other words, this function compares in the way
+ if we insert both values into a CHAR(N) column
+ and then compare the two column values.
+
+ It compares the same amount of characters from the two strings.
+ This is especially important for NOPAD collations.
+
+ If CHAR_LENGTH of the two strings are different,
+ the shorter string is virtually padded with trailing spaces
+ up to CHAR_LENGTH of the longer string, to guarantee that the
+ same amount of characters are compared.
+ This is important if the two CHAR(N) strings are space-trimmed
+ (e.g. like in InnoDB compact format for CHAR).
+
+ The function compares not more than "nchars" characters only.
+ This can be useful to compare CHAR(N) space-padded strings
+ (when the exact N is known) without having to truncate them before
+ the comparison.
+
+ For example, Field_string stores a "CHAR(3) CHARACTER SET utf8mb4" value
+ of "aaa" as 12 bytes in a record buffer:
+ - 3 bytes of the actual data, followed by
+ - 9 bytes of spaces (just fillers, not real data)
+ The caller can pass nchars=3 to compare CHAR(3) record values.
+ In such case, the comparator won't go inside the 9 bytes of the fillers.
+
+ If N is not known, the caller can pass max(len1,len2) as the "nchars" value
+ (i.e. the maximum of the OCTET_LENGTH of the two strings).
+
+ Notes on complex collations.
+
+ This function counts contraction parts as individual characters.
+ For example, the Czech letter 'ch' (in Czech collations)
+ is ordinarily counted by the "nchars" limit as TWO characters
+ (although it is only one letter).
+ This corresponds to what CHAR(N) does in INSERT.
+
+ If the "nchars" limit tears apart a contraction, only the part fitting
+ into "nchars" characters is used. For example, in case of a Czech collation,
+ the string "ach" with nchars=2 is compared as 'ac': the contraction
+ 'ch' is torn apart and the letter 'c' acts as an individual character.
+ This emulates the same comparison result with the scenario when we insert
+ 'ach' into a CHAR(2) column and then compare it.
+ */
+ int (*strnncollsp_nchars)(CHARSET_INFO *,
+ const uchar *str1, size_t len1,
+ const uchar *str2, size_t len2,
+ size_t nchars);
size_t (*strnxfrm)(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
@@ -362,7 +416,6 @@ extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler;
-extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
/* Some typedef to make it easy for C++ to make function pointers */
typedef int (*my_charset_conv_mb_wc)(CHARSET_INFO *, my_wc_t *,
@@ -872,14 +925,6 @@ size_t my_strnxfrm_mb_nopad(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
-size_t my_strnxfrm_unicode(CHARSET_INFO *,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags);
-
-size_t my_strnxfrm_unicode_nopad(CHARSET_INFO *,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags);
-
size_t my_strnxfrmlen_unicode(CHARSET_INFO *, size_t);
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *,
diff --git a/include/m_string.h b/include/m_string.h
index e967f140dc4..2747a9a7a9f 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -99,7 +99,7 @@ extern char *strmake(char *dst,const char *src,size_t length);
#define strmake_buf(D,S) strmake(D, S, sizeof(D) - 1)
#else
#define strmake_buf(D,S) ({ \
- typeof (D) __x __attribute__((unused)) = { 2 }; \
+ __typeof__ (D) __x __attribute__((unused)) = { 2 }; \
strmake(D, S, sizeof(D) - 1); \
})
#endif
diff --git a/include/maria.h b/include/maria.h
index 880b7367c0b..a946363c57b 100644
--- a/include/maria.h
+++ b/include/maria.h
@@ -305,7 +305,7 @@ extern int maria_rsame_with_pos(MARIA_HA *file, uchar *record,
int inx, MARIA_RECORD_POS pos);
extern int maria_update(MARIA_HA *file, const uchar *old,
const uchar *new_record);
-extern int maria_write(MARIA_HA *file, uchar *buff);
+extern int maria_write(MARIA_HA *file, const uchar *buff);
extern MARIA_RECORD_POS maria_position(MARIA_HA *file);
extern int maria_status(MARIA_HA *info, MARIA_INFO *x, uint flag);
extern int maria_lock_database(MARIA_HA *file, int lock_type);
@@ -396,6 +396,7 @@ int maria_preload(MARIA_HA *info, ulonglong key_map, my_bool ignore_leaves);
void maria_versioning(MARIA_HA *info, my_bool versioning);
void maria_ignore_trids(MARIA_HA *info);
uint maria_max_key_length(void);
+my_bool maria_too_big_key_for_sort(MARIA_KEYDEF *key, ha_rows rows);
#define maria_max_key_segments() HA_MAX_KEY_SEG
/* fulltext functions */
diff --git a/include/my_atomic.h b/include/my_atomic.h
index 19983daed04..270134a6caf 100644
--- a/include/my_atomic.h
+++ b/include/my_atomic.h
@@ -2,6 +2,7 @@
#define MY_ATOMIC_INCLUDED
/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2018, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -112,24 +113,6 @@
#include "atomic/solaris.h"
#elif defined(HAVE_GCC_C11_ATOMICS)
#include "atomic/gcc_builtins.h"
-#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
-#include "atomic/gcc_sync.h"
-#endif
-
-#if SIZEOF_LONG == 4
-#define my_atomic_addlong(A,B) my_atomic_add32((int32*) (A), (B))
-#define my_atomic_loadlong(A) my_atomic_load32((int32*) (A))
-#define my_atomic_loadlong_explicit(A,O) my_atomic_load32_explicit((int32*) (A), (O))
-#define my_atomic_storelong(A,B) my_atomic_store32((int32*) (A), (B))
-#define my_atomic_faslong(A,B) my_atomic_fas32((int32*) (A), (B))
-#define my_atomic_caslong(A,B,C) my_atomic_cas32((int32*) (A), (int32*) (B), (C))
-#else
-#define my_atomic_addlong(A,B) my_atomic_add64((int64*) (A), (B))
-#define my_atomic_loadlong(A) my_atomic_load64((int64*) (A))
-#define my_atomic_loadlong_explicit(A,O) my_atomic_load64_explicit((int64*) (A), (O))
-#define my_atomic_storelong(A,B) my_atomic_store64((int64*) (A), (B))
-#define my_atomic_faslong(A,B) my_atomic_fas64((int64*) (A), (B))
-#define my_atomic_caslong(A,B,C) my_atomic_cas64((int64*) (A), (int64*) (B), (C))
#endif
#ifndef MY_MEMORY_ORDER_SEQ_CST
@@ -170,5 +153,4 @@
#define my_atomic_casptr_strong_explicit(P, E, D, S, F) \
my_atomic_casptr((P), (E), (D))
#endif
-
#endif /* MY_ATOMIC_INCLUDED */
diff --git a/include/my_atomic_wrapper.h b/include/my_atomic_wrapper.h
new file mode 100644
index 00000000000..c574fba4a8e
--- /dev/null
+++ b/include/my_atomic_wrapper.h
@@ -0,0 +1,65 @@
+/* Copyright (c) 2020, MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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 */
+
+#pragma once
+#ifdef __cplusplus
+#include <atomic>
+/**
+ A wrapper for std::atomic, defaulting to std::memory_order_relaxed.
+
+ When it comes to atomic loads or stores at std::memory_order_relaxed
+ on IA-32 or AMD64, this wrapper is only introducing some constraints
+ to the C++ compiler, to prevent some optimizations of loads or
+ stores.
+
+ On POWER and ARM, atomic loads and stores involve different instructions
+ from normal loads and stores and will thus incur some overhead.
+
+ Because atomic read-modify-write operations will always incur
+ overhead, we intentionally do not define
+ operator++(), operator--(), operator+=(), operator-=(), or similar,
+ to make the overhead stand out in the users of this code.
+*/
+template <typename Type> class Atomic_relaxed
+{
+ std::atomic<Type> m;
+public:
+ Atomic_relaxed(const Atomic_relaxed<Type> &rhs)
+ { m.store(rhs, std::memory_order_relaxed); }
+ Atomic_relaxed(Type val) : m(val) {}
+ Atomic_relaxed() {}
+
+ operator Type() const { return m.load(std::memory_order_relaxed); }
+ Type operator=(const Type val)
+ { m.store(val, std::memory_order_relaxed); return val; }
+ Type operator=(const Atomic_relaxed<Type> &rhs) { return *this= Type{rhs}; }
+ Type fetch_add(const Type i, std::memory_order o= std::memory_order_relaxed)
+ { return m.fetch_add(i, o); }
+ Type fetch_sub(const Type i, std::memory_order o= std::memory_order_relaxed)
+ { return m.fetch_sub(i, o); }
+ Type fetch_xor(const Type i, std::memory_order o= std::memory_order_relaxed)
+ { return m.fetch_xor(i, o); }
+ Type fetch_and(const Type i, std::memory_order o= std::memory_order_relaxed)
+ { return m.fetch_and(i, o); }
+ Type fetch_or(const Type i, std::memory_order o= std::memory_order_relaxed)
+ { return m.fetch_or(i, o); }
+ bool compare_exchange_strong(Type& i1, const Type i2,
+ std::memory_order o1= std::memory_order_relaxed,
+ std::memory_order o2= std::memory_order_relaxed)
+ { return m.compare_exchange_strong(i1, i2, o1, o2); }
+ Type exchange(const Type i, std::memory_order o= std::memory_order_relaxed)
+ { return m.exchange(i, o); }
+};
+#endif /* __cplusplus */
diff --git a/include/my_base.h b/include/my_base.h
index 8f4efec10bd..7016766ce58 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 1995, 2018, MariaDB Corporation.
+ Copyright (c) 1995, 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
@@ -99,7 +99,8 @@ enum ha_key_alg {
HA_KEY_ALG_BTREE= 1, /* B-tree, default one */
HA_KEY_ALG_RTREE= 2, /* R-tree, for spatial searches */
HA_KEY_ALG_HASH= 3, /* HASH keys (HEAP tables) */
- HA_KEY_ALG_FULLTEXT= 4 /* FULLTEXT (MyISAM tables) */
+ HA_KEY_ALG_FULLTEXT= 4, /* FULLTEXT (MyISAM tables) */
+ HA_KEY_ALG_LONG_HASH= 5 /* long BLOB keys */
};
/* Storage media types */
@@ -212,9 +213,7 @@ enum ha_extra_function {
/** Start writing rows during ALTER TABLE...ALGORITHM=COPY. */
HA_EXTRA_BEGIN_ALTER_COPY,
/** Finish writing rows during ALTER TABLE...ALGORITHM=COPY. */
- HA_EXTRA_END_ALTER_COPY,
- /** Fake the start of a statement after wsrep_load_data_splitting hack */
- HA_EXTRA_FAKE_START_STMT
+ HA_EXTRA_END_ALTER_COPY
};
/* Compatible option, to be deleted in 6.0 */
@@ -522,8 +521,9 @@ enum ha_base_keytype {
#define HA_ERR_TABLESPACE_MISSING 194 /* Missing Tablespace */
#define HA_ERR_SEQUENCE_INVALID_DATA 195
#define HA_ERR_SEQUENCE_RUN_OUT 196
-#define HA_ERR_PARTITION_LIST 197
-#define HA_ERR_LAST 197 /* Copy of last error nr * */
+#define HA_ERR_COMMIT_ERROR 197
+#define HA_ERR_PARTITION_LIST 198
+#define HA_ERR_LAST 198 /* Copy of last error nr * */
/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
@@ -632,7 +632,13 @@ typedef struct st_key_multi_range
key_range start_key;
key_range end_key;
range_id_t ptr; /* Free to use by caller (ptr to row etc) */
- uint range_flag; /* key range flags see above */
+ /*
+ A set of range flags that describe both endpoints: UNIQUE_RANGE,
+ NULL_RANGE, EQ_RANGE, GEOM_FLAG.
+ (Flags that describe one endpoint, NO_{MIN|MAX}_RANGE, NEAR_{MIN|MAX} will
+ not be set here)
+ */
+ uint range_flag;
} KEY_MULTI_RANGE;
diff --git a/include/my_bit.h b/include/my_bit.h
index 74469b5b899..7a408bd0535 100644
--- a/include/my_bit.h
+++ b/include/my_bit.h
@@ -122,6 +122,14 @@ static inline uint64 my_set_bits(int n)
return (((1ULL << (n - 1)) - 1) << 1) | 1;
}
+/* Create a mask of the significant bits for the last byte (1,3,7,..255) */
+static inline uchar last_byte_mask(uint bits)
+{
+ /* Get the number of used bits-1 (0..7) in the last byte */
+ unsigned int const used = (bits - 1U) & 7U;
+ /* Return bitmask for the significant bits */
+ return ((2U << used) - 1);
+}
C_MODE_END
#endif /* MY_BIT_INCLUDED */
diff --git a/include/my_byteorder.h b/include/my_byteorder.h
index c302781d9fc..abdf19a3632 100644
--- a/include/my_byteorder.h
+++ b/include/my_byteorder.h
@@ -31,10 +31,10 @@
format (low byte first). There are 'korr' (assume 'corrector') variants
for integer types, but 'get' (assume 'getter') for floating point types.
*/
-#if defined(__i386__) || defined(_WIN32)
+#if (defined(__i386__) || defined(_WIN32)) && !defined(WITH_UBSAN)
#define MY_BYTE_ORDER_ARCH_OPTIMIZED
#include "byte_order_generic_x86.h"
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) && !defined(WITH_UBSAN)
#include "byte_order_generic_x86_64.h"
#else
#include "byte_order_generic.h"
diff --git a/include/my_compare.h b/include/my_compare.h
index bd1a7bd1f34..bd5dc418f8c 100644
--- a/include/my_compare.h
+++ b/include/my_compare.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2011, Oracle and/or its affiliates.
- Copyright (c) Monty Program Ab; 1991-2011
+ Copyright (c) 1991, 2020, 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
@@ -95,15 +95,16 @@ static inline uchar get_rec_bits(const uchar *ptr, uchar ofs, uint len)
{
uint16 val= ptr[0];
if (ofs + len > 8)
- val|= (uint16)(ptr[1]) << 8;
- return (val >> ofs) & ((1 << len) - 1);
+ val|= (uint16)(((uint) ptr[1]) << 8);
+ return (uchar) ((val >> ofs) & ((1 << len) - 1));
}
static inline void set_rec_bits(uint16 bits, uchar *ptr, uchar ofs, uint len)
{
- ptr[0]= (ptr[0] & ~(((1 << len) - 1) << ofs)) | (bits << ofs);
+ ptr[0]= (uchar) ((ptr[0] & ~(((1 << len) - 1) << ofs)) | (bits << ofs));
if (ofs + len > 8)
- ptr[1]= (ptr[1] & ~((1 << (len - 8 + ofs)) - 1)) | (bits >> (8 - ofs));
+ ptr[1]= (uchar) ((ptr[1] & ~((1 << (len - 8 + ofs)) - 1)) |
+ bits >> (8 - ofs));
}
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
@@ -127,30 +128,32 @@ extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, const uchar *a);
#endif
/**
- Return values of index_cond_func_xxx functions.
-
- 0=ICP_NO_MATCH - index tuple doesn't satisfy the pushed index condition (the
- engine should discard the tuple and go to the next one)
- 1=ICP_MATCH - index tuple satisfies the pushed index condition (the
- engine should fetch and return the record)
- 2=ICP_OUT_OF_RANGE - index tuple is out range that we're scanning, e.g. this
- if we're scanning "t.key BETWEEN 10 AND 20" and got a
- "t.key=21" tuple (the engine should stop scanning and
- return HA_ERR_END_OF_FILE right away).
- 3=ICP_ABORTED_BY_USER - engine must stop scanning and should return
- HA_ERR_ABORTED_BY_USER right away
- -1= ICP_ERROR - Reserved for internal errors in engines. Should not be
- returned by index_cond_func_xxx
+ Return values for pushed index condition or rowid filter check functions.
+
+ 0=CHECK_NEG - The filter is not satisfied. The engine should discard this
+ index tuple and continue the scan.
+ 1=CHECK_POS - The filter is statisfied. Current index tuple should be
+ returned to the SQL layer.
+ 2=CHECK_OUT_OF_RANGE - the index tuple is outside of the range that we're
+ scanning. (Example: if we're scanning "t.key BETWEEN 10 AND
+ 20" and got a "t.key=21" tuple) Tthe engine should stop
+ scanning and return HA_ERR_END_OF_FILE right away).
+ 3=CHECK_ABORTED_BY_USER - the engine must stop scanning and should return
+ HA_ERR_ABORTED_BY_USER right away
+ -1=CHECK_ERROR - Reserved for internal errors in engines. Should not be
+ returned by ICP or rowid filter check functions.
*/
-typedef enum icp_result {
- ICP_ERROR=-1,
- ICP_NO_MATCH=0,
- ICP_MATCH=1,
- ICP_OUT_OF_RANGE=2,
- ICP_ABORTED_BY_USER=3
-} ICP_RESULT;
-
-typedef ICP_RESULT (*index_cond_func_t)(void *param);
+typedef enum check_result {
+ CHECK_ERROR=-1,
+ CHECK_NEG=0,
+ CHECK_POS=1,
+ CHECK_OUT_OF_RANGE=2,
+ CHECK_ABORTED_BY_USER=3
+} check_result_t;
+
+typedef check_result_t (*index_cond_func_t)(void *param);
+typedef check_result_t (*rowid_filter_func_t)(void *param);
+typedef int (*rowid_filter_is_active_func_t)(void *param);
#endif /* _my_compare_h */
diff --git a/include/my_counter.h b/include/my_counter.h
new file mode 100644
index 00000000000..c5cbe296df0
--- /dev/null
+++ b/include/my_counter.h
@@ -0,0 +1,49 @@
+#ifndef MY_COUNTER_H_INCLUDED
+#define MY_COUNTER_H_INCLUDED
+/*
+ Copyright (C) 2018 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-1301 USA
+*/
+
+#include <atomic>
+
+
+template <typename Type> class Atomic_counter
+{
+ std::atomic<Type> m_counter;
+
+ Type add(Type i) { return m_counter.fetch_add(i, std::memory_order_relaxed); }
+ Type sub(Type i) { return m_counter.fetch_sub(i, std::memory_order_relaxed); }
+
+public:
+ Atomic_counter(const Atomic_counter<Type> &rhs)
+ { m_counter.store(rhs, std::memory_order_relaxed); }
+ Atomic_counter(Type val): m_counter(val) {}
+ Atomic_counter() {}
+
+ Type operator++(int) { return add(1); }
+ Type operator--(int) { return sub(1); }
+
+ Type operator++() { return add(1) + 1; }
+ Type operator--() { return sub(1) - 1; }
+
+ Type operator+=(const Type i) { return add(i) + i; }
+ Type operator-=(const Type i) { return sub(i) - i; }
+
+ operator Type() const { return m_counter.load(std::memory_order_relaxed); }
+ Type operator=(const Type val)
+ { m_counter.store(val, std::memory_order_relaxed); return val; }
+};
+#endif /* MY_COUNTER_H_INCLUDED */
diff --git a/include/my_cpu.h b/include/my_cpu.h
index 0e37eafe60e..57f2bf814d4 100644
--- a/include/my_cpu.h
+++ b/include/my_cpu.h
@@ -1,6 +1,6 @@
#ifndef MY_CPU_INCLUDED
#define MY_CPU_INCLUDED
-/* Copyright (c) 2013, MariaDB foundation Ab and SkySQL
+/* Copyright (c) 2013, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,6 +50,14 @@
# define HAVE_PAUSE_INSTRUCTION /* added in Intel Pentium 4 */
#endif
+#ifdef _WIN32
+#elif defined HAVE_PAUSE_INSTRUCTION
+#elif defined(_ARCH_PWR8)
+#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
+#else
+# include "my_atomic.h"
+#endif
+
static inline void MY_RELAX_CPU(void)
{
#ifdef _WIN32
@@ -73,6 +81,9 @@ static inline void MY_RELAX_CPU(void)
#endif
#elif defined(_ARCH_PWR8)
__ppc_get_timebase();
+#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
+ /* Mainly, prevent the compiler from optimizing away delay loops */
+ __asm__ __volatile__ ("":::"memory");
#else
int32 var, oldval = 0;
my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED,
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 72ce03d5654..f0cefb35b87 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -106,6 +106,7 @@ extern char *autoset_my_option;
extern my_bool my_getopt_print_errors;
extern my_bool my_getopt_skip_unknown;
extern my_bool my_getopt_prefix_matching;
+extern my_bool my_handle_options_init_variables;
extern my_error_reporter my_getopt_error_reporter;
extern int handle_options (int *argc, char ***argv,
diff --git a/include/my_global.h b/include/my_global.h
index 9eb12ee003b..a4c694fd196 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -133,11 +133,6 @@
#define F_UNLCK 3
#define F_TO_EOF 0x3FFFFFFF
-/* Shared memory and named pipe connections are supported. */
-#define HAVE_SMEM 1
-#define HAVE_NAMED_PIPE 1
-#define shared_memory_buffer_length 16000
-#define default_shared_memory_base_name "MYSQL"
#endif /* _WIN32*/
@@ -1001,7 +996,6 @@ typedef struct st_mysql_lex_string LEX_STRING;
#if defined(__WIN__)
#define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR
-#define SOCKET_EAGAIN WSAEINPROGRESS
#define SOCKET_ETIMEDOUT WSAETIMEDOUT
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
#define SOCKET_EADDRINUSE WSAEADDRINUSE
@@ -1196,8 +1190,6 @@ typedef struct { const char *dli_fname, dli_fbase; } Dl_info;
/* Things we don't need in the embedded version of MySQL */
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
-#undef HAVE_SMEM /* No shared memory */
-
#else
#define HAVE_REPLICATION
#define HAVE_EXTERNAL_CLIENT
diff --git a/include/my_handler_errors.h b/include/my_handler_errors.h
index 946e615aa79..4c3a02dd745 100644
--- a/include/my_handler_errors.h
+++ b/include/my_handler_errors.h
@@ -108,6 +108,7 @@ static const char *handler_error_messages[]=
"Tablespace is missing for a table",
"Sequence has been run out",
"Sequence values are conflicting",
+ "Error during commit",
"Cannot select partitions"
};
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 48b182ac5c1..65498d185c5 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -23,8 +23,6 @@
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif
-#include <my_atomic.h>
-
#ifdef __cplusplus
#define EXTERNC extern "C"
extern "C" {
@@ -191,7 +189,18 @@ extern int my_pthread_create_detached;
int sigwait(sigset_t *set, int *sig);
#endif
-#define my_sigwait(A,B) sigwait((A),(B))
+static inline int my_sigwait(sigset_t *set, int *sig, int *code)
+{
+#ifdef HAVE_SIGWAITINFO
+ siginfo_t siginfo;
+ *sig= sigwaitinfo(set, &siginfo);
+ *code= siginfo.si_code;
+ return *sig < 0 ? errno : 0;
+#else
+ *code= 0;
+ return sigwait(set, sig);
+#endif
+}
#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK)
#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
@@ -808,26 +817,6 @@ extern uint thd_lib_detected;
#define statistic_sub(V,C,L) (V)-=(C)
#endif /* SAFE_STATISTICS */
-static inline void thread_safe_increment32(int32 *value)
-{
- (void) my_atomic_add32_explicit(value, 1, MY_MEMORY_ORDER_RELAXED);
-}
-
-static inline void thread_safe_decrement32(int32 *value)
-{
- (void) my_atomic_add32_explicit(value, -1, MY_MEMORY_ORDER_RELAXED);
-}
-
-static inline void thread_safe_increment64(int64 *value)
-{
- (void) my_atomic_add64_explicit(value, 1, MY_MEMORY_ORDER_RELAXED);
-}
-
-static inline void thread_safe_decrement64(int64 *value)
-{
- (void) my_atomic_add64_explicit(value, -1, MY_MEMORY_ORDER_RELAXED);
-}
-
/*
No locking needed, the counter is owned by the thread
*/
diff --git a/include/my_rdtsc.h b/include/my_rdtsc.h
index df421225f4f..33d722764d4 100644
--- a/include/my_rdtsc.h
+++ b/include/my_rdtsc.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
- Use is subject to license terms.
+ Copyright (c) 2019, 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
@@ -23,6 +23,20 @@
#ifndef MY_RDTSC_H
#define MY_RDTSC_H
+# ifndef __has_builtin
+# define __has_builtin(x) 0 /* Compatibility with non-clang compilers */
+# endif
+# if __has_builtin(__builtin_readcyclecounter)
+# elif defined _WIN32
+# include <intrin.h>
+# elif defined __i386__ || defined __x86_64__
+# include <x86intrin.h>
+# elif defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H)
+# include <ia64intrin.h>
+# elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
+# include <sys/times.h>
+# endif
+
/**
Characteristics of a timer.
*/
@@ -62,12 +76,113 @@ C_MODE_START
/**
A cycle timer.
+
+ On clang we use __builtin_readcyclecounter(), except for AARCH64.
+ On other compilers:
+
+ On IA-32 and AMD64, we use the RDTSC instruction.
+ On IA-64, we read the ar.itc register.
+ On SPARC, we read the tick register.
+ On POWER, we read the Time Base Register (which is not really a cycle count
+ but a separate counter with less than nanosecond resolution).
+ On IBM S/390 System z we use the STCK instruction.
+ On ARM, we probably should use the Generic Timer, but should figure out
+ how to ensure that it can be accessed.
+ On AARCH64, we use the generic timer base register. We override clang
+ implementation for aarch64 as it access a PMU register which is not
+ guarenteed to be active.
+
+ Sadly, we have nothing for the Digital Alpha, MIPS, Motorola m68k,
+ HP PA-RISC or other non-mainstream (or obsolete) processors.
+
+ TODO: consider C++11 std::chrono::high_resolution_clock.
+
+ We fall back to gethrtime() where available.
+
+ On the platforms that do not have a CYCLE timer,
+ "wait" events are initialized to use NANOSECOND instead of CYCLE
+ during performance_schema initialization (at the server startup).
+
+ Linux performance monitor (see "man perf_event_open") can
+ provide cycle counter on the platforms that do not have
+ other kinds of cycle counters. But we don't use it so far.
+
+ ARM notes
+ ---------
+ During tests on ARMv7 Debian, perf_even_open() based cycle counter provided
+ too low frequency with too high overhead:
+ MariaDB [performance_schema]> SELECT * FROM performance_timers;
+ +-------------+-----------------+------------------+----------------+
+ | TIMER_NAME | TIMER_FREQUENCY | TIMER_RESOLUTION | TIMER_OVERHEAD |
+ +-------------+-----------------+------------------+----------------+
+ | CYCLE | 689368159 | 1 | 970 |
+ | NANOSECOND | 1000000000 | 1 | 308 |
+ | MICROSECOND | 1000000 | 1 | 417 |
+ | MILLISECOND | 1000 | 1000 | 407 |
+ | TICK | 127 | 1 | 612 |
+ +-------------+-----------------+------------------+----------------+
+ Therefore, it was decided not to use perf_even_open() on ARM
+ (i.e. go without CYCLE and have "wait" events use NANOSECOND by default).
+
@return the current timer value, in cycles.
*/
-ulonglong my_timer_cycles(void);
+static inline ulonglong my_timer_cycles(void)
+{
+# if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__)
+ return __builtin_readcyclecounter();
+# elif defined _WIN32 || defined __i386__ || defined __x86_64__
+ return __rdtsc();
+# elif defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H)
+ return (ulonglong) __getReg(_IA64_REG_AR_ITC); /* (3116) */
+#elif defined(__GNUC__) && defined(__ia64__)
+ {
+ ulonglong result;
+ __asm __volatile__ ("mov %0=ar.itc" : "=r" (result));
+ return result;
+ }
+#elif defined __GNUC__ && defined __powerpc__
+ return __builtin_ppc_get_timebase();
+#elif defined(__GNUC__) && defined(__sparcv9) && defined(_LP64)
+ {
+ ulonglong result;
+ __asm __volatile__ ("rd %%tick,%0" : "=r" (result));
+ return result;
+ }
+#elif defined(__GNUC__) && defined(__sparc__) && !defined(_LP64)
+ {
+ union {
+ ulonglong wholeresult;
+ struct {
+ ulong high;
+ ulong low;
+ } splitresult;
+ } result;
+ __asm __volatile__ ("rd %%tick,%1; srlx %1,32,%0" : "=r" (result.splitresult.high), "=r" (result.splitresult.low));
+ return result.wholeresult;
+ }
+#elif defined(__GNUC__) && defined(__s390__)
+ /* covers both s390 and s390x */
+ {
+ ulonglong result;
+ __asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc");
+ return result;
+ }
+#elif defined(__GNUC__) && defined (__aarch64__)
+ {
+ ulonglong result;
+ __asm __volatile("mrs %0, CNTVCT_EL0" : "=&r" (result));
+ return result;
+ }
+#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
+ /* gethrtime may appear as either cycle or nanosecond counter */
+ return (ulonglong) gethrtime();
+#else
+ return 0;
+#endif
+}
/**
- A namoseconds timer.
+ A nanosecond timer.
@return the current timer value, in nanoseconds.
*/
ulonglong my_timer_nanoseconds(void);
@@ -98,34 +213,24 @@ void my_timer_init(MY_TIMER_INFO *mti);
C_MODE_END
-#define MY_TIMER_ROUTINE_ASM_X86 1
-#define MY_TIMER_ROUTINE_ASM_X86_64 2
-#define MY_TIMER_ROUTINE_RDTSCLL 3
-#define MY_TIMER_ROUTINE_ASM_X86_WIN 4
#define MY_TIMER_ROUTINE_RDTSC 5
#define MY_TIMER_ROUTINE_ASM_IA64 6
-#define MY_TIMER_ROUTINE_ASM_PPC 7
-#define MY_TIMER_ROUTINE_SGI_CYCLE 8
+#define MY_TIMER_ROUTINE_PPC_GET_TIMEBASE 7
#define MY_TIMER_ROUTINE_GETHRTIME 9
#define MY_TIMER_ROUTINE_READ_REAL_TIME 10
#define MY_TIMER_ROUTINE_CLOCK_GETTIME 11
-#define MY_TIMER_ROUTINE_NXGETTIME 12
#define MY_TIMER_ROUTINE_GETTIMEOFDAY 13
#define MY_TIMER_ROUTINE_QUERYPERFORMANCECOUNTER 14
#define MY_TIMER_ROUTINE_GETTICKCOUNT 15
#define MY_TIMER_ROUTINE_TIME 16
#define MY_TIMER_ROUTINE_TIMES 17
#define MY_TIMER_ROUTINE_FTIME 18
-#define MY_TIMER_ROUTINE_ASM_PPC64 19
-#define MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC64 20
-#define MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC32 21
-#define MY_TIMER_ROUTINE_ASM_SUNPRO_I386 22
#define MY_TIMER_ROUTINE_ASM_GCC_SPARC64 23
#define MY_TIMER_ROUTINE_ASM_GCC_SPARC32 24
#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
-#define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27
#define MY_TIMER_ROUTINE_ASM_S390 28
+#define MY_TIMER_ROUTINE_AARCH64 29
#endif
diff --git a/include/my_sys.h b/include/my_sys.h
index 5cabfc25c12..fbb46d7a6e0 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -104,13 +104,12 @@ typedef struct my_aio_result {
#define MY_GIVE_INFO 2U /* Give time info about process*/
#define MY_DONT_FREE_DBUG 4U /* Do not call DBUG_END() in my_end() */
-#define ME_BELL 4U /* Ring bell then printing message */
-#define ME_WAITTANG 0 /* Wait for a user action */
-#define ME_NOREFRESH 64U /* Write the error message to error log */
-#define ME_NOINPUT 0 /* Don't use the input library */
-#define ME_JUST_INFO 1024U /**< not error but just info */
-#define ME_JUST_WARNING 2048U /**< not error but just warning */
-#define ME_FATALERROR 4096U /* Fatal statement error */
+#define ME_BELL 4U /* Ring bell then printing message */
+#define ME_ERROR_LOG 64 /**< write the error message to error log */
+#define ME_ERROR_LOG_ONLY 128 /**< write the error message to error log only */
+#define ME_NOTE 1024 /**< not error but just info */
+#define ME_WARNING 2048 /**< not error but just warning */
+#define ME_FATAL 4096 /**< fatal statement error */
/* Bits in last argument to fn_format */
#define MY_REPLACE_DIR 1U /* replace dir in name with 'dir' */
@@ -332,7 +331,7 @@ typedef struct st_record_cache /* Used when caching records */
enum file_type
{
UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOPEN,
- FILE_BY_MKSTEMP, FILE_BY_DUP
+ FILE_BY_O_TMPFILE, FILE_BY_MKSTEMP, FILE_BY_DUP
};
struct st_my_file_info
@@ -916,6 +915,7 @@ static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
}
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
+extern LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str);
extern my_bool my_compress(uchar *, size_t *, size_t *);
extern my_bool my_uncompress(uchar *, size_t , size_t *);
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
@@ -1001,6 +1001,16 @@ void *my_mmap(void *, size_t, int, int, int, my_off_t);
int my_munmap(void *, size_t);
#endif
+#ifdef _WIN32
+extern FILE* my_win_popen(const char*, const char*);
+extern int my_win_pclose(FILE*);
+#define my_popen(A,B) my_win_popen(A,B)
+#define my_pclose(A) my_win_pclose(A)
+#else
+#define my_popen(A,B) popen(A,B)
+#define my_pclose(A) pclose(A)
+#endif
+
/* my_getpagesize */
#ifdef HAVE_GETPAGESIZE
#define my_getpagesize() getpagesize()
@@ -1067,13 +1077,6 @@ extern void thd_increment_net_big_packet_count(void *thd, size_t length);
#ifdef __WIN__
extern my_bool have_tcpip; /* Is set if tcpip is used */
-/* implemented in my_windac.c */
-
-int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror,
- DWORD owner_rights, DWORD everybody_rights);
-
-void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
-
/* implemented in my_conio.c */
char* my_cgets(char *string, size_t clen, size_t* plen);
diff --git a/include/my_time.h b/include/my_time.h
index 304efe8e16f..9f3e61b944f 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -27,7 +27,7 @@
C_MODE_START
-extern ulonglong log_10_int[20];
+extern MYSQL_PLUGIN_IMPORT ulonglong log_10_int[20];
extern uchar days_in_month[];
#define MY_TIME_T_MAX LONG_MAX
@@ -57,22 +57,20 @@ extern uchar days_in_month[];
/* Flags to str_to_datetime */
-/*
- TIME_FUZZY_DATES is used for the result will only be used for comparison
- purposes. Conversion is as relaxed as possible.
-*/
-#define TIME_FUZZY_DATES 1U
-#define TIME_DATETIME_ONLY 2U
-#define TIME_TIME_ONLY 4U
-#define TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */
-#define TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */
-#define TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */
+#define C_TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */
+#define C_TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */
+#define C_TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */
#define MYSQL_TIME_WARN_TRUNCATED 1U
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2U
+#define MYSQL_TIME_WARN_EDOM 4U
+#define MYSQL_TIME_WARN_ZERO_DATE 8U
#define MYSQL_TIME_NOTE_TRUNCATED 16U
-#define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|MYSQL_TIME_WARN_OUT_OF_RANGE)
+#define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|\
+ MYSQL_TIME_WARN_OUT_OF_RANGE|\
+ MYSQL_TIME_WARN_EDOM|\
+ MYSQL_TIME_WARN_ZERO_DATE)
#define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED)
#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) MY_TEST((x) & MYSQL_TIME_WARN_WARNINGS)
@@ -81,6 +79,16 @@ extern uchar days_in_month[];
/* Useful constants */
#define SECONDS_IN_24H 86400L
+/* Limits for the INTERVAL data type */
+
+ /* Number of hours between '0001-01-01 00h' and '9999-12-31 23h' */
+#define TIME_MAX_INTERVAL_HOUR 87649415
+#define TIME_MAX_INTERVAL_HOUR_CHAR_LENGTH 8
+
+/* Number of full days between '0001-01-01' and '9999-12-31'*/
+#define TIME_MAX_INTERVAL_DAY 3652058 /*87649415/24*/
+#define TIME_MAX_INTERVAL_DAY_CHAR_LENGTH 7
+
/* Limits for the TIME data type */
#define TIME_MAX_HOUR 838
#define TIME_MAX_MINUTE 59
@@ -100,35 +108,46 @@ typedef struct st_mysql_time_status
{
int warnings;
uint precision;
+ uint nanoseconds;
} MYSQL_TIME_STATUS;
static inline void my_time_status_init(MYSQL_TIME_STATUS *status)
{
status->warnings= 0;
status->precision= 0;
+ status->nanoseconds= 0;
}
my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
ulonglong flags, int *was_cut);
-my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time,
- ulonglong flag, MYSQL_TIME_STATUS *status);
-my_bool str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time,
- ulonglong flags, MYSQL_TIME_STATUS *status);
-longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
- ulonglong flags, int *was_cut);
-
-static inline
-longlong double_to_datetime(double nr, MYSQL_TIME *ltime, ulonglong flags, int *cut)
-{
- if (nr < 0 || nr > (double)LONGLONG_MAX)
- nr= (double)LONGLONG_MAX;
- return number_to_datetime((longlong) floor(nr),
- (ulong)((nr-floor(nr))*TIME_SECOND_PART_FACTOR),
- ltime, flags, cut);
-}
+my_bool str_to_DDhhmmssff(const char *str, size_t length, MYSQL_TIME *l_time,
+ ulong max_hour, MYSQL_TIME_STATUS *status);
+my_bool str_to_datetime_or_date_or_time(const char *str, size_t length,
+ MYSQL_TIME *to, ulonglong flag,
+ MYSQL_TIME_STATUS *status,
+ ulong time_max_hour,
+ ulong time_err_hour);
+my_bool
+str_to_datetime_or_date_or_interval_hhmmssff(const char *str, size_t length,
+ MYSQL_TIME *to, ulonglong flag,
+ MYSQL_TIME_STATUS *status,
+ ulong time_max_hour,
+ ulong time_err_hour);
+my_bool
+str_to_datetime_or_date_or_interval_day(const char *str, size_t length,
+ MYSQL_TIME *to, ulonglong flag,
+ MYSQL_TIME_STATUS *status,
+ ulong time_max_hour,
+ ulong time_err_hour);
+my_bool str_to_datetime_or_date(const char *str, size_t length, MYSQL_TIME *to,
+ ulonglong flags, MYSQL_TIME_STATUS *status);
+
+longlong number_to_datetime_or_date(longlong nr, ulong sec_part,
+ MYSQL_TIME *time_res,
+ ulonglong flags, int *was_cut);
+int number_to_time_only(my_bool neg, ulonglong nr, ulong sec_part,
+ ulong max_hour, MYSQL_TIME *to, int *was_cut);
-int number_to_time(my_bool neg, ulonglong nr, ulong sec_part,
- MYSQL_TIME *ltime, int *was_cut);
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *);
@@ -191,6 +210,7 @@ void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
#define MAX_DATE_STRING_REP_LENGTH 30
#define AUTO_SEC_PART_DIGITS DECIMAL_NOT_SPECIFIED
+int my_interval_DDhhmmssff_to_str(const MYSQL_TIME *, char *to, uint digits);
int my_time_to_str(const MYSQL_TIME *l_time, char *to, uint digits);
int my_date_to_str(const MYSQL_TIME *l_time, char *to);
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to, uint digits);
@@ -213,9 +233,16 @@ static inline long my_time_fraction_remainder(long nr, uint decimals)
DBUG_ASSERT(decimals <= TIME_SECOND_PART_DIGITS);
return nr % (long) log_10_int[TIME_SECOND_PART_DIGITS - decimals];
}
+static inline void my_datetime_trunc(MYSQL_TIME *ltime, uint decimals)
+{
+ ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals);
+}
static inline void my_time_trunc(MYSQL_TIME *ltime, uint decimals)
{
ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals);
+ if (!ltime->second_part && ltime->neg &&
+ !ltime->hour && !ltime->minute && !ltime->second)
+ ltime->neg= FALSE;
}
#ifdef _WIN32
#define suseconds_t long
diff --git a/include/myisam.h b/include/myisam.h
index 3138dc832f7..f2e31bb9f60 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -276,7 +276,7 @@ extern int mi_rsame_with_pos(struct st_myisam_info *file,uchar *record,
int inx, my_off_t pos);
extern int mi_update(struct st_myisam_info *file,const uchar *old,
const uchar *new_record);
-extern int mi_write(struct st_myisam_info *file,uchar *buff);
+extern int mi_write(struct st_myisam_info *file,const uchar *buff);
extern my_off_t mi_position(struct st_myisam_info *file);
extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint flag);
extern int mi_lock_database(struct st_myisam_info *file,int lock_type);
@@ -430,6 +430,7 @@ int sort_ft_buf_flush(MI_SORT_PARAM *sort_param);
int thr_write_keys(MI_SORT_PARAM *sort_param);
int sort_write_record(MI_SORT_PARAM *sort_param);
int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, ulonglong);
+my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows);
#ifdef __cplusplus
}
diff --git a/include/myisammrg.h b/include/myisammrg.h
index fe229a85cb0..76286000ff5 100644
--- a/include/myisammrg.h
+++ b/include/myisammrg.h
@@ -106,7 +106,7 @@ extern int myrg_rrnd(MYRG_INFO *file,uchar *buf,ulonglong pos);
extern int myrg_rsame(MYRG_INFO *file,uchar *record,int inx);
extern int myrg_update(MYRG_INFO *file,const uchar *old,
const uchar *new_rec);
-extern int myrg_write(MYRG_INFO *info,uchar *rec);
+extern int myrg_write(MYRG_INFO *info,const uchar *rec);
extern int myrg_status(MYRG_INFO *file,MYMERGE_INFO *x,int flag);
extern int myrg_lock_database(MYRG_INFO *file,int lock_type);
extern int myrg_create(const char *name, const char **table_names,
diff --git a/include/myisampack.h b/include/myisampack.h
index 6bfe1958fbc..f3c5fe7114a 100644
--- a/include/myisampack.h
+++ b/include/myisampack.h
@@ -30,7 +30,7 @@
#define mi_uint1korr(A) ((uint8)(*A))
#define mi_sint2korr(A) ((int16) (((int16) (((const uchar*) (A))[1])) |\
- ((int16) ((int16) ((const char*) (A))[0]) << 8)))
+ ((int16) ((uint16) ((const uchar*) (A))[0]) << 8)))
#define mi_sint3korr(A) ((int32) (((((const uchar*) (A))[0]) & 128) ? \
(((uint32) 255L << 24) | \
(((uint32) ((const uchar*) (A))[0]) << 16) |\
@@ -39,10 +39,10 @@
(((uint32) ((const uchar*) (A))[0]) << 16) |\
(((uint32) ((const uchar*) (A))[1]) << 8) | \
((uint32) ((const uchar*) (A))[2])))
-#define mi_sint4korr(A) ((int32) (((int32) (((const uchar*) (A))[3])) |\
- ((int32) (((const uchar*) (A))[2]) << 8) |\
- ((int32) (((const uchar*) (A))[1]) << 16) |\
- ((int32) ((int16) ((const char*) (A))[0]) << 24)))
+#define mi_sint4korr(A) ((int32) (((uint32) (((const uchar*) (A))[3])) |\
+ ((uint32) (((const uchar*) (A))[2]) << 8) |\
+ ((uint32) (((const uchar*) (A))[1]) << 16) |\
+ ((uint32) (((const uchar*) (A))[0]) << 24)))
#define mi_sint8korr(A) ((longlong) mi_uint8korr(A))
#define mi_uint2korr(A) ((uint16) (((uint16) (((const uchar*) (A))[1])) |\
((uint16) (((const uchar*) (A))[0]) << 8)))
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 360f633b7dd..0f9f130cb8e 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -75,7 +75,7 @@ typedef struct st_mysql_xid MYSQL_XID;
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0104
/* MariaDB plugin interface version */
-#define MARIA_PLUGIN_INTERFACE_VERSION 0x010d
+#define MARIA_PLUGIN_INTERFACE_VERSION 0x010e
/*
The allowable types of plugins
diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp
index 89f7dcc36c4..c5ae678e82a 100644
--- a/include/mysql/plugin_audit.h.pp
+++ b/include/mysql/plugin_audit.h.pp
@@ -374,6 +374,51 @@ extern struct thd_wait_service_st {
} *thd_wait_service;
void thd_wait_begin(void* thd, int wait_type);
void thd_wait_end(void* thd);
+enum json_types
+{
+ JSV_BAD_JSON=-1,
+ JSV_NOTHING=0,
+ JSV_OBJECT=1,
+ JSV_ARRAY=2,
+ JSV_STRING=3,
+ JSV_NUMBER=4,
+ JSV_TRUE=5,
+ JSV_FALSE=6,
+ JSV_NULL=7
+};
+extern struct json_service_st {
+ enum json_types (*json_type)(const char *js, const char *js_end,
+ const char **value, int *value_len);
+ enum json_types (*json_get_array_item)(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_key)(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_nkey)(const char *js,const char *js_end,
+ int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+ int (*json_escape_string)(const char *str,const char *str_end,
+ char *json, char *json_end);
+ int (*json_unescape_json)(const char *json_str, const char *json_end,
+ char *res, char *res_end);
+} *json_service;
+enum json_types json_type(const char *js, const char *js_end,
+ const char **value, int *value_len);
+enum json_types json_get_array_item(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+enum json_types json_get_object_key(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+enum json_types json_get_object_nkey(const char *js,const char *js_end, int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+int json_escape_string(const char *str,const char *str_end,
+ char *json, char *json_end);
+int json_unescape_json(const char *json_str, const char *json_end,
+ char *res, char *res_end);
struct st_mysql_xid {
long formatID;
long gtrid_length;
diff --git a/include/mysql/plugin_auth.h b/include/mysql/plugin_auth.h
index 6741283d5bd..3827db33431 100644
--- a/include/mysql/plugin_auth.h
+++ b/include/mysql/plugin_auth.h
@@ -27,7 +27,7 @@
#include <mysql/plugin.h>
-#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0201
+#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0202
#include <mysql/plugin_auth_common.h>
@@ -60,7 +60,8 @@ typedef struct st_mysql_server_auth_info
/**
A corresponding column value from the mysql.user table for the
- matching account name
+ matching account name or the preprocessed value, if preprocess_hash
+ method is not NULL
*/
const char *auth_string;
@@ -130,6 +131,48 @@ struct st_mysql_auth
used for authorization.
*/
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
+ /**
+ Create a password hash (or digest) out of a plain-text password
+
+ Used in SET PASSWORD, GRANT, and CREATE USER to convert user specified
+ plain-text password into a value that will be stored in mysql.user table.
+
+ @see preprocess_hash
+
+ @param password plain-text password
+ @param password_length plain-text password length
+ @param hash the digest will be stored there
+ @param hash_length in: hash buffer size
+ out: the actual length of the hash
+
+ @return 0 for ok, 1 for error
+
+ Can be NULL, in this case one will not be able to use SET PASSWORD or
+ PASSWORD('...') in GRANT, CREATE USER, ALTER USER.
+ */
+ int (*hash_password)(const char *password, size_t password_length,
+ char *hash, size_t *hash_length);
+
+ /**
+ Prepare the password hash for authentication.
+
+ Password hash is stored in the authentication_string column of the
+ mysql.user table in a text form. If a plugin needs to preprocess the
+ value somehow before the authentication (e.g. convert from hex or base64
+ to binary), it can do it in this method. This way the conversion
+ will happen only once, not for every authentication attempt.
+
+ The value written to the out buffer will be cached and later made
+ available to the authenticate_user() method in the
+ MYSQL_SERVER_AUTH_INFO::auth_string[] buffer.
+
+ @return 0 for ok, 1 for error
+
+ Can be NULL, in this case the mysql.user.authentication_string value will
+ be given to the authenticate_user() method as is, unconverted.
+ */
+ int (*preprocess_hash)(const char *hash, size_t hash_length,
+ unsigned char *out, size_t *out_length);
};
#ifdef __cplusplus
diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp
index e515699cad6..41cb7d075c4 100644
--- a/include/mysql/plugin_auth.h.pp
+++ b/include/mysql/plugin_auth.h.pp
@@ -374,6 +374,51 @@ extern struct thd_wait_service_st {
} *thd_wait_service;
void thd_wait_begin(void* thd, int wait_type);
void thd_wait_end(void* thd);
+enum json_types
+{
+ JSV_BAD_JSON=-1,
+ JSV_NOTHING=0,
+ JSV_OBJECT=1,
+ JSV_ARRAY=2,
+ JSV_STRING=3,
+ JSV_NUMBER=4,
+ JSV_TRUE=5,
+ JSV_FALSE=6,
+ JSV_NULL=7
+};
+extern struct json_service_st {
+ enum json_types (*json_type)(const char *js, const char *js_end,
+ const char **value, int *value_len);
+ enum json_types (*json_get_array_item)(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_key)(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_nkey)(const char *js,const char *js_end,
+ int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+ int (*json_escape_string)(const char *str,const char *str_end,
+ char *json, char *json_end);
+ int (*json_unescape_json)(const char *json_str, const char *json_end,
+ char *res, char *res_end);
+} *json_service;
+enum json_types json_type(const char *js, const char *js_end,
+ const char **value, int *value_len);
+enum json_types json_get_array_item(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+enum json_types json_get_object_key(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+enum json_types json_get_object_nkey(const char *js,const char *js_end, int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+int json_escape_string(const char *str,const char *str_end,
+ char *json, char *json_end);
+int json_unescape_json(const char *json_str, const char *json_end,
+ char *res, char *res_end);
struct st_mysql_xid {
long formatID;
long gtrid_length;
@@ -561,4 +606,8 @@ struct st_mysql_auth
int interface_version;
const char *client_auth_plugin;
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
+ int (*hash_password)(const char *password, size_t password_length,
+ char *hash, size_t *hash_length);
+ int (*preprocess_hash)(const char *hash, size_t hash_length,
+ unsigned char *out, size_t *out_length);
};
diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp
index 7defe0aec2c..6597decfbef 100644
--- a/include/mysql/plugin_encryption.h.pp
+++ b/include/mysql/plugin_encryption.h.pp
@@ -374,6 +374,51 @@ extern struct thd_wait_service_st {
} *thd_wait_service;
void thd_wait_begin(void* thd, int wait_type);
void thd_wait_end(void* thd);
+enum json_types
+{
+ JSV_BAD_JSON=-1,
+ JSV_NOTHING=0,
+ JSV_OBJECT=1,
+ JSV_ARRAY=2,
+ JSV_STRING=3,
+ JSV_NUMBER=4,
+ JSV_TRUE=5,
+ JSV_FALSE=6,
+ JSV_NULL=7
+};
+extern struct json_service_st {
+ enum json_types (*json_type)(const char *js, const char *js_end,
+ const char **value, int *value_len);
+ enum json_types (*json_get_array_item)(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_key)(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_nkey)(const char *js,const char *js_end,
+ int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+ int (*json_escape_string)(const char *str,const char *str_end,
+ char *json, char *json_end);
+ int (*json_unescape_json)(const char *json_str, const char *json_end,
+ char *res, char *res_end);
+} *json_service;
+enum json_types json_type(const char *js, const char *js_end,
+ const char **value, int *value_len);
+enum json_types json_get_array_item(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+enum json_types json_get_object_key(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+enum json_types json_get_object_nkey(const char *js,const char *js_end, int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+int json_escape_string(const char *str,const char *str_end,
+ char *json, char *json_end);
+int json_unescape_json(const char *json_str, const char *json_end,
+ char *res, char *res_end);
struct st_mysql_xid {
long formatID;
long gtrid_length;
diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp
index a36f51e74e1..bd1cfc7b68b 100644
--- a/include/mysql/plugin_ftparser.h.pp
+++ b/include/mysql/plugin_ftparser.h.pp
@@ -374,6 +374,51 @@ extern struct thd_wait_service_st {
} *thd_wait_service;
void thd_wait_begin(void* thd, int wait_type);
void thd_wait_end(void* thd);
+enum json_types
+{
+ JSV_BAD_JSON=-1,
+ JSV_NOTHING=0,
+ JSV_OBJECT=1,
+ JSV_ARRAY=2,
+ JSV_STRING=3,
+ JSV_NUMBER=4,
+ JSV_TRUE=5,
+ JSV_FALSE=6,
+ JSV_NULL=7
+};
+extern struct json_service_st {
+ enum json_types (*json_type)(const char *js, const char *js_end,
+ const char **value, int *value_len);
+ enum json_types (*json_get_array_item)(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_key)(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_nkey)(const char *js,const char *js_end,
+ int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+ int (*json_escape_string)(const char *str,const char *str_end,
+ char *json, char *json_end);
+ int (*json_unescape_json)(const char *json_str, const char *json_end,
+ char *res, char *res_end);
+} *json_service;
+enum json_types json_type(const char *js, const char *js_end,
+ const char **value, int *value_len);
+enum json_types json_get_array_item(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+enum json_types json_get_object_key(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+enum json_types json_get_object_nkey(const char *js,const char *js_end, int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+int json_escape_string(const char *str,const char *str_end,
+ char *json, char *json_end);
+int json_unescape_json(const char *json_str, const char *json_end,
+ char *res, char *res_end);
struct st_mysql_xid {
long formatID;
long gtrid_length;
diff --git a/include/mysql/plugin_password_validation.h b/include/mysql/plugin_password_validation.h
index ddc9387c72e..23d2c884012 100644
--- a/include/mysql/plugin_password_validation.h
+++ b/include/mysql/plugin_password_validation.h
@@ -42,8 +42,8 @@ struct st_mariadb_password_validation
Function provided by the plugin which should perform password validation
and return 0 if the password has passed the validation.
*/
- int (*validate_password)(MYSQL_CONST_LEX_STRING *username,
- MYSQL_CONST_LEX_STRING *password);
+ int (*validate_password)(const MYSQL_CONST_LEX_STRING *username,
+ const MYSQL_CONST_LEX_STRING *password);
};
#ifdef __cplusplus
diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp
index 9701ad1b92f..2f9d2299c1f 100644
--- a/include/mysql/plugin_password_validation.h.pp
+++ b/include/mysql/plugin_password_validation.h.pp
@@ -374,6 +374,51 @@ extern struct thd_wait_service_st {
} *thd_wait_service;
void thd_wait_begin(void* thd, int wait_type);
void thd_wait_end(void* thd);
+enum json_types
+{
+ JSV_BAD_JSON=-1,
+ JSV_NOTHING=0,
+ JSV_OBJECT=1,
+ JSV_ARRAY=2,
+ JSV_STRING=3,
+ JSV_NUMBER=4,
+ JSV_TRUE=5,
+ JSV_FALSE=6,
+ JSV_NULL=7
+};
+extern struct json_service_st {
+ enum json_types (*json_type)(const char *js, const char *js_end,
+ const char **value, int *value_len);
+ enum json_types (*json_get_array_item)(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_key)(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_nkey)(const char *js,const char *js_end,
+ int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+ int (*json_escape_string)(const char *str,const char *str_end,
+ char *json, char *json_end);
+ int (*json_unescape_json)(const char *json_str, const char *json_end,
+ char *res, char *res_end);
+} *json_service;
+enum json_types json_type(const char *js, const char *js_end,
+ const char **value, int *value_len);
+enum json_types json_get_array_item(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+enum json_types json_get_object_key(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+enum json_types json_get_object_nkey(const char *js,const char *js_end, int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+int json_escape_string(const char *str,const char *str_end,
+ char *json, char *json_end);
+int json_unescape_json(const char *json_str, const char *json_end,
+ char *res, char *res_end);
struct st_mysql_xid {
long formatID;
long gtrid_length;
@@ -531,6 +576,6 @@ void thd_wakeup_subsequent_commits(void* thd, int wakeup_error);
struct st_mariadb_password_validation
{
int interface_version;
- int (*validate_password)(MYSQL_CONST_LEX_STRING *username,
- MYSQL_CONST_LEX_STRING *password);
+ int (*validate_password)(const MYSQL_CONST_LEX_STRING *username,
+ const MYSQL_CONST_LEX_STRING *password);
};
diff --git a/include/mysql/service_json.h b/include/mysql/service_json.h
new file mode 100644
index 00000000000..cb748c0c83f
--- /dev/null
+++ b/include/mysql/service_json.h
@@ -0,0 +1,119 @@
+/* Copyright (C) 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+#ifndef MYSQL_SERVICE_JSON
+#define MYSQL_SERVICE_JSON
+
+/**
+ @file
+ json service
+
+ Exports JSON parsing methods for plugins to use.
+
+ Functions of the service:
+ json_type - returns the type of the JSON argument,
+ and the parsed value if it's scalar (not object or array)
+
+ json_get_array_item - expects JSON array as an argument,
+ and returns the type of the element at index `n_item`.
+ Returns JSV_NOTHING type if the array is shorter
+ than n_item and the actual length of the array in value_len.
+ If successful, then `value` up till `value[value_len]` contains the array
+ element at the desired index (n_item).
+
+ json_get_object_key - expects JSON object as an argument,
+ searches for a key in the object, return it's type and stores its value in `value`.
+ JSV_NOTHING if no such key found, the number of keys
+ in v_len.
+
+ json_get_object_nkey - expects JSON object as an argument.
+ finds n_key's key in the object, returns it's name, type and value.
+ JSV_NOTHING if object has less keys than n_key.
+*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum json_types
+{
+ JSV_BAD_JSON=-1,
+ JSV_NOTHING=0,
+ JSV_OBJECT=1,
+ JSV_ARRAY=2,
+ JSV_STRING=3,
+ JSV_NUMBER=4,
+ JSV_TRUE=5,
+ JSV_FALSE=6,
+ JSV_NULL=7
+};
+
+extern struct json_service_st {
+ enum json_types (*json_type)(const char *js, const char *js_end,
+ const char **value, int *value_len);
+ enum json_types (*json_get_array_item)(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_key)(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+ enum json_types (*json_get_object_nkey)(const char *js,const char *js_end,
+ int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+ int (*json_escape_string)(const char *str,const char *str_end,
+ char *json, char *json_end);
+ int (*json_unescape_json)(const char *json_str, const char *json_end,
+ char *res, char *res_end);
+} *json_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define json_type json_service->json_type
+#define json_get_array_item json_service->json_get_array_item
+#define json_get_object_key json_service->json_get_object_key
+#define json_get_object_nkey json_service->json_get_object_nkey
+#define json_escape_string json_service->json_escape_string
+#define json_unescape_json json_service->json_unescape_json
+
+#else
+
+enum json_types json_type(const char *js, const char *js_end,
+ const char **value, int *value_len);
+enum json_types json_get_array_item(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len);
+enum json_types json_get_object_key(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len);
+enum json_types json_get_object_nkey(const char *js,const char *js_end, int nkey,
+ const char **keyname, const char **keyname_end,
+ const char **value, int *value_len);
+int json_escape_string(const char *str,const char *str_end,
+ char *json, char *json_end);
+int json_unescape_json(const char *json_str, const char *json_end,
+ char *res, char *res_end);
+
+#endif /*MYSQL_DYNAMIC_PLUGIN*/
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*MYSQL_SERVICE_JSON */
+
+
diff --git a/include/mysql/service_my_crypt.h b/include/mysql/service_my_crypt.h
index de4a8bb69da..2a232117ca1 100644
--- a/include/mysql/service_my_crypt.h
+++ b/include/mysql/service_my_crypt.h
@@ -45,7 +45,7 @@ extern "C" {
/* The max key length of all supported algorithms */
#define MY_AES_MAX_KEY_LENGTH 32
-#define MY_AES_CTX_SIZE 512
+#define MY_AES_CTX_SIZE 656
enum my_aes_mode {
MY_AES_ECB, MY_AES_CBC
diff --git a/include/mysql/service_my_print_error.h b/include/mysql/service_my_print_error.h
index 64e875d83ca..74ba6a2adb8 100644
--- a/include/mysql/service_my_print_error.h
+++ b/include/mysql/service_my_print_error.h
@@ -32,10 +32,11 @@ extern "C" {
#include <stdlib.h>
#endif
-#define ME_ERROR_LOG 64 /* Write the message to the error log */
-#define ME_NOTE 1024 /* Not an error, just a note */
-#define ME_WARNING 2048 /* Not an error, just a warning */
-#define ME_FATAL 4096 /* Fatal statement error */
+#define ME_ERROR_LOG 64 /* Write the message to the error log */
+#define ME_ERROR_LOG_ONLY 128 /* Write the error message to error log only */
+#define ME_NOTE 1024 /* Not an error, just a note */
+#define ME_WARNING 2048 /* Not an error, just a warning */
+#define ME_FATAL 4096 /* Fatal statement error */
extern struct my_print_error_service_st {
void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
@@ -50,11 +51,9 @@ extern struct my_print_error_service_st {
#define my_printv_error(A,B,C,D) my_print_error_service->my_printv_error_func(A,B,C,D)
#else
-#ifndef MY_ERROR_DEFINED
extern void my_error(unsigned int nr, unsigned long MyFlags, ...);
extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...);
extern void my_printv_error(unsigned int error, const char *format, unsigned long MyFlags,va_list ap);
-#endif /* MY_ERROR_DEFINED */
#endif /* MYSQL_DYNAMIC_PLUGIN */
#ifdef __cplusplus
diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h
index 910c68b1402..1e6aaa1b9b9 100644
--- a/include/mysql/service_wsrep.h
+++ b/include/mysql/service_wsrep.h
@@ -1,5 +1,20 @@
#ifndef MYSQL_SERVICE_WSREP_INCLUDED
-/* Copyright (c) 2015 MariaDB Corporation Ab
+#define MYSQL_SERVICE_WSREP_INCLUDED
+
+enum Wsrep_service_key_type
+{
+ WSREP_SERVICE_KEY_SHARED,
+ WSREP_SERVICE_KEY_REFERENCE,
+ WSREP_SERVICE_KEY_UPDATE,
+ WSREP_SERVICE_KEY_EXCLUSIVE
+};
+
+#if (defined (MYSQL_DYNAMIC_PLUGIN) && defined(MYSQL_SERVICE_WSREP_DYNAMIC_INCLUDED)) || (!defined(MYSQL_DYNAMIC_PLUGIN) && defined(MYSQL_SERVICE_WSREP_STATIC_INCLUDED))
+
+#else
+
+/* Copyright (c) 2015, 2020, MariaDB Corporation Ab
+ 2018 Codership Oy <info@codership.com>
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
@@ -21,167 +36,107 @@
Interface to WSREP functionality in the server.
For engines that want to support galera.
*/
-
+#include <my_pthread.h>
#ifdef __cplusplus
-extern "C" {
#endif
-enum wsrep_conflict_state {
- NO_CONFLICT,
- MUST_ABORT,
- ABORTING,
- ABORTED,
- MUST_REPLAY,
- REPLAYING,
- RETRY_AUTOCOMMIT,
- CERT_FAILURE,
-};
-
-enum wsrep_exec_mode {
- /* Transaction processing before replication. */
- LOCAL_STATE,
- /* Slave thread applying write sets from other nodes or replaying thread. */
- REPL_RECV,
- /* Total-order-isolation mode. */
- TOTAL_ORDER,
- /*
- Transaction procession after it has been replicated in prepare stage and
- has passed certification.
- */
- LOCAL_COMMIT
-};
-
-enum wsrep_query_state {
- QUERY_IDLE,
- QUERY_EXEC,
- QUERY_COMMITTING,
- QUERY_EXITING,
- QUERY_ROLLINGBACK,
-};
-
-enum wsrep_trx_status {
- WSREP_TRX_OK,
- WSREP_TRX_CERT_FAIL, /* certification failure, must abort */
- WSREP_TRX_SIZE_EXCEEDED, /* trx size exceeded */
- WSREP_TRX_ERROR, /* native mysql error */
-};
-
struct xid_t;
-struct wsrep;
struct wsrep_ws_handle;
struct wsrep_buf;
+/* Must match to definition in sql/mysqld.h */
+typedef int64 query_id_t;
+
+
extern struct wsrep_service_st {
- struct wsrep * (*get_wsrep_func)();
- my_bool (*get_wsrep_certify_nonPK_func)();
- my_bool (*get_wsrep_debug_func)();
- my_bool (*get_wsrep_drupal_282555_workaround_func)();
my_bool (*get_wsrep_recovery_func)();
- my_bool (*get_wsrep_load_data_splitting_func)();
- my_bool (*get_wsrep_log_conflicts_func)();
- long (*get_wsrep_protocol_version_func)();
- my_bool (*wsrep_aborting_thd_contains_func)(THD *thd);
- void (*wsrep_aborting_thd_enqueue_func)(THD *thd);
- bool (*wsrep_consistency_check_func)(THD *thd);
- int (*wsrep_is_wsrep_xid_func)(const struct xid_t *xid);
+ bool (*wsrep_consistency_check_func)(MYSQL_THD thd);
+ int (*wsrep_is_wsrep_xid_func)(const void *xid);
long long (*wsrep_xid_seqno_func)(const struct xid_t *xid);
const unsigned char* (*wsrep_xid_uuid_func)(const struct xid_t *xid);
- void (*wsrep_lock_rollback_func)();
- int (*wsrep_on_func)(MYSQL_THD);
- void (*wsrep_post_commit_func)(THD* thd, bool all);
- bool (*wsrep_prepare_key_func)(const unsigned char*, size_t, const unsigned char*, size_t, struct wsrep_buf*, size_t*);
- enum wsrep_trx_status (*wsrep_run_wsrep_commit_func)(THD *thd, bool all);
- void (*wsrep_thd_LOCK_func)(THD *thd);
- void (*wsrep_thd_UNLOCK_func)(THD *thd);
- void (*wsrep_thd_awake_func)(THD *thd, my_bool signal);
- enum wsrep_conflict_state (*wsrep_thd_conflict_state_func)(MYSQL_THD, my_bool);
- const char * (*wsrep_thd_conflict_state_str_func)(THD *thd);
- enum wsrep_exec_mode (*wsrep_thd_exec_mode_func)(THD *thd);
- const char * (*wsrep_thd_exec_mode_str_func)(THD *thd);
- enum wsrep_conflict_state (*wsrep_thd_get_conflict_state_func)(MYSQL_THD);
- my_bool (*wsrep_thd_is_BF_func)(MYSQL_THD , my_bool);
- my_bool (*wsrep_thd_is_wsrep_func)(MYSQL_THD thd);
- const char * (*wsrep_thd_query_func)(THD *thd);
- enum wsrep_query_state (*wsrep_thd_query_state_func)(THD *thd);
- const char * (*wsrep_thd_query_state_str_func)(THD *thd);
- int (*wsrep_thd_retry_counter_func)(THD *thd);
- void (*wsrep_thd_set_conflict_state_func)(THD *thd, enum wsrep_conflict_state state);
- bool (*wsrep_thd_ignore_table_func)(THD *thd);
- long long (*wsrep_thd_trx_seqno_func)(THD *thd);
- struct wsrep_ws_handle * (*wsrep_thd_ws_handle_func)(THD *thd);
- void (*wsrep_set_load_multi_commit_func)(THD *thd, bool split);
- bool (*wsrep_is_load_multi_commit_func)(THD *thd);
- int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd);
- int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
- void (*wsrep_unlock_rollback_func)();
+ my_bool (*wsrep_on_func)(const MYSQL_THD thd);
+ bool (*wsrep_prepare_key_for_innodb_func)(MYSQL_THD thd, const unsigned char*, size_t, const unsigned char*, size_t, struct wsrep_buf*, size_t*);
+ void (*wsrep_thd_LOCK_func)(const MYSQL_THD thd);
+ void (*wsrep_thd_UNLOCK_func)(const MYSQL_THD thd);
+ const char * (*wsrep_thd_query_func)(const MYSQL_THD thd);
+ int (*wsrep_thd_retry_counter_func)(const MYSQL_THD thd);
+ bool (*wsrep_thd_ignore_table_func)(MYSQL_THD thd);
+ long long (*wsrep_thd_trx_seqno_func)(const MYSQL_THD thd);
+ my_bool (*wsrep_thd_is_aborting_func)(const MYSQL_THD thd);
void (*wsrep_set_data_home_dir_func)(const char *data_dir);
- my_bool (*wsrep_thd_is_applier_func)(MYSQL_THD);
- void (*wsrep_report_bf_lock_wait_func)(MYSQL_THD thd,
+ my_bool (*wsrep_thd_is_BF_func)(const MYSQL_THD thd, my_bool sync);
+ my_bool (*wsrep_thd_is_local_func)(const MYSQL_THD thd);
+ void (*wsrep_thd_self_abort_func)(MYSQL_THD thd);
+ int (*wsrep_thd_append_key_func)(MYSQL_THD thd, const struct wsrep_key* key,
+ int n_keys, enum Wsrep_service_key_type);
+ const char* (*wsrep_thd_client_state_str_func)(const MYSQL_THD thd);
+ const char* (*wsrep_thd_client_mode_str_func)(const MYSQL_THD thd);
+ const char* (*wsrep_thd_transaction_state_str_func)(const MYSQL_THD thd);
+ query_id_t (*wsrep_thd_transaction_id_func)(const MYSQL_THD thd);
+ my_bool (*wsrep_thd_bf_abort_func)(MYSQL_THD bf_thd,
+ MYSQL_THD victim_thd,
+ my_bool signal);
+ my_bool (*wsrep_thd_order_before_func)(const MYSQL_THD left, const MYSQL_THD right);
+ void (*wsrep_handle_SR_rollback_func)(MYSQL_THD BF_thd, MYSQL_THD victim_thd);
+ my_bool (*wsrep_thd_skip_locking_func)(const MYSQL_THD thd);
+ const char* (*wsrep_get_sr_table_name_func)();
+ my_bool (*wsrep_get_debug_func)();
+ void (*wsrep_commit_ordered_func)(MYSQL_THD thd);
+ my_bool (*wsrep_thd_is_applying_func)(const MYSQL_THD thd);
+ bool (*wsrep_thd_set_wsrep_aborter_func)(MYSQL_THD bf_thd, MYSQL_THD thd);
+ void (*wsrep_report_bf_lock_wait_func)(const MYSQL_THD thd,
unsigned long long trx_id);
- void (*wsrep_thd_kill_LOCK_func)(THD *thd);
- void (*wsrep_thd_kill_UNLOCK_func)(THD *thd);
+ void (*wsrep_thd_kill_LOCK_func)(const MYSQL_THD thd);
+ void (*wsrep_thd_kill_UNLOCK_func)(const MYSQL_THD thd);
+ void (*wsrep_thd_set_wsrep_PA_unsafe_func)(MYSQL_THD thd);
} *wsrep_service;
+#define MYSQL_SERVICE_WSREP_INCLUDED
+#endif
+
#ifdef MYSQL_DYNAMIC_PLUGIN
-#define get_wsrep() wsrep_service->get_wsrep_func()
-#define get_wsrep_certify_nonPK() wsrep_service->get_wsrep_certify_nonPK_func()
-#define get_wsrep_debug() wsrep_service->get_wsrep_debug_func()
-#define get_wsrep_drupal_282555_workaround() wsrep_service->get_wsrep_drupal_282555_workaround_func()
+
+#define MYSQL_SERVICE_WSREP_DYNAMIC_INCLUDED
#define get_wsrep_recovery() wsrep_service->get_wsrep_recovery_func()
-#define get_wsrep_load_data_splitting() wsrep_service->get_wsrep_load_data_splitting_func()
-#define get_wsrep_log_conflicts() wsrep_service->get_wsrep_log_conflicts_func()
-#define get_wsrep_protocol_version() wsrep_service->get_wsrep_protocol_version_func()
-#define wsrep_aborting_thd_contains(T) wsrep_service->wsrep_aborting_thd_contains_func(T)
-#define wsrep_aborting_thd_enqueue(T) wsrep_service->wsrep_aborting_thd_enqueue_func(T)
#define wsrep_consistency_check(T) wsrep_service->wsrep_consistency_check_func(T)
#define wsrep_is_wsrep_xid(X) wsrep_service->wsrep_is_wsrep_xid_func(X)
#define wsrep_xid_seqno(X) wsrep_service->wsrep_xid_seqno_func(X)
#define wsrep_xid_uuid(X) wsrep_service->wsrep_xid_uuid_func(X)
-#define wsrep_lock_rollback() wsrep_service->wsrep_lock_rollback_func()
-#define wsrep_on(X) wsrep_service->wsrep_on_func(X)
-#define wsrep_post_commit(T,A) wsrep_service->wsrep_post_commit_func(T,A)
-#define wsrep_prepare_key(A,B,C,D,E,F) wsrep_service->wsrep_prepare_key_func(A,B,C,D,E,F)
-#define wsrep_run_wsrep_commit(T,A) wsrep_service->wsrep_run_wsrep_commit_func(T,A)
+#define wsrep_on(thd) (thd) && WSREP_ON && wsrep_service->wsrep_on_func(thd)
+#define wsrep_prepare_key_for_innodb(A,B,C,D,E,F,G) wsrep_service->wsrep_prepare_key_for_innodb_func(A,B,C,D,E,F,G)
#define wsrep_thd_LOCK(T) wsrep_service->wsrep_thd_LOCK_func(T)
#define wsrep_thd_UNLOCK(T) wsrep_service->wsrep_thd_UNLOCK_func(T)
#define wsrep_thd_kill_LOCK(T) wsrep_service->wsrep_thd_kill_LOCK_func(T)
#define wsrep_thd_kill_UNLOCK(T) wsrep_service->wsrep_thd_kill_UNLOCK_func(T)
-#define wsrep_thd_awake(T,S) wsrep_service->wsrep_thd_awake_func(T,S)
-#define wsrep_thd_conflict_state(T,S) wsrep_service->wsrep_thd_conflict_state_func(T,S)
-#define wsrep_thd_conflict_state_str(T) wsrep_service->wsrep_thd_conflict_state_str_func(T)
-#define wsrep_thd_exec_mode(T) wsrep_service->wsrep_thd_exec_mode_func(T)
-#define wsrep_thd_exec_mode_str(T) wsrep_service->wsrep_thd_exec_mode_str_func(T)
-#define wsrep_thd_get_conflict_state(T) wsrep_service->wsrep_thd_get_conflict_state_func(T)
-#define wsrep_thd_is_BF(T,S) wsrep_service->wsrep_thd_is_BF_func(T,S)
-#define wsrep_thd_is_wsrep(T) wsrep_service->wsrep_thd_is_wsrep_func(T)
#define wsrep_thd_query(T) wsrep_service->wsrep_thd_query_func(T)
-#define wsrep_thd_query_state(T) wsrep_service->wsrep_thd_query_state_func(T)
-#define wsrep_thd_query_state_str(T) wsrep_service->wsrep_thd_query_state_str_func(T)
#define wsrep_thd_retry_counter(T) wsrep_service->wsrep_thd_retry_counter_func(T)
-#define wsrep_thd_set_conflict_state(T,S) wsrep_service->wsrep_thd_set_conflict_state_func(T,S)
#define wsrep_thd_ignore_table(T) wsrep_service->wsrep_thd_ignore_table_func(T)
#define wsrep_thd_trx_seqno(T) wsrep_service->wsrep_thd_trx_seqno_func(T)
-#define wsrep_thd_ws_handle(T) wsrep_service->wsrep_thd_ws_handle_func(T)
-#define wsrep_set_load_multi_commit(T,S) wsrep_service->wsrep_set_load_multi_commit_func(T,S)
-#define wsrep_is_load_multi_commit(T) wsrep_service->wsrep_is_load_multi_commit_func(T)
-#define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T)
-#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
-#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
#define wsrep_set_data_home_dir(A) wsrep_service->wsrep_set_data_home_dir_func(A)
-#define wsrep_thd_is_applier(T) wsrep_service->wsrep_thd_is_applier_func(T)
-#define wsrep_report_bf_lock_wait(T,I) wsrep_service->wsrep_report_bf_lock_wait_func(T,I)
-
-#define wsrep_debug get_wsrep_debug()
-#define wsrep_log_conflicts get_wsrep_log_conflicts()
-#define wsrep_certify_nonPK get_wsrep_certify_nonPK()
-#define wsrep_load_data_splitting get_wsrep_load_data_splitting()
-#define wsrep_drupal_282555_workaround get_wsrep_drupal_282555_workaround()
-#define wsrep_recovery get_wsrep_recovery()
-#define wsrep_protocol_version get_wsrep_protocol_version()
-
+#define wsrep_thd_is_BF(T,S) wsrep_service->wsrep_thd_is_BF_func(T,S)
+#define wsrep_thd_is_aborting(T) wsrep_service->wsrep_thd_is_aborting_func(T)
+#define wsrep_thd_is_local(T) wsrep_service->wsrep_thd_is_local_func(T)
+#define wsrep_thd_self_abort(T) wsrep_service->wsrep_thd_self_abort_func(T)
+#define wsrep_thd_append_key(T,W,N,K) wsrep_service->wsrep_thd_append_key_func(T,W,N,K)
+#define wsrep_thd_client_state_str(T) wsrep_service->wsrep_thd_client_state_str_func(T)
+#define wsrep_thd_client_mode_str(T) wsrep_service->wsrep_thd_client_mode_str_func(T)
+#define wsrep_thd_transaction_state_str(T) wsrep_service->wsrep_thd_transaction_state_str_func(T)
+#define wsrep_thd_transaction_id(T) wsrep_service->wsrep_thd_transaction_id_func(T)
+#define wsrep_thd_bf_abort(T,T2,S) wsrep_service->wsrep_thd_bf_abort_func(T,T2,S)
+#define wsrep_thd_order_before(L,R) wsrep_service->wsrep_thd_order_before_func(L,R)
+#define wsrep_handle_SR_rollback(B,V) wsrep_service->wsrep_handle_SR_rollback_func(B,V)
+#define wsrep_thd_skip_locking(T) wsrep_service->wsrep_thd_skip_locking_func(T)
+#define wsrep_get_sr_table_name() wsrep_service->wsrep_get_sr_table_name_func()
+#define wsrep_get_debug() wsrep_service->wsrep_get_debug_func()
+#define wsrep_commit_ordered(T) wsrep_service->wsrep_commit_ordered_func(T)
+#define wsrep_thd_is_applying(T) wsrep_service->wsrep_thd_is_applying_func(T)
+#define wsrep_thd_set_wsrep_aborter(T) wsrep_service->wsrep_thd_set_wsrep_aborter_func(T1, T2)
+#define wsrep_report_bf_lock_wait(T,I) wsrep_service->wsrep_report_bf_lock_wait(T,I)
+#define wsrep_thd_set_PA_unsafe(T) wsrep_service->wsrep_thd_set_PA_unsafe_func(T)
#else
-extern my_bool wsrep_debug;
+#define MYSQL_SERVICE_WSREP_STATIC_INCLUDED
+extern ulong wsrep_debug;
extern my_bool wsrep_log_conflicts;
extern my_bool wsrep_certify_nonPK;
extern my_bool wsrep_load_data_splitting;
@@ -189,60 +144,94 @@ extern my_bool wsrep_drupal_282555_workaround;
extern my_bool wsrep_recovery;
extern long wsrep_protocol_version;
-bool wsrep_consistency_check(THD *thd);
-bool wsrep_prepare_key(const unsigned char* cache_key, size_t cache_key_len, const unsigned char* row_id, size_t row_id_len, struct wsrep_buf* key, size_t* key_len);
-const char *wsrep_thd_query(THD *thd);
-const char *wsrep_thd_conflict_state_str(THD *thd);
-const char *wsrep_thd_exec_mode_str(THD *thd);
-const char *wsrep_thd_query_state_str(THD *thd);
-enum wsrep_conflict_state wsrep_thd_conflict_state(MYSQL_THD thd, my_bool sync);
-enum wsrep_conflict_state wsrep_thd_get_conflict_state(MYSQL_THD thd);
-enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd);
-enum wsrep_query_state wsrep_thd_query_state(THD *thd);
-enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, bool all);
-int wsrep_is_wsrep_xid(const struct xid_t* xid);
-long long wsrep_xid_seqno(const struct xid_t* xid);
+extern "C" bool wsrep_consistency_check(MYSQL_THD thd);
+bool wsrep_prepare_key_for_innodb(MYSQL_THD thd, const unsigned char* cache_key, size_t cache_key_len, const unsigned char* row_id, size_t row_id_len, struct wsrep_buf* key, size_t* key_len);
+extern "C" const char *wsrep_thd_query(const MYSQL_THD thd);
+extern "C" int wsrep_is_wsrep_xid(const void* xid);
+extern "C" long long wsrep_xid_seqno(const struct xid_t* xid);
const unsigned char* wsrep_xid_uuid(const struct xid_t* xid);
-int wsrep_on(MYSQL_THD thd);
-int wsrep_thd_retry_counter(THD *thd);
-int wsrep_trx_is_aborting(MYSQL_THD thd);
-int wsrep_trx_order_before(MYSQL_THD thd1, MYSQL_THD thd2);
-long get_wsrep_protocol_version();
-long long wsrep_thd_trx_seqno(THD *thd);
-my_bool get_wsrep_certify_nonPK();
-my_bool get_wsrep_debug();
-my_bool get_wsrep_drupal_282555_workaround();
+extern "C" long long wsrep_thd_trx_seqno(const MYSQL_THD thd);
my_bool get_wsrep_recovery();
-my_bool get_wsrep_load_data_splitting();
-my_bool get_wsrep_log_conflicts();
-my_bool wsrep_aborting_thd_contains(THD *thd);
-my_bool wsrep_thd_is_BF(MYSQL_THD thd, my_bool sync);
-my_bool wsrep_thd_is_wsrep(MYSQL_THD thd);
-struct wsrep *get_wsrep();
-struct wsrep_ws_handle *wsrep_thd_ws_handle(THD *thd);
-void wsrep_set_load_multi_commit(THD *thd, bool split);
-bool wsrep_is_load_multi_commit(THD *thd);
-void wsrep_aborting_thd_enqueue(THD *thd);
-void wsrep_lock_rollback();
-void wsrep_post_commit(THD* thd, bool all);
-void wsrep_thd_LOCK(THD *thd);
-void wsrep_thd_UNLOCK(THD *thd);
-void wsrep_thd_kill_LOCK(THD *thd);
-void wsrep_thd_kill_UNLOCK(THD *thd);
-void wsrep_thd_awake(THD *thd, my_bool signal);
-void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state);
-bool wsrep_thd_ignore_table(THD *thd);
-void wsrep_unlock_rollback();
+bool wsrep_thd_ignore_table(MYSQL_THD thd);
void wsrep_set_data_home_dir(const char *data_dir);
-my_bool wsrep_thd_is_applier(MYSQL_THD thd);
-void wsrep_report_bf_lock_wait(THD *thd,
- unsigned long long trx_id);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#define MYSQL_SERVICE_WSREP_INCLUDED
+/* from mysql wsrep-lib */
+#include "my_global.h"
+#include "my_pthread.h"
+
+/* Return true if wsrep is enabled for a thd. This means that
+ wsrep is enabled globally and the thd has wsrep on */
+extern "C" my_bool wsrep_on(const MYSQL_THD thd);
+/* Lock thd wsrep lock */
+extern "C" void wsrep_thd_LOCK(const MYSQL_THD thd);
+/* Unlock thd wsrep lock */
+extern "C" void wsrep_thd_UNLOCK(const MYSQL_THD thd);
+
+extern "C" void wsrep_thd_kill_LOCK(const MYSQL_THD thd);
+extern "C" void wsrep_thd_kill_UNLOCK(const MYSQL_THD thd);
+
+/* Return thd client state string */
+extern "C" const char* wsrep_thd_client_state_str(const MYSQL_THD thd);
+/* Return thd client mode string */
+extern "C" const char* wsrep_thd_client_mode_str(const MYSQL_THD thd);
+/* Return thd transaction state string */
+extern "C" const char* wsrep_thd_transaction_state_str(const MYSQL_THD thd);
+
+/* Return current transaction id */
+extern "C" query_id_t wsrep_thd_transaction_id(const MYSQL_THD thd);
+/* Mark thd own transaction as aborted */
+extern "C" void wsrep_thd_self_abort(MYSQL_THD thd);
+/* Return true if thd is in replicating mode */
+extern "C" my_bool wsrep_thd_is_local(const MYSQL_THD thd);
+/* Return true if thd is in high priority mode */
+/* todo: rename to is_high_priority() */
+extern "C" my_bool wsrep_thd_is_applying(const MYSQL_THD thd);
+/* set wsrep_aborter for the target THD */
+extern "C" bool wsrep_thd_set_wsrep_aborter(MYSQL_THD bf_thd, MYSQL_THD victim_thd);
+/* Return true if thd is in TOI mode */
+extern "C" my_bool wsrep_thd_is_toi(const MYSQL_THD thd);
+/* Return true if thd is in replicating TOI mode */
+extern "C" my_bool wsrep_thd_is_local_toi(const MYSQL_THD thd);
+/* Return true if thd is in RSU mode */
+extern "C" my_bool wsrep_thd_is_in_rsu(const MYSQL_THD thd);
+/* Return true if thd is in BF mode, either high_priority or TOI */
+extern "C" my_bool wsrep_thd_is_BF(const MYSQL_THD thd, my_bool sync);
+/* Return true if thd is streaming */
+extern "C" my_bool wsrep_thd_is_SR(const MYSQL_THD thd);
+extern "C" void wsrep_handle_SR_rollback(MYSQL_THD BF_thd, MYSQL_THD victim_thd);
+/* Return thd retry counter */
+extern "C" int wsrep_thd_retry_counter(const MYSQL_THD thd);
+/* BF abort victim_thd */
+extern "C" my_bool wsrep_thd_bf_abort(MYSQL_THD bf_thd,
+ MYSQL_THD victim_thd,
+ my_bool signal);
+/* Return true if left thd is ordered before right thd */
+extern "C" my_bool wsrep_thd_order_before(const MYSQL_THD left, const MYSQL_THD right);
+/* Return true if thd should skip locking. This means that the thd
+ is operating on shared resource inside commit order critical section. */
+extern "C" my_bool wsrep_thd_skip_locking(const MYSQL_THD thd);
+/* Return true if thd is aborting */
+extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_THD thd);
+
+struct wsrep_key;
+struct wsrep_key_array;
+extern "C" int wsrep_thd_append_key(MYSQL_THD thd,
+ const struct wsrep_key* key,
+ int n_keys,
+ enum Wsrep_service_key_type);
+
+extern const char* wsrep_sr_table_name_full;
+
+extern "C" const char* wsrep_get_sr_table_name();
+
+extern "C" my_bool wsrep_get_debug();
+
+extern "C" void wsrep_commit_ordered(MYSQL_THD thd);
+extern "C" my_bool wsrep_thd_is_applying(const MYSQL_THD thd);
+extern "C" bool wsrep_thd_set_wsrep_aborter(MYSQL_THD bf_thd, MYSQL_THD victim_thd);
+extern "C" void wsrep_report_bf_lock_wait(const THD *thd,
+ unsigned long long trx_id);
+/* declare parallel applying unsafety for the THD */
+extern "C" void wsrep_thd_set_PA_unsafe(MYSQL_THD thd);
#endif
-
+#endif /* MYSQL_SERVICE_WSREP_INCLUDED */
diff --git a/include/mysql/services.h b/include/mysql/services.h
index 986d430dbf1..2c3a0ae421b 100644
--- a/include/mysql/services.h
+++ b/include/mysql/services.h
@@ -39,6 +39,7 @@ extern "C" {
#include <mysql/service_thd_specifics.h>
#include <mysql/service_thd_timezone.h>
#include <mysql/service_thd_wait.h>
+#include <mysql/service_json.h>
/*#include <mysql/service_wsrep.h>*/
#ifdef __cplusplus
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 234b6133676..f63cf0ac5c2 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -203,6 +203,8 @@ enum enum_indicator_type
#define VERS_UPDATE_UNVERSIONED_FLAG (1 << 29) /* column that doesn't support
system versioning when table
itself supports it*/
+#define LONG_UNIQUE_HASH_FIELD (1<< 30) /* This field will store hash for unique
+ column */
#define REFRESH_GRANT (1ULL << 0) /* Refresh grant tables */
#define REFRESH_LOG (1ULL << 1) /* Start on new log file */
@@ -231,6 +233,7 @@ enum enum_indicator_type
#define REFRESH_DES_KEY_FILE (1ULL << 18)
#define REFRESH_USER_RESOURCES (1ULL << 19)
#define REFRESH_FOR_EXPORT (1ULL << 20) /* FLUSH TABLES ... FOR EXPORT */
+#define REFRESH_SSL (1ULL << 21)
#define REFRESH_GENERIC (1ULL << 30)
#define REFRESH_FAST (1ULL << 31) /* Intern flag */
@@ -332,12 +335,8 @@ enum enum_indicator_type
CLIENT_DEPRECATE_EOF |\
CLIENT_CONNECT_ATTRS |\
MARIADB_CLIENT_COM_MULTI |\
- MARIADB_CLIENT_STMT_BULK_OPERATIONS)
-
-/*
- To be added later:
- CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS
-*/
+ MARIADB_CLIENT_STMT_BULK_OPERATIONS |\
+ CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS)
/*
Switch off the flags that are optional and depending on build flags
diff --git a/include/mysql_embed.h b/include/mysql_embed.h
index e9cbdb6a275..775040ac9d1 100644
--- a/include/mysql_embed.h
+++ b/include/mysql_embed.h
@@ -25,7 +25,6 @@
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
#undef HAVE_DLOPEN /* No udf functions */
-#undef HAVE_SMEM /* No shared memory */
#endif /* EMBEDDED_LIBRARY */
#endif /* MYSQL_EMBED_INCLUDED */
diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in
index da572953fc5..82a13283e3f 100644
--- a/include/mysql_version.h.in
+++ b/include/mysql_version.h.in
@@ -14,6 +14,7 @@
#define MYSQL_SERVER_VERSION "@VERSION@-MariaDB"
#define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@"
#define MARIADB_BASE_VERSION "mariadb-@MYSQL_BASE_VERSION@"
+#define MARIADBD_BASE_VERSION "mariadbd-@MYSQL_BASE_VERSION@"
#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@"
#define FRM_VER @DOT_FRM_VERSION@
#define MYSQL_VERSION_ID @MYSQL_VERSION_ID@
diff --git a/include/mysqld_default_groups.h b/include/mysqld_default_groups.h
index 3bc82359787..cf6e92e3bc1 100644
--- a/include/mysqld_default_groups.h
+++ b/include/mysqld_default_groups.h
@@ -1,6 +1,7 @@
const char *load_default_groups[]= {
"mysqld", "server", MYSQL_BASE_VERSION,
"mariadb", MARIADB_BASE_VERSION,
+"mariadbd", MARIADBD_BASE_VERSION,
"client-server",
#ifdef WITH_WSREP
"galera",
diff --git a/include/scope.h b/include/scope.h
new file mode 100644
index 00000000000..e0e9fc62969
--- /dev/null
+++ b/include/scope.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (c) 2020, MariaDB
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by 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
+*/
+
+#pragma once
+
+#include <type_traits>
+#include <utility>
+
+namespace detail
+{
+
+template <typename Callable> class scope_exit
+{
+public:
+ template <typename F>
+ explicit scope_exit(F &&f) : function_(std::forward<F>(f))
+ {
+ }
+
+ scope_exit(scope_exit &&rhs)
+ : function_(std::move(rhs.function_)), engaged_(rhs.engaged_)
+ {
+ rhs.release();
+ }
+
+ scope_exit(const scope_exit &)= delete;
+ scope_exit &operator=(scope_exit &&)= delete;
+ scope_exit &operator=(const scope_exit &)= delete;
+
+ void release() { engaged_= false; }
+
+ ~scope_exit()
+ {
+ if (engaged_)
+ function_();
+ }
+
+private:
+ Callable function_;
+ bool engaged_= true;
+};
+
+} // end namespace detail
+
+template <typename Callable>
+detail::scope_exit<typename std::decay<Callable>::type>
+make_scope_exit(Callable &&f)
+{
+ return detail::scope_exit<typename std::decay<Callable>::type>(
+ std::forward<Callable>(f));
+}
+
+#define CONCAT_IMPL(x, y) x##y
+
+#define CONCAT(x, y) CONCAT_IMPL(x, y)
+
+#define ANONYMOUS_VARIABLE CONCAT(_anonymous_variable, __LINE__)
+
+#define SCOPE_EXIT auto ANONYMOUS_VARIABLE= make_scope_exit
diff --git a/include/service_versions.h b/include/service_versions.h
index 4b9ef1d4b47..fb7e715f858 100644
--- a/include/service_versions.h
+++ b/include/service_versions.h
@@ -41,4 +41,5 @@
#define VERSION_thd_specifics 0x0100
#define VERSION_thd_timezone 0x0100
#define VERSION_thd_wait 0x0100
-#define VERSION_wsrep 0x0301
+#define VERSION_wsrep 0x0400
+#define VERSION_json 0x0100
diff --git a/include/ssl_compat.h b/include/ssl_compat.h
index c94b9671d5f..8dc1225407e 100644
--- a/include/ssl_compat.h
+++ b/include/ssl_compat.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2016, 2017 MariaDB Corporation
+ Copyright (c) 2016, 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
@@ -17,11 +17,7 @@
#include <openssl/opensslv.h>
/* OpenSSL version specific definitions */
-#if !defined(HAVE_YASSL) && defined(OPENSSL_VERSION_NUMBER)
-
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
-#define HAVE_X509_check_host 1
-#endif
+#if defined(OPENSSL_VERSION_NUMBER)
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
#define HAVE_OPENSSL11 1
@@ -49,33 +45,50 @@
#else
#define HAVE_OPENSSL10 1
+#ifdef HAVE_WOLFSSL
+#define SSL_LIBRARY "WolfSSL " WOLFSSL_VERSION
+#else
#define SSL_LIBRARY SSLeay_version(SSLEAY_VERSION)
+#endif
-#ifdef HAVE_ERR_remove_thread_state
+#ifdef HAVE_WOLFSSL
+#undef ERR_remove_state
+#define ERR_remove_state(x) do {} while(0)
+#elif defined (HAVE_ERR_remove_thread_state)
#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
#endif /* HAVE_ERR_remove_thread_state */
#endif /* HAVE_OPENSSL11 */
+#endif
-#elif defined(HAVE_YASSL)
-#define SSL_LIBRARY "YaSSL " YASSL_VERSION
-#define BN_free(X) do { } while(0)
-#endif /* !defined(HAVE_YASSL) */
+#ifdef HAVE_WOLFSSL
+#define EVP_MD_CTX_SIZE sizeof(wc_Md5)
+#endif
#ifndef HAVE_OPENSSL11
+#ifndef ASN1_STRING_get0_data
#define ASN1_STRING_get0_data(X) ASN1_STRING_data(X)
-#define OPENSSL_init_ssl(X,Y) SSL_library_init()
+#endif
+#ifndef EVP_MD_CTX_SIZE
+#define EVP_MD_CTX_SIZE sizeof(EVP_MD_CTX)
+#endif
+
+#ifndef DH_set0_pqg
#define DH_set0_pqg(D,P,Q,G) ((D)->p= (P), (D)->g= (G))
+#endif
+
#define EVP_CIPHER_CTX_buf_noconst(ctx) ((ctx)->buf)
#define EVP_CIPHER_CTX_encrypting(ctx) ((ctx)->encrypt)
#define EVP_CIPHER_CTX_SIZE sizeof(EVP_CIPHER_CTX)
-#define EVP_MD_CTX_SIZE sizeof(EVP_MD_CTX)
+#ifndef HAVE_WOLFSSL
+#define OPENSSL_init_ssl(X,Y) SSL_library_init()
#define EVP_MD_CTX_reset(X) EVP_MD_CTX_cleanup(X)
#define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X)
#define X509_get0_notBefore(X) X509_get_notBefore(X)
#define X509_get0_notAfter(X) X509_get_notAfter(X)
#endif
+#endif
#ifndef TLS1_3_VERSION
#define SSL_CTX_set_ciphersuites(X,Y) 0
diff --git a/include/sslopt-case.h b/include/sslopt-case.h
index fe83051c275..72881a266ab 100644
--- a/include/sslopt-case.h
+++ b/include/sslopt-case.h
@@ -29,8 +29,8 @@
One can disable SSL later by using --skip-ssl or --ssl=0
*/
opt_use_ssl= 1;
- /* crl has no effect in yaSSL */
-#if defined (HAVE_YASSL) && (!defined (_WIN32) || defined (MYSQL_SERVER))
+#if defined (HAVE_WOLFSSL) && (!defined (_WIN32) || defined (MYSQL_SERVER))
+ /* CRL does not work with WolfSSL */
opt_ssl_crl= NULL;
opt_ssl_crlpath= NULL;
#endif
diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h
index be64e7f6590..d0278a1645d 100644
--- a/include/sslopt-longopts.h
+++ b/include/sslopt-longopts.h
@@ -46,6 +46,11 @@
"Certificate revocation list path (implies --ssl).",
&opt_ssl_crlpath, &opt_ssl_crlpath, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
+ {"tls-version", OPT_TLS_VERSION,
+ "TLS protocol version for secure connection.",
+ &opt_tls_version, &opt_tls_version, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+
#ifdef MYSQL_CLIENT
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
"Verify server's \"Common Name\" in its cert against hostname used "
diff --git a/include/sslopt-vars.h b/include/sslopt-vars.h
index c65aa693b76..e28f19b919d 100644
--- a/include/sslopt-vars.h
+++ b/include/sslopt-vars.h
@@ -30,6 +30,7 @@ SSL_STATIC char *opt_ssl_cipher = 0;
SSL_STATIC char *opt_ssl_key = 0;
SSL_STATIC char *opt_ssl_crl = 0;
SSL_STATIC char *opt_ssl_crlpath = 0;
+SSL_STATIC char *opt_tls_version = 0;
#ifdef MYSQL_CLIENT
SSL_STATIC my_bool opt_ssl_verify_server_cert= 0;
#endif
diff --git a/include/thr_lock.h b/include/thr_lock.h
index 35db9ef981b..2873d40c58a 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -168,9 +168,9 @@ void thr_set_lock_wait_callback(void (*before_wait)(void),
void (*after_wait)(void));
#ifdef WITH_WSREP
- typedef my_bool (* wsrep_thd_is_brute_force_fun)(void *, my_bool);
- typedef int (* wsrep_abort_thd_fun)(void *, void *, my_bool);
- typedef int (* wsrep_on_fun)(void *);
+ typedef my_bool (* wsrep_thd_is_brute_force_fun)(const MYSQL_THD, my_bool);
+ typedef my_bool(* wsrep_abort_thd_fun)(MYSQL_THD, MYSQL_THD, my_bool);
+ typedef my_bool (* wsrep_on_fun)(const MYSQL_THD);
void wsrep_thr_lock_init(
wsrep_thd_is_brute_force_fun bf_fun, wsrep_abort_thd_fun abort_fun,
my_bool debug, my_bool convert_LOCK_to_trx, wsrep_on_fun on_fun);
diff --git a/include/thread_pool_priv.h b/include/thread_pool_priv.h
index f7d2da0b082..47f281192e9 100644
--- a/include/thread_pool_priv.h
+++ b/include/thread_pool_priv.h
@@ -61,9 +61,6 @@ void thd_set_mysys_var(THD *thd, st_my_thread_var *mysys_var);
my_socket thd_get_fd(THD *thd);
int thd_store_globals(THD* thd);
-THD *first_global_thread();
-THD *next_global_thread(THD *thd);
-
/* Print to the MySQL error log */
void sql_print_error(const char *format, ...);
diff --git a/include/violite.h b/include/violite.h
index bb3fd8f6b6c..f0fc53e4d6e 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 2012, 2017, MariaDB Corporation.
+ Copyright (c) 2012, 2020, 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
@@ -38,7 +38,7 @@ typedef struct st_vio Vio;
enum enum_vio_type
{
VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE,
- VIO_TYPE_SSL, VIO_TYPE_SHARED_MEMORY
+ VIO_TYPE_SSL
};
/**
@@ -59,6 +59,11 @@ struct vio_keepalive_opts
};
+#define VIO_TLSv1_0 1
+#define VIO_TLSv1_1 2
+#define VIO_TLSv1_2 4
+#define VIO_TLSv1_3 8
+
#define VIO_LOCALHOST 1U /* a localhost connection */
#define VIO_BUFFERED_READ 2U /* use buffered read */
#define VIO_READ_BUFFER_SIZE 16384U /* size of read buffer */
@@ -68,13 +73,6 @@ Vio* vio_new(my_socket sd, enum enum_vio_type type, uint flags);
Vio* mysql_socket_vio_new(MYSQL_SOCKET mysql_socket, enum enum_vio_type type, uint flags);
#ifdef __WIN__
Vio* vio_new_win32pipe(HANDLE hPipe);
-Vio* vio_new_win32shared_memory(HANDLE handle_file_map,
- HANDLE handle_map,
- HANDLE event_server_wrote,
- HANDLE event_server_read,
- HANDLE event_client_wrote,
- HANDLE event_client_read,
- HANDLE event_conn_closed);
#else
#define HANDLE void *
#endif /* __WIN__ */
@@ -89,6 +87,7 @@ size_t vio_write(Vio *vio, const uchar * buf, size_t size);
int vio_blocking(Vio *vio, my_bool onoff, my_bool *old_mode);
my_bool vio_is_blocking(Vio *vio);
/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */
+int vio_nodelay(Vio *vio, my_bool on);
int vio_fastsend(Vio *vio);
/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible */
int vio_keepalive(Vio *vio, my_bool onoff);
@@ -145,7 +144,9 @@ int vio_getnameinfo(const struct sockaddr *sa,
/* Set yaSSL to use same type as MySQL do for socket handles */
typedef my_socket YASSL_SOCKET_T;
#define YASSL_SOCKET_T_DEFINED
+#define template _template /* bug in WolfSSL 4.4.0, see also my_crypt.cc */
#include <openssl/ssl.h>
+#undef template
#include <openssl/err.h>
#ifdef DEPRECATED
#undef DEPRECATED
@@ -155,7 +156,8 @@ enum enum_ssl_init_error
{
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
SSL_INITERR_NOMATCH, SSL_INITERR_BAD_PATHS, SSL_INITERR_CIPHERS,
- SSL_INITERR_MEMFAIL, SSL_INITERR_DH, SSL_INITERR_LASTERR
+ SSL_INITERR_MEMFAIL, SSL_INITERR_DH, SSL_INITERR_PROTOCOL,
+ SSL_INITERR_LASTERR
};
const char* sslGetErrString(enum enum_ssl_init_error err);
@@ -167,6 +169,8 @@ struct st_VioSSLFd
int sslaccept(struct st_VioSSLFd*, Vio *, long timeout, unsigned long *errptr);
int sslconnect(struct st_VioSSLFd*, Vio *, long timeout, unsigned long *errptr);
+void vio_check_ssl_init();
+
struct st_VioSSLFd
*new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
const char *ca_file, const char *ca_path,
@@ -176,7 +180,8 @@ struct st_VioSSLFd
*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
const char *ca_file,const char *ca_path,
const char *cipher, enum enum_ssl_init_error *error,
- const char *crl_file, const char *crl_path);
+ const char *crl_file, const char *crl_path,
+ ulonglong tls_version);
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
#endif /* HAVE_OPENSSL */
@@ -265,22 +270,9 @@ struct st_vio
#ifdef HAVE_OPENSSL
void *ssl_arg;
#endif
-#ifdef HAVE_SMEM
- HANDLE handle_file_map;
- char *handle_map;
- HANDLE event_server_wrote;
- HANDLE event_server_read;
- HANDLE event_client_wrote;
- HANDLE event_client_read;
- HANDLE event_conn_closed;
- size_t shared_memory_remain;
- char *shared_memory_pos;
-#endif /* HAVE_SMEM */
#ifdef _WIN32
HANDLE hPipe;
OVERLAPPED overlapped;
- DWORD read_timeout_ms;
- DWORD write_timeout_ms;
int shutdown_flag;
#endif
};
diff --git a/include/wsrep.h b/include/wsrep.h
index a3a58324f3e..e4535deabfe 100644
--- a/include/wsrep.h
+++ b/include/wsrep.h
@@ -13,61 +13,62 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
-#include <my_config.h>
-
#ifndef WSREP_INCLUDED
#define WSREP_INCLUDED
+#include <my_config.h>
+#include "log.h"
+
#ifdef WITH_WSREP
#define IF_WSREP(A,B) A
#define DBUG_ASSERT_IF_WSREP(A) DBUG_ASSERT(A)
-#define WSREP_MYSQL_DB (char *)"mysql"
-#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
- if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
- goto wsrep_error_label;
-
-#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_) \
- if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, \
- table_list_, alter_info_)) \
- goto wsrep_error_label;
-
-#define WSREP_TO_ISOLATION_END \
- if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
- wsrep_to_isolation_end(thd);
-
-/*
- Checks if lex->no_write_to_binlog is set for statements that use LOCAL or
- NO_WRITE_TO_BINLOG.
-*/
-#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \
- if (WSREP(thd) && !thd->lex->no_write_to_binlog \
- && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto wsrep_error_label;
+extern ulong wsrep_debug; // wsrep_mysqld.cc
+extern void WSREP_LOG(void (*fun)(const char* fmt, ...), const char* fmt, ...);
#define WSREP_DEBUG(...) \
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
#define WSREP_INFO(...) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
+#define WSREP_UNKNOWN(fmt, ...) WSREP_ERROR("UNKNOWN: " fmt, ##__VA_ARGS__)
+
+#define WSREP_LOG_CONFLICT_THD(thd, role) \
+ WSREP_INFO("%s: \n " \
+ " THD: %lu, mode: %s, state: %s, conflict: %s, seqno: %lld\n " \
+ " SQL: %s", \
+ role, \
+ thd_get_thread_id(thd), \
+ wsrep_thd_client_mode_str(thd), \
+ wsrep_thd_client_state_str(thd), \
+ wsrep_thd_transaction_state_str(thd), \
+ wsrep_thd_trx_seqno(thd), \
+ wsrep_thd_query(thd) \
+ );
+
+#define WSREP_LOG_CONFLICT(bf_thd, victim_thd, bf_abort) \
+ if (wsrep_debug || wsrep_log_conflicts) \
+ { \
+ WSREP_INFO("cluster conflict due to %s for threads:", \
+ (bf_abort) ? "high priority abort" : "certification failure" \
+ ); \
+ if (bf_thd) WSREP_LOG_CONFLICT_THD(bf_thd, "Winning thread"); \
+ if (victim_thd) WSREP_LOG_CONFLICT_THD(victim_thd, "Victim thread"); \
+ WSREP_INFO("context: %s:%d", __FILE__, __LINE__); \
+ }
+
+
+#else /* !WITH_WSREP */
+
+/* These macros are needed to compile MariaDB without WSREP support
+ * (e.g. embedded) */
-#define WSREP_SYNC_WAIT(thd_, before_) \
- do { if (WSREP_CLIENT(thd_) && \
- wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; } while(0)
-#define WSREP_ERROR_LABEL wsrep_error_label
-#else
#define IF_WSREP(A,B) B
-#define DBUG_ASSERT_IF_WSREP(A)
+//#define DBUG_ASSERT_IF_WSREP(A)
#define WSREP_DEBUG(...)
-#define WSREP_INFO(...)
-#define WSREP_WARN(...)
+//#define WSREP_INFO(...)
+//#define WSREP_WARN(...)
#define WSREP_ERROR(...)
-#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
-#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_)
-#define WSREP_TO_ISOLATION_END
-#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
-#define WSREP_SYNC_WAIT(thd_, before_) do { } while(0)
-#define WSREP_ERROR_LABEL goto wsrep_error_label; wsrep_error_label
-
#endif /* WITH_WSREP */
#endif /* WSREP_INCLUDED */
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 8886d69851b..e3d170fa47d 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -55,7 +55,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/item_subselect.cc ../sql/item_sum.cc ../sql/item_timefunc.cc
../sql/item_xmlfunc.cc ../sql/item_jsonfunc.cc
../sql/key.cc ../sql/lock.cc ../sql/log.cc
- ../sql/log_event.cc ../sql/mf_iocache.cc ../sql/my_decimal.cc
+ ../sql/log_event.cc ../sql/mf_iocache.cc ../sql/my_decimal.cc
../sql/net_serv.cc ../sql/opt_range.cc ../sql/opt_sum.cc
../sql/parse_file.cc ../sql/procedure.cc ../sql/protocol.cc
../sql/records.cc ../sql/repl_failsafe.cc ../sql/rpl_filter.cc
@@ -78,7 +78,8 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/debug_sync.cc ../sql/opt_table_elimination.cc
../sql/sql_prepare.cc ../sql/sql_rename.cc ../sql/sql_repl.cc
../sql/sql_select.cc ../sql/sql_servers.cc
- ../sql/group_by_handler.cc
+ ../sql/group_by_handler.cc ../sql/derived_handler.cc
+ ../sql/select_handler.cc
../sql/sql_show.cc ../sql/sql_state.c
../sql/sql_statistics.cc ../sql/sql_string.cc
../sql/sql_tablespace.cc ../sql/sql_table.cc ../sql/sql_test.cc
@@ -111,6 +112,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_schema.cc
../sql/sql_type.cc ../sql/sql_type.h
../sql/sql_mode.cc
+ ../sql/sql_type_json.cc
../sql/table_cache.cc ../sql/mf_iocache_encr.cc
../sql/item_inetfunc.cc
../sql/wsrep_dummy.cc ../sql/encryption.cc
@@ -119,10 +121,13 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_sequence.cc ../sql/sql_sequence.h
../sql/ha_sequence.cc ../sql/ha_sequence.h
../sql/temporary_tables.cc
- ../sql/proxy_protocol.cc
+ ../sql/proxy_protocol.cc ../sql/backup.cc
../sql/sql_tvc.cc ../sql/sql_tvc.h
../sql/opt_split.cc
+ ../sql/rowid_filter.cc ../sql/rowid_filter.h
../sql/item_vers.cc
+ ../sql/opt_trace.cc
+ ../sql/xa.cc
${GEN_SOURCES}
${MYSYS_LIBWRAP_SOURCE}
)
@@ -149,7 +154,7 @@ SET(LIBS
dbug strings mysys mysys_ssl pcre vio
${ZLIB_LIBRARY} ${SSL_LIBRARIES}
${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS}
- ${MYSQLD_STATIC_PLUGIN_LIBS}
+ ${EMBEDDED_PLUGIN_LIBS}
sql_embedded
)
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index a2afcabe073..55c6dd6f6e8 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -434,11 +434,9 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row)
static void emb_free_embedded_thd(MYSQL *mysql)
{
THD *thd= (THD*)mysql->thd;
- mysql_mutex_lock(&LOCK_thread_count);
+ server_threads.erase(thd);
thd->clear_data_list();
thd->store_globals();
- thd->unlink();
- mysql_mutex_unlock(&LOCK_thread_count);
delete thd;
my_pthread_setspecific_ptr(THR_THD, 0);
mysql->thd=0;
@@ -714,10 +712,7 @@ void *create_embedded_thd(int client_flag)
thd->first_data= 0;
thd->data_tail= &thd->first_data;
bzero((char*) &thd->net, sizeof(thd->net));
-
- mysql_mutex_lock(&LOCK_thread_count);
- threads.append(thd);
- mysql_mutex_unlock(&LOCK_thread_count);
+ server_threads.insert(thd);
thd->mysys_var= 0;
thd->reset_globals();
return thd;
@@ -899,6 +894,20 @@ static char *dup_str_aux(MEM_ROOT *root, const char *from, uint length,
}
+static char *dup_str_aux(MEM_ROOT *root, const char *from,
+ CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
+{
+ return dup_str_aux(root, from, (uint) strlen(from), fromcs, tocs);
+}
+
+
+static char *dup_str_aux(MEM_ROOT *root, const LEX_CSTRING &from,
+ CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
+{
+ return dup_str_aux(root, from.str, (uint) from.length, fromcs, tocs);
+}
+
+
/*
creates new result and hooks it to the list
@@ -977,7 +986,7 @@ write_eof_packet(THD *thd, uint server_status, uint statement_warn_count)
1 if memory allocation failed
*/
-int Protocol::begin_dataset()
+bool Protocol::begin_dataset()
{
MYSQL_DATA *data= thd->alloc_new_dataset();
if (!data)
@@ -990,6 +999,19 @@ int Protocol::begin_dataset()
}
+bool Protocol::begin_dataset(THD *thd, uint numfields)
+{
+ if (begin_dataset())
+ return true;
+ MYSQL_DATA *data= thd->cur_data;
+ data->fields= field_count= numfields;
+ if (!(data->embedded_info->fields_list=
+ (MYSQL_FIELD*)alloc_root(&data->alloc, sizeof(MYSQL_FIELD)*field_count)))
+ return true;
+ return false;
+}
+
+
/*
remove last row of current recordset
@@ -1019,110 +1041,80 @@ void Protocol_text::remove_last_row()
}
+bool Protocol_text::store_field_metadata(const THD * thd,
+ const Send_field &server_field,
+ CHARSET_INFO *charset_for_protocol,
+ uint pos)
+{
+ CHARSET_INFO *cs= system_charset_info;
+ CHARSET_INFO *thd_cs= thd->variables.character_set_results;
+ MYSQL_DATA *data= thd->cur_data;
+ MEM_ROOT *field_alloc= &data->alloc;
+ MYSQL_FIELD *client_field= &thd->cur_data->embedded_info->fields_list[pos];
+ DBUG_ASSERT(server_field.is_sane());
+
+ client_field->db= dup_str_aux(field_alloc, server_field.db_name,
+ cs, thd_cs);
+ client_field->table= dup_str_aux(field_alloc, server_field.table_name,
+ cs, thd_cs);
+ client_field->name= dup_str_aux(field_alloc, server_field.col_name,
+ cs, thd_cs);
+ client_field->org_table= dup_str_aux(field_alloc, server_field.org_table_name,
+ cs, thd_cs);
+ client_field->org_name= dup_str_aux(field_alloc, server_field.org_col_name,
+ cs, thd_cs);
+ if (charset_for_protocol == &my_charset_bin || thd_cs == NULL)
+ {
+ /* No conversion */
+ client_field->charsetnr= charset_for_protocol->number;
+ client_field->length= server_field.length;
+ }
+ else
+ {
+ /* With conversion */
+ client_field->charsetnr= thd_cs->number;
+ client_field->length= server_field.max_octet_length(charset_for_protocol,
+ thd_cs);
+ }
+ client_field->type= server_field.type_handler()->type_code_for_protocol();
+ client_field->flags= (uint16) server_field.flags;
+ client_field->decimals= server_field.decimals;
+
+ client_field->db_length= strlen(client_field->db);
+ client_field->table_length= strlen(client_field->table);
+ client_field->name_length= strlen(client_field->name);
+ client_field->org_name_length= strlen(client_field->org_name);
+ client_field->org_table_length= strlen(client_field->org_table);
+
+ client_field->catalog= dup_str_aux(field_alloc, "def", 3, cs, thd_cs);
+ client_field->catalog_length= 3;
+
+ if (IS_NUM(client_field->type))
+ client_field->flags|= NUM_FLAG;
+
+ client_field->max_length= 0;
+ client_field->def= 0;
+ return false;
+}
+
+
bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
{
List_iterator_fast<Item> it(*list);
Item *item;
- MYSQL_FIELD *client_field;
- MEM_ROOT *field_alloc;
- CHARSET_INFO *thd_cs= thd->variables.character_set_results;
- CHARSET_INFO *cs= system_charset_info;
- MYSQL_DATA *data;
+ Protocol_text prot(thd);
DBUG_ENTER("send_result_set_metadata");
if (!thd->mysql) // bootstrap file handling
DBUG_RETURN(0);
- if (begin_dataset())
- goto err;
-
- data= thd->cur_data;
- data->fields= field_count= list->elements;
- field_alloc= &data->alloc;
-
- if (!(client_field= data->embedded_info->fields_list=
- (MYSQL_FIELD*)alloc_root(field_alloc, sizeof(MYSQL_FIELD)*field_count)))
+ if (begin_dataset(thd, list->elements))
goto err;
- while ((item= it++))
+ for (uint pos= 0 ; (item= it++); pos++)
{
- Send_field server_field;
- item->make_send_field(thd, &server_field);
-
- /* Keep things compatible for old clients */
- if (server_field.type == MYSQL_TYPE_VARCHAR)
- server_field.type= MYSQL_TYPE_VAR_STRING;
-
- client_field->db= dup_str_aux(field_alloc, server_field.db_name,
- strlen(server_field.db_name), cs, thd_cs);
- client_field->table= dup_str_aux(field_alloc, server_field.table_name,
- strlen(server_field.table_name), cs, thd_cs);
- client_field->name= dup_str_aux(field_alloc, server_field.col_name.str,
- server_field.col_name.length, cs, thd_cs);
- client_field->org_table= dup_str_aux(field_alloc, server_field.org_table_name,
- strlen(server_field.org_table_name), cs, thd_cs);
- client_field->org_name= dup_str_aux(field_alloc,
- server_field.org_col_name.str,
- server_field.org_col_name.length,
- cs, thd_cs);
- if (item->charset_for_protocol() == &my_charset_bin || thd_cs == NULL)
- {
- /* No conversion */
- client_field->charsetnr= item->charset_for_protocol()->number;
- client_field->length= server_field.length;
- }
- else
- {
- uint max_char_len;
- /* With conversion */
- client_field->charsetnr= thd_cs->number;
- max_char_len= (server_field.type >= (int) MYSQL_TYPE_TINY_BLOB &&
- server_field.type <= (int) MYSQL_TYPE_BLOB) ?
- server_field.length / item->collation.collation->mbminlen :
- server_field.length / item->collation.collation->mbmaxlen;
- client_field->length= char_to_byte_length_safe(max_char_len,
- thd_cs->mbmaxlen);
- }
- client_field->type= server_field.type;
- client_field->flags= (uint16) server_field.flags;
- client_field->decimals= server_field.decimals;
- if (server_field.type == MYSQL_TYPE_FLOAT ||
- server_field.type == MYSQL_TYPE_DOUBLE)
- set_if_smaller(client_field->decimals, FLOATING_POINT_DECIMALS);
-
- client_field->db_length= strlen(client_field->db);
- client_field->table_length= strlen(client_field->table);
- client_field->name_length= strlen(client_field->name);
- client_field->org_name_length= strlen(client_field->org_name);
- client_field->org_table_length= strlen(client_field->org_table);
-
- client_field->catalog= dup_str_aux(field_alloc, "def", 3, cs, thd_cs);
- client_field->catalog_length= 3;
-
- if (IS_NUM(client_field->type))
- client_field->flags|= NUM_FLAG;
-
- if (flags & (int) Protocol::SEND_DEFAULTS)
- {
- char buff[80];
- String tmp(buff, sizeof(buff), default_charset_info), *res;
-
- if (!(res=item->val_str(&tmp)))
- {
- client_field->def_length= 0;
- client_field->def= strmake_root(field_alloc, "",0);
- }
- else
- {
- client_field->def_length= res->length();
- client_field->def= strmake_root(field_alloc, res->ptr(),
- client_field->def_length);
- }
- }
- else
- client_field->def=0;
- client_field->max_length= 0;
- ++client_field;
+ if (prot.store_field_metadata(thd, item, pos))
+ goto err;
}
if (flags & SEND_EOF)
@@ -1135,6 +1127,55 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
DBUG_RETURN(1); /* purecov: inspected */
}
+
+static void
+list_fields_send_default(THD *thd, Protocol *p, Field *fld, uint pos)
+{
+ char buff[80];
+ String tmp(buff, sizeof(buff), default_charset_info), *res;
+ MYSQL_FIELD *client_field= &thd->cur_data->embedded_info->fields_list[pos];
+
+ if (fld->is_null() || !(res= fld->val_str(&tmp)))
+ {
+ client_field->def_length= 0;
+ client_field->def= strmake_root(&thd->cur_data->alloc, "", 0);
+ }
+ else
+ {
+ client_field->def_length= res->length();
+ client_field->def= strmake_root(&thd->cur_data->alloc, res->ptr(),
+ client_field->def_length);
+ }
+}
+
+
+bool Protocol::send_list_fields(List<Field> *list, const TABLE_LIST *table_list)
+{
+ DBUG_ENTER("send_result_set_metadata");
+ Protocol_text prot(thd);
+ List_iterator_fast<Field> it(*list);
+ Field *fld;
+
+ if (!thd->mysql) // bootstrap file handling
+ DBUG_RETURN(0);
+
+ if (begin_dataset(thd, list->elements))
+ goto err;
+
+ for (uint pos= 0 ; (fld= it++); pos++)
+ {
+ if (prot.store_field_metadata_for_list_fields(thd, fld, table_list, pos))
+ goto err;
+ list_fields_send_default(thd, this, fld, pos);
+ }
+
+ DBUG_RETURN(prepare_for_send(list->elements));
+err:
+ my_error(ER_OUT_OF_RESOURCES, MYF(0));
+ DBUG_RETURN(1);
+}
+
+
bool Protocol::write()
{
if (!thd->mysql) // bootstrap file handling
diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c
index c4b3a17f508..1ebcae0d8d5 100644
--- a/libmysqld/libmysql.c
+++ b/libmysqld/libmysql.c
@@ -3218,7 +3218,8 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, size_t
{
MYSQL_TIME *tm= (MYSQL_TIME *)buffer;
MYSQL_TIME_STATUS status;
- str_to_time(value, length, tm, 0, &status);
+ str_to_datetime_or_date_or_time(value, length, tm, 0, &status,
+ TIME_MAX_HOUR, UINT_MAX32);
err= status.warnings;
*param->error= MY_TEST(err);
break;
@@ -3229,7 +3230,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, size_t
{
MYSQL_TIME *tm= (MYSQL_TIME *)buffer;
MYSQL_TIME_STATUS status;
- (void) str_to_datetime(value, length, tm, 0, &status);
+ (void) str_to_datetime_or_date(value, length, tm, 0, &status);
err= status.warnings;
*param->error= MY_TEST(err) && (param->buffer_type == MYSQL_TYPE_DATE &&
tm->time_type != MYSQL_TIMESTAMP_DATE);
@@ -3353,7 +3354,7 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
case MYSQL_TYPE_DATETIME:
{
int error;
- value= number_to_datetime(value, 0, (MYSQL_TIME *) buffer, 0, &error);
+ value= number_to_datetime_or_date(value, 0, (MYSQL_TIME *) buffer, 0, &error);
*param->error= MY_TEST(error);
break;
}
@@ -3924,6 +3925,7 @@ static my_bool is_binary_compatible(enum enum_field_types type1,
static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field)
{
+ my_bool field_is_unsigned;
DBUG_ENTER("setup_one_fetch_function");
/* Setup data copy functions for the different supported types */
@@ -4000,6 +4002,7 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field)
/* Setup skip_result functions (to calculate max_length) */
param->skip_result= skip_result_fixed;
+ field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
switch (field->type) {
case MYSQL_TYPE_NULL: /* for dummy binds */
param->pack_length= 0;
@@ -4007,23 +4010,23 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field)
break;
case MYSQL_TYPE_TINY:
param->pack_length= 1;
- field->max_length= 4; /* as in '-127' */
+ field->max_length= field_is_unsigned ? 3 : 4; /* '255' and '-127' */
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
param->pack_length= 2;
- field->max_length= 6; /* as in '-32767' */
+ field->max_length= field_is_unsigned ? 5 : 6; /* 65536 and '-32767' */
break;
case MYSQL_TYPE_INT24:
- field->max_length= 9; /* as in '16777216' or in '-8388607' */
+ field->max_length= 8; /* '16777216' or in '-8388607' */
param->pack_length= 4;
break;
case MYSQL_TYPE_LONG:
- field->max_length= 11; /* '-2147483647' */
+ field->max_length= field_is_unsigned ? 10 : 11; /* '4294967295' and '-2147483647' */
param->pack_length= 4;
break;
case MYSQL_TYPE_LONGLONG:
- field->max_length= 21; /* '18446744073709551616' */
+ field->max_length= 20; /* '18446744073709551616' or -9223372036854775808 */
param->pack_length= 8;
break;
case MYSQL_TYPE_FLOAT:
diff --git a/libservices/CMakeLists.txt b/libservices/CMakeLists.txt
index 819775371d3..274c8ce6dac 100644
--- a/libservices/CMakeLists.txt
+++ b/libservices/CMakeLists.txt
@@ -37,6 +37,7 @@ SET(MYSQLSERVICES_SOURCES
thd_timezone_service.c
thd_wait_service.c
wsrep_service.c
+ json_service.c
)
ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
diff --git a/libservices/json_service.c b/libservices/json_service.c
new file mode 100644
index 00000000000..96b3b3fa532
--- /dev/null
+++ b/libservices/json_service.c
@@ -0,0 +1,19 @@
+
+/* Copyright (c) 2018, Monty Program Ab
+
+ 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-1301 USA
+*/
+
+#include <service_versions.h>
+SERVICE_VERSION json_service= (void*)VERSION_json;
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index f36da7c8915..58c1efaebf1 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -45,3 +45,43 @@ INSTALL(FILES ${MAN1_CLIENT} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPag
INSTALL(FILES ${MAN1_DEVEL} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesDevelopment)
INSTALL(FILES ${MAN1_TEST} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesTest)
+macro(MARIADB_SYMLINK_MANPAGE)
+ list(LENGTH MARIADB_SYMLINK_FROMS _len)
+ math(EXPR _listlen "${_len}-1")
+
+ foreach(_index RANGE ${_listlen})
+ list(GET MARIADB_SYMLINK_FROMS ${_index} _name)
+
+ set(_manname "${_name}")
+ list(FIND MAN1_SERVER ${_manname}.1 _iman1server)
+ list(FIND MAN8_SERVER ${_manname}.8 _iman8server)
+ list(FIND MAN1_CLIENT ${_manname}.1 _iman1client)
+ list(FIND MAN1_DEVEL ${_manname}.1 _iman1devel)
+ list(FIND MAN1_TEST ${_manname}.1 _iman1test)
+
+ if (${_iman1server} GREATER -1)
+ MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesServer)
+ endif()
+ if (${_iman8server} GREATER -1)
+ MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 8 "man8" ManPagesServer)
+ endif()
+ if (${_iman1client} GREATER -1)
+ MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesClient)
+ endif()
+ if (${_iman1devel} GREATER -1)
+ MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesDevelopment)
+ endif()
+ if (${_iman1test} GREATER -1)
+ MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesTest)
+ endif()
+ endforeach(_index)
+endmacro(MARIADB_SYMLINK_MANPAGE)
+
+macro(MARIADB_SYMLINK_MANPAGE_CREATE mysqlname index mannr dir comp)
+ LIST(GET MARIADB_SYMLINK_TOS ${index} _mariadbname)
+ SET(dest "${CMAKE_CURRENT_BINARY_DIR}/${_mariadbname}.${mannr}")
+ FILE(WRITE ${dest} ".so ${mysqlname}.${mannr}")
+ INSTALL(FILES ${dest} DESTINATION ${INSTALL_MANDIR}/${dir} COMPONENT ${comp})
+endmacro(MARIADB_SYMLINK_MANPAGE_CREATE)
+
+MARIADB_SYMLINK_MANPAGE()
diff --git a/man/comp_err.1 b/man/comp_err.1
index 90d22fa6c2d..0eab8518903 100644
--- a/man/comp_err.1
+++ b/man/comp_err.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBCOMP_ERR\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBCOMP_ERR\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/galera_new_cluster.1 b/man/galera_new_cluster.1
index 134d289e94f..e3f7d6670a0 100644
--- a/man/galera_new_cluster.1
+++ b/man/galera_new_cluster.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBGALERA_NEW_CLUSTER\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBGALERA_NEW_CLUSTER\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/galera_recovery.1 b/man/galera_recovery.1
index a83a9e5d3cb..deb51f39cd9 100644
--- a/man/galera_recovery.1
+++ b/man/galera_recovery.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBGALERA_RECOVERY\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBGALERA_RECOVERY\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/innochecksum.1 b/man/innochecksum.1
index 7e0c548eb8c..8c63237c1e1 100644
--- a/man/innochecksum.1
+++ b/man/innochecksum.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBINNOCHECKSUM\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBINNOCHECKSUM\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mariabackup.1 b/man/mariabackup.1
index 865ff0b8111..f3f24db88cf 100644
--- a/man/mariabackup.1
+++ b/man/mariabackup.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMARIABACKUP\FR" "1" "29 March 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMARIABACKUP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mariadb-service-convert.1 b/man/mariadb-service-convert.1
index 448dbde5afd..a7c99f712e4 100644
--- a/man/mariadb-service-convert.1
+++ b/man/mariadb-service-convert.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMARIADB-SERVICE-CONVERT\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMARIADB-SERVICE-CONVERT\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mbstream.1 b/man/mbstream.1
index 5a3ab1e2867..7508aaf6326 100644
--- a/man/mbstream.1
+++ b/man/mbstream.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMBSTREAM\FR" "1" "29 March 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMBSTREAM\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/msql2mysql.1 b/man/msql2mysql.1
index 469ae476ca1..58829bc6d50 100644
--- a/man/msql2mysql.1
+++ b/man/msql2mysql.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMSQL2MYSQL\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMSQL2MYSQL\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1
index ca2de0336b7..7f11cdc2e66 100644
--- a/man/my_print_defaults.1
+++ b/man/my_print_defaults.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMY_PRINT_DEFAULTS" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMY_PRINT_DEFAULTS" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -74,14 +74,14 @@ Display a help message and exit\&.
.\}
.\" my_print_defaults: config-file option
.\" config-file option: my_print_defaults
-\fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR,
+\fB
.\" my_print_defaults: defaults-file option
.\" defaults-file option: my_print_defaults
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR,
\fB\-c \fR\fB\fIfile_name\fR\fR
.sp
Read only the given option file\&. If no extension is given, default extension(.ini or .cnf) will
-be used\&. \fB\-\-config-file\fR is deprecated, use \fB\-\-defaults\-file\fR instead\&. If \fB\-\-defaults\-file\fR is
+be used\&. If \fB\-\-defaults\-file\fR is
the first option, then read this file only, do not read global or per\-user config files; should be the first option.
.RE
.sp
@@ -118,11 +118,10 @@ string is
\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR,
.\" my_print_defaults: extra-file option
.\" extra-file option: my_print_defaults
-\fB\-\-extra\-file=\fR\fB\fIfile_name\fR\fR,
\fB\-e \fR\fB\fIfile_name\fR\fR
.sp
Read this option file after the global option file but (on Unix) before the user option
-file\&. Should be the first option\&. \fB\-\-extra\-file\fR is deprecated, use \fB\-\-defaults\-extra\-file\fR\&.
+file\&. Should be the first option\&.
.RE
.sp
.RS 4
diff --git a/man/my_safe_process.1 b/man/my_safe_process.1
index 4809124be70..296f2e43997 100644
--- a/man/my_safe_process.1
+++ b/man/my_safe_process.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMY_SAFE_PROCESS\FR" "1" "29 March 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMY_SAFE_PROCESS\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1
index 90b725071e6..239c89577d9 100644
--- a/man/myisam_ftdump.1
+++ b/man/myisam_ftdump.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYISAM_FTDUMP\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYISAM_FTDUMP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/myisamchk.1 b/man/myisamchk.1
index cb77291623a..f08d5b11a20 100644
--- a/man/myisamchk.1
+++ b/man/myisamchk.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYISAMCHK\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYISAMCHK\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/myisamlog.1 b/man/myisamlog.1
index 18ad95e5563..f46b09660d2 100644
--- a/man/myisamlog.1
+++ b/man/myisamlog.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYISAMLOG\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYISAMLOG\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/myisampack.1 b/man/myisampack.1
index a0691824430..10b5457aaf6 100644
--- a/man/myisampack.1
+++ b/man/myisampack.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYISAMPACK\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYISAMPACK\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1
index 609c3cc686a..816d4922607 100644
--- a/man/mysql-stress-test.pl.1
+++ b/man/mysql-stress-test.pl.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL\-STRESS\-TE" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL\-STRESS\-TE" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1
index 6ef197a9d66..ba92cf87d1c 100644
--- a/man/mysql-test-run.pl.1
+++ b/man/mysql-test-run.pl.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL\-TEST\-RUN\" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL\-TEST\-RUN\" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql.1 b/man/mysql.1
index 238106843ef..cf14a4287cb 100644
--- a/man/mysql.1
+++ b/man/mysql.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql.server.1 b/man/mysql.server.1
index 947178f3900..2f89b889a6d 100644
--- a/man/mysql.server.1
+++ b/man/mysql.server.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL\&.SERVER\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL\&.SERVER\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1
index fb191770c0b..9b29f595c4d 100644
--- a/man/mysql_client_test.1
+++ b/man/mysql_client_test.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_CLIENT_TEST" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_CLIENT_TEST" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_config.1 b/man/mysql_config.1
index 0ca69aa1d28..6664bfa6a0f 100644
--- a/man/mysql_config.1
+++ b/man/mysql_config.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_CONFIG\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_CONFIG\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1
index b03aa7db307..95aa46aacb6 100644
--- a/man/mysql_convert_table_format.1
+++ b/man/mysql_convert_table_format.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_CONVERT_TAB" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_CONVERT_TAB" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1
index 90512585415..73475da4e01 100644
--- a/man/mysql_find_rows.1
+++ b/man/mysql_find_rows.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_FIND_ROWS\F" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_FIND_ROWS\F" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1
index fb89d0b86ff..f817f2d70ba 100644
--- a/man/mysql_fix_extensions.1
+++ b/man/mysql_fix_extensions.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_FIX_EXTENSI" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_FIX_EXTENSI" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1
index cf0f22f5742..02dea4b0f90 100644
--- a/man/mysql_install_db.1
+++ b/man/mysql_install_db.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_INSTALL_DB\FR" "1" "4 April 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_INSTALL_DB\FR" "1" "4 April 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_ldb.1 b/man/mysql_ldb.1
index f29044a0aa6..fb60c382912 100644
--- a/man/mysql_ldb.1
+++ b/man/mysql_ldb.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_LDB\FR" "1" "29 March 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_LDB\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1
index 73787d54b9c..267110ed235 100644
--- a/man/mysql_plugin.1
+++ b/man/mysql_plugin.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_PLUGIN\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_PLUGIN\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1
index 9c952b6f4d2..6c9ad6e95f9 100644
--- a/man/mysql_secure_installation.1
+++ b/man/mysql_secure_installation.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_SECURE_INST" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_SECURE_INST" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1
index d8355668477..b91d1c93148 100644
--- a/man/mysql_setpermission.1
+++ b/man/mysql_setpermission.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_SETPERMISSI" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_SETPERMISSI" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1
index ef97591953d..a655e2f57d8 100644
--- a/man/mysql_tzinfo_to_sql.1
+++ b/man/mysql_tzinfo_to_sql.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_TZINFO_TO_S" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_TZINFO_TO_S" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1
index 39b19fcad91..62f13ae2e52 100644
--- a/man/mysql_upgrade.1
+++ b/man/mysql_upgrade.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_UPGRADE\FR" "1" "20 July 2020" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_UPGRADE\FR" "1" "20 July 2020" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1
index 03a4355f496..810f64aa6ab 100644
--- a/man/mysql_waitpid.1
+++ b/man/mysql_waitpid.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_WAITPID\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQL_WAITPID\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1
index ec6d8fd3427..cfd4cecdb1a 100644
--- a/man/mysqlaccess.1
+++ b/man/mysqlaccess.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLACCESS\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLACCESS\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqladmin.1 b/man/mysqladmin.1
index def74f2cae6..59c93f8caf0 100644
--- a/man/mysqladmin.1
+++ b/man/mysqladmin.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLADMIN\FR" "1" "28 December 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLADMIN\FR" "1" "27 June 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -1367,6 +1367,22 @@ Verify server's "Common Name" in its cert against hostname used when connecting.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqladmin: TLS Version option
+.\" TLS Version option: mysqladmin
+\fB\-\-tls\-version=\fR\fB\fIname\fR\fR,
+.sp
+Accepts a comma-separated list of TLS protocol versions\&. A TLS protocol version will only be enabled if it
+is present in this list\&. All other TLS protocol versions will not be permitted\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqladmin: user option
.\" user option: mysqladmin
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
@@ -1441,6 +1457,22 @@ If the connection cannot be established, wait and retry instead of aborting\&. I
\fIcount\fR
value is given, it indicates the number of times to retry\&. The default is one time\&.
.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: --wait-for-all-slaves option
+.\" --wait-for-all-slaves option: mysqladmin
+\fB\-\-wait\-for\-all\-slaves\fR
+.sp
+Wait for the last binlog event to be sent to all connected slaves before shutting down\&.
+This option is off by default\&.
+.RE
.PP
You can also set the following variables by using
\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
@@ -1477,7 +1509,7 @@ The maximum number of seconds to wait for server shutdown\&. The default value i
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2019 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1
index 6a382818ac6..675f51f7a8c 100644
--- a/man/mysqlbinlog.1
+++ b/man/mysqlbinlog.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLBINLOG\FR" "1" "14 April 2021" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLBINLOG\FR" "1" "14 April 2021" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1
index e3bdf3a71aa..946b9325404 100644
--- a/man/mysqlcheck.1
+++ b/man/mysqlcheck.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLCHECK\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLCHECK\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqld.8 b/man/mysqld.8
index 7d20e506cc4..a8ea2253d27 100644
--- a/man/mysqld.8
+++ b/man/mysqld.8
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLD\FR" "8" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLD\FR" "8" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1
index 36e56fb68c0..a886e9fc6fc 100644
--- a/man/mysqld_multi.1
+++ b/man/mysqld_multi.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLD_MULTI\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLD_MULTI\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1
index dbb50e11ac4..98e0c6ee81b 100644
--- a/man/mysqld_safe.1
+++ b/man/mysqld_safe.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLD_SAFE\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLD_SAFE\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqld_safe_helper.1 b/man/mysqld_safe_helper.1
index 1dd39df6276..68cd74152d5 100644
--- a/man/mysqld_safe_helper.1
+++ b/man/mysqld_safe_helper.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLD_SAFE_HELPER\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLD_SAFE_HELPER\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqldump.1 b/man/mysqldump.1
index 140bc45c7c6..f1d0ba73474 100644
--- a/man/mysqldump.1
+++ b/man/mysqldump.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLDUMP\FR" "1" "24 October 2020" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLDUMP\FR" "1" "24 October 2020" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1
index b4ca31cd674..0a0d95359f2 100644
--- a/man/mysqldumpslow.1
+++ b/man/mysqldumpslow.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLDUMPSLOW\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLDUMPSLOW\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1
index de3ac46849b..4719986a5a5 100644
--- a/man/mysqlhotcopy.1
+++ b/man/mysqlhotcopy.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLHOTCOPY\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLHOTCOPY\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqlimport.1 b/man/mysqlimport.1
index ed85824ee32..fa75fdde48d 100644
--- a/man/mysqlimport.1
+++ b/man/mysqlimport.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLIMPORT\FR" "1" "21 May 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLIMPORT\FR" "1" "21 May 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqlshow.1 b/man/mysqlshow.1
index 3deb4699104..866d6f1e8dc 100644
--- a/man/mysqlshow.1
+++ b/man/mysqlshow.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLSHOW\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLSHOW\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqlslap.1 b/man/mysqlslap.1
index 0bcfc9fdfa5..18100f70d49 100644
--- a/man/mysqlslap.1
+++ b/man/mysqlslap.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLSLAP\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLSLAP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/mysqltest.1 b/man/mysqltest.1
index 6e252e765cb..bb91f68021c 100644
--- a/man/mysqltest.1
+++ b/man/mysqltest.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQLTEST\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBMYSQLTEST\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/perror.1 b/man/perror.1
index 0da0e4c232b..fa77d382439 100644
--- a/man/perror.1
+++ b/man/perror.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBPERROR\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBPERROR\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/replace.1 b/man/replace.1
index f54dec43163..41b0a8fb71e 100644
--- a/man/replace.1
+++ b/man/replace.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBREPLACE\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBREPLACE\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1
index 8e13fbaa274..130ea1e915d 100644
--- a/man/resolve_stack_dump.1
+++ b/man/resolve_stack_dump.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBRESOLVE_STACK_DUM" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBRESOLVE_STACK_DUM" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/resolveip.1 b/man/resolveip.1
index 648e554c00c..46361eab2f8 100644
--- a/man/resolveip.1
+++ b/man/resolveip.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBRESOLVEIP\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBRESOLVEIP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/wsrep_sst_common.1 b/man/wsrep_sst_common.1
index df784e3fa19..606c668b004 100644
--- a/man/wsrep_sst_common.1
+++ b/man/wsrep_sst_common.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBWSREP_SST_COMMON\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBWSREP_SST_COMMON\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/wsrep_sst_mariabackup.1 b/man/wsrep_sst_mariabackup.1
index 1dadf705b96..225cc728fad 100644
--- a/man/wsrep_sst_mariabackup.1
+++ b/man/wsrep_sst_mariabackup.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBWSREP_SST_MARIABACKUP\FR" "1" "29 March 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBWSREP_SST_MARIABACKUP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/wsrep_sst_mysqldump.1 b/man/wsrep_sst_mysqldump.1
index c203d1bdc91..d6ab1a01b4c 100644
--- a/man/wsrep_sst_mysqldump.1
+++ b/man/wsrep_sst_mysqldump.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBWSREP_SST_MYSQLDUMP\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBWSREP_SST_MYSQLDUMP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/wsrep_sst_rsync.1 b/man/wsrep_sst_rsync.1
index bbaeb64016e..ca3451a8998 100644
--- a/man/wsrep_sst_rsync.1
+++ b/man/wsrep_sst_rsync.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBWSREP_SST_RSYNC\FR" "1" "9 August 2018" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBWSREP_SST_RSYNC\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/man/wsrep_sst_rsync_wan.1 b/man/wsrep_sst_rsync_wan.1
index 00b5f7572f7..81bbf27305f 100644
--- a/man/wsrep_sst_rsync_wan.1
+++ b/man/wsrep_sst_rsync_wan.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBWSREP_SST_RSYNC_WAN\FR" "1" "29 March 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBWSREP_SST_RSYNC_WAN\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/mysql-test/collections/smoke_test b/mysql-test/collections/smoke_test
index ee360a06c2a..6a9df661c4f 100644
--- a/mysql-test/collections/smoke_test
+++ b/mysql-test/collections/smoke_test
@@ -142,3 +142,5 @@ compat/maxdb.rpl_mariadb_timestamp
sql_sequence.mysqldump
versioning.simple
versioning.trx_id
+period.versioning
+plugins.multiauth
diff --git a/mysql-test/include/add_anonymous_users.inc b/mysql-test/include/add_anonymous_users.inc
index 635a80e3dee..86ce529d1e2 100644
--- a/mysql-test/include/add_anonymous_users.inc
+++ b/mysql-test/include/add_anonymous_users.inc
@@ -1,7 +1,7 @@
# Allow anonymous users to connect
disable_warnings;
disable_query_log;
-INSERT IGNORE INTO mysql.user (host, user) VALUES ('localhost','');
+INSERT IGNORE INTO mysql.global_priv (host, user) VALUES ('localhost','');
FLUSH PRIVILEGES;
enable_query_log;
enable_warnings;
diff --git a/mysql-test/include/analyze-format.inc b/mysql-test/include/analyze-format.inc
index 65e61b81582..08006e26c79 100644
--- a/mysql-test/include/analyze-format.inc
+++ b/mysql-test/include/analyze-format.inc
@@ -1,3 +1,3 @@
# The time on ANALYSE FORMAT=JSON is rather variable
---replace_regex /("(r_total_time_ms|r_buffer_size)": )[^, \n]*/\1"REPLACED"/
+--replace_regex /("(r_total_time_ms|r_buffer_size|r_filling_time_ms)": )[^, \n]*/\1"REPLACED"/
diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test
index 44aa4472cba..191feae1628 100644
--- a/mysql-test/include/check-testcase.test
+++ b/mysql-test/include/check-testcase.test
@@ -81,6 +81,18 @@ if (!$tmp) {
SHOW SLAVE STATUS;
}
+#
+# Ensure that we don't get warnings from mysql.proc (used by check_mysqld)
+#
+
+--disable_query_log
+--disable_warnings
+--disable_result_log
+select count(*) from mysql.proc;
+--enable_result_log
+--enable_warnings
+--enable_query_log
+
call mtr.check_testcase();
let $datadir=`select @@datadir`;
@@ -91,5 +103,56 @@ cat_file $datadir.tempfiles.txt;
remove_file $datadir.tempfiles.txt;
list_files $datadir/mysql #sql*;
+#
+# Check that SHOW ENGINE INNODB STATUS does not show any active transactions
+# We do this only if wsrep provider is loaded, to avoid disturbing any non-Galera MTR tests
+#
+if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) {
+ if (`SELECT @@wsrep_on`) {
+ if (`SELECT COUNT(*) FROM information_schema.innodb_trx WHERE trx_mysql_thread_id != 0`) {
+ if ($before) {
+ --echo Before test start.
+ }
+ if (!$before) {
+ --echo After test end.
+ }
+ --echo There is one or more active InnoDB transaction(s) when there should be none. Dumping some diagnostics.
+
+ --let $status_locks = `SELECT @@innodb_status_output_locks`
+ --let $status_output = `SELECT @@innodb_status_output`
+ --enable_query_log
+ SET GLOBAL innodb_status_output_locks=ON;
+ SHOW ENGINE INNODB STATUS;
+ --disable_query_log
+ --eval SET GLOBAL innodb_status_output_locks=$status_locks;
+ --eval SET GLOBAL innodb_status_output=$status_output;
+ --enable_query_log
+
+ --vertical_results
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.processlist;
+
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.innodb_trx;
+
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.innodb_locks;
+
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.innodb_lock_waits;
+ --horizontal_results
+ --disable_query_log
+ }
+ }
+}
+
--enable_query_log
diff --git a/mysql-test/include/check_ftwrl_incompatible.inc b/mysql-test/include/check_ftwrl_incompatible.inc
index 4787a69ea9c..a7e87c3750b 100644
--- a/mysql-test/include/check_ftwrl_incompatible.inc
+++ b/mysql-test/include/check_ftwrl_incompatible.inc
@@ -68,8 +68,7 @@ connection $con_aux1;
--enable_query_log
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where (state = "Waiting for global read lock" or
- state = "Waiting for commit lock") and
+ where state = "Waiting for backup lock" and
info = "$statement";
--source include/wait_condition.inc
--disable_result_log
@@ -116,8 +115,7 @@ connection $con_aux2;
--enable_query_log
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where (state = "Waiting for global read lock" or
- state = "Waiting for commit lock") and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
--disable_result_log
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc
index 07298b1d47b..889c80cc477 100644
--- a/mysql-test/include/ctype_numconv.inc
+++ b/mysql-test/include/ctype_numconv.inc
@@ -194,12 +194,12 @@ show create table t1;
drop table t1;
select hex(concat(ceiling(0.5)));
-create table t1 as select concat(ceiling(0.5)) as c1;
+create table t1 as select ceiling(0.5) as c0, concat(ceiling(0.5)) as c1;
show create table t1;
drop table t1;
select hex(concat(floor(0.5)));
-create table t1 as select concat(floor(0.5)) as c1;
+create table t1 as select floor(0.5) as c0, concat(floor(0.5)) as c1;
show create table t1;
drop table t1;
diff --git a/mysql-test/include/deadlock.inc b/mysql-test/include/deadlock.inc
index 2fa61f48624..7ac2a16fc44 100644
--- a/mysql-test/include/deadlock.inc
+++ b/mysql-test/include/deadlock.inc
@@ -94,7 +94,7 @@ insert into t2 values(0, 0), (1, 20), (2, 30);
commit;
connection con1;
-select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE;
+select a,b from t2 UNION (SELECT id, x from t1 FOR UPDATE);
select * from t2;
select * from t1;
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index cd9b65a5ce3..387a144bacb 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -107,6 +107,7 @@ loose-performance-schema-consumer-thread-instrumentation=ON
binlog-direct-non-transactional-updates
default-storage-engine=myisam
+use_stat_tables=preferably
loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
diff --git a/mysql-test/include/default_optimizer_switch.inc b/mysql-test/include/default_optimizer_switch.inc
index e9c804be548..8634c2eee22 100644
--- a/mysql-test/include/default_optimizer_switch.inc
+++ b/mysql-test/include/default_optimizer_switch.inc
@@ -8,9 +8,9 @@
set @save_optimizer_switch=@@optimizer_switch;
set @save_join_cache_level=@@join_cache_level;
-set optimizer_switch="index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on";
+set optimizer_switch="index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on";
-set optimizer_use_condition_selectivity=1;
+set optimizer_use_condition_selectivity=4;
set optimizer_search_depth=62;
set join_buffer_space_limit=2097152;
set join_cache_level=2;
diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc
index b5ee4db0e8f..a29156cfce9 100644
--- a/mysql-test/include/diff_tables.inc
+++ b/mysql-test/include/diff_tables.inc
@@ -167,7 +167,7 @@ while ($_dt_tables)
# the table to a file.
--let $_dt_outfile= `SELECT @@datadir`
--let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table
- eval SELECT * FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list` INTO OUTFILE '$_dt_outfile';
+ eval SELECT * INTO OUTFILE '$_dt_outfile' FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list`;
# Compare files.
if ($_dt_prev_outfile)
diff --git a/mysql-test/include/explain_non_select.inc b/mysql-test/include/explain_non_select.inc
index 57b96994d20..d22310c9813 100644
--- a/mysql-test/include/explain_non_select.inc
+++ b/mysql-test/include/explain_non_select.inc
@@ -158,7 +158,7 @@ CREATE TABLE t1 ( a int PRIMARY KEY );
--let $query = DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a
--let $select = SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a
--source include/explain_utils.inc
-INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (1), (2), (3), (-1), (-2), (-3);
--let $query = DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a
--let $select = SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a
--source include/explain_utils.inc
@@ -640,7 +640,7 @@ DROP VIEW v1;
--echo #63
CREATE TABLE t1 (a INT, PRIMARY KEY(a));
-INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9);
CREATE VIEW v1 (a) AS SELECT a FROM t1;
--let $query = DELETE FROM v1 WHERE a < 4
--let $select = SELECT * FROM v1 WHERE a < 4
diff --git a/mysql-test/include/galera_cluster.inc b/mysql-test/include/galera_cluster.inc
index c1834c3c26f..7f76ea59c7f 100644
--- a/mysql-test/include/galera_cluster.inc
+++ b/mysql-test/include/galera_cluster.inc
@@ -8,5 +8,11 @@
--let $galera_cluster_size = 2
--source include/galera_init.inc
+--source include/have_innodb.inc
+--source include/galera_wait_ready.inc
+--connection node_2
+--source include/galera_wait_ready.inc
--source include/have_innodb.inc
+
+--connection node_1
diff --git a/mysql-test/include/galera_no_debug_sync.inc b/mysql-test/include/galera_no_debug_sync.inc
new file mode 100644
index 00000000000..0819144c0b6
--- /dev/null
+++ b/mysql-test/include/galera_no_debug_sync.inc
@@ -0,0 +1,9 @@
+--disable_query_log
+
+--let $galera_have_debug_sync = `SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters'`
+
+--if ($galera_have_debug_sync) {
+ --skip Test requires Galera debug library with no debug_sync functionality
+}
+
+--enable_query_log
diff --git a/mysql-test/include/galera_variables_ok.inc b/mysql-test/include/galera_variables_ok.inc
new file mode 100644
index 00000000000..82c5174bc14
--- /dev/null
+++ b/mysql-test/include/galera_variables_ok.inc
@@ -0,0 +1,9 @@
+--disable_query_log
+
+--let $galera_variables_ok = `SELECT COUNT(*) = 49 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
+
+--if (!$galera_variables_ok) {
+ --skip Galera number of variables has changed!
+}
+
+--enable_query_log
diff --git a/mysql-test/include/galera_variables_ok_debug.inc b/mysql-test/include/galera_variables_ok_debug.inc
new file mode 100644
index 00000000000..c9a54724c17
--- /dev/null
+++ b/mysql-test/include/galera_variables_ok_debug.inc
@@ -0,0 +1,9 @@
+--disable_query_log
+
+--let $galera_variables_ok = `SELECT COUNT(*) = 50 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
+
+--if (!$galera_variables_ok) {
+ --skip Galera number of variables has changed!
+}
+
+--enable_query_log
diff --git a/mysql-test/include/galera_wait_sync_point.inc b/mysql-test/include/galera_wait_sync_point.inc
index cf3a4980186..c0951b220b4 100644
--- a/mysql-test/include/galera_wait_sync_point.inc
+++ b/mysql-test/include/galera_wait_sync_point.inc
@@ -1,6 +1,17 @@
--let $wait_timeout = 10
--let $wsrep_on_orig = `SELECT @@wsrep_on`
SET SESSION wsrep_on = 0;
+
+#
+# following is only for debugging purposes
+# should be commented out when test wporks as planned
+#
+#--sleep 1
+# SHOW PROCESSLIST;
+#SHOW STATUS LIKE 'wsrep_%';
+#--echo $galera_sync_point
+
--let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters' AND VARIABLE_VALUE = '$galera_sync_point'
--source include/wait_condition.inc
--eval SET SESSION wsrep_on = $wsrep_on_orig
+
diff --git a/mysql-test/include/gis_keys.inc b/mysql-test/include/gis_keys.inc
index cc8ec68f7d1..388c7b45898 100644
--- a/mysql-test/include/gis_keys.inc
+++ b/mysql-test/include/gis_keys.inc
@@ -27,8 +27,8 @@ SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
# the "most rows covered" rule doesn't kick in anymore
# now EXPLAIN shows the index used on the table
# and we're getting the wrong result again
-INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
-INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)'));
EXPLAIN
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
diff --git a/mysql-test/include/have_auth_named_pipe.inc b/mysql-test/include/have_auth_named_pipe.inc
new file mode 100644
index 00000000000..4f4bf37f11e
--- /dev/null
+++ b/mysql-test/include/have_auth_named_pipe.inc
@@ -0,0 +1,13 @@
+--source include/not_embedded.inc
+
+if (!$AUTH_NAMED_PIPE_SO) {
+ skip No auth_named_pipe plugin;
+}
+
+if (!$USERNAME) {
+ skip USER variable is undefined;
+}
+
+if (`SELECT count(*) <> 0 FROM mysql.user WHERE user = '$USERNAME'`) {
+ skip %USERNAME%=$USER which exists in mysql.user;
+}
diff --git a/mysql-test/include/have_garbd.inc b/mysql-test/include/have_garbd.inc
deleted file mode 100644
index 0dd693f2c63..00000000000
--- a/mysql-test/include/have_garbd.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# suite.pm will make sure that all tests including this file
-# will be skipped as needed
-#
diff --git a/mysql-test/include/have_mariabackup.inc b/mysql-test/include/have_mariabackup.inc
index 0dd693f2c63..6c4ad240172 100644
--- a/mysql-test/include/have_mariabackup.inc
+++ b/mysql-test/include/have_mariabackup.inc
@@ -1,4 +1,7 @@
-#
-# suite.pm will make sure that all tests including this file
-# will be skipped as needed
-#
+if (!$XTRABACKUP) {
+ skip Needs mariabackup;
+}
+
+if (!$MTR_GALERA_TFMT) {
+ skip Needs socat or nc;
+}
diff --git a/mysql-test/include/have_unix_socket.inc b/mysql-test/include/have_unix_socket.inc
index 4246b138e9d..7be828ac384 100644
--- a/mysql-test/include/have_unix_socket.inc
+++ b/mysql-test/include/have_unix_socket.inc
@@ -1,7 +1,8 @@
--source include/not_embedded.inc
-if (!$AUTH_SOCKET_SO) {
- skip No unix_socket plugin;
+if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'unix_socket' and plugin_status='active'`)
+{
+ --skip Needs unix_socket plugin
}
if (!$USER) {
diff --git a/mysql-test/include/have_unix_socket.opt b/mysql-test/include/have_unix_socket.opt
new file mode 100644
index 00000000000..460e3a26ae2
--- /dev/null
+++ b/mysql-test/include/have_unix_socket.opt
@@ -0,0 +1 @@
+--plugin-load-add=$AUTH_SOCKET_SO --loose-enable-unix-socket
diff --git a/mysql-test/include/have_wsrep_enabled.inc b/mysql-test/include/have_wsrep_enabled.inc
index 9287369c87c..7eb8b4372cf 100644
--- a/mysql-test/include/have_wsrep_enabled.inc
+++ b/mysql-test/include/have_wsrep_enabled.inc
@@ -1,7 +1,6 @@
# To be used in a test which requires wsrep plugin to be ACTIVE and enabled
# (i.e. wsrep_on=ON). It includes have_wsrep.inc.
---source include/have_wsrep.inc
--source include/have_innodb.inc
if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_on' AND VARIABLE_VALUE='ON'`)
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc
index f29088887d0..66fdc3e754c 100644
--- a/mysql-test/include/icp_tests.inc
+++ b/mysql-test/include/icp_tests.inc
@@ -226,6 +226,7 @@ EXPLAIN
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
+--replace_column 9 100
EXPLAIN
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' or i1 > 2;
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' or i1 > 2;
@@ -483,11 +484,11 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES (1,9),(2,7),(3,6),(4,3),(5,1);
-EXPLAIN SELECT pk, c1 FROM t1 WHERE pk <> 3;
+EXPLAIN SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
SET SESSION optimizer_switch='index_condition_pushdown=off';
-SELECT pk, c1 FROM t1 WHERE pk <> 3;
+SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
DROP TABLE t1;
@@ -633,6 +634,8 @@ CREATE TABLE t2 (
);
INSERT INTO t2 VALUES (4,1);
+ANALYZE TABLE t1,t2;
+
EXPLAIN
SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
WHERE t2.pk <> t1.d1 AND t2.pk = 4;
@@ -690,6 +693,7 @@ INSERT INTO t1 VALUES
('fkxdmbdkpjdanpje','o'), ('f','Pennsylvan'), ('Virginia','ei');
SET SESSION optimizer_switch='index_condition_pushdown=off';
+--replace_column 9 #
EXPLAIN
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
@@ -699,6 +703,7 @@ SELECT * FROM t1
ORDER BY a;
SET SESSION optimizer_switch='index_condition_pushdown=on';
+--replace_column 9 #
EXPLAIN
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
@@ -722,16 +727,16 @@ INSERT INTO t2 VALUES
SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
SET SESSION optimizer_switch='index_condition_pushdown=on';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
DROP TABLE t1,t2;
@@ -840,6 +845,8 @@ INSERT INTO t2 (g,h) VALUES
(3,'e'),(1,'u'),(4,'v'),(9,'u'),(6,'i'),(1,'x'),
(7,'f'),(5,'j'),(3,'e'),(1,'u'),(4,'v'),(9,'u');
+ANALYZE TABLE t1,t2;
+
SET @save_optimize_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on';
diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc
index ebadb5077ae..fdd87f85ef5 100644
--- a/mysql-test/include/index_merge1.inc
+++ b/mysql-test/include/index_merge1.inc
@@ -40,12 +40,12 @@ update t0 set key2=key1,key3=key1,key4=key1,key5=key1,key6=key1,key7=key1,key8=1
analyze table t0;
# 1. One index
-explain select * from t0 where key1 < 3 or key1 > 1020;
+explain select * from t0 where key1 < 3 or key1 > 920 and key1 < 924;
# 2. Simple cases
explain
-select * from t0 where key1 < 3 or key2 > 1020;
-select * from t0 where key1 < 3 or key2 > 1020;
+select * from t0 where key1 < 3 or key2 > 920 and key2 < 924;
+select * from t0 where key1 < 3 or key2 > 920 and key2 < 924;
select * from t0 where key1=1022; # MDEV-13535 no-key-read select after keyread
@@ -98,7 +98,6 @@ select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4);
select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4);
-
explain select * from t0 where
(key1 < 3 or key2 < 3) and (key3 < 4 or key4 < 4) and (key5 < 2 or key6 < 2);
@@ -129,6 +128,10 @@ select * from t0 where
key1 < 7;
# tree_or(List<SEL_IMERGE>, List<SEL_IMERGE>).
+select count(*) from t0 where
+ ((key1 < 4 or key2 < 4) and (key3 <5 or key5 < 4))
+ or
+ ((key5 < 5 or key6 < 6) and (key7 <7 or key8 < 4));
explain select * from t0 where
((key1 < 4 or key2 < 4) and (key3 <5 or key5 < 4))
or
@@ -469,6 +472,7 @@ create table t2(
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
insert into t2 select * from t1;
+
--echo must use sort-union rather than union:
--replace_column 9 #
explain select * from t1 where a=4 or b=4;
@@ -479,9 +483,9 @@ select * from t1 ignore index(a,b) where a=4 or b=4;
--echo must use union, not sort-union:
--replace_column 9 #
-explain select * from t2 where a=4 or b=4;
+explain select * from t2 where a=2 or b=2;
--sorted_result
-select * from t2 where a=4 or b=4;
+select * from t2 where a=2 or b=2;
drop table t1, t2;
diff --git a/mysql-test/include/innodb_checksum_algorithm.combinations b/mysql-test/include/innodb_checksum_algorithm.combinations
new file mode 100644
index 00000000000..fd237e1190a
--- /dev/null
+++ b/mysql-test/include/innodb_checksum_algorithm.combinations
@@ -0,0 +1,11 @@
+[crc32]
+--innodb-checksum-algorithm=crc32
+
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[full_crc32]
+--innodb-checksum-algorithm=full_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/include/innodb_checksum_algorithm.inc b/mysql-test/include/innodb_checksum_algorithm.inc
new file mode 100644
index 00000000000..c841fece702
--- /dev/null
+++ b/mysql-test/include/innodb_checksum_algorithm.inc
@@ -0,0 +1 @@
+--source include/have_innodb.inc
diff --git a/mysql-test/include/install_plugin_if_exists.inc b/mysql-test/include/install_plugin_if_exists.inc
new file mode 100644
index 00000000000..c641f020deb
--- /dev/null
+++ b/mysql-test/include/install_plugin_if_exists.inc
@@ -0,0 +1,45 @@
+--echo #
+--echo # MDEV-16294: INSTALL PLUGIN IF NOT EXISTS / UNINSTALL PLUGIN IF EXISTS
+--echo #
+--echo # INSTALL IF NOT EXISTS PLUGIN name SONAME library /
+--echo # UNINSTALL IF EXISTS PLUGIN|SONAME name
+--echo #
+
+if (!$HA_EXAMPLE_SO) {
+ skip Needs ha_example plugin;
+}
+
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+--replace_regex /\.dll/.so/
+--error ER_PLUGIN_INSTALLED
+INSTALL PLUGIN example SONAME 'ha_example';
+
+INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
+SHOW WARNINGS;
+
+UNINSTALL PLUGIN IF EXISTS example;
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+UNINSTALL PLUGIN IF EXISTS example;
+SHOW WARNINGS;
+
+--error ER_SP_DOES_NOT_EXIST
+UNINSTALL PLUGIN example;
+
+INSTALL SONAME 'ha_example';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+UNINSTALL SONAME IF EXISTS 'ha_example';
+
+--replace_regex /\.dll/.so/
+UNINSTALL SONAME IF EXISTS 'ha_example';
+--replace_regex /\.dll/.so/
+SHOW WARNINGS;
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+--replace_regex /\.dll/.so/
+--error ER_SP_DOES_NOT_EXIST
+UNINSTALL SONAME 'ha_example';
diff --git a/mysql-test/include/kill_galera.inc b/mysql-test/include/kill_galera.inc
new file mode 100644
index 00000000000..d7f665df6c7
--- /dev/null
+++ b/mysql-test/include/kill_galera.inc
@@ -0,0 +1,20 @@
+--echo Killing server ...
+
+# Write file to make mysql-test-run.pl expect the crash, but don't start it
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+--exec echo "wait" > $_expect_file_name
+
+# Kill the connected server
+--disable_reconnect
+--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
+
+--perl
+ my $pid_filename = $ENV{'KILL_NODE_PIDFILE'};
+ my $mysqld_pid = `cat $pid_filename`;
+ chomp($mysqld_pid);
+ system("kill -9 $mysqld_pid");
+ exit(0);
+EOF
+
+--source include/wait_until_disconnected.inc
diff --git a/mysql-test/include/maria_empty_logs.inc b/mysql-test/include/maria_empty_logs.inc
index 78a08228caa..f1835c0d2c3 100644
--- a/mysql-test/include/maria_empty_logs.inc
+++ b/mysql-test/include/maria_empty_logs.inc
@@ -92,3 +92,15 @@ connection default;
--disable_query_log
eval use $default_db;
--enable_query_log
+
+#
+# Ensure that we don't get warnings from mysql.priv (used by check_mysqld)
+# or test running after this one.
+#
+--disable_query_log
+--disable_warnings
+--disable_result_log
+show table status from mysql;
+--enable_result_log
+--enable_warnings
+--enable_query_log
diff --git a/mysql-test/include/maria_verify_recovery.inc b/mysql-test/include/maria_verify_recovery.inc
index b0f95d2a94b..bb782d5f4cc 100644
--- a/mysql-test/include/maria_verify_recovery.inc
+++ b/mysql-test/include/maria_verify_recovery.inc
@@ -97,3 +97,15 @@ while ($mms_table_to_use)
connection default;
# the effect of "use" is lost after a restart so we are back into db "test"
use mysqltest;
+
+#
+# Ensure that we don't get warnings from mysql.proc (used by check_mysqld)
+#
+
+--disable_query_log
+--disable_warnings
+--disable_result_log
+select count(*) from mysql.proc;
+--enable_result_log
+--enable_warnings
+--enable_query_log
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index 6a47b39e5bc..30b17c2e063 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -455,6 +455,16 @@ INSERT INTO t1(id, dept, age, name) VALUES
(4011, 'cs7', 10, 'rs4'), (4012, 'cs8', 20, 'rs4'), (4019, 'cs9', 10, 'rs5'),
(4020, 'cs10', 20, 'rs5'),(4027, 'cs11', 10, 'rs6'),(4028, 'cs12', 20, 'rs6');
+set
+ @tmp_uss=@@use_stat_tables,
+ @tmp_occ=@@optimizer_use_condition_selectivity;
+set
+ use_stat_tables='preferably',
+ optimizer_use_condition_selectivity=4;
+
+analyze table t1 persistent for all;
+flush tables;
+
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
DELETE FROM t1;
@@ -464,6 +474,9 @@ EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
DROP TABLE t1;
+set
+ use_stat_tables=@tmp_uss,
+ optimizer_use_condition_selectivity=@tmp_occ;
--source include/innodb_rollback_on_timeout.inc
diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql
index e8cdd1789db..76cd06e5d38 100644
--- a/mysql-test/include/mtr_check.sql
+++ b/mysql-test/include/mtr_check.sql
@@ -86,7 +86,6 @@ BEGIN
mysql.help_category,
mysql.help_keyword,
mysql.help_relation,
- mysql.host,
mysql.plugin,
mysql.proc,
mysql.procs_priv,
@@ -97,7 +96,7 @@ BEGIN
mysql.time_zone_name,
mysql.time_zone_transition,
mysql.time_zone_transition_type,
- mysql.user;
+ mysql.global_priv;
-- verify that no plugin changed its disabled/enabled state
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
diff --git a/mysql-test/include/not_asan.inc b/mysql-test/include/not_asan.inc
new file mode 100644
index 00000000000..9fc86a8525a
--- /dev/null
+++ b/mysql-test/include/not_asan.inc
@@ -0,0 +1,8 @@
+# This file should only be used with test that finds bugs in ASan that can not
+# be overcome. In normal cases one should fix the bug server/test case or in
+# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
+
+if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value="ASAN"`)
+{
+--skip Can't be run with ASan
+}
diff --git a/mysql-test/include/not_ubsan.inc b/mysql-test/include/not_ubsan.inc
new file mode 100644
index 00000000000..809f505507e
--- /dev/null
+++ b/mysql-test/include/not_ubsan.inc
@@ -0,0 +1,8 @@
+# This file should only be used with test that finds bugs in ASan that can not
+# be overcome. In normal cases one should fix the bug server/test case or in
+# the worst case add a (temporary?) suppression in asan.supp or lsan.supp
+
+if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value="UBSAN"`)
+{
+--skip Can't be run with UBSAN
+}
diff --git a/mysql-test/include/rowid_filter_debug_kill.inc b/mysql-test/include/rowid_filter_debug_kill.inc
new file mode 100644
index 00000000000..6a8c5d3f70d
--- /dev/null
+++ b/mysql-test/include/rowid_filter_debug_kill.inc
@@ -0,0 +1,68 @@
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/count_sessions.inc
+
+--echo #
+--echo # MDEV-22761 KILL QUERY during rowid_filter, crashes
+--echo #
+
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
+
+# 100 rows
+create table t2(a int);
+insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
+
+# 10K rows
+CREATE TABLE t3 (
+ key1 int ,
+ key2 int,
+ filler varchar(255),
+ KEY (key1),
+ KEY (key2)
+);
+select engine from information_schema.tables
+where table_schema=database() and table_name='t3';
+
+insert into t3
+select
+ A.a,
+ A.a,
+ 'filler-data-filler-data'
+from
+ t0 A, t1 B;
+
+analyze table t2,t3;
+
+explain
+select * from t2, t3
+where
+ t3.key1=t2.a and t3.key2 in (2,3);
+
+let $target_id= `select connection_id()`;
+
+set debug_sync='handler_rowid_filter_check SIGNAL at_rowid_filter_check WAIT_FOR go';
+send
+select * from t2, t3
+where
+ t3.key1=t2.a and t3.key2 in (2,3);
+
+connect (con1, localhost, root,,);
+connection con1;
+set debug_sync='now WAIT_FOR at_rowid_filter_check';
+evalp kill query $target_id;
+set debug_sync='now SIGNAL go';
+
+connection default;
+disconnect con1;
+
+--error ER_QUERY_INTERRUPTED
+reap;
+set debug_sync='RESET';
+
+drop table t0,t1,t2,t3;
+--source include/wait_until_count_sessions.inc
+
diff --git a/mysql-test/include/start_mysqld.inc b/mysql-test/include/start_mysqld.inc
index e31f26aad8c..b4fe116fe86 100644
--- a/mysql-test/include/start_mysqld.inc
+++ b/mysql-test/include/start_mysqld.inc
@@ -1,13 +1,37 @@
# Include this script only after using shutdown_mysqld.inc
# where $_expect_file_name was initialized.
# Write file to make mysql-test-run.pl start up the server again
+
+# restart_noprint defines how much is printed to the .result file
+# if 0 (default) then '# result' and restart_parameters are printed
+# if 1 then print #result but not the content of restart_parameters
+# if 2 then nothing is printed
+
+if (!$restart_noprint)
+{
+ --let $restart_noprint=0
+}
+
if ($restart_parameters)
{
--exec echo "restart: $restart_parameters" > $_expect_file_name
+ if (!$restart_noprint)
+ {
+ --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+ --exec echo "# restart: $restart_parameters"
+ }
+ if ($restart_noprint == 1)
+ {
+ --exec echo "# restart: with restart_parameters"
+ }
}
if (!$restart_parameters)
{
--exec echo "restart" > $_expect_file_name
+ if ($restart_noprint < 2)
+ {
+ --exec echo "# restart"
+ }
}
# Turn on reconnect
@@ -18,4 +42,3 @@ if (!$restart_parameters)
# Turn off reconnect again
--disable_reconnect
-
diff --git a/mysql-test/include/switch_to_mysql_global_priv.inc b/mysql-test/include/switch_to_mysql_global_priv.inc
new file mode 100644
index 00000000000..3a93746c4e8
--- /dev/null
+++ b/mysql-test/include/switch_to_mysql_global_priv.inc
@@ -0,0 +1,7 @@
+echo # switching back from mysql.user to mysql.global_priv;
+disable_query_log;
+drop table mysql.user;
+rename table mysql.user_bak to mysql.user;
+rename table mysql.global_priv_bak to mysql.global_priv;
+flush privileges;
+enable_query_log;
diff --git a/mysql-test/include/switch_to_mysql_user.inc b/mysql-test/include/switch_to_mysql_user.inc
new file mode 100644
index 00000000000..7e5e460390c
--- /dev/null
+++ b/mysql-test/include/switch_to_mysql_user.inc
@@ -0,0 +1,57 @@
+echo # switching from mysql.global_priv to mysql.user;
+disable_query_log;
+rename table mysql.user to mysql.user_bak;
+CREATE TABLE mysql.user (
+ Host char(60) binary DEFAULT '' NOT NULL,
+ User char(80) binary DEFAULT '' NOT NULL,
+ Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL,
+ Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ ssl_type enum('','ANY','X509','SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ ssl_cipher BLOB NOT NULL,
+ x509_issuer BLOB NOT NULL,
+ x509_subject BLOB NOT NULL,
+ max_questions int(11) unsigned DEFAULT 0 NOT NULL,
+ max_updates int(11) unsigned DEFAULT 0 NOT NULL,
+ max_connections int(11) unsigned DEFAULT 0 NOT NULL,
+ max_user_connections int(11) DEFAULT 0 NOT NULL,
+ plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
+ authentication_string TEXT NOT NULL,
+ password_expired ENUM('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ is_role enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ default_role char(80) binary DEFAULT '' NOT NULL,
+ max_statement_time decimal(12,6) DEFAULT 0 NOT NULL,
+ PRIMARY KEY (Host,User)
+) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+insert mysql.user select * from mysql.user_bak;
+rename table mysql.global_priv to mysql.global_priv_bak;
+flush privileges;
+enable_query_log;
diff --git a/mysql-test/include/system_db_struct.inc b/mysql-test/include/system_db_struct.inc
index 9467c023dba..d043d209850 100644
--- a/mysql-test/include/system_db_struct.inc
+++ b/mysql-test/include/system_db_struct.inc
@@ -5,9 +5,9 @@
-- replace_result Tables_in_mysql Tables_in_db Tables_in_test Tables_in_db
show tables;
show create table db;
-show create table host;
show create table user;
show create table func;
+show create table global_priv;
show create table tables_priv;
show create table columns_priv;
show create table procs_priv;
diff --git a/mysql-test/include/type_hrtime.inc b/mysql-test/include/type_hrtime.inc
index 55fd3d665fe..128e3295133 100644
--- a/mysql-test/include/type_hrtime.inc
+++ b/mysql-test/include/type_hrtime.inc
@@ -18,7 +18,7 @@ insert t1 values (20101211030405.789e0);
insert ignore t1 values (99991231235959e1);
select * from t1;
--replace_regex /121000/121094/ /457000/457031/ /789000/789062/
-select truncate(a, 6) from t1; # Field::val_real()
+select cast(a AS double(30,6)) from t1; # Field::val_real()
select a DIV 1 from t1; # Field::val_int()
select group_concat(distinct a) from t1; # Field::cmp()
alter table t1 engine=innodb;
@@ -55,6 +55,12 @@ select * from t1;
delete from t1 where a < 20110101;
select * from t1;
+if ($type == time)
+{
+delete from t1 where a is not null;
+select * from t1;
+}
+
#
# create ... select
#
diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc
index 26168d10558..15a1e5bf847 100644
--- a/mysql-test/include/wait_until_connected_again.inc
+++ b/mysql-test/include/wait_until_connected_again.inc
@@ -11,7 +11,7 @@ let $counter= 5000;
let $mysql_errno= 9999;
while ($mysql_errno)
{
- --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
+ --error 0,ER_ACCESS_DENIED_ERROR,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
show status;
dec $counter;
@@ -19,13 +19,18 @@ while ($mysql_errno)
{
--die Server failed to restart
}
+ if (!$mysql_errno)
+ {
+ # WSREP: SHOW STATUS queries are allowed even if wsrep
+ # is not ready. Make sure wsrep is ready before
+ # returning from this script
+ source include/wait_wsrep_ready.inc;
+ }
+ if ($mysql_errno == 1045)
+ {
+ let $mysql_errno=0;
+ }
--sleep 0.1
}
--enable_query_log
--enable_result_log
-
-# WSREP: SHOW STATUS queries are allowed even if wsrep
-# is not ready. Make sure wsrep is ready before
-# returning from this script
-
---source include/wait_wsrep_ready.inc
diff --git a/mysql-test/include/wsrep_wait_disconnect.inc b/mysql-test/include/wsrep_wait_disconnect.inc
new file mode 100644
index 00000000000..740fc0d9426
--- /dev/null
+++ b/mysql-test/include/wsrep_wait_disconnect.inc
@@ -0,0 +1,20 @@
+let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' AND VARIABLE_VALUE = 'OFF';
+# since this is called until AFTER provider disconnects,we need to allow
+# queries in non-prim
+#
+# We are also forced to use a hard-coded value for wsrep_sync_wait here because
+# we can not issue a SELECT query to obtain the original value and then restore
+# it
+disable_query_log;
+SET SESSION wsrep_sync_wait = 7;
+--let $restore_wsrep_on = `SHOW VARIABLES WHERE Variable_name = 'wsrep_on' AND Value = 'ON'`
+SET SESSION wsrep_on = OFF;
+
+--source include/wait_condition.inc
+
+if ($restore_wsrep_on != "")
+{
+ --eval SET SESSION wsrep_on = ON
+}
+SET SESSION wsrep_sync_wait = 15;
+enable_query_log;
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 72d7600e8df..261de37ab54 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -209,13 +209,6 @@ my @mysqld_rules=
{ 'bind-address' => \&fix_bind_address },
);
-if (IS_WINDOWS)
-{
- # For simplicity, we use the same names for shared memory and
- # named pipes.
- push(@mysqld_rules, {'shared-memory-base-name' => \&fix_socket});
-}
-
#
# Rules to run for [client] section
# - will be run in order listed here
@@ -281,19 +274,6 @@ sub post_check_client_group {
}
$config->insert($client_group_name, $name_to, $option->value())
}
-
- if (IS_WINDOWS)
- {
- if (! $self->{ARGS}->{embedded})
- {
- # Shared memory base may or may not be defined (e.g not defined in embedded)
- my $shm = $group_to_copy_from->option("shared-memory-base-name");
- if (defined $shm)
- {
- $config->insert($client_group_name,"shared-memory-base-name", $shm->value());
- }
- }
- }
}
@@ -340,7 +320,6 @@ sub post_check_embedded_group {
(
'log-error', # Embedded server writes stderr to mysqltest's log file
'slave-net-timeout', # Embedded server are not build with replication
- 'shared-memory-base-name', # No shared memory for embedded
);
foreach my $option ( $mysqld->options(), $first_mysqld->options() ) {
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm
index 30c8fe54642..69033649b46 100644
--- a/mysql-test/lib/My/SafeProcess.pm
+++ b/mysql-test/lib/My/SafeProcess.pm
@@ -100,8 +100,6 @@ else
$bindir = getcwd();
}
-our $wsrep_check_version;
-
# Find the safe process binary or script
sub find_bin {
if (IS_WIN32PERL or IS_CYGWIN)
@@ -121,10 +119,6 @@ sub find_bin {
"my_safe_process");
push(@safe_process_cmd, $exe);
}
- # Wsrep version check utility:
- $wsrep_check_version=
- my_find_bin($bindir, ["lib/My/SafeProcess", "My/SafeProcess"],
- "wsrep_check_version", NOT_REQUIRED);
}
diff --git a/mysql-test/lib/My/SafeProcess/CMakeLists.txt b/mysql-test/lib/My/SafeProcess/CMakeLists.txt
index 4946af7d899..0004a44982d 100644
--- a/mysql-test/lib/My/SafeProcess/CMakeLists.txt
+++ b/mysql-test/lib/My/SafeProcess/CMakeLists.txt
@@ -14,6 +14,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+
IF (WIN32)
ADD_EXECUTABLE(my_safe_process safe_process_win.cc)
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc)
diff --git a/mysql-test/lib/My/SafeProcess/wsrep_check_version.c b/mysql-test/lib/My/SafeProcess/wsrep_check_version.c
index cec760738be..7398bc8ad92 100644
--- a/mysql-test/lib/My/SafeProcess/wsrep_check_version.c
+++ b/mysql-test/lib/My/SafeProcess/wsrep_check_version.c
@@ -1,5 +1,4 @@
-/* Copyright (c) 2009, 2019, MariaDB
-
+/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
@@ -14,110 +13,39 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
-#include <stdlib.h>
-#include <stdio.h>
+#include <my_global.h>
#include <string.h>
-#include <errno.h>
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef _WIN32
-#include <windows.h>
-#define dlsym(lib, name) GetProcAddress((HMODULE)lib, name)
-#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0)
-#define dlclose(lib) FreeLibrary((HMODULE)lib)
-#elif defined(HAVE_DLFCN_H)
-#include <dlfcn.h>
-#else
-#define NO_DLL
-#endif
-
-#ifndef NO_DLL
-
-#include "../../../../wsrep/wsrep_api.h"
-
-/**************************************************************************
- * Library loader
- **************************************************************************/
-
-static int wsrep_check_iface_version(const char *found, const char *iface_ver)
-{
- if (strcmp(found, iface_ver)) {
- return ERANGE;
- }
- return 0;
-}
-
-typedef int (*wsrep_loader_fun)(wsrep_t*);
-
-static wsrep_loader_fun wsrep_dlf(void *dlh, const char *sym)
-{
- union {
- wsrep_loader_fun dlfun;
- void *obj;
- } alias;
- alias.obj = dlsym(dlh, sym);
- return alias.dlfun;
-}
-
-static int wsrep_check_version_symbol(void *dlh)
-{
- char** dlversion = NULL;
- dlversion = (char**) dlsym(dlh, "wsrep_interface_version");
- if (dlversion == NULL)
- return EINVAL;
- return wsrep_check_iface_version(*dlversion, WSREP_INTERFACE_VERSION);
-}
-
-static int wsrep_print_version(void *dlh)
-{
- char** dlversion = NULL;
- dlversion = (char**) dlsym(dlh, "wsrep_interface_version");
- if (dlversion == NULL)
- return EINVAL;
- printf("found: %s, need: %s\n", *dlversion, WSREP_INTERFACE_VERSION);
- return 0;
-}
+#include "../../../../wsrep-lib/wsrep-API/v26/wsrep_api.h"
int main(int argc, char **argv)
{
- int rc = EINVAL;
- void *dlh;
- wsrep_loader_fun dlfun;
-
- if (!(dlh = dlopen(getenv("WSREP_PROVIDER"), RTLD_NOW | RTLD_LOCAL))) {
- goto err;
- }
-
- if (!(dlfun = wsrep_dlf(dlh, "wsrep_loader"))) {
- goto err;
- }
-
- if (argc < 2 || strcmp(argv[1], "-p")) {
- rc = wsrep_check_version_symbol(dlh);
- }
- else {
- rc = wsrep_print_version(dlh);
- }
-
-err:
- if (dlh) dlclose(dlh);
-
- if (rc == 0)
- return 0;
- else if (rc == ERANGE)
- return 2;
- else
- return 1;
-}
-
-#else
-
-int main(void)
-{
+ int rc= 1;
+ void *dlh;
+ const char *provider= getenv("WSREP_PROVIDER");
+ char** dlversion= NULL;
+
+ if (!provider || !*provider)
+ {
+ printf("WSREP_PROVIDER is not set\n");
+ return 1;
+ }
+ if (!(dlh= dlopen(provider, RTLD_NOW | RTLD_LOCAL)))
+ {
+ printf("Can't open WSREP_PROVIDER (%s) library, error: %s\n",
+ provider, dlerror());
return 1;
+ }
+
+ dlversion= (char**) dlsym(dlh, "wsrep_interface_version");
+ if (dlversion && *dlversion)
+ {
+ rc= strcmp(*dlversion, WSREP_INTERFACE_VERSION) ? 2 : 0;
+ if (rc)
+ printf("Wrong wsrep provider library version, found: %s, need: %s\n", *dlversion, WSREP_INTERFACE_VERSION);
+ }
+ else
+ printf("Galera library does not contain a version symbol");
+
+ dlclose(dlh);
+ return rc;
}
-
-#endif
diff --git a/mysql-test/lib/generate-ssl-certs.sh b/mysql-test/lib/generate-ssl-certs.sh
index 7df1c2d8279..3331b81b931 100755
--- a/mysql-test/lib/generate-ssl-certs.sh
+++ b/mysql-test/lib/generate-ssl-certs.sh
@@ -44,6 +44,9 @@ openssl req -newkey rsa:2048 -keyout client-key.pem -out demoCA/client-req.pem -
openssl rsa -in client-key.pem -out client-key.pem
openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out client-cert.pem -in demoCA/client-req.pem
+# generate combined client cert and key file
+cat client-cert.pem client-key.pem > client-certkey.pem
+
# generate crls
openssl ca -revoke server-cert.pem -keyfile cakey.pem -batch -cert cacert.pem
openssl ca -gencrl -keyfile cakey.pem -crldays 7300 -batch -cert cacert.pem -out server-cert.crl
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index b252840555d..d289eb0a888 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -291,6 +291,7 @@ sub combinations_from_file($$)
@combs = ({ skip => $skip_combinations{$filename} });
} else {
return () if @::opt_combinations or not -f $filename;
+ return () if ::using_extern();
# Read combinations file in my.cnf format
mtr_verbose2("Read combinations file $filename");
my $config= My::Config->new($filename);
diff --git a/mysql-test/lib/openssl.cnf b/mysql-test/lib/openssl.cnf
new file mode 100644
index 00000000000..b9ab37ac3a1
--- /dev/null
+++ b/mysql-test/lib/openssl.cnf
@@ -0,0 +1,12 @@
+# Toplevel section for openssl (including libssl)
+openssl_conf = default_conf_section
+
+[default_conf_section]
+# We only specify configuration for the "ssl module"
+ssl_conf = ssl_section
+
+[ssl_section]
+system_default = system_default_section
+
+[system_default_section]
+CipherString = ALL:@SECLEVEL=1
diff --git a/mysql-test/main/1st.result b/mysql-test/main/1st.result
index cb2da3505f5..c630be1d61c 100644
--- a/mysql-test/main/1st.result
+++ b/mysql-test/main/1st.result
@@ -13,12 +13,12 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
-host
index_stats
innodb_index_stats
innodb_table_stats
diff --git a/mysql-test/main/alias.result b/mysql-test/main/alias.result
index 9ec442bd4db..78a1eead1db 100644
--- a/mysql-test/main/alias.result
+++ b/mysql-test/main/alias.result
@@ -369,3 +369,22 @@ t1 CREATE TABLE `t1` (
`CONCAT('a\x00b')` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP PROCEDURE test_inject;
+#
+# MDEV-23519
+#
+create or replace table t1 (a int);
+create or replace table t2 (b int);
+insert into t1 values(111111111),(-2147483648);
+insert into t2 values(1),(2);
+select t1.a as a1 from t1 as t1,t2 order by t2.b,t1.a;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 a a1 3 11 11 Y 32768 0 63
+a1
+-2147483648
+111111111
+-2147483648
+111111111
+drop table t1,t2;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/alias.test b/mysql-test/main/alias.test
index f6c44accff3..a0c9377d6dd 100644
--- a/mysql-test/main/alias.test
+++ b/mysql-test/main/alias.test
@@ -227,7 +227,6 @@ DELETE ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
connection default;
disconnect c1;
-
--echo #
--echo # MDEV-25399 Assertion `name.length == strlen(name.str)' failed in Item_func_sp::make_send_field
--echo #
@@ -309,3 +308,19 @@ DROP TABLE t1;
CALL test_inject('a\0b');
DROP PROCEDURE test_inject;
+
+--echo #
+--echo # MDEV-23519
+--echo #
+create or replace table t1 (a int);
+create or replace table t2 (b int);
+insert into t1 values(111111111),(-2147483648);
+insert into t2 values(1),(2);
+--enable_metadata
+select t1.a as a1 from t1 as t1,t2 order by t2.b,t1.a;
+--disable_metadata
+drop table t1,t2;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result
index 522c4bf872b..f6c17d4de8c 100644
--- a/mysql-test/main/alter_table.result
+++ b/mysql-test/main/alter_table.result
@@ -182,6 +182,7 @@ t1 0 a 2 b A 300 NULL NULL YES BTREE
t1 1 b 1 b A 100 NULL NULL YES BTREE
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -2602,3 +2603,43 @@ set @@default_storage_engine= @save_default_engine;
#
# End of 10.3 tests
#
+#
+# MDEV-22563 Segfault on duplicate free of Item_func_in::array
+#
+create or replace table person_principal (
+person_id bigint not null,
+insurant_id varchar(10) not null,
+principal_id bigint not null,
+principal_officer_id bigint not null,
+nursing_degree tinyint null,
+nursing_degree_valid_from date not null default cast(current_timestamp(6) as date),
+carma_user_id bigint not null,
+current_date_time timestamp(6) not null default current_timestamp(6) on update current_timestamp(6),
+constraint pk_person_principal primary key (person_id asc),
+constraint ck_person_principal_nursing_degree check (nursing_degree in (1,2,3,4,5)));
+Warnings:
+Warning 1280 Name 'pk_person_principal' ignored for PRIMARY key.
+create or replace table person_principal_hist (
+person_id bigint not null,
+insurant_id varchar(10) not null,
+principal_id bigint not null,
+principal_officer_id bigint not null,
+nursing_degree tinyint null,
+nursing_degree_valid_from date not null default cast(now() as date),
+carma_user_id bigint not null,
+orig_date_time datetime(6) not null,
+constraint pk_person_principal_hist primary key (person_id asc, orig_date_time asc),
+constraint ck_person_principal_hist_nursing_degree check (nursing_degree in (1,2,3,4,5)));
+Warnings:
+Warning 1280 Name 'pk_person_principal_hist' ignored for PRIMARY key.
+insert into person_principal (person_id, insurant_id, principal_id, principal_officer_id, nursing_degree, nursing_degree_valid_from, carma_user_id)
+values (1, 'A123456789', 5, 1, 1, '2018-05-06', 1);
+alter table person_principal add column if not exists date_mask tinyint null;
+update person_principal set date_mask = 0;
+alter table person_principal modify column date_mask tinyint not null;
+drop tables person_principal_hist, person_principal;
+CREATE OR REPLACE TABLE `t1` ( `id` varchar(64) NOT NULL, `name` varchar(255) NOT NULL, `extra` text DEFAULT NULL, `password` varchar(128) DEFAULT NULL, `enabled` tinyint(1) DEFAULT NULL, `domain_id` varchar(64) NOT NULL, `default_project_id` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `CONSTRAINT_1` CHECK (`enabled` in (0,1)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id");
+insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2");
+ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name);
+DROP TABLE t1;
diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test
index fd50366311f..6dcb441d30a 100644
--- a/mysql-test/main/alter_table.test
+++ b/mysql-test/main/alter_table.test
@@ -2143,3 +2143,47 @@ set @@default_storage_engine= @save_default_engine;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-22563 Segfault on duplicate free of Item_func_in::array
+--echo #
+create or replace table person_principal (
+ person_id bigint not null,
+ insurant_id varchar(10) not null,
+ principal_id bigint not null,
+ principal_officer_id bigint not null,
+ nursing_degree tinyint null,
+ nursing_degree_valid_from date not null default cast(current_timestamp(6) as date),
+ carma_user_id bigint not null,
+ current_date_time timestamp(6) not null default current_timestamp(6) on update current_timestamp(6),
+ constraint pk_person_principal primary key (person_id asc),
+ constraint ck_person_principal_nursing_degree check (nursing_degree in (1,2,3,4,5)));
+
+create or replace table person_principal_hist (
+ person_id bigint not null,
+ insurant_id varchar(10) not null,
+ principal_id bigint not null,
+ principal_officer_id bigint not null,
+ nursing_degree tinyint null,
+ nursing_degree_valid_from date not null default cast(now() as date),
+ carma_user_id bigint not null,
+ orig_date_time datetime(6) not null,
+ constraint pk_person_principal_hist primary key (person_id asc, orig_date_time asc),
+ constraint ck_person_principal_hist_nursing_degree check (nursing_degree in (1,2,3,4,5)));
+
+insert into person_principal (person_id, insurant_id, principal_id, principal_officer_id, nursing_degree, nursing_degree_valid_from, carma_user_id)
+values (1, 'A123456789', 5, 1, 1, '2018-05-06', 1);
+alter table person_principal add column if not exists date_mask tinyint null;
+update person_principal set date_mask = 0;
+alter table person_principal modify column date_mask tinyint not null;
+drop tables person_principal_hist, person_principal;
+
+#
+# The following ALTER TABLE caused crash in 10.4.13 (Reported on freenode)
+#
+
+CREATE OR REPLACE TABLE `t1` ( `id` varchar(64) NOT NULL, `name` varchar(255) NOT NULL, `extra` text DEFAULT NULL, `password` varchar(128) DEFAULT NULL, `enabled` tinyint(1) DEFAULT NULL, `domain_id` varchar(64) NOT NULL, `default_project_id` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `CONSTRAINT_1` CHECK (`enabled` in (0,1)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id");
+insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2");
+ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name);
+DROP TABLE t1;
diff --git a/mysql-test/main/alter_user.result b/mysql-test/main/alter_user.result
index 46420420386..bdc96a64fee 100644
--- a/mysql-test/main/alter_user.result
+++ b/mysql-test/main/alter_user.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
select * from mysql.user where user = 'root' and host = 'localhost';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
@@ -7,19 +8,19 @@ localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
alter user CURRENT_USER;
select * from mysql.user where user = 'root' and host = 'localhost';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
+localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 mysql_native_password N N 0.000000
alter user CURRENT_USER();
select * from mysql.user where user = 'root' and host = 'localhost';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
+localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 mysql_native_password N N 0.000000
create user foo;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
+% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password N N 0.000000
alter user foo;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
+% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password N N 0.000000
# Test super privilege works correctly with a read only database.
SET @start_read_only = @@global.read_only;
SET GLOBAL read_only=1;
@@ -51,37 +52,47 @@ Note 1396 Operation ALTER USER failed for 'boo'
alter user foo identified by 'something';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something2';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *9CD58369E930E28C8996A89DB18B63294E6DC10C N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000
+% foo *9CD58369E930E28C8996A89DB18B63294E6DC10C N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *9CD58369E930E28C8996A89DB18B63294E6DC10C N N 0.000000
alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
+alter user foo identified by password 'invalid';
+select * from mysql.user where user = 'foo';
+Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
+% foo invalid N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password invalid N N 0.000000
alter user foo identified with 'somecoolplugin';
+ERROR HY000: Operation ALTER USER failed for 'foo'@'%'
+show warnings;
+Level Code Message
+Error 1524 Plugin 'somecoolplugin' is not loaded
+Error 1396 Operation ALTER USER failed for 'foo'@'%'
+alter user foo identified with 'mysql_old_password';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 somecoolplugin N N 0.000000
-alter user foo identified with 'somecoolplugin' using 'somecoolpassphrase';
+% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password N N 0.000000
+alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 somecoolplugin somecoolpassphrase N N 0.000000
+% foo 0123456789ABCDEF N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password 0123456789ABCDEF N N 0.000000
# Test ssl related altering.
alter user foo identified by 'something' require SSL;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something' require X509;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something'
require cipher 'text' issuer 'foo_issuer' subject 'foo_subject';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
# Test resource limits altering.
alter user foo with MAX_QUERIES_PER_HOUR 10
MAX_UPDATES_PER_HOUR 20
@@ -89,7 +100,7 @@ MAX_CONNECTIONS_PER_HOUR 30
MAX_USER_CONNECTIONS 40;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
drop user foo;
#
# Bug #29882299: ALTER USER ... IDENTIFIED WITH ... BY ... SHOULD BE A PRIVILEGED OPERATION
@@ -101,3 +112,4 @@ ERROR 42000: Access denied; you need (at least one of) the CREATE USER privilege
connection default;
disconnect x;
drop user foo@localhost;
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/alter_user.test b/mysql-test/main/alter_user.test
index e71fba271b1..83a06a78728 100644
--- a/mysql-test/main/alter_user.test
+++ b/mysql-test/main/alter_user.test
@@ -1,5 +1,7 @@
--source include/not_embedded.inc
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
+
select * from mysql.user where user = 'root' and host = 'localhost';
--echo # Test syntax
--echo #
@@ -53,10 +55,17 @@ select * from mysql.user where user = 'foo';
alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63';
select * from mysql.user where user = 'foo';
+alter user foo identified by password 'invalid';
+select * from mysql.user where user = 'foo';
+
+--error ER_CANNOT_USER
alter user foo identified with 'somecoolplugin';
+show warnings;
+
+alter user foo identified with 'mysql_old_password';
select * from mysql.user where user = 'foo';
-alter user foo identified with 'somecoolplugin' using 'somecoolpassphrase';
+alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF';
select * from mysql.user where user = 'foo';
--echo # Test ssl related altering.
@@ -88,3 +97,5 @@ alter user current_user identified with 'something';
--connection default
--disconnect x
drop user foo@localhost;
+
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/analyze.result b/mysql-test/main/analyze.result
index 9dff94ab08c..dd785abcd42 100644
--- a/mysql-test/main/analyze.result
+++ b/mysql-test/main/analyze.result
@@ -3,6 +3,7 @@ lock tables t1 write;
insert into t1 values(0);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
unlock tables;
check table t1;
@@ -15,6 +16,7 @@ lock tables t1 write;
delete from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
unlock tables;
check table t1;
@@ -25,6 +27,7 @@ create table t1 (a bigint);
insert into t1 values(0);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
check table t1;
Table Op Msg_type Msg_text
@@ -34,9 +37,13 @@ create table t1 (a mediumtext, fulltext key key1(a)) charset utf8 collate utf8_g
insert into t1 values ('hello');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'a'
test.t1 analyze status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'a'
test.t1 analyze status Table is already up to date
drop table t1;
CREATE TABLE t1 (a int);
diff --git a/mysql-test/main/analyze_format_json.result b/mysql-test/main/analyze_format_json.result
index 7991379bc55..c306c2fc1b3 100644
--- a/mysql-test/main/analyze_format_json.result
+++ b/mysql-test/main/analyze_format_json.result
@@ -143,7 +143,7 @@ ANALYZE
"attached_condition": "tbl2.b < 60"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "1Kb",
"join_type": "BNL",
"r_filtered": 100
}
@@ -181,7 +181,7 @@ ANALYZE
"attached_condition": "tbl2.b < 60"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "1Kb",
"join_type": "BNL",
"attached_condition": "tbl1.c > tbl2.c",
"r_filtered": 15.833
@@ -315,7 +315,7 @@ ANALYZE
"key_length": "4",
"used_key_parts": ["pk"],
"r_loops": 1,
- "rows": 11,
+ "rows": 10,
"r_rows": 10,
"r_total_time_ms": "REPLACED",
"filtered": 100,
@@ -340,7 +340,7 @@ ANALYZE
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["pk"],
- "rows": 11,
+ "rows": 10,
"r_rows": 10,
"r_filtered": 50,
"r_total_time_ms": "REPLACED",
@@ -625,7 +625,7 @@ ANALYZE
"attached_condition": "<in_optimizer>(t2.b,t2.b in (subquery#2))"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"attached_condition": "<in_optimizer>(t2.b,t2.b in (subquery#2))",
"r_filtered": null
@@ -711,7 +711,7 @@ ANALYZE
"attached_condition": "t3.f3 in (1,2)"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "1",
"join_type": "BNL",
"r_filtered": null
},
@@ -742,7 +742,7 @@ ANALYZE
"r_filtered": null
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"attached_condition": "t2.f2 = t3.f3",
"r_filtered": null
diff --git a/mysql-test/main/analyze_stmt_orderby.result b/mysql-test/main/analyze_stmt_orderby.result
index deb19d4d93a..23f4c39dd5b 100644
--- a/mysql-test/main/analyze_stmt_orderby.result
+++ b/mysql-test/main/analyze_stmt_orderby.result
@@ -62,7 +62,7 @@ ANALYZE
explain
update t2 set a=a+1 where a<10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 5 NULL 8 Using where; Using buffer
+1 SIMPLE t2 range a a 5 NULL 9 Using where; Using buffer
explain format=json
update t2 set a=a+1 where a<10;
EXPLAIN
@@ -78,7 +78,7 @@ EXPLAIN
"key": "a",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 8,
+ "rows": 9,
"attached_condition": "t2.a < 10"
}
}
@@ -100,7 +100,7 @@ ANALYZE
"key": "a",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 8,
+ "rows": 9,
"r_rows": 10,
"r_filtered": 100,
"r_total_time_ms": "REPLACED",
@@ -426,7 +426,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"attached_condition": "t3.a = t0.a",
"r_filtered": 10
@@ -497,7 +497,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"attached_condition": "t5.a = t6.a",
"r_filtered": 21.429
@@ -537,7 +537,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"attached_condition": "t5.a = t6.a"
}
diff --git a/mysql-test/main/auth_rpl.result b/mysql-test/main/auth_rpl.result
index a3da7985da1..56f5f5e8f2b 100644
--- a/mysql-test/main/auth_rpl.result
+++ b/mysql-test/main/auth_rpl.result
@@ -15,7 +15,7 @@ connection master;
connection slave;
# Slave in-sync with master now.
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
-user plugin authentication_string
+User plugin authentication_string
plug_user test_plugin_server plug_user
# Cleanup (on slave).
include/stop_slave.inc
diff --git a/mysql-test/main/backup_aria.result b/mysql-test/main/backup_aria.result
new file mode 100644
index 00000000000..d537711404f
--- /dev/null
+++ b/mysql-test/main/backup_aria.result
@@ -0,0 +1,158 @@
+connect con1,localhost,root,,;
+SET SESSION lock_wait_timeout = 1;
+#-----------------------------------------------------------------------
+# Single-threaded tests
+#-----------------------------------------------------------------------
+# Show the fate and impact of some SELECT /HANDLER ... READ
+# sliding through the sequence.
+CREATE TABLE t_permanent_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+INSERT INTO t_permanent_aria SET col1 = 1;
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE END;
+# In case the backup lock is taken by the current connection than
+# - DML modifying some permanent table is not allowed
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+INSERT INTO t_permanent_aria SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+SET AUTOCOMMIT = 1;
+INSERT INTO t_permanent_aria SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+# - DDL creating or renaming a permanent table or a procedure is not
+# allowed.
+# The latter tries to modify a permanent system table.
+CREATE TABLE throw_away (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+RENAME TABLE t_permanent_aria To throw_away;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+# - DDL creating a temporary table is allowed.
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+# - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_aria SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_aria;
+COUNT(*)
+1
+BACKUP STAGE END;
+# Show the fate and impact of some auto committed INSERT into temporary
+# table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_aria;
+COUNT(*)
+5
+# Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+# through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE END;
+# Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_aria;
+ALTER TABLE t_temporary_aria ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_aria ADD KEY idx(col2);
+BACKUP STAGE END;
+DROP TABLE t_permanent_aria;
+#-----------------------------------------------------------------------
+# Show that non transactional tables locks with BACKUP STAGE FLUSH
+#-----------------------------------------------------------------------
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=0;
+insert into t1 values (1), (2);
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+select * from t1;
+a
+1
+2
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (3);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 values (4);
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+a
+1
+2
+4
+drop table t1;
+#-----------------------------------------------------------------------
+# Show that transactional tables doesn't lock with BACKUP STAGE FLUSH
+#-----------------------------------------------------------------------
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=1 page_checksum=1;
+insert into t1 values (1), (2);
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+INSERT INTO t1 values (4);
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+a
+1
+2
+4
+drop table t1;
+#
+# Cleanup
+#
+disconnect con1;
diff --git a/mysql-test/main/backup_aria.test b/mysql-test/main/backup_aria.test
new file mode 100644
index 00000000000..7b741b829a1
--- /dev/null
+++ b/mysql-test/main/backup_aria.test
@@ -0,0 +1,157 @@
+########################################################################
+# Tests for Implement LOCK FOR BACKUP (MDEV-5336)
+########################################################################
+# Check a non transactional table per ENGINE = Aria TRANSACTIONAL = 0.
+#
+
+--source include/not_embedded.inc
+# As non transactional engine we use Aria with TRANSACTIONAL = 0
+--source include/have_aria.inc
+
+# Following connections are used in a few of the following tests
+connect (con1,localhost,root,,);
+
+SET SESSION lock_wait_timeout = 1;
+
+--echo #-----------------------------------------------------------------------
+--echo # Single-threaded tests
+--echo #-----------------------------------------------------------------------
+
+--echo # Show the fate and impact of some SELECT /HANDLER ... READ
+--echo # sliding through the sequence.
+CREATE TABLE t_permanent_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+INSERT INTO t_permanent_aria SET col1 = 1;
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE END;
+
+--echo # In case the backup lock is taken by the current connection than
+--echo # - DML modifying some permanent table is not allowed
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t_permanent_aria SET col1 = 1;
+SET AUTOCOMMIT = 1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t_permanent_aria SET col1 = 1;
+
+--echo # - DDL creating or renaming a permanent table or a procedure is not
+--echo # allowed.
+--echo # The latter tries to modify a permanent system table.
+
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE TABLE throw_away (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+RENAME TABLE t_permanent_aria To throw_away;
+--echo # - DDL creating a temporary table is allowed.
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+--echo # - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_aria SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_aria;
+BACKUP STAGE END;
+
+--echo # Show the fate and impact of some auto committed INSERT into temporary
+--echo # table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_aria;
+
+--echo # Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+--echo # through the sequence.
+
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE END;
+--echo # Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_aria;
+ALTER TABLE t_temporary_aria ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_aria ADD KEY idx(col2);
+BACKUP STAGE END;
+
+DROP TABLE t_permanent_aria;
+
+--echo #-----------------------------------------------------------------------
+--echo # Show that non transactional tables locks with BACKUP STAGE FLUSH
+--echo #-----------------------------------------------------------------------
+
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=0;
+insert into t1 values (1), (2);
+
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+select * from t1;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (3);
+--send INSERT INTO t1 values (4)
+connection con1;
+backup stage end;
+connection default;
+--reap # send
+select * from t1;
+drop table t1;
+
+--echo #-----------------------------------------------------------------------
+--echo # Show that transactional tables doesn't lock with BACKUP STAGE FLUSH
+--echo #-----------------------------------------------------------------------
+
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=1 page_checksum=1;
+insert into t1 values (1), (2);
+
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+INSERT INTO t1 values (4);
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+drop table t1;
+
+--echo #
+--echo # Cleanup
+--echo #
+
+disconnect con1;
diff --git a/mysql-test/main/backup_interaction.result b/mysql-test/main/backup_interaction.result
new file mode 100644
index 00000000000..3c3071b8e70
--- /dev/null
+++ b/mysql-test/main/backup_interaction.result
@@ -0,0 +1,528 @@
+#
+# Check backup and FTWRL
+#
+flush tables with read lock;
+backup stage start;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+unlock tables;
+backup stage start;
+flush tables with read lock;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+backup stage end;
+#
+# Check backup and FLUSH TABLES
+#
+flush tables;
+backup stage start;
+flush tables;
+backup stage end;
+#
+# Check BACKUP STAGE under lock tables
+#
+create table t1 (a int);
+lock table t1 write;
+backup stage start;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+unlock tables;
+lock table t1 read;
+backup stage start;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+unlock tables;
+#
+# Check lock tables under BACKUP STAGE
+#
+backup stage start;
+unlock tables;
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_BACKUP_START
+lock table t1 write;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+lock table t1 read;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+unlock tables;
+backup stage end;
+drop table t1;
+#
+# Check setting readonly under BACKUP STAGE
+#
+backup stage start;
+set @@global.read_only=1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+# also make sure going back from read-only mode is not allowed
+set @@global.read_only=1;
+backup stage start;
+set @@global.read_only=0;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+set @@global.read_only=0;
+#
+# Check BACKUP STAGE under read_only
+#
+set @@global.read_only=1;
+backup stage start;
+backup stage end;
+set @@global.read_only=0;
+#
+# Check that we can't create tables during backup
+#
+backup stage start;
+create table t1 (a int);
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+backup stage end;
+# also make sure we can't write to a table during backup
+create table t1(a INT);
+backup stage start;
+insert into t1 values(1);
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+insert delayed into t1 values(1);
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+update t1 set a=1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+delete from t1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+truncate table t1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+drop table t1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+backup stage end;
+drop table t1;
+#
+# BACKUP STAGE performs implicit commits
+#
+create table t1(a int) engine=InnoDB;
+begin;
+insert into t1 values(1);
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_SHARED_WRITE
+backup stage start;
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_BACKUP_START
+backup stage block_commit;
+commit;
+backup stage end;
+drop table t1;
+# Ensure that BACKUP STAGE ... does AUTOCOMMIT like most DDL.
+# Sideeffect:
+# Show the impact of not yet committed INSERT before sequence start
+# and ROLLBACK sliding through the sequence.
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+ROLLBACK;
+SELECT COUNT(*) = 5 AS expect_1 FROM t1;
+expect_1
+1
+# Show the impact of not yet committed INSERT before sequence start
+# and a COMMIT sliding through the sequence.
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+COMMIT;
+SELECT COUNT(*) = 10 AS expect_1 FROM t1;
+expect_1
+1
+DELETE FROM t1;
+COMMIT;
+drop table t1;
+#
+# CHECK: RO transaction under BACKUP STAGE is a potential deadlock
+# OTOH we most probably allow them under FTWRL as well
+#
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+insert into t1 values (1);
+backup stage start;
+backup stage block_commit;
+begin;
+select * from t1;
+col1
+1
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_BACKUP_WAIT_COMMIT
+MDL_SHARED_READ
+backup stage end;
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+drop table t1;
+#
+# Check that handler are closed by backup stage block_ddl
+#
+create table t1 (a int, key a (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+handler t1 open;
+handler t1 read a prev;
+a
+5
+backup stage start;
+handler t1 read a prev;
+a
+4
+backup stage flush;
+backup stage block_ddl;
+handler t1 read a prev;
+a
+5
+backup stage block_commit;
+handler t1 read a prev;
+a
+4
+backup stage end;
+handler t1 close;
+drop table t1;
+# Show the fate and impact of some SELECT /HANDLER ... READ
+# sliding through the sequence.
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t1_innodb values (1),(2),(3);
+COMMIT;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t1_myisam values (1),(2),(3);
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+SELECT * FROM t1_innodb;
+col1
+1
+2
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE END;
+drop table t1_innodb,t1_myisam;
+# Show the fate and impact of some SET GLOBAL tx_read_only = 1/0
+# sliding through the sequence.
+BACKUP STAGE START;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE FLUSH;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_DDL;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE END;
+# Show the fate and impact of some SET SESSION sql_log_bin = 0/1
+# sliding through the sequence.
+COMMIT;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE END;
+#----
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE END;
+SET SESSION sql_log_bin = 1;
+#-----------------------------------------------------------------------
+# BACKUP STAGE statements are not allowed in stored routines
+#-----------------------------------------------------------------------
+CREATE TABLE t1 (col1 INT);
+CREATE PROCEDURE p1()
+BEGIN
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+END|
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
+CREATE FUNCTION f1 (s CHAR(20)) RETURNS INT DETERMINISTIC
+BEGIN
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+RETURN 1;
+END|
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+END|
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
+DROP TABLE t1;
+#-----------------------------------------------------------------------
+# Check BACKUP status variables
+#-----------------------------------------------------------------------
+SET SESSION lock_wait_timeout = 1;
+FLUSH STATUS;
+# Show how the status variable 'Com_backup' changes after BACKUP STAGE ..
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 0
+BACKUP STAGE START;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 1
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'START'
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 2
+BACKUP STAGE FLUSH;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 3
+BACKUP STAGE BLOCK_DDL;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 4
+BACKUP STAGE BLOCK_COMMIT;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 5
+BACKUP STAGE END;
+# In case the backup lock is taken by the current connection than
+# - DML modifying some permanent table is not allowed
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1_innodb SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+SET AUTOCOMMIT = 1;
+INSERT INTO t1_innodb SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+INSERT INTO t1_myisam SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+# - DDL creating or renaming a permanent table or a procedure etc.
+# is not allowed.
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+RENAME TABLE t1_innodb To throw_away;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+CREATE PROCEDURE p1() SELECT 13;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+CREATE PROCEDURE p1() SELECT 13;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+BACKUP STAGE END;
+DROP TABLE t1_innodb;
+DROP TABLE t1_myisam;
+#
+# Creating and modifying TEMPORARY TABLES are allowed
+#
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+CREATE TEMPORARY TABLE tmp (col1 INT);
+DROP TEMPORARY TABLE tmp;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TEMPORARY TABLE t_temporary_myisam (col1 INT) ENGINE = MyISAM;
+# - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_innodb SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_innodb;
+COUNT(*)
+1
+INSERT INTO t_temporary_myisam SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_myisam;
+COUNT(*)
+1
+BACKUP STAGE END;
+# Show the fate and impact of some auto committed INSERT into temporary
+# table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_innodb;
+COUNT(*)
+5
+# Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+# through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE END;
+# Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_innodb;
+ALTER TABLE t_temporary_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_innodb ADD KEY idx(col2);
+BACKUP STAGE END;
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, f INT);
+BACKUP STAGE START;
+FLUSH TABLE t1 FOR EXPORT;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+FLUSH TABLE t1 WITH READ LOCK;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+BACKUP STAGE END;
+DROP TABLE t1;
diff --git a/mysql-test/main/backup_interaction.test b/mysql-test/main/backup_interaction.test
new file mode 100644
index 00000000000..09ed769c898
--- /dev/null
+++ b/mysql-test/main/backup_interaction.test
@@ -0,0 +1,517 @@
+########################################################################
+# Tests how BACKUP STAGE interacts with other commands (MDEV-5336)
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+
+--echo #
+--echo # Check backup and FTWRL
+--echo #
+
+flush tables with read lock;
+--error ER_CANT_UPDATE_WITH_READLOCK
+backup stage start;
+unlock tables;
+backup stage start;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+flush tables with read lock;
+backup stage end;
+
+--echo #
+--echo # Check backup and FLUSH TABLES
+--echo #
+
+flush tables;
+backup stage start;
+flush tables;
+backup stage end;
+
+--echo #
+--echo # Check BACKUP STAGE under lock tables
+--echo #
+
+create table t1 (a int);
+lock table t1 write;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+backup stage start;
+--error ER_BACKUP_NOT_RUNNING
+backup stage end;
+unlock tables;
+
+lock table t1 read;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+backup stage start;
+--error ER_BACKUP_NOT_RUNNING
+backup stage end;
+unlock tables;
+
+
+--echo #
+--echo # Check lock tables under BACKUP STAGE
+--echo #
+backup stage start;
+unlock tables;
+select lock_mode from information_schema.metadata_lock_info;
+
+--error ER_BACKUP_LOCK_IS_ACTIVE
+lock table t1 write;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+lock table t1 read;
+unlock tables;
+backup stage end;
+drop table t1;
+
+
+--echo #
+--echo # Check setting readonly under BACKUP STAGE
+--echo #
+backup stage start;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+set @@global.read_only=1;
+backup stage end;
+
+--echo # also make sure going back from read-only mode is not allowed
+set @@global.read_only=1;
+backup stage start;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+set @@global.read_only=0;
+backup stage end;
+set @@global.read_only=0;
+
+--echo #
+--echo # Check BACKUP STAGE under read_only
+--echo #
+
+set @@global.read_only=1;
+backup stage start;
+backup stage end;
+set @@global.read_only=0;
+
+--echo #
+--echo # Check that we can't create tables during backup
+--echo #
+
+backup stage start;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+create table t1 (a int);
+backup stage end;
+
+--echo # also make sure we can't write to a table during backup
+create table t1(a INT);
+backup stage start;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+insert into t1 values(1);
+--error ER_BACKUP_LOCK_IS_ACTIVE
+insert delayed into t1 values(1);
+--error ER_BACKUP_LOCK_IS_ACTIVE
+update t1 set a=1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+delete from t1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+truncate table t1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+drop table t1;
+backup stage end;
+drop table t1;
+
+--echo #
+--echo # BACKUP STAGE performs implicit commits
+--echo #
+create table t1(a int) engine=InnoDB;
+begin;
+insert into t1 values(1);
+select lock_mode from information_schema.metadata_lock_info;
+backup stage start;
+select lock_mode from information_schema.metadata_lock_info;
+backup stage block_commit;
+commit;
+backup stage end;
+drop table t1;
+
+--echo # Ensure that BACKUP STAGE ... does AUTOCOMMIT like most DDL.
+--echo # Sideeffect:
+--echo # Show the impact of not yet committed INSERT before sequence start
+--echo # and ROLLBACK sliding through the sequence.
+
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+ROLLBACK;
+SELECT COUNT(*) = 5 AS expect_1 FROM t1;
+
+--echo # Show the impact of not yet committed INSERT before sequence start
+--echo # and a COMMIT sliding through the sequence.
+
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+COMMIT;
+SELECT COUNT(*) = 10 AS expect_1 FROM t1;
+DELETE FROM t1;
+COMMIT;
+drop table t1;
+
+--echo #
+--echo # CHECK: RO transaction under BACKUP STAGE is a potential deadlock
+--echo # OTOH we most probably allow them under FTWRL as well
+--echo #
+
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+insert into t1 values (1);
+backup stage start;
+backup stage block_commit;
+begin;
+select * from t1;
+select lock_mode from information_schema.metadata_lock_info;
+backup stage end;
+select lock_mode from information_schema.metadata_lock_info;
+drop table t1;
+
+--echo #
+--echo # Check that handler are closed by backup stage block_ddl
+--echo #
+
+create table t1 (a int, key a (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+handler t1 open;
+handler t1 read a prev;
+backup stage start;
+handler t1 read a prev;
+backup stage flush;
+backup stage block_ddl;
+handler t1 read a prev;
+backup stage block_commit;
+handler t1 read a prev;
+backup stage end;
+handler t1 close;
+drop table t1;
+
+--echo # Show the fate and impact of some SELECT /HANDLER ... READ
+--echo # sliding through the sequence.
+
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t1_innodb values (1),(2),(3);
+COMMIT;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t1_myisam values (1),(2),(3);
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t1_innodb;
+SELECT * FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE END;
+drop table t1_innodb,t1_myisam;
+
+--echo # Show the fate and impact of some SET GLOBAL tx_read_only = 1/0
+--echo # sliding through the sequence.
+
+BACKUP STAGE START;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE FLUSH;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_DDL;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE END;
+
+--echo # Show the fate and impact of some SET SESSION sql_log_bin = 0/1
+--echo # sliding through the sequence.
+COMMIT;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE END;
+
+--echo #----
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE END;
+SET SESSION sql_log_bin = 1;
+
+--echo #-----------------------------------------------------------------------
+--echo # BACKUP STAGE statements are not allowed in stored routines
+--echo #-----------------------------------------------------------------------
+
+CREATE TABLE t1 (col1 INT);
+
+delimiter |;
+--error ER_SP_BADSTATEMENT
+CREATE PROCEDURE p1()
+BEGIN
+ BACKUP STAGE START;
+ BACKUP STAGE FLUSH;
+ BACKUP STAGE BLOCK_DDL;
+ BACKUP STAGE BLOCK_COMMIT;
+ BACKUP STAGE END;
+END|
+
+--error ER_SP_BADSTATEMENT
+CREATE FUNCTION f1 (s CHAR(20)) RETURNS INT DETERMINISTIC
+BEGIN
+ BACKUP STAGE START;
+ BACKUP STAGE FLUSH;
+ BACKUP STAGE BLOCK_DDL;
+ BACKUP STAGE BLOCK_COMMIT;
+ BACKUP STAGE END;
+ RETURN 1;
+END|
+
+--error ER_SP_BADSTATEMENT
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+ BACKUP STAGE START;
+ BACKUP STAGE FLUSH;
+ BACKUP STAGE BLOCK_DDL;
+ BACKUP STAGE BLOCK_COMMIT;
+ BACKUP STAGE END;
+END|
+
+delimiter ;|
+DROP TABLE t1;
+
+--echo #-----------------------------------------------------------------------
+--echo # Check BACKUP status variables
+--echo #-----------------------------------------------------------------------
+
+SET SESSION lock_wait_timeout = 1;
+
+FLUSH STATUS;
+
+# MDEV-5336 introduces the status variable Com_backup
+--echo # Show how the status variable 'Com_backup' changes after BACKUP STAGE ..
+
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE START;
+SHOW STATUS LIKE 'Com_backup';
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE FLUSH;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE BLOCK_DDL;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE BLOCK_COMMIT;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE END;
+
+--echo # In case the backup lock is taken by the current connection than
+--echo # - DML modifying some permanent table is not allowed
+
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t1_innodb SET col1 = 1;
+SET AUTOCOMMIT = 1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t1_innodb SET col1 = 1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t1_myisam SET col1 = 1;
+--echo # - DDL creating or renaming a permanent table or a procedure etc.
+--echo # is not allowed.
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+RENAME TABLE t1_innodb To throw_away;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE PROCEDURE p1() SELECT 13;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE PROCEDURE p1() SELECT 13;
+BACKUP STAGE END;
+DROP TABLE t1_innodb;
+DROP TABLE t1_myisam;
+
+--echo #
+--echo # Creating and modifying TEMPORARY TABLES are allowed
+--echo #
+
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+CREATE TEMPORARY TABLE tmp (col1 INT);
+DROP TEMPORARY TABLE tmp;
+
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TEMPORARY TABLE t_temporary_myisam (col1 INT) ENGINE = MyISAM;
+--echo # - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_innodb SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_innodb;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_myisam;
+BACKUP STAGE END;
+
+--echo # Show the fate and impact of some auto committed INSERT into temporary
+--echo # table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_innodb;
+
+--echo # Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+--echo # through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE END;
+--echo # Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_innodb;
+ALTER TABLE t_temporary_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_innodb ADD KEY idx(col2);
+BACKUP STAGE END;
+
+#
+# MDEV-18067, MDEV-18068 and MDEV-18069
+# Server crashes with BACKUP STAGE and FLUSH TABLE table_name
+#
+
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, f INT);
+BACKUP STAGE START;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+FLUSH TABLE t1 FOR EXPORT;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+FLUSH TABLE t1 WITH READ LOCK;
+BACKUP STAGE END;
+DROP TABLE t1;
diff --git a/mysql-test/main/backup_lock.result b/mysql-test/main/backup_lock.result
new file mode 100644
index 00000000000..95b2f520d90
--- /dev/null
+++ b/mysql-test/main/backup_lock.result
@@ -0,0 +1,219 @@
+#
+# Testing which locks we get from all stages
+#
+BACKUP STAGE START;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_START Backup lock
+BACKUP STAGE FLUSH;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FLUSH Backup lock
+BACKUP STAGE BLOCK_DDL;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_DDL Backup lock
+BACKUP STAGE BLOCK_COMMIT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_COMMIT Backup lock
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+#
+# testing BACKUP STAGE LOCK's
+#
+connect con1,localhost,root,,;
+connect con2,localhost,root,,;
+connection default;
+#
+# testing if BACKUP STAGE FLUSH causes deadlocks with ALTER TABLE
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+alter table t1 add column (j int), algorithm copy;
+connection con2;
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_BACKUP_FLUSH Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_UPGRADABLE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+SET STATEMENT max_statement_time=1 FOR backup stage block_ddl;
+ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
+backup stage block_ddl;
+connection default;
+commit;
+SELECT * FROM t1;
+a
+1
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 values (2,0);;
+connection con2;
+backup stage end;
+connection con1;
+connection default;
+select * from t1;
+a j
+1 NULL
+2 0
+drop table t1;
+# Test with inline alter table, which doesn't block block_commit
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+alter table t1 add column (j int);
+connection con2;
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_ALTER_COPY Backup lock
+MDL_BACKUP_FLUSH Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_UPGRADABLE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+backup stage block_ddl;
+backup stage block_commit;
+connection default;
+SELECT * FROM t1;
+a
+1
+commit;
+connection con2;
+backup stage end;
+connection con1;
+connection default;
+drop table t1;
+#
+# testing if BACKUP STAGE FLUSH causes deadlocks with DROP TABLE
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t1;
+connection con2;
+backup stage start;
+backup stage flush;
+SET STATEMENT lock_wait_timeout=0 FOR SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+backup stage block_ddl;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_DDL Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+backup stage end;
+connection default;
+commit;
+connection con1;
+connection default;
+#
+# Check if backup stage block_dll + concurrent drop table blocks select
+#
+create table t1 (a int) engine=innodb;
+backup stage start;
+backup stage block_ddl;
+connection con1;
+DROP TABLE t1;
+connection con2;
+connection con2;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_DDL Backup lock
+SELECT * FROM t1;
+a
+connection default;
+backup stage end;
+connection con1;
+connection default;
+#
+# Check if backup stage block_dll overrides ddl lock for drop table
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t1;
+connection con2;
+backup stage start;
+backup stage flush;
+backup stage block_ddl;
+connection default;
+commit;
+connection con2;
+backup stage end;
+connection con1;
+connection default;
+#
+# Check if BACKUP STAGE BLOCK_COMMIT blocks commit
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+backup stage start;
+backup stage block_commit;
+connection default;
+commit;
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+a
+1
+drop table t1;
+disconnect con1;
+disconnect con2;
+#
+# Test backup stage and flush tables
+#
+BACKUP STAGE START ;
+BACKUP STAGE BLOCK_DDL ;
+FLUSH TABLES;
+CREATE TEMPORARY TABLE t12345678_tmp (col1 INT);
+drop table t12345678_tmp;
+BACKUP STAGE END;
+#
+# Test BACKUP STAGES with lock timeouts
+#
+SET GLOBAL lock_wait_timeout=0;
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+INSERT INTO t_permanent_myisam SET col1 = 1;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = MyISAM;
+connect con1,localhost,root,,;
+SET AUTOCOMMIT = 0;
+connection default;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+connection con1;
+UPDATE t_permanent_innodb SET col1 = 8;
+UPDATE t_permanent_myisam SET col1 = 8;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t_con1_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t_con1_myisam;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection default;
+BACKUP STAGE END;
+DROP TABLE t_permanent_myisam, t_permanent_innodb;
+DROP TABLE t_con1_innodb, t_con1_myisam;
+disconnect con1;
+set global lock_wait_timeout=default;
diff --git a/mysql-test/main/backup_lock.test b/mysql-test/main/backup_lock.test
new file mode 100644
index 00000000000..d6db7a6364e
--- /dev/null
+++ b/mysql-test/main/backup_lock.test
@@ -0,0 +1,284 @@
+########################################################################
+# Tests BACKUP STAGE locking
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # Testing which locks we get from all stages
+--echo #
+
+BACKUP STAGE START;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE FLUSH;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE BLOCK_DDL;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+
+--echo #
+--echo # testing BACKUP STAGE LOCK's
+--echo #
+
+# Following connections are used in a few of the following tests
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+connection default;
+
+--echo #
+--echo # testing if BACKUP STAGE FLUSH causes deadlocks with ALTER TABLE
+--echo #
+
+create table t1 (a int) engine=innodb;
+
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--send alter table t1 add column (j int), algorithm copy
+
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+#
+# Do first test with max_statement_time, other tests later are done with
+# lock_wait_timeout. This is mostly to ensure that both methods works
+#
+--error ER_STATEMENT_TIMEOUT
+SET STATEMENT max_statement_time=1 FOR backup stage block_ddl;
+--send backup stage block_ddl
+
+connection default;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+commit;
+# The following select works because alter table is waiting for DDL lock
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (2);
+--send INSERT INTO t1 values (2,0);
+connection con2;
+--reap # BLOCK_DDL
+backup stage end;
+connection con1;
+--reap # ALTER TABLE
+connection default;
+--reap # INSERT
+select * from t1;
+drop table t1;
+
+--echo # Test with inline alter table, which doesn't block block_commit
+
+create table t1 (a int) engine=innodb;
+
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--send alter table t1 add column (j int)
+
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+backup stage block_ddl;
+backup stage block_commit;
+connection default;
+SELECT * FROM t1;
+--send commit
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+backup stage end;
+connection con1;
+--reap # ALTER TABLE
+connection default;
+--reap # commit
+drop table t1;
+
+--echo #
+--echo # testing if BACKUP STAGE FLUSH causes deadlocks with DROP TABLE
+--echo #
+
+create table t1 (a int) engine=innodb;
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+--send DROP TABLE t1
+
+connection con2;
+backup stage start;
+backup stage flush;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR SELECT * FROM t1;
+
+backup stage block_ddl;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+backup stage end;
+
+connection default;
+commit;
+connection con1;
+--reap # DROP TABLE
+connection default;
+
+--echo #
+--echo # Check if backup stage block_dll + concurrent drop table blocks select
+--echo #
+
+create table t1 (a int) engine=innodb;
+backup stage start;
+backup stage block_ddl;
+connection con1;
+--send DROP TABLE t1
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+connection con2;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+# Check that select's are not blocked
+SELECT * FROM t1;
+connection default;
+backup stage end;
+connection con1;
+--reap
+connection default;
+
+--echo #
+--echo # Check if backup stage block_dll overrides ddl lock for drop table
+--echo #
+
+create table t1 (a int) engine=innodb;
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+--send DROP TABLE t1
+
+connection con2;
+backup stage start;
+backup stage flush;
+backup stage block_ddl;
+connection default;
+commit;
+connection con2;
+backup stage end;
+connection con1;
+--reap # DROP TABLE
+connection default;
+
+--echo #
+--echo # Check if BACKUP STAGE BLOCK_COMMIT blocks commit
+--echo #
+
+create table t1 (a int) engine=innodb;
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+backup stage start;
+backup stage block_commit;
+connection default;
+--send commit
+connection con1;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+backup stage end;
+connection default;
+--reap # commit
+select * from t1;
+drop table t1;
+
+#
+# End of tests using con1 and con2
+#
+disconnect con1;
+disconnect con2;
+
+--echo #
+--echo # Test backup stage and flush tables
+--echo #
+
+BACKUP STAGE START ;
+BACKUP STAGE BLOCK_DDL ;
+FLUSH TABLES;
+CREATE TEMPORARY TABLE t12345678_tmp (col1 INT);
+drop table t12345678_tmp;
+BACKUP STAGE END;
+
+--echo #
+--echo # Test BACKUP STAGES with lock timeouts
+--echo #
+
+SET GLOBAL lock_wait_timeout=0;
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+
+INSERT INTO t_permanent_myisam SET col1 = 1;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = MyISAM;
+
+--connect(con1,localhost,root,,)
+SET AUTOCOMMIT = 0;
+
+--connection default
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+
+--connection con1
+UPDATE t_permanent_innodb SET col1 = 8;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_myisam SET col1 = 8;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_innodb;
+
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_myisam;
+
+--connection default
+BACKUP STAGE END;
+DROP TABLE t_permanent_myisam, t_permanent_innodb;
+DROP TABLE t_con1_innodb, t_con1_myisam;
+--disconnect con1
+set global lock_wait_timeout=default;
diff --git a/mysql-test/main/backup_lock_binlog.result b/mysql-test/main/backup_lock_binlog.result
new file mode 100644
index 00000000000..b07e1b59e58
--- /dev/null
+++ b/mysql-test/main/backup_lock_binlog.result
@@ -0,0 +1,37 @@
+#
+# MDEV-25334 FTWRL/Backup blocks DDL on temporary tables with binlog
+# enabled assertion fails in Diagnostics_area::set_error_status
+#
+connect con1,localhost,root,,;
+connection default;
+#
+# Test 1
+#
+CREATE TEMPORARY TABLE tmp (a INT);
+connection con1;
+FLUSH TABLES WITH READ LOCK;
+connection default;
+SET lock_wait_timeout= 1;
+ALTER TABLE tmp;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con1;
+unlock tables;
+connection default;
+drop table tmp;
+#
+# Test 2 (In statement format to ensure temporary table gets logged)
+#
+set @@binlog_format=statement;
+CREATE TEMPORARY TABLE tmp (a INT);
+connection con1;
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_COMMIT;
+connection default;
+SET lock_wait_timeout= 1;
+ALTER TABLE tmp;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con1;
+BACKUP STAGE end;
+connection default;
+drop table tmp;
+disconnect con1;
diff --git a/mysql-test/main/backup_lock_binlog.test b/mysql-test/main/backup_lock_binlog.test
new file mode 100644
index 00000000000..71463d6a8d5
--- /dev/null
+++ b/mysql-test/main/backup_lock_binlog.test
@@ -0,0 +1,48 @@
+--source include/have_binlog_format_mixed_or_statement.inc
+
+#
+# Tests involving locks and binlog
+#
+
+--echo #
+--echo # MDEV-25334 FTWRL/Backup blocks DDL on temporary tables with binlog
+--echo # enabled assertion fails in Diagnostics_area::set_error_status
+--echo #
+
+--connect (con1,localhost,root,,)
+connection default;
+
+--echo #
+--echo # Test 1
+--echo #
+
+CREATE TEMPORARY TABLE tmp (a INT);
+--connection con1
+FLUSH TABLES WITH READ LOCK;
+--connection default
+SET lock_wait_timeout= 1;
+--error ER_LOCK_WAIT_TIMEOUT
+ALTER TABLE tmp;
+--connection con1
+unlock tables;
+--connection default
+drop table tmp;
+
+--echo #
+--echo # Test 2 (In statement format to ensure temporary table gets logged)
+--echo #
+
+set @@binlog_format=statement;
+CREATE TEMPORARY TABLE tmp (a INT);
+--connection con1
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_COMMIT;
+--connection default
+SET lock_wait_timeout= 1;
+--error ER_LOCK_WAIT_TIMEOUT
+ALTER TABLE tmp;
+--connection con1
+BACKUP STAGE end;
+--connection default
+drop table tmp;
+--disconnect con1
diff --git a/mysql-test/main/backup_lock_debug.result b/mysql-test/main/backup_lock_debug.result
new file mode 100644
index 00000000000..7c7b05901a9
--- /dev/null
+++ b/mysql-test/main/backup_lock_debug.result
@@ -0,0 +1,53 @@
+#
+# Make sure pending LOCK TABLES doesn't block BACKUP STAGE
+#
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+#
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+LOCK TABLE t1 WRITE;
+#
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+disconnect con2;
+#
+connection default;
+UNLOCK TABLES;
+#
+connection con1;
+UNLOCK TABLES;
+disconnect con1;
+#
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+#
+# Demonstrates a deadlock if BACKUP namespace is reorder after SCHEMA.
+# Culprit is ALTER TABLE taking SCHEMA lock on target database after
+# BACKUP lock was acquired.
+#
+CREATE DATABASE test2;
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+SET DEBUG_SYNC='alter_opened_table SIGNAL ready WAIT_FOR go';
+ALTER TABLE t1 RENAME TO test2.t1;
+connect con1,localhost,root,,;
+SET DEBUG_SYNC='now WAIT_FOR ready';
+BACKUP STAGE START;
+SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL ready1';
+BACKUP STAGE BLOCK_DDL;
+connect con2,localhost,root,,;
+SET DEBUG_SYNC='now WAIT_FOR ready1';
+SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL go';
+DROP DATABASE test2;
+connection default;
+connection con1;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection default;
+SET DEBUG_SYNC='reset';
diff --git a/mysql-test/main/backup_lock_debug.test b/mysql-test/main/backup_lock_debug.test
new file mode 100644
index 00000000000..80e7cf9e181
--- /dev/null
+++ b/mysql-test/main/backup_lock_debug.test
@@ -0,0 +1,78 @@
+########################################################################
+# Tests for BACKUP STAGE locking that requires debug.
+########################################################################
+
+--source include/have_debug_sync.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # Make sure pending LOCK TABLES doesn't block BACKUP STAGE
+--echo #
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+
+--echo #
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+--send LOCK TABLE t1 WRITE
+
+--echo #
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+disconnect con2;
+
+--echo #
+connection default;
+UNLOCK TABLES;
+
+--echo #
+connection con1;
+reap;
+UNLOCK TABLES;
+disconnect con1;
+
+--echo #
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+
+
+--echo #
+--echo # Demonstrates a deadlock if BACKUP namespace is reorder after SCHEMA.
+--echo # Culprit is ALTER TABLE taking SCHEMA lock on target database after
+--echo # BACKUP lock was acquired.
+--echo #
+CREATE DATABASE test2;
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+
+SET DEBUG_SYNC='alter_opened_table SIGNAL ready WAIT_FOR go';
+send ALTER TABLE t1 RENAME TO test2.t1;
+
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC='now WAIT_FOR ready';
+BACKUP STAGE START;
+SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL ready1';
+send BACKUP STAGE BLOCK_DDL;
+
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC='now WAIT_FOR ready1';
+SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL go';
+send DROP DATABASE test2;
+
+connection default;
+reap;
+
+connection con1;
+reap;
+disconnect con1;
+
+connection con2;
+reap;
+disconnect con2;
+
+connection default;
+SET DEBUG_SYNC='reset';
diff --git a/mysql-test/main/backup_locks.result b/mysql-test/main/backup_locks.result
new file mode 100644
index 00000000000..1505c39f166
--- /dev/null
+++ b/mysql-test/main/backup_locks.result
@@ -0,0 +1,167 @@
+#
+# Test lock taken
+#
+BACKUP LOCK test.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock test t1
+BACKUP UNLOCK;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+BACKUP LOCK t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock test t1
+BACKUP UNLOCK;
+BACKUP LOCK non_existing.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock non_existing t1
+BACKUP UNLOCK;
+#
+# Test that backup lock protects against ddl
+#
+connect con1,localhost,root,,;
+connection default;
+create table t1 (a int) engine=innodb;
+insert into t1 values (1);
+backup lock t1;
+select * from t1;
+a
+1
+connection con1;
+drop table t1;
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+select * from t1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+backup unlock;
+#
+# BACKUP LOCK and BACKUP UNLOCK are not allowed in procedures.
+#
+CREATE PROCEDURE p_BACKUP_LOCK()
+BEGIN
+BACKUP LOCK;
+END|
+ERROR 0A000: BACKUP LOCK is not allowed in stored procedures
+CREATE PROCEDURE p_BACKUP_UNLOCK()
+BEGIN
+BACKUP UNLOCK;
+END|
+ERROR 0A000: BACKUP UNLOCK is not allowed in stored procedures
+#
+# BACKUP STAGE doesn't work when a BACKUP LOCK is active.
+#
+CREATE TABLE t1 (a INT);
+BACKUP LOCK t1;
+BACKUP STAGE START;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+BACKUP UNLOCK;
+DROP TABLE t1;
+#
+# FLUSH TABLES WITH READ LOCK is not allowed when BACKUP LOCK is active.
+#
+CREATE TABLE t1 (a INT);
+BACKUP LOCK t1;
+FLUSH TABLES t1 WITH READ LOCK;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+BACKUP UNLOCK;
+BACKUP LOCK t1;
+FLUSH TABLES WITH READ LOCK;
+BACKUP UNLOCK;
+UNLOCK TABLES;
+DROP TABLE t1;
+#
+# MDEV-20945 BACKUP UNLOCK assertion failures.
+#
+# Scenario 1.
+CREATE TABLE t1 (a INT);
+BACKUP LOCK t1;
+FLUSH TABLE t1 WITH READ LOCK;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+UNLOCK TABLES;
+BACKUP UNLOCK;
+DROP TABLE t1;
+# Scenario 2.
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+LOCK TABLES t2 AS a2 WRITE;
+BACKUP LOCK t1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+UNLOCK TABLES;
+INSERT INTO t1 VALUES(0);
+# restart
+DROP TABLE t1;
+DROP TABLE t2;
+# Scenario 3.
+CREATE TEMPORARY TABLE t3 (c INT);
+BACKUP LOCK t1;
+SET @@SESSION.profiling=ON;
+CREATE TABLE t1 (c INT);
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+LOCK TABLES t3 AS a1 READ, t1 AS a3 READ, t3 AS a5 READ LOCAL;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+UNLOCK TABLE;
+# restart
+# Scenario 4.
+CREATE TABLE t (c INT);
+BACKUP LOCK not_existing.t;
+LOCK TABLES t WRITE;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+UNLOCK TABLES;
+# restart
+DROP TABLE t;
+# Scenario 5.
+BACKUP LOCK t1;
+CREATE TABLE t2 (c1 TIME, c2 TIME, c3 DATE, KEY(c1, c2));
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+LOCK TABLE t2 READ;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+# restart
+# Scenario 6.
+BACKUP LOCK t;
+CREATE VIEW v AS SELECT 1;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+LOCK TABLES v READ;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+START TRANSACTION READ ONLY;
+BACKUP LOCK t;
+# restart
+# Scenario 7.
+SET SQL_MODE='';
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
+CREATE TABLE t (a INT) ENGINE=Aria;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+CREATE TEMPORARY TABLE IF NOT EXISTS s (c INT) ENGINE=Aria;
+LOCK TABLES s AS a READ LOCAL,t AS b WRITE;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
+# restart
+#
+connection con1;
+connection default;
+disconnect con1;
+show tables;
+Tables_in_test
+#
+# MDEV-22879 SIGSEGV (or hang) in free/my_free from
+# _ma_end_block_record (on optimized builds)
+#
+SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
+CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+BACKUP UNLOCK;
+CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
+SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
+LOCK TABLES t3 AS a2 WRITE, t3 AS a1 READ LOCAL;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+DROP TABLE t3;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+BACKUP UNLOCK;
+DROP TABLE t3;
+#
+# End of MariaDB 10.4 tests
+#
diff --git a/mysql-test/main/backup_locks.test b/mysql-test/main/backup_locks.test
new file mode 100644
index 00000000000..d2f3d95d703
--- /dev/null
+++ b/mysql-test/main/backup_locks.test
@@ -0,0 +1,192 @@
+########################################################################
+# Tests BACKUP STAGE locking
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # Test lock taken
+--echo #
+
+BACKUP LOCK test.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP UNLOCK;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP LOCK t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP UNLOCK;
+BACKUP LOCK non_existing.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP UNLOCK;
+
+--echo #
+--echo # Test that backup lock protects against ddl
+--echo #
+
+connect (con1,localhost,root,,);
+
+connection default;
+create table t1 (a int) engine=innodb;
+insert into t1 values (1);
+backup lock t1;
+select * from t1;
+connection con1;
+--send drop table t1
+connection default;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+--error ER_LOCK_DEADLOCK
+select * from t1;
+backup unlock;
+
+--echo #
+--echo # BACKUP LOCK and BACKUP UNLOCK are not allowed in procedures.
+--echo #
+delimiter |;
+--error ER_SP_BADSTATEMENT
+CREATE PROCEDURE p_BACKUP_LOCK()
+BEGIN
+ BACKUP LOCK;
+END|
+--error ER_SP_BADSTATEMENT
+CREATE PROCEDURE p_BACKUP_UNLOCK()
+BEGIN
+ BACKUP UNLOCK;
+END|
+delimiter ;|
+
+--echo #
+--echo # BACKUP STAGE doesn't work when a BACKUP LOCK is active.
+--echo #
+CREATE TABLE t1 (a INT);
+BACKUP LOCK t1;
+--error ER_CANT_UPDATE_WITH_READLOCK
+BACKUP STAGE START;
+BACKUP UNLOCK;
+DROP TABLE t1;
+
+--echo #
+--echo # FLUSH TABLES WITH READ LOCK is not allowed when BACKUP LOCK is active.
+--echo #
+CREATE TABLE t1 (a INT);
+BACKUP LOCK t1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+FLUSH TABLES t1 WITH READ LOCK;
+BACKUP UNLOCK;
+
+BACKUP LOCK t1;
+FLUSH TABLES WITH READ LOCK;
+BACKUP UNLOCK;
+UNLOCK TABLES;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20945 BACKUP UNLOCK assertion failures.
+--echo #
+
+--echo # Scenario 1.
+CREATE TABLE t1 (a INT);
+BACKUP LOCK t1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+FLUSH TABLE t1 WITH READ LOCK;
+UNLOCK TABLES;
+BACKUP UNLOCK; # Shouldn't trigger an assertion.
+DROP TABLE t1;
+
+--echo # Scenario 2.
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+LOCK TABLES t2 AS a2 WRITE;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+BACKUP LOCK t1;
+UNLOCK TABLES;
+INSERT INTO t1 VALUES(0);
+--source include/restart_mysqld.inc
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo # Scenario 3.
+CREATE TEMPORARY TABLE t3 (c INT);
+BACKUP LOCK t1; # Table `t1` doesn't exist.
+SET @@SESSION.profiling=ON;
+--error ER_CANT_UPDATE_WITH_READLOCK
+CREATE TABLE t1 (c INT);
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+LOCK TABLES t3 AS a1 READ, t1 AS a3 READ, t3 AS a5 READ LOCAL;
+UNLOCK TABLE;
+--source include/restart_mysqld.inc
+
+--echo # Scenario 4.
+CREATE TABLE t (c INT);
+BACKUP LOCK not_existing.t;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+LOCK TABLES t WRITE;
+UNLOCK TABLES;
+--source include/restart_mysqld.inc
+DROP TABLE t;
+
+--echo # Scenario 5.
+BACKUP LOCK t1;
+--error ER_CANT_UPDATE_WITH_READLOCK
+CREATE TABLE t2 (c1 TIME, c2 TIME, c3 DATE, KEY(c1, c2));
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+LOCK TABLE t2 READ;
+--source include/restart_mysqld.inc
+
+--echo # Scenario 6.
+BACKUP LOCK t;
+--error ER_CANT_UPDATE_WITH_READLOCK
+CREATE VIEW v AS SELECT 1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+LOCK TABLES v READ;
+START TRANSACTION READ ONLY;
+BACKUP LOCK t;
+--source include/restart_mysqld.inc
+
+--echo # Scenario 7.
+SET SQL_MODE='';
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
+--error ER_CANT_UPDATE_WITH_READLOCK
+CREATE TABLE t (a INT) ENGINE=Aria;
+CREATE TEMPORARY TABLE IF NOT EXISTS s (c INT) ENGINE=Aria;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+LOCK TABLES s AS a READ LOCAL,t AS b WRITE;
+--let $q= `SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE`
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.u;
+--source include/restart_mysqld.inc
+
+--echo #
+
+connection con1;
+--reap
+connection default;
+disconnect con1;
+show tables;
+
+--echo #
+--echo # MDEV-22879 SIGSEGV (or hang) in free/my_free from
+--echo # _ma_end_block_record (on optimized builds)
+--echo #
+
+SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
+--error ER_CANT_UPDATE_WITH_READLOCK
+CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
+BACKUP UNLOCK;
+
+CREATE TABLE IF NOT EXISTS t3 (c1 CHAR(1) BINARY,c2 SMALLINT(10),c3 NUMERIC(1,0), PRIMARY KEY(c1(1))) ENGINE=InnoDB;
+SET STATEMENT max_statement_time=20 FOR BACKUP LOCK test.t1;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+LOCK TABLES t3 AS a2 WRITE, t3 AS a1 READ LOCAL;
+--error ER_CANT_UPDATE_WITH_READLOCK
+DROP TABLE t3;
+BACKUP UNLOCK;
+DROP TABLE t3;
+
+--echo #
+--echo # End of MariaDB 10.4 tests
+--echo #
diff --git a/mysql-test/main/backup_priv.result b/mysql-test/main/backup_priv.result
new file mode 100644
index 00000000000..4169f58f40f
--- /dev/null
+++ b/mysql-test/main/backup_priv.result
@@ -0,0 +1,40 @@
+#
+# Test privileges for BACKUP STAGES
+#
+set sql_mode="";
+GRANT RELOAD ON *.* TO user1@localhost;
+GRANT CREATE, DROP ON *.* TO user2@localhost;
+connect con1, localhost, user1;
+BACKUP STAGE START;
+BACKUP STAGE END;
+# change_user must release backup lock
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+lock_mode
+MDL_BACKUP_FLUSH
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+lock_mode
+disconnect con1;
+connection default;
+# A very low privileged user (-> con4) cannot acquire the backup lock
+connect con1, localhost, user2;
+BACKUP STAGE START;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE FLUSH;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE BLOCK_DDL;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE BLOCK_COMMIT;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE END;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+disconnect con1;
+connection default;
+DROP USER user1@localhost, user2@localhost;
+#
+# Test using BACKUP STAGES in a SP
+#
+create procedure foo42()
+BACKUP STAGE START;
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
diff --git a/mysql-test/main/backup_priv.test b/mysql-test/main/backup_priv.test
new file mode 100644
index 00000000000..93b69af0b67
--- /dev/null
+++ b/mysql-test/main/backup_priv.test
@@ -0,0 +1,52 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+--source include/have_metadata_lock_info.inc
+
+--echo #
+--echo # Test privileges for BACKUP STAGES
+--echo #
+
+set sql_mode="";
+
+GRANT RELOAD ON *.* TO user1@localhost;
+GRANT CREATE, DROP ON *.* TO user2@localhost;
+
+--connect(con1, localhost, user1)
+BACKUP STAGE START;
+BACKUP STAGE END;
+--echo # change_user must release backup lock
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+change_user user2;
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+--disconnect con1
+--source include/wait_until_disconnected.inc
+--connection default
+
+--echo # A very low privileged user (-> con4) cannot acquire the backup lock
+
+--connect(con1, localhost, user2)
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE START;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE FLUSH;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE BLOCK_DDL;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE END;
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--connection default
+DROP USER user1@localhost, user2@localhost;
+
+--echo #
+--echo # Test using BACKUP STAGES in a SP
+--echo #
+
+--error ER_SP_BADSTATEMENT
+create procedure foo42()
+ BACKUP STAGE START;
diff --git a/mysql-test/main/backup_stages.result b/mysql-test/main/backup_stages.result
new file mode 100644
index 00000000000..4704a4b6bd1
--- /dev/null
+++ b/mysql-test/main/backup_stages.result
@@ -0,0 +1,335 @@
+#-----------------------------------------------------------------------
+# Multi-threaded tests
+#-----------------------------------------------------------------------
+# Show that only one connection can hold the backup lock.
+connection default;
+BACKUP STAGE START;
+connect con1,localhost,root,,;
+SET STATEMENT lock_wait_timeout=0 FOR BACKUP STAGE START;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+BACKUP STAGE START;
+connection default;
+# Show that the connection con1 has to wait for the backup lock and the
+# corresponding representation within the processlist.
+SET @con1_id = <con1_id>;
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con1_id;
+ID USER COMMAND STATE INFO STAGE MAX_STAGE INFO_BINARY
+<con1_id> root Query Waiting for backup lock BACKUP STAGE START 0 0 BACKUP STAGE START
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_START Backup lock
+connection con1;
+# The connection default has removed the backup lock.
+# And so the current connection con1 can reap for its BACKUP STAGE START
+connect con2,localhost,root,,;
+# The connection con2 cannot continue the work of con1 by setting the
+# next BACKUP STAGE FLUSH.
+BACKUP STAGE FLUSH;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE START;
+connection default;
+SET @con2_id = <con2_id>;
+# Connection con2 waits for the backup lock held by con1.
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con2_id;
+ID USER COMMAND STATE INFO STAGE MAX_STAGE INFO_BINARY
+<con2_id> root Query Waiting for backup lock BACKUP STAGE START 0 0 BACKUP STAGE START
+disconnect con1;
+connection con2;
+# Connection con1 frees the backup lock held by disconnecting.
+# So connection con2 gets the backup lock.
+connect con3,localhost,root,,;
+BACKUP STAGE START;
+connection default;
+SET @con3_id = <con3_id>;
+# Connection con3 waits for the backup lock held by con2.
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con3_id;
+ID USER COMMAND STATE INFO STAGE MAX_STAGE INFO_BINARY
+<con3_id> root Query Waiting for backup lock BACKUP STAGE START 0 0 BACKUP STAGE START
+KILL CONNECTION @con2_id;
+connection con3;
+# Connection con2 frees the backup lock held by getting killed.
+# So connection con3 gets the backup lock.
+BACKUP STAGE END;
+disconnect con3;
+connection default;
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_myisam SET col1 = 1;
+connect backup,localhost,root,,;
+connect con11,localhost,root,,;
+SET AUTOCOMMIT = 0;
+set session lock_wait_timeout=1;
+connect con12,localhost,root,,;
+SET AUTOCOMMIT = 1;
+# Between (connection default) BACKUP STAGE START and FLUSH
+# no restrictions for concurrent sessions regarding DDL or DML
+# affecting transactional/non transactional permanent tables.
+connection backup;
+BACKUP STAGE START;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 2;
+UPDATE t_permanent_myisam SET col1 = 2;
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1
+2
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1
+2
+HANDLER t_permanent_myisam CLOSE;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_permanent_myisam ADD COLUMN col2 INT;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+connection con12;
+UPDATE t_permanent_innodb SET col1 = 3;
+UPDATE t_permanent_myisam SET col1 = 3;
+# Between (connection default) BACKUP STAGE FLUSH and BLOCK_DDL
+# concurrent sessions
+# - can change transactional permanent tables with DDL and DML
+# - can run DROP/CREATE transactional/non transactional TABLE
+# - cannot modify non transactional permanent tables with DDL or DML
+connection backup;
+BACKUP STAGE FLUSH;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 4;
+SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_myisam SET col1 = 4;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1 col2
+4 NULL
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1 col2
+3 NULL
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col3 INT;
+SET STATEMENT lock_wait_timeout=0 FOR ALTER TABLE t_permanent_myisam ADD COLUMN col3 INT;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+connection con12;
+UPDATE t_permanent_innodb SET col1 = 5;
+# Between (connection default) BACKUP STAGE BLOCK_DDL and BLOCK_COMMIT
+# concurrent sessions
+# - can change transactional permanent tables with DML
+# - cannot run DDL
+# - cannot change non transactional permanent tables with DML
+connection backup;
+BACKUP STAGE BLOCK_DDL;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 6;
+UPDATE t_permanent_myisam SET col1 = 6;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1 col2 col3
+6 NULL NULL
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1 col2
+3 NULL
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ALTER TABLE t_permanent_innodb ADD COLUMN col4 INT;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con12;
+UPDATE t_permanent_innodb SET col1 = 7;
+# Between (connection default) BACKUP STAGE BLOCK_COMMIT and END
+# concurrent sessions
+# - can change transactional permanent tables with DML
+# - cannot run DDL
+# - cannot change non transactional permanent tables with DML
+connection backup;
+BACKUP STAGE BLOCK_COMMIT;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 8;
+UPDATE t_permanent_myisam SET col1 = 8;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1 col2 col3
+8 NULL NULL
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1 col2
+3 NULL
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t_con1_myisam;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con12;
+SET STATEMENT lock_wait_timeout=1 FOR UPDATE t_permanent_innodb SET col1 = 9;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection backup;
+BACKUP STAGE END;
+connection con11;
+COMMIT;
+SELECT * FROM t_permanent_innodb ORDER BY col1;
+col1 col2 col3
+7 NULL NULL
+SELECT * FROM t_permanent_myisam ORDER BY col1;
+col1 col2
+3 NULL
+SET AUTOCOMMIT = 0;
+SET GLOBAL tx_read_only = 1;
+connection con12;
+BACKUP STAGE START;
+BACKUP STAGE END;
+SET GLOBAL tx_read_only = 0;
+DROP VIEW v_some_view;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+# Connection backup holds the backup log and is on some stage.
+# Connection con11 tries to LOCK TABLEs or to set read_only.
+connection backup;
+BACKUP STAGE START;
+connection con11;
+# Between BACKUP STAGE START and FLUSH:
+# No restrictions for other connection around LOCK TABLES or read-only.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE FLUSH;
+connection con11;
+# Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+# Connection con11 not holding the backup lock cannot
+# LOCK WRITE non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+LOCK TABLES t_permanent_myisam WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE BLOCK_DDL;
+connection con11;
+# Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+# Connection con11 not holding the backup lock cannot
+# LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+LOCK TABLES t_permanent_myisam WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE BLOCK_COMMIT;
+connection con11;
+# Between BACKUP BLOCK_COMMIT FLUSH and END:
+# Connection con11 not holding the backup lock cannot
+# LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+LOCK TABLES t_permanent_myisam WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE END;
+DROP TABLE t_permanent_innodb;
+DROP TABLE t_permanent_myisam;
+#
+# Log tables
+#
+connection backup;
+SET @old_general_log = @@general_log;
+SET @old_slow_query_log = @@slow_query_log;
+SET @old_log_output = @@log_output;
+SET GLOBAL log_output = 'TABLE';
+SET GLOBAL general_log = ON;
+SET GLOBAL slow_query_log = ON;
+connection con11;
+SET @old_long_query_time = @@SESSION.long_query_time;
+SET SESSION long_query_time = 0;
+connection backup;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+connection con11;
+SELECT 1;
+1
+1
+connection backup;
+SELECT 1;
+1
+1
+connection con11;
+SET SESSION long_query_time = @old_long_query_time;
+connection backup;
+BACKUP STAGE END;
+SET GLOBAL log_output = @old_log_output;
+SET GLOBAL slow_query_log = @old_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+#-----------------------------------------------------------------------
+# Cleanup
+#-----------------------------------------------------------------------
+SET GLOBAL lock_wait_timeout = <old_lock_wait_timeout>;
+disconnect con2;
+disconnect con11;
+disconnect con12;
+disconnect backup;
+connection default;
diff --git a/mysql-test/main/backup_stages.test b/mysql-test/main/backup_stages.test
new file mode 100644
index 00000000000..e8cc5f7a7b9
--- /dev/null
+++ b/mysql-test/main/backup_stages.test
@@ -0,0 +1,385 @@
+########################################################################
+# Test what is locked in each stage for LOCK FOR BACKUP (MDEV-5336)
+########################################################################
+
+--source include/not_embedded.inc
+# A transactional engine
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+# As non transactional engine we have MyISAM anyway.
+
+# Save the initial number of concurrent sessions.
+--source include/count_sessions.inc
+
+let $old_lock_wait_timeout = `SELECT @@global.lock_wait_timeout`;
+
+--echo #-----------------------------------------------------------------------
+--echo # Multi-threaded tests
+--echo #-----------------------------------------------------------------------
+--echo # Show that only one connection can hold the backup lock.
+
+--connection default
+let $default_id= `SELECT CONNECTION_ID()`;
+BACKUP STAGE START;
+
+# con1, root high privileged user
+--connect(con1,localhost,root,,)
+let $con1_id= `SELECT CONNECTION_ID()`;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR BACKUP STAGE START;
+send BACKUP STAGE START;
+--connection default
+
+--echo # Show that the connection con1 has to wait for the backup lock and the
+--echo # corresponding representation within the processlist.
+
+--replace_result $con1_id <con1_id>
+
+eval SET @con1_id = $con1_id;
+# Output expected here is
+# ID USER COMMAND STATE INFO INFO_BINARY
+# <con1_id> root Query Waiting for backup lock BACKUP STAGE START BACKUP STAGE START
+let $wait_condition=
+ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE STATE = "Waiting for backup lock" and INFO = "BACKUP STAGE START";
+--source include/wait_condition.inc
+--replace_column 1 <con1_id>
+eval
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con1_id;
+# con1 uses @@global.lock_wait_timeout
+
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+
+--connection con1
+--echo # The connection default has removed the backup lock.
+--echo # And so the current connection con1 can reap for its BACKUP STAGE START
+--reap
+
+# con2, root high privileged user
+--connect(con2,localhost,root,,)
+let $con2_id= `SELECT CONNECTION_ID()`;
+--echo # The connection con2 cannot continue the work of con1 by setting the
+--echo # next BACKUP STAGE FLUSH.
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE FLUSH;
+send
+BACKUP STAGE START;
+
+--connection default
+--replace_result $con2_id <con2_id>
+eval SET @con2_id = $con2_id;
+--echo # Connection con2 waits for the backup lock held by con1.
+--source include/wait_condition.inc
+--replace_column 1 <con2_id>
+eval
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con2_id;
+
+--disconnect con1
+
+--connection con2
+--echo # Connection con1 frees the backup lock held by disconnecting.
+--echo # So connection con2 gets the backup lock.
+--reap
+
+--connect(con3,localhost,root,,)
+let $con3_id= `SELECT CONNECTION_ID()`;
+send
+BACKUP STAGE START;
+
+--connection default
+--replace_result $con3_id <con3_id>
+eval SET @con3_id = $con3_id;
+--echo # Connection con3 waits for the backup lock held by con2.
+--source include/wait_condition.inc
+--replace_column 1 <con3_id>
+eval
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con3_id;
+KILL CONNECTION @con2_id;
+
+--connection con3
+--echo # Connection con2 frees the backup lock held by getting killed.
+--echo # So connection con3 gets the backup lock.
+--reap
+BACKUP STAGE END;
+disconnect con3;
+--connection default
+
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_myisam SET col1 = 1;
+
+# backup : Try the BACKUP STAGE sequence
+# con11 : Try DDL + DML with AUTOCOMMIT = 0
+# con12 : Try DML with AUTOCOMMIT = 1
+--connect(backup,localhost,root,,)
+--connect(con11,localhost,root,,)
+SET AUTOCOMMIT = 0;
+set session lock_wait_timeout=1;
+--connect(con12,localhost,root,,)
+SET AUTOCOMMIT = 1;
+
+--echo # Between (connection default) BACKUP STAGE START and FLUSH
+--echo # no restrictions for concurrent sessions regarding DDL or DML
+--echo # affecting transactional/non transactional permanent tables.
+
+--connection backup
+BACKUP STAGE START;
+--connection con11
+UPDATE t_permanent_innodb SET col1 = 2;
+UPDATE t_permanent_myisam SET col1 = 2;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_permanent_myisam ADD COLUMN col2 INT;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+--connection con12
+UPDATE t_permanent_innodb SET col1 = 3;
+UPDATE t_permanent_myisam SET col1 = 3;
+
+--echo # Between (connection default) BACKUP STAGE FLUSH and BLOCK_DDL
+--echo # concurrent sessions
+--echo # - can change transactional permanent tables with DDL and DML
+--echo # - can run DROP/CREATE transactional/non transactional TABLE
+--echo # - cannot modify non transactional permanent tables with DDL or DML
+
+--connection backup
+BACKUP STAGE FLUSH;
+--connection con11
+UPDATE t_permanent_innodb SET col1 = 4;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_myisam SET col1 = 4;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col3 INT;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR ALTER TABLE t_permanent_myisam ADD COLUMN col3 INT;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+--connection con12
+UPDATE t_permanent_innodb SET col1 = 5;
+
+
+--echo # Between (connection default) BACKUP STAGE BLOCK_DDL and BLOCK_COMMIT
+--echo # concurrent sessions
+--echo # - can change transactional permanent tables with DML
+--echo # - cannot run DDL
+--echo # - cannot change non transactional permanent tables with DML
+
+--connection backup
+BACKUP STAGE BLOCK_DDL;
+--connection con11
+
+UPDATE t_permanent_innodb SET col1 = 6;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_myisam SET col1 = 6;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_innodb;
+--error ER_LOCK_WAIT_TIMEOUT
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+--error ER_LOCK_WAIT_TIMEOUT
+ALTER TABLE t_permanent_innodb ADD COLUMN col4 INT;
+--error ER_LOCK_WAIT_TIMEOUT
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+--error ER_LOCK_WAIT_TIMEOUT
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+--connection con12
+UPDATE t_permanent_innodb SET col1 = 7;
+
+
+--echo # Between (connection default) BACKUP STAGE BLOCK_COMMIT and END
+--echo # concurrent sessions
+--echo # - can change transactional permanent tables with DML
+--echo # - cannot run DDL
+--echo # - cannot change non transactional permanent tables with DML
+
+--connection backup
+BACKUP STAGE BLOCK_COMMIT;
+--connection con11
+UPDATE t_permanent_innodb SET col1 = 8;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_myisam SET col1 = 8;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_innodb;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_myisam;
+--connection con12
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=1 FOR UPDATE t_permanent_innodb SET col1 = 9;
+
+--connection backup
+BACKUP STAGE END;
+--connection con11
+COMMIT;
+SELECT * FROM t_permanent_innodb ORDER BY col1;
+SELECT * FROM t_permanent_myisam ORDER BY col1;
+SET AUTOCOMMIT = 0;
+SET GLOBAL tx_read_only = 1;
+--connection con12
+BACKUP STAGE START;
+BACKUP STAGE END;
+SET GLOBAL tx_read_only = 0;
+DROP VIEW v_some_view;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+
+--echo # Connection backup holds the backup log and is on some stage.
+--echo # Connection con11 tries to LOCK TABLEs or to set read_only.
+
+--connection backup
+BACKUP STAGE START;
+--connection con11
+--echo # Between BACKUP STAGE START and FLUSH:
+--echo # No restrictions for other connection around LOCK TABLES or read-only.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE FLUSH;
+--connection con11
+--echo # Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+--echo # Connection con11 not holding the backup lock cannot
+--echo # LOCK WRITE non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE BLOCK_DDL;
+--connection con11
+--echo # Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+--echo # Connection con11 not holding the backup lock cannot
+--echo # LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_innodb WRITE;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE BLOCK_COMMIT;
+--connection con11
+--echo # Between BACKUP BLOCK_COMMIT FLUSH and END:
+--echo # Connection con11 not holding the backup lock cannot
+--echo # LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_innodb WRITE;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE END;
+
+DROP TABLE t_permanent_innodb;
+DROP TABLE t_permanent_myisam;
+
+--echo #
+--echo # Log tables
+--echo #
+
+--connection backup
+
+SET @old_general_log = @@general_log;
+SET @old_slow_query_log = @@slow_query_log;
+SET @old_log_output = @@log_output;
+
+SET GLOBAL log_output = 'TABLE';
+SET GLOBAL general_log = ON;
+SET GLOBAL slow_query_log = ON;
+
+
+--connection con11
+SET @old_long_query_time = @@SESSION.long_query_time;
+SET SESSION long_query_time = 0;
+
+--connection backup
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+
+--connection con11
+SELECT 1;
+
+--connection backup
+SELECT 1;
+
+--connection con11
+SET SESSION long_query_time = @old_long_query_time;
+
+--connection backup
+BACKUP STAGE END;
+
+SET GLOBAL log_output = @old_log_output;
+SET GLOBAL slow_query_log = @old_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+
+--echo #-----------------------------------------------------------------------
+--echo # Cleanup
+--echo #-----------------------------------------------------------------------
+
+--replace_result $old_lock_wait_timeout <old_lock_wait_timeout>
+eval
+SET GLOBAL lock_wait_timeout = $old_lock_wait_timeout;
+
+--disconnect con2
+--disconnect con11
+--disconnect con12
+--disconnect backup
+
+--connection default
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/main/backup_syntax.result b/mysql-test/main/backup_syntax.result
new file mode 100644
index 00000000000..4b8e74edd57
--- /dev/null
+++ b/mysql-test/main/backup_syntax.result
@@ -0,0 +1,163 @@
+#-----------------------------------------------------------------------
+# Basic syntax checks
+#-----------------------------------------------------------------------
+# Check existing BACKUP STAGE statements in the sequence to be used.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+# Check invalid variants of BACKUP .... syntax.
+BACKUP LOG;
+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 'LOG' at line 1
+BACKUP LOCK;
+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 '' at line 1
+BACKUP STAGE;
+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 '' at line 1
+BACKUP STAGE LOCK;
+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 'LOCK' at line 1
+BACKUP STAGE not_existing;
+ERROR HY000: Unknown backup stage: 'not_existing'. Stage should be one of START, FLUSH, BLOCK_DDL, BLOCK_COMMIT or END
+#-----------------------------------------------------------------------
+# BACKUP STAGE statements in various orders.
+#-----------------------------------------------------------------------
+# All BACKUP STAGE statements != 'BACKUP STAGE START' expect that a
+# backup lock (generated by BACKUP STAGE START) already exists.
+#
+backup stage start;
+backup stage flush;
+backup stage start;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
+backup stage start;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
+backup stage block_commit;
+backup stage flush;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
+backup stage flush;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
+backup stage end;
+backup stage flush;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE END;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE BLOCK_COMMIT;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE FLUSH;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+# Ordered "give up" with 'BACKUP STAGE END' because of whatever reason.
+# Some existing backup lock assumed a 'BACKUP STAGE END' is allowed in
+# every situation.
+BACKUP STAGE START;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+# Orders with BACKUP STAGE FLUSH omitted.
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+# Orders with BACKUP STAGE BLOCK_DDL omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+# Orders with BACKUP STAGE BLOCK_COMMIT omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+# Orders with doubled BACKUP STAGE statements.
+# We get an error but that seems to have no bad impact on the state.
+# And so we are allowed to go on with BACKUP STAGE statements.
+BACKUP STAGE START;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'START'
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'FLUSH'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE BLOCK_COMMIT;
+ERROR HY000: Backup stage 'BLOCK_COMMIT' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+# Scrambled orders.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#
+# Check Oracle syntax
+#
+set SQL_MODE=Oracle;
+backup stage start;
+backup stage end;
+set SQL_MODE=default;
diff --git a/mysql-test/main/backup_syntax.test b/mysql-test/main/backup_syntax.test
new file mode 100644
index 00000000000..f02c69bdd85
--- /dev/null
+++ b/mysql-test/main/backup_syntax.test
@@ -0,0 +1,181 @@
+########################################################################
+# Tests things releated to syntax of BACKUP STAGE (MDEV-5336)
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Basic syntax checks
+--echo #-----------------------------------------------------------------------
+
+--echo # Check existing BACKUP STAGE statements in the sequence to be used.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+
+--echo # Check invalid variants of BACKUP .... syntax.
+--error ER_PARSE_ERROR
+BACKUP LOG;
+--error ER_PARSE_ERROR
+BACKUP LOCK;
+--error ER_PARSE_ERROR
+BACKUP STAGE;
+--error ER_PARSE_ERROR
+BACKUP STAGE LOCK;
+--error ER_BACKUP_UNKNOWN_STAGE
+BACKUP STAGE not_existing;
+
+--echo #-----------------------------------------------------------------------
+--echo # BACKUP STAGE statements in various orders.
+--echo #-----------------------------------------------------------------------
+--echo # All BACKUP STAGE statements != 'BACKUP STAGE START' expect that a
+--echo # backup lock (generated by BACKUP STAGE START) already exists.
+--echo #
+
+backup stage start;
+backup stage flush;
+--error ER_BACKUP_WRONG_STAGE
+backup stage start;
+--error ER_BACKUP_WRONG_STAGE
+backup stage start;
+backup stage block_commit;
+--error ER_BACKUP_WRONG_STAGE
+backup stage flush;
+--error ER_BACKUP_WRONG_STAGE
+backup stage flush;
+backup stage end;
+--error ER_BACKUP_NOT_RUNNING
+backup stage flush;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE END;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE FLUSH;
+
+--echo # Ordered "give up" with 'BACKUP STAGE END' because of whatever reason.
+--echo # Some existing backup lock assumed a 'BACKUP STAGE END' is allowed in
+--echo # every situation.
+
+BACKUP STAGE START;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo # Orders with BACKUP STAGE FLUSH omitted.
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo # Orders with BACKUP STAGE BLOCK_DDL omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo # Orders with BACKUP STAGE BLOCK_COMMIT omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+
+--echo # Orders with doubled BACKUP STAGE statements.
+--echo # We get an error but that seems to have no bad impact on the state.
+--echo # And so we are allowed to go on with BACKUP STAGE statements.
+
+BACKUP STAGE START;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+
+--echo # Scrambled orders.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+
+--echo #
+--echo # Check Oracle syntax
+--echo #
+
+set SQL_MODE=Oracle;
+backup stage start;
+backup stage end;
+set SQL_MODE=default;
diff --git a/mysql-test/main/bootstrap.result b/mysql-test/main/bootstrap.result
index a7365d4f462..96aec014093 100644
--- a/mysql-test/main/bootstrap.result
+++ b/mysql-test/main/bootstrap.result
@@ -1,11 +1,13 @@
drop table if exists t1;
+# Kill the server
+# restart
drop table t1;
+# Kill the server
+# restart
drop table t1;
ERROR 42S02: Unknown table 'test.t1'
-set @my_max_allowed_packet= @@max_allowed_packet;
-set @@global.max_allowed_packet= greatest(1073741824, @@max_allowed_packet);
-set @max_allowed_packed=@@global.max_allowed_packet;
-set global max_allowed_packet=@my_max_allowed_packet;
+# Kill the server
+# restart
drop table t1;
End of 5.1 tests
#
@@ -15,7 +17,11 @@ End of 5.1 tests
SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
and SUPPORT='YES';
+# Kill the server
+# restart
End of 5.5 tests
+# Kill the server
+# restart
flush tables;
show create table t1;
Table Create Table
@@ -27,3 +33,5 @@ select * from mysql.plugin;
name dl
EXAMPLE ha_example.so
truncate table mysql.plugin;
+# Kill the server
+# restart
diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test
index cd13a2748d1..d75d3154064 100644
--- a/mysql-test/main/bootstrap.test
+++ b/mysql-test/main/bootstrap.test
@@ -1,3 +1,4 @@
+--source include/not_embedded.inc
#
# test mysqld in bootstrap mode
#
@@ -15,7 +16,9 @@ let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --def
use test;
CREATE TABLE t1(a int);
EOF
+--source include/kill_mysqld.inc
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
+--source include/start_mysqld.inc
drop table t1;
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
#
@@ -25,9 +28,11 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
use test;
CREATE TABLE t1;
EOF
+--source include/kill_mysqld.inc
--error 1
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
# Table t1 should not exists
+--source include/start_mysqld.inc
--error 1051
drop table t1;
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
@@ -35,18 +40,15 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
#
# Bootstrap with a large thd->net.max_packet
#
-set @my_max_allowed_packet= @@max_allowed_packet;
-set @@global.max_allowed_packet= greatest(1073741824, @@max_allowed_packet);
-set @max_allowed_packed=@@global.max_allowed_packet;
--disable_query_log
create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1;
--enable_query_log
+--source include/kill_mysqld.inc
--error 1
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/long_query.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/long_query.sql;
-
-set global max_allowed_packet=@my_max_allowed_packet;
+--source include/start_mysqld.inc
drop table t1;
--echo End of 5.1 tests
@@ -60,6 +62,7 @@ drop table t1;
SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
and SUPPORT='YES';
+--source include/kill_mysqld.inc
#
# MDEV-13063 Server crashes in intern_plugin_lock or assertion `plugin_ptr->ref_count == 1' fails in plugin_init
#
@@ -75,6 +78,7 @@ EOF
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/1 >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/1
+--source include/start_mysqld.inc
--echo End of 5.5 tests
--source include/not_windows_embedded.inc
@@ -83,6 +87,7 @@ EOF
# Check that --bootstrap can install and uninstall plugins
#
let $PLUGIN_DIR=`select @@plugin_dir`;
+--source include/kill_mysqld.inc
--write_file $MYSQLTEST_VARDIR/tmp/install_plugin.sql
install soname 'ha_example';
uninstall plugin unusable;
@@ -100,6 +105,7 @@ create table t1(a int) engine=example charset=latin1;
EOF
--exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql
+--source include/start_mysqld.inc
flush tables;
show create table t1;
drop table t1;
@@ -114,6 +120,7 @@ truncate table mysql.plugin;
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql
use test;
EOF
+--source include/kill_mysqld.inc
--exec $MYSQLD_BOOTSTRAP_CMD --ignore-db-dirs='some_dir' --ignore-db-dirs='some_dir' < $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql
@@ -125,3 +132,5 @@ use test;
EOF
--exec $MYSQLD_BOOTSTRAP_CMD --default-time-zone=Europe/Moscow < $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql
+
+--source include/start_mysqld.inc
diff --git a/mysql-test/main/bootstrap_innodb.result b/mysql-test/main/bootstrap_innodb.result
index 2fc7800843b..2807a9776a5 100644
--- a/mysql-test/main/bootstrap_innodb.result
+++ b/mysql-test/main/bootstrap_innodb.result
@@ -1,4 +1,5 @@
create table t1(a int) engine=innodb;
+# restart
select * from t1;
a
1
diff --git a/mysql-test/main/brackets.result b/mysql-test/main/brackets.result
new file mode 100644
index 00000000000..17516af3d3f
--- /dev/null
+++ b/mysql-test/main/brackets.result
@@ -0,0 +1,4517 @@
+select 1 union ( select 2 union select 3);
+1
+1
+2
+3
+explain extended
+select 1 union ( select 2 union select 3);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+4 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+NULL UNION RESULT <union1,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select 1 AS `1` union /* select#4 */ select `__4`.`2` AS `2` from (/* select#2 */ select 2 AS `2` union /* select#3 */ select 3 AS `3`) `__4`
+select 1 union ( select 1 union select 1);
+1
+1
+explain extended
+select 1 union ( select 1 union select 1);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+4 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+NULL UNION RESULT <union1,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select 1 AS `1` union /* select#4 */ select `__4`.`1` AS `1` from (/* select#2 */ select 1 AS `1` union /* select#3 */ select 1 AS `1`) `__4`
+select 1 union all ( select 1 union select 1);
+1
+1
+1
+explain extended
+select 1 union all ( select 1 union select 1);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+4 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select 1 AS `1` union all /* select#4 */ select `__4`.`1` AS `1` from (/* select#2 */ select 1 AS `1` union /* select#3 */ select 1 AS `1`) `__4`
+select 1 union ( select 1 union all select 1);
+1
+1
+explain extended
+select 1 union ( select 1 union all select 1);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+4 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union1,4> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select 1 AS `1` union /* select#4 */ select `__4`.`1` AS `1` from (/* select#2 */ select 1 AS `1` union all /* select#3 */ select 1 AS `1`) `__4`
+select 1 union select 1 union all select 1;
+1
+1
+1
+explain extended
+select 1 union select 1 union all select 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union1,2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select 1 AS `1` union /* select#2 */ select 1 AS `1` union all /* select#3 */ select 1 AS `1`
+(select 1 as a) union (select 2) order by a;
+a
+1
+2
+explain extended
+(select 1 as a) union (select 2) order by a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
+Warnings:
+Note 1003 (/* select#1 */ select 1 AS `a`) union (/* select#2 */ select 2 AS `2`) order by `a`
+/* select#1 */ select 1 AS `a` union /* select#2 */ select 2 AS `2` order by `a`;
+a
+1
+2
+explain extended
+/* select#1 */ select 1 AS `a` union /* select#2 */ select 2 AS `2` order by `a`;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
+Warnings:
+Note 1003 /* select#1 */ select 1 AS `a` union /* select#2 */ select 2 AS `2` order by `a`
+select 1 union ( select 1 union (select 1 union (select 1 union select 1)));
+1
+1
+explain extended all
+select 1 union ( select 1 union (select 1 union (select 1 union select 1)));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+8 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+7 UNION <derived3> ALL NULL NULL NULL NULL 2 100.00
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+6 UNION <derived4> ALL NULL NULL NULL NULL 2 100.00
+4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+5 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL NULL
+NULL UNION RESULT <union3,6> ALL NULL NULL NULL NULL NULL NULL
+NULL UNION RESULT <union2,7> ALL NULL NULL NULL NULL NULL NULL
+NULL UNION RESULT <union1,8> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1/0 Filter Select: select `1` AS `1` */ select 1 AS `1` union /* select#8/0 */ select `__8`.`1` AS `1` from (/* select#2/1 Filter Select: select `1` AS `1` */ select 1 AS `1` union /* select#7/1 */ select `__7`.`1` AS `1` from (/* select#3/2 Filter Select: select `1` AS `1` */ select 1 AS `1` union /* select#6/2 */ select `__6`.`1` AS `1` from (/* select#4/3 Filter Select: select `1` AS `1` */ select 1 AS `1` union /* select#5/3 */ select 1 AS `1`) `__6`) `__7`) `__8`
+#
+# MDEV-6341: INSERT ... SELECT UNION with parenthesis
+#
+create table t1 (a int, b int);
+insert into t1 (select 1,1 union select 2,2);
+select * from t1 order by 1;
+a b
+1 1
+2 2
+delete from t1;
+insert into t1 select 1,1 union select 2,2;
+select * from t1 order by 1;
+a b
+1 1
+2 2
+drop table t1;
+CREATE OR REPLACE TABLE t1 AS SELECT 1 AS a UNION SELECT 2;
+select * from t1 order by 1;
+a
+1
+2
+drop table t1;
+CREATE OR REPLACE TABLE t1 AS (SELECT 1 AS a UNION SELECT 2);
+select * from t1 order by 1;
+a
+1
+2
+drop table t1;
+CREATE OR REPLACE VIEW v1 AS (SELECT 1 AS a);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select 1 AS `a`) latin1 latin1_swedish_ci
+drop view v1;
+CREATE OR REPLACE VIEW v1 AS SELECT 1 AS a UNION SELECT 2;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `a` union select 2 AS `2` latin1 latin1_swedish_ci
+drop view v1;
+CREATE OR REPLACE VIEW v1 AS (SELECT 1 AS a UNION SELECT 2);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `a` union select 2 AS `2` latin1 latin1_swedish_ci
+drop view v1;
+#
+# MDEV-10028: Syntax error on ((SELECT ...) UNION (SELECT ...))
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (30);
+((SELECT a FROM t1) UNION (SELECT a FROM t1));
+a
+10
+20
+30
+(SELECT * FROM t1 UNION SELECT * FROM t1);
+a
+10
+20
+30
+((SELECT a FROM t1) LIMIT 1);
+a
+10
+SELECT * FROM (SELECT 1 UNION (SELECT 2 UNION SELECT 3)) t1;
+1
+1
+2
+3
+DROP TABLE t1;
+#
+# test of several levels of ORDER BY / LIMIT
+#
+create table t1 (a int, b int);
+insert into t1 (a,b) values (1, 100), (2, 200), (3,30), (4,4);
+select a,b from t1 order by 1 limit 3;
+a b
+1 100
+2 200
+3 30
+(select a,b from t1 order by 1 limit 3) order by 2 limit 2;
+a b
+3 30
+1 100
+(select 10,1000 union select a,b from t1 order by 1 limit 3) order by 2 limit 2;
+10 1000
+3 30
+1 100
+((select a,b from t1 order by 1 limit 3) order by 2 limit 2) order by 1 limit 1;
+a b
+1 100
+((select a,b from t1 order by 1 limit 3) order by 2 limit 2) order by 1;
+a b
+1 100
+3 30
+drop table t1;
+#
+# MDEV-16359: union with 3 selects in brackets
+#
+select 1 union select 1 union select 1;
+1
+1
+(select 1 union select 1 union select 1);
+1
+1
+((select 1) union (select 1) union (select 1));
+1
+1
+#
+# MDEV-16357: union in brackets with tail
+# union with tail in brackets
+#
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES(1),(2),(3),(4);
+CREATE TABLE t2 (a int);
+INSERT INTO t2 VALUES (4),(5),(6),(7);
+(SELECT a FROM t1 UNION SELECT a FROM t2) LIMIT 1;
+a
+1
+(SELECT a FROM t1 UNION SELECT a FROM t2) ORDER BY a DESC;
+a
+7
+6
+5
+4
+3
+2
+1
+(SELECT a FROM t1 UNION SELECT a FROM t2 LIMIT 1);
+a
+1
+DROP TABLE t1,t2;
+#
+# MDEV-19324: ((SELECT ...) ORDER BY col ) LIMIT n
+#
+create table t1 (a int);
+insert into t1 values (10),(20),(30);
+select a from t1 order by a desc limit 1;
+a
+30
+explain extended select a from t1 order by a desc limit 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using filesort
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` order by `test`.`t1`.`a` desc limit 1
+explain format=json select a from t1 order by a desc limit 1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "read_sorted_file": {
+ "filesort": {
+ "sort_key": "t1.a desc",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+(select a from t1 order by a desc) limit 1;
+a
+30
+explain extended (select a from t1 order by a desc) limit 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using filesort
+Warnings:
+Note 1003 (select `test`.`t1`.`a` AS `a` from `test`.`t1` order by `test`.`t1`.`a` desc limit 1)
+explain format=json (select a from t1 order by a desc) limit 1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "read_sorted_file": {
+ "filesort": {
+ "sort_key": "t1.a desc",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+(select a from t1 where a=20 union select a from t1) order by a desc limit 1;
+a
+30
+explain extended (select a from t1 where a=20 union select a from t1) order by a desc limit 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+2 UNION t1 ALL NULL NULL NULL NULL 3 100.00
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 20 union /* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` order by `a` desc limit 1
+explain format=json (select a from t1 where a=20 union select a from t1) order by a desc limit 1;
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t1.a = 20"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+((select a from t1 where a=20 union select a from t1) order by a desc) limit 1;
+a
+30
+explain extended ((select a from t1 where a=20 union select a from t1) order by a desc) limit 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+2 UNION t1 ALL NULL NULL NULL NULL 3 100.00
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 20 union /* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` order by `a` desc limit 1
+explain format=json ((select a from t1 where a=20 union select a from t1) order by a desc) limit 1;
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t1.a = 20"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-19363: ((SELECT ...) ORDER BY col ) LIMIT n UNION ...
+#
+create table t1 (pk int);
+insert into t1 values (5),(4),(1),(2),(3);
+((select * from t1 order by pk) limit 2) union (select * from t1 where pk > 4);
+pk
+1
+2
+5
+explain extended ((select * from t1 order by pk) limit 2) union (select * from t1 where pk > 4);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00 Using filesort
+2 UNION t1 ALL NULL NULL NULL NULL 5 100.00 Using where
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 (/* select#1 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` order by `test`.`t1`.`pk` limit 2) union (/* select#2 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` where `test`.`t1`.`pk` > 4)
+explain format=json ((select * from t1 order by pk) limit 2) union (select * from t1 where pk > 4);
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "read_sorted_file": {
+ "filesort": {
+ "sort_key": "t1.pk",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.pk > 4"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-18689: parenthesis around table names and derived tables
+#
+select * from ( mysql.db );
+Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv
+% test Y Y Y Y Y Y N Y Y Y Y Y Y Y Y N N Y Y Y
+% test\_% Y Y Y Y Y Y N Y Y Y Y Y Y Y Y N N Y Y Y
+create table t1 (a int);
+insert into t1 values (7), (2), (7);
+select * from (t1);
+a
+7
+2
+7
+select * from ((t1));
+a
+7
+2
+7
+select * from (t1 t) where t.a > 5;
+a
+7
+7
+select * from ((t1 t)) where t.a > 5;
+a
+7
+7
+select * from ((select a, sum(a) from t1 group by a) t);
+a sum(a)
+2 2
+7 14
+select * from (((select a, sum(a) from t1 group by a) t));
+a sum(a)
+2 2
+7 14
+update (t1 t) set t.a=t.a+1;
+select * from t1;
+a
+8
+3
+8
+drop table t1;
+#
+# MDEV-19956: query expressions in different contexts
+#
+create table t1 (a int);
+insert into t1 values (3), (7), (1), (2), (4);
+create table t2 (a int, b int);
+insert into t2 values (3,30), (7,70), (1,10), (2,20), (4,40);
+# 1. select
+# 1.1. simple select
+select * from t1;
+a
+3
+7
+1
+2
+4
+(select * from t1);
+a
+3
+7
+1
+2
+4
+((select * from t1));
+a
+3
+7
+1
+2
+4
+# 1.2. select with tail
+select * from t1 order by a;
+a
+1
+2
+3
+4
+7
+select a from t1 order by a;
+a
+1
+2
+3
+4
+7
+select a from t1 order by 1;
+a
+1
+2
+3
+4
+7
+select * from t1 order by t1.a;
+a
+1
+2
+3
+4
+7
+(select * from t1 order by t1.a);
+a
+1
+2
+3
+4
+7
+((select * from t1 order by t1.a));
+a
+1
+2
+3
+4
+7
+(select * from t1 order by t1.a limit 2);
+a
+1
+2
+(select a from t1 where a=1) order by 1 desc;
+a
+1
+# 1.2. select with several tails
+(select * from t2 order by a limit 2) order by b desc;
+a b
+2 20
+1 10
+(select * from t2 order by t2.a limit 2) order by b desc;
+a b
+2 20
+1 10
+((select * from t2 order by t2.a limit 2) order by b desc);
+a b
+2 20
+1 10
+(((select * from t2 order by t2.a) limit 2) order by b desc);
+a b
+2 20
+1 10
+# 2. union
+# 2.1 simple union
+select a from t1 union select a from t1;
+a
+3
+7
+1
+2
+4
+select a from t1 union all select a from t1;
+a
+3
+7
+1
+2
+4
+3
+7
+1
+2
+4
+select a from t1 union select b from t2;
+a
+3
+7
+1
+2
+4
+30
+70
+10
+20
+40
+(select a from t1) union (select a from t1);
+a
+3
+7
+1
+2
+4
+(select a from t1) union (select b from t2);
+a
+3
+7
+1
+2
+4
+30
+70
+10
+20
+40
+select a from t1 where a=1 union select a from t1 where a=3;
+a
+1
+3
+(select a from t1 where a=1) union select a from t1 where a=3;
+a
+1
+3
+((select a from t1 where a=1) union select a from t1 where a=3);
+a
+1
+3
+((select a from t1 where a<=3) union (select a from t1 where a=3));
+a
+3
+1
+2
+select a from t1 where a=1 union (select a from t1 where a=3);
+a
+1
+3
+(select a from t1 where a=1 union (select a from t1 where a=3));
+a
+1
+3
+((select a from t1 where a=1 union (select a from t1 where a=3)));
+a
+1
+3
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=7;
+a
+1
+3
+7
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=7 );
+a
+1
+3
+7
+(select a from t1 where a=1 order by a) union select a from t1 where a=3;
+a
+1
+3
+(select a from t1 where a!=3 order by a desc) union select a from t1 where a=3;
+a
+7
+1
+2
+4
+3
+((select a from t1 where a=1 order by a) union select a from t1 where a=3);
+a
+1
+3
+(select a from t1 where a!=3 order by a desc) union select a from t1 where a=3;
+a
+7
+1
+2
+4
+3
+( ( select a from t1 where a!=3 order by a desc limit 3)
+union
+select a from t1 where a=3 );
+a
+7
+4
+2
+3
+( select a from t1 where a <=3 except select a from t1 where a >=3 )
+union
+select a from t1 where a=7;
+a
+1
+2
+7
+( ( select a from t1 where a <=3
+except
+select a from t1 where a >=3 )
+union
+select a from t1 where a=7 );
+a
+1
+2
+7
+( select a from t1 where a <=3
+except
+( select a from t1 where a >=3
+union
+select a from t1 where a=7 ) );
+a
+1
+2
+( ( select a from t1 where a <=3 )
+except
+( select a from t1 where a >=3
+union
+select a from t1 where a=7 ) );
+a
+1
+2
+# 2.2. union with tail
+select a from t1 where a=1 union select a from t1 where a=3 order by a desc;
+a
+3
+1
+(select a from t1 limit 2) union select a from t1 where a=3 order by a desc;
+a
+7
+3
+select a from t1 where a=4 union (select a from t1 where a <=4 limit 2)
+order by a desc;
+a
+4
+3
+1
+select a from t1 where a=4
+union
+(select a from t1 where a <=4 order by a limit 2)
+order by a desc;
+a
+4
+2
+1
+( select a from t1 where a=4
+union
+( select a from t1 where a <=4 order by a limit 2 ) )
+order by a desc;
+a
+4
+2
+1
+( select a from t1 where a <=3 except select a from t1 where a >=3 )
+union
+select a from t1 where a=7 order by a desc;
+a
+7
+2
+1
+( select a from t1 where a!=3 order by a desc )
+union
+select a from t1 where a=3
+order by a desc;
+a
+7
+4
+3
+2
+1
+(select a from t1 where a=1)
+union
+(select a from t1 where a=3)
+order by a desc;
+a
+3
+1
+( select a from t1 where a=1
+union
+select a from t1 where a=3 )
+order by a desc;
+a
+3
+1
+( ( select a from t1 where a=1 )
+union
+( select a from t1 where a=3 ) )
+order by a desc;
+a
+3
+1
+( select a from t1 where a=1
+union
+select a from t1 where a=3 )
+order by 1 desc;
+a
+3
+1
+((select a from t1 where a=1 union select a from t1 where a=3)) order by 1 desc;
+a
+3
+1
+(((select a from t1 where a=1) union (select a from t1 where a=3)))
+order by 1 desc;
+a
+3
+1
+( (select a from t1 where a=1 )
+union
+(select a from t1 where a=3) )
+order by 1 desc;
+a
+3
+1
+# 2.3. complex union
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2
+union
+select a from t1 where a=4;
+a
+1
+3
+2
+4
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2 )
+union
+select a from t1 where a=4;
+a
+1
+3
+2
+4
+(select a from t1 where a=1 union select a from t1 where a=3)
+union
+(select a from t1 where a=2 union select a from t1 where a=4);
+a
+1
+3
+2
+4
+(select a from t1 where a=1 union (select a from t1 where a=3))
+union
+((select a from t1 where a=2) union select a from t1 where a=4);
+a
+1
+3
+2
+4
+( ( select a from t1 where a=1)
+union
+select a from t1 where a=3 )
+union
+select a from t1 where a=2
+union
+select a from t1 where a=4;
+a
+1
+3
+2
+4
+( ( ( select a from t1 where a=1)
+union
+select a from t1 where a=3 )
+union
+select a from t1 where a=2 )
+union
+select a from t1 where a=4;
+a
+1
+3
+2
+4
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2
+union
+(select a from t1 where a=4);
+a
+1
+3
+2
+4
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+( select a from t1 where a=2
+union
+( select a from t1 where a=4 ) );
+a
+1
+3
+2
+4
+select a from t1 where a=1
+union
+( select a from t1 where a=3
+union
+( select a from t1 where a=2
+union
+( select a from t1 where a=4 ) ) );
+a
+1
+3
+2
+4
+# 2.4. complex union with tail
+( ( select a from t1 where a=1 union select a from t1 where a=3 )
+order by a desc )
+union
+( ( select a from t1 where a=2 union select a from t1 where a=4 )
+order by a desc );
+a
+3
+1
+4
+2
+( ( select a from t1 where a=1 union select a from t1 where a=3 )
+order by a desc )
+union
+( ( select a from t1 where a=2 union select a from t1 where a=4 )
+order by a desc )
+order by a;
+a
+1
+2
+3
+4
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2 order by a desc limit 2 )
+union
+select a from t1 where a=4
+order by a;
+a
+2
+3
+4
+( select a from t1 where a=1
+union
+select a from t1 where a=3 order by a desc )
+union
+select a from t1 where a=2 order by a desc limit 2;
+a
+3
+2
+( ( select a from t1 where a >= 2
+union
+select a from t1 where a=1 order by a desc limit 2 )
+union
+select a from t1 where a=3 order by a limit 2 )
+union
+select a from t1 where a=1;
+a
+3
+4
+1
+# 3. TVC
+# 3.1. simple TVC
+values (3), (7), (1);
+3
+3
+7
+1
+(values (3), (7), (1));
+3
+3
+7
+1
+((values (3), (7), (1)));
+3
+3
+7
+1
+# 3.2. simple TVC with tail(s)
+values (3), (7), (1) order by 1;
+3
+1
+3
+7
+(values (3), (7), (1)) order by 1;
+3
+1
+3
+7
+((values (3), (7), (1))) order by 1;
+3
+1
+3
+7
+(((values (3), (7), (1))) order by 1);
+3
+1
+3
+7
+(values (3), (7), (1) limit 2) order by 1 desc;
+3
+7
+3
+((values (3), (7), (1)) order by 1 desc) limit 2;
+3
+7
+3
+(((values (3), (7), (1)) order by 1 desc) limit 2);
+3
+7
+3
+# 3.3. union of TVCs
+values (3), (7), (1) union values (3), (4), (2);
+3
+3
+7
+1
+4
+2
+values (3), (7), (1) union all values (3), (4), (2);
+3
+3
+7
+1
+3
+4
+2
+values (3), (7), (1) union values (3), (4), (2);
+3
+3
+7
+1
+4
+2
+values (3), (7), (1) except values (3), (4), (2);
+3
+7
+1
+(values (3), (7), (1)) union (values (3), (4), (2));
+3
+3
+7
+1
+4
+2
+(values (3), (7), (1)) union (values (3), (4), (2)) union values (5), (7);
+3
+3
+7
+1
+4
+2
+5
+(values (3), (7), (1)) union (values (3), (4), (2)) union (values (5), (7));
+3
+3
+7
+1
+4
+2
+5
+(values (3), (7), (1) union values (3), (4), (2)) union values (5), (7);
+3
+3
+7
+1
+4
+2
+5
+values (3), (7), (1) union (values (3), (4), (2) union values (5), (7));
+3
+3
+7
+1
+4
+2
+5
+(values (3), (7), (1) union ((values (3), (4), (2) union values (5), (7))));
+3
+3
+7
+1
+4
+2
+5
+# 3.4. tailed union of TVCs
+values (3), (7), (1) union values (3), (4), (2) order by 1;
+3
+1
+2
+3
+4
+7
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+3
+1
+2
+3
+4
+7
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+3
+1
+2
+3
+4
+7
+values (3), (7), (1) union (values (3), (4), (2)) order by 1;
+3
+1
+2
+3
+4
+7
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+3
+1
+2
+3
+4
+7
+((values (3), (7), (1)) union values (3), (4), (2)) order by 1;
+3
+1
+2
+3
+4
+7
+# 3.5. union of tailed TVCs
+(values (3), (7), (1) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+3
+1
+3
+4
+((values (3), (7), (1) order by 1) limit 2)
+union
+((values (3), (4), (2) order by 1 desc) limit 2);
+3
+1
+3
+4
+(((values (3), (7), (1)) order by 1) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2);
+3
+1
+3
+4
+# 3.6. tailed union of tailed TVCs
+(values (3), (7), (1) order by 1 limit 2)
+union
+values (3), (4), (2)
+order by 1;
+3
+1
+2
+3
+4
+((values (3), (7), (1)) order by 1 limit 2)
+union
+((values (3), (4), (2) order by 1 desc) limit 2)
+order by 1;
+3
+1
+3
+4
+# 3.7 [tailed] union of [tailed] select and [tailed] TVC
+(select a from t1 where a <=3 order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+a
+1
+2
+4
+3
+((select a from t1 where a <=3) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+a
+1
+2
+4
+3
+(((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2);
+a
+1
+2
+4
+3
+( (((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2) );
+a
+1
+2
+4
+3
+(select a from t1 where a <=3 order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2)
+order by a;
+a
+1
+2
+3
+4
+((select a from t1 where a <=3) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2)
+order by a;
+a
+1
+2
+3
+4
+(((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2)
+order by a;
+a
+1
+2
+3
+4
+(((values (3), (4), (2)) order by 1 desc) limit 2);
+3
+4
+3
+( (((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2) )
+order by a;
+a
+1
+2
+3
+4
+(values (3), (4), (2) order by 1 desc limit 2)
+union
+(select a from t1 where a <=3 order by 1 limit 2);
+3
+4
+3
+1
+2
+(values (3), (4), (2) order by 1 desc limit 2)
+union
+((select a from t1 where a <=3) order by 1 limit 2);
+3
+4
+3
+1
+2
+(((values (3), (4), (2)) order by 1 desc) limit 2)
+union
+(((select a from t1 where a <=3) order by 1) limit 2);
+3
+4
+3
+1
+2
+(((values (3), (4), (2)) order by 1 desc) limit 2)
+union
+(((select a from t1 where a <=3) order by a) limit 2)
+order by 1;
+3
+1
+2
+3
+4
+( select a from t1 where a=1
+union
+values (3), (4), (2) order by 1 desc )
+union
+select a from t1 where a=2 order by a desc limit 3;
+a
+4
+3
+2
+4. CTE
+4.1. simple select with simple CTE
+with t as (select * from t1 where a <=3)
+select * from t;
+a
+3
+1
+2
+with t as (select * from t1 where a <=3)
+(select * from t);
+a
+3
+1
+2
+with t as (select * from t1 where a <=3)
+((select * from t));
+a
+3
+1
+2
+with t as ((select * from t1 where a <=3))
+select * from t;
+a
+3
+1
+2
+with t as (((select * from t1 where a <=3)))
+select * from t;
+a
+3
+1
+2
+4.2. tailed select with simple CTE
+with t as (select * from t1 where a <=3)
+select * from t order by a;
+a
+1
+2
+3
+with t as (select * from t1 where a <=3)
+(select * from t) order by a;
+a
+1
+2
+3
+with t as (select * from t1 where a <=3)
+(select * from t) order by a desc limit 2;
+a
+3
+2
+4.3. [tailed] select with tailed CTE
+with t as (select * from t1 where a >=2 order by a limit 2)
+select * from t;
+a
+2
+3
+with t as (((select * from t1 where a >=2) order by a desc) limit 2)
+select * from t;
+a
+7
+4
+with t as (select * from t1 where a >=2 order by a desc limit 2)
+select * from t order by a;
+a
+4
+7
+4.4. [tailed] union with CTE
+with t as (select * from t1 where a <=3)
+select a from t1 where a=1 union select a from t where a=3;
+a
+1
+3
+with t as (select * from t1 where a <=3)
+(select a from t) union (select b from t2);
+a
+3
+1
+2
+30
+70
+10
+20
+40
+with t as (select * from t1 where a <=3)
+(select a from t) union (select b as a from t2) order by a desc;
+a
+70
+40
+30
+20
+10
+3
+2
+1
+4.5. [tailed] union with [tailed] union in CTE
+with t as (select * from t1 where a < 3 union select * from t1 where a > 3)
+select a from t1 where a=1 union select a from t where a=7;
+a
+1
+7
+with t as
+( select * from t1 where a < 3
+union
+select * from t1 where a > 3
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7;
+a
+4
+7
+with t as
+( select * from t1 where a < 3
+union
+select * from t1 where a > 3
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+a
+7
+4
+with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+a
+7
+4
+with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+(select a from t1 where a=4 union select a from t where a=7 order by a desc);
+a
+7
+4
+with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+((select a from t1 where a=4 union select a from t where a=7) order by a desc);
+a
+7
+4
+with t as
+( select * from t1 where a < 3
+union
+values (4), (7)
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+a
+7
+4
+4.6. [tailed] union with [tailed] union of TVC in CTE
+with t(a) as
+( values (2), (1)
+union
+(values (4), (7))
+order by 1 desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+a
+7
+4
+with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 desc)
+order by 1 desc limit 3 )
+select a from t1 where a=1 union select a from t where a=7 order by a desc;
+a
+7
+1
+with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 desc)
+order by 1 limit 3 )
+select a from t where a=1 union values (7) order by a desc;
+a
+7
+1
+with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 desc ) )
+select a from t where a=1 union select 7 order by a desc;
+a
+7
+1
+4.5. [tailed] union with two CTEs
+with t as (select * from t1 where a < 3),
+s as (select * from t1 where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+a
+7
+1
+with t as (select * from t1 where a < 3),
+s as (select * from t1 where a > 3)
+(select a from t where a=1 union select a from s where a=7 order by a desc);
+a
+7
+1
+with t as (select * from t1 where a < 3),
+s as (select * from t1 where a > 3)
+(select a from t where a=1 union select a from s where a=7) order by a desc;
+a
+7
+1
+with t as (select * from t1 where a < 3),
+s as (select * from t where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+a
+1
+# 5. single-row subquery in expression
+# 5.1. [tailed] simple select in expression
+select (a+1) + b as r from t2;
+r
+34
+78
+12
+23
+45
+select ((a+1) + b) as r from t2;
+r
+34
+78
+12
+23
+45
+select (b + (select 1)) as r from t2;
+r
+31
+71
+11
+21
+41
+select (select a from t1 where a <=3 order by a desc limit 1) as r from t2;
+r
+3
+3
+3
+3
+3
+select
+(select a from t1 where a <=3 order by a desc limit 1) as r from t2;
+r
+3
+3
+3
+3
+3
+select (select 100) as r from t2;
+r
+100
+100
+100
+100
+100
+select ((select 100)) as r from t2;
+r
+100
+100
+100
+100
+100
+select (select 100) + t2.b as r from t2;
+r
+130
+170
+110
+120
+140
+select ((select 100) + t2.b) as r from t2;
+r
+130
+170
+110
+120
+140
+# 5.2. [tailed] TVC in expression
+select (values (200)) as r from t2;
+r
+200
+200
+200
+200
+200
+select ((values (200))) as r from t2;
+r
+200
+200
+200
+200
+200
+select (values (200)) + t2.b as r from t2;
+r
+230
+270
+210
+220
+240
+select ((values (200)) + t2.b) as r from t2;
+r
+230
+270
+210
+220
+240
+select (values (200), (300) order by 1 desc limit 1) as r from t2;
+r
+300
+300
+300
+300
+300
+select ((values (200), (300)) order by 1 desc limit 1) as r from t2;
+r
+300
+300
+300
+300
+300
+select (select * from t1 limit 1) as r from t2;
+r
+3
+3
+3
+3
+3
+select (select * from t1 order by a limit 1) as r from t2;
+r
+1
+1
+1
+1
+1
+select ((select * from t1 order by a limit 1)) as r from t2;
+r
+1
+1
+1
+1
+1
+((select ((select * from t1 order by a limit 1)) as r from t2));
+r
+1
+1
+1
+1
+1
+select (select * from t1 order by a limit 1) + t2.b as r from t2;
+r
+31
+71
+11
+21
+41
+# 5.3. [tailed] union in expression
+select
+( select a from t1 where a<3 union select a from t1 where a>4
+order by a desc limit 1 ) as r
+from t1;
+r
+7
+7
+7
+7
+7
+select
+( (select a from t1 where a<3) union (select a from t1 where a>4)
+order by a desc limit 1 ) as r
+from t1;
+r
+7
+7
+7
+7
+7
+select
+( select a from t1 where a<3 union select a from t1 where a>4
+order by a desc limit 1 ) + t1.a as r
+from t1;
+r
+10
+14
+8
+9
+11
+select
+t1.a +
+( select a from t1 where a<3 union select a from t1 where a>4
+order by a desc limit 1 ) as r
+from t1;
+r
+10
+14
+8
+9
+11
+select
+( (select a from t1 where a<3 union select a from t1 where a>4
+order by a desc limit 1 ) + t1.a) as r
+from t1;
+r
+10
+14
+8
+9
+11
+select
+( ( (select a from t1 where a<3) union (select a from t1 where a>4)
+order by a desc limit 1 ) + t1.a ) as r
+from t1;
+r
+10
+14
+8
+9
+11
+# 5.4. [tailed] select with simple CTE in expression
+select
+( with t as (select * from t1 where a <=3)
+select a from t limit 1) as r
+from t2;
+r
+3
+3
+3
+3
+3
+select
+( with t as (select * from t1 where a <=3)
+select a from t limit 1) + t2.b as r
+from t2;
+r
+33
+73
+13
+23
+43
+select
+t2.b +( with t as (select * from t1 where a <=3)
+select a from t limit 1) as r
+from t2;
+r
+33
+73
+13
+23
+43
+select
+((( with t as (select * from t1 where a <=3)
+select a from t limit 1) + t2.b)) as r
+from t2;
+r
+33
+73
+13
+23
+43
+select
+( with t as (select * from t1 where a <=3)
+select a from t limit 1) + 100 as r
+from t2;
+r
+103
+103
+103
+103
+103
+select
+( with t as (select * from t1 where a <=3)
+select a from t limit 1) + (select 100) as r
+from t2;
+r
+103
+103
+103
+103
+103
+select
+( with t as (select * from t1 where a <=3)
+select a from t limit 1) + t2.b + (select 100) as r
+from t2;
+r
+133
+173
+113
+123
+143
+select
+( with t as (select * from t1 where a <=3)
+select a from t limit 1 ) + (t2.b + (select 100)) as r
+from t2;
+r
+133
+173
+113
+123
+143
+select
+( with t as (select * from t1 where a <=3)
+select a from t limit 1 ) + t2.b + (values (100)) as r
+from t2;
+r
+133
+173
+113
+123
+143
+# 5.5. [tailed] union with simple CTE in expression
+select
+( with t as (select * from t1 where a <=3)
+select a from t union select b from t2 order by a desc limit 1) as r
+from t2;
+r
+70
+70
+70
+70
+70
+select
+( with t as (select * from t1 where a <=3)
+(select a from t) union (select b from t2) order by a desc limit 1) as r
+from t2;
+r
+70
+70
+70
+70
+70
+select
+( with t as (select * from t1 where a <=3)
+(select a from t) union (select b from t2) order by a desc limit 1) as r
+from t2;
+r
+70
+70
+70
+70
+70
+select
+( ( with t as (select * from t1 where a <=3)
+(select a from t) union (select b from t2) order by a desc limit 1) +
+t2.a ) as r
+from t2;
+r
+73
+77
+71
+72
+74
+# 5.6. [tailed] union with CTE with union in expression
+select
+( with t as
+( select * from t1 where a < 3
+union
+select * from t1 where a > 3
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 limit 1) as r
+from t2;
+r
+4
+4
+4
+4
+4
+select
+( with t as
+( select * from t1 where a < 3
+union
+select * from t1 where a > 3
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 limit 1) +
+t2. b as r
+from t2;
+r
+34
+74
+14
+24
+44
+# 5.7. [tailed] union of TVCs with CTE with union in expression
+select
+( with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 limit 1)
+order by 1 desc limit 3 ) select * from t limit 1 ) + t2.b as r
+from t2;
+r
+34
+74
+14
+24
+44
+select
+( with t(a) as
+( select 2 union select 1
+union
+(values (4), (7) order by 1 limit 1)
+order by 1 limit 3 ) select * from t limit 1 ) + t2.b as r
+from t2;
+r
+31
+71
+11
+21
+41
+# 6. subquery
+# 6.1. TVC in IN subquery
+select a from t1 where a in (1,8,7);
+a
+7
+1
+select a from t1 where a in (values (1), (8), (7));
+a
+7
+1
+# 6.2. simple select in IN subquery
+select a from t1 where a in (select a from t2 where a <= 3);
+a
+3
+1
+2
+select a from t1 where a in ((select a from t2 where a <= 3));
+a
+3
+1
+2
+# 6.3. union in IN subquery
+select a from t1
+where a in (select a from t1 where a<=2 union select a from t2 where b>40);
+a
+7
+1
+2
+select a from t1
+where a in (select a from t1 where a<=2 union (select a from t2 where b>40));
+a
+7
+1
+2
+select a from t1
+where a in ((select a from t1 where a<=2) union select a from t2 where b>40);
+a
+7
+1
+2
+select a from t1
+where a in ((select a from t1 where a<=2) union (select a from t2 where b>40));
+a
+7
+1
+2
+# 6.4. select with CTE and union in IN subquery
+with t as (select a from t1 where a<=2)
+select a from t1
+where a in ((select a from t) union (select a from t2 where b>40));
+a
+7
+1
+2
+with t as ((select a from t1 where a<=2))
+select a from t1
+where a in ((select a from t) union (select a from t2 where b>40));
+a
+7
+1
+2
+with t as ((select a from t1 where a<=2) order by a desc limit 1)
+select a from t1
+where a in ((select a from t) union (select a from t2 where b>40));
+a
+7
+2
+# 6.5. NOT IN subquery
+select a from t1 where a not in (1,8,7);
+a
+3
+2
+4
+select a from t1 where a not in (values (1), (8), (7));
+a
+3
+2
+4
+select a from t1 where a not in (select a from t2 where a <= 3);
+a
+7
+4
+select a from t1 where a not in ((select a from t2 where a <= 3));
+a
+7
+4
+select a from t1
+where a not in (select a from t1 where a<=2
+union
+select a from t2 where b>40);
+a
+3
+4
+select a from t1
+where a not in (select a from t1 where a<=2
+union
+(select a from t2 where b>40));
+a
+3
+4
+select a from t1
+where a not in ((select a from t1 where a<=2)
+union
+select a from t2 where b>40);
+a
+3
+4
+select a from t1
+where a not in ((select a from t1 where a<=2)
+union
+(select a from t2 where b>40));
+a
+3
+4
+with t as ((select a from t1 where a<=2) order by a desc limit 1)
+select a from t1
+where a not in ((select a from t) union (select a from t2 where b>40));
+a
+3
+1
+4
+# 6.6. IN subquery in expression
+select 1 in (select a from t1) as r, b from t2 where b > 30;
+r b
+1 70
+1 40
+select (1 in (select a from t1)) as r, b from t2 where b > 30;
+r b
+1 70
+1 40
+select 1 in ((select a from t1)) as r, b from t2 where b > 30;
+r b
+1 70
+1 40
+select ((1 in ((select a from t1)))) as r, b from t2 where b > 30;
+r b
+1 70
+1 40
+select ((1 in ((select a from t1)))) as r, b from t2 where b > 30;
+r b
+1 70
+1 40
+select b, if (a in (select a from t1 where a > 3),10,20) as r from t2;
+b r
+30 20
+70 10
+10 20
+20 20
+40 10
+select b, if (a in ((select a from t1 where a > 3)),10,20) as r from t2;
+b r
+30 20
+70 10
+10 20
+20 20
+40 10
+# 6.7. IN subquery in SF and SP
+create function f1(x int) returns int
+return (x in ((select a from t1 where a <= 4)));
+select b, f1(a) from t2 where b > 20;
+b f1(a)
+30 1
+70 0
+40 1
+drop function f1;
+create function f2(x int) returns int
+if x in ((select a from t1 where a <= 4))
+then return 100;
+else return 200;
+end if |
+select b, f2(a) from t2 where b > 20;
+b f2(a)
+30 100
+70 200
+40 100
+drop function f2;
+# 6.8. EXISTS subquery
+select exists (select a from t1 where t1.a=t2.a) as r, b from t2 where b > 30;
+r b
+1 70
+1 40
+select exists ((select a from t1 where t1.a=t2.a)) as r, b from t2 where b > 30;
+r b
+1 70
+1 40
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from t2 where exists ((select * from s where s.a=t2.a));
+a b
+3 30
+7 70
+4 40
+with t as ((select a from t1 where a<=2) order by a desc limit 1)
+select a from t2
+where not exists ((select a from t where t.a=t2.a)
+except
+(select a from t where a>40));
+a
+3
+7
+1
+4
+# 6.9. EXISTS subquery with SF and SP
+create function f1(x int) returns int
+return exists (((select * from t1 where x=a and a <= 4)));
+select b, f1(a) from t2 where b > 20;
+b f1(a)
+30 1
+70 0
+40 1
+drop function f1;
+create function f2(x int) returns int
+if not exists (((select * from t1 where x=a and a <= 4)))
+then return 100;
+else return 200;
+end if |
+select b, f2(a) from t2 where b > 20;
+b f2(a)
+30 200
+70 100
+40 200
+drop function f2;
+# 6.10. subquery with ANY
+select a from t1 where a = any(select a from t2 where a <= 3);
+a
+3
+1
+2
+select a from t1 where a = any((select a from t2 where a <= 3));
+a
+3
+1
+2
+select a from t1
+where a = any (select a from t1 where a<=2
+union
+select a from t2 where b>40);
+a
+7
+1
+2
+select a from t1
+where a = any(select a from t1 where a<=2
+union
+(select a from t2 where b>40));
+a
+7
+1
+2
+select a from t1
+where a = any((select a from t1 where a<=2)
+union
+select a from t2 where b>40);
+a
+7
+1
+2
+select a from t1
+where a = any((select a from t1 where a<=2)
+union
+(select a from t2 where b>40));
+a
+7
+1
+2
+# 7. create table as
+# 7.1. create table as simple select
+create table t as select * from t1 where a <=3;
+select * from t;
+a
+3
+1
+2
+drop table t;
+create table t select * from t1 where a <=3;
+select * from t;
+a
+3
+1
+2
+drop table t;
+create table t as (select * from t1 where a <=3);
+select * from t;
+a
+3
+1
+2
+drop table t;
+create table t (select * from t1 where a <=3);
+select * from t;
+a
+3
+1
+2
+drop table t;
+create table t as ((select * from t1 where a <=3));
+select * from t;
+a
+3
+1
+2
+drop table t;
+create table t ((select * from t1 where a <=3));
+select * from t;
+a
+3
+1
+2
+drop table t;
+create table t(a decimal(10,2)) as select * from t1 where a <=3;
+select * from t;
+a
+3.00
+1.00
+2.00
+drop table t;
+create table t(a decimal(10,2)) select * from t1 where a <=3;
+select * from t;
+a
+3.00
+1.00
+2.00
+drop table t;
+create table t(a decimal(10,2)) as (select * from t1 where a <=3);
+select * from t;
+a
+3.00
+1.00
+2.00
+drop table t;
+create table t(a decimal(10,2)) (select * from t1 where a <=3);
+select * from t;
+a
+3.00
+1.00
+2.00
+drop table t;
+create table t(a decimal(10,2)) as ((select * from t1 where a <=3));
+select * from t;
+a
+3.00
+1.00
+2.00
+drop table t;
+create table t(a decimal(10,2)) ((select * from t1 where a <=3));
+select * from t;
+a
+3.00
+1.00
+2.00
+drop table t;
+create table t(a decimal(10,2), b int) as
+((select a, a as b from t1 where a <=3));
+select * from t;
+a b
+3.00 3
+1.00 1
+2.00 2
+drop table t;
+create table t(a decimal(10,2), b int)
+((select a, a as b from t1 where a <=3));
+select * from t;
+a b
+3.00 3
+1.00 1
+2.00 2
+drop table t;
+# 7.2. create table as tailed select
+create table t as select * from t1 where a <=3 order by 1;
+select * from t;
+a
+1
+2
+3
+drop table t;
+create table t select * from t1 where a <=3 order by 1;
+select * from t;
+a
+1
+2
+3
+drop table t;
+create table t as select * from t1 where a <=3 order by 1 desc limit 2;
+select * from t;
+a
+3
+2
+drop table t;
+create table t select * from t1 where a <=3 order by 1 desc limit 2;
+select * from t;
+a
+3
+2
+drop table t;
+create table t as ((select * from t1 where a <=3) order by 1 desc) limit 2;
+select * from t;
+a
+3
+2
+drop table t;
+create table t ((select * from t1 where a <=3) order by 1 desc) limit 2;
+select * from t;
+a
+3
+2
+drop table t;
+# 7.3. create table as select wihout from clause
+create table t as select 10;
+select * from t;
+10
+10
+drop table t;
+create table t select 10;
+select * from t;
+10
+10
+drop table t;
+# 7.4. create table as union of selects wihout from clause
+create table t as select 10 union select 70;
+select * from t;
+10
+10
+70
+drop table t;
+create table t select 10 union select 70;
+select * from t;
+10
+10
+70
+drop table t;
+# 7.5. create table as TVC
+create table t as values (7), (3), (8);
+select * from t;
+7
+7
+3
+8
+drop table t;
+create table t values (7), (3), (8);
+select * from t;
+7
+7
+3
+8
+drop table t;
+create table t as (values (7), (3), (8));
+select * from t;
+7
+7
+3
+8
+drop table t;
+create table t (values (7), (3), (8));
+select * from t;
+7
+7
+3
+8
+drop table t;
+create table t as ((values (7), (3), (8)));
+select * from t;
+7
+7
+3
+8
+drop table t;
+create table t ((values (7), (3), (8)));
+select * from t;
+7
+7
+3
+8
+drop table t;
+# 7.6. create table as select with CTE
+create table t as
+with s(a) as (select * from t1 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+a
+3
+2
+drop table t;
+create table t
+with s(a) as (select * from t1 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+a
+3
+2
+drop table t;
+create table t as
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s;
+select * from t;
+a
+4
+3
+8
+7
+drop table t;
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s;
+select * from t;
+a
+4
+3
+8
+7
+drop table t;
+create table t as
+with s(a) as (select * from t1 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+a
+3
+2
+drop table t;
+# 7.7. create table as union with CTE
+create table t as
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+a
+8
+7
+3
+1
+2
+drop table t;
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+a
+8
+7
+3
+1
+2
+drop table t;
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+a
+8
+7
+3
+1
+2
+drop table t;
+create table t as
+with s as
+( ( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) ) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+a
+8
+7
+3
+1
+2
+drop table t;
+create table t
+with s as
+( ( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) ) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+a
+8
+7
+3
+1
+2
+drop table t;
+create table t as
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s where a>=7 union select a from s where a<4;
+select * from t;
+a
+8
+7
+3
+drop table t;
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s where a>=7 union select a from s where a<4;
+select * from t;
+a
+8
+7
+3
+drop table t;
+create table t as
+with s as
+( select * from t1 where a <=4 or a=7 )
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+a
+7
+1
+2
+drop table t;
+create table t
+with s as
+(select * from t1 where a <=4 or a=7)
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+a
+7
+1
+2
+drop table t;
+create table t (a int)
+with s as
+( select * from t1 where a <=4 or a=7 )
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+a
+7
+1
+2
+drop table t;
+create table t (a int)
+with s as
+(select * from t1 where a <=4 or a=7)
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+a
+7
+1
+2
+drop table t;
+create table t
+with s as
+( select * from t1 where a <=4 or a=7 )
+select * from s where a>=7 union select a from s where a<3
+order by a desc limit 2;
+select * from t;
+a
+7
+2
+drop table t;
+create table t
+( with s as
+( select * from t1 where a <=4 or a=7 )
+select * from s where a>=7 union select a from s where a<3
+order by a desc limit 2 );
+select * from t;
+a
+7
+2
+drop table t;
+# 8. insert
+create table t (c int, d int);
+# 8.1. insert simple select
+insert into t select * from t2 where a <=3;
+select * from t;
+c d
+3 30
+1 10
+2 20
+delete from t;
+insert into t(c) select t2.a from t2 where a <=3;
+select * from t;
+c d
+3 NULL
+1 NULL
+2 NULL
+delete from t;
+insert into t (select * from t2 where a <=3);
+select * from t;
+c d
+3 30
+1 10
+2 20
+delete from t;
+insert into t(c) (select t2.a from t2 where a <=3);
+select * from t;
+c d
+3 NULL
+1 NULL
+2 NULL
+delete from t;
+insert into t ((select * from t2 where a <=3));
+select * from t;
+c d
+3 30
+1 10
+2 20
+delete from t;
+insert into t(c) ((select t2.a from t2 where a <=3));
+select * from t;
+c d
+3 NULL
+1 NULL
+2 NULL
+delete from t;
+drop table t;
+create table t(c decimal(10,2));
+insert into t select * from t1 where a <=3;
+select * from t;
+c
+3.00
+1.00
+2.00
+delete from t;
+insert into t(c) select * from t1 where a <=3;
+select * from t;
+c
+3.00
+1.00
+2.00
+delete from t;
+insert into t (select * from t1 where a <=3);
+select * from t;
+c
+3.00
+1.00
+2.00
+delete from t;
+insert into t(c) (select * from t1 where a <=3);
+select * from t;
+c
+3.00
+1.00
+2.00
+delete from t;
+insert into t ((select * from t1 where a <=3));
+select * from t;
+c
+3.00
+1.00
+2.00
+delete from t;
+insert into t(c) ((select * from t1 where a <=3));
+select * from t;
+c
+3.00
+1.00
+2.00
+delete from t;
+drop table t;
+create table t(a decimal(10,2), b int);
+insert into t ((select * from t2 where a <=3));
+select * from t;
+a b
+3.00 30
+1.00 10
+2.00 20
+delete from t;
+insert into t(a) ((select a from t2 where a <=3));
+select * from t;
+a b
+3.00 NULL
+1.00 NULL
+2.00 NULL
+delete from t;
+drop table t;
+create table t(c int, d int);
+# 8.2. insert tailed select
+insert into t select * from t2 where a <=3 order by 1;
+select * from t;
+c d
+1 10
+2 20
+3 30
+delete from t;
+insert into t(c) select a from t2 where a <=3 order by 1;
+select * from t;
+c d
+1 NULL
+2 NULL
+3 NULL
+delete from t;
+insert into t select * from t2 where a <=3 order by 1 desc limit 2;
+select * from t;
+c d
+3 30
+2 20
+delete from t;
+insert into t(c) select a from t2 where a <=3 order by 1 desc limit 2;
+select * from t;
+c d
+3 NULL
+2 NULL
+delete from t;
+insert into t ((select * from t2 where a <=3) order by 1 desc) limit 2;
+select * from t;
+c d
+3 30
+2 20
+delete from t;
+insert into t(c) ((select a from t2 where a <=3) order by 1 desc) limit 2;
+select * from t;
+c d
+3 NULL
+2 NULL
+delete from t;
+# 8.3. insert select without from clause
+insert into t select 10, 20;
+select * from t;
+c d
+10 20
+delete from t;
+insert into t(c) select 10;
+select * from t;
+c d
+10 NULL
+delete from t;
+# 8.4. insert union of selects without from clause
+insert into t select 10,20 union select 70,80;
+select * from t;
+c d
+10 20
+70 80
+delete from t;
+insert into t(c) select 10 union select 70;
+select * from t;
+c d
+10 NULL
+70 NULL
+delete from t;
+# 8.5. insert TVC
+insert into t values (7,70), (3,30), (8,80);
+select * from t;
+c d
+7 70
+3 30
+8 80
+delete from t;
+insert into t(c) values (7), (3), (8);
+select * from t;
+c d
+7 NULL
+3 NULL
+8 NULL
+delete from t;
+insert into t (values (7,70), (3,30), (8,80));
+select * from t;
+c d
+7 70
+3 30
+8 80
+delete from t;
+insert into t(c) (values (7), (3), (8));
+select * from t;
+c d
+7 NULL
+3 NULL
+8 NULL
+delete from t;
+insert into t ((values (7,70), (3,30), (8,80)));
+select * from t;
+c d
+7 70
+3 30
+8 80
+delete from t;
+insert into t(c) ((values (7), (3), (8)));
+select * from t;
+c d
+7 NULL
+3 NULL
+8 NULL
+delete from t;
+# 8.7. insert simple select with CTE
+insert into t
+with s(a,b) as (select * from t2 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+c d
+3 30
+2 20
+delete from t;
+insert into t(c)
+with s(a) as (select a from t2 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+c d
+3 NULL
+2 NULL
+delete from t;
+insert into t
+with s as
+( (select * from t2 where a <=4 order by 1 desc limit 2)
+union
+values (3,30), (8,80), (7,70) )
+select * from s;
+select * from t;
+c d
+4 40
+3 30
+8 80
+7 70
+delete from t;
+insert into t(c)
+with s as
+( (select a from t2 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s;
+select * from t;
+c d
+4 NULL
+3 NULL
+8 NULL
+7 NULL
+delete from t;
+# 8.8. insert into union with CTE
+insert into t(c)
+with s as
+( (select a from t2 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+c d
+8 NULL
+7 NULL
+3 NULL
+1 NULL
+2 NULL
+delete from t;
+insert into t
+with s as
+( (select * from t2 where a <=4 order by 1 desc limit 2)
+union
+values (3,30), (8,80), (7,70) )
+select * from s where a>=7 union select * from s where a<4;
+select * from t;
+c d
+8 80
+7 70
+3 30
+delete from t;
+insert into t(c)
+with s as
+( (select a from t2 where a <=4 order by 1 desc limit 2)
+union
+values (3), (8), (7) )
+select * from s where a>=7 union select * from s where a<4;
+select * from t;
+c d
+8 NULL
+7 NULL
+3 NULL
+delete from t;
+insert into t
+with s as
+( select * from t2 where a <=4 or a=7 )
+select * from s where a>=7 union select * from s where a<3;
+select * from t;
+c d
+7 70
+1 10
+2 20
+delete from t;
+insert into t(c)
+with s as
+( select a from t2 where a <=4 or a=7 )
+select * from s where a>=7 union select * from s where a<3;
+select * from t;
+c d
+7 NULL
+1 NULL
+2 NULL
+delete from t;
+drop table t;
+# 9. derived table
+# 9.1. derived table as [tailed] simple select
+select * from (select * from t1) as dt;
+a
+3
+7
+1
+2
+4
+select * from ((select * from t1)) as dt;
+a
+3
+7
+1
+2
+4
+select * from (((select * from t1))) as dt;
+a
+3
+7
+1
+2
+4
+select * from (select * from t1 order by a) as dt;
+a
+3
+7
+1
+2
+4
+select * from (select a from t1 order by a) as dt;
+a
+3
+7
+1
+2
+4
+select * from (select a from t1 order by 1) as dt;
+a
+3
+7
+1
+2
+4
+select * from (select a from t1 order by t1.a) as dt;
+a
+3
+7
+1
+2
+4
+select * from ((select * from t1 order by t1.a limit 2)) as dt;
+a
+1
+2
+select * from ((select * from t2 order by a limit 2) order by b desc) dt;
+a b
+1 10
+2 20
+select * from ((select a from t1 where a=1) order by 1 desc) dt;
+a
+1
+# 9.2. derived table as select with two tails
+select * from
+((select * from t2 order by t2.a limit 2) order by b desc) dt;
+a b
+1 10
+2 20
+select * from
+((select * from t2 order by t2.a limit 2) order by b desc) as dt;
+a b
+1 10
+2 20
+select * from
+(((select * from t2 order by t2.a limit 2) order by b desc )) as dt;
+a b
+1 10
+2 20
+select * from
+(((select * from t2 order by t2.a) limit 2) order by b desc) dt;
+a b
+1 10
+2 20
+select * from
+((select * from t2 order by a limit 2) order by b desc) dt;
+a b
+1 10
+2 20
+select * from
+((select a from t1 where a=1) order by 1 desc) as dt;
+a
+1
+select * from
+((select * from t2 order by t2.a limit 2) order by b desc) as dt;
+a b
+1 10
+2 20
+# 9.3. derived table as union
+select * from (select a from t1 union select a from t1) as dt;
+a
+3
+7
+1
+2
+4
+select * from (select a from t1 union all select a from t1) as dt;
+a
+3
+7
+1
+2
+4
+3
+7
+1
+2
+4
+select * from (select a from t1 union select b from t2) as dt;
+a
+3
+7
+1
+2
+4
+30
+70
+10
+20
+40
+select * from
+((select a from t1) union (select a from t1)) as dt;
+a
+3
+7
+1
+2
+4
+select * from
+((select a from t1) union (select b from t2)) as dt;
+a
+3
+7
+1
+2
+4
+30
+70
+10
+20
+40
+select * from
+(select a from t1 where a=1 union select a from t1 where a=3) dt;
+a
+1
+3
+select * from
+((select a from t1 where a=1) union select a from t1 where a=3) dt;
+a
+1
+3
+select * from
+(((select a from t1 where a=1) union select a from t1 where a=3)) dt;
+a
+1
+3
+select * from
+(((select a from t1 where a<=3) union (select a from t1 where a=3))) as dt;
+a
+3
+1
+2
+select * from
+(select a from t1 where a=1 union (select a from t1 where a=3)) as dt;
+a
+1
+3
+select * from
+((select a from t1 where a=1 union (select a from t1 where a=3))) as dt;
+a
+1
+3
+select * from
+(((select a from t1 where a=1 union (select a from t1 where a=3)))) as dt;
+a
+1
+3
+select * from
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=7 ) as dt;
+a
+1
+3
+7
+select * from
+( (select a from t1 where a=1 order by a)
+union
+select a from t1 where a=3 ) as dt;
+a
+1
+3
+select * from
+( (select a from t1 where a!=3 order by a desc)
+union
+select a from t1 where a=3 ) as dt;
+a
+7
+1
+2
+4
+3
+select * from
+( ( select a from t1 where a <=3 except select a from t1 where a >=3 )
+union
+select a from t1 where a=7 ) as dt;
+a
+1
+2
+7
+select * from
+( ( ( select a from t1 where a <=3
+except
+select a from t1 where a >=3 )
+union
+select a from t1 where a=7 ) ) as dt;
+a
+1
+2
+7
+select * from
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+order by a desc) as dt;
+a
+3
+1
+select *from
+( (select a from t1 limit 2)
+union
+select a from t1 where a=3
+order by a desc) as dt;
+a
+7
+3
+select * from
+( select a from t1 where a=4
+union
+(select a from t1 where a <=4 limit 2)
+order by a desc ) as dt;
+a
+4
+3
+1
+select * from
+( ( select a from t1 where a=4
+union
+( select a from t1 where a <=4 order by a ) )
+order by a desc limit 2 ) as dt;
+a
+4
+3
+select * from
+( ( select a from t1 where a <=3 except select a from t1 where a >=3 )
+union
+select a from t1 where a=7 order by a desc ) as dt;
+a
+7
+2
+1
+select * from
+( ( select a from t1 where a!=3 order by a desc )
+union
+select a from t1 where a=3
+order by a desc ) as dt;
+a
+7
+4
+3
+2
+1
+select * from
+( (select a from t1 where a=1)
+union
+(select a from t1 where a=3)
+order by a desc ) as dt;
+a
+3
+1
+select * from
+( ( select a from t1 where a=1
+union
+select a from t1 where a=3 )
+order by a desc ) as dt;
+a
+3
+1
+select * from
+( ( ( select a from t1 where a=1 )
+union
+( select a from t1 where a=3 ) )
+order by a desc ) as dt;
+a
+3
+1
+select * from
+( ( select a from t1 where a=1
+union
+select a from t1 where a=3 )
+order by 1 desc ) as dt;
+a
+3
+1
+select * from
+( ( (select a from t1 where a=1
+union
+select a from t1 where a=3) ) order by 1 desc ) as dt;
+a
+3
+1
+select * from
+((((select a from t1 where a=1) union (select a from t1 where a=3)))
+order by 1 desc ) as dt;
+a
+3
+1
+select * from
+( ( (select a from t1 where a=1 )
+union
+(select a from t1 where a=3) )
+order by 1 desc ) as dt;
+a
+3
+1
+select * from
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2
+union
+select a from t1 where a=4 ) as dt;
+a
+1
+3
+2
+4
+select * from
+( ( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2 )
+union
+select a from t1 where a=4 ) as dt;
+a
+1
+3
+2
+4
+select * from
+( (select a from t1 where a=1 union select a from t1 where a=3)
+union
+(select a from t1 where a=2 union select a from t1 where a=4) ) as dt;
+a
+1
+3
+2
+4
+select * from
+( (select a from t1 where a=1 union (select a from t1 where a=3))
+union
+((select a from t1 where a=2) union select a from t1 where a=4) ) as dt;
+a
+1
+3
+2
+4
+select * from
+( ( ( select a from t1 where a=1)
+union
+select a from t1 where a=3 )
+union
+select a from t1 where a=2
+union
+select a from t1 where a=4 ) as dt;
+a
+1
+3
+2
+4
+select * from
+( ( ( ( select a from t1 where a=1)
+union
+select a from t1 where a=3 )
+union
+select a from t1 where a=2 )
+union
+select a from t1 where a=4 ) as dt;
+a
+1
+3
+2
+4
+select * from
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2
+union
+(select a from t1 where a=4) ) as dt;
+a
+1
+3
+2
+4
+select * from
+( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+( select a from t1 where a=2
+union
+( select a from t1 where a=4 ) ) ) as dt;
+a
+1
+3
+2
+4
+select * from
+( select a from t1 where a=1
+union
+( select a from t1 where a=3
+union
+( select a from t1 where a=2
+union
+( select a from t1 where a=4 ) ) ) ) as dt;
+a
+1
+3
+2
+4
+select * from
+( ( ( select a from t1 where a=1 union select a from t1 where a=3 )
+order by a desc limit 2 )
+union
+( ( select a from t1 where a=2 union select a from t1 where a=4 )
+order by a desc limit 1 ) ) as dt;
+a
+3
+1
+4
+select * from
+( ( ( select a from t1 where a=1 union select a from t1 where a=3 )
+order by a desc limit 2 )
+union
+( ( select a from t1 where a=2 union select a from t1 where a=4 )
+order by a desc limit 2 )
+order by a) as dt;
+a
+1
+2
+3
+4
+select * from
+( ( select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2 order by a desc limit 2 )
+union
+select a from t1 where a=4
+order by a limit 3 ) as dt;
+a
+2
+3
+4
+select * from
+( ( select a from t1 where a=1
+union
+select a from t1 where a=3 order by a desc limit 2)
+union
+select a from t1 where a=2 order by a desc limit 2 ) as dt;
+a
+3
+2
+select * from
+( ( ( select a from t1 where a >= 2
+union
+select a from t1 where a=1 order by a desc limit 2 )
+union
+select a from t1 where a=3 order by a limit 2 )
+union
+select a from t1 where a=1 ) as dt;
+a
+3
+4
+1
+# 9.3. derived table as [tailed] TVC
+select * from
+( values (3), (7), (1) ) as dt;
+3
+3
+7
+1
+select * from
+( (values (3), (7), (1)) ) as dt;
+3
+3
+7
+1
+select * from
+(((values (3), (7), (1)))) as dt;
+3
+3
+7
+1
+select * from
+( values (3), (7), (1) order by 1 limit 2 ) as dt;
+3
+1
+3
+select * from
+( (values (3), (7), (1)) order by 1 limit 2 ) as dt;
+3
+1
+3
+select * from
+( ((values (3), (7), (1))) order by 1 limit 2 ) as dt;
+3
+1
+3
+select * from
+( (((values (3), (7), (1))) order by 1 limit 2) ) as dt;
+3
+1
+3
+select * from
+( ( (values (3), (7), (1) limit 2) order by 1 desc) ) as dt;
+3
+3
+7
+select * from
+( ((values (3), (7), (1)) order by 1 desc) limit 2 ) as dt;
+3
+7
+3
+select * from
+( (((values (3), (7), (1)) order by 1 desc) limit 2) ) as dt;
+3
+7
+3
+# 9.3. derived table as union of TVCs
+select * from
+( values (3), (7), (1) union values (3), (4), (2) ) dt;
+3
+3
+7
+1
+4
+2
+select * from
+( values (3), (7), (1) union all values (3), (4), (2) ) as dt;
+3
+3
+7
+1
+3
+4
+2
+select * from
+( values (3), (7), (1) union values (3), (4), (2) ) as dt;
+3
+3
+7
+1
+4
+2
+select * from
+( values (3), (7), (1) except values (3), (4), (2) ) as dt;
+3
+7
+1
+select * from
+( (values (3), (7), (1)) union (values (3), (4), (2)) ) as dt;
+3
+3
+7
+1
+4
+2
+select * from
+( (values (3), (7), (1))
+union
+(values (3), (4), (2))
+union values (5), (7) ) dt;
+3
+3
+7
+1
+4
+2
+5
+select * from
+( (values (3), (7), (1))
+union
+(values (3), (4), (2))
+union
+(values (5), (7)) ) as dt;
+3
+3
+7
+1
+4
+2
+5
+select * from
+( (values (3), (7), (1)
+union
+values (3), (4), (2))
+union
+values (5), (7) ) as dt;
+3
+3
+7
+1
+4
+2
+5
+select * from
+( values (3), (7), (1)
+union (values (3), (4), (2)
+union
+values (5), (7)) ) as dt;
+3
+3
+7
+1
+4
+2
+5
+select * from
+( (values (3), (7), (1)
+union
+((values (3), (4), (2)
+union values (5), (7)))) ) dt;
+3
+3
+7
+1
+4
+2
+5
+select * from
+( values (3), (7), (1)
+union
+values (3), (4), (2)
+order by 1 ) as dt;
+3
+1
+2
+3
+4
+7
+select * from
+( (values (3), (7), (1) union values (3), (4), (2)) order by 1 ) as dt;
+3
+1
+2
+3
+4
+7
+select * from
+( (values (3), (7), (1) union values (3), (4), (2)) order by 1 ) as dt;
+3
+1
+2
+3
+4
+7
+select * from
+( values (3), (7), (1) union (values (3), (4), (2)) order by 1 ) as dt;
+3
+1
+2
+3
+4
+7
+select * from
+( (values (3), (7), (1) union values (3), (4), (2)) order by 1 ) as dt;
+3
+1
+2
+3
+4
+7
+select * from
+( ((values (3), (7), (1)) union values (3), (4), (2)) order by 1 ) as dt;
+3
+1
+2
+3
+4
+7
+select * from
+( (values (3), (7), (1) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2) ) as dt;
+3
+1
+3
+4
+select * from
+( ((values (3), (7), (1) order by 1) limit 2)
+union
+((values (3), (4), (2) order by 1 desc) limit 2) ) as dt;
+3
+1
+3
+4
+select * from
+( (((values (3), (7), (1)) order by 1) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2) ) as dt;
+3
+1
+3
+4
+select * from
+( (values (3), (7), (1) order by 1 limit 2)
+union
+values (3), (4), (2)
+order by 1 limit 3 ) as dt;
+3
+1
+2
+3
+select * from
+( ((values (3), (7), (1)) order by 1 limit 2)
+union
+((values (3), (4), (2) order by 1 desc) limit 2)
+order by 1 limit 3 ) as dt;
+3
+1
+3
+4
+select * from
+( (select a from t1 where a <=3 order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2) ) dt;
+a
+1
+2
+4
+3
+select * from
+( ((select a from t1 where a <=3) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2) ) as dt;
+a
+1
+2
+4
+3
+select * from
+( (((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2) ) as dt;
+a
+1
+2
+4
+3
+select * from
+( ( (((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2) ) ) dt;
+a
+1
+2
+4
+3
+select * from
+( (select a from t1 where a <=3 order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2)
+order by a ) as dt;
+a
+1
+2
+3
+4
+select * from
+( ((select a from t1 where a <=3) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2)
+order by a ) as dt;
+a
+1
+2
+3
+4
+select * from
+( (((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2)
+order by a ) as dt;
+a
+1
+2
+3
+4
+select * from
+( (((values (3), (4), (2)) order by 1 desc) limit 2) ) as dt;
+3
+4
+3
+select * from
+( ( (((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2) )
+order by a ) as dt;
+a
+1
+2
+3
+4
+select * from
+( (values (3), (4), (2) order by 1 desc limit 2)
+union
+(select a from t1 where a <=3 order by 1 limit 2) ) as dt;
+3
+4
+3
+1
+2
+select * from
+( (values (3), (4), (2) order by 1 desc limit 2)
+union
+((select a from t1 where a <=3) order by 1 limit 2) ) as dt;
+3
+4
+3
+1
+2
+select * from
+( (((values (3), (4), (2)) order by 1 desc) limit 2)
+union
+(((select a from t1 where a <=3) order by 1) limit 2) ) as dt;
+3
+4
+3
+1
+2
+select * from
+( (((values (3), (4), (2)) order by 1 desc) limit 2)
+union
+(((select a from t1 where a <=3) order by a) limit 2)
+order by 1 ) as dt;
+3
+1
+2
+3
+4
+select * from
+( ( select a from t1 where a=1
+union
+values (3), (4), (2) order by 1 desc )
+union
+select a from t1 where a=2 order by a desc limit 3 ) as dt;
+a
+4
+3
+2
+# 9.4. derived table as [tailed] simple select with CTE
+select * from
+( with t as (select * from t1 where a <=3)
+select * from t ) as dt;
+a
+3
+1
+2
+select * from
+( with t as (select * from t1 where a <=3)
+(select * from t) ) as dt;
+a
+3
+1
+2
+select * from
+( with t as (select * from t1 where a <=3)
+((select * from t)) ) as dt;
+a
+3
+1
+2
+select * from
+( with t as ((select * from t1 where a <=3))
+select * from t ) as dt;
+a
+3
+1
+2
+select * from
+( with t as (((select * from t1 where a <=3)))
+select * from t ) as dt;
+a
+3
+1
+2
+select * from
+( with t as (select * from t1 where a <=3)
+select * from t order by a ) as dt;
+a
+3
+1
+2
+select * from
+( with t as (select * from t1 where a <=3)
+(select * from t) order by a ) as dt;
+a
+3
+1
+2
+select * from
+( with t as (select * from t1 where a <=3)
+(select * from t) order by a desc limit 2 ) as dt;
+a
+3
+2
+select * from
+( with t as (select * from t1 where a >=2 order by a limit 2)
+select * from t ) as dt;
+a
+2
+3
+select * from
+( with t as (((select * from t1 where a >=2) order by a desc) limit 2)
+select * from t ) as dt;
+a
+7
+4
+select * from
+( with t as (select * from t1 where a >=2 order by a desc limit 2)
+select * from t order by a ) as dt;
+a
+7
+4
+# 9.5. derived table as tailed union with CTE
+select * from
+( with t as (select * from t1 where a <=3)
+select a from t1 where a=1 union select a from t where a=3 ) as dt;
+a
+1
+3
+select * from
+( with t as (select * from t1 where a <=3)
+(select a from t) union (select b from t2) ) as dt;
+a
+3
+1
+2
+30
+70
+10
+20
+40
+select * from
+( with t as (select * from t1 where a <=3)
+(select a from t) union (select b as a from t2) order by a desc ) as dt;
+a
+70
+40
+30
+20
+10
+3
+2
+1
+select * from
+( with t as (select * from t1 where a < 3 union select * from t1 where a > 3)
+select a from t1 where a=1 union select a from t where a=7 ) as dt;
+a
+1
+7
+select * from
+( with t as
+( select * from t1 where a < 3
+union
+select * from t1 where a > 3
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 ) as dt;
+a
+4
+7
+select * from
+( with t as
+( select * from t1 where a < 3
+union
+select * from t1 where a > 3
+order by a desc limit 3 )
+select a from t1 where a=4
+union
+select a from t where a=7
+order by a desc ) as dt;
+a
+7
+4
+select * from
+( with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+select a from t1 where a=4
+union select a from t where a=7
+order by a desc ) dt;
+a
+7
+4
+select * from
+( with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+(select a from t1 where a=4
+union
+select a from t where a=7
+order by a desc) ) as dt;
+a
+7
+4
+select * from
+( with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+((select a from t1 where a=4
+union
+select a from t where a=7) order by a desc) ) as dt;
+a
+7
+4
+select * from
+( with t as
+( select * from t1 where a < 3
+union
+values (4), (7)
+order by a desc limit 3 )
+select a from t1 where a=4
+union
+select a from t where a=7
+order by a desc ) dt;
+a
+7
+4
+select * from
+( with t(a) as
+( values (2), (1)
+union
+(values (4), (7))
+order by 1 desc limit 3 )
+select a from t1 where a=4
+union select a from t where a=7
+order by a desc ) as dt;
+a
+7
+4
+select * from
+( with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 desc)
+order by 1 desc limit 3 )
+select a from t1 where a=1
+union
+select a from t where a=7 order by a desc ) as dt;
+a
+7
+1
+select * from
+( with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 desc)
+order by 1 limit 3 )
+select a from t where a=1 union values (7) order by a desc ) as dt;
+a
+7
+1
+select * from
+( with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 desc ) )
+select a from t where a=1 union select 7 order by a desc ) as dt;
+a
+7
+1
+select * from
+( with t as (select * from t1 where a < 3),
+s as (select * from t1 where a > 3)
+select a from t where a=1
+union select a from s where a=7
+order by a desc ) dt;
+a
+7
+1
+select * from
+( with t as (select * from t1 where a < 3),
+s as (select * from t1 where a > 3)
+(select a from t where a=1
+union
+select a from s where a=7 order by a desc) ) dt;
+a
+7
+1
+select * from
+( with t as (select * from t1 where a < 3),
+s as (select * from t1 where a > 3)
+(select a from t where a=1
+union
+select a from s where a=7)
+order by a desc ) dt;
+a
+7
+1
+10. view
+10.1. view as simple select
+create view v1 as
+select * from t1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
+select * from v1;
+a
+3
+7
+1
+2
+4
+drop view v1;
+create view v1 as
+select 2*a as c from t1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 2 * `t1`.`a` AS `c` from `t1` latin1 latin1_swedish_ci
+select * from v1;
+c
+6
+14
+2
+4
+8
+drop view v1;
+create view v1(c) as
+select 2*a from t1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 2 * `t1`.`a` AS `c` from `t1` latin1 latin1_swedish_ci
+select * from v1;
+c
+6
+14
+2
+4
+8
+drop view v1;
+create view v1 as
+((select * from t1));
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a` from `t1`) latin1 latin1_swedish_ci
+select * from v1;
+a
+3
+7
+1
+2
+4
+drop view v1;
+10.2. view as tailed simple select
+create view v1 as
+select * from t1 order by a;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` order by `t1`.`a` latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+2
+3
+4
+7
+drop view v1;
+create view v1 as
+(select * from t2 order by a limit 2) order by b desc;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__3`.`a` AS `a`,`__3`.`b` AS `b` from (select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` order by `t2`.`a` limit 2) `__3` order by `__3`.`b` desc latin1 latin1_swedish_ci
+select * from v1;
+a b
+2 20
+1 10
+drop view v1;
+10.3. view as union
+create view v1 as
+select a from t1 union select b from t2;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` union select `t2`.`b` AS `b` from `t2` latin1 latin1_swedish_ci
+select * from v1;
+a
+3
+7
+1
+2
+4
+30
+70
+10
+20
+40
+drop view v1;
+create view v1 as
+(select a from t1) union (select b from t2);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a` from `t1`) union (select `t2`.`b` AS `b` from `t2`) latin1 latin1_swedish_ci
+select * from v1;
+a
+3
+7
+1
+2
+4
+30
+70
+10
+20
+40
+drop view v1;
+create view v1 as
+(select a from t1 where a=1) union select a from t1 where a=3;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1) union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+3
+drop view v1;
+create view v1 as
+((select a from t1 where a<=3) union (select a from t1 where a=3));
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3) union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3) latin1 latin1_swedish_ci
+select * from v1;
+a
+3
+1
+2
+drop view v1;
+create view v1 as
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=7;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 7 latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+3
+7
+drop view v1;
+create view v1 as
+( ( select a from t1 where a!=3 order by a desc limit 3)
+union
+select a from t1 where a=3 );
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <> 3 order by `t1`.`a` desc limit 3) union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 latin1 latin1_swedish_ci
+select * from v1;
+a
+7
+4
+2
+3
+drop view v1;
+create view v1 as
+( select a from t1 where a <=3 except select a from t1 where a >=3 )
+union
+select a from t1 where a=7;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3 except select `t1`.`a` AS `a` from `t1` where `t1`.`a` >= 3) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 7 latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+2
+7
+drop view v1;
+create view v1 as
+(select a from t1 limit 2) union select a from t1 where a=3 order by a desc;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a` from `t1` limit 2) union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 order by `a` desc latin1 latin1_swedish_ci
+select * from v1;
+a
+7
+3
+drop view v1;
+create view v1 as
+select a from t1 where a=1
+union
+( select a from t1 where a=3
+union
+( select a from t1 where a=2
+union
+( select a from t1 where a=4 ) ) );
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union select `__7`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 union select `__6`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 2 union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4)) `__6`) `__7` latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+3
+2
+4
+drop view v1;
+create view v1 as
+( ( select a from t1 where a >= 2
+union
+select a from t1 where a=1 order by a desc limit 2 )
+union
+select a from t1 where a=3 order by a limit 2 )
+union
+select a from t1 where a=1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__7`.`a` AS `a` from (select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` >= 2 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 order by `a` desc limit 2) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 order by `a` limit 2) `__7` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 latin1 latin1_swedish_ci
+select * from v1;
+a
+3
+4
+1
+drop view v1;
+10.4. view as [tailed] TVC
+create view v1 as
+values (3), (7), (1);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS values (3),(7),(1) latin1 latin1_swedish_ci
+select * from v1;
+3
+3
+7
+1
+drop view v1;
+create view v1 as
+(((values (3), (7), (1))) order by 1);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (values (3),(7),(1) order by 1) latin1 latin1_swedish_ci
+select * from v1;
+3
+1
+3
+7
+drop view v1;
+10.5. view as [tailed] union of TVCs
+create view v1 as
+values (3), (7), (1) union values (3), (4), (2);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS values (3),(7),(1) union values (3),(4),(2) latin1 latin1_swedish_ci
+select * from v1;
+3
+3
+7
+1
+4
+2
+drop view v1;
+create view v1 as
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS values (3),(7),(1) union values (3),(4),(2) order by 1 latin1 latin1_swedish_ci
+select * from v1;
+3
+1
+2
+3
+4
+7
+drop view v1;
+create view v1 as
+(values (3), (7), (1) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (values (3),(7),(1) order by 1 limit 2) union (values (3),(4),(2) order by 1 desc limit 2) latin1 latin1_swedish_ci
+select * from v1;
+3
+1
+3
+4
+drop view v1;
+create view v1 as
+(values (3), (7), (1) order by 1 limit 2)
+union
+values (3), (4), (2)
+order by 1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (values (3),(7),(1) order by 1 limit 2) union values (3),(4),(2) order by 1 latin1 latin1_swedish_ci
+select * from v1;
+3
+1
+2
+3
+4
+drop view v1;
+10.6. view as [tailed] union of [tailed] select and tailed TVC
+create view v1 as
+( (((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2) )
+order by a;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3 order by `t1`.`a` limit 2) union (values (3),(4),(2) order by 1 desc limit 2) order by `a` latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+2
+3
+4
+drop view v1;
+create view v1 as
+( select a from t1 where a=1
+union
+values (3), (4), (2) order by 1 desc )
+union
+select a from t1 where a=2 order by a desc limit 3;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union values (3),(4),(2) order by 1 desc) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 2 order by `a` desc limit 3 latin1 latin1_swedish_ci
+select * from v1;
+a
+4
+3
+2
+drop view v1;
+10.7. view as select with CTE
+create view v1 as
+with t as (select * from t1 where a <=3)
+select * from t;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3)select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
+select * from v1;
+a
+3
+1
+2
+drop view v1;
+create view v1 as
+with t as
+( select * from t1 where a < 3
+union
+select * from t1 where a > 3
+order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3 order by `a` desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 latin1 latin1_swedish_ci
+select * from v1;
+a
+4
+7
+drop view v1;
+10.8. view as union with CTE
+create view v1 as
+with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+(select a from t1 where a=4 union select a from t where a=7 order by a desc);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3) union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3) order by `a` desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+select * from v1;
+a
+7
+4
+drop view v1;
+create view v1 as
+with t as
+( (select * from t1 where a < 3)
+union
+(select * from t1 where a > 3)
+order by a desc limit 3 )
+(select a from t where a=4 union select a from t where a=7 order by a desc);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3) union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3) order by `a` desc limit 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+select * from v1;
+a
+7
+4
+drop view v1;
+create view v1 as
+with t(a) as (values (2), (1)) select a from t;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(a) as (values (2),(1))select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
+select * from v1;
+a
+2
+1
+drop view v1;
+create view v1 as
+with t(a) as
+( values (2), (1)
+union
+(values (4), (7))
+order by 1 desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(a) as (values (2),(1) union (values (4),(7)) order by 1 desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+select * from v1;
+a
+7
+4
+drop view v1;
+create view v1 as
+with t(a) as
+( (values (2), (1))
+union
+(values (4), (7) order by 1 desc)
+order by 1 desc limit 3 )
+select a from t1 where a=1 union select a from t where a=7 order by a desc;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(a) as ((values (2),(1)) union (values (4),(7) order by 1 desc) order by 1 desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+select * from v1;
+a
+7
+1
+drop view v1;
+create view v1 as
+with t as (select * from t1 where a < 3),
+s as (select * from t1 where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3), s as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+select * from v1;
+a
+7
+1
+drop view v1;
+create view v1 as
+with t as (select * from t1 where a < 3),
+s as (select * from t where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3), s as (select `t`.`a` AS `a` from `t` where `t`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+drop view v1;
+drop table t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/brackets.test b/mysql-test/main/brackets.test
new file mode 100644
index 00000000000..b7bb616bd05
--- /dev/null
+++ b/mysql-test/main/brackets.test
@@ -0,0 +1,2498 @@
+select 1 union ( select 2 union select 3);
+explain extended
+select 1 union ( select 2 union select 3);
+select 1 union ( select 1 union select 1);
+explain extended
+select 1 union ( select 1 union select 1);
+select 1 union all ( select 1 union select 1);
+explain extended
+select 1 union all ( select 1 union select 1);
+select 1 union ( select 1 union all select 1);
+explain extended
+select 1 union ( select 1 union all select 1);
+select 1 union select 1 union all select 1;
+explain extended
+select 1 union select 1 union all select 1;
+
+(select 1 as a) union (select 2) order by a;
+explain extended
+(select 1 as a) union (select 2) order by a;
+/* select#1 */ select 1 AS `a` union /* select#2 */ select 2 AS `2` order by `a`;
+explain extended
+/* select#1 */ select 1 AS `a` union /* select#2 */ select 2 AS `2` order by `a`;
+
+select 1 union ( select 1 union (select 1 union (select 1 union select 1)));
+explain extended all
+select 1 union ( select 1 union (select 1 union (select 1 union select 1)));
+
+--echo #
+--echo # MDEV-6341: INSERT ... SELECT UNION with parenthesis
+--echo #
+create table t1 (a int, b int);
+insert into t1 (select 1,1 union select 2,2);
+select * from t1 order by 1;
+delete from t1;
+insert into t1 select 1,1 union select 2,2;
+select * from t1 order by 1;
+drop table t1;
+CREATE OR REPLACE TABLE t1 AS SELECT 1 AS a UNION SELECT 2;
+select * from t1 order by 1;
+drop table t1;
+CREATE OR REPLACE TABLE t1 AS (SELECT 1 AS a UNION SELECT 2);
+select * from t1 order by 1;
+drop table t1;
+CREATE OR REPLACE VIEW v1 AS (SELECT 1 AS a);
+show create view v1;
+drop view v1;
+CREATE OR REPLACE VIEW v1 AS SELECT 1 AS a UNION SELECT 2;
+show create view v1;
+drop view v1;
+CREATE OR REPLACE VIEW v1 AS (SELECT 1 AS a UNION SELECT 2);
+show create view v1;
+drop view v1;
+
+
+--echo #
+--echo # MDEV-10028: Syntax error on ((SELECT ...) UNION (SELECT ...))
+--echo #
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (30);
+
+((SELECT a FROM t1) UNION (SELECT a FROM t1));
+(SELECT * FROM t1 UNION SELECT * FROM t1);
+((SELECT a FROM t1) LIMIT 1);
+SELECT * FROM (SELECT 1 UNION (SELECT 2 UNION SELECT 3)) t1;
+DROP TABLE t1;
+
+--echo #
+--echo # test of several levels of ORDER BY / LIMIT
+--echo #
+create table t1 (a int, b int);
+insert into t1 (a,b) values (1, 100), (2, 200), (3,30), (4,4);
+
+select a,b from t1 order by 1 limit 3;
+(select a,b from t1 order by 1 limit 3) order by 2 limit 2;
+(select 10,1000 union select a,b from t1 order by 1 limit 3) order by 2 limit 2;
+((select a,b from t1 order by 1 limit 3) order by 2 limit 2) order by 1 limit 1;
+((select a,b from t1 order by 1 limit 3) order by 2 limit 2) order by 1;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-16359: union with 3 selects in brackets
+--echo #
+
+select 1 union select 1 union select 1;
+(select 1 union select 1 union select 1);
+((select 1) union (select 1) union (select 1));
+
+--echo #
+--echo # MDEV-16357: union in brackets with tail
+--echo # union with tail in brackets
+--echo #
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES(1),(2),(3),(4);
+
+CREATE TABLE t2 (a int);
+INSERT INTO t2 VALUES (4),(5),(6),(7);
+
+(SELECT a FROM t1 UNION SELECT a FROM t2) LIMIT 1;
+(SELECT a FROM t1 UNION SELECT a FROM t2) ORDER BY a DESC;
+
+(SELECT a FROM t1 UNION SELECT a FROM t2 LIMIT 1);
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-19324: ((SELECT ...) ORDER BY col ) LIMIT n
+--echo #
+
+create table t1 (a int);
+insert into t1 values (10),(20),(30);
+
+let $q1=
+select a from t1 order by a desc limit 1;
+eval $q1;
+eval explain extended $q1;
+eval explain format=json $q1;
+
+let $q2=
+(select a from t1 order by a desc) limit 1;
+eval $q2;
+eval explain extended $q2;
+eval explain format=json $q2;
+
+let $q1=
+(select a from t1 where a=20 union select a from t1) order by a desc limit 1;
+eval $q1;
+eval explain extended $q1;
+eval explain format=json $q1;
+
+let $q2=
+((select a from t1 where a=20 union select a from t1) order by a desc) limit 1;
+eval $q2;
+eval explain extended $q2;
+eval explain format=json $q2;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-19363: ((SELECT ...) ORDER BY col ) LIMIT n UNION ...
+--echo #
+
+create table t1 (pk int);
+insert into t1 values (5),(4),(1),(2),(3);
+
+let $q=
+((select * from t1 order by pk) limit 2) union (select * from t1 where pk > 4);
+eval $q;
+eval explain extended $q;
+eval explain format=json $q;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-18689: parenthesis around table names and derived tables
+--echo #
+
+select * from ( mysql.db );
+
+create table t1 (a int);
+insert into t1 values (7), (2), (7);
+
+select * from (t1);
+select * from ((t1));
+select * from (t1 t) where t.a > 5;
+select * from ((t1 t)) where t.a > 5;
+
+select * from ((select a, sum(a) from t1 group by a) t);
+select * from (((select a, sum(a) from t1 group by a) t));
+
+update (t1 t) set t.a=t.a+1;
+select * from t1;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-19956: query expressions in different contexts
+--echo #
+
+create table t1 (a int);
+insert into t1 values (3), (7), (1), (2), (4);
+create table t2 (a int, b int);
+insert into t2 values (3,30), (7,70), (1,10), (2,20), (4,40);
+
+
+--echo # 1. select
+
+--echo # 1.1. simple select
+
+select * from t1;
+(select * from t1);
+((select * from t1));
+--echo # 1.2. select with tail
+select * from t1 order by a;
+select a from t1 order by a;
+select a from t1 order by 1;
+select * from t1 order by t1.a;
+(select * from t1 order by t1.a);
+((select * from t1 order by t1.a));
+(select * from t1 order by t1.a limit 2);
+(select a from t1 where a=1) order by 1 desc;
+
+--echo # 1.2. select with several tails
+
+(select * from t2 order by a limit 2) order by b desc;
+(select * from t2 order by t2.a limit 2) order by b desc;
+((select * from t2 order by t2.a limit 2) order by b desc);
+(((select * from t2 order by t2.a) limit 2) order by b desc);
+
+
+--echo # 2. union
+
+--echo # 2.1 simple union
+
+select a from t1 union select a from t1;
+select a from t1 union all select a from t1;
+select a from t1 union select b from t2;
+(select a from t1) union (select a from t1);
+(select a from t1) union (select b from t2);
+select a from t1 where a=1 union select a from t1 where a=3;
+(select a from t1 where a=1) union select a from t1 where a=3;
+((select a from t1 where a=1) union select a from t1 where a=3);
+((select a from t1 where a<=3) union (select a from t1 where a=3));
+select a from t1 where a=1 union (select a from t1 where a=3);
+(select a from t1 where a=1 union (select a from t1 where a=3));
+((select a from t1 where a=1 union (select a from t1 where a=3)));
+
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=7;
+
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=7 );
+
+(select a from t1 where a=1 order by a) union select a from t1 where a=3;
+(select a from t1 where a!=3 order by a desc) union select a from t1 where a=3;
+((select a from t1 where a=1 order by a) union select a from t1 where a=3);
+(select a from t1 where a!=3 order by a desc) union select a from t1 where a=3;
+
+( ( select a from t1 where a!=3 order by a desc limit 3)
+ union
+ select a from t1 where a=3 );
+
+( select a from t1 where a <=3 except select a from t1 where a >=3 )
+ union
+ select a from t1 where a=7;
+
+( ( select a from t1 where a <=3
+ except
+ select a from t1 where a >=3 )
+ union
+ select a from t1 where a=7 );
+
+( select a from t1 where a <=3
+ except
+ ( select a from t1 where a >=3
+ union
+ select a from t1 where a=7 ) );
+
+( ( select a from t1 where a <=3 )
+ except
+ ( select a from t1 where a >=3
+ union
+ select a from t1 where a=7 ) );
+
+--echo # 2.2. union with tail
+
+select a from t1 where a=1 union select a from t1 where a=3 order by a desc;
+(select a from t1 limit 2) union select a from t1 where a=3 order by a desc;
+
+select a from t1 where a=4 union (select a from t1 where a <=4 limit 2)
+order by a desc;
+
+select a from t1 where a=4
+union
+(select a from t1 where a <=4 order by a limit 2)
+order by a desc;
+
+( select a from t1 where a=4
+ union
+ ( select a from t1 where a <=4 order by a limit 2 ) )
+order by a desc;
+
+( select a from t1 where a <=3 except select a from t1 where a >=3 )
+ union
+ select a from t1 where a=7 order by a desc;
+
+( select a from t1 where a!=3 order by a desc )
+ union
+ select a from t1 where a=3
+ order by a desc;
+
+(select a from t1 where a=1)
+union
+(select a from t1 where a=3)
+order by a desc;
+
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3 )
+order by a desc;
+
+( ( select a from t1 where a=1 )
+ union
+ ( select a from t1 where a=3 ) )
+order by a desc;
+
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3 )
+order by 1 desc;
+
+((select a from t1 where a=1 union select a from t1 where a=3)) order by 1 desc;
+(((select a from t1 where a=1) union (select a from t1 where a=3)))
+order by 1 desc;
+
+( (select a from t1 where a=1 )
+ union
+ (select a from t1 where a=3) )
+order by 1 desc;
+
+--echo # 2.3. complex union
+
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2
+union
+select a from t1 where a=4;
+
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=2 )
+union
+select a from t1 where a=4;
+
+(select a from t1 where a=1 union select a from t1 where a=3)
+union
+(select a from t1 where a=2 union select a from t1 where a=4);
+(select a from t1 where a=1 union (select a from t1 where a=3))
+union
+((select a from t1 where a=2) union select a from t1 where a=4);
+
+( ( select a from t1 where a=1)
+ union
+ select a from t1 where a=3 )
+union
+select a from t1 where a=2
+union
+select a from t1 where a=4;
+( ( ( select a from t1 where a=1)
+ union
+ select a from t1 where a=3 )
+ union
+ select a from t1 where a=2 )
+union
+select a from t1 where a=4;
+
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=2
+union
+(select a from t1 where a=4);
+
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+( select a from t1 where a=2
+ union
+ ( select a from t1 where a=4 ) );
+
+select a from t1 where a=1
+union
+( select a from t1 where a=3
+ union
+ ( select a from t1 where a=2
+ union
+ ( select a from t1 where a=4 ) ) );
+
+--echo # 2.4. complex union with tail
+
+( ( select a from t1 where a=1 union select a from t1 where a=3 )
+ order by a desc )
+union
+( ( select a from t1 where a=2 union select a from t1 where a=4 )
+ order by a desc );
+
+( ( select a from t1 where a=1 union select a from t1 where a=3 )
+ order by a desc )
+union
+( ( select a from t1 where a=2 union select a from t1 where a=4 )
+ order by a desc )
+order by a;
+
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=2 order by a desc limit 2 )
+union
+select a from t1 where a=4
+order by a;
+
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3 order by a desc )
+union
+select a from t1 where a=2 order by a desc limit 2;
+
+( ( select a from t1 where a >= 2
+ union
+ select a from t1 where a=1 order by a desc limit 2 )
+ union
+ select a from t1 where a=3 order by a limit 2 )
+union
+select a from t1 where a=1;
+
+
+--echo # 3. TVC
+
+--echo # 3.1. simple TVC
+
+values (3), (7), (1);
+(values (3), (7), (1));
+((values (3), (7), (1)));
+
+--echo # 3.2. simple TVC with tail(s)
+
+values (3), (7), (1) order by 1;
+(values (3), (7), (1)) order by 1;
+((values (3), (7), (1))) order by 1;
+(((values (3), (7), (1))) order by 1);
+(values (3), (7), (1) limit 2) order by 1 desc;
+((values (3), (7), (1)) order by 1 desc) limit 2;
+(((values (3), (7), (1)) order by 1 desc) limit 2);
+
+--echo # 3.3. union of TVCs
+
+values (3), (7), (1) union values (3), (4), (2);
+values (3), (7), (1) union all values (3), (4), (2);
+values (3), (7), (1) union values (3), (4), (2);
+values (3), (7), (1) except values (3), (4), (2);
+(values (3), (7), (1)) union (values (3), (4), (2));
+(values (3), (7), (1)) union (values (3), (4), (2)) union values (5), (7);
+(values (3), (7), (1)) union (values (3), (4), (2)) union (values (5), (7));
+(values (3), (7), (1) union values (3), (4), (2)) union values (5), (7);
+values (3), (7), (1) union (values (3), (4), (2) union values (5), (7));
+(values (3), (7), (1) union ((values (3), (4), (2) union values (5), (7))));
+
+--echo # 3.4. tailed union of TVCs
+
+values (3), (7), (1) union values (3), (4), (2) order by 1;
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+values (3), (7), (1) union (values (3), (4), (2)) order by 1;
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+((values (3), (7), (1)) union values (3), (4), (2)) order by 1;
+
+--echo # 3.5. union of tailed TVCs
+
+(values (3), (7), (1) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+
+((values (3), (7), (1) order by 1) limit 2)
+union
+((values (3), (4), (2) order by 1 desc) limit 2);
+
+(((values (3), (7), (1)) order by 1) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2);
+
+--echo # 3.6. tailed union of tailed TVCs
+
+(values (3), (7), (1) order by 1 limit 2)
+union
+values (3), (4), (2)
+order by 1;
+
+((values (3), (7), (1)) order by 1 limit 2)
+union
+((values (3), (4), (2) order by 1 desc) limit 2)
+order by 1;
+
+--echo # 3.7 [tailed] union of [tailed] select and [tailed] TVC
+
+(select a from t1 where a <=3 order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+
+((select a from t1 where a <=3) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+
+(((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2);
+
+( (((select a from t1 where a <=3) order by a) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2) );
+
+(select a from t1 where a <=3 order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2)
+order by a;
+
+((select a from t1 where a <=3) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2)
+order by a;
+
+(((select a from t1 where a <=3) order by a) limit 2)
+union
+(((values (3), (4), (2)) order by 1 desc) limit 2)
+order by a;
+
+(((values (3), (4), (2)) order by 1 desc) limit 2);
+( (((select a from t1 where a <=3) order by a) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2) )
+order by a;
+
+(values (3), (4), (2) order by 1 desc limit 2)
+union
+(select a from t1 where a <=3 order by 1 limit 2);
+
+(values (3), (4), (2) order by 1 desc limit 2)
+union
+((select a from t1 where a <=3) order by 1 limit 2);
+
+(((values (3), (4), (2)) order by 1 desc) limit 2)
+union
+(((select a from t1 where a <=3) order by 1) limit 2);
+
+(((values (3), (4), (2)) order by 1 desc) limit 2)
+union
+(((select a from t1 where a <=3) order by a) limit 2)
+order by 1;
+
+( select a from t1 where a=1
+ union
+ values (3), (4), (2) order by 1 desc )
+union
+select a from t1 where a=2 order by a desc limit 3;
+
+
+--echo 4. CTE
+
+--echo 4.1. simple select with simple CTE
+
+with t as (select * from t1 where a <=3)
+select * from t;
+
+with t as (select * from t1 where a <=3)
+(select * from t);
+
+with t as (select * from t1 where a <=3)
+((select * from t));
+
+with t as ((select * from t1 where a <=3))
+select * from t;
+with t as (((select * from t1 where a <=3)))
+select * from t;
+
+--echo 4.2. tailed select with simple CTE
+
+with t as (select * from t1 where a <=3)
+select * from t order by a;
+
+with t as (select * from t1 where a <=3)
+(select * from t) order by a;
+
+with t as (select * from t1 where a <=3)
+(select * from t) order by a desc limit 2;
+
+--echo 4.3. [tailed] select with tailed CTE
+
+with t as (select * from t1 where a >=2 order by a limit 2)
+select * from t;
+
+with t as (((select * from t1 where a >=2) order by a desc) limit 2)
+select * from t;
+
+with t as (select * from t1 where a >=2 order by a desc limit 2)
+select * from t order by a;
+
+--echo 4.4. [tailed] union with CTE
+
+with t as (select * from t1 where a <=3)
+select a from t1 where a=1 union select a from t where a=3;
+
+with t as (select * from t1 where a <=3)
+(select a from t) union (select b from t2);
+
+with t as (select * from t1 where a <=3)
+(select a from t) union (select b as a from t2) order by a desc;
+
+--echo 4.5. [tailed] union with [tailed] union in CTE
+
+with t as (select * from t1 where a < 3 union select * from t1 where a > 3)
+select a from t1 where a=1 union select a from t where a=7;
+
+with t as
+( select * from t1 where a < 3
+ union
+ select * from t1 where a > 3
+ order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7;
+
+with t as
+( select * from t1 where a < 3
+ union
+ select * from t1 where a > 3
+ order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+
+with t as
+( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+
+with t as
+( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+(select a from t1 where a=4 union select a from t where a=7 order by a desc);
+
+with t as
+( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+((select a from t1 where a=4 union select a from t where a=7) order by a desc);
+
+with t as
+( select * from t1 where a < 3
+ union
+ values (4), (7)
+ order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+
+
+--echo 4.6. [tailed] union with [tailed] union of TVC in CTE
+
+with t(a) as
+( values (2), (1)
+ union
+ (values (4), (7))
+ order by 1 desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+
+with t(a) as
+( (values (2), (1))
+ union
+ (values (4), (7) order by 1 desc)
+ order by 1 desc limit 3 )
+select a from t1 where a=1 union select a from t where a=7 order by a desc;
+
+with t(a) as
+( (values (2), (1))
+ union
+ (values (4), (7) order by 1 desc)
+ order by 1 limit 3 )
+select a from t where a=1 union values (7) order by a desc;
+
+with t(a) as
+( (values (2), (1))
+ union
+ (values (4), (7) order by 1 desc ) )
+select a from t where a=1 union select 7 order by a desc;
+
+--echo 4.5. [tailed] union with two CTEs
+
+with t as (select * from t1 where a < 3),
+ s as (select * from t1 where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+
+with t as (select * from t1 where a < 3),
+ s as (select * from t1 where a > 3)
+(select a from t where a=1 union select a from s where a=7 order by a desc);
+
+with t as (select * from t1 where a < 3),
+ s as (select * from t1 where a > 3)
+(select a from t where a=1 union select a from s where a=7) order by a desc;
+
+with t as (select * from t1 where a < 3),
+ s as (select * from t where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+
+
+--echo # 5. single-row subquery in expression
+
+--echo # 5.1. [tailed] simple select in expression
+
+select (a+1) + b as r from t2;
+select ((a+1) + b) as r from t2;
+select (b + (select 1)) as r from t2;
+select (select a from t1 where a <=3 order by a desc limit 1) as r from t2;
+
+select
+(select a from t1 where a <=3 order by a desc limit 1) as r from t2;
+
+select (select 100) as r from t2;
+select ((select 100)) as r from t2;
+select (select 100) + t2.b as r from t2;
+select ((select 100) + t2.b) as r from t2;
+
+--echo # 5.2. [tailed] TVC in expression
+
+select (values (200)) as r from t2;
+select ((values (200))) as r from t2;
+select (values (200)) + t2.b as r from t2;
+select ((values (200)) + t2.b) as r from t2;
+select (values (200), (300) order by 1 desc limit 1) as r from t2;
+select ((values (200), (300)) order by 1 desc limit 1) as r from t2;
+select (select * from t1 limit 1) as r from t2;
+select (select * from t1 order by a limit 1) as r from t2;
+select ((select * from t1 order by a limit 1)) as r from t2;
+((select ((select * from t1 order by a limit 1)) as r from t2));
+select (select * from t1 order by a limit 1) + t2.b as r from t2;
+
+--echo # 5.3. [tailed] union in expression
+
+select
+( select a from t1 where a<3 union select a from t1 where a>4
+ order by a desc limit 1 ) as r
+from t1;
+
+select
+( (select a from t1 where a<3) union (select a from t1 where a>4)
+ order by a desc limit 1 ) as r
+from t1;
+
+select
+( select a from t1 where a<3 union select a from t1 where a>4
+ order by a desc limit 1 ) + t1.a as r
+from t1;
+
+select
+t1.a +
+( select a from t1 where a<3 union select a from t1 where a>4
+ order by a desc limit 1 ) as r
+from t1;
+
+select
+( (select a from t1 where a<3 union select a from t1 where a>4
+ order by a desc limit 1 ) + t1.a) as r
+from t1;
+
+select
+( ( (select a from t1 where a<3) union (select a from t1 where a>4)
+ order by a desc limit 1 ) + t1.a ) as r
+from t1;
+
+--echo # 5.4. [tailed] select with simple CTE in expression
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t limit 1) as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t limit 1) + t2.b as r
+from t2;
+
+select
+t2.b +( with t as (select * from t1 where a <=3)
+ select a from t limit 1) as r
+from t2;
+
+select
+((( with t as (select * from t1 where a <=3)
+ select a from t limit 1) + t2.b)) as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t limit 1) + 100 as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t limit 1) + (select 100) as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t limit 1) + t2.b + (select 100) as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t limit 1 ) + (t2.b + (select 100)) as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t limit 1 ) + t2.b + (values (100)) as r
+from t2;
+
+--echo # 5.5. [tailed] union with simple CTE in expression
+
+select
+( with t as (select * from t1 where a <=3)
+ select a from t union select b from t2 order by a desc limit 1) as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ (select a from t) union (select b from t2) order by a desc limit 1) as r
+from t2;
+
+select
+( with t as (select * from t1 where a <=3)
+ (select a from t) union (select b from t2) order by a desc limit 1) as r
+from t2;
+
+select
+( ( with t as (select * from t1 where a <=3)
+ (select a from t) union (select b from t2) order by a desc limit 1) +
+ t2.a ) as r
+from t2;
+
+--echo # 5.6. [tailed] union with CTE with union in expression
+
+select
+( with t as
+ ( select * from t1 where a < 3
+ union
+ select * from t1 where a > 3
+ order by a desc limit 3 )
+ select a from t1 where a=4 union select a from t where a=7 limit 1) as r
+from t2;
+
+select
+( with t as
+ ( select * from t1 where a < 3
+ union
+ select * from t1 where a > 3
+ order by a desc limit 3 )
+ select a from t1 where a=4 union select a from t where a=7 limit 1) +
+t2. b as r
+from t2;
+
+--echo # 5.7. [tailed] union of TVCs with CTE with union in expression
+
+select
+( with t(a) as
+ ( (values (2), (1))
+ union
+ (values (4), (7) order by 1 limit 1)
+ order by 1 desc limit 3 ) select * from t limit 1 ) + t2.b as r
+from t2;
+
+select
+( with t(a) as
+ ( select 2 union select 1
+ union
+ (values (4), (7) order by 1 limit 1)
+ order by 1 limit 3 ) select * from t limit 1 ) + t2.b as r
+from t2;
+
+
+--echo # 6. subquery
+
+--echo # 6.1. TVC in IN subquery
+
+select a from t1 where a in (1,8,7);
+select a from t1 where a in (values (1), (8), (7));
+
+--echo # 6.2. simple select in IN subquery
+
+select a from t1 where a in (select a from t2 where a <= 3);
+select a from t1 where a in ((select a from t2 where a <= 3));
+
+--echo # 6.3. union in IN subquery
+
+select a from t1
+where a in (select a from t1 where a<=2 union select a from t2 where b>40);
+
+select a from t1
+where a in (select a from t1 where a<=2 union (select a from t2 where b>40));
+
+select a from t1
+where a in ((select a from t1 where a<=2) union select a from t2 where b>40);
+
+select a from t1
+where a in ((select a from t1 where a<=2) union (select a from t2 where b>40));
+
+--echo # 6.4. select with CTE and union in IN subquery
+
+with t as (select a from t1 where a<=2)
+select a from t1
+where a in ((select a from t) union (select a from t2 where b>40));
+
+with t as ((select a from t1 where a<=2))
+select a from t1
+where a in ((select a from t) union (select a from t2 where b>40));
+
+with t as ((select a from t1 where a<=2) order by a desc limit 1)
+select a from t1
+where a in ((select a from t) union (select a from t2 where b>40));
+
+
+--echo # 6.5. NOT IN subquery
+
+select a from t1 where a not in (1,8,7);
+select a from t1 where a not in (values (1), (8), (7));
+select a from t1 where a not in (select a from t2 where a <= 3);
+select a from t1 where a not in ((select a from t2 where a <= 3));
+
+select a from t1
+where a not in (select a from t1 where a<=2
+ union
+ select a from t2 where b>40);
+
+select a from t1
+where a not in (select a from t1 where a<=2
+ union
+ (select a from t2 where b>40));
+
+select a from t1
+where a not in ((select a from t1 where a<=2)
+ union
+ select a from t2 where b>40);
+
+select a from t1
+where a not in ((select a from t1 where a<=2)
+ union
+ (select a from t2 where b>40));
+
+with t as ((select a from t1 where a<=2) order by a desc limit 1)
+select a from t1
+where a not in ((select a from t) union (select a from t2 where b>40));
+
+--echo # 6.6. IN subquery in expression
+
+select 1 in (select a from t1) as r, b from t2 where b > 30;
+select (1 in (select a from t1)) as r, b from t2 where b > 30;
+select 1 in ((select a from t1)) as r, b from t2 where b > 30;
+select ((1 in ((select a from t1)))) as r, b from t2 where b > 30;
+select ((1 in ((select a from t1)))) as r, b from t2 where b > 30;
+select b, if (a in (select a from t1 where a > 3),10,20) as r from t2;
+select b, if (a in ((select a from t1 where a > 3)),10,20) as r from t2;
+
+--echo # 6.7. IN subquery in SF and SP
+
+create function f1(x int) returns int
+return (x in ((select a from t1 where a <= 4)));
+select b, f1(a) from t2 where b > 20;
+drop function f1;
+delimiter |;
+create function f2(x int) returns int
+if x in ((select a from t1 where a <= 4))
+ then return 100;
+ else return 200;
+end if |
+delimiter ;|
+select b, f2(a) from t2 where b > 20;
+drop function f2;
+
+--echo # 6.8. EXISTS subquery
+
+select exists (select a from t1 where t1.a=t2.a) as r, b from t2 where b > 30;
+select exists ((select a from t1 where t1.a=t2.a)) as r, b from t2 where b > 30;
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from t2 where exists ((select * from s where s.a=t2.a));
+with t as ((select a from t1 where a<=2) order by a desc limit 1)
+select a from t2
+where not exists ((select a from t where t.a=t2.a)
+ except
+ (select a from t where a>40));
+
+--echo # 6.9. EXISTS subquery with SF and SP
+
+create function f1(x int) returns int
+return exists (((select * from t1 where x=a and a <= 4)));
+select b, f1(a) from t2 where b > 20;
+drop function f1;
+
+delimiter |;
+create function f2(x int) returns int
+if not exists (((select * from t1 where x=a and a <= 4)))
+ then return 100;
+ else return 200;
+end if |
+delimiter ;|
+select b, f2(a) from t2 where b > 20;
+drop function f2;
+
+--echo # 6.10. subquery with ANY
+
+select a from t1 where a = any(select a from t2 where a <= 3);
+select a from t1 where a = any((select a from t2 where a <= 3));
+
+select a from t1
+where a = any (select a from t1 where a<=2
+ union
+ select a from t2 where b>40);
+
+select a from t1
+where a = any(select a from t1 where a<=2
+ union
+ (select a from t2 where b>40));
+
+select a from t1
+where a = any((select a from t1 where a<=2)
+ union
+ select a from t2 where b>40);
+
+select a from t1
+where a = any((select a from t1 where a<=2)
+ union
+ (select a from t2 where b>40));
+
+
+--echo # 7. create table as
+
+--echo # 7.1. create table as simple select
+
+create table t as select * from t1 where a <=3;
+select * from t;
+drop table t;
+
+create table t select * from t1 where a <=3;
+select * from t;
+drop table t;
+
+create table t as (select * from t1 where a <=3);
+select * from t;
+drop table t;
+
+create table t (select * from t1 where a <=3);
+select * from t;
+drop table t;
+
+create table t as ((select * from t1 where a <=3));
+select * from t;
+drop table t;
+
+create table t ((select * from t1 where a <=3));
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2)) as select * from t1 where a <=3;
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2)) select * from t1 where a <=3;
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2)) as (select * from t1 where a <=3);
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2)) (select * from t1 where a <=3);
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2)) as ((select * from t1 where a <=3));
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2)) ((select * from t1 where a <=3));
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2), b int) as
+ ((select a, a as b from t1 where a <=3));
+select * from t;
+drop table t;
+
+create table t(a decimal(10,2), b int)
+ ((select a, a as b from t1 where a <=3));
+select * from t;
+drop table t;
+
+--echo # 7.2. create table as tailed select
+
+create table t as select * from t1 where a <=3 order by 1;
+select * from t;
+drop table t;
+
+create table t select * from t1 where a <=3 order by 1;
+select * from t;
+drop table t;
+
+create table t as select * from t1 where a <=3 order by 1 desc limit 2;
+select * from t;
+drop table t;
+
+create table t select * from t1 where a <=3 order by 1 desc limit 2;
+select * from t;
+drop table t;
+
+create table t as ((select * from t1 where a <=3) order by 1 desc) limit 2;
+select * from t;
+drop table t;
+
+create table t ((select * from t1 where a <=3) order by 1 desc) limit 2;
+select * from t;
+drop table t;
+
+--echo # 7.3. create table as select wihout from clause
+
+create table t as select 10;
+select * from t;
+drop table t;
+
+create table t select 10;
+select * from t;
+drop table t;
+
+--echo # 7.4. create table as union of selects wihout from clause
+
+create table t as select 10 union select 70;
+select * from t;
+drop table t;
+
+create table t select 10 union select 70;
+select * from t;
+drop table t;
+
+--echo # 7.5. create table as TVC
+
+create table t as values (7), (3), (8);
+select * from t;
+drop table t;
+
+create table t values (7), (3), (8);
+select * from t;
+drop table t;
+
+create table t as (values (7), (3), (8));
+select * from t;
+drop table t;
+
+create table t (values (7), (3), (8));
+select * from t;
+drop table t;
+
+create table t as ((values (7), (3), (8)));
+select * from t;
+drop table t;
+
+create table t ((values (7), (3), (8)));
+select * from t;
+drop table t;
+
+--echo # 7.6. create table as select with CTE
+
+create table t as
+with s(a) as (select * from t1 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+drop table t;
+
+create table t
+with s(a) as (select * from t1 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+drop table t;
+
+create table t as
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s;
+select * from t;
+drop table t;
+
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s;
+select * from t;
+drop table t;
+
+create table t as
+with s(a) as (select * from t1 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+drop table t;
+
+--echo # 7.7. create table as union with CTE
+
+create table t as
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+drop table t;
+
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+drop table t;
+
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+drop table t;
+
+create table t as
+with s as
+( ( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) ) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+drop table t;
+
+create table t
+with s as
+( ( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) ) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+drop table t;
+
+create table t as
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s where a>=7 union select a from s where a<4;
+select * from t;
+drop table t;
+
+create table t
+with s as
+( (select * from t1 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s where a>=7 union select a from s where a<4;
+select * from t;
+drop table t;
+
+create table t as
+with s as
+( select * from t1 where a <=4 or a=7 )
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+drop table t;
+
+create table t
+with s as
+(select * from t1 where a <=4 or a=7)
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+drop table t;
+
+create table t (a int)
+with s as
+( select * from t1 where a <=4 or a=7 )
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+drop table t;
+
+create table t (a int)
+with s as
+(select * from t1 where a <=4 or a=7)
+select * from s where a>=7 union select a from s where a<3;
+select * from t;
+drop table t;
+
+create table t
+with s as
+( select * from t1 where a <=4 or a=7 )
+select * from s where a>=7 union select a from s where a<3
+order by a desc limit 2;
+select * from t;
+drop table t;
+
+create table t
+( with s as
+ ( select * from t1 where a <=4 or a=7 )
+ select * from s where a>=7 union select a from s where a<3
+ order by a desc limit 2 );
+select * from t;
+drop table t;
+
+
+--echo # 8. insert
+
+create table t (c int, d int);
+
+--echo # 8.1. insert simple select
+
+insert into t select * from t2 where a <=3;
+select * from t;
+delete from t;
+
+insert into t(c) select t2.a from t2 where a <=3;
+select * from t;
+delete from t;
+
+insert into t (select * from t2 where a <=3);
+select * from t;
+delete from t;
+
+insert into t(c) (select t2.a from t2 where a <=3);
+select * from t;
+delete from t;
+
+insert into t ((select * from t2 where a <=3));
+select * from t;
+delete from t;
+
+insert into t(c) ((select t2.a from t2 where a <=3));
+select * from t;
+delete from t;
+
+drop table t;
+create table t(c decimal(10,2));
+
+insert into t select * from t1 where a <=3;
+select * from t;
+delete from t;
+
+insert into t(c) select * from t1 where a <=3;
+select * from t;
+delete from t;
+
+insert into t (select * from t1 where a <=3);
+select * from t;
+delete from t;
+
+insert into t(c) (select * from t1 where a <=3);
+select * from t;
+delete from t;
+
+insert into t ((select * from t1 where a <=3));
+select * from t;
+delete from t;
+
+insert into t(c) ((select * from t1 where a <=3));
+select * from t;
+delete from t;
+
+drop table t;
+create table t(a decimal(10,2), b int);
+
+insert into t ((select * from t2 where a <=3));
+select * from t;
+delete from t;
+
+insert into t(a) ((select a from t2 where a <=3));
+select * from t;
+delete from t;
+
+drop table t;
+create table t(c int, d int);
+
+--echo # 8.2. insert tailed select
+
+insert into t select * from t2 where a <=3 order by 1;
+select * from t;
+delete from t;
+
+insert into t(c) select a from t2 where a <=3 order by 1;
+select * from t;
+delete from t;
+
+insert into t select * from t2 where a <=3 order by 1 desc limit 2;
+select * from t;
+delete from t;
+
+insert into t(c) select a from t2 where a <=3 order by 1 desc limit 2;
+select * from t;
+delete from t;
+
+insert into t ((select * from t2 where a <=3) order by 1 desc) limit 2;
+select * from t;
+delete from t;
+
+insert into t(c) ((select a from t2 where a <=3) order by 1 desc) limit 2;
+select * from t;
+delete from t;
+
+--echo # 8.3. insert select without from clause
+
+insert into t select 10, 20;
+select * from t;
+delete from t;
+
+insert into t(c) select 10;
+select * from t;
+delete from t;
+
+--echo # 8.4. insert union of selects without from clause
+
+insert into t select 10,20 union select 70,80;
+select * from t;
+delete from t;
+
+insert into t(c) select 10 union select 70;
+select * from t;
+delete from t;
+
+--echo # 8.5. insert TVC
+
+insert into t values (7,70), (3,30), (8,80);
+select * from t;
+delete from t;
+
+insert into t(c) values (7), (3), (8);
+select * from t;
+delete from t;
+
+insert into t (values (7,70), (3,30), (8,80));
+select * from t;
+delete from t;
+
+insert into t(c) (values (7), (3), (8));
+select * from t;
+delete from t;
+
+insert into t ((values (7,70), (3,30), (8,80)));
+select * from t;
+delete from t;
+
+insert into t(c) ((values (7), (3), (8)));
+select * from t;
+delete from t;
+
+--echo # 8.7. insert simple select with CTE
+
+insert into t
+with s(a,b) as (select * from t2 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+delete from t;
+
+insert into t(c)
+with s(a) as (select a from t2 where a <=3 order by 1 desc limit 2)
+select * from s;
+select * from t;
+delete from t;
+
+insert into t
+with s as
+( (select * from t2 where a <=4 order by 1 desc limit 2)
+ union
+ values (3,30), (8,80), (7,70) )
+select * from s;
+select * from t;
+delete from t;
+
+insert into t(c)
+with s as
+( (select a from t2 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s;
+select * from t;
+delete from t;
+
+--echo # 8.8. insert into union with CTE
+insert into t(c)
+with s as
+( (select a from t2 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s where a>=7 union select a from t2 where b<40;
+select * from t;
+delete from t;
+
+insert into t
+with s as
+( (select * from t2 where a <=4 order by 1 desc limit 2)
+ union
+ values (3,30), (8,80), (7,70) )
+select * from s where a>=7 union select * from s where a<4;
+select * from t;
+delete from t;
+
+insert into t(c)
+with s as
+( (select a from t2 where a <=4 order by 1 desc limit 2)
+ union
+ values (3), (8), (7) )
+select * from s where a>=7 union select * from s where a<4;
+select * from t;
+delete from t;
+
+insert into t
+with s as
+( select * from t2 where a <=4 or a=7 )
+select * from s where a>=7 union select * from s where a<3;
+select * from t;
+delete from t;
+
+insert into t(c)
+with s as
+( select a from t2 where a <=4 or a=7 )
+select * from s where a>=7 union select * from s where a<3;
+select * from t;
+delete from t;
+
+drop table t;
+
+
+--echo # 9. derived table
+
+--echo # 9.1. derived table as [tailed] simple select
+
+select * from (select * from t1) as dt;
+select * from ((select * from t1)) as dt;
+select * from (((select * from t1))) as dt;
+select * from (select * from t1 order by a) as dt;
+select * from (select a from t1 order by a) as dt;
+select * from (select a from t1 order by 1) as dt;
+select * from (select a from t1 order by t1.a) as dt;
+select * from ((select * from t1 order by t1.a limit 2)) as dt;
+select * from ((select * from t2 order by a limit 2) order by b desc) dt;
+select * from ((select a from t1 where a=1) order by 1 desc) dt;
+
+--echo # 9.2. derived table as select with two tails
+
+select * from
+((select * from t2 order by t2.a limit 2) order by b desc) dt;
+
+select * from
+((select * from t2 order by t2.a limit 2) order by b desc) as dt;
+
+select * from
+(((select * from t2 order by t2.a limit 2) order by b desc )) as dt;
+
+select * from
+(((select * from t2 order by t2.a) limit 2) order by b desc) dt;
+
+select * from
+((select * from t2 order by a limit 2) order by b desc) dt;
+
+select * from
+((select a from t1 where a=1) order by 1 desc) as dt;
+
+select * from
+((select * from t2 order by t2.a limit 2) order by b desc) as dt;
+
+
+--echo # 9.3. derived table as union
+
+select * from (select a from t1 union select a from t1) as dt;
+select * from (select a from t1 union all select a from t1) as dt;
+select * from (select a from t1 union select b from t2) as dt;
+
+select * from
+((select a from t1) union (select a from t1)) as dt;
+
+select * from
+((select a from t1) union (select b from t2)) as dt;
+
+select * from
+(select a from t1 where a=1 union select a from t1 where a=3) dt;
+
+select * from
+((select a from t1 where a=1) union select a from t1 where a=3) dt;
+
+select * from
+(((select a from t1 where a=1) union select a from t1 where a=3)) dt;
+
+select * from
+(((select a from t1 where a<=3) union (select a from t1 where a=3))) as dt;
+
+select * from
+(select a from t1 where a=1 union (select a from t1 where a=3)) as dt;
+
+select * from
+((select a from t1 where a=1 union (select a from t1 where a=3))) as dt;
+
+select * from
+(((select a from t1 where a=1 union (select a from t1 where a=3)))) as dt;
+
+select * from
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=7 ) as dt;
+
+select * from
+( (select a from t1 where a=1 order by a)
+ union
+ select a from t1 where a=3 ) as dt;
+
+select * from
+( (select a from t1 where a!=3 order by a desc)
+ union
+ select a from t1 where a=3 ) as dt;
+
+select * from
+( ( select a from t1 where a <=3 except select a from t1 where a >=3 )
+ union
+ select a from t1 where a=7 ) as dt;
+
+select * from
+( ( ( select a from t1 where a <=3
+ except
+ select a from t1 where a >=3 )
+ union
+ select a from t1 where a=7 ) ) as dt;
+
+select * from
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ order by a desc) as dt;
+
+select *from
+( (select a from t1 limit 2)
+ union
+ select a from t1 where a=3
+ order by a desc) as dt;
+
+select * from
+( select a from t1 where a=4
+ union
+ (select a from t1 where a <=4 limit 2)
+ order by a desc ) as dt;
+
+select * from
+( ( select a from t1 where a=4
+ union
+ ( select a from t1 where a <=4 order by a ) )
+ order by a desc limit 2 ) as dt;
+
+select * from
+( ( select a from t1 where a <=3 except select a from t1 where a >=3 )
+ union
+ select a from t1 where a=7 order by a desc ) as dt;
+
+select * from
+( ( select a from t1 where a!=3 order by a desc )
+ union
+ select a from t1 where a=3
+ order by a desc ) as dt;
+
+select * from
+( (select a from t1 where a=1)
+ union
+ (select a from t1 where a=3)
+ order by a desc ) as dt;
+
+select * from
+( ( select a from t1 where a=1
+ union
+ select a from t1 where a=3 )
+ order by a desc ) as dt;
+
+select * from
+( ( ( select a from t1 where a=1 )
+ union
+ ( select a from t1 where a=3 ) )
+ order by a desc ) as dt;
+
+select * from
+( ( select a from t1 where a=1
+ union
+ select a from t1 where a=3 )
+ order by 1 desc ) as dt;
+
+select * from
+( ( (select a from t1 where a=1
+ union
+ select a from t1 where a=3) ) order by 1 desc ) as dt;
+
+select * from
+((((select a from t1 where a=1) union (select a from t1 where a=3)))
+ order by 1 desc ) as dt;
+
+select * from
+( ( (select a from t1 where a=1 )
+ union
+ (select a from t1 where a=3) )
+ order by 1 desc ) as dt;
+
+select * from
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=2
+ union
+ select a from t1 where a=4 ) as dt;
+
+select * from
+( ( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=2 )
+ union
+ select a from t1 where a=4 ) as dt;
+
+select * from
+( (select a from t1 where a=1 union select a from t1 where a=3)
+ union
+ (select a from t1 where a=2 union select a from t1 where a=4) ) as dt;
+
+select * from
+( (select a from t1 where a=1 union (select a from t1 where a=3))
+ union
+ ((select a from t1 where a=2) union select a from t1 where a=4) ) as dt;
+
+select * from
+( ( ( select a from t1 where a=1)
+ union
+ select a from t1 where a=3 )
+ union
+ select a from t1 where a=2
+ union
+ select a from t1 where a=4 ) as dt;
+
+select * from
+( ( ( ( select a from t1 where a=1)
+ union
+ select a from t1 where a=3 )
+ union
+ select a from t1 where a=2 )
+ union
+ select a from t1 where a=4 ) as dt;
+
+select * from
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=2
+ union
+ (select a from t1 where a=4) ) as dt;
+
+select * from
+( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ ( select a from t1 where a=2
+ union
+ ( select a from t1 where a=4 ) ) ) as dt;
+
+select * from
+( select a from t1 where a=1
+ union
+ ( select a from t1 where a=3
+ union
+ ( select a from t1 where a=2
+ union
+ ( select a from t1 where a=4 ) ) ) ) as dt;
+
+select * from
+( ( ( select a from t1 where a=1 union select a from t1 where a=3 )
+ order by a desc limit 2 )
+ union
+ ( ( select a from t1 where a=2 union select a from t1 where a=4 )
+ order by a desc limit 1 ) ) as dt;
+
+select * from
+( ( ( select a from t1 where a=1 union select a from t1 where a=3 )
+ order by a desc limit 2 )
+ union
+ ( ( select a from t1 where a=2 union select a from t1 where a=4 )
+ order by a desc limit 2 )
+ order by a) as dt;
+
+select * from
+( ( select a from t1 where a=1
+ union
+ select a from t1 where a=3
+ union
+ select a from t1 where a=2 order by a desc limit 2 )
+ union
+ select a from t1 where a=4
+ order by a limit 3 ) as dt;
+
+select * from
+( ( select a from t1 where a=1
+ union
+ select a from t1 where a=3 order by a desc limit 2)
+ union
+ select a from t1 where a=2 order by a desc limit 2 ) as dt;
+
+select * from
+( ( ( select a from t1 where a >= 2
+ union
+ select a from t1 where a=1 order by a desc limit 2 )
+ union
+ select a from t1 where a=3 order by a limit 2 )
+ union
+ select a from t1 where a=1 ) as dt;
+
+--echo # 9.3. derived table as [tailed] TVC
+
+select * from
+( values (3), (7), (1) ) as dt;
+
+select * from
+( (values (3), (7), (1)) ) as dt;
+
+select * from
+(((values (3), (7), (1)))) as dt;
+
+select * from
+( values (3), (7), (1) order by 1 limit 2 ) as dt;
+
+select * from
+( (values (3), (7), (1)) order by 1 limit 2 ) as dt;
+
+select * from
+( ((values (3), (7), (1))) order by 1 limit 2 ) as dt;
+
+select * from
+( (((values (3), (7), (1))) order by 1 limit 2) ) as dt;
+
+select * from
+( ( (values (3), (7), (1) limit 2) order by 1 desc) ) as dt;
+
+select * from
+( ((values (3), (7), (1)) order by 1 desc) limit 2 ) as dt;
+
+select * from
+( (((values (3), (7), (1)) order by 1 desc) limit 2) ) as dt;
+
+--echo # 9.3. derived table as union of TVCs
+
+select * from
+( values (3), (7), (1) union values (3), (4), (2) ) dt;
+
+select * from
+( values (3), (7), (1) union all values (3), (4), (2) ) as dt;
+
+select * from
+( values (3), (7), (1) union values (3), (4), (2) ) as dt;
+
+select * from
+( values (3), (7), (1) except values (3), (4), (2) ) as dt;
+
+select * from
+( (values (3), (7), (1)) union (values (3), (4), (2)) ) as dt;
+
+select * from
+( (values (3), (7), (1))
+ union
+ (values (3), (4), (2))
+ union values (5), (7) ) dt;
+
+select * from
+( (values (3), (7), (1))
+ union
+ (values (3), (4), (2))
+ union
+ (values (5), (7)) ) as dt;
+
+select * from
+( (values (3), (7), (1)
+ union
+ values (3), (4), (2))
+ union
+ values (5), (7) ) as dt;
+
+select * from
+( values (3), (7), (1)
+ union (values (3), (4), (2)
+ union
+ values (5), (7)) ) as dt;
+
+select * from
+( (values (3), (7), (1)
+ union
+ ((values (3), (4), (2)
+ union values (5), (7)))) ) dt;
+
+select * from
+( values (3), (7), (1)
+ union
+ values (3), (4), (2)
+ order by 1 ) as dt;
+
+select * from
+( (values (3), (7), (1) union values (3), (4), (2)) order by 1 ) as dt;
+
+select * from
+( (values (3), (7), (1) union values (3), (4), (2)) order by 1 ) as dt;
+
+select * from
+( values (3), (7), (1) union (values (3), (4), (2)) order by 1 ) as dt;
+
+select * from
+( (values (3), (7), (1) union values (3), (4), (2)) order by 1 ) as dt;
+
+select * from
+( ((values (3), (7), (1)) union values (3), (4), (2)) order by 1 ) as dt;
+
+select * from
+( (values (3), (7), (1) order by 1 limit 2)
+ union
+ (values (3), (4), (2) order by 1 desc limit 2) ) as dt;
+
+select * from
+( ((values (3), (7), (1) order by 1) limit 2)
+ union
+ ((values (3), (4), (2) order by 1 desc) limit 2) ) as dt;
+
+select * from
+( (((values (3), (7), (1)) order by 1) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2) ) as dt;
+
+select * from
+( (values (3), (7), (1) order by 1 limit 2)
+ union
+ values (3), (4), (2)
+ order by 1 limit 3 ) as dt;
+
+select * from
+( ((values (3), (7), (1)) order by 1 limit 2)
+ union
+ ((values (3), (4), (2) order by 1 desc) limit 2)
+ order by 1 limit 3 ) as dt;
+
+select * from
+( (select a from t1 where a <=3 order by 1 limit 2)
+ union
+ (values (3), (4), (2) order by 1 desc limit 2) ) dt;
+
+select * from
+( ((select a from t1 where a <=3) order by 1 limit 2)
+ union
+ (values (3), (4), (2) order by 1 desc limit 2) ) as dt;
+
+select * from
+( (((select a from t1 where a <=3) order by a) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2) ) as dt;
+
+select * from
+ ( ( (((select a from t1 where a <=3) order by a) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2) ) ) dt;
+
+select * from
+( (select a from t1 where a <=3 order by 1 limit 2)
+ union
+ (values (3), (4), (2) order by 1 desc limit 2)
+ order by a ) as dt;
+
+select * from
+( ((select a from t1 where a <=3) order by 1 limit 2)
+ union
+ (values (3), (4), (2) order by 1 desc limit 2)
+ order by a ) as dt;
+
+select * from
+( (((select a from t1 where a <=3) order by a) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2)
+ order by a ) as dt;
+
+select * from
+( (((values (3), (4), (2)) order by 1 desc) limit 2) ) as dt;
+
+select * from
+( ( (((select a from t1 where a <=3) order by a) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2) )
+ order by a ) as dt;
+
+select * from
+( (values (3), (4), (2) order by 1 desc limit 2)
+ union
+ (select a from t1 where a <=3 order by 1 limit 2) ) as dt;
+
+select * from
+( (values (3), (4), (2) order by 1 desc limit 2)
+ union
+ ((select a from t1 where a <=3) order by 1 limit 2) ) as dt;
+
+select * from
+( (((values (3), (4), (2)) order by 1 desc) limit 2)
+ union
+ (((select a from t1 where a <=3) order by 1) limit 2) ) as dt;
+
+select * from
+( (((values (3), (4), (2)) order by 1 desc) limit 2)
+ union
+ (((select a from t1 where a <=3) order by a) limit 2)
+ order by 1 ) as dt;
+
+select * from
+( ( select a from t1 where a=1
+ union
+ values (3), (4), (2) order by 1 desc )
+ union
+ select a from t1 where a=2 order by a desc limit 3 ) as dt;
+
+
+--echo # 9.4. derived table as [tailed] simple select with CTE
+
+
+select * from
+( with t as (select * from t1 where a <=3)
+ select * from t ) as dt;
+
+select * from
+( with t as (select * from t1 where a <=3)
+ (select * from t) ) as dt;
+
+select * from
+( with t as (select * from t1 where a <=3)
+ ((select * from t)) ) as dt;
+
+select * from
+( with t as ((select * from t1 where a <=3))
+ select * from t ) as dt;
+
+select * from
+( with t as (((select * from t1 where a <=3)))
+ select * from t ) as dt;
+
+select * from
+( with t as (select * from t1 where a <=3)
+ select * from t order by a ) as dt;
+
+select * from
+( with t as (select * from t1 where a <=3)
+ (select * from t) order by a ) as dt;
+
+select * from
+( with t as (select * from t1 where a <=3)
+ (select * from t) order by a desc limit 2 ) as dt;
+
+select * from
+( with t as (select * from t1 where a >=2 order by a limit 2)
+ select * from t ) as dt;
+
+select * from
+( with t as (((select * from t1 where a >=2) order by a desc) limit 2)
+ select * from t ) as dt;
+
+select * from
+( with t as (select * from t1 where a >=2 order by a desc limit 2)
+ select * from t order by a ) as dt;
+
+--echo # 9.5. derived table as tailed union with CTE
+
+select * from
+( with t as (select * from t1 where a <=3)
+ select a from t1 where a=1 union select a from t where a=3 ) as dt;
+
+select * from
+( with t as (select * from t1 where a <=3)
+ (select a from t) union (select b from t2) ) as dt;
+
+select * from
+( with t as (select * from t1 where a <=3)
+ (select a from t) union (select b as a from t2) order by a desc ) as dt;
+
+select * from
+( with t as (select * from t1 where a < 3 union select * from t1 where a > 3)
+ select a from t1 where a=1 union select a from t where a=7 ) as dt;
+
+select * from
+( with t as
+ ( select * from t1 where a < 3
+ union
+ select * from t1 where a > 3
+ order by a desc limit 3 )
+ select a from t1 where a=4 union select a from t where a=7 ) as dt;
+
+select * from
+( with t as
+ ( select * from t1 where a < 3
+ union
+ select * from t1 where a > 3
+ order by a desc limit 3 )
+ select a from t1 where a=4
+ union
+ select a from t where a=7
+ order by a desc ) as dt;
+
+select * from
+( with t as
+ ( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+ select a from t1 where a=4
+ union select a from t where a=7
+ order by a desc ) dt;
+
+select * from
+( with t as
+ ( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+ (select a from t1 where a=4
+ union
+ select a from t where a=7
+ order by a desc) ) as dt;
+
+select * from
+( with t as
+ ( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+ ((select a from t1 where a=4
+ union
+ select a from t where a=7) order by a desc) ) as dt;
+
+select * from
+( with t as
+ ( select * from t1 where a < 3
+ union
+ values (4), (7)
+ order by a desc limit 3 )
+ select a from t1 where a=4
+ union
+ select a from t where a=7
+ order by a desc ) dt;
+
+select * from
+( with t(a) as
+ ( values (2), (1)
+ union
+ (values (4), (7))
+ order by 1 desc limit 3 )
+ select a from t1 where a=4
+ union select a from t where a=7
+ order by a desc ) as dt;
+
+select * from
+( with t(a) as
+ ( (values (2), (1))
+ union
+ (values (4), (7) order by 1 desc)
+ order by 1 desc limit 3 )
+ select a from t1 where a=1
+ union
+ select a from t where a=7 order by a desc ) as dt;
+
+select * from
+( with t(a) as
+ ( (values (2), (1))
+ union
+ (values (4), (7) order by 1 desc)
+ order by 1 limit 3 )
+ select a from t where a=1 union values (7) order by a desc ) as dt;
+
+select * from
+( with t(a) as
+ ( (values (2), (1))
+ union
+ (values (4), (7) order by 1 desc ) )
+ select a from t where a=1 union select 7 order by a desc ) as dt;
+
+select * from
+( with t as (select * from t1 where a < 3),
+ s as (select * from t1 where a > 3)
+ select a from t where a=1
+ union select a from s where a=7
+ order by a desc ) dt;
+
+select * from
+( with t as (select * from t1 where a < 3),
+ s as (select * from t1 where a > 3)
+ (select a from t where a=1
+ union
+ select a from s where a=7 order by a desc) ) dt;
+
+select * from
+( with t as (select * from t1 where a < 3),
+ s as (select * from t1 where a > 3)
+ (select a from t where a=1
+ union
+ select a from s where a=7)
+ order by a desc ) dt;
+
+
+--echo 10. view
+
+--echo 10.1. view as simple select
+
+create view v1 as
+select * from t1;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+select 2*a as c from t1;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1(c) as
+select 2*a from t1;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+((select * from t1));
+show create view v1;
+select * from v1;
+drop view v1;
+
+--echo 10.2. view as tailed simple select
+
+create view v1 as
+select * from t1 order by a;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+(select * from t2 order by a limit 2) order by b desc;
+show create view v1;
+select * from v1;
+drop view v1;
+
+--echo 10.3. view as union
+
+create view v1 as
+select a from t1 union select b from t2;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+(select a from t1) union (select b from t2);
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+(select a from t1 where a=1) union select a from t1 where a=3;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+((select a from t1 where a<=3) union (select a from t1 where a=3));
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+select a from t1 where a=1
+union
+select a from t1 where a=3
+union
+select a from t1 where a=7;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+( ( select a from t1 where a!=3 order by a desc limit 3)
+ union
+ select a from t1 where a=3 );
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+( select a from t1 where a <=3 except select a from t1 where a >=3 )
+ union
+ select a from t1 where a=7;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+(select a from t1 limit 2) union select a from t1 where a=3 order by a desc;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+select a from t1 where a=1
+union
+( select a from t1 where a=3
+ union
+ ( select a from t1 where a=2
+ union
+ ( select a from t1 where a=4 ) ) );
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+( ( select a from t1 where a >= 2
+ union
+ select a from t1 where a=1 order by a desc limit 2 )
+ union
+ select a from t1 where a=3 order by a limit 2 )
+union
+select a from t1 where a=1;
+show create view v1;
+select * from v1;
+drop view v1;
+
+--echo 10.4. view as [tailed] TVC
+
+create view v1 as
+values (3), (7), (1);
+show create view v1;
+select * from v1;
+drop view v1;
+create view v1 as
+(((values (3), (7), (1))) order by 1);
+show create view v1;
+select * from v1;
+drop view v1;
+
+--echo 10.5. view as [tailed] union of TVCs
+
+create view v1 as
+values (3), (7), (1) union values (3), (4), (2);
+show create view v1;
+select * from v1;
+drop view v1;
+create view v1 as
+(values (3), (7), (1) union values (3), (4), (2)) order by 1;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+(values (3), (7), (1) order by 1 limit 2)
+union
+(values (3), (4), (2) order by 1 desc limit 2);
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+(values (3), (7), (1) order by 1 limit 2)
+union
+values (3), (4), (2)
+order by 1;
+show create view v1;
+select * from v1;
+drop view v1;
+
+--echo 10.6. view as [tailed] union of [tailed] select and tailed TVC
+
+create view v1 as
+( (((select a from t1 where a <=3) order by a) limit 2)
+ union
+ (((values (3), (4), (2)) order by 1 desc) limit 2) )
+order by a;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+( select a from t1 where a=1
+ union
+ values (3), (4), (2) order by 1 desc )
+union
+select a from t1 where a=2 order by a desc limit 3;
+show create view v1;
+select * from v1;
+drop view v1;
+
+--echo 10.7. view as select with CTE
+
+create view v1 as
+with t as (select * from t1 where a <=3)
+select * from t;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+with t as
+( select * from t1 where a < 3
+ union
+ select * from t1 where a > 3
+ order by a desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7;
+show create view v1;
+select * from v1;
+drop view v1;
+
+--echo 10.8. view as union with CTE
+
+create view v1 as
+with t as
+( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+(select a from t1 where a=4 union select a from t where a=7 order by a desc);
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+with t as
+( (select * from t1 where a < 3)
+ union
+ (select * from t1 where a > 3)
+ order by a desc limit 3 )
+(select a from t where a=4 union select a from t where a=7 order by a desc);
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+with t(a) as (values (2), (1)) select a from t;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+with t(a) as
+( values (2), (1)
+ union
+ (values (4), (7))
+ order by 1 desc limit 3 )
+select a from t1 where a=4 union select a from t where a=7 order by a desc;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+with t(a) as
+( (values (2), (1))
+ union
+ (values (4), (7) order by 1 desc)
+ order by 1 desc limit 3 )
+select a from t1 where a=1 union select a from t where a=7 order by a desc;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+with t as (select * from t1 where a < 3),
+ s as (select * from t1 where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+show create view v1;
+select * from v1;
+drop view v1;
+
+create view v1 as
+with t as (select * from t1 where a < 3),
+ s as (select * from t where a > 3)
+select a from t where a=1 union select a from s where a=7 order by a desc;
+show create view v1;
+select * from v1;
+drop view v1;
+
+drop table t1,t2;
+
+--echo # End of 10.4 tests
+
diff --git a/mysql-test/main/bug12427262.result b/mysql-test/main/bug12427262.result
index 8ec14efc45e..6e79ec3aa11 100644
--- a/mysql-test/main/bug12427262.result
+++ b/mysql-test/main/bug12427262.result
@@ -16,6 +16,8 @@ create table t10 (c1 int);
select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME
like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM'
into @count_read_before;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
show tables;
Tables_in_show_table_lw_db
t1
@@ -31,6 +33,8 @@ t9
select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME
like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM'
into @count_read_after;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select @count_read_after-@count_read_before;
@count_read_after-@count_read_before
0.00000000000000000000000000000000000000
@@ -49,6 +53,8 @@ t9 BASE TABLE
select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME
like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM'
into @count_read_after;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select @count_read_after-@count_read_before;
@count_read_after-@count_read_before
10.00000000000000000000000000000000000000
diff --git a/mysql-test/main/cast.result b/mysql-test/main/cast.result
index 9758ad64d4a..b17d89788cf 100644
--- a/mysql-test/main/cast.result
+++ b/mysql-test/main/cast.result
@@ -9,7 +9,6 @@ CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER)
-1
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select CAST('10 ' as unsigned integer);
CAST('10 ' as unsigned integer)
10
@@ -30,8 +29,6 @@ Note 1105 Cast to unsigned converted negative integer to it's positive complemen
select ~5, cast(~5 as signed);
~5 cast(~5 as signed)
18446744073709551610 -6
-Warnings:
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
explain extended select ~5, cast(~5 as signed);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -40,8 +37,6 @@ Note 1003 select ~5 AS `~5`,cast(~5 as signed) AS `cast(~5 as signed)`
select cast(18446744073709551615 as signed);
cast(18446744073709551615 as signed)
-1
-Warnings:
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select cast(5 as unsigned) -6.0;
cast(5 as unsigned) -6.0
-1.0
@@ -217,16 +212,12 @@ CAST(0xb3 as signed)
select CAST(0x8fffffffffffffff as signed);
CAST(0x8fffffffffffffff as signed)
-8070450532247928833
-Warnings:
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select CAST(0xffffffffffffffff as unsigned);
CAST(0xffffffffffffffff as unsigned)
18446744073709551615
select CAST(0xfffffffffffffffe as signed);
CAST(0xfffffffffffffffe as signed)
-2
-Warnings:
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select cast('-10a' as signed integer);
cast('-10a' as signed integer)
-10
@@ -322,7 +313,7 @@ select cast('' as time);
cast('' as time)
NULL
Warnings:
-Warning 1292 Truncated incorrect time value: ''
+Warning 1292 Incorrect time value: ''
select cast(NULL as DATE);
cast(NULL as DATE)
NULL
@@ -563,8 +554,6 @@ cast(18446744073709551615 as unsigned)
select cast(18446744073709551615 as signed);
cast(18446744073709551615 as signed)
-1
-Warnings:
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select cast('18446744073709551615' as unsigned);
cast('18446744073709551615' as unsigned)
18446744073709551615
@@ -595,6 +584,8 @@ Note 1105 Cast to signed converted positive out-of-range integer to it's negativ
select cast(1.0e+300 as signed int);
cast(1.0e+300 as signed int)
9223372036854775807
+Warnings:
+Note 1916 Got overflow when converting '1e300' to SIGNED BIGINT. Value truncated
create table t1 select cast(1 as unsigned), cast(1 as signed), cast(1 as double(5,2)), cast(1 as decimal(5,3)), cast("A" as binary), cast("A" as char(100)), cast("2001-1-1" as DATE), cast("2001-1-1" as DATETIME), cast("1:2:3" as TIME);
show create table t1;
Table Create Table
@@ -618,8 +609,8 @@ double_val cast_val
-1e30 -9223372036854775808
1e30 9223372036854775807
Warnings:
-Warning 1916 Got overflow when converting '-1e30' to INT. Value truncated
-Warning 1916 Got overflow when converting '1e30' to INT. Value truncated
+Note 1916 Got overflow when converting '-1e30' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1e30' to SIGNED BIGINT. Value truncated
DROP TABLE t1;
select isnull(date(NULL)), isnull(cast(NULL as DATE));
isnull(date(NULL)) isnull(cast(NULL as DATE))
@@ -1295,5 +1286,95 @@ SET sql_mode=DEFAULT;
SELECT CAST(11068046444225730969 AS SIGNED);
CAST(11068046444225730969 AS SIGNED)
-7378697629483820647
+#
+# MDEV-8919 Wrong result for CAST(9999999999999999999.0)
+#
+SET sql_mode='';
+SELECT CAST(9999999999999999999e0 AS UNSIGNED);
+CAST(9999999999999999999e0 AS UNSIGNED)
+10000000000000000000
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (9999999999999999999e0);
+SELECT * FROM t1;
+a
+10000000000000000000
+DROP TABLE t1;
+SELECT CAST(9999999999999999999.0 AS UNSIGNED);
+CAST(9999999999999999999.0 AS UNSIGNED)
+9999999999999999999
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (9999999999999999999.0);
+SELECT * FROM t1;
+a
+9999999999999999999
+DROP TABLE t1;
+SELECT CAST(-1.0 AS UNSIGNED);
+CAST(-1.0 AS UNSIGNED)
+0
Warnings:
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
+Warning 1916 Got overflow when converting '-1.0' to UNSIGNED INT. Value truncated
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (-1.0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SELECT CAST(-1e0 AS UNSIGNED);
+CAST(-1e0 AS UNSIGNED)
+0
+Warnings:
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (-1e0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SELECT CAST(-1e308 AS UNSIGNED);
+CAST(-1e308 AS UNSIGNED)
+0
+Warnings:
+Note 1916 Got overflow when converting '-1e308' to UNSIGNED BIGINT. Value truncated
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (-1e308);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SELECT CAST(TIME'-00:00:01.123' AS UNSIGNED);
+CAST(TIME'-00:00:01.123' AS UNSIGNED)
+0
+Warnings:
+Note 1916 Got overflow when converting '-00:00:01.123000' to UNSIGNED BIGINT. Value truncated
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (TIME'-00:00:01.123');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE UNSIGNED);
+INSERT INTO t1 VALUES (1.9e19);
+SELECT CAST(a AS SIGNED), CAST(MIN(a) AS SIGNED) FROM t1;
+CAST(a AS SIGNED) CAST(MIN(a) AS SIGNED)
+9223372036854775807 9223372036854775807
+Warnings:
+Note 1916 Got overflow when converting '1.9e19' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.9e19' to SIGNED BIGINT. Value truncated
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(30,1) UNSIGNED);
+INSERT INTO t1 VALUES (1e19);
+SELECT a, CAST(a AS SIGNED) FROM t1;
+a CAST(a AS SIGNED)
+10000000000000000000.0 9223372036854775807
+Warnings:
+Warning 1916 Got overflow when converting '10000000000000000000.0' to INT. Value truncated
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
diff --git a/mysql-test/main/cast.test b/mysql-test/main/cast.test
index 165980aebed..a4b87127187 100644
--- a/mysql-test/main/cast.test
+++ b/mysql-test/main/cast.test
@@ -731,3 +731,57 @@ SET sql_mode=DEFAULT;
--echo #
SELECT CAST(11068046444225730969 AS SIGNED);
+
+--echo #
+--echo # MDEV-8919 Wrong result for CAST(9999999999999999999.0)
+--echo #
+
+SET sql_mode='';
+
+SELECT CAST(9999999999999999999e0 AS UNSIGNED);
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (9999999999999999999e0);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SELECT CAST(9999999999999999999.0 AS UNSIGNED);
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (9999999999999999999.0);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SELECT CAST(-1.0 AS UNSIGNED);
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (-1.0);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SELECT CAST(-1e0 AS UNSIGNED);
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (-1e0);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SELECT CAST(-1e308 AS UNSIGNED);
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (-1e308);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SELECT CAST(TIME'-00:00:01.123' AS UNSIGNED);
+CREATE TABLE t1 (a BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (TIME'-00:00:01.123');
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE UNSIGNED);
+INSERT INTO t1 VALUES (1.9e19);
+SELECT CAST(a AS SIGNED), CAST(MIN(a) AS SIGNED) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(30,1) UNSIGNED);
+INSERT INTO t1 VALUES (1e19);
+SELECT a, CAST(a AS SIGNED) FROM t1;
+DROP TABLE t1;
+
+SET sql_mode=DEFAULT;
diff --git a/mysql-test/main/check_constraint.result b/mysql-test/main/check_constraint.result
index 522a5d39df9..a6480bb6133 100644
--- a/mysql-test/main/check_constraint.result
+++ b/mysql-test/main/check_constraint.result
@@ -240,13 +240,13 @@ drop table t1;
#
create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ;
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
-Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select * from t1;
v1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
-Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select v1 from t1;
v1
select * from t1;
@@ -260,8 +260,8 @@ flush tables;
select * from t1;
v1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
-Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select * from t1;
v1
deallocate prepare stmt;
@@ -295,3 +295,18 @@ drop table t1;
#
# End of 10.3 tests
#
+#
+# MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
+#
+create table t1 (id varchar(2), constraint id check (id regexp '[a-z]'));
+alter table t1 force;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` varchar(2) DEFAULT NULL,
+ CONSTRAINT `id` CHECK (`id` regexp '[a-z]')
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/check_constraint.test b/mysql-test/main/check_constraint.test
index 20d359f469b..194fdc04399 100644
--- a/mysql-test/main/check_constraint.test
+++ b/mysql-test/main/check_constraint.test
@@ -219,3 +219,15 @@ drop table t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
+--echo #
+create table t1 (id varchar(2), constraint id check (id regexp '[a-z]'));
+alter table t1 force;
+show create table t1;
+drop table t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/column_compression.result b/mysql-test/main/column_compression.result
index e19a4fb75e0..bd843736ccc 100644
--- a/mysql-test/main/column_compression.result
+++ b/mysql-test/main/column_compression.result
@@ -1507,7 +1507,7 @@ d TINYTEXT COMPRESSED BINARY
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+ `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`a`)),
`b` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`c` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`d` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
diff --git a/mysql-test/main/column_compression_parts.result b/mysql-test/main/column_compression_parts.result
index e0b54aec20c..bc3028826ee 100644
--- a/mysql-test/main/column_compression_parts.result
+++ b/mysql-test/main/column_compression_parts.result
@@ -12,6 +12,7 @@ INSERT INTO t1 VALUES (1,REPEAT('a',100)),(2,REPEAT('v',200)),(3,REPEAT('r',300)
INSERT INTO t1 VALUES (5,REPEAT('k',500)),(6,'April'),(7,7),(8,""),(9,"M"),(10,DEFAULT);
ALTER TABLE t1 ANALYZE PARTITION p1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p2;
Table Op Msg_type Msg_text
diff --git a/mysql-test/main/column_compression_parts.test b/mysql-test/main/column_compression_parts.test
index 9a6f63d0cde..4c77a7308f7 100644
--- a/mysql-test/main/column_compression_parts.test
+++ b/mysql-test/main/column_compression_parts.test
@@ -179,4 +179,4 @@ ALTER TABLE t1 REORGANIZE PARTITION p2 INTO (PARTITION p22 VALUES LESS THAN (MAX
SHOW CREATE TABLE t1;
ALTER TABLE t1 REBUILD PARTITION p22;
-DROP TABLE t1; \ No newline at end of file
+DROP TABLE t1;
diff --git a/mysql-test/main/connect-abstract.cnf b/mysql-test/main/connect-abstract.cnf
new file mode 100644
index 00000000000..ed7dbd838f0
--- /dev/null
+++ b/mysql-test/main/connect-abstract.cnf
@@ -0,0 +1,6 @@
+
+!include include/default_my.cnf
+
+# Using @OPT.port here for uniqueness
+[ENV]
+ABSTRACT_SOCKET= @mtr-test-abstract-socket-@OPT.port
diff --git a/mysql-test/main/connect-abstract.result b/mysql-test/main/connect-abstract.result
new file mode 100644
index 00000000000..8f7c125196a
--- /dev/null
+++ b/mysql-test/main/connect-abstract.result
@@ -0,0 +1,3 @@
+select 1;
+1
+1
diff --git a/mysql-test/main/connect-abstract.test b/mysql-test/main/connect-abstract.test
new file mode 100644
index 00000000000..09bc607e0e8
--- /dev/null
+++ b/mysql-test/main/connect-abstract.test
@@ -0,0 +1,9 @@
+--source include/linux.inc
+--source include/not_embedded.inc
+
+let $restart_parameters=--socket=$ABSTRACT_SOCKET
+--source include/kill_mysqld.inc
+--source include/start_mysqld.inc
+
+connect(con1,localhost,root,,test,,$ABSTRACT_SOCKET);
+select 1;
diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result
index 82007994eed..229c2d9dafe 100644
--- a/mysql-test/main/connect.result
+++ b/mysql-test/main/connect.result
@@ -1,5 +1,4 @@
SET global secure_auth=0;
-drop table if exists t1,t2;
connect con1,localhost,root,,mysql;
show tables;
Tables_in_mysql
@@ -9,12 +8,12 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
-host
index_stats
innodb_index_stats
innodb_table_stats
@@ -57,12 +56,12 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
-host
index_stats
innodb_index_stats
innodb_table_stats
@@ -100,11 +99,8 @@ ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
connect fail_con,localhost,test,zorro,;
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
-select user,host,password,plugin,authentication_string from mysql.user where user='test';
-user host password plugin authentication_string
-test localhost *5FDFF3268A50F41C5D18D2CA2F754D7BDB9B3E59
-test 127.0.0.1 *5FDFF3268A50F41C5D18D2CA2F754D7BDB9B3E59
-update mysql.user set password=old_password("gambling2") where user=_binary"test";
+# switching from mysql.global_priv to mysql.user
+update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
flush privileges;
show grants for test@localhost;
Grants for test@localhost
@@ -116,7 +112,6 @@ Grants for test@localhost
GRANT ALL PRIVILEGES ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573'
connect con10,localhost,test,gambling2,;
connect con5,localhost,test,gambling2,mysql;
-connection con5;
set password="";
set password='gambling3';
ERROR HY000: Password hash should be a 41-digit hexadecimal number
@@ -129,12 +124,12 @@ db
event
func
general_log
+global_priv_bak
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
-host
index_stats
innodb_index_stats
innodb_table_stats
@@ -154,6 +149,7 @@ time_zone_transition
time_zone_transition_type
transaction_registry
user
+user_bak
connect con6,localhost,test,gambling3,test;
show tables;
Tables_in_test
@@ -173,10 +169,9 @@ ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
connect fail_con,localhost,test,zorro,;
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
+# switching back from mysql.user to mysql.global_priv
delete from mysql.user where user=_binary"test";
-flush privileges;
connect con7,localhost,root,,test;
-connection con7;
create table t1 (id integer not null auto_increment primary key);
create temporary table t2(id integer not null auto_increment primary key);
set @id := 1;
@@ -317,12 +312,10 @@ SET GLOBAL event_scheduler = OFF;
# -- End of Bug#35074.
connect extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,;
-connection extracon;
SELECT 'Connection on extra port ok';
Connection on extra port ok
Connection on extra port ok
connect extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,;
-connection extracon2;
SELECT 'Connection on extra port 2 ok';
Connection on extra port 2 ok
Connection on extra port 2 ok
@@ -353,7 +346,6 @@ connect(localhost,mysqltest_up1,foo,test,MASTER_PORT,MASTER_SOCKET);
connect pcon1,localhost,mysqltest_up1,foo,,$MASTER_MYPORT,;
ERROR 28000: Access denied for user 'mysqltest_up1'@'localhost' (using password: YES)
connect pcon2,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,;
-connection pcon2;
select user(), current_user();
user() current_user()
mysqltest_up1@localhost mysqltest_up1@%
@@ -362,7 +354,6 @@ connect(localhost,mysqltest_up2,newpw,test,MASTER_PORT,MASTER_SOCKET);
connect pcon3,localhost,mysqltest_up2,newpw,,$MASTER_MYPORT,;
ERROR 28000: Access denied for user 'mysqltest_up2'@'localhost' (using password: YES)
connect pcon4,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,;
-connection pcon4;
select user(), current_user();
user() current_user()
mysqltest_up2@localhost mysqltest_up2@%
@@ -374,31 +365,31 @@ connect(localhost,mysqltest_nouser,,test,MASTER_PORT,MASTER_SOCKET);
connect pcon5,localhost,mysqltest_nouser,,,$MASTER_MYPORT,;
ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: NO)
connection default;
+# switching from mysql.global_priv to mysql.user
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
select user, password, plugin, authentication_string from mysql.user
where user like 'mysqltest_up_';
user password plugin authentication_string
-mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password
-mysqltest_up2 09301740536db389 mysql_old_password
+mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
+mysqltest_up2 09301740536db389 mysql_old_password 09301740536db389
flush privileges;
connect pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,;
-connection pcon6;
select user(), current_user();
user() current_user()
mysqltest_up1@localhost mysqltest_up1@%
disconnect pcon6;
connect pcon7,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,;
-connection pcon7;
select user(), current_user();
user() current_user()
mysqltest_up2@localhost mysqltest_up2@%
disconnect pcon7;
connection default;
+# switching back from mysql.user to mysql.global_priv
DROP USER mysqltest_up1@'%';
DROP USER mysqltest_up2@'%';
#
-# BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
+# BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
#
create table t1 (via int);
alter table t1 add key(via);
@@ -406,7 +397,6 @@ drop table t1;
create table t1 (col1 int);
alter table t1 add via int not null;
drop table t1;
-drop procedure if exists p1;
create procedure p1(x int)
foo: loop
if x = 0 then
@@ -422,3 +412,35 @@ test
test
drop procedure p1;
SET global secure_auth=default;
+#
+# MDEV-19282: Log more specific warning with log_warnings=2 if
+# connection is aborted prior to authentication
+# MDEV-19277: Add status variable that gets incremented if
+# connection is aborted prior to authentication
+#
+flush status;
+SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
+Variable_name Value
+Aborted_connects 0
+Aborted_connects_preauth 0
+SET GLOBAL log_warnings=2;
+NOT FOUND /This connection closed normally without authentication/ in mysqld.1.err
+# let tcp to detect disconnect
+select sleep(1);
+sleep(1)
+0
+SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
+Variable_name Value
+Aborted_connects 1
+Aborted_connects_preauth 1
+FOUND 1 /This connection closed normally without authentication/ in mysqld.1.err
+SET @save_connect_timeout= @@connect_timeout;
+SET GLOBAL connect_timeout=2;
+SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
+Variable_name Value
+Aborted_connects 2
+Aborted_connects_preauth 2
+FOUND 2 /This connection closed normally without authentication/ in mysqld.1.err
+SET GLOBAL log_warnings=default;
+SET GLOBAL connect_timeout= @save_connect_timeout;
+# End of 10.4 tests
diff --git a/mysql-test/main/connect.test b/mysql-test/main/connect.test
index e7d7128b233..b115e0620ec 100644
--- a/mysql-test/main/connect.test
+++ b/mysql-test/main/connect.test
@@ -14,10 +14,6 @@
SET global secure_auth=0;
---disable_warnings
-drop table if exists t1,t2;
---enable_warnings
-
#connect (con1,localhost,root,,"");
#show tables;
connect (con1,localhost,root,,mysql);
@@ -66,8 +62,8 @@ connect (fail_con,localhost,test,zorro,test2);
connect (fail_con,localhost,test,zorro,);
# check if old password version also works
-select user,host,password,plugin,authentication_string from mysql.user where user='test';
-update mysql.user set password=old_password("gambling2") where user=_binary"test";
+source include/switch_to_mysql_user.inc;
+update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
flush privileges;
show grants for test@localhost;
update mysql.user set plugin='mysql_old_password' where user='test';
@@ -76,7 +72,6 @@ show grants for test@localhost;
connect (con10,localhost,test,gambling2,);
connect (con5,localhost,test,gambling2,mysql);
-connection con5;
set password="";
--error ER_PASSWD_LENGTH
set password='gambling3';
@@ -103,17 +98,15 @@ connect (fail_con,localhost,test,zorro,test2);
--error ER_ACCESS_DENIED_ERROR
connect (fail_con,localhost,test,zorro,);
-
+source include/switch_to_mysql_global_priv.inc;
# remove user 'test' so that other tests which may use 'test'
# do not depend on this test.
delete from mysql.user where user=_binary"test";
-flush privileges;
#
# Bug#12517 Clear user variables and replication events before
# closing temp tables in thread cleanup.
connect (con7,localhost,root,,test);
-connection con7;
let $connection_id= `select connection_id()`;
create table t1 (id integer not null auto_increment primary key);
create temporary table t2(id integer not null auto_increment primary key);
@@ -317,11 +310,9 @@ SET GLOBAL event_scheduler = OFF;
# Test connections to the extra port.
connect(extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,);
-connection extracon;
SELECT 'Connection on extra port ok';
connect(extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,);
-connection extracon2;
SELECT 'Connection on extra port 2 ok';
--disable_abort_on_error
@@ -352,7 +343,6 @@ GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345
FLUSH PRIVILEGES;
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
connect (con1,localhost,O1234567890123456789012345678901234567890123456789012345678901234567890123456789x,test123,test);
disconnect con1;
@@ -383,18 +373,14 @@ CREATE USER mysqltest_up2 IDENTIFIED VIA mysql_old_password using '09301740536db
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR
connect(pcon1,localhost,mysqltest_up1,foo,,$MASTER_MYPORT,);
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
connect(pcon2,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,);
-connection pcon2;
select user(), current_user();
disconnect pcon2;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR
connect(pcon3,localhost,mysqltest_up2,newpw,,$MASTER_MYPORT,);
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
connect(pcon4,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,);
-connection pcon4;
select user(), current_user();
disconnect pcon4;
@@ -418,34 +404,32 @@ connection default;
#
# cannot connect when password is set and plugin=mysql_native_password
#
+source include/switch_to_mysql_user.inc;
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
select user, password, plugin, authentication_string from mysql.user
where user like 'mysqltest_up_';
-flush privileges;
+flush privileges;
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
connect(pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,);
-connection pcon6;
select user(), current_user();
disconnect pcon6;
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
connect(pcon7,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,);
-connection pcon7;
select user(), current_user();
disconnect pcon7;
connection default;
+source include/switch_to_mysql_global_priv.inc;
+
DROP USER mysqltest_up1@'%';
DROP USER mysqltest_up2@'%';
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
-
--echo #
---echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
+--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
--echo #
create table t1 (via int);
alter table t1 add key(via);
@@ -455,10 +439,6 @@ create table t1 (col1 int);
alter table t1 add via int not null;
drop table t1;
---disable_warnings
-drop procedure if exists p1;
---enable_warnings
-
delimiter |;
create procedure p1(x int)
foo: loop
@@ -473,6 +453,58 @@ delimiter ;|
call p1(2);
drop procedure p1;
+SET global secure_auth=default;
+
+--echo #
+--echo # MDEV-19282: Log more specific warning with log_warnings=2 if
+--echo # connection is aborted prior to authentication
+--echo # MDEV-19277: Add status variable that gets incremented if
+--echo # connection is aborted prior to authentication
+--echo #
+flush status;
+SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
-SET global secure_auth=default;
+SET GLOBAL log_warnings=2;
+--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN= This connection closed normally without authentication
+--source include/search_pattern_in_file.inc
+
+--perl
+use Socket;
+socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname("tcp"))
+ or die "Can't create a tcp socket!\n";
+connect(SOCK, pack_sockaddr_in($ENV{MASTER_MYPORT}, inet_aton("localhost")))
+ or die "Can't connect to port $ENV{MASTER_MYPORT}!\n";
+exit(0);
+EOF
+--echo # let tcp to detect disconnect
+select sleep(1);
+
+SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
+
+--let SEARCH_PATTERN= This connection closed normally without authentication
+--source include/search_pattern_in_file.inc
+
+SET @save_connect_timeout= @@connect_timeout;
+SET GLOBAL connect_timeout=2;
+
+--perl
+use Socket;
+socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname("tcp"))
+ or die "Can't create a tcp socket!\n";
+connect(SOCK, pack_sockaddr_in($ENV{MASTER_MYPORT}, inet_aton("localhost")))
+ or die "Can't connect to port $ENV{MASTER_MYPORT}!\n";
+sleep 3;
+exit(0);
+EOF
+
+SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
+
+--let SEARCH_PATTERN= This connection closed normally without authentication
+--source include/search_pattern_in_file.inc
+
+SET GLOBAL log_warnings=default;
+SET GLOBAL connect_timeout= @save_connect_timeout;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/create-big.result b/mysql-test/main/create-big.result
index d041419443e..fc29b08ffb8 100644
--- a/mysql-test/main/create-big.result
+++ b/mysql-test/main/create-big.result
@@ -237,11 +237,11 @@ select @a;
@a
0
drop table t1;
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
-create table if not exists t1 select 1 as i;;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+create table if not exists t1 select 1 as i;
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
-drop table t1;;
+drop table t1;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
@@ -249,11 +249,11 @@ connection addconroot1;
connection default;
create table t1 (i int);
set @a:=0;
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
-create table if not exists t1 select 1 as i;;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+create table if not exists t1 select 1 as i;
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
-create trigger t1_bi before insert on t1 for each row set @a:=1;;
+create trigger t1_bi before insert on t1 for each row set @a:=1;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
diff --git a/mysql-test/main/create-big.test b/mysql-test/main/create-big.test
index 7f20a8b42af..82a4dd82a32 100644
--- a/mysql-test/main/create-big.test
+++ b/mysql-test/main/create-big.test
@@ -395,11 +395,11 @@ select @a;
drop table t1;
# Concurrent DROP TABLE
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
---send create table if not exists t1 select 1 as i;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+--send create table if not exists t1 select 1 as i
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
---send drop table t1;
+--send drop table t1
connection addconroot2;
# Wait until the above DROP TABLE is blocked due to CREATE TABLE
let $wait_condition=
@@ -417,11 +417,11 @@ connection default;
# Concurrent CREATE TRIGGER
create table t1 (i int);
set @a:=0;
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
---send create table if not exists t1 select 1 as i;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+--send create table if not exists t1 select 1 as i
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
---send create trigger t1_bi before insert on t1 for each row set @a:=1;
+--send create trigger t1_bi before insert on t1 for each row set @a:=1
connection addconroot2;
# Wait until the above DROP TABLE is blocked due to CREATE TABLE
let $wait_condition=
diff --git a/mysql-test/main/create.result b/mysql-test/main/create.result
index 188396edfa9..d249e4b453c 100644
--- a/mysql-test/main/create.result
+++ b/mysql-test/main/create.result
@@ -401,7 +401,7 @@ create table t3 like mysqltest.t3;
ERROR 42S01: Table 't3' already exists
create table non_existing_database.t1 like t1;
ERROR 42000: Unknown database 'non_existing_database'
-create table t3 like non_existing_table;
+create table t4 like non_existing_table;
ERROR 42S02: Table 'test.non_existing_table' doesn't exist
create temporary table t3 like t1;
ERROR 42S01: Table 't3' already exists
@@ -911,8 +911,12 @@ unlock tables;
lock table t1 read, t2 read;
create table t2 select * from t1;
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
+create table t3 select * from t1;
+ERROR HY000: Table 't3' was not locked with LOCK TABLES
create table if not exists t2 select * from t1;
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
+create table if not exists t3 select * from t1;
+ERROR HY000: Table 't3' was not locked with LOCK TABLES
unlock tables;
lock table t1 read, t2 write;
create table t2 select * from t1;
@@ -1050,99 +1054,6 @@ USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
-set @save_character_set_client=@@character_set_client;
-set @save_collation_connection=@@collation_connection;
-set names utf8;
-create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-database()
-имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
-use test;
-select SCHEMA_NAME from information_schema.schemata
-where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
-SCHEMA_NAME
-имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
-drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
-(
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
-index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
-);
-create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
-select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-select TABLE_NAME from information_schema.tables where
-table_schema='test';
-TABLE_NAME
-имÑ_вью_кодировке_утф8_длиной_больше_чем_42
-имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
-select COLUMN_NAME from information_schema.columns where
-table_schema='test';
-COLUMN_NAME
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-select INDEX_NAME from information_schema.statistics where
-table_schema='test';
-INDEX_NAME
-имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48
-select TABLE_NAME from information_schema.views where
-table_schema='test';
-TABLE_NAME
-имÑ_вью_кодировке_утф8_длиной_больше_чем_42
-show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-Table Create Table
-имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 CREATE TABLE `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` (
- `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` int(11) DEFAULT NULL,
- KEY `имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48` (`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-View Create View character_set_client collation_connection
-имÑ_вью_кодировке_утф8_длиной_больше_чем_42 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имÑ_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` AS `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` from `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` utf8 utf8_general_ci
-create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
-select TRIGGER_NAME from information_schema.triggers where
-trigger_schema='test';
-TRIGGER_NAME
-имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
-drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
-create trigger
-очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
-drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
-create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
-begin
-end;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-ROUTINE_NAME
-имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50
-drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
-create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
-begin
-end;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
-create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
-returns int
-return 0;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-ROUTINE_NAME
-имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49
-drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
-create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
-returns int
-return 0;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
-drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-set @@character_set_client=@save_character_set_client;
-set @@character_set_results=@save_character_set_client;
-set @@session.collation_connection=@save_collation_connection;
drop table if exists t1,t2,t3;
drop function if exists f1;
create function f1() returns int
@@ -2123,3 +2034,18 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# MDEV-21017: Assertion `!is_set() || (m_status == DA_OK_BULK &&
+# is_bulk_op())' failed or late ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+# upon attempt to create existing table
+#
+CREATE TABLE t1 (a INT);
+LOCK TABLE t1 WRITE;
+CREATE TABLE IF NOT EXISTS t1 (s DATE GENERATED ALWAYS AS ('2000-01-01') STORED,
+e DATE, PERIOD FOR app(s,e));
+ERROR HY000: Period field `s` cannot be GENERATED ALWAYS AS
+UNLOCK TABLES;
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/create.test b/mysql-test/main/create.test
index c68ae1130ba..adac81f02c5 100644
--- a/mysql-test/main/create.test
+++ b/mysql-test/main/create.test
@@ -319,7 +319,7 @@ create table t3 like mysqltest.t3;
--error ER_BAD_DB_ERROR
create table non_existing_database.t1 like t1;
--error ER_NO_SUCH_TABLE
-create table t3 like non_existing_table;
+create table t4 like non_existing_table;
--error ER_TABLE_EXISTS_ERROR
create temporary table t3 like t1;
drop table t1, t2, t3;
@@ -764,7 +764,6 @@ drop table t1;
--error ER_CANT_AGGREGATE_2COLLATIONS
create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin);
-
# Base vs temporary tables dillema (a.k.a. bug#24508 "Inconsistent
# results of CREATE TABLE ... SELECT when temporary table exists").
# In this situation we either have to create non-temporary table and
@@ -772,6 +771,7 @@ create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1
# permanent table. After patch for Bug#47418, we create the base table and
# instert data into it, even though a temporary table exists with the same
# name.
+
create temporary table t1 (j int);
create table if not exists t1 select 1;
select * from t1;
@@ -779,7 +779,6 @@ drop temporary table t1;
select * from t1;
drop table t1;
-
#
# CREATE TABLE ... SELECT and LOCK TABLES
#
@@ -788,6 +787,7 @@ drop table t1;
# the server doesn't crash, hang and produces sensible errors.
# Includes test for bug #20662 "Infinite loop in CREATE TABLE
# IF NOT EXISTS ... SELECT with locked tables".
+
create table t1 (i int);
insert into t1 values (1), (2);
lock tables t1 read;
@@ -808,8 +808,12 @@ unlock tables;
lock table t1 read, t2 read;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
create table t2 select * from t1;
+--error ER_TABLE_NOT_LOCKED
+create table t3 select * from t1;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
create table if not exists t2 select * from t1;
+--error ER_TABLE_NOT_LOCKED
+create table if not exists t3 select * from t1;
unlock tables;
lock table t1 read, t2 write;
--error ER_TABLE_EXISTS_ERROR
@@ -987,91 +991,6 @@ USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
#
-# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
-#
-set @save_character_set_client=@@character_set_client;
-set @save_collation_connection=@@collation_connection;
-set names utf8;
-
-create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-use test;
-
-select SCHEMA_NAME from information_schema.schemata
-where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
-
-drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
-(
- имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
- index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
-);
-
-create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
-select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-
-# database, table, field, key, view
-select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-
---sorted_result
-select TABLE_NAME from information_schema.tables where
-table_schema='test';
-
-select COLUMN_NAME from information_schema.columns where
-table_schema='test';
-
-select INDEX_NAME from information_schema.statistics where
-table_schema='test';
-
-select TABLE_NAME from information_schema.views where
-table_schema='test';
-
-show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-
-create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
-select TRIGGER_NAME from information_schema.triggers where
-trigger_schema='test';
-drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
---error ER_TOO_LONG_IDENT
-create trigger
-очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
---error ER_TOO_LONG_IDENT
-drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
-
-create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
-begin
-end;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
---error ER_TOO_LONG_IDENT
-create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
-begin
-end;
-
-create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
- returns int
-return 0;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
---error ER_TOO_LONG_IDENT
-create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
- returns int
-return 0;
-
-drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-set @@character_set_client=@save_character_set_client;
-set @@character_set_results=@save_character_set_client;
-set @@session.collation_connection=@save_collation_connection;
-
-#
# Bug#21136 CREATE TABLE SELECT within CREATE TABLE SELECT causes server crash
#
@@ -1967,3 +1886,22 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-21017: Assertion `!is_set() || (m_status == DA_OK_BULK &&
+--echo # is_bulk_op())' failed or late ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+--echo # upon attempt to create existing table
+--echo #
+CREATE TABLE t1 (a INT);
+LOCK TABLE t1 WRITE;
+
+--error ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+CREATE TABLE IF NOT EXISTS t1 (s DATE GENERATED ALWAYS AS ('2000-01-01') STORED,
+e DATE, PERIOD FOR app(s,e));
+
+UNLOCK TABLES;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/create_drop_binlog.result b/mysql-test/main/create_drop_binlog.result
index 39d5754224c..4a8c75a3dae 100644
--- a/mysql-test/main/create_drop_binlog.result
+++ b/mysql-test/main/create_drop_binlog.result
@@ -326,8 +326,6 @@ Log_name Pos Event_type Server_id End_log_pos Info
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE TABLE t1(a INT, b INT)
# # Gtid 1 # GTID #-#-#
-# # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS t1(a INT, b INT)
-# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE OR REPLACE INDEX i1 ON t1(a)
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE OR REPLACE INDEX i1 ON t1(a)
@@ -381,8 +379,6 @@ Log_name Pos Event_type Server_id End_log_pos Info
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE TABLE t1(a INT, b INT)
# # Gtid 1 # GTID #-#-#
-# # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS t1(a INT, b INT)
-# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE INDEX IF NOT EXISTS i1 ON t1(a)
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE INDEX IF NOT EXISTS i1 ON t1(a)
diff --git a/mysql-test/main/create_drop_user.result b/mysql-test/main/create_drop_user.result
index dd75d1c257a..67717f3e4e0 100644
--- a/mysql-test/main/create_drop_user.result
+++ b/mysql-test/main/create_drop_user.result
@@ -1,22 +1,22 @@
CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw1';
-SELECT password FROM mysql.user WHERE user='u1';
-password
-*2B602296A79E0A8784ACC5C88D92E46588CCA3C3
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
+plugin authentication_string
+mysql_native_password *2B602296A79E0A8784ACC5C88D92E46588CCA3C3
CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw2';
Warnings:
Note 1973 Can't create user 'u1'@'localhost'; it already exists
-SELECT password FROM mysql.user WHERE user='u1';
-password
-*2B602296A79E0A8784ACC5C88D92E46588CCA3C3
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
+plugin authentication_string
+mysql_native_password *2B602296A79E0A8784ACC5C88D92E46588CCA3C3
CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'pw3';
-SELECT password FROM mysql.user WHERE user='u1';
-password
-*77B4A70CEFD76DB9415F36D291E74C110D2738E0
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
+plugin authentication_string
+mysql_native_password *77B4A70CEFD76DB9415F36D291E74C110D2738E0
CREATE OR REPLACE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw4';
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
-SELECT password FROM mysql.user WHERE user='u1';
-password
-*77B4A70CEFD76DB9415F36D291E74C110D2738E0
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
+plugin authentication_string
+mysql_native_password *77B4A70CEFD76DB9415F36D291E74C110D2738E0
DROP USER IF EXISTS u1@localhost;
DROP USER IF EXISTS u1@localhost;
Warnings:
diff --git a/mysql-test/main/create_drop_user.test b/mysql-test/main/create_drop_user.test
index 949782a2daf..234383fb4ca 100644
--- a/mysql-test/main/create_drop_user.test
+++ b/mysql-test/main/create_drop_user.test
@@ -1,17 +1,17 @@
--source include/not_embedded.inc
CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw1';
-SELECT password FROM mysql.user WHERE user='u1';
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw2';
-SELECT password FROM mysql.user WHERE user='u1';
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'pw3';
-SELECT password FROM mysql.user WHERE user='u1';
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
--error ER_WRONG_USAGE
CREATE OR REPLACE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw4';
-SELECT password FROM mysql.user WHERE user='u1';
+SELECT plugin,authentication_string FROM mysql.user WHERE user='u1';
DROP USER IF EXISTS u1@localhost;
DROP USER IF EXISTS u1@localhost;
diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result
index 5684843c01c..3a7cfa53411 100644
--- a/mysql-test/main/create_or_replace.result
+++ b/mysql-test/main/create_or_replace.result
@@ -257,12 +257,13 @@ drop table if exists test.t1,mysqltest2.t2;
Warnings:
Note 1051 Unknown table 'test.t1'
Note 1051 Unknown table 'mysqltest2.t2'
-create table test.t1 (i int);
+create table test.t1 (i int) engine=myisam;
create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -274,7 +275,8 @@ Tables_in_test
t2
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -289,7 +291,8 @@ create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -301,7 +304,8 @@ Tables_in_test
t2
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -311,7 +315,33 @@ select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
create table t1 (i int);
drop table t1;
+create table test.t1 (i int) engine=innodb;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+select * from information_schema.metadata_lock_info;
+THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
+unlock tables;
+drop table test.t1,mysqltest2.t2;
+create table test.t1 (i int) engine=aria transactional=1 checksum=1;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+select * from information_schema.metadata_lock_info;
+THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
+unlock tables;
+drop table t1;
+create table test.t1 (i int);
drop database mysqltest2;
+drop table test.t1;
#
# MDEV-23391 Server crash in close_thread_table or assertion, upon CREATE OR REPLACE TABLE under lock
#
@@ -319,7 +349,8 @@ create table t1 (i int);
lock table t1 write;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
create or replace table t1 (a char(1)) engine=Innodb select 'foo' as a;
@@ -417,28 +448,32 @@ create table t1 (a int);
lock table t1 write, t2 read;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
create or replace table t1 (i int);
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
create or replace table t1 like t2;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
create or replace table t1 select 1 as f1;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
@@ -532,3 +567,4 @@ SELECT * FROM t3;
ERROR HY000: Table 't3' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP TABLE t3;
+# End of 10.4 tests
diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test
index ba32f4b7603..2b6f2ae4005 100644
--- a/mysql-test/main/create_or_replace.test
+++ b/mysql-test/main/create_or_replace.test
@@ -210,7 +210,7 @@ drop table t1,t3,t4;
create database mysqltest2;
drop table if exists test.t1,mysqltest2.t2;
-create table test.t1 (i int);
+create table test.t1 (i int) engine=myisam;
create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
--replace_column 1 #
@@ -249,7 +249,28 @@ create or replace table mysqltest2.t2 (a int) select 1 as 'a', 2 as 'a';
select * from information_schema.metadata_lock_info;
create table t1 (i int);
drop table t1;
+
+create table test.t1 (i int) engine=innodb;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+--replace_column 1 #
+--sorted_result
+select * from information_schema.metadata_lock_info;
+unlock tables;
+drop table test.t1,mysqltest2.t2;
+
+create table test.t1 (i int) engine=aria transactional=1 checksum=1;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+--replace_column 1 #
+--sorted_result
+select * from information_schema.metadata_lock_info;
+unlock tables;
+drop table t1;
+
+create table test.t1 (i int);
drop database mysqltest2;
+drop table test.t1;
--echo #
@@ -485,3 +506,5 @@ CREATE OR REPLACE TEMPORARY TABLE t2(c INT DEFAULT '');
SELECT * FROM t3;
UNLOCK TABLES;
DROP TABLE t3;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/create_select.result b/mysql-test/main/create_select.result
index 6c6ab77522d..803f9a06213 100644
--- a/mysql-test/main/create_select.result
+++ b/mysql-test/main/create_select.result
@@ -35,3 +35,27 @@ drop table t1, t2;
#
# End of 10.2 tests
#
+set sql_mode='ignore_bad_table_options';
+create table t1 (
+f1 int invisible,
+f2 int comment 'a comment',
+f3 int foo="bar",
+f4 int check(f4 < 10),
+f5 int without system versioning
+) with system versioning as select 1 as f1,2 as f2,3 as f3,4 as f4,5 as f5;
+Warnings:
+Warning 1911 Unknown option 'foo'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) INVISIBLE DEFAULT NULL,
+ `f2` int(11) DEFAULT NULL COMMENT 'a comment',
+ `f3` int(11) DEFAULT NULL `foo`='bar',
+ `f4` int(11) DEFAULT NULL CHECK (`f4` < 10),
+ `f5` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
+drop table t1;
+set sql_mode=default;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/create_select.test b/mysql-test/main/create_select.test
index 170bbba31d4..d91f71133a0 100644
--- a/mysql-test/main/create_select.test
+++ b/mysql-test/main/create_select.test
@@ -50,3 +50,19 @@ drop table t1, t2;
--echo #
--echo # End of 10.2 tests
--echo #
+
+set sql_mode='ignore_bad_table_options';
+create table t1 (
+ f1 int invisible,
+ f2 int comment 'a comment',
+ f3 int foo="bar",
+ f4 int check(f4 < 10),
+ f5 int without system versioning
+) with system versioning as select 1 as f1,2 as f2,3 as f3,4 as f4,5 as f5;
+show create table t1;
+drop table t1;
+set sql_mode=default;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/create_user.result b/mysql-test/main/create_user.result
index 8001b43221b..8bd0ca88335 100644
--- a/mysql-test/main/create_user.result
+++ b/mysql-test/main/create_user.result
@@ -1,57 +1,57 @@
create user foo;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
+% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password N N 0.000000
drop user foo;
create user foo identified by 'password';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require SSL;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require X509;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require CIPHER 'cipher';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require ISSUER 'issuer';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require SUBJECT 'subject';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require CIPHER 'cipher'
SUBJECT 'subject';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject'
AND ISSUER 'issuer';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo, foo2 identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject'
AND ISSUER 'issuer';
select * from mysql.user where user like 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
+% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password N N 0.000000
#--warning ER_USER_CREATE_EXISTS
create user if not exists foo, foo2 identified by 'password2'
require CIPHER 'cipher2' AND SUBJECT 'subject2' AND ISSUER 'issuer2';
@@ -60,7 +60,7 @@ Note 1973 Can't create user 'foo'@'%'; it already exists
Note 1973 Can't create user 'foo2'@'%'; it already exists
select * from mysql.user where user like 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
+% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password N N 0.000000
drop user foo, foo2;
create user foo with MAX_QUERIES_PER_HOUR 10
MAX_UPDATES_PER_HOUR 20
@@ -68,5 +68,5 @@ MAX_CONNECTIONS_PER_HOUR 30
MAX_USER_CONNECTIONS 40;
select * from mysql.user where user like 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 40 N N 0.000000
+% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 40 mysql_native_password N N 0.000000
drop user foo;
diff --git a/mysql-test/main/create_utf8.result b/mysql-test/main/create_utf8.result
new file mode 100644
index 00000000000..bb48a0c8ef5
--- /dev/null
+++ b/mysql-test/main/create_utf8.result
@@ -0,0 +1,89 @@
+set names utf8;
+create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+select database();
+database()
+имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
+use test;
+select SCHEMA_NAME from information_schema.schemata
+where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
+SCHEMA_NAME
+имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
+drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
+(
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
+index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
+);
+create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
+select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+select TABLE_NAME from information_schema.tables where
+table_schema='test';
+TABLE_NAME
+имÑ_вью_кодировке_утф8_длиной_больше_чем_42
+имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
+select COLUMN_NAME from information_schema.columns where
+table_schema='test';
+COLUMN_NAME
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+select INDEX_NAME from information_schema.statistics where
+table_schema='test';
+INDEX_NAME
+имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48
+select TABLE_NAME from information_schema.views where
+table_schema='test';
+TABLE_NAME
+имÑ_вью_кодировке_утф8_длиной_больше_чем_42
+show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+Table Create Table
+имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 CREATE TABLE `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` (
+ `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` int(11) DEFAULT NULL,
+ KEY `имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48` (`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+View Create View character_set_client collation_connection
+имÑ_вью_кодировке_утф8_длиной_больше_чем_42 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имÑ_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` AS `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` from `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` utf8 utf8_general_ci
+create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+select TRIGGER_NAME from information_schema.triggers where
+trigger_schema='test';
+TRIGGER_NAME
+имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
+drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
+create trigger
+очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
+drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
+create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
+begin
+end;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+ROUTINE_NAME
+имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50
+drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
+create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+begin
+end;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
+create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
+returns int
+return 0;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+ROUTINE_NAME
+имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49
+drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
+create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+returns int
+return 0;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
+drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+set names default;
diff --git a/mysql-test/main/create_utf8.test b/mysql-test/main/create_utf8.test
new file mode 100644
index 00000000000..40e814834bc
--- /dev/null
+++ b/mysql-test/main/create_utf8.test
@@ -0,0 +1,80 @@
+#
+# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
+#
+set names utf8;
+
+create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+select database();
+use test;
+
+select SCHEMA_NAME from information_schema.schemata
+where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
+
+drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
+(
+ имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
+ index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
+);
+
+create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
+select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+
+# database, table, field, key, view
+select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+
+--sorted_result
+select TABLE_NAME from information_schema.tables where
+table_schema='test';
+
+select COLUMN_NAME from information_schema.columns where
+table_schema='test';
+
+select INDEX_NAME from information_schema.statistics where
+table_schema='test';
+
+select TABLE_NAME from information_schema.views where
+table_schema='test';
+
+show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+
+create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+select TRIGGER_NAME from information_schema.triggers where
+trigger_schema='test';
+drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
+--error 1059
+create trigger
+очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+--error 1059
+drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
+
+create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
+begin
+end;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
+--error 1059
+create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+begin
+end;
+
+create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
+ returns int
+return 0;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
+--error 1059
+create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+ returns int
+return 0;
+
+drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+set names default;
diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result
index ef821d29527..f6cb180f4a5 100644
--- a/mysql-test/main/cte_nonrecursive.result
+++ b/mysql-test/main/cte_nonrecursive.result
@@ -418,10 +418,10 @@ t2.c in (with t as (select * from t1 where t1.a<5)
select t2.c from t2,t where t2.c=t.a);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
+1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where
-2 MATERIALIZED t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
+3 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where
+3 MATERIALIZED t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
explain
select t1.a,t1.b from t1,t2
where t1.a>t2.c and
@@ -461,10 +461,10 @@ t.c in (with t as (select * from t1 where t1.a<5)
select t2.c from t2,t where t2.c=t.a);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 4 Using where
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1
+1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
-3 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where
-3 MATERIALIZED t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
+4 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where
+4 MATERIALIZED t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
explain
select t1.a,t1.b from t1, (select c from t2 where c >= 4) as t
where t1.a=t.c and
@@ -507,9 +507,9 @@ select t.a, count(*) from t1,t where t1.a=t.a group by t.a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where; Using temporary; Using filesort
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 35 func 1
-3 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where
-3 MATERIALIZED t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 35 func 1
+4 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where
+4 MATERIALIZED t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
explain
select t.a, count(*)
from t1,
@@ -597,8 +597,8 @@ explain
select * from v2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 4 Using where
-1 PRIMARY <derived3> ref key0 key0 5 test.t2.c 2
-3 DERIVED t1 ALL NULL NULL NULL NULL 8 Using where; Using temporary; Using filesort
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.c 2
+2 DERIVED t1 ALL NULL NULL NULL NULL 8 Using where; Using temporary; Using filesort
# with clause in the specification of a view that whose definition
# table alias for a with table
create view v3 as
@@ -863,8 +863,8 @@ SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
1
EXPLAIN SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> system NULL NULL NULL NULL 1
-2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> system NULL NULL NULL NULL 1
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
DROP TABLE t1;
#
# MDEV-10058: Suspicious EXPLAIN output for a derived table + WITH + joined table
@@ -1116,17 +1116,17 @@ select * from cte_e as cte_e1 where a > 1
union
select * from cte_e as cte_e2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 14 100.00 Using where
-2 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using where
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 14 100.00 Using where
+4 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using where
5 UNION t1 ALL NULL NULL NULL NULL 7 100.00 Using where
-NULL UNION RESULT <union2,5> ALL NULL NULL NULL NULL NULL NULL
-6 UNION <derived14> ALL NULL NULL NULL NULL 14 100.00
-14 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using where
-11 UNION t1 ALL NULL NULL NULL NULL 7 100.00 Using where
-NULL UNION RESULT <union14,11> ALL NULL NULL NULL NULL NULL NULL
+NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL NULL
+6 UNION <derived11> ALL NULL NULL NULL NULL 14 100.00
+11 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using where
+12 UNION t1 ALL NULL NULL NULL NULL 7 100.00 Using where
+NULL UNION RESULT <union11,12> ALL NULL NULL NULL NULL NULL NULL
NULL UNION RESULT <union1,6> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 with cte_e as (with cte_o as (with cte_i as (/* select#4 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 7)/* select#3 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1)/* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1 union /* select#5 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1)/* select#1 */ select `cte_e1`.`a` AS `a` from `cte_e` `cte_e1` where `cte_e1`.`a` > 1 union /* select#6 */ select `cte_e2`.`a` AS `a` from `cte_e` `cte_e2`
+Note 1003 with cte_e as (with cte_o as (with cte_i as (/* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 7)/* select#3 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1)/* select#4 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1 union /* select#5 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1)/* select#1 */ select `cte_e1`.`a` AS `a` from `cte_e` `cte_e1` where `cte_e1`.`a` > 1 union /* select#6 */ select `cte_e2`.`a` AS `a` from `cte_e` `cte_e2`
drop table t1;
#
# MDEV-13753: embedded CTE in a VIEW created in prepared statement
@@ -2329,3 +2329,14 @@ DROP PROCEDURE SP1;
DROP PROCEDURE SP2;
DROP TABLE t1,t2,t3,t4;
# End of 10.3 tests
+#
+# MDEV-20730: Syntax error on SELECT INTO @variable with CTE
+#
+with data as (select 1 as id)
+select id into @myid from data;
+set @save_sql_mode = @@sql_mode;
+set sql_mode="oracle";
+with data as (select 1 as id)
+select id into @myid from data;
+set sql_mode= @save_sql_mode;
+# End of 10.4 tests
diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test
index c21090fbdc3..40ccdcdb992 100644
--- a/mysql-test/main/cte_nonrecursive.test
+++ b/mysql-test/main/cte_nonrecursive.test
@@ -1765,3 +1765,17 @@ DROP PROCEDURE SP2;
DROP TABLE t1,t2,t3,t4;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-20730: Syntax error on SELECT INTO @variable with CTE
+--echo #
+
+with data as (select 1 as id)
+select id into @myid from data;
+set @save_sql_mode = @@sql_mode;
+set sql_mode="oracle";
+with data as (select 1 as id)
+select id into @myid from data;
+set sql_mode= @save_sql_mode;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result
index 7bf85016f11..cb20702b807 100644
--- a/mysql-test/main/cte_recursive.result
+++ b/mysql-test/main/cte_recursive.result
@@ -1409,7 +1409,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "686",
"join_type": "BNL",
"attached_condition": "prev_gen.father = folks.`id` or prev_gen.mother = folks.`id`"
}
@@ -1636,16 +1636,16 @@ i div 4 - (i % 4) = ps.i div 4 - (ps.i % 4)
)
SELECT regexp_replace(board,concat('(',REPEAT('.', 4),')'),'\\1\n') n_queens FROM solutions WHERE n_queens = 4;
n_queens
--*--
----*
-*---
---*-
-
--*-
*---
---*
-*--
+-*--
+---*
+*---
+--*-
+
#
# MDEV-10883: execution of prepared statement from SELECT
# with recursive CTE that renames columns
@@ -3781,12 +3781,12 @@ where (dt.a1) in (with recursive cte as (select a2 from t2 where a2='2'
select a2 from cte);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 23 func 1
-3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2
-4 DERIVED t2 const PRIMARY PRIMARY 22 const 1 Using index
-5 RECURSIVE UNION <derived4> ALL NULL NULL NULL NULL 2 Using where
-5 RECURSIVE UNION tt2 ref b1 b1 23 cte.a2 2
-NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL
+1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 23 func 1
+5 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2
+3 DERIVED t2 const PRIMARY PRIMARY 22 const 1 Using index
+4 RECURSIVE UNION <derived3> ALL NULL NULL NULL NULL 2 Using where
+4 RECURSIVE UNION tt2 ref b1 b1 23 cte.a2 2
+NULL UNION RESULT <union3,4> ALL NULL NULL NULL NULL NULL
analyze format=json select fv
from (select t1.a1, f1(t1.a2) fv from t1) dt
where (dt.a1) in (with recursive cte as (select a2 from t2 where a2='2'
@@ -3810,7 +3810,7 @@ ANALYZE
"r_filtered": 100
},
"table": {
- "table_name": "<subquery3>",
+ "table_name": "<subquery5>",
"access_type": "eq_ref",
"possible_keys": ["distinct_key"],
"key": "distinct_key",
@@ -3826,9 +3826,9 @@ ANALYZE
"materialized": {
"unique": 1,
"query_block": {
- "select_id": 3,
+ "select_id": 5,
"table": {
- "table_name": "<derived4>",
+ "table_name": "<derived3>",
"access_type": "ALL",
"r_loops": 1,
"rows": 2,
@@ -3839,14 +3839,14 @@ ANALYZE
"materialized": {
"query_block": {
"recursive_union": {
- "table_name": "<union4,5>",
+ "table_name": "<union3,4>",
"access_type": "ALL",
"r_loops": 0,
"r_rows": null,
"query_specifications": [
{
"query_block": {
- "select_id": 4,
+ "select_id": 3,
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"table": {
@@ -3868,12 +3868,12 @@ ANALYZE
},
{
"query_block": {
- "select_id": 5,
+ "select_id": 4,
"operation": "UNION",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"table": {
- "table_name": "<derived4>",
+ "table_name": "<derived3>",
"access_type": "ALL",
"r_loops": 1,
"rows": 2,
@@ -4455,9 +4455,9 @@ id select_type table type possible_keys key key_len ref rows Extra
4 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2
5 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2
NULL UNION RESULT <union3,4,5> ALL NULL NULL NULL NULL NULL
-2 DERIVED h ALL NULL NULL NULL NULL 12
-2 DERIVED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join)
-2 DERIVED w ALL NULL NULL NULL NULL 12 Using where; Using join buffer (incremental, BNL join)
+2 DERIVED h ALL NULL NULL NULL NULL 12 Using where
+2 DERIVED <derived3> ref key0 key0 5 test.h.id 2
+2 DERIVED w ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join)
prepare stmt from "with recursive
ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
w_id, w_name, w_dob, w_father, w_mother)
@@ -5019,3 +5019,22 @@ drop table t1,t2;
#
# End of 10.3 tests
#
+#
+# MDEV-26108: Recursive CTE embedded into another CTE which is used twice
+#
+create table t1 (a int);
+insert into t1 values (5), (7);
+with cte_e as (
+with recursive cte_r as (
+select a from t1 union select a+1 as a from cte_r r where a < 10
+) select * from cte_r
+) select * from cte_e s1, cte_e s2 where s1.a=s2.a;
+a a
+5 5
+7 7
+6 6
+8 8
+9 9
+10 10
+drop table t1;
+# End of 10.4 tests
diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test
index ca97c2d2900..45eb8918ae3 100644
--- a/mysql-test/main/cte_recursive.test
+++ b/mysql-test/main/cte_recursive.test
@@ -3209,3 +3209,20 @@ drop table t1,t2;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-26108: Recursive CTE embedded into another CTE which is used twice
+--echo #
+
+create table t1 (a int);
+insert into t1 values (5), (7);
+
+with cte_e as (
+ with recursive cte_r as (
+ select a from t1 union select a+1 as a from cte_r r where a < 10
+ ) select * from cte_r
+) select * from cte_e s1, cte_e s2 where s1.a=s2.a;
+
+drop table t1;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/ctype_binary.result b/mysql-test/main/ctype_binary.result
index 7904cade58e..97f970a9e49 100644
--- a/mysql-test/main/ctype_binary.result
+++ b/mysql-test/main/ctype_binary.result
@@ -348,21 +348,23 @@ drop table t1;
select hex(concat(ceiling(0.5)));
hex(concat(ceiling(0.5)))
31
-create table t1 as select concat(ceiling(0.5)) as c1;
+create table t1 as select ceiling(0.5) as c0, concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
hex(concat(floor(0.5)))
30
-create table t1 as select concat(floor(0.5)) as c1;
+create table t1 as select floor(0.5) as c0, concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -2766,11 +2768,11 @@ KEY(date_column));
INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 4 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 4 NULL 2 Using index condition
ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 6 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 6 NULL 2 Using index condition
DROP TABLE t1;
#
# Bug #31384 DATE_ADD() and DATE_SUB() return binary data
@@ -3280,7 +3282,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` enum('\0a') CHARACTER SET binary DEFAULT NULL,
- `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+ `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`d`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (c) VALUES (1);
SELECT HEX(c) FROM t1;
diff --git a/mysql-test/main/ctype_cp1251.result b/mysql-test/main/ctype_cp1251.result
index 764cc37eac5..baa7a038e0e 100644
--- a/mysql-test/main/ctype_cp1251.result
+++ b/mysql-test/main/ctype_cp1251.result
@@ -757,21 +757,23 @@ drop table t1;
select hex(concat(ceiling(0.5)));
hex(concat(ceiling(0.5)))
31
-create table t1 as select concat(ceiling(0.5)) as c1;
+create table t1 as select ceiling(0.5) as c0, concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
hex(concat(floor(0.5)))
30
-create table t1 as select concat(floor(0.5)) as c1;
+create table t1 as select floor(0.5) as c0, concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -3175,11 +3177,11 @@ KEY(date_column));
INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 4 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 4 NULL 2 Using index condition
ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 6 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 6 NULL 2 Using index condition
DROP TABLE t1;
#
# Bug #31384 DATE_ADD() and DATE_SUB() return binary data
diff --git a/mysql-test/main/ctype_gbk.result b/mysql-test/main/ctype_gbk.result
index bf7928eb2c9..e38bb66fd96 100644
--- a/mysql-test/main/ctype_gbk.result
+++ b/mysql-test/main/ctype_gbk.result
@@ -492,7 +492,11 @@ b MEDIUMTEXT CHARACTER SET big5);
INSERT INTO t1 VALUES
(REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', '');
SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
DROP TABLES t1;
End of 5.0 tests
#
diff --git a/mysql-test/main/ctype_latin1.result b/mysql-test/main/ctype_latin1.result
index d4d4423220e..8382c24e95a 100644
--- a/mysql-test/main/ctype_latin1.result
+++ b/mysql-test/main/ctype_latin1.result
@@ -1066,21 +1066,23 @@ drop table t1;
select hex(concat(ceiling(0.5)));
hex(concat(ceiling(0.5)))
31
-create table t1 as select concat(ceiling(0.5)) as c1;
+create table t1 as select ceiling(0.5) as c0, concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
hex(concat(floor(0.5)))
30
-create table t1 as select concat(floor(0.5)) as c1;
+create table t1 as select floor(0.5) as c0, concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -3484,11 +3486,11 @@ KEY(date_column));
INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 4 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 4 NULL 2 Using index condition
ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 6 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 6 NULL 2 Using index condition
DROP TABLE t1;
#
# Bug #31384 DATE_ADD() and DATE_SUB() return binary data
diff --git a/mysql-test/main/ctype_many.result b/mysql-test/main/ctype_many.result
index 25802af4b5d..9def4fea80b 100644
--- a/mysql-test/main/ctype_many.result
+++ b/mysql-test/main/ctype_many.result
@@ -1695,6 +1695,7 @@ DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
AS BINARY(0)) USING utf8);
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
+Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect BINARY(0) value: '1.'
#
diff --git a/mysql-test/main/ctype_many.test b/mysql-test/main/ctype_many.test
index a619b16416c..ba99c2e925a 100644
--- a/mysql-test/main/ctype_many.test
+++ b/mysql-test/main/ctype_many.test
@@ -225,9 +225,11 @@ DROP TABLE t1;
--echo # Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
--echo #
+--disable_ps_protocol
SET NAMES latin1;
DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
AS BINARY(0)) USING utf8);
+--enable_ps_protocol
--echo #
--echo # End of 5.1 tests
--echo #
diff --git a/mysql-test/main/ctype_sjis.result b/mysql-test/main/ctype_sjis.result
index fdb24fdc0e5..42f4f5141a8 100644
--- a/mysql-test/main/ctype_sjis.result
+++ b/mysql-test/main/ctype_sjis.result
@@ -19296,3 +19296,19 @@ SET STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-26953 Assertion `!str || str != Ptr || !is_alloced()' failed in String::copy upon SELECT with sjis
+#
+SET NAMES sjis;
+CREATE TABLE t (a VARCHAR(3));
+INSERT INTO t VALUES (''),('');
+SELECT GROUP_CONCAT(PASSWORD(a)) AS f FROM t;
+f
+,
+DROP TABLE t;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/ctype_sjis.test b/mysql-test/main/ctype_sjis.test
index 9a8ce414c14..00662fdf2a0 100644
--- a/mysql-test/main/ctype_sjis.test
+++ b/mysql-test/main/ctype_sjis.test
@@ -260,3 +260,22 @@ let $coll_pad='sjis_bin';
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-26953 Assertion `!str || str != Ptr || !is_alloced()' failed in String::copy upon SELECT with sjis
+--echo #
+
+SET NAMES sjis;
+CREATE TABLE t (a VARCHAR(3));
+INSERT INTO t VALUES (''),('');
+SELECT GROUP_CONCAT(PASSWORD(a)) AS f FROM t;
+DROP TABLE t;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/ctype_ucs.result b/mysql-test/main/ctype_ucs.result
index 419bb7ae9e0..6292ad2591e 100644
--- a/mysql-test/main/ctype_ucs.result
+++ b/mysql-test/main/ctype_ucs.result
@@ -207,6 +207,8 @@ DROP TABLE t1;
# Problem # 1 (original report): wrong parsing of ucs2 data
SET character_set_connection=ucs2;
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE TABLE t1(a INT);
LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2
(@b) SET a=REVERSE(@b);
@@ -218,6 +220,8 @@ a
DROP TABLE t1;
# Problem # 2 : if you write and read ucs2 data to a file they're lost
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE TABLE t1(a INT);
LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2
(@b) SET a=REVERSE(@b);
@@ -252,10 +256,10 @@ t1 CREATE TABLE `t1` (
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
explain select * from t1 where a like 'abc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 23 NULL 2 Using where; Using index
explain select * from t1 where a like concat('abc','%');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 23 NULL 2 Using where; Using index
select * from t1 where a like "abc%";
a
abc
@@ -1565,7 +1569,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 23 NULL 30 Using where; Using index
+1 SIMPLE t1 index a a 23 NULL 31 Using where; Using index
SELECT * FROM t1 WHERE a LIKE 'c%';
a
ca
@@ -1581,7 +1585,7 @@ ch
ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 23 NULL 30 Using where; Using index
+1 SIMPLE t1 index a a 23 NULL 31 Using where; Using index
SELECT hex(concat('d',_ucs2 0x017E,'%'));
hex(concat('d',_ucs2 0x017E,'%'))
0064017E0025
@@ -1946,21 +1950,23 @@ drop table t1;
select hex(concat(ceiling(0.5)));
hex(concat(ceiling(0.5)))
0031
-create table t1 as select concat(ceiling(0.5)) as c1;
+create table t1 as select ceiling(0.5) as c0, concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
hex(concat(floor(0.5)))
0030
-create table t1 as select concat(floor(0.5)) as c1;
+create table t1 as select floor(0.5) as c0, concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -4364,11 +4370,11 @@ KEY(date_column));
INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 4 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 4 NULL 2 Using index condition
ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 6 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 6 NULL 2 Using index condition
DROP TABLE t1;
#
# Bug #31384 DATE_ADD() and DATE_SUB() return binary data
@@ -4583,7 +4589,7 @@ SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2));
SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2))
838:59:59.999999
Warnings:
-Warning 1292 Truncated incorrect time value: '77760000'
+Warning 1292 Truncated incorrect seconds value: '77760000'
#
# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
#
@@ -6391,3 +6397,39 @@ DEALLOCATE PREPARE stmt;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-17995 INET6_NTOA(ucs2_input) erroneously returns NULL
+#
+SELECT HEX(INET6_ATON('1::1')), HEX(INET6_ATON(CONVERT('1::1' USING ucs2)));
+HEX(INET6_ATON('1::1')) HEX(INET6_ATON(CONVERT('1::1' USING ucs2)))
+00010000000000000000000000000001 00010000000000000000000000000001
+#
+# MDEV-19184 Crash in IS_IPV6(_ucs2 0x0031)
+#
+SET NAMES utf8;
+SELECT IS_IPV6(_ucs2 0x0031);
+IS_IPV6(_ucs2 0x0031)
+0
+SELECT IS_IPV4(_ucs2 0x0031);
+IS_IPV4(_ucs2 0x0031)
+0
+SELECT IS_IPV6(_ucs2 0x003A003A);
+IS_IPV6(_ucs2 0x003A003A)
+1
+SELECT IS_IPV4(_ucs2 0x00310030002E0030002E0030002E0031);
+IS_IPV4(_ucs2 0x00310030002E0030002E0030002E0031)
+1
+SET NAMES utf8, collation_connection=ucs2_bin;
+SELECT IS_IPV6('::');
+IS_IPV6('::')
+1
+SELECT IS_IPV4('10.0.0.1');
+IS_IPV4('10.0.0.1')
+1
+SET NAMES utf8;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/ctype_ucs.test b/mysql-test/main/ctype_ucs.test
index d0d463c0340..7a772a092b1 100644
--- a/mysql-test/main/ctype_ucs.test
+++ b/mysql-test/main/ctype_ucs.test
@@ -1094,3 +1094,33 @@ DEALLOCATE PREPARE stmt;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-17995 INET6_NTOA(ucs2_input) erroneously returns NULL
+--echo #
+
+SELECT HEX(INET6_ATON('1::1')), HEX(INET6_ATON(CONVERT('1::1' USING ucs2)));
+
+--echo #
+--echo # MDEV-19184 Crash in IS_IPV6(_ucs2 0x0031)
+--echo #
+
+SET NAMES utf8;
+SELECT IS_IPV6(_ucs2 0x0031);
+SELECT IS_IPV4(_ucs2 0x0031);
+
+SELECT IS_IPV6(_ucs2 0x003A003A);
+SELECT IS_IPV4(_ucs2 0x00310030002E0030002E0030002E0031);
+
+SET NAMES utf8, collation_connection=ucs2_bin;
+SELECT IS_IPV6('::');
+SELECT IS_IPV4('10.0.0.1');
+SET NAMES utf8;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/ctype_upgrade.result b/mysql-test/main/ctype_upgrade.result
index 5f0be66f8fb..9d19c3b5203 100644
--- a/mysql-test/main/ctype_upgrade.result
+++ b/mysql-test/main/ctype_upgrade.result
@@ -235,12 +235,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -258,9 +258,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -294,12 +294,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -317,9 +317,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/ctype_utf16.result b/mysql-test/main/ctype_utf16.result
index f0350f022c6..3643e170376 100644
--- a/mysql-test/main/ctype_utf16.result
+++ b/mysql-test/main/ctype_utf16.result
@@ -133,10 +133,10 @@ t1 CREATE TABLE `t1` (
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
explain select * from t1 where a like 'abc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 43 NULL 2 Using where; Using index
explain select * from t1 where a like concat('abc','%');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 43 NULL 2 Using where; Using index
select * from t1 where a like "abc%";
a
abc
diff --git a/mysql-test/main/ctype_utf16_uca.result b/mysql-test/main/ctype_utf16_uca.result
index fdfc22a94e0..d4f0a821168 100644
--- a/mysql-test/main/ctype_utf16_uca.result
+++ b/mysql-test/main/ctype_utf16_uca.result
@@ -4005,7 +4005,7 @@ D801DC28 30D2 ð¨
ALTER TABLE t1 ADD KEY(c);
EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 43 NULL 2 Using where; Using index
+1 SIMPLE t1 range c c 43 NULL 3 Using where; Using index
SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
hex(c) hex(weight_string(c))
0061 120F
@@ -7908,7 +7908,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` enum('\0a\0a\0a\0a\0a\0a\0a\0a') CHARACTER SET binary DEFAULT NULL,
- `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+ `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`d`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (c) VALUES (1);
SELECT HEX(c) FROM t1;
@@ -7920,7 +7920,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` enum('\0a\0a\0a\0a\0a\0a\0a\0a\0a') CHARACTER SET binary DEFAULT NULL,
- `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+ `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`d`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (c) VALUES (1);
SELECT HEX(c) FROM t1;
@@ -7932,7 +7932,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` enum('\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a') CHARACTER SET binary DEFAULT NULL,
- `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+ `d` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`d`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (c) VALUES (1);
SELECT HEX(c) FROM t1;
diff --git a/mysql-test/main/ctype_utf16le.result b/mysql-test/main/ctype_utf16le.result
index e95b056719d..415b6ed6251 100644
--- a/mysql-test/main/ctype_utf16le.result
+++ b/mysql-test/main/ctype_utf16le.result
@@ -136,10 +136,10 @@ t1 CREATE TABLE `t1` (
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
explain select * from t1 where a like 'abc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 43 NULL 2 Using where; Using index
explain select * from t1 where a like concat('abc','%');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 43 NULL 2 Using where; Using index
select * from t1 where a like "abc%";
a
abc
diff --git a/mysql-test/main/ctype_utf32.result b/mysql-test/main/ctype_utf32.result
index 22cea274182..22ccba13acb 100644
--- a/mysql-test/main/ctype_utf32.result
+++ b/mysql-test/main/ctype_utf32.result
@@ -132,10 +132,10 @@ t1 CREATE TABLE `t1` (
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
explain select * from t1 where a like 'abc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 43 NULL 2 Using where; Using index
explain select * from t1 where a like concat('abc','%');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 43 NULL 1 Using where; Using index
+1 SIMPLE t1 range a a 43 NULL 2 Using where; Using index
select * from t1 where a like "abc%";
a
abc
@@ -1590,7 +1590,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 DEFAULT NULL
+ `format(123,2,'no_NO')` varchar(17) CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1;
format(123,2,'no_NO')
@@ -2879,7 +2879,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` enum('\0\0\0a','\0\0\0b','\0\0\0a\0\0\0c') CHARACTER SET binary DEFAULT NULL,
- `c2` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+ `c2` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`c2`)),
`c3` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (c1) VALUES (1),(2),(3);
diff --git a/mysql-test/main/ctype_utf32_uca.result b/mysql-test/main/ctype_utf32_uca.result
index 2f6e44dc402..de53906ac2c 100644
--- a/mysql-test/main/ctype_utf32_uca.result
+++ b/mysql-test/main/ctype_utf32_uca.result
@@ -4025,7 +4025,7 @@ hex(c) hex(weight_string(c)) c
ALTER TABLE t1 ADD KEY(c);
EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 43 NULL 2 Using where; Using index
+1 SIMPLE t1 range c c 43 NULL 3 Using where; Using index
SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
hex(c) hex(weight_string(c))
00000061 120F
@@ -7958,3 +7958,21 @@ SET NAMES utf8;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-22499 Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed in TABLE_SHARE::init_from_binary_frm_image
+#
+SET @@SESSION.collation_connection=utf32_estonian_ci;
+CREATE TABLE t1(c1 SET('a') COLLATE 'Binary',c2 JSON);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` set('\0\0\0a') CHARACTER SET binary DEFAULT NULL,
+ `c2` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`c2`))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/ctype_utf32_uca.test b/mysql-test/main/ctype_utf32_uca.test
index 9073d8c57f5..1ddef467302 100644
--- a/mysql-test/main/ctype_utf32_uca.test
+++ b/mysql-test/main/ctype_utf32_uca.test
@@ -307,3 +307,21 @@ SET NAMES utf8;
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-22499 Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed in TABLE_SHARE::init_from_binary_frm_image
+--echo #
+
+SET @@SESSION.collation_connection=utf32_estonian_ci;
+CREATE TABLE t1(c1 SET('a') COLLATE 'Binary',c2 JSON);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result
index bf0bd06c7a5..24a3ef232c6 100644
--- a/mysql-test/main/ctype_utf8.result
+++ b/mysql-test/main/ctype_utf8.result
@@ -2817,21 +2817,23 @@ drop table t1;
select hex(concat(ceiling(0.5)));
hex(concat(ceiling(0.5)))
31
-create table t1 as select concat(ceiling(0.5)) as c1;
+create table t1 as select ceiling(0.5) as c0, concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
hex(concat(floor(0.5)))
30
-create table t1 as select concat(floor(0.5)) as c1;
+create table t1 as select floor(0.5) as c0, concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
+ `c0` int(3) NOT NULL,
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -5235,11 +5237,11 @@ KEY(date_column));
INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 4 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 4 NULL 2 Using index condition
ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range date_column date_column 6 NULL 1 Using index condition
+1 SIMPLE t1 range date_column date_column 6 NULL 2 Using index condition
DROP TABLE t1;
#
# Bug #31384 DATE_ADD() and DATE_SUB() return binary data
diff --git a/mysql-test/main/custom_aggregate_functions.result b/mysql-test/main/custom_aggregate_functions.result
index 0e73f963b45..884bd8b555f 100644
--- a/mysql-test/main/custom_aggregate_functions.result
+++ b/mysql-test/main/custom_aggregate_functions.result
@@ -37,7 +37,7 @@ set x=5;
fetch group next row;
return x+1;
end |
-ERROR HY000: Non-aggregate function contains aggregate specific instructions: (FETCH GROUP NEXT ROW)
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
create aggregate function f1(x INT) returns INT
begin
declare continue handler for not found return x;
@@ -1188,3 +1188,37 @@ drop database common_schema;
drop database another_schema;
USE test;
# End of 10.3 tests
+#
+# MDEV-18813 PROCEDURE and anonymous blocks silently ignore FETCH GROUP NEXT ROW
+#
+CREATE PROCEDURE p1()
+BEGIN
+FETCH GROUP NEXT ROW;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+BEGIN NOT ATOMIC
+FETCH GROUP NEXT ROW;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE DEFINER=root@localhost FUNCTION f1() RETURNS INT
+BEGIN
+FETCH GROUP NEXT ROW;
+RETURN 0;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER tr1
+AFTER INSERT ON t1 FOR EACH ROW
+FETCH GROUP NEXT ROW;
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+DROP TABLE t1;
+CREATE EVENT ev1
+ON SCHEDULE EVERY 1 HOUR
+STARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH
+ENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK
+DO FETCH GROUP NEXT ROW;
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+# End of 10.4 tests
diff --git a/mysql-test/main/custom_aggregate_functions.test b/mysql-test/main/custom_aggregate_functions.test
index 7442c7ec2ee..4b6129b5974 100644
--- a/mysql-test/main/custom_aggregate_functions.test
+++ b/mysql-test/main/custom_aggregate_functions.test
@@ -1002,3 +1002,55 @@ drop database another_schema;
USE test;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-18813 PROCEDURE and anonymous blocks silently ignore FETCH GROUP NEXT ROW
+--echo #
+
+
+DELIMITER $$;
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE PROCEDURE p1()
+BEGIN
+ FETCH GROUP NEXT ROW;
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_NOT_AGGREGATE_FUNCTION
+BEGIN NOT ATOMIC
+ FETCH GROUP NEXT ROW;
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE DEFINER=root@localhost FUNCTION f1() RETURNS INT
+BEGIN
+ FETCH GROUP NEXT ROW;
+ RETURN 0;
+END;
+$$
+DELIMITER ;$$
+
+
+CREATE TABLE t1 (a INT);
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE TRIGGER tr1
+ AFTER INSERT ON t1 FOR EACH ROW
+ FETCH GROUP NEXT ROW;
+DROP TABLE t1;
+
+
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE EVENT ev1
+ ON SCHEDULE EVERY 1 HOUR
+ STARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH
+ ENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK
+DO FETCH GROUP NEXT ROW;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/date_formats.result b/mysql-test/main/date_formats.result
index 16dbdf7969c..463cce39520 100644
--- a/mysql-test/main/date_formats.result
+++ b/mysql-test/main/date_formats.result
@@ -442,7 +442,7 @@ f1 f2 f3
Warnings:
Warning 1292 Truncated incorrect datetime value: '2003-01-02 10:11:12.0012ABCD'
Warning 1292 Truncated incorrect time value: '-01:01:01.01 GGG'
-Warning 1292 Truncated incorrect time value: '1997-12-31 23:59:59.01XXXX'
+Warning 1292 Truncated incorrect datetime value: '1997-12-31 23:59:59.01XXXX'
select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1,
str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2;
f1 f2
diff --git a/mysql-test/main/deadlock_ftwrl.result b/mysql-test/main/deadlock_ftwrl.result
new file mode 100644
index 00000000000..95eed70f664
--- /dev/null
+++ b/mysql-test/main/deadlock_ftwrl.result
@@ -0,0 +1,21 @@
+CREATE TABLE t1(a INT);
+SELECT GET_LOCK("l1", 0);
+GET_LOCK("l1", 0)
+1
+connect con1,localhost,root,,;
+LOCK TABLES t1 WRITE;
+connection default;
+set debug_sync='mdl_acquire_lock_wait SIGNAL ftwrl';
+FLUSH TABLES WITH READ LOCK;
+connection con1;
+set debug_sync='now WAIT_FOR ftwrl';
+SELECT GET_LOCK("l1", 1000);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+disconnect con1;
+connection default;
+SELECT RELEASE_LOCK("l1");
+RELEASE_LOCK("l1")
+1
+UNLOCK TABLES;
+DROP TABLE t1;
+set debug_sync='reset';
diff --git a/mysql-test/main/deadlock_ftwrl.test b/mysql-test/main/deadlock_ftwrl.test
new file mode 100644
index 00000000000..fc943bcf953
--- /dev/null
+++ b/mysql-test/main/deadlock_ftwrl.test
@@ -0,0 +1,36 @@
+# MDEV-20946 Hard FTWRL deadlock under user level locks
+#
+# Deadlock detector should resolve conflicts between FTWRL and user locks.
+
+--source include/have_debug_sync.inc
+--source include/count_sessions.inc
+
+CREATE TABLE t1(a INT);
+SELECT GET_LOCK("l1", 0);
+
+connect(con1,localhost,root,,);
+LOCK TABLES t1 WRITE;
+
+connection default;
+set debug_sync='mdl_acquire_lock_wait SIGNAL ftwrl';
+send FLUSH TABLES WITH READ LOCK;
+# At this point "default" is waiting for tables to be unlocked from
+# LOCK TABLES WRITE issued by "con1".
+
+connection con1;
+set debug_sync='now WAIT_FOR ftwrl';
+# The lock in the following GET_LOCK cannot be acquired since "default" holds
+# a lock on "l1" and is waiting in FLUSH TABLES for con1.
+--error ER_LOCK_DEADLOCK
+SELECT GET_LOCK("l1", 1000);
+disconnect con1; # Performs an implicit UNLOCK TABLES.
+
+connection default;
+reap;
+SELECT RELEASE_LOCK("l1");
+UNLOCK TABLES;
+DROP TABLE t1;
+
+set debug_sync='reset';
+
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/main/deadlock_innodb.result b/mysql-test/main/deadlock_innodb.result
index af78a6aa9d5..fca0ff6be0c 100644
--- a/mysql-test/main/deadlock_innodb.result
+++ b/mysql-test/main/deadlock_innodb.result
@@ -72,7 +72,7 @@ insert into t1 values(0, 0), (300, 300);
insert into t2 values(0, 0), (1, 20), (2, 30);
commit;
connection con1;
-select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE;
+select a,b from t2 UNION (SELECT id, x from t1 FOR UPDATE);
a b
0 0
20 1
diff --git a/mysql-test/main/default.result b/mysql-test/main/default.result
index 1c458084193..55b448229b5 100644
--- a/mysql-test/main/default.result
+++ b/mysql-test/main/default.result
@@ -1,5 +1,3 @@
-drop table if exists t1,t2,t3,t4,t5,t6;
-drop database if exists mysqltest;
set sql_mode="";
CREATE TABLE t1 (a varchar(30) binary NOT NULL DEFAULT ' ',
b varchar(1) binary NOT NULL DEFAULT ' ',
@@ -2217,8 +2215,6 @@ t1 CREATE TABLE `t1` (
`b` bigint(20) DEFAULT (cast(`a` as signed))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (0xFFFFFFFFFFFFFFFF);
-Warnings:
-Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
SELECT * FROM t1;
a b
18446744073709551615 -1
@@ -3137,7 +3133,9 @@ t3 CREATE TABLE `t3` (
`max(c)` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
+#
# MDEV-11359: Implement IGNORE for bulk operation
+#
create table t1 (a int primary key default 0, b int default 3);
insert into t1 values (1, ignore);
insert into t1 values (2, ignore);
@@ -3356,6 +3354,9 @@ a b
30 31
drop table t1;
set sql_mode=default;
+#
+# MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)
+#
create table t1 (a int default b, b int default 4, t text);
insert t1 (b, t) values (5, '1 column is omitted');
insert t1 values (default, 5, '2 column gets DEFAULT, keyword');
@@ -3378,8 +3379,14 @@ a b t
5 5 8 reversed, also expression DEFAULT(0)+0
5 5 9 reversed, the value of the DEFAULT(a), that is b
drop table t1;
+#
+# MDEV-10352 Server crashes in Field::set_default on CREATE TABLE
+#
create table t1 (col1 int default(-(default(col1))));
ERROR 01000: Expression for field `col1` is referring to uninitialized field `col1`
+#
+# MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on CREATE TABLE with invalid default
+#
create table t1 (col int default (yearweek((exp(710)))));
ERROR 22003: DOUBLE value is out of range in 'exp(710)'
#
@@ -3405,6 +3412,7 @@ INSERT INTO t1 VALUES (),();
SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
1
1
+1
DROP TABLE t1;
#
# MDEV-28402: ASAN heap-use-after-free in create_tmp_table,
@@ -3424,7 +3432,9 @@ DEFAULT(a) CASE a WHEN 0 THEN 1 ELSE 2 END
NULL 2
DROP TABLE t;
DROP VIEW v;
-# end of 10.2 test
+#
+# End of 10.2 test
+#
#
# MDEV-22703 DEFAULT() on a BLOB column can overwrite the default
# record, which can cause crashes when accessing already released
@@ -3440,4 +3450,18 @@ length(DEFAULT(h))
25
INSERT INTO t1 () VALUES ();
drop table t1;
-# end of 10.3 test
+#
+# End of 10.3 test
+#
+#
+# MDEV-26423: MariaDB server crash in Create_tmp_table::finalize
+#
+CREATE TABLE t1 (pk text DEFAULT length(uuid()));
+INSERT INTO t1 VALUES (),();
+SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
+1
+1
+DROP TABLE t1;
+#
+# End of 10.4 test
+#
diff --git a/mysql-test/main/default.test b/mysql-test/main/default.test
index 1230f67c7d2..3064209a4a2 100644
--- a/mysql-test/main/default.test
+++ b/mysql-test/main/default.test
@@ -1,16 +1,10 @@
--source include/have_innodb.inc
#
-# test of already fixed bugs
-#
---disable_warnings
-drop table if exists t1,t2,t3,t4,t5,t6;
-drop database if exists mysqltest;
-
-#
# Bug 10838
# Insert causes warnings for no default values and corrupts tables
#
+--disable_warnings
set sql_mode="";
CREATE TABLE t1 (a varchar(30) binary NOT NULL DEFAULT ' ',
b varchar(1) binary NOT NULL DEFAULT ' ',
@@ -1891,7 +1885,9 @@ show create table t2;
show create table t3;
drop table t1, t2, t3;
+--echo #
--echo # MDEV-11359: Implement IGNORE for bulk operation
+--echo #
create table t1 (a int primary key default 0, b int default 3);
insert into t1 values (1, ignore);
insert into t1 values (2, ignore);
@@ -2071,9 +2067,9 @@ select * from t1;
drop table t1;
set sql_mode=default;
-#
-# MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)
-#
+--echo #
+--echo # MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)
+--echo #
create table t1 (a int default b, b int default 4, t text);
insert t1 (b, t) values (5, '1 column is omitted');
insert t1 values (default, 5, '2 column gets DEFAULT, keyword');
@@ -2088,15 +2084,15 @@ insert t1 (t,b,a) values ('9 reversed, the value of the DEFAULT(a), that is b',
select * from t1 order by t;
drop table t1;
-#
-# MDEV-10352 Server crashes in Field::set_default on CREATE TABLE
-#
+--echo #
+--echo # MDEV-10352 Server crashes in Field::set_default on CREATE TABLE
+--echo #
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
create table t1 (col1 int default(-(default(col1))));
-#
-# MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on CREATE TABLE with invalid default
-#
+--echo #
+--echo # MDEV-10354 Assertion `! is_set()' failed in Diagnostics_area::set_ok_status on CREATE TABLE with invalid default
+--echo #
--error ER_DATA_OUT_OF_RANGE
create table t1 (col int default (yearweek((exp(710)))));
@@ -2126,7 +2122,6 @@ INSERT INTO t1 VALUES (),();
SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
DROP TABLE t1;
-
--echo #
--echo # MDEV-28402: ASAN heap-use-after-free in create_tmp_table,
--echo # Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0'
@@ -2142,7 +2137,9 @@ CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t;
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM v GROUP BY a WITH ROLLUP;
DROP TABLE t;
DROP VIEW v;
---echo # end of 10.2 test
+--echo #
+--echo # End of 10.2 test
+--echo #
--echo #
--echo # MDEV-22703 DEFAULT() on a BLOB column can overwrite the default
@@ -2160,4 +2157,18 @@ SELECT length(DEFAULT(h)) FROM t1;
INSERT INTO t1 () VALUES ();
drop table t1;
---echo # end of 10.3 test
+--echo #
+--echo # End of 10.3 test
+--echo #
+
+--echo #
+--echo # MDEV-26423: MariaDB server crash in Create_tmp_table::finalize
+--echo #
+CREATE TABLE t1 (pk text DEFAULT length(uuid()));
+INSERT INTO t1 VALUES (),();
+SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 test
+--echo #
diff --git a/mysql-test/main/default_storage_engine.result b/mysql-test/main/default_storage_engine.result
index da3350c6eaf..38b867c8337 100644
--- a/mysql-test/main/default_storage_engine.result
+++ b/mysql-test/main/default_storage_engine.result
@@ -1 +1,3 @@
+# Kill the server
"all ok"
+# restart
diff --git a/mysql-test/main/default_storage_engine.test b/mysql-test/main/default_storage_engine.test
index dd6f4728f47..cce95cde6d9 100644
--- a/mysql-test/main/default_storage_engine.test
+++ b/mysql-test/main/default_storage_engine.test
@@ -1,3 +1,4 @@
+--source include/not_embedded.inc
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'innodb' AND PLUGIN_LIBRARY IS NULL`)
{
--skip Requires built-in InnoDB.
@@ -5,6 +6,8 @@ if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'in
let $cmd=`select replace("$MYSQLD_BOOTSTRAP_CMD --skip-innodb", " --default-storage-engine=myisam", "")`;
+--source include/kill_mysqld.inc
+
#
# Now it *must* fail, because if InnoDB is compiled in, it is used as a default
# storage engine. but $cmd includes --skip-innodb
@@ -14,3 +17,4 @@ exec $cmd;
echo "all ok"; # to not have zero-length result file
+--source include/start_mysqld.inc
diff --git a/mysql-test/main/delayed.result b/mysql-test/main/delayed.result
index 613e214751e..fe284dfcdad 100644
--- a/mysql-test/main/delayed.result
+++ b/mysql-test/main/delayed.result
@@ -500,7 +500,8 @@ call mtr.add_suppression("Checking table");
insert delayed into t1 values (2,2);
Warnings:
Error 145 Table './test/t1' is marked as crashed and should be repaired
-Error 1034 1 client is using or hasn't closed the table properly
+Warning 1034 1 client is using or hasn't closed the table properly
+Note 1034 Table is fixed
insert delayed into t1 values (3,3);
flush tables t1;
select * from t1;
@@ -509,3 +510,12 @@ a b
2 2
3 3
drop table t1;
+#
+# MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and
+# spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs
+# and inline_mysql_mutex_lock)
+#
+CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM;
+INSERT DELAYED INTO t1 VALUES (0);
+INSERT DELAYED INTO t1 VALUES (0);
+DROP TABLE t1;
diff --git a/mysql-test/main/delayed.test b/mysql-test/main/delayed.test
index 573985fec1f..428a3d4c4b0 100644
--- a/mysql-test/main/delayed.test
+++ b/mysql-test/main/delayed.test
@@ -642,3 +642,15 @@ insert delayed into t1 values (3,3);
flush tables t1;
select * from t1;
drop table t1;
+
+--echo #
+--echo # MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and
+--echo # spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs
+--echo # and inline_mysql_mutex_lock)
+--echo #
+
+CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM;
+INSERT DELAYED INTO t1 VALUES (0);
+INSERT DELAYED INTO t1 VALUES (0);
+DROP TABLE t1;
+
diff --git a/mysql-test/main/delete_use_source.result b/mysql-test/main/delete_use_source.result
index 3e2feb46cc9..0990a551db6 100644
--- a/mysql-test/main/delete_use_source.result
+++ b/mysql-test/main/delete_use_source.result
@@ -7,6 +7,7 @@ insert t1 select 2,seq from seq_1_to_50;
insert t1 select 3,seq from seq_1_to_20;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
#
# Delete with limit (quick select - range acces)
@@ -49,7 +50,7 @@ start transaction;
explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range c1 c1 4 NULL 600 Using where
-2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 83 Using index
+2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 167 Using index
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
affected rows: 1
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
diff --git a/mysql-test/main/deprecated_features.result b/mysql-test/main/deprecated_features.result
index fc6c86d065d..2c77d745e2e 100644
--- a/mysql-test/main/deprecated_features.result
+++ b/mysql-test/main/deprecated_features.result
@@ -5,7 +5,7 @@ ERROR HY000: Unknown system variable 'table_type'
select @@table_type='MyISAM';
ERROR HY000: Unknown system variable 'table_type'
backup table t1 to 'data.txt';
-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 'backup table t1 to 'data.txt'' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'table t1 to 'data.txt'' at line 1
restore table t1 from 'data.txt';
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 'restore table t1 from 'data.txt'' at line 1
show plugin;
diff --git a/mysql-test/main/derived.result b/mysql-test/main/derived.result
index c3421a288a1..3c995d95a01 100644
--- a/mysql-test/main/derived.result
+++ b/mysql-test/main/derived.result
@@ -643,7 +643,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t1 system NULL NULL NULL NULL 1 100.00
Warnings:
Note 1276 Field or reference 'sq.f2' of SELECT #3 was resolved in SELECT #1
-Note 1003 /* select#1 */ select 6 AS `f1` from <materialize> (/* select#4 */ select `test`.`t2`.`f3` from `test`.`t2` having `test`.`t2`.`f3` >= 8) semi join (`test`.`t2`) where `test`.`t2`.`f3` = 6 and `<subquery4>`.`f3` = 9
+Note 1003 /* select#1 */ select 6 AS `f1` from <materialize> (/* select#4 */ select `test`.`t2`.`f3` from `test`.`t2` having `test`.`t2`.`f3` >= 8) semi join (`test`.`t2`) where `<subquery4>`.`f3` = 9 and `test`.`t2`.`f3` = 6
DROP TABLE t2,t1;
#
# MDEV-9462: Out of memory using explain on 2 empty tables
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result
index ebe0c2298fd..2c2d959a953 100644
--- a/mysql-test/main/derived_cond_pushdown.result
+++ b/mysql-test/main/derived_cond_pushdown.result
@@ -137,7 +137,7 @@ EXPLAIN
"attached_condition": "v1.max_c > 214"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "t2.a > v1.a",
"materialized": {
@@ -292,7 +292,7 @@ EXPLAIN
"attached_condition": "v1.max_c > 400 or v1.max_c < 135"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.max_c > 400 and t2.a > v1.a or v1.max_c < 135 and t2.a < v1.a",
"materialized": {
@@ -360,7 +360,7 @@ EXPLAIN
"attached_condition": "v1.max_c > 300 or v1.max_c < 135"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.b = t2.b and v1.max_c > 300 and v1.avg_c > t2.d or v1.a = t2.a and v1.max_c < 135 and v1.max_c < t2.c",
"materialized": {
@@ -417,7 +417,7 @@ EXPLAIN
"attached_condition": "v1.a > 6"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "t2.b > v1.b",
"materialized": {
@@ -484,7 +484,7 @@ EXPLAIN
"attached_condition": "v2.b > 25"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "t2.a < v2.a",
"materialized": {
@@ -572,7 +572,7 @@ EXPLAIN
"attached_condition": "v1.a > 7 or v1.a < 2"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a > 7 and t2.c < v1.max_c or v1.a < 2 and t2.b < v1.b",
"materialized": {
@@ -653,7 +653,7 @@ EXPLAIN
"attached_condition": "v2.a > 7 or v2.a > 5"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v2.a > 7 and t2.c < v2.max_c or v2.a > 5 and t2.b < v2.b",
"materialized": {
@@ -720,7 +720,7 @@ EXPLAIN
"attached_condition": "v1.a > 4 or v1.a < 2"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a > 4 and v1.b > t2.b and v1.max_c = t2.d or v1.a < 2 and v1.max_c < t2.c and v1.max_c = t2.d",
"materialized": {
@@ -780,7 +780,7 @@ EXPLAIN
"attached_condition": "v1.a < 2 and v1.max_c > 400"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "t2.b > v1.b",
"materialized": {
@@ -992,7 +992,7 @@ EXPLAIN
"attached_condition": "v1.a > 7 and v1.max_c > 300 or v1.a < 4 and v1.max_c < 500"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a > 7 and v1.max_c > 300 and t2.c < v1.max_c or v1.a < 4 and v1.max_c < 500 and t2.b < v1.b",
"materialized": {
@@ -1081,7 +1081,7 @@ EXPLAIN
"attached_condition": "v1.a < 2 and v1.max_c > 120 or v1.a > 7"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a < 2 and v1.max_c > 120 or v1.a > 7",
"materialized": {
@@ -1159,7 +1159,7 @@ EXPLAIN
"attached_condition": "v1.a < 2 and v1.max_c > 120 or v1.a > 7"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.b = t2.b and v1.a < 2 and v1.max_c > 120 or v1.a > 7",
"materialized": {
@@ -1226,7 +1226,7 @@ EXPLAIN
"attached_condition": "v1.a < 2 and v1.max_c < 200 or v1.a > 4"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a < 2 and v1.max_c < 200 and t2.c > v1.max_c and v1.max_c = t2.d or v1.max_c = t2.c and v1.a > 4 and t2.c < 500 and t2.b < v1.b",
"materialized": {
@@ -1303,7 +1303,7 @@ EXPLAIN
"attached_condition": "v1.max_c > 400 or v1.max_c < 135"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.max_c > 400 and t2.a > v1.a or v1.max_c < 135 and t2.a < v1.a",
"materialized": {
@@ -1346,7 +1346,7 @@ EXPLAIN
"attached_condition": "v1.max_c > 400 or v1.max_c < 135"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.max_c > 400 and t2.a > v1.a or v1.max_c < 135 and t2.a < v1.a",
"materialized": {
@@ -1685,7 +1685,7 @@ EXPLAIN
"attached_condition": "v1.a = 3 and v1.b = 3"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -1735,7 +1735,7 @@ EXPLAIN
"attached_condition": "v1.a = 1 and v1.b = 21"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -1808,7 +1808,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "220",
"join_type": "BNL",
"attached_condition": "t.b = v.b or v.max_c > 20"
}
@@ -1932,7 +1932,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a = t2.a and t2.a < 4 or v1.max_c = t2.c and t2.c > 150",
"materialized": {
@@ -2062,7 +2062,7 @@ EXPLAIN
"attached_condition": "v1.a = 8 and v1.max_c = 404"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -2360,7 +2360,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "162",
"join_type": "BNL"
}
}
@@ -2472,7 +2472,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -2599,7 +2599,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a = t2.a or v1.b = t2.b and (v1.a = 1 or v1.a = 6)",
"materialized": {
@@ -2694,7 +2694,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a = 1 or v1.b = 21 or t2.a = 2",
"materialized": {
@@ -2762,7 +2762,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a < t2.a or t2.a < 11",
"materialized": {
@@ -2944,7 +2944,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.b is not null",
"materialized": {
@@ -3039,7 +3039,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a = t2.a or t2.c < 115",
"materialized": {
@@ -3068,7 +3068,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "incremental",
- "buffer_size": "256Kb",
+ "buffer_size": "4Kb",
"join_type": "BNL",
"attached_condition": "v1.a = t2.a and v2.a = t2.a or v2.b > 13 and t2.c < 115",
"materialized": {
@@ -3139,7 +3139,7 @@ EXPLAIN
"attached_condition": "v1.max_c < 300"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -3168,7 +3168,7 @@ EXPLAIN
"attached_condition": "v2.b < 50 or v2.b = 19"
},
"buffer_type": "incremental",
- "buffer_size": "256Kb",
+ "buffer_size": "4Kb",
"join_type": "BNL",
"attached_condition": "(v2.a = v1.a or v1.a = t2.a) and (v2.b < 50 or v2.b = 19)",
"materialized": {
@@ -3318,7 +3318,7 @@ EXPLAIN
"attached_condition": "v1.a = 1 and v1.b > 10"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.b is not null",
"materialized": {
@@ -3436,7 +3436,7 @@ EXPLAIN
"attached_condition": "t.a = 'b'"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "220",
"join_type": "BNL"
}
}
@@ -3545,7 +3545,7 @@ EXPLAIN
"attached_condition": "v2.max_c > 300"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "715",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -3575,7 +3575,7 @@ EXPLAIN
"attached_condition": "v1.max_c < 500"
},
"buffer_type": "incremental",
- "buffer_size": "256Kb",
+ "buffer_size": "9Kb",
"join_type": "BNL",
"attached_condition": "v1.a = v2.a or v1.a = t2.a",
"materialized": {
@@ -3791,7 +3791,7 @@ EXPLAIN
"attached_condition": "v1.avg_c < 400 or v1.a > 1"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "(v1.avg_c < 400 or v1.a > 1) and v1.a is not null and v1.b is not null",
"materialized": {
@@ -3936,7 +3936,7 @@ EXPLAIN
"attached_condition": "(v1.a = 1 or v1.max_c < 300) and v1.b > 25"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a = 1 or v1.max_c < 300",
"materialized": {
@@ -4129,7 +4129,7 @@ EXPLAIN
"attached_condition": "v1.max_c > 100 and v1.a > 7"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -4230,7 +4230,7 @@ EXPLAIN
"attached_condition": "v1.b = 19 and v1.a < 5"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -4272,7 +4272,7 @@ EXPLAIN
"attached_condition": "v1.max_c > 400 or v1.avg_c > 270"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "(v1.max_c > 400 or v1.avg_c > 270) and v1.a < t2.a",
"materialized": {
@@ -4384,7 +4384,7 @@ EXPLAIN
"attached_condition": "v1.a = 1 or v1.a = 6"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "(v1.a = t2.a or v1.b = t2.b) and (v1.a = 1 or v1.a = 6)",
"materialized": {
@@ -4427,7 +4427,7 @@ EXPLAIN
"attached_condition": "v1.a > 3 and v1.b > 27 or v1.max_c > 550"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.a > 3 and v1.b > 27 or v1.max_c > 550",
"materialized": {
@@ -4541,7 +4541,7 @@ EXPLAIN
"attached_condition": "v1.a = 1 and (v1.max_c < 500 or v1.avg_c > 500)"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v1.max_c < 500 or v1.avg_c > 500",
"materialized": {
@@ -4585,7 +4585,7 @@ EXPLAIN
"attached_condition": "v2.b > 10"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v2.a < t2.b or v2.max_c > 200",
"materialized": {
@@ -4707,7 +4707,7 @@ EXPLAIN
"attached_condition": "v_union.a < 3 and v_union.c > 100"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -4815,7 +4815,7 @@ EXPLAIN
"attached_condition": "(v_union.a < 2 or v_union.c > 800) and v_union.b > 12"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "v_union.a < 2 or v_union.c > 800",
"materialized": {
@@ -4912,7 +4912,7 @@ EXPLAIN
"attached_condition": "v_union.a = 1 and v_union.c < 200"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -5079,7 +5079,7 @@ EXPLAIN
"attached_condition": "v1.a = 1"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -5109,7 +5109,7 @@ EXPLAIN
"attached_condition": "v_union.a = 1"
},
"buffer_type": "incremental",
- "buffer_size": "256Kb",
+ "buffer_size": "4Kb",
"join_type": "BNL",
"attached_condition": "v_union.c > 800 or v1.max_c > 200",
"materialized": {
@@ -5924,7 +5924,7 @@ EXPLAIN
"attached_condition": "v1.a > 5 and v1.b > 12"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "333",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -6307,7 +6307,7 @@ EXPLAIN
"attached_condition": "v4.b > 10 and v4.a > 1 or v4.b < 20"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "238",
"join_type": "BNL",
"attached_condition": "(v4.b > 10 and v4.a > 1 or v4.b < 20) and v4.a is not null",
"materialized": {
@@ -6452,7 +6452,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "333",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -6972,7 +6972,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "715",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -7767,7 +7767,7 @@ EXPLAIN
"attached_condition": "v2.pk > 2"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -7779,7 +7779,7 @@ EXPLAIN
"key": "PRIMARY",
"key_length": "4",
"used_key_parts": ["pk"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"index_condition": "t.pk > 2"
}
@@ -8219,12 +8219,10 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "<subquery2>",
- "access_type": "system",
- "rows": 1,
- "filtered": 100,
- "materialized": {
- "unique": 1,
+ "message": "Impossible WHERE"
+ },
+ "subqueries": [
+ {
"query_block": {
"select_id": 2,
"table": {
@@ -8232,26 +8230,7 @@ EXPLAIN
}
}
}
- },
- "table": {
- "table_name": "<derived3>",
- "access_type": "ALL",
- "rows": 2,
- "filtered": 100,
- "attached_condition": "v1.c = NULL",
- "materialized": {
- "query_block": {
- "select_id": 3,
- "table": {
- "table_name": "t1",
- "access_type": "ALL",
- "rows": 2,
- "filtered": 100,
- "attached_condition": "t1.c = NULL"
- }
- }
- }
- }
+ ]
}
}
DROP VIEW v1;
@@ -8764,7 +8743,7 @@ EXPLAIN
"attached_condition": "v2.i2 = 1"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -8880,7 +8859,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "163",
"join_type": "BNL",
"attached_condition": "t1.id2 = vc.id2"
}
@@ -8953,18 +8932,18 @@ EXPLAIN
"attached_condition": "v1.a = 1 and v1.b = 1 and v1.max_c > 30"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"materialized": {
"query_block": {
"select_id": 2,
- "having_condition": "max_c > 37 and max_c > 30 and t1.b = 1",
+ "having_condition": "max_c > 37 and max_c > 30",
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 3,
"filtered": 100,
- "attached_condition": "t1.a = 1"
+ "attached_condition": "t1.a = 1 and t1.b = 1"
}
}
}
@@ -9028,18 +9007,18 @@ EXPLAIN
"attached_condition": "v1.a = 1 and v1.b = 1 and v1.d = 1 and v1.max_c > 30"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"materialized": {
"query_block": {
"select_id": 2,
- "having_condition": "max_c > 37 and max_c > 30 and t1.b = 1",
+ "having_condition": "max_c > 37 and max_c > 30",
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 3,
"filtered": 100,
- "attached_condition": "t1.a = 1 and t1.d = 1"
+ "attached_condition": "t1.a = 1 and t1.b = 1 and t1.d = 1"
}
}
}
@@ -9574,7 +9553,7 @@ EXPLAIN
"materialized": {
"query_block": {
"select_id": 2,
- "having_condition": "t1.a < 3 and a > 1",
+ "having_condition": "a > 1",
"filesort": {
"sort_key": "t1.a",
"temporary_table": {
@@ -9582,7 +9561,8 @@ EXPLAIN
"table_name": "t1",
"access_type": "ALL",
"rows": 3,
- "filtered": 100
+ "filtered": 100,
+ "attached_condition": "t1.a < 3"
}
}
}
@@ -9759,7 +9739,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"attached_condition": "t1.a = dt1.a"
}
@@ -9818,7 +9798,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"attached_condition": "t1.a = dt.a"
}
@@ -10270,9 +10250,9 @@ EXPLAIN INSERT INTO t1
SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ) AS t WHERE f IS NOT NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 144 Using where
-2 DERIVED <derived3> ALL NULL NULL NULL NULL 12
+2 DERIVED <derived4> ALL NULL NULL NULL NULL 12
2 DERIVED t1 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join)
-3 DERIVED t1 ALL NULL NULL NULL NULL 12
+4 DERIVED t1 ALL NULL NULL NULL NULL 12
EXPLAIN FORMAT=JSON INSERT INTO t1
SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ) AS t WHERE f IS NOT NULL;
EXPLAIN
@@ -10289,13 +10269,13 @@ EXPLAIN
"query_block": {
"select_id": 2,
"table": {
- "table_name": "<derived3>",
+ "table_name": "<derived4>",
"access_type": "ALL",
"rows": 12,
"filtered": 100,
"materialized": {
"query_block": {
- "select_id": 3,
+ "select_id": 4,
"table": {
"table_name": "t1",
"access_type": "ALL",
@@ -10314,7 +10294,7 @@ EXPLAIN
"attached_condition": "t1.f is not null"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "64",
"join_type": "BNL"
}
}
@@ -10365,7 +10345,7 @@ EXPLAIN
"attached_condition": "t1.f is not null"
},
"table": {
- "table_name": "<derived3>",
+ "table_name": "<derived4>",
"access_type": "ref",
"possible_keys": ["key0"],
"key": "key0",
@@ -10376,7 +10356,7 @@ EXPLAIN
"filtered": 100,
"materialized": {
"query_block": {
- "select_id": 3,
+ "select_id": 4,
"table": {
"table_name": "t1",
"access_type": "ALL",
@@ -10489,7 +10469,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"attached_condition": "t1.f2 = t.f2"
}
@@ -10832,9 +10812,64 @@ EXPLAIN
}
}
}
+# Extra test for 10.4+: Check that this works for pushdown into IN
+# subqueries:
+create table t4 (a int, b int, c decimal);
+insert into t4 select a,a,a from t1;
+# The subquery must be materialized and must have
+# "attached_condition": "t1.a + 1 > 10",
+# "having_condition": "`f1(a)` > 1 and `sum(b)` > 123",
+explain format=json
+select *
+from t4
+where
+(a,b,c) in (select a, f1(a), sum(b) from t1 group by a, f1(a))
+and
+(a+1) > 10 AND b > 1 and c>123;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t4",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t4.a + 1 > 10 and t4.b > 1 and t4.c > 123 and t4.a is not null and t4.b is not null and t4.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "23",
+ "used_key_parts": ["a", "f1(a)", "sum(b)"],
+ "ref": ["test.t4.a", "test.t4.b", "test.t4.c"],
+ "rows": 1,
+ "filtered": 100,
+ "attached_condition": "t4.c = `<subquery2>`.`sum(b)`",
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`f1(a)` > 1 and `sum(b)` > 123",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t1.a + 1 > 10"
+ }
+ }
+ }
+ }
+ }
+ }
+}
drop view v2;
drop function f1;
-drop table t1;
+drop table t1, t4;
# End of 10.2 tests
#
# MDEV-14579: pushdown conditions into materialized views/derived tables
@@ -10986,7 +11021,7 @@ EXPLAIN
"attached_condition": "v1.a = 8"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -11074,7 +11109,7 @@ EXPLAIN
"attached_condition": "v1.a = 8"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -11564,7 +11599,7 @@ EXPLAIN
"attached_condition": "v1.a > 3 or v1.a = 1 and v1.c < 110"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"attached_condition": "v1.c = t2.c and v1.a > 3 and t2.c > 110 or v1.a = 1 and v1.c < 110",
"materialized": {
@@ -11576,7 +11611,7 @@ EXPLAIN
{
"query_block": {
"select_id": 2,
- "having_condition": "c < 300 and (t1.a > 3 and c > 110 or c < 110 and t1.a = 1)",
+ "having_condition": "c < 300 and (t1.a > 3 and c > 110 or t1.a = 1 and c < 110)",
"filesort": {
"sort_key": "t1.a, t1.b",
"temporary_table": {
@@ -11595,7 +11630,7 @@ EXPLAIN
"query_block": {
"select_id": 3,
"operation": "INTERSECT",
- "having_condition": "c > 100 and (t1.a > 3 and c > 110 or c < 110 and t1.a = 1)",
+ "having_condition": "c > 100 and (t1.a > 3 and c > 110 or t1.a = 1 and c < 110)",
"filesort": {
"sort_key": "t1.a, t1.b",
"temporary_table": {
@@ -11905,7 +11940,7 @@ EXPLAIN
"attached_condition": "v1.a = 6"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -11995,7 +12030,7 @@ EXPLAIN
"attached_condition": "v1.a = 6"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"materialized": {
"query_block": {
@@ -12489,7 +12524,7 @@ EXPLAIN
"attached_condition": "v1.a > 1 or v1.a = 1 and v1.c > 500"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"attached_condition": "v1.c = t2.c and v1.a > 1 and t2.c < 500 or v1.a = 1 and v1.c > 500",
"materialized": {
@@ -12501,7 +12536,7 @@ EXPLAIN
{
"query_block": {
"select_id": 2,
- "having_condition": "c > 200 and (t1.a > 1 and c < 500 or c > 500 and t1.a = 1)",
+ "having_condition": "c > 200 and (t1.a > 1 and c < 500 or t1.a = 1 and c > 500)",
"filesort": {
"sort_key": "t1.a, t1.b",
"temporary_table": {
@@ -12520,7 +12555,7 @@ EXPLAIN
"query_block": {
"select_id": 3,
"operation": "EXCEPT",
- "having_condition": "c < 300 and (t1.a > 1 and c < 500 or c > 500 and t1.a = 1)",
+ "having_condition": "c < 300 and (t1.a > 1 and c < 500 or t1.a = 1 and c > 500)",
"filesort": {
"sort_key": "t1.a, t1.b",
"temporary_table": {
@@ -12773,7 +12808,7 @@ EXPLAIN
"access_type": "ALL",
"rows": 18,
"filtered": 100,
- "attached_condition": "__3.a > 5 and __3.c > 200",
+ "attached_condition": "__5.a > 5 and __5.c > 200",
"materialized": {
"query_block": {
"union_result": {
@@ -13399,7 +13434,7 @@ EXPLAIN
"access_type": "ALL",
"rows": 18,
"filtered": 100,
- "attached_condition": "__3.a > 4 and __3.c < 130",
+ "attached_condition": "__5.a > 4 and __5.c < 130",
"materialized": {
"query_block": {
"union_result": {
@@ -13545,7 +13580,7 @@ EXPLAIN
"access_type": "ALL",
"rows": 18,
"filtered": 100,
- "attached_condition": "__3.a > 4 and __3.c < 130",
+ "attached_condition": "__6.a > 4 and __6.c < 130",
"materialized": {
"query_block": {
"union_result": {
@@ -14302,16 +14337,16 @@ a b max_c a b c
1 21 345 3 21 231
select * from v1,t2 where (v1.b=t2.b) and (v1.a<5);
a b max_c a b c
-1 21 345 3 21 231
2 33 7 5 33 207
-2 33 7 8 33 117
-3 21 500 3 21 231
4 33 123 5 33 207
+2 33 7 8 33 117
4 33 123 8 33 117
+1 21 345 3 21 231
+3 21 500 3 21 231
explain select * from v1,t2 where (v1.b=t2.b) and (v1.a<5);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 9
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where; Using join buffer (flat, BNL join)
2 DERIVED t3 range i1 i1 5 NULL 5 Using index condition
explain format=json select * from v1,t2 where (v1.b=t2.b) and (v1.a<5);
EXPLAIN
@@ -14319,23 +14354,11 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "t2",
+ "table_name": "<derived2>",
"access_type": "ALL",
- "rows": 9,
- "filtered": 100
- },
- "block-nl-join": {
- "table": {
- "table_name": "<derived2>",
- "access_type": "ALL",
- "rows": 5,
- "filtered": 80,
- "attached_condition": "v1.a < 5"
- },
- "buffer_type": "flat",
- "buffer_size": "256Kb",
- "join_type": "BNL",
- "attached_condition": "v1.b = t2.b",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "v1.a < 5",
"materialized": {
"query_block": {
"select_id": 2,
@@ -14352,6 +14375,18 @@ EXPLAIN
}
}
}
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "173",
+ "join_type": "BNL",
+ "attached_condition": "t2.b = v1.b"
}
}
}
@@ -14445,7 +14480,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "173",
"join_type": "BNL",
"attached_condition": "t2.b = v1.b"
}
@@ -15271,7 +15306,9 @@ insert into t2 values
insert into t2 select a+10, b+10, concat(c,'f') from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
set statement optimizer_switch='split_materialized=off' for select t1.a,t.s,t.m
from t1 join
@@ -15301,7 +15338,7 @@ where t1.b < 3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 range idx_b idx_b 5 NULL 4 100.00 Using index condition; Using where
1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2 100.00
-2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 2 100.00
+2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 1 100.00
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`s` AS `s`,`t`.`m` AS `m` from `test`.`t1` join (/* select#2 */ select `test`.`t2`.`a` AS `a`,sum(`test`.`t2`.`b`) AS `s`,min(`test`.`t2`.`c`) AS `m` from `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` group by `test`.`t2`.`a`) `t` where `t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`b` < 3
explain format=json select t1.a,t.s,t.m
@@ -15348,7 +15385,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t1.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100
}
}
@@ -15410,11 +15447,11 @@ from t1 join
on t1.a=t.a
where t1.b <= 5;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL idx_b NULL NULL NULL 12 75.00 Using where
-1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 9 100.00
-2 DERIVED t2 ALL idx_a NULL NULL NULL 90 100.00 Using temporary; Using filesort
+1 PRIMARY t1 ALL idx_b NULL NULL NULL 12 83.33 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2 100.00
+2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 1 100.00
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`s` AS `s`,`t`.`m` AS `m` from `test`.`t1` join (/* select#2 */ select `test`.`t2`.`a` AS `a`,sum(`test`.`t2`.`b`) AS `s`,min(`test`.`t2`.`b`) AS `m` from `test`.`t2` group by `test`.`t2`.`a`) `t` where `t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`b` <= 5
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`s` AS `s`,`t`.`m` AS `m` from `test`.`t1` join (/* select#2 */ select `test`.`t2`.`a` AS `a`,sum(`test`.`t2`.`b`) AS `s`,min(`test`.`t2`.`b`) AS `m` from `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` group by `test`.`t2`.`a`) `t` where `t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`b` <= 5
explain format=json select t1.a,t.s,t.m
from t1 join
(select a, sum(t2.b) as s, min(t2.b) as m from t2 group by t2.a) t
@@ -15429,7 +15466,7 @@ EXPLAIN
"access_type": "ALL",
"possible_keys": ["idx_b"],
"rows": 12,
- "filtered": 75,
+ "filtered": 83.333,
"attached_condition": "t1.b <= 5 and t1.a is not null"
},
"table": {
@@ -15440,22 +15477,23 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t1.a"],
- "rows": 9,
+ "rows": 2,
"filtered": 100,
"materialized": {
+ "lateral": 1,
"query_block": {
"select_id": 2,
- "filesort": {
- "sort_key": "t2.a",
- "temporary_table": {
- "table": {
- "table_name": "t2",
- "access_type": "ALL",
- "possible_keys": ["idx_a"],
- "rows": 90,
- "filtered": 100
- }
- }
+ "outer_ref_condition": "t1.a is not null",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ref",
+ "possible_keys": ["idx_a"],
+ "key": "idx_a",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t1.a"],
+ "rows": 1,
+ "filtered": 100
}
}
}
@@ -15514,11 +15552,11 @@ from t1 left join
(select a, max(t2.b) max, min(t2.b) min from t2 group by t2.a) t
on t1.a=t.a;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
-1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2 100.00 Using where
-2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 2 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 12 100.00
+1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 9 100.00 Using where
+2 DERIVED t2 ALL idx_a NULL NULL NULL 90 100.00 Using temporary; Using filesort
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`max` AS `max`,`t`.`min` AS `min` from `test`.`t1` left join (/* select#2 */ select `test`.`t2`.`a` AS `a`,max(`test`.`t2`.`b`) AS `max`,min(`test`.`t2`.`b`) AS `min` from `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` group by `test`.`t2`.`a`) `t` on(`t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` is not null) where 1
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`max` AS `max`,`t`.`min` AS `min` from `test`.`t1` left join (/* select#2 */ select `test`.`t2`.`a` AS `a`,max(`test`.`t2`.`b`) AS `max`,min(`test`.`t2`.`b`) AS `min` from `test`.`t2` group by `test`.`t2`.`a`) `t` on(`t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` is not null) where 1
explain format=json select t1.a,t.max,t.min
from t1 left join
(select a, max(t2.b) max, min(t2.b) min from t2 group by t2.a) t
@@ -15531,7 +15569,7 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
- "rows": 4,
+ "rows": 12,
"filtered": 100
},
"table": {
@@ -15542,24 +15580,23 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t1.a"],
- "rows": 2,
+ "rows": 9,
"filtered": 100,
"attached_condition": "trigcond(trigcond(t1.a is not null))",
"materialized": {
- "lateral": 1,
"query_block": {
"select_id": 2,
- "outer_ref_condition": "t1.a is not null",
- "table": {
- "table_name": "t2",
- "access_type": "ref",
- "possible_keys": ["idx_a"],
- "key": "idx_a",
- "key_length": "5",
- "used_key_parts": ["a"],
- "ref": ["test.t1.a"],
- "rows": 2,
- "filtered": 100
+ "filesort": {
+ "sort_key": "t2.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "possible_keys": ["idx_a"],
+ "rows": 90,
+ "filtered": 100
+ }
+ }
}
}
}
@@ -15580,7 +15617,9 @@ insert into t4 values
insert into t4 select a+10, b+10, concat(c,'f') from t4;
analyze table t3,t4;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
set statement optimizer_switch='split_materialized=off' for select t3.a,t3.c,t.max,t.min
from t3 join
@@ -15604,7 +15643,7 @@ from t3 join
on t3.a=t.a and t3.c=t.c
where t3.b > 15;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t3 range idx_b idx_b 5 NULL 3 100.00 Using index condition; Using where
+1 PRIMARY t3 range idx_b idx_b 5 NULL 2 100.00 Using index condition; Using where
1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 2 100.00
2 LATERAL DERIVED t4 ref idx idx 133 test.t3.a,test.t3.c 1 100.00
Warnings:
@@ -15625,7 +15664,7 @@ EXPLAIN
"key": "idx_b",
"key_length": "5",
"used_key_parts": ["b"],
- "rows": 3,
+ "rows": 2,
"filtered": 100,
"index_condition": "t3.b > 15",
"attached_condition": "t3.a is not null and t3.c is not null"
@@ -15683,7 +15722,7 @@ from t3 join
on t3.a=t.a and t3.c=t.c
where t3.b <= 15;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t3 ALL idx_b NULL NULL NULL 12 75.00 Using where
+1 PRIMARY t3 ALL idx_b NULL NULL NULL 12 83.33 Using where
1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 4 100.00
2 DERIVED t4 ALL idx NULL NULL NULL 40 100.00 Using temporary; Using filesort
Warnings:
@@ -15702,7 +15741,7 @@ EXPLAIN
"access_type": "ALL",
"possible_keys": ["idx_b"],
"rows": 12,
- "filtered": 75,
+ "filtered": 83.333,
"attached_condition": "t3.b <= 15 and t3.a is not null and t3.c is not null"
},
"table": {
@@ -15757,7 +15796,7 @@ from t3 join
on t3.a=t.a and t3.c=t.c
where t3.b > 15;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t3 range idx_b idx_b 5 NULL 3 100.00 Using index condition; Using where
+1 PRIMARY t3 range idx_b idx_b 5 NULL 2 100.00 Using index condition; Using where
1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 2 100.00
2 LATERAL DERIVED t4 ref idx idx 133 test.t3.a,test.t3.c 1 100.00
Warnings:
@@ -15778,7 +15817,7 @@ EXPLAIN
"key": "idx_b",
"key_length": "5",
"used_key_parts": ["b"],
- "rows": 3,
+ "rows": 2,
"filtered": 100,
"index_condition": "t3.b > 15",
"attached_condition": "t3.a is not null and t3.c is not null"
@@ -15836,7 +15875,7 @@ from t3 join
on t3.a=t.a and t3.c=t.c
where t3.b <= 15;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t3 ALL idx_b NULL NULL NULL 12 75.00 Using where
+1 PRIMARY t3 ALL idx_b NULL NULL NULL 12 83.33 Using where
1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 4 100.00
2 DERIVED t4 ALL idx NULL NULL NULL 40 100.00 Using temporary; Using filesort
Warnings:
@@ -15855,7 +15894,7 @@ EXPLAIN
"access_type": "ALL",
"possible_keys": ["idx_b"],
"rows": 12,
- "filtered": 75,
+ "filtered": 83.333,
"attached_condition": "t3.b <= 15 and t3.a is not null and t3.c is not null"
},
"table": {
@@ -15898,8 +15937,11 @@ insert into t4 select a+100, b+100, concat(c,'g') from t4;
insert into t4 select a+1000, b+1000, concat(c,'h') from t4;
analyze table t2,t3,t4;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
set statement optimizer_switch='split_materialized=off' for select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min
from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t
@@ -15920,9 +15962,9 @@ from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t
where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 range idx idx 133 NULL 2 100.00 Using index condition; Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 2 100.00
-2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 3 100.00
+2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 2 100.00
Warnings:
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`t`.`c` AS `t_c`,`t`.`max` AS `max`,`t`.`min` AS `min` from `test`.`t2` join `test`.`t3` join (/* select#2 */ select `test`.`t4`.`c` AS `c`,max(`test`.`t4`.`b`) AS `max`,min(`test`.`t4`.`b`) AS `min` from `test`.`t4` where `test`.`t4`.`c` = `test`.`t3`.`c` group by `test`.`t4`.`c`) `t` where `test`.`t3`.`a` = `test`.`t2`.`a` and `t`.`c` = `test`.`t3`.`c` and `test`.`t2`.`b` between 80 and 85 and `test`.`t2`.`c` in ('y','z')
explain format=json select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min
@@ -15952,7 +15994,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -15979,7 +16021,7 @@ EXPLAIN
"key_length": "128",
"used_key_parts": ["c"],
"ref": ["test.t3.c"],
- "rows": 3,
+ "rows": 2,
"filtered": 100
}
}
@@ -16067,8 +16109,8 @@ explain extended select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min
from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t
where t2.b < 40 and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 90 100.00 Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 90 63.28 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 10 100.00
2 DERIVED t4 ALL idx_c NULL NULL NULL 160 100.00 Using temporary; Using filesort
Warnings:
@@ -16084,7 +16126,7 @@ EXPLAIN
"table_name": "t2",
"access_type": "ALL",
"rows": 90,
- "filtered": 100,
+ "filtered": 63.281,
"attached_condition": "t2.b < 40 and t2.a is not null"
},
"table": {
@@ -16095,7 +16137,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -16168,9 +16210,9 @@ from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t
where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 range idx idx 133 NULL 2 100.00 Using index condition; Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 2 100.00
-2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 3 100.00 Using temporary
+2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 2 100.00 Using temporary
Warnings:
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`t`.`c` AS `c`,`t`.`b` AS `b`,`t`.`sum(b) over (partition by c)` AS `sum(b) over (partition by c)` from `test`.`t2` join `test`.`t3` join (/* select#2 */ select `test`.`t4`.`c` AS `c`,`test`.`t4`.`b` AS `b`,sum(`test`.`t4`.`b`) over ( partition by `test`.`t4`.`c`) AS `sum(b) over (partition by c)` from `test`.`t4` where `test`.`t4`.`c` = `test`.`t3`.`c`) `t` where `test`.`t3`.`a` = `test`.`t2`.`a` and `t`.`c` = `test`.`t3`.`c` and `test`.`t2`.`b` between 80 and 85 and `test`.`t2`.`c` in ('y','z')
explain format=json select *
@@ -16200,7 +16242,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -16234,7 +16276,7 @@ EXPLAIN
"key_length": "128",
"used_key_parts": ["c"],
"ref": ["test.t3.c"],
- "rows": 3,
+ "rows": 2,
"filtered": 100
}
}
@@ -16564,8 +16606,8 @@ explain extended select *
from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t
where t2.b < 40 and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 90 100.00 Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 90 63.28 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 10 100.00
2 DERIVED t4 ALL idx_c NULL NULL NULL 160 100.00 Using temporary
Warnings:
@@ -16581,7 +16623,7 @@ EXPLAIN
"table_name": "t2",
"access_type": "ALL",
"rows": 90,
- "filtered": 100,
+ "filtered": 63.281,
"attached_condition": "t2.b < 40 and t2.a is not null"
},
"table": {
@@ -16592,7 +16634,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -16648,9 +16690,13 @@ INSERT INTO t4 VALUES
(5,'zzz'),(9,'xyz'),(2,'yxz'),(5,'zxy'),(7,'zyx') ;
ANALYZE TABLE t1,t2,t3,t4;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
CREATE VIEW v1 AS
SELECT c FROM t3
@@ -16744,7 +16790,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"attached_condition": "t2.i = t1.i and t2.i = t1.i"
}
@@ -16964,7 +17010,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED a2 eq_ref PRIMARY PRIMARY 4 a1.f 1 100.00 Using index
4 DERIVED t1 index PRIMARY PRIMARY 4 NULL 7 100.00 Using index; Using temporary; Using filesort
Warnings:
-Note 1003 /* select#1 */ select `s`.`f` AS `f`,`s`.`c` AS `c` from (/* select#2 */ select straight_join `a2`.`f` AS `f`,count(0) AS `c` from ((/* select#4 */ select `test`.`t1`.`f` AS `f`,count(0) AS `c` from `test`.`t1` group by `test`.`t1`.`f`)) `a1` join `test`.`t1` `a2` where `a2`.`f` = `a1`.`f` group by `a2`.`f`) `s`
+Note 1003 /* select#1 */ select `s`.`f` AS `f`,`s`.`c` AS `c` from (/* select#2 */ select straight_join `a2`.`f` AS `f`,count(0) AS `c` from (/* select#4 */ select `test`.`t1`.`f` AS `f`,count(0) AS `c` from `test`.`t1` group by `test`.`t1`.`f`) `a1` join `test`.`t1` `a2` where `a2`.`f` = `a1`.`f` group by `a2`.`f`) `s`
SELECT * FROM ( SELECT STRAIGHT_JOIN f, COUNT(*) as c FROM v1 GROUP BY f ) AS s;
f c
1 1
@@ -16994,8 +17040,11 @@ INSERT INTO t3 VALUES
(3), (4), (1), (8), (3);
ANALYZE tables t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SELECT *
FROM t3,
@@ -17025,7 +17074,7 @@ WHERE t3.d = dt.b;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 5 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 5 test.t3.d 2 100.00
-2 LATERAL DERIVED t1 ref idx_b idx_b 5 test.t3.d 2 100.00 Using index; Using temporary; Using filesort
+2 LATERAL DERIVED t1 ref idx_b idx_b 5 test.t3.d 1 100.00 Using index; Using temporary; Using filesort
2 LATERAL DERIVED t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join)
Warnings:
Note 1003 /* select#1 */ select `test`.`t3`.`d` AS `d`,`dt`.`b` AS `b`,`dt`.`c` AS `c` from `test`.`t3` join (/* select#2 */ select `test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`b` = `test`.`t3`.`d` group by `test`.`t1`.`b`,`test`.`t2`.`c`) `dt` where `dt`.`b` = `test`.`t3`.`d`
@@ -17326,8 +17375,11 @@ create table t3 (id int) engine=myisam;
insert into t3 values (1),(2);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
set optimizer_switch="split_materialized=off";
select * from t1, (select a from t1 cp2 group by a) dt, t3
@@ -17595,8 +17647,11 @@ INSERT INTO t3 VALUES
(350,0,2304,2020,3),(351,0,3896,2020,3);
ANALYZE TABLE t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
set optimizer_switch='split_materialized=on';
SELECT t1.id
@@ -17615,7 +17670,7 @@ JOIN (SELECT t1_id FROM t2 WHERE reporting_person = 1 GROUP BY t1_id) tx
ON tx.t1_id = t1.id
WHERE t1.id BETWEEN 200 AND 100000;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 range t1_id t1_id 5 NULL 46 Using where; Using index
+1 PRIMARY t3 index t1_id t1_id 15 NULL 47 Using where; Using index
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t3.t1_id 1 Using index
1 PRIMARY <derived2> ref key0 key0 5 test.t3.t1_id 2
2 LATERAL DERIVED t2 ref t1_id t1_id 5 test.t1.id 3 Using index condition; Using where
@@ -17632,12 +17687,12 @@ EXPLAIN
"select_id": 1,
"table": {
"table_name": "t3",
- "access_type": "range",
+ "access_type": "index",
"possible_keys": ["t1_id"],
"key": "t1_id",
- "key_length": "5",
- "used_key_parts": ["t1_id"],
- "rows": 46,
+ "key_length": "15",
+ "used_key_parts": ["t1_id", "YEAR", "quarter"],
+ "rows": 47,
"filtered": 100,
"attached_condition": "t3.t1_id between 200 and 100000 and t3.t1_id is not null",
"using_index": true
@@ -17677,7 +17732,7 @@ EXPLAIN
"used_key_parts": ["t1_id"],
"ref": ["test.t1.id"],
"rows": 3,
- "filtered": 100,
+ "filtered": 58.594,
"index_condition": "t2.t1_id between 200 and 100000 and t2.t1_id = t3.t1_id",
"attached_condition": "t2.reporting_person = 1"
}
@@ -17762,9 +17817,13 @@ INSERT INTO transaction_items (id, transaction_id, charge_id, amount) VALUES
(40, 40, 20, 990);
ANALYZE TABLE ledgers, charges, transactions, transaction_items;
Table Op Msg_type Msg_text
+test.ledgers analyze status Engine-independent statistics collected
test.ledgers analyze status OK
+test.charges analyze status Engine-independent statistics collected
test.charges analyze status OK
+test.transactions analyze status Engine-independent statistics collected
test.transactions analyze status OK
+test.transaction_items analyze status Engine-independent statistics collected
test.transaction_items analyze status OK
set optimizer_switch='split_materialized=on';
SELECT
@@ -17813,7 +17872,7 @@ ON from_agg_items.charge_id = charges.id AND
from_agg_items.ledger_id = charges.from_ledger_id
WHERE charges.to_ledger_id = 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY charges ref PRIMARY,fk_charge_from_ledger,fk_charge_to_ledger fk_charge_to_ledger 8 const 7
+1 PRIMARY charges ref PRIMARY,fk_charge_from_ledger,fk_charge_to_ledger fk_charge_to_ledger 8 const 8
1 PRIMARY <derived2> ref key0 key0 17 test.charges.from_ledger_id,test.charges.id 2
2 LATERAL DERIVED transaction_items ref fk_items_transaction,fk_items_charge fk_items_charge 9 test.charges.id 2
2 LATERAL DERIVED transactions eq_ref PRIMARY,fk_transactions_ledger PRIMARY 8 test.transaction_items.transaction_id 1 Using where
@@ -17847,7 +17906,7 @@ EXPLAIN
"key_length": "8",
"used_key_parts": ["to_ledger_id"],
"ref": ["const"],
- "rows": 7,
+ "rows": 8,
"filtered": 100
},
"table": {
@@ -17939,7 +17998,7 @@ ON from_agg_items.charge_id = charges.id AND
from_agg_items.ledger_id = charges.from_ledger_id
WHERE charges.to_ledger_id = 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY charges ref PRIMARY,fk_charge_from_ledger,fk_charge_to_ledger fk_charge_to_ledger 8 const 7
+1 PRIMARY charges ref PRIMARY,fk_charge_from_ledger,fk_charge_to_ledger fk_charge_to_ledger 8 const 8
1 PRIMARY <derived2> ref key0 key0 17 test.charges.from_ledger_id,test.charges.id 4
2 DERIVED transaction_items ALL fk_items_transaction NULL NULL NULL 40 Using temporary; Using filesort
2 DERIVED transactions eq_ref PRIMARY PRIMARY 8 test.transaction_items.transaction_id 1
@@ -17994,7 +18053,7 @@ ON from_agg_items.charge_id = charges.id AND
from_agg_items.ledger_id = charges.from_ledger_id
WHERE charges.to_ledger_id = 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY charges ref fk_charge_to_ledger fk_charge_to_ledger 8 const 9
+1 PRIMARY charges ref fk_charge_to_ledger fk_charge_to_ledger 8 const 10
1 PRIMARY <derived2> ref key0 key0 18 test.charges.from_ledger_id,test.charges.id 2
2 LATERAL DERIVED transaction_items ref fk_items_transaction,fk_items_charge fk_items_charge 9 test.charges.id 2
2 LATERAL DERIVED transactions eq_ref PRIMARY,fk_transactions_ledger PRIMARY 8 test.transaction_items.transaction_id 1 Using where
@@ -18028,7 +18087,7 @@ EXPLAIN
"key_length": "8",
"used_key_parts": ["to_ledger_id"],
"ref": ["const"],
- "rows": 9,
+ "rows": 10,
"filtered": 100
},
"table": {
@@ -18122,7 +18181,7 @@ ON from_agg_items.charge_id = charges.id AND
from_agg_items.ledger_id = charges.from_ledger_id
WHERE charges.to_ledger_id = 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY charges ref fk_charge_to_ledger fk_charge_to_ledger 8 const 9
+1 PRIMARY charges ref fk_charge_to_ledger fk_charge_to_ledger 8 const 10
1 PRIMARY <derived2> ref key0 key0 18 test.charges.from_ledger_id,test.charges.id 4
2 DERIVED transaction_items ALL fk_items_transaction NULL NULL NULL 40 Using temporary; Using filesort
2 DERIVED transactions eq_ref PRIMARY PRIMARY 8 test.transaction_items.transaction_id 1
@@ -18132,3 +18191,25 @@ DROP TABLE transactions;
DROP TABLE charges;
DROP TABLE ledgers;
# End of 10.3 tests
+#
+# MDEV-18679: materialized view with SELECT S containing materialized
+# derived when impossible WHERE has been detected for S
+#
+create table t1 (pk int, f varchar(1));
+insert into t1 values
+(3,'y'), (1,'x'), (7,'z');
+create view v1 as
+select t1.f
+from t1, (select distinct * from t1) t
+where t.f = t1.f and 1 = 0
+group by t1.f;
+select * from v1;
+f
+explain select * from v1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found
+2 DERIVED NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+3 DERIVED t1 ALL NULL NULL NULL NULL 3 Using temporary
+drop view v1;
+drop table t1;
+# End of 10.4 tests
diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test
index 619d104951d..bd38716f2a6 100644
--- a/mysql-test/main/derived_cond_pushdown.test
+++ b/mysql-test/main/derived_cond_pushdown.test
@@ -2305,9 +2305,26 @@ select a, f1(a), sum(b) from t1 group by a, f1(a);
explain format=json
select * from v2 where (s+1) > 10 AND a > 1 and a2>123;
+--echo # Extra test for 10.4+: Check that this works for pushdown into IN
+--echo # subqueries:
+
+create table t4 (a int, b int, c decimal);
+insert into t4 select a,a,a from t1;
+
+--echo # The subquery must be materialized and must have
+--echo # "attached_condition": "t1.a + 1 > 10",
+--echo # "having_condition": "`f1(a)` > 1 and `sum(b)` > 123",
+explain format=json
+select *
+from t4
+where
+ (a,b,c) in (select a, f1(a), sum(b) from t1 group by a, f1(a))
+ and
+ (a+1) > 10 AND b > 1 and c>123;
+
drop view v2;
drop function f1;
-drop table t1;
+drop table t1, t4;
--echo # End of 10.2 tests
--echo #
@@ -3854,3 +3871,26 @@ DROP TABLE charges;
DROP TABLE ledgers;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-18679: materialized view with SELECT S containing materialized
+--echo # derived when impossible WHERE has been detected for S
+--echo #
+
+create table t1 (pk int, f varchar(1));
+insert into t1 values
+ (3,'y'), (1,'x'), (7,'z');
+
+create view v1 as
+select t1.f
+ from t1, (select distinct * from t1) t
+ where t.f = t1.f and 1 = 0
+group by t1.f;
+
+select * from v1;
+explain select * from v1;
+
+drop view v1;
+drop table t1;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/derived_opt.result b/mysql-test/main/derived_opt.result
index 06e727f95b7..907c97e92d4 100644
--- a/mysql-test/main/derived_opt.result
+++ b/mysql-test/main/derived_opt.result
@@ -534,7 +534,7 @@ LEFT JOIN
ON t2.id=t.id
WHERE t2.id < 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 range PRIMARY PRIMARY 4 NULL 3 Using index condition
+1 PRIMARY t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition
1 PRIMARY <derived2> ref key0 key0 5 test.t2.id 2
2 DERIVED t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort
set join_cache_level=default;
diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result
index 8162bfcdae7..04f79d3f018 100644
--- a/mysql-test/main/derived_split_innodb.result
+++ b/mysql-test/main/derived_split_innodb.result
@@ -11,6 +11,7 @@ KEY n1_c1_n2 (n1,c1,n2)
INSERT INTO t1 VALUES (0, 2, 'a'), (1, 3, 'a');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT t1.n1 FROM t1, (SELECT n1, n2 FROM t1 WHERE c1 = 'a' GROUP BY n1) as t
WHERE t.n1 = t1.n1 AND t.n2 = t1.n2 AND c1 = 'a' GROUP BY n1;
@@ -135,9 +136,9 @@ left join
on t1.f1=t.f1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t const f2 NULL NULL NULL 1 Impossible ON condition
-1 PRIMARY <derived2> const key1 NULL NULL NULL 1 Impossible ON condition
+1 PRIMARY <derived3> const key1 NULL NULL NULL 1 Impossible ON condition
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
-2 DERIVED t2 index NULL PRIMARY 4 NULL 3
+3 DERIVED t2 index NULL PRIMARY 4 NULL 3
drop view v1;
drop table t1,t2;
#
@@ -158,9 +159,9 @@ WHERE
t1.a = dt.a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a,a_2 a_2 10 NULL 6 Using where; Using index
-1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2
-2 DERIVED t1 index NULL a_2 10 NULL 6 Using where; Using index
-2 DERIVED t2 ref c c 5 test.t1.b 1 Using index
+1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2
+3 DERIVED t1 index NULL a_2 10 NULL 6 Using where; Using index
+3 DERIVED t2 ref c c 5 test.t1.b 1 Using index
set statement optimizer_switch='split_materialized=on' for EXPLAIN
SELECT *
FROM
@@ -170,9 +171,9 @@ WHERE
t1.a = dt.a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a,a_2 a_2 10 NULL 6 Using where; Using index
-1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2
-2 LATERAL DERIVED t1 ref a,a_2 a 5 test.t1.a 1 Using where; Using temporary; Using filesort
-2 LATERAL DERIVED t2 ref c c 5 test.t1.b 1 Using index
+1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2
+3 LATERAL DERIVED t1 ref a,a_2 a 5 test.t1.a 1 Using where; Using temporary; Using filesort
+3 LATERAL DERIVED t2 ref c c 5 test.t1.b 1 Using index
DROP TABLE t1, t2;
#
# Bug mdev-25714: usage non-splitting covering index is cheaper than
@@ -189,6 +190,8 @@ id int not null, itemid int not null, userid int not null, primary key (id),
index idx1 (userid, itemid), index idx2 (itemid)
) engine innodb;
insert into t3 values (1,1,1), (2,1,1), (3,2,1), (4,2,1), (5,3,1);
+set use_stat_tables='never';
+set optimizer_use_condition_selectivity=1;
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
test.t1 analyze status OK
@@ -234,6 +237,8 @@ id itemid id id
4 2 4 2
drop table t1,t2,t3;
set optimizer_switch='split_materialized=default';
+set use_stat_tables=default;
+set optimizer_use_condition_selectivity=default;
#
# MDEV-26337: subquery with groupby and ROLLUP returns incorrect results
# (The testcase is taken from testcase for MDEV-13389 due to it being
@@ -253,7 +258,9 @@ insert into t4 values
insert into t4 select a+10, b+10, concat(c,'f') from t4;
analyze table t3,t4;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
# This should use a plan with LATERAL DERIVED:
explain select t3.a,t3.c,t.max,t.min
@@ -262,7 +269,7 @@ from t3 join
on t3.a=t.a and t3.c=t.c
where t3.b > 15;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 range idx_b idx_b 5 NULL 3 Using index condition; Using where
+1 PRIMARY t3 range idx_b idx_b 5 NULL 2 Using index condition; Using where
1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 2
2 LATERAL DERIVED t4 ref idx idx 133 test.t3.a,test.t3.c 1
# ... and if one adds WITH ROLLUP, then LATERAL DERIVED is no longer used:
@@ -272,7 +279,7 @@ from t3 join
on t3.a=t.a and t3.c=t.c
where t3.b > 15;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 range idx_b idx_b 5 NULL 3 Using index condition; Using where
+1 PRIMARY t3 range idx_b idx_b 5 NULL 2 Using index condition; Using where
1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 4
2 DERIVED t4 ALL NULL NULL NULL NULL 40 Using filesort
drop table t3, t4;
diff --git a/mysql-test/main/derived_split_innodb.test b/mysql-test/main/derived_split_innodb.test
index 2a3565be36f..2f74f5fe747 100644
--- a/mysql-test/main/derived_split_innodb.test
+++ b/mysql-test/main/derived_split_innodb.test
@@ -166,6 +166,8 @@ create table t3 (
index idx1 (userid, itemid), index idx2 (itemid)
) engine innodb;
insert into t3 values (1,1,1), (2,1,1), (3,2,1), (4,2,1), (5,3,1);
+set use_stat_tables='never';
+set optimizer_use_condition_selectivity=1;
analyze table t1,t2,t3;
let $q=
@@ -185,6 +187,8 @@ eval $q;
drop table t1,t2,t3;
set optimizer_switch='split_materialized=default';
+set use_stat_tables=default;
+set optimizer_use_condition_selectivity=default;
--echo #
--echo # MDEV-26337: subquery with groupby and ROLLUP returns incorrect results
diff --git a/mysql-test/main/derived_view.result b/mysql-test/main/derived_view.result
index b2e21db2aef..3df1acc66e4 100644
--- a/mysql-test/main/derived_view.result
+++ b/mysql-test/main/derived_view.result
@@ -2940,21 +2940,23 @@ insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain select a from t1 where a in (select b from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1)
+1 PRIMARY t2 ref idx idx 5 test.t1.a 139 Using index; FirstMatch(t1)
explain select * from (select a from t1 where a in (select b from t2)) t;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1)
+1 PRIMARY t2 ref idx idx 5 test.t1.a 139 Using index; FirstMatch(t1)
create view v1 as select a from t1 where a in (select b from t2);
explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1)
+1 PRIMARY t2 ref idx idx 5 test.t1.a 139 Using index; FirstMatch(t1)
drop view v1;
drop table t1,t2;
#
@@ -3494,8 +3496,8 @@ a
3
select * from ((select a from t1 limit 2) order by a desc) dt;
a
-7
3
+7
drop view v1;
drop table t1;
#
diff --git a/mysql-test/main/distinct.result b/mysql-test/main/distinct.result
index d8f304a2da2..93a1ea834df 100644
--- a/mysql-test/main/distinct.result
+++ b/mysql-test/main/distinct.result
@@ -173,9 +173,9 @@ INSERT INTO t2 values (1),(2),(3);
INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using where; Using temporary
+1 SIMPLE t2 index a a 4 NULL 5 Using index; Using temporary
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using where
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using index
-1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Using join buffer (flat, BNL join)
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
a
1
@@ -1061,7 +1061,7 @@ UNION
( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index NULL PRIMARY 4 NULL 2 Using index; Using temporary
-2 UNION t1 index NULL PRIMARY 4 NULL 2 Using index; Using temporary
+2 UNCACHEABLE UNION t1 index NULL PRIMARY 4 NULL 2 Using index; Using temporary
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) )
UNION
diff --git a/mysql-test/main/drop.test b/mysql-test/main/drop.test
index 6f506dd7215..fe8d39c0d7e 100644
--- a/mysql-test/main/drop.test
+++ b/mysql-test/main/drop.test
@@ -190,28 +190,28 @@ CREATE DATABASE mysql_test;
let $MYSQLD_DATADIR= `select @@datadir`;
--let $proc_frm = $MYSQLD_DATADIR/mysql/proc.frm
---let $proc_MYD = $MYSQLD_DATADIR/mysql/proc.MYD
---let $proc_MYI = $MYSQLD_DATADIR/mysql/proc.MYI
+--let $proc_MAD = $MYSQLD_DATADIR/mysql/proc.MAD
+--let $proc_MAI = $MYSQLD_DATADIR/mysql/proc.MAI
--let $copy_of_proc_frm = $MYSQLTEST_VARDIR/tmp/bug29958.copy.frm
---let $copy_of_proc_MYD = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MYD
---let $copy_of_proc_MYI = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MYI
+--let $copy_of_proc_MAD = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MAD
+--let $copy_of_proc_MAI = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MAI
--copy_file $proc_frm $copy_of_proc_frm
---copy_file $proc_MYD $copy_of_proc_MYD
---copy_file $proc_MYI $copy_of_proc_MYI
+--copy_file $proc_MAD $copy_of_proc_MAD
+--copy_file $proc_MAI $copy_of_proc_MAI
DROP TABLE mysql.proc;
DROP DATABASE mysql_test;
--copy_file $copy_of_proc_frm $proc_frm
---copy_file $copy_of_proc_MYD $proc_MYD
---copy_file $copy_of_proc_MYI $proc_MYI
+--copy_file $copy_of_proc_MAD $proc_MAD
+--copy_file $copy_of_proc_MAI $proc_MAI
--remove_file $copy_of_proc_frm
---remove_file $copy_of_proc_MYD
---remove_file $copy_of_proc_MYI
+--remove_file $copy_of_proc_MAD
+--remove_file $copy_of_proc_MAI
--echo
--echo # --
diff --git a/mysql-test/main/dyncol.result b/mysql-test/main/dyncol.result
index 03c5c3fb22e..4241c10d96c 100644
--- a/mysql-test/main/dyncol.result
+++ b/mysql-test/main/dyncol.result
@@ -1028,12 +1028,12 @@ select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as tim
column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as time)
NULL
Warnings:
-Warning 1292 Truncated incorrect time value: '2011-02-32 8:46:06.23434'
+Warning 1292 Incorrect time value: '2011-02-32 8:46:06.23434'
select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as time);
column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as time)
NULL
Warnings:
-Warning 1292 Truncated incorrect time value: '2011-13-01 8:46:06.23434'
+Warning 1292 Incorrect time value: '2011-13-01 8:46:06.23434'
select column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time);
column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time)
08:46:06
diff --git a/mysql-test/main/empty_user_table.result b/mysql-test/main/empty_user_table.result
index 54a7fd4907b..e5307c36e24 100644
--- a/mysql-test/main/empty_user_table.result
+++ b/mysql-test/main/empty_user_table.result
@@ -1,9 +1,16 @@
-create table t1 as select * from mysql.user;
-truncate table mysql.user;
+create table t1 as select * from mysql.global_priv;
+truncate table mysql.global_priv;
flush privileges;
connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u1;
Got one of the listed errors
-insert mysql.user select * from t1;
+insert mysql.global_priv select * from t1;
drop table t1;
flush privileges;
+# switching from mysql.global_priv to mysql.user
+truncate table mysql.user;
+flush privileges;
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+connect fail,localhost,u1;
+Got one of the listed errors
+# switching back from mysql.user to mysql.global_priv
diff --git a/mysql-test/main/empty_user_table.test b/mysql-test/main/empty_user_table.test
index b54f2109e30..8a544fece83 100644
--- a/mysql-test/main/empty_user_table.test
+++ b/mysql-test/main/empty_user_table.test
@@ -4,8 +4,8 @@
source include/not_embedded.inc;
-create table t1 as select * from mysql.user;
-truncate table mysql.user;
+create table t1 as select * from mysql.global_priv;
+truncate table mysql.global_priv;
flush privileges;
# connecting via unix socket gives ER_ACCESS_DENIED_ERROR
@@ -14,7 +14,23 @@ flush privileges;
--error ER_ACCESS_DENIED_ERROR,ER_HOST_NOT_PRIVILEGED
connect (fail,localhost,u1);
-insert mysql.user select * from t1;
+insert mysql.global_priv select * from t1;
drop table t1;
flush privileges;
+#
+# same with mysql.user
+#
+
+source include/switch_to_mysql_user.inc;
+truncate table mysql.user;
+
+flush privileges;
+
+# connecting via unix socket gives ER_ACCESS_DENIED_ERROR
+# connecting via tcp/ip gives ER_HOST_NOT_PRIVILEGED
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR,ER_HOST_NOT_PRIVILEGED
+connect (fail,localhost,u1);
+
+source include/switch_to_mysql_global_priv.inc;
diff --git a/mysql-test/main/errors.result b/mysql-test/main/errors.result
index 78695b07b8e..baa2e0ad3c0 100644
--- a/mysql-test/main/errors.result
+++ b/mysql-test/main/errors.result
@@ -196,3 +196,38 @@ ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728'
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null);
ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728'
# End of 10.3 tests
+#
+# MDEV-23518: Syntax error in ond SP results in misleading
+# message on SHOW CREATE PROCEDURE
+#
+CREATE PROCEDURE P1 ()
+BEGIN NOT ATOMIC
+IF (SELECT 2) THEN
+SELECT 4;
+END IF ;
+END;
+$$
+select name,db,body from mysql.proc where name = "P1";
+name db body
+P1 test BEGIN NOT ATOMIC
+IF (SELECT 2) THEN
+SELECT 4;
+END IF ;
+END
+update mysql.proc set body_utf8="BEGIN NOT ATOMIC
+IF (SELECT 2) OR foo = 3 THEN
+SELECT 4;
+END IF ;
+END", body="BEGIN NOT ATOMIC
+IF (SELECT 2) OR foo = 3 THEN
+SELECT 4;
+END IF ;
+END"where name = "P1";
+show create procedure P1;
+ERROR 42000: Undeclared variable: foo
+show warnings;
+Level Code Message
+Error 1327 Undeclared variable: foo
+Error 1305 PROCEDURE P1 does not exist
+drop procedure P1;
+# End of 10.4 tests
diff --git a/mysql-test/main/errors.test b/mysql-test/main/errors.test
index f3aedc8e491..1948eebfcb3 100644
--- a/mysql-test/main/errors.test
+++ b/mysql-test/main/errors.test
@@ -246,3 +246,39 @@ SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,nu
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null);
-- echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-23518: Syntax error in ond SP results in misleading
+--echo # message on SHOW CREATE PROCEDURE
+--echo #
+
+DELIMITER $$;
+
+CREATE PROCEDURE P1 ()
+BEGIN NOT ATOMIC
+ IF (SELECT 2) THEN
+ SELECT 4;
+ END IF ;
+END;
+$$
+
+DELIMITER ;$$
+
+select name,db,body from mysql.proc where name = "P1";
+update mysql.proc set body_utf8="BEGIN NOT ATOMIC
+IF (SELECT 2) OR foo = 3 THEN
+SELECT 4;
+END IF ;
+END", body="BEGIN NOT ATOMIC
+IF (SELECT 2) OR foo = 3 THEN
+SELECT 4;
+END IF ;
+END"where name = "P1";
+
+--error ER_SP_UNDECLARED_VAR
+show create procedure P1;
+show warnings;
+
+drop procedure P1;
+
+-- echo # End of 10.4 tests
diff --git a/mysql-test/main/events_restart.result b/mysql-test/main/events_restart.result
index ab90f7ff2f7..47092beed0e 100644
--- a/mysql-test/main/events_restart.result
+++ b/mysql-test/main/events_restart.result
@@ -21,6 +21,7 @@ insert into event_like select * from mysql.event;
alter table mysql.event
change column body body longtext character set utf8 collate utf8_bin;
"Now we restart the server"
+# restart
use events_test;
select @@event_scheduler;
@@event_scheduler
@@ -81,6 +82,7 @@ events_test abc1 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1
events_test abc2 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
events_test abc3 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
Now let's restart the server again
+# restart
use events_test;
select @@event_scheduler;
@@event_scheduler
@@ -101,6 +103,7 @@ SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
"Now we restart the server"
+# restart
USE test;
SELECT @@event_scheduler;
@@event_scheduler
@@ -120,6 +123,7 @@ ev 1 ENABLED
#
# Restarting server with server_id=100
#
+# restart: --server-id=100
select @@global.server_id;
@@global.server_id
100
@@ -130,6 +134,7 @@ set global server_id= 1;
#
# Restarting server with the original server_id=1
#
+# restart
select @@global.server_id;
@@global.server_id
1
diff --git a/mysql-test/main/except.result b/mysql-test/main/except.result
index de20200b8ba..f48a25f93bd 100644
--- a/mysql-test/main/except.result
+++ b/mysql-test/main/except.result
@@ -256,7 +256,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL"
}
}
@@ -279,7 +279,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL"
}
}
@@ -325,7 +325,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"r_filtered": 100
}
@@ -359,7 +359,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"r_filtered": 100
}
@@ -421,7 +421,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"r_filtered": 100
}
@@ -455,7 +455,7 @@ ANALYZE
"r_filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "119",
"join_type": "BNL",
"r_filtered": 100
}
@@ -501,7 +501,7 @@ a
(select 1 from dual) except (select 1 from dual);
1
(select 1 from dual into @v) except (select 1 from dual);
-ERROR HY000: Incorrect usage of EXCEPT and INTO
+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 'into @v) except (select 1 from dual)' at line 1
select 1 from dual ORDER BY 1 except select 1 from dual;
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 'except select 1 from dual' at line 1
select 1 as a from dual union all select 1 from dual;
@@ -509,7 +509,7 @@ a
1
1
select 1 from dual except all select 1 from dual;
-ERROR HY000: Incorrect usage of EXCEPT and ALL
+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 'all select 1 from dual' at line 1
create table t1 (a int, b blob, a1 int, b1 blob) engine=MyISAM;
create table t2 (c int, d blob, c1 int, d1 blob) engine=MyISAM;
insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt");
diff --git a/mysql-test/main/except.test b/mysql-test/main/except.test
index 557599fd541..4eaae1a3888 100644
--- a/mysql-test/main/except.test
+++ b/mysql-test/main/except.test
@@ -64,13 +64,13 @@ drop tables t1,t2,t3,t4;
select 1 as a from dual except select 1 from dual;
(select 1 from dual) except (select 1 from dual);
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
(select 1 from dual into @v) except (select 1 from dual);
--error ER_PARSE_ERROR
select 1 from dual ORDER BY 1 except select 1 from dual;
select 1 as a from dual union all select 1 from dual;
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
select 1 from dual except all select 1 from dual;
diff --git a/mysql-test/main/explain.result b/mysql-test/main/explain.result
index f593e0dfaba..bc3c53d01d3 100644
--- a/mysql-test/main/explain.result
+++ b/mysql-test/main/explain.result
@@ -13,7 +13,7 @@ id str
3 foo
explain select * from t1 where str is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref str str 11 const 1 Using index condition
+1 SIMPLE t1 ref str str 11 const 2 Using index condition
explain select * from t1 where str="foo";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const str str 11 const 1
@@ -311,9 +311,15 @@ INSERT INTO t1 VALUES(4, 1, 1, 1);
INSERT INTO t1 VALUES(3, 1, 1, 1);
INSERT INTO t1 VALUES(2, 1, 1, 1);
INSERT INTO t1 VALUES(1, 1, 1, 1);
+INSERT INTO t1 VALUES(5, 2, 1, 1);
+INSERT INTO t1 VALUES(6, 2, 1, 1);
+INSERT INTO t1 VALUES(7, 3, 1, 1);
+INSERT INTO t1 VALUES(9, 3, 1, 1);
+INSERT INTO t1 VALUES(10, 4, 1, 1);
+INSERT INTO t1 VALUES(11, 4, 1, 1);
EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 3 Using where
+1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 4 Using where
DROP TABLE t1;
#
# Bug#56814 Explain + subselect + fulltext crashes server
diff --git a/mysql-test/main/explain.test b/mysql-test/main/explain.test
index d5be354c852..cf9f6be09ed 100644
--- a/mysql-test/main/explain.test
+++ b/mysql-test/main/explain.test
@@ -238,6 +238,12 @@ INSERT INTO t1 VALUES(4, 1, 1, 1);
INSERT INTO t1 VALUES(3, 1, 1, 1);
INSERT INTO t1 VALUES(2, 1, 1, 1);
INSERT INTO t1 VALUES(1, 1, 1, 1);
+INSERT INTO t1 VALUES(5, 2, 1, 1);
+INSERT INTO t1 VALUES(6, 2, 1, 1);
+INSERT INTO t1 VALUES(7, 3, 1, 1);
+INSERT INTO t1 VALUES(9, 3, 1, 1);
+INSERT INTO t1 VALUES(10, 4, 1, 1);
+INSERT INTO t1 VALUES(11, 4, 1, 1);
EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result
index 277b9ee3ba3..17f83fe5362 100644
--- a/mysql-test/main/explain_json.result
+++ b/mysql-test/main/explain_json.result
@@ -371,7 +371,7 @@ EXPLAIN
"attached_condition": "tbl2.b < 5"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "1Kb",
"join_type": "BNL",
"attached_condition": "tbl2.a = tbl1.a"
}
@@ -638,7 +638,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "1Kb",
"join_type": "BNL"
}
}
@@ -672,7 +672,7 @@ EXPLAIN
"first_match": "t2"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "141",
"join_type": "BNL",
"attached_condition": "t1.b = t2.b and t1.a = t2.a"
}
@@ -709,7 +709,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "206",
"join_type": "BNL",
"attached_condition": "t1.b = t2.b and t1.a = t2.a"
}
@@ -737,7 +737,7 @@ EXPLAIN
"key": "a",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 1,
+ "rows": 2,
"filtered": 100,
"index_condition": "t1.a < 3",
"mrr_type": "Rowid-ordered scan"
@@ -823,7 +823,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "65",
"join_type": "BNL",
"attached_condition": "t2.b <> outer_t1.a"
}
@@ -874,7 +874,7 @@ EXPLAIN
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "1Kb",
"join_type": "BNL",
"attached_condition": "tbl2.b = tbl1.b"
}
@@ -1027,6 +1027,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
@@ -1489,7 +1490,7 @@ EXPLAIN
"index_condition_bka": "t4.b + 1 <= t3.b + 1"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "400",
"join_type": "BKA",
"mrr_type": "Rowid-ordered scan"
}
@@ -1532,7 +1533,7 @@ ANALYZE
"index_condition_bka": "t4.b + 1 <= t3.b + 1"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "400",
"join_type": "BKA",
"mrr_type": "Rowid-ordered scan",
"r_filtered": 100
diff --git a/mysql-test/main/explain_non_select.result b/mysql-test/main/explain_non_select.result
index 5a6b9f841c2..111b4c8ae50 100644
--- a/mysql-test/main/explain_non_select.result
+++ b/mysql-test/main/explain_non_select.result
@@ -229,7 +229,7 @@ INSERT INTO t1 VALUES (1),(2);
EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE user index NULL PRIMARY 420 NULL 4 Using index
+1 SIMPLE global_priv index NULL PRIMARY 420 NULL 5 Using index
DROP TABLE t1;
DROP VIEW v1;
#
diff --git a/mysql-test/main/failed_auth_3909.result b/mysql-test/main/failed_auth_3909.result
index d0fd2c41221..55869974301 100644
--- a/mysql-test/main/failed_auth_3909.result
+++ b/mysql-test/main/failed_auth_3909.result
@@ -1,24 +1,17 @@
-optimize table mysql.user;
-Table Op Msg_type Msg_text
-mysql.user optimize status OK
-insert ignore mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
-flush privileges;
+create user foo identified via mysql_old_password;
+create user bar identified via mysql_old_password;
+create user baz identified via mysql_old_password;
connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u1;
-ERROR HY000: Plugin 'bar' is not loaded
-connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
-connect fail,localhost,u2;
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
-connect(localhost,u2,password,test,MASTER_PORT,MASTER_SOCKET);
-connect fail,localhost,u2,password;
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
-ERROR HY000: Plugin 'bar' is not loaded
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
-delete from mysql.user where plugin = 'bar';
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+connect(localhost,uu2,,test,MASTER_PORT,MASTER_SOCKET);
+connect fail,localhost,uu2;
+ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
+connect(localhost,uu2,password,test,MASTER_PORT,MASTER_SOCKET);
+connect fail,localhost,uu2,password;
+ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
+ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
+delete from mysql.user where plugin = 'mysql_old_password';
flush privileges;
diff --git a/mysql-test/main/failed_auth_3909.test b/mysql-test/main/failed_auth_3909.test
index f72460691ea..af65f46cfa2 100644
--- a/mysql-test/main/failed_auth_3909.test
+++ b/mysql-test/main/failed_auth_3909.test
@@ -6,32 +6,32 @@ source include/not_embedded.inc;
# verify that for some failed login attemps (with wrong user names)
# the server requests a plugin
#
-optimize table mysql.user;
-insert ignore mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar');
-flush privileges;
+create user foo identified via mysql_old_password;
+create user bar identified via mysql_old_password;
+create user baz identified via mysql_old_password;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_PLUGIN_IS_NOT_LOADED
+--error ER_ACCESS_DENIED_ERROR
connect (fail,localhost,u1);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_ACCESS_DENIED_ERROR
-connect (fail,localhost,u2);
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
+connect (fail,localhost,uu2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_ACCESS_DENIED_ERROR
-connect (fail,localhost,u2,password);
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
+connect (fail,localhost,uu2,password);
---error ER_PLUGIN_IS_NOT_LOADED
+--error ER_ACCESS_DENIED_ERROR
change_user u1;
---error ER_ACCESS_DENIED_ERROR
-change_user u2;
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
+change_user uu2;
---error ER_ACCESS_DENIED_ERROR
-change_user u2,password;
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
+change_user uu2,password;
-delete from mysql.user where plugin = 'bar';
+delete from mysql.user where plugin = 'mysql_old_password';
flush privileges;
diff --git a/mysql-test/main/failed_auth_unixsocket.result b/mysql-test/main/failed_auth_unixsocket.result
index 680d3b48a33..7e8b8fe70b9 100644
--- a/mysql-test/main/failed_auth_unixsocket.result
+++ b/mysql-test/main/failed_auth_unixsocket.result
@@ -1,13 +1,10 @@
-update mysql.user set plugin='unix_socket';
+create table global_priv_backup select * from mysql.global_priv;
+update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
+delete from mysql.global_priv where user != 'root';
flush privileges;
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
-connect fail,localhost,$USER;
-ERROR HY000: Plugin 'unix_socket' is not loaded
-ERROR HY000: Plugin 'unix_socket' is not loaded
-install plugin unix_socket soname 'auth_socket.so';
-connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'USER'@'localhost'
ERROR 28000: Access denied for user 'USER'@'localhost'
-update mysql.user set plugin='';
+replace mysql.global_priv select * from global_priv_backup;
flush privileges;
-uninstall plugin unix_socket;
+drop table global_priv_backup;
diff --git a/mysql-test/main/failed_auth_unixsocket.test b/mysql-test/main/failed_auth_unixsocket.test
index f7345f44698..fe80d947036 100644
--- a/mysql-test/main/failed_auth_unixsocket.test
+++ b/mysql-test/main/failed_auth_unixsocket.test
@@ -4,33 +4,26 @@
# MDEV-3909 remote user enumeration
# unix_socket tests
#
-update mysql.user set plugin='unix_socket';
+create table global_priv_backup select * from mysql.global_priv;
+update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
+delete from mysql.global_priv where user != 'root';
flush privileges;
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $USER USER
---error ER_PLUGIN_IS_NOT_LOADED
-connect (fail,localhost,$USER);
-
---error ER_PLUGIN_IS_NOT_LOADED
-change_user $USER;
-
-eval install plugin unix_socket soname '$AUTH_SOCKET_SO';
-
# Make sure that the replace works, even if $USER is 'user' or something else
# that matches other parts of the error message.
+let $replace=Access denied for user '$USER';
+
--echo connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
---let $replace=Access denied for user '$USER'
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $replace "Access denied for user 'USER'"
+--replace_result $replace "Access denied for user 'USER'"
--disable_query_log
--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR
connect (fail,localhost,$USER);
--enable_query_log
---replace_result $replace "Access denied for user 'USER'"
+--replace_result $replace "Access denied for user 'USER'"
--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR
change_user $USER;
-update mysql.user set plugin='';
+replace mysql.global_priv select * from global_priv_backup;
flush privileges;
-uninstall plugin unix_socket;
-
+drop table global_priv_backup;
diff --git a/mysql-test/main/features.result b/mysql-test/main/features.result
index f31a6672549..beab7fb946f 100644
--- a/mysql-test/main/features.result
+++ b/mysql-test/main/features.result
@@ -3,6 +3,7 @@ set sql_mode="";
flush status;
show status like "feature%";
Variable_name Value
+Feature_application_time_periods 0
Feature_check_constraint 0
Feature_custom_aggregate_functions 0
Feature_delay_key_write 0
diff --git a/mysql-test/main/flush.result b/mysql-test/main/flush.result
index af8e327657b..8149ce29dec 100644
--- a/mysql-test/main/flush.result
+++ b/mysql-test/main/flush.result
@@ -364,16 +364,19 @@ flush table t1;
connection default;
# Let flush table sync in.
select * from t1;
+a
connection con1;
select * from t1;
a
unlock tables;
+connection default;
+select count(*) from information_schema.processlist where state = "Waiting for table metadata lock";
+count(*)
+1
+commit;
connection con2;
# Reaping 'flush table t1'...
connection default;
-# Reaping 'select * from t1'...
-a
-commit;
#
# Repeat the same test but with FLUSH TABLES
#
@@ -386,13 +389,10 @@ connection con1;
#
lock table t1 read;
connection con2;
-#
-# FLUSH TABLES expels the table definition from the cache.
-# Sending 'flush tables'...
flush tables;
connection default;
-# Let flush table sync in.
select * from t1;
+a
connection con1;
select * from t1;
a
@@ -400,8 +400,6 @@ unlock tables;
connection con2;
# Reaping 'flush tables'...
connection default;
-# Reaping 'select * from t1'...
-a
commit;
# Cleanup
connection con1;
@@ -472,10 +470,7 @@ create table t1 (i int);
create table t2 (i int);
handler t1 open;
connection con1;
-# Sending:
flush tables with read lock;
-connection con2;
-# Wait until FTWRL starts waiting for 't1' to be closed.
connection default;
# The below statement should not cause deadlock.
# Sending:
@@ -483,8 +478,6 @@ insert into t2 values (1);
connection con2;
# Wait until INSERT starts to wait for FTWRL to go away.
connection con1;
-# FTWRL should be able to continue now.
-# Reap FTWRL.
unlock tables;
connection default;
# Reap INSERT.
diff --git a/mysql-test/main/flush.test b/mysql-test/main/flush.test
index 51b5c48c137..17f9241a122 100644
--- a/mysql-test/main/flush.test
+++ b/mysql-test/main/flush.test
@@ -449,24 +449,20 @@ connection default;
--echo # Let flush table sync in.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
+ where state = "Waiting for table metadata lock"
and info = "flush table t1";
--source include/wait_condition.inc
-send select * from t1;
+select * from t1;
connection con1;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "select * from t1";
select * from t1;
unlock tables;
+connection default;
+select count(*) from information_schema.processlist where state = "Waiting for table metadata lock";
+commit;
connection con2;
--echo # Reaping 'flush table t1'...
reap;
connection default;
---echo # Reaping 'select * from t1'...
-reap;
-commit;
--echo #
--echo # Repeat the same test but with FLUSH TABLES
@@ -480,31 +476,16 @@ connection con1;
--echo #
lock table t1 read;
connection con2;
---echo #
---echo # FLUSH TABLES expels the table definition from the cache.
---echo # Sending 'flush tables'...
send flush tables;
connection default;
---echo # Let flush table sync in.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "flush tables";
---source include/wait_condition.inc
-send select * from t1;
+select * from t1;
connection con1;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "select * from t1";
select * from t1;
unlock tables;
connection con2;
--echo # Reaping 'flush tables'...
reap;
connection default;
---echo # Reaping 'select * from t1'...
-reap;
commit;
--echo # Cleanup
@@ -566,17 +547,7 @@ create table t2 (i int);
handler t1 open;
connection con1;
---echo # Sending:
---send flush tables with read lock
-
-connection con2;
---echo # Wait until FTWRL starts waiting for 't1' to be closed.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "flush tables with read lock";
---source include/wait_condition.inc
-
+flush tables with read lock;
connection default;
--echo # The below statement should not cause deadlock.
--echo # Sending:
@@ -586,14 +557,11 @@ connection con2;
--echo # Wait until INSERT starts to wait for FTWRL to go away.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock"
+ where state = "Waiting for backup lock"
and info = "insert into t2 values (1)";
--source include/wait_condition.inc
connection con1;
---echo # FTWRL should be able to continue now.
---echo # Reap FTWRL.
---reap
unlock tables;
connection default;
diff --git a/mysql-test/main/flush_and_binlog.result b/mysql-test/main/flush_and_binlog.result
new file mode 100644
index 00000000000..a1d73c6590f
--- /dev/null
+++ b/mysql-test/main/flush_and_binlog.result
@@ -0,0 +1,33 @@
+#
+# MDEV-23843 Assertions in Diagnostics_area upon table operations under
+# FTWRL
+#
+CREATE TABLE t1 (a INT);
+FLUSH TABLES WITH READ LOCK;
+connect con1,localhost,root,,;
+SET lock_wait_timeout= 1;
+OPTIMIZE TABLE t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+disconnect con1;
+connection default;
+UNLOCK TABLES;
+DROP TABLE t1;
+FLUSH TABLES WITH READ LOCK;
+connect con1,localhost,root,,test;
+SET lock_wait_timeout= 1;
+FLUSH TABLES;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection default;
+disconnect con1;
+unlock tables;
+# Second test from MDEV-23843
+CREATE TABLE t (a INT);
+FLUSH TABLES WITH READ LOCK;
+connect con1,localhost,root,,;
+SET lock_wait_timeout= 1;
+ANALYZE TABLE t;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+disconnect con1;
+connection default;
+UNLOCK TABLES;
+DROP TABLE t;
diff --git a/mysql-test/main/flush_and_binlog.test b/mysql-test/main/flush_and_binlog.test
new file mode 100644
index 00000000000..a28d8e365dd
--- /dev/null
+++ b/mysql-test/main/flush_and_binlog.test
@@ -0,0 +1,43 @@
+--source include/have_log_bin.inc
+
+--echo #
+--echo # MDEV-23843 Assertions in Diagnostics_area upon table operations under
+--echo # FTWRL
+--echo #
+
+CREATE TABLE t1 (a INT);
+FLUSH TABLES WITH READ LOCK;
+--connect (con1,localhost,root,,)
+SET lock_wait_timeout= 1;
+--error ER_LOCK_WAIT_TIMEOUT
+OPTIMIZE TABLE t1;
+# Cleanup
+--disconnect con1
+--connection default
+UNLOCK TABLES;
+DROP TABLE t1;
+#
+# Second test case from MDEV_23843
+#
+FLUSH TABLES WITH READ LOCK;
+--connect (con1,localhost,root,,test)
+SET lock_wait_timeout= 1;
+--error ER_LOCK_WAIT_TIMEOUT
+FLUSH TABLES;
+--connection default
+--disconnect con1
+unlock tables;
+
+--echo # Second test from MDEV-23843
+
+CREATE TABLE t (a INT);
+FLUSH TABLES WITH READ LOCK;
+--connect (con1,localhost,root,,)
+SET lock_wait_timeout= 1;
+--error ER_LOCK_WAIT_TIMEOUT
+ANALYZE TABLE t;
+# Cleanup
+--disconnect con1
+--connection default
+UNLOCK TABLES;
+DROP TABLE t;
diff --git a/mysql-test/main/flush_block_commit.test b/mysql-test/main/flush_block_commit.test
index 6a6120ce63f..0280aedf2ca 100644
--- a/mysql-test/main/flush_block_commit.test
+++ b/mysql-test/main/flush_block_commit.test
@@ -32,7 +32,7 @@ connection con2;
--echo # Wait until COMMIT gets blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and info = "COMMIT";
+ where state = "Waiting for backup lock" and info = "COMMIT";
--source include/wait_condition.inc
--echo # Verify that 'con1' was blocked and data did not move.
SELECT * FROM t1;
diff --git a/mysql-test/main/flush_block_commit_notembedded.test b/mysql-test/main/flush_block_commit_notembedded.test
index 3d894c5f16c..5be9e50e58b 100644
--- a/mysql-test/main/flush_block_commit_notembedded.test
+++ b/mysql-test/main/flush_block_commit_notembedded.test
@@ -46,7 +46,7 @@ begin;
connection con1;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t1 values (1)";
--source include/wait_condition.inc
unlock tables;
diff --git a/mysql-test/main/flush_read_lock.result b/mysql-test/main/flush_read_lock.result
index 47c46da05f1..0f8c2ce9fb9 100644
--- a/mysql-test/main/flush_read_lock.result
+++ b/mysql-test/main/flush_read_lock.result
@@ -161,11 +161,10 @@ Success: FTWRL is blocked when 'alter event e1 comment 'test'' is active in anot
#
# 2) ANALYZE TABLE statement is compatible with FTWRL.
# See Bug#43336 ANALYZE and OPTIMIZE do not honour
-# --read-only for a discussion why.
+# --read-only as they update status tables.
#
-Success: Was able to run 'analyze table t1_base' under FTWRL.
-Success: Was able to run 'analyze table t1_base' with FTWRL active in another connection.
-Success: Was able to run FTWRL while 'analyze table t1_base' was active in another connection.
+Success: Was not able to run 'analyze table t1_base' under FTWRL.
+Success: 'analyze table t1_base' is blocked by FTWRL active in another connection.
#
# 3) BEGIN, ROLLBACK and COMMIT statements.
# BEGIN and ROLLBACK are compatible with FTWRL.
@@ -654,6 +653,7 @@ connection default;
# 14.2) FLUSH TABLES <list> WITH READ LOCK is not blocked by
# active FTWRL. But since the latter keeps tables open
# FTWRL is blocked by FLUSH TABLES <list> WITH READ LOCK.
+# Fixed by MDEV-5336
flush tables with read lock;
# FT <list> WRL is allowed under FTWRL at the moment.
# It does not make much sense though.
@@ -670,12 +670,9 @@ connection default;
flush tables t1_base, t2_base with read lock;
connection con1;
flush tables with read lock;
-connection con2;
-# Wait until FTWRL is blocked.
connection default;
unlock tables;
connection con1;
-# Reap FTWRL.
unlock tables;
connection default;
#
@@ -1413,10 +1410,8 @@ set autocommit= 1;
# 39.1.a) ANALYZE TABLE for transactional table is incompatible with
# FTWRL.
flush tables with read lock;
-# Implicit commits are allowed under FTWRL.
analyze table t3_trans;
-Table Op Msg_type Msg_text
-test.t3_trans analyze status OK
+ERROR HY000: Can't execute the query because you have a conflicting read lock
unlock tables;
#
connection con1;
@@ -1429,6 +1424,7 @@ unlock tables;
connection default;
# Reap ANALYZE TABLE
Table Op Msg_type Msg_text
+test.t3_trans analyze status Engine-independent statistics collected
test.t3_trans analyze status OK
#
# 39.1.b) CHECK TABLE for transactional table is compatible with FTWRL.
@@ -1464,7 +1460,7 @@ Success: Was able to run 'repair table t3_temp_trans' with FTWRL active in anoth
Success: Was able to run FTWRL while 'repair table t3_temp_trans' was active in another connection.
#
# And ANALYZE TABLE:
-Success: Was able to run 'analyze table t3_temp_trans' under FTWRL.
+Error: Wasn't able to run 'analyze table t3_temp_trans' under FTWRL!
Success: Was able to run 'analyze table t3_temp_trans' with FTWRL active in another connection.
Success: Was able to run FTWRL while 'analyze table t3_temp_trans' was active in another connection.
#
@@ -1679,3 +1675,94 @@ disconnect con1;
disconnect con2;
disconnect con3;
set global sql_mode=default;
+#
+# Deadlock between FTWRL under open handler and DDL/LOCK TABLES
+#
+CREATE TABLE t1(a INT);
+#
+connect con3,localhost,root,,;
+HANDLER t1 OPEN;
+#
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+LOCK TABLE t1 WRITE;
+#
+# we need to do it in a separate connection,
+# because SET DEBUG_SYNC call open_tables()/mysql_ha_flush() :(
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+disconnect con2;
+#
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+#
+connection con3;
+HANDLER t1 CLOSE;
+disconnect con3;
+#
+connection con1;
+UNLOCK TABLES;
+disconnect con1;
+#
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+#
+# Make sure pending LOCK TABLES doesn't block FTWRL
+#
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+#
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+LOCK TABLE t1 WRITE;
+#
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+disconnect con2;
+#
+connection default;
+UNLOCK TABLES;
+#
+connection con1;
+UNLOCK TABLES;
+disconnect con1;
+#
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+#
+# MDEV-19384 Deadlock between FTWRL under open HANDLER, LOCK TABLE
+# and DROP DATABASE
+#
+SET DEBUG_SYNC= 'ftwrl_before_lock SIGNAL ready WAIT_FOR go';
+CREATE DATABASE mysqltest;
+CREATE TABLE mysqltest.t1(a INT);
+HANDLER mysqltest.t1 OPEN as t1;
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready1';
+LOCK TABLE mysqltest.t1 WRITE;
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready1';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready2';
+DROP DATABASE mysqltest;
+connect con3,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready2';
+connection default;
+FLUSH TABLES WITH READ LOCK;
+connection con3;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+disconnect con3;
+connection con1;
+SET DEBUG_SYNC= 'now SIGNAL go';
+disconnect con1;
+connection default;
+UNLOCK TABLES;
+HANDLER t1 CLOSE;
+connection con2;
+disconnect con2;
+connection default;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/main/flush_read_lock.test b/mysql-test/main/flush_read_lock.test
index 4a9752ae9f1..80512deac4e 100644
--- a/mysql-test/main/flush_read_lock.test
+++ b/mysql-test/main/flush_read_lock.test
@@ -199,11 +199,13 @@ let $cleanup_stmt1= alter event e1 comment '';
--echo #
--echo # 2) ANALYZE TABLE statement is compatible with FTWRL.
--echo # See Bug#43336 ANALYZE and OPTIMIZE do not honour
---echo # --read-only for a discussion why.
+--echo # --read-only as they update status tables.
--echo #
+let $skip_3rd_check= 1;
let $statement= analyze table t1_base;
let $cleanup_stmt= ;
---source include/check_ftwrl_compatible.inc
+--source include/check_ftwrl_incompatible.inc
+let $skip_3rd_check= ;
--echo #
--echo # 3) BEGIN, ROLLBACK and COMMIT statements.
@@ -259,7 +261,7 @@ connection $con_aux1;
--echo # Wait until COMMIT is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "commit";
--source include/wait_condition.inc
unlock tables;
@@ -281,7 +283,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -565,7 +567,7 @@ connection $con_aux1;
--echo # Check that EXECUTE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t1_base values (1)";
--source include/wait_condition.inc
unlock tables;
@@ -582,7 +584,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -800,6 +802,8 @@ connection default;
--echo # 14.2) FLUSH TABLES <list> WITH READ LOCK is not blocked by
--echo # active FTWRL. But since the latter keeps tables open
--echo # FTWRL is blocked by FLUSH TABLES <list> WITH READ LOCK.
+--echo # Fixed by MDEV-5336
+
flush tables with read lock;
--echo # FT <list> WRL is allowed under FTWRL at the moment.
--echo # It does not make much sense though.
@@ -815,19 +819,10 @@ unlock tables;
connection default;
flush tables t1_base, t2_base with read lock;
connection $con_aux1;
---send flush tables with read lock
-connection $con_aux2;
---echo # Wait until FTWRL is blocked.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables with read lock";
---source include/wait_condition.inc
+flush tables with read lock;
connection default;
unlock tables;
connection $con_aux1;
---echo # Reap FTWRL.
---reap
unlock tables;
connection default;
@@ -1018,7 +1013,7 @@ connection $con_aux1;
--echo # Check that LOCK TABLES WRITE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "lock tables t1_base write";
--source include/wait_condition.inc
unlock tables;
@@ -1062,7 +1057,7 @@ connection $con_aux1;
--echo # Check that OPTIMIZE TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "optimize table t1_base";
--source include/wait_condition.inc
unlock tables;
@@ -1228,7 +1223,7 @@ connection $con_aux1;
--echo # Check that REPAIR TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "repair table t1_base";
--source include/wait_condition.inc
unlock tables;
@@ -1427,7 +1422,7 @@ connection $con_aux1;
--echo # Wait until SET AUTOCOMMIT=1 is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "set autocommit= 1";
--source include/wait_condition.inc
unlock tables;
@@ -1449,7 +1444,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -1628,7 +1623,7 @@ connection $con_aux1;
--echo # Wait until XA COMMIT is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "xa commit 'test1'";
--source include/wait_condition.inc
unlock tables;
@@ -1652,7 +1647,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -1719,7 +1714,7 @@ set autocommit= 1;
--echo # 39.1.a) ANALYZE TABLE for transactional table is incompatible with
--echo # FTWRL.
flush tables with read lock;
---echo # Implicit commits are allowed under FTWRL.
+--error ER_CANT_UPDATE_WITH_READLOCK
analyze table t3_trans;
unlock tables;
--echo #
@@ -1731,7 +1726,7 @@ connection $con_aux1;
--echo # Check that ANALYZE TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "analyze table t3_trans";
--source include/wait_condition.inc
unlock tables;
@@ -1806,7 +1801,7 @@ connection $con_aux1;
--echo # Check that CHECK TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "check table t1_base";
--source include/wait_condition.inc
unlock tables;
@@ -1824,7 +1819,7 @@ connection $con_aux1;
--echo # Check that ALTER TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "alter table t1_temp add column c1 int";
--source include/wait_condition.inc
unlock tables;
@@ -1877,7 +1872,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
--echo # Try to run another INSERT and see that it is blocked.
@@ -1886,7 +1881,7 @@ connection con3;
--echo # Wait until new INSERT is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t2_base values (1)";
--echo # Unblock INSERT in the first connection.
set debug_sync='now SIGNAL go';
@@ -2022,3 +2017,125 @@ set global sql_mode=default;
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
+
+
+--echo #
+--echo # Deadlock between FTWRL under open handler and DDL/LOCK TABLES
+--echo #
+CREATE TABLE t1(a INT);
+
+--echo #
+connect (con3,localhost,root,,);
+HANDLER t1 OPEN;
+
+--echo #
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+--send LOCK TABLE t1 WRITE
+
+--echo #
+--echo # we need to do it in a separate connection,
+--echo # because SET DEBUG_SYNC call open_tables()/mysql_ha_flush() :(
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+disconnect con2;
+
+--echo #
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+
+--echo #
+connection con3;
+HANDLER t1 CLOSE;
+disconnect con3;
+
+--echo #
+connection con1;
+reap;
+UNLOCK TABLES;
+disconnect con1;
+
+--echo #
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+
+
+--echo #
+--echo # Make sure pending LOCK TABLES doesn't block FTWRL
+--echo #
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+
+--echo #
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+--send LOCK TABLE t1 WRITE
+
+--echo #
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+disconnect con2;
+
+--echo #
+connection default;
+UNLOCK TABLES;
+
+--echo #
+connection con1;
+reap;
+UNLOCK TABLES;
+disconnect con1;
+
+--echo #
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+
+--echo #
+--echo # MDEV-19384 Deadlock between FTWRL under open HANDLER, LOCK TABLE
+--echo # and DROP DATABASE
+--echo #
+
+SET DEBUG_SYNC= 'ftwrl_before_lock SIGNAL ready WAIT_FOR go';
+CREATE DATABASE mysqltest;
+CREATE TABLE mysqltest.t1(a INT);
+HANDLER mysqltest.t1 OPEN as t1;
+
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready1';
+--send LOCK TABLE mysqltest.t1 WRITE
+
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready1';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready2';
+--send DROP DATABASE mysqltest
+
+connect (con3,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready2';
+
+connection default;
+send FLUSH TABLES WITH READ LOCK;
+
+connection con3;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+disconnect con3;
+
+connection con1;
+--error 0,ER_NO_SUCH_TABLE
+reap;
+SET DEBUG_SYNC= 'now SIGNAL go';
+disconnect con1;
+
+connection default;
+reap;
+UNLOCK TABLES;
+HANDLER t1 CLOSE;
+connection con2;
+reap;
+disconnect con2;
+connection default;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/main/flush_read_lock_kill.test b/mysql-test/main/flush_read_lock_kill.test
index d83e5b3f1df..bd3efd7bdc4 100644
--- a/mysql-test/main/flush_read_lock_kill.test
+++ b/mysql-test/main/flush_read_lock_kill.test
@@ -51,7 +51,7 @@ SELECT ((@id := kill_id) - kill_id) FROM t1 LIMIT 1;
--echo # to active COMMIT
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock"
+ where state = "Waiting for backup lock"
and info = "flush tables with read lock";
--source include/wait_condition.inc
diff --git a/mysql-test/main/flush_ssl.result b/mysql-test/main/flush_ssl.result
new file mode 100644
index 00000000000..ab2944d2bc5
--- /dev/null
+++ b/mysql-test/main/flush_ssl.result
@@ -0,0 +1,28 @@
+# Kill the server
+# restart: --ssl-key=MYSQLTEST_VARDIR/tmp/ssl_key.pem --ssl-cert=MYSQLTEST_VARDIR/tmp/ssl_cert.pem
+connect ssl_con,localhost,root,,,,,SSL;
+SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+# Use a different certificate ("Not after" certificate field changed)
+FLUSH SSL;
+# Check new certificate used by new connection
+Result
+OK
+# Check that existing SSL connection still works, and uses old certificate, even if new one is loaded in FLUSH SSL
+connection ssl_con;
+SELECT IF(VARIABLE_VALUE=@ssl_not_after,'OK','FAIL') as Result FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+Result
+OK
+disconnect ssl_con;
+connection default;
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+NAME VALUE
+SSL_ACCEPTS 1
+SSL_FINISHED_ACCEPTS 1
+FLUSH SSL;
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+NAME VALUE
+SSL_ACCEPTS 0
+SSL_FINISHED_ACCEPTS 0
+# Cleanup
+# Kill the server
+# restart
diff --git a/mysql-test/main/flush_ssl.test b/mysql-test/main/flush_ssl.test
new file mode 100644
index 00000000000..e7bd57b156a
--- /dev/null
+++ b/mysql-test/main/flush_ssl.test
@@ -0,0 +1,61 @@
+# MDEV-16266 Reload SSL certificate
+# This test reloads server SSL certs FLUSH SSL, and checks that
+# 1. old SSL connections (that existed before FLUSH) still work and use old certificate
+# 2. new SSL connection use new certificate
+# 3. if FLUSH SSL runs into error, SSL is still functioning
+# SWtatus variable Ssl_server_not_after is used to tell the old certificate from new.
+
+
+source include/have_ssl_communication.inc;
+
+# Restart server with cert. files located in temp directory
+# We are going to remove / replace them within the test,
+# so we can't use the ones in std_data directly.
+
+let $ssl_cert=$MYSQLTEST_VARDIR/tmp/ssl_cert.pem;
+let $ssl_key=$MYSQLTEST_VARDIR/tmp/ssl_key.pem;
+
+copy_file $MYSQL_TEST_DIR/std_data/server-key.pem $ssl_key;
+copy_file $MYSQL_TEST_DIR/std_data/server-cert.pem $ssl_cert;
+
+let $restart_parameters=--ssl-key=$ssl_key --ssl-cert=$ssl_cert;
+--source include/kill_mysqld.inc
+--source include/start_mysqld.inc
+
+connect ssl_con,localhost,root,,,,,SSL;
+SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+let $ssl_not_after=`SELECT @ssl_not_after`;
+
+remove_file $ssl_cert;
+remove_file $ssl_key;
+
+--echo # Use a different certificate ("Not after" certificate field changed)
+copy_file $MYSQL_TEST_DIR/std_data/server-new-key.pem $ssl_key;
+copy_file $MYSQL_TEST_DIR/std_data/server-new-cert.pem $ssl_cert;
+
+FLUSH SSL;
+
+--echo # Check new certificate used by new connection
+exec $MYSQL --ssl -e "SELECT IF(VARIABLE_VALUE <> '$ssl_not_after', 'OK', 'FAIL') as Result FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after'";
+
+--echo # Check that existing SSL connection still works, and uses old certificate, even if new one is loaded in FLUSH SSL
+connection ssl_con;
+SELECT IF(VARIABLE_VALUE=@ssl_not_after,'OK','FAIL') as Result FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+
+disconnect ssl_con;
+connection default;
+
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+FLUSH SSL;
+#Check that accepts are zeroed by FLUSH SSL.
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+
+--echo # Cleanup
+remove_file $ssl_cert;
+remove_file $ssl_key;
+# restart with usuall SSL
+let $restart_parameters=;
+--source include/kill_mysqld.inc
+--source include/start_mysqld.inc
+
+
diff --git a/mysql-test/main/fulltext_order_by.result b/mysql-test/main/fulltext_order_by.result
index c2f57c6f9c2..a350a55c75d 100644
--- a/mysql-test/main/fulltext_order_by.result
+++ b/mysql-test/main/fulltext_order_by.result
@@ -126,7 +126,7 @@ group by
a.text, b.id, b.betreff
order by
match(b.betreff) against ('+abc' in boolean mode) desc;
-ERROR 42000: Table 'b' from one of the SELECTs cannot be used in field list
+ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause
select a.text, b.id, b.betreff
from
t2 a inner join t3 b on a.id = b.forum inner join
@@ -142,7 +142,7 @@ where
match(c.beitrag) against ('+abc' in boolean mode)
order by
match(b.betreff) against ('+abc' in boolean mode) desc;
-ERROR 42000: Table 'b' from one of the SELECTs cannot be used in field list
+ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause
select a.text, b.id, b.betreff
from
t2 a inner join t3 b on a.id = b.forum inner join
diff --git a/mysql-test/main/func_analyse.result b/mysql-test/main/func_analyse.result
index 1e78e603bca..1cb9e3c9ad8 100644
--- a/mysql-test/main/func_analyse.result
+++ b/mysql-test/main/func_analyse.result
@@ -153,13 +153,19 @@ End of 5.1 tests
# Start of 10.2 tests
#
(SELECT 1 FROM DUAL PROCEDURE ANALYSE());
+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 'PROCEDURE ANALYSE())' at line 1
+((SELECT 1 FROM DUAL PROCEDURE ANALYSE()));
+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 'PROCEDURE ANALYSE()))' at line 1
+(SELECT 1 FROM DUAL) PROCEDURE ANALYSE();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
1 1 1 1 1 0 0 1.0000 0.0000 ENUM('1') NOT NULL
-((SELECT 1 FROM DUAL PROCEDURE ANALYSE()));
+((SELECT 1 FROM DUAL)) PROCEDURE ANALYSE();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
1 1 1 1 1 0 0 1.0000 0.0000 ENUM('1') NOT NULL
+create table t1 (a int);
SELECT * FROM t1 UNION SELECT * FROM t1 PROCEDURE analyse();
-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 'PROCEDURE analyse()' at line 1
+ERROR 42000: Incorrect usage/placement of 'PROCEDURE'
+drop table t1;
#
# MDEV-10030 sql_yacc.yy: Split table_expression and remove PROCEDURE from create_select, select_paren_derived, select_derived2, query_specification
#
@@ -171,3 +177,48 @@ SELECT (SELECT 1 FROM t1 PROCEDURE ANALYSE()) FROM t2;
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 'PROCEDURE ANALYSE()) FROM t2' at line 1
SELECT ((SELECT 1 FROM t1 PROCEDURE ANALYSE())) FROM t2;
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 'PROCEDURE ANALYSE())) FROM t2' at line 1
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16309 Split ::create_tmp_field() into virtual methods in Item
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+BEGIN NOT ATOMIC
+DECLARE rec ROW(Field_name TEXT,
+Min_value TEXT,
+Max_value TEXT,
+Min_length TEXT,
+Max_length TEXT,
+Empties_or_zeros TEXT,
+Nulls TEXT,
+Avg_value_or_avg_length TEXT,
+Std TEXT,
+Optimal_fieldtype TEXT);
+DECLARE c CURSOR FOR SELECT * FROM t1 PROCEDURE analyse();
+OPEN c;
+FETCH c INTO rec;
+CLOSE c;
+SELECT rec.field_name,
+rec.Min_value, rec.Max_value,
+rec.Min_length, rec. Max_length,
+rec.Empties_or_zeros, rec.Nulls,
+rec.Avg_value_or_avg_length, rec.Std,
+rec.Optimal_fieldtype;
+END;
+$$
+rec.field_name test.t1.a
+rec.Min_value 1
+rec.Max_value 3
+rec.Min_length 1
+rec. Max_length 1
+rec.Empties_or_zeros 0
+rec.Nulls 0
+rec.Avg_value_or_avg_length 2.0000
+rec.Std 0.8165
+rec.Optimal_fieldtype ENUM('1','2','3') NOT NULL
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_analyse.test b/mysql-test/main/func_analyse.test
index d99f5c0fa9a..3c8be90d6e2 100644
--- a/mysql-test/main/func_analyse.test
+++ b/mysql-test/main/func_analyse.test
@@ -161,12 +161,17 @@ DROP TABLE t1, t2;
--echo #
--echo # Start of 10.2 tests
--echo #
+--error ER_PARSE_ERROR
(SELECT 1 FROM DUAL PROCEDURE ANALYSE());
+--error ER_PARSE_ERROR
((SELECT 1 FROM DUAL PROCEDURE ANALYSE()));
+(SELECT 1 FROM DUAL) PROCEDURE ANALYSE();
+((SELECT 1 FROM DUAL)) PROCEDURE ANALYSE();
-# TODO:
---error ER_PARSE_ERROR
+create table t1 (a int);
+--error ER_CANT_USE_OPTION_HERE
SELECT * FROM t1 UNION SELECT * FROM t1 PROCEDURE analyse();
+drop table t1;
--echo #
--echo # MDEV-10030 sql_yacc.yy: Split table_expression and remove PROCEDURE from create_select, select_paren_derived, select_derived2, query_specification
@@ -181,3 +186,47 @@ SELECT * FROM t1 NATURAL JOIN (SELECT * FROM t2 PROCEDURE ANALYSE());
SELECT (SELECT 1 FROM t1 PROCEDURE ANALYSE()) FROM t2;
--error ER_PARSE_ERROR
SELECT ((SELECT 1 FROM t1 PROCEDURE ANALYSE())) FROM t2;
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16309 Split ::create_tmp_field() into virtual methods in Item
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+--vertical_results
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE rec ROW(Field_name TEXT,
+ Min_value TEXT,
+ Max_value TEXT,
+ Min_length TEXT,
+ Max_length TEXT,
+ Empties_or_zeros TEXT,
+ Nulls TEXT,
+ Avg_value_or_avg_length TEXT,
+ Std TEXT,
+ Optimal_fieldtype TEXT);
+ DECLARE c CURSOR FOR SELECT * FROM t1 PROCEDURE analyse();
+ OPEN c;
+ FETCH c INTO rec;
+ CLOSE c;
+ SELECT rec.field_name,
+ rec.Min_value, rec.Max_value,
+ rec.Min_length, rec. Max_length,
+ rec.Empties_or_zeros, rec.Nulls,
+ rec.Avg_value_or_avg_length, rec.Std,
+ rec.Optimal_fieldtype;
+END;
+$$
+DELIMITER ;$$
+--horizontal_results
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_debug.result b/mysql-test/main/func_debug.result
index 5f9c47f0c2f..a120411d4b5 100644
--- a/mysql-test/main/func_debug.result
+++ b/mysql-test/main/func_debug.result
@@ -1565,12 +1565,16 @@ A NULL
Warnings:
Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
Note 1105 DBUG: types_compatible=yes bisect=no
+Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
+Note 1105 DBUG: types_compatible=yes bisect=no
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (a,b);
a b
A NULL
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: types_compatible=yes bisect=no
+Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
+Note 1105 DBUG: types_compatible=yes bisect=no
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (b,'A',10);
a b
A NULL
@@ -1594,6 +1598,9 @@ Warnings:
Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
+Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
+Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
+Note 1105 DBUG: types_compatible=no bisect=no
Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (a,b,10);
a b
@@ -1602,6 +1609,9 @@ Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
+Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
+Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
+Note 1105 DBUG: types_compatible=no bisect=no
Warning 1292 Truncated incorrect DECIMAL value: 'A'
DROP TABLE t1;
#
@@ -1674,3 +1684,283 @@ Warnings:
Note 1105 DBUG: Item_subselect::exec (select max(`test`.`t1`.`a`) from `test`.`t1`)
DROP TABLE t1;
SET SESSION debug_dbug="-d,Item_subselect";
+#
+# MDEV-16408 Remove tests for Item::type() in Item_basic_value::eq()
+#
+SET SESSION debug_dbug="+d,Item_basic_value";
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1 WHERE a BETWEEN 1 AND 1.0;
+a
+1
+Warnings:
+Note 1105 bin_eq=0 a=(int)1 b=(decimal)1.0
+SELECT * FROM t1 WHERE a BETWEEN 1 AND 1;
+a
+1
+Warnings:
+Note 1105 bin_eq=1 a=(int)1 b=(int)1
+SELECT * FROM t1 WHERE a BETWEEN 0 AND 1;
+a
+1
+Warnings:
+Note 1105 bin_eq=0 a=(int)0 b=(int)1
+SELECT * FROM t1 WHERE a BETWEEN 0 AND -1;
+a
+Warnings:
+Note 1105 bin_eq=0 a=(int)0 b=(int)-1
+SELECT * FROM t1 WHERE a BETWEEN -1 AND -1;
+a
+Warnings:
+Note 1105 bin_eq=1 a=(int)-1 b=(int)-1
+SELECT * FROM t1 WHERE a BETWEEN -0000000000000001 AND -1;
+a
+Warnings:
+Note 1105 bin_eq=1 a=(bigint)-1 b=(int)-1
+SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551615;
+a
+1
+2
+3
+Warnings:
+Note 1105 bin_eq=0 a=(int)-1 b=(bigint)18446744073709551615
+SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551616;
+a
+1
+2
+3
+Warnings:
+Note 1105 bin_eq=0 a=(int)-1 b=(decimal)18446744073709551616
+SELECT * FROM t1 WHERE a BETWEEN 1e2 AND 100e0;
+a
+Warnings:
+Note 1105 bin_eq=1 a=(double)1e2 b=(double)100e0
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN 1 AND ?' USING 1;
+a
+1
+Warnings:
+Note 1105 bin_eq=1 a=(int)1 b=(int)1
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN -1 AND ?' USING 18446744073709551615;
+a
+1
+2
+3
+Warnings:
+Note 1105 bin_eq=0 a=(int)-1 b=(bigint)18446744073709551615
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN -1 AND ?' USING 18446744073709551616;
+a
+1
+2
+3
+Warnings:
+Note 1105 bin_eq=0 a=(int)-1 b=(decimal)18446744073709551616
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(10));
+INSERT INTO t1 VALUES ('0'),('1'),('2');
+SELECT * FROM t1 WHERE a BETWEEN '0' AND '0';
+a
+0
+Warnings:
+Note 1105 eq=1 a=(varchar)'0' b=(varchar)'0'
+SELECT * FROM t1 WHERE a BETWEEN '0' AND ' 0';
+a
+Warnings:
+Note 1105 eq=0 a=(varchar)'0' b=(varchar)' 0'
+SELECT * FROM t1 WHERE a BETWEEN '0' AND '0 ';
+a
+0
+Warnings:
+Note 1105 eq=1 a=(varchar)'0' b=(varchar)'0 '
+DROP TABLE t1;
+SET SESSION debug_dbug="-d,Item_basic_value";
+#
+# MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+#
+SET SESSION debug_dbug="+d,Item_basic_value";
+CREATE TABLE t1 (a DECIMAL(10,3));
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1 WHERE a BETWEEN 1.0 AND 1.0;
+a
+1.000
+Warnings:
+Note 1105 bin_eq=1 a=(decimal)1.0 b=(decimal)1.0
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN 1.0 AND ?' USING 1.0;
+a
+1.000
+Warnings:
+Note 1105 bin_eq=1 a=(decimal)1.0 b=(decimal)1.0
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME);
+INSERT INTO t1 VALUES ('00:00:00'),('00:00:01');
+SELECT * FROM t1 WHERE a BETWEEN TIME'00:00:00' AND TIME'00:00:00';
+a
+00:00:00
+Warnings:
+Note 1105 bin_eq=1 a=(time)TIME'00:00:00' b=(time)TIME'00:00:00'
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN TIME''00:00:00'' AND ?' USING TIME'00:00:00';
+a
+00:00:00
+Warnings:
+Note 1105 bin_eq=1 a=(time)TIME'00:00:00' b=(time)TIME'00:00:00'
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('2001-01-01'),('2001-01-02');
+SELECT * FROM t1 WHERE a BETWEEN DATE'2001-01-01' AND DATE'2001-01-01';
+a
+2001-01-01
+Warnings:
+Note 1105 bin_eq=1 a=(date)DATE'2001-01-01' b=(date)DATE'2001-01-01'
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN DATE''2001-01-01'' AND ?' USING DATE'2001-01-01';
+a
+2001-01-01
+Warnings:
+Note 1105 bin_eq=1 a=(date)DATE'2001-01-01' b=(date)DATE'2001-01-01'
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2001-01-01 00:00:00');
+SELECT * FROM t1 WHERE a BETWEEN TIMESTAMP'2001-01-01 00:00:00' AND TIMESTAMP'2001-01-01 00:00:00';
+a
+2001-01-01 00:00:00
+2001-01-01 00:00:00
+Warnings:
+Note 1105 bin_eq=1 a=(datetime)TIMESTAMP'2001-01-01 00:00:00' b=(datetime)TIMESTAMP'2001-01-01 00:00:00'
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN TIMESTAMP''2001-01-01 00:00:00'' AND ?' USING TIMESTAMP'2001-01-01 00:00:00';
+a
+2001-01-01 00:00:00
+2001-01-01 00:00:00
+Warnings:
+Note 1105 bin_eq=1 a=(datetime)TIMESTAMP'2001-01-01 00:00:00' b=(datetime)TIMESTAMP'2001-01-01 00:00:00'
+DROP TABLE t1;
+SET SESSION debug_dbug="-d,Item_basic_value";
+#
+# MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+#
+SET SESSION debug_dbug="+d,Item_basic_value";
+CREATE TABLE t1 (a VARCHAR(10));
+INSERT INTO t1 VALUES ('a'),('b'),('c');
+SELECT * FROM t1 WHERE a BETWEEN 'a' AND 0x61;
+a
+a
+Warnings:
+Note 1105 eq=0 a=(varchar)'a' b=(hex_hybrid)0x61
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN ''a'' AND ?' USING 0x61;
+a
+a
+Warnings:
+Note 1105 eq=0 a=(varchar)'a' b=(hex_hybrid)'a'
+DROP TABLE t1;
+SET SESSION debug_dbug="-d,Item_basic_value";
+#
+# MDEV-16454 Bad results for IN with ROW
+#
+SET SESSION debug_dbug="+d,cmp_item";
+SET SESSION debug_dbug="+d,Item_func_in";
+SET SESSION debug_dbug="+d,Predicant_to_list_comparator";
+SELECT (18446744073709551615,0) IN ((18446744073709551614,0),(-1,0));
+(18446744073709551615,0) IN ((18446744073709551614,0),(-1,0))
+0
+Warnings:
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=bigint
+Note 1105 DBUG: [0,1] handler=bigint
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=decimal
+Note 1105 DBUG: [1,0] handler=int
+Note 1105 DBUG: [1,1] handler=int
+Note 1105 DBUG: [1,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: types_compatible=yes bisect=yes
+SELECT (1,(0,0)) IN ((1,(1,0)),(0,(0,0)));
+(1,(0,0)) IN ((1,(1,0)),(0,(0,0)))
+0
+Warnings:
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=int
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: [1,0] handler=row
+Note 1105 DBUG: [1,1] handler=row
+Note 1105 DBUG: [1,2] handler=row
+Note 1105 DBUG: => handler=row
+Note 1105 DBUG: ROW(3 args) level=1
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=int
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: [1,0] handler=int
+Note 1105 DBUG: [1,1] handler=int
+Note 1105 DBUG: [1,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: types_compatible=yes bisect=yes
+SELECT (1,(0,0),3) IN ((1,(1,0),3),(0,(0,0),3));
+(1,(0,0),3) IN ((1,(1,0),3),(0,(0,0),3))
+0
+Warnings:
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=int
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: [1,0] handler=row
+Note 1105 DBUG: [1,1] handler=row
+Note 1105 DBUG: [1,2] handler=row
+Note 1105 DBUG: => handler=row
+Note 1105 DBUG: ROW(3 args) level=1
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=int
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: [1,0] handler=int
+Note 1105 DBUG: [1,1] handler=int
+Note 1105 DBUG: [1,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: [2,0] handler=int
+Note 1105 DBUG: [2,1] handler=int
+Note 1105 DBUG: [2,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: types_compatible=yes bisect=yes
+SELECT '0x' IN (0);
+'0x' IN (0)
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+SELECT '0x' IN (0,1);
+'0x' IN (0,1)
+1
+Warnings:
+Note 1105 DBUG: [0] arg=1 handler=0 (decimal)
+Note 1105 DBUG: [1] arg=2 handler=0 (decimal)
+Note 1105 DBUG: types_compatible=yes bisect=yes
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+SELECT ('0x',1) IN ((0,1));
+('0x',1) IN ((0,1))
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+SELECT ('0x',1) IN ((0,1),(1,1));
+('0x',1) IN ((0,1),(1,1))
+1
+Warnings:
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=varchar
+Note 1105 DBUG: [0,1] handler=int
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=decimal
+Note 1105 DBUG: [1,0] handler=int
+Note 1105 DBUG: [1,1] handler=int
+Note 1105 DBUG: [1,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: types_compatible=yes bisect=yes
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
+SET SESSION debug_dbug="-d,Item_func_in";
+SET SESSION debug_dbug="-d,cmp_item";
diff --git a/mysql-test/main/func_debug.test b/mysql-test/main/func_debug.test
index 8dd01650ed3..9ae24035e20 100644
--- a/mysql-test/main/func_debug.test
+++ b/mysql-test/main/func_debug.test
@@ -488,3 +488,105 @@ EXPLAIN SELECT * FROM t1 WHERE a IN (1,2,(SELECT MAX(a) FROM t1));
SELECT * FROM t1 WHERE a IN (1,2,(SELECT MAX(a) FROM t1));
DROP TABLE t1;
SET SESSION debug_dbug="-d,Item_subselect";
+
+
+--echo #
+--echo # MDEV-16408 Remove tests for Item::type() in Item_basic_value::eq()
+--echo #
+
+SET SESSION debug_dbug="+d,Item_basic_value";
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1 WHERE a BETWEEN 1 AND 1.0;
+SELECT * FROM t1 WHERE a BETWEEN 1 AND 1;
+SELECT * FROM t1 WHERE a BETWEEN 0 AND 1;
+SELECT * FROM t1 WHERE a BETWEEN 0 AND -1;
+SELECT * FROM t1 WHERE a BETWEEN -1 AND -1;
+SELECT * FROM t1 WHERE a BETWEEN -0000000000000001 AND -1;
+SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551615;
+SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551616;
+SELECT * FROM t1 WHERE a BETWEEN 1e2 AND 100e0;
+
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN 1 AND ?' USING 1;
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN -1 AND ?' USING 18446744073709551615;
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN -1 AND ?' USING 18446744073709551616;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(10));
+INSERT INTO t1 VALUES ('0'),('1'),('2');
+SELECT * FROM t1 WHERE a BETWEEN '0' AND '0';
+SELECT * FROM t1 WHERE a BETWEEN '0' AND ' 0';
+SELECT * FROM t1 WHERE a BETWEEN '0' AND '0 ';
+DROP TABLE t1;
+
+SET SESSION debug_dbug="-d,Item_basic_value";
+
+
+--echo #
+--echo # MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+--echo #
+
+SET SESSION debug_dbug="+d,Item_basic_value";
+
+CREATE TABLE t1 (a DECIMAL(10,3));
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1 WHERE a BETWEEN 1.0 AND 1.0;
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN 1.0 AND ?' USING 1.0;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME);
+INSERT INTO t1 VALUES ('00:00:00'),('00:00:01');
+SELECT * FROM t1 WHERE a BETWEEN TIME'00:00:00' AND TIME'00:00:00';
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN TIME''00:00:00'' AND ?' USING TIME'00:00:00';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('2001-01-01'),('2001-01-02');
+SELECT * FROM t1 WHERE a BETWEEN DATE'2001-01-01' AND DATE'2001-01-01';
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN DATE''2001-01-01'' AND ?' USING DATE'2001-01-01';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2001-01-01 00:00:00');
+SELECT * FROM t1 WHERE a BETWEEN TIMESTAMP'2001-01-01 00:00:00' AND TIMESTAMP'2001-01-01 00:00:00';
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN TIMESTAMP''2001-01-01 00:00:00'' AND ?' USING TIMESTAMP'2001-01-01 00:00:00';
+DROP TABLE t1;
+
+SET SESSION debug_dbug="-d,Item_basic_value";
+
+
+--echo #
+--echo # MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+--echo #
+
+SET SESSION debug_dbug="+d,Item_basic_value";
+
+CREATE TABLE t1 (a VARCHAR(10));
+INSERT INTO t1 VALUES ('a'),('b'),('c');
+SELECT * FROM t1 WHERE a BETWEEN 'a' AND 0x61;
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a BETWEEN ''a'' AND ?' USING 0x61;
+DROP TABLE t1;
+
+SET SESSION debug_dbug="-d,Item_basic_value";
+
+
+--echo #
+--echo # MDEV-16454 Bad results for IN with ROW
+--echo #
+
+SET SESSION debug_dbug="+d,cmp_item";
+SET SESSION debug_dbug="+d,Item_func_in";
+SET SESSION debug_dbug="+d,Predicant_to_list_comparator";
+
+SELECT (18446744073709551615,0) IN ((18446744073709551614,0),(-1,0));
+SELECT (1,(0,0)) IN ((1,(1,0)),(0,(0,0)));
+SELECT (1,(0,0),3) IN ((1,(1,0),3),(0,(0,0),3));
+
+SELECT '0x' IN (0);
+SELECT '0x' IN (0,1);
+SELECT ('0x',1) IN ((0,1));
+SELECT ('0x',1) IN ((0,1),(1,1));
+
+SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
+SET SESSION debug_dbug="-d,Item_func_in";
+SET SESSION debug_dbug="-d,cmp_item";
diff --git a/mysql-test/main/func_default.result b/mysql-test/main/func_default.result
index 8e4a647ff8e..55efbda546d 100644
--- a/mysql-test/main/func_default.result
+++ b/mysql-test/main/func_default.result
@@ -173,10 +173,6 @@ select default(a) = now() from v2;
default(a) = now()
1
1
-select table_name,is_updatable from information_schema.views;
-table_name is_updatable
-v1 NO
-v2 YES
drop view v1, v2;
drop table t1;
create table t1 (v1 timestamp) select 'x';
diff --git a/mysql-test/main/func_default.test b/mysql-test/main/func_default.test
index 25bf5d24b9f..d2099d3ef4c 100644
--- a/mysql-test/main/func_default.test
+++ b/mysql-test/main/func_default.test
@@ -148,8 +148,6 @@ create algorithm=temptable view v1 as select * from t1;
create algorithm=merge view v2 as select * from t1;
select default(a) = now() from v1;
select default(a) = now() from v2;
---sorted_result
-select table_name,is_updatable from information_schema.views;
drop view v1, v2;
drop table t1;
diff --git a/mysql-test/main/func_extract.result b/mysql-test/main/func_extract.result
new file mode 100644
index 00000000000..30ec0460d61
--- /dev/null
+++ b/mysql-test/main/func_extract.result
@@ -0,0 +1,592 @@
+#
+# MDEV-17385 MICROSECOND() returns confusing results with an out-of-range TIME-alike argument
+#
+CREATE TABLE t1 (v VARCHAR(64), ll BIGINT, t TIME, dt DATETIME, d DATE);
+CREATE TABLE t2 AS SELECT
+EXTRACT(DAY FROM t),
+EXTRACT(DAY_HOUR FROM t),
+EXTRACT(DAY_MINUTE FROM t),
+EXTRACT(DAY_SECOND FROM t),
+EXTRACT(DAY_MICROSECOND FROM t),
+EXTRACT(DAY FROM d),
+EXTRACT(DAY_HOUR FROM d),
+EXTRACT(DAY_MINUTE FROM d),
+EXTRACT(DAY_SECOND FROM d),
+EXTRACT(DAY_MICROSECOND FROM d),
+EXTRACT(DAY FROM v),
+EXTRACT(DAY_HOUR FROM v),
+EXTRACT(DAY_MINUTE FROM v),
+EXTRACT(DAY_SECOND FROM v),
+EXTRACT(DAY_MICROSECOND FROM v),
+EXTRACT(DAY FROM ll),
+EXTRACT(DAY_HOUR FROM ll),
+EXTRACT(DAY_MINUTE FROM ll),
+EXTRACT(DAY_SECOND FROM ll),
+EXTRACT(DAY_MICROSECOND FROM ll)
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `EXTRACT(DAY FROM t)` int(3) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM t)` int(5) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM t)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM t)` int(9) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM t)` bigint(15) DEFAULT NULL,
+ `EXTRACT(DAY FROM d)` int(3) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM d)` int(5) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM d)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM d)` int(9) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM d)` bigint(15) DEFAULT NULL,
+ `EXTRACT(DAY FROM v)` int(8) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM v)` int(10) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM v)` bigint(12) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM v)` bigint(14) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM v)` bigint(20) DEFAULT NULL,
+ `EXTRACT(DAY FROM ll)` int(8) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM ll)` int(10) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM ll)` bigint(12) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM ll)` bigint(14) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM ll)` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64), b DECIMAL(32,9));
+INSERT INTO t1 VALUES
+('9999-12-31 23:59:59.123456', 99991231235959.123456),
+('2001-01-01 10:20:30.123456', 20010101102030.123456),
+('4294967296:59:59.123456', 42949672965959.123456),
+('4294967295:59:59.123456', 42949672955959.123456),
+('87649416:59:59.123456', 876494165959.123456),
+('87649415:59:59.123456', 876494155959.123456),
+('87649414:59:59.123456', 876494145959.123456),
+('9999:59:59.123456', 99995959.123456),
+('9999:01:01.123456', 99990101.123456),
+('9999:01:01', 99990101),
+('0.999999', 0.999999),
+('0.99999', 0.99999),
+('0.9999', 0.9999),
+('0.999', 0.999),
+('0.99', 0.99),
+('0.9', 0.9),
+('000000',0);
+# Summary:
+# Check that FUNC(varchar) and FUNC(decimal) give equal results
+# Expect empty sets
+SELECT a, b, EXTRACT(DAY_HOUR FROM a), EXTRACT(DAY_HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(DAY_HOUR FROM a)<=>EXTRACT(DAY_HOUR FROM b));
+a b EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_HOUR FROM b)
+SELECT a, b, EXTRACT(DAY FROM a), EXTRACT(DAY FROM b) FROM t1 WHERE NOT (EXTRACT(DAY FROM a)<=>EXTRACT(DAY FROM b));
+a b EXTRACT(DAY FROM a) EXTRACT(DAY FROM b)
+SELECT a, b, EXTRACT(HOUR FROM a), EXTRACT(HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(HOUR FROM a)<=>EXTRACT(HOUR FROM b));
+a b EXTRACT(HOUR FROM a) EXTRACT(HOUR FROM b)
+SELECT a, b, EXTRACT(MINUTE FROM a), EXTRACT(MINUTE FROM b) FROM t1 WHERE NOT (EXTRACT(MINUTE FROM a)<=>EXTRACT(MINUTE FROM b));
+a b EXTRACT(MINUTE FROM a) EXTRACT(MINUTE FROM b)
+SELECT a, b, EXTRACT(SECOND FROM a), EXTRACT(SECOND FROM b) FROM t1 WHERE NOT (EXTRACT(SECOND FROM a)<=>EXTRACT(SECOND FROM b));
+a b EXTRACT(SECOND FROM a) EXTRACT(SECOND FROM b)
+SELECT a, b, EXTRACT(MICROSECOND FROM a), EXTRACT(MICROSECOND FROM b) FROM t1 WHERE NOT (EXTRACT(MICROSECOND FROM a)<=>EXTRACT(MICROSECOND FROM b));
+a b EXTRACT(MICROSECOND FROM a) EXTRACT(MICROSECOND FROM b)
+# Detailed results
+SELECT
+a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+EXTRACT(DAY FROM a) * 24 + EXTRACT(HOUR FROM a) AS dh,
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a)
+FROM t1;
+a cidm dh EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a)
+9999-12-31 23:59:59.123456 NULL 767 3123 31 23 59 59 123456
+2001-01-01 10:20:30.123456 NULL 34 110 1 10 20 30 123456
+4294967296:59:59.123456 NULL NULL NULL NULL NULL NULL NULL NULL
+4294967295:59:59.123456 NULL NULL NULL NULL NULL NULL NULL NULL
+87649416:59:59.123456 NULL NULL NULL NULL NULL NULL NULL NULL
+87649415:59:59.123456 3652058 23:59:59.123456 87649415 365205823 3652058 23 59 59 123456
+87649414:59:59.123456 3652058 22:59:59.123456 87649414 365205822 3652058 22 59 59 123456
+9999:59:59.123456 416 15:59:59.123456 9999 41615 416 15 59 59 123456
+9999:01:01.123456 416 15:01:01.123456 9999 41615 416 15 1 1 123456
+9999:01:01 416 15:01:01.000000 9999 41615 416 15 1 1 0
+0.999999 00:00:00.999999 0 0 0 0 0 0 999999
+0.99999 00:00:00.999990 0 0 0 0 0 0 999990
+0.9999 00:00:00.999900 0 0 0 0 0 0 999900
+0.999 00:00:00.999000 0 0 0 0 0 0 999000
+0.99 00:00:00.990000 0 0 0 0 0 0 990000
+0.9 00:00:00.900000 0 0 0 0 0 0 900000
+000000 00:00:00.000000 0 0 0 0 0 0 0
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '9999-12-31 23:59:59.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 10:20:30.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+SELECT
+b,
+CAST(b AS INTERVAL DAY_SECOND(6)) AS cidm,
+EXTRACT(DAY FROM b) * 24 + EXTRACT(HOUR FROM b) AS dh,
+EXTRACT(DAY_HOUR FROM b),
+EXTRACT(DAY FROM b),
+EXTRACT(HOUR FROM b),
+EXTRACT(MINUTE FROM b),
+EXTRACT(SECOND FROM b),
+EXTRACT(MICROSECOND FROM b)
+FROM t1;
+b cidm dh EXTRACT(DAY_HOUR FROM b) EXTRACT(DAY FROM b) EXTRACT(HOUR FROM b) EXTRACT(MINUTE FROM b) EXTRACT(SECOND FROM b) EXTRACT(MICROSECOND FROM b)
+99991231235959.123456000 NULL 767 3123 31 23 59 59 123456
+20010101102030.123456000 NULL 34 110 1 10 20 30 123456
+42949672965959.123456000 NULL NULL NULL NULL NULL NULL NULL NULL
+42949672955959.123456000 NULL NULL NULL NULL NULL NULL NULL NULL
+876494165959.123456000 NULL NULL NULL NULL NULL NULL NULL NULL
+876494155959.123456000 3652058 23:59:59.123456 87649415 365205823 3652058 23 59 59 123456
+876494145959.123456000 3652058 22:59:59.123456 87649414 365205822 3652058 22 59 59 123456
+99995959.123456000 416 15:59:59.123456 9999 41615 416 15 59 59 123456
+99990101.123456000 416 15:01:01.123456 9999 41615 416 15 1 1 123456
+99990101.000000000 416 15:01:01.000000 9999 41615 416 15 1 1 0
+0.999999000 00:00:00.999999 0 0 0 0 0 0 999999
+0.999990000 00:00:00.999990 0 0 0 0 0 0 999990
+0.999900000 00:00:00.999900 0 0 0 0 0 0 999900
+0.999000000 00:00:00.999000 0 0 0 0 0 0 999000
+0.990000000 00:00:00.990000 0 0 0 0 0 0 990000
+0.900000000 00:00:00.900000 0 0 0 0 0 0 900000
+0.000000000 00:00:00.000000 0 0 0 0 0 0 0
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '99991231235959.123456000'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '20010101102030.123456000'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '42949672965959.123456000'
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '42949672955959.123456000'
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '876494165959.123456000'
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494155959.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494145959.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '99995959.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '99990101.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '99990101.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999900000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.990000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.900000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.000000000'
+DROP TABLE t1;
+# Special case: DAY + TIME
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('9999-01-01');
+SELECT a,
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a)
+FROM t1;
+a EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_MINUTE FROM a) EXTRACT(DAY_SECOND FROM a) EXTRACT(DAY_MICROSECOND FROM a) EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a)
+9999-01-01 100 10000 1000000 1000000000000 1 0 0 0 0
+DROP TABLE t1;
+# Bad values
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('');
+SELECT a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a)
+FROM t1;
+a cidm EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_MINUTE FROM a) EXTRACT(DAY_SECOND FROM a) EXTRACT(DAY_MICROSECOND FROM a) EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a)
+ NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+DROP TABLE t1;
+# Backward compatibility
+# This still parses as DATETIME
+SELECT EXTRACT(YEAR FROM '2001/02/03 10:20:30');
+EXTRACT(YEAR FROM '2001/02/03 10:20:30')
+2001
+SELECT EXTRACT(MONTH FROM '2001/02/03 10:20:30');
+EXTRACT(MONTH FROM '2001/02/03 10:20:30')
+2
+SELECT EXTRACT(DAY FROM '2001/02/03 10:20:30');
+EXTRACT(DAY FROM '2001/02/03 10:20:30')
+3
+SELECT EXTRACT(YEAR FROM '01/02/03 10:20:30');
+EXTRACT(YEAR FROM '01/02/03 10:20:30')
+2001
+SELECT EXTRACT(MONTH FROM '01/02/03 10:20:30');
+EXTRACT(MONTH FROM '01/02/03 10:20:30')
+2
+SELECT EXTRACT(DAY FROM '01/02/03 10:20:30');
+EXTRACT(DAY FROM '01/02/03 10:20:30')
+3
+SELECT EXTRACT(YEAR FROM '01:02:03 10:20:30');
+EXTRACT(YEAR FROM '01:02:03 10:20:30')
+2001
+SELECT EXTRACT(MONTH FROM '01:02:03 10:20:30');
+EXTRACT(MONTH FROM '01:02:03 10:20:30')
+2
+SELECT EXTRACT(DAY FROM '01:02:03 10:20:30');
+EXTRACT(DAY FROM '01:02:03 10:20:30')
+3
+# This still parses as DATETIME and returns NULL
+SELECT EXTRACT(YEAR FROM "2011-02-32 8:46:06.23434");
+EXTRACT(YEAR FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2011-02-32 8:46:06.23434'
+SELECT EXTRACT(MONTH FROM "2011-02-32 8:46:06.23434");
+EXTRACT(MONTH FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2011-02-32 8:46:06.23434'
+SELECT EXTRACT(DAY FROM "2011-02-32 8:46:06.23434");
+EXTRACT(DAY FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '2011-02-32 8:46:06.23434'
+SELECT EXTRACT(HOUR FROM "2011-02-32 8:46:06.23434");
+EXTRACT(HOUR FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '2011-02-32 8:46:06.23434'
+# This still parses as DATE
+SELECT EXTRACT(YEAR FROM '2001/02/03');
+EXTRACT(YEAR FROM '2001/02/03')
+2001
+SELECT EXTRACT(MONTH FROM '2001/02/03');
+EXTRACT(MONTH FROM '2001/02/03')
+2
+SELECT EXTRACT(DAY FROM '2001/02/03');
+EXTRACT(DAY FROM '2001/02/03')
+3
+SELECT EXTRACT(YEAR FROM '01/02/03');
+EXTRACT(YEAR FROM '01/02/03')
+2001
+SELECT EXTRACT(MONTH FROM '01/02/03');
+EXTRACT(MONTH FROM '01/02/03')
+2
+SELECT EXTRACT(DAY FROM '01/02/03');
+EXTRACT(DAY FROM '01/02/03')
+3
+SELECT EXTRACT(YEAR FROM '01-02-03');
+EXTRACT(YEAR FROM '01-02-03')
+2001
+SELECT EXTRACT(MONTH FROM '01-02-03');
+EXTRACT(MONTH FROM '01-02-03')
+2
+SELECT EXTRACT(DAY FROM '01-02-03');
+EXTRACT(DAY FROM '01-02-03')
+3
+SELECT EXTRACT(YEAR FROM '1-2-3');
+EXTRACT(YEAR FROM '1-2-3')
+1
+SELECT EXTRACT(MONTH FROM '1-2-3');
+EXTRACT(MONTH FROM '1-2-3')
+2
+SELECT EXTRACT(DAY FROM '1-2-3');
+EXTRACT(DAY FROM '1-2-3')
+3
+SELECT EXTRACT(HOUR FROM '1-2-3');
+EXTRACT(HOUR FROM '1-2-3')
+0
+SELECT EXTRACT(DAY FROM '2024-01-03 garbage /////');
+EXTRACT(DAY FROM '2024-01-03 garbage /////')
+3
+Warnings:
+Warning 1292 Truncated incorrect date value: '2024-01-03 garbage /////'
+SELECT EXTRACT(DAY FROM '24-01-03 garbage /////');
+EXTRACT(DAY FROM '24-01-03 garbage /////')
+3
+Warnings:
+Warning 1292 Truncated incorrect date value: '24-01-03 garbage /////'
+SELECT EXTRACT(DAY FROM '01-02-03');
+EXTRACT(DAY FROM '01-02-03')
+3
+SELECT EXTRACT(DAY FROM '24:02:03T');
+EXTRACT(DAY FROM '24:02:03T')
+3
+SELECT EXTRACT(DAY FROM '24-02-03');
+EXTRACT(DAY FROM '24-02-03')
+3
+SELECT EXTRACT(DAY FROM '24/02/03');
+EXTRACT(DAY FROM '24/02/03')
+3
+SELECT EXTRACT(DAY FROM '11111');
+EXTRACT(DAY FROM '11111')
+1
+SELECT TIME('2001-01-01T'), TIME('2001-01-01T ');
+TIME('2001-01-01T') TIME('2001-01-01T ')
+00:00:00 00:00:00
+SELECT TIME('2001/01/01T'), TIME('2001/01/01T ');
+TIME('2001/01/01T') TIME('2001/01/01T ')
+00:00:00 00:00:00
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+TIME('2001:01:01T') TIME('2001:01:01T ')
+00:00:00 00:00:00
+SELECT EXTRACT(DAY FROM '2001-01-01T'), EXTRACT(DAY FROM '2001-01-01T ');
+EXTRACT(DAY FROM '2001-01-01T') EXTRACT(DAY FROM '2001-01-01T ')
+1 1
+SELECT EXTRACT(DAY FROM '2001/01/01T'), EXTRACT(DAY FROM '2001/01/01T ');
+EXTRACT(DAY FROM '2001/01/01T') EXTRACT(DAY FROM '2001/01/01T ')
+1 1
+SELECT EXTRACT(DAY FROM '2001:01:01T'), EXTRACT(DAY FROM '2001:01:01T ');
+EXTRACT(DAY FROM '2001:01:01T') EXTRACT(DAY FROM '2001:01:01T ')
+1 1
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+TIME('2001:01:01T') TIME('2001:01:01T ')
+00:00:00 00:00:00
+SELECT EXTRACT(HOUR FROM '2001-01-01T'), EXTRACT(HOUR FROM '2001-01-01T ');
+EXTRACT(HOUR FROM '2001-01-01T') EXTRACT(HOUR FROM '2001-01-01T ')
+0 0
+SELECT EXTRACT(HOUR FROM '2001/01/01T'), EXTRACT(HOUR FROM '2001/01/01T ');
+EXTRACT(HOUR FROM '2001/01/01T') EXTRACT(HOUR FROM '2001/01/01T ')
+0 0
+SELECT EXTRACT(HOUR FROM '2001:01:01T'), EXTRACT(HOUR FROM '2001:01:01T ');
+EXTRACT(HOUR FROM '2001:01:01T') EXTRACT(HOUR FROM '2001:01:01T ')
+0 0
+# This still parses as DATE and returns NULL (without trying TIME)
+SELECT EXTRACT(DAY FROM '100000:02:03T');
+EXTRACT(DAY FROM '100000:02:03T')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '100000:02:03T'
+SELECT EXTRACT(DAY FROM '100000/02/03');
+EXTRACT(DAY FROM '100000/02/03')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '100000/02/03'
+SELECT EXTRACT(DAY FROM '100000-02-03');
+EXTRACT(DAY FROM '100000-02-03')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '100000-02-03'
+SELECT EXTRACT(DAY FROM '1111');
+EXTRACT(DAY FROM '1111')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '1111'
+SELECT EXTRACT(DAY FROM '111');
+EXTRACT(DAY FROM '111')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '111'
+SELECT EXTRACT(DAY FROM '11');
+EXTRACT(DAY FROM '11')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '11'
+SELECT EXTRACT(DAY FROM '1');
+EXTRACT(DAY FROM '1')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '1'
+# This still parses as TIME
+SELECT EXTRACT(HOUR FROM '11111');
+EXTRACT(HOUR FROM '11111')
+1
+SELECT EXTRACT(HOUR FROM '1111');
+EXTRACT(HOUR FROM '1111')
+0
+SELECT EXTRACT(HOUR FROM '111');
+EXTRACT(HOUR FROM '111')
+0
+SELECT EXTRACT(HOUR FROM '11');
+EXTRACT(HOUR FROM '11')
+0
+SELECT EXTRACT(HOUR FROM '1');
+EXTRACT(HOUR FROM '1')
+0
+SELECT TIME('01:02:03:');
+TIME('01:02:03:')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+SELECT TIME('01:02:03-');
+TIME('01:02:03-')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+SELECT TIME('01:02:03;');
+TIME('01:02:03;')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+SELECT TIME('01:02:03/');
+TIME('01:02:03/')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+SELECT EXTRACT(HOUR FROM '01:02:03:');
+EXTRACT(HOUR FROM '01:02:03:')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+SELECT EXTRACT(HOUR FROM '01:02:03-');
+EXTRACT(HOUR FROM '01:02:03-')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+SELECT EXTRACT(HOUR FROM '01:02:03;');
+EXTRACT(HOUR FROM '01:02:03;')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+SELECT EXTRACT(HOUR FROM '01:02:03/');
+EXTRACT(HOUR FROM '01:02:03/')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+# Backward compatibility preserved for YEAR and MONTH only
+# (behavior has changed for DAY, see below)
+SELECT EXTRACT(YEAR FROM '01:02:03');
+EXTRACT(YEAR FROM '01:02:03')
+2001
+SELECT EXTRACT(MONTH FROM '01:02:03');
+EXTRACT(MONTH FROM '01:02:03')
+2
+SELECT EXTRACT(YEAR FROM '24:01:03 garbage /////');
+EXTRACT(YEAR FROM '24:01:03 garbage /////')
+2024
+Warnings:
+Warning 1292 Truncated incorrect date value: '24:01:03 garbage /////'
+SELECT EXTRACT(MONTH FROM '24:01:03 garbage /////');
+EXTRACT(MONTH FROM '24:01:03 garbage /////')
+1
+Warnings:
+Warning 1292 Truncated incorrect date value: '24:01:03 garbage /////'
+# This still parses as TIME 00:20:01
+SELECT TIME('2001/01/01');
+TIME('2001/01/01')
+00:20:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '2001/01/01'
+SELECT TIME('2001-01-01');
+TIME('2001-01-01')
+00:20:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '2001-01-01'
+# This still parses as TIME and overflows to '838:59:59'
+SELECT TIME('2001:01:01');
+TIME('2001:01:01')
+838:59:59
+Warnings:
+Warning 1292 Truncated incorrect time value: '2001:01:01'
+# This used to parse as DATE, now parses as TIME interval
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2024:01:03 garbage /////'),
+('24:01:03 garbage /////'),
+('01:01:03 garbage /////'),
+('2024:02:03'),
+('100000:02:03'),
+('24:02:03'),
+('01:02:03'),
+('01:02:03:'),
+('01:02:03-'),
+('01:02:03;'),
+('01:02:03/'),
+('20 10:20:30');
+SELECT
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_SECOND FROM a), a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm
+FROM t1;
+EXTRACT(DAY FROM a) EXTRACT(DAY_SECOND FROM a) a cidm
+84 84080103 2024:01:03 garbage ///// NULL
+1 1000103 24:01:03 garbage ///// NULL
+0 10103 01:01:03 garbage ///// NULL
+84 84080203 2024:02:03 84 08:02:03.000000
+4166 4166160203 100000:02:03 4166 16:02:03.000000
+1 1000203 24:02:03 1 00:02:03.000000
+0 10203 01:02:03 01:02:03.000000
+0 10203 01:02:03: 01:02:03.000000
+0 10203 01:02:03- NULL
+0 10203 01:02:03; 01:02:03.000000
+0 10203 01:02:03/ 01:02:03.000000
+20 20102030 20 10:20:30 20 10:20:30.000000
+Warnings:
+Warning 1292 Truncated incorrect time value: '2024:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '2024:01:03 garbage /////'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2024:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '24:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '24:01:03 garbage /////'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '24:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '01:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '01:01:03 garbage /////'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '01:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+Warning 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '01:02:03:'
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '01:02:03-'
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+Warning 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '01:02:03;'
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+Warning 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '01:02:03/'
+DROP TABLE t1;
diff --git a/mysql-test/main/func_extract.test b/mysql-test/main/func_extract.test
new file mode 100644
index 00000000000..edc99b9c00c
--- /dev/null
+++ b/mysql-test/main/func_extract.test
@@ -0,0 +1,257 @@
+--echo #
+--echo # MDEV-17385 MICROSECOND() returns confusing results with an out-of-range TIME-alike argument
+--echo #
+
+CREATE TABLE t1 (v VARCHAR(64), ll BIGINT, t TIME, dt DATETIME, d DATE);
+CREATE TABLE t2 AS SELECT
+ EXTRACT(DAY FROM t),
+ EXTRACT(DAY_HOUR FROM t),
+ EXTRACT(DAY_MINUTE FROM t),
+ EXTRACT(DAY_SECOND FROM t),
+ EXTRACT(DAY_MICROSECOND FROM t),
+ EXTRACT(DAY FROM d),
+ EXTRACT(DAY_HOUR FROM d),
+ EXTRACT(DAY_MINUTE FROM d),
+ EXTRACT(DAY_SECOND FROM d),
+ EXTRACT(DAY_MICROSECOND FROM d),
+ EXTRACT(DAY FROM v),
+ EXTRACT(DAY_HOUR FROM v),
+ EXTRACT(DAY_MINUTE FROM v),
+ EXTRACT(DAY_SECOND FROM v),
+ EXTRACT(DAY_MICROSECOND FROM v),
+ EXTRACT(DAY FROM ll),
+ EXTRACT(DAY_HOUR FROM ll),
+ EXTRACT(DAY_MINUTE FROM ll),
+ EXTRACT(DAY_SECOND FROM ll),
+ EXTRACT(DAY_MICROSECOND FROM ll)
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (a VARCHAR(64), b DECIMAL(32,9));
+INSERT INTO t1 VALUES
+('9999-12-31 23:59:59.123456', 99991231235959.123456),
+('2001-01-01 10:20:30.123456', 20010101102030.123456),
+('4294967296:59:59.123456', 42949672965959.123456),
+('4294967295:59:59.123456', 42949672955959.123456),
+('87649416:59:59.123456', 876494165959.123456),
+('87649415:59:59.123456', 876494155959.123456),
+('87649414:59:59.123456', 876494145959.123456),
+('9999:59:59.123456', 99995959.123456),
+('9999:01:01.123456', 99990101.123456),
+('9999:01:01', 99990101),
+('0.999999', 0.999999),
+('0.99999', 0.99999),
+('0.9999', 0.9999),
+('0.999', 0.999),
+('0.99', 0.99),
+('0.9', 0.9),
+('000000',0);
+
+--echo # Summary:
+--echo # Check that FUNC(varchar) and FUNC(decimal) give equal results
+--echo # Expect empty sets
+--disable_warnings
+SELECT a, b, EXTRACT(DAY_HOUR FROM a), EXTRACT(DAY_HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(DAY_HOUR FROM a)<=>EXTRACT(DAY_HOUR FROM b));
+SELECT a, b, EXTRACT(DAY FROM a), EXTRACT(DAY FROM b) FROM t1 WHERE NOT (EXTRACT(DAY FROM a)<=>EXTRACT(DAY FROM b));
+SELECT a, b, EXTRACT(HOUR FROM a), EXTRACT(HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(HOUR FROM a)<=>EXTRACT(HOUR FROM b));
+SELECT a, b, EXTRACT(MINUTE FROM a), EXTRACT(MINUTE FROM b) FROM t1 WHERE NOT (EXTRACT(MINUTE FROM a)<=>EXTRACT(MINUTE FROM b));
+SELECT a, b, EXTRACT(SECOND FROM a), EXTRACT(SECOND FROM b) FROM t1 WHERE NOT (EXTRACT(SECOND FROM a)<=>EXTRACT(SECOND FROM b));
+SELECT a, b, EXTRACT(MICROSECOND FROM a), EXTRACT(MICROSECOND FROM b) FROM t1 WHERE NOT (EXTRACT(MICROSECOND FROM a)<=>EXTRACT(MICROSECOND FROM b));
+--enable_warnings
+
+--echo # Detailed results
+SELECT
+ a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+ EXTRACT(DAY FROM a) * 24 + EXTRACT(HOUR FROM a) AS dh,
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a)
+FROM t1;
+SELECT
+ b,
+ CAST(b AS INTERVAL DAY_SECOND(6)) AS cidm,
+ EXTRACT(DAY FROM b) * 24 + EXTRACT(HOUR FROM b) AS dh,
+ EXTRACT(DAY_HOUR FROM b),
+ EXTRACT(DAY FROM b),
+ EXTRACT(HOUR FROM b),
+ EXTRACT(MINUTE FROM b),
+ EXTRACT(SECOND FROM b),
+ EXTRACT(MICROSECOND FROM b)
+FROM t1;
+DROP TABLE t1;
+
+--echo # Special case: DAY + TIME
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('9999-01-01');
+SELECT a,
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY_MINUTE FROM a),
+ EXTRACT(DAY_SECOND FROM a),
+ EXTRACT(DAY_MICROSECOND FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a)
+FROM t1;
+DROP TABLE t1;
+
+--echo # Bad values
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('');
+SELECT a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY_MINUTE FROM a),
+ EXTRACT(DAY_SECOND FROM a),
+ EXTRACT(DAY_MICROSECOND FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a)
+FROM t1;
+DROP TABLE t1;
+
+
+--echo # Backward compatibility
+
+--echo # This still parses as DATETIME
+SELECT EXTRACT(YEAR FROM '2001/02/03 10:20:30');
+SELECT EXTRACT(MONTH FROM '2001/02/03 10:20:30');
+SELECT EXTRACT(DAY FROM '2001/02/03 10:20:30');
+
+SELECT EXTRACT(YEAR FROM '01/02/03 10:20:30');
+SELECT EXTRACT(MONTH FROM '01/02/03 10:20:30');
+SELECT EXTRACT(DAY FROM '01/02/03 10:20:30');
+
+SELECT EXTRACT(YEAR FROM '01:02:03 10:20:30');
+SELECT EXTRACT(MONTH FROM '01:02:03 10:20:30');
+SELECT EXTRACT(DAY FROM '01:02:03 10:20:30');
+
+--echo # This still parses as DATETIME and returns NULL
+
+SELECT EXTRACT(YEAR FROM "2011-02-32 8:46:06.23434");
+SELECT EXTRACT(MONTH FROM "2011-02-32 8:46:06.23434");
+SELECT EXTRACT(DAY FROM "2011-02-32 8:46:06.23434");
+SELECT EXTRACT(HOUR FROM "2011-02-32 8:46:06.23434");
+
+--echo # This still parses as DATE
+
+SELECT EXTRACT(YEAR FROM '2001/02/03');
+SELECT EXTRACT(MONTH FROM '2001/02/03');
+SELECT EXTRACT(DAY FROM '2001/02/03');
+
+SELECT EXTRACT(YEAR FROM '01/02/03');
+SELECT EXTRACT(MONTH FROM '01/02/03');
+SELECT EXTRACT(DAY FROM '01/02/03');
+
+SELECT EXTRACT(YEAR FROM '01-02-03');
+SELECT EXTRACT(MONTH FROM '01-02-03');
+SELECT EXTRACT(DAY FROM '01-02-03');
+
+SELECT EXTRACT(YEAR FROM '1-2-3');
+SELECT EXTRACT(MONTH FROM '1-2-3');
+SELECT EXTRACT(DAY FROM '1-2-3');
+SELECT EXTRACT(HOUR FROM '1-2-3');
+
+SELECT EXTRACT(DAY FROM '2024-01-03 garbage /////');
+SELECT EXTRACT(DAY FROM '24-01-03 garbage /////');
+SELECT EXTRACT(DAY FROM '01-02-03');
+
+SELECT EXTRACT(DAY FROM '24:02:03T');
+SELECT EXTRACT(DAY FROM '24-02-03');
+SELECT EXTRACT(DAY FROM '24/02/03');
+
+SELECT EXTRACT(DAY FROM '11111');
+
+SELECT TIME('2001-01-01T'), TIME('2001-01-01T ');
+SELECT TIME('2001/01/01T'), TIME('2001/01/01T ');
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+
+SELECT EXTRACT(DAY FROM '2001-01-01T'), EXTRACT(DAY FROM '2001-01-01T ');
+SELECT EXTRACT(DAY FROM '2001/01/01T'), EXTRACT(DAY FROM '2001/01/01T ');
+SELECT EXTRACT(DAY FROM '2001:01:01T'), EXTRACT(DAY FROM '2001:01:01T ');
+
+
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+SELECT EXTRACT(HOUR FROM '2001-01-01T'), EXTRACT(HOUR FROM '2001-01-01T ');
+SELECT EXTRACT(HOUR FROM '2001/01/01T'), EXTRACT(HOUR FROM '2001/01/01T ');
+SELECT EXTRACT(HOUR FROM '2001:01:01T'), EXTRACT(HOUR FROM '2001:01:01T ');
+
+--echo # This still parses as DATE and returns NULL (without trying TIME)
+SELECT EXTRACT(DAY FROM '100000:02:03T');
+SELECT EXTRACT(DAY FROM '100000/02/03');
+SELECT EXTRACT(DAY FROM '100000-02-03');
+
+SELECT EXTRACT(DAY FROM '1111');
+SELECT EXTRACT(DAY FROM '111');
+SELECT EXTRACT(DAY FROM '11');
+SELECT EXTRACT(DAY FROM '1');
+
+
+--echo # This still parses as TIME
+
+SELECT EXTRACT(HOUR FROM '11111');
+SELECT EXTRACT(HOUR FROM '1111');
+SELECT EXTRACT(HOUR FROM '111');
+SELECT EXTRACT(HOUR FROM '11');
+SELECT EXTRACT(HOUR FROM '1');
+
+SELECT TIME('01:02:03:');
+SELECT TIME('01:02:03-');
+SELECT TIME('01:02:03;');
+SELECT TIME('01:02:03/');
+
+SELECT EXTRACT(HOUR FROM '01:02:03:');
+SELECT EXTRACT(HOUR FROM '01:02:03-');
+SELECT EXTRACT(HOUR FROM '01:02:03;');
+SELECT EXTRACT(HOUR FROM '01:02:03/');
+
+--echo # Backward compatibility preserved for YEAR and MONTH only
+--echo # (behavior has changed for DAY, see below)
+SELECT EXTRACT(YEAR FROM '01:02:03');
+SELECT EXTRACT(MONTH FROM '01:02:03');
+
+SELECT EXTRACT(YEAR FROM '24:01:03 garbage /////');
+SELECT EXTRACT(MONTH FROM '24:01:03 garbage /////');
+
+--echo # This still parses as TIME 00:20:01
+
+SELECT TIME('2001/01/01');
+SELECT TIME('2001-01-01');
+
+--echo # This still parses as TIME and overflows to '838:59:59'
+SELECT TIME('2001:01:01');
+
+
+--echo # This used to parse as DATE, now parses as TIME interval
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2024:01:03 garbage /////'),
+('24:01:03 garbage /////'),
+('01:01:03 garbage /////'),
+('2024:02:03'),
+('100000:02:03'),
+('24:02:03'),
+('01:02:03'),
+('01:02:03:'),
+('01:02:03-'),
+('01:02:03;'),
+('01:02:03/'),
+('20 10:20:30');
+
+SELECT
+ EXTRACT(DAY FROM a),
+ EXTRACT(DAY_SECOND FROM a), a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm
+FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/main/func_group.result b/mysql-test/main/func_group.result
index d5ac57d5443..afe8a2e2ddc 100644
--- a/mysql-test/main/func_group.result
+++ b/mysql-test/main/func_group.result
@@ -606,18 +606,18 @@ select min(a1) from t1 where a1 > 'KKK' or a1 < 'XXX';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 3 NULL 15 Using where; Using index
explain
-select min(a1) from t1 where a1 != 'KKK';
+select min(a1) from t1 where (a1 < 'KKK' or a1 > 'KKK');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 3 NULL 15 Using where; Using index
explain
select max(a3) from t1 where a2 < 2 and a3 < 'SEA';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range k1 k1 3 NULL 6 Using where; Using index
+1 SIMPLE t1 range k1 k1 3 NULL 7 Using where; Using index
explain
-select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';
+select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'DEN' and t2.a3 >= 'LA';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index
-1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t2 range k1 k1 3 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
explain
select min(a4 - 0.01) from t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -653,7 +653,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index
+1 SIMPLE t2 index k2 k2 4 NULL 7 Using where; Using index
1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index; Using join buffer (flat, BNL join)
drop table t1, t2;
create table t1 (a char(10));
@@ -1333,10 +1333,11 @@ SELECT MIN(a), MIN(b) FROM t1;
MIN(a) MIN(b)
NULL 1
CREATE TABLE t2( a INT, b INT, c INT, KEY(a, b) );
-INSERT INTO t2 ( a, b, c ) VALUES ( 1, NULL, 2 ), ( 1, 3, 4 ), ( 1, 4, 4 );
+INSERT INTO t2 ( a, b, c ) VALUES
+( 1, NULL, 2 ), ( 1, 3, 4 ), ( 1, 4, 4 ), ( 2, NULL, 2 ), ( 2, 3, 4 ), ( 2, 4, 4 );
EXPLAIN SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref a a 5 const 2
+1 SIMPLE t2 ref a a 5 const 3
SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
MIN(b) MIN(c)
3 2
@@ -1839,12 +1840,12 @@ End of 5.1 tests
# Bug #904345: MIN/MAX optimization with constant FALSE condition
#
CREATE TABLE t1 (a int NOT NULL, KEY(a));
-INSERT INTO t1 VALUES (10), (8), (11), (7), (15), (12), (9);
+INSERT INTO t1 VALUES (10), (8), (11), (7), (15), (12), (9), (13), (15), (17);
CREATE TABLE t2 (a int, b int);
INSERT INTO t2 VALUES
(8,2), (6,9), (8,4), (5,3), (9,1);
EXPLAIN EXTENDED
-SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<10;
+SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<8;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -1857,7 +1858,7 @@ EXPLAIN EXTENDED
SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT a,b FROM t2 WHERE b<5) and a<10;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 100.00
-1 PRIMARY t1 range a a 4 NULL 4 100.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 range a a 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
Warnings:
Note 1003 select max(`test`.`t1`.`a`) AS `MAX(a)` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`a` = 1 and `test`.`t2`.`b` = 2 and `test`.`t1`.`a` < 10
@@ -1867,7 +1868,7 @@ NULL
EXPLAIN EXTENDED
SELECT MAX(a) FROM t1 WHERE RAND()*0<>0 AND a<10;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range a a 4 NULL 4 100.00 Using where; Using index
+1 SIMPLE t1 range a a 4 NULL 3 100.00 Using where; Using index
Warnings:
Note 1003 select max(`test`.`t1`.`a`) AS `MAX(a)` from `test`.`t1` where rand() * 0 <> 0 and `test`.`t1`.`a` < 10
SELECT MAX(a) FROM t1 WHERE RAND()*0<>0 AND a<10;
diff --git a/mysql-test/main/func_group.test b/mysql-test/main/func_group.test
index f91aee3e577..d536f6ead1f 100644
--- a/mysql-test/main/func_group.test
+++ b/mysql-test/main/func_group.test
@@ -359,11 +359,11 @@ select min(t1.a1), min(t2.a4) from t1,t2 where t1.a1 < 'KKK' and t2.a4 < 'KKK';
explain
select min(a1) from t1 where a1 > 'KKK' or a1 < 'XXX';
explain
-select min(a1) from t1 where a1 != 'KKK';
+select min(a1) from t1 where (a1 < 'KKK' or a1 > 'KKK');
explain
select max(a3) from t1 where a2 < 2 and a3 < 'SEA';
explain
-select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';
+select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'DEN' and t2.a3 >= 'LA';
explain
select min(a4 - 0.01) from t1;
@@ -849,7 +849,8 @@ EXPLAIN SELECT MIN(a), MIN(b) FROM t1;
SELECT MIN(a), MIN(b) FROM t1;
CREATE TABLE t2( a INT, b INT, c INT, KEY(a, b) );
-INSERT INTO t2 ( a, b, c ) VALUES ( 1, NULL, 2 ), ( 1, 3, 4 ), ( 1, 4, 4 );
+INSERT INTO t2 ( a, b, c ) VALUES
+ ( 1, NULL, 2 ), ( 1, 3, 4 ), ( 1, 4, 4 ), ( 2, NULL, 2 ), ( 2, 3, 4 ), ( 2, 4, 4 );
EXPLAIN SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
@@ -1168,14 +1169,14 @@ drop table t1;
--echo #
CREATE TABLE t1 (a int NOT NULL, KEY(a));
-INSERT INTO t1 VALUES (10), (8), (11), (7), (15), (12), (9);
+INSERT INTO t1 VALUES (10), (8), (11), (7), (15), (12), (9), (13), (15), (17);
CREATE TABLE t2 (a int, b int);
INSERT INTO t2 VALUES
(8,2), (6,9), (8,4), (5,3), (9,1);
EXPLAIN EXTENDED
-SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<10;
+SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<8;
SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<10;
EXPLAIN EXTENDED
diff --git a/mysql-test/main/func_group_innodb.result b/mysql-test/main/func_group_innodb.result
index e149997af4f..a4c9b574585 100644
--- a/mysql-test/main/func_group_innodb.result
+++ b/mysql-test/main/func_group_innodb.result
@@ -1,3 +1,8 @@
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB;
insert into t1 values (1, 3);
select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ;
@@ -237,14 +242,16 @@ SET storage_engine=@old_engine;
CREATE TABLE t1(a BLOB, b VARCHAR(255) CHARSET LATIN1, c INT,
KEY(b, c, a(765))) ENGINE=INNODB;
INSERT INTO t1(a, b, c) VALUES
-('', 'a', 0), ('', 'a', null), ('', 'a', 0), ('', 'a', null), ('', 'a', 0);
+('', 'a', 0), ('', 'a', null), ('', 'a', 0), ('', 'a', null), ('', 'a', 0),
+('', 'a', 1), ('', 'a', 1), ('', 'a', 2), ('', 'a', 2), ('', 'a', 3),
+('', 'a', 3), ('', 'a', 4), ('', 'a', 4), ('', 'a', 5), ('', 'a', 5);
ANALYZE TABLE t1;
SELECT MIN(c) FROM t1 GROUP BY b;
MIN(c)
0
EXPLAIN SELECT MIN(c) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL b 263 NULL 3 Using index for group-by
+1 SIMPLE t1 range NULL b 263 NULL 2 Using index for group-by
DROP TABLE t1;
#
# MDEV-17589: Stack-buffer-overflow with indexed varchar (utf8) field
@@ -271,3 +278,6 @@ MIN(x.v1)
NULL
drop table t1;
End of 5.5 tests
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/func_group_innodb.test b/mysql-test/main/func_group_innodb.test
index c4914b97641..6141b4d85ed 100644
--- a/mysql-test/main/func_group_innodb.test
+++ b/mysql-test/main/func_group_innodb.test
@@ -4,6 +4,13 @@
--source include/have_innodb.inc
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
--disable_warnings
create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB;
--enable_warnings
@@ -181,7 +188,9 @@ SET storage_engine=@old_engine;
CREATE TABLE t1(a BLOB, b VARCHAR(255) CHARSET LATIN1, c INT,
KEY(b, c, a(765))) ENGINE=INNODB;
INSERT INTO t1(a, b, c) VALUES
-('', 'a', 0), ('', 'a', null), ('', 'a', 0), ('', 'a', null), ('', 'a', 0);
+('', 'a', 0), ('', 'a', null), ('', 'a', 0), ('', 'a', null), ('', 'a', 0),
+('', 'a', 1), ('', 'a', 1), ('', 'a', 2), ('', 'a', 2), ('', 'a', 3),
+('', 'a', 3), ('', 'a', 4), ('', 'a', 4), ('', 'a', 5), ('', 'a', 5);
-- disable_result_log
ANALYZE TABLE t1;
@@ -212,3 +221,7 @@ SELECT MIN(x.v1) FROM (SELECT t1.* FROM t1 WHERE t1.v1 >= 'p') x;
drop table t1;
--echo End of 5.5 tests
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result
index c6b94ab61b0..83965bc6db5 100644
--- a/mysql-test/main/func_hybrid_type.result
+++ b/mysql-test/main/func_hybrid_type.result
@@ -3456,8 +3456,8 @@ SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATETIME ) ) AS f FROM t1;
f
NULL
Warnings:
-Warning 1292 Incorrect datetime value: 'foo'
-Warning 1292 Incorrect datetime value: 'bar'
+Warning 1292 Truncated incorrect datetime value: 'foo'
+Warning 1292 Truncated incorrect datetime value: 'bar'
DROP TABLE t1;
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
@@ -3465,8 +3465,8 @@ SELECT DISTINCT - GREATEST( b, CAST( NULL AS TIME) ) AS f FROM t1;
f
NULL
Warnings:
-Warning 1292 Truncated incorrect time value: 'foo'
-Warning 1292 Truncated incorrect time value: 'bar'
+Warning 1292 Incorrect time value: 'foo'
+Warning 1292 Incorrect time value: 'bar'
DROP TABLE t1;
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
@@ -3474,8 +3474,8 @@ SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATE) ) AS f FROM t1;
f
NULL
Warnings:
-Warning 1292 Incorrect datetime value: 'foo'
-Warning 1292 Incorrect datetime value: 'bar'
+Warning 1292 Truncated incorrect datetime value: 'foo'
+Warning 1292 Truncated incorrect datetime value: 'bar'
DROP TABLE t1;
#
# End of 10.1 tests
@@ -3816,8 +3816,8 @@ LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def s1 10 10 0 Y 128 0 63
def s2 10 10 0 Y 128 0 63
-def s3 12 26 0 Y 128 6 63
-def s4 12 26 0 Y 128 6 63
+def s3 12 26 0 Y 128 0 63
+def s4 12 26 0 Y 128 0 63
def i1 10 10 0 Y 128 0 63
def i2 10 10 0 Y 128 0 63
def i3 12 19 0 Y 128 0 63
@@ -3860,8 +3860,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`s1` date DEFAULT NULL,
`s2` date DEFAULT NULL,
- `s3` datetime(6) DEFAULT NULL,
- `s4` datetime(6) DEFAULT NULL,
+ `s3` datetime DEFAULT NULL,
+ `s4` datetime DEFAULT NULL,
`i1` date DEFAULT NULL,
`i2` date DEFAULT NULL,
`i3` datetime DEFAULT NULL,
@@ -3900,10 +3900,10 @@ SELECT LEAST(999,TIME'10:20:30') AS c1;
c1
NULL
Warnings:
-Warning 1292 Incorrect datetime value: '999'
+Warning 1292 Incorrect time value: '999'
CREATE TABLE t1 AS SELECT LEAST(999,TIME'10:20:30') AS c1;
Warnings:
-Warning 1292 Incorrect datetime value: '999'
+Warning 1292 Incorrect time value: '999'
SELECT * FROM t1;
c1
NULL
@@ -3924,11 +3924,198 @@ GREATEST('9999', t)
NULL
NULL
Warnings:
-Warning 1292 Truncated incorrect time value: '9999'
-Warning 1292 Truncated incorrect time value: '9999'
-Warning 1292 Truncated incorrect time value: '9999'
-Warning 1292 Truncated incorrect time value: '9999'
+Warning 1292 Incorrect time value: '9999'
+Warning 1292 Incorrect time value: '9999'
+Warning 1292 Incorrect time value: '9999'
+Warning 1292 Incorrect time value: '9999'
DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# MDEV-17325 NULL-ability problems with LEAST() in combination with NO_ZERO_DATE and NO_ZERO_IN_DATE
+#
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+SELECT
+LEAST('0000-00-00',DATE'2001-01-01') AS s1,
+LEAST('0001-00-01',DATE'2001-01-01') AS s2,
+LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3,
+LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4,
+LEAST(0,DATE'2001-01-01') AS i1,
+LEAST(20010001,DATE'2001-01-01') AS i2,
+LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3,
+LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def s1 10 10 0 Y 128 0 63
+def s2 10 10 0 Y 128 0 63
+def s3 12 26 0 Y 128 0 63
+def s4 12 26 0 Y 128 0 63
+def i1 10 10 0 Y 128 0 63
+def i2 10 10 0 Y 128 0 63
+def i3 12 19 0 Y 128 0 63
+def i4 12 19 0 Y 128 0 63
+s1 s2 s3 s4 i1 i2 i3 i4
+NULL NULL NULL NULL NULL NULL NULL NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0001-00-01'
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
+Warning 1292 Incorrect datetime value: '0001-00-01 00:00:00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '2001-00-01'
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
+Warning 1292 Incorrect datetime value: '2001-00-01 00:00:00'
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+CREATE TABLE t1 AS SELECT
+LEAST('0000-00-00',DATE'2001-01-01') AS s1,
+LEAST('0001-00-01',DATE'2001-01-01') AS s2,
+LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3,
+LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4,
+LEAST(0,DATE'2001-01-01') AS i1,
+LEAST(20010001,DATE'2001-01-01') AS i2,
+LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3,
+LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0001-00-01'
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
+Warning 1292 Incorrect datetime value: '0001-00-01 00:00:00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '2001-00-01'
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
+Warning 1292 Incorrect datetime value: '2001-00-01 00:00:00'
+SELECT * FROM t1;
+s1 s2 s3 s4 i1 i2 i3 i4
+NULL NULL NULL NULL NULL NULL NULL NULL
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s1` date DEFAULT NULL,
+ `s2` date DEFAULT NULL,
+ `s3` datetime DEFAULT NULL,
+ `s4` datetime DEFAULT NULL,
+ `i1` date DEFAULT NULL,
+ `i2` date DEFAULT NULL,
+ `i3` datetime DEFAULT NULL,
+ `i4` datetime DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30');
+CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1;
+SELECT * FROM t1;
+c1
+2001-01-01 00:00:00
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` datetime NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET old_mode=ZERO_DATE_TIME_CAST;
+CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1;
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00 10:20:30'
+SELECT * FROM t1;
+c1
+NULL
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` datetime DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET old_mode=DEFAULT;
+SET timestamp=DEFAULT;
+SET sql_mode=DEFAULT;
+SET sql_mode='';
+SELECT LEAST(999,TIME'10:20:30') AS c1;
+c1
+NULL
+Warnings:
+Warning 1292 Incorrect time value: '999'
+CREATE TABLE t1 AS SELECT LEAST(999,TIME'10:20:30') AS c1;
+Warnings:
+Warning 1292 Incorrect time value: '999'
+SELECT * FROM t1;
+c1
+NULL
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` time DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-17318 CAST(LEAST(zero_date,non_zero_date) AS numeric_data_type) returns a wrong result
+#
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+SELECT
+LEAST('0000-00-00',DATE'2001-01-01') AS c0,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint;
+c0 string date datetime time dc dbl sint uint
+NULL NULL NULL NULL NULL NULL NULL NULL NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+CREATE TABLE t1 AS SELECT
+LEAST('0000-00-00',DATE'2001-01-01') AS c0,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint,
+CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint;
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+SELECT * FROM t1;
+c0 string date datetime time dc dbl sint uint
+NULL NULL NULL NULL NULL NULL NULL NULL NULL
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c0` date DEFAULT NULL,
+ `string` varchar(10) DEFAULT NULL,
+ `date` date DEFAULT NULL,
+ `datetime` datetime DEFAULT NULL,
+ `time` time DEFAULT NULL,
+ `dc` decimal(10,0) DEFAULT NULL,
+ `dbl` double DEFAULT NULL,
+ `sint` bigint(10) DEFAULT NULL,
+ `uint` bigint(20) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-17330 Wrong result for 0 + LEAST(TIME'-10:00:00',TIME'10:00:00')
+#
+SELECT 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') AS c;
+c
+-100000
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test
index 7d986130d7f..31a096c3305 100644
--- a/mysql-test/main/func_hybrid_type.test
+++ b/mysql-test/main/func_hybrid_type.test
@@ -723,3 +723,105 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-17325 NULL-ability problems with LEAST() in combination with NO_ZERO_DATE and NO_ZERO_IN_DATE
+--echo #
+
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+
+--disable_ps_protocol
+--enable_metadata
+SELECT
+ LEAST('0000-00-00',DATE'2001-01-01') AS s1,
+ LEAST('0001-00-01',DATE'2001-01-01') AS s2,
+ LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3,
+ LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4,
+ LEAST(0,DATE'2001-01-01') AS i1,
+ LEAST(20010001,DATE'2001-01-01') AS i2,
+ LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3,
+ LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
+--disable_metadata
+--enable_ps_protocol
+
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+CREATE TABLE t1 AS SELECT
+ LEAST('0000-00-00',DATE'2001-01-01') AS s1,
+ LEAST('0001-00-01',DATE'2001-01-01') AS s2,
+ LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3,
+ LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4,
+ LEAST(0,DATE'2001-01-01') AS i1,
+ LEAST(20010001,DATE'2001-01-01') AS i2,
+ LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3,
+ LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30');
+
+# A TIME always converts to a non-NULL DATETIME with the new CAST style
+# Expect a NOT NULL column
+CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+# A TIME can convert to a NULL DATETIME with old CAST style
+# Expect a NULL-able column
+SET old_mode=ZERO_DATE_TIME_CAST;
+CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+SET old_mode=DEFAULT;
+SET timestamp=DEFAULT;
+
+SET sql_mode=DEFAULT;
+
+SET sql_mode='';
+SELECT LEAST(999,TIME'10:20:30') AS c1;
+CREATE TABLE t1 AS SELECT LEAST(999,TIME'10:20:30') AS c1;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # MDEV-17318 CAST(LEAST(zero_date,non_zero_date) AS numeric_data_type) returns a wrong result
+--echo #
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+SELECT
+ LEAST('0000-00-00',DATE'2001-01-01') AS c0,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint;
+CREATE TABLE t1 AS SELECT
+ LEAST('0000-00-00',DATE'2001-01-01') AS c0,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint,
+ CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # MDEV-17330 Wrong result for 0 + LEAST(TIME'-10:00:00',TIME'10:00:00')
+--echo #
+SELECT 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') AS c;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_in.result b/mysql-test/main/func_in.result
index 650356a635b..9fb32ecbfaf 100644
--- a/mysql-test/main/func_in.result
+++ b/mysql-test/main/func_in.result
@@ -241,7 +241,7 @@ insert into t2 select C.a*2+1, 'yes' from t1 C;
explain
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 5 NULL 12 Using index condition
+1 SIMPLE t2 range a a 5 NULL 11 Using index condition
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
a filler
1 yes
@@ -271,7 +271,7 @@ select * from t2 where a NOT IN (
'2006-04-25 10:00:00','2006-04-25 10:02:00','2006-04-25 10:04:00',
'2006-04-25 10:06:00', '2006-04-25 10:08:00');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 6 NULL 12 Using index condition
+1 SIMPLE t2 range a a 6 NULL 11 Using index condition
select * from t2 where a NOT IN (
'2006-04-25 10:00:00','2006-04-25 10:02:00','2006-04-25 10:04:00',
'2006-04-25 10:06:00', '2006-04-25 10:08:00');
@@ -295,7 +295,7 @@ insert into t2 values ('fon', '1'), ('fop','1'), ('barbaq','1'),
('barbas','1'), ('bazbazbay', '1'),('zz','1');
explain select * from t2 where a not in('foo','barbar', 'bazbazbaz');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 13 NULL 7 Using index condition
+1 SIMPLE t2 range a a 13 NULL 6 Using index condition
drop table t2;
create table t2 (a decimal(10,5), filler char(200), key(a));
insert into t2 select 345.67890, 'no' from t1 A, t1 B;
@@ -306,7 +306,7 @@ insert into t2 values (0, '1'), (22334.123,'1'), (33333,'1'),
explain
select * from t2 where a not in (345.67890, 43245.34, 64224.56344);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 7 NULL 7 Using index condition
+1 SIMPLE t2 range a a 7 NULL 6 Using index condition
select * from t2 where a not in (345.67890, 43245.34, 64224.56344);
a filler
0.00000 1
@@ -470,7 +470,7 @@ HEX(a)
7FFFFFFFFFFFFFFE
7FFFFFFFFFFFFFFF
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'abc'
+Warning 1292 Truncated incorrect DECIMAL value: 'abc'
CREATE TABLE t3 (a BIGINT UNSIGNED);
INSERT INTO t3 VALUES (9223372036854775551);
SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42);
@@ -481,7 +481,7 @@ SELECT * FROM t4 WHERE a IN ('1972-02-06','19772-07-29');
a
1972-02-06
Warnings:
-Warning 1292 Incorrect datetime value: '19772-07-29'
+Warning 1292 Truncated incorrect datetime value: '19772-07-29'
DROP TABLE t1,t2,t3,t4;
CREATE TABLE t1 (id int not null);
INSERT INTO t1 VALUES (1),(2);
@@ -909,3 +909,38 @@ Warnings:
Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: ''
+#
+# End of 10.3 tests
+#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16454 Bad results for IN with ROW
+#
+SELECT (18446744073709551615,0) IN ((18446744073709551614,0),(-1,0));
+(18446744073709551615,0) IN ((18446744073709551614,0),(-1,0))
+0
+SELECT '0x' IN (0);
+'0x' IN (0)
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+SELECT '0x' IN (0,1);
+'0x' IN (0,1)
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+SELECT ('0x',1) IN ((0,1));
+('0x',1) IN ((0,1))
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+SELECT ('0x',1) IN ((0,1),(1,1));
+('0x',1) IN ((0,1),(1,1))
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_in.test b/mysql-test/main/func_in.test
index b99fad159c2..fb6f2036f20 100644
--- a/mysql-test/main/func_in.test
+++ b/mysql-test/main/func_in.test
@@ -690,3 +690,27 @@ SELECT
TIME'00:00:00'='' AS c1_true,
TIME'00:00:00' IN ('', TIME'10:20:30') AS c2_true,
TIME'00:00:00' NOT IN ('', TIME'10:20:30') AS c3_false;
+
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16454 Bad results for IN with ROW
+--echo #
+SELECT (18446744073709551615,0) IN ((18446744073709551614,0),(-1,0));
+
+SELECT '0x' IN (0);
+SELECT '0x' IN (0,1);
+SELECT ('0x',1) IN ((0,1));
+SELECT ('0x',1) IN ((0,1),(1,1));
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result
index 4d04871c806..e91f2f4df5e 100644
--- a/mysql-test/main/func_json.result
+++ b/mysql-test/main/func_json.result
@@ -1045,3 +1045,91 @@ null
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers
+#
+SELECT
+JSON_OBJECT("cond", true) AS j1,
+JSON_OBJECT("cond", COALESCE(true, false)) j2,
+JSON_OBJECT("cond", COALESCE(COALESCE(true, false))) j3;
+j1 {"cond": true}
+j2 {"cond": true}
+j3 {"cond": true}
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT JSON_OBJECT('x',(SELECT MAX(a)=4 FROM t1));
+JSON_OBJECT('x',(SELECT MAX(a)=4 FROM t1))
+{"x": false}
+SELECT JSON_OBJECT('x',(SELECT MAX(a)=3 FROM t1));
+JSON_OBJECT('x',(SELECT MAX(a)=3 FROM t1))
+{"x": true}
+SELECT JSON_OBJECT('x',(SELECT MAX(a)=2 FROM t1));
+JSON_OBJECT('x',(SELECT MAX(a)=2 FROM t1))
+{"x": false}
+SELECT JSON_OBJECT('x',MAX(a=4)) FROM t1;
+JSON_OBJECT('x',MAX(a=4))
+{"x": false}
+SELECT JSON_OBJECT('x',MAX(a=3)) FROM t1;
+JSON_OBJECT('x',MAX(a=3))
+{"x": true}
+SELECT JSON_OBJECT('x',MAX(a=2)) FROM t1;
+JSON_OBJECT('x',MAX(a=2))
+{"x": true}
+SELECT JSON_OBJECT('x',(SELECT MAX(a=4) FROM t1));
+JSON_OBJECT('x',(SELECT MAX(a=4) FROM t1))
+{"x": false}
+SELECT JSON_OBJECT('x',(SELECT MAX(a=3) FROM t1));
+JSON_OBJECT('x',(SELECT MAX(a=3) FROM t1))
+{"x": true}
+SELECT JSON_OBJECT('x',(SELECT MAX(a=2) FROM t1));
+JSON_OBJECT('x',(SELECT MAX(a=2) FROM t1))
+{"x": true}
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=4 FROM t1))='{"x": true}' THEN a END;
+a
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=4 FROM t1))='{"x": false}' THEN a END;
+a
+1
+2
+3
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=3 FROM t1))='{"x": true}' THEN a END;
+a
+1
+2
+3
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=3 FROM t1))='{"x": false}' THEN a END;
+a
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=2 FROM t1))='{"x": true}' THEN a END;
+a
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=2 FROM t1))='{"x": false}' THEN a END;
+a
+1
+2
+3
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=4) FROM t1))='{"x": true}' THEN a END;
+a
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=4) FROM t1))='{"x": false}' THEN a END;
+a
+1
+2
+3
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=3) FROM t1))='{"x": true}' THEN a END;
+a
+1
+2
+3
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=3) FROM t1))='{"x": false}' THEN a END;
+a
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=2) FROM t1))='{"x": true}' THEN a END;
+a
+1
+2
+3
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=2) FROM t1))='{"x": false}' THEN a END;
+a
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 33e67d35f86..b0db63f16a9 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -649,3 +649,53 @@ SELECT JSON_EXTRACT('{"a":null, "b":10, "c":"null"}', '$.a');
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers
+--echo #
+
+--vertical_results
+SELECT
+ JSON_OBJECT("cond", true) AS j1,
+ JSON_OBJECT("cond", COALESCE(true, false)) j2,
+ JSON_OBJECT("cond", COALESCE(COALESCE(true, false))) j3;
+--horizontal_results
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT JSON_OBJECT('x',(SELECT MAX(a)=4 FROM t1));
+SELECT JSON_OBJECT('x',(SELECT MAX(a)=3 FROM t1));
+SELECT JSON_OBJECT('x',(SELECT MAX(a)=2 FROM t1));
+
+SELECT JSON_OBJECT('x',MAX(a=4)) FROM t1;
+SELECT JSON_OBJECT('x',MAX(a=3)) FROM t1;
+SELECT JSON_OBJECT('x',MAX(a=2)) FROM t1;
+
+SELECT JSON_OBJECT('x',(SELECT MAX(a=4) FROM t1));
+SELECT JSON_OBJECT('x',(SELECT MAX(a=3) FROM t1));
+SELECT JSON_OBJECT('x',(SELECT MAX(a=2) FROM t1));
+
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=4 FROM t1))='{"x": true}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=4 FROM t1))='{"x": false}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=3 FROM t1))='{"x": true}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=3 FROM t1))='{"x": false}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=2 FROM t1))='{"x": true}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a)=2 FROM t1))='{"x": false}' THEN a END;
+
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=4) FROM t1))='{"x": true}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=4) FROM t1))='{"x": false}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=3) FROM t1))='{"x": true}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=3) FROM t1))='{"x": false}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=2) FROM t1))='{"x": true}' THEN a END;
+SELECT * FROM t1 WHERE CASE WHEN JSON_OBJECT('x', (SELECT MAX(a=2) FROM t1))='{"x": false}' THEN a END;
+
+
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_like.result b/mysql-test/main/func_like.result
index 69387b3bb11..fc306c42067 100644
--- a/mysql-test/main/func_like.result
+++ b/mysql-test/main/func_like.result
@@ -3,12 +3,12 @@ create table t1 (a varchar(10), key(a));
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
explain extended select * from t1 where a like 'abc%';
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index a a 13 NULL 5 20.00 Using where; Using index
+1 SIMPLE t1 index a a 13 NULL 5 40.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` like 'abc%'
explain extended select * from t1 where a like concat('abc','%');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index a a 13 NULL 5 20.00 Using where; Using index
+1 SIMPLE t1 index a a 13 NULL 5 40.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` like <cache>(concat('abc','%'))
select * from t1 where a like "abc%";
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result
index 552a04afb4a..2363bab2cd0 100644
--- a/mysql-test/main/func_math.result
+++ b/mysql-test/main/func_math.result
@@ -348,7 +348,6 @@ truncate(4, cast(-2 as unsigned)) truncate(4, 18446744073709551614) truncate(4,
4 4 0
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
select round(10000000000000000000, -19), truncate(10000000000000000000, -19);
round(10000000000000000000, -19) truncate(10000000000000000000, -19)
10000000000000000000 10000000000000000000
@@ -1079,7 +1078,7 @@ Create Table CREATE TABLE `t2` (
`a` decimal(38,0) DEFAULT NULL,
`b` decimal(38,0) unsigned DEFAULT NULL,
`fa` decimal(38,0) DEFAULT NULL,
- `fb` decimal(38,0) DEFAULT NULL
+ `fb` decimal(38,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999999999999999999
b 99999999999999999999999999999999999999
@@ -1089,8 +1088,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,1) DEFAULT NULL,
`b` decimal(38,1) unsigned DEFAULT NULL,
- `fa` decimal(37,0) DEFAULT NULL,
- `fb` decimal(37,0) DEFAULT NULL
+ `fa` decimal(38,0) DEFAULT NULL,
+ `fb` decimal(37,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999999999999999999.9
b 9999999999999999999999999999999999999.9
@@ -1100,8 +1099,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,2) DEFAULT NULL,
`b` decimal(38,2) unsigned DEFAULT NULL,
- `fa` decimal(36,0) DEFAULT NULL,
- `fb` decimal(36,0) DEFAULT NULL
+ `fa` decimal(37,0) DEFAULT NULL,
+ `fb` decimal(36,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999999999999999.99
b 999999999999999999999999999999999999.99
@@ -1111,8 +1110,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,3) DEFAULT NULL,
`b` decimal(38,3) unsigned DEFAULT NULL,
- `fa` decimal(35,0) DEFAULT NULL,
- `fb` decimal(35,0) DEFAULT NULL
+ `fa` decimal(36,0) DEFAULT NULL,
+ `fb` decimal(35,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999999999999999.999
b 99999999999999999999999999999999999.999
@@ -1122,8 +1121,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,4) DEFAULT NULL,
`b` decimal(38,4) unsigned DEFAULT NULL,
- `fa` decimal(34,0) DEFAULT NULL,
- `fb` decimal(34,0) DEFAULT NULL
+ `fa` decimal(35,0) DEFAULT NULL,
+ `fb` decimal(34,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999999999999999.9999
b 9999999999999999999999999999999999.9999
@@ -1133,8 +1132,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,5) DEFAULT NULL,
`b` decimal(38,5) unsigned DEFAULT NULL,
- `fa` decimal(33,0) DEFAULT NULL,
- `fb` decimal(33,0) DEFAULT NULL
+ `fa` decimal(34,0) DEFAULT NULL,
+ `fb` decimal(33,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999999999999.99999
b 999999999999999999999999999999999.99999
@@ -1144,8 +1143,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,6) DEFAULT NULL,
`b` decimal(38,6) unsigned DEFAULT NULL,
- `fa` decimal(32,0) DEFAULT NULL,
- `fb` decimal(32,0) DEFAULT NULL
+ `fa` decimal(33,0) DEFAULT NULL,
+ `fb` decimal(32,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999999999999.999999
b 99999999999999999999999999999999.999999
@@ -1155,8 +1154,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,7) DEFAULT NULL,
`b` decimal(38,7) unsigned DEFAULT NULL,
- `fa` decimal(31,0) DEFAULT NULL,
- `fb` decimal(31,0) DEFAULT NULL
+ `fa` decimal(32,0) DEFAULT NULL,
+ `fb` decimal(31,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999999999999.9999999
b 9999999999999999999999999999999.9999999
@@ -1166,8 +1165,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,8) DEFAULT NULL,
`b` decimal(38,8) unsigned DEFAULT NULL,
- `fa` decimal(30,0) DEFAULT NULL,
- `fb` decimal(30,0) DEFAULT NULL
+ `fa` decimal(31,0) DEFAULT NULL,
+ `fb` decimal(30,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999999999.99999999
b 999999999999999999999999999999.99999999
@@ -1177,8 +1176,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,9) DEFAULT NULL,
`b` decimal(38,9) unsigned DEFAULT NULL,
- `fa` decimal(29,0) DEFAULT NULL,
- `fb` decimal(29,0) DEFAULT NULL
+ `fa` decimal(30,0) DEFAULT NULL,
+ `fb` decimal(29,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999999999.999999999
b 99999999999999999999999999999.999999999
@@ -1188,8 +1187,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,10) DEFAULT NULL,
`b` decimal(38,10) unsigned DEFAULT NULL,
- `fa` decimal(28,0) DEFAULT NULL,
- `fb` decimal(28,0) DEFAULT NULL
+ `fa` decimal(29,0) DEFAULT NULL,
+ `fb` decimal(28,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999999999.9999999999
b 9999999999999999999999999999.9999999999
@@ -1199,8 +1198,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,11) DEFAULT NULL,
`b` decimal(38,11) unsigned DEFAULT NULL,
- `fa` decimal(27,0) DEFAULT NULL,
- `fb` decimal(27,0) DEFAULT NULL
+ `fa` decimal(28,0) DEFAULT NULL,
+ `fb` decimal(27,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999999.99999999999
b 999999999999999999999999999.99999999999
@@ -1210,8 +1209,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,12) DEFAULT NULL,
`b` decimal(38,12) unsigned DEFAULT NULL,
- `fa` decimal(26,0) DEFAULT NULL,
- `fb` decimal(26,0) DEFAULT NULL
+ `fa` decimal(27,0) DEFAULT NULL,
+ `fb` decimal(26,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999999.999999999999
b 99999999999999999999999999.999999999999
@@ -1221,8 +1220,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,13) DEFAULT NULL,
`b` decimal(38,13) unsigned DEFAULT NULL,
- `fa` decimal(25,0) DEFAULT NULL,
- `fb` decimal(25,0) DEFAULT NULL
+ `fa` decimal(26,0) DEFAULT NULL,
+ `fb` decimal(25,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999999.9999999999999
b 9999999999999999999999999.9999999999999
@@ -1232,8 +1231,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,14) DEFAULT NULL,
`b` decimal(38,14) unsigned DEFAULT NULL,
- `fa` decimal(24,0) DEFAULT NULL,
- `fb` decimal(24,0) DEFAULT NULL
+ `fa` decimal(25,0) DEFAULT NULL,
+ `fb` decimal(24,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999.99999999999999
b 999999999999999999999999.99999999999999
@@ -1243,8 +1242,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,15) DEFAULT NULL,
`b` decimal(38,15) unsigned DEFAULT NULL,
- `fa` decimal(23,0) DEFAULT NULL,
- `fb` decimal(23,0) DEFAULT NULL
+ `fa` decimal(24,0) DEFAULT NULL,
+ `fb` decimal(23,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999.999999999999999
b 99999999999999999999999.999999999999999
@@ -1254,8 +1253,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,16) DEFAULT NULL,
`b` decimal(38,16) unsigned DEFAULT NULL,
- `fa` decimal(22,0) DEFAULT NULL,
- `fb` decimal(22,0) DEFAULT NULL
+ `fa` decimal(23,0) DEFAULT NULL,
+ `fb` decimal(22,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999.9999999999999999
b 9999999999999999999999.9999999999999999
@@ -1265,8 +1264,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,17) DEFAULT NULL,
`b` decimal(38,17) unsigned DEFAULT NULL,
- `fa` decimal(21,0) DEFAULT NULL,
- `fb` decimal(21,0) DEFAULT NULL
+ `fa` decimal(22,0) DEFAULT NULL,
+ `fb` decimal(21,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999.99999999999999999
b 999999999999999999999.99999999999999999
@@ -1276,8 +1275,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,18) DEFAULT NULL,
`b` decimal(38,18) unsigned DEFAULT NULL,
- `fa` decimal(20,0) DEFAULT NULL,
- `fb` decimal(20,0) DEFAULT NULL
+ `fa` decimal(21,0) DEFAULT NULL,
+ `fb` decimal(20,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999.999999999999999999
b 99999999999999999999.999999999999999999
@@ -1287,8 +1286,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,19) DEFAULT NULL,
`b` decimal(38,19) unsigned DEFAULT NULL,
- `fa` decimal(19,0) DEFAULT NULL,
- `fb` decimal(19,0) DEFAULT NULL
+ `fa` decimal(20,0) DEFAULT NULL,
+ `fb` decimal(19,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999.9999999999999999999
b 9999999999999999999.9999999999999999999
@@ -1298,8 +1297,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,20) DEFAULT NULL,
`b` decimal(38,20) unsigned DEFAULT NULL,
- `fa` decimal(18,0) DEFAULT NULL,
- `fb` bigint(17) unsigned DEFAULT NULL
+ `fa` decimal(19,0) DEFAULT NULL,
+ `fb` bigint(18) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999.99999999999999999999
b 999999999999999999.99999999999999999999
@@ -1309,7 +1308,7 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,21) DEFAULT NULL,
`b` decimal(38,21) unsigned DEFAULT NULL,
- `fa` bigint(17) DEFAULT NULL,
+ `fa` bigint(19) DEFAULT NULL,
`fb` bigint(17) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999.999999999999999999999
@@ -1320,8 +1319,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,22) DEFAULT NULL,
`b` decimal(38,22) unsigned DEFAULT NULL,
- `fa` bigint(17) DEFAULT NULL,
- `fb` bigint(17) unsigned DEFAULT NULL
+ `fa` bigint(18) DEFAULT NULL,
+ `fb` bigint(16) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999.9999999999999999999999
b 9999999999999999.9999999999999999999999
@@ -1332,7 +1331,7 @@ Create Table CREATE TABLE `t2` (
`a` decimal(38,23) DEFAULT NULL,
`b` decimal(38,23) unsigned DEFAULT NULL,
`fa` bigint(17) DEFAULT NULL,
- `fb` bigint(17) unsigned DEFAULT NULL
+ `fb` bigint(15) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999.99999999999999999999999
b 999999999999999.99999999999999999999999
@@ -1342,8 +1341,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,24) DEFAULT NULL,
`b` decimal(38,24) unsigned DEFAULT NULL,
- `fa` bigint(17) DEFAULT NULL,
- `fb` bigint(16) unsigned DEFAULT NULL
+ `fa` bigint(16) DEFAULT NULL,
+ `fb` bigint(14) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999.999999999999999999999999
b 99999999999999.999999999999999999999999
@@ -1353,8 +1352,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,25) DEFAULT NULL,
`b` decimal(38,25) unsigned DEFAULT NULL,
- `fa` bigint(16) DEFAULT NULL,
- `fb` bigint(15) unsigned DEFAULT NULL
+ `fa` bigint(15) DEFAULT NULL,
+ `fb` bigint(13) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999.9999999999999999999999999
b 9999999999999.9999999999999999999999999
@@ -1364,8 +1363,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,26) DEFAULT NULL,
`b` decimal(38,26) unsigned DEFAULT NULL,
- `fa` bigint(15) DEFAULT NULL,
- `fb` bigint(14) unsigned DEFAULT NULL
+ `fa` bigint(14) DEFAULT NULL,
+ `fb` bigint(12) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999.99999999999999999999999999
b 999999999999.99999999999999999999999999
@@ -1375,8 +1374,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,27) DEFAULT NULL,
`b` decimal(38,27) unsigned DEFAULT NULL,
- `fa` bigint(14) DEFAULT NULL,
- `fb` bigint(13) unsigned DEFAULT NULL
+ `fa` bigint(13) DEFAULT NULL,
+ `fb` bigint(11) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999.999999999999999999999999999
b 99999999999.999999999999999999999999999
@@ -1386,8 +1385,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,28) DEFAULT NULL,
`b` decimal(38,28) unsigned DEFAULT NULL,
- `fa` bigint(13) DEFAULT NULL,
- `fb` bigint(12) unsigned DEFAULT NULL
+ `fa` bigint(12) DEFAULT NULL,
+ `fb` bigint(10) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999.9999999999999999999999999999
b 9999999999.9999999999999999999999999999
@@ -1397,8 +1396,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,29) DEFAULT NULL,
`b` decimal(38,29) unsigned DEFAULT NULL,
- `fa` bigint(12) DEFAULT NULL,
- `fb` bigint(11) unsigned DEFAULT NULL
+ `fa` bigint(11) DEFAULT NULL,
+ `fb` int(9) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999.99999999999999999999999999999
b 999999999.99999999999999999999999999999
@@ -1408,8 +1407,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(38,30) DEFAULT NULL,
`b` decimal(38,30) unsigned DEFAULT NULL,
- `fa` bigint(11) DEFAULT NULL,
- `fb` bigint(10) unsigned DEFAULT NULL
+ `fa` int(10) DEFAULT NULL,
+ `fb` int(8) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999.999999999999999999999999999999
b 99999999.999999999999999999999999999999
@@ -1421,7 +1420,7 @@ Create Table CREATE TABLE `t2` (
`a` decimal(30,0) DEFAULT NULL,
`b` decimal(30,0) unsigned DEFAULT NULL,
`fa` decimal(30,0) DEFAULT NULL,
- `fb` decimal(31,0) unsigned DEFAULT NULL
+ `fb` decimal(30,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999999999
b 999999999999999999999999999999
@@ -1431,8 +1430,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,1) DEFAULT NULL,
`b` decimal(30,1) unsigned DEFAULT NULL,
- `fa` decimal(29,0) DEFAULT NULL,
- `fb` decimal(30,0) unsigned DEFAULT NULL
+ `fa` decimal(30,0) DEFAULT NULL,
+ `fb` decimal(29,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999999999.9
b 99999999999999999999999999999.9
@@ -1442,8 +1441,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,2) DEFAULT NULL,
`b` decimal(30,2) unsigned DEFAULT NULL,
- `fa` decimal(28,0) DEFAULT NULL,
- `fb` decimal(29,0) unsigned DEFAULT NULL
+ `fa` decimal(29,0) DEFAULT NULL,
+ `fb` decimal(28,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999999999.99
b 9999999999999999999999999999.99
@@ -1453,8 +1452,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,3) DEFAULT NULL,
`b` decimal(30,3) unsigned DEFAULT NULL,
- `fa` decimal(27,0) DEFAULT NULL,
- `fb` decimal(28,0) unsigned DEFAULT NULL
+ `fa` decimal(28,0) DEFAULT NULL,
+ `fb` decimal(27,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999999.999
b 999999999999999999999999999.999
@@ -1464,8 +1463,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,4) DEFAULT NULL,
`b` decimal(30,4) unsigned DEFAULT NULL,
- `fa` decimal(26,0) DEFAULT NULL,
- `fb` decimal(27,0) unsigned DEFAULT NULL
+ `fa` decimal(27,0) DEFAULT NULL,
+ `fb` decimal(26,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999999.9999
b 99999999999999999999999999.9999
@@ -1475,8 +1474,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,5) DEFAULT NULL,
`b` decimal(30,5) unsigned DEFAULT NULL,
- `fa` decimal(25,0) DEFAULT NULL,
- `fb` decimal(26,0) unsigned DEFAULT NULL
+ `fa` decimal(26,0) DEFAULT NULL,
+ `fb` decimal(25,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999999.99999
b 9999999999999999999999999.99999
@@ -1486,8 +1485,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,6) DEFAULT NULL,
`b` decimal(30,6) unsigned DEFAULT NULL,
- `fa` decimal(24,0) DEFAULT NULL,
- `fb` decimal(25,0) unsigned DEFAULT NULL
+ `fa` decimal(25,0) DEFAULT NULL,
+ `fb` decimal(24,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999999.999999
b 999999999999999999999999.999999
@@ -1497,8 +1496,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,7) DEFAULT NULL,
`b` decimal(30,7) unsigned DEFAULT NULL,
- `fa` decimal(23,0) DEFAULT NULL,
- `fb` decimal(24,0) unsigned DEFAULT NULL
+ `fa` decimal(24,0) DEFAULT NULL,
+ `fb` decimal(23,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999999.9999999
b 99999999999999999999999.9999999
@@ -1508,8 +1507,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,8) DEFAULT NULL,
`b` decimal(30,8) unsigned DEFAULT NULL,
- `fa` decimal(22,0) DEFAULT NULL,
- `fb` decimal(23,0) unsigned DEFAULT NULL
+ `fa` decimal(23,0) DEFAULT NULL,
+ `fb` decimal(22,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999999.99999999
b 9999999999999999999999.99999999
@@ -1519,8 +1518,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,9) DEFAULT NULL,
`b` decimal(30,9) unsigned DEFAULT NULL,
- `fa` decimal(21,0) DEFAULT NULL,
- `fb` decimal(22,0) unsigned DEFAULT NULL
+ `fa` decimal(22,0) DEFAULT NULL,
+ `fb` decimal(21,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999999.999999999
b 999999999999999999999.999999999
@@ -1530,8 +1529,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,10) DEFAULT NULL,
`b` decimal(30,10) unsigned DEFAULT NULL,
- `fa` decimal(20,0) DEFAULT NULL,
- `fb` decimal(21,0) unsigned DEFAULT NULL
+ `fa` decimal(21,0) DEFAULT NULL,
+ `fb` decimal(20,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999999.9999999999
b 99999999999999999999.9999999999
@@ -1541,8 +1540,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,11) DEFAULT NULL,
`b` decimal(30,11) unsigned DEFAULT NULL,
- `fa` decimal(19,0) DEFAULT NULL,
- `fb` decimal(20,0) unsigned DEFAULT NULL
+ `fa` decimal(20,0) DEFAULT NULL,
+ `fb` decimal(19,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999999.99999999999
b 9999999999999999999.99999999999
@@ -1552,8 +1551,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,12) DEFAULT NULL,
`b` decimal(30,12) unsigned DEFAULT NULL,
- `fa` decimal(18,0) DEFAULT NULL,
- `fb` bigint(17) unsigned DEFAULT NULL
+ `fa` decimal(19,0) DEFAULT NULL,
+ `fb` bigint(18) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999999.999999999999
b 999999999999999999.999999999999
@@ -1563,7 +1562,7 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,13) DEFAULT NULL,
`b` decimal(30,13) unsigned DEFAULT NULL,
- `fa` bigint(17) DEFAULT NULL,
+ `fa` bigint(19) DEFAULT NULL,
`fb` bigint(17) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999999.9999999999999
@@ -1574,8 +1573,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,14) DEFAULT NULL,
`b` decimal(30,14) unsigned DEFAULT NULL,
- `fa` bigint(17) DEFAULT NULL,
- `fb` bigint(17) unsigned DEFAULT NULL
+ `fa` bigint(18) DEFAULT NULL,
+ `fb` bigint(16) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999999.99999999999999
b 9999999999999999.99999999999999
@@ -1586,7 +1585,7 @@ Create Table CREATE TABLE `t2` (
`a` decimal(30,15) DEFAULT NULL,
`b` decimal(30,15) unsigned DEFAULT NULL,
`fa` bigint(17) DEFAULT NULL,
- `fb` bigint(17) unsigned DEFAULT NULL
+ `fb` bigint(15) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999999.999999999999999
b 999999999999999.999999999999999
@@ -1596,8 +1595,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,16) DEFAULT NULL,
`b` decimal(30,16) unsigned DEFAULT NULL,
- `fa` bigint(17) DEFAULT NULL,
- `fb` bigint(16) unsigned DEFAULT NULL
+ `fa` bigint(16) DEFAULT NULL,
+ `fb` bigint(14) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999999.9999999999999999
b 99999999999999.9999999999999999
@@ -1607,8 +1606,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,17) DEFAULT NULL,
`b` decimal(30,17) unsigned DEFAULT NULL,
- `fa` bigint(16) DEFAULT NULL,
- `fb` bigint(15) unsigned DEFAULT NULL
+ `fa` bigint(15) DEFAULT NULL,
+ `fb` bigint(13) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999999.99999999999999999
b 9999999999999.99999999999999999
@@ -1618,8 +1617,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,18) DEFAULT NULL,
`b` decimal(30,18) unsigned DEFAULT NULL,
- `fa` bigint(15) DEFAULT NULL,
- `fb` bigint(14) unsigned DEFAULT NULL
+ `fa` bigint(14) DEFAULT NULL,
+ `fb` bigint(12) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999999.999999999999999999
b 999999999999.999999999999999999
@@ -1629,8 +1628,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,19) DEFAULT NULL,
`b` decimal(30,19) unsigned DEFAULT NULL,
- `fa` bigint(14) DEFAULT NULL,
- `fb` bigint(13) unsigned DEFAULT NULL
+ `fa` bigint(13) DEFAULT NULL,
+ `fb` bigint(11) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999999.9999999999999999999
b 99999999999.9999999999999999999
@@ -1640,8 +1639,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,20) DEFAULT NULL,
`b` decimal(30,20) unsigned DEFAULT NULL,
- `fa` bigint(13) DEFAULT NULL,
- `fb` bigint(12) unsigned DEFAULT NULL
+ `fa` bigint(12) DEFAULT NULL,
+ `fb` bigint(10) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999999.99999999999999999999
b 9999999999.99999999999999999999
@@ -1651,8 +1650,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,21) DEFAULT NULL,
`b` decimal(30,21) unsigned DEFAULT NULL,
- `fa` bigint(12) DEFAULT NULL,
- `fb` bigint(11) unsigned DEFAULT NULL
+ `fa` bigint(11) DEFAULT NULL,
+ `fb` int(9) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999999.999999999999999999999
b 999999999.999999999999999999999
@@ -1662,8 +1661,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,22) DEFAULT NULL,
`b` decimal(30,22) unsigned DEFAULT NULL,
- `fa` bigint(11) DEFAULT NULL,
- `fb` bigint(10) unsigned DEFAULT NULL
+ `fa` int(10) DEFAULT NULL,
+ `fb` int(8) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999999.9999999999999999999999
b 99999999.9999999999999999999999
@@ -1673,8 +1672,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,23) DEFAULT NULL,
`b` decimal(30,23) unsigned DEFAULT NULL,
- `fa` bigint(10) DEFAULT NULL,
- `fb` int(9) unsigned DEFAULT NULL
+ `fa` int(9) DEFAULT NULL,
+ `fb` int(7) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999999.99999999999999999999999
b 9999999.99999999999999999999999
@@ -1684,8 +1683,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,24) DEFAULT NULL,
`b` decimal(30,24) unsigned DEFAULT NULL,
- `fa` int(9) DEFAULT NULL,
- `fb` int(8) unsigned DEFAULT NULL
+ `fa` int(8) DEFAULT NULL,
+ `fb` int(6) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999999.999999999999999999999999
b 999999.999999999999999999999999
@@ -1695,8 +1694,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,25) DEFAULT NULL,
`b` decimal(30,25) unsigned DEFAULT NULL,
- `fa` int(8) DEFAULT NULL,
- `fb` int(7) unsigned DEFAULT NULL
+ `fa` int(7) DEFAULT NULL,
+ `fb` int(5) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99999.9999999999999999999999999
b 99999.9999999999999999999999999
@@ -1706,8 +1705,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,26) DEFAULT NULL,
`b` decimal(30,26) unsigned DEFAULT NULL,
- `fa` int(7) DEFAULT NULL,
- `fb` int(6) unsigned DEFAULT NULL
+ `fa` int(6) DEFAULT NULL,
+ `fb` int(4) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9999.99999999999999999999999999
b 9999.99999999999999999999999999
@@ -1717,8 +1716,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,27) DEFAULT NULL,
`b` decimal(30,27) unsigned DEFAULT NULL,
- `fa` int(6) DEFAULT NULL,
- `fb` int(5) unsigned DEFAULT NULL
+ `fa` int(5) DEFAULT NULL,
+ `fb` int(3) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 999.999999999999999999999999999
b 999.999999999999999999999999999
@@ -1728,8 +1727,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,28) DEFAULT NULL,
`b` decimal(30,28) unsigned DEFAULT NULL,
- `fa` int(5) DEFAULT NULL,
- `fb` int(4) unsigned DEFAULT NULL
+ `fa` int(4) DEFAULT NULL,
+ `fb` int(2) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 99.9999999999999999999999999999
b 99.9999999999999999999999999999
@@ -1739,8 +1738,8 @@ Table t2
Create Table CREATE TABLE `t2` (
`a` decimal(30,29) DEFAULT NULL,
`b` decimal(30,29) unsigned DEFAULT NULL,
- `fa` int(4) DEFAULT NULL,
- `fb` int(3) unsigned DEFAULT NULL
+ `fa` int(3) DEFAULT NULL,
+ `fb` int(1) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
a 9.99999999999999999999999999999
b 9.99999999999999999999999999999
@@ -1777,7 +1776,7 @@ ROUND(10e0,NULL) AS c3;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` double DEFAULT NULL,
+ `c1` int(2) DEFAULT NULL,
`c2` double DEFAULT NULL,
`c3` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -2276,3 +2275,1276 @@ SET sql_mode=DEFAULT;
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-20732 max_char_length() doesn't account for FORMAT() with doubles in scientific notation
+#
+CREATE OR REPLACE TABLE t1 AS SELECT FORMAT(-1e308,2);
+SELECT * FROM t1;
+FORMAT(-1e308,2)
+-100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.00
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `FORMAT(-1e308,2)` varchar(417) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 AS SELECT FORMAT('-1e308',2);
+SELECT * FROM t1;
+FORMAT('-1e308',2)
+-100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.00
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `FORMAT('-1e308',2)` varchar(417) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 AS SELECT FORMAT(DATE'20191231',0),FORMAT(TIME'99:05:00',0),FORMAT(TIMESTAMP'2019-12-31 23:59:59.123456',0);
+SELECT * FROM t1;
+FORMAT(DATE'20191231',0) FORMAT(TIME'99:05:00',0) FORMAT(TIMESTAMP'2019-12-31 23:59:59.123456',0)
+20,191,231 990,500 20,191,231,235,959
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `FORMAT(DATE'20191231',0)` varchar(11) DEFAULT NULL,
+ `FORMAT(TIME'99:05:00',0)` varchar(10) DEFAULT NULL,
+ `FORMAT(TIMESTAMP'2019-12-31 23:59:59.123456',0)` varchar(21) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (y YEAR);
+INSERT INTO t1 VALUES ('2099'),('99');
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(y,0) FROM t1;
+SELECT * FROM t2;
+FORMAT(y,0)
+2,099
+1,999
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `FORMAT(y,0)` varchar(6) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
+CREATE OR REPLACE TABLE t1 (bi BIGINT UNSIGNED, bis BIGINT);
+INSERT INTO t1 VALUES (18446744073709551615,-9223372036854775808),(0,0);
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(bi,0),FORMAT(bis,0) FROM t1;
+SELECT * FROM t2;
+FORMAT(bi,0) FORMAT(bis,0)
+18,446,744,073,709,551,615 -9,223,372,036,854,775,808
+0 0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `FORMAT(bi,0)` varchar(27) DEFAULT NULL,
+ `FORMAT(bis,0)` varchar(26) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (d DECIMAL(65,0));
+INSERT INTO t1 VALUES (99999999999999999999999999999999999999999999999999999999999999999),(-99999999999999999999999999999999999999999999999999999999999999999),(0);
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(d,0) FROM t1;
+SELECT * FROM t2;
+FORMAT(d,0)
+99,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999
+-99,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999
+0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `FORMAT(d,0)` varchar(87) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 AS SELECT -99999999999999999999999999999999999999999999999999999999999999999 as c1;
+SELECT * FROM t1;
+c1
+-99999999999999999999999999999999999999999999999999999999999999999
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` decimal(65,0) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (b1 BIT(1),
+b2 BIT(2),
+b3 BIT(3),
+b4 BIT(4),
+b5 BIT(5),
+b6 BIT(6),
+b7 BIT(7),
+b8 BIT(8),
+b9 BIT(9),
+b10 BIT(10),
+b11 BIT(11),
+b12 BIT(12),
+b13 BIT(13),
+b14 BIT(14),
+b15 BIT(15),
+b16 BIT(16),
+b17 BIT(17),
+b18 BIT(18),
+b19 BIT(19),
+b20 BIT(20),
+b21 BIT(21),
+b22 BIT(22),
+b23 BIT(23),
+b24 BIT(24),
+b25 BIT(25),
+b26 BIT(26),
+b27 BIT(27),
+b28 BIT(28),
+b29 BIT(29),
+b30 BIT(30),
+b31 BIT(31),
+b32 BIT(32),
+b33 BIT(33),
+b34 BIT(34),
+b35 BIT(35),
+b36 BIT(36),
+b37 BIT(37),
+b38 BIT(38),
+b39 BIT(39),
+b40 BIT(40),
+b41 BIT(41),
+b42 BIT(42),
+b43 BIT(43),
+b44 BIT(44),
+b45 BIT(45),
+b46 BIT(46),
+b47 BIT(47),
+b48 BIT(48),
+b49 BIT(49),
+b50 BIT(50),
+b51 BIT(51),
+b52 BIT(52),
+b53 BIT(53),
+b54 BIT(54),
+b55 BIT(55),
+b56 BIT(56),
+b57 BIT(57),
+b58 BIT(58),
+b59 BIT(59),
+b60 BIT(60),
+b61 BIT(61),
+b62 BIT(62),
+b63 BIT(63),
+b64 BIT(64));
+INSERT INTO t1 VALUES(1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,
+32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215,
+33554431,67108863,134217727,268435455,536870911,1073741823,2147483647,
+4294967295,8589934591,17179869183,34359738367,68719476735,137438953471,
+274877906943,549755813887,1099511627775,2199023255551,4398046511103,
+8796093022207,17592186044415,35184372088831,70368744177663,140737488355327,
+281474976710655,562949953421311,1125899906842623,2251799813685247,
+4503599627370495,9007199254740991,18014398509481983,36028797018963967,
+72057594037927935,144115188075855871,288230376151711743,576460752303423487,
+1152921504606846975,2305843009213693951,4611686018427387903,
+9223372036854775807,18446744073709551615);
+SELECT FORMAT(b1,0),
+FORMAT(b2,0),
+FORMAT(b3,0),
+FORMAT(b4,0),
+FORMAT(b5,0),
+FORMAT(b6,0),
+FORMAT(b7,0),
+FORMAT(b8,0),
+FORMAT(b9,0),
+FORMAT(b10,0),
+FORMAT(b11,0),
+FORMAT(b12,0),
+FORMAT(b13,0),
+FORMAT(b14,0),
+FORMAT(b15,0),
+FORMAT(b16,0),
+FORMAT(b17,0),
+FORMAT(b18,0),
+FORMAT(b19,0),
+FORMAT(b20,0),
+FORMAT(b21,0),
+FORMAT(b22,0),
+FORMAT(b23,0),
+FORMAT(b24,0),
+FORMAT(b25,0),
+FORMAT(b26,0),
+FORMAT(b27,0),
+FORMAT(b28,0),
+FORMAT(b29,0),
+FORMAT(b30,0),
+FORMAT(b31,0),
+FORMAT(b32,0),
+FORMAT(b33,0),
+FORMAT(b34,0),
+FORMAT(b35,0),
+FORMAT(b36,0),
+FORMAT(b37,0),
+FORMAT(b38,0),
+FORMAT(b39,0),
+FORMAT(b40,0),
+FORMAT(b41,0),
+FORMAT(b42,0),
+FORMAT(b43,0),
+FORMAT(b44,0),
+FORMAT(b45,0),
+FORMAT(b46,0),
+FORMAT(b47,0),
+FORMAT(b48,0),
+FORMAT(b49,0),
+FORMAT(b50,0),
+FORMAT(b51,0),
+FORMAT(b52,0),
+FORMAT(b53,0),
+FORMAT(b54,0),
+FORMAT(b55,0),
+FORMAT(b56,0),
+FORMAT(b57,0),
+FORMAT(b58,0),
+FORMAT(b59,0),
+FORMAT(b60,0),
+FORMAT(b61,0),
+FORMAT(b62,0),
+FORMAT(b63,0),
+FORMAT(b64,0)
+FROM t1;
+FORMAT(b1,0) 1
+FORMAT(b2,0) 3
+FORMAT(b3,0) 7
+FORMAT(b4,0) 15
+FORMAT(b5,0) 31
+FORMAT(b6,0) 63
+FORMAT(b7,0) 127
+FORMAT(b8,0) 255
+FORMAT(b9,0) 511
+FORMAT(b10,0) 1,023
+FORMAT(b11,0) 2,047
+FORMAT(b12,0) 4,095
+FORMAT(b13,0) 8,191
+FORMAT(b14,0) 16,383
+FORMAT(b15,0) 32,767
+FORMAT(b16,0) 65,535
+FORMAT(b17,0) 131,071
+FORMAT(b18,0) 262,143
+FORMAT(b19,0) 524,287
+FORMAT(b20,0) 1,048,575
+FORMAT(b21,0) 2,097,151
+FORMAT(b22,0) 4,194,303
+FORMAT(b23,0) 8,388,607
+FORMAT(b24,0) 16,777,215
+FORMAT(b25,0) 33,554,431
+FORMAT(b26,0) 67,108,863
+FORMAT(b27,0) 134,217,727
+FORMAT(b28,0) 268,435,455
+FORMAT(b29,0) 536,870,911
+FORMAT(b30,0) 1,073,741,823
+FORMAT(b31,0) 2,147,483,647
+FORMAT(b32,0) 4,294,967,295
+FORMAT(b33,0) 8,589,934,591
+FORMAT(b34,0) 17,179,869,183
+FORMAT(b35,0) 34,359,738,367
+FORMAT(b36,0) 68,719,476,735
+FORMAT(b37,0) 137,438,953,471
+FORMAT(b38,0) 274,877,906,943
+FORMAT(b39,0) 549,755,813,887
+FORMAT(b40,0) 1,099,511,627,775
+FORMAT(b41,0) 2,199,023,255,551
+FORMAT(b42,0) 4,398,046,511,103
+FORMAT(b43,0) 8,796,093,022,207
+FORMAT(b44,0) 17,592,186,044,415
+FORMAT(b45,0) 35,184,372,088,831
+FORMAT(b46,0) 70,368,744,177,663
+FORMAT(b47,0) 140,737,488,355,327
+FORMAT(b48,0) 281,474,976,710,655
+FORMAT(b49,0) 562,949,953,421,311
+FORMAT(b50,0) 1,125,899,906,842,623
+FORMAT(b51,0) 2,251,799,813,685,247
+FORMAT(b52,0) 4,503,599,627,370,495
+FORMAT(b53,0) 9,007,199,254,740,991
+FORMAT(b54,0) 18,014,398,509,481,983
+FORMAT(b55,0) 36,028,797,018,963,967
+FORMAT(b56,0) 72,057,594,037,927,935
+FORMAT(b57,0) 144,115,188,075,855,871
+FORMAT(b58,0) 288,230,376,151,711,743
+FORMAT(b59,0) 576,460,752,303,423,487
+FORMAT(b60,0) 1,152,921,504,606,846,975
+FORMAT(b61,0) 2,305,843,009,213,693,951
+FORMAT(b62,0) 4,611,686,018,427,387,903
+FORMAT(b63,0) 9,223,372,036,854,775,807
+FORMAT(b64,0) 18,446,744,073,709,551,615
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (c1 BIT(1));
+INSERT INTO t1 VALUES (b'1');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+31
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(2) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(2));
+INSERT INTO t1 VALUES (b'11');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+33
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(2) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(3));
+INSERT INTO t1 VALUES (b'111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+37
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(2) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(4));
+INSERT INTO t1 VALUES (b'1111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+F
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3135
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(3) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(5));
+INSERT INTO t1 VALUES (b'11111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1F
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3331
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(3) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(6));
+INSERT INTO t1 VALUES (b'111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3F
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3633
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(3) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(7));
+INSERT INTO t1 VALUES (b'1111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7F
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+313237
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(5) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(8));
+INSERT INTO t1 VALUES (b'11111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+323535
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(5) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(9));
+INSERT INTO t1 VALUES (b'111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+353131
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(5) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(10));
+INSERT INTO t1 VALUES (b'1111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+312C303233
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(6) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(11));
+INSERT INTO t1 VALUES (b'11111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+322C303437
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(6) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(12));
+INSERT INTO t1 VALUES (b'111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+342C303935
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(6) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(13));
+INSERT INTO t1 VALUES (b'1111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+382C313931
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(6) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(14));
+INSERT INTO t1 VALUES (b'11111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+31362C333833
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(7) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(15));
+INSERT INTO t1 VALUES (b'111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+33322C373637
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(7) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(16));
+INSERT INTO t1 VALUES (b'1111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+36352C353335
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(7) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(17));
+INSERT INTO t1 VALUES (b'11111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3133312C303731
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(9) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(18));
+INSERT INTO t1 VALUES (b'111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3236322C313433
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(9) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(19));
+INSERT INTO t1 VALUES (b'1111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3532342C323837
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(9) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(20));
+INSERT INTO t1 VALUES (b'11111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+312C3034382C353735
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(21));
+INSERT INTO t1 VALUES (b'111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+322C3039372C313531
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(22));
+INSERT INTO t1 VALUES (b'1111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+342C3139342C333033
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(23));
+INSERT INTO t1 VALUES (b'11111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+382C3338382C363037
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(24));
+INSERT INTO t1 VALUES (b'111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+31362C3737372C323135
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(25));
+INSERT INTO t1 VALUES (b'1111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+33332C3535342C343331
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(26));
+INSERT INTO t1 VALUES (b'11111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+36372C3130382C383633
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(27));
+INSERT INTO t1 VALUES (b'111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3133342C3231372C373237
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(13) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(28));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3236382C3433352C343535
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(13) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(29));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3533362C3837302C393131
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(13) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(30));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+312C3037332C3734312C383233
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(14) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(31));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+322C3134372C3438332C363437
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(14) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(32));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+342C3239342C3936372C323935
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(14) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(33));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+382C3538392C3933342C353931
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(14) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(34));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+31372C3137392C3836392C313833
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(15) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(35));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+33342C3335392C3733382C333637
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(15) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(36));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+36382C3731392C3437362C373335
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(15) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(37));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3133372C3433382C3935332C343731
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(17) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(38));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3237342C3837372C3930362C393433
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(17) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(39));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3534392C3735352C3831332C383837
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(17) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(40));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+312C3039392C3531312C3632372C373735
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(18) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(41));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+322C3139392C3032332C3235352C353531
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(18) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(42));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+342C3339382C3034362C3531312C313033
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(18) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(43));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+382C3739362C3039332C3032322C323037
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(18) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(44));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+31372C3539322C3138362C3034342C343135
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(19) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(45));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+33352C3138342C3337322C3038382C383331
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(19) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(46));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+37302C3336382C3734342C3137372C363633
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(19) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(47));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3134302C3733372C3438382C3335352C333237
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(21) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(48));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3238312C3437342C3937362C3731302C363535
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(21) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(49));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3536322C3934392C3935332C3432312C333131
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(21) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(50));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+312C3132352C3839392C3930362C3834322C363233
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(22) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(51));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+322C3235312C3739392C3831332C3638352C323437
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(22) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(52));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+342C3530332C3539392C3632372C3337302C343935
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(22) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(53));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+392C3030372C3139392C3235342C3734302C393931
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(22) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(54));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+31382C3031342C3339382C3530392C3438312C393833
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(23) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(55));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+33362C3032382C3739372C3031382C3936332C393637
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(23) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(56));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+37322C3035372C3539342C3033372C3932372C393335
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(23) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(57));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3134342C3131352C3138382C3037352C3835352C383731
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(25) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(58));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3238382C3233302C3337362C3135312C3731312C373433
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(25) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(59));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+3537362C3436302C3735322C3330332C3432332C343837
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(25) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(60));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+312C3135322C3932312C3530342C3630362C3834362C393735
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(26) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(61));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+1FFFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+322C3330352C3834332C3030392C3231332C3639332C393531
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(26) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(62));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+3FFFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+342C3631312C3638362C3031382C3432372C3338372C393033
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(26) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(63));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+7FFFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+392C3232332C3337322C3033362C3835342C3737352C383037
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(26) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (c1 BIT(64));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+HEX(c1)
+FFFFFFFFFFFFFFFF
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+HEX(c1)
+31382C3434362C3734342C3037332C3730392C3535312C363135
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` varchar(27) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE OR REPLACE TABLE t1 (f float);
+INSERT INTO t1 VALUES (3e38), (-3e38), (0), (12.34), (-12.34);
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(f,0) FROM t1;
+SELECT * FROM t2;
+FORMAT(f,0)
+300,000,000,549,775,580,000,000,000,000,000,000,000
+-300,000,000,549,775,580,000,000,000,000,000,000,000
+0
+12
+-12
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `FORMAT(f,0)` varchar(54) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test
index 70adff02a22..9398cde7f89 100644
--- a/mysql-test/main/func_math.test
+++ b/mysql-test/main/func_math.test
@@ -1132,3 +1132,720 @@ SET sql_mode=DEFAULT;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-20732 max_char_length() doesn't account for FORMAT() with doubles in scientific notation
+--echo #
+
+CREATE OR REPLACE TABLE t1 AS SELECT FORMAT(-1e308,2);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 AS SELECT FORMAT('-1e308',2);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 AS SELECT FORMAT(DATE'20191231',0),FORMAT(TIME'99:05:00',0),FORMAT(TIMESTAMP'2019-12-31 23:59:59.123456',0);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (y YEAR);
+INSERT INTO t1 VALUES ('2099'),('99');
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(y,0) FROM t1;
+SELECT * FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1, t2;
+
+CREATE OR REPLACE TABLE t1 (bi BIGINT UNSIGNED, bis BIGINT);
+INSERT INTO t1 VALUES (18446744073709551615,-9223372036854775808),(0,0);
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(bi,0),FORMAT(bis,0) FROM t1;
+SELECT * FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (d DECIMAL(65,0));
+INSERT INTO t1 VALUES (99999999999999999999999999999999999999999999999999999999999999999),(-99999999999999999999999999999999999999999999999999999999999999999),(0);
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(d,0) FROM t1;
+SELECT * FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 AS SELECT -99999999999999999999999999999999999999999999999999999999999999999 as c1;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (b1 BIT(1),
+b2 BIT(2),
+b3 BIT(3),
+b4 BIT(4),
+b5 BIT(5),
+b6 BIT(6),
+b7 BIT(7),
+b8 BIT(8),
+b9 BIT(9),
+b10 BIT(10),
+b11 BIT(11),
+b12 BIT(12),
+b13 BIT(13),
+b14 BIT(14),
+b15 BIT(15),
+b16 BIT(16),
+b17 BIT(17),
+b18 BIT(18),
+b19 BIT(19),
+b20 BIT(20),
+b21 BIT(21),
+b22 BIT(22),
+b23 BIT(23),
+b24 BIT(24),
+b25 BIT(25),
+b26 BIT(26),
+b27 BIT(27),
+b28 BIT(28),
+b29 BIT(29),
+b30 BIT(30),
+b31 BIT(31),
+b32 BIT(32),
+b33 BIT(33),
+b34 BIT(34),
+b35 BIT(35),
+b36 BIT(36),
+b37 BIT(37),
+b38 BIT(38),
+b39 BIT(39),
+b40 BIT(40),
+b41 BIT(41),
+b42 BIT(42),
+b43 BIT(43),
+b44 BIT(44),
+b45 BIT(45),
+b46 BIT(46),
+b47 BIT(47),
+b48 BIT(48),
+b49 BIT(49),
+b50 BIT(50),
+b51 BIT(51),
+b52 BIT(52),
+b53 BIT(53),
+b54 BIT(54),
+b55 BIT(55),
+b56 BIT(56),
+b57 BIT(57),
+b58 BIT(58),
+b59 BIT(59),
+b60 BIT(60),
+b61 BIT(61),
+b62 BIT(62),
+b63 BIT(63),
+b64 BIT(64));
+INSERT INTO t1 VALUES(1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,
+ 32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215,
+ 33554431,67108863,134217727,268435455,536870911,1073741823,2147483647,
+ 4294967295,8589934591,17179869183,34359738367,68719476735,137438953471,
+ 274877906943,549755813887,1099511627775,2199023255551,4398046511103,
+ 8796093022207,17592186044415,35184372088831,70368744177663,140737488355327,
+ 281474976710655,562949953421311,1125899906842623,2251799813685247,
+ 4503599627370495,9007199254740991,18014398509481983,36028797018963967,
+ 72057594037927935,144115188075855871,288230376151711743,576460752303423487,
+ 1152921504606846975,2305843009213693951,4611686018427387903,
+ 9223372036854775807,18446744073709551615);
+--vertical_results
+SELECT FORMAT(b1,0),
+FORMAT(b2,0),
+FORMAT(b3,0),
+FORMAT(b4,0),
+FORMAT(b5,0),
+FORMAT(b6,0),
+FORMAT(b7,0),
+FORMAT(b8,0),
+FORMAT(b9,0),
+FORMAT(b10,0),
+FORMAT(b11,0),
+FORMAT(b12,0),
+FORMAT(b13,0),
+FORMAT(b14,0),
+FORMAT(b15,0),
+FORMAT(b16,0),
+FORMAT(b17,0),
+FORMAT(b18,0),
+FORMAT(b19,0),
+FORMAT(b20,0),
+FORMAT(b21,0),
+FORMAT(b22,0),
+FORMAT(b23,0),
+FORMAT(b24,0),
+FORMAT(b25,0),
+FORMAT(b26,0),
+FORMAT(b27,0),
+FORMAT(b28,0),
+FORMAT(b29,0),
+FORMAT(b30,0),
+FORMAT(b31,0),
+FORMAT(b32,0),
+FORMAT(b33,0),
+FORMAT(b34,0),
+FORMAT(b35,0),
+FORMAT(b36,0),
+FORMAT(b37,0),
+FORMAT(b38,0),
+FORMAT(b39,0),
+FORMAT(b40,0),
+FORMAT(b41,0),
+FORMAT(b42,0),
+FORMAT(b43,0),
+FORMAT(b44,0),
+FORMAT(b45,0),
+FORMAT(b46,0),
+FORMAT(b47,0),
+FORMAT(b48,0),
+FORMAT(b49,0),
+FORMAT(b50,0),
+FORMAT(b51,0),
+FORMAT(b52,0),
+FORMAT(b53,0),
+FORMAT(b54,0),
+FORMAT(b55,0),
+FORMAT(b56,0),
+FORMAT(b57,0),
+FORMAT(b58,0),
+FORMAT(b59,0),
+FORMAT(b60,0),
+FORMAT(b61,0),
+FORMAT(b62,0),
+FORMAT(b63,0),
+FORMAT(b64,0)
+FROM t1;
+--horizontal_results
+
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(1));
+INSERT INTO t1 VALUES (b'1');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(2));
+INSERT INTO t1 VALUES (b'11');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(3));
+INSERT INTO t1 VALUES (b'111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(4));
+INSERT INTO t1 VALUES (b'1111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(5));
+INSERT INTO t1 VALUES (b'11111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(6));
+INSERT INTO t1 VALUES (b'111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(7));
+INSERT INTO t1 VALUES (b'1111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(8));
+INSERT INTO t1 VALUES (b'11111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(9));
+INSERT INTO t1 VALUES (b'111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(10));
+INSERT INTO t1 VALUES (b'1111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(11));
+INSERT INTO t1 VALUES (b'11111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(12));
+INSERT INTO t1 VALUES (b'111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(13));
+INSERT INTO t1 VALUES (b'1111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(14));
+INSERT INTO t1 VALUES (b'11111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(15));
+INSERT INTO t1 VALUES (b'111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(16));
+INSERT INTO t1 VALUES (b'1111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(17));
+INSERT INTO t1 VALUES (b'11111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(18));
+INSERT INTO t1 VALUES (b'111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(19));
+INSERT INTO t1 VALUES (b'1111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(20));
+INSERT INTO t1 VALUES (b'11111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(21));
+INSERT INTO t1 VALUES (b'111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(22));
+INSERT INTO t1 VALUES (b'1111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(23));
+INSERT INTO t1 VALUES (b'11111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(24));
+INSERT INTO t1 VALUES (b'111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(25));
+INSERT INTO t1 VALUES (b'1111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(26));
+INSERT INTO t1 VALUES (b'11111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(27));
+INSERT INTO t1 VALUES (b'111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(28));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(29));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(30));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(31));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(32));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(33));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(34));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(35));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(36));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(37));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(38));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(39));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(40));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(41));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(42));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(43));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(44));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(45));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(46));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(47));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(48));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(49));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(50));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(51));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(52));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(53));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(54));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(55));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(56));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(57));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(58));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(59));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(60));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(61));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(62));
+INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(63));
+INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (c1 BIT(64));
+INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111111111');
+SELECT HEX(c1) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
+SELECT HEX(c1) FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE OR REPLACE TABLE t1 (f float);
+INSERT INTO t1 VALUES (3e38), (-3e38), (0), (12.34), (-12.34);
+CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(f,0) FROM t1;
+SELECT * FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_misc.result b/mysql-test/main/func_misc.result
index de04c296912..90f7b6c44ba 100644
--- a/mysql-test/main/func_misc.result
+++ b/mysql-test/main/func_misc.result
@@ -1612,3 +1612,29 @@ SELECT * FROM t1;
c1 c2
18446744073709551615 18446744073709551615
DROP TABLE t1;
+#
+# End of 10.3 tests
+#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16309 Split ::create_tmp_field() into virtual methods in Item
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+BEGIN NOT ATOMIC
+DECLARE a TEXT;
+DECLARE c CURSOR FOR SELECT NAME_CONST('x','y') FROM t1;
+OPEN c;
+FETCH c INTO a;
+CLOSE c;
+SELECT a;
+END;
+$$
+a
+y
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test
index c984b73c648..7d19c9e58af 100644
--- a/mysql-test/main/func_misc.test
+++ b/mysql-test/main/func_misc.test
@@ -1248,3 +1248,33 @@ CREATE TABLE t1 AS SELECT 18446744073709551615 AS c1, name_const('a',18446744073
SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16309 Split ::create_tmp_field() into virtual methods in Item
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE a TEXT;
+ DECLARE c CURSOR FOR SELECT NAME_CONST('x','y') FROM t1;
+ OPEN c;
+ FETCH c INTO a;
+ CLOSE c;
+ SELECT a;
+END;
+$$
+DELIMITER ;$$
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_sapdb.result b/mysql-test/main/func_sapdb.result
index 5b9743fb33f..27f1d74bc41 100644
--- a/mysql-test/main/func_sapdb.result
+++ b/mysql-test/main/func_sapdb.result
@@ -107,9 +107,13 @@ subtime("1997-12-31 23:59:59.000001", "1 1:1:1.000002")
select addtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999");
addtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999")
NULL
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '1998-01-01 01:01:01.999999'
select subtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999");
subtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999")
NULL
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '1998-01-01 01:01:01.999999'
select subtime("01:00:00.999999", "02:00:00.999998");
subtime("01:00:00.999999", "02:00:00.999998")
-00:59:59.999999
@@ -180,7 +184,7 @@ select time("1997-12-31 25:59:59.000001");
time("1997-12-31 25:59:59.000001")
NULL
Warnings:
-Warning 1292 Truncated incorrect time value: '1997-12-31 25:59:59.000001'
+Warning 1292 Incorrect time value: '1997-12-31 25:59:59.000001'
select microsecond("1997-12-31 23:59:59.000001");
microsecond("1997-12-31 23:59:59.000001")
1
diff --git a/mysql-test/main/func_str.result b/mysql-test/main/func_str.result
index c9bb7b539eb..37a4d025bce 100644
--- a/mysql-test/main/func_str.result
+++ b/mysql-test/main/func_str.result
@@ -745,7 +745,7 @@ t1 CREATE TABLE `t1` (
`conv(130,16,10)` varchar(64) DEFAULT NULL,
`hex(130)` varchar(6) DEFAULT NULL,
`char(130)` varbinary(4) DEFAULT NULL,
- `format(130,10)` varchar(45) DEFAULT NULL,
+ `format(130,10)` varchar(25) DEFAULT NULL,
`left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
`right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
`lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
@@ -1424,7 +1424,7 @@ SELECT * FROM t1 INNER JOIN t2 ON code=id
WHERE id='a12' AND (LENGTH(code)=5 OR code < 'a00');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 const PRIMARY PRIMARY 12 const 1 100.00 Using index
-1 SIMPLE t1 ref code code 13 const 3 100.00 Using where; Using index
+1 SIMPLE t1 ref code code 13 const 4 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`code` AS `code`,'a12' AS `id` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`code` = 'a12' and octet_length(`test`.`t1`.`code`) = 5
DROP TABLE t1,t2;
@@ -3042,7 +3042,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `format(123,2,'no_NO')` varchar(45) DEFAULT NULL
+ `format(123,2,'no_NO')` varchar(17) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1;
format(123,2,'no_NO')
@@ -5236,3 +5236,30 @@ DROP TABLE crash_test_2;
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-21841 CONV() function truncates the result type to 21 symbol.
+#
+CREATE TABLE t1(i BIGINT);
+INSERT INTO t1 VALUES (-1);
+CREATE TABLE t2 AS SELECT conv(i,16,2) from t1;
+SELECT * FROM t2;
+conv(i,16,2)
+1111111111111111111111111111111111111111111111111111111111111111
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `conv(i,16,2)` varchar(64) CHARACTER SET utf8 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+#
+# MDEV-18205 Assertion `str_length < len' failed in Binary_string::realloc_raw
+#
+SELECT GROUP_CONCAT( UpdateXML( '<a>new year</a>', '/a', '2019-01-01 00:00:00' ), ENCODE('text','pass') ) AS f;
+f
+2019-01-01 00:00:00F}^i
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test
index 11bafe4988a..f3fcd527f76 100644
--- a/mysql-test/main/func_str.test
+++ b/mysql-test/main/func_str.test
@@ -2163,3 +2163,30 @@ DROP TABLE crash_test_2;
--echo #
--echo # End of 10.3 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-21841 CONV() function truncates the result type to 21 symbol.
+--echo #
+
+CREATE TABLE t1(i BIGINT);
+INSERT INTO t1 VALUES (-1);
+CREATE TABLE t2 AS SELECT conv(i,16,2) from t1;
+SELECT * FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-18205 Assertion `str_length < len' failed in Binary_string::realloc_raw
+--echo #
+
+SELECT GROUP_CONCAT( UpdateXML( '<a>new year</a>', '/a', '2019-01-01 00:00:00' ), ENCODE('text','pass') ) AS f;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_time.result b/mysql-test/main/func_time.result
index f42a06e7af0..b52a78e851f 100644
--- a/mysql-test/main/func_time.result
+++ b/mysql-test/main/func_time.result
@@ -26,7 +26,7 @@ select sec_to_time('9001.1'), sec_to_time('1234567890123.123');
sec_to_time('9001.1') sec_to_time('1234567890123.123')
02:30:01.100000 838:59:59.999999
Warnings:
-Warning 1292 Truncated incorrect time value: '1234567890123.123'
+Warning 1292 Truncated incorrect seconds value: '1234567890123.123000'
select sec_to_time(-9001.1), sec_to_time(-9001.1) / 1,
sec_to_time(-9001.1) / 1e0, sec_to_time(-9001) div 1;
sec_to_time(-9001.1) sec_to_time(-9001.1) / 1 sec_to_time(-9001.1) / 1e0 sec_to_time(-9001) div 1
@@ -35,13 +35,13 @@ select sec_to_time(90011e-1), sec_to_time(1234567890123e30);
sec_to_time(90011e-1) sec_to_time(1234567890123e30)
02:30:01.100000 838:59:59.999999
Warnings:
-Warning 1292 Truncated incorrect time value: '1.234567890123e42'
+Warning 1292 Truncated incorrect seconds value: '1.234567890123e42'
select sec_to_time(1234567890123), sec_to_time('99999999999999999999999999999');
sec_to_time(1234567890123) sec_to_time('99999999999999999999999999999')
838:59:59 838:59:59.999999
Warnings:
-Warning 1292 Truncated incorrect time value: '1234567890123'
-Warning 1292 Truncated incorrect time value: '99999999999999999999999999999'
+Warning 1292 Truncated incorrect seconds value: '1234567890123'
+Warning 1292 Truncated incorrect seconds value: '99999999999999999999999999999'
select now()-curdate()*1000000-curtime();
now()-curdate()*1000000-curtime()
0
@@ -369,9 +369,7 @@ extract(DAY_MINUTE FROM "02 10:11:12")
21011
select extract(DAY_SECOND FROM "225 10:11:12");
extract(DAY_SECOND FROM "225 10:11:12")
-34225959
-Warnings:
-Warning 1292 Truncated incorrect time value: '225 10:11:12'
+225101112
select extract(HOUR FROM "1999-01-02 10:11:12");
extract(HOUR FROM "1999-01-02 10:11:12")
10
@@ -586,6 +584,8 @@ from_unixtime(2147483647)
select from_unixtime(2147483648);
from_unixtime(2147483648)
NULL
+Warnings:
+Warning 1292 Truncated incorrect unixtime value: '2147483648'
select from_unixtime(0);
from_unixtime(0)
1970-01-01 03:00:00
@@ -595,6 +595,8 @@ unix_timestamp(from_unixtime(2147483647))
select unix_timestamp(from_unixtime(2147483648));
unix_timestamp(from_unixtime(2147483648))
NULL
+Warnings:
+Warning 1292 Truncated incorrect unixtime value: '2147483648'
select unix_timestamp('2039-01-20 01:00:00');
unix_timestamp('2039-01-20 01:00:00')
NULL
@@ -939,7 +941,7 @@ f1
select f1 from t1 where cast("2006-1-1" as date) between f1 and cast('zzz' as date);
f1
Warnings:
-Warning 1292 Incorrect datetime value: 'zzz'
+Warning 1292 Truncated incorrect datetime value: 'zzz'
select f1 from t1 where makedate(2006,1) between date(f1) and date(f3);
f1
2006-01-01
@@ -962,17 +964,17 @@ SELECT SEC_TO_TIME(3300000);
SEC_TO_TIME(3300000)
838:59:59
Warnings:
-Warning 1292 Truncated incorrect time value: '3300000'
+Warning 1292 Truncated incorrect seconds value: '3300000'
SELECT SEC_TO_TIME(3300000)+0;
SEC_TO_TIME(3300000)+0
8385959
Warnings:
-Warning 1292 Truncated incorrect time value: '3300000'
+Warning 1292 Truncated incorrect seconds value: '3300000'
SELECT SEC_TO_TIME(3600 * 4294967296);
SEC_TO_TIME(3600 * 4294967296)
838:59:59
Warnings:
-Warning 1292 Truncated incorrect time value: '15461882265600'
+Warning 1292 Truncated incorrect seconds value: '15461882265600'
SELECT TIME_TO_SEC('916:40:00');
TIME_TO_SEC('916:40:00')
3020399
@@ -991,10 +993,10 @@ Warning 1292 Truncated incorrect time value: '916:40:00'
Warning 1292 Truncated incorrect time value: '1255:39:59.999999'
SELECT ADDTIME(20010101,1e0), ADDTIME(20010101,1.1e0);
ADDTIME(20010101,1e0) ADDTIME(20010101,1.1e0)
-2001-01-01 00:00:01 2001-01-01 00:00:01.100000
+2001-01-01 00:00:01.000000 2001-01-01 00:00:01.100000
SELECT ADDTIME(ADDTIME(20010101,1e0), 0);
ADDTIME(ADDTIME(20010101,1e0), 0)
-2001-01-01 00:00:01
+2001-01-01 00:00:01.000000
SELECT SUBTIME('916:40:00', '416:40:00');
SUBTIME('916:40:00', '416:40:00')
422:19:59.999999
@@ -1027,6 +1029,8 @@ NULL
SELECT MAKETIME(0, 0, 4294967296);
MAKETIME(0, 0, 4294967296)
NULL
+Warnings:
+Warning 1292 Truncated incorrect seconds value: '4294967296'
SELECT MAKETIME(CAST(-1 AS UNSIGNED), 0, 0);
MAKETIME(CAST(-1 AS UNSIGNED), 0, 0)
838:59:59
@@ -1035,9 +1039,7 @@ Note 1105 Cast to unsigned converted negative integer to it's positive complemen
Warning 1292 Truncated incorrect time value: '18446744073709551615:00:00'
SELECT EXTRACT(HOUR FROM '10000:02:03');
EXTRACT(HOUR FROM '10000:02:03')
-22
-Warnings:
-Warning 1292 Truncated incorrect time value: '10000:02:03'
+16
CREATE TABLE t1(f1 TIME);
INSERT IGNORE INTO t1 VALUES('916:00:00 a');
Warnings:
@@ -1052,8 +1054,7 @@ SEC_TO_TIME(CAST(-1 AS UNSIGNED))
838:59:59
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect time value: '18446744073709551615'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615'
SET NAMES latin1;
SET character_set_results = NULL;
SHOW VARIABLES LIKE 'character_set_results';
@@ -1066,6 +1067,7 @@ fmtddate field2
Sep-4 12:00AM abcd
DROP TABLE testBug8868;
SET NAMES DEFAULT;
+SET TIMESTAMP=UNIX_TIMESTAMP('2001-01-01 11:22:33');
CREATE TABLE t1 (
a TIMESTAMP
);
@@ -1074,7 +1076,11 @@ SELECT 1 FROM t1 ORDER BY MAKETIME(1, 1, a);
1
1
1
+Warnings:
+Warning 1292 Truncated incorrect seconds value: '20010101112233'
+Warning 1292 Truncated incorrect seconds value: '20010101112233'
DROP TABLE t1;
+SET TIMESTAMP=DEFAULT;
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
@@ -1103,7 +1109,7 @@ week(20061108), week(20061108.01), week(20061108085411.000002);
isnull(week(now() + 0)) isnull(week(now() + 0.2)) week(20061108) week(20061108.01) week(20061108085411.000002)
0 0 45 45 45
Warnings:
-Warning 1292 Truncated incorrect datetime value: '20061108.01'
+Note 1292 Truncated incorrect date value: '20061108.01'
End of 4.1 tests
select time_format('100:00:00', '%H %k %h %I %l');
time_format('100:00:00', '%H %k %h %I %l')
@@ -1238,7 +1244,7 @@ str_to_date("1997-00-04 22:23:00","%Y-%m-%D") + interval 10 minute
NULL
Warnings:
Warning 1292 Truncated incorrect date value: '1997-00-04 22:23:00'
-Warning 1292 Incorrect datetime value: '1997-00-04'
+Warning 1292 Incorrect datetime value: '1997-00-04 00:00:00'
create table t1 (field DATE);
insert into t1 values ('2006-11-06');
select * from t1 where field < '2006-11-06 04:08:36.0';
@@ -1380,9 +1386,9 @@ SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a);
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: ''
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: ''
DROP TABLE t1;
#
# Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ...
@@ -1724,7 +1730,6 @@ min(timestampadd(month, 1>'', from_days('%Z')))
NULL
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '%Z'
-Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1292 Incorrect datetime value: '0000-00-00'
SET timestamp=UNIX_TIMESTAMP('2001-01-01 00:00:00');
create table t1(a time);
@@ -1734,7 +1739,7 @@ select 1 from t1 where 1 < some (select cast(a as datetime) from t1);
1
1
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
drop table t1;
SET timestamp=DEFAULT;
#
@@ -1841,7 +1846,7 @@ select cast('131415.123e0' as time);
cast('131415.123e0' as time)
NULL
Warnings:
-Warning 1292 Truncated incorrect time value: '131415.123e0'
+Warning 1292 Incorrect time value: '131415.123e0'
select cast('2010-01-02 03:04:05' as datetime) between null and '2010-01-02 03:04:04';
cast('2010-01-02 03:04:05' as datetime) between null and '2010-01-02 03:04:04'
0
@@ -1917,7 +1922,7 @@ select least(1, f1) from t1;
least(1, f1)
0000-00-00 00:00:00
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
drop table t1;
SET timestamp=UNIX_TIMESTAMP('2014-04-14 10:10:10');
select now() > coalesce(time('21:43:24'), date('2010-05-03'));
@@ -2183,13 +2188,13 @@ CREATE TABLE t1 (a TIMESTAMP(3));
INSERT INTO t1 VALUES ('2001-01-01 10:20:30.999');
SELECT CAST(COALESCE(a,a) AS SIGNED) AS c1, CAST(COALESCE(a,a) AS DECIMAL(25,3)) AS c2, ROUND(COALESCE(a,a)) AS c2 FROM t1;
c1 c2 c2
-20010101102030 20010101102030.999 20010101102031
+20010101102030 20010101102030.999 2001-01-01 10:20:31
DROP TABLE t1;
CREATE TABLE t1 (a TIME(3));
INSERT INTO t1 VALUES ('10:20:30.999');
SELECT CAST(COALESCE(a,a) AS SIGNED) AS c1, CAST(COALESCE(a,a) AS DECIMAL(25,3)) AS c2, ROUND(COALESCE(a,a)) AS c2 FROM t1;
c1 c2 c2
-102030 102030.999 102031
+102030 102030.999 10:20:31
DROP TABLE t1;
SELECT
CAST(COALESCE(DATE('2001-01-01'),TIMESTAMP('2001-01-02 10:20:30')) AS SIGNED) AS c1,
@@ -2518,7 +2523,7 @@ TIMESTAMP('2001-01-01','10:10:10.12345'),
TIMESTAMP('2001-01-01','10:10:10.123456'),
TIMESTAMP('2001-01-01','10:10:10.1234567');
Warnings:
-Note 1292 Truncated incorrect time value: '10:10:10.1234567'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '10:10:10.1234567'
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
TIMESTAMP('2001-01-01','10:10:10') datetime YES NULL
@@ -2639,7 +2644,7 @@ SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DAT
c1 c2
9923-03-10 22:47:10.0 NULL
Warnings:
-Warning 1292 Truncated incorrect DECIMAL value: '2000000000000000000.0'
+Warning 1292 Truncated incorrect seconds value: '2000000000000000000.0'
#
# MDEV-4838 Wrong metadata for DATE_ADD('string', INVERVAL)
#
@@ -2798,13 +2803,12 @@ DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~('')))));
Warnings:
Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: ''
-Warning 1292 Truncated incorrect INTEGER value: ''
-Warning 1292 Truncated incorrect time value: '20000101'
+Warning 1292 Truncated incorrect seconds value: '20000101'
SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0)));
SEC_TO_TIME(MAKEDATE(0,RAND(~0)))
838:59:59
Warnings:
-Warning 1292 Truncated incorrect time value: '20000101'
+Warning 1292 Truncated incorrect seconds value: '20000101'
SELECT PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli'));
PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli'))
24257
@@ -3140,7 +3144,7 @@ def EXTRACT(YEAR_MONTH FROM a) 3 6 6 Y 32896 0 63
def EXTRACT(QUARTER FROM a) 3 2 1 Y 32896 0 63
def EXTRACT(MONTH FROM a) 3 2 2 Y 32896 0 63
def EXTRACT(WEEK FROM a) 3 2 2 Y 32896 0 63
-def EXTRACT(DAY FROM a) 3 2 2 Y 32896 0 63
+def EXTRACT(DAY FROM a) 3 3 2 Y 32896 0 63
def EXTRACT(DAY_HOUR FROM a) 3 5 4 Y 32896 0 63
def EXTRACT(DAY_MINUTE FROM a) 3 7 6 Y 32896 0 63
def EXTRACT(DAY_SECOND FROM a) 3 9 8 Y 32896 0 63
@@ -3230,7 +3234,7 @@ t2 CREATE TABLE `t2` (
`EXTRACT(QUARTER FROM a)` int(2) DEFAULT NULL,
`EXTRACT(MONTH FROM a)` int(2) DEFAULT NULL,
`EXTRACT(WEEK FROM a)` int(2) DEFAULT NULL,
- `EXTRACT(DAY FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(DAY FROM a)` int(3) DEFAULT NULL,
`EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL,
`EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL,
`EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL,
@@ -3279,7 +3283,7 @@ def EXTRACT(YEAR_MONTH FROM a) 3 6 1 Y 32896 0 63
def EXTRACT(QUARTER FROM a) 3 2 1 Y 32896 0 63
def EXTRACT(MONTH FROM a) 3 2 1 Y 32896 0 63
def EXTRACT(WEEK FROM a) 3 2 9 Y 32896 0 63
-def EXTRACT(DAY FROM a) 3 2 2 Y 32896 0 63
+def EXTRACT(DAY FROM a) 3 3 3 Y 32896 0 63
def EXTRACT(DAY_HOUR FROM a) 3 5 5 Y 32896 0 63
def EXTRACT(DAY_MINUTE FROM a) 3 7 7 Y 32896 0 63
def EXTRACT(DAY_SECOND FROM a) 3 9 9 Y 32896 0 63
@@ -3300,7 +3304,7 @@ EXTRACT(YEAR_MONTH FROM a) 0
EXTRACT(QUARTER FROM a) 0
EXTRACT(MONTH FROM a) 0
EXTRACT(WEEK FROM a) 613566757
-EXTRACT(DAY FROM a) 34
+EXTRACT(DAY FROM a) -34
EXTRACT(DAY_HOUR FROM a) -3422
EXTRACT(DAY_MINUTE FROM a) -342259
EXTRACT(DAY_SECOND FROM a) -34225959
@@ -3366,7 +3370,7 @@ EXTRACT(YEAR_MONTH FROM a) 0
EXTRACT(QUARTER FROM a) 0
EXTRACT(MONTH FROM a) 0
EXTRACT(WEEK FROM a) 613566757
-EXTRACT(DAY FROM a) 34
+EXTRACT(DAY FROM a) -34
EXTRACT(DAY_HOUR FROM a) -3422
EXTRACT(DAY_MINUTE FROM a) -342259
EXTRACT(DAY_SECOND FROM a) -34225959
@@ -3411,7 +3415,7 @@ t2 CREATE TABLE `t2` (
`EXTRACT(QUARTER FROM a)` int(2) DEFAULT NULL,
`EXTRACT(MONTH FROM a)` int(2) DEFAULT NULL,
`EXTRACT(WEEK FROM a)` int(2) DEFAULT NULL,
- `EXTRACT(DAY FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(DAY FROM a)` int(3) DEFAULT NULL,
`EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL,
`EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL,
`EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL,
@@ -3483,7 +3487,7 @@ NULL
NULL
NULL
Warnings:
-Warning 1292 Incorrect datetime value: '18446744073709551615'
+Warning 1292 Truncated incorrect datetime value: '18446744073709551615'
CREATE TABLE t2 (pk int default 1, a1 date);
INSERT INTO t2 VALUES (4,NULL);
CREATE view v2 as SELECT default(t1.pk), default(t2.pk), t1.pk from t1,t2;
@@ -3674,6 +3678,11 @@ ADDTIME(TIME'10:20:30', DATE'2001-01-01') AS c3,
ADDTIME(TIME'10:20:30', COALESCE(DATE'2001-01-01',TIMESTAMP'2001-01-01 00:00:00')) AS c4;
c1 c2 c3 c4
NULL NULL NULL NULL
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 00:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 00:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 00:00:00'
SELECT
HOUR(TIMESTAMP'0000-00-01 10:00:00') AS h0,
TIME_TO_SEC(TIMESTAMP'0000-00-01 10:00:00') AS tts0,
@@ -3794,13 +3803,21 @@ SET @sav_slow_query_log= @@session.slow_query_log;
SET @@session.slow_query_log= ON;
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @ts_func;
SELECT a FROM t_ts LIMIT 1 into @ts_func;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT a FROM t_trig LIMIT 1 into @ts_trig;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
DELETE FROM t_ts;
DELETE FROM t_trig;
SET @@session.slow_query_log= OFF;
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @func_ts;
SELECT a FROM t_ts LIMIT 1 into @ts_func;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT a FROM t_trig LIMIT 1 into @ts_trig;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SET @@session.slow_query_log= @sav_slow_query_log;
DROP FUNCTION fn_sleep_before_now;
DROP TRIGGER trg_insert_t_ts;
@@ -3840,3 +3857,2518 @@ c1 c2 c3
#
# End of 10.3 tests
#
+#
+# MDEV-14032 SEC_TO_TIME executes side effect two times
+#
+SET @a=10000000;
+SELECT SEC_TO_TIME(@a:=@a+1);
+SEC_TO_TIME(@a:=@a+1)
+838:59:59
+Warnings:
+Warning 1292 Truncated incorrect seconds value: '10000001'
+SELECT @a;
+@a
+10000001
+CREATE TABLE t1 (a TEXT);
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+INSERT INTO t1 VALUES ('f1 was called');
+RETURN 10000000;
+END;
+$$
+SELECT SEC_TO_TIME(f1());
+SEC_TO_TIME(f1())
+838:59:59
+Warnings:
+Warning 1292 Truncated incorrect seconds value: '10000000'
+SELECT * FROM t1;
+a
+f1 was called
+DROP TABLE t1;
+DROP FUNCTION f1;
+#
+# MDEV-17351 MICROSECOND(XXX(int_number_out_of_range)) erroneously returns 999999
+#
+# Reject anything that's parsed as DATETIME or DATE
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2001-01-01 10:20:30'),
+('01-01-01 10:20:30'),
+('2001-01-01 '),
+('20010101102030'),
+('010101102030');
+SELECT ADDTIME(DATE'2001-01-01',a), a FROM t1;
+ADDTIME(DATE'2001-01-01',a) a
+NULL 2001-01-01 10:20:30
+NULL 01-01-01 10:20:30
+NULL 2001-01-01
+NULL 20010101102030
+NULL 010101102030
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 10:20:30'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '01-01-01 10:20:30'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 '
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '20010101102030'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '010101102030'
+DROP TABLE t1;
+# GREATEST(decimal, time)
+SELECT
+GREATEST(8395959, TIME'00:00:00') AS c0,
+GREATEST(8395959.0, TIME'00:00:00') AS c1,
+GREATEST(8395959.00, TIME'00:00:00') AS c2,
+GREATEST(8395959.000, TIME'00:00:00') AS c3,
+GREATEST(8395959.0000, TIME'00:00:00') AS c4,
+GREATEST(8395959.00000, TIME'00:00:00') AS c5,
+GREATEST(8395959.000000, TIME'00:00:00') AS c6,
+GREATEST(8395959.0000000, TIME'00:00:00') AS c7;
+c0 838:59:59
+c1 838:59:59.9
+c2 838:59:59.99
+c3 838:59:59.999
+c4 838:59:59.9999
+c5 838:59:59.99999
+c6 838:59:59.999999
+c7 838:59:59.999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.0'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.00'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.0000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.00000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.0000000'
+SELECT
+MICROSECOND(GREATEST(8395959, TIME'00:00:00')) AS c0,
+MICROSECOND(GREATEST(8395959.0, TIME'00:00:00')) AS c1,
+MICROSECOND(GREATEST(8395959.00, TIME'00:00:00')) AS c2,
+MICROSECOND(GREATEST(8395959.000, TIME'00:00:00')) AS c3,
+MICROSECOND(GREATEST(8395959.0000, TIME'00:00:00')) AS c4,
+MICROSECOND(GREATEST(8395959.00000, TIME'00:00:00')) AS c5,
+MICROSECOND(GREATEST(8395959.000000, TIME'00:00:00')) AS c6,
+MICROSECOND(GREATEST(8395959.0000000, TIME'00:00:00')) AS c7;
+c0 0
+c1 900000
+c2 990000
+c3 999000
+c4 999900
+c5 999990
+c6 999999
+c7 999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.0'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.00'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.0000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.00000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959.0000000'
+SELECT
+CAST(GREATEST(8395959, TIME'00:00:00') AS SIGNED) AS ci,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,0)) AS c0,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,1)) AS c1,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,2)) AS c2,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,3)) AS c3,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,4)) AS c4,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,5)) AS c5,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,6)) AS c6,
+CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,7)) AS c7;
+ci 8385959
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+SELECT
+GREATEST(8395959, TIME'00:00:00') AS ci,
+GREATEST(8395959, TIME'00:00:00')+0 AS c0,
+GREATEST(8395959, TIME'00:00:00')+0.0 AS c1,
+GREATEST(8395959, TIME'00:00:00')+0.00 AS c2,
+GREATEST(8395959, TIME'00:00:00')+0.000 AS c3,
+GREATEST(8395959, TIME'00:00:00')+0.0000 AS c4,
+GREATEST(8395959, TIME'00:00:00')+0.00000 AS c5,
+GREATEST(8395959, TIME'00:00:00')+0.000000 AS c6,
+GREATEST(8395959, TIME'00:00:00')+0.0000000 AS c7;
+ci 838:59:59
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '8395959'
+# GREATEST(string, time)
+SELECT
+GREATEST('839:59:59', TIME'00:00:00') AS ci,
+GREATEST('839:59:59.0', TIME'00:00:00') AS c1,
+GREATEST('839:59:59.00', TIME'00:00:00') AS c2,
+GREATEST('839:59:59.000', TIME'00:00:00') AS c3,
+GREATEST('839:59:59.0000', TIME'00:00:00') AS c4,
+GREATEST('839:59:59.00000', TIME'00:00:00') AS c5,
+GREATEST('839:59:59.000000', TIME'00:00:00') AS c6,
+GREATEST('839:59:59.0000000', TIME'00:00:00') AS c7;
+ci 838:59:59
+c1 838:59:59.9
+c2 838:59:59.99
+c3 838:59:59.999
+c4 838:59:59.9999
+c5 838:59:59.99999
+c6 838:59:59.999999
+c7 838:59:59.999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.0'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.00'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.0000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.00000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.0000000'
+SELECT
+MICROSECOND(GREATEST('839:59:59', TIME'00:00:00')) AS ci,
+MICROSECOND(GREATEST('839:59:59.0', TIME'00:00:00')) AS c1,
+MICROSECOND(GREATEST('839:59:59.00', TIME'00:00:00')) AS c2,
+MICROSECOND(GREATEST('839:59:59.000', TIME'00:00:00')) AS c3,
+MICROSECOND(GREATEST('839:59:59.0000', TIME'00:00:00')) AS c4,
+MICROSECOND(GREATEST('839:59:59.00000', TIME'00:00:00')) AS c5,
+MICROSECOND(GREATEST('839:59:59.000000', TIME'00:00:00')) AS c6,
+MICROSECOND(GREATEST('839:59:59.0000000', TIME'00:00:00')) AS c7;
+ci 0
+c1 900000
+c2 990000
+c3 999000
+c4 999900
+c5 999990
+c6 999999
+c7 999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.0'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.00'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.0000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.00000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59.0000000'
+SELECT
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS SIGNED) AS ci,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,0)) AS c0,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,1)) AS c1,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,2)) AS c2,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,3)) AS c3,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,4)) AS c4,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,5)) AS c5,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,6)) AS c6,
+CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,7)) AS c7;
+ci 8385959
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+GREATEST('839:59:59', TIME'00:00:00') AS ci,
+GREATEST('839:59:59', TIME'00:00:00')+0 AS c0,
+GREATEST('839:59:59', TIME'00:00:00')+0.0 AS c1,
+GREATEST('839:59:59', TIME'00:00:00')+0.00 AS c2,
+GREATEST('839:59:59', TIME'00:00:00')+0.000 AS c3,
+GREATEST('839:59:59', TIME'00:00:00')+0.0000 AS c4,
+GREATEST('839:59:59', TIME'00:00:00')+0.00000 AS c5,
+GREATEST('839:59:59', TIME'00:00:00')+0.000000 AS c6,
+GREATEST('839:59:59', TIME'00:00:00')+0.0000000 AS c7;
+ci 838:59:59
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+# ADDTIME(datetime, decimal)
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0) AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00) AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000) AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000) AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000) AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000) AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000) AS c7;
+c0 2001-02-04 23:59:59
+c1 2001-02-04 23:59:59.0
+c2 2001-02-04 23:59:59.00
+c3 2001-02-04 23:59:59.000
+c4 2001-02-04 23:59:59.0000
+c5 2001-02-04 23:59:59.00000
+c6 2001-02-04 23:59:59.000000
+c7 2001-02-04 23:59:59.000000
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+SELECT
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)) AS c0,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0)) AS c1,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00)) AS c2,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000)) AS c3,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000)) AS c4,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000)) AS c5,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000)) AS c6,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000)) AS c7;
+c0 0
+c1 0
+c2 0
+c3 0
+c4 0
+c5 0
+c6 0
+c7 0
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+SELECT
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS SIGNED) AS ci,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,0)) AS c0,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,1)) AS c1,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,2)) AS c2,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,3)) AS c3,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,4)) AS c4,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,5)) AS c5,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,6)) AS c6,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,7)) AS c7;
+ci 20010204235959
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+c7 20010204235959.0000000
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000000 AS c7;
+ci 2001-02-04 23:59:59
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+c7 20010204235959.0000000
+# ADDTIME(datetime, string)
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0') AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00') AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000') AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000') AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000') AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000') AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000') AS c7;
+c0 2001-02-04 23:59:59
+c1 2001-02-04 23:59:59.0
+c2 2001-02-04 23:59:59.00
+c3 2001-02-04 23:59:59.000
+c4 2001-02-04 23:59:59.0000
+c5 2001-02-04 23:59:59.00000
+c6 2001-02-04 23:59:59.000000
+c7 2001-02-04 23:59:59.000000
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000'
+SELECT
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')) AS c0,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0')) AS c1,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00')) AS c2,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000')) AS c3,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000')) AS c4,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000')) AS c5,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000')) AS c6,
+MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000')) AS c7;
+c0 0
+c1 0
+c2 0
+c3 0
+c4 0
+c5 0
+c6 0
+c7 0
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000'
+SELECT
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS SIGNED) AS ci,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6,
+CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7;
+ci 20010204235959
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+c7 20010204235959.0000000
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000000 AS c7;
+ci 2001-02-04 23:59:59
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+c7 20010204235959.0000000
+# ADDTIME(time, decimal)
+SELECT
+ADDTIME(TIME'00:00:00', 8395959) AS c0,
+ADDTIME(TIME'00:00:00', 8395959.0) AS c1,
+ADDTIME(TIME'00:00:00', 8395959.00) AS c2,
+ADDTIME(TIME'00:00:00', 8395959.000) AS c3,
+ADDTIME(TIME'00:00:00', 8395959.0000) AS c4,
+ADDTIME(TIME'00:00:00', 8395959.00000) AS c5,
+ADDTIME(TIME'00:00:00', 8395959.000000) AS c6,
+ADDTIME(TIME'00:00:00', 8395959.0000000) AS c7;
+c0 838:59:59
+c1 838:59:59.9
+c2 838:59:59.99
+c3 838:59:59.999
+c4 838:59:59.9999
+c5 838:59:59.99999
+c6 838:59:59.999999
+c7 838:59:59.999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959)) AS c0,
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0)) AS c1,
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00)) AS c2,
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000)) AS c3,
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000)) AS c4,
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00000)) AS c5,
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000000)) AS c6,
+MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000000)) AS c7;
+c0 0
+c1 900000
+c2 990000
+c3 999000
+c4 999900
+c5 999990
+c6 999999
+c7 999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS SIGNED) AS ci,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,0)) AS c0,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,1)) AS c1,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,2)) AS c2,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,3)) AS c3,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,4)) AS c4,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,5)) AS c5,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,6)) AS c6,
+CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,7)) AS c7;
+ci 8385959
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+ADDTIME(TIME'00:00:00', 8395959) AS ci,
+ADDTIME(TIME'00:00:00', 8395959)+0 AS c0,
+ADDTIME(TIME'00:00:00', 8395959)+0.0 AS c1,
+ADDTIME(TIME'00:00:00', 8395959)+0.00 AS c2,
+ADDTIME(TIME'00:00:00', 8395959)+0.000 AS c3,
+ADDTIME(TIME'00:00:00', 8395959)+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', 8395959)+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', 8395959)+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', 8395959)+0.0000000 AS c7;
+ci 838:59:59
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+# ADDTIME(time,string)
+SELECT
+ADDTIME(TIME'00:00:00', '839:59:59') AS c0,
+ADDTIME(TIME'00:00:00', '839:59:59.0') AS c1,
+ADDTIME(TIME'00:00:00', '839:59:59.00') AS c2,
+ADDTIME(TIME'00:00:00', '839:59:59.000') AS c3,
+ADDTIME(TIME'00:00:00', '839:59:59.0000') AS c4,
+ADDTIME(TIME'00:00:00', '839:59:59.00000') AS c5,
+ADDTIME(TIME'00:00:00', '839:59:59.000000') AS c6,
+ADDTIME(TIME'00:00:00', '839:59:59.0000000') AS c7;
+c0 838:59:59
+c1 838:59:59.9
+c2 838:59:59.99
+c3 838:59:59.999
+c4 838:59:59.9999
+c5 838:59:59.99999
+c6 838:59:59.999999
+c7 838:59:59.999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59')) AS c0,
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0')) AS c1,
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00')) AS c2,
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000')) AS c3,
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000')) AS c4,
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00000')) AS c5,
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000000')) AS c6,
+MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000000')) AS c7;
+c0 0
+c1 900000
+c2 990000
+c3 999000
+c4 999900
+c5 999990
+c6 999999
+c7 999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS SIGNED) AS ci,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6,
+CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7;
+ci 8385959
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+ADDTIME(TIME'00:00:00', '839:59:59') AS ci,
+ADDTIME(TIME'00:00:00', '839:59:59')+0 AS c0,
+ADDTIME(TIME'00:00:00', '839:59:59')+0.0 AS c1,
+ADDTIME(TIME'00:00:00', '839:59:59')+0.00 AS c2,
+ADDTIME(TIME'00:00:00', '839:59:59')+0.000 AS c3,
+ADDTIME(TIME'00:00:00', '839:59:59')+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', '839:59:59')+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', '839:59:59')+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', '839:59:59')+0.0000000 AS c7;
+ci 838:59:59
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+# ADDTIME(int,int)
+SELECT
+ADDTIME(0, 8395959) AS c,
+MICROSECOND(ADDTIME(0, 8395959)) AS cm,
+CAST(ADDTIME(0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+CAST(ADDTIME(0, 8395959) AS DECIMAL(30,0)) AS cd300;
+c 838:59:59
+cm 0
+cs_fixme_mdev_17384 838
+cd300 8385959
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect INTEGER value: '838:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+ADDTIME(20010101000000, 8395959) AS c,
+MICROSECOND(ADDTIME(20010101000000, 8395959)) AS cm,
+CAST(ADDTIME(20010101000000, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+CAST(ADDTIME(20010101000000, 8395959) AS DECIMAL(30,0)) AS cd300;
+c 2001-02-04 23:59:59
+cm 0
+cs_fixme_mdev_17384 2001
+cd300 20010204235959
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect INTEGER value: '2001-02-04 23:59:59'
+# ADDTIME(decimal,int)
+# 8385960 in cd300 is correct: addtime returns '838:59:59.9'
+# which is further *rounded* to a decimals(30,0)
+SELECT
+ADDTIME(0.0, 8395959) AS c,
+MICROSECOND(ADDTIME(0.0, 8395959)) AS cm,
+CAST(ADDTIME(0.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS cd300;
+c 838:59:59.9
+cm 900000
+cs_fixme_mdev_17384 838
+cd300 8385960
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect INTEGER value: '838:59:59.9'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+ADDTIME(20010101000000.0, 8395959) AS c,
+MICROSECOND(ADDTIME(20010101000000.0, 8395959)) AS cm,
+CAST(ADDTIME(20010101000000.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+CAST(ADDTIME(20010101000000.0, 8395959) AS DECIMAL(30,0)) AS cd300;
+c 2001-02-04 23:59:59.0
+cm 0
+cs_fixme_mdev_17384 2001
+cd300 20010204235959
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect INTEGER value: '2001-02-04 23:59:59.0'
+# ADDTIME(decimal,decimal)
+SELECT
+ADDTIME(0.0, 8395959.0) AS c1,
+ADDTIME(0.0, 8395959.00) AS c2,
+ADDTIME(0.0, 8395959.000) AS c3,
+ADDTIME(0.0, 8395959.0000) AS c4,
+ADDTIME(0.0, 8395959.00000) AS c5,
+ADDTIME(0.0, 8395959.000000) AS c6,
+ADDTIME(0.0, 8395959.0000000) AS c7;
+c1 838:59:59.9
+c2 838:59:59.99
+c3 838:59:59.999
+c4 838:59:59.9999
+c5 838:59:59.99999
+c6 838:59:59.999999
+c7 838:59:59.999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+MICROSECOND(ADDTIME(0.0, 8395959.0)) AS c1,
+MICROSECOND(ADDTIME(0.0, 8395959.00)) AS c2,
+MICROSECOND(ADDTIME(0.0, 8395959.000)) AS c3,
+MICROSECOND(ADDTIME(0.0, 8395959.0000)) AS c4,
+MICROSECOND(ADDTIME(0.0, 8395959.00000)) AS c5,
+MICROSECOND(ADDTIME(0.0, 8395959.000000)) AS c6,
+MICROSECOND(ADDTIME(0.0, 8395959.0000000)) AS c7;
+c1 900000
+c2 990000
+c3 999000
+c4 999900
+c5 999990
+c6 999999
+c7 999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+# 8385960 in c1 is correct: addtime returns '838:59:59.9'
+# which is further *rounded* to a decimals(30,0)
+SELECT
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS c0,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,1)) AS c1,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,2)) AS c2,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,3)) AS c3,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,4)) AS c4,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,5)) AS c5,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,6)) AS c6,
+CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,7)) AS c7;
+c0 8385960
+c1 8385959.9
+c2 8385959.90
+c3 8385959.900
+c4 8385959.9000
+c5 8385959.90000
+c6 8385959.900000
+c7 8385959.9000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+SELECT
+ADDTIME(0.0, 8395959)+0 AS c0,
+ADDTIME(0.0, 8395959)+0.0 AS c1,
+ADDTIME(0.0, 8395959)+0.00 AS c2,
+ADDTIME(0.0, 8395959)+0.000 AS c3,
+ADDTIME(0.0, 8395959)+0.0000 AS c4,
+ADDTIME(0.0, 8395959)+0.00000 AS c5,
+ADDTIME(0.0, 8395959)+0.000000 AS c6,
+ADDTIME(0.0, 8395959)+0.0000000 AS c7;
+c0 8385959.9
+c1 8385959.9
+c2 8385959.90
+c3 8385959.900
+c4 8385959.9000
+c5 8385959.90000
+c6 8385959.900000
+c7 8385959.9000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '839:59:59'
+# TIMESTAMP(string,decimal)
+SELECT
+TIMESTAMP('2001-01-01', 8395959) AS ci,
+TIMESTAMP('2001-01-01', 8395959.0) AS c1,
+TIMESTAMP('2001-01-01', 8395959.00) AS c2,
+TIMESTAMP('2001-01-01', 8395959.000) AS c3,
+TIMESTAMP('2001-01-01', 8395959.0000) AS c4,
+TIMESTAMP('2001-01-01', 8395959.00000) AS c5,
+TIMESTAMP('2001-01-01', 8395959.000000) AS c6,
+TIMESTAMP('2001-01-01', 8395959.0000000) AS c7;
+ci 2001-02-04 23:59:59
+c1 2001-02-04 23:59:59.0
+c2 2001-02-04 23:59:59.00
+c3 2001-02-04 23:59:59.000
+c4 2001-02-04 23:59:59.0000
+c5 2001-02-04 23:59:59.00000
+c6 2001-02-04 23:59:59.000000
+c7 2001-02-04 23:59:59.000000
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+SELECT
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959)) AS ci,
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0)) AS c1,
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00)) AS c2,
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000)) AS c3,
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000)) AS c4,
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00000)) AS c5,
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000000)) AS c6,
+MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000000)) AS c7;
+ci 0
+c1 0
+c2 0
+c3 0
+c4 0
+c5 0
+c6 0
+c7 0
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000'
+SELECT
+CAST(TIMESTAMP('2001-01-01', 8395959) AS SIGNED) AS ci,
+CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,0)) AS c0,
+CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,1)) AS c1,
+CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,2)) AS c2,
+CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,3)) AS c3,
+CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,4)) AS c4,
+CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,5)) AS c5,
+CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,6)) AS c6;
+ci 20010204235959
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+SELECT
+TIMESTAMP('2001-01-01', 8395959) AS ci,
+TIMESTAMP('2001-01-01', 8395959)+0 AS c0,
+TIMESTAMP('2001-01-01', 8395959)+0.0 AS c1,
+TIMESTAMP('2001-01-01', 8395959)+0.00 AS c2,
+TIMESTAMP('2001-01-01', 8395959)+0.000 AS c3,
+TIMESTAMP('2001-01-01', 8395959)+0.0000 AS c4,
+TIMESTAMP('2001-01-01', 8395959)+0.00000 AS c5,
+TIMESTAMP('2001-01-01', 8395959)+0.000000 AS c6,
+TIMESTAMP('2001-01-01', 8395959)+0.0000000 AS c7;
+ci 2001-02-04 23:59:59
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+c7 20010204235959.0000000
+# TIMESTAMP(string,string)
+SELECT
+TIMESTAMP('2001-01-01', '839:59:59') AS ci,
+TIMESTAMP('2001-01-01', '839:59:59.0') AS c1,
+TIMESTAMP('2001-01-01', '839:59:59.00') AS c2,
+TIMESTAMP('2001-01-01', '839:59:59.000') AS c3,
+TIMESTAMP('2001-01-01', '839:59:59.0000') AS c4,
+TIMESTAMP('2001-01-01', '839:59:59.00000') AS c5,
+TIMESTAMP('2001-01-01', '839:59:59.000000') AS c6,
+TIMESTAMP('2001-01-01', '839:59:59.0000000') AS c7;
+ci 2001-02-04 23:59:59
+c1 2001-02-04 23:59:59.0
+c2 2001-02-04 23:59:59.00
+c3 2001-02-04 23:59:59.000
+c4 2001-02-04 23:59:59.0000
+c5 2001-02-04 23:59:59.00000
+c6 2001-02-04 23:59:59.000000
+c7 2001-02-04 23:59:59.000000
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000'
+SELECT
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59')) AS ci,
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0')) AS c1,
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00')) AS c2,
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000')) AS c3,
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000')) AS c4,
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00000')) AS c5,
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000000')) AS c6,
+MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000000')) AS c7;
+ci 0
+c1 0
+c2 0
+c3 0
+c4 0
+c5 0
+c6 0
+c7 0
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000'
+SELECT
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS SIGNED) AS ci,
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,0)) AS c0,
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,1)) AS c1,
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,2)) AS c2,
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,3)) AS c3,
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,4)) AS c4,
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,5)) AS c5,
+CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,6)) AS c6;
+ci 20010204235959
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+SELECT
+TIMESTAMP('2001-01-01', '839:59:59') AS ci,
+TIMESTAMP('2001-01-01', '839:59:59')+0 AS c0,
+TIMESTAMP('2001-01-01', '839:59:59')+0.0 AS c1,
+TIMESTAMP('2001-01-01', '839:59:59')+0.00 AS c2,
+TIMESTAMP('2001-01-01', '839:59:59')+0.000 AS c3,
+TIMESTAMP('2001-01-01', '839:59:59')+0.0000 AS c4,
+TIMESTAMP('2001-01-01', '839:59:59')+0.00000 AS c5,
+TIMESTAMP('2001-01-01', '839:59:59')+0.000000 AS c6,
+TIMESTAMP('2001-01-01', '839:59:59')+0.0000000 AS c7;
+ci 2001-02-04 23:59:59
+c0 20010204235959
+c1 20010204235959.0
+c2 20010204235959.00
+c3 20010204235959.000
+c4 20010204235959.0000
+c5 20010204235959.00000
+c6 20010204235959.000000
+c7 20010204235959.0000000
+# Corner cases for TIMESTAMP(timestamp,xxx)
+# HOUR is outside of supported INTERVAL DAYS TO SECONDS range
+# Expect NULL with INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('4294967296:00:00', '178956970 16:00:00');
+INSERT INTO t1 VALUES ('4294967295:59:59', '178956970 15:59:59');
+INSERT INTO t1 VALUES ('4294967294:59:59', '178956970 14:59:59');
+INSERT INTO t1 VALUES ('87649416:00:00', '3652059 00:00:00');
+SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1;
+ta tb
+NULL NULL
+NULL NULL
+NULL NULL
+NULL NULL
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967296:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '178956970 16:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '178956970 15:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967294:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '178956970 14:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649416:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '3652059 00:00:00'
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('-4294967296:00:00', '-178956970 16:00:00');
+INSERT INTO t1 VALUES ('-4294967295:59:59', '-178956970 15:59:59');
+INSERT INTO t1 VALUES ('-4294967294:59:59', '-178956970 14:59:59');
+INSERT INTO t1 VALUES ('-87649416:00:00', '-3652059 00:00:00');
+SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1;
+ta tb
+NULL NULL
+NULL NULL
+NULL NULL
+NULL NULL
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-4294967296:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-178956970 16:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-4294967295:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-178956970 15:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-4294967294:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-178956970 14:59:59'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-87649416:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-3652059 00:00:00'
+DROP TABLE t1;
+# HOUR is OK
+# Expect max or near-max DATETIME value + no INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('87649415:59:59.999999', '3652058 23:59:59.999999');
+INSERT INTO t1 VALUES ('87649415:59:59', '3652058 23:59:59');
+SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1;
+ta tb
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999999
+9999-12-31 23:59:59.000000 9999-12-31 23:59:59.000000
+DROP TABLE t1;
+# HOUR is OK
+# Expect near '0001-01-01 00:00:00' DATETIME value + no INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('-87649415:59:59.999999', '-3652058 23:59:59.999999');
+INSERT INTO t1 VALUES ('-87649415:59:59', '-3652058 23:59:59');
+SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1;
+ta tb
+NULL 0001-01-01 00:00:00.000000
+0001-01-01 00:00:00.000000 0001-01-01 00:00:00.999999
+DROP TABLE t1;
+# HOUR is OK
+# Expect NULL on datetime arithmetic overflow + no INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('-00:00:00.000001', '-0 00:00:00.000001');
+SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1;
+ta tb
+NULL NULL
+DROP TABLE t1;
+# Corner cases for ADDTIME(timestamp,xxx)
+# HOUR is outside of UINT_MAX32 range
+# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959) AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59') AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+# HOUR UINT_MAX32
+# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959) AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59') AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+# HOUR is max_useful_hour()+1
+# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959) AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59') AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+# HOUR is max_useful_hour()
+# Expect NULL (calc_time_diff overflows ) + no INTERVAL warnings
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959) AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+SELECT
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59') AS ci,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0 AS c0,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6,
+ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+# HOUR is max_useful_hour()
+# Expect non-NULL + no warnings
+SELECT
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959) AS ci,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0 AS c0,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0 AS c1,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00 AS c2,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000 AS c3,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000 AS c4,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00000 AS c5,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000000 AS c6,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000000 AS c7;
+ci 9999-12-31 23:59:59
+c0 99991231235959
+c1 99991231235959.0
+c2 99991231235959.00
+c3 99991231235959.000
+c4 99991231235959.0000
+c5 99991231235959.00000
+c6 99991231235959.000000
+c7 99991231235959.0000000
+SELECT
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59') AS ci,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0 AS c0,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6,
+ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7;
+ci 9999-12-31 23:59:59
+c0 99991231235959
+c1 99991231235959.0
+c2 99991231235959.00
+c3 99991231235959.000
+c4 99991231235959.0000
+c5 99991231235959.00000
+c6 99991231235959.000000
+c7 99991231235959.0000000
+# Corner cases for ADDTIME(time,xxx)
+# HOUR outside of UINT32 range
+# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ADDTIME(TIME'00:00:00', 42949672965959) AS ci,
+ADDTIME(TIME'00:00:00', 42949672965959)+0 AS c0,
+ADDTIME(TIME'00:00:00', 42949672965959)+0.0 AS c1,
+ADDTIME(TIME'00:00:00', 42949672965959)+0.00 AS c2,
+ADDTIME(TIME'00:00:00', 42949672965959)+0.000 AS c3,
+ADDTIME(TIME'00:00:00', 42949672965959)+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', 42949672965959)+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', 42949672965959)+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', 42949672965959)+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959'
+SELECT
+ADDTIME(TIME'00:00:00', '4294967296:59:59') AS ci,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0 AS c0,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0 AS c1,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00 AS c2,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000 AS c3,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59'
+# HOUR is UINT_MAX32 (outside of INTERVAL DAY TO SECOND range)
+# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ADDTIME(TIME'00:00:00', 42949672955959) AS ci,
+ADDTIME(TIME'00:00:00', 42949672955959)+0 AS c0,
+ADDTIME(TIME'00:00:00', 42949672955959)+0.0 AS c1,
+ADDTIME(TIME'00:00:00', 42949672955959)+0.00 AS c2,
+ADDTIME(TIME'00:00:00', 42949672955959)+0.000 AS c3,
+ADDTIME(TIME'00:00:00', 42949672955959)+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', 42949672955959)+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', 42949672955959)+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', 42949672955959)+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959'
+SELECT
+ADDTIME(TIME'00:00:00', '4294967295:59:59') AS ci,
+ADDTIME(TIME'00:00:00', '4294967295:59:59')+0 AS c0,
+ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0 AS c1,
+ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00 AS c2,
+ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000 AS c3,
+ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', '4294967295;00:00')+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '4294967295;00:00'
+# HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range)
+# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ADDTIME(TIME'00:00:00', 876494165959) AS ci,
+ADDTIME(TIME'00:00:00', 876494165959)+0 AS c0,
+ADDTIME(TIME'00:00:00', 876494165959)+0.0 AS c1,
+ADDTIME(TIME'00:00:00', 876494165959)+0.00 AS c2,
+ADDTIME(TIME'00:00:00', 876494165959)+0.000 AS c3,
+ADDTIME(TIME'00:00:00', 876494165959)+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', 876494165959)+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', 876494165959)+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', 876494165959)+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+SELECT
+ADDTIME(TIME'00:00:00', '87649416:59:59') AS ci,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0 AS c0,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0 AS c1,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00 AS c2,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000 AS c3,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000000 AS c7;
+ci NULL
+c0 NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+c7 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+# HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range)
+# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ADDTIME(TIME'-838:59:59', 876494165959) AS ci,
+ADDTIME(TIME'-838:59:59.9', 876494165959) AS c1,
+ADDTIME(TIME'-838:59:59.99', 876494165959) AS c2,
+ADDTIME(TIME'-838:59:59.999', 876494165959) AS c3,
+ADDTIME(TIME'-838:59:59.9999', 876494165959) AS c4,
+ADDTIME(TIME'-838:59:59.99999', 876494165959) AS c5,
+ADDTIME(TIME'-838:59:59.999999', 876494165959) AS c6;
+ci NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '876494165959'
+SELECT
+ADDTIME(TIME'-838:59:59', '87649416:59:59') AS ci,
+ADDTIME(TIME'-838:59:59.9', '87649416:59:59') AS c1,
+ADDTIME(TIME'-838:59:59.99', '87649416:59:59') AS c2,
+ADDTIME(TIME'-838:59:59.999', '87649416:59:59') AS c3,
+ADDTIME(TIME'-838:59:59.9999', '87649416:59:59') AS c4,
+ADDTIME(TIME'-838:59:59.99999', '87649416:59:59') AS c5,
+ADDTIME(TIME'-838:59:59.999999', '87649416:59:59') AS c6;
+ci NULL
+c1 NULL
+c2 NULL
+c3 NULL
+c4 NULL
+c5 NULL
+c6 NULL
+Warnings:
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+Level Warning
+Code 1292
+Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59'
+SELECT
+ADDTIME(TIME'-838:59:59.9999999', '87649416:59:59') AS c7;
+c7 NULL
+# HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range)
+# Expect max TIME(0) + zero fraction + TIME warnings + no INTEVAL warnings
+SELECT
+ADDTIME(TIME'00:00:00', 876494155959) AS ci,
+ADDTIME(TIME'00:00:00', 876494155959)+0 AS c0,
+ADDTIME(TIME'00:00:00', 876494155959)+0.0 AS c1,
+ADDTIME(TIME'00:00:00', 876494155959)+0.00 AS c2,
+ADDTIME(TIME'00:00:00', 876494155959)+0.000 AS c3,
+ADDTIME(TIME'00:00:00', 876494155959)+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', 876494155959)+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', 876494155959)+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', 876494155959)+0.0000000 AS c7;
+ci 838:59:59
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+SELECT
+ADDTIME(TIME'00:00:00', '87649415:59:59') AS ci,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0 AS c0,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0 AS c1,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00 AS c2,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000 AS c3,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000 AS c4,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00000 AS c5,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000000 AS c6,
+ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000000 AS c7;
+ci 838:59:59
+c0 8385959
+c1 8385959.0
+c2 8385959.00
+c3 8385959.000
+c4 8385959.0000
+c5 8385959.00000
+c6 8385959.000000
+c7 8385959.0000000
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87649415:59:59'
+# HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range)
+# Expect max TIME(N) + TIME warnings + no INTERVAL warnings
+SELECT
+ADDTIME(TIME'-838:59:59', 876494155959) AS ci,
+ADDTIME(TIME'-838:59:59.9', 876494155959) AS c1,
+ADDTIME(TIME'-838:59:59.99', 876494155959) AS c2,
+ADDTIME(TIME'-838:59:59.999', 876494155959) AS c3,
+ADDTIME(TIME'-838:59:59.9999', 876494155959) AS c4,
+ADDTIME(TIME'-838:59:59.99999', 876494155959) AS c5,
+ADDTIME(TIME'-838:59:59.999999', 876494155959) AS c6;
+ci 838:59:59
+c1 838:59:59.9
+c2 838:59:59.99
+c3 838:59:59.999
+c4 838:59:59.9999
+c5 838:59:59.99999
+c6 838:59:59.999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648577:00:00'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.100000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.010000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.001000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.000100'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.000010'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.000001'
+SELECT
+ADDTIME(TIME'-838:59:59', '87649415:59:59') AS ci,
+ADDTIME(TIME'-838:59:59.9', '87649415:59:59') AS c1,
+ADDTIME(TIME'-838:59:59.99', '87649415:59:59') AS c2,
+ADDTIME(TIME'-838:59:59.999', '87649415:59:59') AS c3,
+ADDTIME(TIME'-838:59:59.9999', '87649415:59:59') AS c4,
+ADDTIME(TIME'-838:59:59.99999', '87649415:59:59') AS c5,
+ADDTIME(TIME'-838:59:59.999999', '87649415:59:59') AS c6;
+ci 838:59:59
+c1 838:59:59.9
+c2 838:59:59.99
+c3 838:59:59.999
+c4 838:59:59.9999
+c5 838:59:59.99999
+c6 838:59:59.999999
+Warnings:
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648577:00:00'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.100000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.010000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.001000'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.000100'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.000010'
+Level Warning
+Code 1292
+Message Truncated incorrect time value: '87648576:59:59.000001'
+SELECT
+ADDTIME(TIME'-838:59:59.9999999', '87649415:59:59') AS c7;
+c7 838:59:59.999999
+#
+# MDEV-17400 The result of TIME('42949672965959-01') depends on architecture
+#
+SELECT TIME('42949672955959-01'), TIME('42949672965959-01');
+TIME('42949672955959-01') TIME('42949672965959-01')
+NULL NULL
+Warnings:
+Warning 1292 Incorrect time value: '42949672955959-01'
+Warning 1292 Incorrect time value: '42949672965959-01'
+SELECT TIME('18446744073709551615-01'), TIME('18446744073709551616-01');
+TIME('18446744073709551615-01') TIME('18446744073709551616-01')
+NULL NULL
+Warnings:
+Warning 1292 Incorrect time value: '18446744073709551615-01'
+Warning 1292 Incorrect time value: '18446744073709551616-01'
+#
+# MDEV-17434 EXTRACT(DAY FROM negative_time) returns wrong result
+#
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES ('-24:10:10.10');
+SELECT
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a)
+FROM t1;
+EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a) EXTRACT(DAY FROM a) EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_MINUTE FROM a) EXTRACT(DAY_SECOND FROM a) EXTRACT(DAY_MICROSECOND FROM a)
+-10 -10 -100000 -1 -100 -10010 -1001010 -1001010100000
+CREATE TABLE t2 AS
+SELECT
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a)
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `EXTRACT(MINUTE FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(SECOND FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(MICROSECOND FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM a)` bigint(15) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+#
+# MDEV-17478 Wrong result for TIME('+100:20:30')
+#
+SELECT TIME('+100:20:30');
+TIME('+100:20:30')
+100:20:30
+#
+# MDEV-17477 Wrong result for TIME('-2001-01-01 10:20:30')
+#
+SELECT TIME('-2001-01-01 10:20:30');
+TIME('-2001-01-01 10:20:30')
+NULL
+Warnings:
+Warning 1292 Incorrect time value: '-2001-01-01 10:20:30'
+SELECT TIME('2001-01-01') AS c1, TIME('2001-01-01 ') AS c2;
+c1 c2
+00:20:01 00:20:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '2001-01-01'
+Warning 1292 Truncated incorrect time value: '2001-01-01 '
+SELECT TIME('0001:01:01 '), TIME('0001:01:01 ');
+TIME('0001:01:01 ') TIME('0001:01:01 ')
+01:01:01 01:01:01
+SELECT TIME('1 2'), TIME('1 2 ');
+TIME('1 2') TIME('1 2 ')
+00:00:01 00:00:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '1 2'
+Warning 1292 Truncated incorrect time value: '1 2 '
+SELECT TIME('2001-01-01T'), TIME('2001-01-01T ');
+TIME('2001-01-01T') TIME('2001-01-01T ')
+00:00:00 00:00:00
+SELECT TIME('901-01-01T1'), TIME('901-01-01T10');
+TIME('901-01-01T1') TIME('901-01-01T10')
+01:00:00 10:00:00
+SELECT TIME('091-01-01T1'), TIME('091-01-01T10');
+TIME('091-01-01T1') TIME('091-01-01T10')
+01:00:00 10:00:00
+SELECT TIME('0001:01:01x'), TIME('0001:01:01xx');
+TIME('0001:01:01x') TIME('0001:01:01xx')
+01:01:01 01:01:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '0001:01:01x'
+Warning 1292 Truncated incorrect time value: '0001:01:01xx'
+SELECT TIME('0001:01:01.'), TIME('0001:01:01..');
+TIME('0001:01:01.') TIME('0001:01:01..')
+01:01:01 01:01:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '0001:01:01..'
+SELECT TIME('0001:01:01-'), TIME('0001:01:01--');
+TIME('0001:01:01-') TIME('0001:01:01--')
+01:01:01 01:01:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '0001:01:01-'
+Warning 1292 Truncated incorrect time value: '0001:01:01--'
+SELECT TIME('0001:01:01-'), TIME('0001:01:01--');
+TIME('0001:01:01-') TIME('0001:01:01--')
+01:01:01 01:01:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '0001:01:01-'
+Warning 1292 Truncated incorrect time value: '0001:01:01--'
+SELECT TIME('-xxx'), TIME('-xxxxxxxxxxxxxxxxxxxx');
+TIME('-xxx') TIME('-xxxxxxxxxxxxxxxxxxxx')
+NULL NULL
+Warnings:
+Warning 1292 Incorrect time value: '-xxx'
+Warning 1292 Incorrect time value: '-xxxxxxxxxxxxxxxxxxxx'
+SELECT TIME('- '), TIME('- ');
+TIME('- ') TIME('- ')
+NULL NULL
+Warnings:
+Warning 1292 Incorrect time value: '- '
+Warning 1292 Incorrect time value: '- '
+SELECT TIME('-'), TIME('-');
+TIME('-') TIME('-')
+NULL NULL
+Warnings:
+Warning 1292 Incorrect time value: '-'
+Warning 1292 Incorrect time value: '-'
+SELECT TIME('1-1-1 1:1:1'), TIME('1-1-1 1:1:1.0');
+TIME('1-1-1 1:1:1') TIME('1-1-1 1:1:1.0')
+01:01:01 01:01:01.0
+SELECT TIME('1-1-1 1:2:3'), TIME('1-1-1 1:2:3.0');
+TIME('1-1-1 1:2:3') TIME('1-1-1 1:2:3.0')
+01:02:03 01:02:03.0
+SELECT
+CAST('20050326112233 garbage' as datetime),
+CAST('20050326 garbage' as date),
+CAST('50326 garbage' as time);
+CAST('20050326112233 garbage' as datetime) CAST('20050326 garbage' as date) CAST('50326 garbage' as time)
+2005-03-26 11:22:33 2005-03-26 05:03:26
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '20050326112233 garbage'
+Warning 1292 Truncated incorrect date value: '20050326 garbage'
+Warning 1292 Truncated incorrect time value: '50326 garbage'
+SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00');
+TIME('- 01:00:00') TIME('- 1 01:00:00')
+-01:00:00 -25:00:00
+#
+# MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on SELECT with NULLIF and FROM_UNIXTIME on incorrect time
+#
+SET time_zone='+00:00';
+SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14');
+NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14')
+1970-01-01 00:00:00
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'foo'
+Warning 1292 Truncated incorrect DECIMAL value: 'foo'
+SET time_zone=DEFAULT;
+#
+# MDEV-18402 Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date
+#
+SELECT MAKETIME('01', '01', LEAST( -100, NULL ));
+MAKETIME('01', '01', LEAST( -100, NULL ))
+NULL
+SELECT CONCAT(MAKETIME('01', '01', LEAST( -100, NULL )));
+CONCAT(MAKETIME('01', '01', LEAST( -100, NULL )))
+NULL
+#
+# MDEV-19774 Assertion `sec.se c() <= 0x7FFFFFFFL' failed in Item_func_from_unixtime::get_date
+#
+SELECT FROM_UNIXTIME(LEAST(3696610869, NULL));
+FROM_UNIXTIME(LEAST(3696610869, NULL))
+NULL
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test
index 3a1bb2bcb58..c7122016b46 100644
--- a/mysql-test/main/func_time.test
+++ b/mysql-test/main/func_time.test
@@ -568,12 +568,15 @@ SET NAMES DEFAULT;
# Bug #31160: MAKETIME() crashes server when returning NULL in ORDER BY using
# filesort
#
+SET TIMESTAMP=UNIX_TIMESTAMP('2001-01-01 11:22:33');
CREATE TABLE t1 (
a TIMESTAMP
);
INSERT INTO t1 VALUES (now()), (now());
SELECT 1 FROM t1 ORDER BY MAKETIME(1, 1, a);
DROP TABLE t1;
+SET TIMESTAMP=DEFAULT;
+
#
# Bug #19844 time_format in Union truncates values
#
@@ -2286,3 +2289,903 @@ SELECT
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-14032 SEC_TO_TIME executes side effect two times
+--echo #
+
+SET @a=10000000;
+SELECT SEC_TO_TIME(@a:=@a+1);
+SELECT @a;
+
+CREATE TABLE t1 (a TEXT);
+DELIMITER $$;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+ INSERT INTO t1 VALUES ('f1 was called');
+ RETURN 10000000;
+END;
+$$
+DELIMITER ;$$
+SELECT SEC_TO_TIME(f1());
+SELECT * FROM t1;
+DROP TABLE t1;
+DROP FUNCTION f1;
+
+--echo #
+--echo # MDEV-17351 MICROSECOND(XXX(int_number_out_of_range)) erroneously returns 999999
+--echo #
+
+--echo # Reject anything that's parsed as DATETIME or DATE
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2001-01-01 10:20:30'),
+('01-01-01 10:20:30'),
+('2001-01-01 '),
+('20010101102030'),
+('010101102030');
+SELECT ADDTIME(DATE'2001-01-01',a), a FROM t1;
+DROP TABLE t1;
+
+
+--vertical_results
+
+--echo # GREATEST(decimal, time)
+
+SELECT
+ GREATEST(8395959, TIME'00:00:00') AS c0,
+ GREATEST(8395959.0, TIME'00:00:00') AS c1,
+ GREATEST(8395959.00, TIME'00:00:00') AS c2,
+ GREATEST(8395959.000, TIME'00:00:00') AS c3,
+ GREATEST(8395959.0000, TIME'00:00:00') AS c4,
+ GREATEST(8395959.00000, TIME'00:00:00') AS c5,
+ GREATEST(8395959.000000, TIME'00:00:00') AS c6,
+ GREATEST(8395959.0000000, TIME'00:00:00') AS c7;
+
+SELECT
+ MICROSECOND(GREATEST(8395959, TIME'00:00:00')) AS c0,
+ MICROSECOND(GREATEST(8395959.0, TIME'00:00:00')) AS c1,
+ MICROSECOND(GREATEST(8395959.00, TIME'00:00:00')) AS c2,
+ MICROSECOND(GREATEST(8395959.000, TIME'00:00:00')) AS c3,
+ MICROSECOND(GREATEST(8395959.0000, TIME'00:00:00')) AS c4,
+ MICROSECOND(GREATEST(8395959.00000, TIME'00:00:00')) AS c5,
+ MICROSECOND(GREATEST(8395959.000000, TIME'00:00:00')) AS c6,
+ MICROSECOND(GREATEST(8395959.0000000, TIME'00:00:00')) AS c7;
+
+SELECT
+ CAST(GREATEST(8395959, TIME'00:00:00') AS SIGNED) AS ci,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,0)) AS c0,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,1)) AS c1,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,2)) AS c2,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,3)) AS c3,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,4)) AS c4,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,5)) AS c5,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,6)) AS c6,
+ CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,7)) AS c7;
+
+SELECT
+ GREATEST(8395959, TIME'00:00:00') AS ci,
+ GREATEST(8395959, TIME'00:00:00')+0 AS c0,
+ GREATEST(8395959, TIME'00:00:00')+0.0 AS c1,
+ GREATEST(8395959, TIME'00:00:00')+0.00 AS c2,
+ GREATEST(8395959, TIME'00:00:00')+0.000 AS c3,
+ GREATEST(8395959, TIME'00:00:00')+0.0000 AS c4,
+ GREATEST(8395959, TIME'00:00:00')+0.00000 AS c5,
+ GREATEST(8395959, TIME'00:00:00')+0.000000 AS c6,
+ GREATEST(8395959, TIME'00:00:00')+0.0000000 AS c7;
+
+
+
+--echo # GREATEST(string, time)
+
+SELECT
+ GREATEST('839:59:59', TIME'00:00:00') AS ci,
+ GREATEST('839:59:59.0', TIME'00:00:00') AS c1,
+ GREATEST('839:59:59.00', TIME'00:00:00') AS c2,
+ GREATEST('839:59:59.000', TIME'00:00:00') AS c3,
+ GREATEST('839:59:59.0000', TIME'00:00:00') AS c4,
+ GREATEST('839:59:59.00000', TIME'00:00:00') AS c5,
+ GREATEST('839:59:59.000000', TIME'00:00:00') AS c6,
+ GREATEST('839:59:59.0000000', TIME'00:00:00') AS c7;
+
+SELECT
+ MICROSECOND(GREATEST('839:59:59', TIME'00:00:00')) AS ci,
+ MICROSECOND(GREATEST('839:59:59.0', TIME'00:00:00')) AS c1,
+ MICROSECOND(GREATEST('839:59:59.00', TIME'00:00:00')) AS c2,
+ MICROSECOND(GREATEST('839:59:59.000', TIME'00:00:00')) AS c3,
+ MICROSECOND(GREATEST('839:59:59.0000', TIME'00:00:00')) AS c4,
+ MICROSECOND(GREATEST('839:59:59.00000', TIME'00:00:00')) AS c5,
+ MICROSECOND(GREATEST('839:59:59.000000', TIME'00:00:00')) AS c6,
+ MICROSECOND(GREATEST('839:59:59.0000000', TIME'00:00:00')) AS c7;
+
+SELECT
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS SIGNED) AS ci,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,0)) AS c0,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,1)) AS c1,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,2)) AS c2,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,3)) AS c3,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,4)) AS c4,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,5)) AS c5,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,6)) AS c6,
+ CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,7)) AS c7;
+
+SELECT
+ GREATEST('839:59:59', TIME'00:00:00') AS ci,
+ GREATEST('839:59:59', TIME'00:00:00')+0 AS c0,
+ GREATEST('839:59:59', TIME'00:00:00')+0.0 AS c1,
+ GREATEST('839:59:59', TIME'00:00:00')+0.00 AS c2,
+ GREATEST('839:59:59', TIME'00:00:00')+0.000 AS c3,
+ GREATEST('839:59:59', TIME'00:00:00')+0.0000 AS c4,
+ GREATEST('839:59:59', TIME'00:00:00')+0.00000 AS c5,
+ GREATEST('839:59:59', TIME'00:00:00')+0.000000 AS c6,
+ GREATEST('839:59:59', TIME'00:00:00')+0.0000000 AS c7;
+
+
+--echo # ADDTIME(datetime, decimal)
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0) AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00) AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000) AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000) AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000) AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000) AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000) AS c7;
+
+SELECT
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)) AS c0,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0)) AS c1,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00)) AS c2,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000)) AS c3,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000)) AS c4,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000)) AS c5,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000)) AS c6,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000)) AS c7;
+
+SELECT
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS SIGNED) AS ci,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,0)) AS c0,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,1)) AS c1,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,2)) AS c2,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,3)) AS c3,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,4)) AS c4,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,5)) AS c5,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,6)) AS c6,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,7)) AS c7;
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000000 AS c7;
+
+--echo # ADDTIME(datetime, string)
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0') AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00') AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000') AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000') AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000') AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000') AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000') AS c7;
+
+SELECT
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')) AS c0,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0')) AS c1,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00')) AS c2,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000')) AS c3,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000')) AS c4,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000')) AS c5,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000')) AS c6,
+ MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000')) AS c7;
+
+SELECT
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS SIGNED) AS ci,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6,
+ CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7;
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000000 AS c7;
+
+--echo # ADDTIME(time, decimal)
+
+SELECT
+ ADDTIME(TIME'00:00:00', 8395959) AS c0,
+ ADDTIME(TIME'00:00:00', 8395959.0) AS c1,
+ ADDTIME(TIME'00:00:00', 8395959.00) AS c2,
+ ADDTIME(TIME'00:00:00', 8395959.000) AS c3,
+ ADDTIME(TIME'00:00:00', 8395959.0000) AS c4,
+ ADDTIME(TIME'00:00:00', 8395959.00000) AS c5,
+ ADDTIME(TIME'00:00:00', 8395959.000000) AS c6,
+ ADDTIME(TIME'00:00:00', 8395959.0000000) AS c7;
+
+SELECT
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959)) AS c0,
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0)) AS c1,
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00)) AS c2,
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000)) AS c3,
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000)) AS c4,
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00000)) AS c5,
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000000)) AS c6,
+ MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000000)) AS c7;
+
+SELECT
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS SIGNED) AS ci,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,0)) AS c0,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,1)) AS c1,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,2)) AS c2,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,3)) AS c3,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,4)) AS c4,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,5)) AS c5,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,6)) AS c6,
+ CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,7)) AS c7;
+
+SELECT
+ ADDTIME(TIME'00:00:00', 8395959) AS ci,
+ ADDTIME(TIME'00:00:00', 8395959)+0 AS c0,
+ ADDTIME(TIME'00:00:00', 8395959)+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', 8395959)+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', 8395959)+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', 8395959)+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', 8395959)+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', 8395959)+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', 8395959)+0.0000000 AS c7;
+
+--echo # ADDTIME(time,string)
+
+SELECT
+ ADDTIME(TIME'00:00:00', '839:59:59') AS c0,
+ ADDTIME(TIME'00:00:00', '839:59:59.0') AS c1,
+ ADDTIME(TIME'00:00:00', '839:59:59.00') AS c2,
+ ADDTIME(TIME'00:00:00', '839:59:59.000') AS c3,
+ ADDTIME(TIME'00:00:00', '839:59:59.0000') AS c4,
+ ADDTIME(TIME'00:00:00', '839:59:59.00000') AS c5,
+ ADDTIME(TIME'00:00:00', '839:59:59.000000') AS c6,
+ ADDTIME(TIME'00:00:00', '839:59:59.0000000') AS c7;
+
+SELECT
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59')) AS c0,
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0')) AS c1,
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00')) AS c2,
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000')) AS c3,
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000')) AS c4,
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00000')) AS c5,
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000000')) AS c6,
+ MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000000')) AS c7;
+
+SELECT
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS SIGNED) AS ci,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6,
+ CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7;
+
+SELECT
+ ADDTIME(TIME'00:00:00', '839:59:59') AS ci,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0 AS c0,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', '839:59:59')+0.0000000 AS c7;
+
+--echo # ADDTIME(int,int)
+SELECT
+ ADDTIME(0, 8395959) AS c,
+ MICROSECOND(ADDTIME(0, 8395959)) AS cm,
+ CAST(ADDTIME(0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+ CAST(ADDTIME(0, 8395959) AS DECIMAL(30,0)) AS cd300;
+
+SELECT
+ ADDTIME(20010101000000, 8395959) AS c,
+ MICROSECOND(ADDTIME(20010101000000, 8395959)) AS cm,
+ CAST(ADDTIME(20010101000000, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+ CAST(ADDTIME(20010101000000, 8395959) AS DECIMAL(30,0)) AS cd300;
+
+--echo # ADDTIME(decimal,int)
+--echo # 8385960 in cd300 is correct: addtime returns '838:59:59.9'
+--echo # which is further *rounded* to a decimals(30,0)
+SELECT
+ ADDTIME(0.0, 8395959) AS c,
+ MICROSECOND(ADDTIME(0.0, 8395959)) AS cm,
+ CAST(ADDTIME(0.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS cd300;
+
+SELECT
+ ADDTIME(20010101000000.0, 8395959) AS c,
+ MICROSECOND(ADDTIME(20010101000000.0, 8395959)) AS cm,
+ CAST(ADDTIME(20010101000000.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384,
+ CAST(ADDTIME(20010101000000.0, 8395959) AS DECIMAL(30,0)) AS cd300;
+
+
+--echo # ADDTIME(decimal,decimal)
+
+SELECT
+ ADDTIME(0.0, 8395959.0) AS c1,
+ ADDTIME(0.0, 8395959.00) AS c2,
+ ADDTIME(0.0, 8395959.000) AS c3,
+ ADDTIME(0.0, 8395959.0000) AS c4,
+ ADDTIME(0.0, 8395959.00000) AS c5,
+ ADDTIME(0.0, 8395959.000000) AS c6,
+ ADDTIME(0.0, 8395959.0000000) AS c7;
+
+SELECT
+ MICROSECOND(ADDTIME(0.0, 8395959.0)) AS c1,
+ MICROSECOND(ADDTIME(0.0, 8395959.00)) AS c2,
+ MICROSECOND(ADDTIME(0.0, 8395959.000)) AS c3,
+ MICROSECOND(ADDTIME(0.0, 8395959.0000)) AS c4,
+ MICROSECOND(ADDTIME(0.0, 8395959.00000)) AS c5,
+ MICROSECOND(ADDTIME(0.0, 8395959.000000)) AS c6,
+ MICROSECOND(ADDTIME(0.0, 8395959.0000000)) AS c7;
+
+--echo # 8385960 in c1 is correct: addtime returns '838:59:59.9'
+--echo # which is further *rounded* to a decimals(30,0)
+SELECT
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS c0,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,1)) AS c1,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,2)) AS c2,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,3)) AS c3,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,4)) AS c4,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,5)) AS c5,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,6)) AS c6,
+ CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,7)) AS c7;
+
+SELECT
+ ADDTIME(0.0, 8395959)+0 AS c0,
+ ADDTIME(0.0, 8395959)+0.0 AS c1,
+ ADDTIME(0.0, 8395959)+0.00 AS c2,
+ ADDTIME(0.0, 8395959)+0.000 AS c3,
+ ADDTIME(0.0, 8395959)+0.0000 AS c4,
+ ADDTIME(0.0, 8395959)+0.00000 AS c5,
+ ADDTIME(0.0, 8395959)+0.000000 AS c6,
+ ADDTIME(0.0, 8395959)+0.0000000 AS c7;
+
+
+--echo # TIMESTAMP(string,decimal)
+
+SELECT
+ TIMESTAMP('2001-01-01', 8395959) AS ci,
+ TIMESTAMP('2001-01-01', 8395959.0) AS c1,
+ TIMESTAMP('2001-01-01', 8395959.00) AS c2,
+ TIMESTAMP('2001-01-01', 8395959.000) AS c3,
+ TIMESTAMP('2001-01-01', 8395959.0000) AS c4,
+ TIMESTAMP('2001-01-01', 8395959.00000) AS c5,
+ TIMESTAMP('2001-01-01', 8395959.000000) AS c6,
+ TIMESTAMP('2001-01-01', 8395959.0000000) AS c7;
+
+SELECT
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959)) AS ci,
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0)) AS c1,
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00)) AS c2,
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000)) AS c3,
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000)) AS c4,
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00000)) AS c5,
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000000)) AS c6,
+ MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000000)) AS c7;
+
+SELECT
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS SIGNED) AS ci,
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,0)) AS c0,
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,1)) AS c1,
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,2)) AS c2,
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,3)) AS c3,
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,4)) AS c4,
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,5)) AS c5,
+ CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,6)) AS c6;
+
+SELECT
+ TIMESTAMP('2001-01-01', 8395959) AS ci,
+ TIMESTAMP('2001-01-01', 8395959)+0 AS c0,
+ TIMESTAMP('2001-01-01', 8395959)+0.0 AS c1,
+ TIMESTAMP('2001-01-01', 8395959)+0.00 AS c2,
+ TIMESTAMP('2001-01-01', 8395959)+0.000 AS c3,
+ TIMESTAMP('2001-01-01', 8395959)+0.0000 AS c4,
+ TIMESTAMP('2001-01-01', 8395959)+0.00000 AS c5,
+ TIMESTAMP('2001-01-01', 8395959)+0.000000 AS c6,
+ TIMESTAMP('2001-01-01', 8395959)+0.0000000 AS c7;
+
+--echo # TIMESTAMP(string,string)
+
+SELECT
+ TIMESTAMP('2001-01-01', '839:59:59') AS ci,
+ TIMESTAMP('2001-01-01', '839:59:59.0') AS c1,
+ TIMESTAMP('2001-01-01', '839:59:59.00') AS c2,
+ TIMESTAMP('2001-01-01', '839:59:59.000') AS c3,
+ TIMESTAMP('2001-01-01', '839:59:59.0000') AS c4,
+ TIMESTAMP('2001-01-01', '839:59:59.00000') AS c5,
+ TIMESTAMP('2001-01-01', '839:59:59.000000') AS c6,
+ TIMESTAMP('2001-01-01', '839:59:59.0000000') AS c7;
+
+SELECT
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59')) AS ci,
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0')) AS c1,
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00')) AS c2,
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000')) AS c3,
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000')) AS c4,
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00000')) AS c5,
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000000')) AS c6,
+ MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000000')) AS c7;
+
+SELECT
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS SIGNED) AS ci,
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,0)) AS c0,
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,1)) AS c1,
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,2)) AS c2,
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,3)) AS c3,
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,4)) AS c4,
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,5)) AS c5,
+ CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,6)) AS c6;
+
+SELECT
+ TIMESTAMP('2001-01-01', '839:59:59') AS ci,
+ TIMESTAMP('2001-01-01', '839:59:59')+0 AS c0,
+ TIMESTAMP('2001-01-01', '839:59:59')+0.0 AS c1,
+ TIMESTAMP('2001-01-01', '839:59:59')+0.00 AS c2,
+ TIMESTAMP('2001-01-01', '839:59:59')+0.000 AS c3,
+ TIMESTAMP('2001-01-01', '839:59:59')+0.0000 AS c4,
+ TIMESTAMP('2001-01-01', '839:59:59')+0.00000 AS c5,
+ TIMESTAMP('2001-01-01', '839:59:59')+0.000000 AS c6,
+ TIMESTAMP('2001-01-01', '839:59:59')+0.0000000 AS c7;
+
+--horizontal_results
+
+--echo # Corner cases for TIMESTAMP(timestamp,xxx)
+
+--echo # HOUR is outside of supported INTERVAL DAYS TO SECONDS range
+--echo # Expect NULL with INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('4294967296:00:00', '178956970 16:00:00');
+INSERT INTO t1 VALUES ('4294967295:59:59', '178956970 15:59:59');
+INSERT INTO t1 VALUES ('4294967294:59:59', '178956970 14:59:59');
+INSERT INTO t1 VALUES ('87649416:00:00', '3652059 00:00:00');
+SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('-4294967296:00:00', '-178956970 16:00:00');
+INSERT INTO t1 VALUES ('-4294967295:59:59', '-178956970 15:59:59');
+INSERT INTO t1 VALUES ('-4294967294:59:59', '-178956970 14:59:59');
+INSERT INTO t1 VALUES ('-87649416:00:00', '-3652059 00:00:00');
+SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1;
+DROP TABLE t1;
+
+--echo # HOUR is OK
+--echo # Expect max or near-max DATETIME value + no INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('87649415:59:59.999999', '3652058 23:59:59.999999');
+INSERT INTO t1 VALUES ('87649415:59:59', '3652058 23:59:59');
+SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1;
+DROP TABLE t1;
+
+--echo # HOUR is OK
+--echo # Expect near '0001-01-01 00:00:00' DATETIME value + no INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('-87649415:59:59.999999', '-3652058 23:59:59.999999');
+INSERT INTO t1 VALUES ('-87649415:59:59', '-3652058 23:59:59');
+SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1;
+DROP TABLE t1;
+
+--echo # HOUR is OK
+--echo # Expect NULL on datetime arithmetic overflow + no INTERVAL warnings
+CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64));
+INSERT INTO t1 VALUES ('-00:00:00.000001', '-0 00:00:00.000001');
+SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1;
+DROP TABLE t1;
+
+
+--echo # Corner cases for ADDTIME(timestamp,xxx)
+--vertical_results
+
+--echo # HOUR is outside of UINT_MAX32 range
+--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959) AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59') AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000000 AS c7;
+
+## TODO: add '0001-01-01 00:00:00'
+
+--echo # HOUR UINT_MAX32
+--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959) AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59') AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000000 AS c7;
+
+--echo # HOUR is max_useful_hour()+1
+--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959) AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59') AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000000 AS c7;
+
+--echo # HOUR is max_useful_hour()
+--echo # Expect NULL (calc_time_diff overflows ) + no INTERVAL warnings
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959) AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59') AS ci,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0 AS c0,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7;
+
+--echo # HOUR is max_useful_hour()
+--echo # Expect non-NULL + no warnings
+SELECT
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959) AS ci,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0 AS c0,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0 AS c1,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00 AS c2,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000 AS c3,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59') AS ci,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0 AS c0,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6,
+ ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7;
+--horizontal_results
+
+
+--echo # Corner cases for ADDTIME(time,xxx)
+--vertical_results
+
+--echo # HOUR outside of UINT32 range
+--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ ADDTIME(TIME'00:00:00', 42949672965959) AS ci,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0 AS c0,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', 42949672965959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIME'00:00:00', '4294967296:59:59') AS ci,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0 AS c0,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000000 AS c7;
+
+--echo # HOUR is UINT_MAX32 (outside of INTERVAL DAY TO SECOND range)
+--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+SELECT
+ ADDTIME(TIME'00:00:00', 42949672955959) AS ci,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0 AS c0,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', 42949672955959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIME'00:00:00', '4294967295:59:59') AS ci,
+ ADDTIME(TIME'00:00:00', '4294967295:59:59')+0 AS c0,
+ ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', '4294967295;00:00')+0.0000000 AS c7;
+
+--echo # HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range)
+--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+
+SELECT
+ ADDTIME(TIME'00:00:00', 876494165959) AS ci,
+ ADDTIME(TIME'00:00:00', 876494165959)+0 AS c0,
+ ADDTIME(TIME'00:00:00', 876494165959)+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', 876494165959)+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', 876494165959)+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', 876494165959)+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', 876494165959)+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', 876494165959)+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', 876494165959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIME'00:00:00', '87649416:59:59') AS ci,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0 AS c0,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000000 AS c7;
+
+--echo # HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range)
+--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value"
+
+SELECT
+ ADDTIME(TIME'-838:59:59', 876494165959) AS ci,
+ ADDTIME(TIME'-838:59:59.9', 876494165959) AS c1,
+ ADDTIME(TIME'-838:59:59.99', 876494165959) AS c2,
+ ADDTIME(TIME'-838:59:59.999', 876494165959) AS c3,
+ ADDTIME(TIME'-838:59:59.9999', 876494165959) AS c4,
+ ADDTIME(TIME'-838:59:59.99999', 876494165959) AS c5,
+ ADDTIME(TIME'-838:59:59.999999', 876494165959) AS c6;
+
+SELECT
+ ADDTIME(TIME'-838:59:59', '87649416:59:59') AS ci,
+ ADDTIME(TIME'-838:59:59.9', '87649416:59:59') AS c1,
+ ADDTIME(TIME'-838:59:59.99', '87649416:59:59') AS c2,
+ ADDTIME(TIME'-838:59:59.999', '87649416:59:59') AS c3,
+ ADDTIME(TIME'-838:59:59.9999', '87649416:59:59') AS c4,
+ ADDTIME(TIME'-838:59:59.99999', '87649416:59:59') AS c5,
+ ADDTIME(TIME'-838:59:59.999999', '87649416:59:59') AS c6;
+
+# This does not give a warning about nanosecond truncation in --ps runs
+# so disable warnings
+--disable_warnings
+SELECT
+ ADDTIME(TIME'-838:59:59.9999999', '87649416:59:59') AS c7;
+--enable_warnings
+
+--echo # HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range)
+--echo # Expect max TIME(0) + zero fraction + TIME warnings + no INTEVAL warnings
+SELECT
+ ADDTIME(TIME'00:00:00', 876494155959) AS ci,
+ ADDTIME(TIME'00:00:00', 876494155959)+0 AS c0,
+ ADDTIME(TIME'00:00:00', 876494155959)+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', 876494155959)+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', 876494155959)+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', 876494155959)+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', 876494155959)+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', 876494155959)+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', 876494155959)+0.0000000 AS c7;
+
+SELECT
+ ADDTIME(TIME'00:00:00', '87649415:59:59') AS ci,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0 AS c0,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0 AS c1,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00 AS c2,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000 AS c3,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000 AS c4,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00000 AS c5,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000000 AS c6,
+ ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000000 AS c7;
+
+
+--echo # HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range)
+--echo # Expect max TIME(N) + TIME warnings + no INTERVAL warnings
+
+SELECT
+ ADDTIME(TIME'-838:59:59', 876494155959) AS ci,
+ ADDTIME(TIME'-838:59:59.9', 876494155959) AS c1,
+ ADDTIME(TIME'-838:59:59.99', 876494155959) AS c2,
+ ADDTIME(TIME'-838:59:59.999', 876494155959) AS c3,
+ ADDTIME(TIME'-838:59:59.9999', 876494155959) AS c4,
+ ADDTIME(TIME'-838:59:59.99999', 876494155959) AS c5,
+ ADDTIME(TIME'-838:59:59.999999', 876494155959) AS c6;
+
+SELECT
+ ADDTIME(TIME'-838:59:59', '87649415:59:59') AS ci,
+ ADDTIME(TIME'-838:59:59.9', '87649415:59:59') AS c1,
+ ADDTIME(TIME'-838:59:59.99', '87649415:59:59') AS c2,
+ ADDTIME(TIME'-838:59:59.999', '87649415:59:59') AS c3,
+ ADDTIME(TIME'-838:59:59.9999', '87649415:59:59') AS c4,
+ ADDTIME(TIME'-838:59:59.99999', '87649415:59:59') AS c5,
+ ADDTIME(TIME'-838:59:59.999999', '87649415:59:59') AS c6;
+
+# This does not give a warning about nanosecond truncation in --ps runs
+# so disable warnings
+--disable_warnings
+SELECT
+ ADDTIME(TIME'-838:59:59.9999999', '87649415:59:59') AS c7;
+--enable_warnings
+
+--horizontal_results
+
+
+--echo #
+--echo # MDEV-17400 The result of TIME('42949672965959-01') depends on architecture
+--echo #
+
+SELECT TIME('42949672955959-01'), TIME('42949672965959-01');
+SELECT TIME('18446744073709551615-01'), TIME('18446744073709551616-01');
+
+--echo #
+--echo # MDEV-17434 EXTRACT(DAY FROM negative_time) returns wrong result
+--echo #
+
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES ('-24:10:10.10');
+SELECT
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY_MINUTE FROM a),
+ EXTRACT(DAY_SECOND FROM a),
+ EXTRACT(DAY_MICROSECOND FROM a)
+FROM t1;
+CREATE TABLE t2 AS
+SELECT
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY_MINUTE FROM a),
+ EXTRACT(DAY_SECOND FROM a),
+ EXTRACT(DAY_MICROSECOND FROM a)
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17478 Wrong result for TIME('+100:20:30')
+--echo #
+
+SELECT TIME('+100:20:30');
+
+--echo #
+--echo # MDEV-17477 Wrong result for TIME('-2001-01-01 10:20:30')
+--echo #
+
+SELECT TIME('-2001-01-01 10:20:30');
+SELECT TIME('2001-01-01') AS c1, TIME('2001-01-01 ') AS c2;
+SELECT TIME('0001:01:01 '), TIME('0001:01:01 ');
+SELECT TIME('1 2'), TIME('1 2 ');
+
+SELECT TIME('2001-01-01T'), TIME('2001-01-01T ');
+SELECT TIME('901-01-01T1'), TIME('901-01-01T10');
+SELECT TIME('091-01-01T1'), TIME('091-01-01T10');
+
+SELECT TIME('0001:01:01x'), TIME('0001:01:01xx');
+SELECT TIME('0001:01:01.'), TIME('0001:01:01..');
+SELECT TIME('0001:01:01-'), TIME('0001:01:01--');
+SELECT TIME('0001:01:01-'), TIME('0001:01:01--');
+
+SELECT TIME('-xxx'), TIME('-xxxxxxxxxxxxxxxxxxxx');
+SELECT TIME('- '), TIME('- ');
+SELECT TIME('-'), TIME('-');
+SELECT TIME('1-1-1 1:1:1'), TIME('1-1-1 1:1:1.0');
+SELECT TIME('1-1-1 1:2:3'), TIME('1-1-1 1:2:3.0');
+
+SELECT
+ CAST('20050326112233 garbage' as datetime),
+ CAST('20050326 garbage' as date),
+ CAST('50326 garbage' as time);
+
+SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00');
+
+
+--echo #
+--echo # MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on SELECT with NULLIF and FROM_UNIXTIME on incorrect time
+--echo #
+
+SET time_zone='+00:00';
+SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14');
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # MDEV-18402 Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date
+--echo #
+
+SELECT MAKETIME('01', '01', LEAST( -100, NULL ));
+SELECT CONCAT(MAKETIME('01', '01', LEAST( -100, NULL )));
+
+
+--echo #
+--echo # MDEV-19774 Assertion `sec.se c() <= 0x7FFFFFFFL' failed in Item_func_from_unixtime::get_date
+--echo #
+
+SELECT FROM_UNIXTIME(LEAST(3696610869, NULL));
diff --git a/mysql-test/main/func_time_round.result b/mysql-test/main/func_time_round.result
new file mode 100644
index 00000000000..b335cf393ba
--- /dev/null
+++ b/mysql-test/main/func_time_round.result
@@ -0,0 +1,1374 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+CREATE TABLE t1_datetime_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_datetime_in_varchar (a) VALUES
+('2000-12-31 23:59:59'),
+('2000-12-31 23:59:59.9'),
+('2000-12-31 23:59:59.99'),
+('2000-12-31 23:59:59.999'),
+('2000-12-31 23:59:59.9999'),
+('2000-12-31 23:59:59.99999'),
+('2000-12-31 23:59:59.999999'),
+('2000-12-31 23:59:59.9999999');
+CREATE TABLE t1_datetime_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_datetime_in_decimal (a) VALUES
+(20001231235959),
+(20001231235959.9),
+(20001231235959.99),
+(20001231235959.999),
+(20001231235959.9999),
+(20001231235959.99999),
+(20001231235959.999999),
+(20001231235959.9999999);
+CREATE TABLE t1_time_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_time_in_varchar (a) VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.99'),
+('00:00:00.999'),
+('00:00:00.9999'),
+('00:00:00.99999'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+INSERT INTO t1_time_in_varchar (a) VALUES
+('837:59:59.9999999'),
+('838:59:59'),
+('838:59:59.9'),
+('838:59:59.99'),
+('838:59:59.999'),
+('838:59:59.9999'),
+('838:59:59.99999'),
+('838:59:59.999999'),
+('838:59:59.9999999'),
+('839:59:59.9999999'),
+('87649414:59:59.999999'),
+('87649414:59:59.9999999'),
+('87649415:59:59.999999'),
+('87649415:59:59.9999999');
+CREATE TABLE t1_time_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_time_in_decimal (a) VALUES
+(0),
+(0.9),
+(0.99),
+(0.999),
+(0.9999),
+(0.99999),
+(0.999999),
+(0.9999999);
+INSERT INTO t1_time_in_decimal (a) VALUES
+(8375959.9999999),
+(8385959),
+(8385959.9),
+(8385959.99),
+(8385959.999),
+(8385959.9999),
+(8385959.99999),
+(8385959.999999),
+(8385959.9999999),
+(8395959.9999999),
+(876494145959.999999),
+(876494145959.9999999),
+(876494155959.999999),
+(876494155959.9999999);
+#
+# TIME: LEAST/GREATEST
+#
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_varchar;
+GREATEST(TIME'00:00:00', a)
+00:00:00.000000
+00:00:00.900000
+00:00:00.990000
+00:00:00.999000
+00:00:00.999900
+00:00:00.999990
+00:00:00.999999
+00:00:01.000000
+838:00:00.000000
+838:59:59.000000
+838:59:59.900000
+838:59:59.990000
+838:59:59.999000
+838:59:59.999900
+838:59:59.999990
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '838:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '839:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_decimal;
+GREATEST(TIME'00:00:00', a)
+00:00:00.000000
+00:00:00.900000
+00:00:00.990000
+00:00:00.999000
+00:00:00.999900
+00:00:00.999990
+00:00:00.999999
+00:00:01.000000
+838:00:00.000000
+838:59:59.000000
+838:59:59.900000
+838:59:59.990000
+838:59:59.999000
+838:59:59.999900
+838:59:59.999990
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+NULL
+NULL
+NULL
+NULL
+Warnings:
+Warning 1292 Incorrect time value: '8385959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 17
+Warning 1292 Incorrect time value: '8395959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 18
+Warning 1292 Incorrect time value: '876494145959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 19
+Warning 1292 Incorrect time value: '876494145959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 20
+Warning 1292 Incorrect time value: '876494155959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 21
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000004');
+GREATEST(TIME'00:00:00', '00:00:00.0000004')
+00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.0000004'
+SELECT GREATEST(TIME'00:00:00', 0.0000004);
+GREATEST(TIME'00:00:00', 0.0000004)
+00:00:00.000000
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000005');
+GREATEST(TIME'00:00:00', '00:00:00.0000005')
+00:00:00.000001
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.0000005'
+SELECT GREATEST(TIME'00:00:00', 0.0000005);
+GREATEST(TIME'00:00:00', 0.0000005)
+00:00:00.000001
+#
+# Functions with a single TIME input, conversion from DATETIME-in-VARCHAR
+#
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SECOND(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+MINUTE(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+HOUR(a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 2000-12-31 23:59:59
+23 23:59:59.900000 2000-12-31 23:59:59.9
+23 23:59:59.990000 2000-12-31 23:59:59.99
+23 23:59:59.999000 2000-12-31 23:59:59.999
+23 23:59:59.999900 2000-12-31 23:59:59.9999
+23 23:59:59.999990 2000-12-31 23:59:59.99999
+23 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+EXTRACT(SECOND FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+EXTRACT(MINUTE FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+EXTRACT(HOUR FROM a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 2000-12-31 23:59:59
+23 23:59:59.900000 2000-12-31 23:59:59.9
+23 23:59:59.990000 2000-12-31 23:59:59.99
+23 23:59:59.999000 2000-12-31 23:59:59.999
+23 23:59:59.999900 2000-12-31 23:59:59.9999
+23 23:59:59.999990 2000-12-31 23:59:59.99999
+23 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+86399.000000 23:59:59.000000 2000-12-31 23:59:59
+86399.900000 23:59:59.900000 2000-12-31 23:59:59.9
+86399.990000 23:59:59.990000 2000-12-31 23:59:59.99
+86399.999000 23:59:59.999000 2000-12-31 23:59:59.999
+86399.999900 23:59:59.999900 2000-12-31 23:59:59.9999
+86399.999990 23:59:59.999990 2000-12-31 23:59:59.99999
+86399.999999 23:59:59.999999 2000-12-31 23:59:59.999999
+0.000000 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+#
+# Functions with a single TIME input, conversion from DATETIME-in-DECIMAL
+#
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SECOND(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+MINUTE(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+HOUR(a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 20001231235959.0000000000
+23 23:59:59.900000 20001231235959.9000000000
+23 23:59:59.990000 20001231235959.9900000000
+23 23:59:59.999000 20001231235959.9990000000
+23 23:59:59.999900 20001231235959.9999000000
+23 23:59:59.999990 20001231235959.9999900000
+23 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+EXTRACT(SECOND FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+EXTRACT(MINUTE FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+EXTRACT(HOUR FROM a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 20001231235959.0000000000
+23 23:59:59.900000 20001231235959.9000000000
+23 23:59:59.990000 20001231235959.9900000000
+23 23:59:59.999000 20001231235959.9990000000
+23 23:59:59.999900 20001231235959.9999000000
+23 23:59:59.999990 20001231235959.9999900000
+23 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+86399.000000 23:59:59.000000 20001231235959.0000000000
+86399.900000 23:59:59.900000 20001231235959.9000000000
+86399.990000 23:59:59.990000 20001231235959.9900000000
+86399.999000 23:59:59.999000 20001231235959.9990000000
+86399.999900 23:59:59.999900 20001231235959.9999000000
+86399.999990 23:59:59.999990 20001231235959.9999900000
+86399.999999 23:59:59.999999 20001231235959.9999990000
+0.000000 00:00:00.000000 20001231235959.9999999000
+#
+# Functions with a single TIME interval input, conversion from TIME-interval-in-VARCHAR
+#
+SELECT
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+CAST(a AS INTERVAL DAY_SECOND(6)),
+a
+FROM t1_time_in_varchar ORDER BY id;
+EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a) CAST(a AS INTERVAL DAY_SECOND(6)) a
+0 0 0 0 0 00:00:00.000000 00:00:00
+0 0 0 0 900000 00:00:00.900000 00:00:00.9
+0 0 0 0 990000 00:00:00.990000 00:00:00.99
+0 0 0 0 999000 00:00:00.999000 00:00:00.999
+0 0 0 0 999900 00:00:00.999900 00:00:00.9999
+0 0 0 0 999990 00:00:00.999990 00:00:00.99999
+0 0 0 0 999999 00:00:00.999999 00:00:00.999999
+0 0 0 1 0 00:00:01.000000 00:00:00.9999999
+34 22 0 0 0 34 22:00:00.000000 837:59:59.9999999
+34 22 59 59 0 34 22:59:59.000000 838:59:59
+34 22 59 59 900000 34 22:59:59.900000 838:59:59.9
+34 22 59 59 990000 34 22:59:59.990000 838:59:59.99
+34 22 59 59 999000 34 22:59:59.999000 838:59:59.999
+34 22 59 59 999900 34 22:59:59.999900 838:59:59.9999
+34 22 59 59 999990 34 22:59:59.999990 838:59:59.99999
+34 22 59 59 999999 34 22:59:59.999999 838:59:59.999999
+34 23 0 0 0 34 23:00:00.000000 838:59:59.9999999
+35 0 0 0 0 35 00:00:00.000000 839:59:59.9999999
+3652058 22 59 59 999999 3652058 22:59:59.999999 87649414:59:59.999999
+3652058 23 0 0 0 3652058 23:00:00.000000 87649414:59:59.9999999
+3652058 23 59 59 999999 3652058 23:59:59.999999 87649415:59:59.999999
+3652058 23 59 59 999999 3652058 23:59:59.999999 87649415:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649415:59:59.9999999'
+SELECT
+TIME_TO_SEC(a),
+CAST(a AS TIME(6)),
+a
+FROM t1_time_in_varchar ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+0.000000 00:00:00.000000 00:00:00
+0.900000 00:00:00.900000 00:00:00.9
+0.990000 00:00:00.990000 00:00:00.99
+0.999000 00:00:00.999000 00:00:00.999
+0.999900 00:00:00.999900 00:00:00.9999
+0.999990 00:00:00.999990 00:00:00.99999
+0.999999 00:00:00.999999 00:00:00.999999
+1.000000 00:00:01.000000 00:00:00.9999999
+3016800.000000 838:00:00.000000 837:59:59.9999999
+3020399.000000 838:59:59.000000 838:59:59
+3020399.900000 838:59:59.900000 838:59:59.9
+3020399.990000 838:59:59.990000 838:59:59.99
+3020399.999000 838:59:59.999000 838:59:59.999
+3020399.999900 838:59:59.999900 838:59:59.9999
+3020399.999990 838:59:59.999990 838:59:59.99999
+3020399.999999 838:59:59.999999 838:59:59.999999
+3020399.999999 838:59:59.999999 838:59:59.9999999
+3020399.999999 838:59:59.999999 839:59:59.9999999
+3020399.999999 838:59:59.999999 87649414:59:59.999999
+3020399.999999 838:59:59.999999 87649414:59:59.9999999
+3020399.999999 838:59:59.999999 87649415:59:59.999999
+3020399.999999 838:59:59.999999 87649415:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '838:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '838:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '839:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '839:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+#
+# Functions with a single TIME interval input, conversion from TIME-interval-in-DECIMAL
+#
+SELECT
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+CAST(a AS INTERVAL DAY_SECOND(6)),
+a
+FROM t1_time_in_decimal ORDER BY id;
+EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a) CAST(a AS INTERVAL DAY_SECOND(6)) a
+0 0 0 0 0 00:00:00.000000 0.0000000000
+0 0 0 0 900000 00:00:00.900000 0.9000000000
+0 0 0 0 990000 00:00:00.990000 0.9900000000
+0 0 0 0 999000 00:00:00.999000 0.9990000000
+0 0 0 0 999900 00:00:00.999900 0.9999000000
+0 0 0 0 999990 00:00:00.999990 0.9999900000
+0 0 0 0 999999 00:00:00.999999 0.9999990000
+0 0 0 1 0 00:00:01.000000 0.9999999000
+34 22 0 0 0 34 22:00:00.000000 8375959.9999999000
+34 22 59 59 0 34 22:59:59.000000 8385959.0000000000
+34 22 59 59 900000 34 22:59:59.900000 8385959.9000000000
+34 22 59 59 990000 34 22:59:59.990000 8385959.9900000000
+34 22 59 59 999000 34 22:59:59.999000 8385959.9990000000
+34 22 59 59 999900 34 22:59:59.999900 8385959.9999000000
+34 22 59 59 999990 34 22:59:59.999990 8385959.9999900000
+34 22 59 59 999999 34 22:59:59.999999 8385959.9999990000
+34 23 0 0 0 34 23:00:00.000000 8385959.9999999000
+35 0 0 0 0 35 00:00:00.000000 8395959.9999999000
+3652058 22 59 59 999999 3652058 22:59:59.999999 876494145959.9999990000
+3652058 23 0 0 0 3652058 23:00:00.000000 876494145959.9999999000
+3652058 23 59 59 999999 3652058 23:59:59.999999 876494155959.9999990000
+3652058 23 59 59 999999 3652058 23:59:59.999999 876494155959.9999999000
+Warnings:
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.0000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9900000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9990000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999900000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8375959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.0000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9900000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9990000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999900000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494145959.9999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494145959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494155959.9999990000'
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '876494155959.9999999000'
+SELECT
+TIME_TO_SEC(a),
+CAST(a AS TIME(6)),
+a
+FROM t1_time_in_decimal ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+0.000000 00:00:00.000000 0.0000000000
+0.900000 00:00:00.900000 0.9000000000
+0.990000 00:00:00.990000 0.9900000000
+0.999000 00:00:00.999000 0.9990000000
+0.999900 00:00:00.999900 0.9999000000
+0.999990 00:00:00.999990 0.9999900000
+0.999999 00:00:00.999999 0.9999990000
+1.000000 00:00:01.000000 0.9999999000
+3016800.000000 838:00:00.000000 8375959.9999999000
+3020399.000000 838:59:59.000000 8385959.0000000000
+3020399.900000 838:59:59.900000 8385959.9000000000
+3020399.990000 838:59:59.990000 8385959.9900000000
+3020399.999000 838:59:59.999000 8385959.9990000000
+3020399.999900 838:59:59.999900 8385959.9999000000
+3020399.999990 838:59:59.999990 8385959.9999900000
+3020399.999999 838:59:59.999999 8385959.9999990000
+3020399.999999 838:59:59.999999 8385959.9999999000
+3020399.999999 838:59:59.999999 8395959.9999999000
+NULL NULL 876494145959.9999990000
+NULL NULL 876494145959.9999999000
+NULL NULL 876494155959.9999990000
+NULL NULL 876494155959.9999999000
+Warnings:
+Warning 1292 Incorrect time value: '8385959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 17
+Warning 1292 Incorrect time value: '8385959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 17
+Warning 1292 Incorrect time value: '8395959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 18
+Warning 1292 Incorrect time value: '8395959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 18
+Warning 1292 Incorrect time value: '876494145959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 19
+Warning 1292 Incorrect time value: '876494145959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 19
+Warning 1292 Incorrect time value: '876494145959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 20
+Warning 1292 Incorrect time value: '876494145959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 20
+Warning 1292 Incorrect time value: '876494155959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 21
+Warning 1292 Incorrect time value: '876494155959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 21
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+#
+# Functions with a single DATE input, conversion from DATETIME-in-VARCHAR
+#
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+QUARTER(a) CAST(a AS DATE) a
+4 2000-12-31 2000-12-31 23:59:59
+4 2000-12-31 2000-12-31 23:59:59.9
+4 2000-12-31 2000-12-31 23:59:59.99
+4 2000-12-31 2000-12-31 23:59:59.999
+4 2000-12-31 2000-12-31 23:59:59.9999
+4 2000-12-31 2000-12-31 23:59:59.99999
+4 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+DAY(a) CAST(a AS DATE) a
+31 2000-12-31 2000-12-31 23:59:59
+31 2000-12-31 2000-12-31 23:59:59.9
+31 2000-12-31 2000-12-31 23:59:59.99
+31 2000-12-31 2000-12-31 23:59:59.999
+31 2000-12-31 2000-12-31 23:59:59.9999
+31 2000-12-31 2000-12-31 23:59:59.99999
+31 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+MONTH(a) CAST(a AS DATE) a
+12 2000-12-31 2000-12-31 23:59:59
+12 2000-12-31 2000-12-31 23:59:59.9
+12 2000-12-31 2000-12-31 23:59:59.99
+12 2000-12-31 2000-12-31 23:59:59.999
+12 2000-12-31 2000-12-31 23:59:59.9999
+12 2000-12-31 2000-12-31 23:59:59.99999
+12 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+YEAR(a) CAST(a AS DATE) a
+2000 2000-12-31 2000-12-31 23:59:59
+2000 2000-12-31 2000-12-31 23:59:59.9
+2000 2000-12-31 2000-12-31 23:59:59.99
+2000 2000-12-31 2000-12-31 23:59:59.999
+2000 2000-12-31 2000-12-31 23:59:59.9999
+2000 2000-12-31 2000-12-31 23:59:59.99999
+2000 2000-12-31 2000-12-31 23:59:59.999999
+2001 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+DAYNAME(a) CAST(a AS DATE) a
+Sunday 2000-12-31 2000-12-31 23:59:59
+Sunday 2000-12-31 2000-12-31 23:59:59.9
+Sunday 2000-12-31 2000-12-31 23:59:59.99
+Sunday 2000-12-31 2000-12-31 23:59:59.999
+Sunday 2000-12-31 2000-12-31 23:59:59.9999
+Sunday 2000-12-31 2000-12-31 23:59:59.99999
+Sunday 2000-12-31 2000-12-31 23:59:59.999999
+Monday 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+MONTHNAME(a) CAST(a AS DATE) a
+December 2000-12-31 2000-12-31 23:59:59
+December 2000-12-31 2000-12-31 23:59:59.9
+December 2000-12-31 2000-12-31 23:59:59.99
+December 2000-12-31 2000-12-31 23:59:59.999
+December 2000-12-31 2000-12-31 23:59:59.9999
+December 2000-12-31 2000-12-31 23:59:59.99999
+December 2000-12-31 2000-12-31 23:59:59.999999
+January 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+LAST_DAY(a) CAST(a AS DATE) a
+2000-12-31 2000-12-31 2000-12-31 23:59:59
+2000-12-31 2000-12-31 2000-12-31 23:59:59.9
+2000-12-31 2000-12-31 2000-12-31 23:59:59.99
+2000-12-31 2000-12-31 2000-12-31 23:59:59.999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.9999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.99999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.999999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+TO_DAYS(a) CAST(a AS DATE) a
+730850 2000-12-31 2000-12-31 23:59:59
+730850 2000-12-31 2000-12-31 23:59:59.9
+730850 2000-12-31 2000-12-31 23:59:59.99
+730850 2000-12-31 2000-12-31 23:59:59.999
+730850 2000-12-31 2000-12-31 23:59:59.9999
+730850 2000-12-31 2000-12-31 23:59:59.99999
+730850 2000-12-31 2000-12-31 23:59:59.999999
+730851 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+DAYOFYEAR(a) CAST(a AS DATE) a
+366 2000-12-31 2000-12-31 23:59:59
+366 2000-12-31 2000-12-31 23:59:59.9
+366 2000-12-31 2000-12-31 23:59:59.99
+366 2000-12-31 2000-12-31 23:59:59.999
+366 2000-12-31 2000-12-31 23:59:59.9999
+366 2000-12-31 2000-12-31 23:59:59.99999
+366 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+CREATE TABLE t1 (a VARCHAR(32));
+INSERT INTO t1 VALUES
+('2002-01-05 23:59:59'),
+('2002-01-05 23:59:59.999999'),
+('2002-01-05 23:59:59.9999999');
+SELECT YEARWEEK(a), a FROM t1;
+YEARWEEK(a) a
+200152 2002-01-05 23:59:59
+200152 2002-01-05 23:59:59.999999
+200201 2002-01-05 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2002-01-05 23:59:59.9999999'
+SELECT WEEK(a), a FROM t1;
+WEEK(a) a
+0 2002-01-05 23:59:59
+0 2002-01-05 23:59:59.999999
+1 2002-01-05 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2002-01-05 23:59:59.9999999'
+SELECT WEEKDAY(a), a FROM t1;
+WEEKDAY(a) a
+5 2002-01-05 23:59:59
+5 2002-01-05 23:59:59.999999
+6 2002-01-05 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2002-01-05 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20020105235959),
+(20020105235959.999999),
+(20020105235959.9999999);
+SELECT YEARWEEK(a), a FROM t1;
+YEARWEEK(a) a
+200152 20020105235959.000000000
+200152 20020105235959.999999000
+200201 20020105235959.999999900
+SELECT WEEK(a), a FROM t1;
+WEEK(a) a
+0 20020105235959.000000000
+0 20020105235959.999999000
+1 20020105235959.999999900
+SELECT WEEKDAY(a), a FROM t1;
+WEEKDAY(a) a
+5 20020105235959.000000000
+5 20020105235959.999999000
+6 20020105235959.999999900
+DROP TABLE t1;
+#
+# Functions with a single DATE input, conversion from DATETIME-in-DECIMAL
+#
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+QUARTER(a) CAST(a AS DATE) a
+4 2000-12-31 20001231235959.0000000000
+4 2000-12-31 20001231235959.9000000000
+4 2000-12-31 20001231235959.9900000000
+4 2000-12-31 20001231235959.9990000000
+4 2000-12-31 20001231235959.9999000000
+4 2000-12-31 20001231235959.9999900000
+4 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAY(a) CAST(a AS DATE) a
+31 2000-12-31 20001231235959.0000000000
+31 2000-12-31 20001231235959.9000000000
+31 2000-12-31 20001231235959.9900000000
+31 2000-12-31 20001231235959.9990000000
+31 2000-12-31 20001231235959.9999000000
+31 2000-12-31 20001231235959.9999900000
+31 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+MONTH(a) CAST(a AS DATE) a
+12 2000-12-31 20001231235959.0000000000
+12 2000-12-31 20001231235959.9000000000
+12 2000-12-31 20001231235959.9900000000
+12 2000-12-31 20001231235959.9990000000
+12 2000-12-31 20001231235959.9999000000
+12 2000-12-31 20001231235959.9999900000
+12 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+YEAR(a) CAST(a AS DATE) a
+2000 2000-12-31 20001231235959.0000000000
+2000 2000-12-31 20001231235959.9000000000
+2000 2000-12-31 20001231235959.9900000000
+2000 2000-12-31 20001231235959.9990000000
+2000 2000-12-31 20001231235959.9999000000
+2000 2000-12-31 20001231235959.9999900000
+2000 2000-12-31 20001231235959.9999990000
+2001 2000-12-31 20001231235959.9999999000
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAYNAME(a) CAST(a AS DATE) a
+Sunday 2000-12-31 20001231235959.0000000000
+Sunday 2000-12-31 20001231235959.9000000000
+Sunday 2000-12-31 20001231235959.9900000000
+Sunday 2000-12-31 20001231235959.9990000000
+Sunday 2000-12-31 20001231235959.9999000000
+Sunday 2000-12-31 20001231235959.9999900000
+Sunday 2000-12-31 20001231235959.9999990000
+Monday 2000-12-31 20001231235959.9999999000
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+MONTHNAME(a) CAST(a AS DATE) a
+December 2000-12-31 20001231235959.0000000000
+December 2000-12-31 20001231235959.9000000000
+December 2000-12-31 20001231235959.9900000000
+December 2000-12-31 20001231235959.9990000000
+December 2000-12-31 20001231235959.9999000000
+December 2000-12-31 20001231235959.9999900000
+December 2000-12-31 20001231235959.9999990000
+January 2000-12-31 20001231235959.9999999000
+SELECT YEARWEEK(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+YEARWEEK(a) CAST(a AS DATE) a
+200053 2000-12-31 20001231235959.0000000000
+200053 2000-12-31 20001231235959.9000000000
+200053 2000-12-31 20001231235959.9900000000
+200053 2000-12-31 20001231235959.9990000000
+200053 2000-12-31 20001231235959.9999000000
+200053 2000-12-31 20001231235959.9999900000
+200053 2000-12-31 20001231235959.9999990000
+200053 2000-12-31 20001231235959.9999999000
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+LAST_DAY(a) CAST(a AS DATE) a
+2000-12-31 2000-12-31 20001231235959.0000000000
+2000-12-31 2000-12-31 20001231235959.9000000000
+2000-12-31 2000-12-31 20001231235959.9900000000
+2000-12-31 2000-12-31 20001231235959.9990000000
+2000-12-31 2000-12-31 20001231235959.9999000000
+2000-12-31 2000-12-31 20001231235959.9999900000
+2000-12-31 2000-12-31 20001231235959.9999990000
+2000-12-31 2000-12-31 20001231235959.9999999000
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+TO_DAYS(a) CAST(a AS DATE) a
+730850 2000-12-31 20001231235959.0000000000
+730850 2000-12-31 20001231235959.9000000000
+730850 2000-12-31 20001231235959.9900000000
+730850 2000-12-31 20001231235959.9990000000
+730850 2000-12-31 20001231235959.9999000000
+730850 2000-12-31 20001231235959.9999900000
+730850 2000-12-31 20001231235959.9999990000
+730851 2000-12-31 20001231235959.9999999000
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAYOFYEAR(a) CAST(a AS DATE) a
+366 2000-12-31 20001231235959.0000000000
+366 2000-12-31 20001231235959.9000000000
+366 2000-12-31 20001231235959.9900000000
+366 2000-12-31 20001231235959.9990000000
+366 2000-12-31 20001231235959.9999000000
+366 2000-12-31 20001231235959.9999900000
+366 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT DAYOFMONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAYOFMONTH(a) CAST(a AS DATE) a
+31 2000-12-31 20001231235959.0000000000
+31 2000-12-31 20001231235959.9000000000
+31 2000-12-31 20001231235959.9900000000
+31 2000-12-31 20001231235959.9990000000
+31 2000-12-31 20001231235959.9999000000
+31 2000-12-31 20001231235959.9999900000
+31 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+#
+# Functions with a single DATETIME input, conversion from DATETIME-in-VARCHAR
+#
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+TO_SECONDS(a) CAST(a AS DATETIME(6)) a
+63145526399 2000-12-31 23:59:59.000000 2000-12-31 23:59:59
+63145526399 2000-12-31 23:59:59.900000 2000-12-31 23:59:59.9
+63145526399 2000-12-31 23:59:59.990000 2000-12-31 23:59:59.99
+63145526399 2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999
+63145526399 2000-12-31 23:59:59.999900 2000-12-31 23:59:59.9999
+63145526399 2000-12-31 23:59:59.999990 2000-12-31 23:59:59.99999
+63145526399 2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+63145526400 2001-01-01 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+UNIX_TIMESTAMP(a) CAST(a AS DATETIME(6)) a
+978307199.000000 2000-12-31 23:59:59.000000 2000-12-31 23:59:59
+978307199.900000 2000-12-31 23:59:59.900000 2000-12-31 23:59:59.9
+978307199.990000 2000-12-31 23:59:59.990000 2000-12-31 23:59:59.99
+978307199.999000 2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999
+978307199.999900 2000-12-31 23:59:59.999900 2000-12-31 23:59:59.9999
+978307199.999990 2000-12-31 23:59:59.999990 2000-12-31 23:59:59.99999
+978307199.999999 2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+978307200.000000 2001-01-01 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SET time_zone=DEFAULT;
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+CONVERT_TZ(a, '+00:00','+00:00') CAST(a AS DATETIME(6)) a
+2000-12-31 23:59:59.000000 2000-12-31 23:59:59.000000 2000-12-31 23:59:59
+2000-12-31 23:59:59.900000 2000-12-31 23:59:59.900000 2000-12-31 23:59:59.9
+2000-12-31 23:59:59.990000 2000-12-31 23:59:59.990000 2000-12-31 23:59:59.99
+2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999
+2000-12-31 23:59:59.999900 2000-12-31 23:59:59.999900 2000-12-31 23:59:59.9999
+2000-12-31 23:59:59.999990 2000-12-31 23:59:59.999990 2000-12-31 23:59:59.99999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+2001-01-01 00:00:00.000000 2001-01-01 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+#
+# Functions with a single DATETIME input, conversion from DATETIME-in-DECIMAL
+#
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+TO_SECONDS(a) CAST(a AS DATETIME(6)) a
+63145526399 2000-12-31 23:59:59.000000 20001231235959.0000000000
+63145526399 2000-12-31 23:59:59.900000 20001231235959.9000000000
+63145526399 2000-12-31 23:59:59.990000 20001231235959.9900000000
+63145526399 2000-12-31 23:59:59.999000 20001231235959.9990000000
+63145526399 2000-12-31 23:59:59.999900 20001231235959.9999000000
+63145526399 2000-12-31 23:59:59.999990 20001231235959.9999900000
+63145526399 2000-12-31 23:59:59.999999 20001231235959.9999990000
+63145526400 2001-01-01 00:00:00.000000 20001231235959.9999999000
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+UNIX_TIMESTAMP(a) CAST(a AS DATETIME(6)) a
+978307199.000000 2000-12-31 23:59:59.000000 20001231235959.0000000000
+978307199.900000 2000-12-31 23:59:59.900000 20001231235959.9000000000
+978307199.990000 2000-12-31 23:59:59.990000 20001231235959.9900000000
+978307199.999000 2000-12-31 23:59:59.999000 20001231235959.9990000000
+978307199.999900 2000-12-31 23:59:59.999900 20001231235959.9999000000
+978307199.999990 2000-12-31 23:59:59.999990 20001231235959.9999900000
+978307199.999999 2000-12-31 23:59:59.999999 20001231235959.9999990000
+978307200.000000 2001-01-01 00:00:00.000000 20001231235959.9999999000
+SET time_zone=DEFAULT;
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+CONVERT_TZ(a, '+00:00','+00:00') CAST(a AS DATETIME(6)) a
+2000-12-31 23:59:59.000000 2000-12-31 23:59:59.000000 20001231235959.0000000000
+2000-12-31 23:59:59.900000 2000-12-31 23:59:59.900000 20001231235959.9000000000
+2000-12-31 23:59:59.990000 2000-12-31 23:59:59.990000 20001231235959.9900000000
+2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999000 20001231235959.9990000000
+2000-12-31 23:59:59.999900 2000-12-31 23:59:59.999900 20001231235959.9999000000
+2000-12-31 23:59:59.999990 2000-12-31 23:59:59.999990 20001231235959.9999900000
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999 20001231235959.9999990000
+2001-01-01 00:00:00.000000 2001-01-01 00:00:00.000000 20001231235959.9999999000
+DROP TABLE t1_datetime_in_varchar;
+DROP TABLE t1_datetime_in_decimal;
+DROP TABLE t1_time_in_varchar;
+DROP TABLE t1_time_in_decimal;
+#
+# Functions that construct DATETIME
+#
+SET time_zone='+00:00';
+CREATE TABLE t1_unix_timestamp (id SERIAL, a DECIMAL(30,10));
+INSERT INTO t1_unix_timestamp (a) VALUES
+(980639999),
+(980639999.9),
+(980639999.999999),
+(980639999.9999999),
+(2147483647),
+(2147483647.9),
+(2147483647.999999),
+(2147483647.9999999);
+SELECT a, FROM_UNIXTIME(a) FROM t1_unix_timestamp ORDER BY id;
+a FROM_UNIXTIME(a)
+980639999.0000000000 2001-01-27 23:59:59.000000
+980639999.9000000000 2001-01-27 23:59:59.900000
+980639999.9999990000 2001-01-27 23:59:59.999999
+980639999.9999999000 2001-01-28 00:00:00.000000
+2147483647.0000000000 2038-01-19 03:14:07.000000
+2147483647.9000000000 2038-01-19 03:14:07.900000
+2147483647.9999990000 2038-01-19 03:14:07.999999
+2147483647.9999999000 NULL
+DROP TABLE t1_unix_timestamp;
+SET time_zone=DEFAULT;
+#
+# Functions that construct TIME
+#
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(59),
+(59.9),
+(59.999999),
+(59.9999999),
+(3020398),
+(3020398.999999),
+(3020398.9999999),
+(3020399),
+(3020399.999999),
+(3020399.9999999),
+(9223372036854775807),
+(9223372036854775807.9),
+(9223372036854775807.999999),
+(9223372036854775807.9999999),
+(18446744073709551615),
+(18446744073709551615.9),
+(18446744073709551615.999999),
+(18446744073709551615.9999999);
+SELECT a, SEC_TO_TIME(a) FROM t1_sec ORDER BY id;
+a SEC_TO_TIME(a)
+59.0000000000 00:00:59.000000
+59.9000000000 00:00:59.900000
+59.9999990000 00:00:59.999999
+59.9999999000 00:01:00.000000
+3020398.0000000000 838:59:58.000000
+3020398.9999990000 838:59:58.999999
+3020398.9999999000 838:59:59.000000
+3020399.0000000000 838:59:59.000000
+3020399.9999990000 838:59:59.999999
+3020399.9999999000 838:59:59.999999
+9223372036854775807.0000000000 838:59:59.999999
+9223372036854775807.9000000000 838:59:59.999999
+9223372036854775807.9999990000 838:59:59.999999
+9223372036854775807.9999999000 838:59:59.999999
+18446744073709551615.0000000000 838:59:59.999999
+18446744073709551615.9000000000 838:59:59.999999
+18446744073709551615.9999990000 838:59:59.999999
+18446744073709551615.9999999000 838:59:59.999999
+Warnings:
+Warning 1292 Truncated incorrect seconds value: '3020400'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.0000000000'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.9000000000'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.9999990000'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.9999999000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.0000000000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.9000000000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.9999990000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.9999999000'
+DROP TABLE t1_sec;
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, MAKETIME(0, 0, a) FROM t1_sec ORDER BY id;
+a MAKETIME(0, 0, a)
+0.0000000000 00:00:00.000000
+0.9000000000 00:00:00.900000
+0.9999990000 00:00:00.999999
+0.9999999000 00:00:01.000000
+DROP TABLE t1_sec;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+SELECT
+'----',
+a,
+DATE_FORMAT(a, '%Y') AS yyyy,
+DATE_FORMAT(a, '%Y-%m-%d') AS d,
+DATE_FORMAT(a, '%H:%i:%s') AS t0,
+DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+---- ----
+a 2017-12-31 23:59:59
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.000000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.000000
+---- ----
+a 2017-12-31 23:59:59.9
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.900000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.900000
+---- ----
+a 2017-12-31 23:59:59.999999
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.999999
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.999999
+---- ----
+a 2017-12-31 23:59:59.9999999
+yyyy 2018
+d 2018-01-01
+t0 00:00:00
+t6 00:00:00.000000
+dt0 2018-01-01 00:00:00
+dt6 2018-01-01 00:00:00.000000
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20171231235959),
+(20171231235959.9),
+(20171231235959.999999),
+(20171231235959.9999999);
+SELECT
+'----',
+a,
+DATE_FORMAT(a, '%Y') AS yyyy,
+DATE_FORMAT(a, '%Y-%m-%d') AS d,
+DATE_FORMAT(a, '%H:%i:%s') AS t0,
+DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+---- ----
+a 20171231235959.000000000
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.000000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.000000
+---- ----
+a 20171231235959.900000000
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.900000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.900000
+---- ----
+a 20171231235959.999999000
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.999999
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.999999
+---- ----
+a 20171231235959.999999900
+yyyy 2018
+d 2018-01-01
+t0 00:00:00
+t6 00:00:00.000000
+dt0 2018-01-01 00:00:00
+dt6 2018-01-01 00:00:00.000000
+DROP TABLE t1;
+#
+# Functions with two temporal parameters that round nanoseconds in both parameters in MySQL
+#
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMESTAMP(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMESTAMP(t1.a, t2.a) a a
+2017-12-31 23:59:59.000000 2017-12-31 23:59:59 00:00:00
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59 00:00:00.9
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59 00:00:00.999999
+2018-01-01 00:00:00.000000 2017-12-31 23:59:59 00:00:00.9999999
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59.9 00:00:00
+2018-01-01 00:00:00.800000 2017-12-31 23:59:59.9 00:00:00.9
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.9 00:00:00.999999
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9 00:00:00.9999999
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59.999999 00:00:00
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.999999 00:00:00.9
+2018-01-01 00:00:00.999998 2017-12-31 23:59:59.999999 00:00:00.999999
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.999999 00:00:00.9999999
+2018-01-01 00:00:00.000000 2017-12-31 23:59:59.9999999 00:00:00
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9999999 00:00:00.9
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.9999999 00:00:00.999999
+2018-01-01 00:00:01.000000 2017-12-31 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+SELECT ADDTIME(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+ADDTIME(t1.a, t2.a) a a
+2017-12-31 23:59:59 2017-12-31 23:59:59 00:00:00
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59 00:00:00.9
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59 00:00:00.999999
+2018-01-01 00:00:00 2017-12-31 23:59:59 00:00:00.9999999
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59.9 00:00:00
+2018-01-01 00:00:00.800000 2017-12-31 23:59:59.9 00:00:00.9
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.9 00:00:00.999999
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9 00:00:00.9999999
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59.999999 00:00:00
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.999999 00:00:00.9
+2018-01-01 00:00:00.999998 2017-12-31 23:59:59.999999 00:00:00.999999
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.999999 00:00:00.9999999
+2018-01-01 00:00:00 2017-12-31 23:59:59.9999999 00:00:00
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9999999 00:00:00.9
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.9999999 00:00:00.999999
+2018-01-01 00:00:01 2017-12-31 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMEDIFF(t1.a, t2.a) a a
+23:59:59.000000 23:59:59 00:00:00
+23:59:58.100000 23:59:59 00:00:00.9
+23:59:58.000001 23:59:59 00:00:00.999999
+23:59:58.000000 23:59:59 00:00:00.9999999
+23:59:59.900000 23:59:59.9 00:00:00
+23:59:59.000000 23:59:59.9 00:00:00.9
+23:59:58.900001 23:59:59.9 00:00:00.999999
+23:59:58.900000 23:59:59.9 00:00:00.9999999
+23:59:59.999999 23:59:59.999999 00:00:00
+23:59:59.099999 23:59:59.999999 00:00:00.9
+23:59:59.000000 23:59:59.999999 00:00:00.999999
+23:59:58.999999 23:59:59.999999 00:00:00.9999999
+24:00:00.000000 23:59:59.9999999 00:00:00
+23:59:59.100000 23:59:59.9999999 00:00:00.9
+23:59:59.000001 23:59:59.9999999 00:00:00.999999
+23:59:59.000000 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+SELECT TIMESTAMPDIFF(MICROSECOND,t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMESTAMPDIFF(MICROSECOND,t1.a, t2.a) a a
+0 2001-12-31 23:59:59 2001-12-31 23:59:59
+900000 2001-12-31 23:59:59 2001-12-31 23:59:59.9
+999999 2001-12-31 23:59:59 2001-12-31 23:59:59.999999
+1000000 2001-12-31 23:59:59 2001-12-31 23:59:59.9999999
+-900000 2001-12-31 23:59:59.9 2001-12-31 23:59:59
+0 2001-12-31 23:59:59.9 2001-12-31 23:59:59.9
+99999 2001-12-31 23:59:59.9 2001-12-31 23:59:59.999999
+100000 2001-12-31 23:59:59.9 2001-12-31 23:59:59.9999999
+-999999 2001-12-31 23:59:59.999999 2001-12-31 23:59:59
+-99999 2001-12-31 23:59:59.999999 2001-12-31 23:59:59.9
+0 2001-12-31 23:59:59.999999 2001-12-31 23:59:59.999999
+1 2001-12-31 23:59:59.999999 2001-12-31 23:59:59.9999999
+-1000000 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59
+-100000 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59.9
+-1 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59.999999
+0 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMEDIFF(t1.a, t2.a) a a
+23:59:59.000000 23:59:59 00:00:00
+23:59:58.100000 23:59:59 00:00:00.9
+23:59:58.000001 23:59:59 00:00:00.999999
+23:59:58.000000 23:59:59 00:00:00.9999999
+23:59:59.900000 23:59:59.9 00:00:00
+23:59:59.000000 23:59:59.9 00:00:00.9
+23:59:58.900001 23:59:59.9 00:00:00.999999
+23:59:58.900000 23:59:59.9 00:00:00.9999999
+23:59:59.999999 23:59:59.999999 00:00:00
+23:59:59.099999 23:59:59.999999 00:00:00.9
+23:59:59.000000 23:59:59.999999 00:00:00.999999
+23:59:58.999999 23:59:59.999999 00:00:00.9999999
+24:00:00.000000 23:59:59.9999999 00:00:00
+23:59:59.100000 23:59:59.9999999 00:00:00.9
+23:59:59.000001 23:59:59.9999999 00:00:00.999999
+23:59:59.000000 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1, t2;
+#
+# STR_TO_DATE behaviour is questionable in MySQL 5.6 (MySQL Bug #92474)
+#
+# It truncates nanoseconds, but this may change in the future.
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+SELECT
+a,
+STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s') AS c0,
+STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s.%f') AS c6
+FROM t1;
+a c0 c6
+2017-12-31 23:59:59 2017-12-31 23:59:59 2017-12-31 23:59:59.000000
+2017-12-31 23:59:59.9 2017-12-31 23:59:59 2017-12-31 23:59:59.900000
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59.9999999 2017-12-31 23:59:59 2017-12-31 23:59:59.999999
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9'
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.999999'
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+DROP TABLE t1;
+#
+# DATE_ADD behaviour is questionable in MySQL 5.6 (MySQL Bug#92473)
+# It rounds nanoseconds in the first argument, but truncates nanoseconds in the second argument.
+# This may change in the future, to round both arguments.
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+CREATE TABLE t2 (b DECIMAL(32,9));
+INSERT INTO t2 VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, b, DATE_ADD(a, INTERVAL b SECOND) FROM t1,t2 ORDER BY a,b;
+a b DATE_ADD(a, INTERVAL b SECOND)
+2017-12-31 23:59:59 0.000000000 2017-12-31 23:59:59.000000
+2017-12-31 23:59:59 0.900000000 2017-12-31 23:59:59.900000
+2017-12-31 23:59:59 0.999999000 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59 0.999999900 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59.9 0.000000000 2017-12-31 23:59:59.900000
+2017-12-31 23:59:59.9 0.900000000 2018-01-01 00:00:00.800000
+2017-12-31 23:59:59.9 0.999999000 2018-01-01 00:00:00.899999
+2017-12-31 23:59:59.9 0.999999900 2018-01-01 00:00:00.899999
+2017-12-31 23:59:59.999999 0.000000000 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59.999999 0.900000000 2018-01-01 00:00:00.899999
+2017-12-31 23:59:59.999999 0.999999000 2018-01-01 00:00:00.999998
+2017-12-31 23:59:59.999999 0.999999900 2018-01-01 00:00:00.999998
+2017-12-31 23:59:59.9999999 0.000000000 2018-01-01 00:00:00.000000
+2017-12-31 23:59:59.9999999 0.900000000 2018-01-01 00:00:00.900000
+2017-12-31 23:59:59.9999999 0.999999000 2018-01-01 00:00:00.999999
+2017-12-31 23:59:59.9999999 0.999999900 2018-01-01 00:00:00.999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+DROP TABLE t1, t2;
diff --git a/mysql-test/main/func_time_round.test b/mysql-test/main/func_time_round.test
new file mode 100644
index 00000000000..12d3a50a10f
--- /dev/null
+++ b/mysql-test/main/func_time_round.test
@@ -0,0 +1,461 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+CREATE TABLE t1_datetime_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_datetime_in_varchar (a) VALUES
+('2000-12-31 23:59:59'),
+('2000-12-31 23:59:59.9'),
+('2000-12-31 23:59:59.99'),
+('2000-12-31 23:59:59.999'),
+('2000-12-31 23:59:59.9999'),
+('2000-12-31 23:59:59.99999'),
+('2000-12-31 23:59:59.999999'),
+('2000-12-31 23:59:59.9999999');
+
+CREATE TABLE t1_datetime_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_datetime_in_decimal (a) VALUES
+(20001231235959),
+(20001231235959.9),
+(20001231235959.99),
+(20001231235959.999),
+(20001231235959.9999),
+(20001231235959.99999),
+(20001231235959.999999),
+(20001231235959.9999999);
+
+
+CREATE TABLE t1_time_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_time_in_varchar (a) VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.99'),
+('00:00:00.999'),
+('00:00:00.9999'),
+('00:00:00.99999'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+INSERT INTO t1_time_in_varchar (a) VALUES
+('837:59:59.9999999'),
+('838:59:59'),
+('838:59:59.9'),
+('838:59:59.99'),
+('838:59:59.999'),
+('838:59:59.9999'),
+('838:59:59.99999'),
+('838:59:59.999999'),
+('838:59:59.9999999'),
+('839:59:59.9999999'),
+('87649414:59:59.999999'),
+('87649414:59:59.9999999'),
+('87649415:59:59.999999'),
+('87649415:59:59.9999999');
+
+
+CREATE TABLE t1_time_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_time_in_decimal (a) VALUES
+(0),
+(0.9),
+(0.99),
+(0.999),
+(0.9999),
+(0.99999),
+(0.999999),
+(0.9999999);
+INSERT INTO t1_time_in_decimal (a) VALUES
+(8375959.9999999),
+(8385959),
+(8385959.9),
+(8385959.99),
+(8385959.999),
+(8385959.9999),
+(8385959.99999),
+(8385959.999999),
+(8385959.9999999),
+(8395959.9999999),
+(876494145959.999999),
+(876494145959.9999999),
+(876494155959.999999),
+(876494155959.9999999);
+
+--echo #
+--echo # TIME: LEAST/GREATEST
+--echo #
+
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_varchar;
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_decimal;
+
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000004');
+SELECT GREATEST(TIME'00:00:00', 0.0000004);
+
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000005');
+SELECT GREATEST(TIME'00:00:00', 0.0000005);
+
+
+--echo #
+--echo # Functions with a single TIME input, conversion from DATETIME-in-VARCHAR
+--echo #
+
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single TIME input, conversion from DATETIME-in-DECIMAL
+--echo #
+
+
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single TIME interval input, conversion from TIME-interval-in-VARCHAR
+--echo #
+
+SELECT
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a),
+ CAST(a AS INTERVAL DAY_SECOND(6)),
+ a
+FROM t1_time_in_varchar ORDER BY id;
+
+SELECT
+ TIME_TO_SEC(a),
+ CAST(a AS TIME(6)),
+ a
+FROM t1_time_in_varchar ORDER BY id;
+
+--echo #
+--echo # Functions with a single TIME interval input, conversion from TIME-interval-in-DECIMAL
+--echo #
+
+SELECT
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a),
+ CAST(a AS INTERVAL DAY_SECOND(6)),
+ a
+FROM t1_time_in_decimal ORDER BY id;
+
+SELECT
+ TIME_TO_SEC(a),
+ CAST(a AS TIME(6)),
+ a
+FROM t1_time_in_decimal ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single DATE input, conversion from DATETIME-in-VARCHAR
+--echo #
+
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+
+
+CREATE TABLE t1 (a VARCHAR(32));
+INSERT INTO t1 VALUES
+('2002-01-05 23:59:59'),
+('2002-01-05 23:59:59.999999'),
+('2002-01-05 23:59:59.9999999');
+SELECT YEARWEEK(a), a FROM t1;
+SELECT WEEK(a), a FROM t1;
+SELECT WEEKDAY(a), a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20020105235959),
+(20020105235959.999999),
+(20020105235959.9999999);
+SELECT YEARWEEK(a), a FROM t1;
+SELECT WEEK(a), a FROM t1;
+SELECT WEEKDAY(a), a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # Functions with a single DATE input, conversion from DATETIME-in-DECIMAL
+--echo #
+
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT YEARWEEK(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT DAYOFMONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single DATETIME input, conversion from DATETIME-in-VARCHAR
+--echo #
+
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SET time_zone=DEFAULT;
+
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single DATETIME input, conversion from DATETIME-in-DECIMAL
+--echo #
+
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SET time_zone=DEFAULT;
+
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+DROP TABLE t1_datetime_in_varchar;
+DROP TABLE t1_datetime_in_decimal;
+DROP TABLE t1_time_in_varchar;
+DROP TABLE t1_time_in_decimal;
+
+
+--echo #
+--echo # Functions that construct DATETIME
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1_unix_timestamp (id SERIAL, a DECIMAL(30,10));
+INSERT INTO t1_unix_timestamp (a) VALUES
+(980639999),
+(980639999.9),
+(980639999.999999),
+(980639999.9999999),
+(2147483647),
+(2147483647.9),
+(2147483647.999999),
+(2147483647.9999999);
+SELECT a, FROM_UNIXTIME(a) FROM t1_unix_timestamp ORDER BY id;
+DROP TABLE t1_unix_timestamp;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # Functions that construct TIME
+--echo #
+
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(59),
+(59.9),
+(59.999999),
+(59.9999999),
+(3020398),
+(3020398.999999),
+(3020398.9999999),
+(3020399),
+(3020399.999999),
+(3020399.9999999),
+(9223372036854775807),
+(9223372036854775807.9),
+(9223372036854775807.999999),
+(9223372036854775807.9999999),
+(18446744073709551615),
+(18446744073709551615.9),
+(18446744073709551615.999999),
+(18446744073709551615.9999999);
+SELECT a, SEC_TO_TIME(a) FROM t1_sec ORDER BY id;
+DROP TABLE t1_sec;
+
+
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, MAKETIME(0, 0, a) FROM t1_sec ORDER BY id;
+DROP TABLE t1_sec;
+
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+--vertical_results
+SELECT
+ '----',
+ a,
+ DATE_FORMAT(a, '%Y') AS yyyy,
+ DATE_FORMAT(a, '%Y-%m-%d') AS d,
+ DATE_FORMAT(a, '%H:%i:%s') AS t0,
+ DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+--horizontal_results
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20171231235959),
+(20171231235959.9),
+(20171231235959.999999),
+(20171231235959.9999999);
+--vertical_results
+SELECT
+ '----',
+ a,
+ DATE_FORMAT(a, '%Y') AS yyyy,
+ DATE_FORMAT(a, '%Y-%m-%d') AS d,
+ DATE_FORMAT(a, '%H:%i:%s') AS t0,
+ DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+--horizontal_results
+DROP TABLE t1;
+
+
+--echo #
+--echo # Functions with two temporal parameters that round nanoseconds in both parameters in MySQL
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+
+SELECT TIMESTAMP(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+SELECT ADDTIME(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+
+DROP TABLE t1, t2;
+
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+DROP TABLE t1, t2;
+
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+SELECT TIMESTAMPDIFF(MICROSECOND,t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+DROP TABLE t1, t2;
+
+
+--echo #
+--echo # STR_TO_DATE behaviour is questionable in MySQL 5.6 (MySQL Bug #92474)
+--echo #
+
+--echo # It truncates nanoseconds, but this may change in the future.
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+
+SELECT
+ a,
+ STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s') AS c0,
+ STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s.%f') AS c6
+FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # DATE_ADD behaviour is questionable in MySQL 5.6 (MySQL Bug#92473)
+--echo # It rounds nanoseconds in the first argument, but truncates nanoseconds in the second argument.
+--echo # This may change in the future, to round both arguments.
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+CREATE TABLE t2 (b DECIMAL(32,9));
+INSERT INTO t2 VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, b, DATE_ADD(a, INTERVAL b SECOND) FROM t1,t2 ORDER BY a,b;
+DROP TABLE t1, t2;
diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result
index 732be7c0283..41511d8a521 100644
--- a/mysql-test/main/get_diagnostics.result
+++ b/mysql-test/main/get_diagnostics.result
@@ -133,7 +133,7 @@ DROP PROCEDURE p1;
GET DIAGNOSTICS CONDITION;
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 '' at line 1
GET DIAGNOSTICS CONDITION a;
-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 '' at line 1
+ERROR 42S22: Unknown column 'a' in 'field list'
GET DIAGNOSTICS CONDITION 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
GET DIAGNOSTICS CONDITION 1 @var;
@@ -212,9 +212,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
GET DIAGNOSTICS CONDITION (1) @var = CLASS_ORIGIN;
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 '(1) @var = CLASS_ORIGIN' at line 1
GET DIAGNOSTICS CONDITION p1() @var = CLASS_ORIGIN;
-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 '() @var = CLASS_ORIGIN' at line 1
+ERROR 42S22: Unknown column 'p1' in 'field list'
GET DIAGNOSTICS CONDITION ABS(2) @var = CLASS_ORIGIN;
-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 '(2) @var = CLASS_ORIGIN' at line 1
+ERROR 42S22: Unknown column 'ABS' in 'field list'
GET DIAGNOSTICS CONDITION 1.1 @var = CLASS_ORIGIN;
GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN;
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
@@ -226,10 +226,7 @@ Warnings:
Error 1758 Invalid condition number
Error 1758 Invalid condition number
GET DIAGNOSTICS CONDITION a @var = CLASS_ORIGIN;
-Warnings:
-Error 1758 Invalid condition number
-Error 1758 Invalid condition number
-Error 1054 Unknown column 'a' in 'field list'
+ERROR 42S22: Unknown column 'a' in 'field list'
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
SET @cond = 1;
GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN;
@@ -793,3 +790,13 @@ GET DIAGNOSTICS @var1 = NUMBER;
SHOW STATUS LIKE 'Com%get_diagnostics';
Variable_name Value
Com_get_diagnostics 1
+#
+# MDEV-26695: Number of an invalid row is not calculated for table value constructor
+#
+CREATE TABLE t1 (a CHAR(1)) VALUES ('a'),('b'),('foo');
+Warnings:
+Warning 1406 Data too long for column 'a' at row 3
+CREATE TABLE t2 (a char(1)) VALUES ('a'),('b') UNION VALUES ('foo');
+Warnings:
+Warning 1406 Data too long for column 'a' at row 3
+DROP TABLE t1, t2;
diff --git a/mysql-test/main/get_diagnostics.test b/mysql-test/main/get_diagnostics.test
index a30bad72136..78ed3ea811b 100644
--- a/mysql-test/main/get_diagnostics.test
+++ b/mysql-test/main/get_diagnostics.test
@@ -169,7 +169,7 @@ DROP PROCEDURE p1;
--error ER_PARSE_ERROR
GET DIAGNOSTICS CONDITION;
---error ER_PARSE_ERROR
+--error ER_BAD_FIELD_ERROR
GET DIAGNOSTICS CONDITION a;
--error ER_PARSE_ERROR
GET DIAGNOSTICS CONDITION 1;
@@ -271,9 +271,9 @@ GET DIAGNOSTICS CONDITION 1+1 @var = CLASS_ORIGIN;
GET DIAGNOSTICS CONDITION ? @var = CLASS_ORIGIN;
--error ER_PARSE_ERROR
GET DIAGNOSTICS CONDITION (1) @var = CLASS_ORIGIN;
---error ER_PARSE_ERROR
+--error ER_BAD_FIELD_ERROR
GET DIAGNOSTICS CONDITION p1() @var = CLASS_ORIGIN;
---error ER_PARSE_ERROR
+--error ER_BAD_FIELD_ERROR
GET DIAGNOSTICS CONDITION ABS(2) @var = CLASS_ORIGIN;
# Unfortunate side effects...
@@ -285,6 +285,7 @@ SELECT COUNT(max_questions) INTO @var FROM mysql.user;
GET DIAGNOSTICS CONDITION 9999 @var = CLASS_ORIGIN;
GET DIAGNOSTICS CONDITION NULL @var = CLASS_ORIGIN;
+--error ER_BAD_FIELD_ERROR
GET DIAGNOSTICS CONDITION a @var = CLASS_ORIGIN;
# Reset warnings
@@ -850,3 +851,12 @@ FLUSH STATUS;
SHOW STATUS LIKE 'Com%get_diagnostics';
GET DIAGNOSTICS @var1 = NUMBER;
SHOW STATUS LIKE 'Com%get_diagnostics';
+
+--echo #
+--echo # MDEV-26695: Number of an invalid row is not calculated for table value constructor
+--echo #
+
+CREATE TABLE t1 (a CHAR(1)) VALUES ('a'),('b'),('foo');
+CREATE TABLE t2 (a char(1)) VALUES ('a'),('b') UNION VALUES ('foo');
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/main/gis-debug.result b/mysql-test/main/gis-debug.result
index be4145f2236..2daa810db0d 100644
--- a/mysql-test/main/gis-debug.result
+++ b/mysql-test/main/gis-debug.result
@@ -405,3 +405,93 @@ ERROR HY000: Illegal parameter data types varchar and geometry for operation '/'
CREATE TABLE t1 AS SELECT '0' MOD POINT(0,0) LIMIT 0;
ERROR HY000: Illegal parameter data types varchar and geometry for operation 'MOD'
SET debug_dbug='-d,num_op';
+#
+# End of 10.3 tests
+#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16454 Bad results for IN with ROW
+#
+SET SESSION debug_dbug="+d,cmp_item";
+SET SESSION debug_dbug="+d,Item_func_in";
+SET SESSION debug_dbug="+d,Predicant_to_list_comparator";
+SELECT (POINT(1,1),0) IN ((POINT(1,1),0),((POINT(1,1)),1));
+(POINT(1,1),0) IN ((POINT(1,1),0),((POINT(1,1)),1))
+1
+Warnings:
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=geometry
+Note 1105 DBUG: [0,1] handler=geometry
+Note 1105 DBUG: [0,2] handler=geometry
+Note 1105 DBUG: => handler=geometry
+Note 1105 DBUG: [1,0] handler=int
+Note 1105 DBUG: [1,1] handler=int
+Note 1105 DBUG: [1,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: types_compatible=yes bisect=no
+SELECT (1,(POINT(1,1),0)) IN ((1,(POINT(1,1),0)),(0,(POINT(1,1),0)));
+(1,(POINT(1,1),0)) IN ((1,(POINT(1,1),0)),(0,(POINT(1,1),0)))
+1
+Warnings:
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=int
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: [1,0] handler=row
+Note 1105 DBUG: [1,1] handler=row
+Note 1105 DBUG: [1,2] handler=row
+Note 1105 DBUG: => handler=row
+Note 1105 DBUG: ROW(3 args) level=1
+Note 1105 DBUG: [0,0] handler=geometry
+Note 1105 DBUG: [0,1] handler=geometry
+Note 1105 DBUG: [0,2] handler=geometry
+Note 1105 DBUG: => handler=geometry
+Note 1105 DBUG: [1,0] handler=int
+Note 1105 DBUG: [1,1] handler=int
+Note 1105 DBUG: [1,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: types_compatible=yes bisect=no
+SELECT (1,0) IN ((POINT(1,1),0),(0,0));
+ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+SHOW WARNINGS;
+Level Code Message
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=geometry
+Note 1105 DBUG: [0,2] handler=int
+Error 4078 Illegal parameter data types int and geometry for operation 'in'
+SELECT (1,(0,0)) IN ((1,(POINT(1,1),0)),(0,(0,0)));
+ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+SHOW WARNINGS;
+Level Code Message
+Note 1105 DBUG: [0] arg=1 handler=0 (row)
+Note 1105 DBUG: [1] arg=2 handler=0 (row)
+Note 1105 DBUG: ROW(3 args) level=0
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=int
+Note 1105 DBUG: [0,2] handler=int
+Note 1105 DBUG: => handler=bigint
+Note 1105 DBUG: [1,0] handler=row
+Note 1105 DBUG: [1,1] handler=row
+Note 1105 DBUG: [1,2] handler=row
+Note 1105 DBUG: => handler=row
+Note 1105 DBUG: ROW(3 args) level=1
+Note 1105 DBUG: [0,0] handler=int
+Note 1105 DBUG: [0,1] handler=geometry
+Note 1105 DBUG: [0,2] handler=int
+Error 4078 Illegal parameter data types int and geometry for operation 'in'
+SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
+SET SESSION debug_dbug="-d,Item_func_in";
+SET SESSION debug_dbug="-d,cmp_item";
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/gis-debug.test b/mysql-test/main/gis-debug.test
index 588bc706370..dd64ce0f04c 100644
--- a/mysql-test/main/gis-debug.test
+++ b/mysql-test/main/gis-debug.test
@@ -111,3 +111,39 @@ CREATE TABLE t1 AS SELECT '0'/POINT(0,0) LIMIT 0;
CREATE TABLE t1 AS SELECT '0' MOD POINT(0,0) LIMIT 0;
SET debug_dbug='-d,num_op';
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16454 Bad results for IN with ROW
+--echo #
+
+SET SESSION debug_dbug="+d,cmp_item";
+SET SESSION debug_dbug="+d,Item_func_in";
+SET SESSION debug_dbug="+d,Predicant_to_list_comparator";
+
+SELECT (POINT(1,1),0) IN ((POINT(1,1),0),((POINT(1,1)),1));
+SELECT (1,(POINT(1,1),0)) IN ((1,(POINT(1,1),0)),(0,(POINT(1,1),0)));
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (1,0) IN ((POINT(1,1),0),(0,0));
+SHOW WARNINGS;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (1,(0,0)) IN ((1,(POINT(1,1),0)),(0,(0,0)));
+SHOW WARNINGS;
+
+SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
+SET SESSION debug_dbug="-d,Item_func_in";
+SET SESSION debug_dbug="-d,cmp_item";
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/gis-precise.result b/mysql-test/main/gis-precise.result
index c72debb6f73..513d8b6e8c2 100644
--- a/mysql-test/main/gis-precise.result
+++ b/mysql-test/main/gis-precise.result
@@ -223,7 +223,7 @@ st_u
MULTIPOLYGON(((525400 18370,525000.9677614468 183300,525400 183300,525400 18370)),((525000 183300,525000 183700,525000.9677614468 183300,525000 183300)),((525265.58 183481.95,525263.95 183484.75,525260.7 183491.55,525276.79 183500,525278.39 183500.84,525278.63 183500.97,525280.98 183502.26,525283.17 183503.47,525289.11 183506.62,525296.42 183510.31,525296.57 183510.39,525298.67 183511.53,525302.81 183513.8,525304.5 183510.83,525307.85 183504.95,525304.45 183504.25,525301.75 183509.35,525283.55 183500,525282.2 183499.3,525282.3 183499.1,525280.35 183498.2,525275.5 183495.7,525276.5 183493.45,525278.97 183488.73,525265.58 183481.95),(525266.99 183484.33,525263.26 183491.55,525266.15 183493.04,525269.88 183485.82,525266.99 183484.33),(525272.06 183488.37,525268.94 183494.51,525271.94 183496.03,525275.06 183489.89,525272.06 183488.37)))
SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F;
SELECT ASTEXT(TOUCHES(@a, GEOMFROMTEXT('point(0 0)'))) t;
-ERROR HY000: Illegal parameter data type int for operation 'st_astext'
+ERROR HY000: Illegal parameter data type boolean for operation 'st_astext'
SELECT astext(ST_UNION (
PolyFromText('POLYGON(( 2 2 ,3 2,2 7,2 2),( 0 0,8 2,1 9,0 0))'),
ExteriorRing( Envelope( MultiLineStringFromText('MULTILINESTRING((3 4,5 3),(3 0,0 5))')))));
diff --git a/mysql-test/main/gis-rtree.result b/mysql-test/main/gis-rtree.result
index 97dc96e1b03..5f0187eaa30 100644
--- a/mysql-test/main/gis-rtree.result
+++ b/mysql-test/main/gis-rtree.result
@@ -744,6 +744,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result
index d4d9baf6ef7..1e7f7ce931d 100644
--- a/mysql-test/main/gis.result
+++ b/mysql-test/main/gis.result
@@ -968,29 +968,29 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
1
-INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
-INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)'));
EXPLAIN
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref p p 28 const # Using where
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
DROP TABLE t1, t2;
End of 5.0 tests
#
@@ -4979,3 +4979,72 @@ ERROR HY000: Illegal parameter data type geometry for operation 'is_used_lock'
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers
+#
+SELECT ST_SRID(TRUE);
+ERROR HY000: Illegal parameter data type boolean for operation 'srid'
+SELECT ST_SRID(COALESCE(TRUE,TRUE));
+ERROR HY000: Illegal parameter data type boolean for operation 'srid'
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT ST_SRID((SELECT MAX(a)>3 FROM t1));
+ERROR HY000: Illegal parameter data type boolean for operation 'srid'
+SELECT ST_SRID(MAX(a>3)) FROM t1;
+ERROR HY000: Illegal parameter data type boolean for operation 'srid'
+SELECT ST_SRID((SELECT MAX(a>3) FROM t1));
+ERROR HY000: Illegal parameter data type boolean for operation 'srid'
+DROP TABLE t1;
+#
+# Mixing GEOMETRY with HEX hybrid
+#
+SELECT 0x60=POINT(1,1), POINT(1,1)=0x60;
+0x60=POINT(1,1) POINT(1,1)=0x60
+0 0
+CREATE TABLE t1 AS SELECT
+COALESCE(0x60,POINT(1,1)),
+COALESCE(POINT(1,1),0x60),
+LEAST(0x60,POINT(1,1)),
+LEAST(POINT(1,1),0x60);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `COALESCE(0x60,POINT(1,1))` longblob DEFAULT NULL,
+ `COALESCE(POINT(1,1),0x60)` longblob DEFAULT NULL,
+ `LEAST(0x60,POINT(1,1))` longblob DEFAULT NULL,
+ `LEAST(POINT(1,1),0x60)` longblob DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SELECT 0x60+POINT(1,1);
+ERROR HY000: Illegal parameter data types bigint and geometry for operation '+'
+SELECT POINT(1,1)+0x60;
+ERROR HY000: Illegal parameter data types geometry and bigint for operation '+'
+#
+# MDEV-16454 Bad results for IN with ROW
+#
+SELECT (1,0) IN ((POINT(1,1),0),(0,0));
+ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+SELECT (1,(0,0)) IN ((1,(POINT(1,1),0)),(0,(0,0)));
+ERROR HY000: Illegal parameter data types int and geometry for operation 'in'
+#
+# MDEV-19819 ALTER from POINT to LINESTRING erroneously preserves POINT values
+#
+CREATE TABLE t1 (a POINT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (Point(0,0));
+ALTER TABLE t1 MODIFY a LINESTRING;
+ERROR 22007: Incorrect LINESTRING value: 'POINT(0 0)' for column `test`.`t1`.`a` at row 1
+DROP TABLE t1;
+CREATE TABLE t1 (a LINESTRING);
+CREATE TABLE t2 (a POINT);
+INSERT INTO t2 VALUES (POINT(0,0));
+INSERT INTO t1 SELECT * FROM t2;
+ERROR 22007: Incorrect LINESTRING value: 'POINT(0 0)' for column `test`.`t1`.`a` at row 1
+SELECT AsText(a) FROM t1;
+AsText(a)
+DROP TABLE t1, t2;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/gis.test b/mysql-test/main/gis.test
index 208b8731e0e..4ec5eb99d62 100644
--- a/mysql-test/main/gis.test
+++ b/mysql-test/main/gis.test
@@ -2656,7 +2656,6 @@ SELECT ST_SRID(1);
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
SELECT ST_SRID('test');
-
--echo # Item_bool_func_args_geometry
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
@@ -3051,3 +3050,77 @@ SELECT IS_USED_LOCK(POINT(1,1));
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers
+--echo #
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT ST_SRID(TRUE);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT ST_SRID(COALESCE(TRUE,TRUE));
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT ST_SRID((SELECT MAX(a)>3 FROM t1));
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT ST_SRID(MAX(a>3)) FROM t1;
+--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+SELECT ST_SRID((SELECT MAX(a>3) FROM t1));
+DROP TABLE t1;
+
+--echo #
+--echo # Mixing GEOMETRY with HEX hybrid
+--echo #
+
+SELECT 0x60=POINT(1,1), POINT(1,1)=0x60;
+
+CREATE TABLE t1 AS SELECT
+ COALESCE(0x60,POINT(1,1)),
+ COALESCE(POINT(1,1),0x60),
+ LEAST(0x60,POINT(1,1)),
+ LEAST(POINT(1,1),0x60);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT 0x60+POINT(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT POINT(1,1)+0x60;
+
+--echo #
+--echo # MDEV-16454 Bad results for IN with ROW
+--echo #
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (1,0) IN ((POINT(1,1),0),(0,0));
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT (1,(0,0)) IN ((1,(POINT(1,1),0)),(0,(0,0)));
+
+--echo #
+--echo # MDEV-19819 ALTER from POINT to LINESTRING erroneously preserves POINT values
+--echo #
+
+CREATE TABLE t1 (a POINT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (Point(0,0));
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+ALTER TABLE t1 MODIFY a LINESTRING;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a LINESTRING);
+CREATE TABLE t2 (a POINT);
+INSERT INTO t2 VALUES (POINT(0,0));
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+INSERT INTO t1 SELECT * FROM t2;
+SELECT AsText(a) FROM t1;
+DROP TABLE t1, t2;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/gis_notembedded.result b/mysql-test/main/gis_notembedded.result
index 64e90572bf0..99fe8d656a1 100644
--- a/mysql-test/main/gis_notembedded.result
+++ b/mysql-test/main/gis_notembedded.result
@@ -1,13 +1,13 @@
show create procedure mysql.AddGeometryColumn;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-AddGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `AddGeometryColumn`(catalog varchar(64), t_schema varchar(64),
+AddGeometryColumn CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE `AddGeometryColumn`(catalog varchar(64), t_schema varchar(64),
t_name varchar(64), geometry_column varchar(64), t_srid int)
SQL SECURITY INVOKER
begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure mysql.DropGeometryColumn;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-DropGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `DropGeometryColumn`(catalog varchar(64), t_schema varchar(64),
+DropGeometryColumn CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE `DropGeometryColumn`(catalog varchar(64), t_schema varchar(64),
t_name varchar(64), geometry_column varchar(64))
SQL SECURITY INVOKER
begin
diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result
index 3dd1b393043..e445c077dd0 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -2,6 +2,7 @@ set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
SET GLOBAL log_bin_trust_function_creators = 1;
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
connect master,localhost,root,,;
connection master;
SET NAMES binary;
@@ -56,7 +57,7 @@ max_questions 0
max_updates 0
max_connections 0
max_user_connections 0
-plugin
+plugin mysql_native_password
authentication_string
password_expired N
is_role N
@@ -132,7 +133,7 @@ max_questions 10
max_updates 0
max_connections 0
max_user_connections 0
-plugin
+plugin mysql_native_password
authentication_string
password_expired N
is_role N
@@ -184,7 +185,7 @@ max_questions 10
max_updates 20
max_connections 30
max_user_connections 0
-plugin
+plugin mysql_native_password
authentication_string
password_expired N
is_role N
@@ -296,12 +297,7 @@ ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
select 1;
1
1
-insert into mysql.user (host, user) values ('localhost', 'test11');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert into mysql.global_priv (host, user) values ('localhost', 'test11');
insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc;
@@ -658,9 +654,9 @@ GRANT ALL PRIVILEGES ON mysqltest.dummytable TO dummy@localhost;
GRANT ALL PRIVILEGES ON mysqltest.dummyview TO dummy@localhost;
SHOW GRANTS FOR dummy@localhost;
Grants for dummy@localhost
-GRANT USAGE ON *.* TO `dummy`@`localhost`
-GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO `dummy`@`localhost`
+GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
+GRANT USAGE ON *.* TO `dummy`@`localhost`
use INFORMATION_SCHEMA;
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
@@ -671,9 +667,9 @@ mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DELETE HISTORY, DROP, IN
FLUSH PRIVILEGES;
SHOW GRANTS FOR dummy@localhost;
Grants for dummy@localhost
-GRANT USAGE ON *.* TO `dummy`@`localhost`
-GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO `dummy`@`localhost`
+GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
+GRANT USAGE ON *.* TO `dummy`@`localhost`
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
@@ -702,9 +698,9 @@ GRANT CREATE VIEW ON mysqltest.dummytable TO dummy@localhost;
GRANT CREATE VIEW ON mysqltest.dummyview TO dummy@localhost;
SHOW GRANTS FOR dummy@localhost;
Grants for dummy@localhost
-GRANT USAGE ON *.* TO `dummy`@`localhost`
-GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost`
+GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
+GRANT USAGE ON *.* TO `dummy`@`localhost`
use INFORMATION_SCHEMA;
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
@@ -715,9 +711,9 @@ mysqltest dummyview CREATE VIEW
FLUSH PRIVILEGES;
SHOW GRANTS FOR dummy@localhost;
Grants for dummy@localhost
-GRANT USAGE ON *.* TO `dummy`@`localhost`
-GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost`
+GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
+GRANT USAGE ON *.* TO `dummy`@`localhost`
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
@@ -737,8 +733,8 @@ GRANT SHOW VIEW ON mysqltest.dummyview TO dummy@localhost;
SHOW GRANTS FOR dummy@localhost;
Grants for dummy@localhost
GRANT USAGE ON *.* TO `dummy`@`localhost`
-GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost`
+GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
use INFORMATION_SCHEMA;
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
@@ -750,8 +746,8 @@ FLUSH PRIVILEGES;
SHOW GRANTS FOR dummy@localhost;
Grants for dummy@localhost
GRANT USAGE ON *.* TO `dummy`@`localhost`
-GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost`
+GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost`
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
@@ -840,9 +836,6 @@ drop database db27515;
End of 4.1 tests
use test;
create table t1 (a int);
-create table t2 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
create user mysqltest_8@'';
create user mysqltest_8@host8;
create user mysqltest_8@'';
@@ -852,7 +845,7 @@ ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'%'
create user mysqltest_8@host8;
ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'host8'
select user, QUOTE(host) from mysql.user where user="mysqltest_8";
-user QUOTE(host)
+User QUOTE(host)
mysqltest_8 '%'
mysqltest_8 'host8'
Schema privileges
@@ -972,6 +965,8 @@ GRANT UPDATE ON `test`.`t1` TO `mysqltest_8`@`%`
select * from information_schema.table_privileges;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'mysqltest_8'@'%' def test t1 UPDATE NO
+'mariadb.sys'@'localhost' def mysql global_priv SELECT NO
+'mariadb.sys'@'localhost' def mysql global_priv DELETE NO
connect conn5,localhost,mysqltest_8,,;
select * from t1;
a
@@ -986,6 +981,8 @@ Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
select * from information_schema.table_privileges;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'mariadb.sys'@'localhost' def mysql global_priv SELECT NO
+'mariadb.sys'@'localhost' def mysql global_priv DELETE NO
flush privileges;
show grants for mysqltest_8@'';
Grants for mysqltest_8@%
@@ -1042,9 +1039,6 @@ ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%'
drop user mysqltest_8@host8;
show grants for mysqltest_8@host8;
ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host 'host8'
-insert into mysql.user select * from t2;
-flush privileges;
-drop table t2;
drop table t1;
connection master;
CREATE DATABASE mysqltest3;
@@ -1438,6 +1432,8 @@ declare tmp varchar(30);
select col1 from test limit 1 into tmp;
return '1';
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create view v1 as select test.* from test where test.col1=test_function();
grant update (col1) on v1 to 'greg'@'localhost';
drop user 'greg'@'localhost';
@@ -1449,7 +1445,6 @@ CURRENT_USER()
root@localhost
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
-update mysql.user set plugin='';
# Bug#57952
@@ -1921,7 +1916,7 @@ DROP DATABASE db2;
grant usage on Foo.* to myuser@Localhost identified by 'foo';
grant select on Foo.* to myuser@localhost;
select host,user from mysql.user where User='myuser';
-host user
+Host User
localhost myuser
revoke select on Foo.* from myuser@localhost;
delete from mysql.user where User='myuser';
@@ -2803,15 +2798,7 @@ DROP USER bug33578113;
#
# MDEV-19948 'show grants' return privileges individually
#
-SET @had_user_delete_history_priv := 0;
-SELECT @had_user_delete_history_priv :=1 FROM mysql.user WHERE Delete_history_priv LIKE '%';
-@had_user_delete_history_priv :=1
-1
-1
-1
-1
-ALTER TABLE mysql.user DROP COLUMN Delete_history_priv;
-FLUSH PRIVILEGES;
+# switching from mysql.global_priv to mysql.user
CREATE USER ten2;
GRANT ALL ON *.* TO ten2;
SHOW GRANTS FOR ten2;
@@ -2822,9 +2809,28 @@ SHOW GRANTS FOR ten2;
Grants for ten2@%
GRANT ALL PRIVILEGES ON *.* TO `ten2`@`%`
DROP USER ten2;
-ALTER TABLE mysql.user ADD Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Create_tablespace_priv;
-UPDATE mysql.user SET Delete_history_priv = Super_priv WHERE @had_user_delete_history_priv = 1;
-FLUSH PRIVILEGES;
+# switching back from mysql.user to mysql.global_priv
#
# End of 10.3 tests
#
+#
+# MDEV-17932 : Assertion upon double RENAME USER
+#
+CREATE USER foo@localhost;
+CREATE USER bar2@localhost;
+RENAME USER foo@localhost TO bar1@localhost, bar1@localhost TO bar3@localhost;
+DROP USER bar2@localhost;
+DROP USER bar3@localhost;
+#
+# MDEV-17946 : Unsorted acl_dbs after RENAME USER
+#
+CREATE USER foo;
+GRANT SELECT ON test.* TO foo;
+RENAME USER '' TO 'name';
+GRANT UPDATE ON test.* TO foo;
+RENAME USER 'name' to '';
+DROP USER foo;
+#
+# End of 10.4 tests
+#
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test
index 3279f2b381d..598c223c374 100644
--- a/mysql-test/main/grant.test
+++ b/mysql-test/main/grant.test
@@ -10,6 +10,7 @@ set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
SET GLOBAL log_bin_trust_function_creators = 1;
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
connect (master,localhost,root,,);
connection master;
@@ -125,7 +126,7 @@ select 1; # To test that the previous command didn't cause problems
#
# Bug#4898 User privileges depending on ORDER BY Settings of table db
#
-insert into mysql.user (host, user) values ('localhost', 'test11');
+insert into mysql.global_priv (host, user) values ('localhost', 'test11');
insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc;
@@ -433,12 +434,14 @@ CREATE TABLE mysqltest.dummytable (dummyfield INT);
CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable;
GRANT ALL PRIVILEGES ON mysqltest.dummytable TO dummy@localhost;
GRANT ALL PRIVILEGES ON mysqltest.dummyview TO dummy@localhost;
+--sorted_result
SHOW GRANTS FOR dummy@localhost;
use INFORMATION_SCHEMA;
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
FLUSH PRIVILEGES;
+--sorted_result
SHOW GRANTS FOR dummy@localhost;
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
@@ -455,12 +458,14 @@ CREATE TABLE mysqltest.dummytable (dummyfield INT);
CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable;
GRANT CREATE VIEW ON mysqltest.dummytable TO dummy@localhost;
GRANT CREATE VIEW ON mysqltest.dummyview TO dummy@localhost;
+--sorted_result
SHOW GRANTS FOR dummy@localhost;
use INFORMATION_SCHEMA;
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
FLUSH PRIVILEGES;
+--sorted_result
SHOW GRANTS FOR dummy@localhost;
SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
@@ -575,12 +580,6 @@ drop database db27515;
use test;
create table t1 (a int);
-# Backup anonymous users and remove them. (They get in the way of
-# the one we test with here otherwise.)
-create table t2 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
-
# Create some users with different hostnames
create user mysqltest_8@'';
create user mysqltest_8@host8;
@@ -694,10 +693,6 @@ drop user mysqltest_8@host8;
--error ER_NONEXISTING_GRANT
show grants for mysqltest_8@host8;
-# Restore the anonymous users.
-insert into mysql.user select * from t2;
-flush privileges;
-drop table t2;
drop table t1;
#
@@ -1259,9 +1254,6 @@ SELECT CURRENT_USER();
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
-
#
# Bug#57952: privilege change is not taken into account by EXECUTE.
#
@@ -2311,11 +2303,7 @@ DROP USER bug33578113;
# Let's cheat server that we are using `10.2` user table
# which doesn't have `Delete_history_priv` column
-SET @had_user_delete_history_priv := 0;
-SELECT @had_user_delete_history_priv :=1 FROM mysql.user WHERE Delete_history_priv LIKE '%';
-
-ALTER TABLE mysql.user DROP COLUMN Delete_history_priv;
-FLUSH PRIVILEGES;
+source include/switch_to_mysql_user.inc;
CREATE USER ten2;
GRANT ALL ON *.* TO ten2;
@@ -2327,12 +2315,33 @@ FLUSH PRIVILEGES;
# Now should show `all privileges` with/without patch
SHOW GRANTS FOR ten2;
DROP USER ten2;
-
-# Restore original table (similar to `mysql_upgrade`)
-ALTER TABLE mysql.user ADD Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Create_tablespace_priv;
-UPDATE mysql.user SET Delete_history_priv = Super_priv WHERE @had_user_delete_history_priv = 1;
-FLUSH PRIVILEGES;
+source include/switch_to_mysql_global_priv.inc;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-17932 : Assertion upon double RENAME USER
+--echo #
+CREATE USER foo@localhost;
+CREATE USER bar2@localhost;
+RENAME USER foo@localhost TO bar1@localhost, bar1@localhost TO bar3@localhost;
+DROP USER bar2@localhost;
+DROP USER bar3@localhost;
+
+--echo #
+--echo # MDEV-17946 : Unsorted acl_dbs after RENAME USER
+--echo #
+CREATE USER foo;
+GRANT SELECT ON test.* TO foo;
+RENAME USER '' TO 'name';
+GRANT UPDATE ON test.* TO foo;
+RENAME USER 'name' to '';
+DROP USER foo;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
+
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result
index 022b94d641b..0eb8dee026e 100644
--- a/mysql-test/main/grant2.result
+++ b/mysql-test/main/grant2.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET NAMES binary;
@@ -181,19 +182,19 @@ grant select on *.* to 'mysqltest_2';
grant insert on test.* to 'mysqltest_2';
grant update on test.t1 to 'mysqltest_2';
grant update (c2) on test.t2 to 'mysqltest_2';
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-host user password
-% mysqltest_1
-% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
-% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff
-select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
+Host User Password plugin authentication_string
+% mysqltest_1 mysql_native_password
+% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
+% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
+select host,db,user from mysql.db where user like 'mysqltest_%';
host db user
% test mysqltest_2
-select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
+select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%';
host db user table_name
% test mysqltest_2 t1
% test mysqltest_2 t2
-select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
+select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%';
host db user table_name column_name
% test mysqltest_2 t2 c2
show grants for 'mysqltest_1';
@@ -206,35 +207,35 @@ GRANT INSERT ON "test".* TO "mysqltest_2"@"%"
GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_2"@"%"
GRANT UPDATE ON "test"."t1" TO "mysqltest_2"@"%"
drop user 'mysqltest_1';
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-host user password
-% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
-% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff
-select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
+Host User Password plugin authentication_string
+% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
+% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
+select host,db,user from mysql.db where user like 'mysqltest_%';
host db user
% test mysqltest_2
-select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
+select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%';
host db user table_name
% test mysqltest_2 t1
% test mysqltest_2 t2
-select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
+select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%';
host db user table_name column_name
% test mysqltest_2 t2 c2
show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
rename user 'mysqltest_2' to 'mysqltest_1';
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-host user password
-% mysqltest_1 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
-% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff
-select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
+Host User Password plugin authentication_string
+% mysqltest_1 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
+% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
+select host,db,user from mysql.db where user like 'mysqltest_%' ;
host db user
% test mysqltest_1
-select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
+select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' ;
host db user table_name
% test mysqltest_1 t1
% test mysqltest_1 t2
-select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
+select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' ;
host db user table_name column_name
% test mysqltest_1 t2 c2
show grants for 'mysqltest_1';
@@ -254,21 +255,21 @@ ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
revoke all privileges, grant option from 'mysqltest_1';
ERROR HY000: Can't revoke all privileges for one or more of the requested users
drop user 'mysqltest_1';
-select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user;
+select host,db,user from mysql.db where user = 'mysqltest_1' ;
host db user
insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1';
flush privileges;
show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
drop user 'mysqltest_1';
-select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name;
+select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' ;
host db user table_name
insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1';
flush privileges;
show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
drop user 'mysqltest_1';
-select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name;
+select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' ;
host db user table_name column_name
create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
@@ -310,7 +311,7 @@ create user mysqltest_2@localhost;
grant create user on *.* to mysqltest_2@localhost;
connect user3,localhost,mysqltest_2,,;
connection user3;
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'user'
create user mysqltest_A@'%';
rename user mysqltest_A@'%' to mysqltest_B@'%';
@@ -326,14 +327,9 @@ show grants;
Grants for mysqltest_3@localhost
GRANT USAGE ON *.* TO `mysqltest_3`@`localhost`
GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO `mysqltest_3`@`localhost`
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user'
-insert into mysql.user set host='%', user='mysqltest_B';
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert into mysql.global_priv set host='%', user='mysqltest_B';
create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%';
@@ -373,7 +369,7 @@ set password = password('changed');
disconnect b12302;
connection default;
select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1';
-host length(authentication_string)
+Host length(authentication_string)
127.0.0.1 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.1';
delete from mysql.user where user like 'mysqltest\_1';
@@ -388,7 +384,7 @@ set password = password('changed');
disconnect b12302_2;
connection default;
select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1';
-host length(authentication_string)
+Host length(authentication_string)
127.0.0.0/255.0.0.0 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.0/255.0.0.0';
delete from mysql.user where user like 'mysqltest\_1';
@@ -428,15 +424,10 @@ disconnect con2root;
disconnect con3root;
create database TESTDB;
create table t2(a int);
-create temporary table t1 as select * from mysql.user;
-delete from mysql.user where host='localhost';
-INSERT INTO mysql.user (host, user, password) VALUES
-('%','mysqltest_1',password('password'));
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+create temporary table t1 as select * from mysql.global_priv;
+delete from mysql.global_priv where host='localhost';
+INSERT INTO mysql.global_priv (host, user, priv) VALUES
+('%','mysqltest_1',json_object('authentication_string', password('password')));
INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES;
@@ -445,9 +436,9 @@ create database TEStdb;
Got one of the listed errors
connection default;
disconnect con1;
-delete from mysql.user;
+delete from mysql.global_priv;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
-insert into mysql.user select * from t1;
+insert into mysql.global_priv select * from t1;
drop table t1, t2;
drop database TESTDB;
flush privileges;
@@ -462,6 +453,8 @@ INSERT INTO t2 VALUES (1);
DROP FUNCTION IF EXISTS f2;
CREATE FUNCTION f2 () RETURNS INT
BEGIN DECLARE v INT; SELECT s1 FROM t2 INTO v; RETURN v; END//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT f2();
f2()
1
@@ -553,27 +546,18 @@ End of 5.0 tests
USE mysql;
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
-SELECT password FROM user WHERE user=@u AND host=@h INTO @pwd;
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password insert_priv
-root localhost Y
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password insert_priv
-root localhost N
+SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
+User Host Password plugin authentication_string Insert_priv
+root localhost Y
GRANT INSERT ON *.* TO CURRENT_USER();
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password insert_priv
-root localhost Y
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
+SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
+User Host Password plugin authentication_string Insert_priv
+root localhost mysql_native_password Y
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password insert_priv
-root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y
-UPDATE user SET password=@pwd WHERE user=@u AND host=@h;
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password insert_priv
-root localhost Y
+SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
+User Host Password plugin authentication_string Insert_priv
+root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB mysql_native_password *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y
+UPDATE global_priv SET priv=@root_priv where user='root' and host='localhost';
FLUSH PRIVILEGES;
USE test;
End of 5.1 tests
diff --git a/mysql-test/main/grant2.test b/mysql-test/main/grant2.test
index 1f7450df6c1..f98af8d8630 100644
--- a/mysql-test/main/grant2.test
+++ b/mysql-test/main/grant2.test
@@ -4,7 +4,7 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
-
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET NAMES binary;
@@ -231,28 +231,40 @@ grant select on *.* to 'mysqltest_2';
grant insert on test.* to 'mysqltest_2';
grant update on test.t1 to 'mysqltest_2';
grant update (c2) on test.t2 to 'mysqltest_2';
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
-select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
-select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
+--sorted_result
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
+--sorted_result
+select host,db,user from mysql.db where user like 'mysqltest_%';
+--sorted_result
+select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%';
+--sorted_result
+select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%';
show grants for 'mysqltest_1';
show grants for 'mysqltest_2';
#
# Drop
drop user 'mysqltest_1';
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
-select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
-select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
+--sorted_result
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
+--sorted_result
+select host,db,user from mysql.db where user like 'mysqltest_%';
+--sorted_result
+select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%';
+--sorted_result
+select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%';
--error ER_NONEXISTING_GRANT
show grants for 'mysqltest_1';
#
# Rename
rename user 'mysqltest_2' to 'mysqltest_1';
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
-select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
-select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
+--sorted_result
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
+--sorted_result
+select host,db,user from mysql.db where user like 'mysqltest_%' ;
+--sorted_result
+select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' ;
+--sorted_result
+select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' ;
show grants for 'mysqltest_1';
drop user 'mysqltest_1', 'mysqltest_3';
--error ER_CANNOT_USER
@@ -269,7 +281,8 @@ show grants for 'mysqltest_1';
--error ER_REVOKE_GRANTS
revoke all privileges, grant option from 'mysqltest_1';
drop user 'mysqltest_1';
-select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user;
+--sorted_result
+select host,db,user from mysql.db where user = 'mysqltest_1' ;
#
# Add a stray record
insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1';
@@ -277,7 +290,8 @@ flush privileges;
--error ER_NONEXISTING_GRANT
show grants for 'mysqltest_1';
drop user 'mysqltest_1';
-select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name;
+--sorted_result
+select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' ;
#
# Add a stray record
insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1';
@@ -285,7 +299,8 @@ flush privileges;
--error ER_NONEXISTING_GRANT
show grants for 'mysqltest_1';
drop user 'mysqltest_1';
-select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name;
+--sorted_result
+select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' ;
#
# Handle multi user lists
create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
@@ -330,7 +345,7 @@ grant create user on *.* to mysqltest_2@localhost;
connect (user3,localhost,mysqltest_2,,);
connection user3;
--error ER_TABLEACCESS_DENIED_ERROR
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
create user mysqltest_A@'%';
rename user mysqltest_A@'%' to mysqltest_B@'%';
drop user mysqltest_B@'%';
@@ -345,8 +360,8 @@ connect (user4,localhost,mysqltest_3,,);
connection user4;
show grants;
--error ER_TABLEACCESS_DENIED_ERROR
-select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-insert into mysql.user set host='%', user='mysqltest_B';
+select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
+insert into mysql.global_priv set host='%', user='mysqltest_B';
create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%';
@@ -466,10 +481,10 @@ disconnect con3root;
create database TESTDB;
create table t2(a int);
-create temporary table t1 as select * from mysql.user;
-delete from mysql.user where host='localhost';
-INSERT INTO mysql.user (host, user, password) VALUES
-('%','mysqltest_1',password('password'));
+create temporary table t1 as select * from mysql.global_priv;
+delete from mysql.global_priv where host='localhost';
+INSERT INTO mysql.global_priv (host, user, priv) VALUES
+('%','mysqltest_1',json_object('authentication_string', password('password')));
INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES;
@@ -485,9 +500,9 @@ create database TEStdb;
# Clean-up
connection default;
disconnect con1;
-delete from mysql.user;
+delete from mysql.global_priv;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
-insert into mysql.user select * from t1;
+insert into mysql.global_priv select * from t1;
drop table t1, t2;
drop database TESTDB;
flush privileges;
@@ -642,27 +657,19 @@ DROP DATABASE db1;
USE mysql;
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
-SELECT password FROM user WHERE user=@u AND host=@h INTO @pwd;
# show current privs.
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-
-# toggle INSERT
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
+SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
# show that GRANT ... TO CURRENT_USER() no longer crashes
GRANT INSERT ON *.* TO CURRENT_USER();
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
+SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
# show that GRANT ... TO CURRENT_USER() IDENTIFIED BY ... works now
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
-
-UPDATE user SET password=@pwd WHERE user=@u AND host=@h;
-SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
+SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
+UPDATE global_priv SET priv=@root_priv where user='root' and host='localhost';
FLUSH PRIVILEGES;
USE test;
diff --git a/mysql-test/main/grant3.result b/mysql-test/main/grant3.result
index e26f19ee492..63e343aaf4d 100644
--- a/mysql-test/main/grant3.result
+++ b/mysql-test/main/grant3.result
@@ -29,7 +29,7 @@ grant select on test.* to CUser@localhost;
grant select on test.* to CUser@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
@@ -37,14 +37,14 @@ CUser localhost test Y
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
@@ -56,7 +56,7 @@ grant select on test.t1 to CUser@localhost;
grant select on test.t1 to CUser@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -64,14 +64,14 @@ CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -82,7 +82,7 @@ grant select(a) on test.t1 to CUser@localhost;
grant select(a) on test.t1 to CUser@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -90,14 +90,14 @@ CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -109,7 +109,7 @@ grant select on test.* to CUser2@localhost;
grant select on test.* to CUser2@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
-user host
+User Host
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
@@ -117,7 +117,7 @@ CUser2 localhost test Y
REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
-user host
+User Host
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
@@ -125,7 +125,7 @@ REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost'
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
-user host
+User Host
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
diff --git a/mysql-test/main/grant4.result b/mysql-test/main/grant4.result
index 99f1131143e..29021b608aa 100644
--- a/mysql-test/main/grant4.result
+++ b/mysql-test/main/grant4.result
@@ -129,6 +129,7 @@ connection default;
disconnect con1;
drop database mysqltest_db1;
drop user mysqltest_u1@localhost;
+# switching from mysql.global_priv to mysql.user
call mtr.add_suppression("Table 'mysql.user' doesn't exist");
call mtr.add_suppression("'mysql.user' is not of type 'TABLE'");
rename table mysql.user to mysql.user1;
@@ -141,13 +142,16 @@ flush privileges;
ERROR 42S02: Table 'mysql.user' doesn't exist
drop temporary table mysql.user;
rename table mysql.user1 to mysql.user;
+# switching back from mysql.user to mysql.global_priv
+# switching from mysql.global_priv to mysql.user
call mtr.add_suppression('mysql.user table is damaged');
rename table mysql.user to mysql.user1;
create table mysql.user (Host char(100), User char(100));
flush privileges;
-ERROR HY000: Unknown error
+ERROR HY000: Fatal error: mysql.user table is damaged or in unsupported 3.20 format
drop table mysql.user;
rename table mysql.user1 to mysql.user;
+# switching back from mysql.user to mysql.global_priv
End of 5.5 tests
#
# Additional coverage for refactoring which is made as part
@@ -218,15 +222,15 @@ grant select on test.* to foo6 identified by password '2222222222222222';
grant select on test.* to foo7 identified via mysql_native_password using '11111111111111111111111111111111111111111';
grant select on test.* to foo8 identified via mysql_old_password using '2222222222222222';
select user,password,plugin,authentication_string from mysql.user where user like 'foo%';
-user password plugin authentication_string
-foo1 11111111111111111111111111111111111111111
-foo2 2222222222222222
-foo3 11111111111111111111111111111111111111111
-foo4 2222222222222222
-foo5 11111111111111111111111111111111111111111
-foo6 2222222222222222
-foo7 11111111111111111111111111111111111111111
-foo8 2222222222222222
+User Password plugin authentication_string
+foo1 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo2 2222222222222222 mysql_old_password 2222222222222222
+foo3 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo4 2222222222222222 mysql_old_password 2222222222222222
+foo5 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo6 2222222222222222 mysql_old_password 2222222222222222
+foo7 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo8 2222222222222222 mysql_old_password 2222222222222222
drop user foo1;
drop user foo2;
drop user foo3;
diff --git a/mysql-test/main/grant4.test b/mysql-test/main/grant4.test
index 30f08f9eea2..a63bd158a0d 100644
--- a/mysql-test/main/grant4.test
+++ b/mysql-test/main/grant4.test
@@ -148,6 +148,7 @@ drop user mysqltest_u1@localhost;
#
# MDEV-18241 Downgrade from 10.4 to 10.3 crashes
#
+source include/switch_to_mysql_user.inc;
call mtr.add_suppression("Table 'mysql.user' doesn't exist");
call mtr.add_suppression("'mysql.user' is not of type 'TABLE'");
rename table mysql.user to mysql.user1;
@@ -160,10 +161,12 @@ create temporary table mysql.user select * from mysql.user1 limit 0;
flush privileges;
drop temporary table mysql.user;
rename table mysql.user1 to mysql.user;
+source include/switch_to_mysql_global_priv.inc;
#
# Bug#28986737: RENAMING AND REPLACING MYSQL.USER TABLE CAN LEAD TO A SERVER CRASH
#
+source include/switch_to_mysql_user.inc;
call mtr.add_suppression('mysql.user table is damaged');
rename table mysql.user to mysql.user1;
create table mysql.user (Host char(100), User char(100));
@@ -171,6 +174,7 @@ create table mysql.user (Host char(100), User char(100));
flush privileges;
drop table mysql.user;
rename table mysql.user1 to mysql.user;
+source include/switch_to_mysql_global_priv.inc;
--echo End of 5.5 tests
diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result
index 83cd8677089..fa5a952a9c1 100644
--- a/mysql-test/main/grant5.result
+++ b/mysql-test/main/grant5.result
@@ -21,9 +21,9 @@ drop role foo;
CREATE TABLE t1 (a INT);
LOCK TABLE t1 WRITE;
REVOKE EXECUTE ON PROCEDURE sp FROM u;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'procs_priv' was not locked with LOCK TABLES
REVOKE PROCESS ON *.* FROM u;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
DROP TABLE t1;
create database mysqltest1;
use mysqltest1;
@@ -38,6 +38,9 @@ connection default;
disconnect u1;
drop user u1@localhost;
drop database mysqltest1;
+#
+# MDEV-22313: Neither SHOW CREATE USER nor SHOW GRANTS prints a user's default role
+#
CREATE ROLE test_role;
CREATE USER test_user;
GRANT test_role TO test_user;
@@ -52,22 +55,23 @@ SHOW GRANTS FOR test_user;
Grants for test_user@%
GRANT `test_role` TO `test_user`@`%`
GRANT USAGE ON *.* TO `test_user`@`%`
+connect test_user, localhost, test_user;
SET ROLE test_role;
SET DEFAULT ROLE test_role;
SHOW GRANTS;
-Grants for root@localhost
-GRANT `test_role` TO `root`@`localhost` WITH ADMIN OPTION
-GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
-GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+Grants for test_user@%
+GRANT `test_role` TO `test_user`@`%`
+GRANT USAGE ON *.* TO `test_user`@`%`
GRANT USAGE ON *.* TO `test_role`
-SET DEFAULT ROLE `test_role` FOR `root`@`localhost`
+SET DEFAULT ROLE `test_role` FOR `test_user`@`%`
SET DEFAULT ROLE NONE;
SHOW GRANTS;
-Grants for root@localhost
-GRANT `test_role` TO `root`@`localhost` WITH ADMIN OPTION
-GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
-GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+Grants for test_user@%
+GRANT `test_role` TO `test_user`@`%`
+GRANT USAGE ON *.* TO `test_user`@`%`
GRANT USAGE ON *.* TO `test_role`
+disconnect test_user;
+connection default;
DROP USER test_user;
DROP ROLE test_role;
#
@@ -170,7 +174,7 @@ drop user 'O\'Brien'@'localhost';
CREATE USER 'test-user';
CREATE ROLE `r``o'l"e`;
select user from mysql.user where is_role='Y';
-user
+User
r`o'l"e
GRANT `r``o'l"e` TO 'test-user';
SET DEFAULT ROLE `r``o'l"e` FOR 'test-user';
@@ -182,3 +186,132 @@ SET DEFAULT ROLE `r``o'l"e` FOR `test-user`@`%`
DROP ROLE `r``o'l"e`;
DROP USER 'test-user';
# End of 10.3 tests
+create user u1@h identified with 'mysql_native_password' using 'pwd';
+ERROR HY000: Password hash should be a 41-digit hexadecimal number
+create user u1@h identified with 'mysql_native_password' using password('pwd');
+create user u2@h identified with 'mysql_native_password' using '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD';
+create user u3@h identified with 'mysql_native_password';
+set password for u3@h = 'pwd';
+ERROR HY000: Password hash should be a 41-digit hexadecimal number
+set password for u3@h = password('pwd');
+create user u4@h identified with 'mysql_native_password';
+set password for u4@h = '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD';
+create user u5@h identified with 'mysql_old_password' using 'pwd';
+ERROR HY000: Password hash should be a 16-digit hexadecimal number
+create user u5@h identified with 'mysql_old_password' using password('pwd');
+create user u6@h identified with 'mysql_old_password' using '78a302dd267f6044';
+create user u7@h identified with 'mysql_old_password';
+set password for u7@h = 'pwd';
+ERROR HY000: Password hash should be a 41-digit hexadecimal number
+set password for u7@h = old_password('pwd');
+create user u8@h identified with 'mysql_old_password';
+set password for u8@h = '78a302dd267f6044';
+select user,host,plugin,authentication_string from mysql.user where host='h';
+User Host plugin authentication_string
+u1 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u2 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u3 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u4 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u5 h mysql_old_password 78a302dd267f6044
+u6 h mysql_old_password 78a302dd267f6044
+u7 h mysql_old_password 78a302dd267f6044
+u8 h mysql_old_password 78a302dd267f6044
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u1';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u5';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'nonexistent') where user='u8';
+flush privileges;
+show create user u1@h;
+CREATE USER for u1@h
+CREATE USER `u1`@`h` IDENTIFIED BY PASSWORD 'bad'
+show create user u2@h;
+CREATE USER for u2@h
+CREATE USER `u2`@`h` IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
+show create user u3@h;
+CREATE USER for u3@h
+CREATE USER `u3`@`h` IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
+show create user u4@h;
+CREATE USER for u4@h
+CREATE USER `u4`@`h` IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
+show create user u5@h;
+CREATE USER for u5@h
+CREATE USER `u5`@`h` IDENTIFIED BY PASSWORD 'bad'
+show create user u6@h;
+CREATE USER for u6@h
+CREATE USER `u6`@`h` IDENTIFIED BY PASSWORD '78a302dd267f6044'
+show create user u7@h;
+CREATE USER for u7@h
+CREATE USER `u7`@`h` IDENTIFIED BY PASSWORD '78a302dd267f6044'
+show create user u8@h;
+CREATE USER for u8@h
+CREATE USER `u8`@`h` IDENTIFIED VIA nonexistent USING '78a302dd267f6044'
+grant select on *.* to u1@h;
+grant select on *.* to u2@h;
+grant select on *.* to u3@h;
+grant select on *.* to u4@h;
+grant select on *.* to u5@h;
+grant select on *.* to u6@h;
+grant select on *.* to u7@h;
+grant select on *.* to u8@h;
+select user,select_priv,plugin,authentication_string from mysql.user where user like 'u_';
+User Select_priv plugin authentication_string
+u1 Y mysql_native_password bad
+u2 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u3 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u4 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u5 Y mysql_old_password bad
+u6 Y mysql_old_password 78a302dd267f6044
+u7 Y mysql_old_password 78a302dd267f6044
+u8 Y nonexistent 78a302dd267f6044
+drop user u1@h, u2@h, u3@h, u4@h, u5@h, u6@h, u7@h, u8@h;
+create database mysqltest_1;
+create user twg@'%' identified by 'test';
+create table mysqltest_1.t1(id int);
+grant create, drop on `mysqltest_1%`.* to twg@'%';
+grant all privileges on `mysqltest_1`.* to twg@'%';
+connect conn1,localhost,twg,test,mysqltest_1;
+insert into t1 values(1);
+disconnect conn1;
+connection default;
+revoke all privileges, grant option from twg@'%';
+grant create, drop on `mysqlt%`.* to twg@'%';
+grant all privileges on `mysqlt%1`.* to twg@'%';
+connect conn1,localhost,twg,test,mysqltest_1;
+insert into t1 values(1);
+disconnect conn1;
+connection default;
+revoke all privileges, grant option from twg@'%';
+grant create, drop on `mysqlt%`.* to twg@'%';
+grant all privileges on `%mysqltest_1`.* to twg@'%';
+connect conn1,localhost,twg,test,mysqltest_1;
+insert into t1 values(1);
+disconnect conn1;
+connection default;
+drop database mysqltest_1;
+drop user twg@'%';
+insert mysql.tables_priv (host,db,user,table_name,grantor,table_priv) values ('localhost','','otto','t1','root@localhost','select');
+flush privileges;
+delete from mysql.tables_priv where db='';
+create database db;
+create table db.t1 (a int);
+insert into db.t1 values (1);
+create user foo;
+grant delete on db.* to foo;
+connect con1,localhost,foo,,;
+show create table db.t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+delete from db.t1 returning *;
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'a' in table 't1'
+disconnect con1;
+connection default;
+drop database db;
+drop user foo;
+call mtr.add_suppression('mysql.host table is damaged');
+create table mysql.host (c1 int);
+insert mysql.host values (1);
+flush privileges;
+ERROR HY000: Fatal error: mysql.host table is damaged or in unsupported 3.20 format
+drop table mysql.host;
+# End of 10.4 tests
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index bd711640acb..0b4a63ab075 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -51,9 +51,9 @@ disconnect u1;
drop user u1@localhost;
drop database mysqltest1;
-#
-# MDEV-22313: Neither SHOW CREATE USER nor SHOW GRANTS prints a user's default role
-#
+--echo #
+--echo # MDEV-22313: Neither SHOW CREATE USER nor SHOW GRANTS prints a user's default role
+--echo #
CREATE ROLE test_role;
CREATE USER test_user;
GRANT test_role TO test_user;
@@ -61,11 +61,14 @@ SET DEFAULT ROLE test_role FOR test_user;
SHOW GRANTS FOR test_user;
SET DEFAULT ROLE NONE for test_user;
SHOW GRANTS FOR test_user;
+connect test_user, localhost, test_user;
SET ROLE test_role;
SET DEFAULT ROLE test_role;
SHOW GRANTS;
SET DEFAULT ROLE NONE;
SHOW GRANTS;
+disconnect test_user;
+connection default;
DROP USER test_user;
DROP ROLE test_role;
@@ -136,3 +139,130 @@ DROP ROLE `r``o'l"e`;
DROP USER 'test-user';
--echo # End of 10.3 tests
+
+#
+# MDEV-12321 authentication plugin: SET PASSWORD support
+#
+error ER_PASSWD_LENGTH;
+create user u1@h identified with 'mysql_native_password' using 'pwd';
+create user u1@h identified with 'mysql_native_password' using password('pwd');
+let p=`select password('pwd')`;
+eval create user u2@h identified with 'mysql_native_password' using '$p';
+create user u3@h identified with 'mysql_native_password';
+error ER_PASSWD_LENGTH;
+set password for u3@h = 'pwd';
+set password for u3@h = password('pwd');
+create user u4@h identified with 'mysql_native_password';
+eval set password for u4@h = '$p';
+error ER_PASSWD_LENGTH;
+create user u5@h identified with 'mysql_old_password' using 'pwd';
+create user u5@h identified with 'mysql_old_password' using password('pwd');
+let p=`select old_password('pwd')`;
+eval create user u6@h identified with 'mysql_old_password' using '$p';
+create user u7@h identified with 'mysql_old_password';
+error ER_PASSWD_LENGTH;
+set password for u7@h = 'pwd';
+set password for u7@h = old_password('pwd');
+create user u8@h identified with 'mysql_old_password';
+eval set password for u8@h = '$p';
+sorted_result;
+select user,host,plugin,authentication_string from mysql.user where host='h';
+# test with invalid entries
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u1';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u5';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'nonexistent') where user='u8';
+flush privileges;
+show create user u1@h;
+show create user u2@h;
+show create user u3@h;
+show create user u4@h;
+show create user u5@h;
+show create user u6@h;
+show create user u7@h;
+show create user u8@h;
+grant select on *.* to u1@h;
+grant select on *.* to u2@h;
+grant select on *.* to u3@h;
+grant select on *.* to u4@h;
+grant select on *.* to u5@h;
+grant select on *.* to u6@h;
+grant select on *.* to u7@h;
+grant select on *.* to u8@h;
+select user,select_priv,plugin,authentication_string from mysql.user where user like 'u_';
+
+# but they still can be dropped
+drop user u1@h, u2@h, u3@h, u4@h, u5@h, u6@h, u7@h, u8@h;
+
+#
+# MDEV-14735 better matching order for grants
+# MDEV-14732 mysql.db privileges evaluated on order of grants rather than hierarchically
+# MDEV-8269 Correct fix for Bug #20181776 :- ACCESS CONTROL DOESN'T MATCH MOST SPECIFIC HOST WHEN IT CONTAINS WILDCARD
+#
+create database mysqltest_1;
+create user twg@'%' identified by 'test';
+create table mysqltest_1.t1(id int);
+
+# MDEV-14732 test case
+grant create, drop on `mysqltest_1%`.* to twg@'%';
+grant all privileges on `mysqltest_1`.* to twg@'%';
+connect conn1,localhost,twg,test,mysqltest_1;
+insert into t1 values(1);
+disconnect conn1;
+connection default;
+
+# prefix%suffix
+revoke all privileges, grant option from twg@'%';
+grant create, drop on `mysqlt%`.* to twg@'%';
+grant all privileges on `mysqlt%1`.* to twg@'%';
+connect conn1,localhost,twg,test,mysqltest_1;
+insert into t1 values(1);
+disconnect conn1;
+connection default;
+
+# more specific can even have a shorter prefix
+revoke all privileges, grant option from twg@'%';
+grant create, drop on `mysqlt%`.* to twg@'%';
+grant all privileges on `%mysqltest_1`.* to twg@'%';
+connect conn1,localhost,twg,test,mysqltest_1;
+insert into t1 values(1);
+disconnect conn1;
+connection default;
+
+drop database mysqltest_1;
+drop user twg@'%';
+
+#
+# test the empty db case
+#
+insert mysql.tables_priv (host,db,user,table_name,grantor,table_priv) values ('localhost','','otto','t1','root@localhost','select');
+flush privileges;
+delete from mysql.tables_priv where db='';
+
+#
+# MDEV-21560 Assertion `grant_table || grant_table_role' failed in check_grant_all_columns
+#
+create database db;
+create table db.t1 (a int);
+insert into db.t1 values (1);
+create user foo;
+grant delete on db.* to foo;
+--connect (con1,localhost,foo,,)
+show create table db.t1;
+--error ER_COLUMNACCESS_DENIED_ERROR
+delete from db.t1 returning *;
+--disconnect con1
+--connection default
+drop database db;
+drop user foo;
+
+#
+# MDEV-23009 SIGSEGV in get_field from acl_load (on optimized builds)
+#
+call mtr.add_suppression('mysql.host table is damaged');
+create table mysql.host (c1 int);
+insert mysql.host values (1);
+--error ER_UNKNOWN_ERROR
+flush privileges;
+drop table mysql.host;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/grant_4332.result b/mysql-test/main/grant_4332.result
index b62ca1a20cc..7fc29795b6f 100644
--- a/mysql-test/main/grant_4332.result
+++ b/mysql-test/main/grant_4332.result
@@ -1,5 +1,6 @@
-set GLOBAL sql_mode="";
-set LOCAL sql_mode="";
+# switching from mysql.global_priv to mysql.user
+set global sql_mode="";
+set local sql_mode="";
alter table mysql.user modify User char(16) binary not null default '';
alter table mysql.db modify User char(16) binary not null default '';
alter table mysql.tables_priv modify User char(16) binary not null default '';
@@ -32,4 +33,5 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def user() 253 141 14 N 1 39 8
user()
root@localhost
-set GLOBAL sql_mode=default;
+set global sql_mode=default;
+# switching back from mysql.user to mysql.global_priv
diff --git a/mysql-test/main/grant_4332.test b/mysql-test/main/grant_4332.test
index 41e0b822f98..f723e4afe44 100644
--- a/mysql-test/main/grant_4332.test
+++ b/mysql-test/main/grant_4332.test
@@ -6,8 +6,9 @@
#
--source include/not_embedded.inc
-set GLOBAL sql_mode="";
-set LOCAL sql_mode="";
+--source include/switch_to_mysql_user.inc
+set global sql_mode="";
+set local sql_mode="";
alter table mysql.user modify User char(16) binary not null default '';
alter table mysql.db modify User char(16) binary not null default '';
@@ -42,4 +43,5 @@ flush privileges;
select user();
--disable_metadata
-set GLOBAL sql_mode=default;
+set global sql_mode=default;
+--source include/switch_to_mysql_global_priv.inc
diff --git a/mysql-test/main/grant_lowercase.result b/mysql-test/main/grant_lowercase.result
index 997ae20c8fb..0686977f55f 100644
--- a/mysql-test/main/grant_lowercase.result
+++ b/mysql-test/main/grant_lowercase.result
@@ -9,17 +9,11 @@ connection default;
disconnect conn1;
drop user user1@localhost;
call mtr.add_suppression("Incorrect database name");
-alter table mysql.host modify Db varchar(200);
alter table mysql.db modify User char(16) default "", modify Db varchar(200) default "";
-insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200));
-Warnings:
-Warning 1265 Data truncated for column 'Db' at row 1
insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200));
Warnings:
Warning 1265 Data truncated for column 'Db' at row 1
flush privileges;
-delete from mysql.host where db like '=>%';
delete from mysql.db where db like '=>%';
-alter table mysql.host modify Db char(64) default "";
alter table mysql.db modify Db char(64) default "", modify User char(80) default "";
flush privileges;
diff --git a/mysql-test/main/grant_lowercase.test b/mysql-test/main/grant_lowercase.test
index e31a72b890e..ffd1d4682a0 100644
--- a/mysql-test/main/grant_lowercase.test
+++ b/mysql-test/main/grant_lowercase.test
@@ -18,13 +18,9 @@ drop user user1@localhost;
# in acl_load()
call mtr.add_suppression("Incorrect database name");
-alter table mysql.host modify Db varchar(200);
alter table mysql.db modify User char(16) default "", modify Db varchar(200) default "";
-insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200));
insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200));
flush privileges; # shouldn't crash here
-delete from mysql.host where db like '=>%';
delete from mysql.db where db like '=>%';
-alter table mysql.host modify Db char(64) default "";
alter table mysql.db modify Db char(64) default "", modify User char(80) default "";
flush privileges;
diff --git a/mysql-test/main/grant_repair.result b/mysql-test/main/grant_repair.result
new file mode 100644
index 00000000000..d97bcc38a08
--- /dev/null
+++ b/mysql-test/main/grant_repair.result
@@ -0,0 +1,9 @@
+call mtr.add_suppression("mysql.user");
+# switching from mysql.global_priv to mysql.user
+flush tables;
+flush privileges;
+Warnings:
+Error 145 Table './mysql/user' is marked as crashed and should be repaired
+Warning 1034 12544 clients are using or haven't closed the table properly
+Note 1034 Table is fixed
+# switching back from mysql.user to mysql.global_priv
diff --git a/mysql-test/main/grant_repair.test b/mysql-test/main/grant_repair.test
new file mode 100644
index 00000000000..f07e4df3ae6
--- /dev/null
+++ b/mysql-test/main/grant_repair.test
@@ -0,0 +1,21 @@
+#
+# MDEV-20257 Server crashes in Grant_table_base::init_read_record upon crash-upgrade
+#
+source include/not_embedded.inc;
+
+call mtr.add_suppression("mysql.user");
+source include/switch_to_mysql_user.inc;
+
+let mysql_datadir=`select @@datadir`;
+flush tables;
+perl;
+ $f=$ENV{mysql_datadir} . '/mysql/user.MAI';
+ sysopen F, $f, 2 or die "sysopen $f: $!";
+ # set the open_count to 1, "table was not closed properly"
+ sysseek F, 24, O_RDWR or die "sysseek: $!";
+ syswrite F, 1, 1 or die "syswrite: $!";
+EOF
+replace_result \\ /;
+flush privileges;
+
+source include/switch_to_mysql_global_priv.inc;
diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result
index 0dc9b518575..06138b3030c 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -524,7 +524,7 @@ b 1
drop table t1;
set big_tables=0;
SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=1;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(1,2),(3,1),(3,2),(2,2),(2,1);
create table t2 (a int not null, b int not null, key(a));
@@ -543,12 +543,12 @@ a b
3 1
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
-1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t2 ALL a NULL NULL NULL 4 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary
-1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t2 ALL a NULL NULL NULL 4 Using temporary
+1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
SET @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity,@@optimizer_switch=@save_optimizer_switch;
create table t1 (a int, b int);
@@ -1333,6 +1333,7 @@ INSERT INTO t1 SELECT a + 64,b FROM t1;
INSERT INTO t1 SELECT a + 128,b FROM t1 limit 16;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT a FROM t1 WHERE a < 2;
id select_type table type possible_keys key key_len ref rows Extra
@@ -2433,7 +2434,12 @@ a int,
b varchar(1),
KEY (b,a)
);
-INSERT INTO t1 VALUES (1,NULL),(0,'a'),(1,NULL),(0,'a');
+INSERT INTO t1 VALUES
+(1,NULL),(0,'a'),(1,NULL),(0,'a'), (1,'a'),(0,'a'),(2,'a'),(1,'a');
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT SQL_BUFFER_RESULT MIN(a), b FROM t1 WHERE t1.b = 'a' GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
@@ -2753,6 +2759,7 @@ create table t2 (c int, col1 int, key(c));
insert into t2 select t1.a, 100000 from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
explain
select
diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test
index 8d690222bcc..3ca518420a0 100644
--- a/mysql-test/main/group_by.test
+++ b/mysql-test/main/group_by.test
@@ -401,7 +401,7 @@ set big_tables=0;
#
SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=1;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
create table t1 (a int not null, b int not null);
insert into t1 values (1,1),(1,2),(3,1),(3,2),(2,2),(2,1);
create table t2 (a int not null, b int not null, key(a));
@@ -1550,7 +1550,9 @@ CREATE TABLE t1 (
b varchar(1),
KEY (b,a)
);
-INSERT INTO t1 VALUES (1,NULL),(0,'a'),(1,NULL),(0,'a');
+INSERT INTO t1 VALUES
+ (1,NULL),(0,'a'),(1,NULL),(0,'a'), (1,'a'),(0,'a'),(2,'a'),(1,'a');
+ANALYZE TABLE t1;
let $query=
SELECT SQL_BUFFER_RESULT MIN(a), b FROM t1 WHERE t1.b = 'a' GROUP BY b;
diff --git a/mysql-test/main/group_by_innodb.result b/mysql-test/main/group_by_innodb.result
index 034866b63d5..f935d4da45b 100644
--- a/mysql-test/main/group_by_innodb.result
+++ b/mysql-test/main/group_by_innodb.result
@@ -151,6 +151,7 @@ KEY idx3 (a, b)
INSERT INTO t1 (a, b) SELECT t01.a, t02.a FROM t0 t01, t0 t02;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT DISTINCT a, MAX(b) FROM t1 WHERE a >= 0 GROUP BY a,a;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/main/group_min_max.result b/mysql-test/main/group_min_max.result
index 611e74d7aa2..fd9b5be4260 100644
--- a/mysql-test/main/group_min_max.result
+++ b/mysql-test/main/group_min_max.result
@@ -40,6 +40,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
drop table if exists t2;
create table t2 (
@@ -68,6 +69,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
drop table if exists t3;
create table t3 (
@@ -130,6 +132,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1, min(a2) from t1 group by a1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -317,7 +320,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
explain select a1, max(c) from t1 where a1 in ('a','b','d') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 13 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t2 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -684,10 +687,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
@@ -804,10 +807,10 @@ b h212 e212
c h312 e312
explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 6 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
@@ -1653,7 +1656,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 Using where; Using index for group-by
explain select a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -1662,7 +1665,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
explain select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL # Using where; Using index
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
explain select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -1713,12 +1716,12 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain extended select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 50.78 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 0.38 Using where; Using index
Warnings:
Note 1003 select distinct `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where `test`.`t1`.`b` = 'a' and `test`.`t1`.`c` = 'i121' and `test`.`t1`.`a2` >= 'b'
explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 Using where; Using index for group-by
explain select distinct b from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
@@ -1730,7 +1733,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
explain extended select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 50.61 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 0.30 Using where; Using index
Warnings:
Note 1003 select distinct `test`.`t2`.`a1` AS `a1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where `test`.`t2`.`b` = 'a' and `test`.`t2`.`c` = 'i121' and `test`.`t2`.`a2` >= 'b'
explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
@@ -1864,7 +1867,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 Using where; Using index for group-by
explain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by; Using temporary; Using filesort
@@ -1876,7 +1879,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
explain select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL # Using where; Using index
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -1959,7 +1962,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by (scanning)
explain extended select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 100.00 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`) AS `count(distinct a1,a2,b)` from `test`.`t1` where `test`.`t1`.`b` = 'c' and `test`.`t1`.`a1` > 'a' and `test`.`t1`.`a2` > 'a'
explain select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a');
@@ -1967,7 +1970,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
explain extended select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 100.00 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 13 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select 98 + count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`) AS `98 + count(distinct a1,a2,b)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' and `test`.`t1`.`a2` > 'a'
select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
@@ -2075,19 +2078,19 @@ id select_type table type possible_keys key key_len ref rows Extra
explain extended select a1,a2,min(b),max(b) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 76 85.53 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 77 85.04 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,min(`test`.`t1`.`b`) AS `min(b)`,max(`test`.`t1`.`b`) AS `max(b)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`
explain extended select a1,a2,b,min(c),max(c) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 50.78 Using where; Using temporary; Using filesort
+1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 38.67 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,min(`test`.`t1`.`c`) AS `min(c)`,max(`test`.`t1`.`c`) AS `max(c)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain extended select a1,a2,b,c from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b,c;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 50.78 Using where; Using temporary; Using filesort
+1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 38.67 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`,`test`.`t1`.`c`
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b < 'b') group by a1;
@@ -2095,7 +2098,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain extended select a1,a2,b from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 76 85.53 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 77 85.04 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
@@ -2119,12 +2122,12 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using index
explain extended select a1,a2,count(a2) from t1 where (a1 > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 102 94.12 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 101 95.05 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,count(`test`.`t1`.`a2`) AS `count(a2)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain extended select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 102 94.12 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 101 95.05 Using where; Using index
Warnings:
Note 1003 select sum(ord(`test`.`t1`.`a1`)) AS `sum(ord(a1))` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
create table t4 as select distinct a1, a2, b, c from t1;
@@ -2225,7 +2228,7 @@ a
BB
EXPLAIN SELECT a FROM t1 WHERE a='AA' GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref PRIMARY PRIMARY 7 const 3 Using where; Using index
+1 SIMPLE t1 ref PRIMARY PRIMARY 7 const 4 Using where; Using index
EXPLAIN SELECT a FROM t1 WHERE a='BB' GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref PRIMARY PRIMARY 7 const 1 Using where; Using index
@@ -2281,9 +2284,16 @@ INSERT INTO t1 (a) VALUES
(''), ('CENTRAL'), ('EASTERN'), ('GREATER LONDON'),
('NORTH CENTRAL'), ('NORTH EAST'), ('NORTH WEST'), ('SCOTLAND'),
('SOUTH EAST'), ('SOUTH WEST'), ('WESTERN');
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT DISTINCT a,a FROM t1 ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 66 NULL 6 Using index for group-by
+1 SIMPLE t1 range NULL a 66 NULL 12 Using index for group-by
SELECT DISTINCT a,a FROM t1 ORDER BY a;
a a
@@ -2342,10 +2352,16 @@ id2 id3 id5 id4 id3 id6 id5 id1
1 1 1 1 1 1 1 1
DROP TABLE t1,t2,t3,t4,t5,t6;
CREATE TABLE t1 (a int, b int, KEY (a,b), KEY b (b));
-INSERT INTO t1 VALUES (1,1),(1,2),(1,0),(1,3);
+INSERT INTO t1 VALUES
+(1,1),(1,2),(1,0),(1,3),
+(1,-1),(1,-2),(1,-3),(1,-4);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a,b a 10 NULL 1 Using where; Using index for group-by
+1 SIMPLE t1 range a,b a 10 NULL 2 Using where; Using index for group-by
SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
MAX(b) a
1 1
@@ -2364,9 +2380,13 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by
+1 SIMPLE t1 index NULL a 10 NULL 15 Using index
FLUSH STATUS;
SELECT max(b), a FROM t1 GROUP BY a;
max(b) a
@@ -2376,18 +2396,18 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by
+1 SIMPLE t1 index NULL a 10 NULL 15 Using index
FLUSH STATUS;
CREATE TABLE t2 SELECT max(b), a FROM t1 GROUP BY a;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b;
@@ -2398,8 +2418,8 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
(SELECT max(b), a FROM t1 GROUP BY a) UNION
@@ -2411,20 +2431,20 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 16
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 30
Handler_read_retry 0
EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
(SELECT max(b), a FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range NULL a 5 NULL 8 Using index for group-by
-2 UNION t1 range NULL a 5 NULL 8 Using index for group-by
+1 PRIMARY t1 index NULL a 10 NULL 15 Using index
+2 UNION t1 index NULL a 10 NULL 15 Using index
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1 AS t1_outer;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
@@ -2434,38 +2454,38 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 8
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 2 Using index
-2 MATERIALIZED t1 range NULL a 5 NULL 8 Using index for group-by
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
+1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 3 Using index
+2 MATERIALIZED t1 range a a 5 NULL 2 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer range NULL a 5 NULL 8 Using index for group-by
-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
AND t1_outer1.b = t1_outer2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index
1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer (flat, BNL join)
-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using index
2 SUBQUERY t1_outer index NULL a 10 NULL 15 Using index
-3 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+3 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
CREATE TABLE t3 LIKE t1;
FLUSH STATUS;
INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 5
+Handler_read_next 15
Handler_read_retry 0
DELETE FROM t3;
FLUSH STATUS;
@@ -2473,15 +2493,15 @@ INSERT INTO t3 SELECT 1, (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2)
FROM t1 LIMIT 1;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
@@ -2489,17 +2509,21 @@ FROM t1) > 10000;
ERROR 21000: Subquery returns more than 1 row
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 1
+Handler_read_key 0
+Handler_read_next 16
Handler_read_retry 0
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (a int, INDEX idx(a));
INSERT INTO t1 VALUES
(4), (2), (1), (2), (4), (2), (1), (4),
(4), (2), (1), (2), (2), (4), (1), (4);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT DISTINCT(a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx 5 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL idx 5 NULL 4 Using index for group-by
SELECT DISTINCT(a) FROM t1;
a
1
@@ -2507,7 +2531,7 @@ a
4
EXPLAIN SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx 5 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL idx 5 NULL 4 Using index for group-by
SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
a
1
@@ -2515,19 +2539,23 @@ a
4
DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT);
-INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3);
+INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5);
INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
a MIN(b) MAX(b)
-4 1 3
-3 1 3
-2 1 3
-1 1 3
+4 1 5
+3 1 5
+2 1 5
+1 1 5
CREATE INDEX break_it ON t1 (a, b);
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
@@ -2535,30 +2563,30 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
a MIN(b) MAX(b)
-1 1 3
-2 1 3
-3 1 3
-4 1 3
+1 1 5
+2 1 5
+3 1 5
+4 1 5
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by; Using temporary; Using filesort
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
a MIN(b) MAX(b)
-4 1 3
-3 1 3
-2 1 3
-1 1 3
+4 1 5
+3 1 5
+2 1 5
+1 1 5
EXPLAIN
SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL break_it 10 NULL 12 Using index
+1 SIMPLE t1 index NULL break_it 10 NULL 20 Using index
SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
a MIN(b) MAX(b) AVG(b)
-4 1 3 2.0000
-3 1 3 2.0000
-2 1 3 2.0000
-1 1 3 2.0000
+4 1 5 3.0000
+3 1 5 3.0000
+2 1 5 3.0000
+1 1 5 3.0000
DROP TABLE t1;
create table t1 (a int, b int, key (a,b), key `index` (a,b)) engine=MyISAM;
Warnings:
@@ -2644,9 +2672,13 @@ INSERT INTO t1 VALUES (1, 1, 1, 1), (1, 1, 1, 2), (1, 1, 1, 3), (1, 1, 1, 4);
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a,b,c+1,d FROM t1;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT DISTINCT c FROM t1 WHERE d=4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL foo 10 NULL 9 Using where; Using index for group-by
+1 SIMPLE t1 range NULL foo 10 NULL 3 Using where; Using index for group-by
SELECT DISTINCT c FROM t1 WHERE d=4;
c
1
@@ -2660,12 +2692,16 @@ CREATE TABLE t (a INT, b INT, INDEX (a,b));
INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
+ANALYZE TABLE t;
+Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze status OK
# test MIN
#should use range with index for group by
EXPLAIN
SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range NULL a 10 NULL 9 Using where; Using index for group-by
+1 SIMPLE t range NULL a 10 NULL 2 Using where; Using index for group-by
#should return 1 row
SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a;
a MIN(b)
@@ -2675,7 +2711,7 @@ a MIN(b)
EXPLAIN
SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range NULL a 10 NULL 9 Using where; Using index for group-by
+1 SIMPLE t range NULL a 10 NULL 2 Using where; Using index for group-by
#should return 1 row
SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a;
a MAX(b)
@@ -2686,7 +2722,7 @@ INSERT INTO t SELECT a, 2 FROM t;
EXPLAIN
SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range NULL a 10 NULL 9 Using where; Using index for group-by
+1 SIMPLE t range NULL a 10 NULL 2 Using where; Using index for group-by
#should return 1 row
SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
a MAX(b)
@@ -2719,6 +2755,7 @@ CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL, KEY (b));
INSERT INTO t1 VALUES(1,1),(2,1);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT 1 AS c, b FROM t1 WHERE b IN (1,2) GROUP BY c, b;
c b
@@ -2903,7 +2940,7 @@ NULL
EXPLAIN
SELECT MIN( a ) FROM t1 WHERE a <> NULL;
id select_type table type possible_keys key key_len ref rows Extra
-x x x x x x x x x Impossible WHERE noticed after reading const tables
+x x x x x x x x x Using where; Using index
SELECT MIN( a ) FROM t1 WHERE a <> NULL;
MIN( a )
NULL
@@ -3295,10 +3332,16 @@ INSERT INTO t1 VALUES (0,99),(9,99),(4,0),(7,0),(99,0),(7,0),(8,0),(99,0),(1,0);
INSERT INTO t1 VALUES (0,99),(9,99),(4,0),(7,0),(99,0),(7,0),(8,0),(99,0),(1,0);
CREATE TABLE t2 (c int) ;
INSERT INTO t2 VALUES (0),(1);
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT MIN(a), b FROM t1 WHERE a > 0 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL b 10 NULL 10 Using where; Using index for group-by
+1 SIMPLE t1 range NULL b 10 NULL 3 Using where; Using index for group-by
SELECT MIN(a), b FROM t1 WHERE a > 0 GROUP BY b;
MIN(a) b
1 0
@@ -3306,7 +3349,7 @@ MIN(a) b
EXPLAIN
SELECT MIN(a), b FROM t1 WHERE a > ( SELECT c FROM t2 WHERE c = 0 ) GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range NULL b 10 NULL 10 Using where; Using index for group-by
+1 PRIMARY t1 range NULL b 10 NULL 3 Using where; Using index for group-by
2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
SELECT MIN(a), b FROM t1 WHERE a > ( SELECT c FROM t2 WHERE c = 0 ) GROUP BY b;
MIN(a) b
@@ -3330,54 +3373,68 @@ End of 5.3 tests
#
CREATE TABLE t1 (a INT, b INT, c INT, KEY (a,b));
INSERT INTO t1 VALUES (1,1,1), (1,2,1), (1,3,1), (1,4,1);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a, b + 4, 1 FROM t1;
+INSERT INTO t1 SELECT a, b + 8, 1 FROM t1;
INSERT INTO t1 SELECT a + 1, b, 1 FROM t1;
CREATE TABLE t2 (a INT, b INT, c INT, d INT, e INT, f INT, KEY (a,b,c));
-INSERT INTO t2 VALUES (1,1,1,1,1,1), (1,2,1,1,1,1), (1,3,1,1,1,1),
-(1,4,1,1,1,1);
+INSERT INTO t2 VALUES
+(1,1,1,1,1,1), (1,2,1,1,1,1), (1,3,1,1,1,1), (1,4,1,1,1,1);
+INSERT INTO t2 SELECT * FROM t2;
+INSERT INTO t2 SELECT * FROM t2;
+INSERT INTO t2 SELECT * FROM t2;
+INSERT INTO t2 SELECT * FROM t2;
INSERT INTO t2 SELECT a, b + 4, c,d,e,f FROM t2;
INSERT INTO t2 SELECT a + 1, b, c,d,e,f FROM t2;
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a) FROM t1;
COUNT(DISTINCT a)
2
EXPLAIN SELECT COUNT(DISTINCT a,b) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 33 Using index for group-by
SELECT COUNT(DISTINCT a,b) FROM t1;
COUNT(DISTINCT a,b)
-16
+32
EXPLAIN SELECT COUNT(DISTINCT b,a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 33 Using index for group-by
SELECT COUNT(DISTINCT b,a) FROM t1;
COUNT(DISTINCT b,a)
-16
+32
EXPLAIN SELECT COUNT(DISTINCT b) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 16 Using index
+1 SIMPLE t1 index NULL a 10 NULL 256 Using index
SELECT COUNT(DISTINCT b) FROM t1;
COUNT(DISTINCT b)
-8
+16
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a;
COUNT(DISTINCT a)
1
1
EXPLAIN SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 33 Using index for group-by
SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a;
COUNT(DISTINCT b)
-8
-8
+16
+16
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 16 Using index; Using filesort
+1 SIMPLE t1 index NULL a 10 NULL 256 Using index; Using filesort
SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b;
COUNT(DISTINCT a)
2
@@ -3388,96 +3445,103 @@ COUNT(DISTINCT a)
2
2
2
+2
+2
+2
+2
+2
+2
+2
+2
EXPLAIN SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 16 Using index
+1 SIMPLE t1 index NULL a 10 NULL 256 Using index
SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
COUNT(DISTINCT a)
2
EXPLAIN SELECT COUNT(DISTINCT a, b + 0) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 16 Using index
+1 SIMPLE t1 index NULL a 10 NULL 256 Using index
SELECT COUNT(DISTINCT a, b + 0) FROM t1;
COUNT(DISTINCT a, b + 0)
-16
+32
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 16 Using index
+1 SIMPLE t1 index NULL a 10 NULL 256 Using index
SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10;
COUNT(DISTINCT a)
-2
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16
+1 SIMPLE t1 ALL NULL NULL NULL NULL 256
SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10;
COUNT(DISTINCT a)
2
EXPLAIN SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10;
1
1
EXPLAIN SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 33 Using index for group-by
SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1;
1
1
1
EXPLAIN SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1_1 index NULL a 10 NULL 16 Using index; Using temporary; Using filesort
-1 SIMPLE t1_2 index NULL a 10 NULL 16 Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t1_1 index NULL a 10 NULL 256 Using index; Using temporary; Using filesort
+1 SIMPLE t1_2 index NULL a 10 NULL 256 Using index; Using join buffer (flat, BNL join)
SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a;
COUNT(DISTINCT t1_1.a)
1
1
EXPLAIN SELECT COUNT(DISTINCT a), 12 FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a), 12 FROM t1;
COUNT(DISTINCT a) 12
2 12
EXPLAIN SELECT COUNT(DISTINCT a, b, c) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 9 Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT a, b, c) FROM t2;
COUNT(DISTINCT a, b, c)
16
EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by
+1 SIMPLE t2 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2;
COUNT(DISTINCT a) SUM(DISTINCT a) AVG(DISTINCT a)
2 3 1.5000
EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 16
+1 SIMPLE t2 ALL NULL NULL NULL NULL 256
SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2;
COUNT(DISTINCT a) SUM(DISTINCT a) AVG(DISTINCT f)
2 3 1.0000
EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by
+1 SIMPLE t2 range NULL a 10 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2;
COUNT(DISTINCT a, b) COUNT(DISTINCT b, a)
16 16
EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 16
+1 SIMPLE t2 ALL NULL NULL NULL NULL 256
SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2;
COUNT(DISTINCT a, b) COUNT(DISTINCT b, f)
16 8
EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 16
+1 SIMPLE t2 ALL NULL NULL NULL NULL 256
SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2;
COUNT(DISTINCT a, b) COUNT(DISTINCT b, d)
16 8
EXPLAIN SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 9 Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 17 Using index for group-by
SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c;
a c COUNT(DISTINCT c, a, b)
1 1 1
@@ -3499,7 +3563,7 @@ a c COUNT(DISTINCT c, a, b)
EXPLAIN SELECT COUNT(DISTINCT c, a, b) FROM t2
WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 15 NULL 1 Using where; Using index for group-by
+1 SIMPLE t2 range a a 5 NULL 1 Using where; Using index
SELECT COUNT(DISTINCT c, a, b) FROM t2
WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c;
COUNT(DISTINCT c, a, b)
@@ -3512,47 +3576,47 @@ GROUP BY b;
COUNT(DISTINCT b) SUM(DISTINCT b)
EXPLAIN SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by
+1 SIMPLE t2 range NULL a 10 NULL 17 Using index for group-by
SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
a COUNT(DISTINCT b) SUM(DISTINCT b)
1 8 36
2 8 36
EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by
+1 SIMPLE t2 range NULL a 10 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
COUNT(DISTINCT b) SUM(DISTINCT b)
8 36
8 36
EXPLAIN SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where
+1 SIMPLE t2 ALL NULL NULL NULL NULL 256 Using where
SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42;
COUNT(DISTINCT a, b)
0
EXPLAIN SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2
WHERE b = 13 AND c = 42 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 9 Using where; Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 3 Using where; Using index for group-by
SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2
WHERE b = 13 AND c = 42 GROUP BY a;
a COUNT(DISTINCT a) SUM(DISTINCT a)
EXPLAIN SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL a 15 NULL 16 Using where; Using index
+1 SIMPLE t2 index NULL a 15 NULL 256 Using where; Using index
SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42;
COUNT(DISTINCT a, b) SUM(DISTINCT a)
0 NULL
EXPLAIN SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL a 15 NULL 16 Using index
+1 SIMPLE t2 index NULL a 15 NULL 256 Using index
SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
SUM(DISTINCT a) MAX(b)
1 8
2 8
EXPLAIN SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 9 Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 17 Using index for group-by
SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
42 * (a + c + COUNT(DISTINCT c, a, b))
126
@@ -3573,7 +3637,7 @@ SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
168
EXPLAIN SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL a 15 NULL 16 Using index
+1 SIMPLE t2 index NULL a 15 NULL 256 Using index
SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
(SUM(DISTINCT a) + MAX(b))
9
@@ -3609,6 +3673,7 @@ CREATE TABLE t (a INT, b INT, KEY(a,b));
INSERT INTO t VALUES (1,1), (2,2), (3,3), (4,4), (1,0), (3,2), (4,5);
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
a SUM(DISTINCT a) MIN(b)
@@ -3682,8 +3747,13 @@ b c
drop table faulty;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3);
+INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
CREATE INDEX break_it ON t1 (a, b);
EXPLAIN
SELECT distinct a, b FROM t1 where a = '3' ORDER BY b;
@@ -3739,24 +3809,29 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT,c INT DEFAULT 0, INDEX (a,b));
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+INSERT INTO t1 SELECT * FROM t1;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @save_use_stat_tables= @@use_stat_tables;
set @@optimizer_use_condition_selectivity=4;
set @@use_stat_tables=PREFERABLY;
explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 8 100.00
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 2 100.00 Using index
-2 MATERIALIZED t1 range NULL a 5 NULL 8 100.00 Using index for group-by
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 5 100.00
+1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 7 100.00 Using index
+2 MATERIALIZED t1 range NULL a 5 NULL 5 100.00 Using index for group-by
Warnings:
Note 1003 /* select#1 */ select `test`.`t1_outer`.`a` AS `a` from <materialize> (/* select#2 */ select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where `test`.`t1_outer`.`a` = `<subquery2>`.`max(b)`
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set @@use_stat_tables=@save_use_stat_tables;
explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 8 100.00
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 2 100.00 Using index
-2 MATERIALIZED t1 range NULL a 5 NULL 8 100.00 Using index for group-by
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 5 100.00
+1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 7 100.00 Using index
+2 MATERIALIZED t1 range NULL a 5 NULL 5 100.00 Using index for group-by
Warnings:
Note 1003 /* select#1 */ select `test`.`t1_outer`.`a` AS `a` from <materialize> (/* select#2 */ select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where `test`.`t1_outer`.`a` = `<subquery2>`.`max(b)`
drop table t1;
@@ -3786,15 +3861,19 @@ INSERT INTO t1 VALUES (4,'2001-01-01');
INSERT INTO t1 VALUES (4,'2001-01-02');
INSERT INTO t1 VALUES (4,'2001-01-03');
INSERT INTO t1 VALUES (4,'2001-01-04');
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>='2001-01-04' GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL id 8 NULL 9 Using where; Using index for group-by
+1 SIMPLE t1 range NULL id 8 NULL 5 Using where; Using index for group-by
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104.0 GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL id 8 NULL 9 Using where; Using index for group-by
+1 SIMPLE t1 range NULL id 8 NULL 5 Using where; Using index for group-by
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL id 8 NULL 9 Using where; Using index for group-by
+1 SIMPLE t1 range NULL id 8 NULL 5 Using where; Using index for group-by
SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>='2001-01-04' GROUP BY id;
id MIN(a) MAX(a)
1 2001-01-04 2001-01-04
@@ -3835,6 +3914,12 @@ INSERT INTO t1 VALUES (4,'2001-01-01');
INSERT INTO t1 VALUES (4,'2001-01-02');
INSERT INTO t1 VALUES (4,'2001-01-03');
INSERT INTO t1 VALUES (4,' 2001-01-04');
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN ' 2001-01-04' AND '2001-01-05' GROUP BY id;
id MIN(a) MAX(a)
1 2001-01-04 2001-01-03
@@ -3890,19 +3975,19 @@ id MIN(a) MAX(a)
4 2001-01-04 2001-01-04
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN ' 2001-01-04' AND '2001-01-05' GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL id 27 NULL 9 Using where; Using index for group-by
+1 SIMPLE t1 range NULL id 27 NULL 10 Using where; Using index for group-by
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN '2001-01-04' AND '2001-01-05' GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL id 27 NULL 9 Using where; Using index for group-by
+1 SIMPLE t1 range NULL id 27 NULL 10 Using where; Using index for group-by
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN DATE'2001-01-04' AND DATE'2001-01-05' GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL id 27 NULL 16 Using where; Using index
+1 SIMPLE t1 index NULL id 27 NULL 64 Using where; Using index
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN DATE'2001-01-04' AND '2001-01-05' GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL id 27 NULL 16 Using where; Using index
+1 SIMPLE t1 index NULL id 27 NULL 64 Using where; Using index
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN '2001-01-04' AND DATE'2001-01-05' GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL id 27 NULL 16 Using where; Using index
+1 SIMPLE t1 index NULL id 27 NULL 64 Using where; Using index
DROP TABLE t1;
#
# MIN() optimization didn't work correctly with BETWEEN when using too
diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test
index 7cea21df56b..0dc7ea2fee7 100644
--- a/mysql-test/main/group_min_max.test
+++ b/mysql-test/main/group_min_max.test
@@ -837,6 +837,10 @@ INSERT INTO t1 (a) VALUES
(''), ('CENTRAL'), ('EASTERN'), ('GREATER LONDON'),
('NORTH CENTRAL'), ('NORTH EAST'), ('NORTH WEST'), ('SCOTLAND'),
('SOUTH EAST'), ('SOUTH WEST'), ('WESTERN');
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ANALYZE TABLE t1;
EXPLAIN SELECT DISTINCT a,a FROM t1 ORDER BY a;
SELECT DISTINCT a,a FROM t1 ORDER BY a;
@@ -895,7 +899,10 @@ DROP TABLE t1,t2,t3,t4,t5,t6;
# Bug#22342: No results returned for query using max and group by
#
CREATE TABLE t1 (a int, b int, KEY (a,b), KEY b (b));
-INSERT INTO t1 VALUES (1,1),(1,2),(1,0),(1,3);
+INSERT INTO t1 VALUES
+ (1,1),(1,2),(1,0),(1,3),
+ (1,-1),(1,-2),(1,-3),(1,-4);
+ANALYZE TABLE t1;
explain SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
@@ -914,6 +921,7 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+ANALYZE TABLE t1;
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
FLUSH STATUS;
SELECT max(b), a FROM t1 GROUP BY a;
@@ -977,6 +985,7 @@ CREATE TABLE t1 (a int, INDEX idx(a));
INSERT INTO t1 VALUES
(4), (2), (1), (2), (4), (2), (1), (4),
(4), (2), (1), (2), (2), (4), (1), (4);
+ANALYZE TABLE t1;
EXPLAIN SELECT DISTINCT(a) FROM t1;
SELECT DISTINCT(a) FROM t1;
@@ -990,9 +999,10 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a INT, b INT);
-INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3);
+INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5);
INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
+ANALYZE TABLE t1;
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
@@ -1046,6 +1056,7 @@ INSERT INTO t1 VALUES (1, 1, 1, 1), (1, 1, 1, 2), (1, 1, 1, 3), (1, 1, 1, 4);
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a,b,c+1,d FROM t1;
+ANALYZE TABLE t1;
#Should be non-empty
EXPLAIN SELECT DISTINCT c FROM t1 WHERE d=4;
@@ -1062,6 +1073,7 @@ CREATE TABLE t (a INT, b INT, INDEX (a,b));
INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
+ANALYZE TABLE t;
--echo # test MIN
--echo #should use range with index for group by
@@ -1264,6 +1276,7 @@ INSERT INTO t1 VALUES (0,99),(9,99),(4,0),(7,0),(99,0),(7,0),(8,0),(99,0),(1,0);
INSERT INTO t1 VALUES (0,99),(9,99),(4,0),(7,0),(99,0),(7,0),(8,0),(99,0),(1,0);
CREATE TABLE t2 (c int) ;
INSERT INTO t2 VALUES (0),(1);
+ANALYZE TABLE t1,t2;
EXPLAIN
SELECT MIN(a), b FROM t1 WHERE a > 0 GROUP BY b;
@@ -1286,13 +1299,22 @@ drop table t1, t2;
CREATE TABLE t1 (a INT, b INT, c INT, KEY (a,b));
INSERT INTO t1 VALUES (1,1,1), (1,2,1), (1,3,1), (1,4,1);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a, b + 4, 1 FROM t1;
+INSERT INTO t1 SELECT a, b + 8, 1 FROM t1;
INSERT INTO t1 SELECT a + 1, b, 1 FROM t1;
CREATE TABLE t2 (a INT, b INT, c INT, d INT, e INT, f INT, KEY (a,b,c));
-INSERT INTO t2 VALUES (1,1,1,1,1,1), (1,2,1,1,1,1), (1,3,1,1,1,1),
- (1,4,1,1,1,1);
+INSERT INTO t2 VALUES
+ (1,1,1,1,1,1), (1,2,1,1,1,1), (1,3,1,1,1,1), (1,4,1,1,1,1);
+INSERT INTO t2 SELECT * FROM t2;
+INSERT INTO t2 SELECT * FROM t2;
+INSERT INTO t2 SELECT * FROM t2;
+INSERT INTO t2 SELECT * FROM t2;
INSERT INTO t2 SELECT a, b + 4, c,d,e,f FROM t2;
INSERT INTO t2 SELECT a + 1, b, c,d,e,f FROM t2;
+ANALYZE TABLE t1,t2;
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1;
SELECT COUNT(DISTINCT a) FROM t1;
@@ -1481,8 +1503,10 @@ drop table faulty;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3);
+INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
+ANALYZE TABLE t1;
CREATE INDEX break_it ON t1 (a, b);
@@ -1529,6 +1553,8 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT,c INT DEFAULT 0, INDEX (a,b));
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+INSERT INTO t1 SELECT * FROM t1;
+ANALYZE TABLE t1;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @save_use_stat_tables= @@use_stat_tables;
set @@optimizer_use_condition_selectivity=4;
@@ -1568,6 +1594,7 @@ INSERT INTO t1 VALUES (4,'2001-01-01');
INSERT INTO t1 VALUES (4,'2001-01-02');
INSERT INTO t1 VALUES (4,'2001-01-03');
INSERT INTO t1 VALUES (4,'2001-01-04');
+ANALYZE TABLE t1;
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>='2001-01-04' GROUP BY id;
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104.0 GROUP BY id;
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id;
@@ -1597,6 +1624,9 @@ INSERT INTO t1 VALUES (4,'2001-01-01');
INSERT INTO t1 VALUES (4,'2001-01-02');
INSERT INTO t1 VALUES (4,'2001-01-03');
INSERT INTO t1 VALUES (4,' 2001-01-04');
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ANALYZE TABLE t1;
SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN ' 2001-01-04' AND '2001-01-05' GROUP BY id;
SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN '2001-01-04' AND '2001-01-05' GROUP BY id;
SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN DATE'2001-01-04' AND DATE'2001-01-05' GROUP BY id;
diff --git a/mysql-test/main/group_min_max_innodb.result b/mysql-test/main/group_min_max_innodb.result
index 311032bc453..3586ad5237f 100644
--- a/mysql-test/main/group_min_max_innodb.result
+++ b/mysql-test/main/group_min_max_innodb.result
@@ -1,3 +1,8 @@
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
drop view if exists v1;
drop table if exists t1,t4;
create table t4 (
@@ -41,6 +46,7 @@ create index idx12672_1 on t4 (a1,a2,b,c);
create index idx12672_2 on t4 (a1,a2,b);
analyze table t4;
Table Op Msg_type Msg_text
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
select distinct a1 from t4 where pk_col not in (1,2,3,4);
a1
@@ -194,7 +200,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
GROUP BY c1,i1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range k2 k2 5 NULL 60 Using where; Using index
+1 SIMPLE t2 range k2 k2 9 NULL 60 Using where; Using index for group-by
SELECT c1, i1, max(i2) FROM t2
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
GROUP BY c1,i1;
@@ -205,7 +211,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
GROUP BY c1,i1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range k2 k2 5 NULL 60 Using where; Using index
+1 SIMPLE t2 range k2 k2 9 NULL 60 Using where; Using index for group-by
SELECT c1, i1, max(i2) FROM t2
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
GROUP BY c1,i1;
@@ -302,3 +308,6 @@ NULL bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
NULL aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
NULL aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
drop table t1,t2;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/group_min_max_innodb.test b/mysql-test/main/group_min_max_innodb.test
index 91e0bd3279f..87a6e320887 100644
--- a/mysql-test/main/group_min_max_innodb.test
+++ b/mysql-test/main/group_min_max_innodb.test
@@ -6,6 +6,13 @@
--source include/have_innodb.inc
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
--disable_warnings
drop view if exists v1;
drop table if exists t1,t4;
@@ -243,3 +250,8 @@ CREATE TABLE t2 (`voter_id` int(10) unsigned NOT NULL DEFAULT '0',
insert into t2 values (1,repeat("a",1000)),(2,repeat("a",1000)),(3,repeat("b",1000)),(4,repeat("c",1000)),(4,repeat("b",1000));
SELECT GROUP_CONCAT(t1.language_id SEPARATOR ',') AS `translation_resources`, `d`.`serialized_c` FROM t2 AS `d` LEFT JOIN t1 ON `d`.`voter_id` = t1.`voter_id` GROUP BY `d`.`voter_id` ORDER BY 10-d.voter_id+RAND()*0;
drop table t1,t2;
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
+
diff --git a/mysql-test/main/handlersocket.result b/mysql-test/main/handlersocket.result
index 1b3fc573548..8ef9b289cd0 100644
--- a/mysql-test/main/handlersocket.result
+++ b/mysql-test/main/handlersocket.result
@@ -5,7 +5,7 @@ plugin_version 1.0
plugin_status ACTIVE
plugin_type DAEMON
plugin_library handlersocket.so
-plugin_library_version 1.13
+plugin_library_version 1.14
plugin_author higuchi dot akira at dena dot jp
plugin_description Direct access into InnoDB
plugin_license BSD
diff --git a/mysql-test/main/having.result b/mysql-test/main/having.result
index f424d176e25..5f75c847993 100644
--- a/mysql-test/main/having.result
+++ b/mysql-test/main/having.result
@@ -1,4 +1,3 @@
-drop table if exists t1,t2,t3;
create table t1 (a int);
select count(a) as b from t1 where a=0 having b > 0;
b
@@ -280,11 +279,7 @@ select t1.col1 as tmp_col from t1
where t1.col2 in
(select t2.col2 from t2
group by t2.col1, t2.col2 having tmp_col <= 10);
-tmp_col
-10
-10
-10
-10
+ERROR 42S22: Unknown column 'tmp_col' in 'having clause'
select t1.col1 from t1
where t1.col2 in
(select t2.col2 from t2
@@ -470,9 +465,9 @@ WHERE table2.f1 = 2
GROUP BY table1.f1, table2.f2
HAVING (table2.f2 = 8 AND table1.f1 >= 6);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select `test`.`table1`.`f1` AS `f1`,7 AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where `test`.`table1`.`f3` = 9 group by `test`.`table1`.`f1`,7 having 0
+Note 1003 select 0 AS `f1`,7 AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where 0 group by 0,7 having 1
EXPLAIN EXTENDED
SELECT table1.f1, table2.f2
FROM t1 AS table1
@@ -481,9 +476,9 @@ WHERE table2.f1 = 2
GROUP BY table1.f1, table2.f2
HAVING (table2.f2 = 8);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 select `test`.`table1`.`f1` AS `f1`,7 AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where `test`.`table1`.`f3` = 9 group by `test`.`table1`.`f1`,7 having 0
+Note 1003 select `test`.`table1`.`f1` AS `f1`,7 AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where 0 group by `test`.`table1`.`f1`,7 having 1
DROP TABLE t1;
#
# Bug#52336 Segfault / crash in 5.1 copy_fields (param=0x9872980) at sql_select.cc:15355
@@ -631,7 +626,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL f10 4 NULL 2 100.00 Using index
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select min(`test`.`t1`.`f10`) AS `field1` from `test`.`t1` where <expr_cache><7>(<in_optimizer>(7,<exists>(/* select#2 */ select `test`.`t3`.`f3` from `test`.`t3` where <cache>(7) = `test`.`t3`.`f3`))) having <cache>(`field1`) < 's'
+Note 1003 /* select#1 */ select min(`test`.`t1`.`f10`) AS `field1` from `test`.`t1` where <expr_cache><7>(<in_optimizer>(7,<exists>(/* select#2 */ select `test`.`t3`.`f3` from `test`.`t3` where <cache>(7) = `test`.`t3`.`f3`))) having `field1` < 's'
set optimizer_switch=@save_optimizer_switch;
drop table t1,t2,t3;
End of 5.2 tests
@@ -835,6 +830,7 @@ INSERT INTO t1 VALUES(10, 10), (11, 11), (12, 12), (12, 13),(14, 15), (15, 16),
(16, 17), (17, 17);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t)
GROUP BY t HAVING r = 1 ORDER BY t1.u;
@@ -879,3 +875,34 @@ h
#
#
drop table t1;
+#
+# End of 10.3 tests
+#
+#
+# MDEV-18681: AND formula in HAVING with several occurances
+# of the same field f in different conjuncts + f=constant
+#
+CREATE TABLE t1 (pk int, f varchar(1));
+INSERT INTO t1 VALUES (2,'x'), (7,'y');
+CREATE TABLE t2 (pk int);
+INSERT INTO t2 VALUES (2), (3);
+SELECT t.f
+FROM (SELECT t1.* FROM (t1 JOIN t2 ON (t2.pk = t1.pk))) t
+HAVING t.f != 112 AND t.f = 'x' AND t.f != 'a';
+f
+x
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+DROP TABLE t1,t2;
+#
+# MDEV-20200: AddressSanitizer: use-after-poison in
+# Item_direct_view_ref::get_null_ref_table
+#
+CREATE TABLE t (f VARCHAR(512));
+INSERT INTO t VALUES ('a'),('b');
+SELECT * FROM t HAVING f = 'foo';
+f
+DROP TABLE t;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/having.test b/mysql-test/main/having.test
index 8b0cc244f51..3f4e8a8e710 100644
--- a/mysql-test/main/having.test
+++ b/mysql-test/main/having.test
@@ -1,10 +1,6 @@
# test of problems with having (Reported by Mark Rogers)
#
---disable_warnings
-drop table if exists t1,t2,t3;
---enable_warnings
-
create table t1 (a int);
select count(a) as b from t1 where a=0 having b > 0;
insert into t1 values (null);
@@ -207,7 +203,7 @@ select count(*) from t1 group by col1 having col1 = 10;
select count(*) as count_col1 from t1 group by col1 having col1 = 10;
select count(*) as count_col1 from t1 as tmp1 group by col1 having col1 = 10;
select count(*) from t1 group by col2 having col2 = 'hello';
---error 1054
+--error ER_BAD_FIELD_ERROR
select count(*) from t1 group by col2 having col1 = 10;
select col1 as count_col1 from t1 as tmp1 group by col1 having col1 = 10;
select col1 as count_col1 from t1 as tmp1 group by col1 having count_col1 = 10;
@@ -221,10 +217,10 @@ select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having col1 =
select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having count_col1 = 10;
select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having col2 = 'hello';
select col1 as count_col1,col2 as group_col2 from t1 as tmp1 group by col1,col2 having group_col2 = 'hello';
---error 1064
+--error ER_PARSE_ERROR
select sum(col1) as co12 from t1 group by col2 having col2 10;
select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10;
---error 1054
+--error ER_BAD_FIELD_ERROR
select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10;
@@ -253,7 +249,8 @@ where t1.col2 in
group by t2.col1, t2.col2 having t1.col1 <= 10);
# the having column is resolved in the SELECT clause of the outer query -
-# error in ANSI, works with MySQL extension
+# error in ANSI
+--error ER_BAD_FIELD_ERROR
select t1.col1 as tmp_col from t1
where t1.col2 in
(select t2.col2 from t2
@@ -273,7 +270,7 @@ having (select col_t1 from t2 where col_t1 = col_t2 order by col_t2 limit 1);
# nested queries with HAVING, inner having column resolved in outer FROM clause
# the outer having column is not referenced in GROUP BY which results in an error
---error 1054
+--error ER_BAD_FIELD_ERROR
select t1.col1 from t1
where t1.col2 in
(select t2.col2 from t2
@@ -302,7 +299,7 @@ having col_t1 > 10 and
# correlated subqueries - inner having column 't1.col2' resolves to
# the outer FROM clause, which cannot be used because the outer query
# is grouped
---error 1054
+--error ER_BAD_FIELD_ERROR
select sum(col1) from t1
group by col_t1
having col_t1 in (select sum(t2.col1) from t2
@@ -318,11 +315,11 @@ having col_t1 in (select sum(t2.col1) from t2
#
# queries with joins and ambiguous column names
#
---error 1052
+--error ER_NON_UNIQ_ERROR
select t1.col1, t2.col1 from t1, t2 where t1.col1 = t2.col1
group by t1.col1, t2.col1 having col1 = 2;
---error 1052
+--error ER_NON_UNIQ_ERROR
select t1.col1*10+t2.col1 from t1,t2 where t1.col1=t2.col1
group by t1.col1, t2.col1 having col1 = 2;
@@ -352,7 +349,7 @@ select count(s1) from t1 group by s1 having count(1+1)=2;
select count(s1) from t1 group by s1 having s1*0=0;
--- error 1052
+-- error ER_NON_UNIQ_ERROR
select * from t1 a, t1 b group by a.s1 having s1 is null;
# ANSI requires: 0 rows
# MySQL returns:
@@ -891,6 +888,7 @@ DROP TABLE t1;
DROP FUNCTION next_seq_value;
DROP TABLE series;
+
--echo #
--echo # MDEV-24958 Server crashes in my_strtod /
--echo # Value_source::Converter_strntod::Converter_strntod with DEFAULT(blob)
@@ -910,3 +908,39 @@ alter table t1 add column b int default (rand()+1+3);
--replace_column 1 #
select default(b) AS h FROM t1 HAVING h > "2";
drop table t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-18681: AND formula in HAVING with several occurances
+--echo # of the same field f in different conjuncts + f=constant
+--echo #
+
+CREATE TABLE t1 (pk int, f varchar(1));
+INSERT INTO t1 VALUES (2,'x'), (7,'y');
+CREATE TABLE t2 (pk int);
+INSERT INTO t2 VALUES (2), (3);
+
+SELECT t.f
+FROM (SELECT t1.* FROM (t1 JOIN t2 ON (t2.pk = t1.pk))) t
+HAVING t.f != 112 AND t.f = 'x' AND t.f != 'a';
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-20200: AddressSanitizer: use-after-poison in
+--echo # Item_direct_view_ref::get_null_ref_table
+--echo #
+
+CREATE TABLE t (f VARCHAR(512));
+INSERT INTO t VALUES ('a'),('b');
+SELECT * FROM t HAVING f = 'foo';
+
+# Cleanup
+DROP TABLE t;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/having_cond_pushdown.result b/mysql-test/main/having_cond_pushdown.result
new file mode 100644
index 00000000000..fea8f83f9a1
--- /dev/null
+++ b/mysql-test/main/having_cond_pushdown.result
@@ -0,0 +1,4972 @@
+CREATE TABLE t1(a INT, b INT, c INT);
+CREATE TABLE t2(x INT, y INT);
+INSERT INTO t1 VALUES (1,14,3), (2,13,2), (1,22,1), (3,13,4), (3,14,2);
+INSERT INTO t2 VALUES (2,13),(5,22),(3,14),(1,22);
+CREATE VIEW v1
+AS SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a;
+CREATE FUNCTION f1() RETURNS INT RETURN 3;
+# conjunctive subformula
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>2);
+a MAX(t1.b)
+3 14
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>2);
+a MAX(t1.b)
+3 14
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>2)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 2"
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : using equality
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2);
+a MAX(t1.b)
+2 13
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2);
+a MAX(t1.b)
+2 13
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a=2)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2"
+ }
+ }
+}
+# extracted AND formula
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.a<4);
+a MAX(t1.b)
+2 13
+3 14
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.a<4);
+a MAX(t1.b)
+2 13
+3 14
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.a<4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.a<4);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a < 4"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1) AND (t1.a<4)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a < 4"
+ }
+ }
+ }
+ }
+}
+# extracted OR formula
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) OR (a IN (SELECT 3));
+a MAX(t1.b)
+2 13
+3 14
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) OR (a IN (SELECT 3));
+a MAX(t1.b)
+2 13
+3 14
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) OR (a IN (SELECT 3));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+Warnings:
+Note 1249 Select 2 was reduced during optimization
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) OR (a IN (SELECT 3));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 or t1.a = 3"
+ }
+ }
+ }
+ }
+}
+Warnings:
+Note 1249 Select 2 was reduced during optimization
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1) OR (a IN (SELECT 3))
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 or t1.a = 3"
+ }
+ }
+ }
+ }
+}
+Warnings:
+Note 1249 Select 3 was reduced during optimization
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a>2) AND (MAX(t1.b)>13)) OR ((t1.a<3) AND (MIN(t1.c)>1));
+a MAX(t1.b) MIN(t1.c)
+2 13 2
+3 14 2
+SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a>2) AND (MAX(t1.b)>13)) OR ((t1.a<3) AND (MIN(t1.c)>1));
+a MAX(t1.b) MIN(t1.c)
+2 13 2
+3 14 2
+explain SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a>2) AND (MAX(t1.b)>13)) OR ((t1.a<3) AND (MIN(t1.c)>1));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a>2) AND (MAX(t1.b)>13)) OR ((t1.a<3) AND (MIN(t1.c)>1));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a > 2 and max(t1.b) > 13 or t1.a < 3 and min(t1.c) > 1",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 2 or t1.a < 3"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a>2) OR (t1.a<3)
+GROUP BY t1.a
+HAVING ((t1.a>2) AND (MAX(t1.b)>13)) OR ((t1.a<3) AND (MIN(t1.c)>1));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a > 2 and max(t1.b) > 13 or t1.a < 3 and min(t1.c) > 1",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 2 or t1.a < 3"
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : no aggregation formula pushdown
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.a)<3);
+a MAX(t1.b)
+2 13
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.a)<3);
+a MAX(t1.b)
+2 13
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.a)<3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.a)<3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.a) < 3",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MAX(t1.a)<3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.a) < 3",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)>13);
+a MAX(t1.b)
+3 14
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)>13);
+a MAX(t1.b)
+3 14
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)>13);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)>13);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) > 13",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MAX(t1.b)>13);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) > 13",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=3) AND (MAX(t1.a)=3);
+a MAX(t1.b)
+3 14
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=3) AND (MAX(t1.a)=3);
+a MAX(t1.b)
+3 14
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=3) AND (MAX(t1.a)=3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=3) AND (MAX(t1.a)=3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.a) = 3",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a=3)
+GROUP BY t1.a
+HAVING (MAX(t1.a)=3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.a) = 3",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)>12);
+a MAX(t1.b)
+2 13
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)>12);
+a MAX(t1.b)
+2 13
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)>12);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)>12);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) > 12",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a=2)
+GROUP BY t1.a
+HAVING (MAX(t1.b)>12);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) > 12",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)=13);
+a MAX(t1.b)
+2 13
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)=13);
+a MAX(t1.b)
+2 13
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)=13);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)=13);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) = 13",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MAX(t1.b)=13);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) = 13",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MIN(t1.c)<3);
+a MIN(t1.c)
+2 2
+3 2
+SELECT t1.a,MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MIN(t1.c)<3);
+a MIN(t1.c)
+2 2
+3 2
+explain SELECT t1.a,MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MIN(t1.c)<3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MIN(t1.c)<3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "min(t1.c) < 3",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MIN(t1.c)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MIN(t1.c)<3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "min(t1.c) < 3",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)=13) AND (MIN(t1.c)=2);
+a MAX(t1.b) MIN(t1.c)
+2 13 2
+SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)=13) AND (MIN(t1.c)=2);
+a MAX(t1.b) MIN(t1.c)
+2 13 2
+explain SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)=13) AND (MIN(t1.c)=2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)=13) AND (MIN(t1.c)=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) = 13 and min(t1.c) = 2",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MIN(t1.c)
+FROM t1
+WHERE (t1.a=2)
+GROUP BY t1.a
+HAVING (MAX(t1.b)=13) AND (MIN(t1.c)=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) = 13 and min(t1.c) = 2",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2"
+ }
+ }
+}
+# conjunctive subformula : no stored function pushdown
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (a=test.f1());
+a MAX(t1.b)
+3 14
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (a=test.f1());
+a MAX(t1.b)
+3 14
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (a=test.f1());
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (a=test.f1());
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a = test.f1()",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (a=test.f1());
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a = test.f1()",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushdown into derived table WHERE clause
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT v1.a
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.a
+HAVING (v1.a>1);
+a
+2
+3
+SELECT v1.a
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.a
+HAVING (v1.a>1);
+a
+2
+3
+explain SELECT v1.a
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.a
+HAVING (v1.a>1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 4 Using where; Using temporary; Using filesort
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.x 2
+2 DERIVED t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT v1.a
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.a
+HAVING (v1.a>1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "v1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x > 1 and t2.x is not null"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.x"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT v1.a
+FROM t2,v1
+WHERE (t2.x=v1.a) AND (v1.a>1)
+GROUP BY v1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "v1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x > 1 and t2.x is not null"
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.x"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushdown into derived table HAVING clause
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT v1.a,v1.c
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.c
+HAVING (v1.c>2);
+a c
+1 3
+3 4
+SELECT v1.a,v1.c
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.c
+HAVING (v1.c>2);
+a c
+1 3
+3 4
+explain SELECT v1.a,v1.c
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.c
+HAVING (v1.c>2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 4 Using where; Using temporary; Using filesort
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.x 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort
+explain format=json SELECT v1.a,v1.c
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.c
+HAVING (v1.c>2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "v1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x is not null"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.x"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "v1.c > 2",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "t1.c > 2",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT v1.a,v1.c
+FROM t2,v1
+WHERE (t2.x=v1.a) AND (v1.c>2)
+GROUP BY v1.c;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "v1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x is not null"
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.x"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "v1.c > 2",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "t1.c > 2",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushdown into materialized IN subquery
+# WHERE clause
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.a
+HAVING (t1.a>1);
+a b c
+2 13 2
+3 14 2
+SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.a
+HAVING (t1.a>1);
+a b c
+2 13 2
+3 14 2
+explain SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.a
+HAVING (t1.a>1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where; Using temporary
+explain format=json SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.a
+HAVING (t1.a>1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a is not null and t1.b is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["x", "MAX(t2.y)"],
+ "ref": ["test.t1.a", "test.t1.b"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x < 5 and t2.x > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT * FROM t1
+WHERE
+(t1.a>1) AND
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a is not null and t1.b is not null"
+ },
+ "table": {
+ "table_name": "<subquery3>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["x", "MAX(t2.y)"],
+ "ref": ["test.t1.a", "test.t1.b"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 3,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x < 5 and t2.x > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushdown into materialized IN subquery
+# HAVING clause
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.b
+HAVING (t1.b<14);
+a b c
+2 13 2
+SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.b
+HAVING (t1.b<14);
+a b c
+2 13 2
+explain SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.b
+HAVING (t1.b<14);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 4 Using where; Using temporary
+explain format=json SELECT * FROM t1
+WHERE
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.b
+HAVING (t1.b<14);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b < 14 and t1.a is not null and t1.b is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["x", "MAX(t2.y)"],
+ "ref": ["test.t1.a", "test.t1.b"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.y)` < 14",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT * FROM t1
+WHERE
+(t1.b<14) AND
+(t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.b;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b < 14 and t1.a is not null and t1.b is not null"
+ },
+ "table": {
+ "table_name": "<subquery3>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["x", "MAX(t2.y)"],
+ "ref": ["test.t1.a", "test.t1.b"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "`MAX(t2.y)` < 14",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t2.x < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# non-standard allowed queries
+# conjunctive subformula
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.c=2) AND (t1.a>1);
+a MAX(t1.b) c
+2 13 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.c=2) AND (t1.a>1);
+a MAX(t1.b) c
+2 13 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.c=2) AND (t1.a>1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.c=2) AND (t1.a>1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c = 2",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (t1.c=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c = 2",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT MAX(t1.a),t1.a,t1.b,t1.c
+FROM t1
+GROUP BY t1.b
+HAVING (t1.a=2) AND (t1.b=13) AND (t1.c=2);
+MAX(t1.a) a b c
+3 2 13 2
+SELECT MAX(t1.a),t1.a,t1.b,t1.c
+FROM t1
+GROUP BY t1.b
+HAVING (t1.a=2) AND (t1.b=13) AND (t1.c=2);
+MAX(t1.a) a b c
+3 2 13 2
+explain SELECT MAX(t1.a),t1.a,t1.b,t1.c
+FROM t1
+GROUP BY t1.b
+HAVING (t1.a=2) AND (t1.b=13) AND (t1.c=2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT MAX(t1.a),t1.a,t1.b,t1.c
+FROM t1
+GROUP BY t1.b
+HAVING (t1.a=2) AND (t1.b=13) AND (t1.c=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a = 2 and t1.c = 2",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 13"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT MAX(t1.a),t1.a,t1.b,t1.c
+FROM t1
+WHERE (t1.b=13)
+GROUP BY t1.b
+HAVING (t1.a=2) AND (t1.c=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a = 2 and t1.c = 2",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 13"
+ }
+ }
+}
+# extracted AND formula : using equalities
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c>1);
+a MAX(t1.b) c
+2 13 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c>1);
+a MAX(t1.b) c
+2 13 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c>1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c>1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b) FROM t1
+WHERE (t1.a=t1.c) AND (t1.a>1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c=2);
+a MAX(t1.b) c
+2 13 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c=2);
+a MAX(t1.b) c
+2 13 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c=2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2 and t1.c = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (t1.a=2)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2 and t1.c = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a=t1.c) AND (t1.a>1)) OR ((t1.a<3) AND (t1.c>3));
+a MAX(t1.b) c
+2 13 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a=t1.c) AND (t1.a>1)) OR ((t1.a<3) AND (t1.c>3));
+a MAX(t1.b) c
+2 13 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a=t1.c) AND (t1.a>1)) OR ((t1.a<3) AND (t1.c>3));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a=t1.c) AND (t1.a>1)) OR ((t1.a<3) AND (t1.c>3));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c = t1.a and t1.a > 1 or t1.a < 3 and t1.c > 3",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a > 1 or t1.a < 3"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a=t1.c) AND (t1.a>1)) OR (t1.a<3)
+GROUP BY t1.a
+HAVING ((t1.a=t1.c) AND (t1.a>1)) OR ((t1.a<3) AND (t1.c>3));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c = t1.a and t1.a > 1 or t1.a < 3 and t1.c > 3",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a > 1 or t1.a < 3"
+ }
+ }
+ }
+ }
+}
+# conjuctive subformula : pushdown using WHERE multiple equalities
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.c<3);
+a MAX(t1.b) c
+1 22 1
+2 13 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.c<3);
+a MAX(t1.b) c
+1 22 1
+2 13 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.c<3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.c<3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (t1.c<3)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+# extracted AND-formula : pushdown using WHERE multiple equalities
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.c<3);
+a MAX(t1.b) c
+2 13 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.c<3);
+a MAX(t1.b) c
+2 13 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.c<3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.c<3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a > 1 and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (t1.a>1) AND (t1.c<3)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and t1.a > 1 and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4)) AND (t1.a<2);
+a MAX(t1.b) c
+1 22 1
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4)) AND (t1.a<2);
+a MAX(t1.b) c
+1 22 1
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4)) AND (t1.a<2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4)) AND (t1.a<2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a > 1 and max(t1.c) < 3 or t1.c < 4",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and (t1.a > 1 or t1.a < 4) and t1.a < 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (((t1.a>1) OR (t1.c<4)) AND (t1.a<2))
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a > 1 and max(t1.c) < 3 or t1.c < 4",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and (t1.a > 1 or t1.a < 4) and t1.a < 2"
+ }
+ }
+ }
+ }
+}
+# extracted OR-formula : pushdown using WHERE multiple equalities
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+a MAX(t1.b) c
+1 22 1
+2 13 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+a MAX(t1.b) c
+1 22 1
+2 13 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a > 1 and max(t1.c) < 3 or t1.c < 4",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and (t1.a > 1 or t1.a < 4)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND ((t1.a>1) OR (t1.c<4))
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a > 1 and max(t1.c) < 3 or t1.c < 4",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = t1.a and (t1.a > 1 or t1.a < 4)"
+ }
+ }
+ }
+ }
+}
+DROP TABLE t1,t2;
+DROP VIEW v1;
+DROP FUNCTION f1;
+#
+# MDEV-18668: pushdown from HAVING into impossible WHERE
+#
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+SELECT a FROM t1 WHERE b = 1 AND b = 2 GROUP BY a HAVING a <= 3;
+a
+EXPLAIN
+SELECT a FROM t1 WHERE b = 1 AND b = 2 GROUP BY a HAVING a <= 3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+DROP TABLE t1;
+#
+# MDEV-18769: unfixed OR condition pushed from HAVING into WHERE
+#
+CREATE TABLE t1(a INT, b INT, c INT);
+CREATE TABLE t3(a INT, b INT, c INT, d INT);
+INSERT INTO t1 VALUES (1,14,3), (2,13,2), (1,22,1), (3,13,4), (3,14,2);
+INSERT INTO t3 VALUES (1,2,16,1), (1,3,11,2), (2,3,10,2);
+# nothing to push
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING t1.b = 13 AND MAX(t1.c) > 2;
+a b MAX(t1.c)
+3 13 4
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING t1.b = 13 AND MAX(t1.c) > 2;
+a b MAX(t1.c)
+3 13 4
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING t1.b = 13 AND MAX(t1.c) > 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING t1.b = 13 AND MAX(t1.c) > 2;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.b = 13 and max(t1.c) > 2",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING t1.b = 13 AND MAX(t1.c) > 2;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.b = 13 and max(t1.c) > 2",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+# extracted AND formula
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14);
+a b MAX(t1.c)
+2 13 2
+3 13 4
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14);
+a b MAX(t1.c)
+2 13 2
+3 13 4
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.b > 10) and t1.b < 14"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1 OR t1.b > 10) AND (t1.b < 14)
+GROUP BY t1.a,t1.b;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.b > 10) and t1.b < 14"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR t1.b > 15);
+a b MAX(t1.c)
+1 22 1
+2 13 2
+3 13 4
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR t1.b > 15);
+a b MAX(t1.c)
+1 22 1
+2 13 2
+3 13 4
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR t1.b > 15);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR t1.b > 15);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.b > 10) and (t1.b < 14 or t1.b > 15)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR t1.b > 15)
+GROUP BY t1.a,t1.b;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.b > 10) and (t1.b < 14 or t1.b > 15)"
+ }
+ }
+ }
+ }
+}
+# extracted AND formula : equality in the inner AND formula
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR (t1.b > 15 AND t1.a = 2));
+a b MAX(t1.c)
+2 13 2
+3 13 4
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR (t1.b > 15 AND t1.a = 2));
+a b MAX(t1.c)
+2 13 2
+3 13 4
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR (t1.b > 15 AND t1.a = 2));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR (t1.b > 15 AND t1.a = 2));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.b > 10) and (t1.b < 14 or t1.a = 2 and t1.b > 15)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR (t1.b > 15 AND t1.a = 2))
+GROUP BY t1.a,t1.b;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.b > 10) and (t1.b < 14 or t1.a = 2 and t1.b > 15)"
+ }
+ }
+ }
+ }
+}
+# extracted OR formula
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2) OR (t1.b = 13 AND t1.a > 2);
+a b MAX(t1.c)
+1 14 3
+1 22 1
+3 13 4
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2) OR (t1.b = 13 AND t1.a > 2);
+a b MAX(t1.c)
+1 14 3
+1 22 1
+3 13 4
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2) OR (t1.b = 13 AND t1.a > 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2) OR (t1.b = 13 AND t1.a > 2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a < 2 or t1.b = 13 and t1.a > 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2) OR (t1.b = 13 AND t1.a > 2)
+GROUP BY t1.a,t1.b;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a < 2 or t1.b = 13 and t1.a > 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND t1.b = 13);
+a b MAX(t1.c)
+1 14 3
+3 13 4
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND t1.b = 13);
+a b MAX(t1.c)
+1 14 3
+3 13 4
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND t1.b = 13);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND t1.b = 13);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 14 and t1.a < 2 or t1.b = 13 and t1.a > 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND t1.b = 13)
+GROUP BY t1.a,t1.b;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 14 and t1.a < 2 or t1.b = 13 and t1.a > 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND (t1.b = 13 OR t1.b = 14));
+a b MAX(t1.c)
+1 14 3
+3 13 4
+3 14 2
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND (t1.b = 13 OR t1.b = 14));
+a b MAX(t1.c)
+1 14 3
+3 13 4
+3 14 2
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND (t1.b = 13 OR t1.b = 14));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND (t1.b = 13 OR t1.b = 14));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 14 and t1.a < 2 or t1.a > 2 and (t1.b = 13 or t1.b = 14)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND (t1.b = 13 OR t1.b = 14))
+GROUP BY t1.a,t1.b;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 14 and t1.a < 2 or t1.a > 2 and (t1.b = 13 or t1.b = 14)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a < 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+a b MAX(t1.c)
+1 14 3
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a < 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+a b MAX(t1.c)
+1 14 3
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a < 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a < 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a < 2 and max(t1.c) = 2 or max(t1.c) > 2 and (t1.a = 1 or t1.a = 2)",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a < 2 or t1.a = 1 or t1.a = 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2) OR (t1.a = 1 OR t1.a = 2)
+GROUP BY t1.a
+HAVING (t1.a < 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a < 2 and max(t1.c) = 2 or max(t1.c) > 2 and (t1.a = 1 or t1.a = 2)",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a < 2 or t1.a = 1 or t1.a = 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+a b MAX(t1.c)
+1 14 3
+2 13 2
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+a b MAX(t1.c)
+1 14 3
+2 13 2
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a = 2 and max(t1.c) = 2 or max(t1.c) > 2 and (t1.a = 1 or t1.a = 2)",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2 or t1.a = 1 or t1.a = 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 2) OR (t1.a = 1 OR t1.a = 2)
+GROUP BY t1.a
+HAVING (t1.a = 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.a = 2 and max(t1.c) = 2 or max(t1.c) > 2 and (t1.a = 1 or t1.a = 2)",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 2 or t1.a = 1 or t1.a = 2"
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : equality pushdown
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 1) AND (MAX(t1.c) = 3);
+a b MAX(t1.c)
+1 14 3
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 1) AND (MAX(t1.c) = 3);
+a b MAX(t1.c)
+1 14 3
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 1) AND (MAX(t1.c) = 3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 1) AND (MAX(t1.c) = 3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.c) = 3",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (MAX(t1.c) = 3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.c) = 3",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1"
+ }
+ }
+}
+# conjunctive subformula : equalities pushdown
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 3) AND MAX(t1.b = 14);
+a b MAX(t1.c)
+1 14 3
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 3) AND MAX(t1.b = 14);
+a b MAX(t1.c)
+1 14 3
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 3) AND MAX(t1.b = 14);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 3) AND MAX(t1.b = 14);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b = 14)",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3)
+GROUP BY t1.a,t1.c
+HAVING (MAX(t1.b) = 14);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) = 14",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 3"
+ }
+ }
+}
+# conjunctive subformula : multiple equality consists of
+two equalities pushdown
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 1) AND MAX(t1.b = 14);
+a b MAX(t1.c)
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 1) AND MAX(t1.b = 14);
+a b MAX(t1.c)
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 1) AND MAX(t1.b = 14);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 1) AND MAX(t1.b = 14);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b = 14)",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 1)
+GROUP BY t1.a,t1.c
+HAVING (MAX(t1.b) = 14);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "max(t1.b) = 14",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 1"
+ }
+ }
+}
+#
+# Pushdown from HAVING into non-empty WHERE
+#
+# inequality : inequality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+a b MAX(t1.c)
+1 14 3
+2 13 2
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+a b MAX(t1.c)
+1 14 3
+2 13 2
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b > 2 and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2) AND (t1.a < 3)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b > 2 and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+# equality : inequality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a = 3);
+a b MAX(t1.c)
+3 13 4
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a = 3);
+a b MAX(t1.c)
+3 13 4
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a = 3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a = 3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 3 and t1.b > 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2) AND (t1.a = 3)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 3 and t1.b > 2"
+ }
+ }
+}
+# inequality : equality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+a b MAX(t1.c)
+1 14 3
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+a b MAX(t1.c)
+1 14 3
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 14 and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14) AND (t1.a < 3)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 14 and t1.a < 3"
+ }
+ }
+ }
+ }
+}
+# equality : equality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a b MAX(t1.c)
+1 14 3
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a b MAX(t1.c)
+1 14 3
+explain SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.b = 14"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14) AND (t1.a = 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.b = 14 and t1.a = 1"
+ }
+ }
+}
+# equality : equality in WHERE, impossible WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.c)
+SELECT t1.a,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.c)
+explain SELECT t1.a,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+explain format=json SELECT t1.a,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 3) AND (t1.a = 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+# equality : equality in WHERE (equal through constant)
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c = 1)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b) c
+1 22 1
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c = 1)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b) c
+1 22 1
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c = 1)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c = 1)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c = 1) AND (t1.a = 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c = 1 and t1.a = 1"
+ }
+ }
+}
+# inequality : AND formula in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c > 0 and t1.c < 3 and t1.a > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3) AND (t1.a > 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.c > 0 and t1.c < 3 and t1.a > 1"
+ }
+ }
+ }
+ }
+}
+# equality : AND formula in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b) c
+1 22 1
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b) c
+1 22 1
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c > 0 and t1.c < 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3) AND (t1.a = 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c > 0 and t1.c < 3"
+ }
+ }
+}
+# equality : AND formula in WHERE, impossible WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b) c
+1 22 1
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b) c
+1 22 1
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "const_condition": "1",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c < 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 0) AND (t1.c < 3) AND (t1.a = 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c < 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 0) AND (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b)
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 0) AND (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+a MAX(t1.b)
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 0) AND (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 0) AND (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 0) AND (t1.a = 3) AND (t1.a = 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.b = 2) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.a = 1);
+a b MAX(t3.c) d
+1 2 16 1
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.b = 2) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.a = 1);
+a b MAX(t3.c) d
+1 2 16 1
+explain SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.b = 2) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.a = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where
+explain format=json SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.b = 2) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.a = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.b = 2 and t3.d = 1 and t3.a = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.b = 2) AND (t3.d = 1) AND (t3.a = 1)
+GROUP BY t3.a,t3.b,t3.d;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.b = 2 and t3.d = 1 and t3.a = 1"
+ }
+ }
+}
+# inequality : OR formula in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 2);
+a MAX(t1.b) c
+1 22 1
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 2);
+a MAX(t1.b) c
+1 22 1
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 1 or t1.c < 3) and t1.a < 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) OR (t1.c < 3)) AND (t1.a < 2)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 1 or t1.c < 3) and t1.a < 2"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 2);
+a MAX(t1.b)
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 2);
+a MAX(t1.b)
+explain SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE ((t1.a = 1) OR (t1.a = 3)) AND (t1.a = 2)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+# AND formula : inequality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+a MAX(t1.b) c
+2 13 2
+3 14 4
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+a MAX(t1.b) c
+2 13 2
+3 14 4
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a < 4 and t1.a > 0"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND (t1.a < 4) AND (t1.a > 0)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a < 4 and t1.a > 0"
+ }
+ }
+ }
+ }
+}
+# AND formula : equality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+a MAX(t1.b) c
+1 22 3
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+a MAX(t1.b) c
+1 22 3
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "const_condition": "1 and 1",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a < 4) AND (t1.a > 0)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1"
+ }
+ }
+}
+# OR formula : inequality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+a MAX(t1.b) c
+2 13 2
+3 14 4
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+a MAX(t1.b) c
+2 13 2
+3 14 4
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and (t1.a < 4 or t1.a > 0)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND ((t1.a < 4) OR (t1.a > 0))
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and (t1.a < 4 or t1.a > 0)"
+ }
+ }
+ }
+ }
+}
+# OR formula : equality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+a MAX(t1.b) c
+1 22 3
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+a MAX(t1.b) c
+1 22 3
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "const_condition": "1",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND ((t1.a < 4) OR (t1.a > 0))
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1"
+ }
+ }
+}
+# AND formula : AND formula in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 2
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 2
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c > 1",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.c < 3 and t1.a < 4"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) AND (t1.c < 3)) AND
+(t1.a < 4)
+GROUP BY t1.a
+HAVING (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c > 1",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.c < 3 and t1.a < 4"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "const_condition": "1",
+ "filesort": {
+ "sort_key": "t1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c < 3 and t1.c > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a = 1) AND (t1.c < 3)) AND
+((t1.a < 4) AND (t1.c > 1))
+GROUP BY t1.a,t1.c;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c < 3 and t1.c > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+1 14 3
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+1 14 3
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "const_condition": "1 and 1",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a = 1) AND (t1.c = 3)) AND
+((t1.a < 4) AND (t1.c > 1))
+GROUP BY t1.a,t1.c;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 3"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b
+HAVING (t3.b = 2) AND (t3.d > 0);
+a b MAX(t3.c) d
+1 2 16 1
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b
+HAVING (t3.b = 2) AND (t3.d > 0);
+a b MAX(t3.c) d
+1 2 16 1
+explain SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b
+HAVING (t3.b = 2) AND (t3.d > 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where
+explain format=json SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b
+HAVING (t3.b = 2) AND (t3.d > 0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t3.d > 0",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.a = 1 and t3.d = 1 and t3.b = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1) AND
+(t3.b = 2)
+GROUP BY t3.a,t3.b
+HAVING (t3.d > 0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t3.d > 0",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.a = 1 and t3.d = 1 and t3.b = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.b = 2) AND (t3.d > 0);
+a b MAX(t3.c) d
+1 2 16 1
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.b = 2) AND (t3.d > 0);
+a b MAX(t3.c) d
+1 2 16 1
+explain SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.b = 2) AND (t3.d > 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where
+explain format=json SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.b = 2) AND (t3.d > 0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "const_condition": "1",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.a = 1 and t3.d = 1 and t3.b = 2"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1) AND
+(t3.b = 2) AND (t3.d > 0)
+GROUP BY t3.a,t3.b,t3.d;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.a = 1 and t3.d = 1 and t3.b = 2"
+ }
+ }
+}
+# AND formula : OR formula in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 4
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 4
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c > 1",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 1 or t1.c < 3) and t1.a < 4"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) OR (t1.c < 3)) AND
+(t1.a < 4)
+GROUP BY t1.a
+HAVING (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "t1.c > 1",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 1 or t1.c < 3) and t1.a < 4"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 2
+3 13 4
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+a MAX(t1.b) c
+2 13 2
+3 14 2
+3 13 4
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 1 or t1.c < 3) and t1.a < 4 and t1.c > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) OR (t1.c < 3)) AND
+(t1.a < 4) AND (t1.c > 1)
+GROUP BY t1.a,t1.c;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 1 or t1.c < 3) and t1.a < 4 and t1.c > 1"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 4) OR (t1.c > 1);
+a MAX(t1.b) c
+1 14 3
+3 14 2
+3 13 4
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 4) OR (t1.c > 1);
+a MAX(t1.b) c
+1 14 3
+3 14 2
+3 13 4
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 4) OR (t1.c > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 4) OR (t1.c > 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.a = 3) and (t1.a = 4 or t1.c > 1)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a = 1) OR (t1.a = 3)) AND
+((t1.a = 4) OR (t1.c > 1))
+GROUP BY t1.a,t1.c;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1 or t1.a = 3) and (t1.a = 4 or t1.c > 1)"
+ }
+ }
+ }
+ }
+}
+# equality : pushdown through equality in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1);
+a MAX(t1.b) c
+1 22 1
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1);
+a MAX(t1.b) c
+1 22 1
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c) AND (t1.c = 1)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 1"
+ }
+ }
+}
+# OR formula : pushdown through equality
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1) OR (t1.c = 2);
+a MAX(t1.b) c
+1 22 1
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1) OR (t1.c = 2);
+a MAX(t1.b) c
+1 22 1
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1) OR (t1.c = 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1) OR (t1.c = 2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 1"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c) AND
+((t1.c = 1) OR (t1.c = 2))
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.c = 1"
+ }
+ }
+}
+# OR formula : pushdown through equality, impossible WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 3) OR (t1.c = 2);
+a MAX(t1.b) c
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 3) OR (t1.c = 2);
+a MAX(t1.b) c
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 3) OR (t1.c = 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 3) OR (t1.c = 2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c) AND
+((t1.c = 3) OR (t1.c = 2))
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+# AND formula : pushdown through equality, impossible WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a,t1.c
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+a MAX(t1.b) c
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a,t1.c
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+a MAX(t1.b) c
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a,t1.c
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a,t1.c
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3) AND
+(t1.a > 2) AND (t1.a = t1.c)
+GROUP BY t1.a,t1.c;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+a MAX(t1.b) c
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+a MAX(t1.b) c
+explain SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3) AND
+(t1.a > 2) AND (t1.a = t1.c)
+GROUP BY t1.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Impossible WHERE"
+ }
+ }
+}
+# AND formula with OR subformula : AND condition in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND ((t3.d = 1) OR (t3.d > 1));
+a MAX(t3.b) c d
+SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND ((t3.d = 1) OR (t3.d > 1));
+a MAX(t3.b) c d
+explain SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND ((t3.d = 1) OR (t3.d > 1));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using temporary; Using filesort
+explain format=json SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND ((t3.d = 1) OR (t3.d > 1));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t3.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.d = t3.a and t3.a > 1 and (t3.c = 3 or t3.c < 2) and (t3.a = 1 or t3.a > 1)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t3.a,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2)) AND
+(t3.a = t3.d) AND ((t3.d = 1) OR (t3.d > 1))
+GROUP BY t3.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t3.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.d = t3.a and t3.a > 1 and (t3.c = 3 or t3.c < 2) and (t3.a = 1 or t3.a > 1)"
+ }
+ }
+ }
+ }
+}
+# AND formula with OR subformula : AND condition in WHERE
+set statement optimizer_switch='condition_pushdown_from_having=off' for SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND (((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1));
+a MAX(t3.b) c d
+SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND (((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1));
+a MAX(t3.b) c d
+explain SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND (((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using temporary; Using filesort
+explain format=json SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND (((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t3.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.d = t3.a and t3.a > 1 and (t3.c = 3 or t3.c < 2) and (t3.c = t3.a and t3.c < 15 or t3.a > 1)"
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_from_having=off' for explain format=json SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2)) AND
+(t3.a = t3.d) AND (((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1))
+GROUP BY t3.a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t3.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100,
+ "attached_condition": "t3.d = t3.a and t3.a > 1 and (t3.c = 3 or t3.c < 2) and (t3.c = t3.a and t3.a < 15 or t3.a > 1)"
+ }
+ }
+ }
+ }
+}
+# prepare statement
+PREPARE stmt1 from "
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 1)
+";
+execute stmt1;
+a MAX(t1.b) c
+1 22 3
+execute stmt1;
+a MAX(t1.b) c
+1 22 3
+deallocate prepare stmt1;
+DROP TABLE t1,t3;
+#
+# MDEV-19185: pushdown constant function with subquery
+#
+CREATE TABLE t1 (pk INT, c1 VARCHAR(64));
+INSERT INTO t1 VALUES (1,'bbb'),(2,'aaa'),(3,'ccc');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT pk
+FROM t1
+GROUP BY pk
+HAVING (1 NOT IN (SELECT COUNT(t1.c1) FROM (v1, t1)));
+pk
+1
+2
+3
+DROP TABLE t1;
+DROP VIEW v1;
+#
+# MDEV-19186: temporary table defined with view field in HAVING
+#
+CREATE TABLE t1 (pk INT, x VARCHAR(10));
+INSERT INTO t1 VALUES (1,'y'),(2,'s'),(3,'aaa');
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TABLE t2 (pk INT, x VARCHAR(10));
+INSERT INTO t2 VALUES (1,'aa'),(2,'t'),(3,'bb');
+CREATE TABLE tmp1
+SELECT v1.pk
+FROM t2,v1
+WHERE v1.x = t2.x
+GROUP BY v1.pk
+HAVING (v1.pk = 1);
+DROP TABLE t1,t2,tmp1;
+DROP VIEW v1;
+#
+# MDEV-19164: pushdown of condition with cached items
+#
+create table t1 (d1 date);
+insert into t1 values (null),('1971-03-06'),('1993-06-05'),('1998-07-08');
+select d1 from t1
+group by d1
+having d1 between (inet_aton('1978-04-27')) and '2018-08-26';
+d1
+explain extended select d1 from t1
+group by d1
+having d1 between (inet_aton('1978-04-27')) and '2018-08-26';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where; Using temporary; Using filesort
+Warnings:
+Note 1003 select `test`.`t1`.`d1` AS `d1` from `test`.`t1` where `test`.`t1`.`d1` between <cache>(inet_aton('1978-04-27')) and <cache>('2018-08-26') group by `test`.`t1`.`d1` having 1
+explain format=json select d1 from t1
+group by d1
+having d1 between (inet_aton('1978-04-27')) and '2018-08-26';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.d1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "t1.d1 between <cache>(inet_aton('1978-04-27')) and <cache>('2018-08-26')"
+ }
+ }
+ }
+ }
+}
+delete from t1;
+insert into t1 values ('2018-01-15'),('2018-02-20');
+select d1 from t1
+group by d1
+having d1 not between 0 AND exp(0);
+d1
+2018-01-15
+2018-02-20
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '1'
+explain extended select d1 from t1
+group by d1
+having d1 not between 0 AND exp(0);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where; Using temporary; Using filesort
+Warnings:
+Note 1003 select `test`.`t1`.`d1` AS `d1` from `test`.`t1` where `test`.`t1`.`d1` not between <cache>(0) and <cache>(exp(0)) group by `test`.`t1`.`d1` having 1
+explain format=json select d1 from t1
+group by d1
+having d1 not between 0 AND exp(0);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.d1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "t1.d1 not between <cache>(0) and <cache>(exp(0))"
+ }
+ }
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-19245: Impossible WHERE should be noticed earlier
+# after HAVING pushdown
+#
+CREATE TABLE t1 (a INT, b INT, c INT);
+INSERT INTO t1 VALUES (1,2,1),(3,2,2),(5,6,4),(3,4,1);
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a > 3 GROUP BY t1.a HAVING t1.a = 3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a = 3 GROUP BY t1.a HAVING t1.a > 3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a > 3 AND t1.a = 3 GROUP BY t1.a ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE (t1.a < 2 OR t1.c > 1) GROUP BY t1.a HAVING t1.a = 3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a = 3 GROUP BY t1.a HAVING (t1.a < 2 OR t1.a > 3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a = 3 AND (t1.a < 2 OR t1.a > 3) GROUP BY t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+EXPLAIN SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE (t1.a < 2 AND t1.c > 1) GROUP BY t1.a HAVING t1.a = 3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+EXPLAIN SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE t1.a = 3 GROUP BY t1.a HAVING (t1.a < 2 AND t1.c > 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+EXPLAIN SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE t1.a = 3 AND (t1.a < 2 AND t1.b > 3) GROUP BY t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+DROP TABLE t1;
+#
+# MDEV-21184: Constant subquery in condition movable to WHERE
+#
+CREATE TABLE t1(a int, b int);
+INSERT INTO t1 VALUES
+(1,10), (2,20), (1,11), (1,15), (2,20), (1,10), (2,21);
+CREATE TABLE t2 (c INT);
+INSERT INTO t2 VALUES (2),(3);
+EXPLAIN FORMAT=JSON SELECT a FROM t1 GROUP BY a HAVING a = 8 OR a = ( SELECT MIN(c) FROM t2 );
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100,
+ "attached_condition": "t1.a = 8 or t1.a = (subquery#2)"
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+}
+SELECT a FROM t1 GROUP BY a HAVING a = 8 OR a = ( SELECT MIN(c) FROM t2 );
+a
+2
+EXPLAIN FORMAT=JSON SELECT a FROM t1 GROUP BY a,b
+HAVING ( a = 8 OR a = ( SELECT MIN(c) FROM t2 ) ) and b < 20;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 8 or t1.a = (subquery#2)) and t1.b < 20"
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+}
+SELECT a FROM t1 GROUP BY a,b
+HAVING ( a = 8 OR a = ( SELECT MIN(c) FROM t2 ) ) and b < 20;
+a
+EXPLAIN FORMAT=JSON SELECT a FROM t1 GROUP BY a
+HAVING ( a = 8 OR a = ( SELECT MIN(c) FROM t2 ) ) and SUM(b) > 20;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "sum(t1.b) > 20",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100,
+ "attached_condition": "t1.a = 8 or t1.a = (subquery#2)"
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+}
+SELECT a FROM t1 GROUP BY a
+HAVING ( a = 8 OR a = ( SELECT MIN(c) FROM t2 ) ) and SUM(b) > 20;
+a
+2
+EXPLAIN FORMAT=JSON SELECT a FROM t1 GROUP BY a HAVING a = ( SELECT MIN(c) FROM t2 );
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100,
+ "attached_condition": "t1.a = (subquery#2)"
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+}
+SELECT a FROM t1 GROUP BY a HAVING a = ( SELECT MIN(c) FROM t2 );
+a
+2
+DROP TABLE t1,t2;
+#
+# MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order or Assertion `fixed == 1'
+#
+CREATE TABLE t1 (i int NOT NULL);
+SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL);
+i
+SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0);
+i
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+SELECT * FROM t1 GROUP BY i HAVING i='1' IN ( i IS NULL AND 'x' = 0);
+i
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+DROP TABLE t1;
+#
+# MDEV-28080: HAVING with NOT EXIST predicate in an equality
+# (fixed by the patch for MDEV-26402)
+#
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (b int);
+INSERT INTO t1 VALUES (0), (1), (1), (0);
+INSERT INTO t2 VALUES (3), (7);
+SELECT a FROM t1
+GROUP BY a HAVING a= (NOT EXISTS (SELECT b FROM t2 WHERE b = 1));
+a
+1
+SELECT a FROM t1
+GROUP BY a HAVING a= (NOT EXISTS (SELECT b FROM t2 WHERE b = 7));
+a
+0
+DROP TABLE t1, t2;
+#
+# MDEV-28082: HAVING with IS NULL predicate in an equality
+# (fixed by the patch for MDEV-26402)
+#
+CREATE TABLE t1 (a int, b int NOT NULL) ;
+INSERT INTO t1 VALUES (1,10), (0,11), (0,11), (1,10);
+SELECT a,b FROM t1 GROUP BY a HAVING a = (b IS NULL);
+a b
+0 11
+SELECT a,b FROM t1 GROUP BY a,b HAVING a = (b IS NULL);
+a b
+0 11
+DROP TABLE t1;
+End of 10.4 tests
diff --git a/mysql-test/main/having_cond_pushdown.test b/mysql-test/main/having_cond_pushdown.test
new file mode 100644
index 00000000000..aee5a770fa9
--- /dev/null
+++ b/mysql-test/main/having_cond_pushdown.test
@@ -0,0 +1,1485 @@
+let $no_pushdown=
+ set statement optimizer_switch='condition_pushdown_from_having=off' for;
+
+CREATE TABLE t1(a INT, b INT, c INT);
+CREATE TABLE t2(x INT, y INT);
+
+INSERT INTO t1 VALUES (1,14,3), (2,13,2), (1,22,1), (3,13,4), (3,14,2);
+INSERT INTO t2 VALUES (2,13),(5,22),(3,14),(1,22);
+
+CREATE VIEW v1
+AS SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a;
+
+CREATE FUNCTION f1() RETURNS INT RETURN 3;
+
+--echo # conjunctive subformula
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>2)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : using equality
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a=2)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted AND formula
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.a<4);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1) AND (t1.a<4)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted OR formula
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) OR (a IN (SELECT 3));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1) OR (a IN (SELECT 3))
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a>2) AND (MAX(t1.b)>13)) OR ((t1.a<3) AND (MIN(t1.c)>1));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a>2) OR (t1.a<3)
+GROUP BY t1.a
+HAVING ((t1.a>2) AND (MAX(t1.b)>13)) OR ((t1.a<3) AND (MIN(t1.c)>1));
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : no aggregation formula pushdown
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.a)<3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MAX(t1.a)<3);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)>13);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MAX(t1.b)>13);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=3) AND (MAX(t1.a)=3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a=3)
+GROUP BY t1.a
+HAVING (MAX(t1.a)=3);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)>12);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a=2)
+GROUP BY t1.a
+HAVING (MAX(t1.b)>12);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MAX(t1.b)=13);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MAX(t1.b)=13);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (MIN(t1.c)<3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MIN(t1.c)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (MIN(t1.c)<3);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),MIN(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=2) AND (MAX(t1.b)=13) AND (MIN(t1.c)=2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MIN(t1.c)
+FROM t1
+WHERE (t1.a=2)
+GROUP BY t1.a
+HAVING (MAX(t1.b)=13) AND (MIN(t1.c)=2);
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : no stored function pushdown
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a>1) AND (a=test.f1());
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (a=test.f1());
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : pushdown into derived table WHERE clause
+let $query=
+SELECT v1.a
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.a
+HAVING (v1.a>1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT v1.a
+FROM t2,v1
+WHERE (t2.x=v1.a) AND (v1.a>1)
+GROUP BY v1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : pushdown into derived table HAVING clause
+let $query=
+SELECT v1.a,v1.c
+FROM t2,v1
+WHERE (t2.x=v1.a)
+GROUP BY v1.c
+HAVING (v1.c>2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT v1.a,v1.c
+FROM t2,v1
+WHERE (t2.x=v1.a) AND (v1.c>2)
+GROUP BY v1.c;
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : pushdown into materialized IN subquery
+--echo # WHERE clause
+let $query=
+SELECT * FROM t1
+WHERE
+ (t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.a
+HAVING (t1.a>1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT * FROM t1
+WHERE
+ (t1.a>1) AND
+ (t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : pushdown into materialized IN subquery
+--echo # HAVING clause
+let $query=
+SELECT * FROM t1
+WHERE
+ (t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.b
+HAVING (t1.b<14);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT * FROM t1
+WHERE
+ (t1.b<14) AND
+ (t1.a,t1.b) IN (SELECT t2.x,MAX(t2.y) FROM t2 WHERE t2.x<5 GROUP BY t2.x)
+GROUP BY t1.b;
+eval $no_pushdown explain format=json $query;
+
+--echo # non-standard allowed queries
+--echo # conjunctive subformula
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.c=2) AND (t1.a>1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE (t1.a>1)
+GROUP BY t1.a
+HAVING (t1.c=2);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT MAX(t1.a),t1.a,t1.b,t1.c
+FROM t1
+GROUP BY t1.b
+HAVING (t1.a=2) AND (t1.b=13) AND (t1.c=2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT MAX(t1.a),t1.a,t1.b,t1.c
+FROM t1
+WHERE (t1.b=13)
+GROUP BY t1.b
+HAVING (t1.a=2) AND (t1.c=2);
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted AND formula : using equalities
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c>1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b) FROM t1
+WHERE (t1.a=t1.c) AND (t1.a>1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a=t1.c) AND (t1.c=2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (t1.a=2)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING ((t1.a=t1.c) AND (t1.a>1)) OR ((t1.a<3) AND (t1.c>3));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a=t1.c) AND (t1.a>1)) OR (t1.a<3)
+GROUP BY t1.a
+HAVING ((t1.a=t1.c) AND (t1.a>1)) OR ((t1.a<3) AND (t1.c>3));
+eval $no_pushdown explain format=json $query;
+
+--echo # conjuctive subformula : pushdown using WHERE multiple equalities
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.c<3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (t1.c<3)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted AND-formula : pushdown using WHERE multiple equalities
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (t1.a>1) AND (t1.c<3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (t1.a>1) AND (t1.c<3)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING (((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4)) AND (t1.a<2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND (((t1.a>1) OR (t1.c<4)) AND (t1.a<2))
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted OR-formula : pushdown using WHERE multiple equalities
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c)
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a=t1.c) AND ((t1.a>1) OR (t1.c<4))
+GROUP BY t1.a
+HAVING ((t1.a>1) AND (MAX(t1.c)<3)) OR (t1.c<4);
+eval $no_pushdown explain format=json $query;
+
+DROP TABLE t1,t2;
+DROP VIEW v1;
+DROP FUNCTION f1;
+
+--echo #
+--echo # MDEV-18668: pushdown from HAVING into impossible WHERE
+--echo #
+
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+
+SELECT a FROM t1 WHERE b = 1 AND b = 2 GROUP BY a HAVING a <= 3;
+EXPLAIN
+SELECT a FROM t1 WHERE b = 1 AND b = 2 GROUP BY a HAVING a <= 3;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18769: unfixed OR condition pushed from HAVING into WHERE
+--echo #
+
+CREATE TABLE t1(a INT, b INT, c INT);
+CREATE TABLE t3(a INT, b INT, c INT, d INT);
+
+INSERT INTO t1 VALUES (1,14,3), (2,13,2), (1,22,1), (3,13,4), (3,14,2);
+INSERT INTO t3 VALUES (1,2,16,1), (1,3,11,2), (2,3,10,2);
+
+--echo # nothing to push
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING t1.b = 13 AND MAX(t1.c) > 2;
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING t1.b = 13 AND MAX(t1.c) > 2;
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted AND formula
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1 OR t1.b > 10) AND (t1.b < 14)
+GROUP BY t1.a,t1.b;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR t1.b > 15);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR t1.b > 15)
+GROUP BY t1.a,t1.b;
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted AND formula : equality in the inner AND formula
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR (t1.b > 15 AND t1.a = 2));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1 OR t1.b > 10) AND (t1.b < 14 OR (t1.b > 15 AND t1.a = 2))
+GROUP BY t1.a,t1.b;
+eval $no_pushdown explain format=json $query;
+
+--echo # extracted OR formula
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2) OR (t1.b = 13 AND t1.a > 2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2) OR (t1.b = 13 AND t1.a > 2)
+GROUP BY t1.a,t1.b;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND t1.b = 13);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND t1.b = 13)
+GROUP BY t1.a,t1.b;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.b
+HAVING (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND (t1.b = 13 OR t1.b = 14));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2 AND t1.b = 14) OR (t1.a > 2 AND (t1.b = 13 OR t1.b = 14))
+GROUP BY t1.a,t1.b;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a < 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a < 2) OR (t1.a = 1 OR t1.a = 2)
+GROUP BY t1.a
+HAVING (t1.a < 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 2) OR (t1.a = 1 OR t1.a = 2)
+GROUP BY t1.a
+HAVING (t1.a = 2 AND MAX(t1.c) = 2) OR (MAX(t1.c) > 2 AND (t1.a = 1 OR t1.a = 2));
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : equality pushdown
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 1) AND (MAX(t1.c) = 3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (MAX(t1.c) = 3);
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : equalities pushdown
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 3) AND MAX(t1.b = 14);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3)
+GROUP BY t1.a,t1.c
+HAVING (MAX(t1.b) = 14);
+eval $no_pushdown explain format=json $query;
+
+--echo # conjunctive subformula : multiple equality consists of
+--echo two equalities pushdown
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 1) AND (t1.c = 1) AND MAX(t1.b = 14);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 1)
+GROUP BY t1.a,t1.c
+HAVING (MAX(t1.b) = 14);
+eval $no_pushdown explain format=json $query;
+
+--echo #
+--echo # Pushdown from HAVING into non-empty WHERE
+--echo #
+
+--echo # inequality : inequality in WHERE
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2) AND (t1.a < 3)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # equality : inequality in WHERE
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2)
+GROUP BY t1.a
+HAVING (t1.a = 3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b > 2) AND (t1.a = 3)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # inequality : equality in WHERE
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a < 3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14) AND (t1.a < 3)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # equality : equality in WHERE
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,t1.b,MAX(t1.c)
+FROM t1
+WHERE (t1.b = 14) AND (t1.a = 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # equality : equality in WHERE, impossible WHERE
+let $query=
+SELECT t1.a,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.c)
+FROM t1
+WHERE (t1.a = 3) AND (t1.a = 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # equality : equality in WHERE (equal through constant)
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c = 1)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c = 1) AND (t1.a = 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # inequality : AND formula in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a > 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3) AND (t1.a > 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # equality : AND formula in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.c > 0) AND (t1.c < 3) AND (t1.a = 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # equality : AND formula in WHERE, impossible WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 0) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 0) AND (t1.c < 3) AND (t1.a = 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 0) AND (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 0) AND (t1.a = 3) AND (t1.a = 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.b = 2) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.a = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.b = 2) AND (t3.d = 1) AND (t3.a = 1)
+GROUP BY t3.a,t3.b,t3.d;
+eval $no_pushdown explain format=json $query;
+
+--echo # inequality : OR formula in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) OR (t1.c < 3)) AND (t1.a < 2)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a
+HAVING (t1.a = 2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b)
+FROM t1
+WHERE ((t1.a = 1) OR (t1.a = 3)) AND (t1.a = 2)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # AND formula : inequality in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND (t1.a < 4) AND (t1.a > 0)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # AND formula : equality in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.a > 0);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a < 4) AND (t1.a > 0)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # OR formula : inequality in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND ((t1.a < 4) OR (t1.a > 0))
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # OR formula : equality in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.a < 4) OR (t1.a > 0);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND ((t1.a < 4) OR (t1.a > 0))
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # AND formula : AND formula in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) AND (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) AND (t1.c < 3)) AND
+ (t1.a < 4)
+GROUP BY t1.a
+HAVING (t1.c > 1);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a = 1) AND (t1.c < 3)) AND
+ ((t1.a < 4) AND (t1.c > 1))
+GROUP BY t1.a,t1.c;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a = 1) AND (t1.c = 3)) AND
+ ((t1.a < 4) AND (t1.c > 1))
+GROUP BY t1.a,t1.c;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b
+HAVING (t3.b = 2) AND (t3.d > 0);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1) AND
+ (t3.b = 2)
+GROUP BY t3.a,t3.b
+HAVING (t3.d > 0);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1)
+GROUP BY t3.a,t3.b,t3.d
+HAVING (t3.b = 2) AND (t3.d > 0);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a = 1) AND (t3.d = 1) AND
+ (t3.b = 2) AND (t3.d > 0)
+GROUP BY t3.a,t3.b,t3.d;
+eval $no_pushdown explain format=json $query;
+
+--echo # AND formula : OR formula in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a
+HAVING (t1.a < 4) AND (t1.c > 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) OR (t1.c < 3)) AND
+ (t1.a < 4)
+GROUP BY t1.a
+HAVING (t1.c > 1);
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a > 1) OR (t1.c < 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a < 4) AND (t1.c > 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a > 1) OR (t1.c < 3)) AND
+ (t1.a < 4) AND (t1.c > 1)
+GROUP BY t1.a,t1.c;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) OR (t1.a = 3)
+GROUP BY t1.a,t1.c
+HAVING (t1.a = 4) OR (t1.c > 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE ((t1.a = 1) OR (t1.a = 3)) AND
+ ((t1.a = 4) OR (t1.c > 1))
+GROUP BY t1.a,t1.c;
+eval $no_pushdown explain format=json $query;
+
+--echo # equality : pushdown through equality in WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c) AND (t1.c = 1)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # OR formula : pushdown through equality
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 1) OR (t1.c = 2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c) AND
+ ((t1.c = 1) OR (t1.c = 2))
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # OR formula : pushdown through equality, impossible WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c)
+GROUP BY t1.a
+HAVING (t1.c = 3) OR (t1.c = 2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.a = t1.c) AND
+ ((t1.c = 3) OR (t1.c = 2))
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # AND formula : pushdown through equality, impossible WHERE
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a,t1.c
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3) AND
+ (t1.a > 2) AND (t1.a = t1.c)
+GROUP BY t1.a,t1.c;
+eval $no_pushdown explain format=json $query;
+
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1)
+GROUP BY t1.a
+HAVING (t1.c = 3) AND (t1.a > 2) AND (t1.a = t1.c);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+WHERE (t1.a = 1) AND (t1.c = 3) AND
+ (t1.a > 2) AND (t1.a = t1.c)
+GROUP BY t1.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # AND formula with OR subformula : AND condition in WHERE
+let $query=
+SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND ((t3.d = 1) OR (t3.d > 1));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t3.a,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2)) AND
+ (t3.a = t3.d) AND ((t3.d = 1) OR (t3.d > 1))
+GROUP BY t3.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # AND formula with OR subformula : AND condition in WHERE
+let $query=
+SELECT t3.a,MAX(t3.b),t3.c,t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2))
+GROUP BY t3.a
+HAVING (t3.a = t3.d) AND (((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+let $query=
+SELECT t3.a,t3.b,MAX(t3.c),t3.d
+FROM t3
+WHERE (t3.a > 1) AND ((t3.c = 3) OR (t3.c < 2)) AND
+ (t3.a = t3.d) AND (((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1))
+GROUP BY t3.a;
+eval $no_pushdown explain format=json $query;
+
+--echo # prepare statement
+PREPARE stmt1 from "
+SELECT t1.a,MAX(t1.b),t1.c
+FROM t1
+GROUP BY t1.a
+HAVING (t1.a = 1)
+";
+execute stmt1;
+execute stmt1;
+deallocate prepare stmt1;
+
+DROP TABLE t1,t3;
+
+
+--echo #
+--echo # MDEV-19185: pushdown constant function with subquery
+--echo #
+
+CREATE TABLE t1 (pk INT, c1 VARCHAR(64));
+INSERT INTO t1 VALUES (1,'bbb'),(2,'aaa'),(3,'ccc');
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+SELECT pk
+FROM t1
+GROUP BY pk
+HAVING (1 NOT IN (SELECT COUNT(t1.c1) FROM (v1, t1)));
+
+DROP TABLE t1;
+DROP VIEW v1;
+
+
+--echo #
+--echo # MDEV-19186: temporary table defined with view field in HAVING
+--echo #
+
+CREATE TABLE t1 (pk INT, x VARCHAR(10));
+INSERT INTO t1 VALUES (1,'y'),(2,'s'),(3,'aaa');
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+CREATE TABLE t2 (pk INT, x VARCHAR(10));
+INSERT INTO t2 VALUES (1,'aa'),(2,'t'),(3,'bb');
+
+CREATE TABLE tmp1
+SELECT v1.pk
+FROM t2,v1
+WHERE v1.x = t2.x
+GROUP BY v1.pk
+HAVING (v1.pk = 1);
+
+DROP TABLE t1,t2,tmp1;
+DROP VIEW v1;
+
+--echo #
+--echo # MDEV-19164: pushdown of condition with cached items
+--echo #
+
+create table t1 (d1 date);
+insert into t1 values (null),('1971-03-06'),('1993-06-05'),('1998-07-08');
+
+let $q1=
+select d1 from t1
+ group by d1
+ having d1 between (inet_aton('1978-04-27')) and '2018-08-26';
+
+eval $q1;
+eval explain extended $q1;
+eval explain format=json $q1;
+
+delete from t1;
+insert into t1 values ('2018-01-15'),('2018-02-20');
+
+let $q2=
+select d1 from t1
+ group by d1
+ having d1 not between 0 AND exp(0);
+
+eval $q2;
+eval explain extended $q2;
+eval explain format=json $q2;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-19245: Impossible WHERE should be noticed earlier
+--echo # after HAVING pushdown
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, c INT);
+INSERT INTO t1 VALUES (1,2,1),(3,2,2),(5,6,4),(3,4,1);
+
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a > 3 GROUP BY t1.a HAVING t1.a = 3;
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a = 3 GROUP BY t1.a HAVING t1.a > 3;
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a > 3 AND t1.a = 3 GROUP BY t1.a ;
+
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE (t1.a < 2 OR t1.c > 1) GROUP BY t1.a HAVING t1.a = 3;
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a = 3 GROUP BY t1.a HAVING (t1.a < 2 OR t1.a > 3);
+EXPLAIN SELECT t1.a,MAX(t1.b) FROM t1
+WHERE t1.a = 3 AND (t1.a < 2 OR t1.a > 3) GROUP BY t1.a;
+
+EXPLAIN SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE (t1.a < 2 AND t1.c > 1) GROUP BY t1.a HAVING t1.a = 3;
+EXPLAIN SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE t1.a = 3 GROUP BY t1.a HAVING (t1.a < 2 AND t1.c > 1);
+EXPLAIN SELECT t1.a,MAX(t1.b),t1.c FROM t1
+WHERE t1.a = 3 AND (t1.a < 2 AND t1.b > 3) GROUP BY t1.a;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-21184: Constant subquery in condition movable to WHERE
+--echo #
+
+CREATE TABLE t1(a int, b int);
+INSERT INTO t1 VALUES
+ (1,10), (2,20), (1,11), (1,15), (2,20), (1,10), (2,21);
+
+CREATE TABLE t2 (c INT);
+INSERT INTO t2 VALUES (2),(3);
+
+let $q=
+SELECT a FROM t1 GROUP BY a HAVING a = 8 OR a = ( SELECT MIN(c) FROM t2 );
+
+eval EXPLAIN FORMAT=JSON $q;
+eval $q;
+
+let $q=
+SELECT a FROM t1 GROUP BY a,b
+ HAVING ( a = 8 OR a = ( SELECT MIN(c) FROM t2 ) ) and b < 20;
+
+eval EXPLAIN FORMAT=JSON $q;
+eval $q;
+
+let $q=
+SELECT a FROM t1 GROUP BY a
+ HAVING ( a = 8 OR a = ( SELECT MIN(c) FROM t2 ) ) and SUM(b) > 20;
+
+eval EXPLAIN FORMAT=JSON $q;
+eval $q;
+
+let $q=
+SELECT a FROM t1 GROUP BY a HAVING a = ( SELECT MIN(c) FROM t2 );
+
+eval EXPLAIN FORMAT=JSON $q;
+eval $q;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order or Assertion `fixed == 1'
+--echo #
+
+CREATE TABLE t1 (i int NOT NULL);
+SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL);
+SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0);
+SELECT * FROM t1 GROUP BY i HAVING i='1' IN ( i IS NULL AND 'x' = 0);
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-28080: HAVING with NOT EXIST predicate in an equality
+--echo # (fixed by the patch for MDEV-26402)
+--echo #
+
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (b int);
+INSERT INTO t1 VALUES (0), (1), (1), (0);
+INSERT INTO t2 VALUES (3), (7);
+
+SELECT a FROM t1
+ GROUP BY a HAVING a= (NOT EXISTS (SELECT b FROM t2 WHERE b = 1));
+SELECT a FROM t1
+ GROUP BY a HAVING a= (NOT EXISTS (SELECT b FROM t2 WHERE b = 7));
+
+DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-28082: HAVING with IS NULL predicate in an equality
+--echo # (fixed by the patch for MDEV-26402)
+--echo #
+
+CREATE TABLE t1 (a int, b int NOT NULL) ;
+INSERT INTO t1 VALUES (1,10), (0,11), (0,11), (1,10);
+
+SELECT a,b FROM t1 GROUP BY a HAVING a = (b IS NULL);
+
+SELECT a,b FROM t1 GROUP BY a,b HAVING a = (b IS NULL);
+
+DROP TABLE t1;
+
+--echo End of 10.4 tests
diff --git a/mysql-test/main/help.result b/mysql-test/main/help.result
index a3a236ee89e..2e5fcff2edc 100644
--- a/mysql-test/main/help.result
+++ b/mysql-test/main/help.result
@@ -255,10 +255,10 @@ help 'impossible_category_1';
source_category_name name is_it_category
impossible_category_1 impossible_function_1 N
impossible_category_1 impossible_function_2 N
-alter table mysql.help_relation engine=myisam;
-alter table mysql.help_keyword engine=myisam;
-alter table mysql.help_topic engine=myisam;
-alter table mysql.help_category engine=myisam;
+alter table mysql.help_relation engine=aria;
+alter table mysql.help_keyword engine=aria;
+alter table mysql.help_topic engine=aria;
+alter table mysql.help_category engine=aria;
delete from mysql.help_topic where help_topic_id=@topic1_id;
delete from mysql.help_topic where help_topic_id=@topic2_id;
delete from mysql.help_topic where help_topic_id=@topic3_id;
diff --git a/mysql-test/main/help.test b/mysql-test/main/help.test
index 4f1ec5cef70..c464e4812bc 100644
--- a/mysql-test/main/help.test
+++ b/mysql-test/main/help.test
@@ -98,10 +98,10 @@ help 'impossible_function_1';
help 'impossible_category_1';
##############
-alter table mysql.help_relation engine=myisam;
-alter table mysql.help_keyword engine=myisam;
-alter table mysql.help_topic engine=myisam;
-alter table mysql.help_category engine=myisam;
+alter table mysql.help_relation engine=aria;
+alter table mysql.help_keyword engine=aria;
+alter table mysql.help_topic engine=aria;
+alter table mysql.help_category engine=aria;
delete from mysql.help_topic where help_topic_id=@topic1_id;
delete from mysql.help_topic where help_topic_id=@topic2_id;
diff --git a/mysql-test/main/implicit_commit.result b/mysql-test/main/implicit_commit.result
index b0cd0b75e8d..911aec085d8 100644
--- a/mysql-test/main/implicit_commit.result
+++ b/mysql-test/main/implicit_commit.result
@@ -1035,6 +1035,16 @@ YES
# SQLCOM_BACKUP
#
#
+# SQLCOM_BACKUP_LOCK
+#
+INSERT INTO db1.trans VALUES (1);
+BACKUP LOCK t1;
+ROLLBACK;
+BACKUP UNLOCK;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
# SQLCOM_SHOW_ARCHIVE
#
#
diff --git a/mysql-test/main/implicit_commit.test b/mysql-test/main/implicit_commit.test
index bcc43865395..09f2e2e921e 100644
--- a/mysql-test/main/implicit_commit.test
+++ b/mysql-test/main/implicit_commit.test
@@ -1115,6 +1115,16 @@ source include/implicit_commit_helper.inc;
#source include/implicit_commit_helper.inc;
--echo #
+--echo # SQLCOM_BACKUP_LOCK
+--echo #
+
+INSERT INTO db1.trans VALUES (1);
+BACKUP LOCK t1;
+ROLLBACK;
+BACKUP UNLOCK;
+CALL db1.test_if_commit();
+
+--echo #
--echo # SQLCOM_SHOW_ARCHIVE
--echo #
diff --git a/mysql-test/main/in_subq_cond_pushdown.result b/mysql-test/main/in_subq_cond_pushdown.result
new file mode 100644
index 00000000000..eef320d2d04
--- /dev/null
+++ b/mysql-test/main/in_subq_cond_pushdown.result
@@ -0,0 +1,3889 @@
+CREATE TABLE t1 (a INT, b INT, c INT, d INT);
+CREATE TABLE t2 (e INT, f INT, g INT);
+CREATE TABLE t3 (x INT, y INT);
+INSERT INTO t1 VALUES
+(1,1,18,1), (2,1,25,1), (1,3,40,1), (2,3,40,4),
+(4,2,24,4), (3,2,23,1), (1,2,40,2), (3,4,17,2),
+(5,5,65,1), (2,3,70,3), (1,4,35,3), (2,3,25,3),
+(2,2,40,4), (1,4,55,1), (5,3,72,4), (1,2,70,5);
+INSERT INTO t2 VALUES
+(1,2,38), (2,3,15), (1,3,40), (1,4,35),
+(2,2,70), (3,4,23), (5,5,12), (5,4,17),
+(3,3,17), (4,2,24), (2,5,25), (5,1,65);
+INSERT INTO t3 VALUES
+(1,25), (1,18), (2,15), (4,24),
+(1,35), (3,23), (3,17), (2,15);
+CREATE VIEW v1 AS
+(
+SELECT t3.x AS v1_x, t3.y AS v1_y FROM t3 WHERE t3.x<=3
+);
+CREATE VIEW v2 AS
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.e
+HAVING max_g>25
+);
+# conjunctive subformula : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.c<25 AND
+(t1.a,t1.c) IN (SELECT t2.e,MAX(t2.g) FROM t2 WHERE t2.e<5 GROUP BY t2.e);
+a b c d
+4 2 24 4
+3 2 23 1
+SELECT * FROM t1
+WHERE t1.c<25 AND
+(t1.a,t1.c) IN (SELECT t2.e,MAX(t2.g) FROM t2 WHERE t2.e<5 GROUP BY t2.e);
+a b c d
+4 2 24 4
+3 2 23 1
+EXPLAIN SELECT * FROM t1
+WHERE t1.c<25 AND
+(t1.a,t1.c) IN (SELECT t2.e,MAX(t2.g) FROM t2 WHERE t2.e<5 GROUP BY t2.e);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.c<25 AND
+(t1.a,t1.c) IN (SELECT t2.e,MAX(t2.g) FROM t2 WHERE t2.e<5 GROUP BY t2.e);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c < 25 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` < 25",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted AND formula : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.c>55 AND t1.b<4 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+SELECT * FROM t1
+WHERE t1.c>55 AND t1.b<4 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE t1.c>55 AND t1.b<4 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.c>55 AND t1.b<4 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c > 55 and t1.b < 4 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` > 55 and t2.f < 4",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted OR formula : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.c>60 OR t1.c<25) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+2 3 70 3
+SELECT * FROM t1
+WHERE (t1.c>60 OR t1.c<25) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE (t1.c>60 OR t1.c<25) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.c>60 OR t1.c<25) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.c > 60 or t1.c < 25) and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted AND-OR formula : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE ((t1.c>60 OR t1.c<25) AND t1.b>2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+SELECT * FROM t1
+WHERE ((t1.c>60 OR t1.c<25) AND t1.b>2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE ((t1.c>60 OR t1.c<25) AND t1.b>2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE ((t1.c>60 OR t1.c<25) AND t1.b>2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.c > 60 or t1.c < 25) and t1.b > 2 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25) and t2.f > 2",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.d>3) AND t1.b>1) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+1 2 40 2
+SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.d>3) AND t1.b>1) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+1 2 40 2
+EXPLAIN SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.d>3) AND t1.b>1) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.d>3) AND t1.b>1) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 2 or t1.d > 3) and t1.b > 1 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "t2.f > 1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using view IN subquery defINition : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.c>20 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+a b c d
+3 2 23 1
+SELECT * FROM t1
+WHERE t1.c>20 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+a b c d
+3 2 23 1
+EXPLAIN SELECT * FROM t1
+WHERE t1.c>20 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t3 ALL NULL NULL NULL NULL 8 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.c>20 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c > 20 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["v1_x", "MAX(v1_y)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(v1_y)` > 20",
+ "temporary_table": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 8,
+ "filtered": 100,
+ "attached_condition": "t3.x > 1 and t3.x <= 3"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using equality : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1,v1
+WHERE t1.c>20 AND t1.c=v1_y AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d v1_x v1_y
+3 2 23 1 3 23
+SELECT * FROM t1,v1
+WHERE t1.c>20 AND t1.c=v1_y AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d v1_x v1_y
+3 2 23 1 3 23
+EXPLAIN SELECT * FROM t1,v1
+WHERE t1.c>20 AND t1.c=v1_y AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 8 Using where
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t3.y 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1,v1
+WHERE t1.c>20 AND t1.c=v1_y AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 8,
+ "filtered": 100,
+ "attached_condition": "t3.y > 20 and t3.x <= 3 and t3.y is not null"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL",
+ "attached_condition": "t1.c = t3.y and t1.a is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t3.y"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` > 20",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a<2 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+1 2 40 2
+SELECT * FROM t1
+WHERE t1.a<2 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+1 2 40 2
+EXPLAIN SELECT * FROM t1
+WHERE t1.a<2 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a<2 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a < 2 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e < 2"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted AND formula : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a>2 AND t1.a<5 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+3 2 23 1
+SELECT * FROM t1
+WHERE t1.a>2 AND t1.a<5 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+3 2 23 1
+EXPLAIN SELECT * FROM t1
+WHERE t1.a>2 AND t1.a<5 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a>2 AND t1.a<5 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 2 and t1.a < 5 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e > 2 and t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted OR formula : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.a<2 OR t1.a>=4) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+4 2 24 4
+1 2 40 2
+SELECT * FROM t1
+WHERE (t1.a<2 OR t1.a>=4) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+4 2 24 4
+1 2 40 2
+EXPLAIN SELECT * FROM t1
+WHERE (t1.a<2 OR t1.a>=4) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.a<2 OR t1.a>=4) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 2 or t1.a >= 4) and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e >= 4)"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted AND-OR formula : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+1 4 35 3
+SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+1 4 35 3
+EXPLAIN SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 2 or t1.a = 5) and t1.b > 3 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted AND-OR formula : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+1 4 35 3
+SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+1 4 35 3
+EXPLAIN SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 2 or t1.a = 5) and t1.b > 3 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.d>2) AND t1.a<2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 2 40 2
+SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.d>2) AND t1.a<2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 2 40 2
+EXPLAIN SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.d>2) AND t1.a<2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.d>2) AND t1.a<2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.b < 3 or t1.d > 2) and t1.a < 2 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e < 2"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using equalities : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.d=1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+SELECT * FROM t1
+WHERE t1.d=1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+EXPLAIN SELECT * FROM t1
+WHERE t1.d=1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 const,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.d=1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a = 1 and t1.d = 1 and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["const", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e = 1"
+ }
+ }
+ }
+ }
+ }
+}
+# using equality : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.d>1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+SELECT * FROM t1
+WHERE t1.d>1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+EXPLAIN SELECT * FROM t1
+WHERE t1.d>1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.d>1 AND t1.a=t1.d AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.d = t1.a and t1.a > 1 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using view IN subquery definition : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a<3 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+a b c d
+SELECT * FROM t1
+WHERE t1.a<3 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+a b c d
+EXPLAIN SELECT * FROM t1
+WHERE t1.a<3 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t3 ALL NULL NULL NULL NULL 8 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a<3 AND
+(t1.a,t1.c) IN
+(
+SELECT v1_x,MAX(v1_y)
+FROM v1
+WHERE v1_x>1
+GROUP BY v1_x
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a < 3 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["v1_x", "MAX(v1_y)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 8,
+ "filtered": 100,
+ "attached_condition": "t3.x > 1 and t3.x <= 3 and t3.x < 3"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using equality : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1,v1
+WHERE t1.a=v1_x AND v1_x<2 AND v1_y>30 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d v1_x v1_y
+1 3 40 1 1 35
+1 2 40 2 1 35
+SELECT * FROM t1,v1
+WHERE t1.a=v1_x AND v1_x<2 AND v1_y>30 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d v1_x v1_y
+1 3 40 1 1 35
+1 2 40 2 1 35
+EXPLAIN SELECT * FROM t1,v1
+WHERE t1.a=v1_x AND v1_x<2 AND v1_y>30 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 8 Using where
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t3.x,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1,v1
+WHERE t1.a=v1_x AND v1_x<2 AND v1_y>30 AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 8,
+ "filtered": 100,
+ "attached_condition": "t3.x < 2 and t3.y > 30 and t3.x <= 3 and t3.x is not null"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "119",
+ "join_type": "BNL",
+ "attached_condition": "t1.a = t3.x and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t3.x", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e <= 3"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+# extracted OR formula : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.b=4) AND t1.a<3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 2 40 2
+SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.b=4) AND t1.a<3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 2 40 2
+EXPLAIN SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.b=4) AND t1.a<3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.b=4) AND t1.a<3) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "(t1.b < 3 or t1.b = 4) and t1.a < 3 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "t2.f < 3 or t2.f = 4",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e < 3"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using addition : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.a+t1.c>41) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+SELECT * FROM t1
+WHERE (t1.a+t1.c>41) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE (t1.a+t1.c>41) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.a+t1.c>41) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a + t1.c > 41 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "t2.e + `MAX(t2.g)` > 41",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using substitution : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.c-t1.a<35) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+3 2 23 1
+SELECT * FROM t1
+WHERE (t1.c-t1.a<35) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+4 2 24 4
+3 2 23 1
+EXPLAIN SELECT * FROM t1
+WHERE (t1.c-t1.a<35) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.c-t1.a<35) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c - t1.a < 35 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` - t2.e < 35",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using multiplication : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.c*t1.a>100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+SELECT * FROM t1
+WHERE (t1.c*t1.a>100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE (t1.c*t1.a>100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.c*t1.a>100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c * t1.a > 100 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` * t2.e > 100",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using division : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.c/t1.a>30) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+1 2 40 2
+2 3 70 3
+SELECT * FROM t1
+WHERE (t1.c/t1.a>30) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+1 2 40 2
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE (t1.c/t1.a>30) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.c/t1.a>30) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c / t1.a > 30 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` / t2.e > 30",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using BETWEEN : pushing into HAVING
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.c BETWEEN 50 AND 100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+SELECT * FROM t1
+WHERE (t1.c BETWEEN 50 AND 100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE (t1.c BETWEEN 50 AND 100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.c BETWEEN 50 AND 100) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c between 50 and 100 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "`MAX(t2.g)` between 50 and 100",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using addition : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.a+t1.b > 5) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+4 2 24 4
+SELECT * FROM t1
+WHERE (t1.a+t1.b > 5) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+4 2 24 4
+EXPLAIN SELECT * FROM t1
+WHERE (t1.a+t1.b > 5) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.a+t1.b > 5) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a + t1.b > 5 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e + t2.f > 5"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using substitution : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.a-t1.b > 0) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+4 2 24 4
+SELECT * FROM t1
+WHERE (t1.a-t1.b > 0) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+4 2 24 4
+EXPLAIN SELECT * FROM t1
+WHERE (t1.a-t1.b > 0) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.a-t1.b > 0) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a - t1.b > 0 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e - t2.f > 0"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using multiplication : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.a*t1.b > 6) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+4 2 24 4
+SELECT * FROM t1
+WHERE (t1.a*t1.b > 6) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+4 2 24 4
+EXPLAIN SELECT * FROM t1
+WHERE (t1.a*t1.b > 6) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.a*t1.b > 6) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a * t1.b > 6 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e * t2.f > 6"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using division : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.b/t1.a > 2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+1 3 40 1
+1 4 35 3
+SELECT * FROM t1
+WHERE (t1.b/t1.a > 2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+a b c d
+1 3 40 1
+1 4 35 3
+EXPLAIN SELECT * FROM t1
+WHERE (t1.b/t1.a > 2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.b/t1.a > 2) AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e,t2.f
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.b / t1.a > 2 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.f / t2.e > 2"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula using BETWEEN : pushing into WHERE
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.a BETWEEN 1 AND 3) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+3 2 23 1
+1 2 40 2
+2 3 70 3
+SELECT * FROM t1
+WHERE (t1.a BETWEEN 1 AND 3) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+a b c d
+1 3 40 1
+3 2 23 1
+1 2 40 2
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE (t1.a BETWEEN 1 AND 3) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.a BETWEEN 1 AND 3) AND
+(t1.a,t1.c) IN
+(
+SELECT t2.e,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a between 1 and 3 and t1.a is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["e", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e between 1 and 3"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into HAVING of the IN subquery
+# conjunctive subformula : pushing into WHERE of the view from the IN subquery
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.c>3 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+a b c d
+1 2 40 2
+2 3 70 3
+SELECT * FROM t1
+WHERE t1.c>3 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+a b c d
+1 2 40 2
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE t1.c>3 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using temporary
+3 DERIVED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.c>3 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.c > 3 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "MAX(v2.f)", "max_g"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "v2.max_g > 3",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "v2.e < 5",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "max_g > 25",
+ "filesort": {
+ "sort_key": "t2.e",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE of the IN subquery
+# conjunctive subformula : pushing into WHERE of the view
+# from the IN subquery
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+a b c d
+2 3 70 3
+SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+a b c d
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using temporary
+3 DERIVED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "MAX(v2.f)", "max_g"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "v2.e < 5 and v2.e > 1",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "max_g > 25",
+ "filesort": {
+ "sort_key": "t2.e",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE and HAVING
+# of the IN subquery
+# conjunctive subformula : pushing into WHERE of the view
+# from the IN subquery
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a>1 AND t1.c<100 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+a b c d
+2 3 70 3
+SELECT * FROM t1
+WHERE t1.a>1 AND t1.c<100 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+a b c d
+2 3 70 3
+EXPLAIN SELECT * FROM t1
+WHERE t1.a>1 AND t1.c<100 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using temporary
+3 DERIVED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a>1 AND t1.c<100 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT v2.e,MAX(v2.f),v2.max_g
+FROM v2
+WHERE v2.e<5
+GROUP BY v2.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.c < 100 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "MAX(v2.f)", "max_g"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "v2.max_g < 100",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "v2.e < 5 and v2.e > 1",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "max_g > 25",
+ "filesort": {
+ "sort_key": "t2.e",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.e > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE of the IN subquery
+# extracted AND formula : pushing into HAVING of the derived table
+# from the IN subquery
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+a b c d
+2 3 40 4
+SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+a b c d
+2 3 40 4
+EXPLAIN SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using temporary
+3 DERIVED t2 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "MAX(d_tab.f)", "max_g"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "d_tab.e < 5 and d_tab.e > 1",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1",
+ "filesort": {
+ "sort_key": "t2.f",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into HAVING of the derived table
+# conjunctive subformula : pushing into WHERE of the IN subquery from
+# the derived table
+SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.e<5
+GROUP BY t2.e
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.b>2;
+x y a b max_c
+2 15 2 3 70
+2 15 2 3 70
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+a b c d
+2 3 40 4
+SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+a b c d
+2 3 40 4
+EXPLAIN SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using temporary
+3 DERIVED t2 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "MAX(d_tab.f)", "max_g"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "d_tab.e < 5 and d_tab.e > 1",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1",
+ "filesort": {
+ "sort_key": "t2.f",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE of the derived table
+# extracted AND formula : pushing into WHERE of the IN subquery from
+# the derived table
+SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5;
+x y a b max_c
+2 15 2 3 70
+4 24 4 2 24
+2 15 2 3 70
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+a b c d
+2 3 40 4
+SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+a b c d
+2 3 40 4
+EXPLAIN SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 12 Using where; Using temporary
+3 DERIVED t2 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+FROM
+(
+SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+FROM t2
+GROUP BY t2.f
+HAVING max_g>25
+) as d_tab
+WHERE d_tab.e<5
+GROUP BY d_tab.e
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "MAX(d_tab.f)", "max_g"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "d_tab.e < 5 and d_tab.e > 1",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1",
+ "filesort": {
+ "sort_key": "t2.f",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE and HAVING
+# of the derived table
+# extracted AND formula : pushing into WHERE of the IN subquery
+# from the derived table
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+x y a b max_c
+4 24 4 2 24
+SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+x y a b max_c
+4 24 4 2 24
+EXPLAIN SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 8 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t3.x 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 16 Using where; Using temporary; Using filesort
+2 DERIVED <subquery3> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+3 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 8,
+ "filtered": 100,
+ "attached_condition": "t3.x < 5 and t3.x is not null"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t3.x"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "d_tab.max_c < 70",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "max_c < 70",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a < 5 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery3>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "t2.f < 5",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e > 1 and t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE of the derived table
+# conjunctive subformula : pushing into HAVING of the IN subquery from
+# the derived table
+SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE (t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+WHERE t2.f<4
+GROUP BY t2.f
+)
+GROUP BY t1.a
+HAVING t1.b<5
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5;
+x y a b max_c
+1 25 1 2 70
+1 18 1 2 70
+2 15 2 3 40
+1 35 1 2 70
+2 15 2 3 40
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+x y a b max_c
+4 24 4 2 24
+SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+x y a b max_c
+4 24 4 2 24
+EXPLAIN SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 8 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t3.x 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 16 Using where; Using temporary; Using filesort
+2 DERIVED <subquery3> eq_ref distinct_key distinct_key 12 test.t1.a,test.t1.b,test.t1.c 1
+3 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT *
+FROM t3,
+(
+SELECT t1.a,t1.b,max(t1.c) as max_c
+FROM t1
+WHERE t1.a>1 AND
+(t1.a,t1.b,t1.c) IN
+(
+SELECT t2.e,t2.f,MAX(t2.g)
+FROM t2
+GROUP BY t2.e
+HAVING t2.f<5
+)
+GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 8,
+ "filtered": 100,
+ "attached_condition": "t3.x < 5 and t3.x is not null"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t3.x"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "d_tab.max_c < 70",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "max_c < 70",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.a > 1 and t1.a < 5 and t1.a is not null and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery3>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["e", "f", "MAX(t2.g)"],
+ "ref": ["test.t1.a", "test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "t2.f < 5",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e > 1 and t2.e < 5"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+# using WINDOW FUNCTIONS : using MAX function
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, MAX(t2.g) OVER (PARTITION BY t2.f)
+FROM t2
+WHERE t2.e<5
+)
+;
+a b c d
+1 3 40 1
+2 3 40 4
+1 4 35 3
+1 2 70 5
+SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, MAX(t2.g) OVER (PARTITION BY t2.f)
+FROM t2
+WHERE t2.e<5
+)
+;
+a b c d
+1 3 40 1
+2 3 40 4
+1 4 35 3
+1 2 70 5
+EXPLAIN SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, MAX(t2.g) OVER (PARTITION BY t2.f)
+FROM t2
+WHERE t2.e<5
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.b,test.t1.c 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, MAX(t2.g) OVER (PARTITION BY t2.f)
+FROM t2
+WHERE t2.e<5
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.b > 1 and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "8",
+ "used_key_parts": ["f", "MAX(t2.g) OVER (PARTITION BY t2.f)"],
+ "ref": ["test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t2.f"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.f > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+# using WINDOW FUNCTIONS : using SUM function
+SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)
+FROM t2
+WHERE t2.e<5
+)
+;
+a b c d
+5 3 72 4
+SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)
+FROM t2
+WHERE t2.e<5
+)
+;
+a b c d
+5 3 72 4
+EXPLAIN SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)
+FROM t2
+WHERE t2.e<5
+)
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 16 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 12 test.t1.b,test.t1.c 1 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 12 Using where; Using temporary
+EXPLAIN FORMAT=JSON SELECT * FROM t1
+WHERE (t1.b>1) AND
+(t1.b, t1.c) IN
+(
+SELECT t2.f, CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)
+FROM t2
+WHERE t2.e<5
+)
+;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 16,
+ "filtered": 100,
+ "attached_condition": "t1.b > 1 and t1.b is not null and t1.c is not null"
+ },
+ "table": {
+ "table_name": "<subquery2>",
+ "access_type": "eq_ref",
+ "possible_keys": ["distinct_key"],
+ "key": "distinct_key",
+ "key_length": "12",
+ "used_key_parts": ["f", "CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)"],
+ "ref": ["test.t1.b", "test.t1.c"],
+ "rows": 1,
+ "filtered": 100,
+ "attached_condition": "t1.c = `<subquery2>`.`CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)`",
+ "materialized": {
+ "unique": 1,
+ "query_block": {
+ "select_id": 2,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t2.f"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "t2.e < 5 and t2.f > 1"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+DROP TABLE t1,t2,t3;
+DROP VIEW v1,v2;
+#
+# MDEV-16721: IN-subquery defined with the AUTO-INCREMENT column
+# and used with the ZEROFILL column
+#
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
+CREATE TABLE t2 (b INT ZEROFILL);
+INSERT INTO t2 VALUES (2), (3);
+SELECT *
+FROM t2
+WHERE t2.b IN (SELECT MIN(t1.a) from t1);
+b
+DROP TABLE t1, t2;
+#
+# MDEV-16730: server fault caused by pushdown into the derived table
+# condition that joins IN subquery and parent select
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+SELECT *
+FROM (SELECT DISTINCT * FROM t1) AS tbl
+WHERE tbl.a IN
+(
+SELECT COUNT(t1.a)
+FROM t1
+WHERE (t1.a!=1)
+);
+a
+2
+DROP TABLE t1;
+#
+# MDEV-16727: failure assertion caused by the lamely saved list
+# of multiple equalities
+#
+CREATE TABLE t1 (a varchar(1));
+INSERT INTO t1 VALUES ('x'), ('y'), ('z');
+CREATE TABLE t2 (b varchar(1));
+INSERT INTO t2 VALUES ('x');
+CREATE TABLE t3 (c varchar(1));
+INSERT INTO t3 VALUES ('y');
+CREATE TABLE t4 (d varchar(1));
+INSERT INTO t4 VALUES ('x'), ('z');
+SELECT * FROM t1
+JOIN t2 ON (t1.a=t2.b)
+LEFT JOIN t3 ON (t1.a=t3.c)
+WHERE (t1.a) IN
+(
+SELECT t4.d
+FROM t4
+ORDER BY t4.d
+);
+a b c
+x x NULL
+DROP TABLE t1,t2,t3,t4;
+#
+# MDEV-17360: IN subquery predicate with outer reference in the left part
+# that refers to a field of a mergeable derived table
+#
+CREATE TABLE t1 (id1 int) ENGINE=MYISAM;
+INSERT INTO t1 VALUES (1814),(0),(NULL),(1);
+CREATE TABLE t2 (id2 int) ENGINE=MYISAM;
+SELECT 1 AS r FROM t2,t1,(SELECT * FROM t1) dt1
+WHERE NOT EXISTS (SELECT id2 FROM t2
+WHERE dt1.id1 IN (SELECT t2.id2 FROM t2
+HAVING t2.id2 >= 1));
+r
+DROP TABLE t1,t2;
+#
+# MDEV-17027: IN subquery predicate with outer reference in the left part
+# conjuncted with equality predicate
+#
+CREATE TABLE t1 (pk int, i1 int, v1 varchar(1));
+INSERT INTO t1 VALUES (3,2,'x'), (1,1,'y'), (4,2,'z');
+CREATE TABLE t2 (pk int, i1 int, v1 varchar(1));
+INSERT INTO t2 VALUES (5,2,'x'), (7,1,'x');
+CREATE TABLE t3 (pk int, i1 int, v1 varchar(1));
+INSERT INTO t3 VALUES (8,2,'x'), (7,1,'z');
+SELECT t3.i1 FROM t3
+WHERE EXISTS ( SELECT t2.v1 FROM t1,t2
+WHERE t1.v1 = t2.v1 AND
+t3.i1 IN (SELECT t.i1 FROM t1 as t
+GROUP BY i1 HAVING t.i1 < 3));
+i1
+2
+1
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/main/in_subq_cond_pushdown.test b/mysql-test/main/in_subq_cond_pushdown.test
new file mode 100644
index 00000000000..7763201cda1
--- /dev/null
+++ b/mysql-test/main/in_subq_cond_pushdown.test
@@ -0,0 +1,862 @@
+LET $no_pushdown=
+ SET STATEMENT optimizer_switch='condition_pushdown_for_subquery=off' FOR;
+
+CREATE TABLE t1 (a INT, b INT, c INT, d INT);
+CREATE TABLE t2 (e INT, f INT, g INT);
+CREATE TABLE t3 (x INT, y INT);
+
+INSERT INTO t1 VALUES
+(1,1,18,1), (2,1,25,1), (1,3,40,1), (2,3,40,4),
+(4,2,24,4), (3,2,23,1), (1,2,40,2), (3,4,17,2),
+(5,5,65,1), (2,3,70,3), (1,4,35,3), (2,3,25,3),
+(2,2,40,4), (1,4,55,1), (5,3,72,4), (1,2,70,5);
+
+INSERT INTO t2 VALUES
+(1,2,38), (2,3,15), (1,3,40), (1,4,35),
+(2,2,70), (3,4,23), (5,5,12), (5,4,17),
+(3,3,17), (4,2,24), (2,5,25), (5,1,65);
+
+INSERT INTO t3 VALUES
+(1,25), (1,18), (2,15), (4,24),
+(1,35), (3,23), (3,17), (2,15);
+
+CREATE VIEW v1 AS
+(
+ SELECT t3.x AS v1_x, t3.y AS v1_y FROM t3 WHERE t3.x<=3
+);
+
+CREATE VIEW v2 AS
+(
+ SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+ FROM t2
+ GROUP BY t2.e
+ HAVING max_g>25
+);
+
+--echo # conjunctive subformula : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE t1.c<25 AND
+ (t1.a,t1.c) IN (SELECT t2.e,MAX(t2.g) FROM t2 WHERE t2.e<5 GROUP BY t2.e);
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # extracted AND formula : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE t1.c>55 AND t1.b<4 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # extracted OR formula : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE (t1.c>60 OR t1.c<25) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # extracted AND-OR formula : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE ((t1.c>60 OR t1.c<25) AND t1.b>2) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.d>3) AND t1.b>1) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # using view IN subquery defINition : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE t1.c>20 AND
+ (t1.a,t1.c) IN
+ (
+ SELECT v1_x,MAX(v1_y)
+ FROM v1
+ WHERE v1_x>1
+ GROUP BY v1_x
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # using equality : pushing into WHERE
+LET $query=
+SELECT * FROM t1,v1
+WHERE t1.c>20 AND t1.c=v1_y AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE t1.a<2 AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # extracted AND formula : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE t1.a>2 AND t1.a<5 AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # extracted OR formula : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE (t1.a<2 OR t1.a>=4) AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # extracted AND-OR formula : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e,t2.f
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # extracted AND-OR formula : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE ((t1.a<2 OR t1.a=5) AND t1.b>3) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e,t2.f
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.d>2) AND t1.a<2) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # using equalities : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE t1.d=1 AND t1.a=t1.d AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # using equality : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE t1.d>1 AND t1.a=t1.d AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # using view IN subquery definition : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE t1.a<3 AND
+ (t1.a,t1.c) IN
+ (
+ SELECT v1_x,MAX(v1_y)
+ FROM v1
+ WHERE v1_x>1
+ GROUP BY v1_x
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # using equality : pushing into WHERE
+LET $query=
+SELECT * FROM t1,v1
+WHERE t1.a=v1_x AND v1_x<2 AND v1_y>30 AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+--echo # extracted OR formula : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE ((t1.b<3 OR t1.b=4) AND t1.a<3) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using addition : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE (t1.a+t1.c>41) AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using substitution : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE (t1.c-t1.a<35) AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using multiplication : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE (t1.c*t1.a>100) AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using division : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE (t1.c/t1.a>30) AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using BETWEEN : pushing into HAVING
+LET $query=
+SELECT * FROM t1
+WHERE (t1.c BETWEEN 50 AND 100) AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using addition : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE (t1.a+t1.b > 5) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e,t2.f
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using substitution : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE (t1.a-t1.b > 0) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e,t2.f
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using multiplication : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE (t1.a*t1.b > 6) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e,t2.f
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using division : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE (t1.b/t1.a > 2) AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e,t2.f
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula using BETWEEN : pushing into WHERE
+LET $query=
+SELECT * FROM t1
+WHERE (t1.a BETWEEN 1 AND 3) AND
+ (t1.a,t1.c) IN
+ (
+ SELECT t2.e,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into HAVING of the IN subquery
+--echo # conjunctive subformula : pushing into WHERE of the view from the IN subquery
+LET $query=
+SELECT * FROM t1
+WHERE t1.c>3 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT v2.e,MAX(v2.f),v2.max_g
+ FROM v2
+ WHERE v2.e<5
+ GROUP BY v2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE of the IN subquery
+--echo # conjunctive subformula : pushing into WHERE of the view
+--echo # from the IN subquery
+LET $query=
+SELECT * FROM t1
+WHERE t1.a>1 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT v2.e,MAX(v2.f),v2.max_g
+ FROM v2
+ WHERE v2.e<5
+ GROUP BY v2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE and HAVING
+--echo # of the IN subquery
+--echo # conjunctive subformula : pushing into WHERE of the view
+--echo # from the IN subquery
+LET $query=
+SELECT * FROM t1
+WHERE t1.a>1 AND t1.c<100 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT v2.e,MAX(v2.f),v2.max_g
+ FROM v2
+ WHERE v2.e<5
+ GROUP BY v2.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE of the IN subquery
+--echo # extracted AND formula : pushing into HAVING of the derived table
+--echo # from the IN subquery
+LET $query=
+SELECT * FROM t1
+WHERE t1.a>1 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT d_tab.e,MAX(d_tab.f),d_tab.max_g
+ FROM
+ (
+ SELECT t2.e, t2.f, MAX(t2.g) AS max_g
+ FROM t2
+ GROUP BY t2.f
+ HAVING max_g>25
+ ) as d_tab
+ WHERE d_tab.e<5
+ GROUP BY d_tab.e
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into HAVING of the derived table
+--echo # conjunctive subformula : pushing into WHERE of the IN subquery from
+--echo # the derived table
+SELECT *
+FROM t3,
+(
+ SELECT t1.a,t1.b,max(t1.c) as max_c
+ FROM t1
+ WHERE t1.a>1 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.e<5
+ GROUP BY t2.e
+ )
+ GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.b>2;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE of the derived table
+--echo # extracted AND formula : pushing into WHERE of the IN subquery from
+--echo # the derived table
+SELECT *
+FROM t3,
+(
+ SELECT t1.a,t1.b,max(t1.c) as max_c
+ FROM t1
+ WHERE t1.a>1 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ GROUP BY t2.e
+ HAVING t2.f<5
+ )
+ GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE and HAVING
+--echo # of the derived table
+--echo # extracted AND formula : pushing into WHERE of the IN subquery
+--echo # from the derived table
+LET $query=
+SELECT *
+FROM t3,
+(
+ SELECT t1.a,t1.b,max(t1.c) as max_c
+ FROM t1
+ WHERE t1.a>1 AND
+ (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ GROUP BY t2.e
+ HAVING t2.f<5
+ )
+ GROUP BY t1.a
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5 AND d_tab.max_c<70;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE of the derived table
+--echo # conjunctive subformula : pushing into HAVING of the IN subquery from
+--echo # the derived table
+SELECT *
+FROM t3,
+(
+ SELECT t1.a,t1.b,max(t1.c) as max_c
+ FROM t1
+ WHERE (t1.a,t1.b,t1.c) IN
+ (
+ SELECT t2.e,t2.f,MAX(t2.g)
+ FROM t2
+ WHERE t2.f<4
+ GROUP BY t2.f
+ )
+ GROUP BY t1.a
+ HAVING t1.b<5
+) AS d_tab
+WHERE d_tab.a=t3.x AND d_tab.a<5;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+--echo # using WINDOW FUNCTIONS : using MAX function
+LET $query=
+SELECT * FROM t1
+WHERE (t1.b>1) AND
+ (t1.b, t1.c) IN
+ (
+ SELECT t2.f, MAX(t2.g) OVER (PARTITION BY t2.f)
+ FROM t2
+ WHERE t2.e<5
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+--echo # using WINDOW FUNCTIONS : using SUM function
+LET $query=
+SELECT * FROM t1
+WHERE (t1.b>1) AND
+ (t1.b, t1.c) IN
+ (
+ SELECT t2.f, CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)
+ FROM t2
+ WHERE t2.e<5
+ )
+;
+
+EVAL $no_pushdown $query;
+EVAL $query;
+EVAL EXPLAIN $query;
+EVAL EXPLAIN FORMAT=JSON $query;
+
+DROP TABLE t1,t2,t3;
+DROP VIEW v1,v2;
+
+--echo #
+--echo # MDEV-16721: IN-subquery defined with the AUTO-INCREMENT column
+--echo # and used with the ZEROFILL column
+--echo #
+
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
+CREATE TABLE t2 (b INT ZEROFILL);
+
+INSERT INTO t2 VALUES (2), (3);
+
+SELECT *
+FROM t2
+WHERE t2.b IN (SELECT MIN(t1.a) from t1);
+
+DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-16730: server fault caused by pushdown into the derived table
+--echo # condition that joins IN subquery and parent select
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+
+SELECT *
+FROM (SELECT DISTINCT * FROM t1) AS tbl
+WHERE tbl.a IN
+(
+ SELECT COUNT(t1.a)
+ FROM t1
+ WHERE (t1.a!=1)
+);
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-16727: failure assertion caused by the lamely saved list
+--echo # of multiple equalities
+--echo #
+
+CREATE TABLE t1 (a varchar(1));
+INSERT INTO t1 VALUES ('x'), ('y'), ('z');
+
+CREATE TABLE t2 (b varchar(1));
+INSERT INTO t2 VALUES ('x');
+
+CREATE TABLE t3 (c varchar(1));
+INSERT INTO t3 VALUES ('y');
+
+CREATE TABLE t4 (d varchar(1));
+INSERT INTO t4 VALUES ('x'), ('z');
+
+SELECT * FROM t1
+JOIN t2 ON (t1.a=t2.b)
+LEFT JOIN t3 ON (t1.a=t3.c)
+WHERE (t1.a) IN
+(
+ SELECT t4.d
+ FROM t4
+ ORDER BY t4.d
+);
+
+DROP TABLE t1,t2,t3,t4;
+
+--echo #
+--echo # MDEV-17360: IN subquery predicate with outer reference in the left part
+--echo # that refers to a field of a mergeable derived table
+--echo #
+
+CREATE TABLE t1 (id1 int) ENGINE=MYISAM;
+INSERT INTO t1 VALUES (1814),(0),(NULL),(1);
+
+CREATE TABLE t2 (id2 int) ENGINE=MYISAM;
+
+SELECT 1 AS r FROM t2,t1,(SELECT * FROM t1) dt1
+ WHERE NOT EXISTS (SELECT id2 FROM t2
+ WHERE dt1.id1 IN (SELECT t2.id2 FROM t2
+ HAVING t2.id2 >= 1));
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-17027: IN subquery predicate with outer reference in the left part
+--echo # conjuncted with equality predicate
+--echo #
+
+CREATE TABLE t1 (pk int, i1 int, v1 varchar(1));
+INSERT INTO t1 VALUES (3,2,'x'), (1,1,'y'), (4,2,'z');
+
+CREATE TABLE t2 (pk int, i1 int, v1 varchar(1));
+INSERT INTO t2 VALUES (5,2,'x'), (7,1,'x');
+
+CREATE TABLE t3 (pk int, i1 int, v1 varchar(1));
+INSERT INTO t3 VALUES (8,2,'x'), (7,1,'z');
+
+SELECT t3.i1 FROM t3
+ WHERE EXISTS ( SELECT t2.v1 FROM t1,t2
+ WHERE t1.v1 = t2.v1 AND
+ t3.i1 IN (SELECT t.i1 FROM t1 as t
+ GROUP BY i1 HAVING t.i1 < 3));
+
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/main/index_intersect.result b/mysql-test/main/index_intersect.result
index 7a0633d4dc8..bb2478c8c46 100644
--- a/mysql-test/main/index_intersect.result
+++ b/mysql-test/main/index_intersect.result
@@ -38,6 +38,7 @@ SELECT COUNT(*) FROM CountryLanguage;
COUNT(*)
984
CREATE INDEX Name ON City(Name);
+SET SESSION optimizer_switch='rowid_filter=off';
SET SESSION optimizer_switch='index_merge_sort_intersection=on';
SELECT COUNT(*) FROM City;
COUNT(*)
@@ -357,6 +358,9 @@ COUNT(*)
SELECT COUNT(*) FROM City WHERE Country LIKE 'B%';
COUNT(*)
339
+SELECT COUNT(*) FROM City WHERE Country LIKE 'J%';
+COUNT(*)
+256
EXPLAIN
SELECT * FROM City
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
@@ -364,7 +368,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Name,Population 35,4 NULL # Using sort_intersect(Name,Population); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
EXPLAIN
@@ -383,15 +387,13 @@ ID Name Country Population
1810 Montréal CAN 1016376
2259 Medellín COL 1861265
SELECT * FROM City USE INDEX ()
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
-217 Guarulhos BRA 1095874
-218 Goiânia BRA 1056330
+1541 Hiroshima JPN 1119117
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
-217 Guarulhos BRA 1095874
-218 Goiânia BRA 1056330
+1541 Hiroshima JPN 1119117
SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
ID Name Country Population
@@ -465,9 +467,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range PRIMARY,Population,Country Population 4 NULL # Using index condition; Using where
EXPLAIN
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country Country,Population 3,4 NULL # Using sort_intersect(Country,Population); Using where
+1 SIMPLE City range PRIMARY,Population,Country Population 4 NULL # Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
@@ -494,33 +496,11 @@ WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
554 Santiago de Chile CHL 4703954
SELECT * FROM City USE INDEX ()
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
-1 Kabul AFG 1780000
-126 Yerevan ARM 1248700
-130 Sydney AUS 3276207
-131 Melbourne AUS 2865329
-132 Brisbane AUS 1291117
-133 Perth AUS 1096829
-144 Baku AZE 1787800
-56 Luanda AGO 2022000
-69 Buenos Aires ARG 2982146
-70 La Matanza ARG 1266461
-71 Córdoba ARG 1157507
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
-1 Kabul AFG 1780000
-126 Yerevan ARM 1248700
-130 Sydney AUS 3276207
-131 Melbourne AUS 2865329
-132 Brisbane AUS 1291117
-133 Perth AUS 1096829
-144 Baku AZE 1787800
-56 Luanda AGO 2022000
-69 Buenos Aires ARG 2982146
-70 La Matanza ARG 1266461
-71 Córdoba ARG 1157507
SELECT * FROM City USE INDEX ()
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
ID Name Country Population
@@ -726,7 +706,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
EXPLAIN
@@ -736,9 +716,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population,Country,Name Name 35 NULL # Using index condition; Using where
EXPLAIN
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country Country,Population 3,4 NULL # Using sort_intersect(Country,Population); Using where
+1 SIMPLE City range PRIMARY,Population,Country Population 4 NULL # Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
@@ -778,10 +758,9 @@ ID Name Country Population
766 Manila PHL 1581082
942 Medan IDN 1843919
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 700000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 700000 AND Country LIKE 'J%';
ID Name Country Population
-217 Guarulhos BRA 1095874
-218 Goiânia BRA 1056330
+1541 Hiroshima JPN 1119117
SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
ID Name Country Population
@@ -794,19 +773,8 @@ ID Name Country Population
1937 Huainan CHN 700000
1950 Hegang CHN 520000
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
-1 Kabul AFG 1780000
-56 Luanda AGO 2022000
-69 Buenos Aires ARG 2982146
-70 La Matanza ARG 1266461
-71 Córdoba ARG 1157507
-126 Yerevan ARM 1248700
-130 Sydney AUS 3276207
-131 Melbourne AUS 2865329
-132 Brisbane AUS 1291117
-133 Perth AUS 1096829
-144 Baku AZE 1787800
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z';
@@ -888,12 +856,12 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL # Using sort_intersect(Population,CountryID); Using where
EXPLAIN
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000;
+WHERE Country='USA' AND Population > 1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL # Using sort_intersect(Population,CountryID); Using where
EXPLAIN
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Name,CountryID,CountryName CountryName,Population 38,4 NULL # Using sort_intersect(CountryName,Population); Using where
SELECT * FROM City USE INDEX ()
@@ -931,73 +899,37 @@ ID Name Country Population
2698 Maputo MOZ 1018938
2710 Rangoon (Yangon) MMR 3361700
SELECT * FROM City USE INDEX ()
-WHERE Country='CHN' AND Population > 1500000;
+WHERE Country='USA' AND Population > 1000000;
ID Name Country Population
-1890 Shanghai CHN 9696300
-1891 Peking CHN 7472000
-1892 Chongqing CHN 6351600
-1893 Tianjin CHN 5286800
-1894 Wuhan CHN 4344600
-1895 Harbin CHN 4289800
-1896 Shenyang CHN 4265200
-1897 Kanton [Guangzhou] CHN 4256300
-1898 Chengdu CHN 3361500
-1899 Nanking [Nanjing] CHN 2870300
-1900 Changchun CHN 2812000
-1901 Xi´an CHN 2761400
-1902 Dalian CHN 2697000
-1903 Qingdao CHN 2596000
-1904 Jinan CHN 2278100
-1905 Hangzhou CHN 2190500
-1906 Zhengzhou CHN 2107200
-1907 Shijiazhuang CHN 2041500
-1908 Taiyuan CHN 1968400
-1909 Kunming CHN 1829500
-1910 Changsha CHN 1809800
-1911 Nanchang CHN 1691600
-1912 Fuzhou CHN 1593800
-1913 Lanzhou CHN 1565800
+3793 New York USA 8008278
+3794 Los Angeles USA 3694820
+3795 Chicago USA 2896016
+3796 Houston USA 1953631
+3797 Philadelphia USA 1517550
+3798 Phoenix USA 1321045
+3799 San Diego USA 1223400
+3800 Dallas USA 1188580
+3801 San Antonio USA 1144646
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000;
+WHERE Country='USA' AND Population > 1000000;
ID Name Country Population
-1890 Shanghai CHN 9696300
-1891 Peking CHN 7472000
-1892 Chongqing CHN 6351600
-1893 Tianjin CHN 5286800
-1894 Wuhan CHN 4344600
-1895 Harbin CHN 4289800
-1896 Shenyang CHN 4265200
-1897 Kanton [Guangzhou] CHN 4256300
-1898 Chengdu CHN 3361500
-1899 Nanking [Nanjing] CHN 2870300
-1900 Changchun CHN 2812000
-1901 Xi´an CHN 2761400
-1902 Dalian CHN 2697000
-1903 Qingdao CHN 2596000
-1904 Jinan CHN 2278100
-1905 Hangzhou CHN 2190500
-1906 Zhengzhou CHN 2107200
-1907 Shijiazhuang CHN 2041500
-1908 Taiyuan CHN 1968400
-1909 Kunming CHN 1829500
-1910 Changsha CHN 1809800
-1911 Nanchang CHN 1691600
-1912 Fuzhou CHN 1593800
-1913 Lanzhou CHN 1565800
+3793 New York USA 8008278
+3794 Los Angeles USA 3694820
+3795 Chicago USA 2896016
+3796 Houston USA 1953631
+3797 Philadelphia USA 1517550
+3798 Phoenix USA 1321045
+3799 San Diego USA 1223400
+3800 Dallas USA 1188580
+3801 San Antonio USA 1144646
SELECT * FROM City USE INDEX ()
-WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
ID Name Country Population
-1892 Chongqing CHN 6351600
-1898 Chengdu CHN 3361500
-1900 Changchun CHN 2812000
-1910 Changsha CHN 1809800
+3795 Chicago USA 2896016
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
ID Name Country Population
-1892 Chongqing CHN 6351600
-1898 Chengdu CHN 3361500
-1900 Changchun CHN 2812000
-1910 Changsha CHN 1809800
+3795 Chicago USA 2896016
EXPLAIN
SELECT * FROM City, Country
WHERE City.Name LIKE 'C%' AND City.Population > 1000000 AND
@@ -1041,3 +973,4 @@ f1 f4 f5
998 a 0
DROP TABLE t1;
SET SESSION optimizer_switch='index_merge_sort_intersection=on';
+SET SESSION optimizer_switch='rowid_filter=default';
diff --git a/mysql-test/main/index_intersect.test b/mysql-test/main/index_intersect.test
index 76d37b16c3e..a3fbe0de8b9 100644
--- a/mysql-test/main/index_intersect.test
+++ b/mysql-test/main/index_intersect.test
@@ -36,6 +36,7 @@ ANALYZE TABLE City;
--enable_result_log
--enable_query_log
+SET SESSION optimizer_switch='rowid_filter=off';
SET SESSION optimizer_switch='index_merge_sort_intersection=on';
SELECT COUNT(*) FROM City;
@@ -120,6 +121,7 @@ SELECT COUNT(*) FROM City WHERE Population > 1000000;
SELECT COUNT(*) FROM City WHERE Population > 500000;
SELECT COUNT(*) FROM City WHERE Country LIKE 'C%';
SELECT COUNT(*) FROM City WHERE Country LIKE 'B%';
+SELECT COUNT(*) FROM City WHERE Country LIKE 'J%';
# The pattern of the WHERE condition used in the following 3 queries is
@@ -137,7 +139,7 @@ SELECT * FROM City
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+ WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
--replace_column 7 # 9 #
--replace_result Population,Country,Name Population,Name,Country
@@ -159,11 +161,11 @@ SELECT * FROM City
SELECT * FROM City USE INDEX ()
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+ WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
--sorted_result
SELECT * FROM City
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+ WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
SELECT * FROM City USE INDEX ()
@@ -210,7 +212,7 @@ SELECT * FROM City
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+ WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
--replace_column 9 #
EXPLAIN
@@ -244,10 +246,10 @@ SELECT * FROM City
--sorted_result
SELECT * FROM City USE INDEX ()
- WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+ WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
--sorted_result
SELECT * FROM City
- WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+ WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
SELECT * FROM City USE INDEX ()
@@ -296,7 +298,7 @@ SELECT * FROM City WHERE
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+ WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
--replace_column 9 #
EXPLAIN
@@ -307,7 +309,7 @@ SELECT * FROM City
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+ WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
--replace_column 9 #
--replace_result PRIMARY,Country,Population PRIMARY,Population,Country 4,7,4 4,4,7
@@ -329,7 +331,7 @@ SELECT * FROM City WHERE
--sorted_result
SELECT * FROM City
- WHERE Name BETWEEN 'G' AND 'J' AND Population > 700000 AND Country LIKE 'B%';
+ WHERE Name BETWEEN 'G' AND 'J' AND Population > 700000 AND Country LIKE 'J%';
--sorted_result
SELECT * FROM City
@@ -337,7 +339,7 @@ SELECT * FROM City
SELECT * FROM City
- WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+ WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
--sorted_result
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
@@ -374,12 +376,12 @@ SELECT * FROM City
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE Country='CHN' AND Population > 1500000;
+ WHERE Country='USA' AND Population > 1000000;
--replace_column 9 #
EXPLAIN
SELECT * FROM City
- WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+ WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
# Check that the previous 3 plans return the right results when executed
@@ -393,18 +395,18 @@ SELECT * FROM City
--sorted_result
SELECT * FROM City USE INDEX ()
- WHERE Country='CHN' AND Population > 1500000;
+ WHERE Country='USA' AND Population > 1000000;
--sorted_result
SELECT * FROM City
- WHERE Country='CHN' AND Population > 1500000;
+ WHERE Country='USA' AND Population > 1000000;
SELECT * FROM City USE INDEX ()
- WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+ WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
--sorted_result
SELECT * FROM City
- WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+ WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
#
@@ -462,3 +464,4 @@ WHERE (f1 < 535 OR f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
DROP TABLE t1;
SET SESSION optimizer_switch='index_merge_sort_intersection=on';
+SET SESSION optimizer_switch='rowid_filter=default';
diff --git a/mysql-test/main/index_intersect_innodb.result b/mysql-test/main/index_intersect_innodb.result
index 15244098170..fed33b3d9bd 100644
--- a/mysql-test/main/index_intersect_innodb.result
+++ b/mysql-test/main/index_intersect_innodb.result
@@ -1,4 +1,9 @@
SET SESSION STORAGE_ENGINE='InnoDB';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
DROP TABLE IF EXISTS t1,t2,t3,t4;
DROP DATABASE IF EXISTS world;
set names utf8;
@@ -39,6 +44,7 @@ SELECT COUNT(*) FROM CountryLanguage;
COUNT(*)
984
CREATE INDEX Name ON City(Name);
+SET SESSION optimizer_switch='rowid_filter=off';
SET SESSION optimizer_switch='index_merge_sort_intersection=on';
SELECT COUNT(*) FROM City;
COUNT(*)
@@ -75,12 +81,12 @@ EXPLAIN
SELECT * FROM City
WHERE Name LIKE 'M%' AND Population > 300000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Name Name,Population 35,4 NULL # Using sort_intersect(Name,Population); Using where
+1 SIMPLE City range Population,Name Name 35 NULL # Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE Name LIKE 'M%' AND Population > 7000000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
+1 SIMPLE City range Population,Name Population 4 NULL # Using index condition; Using where
SELECT * FROM City USE INDEX ()
WHERE Name LIKE 'C%' AND Population > 1000000;
ID Name Country Population
@@ -335,8 +341,8 @@ ID Name Country Population
SELECT * FROM City
WHERE Name LIKE 'M%' AND Population > 7000000;
ID Name Country Population
-1024 Mumbai (Bombay) IND 10500000
3580 Moscow RUS 8389200
+1024 Mumbai (Bombay) IND 10500000
SELECT COUNT(*) FROM City WHERE Name BETWEEN 'M' AND 'N';
COUNT(*)
301
@@ -358,21 +364,24 @@ COUNT(*)
SELECT COUNT(*) FROM City WHERE Country LIKE 'B%';
COUNT(*)
339
+SELECT COUNT(*) FROM City WHERE Country LIKE 'J%';
+COUNT(*)
+256
EXPLAIN
SELECT * FROM City
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL # Using sort_intersect(Population,Name,Country); Using where
+1 SIMPLE City index_merge Population,Country,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL # Using sort_intersect(Population,Country,Name); Using where
+1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Name,Country Name,Population,Country # NULL # Using sort_intersect(Name,Population,Country); Using where
+1 SIMPLE City range Population,Name,Country Name # NULL # Using index condition; Using where
SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
ID Name Country Population
@@ -384,15 +393,13 @@ ID Name Country Population
1810 Montréal CAN 1016376
2259 Medellín COL 1861265
SELECT * FROM City USE INDEX ()
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
-217 Guarulhos BRA 1095874
-218 Goiânia BRA 1056330
+1541 Hiroshima JPN 1119117
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
ID Name Country Population
-217 Guarulhos BRA 1095874
-218 Goiânia BRA 1056330
+1541 Hiroshima JPN 1119117
SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
ID Name Country Population
@@ -463,29 +470,29 @@ EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
EXPLAIN
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country 4,7 NULL # Using sort_intersect(PRIMARY,Country); Using where
+1 SIMPLE City range PRIMARY,Population,Country Country 7 NULL # Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
AND Country BETWEEN 'S' AND 'Z';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,7,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population 4,4 NULL # Using sort_intersect(PRIMARY,Population); Using where
EXPLAIN
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
+1 SIMPLE City range PRIMARY,Population,Country PRIMARY 4 NULL # Using where
SELECT * FROM City USE INDEX ()
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
@@ -495,33 +502,11 @@ WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
554 Santiago de Chile CHL 4703954
SELECT * FROM City USE INDEX ()
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
-1 Kabul AFG 1780000
-126 Yerevan ARM 1248700
-130 Sydney AUS 3276207
-131 Melbourne AUS 2865329
-132 Brisbane AUS 1291117
-133 Perth AUS 1096829
-144 Baku AZE 1787800
-56 Luanda AGO 2022000
-69 Buenos Aires ARG 2982146
-70 La Matanza ARG 1266461
-71 Córdoba ARG 1157507
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
-1 Kabul AFG 1780000
-126 Yerevan ARM 1248700
-130 Sydney AUS 3276207
-131 Melbourne AUS 2865329
-132 Brisbane AUS 1291117
-133 Perth AUS 1096829
-144 Baku AZE 1787800
-56 Luanda AGO 2022000
-69 Buenos Aires ARG 2982146
-70 La Matanza ARG 1266461
-71 Córdoba ARG 1157507
SELECT * FROM City USE INDEX ()
WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'H%';
ID Name Country Population
@@ -727,17 +712,17 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Name Population,Name 4,35 NULL # Using sort_intersect(Population,Name); Using where
EXPLAIN
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'J%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Population,Country,Name 4,3,35 NULL # Using sort_intersect(Population,Country,Name); Using where
+1 SIMPLE City index_merge Population,Country,Name Population,Country 4,3 NULL # Using sort_intersect(Population,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Name,Population,Country 35,4,3 NULL # Using sort_intersect(Name,Population,Country); Using where
+1 SIMPLE City range Population,Country,Name Name 35 NULL # Using index condition; Using where
EXPLAIN
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
EXPLAIN
@@ -745,7 +730,7 @@ SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,7 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
+1 SIMPLE City range PRIMARY,Population,Country PRIMARY 4 NULL # Using where
SELECT * FROM City WHERE
Name LIKE 'C%' AND Population > 1000000;
ID Name Country Population
@@ -779,10 +764,9 @@ ID Name Country Population
766 Manila PHL 1581082
942 Medan IDN 1843919
SELECT * FROM City
-WHERE Name BETWEEN 'G' AND 'J' AND Population > 700000 AND Country LIKE 'B%';
+WHERE Name BETWEEN 'G' AND 'J' AND Population > 700000 AND Country LIKE 'J%';
ID Name Country Population
-217 Guarulhos BRA 1095874
-218 Goiânia BRA 1056330
+1541 Hiroshima JPN 1119117
SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
ID Name Country Population
@@ -795,19 +779,8 @@ ID Name Country Population
1937 Huainan CHN 700000
1950 Hegang CHN 520000
SELECT * FROM City
-WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
+WHERE ID BETWEEN 1 AND 500 AND Population > 700000 AND Country LIKE 'C%';
ID Name Country Population
-1 Kabul AFG 1780000
-56 Luanda AGO 2022000
-69 Buenos Aires ARG 2982146
-70 La Matanza ARG 1266461
-71 Córdoba ARG 1157507
-126 Yerevan ARM 1248700
-130 Sydney AUS 3276207
-131 Melbourne AUS 2865329
-132 Brisbane AUS 1291117
-133 Perth AUS 1096829
-144 Baku AZE 1787800
SELECT * FROM City
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
AND Country BETWEEN 'S' AND 'Z';
@@ -889,12 +862,12 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL # Using sort_intersect(Population,CountryID); Using where
EXPLAIN
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000;
+WHERE Country='USA' AND Population > 1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,CountryID,CountryName Population,CountryID 4,3 NULL # Using sort_intersect(Population,CountryID); Using where
EXPLAIN
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Name,CountryID,CountryName CountryName,Population 38,4 NULL # Using sort_intersect(CountryName,Population); Using where
SELECT * FROM City USE INDEX ()
@@ -932,73 +905,37 @@ ID Name Country Population
2698 Maputo MOZ 1018938
2710 Rangoon (Yangon) MMR 3361700
SELECT * FROM City USE INDEX ()
-WHERE Country='CHN' AND Population > 1500000;
+WHERE Country='USA' AND Population > 1000000;
ID Name Country Population
-1890 Shanghai CHN 9696300
-1891 Peking CHN 7472000
-1892 Chongqing CHN 6351600
-1893 Tianjin CHN 5286800
-1894 Wuhan CHN 4344600
-1895 Harbin CHN 4289800
-1896 Shenyang CHN 4265200
-1897 Kanton [Guangzhou] CHN 4256300
-1898 Chengdu CHN 3361500
-1899 Nanking [Nanjing] CHN 2870300
-1900 Changchun CHN 2812000
-1901 Xi´an CHN 2761400
-1902 Dalian CHN 2697000
-1903 Qingdao CHN 2596000
-1904 Jinan CHN 2278100
-1905 Hangzhou CHN 2190500
-1906 Zhengzhou CHN 2107200
-1907 Shijiazhuang CHN 2041500
-1908 Taiyuan CHN 1968400
-1909 Kunming CHN 1829500
-1910 Changsha CHN 1809800
-1911 Nanchang CHN 1691600
-1912 Fuzhou CHN 1593800
-1913 Lanzhou CHN 1565800
+3793 New York USA 8008278
+3794 Los Angeles USA 3694820
+3795 Chicago USA 2896016
+3796 Houston USA 1953631
+3797 Philadelphia USA 1517550
+3798 Phoenix USA 1321045
+3799 San Diego USA 1223400
+3800 Dallas USA 1188580
+3801 San Antonio USA 1144646
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000;
+WHERE Country='USA' AND Population > 1000000;
ID Name Country Population
-1890 Shanghai CHN 9696300
-1891 Peking CHN 7472000
-1892 Chongqing CHN 6351600
-1893 Tianjin CHN 5286800
-1894 Wuhan CHN 4344600
-1895 Harbin CHN 4289800
-1896 Shenyang CHN 4265200
-1897 Kanton [Guangzhou] CHN 4256300
-1898 Chengdu CHN 3361500
-1899 Nanking [Nanjing] CHN 2870300
-1900 Changchun CHN 2812000
-1901 Xi´an CHN 2761400
-1902 Dalian CHN 2697000
-1903 Qingdao CHN 2596000
-1904 Jinan CHN 2278100
-1905 Hangzhou CHN 2190500
-1906 Zhengzhou CHN 2107200
-1907 Shijiazhuang CHN 2041500
-1908 Taiyuan CHN 1968400
-1909 Kunming CHN 1829500
-1910 Changsha CHN 1809800
-1911 Nanchang CHN 1691600
-1912 Fuzhou CHN 1593800
-1913 Lanzhou CHN 1565800
+3793 New York USA 8008278
+3794 Los Angeles USA 3694820
+3795 Chicago USA 2896016
+3796 Houston USA 1953631
+3797 Philadelphia USA 1517550
+3798 Phoenix USA 1321045
+3799 San Diego USA 1223400
+3800 Dallas USA 1188580
+3801 San Antonio USA 1144646
SELECT * FROM City USE INDEX ()
-WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
ID Name Country Population
-1892 Chongqing CHN 6351600
-1898 Chengdu CHN 3361500
-1900 Changchun CHN 2812000
-1910 Changsha CHN 1809800
+3795 Chicago USA 2896016
SELECT * FROM City
-WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
+WHERE Country='USA' AND Population > 1500000 AND Name LIKE 'C%';
ID Name Country Population
-1892 Chongqing CHN 6351600
-1898 Chengdu CHN 3361500
-1900 Changchun CHN 2812000
-1910 Changsha CHN 1809800
+3795 Chicago USA 2896016
EXPLAIN
SELECT * FROM City, Country
WHERE City.Name LIKE 'C%' AND City.Population > 1000000 AND
@@ -1042,4 +979,8 @@ f1 f4 f5
998 a 0
DROP TABLE t1;
SET SESSION optimizer_switch='index_merge_sort_intersection=on';
+SET SESSION optimizer_switch='rowid_filter=default';
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/index_intersect_innodb.test b/mysql-test/main/index_intersect_innodb.test
index f2e44cb3947..637056ad795 100644
--- a/mysql-test/main/index_intersect_innodb.test
+++ b/mysql-test/main/index_intersect_innodb.test
@@ -2,6 +2,15 @@
SET SESSION STORAGE_ENGINE='InnoDB';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
--source index_intersect.test
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/index_merge_innodb.result b/mysql-test/main/index_merge_innodb.result
index 5bf7aceb597..e72e2c78d98 100644
--- a/mysql-test/main/index_merge_innodb.result
+++ b/mysql-test/main/index_merge_innodb.result
@@ -5,6 +5,7 @@ connection default;
SET STORAGE_ENGINE = InnoDB;
set @optimizer_switch_save= @@optimizer_switch;
set optimizer_switch='index_merge_sort_intersection=off';
+set optimizer_switch='rowid_filter=off';
#---------------- Index merge test 2 -------------------------------------------
create table t1
(
@@ -112,6 +113,7 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select key1a, key1b, key2a, key2b, key3a, key3b from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1;
count(*)
@@ -305,6 +307,7 @@ update t1 set key2=key1,key3=key1;
insert into t1 select 10000+key1, 10000+key2,10000+key3 from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/main/index_merge_innodb.test b/mysql-test/main/index_merge_innodb.test
index 2713daff034..4bdcb17760e 100644
--- a/mysql-test/main/index_merge_innodb.test
+++ b/mysql-test/main/index_merge_innodb.test
@@ -25,6 +25,7 @@ let $merge_table_support= 0;
set @optimizer_switch_save= @@optimizer_switch;
set optimizer_switch='index_merge_sort_intersection=off';
+set optimizer_switch='rowid_filter=off';
# The first two tests are disabled because of non deterministic explain output.
# If include/index_merge1.inc can be enabled for InnoDB and all other
diff --git a/mysql-test/main/index_merge_myisam.result b/mysql-test/main/index_merge_myisam.result
index bf60bda2708..92c25259be5 100644
--- a/mysql-test/main/index_merge_myisam.result
+++ b/mysql-test/main/index_merge_myisam.result
@@ -1,5 +1,6 @@
SET STORAGE_ENGINE = MyISAM;
set @optimizer_switch_save= @@optimizer_switch;
+set optimizer_switch='rowid_filter=off';
set optimizer_switch='index_merge_sort_intersection=off';
#---------------- Index merge test 1 -------------------------------------------
create table t0
@@ -18,28 +19,28 @@ alter table t0 add key8 int not null, add index i8(key8);
update t0 set key2=key1,key3=key1,key4=key1,key5=key1,key6=key1,key7=key1,key8=1024-key1;
analyze table t0;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
-explain select * from t0 where key1 < 3 or key1 > 1020;
+explain select * from t0 where key1 < 3 or key1 > 920 and key1 < 924;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 range i1 i1 4 NULL 78 Using index condition; Using where
+1 SIMPLE t0 range i1 i1 4 NULL 5 Using index condition
explain
-select * from t0 where key1 < 3 or key2 > 1020;
+select * from t0 where key1 < 3 or key2 > 920 and key2 < 924;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 45 Using sort_union(i1,i2); Using where
-select * from t0 where key1 < 3 or key2 > 1020;
+1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 5 Using sort_union(i1,i2); Using where
+select * from t0 where key1 < 3 or key2 > 920 and key2 < 924;
key1 key2 key3 key4 key5 key6 key7 key8
1 1 1 1 1 1 1 1023
2 2 2 2 2 2 2 1022
-1021 1021 1021 1021 1021 1021 1021 3
-1022 1022 1022 1022 1022 1022 1022 2
-1023 1023 1023 1023 1023 1023 1023 1
-1024 1024 1024 1024 1024 1024 1024 0
+921 921 921 921 921 921 921 103
+922 922 922 922 922 922 922 102
+923 923 923 923 923 923 923 101
select * from t0 where key1=1022;
key1 key2 key3 key4 key5 key6 key7 key8
1022 1022 1022 1022 1022 1022 1022 2
explain select * from t0 where key1 < 3 or key2 <4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 5 Using sort_union(i1,i2); Using where
explain
select * from t0 where (key1 > 30 and key1<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra
@@ -63,7 +64,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ref i1,i2,i3 i3 4 const 1 Using where
explain select * from t0 use index (i1,i2) where (key1 < 3 or key2 <4) and key3 = 50;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 5 Using sort_union(i1,i2); Using where
explain select * from t0 where (key1 > 1 or key2 > 2);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where
@@ -74,7 +75,7 @@ explain
select * from t0 where key1<3 or key2<3 or (key1>5 and key1<8) or
(key1>10 and key1<12) or (key2>100 and key2<110);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 17 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 15 Using sort_union(i1,i2); Using where
explain select * from t0 where key2 = 45 or key1 <=> null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 range i1,i2 i2 4 NULL 1 Using index condition
@@ -93,19 +94,19 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select key1 from t0 where (key1 <=> null) or (key2 < 5) or
(key3=10) or (key4 <=> null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3,i4 i2,i3 4,4 NULL 6 Using sort_union(i2,i3); Using where
+1 SIMPLE t0 index_merge i1,i2,i3,i4 i2,i3 4,4 NULL 5 Using sort_union(i2,i3); Using where
explain select key1 from t0 where (key1 <=> null) or (key1 < 5) or
(key3=10) or (key4 <=> null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i3,i4 i1,i3 4,4 NULL 6 Using sort_union(i1,i3); Using where
+1 SIMPLE t0 index_merge i1,i3,i4 i1,i3 4,4 NULL 5 Using sort_union(i1,i3); Using where
explain select * from t0 where
(key1 < 3 or key2 < 3) and (key3 < 4 or key4 < 4) and (key5 < 5 or key6 < 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i1,i2 4,4 NULL 4 Using sort_union(i1,i2); Using where
explain
select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 9 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where
select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4);
key1 key2 key3 key4 key5 key6 key7 key8
1 1 1 1 1 1 1 1023
@@ -116,15 +117,15 @@ key1 key2 key3 key4 key5 key6 key7 key8
explain select * from t0 where
(key1 < 3 or key2 < 3) and (key3 < 4 or key4 < 4) and (key5 < 2 or key6 < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i5,i6 4,4 NULL 2 Using sort_union(i5,i6); Using where
explain select * from t0 where
(key1 < 3 or key2 < 3) and (key3 < 100);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 4 Using sort_union(i1,i2); Using where
explain select * from t0 where
(key1 < 3 or key2 < 3) and (key3 < 1000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 4 Using sort_union(i1,i2); Using where
explain select * from t0 where
((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4))
or
@@ -136,7 +137,7 @@ explain select * from t0 where
or
key1 < 7;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t0 where
((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4))
or
@@ -148,30 +149,36 @@ key1 key2 key3 key4 key5 key6 key7 key8
4 4 4 4 4 4 4 1020
5 5 5 5 5 5 5 1019
6 6 6 6 6 6 6 1018
+select count(*) from t0 where
+((key1 < 4 or key2 < 4) and (key3 <5 or key5 < 4))
+or
+((key5 < 5 or key6 < 6) and (key7 <7 or key8 < 4));
+count(*)
+5
explain select * from t0 where
((key1 < 4 or key2 < 4) and (key3 <5 or key5 < 4))
or
((key5 < 5 or key6 < 6) and (key7 <7 or key8 < 4));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i1,i2,i5,i6 4,4,4,4 NULL 19 Using sort_union(i1,i2,i5,i6); Using where
+1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i1,i2,i5,i6 4,4,4,4 NULL 15 Using sort_union(i1,i2,i5,i6); Using where
explain select * from t0 where
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
or
((key7 <7 or key8 < 4) and (key5 < 5 or key6 < 6));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i3,i5,i7,i8 4,4,4,4 NULL 20 Using sort_union(i3,i5,i7,i8); Using where
+1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i3,i5,i7,i8 4,4,4,4 NULL 16 Using sort_union(i3,i5,i7,i8); Using where
explain select * from t0 where
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
or
((key3 <7 or key5 < 2) and (key5 < 5 or key6 < 6));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 4,4 NULL 11 Using sort_union(i3,i5); Using where
+1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 4,4 NULL 9 Using sort_union(i3,i5); Using where
explain select * from t0 where
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
or
(((key3 <7 and key7 < 6) or key5 < 2) and (key5 < 5 or key6 < 6));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7 i3,i5 4,4 NULL 11 Using sort_union(i3,i5); Using where
+1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7 i3,i5 4,4 NULL 9 Using sort_union(i3,i5); Using where
explain select * from t0 where
((key3 < 4 or key5 < 4) and (key1 < 4 or key2 < 4))
or
@@ -209,7 +216,7 @@ key1 key2 key3 key4 key5 key6 key7 key8
explain
select * from t0 where key1 < 5 or key8 < 4 order by key1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i8 i1,i8 4,4 NULL 9 Using sort_union(i1,i8); Using where; Using filesort
+1 SIMPLE t0 index_merge i1,i8 i1,i8 4,4 NULL 7 Using sort_union(i1,i8); Using where; Using filesort
create table t2 like t0;
insert into t2 select * from t0;
alter table t2 add index i1_3(key1, key3);
@@ -225,7 +232,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index i1_3,i2_3 i321 12 NULL 1024 Using where; Using index
explain select key7 from t2 where key1 <100 or key2 < 100;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index_merge i1_3,i2_3 i1_3,i2_3 4,4 NULL 188 Using sort_union(i1_3,i2_3); Using where
+1 SIMPLE t2 index_merge i1_3,i2_3 i1_3,i2_3 4,4 NULL 186 Using sort_union(i1_3,i2_3); Using where
create table t4 (
key1a int not null,
key1b int not null,
@@ -250,10 +257,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index_merge i1a,i1b i1a,i1b 4,4 NULL 2 Using sort_union(i1a,i1b); Using where
explain select * from t4 where key2 = 1 and (key2_1 = 1 or key3 = 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 10 Using where
+1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 9 Using where
explain select * from t4 where key2 = 1 and (key2_1 = 1 or key2_2 = 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 10 Using where
+1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 9 Using where
explain select * from t4 where key2_1 = 1 or key2_2 = 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 1024 Using where
@@ -294,13 +301,13 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t0,t1 where t0.key1 < 3 and
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 range i1 i1 4 NULL 3 Using index condition
+1 SIMPLE t0 range i1 i1 4 NULL 2 Using index condition
1 SIMPLE t1 ALL i1,i8 NULL NULL NULL 1024 Range checked for each record (index map: 0x81)
explain select * from t1 where key1=3 or key2=4
union select * from t1 where key1<4 or key3=5;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
-2 UNION t1 index_merge i1,i3 i1,i3 4,4 NULL 5 Using sort_union(i1,i3); Using where
+2 UNION t1 index_merge i1,i3 i1,i3 4,4 NULL 4 Using sort_union(i1,i3); Using where
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='derived_merge=off,derived_with_keys=off';
@@ -341,7 +348,7 @@ key1 key2 key3 key4 key5 key6 key7 key8 key9 keyA keyB keyC
1016 1016 1016 1016 1016 1016 1016 8 1016 1016 1016 1016
explain select * from t0 where key1 < 3 or key2 < 4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where
+1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 5 Using sort_union(i1,i2); Using where
select * from t0 where key1 < 3 or key2 < 4;
key1 key2 key3 key4 key5 key6 key7 key8
1 1 1 1 1 1 1 1023
@@ -369,8 +376,8 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
and (B.key1 < 500000 or B.key2 < 3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where
-1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where; Using join buffer (flat, BNL join)
+1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1010 Using sort_union(i1,i2); Using where
+1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1010 Using sort_union(i1,i2); Using where; Using join buffer (flat, BNL join)
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
@@ -383,8 +390,8 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 = 1 or A.key2 = 1)
and (B.key1 = 1 or B.key2 = 1);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where
-1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where; Using join buffer (flat, BNL join)
+1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1021 Using union(i1,i2); Using where
+1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1021 Using union(i1,i2); Using where; Using join buffer (flat, BNL join)
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 = 1 or A.key2 = 1)
@@ -524,18 +531,13 @@ a filler b
4 zz 4
5 qq 4
must use union, not sort-union:
-explain select * from t2 where a=4 or b=4;
+explain select * from t2 where a=2 or b=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index_merge a,b a,b 5,5 NULL # Using union(a,b); Using where
-select * from t2 where a=4 or b=4;
+select * from t2 where a=2 or b=2;
a filler b
-4 4 0
-4 5 0
-4 filler 4
-4 filler 4
-4 qq 5
-4 zz 4
-5 qq 4
+2 filler 2
+2 filler 2
drop table t1, t2;
CREATE TABLE t1 (a varchar(8), b set('a','b','c','d','e','f','g','h'),
KEY b(b), KEY a(a));
@@ -705,19 +707,19 @@ select key1,key2,filler1 from t1 where key2=100 and key2=200;
key1 key2 filler1
explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 152 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
+1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
key1 key2 key3 key4 filler1
-1 -1 100 100 key4-key3
delete from t1 where key3=100 and key4=100;
explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 152 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
+1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
key1 key2 key3 key4 filler1
explain select key1,key2 from t1 where key1=100 and key2=100;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 76 Using intersect(key1,key2); Using where; Using index
+1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 77 Using intersect(key1,key2); Using where; Using index
select key1,key2 from t1 where key1=100 and key2=100;
key1 key2
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-1');
@@ -725,7 +727,7 @@ insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-3');
explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 136 Using union(key3,intersect(key1,key2),key4); Using where
+1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 137 Using union(key3,intersect(key1,key2),key4); Using where
select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
key1 key2 key3 key4 filler1
100 100 200 200 key1-key2-key3-key4-3
@@ -734,7 +736,7 @@ key1 key2 key3 key4 filler1
insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, -1, 200,'key4');
explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 146 Using union(key3,intersect(key1,key2),key4); Using where
+1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 148 Using union(key3,intersect(key1,key2),key4); Using where
select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
key1 key2 key3 key4 filler1
100 100 200 200 key1-key2-key3-key4-3
@@ -744,7 +746,7 @@ key1 key2 key3 key4 filler1
insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 200, -1,'key3');
explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 156 Using union(key3,intersect(key1,key2),key4); Using where
+1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 159 Using union(key3,intersect(key1,key2),key4); Using where
select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
key1 key2 key3 key4 filler1
100 100 200 200 key1-key2-key3-key4-3
@@ -760,7 +762,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b st_a,st_b 4,4 NULL 3515 Using intersect(st_a,st_b); Using where; Using index
explain select st_a from t1 ignore index (st_a) where st_a=1 and st_b=1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,stb_swt1a_2b,stb_swt1b,st_b st_b 4 const 15093 Using where
+1 SIMPLE t1 ref sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,stb_swt1a_2b,stb_swt1b,st_b st_b 4 const 15094 Using where
explain select * from t1 where st_a=1 and swt1a=1 and swt2a=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a sta_swt21a 12 const,const,const 971
@@ -849,7 +851,7 @@ INDEX i2(key2)
INSERT INTO t1 SELECT seq,200-seq FROM seq_0_to_200;
explain select * from t1 where key1 < 5 or key2 > 197;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where
+1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 5 or key2 > 197;
key1 key2
0 200
@@ -859,7 +861,7 @@ key1 key2
4 196
explain select * from t1 where key1 < 3 or key2 > 195;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where
+1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 3 or key2 > 195;
key1 key2
0 200
@@ -875,7 +877,7 @@ update t1 set str1='aaa', str2='bbb', str3=concat(key2, '-', key1 div 2, '_' ,if
alter table t1 add primary key (str1, zeroval, str2, str3);
explain select * from t1 where key1 < 5 or key2 > 197;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where
+1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 5 or key2 > 197;
key1 key2 str1 zeroval str2 str3
0 200 aaa 0 bbb 200-0_a
@@ -885,7 +887,7 @@ key1 key2 str1 zeroval str2 str3
4 196 aaa 0 bbb 196-2_a
explain select * from t1 where key1 < 3 or key2 > 195;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where
+1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
select * from t1 where key1 < 3 or key2 > 195;
key1 key2 str1 zeroval str2 str3
0 200 aaa 0 bbb 200-0_a
@@ -945,6 +947,7 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select key1a, key1b, key2a, key2b, key3a, key3b from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1;
count(*)
@@ -1138,6 +1141,7 @@ update t1 set key2=key1,key3=key1;
insert into t1 select 10000+key1, 10000+key2,10000+key3 from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra
@@ -1429,7 +1433,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,pktail4bad pktail4bad 4 const 82 Using where
explain select * from t1 where pktail5bad=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref key1,pktail5bad pktail5bad 4 const 70 Using where
+1 SIMPLE t1 ref key1,pktail5bad pktail5bad 4 const 69 Using where
explain select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where
@@ -1483,7 +1487,7 @@ EXPLAIN SELECT t1.f1 FROM t1
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
-2 SUBQUERY t2 ref f2,f3 f2 5 const 1 Using where
+2 SUBQUERY t2 ref f2,f3 f2 5 const 2 Using where
DROP TABLE t1,t2;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -1500,12 +1504,12 @@ explain select * from t1 where a=1 or b=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 2 Using union(a,b); Using where
This should use ALL:
-set optimizer_switch='default,index_merge=off';
+set optimizer_switch='default,index_merge=off,rowid_filter=off';
explain select * from t1 where a=1 or b=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a,b NULL NULL NULL 1000 Using where
This should use sort-union:
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a=1 or b=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 2 Using sort_union(a,b); Using where
@@ -1515,17 +1519,17 @@ explain select * from t1 where a<1 or b <1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 38 Using sort_union(a,b); Using where
This should use ALL:
-set optimizer_switch='default,index_merge_sort_union=off';
+set optimizer_switch='default,index_merge_sort_union=off,rowid_filter=off';
explain select * from t1 where a<1 or b <1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a,b NULL NULL NULL 1000 Using where
This should use ALL:
-set optimizer_switch='default,index_merge=off';
+set optimizer_switch='default,index_merge=off,rowid_filter=off';
explain select * from t1 where a<1 or b <1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a,b NULL NULL NULL 1000 Using where
This will use sort-union:
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a<1 or b <1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 38 Using sort_union(a,b); Using where
@@ -1537,7 +1541,7 @@ explain select * from t1 where (a=3 or b in (1,2)) and (c=3 or d=4);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b,c,d a,b 5,5 NULL 3 Using sort_union(a,b); Using where
And if we disable sort_union, union:
-set optimizer_switch='default,index_merge_sort_union=off';
+set optimizer_switch='default,index_merge_sort_union=off,rowid_filter=off';
explain select * from t1 where (a=3 or b in (1,2)) and (c=3 or d=4);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b,c,d c,d 5,5 NULL 100 Using union(c,d); Using where
@@ -1556,22 +1560,22 @@ explain select * from t1 where a=10 and b=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 1 Using intersect(a,b); Using where
No intersect when index_merge is disabled:
-set optimizer_switch='default,index_merge=off';
+set optimizer_switch='default,index_merge=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 49 Using where
No intersect if it is disabled:
-set optimizer_switch='default,index_merge_sort_intersection=off,index_merge_intersection=off';
+set optimizer_switch='default,index_merge_sort_intersection=off,index_merge_intersection=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 49 Using where
Do intersect when union was disabled
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 1 Using intersect(a,b); Using where
Do intersect when sort_union was disabled
-set optimizer_switch='default,index_merge_sort_union=off';
+set optimizer_switch='default,index_merge_sort_union=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 1 Using intersect(a,b); Using where
@@ -1581,13 +1585,13 @@ explain select * from t1 where a=10 and b=10 or c=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b,c a,b,c 5,5,5 NULL 6 Using union(intersect(a,b),c); Using where
Should be only union left:
-set optimizer_switch='default,index_merge_intersection=off';
+set optimizer_switch='default,index_merge_intersection=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10 or c=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b,c a,c 5,5 NULL 54 Using union(a,c); Using where
This will switch to sort-union (intersection will be gone, too,
that's a known limitation:
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10 or c=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b,c a,c 5,5 NULL 54 Using sort_union(a,c); Using where
@@ -1632,7 +1636,7 @@ SELECT * FROM t1 FORCE INDEX ( PRIMARY, population_rate, area_rate, code )
WHERE pk = 1 OR population_rate = 1 OR ( area_rate IN ( 1,2 ) OR area_rate IS NULL )
AND (population_rate = 25 OR area_rate BETWEEN 2 AND 25 OR code BETWEEN 'MA' AND 'TX');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,code,population_rate,area_rate PRIMARY,population_rate,area_rate 4,5,5 NULL 2 Using sort_union(PRIMARY,population_rate,area_rate); Using where
+1 SIMPLE t1 index_merge PRIMARY,code,population_rate,area_rate PRIMARY,population_rate,area_rate,code 4,5,5,3 NULL 2 Using sort_union(PRIMARY,population_rate,area_rate,code); Using where
SELECT * FROM t1 FORCE INDEX ( PRIMARY, population_rate, area_rate, code )
WHERE pk = 1 OR population_rate = 1 OR ( area_rate IN ( 1,2 ) OR area_rate IS NULL )
AND (population_rate = 25 OR area_rate BETWEEN 2 AND 25 OR code BETWEEN 'MA' AND 'TX');
@@ -1695,7 +1699,8 @@ INSERT INTO t1 VALUES
ALTER TABLE t1 ENABLE KEYS;
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY , i , c1 , c2)
-WHERE pk = 255 OR i = 22 OR (pk IN (1 , 136) AND c2 IN ('c' , 'w') AND (c1 NOT BETWEEN 'e' AND 'i' OR c2 > 'g')) OR pk != 1 ;
+WHERE pk = 255 OR i = 22 OR (pk IN (1 , 136) AND c2 IN ('c' , 'w') AND (c1
+NOT BETWEEN 'e' AND 'i' OR c2 > 'g')) OR (pk is not null and (pk <1 or pk>1)) ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY,c1,i,c2 NULL NULL NULL 69 Using where
DROP TABLE t1;
@@ -1719,6 +1724,7 @@ insert into t1 select a+100, a+100, a+100, a+100 from t0;
insert into t1 VALUES (9,0,2,6), (9930,0,0,NULL);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set optimizer_switch='index_merge_sort_union=off';
set optimizer_switch='index_merge_union=on';
@@ -1739,6 +1745,7 @@ insert into t1 values (46,0,1,0),(47,0,1,0);
insert into t1 values (44,0,1,0),(45,0,1,0);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1
where (( f3 = 1 or f1 = 7 ) and f1 < 10) or
@@ -1767,6 +1774,7 @@ alter table t0 add key8 int not null, add index i8(key8);
update t0 set key2=key1,key3=key1,key8=1024-key1;
analyze table t0;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
set @optimizer_switch_save=@@optimizer_switch;
set optimizer_switch='derived_merge=off,derived_with_keys=off';
diff --git a/mysql-test/main/index_merge_myisam.test b/mysql-test/main/index_merge_myisam.test
index b2216bf9485..b77c9bc1ca2 100644
--- a/mysql-test/main/index_merge_myisam.test
+++ b/mysql-test/main/index_merge_myisam.test
@@ -16,6 +16,7 @@ let $merge_table_support= 1;
set @optimizer_switch_save= @@optimizer_switch;
+set optimizer_switch='rowid_filter=off';
set optimizer_switch='index_merge_sort_intersection=off';
--source include/index_merge1.inc
@@ -39,11 +40,11 @@ from t0 A, t0 B, t0 C;
explain select * from t1 where a=1 or b=1;
--echo This should use ALL:
-set optimizer_switch='default,index_merge=off';
+set optimizer_switch='default,index_merge=off,rowid_filter=off';
explain select * from t1 where a=1 or b=1;
--echo This should use sort-union:
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a=1 or b=1;
--echo This will use sort-union:
@@ -51,16 +52,16 @@ set optimizer_switch=default;
explain select * from t1 where a<1 or b <1;
--echo This should use ALL:
-set optimizer_switch='default,index_merge_sort_union=off';
+set optimizer_switch='default,index_merge_sort_union=off,rowid_filter=off';
explain select * from t1 where a<1 or b <1;
--echo This should use ALL:
-set optimizer_switch='default,index_merge=off';
+set optimizer_switch='default,index_merge=off,rowid_filter=off';
explain select * from t1 where a<1 or b <1;
--echo This will use sort-union:
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a<1 or b <1;
alter table t1 add d int, add key(d);
@@ -71,7 +72,7 @@ set optimizer_switch=default;
explain select * from t1 where (a=3 or b in (1,2)) and (c=3 or d=4);
--echo And if we disable sort_union, union:
-set optimizer_switch='default,index_merge_sort_union=off';
+set optimizer_switch='default,index_merge_sort_union=off,rowid_filter=off';
explain select * from t1 where (a=3 or b in (1,2)) and (c=3 or d=4);
drop table t1;
@@ -92,19 +93,19 @@ set optimizer_switch=default;
explain select * from t1 where a=10 and b=10;
--echo No intersect when index_merge is disabled:
-set optimizer_switch='default,index_merge=off';
+set optimizer_switch='default,index_merge=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
--echo No intersect if it is disabled:
-set optimizer_switch='default,index_merge_sort_intersection=off,index_merge_intersection=off';
+set optimizer_switch='default,index_merge_sort_intersection=off,index_merge_intersection=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
--echo Do intersect when union was disabled
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
--echo Do intersect when sort_union was disabled
-set optimizer_switch='default,index_merge_sort_union=off';
+set optimizer_switch='default,index_merge_sort_union=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10;
# Now take union-of-intersection and see how we can disable parts of it
@@ -113,12 +114,12 @@ set optimizer_switch=default;
explain select * from t1 where a=10 and b=10 or c=10;
--echo Should be only union left:
-set optimizer_switch='default,index_merge_intersection=off';
+set optimizer_switch='default,index_merge_intersection=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10 or c=10;
--echo This will switch to sort-union (intersection will be gone, too,
--echo that's a known limitation:
-set optimizer_switch='default,index_merge_union=off';
+set optimizer_switch='default,index_merge_union=off,rowid_filter=off';
explain select * from t1 where a=10 and b=10 or c=10;
set optimizer_switch=default;
@@ -235,9 +236,11 @@ INSERT INTO t1 VALUES
ALTER TABLE t1 ENABLE KEYS;
+# note: (pk is not null and (pk <1 or pk>1)) below is a sargable form of pk!=1
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY , i , c1 , c2)
-WHERE pk = 255 OR i = 22 OR (pk IN (1 , 136) AND c2 IN ('c' , 'w') AND (c1 NOT BETWEEN 'e' AND 'i' OR c2 > 'g')) OR pk != 1 ;
+WHERE pk = 255 OR i = 22 OR (pk IN (1 , 136) AND c2 IN ('c' , 'w') AND (c1
+NOT BETWEEN 'e' AND 'i' OR c2 > 'g')) OR (pk is not null and (pk <1 or pk>1)) ;
DROP TABLE t1;
diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result
index cf452af216e..1d889ffa13d 100644
--- a/mysql-test/main/information_schema.result
+++ b/mysql-test/main/information_schema.result
@@ -68,6 +68,7 @@ INDEX_STATISTICS
KEYWORDS
KEY_CACHES
KEY_COLUMN_USAGE
+OPTIMIZER_TRACE
PARAMETERS
PARTITIONS
PLUGINS
@@ -98,12 +99,12 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
-host
index_stats
plugin
proc
@@ -566,6 +567,7 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION;
create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION;
select * from information_schema.views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def mysql user select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` NONE YES mariadb.sys@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
@@ -575,6 +577,8 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
'joe'@'localhost' def test t1 a SELECT YES
select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'mariadb.sys'@'localhost' def mysql global_priv SELECT NO
+'mariadb.sys'@'localhost' def mysql global_priv DELETE NO
drop view v1, v2, v3;
drop table t1;
delete from mysql.user where user='joe';
@@ -596,6 +600,7 @@ information_schema.tables;
s1
10
11
+NULL
drop table t1;
SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
Table Create Table
@@ -667,7 +672,7 @@ proc body longblob
proc definer char(141)
proc created timestamp
proc modified timestamp
-proc sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+proc sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
proc comment text
proc character_set_client char(32)
proc collation_connection char(32)
@@ -827,7 +832,7 @@ NULL
select table_type from information_schema.tables
where table_schema="mysql" and table_name="user";
table_type
-BASE TABLE
+VIEW
show open tables where `table` like "user";
Database Table In_use Name_locked
mysql user 0 0
@@ -865,6 +870,8 @@ information_schema COLUMNS COLUMN_DEFAULT
information_schema COLUMNS COLUMN_TYPE
information_schema COLUMNS GENERATION_EXPRESSION
information_schema EVENTS EVENT_DEFINITION
+information_schema OPTIMIZER_TRACE QUERY
+information_schema OPTIMIZER_TRACE TRACE
information_schema PARAMETERS DTD_IDENTIFIER
information_schema PARTITIONS PARTITION_EXPRESSION
information_schema PARTITIONS SUBPARTITION_EXPRESSION
@@ -878,6 +885,14 @@ information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST
information_schema TRIGGERS ACTION_CONDITION
information_schema TRIGGERS ACTION_STATEMENT
information_schema VIEWS VIEW_DEFINITION
+mysql global_priv Priv
+mysql user Password
+mysql user ssl_cipher
+mysql user x509_issuer
+mysql user x509_subject
+mysql user plugin
+mysql user authentication_string
+mysql user default_role
select table_name, column_name, data_type from information_schema.columns
where data_type = 'datetime' and table_name not like 'innodb_%'
order by binary table_name, ordinal_position;
@@ -1257,7 +1272,7 @@ CREATE VIEW v1 AS SELECT 1 FROM t1
WHERE f3 = (SELECT func2 ());
SELECT func1();
func1()
-1
+2
DROP TABLE t1;
DROP VIEW v1;
DROP FUNCTION func1;
@@ -1408,6 +1423,7 @@ create table t2 (f1 int, f2 int);
create view v2 as select f1+1 as a, f2 as b from t2;
select table_name, is_updatable from information_schema.views order by table_name;
table_name is_updatable
+user YES
v1 NO
v2 YES
delete from v1;
@@ -1961,8 +1977,9 @@ lock table t1 read;
connect con1, localhost, root,,;
connection con1;
flush tables;
+flush tables t1;
connection default;
-select * from information_schema.views;
+select * from information_schema.views where table_schema='test';
TABLE_CATALOG def
TABLE_SCHEMA test
TABLE_NAME v1
@@ -2262,6 +2279,7 @@ join information_schema.CHECK_CONSTRAINTS cc
using (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, TABLE_NAME, CONSTRAINT_NAME)
;
TABLE_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+mysql global_priv Priv json_valid(`Priv`)
test t a `i` > 0
select
tc.TABLE_SCHEMA,
@@ -2273,6 +2291,7 @@ join information_schema.TABLE_CONSTRAINTS tc
using (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, TABLE_NAME, CONSTRAINT_NAME)
;
TABLE_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+mysql global_priv Priv json_valid(`Priv`)
test t a `i` > 0
select
tc.TABLE_SCHEMA,
@@ -2283,6 +2302,7 @@ from information_schema.TABLE_CONSTRAINTS tc
NATURAL join information_schema.CHECK_CONSTRAINTS cc
;
TABLE_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+mysql global_priv Priv json_valid(`Priv`)
test t a `i` > 0
select
tc.TABLE_SCHEMA,
@@ -2293,6 +2313,7 @@ from information_schema.CHECK_CONSTRAINTS cc
NATURAL join information_schema.TABLE_CONSTRAINTS tc
;
TABLE_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+mysql global_priv Priv json_valid(`Priv`)
test t a `i` > 0
select
tc.TABLE_SCHEMA,
@@ -2306,6 +2327,7 @@ join information_schema.CHECK_CONSTRAINTS cc
using (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, TABLE_NAME, CONSTRAINT_NAME)
;
TABLE_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE CONSTRAINT_CATALOG CONSTRAINT_SCHEMA
+mysql global_priv Priv json_valid(`Priv`) def mysql
test t a `i` > 0 def test
drop table t;
#
diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test
index 2fac02d2fe0..77d0df59e2f 100644
--- a/mysql-test/main/information_schema.test
+++ b/mysql-test/main/information_schema.test
@@ -20,7 +20,7 @@
--source include/default_optimizer_switch.inc
--source include/default_charset.inc
---source include/maybe_debug.inc
+--source include/have_sequence.inc
set global sql_mode="";
set local sql_mode="";
@@ -1627,15 +1627,16 @@ alter table t1 change b c int;
lock table t1 read;
connect(con1, localhost, root,,);
connection con1;
-send flush tables;
+flush tables;
+send flush tables t1;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables";
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t1";
--source include/wait_condition.inc
--vertical_results
-select * from information_schema.views;
+select * from information_schema.views where table_schema='test';
--horizontal_results
unlock tables;
diff --git a/mysql-test/main/information_schema_all_engines.result b/mysql-test/main/information_schema_all_engines.result
index 41d6ab3b2f4..1269972d127 100644
--- a/mysql-test/main/information_schema_all_engines.result
+++ b/mysql-test/main/information_schema_all_engines.result
@@ -44,6 +44,7 @@ INNODB_TRX
KEYWORDS
KEY_CACHES
KEY_COLUMN_USAGE
+OPTIMIZER_TRACE
PARAMETERS
PARTITIONS
PLUGINS
@@ -126,6 +127,7 @@ INNODB_TRX trx_id
KEYWORDS WORD
KEY_CACHES KEY_CACHE_NAME
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
+OPTIMIZER_TRACE QUERY
PARAMETERS SPECIFIC_SCHEMA
PARTITIONS TABLE_SCHEMA
PLUGINS PLUGIN_NAME
@@ -208,6 +210,7 @@ INNODB_TRX trx_id
KEYWORDS WORD
KEY_CACHES KEY_CACHE_NAME
KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
+OPTIMIZER_TRACE QUERY
PARAMETERS SPECIFIC_SCHEMA
PARTITIONS TABLE_SCHEMA
PLUGINS PLUGIN_NAME
@@ -294,6 +297,7 @@ INNODB_TABLESPACES_SCRUBBING information_schema.INNODB_TABLESPACES_SCRUBBING 1
INNODB_TRX information_schema.INNODB_TRX 1
KEY_CACHES information_schema.KEY_CACHES 1
KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1
+OPTIMIZER_TRACE information_schema.OPTIMIZER_TRACE 1
PARAMETERS information_schema.PARAMETERS 1
PARTITIONS information_schema.PARTITIONS 1
PLUGINS information_schema.PLUGINS 1
@@ -365,6 +369,7 @@ Database: information_schema
| KEYWORDS |
| KEY_CACHES |
| KEY_COLUMN_USAGE |
+| OPTIMIZER_TRACE |
| PARAMETERS |
| PARTITIONS |
| PLUGINS |
@@ -437,6 +442,7 @@ Database: INFORMATION_SCHEMA
| KEYWORDS |
| KEY_CACHES |
| KEY_COLUMN_USAGE |
+| OPTIMIZER_TRACE |
| PARAMETERS |
| PARTITIONS |
| PLUGINS |
@@ -469,5 +475,5 @@ Wildcard: inf_rmation_schema
| information_schema |
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA;
table_schema count(*)
-information_schema 67
+information_schema 68
mysql 31
diff --git a/mysql-test/main/information_schema_db.result b/mysql-test/main/information_schema_db.result
index a724340e8aa..bf665da4542 100644
--- a/mysql-test/main/information_schema_db.result
+++ b/mysql-test/main/information_schema_db.result
@@ -26,6 +26,8 @@ declare ret_val int;
select max(f1) from t1 into ret_val;
return ret_val;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create view v1 as select f1 from t1 where f1 = func1(f1);
create function func2() returns int return 1;
use mbase;
diff --git a/mysql-test/main/init_file_set_password-7656.result b/mysql-test/main/init_file_set_password-7656.result
index e5b3fc75706..fba65b036fd 100644
--- a/mysql-test/main/init_file_set_password-7656.result
+++ b/mysql-test/main/init_file_set_password-7656.result
@@ -1,8 +1,8 @@
create user foo@localhost;
select user,host,password from mysql.user where user='foo';
-user host password
+User Host Password
foo localhost
-select user,host,password from mysql.user where user='foo';
-user host password
-foo localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
+select user,host,password,plugin,authentication_string from mysql.user where user='foo';
+User Host Password plugin authentication_string
+foo localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
drop user foo@localhost;
diff --git a/mysql-test/main/init_file_set_password-7656.test b/mysql-test/main/init_file_set_password-7656.test
index b3c785a28d9..5e7a24fcf7f 100644
--- a/mysql-test/main/init_file_set_password-7656.test
+++ b/mysql-test/main/init_file_set_password-7656.test
@@ -21,6 +21,6 @@ EOF
--exec echo "restart:--init-file=$MYSQLTEST_VARDIR/init.file " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
-select user,host,password from mysql.user where user='foo';
+select user,host,password,plugin,authentication_string from mysql.user where user='foo';
drop user foo@localhost;
diff --git a/mysql-test/main/innodb_ext_key,off.rdiff b/mysql-test/main/innodb_ext_key,off.rdiff
index 47ca1e6849a..f4eaa4b112c 100644
--- a/mysql-test/main/innodb_ext_key,off.rdiff
+++ b/mysql-test/main/innodb_ext_key,off.rdiff
@@ -1,22 +1,24 @@
-@@ -4,7 +4,7 @@
+--- innodb_ext_key.result
++++ innodb_ext_key,off.result
+@@ -9,7 +9,7 @@
explain
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 8 const,const 1 Using index
-+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
++1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
flush status;
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
count(*)
-@@ -14,7 +14,7 @@
+@@ -19,7 +19,7 @@
Handler_read_first 0
Handler_read_key 1
Handler_read_last 0
-Handler_read_next 1
-+Handler_read_next 5
++Handler_read_next 6
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -45,7 +45,7 @@
+@@ -50,7 +50,7 @@
select count(*) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
id select_type table type possible_keys key key_len ref rows Extra
@@ -25,7 +27,7 @@
flush status;
select count(*) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
-@@ -56,7 +56,7 @@
+@@ -61,7 +61,7 @@
Handler_read_first 0
Handler_read_key 1
Handler_read_last 0
@@ -34,7 +36,7 @@
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -66,7 +66,7 @@
+@@ -71,7 +71,7 @@
select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
id select_type table type possible_keys key key_len ref rows Extra
@@ -43,7 +45,7 @@
flush status;
select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
-@@ -79,7 +79,7 @@
+@@ -84,7 +84,7 @@
Handler_read_first 0
Handler_read_key 1
Handler_read_last 0
@@ -52,7 +54,7 @@
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -88,7 +88,7 @@
+@@ -93,7 +93,7 @@
explain
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
id select_type table type possible_keys key key_len ref rows Extra
@@ -61,7 +63,7 @@
flush status;
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
min(l_orderkey)
-@@ -98,7 +98,7 @@
+@@ -103,7 +103,7 @@
Handler_read_first 0
Handler_read_key 1
Handler_read_last 0
@@ -70,7 +72,7 @@
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -108,7 +108,7 @@
+@@ -113,7 +113,7 @@
select min(l_orderkey) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
id select_type table type possible_keys key key_len ref rows Extra
@@ -79,7 +81,7 @@
flush status;
select min(l_orderkey) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
-@@ -119,7 +119,7 @@
+@@ -124,7 +124,7 @@
Handler_read_first 0
Handler_read_key 1
Handler_read_last 0
@@ -88,25 +90,25 @@
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -129,7 +129,7 @@
+@@ -134,7 +134,7 @@
select max(l_linenumber) from lineitem
where l_shipdate='1992-07-01' and l_orderkey=130;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
++1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
flush status;
select max(l_linenumber) from lineitem
where l_shipdate='1992-07-01' and l_orderkey=130;
-@@ -140,7 +140,7 @@
+@@ -145,7 +145,7 @@
Handler_read_first 0
Handler_read_key 1
Handler_read_last 0
-Handler_read_next 0
-+Handler_read_next 5
++Handler_read_next 6
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -152,7 +152,7 @@
+@@ -157,7 +157,7 @@
where l_shipdate='1992-07-01' and l_orderkey=130
or l_receiptdate='1992-07-01' and l_orderkey=5603;
id select_type table type possible_keys key key_len ref rows Extra
@@ -115,7 +117,7 @@
flush status;
select l_orderkey, l_linenumber
from lineitem use index (i_l_shipdate, i_l_receiptdate)
-@@ -166,10 +166,10 @@
+@@ -171,10 +171,10 @@
Handler_read_first 0
Handler_read_key 2
Handler_read_last 0
@@ -128,16 +130,16 @@
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
explain
-@@ -178,7 +178,7 @@
+@@ -183,7 +183,7 @@
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
id select_type table type possible_keys key key_len ref rows Extra
--1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
-+1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 4,4 NULL 9 Using union(i_l_shipdate,i_l_receiptdate); Using where
+-1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate # NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
++1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate # NULL 9 Using union(i_l_shipdate,i_l_receiptdate); Using where
flush status;
select l_orderkey, l_linenumber
from lineitem use index (i_l_shipdate, i_l_receiptdate)
-@@ -193,10 +193,10 @@
+@@ -198,10 +198,10 @@
Handler_read_first 0
Handler_read_key 2
Handler_read_last 0
@@ -150,25 +152,22 @@
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
explain
-@@ -204,7 +204,7 @@
+@@ -209,7 +209,7 @@
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
id select_type table type possible_keys key key_len ref rows Extra
--1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,i_l_receiptdate 8,8 NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
-+1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,PRIMARY,i_l_receiptdate,PRIMARY 4,4,4,4 NULL 2 Using union(intersect(i_l_shipdate,PRIMARY),intersect(i_l_receiptdate,PRIMARY)); Using where
+-1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,i_l_receiptdate # NULL # Using
++1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,PRIMARY,i_l_receiptdate,PRIMARY # NULL # Using
flush status;
select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
-@@ -218,7 +218,7 @@
- Handler_read_first 0
- Handler_read_key 2
- Handler_read_last 0
+@@ -220,12 +220,12 @@
+ 5959 3
+ show status like 'handler_read_next';
+ Variable_name Value
-Handler_read_next 3
+Handler_read_next 9
- Handler_read_prev 0
- Handler_read_retry 0
- Handler_read_rnd 3
-@@ -228,7 +228,7 @@
+ explain
select max(l_orderkey) from lineitem
where l_partkey between 1 and 10 group by l_partkey;
id select_type table type possible_keys key key_len ref rows Extra
@@ -177,7 +176,7 @@
flush status;
select max(l_orderkey) from lineitem
where l_partkey between 1 and 10 group by l_partkey;
-@@ -246,9 +246,9 @@
+@@ -243,9 +243,9 @@
show status like 'handler_read%';
Variable_name Value
Handler_read_first 0
@@ -190,7 +189,7 @@
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -258,7 +258,7 @@
+@@ -255,7 +255,7 @@
select max(l_orderkey) from lineitem
where l_suppkey in (1,4) group by l_suppkey;
id select_type table type possible_keys key key_len ref rows Extra
@@ -199,7 +198,7 @@
flush status;
select max(l_orderkey) from lineitem
where l_suppkey in (1,4) group by l_suppkey;
-@@ -268,9 +268,9 @@
+@@ -265,9 +265,9 @@
show status like 'handler_read%';
Variable_name Value
Handler_read_first 0
@@ -212,7 +211,7 @@
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -286,7 +286,7 @@
+@@ -283,7 +283,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE part range i_p_retailprice i_p_retailprice 9 NULL # Using where; Using index
1 SIMPLE orders ref PRIMARY,i_o_orderdate i_o_orderdate 4 const # Using index
@@ -221,7 +220,7 @@
flush status;
select o_orderkey, p_partkey
from part use index (i_p_retailprice),
-@@ -300,7 +300,7 @@
+@@ -297,7 +297,7 @@
Handler_read_first 0
Handler_read_key 3
Handler_read_last 0
@@ -230,7 +229,7 @@
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
-@@ -317,8 +317,8 @@
+@@ -314,8 +314,8 @@
select * from t0, part ignore index (primary)
where p_partkey=t0.a and p_size=1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -241,7 +240,7 @@
select * from t0, part ignore index (primary)
where p_partkey=t0.a and p_size=1;
a p_partkey p_name p_mfgr p_brand p_type p_size p_container p_retailprice p_comment
-@@ -495,7 +495,7 @@
+@@ -494,7 +494,7 @@
select * from t1, t3 where t3.col1=t1.a and t3.col2=t1.a and t3.pk1=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where
@@ -250,7 +249,7 @@
drop table t1,t2,t3;
#
# Bug mdev-4340: performance regression with extended_keys=on
-@@ -705,13 +705,13 @@
+@@ -710,13 +710,13 @@
select * from t1 force index(index_date_updated)
where index_date_updated= 10 and index_id < 800;
id select_type table type possible_keys key key_len ref rows Extra
@@ -266,7 +265,7 @@
drop table t0,t1,t2;
#
# MDEV-11196: Error:Run-Time Check Failure #2 - Stack around the variable 'key_buff'
-@@ -746,11 +746,12 @@
+@@ -751,13 +751,14 @@
"select_id": 1,
"table": {
"table_name": "t1",
@@ -280,9 +279,12 @@
+ "used_key_parts": ["f2"],
+ "ref": ["const"],
"rows": 1,
- "filtered": 100,
+- "filtered": 50,
++ "filtered": 100,
"index_condition": "t1.pk1 <= 5 and t1.pk2 <= 5 and t1.f2 = 'abc'",
-@@ -779,8 +780,8 @@
+ "attached_condition": "t1.f1 <= '3'"
+ }
+@@ -784,8 +785,8 @@
"access_type": "range",
"possible_keys": ["k1"],
"key": "k1",
@@ -291,5 +293,5 @@
+ "key_length": "3007",
+ "used_key_parts": ["pk1", "f2"],
"rows": 1,
- "filtered": 100,
+ "filtered": 50,
"index_condition": "t1.f2 <= 5 and t1.pk2 <= 5 and t1.pk1 = 'abc'",
diff --git a/mysql-test/main/innodb_ext_key.result b/mysql-test/main/innodb_ext_key.result
index 9ce41999b6f..6fba116d35d 100644
--- a/mysql-test/main/innodb_ext_key.result
+++ b/mysql-test/main/innodb_ext_key.result
@@ -1,4 +1,9 @@
SET SESSION STORAGE_ENGINE='InnoDB';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
CREATE DATABASE dbt3_s001;
use dbt3_s001;
explain
@@ -21,12 +26,12 @@ Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
explain
-select count(*) from lineitem
+select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE lineitem const PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 8 const,const 1
+1 SIMPLE lineitem const PRIMARY PRIMARY 8 const,const 1
flush status;
-select count(*) from lineitem
+select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
count(*)
1
@@ -178,7 +183,7 @@ from lineitem use index (i_l_shipdate, i_l_receiptdate)
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
+1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate # NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
flush status;
select l_orderkey, l_linenumber
from lineitem use index (i_l_shipdate, i_l_receiptdate)
@@ -204,7 +209,7 @@ select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,i_l_receiptdate 8,8 NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
+1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,i_l_receiptdate # NULL # Using
flush status;
select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
@@ -213,17 +218,9 @@ l_orderkey l_linenumber
130 2
5603 2
5959 3
-show status like 'handler_read%';
+show status like 'handler_read_next';
Variable_name Value
-Handler_read_first 0
-Handler_read_key 2
-Handler_read_last 0
Handler_read_next 3
-Handler_read_prev 0
-Handler_read_retry 0
-Handler_read_rnd 3
-Handler_read_rnd_deleted 0
-Handler_read_rnd_next 0
explain
select max(l_orderkey) from lineitem
where l_partkey between 1 and 10 group by l_partkey;
@@ -453,8 +450,8 @@ from t1 A, t1 B;
explain
select * from t1, t2 where t2.a=t1.a and t2.b < 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 10
-1 SIMPLE t2 eq_ref a a 4 test.t1.a 1 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL #
+1 SIMPLE t2 eq_ref a a 4 test.t1.a # Using where
flush status;
select * from t1, t2 where t2.a=t1.a and t2.b < 2;
a pk a b
@@ -484,7 +481,9 @@ alter table t3 add primary key (pk1, pk2);
alter table t3 add key (col1, col2);
analyze table t1,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain
select * from t1, t3 where t3.col1=t1.a and t3.col2=t1.a;
@@ -616,9 +615,15 @@ create table t1 (a bigint not null unique auto_increment, b varchar(10), primary
create table t2 (a bigint not null unique auto_increment, b varchar(10), primary key (a), key (b(2))) engine = innodb default character set utf8;
insert into t1 (b) values (null), (null), (null);
insert into t2 (b) values (null), (null), (null);
+analyze table t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
explain select a from t1 where b is null order by a desc limit 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index b PRIMARY 8 NULL 3 Using where
+1 SIMPLE t1 index b PRIMARY 8 NULL 2 Using where
select a from t1 where b is null order by a desc limit 2;
a
3
@@ -716,7 +721,7 @@ drop table t0,t1,t2;
#
# MDEV-11196: Error:Run-Time Check Failure #2 - Stack around the variable 'key_buff'
# was corrupted, server crashes in opt_sum_query
-SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@@optimizer_use_condition_selectivity=1;
+SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity, @@optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (
pk INT,
f1 VARCHAR(3),
@@ -752,7 +757,7 @@ EXPLAIN
"key_length": "3070",
"used_key_parts": ["f2", "pk1"],
"rows": 1,
- "filtered": 100,
+ "filtered": 50,
"index_condition": "t1.pk1 <= 5 and t1.pk2 <= 5 and t1.f2 = 'abc'",
"attached_condition": "t1.f1 <= '3'"
}
@@ -782,7 +787,7 @@ EXPLAIN
"key_length": "3011",
"used_key_parts": ["pk1", "f2", "pk2"],
"rows": 1,
- "filtered": 100,
+ "filtered": 50,
"index_condition": "t1.f2 <= 5 and t1.pk2 <= 5 and t1.pk1 = 'abc'",
"attached_condition": "t1.f1 <= '3'"
}
@@ -806,3 +811,5 @@ EXPLAIN SELECT pk FROM t2 FORCE INDEX(k1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL k1 23 NULL # Using index
DROP TABLE t1,t2;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages= @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test
index 04ebcc1e41b..1ff0ea51990 100644
--- a/mysql-test/main/innodb_ext_key.test
+++ b/mysql-test/main/innodb_ext_key.test
@@ -2,6 +2,13 @@
SET SESSION STORAGE_ENGINE='InnoDB';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
CREATE DATABASE dbt3_s001;
use dbt3_s001;
@@ -10,6 +17,7 @@ use dbt3_s001;
--disable_result_log
--disable_warnings
--source include/dbt3_s001.inc
+ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES();
--enable_warnings
--enable_result_log
--enable_query_log
@@ -21,10 +29,10 @@ select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
show status like 'handler_read%';
explain
-select count(*) from lineitem
+select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
flush status;
-select count(*) from lineitem
+select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
show status like 'handler_read%';
@@ -78,6 +86,7 @@ select l_orderkey, l_linenumber
or l_receiptdate='1992-07-01' and l_orderkey=5603;
show status like 'handler_read%';
+--replace_column 7 #
explain
select l_orderkey, l_linenumber
from lineitem use index (i_l_shipdate, i_l_receiptdate)
@@ -90,6 +99,7 @@ select l_orderkey, l_linenumber
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
show status like 'handler_read%';
+--replace_column 7 # 9 # 10 Using
explain
select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
@@ -98,7 +108,7 @@ flush status;
select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
-show status like 'handler_read%';
+show status like 'handler_read_next';
--replace_column 9 #
explain
@@ -302,6 +312,7 @@ select
A.a + 10 * B.a, A.a + 10 * B.a, A.a + 10 * B.a
from t1 A, t1 B;
+--replace_column 9 #
explain
select * from t1, t2 where t2.a=t1.a and t2.b < 2;
flush status;
@@ -461,6 +472,8 @@ create table t2 (a bigint not null unique auto_increment, b varchar(10), primary
insert into t1 (b) values (null), (null), (null);
insert into t2 (b) values (null), (null), (null);
+analyze table t1,t2;
+
explain select a from t1 where b is null order by a desc limit 2;
select a from t1 where b is null order by a desc limit 2;
explain select a from t2 where b is null order by a desc limit 2;
@@ -565,7 +578,7 @@ drop table t0,t1,t2;
--echo # MDEV-11196: Error:Run-Time Check Failure #2 - Stack around the variable 'key_buff'
--echo # was corrupted, server crashes in opt_sum_query
-SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@@optimizer_use_condition_selectivity=1;
+SET @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity, @@optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (
pk INT,
@@ -605,6 +618,7 @@ INSERT INTO t1 VALUES (1,2,'2','abc'),(2,3,'3','def');
explain format= json
select * from t1 force index(k1) where f2 <= 5 and pk2 <=5 and pk1 = 'abc' and f1 <= '3';
drop table t1;
+
SET optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
--echo #
@@ -626,3 +640,6 @@ INSERT INTO t2 SELECT a,a FROM t1;
EXPLAIN SELECT pk FROM t2 FORCE INDEX(k1);
DROP TABLE t1,t2;
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages= @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/innodb_icp.result b/mysql-test/main/innodb_icp.result
index 77995a53383..96ff1964ac1 100644
--- a/mysql-test/main/innodb_icp.result
+++ b/mysql-test/main/innodb_icp.result
@@ -1,5 +1,10 @@
set @save_storage_engine= @@storage_engine;
set storage_engine=InnoDB;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
set @innodb_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
#
@@ -450,11 +455,11 @@ c1 INT NOT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t1 VALUES (1,9),(2,7),(3,6),(4,3),(5,1);
-EXPLAIN SELECT pk, c1 FROM t1 WHERE pk <> 3;
+EXPLAIN SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
SET SESSION optimizer_switch='index_condition_pushdown=off';
-SELECT pk, c1 FROM t1 WHERE pk <> 3;
+SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
pk c1
1 9
2 7
@@ -590,6 +595,12 @@ i1 INTEGER NOT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t2 VALUES (4,1);
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
WHERE t2.pk <> t1.d1 AND t2.pk = 4;
@@ -647,7 +658,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 13 NULL 2 Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 ALL b NULL NULL NULL # Using where; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -659,7 +670,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 13 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 ALL b NULL NULL NULL # Using where; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -676,23 +687,23 @@ INSERT INTO t2 VALUES
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort
1 SIMPLE t2 ref a a 515 test.t1.a 1 Using where
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
1 4
SET SESSION optimizer_switch='index_condition_pushdown=on';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort
1 SIMPLE t2 ref a a 515 test.t1.a 1 Using where
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
1 4
@@ -795,6 +806,12 @@ INSERT INTO t2 (g,h) VALUES
(0,'p'),(0,'f'),(0,'p'),(7,'d'),(7,'f'),(5,'j'),
(3,'e'),(1,'u'),(4,'v'),(9,'u'),(6,'i'),(1,'x'),
(7,'f'),(5,'j'),(3,'e'),(1,'u'),(4,'v'),(9,'u');
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
SET @save_optimize_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on';
EXPLAIN
@@ -804,7 +821,7 @@ AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)
OR a = 0 AND h < 'z' );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
-1 PRIMARY t2 ref g g 5 test.t.c 9 Using where
+1 PRIMARY t2 ref g g 5 test.t.c 18 Using where
2 DEPENDENT SUBQUERY t1 index PRIMARY d 3 NULL 64 Using where; Using index
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
SELECT COUNT(*) FROM t1 AS t, t2
@@ -947,3 +964,6 @@ pk key1 key2
drop table t1, t2;
set optimizer_switch=@innodb_icp_tmp;
set storage_engine= @save_storage_engine;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/innodb_icp.test b/mysql-test/main/innodb_icp.test
index 83b0f619349..9081b886224 100644
--- a/mysql-test/main/innodb_icp.test
+++ b/mysql-test/main/innodb_icp.test
@@ -8,6 +8,13 @@
set @save_storage_engine= @@storage_engine;
set storage_engine=InnoDB;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
set @innodb_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
@@ -77,3 +84,7 @@ drop table t1, t2;
set optimizer_switch=@innodb_icp_tmp;
set storage_engine= @save_storage_engine;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
+
diff --git a/mysql-test/main/innodb_mysql_lock2.result b/mysql-test/main/innodb_mysql_lock2.result
index df97b32a41c..608cbec88c5 100644
--- a/mysql-test/main/innodb_mysql_lock2.result
+++ b/mysql-test/main/innodb_mysql_lock2.result
@@ -57,6 +57,8 @@ declare j int;
select i from t1 where i = 1 into j;
return j;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f2() returns int
begin
declare k int;
@@ -64,6 +66,8 @@ select i from t1 where i = 1 into k;
insert into t2 values (k + 5);
return 0;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f3() returns int
begin
return (select i from t1 where i = 3);
@@ -87,12 +91,16 @@ declare k int;
select i from v1 where i = 1 into k;
return k;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f7() returns int
begin
declare k int;
select j from v2 where j = 1 into k;
return k;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f8() returns int
begin
declare k int;
@@ -100,6 +108,8 @@ select i from v1 where i = 1 into k;
insert into t2 values (k+5);
return k;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f9() returns int
begin
update v2 set j=j+10 where j=1;
@@ -129,6 +139,8 @@ create procedure p2(inout p int)
begin
select i from t1 where i = 1 into p;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f14() returns int
begin
declare k int;
@@ -148,6 +160,8 @@ declare k int;
select i from t1 where i=1 into k;
set new.l= k+1;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create trigger t4_bu before update on t4 for each row
begin
if (select i from t1 where i=1) then
diff --git a/mysql-test/main/innodb_mysql_sync.result b/mysql-test/main/innodb_mysql_sync.result
index 3f284edde86..5e1f60d3e25 100644
--- a/mysql-test/main/innodb_mysql_sync.result
+++ b/mysql-test/main/innodb_mysql_sync.result
@@ -131,6 +131,7 @@ connection default;
DROP DATABASE db1;
# Test 2: Primary index (implicit), should block writes.
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
+INSERT INTO t1 VALUES(1, 2);
SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
# Sending:
ALTER TABLE t1 ADD UNIQUE INDEX(a), LOCK=SHARED;
@@ -139,15 +140,16 @@ SET DEBUG_SYNC= "now WAIT_FOR manage";
USE test;
SELECT * FROM t1;
a b
+1 2
# Sending:
-UPDATE t1 SET a=NULL;
+UPDATE t1 SET a=3;
connection con2;
# Waiting for SELECT to be blocked by the metadata lock on t1
SET DEBUG_SYNC= "now SIGNAL query";
connection default;
# Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
connection con1;
-# Reaping: UPDATE t1 SET a=NULL
+# Reaping: UPDATE t1 SET a=3
# Test 3: Primary index (explicit), should block writes.
connection default;
ALTER TABLE t1 DROP INDEX a;
@@ -158,15 +160,16 @@ connection con1;
SET DEBUG_SYNC= "now WAIT_FOR manage";
SELECT * FROM t1;
a b
+3 2
# Sending:
-UPDATE t1 SET a=NULL;
+UPDATE t1 SET a=4;
connection con2;
# Waiting for SELECT to be blocked by the metadata lock on t1
SET DEBUG_SYNC= "now SIGNAL query";
connection default;
# Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
connection con1;
-# Reaping: UPDATE t1 SET a=NULL
+# Reaping: UPDATE t1 SET a=4
# Test 4: Secondary unique index, should not block reads.
connection default;
SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
@@ -176,6 +179,7 @@ connection con1;
SET DEBUG_SYNC= "now WAIT_FOR manage";
SELECT * FROM t1;
a b
+4 2
SET DEBUG_SYNC= "now SIGNAL query";
connection default;
# Reaping: ALTER TABLE t1 ADD UNIQUE (b)
diff --git a/mysql-test/main/innodb_mysql_sync.test b/mysql-test/main/innodb_mysql_sync.test
index 4026080c4b4..466bcb360c5 100644
--- a/mysql-test/main/innodb_mysql_sync.test
+++ b/mysql-test/main/innodb_mysql_sync.test
@@ -176,6 +176,7 @@ DROP DATABASE db1;
--echo # Test 2: Primary index (implicit), should block writes.
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
+INSERT INTO t1 VALUES(1, 2);
SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
--echo # Sending:
--send ALTER TABLE t1 ADD UNIQUE INDEX(a), LOCK=SHARED
@@ -185,13 +186,13 @@ SET DEBUG_SYNC= "now WAIT_FOR manage";
USE test;
SELECT * FROM t1;
--echo # Sending:
---send UPDATE t1 SET a=NULL
+--send UPDATE t1 SET a=3
connection con2;
--echo # Waiting for SELECT to be blocked by the metadata lock on t1
let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
WHERE state= 'Waiting for table metadata lock'
- AND info='UPDATE t1 SET a=NULL';
+ AND info='UPDATE t1 SET a=3';
--source include/wait_condition.inc
SET DEBUG_SYNC= "now SIGNAL query";
@@ -200,7 +201,7 @@ connection default;
--reap
connection con1;
---echo # Reaping: UPDATE t1 SET a=NULL
+--echo # Reaping: UPDATE t1 SET a=3
--reap
--echo # Test 3: Primary index (explicit), should block writes.
@@ -215,13 +216,13 @@ connection con1;
SET DEBUG_SYNC= "now WAIT_FOR manage";
SELECT * FROM t1;
--echo # Sending:
---send UPDATE t1 SET a=NULL
+--send UPDATE t1 SET a=4
connection con2;
--echo # Waiting for SELECT to be blocked by the metadata lock on t1
let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
WHERE state= 'Waiting for table metadata lock'
- AND info='UPDATE t1 SET a=NULL';
+ AND info='UPDATE t1 SET a=4';
--source include/wait_condition.inc
SET DEBUG_SYNC= "now SIGNAL query";
@@ -230,7 +231,7 @@ connection default;
--reap
connection con1;
---echo # Reaping: UPDATE t1 SET a=NULL
+--echo # Reaping: UPDATE t1 SET a=4
--reap
--echo # Test 4: Secondary unique index, should not block reads.
diff --git a/mysql-test/main/insert.result b/mysql-test/main/insert.result
index 351222eb459..5d7e62030e4 100644
--- a/mysql-test/main/insert.result
+++ b/mysql-test/main/insert.result
@@ -751,3 +751,31 @@ REPLACE INTO v1 SET f = NULL;
ERROR 22007: Truncated incorrect DECIMAL value: 'foo'
DROP VIEW v1;
DROP TABLE t1;
+# End of 10.0 tests
+#
+# MDEV-26412: INSERT CREATE with subquery in ON expression
+#
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+create table t4 (d1 int, d2 int);
+insert into t4
+select * from t1 left join t2 on (select t1.i from t3);
+ERROR 42S22: Unknown column 't1.i' in 'field list'
+replace t4
+select * from t1 left join t2 on (select t1.i from t3);
+ERROR 42S22: Unknown column 't1.i' in 'field list'
+drop table t1,t2,t3,t4;
+create table t (a int);
+select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
+ERROR 42S22: Unknown column 't1.a' in 'on clause'
+drop table t;
+#
+# MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
+#
+create table t1 (i int) ;
+create table t2 (j int) ;
+create table t4 select * from t1 join t2 on (select t3.i);
+ERROR 42S22: Unknown column 't3.i' in 'field list'
+drop table t1, t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/insert.test b/mysql-test/main/insert.test
index e00c9cd7a0d..b27290bc91c 100644
--- a/mysql-test/main/insert.test
+++ b/mysql-test/main/insert.test
@@ -612,3 +612,39 @@ CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION;
REPLACE INTO v1 SET f = NULL;
DROP VIEW v1;
DROP TABLE t1;
+
+--echo # End of 10.0 tests
+
+--echo #
+--echo # MDEV-26412: INSERT CREATE with subquery in ON expression
+--echo #
+
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+create table t4 (d1 int, d2 int);
+
+--error ER_BAD_FIELD_ERROR
+insert into t4
+ select * from t1 left join t2 on (select t1.i from t3);
+--error ER_BAD_FIELD_ERROR
+replace t4
+ select * from t1 left join t2 on (select t1.i from t3);
+
+drop table t1,t2,t3,t4;
+
+create table t (a int);
+--error ER_BAD_FIELD_ERROR
+select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
+drop table t;
+
+--echo #
+--echo # MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
+--echo #
+create table t1 (i int) ;
+create table t2 (j int) ;
+--error ER_BAD_FIELD_ERROR
+create table t4 select * from t1 join t2 on (select t3.i);
+drop table t1, t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/intersect.result b/mysql-test/main/intersect.result
index 827d1f4d909..d4d92d74587 100644
--- a/mysql-test/main/intersect.result
+++ b/mysql-test/main/intersect.result
@@ -501,7 +501,7 @@ a
1
1
(select 1 from dual into @v) intersect (select 1 from dual);
-ERROR HY000: Incorrect usage of INTERSECT and INTO
+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 'into @v) intersect (select 1 from dual)' at line 1
select 1 from dual ORDER BY 1 intersect select 1 from dual;
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 'intersect select 1 from dual' at line 1
select 1 as a from dual union all select 1 from dual;
@@ -509,7 +509,7 @@ a
1
1
select 1 from dual intersect all select 1 from dual;
-ERROR HY000: Incorrect usage of INTERSECT and ALL
+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 'all select 1 from dual' at line 1
create table t1 (a int, b blob, a1 int, b1 blob);
create table t2 (c int, d blob, c1 int, d1 blob);
insert into t1 values (1,"ddd", 1, "sdfrrwwww"),(2, "fgh", 2, "dffggtt");
@@ -603,14 +603,14 @@ explain extended
(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
-3 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+5 UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00
-4 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
-NULL INTERSECT RESULT <intersect2,4> ALL NULL NULL NULL NULL NULL NULL
-5 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
-NULL UNION RESULT <union1,3,5> ALL NULL NULL NULL NULL NULL NULL
+3 INTERSECT t3 ALL NULL NULL NULL NULL 2 100.00
+NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
+4 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+NULL UNION RESULT <union1,5,4> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 (/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union /* select#3 */ select `__3`.`c` AS `c`,`__3`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (/* select#4 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__3` union (/* select#5 */ select 4 AS `4`,4 AS `4`)
+Note 1003 (/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union /* select#5 */ select `__5`.`c` AS `c`,`__5`.`d` AS `d` from ((/* select#2 */ select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (/* select#3 */ select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__5` union (/* select#4 */ select 4 AS `4`,4 AS `4`)
set SQL_MODE=ORACLE;
(select a,b from t1) union (select c,d from t2) intersect (select e,f from t3) union (select 4,4);
a b
@@ -724,7 +724,7 @@ a b
drop procedure p1;
show create view v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1`) union select `__3`.`c` AS `c`,`__3`.`d` AS `d` from ((select `t2`.`c` AS `c`,`t2`.`d` AS `d` from `t2`) intersect (select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3`)) `__3` union (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1`) union select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `t2`.`c` AS `c`,`t2`.`d` AS `d` from `t2`) intersect (select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3`)) `__6` union (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
drop view v1;
drop tables t1,t2,t3;
#
@@ -837,3 +837,36 @@ c1
3
drop table t12,t13,t234;
# End of 10.3 tests
+#
+# MDEV-18701: Wrong result from query that uses INTERSECT after UNION ALL
+#
+create table t1 (a int);
+insert into t1 values (3), (1), (7), (3), (2), (7), (4);
+create table t2 (a int);
+insert into t2 values (4), (5), (9), (1), (8), (9);
+create table t3 (a int);
+insert into t3 values (8), (1), (8), (2), (3), (7), (2);
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect
+select * from t3 where a < 5;
+a
+7
+7
+1
+explain extended
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect
+select * from t3 where a < 5;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 7 100.00 Using where
+4 UNION <derived2> ALL NULL NULL NULL NULL 6 100.00
+2 DERIVED t2 ALL NULL NULL NULL NULL 6 100.00 Using where
+3 INTERSECT t3 ALL NULL NULL NULL NULL 7 100.00 Using where
+NULL INTERSECT RESULT <intersect2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 union all /* select#4 */ select `__4`.`a` AS `a` from (/* select#2 */ select `test`.`t2`.`a` AS `a` from `test`.`t2` where `test`.`t2`.`a` < 5 intersect /* select#3 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where `test`.`t3`.`a` < 5) `__4`
+drop table t1,t2,t3;
diff --git a/mysql-test/main/intersect.test b/mysql-test/main/intersect.test
index 901f471121f..18c95d62d44 100644
--- a/mysql-test/main/intersect.test
+++ b/mysql-test/main/intersect.test
@@ -65,13 +65,13 @@ drop tables t1,t2,t3;
select 1 as a from dual intersect select 1 from dual;
(select 1 from dual) intersect (select 1 from dual);
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
(select 1 from dual into @v) intersect (select 1 from dual);
--error ER_PARSE_ERROR
select 1 from dual ORDER BY 1 intersect select 1 from dual;
select 1 as a from dual union all select 1 from dual;
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
select 1 from dual intersect all select 1 from dual;
@@ -327,3 +327,30 @@ select * from t13 union select * from t234 intersect select * from t12;
drop table t12,t13,t234;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-18701: Wrong result from query that uses INTERSECT after UNION ALL
+--echo #
+
+create table t1 (a int);
+insert into t1 values (3), (1), (7), (3), (2), (7), (4);
+create table t2 (a int);
+insert into t2 values (4), (5), (9), (1), (8), (9);
+create table t3 (a int);
+insert into t3 values (8), (1), (8), (2), (3), (7), (2);
+
+
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect
+select * from t3 where a < 5;
+
+explain extended
+select * from t1 where a > 4
+union all
+select * from t2 where a < 5
+intersect
+select * from t3 where a < 5;
+
+drop table t1,t2,t3;
diff --git a/mysql-test/main/invisible_field.result b/mysql-test/main/invisible_field.result
index cd1bb77be71..081c1ada1ee 100644
--- a/mysql-test/main/invisible_field.result
+++ b/mysql-test/main/invisible_field.result
@@ -559,6 +559,8 @@ DROP TABLE t1;
create or replace table t1 (a int, b int invisible);
insert into t1 values (1),(2);
select * from t1 into outfile 'f';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
load data infile 'f' into table t1;
select a,b from t1;
a b
@@ -589,6 +591,8 @@ a b
truncate table t1;
insert into t1(a,b) values (1,1),(2,2);
select a,b from t1 into outfile 'a';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
load data infile 'a' into table t1(a,b);
select a,b from t1;
a b
diff --git a/mysql-test/main/invisible_field_debug.result b/mysql-test/main/invisible_field_debug.result
index 6f85bd6dd88..582c935333c 100644
--- a/mysql-test/main/invisible_field_debug.result
+++ b/mysql-test/main/invisible_field_debug.result
@@ -331,6 +331,9 @@ insert into t1 values(1,1,1);
insert into t1 values(2,2,2);
insert into t1 values(3,3,3);
insert into t1 values(4,4,4);
+insert into t1 values(5,5,5);
+insert into t1 values(6,6,6);
+insert into t1 values(7,7,7);
set debug_dbug= "+d,test_completely_invisible,test_invisible_index";
select invisible, a ,b from t1 order by b;
invisible a b
@@ -338,9 +341,12 @@ invisible a b
9 2 2
9 3 3
9 4 4
+9 5 5
+9 6 6
+9 7 7
explain select * from t1 where invisible =9;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref invisible invisible 5 const 3
+1 SIMPLE t1 ALL invisible NULL NULL NULL 7 Using where
alter table t1 add x int default 3;
select invisible, a ,b from t1;
invisible a b
@@ -348,6 +354,9 @@ invisible a b
9 2 2
9 3 3
9 4 4
+9 5 5
+9 6 6
+9 7 7
set debug_dbug=@old_debug;
Show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -359,11 +368,11 @@ drop index invisible on t1;
ERROR 42000: Can't DROP INDEX `invisible`; check that it exists
explain select * from t1 where invisible =9;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref invisible invisible 5 const 3
+1 SIMPLE t1 ALL invisible NULL NULL NULL 7 Using where
create index invisible on t1(c);
explain select * from t1 where invisible =9;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref invisible_2 invisible_2 5 const 3
+1 SIMPLE t1 ALL invisible_2 NULL NULL NULL 7 Using where
show indexes in t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 b 1 b A NULL NULL NULL YES BTREE
diff --git a/mysql-test/main/invisible_field_debug.test b/mysql-test/main/invisible_field_debug.test
index a8e20247090..3e844fc4521 100644
--- a/mysql-test/main/invisible_field_debug.test
+++ b/mysql-test/main/invisible_field_debug.test
@@ -251,6 +251,9 @@ insert into t1 values(1,1,1);
insert into t1 values(2,2,2);
insert into t1 values(3,3,3);
insert into t1 values(4,4,4);
+insert into t1 values(5,5,5);
+insert into t1 values(6,6,6);
+insert into t1 values(7,7,7);
set debug_dbug= "+d,test_completely_invisible,test_invisible_index";
select invisible, a ,b from t1 order by b;
explain select * from t1 where invisible =9;
diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result
index 53400f67f19..5edb71ea6af 100644
--- a/mysql-test/main/join.result
+++ b/mysql-test/main/join.result
@@ -260,8 +260,8 @@ PRIMARY KEY (id)
INSERT INTO t2 VALUES (1,'s1'),(2,'s2'),(3,'s3'),(4,'s4'),(5,'s5');
select t1.*, t2.* from t1, t2 where t2.id=t1.t2_id limit 2;
t1_id t2_id type cost_unit min_value max_value t3_id item_id id name
-22 1 Percent Cost 100 -1 6 291 1 s1
-23 1 Percent Cost 100 -1 21 291 1 s1
+12 5 Percent Cost -1 0 -1 -1 5 s5
+14 4 Percent Cost -1 0 -1 -1 4 s4
drop table t1,t2;
CREATE TABLE t1 (
siteid varchar(25) NOT NULL default '',
@@ -755,10 +755,10 @@ ERROR 42S22: Unknown column 't1.b' in 'on clause'
select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
-from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
+from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='global_priv';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT
-user Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
-user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI
+global_priv Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
+global_priv User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
@@ -1268,13 +1268,19 @@ id select_type table type possible_keys key key_len ref rows Extra
INSERT INTO t1 VALUES (3,'b'),(4,NULL),(5,'c'),(6,'cc'),(7,'d'),
(8,'dd'),(9,'e'),(10,'ee');
INSERT INTO t2 VALUES (2,NULL);
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
FLUSH STATUS;
SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1;
pk v pk v
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 1
+Handler_read_key 14
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
@@ -1484,7 +1490,7 @@ DROP TABLE t1,t2,t3,t4,t5;
# MDEV-4752: Segfault during parsing of illegal query
#
SELECT * FROM t5 JOIN (t1 JOIN t2 UNION SELECT * FROM t3 JOIN t4);
-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 'SELECT * FROM t3 JOIN t4)' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT * FROM t3 JOIN t4)' at line 1
#
# MDEV-4959: join of const table with NULL fields
#
@@ -3330,12 +3336,13 @@ set @tmp1= @@myisam_stats_method;
set myisam_stats_method=nulls_equal;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set myisam_stats_method=@tmp1;
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 pk A 1010 NULL NULL BTREE
-t1 0 a 1 a A 10 NULL NULL YES BTREE
+t1 0 a 1 a A 1010 NULL NULL YES BTREE
# t1 must use eq_ref(t1.a=t0.a) and rows must be 1 (and not 45):
explain select * from t0,t1 where t0.a=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -3377,6 +3384,7 @@ t03 A,
t1000 B;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
create table t3(a int, filler char(100), key(a));
insert into t3 select A.a+1000*B.a, 'filler-data' from t1000 A, t10 B;
diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test
index b1ea744018e..b99f05f7c88 100644
--- a/mysql-test/main/join.test
+++ b/mysql-test/main/join.test
@@ -556,7 +556,7 @@ select * from v1a join v1b on t1.b = t2.b;
select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
- from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
+ from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='global_priv';
drop table t1;
drop table t2;
@@ -956,6 +956,7 @@ EXPLAIN SELECT * FROM t1 JOIN t2 ON t1.v = t2.v;
INSERT INTO t1 VALUES (3,'b'),(4,NULL),(5,'c'),(6,'cc'),(7,'d'),
(8,'dd'),(9,'e'),(10,'ee');
INSERT INTO t2 VALUES (2,NULL);
+ANALYZE TABLE t1,t2;
FLUSH STATUS;
SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1;
SHOW STATUS LIKE 'Handler_read_%';
diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result
index e9934a5a04e..1837576e719 100644
--- a/mysql-test/main/join_cache.result
+++ b/mysql-test/main/join_cache.result
@@ -11,6 +11,11 @@ set @@optimizer_switch='semijoin_with_cache=on';
set @@optimizer_switch='outer_join_with_cache=on';
set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @local_optimizer_switch=@@optimizer_switch;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
set names utf8;
CREATE DATABASE world;
use world;
@@ -59,21 +64,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -95,33 +100,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
set join_cache_level=2;
show variables like 'join_cache_level';
Variable_name Value
@@ -137,21 +142,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -173,33 +178,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
set join_cache_level=3;
show variables like 'join_cache_level';
Variable_name Value
@@ -215,21 +220,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -251,33 +256,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
set join_cache_level=4;
show variables like 'join_cache_level';
Variable_name Value
@@ -293,21 +298,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -329,33 +334,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
SELECT Country.Name, Country.Population, City.Name, City.Population
FROM Country LEFT JOIN City
ON City.Country=Country.Code AND City.Population > 5000000
@@ -406,7 +411,7 @@ ON City.Country=Country.Code AND City.Population > 5000000
WHERE Country.Name LIKE 'C%' AND Country.Population > 10000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE City hash_range City_Population #hash#$hj:City_Population 3:4 world.Country.Code 25 Using where; Rowid-ordered scan; Using join buffer (flat, BNLH join)
+1 SIMPLE City hash_range City_Population #hash#$hj:City_Population 3:4 world.Country.Code 24 Using where; Rowid-ordered scan; Using join buffer (flat, BNLH join)
SELECT Country.Name, Country.Population, City.Name, City.Population
FROM Country LEFT JOIN City
ON City.Country=Country.Code AND City.Population > 5000000
@@ -477,21 +482,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -513,33 +518,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
set join_cache_level=2;
show variables like 'join_cache_level';
Variable_name Value
@@ -555,21 +560,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -591,33 +596,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
set join_cache_level=3;
show variables like 'join_cache_level';
Variable_name Value
@@ -633,21 +638,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -669,33 +674,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
set join_cache_level=4;
show variables like 'join_cache_level';
Variable_name Value
@@ -711,21 +716,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -747,33 +752,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
set join_cache_level=@save_join_cache_level;
set join_buffer_size=@save_join_buffer_size;
DROP DATABASE world;
@@ -822,21 +827,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -846,9 +851,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE CountryLanguage hash_ALL|filter PRIMARY,Percentage #hash#PRIMARY|Percentage 3|4 world.City.Country 984 (19%) Using where; Using join buffer (flat, BNLH join); Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -858,33 +863,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
@@ -1022,21 +1027,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -1046,9 +1051,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE CountryLanguage hash_ALL|filter PRIMARY,Percentage #hash#PRIMARY|Percentage 3|4 world.City.Country 984 (19%) Using where; Using join buffer (incremental, BNLH join); Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1058,33 +1063,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
@@ -1276,26 +1281,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -1305,9 +1310,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1317,40 +1322,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -1473,26 +1478,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -1502,9 +1507,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1514,40 +1519,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -1670,26 +1675,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -1699,9 +1704,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1711,40 +1716,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -1867,26 +1872,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -1896,9 +1901,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1908,40 +1913,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2073,21 +2078,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -2097,9 +2102,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE CountryLanguage hash_ALL|filter PRIMARY,Percentage #hash#PRIMARY|Percentage 3|4 world.City.Country 984 (19%) Using where; Using join buffer (flat, BNLH join); Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2109,33 +2114,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
@@ -2177,21 +2182,21 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -2201,9 +2206,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE CountryLanguage hash_ALL|filter PRIMARY,Percentage #hash#PRIMARY|Percentage 3|4 world.City.Country 984 (19%) Using where; Using join buffer (incremental, BNLH join); Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2213,33 +2218,33 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
@@ -2276,26 +2281,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -2305,9 +2310,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2317,40 +2322,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2380,26 +2385,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -2409,9 +2414,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2421,40 +2426,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2484,26 +2489,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -2513,9 +2518,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2525,40 +2530,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2588,26 +2593,26 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
EXPLAIN
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
@@ -2617,9 +2622,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE CountryLanguage ref|filter PRIMARY,Percentage PRIMARY|Percentage 3|4 world.City.Country 4 (19%) Using index condition(BKA); Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan; Using rowid filter
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2629,40 +2634,40 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
La Matanza Argentina Spanish
-Lomas de Zamora Argentina Spanish
-Lauro de Freitas Brazil Portuguese
-Los Angeles Chile Spanish
-Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
-Lianyungang China Chinese
-Liangcheng China Chinese
-Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
+Lalitapur Nepal Nepali
Las Margaritas Mexico Spanish
+Las Palmas de Gran Canaria Spain Spanish
Lashio (Lasho) Myanmar Burmese
-Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
-Leverkusen Germany German
-Luchou Taiwan Min
-Lungtan Taiwan Min
-Lower Hutt New Zealand English
-Los Teques Venezuela Spanish
+Lauro de Freitas Brazil Portuguese
+Lengshuijiang China Chinese
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
+Leverkusen Germany German
Lexington-Fayette United States English
-Louisville United States English
+Liangcheng China Chinese
+Lianyungang China Chinese
Little Rock United States English
+Liupanshui China Chinese
+Lleida (Lérida) Spain Spanish
+Lomas de Zamora Argentina Spanish
+Long Beach United States English
+Los Angeles Chile Spanish
+Los Angeles United States English
+Los Teques Venezuela Spanish
+Louisville United States English
+Lower Hutt New Zealand English
+Luchou Taiwan Min
+Ludwigshafen am Rhein Germany German
+Lungtan Taiwan Min
+L´Hospitalet de Llobregat Spain Spanish
+Lázaro Cárdenas Mexico Spanish
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2688,52 +2693,52 @@ set join_cache_level=1;
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
Name Name
-Sydney Australia
-Dhaka Bangladesh
-São Paulo Brazil
-Rio de Janeiro Brazil
-London United Kingdom
-Santiago de Chile Chile
-Cairo Egypt
Alexandria Egypt
-Jakarta Indonesia
-Mumbai (Bombay) India
-Delhi India
+Ankara Turkey
+Baghdad Iraq
+Bangkok Thailand
+Berlin Germany
+Cairo Egypt
Calcutta [Kolkata] India
+Chengdu China
Chennai (Madras) India
-Baghdad Iraq
-Teheran Iran
-Tokyo Japan
-Jokohama [Yokohama] Japan
-Shanghai China
-Peking China
Chongqing China
-Tianjin China
-Wuhan China
+Ciudad de México Mexico
+Delhi India
+Dhaka Bangladesh
Harbin China
-Shenyang China
+Ho Chi Minh City Vietnam
+Istanbul Turkey
+Jakarta Indonesia
+Jokohama [Yokohama] Japan
Kanton [Guangzhou] China
-Chengdu China
-Santafé de Bogotá Colombia
-Kinshasa Congo, The Democratic Republic of the
-Seoul South Korea
-Pusan South Korea
-Ciudad de México Mexico
-Rangoon (Yangon) Myanmar
Karachi Pakistan
+Kinshasa Congo, The Democratic Republic of the
Lahore Pakistan
Lima Peru
-Berlin Germany
+London United Kingdom
+Los Angeles United States
+Moscow Russian Federation
+Mumbai (Bombay) India
+New York United States
+Peking China
+Pusan South Korea
+Rangoon (Yangon) Myanmar
+Rio de Janeiro Brazil
Riyadh Saudi Arabia
+Santafé de Bogotá Colombia
+Santiago de Chile Chile
+Seoul South Korea
+Shanghai China
+Shenyang China
Singapore Singapore
-Bangkok Thailand
-Istanbul Turkey
-Ankara Turkey
-Moscow Russian Federation
St Petersburg Russian Federation
-Ho Chi Minh City Vietnam
-New York United States
-Los Angeles United States
+Sydney Australia
+São Paulo Brazil
+Teheran Iran
+Tianjin China
+Tokyo Japan
+Wuhan China
set join_cache_level=8;
set join_buffer_size=384;
EXPLAIN
@@ -2798,41 +2803,41 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
ALTER TABLE Country MODIFY Name varchar(300) NOT NULL default '';
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name
-Vientiane Laos
-Riga Latvia
-Daugavpils Latvia
-Maseru Lesotho
+?iauliai Lithuania
Beirut Lebanon
-Tripoli Lebanon
-Monrovia Liberia
-Tripoli Libyan Arab Jamahiriya
Bengasi Libyan Arab Jamahiriya
-Misrata Libyan Arab Jamahiriya
-Vilnius Lithuania
+Daugavpils Latvia
Kaunas Lithuania
Klaipeda Lithuania
-?iauliai Lithuania
+Maseru Lesotho
+Misrata Libyan Arab Jamahiriya
+Monrovia Liberia
Panevezys Lithuania
+Riga Latvia
+Tripoli Lebanon
+Tripoli Libyan Arab Jamahiriya
+Vientiane Laos
+Vilnius Lithuania
ALTER TABLE Country ADD COLUMN PopulationBar text;
UPDATE Country
SET PopulationBar=REPEAT('x', CAST(Population/100000 AS unsigned int));
@@ -2840,41 +2845,41 @@ SELECT City.Name, Country.Name, Country.PopulationBar FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name PopulationBar
-Vientiane Laos xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Riga Latvia xxxxxxxxxxxxxxxxxxxxxxxx
-Daugavpils Latvia xxxxxxxxxxxxxxxxxxxxxxxx
-Maseru Lesotho xxxxxxxxxxxxxxxxxxxxxx
+?iauliai Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Beirut Lebanon xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Tripoli Lebanon xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Monrovia Liberia xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Tripoli Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Bengasi Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Misrata Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Vilnius Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Daugavpils Latvia xxxxxxxxxxxxxxxxxxxxxxxx
Kaunas Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Klaipeda Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-?iauliai Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Maseru Lesotho xxxxxxxxxxxxxxxxxxxxxx
+Misrata Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Monrovia Liberia xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Panevezys Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Riga Latvia xxxxxxxxxxxxxxxxxxxxxxxx
+Tripoli Lebanon xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Tripoli Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Vientiane Laos xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Vilnius Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
set join_buffer_size=256;
SELECT City.Name, Country.Name, Country.PopulationBar FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
Name Name PopulationBar
-Vientiane Laos xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Riga Latvia xxxxxxxxxxxxxxxxxxxxxxxx
-Daugavpils Latvia xxxxxxxxxxxxxxxxxxxxxxxx
-Maseru Lesotho xxxxxxxxxxxxxxxxxxxxxx
+?iauliai Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Beirut Lebanon xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Tripoli Lebanon xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Monrovia Liberia xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Tripoli Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Bengasi Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Misrata Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Vilnius Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Daugavpils Latvia xxxxxxxxxxxxxxxxxxxxxxxx
Kaunas Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Klaipeda Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-?iauliai Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Maseru Lesotho xxxxxxxxxxxxxxxxxxxxxx
+Misrata Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Monrovia Liberia xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Panevezys Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Riga Latvia xxxxxxxxxxxxxxxxxxxxxxxx
+Tripoli Lebanon xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Tripoli Libyan Arab Jamahiriya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Vientiane Laos xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+Vilnius Lithuania xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
set join_cache_level=@save_join_cache_level;
set join_buffer_size=@save_join_buffer_size;
#
@@ -2895,7 +2900,7 @@ ON City.Country=Country.Code AND City.Population > 5000000
WHERE Country.Name LIKE 'C%' AND Country.Population > 10000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range Name Name 302 NULL 15 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE City hash_range Population,Country #hash#Country:Population 3:4 world.Country.Code 25 Using where; Rowid-ordered scan; Using join buffer (flat, BNLH join)
+1 SIMPLE City hash_range Population,Country #hash#Country:Population 3:4 world.Country.Code 24 Using where; Rowid-ordered scan; Using join buffer (flat, BNLH join)
EXPLAIN
SELECT Country.Name, Country.Population, City.Name, City.Population
FROM Country LEFT JOIN City
@@ -2963,6 +2968,7 @@ CREATE INDEX t3_quality ON t3(quality);
INSERT INTO t3 VALUES
(6, 4, 8, 0, "010101_anastacia_spmidi.mid", "2004-03-16 13:40:00", 1, NULL, NULL, 255),
(3343, 3, 8, 1, "010102_4VN4bsPwnxRQUJW5Zp1RhG2IL9vvl_8.mid", "2004-03-16 13:40:00", 1, NULL, NULL, 255);
+insert into t3 (mediaid, formatid) values (1000,1),(1001,2),(1002,3),(1003,1),(1004,2),(1005,3);
CREATE TABLE t4(
formatid int NOT NULL ,
name varchar(60) NOT NULL default '',
@@ -3060,13 +3066,13 @@ t6.formattypeid IN (2) AND (t3.formatid IN (31, 8, 76)) AND
t1.metaid = t2.metaid AND t1.affiliateid = '2';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 system PRIMARY NULL NULL NULL 1
-1 SIMPLE t1 ref t1_affiliateid,t1_metaid t1_affiliateid 4 const 1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t5 ref PRIMARY,t5_formattypeid t5_formattypeid 4 const 1
+1 SIMPLE t1 ref t1_affiliateid,t1_metaid t1_affiliateid 4 const 2 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t7 ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using index
1 SIMPLE t8 eq_ref PRIMARY PRIMARY 4 test.t7.artistid 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t3 ref t3_metaid,t3_formatid,t3_metaidformatid t3_metaidformatid 4 test.t1.metaid 1 Using index condition; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t4 eq_ref PRIMARY,t4_formatclassid,t4_formats_idx PRIMARY 4 test.t3.formatid 1 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t9 index PRIMARY,t9_subgenreid,t9_metaid PRIMARY 8 NULL 2 Using where; Using index; Using join buffer (incremental, BNL join)
1 SIMPLE t10 eq_ref PRIMARY,t10_genreid PRIMARY 4 test.t9.subgenreid 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t10.genreid 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
@@ -3185,7 +3191,7 @@ Warning 1292 Truncated incorrect join_buffer_size value: '32'
set join_cache_level=8;
EXPLAIN SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL idx NULL NULL NULL 7 Using where
+1 SIMPLE t1 range idx idx 5 NULL 3 Using index condition; Using where; Rowid-ordered scan
1 SIMPLE t2 ref idx idx 5 test.t1.a 2 Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
a b a b
@@ -3690,8 +3696,8 @@ where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
1 SIMPLE t2 ref idx idx 5 test.t1.b 1
-1 SIMPLE t3 ref idx idx 5 test.t1.d 1
1 SIMPLE t4 ref idx idx 5 test.t1.c 1
+1 SIMPLE t3 ref idx idx 5 test.t1.d 1
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
@@ -3703,8 +3709,8 @@ where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
@@ -5054,8 +5060,8 @@ EXPLAIN
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Rowid-ordered scan
-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 2 Using where
+1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
f1 f3 f3 f2 f4
@@ -5064,8 +5070,8 @@ EXPLAIN
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 2 Using where
+1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
SELECT * FROM t1,t2
WHERE t1.f1 = t2.f4 AND (t1.f3 = 1 AND t2.f3 = 4 OR t1.f3 = 2 AND t2.f3 = 6);
f1 f3 f3 f2 f4
@@ -5120,7 +5126,7 @@ SET SESSION join_cache_level = 1;
EXPLAIN
SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
1 SIMPLE t2 ref idx idx 5 const 4 Using index condition
SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL;
a a b
@@ -5136,7 +5142,7 @@ SET SESSION join_cache_level = 4;
EXPLAIN
SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
1 SIMPLE t2 hash_range idx #hash#idx:idx 5:5 const 4 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNLH join)
SELECT * FROM t1,t2 WHERE t1.a < 3 and t2.a IS NULL;
a a b
@@ -5436,7 +5442,7 @@ ORDER BY t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1
1 PRIMARY t3 system NULL NULL NULL NULL 1
-1 PRIMARY t2 range a,c a 5 NULL 1 Using index condition; Using where; Using filesort
+1 PRIMARY t2 range a,c a 5 NULL 2 Using index condition; Using where; Using filesort
1 PRIMARY t4 ref c c 5 test.t2.c 2 Using where; Start temporary; End temporary
SELECT * FROM t1,t2
WHERE t2.c IN (SELECT c FROM t3,t4 WHERE t4.a < 10) AND
@@ -5454,7 +5460,7 @@ ORDER BY t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1 Using temporary; Using filesort
1 PRIMARY t3 system NULL NULL NULL NULL 1
-1 PRIMARY t2 range a,c a 5 NULL 1 Using index condition; Using where
+1 PRIMARY t2 range a,c a 5 NULL 2 Using index condition; Using where
1 PRIMARY t4 ref c c 5 test.t2.c 2 Using where; Start temporary; End temporary
SELECT * FROM t1,t2
WHERE t2.c IN (SELECT c FROM t3,t4 WHERE t4.a < 10) AND
@@ -5473,7 +5479,7 @@ ORDER BY t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1 Using temporary; Using filesort
1 PRIMARY t3 system NULL NULL NULL NULL 1
-1 PRIMARY t2 range a,c a 5 NULL 1 Using index condition; Using where
+1 PRIMARY t2 range a,c a 5 NULL 2 Using index condition; Using where
1 PRIMARY t4 ref c c 5 test.t2.c 2 Using where; Start temporary; End temporary
SELECT * FROM t1,t2
WHERE t2.c IN (SELECT c FROM t3,t4 WHERE t4.a < 10) AND
@@ -5948,6 +5954,12 @@ CREATE TABLE t2 (i1 int, v1 varchar(1), KEY v1 (v1,i1)) ENGINE=InnoDB;
INSERT INTO t2 VALUES
(NULL,'x'),(1,'x'),(3,'x'),(5,'x'),(8,'x'),(48,'x'),
(228,'x'),(3,'y'),(1,'z'),(9,'z');
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
CREATE TABLE temp
SELECT t1.i1 AS f1, t1.v1 AS f2 FROM (t2 JOIN t1 ON (t1.v1 = t2.v1));
SELECT * FROM temp
@@ -5966,7 +5978,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1 100.00
1 PRIMARY temp hash_ALL NULL #hash#$hj 9 test.t1.i1,test.t1.v1 7 100.00 Using where; Using join buffer (flat, BNLH join)
2 MATERIALIZED t1 ALL NULL NULL NULL NULL 1 100.00 Using where
-2 MATERIALIZED t2 hash_index v1 #hash#v1:v1 4:9 test.t1.v1 10 10.00 Using index; Using join buffer (flat, BNLH join)
+2 MATERIALIZED t2 hash_index v1 #hash#v1:v1 4:9 test.t1.v1 10 33.33 Using index; Using join buffer (flat, BNLH join)
Warnings:
Note 1003 select `test`.`temp`.`f1` AS `f1`,`test`.`temp`.`f2` AS `f2` from `test`.`temp` semi join (`test`.`t2` join `test`.`t1`) where `test`.`temp`.`f1` = `test`.`t1`.`i1` and `test`.`t2`.`v1` = `test`.`t1`.`v1` and `test`.`temp`.`f2` = `test`.`t1`.`v1`
DROP TABLE t1,t2,temp;
@@ -6031,7 +6043,7 @@ set join_buffer_space_limit=1024*8;
explain select count(*) from t1, t1 t2 where 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 11
-1 SIMPLE t2 ALL NULL NULL NULL NULL 11 Using where
+1 SIMPLE t2 ALL NULL NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
set join_buffer_space_limit=@save_join_buffer_space_limit;
drop table t1;
#
@@ -6040,12 +6052,12 @@ drop table t1;
SET join_cache_level = 3;
# The following should have
# - table order PROFILING,user,
-# - table user accessed with hash_ALL:
+# - table db accessed with hash_ALL:
explain
-SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR;
+SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FAULTS_MINOR;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where
-1 SIMPLE user hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 4 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE db hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 2 Using where; Using join buffer (flat, BNLH join)
set join_cache_level=@save_join_cache_level;
create table t1 (c1 date not null, key (c1)) engine=innodb;
insert t1 values ('2017-12-27');
@@ -6071,9 +6083,13 @@ CREATE TABLE t4 (e int primary key) ENGINE=MyISAM;
INSERT INTO t4 VALUES (1),(2);
ANALYZE TABLE t1,t2,t3,t4;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
SELECT * FROM t2 LEFT JOIN t3 ON c = d;
b c d
@@ -6163,6 +6179,7 @@ from
t2 A, t2 B;
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
# The following must have "B.col1 + 1 < 33333" attached to table B
# and not to the block-nl-join node:
@@ -6199,12 +6216,12 @@ EXPLAIN
"key_length": "10",
"used_key_parts": ["kp1", "kp2"],
"rows": 836,
- "filtered": 11.962,
+ "filtered": 76.434,
"index_condition": "b.kp2 <= 10",
"attached_condition": "b.kp2 <= 10 and b.col1 + 1 < 33333"
},
"buffer_type": "flat",
- "buffer_size": "256Kb",
+ "buffer_size": "54",
"join_type": "BNL",
"attached_condition": "b.kp1 = a.a"
}
@@ -6213,3 +6230,6 @@ EXPLAIN
drop table t1,t2,t3;
# End of 10.3 tests
set @@optimizer_switch=@save_optimizer_switch;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test
index 02e5fcba4fb..b4271f648e3 100644
--- a/mysql-test/main/join_cache.test
+++ b/mysql-test/main/join_cache.test
@@ -18,6 +18,13 @@ set @@optimizer_switch='outer_join_with_cache=on';
set @@optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set @local_optimizer_switch=@@optimizer_switch;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
set names utf8;
CREATE DATABASE world;
@@ -49,6 +56,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -62,6 +70,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -78,6 +87,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -91,6 +101,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -107,6 +118,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -121,6 +133,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -138,6 +151,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -151,6 +165,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -217,6 +232,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -230,6 +246,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -246,6 +263,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -259,6 +277,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -275,6 +294,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -288,6 +308,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -304,6 +325,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -317,6 +339,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -354,6 +377,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -367,6 +391,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -406,6 +431,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -419,6 +445,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -488,6 +515,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -501,6 +529,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -539,6 +568,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -552,6 +582,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -590,6 +621,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -603,6 +635,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -641,6 +674,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -654,6 +688,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -695,6 +730,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -708,6 +744,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -733,6 +770,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -746,6 +784,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -771,6 +810,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -784,6 +824,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -809,6 +850,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -822,6 +864,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -847,6 +890,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -860,6 +904,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -885,6 +930,7 @@ SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -898,6 +944,7 @@ SELECT City.Name, Country.Name, CountryLanguage.Language
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
+--sorted_result
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -920,6 +967,7 @@ set join_buffer_size=@save_join_buffer_size;
set join_cache_level=1;
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
@@ -941,12 +989,14 @@ set join_cache_level=6;
ALTER TABLE Country MODIFY Name varchar(52) NOT NULL default '';
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
ALTER TABLE Country MODIFY Name varchar(300) NOT NULL default '';
+--sorted_result
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -955,12 +1005,14 @@ ALTER TABLE Country ADD COLUMN PopulationBar text;
UPDATE Country
SET PopulationBar=REPEAT('x', CAST(Population/100000 AS unsigned int));
+--sorted_result
SELECT City.Name, Country.Name, Country.PopulationBar FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
set join_buffer_size=256;
+--sorted_result
SELECT City.Name, Country.Name, Country.PopulationBar FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -1065,6 +1117,7 @@ CREATE INDEX t3_quality ON t3(quality);
INSERT INTO t3 VALUES
(6, 4, 8, 0, "010101_anastacia_spmidi.mid", "2004-03-16 13:40:00", 1, NULL, NULL, 255),
(3343, 3, 8, 1, "010102_4VN4bsPwnxRQUJW5Zp1RhG2IL9vvl_8.mid", "2004-03-16 13:40:00", 1, NULL, NULL, 255);
+insert into t3 (mediaid, formatid) values (1000,1),(1001,2),(1002,3),(1003,1),(1004,2),(1005,3);
CREATE TABLE t4(
formatid int NOT NULL ,
@@ -3915,6 +3968,8 @@ INSERT INTO t2 VALUES
(NULL,'x'),(1,'x'),(3,'x'),(5,'x'),(8,'x'),(48,'x'),
(228,'x'),(3,'y'),(1,'z'),(9,'z');
+ANALYZE TABLE t1,t2;
+
CREATE TABLE temp
SELECT t1.i1 AS f1, t1.v1 AS f2 FROM (t2 JOIN t1 ON (t1.v1 = t2.v1));
@@ -3996,9 +4051,9 @@ drop table t1;
SET join_cache_level = 3;
--echo # The following should have
--echo # - table order PROFILING,user,
---echo # - table user accessed with hash_ALL:
+--echo # - table db accessed with hash_ALL:
explain
-SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR;
+SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FAULTS_MINOR;
set join_cache_level=@save_join_cache_level;
@@ -4117,3 +4172,7 @@ drop table t1,t2,t3;
# The following command must be the last one in the file
set @@optimizer_switch=@save_optimizer_switch;
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/join_nested.result b/mysql-test/main/join_nested.result
index 5ab94a6b568..4f6583b6fbc 100644
--- a/mysql-test/main/join_nested.result
+++ b/mysql-test/main/join_nested.result
@@ -1062,9 +1062,9 @@ t0.b=t1.b AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00
+1 SIMPLE t0 ref idx_a idx_a 5 const 2 100.00
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t1 ALL idx_b NULL NULL NULL 7 100.00 Using where; Using join buffer (flat, BNL join)
1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
@@ -1110,13 +1110,13 @@ t0.b=t1.b AND
(t9.a=1);
a b a b a b a b a b a b a b a b a b a b
1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 1
+1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 2
1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 1
1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 1
1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 1
1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 1
1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 1
1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 1
-1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 2
1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 2
1 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 1 2
1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 2
@@ -1150,7 +1150,7 @@ a b a b
4 2 2 2
5 3 NULL NULL
SELECT t2.a,t2.b,t3.a,t3.b
-FROM t2 LEFT JOIN (t3) ON t2.b=t3.b
+FROM t2 LEFT JOIN t3 ON t2.b=t3.b
WHERE t2.a = 4 OR (t2.a > 4 AND t3.a IS NULL);
a b a b
4 2 1 2
@@ -1209,13 +1209,13 @@ INSERT INTO t3 VALUES (0), (1), (2), (3), (4), (5);
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON c < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
-1 SIMPLE t3 index c c 5 NULL 6 Using where; Using index
-1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
+1 SIMPLE t2 range b b 5 NULL 3 Using where; Using index
+1 SIMPLE t3 ref c c 5 test.t2.b 2 Using index
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
-1 SIMPLE t3 index c c 5 NULL 6 Using where; Using index
-1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
+1 SIMPLE t2 range b b 5 NULL 3 Using where; Using index
+1 SIMPLE t3 ref c c 5 test.t2.b 2 Using index
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
a b c
NULL 0 0
diff --git a/mysql-test/main/join_nested.test b/mysql-test/main/join_nested.test
index cfb24a63304..864218371f4 100644
--- a/mysql-test/main/join_nested.test
+++ b/mysql-test/main/join_nested.test
@@ -683,7 +683,7 @@ SELECT t2.a,t2.b,t3.a,t3.b
WHERE t2.a = 4 OR (t2.a > 4 AND t3.a IS NULL);
SELECT t2.a,t2.b,t3.a,t3.b
- FROM t2 LEFT JOIN (t3) ON t2.b=t3.b
+ FROM t2 LEFT JOIN t3 ON t2.b=t3.b
WHERE t2.a = 4 OR (t2.a > 4 AND t3.a IS NULL);
ALTER TABLE t3
diff --git a/mysql-test/main/join_nested_jcl6.result b/mysql-test/main/join_nested_jcl6.result
index 541cd47bf04..3293f20aa17 100644
--- a/mysql-test/main/join_nested_jcl6.result
+++ b/mysql-test/main/join_nested_jcl6.result
@@ -1071,9 +1071,9 @@ t0.b=t1.b AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
+1 SIMPLE t0 ref idx_a idx_a 5 const 2 100.00
+1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t1 ALL idx_b NULL NULL NULL 7 100.00 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
@@ -1159,7 +1159,7 @@ a b a b
4 2 2 2
5 3 NULL NULL
SELECT t2.a,t2.b,t3.a,t3.b
-FROM t2 LEFT JOIN (t3) ON t2.b=t3.b
+FROM t2 LEFT JOIN t3 ON t2.b=t3.b
WHERE t2.a = 4 OR (t2.a > 4 AND t3.a IS NULL);
a b a b
4 2 1 2
@@ -1218,13 +1218,13 @@ INSERT INTO t3 VALUES (0), (1), (2), (3), (4), (5);
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON c < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
-1 SIMPLE t3 index c c 5 NULL 6 Using where; Using index
-1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
+1 SIMPLE t2 range b b 5 NULL 3 Using where; Using index
+1 SIMPLE t3 ref c c 5 test.t2.b 2 Using index
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
-1 SIMPLE t3 index c c 5 NULL 6 Using where; Using index
-1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
+1 SIMPLE t2 range b b 5 NULL 3 Using where; Using index
+1 SIMPLE t3 ref c c 5 test.t2.b 2 Using index
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
a b c
NULL 0 0
@@ -2033,8 +2033,8 @@ ON t6.b >= 2 AND t5.b=t7.b AND
(t8.a > 0 OR t8.c IS NULL) AND t6.a>0 AND t7.a>0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t5 ALL NULL NULL NULL NULL 3
-1 SIMPLE t7 ref PRIMARY,b_i b_i 5 test.t5.b 2 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE t6 ALL PRIMARY,b_i NULL NULL NULL 7 Using where; Using join buffer (incremental, BNL join)
+1 SIMPLE t7 ref|filter PRIMARY,b_i b_i|PRIMARY 5|4 test.t5.b 2 (29%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
+1 SIMPLE t6 range PRIMARY,b_i PRIMARY 4 NULL 3 Using where; Rowid-ordered scan; Using join buffer (incremental, BNL join)
1 SIMPLE t8 ref b_i b_i 5 test.t5.b 2 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t5
diff --git a/mysql-test/main/join_outer.result b/mysql-test/main/join_outer.result
index 758d1eda7ae..b7fcb55e4fe 100644
--- a/mysql-test/main/join_outer.result
+++ b/mysql-test/main/join_outer.result
@@ -1740,7 +1740,7 @@ from t1,t2
where t2.pk=t1.pk+1000 and t1.pk>1000
group by t2.pk;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using temporary; Using filesort
+1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 50.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
@@ -1790,8 +1790,11 @@ insert into t3 values (11, 100), (33, 301), (44, 402), (11, 102), (11, 101);
insert into t3 values (22, 100), (53, 301), (64, 402), (22, 102), (22, 101);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
flush status;
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
@@ -1800,7 +1803,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 13
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
@@ -1815,7 +1818,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 7
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
@@ -2792,7 +2795,7 @@ test.t3 analyze status OK
explain extended select * from t1 left join t3 on t1.a=t3.b and t3.a<5;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00
-1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 0.99 Using where
+1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 1.96 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` left join `test`.`t3` on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5) where 1
# t3.filtered must less than 100%, too:
@@ -2800,7 +2803,7 @@ explain extended select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
-1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 0.99 Using where
+1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 1.96 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` left join (`test`.`t3` join `test`.`t2`) on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5) where 1
drop table t1,t2,t3;
diff --git a/mysql-test/main/join_outer_innodb.result b/mysql-test/main/join_outer_innodb.result
index 197b40d6e9a..a0358094baa 100644
--- a/mysql-test/main/join_outer_innodb.result
+++ b/mysql-test/main/join_outer_innodb.result
@@ -433,47 +433,47 @@ left join t16 on t15.o1 = t16.p1
where t1.a10 = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a4,a6,a5,a7 NULL NULL NULL 3 Using where
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
-1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
-1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
1 SIMPLE t8 eq_ref PRIMARY PRIMARY 1 test.t1.a4 1 Using index
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 1 test.t1.a7 1
-1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t1.a5 1
1 SIMPLE t12 eq_ref PRIMARY PRIMARY 4 test.t11.k3 1 Using where
1 SIMPLE l2 eq_ref PRIMARY PRIMARY 4 test.t11.k4 1 Using where
1 SIMPLE t13 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
1 SIMPLE l4 eq_ref PRIMARY PRIMARY 4 test.t13.m2 1 Using where; Using index
1 SIMPLE m2 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
+1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE l3 eq_ref PRIMARY PRIMARY 4 test.m2.m2 1 Using where
-1 SIMPLE t14 eq_ref PRIMARY PRIMARY 2 test.t1.a8 1 Using where
+1 SIMPLE t14 ALL PRIMARY NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
1 SIMPLE t15 eq_ref PRIMARY PRIMARY 2 test.t1.a9 1 Using where; Using index
1 SIMPLE t16 ref PRIMARY PRIMARY 2 test.t15.o1 1 Using where
1 SIMPLE t10 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
+1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a4,a6,a5,a7 NULL NULL NULL 3 Using where
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
-1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
-1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
1 SIMPLE t8 eq_ref PRIMARY PRIMARY 1 test.t1.a4 1 Using index
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 1 test.t1.a7 1
-1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t1.a5 1
1 SIMPLE t12 eq_ref PRIMARY PRIMARY 4 test.t11.k3 1 Using where
1 SIMPLE l2 eq_ref PRIMARY PRIMARY 4 test.t11.k4 1 Using where
1 SIMPLE t13 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
1 SIMPLE l4 eq_ref PRIMARY PRIMARY 4 test.t13.m2 1 Using where; Using index
1 SIMPLE m2 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b2 1 Using where; Using index
+1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE l3 eq_ref PRIMARY PRIMARY 4 test.m2.m2 1 Using where
-1 SIMPLE t14 eq_ref PRIMARY PRIMARY 2 test.t1.a8 1 Using where
+1 SIMPLE t14 ALL PRIMARY NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1 Using index
1 SIMPLE t15 eq_ref PRIMARY PRIMARY 2 test.t1.a9 1 Using where; Using index
1 SIMPLE t16 ref PRIMARY PRIMARY 2 test.t15.o1 1 Using where
1 SIMPLE t10 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
+1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
drop view v1;
drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16;
#
diff --git a/mysql-test/main/join_outer_jcl6.result b/mysql-test/main/join_outer_jcl6.result
index 71579ae7b38..3cb846426fe 100644
--- a/mysql-test/main/join_outer_jcl6.result
+++ b/mysql-test/main/join_outer_jcl6.result
@@ -1747,7 +1747,7 @@ from t1,t2
where t2.pk=t1.pk+1000 and t1.pk>1000
group by t2.pk;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using temporary; Using filesort
+1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 50.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
@@ -1797,8 +1797,11 @@ insert into t3 values (11, 100), (33, 301), (44, 402), (11, 102), (11, 101);
insert into t3 values (22, 100), (53, 301), (64, 402), (22, 102), (22, 101);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
flush status;
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
@@ -1807,7 +1810,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 13
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
@@ -1822,7 +1825,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 7
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
@@ -2799,7 +2802,7 @@ test.t3 analyze status OK
explain extended select * from t1 left join t3 on t1.a=t3.b and t3.a<5;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00
-1 SIMPLE t3 hash_ALL NULL #hash#$hj 5 test.t1.a 1000 0.99 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE t3 hash_ALL NULL #hash#$hj 5 test.t1.a 1000 1.96 Using where; Using join buffer (flat, BNLH join)
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` left join `test`.`t3` on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5 and `test`.`t1`.`a` is not null) where 1
# t3.filtered must less than 100%, too:
@@ -2807,7 +2810,7 @@ explain extended select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE t3 hash_ALL NULL #hash#$hj 5 test.t1.a 1000 0.99 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE t3 hash_ALL NULL #hash#$hj 5 test.t1.a 1000 1.96 Using where; Using join buffer (incremental, BNLH join)
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` left join (`test`.`t3` join `test`.`t2`) on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5 and `test`.`t1`.`a` is not null) where 1
drop table t1,t2,t3;
diff --git a/mysql-test/main/key.result b/mysql-test/main/key.result
index 6edb0404524..3139caa9ae5 100644
--- a/mysql-test/main/key.result
+++ b/mysql-test/main/key.result
@@ -603,11 +603,15 @@ INSERT INTO t1 (a, b)
VALUES
(1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+ANALYZE table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 2 Using where; Using index for group-by
SELECT 1 as RES FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
RES
diff --git a/mysql-test/main/key.test b/mysql-test/main/key.test
index b386f1298fd..4e3e02c8add 100644
--- a/mysql-test/main/key.test
+++ b/mysql-test/main/key.test
@@ -556,6 +556,7 @@ INSERT INTO t1 (a, b)
VALUES
(1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+ANALYZE table t1;
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
SELECT 1 as RES FROM t1 AS t1_outer WHERE
diff --git a/mysql-test/main/key_cache.result b/mysql-test/main/key_cache.result
index 3c5ed7679f9..1964588edd5 100644
--- a/mysql-test/main/key_cache.result
+++ b/mysql-test/main/key_cache.result
@@ -662,7 +662,7 @@ select p from t1 where p between 1010 and 1020;
p
explain select i from t2 where p between 1010 and 1020;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 28 Using index condition
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 9 Using index condition
select i from t2 where p between 1010 and 1020;
i
1
@@ -728,7 +728,7 @@ p i a
1019 1 yyyy
explain select p from t2 where p between 1010 and 1020;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 7 Using where; Using index
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
select p from t2 where p between 1010 and 1020;
p
1010
@@ -739,13 +739,13 @@ p
1019
explain select i from t2 where a='yyyy' and i=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref k1,k2 k1 5 const 188 Using where
+1 SIMPLE t2 ref k1,k2 k1 5 const 189 Using where
select i from t2 where a='yyyy' and i=3;
i
3
explain select a from t2 where a='yyyy' and i=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref k1,k2 k1 5 const 188 Using where
+1 SIMPLE t2 ref k1,k2 k1 5 const 189 Using where
select a from t2 where a='yyyy' and i=3 ;
a
yyyy
diff --git a/mysql-test/main/kill.result b/mysql-test/main/kill.result
index 8f9adafada2..5d38bd90059 100644
--- a/mysql-test/main/kill.result
+++ b/mysql-test/main/kill.result
@@ -310,7 +310,7 @@ connection blocker;
lock tables t1 read;
connection ddl;
# Let us mark locked table t1 as old
-flush tables;
+flush tables t1;
connection dml;
select * from t1;
connection default;
@@ -403,4 +403,4 @@ DROP TABLE t1, t2;
# KILL QUERY ID USER
#
kill query id user 'foo';
-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 ''foo'' at line 1
+ERROR 42S22: Unknown column 'user' in 'field list'
diff --git a/mysql-test/main/kill.test b/mysql-test/main/kill.test
index b2debd95a98..70b3683d81c 100644
--- a/mysql-test/main/kill.test
+++ b/mysql-test/main/kill.test
@@ -470,18 +470,18 @@ connection blocker;
lock tables t1 read;
connection ddl;
--echo # Let us mark locked table t1 as old
---send flush tables
+--send flush tables t1
connection dml;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables";
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t1";
--source include/wait_condition.inc
--send select * from t1
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
+ where state = "Waiting for table metadata lock" and
info = "select * from t1";
--source include/wait_condition.inc
--replace_result $ID2 ID2
@@ -600,5 +600,5 @@ DROP TABLE t1, t2;
--echo #
--echo # KILL QUERY ID USER
--echo #
---error ER_PARSE_ERROR
+--error ER_BAD_FIELD_ERROR
kill query id user 'foo';
diff --git a/mysql-test/main/limit_rows_examined.result b/mysql-test/main/limit_rows_examined.result
index 2984bf46cec..e87dd25cac9 100644
--- a/mysql-test/main/limit_rows_examined.result
+++ b/mysql-test/main/limit_rows_examined.result
@@ -49,10 +49,11 @@ explain
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1i index PRIMARY PRIMARY 2 NULL 4 Using index
-1 SIMPLE t2i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t2i eq_ref PRIMARY PRIMARY 2 test.t1i.c1 1 Using index
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
c1 c2
bb bb
+cc cc
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
set @@join_cache_level=6;
@@ -69,10 +70,11 @@ explain
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1i index PRIMARY PRIMARY 2 NULL 4 Using index
-1 SIMPLE t2i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t2i eq_ref PRIMARY PRIMARY 2 test.t1i.c1 1 Using index
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
c1 c2
bb bb
+cc cc
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
Mix LIMIT ROWS EXAMINED with LIMIT
@@ -254,12 +256,13 @@ where c1 IN (select * from t2i where c2 > ' ')
LIMIT ROWS EXAMINED 6;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index
-1 PRIMARY t2i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t2i eq_ref PRIMARY PRIMARY 2 test.t1i.c1 1 Using index
select * from t1i
where c1 IN (select * from t2i where c2 > ' ')
LIMIT ROWS EXAMINED 6;
c1
bb
+cc
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
Subqueries with IN-TO-EXISTS
@@ -836,7 +839,7 @@ WHERE c = (SELECT MAX(b) FROM t2)
LIMIT ROWS EXAMINED 3;
(SELECT MAX(c) FROM t1, t2)
Warnings:
-Warning 1931 Query execution was interrupted. The query examined at least 10 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete
+Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete
drop table t1, t2;
MDEV-178: LIMIT ROWS EXAMINED: Assertion `0' failed in net_end_statement(THD*) on the
@@ -876,3 +879,19 @@ Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
SET @@sql_mode=@old_mode;
DROP TABLE t1;
+#
+# MDEV-18117: Crash with Explain extended when using limit rows examined
+#
+create table t1 (c1 char(2));
+create table t2 (c2 char(2));
+insert into t1 values ('bb'), ('cc'), ('aa'), ('dd');
+insert into t2 values ('bb'), ('cc'), ('dd'), ('ff');
+explain extended
+select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00
+1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
+Warnings:
+Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`c2` = `test`.`t1`.`c1`
+drop table t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/limit_rows_examined.test b/mysql-test/main/limit_rows_examined.test
index 4ccf25dc17a..2315580410f 100644
--- a/mysql-test/main/limit_rows_examined.test
+++ b/mysql-test/main/limit_rows_examined.test
@@ -594,3 +594,17 @@ INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
SET @@sql_mode=@old_mode;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18117: Crash with Explain extended when using limit rows examined
+--echo #
+
+create table t1 (c1 char(2));
+create table t2 (c2 char(2));
+insert into t1 values ('bb'), ('cc'), ('aa'), ('dd');
+insert into t2 values ('bb'), ('cc'), ('dd'), ('ff');
+explain extended
+select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
+drop table t1,t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/loaddata.result b/mysql-test/main/loaddata.result
index f09e6d70258..b7d51a13c85 100644
--- a/mysql-test/main/loaddata.result
+++ b/mysql-test/main/loaddata.result
@@ -623,7 +623,7 @@ CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b));
INSERT INTO t1 VALUES (1,1);
CREATE TABLE t2 (c INT);
CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2;
-SELECT a, b FROM t1 INTO OUTFILE '15645.data';
+SELECT a, b INTO OUTFILE '15645.data' FROM t1;
LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b);
ERROR HY000: Incorrect usage of Multi-table VIEW and LOAD
LOAD DATA INFILE '15645.data' REPLACE INTO TABLE v (a,b);
diff --git a/mysql-test/main/loaddata.test b/mysql-test/main/loaddata.test
index 3a5bcad1685..8fb1877bbc5 100644
--- a/mysql-test/main/loaddata.test
+++ b/mysql-test/main/loaddata.test
@@ -714,7 +714,7 @@ CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b));
INSERT INTO t1 VALUES (1,1);
CREATE TABLE t2 (c INT);
CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2;
-SELECT a, b FROM t1 INTO OUTFILE '15645.data';
+SELECT a, b INTO OUTFILE '15645.data' FROM t1;
--error ER_WRONG_USAGE
LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b);
--error ER_WRONG_USAGE
diff --git a/mysql-test/main/lock.result b/mysql-test/main/lock.result
index 2801407130d..e76c04520eb 100644
--- a/mysql-test/main/lock.result
+++ b/mysql-test/main/lock.result
@@ -457,6 +457,7 @@ connection default;
LOCK TABLE t1 WRITE;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
connection con2;
LOCK TABLE t2 WRITE;
@@ -499,7 +500,7 @@ connect con1,localhost,root,,test;
LOCK TABLE t2 WRITE;
SET lock_wait_timeout= 1;
FLUSH TABLES;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+FLUSH TABLES t2;
UNLOCK TABLES;
disconnect con1;
connection default;
diff --git a/mysql-test/main/lock.test b/mysql-test/main/lock.test
index af4a35a5139..32e4fd47664 100644
--- a/mysql-test/main/lock.test
+++ b/mysql-test/main/lock.test
@@ -609,8 +609,8 @@ LOCK TABLE t1 READ;
--connect (con1,localhost,root,,test)
LOCK TABLE t2 WRITE;
SET lock_wait_timeout= 1;
---error ER_LOCK_WAIT_TIMEOUT
FLUSH TABLES;
+FLUSH TABLES t2;
# Cleanup
UNLOCK TABLES;
diff --git a/mysql-test/main/lock_multi.result b/mysql-test/main/lock_multi.result
index e702c458c0c..30cd63e60ed 100644
--- a/mysql-test/main/lock_multi.result
+++ b/mysql-test/main/lock_multi.result
@@ -114,22 +114,21 @@ unlock tables;
drop table t1;
connection locker;
USE mysql;
-LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
+LOCK TABLES columns_priv WRITE, db WRITE, user WRITE;
FLUSH TABLES;
connection reader;
USE mysql;
-SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
+SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1;
connection locker;
-OPTIMIZE TABLES columns_priv, db, host, user;
+OPTIMIZE TABLES columns_priv, db, global_priv;
Table Op Msg_type Msg_text
mysql.columns_priv optimize status OK
mysql.db optimize status OK
-mysql.host optimize status OK
-mysql.user optimize status OK
+mysql.global_priv optimize status OK
UNLOCK TABLES;
connection reader;
-Select_priv
-N
+host
+localhost
USE test;
connection locker;
use test;
@@ -219,6 +218,7 @@ connection con2;
unlock tables;
connection con3;
a
+connection con4;
connection default;
disconnect con5;
disconnect con4;
@@ -248,6 +248,7 @@ flush table t2;
connection default;
unlock tables;
connection con1;
+connection con2;
#
# LOCK TABLES .. WRITE
#
@@ -300,7 +301,7 @@ connection default;
alter table t1 add column j int;
connect insert,localhost,root,,test,,;
connection insert;
-insert into t1 values (1,2);;
+insert into t1 values (1,2);
connection default;
unlock tables;
connection flush;
@@ -532,8 +533,9 @@ connect con3, localhost, root;
connection default;
LOCK TABLE t1 READ;
connection con3;
-# Sending:
FLUSH TABLES;
+# Sending:
+FLUSH TABLES t1;
connection con2;
SELECT * FROM t1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
diff --git a/mysql-test/main/lock_multi.test b/mysql-test/main/lock_multi.test
index a945bcdbb74..5cc7219b01d 100644
--- a/mysql-test/main/lock_multi.test
+++ b/mysql-test/main/lock_multi.test
@@ -184,25 +184,25 @@ drop table t1;
connection locker;
USE mysql;
-LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
+LOCK TABLES columns_priv WRITE, db WRITE, user WRITE;
FLUSH TABLES;
#
connection reader;
USE mysql;
# Note: This must be a multi-table select, otherwise the deadlock will not occur
send
-SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
+SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1;
#
connection locker;
# Sleep a bit till the select of connection reader is in work and hangs
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
WHERE state = "Waiting for table metadata lock" AND info =
- "SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1";
+ "SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1";
--source include/wait_condition.inc
# Make test case independent from earlier grants.
--replace_result "Table is already up to date" "OK"
-OPTIMIZE TABLES columns_priv, db, host, user;
+OPTIMIZE TABLES columns_priv, db, global_priv;
UNLOCK TABLES;
#
connection reader;
@@ -229,7 +229,7 @@ connection writer;
# Sleep a bit till the flush of connection locker is in work and hangs
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "FLUSH TABLES WITH READ LOCK";
--source include/wait_condition.inc
# This must not block.
@@ -261,7 +261,7 @@ connection writer;
# Sleep a bit till the flush of connection locker is in work and hangs
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "FLUSH TABLES WITH READ LOCK";
--source include/wait_condition.inc
--error ER_TABLE_NOT_LOCKED
@@ -298,10 +298,10 @@ DROP DATABASE mysqltest_1;
# When fixed: Reject dropping db because of the read lock.
connection con1;
# Wait a bit so that the session con2 is in state
-# "Waiting for global read lock"
+# "Waiting for backup lock"
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock"
+ where state = "Waiting for backup lock"
and info = "DROP DATABASE mysqltest_1";
--source include/wait_condition.inc
--error ER_CANT_UPDATE_WITH_READLOCK
@@ -377,7 +377,7 @@ send flush tables with read lock;
connection con5;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
--echo # global read lock is taken
@@ -386,14 +386,19 @@ send select * from t2 for update;
connection con5;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "select * from t2 for update";
--source include/wait_condition.inc
--echo # waiting for release of read lock
connection con4;
--echo # would hang and later cause a deadlock
-flush tables t2;
+--send flush tables t2
connection con1;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t2";
+--source include/wait_condition.inc
--echo # clean up
unlock tables;
connection con2;
@@ -401,6 +406,8 @@ connection con2;
unlock tables;
connection con3;
--reap
+connection con4;
+--reap
connection default;
disconnect con5;
disconnect con4;
@@ -432,16 +439,23 @@ send update t2 set a = 1;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "update t2 set a = 1";
--source include/wait_condition.inc
--echo # statement is waiting for release of read lock
connection con2;
-flush table t2;
+--send flush table t2
connection default;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock" and
+ info = "flush table t2";
+--source include/wait_condition.inc
unlock tables;
connection con1;
--reap
+connection con2;
+--reap
--echo #
--echo # LOCK TABLES .. WRITE
@@ -454,7 +468,7 @@ send lock tables t2 write;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "lock tables t2 write";
--source include/wait_condition.inc
--echo # statement is waiting for release of read lock
@@ -542,7 +556,7 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
alter table t1 add column j int;
@@ -550,14 +564,14 @@ connect (insert,localhost,root,,test,,);
connection insert;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
---send insert into t1 values (1,2);
+--send insert into t1 values (1,2)
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for table metadata lock" and
info = "insert into t1 values (1,2)";
--source include/wait_condition.inc
unlock tables;
@@ -565,7 +579,7 @@ connection flush;
--reap
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t1 values (1,2)";
--source include/wait_condition.inc
select * from t1;
@@ -598,12 +612,12 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
flush tables;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
unlock tables;
connection flush;
@@ -664,12 +678,12 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
flush tables;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
drop table t1;
connection flush;
@@ -931,13 +945,19 @@ connection default;
LOCK TABLE t1 READ;
connection con3;
+
+# first test that flush tables doesn't block
+FLUSH TABLES;
+
+# Check the FLUSH TABLES t1 waits until table lock is released
+
--echo # Sending:
---send FLUSH TABLES
+--send FLUSH TABLES t1
connection con2;
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
- WHERE state = "Waiting for table flush" AND info = "FLUSH TABLES";
+ WHERE state = "Waiting for table metadata lock" AND info = "FLUSH TABLES t1";
--source include/wait_condition.inc
--error ER_LOCK_WAIT_TIMEOUT
SELECT * FROM t1;
diff --git a/mysql-test/main/lock_sync.result b/mysql-test/main/lock_sync.result
index 55ceaedd04f..25b97460238 100644
--- a/mysql-test/main/lock_sync.result
+++ b/mysql-test/main/lock_sync.result
@@ -67,6 +67,8 @@ declare j int;
select i from t1 where i = 1 into j;
return j;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f2() returns int
begin
declare k int;
@@ -74,6 +76,8 @@ select i from t1 where i = 1 into k;
insert into t2 values (k + 5);
return 0;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f3() returns int
begin
return (select i from t1 where i = 3);
@@ -97,12 +101,16 @@ declare k int;
select i from v1 where i = 1 into k;
return k;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f7() returns int
begin
declare k int;
select j from v2 where j = 1 into k;
return k;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f8() returns int
begin
declare k int;
@@ -110,6 +118,8 @@ select i from v1 where i = 1 into k;
insert into t2 values (k+5);
return k;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f9() returns int
begin
update v2 set j=j+10 where j=1;
@@ -139,6 +149,8 @@ create procedure p2(inout p int)
begin
select i from t1 where i = 1 into p;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function f14() returns int
begin
declare k int;
@@ -166,6 +178,8 @@ select i from t1 where i = 1 into j;
call p3;
return 1;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create procedure p3()
begin
create temporary table if not exists temp1 (a int);
@@ -178,6 +192,8 @@ declare k int;
select i from t1 where i=1 into k;
set new.l= k+1;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create trigger t4_bu before update on t4 for each row
begin
if (select i from t1 where i=1) then
@@ -773,7 +789,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET DEBUG_SYNC= 'now SIGNAL dropped';
SET DEBUG_SYNC= 'now WAIT_FOR opened';
# Sending:
-FLUSH TABLES;
+FLUSH TABLES t1;
connection default;
# Waiting for FLUSH TABLES to be blocked.
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/lock_sync.test b/mysql-test/main/lock_sync.test
index b576f211792..ed0ae19f921 100644
--- a/mysql-test/main/lock_sync.test
+++ b/mysql-test/main/lock_sync.test
@@ -977,12 +977,12 @@ SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET DEBUG_SYNC= 'now SIGNAL dropped';
SET DEBUG_SYNC= 'now WAIT_FOR opened';
--echo # Sending:
---send FLUSH TABLES
+--send FLUSH TABLES t1
connection default;
--echo # Waiting for FLUSH TABLES to be blocked.
let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state= 'Waiting for table flush' AND info= 'FLUSH TABLES';
+ WHERE state= 'Waiting for table metadata lock' AND info= 'FLUSH TABLES t1';
--source include/wait_condition.inc
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/lock_user.result b/mysql-test/main/lock_user.result
new file mode 100644
index 00000000000..560ae6ce425
--- /dev/null
+++ b/mysql-test/main/lock_user.result
@@ -0,0 +1,173 @@
+create user user1@localhost;
+create user user2@localhost;
+#
+# Only privileged users should be able to lock/unlock.
+#
+alter user user1@localhost account lock;
+alter user user1@localhost account unlock;
+create user user3@localhost account lock;
+drop user user3@localhost;
+connect con1,localhost,user1;
+connection con1;
+alter user user2@localhost account lock;
+ERROR 42000: Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
+disconnect con1;
+connection default;
+#
+# ALTER USER USER1 ACCOUNT LOCK should deny the connection of user1,
+# but it should allow user2 to connect.
+#
+alter user user1@localhost account lock;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Access denied, this account is locked
+connect con2,localhost,user2;
+disconnect con2;
+connection default;
+alter user user1@localhost account unlock;
+#
+# Passing an incorrect user should return an error unless
+# IF EXISTS is used
+#
+alter user inexistentUser@localhost account lock;
+ERROR HY000: Operation ALTER USER failed for 'inexistentUser'@'localhost'
+alter user if exists inexistentUser@localhost account lock;
+Warnings:
+Error 1133 Can't find any matching row in the user table
+Note 1396 Operation ALTER USER failed for 'inexistentUser'@'localhost'
+#
+# Passing an existing user to CREATE should not be allowed
+# and it should not change the locking state of the current user
+#
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+create user user1@localhost account lock;
+ERROR HY000: Operation CREATE USER failed for 'user1'@'localhost'
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+#
+# Passing multiple users should lock them all
+#
+alter user user1@localhost, user2@localhost account lock;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Access denied, this account is locked
+connect(localhost,user2,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con2,localhost,user2;
+ERROR HY000: Access denied, this account is locked
+alter user user1@localhost, user2@localhost account unlock;
+#
+# The locking state is preserved after acl reload
+#
+alter user user1@localhost account lock;
+flush privileges;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Access denied, this account is locked
+alter user user1@localhost account unlock;
+#
+# JSON functions on global_priv reflect the locking state of an account
+#
+alter user user1@localhost account lock;
+select host, user, JSON_VALUE(Priv, '$.account_locked') from mysql.global_priv where user='user1';
+host user JSON_VALUE(Priv, '$.account_locked')
+localhost user1 1
+alter user user1@localhost account unlock;
+select host, user, JSON_VALUE(Priv, '$.account_locked') from mysql.global_priv where user='user1';
+host user JSON_VALUE(Priv, '$.account_locked')
+localhost user1 0
+#
+# SHOW CREATE USER correctly displays the locking state of an user
+#
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+alter user user1@localhost account lock;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` ACCOUNT LOCK
+alter user user1@localhost account unlock;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+create user newuser@localhost account lock;
+show create user newuser@localhost;
+CREATE USER for newuser@localhost
+CREATE USER `newuser`@`localhost` ACCOUNT LOCK
+drop user newuser@localhost;
+#
+# Users should be able to lock themselves
+#
+grant CREATE USER on *.* to user1@localhost;
+connect con1,localhost,user1;
+connection con1;
+alter user user1@localhost account lock;
+disconnect con1;
+connection default;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Access denied, this account is locked
+alter user user1@localhost account unlock;
+#
+# Users should be able to unlock themselves if the connections
+# had been established before the accounts were locked
+#
+grant CREATE USER on *.* to user1@localhost;
+connect con1,localhost,user1;
+alter user user1@localhost account lock;
+connection con1;
+alter user user1@localhost account unlock;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+disconnect con1;
+connection default;
+#
+# COM_CHANGE_USER should return error if the destination
+# account is locked
+#
+alter user user1@localhost account lock;
+ERROR HY000: Access denied, this account is locked
+#
+# MDEV-24098 SHOW CREATE USER invalid for both PASSWORD EXPIRE and
+# and LOCKED
+#
+alter user user1@localhost PASSWORD EXPIRE;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` ACCOUNT LOCK PASSWORD EXPIRE
+drop user user1@localhost;
+#
+# MDEV-24098 CREATE USER/ALTER USER PASSWORD EXPIRE/LOCK in
+# either order.
+#
+create user user1@localhost PASSWORD EXPIRE ACCOUNT LOCK;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` ACCOUNT LOCK PASSWORD EXPIRE
+drop user user1@localhost;
+create user user1@localhost ACCOUNT LOCK PASSWORD EXPIRE;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` ACCOUNT LOCK PASSWORD EXPIRE
+alter user user1@localhost PASSWORD EXPIRE NEVER ACCOUNT UNLOCK ;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+ALTER USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+alter user user1@localhost ACCOUNT LOCK PASSWORD EXPIRE DEFAULT;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` ACCOUNT LOCK PASSWORD EXPIRE
+alter user user1@localhost PASSWORD EXPIRE INTERVAL 60 DAY ACCOUNT UNLOCK;
+select * from mysql.global_priv where user='user1';
+Host User Priv
+localhost user1 {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":false,"password_last_changed":0,"password_lifetime":60}
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+ALTER USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 60 DAY
+drop user user1@localhost;
+drop user user2@localhost;
diff --git a/mysql-test/main/lock_user.test b/mysql-test/main/lock_user.test
new file mode 100644
index 00000000000..530883f33ef
--- /dev/null
+++ b/mysql-test/main/lock_user.test
@@ -0,0 +1,168 @@
+#
+# Test user account locking
+#
+
+--source include/not_embedded.inc
+
+create user user1@localhost;
+create user user2@localhost;
+
+--echo #
+--echo # Only privileged users should be able to lock/unlock.
+--echo #
+alter user user1@localhost account lock;
+alter user user1@localhost account unlock;
+create user user3@localhost account lock;
+drop user user3@localhost;
+
+connect(con1,localhost,user1);
+connection con1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+alter user user2@localhost account lock;
+disconnect con1;
+connection default;
+
+--echo #
+--echo # ALTER USER USER1 ACCOUNT LOCK should deny the connection of user1,
+--echo # but it should allow user2 to connect.
+--echo #
+
+alter user user1@localhost account lock;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+connect(con1,localhost,user1);
+connect(con2,localhost,user2);
+disconnect con2;
+connection default;
+alter user user1@localhost account unlock;
+
+--echo #
+--echo # Passing an incorrect user should return an error unless
+--echo # IF EXISTS is used
+--echo #
+
+--error ER_CANNOT_USER
+alter user inexistentUser@localhost account lock;
+
+alter user if exists inexistentUser@localhost account lock;
+
+--echo #
+--echo # Passing an existing user to CREATE should not be allowed
+--echo # and it should not change the locking state of the current user
+--echo #
+
+show create user user1@localhost;
+--error ER_CANNOT_USER
+create user user1@localhost account lock;
+show create user user1@localhost;
+
+--echo #
+--echo # Passing multiple users should lock them all
+--echo #
+
+alter user user1@localhost, user2@localhost account lock;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+connect(con1,localhost,user1);
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+connect(con2,localhost,user2);
+alter user user1@localhost, user2@localhost account unlock;
+
+--echo #
+--echo # The locking state is preserved after acl reload
+--echo #
+
+alter user user1@localhost account lock;
+flush privileges;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+connect(con1,localhost,user1);
+alter user user1@localhost account unlock;
+
+--echo #
+--echo # JSON functions on global_priv reflect the locking state of an account
+--echo #
+
+alter user user1@localhost account lock;
+select host, user, JSON_VALUE(Priv, '$.account_locked') from mysql.global_priv where user='user1';
+alter user user1@localhost account unlock;
+select host, user, JSON_VALUE(Priv, '$.account_locked') from mysql.global_priv where user='user1';
+
+--echo #
+--echo # SHOW CREATE USER correctly displays the locking state of an user
+--echo #
+
+show create user user1@localhost;
+alter user user1@localhost account lock;
+show create user user1@localhost;
+alter user user1@localhost account unlock;
+show create user user1@localhost;
+create user newuser@localhost account lock;
+show create user newuser@localhost;
+drop user newuser@localhost;
+
+--echo #
+--echo # Users should be able to lock themselves
+--echo #
+grant CREATE USER on *.* to user1@localhost;
+connect(con1,localhost,user1);
+connection con1;
+alter user user1@localhost account lock;
+disconnect con1;
+connection default;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+connect(con1,localhost,user1);
+alter user user1@localhost account unlock;
+
+--echo #
+--echo # Users should be able to unlock themselves if the connections
+--echo # had been established before the accounts were locked
+--echo #
+grant CREATE USER on *.* to user1@localhost;
+connect(con1,localhost,user1);
+alter user user1@localhost account lock;
+connection con1;
+alter user user1@localhost account unlock;
+show create user user1@localhost;
+disconnect con1;
+connection default;
+
+--echo #
+--echo # COM_CHANGE_USER should return error if the destination
+--echo # account is locked
+--echo #
+alter user user1@localhost account lock;
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+--change_user user1
+
+--echo #
+--echo # MDEV-24098 SHOW CREATE USER invalid for both PASSWORD EXPIRE and
+--echo # and LOCKED
+--echo #
+alter user user1@localhost PASSWORD EXPIRE;
+show create user user1@localhost;
+drop user user1@localhost;
+
+--echo #
+--echo # MDEV-24098 CREATE USER/ALTER USER PASSWORD EXPIRE/LOCK in
+--echo # either order.
+--echo #
+create user user1@localhost PASSWORD EXPIRE ACCOUNT LOCK;
+show create user user1@localhost;
+drop user user1@localhost;
+create user user1@localhost ACCOUNT LOCK PASSWORD EXPIRE;
+show create user user1@localhost;
+alter user user1@localhost PASSWORD EXPIRE NEVER ACCOUNT UNLOCK ;
+show create user user1@localhost;
+alter user user1@localhost ACCOUNT LOCK PASSWORD EXPIRE DEFAULT;
+show create user user1@localhost;
+# note output needs to be corrected by MDEV-24114: password expire users cannot be unexpired
+alter user user1@localhost PASSWORD EXPIRE INTERVAL 60 DAY ACCOUNT UNLOCK;
+select * from mysql.global_priv where user='user1';
+show create user user1@localhost;
+
+drop user user1@localhost;
+drop user user2@localhost;
+
diff --git a/mysql-test/main/log_tables_upgrade.result b/mysql-test/main/log_tables_upgrade.result
index 8f822d56020..8d7b08a11bd 100644
--- a/mysql-test/main/log_tables_upgrade.result
+++ b/mysql-test/main/log_tables_upgrade.result
@@ -19,12 +19,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -43,9 +43,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/long_unique.result b/mysql-test/main/long_unique.result
new file mode 100644
index 00000000000..755612c7915
--- /dev/null
+++ b/mysql-test/main/long_unique.result
@@ -0,0 +1,1438 @@
+#Structure of tests
+#First we will check all option for
+#table containing single unique column
+#table containing keys like unique(a,b,c,d) etc
+#then table containing 2 blob unique etc
+#table with single long blob column;
+create table t1(a blob unique );
+insert into t1 values(1),(2),(3),(56),('sachin'),('maria'),(123456789034567891),(null),(null),(123456789034567890);
+#blob with primary key not allowed
+create table t2(a blob,primary key(a(10000)));
+ERROR 42000: Specified key was too long; max key length is 1000 bytes
+create table t3(a varchar(10000) primary key);
+ERROR 42000: Specified key was too long; max key length is 1000 bytes
+insert into t1 values(2);
+ERROR 23000: Duplicate entry '2' for key 'a'
+#table structure;
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table t1
+Non_unique 0
+Key_name a
+Seq_in_index 1
+Column_name a
+Collation A
+Cardinality NULL
+Sub_part NULL
+Packed NULL
+Null YES
+Index_type HASH
+Comment
+Index_comment
+
+MyISAM file: DATADIR/test/t1
+Record format: Packed
+Character set: latin1_swedish_ci (8)
+Data records: 10 Deleted blocks: 0
+Recordlength: 12
+
+table description:
+Key Start Len Index Type
+1 12 8 multip. ulonglong NULL
+select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION,COLUMN_DEFAULT,IS_NULLABLE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,DATETIME_PRECISION,CHARACTER_SET_NAME,COLLATION_NAME,COLUMN_TYPE,COLUMN_KEY,EXTRA,COLUMN_COMMENT,IS_GENERATED,GENERATION_EXPRESSION from information_schema.columns where table_schema = 'test' and table_name = 't1';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 a 1 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob UNI NEVER NULL
+select * from information_schema.statistics where table_schema = 'test' and table_name = 't1';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
+def test t1 0 test a 1 a A NULL NULL NULL YES HASH
+select * from information_schema.key_column_usage where table_schema= 'test' and table_name= 't1';
+CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA test
+CONSTRAINT_NAME a
+TABLE_CATALOG def
+TABLE_SCHEMA test
+TABLE_NAME t1
+COLUMN_NAME a
+ORDINAL_POSITION 1
+POSITION_IN_UNIQUE_CONSTRAINT NULL
+REFERENCED_TABLE_SCHEMA NULL
+REFERENCED_TABLE_NAME NULL
+REFERENCED_COLUMN_NAME NULL
+# table select we should not be able to see db_row_hash_column;
+select * from t1 order by a;
+a
+NULL
+NULL
+1
+123456789034567890
+123456789034567891
+2
+3
+56
+maria
+sachin
+select db_row_hash_1 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list'
+#duplicate entry test;
+insert into t1 values(2);
+ERROR 23000: Duplicate entry '2' for key 'a'
+insert into t1 values('sachin');
+ERROR 23000: Duplicate entry 'sachin' for key 'a'
+insert into t1 values(123456789034567891);
+ERROR 23000: Duplicate entry '123456789034567891' for key 'a'
+select * from t1 order by a;
+a
+NULL
+NULL
+1
+123456789034567890
+123456789034567891
+2
+3
+56
+maria
+sachin
+insert into t1 values(11),(22),(33);
+insert into t1 values(12),(22);
+ERROR 23000: Duplicate entry '22' for key 'a'
+select * from t1 order by a;
+a
+NULL
+NULL
+1
+11
+12
+123456789034567890
+123456789034567891
+2
+22
+3
+33
+56
+maria
+sachin
+insert into t1 values(repeat('s',4000*10)),(repeat('s',4001*10));
+insert into t1 values(repeat('m',4000*10)),(repeat('m',4000*10));
+ERROR 23000: Duplicate entry 'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...' for key 'a'
+insert into t1 values(repeat('m',4001)),(repeat('m',4002));
+truncate table t1;
+insert into t1 values(1),(2),(3),(4),(5),(8),(7);
+
+MyISAM file: DATADIR/test/t1
+Record format: Packed
+Character set: latin1_swedish_ci (8)
+Data records: 7 Deleted blocks: 0
+Recordlength: 12
+
+table description:
+Key Start Len Index Type
+1 12 8 multip. ulonglong NULL
+#now some alter commands;
+alter table t1 add column b int;
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+b int(11) YES NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values(1,2);
+ERROR 23000: Duplicate entry '1' for key 'a'
+insert into t1 values(2,2);
+ERROR 23000: Duplicate entry '2' for key 'a'
+select db_row_hash_1 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list'
+#now try to change db_row_hash_1 column;
+alter table t1 drop column db_row_hash_1;
+ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists
+alter table t1 add column d int , add column e int , drop column db_row_hash_1;
+ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists
+alter table t1 modify column db_row_hash_1 int ;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 add column a int , add column b int, modify column db_row_hash_1 int ;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 change column db_row_hash_1 dsds int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 add column asd int, change column db_row_hash_1 dsds int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 drop column b , add column c int;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+#now add some column with name db_row_hash;
+alter table t1 add column db_row_hash_1 int unique;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values(45,1,55),(46,1,55);
+ERROR 23000: Duplicate entry '55' for key 'db_row_hash_1'
+insert into t1 values(45,1,55),(45,1,55);
+ERROR 23000: Duplicate entry '45' for key 'a'
+alter table t1 add column db_row_hash_2 int, add column db_row_hash_3 int;
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+c int(11) YES NULL
+db_row_hash_1 int(11) YES UNI NULL
+db_row_hash_2 int(11) YES NULL
+db_row_hash_3 int(11) YES NULL
+#this should also drop the unique index ;
+alter table t1 drop column a;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_3` int(11) DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+#add column with unique index on blob ;
+alter table t1 add column a blob unique;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_3` int(11) DEFAULT NULL,
+ `a` blob DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# try to change the blob unique name;
+alter table t1 change column a aa blob ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_3` int(11) DEFAULT NULL,
+ `aa` blob DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `a` (`aa`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 a 1 aa A NULL NULL NULL YES HASH
+# try to change the blob unique datatype;
+#this will change index to b tree;
+alter table t1 modify column aa int ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_3` int(11) DEFAULT NULL,
+ `aa` int(11) DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `a` (`aa`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 a 1 aa A NULL NULL NULL YES BTREE
+alter table t1 add column clm blob unique;
+#try changing the name ;
+alter table t1 change column clm clm_changed blob;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_3` int(11) DEFAULT NULL,
+ `aa` int(11) DEFAULT NULL,
+ `clm_changed` blob DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `a` (`aa`),
+ UNIQUE KEY `clm` (`clm_changed`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 a 1 aa A NULL NULL NULL YES BTREE
+t1 0 clm 1 clm_changed A NULL NULL NULL YES HASH
+#now drop the unique key;
+alter table t1 drop key clm;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_3` int(11) DEFAULT NULL,
+ `aa` int(11) DEFAULT NULL,
+ `clm_changed` blob DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `a` (`aa`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 a 1 aa A NULL NULL NULL YES BTREE
+drop table t1;
+create table t1 (a TEXT CHARSET latin1 COLLATE latin1_german2_ci unique);
+desc t1;
+Field Type Null Key Default Extra
+a text YES UNI NULL
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+insert into t1 values ('ae');
+insert into t1 values ('AE');
+ERROR 23000: Duplicate entry 'AE' for key 'a'
+insert into t1 values ('Ä');
+drop table t1;
+create table t1 (a int primary key, b blob unique);
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO PRI NULL
+b blob YES UNI NULL
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 PRIMARY 1 a A 0 NULL NULL BTREE
+t1 0 b 1 b A NULL NULL NULL YES HASH
+insert into t1 values(1,1),(2,2),(3,3);
+insert into t1 values(1,1);
+ERROR 23000: Duplicate entry '1' for key 'b'
+insert into t1 values(7,1);
+ERROR 23000: Duplicate entry '1' for key 'b'
+drop table t1;
+#table with multiple long blob column and varchar text column ;
+create table t1(a blob unique, b int , c blob unique , d text unique , e varchar(3000) unique);
+insert into t1 values(1,2,3,4,5),(2,11,22,33,44),(3111,222,333,444,555),(5611,2222,3333,4444,5555),
+('sachin',341,'fdf','gfgfgfg','hghgr'),('maria',345,'frter','dasd','utyuty'),
+(123456789034567891,353534,53453453453456,64565464564564,45435345345345),
+(123456789034567890,43545,657567567567,78967657567567,657567567567567676);
+#table structure;
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+b int(11) YES NULL
+c blob YES UNI NULL
+d text YES UNI NULL
+e varchar(3000) YES UNI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH,
+ UNIQUE KEY `c` (`c`) USING HASH,
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `e` (`e`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 d 1 d A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+
+MyISAM file: DATADIR/test/t1
+Record format: Packed
+Character set: latin1_swedish_ci (8)
+Data records: 8 Deleted blocks: 0
+Recordlength: 3040
+
+table description:
+Key Start Len Index Type
+1 3039 8 multip. ulonglong NULL
+2 3047 8 multip. ulonglong NULL
+3 3055 8 multip. ulonglong NULL
+4 3063 8 multip. ulonglong NULL
+select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION,COLUMN_DEFAULT,IS_NULLABLE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,DATETIME_PRECISION,CHARACTER_SET_NAME,COLLATION_NAME,COLUMN_TYPE,COLUMN_KEY,EXTRA,COLUMN_COMMENT,IS_GENERATED,GENERATION_EXPRESSION from information_schema.columns where table_schema = 'test' and table_name = 't1';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 a 1 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob UNI NEVER NULL
+def test t1 b 2 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t1 c 3 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob UNI NEVER NULL
+def test t1 d 4 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text UNI NEVER NULL
+def test t1 e 5 NULL YES varchar 3000 3000 NULL NULL NULL latin1 latin1_swedish_ci varchar(3000) UNI NEVER NULL
+select * from information_schema.statistics where table_schema = 'test' and table_name = 't1';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
+def test t1 0 test a 1 a A NULL NULL NULL YES HASH
+def test t1 0 test c 1 c A NULL NULL NULL YES HASH
+def test t1 0 test d 1 d A NULL NULL NULL YES HASH
+def test t1 0 test e 1 e A NULL NULL NULL YES HASH
+select * from information_schema.key_column_usage where table_schema= 'test' and table_name= 't1';
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def test a def test t1 a 1 NULL NULL NULL NULL
+def test c def test t1 c 1 NULL NULL NULL NULL
+def test d def test t1 d 1 NULL NULL NULL NULL
+def test e def test t1 e 1 NULL NULL NULL NULL
+#table select we should not be able to see db_row_hash_1 column;
+select * from t1 order by a;
+a b c d e
+1 2 3 4 5
+123456789034567890 43545 657567567567 78967657567567 657567567567567676
+123456789034567891 353534 53453453453456 64565464564564 45435345345345
+2 11 22 33 44
+3111 222 333 444 555
+5611 2222 3333 4444 5555
+maria 345 frter dasd utyuty
+sachin 341 fdf gfgfgfg hghgr
+select db_row_hash_1 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list'
+select db_row_hash_2 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_2' in 'field list'
+select db_row_hash_3 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_3' in 'field list'
+#duplicate entry test;
+insert into t1 values(21,2,3,42,51);
+ERROR 23000: Duplicate entry '3' for key 'c'
+insert into t1 values('sachin',null,null,null,null);
+ERROR 23000: Duplicate entry 'sachin' for key 'a'
+insert into t1 values(1234567890345671890,4353451,6575675675617,789676575675617,657567567567567676);
+ERROR 23000: Duplicate entry '657567567567567676' for key 'e'
+select * from t1 order by a;
+a b c d e
+1 2 3 4 5
+123456789034567890 43545 657567567567 78967657567567 657567567567567676
+123456789034567891 353534 53453453453456 64565464564564 45435345345345
+2 11 22 33 44
+3111 222 333 444 555
+5611 2222 3333 4444 5555
+maria 345 frter dasd utyuty
+sachin 341 fdf gfgfgfg hghgr
+insert into t1 values(repeat('s',4000*10),100,repeat('s',4000*10),repeat('s',4000*10),
+repeat('s',400)),(repeat('s',4001*10),1000,repeat('s',4001*10),repeat('s',4001*10),
+repeat('s',2995));
+insert into t1 values(repeat('m',4000*11),10,repeat('s',4000*11),repeat('s',4000*11),repeat('s',2995));
+ERROR 23000: Duplicate entry 'sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...' for key 'e'
+truncate table t1;
+insert into t1 values(1,2,3,4,5),(2,11,22,33,44),(3111,222,333,444,555),(5611,2222,3333,4444,5555);
+#now some alter commands;
+alter table t1 add column f int;
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+b int(11) YES NULL
+c blob YES UNI NULL
+d text YES UNI NULL
+e varchar(3000) YES UNI NULL
+f int(11) YES NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH,
+ UNIQUE KEY `c` (`c`) USING HASH,
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `e` (`e`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+#unique key should not break;
+insert into t1 values(1,2,3,4,5,6);
+ERROR 23000: Duplicate entry '1' for key 'a'
+select db_row_hash_1 , db_row_hash_2, db_row_hash_3 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list'
+#now try to change db_row_hash_1 column;
+alter table t1 drop column db_row_hash_1, drop column db_row_hash_2, drop column db_row_hash_3;
+ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists
+alter table t1 add column dg int , add column ef int , drop column db_row_hash_1;
+ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists
+alter table t1 modify column db_row_hash_1 int , modify column db_row_hash_2 int, modify column db_row_hash_3 int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 add column ar int , add column rb int, modify column db_row_hash_1 int , modify column db_row_hash_3 int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 change column db_row_hash_1 dsds int , change column db_row_hash_2 dfdf int , change column db_row_hash_3 gdfg int ;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 add column asd int, drop column a, change column db_row_hash_1 dsds int, change db_row_hash_3 fdfdfd int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 drop column b , add column g int;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH,
+ UNIQUE KEY `c` (`c`) USING HASH,
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `e` (`e`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+#now add some column with name db_row_hash;
+alter table t1 add column db_row_hash_1 int unique;
+alter table t1 add column db_row_hash_2 int unique;
+alter table t1 add column db_row_hash_3 int unique;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_3` int(11) DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `db_row_hash_2` (`db_row_hash_2`),
+ UNIQUE KEY `db_row_hash_3` (`db_row_hash_3`),
+ UNIQUE KEY `a` (`a`) USING HASH,
+ UNIQUE KEY `c` (`c`) USING HASH,
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `e` (`e`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t1 add column db_row_hash_7 int, add column db_row_hash_5 int , add column db_row_hash_4 int ;
+alter table t1 drop column db_row_hash_7,drop column db_row_hash_3, drop column db_row_hash_4;
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+c blob YES UNI NULL
+d text YES UNI NULL
+e varchar(3000) YES UNI NULL
+f int(11) YES NULL
+g int(11) YES NULL
+db_row_hash_1 int(11) YES UNI NULL
+db_row_hash_2 int(11) YES UNI NULL
+db_row_hash_5 int(11) YES NULL
+#this should not break anything;
+insert into t1 values(1,2,3,4,5,6,23,5,6);
+ERROR 23000: Duplicate entry '1' for key 'a'
+#this should also drop the unique index;
+alter table t1 drop column a, drop column c;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_5` int(11) DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `db_row_hash_2` (`db_row_hash_2`),
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `e` (`e`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 db_row_hash_2 1 db_row_hash_2 A NULL NULL NULL YES BTREE
+t1 0 d 1 d A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+#add column with unique index on blob;
+alter table t1 add column a blob unique;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_5` int(11) DEFAULT NULL,
+ `a` blob DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `db_row_hash_2` (`db_row_hash_2`),
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `e` (`e`) USING HASH,
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 db_row_hash_2 1 db_row_hash_2 A NULL NULL NULL YES BTREE
+t1 0 d 1 d A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 a 1 a A NULL NULL NULL YES HASH
+#try to change the blob unique column name;
+#this will change index to b tree;
+alter table t1 modify column a int , modify column e int;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` text DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_5` int(11) DEFAULT NULL,
+ `a` int(11) DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `db_row_hash_2` (`db_row_hash_2`),
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `e` (`e`),
+ UNIQUE KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 db_row_hash_2 1 db_row_hash_2 A NULL NULL NULL YES BTREE
+t1 0 d 1 d A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES BTREE
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+alter table t1 add column clm1 blob unique,add column clm2 blob unique;
+#try changing the name;
+alter table t1 change column clm1 clm_changed1 blob, change column clm2 clm_changed2 blob;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` text DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_5` int(11) DEFAULT NULL,
+ `a` int(11) DEFAULT NULL,
+ `clm_changed1` blob DEFAULT NULL,
+ `clm_changed2` blob DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `db_row_hash_2` (`db_row_hash_2`),
+ UNIQUE KEY `e` (`e`),
+ UNIQUE KEY `a` (`a`),
+ UNIQUE KEY `d` (`d`) USING HASH,
+ UNIQUE KEY `clm1` (`clm_changed1`) USING HASH,
+ UNIQUE KEY `clm2` (`clm_changed2`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 db_row_hash_2 1 db_row_hash_2 A NULL NULL NULL YES BTREE
+t1 0 e 1 e A NULL NULL NULL YES BTREE
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 0 d 1 d A NULL NULL NULL YES HASH
+t1 0 clm1 1 clm_changed1 A NULL NULL NULL YES HASH
+t1 0 clm2 1 clm_changed2 A NULL NULL NULL YES HASH
+#now drop the unique key;
+alter table t1 drop key clm1, drop key clm2;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` text DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ `db_row_hash_5` int(11) DEFAULT NULL,
+ `a` int(11) DEFAULT NULL,
+ `clm_changed1` blob DEFAULT NULL,
+ `clm_changed2` blob DEFAULT NULL,
+ UNIQUE KEY `db_row_hash_1` (`db_row_hash_1`),
+ UNIQUE KEY `db_row_hash_2` (`db_row_hash_2`),
+ UNIQUE KEY `e` (`e`),
+ UNIQUE KEY `a` (`a`),
+ UNIQUE KEY `d` (`d`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 db_row_hash_1 1 db_row_hash_1 A NULL NULL NULL YES BTREE
+t1 0 db_row_hash_2 1 db_row_hash_2 A NULL NULL NULL YES BTREE
+t1 0 e 1 e A NULL NULL NULL YES BTREE
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 0 d 1 d A NULL NULL NULL YES HASH
+drop table t1;
+#now the table with key on multiple columns; the ultimate test;
+create table t1(a blob, b int , c varchar(2000) , d text , e varchar(3000) , f longblob , g int , h text ,
+unique(a,b,c), unique(c,d,e),unique(e,f,g,h), unique(b,d,g,h));
+insert into t1 values(1,1,1,1,1,1,1,1),(2,2,2,2,2,2,2,2),(3,3,3,3,3,3,3,3),(4,4,4,4,4,4,4,4),(5,5,5,5,5,5,5,5),
+('maria',6,'maria','maria','maria','maria',6,'maria'),('mariadb',7,'mariadb','mariadb','mariadb','mariadb',8,'mariadb')
+,(null,null,null,null,null,null,null,null),(null,null,null,null,null,null,null,null);
+#table structure;
+desc t1;
+Field Type Null Key Default Extra
+a blob YES MUL NULL
+b int(11) YES MUL NULL
+c varchar(2000) YES MUL NULL
+d text YES NULL
+e varchar(3000) YES MUL NULL
+f longblob YES NULL
+g int(11) YES NULL
+h text YES NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(2000) DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`) USING HASH,
+ UNIQUE KEY `c` (`c`,`d`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 c 2 d A NULL NULL NULL YES HASH
+t1 0 c 3 e A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 f A NULL NULL NULL YES HASH
+t1 0 e 3 g A NULL NULL NULL YES HASH
+t1 0 e 4 h A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+
+MyISAM file: DATADIR/test/t1
+Record format: Packed
+Character set: latin1_swedish_ci (8)
+Data records: 9 Deleted blocks: 0
+Recordlength: 5059
+
+table description:
+Key Start Len Index Type
+1 5057 8 multip. ulonglong NULL
+2 5065 8 multip. ulonglong NULL
+3 5073 8 multip. ulonglong NULL
+4 5081 8 multip. ulonglong NULL
+select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION,COLUMN_DEFAULT,IS_NULLABLE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,DATETIME_PRECISION,CHARACTER_SET_NAME,COLLATION_NAME,COLUMN_TYPE,COLUMN_KEY,EXTRA,COLUMN_COMMENT,IS_GENERATED,GENERATION_EXPRESSION from information_schema.columns where table_schema = 'test' and table_name = 't1';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
+def test t1 a 1 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob MUL NEVER NULL
+def test t1 b 2 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) MUL NEVER NULL
+def test t1 c 3 NULL YES varchar 2000 2000 NULL NULL NULL latin1 latin1_swedish_ci varchar(2000) MUL NEVER NULL
+def test t1 d 4 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text NEVER NULL
+def test t1 e 5 NULL YES varchar 3000 3000 NULL NULL NULL latin1 latin1_swedish_ci varchar(3000) MUL NEVER NULL
+def test t1 f 6 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
+def test t1 g 7 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
+def test t1 h 8 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text NEVER NULL
+select * from information_schema.statistics where table_schema = 'test' and table_name = 't1';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
+def test t1 0 test a 1 a A NULL NULL NULL YES HASH
+def test t1 0 test a 2 b A NULL NULL NULL YES HASH
+def test t1 0 test a 3 c A NULL NULL NULL YES HASH
+def test t1 0 test c 1 c A NULL NULL NULL YES HASH
+def test t1 0 test c 2 d A NULL NULL NULL YES HASH
+def test t1 0 test c 3 e A NULL NULL NULL YES HASH
+def test t1 0 test e 1 e A NULL NULL NULL YES HASH
+def test t1 0 test e 2 f A NULL NULL NULL YES HASH
+def test t1 0 test e 3 g A NULL NULL NULL YES HASH
+def test t1 0 test e 4 h A NULL NULL NULL YES HASH
+def test t1 0 test b 1 b A NULL NULL NULL YES HASH
+def test t1 0 test b 2 d A NULL NULL NULL YES HASH
+def test t1 0 test b 3 g A NULL NULL NULL YES HASH
+def test t1 0 test b 4 h A NULL NULL NULL YES HASH
+select * from information_schema.key_column_usage where table_schema= 'test' and table_name= 't1';
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
+def test a def test t1 a 1 NULL NULL NULL NULL
+def test a def test t1 b 2 NULL NULL NULL NULL
+def test a def test t1 c 3 NULL NULL NULL NULL
+def test c def test t1 c 1 NULL NULL NULL NULL
+def test c def test t1 d 2 NULL NULL NULL NULL
+def test c def test t1 e 3 NULL NULL NULL NULL
+def test e def test t1 e 1 NULL NULL NULL NULL
+def test e def test t1 f 2 NULL NULL NULL NULL
+def test e def test t1 g 3 NULL NULL NULL NULL
+def test e def test t1 h 4 NULL NULL NULL NULL
+def test b def test t1 b 1 NULL NULL NULL NULL
+def test b def test t1 d 2 NULL NULL NULL NULL
+def test b def test t1 g 3 NULL NULL NULL NULL
+def test b def test t1 h 4 NULL NULL NULL NULL
+# table select we should not be able to see db_row_hash_1 column;
+select * from t1 order by a;
+a b c d e f g h
+NULL NULL NULL NULL NULL NULL NULL NULL
+NULL NULL NULL NULL NULL NULL NULL NULL
+1 1 1 1 1 1 1 1
+2 2 2 2 2 2 2 2
+3 3 3 3 3 3 3 3
+4 4 4 4 4 4 4 4
+5 5 5 5 5 5 5 5
+maria 6 maria maria maria maria 6 maria
+mariadb 7 mariadb mariadb mariadb mariadb 8 mariadb
+select db_row_hash_1 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list'
+select db_row_hash_2 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_2' in 'field list'
+select db_row_hash_3 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_3' in 'field list'
+#duplicate entry test;
+#duplicate keys entry;
+insert into t1 values(1,1,1,0,0,0,0,0);
+ERROR 23000: Duplicate entry '1-1-1' for key 'a'
+insert into t1 values(0,0,1,1,1,0,0,0);
+ERROR 23000: Duplicate entry '1-1-1' for key 'c'
+insert into t1 values(0,0,0,0,1,1,1,1);
+ERROR 23000: Duplicate entry '1-1-1-1' for key 'e'
+insert into t1 values(1,1,1,1,1,0,0,0);
+ERROR 23000: Duplicate entry '1-1-1' for key 'a'
+insert into t1 values(0,0,0,0,1,1,1,1);
+ERROR 23000: Duplicate entry '1-1-1-1' for key 'e'
+insert into t1 values(1,1,1,1,1,1,1,1);
+ERROR 23000: Duplicate entry '1-1-1' for key 'a'
+select db_row_hash_1,db_row_hash_2,db_row_hash_3,db_row_hash_4,db_row_hash_5 from t1;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 'field list'
+alter table t1 drop column db_row_hash_1, drop column db_row_hash_2, drop column db_row_hash_3;
+ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists
+alter table t1 add column dg int , add column ef int , drop column db_row_hash_1;
+ERROR 42000: Can't DROP COLUMN `db_row_hash_1`; check that it exists
+alter table t1 modify column db_row_hash_1 int , modify column db_row_hash_2 int, modify column db_row_hash_3 int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 add column ar int , add column rb int, modify column db_row_hash_1 int , modify column db_row_hash_3 int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 change column db_row_hash_1 dsds int , change column db_row_hash_2 dfdf int , change column db_row_hash_3 gdfg int ;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+alter table t1 add column asd int, drop column a, change column db_row_hash_1 dsds int, change db_row_hash_3 fdfdfd int;
+ERROR 42S22: Unknown column 'db_row_hash_1' in 't1'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(2000) DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`) USING HASH,
+ UNIQUE KEY `c` (`c`,`d`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# add column named db_row_hash_*;
+alter table t1 add column db_row_hash_7 int , add column db_row_hash_5 int,
+add column db_row_hash_1 int, add column db_row_hash_2 int;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(2000) DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ `db_row_hash_7` int(11) DEFAULT NULL,
+ `db_row_hash_5` int(11) DEFAULT NULL,
+ `db_row_hash_1` int(11) DEFAULT NULL,
+ `db_row_hash_2` int(11) DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`) USING HASH,
+ UNIQUE KEY `c` (`c`,`d`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 c 2 d A NULL NULL NULL YES HASH
+t1 0 c 3 e A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 f A NULL NULL NULL YES HASH
+t1 0 e 3 g A NULL NULL NULL YES HASH
+t1 0 e 4 h A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+alter table t1 drop column db_row_hash_7 , drop column db_row_hash_5 ,
+drop column db_row_hash_1, drop column db_row_hash_2 ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` varchar(2000) DEFAULT NULL,
+ `d` text DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`) USING HASH,
+ UNIQUE KEY `c` (`c`,`d`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 c 2 d A NULL NULL NULL YES HASH
+t1 0 c 3 e A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 f A NULL NULL NULL YES HASH
+t1 0 e 3 g A NULL NULL NULL YES HASH
+t1 0 e 4 h A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+#try to change column names;
+alter table t1 change column a aa blob , change column b bb blob , change column d dd blob;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `aa` blob DEFAULT NULL,
+ `bb` blob DEFAULT NULL,
+ `c` varchar(2000) DEFAULT NULL,
+ `dd` blob DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`aa`,`bb`,`c`) USING HASH,
+ UNIQUE KEY `c` (`c`,`dd`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`bb`,`dd`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 aa A NULL NULL NULL YES HASH
+t1 0 a 2 bb A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 c 2 dd A NULL NULL NULL YES HASH
+t1 0 c 3 e A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 f A NULL NULL NULL YES HASH
+t1 0 e 3 g A NULL NULL NULL YES HASH
+t1 0 e 4 h A NULL NULL NULL YES HASH
+t1 0 b 1 bb A NULL NULL NULL YES HASH
+t1 0 b 2 dd A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+alter table t1 change column aa a blob , change column bb b blob , change column dd d blob;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` varchar(2000) DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`) USING HASH,
+ UNIQUE KEY `c` (`c`,`d`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 c 2 d A NULL NULL NULL YES HASH
+t1 0 c 3 e A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 f A NULL NULL NULL YES HASH
+t1 0 e 3 g A NULL NULL NULL YES HASH
+t1 0 e 4 h A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+#now we will change the data type to int and varchar limit so that we no longer require hash_index;
+#on key a_b_c;
+alter table t1 modify column a varchar(20) , modify column b varchar(20) , modify column c varchar(20);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(20) DEFAULT NULL,
+ `b` varchar(20) DEFAULT NULL,
+ `c` varchar(20) DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`),
+ UNIQUE KEY `c` (`c`,`d`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 0 a 2 b A NULL NULL NULL YES BTREE
+t1 0 a 3 c A NULL NULL NULL YES BTREE
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 c 2 d A NULL NULL NULL YES HASH
+t1 0 c 3 e A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 f A NULL NULL NULL YES HASH
+t1 0 e 3 g A NULL NULL NULL YES HASH
+t1 0 e 4 h A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+#change it back;
+alter table t1 modify column a blob , modify column b blob , modify column c blob;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`) USING HASH,
+ UNIQUE KEY `c` (`c`,`d`,`e`) USING HASH,
+ UNIQUE KEY `e` (`e`,`f`,`g`,`h`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+t1 0 c 2 d A NULL NULL NULL YES HASH
+t1 0 c 3 e A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 f A NULL NULL NULL YES HASH
+t1 0 e 3 g A NULL NULL NULL YES HASH
+t1 0 e 4 h A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+#try to delete blob column in unique;
+truncate table t1;
+#now try to delete keys;
+alter table t1 drop key c, drop key e;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` varchar(3000) DEFAULT NULL,
+ `f` longblob DEFAULT NULL,
+ `g` int(11) DEFAULT NULL,
+ `h` text DEFAULT NULL,
+ UNIQUE KEY `a` (`a`,`b`,`c`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`,`g`,`h`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+t1 0 b 3 g A NULL NULL NULL YES HASH
+t1 0 b 4 h A NULL NULL NULL YES HASH
+drop table t1;
+#now alter table containing some data basically some tests with ignore;
+create table t1 (a blob);
+insert into t1 values(1),(2),(3);
+#normal alter table;
+alter table t1 add unique key(a);
+alter table t1 drop key a;
+truncate table t1;
+insert into t1 values(1),(1),(2),(2),(3);
+alter table t1 add unique key(a);
+ERROR 23000: Duplicate entry '1' for key 'a'
+alter ignore table t1 add unique key(a);
+select * from t1 order by a;
+a
+1
+2
+3
+insert into t1 values(1);
+ERROR 23000: Duplicate entry '1' for key 'a'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+drop table t1;
+#Now with multiple keys;
+create table t1(a blob , b blob, c blob , d blob , e int);
+insert into t1 values (1,1,1,1,1);
+insert into t1 values (1,1,1,1,1);
+insert into t1 values (2,1,1,1,1);
+insert into t1 values (2,2,2,2,2);
+insert into t1 values (3,3,4,4,4);
+insert into t1 values (4,4,4,4,4);
+alter table t1 add unique key(a,c), add unique key(b,d), add unique key(e);
+ERROR 23000: Duplicate entry '1-1' for key 'a'
+alter ignore table t1 add unique key(a,c), add unique key(b,d), add unique key(e);
+select * from t1 order by a;
+a b c d e
+1 1 1 1 1
+2 2 2 2 2
+3 3 4 4 4
+insert into t1 values (1,12,1,13,14);
+ERROR 23000: Duplicate entry '1-1' for key 'a'
+insert into t1 values (12,1,14,1,14);
+ERROR 23000: Duplicate entry '1-1' for key 'b'
+insert into t1 values (13,12,13,14,4);
+ERROR 23000: Duplicate entry '4' for key 'e'
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` int(11) DEFAULT NULL,
+ UNIQUE KEY `e` (`e`),
+ UNIQUE KEY `a` (`a`,`c`) USING HASH,
+ UNIQUE KEY `b` (`b`,`d`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 e 1 e A NULL NULL NULL YES BTREE
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 c A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 d A NULL NULL NULL YES HASH
+drop table t1;
+#visibility of db_row_hash
+create table t1 (a blob unique , b blob unique);
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+b blob YES UNI NULL
+insert into t1 values(1,19);
+insert into t1 values(2,29);
+insert into t1 values(3,39);
+insert into t1 values(4,49);
+create table t2 (DB_ROW_HASH_1 int, DB_ROW_HASH_2 int);
+insert into t2 values(11,1);
+insert into t2 values(22,2);
+insert into t2 values(33,3);
+insert into t2 values(44,4);
+select * from t1 order by a;
+a b
+1 19
+2 29
+3 39
+4 49
+select * from t2 order by DB_ROW_HASH_1;
+DB_ROW_HASH_1 DB_ROW_HASH_2
+11 1
+22 2
+33 3
+44 4
+select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1;
+ERROR 42S22: Unknown column 'DB_ROW_HASH_1' in 'field list'
+#bug
+select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1,t2;
+DB_ROW_HASH_1 DB_ROW_HASH_2
+11 1
+11 1
+11 1
+11 1
+22 2
+22 2
+22 2
+22 2
+33 3
+33 3
+33 3
+33 3
+44 4
+44 4
+44 4
+44 4
+select * from t1 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t2);
+ERROR 42S22: Unknown column 'DB_ROW_HASH_1' in 'IN/ALL/ANY subquery'
+select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1,t2 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t2);
+DB_ROW_HASH_1 DB_ROW_HASH_2
+11 1
+22 2
+33 3
+44 4
+11 1
+22 2
+33 3
+44 4
+11 1
+22 2
+33 3
+44 4
+11 1
+22 2
+33 3
+44 4
+select * from t2 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t1);
+DB_ROW_HASH_1 DB_ROW_HASH_2
+11 1
+22 2
+33 3
+44 4
+select DB_ROW_HASH_1 from t1,t2 where t1.DB_ROW_HASH_1 = t2.DB_ROW_HASH_2;
+ERROR 42S22: Unknown column 't1.DB_ROW_HASH_1' in 'where clause'
+select DB_ROW_HASH_1 from t1 inner join t2 on t1.a = t2.DB_ROW_HASH_2;
+DB_ROW_HASH_1
+11
+22
+33
+44
+drop table t1,t2;
+#long key unique with different key length
+create table t1(a blob, unique(a(3000)));
+desc t1;
+Field Type Null Key Default Extra
+a blob YES UNI NULL
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL 3000 NULL YES HASH
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ UNIQUE KEY `a` (`a`(3000)) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 value(concat(repeat('s',3000),'1'));
+insert into t1 value(concat(repeat('s',3000),'2'));
+ERROR 23000: Duplicate entry 'sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...' for key 'a'
+insert into t1 value(concat(repeat('a',3000),'2'));
+drop table t1;
+create table t1(a varchar(4000), b longblob , c varchar(5000), d longblob,
+unique(a(3500), b), unique(c(4500), d));
+desc t1;
+Field Type Null Key Default Extra
+a varchar(4000) YES MUL NULL
+b longblob YES NULL
+c varchar(5000) YES MUL NULL
+d longblob YES NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(4000) DEFAULT NULL,
+ `b` longblob DEFAULT NULL,
+ `c` varchar(5000) DEFAULT NULL,
+ `d` longblob DEFAULT NULL,
+ UNIQUE KEY `a` (`a`(3500),`b`) USING HASH,
+ UNIQUE KEY `c` (`c`(4500),`d`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL 3500 NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL 4500 NULL YES HASH
+t1 0 c 2 d A NULL NULL NULL YES HASH
+drop table t1;
+#ext bug
+create table t1(a int primary key, b blob unique, c int, d blob , index(c));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` blob DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ UNIQUE KEY `b` (`b`) USING HASH,
+ KEY `c` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values(1,23,1,33);
+insert into t1 values(2,23,1,33);
+ERROR 23000: Duplicate entry '23' for key 'b'
+drop table t1;
+create table t2 (a blob unique , c int , index(c));
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` blob DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH,
+ KEY `c` (`c`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t2 values(1,1);
+insert into t2 values(2,1);
+drop table t2;
+#not null test
+create table t1(a blob unique not null);
+desc t1;
+Field Type Null Key Default Extra
+a blob NO UNI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob NOT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values(1);
+insert into t1 values(3);
+insert into t1 values(1);
+ERROR 23000: Duplicate entry '1' for key 'a'
+drop table t1;
+create table t1(a int primary key, b blob unique , c blob unique not null);
+insert into t1 values(1,1,1);
+insert into t1 values(2,1,2);
+ERROR 23000: Duplicate entry '1' for key 'b'
+insert into t1 values(3,3,1);
+ERROR 23000: Duplicate entry '1' for key 'c'
+drop table t1;
+create table t1 (a blob unique not null, b blob not null, c blob not null, unique(b,c));
+desc t1;
+Field Type Null Key Default Extra
+a blob NO UNI NULL
+b blob NO MUL NULL
+c blob NO NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob NOT NULL,
+ `b` blob NOT NULL,
+ `c` blob NOT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH,
+ UNIQUE KEY `b` (`b`,`c`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values (1, 2, 3);
+insert into t1 values (2, 1, 3);
+insert into t1 values (2, 1, 3);
+ERROR 23000: Duplicate entry '2' for key 'a'
+drop table t1;
+#partition
+create table t1(a blob unique) partition by hash(a);
+ERROR HY000: A BLOB field is not allowed in partition function
+#key length > 2^16 -1
+create table t1(a blob, unique(a(65536)));
+ERROR 42000: Specified key part was too long; max key part length is 65535 bytes
+create table t1(a blob, unique(a(65535)));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ UNIQUE KEY `a` (`a`(65535)) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+#64 indexes
+create table t1 ( a63 blob unique, a62 blob unique, a61 blob unique, a60 blob unique, a59 blob unique, a58 blob unique, a57 blob unique, a56 blob unique, a55 blob unique, a54 blob unique, a53 blob unique, a52 blob unique, a51 blob unique, a50 blob unique, a49 blob unique, a48 blob unique, a47 blob unique, a46 blob unique, a45 blob unique, a44 blob unique, a43 blob unique, a42 blob unique, a41 blob unique, a40 blob unique, a39 blob unique, a38 blob unique, a37 blob unique, a36 blob unique, a35 blob unique, a34 blob unique, a33 blob unique, a32 blob unique, a31 blob unique, a30 blob unique, a29 blob unique, a28 blob unique, a27 blob unique, a26 blob unique, a25 blob unique, a24 blob unique, a23 blob unique, a22 blob unique, a21 blob unique, a20 blob unique, a19 blob unique, a18 blob unique, a17 blob unique, a16 blob unique, a15 blob unique, a14 blob unique, a13 blob unique, a12 blob unique, a11 blob unique, a10 blob unique, a9 blob unique, a8 blob unique, a7 blob unique, a6 blob unique, a5 blob unique, a4 blob unique, a3 blob unique, a2 blob unique, a1 blob unique, a blob unique);;
+insert into t1 values( 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);;
+insert into t1 values( 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);;
+ERROR 23000: Duplicate entry '63' for key 'a63'
+insert into t1 values( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63);;
+insert into t1 values( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63);;
+ERROR 23000: Duplicate entry '0' for key 'a63'
+drop table t1;
+create table t1(a blob , key(a));
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ KEY `a` (`a`(1000))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1(a blob);
+alter table t1 add index(a);
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ KEY `a` (`a`(1000))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1(a text, key(a));
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` text DEFAULT NULL,
+ KEY `a` (`a`(1000))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1(a varchar(4000));
+alter table t1 add index(a);
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(4000) DEFAULT NULL,
+ KEY `a` (`a`(1000))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (pk int, a int, b int, primary key(pk), key(pk,a));
+alter table t1 modify a text;
+ERROR 42000: Specified key was too long; max key length is 1000 bytes
+alter table t1 modify a varchar(1000);
+ERROR 42000: Specified key was too long; max key length is 1000 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ PRIMARY KEY (`pk`),
+ KEY `pk` (`pk`,`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+#
+# MDEV-19705: Assertion `tmp >= 0' failed in best_access_path
+#
+CREATE TABLE t1 (d varchar(10)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('a'),('q');
+CREATE TABLE t2 (f varchar(10), a2 datetime, b int, a1 varchar(1024), pk int NOT NULL, PRIMARY KEY (pk), UNIQUE KEY (f,a1,a2), KEY f2 (f(4),a2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('aaa','1985-09-06',-163,'s',1),('bbb','1995-01-05',3,'pucaz',2),('ccc','0000-00-00',NULL,'help',3),('ddd',NULL,618,'v',4),('eee','1995-12-20',410,'m',5),('ffq','1976-06-12 20:02:56',NULL,'POKNC',6),('dddd','0000-00-00',-328,'hgsu',7);
+explain
+SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range PRIMARY,f,f2 PRIMARY 4 NULL 1 Using index condition
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
+b
+drop table t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/long_unique.test b/mysql-test/main/long_unique.test
new file mode 100644
index 00000000000..f1a08b3dc29
--- /dev/null
+++ b/mysql-test/main/long_unique.test
@@ -0,0 +1,535 @@
+let datadir=`select @@datadir`;
+--source include/have_partition.inc
+
+#
+# MDEV-371 Unique indexes for blobs
+#
+
+--echo #Structure of tests
+--echo #First we will check all option for
+--echo #table containing single unique column
+--echo #table containing keys like unique(a,b,c,d) etc
+--echo #then table containing 2 blob unique etc
+
+--echo #table with single long blob column;
+create table t1(a blob unique );
+insert into t1 values(1),(2),(3),(56),('sachin'),('maria'),(123456789034567891),(null),(null),(123456789034567890);
+--echo #blob with primary key not allowed
+--error ER_TOO_LONG_KEY
+create table t2(a blob,primary key(a(10000)));
+--error ER_TOO_LONG_KEY
+create table t3(a varchar(10000) primary key);
+
+--error ER_DUP_ENTRY
+insert into t1 values(2);
+--echo #table structure;
+desc t1;
+show create table t1;
+query_vertical show keys from t1;
+replace_result $datadir DATADIR;
+exec $MYISAMCHK -d $datadir/test/t1;
+select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION,COLUMN_DEFAULT,IS_NULLABLE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,DATETIME_PRECISION,CHARACTER_SET_NAME,COLLATION_NAME,COLUMN_TYPE,COLUMN_KEY,EXTRA,COLUMN_COMMENT,IS_GENERATED,GENERATION_EXPRESSION from information_schema.columns where table_schema = 'test' and table_name = 't1';
+select * from information_schema.statistics where table_schema = 'test' and table_name = 't1';
+query_vertical select * from information_schema.key_column_usage where table_schema= 'test' and table_name= 't1';
+--echo # table select we should not be able to see db_row_hash_column;
+select * from t1 order by a;
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_1 from t1;
+--echo #duplicate entry test;
+--error ER_DUP_ENTRY
+insert into t1 values(2);
+--error ER_DUP_ENTRY
+insert into t1 values('sachin');
+--error ER_DUP_ENTRY
+insert into t1 values(123456789034567891);
+select * from t1 order by a;
+insert into t1 values(11),(22),(33);
+--error ER_DUP_ENTRY
+insert into t1 values(12),(22);
+select * from t1 order by a;
+insert into t1 values(repeat('s',4000*10)),(repeat('s',4001*10));
+--error ER_DUP_ENTRY
+insert into t1 values(repeat('m',4000*10)),(repeat('m',4000*10));
+insert into t1 values(repeat('m',4001)),(repeat('m',4002));
+truncate table t1;
+insert into t1 values(1),(2),(3),(4),(5),(8),(7);
+replace_result $datadir DATADIR;
+exec $MYISAMCHK -d $datadir/test/t1;
+--echo #now some alter commands;
+alter table t1 add column b int;
+desc t1;
+show create table t1;
+--error ER_DUP_ENTRY
+insert into t1 values(1,2);
+--error ER_DUP_ENTRY
+insert into t1 values(2,2);
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_1 from t1;
+--echo #now try to change db_row_hash_1 column;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t1 drop column db_row_hash_1;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t1 add column d int , add column e int , drop column db_row_hash_1;
+--error ER_BAD_FIELD_ERROR
+alter table t1 modify column db_row_hash_1 int ;
+--error ER_BAD_FIELD_ERROR
+alter table t1 add column a int , add column b int, modify column db_row_hash_1 int ;
+--error ER_BAD_FIELD_ERROR
+alter table t1 change column db_row_hash_1 dsds int;
+--error ER_BAD_FIELD_ERROR
+alter table t1 add column asd int, change column db_row_hash_1 dsds int;
+alter table t1 drop column b , add column c int;
+show create table t1;
+
+--echo #now add some column with name db_row_hash;
+alter table t1 add column db_row_hash_1 int unique;
+show create table t1;
+--error ER_DUP_ENTRY
+insert into t1 values(45,1,55),(46,1,55);
+--error ER_DUP_ENTRY
+insert into t1 values(45,1,55),(45,1,55);
+alter table t1 add column db_row_hash_2 int, add column db_row_hash_3 int;
+desc t1;
+--echo #this should also drop the unique index ;
+alter table t1 drop column a;
+show create table t1;
+show keys from t1;
+--echo #add column with unique index on blob ;
+alter table t1 add column a blob unique;
+show create table t1;
+--echo # try to change the blob unique name;
+alter table t1 change column a aa blob ;
+show create table t1;
+show keys from t1;
+--echo # try to change the blob unique datatype;
+--echo #this will change index to b tree;
+alter table t1 modify column aa int ;
+show create table t1;
+show keys from t1;
+alter table t1 add column clm blob unique;
+--echo #try changing the name ;
+alter table t1 change column clm clm_changed blob;
+show create table t1;
+show keys from t1;
+--echo #now drop the unique key;
+alter table t1 drop key clm;
+show create table t1;
+show keys from t1;
+drop table t1;
+
+create table t1 (a TEXT CHARSET latin1 COLLATE latin1_german2_ci unique);
+desc t1;
+show keys from t1;
+ insert into t1 values ('ae');
+--error ER_DUP_ENTRY
+insert into t1 values ('AE');
+insert into t1 values ('Ä');
+drop table t1;
+create table t1 (a int primary key, b blob unique);
+desc t1;
+show keys from t1;
+insert into t1 values(1,1),(2,2),(3,3);
+--error ER_DUP_ENTRY
+insert into t1 values(1,1);
+--error ER_DUP_ENTRY
+insert into t1 values(7,1);
+drop table t1;
+
+--echo #table with multiple long blob column and varchar text column ;
+create table t1(a blob unique, b int , c blob unique , d text unique , e varchar(3000) unique);
+insert into t1 values(1,2,3,4,5),(2,11,22,33,44),(3111,222,333,444,555),(5611,2222,3333,4444,5555),
+('sachin',341,'fdf','gfgfgfg','hghgr'),('maria',345,'frter','dasd','utyuty'),
+(123456789034567891,353534,53453453453456,64565464564564,45435345345345),
+(123456789034567890,43545,657567567567,78967657567567,657567567567567676);
+
+--echo #table structure;
+desc t1;
+show create table t1;
+show keys from t1;
+replace_result $datadir DATADIR;
+exec $MYISAMCHK -d $datadir/test/t1;
+select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION,COLUMN_DEFAULT,IS_NULLABLE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,DATETIME_PRECISION,CHARACTER_SET_NAME,COLLATION_NAME,COLUMN_TYPE,COLUMN_KEY,EXTRA,COLUMN_COMMENT,IS_GENERATED,GENERATION_EXPRESSION from information_schema.columns where table_schema = 'test' and table_name = 't1';
+select * from information_schema.statistics where table_schema = 'test' and table_name = 't1';
+select * from information_schema.key_column_usage where table_schema= 'test' and table_name= 't1';
+--echo #table select we should not be able to see db_row_hash_1 column;
+select * from t1 order by a;
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_1 from t1;
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_2 from t1;
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_3 from t1;
+--echo #duplicate entry test;
+--error ER_DUP_ENTRY
+insert into t1 values(21,2,3,42,51);
+--error ER_DUP_ENTRY
+insert into t1 values('sachin',null,null,null,null);
+--error ER_DUP_ENTRY
+insert into t1 values(1234567890345671890,4353451,6575675675617,789676575675617,657567567567567676);
+select * from t1 order by a;
+insert into t1 values(repeat('s',4000*10),100,repeat('s',4000*10),repeat('s',4000*10),
+repeat('s',400)),(repeat('s',4001*10),1000,repeat('s',4001*10),repeat('s',4001*10),
+repeat('s',2995));
+--error ER_DUP_ENTRY
+insert into t1 values(repeat('m',4000*11),10,repeat('s',4000*11),repeat('s',4000*11),repeat('s',2995));
+truncate table t1;
+insert into t1 values(1,2,3,4,5),(2,11,22,33,44),(3111,222,333,444,555),(5611,2222,3333,4444,5555);
+--echo #now some alter commands;
+alter table t1 add column f int;
+desc t1;
+show create table t1;
+--echo #unique key should not break;
+--error ER_DUP_ENTRY
+insert into t1 values(1,2,3,4,5,6);
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_1 , db_row_hash_2, db_row_hash_3 from t1;
+--echo #now try to change db_row_hash_1 column;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t1 drop column db_row_hash_1, drop column db_row_hash_2, drop column db_row_hash_3;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t1 add column dg int , add column ef int , drop column db_row_hash_1;
+--error ER_BAD_FIELD_ERROR
+alter table t1 modify column db_row_hash_1 int , modify column db_row_hash_2 int, modify column db_row_hash_3 int;
+--error ER_BAD_FIELD_ERROR
+alter table t1 add column ar int , add column rb int, modify column db_row_hash_1 int , modify column db_row_hash_3 int;
+--error ER_BAD_FIELD_ERROR
+alter table t1 change column db_row_hash_1 dsds int , change column db_row_hash_2 dfdf int , change column db_row_hash_3 gdfg int ;
+--error ER_BAD_FIELD_ERROR
+alter table t1 add column asd int, drop column a, change column db_row_hash_1 dsds int, change db_row_hash_3 fdfdfd int;
+alter table t1 drop column b , add column g int;
+show create table t1;
+
+--echo #now add some column with name db_row_hash;
+alter table t1 add column db_row_hash_1 int unique;
+alter table t1 add column db_row_hash_2 int unique;
+alter table t1 add column db_row_hash_3 int unique;
+show create table t1;
+
+alter table t1 add column db_row_hash_7 int, add column db_row_hash_5 int , add column db_row_hash_4 int ;
+alter table t1 drop column db_row_hash_7,drop column db_row_hash_3, drop column db_row_hash_4;
+desc t1;
+--echo #this should not break anything;
+--error ER_DUP_ENTRY
+insert into t1 values(1,2,3,4,5,6,23,5,6);
+--echo #this should also drop the unique index;
+alter table t1 drop column a, drop column c;
+show create table t1;
+show keys from t1;
+--echo #add column with unique index on blob;
+alter table t1 add column a blob unique;
+show create table t1;
+show keys from t1;
+--echo #try to change the blob unique column name;
+--echo #this will change index to b tree;
+alter table t1 modify column a int , modify column e int;
+show create table t1;
+show keys from t1;
+alter table t1 add column clm1 blob unique,add column clm2 blob unique;
+--echo #try changing the name;
+alter table t1 change column clm1 clm_changed1 blob, change column clm2 clm_changed2 blob;
+show create table t1;
+show keys from t1;
+--echo #now drop the unique key;
+alter table t1 drop key clm1, drop key clm2;
+show create table t1;
+show keys from t1;
+drop table t1;
+--echo #now the table with key on multiple columns; the ultimate test;
+create table t1(a blob, b int , c varchar(2000) , d text , e varchar(3000) , f longblob , g int , h text ,
+ unique(a,b,c), unique(c,d,e),unique(e,f,g,h), unique(b,d,g,h));
+
+insert into t1 values(1,1,1,1,1,1,1,1),(2,2,2,2,2,2,2,2),(3,3,3,3,3,3,3,3),(4,4,4,4,4,4,4,4),(5,5,5,5,5,5,5,5),
+('maria',6,'maria','maria','maria','maria',6,'maria'),('mariadb',7,'mariadb','mariadb','mariadb','mariadb',8,'mariadb')
+,(null,null,null,null,null,null,null,null),(null,null,null,null,null,null,null,null);
+
+--echo #table structure;
+desc t1;
+show create table t1;
+show keys from t1;
+replace_result $datadir DATADIR;
+exec $MYISAMCHK -d $datadir/test/t1;
+select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION,COLUMN_DEFAULT,IS_NULLABLE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,DATETIME_PRECISION,CHARACTER_SET_NAME,COLLATION_NAME,COLUMN_TYPE,COLUMN_KEY,EXTRA,COLUMN_COMMENT,IS_GENERATED,GENERATION_EXPRESSION from information_schema.columns where table_schema = 'test' and table_name = 't1';
+select * from information_schema.statistics where table_schema = 'test' and table_name = 't1';
+select * from information_schema.key_column_usage where table_schema= 'test' and table_name= 't1';
+--echo # table select we should not be able to see db_row_hash_1 column;
+select * from t1 order by a;
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_1 from t1;
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_2 from t1;
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_3 from t1;
+--echo #duplicate entry test;
+--echo #duplicate keys entry;
+--error ER_DUP_ENTRY
+insert into t1 values(1,1,1,0,0,0,0,0);
+--error ER_DUP_ENTRY
+insert into t1 values(0,0,1,1,1,0,0,0);
+--error ER_DUP_ENTRY
+insert into t1 values(0,0,0,0,1,1,1,1);
+--error ER_DUP_ENTRY
+insert into t1 values(1,1,1,1,1,0,0,0);
+--error ER_DUP_ENTRY
+insert into t1 values(0,0,0,0,1,1,1,1);
+--error ER_DUP_ENTRY
+insert into t1 values(1,1,1,1,1,1,1,1);
+--error ER_BAD_FIELD_ERROR
+select db_row_hash_1,db_row_hash_2,db_row_hash_3,db_row_hash_4,db_row_hash_5 from t1;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t1 drop column db_row_hash_1, drop column db_row_hash_2, drop column db_row_hash_3;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t1 add column dg int , add column ef int , drop column db_row_hash_1;
+--error ER_BAD_FIELD_ERROR
+alter table t1 modify column db_row_hash_1 int , modify column db_row_hash_2 int, modify column db_row_hash_3 int;
+--error ER_BAD_FIELD_ERROR
+alter table t1 add column ar int , add column rb int, modify column db_row_hash_1 int , modify column db_row_hash_3 int;
+--error ER_BAD_FIELD_ERROR
+alter table t1 change column db_row_hash_1 dsds int , change column db_row_hash_2 dfdf int , change column db_row_hash_3 gdfg int ;
+--error ER_BAD_FIELD_ERROR
+alter table t1 add column asd int, drop column a, change column db_row_hash_1 dsds int, change db_row_hash_3 fdfdfd int;
+
+show create table t1;
+--echo # add column named db_row_hash_*;
+alter table t1 add column db_row_hash_7 int , add column db_row_hash_5 int,
+ add column db_row_hash_1 int, add column db_row_hash_2 int;
+show create table t1;
+show keys from t1;
+alter table t1 drop column db_row_hash_7 , drop column db_row_hash_5 ,
+ drop column db_row_hash_1, drop column db_row_hash_2 ;
+show create table t1;
+show keys from t1;
+
+--echo #try to change column names;
+alter table t1 change column a aa blob , change column b bb blob , change column d dd blob;
+show create table t1;
+show keys from t1;
+alter table t1 change column aa a blob , change column bb b blob , change column dd d blob;
+show create table t1;
+show keys from t1;
+
+--echo #now we will change the data type to int and varchar limit so that we no longer require hash_index;
+--echo #on key a_b_c;
+alter table t1 modify column a varchar(20) , modify column b varchar(20) , modify column c varchar(20);
+show create table t1;
+show keys from t1;
+--echo #change it back;
+alter table t1 modify column a blob , modify column b blob , modify column c blob;
+show create table t1;
+show keys from t1;
+
+--echo #try to delete blob column in unique;
+truncate table t1;
+## this feature removed in 10.2
+#alter table t1 drop column a, drop column b, drop column c;
+#show create table t1;
+#show keys from t1;
+--echo #now try to delete keys;
+alter table t1 drop key c, drop key e;
+show create table t1;
+show keys from t1;
+drop table t1;
+
+--echo #now alter table containing some data basically some tests with ignore;
+create table t1 (a blob);
+insert into t1 values(1),(2),(3);
+--echo #normal alter table;
+alter table t1 add unique key(a);
+alter table t1 drop key a;
+truncate table t1;
+insert into t1 values(1),(1),(2),(2),(3);
+--error ER_DUP_ENTRY
+alter table t1 add unique key(a);
+alter ignore table t1 add unique key(a);
+select * from t1 order by a;
+--error ER_DUP_ENTRY
+insert into t1 values(1);
+show create table t1;
+show keys from t1;
+drop table t1;
+
+--echo #Now with multiple keys;
+create table t1(a blob , b blob, c blob , d blob , e int);
+insert into t1 values (1,1,1,1,1);
+insert into t1 values (1,1,1,1,1);
+insert into t1 values (2,1,1,1,1);
+insert into t1 values (2,2,2,2,2);
+insert into t1 values (3,3,4,4,4);
+insert into t1 values (4,4,4,4,4);
+--error ER_DUP_ENTRY
+alter table t1 add unique key(a,c), add unique key(b,d), add unique key(e);
+alter ignore table t1 add unique key(a,c), add unique key(b,d), add unique key(e);
+select * from t1 order by a;
+--error ER_DUP_ENTRY
+insert into t1 values (1,12,1,13,14);
+--error ER_DUP_ENTRY
+insert into t1 values (12,1,14,1,14);
+--error ER_DUP_ENTRY
+insert into t1 values (13,12,13,14,4);
+show create table t1;
+show keys from t1;
+drop table t1;
+
+--echo #visibility of db_row_hash
+create table t1 (a blob unique , b blob unique);
+desc t1;
+insert into t1 values(1,19);
+insert into t1 values(2,29);
+insert into t1 values(3,39);
+insert into t1 values(4,49);
+create table t2 (DB_ROW_HASH_1 int, DB_ROW_HASH_2 int);
+insert into t2 values(11,1);
+insert into t2 values(22,2);
+insert into t2 values(33,3);
+insert into t2 values(44,4);
+select * from t1 order by a;
+select * from t2 order by DB_ROW_HASH_1;
+--error ER_BAD_FIELD_ERROR
+select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1;
+--echo #bug
+select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1,t2;
+--error ER_BAD_FIELD_ERROR
+select * from t1 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t2);
+select DB_ROW_HASH_1, DB_ROW_HASH_2 from t1,t2 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t2);
+select * from t2 where DB_ROW_HASH_1 in (select DB_ROW_HASH_1 from t1);
+--error ER_BAD_FIELD_ERROR
+select DB_ROW_HASH_1 from t1,t2 where t1.DB_ROW_HASH_1 = t2.DB_ROW_HASH_2;
+select DB_ROW_HASH_1 from t1 inner join t2 on t1.a = t2.DB_ROW_HASH_2;
+drop table t1,t2;
+
+--echo #long key unique with different key length
+create table t1(a blob, unique(a(3000)));
+desc t1;
+show keys from t1;
+show create table t1;
+insert into t1 value(concat(repeat('s',3000),'1'));
+--error ER_DUP_ENTRY
+insert into t1 value(concat(repeat('s',3000),'2'));
+insert into t1 value(concat(repeat('a',3000),'2'));
+drop table t1;
+
+create table t1(a varchar(4000), b longblob , c varchar(5000), d longblob,
+unique(a(3500), b), unique(c(4500), d));
+desc t1;
+show create table t1;
+show keys from t1;
+drop table t1;
+
+--echo #ext bug
+create table t1(a int primary key, b blob unique, c int, d blob , index(c));
+show create table t1;
+insert into t1 values(1,23,1,33);
+--error ER_DUP_ENTRY
+insert into t1 values(2,23,1,33);
+drop table t1;
+create table t2 (a blob unique , c int , index(c));
+show create table t2;
+insert into t2 values(1,1);
+insert into t2 values(2,1);
+drop table t2;
+--echo #not null test
+create table t1(a blob unique not null);
+desc t1;
+show create table t1;
+insert into t1 values(1);
+insert into t1 values(3);
+--error ER_DUP_ENTRY
+insert into t1 values(1);
+drop table t1;
+create table t1(a int primary key, b blob unique , c blob unique not null);
+insert into t1 values(1,1,1);
+--error ER_DUP_ENTRY
+insert into t1 values(2,1,2);
+--error ER_DUP_ENTRY
+insert into t1 values(3,3,1);
+drop table t1;
+create table t1 (a blob unique not null, b blob not null, c blob not null, unique(b,c));
+desc t1;
+show create table t1;
+insert into t1 values (1, 2, 3);
+insert into t1 values (2, 1, 3);
+--error ER_DUP_ENTRY
+insert into t1 values (2, 1, 3);
+drop table t1;
+
+--echo #partition
+--error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
+create table t1(a blob unique) partition by hash(a);
+--echo #key length > 2^16 -1
+--error ER_TOO_LONG_KEYPART
+create table t1(a blob, unique(a(65536)));
+create table t1(a blob, unique(a(65535)));
+show create table t1;
+drop table t1;
+
+--echo #64 indexes
+--let $create_table=create table t1 (
+--let $insert_data_1=insert into t1 values(
+--let $insert_data_2=insert into t1 values(
+--let $count= 63
+--let $index= 0
+while ($count)
+{
+ --let $create_table=$create_table a$count blob unique,
+ --let $insert_data_1=$insert_data_1 $count,
+ --let $insert_data_2=$insert_data_2 $index,
+ --dec $count
+ --inc $index
+}
+--let $create_table=$create_table a blob unique);
+--let $insert_data_1=$insert_data_1 0);
+--let $insert_data_2=$insert_data_2 63);
+
+--eval $create_table
+--eval $insert_data_1
+--error ER_DUP_ENTRY
+--eval $insert_data_1
+--eval $insert_data_2
+--error ER_DUP_ENTRY
+--eval $insert_data_2
+drop table t1;
+
+#
+# non-unique long indexes are automatically shortened
+#
+create table t1(a blob , key(a));
+show create table t1;
+drop table t1;
+create table t1(a blob);
+alter table t1 add index(a);
+show create table t1;
+drop table t1;
+
+create table t1(a text, key(a));
+show create table t1;
+drop table t1;
+create table t1(a varchar(4000));
+alter table t1 add index(a);
+show create table t1;
+drop table t1;
+
+#
+# somewhat inconsistently, the following is an error
+#
+create table t1 (pk int, a int, b int, primary key(pk), key(pk,a));
+--error ER_TOO_LONG_KEY
+alter table t1 modify a text;
+--error ER_TOO_LONG_KEY
+alter table t1 modify a varchar(1000);
+show create table t1;
+drop table t1;
+
+--echo #
+--echo # MDEV-19705: Assertion `tmp >= 0' failed in best_access_path
+--echo #
+
+CREATE TABLE t1 (d varchar(10)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('a'),('q');
+
+CREATE TABLE t2 (f varchar(10), a2 datetime, b int, a1 varchar(1024), pk int NOT NULL, PRIMARY KEY (pk), UNIQUE KEY (f,a1,a2), KEY f2 (f(4),a2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('aaa','1985-09-06',-163,'s',1),('bbb','1995-01-05',3,'pucaz',2),('ccc','0000-00-00',NULL,'help',3),('ddd',NULL,618,'v',4),('eee','1995-12-20',410,'m',5),('ffq','1976-06-12 20:02:56',NULL,'POKNC',6),('dddd','0000-00-00',-328,'hgsu',7);
+explain
+SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
+SELECT t2.b FROM t1 JOIN t2 ON t1.d = t2.f WHERE t2.pk >= 20;
+drop table t1,t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/long_unique_big.result b/mysql-test/main/long_unique_big.result
new file mode 100644
index 00000000000..2ec84e510cb
--- /dev/null
+++ b/mysql-test/main/long_unique_big.result
@@ -0,0 +1,38 @@
+set @allowed_packet= @@max_allowed_packet;
+SET GLOBAL max_allowed_packet=67108864;
+connect con1, localhost, root,,;
+create table t1(a longblob unique, b longblob , c longblob , unique(b,c));
+desc t1;
+Field Type Null Key Default Extra
+a longblob YES UNI NULL
+b longblob YES MUL NULL
+c longblob YES NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` longblob DEFAULT NULL,
+ `b` longblob DEFAULT NULL,
+ `c` longblob DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH,
+ UNIQUE KEY `b` (`b`,`c`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 c A NULL NULL NULL YES HASH
+insert into t1 values(concat(repeat('sachin',10000000),'1'),concat(repeat('sachin',10000000),'1'),
+concat(repeat('sachin',10000000),'1'));
+insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
+concat(repeat('sachin',10000000),'1'));
+insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
+concat(repeat('sachin',10000000),'4'));
+ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'a'
+insert into t1 values(concat(repeat('sachin',10000000),'3'),concat(repeat('sachin',10000000),'1'),
+concat(repeat('sachin',10000000),'1'));
+ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'b'
+drop table t1;
+disconnect con1;
+connection default;
+set @@GLOBAL.max_allowed_packet= @allowed_packet;
+# End of 10.4 tests
diff --git a/mysql-test/main/long_unique_big.test b/mysql-test/main/long_unique_big.test
new file mode 100644
index 00000000000..c87b6e0b9eb
--- /dev/null
+++ b/mysql-test/main/long_unique_big.test
@@ -0,0 +1,26 @@
+# This test may run out of memory in some environments.
+--source include/big_test.inc
+
+set @allowed_packet= @@max_allowed_packet;
+SET GLOBAL max_allowed_packet=67108864;
+
+connect (con1, localhost, root,,);
+create table t1(a longblob unique, b longblob , c longblob , unique(b,c));
+desc t1;
+show create table t1;
+show keys from t1;
+insert into t1 values(concat(repeat('sachin',10000000),'1'),concat(repeat('sachin',10000000),'1'),
+concat(repeat('sachin',10000000),'1'));
+insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
+concat(repeat('sachin',10000000),'1'));
+--error ER_DUP_ENTRY
+insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'),
+concat(repeat('sachin',10000000),'4'));
+--error ER_DUP_ENTRY
+insert into t1 values(concat(repeat('sachin',10000000),'3'),concat(repeat('sachin',10000000),'1'),
+concat(repeat('sachin',10000000),'1'));
+drop table t1;
+disconnect con1;
+connection default;
+set @@GLOBAL.max_allowed_packet= @allowed_packet;
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result
new file mode 100644
index 00000000000..730f721fcb1
--- /dev/null
+++ b/mysql-test/main/long_unique_bugs.result
@@ -0,0 +1,338 @@
+create table t1 (a int, b int, c int, d int, e int);
+insert into t1 () values
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),();
+select * into outfile 'load.data' from t1;
+create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring, unique (e));
+load data infile 'load.data' into table tmp;
+delete from tmp;
+drop table t1;
+create table t1 (b blob) engine=innodb;
+alter table t1 add unique (b);
+alter table t1 force;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` blob DEFAULT NULL,
+ UNIQUE KEY `b` (`b`) USING HASH
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (pk int, b blob, primary key(pk), unique(b)) engine=myisam;
+insert into t1 values (1,'foo');
+replace into t1 (pk) values (1);
+alter table t1 force;
+replace into t1 (pk) values (1);
+drop table t1;
+create table t1 (t time, unique(t)) engine=innodb;
+insert into t1 values (null),(null);
+alter ignore table t1 modify t text not null default '';
+Warnings:
+Warning 1265 Data truncated for column 't' at row 1
+Warning 1265 Data truncated for column 't' at row 2
+drop table t1;
+create table t1 ( pk int, f text, primary key (pk), unique(f)) with system versioning;
+insert into t1 values (1,'foo');
+update t1 set f = 'bar';
+select * from t1;
+pk f
+1 bar
+update t1 set f = 'foo';
+select * from t1;
+pk f
+1 foo
+select pk, f, row_end > DATE'2030-01-01' from t1 for system_time all;
+pk f row_end > DATE'2030-01-01'
+1 foo 1
+1 foo 0
+1 bar 0
+drop table t1;
+create temporary table t1 (f blob, unique(f)) engine=innodb;
+insert into t1 values (1);
+replace into t1 values (1);
+drop table t1;
+create table t (b blob, unique(b)) engine=myisam;
+insert into t values ('foo');
+replace into t values ('foo');
+drop table t;
+CREATE TABLE t1 (f INT, x BLOB, UNIQUE (x));
+INSERT INTO t1 VALUES (1,'foo');
+ALTER TABLE t1 DROP x, ALGORITHM=INPLACE;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+UPDATE t1 SET x = 'bar';
+DROP TABLE t1;
+create table t1(a blob unique , b blob);
+insert into t1 values(1,1),(2,1);
+alter table t1 add unique(b);
+ERROR 23000: Duplicate entry '1' for key 'b'
+show keys from t1;;
+Table t1
+Non_unique 0
+Key_name a
+Seq_in_index 1
+Column_name a
+Collation A
+Cardinality NULL
+Sub_part NULL
+Packed NULL
+Null YES
+Index_type HASH
+Comment
+Index_comment
+insert into t1 values(1,1);
+ERROR 23000: Duplicate entry '1' for key 'a'
+DROP TABLE t1;
+CREATE TABLE t1 (a TEXT, b INT, UNIQUE(a)) ENGINE=MyISAM;
+ALTER TABLE t1 DROP x;
+ERROR 42000: Can't DROP COLUMN `x`; check that it exists
+UPDATE t1 SET b = 0 WHERE a = 'foo';
+DROP TABLE t1;
+CREATE TABLE t1 (a TEXT, b INT, UNIQUE(a)) ENGINE=InnoDB;
+ALTER TABLE t1 DROP x;
+ERROR 42000: Can't DROP COLUMN `x`; check that it exists
+UPDATE t1 SET b = 0 WHERE a = 'foo';
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (f BLOB, UNIQUE(f)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 ADD KEY (f);
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes
+TRUNCATE TABLE t1;
+SELECT * FROM t1 WHERE f LIKE 'foo';
+f
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, UNIQUE ind USING HASH (a)) ENGINE=InnoDB;
+ALTER TABLE t1 CHANGE COLUMN IF EXISTS b a INT;
+Warnings:
+Note 1054 Unknown column 'b' in 't1'
+DROP TABLE t1;
+CREATE TABLE t1 (f VARCHAR(4096), UNIQUE(f)) ENGINE=InnoDB;
+ALTER TABLE t1 DROP x;
+ERROR 42000: Can't DROP COLUMN `x`; check that it exists
+SELECT * FROM t1 WHERE f LIKE 'foo';
+f
+DROP TABLE t1;
+CREATE TABLE t1 (pk INT, PRIMARY KEY USING HASH (pk)) ENGINE=InnoDB;
+show keys from t1;;
+Table t1
+Non_unique 0
+Key_name PRIMARY
+Seq_in_index 1
+Column_name pk
+Collation A
+Cardinality 0
+Sub_part NULL
+Packed NULL
+Null
+Index_type BTREE
+Comment
+Index_comment
+ALTER TABLE t1 ADD INDEX (pk);
+DROP TABLE t1;
+CREATE TABLE t1 (b int, a varchar(4000));
+INSERT INTO t1 VALUES (1, 2),(2,3),(3,4);
+ALTER TABLE t1 ADD UNIQUE INDEX (a);
+SELECT * FROM t1;
+b a
+1 2
+2 3
+3 4
+SELECT a FROM t1;
+a
+2
+3
+4
+drop table t1;
+CREATE TABLE t1 (f VARCHAR(4096), UNIQUE(f)) ENGINE=InnoDB;
+ALTER TABLE t1 DROP KEY f, ADD INDEX idx1(f), ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY
+ALTER TABLE t1 ADD KEY idx2(f);
+Warnings:
+Note 1071 Specified key was too long; max key length is 3072 bytes
+DROP TABLE t1;
+CREATE TABLE t1(a blob , b blob , unique(a,b));
+alter table t1 drop column b;
+ERROR 42000: Key column 'b' doesn't exist in table
+insert into t1 values(1,1);
+insert into t1 values(1,1);
+ERROR 23000: Duplicate entry '1-1' for key 'a'
+alter table t1 add column c int;
+drop table t1;
+create table t1(a blob , b blob as (a) unique);
+insert into t1 values(1, default);
+insert into t1 values(1, default);
+ERROR 23000: Duplicate entry '1' for key 'b'
+drop table t1;
+create table t1(a blob, b blob, c blob as (left(a, 5000)) virtual, d blob as (left(b, 5000)) persistent, unique(a,b(4000)));
+insert into t1(a,b) values(10,11);
+insert into t1(a,b) values(10,11);
+ERROR 23000: Duplicate entry '10-11' for key 'a'
+insert into t1(a,b) values(2,2);
+insert into t1(a,b) values(2,3);
+insert into t1(a,b) values(3,2);
+drop table t1;
+CREATE TABLE t1 (
+a CHAR(128),
+b CHAR(128) AS (a),
+c DATETIME,
+UNIQUE(c,b(64))
+) ENGINE=InnoDB;
+ALTER TABLE t1 MODIFY COLUMN c VARCHAR(4096);
+drop table t1;
+CREATE TABLE t1 (
+a CHAR(128),
+b CHAR(128) AS (a),
+c varchar(5000),
+UNIQUE(c,b(64))
+) ENGINE=InnoDB;
+drop table t1;
+CREATE TABLE t1 (data VARCHAR(4), unique(data) using hash) with system versioning;
+INSERT INTO t1 VALUES ('A');
+SELECT * INTO OUTFILE 'load.data' from t1;
+LOAD DATA INFILE 'load.data' INTO TABLE t1;
+ERROR 23000: Duplicate entry 'A' for key 'data'
+select * from t1;
+data
+A
+DROP TABLE t1;
+CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('f'), ('o'), ('o');
+SELECT * INTO OUTFILE 'load.data' from t1;
+ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data);
+SELECT * FROM t1;
+data
+f
+o
+ALTER TABLE t1 ADD SYSTEM VERSIONING ;
+SELECT * FROM t1;
+data
+f
+o
+REPLACE INTO t1 VALUES ('f'), ('o'), ('o');
+SELECT * FROM t1;
+data
+f
+o
+LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
+SELECT * FROM t1;
+data
+f
+o
+DROP TABLE t1;
+create table t1 (
+c char(10) character set utf8mb4,
+unique key a using hash (c(1))
+) engine=myisam;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` char(10) CHARACTER SET utf8mb4 DEFAULT NULL,
+ UNIQUE KEY `a` (`c`(1)) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values ('б');
+insert into t1 values ('бб');
+ERROR 23000: Duplicate entry 'Ð' for key 'a'
+insert into t1 values ('ббб');
+ERROR 23000: Duplicate entry 'Ð' for key 'a'
+drop table t1;
+CREATE TABLE t1 (a INT, UNIQUE USING HASH (a)) PARTITION BY HASH (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (2);
+REPLACE INTO t1 VALUES (2);
+DROP TABLE t1;
+set innodb_lock_wait_timeout= 10;
+CREATE TABLE t1 (
+id int primary key,
+f INT unique
+) ENGINE=InnoDB;
+CREATE TABLE t2 (
+id int primary key,
+a blob unique
+) ENGINE=InnoDB;
+START TRANSACTION;
+connect con1,localhost,root,,test;
+connection con1;
+set innodb_lock_wait_timeout= 10;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,1)/*1*/;
+connection default;
+INSERT INTO t2 VALUES (2, 1)/*2*/ ;
+connection con1;
+INSERT INTO t2 VALUES (3, 1)/*3*/;
+connection default;
+INSERT IGNORE INTO t1 VALUES (4, 1)/*4*/;
+connection con1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+disconnect con1;
+connection default;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a TEXT, UNIQUE(a)) ENGINE=Aria;
+ERROR 42000: Specified key was too long; max key length is 1000 bytes
+create table t1(a int, unique(a) using hash);
+#BULK insert > 100 rows (MI_MIN_ROWS_TO_DISABLE_INDEXES)
+drop table t1;
+SET binlog_row_image= NOBLOB;
+CREATE TABLE t1 (pk INT PRIMARY KEY, a text ,UNIQUE(a) using hash);
+INSERT INTO t1 VALUES (1,'foo');
+create table t2(id int primary key, a blob, b varchar(20) as (LEFT(a,2)));
+INSERT INTO t2 VALUES (1, 'foo', default);
+DROP TABLE t1, t2;
+SET binlog_row_image= FULL;
+CREATE TABLE t1 (a int, b VARCHAR(1000), UNIQUE (a,b)) ENGINE=MyISAM;
+show index from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+CREATE TABLE t2 (a varchar(900), b VARCHAR(900), UNIQUE (a,b)) ENGINE=MyISAM;
+show index from t2;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t2 0 a 1 a A NULL NULL NULL YES HASH
+t2 0 a 2 b A NULL NULL NULL YES HASH
+DROP TABLE t1,t2;
+#
+# MDEV-26453 Assertion `0' failed in row_upd_sec_index_entry & corruption
+#
+CREATE TABLE t (c INT AUTO_INCREMENT KEY, UNIQUE USING HASH(c));
+ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the USING HASH clause of `c`
+CREATE TABLE t (c INT AUTO_INCREMENT KEY);
+CREATE UNIQUE INDEX i USING HASH ON t (c);
+ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the USING HASH clause of `c`
+INSERT INTO t VALUES (0);
+SELECT * FROM t;
+c
+1
+DELETE FROM t;
+DROP TABLE t;
+#
+# MDEV-28098 incorrect key in "dup value" error after long unique
+#
+create table t1 (v3 int primary key, v2 text(100) unique not null, v1 int unique) engine=innodb;
+insert into t1 values ( -32768 , -128 , 58 ) , ( -1 , 44 , -128 );
+create table t2 (v6 int primary key, v5 text, a int not null) engine=innodb;
+insert into t2 values ( 50 , 61 , -1 ) , ( -2147483648 , -128 , 0 );
+update t1 set v2 = 1, v3 = -128;
+ERROR 23000: Duplicate entry '1' for key 'v2'
+update t1,t2 set v1 = v2 , v5 = 0;
+ERROR 23000: Duplicate entry '-128' for key 'v1'
+drop table t1, t2;
+#
+# MDEV-21540 Initialization of already inited long unique index on reorganize partition
+#
+create table t1 (x int, a blob)
+partition by range (x) (
+partition p1 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (1, 1), (100, 1);
+alter table t1 add unique key (a);
+ERROR 23000: Duplicate entry '1' for key 'a'
+update t1 set a= x;
+alter table t1 add unique key (a);
+update t1 set a= 1;
+ERROR 23000: Duplicate entry '1' for key 'a'
+update t1 set a= x + 1;
+alter table t1 reorganize partition p1 into (
+partition n0 values less than (10),
+partition n1 values less than (50));
+drop table t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
new file mode 100644
index 00000000000..f62ba2ac61a
--- /dev/null
+++ b/mysql-test/main/long_unique_bugs.test
@@ -0,0 +1,428 @@
+--source include/have_innodb.inc
+--source include/have_partition.inc
+
+#
+# MDEV-18707 Server crash in my_hash_sort_bin, ASAN heap-use-after-free in Field::is_null, server hang, corrupted double-linked list
+#
+create table t1 (a int, b int, c int, d int, e int);
+insert into t1 () values
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
+(),(),(),();
+select * into outfile 'load.data' from t1;
+create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring, unique (e));
+load data infile 'load.data' into table tmp;
+delete from tmp;
+drop table t1;
+--let $datadir= `SELECT @@datadir`
+--remove_file $datadir/test/load.data
+
+#
+# MDEV-18712 InnoDB indexes are inconsistent with what defined in .frm for table after rebuilding table with index on blob
+#
+create table t1 (b blob) engine=innodb;
+alter table t1 add unique (b);
+alter table t1 force;
+show create table t1;
+drop table t1;
+
+#
+# MDEV-18713 Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed in test_if_reopen upon REPLACE into table with key on blob
+#
+create table t1 (pk int, b blob, primary key(pk), unique(b)) engine=myisam;
+insert into t1 values (1,'foo');
+replace into t1 (pk) values (1);
+alter table t1 force;
+replace into t1 (pk) values (1);
+drop table t1;
+
+#
+# MDEV-18722 Assertion `templ->mysql_null_bit_mask' failed in row_sel_store_mysql_rec upon modifying indexed column into blob
+#
+create table t1 (t time, unique(t)) engine=innodb;
+insert into t1 values (null),(null);
+alter ignore table t1 modify t text not null default '';
+drop table t1;
+
+#
+# MDEV-18720 Assertion `inited==NONE' failed in ha_index_init upon update on versioned table with key on blob
+#
+create table t1 ( pk int, f text, primary key (pk), unique(f)) with system versioning;
+insert into t1 values (1,'foo');
+update t1 set f = 'bar';
+select * from t1;
+update t1 set f = 'foo';
+select * from t1;
+select pk, f, row_end > DATE'2030-01-01' from t1 for system_time all;
+drop table t1;
+
+#
+# MDEV-18747 InnoDB: Failing assertion: table->get_ref_count() == 0 upon dropping temporary table with unique blob
+#
+create temporary table t1 (f blob, unique(f)) engine=innodb;
+insert into t1 values (1);
+replace into t1 values (1);
+drop table t1;
+
+#
+# MDEV-18748 REPLACE doesn't work with unique blobs on MyISAM table
+#
+create table t (b blob, unique(b)) engine=myisam;
+insert into t values ('foo');
+replace into t values ('foo');
+drop table t;
+
+#
+# MDEV-18790 Server crash in fields_in_hash_keyinfo after unsuccessful attempt to drop BLOB with long index
+#
+CREATE TABLE t1 (f INT, x BLOB, UNIQUE (x));
+INSERT INTO t1 VALUES (1,'foo');
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 DROP x, ALGORITHM=INPLACE;
+UPDATE t1 SET x = 'bar';
+DROP TABLE t1;
+
+#
+# MDEV-18799 Long unique does not work after failed alter table
+#
+create table t1(a blob unique , b blob);
+insert into t1 values(1,1),(2,1);
+--error ER_DUP_ENTRY
+alter table t1 add unique(b);
+--query_vertical show keys from t1;
+--error ER_DUP_ENTRY
+insert into t1 values(1,1);
+DROP TABLE t1;
+
+#
+# MDEV-18792 ASAN unknown-crash in _mi_pack_key upon UPDATE after failed ALTER on a table with long BLOB key
+#
+CREATE TABLE t1 (a TEXT, b INT, UNIQUE(a)) ENGINE=MyISAM;
+--error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t1 DROP x;
+UPDATE t1 SET b = 0 WHERE a = 'foo';
+DROP TABLE t1;
+
+#
+# MDEV-18793 Assertion `0' failed in row_sel_convert_mysql_key_to_innobase, ASAN unknown-crash in
+# row_mysql_store_col_in_innobase_format, warning " InnoDB: Using a partial-field key prefix in search"
+#
+CREATE TABLE t1 (a TEXT, b INT, UNIQUE(a)) ENGINE=InnoDB;
+--error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t1 DROP x;
+UPDATE t1 SET b = 0 WHERE a = 'foo';
+DROP TABLE t1;
+
+#
+# MDEV-18795 InnoDB: Failing assertion: field->prefix_len > 0 upon DML on table with BLOB index
+#
+CREATE TEMPORARY TABLE t1 (f BLOB, UNIQUE(f)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+--error ER_INDEX_COLUMN_TOO_LONG
+ALTER TABLE t1 ADD KEY (f);
+TRUNCATE TABLE t1;
+SELECT * FROM t1 WHERE f LIKE 'foo';
+DROP TABLE t1;
+
+#
+# MDEV-18798 InnoDB: No matching column for `DB_ROW_HASH_1`and server crash in
+# ha_innobase::commit_inplace_alter_table upon ALTER on table with UNIQUE key
+#
+CREATE TABLE t1 (a INT, UNIQUE ind USING HASH (a)) ENGINE=InnoDB;
+ALTER TABLE t1 CHANGE COLUMN IF EXISTS b a INT;
+DROP TABLE t1;
+
+#
+# MDEV-18801 InnoDB: Failing assertion: field->col->mtype == type or ASAN heap-buffer-overflow
+# in row_sel_convert_mysql_key_to_innobase upon SELECT on table with long index
+#
+CREATE TABLE t1 (f VARCHAR(4096), UNIQUE(f)) ENGINE=InnoDB;
+--error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t1 DROP x;
+SELECT * FROM t1 WHERE f LIKE 'foo';
+DROP TABLE t1;
+
+#
+# MDEV-18800 Server crash in instant_alter_column_possible or
+# Assertion `!pk->has_virtual()' failed in instant_alter_column_possible upon adding key
+#
+CREATE TABLE t1 (pk INT, PRIMARY KEY USING HASH (pk)) ENGINE=InnoDB;
+--query_vertical show keys from t1;
+ALTER TABLE t1 ADD INDEX (pk);
+DROP TABLE t1;
+
+#
+# MDEV-18922 Alter on long unique varchar column makes result null
+#
+CREATE TABLE t1 (b int, a varchar(4000));
+INSERT INTO t1 VALUES (1, 2),(2,3),(3,4);
+ALTER TABLE t1 ADD UNIQUE INDEX (a);
+SELECT * FROM t1;
+SELECT a FROM t1;
+drop table t1;
+
+#
+# MDEV-18809 Server crash in fields_in_hash_keyinfo or Assertion `key_info->key_part->field->flags
+# & (1<< 30)' failed in setup_keyinfo_hash
+#
+CREATE TABLE t1 (f VARCHAR(4096), UNIQUE(f)) ENGINE=InnoDB;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 DROP KEY f, ADD INDEX idx1(f), ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD KEY idx2(f);
+DROP TABLE t1;
+CREATE TABLE t1(a blob , b blob , unique(a,b));
+--error ER_KEY_COLUMN_DOES_NOT_EXITS
+alter table t1 drop column b;
+insert into t1 values(1,1);
+--error ER_DUP_ENTRY
+insert into t1 values(1,1);
+alter table t1 add column c int;
+drop table t1;
+
+#
+# MDEV-18889 Long unique on virtual fields crashes server
+#
+create table t1(a blob , b blob as (a) unique);
+insert into t1 values(1, default);
+--error ER_DUP_ENTRY
+insert into t1 values(1, default);
+drop table t1;
+
+create table t1(a blob, b blob, c blob as (left(a, 5000)) virtual, d blob as (left(b, 5000)) persistent, unique(a,b(4000)));
+insert into t1(a,b) values(10,11);
+--error ER_DUP_ENTRY
+insert into t1(a,b) values(10,11);
+insert into t1(a,b) values(2,2);
+insert into t1(a,b) values(2,3);
+insert into t1(a,b) values(3,2);
+drop table t1;
+
+#
+# MDEV-18888 Server crashes in Item_field::register_field_in_read_map upon MODIFY COLUMN
+#
+CREATE TABLE t1 (
+ a CHAR(128),
+ b CHAR(128) AS (a),
+ c DATETIME,
+ UNIQUE(c,b(64))
+) ENGINE=InnoDB;
+ALTER TABLE t1 MODIFY COLUMN c VARCHAR(4096);
+drop table t1;
+CREATE TABLE t1 (
+ a CHAR(128),
+ b CHAR(128) AS (a),
+ c varchar(5000),
+ UNIQUE(c,b(64))
+) ENGINE=InnoDB;
+drop table t1;
+
+#
+# MDEV-18967 Load data in system version with long unique does not work
+#
+CREATE TABLE t1 (data VARCHAR(4), unique(data) using hash) with system versioning;
+INSERT INTO t1 VALUES ('A');
+SELECT * INTO OUTFILE 'load.data' from t1;
+--error ER_DUP_ENTRY
+LOAD DATA INFILE 'load.data' INTO TABLE t1;
+select * from t1;
+DROP TABLE t1;
+--let $datadir= `select @@datadir`
+--remove_file $datadir/test/load.data
+
+#
+# MDEV-18901 Wrong results after ADD UNIQUE INDEX(blob_column)
+#
+CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES ('f'), ('o'), ('o');
+SELECT * INTO OUTFILE 'load.data' from t1;
+
+ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data);
+SELECT * FROM t1;
+ALTER TABLE t1 ADD SYSTEM VERSIONING ;
+SELECT * FROM t1;
+REPLACE INTO t1 VALUES ('f'), ('o'), ('o');
+SELECT * FROM t1;
+# This should be equivalent to the REPLACE above
+LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+--let $datadir= `select @@datadir`
+--remove_file $datadir/test/load.data
+
+#
+# MDEV-18953 Hash index on partial char field not working
+#
+create table t1 (
+ c char(10) character set utf8mb4,
+ unique key a using hash (c(1))
+) engine=myisam;
+show create table t1;
+insert into t1 values ('б');
+--error ER_DUP_ENTRY
+insert into t1 values ('бб');
+--error ER_DUP_ENTRY
+insert into t1 values ('ббб');
+drop table t1;
+
+#
+# MDEV-18904 Assertion `m_part_spec.start_part >= m_part_spec.end_part' failed in ha_partition::index_read_idx_map
+#
+CREATE TABLE t1 (a INT, UNIQUE USING HASH (a)) PARTITION BY HASH (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (2);
+REPLACE INTO t1 VALUES (2);
+DROP TABLE t1;
+
+#
+# MDEV-18820 Assertion `lock_table_has(trx, index->table, LOCK_IX)' failed in lock_rec_insert_check_and_lock upon INSERT into table with blob key'
+#
+
+set innodb_lock_wait_timeout= 10;
+
+CREATE TABLE t1 (
+ id int primary key,
+ f INT unique
+) ENGINE=InnoDB;
+
+CREATE TABLE t2 (
+ id int primary key,
+ a blob unique
+) ENGINE=InnoDB;
+
+START TRANSACTION;
+
+--connect (con1,localhost,root,,test)
+
+--connection con1
+set innodb_lock_wait_timeout= 10;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,1)/*1*/;
+
+--connection default
+INSERT INTO t2 VALUES (2, 1)/*2*/ ;
+
+--connection con1
+--send
+ INSERT INTO t2 VALUES (3, 1)/*3*/;
+
+--connection default
+INSERT IGNORE INTO t1 VALUES (4, 1)/*4*/;
+
+--connection con1
+--error ER_LOCK_DEADLOCK
+--reap
+--disconnect con1
+--connection default
+DROP TABLE t1, t2;
+
+#
+# MDEV-18791 Wrong error upon creating Aria table with long index on BLOB
+#
+--error ER_TOO_LONG_KEY
+CREATE TABLE t1 (a TEXT, UNIQUE(a)) ENGINE=Aria;
+
+#
+# MDEV-20001 Potential dangerous regression: INSERT INTO >=100 rows fail for myisam table with HASH indexes
+#
+create table t1(a int, unique(a) using hash);
+--let $count=150
+--let insert_stmt= insert into t1 values(200)
+while ($count)
+{
+ --let $insert_stmt=$insert_stmt,($count)
+ --dec $count
+}
+--disable_query_log
+--echo #BULK insert > 100 rows (MI_MIN_ROWS_TO_DISABLE_INDEXES)
+--eval $insert_stmt
+--enable_query_log
+drop table t1;
+
+#
+# MDEV-21804 Assertion `marked_for_read()' failed upon INSERT into table with long unique blob under binlog_row_image=NOBLOB
+#
+
+--source include/have_binlog_format_row.inc
+SET binlog_row_image= NOBLOB;
+CREATE TABLE t1 (pk INT PRIMARY KEY, a text ,UNIQUE(a) using hash);
+INSERT INTO t1 VALUES (1,'foo');
+
+create table t2(id int primary key, a blob, b varchar(20) as (LEFT(a,2)));
+INSERT INTO t2 VALUES (1, 'foo', default);
+
+# Cleanup
+DROP TABLE t1, t2;
+SET binlog_row_image= FULL;
+
+#
+# MDEV-22719 Long unique keys are not created when individual key_part->length < max_key_length but SUM(key_parts->length) > max_key_length
+#
+
+CREATE TABLE t1 (a int, b VARCHAR(1000), UNIQUE (a,b)) ENGINE=MyISAM;
+show index from t1;
+CREATE TABLE t2 (a varchar(900), b VARCHAR(900), UNIQUE (a,b)) ENGINE=MyISAM;
+show index from t2;
+
+# Cleanup
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-26453 Assertion `0' failed in row_upd_sec_index_entry & corruption
+--echo #
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t (c INT AUTO_INCREMENT KEY, UNIQUE USING HASH(c));
+
+CREATE TABLE t (c INT AUTO_INCREMENT KEY);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE UNIQUE INDEX i USING HASH ON t (c);
+INSERT INTO t VALUES (0);
+SELECT * FROM t;
+DELETE FROM t;
+
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-28098 incorrect key in "dup value" error after long unique
+--echo #
+create table t1 (v3 int primary key, v2 text(100) unique not null, v1 int unique) engine=innodb;
+insert into t1 values ( -32768 , -128 , 58 ) , ( -1 , 44 , -128 );
+create table t2 (v6 int primary key, v5 text, a int not null) engine=innodb;
+insert into t2 values ( 50 , 61 , -1 ) , ( -2147483648 , -128 , 0 );
+--error ER_DUP_ENTRY
+update t1 set v2 = 1, v3 = -128;
+--error ER_DUP_ENTRY
+update t1,t2 set v1 = v2 , v5 = 0;
+drop table t1, t2;
+
+--echo #
+--echo # MDEV-21540 Initialization of already inited long unique index on reorganize partition
+--echo #
+create table t1 (x int, a blob)
+partition by range (x) (
+ partition p1 values less than (50),
+ partition pn values less than maxvalue);
+
+insert into t1 values (1, 1), (100, 1);
+
+# a little bit of additional checks
+--error ER_DUP_ENTRY
+alter table t1 add unique key (a);
+
+update t1 set a= x;
+alter table t1 add unique key (a);
+--error ER_DUP_ENTRY
+update t1 set a= 1;
+update t1 set a= x + 1;
+
+# bug failure
+alter table t1 reorganize partition p1 into (
+ partition n0 values less than (10),
+ partition n1 values less than (50));
+
+drop table t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/long_unique_debug.result b/mysql-test/main/long_unique_debug.result
new file mode 100644
index 00000000000..fb56a9d024b
--- /dev/null
+++ b/mysql-test/main/long_unique_debug.result
@@ -0,0 +1,579 @@
+#In this test case we will check what will happen in the case of hash collision
+SET debug_dbug="d,same_long_unique_hash";
+create table t1(a blob unique);
+FLUSH STATUS;
+insert into t1 values('xyz');
+insert into t1 values('abc');
+insert into t1 values('sachin');
+insert into t1 values('sachin');
+ERROR 23000: Duplicate entry 'sachin' for key 'a'
+insert into t1 values('maria');
+insert into t1 values('maria');
+ERROR 23000: Duplicate entry 'maria' for key 'a'
+drop table t1;
+SHOW STATUS LIKE 'handler_read_next';
+Variable_name Value
+Handler_read_next 11
+SET debug_dbug="";
+create table t1(a blob unique);
+FLUSH STATUS;
+insert into t1 values('xyz');
+insert into t1 values('abc');
+insert into t1 values('sachin');
+insert into t1 values('sachin');
+ERROR 23000: Duplicate entry 'sachin' for key 'a'
+insert into t1 values('maria');
+insert into t1 values('maria');
+ERROR 23000: Duplicate entry 'maria' for key 'a'
+drop table t1;
+SHOW STATUS LIKE 'handler_read_next';
+Variable_name Value
+Handler_read_next 0
+SET debug_dbug="d,same_long_unique_hash";
+create table t1(a blob unique, b blob unique);
+insert into t1 values('xyz', 11);
+insert into t1 values('abc', 22);
+insert into t1 values('sachin', 1);
+insert into t1 values('sachin', 4);
+ERROR 23000: Duplicate entry 'sachin' for key 'a'
+insert into t1 values('maria', 2);
+insert into t1 values('maria', 3);
+ERROR 23000: Duplicate entry 'maria' for key 'a'
+drop table t1;
+create table t1(a blob , b blob , unique(a,b));
+insert into t1 values('xyz', 11);
+insert into t1 values('abc', 22);
+insert into t1 values('sachin', 1);
+insert into t1 values('sachin', 1);
+ERROR 23000: Duplicate entry 'sachin-1' for key 'a'
+insert into t1 values('maria', 2);
+insert into t1 values('maria', 2);
+ERROR 23000: Duplicate entry 'maria-2' for key 'a'
+drop table t1;
+##Internal State of long unique tables
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1 ( a blob unique);
+Warnings:
+Note 1 Printing Table state, It will print table fields, fields->offset,field->null_bit, field->null_pos and key_info ...
+
+Printing Table keyinfo
+
+table->s->reclength 19
+table->s->fields 2
+
+table->key_info[0] user_defined_key_parts = 1
+table->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[0] flags & HA_NOSAME = 0
+
+table->s->key_info[0] user_defined_key_parts = 1
+table->s->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[0] flags & HA_NOSAME = 1
+
+Printing table->key_info[0].key_part[0] info
+key_part->offset = 11
+key_part->field_name = DB_ROW_HASH_1
+key_part->length = 8
+key_part->null_bit = 2
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 0
+key_part->null_bit = 1
+key_part->null_offset = 0
+
+Printing table->fields
+
+table->field[0]->field_name a
+table->field[0]->offset = 1
+table->field[0]->field_length = 10
+table->field[0]->null_pos wrt to record 0 = 0
+table->field[0]->null_bit_pos = 1
+
+table->field[1]->field_name DB_ROW_HASH_1
+table->field[1]->offset = 11
+table->field[1]->field_length = 8
+table->field[1]->null_pos wrt to record 0 = 0
+table->field[1]->null_bit_pos = 2
+
+SET debug_dbug="";
+drop table t1;
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1 ( a blob unique, b blob unique , c blob unique);
+Warnings:
+Note 1 Printing Table state, It will print table fields, fields->offset,field->null_bit, field->null_pos and key_info ...
+
+Printing Table keyinfo
+
+table->s->reclength 55
+table->s->fields 6
+
+table->key_info[0] user_defined_key_parts = 1
+table->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[0] flags & HA_NOSAME = 0
+
+table->s->key_info[0] user_defined_key_parts = 1
+table->s->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[0] flags & HA_NOSAME = 1
+
+Printing table->key_info[0].key_part[0] info
+key_part->offset = 31
+key_part->field_name = DB_ROW_HASH_1
+key_part->length = 8
+key_part->null_bit = 8
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 0
+key_part->null_bit = 1
+key_part->null_offset = 0
+
+table->key_info[1] user_defined_key_parts = 1
+table->key_info[1] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[1] flags & HA_NOSAME = 0
+
+table->s->key_info[1] user_defined_key_parts = 1
+table->s->key_info[1] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[1] flags & HA_NOSAME = 1
+
+Printing table->key_info[1].key_part[0] info
+key_part->offset = 39
+key_part->field_name = DB_ROW_HASH_2
+key_part->length = 8
+key_part->null_bit = 16
+key_part->null_offset = 0
+
+Printing share->key_info[1].key_part[0] info
+key_part->offset = 11
+key_part->field_name = b
+key_part->length = 0
+key_part->null_bit = 2
+key_part->null_offset = 0
+
+table->key_info[2] user_defined_key_parts = 1
+table->key_info[2] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[2] flags & HA_NOSAME = 0
+
+table->s->key_info[2] user_defined_key_parts = 1
+table->s->key_info[2] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[2] flags & HA_NOSAME = 1
+
+Printing table->key_info[2].key_part[0] info
+key_part->offset = 47
+key_part->field_name = DB_ROW_HASH_3
+key_part->length = 8
+key_part->null_bit = 32
+key_part->null_offset = 0
+
+Printing share->key_info[2].key_part[0] info
+key_part->offset = 21
+key_part->field_name = c
+key_part->length = 0
+key_part->null_bit = 4
+key_part->null_offset = 0
+
+Printing table->fields
+
+table->field[0]->field_name a
+table->field[0]->offset = 1
+table->field[0]->field_length = 10
+table->field[0]->null_pos wrt to record 0 = 0
+table->field[0]->null_bit_pos = 1
+
+table->field[1]->field_name b
+table->field[1]->offset = 11
+table->field[1]->field_length = 10
+table->field[1]->null_pos wrt to record 0 = 0
+table->field[1]->null_bit_pos = 2
+
+table->field[2]->field_name c
+table->field[2]->offset = 21
+table->field[2]->field_length = 10
+table->field[2]->null_pos wrt to record 0 = 0
+table->field[2]->null_bit_pos = 4
+
+table->field[3]->field_name DB_ROW_HASH_1
+table->field[3]->offset = 31
+table->field[3]->field_length = 8
+table->field[3]->null_pos wrt to record 0 = 0
+table->field[3]->null_bit_pos = 8
+
+table->field[4]->field_name DB_ROW_HASH_2
+table->field[4]->offset = 39
+table->field[4]->field_length = 8
+table->field[4]->null_pos wrt to record 0 = 0
+table->field[4]->null_bit_pos = 16
+
+table->field[5]->field_name DB_ROW_HASH_3
+table->field[5]->offset = 47
+table->field[5]->field_length = 8
+table->field[5]->null_pos wrt to record 0 = 0
+table->field[5]->null_bit_pos = 32
+
+SET debug_dbug="";
+drop table t1;
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1 ( a blob , b blob , c blob , d blob , unique (a,b), unique(c, d));
+Warnings:
+Note 1 Printing Table state, It will print table fields, fields->offset,field->null_bit, field->null_pos and key_info ...
+
+Printing Table keyinfo
+
+table->s->reclength 57
+table->s->fields 6
+
+table->key_info[0] user_defined_key_parts = 1
+table->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[0] flags & HA_NOSAME = 0
+
+table->s->key_info[0] user_defined_key_parts = 2
+table->s->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[0] flags & HA_NOSAME = 1
+
+Printing table->key_info[0].key_part[0] info
+key_part->offset = 41
+key_part->field_name = DB_ROW_HASH_1
+key_part->length = 8
+key_part->null_bit = 16
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 0
+key_part->null_bit = 1
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[1] info
+key_part->offset = 11
+key_part->field_name = b
+key_part->length = 0
+key_part->null_bit = 2
+key_part->null_offset = 0
+
+table->key_info[1] user_defined_key_parts = 1
+table->key_info[1] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[1] flags & HA_NOSAME = 0
+
+table->s->key_info[1] user_defined_key_parts = 2
+table->s->key_info[1] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[1] flags & HA_NOSAME = 1
+
+Printing table->key_info[1].key_part[0] info
+key_part->offset = 49
+key_part->field_name = DB_ROW_HASH_2
+key_part->length = 8
+key_part->null_bit = 32
+key_part->null_offset = 0
+
+Printing share->key_info[1].key_part[0] info
+key_part->offset = 21
+key_part->field_name = c
+key_part->length = 0
+key_part->null_bit = 4
+key_part->null_offset = 0
+
+Printing share->key_info[1].key_part[1] info
+key_part->offset = 31
+key_part->field_name = d
+key_part->length = 0
+key_part->null_bit = 8
+key_part->null_offset = 0
+
+Printing table->fields
+
+table->field[0]->field_name a
+table->field[0]->offset = 1
+table->field[0]->field_length = 10
+table->field[0]->null_pos wrt to record 0 = 0
+table->field[0]->null_bit_pos = 1
+
+table->field[1]->field_name b
+table->field[1]->offset = 11
+table->field[1]->field_length = 10
+table->field[1]->null_pos wrt to record 0 = 0
+table->field[1]->null_bit_pos = 2
+
+table->field[2]->field_name c
+table->field[2]->offset = 21
+table->field[2]->field_length = 10
+table->field[2]->null_pos wrt to record 0 = 0
+table->field[2]->null_bit_pos = 4
+
+table->field[3]->field_name d
+table->field[3]->offset = 31
+table->field[3]->field_length = 10
+table->field[3]->null_pos wrt to record 0 = 0
+table->field[3]->null_bit_pos = 8
+
+table->field[4]->field_name DB_ROW_HASH_1
+table->field[4]->offset = 41
+table->field[4]->field_length = 8
+table->field[4]->null_pos wrt to record 0 = 0
+table->field[4]->null_bit_pos = 16
+
+table->field[5]->field_name DB_ROW_HASH_2
+table->field[5]->offset = 49
+table->field[5]->field_length = 8
+table->field[5]->null_pos wrt to record 0 = 0
+table->field[5]->null_bit_pos = 32
+
+SET debug_dbug="";
+drop table t1;
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1(a int primary key, b blob unique , c blob unique not null);
+Warnings:
+Note 1 Printing Table state, It will print table fields, fields->offset,field->null_bit, field->null_pos and key_info ...
+
+Printing Table keyinfo
+
+table->s->reclength 41
+table->s->fields 5
+
+table->key_info[0] user_defined_key_parts = 1
+table->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 0
+table->key_info[0] flags & HA_NOSAME = 1
+
+table->s->key_info[0] user_defined_key_parts = 1
+table->s->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 0
+table->s->key_info[0] flags & HA_NOSAME = 1
+
+Printing table->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 4
+key_part->null_bit = 0
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 4
+key_part->null_bit = 0
+key_part->null_offset = 0
+
+table->key_info[1] user_defined_key_parts = 1
+table->key_info[1] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[1] flags & HA_NOSAME = 0
+
+table->s->key_info[1] user_defined_key_parts = 1
+table->s->key_info[1] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[1] flags & HA_NOSAME = 1
+
+Printing table->key_info[1].key_part[0] info
+key_part->offset = 25
+key_part->field_name = DB_ROW_HASH_1
+key_part->length = 8
+key_part->null_bit = 2
+key_part->null_offset = 0
+
+Printing share->key_info[1].key_part[0] info
+key_part->offset = 5
+key_part->field_name = b
+key_part->length = 0
+key_part->null_bit = 1
+key_part->null_offset = 0
+
+table->key_info[2] user_defined_key_parts = 1
+table->key_info[2] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[2] flags & HA_NOSAME = 0
+
+table->s->key_info[2] user_defined_key_parts = 1
+table->s->key_info[2] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[2] flags & HA_NOSAME = 1
+
+Printing table->key_info[2].key_part[0] info
+key_part->offset = 33
+key_part->field_name = DB_ROW_HASH_2
+key_part->length = 8
+key_part->null_bit = 0
+key_part->null_offset = 0
+
+Printing share->key_info[2].key_part[0] info
+key_part->offset = 15
+key_part->field_name = c
+key_part->length = 0
+key_part->null_bit = 0
+key_part->null_offset = 0
+
+Printing table->fields
+
+table->field[0]->field_name a
+table->field[0]->offset = 1
+table->field[0]->field_length = 4
+table->field[0]->null_pos wrt to record 0 = -1
+table->field[0]->null_bit_pos = 0
+
+table->field[1]->field_name b
+table->field[1]->offset = 5
+table->field[1]->field_length = 10
+table->field[1]->null_pos wrt to record 0 = 0
+table->field[1]->null_bit_pos = 1
+
+table->field[2]->field_name c
+table->field[2]->offset = 15
+table->field[2]->field_length = 10
+table->field[2]->null_pos wrt to record 0 = -1
+table->field[2]->null_bit_pos = 0
+
+table->field[3]->field_name DB_ROW_HASH_1
+table->field[3]->offset = 25
+table->field[3]->field_length = 8
+table->field[3]->null_pos wrt to record 0 = 0
+table->field[3]->null_bit_pos = 2
+
+table->field[4]->field_name DB_ROW_HASH_2
+table->field[4]->offset = 33
+table->field[4]->field_length = 8
+table->field[4]->null_pos wrt to record 0 = -1
+table->field[4]->null_bit_pos = 0
+
+SET debug_dbug="";
+drop table t1;
+##Using hash
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1(a int ,b int , c int, unique(a, b, c) using hash);
+Warnings:
+Note 1 Printing Table state, It will print table fields, fields->offset,field->null_bit, field->null_pos and key_info ...
+
+Printing Table keyinfo
+
+table->s->reclength 21
+table->s->fields 4
+
+table->key_info[0] user_defined_key_parts = 1
+table->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->key_info[0] flags & HA_NOSAME = 0
+
+table->s->key_info[0] user_defined_key_parts = 3
+table->s->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 1
+table->s->key_info[0] flags & HA_NOSAME = 1
+
+Printing table->key_info[0].key_part[0] info
+key_part->offset = 13
+key_part->field_name = DB_ROW_HASH_1
+key_part->length = 8
+key_part->null_bit = 16
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 4
+key_part->null_bit = 2
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[1] info
+key_part->offset = 5
+key_part->field_name = b
+key_part->length = 4
+key_part->null_bit = 4
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[2] info
+key_part->offset = 9
+key_part->field_name = c
+key_part->length = 4
+key_part->null_bit = 8
+key_part->null_offset = 0
+
+Printing table->fields
+
+table->field[0]->field_name a
+table->field[0]->offset = 1
+table->field[0]->field_length = 4
+table->field[0]->null_pos wrt to record 0 = 0
+table->field[0]->null_bit_pos = 2
+
+table->field[1]->field_name b
+table->field[1]->offset = 5
+table->field[1]->field_length = 4
+table->field[1]->null_pos wrt to record 0 = 0
+table->field[1]->null_bit_pos = 4
+
+table->field[2]->field_name c
+table->field[2]->offset = 9
+table->field[2]->field_length = 4
+table->field[2]->null_pos wrt to record 0 = 0
+table->field[2]->null_bit_pos = 8
+
+table->field[3]->field_name DB_ROW_HASH_1
+table->field[3]->offset = 13
+table->field[3]->field_length = 8
+table->field[3]->null_pos wrt to record 0 = 0
+table->field[3]->null_bit_pos = 16
+
+SET debug_dbug="";
+drop table t1;
+##Using hash but with memory engine so no long unique column
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1(a int ,b int , c int, unique(a, b, c) using hash) engine=memory;
+Warnings:
+Note 1 Printing Table state, It will print table fields, fields->offset,field->null_bit, field->null_pos and key_info ...
+
+Printing Table keyinfo
+
+table->s->reclength 13
+table->s->fields 3
+
+table->key_info[0] user_defined_key_parts = 3
+table->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 0
+table->key_info[0] flags & HA_NOSAME = 1
+
+table->s->key_info[0] user_defined_key_parts = 3
+table->s->key_info[0] algorithm == HA_KEY_ALG_LONG_HASH = 0
+table->s->key_info[0] flags & HA_NOSAME = 1
+
+Printing table->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 4
+key_part->null_bit = 2
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[0] info
+key_part->offset = 1
+key_part->field_name = a
+key_part->length = 4
+key_part->null_bit = 2
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[1] info
+key_part->offset = 5
+key_part->field_name = b
+key_part->length = 4
+key_part->null_bit = 4
+key_part->null_offset = 0
+
+Printing share->key_info[0].key_part[2] info
+key_part->offset = 9
+key_part->field_name = c
+key_part->length = 4
+key_part->null_bit = 8
+key_part->null_offset = 0
+
+Printing table->fields
+
+table->field[0]->field_name a
+table->field[0]->offset = 1
+table->field[0]->field_length = 4
+table->field[0]->null_pos wrt to record 0 = 0
+table->field[0]->null_bit_pos = 2
+
+table->field[1]->field_name b
+table->field[1]->offset = 5
+table->field[1]->field_length = 4
+table->field[1]->null_pos wrt to record 0 = 0
+table->field[1]->null_bit_pos = 4
+
+table->field[2]->field_name c
+table->field[2]->offset = 9
+table->field[2]->field_length = 4
+table->field[2]->null_pos wrt to record 0 = 0
+table->field[2]->null_bit_pos = 8
+
+SET debug_dbug="";
+drop table t1;
diff --git a/mysql-test/main/long_unique_debug.test b/mysql-test/main/long_unique_debug.test
new file mode 100644
index 00000000000..560f6499be6
--- /dev/null
+++ b/mysql-test/main/long_unique_debug.test
@@ -0,0 +1,95 @@
+--source include/have_debug.inc
+
+#
+# MDEV-371 Unique indexes for blobs
+#
+
+--echo #In this test case we will check what will happen in the case of hash collision
+
+SET debug_dbug="d,same_long_unique_hash";
+create table t1(a blob unique);
+
+FLUSH STATUS;
+insert into t1 values('xyz');
+insert into t1 values('abc');
+insert into t1 values('sachin');
+--error ER_DUP_ENTRY
+insert into t1 values('sachin');
+insert into t1 values('maria');
+--error ER_DUP_ENTRY
+insert into t1 values('maria');
+drop table t1;
+SHOW STATUS LIKE 'handler_read_next';
+
+SET debug_dbug="";
+create table t1(a blob unique);
+FLUSH STATUS;
+
+insert into t1 values('xyz');
+insert into t1 values('abc');
+insert into t1 values('sachin');
+--error ER_DUP_ENTRY
+insert into t1 values('sachin');
+insert into t1 values('maria');
+--error ER_DUP_ENTRY
+insert into t1 values('maria');
+drop table t1;
+SHOW STATUS LIKE 'handler_read_next';
+
+SET debug_dbug="d,same_long_unique_hash";
+create table t1(a blob unique, b blob unique);
+
+insert into t1 values('xyz', 11);
+insert into t1 values('abc', 22);
+insert into t1 values('sachin', 1);
+--error ER_DUP_ENTRY
+insert into t1 values('sachin', 4);
+insert into t1 values('maria', 2);
+--error ER_DUP_ENTRY
+insert into t1 values('maria', 3);
+drop table t1;
+
+create table t1(a blob , b blob , unique(a,b));
+
+insert into t1 values('xyz', 11);
+insert into t1 values('abc', 22);
+insert into t1 values('sachin', 1);
+--error ER_DUP_ENTRY
+insert into t1 values('sachin', 1);
+insert into t1 values('maria', 2);
+--error ER_DUP_ENTRY
+insert into t1 values('maria', 2);
+drop table t1;
+
+--echo ##Internal State of long unique tables
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1 ( a blob unique);
+SET debug_dbug="";
+drop table t1;
+
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1 ( a blob unique, b blob unique , c blob unique);
+SET debug_dbug="";
+drop table t1;
+
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1 ( a blob , b blob , c blob , d blob , unique (a,b), unique(c, d));
+SET debug_dbug="";
+drop table t1;
+
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1(a int primary key, b blob unique , c blob unique not null);
+SET debug_dbug="";
+drop table t1;
+
+--echo ##Using hash
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1(a int ,b int , c int, unique(a, b, c) using hash);
+SET debug_dbug="";
+drop table t1;
+
+--echo ##Using hash but with memory engine so no long unique column
+SET debug_dbug="d,print_long_unique_internal_state";
+create table t1(a int ,b int , c int, unique(a, b, c) using hash) engine=memory;
+SET debug_dbug="";
+drop table t1;
diff --git a/mysql-test/main/long_unique_innodb.opt b/mysql-test/main/long_unique_innodb.opt
new file mode 100644
index 00000000000..058a129cdc2
--- /dev/null
+++ b/mysql-test/main/long_unique_innodb.opt
@@ -0,0 +1 @@
+--innodb-page-size=8K
diff --git a/mysql-test/main/long_unique_innodb.result b/mysql-test/main/long_unique_innodb.result
new file mode 100644
index 00000000000..96e5fac7310
--- /dev/null
+++ b/mysql-test/main/long_unique_innodb.result
@@ -0,0 +1,136 @@
+create table t1(a blob unique) engine= InnoDB;
+insert into t1 values('RUC');
+insert into t1 values ('RUC');
+ERROR 23000: Duplicate entry 'RUC' for key 'a'
+drop table t1;
+create table t1 (a blob unique , c int unique) engine=innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ `c` int(11) DEFAULT NULL,
+ UNIQUE KEY `c` (`c`),
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+#test for concurrent insert of long unique in innodb
+create table t1(a blob unique) engine= InnoDB;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob DEFAULT NULL,
+ UNIQUE KEY `a` (`a`) USING HASH
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+connect 'con1', localhost, root,,;
+connect 'con2', localhost, root,,;
+connection con1;
+set innodb_lock_wait_timeout= 2;
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+insert into t1 values('RUC');
+connection con2;
+set innodb_lock_wait_timeout= 2;
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+insert into t1 values ('RUC');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con1;
+commit;
+set transaction isolation level READ COMMITTED;
+start transaction;
+insert into t1 values('RC');
+connection con2;
+commit;
+set transaction isolation level READ COMMITTED;
+start transaction;
+insert into t1 values ('RC');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+commit;
+connection con1;
+commit;
+set transaction isolation level REPEATABLE READ;
+start transaction;
+insert into t1 values('RR');
+connection con2;
+commit;
+set transaction isolation level REPEATABLE READ;
+start transaction;
+insert into t1 values ('RR');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con1;
+commit;
+set transaction isolation level SERIALIZABLE;
+start transaction;
+insert into t1 values('S');
+connection con2;
+commit;
+set transaction isolation level SERIALIZABLE;
+start transaction;
+insert into t1 values ('S');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+commit;
+connection con1;
+commit;
+select * from t1;
+a
+RUC
+RC
+RR
+S
+drop table t1;
+create table t1(a blob unique) engine=Innodb;
+connection con1;
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+insert into t1 values('RUC');
+connection con2;
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+insert into t1 values ('RUC');;
+connection con1;
+rollback;
+connection con2;
+commit;
+connection con1;
+set transaction isolation level READ COMMITTED;
+start transaction;
+insert into t1 values('RC');
+connection con2;
+set transaction isolation level READ COMMITTED;
+start transaction;
+insert into t1 values ('RC');;
+connection con1;
+rollback;
+connection con2;
+commit;
+connection con1;
+set transaction isolation level REPEATABLE READ;
+start transaction;
+insert into t1 values('RR');
+connection con2;
+set transaction isolation level REPEATABLE READ;
+start transaction;
+insert into t1 values ('RR');;
+connection con1;
+rollback;
+connection con2;
+commit;
+connection con1;
+set transaction isolation level SERIALIZABLE;
+start transaction;
+insert into t1 values('S');
+connection con2;
+set transaction isolation level SERIALIZABLE;
+start transaction;
+insert into t1 values ('S');;
+connection con1;
+rollback;
+connection con2;
+commit;
+connection default;
+drop table t1;
+disconnect con1;
+disconnect con2;
+# MDEV-20131 Assertion `!pk->has_virtual()' failed
+create table t1 (a text, primary key(a(1871))) engine=innodb;
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
diff --git a/mysql-test/main/long_unique_innodb.test b/mysql-test/main/long_unique_innodb.test
new file mode 100644
index 00000000000..dd2d9f94de3
--- /dev/null
+++ b/mysql-test/main/long_unique_innodb.test
@@ -0,0 +1,145 @@
+--source include/have_innodb.inc
+
+#
+# MDEV-371 Unique indexes for blobs
+#
+
+create table t1(a blob unique) engine= InnoDB;
+insert into t1 values('RUC');
+--error ER_DUP_ENTRY
+insert into t1 values ('RUC');
+drop table t1;
+
+create table t1 (a blob unique , c int unique) engine=innodb;
+show create table t1;
+drop table t1;
+
+--echo #test for concurrent insert of long unique in innodb
+create table t1(a blob unique) engine= InnoDB;
+show create table t1;
+connect ('con1', localhost, root,,);
+connect ('con2', localhost, root,,);
+
+--connection con1
+set innodb_lock_wait_timeout= 2;
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+insert into t1 values('RUC');
+--connection con2
+set innodb_lock_wait_timeout= 2;
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+--error ER_LOCK_WAIT_TIMEOUT
+insert into t1 values ('RUC');
+
+--connection con1
+commit;
+set transaction isolation level READ COMMITTED;
+start transaction;
+insert into t1 values('RC');
+--connection con2
+commit;
+set transaction isolation level READ COMMITTED;
+start transaction;
+--error ER_LOCK_WAIT_TIMEOUT
+insert into t1 values ('RC');
+commit;
+
+--connection con1
+commit;
+set transaction isolation level REPEATABLE READ;
+start transaction;
+insert into t1 values('RR');
+--connection con2
+commit;
+set transaction isolation level REPEATABLE READ;
+start transaction;
+--error ER_LOCK_WAIT_TIMEOUT
+insert into t1 values ('RR');
+
+--connection con1
+commit;
+set transaction isolation level SERIALIZABLE;
+start transaction;
+insert into t1 values('S');
+--connection con2
+commit;
+set transaction isolation level SERIALIZABLE;
+start transaction;
+--error ER_LOCK_WAIT_TIMEOUT
+insert into t1 values ('S');
+commit;
+
+--connection con1
+commit;
+
+select * from t1;
+drop table t1;
+
+create table t1(a blob unique) engine=Innodb;
+
+--connection con1
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+insert into t1 values('RUC');
+--connection con2
+set transaction isolation level READ UNCOMMITTED;
+start transaction;
+--send insert into t1 values ('RUC');
+--connection con1
+rollback;
+--connection con2
+--reap
+commit;
+
+--connection con1
+set transaction isolation level READ COMMITTED;
+start transaction;
+insert into t1 values('RC');
+--connection con2
+set transaction isolation level READ COMMITTED;
+start transaction;
+--send insert into t1 values ('RC');
+--connection con1
+rollback;
+--connection con2
+--reap
+commit;
+
+--connection con1
+set transaction isolation level REPEATABLE READ;
+start transaction;
+insert into t1 values('RR');
+--connection con2
+set transaction isolation level REPEATABLE READ;
+start transaction;
+--send insert into t1 values ('RR');
+--connection con1
+rollback;
+--connection con2
+--reap
+commit;
+
+--connection con1
+set transaction isolation level SERIALIZABLE;
+start transaction;
+insert into t1 values('S');
+--connection con2
+set transaction isolation level SERIALIZABLE;
+start transaction;
+--send insert into t1 values ('S');
+--connection con1
+rollback;
+--connection con2
+--reap
+commit;
+
+connection default;
+drop table t1;
+disconnect con1;
+disconnect con2;
+
+--echo # MDEV-20131 Assertion `!pk->has_virtual()' failed
+
+--error ER_TOO_LONG_KEY
+create table t1 (a text, primary key(a(1871))) engine=innodb;
diff --git a/mysql-test/main/long_unique_update.result b/mysql-test/main/long_unique_update.result
new file mode 100644
index 00000000000..b508583f47c
--- /dev/null
+++ b/mysql-test/main/long_unique_update.result
@@ -0,0 +1,317 @@
+#structure of tests;
+#1 test of table containing single unique blob column;
+#2 test of table containing another unique int/ varchar etc column;
+#3 test of table containing multiple unique blob column like unique(a),unique(b);
+#4 test of table containing multiple multiple unique blob column like unique(a,b...),unique(c,d....);
+#structure of each test;
+#test if update works;
+#test update for duplicate entry;
+#test update for no change keys;
+#test update for ignore ;
+#test 1
+create table t1 (a blob unique);
+show keys from t1;
+Table t1
+Non_unique 0
+Key_name a
+Seq_in_index 1
+Column_name a
+Collation A
+Cardinality NULL
+Sub_part NULL
+Packed NULL
+Null YES
+Index_type HASH
+Comment
+Index_comment
+insert into t1 values(1),(2),(3),(4),(5);
+select * from t1;
+a
+1
+2
+3
+4
+5
+update t1 set a=11 where a=5;
+update t1 set a=a+20 where a=1;
+select * from t1;
+a
+21
+2
+3
+4
+11
+update t1 set a=3 where a=2;
+ERROR 23000: Duplicate entry '3' for key 'a'
+update t1 set a=4 where a=3;
+ERROR 23000: Duplicate entry '4' for key 'a'
+#no change in blob key
+update t1 set a=3 where a=3;
+update t1 set a=2 where a=2;
+select* from t1;
+a
+21
+2
+3
+4
+11
+#IGNORE;
+update ignore t1 set a=3 where a=2;
+update ignore t1 set a=4 where a=3;
+select * from t1;
+a
+21
+2
+3
+4
+11
+drop table t1;
+#test 2;
+create table t1 (a int primary key, b blob unique , c int unique );
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 PRIMARY 1 a A 0 NULL NULL BTREE
+t1 0 c 1 c A NULL NULL NULL YES BTREE
+t1 0 b 1 b A NULL NULL NULL YES HASH
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+select * from t1 limit 3;
+a b c
+1 1 1
+2 2 2
+3 3 3
+update t1 set b=34 where a=1;
+update t1 set b=a+c+b+34 where b=2;
+update t1 set b=a+10+b where c=3;
+select * from t1;
+a b c
+1 34 1
+2 40 2
+3 16 3
+4 4 4
+5 5 5
+6 6 6
+7 7 7
+truncate table t1;
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+update t1 set b=4 where a=3;
+ERROR 23000: Duplicate entry '4' for key 'b'
+update t1 set b=a+1 where b=3;
+ERROR 23000: Duplicate entry '4' for key 'b'
+update t1 set b=a+1 where c=3;
+ERROR 23000: Duplicate entry '4' for key 'b'
+#no change in blob key
+update t1 set b=3 where a=3;
+update t1 set b=2 where b=2;
+update t1 set b=5 where c=5;
+select* from t1;
+a b c
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+5 5 5
+6 6 6
+7 7 7
+#IGNORE;
+update ignore t1 set b=3 where a=2;
+update ignore t1 set b=4 where b=3;
+update ignore t1 set b=5 where c=3;
+select * from t1;
+a b c
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+5 5 5
+6 6 6
+7 7 7
+drop table t1;
+#test 3;
+create table t1 (a blob unique, b blob unique , c blob unique);
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 c 1 c A NULL NULL NULL YES HASH
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+select * from t1 limit 3;
+a b c
+1 1 1
+2 2 2
+3 3 3
+update t1 set b=34 where a=1;
+update t1 set b=a+c+b+34 where b=2;
+update t1 set b=a+10+b where c=3;
+select * from t1;
+a b c
+1 34 1
+2 40 2
+3 16 3
+4 4 4
+5 5 5
+6 6 6
+7 7 7
+truncate table t1;
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+update t1 set b=4 where a=3;
+ERROR 23000: Duplicate entry '4' for key 'b'
+update t1 set b=a+1 where b=3;
+ERROR 23000: Duplicate entry '4' for key 'b'
+update t1 set b=a+1 where c=3;
+ERROR 23000: Duplicate entry '4' for key 'b'
+#no change in blob key
+update t1 set b=3 where a=3;
+update t1 set b=2 where b=2;
+update t1 set b=5 where c=5;
+select* from t1;
+a b c
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+5 5 5
+6 6 6
+7 7 7
+#IGNORE;
+update ignore t1 set b=3 where a=2;
+update ignore t1 set b=4 where b=3;
+update ignore t1 set b=5 where c=3;
+update ignore t1 set b=b+3 where a>1 or b>1 or c>1;
+select * from t1;
+a b c
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+5 8 5
+6 9 6
+7 10 7
+update ignore t1 set b=b+5 where a>1 and b<5 and c<a+b;
+select * from t1;
+a b c
+1 1 1
+2 7 2
+3 3 3
+4 4 4
+5 8 5
+6 9 6
+7 10 7
+drop table t1;
+#test 4 ultimate test;
+create table t1 (a int primary key , b int, c blob , d blob , e varchar(2000), f int , g text,
+unique (b,c), unique (b,f),unique(e,g),unique(a,b,c,d,e,f,g));
+desc t1;
+Field Type Null Key Default Extra
+a int(11) NO PRI NULL
+b int(11) YES MUL NULL
+c blob YES NULL
+d blob YES NULL
+e varchar(2000) YES MUL NULL
+f int(11) YES NULL
+g text YES NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` varchar(2000) DEFAULT NULL,
+ `f` int(11) DEFAULT NULL,
+ `g` text DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ UNIQUE KEY `b_2` (`b`,`f`),
+ UNIQUE KEY `b` (`b`,`c`) USING HASH,
+ UNIQUE KEY `e` (`e`,`g`) USING HASH,
+ UNIQUE KEY `a` (`a`,`b`,`c`,`d`,`e`,`f`,`g`) USING HASH
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 PRIMARY 1 a A 0 NULL NULL BTREE
+t1 0 b_2 1 b A NULL NULL NULL YES BTREE
+t1 0 b_2 2 f A NULL NULL NULL YES BTREE
+t1 0 b 1 b A NULL NULL NULL YES HASH
+t1 0 b 2 c A NULL NULL NULL YES HASH
+t1 0 e 1 e A NULL NULL NULL YES HASH
+t1 0 e 2 g A NULL NULL NULL YES HASH
+t1 0 a 1 a A NULL NULL NULL HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+t1 0 a 4 d A NULL NULL NULL YES HASH
+t1 0 a 5 e A NULL NULL NULL YES HASH
+t1 0 a 6 f A NULL NULL NULL YES HASH
+t1 0 a 7 g A NULL NULL NULL YES HASH
+insert into t1 values(1,1,1,1,1,1,1),(2,2,2,2,2,2,2),(3,3,3,3,3,3,3),(4,4,4,4,4,4,4),
+(5,5,5,5,5,5,5),(6,6,6,6,6,6,6),(7,7,7,7,7,7,7),(8,8,8,8,8,8,8),(9,9,9,9,9,9,9);
+select * from t1 limit 3;
+a b c d e f g
+1 1 1 1 1 1 1
+2 2 2 2 2 2 2
+3 3 3 3 3 3 3
+#key b_c
+update t1 set b=2 ,c=2 where a=1;
+ERROR 23000: Duplicate entry '2-2' for key 'b'
+update t1 set b=b+34, c=c+34 where e=1 and g=1 ;
+update t1 set b=35, c=35 where e=1 and g=1 ;
+update t1 set b=b+1, c=c+1 where a>0;
+ERROR 23000: Duplicate entry '3-3' for key 'b'
+update ignore t1 set b=b+1, c=c+1 where a>0;
+select * from t1 ;
+a b c d e f g
+1 37 37 1 1 1 1
+2 2 2 2 2 2 2
+3 3 3 3 3 3 3
+4 4 4 4 4 4 4
+5 5 5 5 5 5 5
+6 6 6 6 6 6 6
+7 7 7 7 7 7 7
+8 8 8 8 8 8 8
+9 10 10 9 9 9 9
+truncate table t1;
+insert into t1 values(1,1,1,1,1,1,1),(2,2,2,2,2,2,2),(3,3,3,3,3,3,3),(4,4,4,4,4,4,4),
+(5,5,5,5,5,5,5),(6,6,6,6,6,6,6),(7,7,7,7,7,7,7),(8,8,8,8,8,8,8),(9,9,9,9,9,9,9);
+#key b_f no hash key
+update t1 set b=2 , f=2 where a=1;
+ERROR 23000: Duplicate entry '2-2' for key 'b_2'
+update t1 set b=b+33, f=f+33 where e=1 and g=1;
+update t1 set b=34, f=34 where e=1 and g=1 ;
+update t1 set b=b+1, f=f+1 where a>0;
+ERROR 23000: Duplicate entry '3-3' for key 'b_2'
+update ignore t1 set b=b+1, f=f+1 where a>0;
+select * from t1 ;
+a b c d e f g
+1 36 1 1 1 36 1
+2 2 2 2 2 2 2
+3 3 3 3 3 3 3
+4 4 4 4 4 4 4
+5 5 5 5 5 5 5
+6 6 6 6 6 6 6
+7 7 7 7 7 7 7
+8 8 8 8 8 8 8
+9 10 9 9 9 10 9
+truncate table t1;
+insert into t1 values(1,1,1,1,1,1,1),(2,2,2,2,2,2,2),(3,3,3,3,3,3,3),(4,4,4,4,4,4,4),
+(5,5,5,5,5,5,5),(6,6,6,6,6,6,6),(7,7,7,7,7,7,7),(8,8,8,8,8,8,8),(9,9,9,9,9,9,9);
+#key e_g
+update t1 set e=2 , g=2 where a=1;
+ERROR 23000: Duplicate entry '2-2' for key 'e'
+update t1 set e=e+34, g=g+34 where a=1;
+update t1 set e=34, g=34 where e=1 and g=1 ;
+select * from t1 where a=1;
+a b c d e f g
+1 1 1 1 35 1 35
+update t1 set e=e+1, g=g+1 where a>0;
+ERROR 23000: Duplicate entry '3-3' for key 'e'
+update ignore t1 set e=e+1, g=g+1 where a>0;
+select * from t1 ;
+a b c d e f g
+1 1 1 1 37 1 37
+2 2 2 2 2 2 2
+3 3 3 3 3 3 3
+4 4 4 4 4 4 4
+5 5 5 5 5 5 5
+6 6 6 6 6 6 6
+7 7 7 7 7 7 7
+8 8 8 8 8 8 8
+9 9 9 9 10 9 10
+drop table t1;
diff --git a/mysql-test/main/long_unique_update.test b/mysql-test/main/long_unique_update.test
new file mode 100644
index 00000000000..98c3aaefe17
--- /dev/null
+++ b/mysql-test/main/long_unique_update.test
@@ -0,0 +1,141 @@
+#
+# MDEV-371 Unique indexes for blobs
+#
+--echo #structure of tests;
+--echo #1 test of table containing single unique blob column;
+--echo #2 test of table containing another unique int/ varchar etc column;
+--echo #3 test of table containing multiple unique blob column like unique(a),unique(b);
+--echo #4 test of table containing multiple multiple unique blob column like unique(a,b...),unique(c,d....);
+--echo #structure of each test;
+--echo #test if update works;
+--echo #test update for duplicate entry;
+--echo #test update for no change keys;
+--echo #test update for ignore ;
+
+--echo #test 1
+create table t1 (a blob unique);
+query_vertical show keys from t1;
+insert into t1 values(1),(2),(3),(4),(5);
+select * from t1;
+update t1 set a=11 where a=5;
+update t1 set a=a+20 where a=1;
+select * from t1;
+--error ER_DUP_ENTRY
+update t1 set a=3 where a=2;
+--error ER_DUP_ENTRY
+update t1 set a=4 where a=3;
+--echo #no change in blob key
+update t1 set a=3 where a=3;
+update t1 set a=2 where a=2;
+select* from t1;
+--echo #IGNORE;
+update ignore t1 set a=3 where a=2;
+update ignore t1 set a=4 where a=3;
+select * from t1;
+drop table t1;
+
+--echo #test 2;
+create table t1 (a int primary key, b blob unique , c int unique );
+show keys from t1;
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+select * from t1 limit 3;
+update t1 set b=34 where a=1;
+update t1 set b=a+c+b+34 where b=2;
+update t1 set b=a+10+b where c=3;
+select * from t1;
+truncate table t1;
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+--error ER_DUP_ENTRY
+update t1 set b=4 where a=3;
+--error ER_DUP_ENTRY
+update t1 set b=a+1 where b=3;
+--error ER_DUP_ENTRY
+update t1 set b=a+1 where c=3;
+--echo #no change in blob key
+update t1 set b=3 where a=3;
+update t1 set b=2 where b=2;
+update t1 set b=5 where c=5;
+select* from t1;
+--echo #IGNORE;
+update ignore t1 set b=3 where a=2;
+update ignore t1 set b=4 where b=3;
+update ignore t1 set b=5 where c=3;
+select * from t1;
+drop table t1;
+
+--echo #test 3;
+create table t1 (a blob unique, b blob unique , c blob unique);
+show keys from t1;
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+select * from t1 limit 3;
+update t1 set b=34 where a=1;
+update t1 set b=a+c+b+34 where b=2;
+update t1 set b=a+10+b where c=3;
+select * from t1;
+truncate table t1;
+insert into t1 values(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7);
+--error ER_DUP_ENTRY
+update t1 set b=4 where a=3;
+--error ER_DUP_ENTRY
+update t1 set b=a+1 where b=3;
+--error ER_DUP_ENTRY
+update t1 set b=a+1 where c=3;
+--echo #no change in blob key
+update t1 set b=3 where a=3;
+update t1 set b=2 where b=2;
+update t1 set b=5 where c=5;
+select* from t1;
+--echo #IGNORE;
+update ignore t1 set b=3 where a=2;
+update ignore t1 set b=4 where b=3;
+update ignore t1 set b=5 where c=3;
+update ignore t1 set b=b+3 where a>1 or b>1 or c>1;
+select * from t1;
+update ignore t1 set b=b+5 where a>1 and b<5 and c<a+b;
+select * from t1;
+drop table t1;
+
+--echo #test 4 ultimate test;
+create table t1 (a int primary key , b int, c blob , d blob , e varchar(2000), f int , g text,
+unique (b,c), unique (b,f),unique(e,g),unique(a,b,c,d,e,f,g));
+desc t1;
+show create table t1;
+show keys from t1;
+insert into t1 values(1,1,1,1,1,1,1),(2,2,2,2,2,2,2),(3,3,3,3,3,3,3),(4,4,4,4,4,4,4),
+(5,5,5,5,5,5,5),(6,6,6,6,6,6,6),(7,7,7,7,7,7,7),(8,8,8,8,8,8,8),(9,9,9,9,9,9,9);
+select * from t1 limit 3;
+--echo #key b_c
+--error ER_DUP_ENTRY
+update t1 set b=2 ,c=2 where a=1;
+update t1 set b=b+34, c=c+34 where e=1 and g=1 ;
+update t1 set b=35, c=35 where e=1 and g=1 ;
+--error ER_DUP_ENTRY
+update t1 set b=b+1, c=c+1 where a>0;
+update ignore t1 set b=b+1, c=c+1 where a>0;
+select * from t1 ;
+truncate table t1;
+insert into t1 values(1,1,1,1,1,1,1),(2,2,2,2,2,2,2),(3,3,3,3,3,3,3),(4,4,4,4,4,4,4),
+(5,5,5,5,5,5,5),(6,6,6,6,6,6,6),(7,7,7,7,7,7,7),(8,8,8,8,8,8,8),(9,9,9,9,9,9,9);
+--echo #key b_f no hash key
+--error ER_DUP_ENTRY
+update t1 set b=2 , f=2 where a=1;
+update t1 set b=b+33, f=f+33 where e=1 and g=1;
+update t1 set b=34, f=34 where e=1 and g=1 ;
+--error ER_DUP_ENTRY
+update t1 set b=b+1, f=f+1 where a>0;
+update ignore t1 set b=b+1, f=f+1 where a>0;
+select * from t1 ;
+truncate table t1;
+insert into t1 values(1,1,1,1,1,1,1),(2,2,2,2,2,2,2),(3,3,3,3,3,3,3),(4,4,4,4,4,4,4),
+(5,5,5,5,5,5,5),(6,6,6,6,6,6,6),(7,7,7,7,7,7,7),(8,8,8,8,8,8,8),(9,9,9,9,9,9,9);
+--echo #key e_g
+--error ER_DUP_ENTRY
+update t1 set e=2 , g=2 where a=1;
+update t1 set e=e+34, g=g+34 where a=1;
+update t1 set e=34, g=34 where e=1 and g=1 ;
+select * from t1 where a=1;
+--error ER_DUP_ENTRY
+update t1 set e=e+1, g=g+1 where a>0;
+update ignore t1 set e=e+1, g=g+1 where a>0;
+select * from t1 ;
+drop table t1;
diff --git a/mysql-test/main/long_unique_using_hash.result b/mysql-test/main/long_unique_using_hash.result
new file mode 100644
index 00000000000..987e11294ec
--- /dev/null
+++ b/mysql-test/main/long_unique_using_hash.result
@@ -0,0 +1,54 @@
+create table t1(a blob , unique(a) using hash);
+show keys from t1;;
+Table t1
+Non_unique 0
+Key_name a
+Seq_in_index 1
+Column_name a
+Collation A
+Cardinality NULL
+Sub_part NULL
+Packed NULL
+Null YES
+Index_type HASH
+Comment
+Index_comment
+drop table t1;
+create table t1(a blob , unique(a) using btree);
+ERROR 42000: Specified key was too long; max key length is 1000 bytes
+create table t1(a int , unique(a) using hash);
+show keys from t1;;
+Table t1
+Non_unique 0
+Key_name a
+Seq_in_index 1
+Column_name a
+Collation A
+Cardinality NULL
+Sub_part NULL
+Packed NULL
+Null YES
+Index_type HASH
+Comment
+Index_comment
+drop table t1;
+create table t1(a int ,b int , c int, unique(a, b, c) using hash);
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a A NULL NULL NULL YES HASH
+t1 0 a 2 b A NULL NULL NULL YES HASH
+t1 0 a 3 c A NULL NULL NULL YES HASH
+insert into t1 values(1,1,1);
+insert into t1 values(1,1,1);
+ERROR 23000: Duplicate entry '1-1-1' for key 'a'
+drop table t1;
+create table t1(a int ,b int , c int, unique(a, b, c) using hash) engine=memory;
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+t1 0 a 1 a NULL NULL NULL NULL YES HASH
+t1 0 a 2 b NULL NULL NULL NULL YES HASH
+t1 0 a 3 c NULL 0 NULL NULL YES HASH
+insert into t1 values(1,1,1);
+insert into t1 values(1,1,1);
+ERROR 23000: Duplicate entry '1-1-1' for key 'a'
+drop table t1;
diff --git a/mysql-test/main/long_unique_using_hash.test b/mysql-test/main/long_unique_using_hash.test
new file mode 100644
index 00000000000..1e19cd66b02
--- /dev/null
+++ b/mysql-test/main/long_unique_using_hash.test
@@ -0,0 +1,28 @@
+#
+# MDEV-371 Unique indexes for blobs
+#
+
+create table t1(a blob , unique(a) using hash);
+--query_vertical show keys from t1;
+drop table t1;
+
+--error ER_TOO_LONG_KEY
+create table t1(a blob , unique(a) using btree);
+
+create table t1(a int , unique(a) using hash);
+--query_vertical show keys from t1;
+drop table t1;
+
+create table t1(a int ,b int , c int, unique(a, b, c) using hash);
+show keys from t1;
+insert into t1 values(1,1,1);
+--error ER_DUP_ENTRY
+insert into t1 values(1,1,1);
+drop table t1;
+
+create table t1(a int ,b int , c int, unique(a, b, c) using hash) engine=memory;
+show keys from t1;
+insert into t1 values(1,1,1);
+--error ER_DUP_ENTRY
+insert into t1 values(1,1,1);
+drop table t1;
diff --git a/mysql-test/main/lowercase_fs_off.result b/mysql-test/main/lowercase_fs_off.result
index 3f0b08a78c4..3e9aa7cc239 100644
--- a/mysql-test/main/lowercase_fs_off.result
+++ b/mysql-test/main/lowercase_fs_off.result
@@ -94,12 +94,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats
Error : Unknown storage engine 'InnoDB'
@@ -123,7 +123,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -137,6 +136,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/lowercase_fs_off.test b/mysql-test/main/lowercase_fs_off.test
index f2e5dafd9d4..e8e8dafe584 100644
--- a/mysql-test/main/lowercase_fs_off.test
+++ b/mysql-test/main/lowercase_fs_off.test
@@ -48,6 +48,7 @@ select * from T1;
connection default;
GRANT SELECT ON t1 to user_1@localhost;
connection con1;
+--sorted_result
select * from information_schema.table_privileges;
connection default;
disconnect con1;
diff --git a/mysql-test/main/max_password_errors.result b/mysql-test/main/max_password_errors.result
new file mode 100644
index 00000000000..020761b4f2e
--- /dev/null
+++ b/mysql-test/main/max_password_errors.result
@@ -0,0 +1,45 @@
+set @old_max_password_errors=@@max_password_errors;
+set global max_password_errors=2;
+create user u identified by 'good_pass';
+connect(localhost,u,bas_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bas_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect(localhost,u,good_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, good_pass;
+ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
+FLUSH PRIVILEGES;
+connect con1, localhost, u, good_pass;
+disconnect con1;
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect con1, localhost, u, good_pass;
+disconnect con1;
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect con1, localhost, u, good_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
+disconnect con1;
+connection default;
+FLUSH PRIVILEGES;
+connect(localhost,root,bas_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, root, bas_pass;
+ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
+connect(localhost,root,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, root, bad_pass;
+ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
+connect con1, localhost, u, good_pass;
+disconnect con1;
+connection default;
+DROP USER u;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/main/max_password_errors.test b/mysql-test/main/max_password_errors.test
new file mode 100644
index 00000000000..1debca0258d
--- /dev/null
+++ b/mysql-test/main/max_password_errors.test
@@ -0,0 +1,64 @@
+--source include/not_embedded.inc
+set @old_max_password_errors=@@max_password_errors;
+set global max_password_errors=2;
+create user u identified by 'good_pass';
+
+# Test that user is blocked after 'max_password_errors' bad passwords
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect(con1, localhost, u, bas_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, u, bad_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_USER_IS_BLOCKED;
+connect(con1, localhost, u, good_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_USER_IS_BLOCKED;
+connect(con1, localhost, u, bad_pass);
+
+
+# Test that FLUSH PRIVILEGES clears the error
+FLUSH PRIVILEGES;
+connect (con1, localhost, u, good_pass);
+disconnect con1;
+
+# Test that good login clears the error
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, u, bad_pass);
+connect (con1, localhost, u, good_pass);
+disconnect con1;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, u, bad_pass);
+connect (con1, localhost, u, good_pass);
+
+# Test the behavior of change_user
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+change_user u,bad_pass;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+change_user u,bad_pass;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_USER_IS_BLOCKED;
+change_user u,good_pass;
+disconnect con1;
+
+connection default;
+FLUSH PRIVILEGES;
+
+#Test that root@localhost is not blocked, with password errors
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect(con1, localhost, root, bas_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, root, bad_pass);
+connect (con1, localhost, u, good_pass);
+disconnect con1;
+connection default;
+DROP USER u;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors; \ No newline at end of file
diff --git a/mysql-test/main/mdev-25830.result b/mysql-test/main/mdev-25830.result
new file mode 100644
index 00000000000..e62d1ff3f55
--- /dev/null
+++ b/mysql-test/main/mdev-25830.result
@@ -0,0 +1,56 @@
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+set optimizer_use_condition_selectivity=1;
+analyze SELECT sysapproval_approver0.`sys_id`
+FROM ((sysapproval_approver sysapproval_approver0
+INNER JOIN task task1
+ON sysapproval_approver0.`sysapproval` = task1.`sys_id`
+ AND (( task1.`sys_domain_path` = '/'
+ OR task1.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task1.`sys_domain_path` LIKE '!!!/!!!/%' )))
+INNER JOIN task task2
+ON task1.`parent` = task2.`sys_id`
+ AND (( task2.`sys_domain_path` = '/'
+ OR task2.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task2.`sys_domain_path` LIKE '!!!/!!!/%' )))
+WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%'
+ AND ( sysapproval_approver0.`sys_domain_path` = '/'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!!/%' )
+ORDER BY sysapproval_approver0.`order`
+LIMIT 0, 50 ;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE task2 range PRIMARY,sys_class_name_2,sys_domain_path PRIMARY 96 NULL 1 0.00 100.00 100.00 Using where; Using temporary; Using filesort
+1 SIMPLE task1 ref PRIMARY,task_parent,sys_class_name_2,sys_domain_path task_parent 99 test.task2.sys_id 1 NULL 100.00 NULL Using index condition; Using where
+1 SIMPLE sysapproval_approver0 ref sysapproval_approver_ref5,sys_domain_path,sysapproval_approver_CHG1975376 sysapproval_approver_ref5 99 test.task1.sys_id 1 NULL 100.00 NULL Using index condition; Using where
+set optimizer_use_condition_selectivity=4;
+analyze SELECT sysapproval_approver0.`sys_id`
+FROM ((sysapproval_approver sysapproval_approver0
+INNER JOIN task task1
+ON sysapproval_approver0.`sysapproval` = task1.`sys_id`
+ AND (( task1.`sys_domain_path` = '/'
+ OR task1.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task1.`sys_domain_path` LIKE '!!!/!!!/%' )))
+INNER JOIN task task2
+ON task1.`parent` = task2.`sys_id`
+ AND (( task2.`sys_domain_path` = '/'
+ OR task2.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task2.`sys_domain_path` LIKE '!!!/!!!/%' )))
+WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%'
+ AND ( sysapproval_approver0.`sys_domain_path` = '/'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!!/%' )
+ORDER BY sysapproval_approver0.`order`
+LIMIT 0, 50 ;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE task2 range PRIMARY,sys_class_name_2,sys_domain_path PRIMARY 96 NULL 1 0.00 98.00 100.00 Using where; Using temporary; Using filesort
+1 SIMPLE task1 ref PRIMARY,task_parent,sys_class_name_2,sys_domain_path task_parent 99 test.task2.sys_id 1 NULL 100.00 NULL Using index condition; Using where
+1 SIMPLE sysapproval_approver0 ref sysapproval_approver_ref5,sys_domain_path,sysapproval_approver_CHG1975376 sysapproval_approver_ref5 99 test.task1.sys_id 1 NULL 100.00 NULL Using index condition; Using where
+drop table sysapproval_approver,task;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/mdev-25830.test b/mysql-test/main/mdev-25830.test
new file mode 100644
index 00000000000..5521d1fad85
--- /dev/null
+++ b/mysql-test/main/mdev-25830.test
@@ -0,0 +1,104 @@
+#
+# MDEV-25830: optimizer_use_condition_selectivity=4 sometimes produces worse plan than optimizer_use_condition_selectivity=1
+# https://jira.mariadb.org/browse/MDEV-25830
+#
+--source include/innodb_prefix_index_cluster_optimization.inc
+
+SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
+
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
+--disable_query_log
+--disable_result_log
+--disable_warnings
+
+DROP TABLE IF EXISTS `sysapproval_approver`;
+CREATE TABLE `sysapproval_approver` (
+ `order` int(11) DEFAULT NULL,
+ `sysapproval` varchar(32) DEFAULT NULL,
+ `sys_id` char(32) NOT NULL DEFAULT '',
+ `sys_domain_path` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`sys_id`),
+ KEY `sysapproval_approver_ref5` (`sysapproval`),
+ KEY `sys_domain_path` (`sys_domain_path`),
+ KEY `sysapproval_approver_CHG1975376` (`sys_domain_path`,`sysapproval`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `sysapproval_approver` VALUES (NULL,'c00004d787a8a5003fff83bdff434dea','000004d787a8a5003fff83bdff434dee','!!!/!!#/!!$/'),(NULL,NULL,'00000741db8bfb480be6a345ca96198e','!!!/!!#/!!$/'),(NULL,NULL,'00001605dbce48d0f7fca851ca961967','!!!/!!#/!!$/'),(NULL,'23b53105db2f324c5a4af85e0f96194e','000016c1db6ffa445d2f7aa31f9619a0','!!!/!!#/!!$/'),(NULL,NULL,'00001730dbe24890f7fca851ca9619aa','!!!/!!#/!!$/'),(NULL,NULL,'000017a01b127b00ada243f6fe4bcb8c','!!!/!!#/!!$/'),(NULL,'7f660139db6088185ed4a851ca961986','00001ab1dbecc8185ed4a851ca961970','!!!/!!#/!!$/'),(NULL,'6226cd801b19dc10a59033f2cd4bcb22','00001d84db9918505ed4a851ca96193f','!!!/!!!/(8]/'),(NULL,NULL,'00002246db83874002f17c541f961999','!!!/!!#/!!$/'),(NULL,NULL,'000026e01b9eb700ada243f6fe4bcbc5','!!!/!!#/!!$/'),(NULL,NULL,'000028e16f064e807b658e4c2c3ee4ae','!!!/!!#/!!$/'),(NULL,NULL,'00002914dba8670c54250b55ca961928','!!!/!!#/!!$/'),(NULL,NULL,'00002914dba8670c54250b55ca961931','!!!/!!#/!!$/'),(NULL,NULL,'00002914dba8670c54250b55ca96193a','!!!/!!#/!!$/'),(NULL,NULL,'00002914dba8670c54250b55ca961943','!!!/!!#/!!$/'),(NULL,NULL,'000030a4dbb90b40002af47e0f9619b1','!!!/!!#/!!$/'),(NULL,NULL,'000033fedb41fb041cd8a345ca9619fa','!!!/!!#/!!$/'),(NULL,NULL,'0000341ddb4ce3804ac3a851ca961916','!!!/!!#/!!$/'),(NULL,NULL,'0000393ddb709b002b6dfb651f961908','!!!/!!#/!!$/'),(NULL,'a81ca740db5cdc9416d2a345ca9619b3','00003b00dbdcdc9416d2a345ca961907','!!!/!!#/!!$/'),(NULL,'04003c88db5e3304d6a102d5ca961913','00003c88db5e3304d6a102d5ca96192a','!!!/!!#/!!$/'),(NULL,'4affb00cdbbf0f800e3dfb651f9619a0','0000450cdbbf0f800e3dfb651f961973','!!!/!!#/!!$/'),(NULL,NULL,'00005634dbd11fc4e9737a9e0f961988','!!!/!!#/!!$/'),(NULL,NULL,'00005634dbd11fc4e9737a9e0f9619ce','!!!/!!#/!!$/'),(NULL,NULL,'00005634dbd11fc4e9737a9e0f9619d7','!!!/!!#/!!$/'),(NULL,NULL,'00005784dbc49b00852c7a9e0f96198a','!!!/!!#/!!$/'),(NULL,NULL,'00005bc1dbcdd7042d1efb651f961978','!!!/!!#/!!$/'),(NULL,NULL,'0000637b6f37c24013568e4c2c3ee4d6','!!!/!!#/!!$/'),(NULL,'080069db0f858240a2c9982be1050eae','000069db0f858240a2c9982be1050eb2','!!!/!!#/!!$/'),(NULL,'f98e3bb21b155c10a59033f2cd4bcbef','00006c47db5d9010d82ffb24399619d8','!!!/!!!/#YZ/'),(NULL,NULL,'00006c50db6a0450d58ea345ca961972','!!!/!!#/!!$/'),(NULL,NULL,'00006e38dbc19304032a7a9e0f9619e4','!!!/!!#/!!$/'),(NULL,NULL,'00006edddbec8c5813b5fb24399619b9','!!!/!!#/!!$/'),(NULL,NULL,'000073fedb41fb041cd8a345ca961934','!!!/!!#/!!$/'),(NULL,NULL,'000073fedb41fb041cd8a345ca96195c','!!!/!!#/!!$/'),(NULL,'d03c6ee61b774410a59033f2cd4bcbf5','000076bfdbb74c981cd8a345ca9619ee','!!!/!!!/!;B/'),(NULL,NULL,'000076ecdbde48502be0a851ca9619dd','!!!/!!#/!!$/'),(NULL,NULL,'000076ecdbde48502be0a851ca9619fe','!!!/!!#/!!$/'),(NULL,NULL,'0000778d6fd01a4000270bae9f3ee4ff','!!!/!!#/!!$/'),(NULL,NULL,'000077c21b3fbb0cada243f6fe4bcba7','!!!/!!#/!!$/'),(NULL,NULL,'000077c21b3fbb0cada243f6fe4bcbcb','!!!/!!#/!!$/'),(NULL,'f6c5f2110f75de401c7e938172050e1b','000077e10f7d5e00e59b982be1050e62','!!!/!!#/!!$/'),(NULL,NULL,'00007fa76ff70a0000270bae9f3ee4b1','!!!/!!#/!!$/'),(NULL,'73ff6fe76f4761007ceff7307f3ee478','00007fe76f4761007ceff7307f3ee47c','!!!/!!#/!!$/'),(NULL,'a4d63f4bdb8fbf00414ed0c5ca96191d','0000881b1b8f7f00fff162c4bd4bcbe7','!!!/!!!/$)(/'),(NULL,'a4d63f4bdb8fbf00414ed0c5ca96191d','0000881b1b8f7f00fff162c4bd4bcbec','!!!/!!!/$)(/'),(NULL,NULL,'000094eb6f781a0099c5409e9f3ee48e','!!!/!!#/!!$/'),(NULL,NULL,'000094eb6f781a0099c5409e9f3ee493','!!!/!!#/!!$/'),(NULL,'401fb78cdb18d8dc1cd8a345ca9619c8','00009c10dbdc98dcfeb1a851ca96192f','!!!/!!!/$$8/'),(NULL,'9dd30a24db5c1cdc23f4a345ca96192b','00009e2cdb1c589c4819fb243996195c','!!!/!!#/!!$/');
+
+DROP TABLE IF EXISTS `task`;
+CREATE TABLE `task` (
+ `parent` varchar(32) DEFAULT NULL,
+ `sys_id` char(32) NOT NULL DEFAULT '',
+ `sys_domain_path` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`sys_id`),
+ KEY `task_parent` (`parent`),
+ KEY `sys_class_name_2` (`sys_domain_path`),
+ KEY `sys_domain_path` (`sys_domain_path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `task` VALUES (NULL,'-1','!!!/!!#/!!$/'),(NULL,'00000195dbe7f30413b5fb2439961936','!!!/!!#/!!$/'),(NULL,'0000032edb160f04d7e37aa31f961964','!!!/!!#/!!$/'),('a6fe0637dbddfb8c1cd8a345ca96196f','000003dcdb31f3c0a39a0b55ca961916','!!!/!!#/!!$/'),('2f1df65d6fca3100e7f68e4c2c3ee4e6','000004466f127d40e7f68e4c2c3ee4ce','!!!/!!#/!!$/'),('50dfb42edbbdd3403eb27a9e0f96199e','0000056edbbdd3403eb27a9e0f961995','!!!/!!!/+0{/'),('5f5af922dbb804d03bf6a851ca961999','000006eedb7c04d03bf6a851ca96190c','!!!/!!!/$9;/'),(NULL,'00000904db1dd45014d6fb24399619b7','!!!/!!#/!!$/'),('33c6e522db2c10104ac3a851ca9619f3','00000a06dbf0181416d2a345ca96197b','!!!/!!#/!!$/'),(NULL,'00000ccd6f9196041501f7307f3ee406','!!!/!!#/!!$/'),(NULL,'00000ee2dbb9bf4014d6fb24399619a7','!!!/!!#/!!$/'),(NULL,'00000f065bba40000a4de1945e425441','!!!/!!#/!!$/'),(NULL,'000013dedbc0bf00bbc40b55ca961959','!!!/!!!/,*7/'),(NULL,'000016bcdb29009cf7fca851ca961927','!!!/!!#/!!$/'),(NULL,'0000171bdbdb770066e0a345ca96195a','!!!/!!!/+N?/'),('8eb9317f1b895450d01143f6fe4bcb26','00001c80db5d509022e0fb24399619ed','!!!/!!!/0RG/'),(NULL,'00001d84dbf6f2405a4af85e0f9619f9','!!!/!!#/!!$/'),(NULL,'00001e31db25d4105ed4a851ca96195c','!!!/!!#/!!$/'),(NULL,'00001ea3db73c89823f4a345ca9619b5','!!!/!!#/!!$/'),('c3baf3fadb234c54d82ffb24399619e0','00001f4fdbab4c542be0a851ca96190c','!!!/!!#/!!$/'),(NULL,'0000221bdbb4b3c466e0a345ca9619f0','!!!/!!!/$^{/'),(NULL,'000022bcdb9c04d022e0fb24399619e1','!!!/!!#/!!$/'),('9b7152434f995a80f347524e0210c7e0','0000234b6f59de00fbd4409e9f3ee446','/'),('c64ed870145461009a1c80cd6740d192','00002434145461009a1c80cd6740d1e5','!!!/!!#/!!$/'),(NULL,'0000247edb84d7040e3dfb651f9619b2','!!!/!!#/!!$/'),(NULL,'000025f8dbb6ba007fc27c541f96195b','!!!/!!#/!!$/'),('9b691033485d95c0c5abf6bd15eef576','0000287348dd95c0c5abf6bd15eef572','!!!/!!#/!!$/'),('3c4f591edb7ce2406015f47e0f96191b','00002952dbbce2406015f47e0f961999','!!!/!!!/#MU/'),(NULL,'000029b0db6d5c104819fb24399619a8','!!!/!!#/!!$/'),(NULL,'00002a3d1b5f0010a59033f2cd4bcb90','!!!/!!!/&<#/'),(NULL,'00002a9fdb5787840e3dfb651f9619a6','!!!/!!#/!!$/'),(NULL,'00002c5adb5a0fc0d7e37aa31f9619ba','!!!/!!#/!!$/'),('fa753886dbd8181014d6fb2439961989','00002d5edbdc949466e0a345ca9619e4','!!!/!!!/$44/'),('56ff56bfdb469c503fa35583ca961987','00002e73db0a9c50364a5583ca961922','!!!/!!#/!!$/'),(NULL,'000031f6dba76b40c9c302d5ca9619c4','!!!/!!#/!!$/'),(NULL,'000036fadb1a0344d7e37aa31f96196d','!!!/!!#/!!$/'),(NULL,'000036ffdb046744d58ea345ca961937','!!!/!!#/!!$/'),(NULL,'000037c2dbaae700fb115583ca961926','!!!/!!#/!!$/'),(NULL,'000038eedbe32380b1b102d5ca9619c9','!!!/!!!/#2J/'),(NULL,'00003925dbb1c300225d7aa31f961993','!!!/!!#/!!$/'),('58c865acdb2944184ac3a851ca961901','0000392cdbe944184ac3a851ca9619ea','!!!/!!!/(*S/'),(NULL,'00003966db307a800e58fb651f9619a7','!!!/!!!/&C[/'),('bdeae17bdbfed3045ed4a851ca961933','0000397bdbb217045ed4a851ca96192e','!!!/!!#/!!$/'),('1b951202dbbe7b8014d6fb2439961926','00003a02db767f80fec4fb243996198f','!!!/!!!/#*L/'),(NULL,'00003e5bdbe33b8416d2a345ca961919','!!!/!!#/!!$/'),(NULL,'00003eef1b0a4410fff162c4bd4bcb0e','!!!/!!#/!!$/'),(NULL,'000040b6dbcfcb000e58fb651f9619d2','!!!/!!#/!!$/'),(NULL,'000040e5db0a185011762183ca9619c5','!!!/!!#/!!$/'),('101abff70ff99200a2c9982be1050ee7','000044c86f4a120000270bae9f3ee475','/'),('15d6f3c8dbb3ab0023f4a345ca9619ee','000045f2db5f2700f2eb02d5ca9619c6','!!!/!!!/#*./');
+
+ANALYZE TABLE sysapproval_approver PERSISTENT FOR COLUMNS() INDEXES();
+ANALYZE TABLE task PERSISTENT FOR COLUMNS() INDEXES();
+
+--enable_warnings
+--enable_result_log
+--enable_query_log
+
+# The following explain is left here from the original bug report.
+# Can be useful if one gets this issue again in a future MariaDB version
+
+#explain format= json SELECT sysapproval_approver0.`sys_id` FROM ((sysapproval_approver sysapproval_approver0 INNER JOIN task task1 ON sysapproval_approver0.`sysapproval` = task1.`sys_id` AND ((task1.`sys_domain_path` = '/' OR task1.`sys_domain_path` LIKE '!!!/!!#/!!$/%' OR task1.`sys_domain_path` LIKE '!!!/!!!/%'))) INNER JOIN task task2 ON task1.`parent` = task2.`sys_id` AND ((task2.`sys_domain_path` = '/' OR task2.`sys_domain_path` LIKE '!!!/!!#/!!$/%' OR task2.`sys_domain_path` LIKE '!!!/!!!/%'))) WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%' AND (sysapproval_approver0.`sys_domain_path` = '/' OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!#/!!$/%' OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!!/%') ORDER BY sysapproval_approver0.`order` LIMIT 0, 50;
+
+
+set optimizer_use_condition_selectivity=1;
+analyze SELECT sysapproval_approver0.`sys_id`
+FROM ((sysapproval_approver sysapproval_approver0
+ INNER JOIN task task1
+ ON sysapproval_approver0.`sysapproval` = task1.`sys_id`
+ AND (( task1.`sys_domain_path` = '/'
+ OR task1.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task1.`sys_domain_path` LIKE '!!!/!!!/%' )))
+ INNER JOIN task task2
+ ON task1.`parent` = task2.`sys_id`
+ AND (( task2.`sys_domain_path` = '/'
+ OR task2.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task2.`sys_domain_path` LIKE '!!!/!!!/%' )))
+WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%'
+ AND ( sysapproval_approver0.`sys_domain_path` = '/'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!!/%' )
+ORDER BY sysapproval_approver0.`order`
+LIMIT 0, 50 ;
+
+set optimizer_use_condition_selectivity=4;
+analyze SELECT sysapproval_approver0.`sys_id`
+FROM ((sysapproval_approver sysapproval_approver0
+ INNER JOIN task task1
+ ON sysapproval_approver0.`sysapproval` = task1.`sys_id`
+ AND (( task1.`sys_domain_path` = '/'
+ OR task1.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task1.`sys_domain_path` LIKE '!!!/!!!/%' )))
+ INNER JOIN task task2
+ ON task1.`parent` = task2.`sys_id`
+ AND (( task2.`sys_domain_path` = '/'
+ OR task2.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR task2.`sys_domain_path` LIKE '!!!/!!!/%' )))
+WHERE task2.`sys_id` LIKE '8e7792a7dbfffb00fff8a345ca961934%'
+ AND ( sysapproval_approver0.`sys_domain_path` = '/'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!#/!!$/%'
+ OR sysapproval_approver0.`sys_domain_path` LIKE '!!!/!!!/%' )
+ORDER BY sysapproval_approver0.`order`
+LIMIT 0, 50 ;
+
+drop table sysapproval_approver,task;
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/mdev13607.result b/mysql-test/main/mdev13607.result
index f5edfa6a8d6..dcb7365644a 100644
--- a/mysql-test/main/mdev13607.result
+++ b/mysql-test/main/mdev13607.result
@@ -14,8 +14,11 @@ CREATE TABLE t3 (id INT) ENGINE=InnoDB;
INSERT INTO t3 VALUES (1),(2);
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain SELECT * FROM
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1
diff --git a/mysql-test/main/mdev_22370.result b/mysql-test/main/mdev_22370.result
index d422ee6e81f..c1cb60aa106 100644
--- a/mysql-test/main/mdev_22370.result
+++ b/mysql-test/main/mdev_22370.result
@@ -2,3 +2,4 @@ connect con1,localhost,root,,;
SET DEBUG_DBUG='+d,mark_busy_mdev_22370';
FLUSH TABLES WITH READ LOCK;
connection default;
+# restart
diff --git a/mysql-test/main/mdl.result b/mysql-test/main/mdl.result
index d93bfd5c729..883f35674c0 100644
--- a/mysql-test/main/mdl.result
+++ b/mysql-test/main/mdl.result
@@ -6,17 +6,85 @@
# failed in MDL_context::upgrade_shared_lock
#
CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-MDL_INTENTION_EXCLUSIVE Global read lock
+MDL_BACKUP_TRANS_DML Backup lock
MDL_SHARED_NO_READ_WRITE Table metadata lock test t1
UNLOCK TABLES;
LOCK TABLES t1 AS t2 READ, t1 WRITE CONCURRENT;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-MDL_INTENTION_EXCLUSIVE Global read lock
+MDL_BACKUP_TRANS_DML Backup lock
MDL_SHARED_WRITE Table metadata lock test t1
MDL_SHARED_READ_ONLY Table metadata lock test t1
UNLOCK TABLES;
-DROP TABLE t1;
+LOCK TABLES t1 WRITE CONCURRENT, t3 WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_BACKUP_DML Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_NO_READ_WRITE Table metadata lock test t3
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+UNLOCK TABLES;
+LOCK TABLES t3 WRITE, t1 WRITE CONCURRENT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_BACKUP_DML Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_NO_READ_WRITE Table metadata lock test t3
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+UNLOCK TABLES;
+LOCK TABLES t1 WRITE, mysql.user WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_SHARED_NO_READ_WRITE Table metadata lock mysql user
+MDL_SHARED_NO_READ_WRITE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock mysql
+MDL_SHARED_NO_READ_WRITE Table metadata lock mysql global_priv
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+UNLOCK TABLES;
+LOCK TABLES mysql.general_log WRITE;
+ERROR HY000: You can't use locks with log tables
+LOCK TABLES t1 WRITE,information_schema.tables READ;
+UNLOCK TABLES;
+DROP TABLE t1,t3;
+#
+# Check MDL locks taken for different kind of tables by open
+#
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
+connect locker,localhost,root,,;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+insert into t1 values (1);
+connection default;
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FTWRL2 Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+unlock tables;
+connection locker;
+unlock tables;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+insert into t3 values (2);
+connection default;
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FTWRL2 Backup lock
+MDL_SHARED_WRITE Table metadata lock test t3
+unlock tables;
+connection locker;
+unlock tables;
+connection default;
+disconnect locker;
+DROP TABLE t1,t3;
diff --git a/mysql-test/main/mdl.test b/mysql-test/main/mdl.test
index b90c74a8f7f..23a862f5212 100644
--- a/mysql-test/main/mdl.test
+++ b/mysql-test/main/mdl.test
@@ -10,10 +10,72 @@
--echo #
CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
UNLOCK TABLES;
LOCK TABLES t1 AS t2 READ, t1 WRITE CONCURRENT;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
UNLOCK TABLES;
-DROP TABLE t1;
+LOCK TABLES t1 WRITE CONCURRENT, t3 WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+UNLOCK TABLES;
+LOCK TABLES t3 WRITE, t1 WRITE CONCURRENT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+UNLOCK TABLES;
+LOCK TABLES t1 WRITE, mysql.user WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+UNLOCK TABLES;
+--error ER_CANT_LOCK_LOG_TABLE
+LOCK TABLES mysql.general_log WRITE;
+# The following may work in embedded server
+--error 0,ER_DBACCESS_DENIED_ERROR
+LOCK TABLES t1 WRITE,information_schema.tables READ;
+UNLOCK TABLES;
+DROP TABLE t1,t3;
+
+--echo #
+--echo # Check MDL locks taken for different kind of tables by open
+--echo #
+
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
+connect (locker,localhost,root,,);
+connection default;
+
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+--send insert into t1 values (1)
+connection default;
+# Wait till above update gets blocked on a user lock.
+let $wait_condition=
+ select count(*) > 0 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+unlock tables;
+connection locker;
+--reap
+unlock tables;
+connection default;
+
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+--send insert into t3 values (2)
+connection default;
+# Wait till above update gets blocked on a user lock.
+let $wait_condition=
+ select count(*) > 0 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+unlock tables;
+connection locker;
+--reap
+unlock tables;
+connection default;
+
+disconnect locker;
+DROP TABLE t1,t3;
diff --git a/mysql-test/main/mdl_sync.result b/mysql-test/main/mdl_sync.result
index 3880fc5ef91..5203fdddb2d 100644
--- a/mysql-test/main/mdl_sync.result
+++ b/mysql-test/main/mdl_sync.result
@@ -2146,10 +2146,11 @@ flush tables t1, t2 with read lock;
connection con1;
# Wait till FLUSH TABLES <list> WITH READ LOCK stops.
set debug_sync='now WAIT_FOR parked';
+flush tables;
# Start a statement which will flush all tables and thus
# invalidate table t1 open by FLUSH TABLES <list> WITH READ LOCK.
# Sending:
-flush tables;
+flush tables t1;
connection default;
# Wait till the above FLUSH TABLES blocks.
# Resume FLUSH TABLES <list> WITH READ LOCK, so it tries to open t2
@@ -2513,6 +2514,12 @@ connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
# Check that FLUSH must wait to get the GRL
# and let DROP PROCEDURE continue
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_EXCLUSIVE Stored procedure metadata lock test p1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+MDL_SHARED_WRITE Table metadata lock mysql proc
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
FLUSH TABLES WITH READ LOCK;
connection default;
@@ -2527,6 +2534,43 @@ connection con2;
UNLOCK TABLES;
connection default;
SET DEBUG_SYNC= 'RESET';
+#
+# UPDATE should wait for FTWRL with non transactional table second
+#
+create table t1 (a int) engine=myisam;
+create table t2 (a int) engine=innodb;
+insert into t1 values (1);
+insert into t2 values (1);
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+update t1,t2 set t1.a=2,t2.a=3;
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+connection default;
+# Reaping UPDATE
+connection con2;
+UNLOCK TABLES;
+connection default;
+SET DEBUG_SYNC= 'RESET';
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+update t2,t1 set t1.a=2,t2.a=3;
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FTWRL2 Backup lock
+unlock tables;
+connection default;
+# Reaping UPDATE
+SET DEBUG_SYNC= 'RESET';
+drop table t1,t2;
disconnect con2;
#
# Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
@@ -2534,7 +2578,6 @@ disconnect con2;
#
# Supress warnings written to the log file
call mtr.add_suppression("Wait on a lock was aborted due to a pending exclusive lock");
-DROP TABLE IF EXISTS t1, t2;
connect con1,localhost,root;
connect con2,localhost,root;
connect con3,localhost,root;
@@ -3055,7 +3098,7 @@ disconnect con3;
#
CREATE TABLE t1(a INT) ENGINE=InnoDB;
SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
-SELECT * FROM t1;
+INSERT INTO t1 values (1);
connect con1,localhost,root,,;
SET debug_sync='now WAIT_FOR ready';
SET lock_wait_timeout=1;
@@ -3063,7 +3106,21 @@ FLUSH TABLES WITH READ LOCK;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET debug_sync='now SIGNAL go';
connection default;
+# After MDEV-5536, SELECT will not block FLUSH TABLES
+SET debug_sync='RESET';
+SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
+SELECT * FROM t1;
+connection con1;
+SET debug_sync='now WAIT_FOR ready';
+SET lock_wait_timeout=1;
+FLUSH TABLES WITH READ LOCK;
+SET debug_sync='now SIGNAL go';
+connection default;
a
+1
+connection con1;
+unlock tables;
+connection default;
SET debug_sync='RESET';
DROP TABLE t1;
disconnect con1;
diff --git a/mysql-test/main/mdl_sync.test b/mysql-test/main/mdl_sync.test
index fbecd6bf547..2a1e488ab44 100644
--- a/mysql-test/main/mdl_sync.test
+++ b/mysql-test/main/mdl_sync.test
@@ -2,6 +2,7 @@
# We need the Debug Sync Facility.
#
--source include/have_debug_sync.inc
+--source include/have_metadata_lock_info.inc
# We need InnoDB tables for some of the tests.
--source include/have_innodb.inc
@@ -2690,17 +2691,20 @@ connection con1;
--echo # Wait till FLUSH TABLES <list> WITH READ LOCK stops.
set debug_sync='now WAIT_FOR parked';
+# Simple flush tables should not block
+flush tables;
+
--echo # Start a statement which will flush all tables and thus
--echo # invalidate table t1 open by FLUSH TABLES <list> WITH READ LOCK.
--echo # Sending:
-send flush tables;
+send flush tables t1;
connection default;
--echo # Wait till the above FLUSH TABLES blocks.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables";
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t1";
--source include/wait_condition.inc
--echo # Resume FLUSH TABLES <list> WITH READ LOCK, so it tries to open t2
@@ -3245,6 +3249,7 @@ connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
--echo # Check that FLUSH must wait to get the GRL
--echo # and let DROP PROCEDURE continue
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
--send FLUSH TABLES WITH READ LOCK
@@ -3261,12 +3266,63 @@ connection con2;
--echo # Reaping FTWRL.
--reap
UNLOCK TABLES;
+connection default;
+SET DEBUG_SYNC= 'RESET';
+
+--echo #
+--echo # UPDATE should wait for FTWRL with non transactional table second
+--echo #
+
+create table t1 (a int) engine=myisam;
+create table t2 (a int) engine=innodb;
+insert into t1 values (1);
+insert into t2 values (1);
+
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+--send update t1,t2 set t1.a=2,t2.a=3
+
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+
+connection default;
+--echo # Reaping UPDATE
+--reap
+
+connection con2;
+UNLOCK TABLES;
connection default;
SET DEBUG_SYNC= 'RESET';
-disconnect con2;
+# This will cause a wait as we first get lock for innodb table t2 but FTWRL
+# will cause lock for t1 to wait
+
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+--send update t2,t1 set t1.a=2,t2.a=3
+
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.metadata_lock_info;
+--source include/wait_condition.inc
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+
+unlock tables;
+
+connection default;
+--echo # Reaping UPDATE
+--reap
+SET DEBUG_SYNC= 'RESET';
+drop table t1,t2;
+disconnect con2;
--echo #
--echo # Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
@@ -3275,9 +3331,6 @@ disconnect con2;
--echo # Supress warnings written to the log file
call mtr.add_suppression("Wait on a lock was aborted due to a pending exclusive lock");
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
connect (con1,localhost,root);
connect (con2,localhost,root);
@@ -3966,7 +4019,7 @@ connection con2;
connection default;
let $wait_condition=SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state='Waiting for global read lock'
+ WHERE state='Waiting for backup lock'
AND info='CREATE TABLE db1.t2(a INT)';
--source include/wait_condition.inc
UNLOCK TABLES;
@@ -3984,7 +4037,7 @@ connection con2;
connection default;
let $wait_condition=SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state='Waiting for global read lock'
+ WHERE state='Waiting for backup lock'
AND info='ALTER DATABASE db1 DEFAULT CHARACTER SET utf8';
--source include/wait_condition.inc
UNLOCK TABLES;
@@ -4079,9 +4132,10 @@ disconnect con3;
--echo # MDEV-12620 - set lock_wait_timeout = 1;flush tables with read lock;
--echo # lock not released after timeout
--echo #
+
CREATE TABLE t1(a INT) ENGINE=InnoDB;
SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
-send SELECT * FROM t1;
+send INSERT INTO t1 values (1);
connect (con1,localhost,root,,);
SET debug_sync='now WAIT_FOR ready';
@@ -4093,12 +4147,31 @@ SET debug_sync='now SIGNAL go';
connection default;
reap;
+
+--echo # After MDEV-5536, SELECT will not block FLUSH TABLES
+
+SET debug_sync='RESET';
+SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
+send SELECT * FROM t1;
+
+connection con1;
+SET debug_sync='now WAIT_FOR ready';
+# lock_wait_timeout should be 0 in 10.3, so that we don't have to wait at all
+SET lock_wait_timeout=1;
+FLUSH TABLES WITH READ LOCK;
+SET debug_sync='now SIGNAL go';
+
+connection default;
+reap;
+connection con1;
+unlock tables;
+connection default;
+
SET debug_sync='RESET';
DROP TABLE t1;
disconnect con1;
-
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/main/merge.result b/mysql-test/main/merge.result
index a102d62ad4d..075152da1c7 100644
--- a/mysql-test/main/merge.result
+++ b/mysql-test/main/merge.result
@@ -39,7 +39,7 @@ insert into t1 select NULL,message from t2;
create table t3 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,test.t2);
explain select * from t3 where a < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range a a 4 NULL 18 Using where
+1 SIMPLE t3 range a a 4 NULL 17 Using where
explain select * from t3 where a > 10 and a < 20;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range a a 4 NULL 17 Using where
@@ -670,15 +670,15 @@ KEY files (fileset_id,fileset_root_id)
EXPLAIN SELECT * FROM t2 IGNORE INDEX (files) WHERE fileset_id = 2
AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range PRIMARY PRIMARY 35 NULL 5 Using where
+1 SIMPLE t2 range PRIMARY PRIMARY 35 NULL 6 Using where
EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2
AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range PRIMARY,files PRIMARY 35 NULL 5 Using where
+1 SIMPLE t2 range PRIMARY,files PRIMARY 35 NULL 6 Using where
EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2
AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,files PRIMARY 35 NULL 5 Using index condition
+1 SIMPLE t1 range PRIMARY,files PRIMARY 35 NULL 6 Using index condition
EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2
AND file_code = '0000000115' LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -743,7 +743,7 @@ insert into t1 (a,b,c) values (1,1,0),(1,2,0);
insert into t2 (a,b,c) values (1,1,1),(1,2,1);
explain select a,b,c from t3 force index (a) where a=1 order by a,b,c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ref a a 5 const 2 Using where; Using index
+1 SIMPLE t3 ref a a 5 const 4 Using where; Using index
select a,b,c from t3 force index (a) where a=1 order by a,b,c;
a b c
1 1 0
@@ -752,7 +752,7 @@ a b c
1 2 1
explain select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ref a a 5 const 2 Using where; Using index
+1 SIMPLE t3 ref a a 5 const 4 Using where; Using index
select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;
a b c
1 2 1
@@ -2118,6 +2118,7 @@ CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES(0),(1),(2),(3),(4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE m1(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1';
@@ -2809,6 +2810,8 @@ CREATE TABLE tm1 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1)
INSERT_METHOD=LAST;
CREATE TRIGGER tm1_ai AFTER INSERT ON tm1
FOR EACH ROW SELECT max(c1) FROM t1 INTO @var;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
LOCK TABLE tm1 WRITE, t1 WRITE;
INSERT INTO tm1 VALUES (1);
SELECT * FROM tm1;
@@ -2833,6 +2836,8 @@ CREATE TABLE tm1 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2,t3,t4,t5)
INSERT_METHOD=LAST;
CREATE TRIGGER t2_au AFTER UPDATE ON t2
FOR EACH ROW SELECT MAX(c1) FROM t1 INTO @var;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE FUNCTION f1() RETURNS INT
RETURN (SELECT MAX(c1) FROM t4);
LOCK TABLE tm1 WRITE, t1 WRITE, t2 WRITE, t3 WRITE, t4 WRITE, t5 WRITE;
@@ -3812,11 +3817,15 @@ CREATE TABLE tmerge (f1 INT) ENGINE=MERGE UNION=(t1);
PREPARE stmt FROM "ANALYZE TABLE tmerge, t1";
EXECUTE stmt;
Table Op Msg_type Msg_text
+test.tmerge analyze status Engine-independent statistics collected
test.tmerge analyze note The storage engine for the table doesn't support analyze
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
EXECUTE stmt;
Table Op Msg_type Msg_text
+test.tmerge analyze status Engine-independent statistics collected
test.tmerge analyze note The storage engine for the table doesn't support analyze
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
DEALLOCATE PREPARE stmt;
DROP TABLE t1, tmerge;
diff --git a/mysql-test/main/metadata.result b/mysql-test/main/metadata.result
index 1f917bfe5ab..0704f5b8ae8 100644
--- a/mysql-test/main/metadata.result
+++ b/mysql-test/main/metadata.result
@@ -715,16 +715,16 @@ CEILING(11111111),
CEILING(111111111),
CEILING(1111111111) LIMIT 0;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def CEILING(1) 3 3 0 N 32897 0 63
-def CEILING(11) 3 4 0 N 32897 0 63
-def CEILING(111) 3 5 0 N 32897 0 63
-def CEILING(1111) 3 6 0 N 32897 0 63
-def CEILING(11111) 3 7 0 N 32897 0 63
-def CEILING(111111) 3 8 0 N 32897 0 63
-def CEILING(1111111) 3 9 0 N 32897 0 63
-def CEILING(11111111) 8 10 0 N 32897 0 63
-def CEILING(111111111) 8 11 0 N 32897 0 63
-def CEILING(1111111111) 8 12 0 N 32897 0 63
+def CEILING(1) 3 1 0 N 32897 0 63
+def CEILING(11) 3 2 0 N 32897 0 63
+def CEILING(111) 3 3 0 N 32897 0 63
+def CEILING(1111) 3 4 0 N 32897 0 63
+def CEILING(11111) 3 5 0 N 32897 0 63
+def CEILING(111111) 3 6 0 N 32897 0 63
+def CEILING(1111111) 3 7 0 N 32897 0 63
+def CEILING(11111111) 3 8 0 N 32897 0 63
+def CEILING(111111111) 3 9 0 N 32897 0 63
+def CEILING(1111111111) 8 10 0 N 32897 0 63
CEILING(1) CEILING(11) CEILING(111) CEILING(1111) CEILING(11111) CEILING(111111) CEILING(1111111) CEILING(11111111) CEILING(111111111) CEILING(1111111111)
SELECT
FLOOR(1),
@@ -738,16 +738,16 @@ FLOOR(11111111),
FLOOR(111111111),
FLOOR(1111111111) LIMIT 0;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def FLOOR(1) 3 3 0 N 32897 0 63
-def FLOOR(11) 3 4 0 N 32897 0 63
-def FLOOR(111) 3 5 0 N 32897 0 63
-def FLOOR(1111) 3 6 0 N 32897 0 63
-def FLOOR(11111) 3 7 0 N 32897 0 63
-def FLOOR(111111) 3 8 0 N 32897 0 63
-def FLOOR(1111111) 3 9 0 N 32897 0 63
-def FLOOR(11111111) 8 10 0 N 32897 0 63
-def FLOOR(111111111) 8 11 0 N 32897 0 63
-def FLOOR(1111111111) 8 12 0 N 32897 0 63
+def FLOOR(1) 3 1 0 N 32897 0 63
+def FLOOR(11) 3 2 0 N 32897 0 63
+def FLOOR(111) 3 3 0 N 32897 0 63
+def FLOOR(1111) 3 4 0 N 32897 0 63
+def FLOOR(11111) 3 5 0 N 32897 0 63
+def FLOOR(111111) 3 6 0 N 32897 0 63
+def FLOOR(1111111) 3 7 0 N 32897 0 63
+def FLOOR(11111111) 3 8 0 N 32897 0 63
+def FLOOR(111111111) 3 9 0 N 32897 0 63
+def FLOOR(1111111111) 8 10 0 N 32897 0 63
FLOOR(1) FLOOR(11) FLOOR(111) FLOOR(1111) FLOOR(11111) FLOOR(111111) FLOOR(1111111) FLOOR(11111111) FLOOR(111111111) FLOOR(1111111111)
SELECT
ROUND(1),
diff --git a/mysql-test/main/mix2_myisam.result b/mysql-test/main/mix2_myisam.result
index dbc992ece23..220d14f3b0e 100644
--- a/mysql-test/main/mix2_myisam.result
+++ b/mysql-test/main/mix2_myisam.result
@@ -211,6 +211,7 @@ create index skr on t1 (a);
insert into t1 values (3,""), (4,"testing");
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/mysql-test/main/mrr_icp_extra.result b/mysql-test/main/mrr_icp_extra.result
index 95788b393dd..176df5cf9d5 100644
--- a/mysql-test/main/mrr_icp_extra.result
+++ b/mysql-test/main/mrr_icp_extra.result
@@ -1,6 +1,7 @@
call mtr.add_suppression("Can't find record in .*");
set @mrr_icp_extra_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set optimizer_switch='rowid_filter=off';
SET NAMES latin1;
CREATE TABLE t1
(s1 char(10) COLLATE latin1_german1_ci,
@@ -73,7 +74,7 @@ insert into t1 values (2, 1), (1, 1), (4, NULL), (3, NULL), (6, 2), (5, 2);
insert into t1 values (2, 11), (1, 11), (4, 14), (3, 14), (6, 12), (5, 12);
explain select * from t1 where b=1 or b is null order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null b b 5 const 4 Using index condition; Using where; Using filesort
+1 SIMPLE t1 ref_or_null b b 5 const 4 Using index condition; Using filesort
select * from t1 where b=1 or b is null order by a;
a b
1 1
@@ -82,7 +83,7 @@ a b
4 NULL
explain select * from t1 where b=2 or b is null order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null b b 5 const 3 Using index condition; Using where; Using filesort
+1 SIMPLE t1 ref_or_null b b 5 const 4 Using index condition; Using filesort
select * from t1 where b=2 or b is null order by a;
a b
3 NULL
@@ -103,10 +104,10 @@ KEY StringField (FieldKey,StringVal(32))
INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3');
EXPLAIN SELECT * FROM t1 IGNORE INDEX (LongField, StringField) WHERE FieldKey > '2' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range FieldKey FieldKey 38 NULL 4 Using index condition; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 range FieldKey FieldKey 38 NULL 3 Using index condition; Rowid-ordered scan; Using filesort
EXPLAIN SELECT * FROM t1 IGNORE INDEX (FieldKey, LongField) WHERE FieldKey > '2' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range StringField StringField 38 NULL 4 Using where; Using filesort
+1 SIMPLE t1 range StringField StringField 38 NULL 3 Using where; Using filesort
SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
FieldKey LongVal StringVal
3 1 2
@@ -124,7 +125,7 @@ Table Op Msg_type Msg_text
test.t1 optimize status OK
explain select * from t1 force index (a) where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 4 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range a a 4 NULL 5 Using index condition; Rowid-ordered scan
select * from t1 force index (a) where a=0 or a=2;
a b c
0 NULL 0
diff --git a/mysql-test/main/mrr_icp_extra.test b/mysql-test/main/mrr_icp_extra.test
index e2d25686c81..c8c5e6b3af3 100644
--- a/mysql-test/main/mrr_icp_extra.test
+++ b/mysql-test/main/mrr_icp_extra.test
@@ -7,6 +7,7 @@ call mtr.add_suppression("Can't find record in .*");
set @mrr_icp_extra_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set optimizer_switch='rowid_filter=off';
SET NAMES latin1;
CREATE TABLE t1
(s1 char(10) COLLATE latin1_german1_ci,
diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result
index 68d15d49b50..61e04c3d4a9 100644
--- a/mysql-test/main/multi_update.result
+++ b/mysql-test/main/multi_update.result
@@ -598,11 +598,11 @@ CREATE TABLE t1 (f1 DATE);
INSERT INTO t1 VALUES('2001-01-01');
UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1;
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
CREATE view v1 as SELECT f1() FROM t1;
UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1;
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
DROP VIEW v1;
DROP FUNCTION f1;
DROP TABLE t1;
@@ -1092,8 +1092,8 @@ a b c a b c
set optimizer_switch='firstmatch=off';
explain update t1, t2 set t2.c=1 where t1.a=t2.a and t1.b in (select b from t3 where t3.c< t2.c) order by t2.c, t1.c limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 PRIMARY t1 ALL a NULL NULL NULL 10 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary; Using filesort
+1 PRIMARY t1 ref a a 5 test.t2.a 1
1 PRIMARY t3 ALL NULL NULL NULL NULL 10 Using where; Start temporary; End temporary
update t1, t2 set t2.c=1 where t1.a=t2.a and t1.b in (select b from t3 where t3.c<=t2.c) order by t2.c, t1.c limit 5;
select * from t2;
diff --git a/mysql-test/main/myisam.result b/mysql-test/main/myisam.result
index fdd2a93b9ad..32737bd8399 100644
--- a/mysql-test/main/myisam.result
+++ b/mysql-test/main/myisam.result
@@ -395,7 +395,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
explain select * from t1 force index (a) where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 4 Using index condition; Using where
+1 SIMPLE t1 range a a 4 NULL 5 Using index condition
explain select * from t1 where c=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c,c_2 c 5 const 1
@@ -641,7 +641,7 @@ create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
insert into t1 values (null,''), (null,'');
explain select count(*) from t1 where a is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx idx 4 const 1 Using where
+1 SIMPLE t1 ref idx idx 4 const 2 Using where
select count(*) from t1 where a is null;
count(*)
2
@@ -676,6 +676,7 @@ insert into t1 values (0),(1),(2),(3),(4);
insert into t1 select NULL from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -689,6 +690,8 @@ show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 a 1 a A 10 NULL NULL YES BTREE
set myisam_stats_method=nulls_equal;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method NULLS_EQUAL
@@ -696,6 +699,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -708,6 +712,7 @@ test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 a 1 a A 5 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
set myisam_stats_method=DEFAULT;
show variables like 'myisam_stats_method';
Variable_name Value
@@ -716,6 +721,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -733,6 +739,8 @@ set myisam_stats_method=nulls_ignored;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method NULLS_IGNORED
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table t1 (
a char(3), b char(4), c char(5), d char(6),
key(a,b,c,d)
@@ -743,6 +751,7 @@ insert into t1 values ('bce','def1', 'yuu', NULL);
insert into t1 values ('bce','def2', NULL, 'quux');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -753,6 +762,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE
delete from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -762,6 +772,7 @@ t1 1 a 3 c A 0 NULL NULL YES BTREE
t1 1 a 4 d A 0 NULL NULL YES BTREE
set myisam_stats_method=DEFAULT;
drop table t1;
+set @@use_stat_tables = @save_use_stat_tables;
create table t1(
cip INT NOT NULL,
time TIME NOT NULL,
@@ -1801,6 +1812,7 @@ create table t1 (a int, key(a));
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -2546,7 +2558,7 @@ INSERT INTO t1 VALUES
('0'),('0'),('0'),('0'),('0'),('0'),('0');
Warnings:
Error 1034 myisam_sort_buffer_size is too small. X
-Error 1034 Number of rows changed from 0 to 157
+Warning 1034 Number of rows changed from 0 to 157
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
INSERT INTO t1 VALUES('1');
SELECT * FROM t1, t1 AS a1 WHERE t1.a=1 AND a1.a=1;
diff --git a/mysql-test/main/myisam.test b/mysql-test/main/myisam.test
index 6cdfeb6aefa..9b81ab197ae 100644
--- a/mysql-test/main/myisam.test
+++ b/mysql-test/main/myisam.test
@@ -643,6 +643,9 @@ show index from t1;
# Set nulls to be equal:
set myisam_stats_method=nulls_equal;
+
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
show variables like 'myisam_stats_method';
insert into t1 values (11);
delete from t1 where a=11;
@@ -657,6 +660,7 @@ check table t1;
show index from t1;
# Set nulls back to be equal
+set @@use_stat_tables = @save_use_stat_tables;
set myisam_stats_method=DEFAULT;
show variables like 'myisam_stats_method';
insert into t1 values (11);
@@ -677,6 +681,9 @@ drop table t1;
set myisam_stats_method=nulls_ignored;
show variables like 'myisam_stats_method';
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table t1 (
a char(3), b char(4), c char(5), d char(6),
key(a,b,c,d)
@@ -693,6 +700,7 @@ show index from t1;
set myisam_stats_method=DEFAULT;
drop table t1;
+set @@use_stat_tables = @save_use_stat_tables;
# BUG#13814 - key value packed incorrectly for TINYBLOBs
diff --git a/mysql-test/main/myisam_debug.result b/mysql-test/main/myisam_debug.result
index 1428473c850..650a3bcb787 100644
--- a/mysql-test/main/myisam_debug.result
+++ b/mysql-test/main/myisam_debug.result
@@ -23,6 +23,8 @@ SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE STATE = 'wait_in_enable_indexes' AND
INFO = "INSERT INTO t1(id) SELECT id FROM t2"
INTO @thread_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
KILL QUERY @thread_id;
CHECK TABLE t1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/main/myisam_explain_non_select_all.result b/mysql-test/main/myisam_explain_non_select_all.result
index 09e662f5d6a..7f24cb4896d 100644
--- a/mysql-test/main/myisam_explain_non_select_all.result
+++ b/mysql-test/main/myisam_explain_non_select_all.result
@@ -7,6 +7,8 @@ INSERT INTO t1 VALUES (1), (2), (3);
# query: UPDATE t1 SET a = 10 WHERE a < 10
# select: SELECT * FROM t1 WHERE a < 10
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a = 10 WHERE a < 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
@@ -17,6 +19,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 10;
@@ -26,11 +29,16 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
Handler_update 3
@@ -42,6 +50,8 @@ INSERT INTO t1 VALUES (1), (2), (3);
# query: DELETE FROM t1 WHERE a < 10
# select: SELECT * FROM t1 WHERE a < 10
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE a < 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
@@ -52,6 +62,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 10;
@@ -61,12 +72,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 3
+Handler_read_key 2
Handler_read_rnd_next 4
DROP TABLE t1;
@@ -77,6 +93,8 @@ INSERT INTO t1 VALUES (1), (2), (3);
# query: DELETE FROM t1 USING t1 WHERE a = 1
# select: SELECT * FROM t1 WHERE a = 1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 USING t1 WHERE a = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
@@ -87,6 +105,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 1;
@@ -96,12 +115,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 2
Handler_read_rnd_next 4
DROP TABLE t1;
@@ -114,6 +138,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1, t2 SET t1.a = 10 WHERE t1.a = 1
# select: SELECT * FROM t1, t2 WHERE t1.a = 1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1, t2 SET t1.a = 10 WHERE t1.a = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
@@ -126,6 +152,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE t1.a = 1;
@@ -136,11 +163,16 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
Handler_update 1
@@ -154,6 +186,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a = 1
# select: SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a = 1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t11 ALL NULL NULL NULL NULL 3 Using where
@@ -168,6 +202,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a = 1;
@@ -178,11 +213,16 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2` where `test`.`t11`.`a` = 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 12
Handler_update 1
@@ -196,6 +236,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 SET a = 10 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3)
# select: SELECT * FROM t1 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a = 10 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
@@ -208,6 +250,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -220,12 +263,16 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`b` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 5
Handler_update 3
@@ -239,6 +286,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3)
# select: SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
@@ -253,6 +302,7 @@ Warnings:
Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3);
@@ -264,11 +314,16 @@ Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`b` = `test`.`t1`.`a` and `test`.`t1`.`a` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 7
Handler_update 2
@@ -282,6 +337,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3)
# select: SELECT * FROM t1, t2 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
@@ -298,6 +355,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3);
@@ -310,13 +368,16 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join (`test`.`t2`) join `test`.`t2` where `test`.`t2`.`b` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 12
# Status of testing query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 16
Handler_update 2
@@ -330,6 +391,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = t11.a + 10
# select: SELECT * FROM t1 t11, (SELECT * FROM t2) t12
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = t11.a + 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t11 ALL NULL NULL NULL NULL 3
@@ -344,6 +407,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12;
@@ -354,11 +418,16 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd 3
Handler_read_rnd_deleted 1
Handler_read_rnd_next 24
@@ -374,6 +443,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 t11, (SELECT 1 FROM DUAL) t12 SET t11.a = t11.a + 10
# select: SELECT * FROM t1 t11, (SELECT 1 FROM DUAL) t12
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 t11, (SELECT 1 FROM DUAL) t12 SET t11.a = t11.a + 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
@@ -388,6 +459,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -400,12 +472,17 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t11`.`a` AS `a`,1 AS `1` from `test`.`t1` `t11`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 1
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 5
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd 3
Handler_read_rnd_next 9
Handler_update 3
@@ -420,6 +497,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a > 1
# select: SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a > 1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 t11, (SELECT * FROM t2) t12 SET t11.a = 10 WHERE t11.a > 1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t11 ALL NULL NULL NULL NULL 3 Using where
@@ -434,6 +513,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a > 1;
@@ -444,11 +524,16 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2` where `test`.`t11`.`a` > 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 16
Handler_update 2
@@ -460,6 +545,8 @@ INSERT INTO t1 VALUES (1), (2), (3);
# query: DELETE FROM t1 WHERE a > 1 LIMIT 1
# select: SELECT * FROM t1 WHERE a > 1 LIMIT 1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE a > 1 LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
@@ -470,6 +557,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > 1 LIMIT 1;
@@ -479,12 +567,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1 limit 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 2
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 2
Handler_read_rnd_next 2
DROP TABLE t1;
@@ -495,6 +588,8 @@ INSERT INTO t1 VALUES (1), (2), (3);
# query: DELETE FROM t1 WHERE 0
# select: SELECT * FROM t1 WHERE 0
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
@@ -505,6 +600,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 0;
@@ -514,10 +610,15 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
DROP TABLE t1;
#13
@@ -527,6 +628,8 @@ INSERT INTO t1 VALUES (1), (2), (3);
# query: DELETE FROM t1 USING t1 WHERE 0
# select: SELECT * FROM t1 WHERE 0
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 USING t1 WHERE 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
@@ -537,6 +640,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 0;
@@ -546,10 +650,15 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
DROP TABLE t1;
#14
@@ -559,6 +668,8 @@ INSERT INTO t1 VALUES (3, 3), (7, 7);
# query: DELETE FROM t1 WHERE a = 3
# select: SELECT * FROM t1 WHERE a = 3
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE a = 3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 1 Using where
@@ -569,6 +680,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range a a 5 NULL 1 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 5
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 3;
@@ -578,14 +690,16 @@ Warnings:
Note 1003 select 3 AS `a`,3 AS `b` from `test`.`t1` where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
# Status of testing query execution:
Variable_name Value
Handler_delete 1
-Handler_read_key 1
+Handler_read_key 6
DROP TABLE t1;
#15
@@ -595,6 +709,8 @@ INSERT INTO t1 VALUES (3, 3), (7, 7);
# query: DELETE FROM t1 WHERE a < 3
# select: SELECT * FROM t1 WHERE a < 3
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE a < 3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 1 Using where
@@ -605,6 +721,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range a a 5 NULL 1 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 5
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 3;
@@ -614,12 +731,15 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 5
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
DROP TABLE t1;
#16
@@ -628,16 +748,19 @@ CREATE TABLE t1 ( a int PRIMARY KEY );
# query: DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a
# select: SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
@@ -647,19 +770,25 @@ Warnings:
Note 1003 select NULL AS `a` from `test`.`t1` where 0 order by NULL
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 1
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 3
-INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (1), (2), (3), (-1), (-2), (-3);
#
# query: DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a
# select: SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where
@@ -670,6 +799,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
@@ -679,14 +809,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 0 order by `test`.`t1`.`a`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 4
Handler_read_next 3
# Status of testing query execution:
Variable_name Value
Handler_delete 3
-Handler_read_key 1
+Handler_read_key 4
Handler_read_next 3
DROP TABLE t1;
@@ -697,6 +830,8 @@ INSERT INTO t1 VALUES (4),(3),(1),(2);
# query: DELETE FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1
# select: SELECT * FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 Using where
@@ -707,6 +842,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1;
@@ -716,13 +852,18 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where @a:=`test`.`t1`.`a` order by `test`.`t1`.`a` limit 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 3
# Status of testing query execution:
Variable_name Value
Handler_delete 1
Handler_read_first 1
+Handler_read_key 3
DROP TABLE t1;
#18
@@ -733,6 +874,8 @@ UPDATE t1 SET a = c, b = c;
# query: DELETE FROM t1 ORDER BY a ASC, b ASC LIMIT 1
# select: SELECT * FROM t1 ORDER BY a ASC, b ASC LIMIT 1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 ORDER BY a ASC, b ASC LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using filesort
@@ -743,6 +886,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 7
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 ORDER BY a ASC, b ASC LIMIT 1;
@@ -752,8 +896,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` order by `test`.`t1`.`a`,`test`.`t1`.`b` limit 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 11
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -761,6 +909,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 7
Handler_read_rnd 1
Handler_read_rnd_next 11
Sort_rows 10
@@ -778,6 +927,8 @@ INSERT INTO t3 VALUES (1,1), (2,1), (1,3);
# query: DELETE t1,t2,t3 FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3
# select: SELECT * FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE t1,t2,t3 FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
@@ -792,6 +943,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.b2,test.t1.b1 1 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 13
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3;
@@ -803,15 +955,18 @@ Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b2` AS `b2`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t2`.`a2` = `test`.`t1`.`a1` and `test`.`t3`.`a3` = `test`.`t2`.`b2` and `test`.`t3`.`b3` = `test`.`t1`.`b1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 13
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 6
+Handler_read_key 19
Handler_read_next 3
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 8
-Handler_read_key 6
+Handler_read_key 19
Handler_read_next 3
Handler_read_rnd 5
Handler_read_rnd_next 4
@@ -826,6 +981,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 SET a = 10 WHERE a IN (SELECT a FROM t2)
# select: SELECT * FROM t1 WHERE a IN (SELECT a FROM t2)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a = 10 WHERE a IN (SELECT a FROM t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
@@ -838,6 +995,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT a FROM t2);
@@ -849,12 +1007,16 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 10
Handler_update 3
@@ -869,6 +1031,8 @@ SET @save_optimizer_switch= @@optimizer_switch;
# query: DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2)
# select: SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
@@ -881,6 +1045,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2);
@@ -891,13 +1056,17 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`>(<in_optimizer>(`test`.`t1`.`a1`,<exists>(/* select#2 */ select `test`.`t2`.`a2` from `test`.`t2` where `test`.`t2`.`a2` > 2 and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`a2`)))
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 5
+Handler_read_key 9
Handler_read_rnd_next 30
# Status of testing query execution:
Variable_name Value
Handler_delete 3
+Handler_read_key 4
Handler_read_rnd_next 30
SET @@optimizer_switch= @save_optimizer_switch;
@@ -907,6 +1076,8 @@ INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
# query: DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2)
# select: SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
@@ -919,6 +1090,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2);
@@ -929,12 +1101,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`a2` > 2 and `test`.`t1`.`a1` = `test`.`t2`.`a2`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 12
# Status of testing query execution:
Variable_name Value
Handler_delete 3
+Handler_read_key 4
Handler_read_rnd_next 30
DROP TABLE t1, t2;
@@ -945,6 +1122,8 @@ INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
# query: UPDATE t1 SET i = 10
# select: SELECT * FROM t1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET i = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
@@ -955,6 +1134,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -964,11 +1144,16 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`j` AS `j` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 6
Handler_update 5
@@ -980,6 +1165,8 @@ INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
# query: DELETE FROM t1
# select: SELECT * FROM t1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL 5 Deleting all rows
@@ -990,6 +1177,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL 5 NULL Deleting all rows
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -999,11 +1187,16 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`j` AS `j` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
+Handler_read_key 3
DROP TABLE t1;
#24
@@ -1018,6 +1211,8 @@ INSERT INTO t2 (a, b, c) SELECT t1.i, t1.i, t1.i FROM t1, t1 x1, t1 x2;
# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL a 15 NULL 5 Using where
@@ -1028,6 +1223,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1037,14 +1233,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
DROP TABLE t1, t2;
@@ -1056,6 +1257,8 @@ CREATE TABLE t2 (i INT);
# query: INSERT INTO t2 SELECT * FROM t1
# select: SELECT * FROM t1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN INSERT INTO t2 SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
@@ -1066,6 +1269,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -1075,11 +1279,16 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 4
Handler_write 3
@@ -1092,6 +1301,8 @@ CREATE TABLE t2 (i INT);
# query: REPLACE INTO t2 SELECT * FROM t1
# select: SELECT * FROM t1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN REPLACE INTO t2 SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
@@ -1102,6 +1313,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -1111,11 +1323,16 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 4
Handler_write 3
@@ -1136,8 +1353,10 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_write 1
DROP TABLE t1;
@@ -1157,8 +1376,10 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_write 1
DROP TABLE t1;
@@ -1171,6 +1392,8 @@ INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19),
# query: DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
# select: SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 5 Using where
@@ -1181,6 +1404,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1190,14 +1414,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
-Handler_read_key 1
+Handler_read_key 5
Handler_read_next 4
DROP TABLE t1;
@@ -1210,6 +1437,8 @@ INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19),
# query: DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
# select: SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1220,6 +1449,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1229,8 +1459,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
@@ -1238,6 +1472,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 5
+Handler_read_key 4
Handler_read_rnd 5
Handler_read_rnd_next 27
Sort_rows 8
@@ -1255,6 +1490,8 @@ INSERT INTO t2 (a, b, c) SELECT i, i, i FROM t1;
# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1265,6 +1502,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1274,8 +1512,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -1283,6 +1525,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_rows 1
@@ -1301,6 +1544,8 @@ INSERT INTO t2 (a, b, c) SELECT t1.i, t1.i, t1.i FROM t1, t1 x1, t1 x2;
# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL a 15 NULL 5 Using where
@@ -1311,6 +1556,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1320,14 +1566,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
DROP TABLE t1, t2;
@@ -1342,6 +1593,8 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1352,6 +1605,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1361,8 +1615,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -1370,6 +1628,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_rows 1
@@ -1388,6 +1647,8 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
# query: DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1398,6 +1659,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1407,8 +1669,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -1417,6 +1683,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_rows 1
@@ -1435,6 +1702,8 @@ INSERT INTO t2 (key1, key2) SELECT i, i FROM t1;
# query: DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1
# select: SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 Using sort_union(key1,key2); Using where; Using filesort
@@ -1445,6 +1714,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
@@ -1454,9 +1724,12 @@ Warnings:
Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`key1` AS `key1`,`test`.`t2`.`key2` AS `key2` from `test`.`t2` where `test`.`t2`.`key1` < 13 or `test`.`t2`.`key2` < 14 order by `test`.`t2`.`key1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 2
+Handler_read_key 8
Handler_read_next 7
Handler_read_rnd 4
Sort_range 1
@@ -1464,7 +1737,7 @@ Sort_rows 4
# Status of testing query execution:
Variable_name Value
Handler_delete 4
-Handler_read_key 2
+Handler_read_key 8
Handler_read_next 7
Handler_read_rnd 8
Sort_range 1
@@ -1482,6 +1755,8 @@ INSERT INTO t2 (i) SELECT i FROM t1;
# query: DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5
# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 Using where
@@ -1492,6 +1767,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
@@ -1501,14 +1777,17 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
-Handler_read_key 1
+Handler_read_key 5
Handler_read_prev 4
DROP TABLE t1, t2;
@@ -1523,6 +1802,8 @@ INSERT INTO t2 SELECT i, i, i FROM t1;
# query: DELETE FROM t2 ORDER BY a, b DESC LIMIT 5
# select: SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 ORDER BY a, b DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using filesort
@@ -1533,6 +1814,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5;
@@ -1542,8 +1824,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a`,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
@@ -1551,6 +1837,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 5
+Handler_read_key 6
Handler_read_rnd 5
Handler_read_rnd_next 27
Sort_rows 26
@@ -1569,6 +1856,8 @@ INSERT INTO t2 (a, b) SELECT t1.i, t1.i FROM t1, t1 x1, t1 x2;
# query: DELETE FROM t2 ORDER BY a DESC, b DESC LIMIT 5
# select: SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t2 ORDER BY a DESC, b DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL a 6 NULL 5
@@ -1579,6 +1868,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 6 NULL 5 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5;
@@ -1588,13 +1878,18 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a` desc,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
+Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
@@ -1610,6 +1905,8 @@ INSERT INTO t2 (i) SELECT i FROM t1;
# query: UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 Using where; Using buffer
@@ -1620,6 +1917,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1629,13 +1927,16 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_next 4
Handler_read_rnd 5
Handler_update 5
@@ -1652,6 +1953,8 @@ INSERT INTO t2 (i) SELECT i FROM t1;
# query: UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1662,6 +1965,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1671,14 +1975,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
Sort_scan 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd 5
Handler_read_rnd_next 27
Handler_update 5
@@ -1698,6 +2007,8 @@ INSERT INTO t2 (a, b, c) SELECT i, i, i FROM t1;
# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1708,6 +2019,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1717,14 +2029,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
Sort_scan 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Handler_update 1
@@ -1745,6 +2062,8 @@ INSERT INTO t2 (a, b, c) SELECT t1.i, t1.i, t1.i FROM t1, t1 x1, t1 x2;
# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL a 15 NULL 5 Using where; Using buffer
@@ -1755,6 +2074,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1764,13 +2084,18 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
Handler_read_rnd 5
Handler_update 5
@@ -1787,6 +2112,8 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1797,6 +2124,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1806,14 +2134,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
Sort_scan 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -1833,6 +2166,8 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
# query: UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5
# select: SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
@@ -1843,6 +2178,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1852,8 +2188,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -1861,6 +2201,7 @@ Sort_rows 1
Sort_scan 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -1880,6 +2221,8 @@ INSERT INTO t2 (key1, key2) SELECT i, i FROM t1;
# query: UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1
# select: SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 Using sort_union(key1,key2); Using where; Using filesort
@@ -1890,6 +2233,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
@@ -1899,16 +2243,19 @@ Warnings:
Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`key1` AS `key1`,`test`.`t2`.`key2` AS `key2` from `test`.`t2` where `test`.`t2`.`key1` < 13 or `test`.`t2`.`key2` < 14 order by `test`.`t2`.`key1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 2
+Handler_read_key 8
Handler_read_next 7
Handler_read_rnd 4
Sort_range 1
Sort_rows 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 2
+Handler_read_key 8
Handler_read_next 7
Handler_read_rnd 8
Handler_update 4
@@ -1927,6 +2274,8 @@ INSERT INTO t2 (i) SELECT i FROM t1;
# query: UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5
# select: SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 Using where; Using buffer
@@ -1937,6 +2286,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
@@ -1946,13 +2296,16 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_prev 4
Handler_read_rnd 5
Handler_update 5
@@ -1969,6 +2322,8 @@ INSERT INTO t2 SELECT i, i, i FROM t1;
# query: UPDATE t2 SET c = 10 ORDER BY a, b DESC LIMIT 5
# select: SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET c = 10 ORDER BY a, b DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using filesort
@@ -1979,6 +2334,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5;
@@ -1988,14 +2344,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a`,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
Sort_scan 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_rnd 5
Handler_read_rnd_next 27
Handler_update 4
@@ -2016,6 +2377,8 @@ INSERT INTO t2 (a, b) SELECT t1.i, t1.i FROM t1, t1 x1, t1 x2;
# query: UPDATE t2 SET c = 10 ORDER BY a DESC, b DESC LIMIT 5
# select: SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t2 SET c = 10 ORDER BY a DESC, b DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL a 6 NULL 5 Using buffer
@@ -2026,6 +2389,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 6 NULL 5 100.00 Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5;
@@ -2035,12 +2399,17 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a` desc,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
Handler_read_rnd 5
@@ -2060,6 +2429,8 @@ INSERT INTO t1 VALUES (1,'y',1), (2,'n',2), (3,'y',3), (4,'n',4);
# query: UPDATE t1 SET c2 = 0 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2
# select: SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET c2 = 0 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 Using where; Using filesort
@@ -2070,6 +2441,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2;
@@ -2079,16 +2451,19 @@ Warnings:
Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`c1_idx` AS `c1_idx`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where `test`.`t1`.`c1_idx` = 'y' order by `test`.`t1`.`pk` desc limit 2
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 7
Handler_read_next 2
Sort_priority_queue_sorts 1
Sort_range 1
Sort_rows 2
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 7
Handler_read_next 2
Handler_read_rnd 2
Handler_update 2
@@ -2100,6 +2475,8 @@ Sort_rows 2
# query: DELETE FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2
# select: SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 Using where; Using filesort
@@ -2110,6 +2487,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2;
@@ -2119,9 +2497,12 @@ Warnings:
Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`c1_idx` AS `c1_idx`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where `test`.`t1`.`c1_idx` = 'y' order by `test`.`t1`.`pk` desc limit 2
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 7
Handler_read_next 2
Sort_priority_queue_sorts 1
Sort_range 1
@@ -2129,7 +2510,7 @@ Sort_rows 2
# Status of testing query execution:
Variable_name Value
Handler_delete 2
-Handler_read_key 1
+Handler_read_key 7
Handler_read_next 2
Handler_read_rnd 2
Sort_range 1
@@ -2143,32 +2524,38 @@ INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(
# query: UPDATE t1 SET a=a+10 WHERE a > 34
# select: SELECT * FROM t1 WHERE a > 34
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a=a+10 WHERE a > 34;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using buffer
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using buffer
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED UPDATE t1 SET a=a+10 WHERE a > 34;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using buffer
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > 34;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 34
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 4
Handler_read_next 2
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 4
Handler_read_next 2
Handler_read_rnd 2
Handler_update 2
@@ -2182,6 +2569,8 @@ INSERT INTO t1 VALUES (1, 1, 10), (2, 2, 20);
# query: UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10
# select: SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found
@@ -2194,6 +2583,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -2205,18 +2595,25 @@ Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 1
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 4
#
# query: UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 WHERE t1.c3 = 10
# select: SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c3 = 10
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 WHERE t1.c3 = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found
@@ -2229,6 +2626,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -2240,12 +2638,17 @@ Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1` where `test`.`t1`.`c3` = 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 1
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 4
DROP TABLE t1, t2;
@@ -2259,6 +2662,8 @@ INSERT INTO t2 VALUES(1,1),(2,2);
# query: UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1)
# select: SELECT (SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1) FROM t1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
@@ -2273,6 +2678,7 @@ Warnings:
Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 7
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT (SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1) FROM t1;
@@ -2284,12 +2690,16 @@ Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select <expr_cache><`test`.`t1`.`f1`>((/* select#2 */ select max(`test`.`t2`.`f4`) from `test`.`t2` where `test`.`t2`.`f3` = `test`.`t1`.`f1`)) AS `(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1)` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 2
+Handler_read_key 9
Handler_read_rnd_next 9
# Status of testing query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 9
Handler_update 2
@@ -2325,6 +2735,8 @@ CREATE VIEW v1 AS SELECT t11.a, t12.a AS b FROM t1 t11, t1 t12;
# query: UPDATE v1 SET a = 1 WHERE a > 0
# select: SELECT * FROM v1 WHERE a > 0
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE v1 SET a = 1 WHERE a > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t11 ALL NULL NULL NULL NULL 2 Using where
@@ -2337,6 +2749,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM v1 WHERE a > 0;
@@ -2347,11 +2760,16 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t12`.`a` AS `b` from `test`.`t1` `t11` join `test`.`t1` `t12` where `test`.`t11`.`a` > 0
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd 1
Handler_read_rnd_deleted 1
Handler_read_rnd_next 8
@@ -2360,6 +2778,8 @@ Handler_read_rnd_next 8
# query: UPDATE t1, v1 SET v1.a = 1 WHERE t1.a = v1.a
# select: SELECT * FROM t1, v1 WHERE t1.a = v1.a
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1, v1 SET v1.a = 1 WHERE t1.a = v1.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
@@ -2374,6 +2794,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, v1 WHERE t1.a = v1.a;
@@ -2385,11 +2806,16 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t11`.`a` AS `a`,`test`.`t12`.`a` AS `b` from `test`.`t1` join `test`.`t1` `t11` join `test`.`t1` `t12` where `test`.`t11`.`a` = `test`.`t1`.`a`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 9
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd 2
Handler_read_rnd_deleted 1
Handler_read_rnd_next 18
@@ -2399,12 +2825,14 @@ DROP TABLE t1;
DROP VIEW v1;
#63
CREATE TABLE t1 (a INT, PRIMARY KEY(a));
-INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9);
CREATE VIEW v1 (a) AS SELECT a FROM t1;
#
# query: DELETE FROM v1 WHERE a < 4
# select: SELECT * FROM v1 WHERE a < 4
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE FROM v1 WHERE a < 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where
@@ -2415,6 +2843,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM v1 WHERE a < 4;
@@ -2424,14 +2853,19 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 4
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 3
Handler_read_next 3
# Status of testing query execution:
Variable_name Value
Handler_delete 3
Handler_read_first 1
+Handler_read_key 3
Handler_read_next 3
DROP TABLE t1;
@@ -2446,6 +2880,8 @@ CREATE VIEW v1 (a,c) AS SELECT a, b+1 FROM t1;
# query: DELETE v1 FROM t2, v1 WHERE t2.x = v1.a
# select: SELECT * FROM t2, v1 WHERE t2.x = v1.a
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE v1 FROM t2, v1 WHERE t2.x = v1.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where
@@ -2458,6 +2894,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2, v1 WHERE t2.x = v1.a;
@@ -2468,14 +2905,17 @@ Warnings:
Note 1003 select `test`.`t2`.`x` AS `x`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` + 1 AS `c` from `test`.`t2` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`x`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd_next 5
# Status of testing query execution:
Variable_name Value
Handler_delete 4
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd 4
Handler_read_rnd_next 5
@@ -2491,6 +2931,8 @@ CREATE VIEW v1 (a,c) AS SELECT a, b+1 FROM t1;
# query: DELETE v1 FROM t2, v1 WHERE t2.x = v1.a
# select: SELECT * FROM t2, v1 WHERE t2.x = v1.a
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN DELETE v1 FROM t2, v1 WHERE t2.x = v1.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where
@@ -2503,6 +2945,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2, v1 WHERE t2.x = v1.a;
@@ -2513,14 +2956,17 @@ Warnings:
Note 1003 select `test`.`t2`.`x` AS `x`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` + 1 AS `c` from `test`.`t2` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`x`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd_next 5
# Status of testing query execution:
Variable_name Value
Handler_delete 4
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd 4
Handler_read_rnd_next 5
@@ -2543,6 +2989,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT NULL;
@@ -2556,6 +3003,7 @@ Variable_name Value
Variable_name Value
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_write 1
DROP TABLE t1;
@@ -2569,6 +3017,8 @@ CREATE VIEW v1 (x) AS SELECT b FROM t2;
# query: INSERT INTO v1 SELECT * FROM t1
# select: SELECT * FROM t1
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN INSERT INTO v1 SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found
@@ -2579,6 +3029,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -2589,12 +3040,17 @@ Warnings:
Note 1003 select NULL AS `a` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 1
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 1
DROP TABLE t1, t2;
@@ -2614,6 +3070,8 @@ INSERT INTO t2 VALUES (1), (2), (3);
# query: UPDATE t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x)
# select: SELECT * FROM t1 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
@@ -2628,6 +3086,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
@@ -2640,16 +3099,19 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join ((/* select#3 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 8
Handler_update 1
Sort_priority_queue_sorts 1
@@ -2660,6 +3122,8 @@ Sort_scan 1
# query: UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x)
# select: SELECT * FROM t1, t2 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1, t2 SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
@@ -2678,6 +3142,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
@@ -2691,16 +3156,19 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join ((/* select#3 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) join `test`.`t2` where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
@@ -2710,6 +3178,8 @@ Sort_scan 1
# query: UPDATE t1, (SELECT * FROM t2) y SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x)
# select: SELECT * FROM t1, (SELECT * FROM t2) y WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x)
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1, (SELECT * FROM t2) y SET a = 10 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
@@ -2730,6 +3200,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, (SELECT * FROM t2) y WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
@@ -2743,16 +3214,19 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join ((/* select#4 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) join `test`.`t2` where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
@@ -2792,6 +3266,8 @@ INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
# query: UPDATE t1 SET a=a+1 WHERE a>10
# select: SELECT a t1 FROM t1 WHERE a>10
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a=a+1 WHERE a>10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using buffer
@@ -2802,6 +3278,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10;
@@ -2811,19 +3288,25 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `t1` from `test`.`t1` where `test`.`t1`.`a` > 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 3
Handler_read_next 5
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 4
# used key is modified & Using filesort
#
# query: UPDATE t1 SET a=a+1 WHERE a>10 ORDER BY a+20
# select: SELECT a t1 FROM t1 WHERE a>10 ORDER BY a+20
#
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a=a+1 WHERE a>10 ORDER BY a+20;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort
@@ -2834,6 +3317,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10 ORDER BY a+20;
@@ -2843,13 +3327,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `t1` from `test`.`t1` where `test`.`t1`.`a` > 10 order by `test`.`t1`.`a` + 20
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 6
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 4
Sort_range 1
DROP TABLE t1;
diff --git a/mysql-test/main/myisam_icp.result b/mysql-test/main/myisam_icp.result
index d4255d8daf2..7f0e1d1b516 100644
--- a/mysql-test/main/myisam_icp.result
+++ b/mysql-test/main/myisam_icp.result
@@ -407,7 +407,7 @@ WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 4 Using where
+1 SIMPLE t1 range PRIMARY,k1 PRIMARY 4 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using filesort
DROP TABLE t1;
#
#
@@ -448,11 +448,11 @@ c1 INT NOT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t1 VALUES (1,9),(2,7),(3,6),(4,3),(5,1);
-EXPLAIN SELECT pk, c1 FROM t1 WHERE pk <> 3;
+EXPLAIN SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 5 Using where
SET SESSION optimizer_switch='index_condition_pushdown=off';
-SELECT pk, c1 FROM t1 WHERE pk <> 3;
+SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
pk c1
1 9
2 7
@@ -505,8 +505,8 @@ SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1
WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
(t1.pk > 1 AND t2.pk BETWEEN 6 AND 6);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan
+1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1
WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
(t1.pk > 1 AND t2.pk BETWEEN 6 AND 6);
@@ -588,6 +588,12 @@ i1 INTEGER NOT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t2 VALUES (4,1);
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
WHERE t2.pk <> t1.d1 AND t2.pk = 4;
@@ -645,7 +651,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 13 NULL 2 Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 range b b 13 NULL # Using where; Rowid-ordered scan; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -657,7 +663,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 13 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 range b b 13 NULL # Using index condition; Rowid-ordered scan; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -674,23 +680,23 @@ INSERT INTO t2 VALUES
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
1 SIMPLE t2 ref a a 515 const 1 Using where
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
1 4
SET SESSION optimizer_switch='index_condition_pushdown=on';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
1 SIMPLE t2 ref a a 515 const 1 Using where
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
1 4
@@ -793,6 +799,12 @@ INSERT INTO t2 (g,h) VALUES
(0,'p'),(0,'f'),(0,'p'),(7,'d'),(7,'f'),(5,'j'),
(3,'e'),(1,'u'),(4,'v'),(9,'u'),(6,'i'),(1,'x'),
(7,'f'),(5,'j'),(3,'e'),(1,'u'),(4,'v'),(9,'u');
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status Table is already up to date
SET @save_optimize_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on';
EXPLAIN
@@ -802,7 +814,7 @@ AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)
OR a = 0 AND h < 'z' );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
-1 PRIMARY t2 ref g g 5 test.t.c 19 Using where
+1 PRIMARY t2 ref g g 5 test.t.c 18 Using where
2 DEPENDENT SUBQUERY t1 index PRIMARY PRIMARY 4 NULL 64 Using where; Using index
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
SELECT COUNT(*) FROM t1 AS t, t2
@@ -913,7 +925,7 @@ SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
SELECT a, MIN(c) FROM t1 WHERE b = 'x' AND c > 'x' GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx idx 4 const 1 Using where; Using temporary; Using filesort
+1 SIMPLE t1 ref idx idx 4 const 2 Using where; Using temporary; Using filesort
SELECT a, MIN(c) FROM t1 WHERE b = 'x' AND c > 'x' GROUP BY a;
a MIN(c)
5 y
@@ -921,7 +933,7 @@ SET SESSION optimizer_switch='index_condition_pushdown=on';
EXPLAIN
SELECT a, MIN(c) FROM t1 WHERE b = 'x' AND c > 'x' GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx idx 4 const 1 Using index condition; Using where; Using temporary; Using filesort
+1 SIMPLE t1 ref idx idx 4 const 2 Using index condition; Using where; Using temporary; Using filesort
SELECT a, MIN(c) FROM t1 WHERE b = 'x' AND c > 'x' GROUP BY a;
a MIN(c)
5 y
@@ -976,11 +988,30 @@ set optimizer_switch='mrr=off';
# Must not use ICP:
explain select * from t1 where a between 5 and 8 order by a desc, col desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 39 Using where
+1 SIMPLE t1 range a a 5 NULL 40 Using where
set optimizer_switch= @tmp_10000051;
# Must not use ICP:
explain select * from t1 where a=3 and col > 500 order by a desc, col desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 10 NULL 10 Using where
drop table t0, t1;
+#
+# MDEV-13628: ORed condition in pushed index condition is not removed from the WHERE
+#
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k(a int);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+create table t1 (key1 int not null, filler char(100));
+insert into t1 select A.a + 1000 *B.a, 'filler-data' from one_k A, ten B;
+alter table t1 add key(key1);
+explain select * from t1 where key1 < 3 or key1 > 99999;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range key1 key1 4 NULL 22 Using index condition; Rowid-ordered scan
+select * from t1 where key1 < 3 or key1 > 99999;
+key1 filler
+0 filler-data
+1 filler-data
+2 filler-data
+drop table ten,one_k,t1;
set optimizer_switch=@myisam_icp_tmp;
diff --git a/mysql-test/main/myisam_icp.test b/mysql-test/main/myisam_icp.test
index d1dc35ebba4..a115d0f7caa 100644
--- a/mysql-test/main/myisam_icp.test
+++ b/mysql-test/main/myisam_icp.test
@@ -283,5 +283,20 @@ explain select * from t1 where a=3 and col > 500 order by a desc, col desc;
drop table t0, t1;
+--echo #
+--echo # MDEV-13628: ORed condition in pushed index condition is not removed from the WHERE
+--echo #
+
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k(a int);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+create table t1 (key1 int not null, filler char(100));
+insert into t1 select A.a + 1000 *B.a, 'filler-data' from one_k A, ten B;
+alter table t1 add key(key1);
+explain select * from t1 where key1 < 3 or key1 > 99999;
+select * from t1 where key1 < 3 or key1 > 99999;
+drop table ten,one_k,t1;
+
set optimizer_switch=@myisam_icp_tmp;
diff --git a/mysql-test/main/myisam_mrr,32bit.rdiff b/mysql-test/main/myisam_mrr,32bit.rdiff
new file mode 100644
index 00000000000..746bf48dedd
--- /dev/null
+++ b/mysql-test/main/myisam_mrr,32bit.rdiff
@@ -0,0 +1,13 @@
+--- main/myisam_mrr.result 2019-05-14 15:44:52.232663568 +0530
++++ main/myisam_mrr.reject 2019-05-14 15:51:37.123563538 +0530
+@@ -617,8 +617,8 @@
+ show status like 'handler_mrr%';
+ Variable_name Value
+ Handler_mrr_init 1
+-Handler_mrr_key_refills 1
+-Handler_mrr_rowid_refills 1
++Handler_mrr_key_refills 0
++Handler_mrr_rowid_refills 0
+ set join_buffer_size=10;
+ explain select sum(t1.b) from t0,t1 where t0.a=t1.a;
+ id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/main/myisam_mrr.result b/mysql-test/main/myisam_mrr.result
index 0869faf3000..0cd2873c282 100644
--- a/mysql-test/main/myisam_mrr.result
+++ b/mysql-test/main/myisam_mrr.result
@@ -1,7 +1,7 @@
drop table if exists t0, t1, t2, t3;
set @myisam_mrr_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-set optimizer_switch='optimize_join_buffer_size=off';
+set optimizer_switch='optimize_join_buffer_size=on';
set @mrr_buffer_size_save= @@mrr_buffer_size;
set mrr_buffer_size=79;
Warnings:
@@ -189,7 +189,7 @@ explain
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
or c='no-such-row2');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 range idx1 idx1 29 NULL 10 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t4 range idx1 idx1 29 NULL 10 Using index condition; Rowid-ordered scan
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
or c='no-such-row2');
a b c filler
@@ -211,7 +211,7 @@ NULL NULL NULL NULL-1
explain
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 range idx1 idx1 29 NULL 21 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t4 range idx1 idx1 29 NULL 20 Using index condition; Rowid-ordered scan
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
a b c filler
b-1 NULL c-1 NULL-15
@@ -576,7 +576,7 @@ insert into t1
select A.a+10*B.a+100*C.a+1000*D.a, 123,'filler' from t0 A, t0 B, t0 C, t0 D;
explain select sum(b) from t1 where a < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 8 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range a a 5 NULL 9 Using index condition; Rowid-ordered scan
# This should show one MRR scan and no re-fills:
flush status;
select sum(b) from t1 where a < 10;
@@ -618,8 +618,8 @@ sum(t1.b)
show status like 'handler_mrr%';
Variable_name Value
Handler_mrr_init 1
-Handler_mrr_key_refills 0
-Handler_mrr_rowid_refills 0
+Handler_mrr_key_refills 1
+Handler_mrr_rowid_refills 1
set join_buffer_size=10;
explain select sum(t1.b) from t0,t1 where t0.a=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/main/myisam_mrr.test b/mysql-test/main/myisam_mrr.test
index e3c758d3c10..11c9aa64ef1 100644
--- a/mysql-test/main/myisam_mrr.test
+++ b/mysql-test/main/myisam_mrr.test
@@ -8,11 +8,12 @@ drop table if exists t0, t1, t2, t3;
set @myisam_mrr_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-set optimizer_switch='optimize_join_buffer_size=off';
+set optimizer_switch='optimize_join_buffer_size=on';
set @mrr_buffer_size_save= @@mrr_buffer_size;
set mrr_buffer_size=79;
-- source include/mrr_tests.inc
+-- source include/word_size.inc
set @@mrr_buffer_size= @mrr_buffer_size_save;
diff --git a/mysql-test/main/myisam_recover.result b/mysql-test/main/myisam_recover.result
index 4c655e39ae9..da96682186c 100644
--- a/mysql-test/main/myisam_recover.result
+++ b/mysql-test/main/myisam_recover.result
@@ -88,7 +88,7 @@ a
6
Warnings:
Error 145 Table 't1' is marked as crashed and should be repaired
-Error 1034 Number of rows changed from 3 to 6
+Warning 1034 Number of rows changed from 3 to 6
#
# Cleanup
#
@@ -140,7 +140,7 @@ a
4
Warnings:
Error 145 Table 't1' is marked as crashed and should be repaired
-Error 1034 Number of rows changed from 1 to 2
+Warning 1034 Number of rows changed from 1 to 2
connect con2, localhost, root;
ALTER TABLE t2 ADD val INT;
connection default;
diff --git a/mysql-test/main/myisam_repair.result b/mysql-test/main/myisam_repair.result
new file mode 100644
index 00000000000..50a9695c8c7
--- /dev/null
+++ b/mysql-test/main/myisam_repair.result
@@ -0,0 +1,51 @@
+#
+# MDEV-23318 Assertion `cache_empty(keycache)' failed in
+# prepare_resize_simple_key_cache
+#
+SET @buffer_size.save= @@key_buffer_size;
+SET GLOBAL key_buffer_size= 134217728;
+SET myisam_repair_threads= 6;
+CREATE TABLE t1 (
+pk INT AUTO_INCREMENT,
+a INTEGER,
+b DATE,
+c VARCHAR(1),
+d BLOB,
+PRIMARY KEY (pk),
+KEY (a),
+KEY (b),
+KEY (c, a),
+UNIQUE (d)
+) ENGINE=MyISAM;
+INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
+ALTER TABLE t1 DISABLE KEYS;
+SET GLOBAL c.key_buffer_size= 13700864;
+Warnings:
+Warning 1292 Truncated incorrect key_buffer_size value: '13700864'
+INSERT INTO t1 SELECT 1;
+ERROR 21S01: Column count doesn't match value count at row 1
+SET GLOBAL c.key_buffer_size= 0;
+DROP TABLE t1;
+SET GLOBAL key_buffer_size= 134217728;
+CREATE TABLE t1 (
+pk INT AUTO_INCREMENT,
+a INTEGER,
+b DATE,
+c VARCHAR(1),
+d VARBINARY(40982),
+PRIMARY KEY (pk),
+KEY (a),
+KEY (b),
+KEY (c, a),
+UNIQUE (d)
+) ENGINE=MyISAM;
+INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
+ALTER TABLE t1 DISABLE KEYS;
+SET GLOBAL c.key_buffer_size= 13700864;
+Warnings:
+Warning 1292 Truncated incorrect key_buffer_size value: '13700864'
+INSERT INTO t1 SELECT 1;
+ERROR 21S01: Column count doesn't match value count at row 1
+SET GLOBAL c.key_buffer_size= 0;
+DROP TABLE t1;
+SET GLOBAL key_buffer_size= @buffer_size.save;
diff --git a/mysql-test/main/myisam_repair.test b/mysql-test/main/myisam_repair.test
new file mode 100644
index 00000000000..bcb69d59e2c
--- /dev/null
+++ b/mysql-test/main/myisam_repair.test
@@ -0,0 +1,57 @@
+--source include/have_sequence.inc
+
+
+--echo #
+--echo # MDEV-23318 Assertion `cache_empty(keycache)' failed in
+--echo # prepare_resize_simple_key_cache
+--echo #
+
+SET @buffer_size.save= @@key_buffer_size;
+SET GLOBAL key_buffer_size= 134217728;
+SET myisam_repair_threads= 6;
+
+CREATE TABLE t1 (
+ pk INT AUTO_INCREMENT,
+ a INTEGER,
+ b DATE,
+ c VARCHAR(1),
+ d BLOB,
+ PRIMARY KEY (pk),
+ KEY (a),
+ KEY (b),
+ KEY (c, a),
+ UNIQUE (d)
+) ENGINE=MyISAM;
+
+INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
+
+ALTER TABLE t1 DISABLE KEYS;
+SET GLOBAL c.key_buffer_size= 13700864;
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 SELECT 1;
+SET GLOBAL c.key_buffer_size= 0;
+DROP TABLE t1;
+
+SET GLOBAL key_buffer_size= 134217728;
+
+CREATE TABLE t1 (
+ pk INT AUTO_INCREMENT,
+ a INTEGER,
+ b DATE,
+ c VARCHAR(1),
+ d VARBINARY(40982),
+ PRIMARY KEY (pk),
+ KEY (a),
+ KEY (b),
+ KEY (c, a),
+ UNIQUE (d)
+) ENGINE=MyISAM;
+INSERT INTO t1 (a,b,c) SELECT seq, '2020-12-12', 'x' FROM seq_1_to_20;
+ALTER TABLE t1 DISABLE KEYS;
+SET GLOBAL c.key_buffer_size= 13700864;
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 SELECT 1;
+SET GLOBAL c.key_buffer_size= 0;
+
+DROP TABLE t1;
+SET GLOBAL key_buffer_size= @buffer_size.save;
diff --git a/mysql-test/main/mysql_client_test.result b/mysql-test/main/mysql_client_test.result
index 26afee9e4d7..dbc1feaa23b 100644
--- a/mysql-test/main/mysql_client_test.result
+++ b/mysql-test/main/mysql_client_test.result
@@ -146,7 +146,7 @@ EXPALIN number of fields: 10
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 9: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
EXPALIN JSON number of fields: 1
- 0: name: 'EXPLAIN'/''; table: ''/''; db: ''; catalog: 'def'; length: 234; max_length: 0; type: 253; decimals: 39
@@ -159,8 +159,8 @@ ANALYZE number of fields: 13
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
- - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
+ - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 10: name: 'filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 11: name: 'r_filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 12: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
@@ -175,7 +175,7 @@ EXPALIN INSERT number of fields: 10
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 9: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
EXPALIN JSON INSERT number of fields: 1
- 0: name: 'EXPLAIN'/''; table: ''/''; db: ''; catalog: 'def'; length: 234; max_length: 0; type: 253; decimals: 39
@@ -188,8 +188,8 @@ ANALYZE INSERT number of fields: 13
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
- - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
+ - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 10: name: 'filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 11: name: 'r_filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 12: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
@@ -204,7 +204,7 @@ EXPALIN UPDATE number of fields: 10
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 9: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
EXPALIN JSON UPDATE number of fields: 1
- 0: name: 'EXPLAIN'/''; table: ''/''; db: ''; catalog: 'def'; length: 234; max_length: 0; type: 253; decimals: 39
@@ -217,8 +217,8 @@ ANALYZE UPDATE number of fields: 13
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
- - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
+ - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 10: name: 'filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 11: name: 'r_filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 12: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
@@ -233,7 +233,7 @@ EXPALIN DELETE number of fields: 10
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 9: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
EXPALIN JSON DELETE number of fields: 1
- 0: name: 'EXPLAIN'/''; table: ''/''; db: ''; catalog: 'def'; length: 234; max_length: 0; type: 253; decimals: 39
@@ -246,8 +246,8 @@ ANALYZE DELETE number of fields: 13
- 5: name: 'key'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 6: name: 'key_len'/''; table: ''/''; db: ''; catalog: 'def'; length: 12288; max_length: 0; type: 253; decimals: 39
- 7: name: 'ref'/''; table: ''/''; db: ''; catalog: 'def'; length: 6144; max_length: 0; type: 253; decimals: 39
- - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 10; max_length: 0; type: 8; decimals: 0
- - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 8: name: 'rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
+ - 9: name: 'r_rows'/''; table: ''/''; db: ''; catalog: 'def'; length: 192; max_length: 0; type: 253; decimals: 39
- 10: name: 'filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 11: name: 'r_filtered'/''; table: ''/''; db: ''; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
- 12: name: 'Extra'/''; table: ''/''; db: ''; catalog: 'def'; length: 765; max_length: 0; type: 253; decimals: 39
diff --git a/mysql-test/main/mysql_client_test.test b/mysql-test/main/mysql_client_test.test
index 07d4b43154a..9fb7bcd81c9 100644
--- a/mysql-test/main/mysql_client_test.test
+++ b/mysql-test/main/mysql_client_test.test
@@ -45,6 +45,10 @@ echo ok;
--echo
--echo # cat MYSQL_TMP_DIR/test_explain_meta.out.log
--echo # ------------------------------------
+
+# For MAX_INDEXES=128, max_len for possible_keys column is twice as large vs MAX_INDEXES=64
+--replace_result 24576 12288
+
--cat_file $MYSQL_TMP_DIR/test_explain_meta.out.log
--echo # ------------------------------------
--echo
diff --git a/mysql-test/main/mysql_install_db_win.result b/mysql-test/main/mysql_install_db_win.result
new file mode 100644
index 00000000000..31336847a38
--- /dev/null
+++ b/mysql-test/main/mysql_install_db_win.result
@@ -0,0 +1,17 @@
+Running bootstrap
+Removing default user
+Allowing remote access for user root
+Setting root password
+Creating my.ini file
+Creation of the database was successful
+# Kill the server
+# restart: --datadir=MYSQLTEST_VARDIR/tmp/ddir --loose-innodb
+connect root,localhost,root,foo;
+SELECT @@datadir;
+@@datadir
+DATADIR/
+# Kill the server
+1
+FOUND 1 /is not empty. Only new or empty existing directories are accepted for --datadir/ in install.log
+connection default;
+# restart
diff --git a/mysql-test/main/mysql_install_db_win.test b/mysql-test/main/mysql_install_db_win.test
new file mode 100644
index 00000000000..3f0256e860e
--- /dev/null
+++ b/mysql-test/main/mysql_install_db_win.test
@@ -0,0 +1,48 @@
+--source include/windows.inc
+
+# Create database in tmp directory using mysql_install_db.exe,
+# and start server from this directory.
+let $ddir= $MYSQLTEST_VARDIR/tmp/ddir;
+exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R;
+
+--source include/kill_mysqld.inc
+let $restart_parameters=--datadir=$ddir --loose-innodb;
+--source include/start_mysqld.inc
+
+connect root,localhost,root,foo;
+# Smoke test - check that we're actually using datadir
+# we've created (i.e restart_parameters worked)
+--replace_result $ddir DATADIR
+SELECT @@datadir;
+
+# restart in the original datadir again
+--source include/kill_mysqld.inc
+rmdir $ddir;
+
+# MDEV-23052
+# 1. mysql_install_db works on existing, empty directory
+mkdir $ddir;
+exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R > /dev/null;
+rmdir $ddir;
+
+# 2. mysql_install_db rejects existing, non-empty directory, and does not
+# remove it.
+mkdir $ddir;
+write_file $ddir/1;
+EOF
+
+error 1;
+exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R > $MYSQLTEST_VARDIR/tmp/install.log 2>&1;
+list_files $ddir;
+let $log=$MYSQLTEST_VARDIR/tmp/install.log;
+let SEARCH_FILE=$log;
+let SEARCH_PATTERN=is not empty. Only new or empty existing directories are accepted for --datadir;
+--source include/search_pattern_in_file.inc
+remove_file $log;
+
+rmdir $ddir;
+
+let $restart_parameters=;
+connection default;
+--source include/start_mysqld.inc
+
diff --git a/mysql-test/main/mysql_protocols.result b/mysql-test/main/mysql_protocols.result
index c6207c4f4f5..746e4a46100 100644
--- a/mysql-test/main/mysql_protocols.result
+++ b/mysql-test/main/mysql_protocols.result
@@ -5,6 +5,7 @@ TCP
SOCKET
ok
ERROR 2047 (HY000): Wrong or unknown protocol
-ERROR 2047 (HY000): Wrong or unknown protocol
+Unknown option to protocol: MEMORY
+Alternatives are: 'TCP','SOCKET','PIPE'
Unknown option to protocol: NullS
-Alternatives are: 'TCP','SOCKET','PIPE','MEMORY'
+Alternatives are: 'TCP','SOCKET','PIPE'
diff --git a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result
index 5753a719769..a9ada2d6fdb 100644
--- a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result
+++ b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result
@@ -1,3 +1,14 @@
+use mysql;
+RENAME TABLE time_zone TO time_zone_orig,
+time_zone_name TO time_zone_name_orig,
+time_zone_transition TO time_zone_transition_orig,
+time_zone_transition_type TO time_zone_transition_type_orig,
+time_zone_leap_second TO time_zone_leap_second_orig;
+CREATE TABLE time_zone LIKE time_zone_orig;
+CREATE TABLE time_zone_name LIKE time_zone_name_orig;
+CREATE TABLE time_zone_transition LIKE time_zone_transition_orig;
+CREATE TABLE time_zone_transition_type LIKE time_zone_transition_type_orig;
+CREATE TABLE time_zone_leap_second LIKE time_zone_leap_second_orig;
#
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
#
@@ -9,13 +20,18 @@ ALTER TABLE time_zone ENGINE=InnoDB;
ALTER TABLE time_zone_name ENGINE=InnoDB;
ALTER TABLE time_zone_transition ENGINE=InnoDB;
ALTER TABLE time_zone_transition_type ENGINE=InnoDB;
-END IF|
-\d ;
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
TRUNCATE TABLE time_zone_transition_type;
START TRANSACTION;
+ELSE
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+END IF|
+\d ;
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
@@ -33,19 +49,35 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/ignored.tab' as time zone. Skipping it.
Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid infinite symlink recursion.
+UNLOCK TABLES;
COMMIT;
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
-ALTER TABLE time_zone ENGINE=MyISAM;
-ALTER TABLE time_zone_name ENGINE=MyISAM;
-ALTER TABLE time_zone_transition ENGINE=MyISAM;
-ALTER TABLE time_zone_transition_type ENGINE=MyISAM;
+ALTER TABLE time_zone ENGINE=Aria;
+ALTER TABLE time_zone_name ENGINE=Aria;
+ALTER TABLE time_zone_transition ENGINE=Aria, ORDER BY Time_zone_id, Transition_time;
+ALTER TABLE time_zone_transition_type ENGINE=Aria, ORDER BY Time_zone_id, Transition_type_id;
END IF|
\d ;
-# Silent run
+SELECT COUNT(*) FROM time_zone;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_name;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition_type;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_leap_second;
+COUNT(*)
+0
+# Run on zoneinfo directory
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
@@ -53,13 +85,18 @@ ALTER TABLE time_zone ENGINE=InnoDB;
ALTER TABLE time_zone_name ENGINE=InnoDB;
ALTER TABLE time_zone_transition ENGINE=InnoDB;
ALTER TABLE time_zone_transition_type ENGINE=InnoDB;
-END IF|
-\d ;
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
TRUNCATE TABLE time_zone_transition_type;
START TRANSACTION;
+ELSE
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+END IF|
+\d ;
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
@@ -74,18 +111,87 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
(@time_zone_id, 0, 0, 0, 'GMT')
;
Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
+UNLOCK TABLES;
COMMIT;
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
-ALTER TABLE time_zone ENGINE=MyISAM;
-ALTER TABLE time_zone_name ENGINE=MyISAM;
-ALTER TABLE time_zone_transition ENGINE=MyISAM;
-ALTER TABLE time_zone_transition_type ENGINE=MyISAM;
+ALTER TABLE time_zone ENGINE=Aria;
+ALTER TABLE time_zone_name ENGINE=Aria;
+ALTER TABLE time_zone_transition ENGINE=Aria, ORDER BY Time_zone_id, Transition_time;
+ALTER TABLE time_zone_transition_type ENGINE=Aria, ORDER BY Time_zone_id, Transition_type_id;
END IF|
\d ;
+SELECT COUNT(*) FROM time_zone;
+COUNT(*)
+2
+SELECT COUNT(*) FROM time_zone_name;
+COUNT(*)
+2
+SELECT COUNT(*) FROM time_zone_transition;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition_type;
+COUNT(*)
+2
+SELECT COUNT(*) FROM time_zone_leap_second;
+COUNT(*)
+0
+#
+# Run on zoneinfo directory --skip-write-binlog
+#
+set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
+SET SESSION SQL_LOG_BIN=0;
+execute immediate @prep1;
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+LOCK TABLES time_zone WRITE,
+ time_zone_leap_second WRITE,
+ time_zone_name WRITE,
+ time_zone_transition WRITE,
+ time_zone_transition_type WRITE;
+INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
+SET @time_zone_id= LAST_INSERT_ID();
+INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('GMT', @time_zone_id);
+INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
+ (@time_zone_id, 0, 0, 0, 'GMT')
+;
+Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/garbage' as time zone. Skipping it.
+INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
+SET @time_zone_id= LAST_INSERT_ID();
+INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('posix/GMT', @time_zone_id);
+INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
+ (@time_zone_id, 0, 0, 0, 'GMT')
+;
+Warning: Unable to load 'MYSQLTEST_VARDIR/zoneinfo/posix/garbage' as time zone. Skipping it.
+UNLOCK TABLES;
+COMMIT;
+ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
+ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
+SELECT COUNT(*) FROM time_zone;
+COUNT(*)
+2
+SELECT COUNT(*) FROM time_zone_name;
+COUNT(*)
+2
+SELECT COUNT(*) FROM time_zone_transition;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition_type;
+COUNT(*)
+2
+SELECT COUNT(*) FROM time_zone_leap_second;
+COUNT(*)
+0
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
#
# Testing with explicit timezonefile
#
@@ -96,6 +202,10 @@ ALTER TABLE time_zone ENGINE=InnoDB;
ALTER TABLE time_zone_name ENGINE=InnoDB;
ALTER TABLE time_zone_transition ENGINE=InnoDB;
ALTER TABLE time_zone_transition_type ENGINE=InnoDB;
+SELECT 'skip truncate tables';
+START TRANSACTION;
+ELSE
+SELECT 'skip truncate tables';
END IF|
\d ;
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
@@ -104,15 +214,79 @@ INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('XXX', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'GMT')
;
+UNLOCK TABLES;
+COMMIT;
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
-ALTER TABLE time_zone ENGINE=MyISAM;
-ALTER TABLE time_zone_name ENGINE=MyISAM;
-ALTER TABLE time_zone_transition ENGINE=MyISAM;
-ALTER TABLE time_zone_transition_type ENGINE=MyISAM;
+ALTER TABLE time_zone ENGINE=Aria;
+ALTER TABLE time_zone_name ENGINE=Aria;
+ALTER TABLE time_zone_transition ENGINE=Aria, ORDER BY Time_zone_id, Transition_time;
+ALTER TABLE time_zone_transition_type ENGINE=Aria, ORDER BY Time_zone_id, Transition_type_id;
END IF|
\d ;
+skip truncate tables
+skip truncate tables
+SELECT COUNT(*) FROM time_zone;
+COUNT(*)
+1
+SELECT COUNT(*) FROM time_zone_name;
+COUNT(*)
+1
+SELECT COUNT(*) FROM time_zone_transition;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition_type;
+COUNT(*)
+1
+SELECT COUNT(*) FROM time_zone_leap_second;
+COUNT(*)
+0
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
+#
+# Testing with explicit timezonefile --skip-write-binlog
+#
+set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
+SET SESSION SQL_LOG_BIN=0;
+execute immediate @prep1;
+SELECT 'skip truncate tables';
+LOCK TABLES time_zone WRITE,
+ time_zone_leap_second WRITE,
+ time_zone_name WRITE,
+ time_zone_transition WRITE,
+ time_zone_transition_type WRITE;
+INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
+SET @time_zone_id= LAST_INSERT_ID();
+INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('XXX', @time_zone_id);
+INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
+ (@time_zone_id, 0, 0, 0, 'GMT')
+;
+UNLOCK TABLES;
+COMMIT;
+SELECT COUNT(*) FROM time_zone;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_name;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition_type;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_leap_second;
+COUNT(*)
+0
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
#
# Testing --leap
#
@@ -123,6 +297,10 @@ ALTER TABLE time_zone ENGINE=InnoDB;
ALTER TABLE time_zone_name ENGINE=InnoDB;
ALTER TABLE time_zone_transition ENGINE=InnoDB;
ALTER TABLE time_zone_transition_type ENGINE=InnoDB;
+SELECT 'skip truncate tables';
+START TRANSACTION;
+ELSE
+SELECT 'skip truncate tables';
END IF|
\d ;
\d |
@@ -135,19 +313,76 @@ TRUNCATE TABLE time_zone_leap_second;
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
-ALTER TABLE time_zone_leap_second ENGINE=MyISAM;
+ALTER TABLE time_zone_leap_second ENGINE=Aria;
END IF|
\d ;
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
+UNLOCK TABLES;
+COMMIT;
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
-ALTER TABLE time_zone ENGINE=MyISAM;
-ALTER TABLE time_zone_name ENGINE=MyISAM;
-ALTER TABLE time_zone_transition ENGINE=MyISAM;
-ALTER TABLE time_zone_transition_type ENGINE=MyISAM;
+ALTER TABLE time_zone ENGINE=Aria;
+ALTER TABLE time_zone_name ENGINE=Aria;
+ALTER TABLE time_zone_transition ENGINE=Aria, ORDER BY Time_zone_id, Transition_time;
+ALTER TABLE time_zone_transition_type ENGINE=Aria, ORDER BY Time_zone_id, Transition_type_id;
END IF|
\d ;
+skip truncate tables
+skip truncate tables
+SELECT COUNT(*) FROM time_zone;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_name;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition_type;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_leap_second;
+COUNT(*)
+0
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
+#
+# Testing --skip-write-binlog --leap
+#
+set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
+SET SESSION SQL_LOG_BIN=0;
+execute immediate @prep1;
+SELECT 'skip truncate tables';
+LOCK TABLES time_zone WRITE,
+ time_zone_leap_second WRITE,
+ time_zone_name WRITE,
+ time_zone_transition WRITE,
+ time_zone_transition_type WRITE;
+TRUNCATE TABLE time_zone_leap_second;
+ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
+UNLOCK TABLES;
+COMMIT;
+skip truncate tables
+skip truncate tables
+SELECT COUNT(*) FROM time_zone;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_name;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_transition_type;
+COUNT(*)
+0
+SELECT COUNT(*) FROM time_zone_leap_second;
+COUNT(*)
+0
#
# MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
#
@@ -157,17 +392,33 @@ END IF|
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
SET SESSION SQL_LOG_BIN=0;
execute immediate @prep1;
+SELECT 'skip truncate tables';
+LOCK TABLES time_zone WRITE,
+ time_zone_leap_second WRITE,
+ time_zone_name WRITE,
+ time_zone_transition WRITE,
+ time_zone_transition_type WRITE;
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('XXX', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'GMT')
;
+UNLOCK TABLES;
+COMMIT;
set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');
SET SESSION SQL_LOG_BIN=0;
execute immediate @prep1;
+SELECT 'skip truncate tables';
+LOCK TABLES time_zone WRITE,
+ time_zone_leap_second WRITE,
+ time_zone_name WRITE,
+ time_zone_transition WRITE,
+ time_zone_transition_type WRITE;
TRUNCATE TABLE time_zone_leap_second;
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
+UNLOCK TABLES;
+COMMIT;
#
# End of 10.2 tests
#
@@ -181,22 +432,38 @@ ALTER TABLE time_zone ENGINE=InnoDB;
ALTER TABLE time_zone_name ENGINE=InnoDB;
ALTER TABLE time_zone_transition ENGINE=InnoDB;
ALTER TABLE time_zone_transition_type ENGINE=InnoDB;
-END IF|
-\d ;
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
TRUNCATE TABLE time_zone_transition_type;
START TRANSACTION;
+ELSE
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+END IF|
+\d ;
+UNLOCK TABLES;
COMMIT;
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
-ALTER TABLE time_zone ENGINE=MyISAM;
-ALTER TABLE time_zone_name ENGINE=MyISAM;
-ALTER TABLE time_zone_transition ENGINE=MyISAM;
-ALTER TABLE time_zone_transition_type ENGINE=MyISAM;
+ALTER TABLE time_zone ENGINE=Aria;
+ALTER TABLE time_zone_name ENGINE=Aria;
+ALTER TABLE time_zone_transition ENGINE=Aria, ORDER BY Time_zone_id, Transition_time;
+ALTER TABLE time_zone_transition_type ENGINE=Aria, ORDER BY Time_zone_id, Transition_type_id;
END IF|
\d ;
+DROP TABLE time_zone;
+DROP TABLE time_zone_name;
+DROP TABLE time_zone_transition;
+DROP TABLE time_zone_transition_type;
+DROP TABLE time_zone_leap_second;
+RENAME TABLE time_zone_orig TO time_zone,
+time_zone_name_orig TO time_zone_name,
+time_zone_transition_orig TO time_zone_transition,
+time_zone_transition_type_orig TO time_zone_transition_type,
+time_zone_leap_second_orig TO time_zone_leap_second;
diff --git a/mysql-test/main/mysql_tzinfo_to_sql_symlink.test b/mysql-test/main/mysql_tzinfo_to_sql_symlink.test
index fcb5916c4a2..8970bf88341 100644
--- a/mysql-test/main/mysql_tzinfo_to_sql_symlink.test
+++ b/mysql-test/main/mysql_tzinfo_to_sql_symlink.test
@@ -1,5 +1,18 @@
--source include/have_symlink.inc
--source include/not_windows.inc
+--source include/not_embedded.inc
+
+use mysql;
+RENAME TABLE time_zone TO time_zone_orig,
+ time_zone_name TO time_zone_name_orig,
+ time_zone_transition TO time_zone_transition_orig,
+ time_zone_transition_type TO time_zone_transition_type_orig,
+ time_zone_leap_second TO time_zone_leap_second_orig;
+CREATE TABLE time_zone LIKE time_zone_orig;
+CREATE TABLE time_zone_name LIKE time_zone_name_orig;
+CREATE TABLE time_zone_transition LIKE time_zone_transition_orig;
+CREATE TABLE time_zone_transition_type LIKE time_zone_transition_type_orig;
+CREATE TABLE time_zone_leap_second LIKE time_zone_leap_second_orig;
--echo #
--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
@@ -14,10 +27,41 @@
--echo # Verbose run
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_TZINFO_TO_SQL --verbose $MYSQLTEST_VARDIR/zoneinfo 2>&1
+SELECT COUNT(*) FROM time_zone;
+SELECT COUNT(*) FROM time_zone_name;
+SELECT COUNT(*) FROM time_zone_transition;
+SELECT COUNT(*) FROM time_zone_transition_type;
+SELECT COUNT(*) FROM time_zone_leap_second;
---echo # Silent run
+--echo # Run on zoneinfo directory
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>&1
+--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>/dev/null | $MYSQL -S $MASTER_MYSOCK -u root mysql
+SELECT COUNT(*) FROM time_zone;
+SELECT COUNT(*) FROM time_zone_name;
+SELECT COUNT(*) FROM time_zone_transition;
+SELECT COUNT(*) FROM time_zone_transition_type;
+SELECT COUNT(*) FROM time_zone_leap_second;
+
+--echo #
+--echo # Run on zoneinfo directory --skip-write-binlog
+--echo #
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog $MYSQLTEST_VARDIR/zoneinfo 2>&1
+--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog $MYSQLTEST_VARDIR/zoneinfo 2>/dev/null | $MYSQL -S $MASTER_MYSOCK -u root mysql
+SELECT COUNT(*) FROM time_zone;
+SELECT COUNT(*) FROM time_zone_name;
+SELECT COUNT(*) FROM time_zone_transition;
+SELECT COUNT(*) FROM time_zone_transition_type;
+SELECT COUNT(*) FROM time_zone_leap_second;
+
+# Below tests don't include TRUNCATE TABLE so clear them.
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
--echo #
--echo # Testing with explicit timezonefile
@@ -25,12 +69,66 @@
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo/GMT XXX 2>&1
+--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo/GMT XXX 2>/dev/null | $MYSQL -S $MASTER_MYSOCK -u root mysql
+SELECT COUNT(*) FROM time_zone;
+SELECT COUNT(*) FROM time_zone_name;
+SELECT COUNT(*) FROM time_zone_transition;
+SELECT COUNT(*) FROM time_zone_transition_type;
+SELECT COUNT(*) FROM time_zone_leap_second;
+
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
+
+--echo #
+--echo # Testing with explicit timezonefile --skip-write-binlog
+--echo #
+
+--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog $MYSQLTEST_VARDIR/zoneinfo/GMT XXX 2>&1
+--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog $MYSQLTEST_VARDIR/zoneinfo/GMT 2>/dev/null | $MYSQL -S $MASTER_MYSOCK -u root mysql
+SELECT COUNT(*) FROM time_zone;
+SELECT COUNT(*) FROM time_zone_name;
+SELECT COUNT(*) FROM time_zone_transition;
+SELECT COUNT(*) FROM time_zone_transition_type;
+SELECT COUNT(*) FROM time_zone_leap_second;
+
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
--echo #
--echo # Testing --leap
--echo #
--exec $MYSQL_TZINFO_TO_SQL --leap $MYSQLTEST_VARDIR/zoneinfo/GMT 2>&1
+--exec $MYSQL_TZINFO_TO_SQL --leap $MYSQLTEST_VARDIR/zoneinfo/GMT 2>/dev/null | $MYSQL -S $MASTER_MYSOCK -u root mysql
+SELECT COUNT(*) FROM time_zone;
+SELECT COUNT(*) FROM time_zone_name;
+SELECT COUNT(*) FROM time_zone_transition;
+SELECT COUNT(*) FROM time_zone_transition_type;
+SELECT COUNT(*) FROM time_zone_leap_second;
+
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+TRUNCATE TABLE time_zone_leap_second;
+
+--echo #
+--echo # Testing --skip-write-binlog --leap
+--echo #
+
+--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog --leap $MYSQLTEST_VARDIR/zoneinfo/GMT 2>&1
+--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog --leap $MYSQLTEST_VARDIR/zoneinfo/GMT 2>/dev/null | $MYSQL -S $MASTER_MYSOCK -u root mysql
+SELECT COUNT(*) FROM time_zone;
+SELECT COUNT(*) FROM time_zone_name;
+SELECT COUNT(*) FROM time_zone_transition;
+SELECT COUNT(*) FROM time_zone_transition_type;
+SELECT COUNT(*) FROM time_zone_leap_second;
--echo #
--echo # MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
@@ -65,3 +163,13 @@
--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>&1
--exec rm -rf $MYSQLTEST_VARDIR/zoneinfo
+DROP TABLE time_zone;
+DROP TABLE time_zone_name;
+DROP TABLE time_zone_transition;
+DROP TABLE time_zone_transition_type;
+DROP TABLE time_zone_leap_second;
+RENAME TABLE time_zone_orig TO time_zone,
+ time_zone_name_orig TO time_zone_name,
+ time_zone_transition_orig TO time_zone_transition,
+ time_zone_transition_type_orig TO time_zone_transition_type,
+ time_zone_leap_second_orig TO time_zone_leap_second;
diff --git a/mysql-test/main/mysql_upgrade-20228.result b/mysql-test/main/mysql_upgrade-20228.result
new file mode 100644
index 00000000000..30ded626f5a
--- /dev/null
+++ b/mysql-test/main/mysql_upgrade-20228.result
@@ -0,0 +1,69 @@
+#
+# MDEV-20228 `mysql_upgrade` fails on every version upgrade: "ERROR 1267 (HY000) at line 7: Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'"
+#
+SET sql_mode="";
+SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
+#
+# Changing character_set_client and collation_connection
+# for the VIEW mysql.user to utf8mb4/utf8mb4_unicode_ci,
+# to emulate that mysql.user was created by 'mysqld --bootstrap'
+# using mysqld compiled with
+# -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_unicode_ci
+#
+SELECT CHARACTER_SET_CLIENT, COLLATION_CONNECTION
+FROM INFORMATION_SCHEMA.VIEWS
+WHERE TABLE_SCHEMA='mysql' AND TABLE_NAME='user';
+CHARACTER_SET_CLIENT COLLATION_CONNECTION
+utf8mb4 utf8mb4_unicode_ci
+# Running mysql_upgrade
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats OK
+mysql.innodb_table_stats OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry OK
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+#
+# Restoring character_set_client and collation_connection back
+# so post-check returns the expected check-mysqld_1.result
+#
+SET NAMES latin1;
diff --git a/mysql-test/main/mysql_upgrade-20228.test b/mysql-test/main/mysql_upgrade-20228.test
new file mode 100644
index 00000000000..32c05fd1245
--- /dev/null
+++ b/mysql-test/main/mysql_upgrade-20228.test
@@ -0,0 +1,55 @@
+-- source include/mysql_upgrade_preparation.inc
+-- source include/have_working_dns.inc
+-- source include/have_innodb.inc
+-- source include/have_partition.inc
+
+if (!`SELECT count(*) FROM INFORMATION_SCHEMA.VIEWS
+ WHERE TABLE_SCHEMA='mysql' AND TABLE_NAME='user'
+ AND CHARACTER_SET_CLIENT='latin1'
+ AND COLLATION_CONNECTION='latin1_swedish_ci'`)
+{
+ Skip Needs character_set_client=latin1 and collation_connection=latin1_swedish_ci in mysql.views;
+}
+
+
+--echo #
+--echo # MDEV-20228 `mysql_upgrade` fails on every version upgrade: "ERROR 1267 (HY000) at line 7: Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'"
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+SET sql_mode="";
+SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+--echo #
+--echo # Changing character_set_client and collation_connection
+--echo # for the VIEW mysql.user to utf8mb4/utf8mb4_unicode_ci,
+--echo # to emulate that mysql.user was created by 'mysqld --bootstrap'
+--echo # using mysqld compiled with
+--echo # -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_unicode_ci
+--echo #
+
+--disable_query_log
+let $def= `SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA='mysql' AND TABLE_NAME='user'`;
+--eval ALTER VIEW mysql.user AS $def;
+--enable_query_log
+
+SELECT CHARACTER_SET_CLIENT, COLLATION_CONNECTION
+FROM INFORMATION_SCHEMA.VIEWS
+WHERE TABLE_SCHEMA='mysql' AND TABLE_NAME='user';
+
+--echo # Running mysql_upgrade
+--exec $MYSQL_UPGRADE --default-character-set=utf8mb4 --force 2>&1
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo #
+--echo # Restoring character_set_client and collation_connection back
+--echo # so post-check returns the expected check-mysqld_1.result
+--echo #
+
+SET NAMES latin1;
+--disable_query_log
+let $def= `SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA='mysql' AND TABLE_NAME='user'`;
+--eval ALTER VIEW mysql.user AS $def;
+--enable_query_log
diff --git a/mysql-test/main/mysql_upgrade-6984.result b/mysql-test/main/mysql_upgrade-6984.result
index 6c711b4847f..120f7cf733c 100644
--- a/mysql-test/main/mysql_upgrade-6984.result
+++ b/mysql-test/main/mysql_upgrade-6984.result
@@ -1,4 +1,4 @@
-update mysql.user set password=password("foo") where user='root';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')) where user='root';
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
@@ -7,12 +7,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats
Error : Unknown storage engine 'InnoDB'
@@ -36,7 +36,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -50,6 +49,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -63,6 +63,6 @@ test
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
connect con1,localhost,root,foo,,,;
-update mysql.user set password='' where user='root';
+update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$.authentication_string')) where user='root';
flush privileges;
set global event_scheduler=OFF;
diff --git a/mysql-test/main/mysql_upgrade-6984.test b/mysql-test/main/mysql_upgrade-6984.test
index 89ebd46e3ba..d6d06a1e05e 100644
--- a/mysql-test/main/mysql_upgrade-6984.test
+++ b/mysql-test/main/mysql_upgrade-6984.test
@@ -11,14 +11,14 @@
# In this setup MYSQL_UPGRADE cannot continue after issuing FLUSH PRIVILEGES
#
-update mysql.user set password=password("foo") where user='root';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')) where user='root';
--replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/
--exec $MYSQL_UPGRADE
connect(con1,localhost,root,foo,,,);
-update mysql.user set password='' where user='root';
+update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$.authentication_string')) where user='root';
flush privileges;
# Load event table
set global event_scheduler=OFF;
diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result
index d750f8f91b5..9ed34ad9028 100644
--- a/mysql-test/main/mysql_upgrade.result
+++ b/mysql-test/main/mysql_upgrade.result
@@ -8,12 +8,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -31,9 +31,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -58,12 +58,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -81,9 +81,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -107,12 +107,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -130,9 +130,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -162,12 +162,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -185,9 +185,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -217,12 +217,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -240,9 +240,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -275,12 +275,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -298,9 +298,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -318,7 +318,7 @@ Grants for user3@%
GRANT USAGE ON *.* TO `user3`@`%`
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO `user3`@`%`
DROP USER 'user3'@'%';
-End of 5.1 tests
+# End of 5.1 tests
The --upgrade-system-tables option was used, user tables won't be touched.
Phase 1/7: Checking and upgrading mysql database
Processing databases
@@ -328,12 +328,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -351,7 +351,6 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views... Skipped
Phase 4/7: Running 'mysql_fix_privilege_tables'
@@ -373,12 +372,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -396,9 +395,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -442,12 +441,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -465,9 +464,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -509,7 +508,7 @@ length(table_name)
79
79
drop table extralongname_extralongname_extralongname_extralongname_ext;
-End of 10.0 tests
+# End of 10.0 tests
set sql_mode=default;
# Droping the previously created mysql_upgrade_info file..
create table test.t1(a int) engine=MyISAM;
@@ -523,12 +522,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -546,9 +545,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -573,11 +572,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE test.t1;
SET GLOBAL enforce_storage_engine=NULL;
-End of 10.1 tests
+# End of 10.1 tests
#
# MDEV-23201 'Roles' are created incorrectly on an install that was previously MySQL 5.7
#
#
+DROP VIEW mysql.user;
FLUSH TABLES mysql.user;
FLUSH PRIVILEGES;
SHOW CREATE TABLE mysql.user;
@@ -638,12 +638,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -679,76 +679,28 @@ test
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
SHOW CREATE TABLE mysql.user;
-Table Create Table
-user CREATE TABLE `user` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `ssl_cipher` blob NOT NULL,
- `x509_issuer` blob NOT NULL,
- `x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
- `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
- `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
- `max_user_connections` int(11) NOT NULL DEFAULT 0,
- `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
- `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
- `password_last_changed` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `password_lifetime` smallint(5) unsigned DEFAULT NULL,
- `account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
+View Create View character_set_client collation_connection
+user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `mysql`.`user` AS select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` latin1 latin1_swedish_ci
CREATE ROLE `aRole`;
SET ROLE `aRole`;
FLUSH PRIVILEGES;
SET ROLE `aRole`;
SELECT `User`, `is_role` FROM `mysql`.`user`;
User is_role
-mysql.session N
+mariadb.sys N
+root N
+root N
+root N
root N
-mysql.sys N
aRole Y
DROP ROLE aRole;
#
-# MDEV-24122: Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201
-#
+# MDEV-24122 Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201
#
-DROP TABLE IF EXISTS mysql.user;
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
+drop table mysql.user;
+truncate table mysql.tables_priv;
FLUSH TABLES mysql.user;
ALTER TABLE mysql.user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
ALTER TABLE mysql.user ADD default_role char(80) binary DEFAULT '' NOT NULL;
@@ -762,12 +714,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv_bak OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -801,60 +753,8 @@ test
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
SHOW CREATE TABLE mysql.user;
-Table Create Table
-user CREATE TABLE `user` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `ssl_cipher` blob NOT NULL,
- `x509_issuer` blob NOT NULL,
- `x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
- `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
- `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
- `max_user_connections` int(11) NOT NULL DEFAULT 0,
- `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
- `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
- `password_last_changed` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `password_lifetime` smallint(5) unsigned DEFAULT NULL,
- `account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
+View Create View character_set_client collation_connection
+user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `mysql`.`user` AS select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` latin1 latin1_swedish_ci
CREATE ROLE `aRole`;
SET DEFAULT ROLE aRole;
SHOW GRANTS;
@@ -901,17 +801,21 @@ You can use --force if you still want to run mysql_upgrade
Major version upgrade detected from MariaDB to MariaDB . Check required!
Looking for 'mysql' as: mysql
Major version upgrade detected from MariaDB to MariaDB . Check required!
-End of 10.2 tests
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+# End of 10.2 tests
#
# Ensure that mysql_upgrade correctly sets truncate_versioning_priv
# on upgrade from 10.2
#
-flush privileges;
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
CREATE USER 'user3'@'%';
GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
alter table mysql.user drop column Delete_history_priv;
alter table mysql.db drop column Delete_history_priv;
+# restart
Run mysql_upgrade with all privileges on a user
flush privileges;
SHOW GRANTS FOR 'user3'@'%';
@@ -920,4 +824,165 @@ GRANT USAGE ON *.* TO `user3`@`%`
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO `user3`@`%`
DROP USER 'user3'@'%';
update mysql.db set Delete_history_priv='Y' where db like 'test%';
-End of 10.3 tests
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+# End of 10.3 tests
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
+create user 'user3'@'localhost' identified with mysql_native_password as password('a_password');
+show create user user3@localhost;
+CREATE USER for user3@localhost
+CREATE USER `user3`@`localhost` IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
+update mysql.user set password=authentication_string, authentication_string='' where user='user3';
+select password,plugin,authentication_string from mysql.user where user='user3';
+password plugin authentication_string
+*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA mysql_native_password
+flush privileges;
+show create user user3@localhost;
+CREATE USER for user3@localhost
+CREATE USER `user3`@`localhost` IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA' PASSWORD EXPIRE NEVER
+connect con1,localhost,user3,a_password;
+select current_user();
+current_user()
+user3@localhost
+disconnect con1;
+connection default;
+# mysql_upgrade --force --silent 2>&1
+show create user user3@localhost;
+CREATE USER for user3@localhost
+CREATE USER `user3`@`localhost` IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
+connect con1,localhost,user3,a_password;
+select current_user();
+current_user()
+user3@localhost
+disconnect con1;
+connection default;
+drop user user3@localhost;
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
+drop table mysql.innodb_index_stats, mysql.innodb_table_stats;
+# mysql_upgrade --force --silent 2>&1
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
+alter table mysql.user change authentication_string auth_string text collate utf8_bin not null;
+# mysql_upgrade --force --silent 2>&1
+select count(*) from mysql.global_priv;
+count(*)
+5
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+#
+# Ensure that mysql_upgrade accounted for 0 password_last_changed
+# and doesn't PASSWORD EXPIRE a user account because < 10.4 zeroed it.
+#
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
+drop table mysql.user;
+truncate table mysql.tables_priv;
+FLUSH TABLES mysql.user;
+FLUSH PRIVILEGES;
+CREATE USER mariadb_102;
+UPDATE mysql.user SET password_last_changed=0 WHERE user='mariadb_102';
+FLUSH PRIVILEGES;
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv_bak OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats OK
+mysql.innodb_table_stats OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry OK
+mysql.user OK
+Upgrading from a version before MariaDB-10.1
+Phase 2/7: Installing used storage engines
+Checking for tables with unknown storage engine
+Phase 3/7: Fixing views
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+SHOW CREATE USER mariadb_102;
+CREATE USER for mariadb_102@%
+CREATE USER `mariadb_102`@`%`
+connect con1,localhost,mariadb_102;
+select current_user();
+current_user()
+mariadb_102@%
+disconnect con1;
+connection default;
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+#
+# MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade
+#
+create or replace table pet4 (
+build_time double(18, 7) default null,
+key idx1 (build_time)
+) engine innodb;
+check table pet4;
+Table Op Msg_type Msg_text
+test.pet4 check error Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
+check table pet4 for upgrade;
+Table Op Msg_type Msg_text
+test.pet4 check error Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
+alter table pet4 add i1 int, algorithm=nocopy;
+ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
+# Running mysqlcheck
+test.pet4
+error : Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
+
+Repairing tables
+check table pet4;
+Table Op Msg_type Msg_text
+test.pet4 check status OK
+alter table pet4 add i1 int, algorithm=nocopy;
+create or replace table pet4 (
+build_time double(18, 7) default null,
+key idx1 (build_time)
+) engine innodb;
+alter table pet4 add i1 int, algorithm=nocopy;
+ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
+# Running mysql_upgrade
+test.pet4
+error : Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
+check table pet4;
+Table Op Msg_type Msg_text
+test.pet4 check status OK
+alter table pet4 add i1 int, algorithm=nocopy;
+drop table pet4;
+# End of 10.4 tests
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index 0e42bb81fd9..b0a1ffaa9d9 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -106,8 +106,7 @@ SHOW GRANTS FOR 'user3'@'%';
DROP USER 'user3'@'%';
---echo End of 5.1 tests
-
+--echo # End of 5.1 tests
#
# Test the --upgrade-system-tables option
@@ -193,7 +192,7 @@ create table extralongname_extralongname_extralongname_extralongname_ext (
select length(table_name) from mysql.innodb_table_stats;
drop table extralongname_extralongname_extralongname_extralongname_ext;
---echo End of 10.0 tests
+--echo # End of 10.0 tests
set sql_mode=default;
@@ -219,7 +218,7 @@ DROP TABLE test.t1;
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
SET GLOBAL enforce_storage_engine=NULL;
---echo End of 10.1 tests
+--echo # End of 10.1 tests
--echo #
--echo # MDEV-23201 'Roles' are created incorrectly on an install that was previously MySQL 5.7
@@ -227,9 +226,7 @@ SET GLOBAL enforce_storage_engine=NULL;
--echo #
--exec $MYSQL_DUMP --result-file $MYSQLTEST_VARDIR/tmp/user.sql mysql user
---remove_file $MYSQLD_DATADIR/mysql/user.frm
---remove_file $MYSQLD_DATADIR/mysql/user.MYI
---remove_file $MYSQLD_DATADIR/mysql/user.MYD
+DROP VIEW mysql.user;
--copy_file std_data/mysql57user.frm $MYSQLD_DATADIR/mysql/user.frm
--copy_file std_data/mysql57user.MYI $MYSQLD_DATADIR/mysql/user.MYI
@@ -253,13 +250,13 @@ SELECT `User`, `is_role` FROM `mysql`.`user`;
DROP ROLE aRole;
--echo #
---echo # MDEV-24122: Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201
---echo #
+--echo # MDEV-24122 Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201
--echo #
-# For 10.4 merge - dropping the view.
-# DROP VIEW IF EXISTS mysql.user;
-DROP TABLE IF EXISTS mysql.user;
+--source include/switch_to_mysql_user.inc
+drop view mysql.user_bak;
+drop table mysql.user;
+truncate table mysql.tables_priv;
--copy_file std_data/mysql57user.frm $MYSQLD_DATADIR/mysql/user.frm
--copy_file std_data/mysql57user.MYI $MYSQLD_DATADIR/mysql/user.MYI
--copy_file std_data/mysql57user.MYD $MYSQLD_DATADIR/mysql/user.MYD
@@ -357,15 +354,18 @@ EOF
--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mysql.* as:[^\n]*/'mysql' as: mysql/
--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
---echo End of 10.2 tests
+--echo # End of 10.2 tests
--echo #
--echo # Ensure that mysql_upgrade correctly sets truncate_versioning_priv
--echo # on upgrade from 10.2
--echo #
-flush privileges;
+--source include/switch_to_mysql_user.inc
+drop view mysql.user_bak;
CREATE USER 'user3'@'%';
GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
@@ -379,5 +379,137 @@ flush privileges;
SHOW GRANTS FOR 'user3'@'%';
DROP USER 'user3'@'%';
update mysql.db set Delete_history_priv='Y' where db like 'test%';
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+
+--echo # End of 10.3 tests
+
+--source include/switch_to_mysql_user.inc
+drop view mysql.user_bak;
+create user 'user3'@'localhost' identified with mysql_native_password as password('a_password');
+show create user user3@localhost;
+update mysql.user set password=authentication_string, authentication_string='' where user='user3';
+select password,plugin,authentication_string from mysql.user where user='user3';
+flush privileges;
+show create user user3@localhost;
+connect con1,localhost,user3,a_password;
+select current_user();
+disconnect con1;
+connection default;
+--echo # mysql_upgrade --force --silent 2>&1
+--exec $MYSQL_UPGRADE --force --silent 2>&1
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+show create user user3@localhost;
+connect con1,localhost,user3,a_password;
+select current_user();
+disconnect con1;
+connection default;
+drop user user3@localhost;
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+
+#
+# MDEV-18275 Live upgrade from 5.5 does not work: InnoDB stat tables are used before creation
+#
+--source include/switch_to_mysql_user.inc
+drop view mysql.user_bak;
+drop table mysql.innodb_index_stats, mysql.innodb_table_stats;
+--echo # mysql_upgrade --force --silent 2>&1
+--exec $MYSQL_UPGRADE --force --silent 2>&1
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+
+#
+# MDEV-21244 mysql_upgrade creating empty global_priv table
+#
+--source include/switch_to_mysql_user.inc
+drop view mysql.user_bak;
+alter table mysql.user change authentication_string auth_string text collate utf8_bin not null;
+--echo # mysql_upgrade --force --silent 2>&1
+--exec $MYSQL_UPGRADE --force --silent 2>&1
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+select count(*) from mysql.global_priv;
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+
+#
+# MDEV-26363 Former mysql-5.7 tables have password_last_changed to 0
+# on MariaDB updates, resulting in mysql_upgrade leaving them
+# with password expired.
+#
+
+--echo #
+--echo # Ensure that mysql_upgrade accounted for 0 password_last_changed
+--echo # and doesn't PASSWORD EXPIRE a user account because < 10.4 zeroed it.
+--echo #
+
+--source include/switch_to_mysql_user.inc
+drop view mysql.user_bak;
+drop table mysql.user;
+truncate table mysql.tables_priv;
+--copy_file std_data/mysql57user.frm $MYSQLD_DATADIR/mysql/user.frm
+--copy_file std_data/mysql57user.MYI $MYSQLD_DATADIR/mysql/user.MYI
+--copy_file std_data/mysql57user.MYD $MYSQLD_DATADIR/mysql/user.MYD
+FLUSH TABLES mysql.user;
+FLUSH PRIVILEGES;
+
+CREATE USER mariadb_102;
+# manually set the value like <10.4 previously did for testing mysql_upgrade.
+UPDATE mysql.user SET password_last_changed=0 WHERE user='mariadb_102';
+FLUSH PRIVILEGES;
+
+--exec $MYSQL_UPGRADE --force 2>&1
+# Should not have "PASSWORD EXPIRED"
+SHOW CREATE USER mariadb_102;
+connect con1,localhost,mariadb_102;
+select current_user();
+disconnect con1;
+connection default;
+
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo #
+--echo # MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade
+--echo #
+create or replace table pet4 (
+ build_time double(18, 7) default null,
+ key idx1 (build_time)
+) engine innodb;
+
+--remove_file $MYSQLD_DATADIR/test/pet4.frm
+--copy_file std_data/mdev-28727-pet4.frm $MYSQLD_DATADIR/test/pet4.frm
+
+check table pet4;
+check table pet4 for upgrade;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table pet4 add i1 int, algorithm=nocopy;
+
+--echo # Running mysqlcheck
+--exec $MYSQL_CHECK --auto-repair --databases test 2>&1
+check table pet4;
+alter table pet4 add i1 int, algorithm=nocopy;
+
+create or replace table pet4 (
+ build_time double(18, 7) default null,
+ key idx1 (build_time)
+) engine innodb;
+
+--remove_file $MYSQLD_DATADIR/test/pet4.frm
+--copy_file std_data/mdev-28727-pet4.frm $MYSQLD_DATADIR/test/pet4.frm
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table pet4 add i1 int, algorithm=nocopy;
+
+--echo # Running mysql_upgrade
+--exec $MYSQL_UPGRADE --silent 2>&1
+file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
+check table pet4;
+alter table pet4 add i1 int, algorithm=nocopy;
+
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+drop table pet4;
---echo End of 10.3 tests
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/mysql_upgrade_no_innodb.result b/mysql-test/main/mysql_upgrade_no_innodb.result
index 8e051bb7c16..35b55bb45e0 100644
--- a/mysql-test/main/mysql_upgrade_no_innodb.result
+++ b/mysql-test/main/mysql_upgrade_no_innodb.result
@@ -7,12 +7,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats
Error : Unknown storage engine 'InnoDB'
@@ -36,7 +36,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
diff --git a/mysql-test/main/mysql_upgrade_noengine.result b/mysql-test/main/mysql_upgrade_noengine.result
index 8bd82dce7af..2e62d72538f 100644
--- a/mysql-test/main/mysql_upgrade_noengine.result
+++ b/mysql-test/main/mysql_upgrade_noengine.result
@@ -1,3 +1,5 @@
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
install soname 'ha_blackhole';
install soname 'ha_archive';
create table t1 (a int) engine=blackhole;
@@ -62,12 +64,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv_bak OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -142,6 +144,10 @@ Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
alter table mysql.user drop column default_role, drop column max_statement_time;
# still upgrade from 10.1
Major version upgrade detected from MariaDB to MariaDB . Check required!
@@ -153,12 +159,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv_bak OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -233,6 +239,10 @@ Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
alter table mysql.user drop column default_role, drop column max_statement_time;
# upgrade from 10.0 - engines are enabled
Phase 1/7: Checking and upgrading mysql database
@@ -243,12 +253,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv_bak OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -310,3 +320,5 @@ table_comment
drop table t1, t2;
uninstall plugin blackhole;
uninstall plugin archive;
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
diff --git a/mysql-test/main/mysql_upgrade_noengine.test b/mysql-test/main/mysql_upgrade_noengine.test
index cf7b84feff4..48a007c4557 100644
--- a/mysql-test/main/mysql_upgrade_noengine.test
+++ b/mysql-test/main/mysql_upgrade_noengine.test
@@ -11,6 +11,9 @@ if (!$HA_ARCHIVE_SO) {
skip Need Archive plugin;
}
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
let $datadir= `select @@datadir`;
install soname 'ha_blackhole';
@@ -34,6 +37,11 @@ exec $MYSQL_UPGRADE 2>&1;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
# pretend it's an upgrade from 10.0
alter table mysql.user drop column default_role, drop column max_statement_time;
@@ -49,6 +57,11 @@ exec $MYSQL_UPGRADE 2>&1;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
alter table mysql.user drop column default_role, drop column max_statement_time;
remove_file $datadir/mysql_upgrade_info;
@@ -63,3 +76,6 @@ drop table t1, t2;
remove_file $datadir/mysql_upgrade_info;
uninstall plugin blackhole;
uninstall plugin archive;
+
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
diff --git a/mysql-test/main/mysql_upgrade_ssl.result b/mysql-test/main/mysql_upgrade_ssl.result
index 172a1401cdb..ff911e9f54b 100644
--- a/mysql-test/main/mysql_upgrade_ssl.result
+++ b/mysql-test/main/mysql_upgrade_ssl.result
@@ -9,12 +9,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -32,9 +32,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/mysql_upgrade_view.result b/mysql-test/main/mysql_upgrade_view.result
index 172ef7e4159..d22298c6ed0 100644
--- a/mysql-test/main/mysql_upgrade_view.result
+++ b/mysql-test/main/mysql_upgrade_view.result
@@ -71,12 +71,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats
Error : Unknown storage engine 'InnoDB'
@@ -100,7 +100,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -114,6 +113,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
test.v1 OK
test.v1badcheck OK
test.v2 OK
@@ -221,12 +221,12 @@ mysql.db OK
mysql.ev_bk OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats
Error : Unknown storage engine 'InnoDB'
@@ -250,7 +250,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -264,6 +263,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql
+mysql.user OK
test.v1 OK
test.v2 OK
test.v3 OK
@@ -346,12 +346,12 @@ mysql.db OK
mysql.ev_bk OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats
Error : Unknown storage engine 'InnoDB'
@@ -375,7 +375,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -389,6 +388,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql
+mysql.user OK
test.v1 OK
test.v2 OK
test.v3 OK
diff --git a/mysql-test/main/mysqlcheck-master.opt b/mysql-test/main/mysqlcheck-master.opt
new file mode 100644
index 00000000000..38190455bbf
--- /dev/null
+++ b/mysql-test/main/mysqlcheck-master.opt
@@ -0,0 +1 @@
+--use-stat-tables=NEVER
diff --git a/mysql-test/main/mysqlcheck.result b/mysql-test/main/mysqlcheck.result
index bdcb6df44ba..8b6a19b5270 100644
--- a/mysql-test/main/mysqlcheck.result
+++ b/mysql-test/main/mysqlcheck.result
@@ -11,12 +11,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -34,7 +34,6 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
mtr.global_suppressions Table is already up to date
mtr.test_suppressions Table is already up to date
mysql.column_stats OK
@@ -42,12 +41,12 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats
note : Table does not support optimize, doing recreate + analyze instead
@@ -71,18 +70,17 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
-mysql.user OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
-mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -100,18 +98,17 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
mysql.column_stats Table is already up to date
mysql.columns_priv Table is already up to date
mysql.db Table is already up to date
mysql.event Table is already up to date
mysql.func Table is already up to date
+mysql.global_priv Table is already up to date
mysql.gtid_slave_pos Table is already up to date
mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date
mysql.help_relation Table is already up to date
mysql.help_topic Table is already up to date
-mysql.host Table is already up to date
mysql.index_stats Table is already up to date
mysql.innodb_index_stats
note : Table does not support optimize, doing recreate + analyze instead
@@ -135,7 +132,6 @@ mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
-mysql.user Table is already up to date
create table t1 (a int) engine=myisam;
create view v1 as select * from t1;
test.t1 OK
@@ -441,12 +437,12 @@ mysql.columns_priv Table is already up to date
mysql.db Table is already up to date
mysql.event Table is already up to date
mysql.func Table is already up to date
+mysql.global_priv Table is already up to date
mysql.gtid_slave_pos Table is already up to date
mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date
mysql.help_relation Table is already up to date
mysql.help_topic Table is already up to date
-mysql.host Table is already up to date
mysql.index_stats Table is already up to date
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
@@ -464,7 +460,6 @@ mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry OK
-mysql.user Table is already up to date
mysqltest1.t1
warning : Table is marked as crashed
warning : Size of datafile is: 4 Should be: 0
@@ -481,11 +476,11 @@ drop database mysqltest1;
#
create table t1(a int);
insert into t1 (a) values (1), (2), (3);
-select * from mysql.column_stats;
-db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats order by db_name,table_name;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test.t1 Engine-independent statistics collected
status : OK
-select * from mysql.column_stats where db_name = 'test' and table_name = 't1';
-db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
-test t1 a 1 3 0.0000 4.0000 1.0000 # # #
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
+test t1 a 1 3 0.0000 4.0000 1.0000
drop table t1;
diff --git a/mysql-test/main/mysqlcheck.test b/mysql-test/main/mysqlcheck.test
index 8f3c241ebb7..502c90b0d89 100644
--- a/mysql-test/main/mysqlcheck.test
+++ b/mysql-test/main/mysqlcheck.test
@@ -414,8 +414,7 @@ drop database mysqltest1;
--echo #
create table t1(a int);
insert into t1 (a) values (1), (2), (3);
-select * from mysql.column_stats;
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats order by db_name,table_name;
--exec $MYSQL_CHECK --analyze test t1 --persistent
---replace_column 9 # 10 # 11 #
-select * from mysql.column_stats where db_name = 'test' and table_name = 't1';
+select db_name,table_name,column_name,min_value,max_value,nulls_ratio,avg_length,avg_frequency from mysql.column_stats where db_name = 'test' and table_name = 't1' order by db_name,table_name;
drop table t1;
diff --git a/mysql-test/main/mysqld--help,win.rdiff b/mysql-test/main/mysqld--help,win.rdiff
index 34ed5df7074..1bdbc0fc287 100644
--- a/mysql-test/main/mysqld--help,win.rdiff
+++ b/mysql-test/main/mysqld--help,win.rdiff
@@ -1,6 +1,6 @@
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
-@@ -395,7 +395,6 @@
+@@ -419,7 +419,6 @@
The number of segments in a key cache
-L, --language=name Client error messages in given language. May be given as
a full path. Deprecated. Use --lc-messages-dir instead.
@@ -8,7 +8,7 @@
--lc-messages=name Set the language used for the error messages.
-L, --lc-messages-dir=name
Directory where error messages are
-@@ -617,6 +616,7 @@
+@@ -647,6 +646,7 @@
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
DATETIME, TIMESTAMP columns.
(Defaults to on; use --skip-mysql56-temporal-format to disable.)
@@ -16,17 +16,7 @@
--net-buffer-length=#
Buffer length for TCP/IP and socket communication
--net-read-timeout=#
-@@ -1073,6 +1073,9 @@
- characteristics (isolation level, read only/read
- write,snapshot - but not any work done / data modified
- within the transaction).
-+ --shared-memory Enable the shared memory
-+ --shared-memory-base-name=name
-+ Base name of shared memory
- --show-slave-auth-info
- Show user and password in SHOW SLAVE HOSTS on this
- master.
-@@ -1196,6 +1199,10 @@
+@@ -1236,6 +1236,10 @@
Log slow queries to given log file. Defaults logging to
'hostname'-slow.log. Must be enabled to activate other
slow log options
@@ -37,7 +27,7 @@
--socket=name Socket file to use for connection
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
-@@ -1219,6 +1226,7 @@
+@@ -1260,6 +1264,7 @@
deleting or updating every row in a table.
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
@@ -45,7 +35,7 @@
--standard-compliant-cte
Allow only CTEs compliant to SQL standard
(Defaults to on; use --skip-standard-compliant-cte to disable.)
-@@ -1286,6 +1294,11 @@
+@@ -1330,6 +1335,11 @@
--thread-pool-max-threads=#
Maximum allowed number of worker threads in the thread
pool
@@ -57,7 +47,7 @@
--thread-pool-oversubscribe=#
How many additional active worker threads in a group are
allowed.
-@@ -1324,8 +1337,8 @@
+@@ -1370,8 +1380,8 @@
automatically convert it to an on-disk MyISAM or Aria
table.
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
@@ -68,7 +58,7 @@
--transaction-alloc-block-size=#
Allocation block size for transactions to be stored in
binary log
-@@ -1462,7 +1475,6 @@
+@@ -1513,7 +1523,6 @@
key-cache-division-limit 100
key-cache-file-hash-size 512
key-cache-segments 0
@@ -76,7 +66,7 @@
lc-messages en_US
lc-messages-dir MYSQL_SHAREDIR/
lc-time-names en_US
-@@ -1534,6 +1546,7 @@
+@@ -1587,6 +1596,7 @@
myisam-stats-method NULLS_UNEQUAL
myisam-use-mmap FALSE
mysql56-temporal-format TRUE
@@ -84,16 +74,7 @@
net-buffer-length 16384
net-read-timeout 30
net-retry-count 10
-@@ -1645,6 +1658,8 @@
- session-track-state-change FALSE
- session-track-system-variables autocommit,character_set_client,character_set_connection,character_set_results,time_zone
- session-track-transaction-info OFF
-+shared-memory FALSE
-+shared-memory-base-name MYSQL
- show-slave-auth-info FALSE
- silent-startup FALSE
- skip-grant-tables TRUE
-@@ -1671,6 +1686,7 @@
+@@ -1726,6 +1736,7 @@
slave-type-conversions
slow-launch-time 2
slow-query-log FALSE
@@ -101,7 +82,7 @@
sort-buffer-size 2097152
sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql-safe-updates FALSE
-@@ -1697,6 +1713,8 @@
+@@ -1753,6 +1764,8 @@
thread-cache-size 151
thread-pool-idle-timeout 60
thread-pool-max-threads 65536
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index 32b57435ec3..c008df32257 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -15,6 +15,10 @@ The following specify which files/extra groups are read (specified before remain
--alter-algorithm[=name]
Specify the alter table algorithm. One of: DEFAULT, COPY,
INPLACE, NOCOPY, INSTANT
+ --analyze-sample-percentage=#
+ Percentage of rows from the table ANALYZE TABLE will
+ sample to collect table statistics. Set to 0 to let
+ MariaDB decide what percentage of rows to sample.
-a, --ansi Use ANSI SQL syntax instead of MySQL syntax. This mode
will also set transaction isolation level 'serializable'.
--auto-increment-increment[=#]
@@ -184,6 +188,12 @@ The following specify which files/extra groups are read (specified before remain
--deadlock-timeout-short=#
Short timeout for the two-step deadlock detection (in
microseconds)
+ --default-password-lifetime=#
+ This defines the global password expiration policy. 0
+ means automatic password expiration is disabled. If the
+ value is a positive integer N, the passwords must be
+ changed every N days. This behavior can be overridden
+ using the password expiration options in ALTER USER.
--default-regex-flags=name
Default flags for the regex library. Any combination of:
DOTALL, DUPNAMES, EXTENDED, EXTRA, MULTILINE, UNGREEDY
@@ -220,6 +230,11 @@ The following specify which files/extra groups are read (specified before remain
handling INSERT DELAYED. If the queue becomes full, any
client that does INSERT DELAYED will wait until there is
room in the queue again
+ --disconnect-on-expired-password
+ This variable controls how the server handles clients
+ that are not aware of the sandbox mode. If enabled, the
+ server disconnects the client, otherwise the server puts
+ the client in a sandbox mode.
--div-precision-increment=#
Precision of the result of '/' operator will be increased
on that value
@@ -294,6 +309,15 @@ The following specify which files/extra groups are read (specified before remain
--group-concat-max-len=#
The maximum length of the result of function
GROUP_CONCAT()
+ --gtid-cleanup-batch-size=#
+ Normally does not need tuning. How many old rows must
+ accumulate in the mysql.gtid_slave_pos table before a
+ background job will be run to delete them. Can be
+ increased to reduce number of commits if using many
+ different engines with --gtid_pos_auto_engines, or to
+ reduce CPU overhead if using a huge number of different
+ gtid_domain_ids. Can be decreased to reduce number of old
+ rows in the table.
--gtid-domain-id=# Used with global transaction ID to identify logically
independent replication streams. When events can
propagate through multiple parallel paths (for example
@@ -541,6 +565,10 @@ The following specify which files/extra groups are read (specified before remain
The maximum BLOB length to send to server from
mysql_send_long_data API. Deprecated option; use
max_allowed_packet instead.
+ --max-password-errors=#
+ If there is more than this number of failed connect
+ attempts due to invalid password, user will be blocked
+ from further connections until FLUSH_PRIVILEGES.
--max-prepared-stmt-count=#
Maximum number of prepared statements in the server
--max-recursive-iterations[=#]
@@ -550,6 +578,8 @@ The following specify which files/extra groups are read (specified before remain
relay log will be rotated automatically when the size
exceeds this value. If 0 at startup, it's set to
max_binlog_size
+ --max-rowid-filter-size=#
+ The maximum size of the container of a rowid filter
--max-seeks-for-key=#
Limit assumed max number of seeks when looking up rows
based on a key
@@ -682,7 +712,15 @@ The following specify which files/extra groups are read (specified before remain
join_cache_hashed, join_cache_bka,
optimize_join_buffer_size, table_elimination,
extended_keys, exists_to_in, orderby_uses_equalities,
- condition_pushdown_for_derived, split_materialized
+ condition_pushdown_for_derived, split_materialized,
+ condition_pushdown_for_subquery, rowid_filter,
+ condition_pushdown_from_having
+ --optimizer-trace=name
+ Controls tracing of the Optimizer:
+ optimizer_trace=option=val[,option=val...], where option
+ is one of {enabled} and val is one of {on, off, default}
+ --optimizer-trace-max-mem-size=#
+ Maximum allowed size of an optimizer trace
--optimizer-use-condition-selectivity=#
Controls selectivity of which conditions the optimizer
takes into account to calculate cardinality of a partial
@@ -1173,8 +1211,10 @@ The following specify which files/extra groups are read (specified before remain
--slave-transaction-retry-errors=name
Tells the slave thread to retry transaction for
replication when a query event returns an error from the
- provided list. Deadlock and elapsed lock wait timeout
- errors are automatically added to this list
+ provided list. Deadlock error, elapsed lock wait timeout,
+ net read error, net read timeout, net write error, net
+ write timeout, connect error and 2 types of lost
+ connection error are automatically added to this list
--slave-transaction-retry-interval=#
Interval of the slave SQL thread will retry a transaction
in case it failed with a deadlock or elapsed lock wait
@@ -1212,7 +1252,8 @@ The following specify which files/extra groups are read (specified before remain
ERROR_FOR_DIVISION_BY_ZERO, TRADITIONAL,
NO_AUTO_CREATE_USER, HIGH_NOT_PRECEDENCE,
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH,
- EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT
+ EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT,
+ TIME_ROUND_FRACTIONAL
--sql-safe-updates If set to 1, UPDATEs and DELETEs need either a key in the
WHERE clause, or a LIMIT clause, or else they will
aborted. Prevents the common mistake of accidentally
@@ -1277,6 +1318,9 @@ The following specify which files/extra groups are read (specified before remain
keep-alive packet is sent.If set to 0, system dependent
default is used. (Automatically configured unless set
explicitly)
+ --tcp-nodelay Set option TCP_NODELAY (disable Nagle's algorithm) on
+ socket
+ (Defaults to on; use --skip-tcp-nodelay to disable.)
--thread-cache-size=#
How many threads we should keep in a cache for reuse.
These are freed after 5 minutes of idle time
@@ -1312,6 +1356,8 @@ The following specify which files/extra groups are read (specified before remain
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes. Deprecated, has no
effect.
+ --tls-version=name TLS protocol version for secure connections.. Any
+ combination of: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3
--tmp-disk-table-size=#
Max size for data for an internal temporary on-disk
MyISAM or Aria table.
@@ -1348,7 +1394,8 @@ The following specify which files/extra groups are read (specified before remain
(usually get from GUI tools)
--use-stat-tables=name
Specifies how to use system statistics tables. One of:
- NEVER, COMPLEMENTARY, PREFERABLY
+ NEVER, COMPLEMENTARY, PREFERABLY,
+ COMPLEMENTARY_FOR_QUERIES, PREFERABLY_FOR_QUERIES
-u, --user=name Run mysqld daemon as user.
--userstat Enables statistics gathering for USER_STATISTICS,
CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
@@ -1362,6 +1409,7 @@ The following specify which files/extra groups are read (specified before remain
Variables (--variable-name=value)
allow-suspicious-udfs FALSE
alter-algorithm DEFAULT
+analyze-sample-percentage 100
auto-increment-increment 1
auto-increment-offset 1
autocommit TRUE
@@ -1399,6 +1447,7 @@ deadlock-search-depth-long 15
deadlock-search-depth-short 4
deadlock-timeout-long 50000000
deadlock-timeout-short 10000
+default-password-lifetime 0
default-regex-flags
default-storage-engine myisam
default-time-zone (No default value)
@@ -1408,12 +1457,13 @@ delay-key-write ON
delayed-insert-limit 100
delayed-insert-timeout 300
delayed-queue-size 1000
+disconnect-on-expired-password FALSE
div-precision-increment 4
encrypt-binlog FALSE
encrypt-tmp-disk-tables FALSE
encrypt-tmp-files FALSE
enforce-storage-engine (No default value)
-eq-range-index-dive-limit 0
+eq-range-index-dive-limit 200
event-scheduler OFF
expensive-subquery-limit 100
expire-logs-days 0
@@ -1433,13 +1483,14 @@ gdb FALSE
general-log FALSE
getopt-prefix-matching FALSE
group-concat-max-len 1048576
+gtid-cleanup-batch-size 64
gtid-domain-id 0
gtid-ignore-duplicates FALSE
gtid-pos-auto-engines
gtid-strict-mode FALSE
help TRUE
-histogram-size 0
-histogram-type SINGLE_PREC_HB
+histogram-size 254
+histogram-type DOUBLE_PREC_HB
host-cache-size 279
idle-readonly-transaction-timeout 0
idle-transaction-timeout 0
@@ -1506,9 +1557,11 @@ max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
max-long-data-size 16777216
+max-password-errors 18446744073709551615
max-prepared-stmt-count 16382
max-recursive-iterations 18446744073709551615
max-relay-log-size 1073741824
+max-rowid-filter-size 131072
max-seeks-for-key 18446744073709551615
max-session-mem-used 9223372036854775807
max-sort-length 1024
@@ -1545,8 +1598,10 @@ old-style-user-limits FALSE
optimizer-prune-level 1
optimizer-search-depth 62
optimizer-selectivity-sampling-limit 100
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
-optimizer-use-condition-selectivity 1
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
+optimizer-trace
+optimizer-trace-max-mem-size 1048576
+optimizer-use-condition-selectivity 4
performance-schema FALSE
performance-schema-accounts-size -1
performance-schema-consumer-events-stages-current FALSE
@@ -1570,7 +1625,7 @@ performance-schema-events-waits-history-long-size -1
performance-schema-events-waits-history-size -1
performance-schema-hosts-size -1
performance-schema-instrument
-performance-schema-max-cond-classes 80
+performance-schema-max-cond-classes 90
performance-schema-max-cond-instances -1
performance-schema-max-digest-length 1024
performance-schema-max-file-classes 50
@@ -1583,7 +1638,7 @@ performance-schema-max-rwlock-instances -1
performance-schema-max-socket-classes 10
performance-schema-max-socket-instances -1
performance-schema-max-stage-classes 160
-performance-schema-max-statement-classes 200
+performance-schema-max-statement-classes 202
performance-schema-max-table-handles -1
performance-schema-max-table-instances -1
performance-schema-max-thread-classes 50
@@ -1665,7 +1720,7 @@ slave-run-triggers-for-rbr NO
slave-skip-errors OFF
slave-sql-verify-checksum TRUE
slave-transaction-retries 10
-slave-transaction-retry-errors 1213,1205
+slave-transaction-retry-errors 1158,1159,1160,1161,1205,1213,1429,2013,12701
slave-transaction-retry-interval 0
slave-type-conversions
slow-launch-time 2
@@ -1690,6 +1745,7 @@ tc-heuristic-recover OFF
tcp-keepalive-interval 0
tcp-keepalive-probes 0
tcp-keepalive-time 0
+tcp-nodelay TRUE
thread-cache-size 151
thread-pool-idle-timeout 60
thread-pool-max-threads 65536
@@ -1708,7 +1764,7 @@ transaction-isolation REPEATABLE-READ
transaction-prealloc-size 4096
transaction-read-only FALSE
updatable-views-with-limit YES
-use-stat-tables NEVER
+use-stat-tables PREFERABLY_FOR_QUERIES
userstat FALSE
verbose TRUE
wait-timeout 28800
diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test
index 6dfed8428e4..b54af092a5e 100644
--- a/mysql-test/main/mysqld--help.test
+++ b/mysql-test/main/mysqld--help.test
@@ -2,6 +2,8 @@
# mysqld --help
#
--source include/not_embedded.inc
+--source include/not_asan.inc
+--source include/not_ubsan.inc
--source include/have_perfschema.inc
--source include/have_profiling.inc
--source include/platform.inc
@@ -25,7 +27,7 @@ perl;
large-files-support lower-case-file-system system-time-zone
collation-server character-set-server log-tc-size table-cache
table-open-cache table-open-cache-instances max-connections
- version.*/;
+ tls-version version.*/;
# Plugins which may or may not be there:
@plugins=qw/innodb archive blackhole federated partition
diff --git a/mysql-test/main/mysqldump-compat-102.result b/mysql-test/main/mysqldump-compat-102.result
index 1789f74f034..86a2ebc47e0 100644
--- a/mysql-test/main/mysqldump-compat-102.result
+++ b/mysql-test/main/mysqldump-compat-102.result
@@ -58,7 +58,7 @@ BEGIN
log(0, 'Session ' || connection_id() || ' ' || current_user || ' started');
END;
$$
--- MySQL dump DUMPVERSION Distrib DISTVERSION, for OS
+-- MariaDB dump DUMPVERSION Distrib DISTVERSION, for OS
--
-- Host: localhost Database: db1_mdev17429
-- ------------------------------------------------------
diff --git a/mysql-test/main/mysqldump-compat-102.test b/mysql-test/main/mysqldump-compat-102.test
index f10ba2ef5ed..518779e951d 100644
--- a/mysql-test/main/mysqldump-compat-102.test
+++ b/mysql-test/main/mysqldump-compat-102.test
@@ -76,7 +76,7 @@ DELIMITER ;$$
# mysqldump output is expected to have standalone PROCEDURE/FUNCTION, but not PACKAGE/PACKAGE BODY.
---replace_regex /-- MySQL dump.*[^\n]/-- MySQL dump DUMPVERSION Distrib DISTVERSION, for OS/ / on [0-9 :-]+/ on TIMESTAMP/
+--replace_regex /-- MariaDB dump.*[^\n]/-- MariaDB dump DUMPVERSION Distrib DISTVERSION, for OS/ / on [0-9 :-]+/ on TIMESTAMP/
--exec $MYSQL_DUMP --quick --routines --triggers --no-create-info --skip-lock-tables --no-data --compress --default-character-set=utf8mb4 -uroot db1_mdev17429
DROP DATABASE db1_mdev17429;
diff --git a/mysql-test/main/mysqldump-system,win.rdiff b/mysql-test/main/mysqldump-system,win.rdiff
index a6c1920dc6f..a46b422e95f 100644
--- a/mysql-test/main/mysqldump-system,win.rdiff
+++ b/mysql-test/main/mysqldump-system,win.rdiff
@@ -1,118 +1,21 @@
--- mysqldump-system.result
+++ mysqldump-system,win.result
-@@ -7,8 +7,6 @@
- delete from mysql.user where host not in ('localhost');
- flush privileges;
- create user USER;
--install plugin /*M!100401 IF NOT EXISTS */ unix_socket soname 'auth_socket.so';;
--alter user USER identified via unix_socket;
- CREATE ROLE role_1;
- CREATE ROLE role_2 WITH ADMIN role_1;
- GRANT SHOW DATABASES ON *.* TO role_1;
-@@ -48,9 +46,8 @@
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--INSTALL PLUGIN unix_socket SONAME 'auth_socket.so';
- CREATE USER `root`@`localhost`;
--CREATE USER `USER`@`%` IDENTIFIED VIA unix_socket;
-+CREATE USER `USER`@`%`;
- SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
- CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
- GRANT mariadb_dump_import_role TO CURRENT_USER();
-@@ -68,7 +65,7 @@
- /*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
- GRANT `role_1` TO `USER`@`%`;
- GRANT `role_2` TO `USER`@`%`;
--GRANT USAGE ON *.* TO `USER`@`%` IDENTIFIED VIA unix_socket;
-+GRANT USAGE ON *.* TO `USER`@`%`;
- /*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
- /*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
- GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
-@@ -168,8 +165,6 @@
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--/*M!100401 UNINSTALL PLUGIN IF EXIST unix_socket */;
--INSTALL PLUGIN unix_socket SONAME 'auth_socket.so';
- DELIMITER |
- /*M!100101 IF current_user()="'root'@'localhost'" THEN
- SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'root'@'localhost''";
-@@ -183,7 +178,7 @@
- END IF */|
- DELIMITER ;
- /*!50701 DROP USER IF EXISTS 'USER'@'%' */;
--CREATE /*M!100103 OR REPLACE */ USER `USER`@`%` IDENTIFIED VIA unix_socket;
-+CREATE /*M!100103 OR REPLACE */ USER `USER`@`%`;
- SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
- CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
- GRANT mariadb_dump_import_role TO CURRENT_USER();
-@@ -203,7 +198,7 @@
- /*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
- GRANT `role_1` TO `USER`@`%`;
- GRANT `role_2` TO `USER`@`%`;
--GRANT USAGE ON *.* TO `USER`@`%` IDENTIFIED VIA unix_socket;
-+GRANT USAGE ON *.* TO `USER`@`%`;
- /*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
- /*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
- GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
-@@ -304,9 +299,8 @@
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--INSTALL PLUGIN unix_socket /*M!100401 IF NOT EXISTS */ SONAME 'auth_socket.so';
- CREATE USER IF NOT EXISTS `root`@`localhost`;
--CREATE USER IF NOT EXISTS `USER`@`%` IDENTIFIED VIA unix_socket;
-+CREATE USER IF NOT EXISTS `USER`@`%`;
- SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
- CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
- GRANT mariadb_dump_import_role TO CURRENT_USER();
-@@ -324,7 +318,7 @@
- /*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
- GRANT `role_1` TO `USER`@`%`;
- GRANT `role_2` TO `USER`@`%`;
--GRANT USAGE ON *.* TO `USER`@`%` IDENTIFIED VIA unix_socket;
-+GRANT USAGE ON *.* TO `USER`@`%`;
- /*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
- /*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
- GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
-@@ -413,12 +407,12 @@
- CHECKSUM TABLE mysql.user, mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
- mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
- Table Checksum
--mysql.user 3159177919
-+mysql.user 3007943331
- mysql.roles_mapping 3150178430
+@@ -442,7 +442,7 @@
mysql.time_zone_transition 3895294076
--mysql.plugin 1520695737
-+mysql.plugin 0
+ mysql.plugin 0
mysql.servers 2783974349
-mysql.func 3241572444
+mysql.func 310494789
mysql.innodb_table_stats 347867921
mysql.table_stats 664320059
# Opps....
-@@ -442,12 +436,12 @@
- CHECKSUM TABLE mysql.user, mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
- mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
- Table Checksum
--mysql.user 3159177919
-+mysql.user 3007943331
- mysql.roles_mapping 3150178430
+@@ -477,7 +477,7 @@
mysql.time_zone_transition 3895294076
--mysql.plugin 1520695737
-+mysql.plugin 0
+ mysql.plugin 0
mysql.servers 2783974349
-mysql.func 3241572444
+mysql.func 310494789
mysql.innodb_table_stats 347867921
mysql.table_stats 664320059
DROP FUNCTION IF EXISTS metaphon;
-@@ -461,7 +455,6 @@
- DROP ROLE role_2;
- DROP ROLE role_1;
- drop user USER;
--uninstall plugin unix_socket;
- insert into mysql.user select * from backup_users;
- flush privileges;
- drop table backup_users;
+
diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result
index 746984bb756..c443e250e4a 100644
--- a/mysql-test/main/mysqldump-system.result
+++ b/mysql-test/main/mysqldump-system.result
@@ -2,13 +2,14 @@
# MDEV-23630: mysqldump to logically dump system tables
#
#
-create table backup_users like mysql.user;
-insert into backup_users select * from mysql.user where host not in ('localhost');
-delete from mysql.user where host not in ('localhost');
+create table backup_users like mysql.global_priv;
+create table tables_priv like mysql.tables_priv;
+insert into backup_users select * from mysql.global_priv;
+insert into tables_priv select * from mysql.tables_priv;
+delete from mysql.global_priv where host not in ('localhost');
flush privileges;
+alter user 'mariadb.sys'@'localhost' ACCOUNT UNLOCK;
create user USER;
-install plugin /*M!100401 IF NOT EXISTS */ unix_socket soname 'auth_socket.so';;
-alter user USER identified via unix_socket;
CREATE ROLE role_1;
CREATE ROLE role_2 WITH ADMIN role_1;
GRANT SHOW DATABASES ON *.* TO role_1;
@@ -48,9 +49,9 @@ CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-INSTALL PLUGIN unix_socket SONAME 'auth_socket.so';
+CREATE USER `mariadb.sys`@`localhost` PASSWORD EXPIRE;
CREATE USER `root`@`localhost`;
-CREATE USER `USER`@`%` IDENTIFIED VIA unix_socket;
+CREATE USER `USER`@`%`;
SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
GRANT mariadb_dump_import_role TO CURRENT_USER();
@@ -61,6 +62,10 @@ SET ROLE mariadb_dump_import_role;
/*!80001 CREATE ROLE 'role_2' */;
/*M!100005 CREATE ROLE 'role_2' WITH ADMIN mariadb_dump_import_role */;
/*M!100005 GRANT 'role_2' TO 'role_1' WITH ADMIN OPTION */;
+GRANT USAGE ON *.* TO `mariadb.sys`@`localhost`;
+GRANT SELECT, DELETE ON `mysql`.`global_priv` TO `mariadb.sys`@`localhost`;
+/*M!100005 SET DEFAULT ROLE NONE FOR 'mariadb.sys'@'localhost' */;
+/*!80001 ALTER USER 'mariadb.sys'@'localhost' DEFAULT ROLE NONE */;
GRANT `role_1` TO `root`@`localhost` WITH ADMIN OPTION;
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION;
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
@@ -68,7 +73,7 @@ GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
/*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
GRANT `role_1` TO `USER`@`%`;
GRANT `role_2` TO `USER`@`%`;
-GRANT USAGE ON *.* TO `USER`@`%` IDENTIFIED VIA unix_socket;
+GRANT USAGE ON *.* TO `USER`@`%`;
/*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
/*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
@@ -85,7 +90,7 @@ USE mysql;
LOCK TABLES `column_stats` WRITE;
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
-REPLACE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,0,NULL,NULL);
+REPLACE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
UNLOCK TABLES;
@@ -168,8 +173,13 @@ UNLOCK TABLES;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-/*M!100401 UNINSTALL PLUGIN IF EXIST unix_socket */;
-INSTALL PLUGIN unix_socket SONAME 'auth_socket.so';
+DELIMITER |
+/*M!100101 IF current_user()="'mariadb.sys'@'localhost'" THEN
+ SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'mariadb.sys'@'localhost''";
+END IF */|
+DELIMITER ;
+/*!50701 DROP USER IF EXISTS 'mariadb.sys'@'localhost' */;
+CREATE /*M!100103 OR REPLACE */ USER `mariadb.sys`@`localhost` PASSWORD EXPIRE;
DELIMITER |
/*M!100101 IF current_user()="'root'@'localhost'" THEN
SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'root'@'localhost''";
@@ -183,7 +193,7 @@ DELIMITER |
END IF */|
DELIMITER ;
/*!50701 DROP USER IF EXISTS 'USER'@'%' */;
-CREATE /*M!100103 OR REPLACE */ USER `USER`@`%` IDENTIFIED VIA unix_socket;
+CREATE /*M!100103 OR REPLACE */ USER `USER`@`%`;
SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
GRANT mariadb_dump_import_role TO CURRENT_USER();
@@ -196,6 +206,10 @@ SET ROLE mariadb_dump_import_role;
/*!80001 CREATE ROLE 'role_2' */;
/*M!100103 CREATE OR REPLACE ROLE 'role_2' WITH ADMIN mariadb_dump_import_role */;
/*M!100005 GRANT 'role_2' TO 'role_1' WITH ADMIN OPTION */;
+GRANT USAGE ON *.* TO `mariadb.sys`@`localhost`;
+GRANT SELECT, DELETE ON `mysql`.`global_priv` TO `mariadb.sys`@`localhost`;
+/*M!100005 SET DEFAULT ROLE NONE FOR 'mariadb.sys'@'localhost' */;
+/*!80001 ALTER USER 'mariadb.sys'@'localhost' DEFAULT ROLE NONE */;
GRANT `role_1` TO `root`@`localhost` WITH ADMIN OPTION;
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION;
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
@@ -203,7 +217,7 @@ GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
/*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
GRANT `role_1` TO `USER`@`%`;
GRANT `role_2` TO `USER`@`%`;
-GRANT USAGE ON *.* TO `USER`@`%` IDENTIFIED VIA unix_socket;
+GRANT USAGE ON *.* TO `USER`@`%`;
/*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
/*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
@@ -221,7 +235,7 @@ USE mysql;
LOCK TABLES `column_stats` WRITE;
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
-REPLACE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,0,NULL,NULL);
+REPLACE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
UNLOCK TABLES;
@@ -304,9 +318,9 @@ UNLOCK TABLES;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-INSTALL PLUGIN unix_socket /*M!100401 IF NOT EXISTS */ SONAME 'auth_socket.so';
+CREATE USER IF NOT EXISTS `mariadb.sys`@`localhost` PASSWORD EXPIRE;
CREATE USER IF NOT EXISTS `root`@`localhost`;
-CREATE USER IF NOT EXISTS `USER`@`%` IDENTIFIED VIA unix_socket;
+CREATE USER IF NOT EXISTS `USER`@`%`;
SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
GRANT mariadb_dump_import_role TO CURRENT_USER();
@@ -317,6 +331,10 @@ SET ROLE mariadb_dump_import_role;
/*!80001 CREATE ROLE IF NOT EXISTS 'role_2' */;
/*M!100005 CREATE ROLE IF NOT EXISTS 'role_2' WITH ADMIN mariadb_dump_import_role */;
/*M!100005 GRANT 'role_2' TO 'role_1' WITH ADMIN OPTION */;
+GRANT USAGE ON *.* TO `mariadb.sys`@`localhost`;
+GRANT SELECT, DELETE ON `mysql`.`global_priv` TO `mariadb.sys`@`localhost`;
+/*M!100005 SET DEFAULT ROLE NONE FOR 'mariadb.sys'@'localhost' */;
+/*!80001 ALTER USER 'mariadb.sys'@'localhost' DEFAULT ROLE NONE */;
GRANT `role_1` TO `root`@`localhost` WITH ADMIN OPTION;
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION;
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
@@ -324,7 +342,7 @@ GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
/*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
GRANT `role_1` TO `USER`@`%`;
GRANT `role_2` TO `USER`@`%`;
-GRANT USAGE ON *.* TO `USER`@`%` IDENTIFIED VIA unix_socket;
+GRANT USAGE ON *.* TO `USER`@`%`;
/*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
/*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
@@ -341,7 +359,7 @@ USE mysql;
LOCK TABLES `column_stats` WRITE;
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,0,NULL,NULL);
+INSERT IGNORE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
UNLOCK TABLES;
@@ -410,13 +428,19 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-CHECKSUM TABLE mysql.user, mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
+SELECT * FROM mysql.global_priv ORDER BY User,Host;
+Host User Priv
+% USER {"access":0,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
+localhost mariadb.sys {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":false,"password_last_changed":NOW}
+ role_1 {"access":16384,"is_role":true}
+ role_2 {"access":0,"is_role":true}
+localhost root {"access":18446744073709551615}
+CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
Table Checksum
-mysql.user 3159177919
mysql.roles_mapping 3150178430
mysql.time_zone_transition 3895294076
-mysql.plugin 1520695737
+mysql.plugin 0
mysql.servers 2783974349
mysql.func 3241572444
mysql.innodb_table_stats 347867921
@@ -439,13 +463,19 @@ DROP SERVER s1;
set time_zone= @@global.time_zone;
# Restore from mysqldump
DROP USER mariadb_test_restore;
-CHECKSUM TABLE mysql.user, mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
+SELECT * FROM mysql.global_priv ORDER BY User,Host;
+Host User Priv
+% USER {"access":0,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
+localhost mariadb.sys {"access":0,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"password_lifetime":-1,"default_role":""}
+ role_1 {"access":16384,"is_role":true}
+ role_2 {"access":0,"is_role":true}
+localhost root {"access":1073741823,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":""}
+CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
Table Checksum
-mysql.user 3159177919
mysql.roles_mapping 3150178430
mysql.time_zone_transition 3895294076
-mysql.plugin 1520695737
+mysql.plugin 0
mysql.servers 2783974349
mysql.func 3241572444
mysql.innodb_table_stats 347867921
@@ -461,7 +491,7 @@ drop table mysql.tz;
DROP ROLE role_2;
DROP ROLE role_1;
drop user USER;
-uninstall plugin unix_socket;
-insert into mysql.user select * from backup_users;
+replace into mysql.global_priv select * from backup_users;
+replace into mysql.tables_priv select * from tables_priv;
flush privileges;
-drop table backup_users;
+drop table backup_users, tables_priv;
diff --git a/mysql-test/main/mysqldump-system.test b/mysql-test/main/mysqldump-system.test
index 3efe8376e18..74638bb9265 100644
--- a/mysql-test/main/mysqldump-system.test
+++ b/mysql-test/main/mysqldump-system.test
@@ -12,21 +12,17 @@ if (!$AUTH_SOCKET_SO) {
--echo #
--echo #
-# might need fixing in 10.4 to different mechanism
-create table backup_users like mysql.user;
-insert into backup_users select * from mysql.user where host not in ('localhost');
-delete from mysql.user where host not in ('localhost');
+create table backup_users like mysql.global_priv;
+create table tables_priv like mysql.tables_priv;
+insert into backup_users select * from mysql.global_priv;
+insert into tables_priv select * from mysql.tables_priv;
+delete from mysql.global_priv where host not in ('localhost');
flush privileges;
+# mariadb.sys because of MDEV-24098
+alter user 'mariadb.sys'@'localhost' ACCOUNT UNLOCK;
create user USER;
-if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`)
-{
---error 0,ER_PLUGIN_INSTALLED
---eval install plugin /*M!100401 IF NOT EXISTS */ unix_socket soname '$AUTH_SOCKET_SO';
-alter user USER identified via unix_socket;
-}
-
# time zone data already loaded
CREATE ROLE role_1;
@@ -93,7 +89,15 @@ eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
--exec $MYSQL_DUMP --skip-comments --system=all --insert-ignore
-CHECKSUM TABLE mysql.user, mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
+# global_priv checksum not restored because:
+# mariadb.sys - different Priv on restore
+# password_last_changed date isn't saved/restored
+# root user's Priv $.access lower number on restore
+
+--replace_regex /"password_last_changed":[0-9]+/"password_last_changed":NOW/
+SELECT * FROM mysql.global_priv ORDER BY User,Host;
+
+CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
--echo # Opps....
@@ -117,13 +121,15 @@ set time_zone= @@global.time_zone;
--echo # Restore from mysqldump
--exec $MYSQL --user mariadb_test_restore --password=getitback --show-warnings < $MYSQLTEST_VARDIR/tmp/dump1.sql
-#--remove_file $MYSQLTEST_VARDIR/tmp/dump1.sql;
DROP USER mariadb_test_restore;
# successful restore?
-CHECKSUM TABLE mysql.user, mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
+--replace_regex /"password_last_changed":[0-9]+/"password_last_changed":NOW/
+SELECT * FROM mysql.global_priv ORDER BY User,Host;
+
+CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
#
@@ -147,11 +153,7 @@ DROP ROLE role_1;
drop user USER;
-if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`)
-{
-uninstall plugin unix_socket;
-}
-
-insert into mysql.user select * from backup_users;
+replace into mysql.global_priv select * from backup_users;
+replace into mysql.tables_priv select * from tables_priv;
flush privileges;
-drop table backup_users;
+drop table backup_users, tables_priv;
diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result
index 8babe0239b8..d61d77e7478 100644
--- a/mysql-test/main/mysqldump.result
+++ b/mysql-test/main/mysqldump.result
@@ -2734,6 +2734,8 @@ CREATE PROCEDURE bug9056_proc2(OUT a INT)
BEGIN
select sum(id) from t1 into a;
END //
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
set sql_mode='ansi';
create procedure `a'b` () select 1;
set sql_mode='';
@@ -5146,16 +5148,16 @@ USE BUG52792;
SET NAMES utf8;
CREATE FUNCTION `straße` ( c1 CHAR(20))
RETURNS CHAR(50) DETERMINISTIC
-RETURN CONCAT(']]>, ', s, '!');
+RETURN CONCAT(']]>, ', c1, '!');
<?xml version="1.0"?>
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="BUG52792">
<routines>
<routine Function="straße" sql_mode="" character_set_client="utf8" collation_connection="utf8_general_ci" Database_Collation="latin1_swedish_ci">
<![CDATA[
-CREATE DEFINER=`root`@`localhost` FUNCTION `straße`( c1 CHAR(20)) RETURNS char(50) CHARSET latin1
+CREATE DEFINER=`root`@`localhost` FUNCTION `straße`(c1 CHAR(20)) RETURNS char(50) CHARSET latin1
DETERMINISTIC
-RETURN CONCAT(']]]]><![CDATA[>, ', s, '!')
+RETURN CONCAT(']]]]><![CDATA[>, ', c1, '!')
]]>
</routine>
</routines>
@@ -6347,7 +6349,6 @@ DROP TABLE IF EXISTS mysql.plugin;
DROP TABLE IF EXISTS mysql.innodb_table_stats;
DROP TABLE IF EXISTS mysql.innodb_index_stats;
DROP TABLE IF EXISTS mysql.index_stats;
-DROP TABLE IF EXISTS mysql.host;
DROP TABLE IF EXISTS mysql.help_topic;
DROP TABLE IF EXISTS mysql.help_relation;
DROP TABLE IF EXISTS mysql.help_keyword;
diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test
index bf98a44bc34..135787973bd 100644
--- a/mysql-test/main/mysqldump.test
+++ b/mysql-test/main/mysqldump.test
@@ -696,7 +696,7 @@ drop table t1;
--echo # Bug#15328 Segmentation fault occurred if my.cnf is invalid for escape sequence
--echo #
---exec $MYSQL_MY_PRINT_DEFAULTS --config-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
+--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
--echo #
--echo # Bug#19025 mysqldump doesn't correctly dump "auto_increment = [int]"
@@ -2351,7 +2351,7 @@ USE BUG52792;
SET NAMES utf8;
CREATE FUNCTION `straße` ( c1 CHAR(20))
RETURNS CHAR(50) DETERMINISTIC
-RETURN CONCAT(']]>, ', s, '!');
+RETURN CONCAT(']]>, ', c1, '!');
--exec $MYSQL_DUMP --default-character-set=utf8mb4 --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 -R -X BUG52792
@@ -2738,7 +2738,7 @@ DROP TABLE t1;
--echo # persistent statistics calculation
--echo #
---let $ignore= --ignore-table=mysql.proxies_priv --ignore-table=mysql.user --ignore-table=mysql.column_stats --ignore-table=mysql.columns_priv --ignore-table=mysql.db --ignore-table=mysql.event --ignore-table=mysql.func --ignore-table=mysql.gtid_slave_pos --ignore-table=mysql.help_category --ignore-table=mysql.help_keyword --ignore-table=mysql.help_relation --ignore-table=mysql.help_topic --ignore-table=mysql.host --ignore-table=mysql.index_stats --ignore-table=mysql.plugin --ignore-table=mysql.proc --ignore-table=mysql.procs_priv --ignore-table=mysql.roles_mapping --ignore-table=mysql.servers --ignore-table=mysql.table_stats --ignore-table=mysql.tables_priv --ignore-table=mysql.time_zone --ignore-table=mysql.time_zone_leap_second --ignore-table=mysql.time_zone_name --ignore-table=mysql.time_zone_transition --ignore-table=mysql.time_zone_transition_type --ignore-table=mysql.general_log --ignore-table=mysql.slow_log
+--let $ignore= --ignore-table=mysql.proxies_priv --ignore-table=mysql.user --ignore-table=mysql.global_priv --ignore-table=mysql.column_stats --ignore-table=mysql.columns_priv --ignore-table=mysql.db --ignore-table=mysql.event --ignore-table=mysql.func --ignore-table=mysql.gtid_slave_pos --ignore-table=mysql.help_category --ignore-table=mysql.help_keyword --ignore-table=mysql.help_relation --ignore-table=mysql.help_topic --ignore-table=mysql.host --ignore-table=mysql.index_stats --ignore-table=mysql.plugin --ignore-table=mysql.proc --ignore-table=mysql.procs_priv --ignore-table=mysql.roles_mapping --ignore-table=mysql.servers --ignore-table=mysql.table_stats --ignore-table=mysql.tables_priv --ignore-table=mysql.time_zone --ignore-table=mysql.time_zone_leap_second --ignore-table=mysql.time_zone_name --ignore-table=mysql.time_zone_transition --ignore-table=mysql.time_zone_transition_type --ignore-table=mysql.general_log --ignore-table=mysql.slow_log
--let $skip_opts= --skip-dump-date --skip-comments
--echo #
@@ -2948,7 +2948,6 @@ DROP TABLE IF EXISTS mysql.plugin;
DROP TABLE IF EXISTS mysql.innodb_table_stats;
DROP TABLE IF EXISTS mysql.innodb_index_stats;
DROP TABLE IF EXISTS mysql.index_stats;
-DROP TABLE IF EXISTS mysql.host;
DROP TABLE IF EXISTS mysql.help_topic;
DROP TABLE IF EXISTS mysql.help_relation;
DROP TABLE IF EXISTS mysql.help_keyword;
diff --git a/mysql-test/main/mysqltest_tracking_info.result b/mysql-test/main/mysqltest_tracking_info.result
index 7947a86d386..3c474cee10f 100644
--- a/mysql-test/main/mysqltest_tracking_info.result
+++ b/mysql-test/main/mysqltest_tracking_info.result
@@ -38,7 +38,7 @@ SET @@session.session_track_system_variables='optimizer_switch';
set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off';
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- optimizer_switch
--- index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=on
+-- index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
Warnings:
Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release
diff --git a/mysql-test/main/negation_elimination.result b/mysql-test/main/negation_elimination.result
index 1b08baee60a..f9be5b55e46 100644
--- a/mysql-test/main/negation_elimination.result
+++ b/mysql-test/main/negation_elimination.result
@@ -4,7 +4,7 @@ insert into t1 values (NULL), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
(10), (11), (12), (13), (14), (15), (16), (17), (18), (19);
explain select * from t1 where not(not(a));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 20 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where not(not(a));
a
1
@@ -28,7 +28,7 @@ a
19
explain select * from t1 where not(not(not(a > 10)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
select * from t1 where not(not(not(a > 10)));
a
0
@@ -44,7 +44,7 @@ a
10
explain select * from t1 where not(not(not(a < 5) and not(a > 10)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 6 Using where; Using index
select * from t1 where not(not(not(a < 5) and not(a > 10)));
a
5
@@ -55,7 +55,7 @@ a
10
explain select * from t1 where not(a = 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 19 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where not(a = 10);
a
0
@@ -85,7 +85,7 @@ a
1
explain select * from t1 where not(a < 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
select * from t1 where not(a < 10);
a
10
@@ -100,7 +100,7 @@ a
19
explain select * from t1 where not(a >= 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 9 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
select * from t1 where not(a >= 10);
a
0
@@ -115,7 +115,7 @@ a
9
explain select * from t1 where not(a > 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
select * from t1 where not(a > 10);
a
0
@@ -131,7 +131,7 @@ a
10
explain select * from t1 where not(a <= 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 9 Using where; Using index
select * from t1 where not(a <= 10);
a
11
@@ -145,7 +145,7 @@ a
19
explain select * from t1 where not(a is null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 20 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where not(a is null);
a
0
@@ -176,7 +176,7 @@ a
NULL
explain select * from t1 where not(a < 5 or a > 15);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
select * from t1 where not(a < 5 or a > 15);
a
5
@@ -192,7 +192,7 @@ a
15
explain select * from t1 where not(a < 15 and a > 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 12 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where not(a < 15 and a > 5);
a
0
@@ -208,7 +208,7 @@ a
19
explain select * from t1 where a = 2 or not(a < 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 12 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where a = 2 or not(a < 10);
a
2
@@ -224,7 +224,7 @@ a
19
explain select * from t1 where a > 5 and not(a > 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 5 Using where; Using index
select * from t1 where a > 5 and not(a > 10);
a
6
@@ -255,7 +255,7 @@ a
19
explain select * from t1 where a = 2 or not(a < 5 or a > 15);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where a = 2 or not(a < 5 or a > 15);
a
2
@@ -272,7 +272,7 @@ a
15
explain select * from t1 where a = 7 or not(a < 15 and a > 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 13 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where a = 7 or not(a < 15 and a > 5);
a
0
@@ -289,7 +289,7 @@ a
19
explain select * from t1 where NULL or not(a < 15 and a > 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 12 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 21 Using where; Using index
select * from t1 where NULL or not(a < 15 and a > 5);
a
0
@@ -327,7 +327,7 @@ a
0
explain select * from t1 where not((a < 5 or a < 10) and (not(a > 16) or a > 17));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
select * from t1 where not((a < 5 or a < 10) and (not(a > 16) or a > 17));
a
10
@@ -362,7 +362,7 @@ a
19
explain select * from t1 where ((a between 5 and 15) and (not(a like 10)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 10 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 11 Using where; Using index
select * from t1 where ((a between 5 and 15) and (not(a like 10)));
a
5
@@ -500,7 +500,7 @@ NULL NULL
3 1
explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range a a 5 NULL 4 100.00 Using where; Using index
+1 SIMPLE t1 index a a 5 NULL 5 80.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`a` <> 0 AS `not(not(a))`,`test`.`t1`.`a` > 2 or `test`.`t1`.`a` <> 0 AS `not(a <= 2 and not(a))`,`test`.`t1`.`a` like '1' AS `not(a not like "1")`,`test`.`t1`.`a` in (1,2) AS `not (a not in (1,2))`,`test`.`t1`.`a` = 2 AS `not(a != 2)` from `test`.`t1` where `test`.`t1`.`a` <> 0 having `test`.`t1`.`a` <> 0
drop table t1;
diff --git a/mysql-test/main/no_password_column-mdev-11170.result b/mysql-test/main/no_password_column-mdev-11170.result
deleted file mode 100644
index 6de44dffe42..00000000000
--- a/mysql-test/main/no_password_column-mdev-11170.result
+++ /dev/null
@@ -1,169 +0,0 @@
-#
-# MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir:
-# Fatal error: mysql.user table is damaged or in
-# unsupported 3.20 format
-#
-create table backup_user like mysql.user;
-insert into backup_user select * from mysql.user;
-#
-# Original mysql.user table
-#
-describe mysql.user;
-Field Type Null Key Default Extra
-Host char(60) NO PRI
-User char(80) NO PRI
-Password char(41) NO
-Select_priv enum('N','Y') NO N
-Insert_priv enum('N','Y') NO N
-Update_priv enum('N','Y') NO N
-Delete_priv enum('N','Y') NO N
-Create_priv enum('N','Y') NO N
-Drop_priv enum('N','Y') NO N
-Reload_priv enum('N','Y') NO N
-Shutdown_priv enum('N','Y') NO N
-Process_priv enum('N','Y') NO N
-File_priv enum('N','Y') NO N
-Grant_priv enum('N','Y') NO N
-References_priv enum('N','Y') NO N
-Index_priv enum('N','Y') NO N
-Alter_priv enum('N','Y') NO N
-Show_db_priv enum('N','Y') NO N
-Super_priv enum('N','Y') NO N
-Create_tmp_table_priv enum('N','Y') NO N
-Lock_tables_priv enum('N','Y') NO N
-Execute_priv enum('N','Y') NO N
-Repl_slave_priv enum('N','Y') NO N
-Repl_client_priv enum('N','Y') NO N
-Create_view_priv enum('N','Y') NO N
-Show_view_priv enum('N','Y') NO N
-Create_routine_priv enum('N','Y') NO N
-Alter_routine_priv enum('N','Y') NO N
-Create_user_priv enum('N','Y') NO N
-Event_priv enum('N','Y') NO N
-Trigger_priv enum('N','Y') NO N
-Create_tablespace_priv enum('N','Y') NO N
-Delete_history_priv enum('N','Y') NO N
-ssl_type enum('','ANY','X509','SPECIFIED') NO
-ssl_cipher blob NO NULL
-x509_issuer blob NO NULL
-x509_subject blob NO NULL
-max_questions int(11) unsigned NO 0
-max_updates int(11) unsigned NO 0
-max_connections int(11) unsigned NO 0
-max_user_connections int(11) NO 0
-plugin char(64) NO
-authentication_string text NO NULL
-password_expired enum('N','Y') NO N
-is_role enum('N','Y') NO N
-default_role char(80) NO
-max_statement_time decimal(12,6) NO 0.000000
-#
-# Drop the password column.
-#
-alter table mysql.user drop column password;
-flush privileges;
-#
-# Create users without the password column present.
-#
-create user foo;
-create user goo identified by "foo";
-select OLD_PASSWORD("ioo");
-OLD_PASSWORD("ioo")
-7a8f886d28473e85
-create user ioo identified with "mysql_old_password" as "7a8f886d28473e85";
-#
-# Check if users have grants loaded correctly.
-#
-show grants for foo;
-Grants for foo@%
-GRANT USAGE ON *.* TO `foo`@`%`
-show grants for goo;
-Grants for goo@%
-GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
-show grants for ioo;
-Grants for ioo@%
-GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
-select user, host, select_priv, plugin, authentication_string from mysql.user
-where user like "%oo"
-order by user;
-user host select_priv plugin authentication_string
-foo % N
-goo % N mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF
-ioo % N mysql_old_password 7a8f886d28473e85
-#
-# Test setting password.
-#
-SET PASSWORD FOR foo=PASSWORD("bar");
-show grants for foo;
-Grants for foo@%
-GRANT USAGE ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
-show grants for goo;
-Grants for goo@%
-GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
-show grants for ioo;
-Grants for ioo@%
-GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
-select user, host, select_priv, plugin, authentication_string from mysql.user
-where user like "%oo"
-order by user;
-user host select_priv plugin authentication_string
-foo % N mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
-goo % N mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF
-ioo % N mysql_old_password 7a8f886d28473e85
-#
-# Test flush privileges without password column.
-#
-flush privileges;
-show grants for foo;
-Grants for foo@%
-GRANT USAGE ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
-show grants for goo;
-Grants for goo@%
-GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
-show grants for ioo;
-Grants for ioo@%
-GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
-#
-# Test granting of privileges.
-#
-grant select on *.* to foo;
-grant select on *.* to goo;
-grant select on *.* to ioo;
-show grants for foo;
-Grants for foo@%
-GRANT SELECT ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
-show grants for goo;
-Grants for goo@%
-GRANT SELECT ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
-show grants for ioo;
-Grants for ioo@%
-GRANT SELECT ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
-#
-# Check to see if grants are stable on flush.
-#
-flush privileges;
-show grants for foo;
-Grants for foo@%
-GRANT SELECT ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
-show grants for goo;
-Grants for goo@%
-GRANT SELECT ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
-show grants for ioo;
-Grants for ioo@%
-GRANT SELECT ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
-#
-# Check internal table representation.
-#
-select user, host, select_priv, plugin, authentication_string from mysql.user
-where user like "%oo"
-order by user;
-user host select_priv plugin authentication_string
-foo % Y mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
-goo % Y mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF
-ioo % Y mysql_old_password 7a8f886d28473e85
-#
-# Reset to final original state.
-#
-drop table mysql.user;
-rename table backup_user to mysql.user;
-flush privileges;
diff --git a/mysql-test/main/no_password_column-mdev-11170.test b/mysql-test/main/no_password_column-mdev-11170.test
deleted file mode 100644
index 2cc4ba82ee8..00000000000
--- a/mysql-test/main/no_password_column-mdev-11170.test
+++ /dev/null
@@ -1,95 +0,0 @@
---source include/not_embedded.inc
---echo #
---echo # MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir:
---echo # Fatal error: mysql.user table is damaged or in
---echo # unsupported 3.20 format
---echo #
-
-
-create table backup_user like mysql.user;
-insert into backup_user select * from mysql.user;
-
---echo #
---echo # Original mysql.user table
---echo #
-describe mysql.user;
-
---echo #
---echo # Drop the password column.
---echo #
-alter table mysql.user drop column password;
-flush privileges;
-
---echo #
---echo # Create users without the password column present.
---echo #
-create user foo;
-create user goo identified by "foo";
-select OLD_PASSWORD("ioo");
-create user ioo identified with "mysql_old_password" as "7a8f886d28473e85";
-
---echo #
---echo # Check if users have grants loaded correctly.
---echo #
-show grants for foo;
-show grants for goo;
-show grants for ioo;
-
-select user, host, select_priv, plugin, authentication_string from mysql.user
-where user like "%oo"
-order by user;
-
---echo #
---echo # Test setting password.
---echo #
-SET PASSWORD FOR foo=PASSWORD("bar");
-
-show grants for foo;
-show grants for goo;
-show grants for ioo;
-
-select user, host, select_priv, plugin, authentication_string from mysql.user
-where user like "%oo"
-order by user;
-
---echo #
---echo # Test flush privileges without password column.
---echo #
-flush privileges;
-show grants for foo;
-show grants for goo;
-show grants for ioo;
-
---echo #
---echo # Test granting of privileges.
---echo #
-grant select on *.* to foo;
-grant select on *.* to goo;
-grant select on *.* to ioo;
-show grants for foo;
-show grants for goo;
-show grants for ioo;
-
---echo #
---echo # Check to see if grants are stable on flush.
---echo #
-flush privileges;
-show grants for foo;
-show grants for goo;
-show grants for ioo;
-
---echo #
---echo # Check internal table representation.
---echo #
-select user, host, select_priv, plugin, authentication_string from mysql.user
-where user like "%oo"
-order by user;
-
-
---echo #
---echo # Reset to final original state.
---echo #
-drop table mysql.user;
-rename table backup_user to mysql.user;
-
-flush privileges;
diff --git a/mysql-test/main/not_embedded_server.result b/mysql-test/main/not_embedded_server.result
index ba68ca8619b..bc794ce48c8 100644
--- a/mysql-test/main/not_embedded_server.result
+++ b/mysql-test/main/not_embedded_server.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
+call mtr.add_suppression("Can't open and lock privilege tables: Table 'db' was not locked with LOCK TABLES");
SHOW VARIABLES like 'slave_skip_errors';
Variable_name Value
slave_skip_errors OFF
@@ -16,7 +16,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT);
LOCK TABLES t1 READ;
FLUSH PRIVILEGES;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP TABLE t1;
#
diff --git a/mysql-test/main/not_embedded_server.test b/mysql-test/main/not_embedded_server.test
index b2cbdba6850..20f75db25d5 100644
--- a/mysql-test/main/not_embedded_server.test
+++ b/mysql-test/main/not_embedded_server.test
@@ -6,7 +6,7 @@
# End of 4.1 tests
-call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
+call mtr.add_suppression("Can't open and lock privilege tables: Table 'db' was not locked with LOCK TABLES");
#
# Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors
diff --git a/mysql-test/main/null.result b/mysql-test/main/null.result
index 3eb7e143347..c32574d90fd 100644
--- a/mysql-test/main/null.result
+++ b/mysql-test/main/null.result
@@ -187,7 +187,7 @@ Warnings:
Warning 1265 Data truncated for column 'i' at row 513
explain select * from t1 where i=2 or i is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref i i 4 const 7 Using index
+1 SIMPLE t1 ref i i 4 const 8 Using index
select count(*) from t1 where i=2 or i is null;
count(*)
9
@@ -515,9 +515,9 @@ NULLIF(TIMESTAMP'2001-01-01 00:00:00',1e0),
NULLIF(TIMESTAMP'2001-01-01 00:00:00','2001-01-01'),
NULLIF(TIMESTAMP'2001-01-01 00:00:00',TIME'00:00:00');
Warnings:
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '1.0'
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1.0'
+Warning 1292 Truncated incorrect datetime value: '1'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -536,9 +536,9 @@ NULLIF(DATE'2001-01-01',1e0),
NULLIF(DATE'2001-01-01','2001-01-01'),
NULLIF(DATE'2001-01-01',TIME'00:00:00');
Warnings:
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '1.0'
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1.0'
+Warning 1292 Truncated incorrect datetime value: '1'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1640,8 +1640,8 @@ CASE WHEN TIMESTAMP'2001-01-01 00:00:00'=1 THEN NULL
ELSE TIMESTAMP'2001-01-01 00:00:00'
END AS b;
Warnings:
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
DROP TABLE t1;
#
# MDEV-8785 Wrong results for EXPLAIN EXTENDED...WHERE NULLIF(latin1_col, _utf8'a' COLLATE utf8_bin) IS NOT NULL
diff --git a/mysql-test/main/null_key.result b/mysql-test/main/null_key.result
index 4b4a4b80dee..55b2060475f 100644
--- a/mysql-test/main/null_key.result
+++ b/mysql-test/main/null_key.result
@@ -18,9 +18,9 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t1 where a<=>b limit 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 9 NULL 12 Using where; Using index
-explain select * from t1 where (a is null or a > 0 and a < 3) and b < 5 limit 3;
+explain select * from t1 where (a is null or a > 0 and a < 2) and b < 5 limit 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a,b a 9 NULL 3 Using where; Using index
+1 SIMPLE t1 index a,b a 9 NULL 12 Using where; Using index
explain select * from t1 where (a is null or a = 7) and b=7;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using where; Using index
@@ -32,7 +32,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using where; Using index
explain select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a,b a 9 NULL 3 Using where; Using index
+1 SIMPLE t1 ref a,b a 5 const 2 Using where; Using index
explain select * from t1 where a > 1 and a < 3 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index
@@ -257,10 +257,11 @@ uniq_id int(10) unsigned default NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
+INSERT INTO t1 VALUES (11,5),(12,6),(13,7),(14,8),(15,9);
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
explain select id from t1 where uniq_id is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1 idx1 5 const 5 Using index condition
+1 SIMPLE t1 ref idx1 idx1 5 const 6 Using index condition
explain select id from t1 where uniq_id =1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const idx1 idx1 5 const 1
@@ -290,6 +291,11 @@ id uniq_id
4 2
7 3
8 4
+11 5
+12 6
+13 7
+14 8
+15 9
SELECT * FROM t2 ORDER BY uniq_id, id;
id uniq_id
3 1
@@ -399,8 +405,11 @@ INSERT INTO t3 SELECT * FROM t4;
INSERT INTO t3 VALUES (2), (3);
ANALYZE table t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SELECT COUNT(*) FROM t3;
COUNT(*)
diff --git a/mysql-test/main/null_key.test b/mysql-test/main/null_key.test
index c3ebc6f5b94..a5781cc8524 100644
--- a/mysql-test/main/null_key.test
+++ b/mysql-test/main/null_key.test
@@ -12,7 +12,7 @@ explain select * from t1 where a is null and b = 2;
explain select * from t1 where a is null and b = 7;
explain select * from t1 where a=2 and b = 2;
explain select * from t1 where a<=>b limit 2;
-explain select * from t1 where (a is null or a > 0 and a < 3) and b < 5 limit 3;
+explain select * from t1 where (a is null or a > 0 and a < 2) and b < 5 limit 3;
explain select * from t1 where (a is null or a = 7) and b=7;
explain select * from t1 where (a is null or a = 7) and b=7 order by a;
explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2;
@@ -103,8 +103,8 @@ CREATE TABLE t2 (
) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
+INSERT INTO t1 VALUES (11,5),(12,6),(13,7),(14,8),(15,9);
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
-
#
# Check IS NULL optimization
#
diff --git a/mysql-test/main/olap.result b/mysql-test/main/olap.result
index b7681179be0..93eda747d83 100644
--- a/mysql-test/main/olap.result
+++ b/mysql-test/main/olap.result
@@ -834,15 +834,15 @@ a
1
1
Warnings:
+Warning 1292 Truncated incorrect datetime value: ''
Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
Warning 1292 Incorrect datetime value: ''
-Warning 1292 Incorrect datetime value: ''
-Warning 1292 Incorrect datetime value: ''
-Warning 1292 Incorrect datetime value: ''
-Warning 1292 Incorrect datetime value: ''
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
Warning 1292 Incorrect datetime value: ''
DROP TABLE t1;
#
diff --git a/mysql-test/main/old-mode.result b/mysql-test/main/old-mode.result
index 73ad613048a..e0a3412bbdf 100644
--- a/mysql-test/main/old-mode.result
+++ b/mysql-test/main/old-mode.result
@@ -180,3 +180,44 @@ a unix_timestamp(a)
2010-10-31 02:25:26 1288481126
drop table t1, t2;
set time_zone=DEFAULT;
+#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+SET global mysql56_temporal_format=false;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(0));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+a COALESCE(a) UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 2010-10-31 02:25:25 1288481125
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+MIN(a) a
+2010-10-31 02:25:26 1288477526
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+MAX(a) a
+2010-10-31 02:25:25 1288481125
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a)
+2010-10-31 02:25:26 1288477526 2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125 2010-10-31 02:25:25 1288481125
+ALTER TABLE t1 MODIFY a TIMESTAMP(1);
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+a COALESCE(a) UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26.0 2010-10-31 02:25:26.0 1288477526.0
+2010-10-31 02:25:25.0 2010-10-31 02:25:25.0 1288481125.0
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+MIN(a) a
+2010-10-31 02:25:26.0 1288477526.0
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+MAX(a) a
+2010-10-31 02:25:25.0 1288481125.0
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a)
+2010-10-31 02:25:26.0 1288477526.0 2010-10-31 02:25:26.0 1288477526.0
+2010-10-31 02:25:25.0 1288481125.0 2010-10-31 02:25:25.0 1288481125.0
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET global mysql56_temporal_format=true;
diff --git a/mysql-test/main/old-mode.test b/mysql-test/main/old-mode.test
index e092ee78a2e..a09de1cf87d 100644
--- a/mysql-test/main/old-mode.test
+++ b/mysql-test/main/old-mode.test
@@ -120,3 +120,32 @@ insert t2 select a from t1;
select a, unix_timestamp(a) from t2;
drop table t1, t2;
set time_zone=DEFAULT;
+
+
+--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+
+# This tests:
+# Field_timestamp::val_native()
+# Field_timestamp_hires::val_native()
+# Type_handler_timestamp_common::type_handler_for_native_format()
+
+SET global mysql56_temporal_format=false;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(0));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+ALTER TABLE t1 MODIFY a TIMESTAMP(1);
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET global mysql56_temporal_format=true;
diff --git a/mysql-test/main/openssl_6975.test b/mysql-test/main/openssl_6975.test
index 6a82d013fb6..bfcb0d56681 100644
--- a/mysql-test/main/openssl_6975.test
+++ b/mysql-test/main/openssl_6975.test
@@ -18,25 +18,25 @@ let $mysql=$MYSQL --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$
disable_abort_on_error;
echo TLS1.2 ciphers: user is ok with any cipher;
-exec $mysql --ssl-cipher=AES128-SHA256;
+exec $mysql --tls-version=TLSv1.2 --ssl-cipher=AES128-SHA256;
--replace_result DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-GCM-SHA384
-exec $mysql --ssl-cipher=TLSv1.2;
+exec $mysql --tls-version=TLSv1.2 --ssl-cipher=TLSv1.2;
echo TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA;
-exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA256;
-exec $mysql --user ssl_sslv3 --ssl-cipher=TLSv1.2;
+exec $mysql --user ssl_sslv3 --tls-version=TLSv1.2 --ssl-cipher=AES128-SHA256;
+exec $mysql --user ssl_sslv3 --tls-version=TLSv1.2 --ssl-cipher=TLSv1.2;
echo TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
-exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA256;
-exec $mysql --user ssl_tls12 --ssl-cipher=TLSv1.2;
+exec $mysql --user ssl_tls12 --tls-version=TLSv1.2 --ssl-cipher=AES128-SHA256;
+exec $mysql --user ssl_tls12 --tls-version=TLSv1.2 --ssl-cipher=TLSv1.2;
echo SSLv3 ciphers: user is ok with any cipher;
-exec $mysql --ssl-cipher=AES256-SHA;
-exec $mysql --ssl-cipher=SSLv3;
+exec $mysql --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=AES256-SHA;
+exec $mysql --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=SSLv3;
echo SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA;
-exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA;
-exec $mysql --user ssl_sslv3 --ssl-cipher=SSLv3;
+exec $mysql --user ssl_sslv3 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=AES128-SHA;
+exec $mysql --user ssl_sslv3 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=SSLv3;
echo SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
-exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA;
-exec $mysql --user ssl_tls12 --ssl-cipher=SSLv3;
+exec $mysql --user ssl_tls12 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=AES128-SHA;
+exec $mysql --user ssl_tls12 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=SSLv3;
drop user ssl_sslv3@localhost;
drop user ssl_tls12@localhost;
diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result
new file mode 100644
index 00000000000..f6e2140def6
--- /dev/null
+++ b/mysql-test/main/opt_trace.result
@@ -0,0 +1,8647 @@
+SELECT table_name, column_name FROM information_schema.columns where table_name="OPTIMIZER_TRACE";
+table_name column_name
+OPTIMIZER_TRACE QUERY
+OPTIMIZER_TRACE TRACE
+OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE
+OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES
+set optimizer_trace="enabled=on";
+show variables like 'optimizer_trace';
+Variable_name Value
+optimizer_trace enabled=on
+set optimizer_trace="enabled=off";
+show variables like 'optimizer_trace';
+Variable_name Value
+optimizer_trace enabled=off
+create table t1 (a int, b int);
+insert into t1 values (1,2),(2,3);
+create table t2 (b int);
+insert into t2 values (1),(2);
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+create function f1 (a int) returns INT
+return 1;
+create view v1 as select * from t1 where t1.a=1;
+create view v2 as select * from t1 where t1.a=1 group by t1.b;
+set optimizer_trace="enabled=on";
+# Mergeable views/derived tables
+select * from v1;
+a b
+1 2
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select * from v1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "view": {
+ "table": "v1",
+ "select_id": 2,
+ "algorithm": "merged"
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "expanded_query": "/* select#2 */ select t1.a AS a,t1.b AS b from t1 where t1.a = 1"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select t1.a AS a,t1.b AS b from v1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a = 1",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "selectivity_for_indexes": [],
+ "selectivity_for_columns": [
+ {
+ "column_name": "a",
+ "ranges": ["1 <= a <= 1"],
+ "selectivity_from_histogram": 0.5
+ }
+ ],
+ "cond_selectivity": 0.5
+ },
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 2,
+ "cost": 2.0044
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 1,
+ "cost": 2.2044,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 1,
+ "cost": 2.2044,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 1,
+ "cost_for_plan": 2.4044,
+ "estimated_join_cardinality": 1
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a = 1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.a = 1"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+select * from (select * from t1 where t1.a=1)q;
+a b
+1 2
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select * from (select * from t1 where t1.a=1)q {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "derived": {
+ "table": "q",
+ "select_id": 2,
+ "algorithm": "merged"
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "expanded_query": "/* select#2 */ select t1.a AS a,t1.b AS b from t1 where t1.a = 1"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select t1.a AS a,t1.b AS b from (/* select#2 */ select t1.a AS a,t1.b AS b from t1 where t1.a = 1) q"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a = 1",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "selectivity_for_indexes": [],
+ "selectivity_for_columns": [
+ {
+ "column_name": "a",
+ "ranges": ["1 <= a <= 1"],
+ "selectivity_from_histogram": 0.5
+ }
+ ],
+ "cond_selectivity": 0.5
+ },
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 2,
+ "cost": 2.0044
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 1,
+ "cost": 2.2044,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 1,
+ "cost": 2.2044,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 1,
+ "cost_for_plan": 2.4044,
+ "estimated_join_cardinality": 1
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a = 1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.a = 1"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+# Non-Mergeable views
+select * from v2;
+a b
+1 2
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select * from v2 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "view": {
+ "table": "v2",
+ "select_id": 2,
+ "algorithm": "materialized"
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "expanded_query": "/* select#2 */ select t1.a AS a,t1.b AS b from t1 where t1.a = 1 group by t1.b"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select v2.a AS a,v2.b AS b from v2"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_optimization": {
+ "select_id": 2,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a = 1",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(1, t1.a)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "selectivity_for_indexes": [],
+ "selectivity_for_columns": [
+ {
+ "column_name": "a",
+ "ranges": ["1 <= a <= 1"],
+ "selectivity_from_histogram": 0.5
+ }
+ ],
+ "cond_selectivity": 0.5
+ },
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 2,
+ "cost": 2.0044
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 1,
+ "cost": 2.2044,
+ "chosen": true,
+ "use_tmp_table": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 1,
+ "cost": 2.2044,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 1,
+ "cost_for_plan": 2.4044,
+ "cost_for_sorting": 1,
+ "estimated_join_cardinality": 1
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a = 1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.a = 1"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "<derived2>",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "<derived2>",
+ "table_scan": {
+ "rows": 2,
+ "cost": 2
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "<derived2>",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 2,
+ "cost": 2,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 2,
+ "cost": 2,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 2,
+ "cost_for_plan": 2.4,
+ "estimated_join_cardinality": 2
+ }
+ ]
+ },
+ {
+ "best_join_order": ["<derived2>"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "<derived2>",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_execution": {
+ "select_id": 2,
+ "steps": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+} 0 0
+drop table t1,t2;
+drop view v1,v2;
+drop function f1;
+create table t1(a int, b int);
+insert into t1 values (0,0),(1,1),(2,1),(3,2),(4,3),
+(5,3),(6,3),(7,3),(8,3),(9,3);
+create table t2(a int, b int);
+insert into t2 values (0,0),(1,1),(2,1),(3,2),(4,3),
+(5,3),(6,3),(7,3),(8,3),(9,3);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+ANALYZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+create view v1 as select a from t1 group by b;
+create view v2 as select a from t2;
+# Mergeable view
+explain select * from v2 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 10
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from v2 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "view": {
+ "table": "v2",
+ "select_id": 2,
+ "algorithm": "merged"
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "expanded_query": "/* select#2 */ select t2.a AS a from t2"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select t2.a AS a from v2"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t2",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t2",
+ "table_scan": {
+ "rows": 10,
+ "cost": 2.022
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.022,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.022,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 4.022,
+ "estimated_join_cardinality": 10
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t2"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t2",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+# Non-Mergeable view
+explain select * from v1 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 10
+2 DERIVED t1 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from v1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "view": {
+ "table": "v1",
+ "select_id": 2,
+ "algorithm": "materialized"
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "expanded_query": "/* select#2 */ select t1.a AS a from t1 group by t1.b"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select v1.a AS a from v1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_optimization": {
+ "select_id": 2,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 10,
+ "cost": 2.022
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.022,
+ "chosen": true,
+ "use_tmp_table": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.022,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 4.022,
+ "cost_for_sorting": 10,
+ "estimated_join_cardinality": 10
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "<derived2>",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "<derived2>",
+ "table_scan": {
+ "rows": 10,
+ "cost": 10
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "<derived2>",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 10,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 10,
+ "cost": 10,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 12,
+ "estimated_join_cardinality": 10
+ }
+ ]
+ },
+ {
+ "best_join_order": ["<derived2>"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "<derived2>",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_execution": {
+ "select_id": 2,
+ "steps": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+} 0 0
+drop table t1,t2;
+drop view v1,v2;
+#
+# print ref-keyues array
+#
+create table t0 (a int);
+INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int, b int, c int, key(a));
+insert into t1 select A.a*10 + B.a, A.a*10 + B.a, A.a*10 + B.a from t0 A, t0 B;
+create table t2(a int, b int, c int , key(a));
+insert into t2 select A.a*10 + B.a, A.a*10 + B.a, A.a*10 + B.a from t0 A, t0 B;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status Table is already up to date
+explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL a NULL NULL NULL 100 Using where
+1 SIMPLE t2 ref a a 5 test.t1.b 1 Using where
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.a AS a,t1.b AS b,t1.c AS c,t2.a AS a,t2.b AS b,t2.c AS c from t1 join t2 where t1.a = t2.b + 2 and t2.a = t1.b"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a = t2.b + 2 and t2.a = t1.b",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "t1.a = t2.b + 2 and multiple equal(t2.a, t1.b)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "t1.a = t2.b + 2 and multiple equal(t2.a, t1.b)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "t1.a = t2.b + 2 and multiple equal(t2.a, t1.b)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t2",
+ "row_may_be_null": false,
+ "map_bit": 1,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t1",
+ "field": "a",
+ "equals": "t2.b + 2",
+ "null_rejecting": true
+ },
+ {
+ "table": "t2",
+ "field": "a",
+ "equals": "t1.b",
+ "null_rejecting": true
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 100,
+ "cost": 2.3174
+ }
+ },
+ {
+ "table": "t2",
+ "table_scan": {
+ "rows": 100,
+ "cost": 2.3174
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 100,
+ "cost": 2.3174,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 100,
+ "cost": 2.3174,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 100,
+ "cost_for_plan": 22.317,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t1"],
+ "table": "t2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "a",
+ "used_range_estimates": false,
+ "cause": "not available",
+ "rows": 1,
+ "cost": 200,
+ "chosen": true
+ },
+ {
+ "access_type": "scan",
+ "resulting_rows": 100,
+ "cost": 2.3174,
+ "chosen": false
+ }
+ ],
+ "chosen_access_method": {
+ "type": "ref",
+ "records": 1,
+ "cost": 200,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 100,
+ "cost_for_plan": 242.32,
+ "estimated_join_cardinality": 100
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 100,
+ "cost": 2.3174,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 100,
+ "cost": 2.3174,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 100,
+ "cost_for_plan": 22.317,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t2"],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "a",
+ "used_range_estimates": false,
+ "cause": "not available",
+ "rows": 1,
+ "cost": 200,
+ "chosen": true
+ },
+ {
+ "access_type": "scan",
+ "resulting_rows": 100,
+ "cost": 2.3174,
+ "chosen": false
+ }
+ ],
+ "chosen_access_method": {
+ "type": "ref",
+ "records": 1,
+ "cost": 200,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 100,
+ "cost_for_plan": 242.32,
+ "pruned_by_cost": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1", "t2"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t2.a = t1.b and t1.a = t2.b + 2",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.b is not null"
+ },
+ {
+ "table": "t2",
+ "attached": "t1.a = t2.b + 2"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t1,t2,t0;
+#
+# group_by min max optimization
+#
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a INT NOT NULL, KEY(a));
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+EXPLAIN SELECT DISTINCT a FROM t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL a 4 NULL 5 Using index for group-by
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT DISTINCT a FROM t1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select distinct t1.a AS a from t1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 65536,
+ "cost": 13255
+ },
+ "potential_range_indexes": [
+ {
+ "index": "PRIMARY",
+ "usable": false,
+ "cause": "not applicable"
+ },
+ {
+ "index": "a",
+ "usable": true,
+ "key_parts": ["a"]
+ }
+ ],
+ "best_covering_index_scan": {
+ "index": "a",
+ "cost": 4812.5,
+ "chosen": true
+ },
+ "group_index_range": {
+ "distinct_query": true,
+ "potential_group_range_indexes": [
+ {
+ "index": "a",
+ "covering": true,
+ "rows": 5,
+ "cost": 6.75
+ }
+ ]
+ },
+ "best_group_range_summary": {
+ "type": "index_group",
+ "index": "a",
+ "min_max_arg": null,
+ "min_aggregate": false,
+ "max_aggregate": false,
+ "distinct_aggregate": false,
+ "rows": 5,
+ "cost": 6.75,
+ "key_parts_used_for_access": ["a"],
+ "ranges": [],
+ "chosen": true
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "index_group",
+ "index": "a",
+ "min_max_arg": null,
+ "min_aggregate": false,
+ "max_aggregate": false,
+ "distinct_aggregate": false,
+ "rows": 5,
+ "cost": 6.75,
+ "key_parts_used_for_access": ["a"],
+ "ranges": []
+ },
+ "rows_for_plan": 5,
+ "cost_for_plan": 6.75,
+ "chosen": true
+ }
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "index_merge",
+ "resulting_rows": 5,
+ "cost": 6.75,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "index_merge",
+ "records": 5,
+ "cost": 6.75,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 5,
+ "cost_for_plan": 7.75,
+ "estimated_join_cardinality": 5
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t1;
+#
+# With group by , where clause and MIN/MAX function
+#
+CREATE TABLE t1 (a INT, b INT, c int, d int, KEY(a,b,c,d));
+INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3), (4,4,4,4), (1,0,1,1), (3,2,3,3), (4,5,4,4);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL a 20 NULL 7 Using where; Using index
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select min(t1.d) AS `MIN(d)` from t1 where t1.b = 2 and t1.c = 3 group by t1.a"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.b = 2 and t1.c = 3",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(2, t1.b) and multiple equal(3, t1.c)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(2, t1.b) and multiple equal(3, t1.c)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(2, t1.b) and multiple equal(3, t1.c)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 7,
+ "cost": 5.5291
+ },
+ "potential_range_indexes": [
+ {
+ "index": "a",
+ "usable": true,
+ "key_parts": ["a", "b", "c", "d"]
+ }
+ ],
+ "best_covering_index_scan": {
+ "index": "a",
+ "cost": 1.3869,
+ "chosen": true
+ },
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "potential_group_range_indexes": [
+ {
+ "index": "a",
+ "covering": true,
+ "ranges": ["(2,3) <= (b,c) <= (2,3)"],
+ "rows": 8,
+ "cost": 2.2
+ }
+ ]
+ },
+ "best_group_range_summary": {
+ "type": "index_group",
+ "index": "a",
+ "min_max_arg": "d",
+ "min_aggregate": true,
+ "max_aggregate": false,
+ "distinct_aggregate": false,
+ "rows": 8,
+ "cost": 2.2,
+ "key_parts_used_for_access": ["a", "b", "c"],
+ "ranges": ["(2,3) <= (b,c) <= (2,3)"],
+ "chosen": false,
+ "cause": "cost"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ }
+ }
+ },
+ {
+ "selectivity_for_indexes": [],
+ "selectivity_for_columns": [
+ {
+ "column_name": "b",
+ "ranges": ["2 <= b <= 2"],
+ "selectivity_from_histogram": 0.2891
+ },
+ {
+ "column_name": "c",
+ "ranges": ["3 <= c <= 3"],
+ "selectivity_from_histogram": 0.2891
+ }
+ ],
+ "cond_selectivity": 0.0836
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 0.5849,
+ "cost": 3.3121,
+ "chosen": true,
+ "use_tmp_table": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 0.5849,
+ "cost": 3.3121,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 0.5849,
+ "cost_for_plan": 3.4291,
+ "cost_for_sorting": 0.5849,
+ "estimated_join_cardinality": 0.5849
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.b = 2 and t1.c = 3",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.b = 2 and t1.c = 3"
+ }
+ ]
+ }
+ },
+ {
+ "reconsidering_access_paths_for_index_ordering": {
+ "clause": "GROUP BY",
+ "fanout": 1,
+ "read_time": 3.3131,
+ "table": "t1",
+ "rows_estimation": 7,
+ "possible_keys": [
+ {
+ "index": "a",
+ "can_resolve_order": true,
+ "updated_limit": 7,
+ "index_scan_time": 7,
+ "records": 7,
+ "chosen": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL, a DATE, KEY(id,a));
+INSERT INTO t1 values (1,'2001-01-01'),(1,'2001-01-02'),
+(1,'2001-01-03'),(1,'2001-01-04'),
+(2,'2001-01-01'),(2,'2001-01-02'),
+(2,'2001-01-03'),(2,'2001-01-04'),
+(3,'2001-01-01'),(3,'2001-01-02'),
+(3,'2001-01-03'),(3,'2001-01-04'),
+(4,'2001-01-01'),(4,'2001-01-02'),
+(4,'2001-01-03'),(4,'2001-01-04');
+set optimizer_trace='enabled=on';
+EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL id 8 NULL 16 Using where; Using index
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.`id` AS `id`,min(t1.a) AS `MIN(a)`,max(t1.a) AS `MAX(a)` from t1 where t1.a >= 20010104e0 group by t1.`id`"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a >= 20010104e0",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "t1.a >= 20010104e0"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "t1.a >= 20010104e0"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "t1.a >= 20010104e0"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 16,
+ "cost": 7.3313
+ },
+ "potential_range_indexes": [
+ {
+ "index": "id",
+ "usable": true,
+ "key_parts": ["id", "a"]
+ }
+ ],
+ "best_covering_index_scan": {
+ "index": "id",
+ "cost": 1.8468,
+ "chosen": true
+ },
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "potential_group_range_indexes": [
+ {
+ "index": "id",
+ "covering": true,
+ "ranges": ["(2001-01-04) <= (a)"],
+ "rows": 9,
+ "cost": 2.35
+ }
+ ]
+ },
+ "best_group_range_summary": {
+ "type": "index_group",
+ "index": "id",
+ "min_max_arg": "a",
+ "min_aggregate": true,
+ "max_aggregate": true,
+ "distinct_aggregate": false,
+ "rows": 9,
+ "cost": 2.35,
+ "key_parts_used_for_access": ["id"],
+ "ranges": ["(2001-01-04) <= (a)"],
+ "chosen": false,
+ "cause": "cost"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ }
+ }
+ },
+ {
+ "selectivity_for_indexes": [],
+ "selectivity_for_columns": [],
+ "cond_selectivity": 1
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 16,
+ "cost": 2.0312,
+ "chosen": true,
+ "use_tmp_table": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 16,
+ "cost": 2.0312,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 16,
+ "cost_for_plan": 5.2313,
+ "cost_for_sorting": 16,
+ "estimated_join_cardinality": 16
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a >= 20010104e0",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.a >= 20010104e0"
+ }
+ ]
+ }
+ },
+ {
+ "reconsidering_access_paths_for_index_ordering": {
+ "clause": "GROUP BY",
+ "fanout": 1,
+ "read_time": 2.0322,
+ "table": "t1",
+ "rows_estimation": 9,
+ "possible_keys": [
+ {
+ "index": "id",
+ "can_resolve_order": true,
+ "updated_limit": 16,
+ "index_scan_time": 16,
+ "records": 16,
+ "chosen": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL id 8 NULL 16 Using where; Using index
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.`id` AS `id`,t1.a AS a from t1 where t1.a = 20010104e0 group by t1.`id`"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a = 20010104e0",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "t1.a = 20010104e0"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "t1.a = 20010104e0"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "t1.a = 20010104e0"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 16,
+ "cost": 7.3313
+ },
+ "potential_range_indexes": [
+ {
+ "index": "id",
+ "usable": true,
+ "key_parts": ["id", "a"]
+ }
+ ],
+ "best_covering_index_scan": {
+ "index": "id",
+ "cost": 1.8468,
+ "chosen": true
+ },
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "potential_group_range_indexes": [
+ {
+ "index": "id",
+ "covering": true,
+ "ranges": ["(2001-01-04) <= (a) <= (2001-01-04)"],
+ "rows": 9,
+ "cost": 2.35
+ }
+ ]
+ },
+ "best_group_range_summary": {
+ "type": "index_group",
+ "index": "id",
+ "min_max_arg": null,
+ "min_aggregate": false,
+ "max_aggregate": false,
+ "distinct_aggregate": false,
+ "rows": 9,
+ "cost": 2.35,
+ "key_parts_used_for_access": ["id", "a"],
+ "ranges": ["(2001-01-04) <= (a) <= (2001-01-04)"],
+ "chosen": false,
+ "cause": "cost"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ }
+ }
+ },
+ {
+ "selectivity_for_indexes": [],
+ "selectivity_for_columns": [],
+ "cond_selectivity": 1
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 16,
+ "cost": 2.0312,
+ "chosen": true,
+ "use_tmp_table": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 16,
+ "cost": 2.0312,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 16,
+ "cost_for_plan": 5.2313,
+ "cost_for_sorting": 16,
+ "estimated_join_cardinality": 16
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a = 20010104e0",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.a = 20010104e0"
+ }
+ ]
+ }
+ },
+ {
+ "reconsidering_access_paths_for_index_ordering": {
+ "clause": "GROUP BY",
+ "fanout": 1,
+ "read_time": 2.0322,
+ "table": "t1",
+ "rows_estimation": 9,
+ "possible_keys": [
+ {
+ "index": "id",
+ "can_resolve_order": true,
+ "updated_limit": 16,
+ "index_scan_time": 16,
+ "records": 16,
+ "chosen": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t1;
+#
+# Late ORDER BY optimization
+#
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k(a int primary key);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+create table t1 (
+pk int not null,
+a int,
+b int,
+c int,
+filler char(100),
+KEY a_a(c),
+KEY a_c(a,c),
+KEY a_b(a,b)
+);
+insert into t1
+select a, a,a,a, 'filler-dataaa' from test.one_k;
+update t1 set a=1 where pk between 0 and 180;
+update t1 set b=2 where pk between 0 and 20;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+set optimizer_trace='enabled=on';
+explain select * from t1 where a=1 and b=2 order by c limit 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a_c,a_b a_c 5 NULL 180 Using where
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 where a=1 and b=2 order by c limit 1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.pk AS pk,t1.a AS a,t1.b AS b,t1.c AS c,t1.filler AS filler from t1 where t1.a = 1 and t1.b = 2 order by t1.c limit 1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a = 1 and t1.b = 2",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(1, t1.a) and multiple equal(2, t1.b)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(1, t1.a) and multiple equal(2, t1.b)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(1, t1.a) and multiple equal(2, t1.b)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t1",
+ "field": "a",
+ "equals": "1",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "a",
+ "equals": "1",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "b",
+ "equals": "2",
+ "null_rejecting": true
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 1000,
+ "cost": 232.66
+ },
+ "potential_range_indexes": [
+ {
+ "index": "a_a",
+ "usable": false,
+ "cause": "not applicable"
+ },
+ {
+ "index": "a_c",
+ "usable": true,
+ "key_parts": ["a", "c"]
+ },
+ {
+ "index": "a_b",
+ "usable": true,
+ "key_parts": ["a", "b"]
+ }
+ ],
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "a_c",
+ "ranges": ["(1) <= (a) <= (1)"],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 180,
+ "cost": 229.72,
+ "chosen": true
+ },
+ {
+ "index": "a_b",
+ "ranges": ["(1,2) <= (a,b) <= (1,2)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 21,
+ "cost": 27.445,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "range_scan",
+ "index": "a_b",
+ "rows": 21,
+ "ranges": ["(1,2) <= (a,b) <= (1,2)"]
+ },
+ "rows_for_plan": 21,
+ "cost_for_plan": 27.445,
+ "chosen": true
+ }
+ }
+ },
+ {
+ "table": "t1",
+ "rowid_filters": [
+ {
+ "key": "a_b",
+ "build_cost": 2.989,
+ "rows": 21
+ },
+ {
+ "key": "a_c",
+ "build_cost": 23.969,
+ "rows": 180
+ }
+ ]
+ },
+ {
+ "selectivity_for_indexes": [
+ {
+ "index_name": "a_b",
+ "selectivity_from_index": 0.021
+ }
+ ],
+ "selectivity_for_columns": [
+ {
+ "column_name": "a",
+ "ranges": ["1 <= a <= 1"],
+ "selectivity_from_histogram": 0.1797
+ },
+ {
+ "column_name": "b",
+ "ranges": ["2 <= b <= 2"],
+ "selectivity_from_histogram": 0.0156
+ }
+ ],
+ "cond_selectivity": 0.021
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "a_c",
+ "used_range_estimates": true,
+ "rows": 180,
+ "cost": 92,
+ "chosen": true
+ },
+ {
+ "access_type": "ref",
+ "index": "a_b",
+ "used_range_estimates": true,
+ "rows": 21,
+ "cost": 22,
+ "chosen": true
+ },
+ {
+ "type": "scan",
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "chosen_access_method": {
+ "type": "ref",
+ "records": 21,
+ "cost": 22,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 21,
+ "cost_for_plan": 26.2,
+ "estimated_join_cardinality": 21
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a = 1 and t1.b = 2",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ },
+ {
+ "reconsidering_access_paths_for_index_ordering": {
+ "clause": "ORDER BY",
+ "fanout": 1,
+ "read_time": 22.001,
+ "table": "t1",
+ "rows_estimation": 21,
+ "possible_keys": [
+ {
+ "index": "a_a",
+ "can_resolve_order": true,
+ "updated_limit": 47,
+ "index_scan_time": 47,
+ "usable": false,
+ "cause": "cost"
+ },
+ {
+ "index": "a_c",
+ "can_resolve_order": true,
+ "updated_limit": 47,
+ "range_scan_time": 4.324,
+ "index_scan_time": 4.324,
+ "records": 180,
+ "chosen": true
+ },
+ {
+ "index": "a_b",
+ "can_resolve_order": false,
+ "cause": "not usable index for the query"
+ }
+ ]
+ }
+ },
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 1000,
+ "cost": 2e308
+ },
+ "potential_range_indexes": [
+ {
+ "index": "a_a",
+ "usable": false,
+ "cause": "not applicable"
+ },
+ {
+ "index": "a_c",
+ "usable": true,
+ "key_parts": ["a", "c"]
+ },
+ {
+ "index": "a_b",
+ "usable": false,
+ "cause": "not applicable"
+ }
+ ],
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "a_c",
+ "ranges": ["(1) <= (a) <= (1)"],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 180,
+ "cost": 229.72,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "range_scan",
+ "index": "a_c",
+ "rows": 180,
+ "ranges": ["(1) <= (a) <= (1)"]
+ },
+ "rows_for_plan": 180,
+ "cost_for_plan": 229.72,
+ "chosen": true
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t1,ten,one_k;
+#
+# TABLE ELIMINATION
+#
+create table t1 (a int);
+insert into t1 values (0),(1),(2),(3);
+create table t0 as select * from t1;
+create table t2 (a int primary key, b int)
+as select a, a as b from t1 where a in (1,2);
+create table t3 (a int primary key, b int)
+as select a, a as b from t1 where a in (1,3);
+set optimizer_trace='enabled=on';
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+analyze table t3;
+Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
+# table t2 should be eliminated
+explain
+select t1.a 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 4
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain
+select t1.a from t1 left join t2 on t1.a=t2.a {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.a AS a from (t1 left join t2 on(t1.a = t2.a))"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t2",
+ "row_may_be_null": true,
+ "map_bit": 1,
+ "depends_on_map_bits": ["0"]
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t2",
+ "field": "a",
+ "equals": "t1.a",
+ "null_rejecting": true
+ }
+ ]
+ },
+ {
+ "eliminated_tables": ["t2"]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 4,
+ "cost": 2.0068
+ }
+ },
+ {
+ "table": "t2",
+ "rows": 1,
+ "cost": 1,
+ "table_type": "const"
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": ["t2"],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 4,
+ "cost": 2.0068,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 4,
+ "cost": 2.0068,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 4,
+ "cost_for_plan": 2.8068,
+ "estimated_join_cardinality": 4
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t2", "t1"]
+ },
+ {
+ "condition_on_constant_tables": "1",
+ "computing_condition": []
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+# no tables should be eliminated
+explain select * from t1 left join t2 on t2.a=t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 left join t2 on t2.a=t1.a {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.a AS a,t2.a AS a,t2.b AS b from (t1 left join t2 on(t2.a = t1.a))"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t2",
+ "row_may_be_null": true,
+ "map_bit": 1,
+ "depends_on_map_bits": ["0"]
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t2",
+ "field": "a",
+ "equals": "t1.a",
+ "null_rejecting": true
+ }
+ ]
+ },
+ {
+ "eliminated_tables": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 4,
+ "cost": 2.0068
+ }
+ },
+ {
+ "table": "t2",
+ "table_scan": {
+ "rows": 2,
+ "cost": 2.0044
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 4,
+ "cost": 2.0068,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 4,
+ "cost": 2.0068,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 4,
+ "cost_for_plan": 2.8068,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t1"],
+ "table": "t2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "eq_ref",
+ "index": "PRIMARY",
+ "rows": 1,
+ "cost": 4,
+ "chosen": true
+ },
+ {
+ "access_type": "scan",
+ "resulting_rows": 2,
+ "cost": 8.0176,
+ "chosen": false
+ }
+ ],
+ "chosen_access_method": {
+ "type": "eq_ref",
+ "records": 1,
+ "cost": 4,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 4,
+ "cost_for_plan": 7.6068,
+ "estimated_join_cardinality": 4
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1", "t2"]
+ },
+ {
+ "condition_on_constant_tables": "1",
+ "computing_condition": []
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ },
+ {
+ "table": "t2",
+ "attached": "trigcond(trigcond(t1.a is not null))"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+# multiple tables are eliminated
+explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and t3.a=t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and t3.a=t1.a {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.a AS a from (t1 left join (t2 join t3 on(t2.b = t3.b)) on(t2.a = t1.a and t3.a = t1.a))"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t2",
+ "row_may_be_null": true,
+ "map_bit": 1,
+ "depends_on_map_bits": ["0"]
+ },
+ {
+ "table": "t3",
+ "row_may_be_null": true,
+ "map_bit": 2,
+ "depends_on_map_bits": ["0"]
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t2",
+ "field": "a",
+ "equals": "t1.a",
+ "null_rejecting": true
+ },
+ {
+ "table": "t2",
+ "field": "a",
+ "equals": "t3.a",
+ "null_rejecting": true
+ },
+ {
+ "table": "t3",
+ "field": "a",
+ "equals": "t2.a",
+ "null_rejecting": true
+ },
+ {
+ "table": "t3",
+ "field": "a",
+ "equals": "t1.a",
+ "null_rejecting": true
+ }
+ ]
+ },
+ {
+ "eliminated_tables": ["t3", "t2"]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 4,
+ "cost": 2.0068
+ }
+ },
+ {
+ "table": "t2",
+ "rows": 1,
+ "cost": 1,
+ "table_type": "const"
+ },
+ {
+ "table": "t3",
+ "rows": 1,
+ "cost": 1,
+ "table_type": "const"
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": ["t3", "t2"],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 4,
+ "cost": 2.0068,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 4,
+ "cost": 2.0068,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 4,
+ "cost_for_plan": 2.8068,
+ "estimated_join_cardinality": 4
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t3", "t2", "t1"]
+ },
+ {
+ "condition_on_constant_tables": "1",
+ "computing_condition": []
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t0, t1, t2, t3;
+#
+# IN subquery to sem-join is traced
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int, b int);
+insert into t1 values (0,0),(1,1),(2,2);
+create table t2 as select * from t1;
+create table t11(a int, b int);
+create table t10 (pk int, a int);
+insert into t10 select a,a from t0;
+create table t12 like t10;
+insert into t12 select * from t10;
+analyze table t1,t10;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t10 analyze status Engine-independent statistics collected
+test.t10 analyze status OK
+set optimizer_trace='enabled=on';
+explain extended select * from t1 where a in (select pk from t10);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
+2 MATERIALIZED t10 ALL NULL NULL NULL NULL 10 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join (`test`.`t10`) where 1
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain extended select * from t1 where a in (select pk from t10) {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "materialization",
+ "sjm_scan_allowed": true,
+ "possible": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "chosen": true
+ }
+ },
+ {
+ "expanded_query": "/* select#2 */ select t10.pk from t10"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select t1.a AS a,t1.b AS b from t1 where t1.a in (/* select#2 */ select t10.pk from t10)"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "converted_to_semi_join": true
+ }
+ },
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "1 and t1.a = t10.pk",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "1 and multiple equal(t1.a, t10.pk)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "1 and multiple equal(t1.a, t10.pk)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(t1.a, t10.pk)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t10",
+ "row_may_be_null": false,
+ "map_bit": 1,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0066
+ }
+ },
+ {
+ "table": "t10",
+ "table_scan": {
+ "rows": 10,
+ "cost": 2.022
+ }
+ }
+ ]
+ },
+ {
+ "semijoin_table_pullout": {
+ "pulled_out_tables": []
+ }
+ },
+ {
+ "execution_plan_for_potential_materialization": {
+ "steps": [
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t10",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.022,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.022,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 4.022,
+ "estimated_join_cardinality": 10
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0066,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0066,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6066,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t1"],
+ "table": "t10",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.022,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.022,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 30,
+ "cost_for_plan": 10.629,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "FirstMatch",
+ "records": 3,
+ "read_time": 10.629
+ },
+ {
+ "strategy": "SJ-Materialization",
+ "records": 3,
+ "read_time": 5.2786
+ },
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 3,
+ "read_time": 27.129
+ },
+ {
+ "chosen_strategy": "SJ-Materialization"
+ }
+ ],
+ "estimated_join_cardinality": 3
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t10",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.022,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.022,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 4.022,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "fix_semijoin_strategies_for_picked_join_order": [
+ {
+ "semi_join_strategy": "SJ-Materialization",
+ "join_order": [
+ {
+ "table": "t10"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1", "<subquery2>"]
+ },
+ {
+ "condition_on_constant_tables": "1",
+ "computing_condition": []
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ },
+ {
+ "table": "t10",
+ "attached": null
+ },
+ {
+ "table": "<subquery2>",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t0,t1,t11,t10,t12,t2;
+#
+# Selectivities for columns and indexes.
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+pk int,
+a int,
+b int,
+key pk(pk),
+key pk_a(pk,a),
+key pk_a_b(pk,a,b));
+insert into t1 select a,a,a from t0;
+ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a,b) INDEXES ();
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@optimizer_use_condition_selectivity=4;
+set @@use_stat_tables= PREFERABLY;
+set optimizer_trace='enabled=on';
+explain select * from t1 where pk = 2 and a=5 and b=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref pk,pk_a,pk_a_b pk_a_b 15 const,const,const 1 Using index
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 where pk = 2 and a=5 and b=1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.pk AS pk,t1.a AS a,t1.b AS b from t1 where t1.pk = 2 and t1.a = 5 and t1.b = 1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.pk = 2 and t1.a = 5 and t1.b = 1",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(2, t1.pk) and multiple equal(5, t1.a) and multiple equal(1, t1.b)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(2, t1.pk) and multiple equal(5, t1.a) and multiple equal(1, t1.b)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(2, t1.pk) and multiple equal(5, t1.a) and multiple equal(1, t1.b)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t1",
+ "field": "pk",
+ "equals": "2",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "pk",
+ "equals": "2",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "a",
+ "equals": "5",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "pk",
+ "equals": "2",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "a",
+ "equals": "5",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "b",
+ "equals": "1",
+ "null_rejecting": true
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 10,
+ "cost": 6.1317
+ },
+ "potential_range_indexes": [
+ {
+ "index": "pk",
+ "usable": true,
+ "key_parts": ["pk"]
+ },
+ {
+ "index": "pk_a",
+ "usable": true,
+ "key_parts": ["pk", "a"]
+ },
+ {
+ "index": "pk_a_b",
+ "usable": true,
+ "key_parts": ["pk", "a", "b"]
+ }
+ ],
+ "best_covering_index_scan": {
+ "index": "pk_a_b",
+ "cost": 1.5429,
+ "chosen": true
+ },
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "pk",
+ "ranges": ["(2) <= (pk) <= (2)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3773,
+ "chosen": false,
+ "cause": "cost"
+ },
+ {
+ "index": "pk_a",
+ "ranges": ["(2,5) <= (pk,a) <= (2,5)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3783,
+ "chosen": false,
+ "cause": "cost"
+ },
+ {
+ "index": "pk_a_b",
+ "ranges": ["(2,5,1) <= (pk,a,b) <= (2,5,1)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 1,
+ "cost": 1.1793,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect": {
+ "intersecting_indexes": [
+ {
+ "index": "pk",
+ "index_scan_cost": 1.0023,
+ "cumulated_index_scan_cost": 1.0023,
+ "disk_sweep_cost": 0.9008,
+ "cumulative_total_cost": 1.9031,
+ "usable": true,
+ "matching_rows_now": 1,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ },
+ {
+ "index": "pk_a",
+ "usable": false,
+ "cause": "does not reduce cost of intersect"
+ },
+ {
+ "index": "pk_a_b",
+ "usable": false,
+ "cause": "does not reduce cost of intersect"
+ }
+ ],
+ "clustered_pk": {
+ "clustered_pk_added_to_intersect": false,
+ "cause": "no clustered pk index"
+ },
+ "chosen": false,
+ "cause": "cost"
+ },
+ "analyzing_index_merge_union": []
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "range_scan",
+ "index": "pk_a_b",
+ "rows": 1,
+ "ranges": ["(2,5,1) <= (pk,a,b) <= (2,5,1)"]
+ },
+ "rows_for_plan": 1,
+ "cost_for_plan": 1.1793,
+ "chosen": true
+ }
+ }
+ },
+ {
+ "table": "t1",
+ "rowid_filters": [
+ {
+ "key": "pk",
+ "build_cost": 1.1823,
+ "rows": 1
+ },
+ {
+ "key": "pk_a",
+ "build_cost": 1.1833,
+ "rows": 1
+ },
+ {
+ "key": "pk_a_b",
+ "build_cost": 1.1843,
+ "rows": 1
+ }
+ ]
+ },
+ {
+ "selectivity_for_indexes": [
+ {
+ "index_name": "pk_a_b",
+ "selectivity_from_index": 0.1
+ }
+ ],
+ "selectivity_for_columns": [
+ {
+ "column_name": "a",
+ "ranges": ["5 <= a <= 5"],
+ "selectivity_from_histogram": 0.1
+ },
+ {
+ "column_name": "b",
+ "ranges": ["1 <= b <= 1"],
+ "selectivity_from_histogram": 0.1
+ }
+ ],
+ "cond_selectivity": 0.1
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "pk",
+ "used_range_estimates": true,
+ "rows": 1,
+ "cost": 2,
+ "chosen": true
+ },
+ {
+ "access_type": "ref",
+ "index": "pk_a",
+ "used_range_estimates": true,
+ "rows": 1,
+ "cost": 2,
+ "chosen": false,
+ "cause": "cost"
+ },
+ {
+ "access_type": "ref",
+ "index": "pk_a_b",
+ "used_range_estimates": true,
+ "rows": 1,
+ "cost": 1.0043,
+ "chosen": true
+ },
+ {
+ "type": "scan",
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "chosen_access_method": {
+ "type": "ref",
+ "records": 1,
+ "cost": 1.0043,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 1,
+ "cost_for_plan": 1.2043,
+ "estimated_join_cardinality": 1
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.pk = 2 and t1.a = 5 and t1.b = 1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set @@use_stat_tables= @save_use_stat_tables;
+drop table t0,t1;
+set optimizer_trace="enabled=off";
+#
+# Tests added to show that sub-statements are not traced
+#
+create table t1(a int);
+insert into t1 values (1),(2),(3),(4);
+create table t2(a int);
+insert into t2 values (1),(2),(3),(4);
+create function f1(a int) returns int
+begin
+declare a int default 0;
+set a= a+ (select count(*) from t2);
+return a;
+end|
+create function f2(a int) returns int
+begin
+declare a int default 0;
+select count(*) from t2 into a;
+return a;
+end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+set optimizer_trace='enabled=on';
+select f1(a) from t1;
+f1(a)
+4
+4
+4
+4
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select f1(a) from t1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select f1(t1.a) AS `f1(a)` from t1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 4,
+ "cost": 2.0068
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 4,
+ "cost": 2.0068,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 4,
+ "cost": 2.0068,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 4,
+ "cost_for_plan": 2.8068,
+ "estimated_join_cardinality": 4
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+select f2(a) from t1;
+f2(a)
+4
+4
+4
+4
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select f2(a) from t1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select f2(t1.a) AS `f2(a)` from t1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 4,
+ "cost": 2.0068
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 4,
+ "cost": 2.0068,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 4,
+ "cost": 2.0068,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 4,
+ "cost_for_plan": 2.8068,
+ "estimated_join_cardinality": 4
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t1,t2;
+drop function f1;
+drop function f2;
+set optimizer_trace='enabled=off';
+#
+# MDEV-18489: Limit the memory used by the optimizer trace
+#
+create table t1 (a int);
+insert into t1 values (1),(2);
+set optimizer_trace='enabled=on';
+set @save_optimizer_trace_max_mem_size= @@optimizer_trace_max_mem_size;
+select * from t1;
+a
+1
+2
+select length(trace) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+length(trace)
+2163
+set optimizer_trace_max_mem_size=100;
+select * from t1;
+a
+1
+2
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select * from t1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ 2063 0
+set optimizer_trace_max_mem_size=0;
+select * from t1;
+a
+1
+2
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select * from t1 2163 0
+drop table t1;
+set optimizer_trace='enabled=off';
+set @@optimizer_trace_max_mem_size= @save_optimizer_trace_max_mem_size;
+#
+# MDEV-18527: Optimizer trace for DELETE query shows table:null
+#
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t0 (a int, b int);
+insert into t0 select a,a from ten;
+alter table t0 add key(a);
+set optimizer_trace=1;
+explain delete from t0 where t0.a<3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 range a a 5 NULL 3 Using where
+select * from information_schema.optimizer_trace;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain delete from t0 where t0.a<3 {
+ "steps": [
+ {
+ "table": "t0",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 10,
+ "cost": 6.122
+ },
+ "potential_range_indexes": [
+ {
+ "index": "a",
+ "usable": true,
+ "key_parts": ["a"]
+ }
+ ],
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no join"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "a",
+ "ranges": ["(NULL) < (a) < (3)"],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 3,
+ "cost": 5.007,
+ "chosen": true
+ }
+ ],
+ "analyzing_index_merge_union": []
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "range_scan",
+ "index": "a",
+ "rows": 3,
+ "ranges": ["(NULL) < (a) < (3)"]
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 5.007,
+ "chosen": true
+ }
+ }
+ }
+ ]
+} 0 0
+drop table ten,t0;
+set optimizer_trace='enabled=off';
+#
+# MDEV-18528: Optimizer trace support for multi-table UPDATE and DELETE
+#
+set optimizer_trace=1;
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t0 (a int, b int);
+insert into t0 select a,a from ten;
+alter table t0 add key(a);
+create table t1 like t0;
+insert into t1 select * from t0;
+explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 range a a 5 NULL 3 Using where
+1 SIMPLE t1 ref a a 5 test.t0.a 1
+select * from information_schema.optimizer_trace;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select NULL AS `NULL` from t0 join t1 where t0.a = t1.a and t1.a < 3"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t0.a = t1.a and t1.a < 3",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "t1.a < 3 and multiple equal(t0.a, t1.a)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "t1.a < 3 and multiple equal(t0.a, t1.a)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "t1.a < 3 and multiple equal(t0.a, t1.a)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t0",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 1,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t0",
+ "field": "a",
+ "equals": "t1.a",
+ "null_rejecting": true
+ },
+ {
+ "table": "t1",
+ "field": "a",
+ "equals": "t0.a",
+ "null_rejecting": true
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t0",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 10,
+ "cost": 6.122
+ },
+ "potential_range_indexes": [
+ {
+ "index": "a",
+ "usable": true,
+ "key_parts": ["a"]
+ }
+ ],
+ "best_covering_index_scan": {
+ "index": "a",
+ "cost": 1.5234,
+ "chosen": true
+ },
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "not single_table"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "a",
+ "ranges": ["(NULL) < (a) < (3)"],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 3,
+ "cost": 1.407,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "range_scan",
+ "index": "a",
+ "rows": 3,
+ "ranges": ["(NULL) < (a) < (3)"]
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 1.407,
+ "chosen": true
+ }
+ }
+ },
+ {
+ "selectivity_for_indexes": [
+ {
+ "index_name": "a",
+ "selectivity_from_index": 0.3
+ }
+ ],
+ "selectivity_for_columns": [],
+ "cond_selectivity": 0.3
+ },
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 10,
+ "cost": 6.122
+ },
+ "potential_range_indexes": [
+ {
+ "index": "a",
+ "usable": true,
+ "key_parts": ["a"]
+ }
+ ],
+ "best_covering_index_scan": {
+ "index": "a",
+ "cost": 1.5234,
+ "chosen": true
+ },
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "not single_table"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "a",
+ "ranges": ["(NULL) < (a) < (3)"],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 3,
+ "cost": 1.407,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union": []
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "range_scan",
+ "index": "a",
+ "rows": 3,
+ "ranges": ["(NULL) < (a) < (3)"]
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 1.407,
+ "chosen": true
+ }
+ }
+ },
+ {
+ "selectivity_for_indexes": [
+ {
+ "index_name": "a",
+ "selectivity_from_index": 0.3
+ }
+ ],
+ "selectivity_for_columns": [],
+ "cond_selectivity": 0.3
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t0",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "range",
+ "resulting_rows": 3,
+ "cost": 1.407,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "range",
+ "records": 3,
+ "cost": 1.407,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.007,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t0"],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "a",
+ "used_range_estimates": false,
+ "cause": "not better than ref estimates",
+ "rows": 1,
+ "cost": 3.007,
+ "chosen": true
+ },
+ {
+ "type": "scan",
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "chosen_access_method": {
+ "type": "ref",
+ "records": 1,
+ "cost": 3.007,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 5.614,
+ "estimated_join_cardinality": 3
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "range",
+ "resulting_rows": 3,
+ "cost": 1.407,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "range",
+ "records": 3,
+ "cost": 1.407,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.007,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t1"],
+ "table": "t0",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "a",
+ "used_range_estimates": false,
+ "cause": "not better than ref estimates",
+ "rows": 2,
+ "cost": 3.014,
+ "chosen": true
+ },
+ {
+ "type": "scan",
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "chosen_access_method": {
+ "type": "ref",
+ "records": 2,
+ "cost": 3.014,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 6,
+ "cost_for_plan": 6.2211,
+ "pruned_by_cost": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t0", "t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a = t0.a and t0.a < 3",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t0",
+ "attached": "t0.a < 3 and t0.a is not null"
+ },
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table ten,t0,t1;
+set optimizer_trace='enabled=off';
+#
+# Merged to Materialized for derived tables
+#
+set optimizer_trace=1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+explain select * from (select rand() from t1)q;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3
+2 DERIVED t1 ALL NULL NULL NULL NULL 3
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from (select rand() from t1)q {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "derived": {
+ "table": "q",
+ "select_id": 2,
+ "algorithm": "merged"
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "expanded_query": "/* select#2 */ select rand() AS `rand()` from t1"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select rand() AS `rand()` from (/* select#2 */ select rand() AS `rand()` from t1) q"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "derived": {
+ "table": "q",
+ "select_id": 2,
+ "algorithm": "materialized",
+ "cause": "Random function in the select"
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 2,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "estimated_join_cardinality": 3
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "<derived2>",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "<derived2>",
+ "table_scan": {
+ "rows": 3,
+ "cost": 3
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "<derived2>",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 3,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 3,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 3.6,
+ "estimated_join_cardinality": 3
+ }
+ ]
+ },
+ {
+ "best_join_order": ["<derived2>"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "<derived2>",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_execution": {
+ "select_id": 2,
+ "steps": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+} 0 0
+drop table t1;
+set optimizer_trace='enabled=off';
+#
+# Semi-join nest
+#
+set optimizer_trace=1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+create table t2(a int);
+insert into t2 values (1),(2),(3),(1),(2),(3),(1),(2),(3);
+set @save_optimizer_switch= @@optimizer_switch;
+explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_inner_2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
+2 MATERIALIZED t_inner_1 ALL NULL NULL NULL NULL 3
+2 MATERIALIZED t_inner_2 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_inner_2) {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "materialization",
+ "sjm_scan_allowed": true,
+ "possible": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "chosen": true
+ }
+ },
+ {
+ "expanded_query": "/* select#2 */ select t_inner_1.a from t1 t_inner_1 join t1 t_inner_2"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select t1.a AS a from t1 where t1.a in (/* select#2 */ select t_inner_1.a from t1 t_inner_1 join t1 t_inner_2)"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "converted_to_semi_join": true
+ }
+ },
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "1 and t1.a = t_inner_1.a",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "1 and multiple equal(t1.a, t_inner_1.a)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "1 and multiple equal(t1.a, t_inner_1.a)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(t1.a, t_inner_1.a)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_1",
+ "row_may_be_null": false,
+ "map_bit": 1,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_2",
+ "row_may_be_null": false,
+ "map_bit": 2,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ },
+ {
+ "table": "t_inner_1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ },
+ {
+ "table": "t_inner_2",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ }
+ ]
+ },
+ {
+ "semijoin_table_pullout": {
+ "pulled_out_tables": []
+ }
+ },
+ {
+ "execution_plan_for_potential_materialization": {
+ "steps": [
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_inner_1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 6.4103,
+ "estimated_join_cardinality": 9
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "pruned_by_heuristic": true
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t1"],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 6.4103,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t1", "t_inner_1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 13.815,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "FirstMatch",
+ "records": 3,
+ "read_time": 33.867
+ },
+ {
+ "strategy": "SJ-Materialization",
+ "records": 3,
+ "read_time": 7.2154
+ },
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 3,
+ "read_time": 18.315
+ },
+ {
+ "chosen_strategy": "SJ-Materialization"
+ }
+ ],
+ "estimated_join_cardinality": 3
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 6.4103,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "fix_semijoin_strategies_for_picked_join_order": [
+ {
+ "semi_join_strategy": "SJ-Materialization",
+ "join_order": [
+ {
+ "table": "t_inner_1"
+ },
+ {
+ "table": "t_inner_2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1", "<subquery2>"]
+ },
+ {
+ "condition_on_constant_tables": "1",
+ "computing_condition": []
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ },
+ {
+ "table": "t_inner_1",
+ "attached": null
+ },
+ {
+ "table": "t_inner_2",
+ "attached": null
+ },
+ {
+ "table": "<subquery2>",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+# with Firstmatch, mostly for tracing fix_semijoin_strategies_for_picked_join_order
+set optimizer_switch='materialization=off';
+explain select * from t1 t_outer_1,t2 t_outer_2 where t_outer_1.a in (select t_inner_1.a from t2 t_inner_2, t1 t_inner_1) and
+t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t_outer_1 ALL NULL NULL NULL NULL 3
+1 PRIMARY t_inner_1 ALL NULL NULL NULL NULL 3 Using where; Start temporary; Using join buffer (flat, BNL join)
+1 PRIMARY t_inner_2 ALL NULL NULL NULL NULL 9 End temporary; Using join buffer (incremental, BNL join)
+1 PRIMARY t_inner_4 ALL NULL NULL NULL NULL 3 Start temporary; Using join buffer (incremental, BNL join)
+1 PRIMARY t_outer_2 ALL NULL NULL NULL NULL 9 Using join buffer (incremental, BNL join)
+1 PRIMARY t_inner_3 ALL NULL NULL NULL NULL 9 Using where; End temporary; Using join buffer (incremental, BNL join)
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 t_outer_1,t2 t_outer_2 where t_outer_1.a in (select t_inner_1.a from t2 t_inner_2, t1 t_inner_1) and
+t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "materialization",
+ "sjm_scan_allowed": true,
+ "possible": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "chosen": true
+ }
+ },
+ {
+ "expanded_query": "/* select#2 */ select t_inner_1.a from t2 t_inner_2 join t1 t_inner_1"
+ }
+ ]
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 3,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 3,
+ "from": "IN (SELECT)",
+ "to": "materialization",
+ "sjm_scan_allowed": true,
+ "possible": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 3,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "chosen": true
+ }
+ },
+ {
+ "expanded_query": "/* select#3 */ select t_inner_3.a from t2 t_inner_3 join t1 t_inner_4"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select t_outer_1.a AS a,t_outer_2.a AS a from t1 t_outer_1 join t2 t_outer_2 where t_outer_1.a in (/* select#2 */ select t_inner_1.a from t2 t_inner_2 join t1 t_inner_1) and t_outer_2.a in (/* select#3 */ select t_inner_3.a from t2 t_inner_3 join t1 t_inner_4)"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "converted_to_semi_join": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 3,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "converted_to_semi_join": true
+ }
+ },
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "1 and 1 and t_outer_1.a = t_inner_1.a and t_outer_2.a = t_inner_3.a",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "1 and 1 and multiple equal(t_outer_1.a, t_inner_1.a) and multiple equal(t_outer_2.a, t_inner_3.a)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "1 and 1 and multiple equal(t_outer_1.a, t_inner_1.a) and multiple equal(t_outer_2.a, t_inner_3.a)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(t_outer_1.a, t_inner_1.a) and multiple equal(t_outer_2.a, t_inner_3.a)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t_outer_1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_outer_2",
+ "row_may_be_null": false,
+ "map_bit": 1,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_2",
+ "row_may_be_null": false,
+ "map_bit": 2,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_1",
+ "row_may_be_null": false,
+ "map_bit": 3,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_3",
+ "row_may_be_null": false,
+ "map_bit": 4,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_4",
+ "row_may_be_null": false,
+ "map_bit": 5,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t_outer_1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ },
+ {
+ "table": "t_outer_2",
+ "table_scan": {
+ "rows": 9,
+ "cost": 2.0154
+ }
+ },
+ {
+ "table": "t_inner_2",
+ "table_scan": {
+ "rows": 9,
+ "cost": 2.0154
+ }
+ },
+ {
+ "table": "t_inner_1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ },
+ {
+ "table": "t_inner_3",
+ "table_scan": {
+ "rows": 9,
+ "cost": 2.0154
+ }
+ },
+ {
+ "table": "t_inner_4",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ }
+ ]
+ },
+ {
+ "semijoin_table_pullout": {
+ "pulled_out_tables": []
+ }
+ },
+ {
+ "semijoin_table_pullout": {
+ "pulled_out_tables": []
+ }
+ },
+ {
+ "execution_plan_for_potential_materialization": {
+ "steps": []
+ }
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t_outer_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 6.4103,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 24.626,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "FirstMatch",
+ "records": 3,
+ "read_time": 44.759
+ },
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 3,
+ "read_time": 37.226
+ },
+ {
+ "chosen_strategy": "DuplicateWeedout"
+ }
+ ],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_2"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 44.641,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_outer_2"
+ ],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 62.846,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_outer_2",
+ "t_inner_4"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 210.66,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "FirstMatch",
+ "records": 27,
+ "read_time": 424.03
+ },
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 27,
+ "read_time": 324.06
+ },
+ {
+ "chosen_strategy": "DuplicateWeedout"
+ }
+ ],
+ "estimated_join_cardinality": 27
+ }
+ ]
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_outer_2"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 95.256,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_2"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 41.031,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_inner_4"
+ ],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 59.246,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_inner_4",
+ "t_outer_2"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 207.06,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 27,
+ "read_time": 320.46
+ },
+ {
+ "chosen_strategy": "DuplicateWeedout"
+ }
+ ],
+ "estimated_join_cardinality": 27
+ }
+ ]
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_inner_4"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 59.246,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_2"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 44.641,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 24.626,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_outer_2"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 172.44,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 27,
+ "read_time": 285.84
+ },
+ {
+ "chosen_strategy": "DuplicateWeedout"
+ }
+ ],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_outer_2",
+ "t_inner_2"
+ ],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 304.05,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_outer_2",
+ "t_inner_2",
+ "t_inner_4"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 451.86,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "FirstMatch",
+ "records": 27,
+ "read_time": 665.23
+ },
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 27,
+ "read_time": 565.26
+ },
+ {
+ "chosen_strategy": "DuplicateWeedout"
+ }
+ ],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_outer_2",
+ "t_inner_2"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 336.46,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_outer_2"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 75.231,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_outer_2",
+ "t_inner_4"
+ ],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 514.65,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_outer_2",
+ "t_inner_4"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 514.65,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_outer_2"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 172.44,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_outer_2",
+ "t_inner_3"
+ ],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 611.85,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_outer_2",
+ "t_inner_3"
+ ],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 6561,
+ "cost_for_plan": 1486.7,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 13.815,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_4"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 64.431,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_4",
+ "t_outer_2"
+ ],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 503.85,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_4",
+ "t_outer_2"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 503.85,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_4"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 64.431,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_4"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 64.431,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 24.626,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_3"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 172.44,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_3",
+ "t_outer_2"
+ ],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 611.85,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_3",
+ "t_outer_2"
+ ],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 6561,
+ "cost_for_plan": 1486.7,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_3"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 75.231,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_3",
+ "t_inner_4"
+ ],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 514.65,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_3",
+ "t_inner_4"
+ ],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 2187,
+ "cost_for_plan": 514.65,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_3"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 172.44,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 6.4103,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "fix_semijoin_strategies_for_picked_join_order": [
+ {
+ "semi_join_strategy": "DuplicateWeedout"
+ },
+ {
+ "semi_join_strategy": "DuplicateWeedout"
+ }
+ ]
+ },
+ {
+ "best_join_order": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_inner_4",
+ "t_outer_2",
+ "t_inner_3"
+ ]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t_inner_1.a = t_outer_1.a and t_inner_3.a = t_outer_2.a",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t_outer_1",
+ "attached": null
+ },
+ {
+ "table": "t_inner_1",
+ "attached": "t_inner_1.a = t_outer_1.a"
+ },
+ {
+ "table": "t_inner_2",
+ "attached": null
+ },
+ {
+ "table": "t_inner_4",
+ "attached": null
+ },
+ {
+ "table": "t_outer_2",
+ "attached": null
+ },
+ {
+ "table": "t_inner_3",
+ "attached": "t_inner_3.a = t_outer_2.a"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+set optimizer_switch='materialization=on';
+explain select * from t1 t_outer_1,t2 t_outer_2 where t_outer_1.a in (select t_inner_1.a from t2 t_inner_2, t1 t_inner_1) and
+t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t_outer_1 ALL NULL NULL NULL NULL 3
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
+1 PRIMARY t_outer_2 ALL NULL NULL NULL NULL 9 Using join buffer (flat, BNL join)
+1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1
+2 MATERIALIZED t_inner_1 ALL NULL NULL NULL NULL 3
+2 MATERIALIZED t_inner_2 ALL NULL NULL NULL NULL 9 Using join buffer (flat, BNL join)
+3 MATERIALIZED t_inner_4 ALL NULL NULL NULL NULL 3
+3 MATERIALIZED t_inner_3 ALL NULL NULL NULL NULL 9 Using join buffer (flat, BNL join)
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 t_outer_1,t2 t_outer_2 where t_outer_1.a in (select t_inner_1.a from t2 t_inner_2, t1 t_inner_1) and
+t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "materialization",
+ "sjm_scan_allowed": true,
+ "possible": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "chosen": true
+ }
+ },
+ {
+ "expanded_query": "/* select#2 */ select t_inner_1.a from t2 t_inner_2 join t1 t_inner_1"
+ }
+ ]
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 3,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 3,
+ "from": "IN (SELECT)",
+ "to": "materialization",
+ "sjm_scan_allowed": true,
+ "possible": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 3,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "chosen": true
+ }
+ },
+ {
+ "expanded_query": "/* select#3 */ select t_inner_3.a from t2 t_inner_3 join t1 t_inner_4"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select t_outer_1.a AS a,t_outer_2.a AS a from t1 t_outer_1 join t2 t_outer_2 where t_outer_1.a in (/* select#2 */ select t_inner_1.a from t2 t_inner_2 join t1 t_inner_1) and t_outer_2.a in (/* select#3 */ select t_inner_3.a from t2 t_inner_3 join t1 t_inner_4)"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "transformation": {
+ "select_id": 2,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "converted_to_semi_join": true
+ }
+ },
+ {
+ "transformation": {
+ "select_id": 3,
+ "from": "IN (SELECT)",
+ "to": "semijoin",
+ "converted_to_semi_join": true
+ }
+ },
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "1 and 1 and t_outer_1.a = t_inner_1.a and t_outer_2.a = t_inner_3.a",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "1 and 1 and multiple equal(t_outer_1.a, t_inner_1.a) and multiple equal(t_outer_2.a, t_inner_3.a)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "1 and 1 and multiple equal(t_outer_1.a, t_inner_1.a) and multiple equal(t_outer_2.a, t_inner_3.a)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(t_outer_1.a, t_inner_1.a) and multiple equal(t_outer_2.a, t_inner_3.a)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t_outer_1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_outer_2",
+ "row_may_be_null": false,
+ "map_bit": 1,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_2",
+ "row_may_be_null": false,
+ "map_bit": 2,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_1",
+ "row_may_be_null": false,
+ "map_bit": 3,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_3",
+ "row_may_be_null": false,
+ "map_bit": 4,
+ "depends_on_map_bits": []
+ },
+ {
+ "table": "t_inner_4",
+ "row_may_be_null": false,
+ "map_bit": 5,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t_outer_1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ },
+ {
+ "table": "t_outer_2",
+ "table_scan": {
+ "rows": 9,
+ "cost": 2.0154
+ }
+ },
+ {
+ "table": "t_inner_2",
+ "table_scan": {
+ "rows": 9,
+ "cost": 2.0154
+ }
+ },
+ {
+ "table": "t_inner_1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ },
+ {
+ "table": "t_inner_3",
+ "table_scan": {
+ "rows": 9,
+ "cost": 2.0154
+ }
+ },
+ {
+ "table": "t_inner_4",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ }
+ ]
+ },
+ {
+ "semijoin_table_pullout": {
+ "pulled_out_tables": []
+ }
+ },
+ {
+ "semijoin_table_pullout": {
+ "pulled_out_tables": []
+ }
+ },
+ {
+ "execution_plan_for_potential_materialization": {
+ "steps": [
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_inner_1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "estimated_join_cardinality": 27
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_inner_4"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "estimated_join_cardinality": 27
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "pruned_by_heuristic": true
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t_outer_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 6.4103,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 24.626,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "FirstMatch",
+ "records": 3,
+ "read_time": 44.759
+ },
+ {
+ "strategy": "SJ-Materialization",
+ "records": 3,
+ "read_time": 8.1256
+ },
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 3,
+ "read_time": 37.226
+ },
+ {
+ "chosen_strategy": "SJ-Materialization"
+ }
+ ],
+ "rest_of_plan": [
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_2"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 15.541,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_outer_2"
+ ],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 33.746,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_outer_2",
+ "t_inner_4"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 729,
+ "cost_for_plan": 181.56,
+ "semijoin_strategy_choice": [
+ {
+ "strategy": "FirstMatch",
+ "records": 27,
+ "read_time": 394.93
+ },
+ {
+ "strategy": "SJ-Materialization",
+ "records": 27,
+ "read_time": 22.262
+ },
+ {
+ "strategy": "DuplicateWeedout",
+ "records": 27,
+ "read_time": 294.96
+ },
+ {
+ "chosen_strategy": "SJ-Materialization"
+ }
+ ],
+ "estimated_join_cardinality": 27
+ }
+ ]
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_outer_2"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 243,
+ "cost_for_plan": 66.156,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_2"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 11.931,
+ "semijoin_strategy_choice": [],
+ "rest_of_plan": [
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_inner_4"
+ ],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 30.146,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ },
+ {
+ "plan_prefix": [
+ "t_outer_1",
+ "t_inner_1",
+ "t_inner_2",
+ "t_inner_4"
+ ],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 30.146,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_2"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 15.541,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 24.626,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 13.815,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1", "t_inner_1"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 81,
+ "cost_for_plan": 24.626,
+ "semijoin_strategy_choice": [],
+ "pruned_by_cost": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 6.4103,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": ["t_outer_1"],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 27,
+ "cost_for_plan": 10.021,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_outer_2",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_4",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ },
+ {
+ "plan_prefix": [],
+ "table": "t_inner_3",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 9,
+ "cost": 2.0154,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 9,
+ "cost": 2.0154,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 9,
+ "cost_for_plan": 3.8154,
+ "semijoin_strategy_choice": [],
+ "pruned_by_heuristic": true
+ }
+ ]
+ },
+ {
+ "fix_semijoin_strategies_for_picked_join_order": [
+ {
+ "semi_join_strategy": "SJ-Materialization",
+ "join_order": [
+ {
+ "table": "t_inner_4"
+ },
+ {
+ "table": "t_inner_3"
+ }
+ ]
+ },
+ {
+ "semi_join_strategy": "SJ-Materialization",
+ "join_order": [
+ {
+ "table": "t_inner_1"
+ },
+ {
+ "table": "t_inner_2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "best_join_order": [
+ "t_outer_1",
+ "<subquery2>",
+ "t_outer_2",
+ "<subquery3>"
+ ]
+ },
+ {
+ "condition_on_constant_tables": "1",
+ "computing_condition": []
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t_outer_1",
+ "attached": null
+ },
+ {
+ "table": "t_inner_1",
+ "attached": null
+ },
+ {
+ "table": "t_inner_2",
+ "attached": null
+ },
+ {
+ "table": "<subquery2>",
+ "attached": null
+ },
+ {
+ "table": "t_outer_2",
+ "attached": null
+ },
+ {
+ "table": "t_inner_4",
+ "attached": null
+ },
+ {
+ "table": "t_inner_3",
+ "attached": null
+ },
+ {
+ "table": "<subquery3>",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+set @@optimizer_switch= @save_optimizer_switch;
+drop table t1,t2;
+#
+# MDEV-18942: Json_writer::add_bool: Conditional jump or move depends on uninitialised value upon
+# fulltext search under optimizer trace
+#
+CREATE TABLE t1 (f VARCHAR(255), FULLTEXT(f));
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES ('fooba'),('abcde'),('xyzab');
+SET optimizer_trace = 'enabled=on';
+SELECT COUNT(*) FROM v1 WHERE MATCH (f) AGAINST ('fooba');
+COUNT(*)
+1
+DROP VIEW v1;
+DROP TABLE t1;
+#
+# MDEV-18741: Optimizer trace: multi-part key ranges are printed incorrectly.
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k (a int);
+insert into one_k select A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C;
+create table t1 ( a int, b int, key a_b(a,b));
+insert into t1 select a,a from one_k;
+set optimizer_trace='enabled=on';
+explain select * from t1 force index (a_b) where a=2 and b=4;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a_b a_b 10 const,const 1 Using index
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "a_b",
+ "ranges":
+ [
+ "(2,4) <= (a,b) <= (2,4)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 1,
+ "cost": 1.1783,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+explain select * from t1 where a >= 900 and b between 10 and 20;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a_b a_b 10 NULL 107 Using where; Using index
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "a_b",
+ "ranges":
+ [
+ "(900,10) <= (a,b)"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 107,
+ "cost": 8.9549,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t0,t1;
+create table t1 (start_date date, end_date date, filler char(100), key(start_date, end_date)) ;
+insert into t1 select date_add(now(), interval a day), date_add(now(), interval (a+7) day), 'data' from one_k;
+explain select * from t1 force index(start_date) where start_date >= '2019-02-10' and end_date <'2019-04-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range start_date start_date 8 NULL 1000 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "start_date",
+ "ranges":
+ [
+ "(2019-02-10,NULL) < (start_date,end_date)"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1000,
+ "cost": 1273.2,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1,one_k;
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+a int not null,
+b int not null,
+c int not null,
+d int not null,
+key a_b_c(a,b,c)
+);
+insert into t1 select a,a, a,a from ten;
+explain select * from t1 force index(a_b_c) where a between 1 and 4 and b < 50;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a_b_c a_b_c 8 NULL 4 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "a_b_c",
+ "ranges":
+ [
+ "(1) <= (a,b) < (4,50)"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 4,
+ "cost": 6.2648,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table ten,t1;
+# Ported test from MYSQL for ranges involving Binary column
+CREATE TABLE t1(i INT PRIMARY KEY, b BINARY(16), INDEX i_b(b));
+INSERT INTO t1 VALUES (1, x'D95B94336A9946A39CF5B58CFE772D8C');
+INSERT INTO t1 VALUES (2, NULL);
+EXPLAIN SELECT * FROM t1 WHERE b IN (0xD95B94336A9946A39CF5B58CFE772D8C);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 17 const 1 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(\xD9[\x943j\x99F\xA3\x9C\xF5\xB5\x8C\xFEw-\x8C) <= (b) <= (\xD9[\x943j\x99F\xA3\x9C\xF5\xB5\x8C\xFEw-\x8C)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3797,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+EXPLAIN SELECT * FROM t1 WHERE b IS NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 17 const 1 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(NULL) <= (b) <= (NULL)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3797,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1;
+#
+# MDEV-18880: Optimizer trace prints date in hexadecimal
+#
+CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10) CHARSET BINARY , INDEX i_b(b));
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, NULL);
+set optimizer_trace=1;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 13 const 1 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(ab\x0A) <= (b) <= (ab\x0A)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3787,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+ALTER TABLE t1 modify column b BINARY(10) AFTER i;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 11 const 1 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(ab\x0A\x00\x00\x00\x00\x00\x00\x00) <= (b) <= (ab\x0A\x00\x00\x00\x00\x00\x00\x00)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3785,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+ALTER TABLE t1 modify column b VARBINARY(10) AFTER i;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 13 const 1 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(ab\x0A) <= (b) <= (ab\x0A)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3787,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1;
+CREATE TABLE t1(i INT PRIMARY KEY, b CHAR(10), INDEX i_b(b));
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, NULL);
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 11 const 1 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(ab\n) <= (b) <= (ab\n)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3785,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1;
+CREATE TABLE t1(i INT PRIMARY KEY, b blob , INDEX i_b(b));
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, NULL);
+set optimizer_trace=1;
+EXPLAIN SELECT * FROM t1 WHERE b= 'ab\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 1003 const 1 Using where
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(ab\x0A) <= (b) <= (ab\x0A)"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 3.5719,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1;
+CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10), INDEX i_b(b));
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, 'ab\n');
+set optimizer_trace=1;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i_b i_b 13 const 2 Using index condition
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "i_b",
+ "ranges":
+ [
+ "(ab\n) <= (b) <= (ab\n)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 2,
+ "cost": 3.6324,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1;
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k (a int);
+insert into one_k select A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C;
+create table t1 (start_date date, end_date date, filler char(100), key(start_date, end_date)) ;
+insert into t1 select date_add(now(), interval a day), date_add(now(), interval (a+7) day), 'data' from one_k;
+explain format=json select * from t1 force index(start_date) where start_date >= '2019-02-10' and end_date <'2019-04-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "range",
+ "possible_keys": ["start_date"],
+ "key": "start_date",
+ "key_length": "8",
+ "used_key_parts": ["start_date", "end_date"],
+ "rows": 1000,
+ "filtered": 100,
+ "index_condition": "t1.start_date >= '2019-02-10' and t1.end_date < '2019-04-01'"
+ }
+ }
+}
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "start_date",
+ "ranges":
+ [
+ "(2019-02-10,NULL) < (start_date,end_date)"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1000,
+ "cost": 1273.2,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1, t0, one_k;
+#
+# MDEV-19776: Assertion `to_len >= 8' failed in convert_to_printable with optimizer trace enabled
+#
+CREATE TABLE t1 (f VARBINARY(16) NOT NULL, KEY(f));
+INSERT INTO t1 VALUES ('a'),('b');
+SET optimizer_trace = 'enabled=on';
+DELETE FROM t1 WHERE f = 'x';
+DROP TABLE t1;
+#
+# Print cost_for_plan and rows_for_plan for join prefix
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k (a int, b int, key(b));
+insert into one_k select A.a + B.a*10 + C.a*100, A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C;
+analyze table t0, one_k persistent for all;
+Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
+test.t0 analyze status OK
+test.one_k analyze status Engine-independent statistics collected
+test.one_k analyze status Table is already up to date
+set @tmp_jcl=@@join_cache_level;
+set join_cache_level=0;
+set optimizer_trace=1;
+# Check cost/row numbers when multiple tables are joined
+# (cost_for_plan is the same as best_access_path.cost for single-table SELECTs
+# but for joins using condition selectivity it is not as trivial. So,
+# now we are printing it)
+explain select * from t0 A, one_k B where A.a<5 and B.a<800;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE A ALL NULL NULL NULL NULL 10 Using where
+1 SIMPLE B ALL NULL NULL NULL NULL 1000 Using where
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
+[
+
+ [
+
+ {
+ "plan_prefix":
+ [
+ ],
+ "table": "A",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 5.9375,
+ "cost": 2.8296,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 5.9375,
+ "cost": 2.8296,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 5.9375,
+ "cost_for_plan": 4.0171,
+ "rest_of_plan":
+ [
+
+ {
+ "plan_prefix":
+ [
+ "A"
+ ],
+ "table": "B",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 804.69,
+ "cost": 256.85,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 804.69,
+ "cost": 256.85,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 4777.8,
+ "cost_for_plan": 1216.4,
+ "estimated_join_cardinality": 4777.8
+ }
+ ]
+ },
+
+ {
+ "plan_prefix":
+ [
+ ],
+ "table": "B",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 804.69,
+ "cost": 43.26,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 804.69,
+ "cost": 43.26,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 804.69,
+ "cost_for_plan": 204.2,
+ "pruned_by_heuristic": true
+ }
+ ]
+]
+set join_cache_level=@tmp_jcl;
+# This shows post-join selectivity
+explain select * from t0 A, one_k B where A.a=B.b and B.a<800;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE A ALL NULL NULL NULL NULL 10 Using where
+1 SIMPLE B ref b b 5 test.A.a 1 Using where
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
+[
+
+ [
+
+ {
+ "plan_prefix":
+ [
+ ],
+ "table": "A",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.0171,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.0171,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 4.0171,
+ "rest_of_plan":
+ [
+
+ {
+ "plan_prefix":
+ [
+ "A"
+ ],
+ "table": "B",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "ref",
+ "index": "b",
+ "used_range_estimates": false,
+ "cause": "not available",
+ "rows": 1,
+ "cost": 20,
+ "chosen": true
+ },
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 804.69,
+ "cost": 43.26,
+ "chosen": false
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "ref",
+ "records": 1,
+ "cost": 20,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 26.017,
+ "selectivity": 0.8047,
+ "estimated_join_cardinality": 8.0469
+ }
+ ]
+ },
+
+ {
+ "plan_prefix":
+ [
+ ],
+ "table": "B",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 804.69,
+ "cost": 43.26,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 804.69,
+ "cost": 43.26,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 804.69,
+ "cost_for_plan": 204.2,
+ "pruned_by_cost": true
+ }
+ ]
+]
+drop table t0, one_k;
+#
+# Assertion `to_len >= 8' failed in convert_to_printable
+#
+CREATE TABLE t1 ( a blob, KEY (a(255)));
+insert into t1 values ('foo'), ('bar');
+EXPLAIN SELECT * FROM t1 WHERE a= REPEAT('a', 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 258 const 1 Using where
+SELECT * FROM t1 WHERE a= REPEAT('a', 0);
+a
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "a",
+ "ranges":
+ [
+ "() <= (a) <= ()"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.4265,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+DROP TABLE t1;
+#
+# Test for Semi-Join table pullout element
+#
+create table t1 (a int primary key, b int);
+insert into t1 (a) values (1),(2),(3),(4),(5);
+create table t2 (a int primary key, b int);
+insert into t2 (a) values (1),(2),(3),(4),(5);
+create table t3 (a int);
+insert into t3 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+explain
+select * from t3 where (a,a) in (select t1.a, t2.a from t1, t2 where t1.b=t2.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 5
+1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
+1 PRIMARY t3 ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.semijoin_table_pullout')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.semijoin_table_pullout'))
+[
+
+ {
+ "pulled_out_tables":
+ [
+ "t2",
+ "t1"
+ ]
+ }
+]
+drop table t1,t2,t3;
+#
+# MDEV-22401: Optimizer trace: multi-component range is not printed correctly
+#
+create table t1 (kp1 int, kp2 int, key(kp1, kp2));
+insert into t1 values (1,1),(1,5),(5,1),(5,5);
+set optimizer_trace=1;
+select * from t1 force index(kp1) where (kp1=2 and kp2 >=4);
+kp1 kp2
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
+[
+
+ [
+
+ {
+ "index": "kp1",
+ "ranges":
+ [
+ "(2,4) <= (kp1,kp2) <= (2)"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 1,
+ "cost": 1.3033,
+ "chosen": false,
+ "cause": "cost"
+ }
+ ]
+]
+drop table t1;
+#
+# MDEV-21626: Optimizer misses the details about the picked join order
+#
+CREATE TABLE t1(a INT, b INT, key(a));
+INSERT INTO t1 SELECT seq, seq from seq_1_to_10;
+CREATE TABLE t2(a INT, b INT, key(a));
+INSERT INTO t2 SELECT seq, seq from seq_1_to_100;
+SET OPTIMIZER_TRACE=1;
+EXPLAIN SELECT * FROM t1, t2 WHERE t1.a=t2.a ORDER BY t2.b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL a NULL NULL NULL 10 Using where; Using temporary; Using filesort
+1 SIMPLE t2 ref a a 5 test.t1.a 1
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
+[
+
+ [
+
+ {
+ "plan_prefix":
+ [
+ ],
+ "table": "t1",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.022,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.022,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 4.022,
+ "rest_of_plan":
+ [
+
+ {
+ "plan_prefix":
+ [
+ "t1"
+ ],
+ "table": "t2",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "ref",
+ "index": "a",
+ "used_range_estimates": false,
+ "cause": "not available",
+ "rows": 1,
+ "cost": 20,
+ "chosen": true
+ },
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 100,
+ "cost": 2.2197,
+ "chosen": false
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "ref",
+ "records": 1,
+ "cost": 20,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 10,
+ "cost_for_plan": 26.022,
+ "cost_for_sorting": 10,
+ "estimated_join_cardinality": 10
+ }
+ ]
+ },
+
+ {
+ "plan_prefix":
+ [
+ ],
+ "table": "t2",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 100,
+ "cost": 2.2197,
+ "chosen": true,
+ "use_tmp_table": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 100,
+ "cost": 2.2197,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 100,
+ "cost_for_plan": 22.22,
+ "rest_of_plan":
+ [
+
+ {
+ "plan_prefix":
+ [
+ "t2"
+ ],
+ "table": "t1",
+ "best_access_path":
+ {
+ "considered_access_paths":
+ [
+
+ {
+ "access_type": "ref",
+ "index": "a",
+ "used_range_estimates": false,
+ "cause": "not available",
+ "rows": 1,
+ "cost": 200,
+ "chosen": true
+ },
+
+ {
+ "access_type": "scan",
+ "resulting_rows": 10,
+ "cost": 2.022,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method":
+ {
+ "type": "scan",
+ "records": 10,
+ "cost": 2.022,
+ "uses_join_buffering": true
+ }
+ },
+ "rows_for_plan": 1000,
+ "cost_for_plan": 224.24,
+ "pruned_by_cost": true
+ }
+ ]
+ }
+ ]
+]
+DROP TABLE t1,t2;
+#
+# MDEV-22665: Print ranges in the optimizer trace created for non-indexed columns when
+# optimizer_use_condition_selectivity >2
+#
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 SELECT seq, seq from seq_1_to_100;
+SET optimizer_trace=1;
+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
+EXPLAIN EXTENDED SELECT * from t1 WHERE a between 1 and 5 and b <= 5;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 100 0.22 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` between 1 and 5 and `test`.`t1`.`b` <= 5
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns'))
+[
+
+ [
+
+ {
+ "column_name": "a",
+ "ranges":
+ [
+ "1 <= a <= 5"
+ ],
+ "selectivity_from_histogram": 0.0469
+ },
+
+ {
+ "column_name": "b",
+ "ranges":
+ [
+ "NULL < b <= 5"
+ ],
+ "selectivity_from_histogram": 0.0469
+ }
+ ]
+]
+EXPLAIN EXTENDED SELECT * from t1 WHERE a != 5;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 100 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` <> 5
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns'))
+[
+
+ [
+
+ {
+ "column_name": "a",
+ "ranges":
+ [
+ "NULL < a < 5",
+ "5 < a"
+ ],
+ "selectivity_from_histogram": 1
+ }
+ ]
+]
+EXPLAIN EXTENDED SELECT * from t1 WHERE b >= 10 and b < 25;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 100 15.62 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` >= 10 and `test`.`t1`.`b` < 25
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns'))
+[
+
+ [
+
+ {
+ "column_name": "b",
+ "ranges":
+ [
+ "10 <= b < 25"
+ ],
+ "selectivity_from_histogram": 0.1562
+ }
+ ]
+]
+drop table t1;
+#
+# MDEV-22910:SIGSEGV in Opt_trace_context::is_started & SIGSEGV in Json_writer::add_table_name
+# (on optimized builds)
+#
+CREATE TABLE t1( a INT, b INT, PRIMARY KEY( a ) );
+SELECT sum(b), row_number() OVER (order by b) FROM t1 WHERE a = 101;
+sum(b) row_number() OVER (order by b)
+NULL 1
+UPDATE t1 SET b=10 WHERE a=1;
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
+[
+
+ [
+
+ {
+ "index": "PRIMARY",
+ "ranges":
+ [
+ "(1) <= (a) <= (1)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 0,
+ "cost": 1.125,
+ "chosen": true
+ }
+ ]
+]
+DROP TABLE t1;
+set optimizer_trace='enabled=off';
+#
+# MDEV-24975 Server consumes extra 4G memory upon querying INFORMATION_SCHEMA.OPTIIMIZER_TRACE
+#
+set max_session_mem_used=1024*1024*1024;
+select count(*) from information_schema.optimizer_trace;
+select * from information_schema.optimizer_trace;
+set max_session_mem_used=default;
+#
+# MDEV-22380 Assertion `name.length == strlen(name.str)' failed in Item::print_item_w_name on SELECT w/ optimizer_trace enabled
+#
+SET optimizer_trace="enabled=on";
+SELECT 'a\0' LIMIT 0;
+a\x00
+SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+query trace
+SELECT 'a\0' LIMIT 0 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select 'a\0' AS `a\x00` limit 0"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": []
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+}
+SET optimizer_trace=DEFAULT;
+#
+# MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object
+#
+CREATE TABLE t1 (a INT KEY,b INT,KEY(b)) ENGINE=MEMORY;
+SET optimizer_trace=1;
+INSERT INTO t1 VALUES (0,0);
+SELECT a FROM t1 WHERE (a,b) in (SELECT @c,@d);
+a
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test
new file mode 100644
index 00000000000..855ce11aaf5
--- /dev/null
+++ b/mysql-test/main/opt_trace.test
@@ -0,0 +1,658 @@
+--source include/not_embedded.inc
+--source include/have_sequence.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';
+set optimizer_trace="enabled=off";
+show variables like 'optimizer_trace';
+create table t1 (a int, b int);
+insert into t1 values (1,2),(2,3);
+
+create table t2 (b int);
+insert into t2 values (1),(2);
+
+analyze table t1;
+analyze table t2;
+create function f1 (a int) returns INT
+return 1;
+
+create view v1 as select * from t1 where t1.a=1;
+create view v2 as select * from t1 where t1.a=1 group by t1.b;
+set optimizer_trace="enabled=on";
+
+--echo # Mergeable views/derived tables
+select * from v1;
+select * from information_schema.OPTIMIZER_TRACE;
+select * from (select * from t1 where t1.a=1)q;
+select * from information_schema.OPTIMIZER_TRACE;
+
+--echo # Non-Mergeable views
+select * from v2;
+select * from information_schema.OPTIMIZER_TRACE;
+
+drop table t1,t2;
+drop view v1,v2;
+drop function f1;
+
+create table t1(a int, b int);
+insert into t1 values (0,0),(1,1),(2,1),(3,2),(4,3),
+(5,3),(6,3),(7,3),(8,3),(9,3);
+create table t2(a int, b int);
+insert into t2 values (0,0),(1,1),(2,1),(3,2),(4,3),
+(5,3),(6,3),(7,3),(8,3),(9,3);
+
+ANALYZE TABLE t1;
+ANALYZE TABLE t2;
+
+create view v1 as select a from t1 group by b;
+create view v2 as select a from t2;
+
+--echo # Mergeable view
+--optimizer_trace
+explain select * from v2 ;
+
+--echo # Non-Mergeable view
+--optimizer_trace
+explain select * from v1 ;
+drop table t1,t2;
+drop view v1,v2;
+
+--echo #
+--echo # print ref-keyues array
+--echo #
+
+create table t0 (a int);
+INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1 (a int, b int, c int, key(a));
+insert into t1 select A.a*10 + B.a, A.a*10 + B.a, A.a*10 + B.a from t0 A, t0 B;
+
+create table t2(a int, b int, c int , key(a));
+insert into t2 select A.a*10 + B.a, A.a*10 + B.a, A.a*10 + B.a from t0 A, t0 B;
+
+analyze table t1;
+analyze table t2;
+
+explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b;
+select * from information_schema.OPTIMIZER_TRACE;
+drop table t1,t2,t0;
+
+--echo #
+--echo # group_by min max optimization
+--echo #
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a INT NOT NULL, KEY(a));
+--disable_query_log
+INSERT INTO t1(a) VALUES (1), (2), (3), (4);
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+INSERT INTO t1(a) SELECT a FROM t1;
+--enable_query_log
+
+analyze table t1;
+EXPLAIN SELECT DISTINCT a FROM t1;
+select * from information_schema.OPTIMIZER_TRACE;
+drop table t1;
+
+--echo #
+--echo # With group by , where clause and MIN/MAX function
+--echo #
+CREATE TABLE t1 (a INT, b INT, c int, d int, KEY(a,b,c,d));
+INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3), (4,4,4,4), (1,0,1,1), (3,2,3,3), (4,5,4,4);
+ANALYZE TABLE t1;
+EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a;
+select * from information_schema.OPTIMIZER_TRACE;
+DROP TABLE t1;
+
+CREATE TABLE t1 (id INT NOT NULL, a DATE, KEY(id,a));
+INSERT INTO t1 values (1,'2001-01-01'),(1,'2001-01-02'),
+ (1,'2001-01-03'),(1,'2001-01-04'),
+ (2,'2001-01-01'),(2,'2001-01-02'),
+ (2,'2001-01-03'),(2,'2001-01-04'),
+ (3,'2001-01-01'),(3,'2001-01-02'),
+ (3,'2001-01-03'),(3,'2001-01-04'),
+ (4,'2001-01-01'),(4,'2001-01-02'),
+ (4,'2001-01-03'),(4,'2001-01-04');
+set optimizer_trace='enabled=on';
+EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+
+--echo #
+--echo # Late ORDER BY optimization
+--echo #
+
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k(a int primary key);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+create table t1 (
+ pk int not null,
+ a int,
+ b int,
+ c int,
+ filler char(100),
+ KEY a_a(c),
+ KEY a_c(a,c),
+ KEY a_b(a,b)
+);
+
+insert into t1
+select a, a,a,a, 'filler-dataaa' from test.one_k;
+update t1 set a=1 where pk between 0 and 180;
+update t1 set b=2 where pk between 0 and 20;
+analyze table t1;
+set optimizer_trace='enabled=on';
+explain select * from t1 where a=1 and b=2 order by c limit 1;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1,ten,one_k;
+
+--echo #
+--echo # TABLE ELIMINATION
+--echo #
+
+create table t1 (a int);
+insert into t1 values (0),(1),(2),(3);
+create table t0 as select * from t1;
+
+create table t2 (a int primary key, b int)
+ as select a, a as b from t1 where a in (1,2);
+
+create table t3 (a int primary key, b int)
+ as select a, a as b from t1 where a in (1,3);
+
+set optimizer_trace='enabled=on';
+
+analyze table t1;
+analyze table t2;
+analyze table t3;
+
+--echo # table t2 should be eliminated
+explain
+select t1.a from t1 left join t2 on t1.a=t2.a;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+--echo # no tables should be eliminated
+explain select * from t1 left join t2 on t2.a=t1.a;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+--echo # multiple tables are eliminated
+explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and t3.a=t1.a;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t0, t1, t2, t3;
+
+--echo #
+--echo # IN subquery to sem-join is traced
+--echo #
+
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1(a int, b int);
+insert into t1 values (0,0),(1,1),(2,2);
+create table t2 as select * from t1;
+
+create table t11(a int, b int);
+
+create table t10 (pk int, a int);
+insert into t10 select a,a from t0;
+create table t12 like t10;
+insert into t12 select * from t10;
+
+analyze table t1,t10;
+
+set optimizer_trace='enabled=on';
+explain extended select * from t1 where a in (select pk from t10);
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t0,t1,t11,t10,t12,t2;
+
+--echo #
+--echo # Selectivities for columns and indexes.
+--echo #
+
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1 (
+pk int,
+a int,
+b int,
+key pk(pk),
+key pk_a(pk,a),
+key pk_a_b(pk,a,b));
+insert into t1 select a,a,a from t0;
+
+ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a,b) INDEXES ();
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@optimizer_use_condition_selectivity=4;
+set @@use_stat_tables= PREFERABLY;
+set optimizer_trace='enabled=on';
+explain select * from t1 where pk = 2 and a=5 and b=1;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set @@use_stat_tables= @save_use_stat_tables;
+drop table t0,t1;
+set optimizer_trace="enabled=off";
+
+--echo #
+--echo # Tests added to show that sub-statements are not traced
+--echo #
+
+create table t1(a int);
+insert into t1 values (1),(2),(3),(4);
+create table t2(a int);
+insert into t2 values (1),(2),(3),(4);
+delimiter |;
+create function f1(a int) returns int
+begin
+ declare a int default 0;
+ set a= a+ (select count(*) from t2);
+ return a;
+end|
+
+create function f2(a int) returns int
+begin
+ declare a int default 0;
+ select count(*) from t2 into a;
+ return a;
+end|
+
+delimiter ;|
+set optimizer_trace='enabled=on';
+select f1(a) from t1;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+select f2(a) from t1;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1,t2;
+drop function f1;
+drop function f2;
+set optimizer_trace='enabled=off';
+
+--echo #
+--echo # MDEV-18489: Limit the memory used by the optimizer trace
+--echo #
+
+create table t1 (a int);
+insert into t1 values (1),(2);
+
+set optimizer_trace='enabled=on';
+set @save_optimizer_trace_max_mem_size= @@optimizer_trace_max_mem_size;
+select * from t1;
+select length(trace) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+set optimizer_trace_max_mem_size=100;
+select * from t1;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+set optimizer_trace_max_mem_size=0;
+select * from t1;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+set optimizer_trace='enabled=off';
+set @@optimizer_trace_max_mem_size= @save_optimizer_trace_max_mem_size;
+
+--echo #
+--echo # MDEV-18527: Optimizer trace for DELETE query shows table:null
+--echo #
+
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t0 (a int, b int);
+insert into t0 select a,a from ten;
+alter table t0 add key(a);
+
+set optimizer_trace=1;
+explain delete from t0 where t0.a<3;
+select * from information_schema.optimizer_trace;
+drop table ten,t0;
+set optimizer_trace='enabled=off';
+
+--echo #
+--echo # MDEV-18528: Optimizer trace support for multi-table UPDATE and DELETE
+--echo #
+
+set optimizer_trace=1;
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t0 (a int, b int);
+insert into t0 select a,a from ten;
+alter table t0 add key(a);
+create table t1 like t0;
+insert into t1 select * from t0;
+explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3;
+select * from information_schema.optimizer_trace;
+drop table ten,t0,t1;
+set optimizer_trace='enabled=off';
+
+--echo #
+--echo # Merged to Materialized for derived tables
+--echo #
+
+set optimizer_trace=1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+explain select * from (select rand() from t1)q;
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+set optimizer_trace='enabled=off';
+
+--echo #
+--echo # Semi-join nest
+--echo #
+
+set optimizer_trace=1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+create table t2(a int);
+insert into t2 values (1),(2),(3),(1),(2),(3),(1),(2),(3);
+set @save_optimizer_switch= @@optimizer_switch;
+explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_inner_2);
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+--echo # with Firstmatch, mostly for tracing fix_semijoin_strategies_for_picked_join_order
+
+set optimizer_switch='materialization=off';
+explain select * from t1 t_outer_1,t2 t_outer_2 where t_outer_1.a in (select t_inner_1.a from t2 t_inner_2, t1 t_inner_1) and
+ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4);
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+set optimizer_switch='materialization=on';
+explain select * from t1 t_outer_1,t2 t_outer_2 where t_outer_1.a in (select t_inner_1.a from t2 t_inner_2, t1 t_inner_1) and
+ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4);
+select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+set @@optimizer_switch= @save_optimizer_switch;
+drop table t1,t2;
+
+--echo #
+--echo # MDEV-18942: Json_writer::add_bool: Conditional jump or move depends on uninitialised value upon
+--echo # fulltext search under optimizer trace
+--echo #
+
+CREATE TABLE t1 (f VARCHAR(255), FULLTEXT(f));
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES ('fooba'),('abcde'),('xyzab');
+SET optimizer_trace = 'enabled=on';
+SELECT COUNT(*) FROM v1 WHERE MATCH (f) AGAINST ('fooba');
+DROP VIEW v1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18741: Optimizer trace: multi-part key ranges are printed incorrectly.
+--echo #
+
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k (a int);
+insert into one_k select A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C;
+create table t1 ( a int, b int, key a_b(a,b));
+insert into t1 select a,a from one_k;
+set optimizer_trace='enabled=on';
+
+explain select * from t1 force index (a_b) where a=2 and b=4;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+explain select * from t1 where a >= 900 and b between 10 and 20;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+drop table t0,t1;
+
+create table t1 (start_date date, end_date date, filler char(100), key(start_date, end_date)) ;
+--disable_warnings
+insert into t1 select date_add(now(), interval a day), date_add(now(), interval (a+7) day), 'data' from one_k;
+--enable_warnings
+explain select * from t1 force index(start_date) where start_date >= '2019-02-10' and end_date <'2019-04-01';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1,one_k;
+
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+ a int not null,
+ b int not null,
+ c int not null,
+ d int not null,
+ key a_b_c(a,b,c)
+);
+
+insert into t1 select a,a, a,a from ten;
+explain select * from t1 force index(a_b_c) where a between 1 and 4 and b < 50;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table ten,t1;
+
+--echo # Ported test from MYSQL for ranges involving Binary column
+
+CREATE TABLE t1(i INT PRIMARY KEY, b BINARY(16), INDEX i_b(b));
+INSERT INTO t1 VALUES (1, x'D95B94336A9946A39CF5B58CFE772D8C');
+INSERT INTO t1 VALUES (2, NULL);
+
+EXPLAIN SELECT * FROM t1 WHERE b IN (0xD95B94336A9946A39CF5B58CFE772D8C);
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+EXPLAIN SELECT * FROM t1 WHERE b IS NULL;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-18880: Optimizer trace prints date in hexadecimal
+--echo #
+
+CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10) CHARSET BINARY , INDEX i_b(b));
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, NULL);
+set optimizer_trace=1;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+ALTER TABLE t1 modify column b BINARY(10) AFTER i;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+ALTER TABLE t1 modify column b VARBINARY(10) AFTER i;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+
+CREATE TABLE t1(i INT PRIMARY KEY, b CHAR(10), INDEX i_b(b));
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, NULL);
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+
+CREATE TABLE t1(i INT PRIMARY KEY, b blob , INDEX i_b(b));
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, NULL);
+set optimizer_trace=1;
+EXPLAIN SELECT * FROM t1 WHERE b= 'ab\n';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+
+CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10), INDEX i_b(b));
+INSERT INTO t1 VALUES (1, 'ab\n');
+INSERT INTO t1 VALUES (2, 'ab\n');
+set optimizer_trace=1;
+EXPLAIN SELECT * FROM t1 WHERE b='ab\n';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k (a int);
+insert into one_k select A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C;
+create table t1 (start_date date, end_date date, filler char(100), key(start_date, end_date)) ;
+--disable_warnings
+insert into t1 select date_add(now(), interval a day), date_add(now(), interval (a+7) day), 'data' from one_k;
+--enable_warnings
+explain format=json select * from t1 force index(start_date) where start_date >= '2019-02-10' and end_date <'2019-04-01';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1, t0, one_k;
+
+--echo #
+--echo # MDEV-19776: Assertion `to_len >= 8' failed in convert_to_printable with optimizer trace enabled
+--echo #
+
+CREATE TABLE t1 (f VARBINARY(16) NOT NULL, KEY(f));
+INSERT INTO t1 VALUES ('a'),('b');
+SET optimizer_trace = 'enabled=on';
+DELETE FROM t1 WHERE f = 'x';
+DROP TABLE t1;
+
+--echo #
+--echo # Print cost_for_plan and rows_for_plan for join prefix
+--echo #
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k (a int, b int, key(b));
+insert into one_k select A.a + B.a*10 + C.a*100, A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C;
+
+analyze table t0, one_k persistent for all;
+
+set @tmp_jcl=@@join_cache_level;
+set join_cache_level=0;
+set optimizer_trace=1;
+
+--echo # Check cost/row numbers when multiple tables are joined
+--echo # (cost_for_plan is the same as best_access_path.cost for single-table SELECTs
+--echo # but for joins using condition selectivity it is not as trivial. So,
+--echo # now we are printing it)
+explain select * from t0 A, one_k B where A.a<5 and B.a<800;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+set join_cache_level=@tmp_jcl;
+
+--echo # This shows post-join selectivity
+explain select * from t0 A, one_k B where A.a=B.b and B.a<800;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t0, one_k;
+
+--echo #
+--echo # Assertion `to_len >= 8' failed in convert_to_printable
+--echo #
+
+CREATE TABLE t1 ( a blob, KEY (a(255)));
+insert into t1 values ('foo'), ('bar');
+
+EXPLAIN SELECT * FROM t1 WHERE a= REPEAT('a', 0);
+SELECT * FROM t1 WHERE a= REPEAT('a', 0);
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Test for Semi-Join table pullout element
+--echo #
+create table t1 (a int primary key, b int);
+insert into t1 (a) values (1),(2),(3),(4),(5);
+
+create table t2 (a int primary key, b int);
+insert into t2 (a) values (1),(2),(3),(4),(5);
+
+create table t3 (a int);
+insert into t3 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+explain
+select * from t3 where (a,a) in (select t1.a, t2.a from t1, t2 where t1.b=t2.b);
+
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.semijoin_table_pullout')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+drop table t1,t2,t3;
+
+--echo #
+--echo # MDEV-22401: Optimizer trace: multi-component range is not printed correctly
+--echo #
+
+create table t1 (kp1 int, kp2 int, key(kp1, kp2));
+insert into t1 values (1,1),(1,5),(5,1),(5,5);
+set optimizer_trace=1;
+select * from t1 force index(kp1) where (kp1=2 and kp2 >=4);
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+
+--echo #
+--echo # MDEV-21626: Optimizer misses the details about the picked join order
+--echo #
+
+CREATE TABLE t1(a INT, b INT, key(a));
+INSERT INTO t1 SELECT seq, seq from seq_1_to_10;
+CREATE TABLE t2(a INT, b INT, key(a));
+INSERT INTO t2 SELECT seq, seq from seq_1_to_100;
+
+SET OPTIMIZER_TRACE=1;
+EXPLAIN SELECT * FROM t1, t2 WHERE t1.a=t2.a ORDER BY t2.b;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-22665: Print ranges in the optimizer trace created for non-indexed columns when
+--echo # optimizer_use_condition_selectivity >2
+--echo #
+
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 SELECT seq, seq from seq_1_to_100;
+SET optimizer_trace=1;
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+EXPLAIN EXTENDED SELECT * from t1 WHERE a between 1 and 5 and b <= 5;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+EXPLAIN EXTENDED SELECT * from t1 WHERE a != 5;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+EXPLAIN EXTENDED SELECT * from t1 WHERE b >= 10 and b < 25;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.selectivity_for_columns')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
+
+--echo #
+--echo # MDEV-22910:SIGSEGV in Opt_trace_context::is_started & SIGSEGV in Json_writer::add_table_name
+--echo # (on optimized builds)
+--echo #
+
+CREATE TABLE t1( a INT, b INT, PRIMARY KEY( a ) );
+SELECT sum(b), row_number() OVER (order by b) FROM t1 WHERE a = 101;
+UPDATE t1 SET b=10 WHERE a=1;
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+DROP TABLE t1;
+
+set optimizer_trace='enabled=off';
+
+--echo #
+--echo # MDEV-24975 Server consumes extra 4G memory upon querying INFORMATION_SCHEMA.OPTIIMIZER_TRACE
+--echo #
+set max_session_mem_used=1024*1024*1024;
+--disable_result_log
+select count(*) from information_schema.optimizer_trace;
+select * from information_schema.optimizer_trace;
+--enable_result_log
+set max_session_mem_used=default;
+
+--echo #
+--echo # MDEV-22380 Assertion `name.length == strlen(name.str)' failed in Item::print_item_w_name on SELECT w/ optimizer_trace enabled
+--echo #
+
+SET optimizer_trace="enabled=on";
+SELECT 'a\0' LIMIT 0;
+SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+SET optimizer_trace=DEFAULT;
+
+--echo #
+--echo # MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object
+--echo #
+
+CREATE TABLE t1 (a INT KEY,b INT,KEY(b)) ENGINE=MEMORY;
+SET optimizer_trace=1;
+INSERT INTO t1 VALUES (0,0);
+SELECT a FROM t1 WHERE (a,b) in (SELECT @c,@d);
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/opt_trace_default.result b/mysql-test/main/opt_trace_default.result
new file mode 100644
index 00000000000..4d99128675c
--- /dev/null
+++ b/mysql-test/main/opt_trace_default.result
@@ -0,0 +1,8 @@
+# Verify that compile-time default for optimizer trace is OFF (enabled=off).
+select
+global_value_origin,
+default_value
+from
+INFORMATION_SCHEMA.SYSTEM_VARIABLES where variable_name='optimizer_trace';
+global_value_origin default_value
+COMPILE-TIME enabled=off
diff --git a/mysql-test/main/opt_trace_default.test b/mysql-test/main/opt_trace_default.test
new file mode 100644
index 00000000000..221b68a626c
--- /dev/null
+++ b/mysql-test/main/opt_trace_default.test
@@ -0,0 +1,11 @@
+
+if (`SELECT 'COMPILE-TIME'<>GLOBAL_VALUE_ORIGIN from INFORMATION_SCHEMA.SYSTEM_VARIABLES where variable_name='optimizer_trace'`) {
+--Skip Needs optimizer_trace default to be the compile-time default
+}
+
+--echo # Verify that compile-time default for optimizer trace is OFF (enabled=off).
+select
+ global_value_origin,
+ default_value
+from
+ INFORMATION_SCHEMA.SYSTEM_VARIABLES where variable_name='optimizer_trace';
diff --git a/mysql-test/main/opt_trace_index_merge.result b/mysql-test/main/opt_trace_index_merge.result
new file mode 100644
index 00000000000..ed5ddfd69f4
--- /dev/null
+++ b/mysql-test/main/opt_trace_index_merge.result
@@ -0,0 +1,754 @@
+set @tmp_opt_switch= @@optimizer_switch;
+set optimizer_switch='index_merge_sort_intersection=on';
+set optimizer_trace='enabled=on';
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int, b int, c int, filler char(100),
+key(a), key(b), key(c));
+insert into t1 select
+A.a * B.a*10 + C.a*100,
+A.a * B.a*10 + C.a*100,
+A.a,
+'filler'
+from t0 A, t0 B, t0 C;
+This should use union:
+explain select * from t1 where a=1 or b=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 2 Using union(a,b); Using where
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 where a=1 or b=1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.a AS a,t1.b AS b,t1.c AS c,t1.filler AS filler from t1 where t1.a = 1 or t1.b = 1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.a = 1 or t1.b = 1",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "multiple equal(1, t1.a) or multiple equal(1, t1.b)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "multiple equal(1, t1.a) or multiple equal(1, t1.b)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "multiple equal(1, t1.a) or multiple equal(1, t1.b)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": []
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 1000,
+ "cost": 231.69
+ },
+ "potential_range_indexes": [
+ {
+ "index": "a",
+ "usable": true,
+ "key_parts": ["a"]
+ },
+ {
+ "index": "b",
+ "usable": true,
+ "key_parts": ["b"]
+ },
+ {
+ "index": "c",
+ "usable": false,
+ "cause": "not applicable"
+ }
+ ],
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_sort_intersect": {},
+ "analyzing_index_merge_union": [
+ {
+ "indexes_to_merge": [
+ {
+ "range_scan_alternatives": [
+ {
+ "index": "a",
+ "ranges": ["(1) <= (a) <= (1)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 1,
+ "cost": 1.1773,
+ "chosen": true
+ }
+ ],
+ "index_to_merge": "a",
+ "cumulated_cost": 1.1773
+ },
+ {
+ "range_scan_alternatives": [
+ {
+ "index": "b",
+ "ranges": ["(1) <= (b) <= (1)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 1,
+ "cost": 1.1773,
+ "chosen": true
+ }
+ ],
+ "index_to_merge": "b",
+ "cumulated_cost": 2.3547
+ }
+ ],
+ "cost_of_reading_ranges": 2.3547,
+ "use_roworder_union": true,
+ "cause": "always cheaper than non roworder retrieval",
+ "analyzing_roworder_scans": [
+ {
+ "type": "range_scan",
+ "index": "a",
+ "rows": 1,
+ "ranges": ["(1) <= (a) <= (1)"],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ }
+ },
+ {
+ "type": "range_scan",
+ "index": "b",
+ "rows": 1,
+ "ranges": ["(1) <= (b) <= (1)"],
+ "analyzing_roworder_intersect": {
+ "cause": "too few roworder scans"
+ }
+ }
+ ],
+ "index_roworder_union_cost": 4.1484,
+ "members": 2,
+ "chosen": true
+ }
+ ]
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "index_roworder_union",
+ "union_of": [
+ {
+ "type": "range_scan",
+ "index": "a",
+ "rows": 1,
+ "ranges": ["(1) <= (a) <= (1)"]
+ },
+ {
+ "type": "range_scan",
+ "index": "b",
+ "rows": 1,
+ "ranges": ["(1) <= (b) <= (1)"]
+ }
+ ]
+ },
+ "rows_for_plan": 2,
+ "cost_for_plan": 4.1484,
+ "chosen": true
+ }
+ }
+ },
+ {
+ "selectivity_for_indexes": [],
+ "selectivity_for_columns": [],
+ "cond_selectivity": 0.002
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "index_merge",
+ "resulting_rows": 2,
+ "cost": 4.1484,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "index_merge",
+ "records": 2,
+ "cost": 4.1484,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 2,
+ "cost_for_plan": 4.5484,
+ "estimated_join_cardinality": 2
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.a = 1 or t1.b = 1",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.a = 1 or t1.b = 1"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t0,t1;
+set optimizer_trace="enabled=off";
+set @@optimizer_switch= @tmp_opt_switch;
+# More tests added index_merge access
+create table t1
+(
+/* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */
+st_a int not null default 0,
+swt1a int not null default 0,
+swt2a int not null default 0,
+st_b int not null default 0,
+swt1b int not null default 0,
+swt2b int not null default 0,
+/* fields/keys for row retrieval tests */
+key1 int,
+key2 int,
+key3 int,
+key4 int,
+/* make rows much bigger then keys */
+filler1 char (200),
+filler2 char (200),
+filler3 char (200),
+filler4 char (200),
+filler5 char (200),
+filler6 char (200),
+/* order of keys is important */
+key sta_swt12a(st_a,swt1a,swt2a),
+key sta_swt1a(st_a,swt1a),
+key sta_swt2a(st_a,swt2a),
+key sta_swt21a(st_a,swt2a,swt1a),
+key st_a(st_a),
+key stb_swt1a_2b(st_b,swt1b,swt2a),
+key stb_swt1b(st_b,swt1b),
+key st_b(st_b),
+key(key1),
+key(key2),
+key(key3),
+key(key4)
+) ;
+create table t0 as select * from t1;
+# Printing of many insert into t0 values (....) disabled.
+alter table t1 disable keys;
+# Printing of many insert into t1 select .... from t0 disabled.
+# Printing of many insert into t1 (...) values (....) disabled.
+alter table t1 enable keys;
+insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, -1, -1, 'key1-key2');
+insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 100, 100, 'key4-key3');
+set optimizer_trace='enabled=on';
+# 3-way ROR-intersection
+explain select key1,key2,key3 from t1 where key1=100 and key2=100 and key3=100;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index_merge key1,key2,key3 key1,key2,key3 5,5,5 NULL 2 Using intersect(key1,key2,key3); Using where; Using index
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "key1",
+ "ranges":
+ [
+ "(100) <= (key1) <= (100)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 2243,
+ "cost": 2844.1,
+ "chosen": true
+ },
+
+ {
+ "index": "key2",
+ "ranges":
+ [
+ "(100) <= (key2) <= (100)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 2243,
+ "cost": 2844.1,
+ "chosen": false,
+ "cause": "cost"
+ },
+
+ {
+ "index": "key3",
+ "ranges":
+ [
+ "(100) <= (key3) <= (100)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 2243,
+ "cost": 2844.1,
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "intersecting_indexes":
+ [
+
+ {
+ "index": "key1",
+ "index_scan_cost": 58.252,
+ "cumulated_index_scan_cost": 58.252,
+ "disk_sweep_cost": 1923.1,
+ "cumulative_total_cost": 1981.4,
+ "usable": true,
+ "matching_rows_now": 2243,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ },
+
+ {
+ "index": "key2",
+ "index_scan_cost": 58.252,
+ "cumulated_index_scan_cost": 116.5,
+ "disk_sweep_cost": 84.518,
+ "cumulative_total_cost": 201.02,
+ "usable": true,
+ "matching_rows_now": 77.636,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ },
+
+ {
+ "index": "key3",
+ "index_scan_cost": 58.252,
+ "cumulated_index_scan_cost": 174.76,
+ "disk_sweep_cost": 0,
+ "cumulative_total_cost": 174.76,
+ "usable": true,
+ "matching_rows_now": 2.6872,
+ "intersect_covering_with_this_index": true,
+ "chosen": true
+ }
+ ],
+ "clustered_pk":
+ {
+ "clustered_pk_added_to_intersect": false,
+ "cause": "no clustered pk index"
+ },
+ "rows": 2,
+ "cost": 174.76,
+ "covering": true,
+ "chosen": true
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
+[
+
+ {
+ "range_access_plan":
+ {
+ "type": "index_roworder_intersect",
+ "rows": 2,
+ "cost": 174.76,
+ "covering": true,
+ "clustered_pk_scan": false,
+ "intersect_of":
+ [
+
+ {
+ "type": "range_scan",
+ "index": "key1",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key1) <= (100)"
+ ]
+ },
+
+ {
+ "type": "range_scan",
+ "index": "key2",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key2) <= (100)"
+ ]
+ },
+
+ {
+ "type": "range_scan",
+ "index": "key3",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key3) <= (100)"
+ ]
+ }
+ ]
+ },
+ "rows_for_plan": 2,
+ "cost_for_plan": 174.76,
+ "chosen": true
+ }
+]
+# ROR-union(ROR-intersection, ROR-range)
+explain select key1,key2,key3,key4 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+
+ {
+ "indexes_to_merge":
+ [
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "key1",
+ "ranges":
+ [
+ "(100) <= (key1) <= (100)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 2243,
+ "cost": 152.53,
+ "chosen": true
+ },
+
+ {
+ "index": "key2",
+ "ranges":
+ [
+ "(100) <= (key2) <= (100)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 2243,
+ "cost": 152.53,
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "index_to_merge": "key1",
+ "cumulated_cost": 152.53
+ },
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "key3",
+ "ranges":
+ [
+ "(100) <= (key3) <= (100)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 2243,
+ "cost": 152.53,
+ "chosen": true
+ },
+
+ {
+ "index": "key4",
+ "ranges":
+ [
+ "(100) <= (key4) <= (100)"
+ ],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": true,
+ "rows": 2243,
+ "cost": 152.53,
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "index_to_merge": "key3",
+ "cumulated_cost": 305.05
+ }
+ ],
+ "cost_of_reading_ranges": 305.05,
+ "use_roworder_union": true,
+ "cause": "always cheaper than non roworder retrieval",
+ "analyzing_roworder_scans":
+ [
+
+ {
+ "type": "range_scan",
+ "index": "key1",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key1) <= (100)"
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "intersecting_indexes":
+ [
+
+ {
+ "index": "key1",
+ "index_scan_cost": 58.252,
+ "cumulated_index_scan_cost": 58.252,
+ "disk_sweep_cost": 1923.1,
+ "cumulative_total_cost": 1981.4,
+ "usable": true,
+ "matching_rows_now": 2243,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ },
+
+ {
+ "index": "key2",
+ "index_scan_cost": 58.252,
+ "cumulated_index_scan_cost": 116.5,
+ "disk_sweep_cost": 84.518,
+ "cumulative_total_cost": 201.02,
+ "usable": true,
+ "matching_rows_now": 77.636,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ }
+ ],
+ "clustered_pk":
+ {
+ "clustered_pk_added_to_intersect": false,
+ "cause": "no clustered pk index"
+ },
+ "rows": 77,
+ "cost": 201.02,
+ "covering": false,
+ "chosen": true
+ }
+ },
+
+ {
+ "type": "range_scan",
+ "index": "key3",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key3) <= (100)"
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "intersecting_indexes":
+ [
+
+ {
+ "index": "key3",
+ "index_scan_cost": 58.252,
+ "cumulated_index_scan_cost": 58.252,
+ "disk_sweep_cost": 1923.1,
+ "cumulative_total_cost": 1981.4,
+ "usable": true,
+ "matching_rows_now": 2243,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ },
+
+ {
+ "index": "key4",
+ "index_scan_cost": 58.252,
+ "cumulated_index_scan_cost": 116.5,
+ "disk_sweep_cost": 84.518,
+ "cumulative_total_cost": 201.02,
+ "usable": true,
+ "matching_rows_now": 77.636,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ }
+ ],
+ "clustered_pk":
+ {
+ "clustered_pk_added_to_intersect": false,
+ "cause": "no clustered pk index"
+ },
+ "rows": 77,
+ "cost": 201.02,
+ "covering": false,
+ "chosen": true
+ }
+ }
+ ],
+ "index_roworder_union_cost": 386.73,
+ "members": 2,
+ "chosen": true
+ }
+ ]
+ }
+]
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary'))
+[
+
+ {
+ "range_access_plan":
+ {
+ "type": "index_roworder_union",
+ "union_of":
+ [
+
+ {
+ "type": "index_roworder_intersect",
+ "rows": 77,
+ "cost": 201.02,
+ "covering": false,
+ "clustered_pk_scan": false,
+ "intersect_of":
+ [
+
+ {
+ "type": "range_scan",
+ "index": "key1",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key1) <= (100)"
+ ]
+ },
+
+ {
+ "type": "range_scan",
+ "index": "key2",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key2) <= (100)"
+ ]
+ }
+ ]
+ },
+
+ {
+ "type": "index_roworder_intersect",
+ "rows": 77,
+ "cost": 201.02,
+ "covering": false,
+ "clustered_pk_scan": false,
+ "intersect_of":
+ [
+
+ {
+ "type": "range_scan",
+ "index": "key3",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key3) <= (100)"
+ ]
+ },
+
+ {
+ "type": "range_scan",
+ "index": "key4",
+ "rows": 2243,
+ "ranges":
+ [
+ "(100) <= (key4) <= (100)"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "rows_for_plan": 154,
+ "cost_for_plan": 386.73,
+ "chosen": true
+ }
+]
+drop table t0,t1;
+set optimizer_trace="enabled=off";
diff --git a/mysql-test/main/opt_trace_index_merge.test b/mysql-test/main/opt_trace_index_merge.test
new file mode 100644
index 00000000000..73240b6a9e2
--- /dev/null
+++ b/mysql-test/main/opt_trace_index_merge.test
@@ -0,0 +1,133 @@
+--source include/not_embedded.inc
+set @tmp_opt_switch= @@optimizer_switch;
+set optimizer_switch='index_merge_sort_intersection=on';
+set optimizer_trace='enabled=on';
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int, b int, c int, filler char(100),
+ key(a), key(b), key(c));
+insert into t1 select
+ A.a * B.a*10 + C.a*100,
+ A.a * B.a*10 + C.a*100,
+ A.a,
+ 'filler'
+from t0 A, t0 B, t0 C;
+
+--echo This should use union:
+explain select * from t1 where a=1 or b=1;
+select * from information_schema.OPTIMIZER_TRACE;
+drop table t0,t1;
+set optimizer_trace="enabled=off";
+set @@optimizer_switch= @tmp_opt_switch;
+
+--echo # More tests added index_merge access
+
+--enable_warnings
+create table t1
+(
+ /* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */
+ st_a int not null default 0,
+ swt1a int not null default 0,
+ swt2a int not null default 0,
+
+ st_b int not null default 0,
+ swt1b int not null default 0,
+ swt2b int not null default 0,
+
+ /* fields/keys for row retrieval tests */
+ key1 int,
+ key2 int,
+ key3 int,
+ key4 int,
+
+ /* make rows much bigger then keys */
+ filler1 char (200),
+ filler2 char (200),
+ filler3 char (200),
+ filler4 char (200),
+ filler5 char (200),
+ filler6 char (200),
+
+ /* order of keys is important */
+ key sta_swt12a(st_a,swt1a,swt2a),
+ key sta_swt1a(st_a,swt1a),
+ key sta_swt2a(st_a,swt2a),
+ key sta_swt21a(st_a,swt2a,swt1a),
+ key st_a(st_a),
+ key stb_swt1a_2b(st_b,swt1b,swt2a),
+ key stb_swt1b(st_b,swt1b),
+ key st_b(st_b),
+
+ key(key1),
+ key(key2),
+ key(key3),
+ key(key4)
+) ;
+# Fill table
+create table t0 as select * from t1;
+--disable_query_log
+--echo # Printing of many insert into t0 values (....) disabled.
+let $cnt=1000;
+while ($cnt)
+{
+ eval insert into t0 values (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6');
+ dec $cnt;
+}
+--enable_query_log
+
+alter table t1 disable keys;
+--disable_query_log
+--echo # Printing of many insert into t1 select .... from t0 disabled.
+let $1=4;
+while ($1)
+{
+ let $2=4;
+ while ($2)
+ {
+ let $3=4;
+ while ($3)
+ {
+ eval insert into t1 select $1, $2, $3, $1 ,$2, $3, key1, key2, key3, key4, filler1, filler2, filler3, filler4, filler5, filler6 from t0;
+ dec $3;
+ }
+ dec $2;
+ }
+ dec $1;
+}
+
+--echo # Printing of many insert into t1 (...) values (....) disabled.
+# Row retrieval tests
+# -1 is used for values 'out of any range we are using'
+# insert enough rows for index intersection to be used for (key1,key2)
+insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 100, 100,'key1-key2-key3-key4');
+let $cnt=400;
+while ($cnt)
+{
+ eval insert into t1 (key1, key2, key3, key4, filler1) values (100, -1, 100, -1,'key1-key3');
+ dec $cnt;
+}
+let $cnt=400;
+while ($cnt)
+{
+ eval insert into t1 (key1, key2, key3, key4, filler1) values (-1, 100, -1, 100,'key2-key4');
+ dec $cnt;
+}
+--enable_query_log
+alter table t1 enable keys;
+
+insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, -1, -1, 'key1-key2');
+insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 100, 100, 'key4-key3');
+set optimizer_trace='enabled=on';
+
+--echo # 3-way ROR-intersection
+explain select key1,key2,key3 from t1 where key1=100 and key2=100 and key3=100;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+--echo # ROR-union(ROR-intersection, ROR-range)
+explain select key1,key2,key3,key4 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.chosen_range_access_summary')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+drop table t0,t1;
+set optimizer_trace="enabled=off";
diff --git a/mysql-test/main/opt_trace_index_merge_innodb.result b/mysql-test/main/opt_trace_index_merge_innodb.result
new file mode 100644
index 00000000000..5786f741996
--- /dev/null
+++ b/mysql-test/main/opt_trace_index_merge_innodb.result
@@ -0,0 +1,274 @@
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+create table t1
+(
+pk1 int not null,
+pk2 int not null,
+key1 int not null,
+key2 int not null,
+key (key1),
+key (key2),
+primary key (pk1, pk2)
+)engine=Innodb;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+set optimizer_trace="enabled=on";
+set @tmp_index_merge_ror_cpk=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
+explain select * from t1 where pk1 != 0 and key1 = 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref PRIMARY,key1 key1 4 const 1 Using index condition
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+explain select * from t1 where pk1 != 0 and key1 = 1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select t1.pk1 AS pk1,t1.pk2 AS pk2,t1.key1 AS key1,t1.key2 AS key2 from t1 where t1.pk1 <> 0 and t1.key1 = 1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "condition_processing": {
+ "condition": "WHERE",
+ "original_condition": "t1.pk1 <> 0 and t1.key1 = 1",
+ "steps": [
+ {
+ "transformation": "equality_propagation",
+ "resulting_condition": "t1.pk1 <> 0 and multiple equal(1, t1.key1)"
+ },
+ {
+ "transformation": "constant_propagation",
+ "resulting_condition": "t1.pk1 <> 0 and multiple equal(1, t1.key1)"
+ },
+ {
+ "transformation": "trivial_condition_removal",
+ "resulting_condition": "t1.pk1 <> 0 and multiple equal(1, t1.key1)"
+ }
+ ]
+ }
+ },
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "ref_optimizer_key_uses": [
+ {
+ "table": "t1",
+ "field": "key1",
+ "equals": "1",
+ "null_rejecting": false
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "range_analysis": {
+ "table_scan": {
+ "rows": 1000,
+ "cost": 206.1
+ },
+ "potential_range_indexes": [
+ {
+ "index": "PRIMARY",
+ "usable": true,
+ "key_parts": ["pk1", "pk2"]
+ },
+ {
+ "index": "key1",
+ "usable": true,
+ "key_parts": ["key1"]
+ },
+ {
+ "index": "key2",
+ "usable": false,
+ "cause": "not applicable"
+ }
+ ],
+ "setup_range_conditions": [],
+ "group_index_range": {
+ "chosen": false,
+ "cause": "no group by or distinct"
+ },
+ "analyzing_range_alternatives": {
+ "range_scan_alternatives": [
+ {
+ "index": "PRIMARY",
+ "ranges": ["(pk1) < (0)", "(0) < (pk1)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1000,
+ "cost": 204.01,
+ "chosen": true
+ },
+ {
+ "index": "key1",
+ "ranges": ["(1) <= (key1) <= (1)"],
+ "rowid_ordered": true,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 1,
+ "cost": 2.3751,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect": {
+ "intersecting_indexes": [
+ {
+ "index": "key1",
+ "index_scan_cost": 1.0001,
+ "cumulated_index_scan_cost": 1.0001,
+ "disk_sweep_cost": 1.0042,
+ "cumulative_total_cost": 2.0043,
+ "usable": true,
+ "matching_rows_now": 1,
+ "intersect_covering_with_this_index": false,
+ "chosen": true
+ }
+ ],
+ "clustered_pk": {
+ "clustered_pk_added_to_intersect": false,
+ "cause": "cost"
+ },
+ "chosen": false,
+ "cause": "too few indexes to merge"
+ },
+ "analyzing_index_merge_union": []
+ },
+ "chosen_range_access_summary": {
+ "range_access_plan": {
+ "type": "range_scan",
+ "index": "key1",
+ "rows": 1,
+ "ranges": ["(1) <= (key1) <= (1)"]
+ },
+ "rows_for_plan": 1,
+ "cost_for_plan": 2.3751,
+ "chosen": true
+ }
+ }
+ },
+ {
+ "table": "t1",
+ "rowid_filters": [
+ {
+ "key": "key1",
+ "build_cost": 1.1801,
+ "rows": 1
+ }
+ ]
+ },
+ {
+ "selectivity_for_indexes": [
+ {
+ "index_name": "key1",
+ "selectivity_from_index": 0.001
+ },
+ {
+ "index_name": "PRIMARY",
+ "selectivity_from_index": 1
+ }
+ ],
+ "selectivity_for_columns": [],
+ "cond_selectivity": 0.001
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "ref",
+ "index": "key1",
+ "used_range_estimates": true,
+ "rows": 1,
+ "cost": 2,
+ "chosen": true
+ },
+ {
+ "type": "scan",
+ "chosen": false,
+ "cause": "cost"
+ }
+ ],
+ "chosen_access_method": {
+ "type": "ref",
+ "records": 1,
+ "cost": 2,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 1,
+ "cost_for_plan": 2.2,
+ "estimated_join_cardinality": 1
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": "t1.key1 = 1 and t1.pk1 <> 0",
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": "t1.pk1 <> 0"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+drop table t1;
+set @@optimizer_switch= @tmp_index_merge_ror_cpk;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
+#
+# MDEV-18962: ASAN heap-buffer-overflow in Single_line_formatting_helper::on_add_str with optimizer trace
+#
+CREATE TABLE t1 (a date not null, b time, key(a), key(b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('1991-09-09','00:00:00'),('2032-08-24','02:22:24');
+SET SESSION optimizer_trace = 'enabled=on';
+SELECT * FROM t1 WHERE b IS NULL AND a = '2000-01-01';
+a b
+DROP TABLE t1;
+set optimizer_trace="enabled=off";
diff --git a/mysql-test/main/opt_trace_index_merge_innodb.test b/mysql-test/main/opt_trace_index_merge_innodb.test
new file mode 100644
index 00000000000..42d8c57144c
--- /dev/null
+++ b/mysql-test/main/opt_trace_index_merge_innodb.test
@@ -0,0 +1,54 @@
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
+create table t1
+(
+ pk1 int not null,
+ pk2 int not null,
+ key1 int not null,
+ key2 int not null,
+ key (key1),
+ key (key2),
+ primary key (pk1, pk2)
+)engine=Innodb;
+
+--disable_query_log
+let $1=1000;
+while ($1)
+{
+ eval insert into t1 values (1+$1/10,$1 mod 100,$1,$1/100);
+ dec $1;
+}
+--enable_query_log
+analyze table t1;
+
+set optimizer_trace="enabled=on";
+set @tmp_index_merge_ror_cpk=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
+explain select * from t1 where pk1 != 0 and key1 = 1;
+select * from information_schema.OPTIMIZER_TRACE;
+drop table t1;
+set @@optimizer_switch= @tmp_index_merge_ror_cpk;
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
+
+--echo #
+--echo # MDEV-18962: ASAN heap-buffer-overflow in Single_line_formatting_helper::on_add_str with optimizer trace
+--echo #
+
+CREATE TABLE t1 (a date not null, b time, key(a), key(b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('1991-09-09','00:00:00'),('2032-08-24','02:22:24');
+SET SESSION optimizer_trace = 'enabled=on';
+SELECT * FROM t1 WHERE b IS NULL AND a = '2000-01-01';
+DROP TABLE t1;
+
+set optimizer_trace="enabled=off";
diff --git a/mysql-test/main/opt_trace_security.result b/mysql-test/main/opt_trace_security.result
new file mode 100644
index 00000000000..6f377cd02b5
--- /dev/null
+++ b/mysql-test/main/opt_trace_security.result
@@ -0,0 +1,410 @@
+create database db1;
+use db1;
+create table t1(a int);
+insert into t1 values (1),(2),(3);
+create table t2(a int);
+CREATE USER 'foo'@'%';
+CREATE USER 'bar'@'%';
+create definer=foo SQL SECURITY definer view db1.v1 as select * from db1.t1;
+create definer=foo function f1 (a int) returns INT SQL SECURITY DEFINER
+BEGIN
+insert into t2 select * from t1;
+return a+1;
+END|
+set optimizer_trace="enabled=on";
+select * from db1.t1;
+ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+ 0 1
+set optimizer_trace="enabled=off";
+grant select(a) on db1.t1 to 'foo'@'%';
+set optimizer_trace="enabled=on";
+select * from db1.t1;
+a
+1
+2
+3
+# INSUFFICIENT PRIVILEGES should be set to 1
+# Trace and Query should be empty
+# We need SELECT privilege on the table db1.t1;
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+ 0 1
+set optimizer_trace="enabled=off";
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+grant select on db1.t1 to 'foo'@'%';
+grant select on db1.t2 to 'foo'@'%';
+set optimizer_trace="enabled=on";
+#
+# SELECT privilege on the table db1.t1
+# The trace would be present.
+#
+select * from db1.t1;
+a
+1
+2
+3
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select * from db1.t1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "expanded_query": "select db1.t1.a AS a from t1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "estimated_join_cardinality": 3
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+set optimizer_trace="enabled=off";
+grant select on db1.v1 to 'foo'@'%';
+grant show view on db1.v1 to 'foo'@'%';
+grant select on db1.v1 to 'bar'@'%';
+grant show view on db1.v1 to 'bar'@'%';
+select current_user();
+current_user()
+foo@%
+set optimizer_trace="enabled=on";
+select * from db1.v1;
+a
+1
+2
+3
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+select * from db1.v1 {
+ "steps": [
+ {
+ "join_preparation": {
+ "select_id": 1,
+ "steps": [
+ {
+ "view": {
+ "table": "v1",
+ "select_id": 2,
+ "algorithm": "merged"
+ }
+ },
+ {
+ "join_preparation": {
+ "select_id": 2,
+ "steps": [
+ {
+ "expanded_query": "/* select#2 */ select db1.t1.a AS a from t1"
+ }
+ ]
+ }
+ },
+ {
+ "expanded_query": "/* select#1 */ select db1.t1.a AS a from v1"
+ }
+ ]
+ }
+ },
+ {
+ "join_optimization": {
+ "select_id": 1,
+ "steps": [
+ {
+ "table_dependencies": [
+ {
+ "table": "t1",
+ "row_may_be_null": false,
+ "map_bit": 0,
+ "depends_on_map_bits": []
+ }
+ ]
+ },
+ {
+ "rows_estimation": [
+ {
+ "table": "t1",
+ "table_scan": {
+ "rows": 3,
+ "cost": 2.0051
+ }
+ }
+ ]
+ },
+ {
+ "considered_execution_plans": [
+ {
+ "plan_prefix": [],
+ "table": "t1",
+ "best_access_path": {
+ "considered_access_paths": [
+ {
+ "access_type": "scan",
+ "resulting_rows": 3,
+ "cost": 2.0051,
+ "chosen": true
+ }
+ ],
+ "chosen_access_method": {
+ "type": "scan",
+ "records": 3,
+ "cost": 2.0051,
+ "uses_join_buffering": false
+ }
+ },
+ "rows_for_plan": 3,
+ "cost_for_plan": 2.6051,
+ "estimated_join_cardinality": 3
+ }
+ ]
+ },
+ {
+ "best_join_order": ["t1"]
+ },
+ {
+ "attaching_conditions_to_tables": {
+ "original_condition": null,
+ "attached_conditions_computation": [],
+ "attached_conditions_summary": [
+ {
+ "table": "t1",
+ "attached": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "join_execution": {
+ "select_id": 1,
+ "steps": []
+ }
+ }
+ ]
+} 0 0
+set optimizer_trace="enabled=off";
+select current_user();
+current_user()
+bar@%
+set optimizer_trace="enabled=on";
+select * from db1.v1;
+a
+1
+2
+3
+#
+# INSUFFICIENT PRIVILEGES should be set to 1
+# Trace and Query should be empty
+# Privileges for the underlying tables of the
+# view should also be present for the current user
+#
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+ 0 1
+set optimizer_trace="enabled=off";
+grant execute on function db1.f1 to 'foo'@'%';
+grant execute on function db1.f1 to 'bar'@'%';
+grant select on db1.t1 to 'bar'@'%';
+grant insert on db1.t2 to 'foo'@'%';
+select current_user();
+current_user()
+foo@%
+set optimizer_trace="enabled=on";
+select db1.f1(a) from db1.t1;
+db1.f1(a)
+2
+3
+4
+select INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+INSUFFICIENT_PRIVILEGES
+0
+set optimizer_trace="enabled=off";
+select current_user();
+current_user()
+bar@%
+set optimizer_trace="enabled=on";
+#
+# The trace should be empty, because the current user
+# does not have INSERT privilege for table t2 which is
+# used in the function f1
+#
+select db1.f1(a) from db1.t1;
+db1.f1(a)
+2
+3
+4
+select * from information_schema.OPTIMIZER_TRACE;
+QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
+ 0 1
+set optimizer_trace="enabled=off";
+select current_user();
+current_user()
+root@localhost
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM foo;
+drop user if exists foo;
+drop user if exists bar;
+drop table db1.t1, db1.t2;
+drop database db1;
+#
+# Privilege checking for optimizer trace across connections
+#
+connection default;
+create database db1;
+use db1;
+create table t1(a int);
+insert into t1 values (1),(2),(3);
+create table t2(a int);
+CREATE USER 'foo'@'localhost';
+CREATE USER 'bar'@'localhost';
+grant all on *.* to foo@localhost with grant option;
+grant all on *.* to bar@localhost with grant option;
+connect con_foo,localhost, foo,, db1;
+connection default;
+connect con_bar,localhost, bar,, db1;
+connection default;
+create definer=foo@localhost SQL SECURITY definer view db1.v1 as select * from db1.t1;
+create function f1 (a int) returns INT SQL SECURITY DEFINER
+BEGIN
+insert into t2 select * from t1;
+return a+1;
+END|
+grant execute on function f1 to bar@localhost;
+connection con_foo;
+set optimizer_trace='enabled=on';
+select * from db1.t1;
+a
+1
+2
+3
+#
+# Test that security context changes are allowed when, and only
+# when, invoker has all global privileges.
+#
+select query, INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+query INSUFFICIENT_PRIVILEGES
+select * from db1.t1 0
+set optimizer_trace='enabled=off';
+connection con_bar;
+set optimizer_trace='enabled=on';
+select f1(a) from db1.t1;
+f1(a)
+2
+3
+4
+select query, INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+query INSUFFICIENT_PRIVILEGES
+select f1(a) from db1.t1 0
+set optimizer_trace='enabled=off';
+connection default;
+revoke shutdown on *.* from foo@localhost;
+disconnect con_foo;
+connect con_foo, localhost, foo,, db1;
+connection con_foo;
+set optimizer_trace='enabled=on';
+select f1(a) from db1.t1;
+f1(a)
+2
+3
+4
+#
+# Test to check if invoker has all global privileges or not, only then
+# the security context changes are allowed. The user has been revoked
+# shutdown privilege so INSUFFICIENT PRIVILEGES should be set to 1.
+#
+select query, INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+query INSUFFICIENT_PRIVILEGES
+ 1
+set optimizer_trace='enabled=off';
+connection default;
+select current_user();
+current_user()
+root@localhost
+select * from db1.v1;
+a
+1
+2
+3
+drop user foo@localhost, bar@localhost;
+drop view db1.v1;
+drop table db1.t1;
+drop database db1;
+set optimizer_trace="enabled=off";
diff --git a/mysql-test/main/opt_trace_security.test b/mysql-test/main/opt_trace_security.test
new file mode 100644
index 00000000000..9fa49190990
--- /dev/null
+++ b/mysql-test/main/opt_trace_security.test
@@ -0,0 +1,197 @@
+--source include/not_embedded.inc
+create database db1;
+use db1;
+create table t1(a int);
+insert into t1 values (1),(2),(3);
+create table t2(a int);
+
+CREATE USER 'foo'@'%';
+CREATE USER 'bar'@'%';
+
+create definer=foo SQL SECURITY definer view db1.v1 as select * from db1.t1;
+
+delimiter |;
+create definer=foo function f1 (a int) returns INT SQL SECURITY DEFINER
+BEGIN
+ insert into t2 select * from t1;
+ return a+1;
+END|
+delimiter ;|
+
+--change_user foo
+set optimizer_trace="enabled=on";
+--error 1142
+select * from db1.t1;
+select * from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace="enabled=off";
+
+--change_user root
+grant select(a) on db1.t1 to 'foo'@'%';
+
+--change_user foo
+set optimizer_trace="enabled=on";
+select * from db1.t1;
+
+--echo # INSUFFICIENT PRIVILEGES should be set to 1
+--echo # Trace and Query should be empty
+--echo # We need SELECT privilege on the table db1.t1;
+
+select * from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace="enabled=off";
+
+--change_user root
+select * from information_schema.OPTIMIZER_TRACE;
+grant select on db1.t1 to 'foo'@'%';
+grant select on db1.t2 to 'foo'@'%';
+
+--change_user foo
+set optimizer_trace="enabled=on";
+
+--echo #
+--echo # SELECT privilege on the table db1.t1
+--echo # The trace would be present.
+--echo #
+select * from db1.t1;
+select * from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace="enabled=off";
+
+--change_user root
+
+grant select on db1.v1 to 'foo'@'%';
+grant show view on db1.v1 to 'foo'@'%';
+
+grant select on db1.v1 to 'bar'@'%';
+grant show view on db1.v1 to 'bar'@'%';
+
+--change_user foo
+select current_user();
+set optimizer_trace="enabled=on";
+select * from db1.v1;
+select * from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace="enabled=off";
+
+--change_user bar
+select current_user();
+set optimizer_trace="enabled=on";
+select * from db1.v1;
+--echo #
+--echo # INSUFFICIENT PRIVILEGES should be set to 1
+--echo # Trace and Query should be empty
+--echo # Privileges for the underlying tables of the
+--echo # view should also be present for the current user
+--echo #
+select * from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace="enabled=off";
+
+--change_user root
+grant execute on function db1.f1 to 'foo'@'%';
+grant execute on function db1.f1 to 'bar'@'%';
+
+grant select on db1.t1 to 'bar'@'%';
+grant insert on db1.t2 to 'foo'@'%';
+
+--change_user foo
+select current_user();
+set optimizer_trace="enabled=on";
+
+select db1.f1(a) from db1.t1;
+select INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace="enabled=off";
+
+--change_user bar
+select current_user();
+set optimizer_trace="enabled=on";
+--echo #
+--echo # The trace should be empty, because the current user
+--echo # does not have INSERT privilege for table t2 which is
+--echo # used in the function f1
+--echo #
+select db1.f1(a) from db1.t1;
+select * from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace="enabled=off";
+
+--change_user root
+select current_user();
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM foo;
+
+--change_user root
+drop user if exists foo;
+drop user if exists bar;
+drop table db1.t1, db1.t2;
+drop database db1;
+
+
+--echo #
+--echo # Privilege checking for optimizer trace across connections
+--echo #
+
+connection default;
+create database db1;
+use db1;
+create table t1(a int);
+insert into t1 values (1),(2),(3);
+create table t2(a int);
+
+CREATE USER 'foo'@'localhost';
+CREATE USER 'bar'@'localhost';
+grant all on *.* to foo@localhost with grant option;
+grant all on *.* to bar@localhost with grant option;
+#grant select on db1.t1 to bar@localhost;
+#grant insert on db1.t2 to bar@localhost;
+
+connect (con_foo,localhost, foo,, db1);
+connection default;
+connect (con_bar,localhost, bar,, db1);
+connection default;
+create definer=foo@localhost SQL SECURITY definer view db1.v1 as select * from db1.t1;
+
+delimiter |;
+create function f1 (a int) returns INT SQL SECURITY DEFINER
+BEGIN
+ insert into t2 select * from t1;
+ return a+1;
+END|
+delimiter ;|
+
+grant execute on function f1 to bar@localhost;
+
+connection con_foo;
+set optimizer_trace='enabled=on';
+select * from db1.t1;
+--echo #
+--echo # Test that security context changes are allowed when, and only
+--echo # when, invoker has all global privileges.
+--echo #
+select query, INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace='enabled=off';
+
+connection con_bar;
+set optimizer_trace='enabled=on';
+select f1(a) from db1.t1;
+select query, INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace='enabled=off';
+
+connection default;
+revoke shutdown on *.* from foo@localhost;
+disconnect con_foo;
+connect (con_foo, localhost, foo,, db1);
+
+connection con_foo;
+set optimizer_trace='enabled=on';
+select f1(a) from db1.t1;
+--echo #
+--echo # Test to check if invoker has all global privileges or not, only then
+--echo # the security context changes are allowed. The user has been revoked
+--echo # shutdown privilege so INSUFFICIENT PRIVILEGES should be set to 1.
+--echo #
+select query, INSUFFICIENT_PRIVILEGES from information_schema.OPTIMIZER_TRACE;
+set optimizer_trace='enabled=off';
+
+connection default;
+select current_user();
+select * from db1.v1;
+drop user foo@localhost, bar@localhost;
+drop view db1.v1;
+drop table db1.t1;
+drop database db1;
+set optimizer_trace="enabled=off";
diff --git a/mysql-test/main/opt_trace_ucs2.result b/mysql-test/main/opt_trace_ucs2.result
new file mode 100644
index 00000000000..306fdbf94ad
--- /dev/null
+++ b/mysql-test/main/opt_trace_ucs2.result
@@ -0,0 +1,54 @@
+create or replace table t1 (col1 char(10) character set ucs2, filler char(100), key(col1)) ;
+insert into t1 values ('a', 'a');
+insert into t1 values ('a', 'a');
+set optimizer_trace=1;
+explain format=json select * from t1 force index(col1) where col1 >='a';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "range",
+ "possible_keys": ["col1"],
+ "key": "col1",
+ "key_length": "21",
+ "used_key_parts": ["col1"],
+ "rows": 2,
+ "filtered": 100,
+ "index_condition": "t1.col1 >= 'a'"
+ }
+ }
+}
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
+[
+
+ {
+ "range_scan_alternatives":
+ [
+
+ {
+ "index": "col1",
+ "ranges":
+ [
+ "(a) <= (col1)"
+ ],
+ "rowid_ordered": false,
+ "using_mrr": false,
+ "index_only": false,
+ "rows": 2,
+ "cost": 3.7609,
+ "chosen": true
+ }
+ ],
+ "analyzing_roworder_intersect":
+ {
+ "cause": "too few roworder scans"
+ },
+ "analyzing_index_merge_union":
+ [
+ ]
+ }
+]
+drop table t1;
diff --git a/mysql-test/main/opt_trace_ucs2.test b/mysql-test/main/opt_trace_ucs2.test
new file mode 100644
index 00000000000..827dc403d58
--- /dev/null
+++ b/mysql-test/main/opt_trace_ucs2.test
@@ -0,0 +1,10 @@
+--source include/not_embedded.inc
+--source include/have_ucs2.inc
+
+create or replace table t1 (col1 char(10) character set ucs2, filler char(100), key(col1)) ;
+insert into t1 values ('a', 'a');
+insert into t1 values ('a', 'a');
+set optimizer_trace=1;
+explain format=json select * from t1 force index(col1) where col1 >='a';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;
diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result
index 0d7bcc1f56e..19169282fc7 100644
--- a/mysql-test/main/order_by.result
+++ b/mysql-test/main/order_by.result
@@ -294,82 +294,109 @@ member_id nickname voornaam
drop table t1;
create table t1 (a int not null, b int, c varchar(10), key (a, b, c));
insert into t1 values (1, NULL, NULL), (1, NULL, 'b'), (1, 1, NULL), (1, 1, 'b'), (1, 1, 'b'), (2, 1, 'a'), (2, 1, 'b'), (2, 2, 'a'), (2, 2, 'b'), (2, 3, 'c'),(1,3,'b');
+insert into t1 select * from t1;
explain select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 22 NULL 2 Using where; Using index
+1 SIMPLE t1 range a a 22 NULL 3 Using where; Using index
select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc;
a b c
1 NULL b
+1 NULL b
explain select * from t1 where a >= 1 and a < 3 order by a desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 10 Using where; Using index
+1 SIMPLE t1 range a a 4 NULL 22 Using where; Using index
select * from t1 where a >= 1 and a < 3 order by a desc;
a b c
2 3 c
+2 3 c
+2 2 b
2 2 b
2 2 a
+2 2 a
+2 1 b
2 1 b
2 1 a
+2 1 a
1 3 b
+1 3 b
+1 1 b
+1 1 b
1 1 b
1 1 b
1 1 NULL
+1 1 NULL
+1 NULL b
1 NULL b
1 NULL NULL
+1 NULL NULL
explain select * from t1 where a = 1 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 4 const 5 Using where; Using index
+1 SIMPLE t1 ref a a 4 const 12 Using where; Using index
select * from t1 where a = 1 order by a desc, b desc;
a b c
1 3 b
+1 3 b
+1 1 b
+1 1 b
1 1 b
1 1 b
1 1 NULL
+1 1 NULL
+1 NULL b
1 NULL b
1 NULL NULL
+1 NULL NULL
explain select * from t1 where a = 1 and b is null order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 9 const,const 2 Using where; Using index; Using filesort
+1 SIMPLE t1 ref a a 9 const,const 4 Using where; Using index; Using filesort
select * from t1 where a = 1 and b is null order by a desc, b desc;
a b c
1 NULL NULL
+1 NULL NULL
+1 NULL b
1 NULL b
explain select * from t1 where a >= 1 and a < 3 and b >0 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 8 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 18 Using where; Using index
explain select * from t1 where a = 2 and b >0 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 10 Using where; Using index
explain select * from t1 where a = 2 and b is null order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 9 const,const 1 Using where; Using index; Using filesort
explain select * from t1 where a = 2 and (b is null or b > 0) order by a
desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 6 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 11 Using where; Using index
explain select * from t1 where a = 2 and b > 0 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 10 Using where; Using index
explain select * from t1 where a = 2 and b < 2 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 2 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 4 Using where; Using index
explain select * from t1 where a = 1 order by b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 4 const 5 Using where; Using index
+1 SIMPLE t1 ref a a 4 const 12 Using where; Using index
explain select * from t1 where a = 2 and b > 0 order by a desc,b desc,b,a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 10 Using where; Using index
explain select * from t1 where a = 2 and b < 2 order by a desc,a,b desc,a,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 2 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 4 Using where; Using index
select * from t1 where a = 1 order by b desc;
a b c
1 3 b
+1 3 b
+1 1 b
+1 1 b
1 1 b
1 1 b
1 1 NULL
+1 1 NULL
+1 NULL b
1 NULL b
1 NULL NULL
+1 NULL NULL
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
alter table t1 modify b int not null, modify c varchar(10) not null;
Warnings:
@@ -377,91 +404,146 @@ Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'c' at row 1
Warning 1265 Data truncated for column 'b' at row 2
Warning 1265 Data truncated for column 'c' at row 3
+Warning 1265 Data truncated for column 'b' at row 12
+Warning 1265 Data truncated for column 'c' at row 12
+Warning 1265 Data truncated for column 'b' at row 13
+Warning 1265 Data truncated for column 'c' at row 14
explain select * from t1 order by a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 20 NULL 11 Using index
+1 SIMPLE t1 index NULL a 20 NULL 22 Using index
select * from t1 order by a, b, c;
a b c
1 0
+1 0
+1 0 b
1 0 b
1 1
+1 1
1 1 b
1 1 b
+1 1 b
+1 1 b
+1 3 b
1 3 b
2 1 a
+2 1 a
+2 1 b
2 1 b
2 2 a
+2 2 a
2 2 b
+2 2 b
+2 3 c
2 3 c
explain select * from t1 order by a desc, b desc, c desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 20 NULL 11 Using index
+1 SIMPLE t1 index NULL a 20 NULL 22 Using index
select * from t1 order by a desc, b desc, c desc;
a b c
2 3 c
+2 3 c
2 2 b
+2 2 b
+2 2 a
2 2 a
2 1 b
+2 1 b
2 1 a
+2 1 a
+1 3 b
1 3 b
1 1 b
1 1 b
+1 1 b
+1 1 b
+1 1
1 1
1 0 b
+1 0 b
+1 0
1 0
explain select * from t1 where (a = 1 and b = 1 and c = 'b') or (a > 2) order by a desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 20 NULL 3 Using where; Using index
+1 SIMPLE t1 range a a 20 NULL 5 Using where; Using index
select * from t1 where (a = 1 and b = 1 and c = 'b') or (a > 2) order by a desc;
a b c
1 1 b
1 1 b
+1 1 b
+1 1 b
explain select * from t1 where a < 2 and b <= 1 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 range a a 4 NULL 12 Using where; Using index
select * from t1 where a < 2 and b <= 1 order by a desc, b desc;
a b c
1 1 b
1 1 b
+1 1 b
+1 1 b
1 1
+1 1
+1 0 b
1 0 b
1 0
+1 0
select count(*) from t1 where a < 5 and b > 0;
count(*)
-9
+18
select * from t1 where a < 5 and b > 0 order by a desc,b desc;
a b c
2 3 c
+2 3 c
2 2 b
+2 2 b
+2 2 a
2 2 a
2 1 b
+2 1 b
2 1 a
+2 1 a
+1 3 b
1 3 b
1 1 b
1 1 b
+1 1 b
+1 1 b
+1 1
1 1
explain select * from t1 where a between 1 and 3 and b <= 1 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 8 NULL 10 Using where; Using index
+1 SIMPLE t1 range a a 8 NULL 22 Using where; Using index
select * from t1 where a between 1 and 3 and b <= 1 order by a desc, b desc;
a b c
2 1 b
+2 1 b
2 1 a
+2 1 a
+1 1 b
1 1 b
1 1 b
+1 1 b
+1 1
1 1
1 0 b
+1 0 b
+1 0
1 0
explain select * from t1 where a between 0 and 1 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 4 NULL 12 Using where; Using index
select * from t1 where a between 0 and 1 order by a desc, b desc;
a b c
1 3 b
+1 3 b
+1 1 b
1 1 b
1 1 b
+1 1 b
+1 1
1 1
1 0 b
+1 0 b
+1 0
1 0
drop table t1;
CREATE TABLE t1 (
@@ -621,10 +703,10 @@ DS-MRR: use two IGNORE INDEX queries, otherwise we get cost races, because
DS-MRR: records_in_range/read_time return the same numbers for all three indexes
EXPLAIN SELECT * FROM t1 IGNORE INDEX (LongField, StringField) WHERE FieldKey > '2' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range FieldKey FieldKey 38 NULL 4 Using index condition; Using filesort
+1 SIMPLE t1 range FieldKey FieldKey 38 NULL 3 Using index condition; Using filesort
EXPLAIN SELECT * FROM t1 IGNORE INDEX (FieldKey, LongField) WHERE FieldKey > '2' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range StringField StringField 38 NULL 4 Using where; Using filesort
+1 SIMPLE t1 range StringField StringField 38 NULL 3 Using where; Using filesort
SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
FieldKey LongVal StringVal
3 1 2
@@ -632,7 +714,7 @@ FieldKey LongVal StringVal
3 3 3
EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range FieldKey,LongField,StringField LongField 38 NULL 4 Using where
+1 SIMPLE t1 range FieldKey,LongField,StringField LongField 38 NULL 3 Using where
SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal;
FieldKey LongVal StringVal
3 1 2
@@ -654,7 +736,7 @@ insert into t1 values (2, 1), (1, 1), (4, NULL), (3, NULL), (6, 2), (5, 2);
insert into t1 values (12, 11), (11, 11), (14, 3), (13, 5), (16, 12), (15, 12);
explain select * from t1 where b=1 or b is null order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null b b 5 const 4 Using index condition; Using where; Using filesort
+1 SIMPLE t1 ref_or_null b b 5 const 4 Using index condition; Using filesort
select * from t1 where b=1 or b is null order by a;
a b
1 1
@@ -663,7 +745,7 @@ a b
4 NULL
explain select * from t1 where b=2 or b is null order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null b b 5 const 3 Using index condition; Using where; Using filesort
+1 SIMPLE t1 ref_or_null b b 5 const 4 Using index condition; Using filesort
select * from t1 where b=2 or b is null order by a;
a b
3 NULL
@@ -786,8 +868,6 @@ key `wnid` (`wnid`)
) engine=myisam default charset=latin1;
insert into t1 (`sid`, `wnid`) values
('10100','01019000000'),('37986','01019000000'),('37987','01019010000'),
-('39560','01019090000'),('37989','01019000000'),('37990','01019011000'),
-('37991','01019011000'),('37992','01019019000'),('37993','01019030000'),
('37994','01019090000'),('475','02070000000'),('25253','02071100000'),
('25255','02071100000'),('25256','02071110000'),('25258','02071130000'),
('25259','02071190000'),('25260','02071200000'),('25261','02071210000'),
@@ -802,18 +882,12 @@ insert into t1 (`sid`, `wnid`) values
('25295','02071491000'),('25296','02071491000'),('25297','02071499000');
explain select * from t1 where wnid like '0101%' order by wnid;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range wnid14,wnid wnid 13 NULL 10 Using where
+1 SIMPLE t1 range wnid14,wnid wnid 13 NULL 4 Using where
select * from t1 where wnid like '0101%' order by wnid;
sid wnid
10100 01019000000
37986 01019000000
-37989 01019000000
37987 01019010000
-37990 01019011000
-37991 01019011000
-37992 01019019000
-37993 01019030000
-39560 01019090000
37994 01019090000
drop table t1;
CREATE TABLE t1 (a int);
@@ -2853,7 +2927,7 @@ explain
select b, count(*) num_cnt from t1
where a > 9750 group by b order by num_cnt;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx1 idx1 5 NULL 502 Using where; Using index; Using temporary; Using filesort
+1 SIMPLE t1 range idx1 idx1 5 NULL 503 Using where; Using index; Using temporary; Using filesort
flush status;
select b, count(*) num_cnt from t1
where a > 9750 group by b order by num_cnt;
@@ -2872,7 +2946,7 @@ explain
select b, count(*) num_cnt from t1
where a > 9750 group by b order by num_cnt limit 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx1 idx1 5 NULL 502 Using where; Using index; Using temporary; Using filesort
+1 SIMPLE t1 range idx1 idx1 5 NULL 503 Using where; Using index; Using temporary; Using filesort
flush status;
select b, count(*) num_cnt from t1
where a > 9750 group by b order by num_cnt limit 1;
@@ -3036,15 +3110,17 @@ KEY id_234_date (id2,id3,id4,date)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
# t2 has a "good" index declaration order
INSERT INTO t1 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
+INSERT INTO t1 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
+INSERT INTO t2 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
INSERT INTO t2 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
# The following two must both use id_23_date and no "using filesort":
EXPLAIN SELECT id1 FROM t1 WHERE id2=1 AND id3=1 ORDER BY date DESC LIMIT 0,4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range id_234_date,id_23_date id_23_date 2 NULL 3 Using where
+1 SIMPLE t1 range id_234_date,id_23_date id_23_date 2 NULL 8 Using where
# See above query
EXPLAIN SELECT id1 FROM t2 WHERE id2=1 AND id3=1 ORDER BY date DESC LIMIT 0,4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref id_23_date,id_234_date id_23_date 2 const,const 3 Using where
+1 SIMPLE t2 ref id_23_date,id_234_date id_23_date 2 const,const 8 Using where
drop table t1,t2;
#
# MDEV-8989: ORDER BY optimizer ignores equality propagation
@@ -3418,9 +3494,9 @@ WHERE books.library_id = 8663 AND
books.scheduled_for_removal=0 )
ORDER BY wings.id;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1 100.00 Using temporary; Using filesort
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00 Using temporary; Using filesort
1 PRIMARY wings eq_ref PRIMARY PRIMARY 4 test.books.wings_id 1 100.00
-2 MATERIALIZED books ref library_idx library_idx 4 const 1 100.00 Using where
+2 MATERIALIZED books ref library_idx library_idx 4 const 2 100.00 Using where
Warnings:
Note 1003 select `test`.`wings`.`id` AS `wing_id`,`test`.`wings`.`department_id` AS `department_id` from `test`.`wings` semi join (`test`.`books`) where `test`.`books`.`library_id` = 8663 and `test`.`books`.`scheduled_for_removal` = 0 and `test`.`wings`.`id` = `test`.`books`.`wings_id` order by `test`.`wings`.`id`
set optimizer_switch= @save_optimizer_switch;
@@ -3467,8 +3543,8 @@ create table t1 (a int);
insert into t1 values (3), (7), (1);
explain (select a from t1 limit 2) order by a desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-NULL UNIT RESULT <unit1> ALL NULL NULL NULL NULL NULL Using filesort
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 3
(select a from t1 limit 2) order by a desc;
a
7
@@ -3477,8 +3553,8 @@ create table t2 (a int, b int);
insert into t2 values (3,70), (7,10), (1,40), (4,30);
explain (select b,a from t2 order by a limit 3) order by b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using filesort
-NULL UNIT RESULT <unit1> ALL NULL NULL NULL NULL NULL Using filesort
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using filesort
+2 DERIVED t2 ALL NULL NULL NULL NULL 4 Using filesort
(select b,a from t2 order by a limit 3) order by b desc;
b a
70 3
@@ -3587,3 +3663,41 @@ LIMIT 1)
909-9-123456
drop table t1,t2;
# End of 10.3 tests
+#
+# MDEV-17761: Odd optimizer choice with ORDER BY LIMIT and condition selectivity
+#
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2(a int);
+insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C;
+create table t3(a int);
+insert into t3 select A.a + 1000 *B.a from t2 A, t1 B;
+create table t4 (
+a int,
+b int,
+c int,
+filler1 char(255),
+filler2 char(255),
+key(a)
+);
+insert into t4 select a,a,a, a,a from t3;
+set @tmp_h=@@histogram_size, @tmp_ht=@@histogram_type, @tmp_u=@@use_stat_tables,
+@tmp_o=@@optimizer_use_condition_selectivity;
+set histogram_size=100, histogram_type='single_prec_hb';
+set use_stat_tables=preferably;
+set optimizer_use_condition_selectivity=4;
+analyze table t4 persistent for columns(b) indexes ();
+Table Op Msg_type Msg_text
+test.t4 analyze status Engine-independent statistics collected
+test.t4 analyze status Table is already up to date
+# rows must be around 1200, not 600:
+explain extended
+select * from t4 where b < 5000 order by a limit 600;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t4 index NULL a 5 NULL 1188 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`filler1` AS `filler1`,`test`.`t4`.`filler2` AS `filler2` from `test`.`t4` where `test`.`t4`.`b` < 5000 order by `test`.`t4`.`a` limit 600
+set histogram_size=@tmp_h, histogram_type=@tmp_ht, use_stat_tables=@tmp_u,
+optimizer_use_condition_selectivity=@tmp_o;
+drop table t1,t2,t3,t4;
+# End of 10.4 tests
diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test
index 17b307208e0..9ba2b49a5a8 100644
--- a/mysql-test/main/order_by.test
+++ b/mysql-test/main/order_by.test
@@ -248,6 +248,7 @@ drop table t1;
create table t1 (a int not null, b int, c varchar(10), key (a, b, c));
insert into t1 values (1, NULL, NULL), (1, NULL, 'b'), (1, 1, NULL), (1, 1, 'b'), (1, 1, 'b'), (2, 1, 'a'), (2, 1, 'b'), (2, 2, 'a'), (2, 2, 'b'), (2, 3, 'c'),(1,3,'b');
+insert into t1 select * from t1;
explain select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc;
select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc;
@@ -553,8 +554,6 @@ create table t1 (
insert into t1 (`sid`, `wnid`) values
('10100','01019000000'),('37986','01019000000'),('37987','01019010000'),
-('39560','01019090000'),('37989','01019000000'),('37990','01019011000'),
-('37991','01019011000'),('37992','01019019000'),('37993','01019030000'),
('37994','01019090000'),('475','02070000000'),('25253','02071100000'),
('25255','02071100000'),('25256','02071110000'),('25258','02071130000'),
('25259','02071190000'),('25260','02071200000'),('25261','02071210000'),
@@ -2041,6 +2040,8 @@ CREATE TABLE t2 (
--echo # t2 has a "good" index declaration order
INSERT INTO t1 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
+INSERT INTO t1 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
+INSERT INTO t2 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
INSERT INTO t2 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1);
--echo # The following two must both use id_23_date and no "using filesort":
@@ -2397,3 +2398,41 @@ eval $query;
drop table t1,t2;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-17761: Odd optimizer choice with ORDER BY LIMIT and condition selectivity
+--echo #
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2(a int);
+insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C;
+create table t3(a int);
+insert into t3 select A.a + 1000 *B.a from t2 A, t1 B;
+
+create table t4 (
+ a int,
+ b int,
+ c int,
+ filler1 char(255),
+ filler2 char(255),
+ key(a)
+);
+insert into t4 select a,a,a, a,a from t3;
+
+set @tmp_h=@@histogram_size, @tmp_ht=@@histogram_type, @tmp_u=@@use_stat_tables,
+ @tmp_o=@@optimizer_use_condition_selectivity;
+set histogram_size=100, histogram_type='single_prec_hb';
+set use_stat_tables=preferably;
+set optimizer_use_condition_selectivity=4;
+analyze table t4 persistent for columns(b) indexes ();
+
+--echo # rows must be around 1200, not 600:
+explain extended
+select * from t4 where b < 5000 order by a limit 600;
+
+set histogram_size=@tmp_h, histogram_type=@tmp_ht, use_stat_tables=@tmp_u,
+ optimizer_use_condition_selectivity=@tmp_o;
+
+drop table t1,t2,t3,t4;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/outfile_loaddata.result b/mysql-test/main/outfile_loaddata.result
index 1449cb19453..4356f8b113e 100644
--- a/mysql-test/main/outfile_loaddata.result
+++ b/mysql-test/main/outfile_loaddata.result
@@ -124,16 +124,19 @@ ERROR 42000: Field separator argument is not what is expected; check the manual
# LOAD DATA rises error or has unpredictable result -- to be fixed later
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ENCLOSED BY 'ÑŠ';
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1638 Non-ASCII separator arguments are not fully supported
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ÑŠ';
ERROR 42000: Field separator argument is not what is expected; check the manual
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ESCAPED BY 'ÑŠ';
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1638 Non-ASCII separator arguments are not fully supported
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ÑŠ';
ERROR 42000: Field separator argument is not what is expected; check the manual
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS TERMINATED BY 'ÑŠ';
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1638 Non-ASCII separator arguments are not fully supported
##################################################
1ÑŠABC-áâ÷ÑŠDEF-ÂÃÄ
@@ -157,6 +160,7 @@ a b c
2 NULL NULL
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES STARTING BY 'ÑŠ';
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1638 Non-ASCII separator arguments are not fully supported
##################################################
ÑŠ1 ABC-áâ÷ DEF-ÂÃÄ
@@ -172,6 +176,7 @@ a b c
2 NULL NULL
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES TERMINATED BY 'ÑŠ';
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1638 Non-ASCII separator arguments are not fully supported
##################################################
1 ABC-áâ÷ DEF-ÂÃÄÑŠ2 \N \NÑŠ##################################################
diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result
index 7bb37e78fa5..d1af5636b25 100644
--- a/mysql-test/main/parser.result
+++ b/mysql-test/main/parser.result
@@ -705,6 +705,9 @@ FOR UPDATE;
1
1
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
+PROCEDURE ANALYSE();
+ERROR HY000: Can't use ORDER clause with this procedure
+SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
PROCEDURE ANALYSE() FOR UPDATE;
ERROR HY000: Can't use ORDER clause with this procedure
SELECT 1 FROM
@@ -734,7 +737,7 @@ SELECT 1 FROM t1
UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
PROCEDURE ANALYSE() FOR UPDATE;
-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 'PROCEDURE ANALYSE() FOR UPDATE' at line 4
+ERROR 42000: Incorrect usage/placement of 'PROCEDURE'
SELECT 1 FROM DUAL PROCEDURE ANALYSE()
UNION
SELECT 1 FROM t1;
@@ -754,15 +757,18 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
# "FOR UPDATE" tests
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
1
-SELECT 1 FROM t1 FOR UPDATE UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
+(SELECT 1 FROM t1 FOR UPDATE) UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
1
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 FOR UPDATE;
1
# "INTO" clause tests
SELECT 1 FROM t1 INTO @var17727401;
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1329 No data - zero rows fetched, selected, or processed
SELECT 1 FROM DUAL INTO @var17727401;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT 1 INTO @var17727401;
SELECT 1 INTO @var17727401 FROM t1;
Warnings:
@@ -778,6 +784,7 @@ Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
SELECT 1 FROM t1 WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1 INTO @var17727401;
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1329 No data - zero rows fetched, selected, or processed
SELECT 1 FROM t1 WHERE 1 INTO @var17727401 GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1' at line 1
@@ -794,31 +801,20 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT 1 FROM t1 INTO @var17727401 UNION SELECT 1 FROM t1 INTO t1;
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 'UNION SELECT 1 FROM t1 INTO t1' at line 1
(SELECT 1 FROM t1 INTO @var17727401) UNION (SELECT 1 FROM t1 INTO t1);
-ERROR HY000: Incorrect usage of UNION and INTO
+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 'INTO @var17727401) UNION (SELECT 1 FROM t1 INTO t1)' at line 1
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 INTO @var17727401;
Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
Warning 1329 No data - zero rows fetched, selected, or processed
SELECT 1 INTO @var17727401 FROM t1 PROCEDURE ANALYSE();
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 'PROCEDURE ANALYSE()' at line 1
SELECT 1 FROM t1 PROCEDURE ANALYSE() INTO @var17727401;
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 'INTO @var17727401' at line 1
# ORDER and LIMIT clause combinations
-(SELECT 1 FROM t1 ORDER BY 1) ORDER BY 1;
-1
-(SELECT 1 FROM t1 LIMIT 1) LIMIT 1;
-1
-((SELECT 1 FROM t1 ORDER BY 1) ORDER BY 1) ORDER BY 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY 1) ORDER BY 1' at line 1
-((SELECT 1 FROM t1 LIMIT 1) LIMIT 1) LIMIT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1) LIMIT 1' at line 1
-(SELECT 1 FROM t1 ORDER BY 1) LIMIT 1;
-1
-(SELECT 1 FROM t1 LIMIT 1) ORDER BY 1;
-1
((SELECT 1 FROM t1 ORDER BY 1) LIMIT 1) ORDER BY 1);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1) ORDER BY 1)' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
((SELECT 1 FROM t1 LIMIT 1) ORDER BY 1) LIMIT 1);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY 1) LIMIT 1)' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1;
1
SELECT (SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1);
@@ -1260,19 +1256,27 @@ CREATE TABLE t1 (i INT);
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10));
-ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+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 'PROCEDURE ANALYSE(10, 10))
+UNION
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))' at line 1
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
SELECT * FROM t1 PROCEDURE ANALYSE(10, 10);
-ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+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 'PROCEDURE ANALYSE(10, 10))
+UNION
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)' at line 1
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
(SELECT 1);
-ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+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 'PROCEDURE ANALYSE(10, 10))
+UNION
+(SELECT 1)' at line 1
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
SELECT 1;
-ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+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 'PROCEDURE ANALYSE(10, 10))
+UNION
+SELECT 1' at line 1
SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
UNION
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10));
@@ -1867,3 +1871,229 @@ EXECUTE IMMEDIATE 'CREATE PROCEDURE p() UPDATE t SET c=\'\'"abc';
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 '"abc' at line 1
SET @@sql_mode=@save_sql_mode;
# End of 10.3 tests
+#
+# MDEV-19540: 10.4 allow lock options with SELECT in brackets
+# which previous version do not
+#
+create table t1 (a int);
+(select * from t1) for update;
+a
+(select * from t1) union (select * from t1) for update;
+ERROR HY000: Incorrect usage of lock options and SELECT in brackets
+(select * from t1 for update);
+a
+select * from t1 for update;
+a
+drop table t1;
+#
+# MDEV-20108: [ERROR] mysqld got signal 11 in
+# st_select_lex::add_table_to_list
+#
+CREATE TABLE t1 (c1 INT NULL);
+CREATE TABLE t2 (c1 INT NULL);
+SET STATEMENT max_statement_time=900 FOR LOCK TABLES `t1` WRITE;
+select * from t1;
+c1
+select * from t2;
+ERROR HY000: Table 't2' was not locked with LOCK TABLES
+SET STATEMENT max_statement_time=900 FOR unlock tables;
+drop table t1, t2;
+#
+# MDEV-21616: Server crash when using
+# "SET STATEMENT max_statement_time=0 FOR desc xxx" lead to collapse
+#
+create table t1 (a int);
+SET STATEMENT max_statement_time=0 FOR desc t1;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+drop table t1;
+SET STATEMENT max_statement_time=0 FOR do 1;
+set @save_sql_mode=@@SQL_MODE;
+set SQL_MODE=ORACLE;
+create table t1 (a int);
+SET STATEMENT max_statement_time=0 FOR desc t1;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+drop table t1;
+SET STATEMENT max_statement_time=0 FOR do 1;
+set SQL_MODE=@save_sql_mode;
+#
+# MDEV-21684: mysqld crash with signal 11 when renaming
+# table+max_statement_time
+#
+SET STATEMENT max_statement_time=180 FOR RENAME TABLE bleh TO blah;
+ERROR 42S02: Table 'test.bleh' doesn't exist
+SET STATEMENT max_statement_time=180 FOR load index into cache t1_base;
+Table Op Msg_type Msg_text
+test.t1_base preload_keys Error Table 'test.t1_base' doesn't exist
+test.t1_base preload_keys status Operation failed
+SET STATEMENT max_statement_time=180 FOR DROP INDEX i1 ON t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.t1;
+SET STATEMENT max_statement_time=180 FOR BACKUP UNLOCK;
+set @save_sql_mode=@@SQL_MODE;
+set SQL_MODE=ORACLE;
+SET STATEMENT max_statement_time=180 FOR RENAME TABLE bleh TO blah;
+ERROR 42S02: Table 'test.bleh' doesn't exist
+SET STATEMENT max_statement_time=180 FOR load index into cache t1_base;
+Table Op Msg_type Msg_text
+test.t1_base preload_keys Error Table 'test.t1_base' doesn't exist
+test.t1_base preload_keys status Operation failed
+SET STATEMENT max_statement_time=180 FOR DROP INDEX i1 ON t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.t1;
+SET STATEMENT max_statement_time=180 FOR BACKUP UNLOCK;
+set SQL_MODE=@save_sql_mode;
+#
+# MDEV-21997: Server crashes in LEX::create_item_ident_sp
+# upon use of unknown identifier
+#
+/*! IF 1 IN ( SELECT 2 ) OR foo = 3 THEN */ SELECT 4;
+ERROR 42000: Undeclared variable: foo
+BEGIN NOT ATOMIC
+IF (SELECT 2) OR foo = 3 THEN
+SELECT 4;
+END IF ;
+END;
+$$
+ERROR 42000: Undeclared variable: foo
+# ... but if declare it then it still work
+BEGIN NOT ATOMIC
+DECLARE foo int;
+IF (SELECT 2) OR foo = 3 THEN
+SELECT 4;
+END IF ;
+END;
+$$
+4
+4
+CASE (SELECT 2) OR foo
+WHEN 1 THEN
+SET @x=10;
+$$
+ERROR 42000: Undeclared variable: foo
+/*! WHILE (SELECT 2) OR foo */
+SET @x=10;
+END WHILE;
+$$
+ERROR 42000: Undeclared variable: foo
+REPEAT
+SET @x=10;
+UNTIL (SELECT 2) OR foo
+END REPEAT;
+$$
+ERROR 42000: Undeclared variable: foo
+FOR i IN 1..(SELECT 2) OR foo
+DO
+SET @x=10;
+END FOR;
+$$
+ERROR 42000: Undeclared variable: foo
+# ... but automatic FOR variable still work
+FOR i IN 1..2
+DO
+SELECT i;
+END FOR;
+$$
+i
+1
+i
+2
+#
+# MDEV-21998: Server crashes in st_select_lex::add_table_to_list
+# upon mix of KILL and sequences
+#
+KILL ( SELECT 1 ) + LASTVAL(s);
+ERROR 42000: KILL does not support subqueries or stored functions
+KILL LASTVAL(s);
+ERROR 42000: KILL does not support subqueries or stored functions
+#
+# MDEV-23094: Multiple calls to a Stored Procedure from another
+# Stored Procedure crashes server
+#
+create table t1 (id1 int primary key, data1 int);
+create table t2 (id2 int primary key, data2 int);
+create procedure p1(IN id int, IN dt int)
+begin
+if (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt))
+then
+select 1;
+end if;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(IN id int, IN dt int)
+begin
+case (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt))
+when 1 then
+select 1;
+else
+select 0;
+end case;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(IN id int, IN dt int)
+begin
+declare wcont int default 1;
+while (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt)) and wcont
+do
+select 1;
+set wcont=0;
+end while;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(IN id int, IN dt int)
+begin
+declare count int default 1;
+repeat
+select 1;
+set count=count+1;
+until (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt)) and
+count < 3
+end repeat;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(IN id int, IN dt int)
+begin
+for i in 1..(exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt))
+do
+select 1;
+end for;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+drop table t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test
index ca97398d8b6..5ffd379cefd 100644
--- a/mysql-test/main/parser.test
+++ b/mysql-test/main/parser.test
@@ -826,6 +826,9 @@ SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
--error ER_ORDER_WITH_PROC
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
+ PROCEDURE ANALYSE();
+--error ER_ORDER_WITH_PROC
+SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
PROCEDURE ANALYSE() FOR UPDATE;
SELECT 1 FROM
@@ -851,7 +854,7 @@ UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
FOR UPDATE;
---error ER_PARSE_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT 1 FROM t1
UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
@@ -876,7 +879,7 @@ UNION
--echo # "FOR UPDATE" tests
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
-SELECT 1 FROM t1 FOR UPDATE UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
+(SELECT 1 FROM t1 FOR UPDATE) UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 FOR UPDATE;
@@ -916,7 +919,7 @@ SELECT EXISTS(SELECT 1 FROM t1 INTO @var17727401);
--error ER_PARSE_ERROR
SELECT 1 FROM t1 INTO @var17727401 UNION SELECT 1 FROM t1 INTO t1;
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
(SELECT 1 FROM t1 INTO @var17727401) UNION (SELECT 1 FROM t1 INTO t1);
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 INTO @var17727401;
@@ -931,16 +934,16 @@ SELECT 1 FROM t1 PROCEDURE ANALYSE() INTO @var17727401;
# Limited support for (SELECT ...) ORDER/LIMIT:
-(SELECT 1 FROM t1 ORDER BY 1) ORDER BY 1;
-(SELECT 1 FROM t1 LIMIT 1) LIMIT 1;
+# (SELECT 1 FROM t1 ORDER BY 1) ORDER BY 1;
+# (SELECT 1 FROM t1 LIMIT 1) LIMIT 1;
---error ER_PARSE_ERROR
-((SELECT 1 FROM t1 ORDER BY 1) ORDER BY 1) ORDER BY 1;
---error ER_PARSE_ERROR
-((SELECT 1 FROM t1 LIMIT 1) LIMIT 1) LIMIT 1;
+#--error ER_PARSE_ERROR
+# ((SELECT 1 FROM t1 ORDER BY 1) ORDER BY 1) ORDER BY 1;
+#--error ER_PARSE_ERROR
+# ((SELECT 1 FROM t1 LIMIT 1) LIMIT 1) LIMIT 1;
-(SELECT 1 FROM t1 ORDER BY 1) LIMIT 1;
-(SELECT 1 FROM t1 LIMIT 1) ORDER BY 1;
+# (SELECT 1 FROM t1 ORDER BY 1) LIMIT 1;
+# (SELECT 1 FROM t1 LIMIT 1) ORDER BY 1;
--error ER_PARSE_ERROR
((SELECT 1 FROM t1 ORDER BY 1) LIMIT 1) ORDER BY 1);
@@ -1281,22 +1284,22 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (i INT);
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10));
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
SELECT * FROM t1 PROCEDURE ANALYSE(10, 10);
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
(SELECT 1);
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
UNION
SELECT 1;
@@ -1647,3 +1650,246 @@ EXECUTE IMMEDIATE 'CREATE PROCEDURE p() UPDATE t SET c=\'\'"abc';
SET @@sql_mode=@save_sql_mode;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-19540: 10.4 allow lock options with SELECT in brackets
+--echo # which previous version do not
+--echo #
+
+create table t1 (a int);
+(select * from t1) for update;
+--error ER_WRONG_USAGE
+(select * from t1) union (select * from t1) for update;
+(select * from t1 for update);
+select * from t1 for update;
+drop table t1;
+
+--echo #
+--echo # MDEV-20108: [ERROR] mysqld got signal 11 in
+--echo # st_select_lex::add_table_to_list
+--echo #
+CREATE TABLE t1 (c1 INT NULL);
+CREATE TABLE t2 (c1 INT NULL);
+
+SET STATEMENT max_statement_time=900 FOR LOCK TABLES `t1` WRITE;
+select * from t1;
+--error ER_TABLE_NOT_LOCKED
+select * from t2;
+SET STATEMENT max_statement_time=900 FOR unlock tables;
+drop table t1, t2;
+
+--echo #
+--echo # MDEV-21616: Server crash when using
+--echo # "SET STATEMENT max_statement_time=0 FOR desc xxx" lead to collapse
+--echo #
+
+create table t1 (a int);
+SET STATEMENT max_statement_time=0 FOR desc t1;
+drop table t1;
+SET STATEMENT max_statement_time=0 FOR do 1;
+
+set @save_sql_mode=@@SQL_MODE;
+set SQL_MODE=ORACLE;
+create table t1 (a int);
+SET STATEMENT max_statement_time=0 FOR desc t1;
+drop table t1;
+SET STATEMENT max_statement_time=0 FOR do 1;
+set SQL_MODE=@save_sql_mode;
+
+
+--echo #
+--echo # MDEV-21684: mysqld crash with signal 11 when renaming
+--echo # table+max_statement_time
+--echo #
+
+--error ER_NO_SUCH_TABLE
+SET STATEMENT max_statement_time=180 FOR RENAME TABLE bleh TO blah;
+SET STATEMENT max_statement_time=180 FOR load index into cache t1_base;
+--error ER_NO_SUCH_TABLE
+SET STATEMENT max_statement_time=180 FOR DROP INDEX i1 ON t1;
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.t1;
+SET STATEMENT max_statement_time=180 FOR BACKUP UNLOCK;
+
+set @save_sql_mode=@@SQL_MODE;
+set SQL_MODE=ORACLE;
+--error ER_NO_SUCH_TABLE
+SET STATEMENT max_statement_time=180 FOR RENAME TABLE bleh TO blah;
+SET STATEMENT max_statement_time=180 FOR load index into cache t1_base;
+--error ER_NO_SUCH_TABLE
+SET STATEMENT max_statement_time=180 FOR DROP INDEX i1 ON t1;
+SET STATEMENT max_statement_time=180 FOR BACKUP LOCK test.t1;
+SET STATEMENT max_statement_time=180 FOR BACKUP UNLOCK;
+set SQL_MODE=@save_sql_mode;
+
+
+--echo #
+--echo # MDEV-21997: Server crashes in LEX::create_item_ident_sp
+--echo # upon use of unknown identifier
+--echo #
+
+--error ER_SP_UNDECLARED_VAR
+/*! IF 1 IN ( SELECT 2 ) OR foo = 3 THEN */ SELECT 4;
+
+
+DELIMITER $$;
+
+--error ER_SP_UNDECLARED_VAR
+BEGIN NOT ATOMIC
+ IF (SELECT 2) OR foo = 3 THEN
+ SELECT 4;
+ END IF ;
+END;
+$$
+
+--echo # ... but if declare it then it still work
+BEGIN NOT ATOMIC
+ DECLARE foo int;
+ IF (SELECT 2) OR foo = 3 THEN
+ SELECT 4;
+ END IF ;
+END;
+$$
+
+--error ER_SP_UNDECLARED_VAR
+CASE (SELECT 2) OR foo
+WHEN 1 THEN
+ SET @x=10;
+$$
+
+--error ER_SP_UNDECLARED_VAR
+/*! WHILE (SELECT 2) OR foo */
+ SET @x=10;
+END WHILE;
+$$
+
+--error ER_SP_UNDECLARED_VAR
+REPEAT
+ SET @x=10;
+UNTIL (SELECT 2) OR foo
+END REPEAT;
+$$
+
+--error ER_SP_UNDECLARED_VAR
+FOR i IN 1..(SELECT 2) OR foo
+DO
+ SET @x=10;
+END FOR;
+$$
+
+--echo # ... but automatic FOR variable still work
+FOR i IN 1..2
+DO
+ SELECT i;
+END FOR;
+$$
+
+DELIMITER ;$$
+
+--echo #
+--echo # MDEV-21998: Server crashes in st_select_lex::add_table_to_list
+--echo # upon mix of KILL and sequences
+--echo #
+
+--error ER_SUBQUERIES_NOT_SUPPORTED
+KILL ( SELECT 1 ) + LASTVAL(s);
+--error ER_SUBQUERIES_NOT_SUPPORTED
+KILL LASTVAL(s);
+
+--echo #
+--echo # MDEV-23094: Multiple calls to a Stored Procedure from another
+--echo # Stored Procedure crashes server
+--echo #
+
+create table t1 (id1 int primary key, data1 int);
+create table t2 (id2 int primary key, data2 int);
+
+delimiter //;
+create procedure p1(IN id int, IN dt int)
+begin
+ if (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt))
+ then
+ select 1;
+ end if;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(IN id int, IN dt int)
+begin
+case (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt))
+when 1 then
+ select 1;
+else
+ select 0;
+end case;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(IN id int, IN dt int)
+begin
+declare wcont int default 1;
+while (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt)) and wcont
+do
+ select 1;
+ set wcont=0;
+end while;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(IN id int, IN dt int)
+begin
+declare count int default 1;
+repeat
+ select 1;
+ set count=count+1;
+until (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt)) and
+ count < 3
+end repeat;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(IN id int, IN dt int)
+begin
+for i in 1..(exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt))
+do
+ select 1;
+end for;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+drop table t1,t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/partition.result b/mysql-test/main/partition.result
index e0243d51d0a..c07f1bcd85a 100644
--- a/mysql-test/main/partition.result
+++ b/mysql-test/main/partition.result
@@ -286,10 +286,11 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t1 1 a 1 a A NULL NULL NULL YES BTREE
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show indexes from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-t1 1 a 1 a A 1 NULL NULL YES BTREE
+t1 1 a 1 a A 2 NULL NULL YES BTREE
drop table t1;
create table t1 (a int)
partition by hash (a);
@@ -550,7 +551,7 @@ INSERT INTO `t1` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),
INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 NULL range c1 c1 5 NULL 4 Using where; Using index
+1 SIMPLE t1 NULL index c1 c1 5 NULL 20 Using where; Using index
FLUSH STATUS;
SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
c1
@@ -560,10 +561,10 @@ c1
19
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
-Handler_read_first 0
-Handler_read_key 2
+Handler_read_first 1
+Handler_read_key 0
Handler_read_last 0
-Handler_read_next 4
+Handler_read_next 20
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
@@ -571,7 +572,7 @@ Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
EXPLAIN PARTITIONS SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 a range c1 c1 5 NULL 4 Using where; Using index
+1 SIMPLE t2 a index c1 c1 5 NULL 20 Using where; Using index
FLUSH STATUS;
SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
c1
@@ -581,10 +582,10 @@ c1
19
SHOW STATUS LIKE 'Handler_read_%';
Variable_name Value
-Handler_read_first 0
-Handler_read_key 2
+Handler_read_first 1
+Handler_read_key 0
Handler_read_last 0
-Handler_read_next 4
+Handler_read_next 20
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
@@ -1029,6 +1030,7 @@ PARTITION BY LIST (a)
(PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
create table t1
@@ -1824,6 +1826,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze note The storage engine for the table doesn't support analyze
drop table t1;
drop procedure if exists mysqltest_1;
@@ -2060,6 +2063,7 @@ ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
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 'EXTENDED' at line 1
ALTER TABLE t1 ANALYZE PARTITION p1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p1;
Table Op Msg_type Msg_text
@@ -2357,7 +2361,7 @@ b c
EXPLAIN
SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range bc bc 10 NULL 7 Using where; Using index for group-by
+1 SIMPLE t1 range bc bc 10 NULL 8 Using where; Using index for group-by
DROP TABLE t1;
#
# Bug #45807: crash accessing partitioned table and sql_mode
@@ -2733,7 +2737,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p1,p2 ALL NULL NULL NULL NULL 400 Using where
explain extended select * from t2 where b=5;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 19.80 Using where
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 19.61 Using where
Warnings:
Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` = 5
explain partitions select * from t2 where b=5;
@@ -2741,7 +2745,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2,p3,p4 ALL NULL NULL NULL NULL 1000 Using where
explain extended select * from t2 partition(p0) where b=1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 200 19.80 Using where
+1 SIMPLE t2 ALL NULL NULL NULL NULL 200 19.61 Using where
Warnings:
Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` PARTITION (`p0`) where `test`.`t2`.`b` = 1
set @@use_stat_tables= @save_use_stat_tables;
diff --git a/mysql-test/main/partition_binlog.result b/mysql-test/main/partition_binlog.result
index 21eca8f1c00..3e6100b51d8 100644
--- a/mysql-test/main/partition_binlog.result
+++ b/mysql-test/main/partition_binlog.result
@@ -27,6 +27,7 @@ Table Op Msg_type Msg_text
test.t1 repair error Error in list of partitions to test.t1
ALTER TABLE t1 ANALYZE PARTITION p0;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p0;
Table Op Msg_type Msg_text
diff --git a/mysql-test/main/partition_explicit_prune.result b/mysql-test/main/partition_explicit_prune.result
index 0c102501a9d..56fd0ff569a 100644
--- a/mysql-test/main/partition_explicit_prune.result
+++ b/mysql-test/main/partition_explicit_prune.result
@@ -233,6 +233,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
+HANDLER_READ_KEY 6
HANDLER_TMP_WRITE 24
HANDLER_WRITE 2
# Should be 1 commit
@@ -315,6 +316,7 @@ a b
1000 `p100-99999`(-subp6)
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
SET @@global.innodb_stats_on_metadata=ON;
@@ -348,6 +350,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 1
+HANDLER_READ_KEY 8
HANDLER_TMP_WRITE 24
# Should be 1 commit
# 4 locks (1 ha_partition + 1 ha_innobase) x 2 (lock/unlock)
@@ -690,6 +693,8 @@ a b
-21 REPLACEd by REPLACE
FLUSH STATUS;
SELECT * FROM t1 PARTITION (pNeg, `p10-99`) INTO OUTFILE 'loadtest.txt';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
@@ -772,6 +777,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
+HANDLER_READ_KEY 8
HANDLER_READ_RND_NEXT 2
HANDLER_TMP_WRITE 24
HANDLER_UPDATE 2
@@ -1056,6 +1062,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
+HANDLER_READ_KEY 6
HANDLER_READ_NEXT 5
HANDLER_TMP_WRITE 24
HANDLER_WRITE 10
@@ -1075,6 +1082,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_READ_FIRST 5
+HANDLER_READ_KEY 6
HANDLER_ROLLBACK 1
HANDLER_TMP_WRITE 24
HANDLER_WRITE 1
@@ -1102,6 +1110,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
+HANDLER_READ_KEY 6
HANDLER_READ_NEXT 5
HANDLER_TMP_WRITE 24
HANDLER_WRITE 10
@@ -1907,3 +1916,12 @@ a b
8 2
2 6
DROP TABLE t1, t2;
+#
+# MDEV-18982: INSERT using explicit patition pruning with column list
+#
+create table t1 (a int) partition by hash(a);
+insert into t1 partition (p0) (a) values (1);
+select * from t1;
+a
+1
+drop table t1;
diff --git a/mysql-test/main/partition_explicit_prune.test b/mysql-test/main/partition_explicit_prune.test
index 0be21396148..fdbbcadd8cb 100644
--- a/mysql-test/main/partition_explicit_prune.test
+++ b/mysql-test/main/partition_explicit_prune.test
@@ -889,3 +889,12 @@ SELECT * FROM t1;
# Cleanup
DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-18982: INSERT using explicit patition pruning with column list
+--echo #
+
+create table t1 (a int) partition by hash(a);
+insert into t1 partition (p0) (a) values (1);
+select * from t1;
+drop table t1;
diff --git a/mysql-test/main/partition_innodb.result b/mysql-test/main/partition_innodb.result
index 12930ee9d56..2bb64205363 100644
--- a/mysql-test/main/partition_innodb.result
+++ b/mysql-test/main/partition_innodb.result
@@ -1,6 +1,11 @@
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
set global default_storage_engine='innodb';
set session default_storage_engine='innodb';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
drop table if exists t1, t2;
#
# Bug#13694811: THE OPTIMIZER WRONGLY USES THE FIRST
@@ -24,12 +29,16 @@ INSERT INTO t1 VALUES (0, 'Mod Zero'), (1, 'One'), (2, 'Two'), (3, 'Three'),
(20, '0'), (21, '1'), (22, '2'), (23, '3'),
(4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9');
INSERT INTO t1 SELECT a + 30, b FROM t1 WHERE a >= 0;
+INSERT INTO t1 SELECT a + 60, b FROM t1 WHERE a >= 0;
+INSERT INTO t1 SELECT a + 120, b FROM t1 WHERE a >= 0;
+INSERT INTO t1 SELECT a + 240, b FROM t1 WHERE a >= 0;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT b FROM t1 WHERE b between 'L' and 'N' AND a > -100;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b b 67 NULL 34 Using where; Using index
+1 SIMPLE t1 range PRIMARY,b b 67 NULL 90 Using where; Using index
DROP TABLE t1;
#
# Bug#13007154: Crash in keys_to_use_for_scanning with ORDER BY
@@ -571,6 +580,33 @@ DROP TABLE t1;
# Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the
# table unusable".
#
+CREATE TABLE t1 (a bigint not null, b int not null, PRIMARY KEY (a))
+ENGINE = InnoDB PARTITION BY KEY(a) PARTITIONS 2;
+INSERT INTO t1 values (0,1), (1,2);
+# The below ALTER should fail. It should leave the
+# table in its original, non-corrupted, usable state.
+ALTER TABLE t1 ADD UNIQUE KEY (b);
+ERROR HY000: A UNIQUE INDEX must include all columns in the table's partitioning function
+# The below statements should succeed, as ALTER should
+# have left table intact.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` bigint(20) NOT NULL,
+ `b` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY KEY (`a`)
+PARTITIONS 2
+SELECT * FROM t1;
+a b
+1 2
+0 1
+DROP TABLE t1;
+#
+# Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the
+# table unusable".
+#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a bigint not null, b int not null, PRIMARY KEY (a))
ENGINE = InnoDB PARTITION BY KEY(a) PARTITIONS 2;
@@ -663,7 +699,7 @@ EXPLAIN SELECT * FROM t1 WHERE col1 = 1 AND col2 = 2
AND col3 BETWEEN '2013-03-08 00:00:00' AND '2013-03-12 12:00:00'
GROUP BY 1, 2, 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,col1,col2 PRIMARY 5 NULL # Using where; Using filesort
+1 SIMPLE t1 ref PRIMARY,col1,col2 col1 8 const # Using where; Using filesort
SELECT * FROM t1 USE INDEX () WHERE col1 = 1 AND col2 = 2
AND col3 BETWEEN '2013-03-08 00:00:00' AND '2013-03-12 12:00:00'
GROUP BY 1, 2, 3;
@@ -696,9 +732,11 @@ insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
10+A.a + 10*B.a + 100*C.a + 1000*D.a,
2000 + A.a + 10*B.a + 100*C.a + 1000*D.a
from t2 A, t2 B, t2 C ,t2 D;
+set statement optimizer_switch='rowid_filter=off' for
explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,a,b b,a 4,4 NULL # Using intersect(b,a); Using where; Using index
+set statement optimizer_switch='rowid_filter=off' for
create temporary table t3 as
select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
select count(*) from t3;
@@ -996,6 +1034,9 @@ test_jfg test_jfg11
test_jfg test_jfg12#P#p1000
test_jfg test_jfg12#P#pmax
DROP DATABASE test_jfg;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
create table t1 (a int) engine=innodb;
create table t2 (
b int,
diff --git a/mysql-test/main/partition_innodb.test b/mysql-test/main/partition_innodb.test
index 6a89a0a6467..16fd7ea60ef 100644
--- a/mysql-test/main/partition_innodb.test
+++ b/mysql-test/main/partition_innodb.test
@@ -8,6 +8,13 @@ call mtr.add_suppression("Deadlock found when trying to get lock; try restarting
set global default_storage_engine='innodb';
set session default_storage_engine='innodb';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
@@ -39,6 +46,9 @@ INSERT INTO t1 VALUES (0, 'Mod Zero'), (1, 'One'), (2, 'Two'), (3, 'Three'),
(20, '0'), (21, '1'), (22, '2'), (23, '3'),
(4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9');
INSERT INTO t1 SELECT a + 30, b FROM t1 WHERE a >= 0;
+INSERT INTO t1 SELECT a + 60, b FROM t1 WHERE a >= 0;
+INSERT INTO t1 SELECT a + 120, b FROM t1 WHERE a >= 0;
+INSERT INTO t1 SELECT a + 240, b FROM t1 WHERE a >= 0;
ANALYZE TABLE t1;
EXPLAIN SELECT b FROM t1 WHERE b between 'L' and 'N' AND a > -100;
DROP TABLE t1;
@@ -644,6 +654,25 @@ OPTIMIZE TABLE t1;
SET SESSION sql_mode = @old_mode;
DROP TABLE t1;
+
+--echo #
+--echo # Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the
+--echo # table unusable".
+--echo #
+CREATE TABLE t1 (a bigint not null, b int not null, PRIMARY KEY (a))
+ ENGINE = InnoDB PARTITION BY KEY(a) PARTITIONS 2;
+INSERT INTO t1 values (0,1), (1,2);
+--echo # The below ALTER should fail. It should leave the
+--echo # table in its original, non-corrupted, usable state.
+--error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
+ALTER TABLE t1 ADD UNIQUE KEY (b);
+--echo # The below statements should succeed, as ALTER should
+--echo # have left table intact.
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
--echo #
--echo # Bug#57985 "ONLINE/FAST ALTER PARTITION can fail and leave the
--echo # table unusable".
@@ -761,8 +790,10 @@ insert into t1 select 10+A.a + 10*B.a + 100*C.a + 1000*D.a,
# This should show index_merge, using intersect
--replace_column 9 #
+set statement optimizer_switch='rowid_filter=off' for
explain select * from t1 where a=1 and b=2 and pk between 1 and 999999 ;
# 794 rows in output
+set statement optimizer_switch='rowid_filter=off' for
create temporary table t3 as
select * from t1 where a=1 and b=2 and pk between 1 and 999 ;
select count(*) from t3;
@@ -1062,6 +1093,9 @@ database_name = 'test_jfg';
DROP DATABASE test_jfg;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
#
# MDEV-17755 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' failed in Field_bit::val_int upon SELECT with JOIN, partitions, indexed virtual column
#
diff --git a/mysql-test/main/partition_mrr_aria.result b/mysql-test/main/partition_mrr_aria.result
index c2be6ee4703..ccef491242b 100644
--- a/mysql-test/main/partition_mrr_aria.result
+++ b/mysql-test/main/partition_mrr_aria.result
@@ -119,15 +119,18 @@ insert into t2 select a+10 from t2;
insert into t2 select a+20 from t2;
analyze table t0,t1,t2;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
set join_cache_level=6;
set optimizer_switch='mrr=on';
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
@@ -143,8 +146,8 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 8 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
@@ -160,8 +163,8 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
@@ -186,8 +189,8 @@ tp a b c a
2 4 40 xxzy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
@@ -214,19 +217,20 @@ insert into t2 values
(3), (4), (5);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null
select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
a tp a b c
explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null
select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
diff --git a/mysql-test/main/partition_mrr_innodb.result b/mysql-test/main/partition_mrr_innodb.result
index ecef67817a3..4aad8134866 100644
--- a/mysql-test/main/partition_mrr_innodb.result
+++ b/mysql-test/main/partition_mrr_innodb.result
@@ -119,15 +119,18 @@ insert into t2 select a+10 from t2;
insert into t2 select a+20 from t2;
analyze table t0,t1,t2;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
set join_cache_level=6;
set optimizer_switch='mrr=on';
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
@@ -143,8 +146,8 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 8 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
@@ -160,8 +163,8 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
@@ -186,8 +189,8 @@ tp a b c a
2 4 40 xxzy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
@@ -214,19 +217,20 @@ insert into t2 values
(3), (4), (5);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null
select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
a tp a b c
explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null
select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
diff --git a/mysql-test/main/partition_mrr_myisam.result b/mysql-test/main/partition_mrr_myisam.result
index ff23982ff1a..7e060b35c53 100644
--- a/mysql-test/main/partition_mrr_myisam.result
+++ b/mysql-test/main/partition_mrr_myisam.result
@@ -119,15 +119,18 @@ insert into t2 select a+10 from t2;
insert into t2 select a+20 from t2;
analyze table t0,t1,t2;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
set join_cache_level=6;
set optimizer_switch='mrr=on';
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = `test`.`t2`.`a` - 1
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = t2.a-1;
@@ -143,8 +146,8 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 8 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = `test`.`t2`.`a` - 1
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = t2.a-1;
@@ -160,8 +163,8 @@ tp a b c a
3 4 30 zzzyy 4
explain extended select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t0` join `test`.`t2` where `test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` / 10 = 4
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
@@ -186,8 +189,8 @@ tp a b c a
2 4 40 xxzy 4
explain extended select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 10.00 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` / 10 = 4
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
@@ -214,19 +217,20 @@ insert into t2 values
(3), (4), (5);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain extended select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t0`.`tp` AS `tp`,`test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t0`.`c` AS `c` from `test`.`t2` left join `test`.`t0` on(`test`.`t0`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t0`.`b` is null
select * from t2 left join t0 on t2.a=t0.a where t2.a in (3,4) and t0.b is null;
a tp a b c
explain extended select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range idx idx 5 NULL 4 100.00 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 5 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 23 17.39 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 100.00 Using where; Not exists; Using join buffer (flat, BKA join); Rowid-ordered scan
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t1`.`tp` AS `tp`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t2` left join `test`.`t1` on(`test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t2`.`a` is not null) where `test`.`t2`.`a` in (3,4) and `test`.`t1`.`b` is null
select * from t2 left join t1 on t2.a=t1.a where t2.a in (3,4) and t1.b is null;
@@ -272,21 +276,24 @@ insert into t2 select a+10 from t2;
insert into t2 select a+20 from t2;
analyze table t0,t1,t2;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
set @tmp1=@@join_cache_level, @tmp2=@@optimizer_switch;
set join_cache_level=6, optimizer_switch='mrr=on';
explain
select * from t0,t2 where t2.a in (3,4) and t0.a=t2.a and (t0.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index
-1 SIMPLE t0 ref idx idx 5 test.t2.a 13 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 Using where; Using index
+1 SIMPLE t0 ref idx idx 5 test.t2.a 12 Using index condition; Using join buffer (flat, BKA join); Rowid-ordered scan
# This will use "Using index condition(BKA)"
explain
select * from t1,t2 where t2.a in (3,4) and t1.a=t2.a and (t1.b / 10) = 4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx idx 5 NULL 2 Using where; Using index
-1 SIMPLE t1 ref idx idx 5 test.t2.a 8 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE t2 index idx idx 5 NULL 20 Using where; Using index
+1 SIMPLE t1 ref idx idx 5 test.t2.a 12 Using index condition(BKA); Using join buffer (flat, BKA join); Rowid-ordered scan
set join_cache_level=@tmp1, optimizer_switch=@tmp2;
drop table t0,t1,t2;
diff --git a/mysql-test/main/partition_pruning.result b/mysql-test/main/partition_pruning.result
index 6a97541f2db..f8ae65fbcea 100644
--- a/mysql-test/main/partition_pruning.result
+++ b/mysql-test/main/partition_pruning.result
@@ -18,7 +18,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# # # # # # # # # 3 #
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-# # # # # # # # # 9 #
+# # # # # # # # # 10 #
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
# # # # # # # # # 3 #
@@ -105,7 +105,7 @@ a
6
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
SELECT * FROM t1 WHERE a <= 1;
a
-1
@@ -168,7 +168,7 @@ a
6
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
SELECT * FROM t1 WHERE a <= 7;
a
-1
@@ -182,7 +182,7 @@ a
7
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
SELECT * FROM t1 WHERE a = 1;
a
1
@@ -424,7 +424,7 @@ a
5
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
SELECT * FROM t1 WHERE a <= 1;
a
-1
@@ -474,7 +474,7 @@ a
5
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
SELECT * FROM t1 WHERE a <= 6;
a
-1
@@ -487,7 +487,7 @@ a
6
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
+1 SIMPLE t1 p0,p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
SELECT * FROM t1 WHERE a = 1;
a
1
@@ -744,41 +744,41 @@ a
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p2001-01-01 index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 index a a 4 NULL 7 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 index a a 4 NULL 7 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p2001-01-01 index a a 4 NULL 4 Using where; Using index
@@ -790,16 +790,16 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 index a a 4 NULL 7 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
# test without index
ALTER TABLE t1 DROP KEY a;
SELECT * FROM t1 WHERE a < '1001-01-01';
@@ -1073,41 +1073,41 @@ a
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
@@ -1119,16 +1119,16 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p1001-01-01 index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
# test without index
ALTER TABLE t1 DROP KEY a;
SELECT * FROM t1 WHERE a < '1001-01-01';
@@ -1402,41 +1402,41 @@ a
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
@@ -1448,16 +1448,16 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 index a a 4 NULL 6 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p1001-01-01 index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 index a a 4 NULL 5 Using where; Using index
# test without index
ALTER TABLE t1 DROP KEY a;
SELECT * FROM t1 WHERE a < '1001-01-01';
@@ -2670,17 +2670,19 @@ create table t1 (a int not null, b int not null, key(a), key(b))
partition by hash(a) partitions 4;
insert into t1 values (1,1),(2,2),(3,3),(4,4);
insert into t1 values (5,5),(6,6),(7,7),(8,8);
+insert into t1 values (9,9),(10,10),(11,11),(12,12);
+insert into t1 values (13,13),(14,14),(15,15),(16,16);
explain partitions
select * from t1 X, t1 Y
where X.b = Y.b and (X.a=1 or X.a=2) and (Y.a=2 or Y.a=3);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE X p1,p2 range a,b a 4 NULL 4 Using where
-1 SIMPLE Y p2,p3 ref a,b b 4 test.X.b 2 Using where
+1 SIMPLE X p1,p2 ALL a,b NULL NULL NULL 8 Using where
+1 SIMPLE Y p2,p3 ALL a,b NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
explain partitions
select * from t1 X, t1 Y where X.a = Y.a and (X.a=1 or X.a=2);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE X p1,p2 range a a 4 NULL 4 Using where
-1 SIMPLE Y p1,p2 ref a a 4 test.X.a 2
+1 SIMPLE X p1,p2 ALL a NULL NULL NULL 8 Using where
+1 SIMPLE Y p1,p2 ALL a NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
drop table t1;
create table t1 (a int) partition by hash(a) partitions 20;
insert into t1 values (1),(2),(3);
@@ -2867,15 +2869,15 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2 ALL NULL NULL NULL NULL 510 Using where
explain partitions select * from t2 where b = 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76
+1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 77
explain extended select * from t2 where b = 6;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ref b b 5 const 76 100.00
+1 SIMPLE t2 ref b b 5 const 77 100.00
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` = 6
explain partitions select * from t2 where b = 6;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76
+1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 77
explain extended select * from t2 where b in (1,3,5);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL b NULL NULL NULL 910 40.66 Using where
@@ -2886,7 +2888,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2,p3,p4 ALL b NULL NULL NULL 910 Using where
explain extended select * from t2 where b in (2,4,6);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL b NULL NULL NULL 910 25.05 Using where
+1 SIMPLE t2 ALL b NULL NULL NULL 910 25.38 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` in (2,4,6)
explain partitions select * from t2 where b in (2,4,6);
@@ -2894,7 +2896,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2,p3,p4 ALL b NULL NULL NULL 910 Using where
explain extended select * from t2 where b in (7,8,9);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL b NULL NULL NULL 910 36.70 Using where
+1 SIMPLE t2 ALL b NULL NULL NULL 910 36.81 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` in (7,8,9)
explain partitions select * from t2 where b in (7,8,9);
@@ -2902,7 +2904,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2,p3,p4 ALL b NULL NULL NULL 910 Using where
explain extended select * from t2 where b > 5;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL b NULL NULL NULL 910 44.84 Using where
+1 SIMPLE t2 ALL b NULL NULL NULL 910 44.62 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` > 5
explain partitions select * from t2 where b > 5;
@@ -2910,7 +2912,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2,p3,p4 ALL b NULL NULL NULL 910 Using where
explain extended select * from t2 where b > 5 and b < 8;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL b NULL NULL NULL 910 22.09 Using where
+1 SIMPLE t2 ALL b NULL NULL NULL 910 22.20 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` > 5 and `test`.`t2`.`b` < 8
explain partitions select * from t2 where b > 5 and b < 8;
@@ -2918,15 +2920,15 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p0,p1,p2,p3,p4 ALL b NULL NULL NULL 910 Using where
explain extended select * from t2 where b > 5 and b < 7;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range b b 5 NULL 76 100.00 Using where
+1 SIMPLE t2 range b b 5 NULL 77 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` > 5 and `test`.`t2`.`b` < 7
explain partitions select * from t2 where b > 5 and b < 7;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 p0,p1,p2,p3,p4 range b b 5 NULL 76 Using where
+1 SIMPLE t2 p0,p1,p2,p3,p4 range b b 5 NULL 77 Using where
explain extended select * from t2 where b > 0 and b < 5;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL b NULL NULL NULL 910 41.65 Using where
+1 SIMPLE t2 ALL b NULL NULL NULL 910 41.87 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` > 0 and `test`.`t2`.`b` < 5
explain partitions select * from t2 where b > 0 and b < 5;
@@ -3376,16 +3378,16 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1 const PRIMARY PRIMARY 8 const,const 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 >= 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
+1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 3 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 > 1;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 < 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1 range PRIMARY PRIMARY 8 NULL 1 Using where
+1 SIMPLE t1 p1 range PRIMARY PRIMARY 8 NULL 2 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
+1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 3 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
@@ -3394,7 +3396,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2 const PRIMARY PRIMARY 8 const,const 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
+1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 2 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 > 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
@@ -3403,7 +3405,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
+1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 3 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 = 4;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2 const PRIMARY PRIMARY 8 const,const 1
@@ -3463,7 +3465,7 @@ select * from t1
where company_id = 1000
and dept_id in (select dept_id from t2 where COMPANY_ID = 1000);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 p_1000 ref PRIMARY PRIMARY 8 const 2 Using index
+1 PRIMARY t2 p_1000 ref PRIMARY PRIMARY 8 const 3 Using index
1 PRIMARY t1 p_1000 ALL PRIMARY NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
#
diff --git a/mysql-test/main/partition_pruning.test b/mysql-test/main/partition_pruning.test
index 6b861621e0d..d59f52be313 100644
--- a/mysql-test/main/partition_pruning.test
+++ b/mysql-test/main/partition_pruning.test
@@ -893,6 +893,8 @@ create table t1 (a int not null, b int not null, key(a), key(b))
partition by hash(a) partitions 4;
insert into t1 values (1,1),(2,2),(3,3),(4,4);
insert into t1 values (5,5),(6,6),(7,7),(8,8);
+insert into t1 values (9,9),(10,10),(11,11),(12,12);
+insert into t1 values (13,13),(14,14),(15,15),(16,16);
explain partitions
select * from t1 X, t1 Y
diff --git a/mysql-test/main/partition_range.result b/mysql-test/main/partition_range.result
index 2c72d9f1865..6eb7147b461 100644
--- a/mysql-test/main/partition_range.result
+++ b/mysql-test/main/partition_range.result
@@ -11,7 +11,7 @@ PARTITION BY HASH (a) PARTITIONS 1;
INSERT INTO t1 VALUES (0, 580092), (3, 894076), (4, 805483), (4, 913540), (6, 611137), (8, 171602), (9, 599495), (9, 746305), (10, 272829), (10, 847519), (12, 258869), (12, 929028), (13, 288970), (15, 20971), (15, 105839), (16, 788272), (17, 76914), (18, 827274), (19, 802258), (20, 123677), (20, 587729), (22, 701449), (25, 31565), (25, 230782), (25, 442887), (25, 733139), (25, 851020);
EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100, 3) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index for group-by
DROP TABLE t1;
create table t1 (a DATETIME)
partition by range (TO_DAYS(a))
@@ -958,13 +958,19 @@ INSERT INTO t1 SELECT a + 10, b + 10 FROM t1;
INSERT INTO t1 SELECT a + 20, b + 20 FROM t1;
INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
INSERT INTO t2 SELECT * FROM t1;
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status Table is already up to date
# plans should be identical
EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 5 NULL 2 Using where; Using index for group-by
+1 SIMPLE t2 range a a 5 NULL 2 Using where; Using index
FLUSH status;
SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
a MAX(b)
@@ -980,7 +986,7 @@ a MAX(b)
# Should be no more than 4 reads.
SHOW status LIKE 'handler_read_key';
Variable_name Value
-Handler_read_key 4
+Handler_read_key 2
#
# MDEV-18501 Partition pruning doesn't work for historical queries
#
diff --git a/mysql-test/main/partition_range.test b/mysql-test/main/partition_range.test
index abba4c5f374..52497764241 100644
--- a/mysql-test/main/partition_range.test
+++ b/mysql-test/main/partition_range.test
@@ -957,6 +957,8 @@ INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
INSERT INTO t2 SELECT * FROM t1;
+ANALYZE TABLE t1,t2;
+
--echo # plans should be identical
EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
diff --git a/mysql-test/main/password_expiration.result b/mysql-test/main/password_expiration.result
new file mode 100644
index 00000000000..897811bb4ad
--- /dev/null
+++ b/mysql-test/main/password_expiration.result
@@ -0,0 +1,266 @@
+#
+# Only privileged users should be able to expire passwords
+#
+create user user1@localhost;
+alter user user1@localhost password expire;
+create user user2@localhost;
+connect con2,localhost,user2;
+connection con2;
+alter user user1@localhost password expire;
+ERROR 42000: Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
+disconnect con2;
+connection default;
+drop user user1@localhost;
+drop user user2@localhost;
+#
+# disconnect_on_expired_password=ON should deny a clients's connection
+# when the password is expired or put the client in sandbox mode if OFF
+#
+create user user1@localhost password expire;
+set global disconnect_on_expired_password=ON;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Your password has expired. To log in you must change it using a client that supports expired passwords
+set global disconnect_on_expired_password=OFF;
+connect con1,localhost,user1;
+connection con1;
+select 1;
+ERROR HY000: You must SET PASSWORD before executing this statement
+disconnect con1;
+connection default;
+drop user user1@localhost;
+#
+# connect-expired-password option passed to client should override
+# the behavior of disconnect_on_expired_password server system var.
+#
+create user user1@localhost password expire;
+set global disconnect_on_expired_password=ON;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Your password has expired. To log in you must change it using a client that supports expired passwords
+drop user user1@localhost;
+#
+# Manually expiring a password should have immediate effect
+#
+create user user1@localhost;
+alter user user1@localhost password expire;
+set global disconnect_on_expired_password=ON;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Your password has expired. To log in you must change it using a client that supports expired passwords
+drop user user1@localhost;
+#
+# Sandbox mode should only allow change password statements
+#
+create user user1@localhost password expire;
+grant create user on *.* to user1@localhost;
+set global disconnect_on_expired_password=OFF;
+connect con1,localhost,user1;
+connection con1;
+select 1;
+ERROR HY000: You must SET PASSWORD before executing this statement
+set password=password('');
+select 1;
+1
+1
+disconnect con1;
+connection default;
+drop user user1@localhost;
+#
+# Passwords are still expired after acl reload
+#
+set global disconnect_on_expired_password=ON;
+create user user1@localhost password expire;
+flush privileges;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Your password has expired. To log in you must change it using a client that supports expired passwords
+drop user user1@localhost;
+#
+# JSON functions on global_priv reflect the correct state
+# of the password expiration columns
+#
+create user user1@localhost password expire;
+select host, user, JSON_VALUE(Priv, '$.password_last_changed') from mysql.global_priv where user='user1';
+host user JSON_VALUE(Priv, '$.password_last_changed')
+localhost user1 0
+alter user user1@localhost password expire never;
+select host, user, JSON_VALUE(Priv, '$.password_lifetime') from mysql.global_priv where user='user1';
+host user JSON_VALUE(Priv, '$.password_lifetime')
+localhost user1 0
+alter user user1@localhost password expire default;
+select host, user, JSON_VALUE(Priv, '$.password_lifetime') from mysql.global_priv where user='user1';
+host user JSON_VALUE(Priv, '$.password_lifetime')
+localhost user1 -1
+alter user user1@localhost password expire interval 123 day;
+select host, user, JSON_VALUE(Priv, '$.password_lifetime') from mysql.global_priv where user='user1';
+host user JSON_VALUE(Priv, '$.password_lifetime')
+localhost user1 123
+drop user user1@localhost;
+#
+# SHOW CREATE USER correctly displays the locking state of an user
+#
+create user user1@localhost;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+alter user user1@localhost password expire;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+set password for user1@localhost= password('');
+alter user user1@localhost password expire default;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+alter user user1@localhost password expire never;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+alter user user1@localhost password expire interval 123 day;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
+alter user user1@localhost password expire;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+ALTER USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
+set password for user1@localhost= password('');
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
+drop user user1@localhost;
+#
+# Incorrect INTERVAL values should be rejected
+#
+create user user1@localhost password expire interval 0 day;
+ERROR HY000: Incorrect DAY value: '0'
+#
+# Password expiration fields are loaded properly on 10.3 tables
+#
+# switching from mysql.global_priv to mysql.user
+create user user1@localhost;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+flush privileges;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+alter user user1@localhost password expire;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+ALTER USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+flush privileges;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+ALTER USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+set password for user1@localhost= password('');
+alter user user1@localhost password expire default;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+flush privileges;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+alter user user1@localhost password expire never;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+flush privileges;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+alter user user1@localhost password expire interval 123 day;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
+flush privileges;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+alter user user1@localhost password expire;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+ALTER USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+flush privileges;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
+ALTER USER `user1`@`localhost` PASSWORD EXPIRE NEVER
+set global disconnect_on_expired_password=ON;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Your password has expired. To log in you must change it using a client that supports expired passwords
+set global disconnect_on_expired_password=OFF;
+connect con1,localhost,user1;
+connection con1;
+select 1;
+ERROR HY000: You must SET PASSWORD before executing this statement
+set password=password('');
+select 1;
+1
+1
+disconnect con1;
+connection default;
+drop user user1@localhost;
+set global disconnect_on_expired_password=default;
+set global default_password_lifetime=default;
+# switching back from mysql.user to mysql.global_priv
+#
+# PASSWORD EXPIRE DEFAULT should use the default_password_lifetime
+# system var to set the number of days till expiration
+#
+set global disconnect_on_expired_password= ON;
+set global default_password_lifetime= 2;
+create user user1@localhost password expire default;
+set @tstamp_expired= UNIX_TIMESTAMP(NOW() - INTERVAL 3 DAY);
+update mysql.global_priv set
+priv=json_set(priv, '$.password_last_changed', @tstamp_expired)
+where user='user1';
+flush privileges;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Your password has expired. To log in you must change it using a client that supports expired passwords
+drop user user1@localhost;
+#
+# PASSWORD EXPIRE INTERVAL should expire a client's password after
+# X days and not before
+#
+set global disconnect_on_expired_password= ON;
+create user user1@localhost password expire interval 2 day;
+connect con1,localhost,user1;
+disconnect con1;
+connection default;
+set @tstamp_expired= UNIX_TIMESTAMP(NOW() - INTERVAL 3 DAY);
+update mysql.global_priv set
+priv=json_set(priv, '$.password_last_changed', @tstamp_expired)
+where user='user1';
+flush privileges;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Your password has expired. To log in you must change it using a client that supports expired passwords
+drop user user1@localhost;
+#
+# PASSWORD EXPIRE NEVER should override the other policies and never
+# expire a client's password
+#
+set global disconnect_on_expired_password= ON;
+create user user1@localhost password expire interval 2 day;
+alter user user1@localhost password expire never;
+set @tstamp_expired= UNIX_TIMESTAMP() - 3;
+update mysql.global_priv set
+priv=json_set(priv, '$.password_last_changed', @tstamp_expired)
+where user='user1';
+flush privileges;
+connect con1,localhost,user1;
+disconnect con1;
+connection default;
+drop user user1@localhost;
+set global disconnect_on_expired_password= default;
+set global default_password_lifetime= default;
diff --git a/mysql-test/main/password_expiration.test b/mysql-test/main/password_expiration.test
new file mode 100644
index 00000000000..b7d1269537a
--- /dev/null
+++ b/mysql-test/main/password_expiration.test
@@ -0,0 +1,263 @@
+#
+# Test password expiration
+#
+
+--source include/not_embedded.inc
+
+--echo #
+--echo # Only privileged users should be able to expire passwords
+--echo #
+create user user1@localhost;
+alter user user1@localhost password expire;
+
+create user user2@localhost;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect(con2,localhost,user2);
+connection con2;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+alter user user1@localhost password expire;
+
+disconnect con2;
+connection default;
+drop user user1@localhost;
+drop user user2@localhost;
+
+--echo #
+--echo # disconnect_on_expired_password=ON should deny a clients's connection
+--echo # when the password is expired or put the client in sandbox mode if OFF
+--echo #
+create user user1@localhost password expire;
+set global disconnect_on_expired_password=ON;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_MUST_CHANGE_PASSWORD_LOGIN
+connect(con1,localhost,user1);
+
+# should allow the client to enter sandbox mode
+set global disconnect_on_expired_password=OFF;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect(con1,localhost,user1);
+connection con1;
+--error ER_MUST_CHANGE_PASSWORD
+select 1;
+disconnect con1;
+connection default;
+drop user user1@localhost;
+
+--echo #
+--echo # connect-expired-password option passed to client should override
+--echo # the behavior of disconnect_on_expired_password server system var.
+--echo #
+create user user1@localhost password expire;
+set global disconnect_on_expired_password=ON;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_MUST_CHANGE_PASSWORD_LOGIN
+connect(con1,localhost,user1);
+
+--exec $MYSQL --connect-expired-password -u user1 -e "set password=password('');"
+drop user user1@localhost;
+
+--echo #
+--echo # Manually expiring a password should have immediate effect
+--echo #
+create user user1@localhost;
+alter user user1@localhost password expire;
+set global disconnect_on_expired_password=ON;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_MUST_CHANGE_PASSWORD_LOGIN
+connect(con1,localhost,user1);
+drop user user1@localhost;
+
+--echo #
+--echo # Sandbox mode should only allow change password statements
+--echo #
+create user user1@localhost password expire;
+grant create user on *.* to user1@localhost;
+set global disconnect_on_expired_password=OFF;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect(con1,localhost,user1);
+connection con1;
+--error ER_MUST_CHANGE_PASSWORD
+select 1;
+set password=password('');
+select 1;
+disconnect con1;
+connection default;
+
+drop user user1@localhost;
+
+--echo #
+--echo # Passwords are still expired after acl reload
+--echo #
+set global disconnect_on_expired_password=ON;
+create user user1@localhost password expire;
+flush privileges;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_MUST_CHANGE_PASSWORD_LOGIN
+connect(con1,localhost,user1);
+drop user user1@localhost;
+
+--echo #
+--echo # JSON functions on global_priv reflect the correct state
+--echo # of the password expiration columns
+--echo #
+
+create user user1@localhost password expire;
+select host, user, JSON_VALUE(Priv, '$.password_last_changed') from mysql.global_priv where user='user1';
+alter user user1@localhost password expire never;
+select host, user, JSON_VALUE(Priv, '$.password_lifetime') from mysql.global_priv where user='user1';
+alter user user1@localhost password expire default;
+select host, user, JSON_VALUE(Priv, '$.password_lifetime') from mysql.global_priv where user='user1';
+alter user user1@localhost password expire interval 123 day;
+select host, user, JSON_VALUE(Priv, '$.password_lifetime') from mysql.global_priv where user='user1';
+drop user user1@localhost;
+
+--echo #
+--echo # SHOW CREATE USER correctly displays the locking state of an user
+--echo #
+
+create user user1@localhost;
+show create user user1@localhost;
+alter user user1@localhost password expire;
+show create user user1@localhost;
+set password for user1@localhost= password('');
+alter user user1@localhost password expire default;
+show create user user1@localhost;
+alter user user1@localhost password expire never;
+show create user user1@localhost;
+alter user user1@localhost password expire interval 123 day;
+show create user user1@localhost;
+alter user user1@localhost password expire;
+show create user user1@localhost;
+set password for user1@localhost= password('');
+show create user user1@localhost;
+drop user user1@localhost;
+
+--echo #
+--echo # Incorrect INTERVAL values should be rejected
+--echo #
+--error ER_WRONG_VALUE
+create user user1@localhost password expire interval 0 day;
+
+--echo #
+--echo # Password expiration fields are loaded properly on 10.3 tables
+--echo #
+--source include/switch_to_mysql_user.inc
+create user user1@localhost;
+show create user user1@localhost;
+flush privileges;
+show create user user1@localhost;
+
+alter user user1@localhost password expire;
+show create user user1@localhost;
+flush privileges;
+show create user user1@localhost;
+set password for user1@localhost= password('');
+
+alter user user1@localhost password expire default;
+show create user user1@localhost;
+flush privileges;
+show create user user1@localhost;
+
+alter user user1@localhost password expire never;
+show create user user1@localhost;
+flush privileges;
+show create user user1@localhost;
+
+alter user user1@localhost password expire interval 123 day;
+show create user user1@localhost;
+flush privileges;
+show create user user1@localhost;
+
+alter user user1@localhost password expire;
+show create user user1@localhost;
+flush privileges;
+show create user user1@localhost;
+
+set global disconnect_on_expired_password=ON;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_MUST_CHANGE_PASSWORD_LOGIN
+connect(con1,localhost,user1);
+
+set global disconnect_on_expired_password=OFF;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect(con1,localhost,user1);
+connection con1;
+--error ER_MUST_CHANGE_PASSWORD
+select 1;
+set password=password('');
+select 1;
+disconnect con1;
+connection default;
+drop user user1@localhost;
+
+set global disconnect_on_expired_password=default;
+set global default_password_lifetime=default;
+--source include/switch_to_mysql_global_priv.inc
+
+#
+# Test password expiration INTERVAL and default_password_lifetime options
+#
+
+--echo #
+--echo # PASSWORD EXPIRE DEFAULT should use the default_password_lifetime
+--echo # system var to set the number of days till expiration
+--echo #
+set global disconnect_on_expired_password= ON;
+set global default_password_lifetime= 2;
+create user user1@localhost password expire default;
+
+set @tstamp_expired= UNIX_TIMESTAMP(NOW() - INTERVAL 3 DAY);
+update mysql.global_priv set
+ priv=json_set(priv, '$.password_last_changed', @tstamp_expired)
+ where user='user1';
+flush privileges;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_MUST_CHANGE_PASSWORD_LOGIN
+connect(con1,localhost,user1);
+drop user user1@localhost;
+
+--echo #
+--echo # PASSWORD EXPIRE INTERVAL should expire a client's password after
+--echo # X days and not before
+--echo #
+set global disconnect_on_expired_password= ON;
+create user user1@localhost password expire interval 2 day;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect(con1,localhost,user1);
+disconnect con1;
+connection default;
+
+set @tstamp_expired= UNIX_TIMESTAMP(NOW() - INTERVAL 3 DAY);
+update mysql.global_priv set
+ priv=json_set(priv, '$.password_last_changed', @tstamp_expired)
+ where user='user1';
+flush privileges;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_MUST_CHANGE_PASSWORD_LOGIN
+connect(con1,localhost,user1);
+drop user user1@localhost;
+
+--echo #
+--echo # PASSWORD EXPIRE NEVER should override the other policies and never
+--echo # expire a client's password
+--echo #
+set global disconnect_on_expired_password= ON;
+create user user1@localhost password expire interval 2 day;
+alter user user1@localhost password expire never;
+
+set @tstamp_expired= UNIX_TIMESTAMP() - 3;
+update mysql.global_priv set
+ priv=json_set(priv, '$.password_last_changed', @tstamp_expired)
+ where user='user1';
+flush privileges;
+
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+connect(con1,localhost,user1);
+disconnect con1;
+connection default;
+drop user user1@localhost;
+
+set global disconnect_on_expired_password= default;
+set global default_password_lifetime= default;
diff --git a/mysql-test/main/password_expiration_unix_socket.result b/mysql-test/main/password_expiration_unix_socket.result
new file mode 100644
index 00000000000..b37b8868edf
--- /dev/null
+++ b/mysql-test/main/password_expiration_unix_socket.result
@@ -0,0 +1,8 @@
+#
+# A password cannot expire, if there is no password
+#
+create user 'USER' identified via unix_socket;
+alter user 'USER' password expire;
+1
+1
+drop user 'USER';
diff --git a/mysql-test/main/password_expiration_unix_socket.test b/mysql-test/main/password_expiration_unix_socket.test
new file mode 100644
index 00000000000..d936d65bc21
--- /dev/null
+++ b/mysql-test/main/password_expiration_unix_socket.test
@@ -0,0 +1,24 @@
+#
+# Test password expiration
+#
+
+--source include/not_embedded.inc
+--source include/have_unix_socket.inc
+
+--echo #
+--echo # A password cannot expire, if there is no password
+--echo #
+
+--let $replace=create user '$USER'
+--replace_result $replace "create user 'USER'"
+--eval create user '$USER' identified via unix_socket
+
+--let $replace=alter user '$USER'
+--replace_result $replace "alter user 'USER'"
+--eval alter user '$USER' password expire
+
+--exec $MYSQL -u $USER -e 'select 1'
+
+--let $replace=drop user '$USER'
+--replace_result $replace "drop user 'USER'"
+--eval drop user '$USER'
diff --git a/mysql-test/main/perror-win.result b/mysql-test/main/perror-win.result
index 12200c88d5a..a0ea54f9187 100644
--- a/mysql-test/main/perror-win.result
+++ b/mysql-test/main/perror-win.result
@@ -1,7 +1,7 @@
-MySQL error code 150: Foreign key constraint is incorrectly formed
-Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
+MariaDB error code 150: Foreign key constraint is incorrectly formed
+Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
OS error code 23: Too many open files in system
-Win32 error code 23: Data error (cyclic redundancy check).
-MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
-Win32 error code 1062: The service has not been started.
+Win32 error code 23: Data error (cyclic redundancy check).
+MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
+Win32 error code 1062: The service has not been started.
Illegal error code: 30000
diff --git a/mysql-test/main/perror.result b/mysql-test/main/perror.result
index e5eb9a083ee..b95b8b8dd99 100644
--- a/mysql-test/main/perror.result
+++ b/mysql-test/main/perror.result
@@ -1,6 +1,6 @@
Illegal error code: 10000
-MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
-MySQL error code 1408 (ER_STARTUP): %s: ready for connections.
+MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
+MariaDB error code 1408 (ER_STARTUP): %s: ready for connections.
Version: '%s' socket: '%s' port: %d %s
-MySQL error code 1459 (ER_TABLE_NEEDS_UPGRADE): Upgrade required. Please do "REPAIR %s %`s" or dump/reload to fix it!
-MySQL error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %u)
+MariaDB error code 1459 (ER_TABLE_NEEDS_UPGRADE): Upgrade required. Please do "REPAIR %s %`s" or dump/reload to fix it!
+MariaDB error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %u)
diff --git a/mysql-test/main/plugin.result b/mysql-test/main/plugin.result
index 47df1f4653b..032bf489f3d 100644
--- a/mysql-test/main/plugin.result
+++ b/mysql-test/main/plugin.result
@@ -12,7 +12,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
@@ -25,7 +25,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE DAEMON
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Unusable Daemon
PLUGIN_LICENSE GPL
@@ -68,7 +68,7 @@ PLUGIN_STATUS DELETED
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
@@ -367,3 +367,66 @@ ERROR HY000: Can't open shared library 'x.so'
INSTALL PLUGIN DEALLOCATE SONAME 'xx';
ERROR HY000: Can't open shared library 'xx.so'
# End of 10.2 tests
+#
+# MDEV-16294: INSTALL PLUGIN IF NOT EXISTS / UNINSTALL PLUGIN IF EXISTS
+#
+# INSTALL IF NOT EXISTS PLUGIN name SONAME library /
+# UNINSTALL IF EXISTS PLUGIN|SONAME name
+#
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+EXAMPLE ACTIVE STORAGE ENGINE
+INSTALL PLUGIN example SONAME 'ha_example';
+ERROR HY000: Plugin 'example' already installed
+INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
+Warnings:
+Note 1968 Plugin 'example' already installed
+SHOW WARNINGS;
+Level Code Message
+Note 1968 Plugin 'example' already installed
+UNINSTALL PLUGIN IF EXISTS example;
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+UNINSTALL PLUGIN IF EXISTS example;
+Warnings:
+Note 1305 PLUGIN example does not exist
+SHOW WARNINGS;
+Level Code Message
+Note 1305 PLUGIN example does not exist
+UNINSTALL PLUGIN example;
+ERROR 42000: PLUGIN example does not exist
+INSTALL SONAME 'ha_example';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+EXAMPLE ACTIVE STORAGE ENGINE
+UNUSABLE ACTIVE DAEMON
+UNINSTALL SONAME IF EXISTS 'ha_example';
+UNINSTALL SONAME IF EXISTS 'ha_example';
+Warnings:
+Note 1305 SONAME ha_example.so does not exist
+SHOW WARNINGS;
+Level Code Message
+Note 1305 SONAME ha_example.so does not exist
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+UNINSTALL SONAME 'ha_example';
+ERROR 42000: SONAME ha_example.so does not exist
+#
+# Make sure temporary tables maintain plugin references properly
+#
+INSTALL PLUGIN example SONAME 'ha_example';
+CREATE TEMPORARY TABLE t1(a INT) ENGINE=example;
+UNINSTALL PLUGIN example;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+INSTALL PLUGIN example SONAME 'ha_example';
+ERROR HY000: Plugin 'example' already installed
+DROP TABLE t1;
+INSTALL PLUGIN example SONAME 'ha_example';
+CREATE TEMPORARY TABLE t1(a INT) ENGINE=example;
+DROP TABLE t1;
+UNINSTALL PLUGIN example;
+# End of 10.4 tests
diff --git a/mysql-test/main/plugin.test b/mysql-test/main/plugin.test
index d3e0fa1edda..967364a3e03 100644
--- a/mysql-test/main/plugin.test
+++ b/mysql-test/main/plugin.test
@@ -314,3 +314,22 @@ INSTALL PLUGIN DEALLOCATE SONAME 'xx';
--echo # End of 10.2 tests
+
+--source include/install_plugin_if_exists.inc
+
+--echo #
+--echo # Make sure temporary tables maintain plugin references properly
+--echo #
+INSTALL PLUGIN example SONAME 'ha_example';
+CREATE TEMPORARY TABLE t1(a INT) ENGINE=example;
+UNINSTALL PLUGIN example;
+--error ER_PLUGIN_INSTALLED
+INSTALL PLUGIN example SONAME 'ha_example';
+DROP TABLE t1;
+
+INSTALL PLUGIN example SONAME 'ha_example';
+CREATE TEMPORARY TABLE t1(a INT) ENGINE=example;
+DROP TABLE t1;
+UNINSTALL PLUGIN example;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/plugin_auth.result b/mysql-test/main/plugin_auth.result
index 66495da65e7..73c384734bd 100644
--- a/mysql-test/main/plugin_auth.result
+++ b/mysql-test/main/plugin_auth.result
@@ -11,6 +11,8 @@ SELECT plugin,authentication_string FROM mysql.user WHERE User='plug';
plugin authentication_string
test_plugin_server plug_dest
## test plugin auth
+connect(localhost,plug,plug_dest,test,MYSQL_PORT,MYSQL_SOCK);
+connect plug_con,localhost,plug,plug_dest;
ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
GRANT PROXY ON plug_dest TO plug;
test proxies_priv columns
@@ -30,9 +32,8 @@ proxies_priv CREATE TABLE `proxies_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User proxy privileges'
connect plug_con,localhost,plug,plug_dest;
-connection plug_con;
select USER(),CURRENT_USER();
USER() CURRENT_USER()
plug@localhost plug_dest@%
@@ -41,6 +42,8 @@ SET PASSWORD = PASSWORD('plug_dest');
connection default;
disconnect plug_con;
## test bad credentials
+connect(localhost,plug,bad_credentials,test,MYSQL_PORT,MYSQL_SOCK);
+connect plug_con,localhost,plug,bad_credentials;
ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
## test bad default plugin : nothing bad happens, as that plugin was't required by the server
connect plug_con_wrongp,localhost,plug,plug_dest,,,,,wrong_plugin_name;
@@ -51,7 +54,6 @@ connection default;
disconnect plug_con_wrongp;
## test correct default plugin
connect plug_con_rightp,localhost,plug,plug_dest,,,,,auth_test_plugin;
-connection plug_con_rightp;
select USER(),CURRENT_USER();
USER() CURRENT_USER()
plug@localhost plug_dest@%
@@ -66,7 +68,6 @@ DROP USER grant_user;
CREATE USER `Ÿ` IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
GRANT PROXY ON plug_dest TO `Ÿ`;
connect non_ascii,localhost,Ÿ,plug_dest;
-connection non_ascii;
select USER(),CURRENT_USER();
USER() CURRENT_USER()
Ÿ@localhost plug_dest@%
@@ -80,7 +81,6 @@ GRANT ALL PRIVILEGES ON test_grant_db.* TO new_grant_user
IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
GRANT PROXY ON plug_dest TO new_grant_user;
connect plug_con_grant,localhost,new_grant_user,plug_dest;
-connection plug_con_grant;
select USER(),CURRENT_USER();
USER() CURRENT_USER()
new_grant_user@localhost plug_dest@%
@@ -97,7 +97,6 @@ connect(localhost,new_grant_user,plug_dest,test,MYSQL_PORT,MYSQL_SOCK);
connect plug_con_grant_deny,localhost,new_grant_user,plug_dest;
ERROR 28000: Access denied for user 'new_grant_user'@'localhost' (using password: YES)
connect plug_con_grant,localhost,new_grant_user,new_password;
-connection plug_con_grant;
select USER(),CURRENT_USER();
USER() CURRENT_USER()
new_grant_user@localhost new_grant_user@%
@@ -139,8 +138,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
REVOKE PROXY ON grant_plug_dest FROM grant_plug;
ERROR 42000: There is no such grant defined for user 'grant_plug' on host '%'
connect grant_plug_dest_con,localhost,grant_plug_dest,grant_plug_dest_passwd;
-connection grant_plug_dest_con;
-in grant_plug_dest_con
## testing what an ordinary user can grant
this should fail : no rights to grant all
GRANT PROXY ON ''@'%%' TO grant_plug;
@@ -164,7 +161,6 @@ this should fail : can't create users
GRANT PROXY ON grant_plug_dest TO grant_plug@localhost;
ERROR 42000: You are not allowed to create a user with GRANT
connection default;
-in default connection
disconnect grant_plug_dest_con;
# test what root can grant
should work : root has PROXY to all users
@@ -176,12 +172,9 @@ WITH GRANT OPTION;
need USAGE : PROXY doesn't contain it.
GRANT USAGE on *.* TO proxy_admin;
connect proxy_admin_con,localhost,proxy_admin,test;
-connection proxy_admin_con;
-in proxy_admin_con;
should work : proxy_admin has proxy to ''@'%%'
GRANT PROXY ON future_user TO grant_plug;
connection default;
-in default connection
disconnect proxy_admin_con;
SHOW GRANTS FOR grant_plug;
Grants for grant_plug@%
@@ -227,13 +220,10 @@ SELECT @@LOCAL.proxy_user;
@@LOCAL.proxy_user
NULL
connect plug_con,localhost,plug,plug_dest;
-connection plug_con;
-# in connection plug_con
SELECT @@LOCAL.proxy_user;
@@LOCAL.proxy_user
'plug'@'%'
connection default;
-# in connection default
disconnect plug_con;
## cleanup
DROP USER plug;
@@ -259,13 +249,10 @@ SELECT @@LOCAL.external_user;
@@LOCAL.external_user
NULL
connect plug_con,localhost,plug,plug_dest;
-connection plug_con;
-# in connection plug_con
SELECT @@LOCAL.external_user;
@@LOCAL.external_user
plug_dest
connection default;
-# in connection default
disconnect plug_con;
## cleanup
DROP USER plug;
@@ -305,6 +292,7 @@ DROP DATABASE shared;
CALL mtr.add_suppression("Missing system table mysql.proxies_priv.");
DROP TABLE mysql.proxies_priv;
# Must come back with mysql.proxies_priv absent.
+# restart
SELECT * FROM mysql.proxies_priv;
ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist
CREATE USER u1@localhost;
@@ -321,7 +309,6 @@ REVOKE PROXY ON u2@localhost FROM u1@localhost;
ERROR 28000: Access denied for user 'root'@'localhost'
# go try graning proxy on itself, so that it will need the table
connect proxy_granter_con,localhost,u2,;
-connection proxy_granter_con;
GRANT PROXY ON u2@localhost TO u1@localhost;
ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist
REVOKE PROXY ON u2@localhost FROM u1@localhost;
@@ -361,13 +348,14 @@ CREATE USER uplain@localhost IDENTIFIED WITH 'cleartext_plugin_server'
## test plugin auth
ERROR 28000: Access denied for user 'uplain'@'localhost' (using password: YES)
connect cleartext_con,localhost,uplain,cleartext_test;
-connection cleartext_con;
select USER(),CURRENT_USER();
USER() CURRENT_USER()
uplain@localhost uplain@localhost
connection default;
disconnect cleartext_con;
DROP USER uplain@localhost;
+# switching from mysql.global_priv to mysql.user
+drop view mysql.user_bak;
#
# Bug #59038 : mysql.user.authentication_string column
# causes configuration wizard to fail
@@ -449,6 +437,8 @@ ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME
NO authentication_string
NO plugin
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
#
# Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
# .-> USING PASSWORD: NO
@@ -477,7 +467,6 @@ CREATE USER bug12818542_dest@localhost
IDENTIFIED BY 'bug12818542_dest_passwd';
GRANT PROXY ON bug12818542_dest@localhost TO bug12818542@localhost;
connect bug12818542_con,localhost,bug12818542,bug12818542_dest;
-connection bug12818542_con;
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
bug12818542@localhost bug12818542_dest@localhost
@@ -485,7 +474,6 @@ SET PASSWORD = PASSWORD('bruhaha');
connection default;
disconnect bug12818542_con;
connect bug12818542_con2,localhost,bug12818542,bug12818542_dest;
-connection bug12818542_con2;
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
bug12818542@localhost bug12818542_dest@localhost
diff --git a/mysql-test/main/plugin_auth.test b/mysql-test/main/plugin_auth.test
index 1700a755492..30e4fa6e0ad 100644
--- a/mysql-test/main/plugin_auth.test
+++ b/mysql-test/main/plugin_auth.test
@@ -15,10 +15,9 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT plugin,authentication_string FROM mysql.user WHERE User='plug';
--echo ## test plugin auth
---disable_query_log
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
--error ER_ACCESS_DENIED_ERROR : this should fail : no grant
connect(plug_con,localhost,plug,plug_dest);
---enable_query_log
GRANT PROXY ON plug_dest TO plug;
--echo test proxies_priv columns
@@ -28,8 +27,6 @@ SELECT * FROM mysql.proxies_priv WHERE user !='root';
SHOW CREATE TABLE mysql.proxies_priv;
connect(plug_con,localhost,plug,plug_dest);
-
-connection plug_con;
select USER(),CURRENT_USER();
--echo ## test SET PASSWORD
@@ -40,10 +37,9 @@ connection default;
disconnect plug_con;
--echo ## test bad credentials
---disable_query_log
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
--error ER_ACCESS_DENIED_ERROR
connect(plug_con,localhost,plug,bad_credentials);
---enable_query_log
--echo ## test bad default plugin : nothing bad happens, as that plugin was't required by the server
connect(plug_con_wrongp,localhost,plug,plug_dest,,,,,wrong_plugin_name);
@@ -53,7 +49,6 @@ disconnect plug_con_wrongp;
--echo ## test correct default plugin
connect(plug_con_rightp,localhost,plug,plug_dest,,,,,auth_test_plugin);
-connection plug_con_rightp;
select USER(),CURRENT_USER();
connection default;
disconnect plug_con_rightp;
@@ -70,7 +65,6 @@ CREATE USER `Ÿ` IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
GRANT PROXY ON plug_dest TO `Ÿ`;
connect(non_ascii,localhost,Ÿ,plug_dest);
-connection non_ascii;
select USER(),CURRENT_USER();
connection default;
@@ -88,7 +82,6 @@ GRANT ALL PRIVILEGES ON test_grant_db.* TO new_grant_user
GRANT PROXY ON plug_dest TO new_grant_user;
connect(plug_con_grant,localhost,new_grant_user,plug_dest);
-connection plug_con_grant;
select USER(),CURRENT_USER();
USE test_grant_db;
CREATE TABLE t1 (a INT);
@@ -106,7 +99,6 @@ GRANT ALL PRIVILEGES ON test_grant_db.* TO new_grant_user
connect(plug_con_grant_deny,localhost,new_grant_user,plug_dest);
connect(plug_con_grant,localhost,new_grant_user,new_password);
-connection plug_con_grant;
select USER(),CURRENT_USER();
USE test_grant_db;
CREATE TABLE t1 (a INT);
@@ -164,8 +156,6 @@ GRANT ALL SELECT,PROXY ON grant_plug_dest TO grant_plug;
REVOKE PROXY ON grant_plug_dest FROM grant_plug;
connect(grant_plug_dest_con,localhost,grant_plug_dest,grant_plug_dest_passwd);
-connection grant_plug_dest_con;
---echo in grant_plug_dest_con
--echo ## testing what an ordinary user can grant
--echo this should fail : no rights to grant all
@@ -207,7 +197,6 @@ REVOKE PROXY ON grant_plug_dest@localhost FROM grant_plug;
GRANT PROXY ON grant_plug_dest TO grant_plug@localhost;
connection default;
---echo in default connection
disconnect grant_plug_dest_con;
--echo # test what root can grant
@@ -224,14 +213,11 @@ GRANT PROXY ON ''@'%%' TO proxy_admin IDENTIFIED BY 'test'
GRANT USAGE on *.* TO proxy_admin;
connect (proxy_admin_con,localhost,proxy_admin,test);
-connection proxy_admin_con;
---echo in proxy_admin_con;
--echo should work : proxy_admin has proxy to ''@'%%'
GRANT PROXY ON future_user TO grant_plug;
connection default;
---echo in default connection
disconnect proxy_admin_con;
SHOW GRANTS FOR grant_plug;
@@ -273,11 +259,8 @@ SET LOCAL proxy_user = 'test';
SELECT @@LOCAL.proxy_user;
connect(plug_con,localhost,plug,plug_dest);
-connection plug_con;
---echo # in connection plug_con
SELECT @@LOCAL.proxy_user;
connection default;
---echo # in connection default
disconnect plug_con;
--echo ## cleanup
@@ -302,11 +285,8 @@ SET LOCAL external_user = 'test';
SELECT @@LOCAL.external_user;
connect(plug_con,localhost,plug,plug_dest);
-connection plug_con;
---echo # in connection plug_con
SELECT @@LOCAL.external_user;
connection default;
---echo # in connection default
disconnect plug_con;
--echo ## cleanup
@@ -380,7 +360,6 @@ REVOKE PROXY ON u2@localhost FROM u1@localhost;
--echo # go try graning proxy on itself, so that it will need the table
connect(proxy_granter_con,localhost,u2,);
-connection proxy_granter_con;
--error ER_NO_SUCH_TABLE
GRANT PROXY ON u2@localhost TO u1@localhost;
@@ -436,13 +415,16 @@ connect(cleartext_fail_con,localhost,uplain,cleartext_test2);
--enable_query_log
connect(cleartext_con,localhost,uplain,cleartext_test);
-connection cleartext_con;
select USER(),CURRENT_USER();
connection default;
disconnect cleartext_con;
DROP USER uplain@localhost;
+# prepare for two tests that use mysql.user table
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
--echo #
--echo # Bug #59038 : mysql.user.authentication_string column
--echo # causes configuration wizard to fail
@@ -500,7 +482,6 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_SCHEMA='mysql'
ORDER BY COLUMN_NAME;
-
--echo #
--echo # Bug #11936829: diff. between mysql.user (authentication_string)
--echo # in fresh and upgraded 5.5.11
@@ -522,7 +503,8 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
ORDER BY COLUMN_NAME;
let $datadir= `select @@datadir`;
remove_file $datadir/mysql_upgrade_info;
-
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
--echo #
--echo # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
@@ -565,7 +547,6 @@ CREATE USER bug12818542_dest@localhost
GRANT PROXY ON bug12818542_dest@localhost TO bug12818542@localhost;
connect(bug12818542_con,localhost,bug12818542,bug12818542_dest);
-connection bug12818542_con;
SELECT USER(),CURRENT_USER();
SET PASSWORD = PASSWORD('bruhaha');
@@ -574,7 +555,6 @@ connection default;
disconnect bug12818542_con;
connect(bug12818542_con2,localhost,bug12818542,bug12818542_dest);
-connection bug12818542_con2;
SELECT USER(),CURRENT_USER();
connection default;
diff --git a/mysql-test/main/plugin_auth_qa.result b/mysql-test/main/plugin_auth_qa.result
index 4f274c45971..e3158618b7d 100644
--- a/mysql-test/main/plugin_auth_qa.result
+++ b/mysql-test/main/plugin_auth_qa.result
@@ -1,38 +1,45 @@
set sql_mode="";
CREATE DATABASE test_user_db;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
========== test 1.1 ======================================================
CREATE USER plug IDENTIFIED WITH test_plugin_server;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug;
CREATE USER plug IDENTIFIED WITH test_plugin_server AS '';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS '';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug;
@@ -100,63 +107,75 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
========== test 1.1.1.6/1.1.2.5 ============================
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
-plug_dest
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plug_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
-plug_dest
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plug_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
-plug_dest
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plug_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
@@ -170,12 +189,14 @@ ERROR HY000: Operation CREATE USER failed for 'plug'@'%'
DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
-plug *939AEE68989794C0F408277411C26055CDF41119
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
+plug mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug IDENTIFIED BY 'plug_dest_passwd';
@@ -184,18 +205,21 @@ DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
plug_dest test_plugin_server plug_dest
DROP USER plug,plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest
IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
plug test_plugin_server plug_dest
plug_dest test_plugin_server plug_dest
DROP USER plug,plug_dest;
@@ -203,24 +227,28 @@ DROP USER plug,plug_dest;
SET NAMES utf8;
CREATE USER plüg IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plüg test_plugin_server plüg_dest
DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plüg_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plüg_dest;
SET NAMES ascii;
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
pl??g test_plugin_server pl??g_dest
DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-pl??g_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+pl??g_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest';
SET NAMES latin1;
========== test 1.1.1.5 ====================================
@@ -228,36 +256,42 @@ CREATE USER 'plüg' IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
ERROR HY000: Plugin 'test_plügin_server' is not loaded
CREATE USER 'plug' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server plüg_dest
DROP USER 'plug';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plüg_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest';
SET NAMES utf8;
CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
ERROR HY000: Plugin 'test_plügin_server' is not loaded
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plüg test_plugin_server plüg_dest
DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plüg_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest';
CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plüg test_plugin_server plüg_dest
DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plüg_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plüg_dest;
========== test 1.1.1.2/1.1.2.2=============================
SET @auth_name= 'test_plugin_server';
@@ -271,13 +305,15 @@ CREATE USER plug IDENTIFIED WITH 'hh''s_test_plugin_server' AS 'plug_dest';
ERROR HY000: Plugin 'hh's_test_plugin_server' is not loaded
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'hh''s_plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
plug test_plugin_server hh's_plug_dest
DROP USER plug;
CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-hh's_plug_dest
+User plugin authentication_string
+hh's_plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
+mariadb.sys mysql_native_password
DROP USER 'hh''s_plug_dest';
========== test 1.1.1.4 ====================================
CREATE USER plug IDENTIFIED WITH hh''s_test_plugin_server AS 'plug_dest';
@@ -285,22 +321,25 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
========== test 1.1.3.1 ====================================
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
+mariadb.sys mysql_native_password
CREATE USER plug_dest;
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
-plug_dest
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password
DROP USER grant_user,plug_dest;
set @save_sql_mode= @@sql_mode;
SET @@sql_mode=no_auto_create_user;
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
+mariadb.sys mysql_native_password
CREATE USER plug_dest;
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest;
@@ -308,19 +347,22 @@ ERROR 28000: Can't find any matching row in the user table
DROP USER grant_user;
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
+mariadb.sys mysql_native_password
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
grant_user test_plugin_server plug_dest
-plug_dest *939AEE68989794C0F408277411C26055CDF41119
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
grant_user test_plugin_server plug_dest
-plug_dest *560881EB651416CEF77314D07D55EDCD5FC1BD6D
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *560881EB651416CEF77314D07D55EDCD5FC1BD6D *560881EB651416CEF77314D07D55EDCD5FC1BD6D
DROP USER grant_user,plug_dest;
set @@sql_mode= @save_sql_mode;
DROP DATABASE test_user_db;
diff --git a/mysql-test/main/plugin_auth_qa_1.result b/mysql-test/main/plugin_auth_qa_1.result
index 42a7b1491c0..24c86f1e2a8 100644
--- a/mysql-test/main/plugin_auth_qa_1.result
+++ b/mysql-test/main/plugin_auth_qa_1.result
@@ -1,9 +1,13 @@
CREATE DATABASE test_user_db;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
========== test 1.1.3.2 ====================================
CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
+GRANT PROXY ON `plug%dest` TO plug_user;
+ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
+REVOKE PROXY ON `plug%dest` FROM plug_user;
GRANT PROXY ON plug_dest TO plug_user;
current_user()
plug_dest@%
@@ -19,8 +23,9 @@ IDENTIFIED WITH test_plugin_server AS 'plug_dest';
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
GRANT PROXY ON plug_dest TO plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plug_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
1)
current_user()
@@ -70,8 +75,9 @@ ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using passwo
GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-new_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest;
CREATE USER plug_user
@@ -88,8 +94,9 @@ ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using passwo
GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-new_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest;
CREATE USER plug_user
@@ -109,15 +116,17 @@ USER() CURRENT_USER()
new_user@localhost plug_dest@%
connection default;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
new_user test_plugin_server plug_dest
-plug_dest
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
disconnect plug_user;
-UPDATE mysql.user SET user='plug_user' WHERE user='new_user';
+UPDATE mysql.global_priv SET user='plug_user' WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plug_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
DROP USER plug_dest,plug_user;
========== test 1.3 ========================================
@@ -132,35 +141,40 @@ plug_user@localhost plug_dest@%
connection default;
disconnect plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-plug_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
-UPDATE mysql.user SET user='new_user' WHERE user='plug_user';
+UPDATE mysql.global_priv SET user='new_user' WHERE user='plug_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
new_user test_plugin_server plug_dest
-plug_dest
-UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user';
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.authentication_string', 'new_dest') WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
new_user test_plugin_server new_dest
-plug_dest
-UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user';
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'new_plugin_server') WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
+mariadb.sys mysql_native_password
new_user new_plugin_server new_dest
-plug_dest
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
ERROR HY000: Plugin 'new_plugin_server' is not loaded
-UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user';
-UPDATE mysql.user SET USER='new_dest' WHERE user='plug_dest';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'test_plugin_server') WHERE user='new_user';
+UPDATE mysql.global_priv SET user='new_dest' WHERE user='plug_dest';
FLUSH PRIVILEGES;
GRANT PROXY ON new_dest TO new_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-new_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
new_user test_plugin_server new_dest
connect plug_user,localhost,new_user,new_dest;
select USER(),CURRENT_USER();
@@ -168,14 +182,15 @@ USER() CURRENT_USER()
new_user@localhost new_dest@%
connection default;
disconnect plug_user;
-UPDATE mysql.user SET USER='plug_dest' WHERE user='new_dest';
+UPDATE mysql.global_priv SET user='plug_dest' WHERE user='new_dest';
FLUSH PRIVILEGES;
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-new_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+new_dest mysql_native_password *01422E86A6FFF84618914AF149F9AEF64B84170A
new_user test_plugin_server new_dest
-plug_dest
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
GRANT ALL PRIVILEGES ON test.* TO new_user;
connect plug_user,localhost,new_dest,new_dest_passwd;
select USER(),CURRENT_USER();
@@ -188,9 +203,10 @@ DROP USER new_user,new_dest,plug_dest;
CREATE USER ''@'%%' IDENTIFIED WITH test_plugin_server AS 'proxied_user';
CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
test_plugin_server proxied_user
-proxied_user
+mariadb.sys mysql_native_password
+proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD
connect proxy_con,localhost,proxied_user,proxied_user_passwd;
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
@@ -224,9 +240,10 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'%%'
IDENTIFIED WITH test_plugin_server AS 'proxied_user';
CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
test_plugin_server proxied_user
-proxied_user
+mariadb.sys mysql_native_password
+proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD
connect proxy_con,localhost,proxied_user,proxied_user_passwd;
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
@@ -266,13 +283,14 @@ GRANT PROXY ON proxied_user_3 TO ''@'%%';
GRANT PROXY ON proxied_user_4 TO ''@'%%';
GRANT PROXY ON proxied_user_5 TO ''@'%%';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
test_plugin_server proxied_user
-proxied_user_1
-proxied_user_2
-proxied_user_3
-proxied_user_4
-proxied_user_5
+mariadb.sys mysql_native_password
+proxied_user_1 mysql_native_password *551D5A5177FCC3340F7D2FB0F4D8D1EEA7F7EF71
+proxied_user_2 mysql_native_password *3D948F77C6A988AFDCA9755AB2A6724362557220
+proxied_user_3 mysql_native_password *41A18925D237DEE738C76581153990B037F462E3
+proxied_user_4 mysql_native_password *F990073A9B96FF535C2D0721406042B8751E593F
+proxied_user_5 mysql_native_password *5AA915C5D0B5B1336336FD2BF7768BC09FD1F5B2
connect proxy_con_1,localhost,proxied_user_1,'proxied_user_1_pwd';
connect proxy_con_2,localhost,proxied_user_2,proxied_user_2_pwd;
connect proxy_con_3,localhost,proxied_user_3,proxied_user_3_pwd;
diff --git a/mysql-test/main/plugin_auth_qa_1.test b/mysql-test/main/plugin_auth_qa_1.test
index b0b8ffb3544..17fbf2ca25e 100644
--- a/mysql-test/main/plugin_auth_qa_1.test
+++ b/mysql-test/main/plugin_auth_qa_1.test
@@ -13,6 +13,10 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
# CREATE...WITH/CREATE...BY/GRANT
CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
+GRANT PROXY ON `plug%dest` TO plug_user;
+--error 1
+--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
+REVOKE PROXY ON `plug%dest` FROM plug_user;
GRANT PROXY ON plug_dest TO plug_user;
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
@@ -110,7 +114,7 @@ connection default;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
disconnect plug_user;
-UPDATE mysql.user SET user='plug_user' WHERE user='new_user';
+UPDATE mysql.global_priv SET user='plug_user' WHERE user='new_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -128,15 +132,15 @@ connection default;
disconnect plug_user;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-UPDATE mysql.user SET user='new_user' WHERE user='plug_user';
+UPDATE mysql.global_priv SET user='new_user' WHERE user='plug_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.authentication_string', 'new_dest') WHERE user='new_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'new_plugin_server') WHERE user='new_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -144,8 +148,8 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
--error ER_PLUGIN_IS_NOT_LOADED
connect(plug_user,localhost,new_user,new_dest);
--enable_query_log
-UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user';
-UPDATE mysql.user SET USER='new_dest' WHERE user='plug_dest';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'test_plugin_server') WHERE user='new_user';
+UPDATE mysql.global_priv SET user='new_dest' WHERE user='plug_dest';
FLUSH PRIVILEGES;
GRANT PROXY ON new_dest TO new_user;
--sorted_result
@@ -154,7 +158,7 @@ connect(plug_user,localhost,new_user,new_dest);
select USER(),CURRENT_USER();
connection default;
disconnect plug_user;
-UPDATE mysql.user SET USER='plug_dest' WHERE user='new_dest';
+UPDATE mysql.global_priv SET user='plug_dest' WHERE user='new_dest';
FLUSH PRIVILEGES;
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
--sorted_result
diff --git a/mysql-test/main/plugin_auth_qa_2.result b/mysql-test/main/plugin_auth_qa_2.result
index fa88530be6a..ea7227f9faa 100644
--- a/mysql-test/main/plugin_auth_qa_2.result
+++ b/mysql-test/main/plugin_auth_qa_2.result
@@ -6,8 +6,9 @@ CREATE USER qa_test_1_dest IDENTIFIED BY 'dest_passwd';
GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_passwd';
GRANT PROXY ON qa_test_1_dest TO qa_test_1_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-qa_test_1_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_1_user qa_auth_interface qa_test_1_dest
SELECT @@proxy_user;
@@proxy_user
@@ -19,8 +20,9 @@ exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_1_user --password=qa_test_1_
current_user() user() @@local.proxy_user @@local.external_user
qa_test_1_user@% qa_test_1_user@localhost NULL NULL
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-qa_test_1_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_1_user qa_auth_interface qa_test_1_dest
DROP USER qa_test_1_user;
DROP USER qa_test_1_dest;
@@ -32,9 +34,10 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_2_dest identified by 'dest_pas
GRANT PROXY ON qa_test_2_dest TO qa_test_2_user;
GRANT PROXY ON authenticated_as TO qa_test_2_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-authenticated_as
-qa_test_2_dest
+User plugin authentication_string
+authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+mariadb.sys mysql_native_password
+qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_user qa_auth_interface qa_test_2_dest
SELECT @@proxy_user;
@@proxy_user
@@ -46,9 +49,10 @@ exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_2_user --password=qa_test_2_
current_user() user() @@local.proxy_user @@local.external_user
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' externaluser
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-authenticated_as
-qa_test_2_dest
+User plugin authentication_string
+authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+mariadb.sys mysql_native_password
+qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_user qa_auth_interface qa_test_2_dest
DROP USER qa_test_2_user;
DROP USER qa_test_2_dest;
@@ -82,9 +86,10 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'localhost' identified by 'dest_pas
GRANT PROXY ON qa_test_5_dest TO qa_test_5_user;
GRANT PROXY ON qa_test_5_dest TO ''@'localhost';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
- *DFCACE76914AD7BD801FC1A1ECF6562272621A22
-qa_test_5_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+User plugin authentication_string Password
+ mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+mariadb.sys mysql_native_password
+qa_test_5_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_5_user qa_auth_interface qa_test_5_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_5_user'@'localhost' (using password: YES)
@@ -97,22 +102,25 @@ CREATE USER qa_test_6_dest IDENTIFIED BY 'dest_passwd';
GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_passwd';
GRANT PROXY ON qa_test_6_dest TO qa_test_6_user;
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
-qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
+qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using password: YES)
GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
-qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
+qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
REVOKE PROXY ON qa_test_6_dest FROM root;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
-qa_test_6_dest
+User plugin authentication_string
+mariadb.sys mysql_native_password
+qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
@@ -120,7 +128,8 @@ DROP USER qa_test_6_user;
DROP USER qa_test_6_dest;
DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
+mariadb.sys mysql_native_password
=== Test of the --default_auth option for clients ====
CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_11_dest';
CREATE USER qa_test_11_dest IDENTIFIED BY 'dest_passwd';
diff --git a/mysql-test/main/plugin_innodb.result b/mysql-test/main/plugin_innodb.result
index 48510ad8745..c55bfd779c2 100644
--- a/mysql-test/main/plugin_innodb.result
+++ b/mysql-test/main/plugin_innodb.result
@@ -3,9 +3,10 @@ create table t1(a int) engine=example;
drop table t1;
alter table mysql.plugin engine=innodb;
restart
+# restart
create table t1(a int) engine=example;
select * from t1;
a
drop table t1;
-alter table mysql.plugin engine=myisam;
+alter table mysql.plugin engine=aria;
uninstall plugin example;
diff --git a/mysql-test/main/plugin_innodb.test b/mysql-test/main/plugin_innodb.test
index 03afa190400..a9c7f04bd4a 100644
--- a/mysql-test/main/plugin_innodb.test
+++ b/mysql-test/main/plugin_innodb.test
@@ -15,6 +15,6 @@ create table t1(a int) engine=example;
select * from t1;
drop table t1;
-alter table mysql.plugin engine=myisam;
+alter table mysql.plugin engine=aria;
uninstall plugin example;
diff --git a/mysql-test/main/plugin_not_embedded.result b/mysql-test/main/plugin_not_embedded.result
index 84e47b4a4bc..a9ac5735137 100644
--- a/mysql-test/main/plugin_not_embedded.result
+++ b/mysql-test/main/plugin_not_embedded.result
@@ -17,5 +17,6 @@ DROP USER bug51770@localhost;
INSTALL PLUGIN example SONAME '../ha_example.so';
ERROR HY000: No paths allowed for shared library
insert mysql.plugin values ();
+# restart
delete from mysql.plugin where name = '';
# End of 5.5 tests
diff --git a/mysql-test/main/processlist_notembedded.result b/mysql-test/main/processlist_notembedded.result
index 46b1f0669cb..26f6e4f9247 100644
--- a/mysql-test/main/processlist_notembedded.result
+++ b/mysql-test/main/processlist_notembedded.result
@@ -9,7 +9,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
FOUND 1 /sleep/ in MDEV-20466.text
SET DEBUG_SYNC= 'now SIGNAL go';
connection con1;
-user
+User
disconnect con1;
connection default;
SET DEBUG_SYNC = 'RESET';
diff --git a/mysql-test/main/profiling.test b/mysql-test/main/profiling.test
index 1e1aada7c15..912e4f69798 100644
--- a/mysql-test/main/profiling.test
+++ b/mysql-test/main/profiling.test
@@ -60,6 +60,7 @@ select '012345678900123456789001234567890012345678900123456789001234567890012345
--replace_column 2 #
show profiles;
+--disable_ps_protocol
--disable_result_log
###--replace_column 2 # 3 # 4 #
show profile for query 15;
@@ -90,6 +91,7 @@ show profile all for query 0 limit 0;
###--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 11 # 12 # 13 # 16 #
show profile all for query 15;
###--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 11 # 12 # 13 # 16 #
+--enable_ps_protocol
select * from information_schema.profiling;
select query_id, state, duration from information_schema.profiling;
diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result
index 73e498c64ea..f1ef885b4c2 100644
--- a/mysql-test/main/ps.result
+++ b/mysql-test/main/ps.result
@@ -244,6 +244,8 @@ prepare stmt1 from "insert into t1 select i from t1";
execute stmt1;
execute stmt1;
prepare stmt1 from "select * from t1 into outfile '<MYSQLTEST_VARDIR>/tmp/f1.txt'";
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
execute stmt1;
deallocate prepare stmt1;
drop table t1;
@@ -1379,9 +1381,11 @@ test.t1 optimize status Table is already up to date
prepare stmt from "analyze table t1";
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
prepare stmt from "repair table t1, t2, t3";
execute stmt;
@@ -1408,13 +1412,19 @@ test.t3 optimize status Table is already up to date
prepare stmt from "analyze table t1, t2, t3";
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
prepare stmt from "repair table t1, t4, t3";
execute stmt;
@@ -1447,11 +1457,13 @@ execute stmt;
Table Op Msg_type Msg_text
test.t4 analyze Error Table 'test.t4' doesn't exist
test.t4 analyze status Operation failed
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
execute stmt;
Table Op Msg_type Msg_text
test.t4 analyze Error Table 'test.t4' doesn't exist
test.t4 analyze status Operation failed
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
deallocate prepare stmt;
drop table t1, t2, t3;
@@ -1518,6 +1530,7 @@ Field Type Null Key Default Extra
i int(11) YES NULL
execute stmt_analyze;
Table Op Msg_type Msg_text
+mysqltest_long_database_name_to_thrash_heap.t1 analyze status Engine-independent statistics collected
mysqltest_long_database_name_to_thrash_heap.t1 analyze status Table is already up to date
execute stmt_optimize;
Table Op Msg_type Msg_text
@@ -2132,12 +2145,13 @@ Database Table In_use Name_locked
mysql general_log 0 0
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
@@ -2145,12 +2159,13 @@ Database Table In_use Name_locked
mysql general_log 0 0
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
@@ -2158,12 +2173,13 @@ Database Table In_use Name_locked
mysql general_log 0 0
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
@@ -2171,12 +2187,13 @@ Database Table In_use Name_locked
mysql general_log 0 0
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
flush tables;
create function func_1() returns int begin flush tables; return 1; end|
@@ -2189,12 +2206,13 @@ drop procedure proc_1;
flush tables;
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
prepare abc from "flush tables";
execute abc;
@@ -2203,12 +2221,13 @@ Database Table In_use Name_locked
mysql general_log 0 0
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
execute abc;
show open tables from mysql;
@@ -2216,12 +2235,13 @@ Database Table In_use Name_locked
mysql general_log 0 0
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
execute abc;
show open tables from mysql;
@@ -2229,12 +2249,13 @@ Database Table In_use Name_locked
mysql general_log 0 0
select Host, User from mysql.user limit 0;
Host User
-select Host, Db from mysql.host limit 0;
-Host Db
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
-mysql host 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
flush tables;
deallocate prepare abc;
@@ -4423,15 +4444,15 @@ drop table t1;
CREATE TABLE t1 (id date, count int);
insert into t1 values ("2019-06-11",1),("2019-06-12",2);
update t1 set count = count + 1 where id = '1bad';
-ERROR 22007: Incorrect datetime value: '1bad'
+ERROR 22007: Truncated incorrect datetime value: '1bad'
prepare stmt from "update t1 set count = count + 1 where id = '1bad'";
execute stmt;
-ERROR 22007: Incorrect datetime value: '1bad'
+ERROR 22007: Truncated incorrect datetime value: '1bad'
deallocate prepare stmt;
prepare stmt from 'update t1 set count = count + 1 where id = ?';
set @a = '1bad';
execute stmt using @a;
-ERROR 22007: Incorrect datetime value: '1bad'
+ERROR 22007: Truncated incorrect datetime value: '1bad'
deallocate prepare stmt;
drop table t1;
set sql_mode=@save_sql_mode;
@@ -4526,7 +4547,7 @@ DEALLOCATE PREPARE stmt;
#
PREPARE stmt FROM 'SELECT ? FROM DUAL';
EXECUTE stmt USING (SELECT 1);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
DEALLOCATE PREPARE stmt;
CREATE FUNCTION f1() RETURNS VARCHAR(10) RETURN 'test';
PREPARE stmt FROM 'SELECT ? FROM DUAL';
@@ -4725,10 +4746,10 @@ ERROR 21000: Operand should contain 1 column(s)
# Testing disallowed expressions in USING
#
EXECUTE IMMEDIATE 'SELECT ? FROM DUAL' USING (SELECT 1);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
CREATE FUNCTION f1() RETURNS VARCHAR(10) RETURN 'test';
EXECUTE IMMEDIATE 'SELECT ? FROM DUAL' USING f1();
-ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
DROP FUNCTION f1;
#
# DDL
@@ -4911,9 +4932,9 @@ ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2
PREPARE stmt FROM CONCAT(_latin1'SELECT 1 AS c FROM ', _latin2 'DUAL');
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat'
EXECUTE IMMEDIATE (SELECT 'SELECT 1');
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 'SELECT 1')' at line 1
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
PREPARE stmt FROM (SELECT 'SELECT 1');
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 'SELECT 1')' at line 1
+ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
EXECUTE IMMEDIATE a;
ERROR 42S22: Unknown column 'a' in 'field list'
PREPARE stmt FROM a;
@@ -5329,6 +5350,7 @@ CREATE PROCEDURE p1(tn VARCHAR(32))
EXECUTE IMMEDIATE CONCAT('ANALYZE TABLE ',tn);
CALL p1('t1');
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
DROP PROCEDURE p1;
DROP TABLE t1;
@@ -5602,3 +5624,66 @@ a.a a.b
10 20
DEALLOCATE PREPARE stmt;
DROP PROCEDURE p1;
+#
+# MDEV-19263: Server crashes in mysql_handle_single_derived
+# upon 2nd execution of PS
+#
+CREATE TABLE t1 (f INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO v1 SELECT * FROM x;
+PREPARE stmt FROM "INSERT INTO v1 VALUES (1)";
+EXECUTE stmt;
+ERROR 42S02: Table 'test.x' doesn't exist
+EXECUTE stmt;
+ERROR 42S02: Table 'test.x' doesn't exist
+DEALLOCATE PREPARE stmt;
+DROP VIEW v1;
+DROP TABLE t1;
+#
+# MDEV-25197: The statement set password=password('') executed in PS mode
+# fails in case it is run by a user with expired password
+#
+CREATE USER user1@localhost PASSWORD EXPIRE;
+SET @disconnect_on_expired_password_save=@@global.disconnect_on_expired_password;
+SET GLOBAL disconnect_on_expired_password=OFF;
+connect con1,localhost,user1;
+connection con1;
+# Check that no regular statement like SELECT can be prepared
+# by a user with an expired password
+PREPARE stmt FROM "SELECT 1";
+ERROR HY000: You must SET PASSWORD before executing this statement
+# Check that the DEALLOCATE PREPARE statement can be run by a user
+# with an expired password
+PREPARE stmt FROM "SET password=password('')";
+DEALLOCATE PREPARE stmt;
+# Check that the SET PASSWORD statement can be executed in PS mode by
+# a user with an expired password
+PREPARE stmt FROM "SET password=password('')";
+EXECUTE stmt;
+PREPARE stmt FROM "SELECT 1";
+# Check that user's password is not expired anymore
+EXECUTE stmt;
+1
+1
+DEALLOCATE PREPARE stmt;
+# Clean up
+disconnect con1;
+connection default;
+SET GLOBAL disconnect_on_expired_password=@disconnect_on_expired_password_save;
+DROP USER user1@localhost;
+#
+# MDEV-21173: Assertion `m_thd == __null' failed in sp_head::~sp_head
+#
+CREATE TABLE t1 (a INT);
+EXECUTE IMMEDIATE "CREATE PROCEDURE p1() SELECT 1 FROM t1 PROCEDURE ANALYSE( 10, (SELECT a FROM t1));";
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
+DROP TABLE t1;
+BEGIN NOT ATOMIC
+PREPARE stmt FROM 'SELECT ?';
+EXECUTE stmt USING ((SELECT 1));
+END;
+$
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test
index 8c59f1e0840..062d729b2cc 100644
--- a/mysql-test/main/ps.test
+++ b/mysql-test/main/ps.test
@@ -2227,28 +2227,24 @@ flush tables;
--sorted_result
show open tables from mysql;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
call proc_1();
--sorted_result
show open tables from mysql;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
call proc_1();
--sorted_result
show open tables from mysql;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
call proc_1();
--sorted_result
show open tables from mysql;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
flush tables;
@@ -2268,7 +2264,6 @@ drop procedure proc_1;
--disable_ps_protocol
flush tables;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
--enable_ps_protocol
@@ -2278,21 +2273,18 @@ execute abc;
--sorted_result
show open tables from mysql;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
execute abc;
--sorted_result
show open tables from mysql;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
execute abc;
--sorted_result
show open tables from mysql;
select Host, User from mysql.user limit 0;
-select Host, Db from mysql.host limit 0;
--sorted_result
show open tables from mysql;
flush tables;
@@ -4050,7 +4042,7 @@ DEALLOCATE PREPARE stmt;
--echo #
PREPARE stmt FROM 'SELECT ? FROM DUAL';
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE stmt USING (SELECT 1);
DEALLOCATE PREPARE stmt;
@@ -4229,7 +4221,7 @@ EXECUTE IMMEDIATE 'SELECT ?' USING ROW(1,2);
--echo # Testing disallowed expressions in USING
--echo #
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE 'SELECT ? FROM DUAL' USING (SELECT 1);
CREATE FUNCTION f1() RETURNS VARCHAR(10) RETURN 'test';
@@ -4402,9 +4394,9 @@ EXECUTE IMMEDIATE CONCAT(_latin1'SELECT 1 AS c FROM ', _latin2 'DUAL');
--error ER_CANT_AGGREGATE_2COLLATIONS
PREPARE stmt FROM CONCAT(_latin1'SELECT 1 AS c FROM ', _latin2 'DUAL');
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE (SELECT 'SELECT 1');
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PREPARE stmt FROM (SELECT 'SELECT 1');
--error ER_BAD_FIELD_ERROR
@@ -5045,3 +5037,83 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP PROCEDURE p1;
+
+--echo #
+--echo # MDEV-19263: Server crashes in mysql_handle_single_derived
+--echo # upon 2nd execution of PS
+--echo #
+
+CREATE TABLE t1 (f INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO v1 SELECT * FROM x;
+PREPARE stmt FROM "INSERT INTO v1 VALUES (1)";
+
+--error ER_NO_SUCH_TABLE
+EXECUTE stmt;
+--error ER_NO_SUCH_TABLE
+EXECUTE stmt;
+
+# Cleanup
+DEALLOCATE PREPARE stmt;
+DROP VIEW v1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-25197: The statement set password=password('') executed in PS mode
+--echo # fails in case it is run by a user with expired password
+--echo #
+CREATE USER user1@localhost PASSWORD EXPIRE;
+
+SET @disconnect_on_expired_password_save=@@global.disconnect_on_expired_password;
+SET GLOBAL disconnect_on_expired_password=OFF;
+
+connect(con1,localhost,user1);
+connection con1;
+--echo # Check that no regular statement like SELECT can be prepared
+--echo # by a user with an expired password
+--error ER_MUST_CHANGE_PASSWORD
+PREPARE stmt FROM "SELECT 1";
+
+--echo # Check that the DEALLOCATE PREPARE statement can be run by a user
+--echo # with an expired password
+PREPARE stmt FROM "SET password=password('')";
+DEALLOCATE PREPARE stmt;
+
+--echo # Check that the SET PASSWORD statement can be executed in PS mode by
+--echo # a user with an expired password
+PREPARE stmt FROM "SET password=password('')";
+EXECUTE stmt;
+PREPARE stmt FROM "SELECT 1";
+--echo # Check that user's password is not expired anymore
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+
+--echo # Clean up
+disconnect con1;
+connection default;
+
+SET GLOBAL disconnect_on_expired_password=@disconnect_on_expired_password_save;
+DROP USER user1@localhost;
+
+--echo #
+--echo # MDEV-21173: Assertion `m_thd == __null' failed in sp_head::~sp_head
+--echo #
+CREATE TABLE t1 (a INT);
+
+--error ER_SUBQUERIES_NOT_SUPPORTED
+EXECUTE IMMEDIATE "CREATE PROCEDURE p1() SELECT 1 FROM t1 PROCEDURE ANALYSE( 10, (SELECT a FROM t1));";
+DROP TABLE t1;
+
+delimiter $;
+--error ER_SUBQUERIES_NOT_SUPPORTED
+BEGIN NOT ATOMIC
+ PREPARE stmt FROM 'SELECT ?';
+ EXECUTE stmt USING ((SELECT 1));
+END;
+$
+
+delimiter ;$
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/ps_1general.result b/mysql-test/main/ps_1general.result
index d26e7ec5bac..6fe2ea7b448 100644
--- a/mysql-test/main/ps_1general.result
+++ b/mysql-test/main/ps_1general.result
@@ -451,7 +451,7 @@ def possible_keys 253 4_OR_8_K 0 Y 0 39 8
def key 253 64 0 Y 0 39 8
def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
+def rows 253 64 1 Y 0 39 8
def Extra 253 255 14 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
@@ -462,15 +462,15 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def id 8 3 1 Y 32928 0 63
def select_type 253 19 6 N 1 39 8
def table 253 64 2 Y 0 39 8
-def type 253 10 5 Y 0 39 8
+def type 253 10 3 Y 0 39 8
def possible_keys 253 4_OR_8_K 7 Y 0 39 8
-def key 253 64 7 Y 0 39 8
-def key_len 253 4_OR_8_K 1 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 37 N 1 39 8
+def rows 253 64 1 Y 0 39 8
+def Extra 253 255 27 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using filesort
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using where; Using filesort
drop table if exists t2;
create table t2 (id smallint, name varchar(20)) ;
prepare stmt1 from ' insert into t2 values(?, ?) ' ;
diff --git a/mysql-test/main/ps_2myisam.result b/mysql-test/main/ps_2myisam.result
index 3906875da92..c85abaad051 100644
--- a/mysql-test/main/ps_2myisam.result
+++ b/mysql-test/main/ps_2myisam.result
@@ -1161,7 +1161,7 @@ def possible_keys 253 4_OR_8_K 0 Y 0 39 8
def key 253 64 0 Y 0 39 8
def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
+def rows 253 64 1 Y 0 39 8
def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
diff --git a/mysql-test/main/ps_3innodb.result b/mysql-test/main/ps_3innodb.result
index 9f5c8956dd8..53f736f41a3 100644
--- a/mysql-test/main/ps_3innodb.result
+++ b/mysql-test/main/ps_3innodb.result
@@ -1161,7 +1161,7 @@ def possible_keys 253 4_OR_8_K 0 Y 0 39 8
def key 253 64 0 Y 0 39 8
def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
+def rows 253 64 1 Y 0 39 8
def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
diff --git a/mysql-test/main/ps_4heap.result b/mysql-test/main/ps_4heap.result
index 46b4d9c58e5..0cf1ed13cba 100644
--- a/mysql-test/main/ps_4heap.result
+++ b/mysql-test/main/ps_4heap.result
@@ -1162,7 +1162,7 @@ def possible_keys 253 4_OR_8_K 0 Y 0 39 8
def key 253 64 0 Y 0 39 8
def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
+def rows 253 64 1 Y 0 39 8
def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
diff --git a/mysql-test/main/ps_5merge.result b/mysql-test/main/ps_5merge.result
index cc2f0f88b2a..49155394e2a 100644
--- a/mysql-test/main/ps_5merge.result
+++ b/mysql-test/main/ps_5merge.result
@@ -1205,7 +1205,7 @@ def possible_keys 253 4_OR_8_K 0 Y 0 39 8
def key 253 64 0 Y 0 39 8
def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
+def rows 253 64 1 Y 0 39 8
def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
@@ -4573,7 +4573,7 @@ def possible_keys 253 4_OR_8_K 0 Y 0 39 8
def key 253 64 0 Y 0 39 8
def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
+def rows 253 64 1 Y 0 39 8
def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
diff --git a/mysql-test/main/ps_ddl.result b/mysql-test/main/ps_ddl.result
index 68acf50aee1..c5c5b5a9ac0 100644
--- a/mysql-test/main/ps_ddl.result
+++ b/mysql-test/main/ps_ddl.result
@@ -20,6 +20,8 @@ else
select '' as "SUCCESS";
end if;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
set @reprepare_count= 0;
flush status;
=====================================================================
@@ -767,11 +769,12 @@ deallocate prepare stmt;
#
# Test 3: View referencing an Information schema table
#
-create view t1 as select table_name from information_schema.views;
+create view t1 as select table_name from information_schema.views order by table_name;
prepare stmt from "select * from t1";
execute stmt;
table_name
t1
+user
call p_verify_reprepare_count(0);
SUCCESS
@@ -779,6 +782,7 @@ create temporary table t1 (a int);
execute stmt;
table_name
t1
+user
call p_verify_reprepare_count(0);
SUCCESS
@@ -1071,6 +1075,8 @@ call p1(x);
return x;
end|
create procedure p1(out x int) select max(a) from t1 into x;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
prepare stmt from "select * from v1";
execute stmt;
f1()
@@ -1083,6 +1089,8 @@ SUCCESS
drop procedure p1;
create procedure p1(out x int) select max(a) from t2 into x;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# XXX: used to be a bug. The prelocked list was not invalidated
# and we kept opening table t1, whereas the procedure
# is now referring to table t2
@@ -1399,6 +1407,7 @@ SUCCESS
prepare stmt from "analyze table t1";
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
create table t1 (a1 int, a2 int);
@@ -1406,14 +1415,17 @@ insert into t1 values (1, 10), (2, 20), (3, 30);
# t1 has changed, and it's not a problem
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
alter table t1 add column b varchar(50) default NULL;
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
alter table t1 drop column b;
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
call p_verify_reprepare_count(0);
SUCCESS
diff --git a/mysql-test/main/ps_ddl.test b/mysql-test/main/ps_ddl.test
index 90226d379bf..dafb5b5dea3 100644
--- a/mysql-test/main/ps_ddl.test
+++ b/mysql-test/main/ps_ddl.test
@@ -699,7 +699,7 @@ deallocate prepare stmt;
--echo #
--echo # Test 3: View referencing an Information schema table
--echo #
-create view t1 as select table_name from information_schema.views;
+create view t1 as select table_name from information_schema.views order by table_name;
prepare stmt from "select * from t1";
execute stmt;
diff --git a/mysql-test/main/ps_ddl1.result b/mysql-test/main/ps_ddl1.result
index 667cbed8a7a..5178ee64f16 100644
--- a/mysql-test/main/ps_ddl1.result
+++ b/mysql-test/main/ps_ddl1.result
@@ -20,6 +20,8 @@ else
select '' as "SUCCESS";
end if;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
set @reprepare_count= 0;
flush status;
drop table if exists t1;
diff --git a/mysql-test/main/ps_error.result b/mysql-test/main/ps_error.result
index 448832dc7a8..ad178f86915 100644
--- a/mysql-test/main/ps_error.result
+++ b/mysql-test/main/ps_error.result
@@ -31,6 +31,7 @@ Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt;
ERROR 22007: Truncated incorrect DOUBLE value: 'foo'
+# restart
SELECT 'All done';
All done
All done
diff --git a/mysql-test/main/ps_grant.result b/mysql-test/main/ps_grant.result
index ab21c198b98..c9ef089b215 100644
--- a/mysql-test/main/ps_grant.result
+++ b/mysql-test/main/ps_grant.result
@@ -11,8 +11,8 @@ grant select on mysqltest.t9 to second_user@localhost
identified by 'looser' ;
show grants for second_user@localhost ;
Grants for second_user@localhost
-GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
+GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
connect con3,localhost,second_user,looser,mysqltest;
connection con3;
select current_user();
@@ -34,21 +34,21 @@ grant select on mysqltest.t1 to second_user@localhost
identified by 'looser' ;
show grants for second_user@localhost ;
Grants for second_user@localhost
-GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
-GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost`
+GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
+GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
drop table mysqltest.t9 ;
show grants for second_user@localhost ;
Grants for second_user@localhost
-GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
-GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost`
+GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
+GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
connection con3;
show grants for second_user@localhost ;
Grants for second_user@localhost
-GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
-GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost`
+GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
+GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
prepare s_t1 from 'select a as my_col from t1' ;
execute s_t1 ;
my_col
@@ -63,13 +63,13 @@ connection default;
revoke all privileges on mysqltest.t1 from second_user@localhost;
show grants for second_user@localhost ;
Grants for second_user@localhost
-GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
+GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
connection con3;
show grants for second_user@localhost ;
Grants for second_user@localhost
-GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost`
+GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
execute s_t1 ;
ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1'
connection default;
diff --git a/mysql-test/main/ps_grant.test b/mysql-test/main/ps_grant.test
index 3d59cc36de0..80a458bf874 100644
--- a/mysql-test/main/ps_grant.test
+++ b/mysql-test/main/ps_grant.test
@@ -40,6 +40,7 @@ grant usage on mysqltest.* to second_user@localhost
identified by 'looser' ;
grant select on mysqltest.t9 to second_user@localhost
identified by 'looser' ;
+--sorted_result
show grants for second_user@localhost ;
@@ -64,8 +65,10 @@ select a as my_col from t1;
connection default;
grant select on mysqltest.t1 to second_user@localhost
identified by 'looser' ;
+--sorted_result
show grants for second_user@localhost ;
drop table mysqltest.t9 ;
+--sorted_result
show grants for second_user@localhost ;
@@ -73,6 +76,7 @@ show grants for second_user@localhost ;
## switch to the second session
connection con3;
######## Question 1: The table t1 should be now accessible. ########
+--sorted_result
show grants for second_user@localhost ;
prepare s_t1 from 'select a as my_col from t1' ;
execute s_t1 ;
@@ -86,11 +90,13 @@ deallocate prepare s_t9;
## switch back to the first session
connection default;
revoke all privileges on mysqltest.t1 from second_user@localhost;
+--sorted_result
show grants for second_user@localhost ;
#### check the access as new user
## switch to the second session
connection con3;
+--sorted_result
show grants for second_user@localhost ;
######## Question 2: The table t1 should be now not accessible. ########
--error 1142
@@ -103,6 +109,7 @@ connection default;
disconnect con3 ;
## remove all rights of second_user@localhost
revoke all privileges, grant option from second_user@localhost ;
+--sorted_result
show grants for second_user@localhost ;
drop user second_user@localhost ;
commit ;
diff --git a/mysql-test/main/ps_innodb.result b/mysql-test/main/ps_innodb.result
index f77ae50d6de..2b9ec621f0f 100644
--- a/mysql-test/main/ps_innodb.result
+++ b/mysql-test/main/ps_innodb.result
@@ -49,15 +49,15 @@ drop table t1;
CREATE TABLE t1 (id date, count int) engine=innodb;
insert into t1 values ("2019-06-11",1),("2019-06-12",2);
update t1 set count = count + 1 where id = '1bad';
-ERROR 22007: Incorrect datetime value: '1bad'
+ERROR 22007: Truncated incorrect datetime value: '1bad'
prepare stmt from "update t1 set count = count + 1 where id = '1bad'";
execute stmt;
-ERROR 22007: Incorrect datetime value: '1bad'
+ERROR 22007: Truncated incorrect datetime value: '1bad'
deallocate prepare stmt;
prepare stmt from 'update t1 set count = count + 1 where id = ?';
set @a = '1bad';
execute stmt using @a;
-ERROR 22007: Incorrect datetime value: '1bad'
+ERROR 22007: Truncated incorrect datetime value: '1bad'
deallocate prepare stmt;
drop table t1;
set sql_mode=@save_sql_mode;
diff --git a/mysql-test/main/query_cache.result b/mysql-test/main/query_cache.result
index b3ec48ac830..fc7ca726c48 100644
--- a/mysql-test/main/query_cache.result
+++ b/mysql-test/main/query_cache.result
@@ -646,9 +646,13 @@ show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
select * from t1 into outfile "query_cache.out.file";
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select * from t1 into outfile "query_cache.out.file";
ERROR HY000: File 'query_cache.out.file' already exists
select * from t1 limit 1 into dumpfile "query_cache.dump.file";
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
@@ -964,19 +968,19 @@ INSERT INTO t1 VALUES ('20050326');
INSERT INTO t1 VALUES ('20050325');
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
COUNT(*)
-0
+1
Warnings:
-Warning 1292 Incorrect datetime value: '20050327 invalid'
+Warning 1292 Truncated incorrect date value: '20050327 invalid'
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
COUNT(*)
-0
+1
Warnings:
-Warning 1292 Incorrect datetime value: '20050328 invalid'
+Warning 1292 Truncated incorrect date value: '20050328 invalid'
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
COUNT(*)
-0
+1
Warnings:
-Warning 1292 Incorrect datetime value: '20050327 invalid'
+Warning 1292 Truncated incorrect date value: '20050327 invalid'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
@@ -1101,6 +1105,8 @@ Declare var1 int;
select max(a) from t1 into var1;
return var1;
end//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create procedure `p1`()
begin
select a, f1() from t1;
@@ -1859,17 +1865,17 @@ DROP TABLE t1;
SET GLOBAL query_cache_size= default;
CREATE TABLE t1( a INT );
SET @v = ( SELECT SQL_CACHE 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1 )' at line 1
+ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
SET @v = ( SELECT SQL_NO_CACHE 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1 )' at line 1
+ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT a FROM t1 WHERE a IN ( SELECT SQL_CACHE a FROM t1 );
-ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
SELECT a FROM t1 WHERE a IN ( SELECT SQL_NO_CACHE a FROM t1 );
-ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT ( SELECT SQL_CACHE a FROM t1 );
-ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
SELECT ( SELECT SQL_NO_CACHE a FROM t1 );
-ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT SQL_CACHE * FROM t1;
a
SELECT SQL_NO_CACHE * FROM t1;
@@ -1879,18 +1885,18 @@ ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT * FROM t1 WHERE a IN (SELECT SQL_CACHE a FROM t1);
-ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_CACHE a FROM t1);
-ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT * FROM t1 WHERE a IN (SELECT SQL_NO_CACHE a FROM t1);
-ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT * FROM t1 WHERE a IN
(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
-ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT SQL_CACHE SQL_NO_CACHE * FROM t1;
-ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE
+ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE
SELECT SQL_NO_CACHE SQL_CACHE * FROM t1;
ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE
SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
@@ -1903,10 +1909,10 @@ SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT SQL_CACHE * FROM t1 WHERE a IN
(SELECT SQL_NO_CACHE a FROM t1);
-ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
SELECT SQL_CACHE * FROM t1 WHERE a IN
(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
-ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
+ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
DROP TABLE t1;
End of 5.1 tests
#
diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test
index d518d7a3956..6e113f0cdb7 100644
--- a/mysql-test/main/query_cache.test
+++ b/mysql-test/main/query_cache.test
@@ -1535,22 +1535,21 @@ SET GLOBAL query_cache_size= default;
#
CREATE TABLE t1( a INT );
---error ER_PARSE_ERROR
+--error ER_CANT_USE_OPTION_HERE
SET @v = ( SELECT SQL_CACHE 1 );
---error ER_PARSE_ERROR
+--error ER_CANT_USE_OPTION_HERE
SET @v = ( SELECT SQL_NO_CACHE 1 );
#
-# Keywords 'SQL_CACHE' and 'SQL_NO_CACHE' are allowed as column names.
-# Hence the error messages are not intuitive.
+# Keywords 'SQL_CACHE' and 'SQL_NO_CACHE'.
#
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT a FROM t1 WHERE a IN ( SELECT SQL_CACHE a FROM t1 );
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT a FROM t1 WHERE a IN ( SELECT SQL_NO_CACHE a FROM t1 );
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT ( SELECT SQL_CACHE a FROM t1 );
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT ( SELECT SQL_NO_CACHE a FROM t1 );
SELECT SQL_CACHE * FROM t1;
@@ -1561,16 +1560,16 @@ SELECT SQL_NO_CACHE * FROM t1;
SELECT * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
--error ER_CANT_USE_OPTION_HERE
SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT * FROM t1 WHERE a IN (SELECT SQL_CACHE a FROM t1);
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_CACHE a FROM t1);
--error ER_CANT_USE_OPTION_HERE
SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT * FROM t1 WHERE a IN (SELECT SQL_NO_CACHE a FROM t1);
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT * FROM t1 WHERE a IN
(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
--error ER_WRONG_USAGE
@@ -1585,10 +1584,10 @@ SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
--error ER_CANT_USE_OPTION_HERE
SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT SQL_CACHE * FROM t1 WHERE a IN
(SELECT SQL_NO_CACHE a FROM t1);
---error ER_BAD_FIELD_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT SQL_CACHE * FROM t1 WHERE a IN
(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result
index c58fd29102a..0e728d76a3e 100644
--- a/mysql-test/main/range.result
+++ b/mysql-test/main/range.result
@@ -1,4 +1,9 @@
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
CREATE TABLE t1 (
event_date date DEFAULT '0000-00-00' NOT NULL,
type int(11) DEFAULT '0' NOT NULL,
@@ -245,7 +250,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select count(*) from t1 where x in (1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref x x 5 const 1 Using index
-explain select count(*) from t1 where x in (1,2);
+explain select count(*) from t1 where x in (1,2,3,4);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
drop table t1;
@@ -276,7 +281,7 @@ INSERT INTO t1 VALUES
(33,5),(33,5),(33,5),(33,5),(34,5),(35,5);
EXPLAIN SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a,b a 5 NULL 2 Using index condition; Using where
+1 SIMPLE t1 ref|filter a,b b|a 5|5 const 15 (5%) Using where; Using rowid filter
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
a b
DROP TABLE t1;
@@ -417,23 +422,25 @@ count(*)
1026
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition
+1 SIMPLE t1 range uid_index uid_index 4 NULL 111 Using index condition
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition
+1 SIMPLE t1 range uid_index uid_index 4 NULL 111 Using index condition
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using index condition
+1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using index condition
+1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id name uid id name uid
@@ -716,7 +723,7 @@ WHERE
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 5 Using index condition
+1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 6 Using index condition
1 SIMPLE s ALL OXLEFT NULL NULL NULL 12 Range checked for each record (index map: 0x4)
SELECT s.oxid FROM t1 v, t1 s
WHERE
@@ -893,12 +900,13 @@ INSERT INTO t1 VALUES
(43,'A'), (44,'A'), (45,'A'), (46,'A'), (47,'A'), (48,'A'),
(49,'A'), (50,'A'), (51,'A'), (52,'A'), (53,'C'), (54,'C'),
(55,'C'), (56,'C'), (57,'C'), (58,'C'), (59,'C'), (60,'C');
+INSERT INTO t1(status) SELECT status FROM t1;
EXPLAIN SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using index condition
+1 SIMPLE t1 range status status 23 NULL 18 Using index condition
EXPLAIN SELECT * FROM t1 WHERE status NOT IN ('A','B');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using index condition
+1 SIMPLE t1 range status status 23 NULL 18 Using index condition
SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
id status
53 C
@@ -909,6 +917,14 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
SELECT * FROM t1 WHERE status NOT IN ('A','B');
id status
53 C
@@ -919,18 +935,26 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
EXPLAIN SELECT status FROM t1 WHERE status <> 'A' AND status <> 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using where; Using index
+1 SIMPLE t1 range status status 23 NULL 18 Using where; Using index
EXPLAIN SELECT status FROM t1 WHERE status NOT IN ('A','B');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using where; Using index
+1 SIMPLE t1 range status status 23 NULL 18 Using where; Using index
EXPLAIN SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 10 Using index condition
+1 SIMPLE t1 range status status 23 NULL 17 Using index condition
EXPLAIN SELECT * FROM t1 WHERE status < 'A' OR status > 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 10 Using index condition; Using where
+1 SIMPLE t1 range status status 23 NULL 17 Using index condition
SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
id status
53 C
@@ -941,6 +965,14 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
SELECT * FROM t1 WHERE status < 'A' OR status > 'B';
id status
53 C
@@ -951,6 +983,14 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, primary key(a,b));
INSERT INTO t1 VALUES
@@ -958,16 +998,16 @@ INSERT INTO t1 VALUES
CREATE VIEW v1 as SELECT a,b FROM t1 WHERE b=3;
EXPLAIN SELECT a,b FROM t1 WHERE a < 2 and b=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
EXPLAIN SELECT a,b FROM v1 WHERE a < 2 and b=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
EXPLAIN SELECT a,b FROM t1 WHERE a < 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
EXPLAIN SELECT a,b FROM v1 WHERE a < 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT a,b FROM t1 WHERE a < 2 and b=3;
a b
1 3
@@ -1007,10 +1047,10 @@ INSERT INTO `t1` VALUES
,(13,2),(14,2),(15,3),(16,3),(17,3),(18,3),(19,3);
explain select * from t1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from v1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t1 where a between 3 and 4 and b between 1 and 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
@@ -1034,13 +1074,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 13 NULL # Using index condition
explain select * from t1 where a = 'a' or a='a ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 13 NULL # Using index condition; Using where
+1 SIMPLE t1 range a a 13 NULL # Using index condition
explain select * from t2 where a between 'a' and 'a ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref a a 13 const # Using index condition
explain select * from t2 where a = 'a' or a='a ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref a a 13 const # Using index condition; Using where
+1 SIMPLE t2 ref a a 13 const # Using index condition
update t1 set a='b' where a<>'a';
explain select * from t1 where a not between 'b' and 'b';
id select_type table type possible_keys key key_len ref rows Extra
@@ -1066,10 +1106,10 @@ id b c
0 3 4
EXPLAIN SELECT * FROM t1 WHERE b<=3 AND 3<=c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using index condition; Using where
+1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 2 Using index condition; Using where
EXPLAIN SELECT * FROM t1 WHERE 3 BETWEEN b AND c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using where
+1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 2 Using where
SELECT * FROM t1 WHERE 0 < b OR 0 > c;
id b c
0 3 4
@@ -1080,10 +1120,10 @@ id b c
0 3 4
EXPLAIN SELECT * FROM t1 WHERE 0 < b OR 0 > c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
+1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 3 Using sort_union(idx1,idx2); Using where
EXPLAIN SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
+1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 3 Using sort_union(idx1,idx2); Using where
DROP TABLE t1;
CREATE TABLE t1 (
item char(20) NOT NULL default '',
@@ -1098,11 +1138,11 @@ INSERT INTO t1 VALUES
('A2','2005-12-01 08:00:00',1000);
EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 2 Using index condition
+1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 3 Using index condition
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
item started price
Warnings:
-Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00'
+Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00'
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
item started price
A1 2005-11-01 08:00:00 1000.000
@@ -1114,7 +1154,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
item started price
Warnings:
-Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00'
+Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00'
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
item started price
A1 2005-11-01 08:00:00 1000.000
@@ -1142,7 +1182,8 @@ CREATE TABLE t1 (
a varchar(32), index (a)
) DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
INSERT INTO t1 VALUES
-('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A');
+('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A'), ('C'), ('A');
+INSERT INTO t1 VALUES ('X'),('Y'),('Z'),('X1'),('Y1'),('Z1'),('X1'),('Y1'),('Z1');
SELECT a FROM t1 WHERE a='b' OR a='B';
a
B
@@ -1202,13 +1243,15 @@ Z
In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)
explain select * from t2 where a=1000 and b<11;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref a a 5 const 502 Using index condition
+1 SIMPLE t2 ref a a 5 const 503 Using index condition
drop table t1, t2;
CREATE TABLE t1( a INT, b INT, KEY( a, b ) );
CREATE TABLE t2( a INT, b INT, KEY( a, b ) );
CREATE TABLE t3( a INT, b INT, KEY( a, b ) );
-INSERT INTO t1( a, b )
-VALUES (0, 1), (1, 2), (1, 4), (2, 3), (5, 0), (9, 7);
+INSERT INTO t1( a, b ) VALUES
+(0, 1), (1, 2), (1, 4), (2, 3), (5, 0), (9, 7),
+(10, 11), (11,12), (11, 14), (12, 13), (15, 10), (19, 17),
+(20, 21), (21,22), (21, 24), (22, 23), (25, 20), (29, 27);
INSERT INTO t2( a, b )
VALUES ( 1, 1), ( 2, 1), ( 3, 1), ( 4, 1), ( 5, 1),
( 6, 1), ( 7, 1), ( 8, 1), ( 9, 1), (10, 1),
@@ -1219,65 +1262,68 @@ INSERT INTO t2 SELECT a, 3 FROM t2 WHERE b = 1;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
-INSERT INTO t3
-VALUES (1, 0), (2, 0), (3, 0), (4, 0), (5, 0),
-(6, 0), (7, 0), (8, 0), (9, 0), (10, 0);
+INSERT INTO t3 VALUES
+(1, 0), (2, 0), (3, 0), (4, 0), (5, 0),
+(6, 0), (7, 0), (8, 0), (9, 0), (10, 0),
+(11, 0), (12, 0), (13, 0), (14, 0), (15, 0),
+(16, 0), (17, 0), (18, 0), (19, 0), (20, 0);
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
+insert into t1 select -a,b from t1;
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 < a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 < a AND b = 23 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 < a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 < a AND b = 23 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 1 OR
15 <= a AND a < 20 AND b = 3
@@ -1316,7 +1362,7 @@ SELECT * FROM t2 WHERE
OR
1 <= a AND b = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 10 NULL 50 Using where; Using index
+1 SIMPLE t2 range a a 10 NULL 49 Using where; Using index
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 2 OR
15 <= a AND a < 20 AND b = 3
@@ -1360,7 +1406,7 @@ SELECT * FROM t2 WHERE
OR
1 <= a AND b = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 10 NULL 50 Using where; Using index
+1 SIMPLE t2 range a a 10 NULL 49 Using where; Using index
SELECT * FROM t3 WHERE
5 <= a AND a < 10 AND b = 3 OR
a < 5 OR
@@ -1381,7 +1427,7 @@ SELECT * FROM t3 WHERE
a < 5 OR
a < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range a a 5 NULL 8 Using where; Using index
+1 SIMPLE t3 index a a 10 NULL 23 Using where; Using index
DROP TABLE t1, t2, t3;
#
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
@@ -1399,10 +1445,16 @@ CREATE TABLE t2 ( a DATETIME, KEY ( a ) );
# Make optimizer choose range scan
INSERT INTO t1 VALUES ('2009-09-22'), ('2009-09-22'), ('2009-09-22');
INSERT INTO t1 VALUES ('2009-09-23'), ('2009-09-23'), ('2009-09-23');
+INSERT INTO t1 VALUES ('2009-09-20'), ('2009-09-20'), ('2009-09-20');
+INSERT INTO t1 VALUES ('2009-09-21'), ('2009-09-21'), ('2009-09-21');
INSERT INTO t2 VALUES ('2009-09-22 12:00:00'), ('2009-09-22 12:00:00'),
('2009-09-22 12:00:00');
INSERT INTO t2 VALUES ('2009-09-23 12:00:00'), ('2009-09-23 12:00:00'),
('2009-09-23 12:00:00');
+INSERT INTO t2 VALUES ('2009-09-20 12:00:00'), ('2009-09-20 12:00:00'),
+('2009-09-20 12:00:00');
+INSERT INTO t2 VALUES ('2009-09-21 12:00:00'), ('2009-09-21 12:00:00'),
+('2009-09-21 12:00:00');
# DATE vs DATE
EXPLAIN
SELECT * FROM t1 WHERE a >= '2009/09/23';
@@ -1564,7 +1616,7 @@ str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20'
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
str_to_date('2007-20-00', '%Y-%m-%d') <= '';
str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
@@ -1579,7 +1631,7 @@ SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20'
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '';
str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND ''
NULL
@@ -1657,7 +1709,8 @@ DROP TABLE t1;
#
CREATE TABLE t1(pk INT PRIMARY KEY, i4 INT);
CREATE UNIQUE INDEX i4_uq ON t1(i4);
-INSERT INTO t1 VALUES (1,10), (2,20), (3,30);
+INSERT INTO t1 VALUES
+(1,10), (2,20), (3,30), (4,40), (5,50), (6,60), (7,70), (8,80);
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1673,14 +1726,13 @@ SELECT * FROM t1 WHERE 10 BETWEEN i4 AND i4;
pk i4
1 10
EXPLAIN
-SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
+SELECT * FROM t1 WHERE 70 BETWEEN 70 AND i4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range i4_uq i4_uq 5 NULL 3 Using index condition
-SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
+1 SIMPLE t1 range i4_uq i4_uq 5 NULL 2 Using index condition
+SELECT * FROM t1 WHERE 70 BETWEEN 70 AND i4;
pk i4
-1 10
-2 20
-3 30
+7 70
+8 80
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1691,12 +1743,17 @@ pk i4
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND 10;
pk i4
1 10
2 20
3 30
+4 40
+5 50
+6 60
+7 70
+8 80
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 11 AND 11;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1716,14 +1773,13 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1 WHERE i4 BETWEEN 100 AND 0;
pk i4
EXPLAIN
-SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
+SELECT * FROM t1 WHERE i4 BETWEEN 70 AND 99999999999999999;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range i4_uq i4_uq 5 NULL 2 Using index condition
-SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
+SELECT * FROM t1 WHERE i4 BETWEEN 70 AND 99999999999999999;
pk i4
-1 10
-2 20
-3 30
+7 70
+8 80
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 999999999999999 AND 30;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1733,7 +1789,7 @@ pk i4
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND '20';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range i4_uq i4_uq 5 NULL 1 Using index condition
+1 SIMPLE t1 range i4_uq i4_uq 5 NULL 2 Using index condition
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND '20';
pk i4
1 10
@@ -1741,14 +1797,14 @@ pk i4
EXPLAIN
SELECT * FROM t1, t1 as t2 WHERE t2.pk BETWEEN t1.i4 AND t1.i4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL i4_uq NULL NULL NULL 3
+1 SIMPLE t1 ALL i4_uq NULL NULL NULL 8
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.i4 1 Using index condition
SELECT * FROM t1, t1 as t2 WHERE t2.pk BETWEEN t1.i4 AND t1.i4;
pk i4 pk i4
EXPLAIN
SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL i4_uq NULL NULL NULL 3
+1 SIMPLE t1 ALL i4_uq NULL NULL NULL 8
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.i4 1 Using index condition
SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
pk i4 pk i4
@@ -1887,6 +1943,7 @@ alter table t1 add key2 int not null, add index i2(key2);
update t1 set key2=key1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create table t2 (a int);
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8);
@@ -1894,19 +1951,23 @@ insert into t2 select a+16 from t2;
insert into t2 select a+32 from t2;
insert into t2 select a+64 from t2;
explain
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < 1000;
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 1000;
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 range i1,i2 i1 4 NULL 78 Using where; Using join buffer (flat, BNL join)
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < 1000;
+1 SIMPLE t1 range i1,i2 i1 4 NULL 12 Using where; Using join buffer (flat, BNL join)
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 1000;
count(*)
-128
+832
explain
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < t2.a;
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 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 range i1,i2 i1 4 NULL 78 Using where; Using join buffer (flat, BNL join)
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < t2.a;
+1 SIMPLE t1 range i1,i2 i1 4 NULL 12 Using where; Using join buffer (flat, BNL join)
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < t2.a;
count(*)
126
drop table t1,t2;
@@ -1920,7 +1981,7 @@ insert into t1 values (0,0,0), (2,2,0), (1,1,1), (2,2,1);
explain
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 3 Using where; Using index
+1 SIMPLE t1 index idx idx 15 NULL 4 Using where; Using index
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
a b c
2 2 0
@@ -1950,7 +2011,7 @@ INSERT INTO t100(I,J) VALUES(8,26);
EXPLAIN SELECT * FROM t100 WHERE I <> 6 OR (I <> 8 AND J = 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t100 range I I 10 NULL 4 Using index condition; Using where
+1 SIMPLE t100 range I I 10 NULL 3 Using index condition
SELECT * FROM t100 WHERE I <> 6 OR (I <> 8 AND J = 5);
K I J
@@ -2077,6 +2138,7 @@ insert into t2 select * from t2;
insert into t2 values (0, 0, 0, 0), (1, 1, 1, 1);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select a, b from t2 where (a, b) in ((0, 0), (1, 1));
a b
@@ -2124,7 +2186,7 @@ INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
explain
SELECT * FROM t1 WHERE a > 5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a > 5;
a
6
@@ -2285,10 +2347,10 @@ CREATE TABLE t1 (a INT, b INT, KEY(a));
INSERT INTO t1 (a) VALUES (10),(10),(10),(10),(10),(10),(10),(10),(10),(10),(70);
EXPLAIN SELECT * FROM t1 WHERE a<>10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using index condition
+1 SIMPLE t1 range a a 5 NULL 2 Using index condition
EXPLAIN SELECT * FROM t1 WHERE 10<>a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using index condition
+1 SIMPLE t1 range a a 5 NULL 2 Using index condition
SELECT * FROM t1 WHERE a<>10;
a b
70 NULL
@@ -2344,7 +2406,7 @@ insert into t1 values
# range access to t1 by 2-component keys for index idx
explain select * from t1 where (a,b) IN ((2, 3),(3,3),(8,8),(7,7));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 10 NULL 7 Using where
+1 SIMPLE t1 range idx idx 10 NULL 6 Using where
explain format=json select * from t1 where (a,b) IN ((2, 3),(3,3),(8,8),(7,7));
EXPLAIN
{
@@ -2357,7 +2419,7 @@ EXPLAIN
"key": "idx",
"key_length": "10",
"used_key_parts": ["a", "b"],
- "rows": 7,
+ "rows": 6,
"filtered": 100,
"attached_condition": "(t1.a,t1.b) in (<cache>((2,3)),<cache>((3,3)),<cache>((8,8)),<cache>((7,7)))"
}
@@ -2484,7 +2546,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["d"],
"rows": 3,
- "filtered": 100,
+ "filtered": 60,
"index_condition": "t2.d is not null",
"attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((2,2)))"
},
@@ -2540,8 +2602,8 @@ insert into t2 values
explain select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 6 Using index condition
-1 SIMPLE t2 ref idx1,idx2 idx1 5 test.t1.a 12 Using where
+1 SIMPLE t2 range|filter idx1,idx2 idx1|idx2 5|5 NULL 8 (14%) Using index condition; Using where; Using rowid filter
+1 SIMPLE t1 ref idx idx 5 test.t2.d 8
explain format=json select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
EXPLAIN
@@ -2549,27 +2611,35 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "t1",
+ "table_name": "t2",
"access_type": "range",
- "possible_keys": ["idx"],
- "key": "idx",
+ "possible_keys": ["idx1", "idx2"],
+ "key": "idx1",
"key_length": "5",
- "used_key_parts": ["a"],
- "rows": 6,
- "filtered": 100,
- "index_condition": "t1.a is not null"
+ "used_key_parts": ["d"],
+ "rowid_filter": {
+ "range": {
+ "key": "idx2",
+ "used_key_parts": ["e"]
+ },
+ "rows": 15,
+ "selectivity_pct": 14.423
+ },
+ "rows": 8,
+ "filtered": 14.423,
+ "index_condition": "t2.d is not null",
+ "attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
},
"table": {
- "table_name": "t2",
+ "table_name": "t1",
"access_type": "ref",
- "possible_keys": ["idx1", "idx2"],
- "key": "idx1",
+ "possible_keys": ["idx"],
+ "key": "idx",
"key_length": "5",
- "used_key_parts": ["d"],
- "ref": ["test.t1.a"],
- "rows": 12,
- "filtered": 100,
- "attached_condition": "(t1.a,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.d"],
+ "rows": 8,
+ "filtered": 100
}
}
}
@@ -2577,16 +2647,16 @@ select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
a b c d e f
3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuua 3 3 i
3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
3 3 zyxa 3 3 i
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
3 3 zyxa 3 3 i
7 7 xxxyy 7 7 h
7 7 xxxya 7 7 h
@@ -2597,16 +2667,16 @@ where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1";
execute stmt;
a b c d e f
3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuua 3 3 i
3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
3 3 zyxa 3 3 i
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
3 3 zyxa 3 3 i
7 7 xxxyy 7 7 h
7 7 xxxya 7 7 h
@@ -2615,16 +2685,16 @@ a b c d e f
execute stmt;
a b c d e f
3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuua 3 3 i
3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
3 3 zyxa 3 3 i
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
3 3 zyxa 3 3 i
7 7 xxxyy 7 7 h
7 7 xxxya 7 7 h
@@ -2637,7 +2707,7 @@ insert into t1 select * from t1;
explain select * from t1,t2
where a = d and (a,e) in ((4,4),(7,7),(8,8)) and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx1,idx2 idx2 5 NULL 6 Using where
+1 SIMPLE t2 range|filter idx1,idx2 idx1|idx2 5|5 NULL 7 (7%) Using index condition; Using where; Using rowid filter
1 SIMPLE t1 ref idx idx 5 test.t2.d 11
explain format=json select * from t1,t2
where a = d and (a,e) in ((4,4),(7,7),(8,8)) and length(f) = 1;
@@ -2649,12 +2719,21 @@ EXPLAIN
"table_name": "t2",
"access_type": "range",
"possible_keys": ["idx1", "idx2"],
- "key": "idx2",
+ "key": "idx1",
"key_length": "5",
- "used_key_parts": ["e"],
- "rows": 6,
- "filtered": 100,
- "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1 and t2.d is not null"
+ "used_key_parts": ["d"],
+ "rowid_filter": {
+ "range": {
+ "key": "idx2",
+ "used_key_parts": ["e"]
+ },
+ "rows": 7,
+ "selectivity_pct": 6.7308
+ },
+ "rows": 7,
+ "filtered": 6.7308,
+ "index_condition": "t2.d is not null",
+ "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
},
"table": {
"table_name": "t1",
@@ -2839,7 +2918,7 @@ explain select * from t1,t2
where a = d and (a,2) in ((2,2),(7,7),(8,8)) and
length(c) = 1 and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 13 Using index condition; Using where
+1 SIMPLE t1 range idx idx 5 NULL 12 Using index condition; Using where
1 SIMPLE t2 ref idx3 idx3 5 test.t1.a 3 Using where
explain format=json select * from t1,t2
where a = d and (a,2) in ((2,2),(7,7),(8,8)) and
@@ -2855,7 +2934,7 @@ EXPLAIN
"key": "idx",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 13,
+ "rows": 12,
"filtered": 100,
"index_condition": "t1.a is not null",
"attached_condition": "(t1.a,2) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and octet_length(t1.c) = 1"
@@ -2915,7 +2994,7 @@ where id = 1 and a = d and
length(c) = 1 and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range idx idx 5 NULL 13 Using index condition; Using where
+1 SIMPLE t1 range idx idx 5 NULL 12 Using index condition; Using where
1 SIMPLE t2 ref idx3 idx3 5 test.t1.a 3 Using where
explain format=json select * from t1,t2,t3
where id = 1 and a = d and
@@ -2943,7 +3022,7 @@ EXPLAIN
"key": "idx",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 13,
+ "rows": 12,
"filtered": 100,
"index_condition": "t1.a is not null",
"attached_condition": "(t1.a,1 + 1) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and octet_length(t1.c) = 1"
@@ -3004,6 +3083,7 @@ insert into t1 select a+15, concat(b,'yy') from t1;
insert into t1 select a+100, concat(b,'xx') from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select cast(count(a)/count(distinct a) as unsigned) as rec_per_key from t1;
rec_per_key
@@ -3022,7 +3102,7 @@ a b
set eq_range_index_dive_limit=2;
explain select * from t1 where a in (8, 15, 31, 1, 9);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 10 Using index condition
+1 SIMPLE t1 range idx idx 5 NULL 5 Using index condition
select * from t1 where a in (8, 15, 31, 1, 9);
a b
1 yy
@@ -3083,6 +3163,7 @@ insert into t1(a,b) select a+30, b+300 from t1;
insert into t1(a,b) select a,b from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 where ((a between 3 and 4) and b < 100) or (a between 2 and 5);
id select_type table type possible_keys key key_len ref rows Extra
@@ -3163,6 +3244,17 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR
id a b code num
DROP TABLE t1, t2;
#
+# MDEV-23634: Select query hanged the server and leads to OOM ...
+# (The fix is to add the same handling for "col!=const" as MDEV-21958 did for NOT IN)
+#
+create table t1 (pk int primary key, a int);
+insert into t1 (pk) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+# must not use range:
+explain select * from t1 force index (primary) where pk != 1 and pk!=2 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 10 Using where
+drop table t1;
+#
# MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value
#
create table t1 (pk int, i int, v int, primary key (pk), key(v));
@@ -3206,3 +3298,27 @@ drop table t1,t2;
#
# End of 10.2 tests
#
+#
+# MDEV-18551: New defaults for eq_range_index_dive_limit
+#
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int, key(a));
+insert into t1 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C;
+insert into t1 select 1 from ten A, ten B,ten C;
+create table t2(a int, key(a));
+insert into t2 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C where A.a + B.a*10 + C.a*100 < 199;
+# expected type=range, rows=1487 , reason=using index dives
+analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198);
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 index a a 5 NULL 2000 2000.00 74.35 59.95 Using where; Using index
+insert into t2 values (200),(201);
+# expected type=range, rows=201 , reason=using index statistics
+analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,200,201);
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
+drop table t1,ten,t2;
+# End of 10.4 tests
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test
index caa10a690ce..10245857265 100644
--- a/mysql-test/main/range.test
+++ b/mysql-test/main/range.test
@@ -2,7 +2,14 @@
# Problem with range optimizer
#
--source include/have_innodb.inc
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
+
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
CREATE TABLE t1 (
event_date date DEFAULT '0000-00-00' NOT NULL,
@@ -189,7 +196,7 @@ explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y;
explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
# testing IN
explain select count(*) from t1 where x in (1);
-explain select count(*) from t1 where x in (1,2);
+explain select count(*) from t1 where x in (1,2,3,4);
drop table t1;
#
@@ -746,6 +753,7 @@ INSERT INTO t1 VALUES
(43,'A'), (44,'A'), (45,'A'), (46,'A'), (47,'A'), (48,'A'),
(49,'A'), (50,'A'), (51,'A'), (52,'A'), (53,'C'), (54,'C'),
(55,'C'), (56,'C'), (57,'C'), (58,'C'), (59,'C'), (60,'C');
+INSERT INTO t1(status) SELECT status FROM t1;
EXPLAIN SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
EXPLAIN SELECT * FROM t1 WHERE status NOT IN ('A','B');
@@ -951,7 +959,8 @@ CREATE TABLE t1 (
) DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
INSERT INTO t1 VALUES
- ('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A');
+ ('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A'), ('C'), ('A');
+INSERT INTO t1 VALUES ('X'),('Y'),('Z'),('X1'),('Y1'),('Z1'),('X1'),('Y1'),('Z1');
SELECT a FROM t1 WHERE a='b' OR a='B';
EXPLAIN SELECT a FROM t1 WHERE a='b' OR a='B';
@@ -1041,8 +1050,10 @@ CREATE TABLE t2( a INT, b INT, KEY( a, b ) );
CREATE TABLE t3( a INT, b INT, KEY( a, b ) );
-INSERT INTO t1( a, b )
-VALUES (0, 1), (1, 2), (1, 4), (2, 3), (5, 0), (9, 7);
+INSERT INTO t1( a, b ) VALUES
+ (0, 1), (1, 2), (1, 4), (2, 3), (5, 0), (9, 7),
+ (10, 11), (11,12), (11, 14), (12, 13), (15, 10), (19, 17),
+ (20, 21), (21,22), (21, 24), (22, 23), (25, 20), (29, 27);
INSERT INTO t2( a, b )
VALUES ( 1, 1), ( 2, 1), ( 3, 1), ( 4, 1), ( 5, 1),
@@ -1058,61 +1069,63 @@ INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
-INSERT INTO t3
-VALUES (1, 0), (2, 0), (3, 0), (4, 0), (5, 0),
- (6, 0), (7, 0), (8, 0), (9, 0), (10, 0);
+INSERT INTO t3 VALUES
+ (1, 0), (2, 0), (3, 0), (4, 0), (5, 0),
+ (6, 0), (7, 0), (8, 0), (9, 0), (10, 0),
+ (11, 0), (12, 0), (13, 0), (14, 0), (15, 0),
+ (16, 0), (17, 0), (18, 0), (19, 0), (20, 0);
# To make range scan compelling to the optimizer
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
-
+insert into t1 select -a,b from t1;
#
# Problem#1 Test queries. Will give missing results unless Problem#1 is fixed.
# With one exception, they are independent of Problem#2.
#
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 < a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 < a AND b = 23 OR
+23 <= a;
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 < a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 < a AND b = 23 OR
+23 <= a;
# Query below: Tests both Problem#1 and Problem#2 (EXPLAIN differs as well)
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+23 <= a;
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+23 <= a;
#
# Problem#2 Test queries.
@@ -1176,11 +1189,17 @@ CREATE TABLE t2 ( a DATETIME, KEY ( a ) );
--echo # Make optimizer choose range scan
INSERT INTO t1 VALUES ('2009-09-22'), ('2009-09-22'), ('2009-09-22');
INSERT INTO t1 VALUES ('2009-09-23'), ('2009-09-23'), ('2009-09-23');
+INSERT INTO t1 VALUES ('2009-09-20'), ('2009-09-20'), ('2009-09-20');
+INSERT INTO t1 VALUES ('2009-09-21'), ('2009-09-21'), ('2009-09-21');
INSERT INTO t2 VALUES ('2009-09-22 12:00:00'), ('2009-09-22 12:00:00'),
('2009-09-22 12:00:00');
INSERT INTO t2 VALUES ('2009-09-23 12:00:00'), ('2009-09-23 12:00:00'),
('2009-09-23 12:00:00');
+INSERT INTO t2 VALUES ('2009-09-20 12:00:00'), ('2009-09-20 12:00:00'),
+ ('2009-09-20 12:00:00');
+INSERT INTO t2 VALUES ('2009-09-21 12:00:00'), ('2009-09-21 12:00:00'),
+ ('2009-09-21 12:00:00');
--echo # DATE vs DATE
--replace_column 1 X 2 X 3 X 7 X 8 X 9 X 10 X
@@ -1321,7 +1340,9 @@ DROP TABLE t1;
CREATE TABLE t1(pk INT PRIMARY KEY, i4 INT);
CREATE UNIQUE INDEX i4_uq ON t1(i4);
-INSERT INTO t1 VALUES (1,10), (2,20), (3,30);
+INSERT INTO t1 VALUES
+ (1,10), (2,20), (3,30), (4,40), (5,50), (6,60), (7,70), (8,80);
+
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 10;
@@ -1332,8 +1353,8 @@ SELECT * FROM t1 WHERE 10 BETWEEN i4 AND i4;
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND i4;
EXPLAIN
-SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
-SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
+SELECT * FROM t1 WHERE 70 BETWEEN 70 AND i4;
+SELECT * FROM t1 WHERE 70 BETWEEN 70 AND i4;
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND 10;
@@ -1356,8 +1377,8 @@ SELECT * FROM t1 WHERE i4 BETWEEN 100 AND 0;
SELECT * FROM t1 WHERE i4 BETWEEN 100 AND 0;
EXPLAIN
-SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
-SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
+SELECT * FROM t1 WHERE i4 BETWEEN 70 AND 99999999999999999;
+SELECT * FROM t1 WHERE i4 BETWEEN 70 AND 99999999999999999;
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 999999999999999 AND 30;
@@ -1480,11 +1501,15 @@ insert into t2 select a+32 from t2;
insert into t2 select a+64 from t2;
explain
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < 1000;
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < 1000;
+select count(*) from t2 left join t1
+ on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 1000;
+select count(*) from t2 left join t1
+ on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 1000;
explain
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < t2.a;
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < t2.a;
+select count(*) from t2 left join t1
+ on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < t2.a;
+select count(*) from t2 left join t1
+ on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < t2.a;
drop table t1,t2;
@@ -2191,6 +2216,17 @@ DROP TABLE t1, t2;
--echo #
+--echo # MDEV-23634: Select query hanged the server and leads to OOM ...
+--echo # (The fix is to add the same handling for "col!=const" as MDEV-21958 did for NOT IN)
+--echo #
+create table t1 (pk int primary key, a int);
+insert into t1 (pk) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+--echo # must not use range:
+explain select * from t1 force index (primary) where pk != 1 and pk!=2 ;
+drop table t1;
+
+--echo #
--echo # MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value
--echo #
@@ -2230,3 +2266,32 @@ drop table t1,t2;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-18551: New defaults for eq_range_index_dive_limit
+--echo #
+
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int, key(a));
+insert into t1 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C;
+insert into t1 select 1 from ten A, ten B,ten C;
+
+create table t2(a int, key(a));
+insert into t2 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C where A.a + B.a*10 + C.a*100 < 199;
+
+let $a= `select group_concat(a) from t2`;
+
+--echo # expected type=range, rows=1487 , reason=using index dives
+eval analyze SELECT * FROM t1 where a in ($a);
+insert into t2 values (200),(201);
+let $a= `select group_concat(a) from t2`;
+--echo # expected type=range, rows=201 , reason=using index statistics
+eval analyze SELECT * FROM t1 where a in ($a);
+drop table t1,ten,t2;
+
+--echo # End of 10.4 tests
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result
index df111bc05be..0caf16cbab8 100644
--- a/mysql-test/main/range_innodb.result
+++ b/mysql-test/main/range_innodb.result
@@ -30,6 +30,7 @@ repeat('0123456789', 10)
from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
# The following must not use "Range checked for each record":
explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
@@ -160,6 +161,7 @@ set @save_isp=@@innodb_stats_persistent;
set global innodb_stats_persistent= 1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set optimizer_switch='index_merge_sort_intersection=on';
SELECT * FROM t1
@@ -213,3 +215,22 @@ set optimizer_switch='index_merge_sort_intersection=default';
set global innodb_stats_persistent= @save_isp;
DROP TABLE t1;
# End of 10.2 tests
+#
+# MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase,
+# [Warning] InnoDB: Using a partial-field key prefix in search
+#
+CREATE TABLE t1 (
+pk INT,
+a VARCHAR(1),
+b INT,
+PRIMARY KEY (pk),
+KEY (a,b)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,'a',1),(2,'b',2);
+explain SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index PRIMARY,a a 9 NULL 2 Using where; Using index
+SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
+a
+drop table t1;
+# End of 10.4 tests
diff --git a/mysql-test/main/range_innodb.test b/mysql-test/main/range_innodb.test
index b8a6a7c960c..8b9771d1d1e 100644
--- a/mysql-test/main/range_innodb.test
+++ b/mysql-test/main/range_innodb.test
@@ -209,3 +209,24 @@ set global innodb_stats_persistent= @save_isp;
DROP TABLE t1;
--echo # End of 10.2 tests
+
+--echo #
+--echo # MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase,
+--echo # [Warning] InnoDB: Using a partial-field key prefix in search
+--echo #
+
+CREATE TABLE t1 (
+ pk INT,
+ a VARCHAR(1),
+ b INT,
+ PRIMARY KEY (pk),
+ KEY (a,b)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES (1,'a',1),(2,'b',2);
+
+explain SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
+SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
+drop table t1;
+
+-- echo # End of 10.4 tests
diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result
index a271fdcdc92..51de18acf9c 100644
--- a/mysql-test/main/range_mrr_icp.result
+++ b/mysql-test/main/range_mrr_icp.result
@@ -1,6 +1,12 @@
set @mrr_icp_extra_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+set optimizer_switch='rowid_filter=off';
+SET optimizer_use_condition_selectivity=4;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
CREATE TABLE t1 (
event_date date DEFAULT '0000-00-00' NOT NULL,
type int(11) DEFAULT '0' NOT NULL,
@@ -247,7 +253,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select count(*) from t1 where x in (1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref x x 5 const 1 Using index
-explain select count(*) from t1 where x in (1,2);
+explain select count(*) from t1 where x in (1,2,3,4);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
drop table t1;
@@ -419,23 +425,25 @@ count(*)
1026
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range uid_index uid_index 4 NULL 111 Using index condition; Rowid-ordered scan
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range uid_index uid_index 4 NULL 111 Using index condition; Rowid-ordered scan
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition; Rowid-ordered scan
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition; Rowid-ordered scan
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id name uid id name uid
@@ -718,7 +726,7 @@ WHERE
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 5 Using index condition
+1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 6 Using index condition
1 SIMPLE s ALL OXLEFT NULL NULL NULL 12 Range checked for each record (index map: 0x4)
SELECT s.oxid FROM t1 v, t1 s
WHERE
@@ -895,12 +903,13 @@ INSERT INTO t1 VALUES
(43,'A'), (44,'A'), (45,'A'), (46,'A'), (47,'A'), (48,'A'),
(49,'A'), (50,'A'), (51,'A'), (52,'A'), (53,'C'), (54,'C'),
(55,'C'), (56,'C'), (57,'C'), (58,'C'), (59,'C'), (60,'C');
+INSERT INTO t1(status) SELECT status FROM t1;
EXPLAIN SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range status status 23 NULL 18 Using index condition; Rowid-ordered scan
EXPLAIN SELECT * FROM t1 WHERE status NOT IN ('A','B');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range status status 23 NULL 18 Using index condition; Rowid-ordered scan
SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
id status
53 C
@@ -911,6 +920,14 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
SELECT * FROM t1 WHERE status NOT IN ('A','B');
id status
53 C
@@ -921,18 +938,26 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
EXPLAIN SELECT status FROM t1 WHERE status <> 'A' AND status <> 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using where; Using index
+1 SIMPLE t1 range status status 23 NULL 18 Using where; Using index
EXPLAIN SELECT status FROM t1 WHERE status NOT IN ('A','B');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 11 Using where; Using index
+1 SIMPLE t1 range status status 23 NULL 18 Using where; Using index
EXPLAIN SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 10 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range status status 23 NULL 17 Using index condition; Rowid-ordered scan
EXPLAIN SELECT * FROM t1 WHERE status < 'A' OR status > 'B';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range status status 23 NULL 10 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range status status 23 NULL 17 Using index condition; Rowid-ordered scan
SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
id status
53 C
@@ -943,6 +968,14 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
SELECT * FROM t1 WHERE status < 'A' OR status > 'B';
id status
53 C
@@ -953,6 +986,14 @@ id status
58 C
59 C
60 C
+113 C
+114 C
+115 C
+116 C
+117 C
+118 C
+119 C
+120 C
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, primary key(a,b));
INSERT INTO t1 VALUES
@@ -960,16 +1001,16 @@ INSERT INTO t1 VALUES
CREATE VIEW v1 as SELECT a,b FROM t1 WHERE b=3;
EXPLAIN SELECT a,b FROM t1 WHERE a < 2 and b=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
EXPLAIN SELECT a,b FROM v1 WHERE a < 2 and b=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
EXPLAIN SELECT a,b FROM t1 WHERE a < 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
EXPLAIN SELECT a,b FROM v1 WHERE a < 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using index
SELECT a,b FROM t1 WHERE a < 2 and b=3;
a b
1 3
@@ -1009,10 +1050,10 @@ INSERT INTO `t1` VALUES
,(13,2),(14,2),(15,3),(16,3),(17,3),(18,3),(19,3);
explain select * from t1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from v1 where a in (3,4) and b in (1,2,3);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t1 where a between 3 and 4 and b between 1 and 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
@@ -1036,13 +1077,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 13 NULL # Using index condition; Rowid-ordered scan
explain select * from t1 where a = 'a' or a='a ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 13 NULL # Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range a a 13 NULL # Using index condition; Rowid-ordered scan
explain select * from t2 where a between 'a' and 'a ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref a a 13 const # Using index condition
explain select * from t2 where a = 'a' or a='a ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref a a 13 const # Using index condition; Using where
+1 SIMPLE t2 ref a a 13 const # Using index condition
update t1 set a='b' where a<>'a';
explain select * from t1 where a not between 'b' and 'b';
id select_type table type possible_keys key key_len ref rows Extra
@@ -1068,10 +1109,10 @@ id b c
0 3 4
EXPLAIN SELECT * FROM t1 WHERE b<=3 AND 3<=c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 2 Using index condition; Using where; Rowid-ordered scan
EXPLAIN SELECT * FROM t1 WHERE 3 BETWEEN b AND c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using where; Rowid-ordered scan
+1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 2 Using where; Rowid-ordered scan
SELECT * FROM t1 WHERE 0 < b OR 0 > c;
id b c
0 3 4
@@ -1082,10 +1123,10 @@ id b c
0 3 4
EXPLAIN SELECT * FROM t1 WHERE 0 < b OR 0 > c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
+1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 3 Using sort_union(idx1,idx2); Using where
EXPLAIN SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
+1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 3 Using sort_union(idx1,idx2); Using where
DROP TABLE t1;
CREATE TABLE t1 (
item char(20) NOT NULL default '',
@@ -1100,11 +1141,11 @@ INSERT INTO t1 VALUES
('A2','2005-12-01 08:00:00',1000);
EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 2 Using index condition
+1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 3 Using index condition
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
item started price
Warnings:
-Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00'
+Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00'
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
item started price
A1 2005-11-01 08:00:00 1000.000
@@ -1116,7 +1157,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
item started price
Warnings:
-Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00'
+Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00'
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
item started price
A1 2005-11-01 08:00:00 1000.000
@@ -1144,7 +1185,8 @@ CREATE TABLE t1 (
a varchar(32), index (a)
) DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
INSERT INTO t1 VALUES
-('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A');
+('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A'), ('C'), ('A');
+INSERT INTO t1 VALUES ('X'),('Y'),('Z'),('X1'),('Y1'),('Z1'),('X1'),('Y1'),('Z1');
SELECT a FROM t1 WHERE a='b' OR a='B';
a
B
@@ -1204,13 +1246,15 @@ Z
In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)
explain select * from t2 where a=1000 and b<11;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref a a 5 const 502 Using index condition
+1 SIMPLE t2 ref a a 5 const 503 Using index condition
drop table t1, t2;
CREATE TABLE t1( a INT, b INT, KEY( a, b ) );
CREATE TABLE t2( a INT, b INT, KEY( a, b ) );
CREATE TABLE t3( a INT, b INT, KEY( a, b ) );
-INSERT INTO t1( a, b )
-VALUES (0, 1), (1, 2), (1, 4), (2, 3), (5, 0), (9, 7);
+INSERT INTO t1( a, b ) VALUES
+(0, 1), (1, 2), (1, 4), (2, 3), (5, 0), (9, 7),
+(10, 11), (11,12), (11, 14), (12, 13), (15, 10), (19, 17),
+(20, 21), (21,22), (21, 24), (22, 23), (25, 20), (29, 27);
INSERT INTO t2( a, b )
VALUES ( 1, 1), ( 2, 1), ( 3, 1), ( 4, 1), ( 5, 1),
( 6, 1), ( 7, 1), ( 8, 1), ( 9, 1), (10, 1),
@@ -1221,65 +1265,68 @@ INSERT INTO t2 SELECT a, 3 FROM t2 WHERE b = 1;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
-INSERT INTO t3
-VALUES (1, 0), (2, 0), (3, 0), (4, 0), (5, 0),
-(6, 0), (7, 0), (8, 0), (9, 0), (10, 0);
+INSERT INTO t3 VALUES
+(1, 0), (2, 0), (3, 0), (4, 0), (5, 0),
+(6, 0), (7, 0), (8, 0), (9, 0), (10, 0),
+(11, 0), (12, 0), (13, 0), (14, 0), (15, 0),
+(16, 0), (17, 0), (18, 0), (19, 0), (20, 0);
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
+insert into t1 select -a,b from t1;
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 < a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 < a AND b = 23 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 < a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 < a AND b = 23 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a < 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a < 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-5 <= a AND b = 3 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+25 <= a AND b = 23 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+23 <= a;
a b
-5 0
-9 7
+25 20
+29 27
EXPLAIN
SELECT * FROM t1 WHERE
-3 <= a AND a <= 5 OR
-3 <= a;
+23 <= a AND a <= 25 OR
+23 <= a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 1 OR
15 <= a AND a < 20 AND b = 3
@@ -1318,7 +1365,7 @@ SELECT * FROM t2 WHERE
OR
1 <= a AND b = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 10 NULL 50 Using where; Using index
+1 SIMPLE t2 range a a 10 NULL 49 Using where; Using index
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 2 OR
15 <= a AND a < 20 AND b = 3
@@ -1362,7 +1409,7 @@ SELECT * FROM t2 WHERE
OR
1 <= a AND b = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 10 NULL 50 Using where; Using index
+1 SIMPLE t2 range a a 10 NULL 49 Using where; Using index
SELECT * FROM t3 WHERE
5 <= a AND a < 10 AND b = 3 OR
a < 5 OR
@@ -1383,7 +1430,7 @@ SELECT * FROM t3 WHERE
a < 5 OR
a < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range a a 5 NULL 8 Using where; Using index
+1 SIMPLE t3 index a a 10 NULL 23 Using where; Using index
DROP TABLE t1, t2, t3;
#
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
@@ -1401,10 +1448,16 @@ CREATE TABLE t2 ( a DATETIME, KEY ( a ) );
# Make optimizer choose range scan
INSERT INTO t1 VALUES ('2009-09-22'), ('2009-09-22'), ('2009-09-22');
INSERT INTO t1 VALUES ('2009-09-23'), ('2009-09-23'), ('2009-09-23');
+INSERT INTO t1 VALUES ('2009-09-20'), ('2009-09-20'), ('2009-09-20');
+INSERT INTO t1 VALUES ('2009-09-21'), ('2009-09-21'), ('2009-09-21');
INSERT INTO t2 VALUES ('2009-09-22 12:00:00'), ('2009-09-22 12:00:00'),
('2009-09-22 12:00:00');
INSERT INTO t2 VALUES ('2009-09-23 12:00:00'), ('2009-09-23 12:00:00'),
('2009-09-23 12:00:00');
+INSERT INTO t2 VALUES ('2009-09-20 12:00:00'), ('2009-09-20 12:00:00'),
+('2009-09-20 12:00:00');
+INSERT INTO t2 VALUES ('2009-09-21 12:00:00'), ('2009-09-21 12:00:00'),
+('2009-09-21 12:00:00');
# DATE vs DATE
EXPLAIN
SELECT * FROM t1 WHERE a >= '2009/09/23';
@@ -1566,7 +1619,7 @@ str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20'
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
str_to_date('2007-20-00', '%Y-%m-%d') <= '';
str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
@@ -1581,7 +1634,7 @@ SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20'
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '';
str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND ''
NULL
@@ -1659,7 +1712,8 @@ DROP TABLE t1;
#
CREATE TABLE t1(pk INT PRIMARY KEY, i4 INT);
CREATE UNIQUE INDEX i4_uq ON t1(i4);
-INSERT INTO t1 VALUES (1,10), (2,20), (3,30);
+INSERT INTO t1 VALUES
+(1,10), (2,20), (3,30), (4,40), (5,50), (6,60), (7,70), (8,80);
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1675,14 +1729,13 @@ SELECT * FROM t1 WHERE 10 BETWEEN i4 AND i4;
pk i4
1 10
EXPLAIN
-SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
+SELECT * FROM t1 WHERE 70 BETWEEN 70 AND i4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range i4_uq i4_uq 5 NULL 3 Using index condition; Rowid-ordered scan
-SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
+1 SIMPLE t1 range i4_uq i4_uq 5 NULL 2 Using index condition; Rowid-ordered scan
+SELECT * FROM t1 WHERE 70 BETWEEN 70 AND i4;
pk i4
-1 10
-2 20
-3 30
+7 70
+8 80
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1693,12 +1746,17 @@ pk i4
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND 10;
pk i4
1 10
2 20
3 30
+4 40
+5 50
+6 60
+7 70
+8 80
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 11 AND 11;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1718,14 +1776,13 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT * FROM t1 WHERE i4 BETWEEN 100 AND 0;
pk i4
EXPLAIN
-SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
+SELECT * FROM t1 WHERE i4 BETWEEN 70 AND 99999999999999999;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range i4_uq i4_uq 5 NULL 2 Using index condition; Rowid-ordered scan
-SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
+SELECT * FROM t1 WHERE i4 BETWEEN 70 AND 99999999999999999;
pk i4
-1 10
-2 20
-3 30
+7 70
+8 80
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 999999999999999 AND 30;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1735,7 +1792,7 @@ pk i4
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND '20';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range i4_uq i4_uq 5 NULL 1 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range i4_uq i4_uq 5 NULL 2 Using index condition; Rowid-ordered scan
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND '20';
pk i4
1 10
@@ -1743,14 +1800,14 @@ pk i4
EXPLAIN
SELECT * FROM t1, t1 as t2 WHERE t2.pk BETWEEN t1.i4 AND t1.i4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL i4_uq NULL NULL NULL 3
+1 SIMPLE t1 ALL i4_uq NULL NULL NULL 8
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.i4 1 Using index condition
SELECT * FROM t1, t1 as t2 WHERE t2.pk BETWEEN t1.i4 AND t1.i4;
pk i4 pk i4
EXPLAIN
SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL i4_uq NULL NULL NULL 3
+1 SIMPLE t1 ALL i4_uq NULL NULL NULL 8
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.i4 1 Using index condition
SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
pk i4 pk i4
@@ -1889,6 +1946,7 @@ alter table t1 add key2 int not null, add index i2(key2);
update t1 set key2=key1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create table t2 (a int);
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8);
@@ -1896,19 +1954,23 @@ insert into t2 select a+16 from t2;
insert into t2 select a+32 from t2;
insert into t2 select a+64 from t2;
explain
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < 1000;
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 1000;
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 range i1,i2 i1 4 NULL 78 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < 1000;
+1 SIMPLE t1 range i1,i2 i1 4 NULL 12 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 1000;
count(*)
-128
+832
explain
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < t2.a;
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < 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 range i1,i2 i1 4 NULL 78 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
-select count(*) from t2 left join t1 on (t1.key1 < 3 or t1.key1 > 1020) and t1.key2 < t2.a;
+1 SIMPLE t1 range i1,i2 i1 4 NULL 12 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
+select count(*) from t2 left join t1
+on (t1.key1 < 3 or t1.key1 between 920 and 930) and t1.key2 < t2.a;
count(*)
126
drop table t1,t2;
@@ -1922,7 +1984,7 @@ insert into t1 values (0,0,0), (2,2,0), (1,1,1), (2,2,1);
explain
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 3 Using where; Using index
+1 SIMPLE t1 index idx idx 15 NULL 4 Using where; Using index
select * from t1 force index (idx) where a >=1 and c <= 1 and a=b and b > 1;
a b c
2 2 0
@@ -1952,7 +2014,7 @@ INSERT INTO t100(I,J) VALUES(8,26);
EXPLAIN SELECT * FROM t100 WHERE I <> 6 OR (I <> 8 AND J = 5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t100 range I I 10 NULL 4 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t100 range I I 10 NULL 3 Using index condition; Rowid-ordered scan
SELECT * FROM t100 WHERE I <> 6 OR (I <> 8 AND J = 5);
K I J
@@ -2079,6 +2141,7 @@ insert into t2 select * from t2;
insert into t2 values (0, 0, 0, 0), (1, 1, 1, 1);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select a, b from t2 where (a, b) in ((0, 0), (1, 1));
a b
@@ -2126,7 +2189,7 @@ INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
explain
SELECT * FROM t1 WHERE a > 5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
SELECT * FROM t1 WHERE a > 5;
a
6
@@ -2287,10 +2350,10 @@ CREATE TABLE t1 (a INT, b INT, KEY(a));
INSERT INTO t1 (a) VALUES (10),(10),(10),(10),(10),(10),(10),(10),(10),(10),(70);
EXPLAIN SELECT * FROM t1 WHERE a<>10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range a a 5 NULL 2 Using index condition; Rowid-ordered scan
EXPLAIN SELECT * FROM t1 WHERE 10<>a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range a a 5 NULL 2 Using index condition; Rowid-ordered scan
SELECT * FROM t1 WHERE a<>10;
a b
70 NULL
@@ -2346,7 +2409,7 @@ insert into t1 values
# range access to t1 by 2-component keys for index idx
explain select * from t1 where (a,b) IN ((2, 3),(3,3),(8,8),(7,7));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 10 NULL 7 Using where; Rowid-ordered scan
+1 SIMPLE t1 range idx idx 10 NULL 6 Using where; Rowid-ordered scan
explain format=json select * from t1 where (a,b) IN ((2, 3),(3,3),(8,8),(7,7));
EXPLAIN
{
@@ -2359,7 +2422,7 @@ EXPLAIN
"key": "idx",
"key_length": "10",
"used_key_parts": ["a", "b"],
- "rows": 7,
+ "rows": 6,
"filtered": 100,
"attached_condition": "(t1.a,t1.b) in (<cache>((2,3)),<cache>((3,3)),<cache>((8,8)),<cache>((7,7)))",
"mrr_type": "Rowid-ordered scan"
@@ -2489,7 +2552,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["d"],
"rows": 3,
- "filtered": 100,
+ "filtered": 60,
"index_condition": "t2.d is not null",
"attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((2,2)))",
"mrr_type": "Rowid-ordered scan"
@@ -2546,8 +2609,8 @@ insert into t2 values
explain select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 6 Using index condition; Rowid-ordered scan
-1 SIMPLE t2 ref idx1,idx2 idx1 5 test.t1.a 12 Using where
+1 SIMPLE t2 range idx1,idx2 idx1 5 NULL 8 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 ref idx idx 5 test.t2.d 8
explain format=json select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
EXPLAIN
@@ -2555,88 +2618,88 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "t1",
+ "table_name": "t2",
"access_type": "range",
- "possible_keys": ["idx"],
- "key": "idx",
+ "possible_keys": ["idx1", "idx2"],
+ "key": "idx1",
"key_length": "5",
- "used_key_parts": ["a"],
- "rows": 6,
- "filtered": 100,
- "index_condition": "t1.a is not null",
+ "used_key_parts": ["d"],
+ "rows": 8,
+ "filtered": 14.423,
+ "index_condition": "t2.d is not null",
+ "attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1",
"mrr_type": "Rowid-ordered scan"
},
"table": {
- "table_name": "t2",
+ "table_name": "t1",
"access_type": "ref",
- "possible_keys": ["idx1", "idx2"],
- "key": "idx1",
+ "possible_keys": ["idx"],
+ "key": "idx",
"key_length": "5",
- "used_key_parts": ["d"],
- "ref": ["test.t1.a"],
- "rows": 12,
- "filtered": 100,
- "attached_condition": "(t1.a,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.d"],
+ "rows": 8,
+ "filtered": 100
}
}
}
select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
a b c d e f
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-7 8 xxxxx 7 7 h
-7 7 xxxyy 7 7 h
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
-7 8 xxxxa 7 7 h
-7 7 xxxya 7 7 h
-3 3 zyxa 3 3 i
3 3 zyxa 3 3 i
+7 7 xxxyy 7 7 h
+7 7 xxxya 7 7 h
+7 8 xxxxx 7 7 h
+7 8 xxxxa 7 7 h
+3 2 uuuw 3 3 i
3 2 uuua 3 3 i
-3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
+3 3 zyxa 3 3 i
prepare stmt from "select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1";
execute stmt;
a b c d e f
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-7 8 xxxxx 7 7 h
-7 7 xxxyy 7 7 h
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 3 zzza 3 3 i
3 3 zzza 3 3 i
-7 8 xxxxa 7 7 h
-7 7 xxxya 7 7 h
3 3 zyxa 3 3 i
-3 3 zyxa 3 3 i
-3 2 uuua 3 3 i
+7 7 xxxyy 7 7 h
+7 7 xxxya 7 7 h
+7 8 xxxxx 7 7 h
+7 8 xxxxa 7 7 h
+3 2 uuuw 3 3 i
3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
+3 3 zyxa 3 3 i
execute stmt;
a b c d e f
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-7 8 xxxxx 7 7 h
-7 7 xxxyy 7 7 h
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
-7 8 xxxxa 7 7 h
-7 7 xxxya 7 7 h
-3 3 zyxa 3 3 i
3 3 zyxa 3 3 i
+7 7 xxxyy 7 7 h
+7 7 xxxya 7 7 h
+7 8 xxxxx 7 7 h
+7 8 xxxxa 7 7 h
+3 2 uuuw 3 3 i
3 2 uuua 3 3 i
-3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
+3 3 zyxa 3 3 i
deallocate prepare stmt;
insert into t1 select * from t1;
# join order: (t2,t1) with ref access of t1
@@ -2644,7 +2707,7 @@ insert into t1 select * from t1;
explain select * from t1,t2
where a = d and (a,e) in ((4,4),(7,7),(8,8)) and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx1,idx2 idx2 5 NULL 6 Using where; Rowid-ordered scan
+1 SIMPLE t2 range idx1,idx2 idx1 5 NULL 7 Using index condition; Using where; Rowid-ordered scan
1 SIMPLE t1 ref idx idx 5 test.t2.d 11
explain format=json select * from t1,t2
where a = d and (a,e) in ((4,4),(7,7),(8,8)) and length(f) = 1;
@@ -2656,12 +2719,13 @@ EXPLAIN
"table_name": "t2",
"access_type": "range",
"possible_keys": ["idx1", "idx2"],
- "key": "idx2",
+ "key": "idx1",
"key_length": "5",
- "used_key_parts": ["e"],
- "rows": 6,
- "filtered": 100,
- "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1 and t2.d is not null",
+ "used_key_parts": ["d"],
+ "rows": 7,
+ "filtered": 6.7308,
+ "index_condition": "t2.d is not null",
+ "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1",
"mrr_type": "Rowid-ordered scan"
},
"table": {
@@ -2849,7 +2913,7 @@ explain select * from t1,t2
where a = d and (a,2) in ((2,2),(7,7),(8,8)) and
length(c) = 1 and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 13 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range idx idx 5 NULL 12 Using index condition; Using where; Rowid-ordered scan
1 SIMPLE t2 ref idx3 idx3 5 test.t1.a 3 Using where
explain format=json select * from t1,t2
where a = d and (a,2) in ((2,2),(7,7),(8,8)) and
@@ -2865,7 +2929,7 @@ EXPLAIN
"key": "idx",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 13,
+ "rows": 12,
"filtered": 100,
"index_condition": "t1.a is not null",
"attached_condition": "(t1.a,2) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and octet_length(t1.c) = 1",
@@ -2926,7 +2990,7 @@ where id = 1 and a = d and
length(c) = 1 and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range idx idx 5 NULL 13 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range idx idx 5 NULL 12 Using index condition; Using where; Rowid-ordered scan
1 SIMPLE t2 ref idx3 idx3 5 test.t1.a 3 Using where
explain format=json select * from t1,t2,t3
where id = 1 and a = d and
@@ -2954,7 +3018,7 @@ EXPLAIN
"key": "idx",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 13,
+ "rows": 12,
"filtered": 100,
"index_condition": "t1.a is not null",
"attached_condition": "(t1.a,1 + 1) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and octet_length(t1.c) = 1",
@@ -3016,6 +3080,7 @@ insert into t1 select a+15, concat(b,'yy') from t1;
insert into t1 select a+100, concat(b,'xx') from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select cast(count(a)/count(distinct a) as unsigned) as rec_per_key from t1;
rec_per_key
@@ -3034,7 +3099,7 @@ a b
set eq_range_index_dive_limit=2;
explain select * from t1 where a in (8, 15, 31, 1, 9);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 10 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range idx idx 5 NULL 5 Using index condition; Rowid-ordered scan
select * from t1 where a in (8, 15, 31, 1, 9);
a b
1 yy
@@ -3095,6 +3160,7 @@ insert into t1(a,b) select a+30, b+300 from t1;
insert into t1(a,b) select a,b from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 where ((a between 3 and 4) and b < 100) or (a between 2 and 5);
id select_type table type possible_keys key key_len ref rows Extra
@@ -3175,6 +3241,17 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR
id a b code num
DROP TABLE t1, t2;
#
+# MDEV-23634: Select query hanged the server and leads to OOM ...
+# (The fix is to add the same handling for "col!=const" as MDEV-21958 did for NOT IN)
+#
+create table t1 (pk int primary key, a int);
+insert into t1 (pk) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+# must not use range:
+explain select * from t1 force index (primary) where pk != 1 and pk!=2 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 10 Using where
+drop table t1;
+#
# MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value
#
create table t1 (pk int, i int, v int, primary key (pk), key(v));
@@ -3218,4 +3295,28 @@ drop table t1,t2;
#
# End of 10.2 tests
#
+#
+# MDEV-18551: New defaults for eq_range_index_dive_limit
+#
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int, key(a));
+insert into t1 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C;
+insert into t1 select 1 from ten A, ten B,ten C;
+create table t2(a int, key(a));
+insert into t2 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C where A.a + B.a*10 + C.a*100 < 199;
+# expected type=range, rows=1487 , reason=using index dives
+analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198);
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 index a a 5 NULL 2000 2000.00 74.35 59.95 Using where; Using index
+insert into t2 values (200),(201);
+# expected type=range, rows=201 , reason=using index statistics
+analyze SELECT * FROM t1 where a in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,200,201);
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 index a a 5 NULL 2000 2000.00 10.05 60.05 Using where; Using index
+drop table t1,ten,t2;
+# End of 10.4 tests
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
set optimizer_switch=@mrr_icp_extra_tmp;
diff --git a/mysql-test/main/range_mrr_icp.test b/mysql-test/main/range_mrr_icp.test
index c0f41e1fa6c..7e62cb6a8aa 100644
--- a/mysql-test/main/range_mrr_icp.test
+++ b/mysql-test/main/range_mrr_icp.test
@@ -2,6 +2,7 @@
set @mrr_icp_extra_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set optimizer_switch='rowid_filter=off';
--source range.test
diff --git a/mysql-test/main/range_notembedded.result b/mysql-test/main/range_notembedded.result
new file mode 100644
index 00000000000..7084e0ca7a0
--- /dev/null
+++ b/mysql-test/main/range_notembedded.result
@@ -0,0 +1,31 @@
+drop table if exists t1,t2;
+#
+# MDEV-21958: Query having many NOT-IN clauses running forever
+#
+create table t2 (
+pk int primary key,
+key1 int,
+col1 int,
+key (key1, pk)
+);
+insert into t2 (pk, key1) values (1,1),(2,2),(3,3),(4,4),(5,5);
+set @tmp_21958=@@optimizer_trace;
+set optimizer_trace=1;
+explain select * from t2 where key1 in (1,2,3) and pk not in (1,2,3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL PRIMARY,key1 NULL NULL NULL 5 Using where
+# This should show only ranges in form "(1) <= (key1) <= (1)"
+# ranges over "pk" should not be constructed.
+select json_detailed(JSON_EXTRACT(trace, '$**.ranges'))
+from information_schema.optimizer_trace;
+json_detailed(JSON_EXTRACT(trace, '$**.ranges'))
+[
+
+ [
+ "(1) <= (key1) <= (1)",
+ "(2) <= (key1) <= (2)",
+ "(3) <= (key1) <= (3)"
+ ]
+]
+set optimizer_trace=@tmp_21958;
+drop table t2;
diff --git a/mysql-test/main/range_notembedded.test b/mysql-test/main/range_notembedded.test
new file mode 100644
index 00000000000..4dc49429ff1
--- /dev/null
+++ b/mysql-test/main/range_notembedded.test
@@ -0,0 +1,33 @@
+#
+# Range tests without embedded server.
+# The first reason to have them is that embedded server doesn't have
+# optimizer trace.
+#
+--source include/not_embedded.inc
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+--echo #
+--echo # MDEV-21958: Query having many NOT-IN clauses running forever
+--echo #
+create table t2 (
+ pk int primary key,
+ key1 int,
+ col1 int,
+ key (key1, pk)
+);
+
+insert into t2 (pk, key1) values (1,1),(2,2),(3,3),(4,4),(5,5);
+
+set @tmp_21958=@@optimizer_trace;
+set optimizer_trace=1;
+explain select * from t2 where key1 in (1,2,3) and pk not in (1,2,3);
+
+--echo # This should show only ranges in form "(1) <= (key1) <= (1)"
+--echo # ranges over "pk" should not be constructed.
+select json_detailed(JSON_EXTRACT(trace, '$**.ranges'))
+from information_schema.optimizer_trace;
+set optimizer_trace=@tmp_21958;
+
+drop table t2;
diff --git a/mysql-test/main/range_vs_index_merge.result b/mysql-test/main/range_vs_index_merge.result
index faab314896c..b4e59f474d4 100644
--- a/mysql-test/main/range_vs_index_merge.result
+++ b/mysql-test/main/range_vs_index_merge.result
@@ -64,7 +64,7 @@ Country IN ('CAN', 'ARG') AND ID BETWEEN 120 AND 130 OR
Country <= 'ALB' AND Name LIKE 'L%' OR
ID BETWEEN 3807 AND 3810;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,PRIMARY,Country 35,4,3 NULL 31 Using sort_union(Name,PRIMARY,Country); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,PRIMARY,Country 35,4,3 NULL 30 Using sort_union(Name,PRIMARY,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE (Population > 101000 AND Population < 115000);
@@ -175,7 +175,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (Name < 'Bb');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 208 Using index condition
+1 SIMPLE City range Name Name 35 NULL 207 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Country > 'A' AND Country < 'B');
id select_type table type possible_keys key key_len ref rows Extra
@@ -327,11 +327,11 @@ ID Name Country Population
EXPLAIN
SELECT * FROM City WHERE (ID < 10) OR (ID BETWEEN 100 AND 110);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY PRIMARY 4 NULL 21 Using index condition; Using where
+1 SIMPLE City range PRIMARY PRIMARY 4 NULL 20 Using index condition
EXPLAIN
SELECT * FROM City WHERE (ID < 200) OR (ID BETWEEN 100 AND 200);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY PRIMARY 4 NULL 201 Using index condition; Using where
+1 SIMPLE City range PRIMARY PRIMARY 4 NULL 200 Using index condition
EXPLAIN
SELECT * FROM City WHERE (ID < 600) OR (ID BETWEEN 900 AND 1500);
id select_type table type possible_keys key key_len ref rows Extra
@@ -339,36 +339,36 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Country > 'A' AND Country < 'ARG';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country Country 3 NULL 19 Using index condition
+1 SIMPLE City range Country Country 3 NULL 20 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'H%' OR Name LIKE 'P%' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 222 Using index condition; Using where
+1 SIMPLE City range Name Name 35 NULL 223 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Ha%' OR Name LIKE 'Pa%' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 72 Using index condition; Using where
+1 SIMPLE City range Name Name 35 NULL 72 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 100 AND 110) AND
(Name LIKE 'P%' OR (Population > 103000 AND Population < 104000)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country,Name PRIMARY 4 NULL 21 Using index condition; Using where
+1 SIMPLE City range PRIMARY,Population,Country,Name PRIMARY 4 NULL 20 Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 900 AND 1500) AND
-(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
+(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 105000)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,Population 35,3,4 NULL 128 Using sort_union(Name,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,Population 35,3,4 NULL 151 Using sort_union(Name,Country,Population); Using where
EXPLAIN
SELECT * FROM City
WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 100 AND 200) AND
-(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
+(Name LIKE 'Pa%' OR (Population > 103200 AND Population < 104000)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,Population 35,3,4 NULL 128 Using sort_union(Name,Country,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,Population 35,3,4 NULL 124 Using sort_union(Name,Country,Population); Using where
SELECT * FROM City USE INDEX ()
WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 100 AND 110) AND
@@ -584,11 +584,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Country < 'C';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country Country 3 NULL 436 Using index condition
+1 SIMPLE City range Country Country 3 NULL 435 Using index condition
EXPLAIN
SELECT * FROM City WHERE Country < 'AGO';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country Country 3 NULL 6 Using index condition
+1 SIMPLE City range Country Country 3 NULL 5 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name BETWEEN 'P' AND 'S';
id select_type table type possible_keys key key_len ref rows Extra
@@ -616,7 +616,7 @@ WHERE ((Population > 101000 AND Population < 102000) AND
((ID BETWEEN 3400 AND 3800) AND
(Country < 'AGO' OR Name LIKE 'Pa%'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name,Population 3,35,4 NULL 84 Using sort_union(Country,Name,Population); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name,Population 3,35,4 NULL 83 Using sort_union(Country,Name,Population); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 110000) AND
@@ -624,7 +624,7 @@ WHERE ((Population > 101000 AND Population < 110000) AND
((ID BETWEEN 3790 AND 3800) AND
(Country < 'C' OR Name LIKE 'P%'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name,PRIMARY 3,35,4 NULL 56 Using sort_union(Country,Name,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name,PRIMARY 3,35,4 NULL 55 Using sort_union(Country,Name,PRIMARY); Using where
SELECT * FROM City USE INDEX ()
WHERE ((Population > 101000 AND Population < 102000) AND
(Country < 'C' OR Name BETWEEN 'P' AND 'S')) OR
@@ -679,7 +679,7 @@ CREATE INDEX CountryPopulation ON City(Country,Population);
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Pas%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 5 Using index condition
+1 SIMPLE City range Name Name 35 NULL 4 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'P%';
id select_type table type possible_keys key key_len ref rows Extra
@@ -695,19 +695,19 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Country='FIN';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City ref Country,CountryPopulation Country 3 const 6 Using index condition
+1 SIMPLE City ref Country,CountryPopulation Country 3 const 7 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'Pas%')
AND Country='USA';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name,CountryPopulation CountryPopulation,Name 7,35 NULL 15 Using sort_union(CountryPopulation,Name); Using where
+1 SIMPLE City index_merge Population,Country,Name,CountryPopulation CountryPopulation,Name 7,35 NULL 14 Using sort_union(CountryPopulation,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'P%')
-AND Country='FIN';
+AND Country='EST';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City ref Population,Country,Name,CountryPopulation Country 3 const 6 Using index condition; Using where
+1 SIMPLE City ref Population,Country,Name,CountryPopulation Country 3 const 2 Using index condition; Using where
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'Pas%')
AND Country='USA';
@@ -1110,32 +1110,32 @@ SELECT Name, Country, Population FROM City WHERE
(Name='Seattle' AND Country='USA');
Name Country Population
Addis Abeba ETH 2495000
-Manila PHL 1581082
-Jakarta IDN 9604900
-Delhi IND 7206704
+Ankara TUR 3038159
Bangalore IND 2660088
-Teheran IRN 6758845
-Roma ITA 2643581
-Venezia ITA 277305
-Tokyo JPN 7980230
-Toronto CAN 688275
-Vancouver CAN 514008
-Peking CHN 7472000
-Seoul KOR 9981619
+Basel CHE 166700
+Caracas VEN 1975294
+Dakar SEN 785071
+Delhi IND 7206704
+Dresden DEU 476668
+Jakarta IDN 9604900
Kaunas LTU 412639
-Rabat MAR 623457
-Tijuana MEX 1212232
Lagos NGA 1518000
+Lugansk UKR 469000
+Manila PHL 1581082
Paris FRA 2125246
-Dresden DEU 476668
-Dakar SEN 785071
-Basel CHE 166700
+Peking CHN 7472000
Praha CZE 1181126
-Ankara TUR 3038159
-Lugansk UKR 469000
-Caracas VEN 1975294
+Rabat MAR 623457
+Roma ITA 2643581
Samara RUS 1156100
Seattle USA 563374
+Seoul KOR 9981619
+Teheran IRN 6758845
+Tijuana MEX 1212232
+Tokyo JPN 7980230
+Toronto CAN 688275
+Vancouver CAN 514008
+Venezia ITA 277305
set optimizer_switch='index_merge=off';
EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
@@ -1166,7 +1166,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 29 Using index condition; Using where
+1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 28 Using index condition
SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR
@@ -1196,33 +1196,33 @@ SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
Name Country Population
-Toronto CAN 688275
-Vancouver CAN 514008
-Basel CHE 166700
-Peking CHN 7472000
-Praha CZE 1181126
-Dresden DEU 476668
Addis Abeba ETH 2495000
-Paris FRA 2125246
-Jakarta IDN 9604900
+Ankara TUR 3038159
Bangalore IND 2660088
+Basel CHE 166700
+Caracas VEN 1975294
+Dakar SEN 785071
Delhi IND 7206704
-Teheran IRN 6758845
-Roma ITA 2643581
-Venezia ITA 277305
-Tokyo JPN 7980230
-Seoul KOR 9981619
+Dresden DEU 476668
+Jakarta IDN 9604900
Kaunas LTU 412639
-Rabat MAR 623457
-Tijuana MEX 1212232
Lagos NGA 1518000
+Lugansk UKR 469000
Manila PHL 1581082
+Paris FRA 2125246
+Peking CHN 7472000
+Praha CZE 1181126
+Rabat MAR 623457
+Roma ITA 2643581
Samara RUS 1156100
-Dakar SEN 785071
-Ankara TUR 3038159
-Lugansk UKR 469000
Seattle USA 563374
-Caracas VEN 1975294
+Seoul KOR 9981619
+Teheran IRN 6758845
+Tijuana MEX 1212232
+Tokyo JPN 7980230
+Toronto CAN 688275
+Vancouver CAN 514008
+Venezia ITA 277305
set optimizer_switch=@save_optimizer_switch;
#
# Bug mdev-585: range vs index-merge with ORDER BY ... LIMIT n
@@ -1343,6 +1343,38 @@ Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
+set @tmp_mdev585=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=1;
+EXPLAIN
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE City range Country,Name,Population Population 4 NULL # Using where
+FLUSH STATUS;
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+ID Name Country Population
+519 Worthing GBR 100000
+638 al-Arish EGY 100447
+518 Basildon GBR 100924
+707 Marbella ESP 101144
+3792 Tartu EST 101246
+SHOW STATUS LIKE 'Handler_read_%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 59
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+set optimizer_use_condition_selectivity=@tmp_mdev585;
set optimizer_switch='index_merge=off';
EXPLAIN
SELECT * FROM City
@@ -1430,6 +1462,7 @@ insert into t1(account_id, login, home_state, work_state)
select 1, 'pw', 'ak', 'ak' from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where account_id = 1;
count(*)
@@ -1491,6 +1524,7 @@ insert into t1 (c2, c3, c4, c5, cp)
select c2, c3, c4, c5, cp from t1 where cp = 4;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain
select * from t1 where (c2=1 and c3=1) or (c4=2 and c5=1);
@@ -1543,6 +1577,7 @@ insert into t1 (c2,c3,c4) select c2,c3,3 from t1 where c2 != 'a';
insert into t1 (c2,c3,c4) select c2,c3,4 from t1 where c2 != 'a';
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where (c2='e' OR c3='q');
count(*)
@@ -1582,6 +1617,7 @@ update t1 set c1=lpad(id+1000, 12, ' '), c2=lpad(id+10000, 15, ' ');
alter table t1 add unique index (c1), add unique index (c2), add index (c3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
explain
select * from t1 where (c1=' 100000' or c2=' 2000000');
@@ -1620,7 +1656,7 @@ SELECT COUNT(*) FROM t1
WHERE c = 'i' OR b IN ( 'Arkansas' , 'd' , 'pdib' , 'can' ) OR
(pk BETWEEN 120 AND 79 + 255 OR a IN ( 4 , 179 , 1 ) ) AND a > 8 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,idx1,idx2,idx3 idx3,idx2,PRIMARY,idx1 67,13,4,3 NULL 8 Using sort_union(idx3,idx2,PRIMARY,idx1); Using where
+1 SIMPLE t1 index_merge PRIMARY,idx1,idx2,idx3 idx3,idx2,PRIMARY,idx1 67,13,4,3 NULL 9 Using sort_union(idx3,idx2,PRIMARY,idx1); Using where
DROP TABLE t1;
CREATE TABLE t1 (
f1 int, f2 int, f3 int, f4 int, f5 int,
@@ -1638,31 +1674,37 @@ CREATE TABLE t1 (
f1 int, f2 int, f3 int, f4 int,
PRIMARY KEY (f1), KEY (f3), KEY (f4)
);
+INSERT INTO t1 VALUES (1,0,0,0), (2,0,0,0), (3,0,0,0);
INSERT INTO t1 VALUES (9,0,2,6), (9930,0,0,NULL);
+insert into t1 select seq,seq,seq,seq from seq_100_to_400;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SET SESSION optimizer_switch='index_merge_intersection=off';
SET SESSION optimizer_switch='index_merge_sort_union=off';
SET SESSION optimizer_switch='index_merge_union=off';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 2 Using where
+1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 306 Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
SET SESSION optimizer_switch='index_merge_union=on';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,f3,f4 f3,PRIMARY,f3 5,4,5 NULL 3 Using union(f3,PRIMARY,f3); Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
INSERT INTO t1 VALUES
@@ -1670,28 +1712,32 @@ INSERT INTO t1 VALUES
(95,0,5,6), (9935,0,5,5), (96,0,6,6), (9936,0,6,6),
(97,0,7,6), (9937,0,7,7), (98,0,8,6), (9938,0,8,8),
(99,0,9,6), (9939,0,9,9);
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SET SESSION optimizer_switch='index_merge_union=off';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 16 Using where
+1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 320 Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
SET SESSION optimizer_switch='index_merge_union=on';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,f3,f4 f3,PRIMARY,f3 5,4,5 NULL 3 Using union(f3,PRIMARY,f3); Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
SET SESSION optimizer_switch=DEFAULT;
@@ -1713,6 +1759,10 @@ PRIMARY KEY(b), INDEX idx1(d), INDEX idx2(d,b,c)
INSERT INTO t1 VALUES
(0,58,7,7),(0,63,2,0),(0,64,186,8),(0,65,1,-2), (0,71,190,-3),
(0,72,321,-7),(0,73,0,3),(0,74,5,25),(0,75,5,3);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SET SESSION optimizer_switch='index_merge_sort_union=off';
EXPLAIN
SELECT * FROM t1
@@ -1760,11 +1810,11 @@ CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX idx(b));
INSERT INTO t1 VALUES (167,9999), (168,10000);
EXPLAIN
SELECT * FROM t1
-WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY,idx NULL NULL NULL 2 Using where
SELECT * FROM t1
-WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2);
a b
167 9999
168 10000
@@ -1790,14 +1840,18 @@ INSERT INTO t1 VALUES
(7,'Pennsylvania','Harrisburg'),
(8,'Virginia','Richmond')
;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN
SELECT * FROM t1 FORCE KEY (state,capital)
-WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
+WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND (id<9 or id>9)
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range state,capital state 71 NULL 8 Using index condition; Using where
SELECT * FROM t1 FORCE KEY (state,capital)
-WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
+WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND (id<9 or id>9)
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
id state capital
4 Florida Tallahassee
@@ -1886,6 +1940,6 @@ Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
Country='ITA' AND Name IN ('Napoli', 'Venezia');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range CountryName,Name CountryName 38 NULL 22 Using index condition; Using where
+1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition
DROP DATABASE world;
set session optimizer_switch='index_merge_sort_intersection=default';
diff --git a/mysql-test/main/range_vs_index_merge.test b/mysql-test/main/range_vs_index_merge.test
index 60c912e9c3e..94210ce5dd3 100644
--- a/mysql-test/main/range_vs_index_merge.test
+++ b/mysql-test/main/range_vs_index_merge.test
@@ -1,5 +1,6 @@
--source include/default_optimizer_switch.inc
--source include/default_charset.inc
+--source include/have_sequence.inc
--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3,t4;
@@ -232,13 +233,13 @@ EXPLAIN
SELECT * FROM City
WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 900 AND 1500) AND
- (Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
+ (Name LIKE 'Pa%' OR (Population > 103000 AND Population < 105000)));
EXPLAIN
SELECT * FROM City
WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 100 AND 200) AND
- (Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
+ (Name LIKE 'Pa%' OR (Population > 103200 AND Population < 104000)));
# The following 6 queries check that the plans
@@ -387,7 +388,7 @@ SELECT * FROM City
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'P%')
- AND Country='FIN';
+ AND Country='EST';
# The following 4 queries check that the plans
# for the previous 2 plans are valid
@@ -628,7 +629,7 @@ SELECT * FROM City
#
-# LP bug #954262: index merge oover long disjunction in WHERE
+# LP bug #954262: index merge over long disjunction in WHERE
#
set @save_optimizer_switch=@@optimizer_switch;
@@ -667,6 +668,7 @@ let $cond =
eval
EXPLAIN SELECT Name, Country, Population FROM City WHERE
$cond;
+--sorted_result
eval
SELECT Name, Country, Population FROM City WHERE
$cond;
@@ -676,6 +678,7 @@ set optimizer_switch='index_merge=off';
eval
EXPLAIN SELECT Name, Country, Population FROM City WHERE
$cond;
+--sorted_result
eval
SELECT Name, Country, Population FROM City WHERE
$cond;
@@ -721,6 +724,23 @@ SELECT * FROM City
ORDER BY Population LIMIT 5;
SHOW STATUS LIKE 'Handler_read_%';
+set @tmp_mdev585=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=1;
+--replace_column 9 #
+EXPLAIN
+SELECT * FROM City
+ WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+ AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+
+FLUSH STATUS;
+SELECT * FROM City
+ WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+ AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+SHOW STATUS LIKE 'Handler_read_%';
+
+set optimizer_use_condition_selectivity=@tmp_mdev585;
set optimizer_switch='index_merge=off';
@@ -1070,7 +1090,11 @@ CREATE TABLE t1 (
PRIMARY KEY (f1), KEY (f3), KEY (f4)
);
+INSERT INTO t1 VALUES (1,0,0,0), (2,0,0,0), (3,0,0,0);
INSERT INTO t1 VALUES (9,0,2,6), (9930,0,0,NULL);
+insert into t1 select seq,seq,seq,seq from seq_100_to_400;
+
+analyze table t1;
SET SESSION optimizer_switch='index_merge_intersection=off';
SET SESSION optimizer_switch='index_merge_sort_union=off';
@@ -1080,22 +1104,22 @@ SET SESSION optimizer_switch='index_merge_union=off';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
SET SESSION optimizer_switch='index_merge_union=on';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
INSERT INTO t1 VALUES
@@ -1104,27 +1128,29 @@ INSERT INTO t1 VALUES
(97,0,7,6), (9937,0,7,7), (98,0,8,6), (9938,0,8,8),
(99,0,9,6), (9939,0,9,9);
+analyze table t1;
+
SET SESSION optimizer_switch='index_merge_union=off';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
SET SESSION optimizer_switch='index_merge_union=on';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
- OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+ OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
SET SESSION optimizer_switch=DEFAULT;
@@ -1161,6 +1187,8 @@ INSERT INTO t1 VALUES
(0,58,7,7),(0,63,2,0),(0,64,186,8),(0,65,1,-2), (0,71,190,-3),
(0,72,321,-7),(0,73,0,3),(0,74,5,25),(0,75,5,3);
+ANALYZE TABLE t1;
+
SET SESSION optimizer_switch='index_merge_sort_union=off';
EXPLAIN
SELECT * FROM t1
@@ -1203,9 +1231,9 @@ INSERT INTO t1 VALUES (167,9999), (168,10000);
EXPLAIN
SELECT * FROM t1
- WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+ WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2);
SELECT * FROM t1
- WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+ WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2);
DROP TABLE t1;
@@ -1233,13 +1261,15 @@ INSERT INTO t1 VALUES
(7,'Pennsylvania','Harrisburg'),
(8,'Virginia','Richmond')
;
+
+ANALYZE TABLE t1;
EXPLAIN
SELECT * FROM t1 FORCE KEY (state,capital)
-WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
+WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND (id<9 or id>9)
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
SELECT * FROM t1 FORCE KEY (state,capital)
-WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
+WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND (id<9 or id>9)
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
DROP TABLE t1;
diff --git a/mysql-test/main/range_vs_index_merge_innodb.result b/mysql-test/main/range_vs_index_merge_innodb.result
index 916c30bb770..65800e7397b 100644
--- a/mysql-test/main/range_vs_index_merge_innodb.result
+++ b/mysql-test/main/range_vs_index_merge_innodb.result
@@ -1,4 +1,9 @@
SET SESSION STORAGE_ENGINE='InnoDB';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
DROP TABLE IF EXISTS t1,t2,t3,t4;
DROP DATABASE IF EXISTS world;
set names utf8;
@@ -50,7 +55,7 @@ SELECT * FROM City
WHERE (Population >= 100000 OR Name LIKE 'P%') AND Country='CAN' OR
(Population < 100000 OR Name Like 'T%') AND Country='ARG';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population,Country,Name Country 3 NULL 106 Using index condition; Using where
+1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL 821 Using sort_union(Population,Name,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE Population < 200000 AND Name LIKE 'P%' AND
@@ -344,11 +349,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'H%' OR Name LIKE 'P%' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 395 Using index condition; Using where
+1 SIMPLE City range Name Name 35 NULL 395 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Ha%' OR Name LIKE 'Pa%' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 133 Using index condition; Using where
+1 SIMPLE City range Name Name 35 NULL 133 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG')))
@@ -360,14 +365,14 @@ EXPLAIN
SELECT * FROM City
WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 900 AND 1500) AND
-(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
+(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 105000)));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 683 Using sort_union(Name,Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 100 AND 200) AND
-(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
+(Name LIKE 'Pa%' OR (Population > 103200 AND Population < 104000)));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range PRIMARY,Population,Country,Name PRIMARY 4 NULL 200 Using where
SELECT * FROM City USE INDEX ()
@@ -617,7 +622,7 @@ WHERE ((Population > 101000 AND Population < 102000) AND
((ID BETWEEN 3400 AND 3800) AND
(Country < 'AGO' OR Name LIKE 'Pa%'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Population,PRIMARY 4,4 NULL 440 Using sort_union(Population,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name 3,35 NULL 831 Using sort_union(Country,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 110000) AND
@@ -625,7 +630,7 @@ WHERE ((Population > 101000 AND Population < 110000) AND
((ID BETWEEN 3790 AND 3800) AND
(Country < 'C' OR Name LIKE 'P%'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name,PRIMARY 3,35,4 NULL 87 Using sort_union(Country,Name,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name 7,39 NULL 678 Using sort_union(Country,Name); Using where
SELECT * FROM City USE INDEX ()
WHERE ((Population > 101000 AND Population < 102000) AND
(Country < 'C' OR Name BETWEEN 'P' AND 'S')) OR
@@ -706,9 +711,9 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'P%')
-AND Country='FIN';
+AND Country='EST';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City ref Population,Country,Name,CountryPopulation Country 3 const 7 Using index condition; Using where
+1 SIMPLE City ref Population,Country,Name,CountryPopulation Country 3 const 2 Using index condition; Using where
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'Pas%')
AND Country='USA';
@@ -952,7 +957,7 @@ WHERE ((Population > 101000 AND Population < 11000) OR
ID BETWEEN 3500 AND 3800) AND Country='USA'
AND (Name LIKE 'P%' OR ID BETWEEN 4000 AND 4300);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryName 38 NULL 18 Using index condition; Using where
+1 SIMPLE City range PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryName 38 NULL 18 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 11000) OR
@@ -1080,7 +1085,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using index condition; Using where
+1 SIMPLE City index_merge Country,CountryPopulation,CountryName,CityName CountryName,CityName 38,35 NULL 27 Using sort_union(CountryName,CityName); Using where
SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR
@@ -1110,33 +1115,33 @@ SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
Name Country Population
-Toronto CAN 688275
-Vancouver CAN 514008
-Basel CHE 166700
-Peking CHN 7472000
-Praha CZE 1181126
-Dresden DEU 476668
Addis Abeba ETH 2495000
-Paris FRA 2125246
-Jakarta IDN 9604900
+Ankara TUR 3038159
Bangalore IND 2660088
+Basel CHE 166700
+Caracas VEN 1975294
+Dakar SEN 785071
Delhi IND 7206704
-Teheran IRN 6758845
-Roma ITA 2643581
-Venezia ITA 277305
-Tokyo JPN 7980230
-Seoul KOR 9981619
+Dresden DEU 476668
+Jakarta IDN 9604900
Kaunas LTU 412639
-Rabat MAR 623457
-Tijuana MEX 1212232
Lagos NGA 1518000
+Lugansk UKR 469000
Manila PHL 1581082
+Paris FRA 2125246
+Peking CHN 7472000
+Praha CZE 1181126
+Rabat MAR 623457
+Roma ITA 2643581
Samara RUS 1156100
-Dakar SEN 785071
-Ankara TUR 3038159
-Lugansk UKR 469000
Seattle USA 563374
-Caracas VEN 1975294
+Seoul KOR 9981619
+Teheran IRN 6758845
+Tijuana MEX 1212232
+Tokyo JPN 7980230
+Toronto CAN 688275
+Vancouver CAN 514008
+Venezia ITA 277305
set optimizer_switch='index_merge=off';
EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
@@ -1167,7 +1172,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using index condition; Using where
+1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using index condition
SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR
@@ -1197,33 +1202,33 @@ SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
Name Country Population
-Toronto CAN 688275
-Vancouver CAN 514008
-Basel CHE 166700
-Peking CHN 7472000
-Praha CZE 1181126
-Dresden DEU 476668
Addis Abeba ETH 2495000
-Paris FRA 2125246
-Jakarta IDN 9604900
+Ankara TUR 3038159
Bangalore IND 2660088
+Basel CHE 166700
+Caracas VEN 1975294
+Dakar SEN 785071
Delhi IND 7206704
-Teheran IRN 6758845
-Roma ITA 2643581
-Venezia ITA 277305
-Tokyo JPN 7980230
-Seoul KOR 9981619
+Dresden DEU 476668
+Jakarta IDN 9604900
Kaunas LTU 412639
-Rabat MAR 623457
-Tijuana MEX 1212232
Lagos NGA 1518000
+Lugansk UKR 469000
Manila PHL 1581082
+Paris FRA 2125246
+Peking CHN 7472000
+Praha CZE 1181126
+Rabat MAR 623457
+Roma ITA 2643581
Samara RUS 1156100
-Dakar SEN 785071
-Ankara TUR 3038159
-Lugansk UKR 469000
Seattle USA 563374
-Caracas VEN 1975294
+Seoul KOR 9981619
+Teheran IRN 6758845
+Tijuana MEX 1212232
+Tokyo JPN 7980230
+Toronto CAN 688275
+Vancouver CAN 514008
+Venezia ITA 277305
set optimizer_switch=@save_optimizer_switch;
#
# Bug mdev-585: range vs index-merge with ORDER BY ... LIMIT n
@@ -1344,6 +1349,38 @@ Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
+set @tmp_mdev585=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=1;
+EXPLAIN
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE City range Country,Name,Population Population 4 NULL # Using where
+FLUSH STATUS;
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+ID Name Country Population
+519 Worthing GBR 100000
+638 al-Arish EGY 100447
+518 Basildon GBR 100924
+707 Marbella ESP 101144
+3792 Tartu EST 101246
+SHOW STATUS LIKE 'Handler_read_%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 59
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+set optimizer_use_condition_selectivity=@tmp_mdev585;
set optimizer_switch='index_merge=off';
EXPLAIN
SELECT * FROM City
@@ -1431,6 +1468,7 @@ insert into t1(account_id, login, home_state, work_state)
select 1, 'pw', 'ak', 'ak' from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where account_id = 1;
count(*)
@@ -1492,6 +1530,7 @@ insert into t1 (c2, c3, c4, c5, cp)
select c2, c3, c4, c5, cp from t1 where cp = 4;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain
select * from t1 where (c2=1 and c3=1) or (c4=2 and c5=1);
@@ -1544,6 +1583,7 @@ insert into t1 (c2,c3,c4) select c2,c3,3 from t1 where c2 != 'a';
insert into t1 (c2,c3,c4) select c2,c3,4 from t1 where c2 != 'a';
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where (c2='e' OR c3='q');
count(*)
@@ -1583,6 +1623,7 @@ update t1 set c1=lpad(id+1000, 12, ' '), c2=lpad(id+10000, 15, ' ');
alter table t1 add unique index (c1), add unique index (c2), add index (c3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain
select * from t1 where (c1=' 100000' or c2=' 2000000');
@@ -1639,31 +1680,37 @@ CREATE TABLE t1 (
f1 int, f2 int, f3 int, f4 int,
PRIMARY KEY (f1), KEY (f3), KEY (f4)
);
+INSERT INTO t1 VALUES (1,0,0,0), (2,0,0,0), (3,0,0,0);
INSERT INTO t1 VALUES (9,0,2,6), (9930,0,0,NULL);
+insert into t1 select seq,seq,seq,seq from seq_100_to_400;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SET SESSION optimizer_switch='index_merge_intersection=off';
SET SESSION optimizer_switch='index_merge_sort_union=off';
SET SESSION optimizer_switch='index_merge_union=off';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 2 Using where
+1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 306 Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
SET SESSION optimizer_switch='index_merge_union=on';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,f3,f4 PRIMARY,f3 4,5 NULL 2 Using union(PRIMARY,f3); Using where
+1 SIMPLE t1 index_merge PRIMARY,f3,f4 PRIMARY,f3 4,5 NULL 5 Using union(PRIMARY,f3); Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
INSERT INTO t1 VALUES
@@ -1671,28 +1718,32 @@ INSERT INTO t1 VALUES
(95,0,5,6), (9935,0,5,5), (96,0,6,6), (9936,0,6,6),
(97,0,7,6), (9937,0,7,7), (98,0,8,6), (9938,0,8,8),
(99,0,9,6), (9939,0,9,9);
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SET SESSION optimizer_switch='index_merge_union=off';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 16 Using where
+1 SIMPLE t1 ALL PRIMARY,f3,f4 NULL NULL NULL 320 Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
SET SESSION optimizer_switch='index_merge_union=on';
EXPLAIN
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,f3,f4 PRIMARY,f3 4,5 NULL 2 Using union(PRIMARY,f3); Using where
+1 SIMPLE t1 index_merge PRIMARY,f3,f4 PRIMARY,f3 4,5 NULL 5 Using union(PRIMARY,f3); Using where
SELECT * FROM t1 FORCE KEY (PRIMARY,f3,f4)
WHERE ( f3 = 1 OR f1 = 7 ) AND f1 < 10
-OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 != 1 );
+OR f3 BETWEEN 2 AND 2 AND ( f3 = 1 OR f4 < 7 );
f1 f2 f3 f4
9 0 2 6
SET SESSION optimizer_switch=DEFAULT;
@@ -1714,6 +1765,10 @@ PRIMARY KEY(b), INDEX idx1(d), INDEX idx2(d,b,c)
INSERT INTO t1 VALUES
(0,58,7,7),(0,63,2,0),(0,64,186,8),(0,65,1,-2), (0,71,190,-3),
(0,72,321,-7),(0,73,0,3),(0,74,5,25),(0,75,5,3);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SET SESSION optimizer_switch='index_merge_sort_union=off';
EXPLAIN
SELECT * FROM t1
@@ -1751,7 +1806,7 @@ SELECT * FROM t1
WHERE t1.a>300 AND t1.c!=0 AND t1.b>=350 AND t1.b<=400 AND
(t1.c=0 OR t1.a=500);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,idx PRIMARY 4 NULL 1 Using where
+1 SIMPLE t1 index PRIMARY,idx idx 10 NULL 2 Using where; Using index
SELECT * FROM t1
WHERE t1.a>300 AND t1.c!=0 AND t1.b>=350 AND t1.b<=400 AND
(t1.c=0 OR t1.a=500);
@@ -1761,11 +1816,11 @@ CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX idx(b));
INSERT INTO t1 VALUES (167,9999), (168,10000);
EXPLAIN
SELECT * FROM t1
-WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY,idx idx 5 NULL 2 Using where; Using index
SELECT * FROM t1
-WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
+WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2);
a b
167 9999
168 10000
@@ -1791,14 +1846,18 @@ INSERT INTO t1 VALUES
(7,'Pennsylvania','Harrisburg'),
(8,'Virginia','Richmond')
;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN
SELECT * FROM t1 FORCE KEY (state,capital)
-WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
+WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND (id<9 or id>9)
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range state,capital state 71 NULL 8 Using index condition; Using where
SELECT * FROM t1 FORCE KEY (state,capital)
-WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
+WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND (id<9 or id>9)
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
id state capital
4 Florida Tallahassee
@@ -1857,23 +1916,23 @@ Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
Country='ITA' AND Name IN ('Napoli', 'Venezia');
ID Name Country Population
175 Antwerpen BEL 446525
-176 Gent BEL 224180
+2808 Bergen NOR 230948
3068 Berlin DEU 3386667
3087 Bonn DEU 301048
+2918 Braga PRT 90535
+176 Gent BEL 224180
3242 Lahti FIN 96921
-2974 Paris FRA 2125246
+3580 Moscow RUS 8389200
1466 Napoli ITA 1002619
-1474 Venezia ITA 277305
-2808 Bergen NOR 230948
2807 Oslo NOR 508726
-2928 Warszawa POL 1615369
-2931 Wroclaw POL 636765
-2918 Braga PRT 90535
+2974 Paris FRA 2125246
2915 Porto PRT 273060
-3580 Moscow RUS 8389200
3581 St Petersburg RUS 4694000
3048 Stockholm SWE 750348
3051 Uppsala SWE 189569
+1474 Venezia ITA 277305
+2928 Warszawa POL 1615369
+2931 Wroclaw POL 636765
explain select * from City
where
Country='FIN' AND Name IN ('Lahti','Imatra') OR
@@ -1887,7 +1946,10 @@ Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
Country='ITA' AND Name IN ('Napoli', 'Venezia');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition; Using where
+1 SIMPLE City range CountryName,Name Name 35 NULL 20 Using index condition; Using where
DROP DATABASE world;
set session optimizer_switch='index_merge_sort_intersection=default';
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/range_vs_index_merge_innodb.test b/mysql-test/main/range_vs_index_merge_innodb.test
index 31870ccd9c6..5117ee3668a 100644
--- a/mysql-test/main/range_vs_index_merge_innodb.test
+++ b/mysql-test/main/range_vs_index_merge_innodb.test
@@ -2,6 +2,15 @@
SET SESSION STORAGE_ENGINE='InnoDB';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
--source range_vs_index_merge.test
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/repair.result b/mysql-test/main/repair.result
index b4e8a3a5bf5..a8d82afc626 100644
--- a/mysql-test/main/repair.result
+++ b/mysql-test/main/repair.result
@@ -79,7 +79,7 @@ INSERT INTO t1 VALUES
('0'),('0'),('0'),('0'),('0'),('0'),('0');
Warnings:
Error 1034 myisam_sort_buffer_size is too small. X
-Error 1034 Number of rows changed from 0 to 157
+Warning 1034 Number of rows changed from 0 to 157
SET myisam_repair_threads=2;
REPAIR TABLE t1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/main/row.result b/mysql-test/main/row.result
index 7483f37970f..343cd7badbb 100644
--- a/mysql-test/main/row.result
+++ b/mysql-test/main/row.result
@@ -15,28 +15,50 @@ select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a'));
row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a'))
1
Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
-Warning 1292 Truncated incorrect INTEGER value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3))
1
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3))
1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('a',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3));
row('a',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3))
1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('b',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3));
row('b',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3))
-0
+1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'b'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3));
row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3))
-NULL
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
select row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3));
row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3))
-0
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
select (1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4)));
(1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4)))
1
@@ -461,7 +483,7 @@ select * from t1,t2 where (a,b) = (c,d);
a b c d
abc 1 abc 1
select host,user from mysql.user where (host,user) = ('localhost','test');
-host user
+Host User
drop table t1,t2;
#
# Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
diff --git a/mysql-test/main/rowid_filter.result b/mysql-test/main/rowid_filter.result
new file mode 100644
index 00000000000..b1660a8aba3
--- /dev/null
+++ b/mysql-test/main/rowid_filter.result
@@ -0,0 +1,2171 @@
+DROP DATABASE IF EXISTS dbt3_s001;
+CREATE DATABASE dbt3_s001;
+use dbt3_s001;
+CREATE INDEX i_l_quantity ON lineitem(l_quantity);
+CREATE INDEX i_o_totalprice ON orders(o_totalprice);
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables=preferably;
+ANALYZE TABLE lineitem, orders;
+show create table lineitem;
+Table Create Table
+lineitem CREATE TABLE `lineitem` (
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
+ `l_partkey` int(11) DEFAULT NULL,
+ `l_suppkey` int(11) DEFAULT NULL,
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
+ `l_quantity` double DEFAULT NULL,
+ `l_extendedprice` double DEFAULT NULL,
+ `l_discount` double DEFAULT NULL,
+ `l_tax` double DEFAULT NULL,
+ `l_returnflag` char(1) DEFAULT NULL,
+ `l_linestatus` char(1) DEFAULT NULL,
+ `l_shipDATE` date DEFAULT NULL,
+ `l_commitDATE` date DEFAULT NULL,
+ `l_receiptDATE` date DEFAULT NULL,
+ `l_shipinstruct` char(25) DEFAULT NULL,
+ `l_shipmode` char(10) DEFAULT NULL,
+ `l_comment` varchar(44) DEFAULT NULL,
+ PRIMARY KEY (`l_orderkey`,`l_linenumber`),
+ KEY `i_l_shipdate` (`l_shipDATE`),
+ KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`),
+ KEY `i_l_partkey` (`l_partkey`),
+ KEY `i_l_suppkey` (`l_suppkey`),
+ KEY `i_l_receiptdate` (`l_receiptDATE`),
+ KEY `i_l_orderkey` (`l_orderkey`),
+ KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`),
+ KEY `i_l_commitdate` (`l_commitDATE`),
+ KEY `i_l_quantity` (`l_quantity`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table orders;
+Table Create Table
+orders CREATE TABLE `orders` (
+ `o_orderkey` int(11) NOT NULL,
+ `o_custkey` int(11) DEFAULT NULL,
+ `o_orderstatus` char(1) DEFAULT NULL,
+ `o_totalprice` double DEFAULT NULL,
+ `o_orderDATE` date DEFAULT NULL,
+ `o_orderpriority` char(15) DEFAULT NULL,
+ `o_clerk` char(15) DEFAULT NULL,
+ `o_shippriority` int(11) DEFAULT NULL,
+ `o_comment` varchar(79) DEFAULT NULL,
+ PRIMARY KEY (`o_orderkey`),
+ KEY `i_o_orderdate` (`o_orderDATE`),
+ KEY `i_o_custkey` (`o_custkey`),
+ KEY `i_o_totalprice` (`o_totalprice`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+set optimizer_use_condition_selectivity=2;
+select
+100 *
+(select count(*) from lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45
+)
+/
+(select count(*) from lineitem
+where l_shipdate BETWEEN '1997-01-01' AND '1997-06-30')
+as correct_r_filtered_when_using_l_shipdate;
+correct_r_filtered_when_using_l_shipdate
+11.7647
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range|filter i_l_shipdate,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) Using index condition; Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 702,
+ "selectivity_pct": 11.69
+ },
+ "rows": 509,
+ "filtered": 11.69,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range|filter i_l_shipdate,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) 60.00 (11%) 11.69 100.00 Using index condition; Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 702,
+ "selectivity_pct": 11.69,
+ "r_rows": 605,
+ "r_selectivity_pct": 11.765,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 1,
+ "rows": 509,
+ "r_rows": 60,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 11.69,
+ "r_filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+l_orderkey l_linenumber l_shipdate l_quantity
+1121 5 1997-04-27 47
+1121 6 1997-04-21 50
+1441 7 1997-06-07 50
+1443 1 1997-02-05 47
+1473 1 1997-05-05 50
+1568 2 1997-04-06 46
+1632 1 1997-01-25 47
+1632 3 1997-01-29 47
+1954 7 1997-06-04 49
+1959 1 1997-05-05 46
+2151 3 1997-01-20 49
+2177 5 1997-05-10 46
+2369 2 1997-01-02 47
+2469 3 1997-01-11 48
+2469 6 1997-03-03 49
+2470 2 1997-06-02 50
+260 1 1997-03-24 50
+288 2 1997-04-19 49
+289 4 1997-03-14 48
+3009 1 1997-03-19 48
+3105 3 1997-02-28 48
+3106 2 1997-02-27 49
+3429 1 1997-04-08 48
+3490 2 1997-06-27 50
+3619 1 1997-01-22 49
+3619 3 1997-01-31 46
+3969 3 1997-05-29 46
+4005 4 1997-01-31 49
+4036 1 1997-06-21 46
+4066 4 1997-02-17 49
+4098 1 1997-01-26 46
+422 3 1997-06-21 46
+4258 3 1997-01-02 46
+4421 2 1997-04-21 46
+4421 3 1997-05-25 46
+4453 3 1997-05-29 48
+4484 7 1997-03-17 50
+4609 3 1997-02-11 46
+484 1 1997-03-06 49
+484 3 1997-01-24 50
+484 5 1997-03-05 48
+485 1 1997-03-28 50
+4868 1 1997-04-29 47
+4868 3 1997-04-23 49
+4934 1 1997-05-20 48
+4967 1 1997-05-27 50
+5090 2 1997-04-05 46
+5152 2 1997-03-10 50
+5158 4 1997-04-10 49
+5606 3 1997-03-11 46
+5606 7 1997-02-01 46
+5762 4 1997-03-02 47
+581 3 1997-02-27 49
+5829 5 1997-01-31 49
+5831 4 1997-02-24 46
+5895 2 1997-04-27 47
+5895 3 1997-03-15 49
+5952 1 1997-06-30 49
+705 1 1997-04-18 46
+836 3 1997-03-21 46
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range i_l_shipdate,i_l_quantity i_l_shipdate 4 NULL 509 Using index condition; Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rows": 509,
+ "filtered": 11.69,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range i_l_shipdate,i_l_quantity i_l_shipdate 4 NULL 509 510.00 11.69 11.76 Using index condition; Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "r_loops": 1,
+ "rows": 509,
+ "r_rows": 510,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 11.69,
+ "r_filtered": 11.765,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+l_orderkey l_linenumber l_shipdate l_quantity
+1121 5 1997-04-27 47
+1121 6 1997-04-21 50
+1441 7 1997-06-07 50
+1443 1 1997-02-05 47
+1473 1 1997-05-05 50
+1568 2 1997-04-06 46
+1632 1 1997-01-25 47
+1632 3 1997-01-29 47
+1954 7 1997-06-04 49
+1959 1 1997-05-05 46
+2151 3 1997-01-20 49
+2177 5 1997-05-10 46
+2369 2 1997-01-02 47
+2469 3 1997-01-11 48
+2469 6 1997-03-03 49
+2470 2 1997-06-02 50
+260 1 1997-03-24 50
+288 2 1997-04-19 49
+289 4 1997-03-14 48
+3009 1 1997-03-19 48
+3105 3 1997-02-28 48
+3106 2 1997-02-27 49
+3429 1 1997-04-08 48
+3490 2 1997-06-27 50
+3619 1 1997-01-22 49
+3619 3 1997-01-31 46
+3969 3 1997-05-29 46
+4005 4 1997-01-31 49
+4036 1 1997-06-21 46
+4066 4 1997-02-17 49
+4098 1 1997-01-26 46
+422 3 1997-06-21 46
+4258 3 1997-01-02 46
+4421 2 1997-04-21 46
+4421 3 1997-05-25 46
+4453 3 1997-05-29 48
+4484 7 1997-03-17 50
+4609 3 1997-02-11 46
+484 1 1997-03-06 49
+484 3 1997-01-24 50
+484 5 1997-03-05 48
+485 1 1997-03-28 50
+4868 1 1997-04-29 47
+4868 3 1997-04-23 49
+4934 1 1997-05-20 48
+4967 1 1997-05-27 50
+5090 2 1997-04-05 46
+5152 2 1997-03-10 50
+5158 4 1997-04-10 49
+5606 3 1997-03-11 46
+5606 7 1997-02-01 46
+5762 4 1997-03-02 47
+581 3 1997-02-27 49
+5829 5 1997-01-31 49
+5831 4 1997-02-24 46
+5895 2 1997-04-27 47
+5895 3 1997-03-15 49
+5952 1 1997-06-30 49
+705 1 1997-04-18 46
+836 3 1997-03-21 46
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 Using index condition
+1 SIMPLE orders eq_ref|filter PRIMARY,i_o_totalprice PRIMARY|i_o_totalprice 4|9 dbt3_s001.lineitem.l_orderkey 1 (5%) Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rows": 98,
+ "filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_o_totalprice",
+ "used_key_parts": ["o_totalprice"]
+ },
+ "rows": 69,
+ "selectivity_pct": 4.6
+ },
+ "rows": 1,
+ "filtered": 4.6,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 98.00 100.00 100.00 Using index condition
+1 SIMPLE orders eq_ref|filter PRIMARY,i_o_totalprice PRIMARY|i_o_totalprice 4|9 dbt3_s001.lineitem.l_orderkey 1 (5%) 0.11 (10%) 4.60 100.00 Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "r_loops": 1,
+ "rows": 98,
+ "r_rows": 98,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_o_totalprice",
+ "used_key_parts": ["o_totalprice"]
+ },
+ "rows": 69,
+ "selectivity_pct": 4.6,
+ "r_rows": 71,
+ "r_selectivity_pct": 10.417,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 98,
+ "rows": 1,
+ "r_rows": 0.1122,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 4.6,
+ "r_filtered": 100,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 6 1997-01-25 222274.54
+484 3 1997-01-24 219920.62
+5606 6 1997-01-11 219959.08
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 Using index condition
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rows": 98,
+ "filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 4.6,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 98.00 100.00 100.00 Using index condition
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 4.60 11.22 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "r_loops": 1,
+ "rows": 98,
+ "r_rows": 98,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 98,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 4.6,
+ "r_filtered": 11.224,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 6 1997-01-25 222274.54
+484 3 1997-01-24 219920.62
+5606 6 1997-01-11 219959.08
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) Using index condition; Using where; Using rowid filter
+1 SIMPLE orders eq_ref|filter PRIMARY,i_o_totalprice PRIMARY|i_o_totalprice 4|9 dbt3_s001.lineitem.l_orderkey 1 (9%) Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 702,
+ "selectivity_pct": 11.69
+ },
+ "rows": 509,
+ "filtered": 11.69,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_o_totalprice",
+ "used_key_parts": ["o_totalprice"]
+ },
+ "rows": 139,
+ "selectivity_pct": 9.2667
+ },
+ "rows": 1,
+ "filtered": 9.2667,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) 60.00 (11%) 11.69 100.00 Using index condition; Using where; Using rowid filter
+1 SIMPLE orders eq_ref|filter PRIMARY,i_o_totalprice PRIMARY|i_o_totalprice 4|9 dbt3_s001.lineitem.l_orderkey 1 (9%) 0.27 (25%) 9.27 100.00 Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 702,
+ "selectivity_pct": 11.69,
+ "r_rows": 605,
+ "r_selectivity_pct": 11.765,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 1,
+ "rows": 509,
+ "r_rows": 60,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 11.69,
+ "r_filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_o_totalprice",
+ "used_key_parts": ["o_totalprice"]
+ },
+ "rows": 139,
+ "selectivity_pct": 9.2667,
+ "r_rows": 144,
+ "r_selectivity_pct": 25.424,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 60,
+ "rows": 1,
+ "r_rows": 0.2667,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 9.2667,
+ "r_filtered": 100,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+o_orderkey l_linenumber l_shipdate l_quantity o_totalprice
+1632 1 1997-01-25 47 183286.33
+1632 3 1997-01-29 47 183286.33
+2177 5 1997-05-10 46 183493.42
+2469 3 1997-01-11 48 192074.23
+2469 6 1997-03-03 49 192074.23
+3619 1 1997-01-22 49 222274.54
+3619 3 1997-01-31 46 222274.54
+484 1 1997-03-06 49 219920.62
+484 3 1997-01-24 50 219920.62
+484 5 1997-03-05 48 219920.62
+4934 1 1997-05-20 48 180478.16
+5606 3 1997-03-11 46 219959.08
+5606 7 1997-02-01 46 219959.08
+5829 5 1997-01-31 49 183734.56
+5895 2 1997-04-27 47 201419.83
+5895 3 1997-03-15 49 201419.83
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate 4 NULL 509 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rows": 509,
+ "filtered": 11.69,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 9.2667,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate 4 NULL 509 510.00 11.69 11.76 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 9.27 26.67 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "r_loops": 1,
+ "rows": 509,
+ "r_rows": 510,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 11.69,
+ "r_filtered": 11.765,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 60,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 9.2667,
+ "r_filtered": 26.667,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+o_orderkey l_linenumber l_shipdate l_quantity o_totalprice
+1632 1 1997-01-25 47 183286.33
+1632 3 1997-01-29 47 183286.33
+2177 5 1997-05-10 46 183493.42
+2469 3 1997-01-11 48 192074.23
+2469 6 1997-03-03 49 192074.23
+3619 1 1997-01-22 49 222274.54
+3619 3 1997-01-31 46 222274.54
+484 1 1997-03-06 49 219920.62
+484 3 1997-01-24 50 219920.62
+484 5 1997-03-05 48 219920.62
+4934 1 1997-05-20 48 180478.16
+5606 3 1997-03-11 46 219959.08
+5606 7 1997-02-01 46 219959.08
+5829 5 1997-01-31 49 183734.56
+5895 2 1997-04-27 47 201419.83
+5895 3 1997-03-15 49 201419.83
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 Using index condition
+1 SIMPLE lineitem ref|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY|i_l_shipdate 4|4 dbt3_s001.orders.o_orderkey 4 (8%) Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "rows": 69,
+ "filtered": 100,
+ "index_condition": "orders.o_totalprice between 200000 and 230000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_shipdate",
+ "used_key_parts": ["l_shipDATE"]
+ },
+ "rows": 509,
+ "selectivity_pct": 8.4763
+ },
+ "rows": 4,
+ "filtered": 8.4763,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 71.00 100.00 100.00 Using index condition
+1 SIMPLE lineitem ref|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY|i_l_shipdate 4|4 dbt3_s001.orders.o_orderkey 4 (8%) 0.52 (7%) 8.48 100.00 Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "r_loops": 1,
+ "rows": 69,
+ "r_rows": 71,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "index_condition": "orders.o_totalprice between 200000 and 230000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_shipdate",
+ "used_key_parts": ["l_shipDATE"]
+ },
+ "rows": 509,
+ "selectivity_pct": 8.4763,
+ "r_rows": 510,
+ "r_selectivity_pct": 7.7731,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 71,
+ "rows": 4,
+ "r_rows": 0.5211,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 8.4763,
+ "r_filtered": 100,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+1890 1 1997-04-02 202364.58
+1890 3 1997-02-09 202364.58
+1890 4 1997-04-08 202364.58
+1890 5 1997-04-15 202364.58
+1890 6 1997-02-13 202364.58
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 4 1997-03-18 222274.54
+3619 6 1997-01-25 222274.54
+453 1 1997-06-30 216826.73
+453 2 1997-06-30 216826.73
+484 1 1997-03-06 219920.62
+484 2 1997-04-09 219920.62
+484 3 1997-01-24 219920.62
+484 4 1997-04-29 219920.62
+484 5 1997-03-05 219920.62
+484 6 1997-04-06 219920.62
+5606 2 1997-02-23 219959.08
+5606 3 1997-03-11 219959.08
+5606 4 1997-02-06 219959.08
+5606 6 1997-01-11 219959.08
+5606 7 1997-02-01 219959.08
+5859 2 1997-05-15 210643.96
+5859 5 1997-05-28 210643.96
+5859 6 1997-06-15 210643.96
+5895 1 1997-04-05 201419.83
+5895 2 1997-04-27 201419.83
+5895 3 1997-03-15 201419.83
+5895 4 1997-03-03 201419.83
+5895 5 1997-04-30 201419.83
+5895 6 1997-04-19 201419.83
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 Using index condition
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "rows": 69,
+ "filtered": 100,
+ "index_condition": "orders.o_totalprice between 200000 and 230000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 8.4763,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 69 71.00 100.00 100.00 Using index condition
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.70 8.48 7.77 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "r_loops": 1,
+ "rows": 69,
+ "r_rows": 71,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "index_condition": "orders.o_totalprice between 200000 and 230000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 71,
+ "rows": 4,
+ "r_rows": 6.7042,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 8.4763,
+ "r_filtered": 7.7731,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+1890 1 1997-04-02 202364.58
+1890 3 1997-02-09 202364.58
+1890 4 1997-04-08 202364.58
+1890 5 1997-04-15 202364.58
+1890 6 1997-02-13 202364.58
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 4 1997-03-18 222274.54
+3619 6 1997-01-25 222274.54
+453 1 1997-06-30 216826.73
+453 2 1997-06-30 216826.73
+484 1 1997-03-06 219920.62
+484 2 1997-04-09 219920.62
+484 3 1997-01-24 219920.62
+484 4 1997-04-29 219920.62
+484 5 1997-03-05 219920.62
+484 6 1997-04-06 219920.62
+5606 2 1997-02-23 219959.08
+5606 3 1997-03-11 219959.08
+5606 4 1997-02-06 219959.08
+5606 6 1997-01-11 219959.08
+5606 7 1997-02-01 219959.08
+5859 2 1997-05-15 210643.96
+5859 5 1997-05-28 210643.96
+5859 6 1997-06-15 210643.96
+5895 1 1997-04-05 201419.83
+5895 2 1997-04-27 201419.83
+5895 3 1997-03-15 201419.83
+5895 4 1997-03-03 201419.83
+5895 5 1997-04-30 201419.83
+5895 6 1997-04-19 201419.83
+#
+# MDEV-18413: find constraint correlated indexes
+#
+ALTER TABLE lineitem ADD CONSTRAINT l_date CHECK(l_shipdate < l_receiptdate);
+# Filter on l_shipdate is not used because it participates in
+# the same constraint as l_receiptdate.
+# Access is made on l_receiptdate.
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "rows": 18,
+ "filtered": 0.5662,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 7.4667,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 18.00 0.57 38.89 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 7.47 14.29 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "r_loops": 1,
+ "rows": 18,
+ "r_rows": 18,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 0.5662,
+ "r_filtered": 38.889,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 7,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 7.4667,
+ "r_filtered": 14.286,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+l_shipdate l_receiptdate o_totalprice
+1996-10-07 1996-10-08 202623.92
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "rows": 18,
+ "filtered": 0.5662,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 7.4667,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 18.00 0.57 38.89 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 7.47 14.29 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "r_loops": 1,
+ "rows": 18,
+ "r_rows": 18,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 0.5662,
+ "r_filtered": 38.889,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 7,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 7.4667,
+ "r_filtered": 14.286,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+l_shipdate l_receiptdate o_totalprice
+1996-10-07 1996-10-08 202623.92
+ALTER TABLE orders ADD COLUMN o_totaldiscount double;
+UPDATE orders SET o_totaldiscount = o_totalprice*(o_custkey/1000);
+CREATE INDEX i_o_totaldiscount on orders(o_totaldiscount);
+ALTER TABLE orders ADD CONSTRAINT o_price CHECK(o_totalprice > o_totaldiscount);
+# Filter on o_totalprice is not used because it participates in
+# the same constraint as o_discount.
+# Access is made on o_discount.
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 39,
+ "filtered": 3.2,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 3.0475,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 3.20 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 39,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.2,
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.0475,
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 39,
+ "filtered": 3.2,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 3.0475,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 3.20 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 39,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.2,
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.0475,
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+CREATE VIEW v1 AS
+SELECT * FROM orders
+WHERE o_orderdate BETWEEN '1992-12-01' AND '1997-01-01';
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 39,
+ "filtered": "REPLACED",
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": "REPLACED",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 # 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 39,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 39,
+ "filtered": "REPLACED",
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": "REPLACED",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 39 41.00 # 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 39,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+ALTER TABLE lineitem DROP CONSTRAINT l_date;
+ALTER TABLE orders DROP CONSTRAINT o_price;
+ALTER TABLE orders DROP COLUMN o_totaldiscount;
+DROP VIEW v1;
+DROP DATABASE dbt3_s001;
+use test;
+#
+# MDEV-18816: potential range filter for one join table with
+# impossible WHERE for another
+#
+create table t1 (
+pk int not null primary key, c2 varchar(10) , i1 int,key (c2)
+) engine=myisam;
+insert into t1 values (1,'a',-5),(2,'a',null);
+create table t2 (
+pk int, i1 int, c1 varchar(30) , key c1 (c1(30)), key i1 (i1)
+) engine=myisam;
+insert into t2 values
+(1,-5,'a'),(2,null,'a'),(3,null,'a'),(4,null,'a'),(5,5,'a'),(6,null,'a'),
+(7,4,'a'),(8,55,'a'),(9,null,'a'),(10,null,'a'),(11,null,'a'),(12,-5,'a'),
+(13,-5,'a'),(14,null,'a'),(15,null,'a'),(16,-5,'a'),(17,-5,'a');
+select 1
+from t1
+left join
+t2 join t1 as t1_a on t2.i1 = t1_a.pk
+on t1.c2 = t2.c1
+where t1_a.pk is null and t1_a.i1 != 3;
+1
+explain extended select 1
+from t1
+left join
+t2 join t1 as t1_a on t2.i1 = t1_a.pk
+on t1.c2 = t2.c1
+where t1_a.pk is null and t1_a.i1 != 3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+Warnings:
+Note 1003 select 1 AS `1` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t1_a` where 0
+drop table t1,t2;
+#
+# MDEV-18640: TABLE::prune_range_rowid_filters: Conditional jump or
+# move depends on uninitialized value
+#
+CREATE TABLE t1 (
+pk INT, i INT, PRIMARY KEY (pk), KEY (pk,i)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,10), (7,70), (2,20);
+SELECT * FROM t1 WHERE pk < 5;
+pk i
+1 10
+2 20
+DROP TABLE t1;
+#
+# MDEV-18956: Possible rowid filter for subquery for which
+# in_to_exists strategy has been chosen
+#
+CREATE TABLE t1 (pk int) engine=myisam ;
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (
+pk int auto_increment PRIMARY KEY,
+i1 int, i2 int, c2 varchar(1),
+KEY (i1), KEY (i2)
+) engine=myisam;
+INSERT INTO t2 VALUES
+(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
+(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
+(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
+SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
+pk
+EXPLAIN EXTENDED
+SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` having 0
+DROP TABLE t1,t2;
+#
+# MDEV-19255: rowid range filter built for range condition
+# that uses in expensive subquery
+#
+CREATE TABLE t1 (
+pk1 INT PRIMARY KEY, a1 INT, b1 VARCHAR(1), KEY(b1)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES
+(10,0,'z'),(11,3,'j'),(12,8,'f'),(13,8,'p'),(14,6,'w'),(15,0,'c'),(16,1,'j'),
+(17,1,'f'),(18,5,'v'),(19,3,'f'),(20,2,'q'),(21,8,'y'),(22,0,'a'),(23,9,'w'),
+(24,3,'e'),(25,1,'b'),(26,9,'r'),(27,2,'k'),(28,5,'c'),(29,3,'k'),(30,9,'b'),
+(31,8,'j'),(32,1,'t'),(33,8,'n'),(34,3,'z'),(35,0,'u'),(36,3,'a'),(37,3,'g'),
+(38,1,'f'),(39,6,'p'),(40,6,'m'),(41,6,'t'),(42,7,'i'),(43,4,'h'),(44,3,'d'),
+(45,2,'b'),(46,1,'o'),(47,2,'j'),(48,6,'s'),(49,5,'q'),(50,6,'l'),(51,9,'j'),
+(52,6,'y'),(53,0,'i'),(54,7,'x'),(55,2,'u'),(56,6,'t'),(57,4,'b'),(58,5,'m'),
+(59,4,'x'),(60,8,'x'),(61,6,'v'),(62,8,'m'),(63,4,'j'),(64,8,'z'),(65,2,'a'),
+(66,9,'i'),(67,4,'g'),(68,8,'h'),(69,1,'p'),(70,8,'a'),(71,0,'x'),(72,2,'s'),
+(73,6,'k'),(74,0,'m'),(75,6,'e'),(76,9,'y'),(77,7,'d'),(78,7,'w'),(79,6,'y'),
+(80,9,'s'),(81,9,'x'),(82,6,'l'),(83,9,'f'),(84,8,'x'),(85,1,'p'),(86,7,'y'),
+(87,6,'p'),(88,1,'g'),(89,3,'c'),(90,5,'h'),(91,3,'p'),(92,2,'b'),(93,1,NULL),
+(94,3,NULL),(95,2,'y'),(96,7,'s'),(97,7,'x'),(98,6,'i'),(99,9,'t'),(100,5,'j'),
+(101,0,'u'),(102,7,'r'),(103,2,'x'),(104,8,'e'),(105,8,'i'),(106,5,'q'),
+(107,8,'z'),(108,3,'k'),(109,65,NULL);
+CREATE TABLE t2 (pk2 INT PRIMARY KEY, a2 INT, b2 VARCHAR(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,1,'x');
+INSERT INTO t2 SELECT * FROM t1;
+SELECT * FROM t1 INNER JOIN t2 ON ( pk1 <> pk2 AND pk1 = a2 )
+WHERE b1 <= ( SELECT MAX(b2) FROM t2 WHERE pk2 <= 1 );
+pk1 a1 b1 pk2 a2 b2
+65 2 a 109 65 NULL
+EXPLAIN EXTENDED SELECT * FROM t1 INNER JOIN t2 ON ( pk1 <> pk2 AND pk1 = a2 )
+WHERE b1 <= ( SELECT MAX(b2) FROM t2 WHERE pk2 <= 1 );
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 101 100.00 Using where
+1 PRIMARY t1 eq_ref|filter PRIMARY,b1 PRIMARY|b1 4|4 test.t2.a2 1 (87%) 87.00 Using where; Using rowid filter
+2 SUBQUERY t2 range PRIMARY PRIMARY 4 NULL 1 100.00 Using index condition
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,`test`.`t2`.`pk2` AS `pk2`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b2` AS `b2` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`pk1` = `test`.`t2`.`a2` and `test`.`t1`.`b1` <= (/* select#2 */ select max(`test`.`t2`.`b2`) from `test`.`t2` where `test`.`t2`.`pk2` <= 1) and `test`.`t2`.`a2` <> `test`.`t2`.`pk2`
+EXPLAIN FORMAT=JSON SELECT * FROM t1 INNER JOIN t2 ON ( pk1 <> pk2 AND pk1 = a2 )
+WHERE b1 <= ( SELECT MAX(b2) FROM t2 WHERE pk2 <= 1 );
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 101,
+ "filtered": 100,
+ "attached_condition": "t2.a2 <> t2.pk2 and t2.a2 is not null"
+ },
+ "table": {
+ "table_name": "t1",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "b1"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["pk1"],
+ "ref": ["test.t2.a2"],
+ "rowid_filter": {
+ "range": {
+ "key": "b1",
+ "used_key_parts": ["b1"]
+ },
+ "rows": 87,
+ "selectivity_pct": 87
+ },
+ "rows": 1,
+ "filtered": 87,
+ "attached_condition": "t1.b1 <= (subquery#2)"
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["pk2"],
+ "rows": 1,
+ "filtered": 100,
+ "index_condition": "t2.pk2 <= 1"
+ }
+ }
+ }
+ ]
+ }
+}
+DROP TABLE t1,t2;
+#
+# MDEV-21794: Optimizer flag rowid_filter leads to long query
+#
+create table t10(a int);
+insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t11(a int);
+insert into t11 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C;
+CREATE TABLE t1 (
+el_id int(10) unsigned NOT NULL ,
+el_index blob NOT NULL,
+el_index_60 varbinary(60) NOT NULL,
+filler blob,
+PRIMARY KEY (el_id),
+KEY el_index (el_index(60)),
+KEY el_index_60 (el_index_60,el_id)
+);
+insert into t1
+select
+A.a+1000*B.a,
+A.a+1000*B.a + 10000,
+A.a+1000*B.a + 10000,
+'filler-data-filler-data'
+from
+t11 A, t10 B;
+analyze table t1 persistent for all;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'el_index'
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'filler'
+test.t1 analyze status Table is already up to date
+# This must not use rowid_filter with key=el_index|el_index_60:
+explain
+select * from t1
+where el_index like '10%' and (el_index_60 like '10%' or el_index_60 like '20%');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range el_index,el_index_60 el_index 62 NULL 645 Using where
+drop table t10, t11, t1;
+#
+# MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT
+#
+set @save_optimizer_switch= @@optimizer_switch;
+SET @@optimizer_switch="index_merge_sort_union=OFF";
+CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b));
+INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4);
+explain
+SELECT * FROM t1 WHERE a > 0 AND b=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref|filter a,b b|a 5|5 const 2 (14%) Using where; Using rowid filter
+SELECT * FROM t1 WHERE a > 0 AND b=0;
+a b
+1 0
+drop table t1;
+SET @@optimizer_switch=@save_optimizer_switch;
+set @@use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/rowid_filter.test b/mysql-test/main/rowid_filter.test
new file mode 100644
index 00000000000..a68c32cf0de
--- /dev/null
+++ b/mysql-test/main/rowid_filter.test
@@ -0,0 +1,409 @@
+--disable_warnings
+DROP DATABASE IF EXISTS dbt3_s001;
+--enable_warnings
+
+CREATE DATABASE dbt3_s001;
+
+use dbt3_s001;
+
+--disable_query_log
+--disable_result_log
+--disable_warnings
+--source include/dbt3_s001.inc
+--enable_warnings
+--enable_result_log
+--enable_query_log
+
+CREATE INDEX i_l_quantity ON lineitem(l_quantity);
+
+CREATE INDEX i_o_totalprice ON orders(o_totalprice);
+
+set @save_use_stat_tables= @@use_stat_tables;
+
+set @@use_stat_tables=preferably;
+
+--disable_result_log
+--disable_warnings
+ANALYZE TABLE lineitem, orders;
+--enable_warnings
+--enable_result_log
+
+show create table lineitem;
+show create table orders;
+
+set optimizer_use_condition_selectivity=2;
+
+let $with_filter=
+set statement optimizer_switch='rowid_filter=on' for;
+
+let $without_filter=
+set statement optimizer_switch='rowid_filter=off' for;
+
+select
+ 100 *
+ (select count(*) from lineitem
+ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45
+ )
+ /
+ (select count(*) from lineitem
+ where l_shipdate BETWEEN '1997-01-01' AND '1997-06-30')
+ as correct_r_filtered_when_using_l_shipdate;
+
+let $q1=
+SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+ l_quantity > 45;
+
+eval $with_filter EXPLAIN $q1;
+eval $with_filter EXPLAIN FORMAT=JSON $q1;
+eval $with_filter ANALYZE $q1;
+--source include/analyze-format.inc
+eval $with_filter ANALYZE FORMAT=JSON $q1;
+--sorted_result
+eval $with_filter $q1;
+
+eval $without_filter EXPLAIN $q1;
+eval $without_filter EXPLAIN FORMAT=JSON $q1;
+eval $without_filter ANALYZE $q1;
+--source include/analyze-format.inc
+eval $without_filter ANALYZE FORMAT=JSON $q1;
+--sorted_result
+eval $without_filter $q1;
+
+let $q2=
+SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+ FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+ o_totalprice between 200000 and 230000;
+
+eval $with_filter EXPLAIN $q2;
+eval $with_filter EXPLAIN FORMAT=JSON $q2;
+eval $with_filter ANALYZE $q2;
+--source include/analyze-format.inc
+eval $with_filter ANALYZE FORMAT=JSON $q2;
+--sorted_result
+eval $with_filter $q2;
+
+eval $without_filter EXPLAIN $q2;
+eval $without_filter EXPLAIN FORMAT=JSON $q2;
+eval $without_filter ANALYZE $q2;
+--source include/analyze-format.inc
+eval $without_filter ANALYZE FORMAT=JSON $q2;
+--sorted_result
+eval $without_filter $q2;
+
+let $q3=
+SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+ FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+ l_quantity > 45 AND
+ o_totalprice between 180000 and 230000;
+
+eval $with_filter EXPLAIN $q3;
+eval $with_filter EXPLAIN FORMAT=JSON $q3;
+eval $with_filter ANALYZE $q3;
+--source include/analyze-format.inc
+eval $with_filter ANALYZE FORMAT=JSON $q3;
+--sorted_result
+eval $with_filter $q3;
+
+eval $without_filter EXPLAIN $q3;
+eval $without_filter EXPLAIN FORMAT=JSON $q3;
+eval $without_filter ANALYZE $q3;
+--source include/analyze-format.inc
+eval $without_filter ANALYZE FORMAT=JSON $q3;
+--sorted_result
+eval $without_filter $q3;
+
+let $q4=
+SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+ FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+ o_totalprice between 200000 and 230000;
+
+eval $with_filter EXPLAIN $q4;
+eval $with_filter EXPLAIN FORMAT=JSON $q4;
+eval $with_filter ANALYZE $q4;
+--source include/analyze-format.inc
+eval $with_filter ANALYZE FORMAT=JSON $q4;
+--sorted_result
+eval $with_filter $q4;
+
+eval $without_filter EXPLAIN $q4;
+eval $without_filter EXPLAIN FORMAT=JSON $q4;
+eval $without_filter ANALYZE $q4;
+--source include/analyze-format.inc
+eval $without_filter ANALYZE FORMAT=JSON $q4;
+--sorted_result
+eval $without_filter $q4;
+
+--echo #
+--echo # MDEV-18413: find constraint correlated indexes
+--echo #
+
+ALTER TABLE lineitem ADD CONSTRAINT l_date CHECK(l_shipdate < l_receiptdate);
+
+--echo # Filter on l_shipdate is not used because it participates in
+--echo # the same constraint as l_receiptdate.
+--echo # Access is made on l_receiptdate.
+let $q5=
+SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+ l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+ l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+ o_totalprice BETWEEN 200000 AND 250000;
+
+eval $with_filter EXPLAIN $q5;
+eval $with_filter EXPLAIN FORMAT=JSON $q5;
+eval $with_filter ANALYZE $q5;
+--source include/analyze-format.inc
+eval $with_filter ANALYZE FORMAT=JSON $q5;
+--sorted_result
+eval $with_filter $q5;
+
+eval $without_filter EXPLAIN $q5;
+eval $without_filter EXPLAIN FORMAT=JSON $q5;
+eval $without_filter ANALYZE $q5;
+--source include/analyze-format.inc
+eval $without_filter ANALYZE FORMAT=JSON $q5;
+--sorted_result
+eval $without_filter $q5;
+
+ALTER TABLE orders ADD COLUMN o_totaldiscount double;
+UPDATE orders SET o_totaldiscount = o_totalprice*(o_custkey/1000);
+CREATE INDEX i_o_totaldiscount on orders(o_totaldiscount);
+
+ALTER TABLE orders ADD CONSTRAINT o_price CHECK(o_totalprice > o_totaldiscount);
+
+--echo # Filter on o_totalprice is not used because it participates in
+--echo # the same constraint as o_discount.
+--echo # Access is made on o_discount.
+let $q6=
+SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+ o_totaldiscount BETWEEN 18000 AND 20000 AND
+ o_totalprice BETWEEN 200000 AND 220000 AND
+ l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+
+eval $with_filter EXPLAIN $q6;
+eval $with_filter EXPLAIN FORMAT=JSON $q6;
+eval $with_filter ANALYZE $q6;
+--source include/analyze-format.inc
+eval $with_filter ANALYZE FORMAT=JSON $q6;
+--sorted_result
+eval $with_filter $q6;
+
+eval $without_filter EXPLAIN $q6;
+eval $without_filter EXPLAIN FORMAT=JSON $q6;
+eval $without_filter ANALYZE $q6;
+--source include/analyze-format.inc
+eval $without_filter ANALYZE FORMAT=JSON $q6;
+--sorted_result
+eval $without_filter $q6;
+
+CREATE VIEW v1 AS
+SELECT * FROM orders
+WHERE o_orderdate BETWEEN '1992-12-01' AND '1997-01-01';
+
+let $q7=
+SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+ o_totaldiscount BETWEEN 18000 AND 20000 AND
+ o_totalprice BETWEEN 200000 AND 220000 AND
+ l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+
+eval $with_filter EXPLAIN $q7;
+--replace_regex /"filtered": [0-9e\.\-+]*,/"filtered": "REPLACED",/
+eval $with_filter EXPLAIN FORMAT=JSON $q7;
+--replace_column 11 #
+eval $with_filter ANALYZE $q7;
+--replace_regex /("(r_total_time_ms|r_buffer_size|r_filling_time_ms|filtered)": )[^, \n]*/\1"REPLACED"/
+eval $with_filter ANALYZE FORMAT=JSON $q7;
+--sorted_result
+eval $with_filter $q7;
+
+eval $without_filter EXPLAIN $q7;
+--replace_regex /"filtered": [0-9e\.\-+]*,/"filtered": "REPLACED",/
+eval $without_filter EXPLAIN FORMAT=JSON $q7;
+--replace_column 11 #
+eval $without_filter ANALYZE $q7;
+--replace_regex /("(r_total_time_ms|r_buffer_size|r_filling_time_ms|filtered)": )[^, \n]*/\1"REPLACED"/
+eval $without_filter ANALYZE FORMAT=JSON $q7;
+--sorted_result
+eval $without_filter $q7;
+
+ALTER TABLE lineitem DROP CONSTRAINT l_date;
+ALTER TABLE orders DROP CONSTRAINT o_price;
+ALTER TABLE orders DROP COLUMN o_totaldiscount;
+DROP VIEW v1;
+
+DROP DATABASE dbt3_s001;
+
+use test;
+
+--echo #
+--echo # MDEV-18816: potential range filter for one join table with
+--echo # impossible WHERE for another
+--echo #
+
+create table t1 (
+ pk int not null primary key, c2 varchar(10) , i1 int,key (c2)
+) engine=myisam;
+insert into t1 values (1,'a',-5),(2,'a',null);
+
+create table t2 (
+ pk int, i1 int, c1 varchar(30) , key c1 (c1(30)), key i1 (i1)
+) engine=myisam;
+insert into t2 values
+ (1,-5,'a'),(2,null,'a'),(3,null,'a'),(4,null,'a'),(5,5,'a'),(6,null,'a'),
+ (7,4,'a'),(8,55,'a'),(9,null,'a'),(10,null,'a'),(11,null,'a'),(12,-5,'a'),
+ (13,-5,'a'),(14,null,'a'),(15,null,'a'),(16,-5,'a'),(17,-5,'a');
+
+let $q=
+select 1
+ from t1
+ left join
+ t2 join t1 as t1_a on t2.i1 = t1_a.pk
+ on t1.c2 = t2.c1
+where t1_a.pk is null and t1_a.i1 != 3;
+
+eval $q;
+eval explain extended $q;
+
+drop table t1,t2;
+
+--echo #
+--echo # MDEV-18640: TABLE::prune_range_rowid_filters: Conditional jump or
+--echo # move depends on uninitialized value
+--echo #
+
+CREATE TABLE t1 (
+ pk INT, i INT, PRIMARY KEY (pk), KEY (pk,i)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,10), (7,70), (2,20);
+
+SELECT * FROM t1 WHERE pk < 5;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18956: Possible rowid filter for subquery for which
+--echo # in_to_exists strategy has been chosen
+--echo #
+
+CREATE TABLE t1 (pk int) engine=myisam ;
+INSERT INTO t1 VALUES (1),(2);
+
+CREATE TABLE t2 (
+ pk int auto_increment PRIMARY KEY,
+ i1 int, i2 int, c2 varchar(1),
+ KEY (i1), KEY (i2)
+) engine=myisam;
+
+INSERT INTO t2 VALUES
+ (1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
+ (6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
+ (11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
+
+SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
+EXPLAIN EXTENDED
+SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-19255: rowid range filter built for range condition
+--echo # that uses in expensive subquery
+--echo #
+
+CREATE TABLE t1 (
+ pk1 INT PRIMARY KEY, a1 INT, b1 VARCHAR(1), KEY(b1)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES
+(10,0,'z'),(11,3,'j'),(12,8,'f'),(13,8,'p'),(14,6,'w'),(15,0,'c'),(16,1,'j'),
+(17,1,'f'),(18,5,'v'),(19,3,'f'),(20,2,'q'),(21,8,'y'),(22,0,'a'),(23,9,'w'),
+(24,3,'e'),(25,1,'b'),(26,9,'r'),(27,2,'k'),(28,5,'c'),(29,3,'k'),(30,9,'b'),
+(31,8,'j'),(32,1,'t'),(33,8,'n'),(34,3,'z'),(35,0,'u'),(36,3,'a'),(37,3,'g'),
+(38,1,'f'),(39,6,'p'),(40,6,'m'),(41,6,'t'),(42,7,'i'),(43,4,'h'),(44,3,'d'),
+(45,2,'b'),(46,1,'o'),(47,2,'j'),(48,6,'s'),(49,5,'q'),(50,6,'l'),(51,9,'j'),
+(52,6,'y'),(53,0,'i'),(54,7,'x'),(55,2,'u'),(56,6,'t'),(57,4,'b'),(58,5,'m'),
+(59,4,'x'),(60,8,'x'),(61,6,'v'),(62,8,'m'),(63,4,'j'),(64,8,'z'),(65,2,'a'),
+(66,9,'i'),(67,4,'g'),(68,8,'h'),(69,1,'p'),(70,8,'a'),(71,0,'x'),(72,2,'s'),
+(73,6,'k'),(74,0,'m'),(75,6,'e'),(76,9,'y'),(77,7,'d'),(78,7,'w'),(79,6,'y'),
+(80,9,'s'),(81,9,'x'),(82,6,'l'),(83,9,'f'),(84,8,'x'),(85,1,'p'),(86,7,'y'),
+(87,6,'p'),(88,1,'g'),(89,3,'c'),(90,5,'h'),(91,3,'p'),(92,2,'b'),(93,1,NULL),
+(94,3,NULL),(95,2,'y'),(96,7,'s'),(97,7,'x'),(98,6,'i'),(99,9,'t'),(100,5,'j'),
+(101,0,'u'),(102,7,'r'),(103,2,'x'),(104,8,'e'),(105,8,'i'),(106,5,'q'),
+(107,8,'z'),(108,3,'k'),(109,65,NULL);
+
+CREATE TABLE t2 (pk2 INT PRIMARY KEY, a2 INT, b2 VARCHAR(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,1,'x');
+INSERT INTO t2 SELECT * FROM t1;
+
+let $q=
+SELECT * FROM t1 INNER JOIN t2 ON ( pk1 <> pk2 AND pk1 = a2 )
+ WHERE b1 <= ( SELECT MAX(b2) FROM t2 WHERE pk2 <= 1 );
+
+eval $q;
+eval EXPLAIN EXTENDED $q;
+eval EXPLAIN FORMAT=JSON $q;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-21794: Optimizer flag rowid_filter leads to long query
+--echo #
+create table t10(a int);
+insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t11(a int);
+insert into t11 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C;
+
+CREATE TABLE t1 (
+ el_id int(10) unsigned NOT NULL ,
+ el_index blob NOT NULL,
+ el_index_60 varbinary(60) NOT NULL,
+ filler blob,
+
+ PRIMARY KEY (el_id),
+ KEY el_index (el_index(60)),
+ KEY el_index_60 (el_index_60,el_id)
+);
+
+insert into t1
+select
+ A.a+1000*B.a,
+ A.a+1000*B.a + 10000,
+ A.a+1000*B.a + 10000,
+ 'filler-data-filler-data'
+from
+ t11 A, t10 B;
+analyze table t1 persistent for all;
+
+--echo # This must not use rowid_filter with key=el_index|el_index_60:
+explain
+select * from t1
+where el_index like '10%' and (el_index_60 like '10%' or el_index_60 like '20%');
+
+drop table t10, t11, t1;
+
+
+--echo #
+--echo # MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT
+--echo #
+
+set @save_optimizer_switch= @@optimizer_switch;
+SET @@optimizer_switch="index_merge_sort_union=OFF";
+CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b));
+INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4);
+explain
+SELECT * FROM t1 WHERE a > 0 AND b=0;
+SELECT * FROM t1 WHERE a > 0 AND b=0;
+drop table t1;
+SET @@optimizer_switch=@save_optimizer_switch;
+
+
+set @@use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result
new file mode 100644
index 00000000000..faa9714bb99
--- /dev/null
+++ b/mysql-test/main/rowid_filter_innodb.result
@@ -0,0 +1,2963 @@
+SET SESSION STORAGE_ENGINE='InnoDB';
+DROP DATABASE IF EXISTS dbt3_s001;
+CREATE DATABASE dbt3_s001;
+use dbt3_s001;
+CREATE INDEX i_l_quantity ON lineitem(l_quantity);
+CREATE INDEX i_o_totalprice ON orders(o_totalprice);
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables=preferably;
+ANALYZE TABLE lineitem, orders;
+show create table lineitem;
+Table Create Table
+lineitem CREATE TABLE `lineitem` (
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
+ `l_partkey` int(11) DEFAULT NULL,
+ `l_suppkey` int(11) DEFAULT NULL,
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
+ `l_quantity` double DEFAULT NULL,
+ `l_extendedprice` double DEFAULT NULL,
+ `l_discount` double DEFAULT NULL,
+ `l_tax` double DEFAULT NULL,
+ `l_returnflag` char(1) DEFAULT NULL,
+ `l_linestatus` char(1) DEFAULT NULL,
+ `l_shipDATE` date DEFAULT NULL,
+ `l_commitDATE` date DEFAULT NULL,
+ `l_receiptDATE` date DEFAULT NULL,
+ `l_shipinstruct` char(25) DEFAULT NULL,
+ `l_shipmode` char(10) DEFAULT NULL,
+ `l_comment` varchar(44) DEFAULT NULL,
+ PRIMARY KEY (`l_orderkey`,`l_linenumber`),
+ KEY `i_l_shipdate` (`l_shipDATE`),
+ KEY `i_l_suppkey_partkey` (`l_partkey`,`l_suppkey`),
+ KEY `i_l_partkey` (`l_partkey`),
+ KEY `i_l_suppkey` (`l_suppkey`),
+ KEY `i_l_receiptdate` (`l_receiptDATE`),
+ KEY `i_l_orderkey` (`l_orderkey`),
+ KEY `i_l_orderkey_quantity` (`l_orderkey`,`l_quantity`),
+ KEY `i_l_commitdate` (`l_commitDATE`),
+ KEY `i_l_quantity` (`l_quantity`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+show create table orders;
+Table Create Table
+orders CREATE TABLE `orders` (
+ `o_orderkey` int(11) NOT NULL,
+ `o_custkey` int(11) DEFAULT NULL,
+ `o_orderstatus` char(1) DEFAULT NULL,
+ `o_totalprice` double DEFAULT NULL,
+ `o_orderDATE` date DEFAULT NULL,
+ `o_orderpriority` char(15) DEFAULT NULL,
+ `o_clerk` char(15) DEFAULT NULL,
+ `o_shippriority` int(11) DEFAULT NULL,
+ `o_comment` varchar(79) DEFAULT NULL,
+ PRIMARY KEY (`o_orderkey`),
+ KEY `i_o_orderdate` (`o_orderDATE`),
+ KEY `i_o_custkey` (`o_custkey`),
+ KEY `i_o_totalprice` (`o_totalprice`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+set optimizer_use_condition_selectivity=2;
+select
+100 *
+(select count(*) from lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45
+)
+/
+(select count(*) from lineitem
+where l_shipdate BETWEEN '1997-01-01' AND '1997-06-30')
+as correct_r_filtered_when_using_l_shipdate;
+correct_r_filtered_when_using_l_shipdate
+11.7647
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range|filter i_l_shipdate,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 510 (10%) Using index condition; Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 605,
+ "selectivity_pct": 10.075
+ },
+ "rows": 510,
+ "filtered": 10.075,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range|filter i_l_shipdate,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 510 (10%) 60.00 (11%) 10.07 100.00 Using index condition; Using where; Using rowid filter
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rowid_filter": {
+ "range": {
+ "key": "i_l_quantity",
+ "used_key_parts": ["l_quantity"]
+ },
+ "rows": 605,
+ "selectivity_pct": 10.075,
+ "r_rows": 605,
+ "r_selectivity_pct": 11.765,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 1,
+ "rows": 510,
+ "r_rows": 60,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 10.075,
+ "r_filtered": 100,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+l_orderkey l_linenumber l_shipdate l_quantity
+1121 5 1997-04-27 47
+1121 6 1997-04-21 50
+1441 7 1997-06-07 50
+1443 1 1997-02-05 47
+1473 1 1997-05-05 50
+1568 2 1997-04-06 46
+1632 1 1997-01-25 47
+1632 3 1997-01-29 47
+1954 7 1997-06-04 49
+1959 1 1997-05-05 46
+2151 3 1997-01-20 49
+2177 5 1997-05-10 46
+2369 2 1997-01-02 47
+2469 3 1997-01-11 48
+2469 6 1997-03-03 49
+2470 2 1997-06-02 50
+260 1 1997-03-24 50
+288 2 1997-04-19 49
+289 4 1997-03-14 48
+3009 1 1997-03-19 48
+3105 3 1997-02-28 48
+3106 2 1997-02-27 49
+3429 1 1997-04-08 48
+3490 2 1997-06-27 50
+3619 1 1997-01-22 49
+3619 3 1997-01-31 46
+3969 3 1997-05-29 46
+4005 4 1997-01-31 49
+4036 1 1997-06-21 46
+4066 4 1997-02-17 49
+4098 1 1997-01-26 46
+422 3 1997-06-21 46
+4258 3 1997-01-02 46
+4421 2 1997-04-21 46
+4421 3 1997-05-25 46
+4453 3 1997-05-29 48
+4484 7 1997-03-17 50
+4609 3 1997-02-11 46
+484 1 1997-03-06 49
+484 3 1997-01-24 50
+484 5 1997-03-05 48
+485 1 1997-03-28 50
+4868 1 1997-04-29 47
+4868 3 1997-04-23 49
+4934 1 1997-05-20 48
+4967 1 1997-05-27 50
+5090 2 1997-04-05 46
+5152 2 1997-03-10 50
+5158 4 1997-04-10 49
+5606 3 1997-03-11 46
+5606 7 1997-02-01 46
+5762 4 1997-03-02 47
+581 3 1997-02-27 49
+5829 5 1997-01-31 49
+5831 4 1997-02-24 46
+5895 2 1997-04-27 47
+5895 3 1997-03-15 49
+5952 1 1997-06-30 49
+705 1 1997-04-18 46
+836 3 1997-03-21 46
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range i_l_shipdate,i_l_quantity i_l_shipdate 4 NULL 510 Using index condition; Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rows": 510,
+ "filtered": 10.075,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range i_l_shipdate,i_l_quantity i_l_shipdate 4 NULL 510 510.00 10.07 11.76 Using index condition; Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": ["i_l_shipdate", "i_l_quantity"],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "r_loops": 1,
+ "rows": 510,
+ "r_rows": 510,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 10.075,
+ "r_filtered": 11.765,
+ "index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
+ "attached_condition": "lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45;
+l_orderkey l_linenumber l_shipdate l_quantity
+1121 5 1997-04-27 47
+1121 6 1997-04-21 50
+1441 7 1997-06-07 50
+1443 1 1997-02-05 47
+1473 1 1997-05-05 50
+1568 2 1997-04-06 46
+1632 1 1997-01-25 47
+1632 3 1997-01-29 47
+1954 7 1997-06-04 49
+1959 1 1997-05-05 46
+2151 3 1997-01-20 49
+2177 5 1997-05-10 46
+2369 2 1997-01-02 47
+2469 3 1997-01-11 48
+2469 6 1997-03-03 49
+2470 2 1997-06-02 50
+260 1 1997-03-24 50
+288 2 1997-04-19 49
+289 4 1997-03-14 48
+3009 1 1997-03-19 48
+3105 3 1997-02-28 48
+3106 2 1997-02-27 49
+3429 1 1997-04-08 48
+3490 2 1997-06-27 50
+3619 1 1997-01-22 49
+3619 3 1997-01-31 46
+3969 3 1997-05-29 46
+4005 4 1997-01-31 49
+4036 1 1997-06-21 46
+4066 4 1997-02-17 49
+4098 1 1997-01-26 46
+422 3 1997-06-21 46
+4258 3 1997-01-02 46
+4421 2 1997-04-21 46
+4421 3 1997-05-25 46
+4453 3 1997-05-29 48
+4484 7 1997-03-17 50
+4609 3 1997-02-11 46
+484 1 1997-03-06 49
+484 3 1997-01-24 50
+484 5 1997-03-05 48
+485 1 1997-03-28 50
+4868 1 1997-04-29 47
+4868 3 1997-04-23 49
+4934 1 1997-05-20 48
+4967 1 1997-05-27 50
+5090 2 1997-04-05 46
+5152 2 1997-03-10 50
+5158 4 1997-04-10 49
+5606 3 1997-03-11 46
+5606 7 1997-02-01 46
+5762 4 1997-03-02 47
+581 3 1997-02-27 49
+5829 5 1997-01-31 49
+5831 4 1997-02-24 46
+5895 2 1997-04-27 47
+5895 3 1997-03-15 49
+5952 1 1997-06-30 49
+705 1 1997-04-18 46
+836 3 1997-03-21 46
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 Using where; Using index
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rows": 98,
+ "filtered": 100,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 4.7333,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 98.00 100.00 100.00 Using where; Using index
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 4.73 11.22 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "r_loops": 1,
+ "rows": 98,
+ "r_rows": 98,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 98,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 4.7333,
+ "r_filtered": 11.224,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 6 1997-01-25 222274.54
+484 3 1997-01-24 219920.62
+5606 6 1997-01-11 219959.08
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 Using where; Using index
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "rows": 98,
+ "filtered": 100,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 4.7333,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 NULL 98 98.00 100.00 100.00 Using where; Using index
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 4.73 11.22 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_shipdate",
+ "key_length": "4",
+ "used_key_parts": ["l_shipDATE"],
+ "r_loops": 1,
+ "rows": 98,
+ "r_rows": 98,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 98,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 4.7333,
+ "r_filtered": 11.224,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 6 1997-01-25 222274.54
+484 3 1997-01-24 219920.62
+5606 6 1997-01-11 219959.08
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 144 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "rows": 144,
+ "filtered": 100,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 0.8557,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 144 144.00 100.00 100.00 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.62 0.86 1.68 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "r_loops": 1,
+ "rows": 144,
+ "r_rows": 144,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 144,
+ "rows": 4,
+ "r_rows": 6.625,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 0.8557,
+ "r_filtered": 1.6771,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+o_orderkey l_linenumber l_shipdate l_quantity o_totalprice
+1632 1 1997-01-25 47 183286.33
+1632 3 1997-01-29 47 183286.33
+2177 5 1997-05-10 46 183493.42
+2469 3 1997-01-11 48 192074.23
+2469 6 1997-03-03 49 192074.23
+3619 1 1997-01-22 49 222274.54
+3619 3 1997-01-31 46 222274.54
+484 1 1997-03-06 49 219920.62
+484 3 1997-01-24 50 219920.62
+484 5 1997-03-05 48 219920.62
+4934 1 1997-05-20 48 180478.16
+5606 3 1997-03-11 46 219959.08
+5606 7 1997-02-01 46 219959.08
+5829 5 1997-01-31 49 183734.56
+5895 2 1997-04-27 47 201419.83
+5895 3 1997-03-15 49 201419.83
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 144 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "rows": 144,
+ "filtered": 100,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 0.8557,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 144 144.00 100.00 100.00 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.62 0.86 1.68 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "r_loops": 1,
+ "rows": 144,
+ "r_rows": 144,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "orders.o_totalprice between 180000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity",
+ "i_l_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 144,
+ "rows": 4,
+ "r_rows": 6.625,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 0.8557,
+ "r_filtered": 1.6771,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+l_quantity > 45 AND
+o_totalprice between 180000 and 230000;
+o_orderkey l_linenumber l_shipdate l_quantity o_totalprice
+1632 1 1997-01-25 47 183286.33
+1632 3 1997-01-29 47 183286.33
+2177 5 1997-05-10 46 183493.42
+2469 3 1997-01-11 48 192074.23
+2469 6 1997-03-03 49 192074.23
+3619 1 1997-01-22 49 222274.54
+3619 3 1997-01-31 46 222274.54
+484 1 1997-03-06 49 219920.62
+484 3 1997-01-24 50 219920.62
+484 5 1997-03-05 48 219920.62
+4934 1 1997-05-20 48 180478.16
+5606 3 1997-03-11 46 219959.08
+5606 7 1997-02-01 46 219959.08
+5829 5 1997-01-31 49 183734.56
+5895 2 1997-04-27 47 201419.83
+5895 3 1997-03-15 49 201419.83
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 71 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "rows": 71,
+ "filtered": 100,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 8.4929,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 71 71.00 100.00 100.00 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.70 8.49 7.77 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "r_loops": 1,
+ "rows": 71,
+ "r_rows": 71,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 71,
+ "rows": 4,
+ "r_rows": 6.7042,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 8.4929,
+ "r_filtered": 7.7731,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+1890 1 1997-04-02 202364.58
+1890 3 1997-02-09 202364.58
+1890 4 1997-04-08 202364.58
+1890 5 1997-04-15 202364.58
+1890 6 1997-02-13 202364.58
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 4 1997-03-18 222274.54
+3619 6 1997-01-25 222274.54
+453 1 1997-06-30 216826.73
+453 2 1997-06-30 216826.73
+484 1 1997-03-06 219920.62
+484 2 1997-04-09 219920.62
+484 3 1997-01-24 219920.62
+484 4 1997-04-29 219920.62
+484 5 1997-03-05 219920.62
+484 6 1997-04-06 219920.62
+5606 2 1997-02-23 219959.08
+5606 3 1997-03-11 219959.08
+5606 4 1997-02-06 219959.08
+5606 6 1997-01-11 219959.08
+5606 7 1997-02-01 219959.08
+5859 2 1997-05-15 210643.96
+5859 5 1997-05-28 210643.96
+5859 6 1997-06-15 210643.96
+5895 1 1997-04-05 201419.83
+5895 2 1997-04-27 201419.83
+5895 3 1997-03-15 201419.83
+5895 4 1997-03-03 201419.83
+5895 5 1997-04-30 201419.83
+5895 6 1997-04-19 201419.83
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 71 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "rows": 71,
+ "filtered": 100,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 8.4929,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice i_o_totalprice 9 NULL 71 71.00 100.00 100.00 Using where; Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.70 8.49 7.77 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "i_o_totalprice",
+ "key_length": "9",
+ "used_key_parts": ["o_totalprice"],
+ "r_loops": 1,
+ "rows": 71,
+ "r_rows": 71,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "orders.o_totalprice between 200000 and 230000",
+ "using_index": true
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 71,
+ "rows": 4,
+ "r_rows": 6.7042,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 8.4929,
+ "r_filtered": 7.7731,
+ "attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_orderkey, l_linenumber, l_shipdate, o_totalprice
+FROM orders JOIN lineitem ON o_orderkey=l_orderkey
+WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
+o_totalprice between 200000 and 230000;
+o_orderkey l_linenumber l_shipdate o_totalprice
+1156 3 1997-01-24 217682.81
+1156 4 1997-01-18 217682.81
+1156 6 1997-01-27 217682.81
+1156 7 1997-01-01 217682.81
+1890 1 1997-04-02 202364.58
+1890 3 1997-02-09 202364.58
+1890 4 1997-04-08 202364.58
+1890 5 1997-04-15 202364.58
+1890 6 1997-02-13 202364.58
+2180 2 1997-01-03 208481.57
+2180 3 1997-01-03 208481.57
+3619 1 1997-01-22 222274.54
+3619 3 1997-01-31 222274.54
+3619 4 1997-03-18 222274.54
+3619 6 1997-01-25 222274.54
+453 1 1997-06-30 216826.73
+453 2 1997-06-30 216826.73
+484 1 1997-03-06 219920.62
+484 2 1997-04-09 219920.62
+484 3 1997-01-24 219920.62
+484 4 1997-04-29 219920.62
+484 5 1997-03-05 219920.62
+484 6 1997-04-06 219920.62
+5606 2 1997-02-23 219959.08
+5606 3 1997-03-11 219959.08
+5606 4 1997-02-06 219959.08
+5606 6 1997-01-11 219959.08
+5606 7 1997-02-01 219959.08
+5859 2 1997-05-15 210643.96
+5859 5 1997-05-28 210643.96
+5859 6 1997-06-15 210643.96
+5895 1 1997-04-05 201419.83
+5895 2 1997-04-27 201419.83
+5895 3 1997-03-15 201419.83
+5895 4 1997-03-03 201419.83
+5895 5 1997-04-30 201419.83
+5895 6 1997-04-19 201419.83
+#
+# MDEV-18413: find constraint correlated indexes
+#
+ALTER TABLE lineitem ADD CONSTRAINT l_date CHECK(l_shipdate < l_receiptdate);
+# Filter on l_shipdate is not used because it participates in
+# the same constraint as l_receiptdate.
+# Access is made on l_receiptdate.
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "rows": 18,
+ "filtered": 0.5662,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 5.6667,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 18.00 0.57 38.89 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 5.67 14.29 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "r_loops": 1,
+ "rows": 18,
+ "r_rows": 18,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 0.5662,
+ "r_filtered": 38.889,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 7,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 5.6667,
+ "r_filtered": 14.286,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+l_shipdate l_receiptdate o_totalprice
+1996-10-07 1996-10-08 202623.92
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "rows": 18,
+ "filtered": 0.5662,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "rows": 1,
+ "filtered": 5.6667,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_receiptdate 4 NULL 18 18.00 0.57 38.89 Using index condition; Using where
+1 SIMPLE orders eq_ref PRIMARY,i_o_totalprice PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 1.00 5.67 14.29 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_receiptdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "i_l_receiptdate",
+ "key_length": "4",
+ "used_key_parts": ["l_receiptDATE"],
+ "r_loops": 1,
+ "rows": 18,
+ "r_rows": 18,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 0.5662,
+ "r_filtered": 38.889,
+ "index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-10-10'"
+ },
+ "table": {
+ "table_name": "orders",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "i_o_totalprice"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["o_orderkey"],
+ "ref": ["dbt3_s001.lineitem.l_orderkey"],
+ "r_loops": 7,
+ "rows": 1,
+ "r_rows": 1,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 5.6667,
+ "r_filtered": 14.286,
+ "attached_condition": "orders.o_totalprice between 200000 and 250000"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT l_shipdate, l_receiptdate, o_totalprice
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-10-10' AND
+l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
+o_totalprice BETWEEN 200000 AND 250000;
+l_shipdate l_receiptdate o_totalprice
+1996-10-07 1996-10-08 202623.92
+ALTER TABLE orders ADD COLUMN o_totaldiscount double;
+UPDATE orders SET o_totaldiscount = o_totalprice*(o_custkey/1000);
+CREATE INDEX i_o_totaldiscount on orders(o_totaldiscount);
+ALTER TABLE orders ADD CONSTRAINT o_price CHECK(o_totalprice > o_totaldiscount);
+# Filter on o_totalprice is not used because it participates in
+# the same constraint as o_discount.
+# Access is made on o_discount.
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 41,
+ "filtered": 3.3333,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 3.0475,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 41.00 3.33 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 41,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.3333,
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.0475,
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 41,
+ "filtered": 3.3333,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": 3.0475,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 41.00 3.33 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 3.05 66.67 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY", "i_o_totalprice", "i_o_totaldiscount"],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 41,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.3333,
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 3.0475,
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM orders, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+CREATE VIEW v1 AS
+SELECT * FROM orders
+WHERE o_orderdate BETWEEN '1992-12-01' AND '1997-01-01';
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=on' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 41,
+ "filtered": "REPLACED",
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": "REPLACED",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 41.00 # 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
+set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 41,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=on' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+set statement optimizer_switch='rowid_filter=off' for EXPLAIN FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "rows": 41,
+ "filtered": "REPLACED",
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "rows": 4,
+ "filtered": "REPLACED",
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for ANALYZE SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_totalprice,i_o_totaldiscount i_o_totaldiscount 9 NULL 41 41.00 # 2.44 Using index condition; Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 6.00 # 66.67 Using where
+set statement optimizer_switch='rowid_filter=off' for ANALYZE FORMAT=JSON SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "orders",
+ "access_type": "range",
+ "possible_keys": [
+ "PRIMARY",
+ "i_o_orderdate",
+ "i_o_totalprice",
+ "i_o_totaldiscount"
+ ],
+ "key": "i_o_totaldiscount",
+ "key_length": "9",
+ "used_key_parts": ["o_totaldiscount"],
+ "r_loops": 1,
+ "rows": 41,
+ "r_rows": 41,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 2.439,
+ "index_condition": "orders.o_totaldiscount between 18000 and 20000",
+ "attached_condition": "orders.o_totalprice between 200000 and 220000 and orders.o_orderDATE between '1992-12-01' and '1997-01-01'"
+ },
+ "table": {
+ "table_name": "lineitem",
+ "access_type": "ref",
+ "possible_keys": [
+ "PRIMARY",
+ "i_l_shipdate",
+ "i_l_orderkey",
+ "i_l_orderkey_quantity"
+ ],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["l_orderkey"],
+ "ref": ["dbt3_s001.orders.o_orderkey"],
+ "r_loops": 1,
+ "rows": 4,
+ "r_rows": 6,
+ "r_total_time_ms": "REPLACED",
+ "filtered": "REPLACED",
+ "r_filtered": 66.667,
+ "attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
+ }
+ }
+}
+set statement optimizer_switch='rowid_filter=off' for SELECT o_totaldiscount, o_totalprice, l_shipdate
+FROM v1, lineitem
+WHERE o_orderkey=l_orderkey AND
+o_totaldiscount BETWEEN 18000 AND 20000 AND
+o_totalprice BETWEEN 200000 AND 220000 AND
+l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
+o_totaldiscount o_totalprice l_shipdate
+18016.04288 219707.84 1996-10-02
+18016.04288 219707.84 1996-10-17
+18016.04288 219707.84 1996-11-04
+18016.04288 219707.84 1996-11-14
+ALTER TABLE lineitem DROP CONSTRAINT l_date;
+ALTER TABLE orders DROP CONSTRAINT o_price;
+ALTER TABLE orders DROP COLUMN o_totaldiscount;
+DROP VIEW v1;
+DROP DATABASE dbt3_s001;
+use test;
+#
+# MDEV-18816: potential range filter for one join table with
+# impossible WHERE for another
+#
+create table t1 (
+pk int not null primary key, c2 varchar(10) , i1 int,key (c2)
+) engine=myisam;
+insert into t1 values (1,'a',-5),(2,'a',null);
+create table t2 (
+pk int, i1 int, c1 varchar(30) , key c1 (c1(30)), key i1 (i1)
+) engine=myisam;
+insert into t2 values
+(1,-5,'a'),(2,null,'a'),(3,null,'a'),(4,null,'a'),(5,5,'a'),(6,null,'a'),
+(7,4,'a'),(8,55,'a'),(9,null,'a'),(10,null,'a'),(11,null,'a'),(12,-5,'a'),
+(13,-5,'a'),(14,null,'a'),(15,null,'a'),(16,-5,'a'),(17,-5,'a');
+select 1
+from t1
+left join
+t2 join t1 as t1_a on t2.i1 = t1_a.pk
+on t1.c2 = t2.c1
+where t1_a.pk is null and t1_a.i1 != 3;
+1
+explain extended select 1
+from t1
+left join
+t2 join t1 as t1_a on t2.i1 = t1_a.pk
+on t1.c2 = t2.c1
+where t1_a.pk is null and t1_a.i1 != 3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+Warnings:
+Note 1003 select 1 AS `1` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t1_a` where 0
+drop table t1,t2;
+#
+# MDEV-18640: TABLE::prune_range_rowid_filters: Conditional jump or
+# move depends on uninitialized value
+#
+CREATE TABLE t1 (
+pk INT, i INT, PRIMARY KEY (pk), KEY (pk,i)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,10), (7,70), (2,20);
+SELECT * FROM t1 WHERE pk < 5;
+pk i
+1 10
+2 20
+DROP TABLE t1;
+#
+# MDEV-18956: Possible rowid filter for subquery for which
+# in_to_exists strategy has been chosen
+#
+CREATE TABLE t1 (pk int) engine=myisam ;
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (
+pk int auto_increment PRIMARY KEY,
+i1 int, i2 int, c2 varchar(1),
+KEY (i1), KEY (i2)
+) engine=myisam;
+INSERT INTO t2 VALUES
+(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
+(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
+(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
+SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
+pk
+EXPLAIN EXTENDED
+SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` having 0
+DROP TABLE t1,t2;
+#
+# MDEV-19255: rowid range filter built for range condition
+# that uses in expensive subquery
+#
+CREATE TABLE t1 (
+pk1 INT PRIMARY KEY, a1 INT, b1 VARCHAR(1), KEY(b1)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES
+(10,0,'z'),(11,3,'j'),(12,8,'f'),(13,8,'p'),(14,6,'w'),(15,0,'c'),(16,1,'j'),
+(17,1,'f'),(18,5,'v'),(19,3,'f'),(20,2,'q'),(21,8,'y'),(22,0,'a'),(23,9,'w'),
+(24,3,'e'),(25,1,'b'),(26,9,'r'),(27,2,'k'),(28,5,'c'),(29,3,'k'),(30,9,'b'),
+(31,8,'j'),(32,1,'t'),(33,8,'n'),(34,3,'z'),(35,0,'u'),(36,3,'a'),(37,3,'g'),
+(38,1,'f'),(39,6,'p'),(40,6,'m'),(41,6,'t'),(42,7,'i'),(43,4,'h'),(44,3,'d'),
+(45,2,'b'),(46,1,'o'),(47,2,'j'),(48,6,'s'),(49,5,'q'),(50,6,'l'),(51,9,'j'),
+(52,6,'y'),(53,0,'i'),(54,7,'x'),(55,2,'u'),(56,6,'t'),(57,4,'b'),(58,5,'m'),
+(59,4,'x'),(60,8,'x'),(61,6,'v'),(62,8,'m'),(63,4,'j'),(64,8,'z'),(65,2,'a'),
+(66,9,'i'),(67,4,'g'),(68,8,'h'),(69,1,'p'),(70,8,'a'),(71,0,'x'),(72,2,'s'),
+(73,6,'k'),(74,0,'m'),(75,6,'e'),(76,9,'y'),(77,7,'d'),(78,7,'w'),(79,6,'y'),
+(80,9,'s'),(81,9,'x'),(82,6,'l'),(83,9,'f'),(84,8,'x'),(85,1,'p'),(86,7,'y'),
+(87,6,'p'),(88,1,'g'),(89,3,'c'),(90,5,'h'),(91,3,'p'),(92,2,'b'),(93,1,NULL),
+(94,3,NULL),(95,2,'y'),(96,7,'s'),(97,7,'x'),(98,6,'i'),(99,9,'t'),(100,5,'j'),
+(101,0,'u'),(102,7,'r'),(103,2,'x'),(104,8,'e'),(105,8,'i'),(106,5,'q'),
+(107,8,'z'),(108,3,'k'),(109,65,NULL);
+CREATE TABLE t2 (pk2 INT PRIMARY KEY, a2 INT, b2 VARCHAR(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,1,'x');
+INSERT INTO t2 SELECT * FROM t1;
+SELECT * FROM t1 INNER JOIN t2 ON ( pk1 <> pk2 AND pk1 = a2 )
+WHERE b1 <= ( SELECT MAX(b2) FROM t2 WHERE pk2 <= 1 );
+pk1 a1 b1 pk2 a2 b2
+65 2 a 109 65 NULL
+EXPLAIN EXTENDED SELECT * FROM t1 INNER JOIN t2 ON ( pk1 <> pk2 AND pk1 = a2 )
+WHERE b1 <= ( SELECT MAX(b2) FROM t2 WHERE pk2 <= 1 );
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 101 100.00 Using where
+1 PRIMARY t1 eq_ref|filter PRIMARY,b1 PRIMARY|b1 4|4 test.t2.a2 1 (87%) 87.00 Using where; Using rowid filter
+2 SUBQUERY t2 range PRIMARY PRIMARY 4 NULL 1 100.00 Using index condition
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,`test`.`t2`.`pk2` AS `pk2`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b2` AS `b2` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`pk1` = `test`.`t2`.`a2` and `test`.`t1`.`b1` <= (/* select#2 */ select max(`test`.`t2`.`b2`) from `test`.`t2` where `test`.`t2`.`pk2` <= 1) and `test`.`t2`.`a2` <> `test`.`t2`.`pk2`
+EXPLAIN FORMAT=JSON SELECT * FROM t1 INNER JOIN t2 ON ( pk1 <> pk2 AND pk1 = a2 )
+WHERE b1 <= ( SELECT MAX(b2) FROM t2 WHERE pk2 <= 1 );
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 101,
+ "filtered": 100,
+ "attached_condition": "t2.a2 <> t2.pk2 and t2.a2 is not null"
+ },
+ "table": {
+ "table_name": "t1",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY", "b1"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["pk1"],
+ "ref": ["test.t2.a2"],
+ "rowid_filter": {
+ "range": {
+ "key": "b1",
+ "used_key_parts": ["b1"]
+ },
+ "rows": 87,
+ "selectivity_pct": 87
+ },
+ "rows": 1,
+ "filtered": 87,
+ "attached_condition": "t1.b1 <= (subquery#2)"
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "range",
+ "possible_keys": ["PRIMARY"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["pk2"],
+ "rows": 1,
+ "filtered": 100,
+ "index_condition": "t2.pk2 <= 1"
+ }
+ }
+ }
+ ]
+ }
+}
+DROP TABLE t1,t2;
+#
+# MDEV-21794: Optimizer flag rowid_filter leads to long query
+#
+create table t10(a int);
+insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t11(a int);
+insert into t11 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C;
+CREATE TABLE t1 (
+el_id int(10) unsigned NOT NULL ,
+el_index blob NOT NULL,
+el_index_60 varbinary(60) NOT NULL,
+filler blob,
+PRIMARY KEY (el_id),
+KEY el_index (el_index(60)),
+KEY el_index_60 (el_index_60,el_id)
+);
+insert into t1
+select
+A.a+1000*B.a,
+A.a+1000*B.a + 10000,
+A.a+1000*B.a + 10000,
+'filler-data-filler-data'
+from
+t11 A, t10 B;
+analyze table t1 persistent for all;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'el_index'
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'filler'
+test.t1 analyze status OK
+# This must not use rowid_filter with key=el_index|el_index_60:
+explain
+select * from t1
+where el_index like '10%' and (el_index_60 like '10%' or el_index_60 like '20%');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range el_index,el_index_60 el_index 62 NULL 1000 Using where
+drop table t10, t11, t1;
+#
+# MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT
+#
+set @save_optimizer_switch= @@optimizer_switch;
+SET @@optimizer_switch="index_merge_sort_union=OFF";
+CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b));
+INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4);
+explain
+SELECT * FROM t1 WHERE a > 0 AND b=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref|filter a,b b|a 5|5 const 2 (14%) Using where; Using rowid filter
+SELECT * FROM t1 WHERE a > 0 AND b=0;
+a b
+1 0
+drop table t1;
+SET @@optimizer_switch=@save_optimizer_switch;
+set @@use_stat_tables=@save_use_stat_tables;
+#
+# MDEV-18755: possible RORI-plan and possible plan with range filter
+#
+create table t1 (
+pk int not null primary key, f1 varchar(10), f2 varchar(30), a int(10),
+key (f1), key (f2)
+) engine=innodb;
+insert into t1 values
+(2,'a','a',2),(3,'a','a',null),(4,'a','a',55),(5,'a','a',4),(6,'a','a',0),
+(7,'a','a',1),(8,'a','a',4),(9,'a','a',null),(10,'a','a',0),(11,'a','a',0),
+(12,'a','a',null),(13,'a','a',49778),(14,'a','a',6),(15,'a','a',3),
+(16,'a','a',233),(17,'a','a',-1),(18,'a','a',5),(19,'a','a',-1),
+(20,'a','a',null),(21,'a','a',0),(22,'a','a',null),(23,'a','a',53840),
+(24,'a','a',null),(25,'a','a',null),(26,'a','a',5),(27,'a','a',43454),
+(28,'a','a',0),(29,'a','a',0),(30,'a','a',null),(59,'a','a',null),
+(60,'a','a',null),(61,'a','a',-1),(62,'a','a',null),(63,'a','a',0),
+(64,'a','a',14468),(65,'a','a',0),(66,'a','a',28),(67,'a','a',null),
+(68,'a','a',14983),(69,'a','a',null),(70,'a','a',3),(71,'a','a',null),
+(72,'a','a',null),(73,'a','a',237),(74,'a','a',2),(75,'a','a',0),
+(76,'a','a',6),(77,'a','a',5),(78,'a','a',0),(79,'a','a',1),(80,'a','a',-1),
+(81,'a','a',20),(82,'a','a',0),(83,'a','a',0),(84,'a','a',null),
+(85,'a','a',-1),(86,'a','a',5),(87,'a','a',null),(88,'a','a',160),
+(89,null,null,null),(90,'a','a',14785),(91,'a','a',0),(92,'a','a',null);
+( select * from t1
+where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')))
+union
+( select * from t1
+where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')));
+pk f1 f2 a
+explain ( select * from t1
+where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')))
+union
+( select * from t1
+where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index_merge f1,f2 f1,f2 13,33 NULL 1 Using intersect(f1,f2); Using where
+2 UNION t1 index_merge f1,f2 f1,f2 13,33 NULL 1 Using intersect(f1,f2); Using where
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+explain format=json ( select * from t1
+where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')))
+union
+( select * from t1
+where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')));
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "index_merge",
+ "possible_keys": ["f1", "f2"],
+ "key_length": "13,33",
+ "index_merge": {
+ "intersect": {
+ "range": {
+ "key": "f1",
+ "used_key_parts": ["f1"]
+ },
+ "range": {
+ "key": "f2",
+ "used_key_parts": ["f2"]
+ }
+ }
+ },
+ "rows": 1,
+ "filtered": 1.5873,
+ "attached_condition": "t1.f1 is null and t1.f2 is null and (t1.f2 between 'a' and 'z' or t1.f1 = 'a')"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "operation": "UNION",
+ "table": {
+ "table_name": "t1",
+ "access_type": "index_merge",
+ "possible_keys": ["f1", "f2"],
+ "key_length": "13,33",
+ "index_merge": {
+ "intersect": {
+ "range": {
+ "key": "f1",
+ "used_key_parts": ["f1"]
+ },
+ "range": {
+ "key": "f2",
+ "used_key_parts": ["f2"]
+ }
+ }
+ },
+ "rows": 1,
+ "filtered": 1.5873,
+ "attached_condition": "t1.f1 is null and t1.f2 is null and (t1.f2 between 'a' and 'z' or t1.f1 = 'a')"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-19195: possible RORI-plan and possible plan with range filter
+# for not first joined table
+#
+create table t1 (id int not null primary key) engine=innodb;
+insert into t1 values (2),(1);
+create table t2 (y int,x int,index (x),index (y)) engine=innodb;
+insert into t2 values
+(4,1),(4,777),(2,1),(2,888),(111,1),(222,1),(333,345),(444,1),
+(555,555),(666,1);
+select * from t1 join t2 on t1.id = t2.x where t2.y = 2 and t1.id = 1;
+id y x
+1 2 1
+explain extended select * from t1 join t2 on t1.id = t2.x where t2.y = 2 and t1.id = 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 100.00 Using index
+1 SIMPLE t2 index_merge x,y y,x 5,5 NULL 1 100.00 Using intersect(y,x); Using where; Using index
+Warnings:
+Note 1003 select 1 AS `id`,`test`.`t2`.`y` AS `y`,`test`.`t2`.`x` AS `x` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`y` = 2 and `test`.`t2`.`x` = 1
+drop table t1, t2;
+#
+# MDEV-19820: use of rowid filter for innodb table without primary key
+#
+create table t1 (a int, b int, key (b), key (a)) engine=innodb;
+insert into t1
+select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch='rowid_filter=off';
+select count(*) from t1 where a in (22,83,11) and b=2;
+count(*)
+6
+explain extended select count(*) from t1 where a in (22,83,11) and b=2;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ref b,a b 5 const 59 3.30 Using where
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (22,83,11)
+select * from t1 where a in (22,83,11) and b=2;
+a b
+11 2
+11 2
+83 2
+11 2
+83 2
+22 2
+set optimizer_switch='rowid_filter=on';
+select count(*) from t1 where a in (22,83,11) and b=2;
+count(*)
+6
+explain extended select count(*) from t1 where a in (22,83,11) and b=2;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 3.30 Using where; Using rowid filter
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (22,83,11)
+select * from t1 where a in (22,83,11) and b=2;
+a b
+11 2
+11 2
+83 2
+11 2
+83 2
+22 2
+drop table t1;
+set optimizer_switch=@save_optimizer_switch;
+SET SESSION STORAGE_ENGINE=DEFAULT;
+#
+# MDEV-19919: use of rowid filter for innodb table + ORDER BY
+#
+SET @stats.save= @@innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent= ON;
+CREATE TABLE t1 (
+a INT,
+b VARCHAR(10),
+c VARCHAR(1024),
+KEY (b),
+KEY (c)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(1,'w','z'), (1,'X','o'), (1,'q','c'), (5,'w','c'), (2,'j','m'),
+(2,'Q','s'), (9,'e','J'), (2,'p','W'), (9,'o','F'), (2,'g','S'),
+(1,'Y','a'), (NULL,'Y','p'), (NULL,'s','x'), (NULL,'i','S'),
+(1,'l','q'), (7,'r','e'), (4,'b','h'), (NULL,'E','c'),
+(NULL,'M','a'), (3,'e','X'), (NULL,'p','r'), (9,'e','i'),
+(3,'g','x'), (2,'h','y');
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+EXPLAIN EXTENDED
+SELECT a FROM t1 WHERE c < 'k' AND b > 't' ORDER BY a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range|filter b,c b|c 13|1027 NULL 5 (42%) 41.67 Using index condition; Using where; Using filesort; Using rowid filter
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`c` < 'k' and `test`.`t1`.`b` > 't' order by `test`.`t1`.`a`
+SELECT a FROM t1 WHERE c < 'k' AND b > 't' ORDER BY a;
+a
+1
+5
+DROP TABLE t1;
+SET GLOBAL innodb_stats_persistent= @stats.save;
+#
+# MDEV-20056: index to build range filter should not be
+# the same as table access index
+#
+SET @stats.save= @@innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent= ON;
+CREATE TABLE t1 (ch varchar(1), id int, id2 int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+('l',3,2), ('e',NULL,NULL), ('r',7,3), ('h',NULL,2), (NULL,4,4), ('c',4,NULL),
+('k',NULL,NULL), ('h',NULL,NULL), ('b',9,NULL), ('f',6,NULL);
+CREATE TABLE t2 (
+pk int NOT NULL, col_date_key date, ch2 varchar(1), id2 int,
+PRIMARY KEY (pk), KEY (col_date_key), KEY (ch2), KEY (id2)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES
+(1,'2034-04-21','g',9), (2,'2006-09-08','y',1), (3,NULL,'h',2),
+(4,'1987-03-02','s',2), (5,'2019-07-02','u',NULL),(6,'2012-12-18','z',1),
+(7,NULL,'w',4), (8,'2005-03-10','o',8), (9,'1987-02-12','d',4);
+CREATE TABLE t3 (id int) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (6);
+ANALYZE TABLE t1,t2,t3;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
+EXPLAIN EXTENDED SELECT 1 FROM t3
+WHERE EXISTS ( SELECT 1 FROM t1
+WHERE t3.id IN ( SELECT bt1.id FROM t2, t1 AS bt1
+WHERE bt1.id = t2.pk AND
+t2.ch2 <= 'g' ) OR
+t1.id2 = t1.id);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 1 100.00 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+3 MATERIALIZED t2 range PRIMARY,col_date_key,ch2,id2 ch2 4 NULL 2 100.00 Using where; Using index
+3 MATERIALIZED bt1 ALL NULL NULL NULL NULL 10 100.00 Using where; Using join buffer (flat, BNL join)
+Warnings:
+Note 1276 Field or reference 'test.t3.id' of SELECT #2 was resolved in SELECT #1
+Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t3` where <in_optimizer>(1,<expr_cache><`test`.`t3`.`id`>(exists(/* select#2 */ select 1 from `test`.`t1` where <expr_cache><`test`.`t3`.`id`>(<in_optimizer>(`test`.`t3`.`id`,`test`.`t3`.`id` in ( <materialize> (/* select#3 */ select `test`.`bt1`.`id` from `test`.`t2` join `test`.`t1` `bt1` where `test`.`bt1`.`id` = `test`.`t2`.`pk` and `test`.`t2`.`ch2` <= 'g' ), <primary_index_lookup>(`test`.`t3`.`id` in <temporary table> on distinct_key where `test`.`t3`.`id` = `<subquery3>`.`id`)))) or `test`.`t1`.`id2` = `test`.`t1`.`id` limit 1)))
+SELECT 1 FROM t3
+WHERE EXISTS ( SELECT 1 FROM t1
+WHERE t3.id IN ( SELECT bt1.id FROM t2, t1 AS bt1
+WHERE bt1.id = t2.pk AND
+t2.ch2 <= 'g' ) OR
+t1.id2 = t1.id);
+1
+1
+EXPLAIN EXTENDED SELECT 1 FROM t3
+WHERE EXISTS ( SELECT 1 FROM t1
+WHERE t3.id IN ( SELECT bt1.id FROM t2, t1 AS bt1
+WHERE bt1.ch = t2.ch2 AND
+bt1.id = t2.pk AND
+t2.ch2 <= 'g' ) OR
+t1.id2 = t1.id);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 1 100.00 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 10 100.00 Using where
+3 MATERIALIZED t2 range PRIMARY,col_date_key,ch2,id2 ch2 4 NULL 2 100.00 Using where; Using index
+3 MATERIALIZED bt1 ALL NULL NULL NULL NULL 10 100.00 Using where; Using join buffer (flat, BNL join)
+Warnings:
+Note 1276 Field or reference 'test.t3.id' of SELECT #2 was resolved in SELECT #1
+Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t3` where <in_optimizer>(1,<expr_cache><`test`.`t3`.`id`>(exists(/* select#2 */ select 1 from `test`.`t1` where <expr_cache><`test`.`t3`.`id`>(<in_optimizer>(`test`.`t3`.`id`,`test`.`t3`.`id` in ( <materialize> (/* select#3 */ select `test`.`bt1`.`id` from `test`.`t2` join `test`.`t1` `bt1` where `test`.`bt1`.`ch` = `test`.`t2`.`ch2` and `test`.`bt1`.`id` = `test`.`t2`.`pk` and `test`.`t2`.`ch2` <= 'g' ), <primary_index_lookup>(`test`.`t3`.`id` in <temporary table> on distinct_key where `test`.`t3`.`id` = `<subquery3>`.`id`)))) or `test`.`t1`.`id2` = `test`.`t1`.`id` limit 1)))
+SELECT 1 FROM t3
+WHERE EXISTS ( SELECT 1 FROM t1
+WHERE t3.id IN ( SELECT bt1.id FROM t2, t1 AS bt1
+WHERE bt1.ch = t2.ch2 AND
+bt1.id = t2.pk AND
+t2.ch2 <= 'g' ) OR
+t1.id2 = t1.id);
+1
+1
+DROP TABLE t1, t2, t3;
+SET GLOBAL innodb_stats_persistent= @stats.save;
+#
+# MDEV-20407: usage of range filter is not supported when
+# the joined table is accessed by a full text index
+#
+set @stats.save= @@innodb_stats_persistent;
+set global innodb_stats_persistent=on;
+create table t1(id int, s text, key (id), fulltext key (s)) engine=innodb;
+insert into t1 values
+(1119,'t'),(1134,'t'),(1134,'t'),(1143,'t'),(1143,'t'),(1187,'t'),(1187,'t'),
+(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),
+(1187,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),
+(1214,'t'),(1214,'t'),(1215,'t'),(1215,'t'),(1215,'t'),(1216,'t'),(1218,'t'),
+(1220,'t'),(1220,'t'),(1220,'t'),(1222,'t'),(1223,'t'),(1223,'t'),(1224,'t'),
+(1225,'t'),(1225,'t'),(1226,'t'),(1226,'t'),(1227,'t'),(1227,'t'),(1228,'t'),
+(1229,'t'),(1230,'t'),(1230,'t'),(1231,'t'),(1231,'t'),(1232,'t'),(1232,'t'),
+(1232,'t'),(1232,'t'),(1233,'t'),(1241,'t'),(1245,'t'),(1247,'t'),(1247,'t'),
+(1247,'t'),(1247,'t'),(1247,'t'),(1247,'t'),(1248,'like fttest');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 's'
+test.t1 analyze status OK
+explain extended select count(0) from t1
+where id=15066 and (match s against ('+"fttest"' in boolean mode));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 fulltext id,s s 0 1 1.64 Using where
+Warnings:
+Note 1003 select count(0) AS `count(0)` from `test`.`t1` where `test`.`t1`.`id` = 15066 and (match `test`.`t1`.`s` against ('+"fttest"' in boolean mode))
+select count(0) from t1
+where id=15066 and (match s against ('+"fttest"' in boolean mode));
+count(0)
+0
+drop table t1;
+set global innodb_stats_persistent= @stats.save;
+#
+# MDEV-21356: usage of range filter with range access employing
+# optimizer_switch='mrr=on,mrr_sort_keys=on';
+#
+CREATE TABLE t1 (
+id int(11) unsigned NOT NULL AUTO_INCREMENT,
+domain varchar(255) NOT NULL,
+registrant_name varchar(255) DEFAULT NULL,
+registrant_organization varchar(255) DEFAULT NULL,
+registrant_street1 varchar(255) DEFAULT NULL,
+registrant_street2 varchar(255) DEFAULT NULL,
+registrant_street3 varchar(255) DEFAULT NULL,
+registrant_street4 varchar(255) DEFAULT NULL,
+registrant_street5 varchar(255) DEFAULT NULL,
+registrant_city varchar(255) DEFAULT NULL,
+registrant_postal_code varchar(255) DEFAULT NULL,
+registrant_country varchar(255) DEFAULT NULL,
+registrant_email varchar(255) DEFAULT NULL,
+registrant_telephone varchar(255) DEFAULT NULL,
+administrative_name varchar(255) DEFAULT NULL,
+administrative_organization varchar(255) DEFAULT NULL,
+administrative_street1 varchar(255) DEFAULT NULL,
+administrative_street2 varchar(255) DEFAULT NULL,
+administrative_street3 varchar(255) DEFAULT NULL,
+administrative_street4 varchar(255) DEFAULT NULL,
+administrative_street5 varchar(255) DEFAULT NULL,
+administrative_city varchar(255) DEFAULT NULL,
+administrative_postal_code varchar(255) DEFAULT NULL,
+administrative_country varchar(255) DEFAULT NULL,
+administrative_email varchar(255) DEFAULT NULL,
+administrative_telephone varchar(255) DEFAULT NULL,
+technical_name varchar(255) DEFAULT NULL,
+technical_organization varchar(255) DEFAULT NULL,
+technical_street1 varchar(255) DEFAULT NULL,
+technical_street2 varchar(255) DEFAULT NULL,
+technical_street3 varchar(255) DEFAULT NULL,
+technical_street4 varchar(255) DEFAULT NULL,
+technical_street5 varchar(255) DEFAULT NULL,
+technical_city varchar(255) DEFAULT NULL,
+technical_postal_code varchar(255) DEFAULT NULL,
+technical_country varchar(255) DEFAULT NULL,
+technical_email varchar(255) DEFAULT NULL,
+technical_telephone varchar(255) DEFAULT NULL,
+json longblob NOT NULL,
+timestamp timestamp NOT NULL DEFAULT current_timestamp(),
+PRIMARY KEY (id),
+KEY ixEventWhoisDomainDomain (domain),
+KEY ixEventWhoisDomainTimestamp (timestamp)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO t1 (
+id, domain, registrant_name, registrant_organization, registrant_street1,
+registrant_street2, registrant_street3, registrant_street4, registrant_street5,
+registrant_city, registrant_postal_code, registrant_country, registrant_email,
+registrant_telephone, administrative_name, administrative_organization,
+administrative_street1, administrative_street2, administrative_street3,
+administrative_street4, administrative_street5, administrative_city,
+administrative_postal_code, administrative_country, administrative_email,
+administrative_telephone, technical_name, technical_organization,
+technical_street1, technical_street2, technical_street3, technical_street4,
+technical_street5, technical_city, technical_postal_code, technical_country,
+technical_email, technical_telephone, json, timestamp) VALUES
+(60380, 'www.mailhost.i-dev.fr', null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, '', '2016-12-22 09:18:28'),
+(60383, 'www.bestwestern.fr', null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, '', '2016-12-22 09:27:06'),
+(80392, 'www.dfinitions.fr', null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, '', '2017-01-30 08:02:01'),
+(80407, 'www.firma.o2.pl', null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, null, 'AZ.pl Sp. z o.o.', 'Al. Papieza Jana Pawla II 19/2',
+null, null, null, null, '70-453 Szczecin', null, 'POLAND', null,
+'48914243780', '', '2017-01-30 08:24:51'),
+(80551, 'www.mailhost.i-dev.fr', null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, null, null, '', '2017-01-30 10:00:56'),
+(80560, 'www.blackmer-mouvex.com', 'MARIE-PIERRE PRODEAU', 'MOUVEX',
+'2 RUE DES CAILLOTES', null, null, null, null, 'AUXERRE', '89000', 'FRANCE',
+'PRODEAU@MOUVEX.COM', null, 'MARIE-PIERRE PRODEAU', 'MOUVEX',
+'2 RUE DES CAILLOTES', null, null, null, null, 'AUXERRE', '89000', 'FRANCE',
+'PRODEAU@MOUVEX.COM', '33 386498630', 'LAURENT SOUCHELEAU', 'MOUVEX',
+'2 RUE DES CAILLOTES', null, null, null, null, 'AUXERRE', '89000', 'FRANCE',
+'SOUCHELEAU@MOUVEX.COM', '33 386498643', '', '2017-01-30 10:04:38'),
+(80566, 'www.inup.com', 'MAXIMILIAN V. KETELHODT', null,
+'SUELZBURGSTRASSE 158A', null, null, null, null, 'KOELN', '50937', 'GERMANY',
+'ICANN@EXPIRES-2009.WEBCARE24.COM', '492214307580', 'MAXIMILIAN V. KETELHODT',
+null, 'SUELZBURGSTRASSE 158A', null, null, null, null, 'KOELN', '50937',
+'GERMANY', 'ICANN@EXPIRES-2009.WEBCARE24.COM', '492214307580',
+'MAXIMILIAN V. KETELHODT', null, 'SUELZBURGSTRASSE 158A', null, null, null,
+null, 'KOELN', '50937', 'GERMANY', 'ICANN@EXPIRES-2009.WEBCARE24.COM',
+'492214307580', '', '2017-01-30 10:08:29');
+SET @save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='mrr=on,mrr_sort_keys=on';
+SELECT * FROM t1
+WHERE 1 = 1 AND domain = 'www.mailhost.i-dev.fr' AND
+timestamp >= DATE_ADD(CURRENT_TIMESTAMP, INTERVAL -1 MONTH)
+ORDER BY timestamp DESC;
+id domain registrant_name registrant_organization registrant_street1 registrant_street2 registrant_street3 registrant_street4 registrant_street5 registrant_city registrant_postal_code registrant_country registrant_email registrant_telephone administrative_name administrative_organization administrative_street1 administrative_street2 administrative_street3 administrative_street4 administrative_street5 administrative_city administrative_postal_code administrative_country administrative_email administrative_telephone technical_name technical_organization technical_street1 technical_street2 technical_street3 technical_street4 technical_street5 technical_city technical_postal_code technical_country technical_email technical_telephone json timestamp
+EXPLAIN EXTENDED SELECT * FROM t1
+WHERE 1 = 1 AND domain = 'www.mailhost.i-dev.fr' AND
+timestamp >= DATE_ADD(CURRENT_TIMESTAMP, INTERVAL -1 MONTH)
+ORDER BY timestamp DESC;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ref|filter ixEventWhoisDomainDomain,ixEventWhoisDomainTimestamp ixEventWhoisDomainDomain|ixEventWhoisDomainTimestamp 767|4 const 2 (14%) 14.29 Using index condition; Using where; Using filesort; Using rowid filter
+Warnings:
+Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`domain` AS `domain`,`test`.`t1`.`registrant_name` AS `registrant_name`,`test`.`t1`.`registrant_organization` AS `registrant_organization`,`test`.`t1`.`registrant_street1` AS `registrant_street1`,`test`.`t1`.`registrant_street2` AS `registrant_street2`,`test`.`t1`.`registrant_street3` AS `registrant_street3`,`test`.`t1`.`registrant_street4` AS `registrant_street4`,`test`.`t1`.`registrant_street5` AS `registrant_street5`,`test`.`t1`.`registrant_city` AS `registrant_city`,`test`.`t1`.`registrant_postal_code` AS `registrant_postal_code`,`test`.`t1`.`registrant_country` AS `registrant_country`,`test`.`t1`.`registrant_email` AS `registrant_email`,`test`.`t1`.`registrant_telephone` AS `registrant_telephone`,`test`.`t1`.`administrative_name` AS `administrative_name`,`test`.`t1`.`administrative_organization` AS `administrative_organization`,`test`.`t1`.`administrative_street1` AS `administrative_street1`,`test`.`t1`.`administrative_street2` AS `administrative_street2`,`test`.`t1`.`administrative_street3` AS `administrative_street3`,`test`.`t1`.`administrative_street4` AS `administrative_street4`,`test`.`t1`.`administrative_street5` AS `administrative_street5`,`test`.`t1`.`administrative_city` AS `administrative_city`,`test`.`t1`.`administrative_postal_code` AS `administrative_postal_code`,`test`.`t1`.`administrative_country` AS `administrative_country`,`test`.`t1`.`administrative_email` AS `administrative_email`,`test`.`t1`.`administrative_telephone` AS `administrative_telephone`,`test`.`t1`.`technical_name` AS `technical_name`,`test`.`t1`.`technical_organization` AS `technical_organization`,`test`.`t1`.`technical_street1` AS `technical_street1`,`test`.`t1`.`technical_street2` AS `technical_street2`,`test`.`t1`.`technical_street3` AS `technical_street3`,`test`.`t1`.`technical_street4` AS `technical_street4`,`test`.`t1`.`technical_street5` AS `technical_street5`,`test`.`t1`.`technical_city` AS `technical_city`,`test`.`t1`.`technical_postal_code` AS `technical_postal_code`,`test`.`t1`.`technical_country` AS `technical_country`,`test`.`t1`.`technical_email` AS `technical_email`,`test`.`t1`.`technical_telephone` AS `technical_telephone`,`test`.`t1`.`json` AS `json`,`test`.`t1`.`timestamp` AS `timestamp` from `test`.`t1` where `test`.`t1`.`domain` = 'www.mailhost.i-dev.fr' and `test`.`t1`.`timestamp` >= <cache>(current_timestamp() + interval -1 month) order by `test`.`t1`.`timestamp` desc
+SET optimizer_switch=@save_optimizer_switch;
+DROP TABLE t1;
+#
+# MDEV-21446: index to access the table is changed for primary key
+#
+SET @stats.save= @@innodb_stats_persistent;
+SET global innodb_stats_persistent=on;
+CREATE TABLE t1 (
+pk int auto_increment,
+a int,
+b int,
+primary key (pk),
+key (a),
+key (b)
+) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES
+(0,0), (0,9), (0,NULL), (1,2), (4,0), (2,9), (1,0), (NULL,0), (5,NULL), (5,1),
+(0,7), (NULL,5), (NULL,0), (2,1), (2,5), (6,NULL), (0,NULL), (NULL,8), (8,5),
+(2,NULL), (2,3), (NULL,8), (NULL,6), (1,1), (5,1), (NULL,5), (4,4), (2,4),
+(2,5), (1,9), (NULL,0), (3,7), (0,4), (2,8), (1,2), (1,4), (2,1),
+(NULL,7), (6,6), (3,0), (4,5), (5,2), (8,2), (NULL,NULL), (8,NULL),
+(0,1),(0,7);
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+EXPLAIN EXTENDED
+SELECT * FROM t1
+WHERE (a BETWEEN 9 AND 10 OR a IS NULL) AND (b BETWEEN 9 AND 10 OR b = 9);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range|filter a,b b|a 5|5 NULL 192 (21%) 21.31 Using index condition; Using where; Using rowid filter
+Warnings:
+Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a` between 9 and 10 or `test`.`t1`.`a` is null) and (`test`.`t1`.`b` between 9 and 10 or `test`.`t1`.`b` = 9)
+EXPLAIN EXTENDED
+SELECT * FROM t1
+WHERE (a BETWEEN 9 AND 10 OR a IS NULL) AND (b BETWEEN 9 AND 10 OR b = 9)
+ORDER BY pk LIMIT 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 index a,b PRIMARY 4 NULL 75 54.55 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a` between 9 and 10 or `test`.`t1`.`a` is null) and (`test`.`t1`.`b` between 9 and 10 or `test`.`t1`.`b` = 9) order by `test`.`t1`.`pk` limit 1
+ANALYZE
+SELECT * FROM t1
+WHERE (a BETWEEN 9 AND 10 OR a IS NULL) AND (b BETWEEN 9 AND 10 OR b = 9)
+ORDER BY pk LIMIT 1;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 index a,b PRIMARY 4 NULL 3008 3008.00 1.36 0.00 Using where
+DROP TABLE t1;
+SET global innodb_stats_persistent= @stats.save;
+#
+# MDEV-21610: Using rowid filter with BKA+MRR
+#
+set @stats.save= @@innodb_stats_persistent;
+set global innodb_stats_persistent=on;
+CREATE TABLE acli (
+id bigint(20) NOT NULL,
+rid varchar(255) NOT NULL,
+tp smallint(6) NOT NULL DEFAULT 0,
+PRIMARY KEY (id),
+KEY acli_rid (rid),
+KEY acli_tp (tp)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+insert into acli(id,rid,tp) values
+(184929059698905997,'ABABABABABABABABAB',103),
+(184929059698905998,'ABABABABABABABABAB',121),
+(283586039035985921,'00000000000000000000000000000000',103),
+(2216474704108064678,'020BED6D07B741CE9B10AB2200FEF1DF',103),
+(2216474704108064679,'020BED6D07B741CE9B10AB2200FEF1DF',121),
+(3080602882609775593,'B5FCC8C7111E4E3CBC21AAF5012F59C2',103),
+(3080602882609775594,'B5FCC8C7111E4E3CBC21AAF5012F59C2',121),
+(3080602882609776594,'B5FCC8C7111E4E3CBC21AAF5012F59C2',121),
+(3080602882609777595,'B5FCC8C7111E4E3CBC21AAF5012F59C2',121),
+(4269412446747236214,'SCSCSCSCSCSCSCSC',103),
+(4269412446747236215,'SCSCSCSCSCSCSCSC',121),
+(6341490487802728356,'6072D47E513F4A4794BBAB2200FDB67D',103),
+(6341490487802728357,'6072D47E513F4A4794BBAB2200FDB67D',121);
+CREATE TABLE acei (
+id bigint(20) NOT NULL,
+aclid bigint(20) NOT NULL DEFAULT 0,
+atp smallint(6) NOT NULL DEFAULT 0,
+clus smallint(6) NOT NULL DEFAULT 0,
+PRIMARY KEY (id),
+KEY acei_aclid (aclid),
+KEY acei_clus (clus)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+insert into acei(id,aclid,atp,clus) values
+(184929059698905999,184929059698905997,0,1),
+(184929059698906000,184929059698905997,0,1),
+(184929059698906001,184929059698905997,1,1),
+(184929059698906002,184929059698905998,1,1),
+(283586039035985922,283586039035985921,1,1),
+(2216474704108064684,2216474704108064678,0,1),
+(2216474704108064685,2216474704108064678,0,1),
+(2216474704108064686,2216474704108064678,1,1),
+(2216474704108064687,2216474704108064679,1,1),
+(3080602882609775595,3080602882609775593,0,1),
+(3080602882609775596,3080602882609775593,0,1),
+(3080602882609775597,3080602882609775593,1,1),
+(3080602882609775598,3080602882609775594,1,1),
+(3080602882609776595,3080602882609776594,1,1),
+(3080602882609777596,3080602882609777595,1,1),
+(4269412446747236216,4269412446747236214,0,1),
+(4269412446747236217,4269412446747236214,0,1),
+(4269412446747236218,4269412446747236214,1,1),
+(4269412446747236219,4269412446747236215,1,1),
+(6341490487802728358,6341490487802728356,0,1),
+(6341490487802728359,6341490487802728356,0,1),
+(6341490487802728360,6341490487802728356,1,1),
+(6341490487802728361,6341490487802728357,1,1);
+CREATE TABLE filt (
+id bigint(20) NOT NULL,
+aceid bigint(20) NOT NULL DEFAULT 0,
+clid smallint(6) NOT NULL DEFAULT 0,
+fh bigint(20) NOT NULL DEFAULT 0,
+PRIMARY KEY (id),
+KEY filt_aceid (aceid),
+KEY filt_clid (clid),
+KEY filt_fh (fh)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+insert into filt(id,aceid,clid,fh) values
+(184929059698905999,184929059698905999,1,8948400944397203540),
+(184929059698906000,184929059698906000,1,-3516039679025944536),
+(184929059698906001,184929059698906001,1,-3516039679025944536),
+(184929059698906002,184929059698906001,1,2965370193075218252),
+(184929059698906003,184929059698906001,1,8948400944397203540),
+(184929059698906004,184929059698906002,1,2478709353550777738),
+(283586039035985922,283586039035985922,1,5902600816362013271),
+(2216474704108064686,2216474704108064684,1,8948400944397203540),
+(2216474704108064687,2216474704108064685,1,-7244708939311117030),
+(2216474704108064688,2216474704108064686,1,-7244708939311117030),
+(2216474704108064689,2216474704108064686,1,7489060986210282479),
+(2216474704108064690,2216474704108064686,1,8948400944397203540),
+(2216474704108064691,2216474704108064687,1,-3575268945274980038),
+(3080602882609775595,3080602882609775595,1,8948400944397203540),
+(3080602882609775596,3080602882609775596,1,-5420422472375069774),
+(3080602882609775597,3080602882609775597,1,-5420422472375069774),
+(3080602882609775598,3080602882609775597,1,8518228073041491534),
+(3080602882609775599,3080602882609775597,1,8948400944397203540),
+(3080602882609775600,3080602882609775598,1,6311439873746261694),
+(3080602882609775601,3080602882609775598,1,6311439873746261694),
+(3080602882609776595,3080602882609776595,1,-661101805245999843),
+(3080602882609777596,3080602882609777596,1,-661101805245999843),
+(3080602882609777597,3080602882609777596,1,2216865386202464067),
+(4269412446747236216,4269412446747236216,1,8948400944397203540),
+(4269412446747236217,4269412446747236217,1,-1143096194892676000),
+(4269412446747236218,4269412446747236218,1,-1143096194892676000),
+(4269412446747236219,4269412446747236218,1,5313391811364818290),
+(4269412446747236220,4269412446747236218,1,8948400944397203540),
+(4269412446747236221,4269412446747236219,1,7624499822621753835),
+(6341490487802728358,6341490487802728358,1,8948400944397203540),
+(6341490487802728359,6341490487802728359,1,8141092449587136068),
+(6341490487802728360,6341490487802728360,1,8141092449587136068),
+(6341490487802728361,6341490487802728360,1,1291319099896431785),
+(6341490487802728362,6341490487802728360,1,8948400944397203540),
+(6341490487802728363,6341490487802728361,1,6701841652906431497);
+analyze table filt, acei, acli;
+Table Op Msg_type Msg_text
+test.filt analyze status Engine-independent statistics collected
+test.filt analyze status OK
+test.acei analyze status Engine-independent statistics collected
+test.acei analyze status OK
+test.acli analyze status Engine-independent statistics collected
+test.acli analyze status OK
+set @save_optimizer_switch=@@optimizer_switch;
+set @save_join_cache_level=@@join_cache_level;
+set optimizer_switch='mrr=off';
+set join_cache_level=2;
+set statement optimizer_switch='rowid_filter=off' for explain extended select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t index_merge PRIMARY,acli_rid,acli_tp acli_tp,acli_rid 2,767 NULL 2 100.00 Using intersect(acli_tp,acli_rid); Using where; Using index
+1 SIMPLE a ref PRIMARY,acei_aclid acei_aclid 8 test.t.id 1 100.00 Using where
+1 SIMPLE fi ref filt_aceid,filt_fh filt_aceid 8 test.a.id 1 17.14 Using where
+Warnings:
+Note 1003 select `test`.`t`.`id` AS `id`,`test`.`fi`.`id` AS `id`,`test`.`fi`.`aceid` AS `aceid`,`test`.`fi`.`clid` AS `clid`,`test`.`fi`.`fh` AS `fh` from `test`.`acli` `t` join `test`.`acei` `a` join `test`.`filt` `fi` where `test`.`t`.`tp` = 121 and `test`.`a`.`atp` = 1 and `test`.`fi`.`aceid` = `test`.`a`.`id` and `test`.`a`.`aclid` = `test`.`t`.`id` and `test`.`t`.`rid` = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and `test`.`fi`.`fh` in (6311439873746261694,-397087483897438286,8518228073041491534,-5420422472375069774)
+set statement optimizer_switch='rowid_filter=off' for select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id id aceid clid fh
+3080602882609775594 3080602882609775600 3080602882609775598 1 6311439873746261694
+3080602882609775594 3080602882609775601 3080602882609775598 1 6311439873746261694
+set statement optimizer_switch='rowid_filter=on' for explain extended select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t index_merge PRIMARY,acli_rid,acli_tp acli_tp,acli_rid 2,767 NULL 2 100.00 Using intersect(acli_tp,acli_rid); Using where; Using index
+1 SIMPLE a ref PRIMARY,acei_aclid acei_aclid 8 test.t.id 1 100.00 Using where
+1 SIMPLE fi ref|filter filt_aceid,filt_fh filt_aceid|filt_fh 8|8 test.a.id 1 (17%) 17.14 Using where; Using rowid filter
+Warnings:
+Note 1003 select `test`.`t`.`id` AS `id`,`test`.`fi`.`id` AS `id`,`test`.`fi`.`aceid` AS `aceid`,`test`.`fi`.`clid` AS `clid`,`test`.`fi`.`fh` AS `fh` from `test`.`acli` `t` join `test`.`acei` `a` join `test`.`filt` `fi` where `test`.`t`.`tp` = 121 and `test`.`a`.`atp` = 1 and `test`.`fi`.`aceid` = `test`.`a`.`id` and `test`.`a`.`aclid` = `test`.`t`.`id` and `test`.`t`.`rid` = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and `test`.`fi`.`fh` in (6311439873746261694,-397087483897438286,8518228073041491534,-5420422472375069774)
+set statement optimizer_switch='rowid_filter=on' for select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id id aceid clid fh
+3080602882609775594 3080602882609775600 3080602882609775598 1 6311439873746261694
+3080602882609775594 3080602882609775601 3080602882609775598 1 6311439873746261694
+set optimizer_switch='mrr=on';
+set join_cache_level=6;
+set statement optimizer_switch='rowid_filter=off' for explain extended select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t index_merge PRIMARY,acli_rid,acli_tp acli_tp,acli_rid 2,767 NULL 2 100.00 Using intersect(acli_tp,acli_rid); Using where; Using index
+1 SIMPLE a ref PRIMARY,acei_aclid acei_aclid 8 test.t.id 1 100.00 Using where; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE fi ref filt_aceid,filt_fh filt_aceid 8 test.a.id 1 17.14 Using where; Using join buffer (incremental, BKA join); Rowid-ordered scan
+Warnings:
+Note 1003 select `test`.`t`.`id` AS `id`,`test`.`fi`.`id` AS `id`,`test`.`fi`.`aceid` AS `aceid`,`test`.`fi`.`clid` AS `clid`,`test`.`fi`.`fh` AS `fh` from `test`.`acli` `t` join `test`.`acei` `a` join `test`.`filt` `fi` where `test`.`t`.`tp` = 121 and `test`.`a`.`atp` = 1 and `test`.`fi`.`aceid` = `test`.`a`.`id` and `test`.`a`.`aclid` = `test`.`t`.`id` and `test`.`t`.`rid` = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and `test`.`fi`.`fh` in (6311439873746261694,-397087483897438286,8518228073041491534,-5420422472375069774)
+set statement optimizer_switch='rowid_filter=off' for select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id id aceid clid fh
+3080602882609775594 3080602882609775600 3080602882609775598 1 6311439873746261694
+3080602882609775594 3080602882609775601 3080602882609775598 1 6311439873746261694
+set statement optimizer_switch='rowid_filter=on' for explain extended select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t index_merge PRIMARY,acli_rid,acli_tp acli_tp,acli_rid 2,767 NULL 2 100.00 Using intersect(acli_tp,acli_rid); Using where; Using index
+1 SIMPLE a ref PRIMARY,acei_aclid acei_aclid 8 test.t.id 1 100.00 Using where; Using join buffer (flat, BKA join); Rowid-ordered scan
+1 SIMPLE fi ref|filter filt_aceid,filt_fh filt_aceid|filt_fh 8|8 test.a.id 1 (17%) 17.14 Using where; Using join buffer (incremental, BKA join); Rowid-ordered scan; Using rowid filter
+Warnings:
+Note 1003 select `test`.`t`.`id` AS `id`,`test`.`fi`.`id` AS `id`,`test`.`fi`.`aceid` AS `aceid`,`test`.`fi`.`clid` AS `clid`,`test`.`fi`.`fh` AS `fh` from `test`.`acli` `t` join `test`.`acei` `a` join `test`.`filt` `fi` where `test`.`t`.`tp` = 121 and `test`.`a`.`atp` = 1 and `test`.`fi`.`aceid` = `test`.`a`.`id` and `test`.`a`.`aclid` = `test`.`t`.`id` and `test`.`t`.`rid` = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and `test`.`fi`.`fh` in (6311439873746261694,-397087483897438286,8518228073041491534,-5420422472375069774)
+set statement optimizer_switch='rowid_filter=on' for select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+id id aceid clid fh
+3080602882609775594 3080602882609775600 3080602882609775598 1 6311439873746261694
+3080602882609775594 3080602882609775601 3080602882609775598 1 6311439873746261694
+set statement optimizer_switch='rowid_filter=on' for analyze format=json select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+inner join filt fi on a.id = fi.aceid
+where
+t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+t.tp = 121 and
+a.atp = 1 and
+fi.fh in (6311439873746261694,-397087483897438286,
+8518228073041491534,-5420422472375069774);
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t",
+ "access_type": "index_merge",
+ "possible_keys": ["PRIMARY", "acli_rid", "acli_tp"],
+ "key_length": "2,767",
+ "index_merge": {
+ "intersect": {
+ "range": {
+ "key": "acli_tp",
+ "used_key_parts": ["tp"]
+ },
+ "range": {
+ "key": "acli_rid",
+ "used_key_parts": ["rid"]
+ }
+ }
+ },
+ "r_loops": 1,
+ "rows": 2,
+ "r_rows": 3,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "attached_condition": "t.tp = 121 and t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2'",
+ "using_index": true
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "a",
+ "access_type": "ref",
+ "possible_keys": ["PRIMARY", "acei_aclid"],
+ "key": "acei_aclid",
+ "key_length": "8",
+ "used_key_parts": ["aclid"],
+ "ref": ["test.t.id"],
+ "r_loops": 1,
+ "rows": 1,
+ "r_rows": 3,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "8Kb",
+ "join_type": "BKA",
+ "mrr_type": "Rowid-ordered scan",
+ "attached_condition": "a.atp = 1",
+ "r_filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "fi",
+ "access_type": "ref",
+ "possible_keys": ["filt_aceid", "filt_fh"],
+ "key": "filt_aceid",
+ "key_length": "8",
+ "used_key_parts": ["aceid"],
+ "ref": ["test.a.id"],
+ "rowid_filter": {
+ "range": {
+ "key": "filt_fh",
+ "used_key_parts": ["fh"]
+ },
+ "rows": 6,
+ "selectivity_pct": 17.143,
+ "r_rows": 5,
+ "r_selectivity_pct": 40,
+ "r_buffer_size": "REPLACED",
+ "r_filling_time_ms": "REPLACED"
+ },
+ "r_loops": 1,
+ "rows": 1,
+ "r_rows": 2,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 17.143,
+ "r_filtered": 100
+ },
+ "buffer_type": "incremental",
+ "buffer_size": "603",
+ "join_type": "BKA",
+ "mrr_type": "Rowid-ordered scan",
+ "attached_condition": "fi.fh in (6311439873746261694,-397087483897438286,8518228073041491534,-5420422472375069774)",
+ "r_filtered": 100
+ }
+ }
+}
+set optimizer_switch=@save_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+drop table filt, acei, acli;
+set global innodb_stats_persistent= @stats.save;
+#
+# MDEV-22846: ref access with full scan on keys with NULLs + rowid_filter
+#
+CREATE TABLE t1 (pk int NOT NULL, c1 varchar(1)) engine=innodb;
+INSERT INTO t1 VALUES
+(1,NULL),(15,'o'),(16,'x'),(19,'t'),(35,'k'),(36,'h'),(42,'t'),(43,'h'),
+(53,'l'),(62,'a'),(71,NULL),(79,'u'),(128,'y'),(129,NULL),(133,NULL);
+CREATE TABLE t2 (
+i1 int, c1 varchar(1) NOT NULL, KEY c1 (c1), KEY i1 (i1)
+) engine=innodb;
+INSERT INTO t2 VALUES
+(1,'1'),(NULL,'1'),(42,'t'),(NULL,'1'),(79,'u'),(NULL,'1'),
+(NULL,'4'),(NULL,'4'),(NULL,'1'),(NULL,'u'),(2,'1'),(NULL,'w');
+INSERT INTO t2 SELECT * FROM t2;
+SELECT * FROM t1
+WHERE t1.c1 NOT IN (SELECT t2.c1 FROM t2, t1 AS a1
+WHERE t2.i1 = t1.pk AND t2.i1 IS NOT NULL);
+pk c1
+15 o
+16 x
+19 t
+35 k
+36 h
+43 h
+53 l
+62 a
+71 NULL
+128 y
+129 NULL
+133 NULL
+EXPLAIN EXTENDED SELECT * FROM t1
+WHERE t1.c1 NOT IN (SELECT t2.c1 FROM t2, t1 AS a1
+WHERE t2.i1 = t1.pk AND t2.i1 IS NOT NULL);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 15 100.00 Using where
+2 DEPENDENT SUBQUERY t2 ref|filter c1,i1 c1|i1 3|5 func 6 (33%) 33.33 Using where; Full scan on NULL key; Using rowid filter
+2 DEPENDENT SUBQUERY a1 ALL NULL NULL NULL NULL 15 100.00 Using join buffer (flat, BNL join)
+Warnings:
+Note 1276 Field or reference 'test.t1.pk' of SELECT #2 was resolved in SELECT #1
+Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`c1` AS `c1` from `test`.`t1` where !<expr_cache><`test`.`t1`.`c1`,`test`.`t1`.`pk`>(<in_optimizer>(`test`.`t1`.`c1`,<exists>(/* select#2 */ select `test`.`t2`.`c1` from `test`.`t2` join `test`.`t1` `a1` where `test`.`t2`.`i1` = `test`.`t1`.`pk` and `test`.`t2`.`i1` is not null and trigcond(<cache>(`test`.`t1`.`c1`) = `test`.`t2`.`c1`))))
+DROP TABLE t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/rowid_filter_innodb.test b/mysql-test/main/rowid_filter_innodb.test
new file mode 100644
index 00000000000..d121405f08d
--- /dev/null
+++ b/mysql-test/main/rowid_filter_innodb.test
@@ -0,0 +1,566 @@
+--source include/have_innodb.inc
+
+SET SESSION STORAGE_ENGINE='InnoDB';
+
+--source rowid_filter.test
+--source include/have_sequence.inc
+
+--echo #
+--echo # MDEV-18755: possible RORI-plan and possible plan with range filter
+--echo #
+
+create table t1 (
+ pk int not null primary key, f1 varchar(10), f2 varchar(30), a int(10),
+ key (f1), key (f2)
+) engine=innodb;
+
+insert into t1 values
+ (2,'a','a',2),(3,'a','a',null),(4,'a','a',55),(5,'a','a',4),(6,'a','a',0),
+ (7,'a','a',1),(8,'a','a',4),(9,'a','a',null),(10,'a','a',0),(11,'a','a',0),
+ (12,'a','a',null),(13,'a','a',49778),(14,'a','a',6),(15,'a','a',3),
+ (16,'a','a',233),(17,'a','a',-1),(18,'a','a',5),(19,'a','a',-1),
+ (20,'a','a',null),(21,'a','a',0),(22,'a','a',null),(23,'a','a',53840),
+ (24,'a','a',null),(25,'a','a',null),(26,'a','a',5),(27,'a','a',43454),
+ (28,'a','a',0),(29,'a','a',0),(30,'a','a',null),(59,'a','a',null),
+ (60,'a','a',null),(61,'a','a',-1),(62,'a','a',null),(63,'a','a',0),
+ (64,'a','a',14468),(65,'a','a',0),(66,'a','a',28),(67,'a','a',null),
+ (68,'a','a',14983),(69,'a','a',null),(70,'a','a',3),(71,'a','a',null),
+ (72,'a','a',null),(73,'a','a',237),(74,'a','a',2),(75,'a','a',0),
+ (76,'a','a',6),(77,'a','a',5),(78,'a','a',0),(79,'a','a',1),(80,'a','a',-1),
+ (81,'a','a',20),(82,'a','a',0),(83,'a','a',0),(84,'a','a',null),
+ (85,'a','a',-1),(86,'a','a',5),(87,'a','a',null),(88,'a','a',160),
+ (89,null,null,null),(90,'a','a',14785),(91,'a','a',0),(92,'a','a',null);
+
+let $q=
+( select * from t1
+ where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')))
+ union
+( select * from t1
+ where (f1 is null and f2 is null) and (f2 between 'a' and 'z' or f1 in ('a')));
+
+eval $q;
+eval explain $q;
+eval explain format=json $q;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-19195: possible RORI-plan and possible plan with range filter
+--echo # for not first joined table
+--echo #
+
+create table t1 (id int not null primary key) engine=innodb;
+insert into t1 values (2),(1);
+
+create table t2 (y int,x int,index (x),index (y)) engine=innodb;
+insert into t2 values
+ (4,1),(4,777),(2,1),(2,888),(111,1),(222,1),(333,345),(444,1),
+ (555,555),(666,1);
+
+let $q=
+select * from t1 join t2 on t1.id = t2.x where t2.y = 2 and t1.id = 1;
+
+eval $q;
+eval explain extended $q;
+
+drop table t1, t2;
+
+
+--echo #
+--echo # MDEV-19820: use of rowid filter for innodb table without primary key
+--echo #
+
+create table t1 (a int, b int, key (b), key (a)) engine=innodb;
+insert into t1
+select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
+analyze table t1;
+
+let $q=
+select count(*) from t1 where a in (22,83,11) and b=2;
+let $q1=
+select * from t1 where a in (22,83,11) and b=2;
+
+set @save_optimizer_switch= @@optimizer_switch;
+
+set optimizer_switch='rowid_filter=off';
+eval $q;
+eval explain extended $q;
+eval $q1;
+
+set optimizer_switch='rowid_filter=on';
+eval $q;
+eval explain extended $q;
+eval $q1;
+
+drop table t1;
+set optimizer_switch=@save_optimizer_switch;
+
+SET SESSION STORAGE_ENGINE=DEFAULT;
+
+--echo #
+--echo # MDEV-19919: use of rowid filter for innodb table + ORDER BY
+--echo #
+
+SET @stats.save= @@innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent= ON;
+
+CREATE TABLE t1 (
+ a INT,
+ b VARCHAR(10),
+ c VARCHAR(1024),
+ KEY (b),
+ KEY (c)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES
+ (1,'w','z'), (1,'X','o'), (1,'q','c'), (5,'w','c'), (2,'j','m'),
+ (2,'Q','s'), (9,'e','J'), (2,'p','W'), (9,'o','F'), (2,'g','S'),
+ (1,'Y','a'), (NULL,'Y','p'), (NULL,'s','x'), (NULL,'i','S'),
+ (1,'l','q'), (7,'r','e'), (4,'b','h'), (NULL,'E','c'),
+ (NULL,'M','a'), (3,'e','X'), (NULL,'p','r'), (9,'e','i'),
+ (3,'g','x'), (2,'h','y');
+
+ANALYZE TABLE t1;
+
+EXPLAIN EXTENDED
+SELECT a FROM t1 WHERE c < 'k' AND b > 't' ORDER BY a;
+
+SELECT a FROM t1 WHERE c < 'k' AND b > 't' ORDER BY a;
+
+DROP TABLE t1;
+SET GLOBAL innodb_stats_persistent= @stats.save;
+
+--echo #
+--echo # MDEV-20056: index to build range filter should not be
+--echo # the same as table access index
+--echo #
+
+SET @stats.save= @@innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent= ON;
+
+CREATE TABLE t1 (ch varchar(1), id int, id2 int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+('l',3,2), ('e',NULL,NULL), ('r',7,3), ('h',NULL,2), (NULL,4,4), ('c',4,NULL),
+('k',NULL,NULL), ('h',NULL,NULL), ('b',9,NULL), ('f',6,NULL);
+
+CREATE TABLE t2 (
+ pk int NOT NULL, col_date_key date, ch2 varchar(1), id2 int,
+ PRIMARY KEY (pk), KEY (col_date_key), KEY (ch2), KEY (id2)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES
+(1,'2034-04-21','g',9), (2,'2006-09-08','y',1), (3,NULL,'h',2),
+(4,'1987-03-02','s',2), (5,'2019-07-02','u',NULL),(6,'2012-12-18','z',1),
+(7,NULL,'w',4), (8,'2005-03-10','o',8), (9,'1987-02-12','d',4);
+
+CREATE TABLE t3 (id int) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (6);
+
+ANALYZE TABLE t1,t2,t3;
+
+let $q1=
+SELECT 1 FROM t3
+WHERE EXISTS ( SELECT 1 FROM t1
+ WHERE t3.id IN ( SELECT bt1.id FROM t2, t1 AS bt1
+ WHERE bt1.id = t2.pk AND
+ t2.ch2 <= 'g' ) OR
+ t1.id2 = t1.id);
+
+eval EXPLAIN EXTENDED $q1;
+eval $q1;
+
+let $q2=
+SELECT 1 FROM t3
+WHERE EXISTS ( SELECT 1 FROM t1
+ WHERE t3.id IN ( SELECT bt1.id FROM t2, t1 AS bt1
+ WHERE bt1.ch = t2.ch2 AND
+ bt1.id = t2.pk AND
+ t2.ch2 <= 'g' ) OR
+ t1.id2 = t1.id);
+
+eval EXPLAIN EXTENDED $q2;
+eval $q2;
+
+DROP TABLE t1, t2, t3;
+SET GLOBAL innodb_stats_persistent= @stats.save;
+
+--echo #
+--echo # MDEV-20407: usage of range filter is not supported when
+--echo # the joined table is accessed by a full text index
+--echo #
+
+set @stats.save= @@innodb_stats_persistent;
+set global innodb_stats_persistent=on;
+
+create table t1(id int, s text, key (id), fulltext key (s)) engine=innodb;
+
+insert into t1 values
+(1119,'t'),(1134,'t'),(1134,'t'),(1143,'t'),(1143,'t'),(1187,'t'),(1187,'t'),
+(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),(1187,'t'),
+(1187,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),(1210,'t'),
+(1214,'t'),(1214,'t'),(1215,'t'),(1215,'t'),(1215,'t'),(1216,'t'),(1218,'t'),
+(1220,'t'),(1220,'t'),(1220,'t'),(1222,'t'),(1223,'t'),(1223,'t'),(1224,'t'),
+(1225,'t'),(1225,'t'),(1226,'t'),(1226,'t'),(1227,'t'),(1227,'t'),(1228,'t'),
+(1229,'t'),(1230,'t'),(1230,'t'),(1231,'t'),(1231,'t'),(1232,'t'),(1232,'t'),
+(1232,'t'),(1232,'t'),(1233,'t'),(1241,'t'),(1245,'t'),(1247,'t'),(1247,'t'),
+(1247,'t'),(1247,'t'),(1247,'t'),(1247,'t'),(1248,'like fttest');
+
+analyze table t1;
+
+let $q=
+select count(0) from t1
+ where id=15066 and (match s against ('+"fttest"' in boolean mode));
+
+eval explain extended $q;
+eval $q;
+
+drop table t1;
+set global innodb_stats_persistent= @stats.save;
+
+--echo #
+--echo # MDEV-21356: usage of range filter with range access employing
+--echo # optimizer_switch='mrr=on,mrr_sort_keys=on';
+--echo #
+
+CREATE TABLE t1 (
+ id int(11) unsigned NOT NULL AUTO_INCREMENT,
+ domain varchar(255) NOT NULL,
+ registrant_name varchar(255) DEFAULT NULL,
+ registrant_organization varchar(255) DEFAULT NULL,
+ registrant_street1 varchar(255) DEFAULT NULL,
+ registrant_street2 varchar(255) DEFAULT NULL,
+ registrant_street3 varchar(255) DEFAULT NULL,
+ registrant_street4 varchar(255) DEFAULT NULL,
+ registrant_street5 varchar(255) DEFAULT NULL,
+ registrant_city varchar(255) DEFAULT NULL,
+ registrant_postal_code varchar(255) DEFAULT NULL,
+ registrant_country varchar(255) DEFAULT NULL,
+ registrant_email varchar(255) DEFAULT NULL,
+ registrant_telephone varchar(255) DEFAULT NULL,
+ administrative_name varchar(255) DEFAULT NULL,
+ administrative_organization varchar(255) DEFAULT NULL,
+ administrative_street1 varchar(255) DEFAULT NULL,
+ administrative_street2 varchar(255) DEFAULT NULL,
+ administrative_street3 varchar(255) DEFAULT NULL,
+ administrative_street4 varchar(255) DEFAULT NULL,
+ administrative_street5 varchar(255) DEFAULT NULL,
+ administrative_city varchar(255) DEFAULT NULL,
+ administrative_postal_code varchar(255) DEFAULT NULL,
+ administrative_country varchar(255) DEFAULT NULL,
+ administrative_email varchar(255) DEFAULT NULL,
+ administrative_telephone varchar(255) DEFAULT NULL,
+ technical_name varchar(255) DEFAULT NULL,
+ technical_organization varchar(255) DEFAULT NULL,
+ technical_street1 varchar(255) DEFAULT NULL,
+ technical_street2 varchar(255) DEFAULT NULL,
+ technical_street3 varchar(255) DEFAULT NULL,
+ technical_street4 varchar(255) DEFAULT NULL,
+ technical_street5 varchar(255) DEFAULT NULL,
+ technical_city varchar(255) DEFAULT NULL,
+ technical_postal_code varchar(255) DEFAULT NULL,
+ technical_country varchar(255) DEFAULT NULL,
+ technical_email varchar(255) DEFAULT NULL,
+ technical_telephone varchar(255) DEFAULT NULL,
+ json longblob NOT NULL,
+ timestamp timestamp NOT NULL DEFAULT current_timestamp(),
+ PRIMARY KEY (id),
+ KEY ixEventWhoisDomainDomain (domain),
+ KEY ixEventWhoisDomainTimestamp (timestamp)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO t1 (
+id, domain, registrant_name, registrant_organization, registrant_street1,
+registrant_street2, registrant_street3, registrant_street4, registrant_street5,
+registrant_city, registrant_postal_code, registrant_country, registrant_email,
+registrant_telephone, administrative_name, administrative_organization,
+administrative_street1, administrative_street2, administrative_street3,
+administrative_street4, administrative_street5, administrative_city,
+administrative_postal_code, administrative_country, administrative_email,
+administrative_telephone, technical_name, technical_organization,
+technical_street1, technical_street2, technical_street3, technical_street4,
+technical_street5, technical_city, technical_postal_code, technical_country,
+technical_email, technical_telephone, json, timestamp) VALUES
+(60380, 'www.mailhost.i-dev.fr', null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, '', '2016-12-22 09:18:28'),
+(60383, 'www.bestwestern.fr', null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, '', '2016-12-22 09:27:06'),
+(80392, 'www.dfinitions.fr', null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, '', '2017-01-30 08:02:01'),
+(80407, 'www.firma.o2.pl', null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, 'AZ.pl Sp. z o.o.', 'Al. Papieza Jana Pawla II 19/2',
+ null, null, null, null, '70-453 Szczecin', null, 'POLAND', null,
+ '48914243780', '', '2017-01-30 08:24:51'),
+(80551, 'www.mailhost.i-dev.fr', null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, '', '2017-01-30 10:00:56'),
+(80560, 'www.blackmer-mouvex.com', 'MARIE-PIERRE PRODEAU', 'MOUVEX',
+ '2 RUE DES CAILLOTES', null, null, null, null, 'AUXERRE', '89000', 'FRANCE',
+ 'PRODEAU@MOUVEX.COM', null, 'MARIE-PIERRE PRODEAU', 'MOUVEX',
+ '2 RUE DES CAILLOTES', null, null, null, null, 'AUXERRE', '89000', 'FRANCE',
+ 'PRODEAU@MOUVEX.COM', '33 386498630', 'LAURENT SOUCHELEAU', 'MOUVEX',
+ '2 RUE DES CAILLOTES', null, null, null, null, 'AUXERRE', '89000', 'FRANCE',
+ 'SOUCHELEAU@MOUVEX.COM', '33 386498643', '', '2017-01-30 10:04:38'),
+(80566, 'www.inup.com', 'MAXIMILIAN V. KETELHODT', null,
+ 'SUELZBURGSTRASSE 158A', null, null, null, null, 'KOELN', '50937', 'GERMANY',
+ 'ICANN@EXPIRES-2009.WEBCARE24.COM', '492214307580', 'MAXIMILIAN V. KETELHODT',
+ null, 'SUELZBURGSTRASSE 158A', null, null, null, null, 'KOELN', '50937',
+ 'GERMANY', 'ICANN@EXPIRES-2009.WEBCARE24.COM', '492214307580',
+ 'MAXIMILIAN V. KETELHODT', null, 'SUELZBURGSTRASSE 158A', null, null, null,
+ null, 'KOELN', '50937', 'GERMANY', 'ICANN@EXPIRES-2009.WEBCARE24.COM',
+ '492214307580', '', '2017-01-30 10:08:29');
+
+SET @save_optimizer_switch=@@optimizer_switch;
+
+SET optimizer_switch='mrr=on,mrr_sort_keys=on';
+
+let $q=
+SELECT * FROM t1
+ WHERE 1 = 1 AND domain = 'www.mailhost.i-dev.fr' AND
+ timestamp >= DATE_ADD(CURRENT_TIMESTAMP, INTERVAL -1 MONTH)
+ORDER BY timestamp DESC;
+
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+SET optimizer_switch=@save_optimizer_switch;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-21446: index to access the table is changed for primary key
+--echo #
+
+SET @stats.save= @@innodb_stats_persistent;
+SET global innodb_stats_persistent=on;
+
+CREATE TABLE t1 (
+ pk int auto_increment,
+ a int,
+ b int,
+ primary key (pk),
+ key (a),
+ key (b)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 (a,b) VALUES
+(0,0), (0,9), (0,NULL), (1,2), (4,0), (2,9), (1,0), (NULL,0), (5,NULL), (5,1),
+(0,7), (NULL,5), (NULL,0), (2,1), (2,5), (6,NULL), (0,NULL), (NULL,8), (8,5),
+(2,NULL), (2,3), (NULL,8), (NULL,6), (1,1), (5,1), (NULL,5), (4,4), (2,4),
+(2,5), (1,9), (NULL,0), (3,7), (0,4), (2,8), (1,2), (1,4), (2,1),
+(NULL,7), (6,6), (3,0), (4,5), (5,2), (8,2), (NULL,NULL), (8,NULL),
+(0,1),(0,7);
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+INSERT INTO t1(a,b) SELECT a, b FROM t1;
+
+ANALYZE TABLE t1;
+
+EXPLAIN EXTENDED
+SELECT * FROM t1
+ WHERE (a BETWEEN 9 AND 10 OR a IS NULL) AND (b BETWEEN 9 AND 10 OR b = 9);
+
+EXPLAIN EXTENDED
+SELECT * FROM t1
+ WHERE (a BETWEEN 9 AND 10 OR a IS NULL) AND (b BETWEEN 9 AND 10 OR b = 9)
+ORDER BY pk LIMIT 1;
+
+ANALYZE
+SELECT * FROM t1
+ WHERE (a BETWEEN 9 AND 10 OR a IS NULL) AND (b BETWEEN 9 AND 10 OR b = 9)
+ORDER BY pk LIMIT 1;
+
+DROP TABLE t1;
+SET global innodb_stats_persistent= @stats.save;
+
+--echo #
+--echo # MDEV-21610: Using rowid filter with BKA+MRR
+--echo #
+
+set @stats.save= @@innodb_stats_persistent;
+set global innodb_stats_persistent=on;
+
+CREATE TABLE acli (
+ id bigint(20) NOT NULL,
+ rid varchar(255) NOT NULL,
+ tp smallint(6) NOT NULL DEFAULT 0,
+ PRIMARY KEY (id),
+ KEY acli_rid (rid),
+ KEY acli_tp (tp)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+insert into acli(id,rid,tp) values
+(184929059698905997,'ABABABABABABABABAB',103),
+(184929059698905998,'ABABABABABABABABAB',121),
+(283586039035985921,'00000000000000000000000000000000',103),
+(2216474704108064678,'020BED6D07B741CE9B10AB2200FEF1DF',103),
+(2216474704108064679,'020BED6D07B741CE9B10AB2200FEF1DF',121),
+(3080602882609775593,'B5FCC8C7111E4E3CBC21AAF5012F59C2',103),
+(3080602882609775594,'B5FCC8C7111E4E3CBC21AAF5012F59C2',121),
+(3080602882609776594,'B5FCC8C7111E4E3CBC21AAF5012F59C2',121),
+(3080602882609777595,'B5FCC8C7111E4E3CBC21AAF5012F59C2',121),
+(4269412446747236214,'SCSCSCSCSCSCSCSC',103),
+(4269412446747236215,'SCSCSCSCSCSCSCSC',121),
+(6341490487802728356,'6072D47E513F4A4794BBAB2200FDB67D',103),
+(6341490487802728357,'6072D47E513F4A4794BBAB2200FDB67D',121);
+
+CREATE TABLE acei (
+ id bigint(20) NOT NULL,
+ aclid bigint(20) NOT NULL DEFAULT 0,
+ atp smallint(6) NOT NULL DEFAULT 0,
+ clus smallint(6) NOT NULL DEFAULT 0,
+ PRIMARY KEY (id),
+ KEY acei_aclid (aclid),
+ KEY acei_clus (clus)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+insert into acei(id,aclid,atp,clus) values
+(184929059698905999,184929059698905997,0,1),
+(184929059698906000,184929059698905997,0,1),
+(184929059698906001,184929059698905997,1,1),
+(184929059698906002,184929059698905998,1,1),
+(283586039035985922,283586039035985921,1,1),
+(2216474704108064684,2216474704108064678,0,1),
+(2216474704108064685,2216474704108064678,0,1),
+(2216474704108064686,2216474704108064678,1,1),
+(2216474704108064687,2216474704108064679,1,1),
+(3080602882609775595,3080602882609775593,0,1),
+(3080602882609775596,3080602882609775593,0,1),
+(3080602882609775597,3080602882609775593,1,1),
+(3080602882609775598,3080602882609775594,1,1),
+(3080602882609776595,3080602882609776594,1,1),
+(3080602882609777596,3080602882609777595,1,1),
+(4269412446747236216,4269412446747236214,0,1),
+(4269412446747236217,4269412446747236214,0,1),
+(4269412446747236218,4269412446747236214,1,1),
+(4269412446747236219,4269412446747236215,1,1),
+(6341490487802728358,6341490487802728356,0,1),
+(6341490487802728359,6341490487802728356,0,1),
+(6341490487802728360,6341490487802728356,1,1),
+(6341490487802728361,6341490487802728357,1,1);
+
+CREATE TABLE filt (
+ id bigint(20) NOT NULL,
+ aceid bigint(20) NOT NULL DEFAULT 0,
+ clid smallint(6) NOT NULL DEFAULT 0,
+ fh bigint(20) NOT NULL DEFAULT 0,
+ PRIMARY KEY (id),
+ KEY filt_aceid (aceid),
+ KEY filt_clid (clid),
+ KEY filt_fh (fh)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+insert into filt(id,aceid,clid,fh) values
+(184929059698905999,184929059698905999,1,8948400944397203540),
+(184929059698906000,184929059698906000,1,-3516039679025944536),
+(184929059698906001,184929059698906001,1,-3516039679025944536),
+(184929059698906002,184929059698906001,1,2965370193075218252),
+(184929059698906003,184929059698906001,1,8948400944397203540),
+(184929059698906004,184929059698906002,1,2478709353550777738),
+(283586039035985922,283586039035985922,1,5902600816362013271),
+(2216474704108064686,2216474704108064684,1,8948400944397203540),
+(2216474704108064687,2216474704108064685,1,-7244708939311117030),
+(2216474704108064688,2216474704108064686,1,-7244708939311117030),
+(2216474704108064689,2216474704108064686,1,7489060986210282479),
+(2216474704108064690,2216474704108064686,1,8948400944397203540),
+(2216474704108064691,2216474704108064687,1,-3575268945274980038),
+(3080602882609775595,3080602882609775595,1,8948400944397203540),
+(3080602882609775596,3080602882609775596,1,-5420422472375069774),
+(3080602882609775597,3080602882609775597,1,-5420422472375069774),
+(3080602882609775598,3080602882609775597,1,8518228073041491534),
+(3080602882609775599,3080602882609775597,1,8948400944397203540),
+(3080602882609775600,3080602882609775598,1,6311439873746261694),
+(3080602882609775601,3080602882609775598,1,6311439873746261694),
+(3080602882609776595,3080602882609776595,1,-661101805245999843),
+(3080602882609777596,3080602882609777596,1,-661101805245999843),
+(3080602882609777597,3080602882609777596,1,2216865386202464067),
+(4269412446747236216,4269412446747236216,1,8948400944397203540),
+(4269412446747236217,4269412446747236217,1,-1143096194892676000),
+(4269412446747236218,4269412446747236218,1,-1143096194892676000),
+(4269412446747236219,4269412446747236218,1,5313391811364818290),
+(4269412446747236220,4269412446747236218,1,8948400944397203540),
+(4269412446747236221,4269412446747236219,1,7624499822621753835),
+(6341490487802728358,6341490487802728358,1,8948400944397203540),
+(6341490487802728359,6341490487802728359,1,8141092449587136068),
+(6341490487802728360,6341490487802728360,1,8141092449587136068),
+(6341490487802728361,6341490487802728360,1,1291319099896431785),
+(6341490487802728362,6341490487802728360,1,8948400944397203540),
+(6341490487802728363,6341490487802728361,1,6701841652906431497);
+
+analyze table filt, acei, acli;
+
+let $q=
+select t.id, fi.*
+from (acli t inner join acei a on a.aclid = t.id)
+ inner join filt fi on a.id = fi.aceid
+ where
+ t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2' and
+ t.tp = 121 and
+ a.atp = 1 and
+ fi.fh in (6311439873746261694,-397087483897438286,
+ 8518228073041491534,-5420422472375069774);
+
+set @save_optimizer_switch=@@optimizer_switch;
+set @save_join_cache_level=@@join_cache_level;
+
+set optimizer_switch='mrr=off';
+set join_cache_level=2;
+eval $without_filter explain extended $q;
+eval $without_filter $q;
+eval $with_filter explain extended $q;
+eval $with_filter $q;
+
+set optimizer_switch='mrr=on';
+set join_cache_level=6;
+eval $without_filter explain extended $q;
+eval $without_filter $q;
+eval $with_filter explain extended $q;
+eval $with_filter $q;
+--source include/analyze-format.inc
+eval $with_filter analyze format=json $q;
+
+set optimizer_switch=@save_optimizer_switch;
+set join_cache_level=@save_join_cache_level;
+
+drop table filt, acei, acli;
+
+set global innodb_stats_persistent= @stats.save;
+
+--echo #
+--echo # MDEV-22846: ref access with full scan on keys with NULLs + rowid_filter
+--echo #
+
+
+CREATE TABLE t1 (pk int NOT NULL, c1 varchar(1)) engine=innodb;
+INSERT INTO t1 VALUES
+(1,NULL),(15,'o'),(16,'x'),(19,'t'),(35,'k'),(36,'h'),(42,'t'),(43,'h'),
+(53,'l'),(62,'a'),(71,NULL),(79,'u'),(128,'y'),(129,NULL),(133,NULL);
+
+CREATE TABLE t2 (
+i1 int, c1 varchar(1) NOT NULL, KEY c1 (c1), KEY i1 (i1)
+) engine=innodb;
+INSERT INTO t2 VALUES
+(1,'1'),(NULL,'1'),(42,'t'),(NULL,'1'),(79,'u'),(NULL,'1'),
+(NULL,'4'),(NULL,'4'),(NULL,'1'),(NULL,'u'),(2,'1'),(NULL,'w');
+INSERT INTO t2 SELECT * FROM t2;
+
+let $q=
+SELECT * FROM t1
+WHERE t1.c1 NOT IN (SELECT t2.c1 FROM t2, t1 AS a1
+ WHERE t2.i1 = t1.pk AND t2.i1 IS NOT NULL);
+
+eval $q;
+eval EXPLAIN EXTENDED $q;
+
+DROP TABLE t1,t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/rowid_filter_innodb_debug.result b/mysql-test/main/rowid_filter_innodb_debug.result
new file mode 100644
index 00000000000..6fd75294bdb
--- /dev/null
+++ b/mysql-test/main/rowid_filter_innodb_debug.result
@@ -0,0 +1,83 @@
+set default_storage_engine=innodb;
+#
+# MDEV-22761 KILL QUERY during rowid_filter, crashes
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
+create table t2(a int);
+insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
+CREATE TABLE t3 (
+key1 int ,
+key2 int,
+filler varchar(255),
+KEY (key1),
+KEY (key2)
+);
+select engine from information_schema.tables
+where table_schema=database() and table_name='t3';
+engine
+InnoDB
+insert into t3
+select
+A.a,
+A.a,
+'filler-data-filler-data'
+from
+t0 A, t1 B;
+analyze table t2,t3;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
+explain
+select * from t2, t3
+where
+t3.key1=t2.a and t3.key2 in (2,3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 100 Using where
+1 SIMPLE t3 ref|filter key1,key2 key1|key2 5|5 test.t2.a 1000 (20%) Using where; Using rowid filter
+set debug_sync='handler_rowid_filter_check SIGNAL at_rowid_filter_check WAIT_FOR go';
+select * from t2, t3
+where
+t3.key1=t2.a and t3.key2 in (2,3);
+connect con1, localhost, root,,;
+connection con1;
+set debug_sync='now WAIT_FOR at_rowid_filter_check';
+kill query $target_id;
+set debug_sync='now SIGNAL go';
+connection default;
+disconnect con1;
+ERROR 70100: Query execution was interrupted
+set debug_sync='RESET';
+drop table t0,t1,t2,t3;
+set default_storage_engine=default;
+set @save_optimizer_switch= @@optimizer_switch;
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @@use_stat_tables=preferably;
+set optimizer_use_condition_selectivity=2;
+set optimizer_switch='rowid_filter=on';
+#
+# MDEV-22761 KILL QUERY during rowid_filter, crashes
+# (The smaller testcase)
+#
+CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4);
+set debug_sync='handler_rowid_filter_check SIGNAL killme WAIT_FOR go';
+SELECT * FROM t1 WHERE a > 0 AND b=0;
+connect con1, localhost, root,,;
+connection con1;
+set debug_sync='now WAIT_FOR killme';
+kill query @id;
+set debug_sync='now SIGNAL go';
+connection default;
+ERROR 70100: Query execution was interrupted
+set debug_sync='RESET';
+disconnect con1;
+drop table t1;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set @@optimizer_switch=@save_optimizer_switch;
+set @@use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/rowid_filter_innodb_debug.test b/mysql-test/main/rowid_filter_innodb_debug.test
new file mode 100644
index 00000000000..eb43edd9e9e
--- /dev/null
+++ b/mysql-test/main/rowid_filter_innodb_debug.test
@@ -0,0 +1,51 @@
+--source include/have_innodb.inc
+
+set default_storage_engine=innodb;
+--source include/rowid_filter_debug_kill.inc
+set default_storage_engine=default;
+
+--source include/default_optimizer_switch.inc
+--source include/count_sessions.inc
+
+set @save_optimizer_switch= @@optimizer_switch;
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+
+set @@use_stat_tables=preferably;
+
+set optimizer_use_condition_selectivity=2;
+set optimizer_switch='rowid_filter=on';
+
+--echo #
+--echo # MDEV-22761 KILL QUERY during rowid_filter, crashes
+--echo # (The smaller testcase)
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4);
+
+let $ID= `SELECT @id := CONNECTION_ID()`;
+
+set debug_sync='handler_rowid_filter_check SIGNAL killme WAIT_FOR go';
+send SELECT * FROM t1 WHERE a > 0 AND b=0;
+
+connect (con1, localhost, root,,);
+connection con1;
+let $ignore= `SELECT @id := $ID`;
+set debug_sync='now WAIT_FOR killme';
+kill query @id;
+set debug_sync='now SIGNAL go';
+
+connection default;
+--error ER_QUERY_INTERRUPTED
+reap;
+set debug_sync='RESET';
+
+disconnect con1;
+drop table t1;
+
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+set @@optimizer_switch=@save_optimizer_switch;
+set @@use_stat_tables=@save_use_stat_tables;
+
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/main/rowid_filter_myisam.result b/mysql-test/main/rowid_filter_myisam.result
new file mode 100644
index 00000000000..927257d2cc7
--- /dev/null
+++ b/mysql-test/main/rowid_filter_myisam.result
@@ -0,0 +1,21 @@
+#
+# MDEV-22553: Assertion `info->lastpos == (~ (my_off_t) 0)' failed in mi_rkey with rowid_filer=on
+#
+CREATE TABLE t1 (
+a smallint(6) DEFAULT NULL,
+b bigint(20) DEFAULT NULL,
+c varchar(64) DEFAULT NULL,
+d varchar(64) DEFAULT NULL,
+e smallint(6) DEFAULT NULL,
+f bigint(20) DEFAULT NULL,
+KEY a (a),
+KEY d (d),
+KEY f (f)
+) ENGINE=MyISAM;
+ALTER TABLE t1 DISABLE KEYS;
+# Insert a lot of rows
+ALTER TABLE t1 ENABLE KEYS;
+# Must not crash:
+SELECT * FROM t1 WHERE ( a BETWEEN 255 AND 270 OR f = 200 ) AND f IN ( 1, 4, 112, 143 ) AND d IN ('Montana', 'South Dakota');
+a b c d e f
+DROP TABLE t1;
diff --git a/mysql-test/main/rowid_filter_myisam.test b/mysql-test/main/rowid_filter_myisam.test
new file mode 100644
index 00000000000..3ea4dc26ea0
--- /dev/null
+++ b/mysql-test/main/rowid_filter_myisam.test
@@ -0,0 +1,1625 @@
+--echo #
+--echo # MDEV-22553: Assertion `info->lastpos == (~ (my_off_t) 0)' failed in mi_rkey with rowid_filer=on
+--echo #
+
+CREATE TABLE t1 (
+ a smallint(6) DEFAULT NULL,
+ b bigint(20) DEFAULT NULL,
+ c varchar(64) DEFAULT NULL,
+ d varchar(64) DEFAULT NULL,
+ e smallint(6) DEFAULT NULL,
+ f bigint(20) DEFAULT NULL,
+ KEY a (a),
+ KEY d (d),
+ KEY f (f)
+) ENGINE=MyISAM;
+
+ALTER TABLE t1 DISABLE KEYS;
+--echo # Insert a lot of rows
+--disable_query_log
+INSERT INTO t1 VALUES (13954,0,NULL,'c',NULL,0);
+INSERT INTO t1 VALUES (124,0,NULL,'j',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'h',NULL,9);
+INSERT INTO t1 VALUES (4,0,NULL,'New Hampshire',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'q',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'f',NULL,NULL);
+INSERT INTO t1 VALUES (2,0,NULL,'b',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'y',NULL,0);
+INSERT INTO t1 VALUES (106,0,NULL,'Hawaii',NULL,-480);
+INSERT INTO t1 VALUES (10534,0,NULL,'South Carolina',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'Iowa',NULL,0);
+INSERT INTO t1 VALUES (6,0,NULL,'g',NULL,9);
+INSERT INTO t1 VALUES (0,0,NULL,'Arkansas',NULL,116);
+INSERT INTO t1 VALUES (0,0,NULL,'b',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'release',NULL,-624);
+INSERT INTO t1 VALUES (169,0,NULL,'s',NULL,664);
+INSERT INTO t1 VALUES (20060,0,NULL,'l',NULL,672);
+INSERT INTO t1 VALUES (NULL,0,NULL,'q',NULL,235);
+INSERT INTO t1 VALUES (1,0,NULL,'Tennessee',NULL,8);
+INSERT INTO t1 VALUES (687,0,NULL,'j',NULL,21);
+INSERT INTO t1 VALUES (-19736,0,NULL,'s',NULL,NULL);
+INSERT INTO t1 VALUES (81,0,NULL,'p',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'festival',NULL,97);
+INSERT INTO t1 VALUES (NULL,0,NULL,'c',NULL,264);
+INSERT INTO t1 VALUES (0,0,NULL,'o',NULL,NULL);
+INSERT INTO t1 VALUES (-30578,0,NULL,'exam',NULL,NULL);
+INSERT INTO t1 VALUES (30751,0,NULL,'Nebraska',NULL,0);
+INSERT INTO t1 VALUES (8,0,NULL,'d',NULL,0);
+INSERT INTO t1 VALUES (29585,0,NULL,'California',NULL,585);
+INSERT INTO t1 VALUES (15376,0,NULL,'Indiana',NULL,768);
+INSERT INTO t1 VALUES (7162,0,NULL,'gifted',NULL,NULL);
+INSERT INTO t1 VALUES (28102,0,NULL,'w',NULL,616);
+INSERT INTO t1 VALUES (NULL,0,NULL,'b',NULL,NULL);
+INSERT INTO t1 VALUES (80,0,NULL,'p',NULL,NULL);
+INSERT INTO t1 VALUES (4,0,NULL,'o',NULL,282);
+INSERT INTO t1 VALUES (32767,0,NULL,'p',NULL,2);
+INSERT INTO t1 VALUES (255,0,NULL,'b',NULL,0);
+INSERT INTO t1 VALUES (202,0,NULL,'Mississippi',NULL,0);
+INSERT INTO t1 VALUES (16253,0,NULL,'Alaska',NULL,872);
+INSERT INTO t1 VALUES (5,0,NULL,'q',NULL,-656);
+INSERT INTO t1 VALUES (32767,0,NULL,'q',NULL,3);
+INSERT INTO t1 VALUES (7,0,NULL,'Rhode Island',NULL,250);
+INSERT INTO t1 VALUES (0,0,NULL,'b',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'s',NULL,885);
+INSERT INTO t1 VALUES (NULL,0,NULL,'i',NULL,-56);
+INSERT INTO t1 VALUES (201,0,NULL,'ridiculous',NULL,-704);
+INSERT INTO t1 VALUES (5,0,NULL,'teenage',NULL,82);
+INSERT INTO t1 VALUES (0,0,NULL,'Alabama',NULL,NULL);
+INSERT INTO t1 VALUES (4,0,NULL,'i',NULL,1);
+INSERT INTO t1 VALUES (-9774,0,NULL,'v',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'y',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Alabama',NULL,NULL);
+INSERT INTO t1 VALUES (7,0,NULL,'e',NULL,8);
+INSERT INTO t1 VALUES (3,0,NULL,'l',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'drift',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'v',NULL,230);
+INSERT INTO t1 VALUES (5926,0,NULL,'Colorado',NULL,254);
+INSERT INTO t1 VALUES (NULL,0,NULL,'South Carolina',NULL,512);
+INSERT INTO t1 VALUES (9,0,NULL,'othapwsr',NULL,NULL);
+INSERT INTO t1 VALUES (23437,0,NULL,'h',NULL,0);
+INSERT INTO t1 VALUES (18863,0,NULL,'guideline',NULL,-80);
+INSERT INTO t1 VALUES (NULL,0,NULL,'s',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New Mexico',NULL,272);
+INSERT INTO t1 VALUES (79,0,NULL,'partnership',NULL,5);
+INSERT INTO t1 VALUES (0,0,NULL,'e',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'r',NULL,128);
+INSERT INTO t1 VALUES (42,0,NULL,'tz',NULL,NULL);
+INSERT INTO t1 VALUES (228,0,NULL,'Utah',NULL,3);
+INSERT INTO t1 VALUES (NULL,0,NULL,'i',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'Alaska',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'wo',NULL,177);
+INSERT INTO t1 VALUES (0,0,NULL,'Maryland',NULL,487);
+INSERT INTO t1 VALUES (-8186,0,NULL,'Colorado',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'uj',NULL,328);
+INSERT INTO t1 VALUES (4,0,NULL,'fork',NULL,0);
+INSERT INTO t1 VALUES (3,0,NULL,'w',NULL,NULL);
+INSERT INTO t1 VALUES (248,0,NULL,'i',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'dmkbqswrmtyabvlfylaxhnqij',NULL,24);
+INSERT INTO t1 VALUES (32767,0,NULL,'achieve',NULL,1);
+INSERT INTO t1 VALUES (32767,0,NULL,'existing',NULL,5);
+INSERT INTO t1 VALUES (6,0,NULL,'master',NULL,-312);
+INSERT INTO t1 VALUES (214,0,NULL,'b',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Michigan',NULL,42);
+INSERT INTO t1 VALUES (NULL,0,NULL,'simply',NULL,109);
+INSERT INTO t1 VALUES (NULL,0,NULL,'sw',NULL,86);
+INSERT INTO t1 VALUES (20697,0,NULL,'m',NULL,5);
+INSERT INTO t1 VALUES (-11693,0,NULL,'mt',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'South Dakota',NULL,NULL);
+INSERT INTO t1 VALUES (14825,0,NULL,'b',NULL,0);
+INSERT INTO t1 VALUES (-9378,0,NULL,'Washington',NULL,593);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New Jersey',NULL,246);
+INSERT INTO t1 VALUES (32767,0,NULL,'q',NULL,-816);
+INSERT INTO t1 VALUES (0,0,NULL,'vl',NULL,232);
+INSERT INTO t1 VALUES (25257,0,NULL,'Nevada',NULL,-24);
+INSERT INTO t1 VALUES (0,0,NULL,'Wisconsin',NULL,9);
+INSERT INTO t1 VALUES (1536,0,NULL,'x',NULL,NULL);
+INSERT INTO t1 VALUES (5895,0,NULL,'Washington',NULL,170);
+INSERT INTO t1 VALUES (28123,0,NULL,'h',NULL,176);
+INSERT INTO t1 VALUES (9,0,NULL,'Tennessee',NULL,948);
+INSERT INTO t1 VALUES (0,0,NULL,'qi',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'Tennessee',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Oklahoma',NULL,132);
+INSERT INTO t1 VALUES (-21476,0,NULL,'Montana',NULL,947);
+INSERT INTO t1 VALUES (6,0,NULL,'aevevozlwbltcvzjptgbxw',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'v',NULL,4);
+INSERT INTO t1 VALUES (1,0,NULL,'vo',NULL,73);
+INSERT INTO t1 VALUES (3,0,NULL,'oz',NULL,328);
+INSERT INTO t1 VALUES (17939,0,NULL,'exclude',NULL,175);
+INSERT INTO t1 VALUES (-26579,0,NULL,'bl',NULL,32);
+INSERT INTO t1 VALUES (9,0,NULL,'c',NULL,130);
+INSERT INTO t1 VALUES (-26118,0,NULL,'asian',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'r',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'personal',NULL,8);
+INSERT INTO t1 VALUES (26919,0,NULL,'i',NULL,550);
+INSERT INTO t1 VALUES (NULL,0,NULL,'n',NULL,456);
+INSERT INTO t1 VALUES (NULL,0,NULL,'tg',NULL,-40);
+INSERT INTO t1 VALUES (0,0,NULL,'g',NULL,-720);
+INSERT INTO t1 VALUES (5,0,NULL,'bxwggltplrozn',NULL,92);
+INSERT INTO t1 VALUES (5,0,NULL,'w',NULL,-904);
+INSERT INTO t1 VALUES (-5704,0,NULL,'Idaho',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'t',NULL,2);
+INSERT INTO t1 VALUES (3,0,NULL,'lroznxbayvsjotzfqwye',NULL,-544);
+INSERT INTO t1 VALUES (-32545,0,NULL,'oz',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'x',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'virtually',NULL,38);
+INSERT INTO t1 VALUES (1,0,NULL,'beautiful',NULL,7);
+INSERT INTO t1 VALUES (223,0,NULL,'vs',NULL,9);
+INSERT INTO t1 VALUES (13865,0,NULL,'Arkansas',NULL,1);
+INSERT INTO t1 VALUES (0,0,NULL,'h',NULL,0);
+INSERT INTO t1 VALUES (-24982,0,NULL,'e',NULL,206);
+INSERT INTO t1 VALUES (27039,0,NULL,'rape',NULL,-184);
+INSERT INTO t1 VALUES (NULL,0,NULL,'v',NULL,74);
+INSERT INTO t1 VALUES (NULL,0,NULL,'wyec',NULL,2);
+INSERT INTO t1 VALUES (0,0,NULL,'cook',NULL,59);
+INSERT INTO t1 VALUES (0,0,NULL,'Iowa',NULL,NULL);
+INSERT INTO t1 VALUES (231,0,NULL,'ecfsb',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'p',NULL,370);
+INSERT INTO t1 VALUES (-24801,0,NULL,'New Mexico',NULL,NULL);
+INSERT INTO t1 VALUES (50,0,NULL,'kelhcq',NULL,104);
+INSERT INTO t1 VALUES (NULL,0,NULL,'el',NULL,402);
+INSERT INTO t1 VALUES (15730,0,NULL,'h',NULL,376);
+INSERT INTO t1 VALUES (8,0,NULL,'p',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'h',NULL,4);
+INSERT INTO t1 VALUES (32767,0,NULL,'South Carolina',NULL,382);
+INSERT INTO t1 VALUES (NULL,0,NULL,'invite',NULL,816);
+INSERT INTO t1 VALUES (NULL,0,NULL,'ft',NULL,538);
+INSERT INTO t1 VALUES (8159,0,NULL,'q',NULL,11);
+INSERT INTO t1 VALUES (0,0,NULL,'a',NULL,103);
+INSERT INTO t1 VALUES (7,0,NULL,'n',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New Jersey',NULL,146);
+INSERT INTO t1 VALUES (32767,0,NULL,'odlwznvezd',NULL,295);
+INSERT INTO t1 VALUES (9,0,NULL,'any',NULL,480);
+INSERT INTO t1 VALUES (7,0,NULL,'znvezdlrwfvhpghujmnvqun',NULL,720);
+INSERT INTO t1 VALUES (12792,0,NULL,'Iowa',NULL,NULL);
+INSERT INTO t1 VALUES (148,0,NULL,'Ohio',NULL,89);
+INSERT INTO t1 VALUES (NULL,0,NULL,'lr',NULL,-680);
+INSERT INTO t1 VALUES (-14898,0,NULL,'fv',NULL,736);
+INSERT INTO t1 VALUES (32767,0,NULL,'v',NULL,9);
+INSERT INTO t1 VALUES (5808,0,NULL,'Florida',NULL,112);
+INSERT INTO t1 VALUES (0,0,NULL,'gh',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (4,0,NULL,'mnvqunepbp',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'enemy',NULL,272);
+INSERT INTO t1 VALUES (32767,0,NULL,'unhappy',NULL,8);
+INSERT INTO t1 VALUES (1460,0,NULL,'Connecticut',NULL,780);
+INSERT INTO t1 VALUES (0,0,NULL,'epbpabcgxxmaozb',NULL,230);
+INSERT INTO t1 VALUES (NULL,0,NULL,'banana',NULL,620);
+INSERT INTO t1 VALUES (0,0,NULL,'pabcgxxmaozbofwby',NULL,212);
+INSERT INTO t1 VALUES (32767,0,NULL,'afterward',NULL,0);
+INSERT INTO t1 VALUES (-15421,0,NULL,'important',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'Washington',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'m',NULL,3);
+INSERT INTO t1 VALUES (0,0,NULL,'zb',NULL,1);
+INSERT INTO t1 VALUES (0,0,NULL,'position',NULL,-632);
+INSERT INTO t1 VALUES (17,0,NULL,'bofwbypkykzkbnayqfeuzxlyt',NULL,63);
+INSERT INTO t1 VALUES (NULL,0,NULL,'of',NULL,488);
+INSERT INTO t1 VALUES (0,0,NULL,'wbypkykzkbnayqfeuzxlyts',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'insight',NULL,632);
+INSERT INTO t1 VALUES (0,0,NULL,'Arizona',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'pk',NULL,0);
+INSERT INTO t1 VALUES (174,0,NULL,'yk',NULL,194);
+INSERT INTO t1 VALUES (4,0,NULL,'h',NULL,NULL);
+INSERT INTO t1 VALUES (19871,0,NULL,'zkbna',NULL,7);
+INSERT INTO t1 VALUES (NULL,0,NULL,'l',NULL,0);
+INSERT INTO t1 VALUES (-18596,0,NULL,'New York',NULL,488);
+INSERT INTO t1 VALUES (18464,0,NULL,'qfeuzxlyts',NULL,3);
+INSERT INTO t1 VALUES (-21912,0,NULL,'doctor',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'eu',NULL,4);
+INSERT INTO t1 VALUES (0,0,NULL,'xl',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New York',NULL,394);
+INSERT INTO t1 VALUES (NULL,0,NULL,'closest',NULL,928);
+INSERT INTO t1 VALUES (7,0,NULL,'jx',NULL,0);
+INSERT INTO t1 VALUES (8,0,NULL,'Mississippi',NULL,236);
+INSERT INTO t1 VALUES (8238,0,NULL,'n',NULL,2);
+INSERT INTO t1 VALUES (137,0,NULL,'nf',NULL,3);
+INSERT INTO t1 VALUES (7,0,NULL,'mm',NULL,824);
+INSERT INTO t1 VALUES (-13059,0,NULL,'nfojpim',NULL,-40);
+INSERT INTO t1 VALUES (NULL,0,NULL,'i',NULL,224);
+INSERT INTO t1 VALUES (NULL,0,NULL,'blind',NULL,-296);
+INSERT INTO t1 VALUES (0,0,NULL,'Maryland',NULL,8);
+INSERT INTO t1 VALUES (0,0,NULL,'im',NULL,0);
+INSERT INTO t1 VALUES (88,0,NULL,'Colorado',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'glove',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'qg',NULL,952);
+INSERT INTO t1 VALUES (14297,0,NULL,'level',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'v',NULL,0);
+INSERT INTO t1 VALUES (46,0,NULL,'suspicion',NULL,0);
+INSERT INTO t1 VALUES (7,0,NULL,'Connecticut',NULL,NULL);
+INSERT INTO t1 VALUES (32672,0,NULL,'master',NULL,224);
+INSERT INTO t1 VALUES (255,0,NULL,'suffering',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'bweyg',NULL,343);
+INSERT INTO t1 VALUES (32,0,NULL,'Maine',NULL,-224);
+INSERT INTO t1 VALUES (2888,0,NULL,'rear',NULL,74);
+INSERT INTO t1 VALUES (218,0,NULL,'New Hampshire',NULL,-416);
+INSERT INTO t1 VALUES (NULL,0,NULL,'m',NULL,5);
+INSERT INTO t1 VALUES (7,0,NULL,'compel',NULL,592);
+INSERT INTO t1 VALUES (3,0,NULL,'Vermont',NULL,-424);
+INSERT INTO t1 VALUES (0,0,NULL,'natural',NULL,6);
+INSERT INTO t1 VALUES (4,0,NULL,'f',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'Maryland',NULL,0);
+INSERT INTO t1 VALUES (4128,0,NULL,'lm',NULL,-128);
+INSERT INTO t1 VALUES (0,0,NULL,'circuit',NULL,NULL);
+INSERT INTO t1 VALUES (-23553,0,NULL,'appearance',NULL,9);
+INSERT INTO t1 VALUES (32767,0,NULL,'qr',NULL,0);
+INSERT INTO t1 VALUES (9700,0,NULL,'g',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hr',NULL,9);
+INSERT INTO t1 VALUES (229,0,NULL,'West Virginia',NULL,244);
+INSERT INTO t1 VALUES (10379,0,NULL,'i',NULL,211);
+INSERT INTO t1 VALUES (0,0,NULL,'personal',NULL,5);
+INSERT INTO t1 VALUES (4298,0,NULL,'z',NULL,985);
+INSERT INTO t1 VALUES (157,0,NULL,'e',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'p',NULL,5);
+INSERT INTO t1 VALUES (32767,0,NULL,'lg',NULL,527);
+INSERT INTO t1 VALUES (1,0,NULL,'t',NULL,208);
+INSERT INTO t1 VALUES (5,0,NULL,'Kansas',NULL,587);
+INSERT INTO t1 VALUES (-31188,0,NULL,'e',NULL,408);
+INSERT INTO t1 VALUES (NULL,0,NULL,'v',NULL,146);
+INSERT INTO t1 VALUES (15527,0,NULL,'vd',NULL,-200);
+INSERT INTO t1 VALUES (11164,0,NULL,'pthiwwamjdavik',NULL,117);
+INSERT INTO t1 VALUES (46,0,NULL,'iw',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'a',NULL,9);
+INSERT INTO t1 VALUES (NULL,0,NULL,'gradually',NULL,0);
+INSERT INTO t1 VALUES (-21366,0,NULL,'refer',NULL,146);
+INSERT INTO t1 VALUES (20927,0,NULL,'c',NULL,0);
+INSERT INTO t1 VALUES (43,0,NULL,'Florida',NULL,968);
+INSERT INTO t1 VALUES (NULL,0,NULL,'ko',NULL,NULL);
+INSERT INTO t1 VALUES (242,0,NULL,'jrydpgfyxhfqsu',NULL,-800);
+INSERT INTO t1 VALUES (-12797,0,NULL,'ry',NULL,7);
+INSERT INTO t1 VALUES (6,0,NULL,'x',NULL,228);
+INSERT INTO t1 VALUES (9,0,NULL,'y',NULL,1);
+INSERT INTO t1 VALUES (0,0,NULL,'w',NULL,4);
+INSERT INTO t1 VALUES (127,0,NULL,'Maryland',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'h',NULL,NULL);
+INSERT INTO t1 VALUES (7,0,NULL,'qs',NULL,512);
+INSERT INTO t1 VALUES (30910,0,NULL,'disturb',NULL,960);
+INSERT INTO t1 VALUES (NULL,0,NULL,'lx',NULL,4);
+INSERT INTO t1 VALUES (94,0,NULL,'dhc',NULL,0);
+INSERT INTO t1 VALUES (247,0,NULL,'ca',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'fi',NULL,-488);
+INSERT INTO t1 VALUES (NULL,0,NULL,'i',NULL,3);
+INSERT INTO t1 VALUES (9,0,NULL,'Connecticut',NULL,552);
+INSERT INTO t1 VALUES (0,0,NULL,'register',NULL,0);
+INSERT INTO t1 VALUES (-8679,0,NULL,'bk',NULL,-760);
+INSERT INTO t1 VALUES (32767,0,NULL,'orbit',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'kvm',NULL,7);
+INSERT INTO t1 VALUES (0,0,NULL,'mdqbjxjh',NULL,680);
+INSERT INTO t1 VALUES (32767,0,NULL,'m',NULL,-272);
+INSERT INTO t1 VALUES (0,0,NULL,'bj',NULL,0);
+INSERT INTO t1 VALUES (22547,0,NULL,'xj',NULL,194);
+INSERT INTO t1 VALUES (-32403,0,NULL,'gj',NULL,240);
+INSERT INTO t1 VALUES (6394,0,NULL,'Arizona',NULL,16);
+INSERT INTO t1 VALUES (4,0,NULL,'z',NULL,488);
+INSERT INTO t1 VALUES (114,0,NULL,'i',NULL,0);
+INSERT INTO t1 VALUES (3710,0,NULL,'p',NULL,291);
+INSERT INTO t1 VALUES (28654,0,NULL,'empty',NULL,245);
+INSERT INTO t1 VALUES (9849,0,NULL,'Pennsylvania',NULL,0);
+INSERT INTO t1 VALUES (185,0,NULL,'j',NULL,320);
+INSERT INTO t1 VALUES (5,0,NULL,'Tennessee',NULL,7);
+INSERT INTO t1 VALUES (154,0,NULL,'hl',NULL,157);
+INSERT INTO t1 VALUES (NULL,0,NULL,'lo',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hc',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'must',NULL,755);
+INSERT INTO t1 VALUES (132,0,NULL,'m',NULL,95);
+INSERT INTO t1 VALUES (193,0,NULL,'poke',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'o',NULL,-656);
+INSERT INTO t1 VALUES (172,0,NULL,'e',NULL,0);
+INSERT INTO t1 VALUES (7642,0,NULL,'feeling',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'cwmtpp',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'e',NULL,115);
+INSERT INTO t1 VALUES (32767,0,NULL,'Florida',NULL,505);
+INSERT INTO t1 VALUES (3,0,NULL,'Maryland',NULL,97);
+INSERT INTO t1 VALUES (NULL,0,NULL,'kill',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'qf',NULL,623);
+INSERT INTO t1 VALUES (0,0,NULL,'fz',NULL,812);
+INSERT INTO t1 VALUES (NULL,0,NULL,'greek',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'kglhiuodplizizzobpcq',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'l',NULL,0);
+INSERT INTO t1 VALUES (159,0,NULL,'s',NULL,7);
+INSERT INTO t1 VALUES (-25560,0,NULL,'z',NULL,656);
+INSERT INTO t1 VALUES (189,0,NULL,'u',NULL,0);
+INSERT INTO t1 VALUES (27110,0,NULL,'leather',NULL,9);
+INSERT INTO t1 VALUES (NULL,0,NULL,'li',NULL,944);
+INSERT INTO t1 VALUES (0,0,NULL,'attract',NULL,NULL);
+INSERT INTO t1 VALUES (9,0,NULL,'structural',NULL,71);
+INSERT INTO t1 VALUES (NULL,0,NULL,'settlement',NULL,4);
+INSERT INTO t1 VALUES (-15549,0,NULL,'n',NULL,564);
+INSERT INTO t1 VALUES (30391,0,NULL,'k',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'ob',NULL,NULL);
+INSERT INTO t1 VALUES (224,0,NULL,'bpcqqji',NULL,413);
+INSERT INTO t1 VALUES (32767,0,NULL,'nowhere',NULL,8);
+INSERT INTO t1 VALUES (15281,0,NULL,'Arkansas',NULL,-912);
+INSERT INTO t1 VALUES (-9327,0,NULL,'d',NULL,-904);
+INSERT INTO t1 VALUES (14055,0,NULL,'i',NULL,293);
+INSERT INTO t1 VALUES (3,0,NULL,'Louisiana',NULL,224);
+INSERT INTO t1 VALUES (NULL,0,NULL,'pw',NULL,-624);
+INSERT INTO t1 VALUES (32767,0,NULL,'nevertheless',NULL,208);
+INSERT INTO t1 VALUES (NULL,0,NULL,'z',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'spectacular',NULL,104);
+INSERT INTO t1 VALUES (0,0,NULL,'digital',NULL,89);
+INSERT INTO t1 VALUES (5,0,NULL,'aq',NULL,40);
+INSERT INTO t1 VALUES (NULL,0,NULL,'tm',NULL,411);
+INSERT INTO t1 VALUES (11726,0,NULL,'p',NULL,0);
+INSERT INTO t1 VALUES (3188,0,NULL,'knykleafajkq',NULL,0);
+INSERT INTO t1 VALUES (1,0,NULL,'technology',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'y',NULL,58);
+INSERT INTO t1 VALUES (67,0,NULL,'a',NULL,0);
+INSERT INTO t1 VALUES (-6719,0,NULL,'n',NULL,136);
+INSERT INTO t1 VALUES (8000,0,NULL,'j',NULL,-248);
+INSERT INTO t1 VALUES (32767,0,NULL,'snow',NULL,8);
+INSERT INTO t1 VALUES (-3623,0,NULL,'d',NULL,920);
+INSERT INTO t1 VALUES (NULL,0,NULL,'i',NULL,NULL);
+INSERT INTO t1 VALUES (3239,0,NULL,'Kansas',NULL,102);
+INSERT INTO t1 VALUES (7132,0,NULL,'zt',NULL,88);
+INSERT INTO t1 VALUES (-21941,0,NULL,'Tennessee',NULL,77);
+INSERT INTO t1 VALUES (45,0,NULL,'Virginia',NULL,3);
+INSERT INTO t1 VALUES (166,0,NULL,'m',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'l',NULL,-880);
+INSERT INTO t1 VALUES (205,0,NULL,'Idaho',NULL,NULL);
+INSERT INTO t1 VALUES (10679,0,NULL,'f',NULL,2);
+INSERT INTO t1 VALUES (172,0,NULL,'North Dakota',NULL,NULL);
+INSERT INTO t1 VALUES (30942,0,NULL,'Indiana',NULL,832);
+INSERT INTO t1 VALUES (1824,0,NULL,'m',NULL,NULL);
+INSERT INTO t1 VALUES (34,0,NULL,'stumble',NULL,440);
+INSERT INTO t1 VALUES (12955,0,NULL,'juror',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'South Dakota',NULL,5);
+INSERT INTO t1 VALUES (25891,0,NULL,'j',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'clerk',NULL,39);
+INSERT INTO t1 VALUES (13187,0,NULL,'gw',NULL,811);
+INSERT INTO t1 VALUES (0,0,NULL,'x',NULL,583);
+INSERT INTO t1 VALUES (6,0,NULL,'fb',NULL,140);
+INSERT INTO t1 VALUES (32767,0,NULL,'vp',NULL,781);
+INSERT INTO t1 VALUES (0,0,NULL,'if',NULL,NULL);
+INSERT INTO t1 VALUES (7497,0,NULL,'New Hampshire',NULL,233);
+INSERT INTO t1 VALUES (155,0,NULL,'e',NULL,NULL);
+INSERT INTO t1 VALUES (-18830,0,NULL,'q',NULL,84);
+INSERT INTO t1 VALUES (3815,0,NULL,'yy',NULL,8);
+INSERT INTO t1 VALUES (0,0,NULL,'Kansas',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'yqspnupv',NULL,0);
+INSERT INTO t1 VALUES (1,0,NULL,'hers',NULL,688);
+INSERT INTO t1 VALUES (32767,0,NULL,'pnupvmuqjaojhylsrbqichox',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'x',NULL,8);
+INSERT INTO t1 VALUES (3,0,NULL,'North Carolina',NULL,-88);
+INSERT INTO t1 VALUES (92,0,NULL,'u',NULL,0);
+INSERT INTO t1 VALUES (32126,0,NULL,'sensation',NULL,226);
+INSERT INTO t1 VALUES (4,0,NULL,'muqjao',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'aojhylsrbqichoxl',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'tribe',NULL,0);
+INSERT INTO t1 VALUES (142,0,NULL,'jhy',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'w',NULL,622);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New York',NULL,-56);
+INSERT INTO t1 VALUES (-24954,0,NULL,'bqichoxlxsarzbqouvscstrtpofjbbjrci',NULL,8);
+INSERT INTO t1 VALUES (4105,0,NULL,'New Hampshire',NULL,247);
+INSERT INTO t1 VALUES (0,0,NULL,'k',NULL,0);
+INSERT INTO t1 VALUES (46,0,NULL,'reader',NULL,400);
+INSERT INTO t1 VALUES (-29286,0,NULL,'ho',NULL,NULL);
+INSERT INTO t1 VALUES (169,0,NULL,'mr',NULL,0);
+INSERT INTO t1 VALUES (9,0,NULL,'y',NULL,333);
+INSERT INTO t1 VALUES (25168,0,NULL,'New Jersey',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'queen',NULL,2);
+INSERT INTO t1 VALUES (9,0,NULL,'bow',NULL,NULL);
+INSERT INTO t1 VALUES (7,0,NULL,'satellite',NULL,NULL);
+INSERT INTO t1 VALUES (1,0,NULL,'u',NULL,31);
+INSERT INTO t1 VALUES (NULL,0,NULL,'scstrtpofjbbjrcijlkzoyh',NULL,70);
+INSERT INTO t1 VALUES (26275,0,NULL,'b',NULL,7);
+INSERT INTO t1 VALUES (227,0,NULL,'card',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'p',NULL,140);
+INSERT INTO t1 VALUES (4,0,NULL,'Oregon',NULL,556);
+INSERT INTO t1 VALUES (-12170,0,NULL,'Missouri',NULL,292);
+INSERT INTO t1 VALUES (NULL,0,NULL,'bjrcijlkzoyhy',NULL,251);
+INSERT INTO t1 VALUES (NULL,0,NULL,'ci',NULL,NULL);
+INSERT INTO t1 VALUES (69,0,NULL,'g',NULL,-456);
+INSERT INTO t1 VALUES (NULL,0,NULL,'f',NULL,9);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hynudnmi',NULL,45);
+INSERT INTO t1 VALUES (-30445,0,NULL,'widespread',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Maryland',NULL,407);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Delaware',NULL,-40);
+INSERT INTO t1 VALUES (30059,0,NULL,'n',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'u',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'znwacpbwghlegvykaobxv',NULL,7);
+INSERT INTO t1 VALUES (174,0,NULL,'r',NULL,9);
+INSERT INTO t1 VALUES (NULL,0,NULL,'West Virginia',NULL,71);
+INSERT INTO t1 VALUES (2593,0,NULL,'z',NULL,2);
+INSERT INTO t1 VALUES (-28371,0,NULL,'v',NULL,89);
+INSERT INTO t1 VALUES (23749,0,NULL,'e',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'w',NULL,183);
+INSERT INTO t1 VALUES (NULL,0,NULL,'ghl',NULL,776);
+INSERT INTO t1 VALUES (4,0,NULL,'Mississippi',NULL,8);
+INSERT INTO t1 VALUES (9210,0,NULL,'z',NULL,246);
+INSERT INTO t1 VALUES (12724,0,NULL,'South Dakota',NULL,222);
+INSERT INTO t1 VALUES (NULL,0,NULL,'outlet',NULL,790);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Indiana',NULL,-8);
+INSERT INTO t1 VALUES (NULL,0,NULL,'aob',NULL,0);
+INSERT INTO t1 VALUES (7,0,NULL,'tell',NULL,-648);
+INSERT INTO t1 VALUES (0,0,NULL,'u',NULL,381);
+INSERT INTO t1 VALUES (7,0,NULL,'vqhhtakqoppfcrb',NULL,747);
+INSERT INTO t1 VALUES (4,0,NULL,'Arkansas',NULL,816);
+INSERT INTO t1 VALUES (0,0,NULL,'slight',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'upset',NULL,4);
+INSERT INTO t1 VALUES (-17416,0,NULL,'Nebraska',NULL,9);
+INSERT INTO t1 VALUES (137,0,NULL,'takqoppfcrbangizjeqc',NULL,672);
+INSERT INTO t1 VALUES (-326,0,NULL,'spill',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'w',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'crb',NULL,166);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Mississippi',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'ba',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'a',NULL,1);
+INSERT INTO t1 VALUES (61,0,NULL,'izj',NULL,-744);
+INSERT INTO t1 VALUES (-26413,0,NULL,'Nevada',NULL,NULL);
+INSERT INTO t1 VALUES (6,0,NULL,'Mississippi',NULL,416);
+INSERT INTO t1 VALUES (0,0,NULL,'Nevada',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'b',NULL,470);
+INSERT INTO t1 VALUES (2864,0,NULL,'x',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Montana',NULL,248);
+INSERT INTO t1 VALUES (32767,0,NULL,'y',NULL,2);
+INSERT INTO t1 VALUES (0,0,NULL,'Arkansas',NULL,107);
+INSERT INTO t1 VALUES (243,0,NULL,'bb',NULL,NULL);
+INSERT INTO t1 VALUES (-7006,0,NULL,'y',NULL,262);
+INSERT INTO t1 VALUES (29170,0,NULL,'data',NULL,257);
+INSERT INTO t1 VALUES (NULL,0,NULL,'procedure',NULL,5);
+INSERT INTO t1 VALUES (NULL,0,NULL,'u',NULL,182);
+INSERT INTO t1 VALUES (0,0,NULL,'lczldnxhwgkrabptlqda',NULL,158);
+INSERT INTO t1 VALUES (10754,0,NULL,'cream',NULL,0);
+INSERT INTO t1 VALUES (31943,0,NULL,'open',NULL,4);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hwg',NULL,NULL);
+INSERT INTO t1 VALUES (5,0,NULL,'Wyoming',NULL,NULL);
+INSERT INTO t1 VALUES (-27782,0,NULL,'r',NULL,187);
+INSERT INTO t1 VALUES (32767,0,NULL,'ab',NULL,0);
+INSERT INTO t1 VALUES (3,0,NULL,'ptlqda',NULL,-288);
+INSERT INTO t1 VALUES (32767,0,NULL,'q',NULL,72);
+INSERT INTO t1 VALUES (-22284,0,NULL,'e',NULL,664);
+INSERT INTO t1 VALUES (7,0,NULL,'Florida',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'movfyh',NULL,-784);
+INSERT INTO t1 VALUES (NULL,0,NULL,'vfy',NULL,784);
+INSERT INTO t1 VALUES (37,0,NULL,'h',NULL,105);
+INSERT INTO t1 VALUES (32767,0,NULL,'r',NULL,0);
+INSERT INTO t1 VALUES (145,0,NULL,'Hawaii',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'Minnesota',NULL,0);
+INSERT INTO t1 VALUES (4,0,NULL,'ov',NULL,181);
+INSERT INTO t1 VALUES (0,0,NULL,'coming',NULL,5);
+INSERT INTO t1 VALUES (32767,0,NULL,'mnry',NULL,946);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Arizona',NULL,NULL);
+INSERT INTO t1 VALUES (-2368,0,NULL,'c',NULL,0);
+INSERT INTO t1 VALUES (-21715,0,NULL,'ljfxl',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'Wyoming',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'fxlxhdnief',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'MariaDB is a community-developed, commercially',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'Mississippi',NULL,624);
+INSERT INTO t1 VALUES (6,0,NULL,'h',NULL,198);
+INSERT INTO t1 VALUES (-11442,0,NULL,'Massachusetts',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'i',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'draw',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'k',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'ztabdvhywbflylhukxqufevtdhnfzpccsuyvzargiogjfsnofsruoqac',NULL,53);
+INSERT INTO t1 VALUES (0,0,NULL,'all',NULL,994);
+INSERT INTO t1 VALUES (-18287,0,NULL,'abdvhywbflylhukxqu',NULL,878);
+INSERT INTO t1 VALUES (0,0,NULL,'Wyoming',NULL,847);
+INSERT INTO t1 VALUES (6,0,NULL,'dv',NULL,204);
+INSERT INTO t1 VALUES (246,0,NULL,'ywbflylhukxqufevtdhnfzpccsuyvzargiogjfsnofsruo',NULL,183);
+INSERT INTO t1 VALUES (20335,0,NULL,'f',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'l',NULL,223);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hukxqufevtdhnfzpccsuyvzargiogjfsnofsruoqacwwy',NULL,577);
+INSERT INTO t1 VALUES (180,0,NULL,'qu',NULL,6);
+INSERT INTO t1 VALUES (9,0,NULL,'f',NULL,8);
+INSERT INTO t1 VALUES (27881,0,NULL,'vt',NULL,2);
+INSERT INTO t1 VALUES (3,0,NULL,'tdhnfzpccsuyvzargiogjfsnofsr',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Alabama',NULL,200);
+INSERT INTO t1 VALUES (32767,0,NULL,'fzpccsuyv',NULL,20);
+INSERT INTO t1 VALUES (7,0,NULL,'p',NULL,180);
+INSERT INTO t1 VALUES (32767,0,NULL,'South Dakota',NULL,496);
+INSERT INTO t1 VALUES (23704,0,NULL,'uyvzargiogjfsnofsruoqacwwygpgvfsciovxyvstsktvbpcoliqfqjmavyv',NULL,744);
+INSERT INTO t1 VALUES (7,0,NULL,'za',NULL,4);
+INSERT INTO t1 VALUES (0,0,NULL,'straighten',NULL,198);
+INSERT INTO t1 VALUES (1200,0,NULL,'iogjfsnofsruoqacwwygpgv',NULL,NULL);
+INSERT INTO t1 VALUES (8559,0,NULL,'j',NULL,NULL);
+INSERT INTO t1 VALUES (-11567,0,NULL,'n',NULL,39);
+INSERT INTO t1 VALUES (0,0,NULL,'New Jersey',NULL,723);
+INSERT INTO t1 VALUES (NULL,0,NULL,'sruoqacwwygpgvfsciovxyv',NULL,150);
+INSERT INTO t1 VALUES (0,0,NULL,'Massachusetts',NULL,157);
+INSERT INTO t1 VALUES (10891,0,NULL,'scared',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'q',NULL,952);
+INSERT INTO t1 VALUES (10180,0,NULL,'a',NULL,322);
+INSERT INTO t1 VALUES (-32693,0,NULL,'hunt',NULL,-728);
+INSERT INTO t1 VALUES (0,0,NULL,'f',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'yg',NULL,83);
+INSERT INTO t1 VALUES (13866,0,NULL,'gp',NULL,277);
+INSERT INTO t1 VALUES (32767,0,NULL,'Maine',NULL,822);
+INSERT INTO t1 VALUES (19051,0,NULL,'quickly',NULL,2);
+INSERT INTO t1 VALUES (14284,0,NULL,'fsciovxyvstsktvbpcoliqfqjmavyvpmtdrynjkbhcxfvua',NULL,NULL);
+INSERT INTO t1 VALUES (10873,0,NULL,'Utah',NULL,0);
+INSERT INTO t1 VALUES (125,0,NULL,'q',NULL,NULL);
+INSERT INTO t1 VALUES (29916,0,NULL,'xyvstsktvbpcoliqfqjmavyvpmtdrynjkbhcxfv',NULL,547);
+INSERT INTO t1 VALUES (0,0,NULL,'Arizona',NULL,NULL);
+INSERT INTO t1 VALUES (212,0,NULL,'Kansas',NULL,650);
+INSERT INTO t1 VALUES (NULL,0,NULL,'trick',NULL,87);
+INSERT INTO t1 VALUES (1,0,NULL,'assign',NULL,135);
+INSERT INTO t1 VALUES (0,0,NULL,'tsktvbpcoliqfqjmavyvpmtdrynjkbhcxfvuaaupgnpusgz',NULL,237);
+INSERT INTO t1 VALUES (8,0,NULL,'o',NULL,NULL);
+INSERT INTO t1 VALUES (-31777,0,NULL,'t',NULL,1);
+INSERT INTO t1 VALUES (-10171,0,NULL,'pcoliqfqjmavyvpmtdrynjkbhcxfvuaaupgnpusgzncwf',NULL,0);
+INSERT INTO t1 VALUES (7826,0,NULL,'council',NULL,273);
+INSERT INTO t1 VALUES (20426,0,NULL,'r',NULL,9);
+INSERT INTO t1 VALUES (32767,0,NULL,'qf',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'qjmavyvpmtdrynjkbhcxfvuaaupg',NULL,440);
+INSERT INTO t1 VALUES (NULL,0,NULL,'s',NULL,-608);
+INSERT INTO t1 VALUES (0,0,NULL,'vyv',NULL,111);
+INSERT INTO t1 VALUES (225,0,NULL,'Michigan',NULL,NULL);
+INSERT INTO t1 VALUES (10391,0,NULL,'p',NULL,2);
+INSERT INTO t1 VALUES (3,0,NULL,'td',NULL,-480);
+INSERT INTO t1 VALUES (0,0,NULL,'z',NULL,587);
+INSERT INTO t1 VALUES (2180,0,NULL,'r',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'njkbhcxfvuaaupgnpusgzncwf',NULL,-984);
+INSERT INTO t1 VALUES (81,0,NULL,'bhcxfvuaaupgnpusgzncw',NULL,146);
+INSERT INTO t1 VALUES (165,0,NULL,'u',NULL,201);
+INSERT INTO t1 VALUES (11251,0,NULL,'c',NULL,NULL);
+INSERT INTO t1 VALUES (11703,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (236,0,NULL,'opinion',NULL,207);
+INSERT INTO t1 VALUES (32767,0,NULL,'Louisiana',NULL,-744);
+INSERT INTO t1 VALUES (-29220,0,NULL,'Massachusetts',NULL,409);
+INSERT INTO t1 VALUES (NULL,0,NULL,'up',NULL,169);
+INSERT INTO t1 VALUES (18778,0,NULL,'Alabama',NULL,241);
+INSERT INTO t1 VALUES (11959,0,NULL,'npusgzncwfwwbhfynsnzhmkxgjtfjjc',NULL,66);
+INSERT INTO t1 VALUES (30179,0,NULL,'Hawaii',NULL,7);
+INSERT INTO t1 VALUES (NULL,0,NULL,'s',NULL,100);
+INSERT INTO t1 VALUES (214,0,NULL,'New Hampshire',NULL,984);
+INSERT INTO t1 VALUES (5,0,NULL,'remove',NULL,NULL);
+INSERT INTO t1 VALUES (143,0,NULL,'w',NULL,0);
+INSERT INTO t1 VALUES (3,0,NULL,'Pennsylvania',NULL,696);
+INSERT INTO t1 VALUES (191,0,NULL,'b',NULL,816);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hfynsnzhmkxgjtfjjcwggesvfockyauicjqw',NULL,3);
+INSERT INTO t1 VALUES (0,0,NULL,'m',NULL,NULL);
+INSERT INTO t1 VALUES (4,0,NULL,'Arkansas',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'s',NULL,6);
+INSERT INTO t1 VALUES (1,0,NULL,'mk',NULL,36);
+INSERT INTO t1 VALUES (8215,0,NULL,'xg',NULL,320);
+INSERT INTO t1 VALUES (32767,0,NULL,'g',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'South Dakota',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'object',NULL,NULL);
+INSERT INTO t1 VALUES (26142,0,NULL,'magnetic',NULL,-936);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Idaho',NULL,376);
+INSERT INTO t1 VALUES (NULL,0,NULL,'g',NULL,0);
+INSERT INTO t1 VALUES (-14759,0,NULL,'n',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'svfockyauic',NULL,197);
+INSERT INTO t1 VALUES (25,0,NULL,'v',NULL,440);
+INSERT INTO t1 VALUES (239,0,NULL,'c',NULL,642);
+INSERT INTO t1 VALUES (189,0,NULL,'yauicjqwkwedvcvhsbvsgtjvqul',NULL,38);
+INSERT INTO t1 VALUES (-5515,0,NULL,'auicjqwkwedvcvhsbvsgtjvqulz',NULL,NULL);
+INSERT INTO t1 VALUES (25879,0,NULL,'i',NULL,416);
+INSERT INTO t1 VALUES (0,0,NULL,'s',NULL,-760);
+INSERT INTO t1 VALUES (1,0,NULL,'Delaware',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'w',NULL,250);
+INSERT INTO t1 VALUES (0,0,NULL,'s',NULL,232);
+INSERT INTO t1 VALUES (99,0,NULL,'j',NULL,-552);
+INSERT INTO t1 VALUES (0,0,NULL,'full-time',NULL,10);
+INSERT INTO t1 VALUES (NULL,0,NULL,'suffer',NULL,185);
+INSERT INTO t1 VALUES (19461,0,NULL,'recognize',NULL,8);
+INSERT INTO t1 VALUES (130,0,NULL,'learning',NULL,559);
+INSERT INTO t1 VALUES (4,0,NULL,'grain',NULL,336);
+INSERT INTO t1 VALUES (6,0,NULL,'correspondent',NULL,71);
+INSERT INTO t1 VALUES (9,0,NULL,'b',NULL,5);
+INSERT INTO t1 VALUES (18778,0,NULL,'practitioner',NULL,6);
+INSERT INTO t1 VALUES (2291,0,NULL,'California',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'vq',NULL,0);
+INSERT INTO t1 VALUES (34,0,NULL,'ul',NULL,81);
+INSERT INTO t1 VALUES (-21757,0,NULL,'k',NULL,587);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New Hampshire',NULL,739);
+INSERT INTO t1 VALUES (24,0,NULL,'o',NULL,NULL);
+INSERT INTO t1 VALUES (26917,0,NULL,'m',NULL,102);
+INSERT INTO t1 VALUES (55,0,NULL,'djvzvjevgpptiurzrjvnxsfvylicylrpwhdxky',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'k',NULL,537);
+INSERT INTO t1 VALUES (-10683,0,NULL,'Nevada',NULL,6);
+INSERT INTO t1 VALUES (-30580,0,NULL,'fall',NULL,432);
+INSERT INTO t1 VALUES (0,0,NULL,'Pennsylvania',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'e',NULL,0);
+INSERT INTO t1 VALUES (8,0,NULL,'Massachusetts',NULL,959);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Hawaii',NULL,NULL);
+INSERT INTO t1 VALUES (11119,0,NULL,'weaken',NULL,560);
+INSERT INTO t1 VALUES (-7660,0,NULL,'Massachusetts',NULL,752);
+INSERT INTO t1 VALUES (38,0,NULL,'c',NULL,0);
+INSERT INTO t1 VALUES (23593,0,NULL,'rzrjvnx',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'zr',NULL,7);
+INSERT INTO t1 VALUES (32767,0,NULL,'vn',NULL,0);
+INSERT INTO t1 VALUES (5,0,NULL,'sfv',NULL,0);
+INSERT INTO t1 VALUES (2,0,NULL,'v',NULL,242);
+INSERT INTO t1 VALUES (0,0,NULL,'o',NULL,2);
+INSERT INTO t1 VALUES (24986,0,NULL,'Delaware',NULL,9);
+INSERT INTO t1 VALUES (32767,0,NULL,'r',NULL,968);
+INSERT INTO t1 VALUES (-17056,0,NULL,'human',NULL,245);
+INSERT INTO t1 VALUES (0,0,NULL,'New Hampshire',NULL,4);
+INSERT INTO t1 VALUES (2,0,NULL,'rpwhdxkyahrnbjkssbbgjdtkk',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'g',NULL,NULL);
+INSERT INTO t1 VALUES (2,0,NULL,'hdxkyahrnbjkssbbgjdt',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'xk',NULL,840);
+INSERT INTO t1 VALUES (145,0,NULL,'picture',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'h',NULL,713);
+INSERT INTO t1 VALUES (-22009,0,NULL,'New Hampshire',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'x',NULL,225);
+INSERT INTO t1 VALUES (0,0,NULL,'accomplish',NULL,0);
+INSERT INTO t1 VALUES (166,0,NULL,'j',NULL,4);
+INSERT INTO t1 VALUES (24484,0,NULL,'South Dakota',NULL,117);
+INSERT INTO t1 VALUES (0,0,NULL,'Ohio',NULL,1);
+INSERT INTO t1 VALUES (149,0,NULL,'prepare',NULL,958);
+INSERT INTO t1 VALUES (9,0,NULL,'i',NULL,496);
+INSERT INTO t1 VALUES (0,0,NULL,'she',NULL,328);
+INSERT INTO t1 VALUES (0,0,NULL,'bbgjdtkkkntfogehrocicikzsxdkdefzskjbcdqkaawqmtxnpefrdshgm',NULL,NULL);
+INSERT INTO t1 VALUES (206,0,NULL,'gjdtkkkntfogehrocicikzsxdkdefzskjbcdqkaawqmtxnpefrdshgmyujlf',NULL,678);
+INSERT INTO t1 VALUES (83,0,NULL,'teenager',NULL,290);
+INSERT INTO t1 VALUES (32767,0,NULL,'tkkkntfogehrocicikzsxdkdefzskjbcdqkaawqmtxnpefrdshgmyujlfbpksd',NULL,12);
+INSERT INTO t1 VALUES (0,0,NULL,'kntfogehrocicikzsxdkdefzskjbcdqkaawqmtxnpefrdshgmyujlfbpksd',NULL,79);
+INSERT INTO t1 VALUES (-1536,0,NULL,'n',NULL,192);
+INSERT INTO t1 VALUES (0,0,NULL,'ignore',NULL,0);
+INSERT INTO t1 VALUES (28936,0,NULL,'gehrocicikzsxdkdefzskjbcd',NULL,191);
+INSERT INTO t1 VALUES (2,0,NULL,'rocicikzsxdkdefzskjbcdqkaawqmtxnpefrdshgmyujlfbpksdqbcozg',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'southwest',NULL,0);
+INSERT INTO t1 VALUES (-14649,0,NULL,'icikzsxdkdefzskjbcdqkaawqmtxnp',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'i',NULL,144);
+INSERT INTO t1 VALUES (54,0,NULL,'investigation',NULL,NULL);
+INSERT INTO t1 VALUES (1,0,NULL,'Missouri',NULL,-880);
+INSERT INTO t1 VALUES (0,0,NULL,'Minnesota',NULL,-144);
+INSERT INTO t1 VALUES (NULL,0,NULL,'seek',NULL,NULL);
+INSERT INTO t1 VALUES (92,0,NULL,'critical',NULL,NULL);
+INSERT INTO t1 VALUES (-19917,0,NULL,'dancing',NULL,11);
+INSERT INTO t1 VALUES (32767,0,NULL,'k',NULL,9);
+INSERT INTO t1 VALUES (5,0,NULL,'efzskjbcd',NULL,520);
+INSERT INTO t1 VALUES (NULL,0,NULL,'l',NULL,9);
+INSERT INTO t1 VALUES (-18309,0,NULL,'x',NULL,0);
+INSERT INTO t1 VALUES (30791,0,NULL,'v',NULL,883);
+INSERT INTO t1 VALUES (17054,0,NULL,'quite',NULL,199);
+INSERT INTO t1 VALUES (0,0,NULL,'Illinois',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'thought',NULL,6);
+INSERT INTO t1 VALUES (32767,0,NULL,'aa',NULL,240);
+INSERT INTO t1 VALUES (1,0,NULL,'builder',NULL,0);
+INSERT INTO t1 VALUES (2,0,NULL,'bread',NULL,478);
+INSERT INTO t1 VALUES (9,0,NULL,'mt',NULL,464);
+INSERT INTO t1 VALUES (0,0,NULL,'t',NULL,471);
+INSERT INTO t1 VALUES (249,0,NULL,'npefrdshgmyujlfbpksdqbcozgqnzxeuyjrdnutvbnf',NULL,272);
+INSERT INTO t1 VALUES (-5659,0,NULL,'ef',NULL,845);
+INSERT INTO t1 VALUES (32767,0,NULL,'Maine',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'project',NULL,-880);
+INSERT INTO t1 VALUES (203,0,NULL,'f',NULL,569);
+INSERT INTO t1 VALUES (6615,0,NULL,'z',NULL,820);
+INSERT INTO t1 VALUES (0,0,NULL,'highlight',NULL,0);
+INSERT INTO t1 VALUES (28099,0,NULL,'Louisiana',NULL,-528);
+INSERT INTO t1 VALUES (NULL,0,NULL,'j',NULL,NULL);
+INSERT INTO t1 VALUES (244,0,NULL,'f',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'mutter',NULL,3);
+INSERT INTO t1 VALUES (32767,0,NULL,'i',NULL,4);
+INSERT INTO t1 VALUES (-11010,0,NULL,'e',NULL,294);
+INSERT INTO t1 VALUES (214,0,NULL,'c',NULL,-32);
+INSERT INTO t1 VALUES (8,0,NULL,'ozgqnzxeuyjrdnutvbnfsjye',NULL,275);
+INSERT INTO t1 VALUES (0,0,NULL,'m',NULL,808);
+INSERT INTO t1 VALUES (-17980,0,NULL,'dip',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'Virginia',NULL,222);
+INSERT INTO t1 VALUES (218,0,NULL,'opponent',NULL,8);
+INSERT INTO t1 VALUES (32767,0,NULL,'xeuyjrdnutvbnfsjyeke',NULL,3);
+INSERT INTO t1 VALUES (1,0,NULL,'jrdnutvbnfsjyekezjixrjdkyqgpokqquixax',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'s',NULL,NULL);
+INSERT INTO t1 VALUES (234,0,NULL,'g',NULL,99);
+INSERT INTO t1 VALUES (172,0,NULL,'appointment',NULL,821);
+INSERT INTO t1 VALUES (NULL,0,NULL,'k',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'vbnfsjyekezjixrjdkyqgpokqquixaxjoyffwcfggsaoysceuzohfq',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'nfsjyekezjixrjdkyqgpokqquixaxjoy',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'f',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'n',NULL,66);
+INSERT INTO t1 VALUES (32767,0,NULL,'South Carolina',NULL,32);
+INSERT INTO t1 VALUES (0,0,NULL,'ek',NULL,22);
+INSERT INTO t1 VALUES (4,0,NULL,'Mississippi',NULL,132);
+INSERT INTO t1 VALUES (26606,0,NULL,'p',NULL,0);
+INSERT INTO t1 VALUES (26043,0,NULL,'center',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'b',NULL,1);
+INSERT INTO t1 VALUES (8,0,NULL,'dk',NULL,NULL);
+INSERT INTO t1 VALUES (24031,0,NULL,'l',NULL,4);
+INSERT INTO t1 VALUES (79,0,NULL,'po',NULL,7);
+INSERT INTO t1 VALUES (5,0,NULL,'Massachusetts',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'k',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'quixaxjoyf',NULL,213);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Arkansas',NULL,-160);
+INSERT INTO t1 VALUES (-30994,0,NULL,'Kansas',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'wheat',NULL,-808);
+INSERT INTO t1 VALUES (231,0,NULL,'less',NULL,912);
+INSERT INTO t1 VALUES (NULL,0,NULL,'a',NULL,107);
+INSERT INTO t1 VALUES (4,0,NULL,'ix',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'within',NULL,2);
+INSERT INTO t1 VALUES (17,0,NULL,'style',NULL,19);
+INSERT INTO t1 VALUES (32767,0,NULL,'o',NULL,840);
+INSERT INTO t1 VALUES (-12239,0,NULL,'marker',NULL,152);
+INSERT INTO t1 VALUES (9,0,NULL,'wcfggsaoysceuzohfq',NULL,160);
+INSERT INTO t1 VALUES (212,0,NULL,'fggsaoysceuzohfqhhrnnxkuwsbefbdefxucxqiowgsrsq',NULL,521);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Pennsylvania',NULL,0);
+INSERT INTO t1 VALUES (4,0,NULL,'North Dakota',NULL,67);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Minnesota',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'l',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'known',NULL,0);
+INSERT INTO t1 VALUES (-3384,0,NULL,'uzohfqhhrnnxkuwsbefbdef',NULL,401);
+INSERT INTO t1 VALUES (0,0,NULL,'f',NULL,5);
+INSERT INTO t1 VALUES (210,0,NULL,'conclusion',NULL,110);
+INSERT INTO t1 VALUES (17237,0,NULL,'h',NULL,NULL);
+INSERT INTO t1 VALUES (21561,0,NULL,'examine',NULL,699);
+INSERT INTO t1 VALUES (32767,0,NULL,'xkuwsbefbdefxucx',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'Virginia',NULL,47);
+INSERT INTO t1 VALUES (3,0,NULL,'g',NULL,NULL);
+INSERT INTO t1 VALUES (111,0,NULL,'correctly',NULL,0);
+INSERT INTO t1 VALUES (-588,0,NULL,'j',NULL,180);
+INSERT INTO t1 VALUES (10747,0,NULL,'be',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'e',NULL,8);
+INSERT INTO t1 VALUES (NULL,0,NULL,'defxucxqiowgsrsqg',NULL,NULL);
+INSERT INTO t1 VALUES (214,0,NULL,'v',NULL,183);
+INSERT INTO t1 VALUES (0,0,NULL,'xqiowgsrsqghqvetkcthoaigpdmsltmfepvjynircsyhydh',NULL,442);
+INSERT INTO t1 VALUES (21,0,NULL,'q',NULL,212);
+INSERT INTO t1 VALUES (6,0,NULL,'w',NULL,474);
+INSERT INTO t1 VALUES (0,0,NULL,'portfolio',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'s',NULL,NULL);
+INSERT INTO t1 VALUES (-2945,0,NULL,'g',NULL,536);
+INSERT INTO t1 VALUES (NULL,0,NULL,'slam',NULL,3);
+INSERT INTO t1 VALUES (172,0,NULL,'South Carolina',NULL,0);
+INSERT INTO t1 VALUES (-15771,0,NULL,'u',NULL,105);
+INSERT INTO t1 VALUES (0,0,NULL,'New Mexico',NULL,3);
+INSERT INTO t1 VALUES (-27986,0,NULL,'ho',NULL,NULL);
+INSERT INTO t1 VALUES (21055,0,NULL,'igpdmsltmfepvjynircsyhydhsmudplhhmhanqhwqrvpvcwltaxycuccy',NULL,360);
+INSERT INTO t1 VALUES (8,0,NULL,'q',NULL,12);
+INSERT INTO t1 VALUES (235,0,NULL,'msltmfepvjynircsyhydhsmudplh',NULL,764);
+INSERT INTO t1 VALUES (32767,0,NULL,'Florida',NULL,932);
+INSERT INTO t1 VALUES (184,0,NULL,'vision',NULL,183);
+INSERT INTO t1 VALUES (4,0,NULL,'c',NULL,776);
+INSERT INTO t1 VALUES (6,0,NULL,'pv',NULL,0);
+INSERT INTO t1 VALUES (-27554,0,NULL,'conference',NULL,79);
+INSERT INTO t1 VALUES (32767,0,NULL,'jy',NULL,0);
+INSERT INTO t1 VALUES (5,0,NULL,'ircsyhydhsmudplhhmhanqhwq',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'Washington',NULL,8);
+INSERT INTO t1 VALUES (7,0,NULL,'syhydhs',NULL,387);
+INSERT INTO t1 VALUES (32767,0,NULL,'z',NULL,0);
+INSERT INTO t1 VALUES (3,0,NULL,'ydhsmudplhhmhanqhwqrvpvcwltaxycuccywdujpabzv',NULL,707);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hsmudplhhmhanqhwqrvpvcwltaxycuccywdujpabzvtngapa',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'udplhhmhanqhwqrvpvcwltaxy',NULL,769);
+INSERT INTO t1 VALUES (2,0,NULL,'plhhmh',NULL,7);
+INSERT INTO t1 VALUES (39,0,NULL,'h',NULL,0);
+INSERT INTO t1 VALUES (-10547,0,NULL,'devote',NULL,0);
+INSERT INTO t1 VALUES (5,0,NULL,'Louisiana',NULL,49);
+INSERT INTO t1 VALUES (122,0,NULL,'nqhwqrvpvcwltaxycuccywdujpabzvtngapaidsrppccpnychu',NULL,8);
+INSERT INTO t1 VALUES (6778,0,NULL,'required',NULL,595);
+INSERT INTO t1 VALUES (0,0,NULL,'s',NULL,800);
+INSERT INTO t1 VALUES (NULL,0,NULL,'election',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'n',NULL,-360);
+INSERT INTO t1 VALUES (9,0,NULL,'doorway',NULL,146);
+INSERT INTO t1 VALUES (4025,0,NULL,'vpvcwltaxycuccywdujpabzvtngapaidsrppccpnychuzvzaxa',NULL,440);
+INSERT INTO t1 VALUES (25553,0,NULL,'classroom',NULL,116);
+INSERT INTO t1 VALUES (0,0,NULL,'duck',NULL,0);
+INSERT INTO t1 VALUES (7,0,NULL,'belly',NULL,176);
+INSERT INTO t1 VALUES (11217,0,NULL,'o',NULL,928);
+INSERT INTO t1 VALUES (30374,0,NULL,'j',NULL,32);
+INSERT INTO t1 VALUES (32767,0,NULL,'cu',NULL,-280);
+INSERT INTO t1 VALUES (3292,0,NULL,'ywdujpabzvtngapaidsrppccpnychuzvzaxajyizsnovyzqqimibnvz',NULL,NULL);
+INSERT INTO t1 VALUES (5,0,NULL,'uj',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'v',NULL,NULL);
+INSERT INTO t1 VALUES (31072,0,NULL,'adjustment',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'vt',NULL,NULL);
+INSERT INTO t1 VALUES (11282,0,NULL,'e',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'a',NULL,0);
+INSERT INTO t1 VALUES (30,0,NULL,'i',NULL,5);
+INSERT INTO t1 VALUES (1,0,NULL,'Maryland',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'rppccpnychuzvzaxajyizsnovyzqq',NULL,688);
+INSERT INTO t1 VALUES (4426,0,NULL,'ppccpnychuzvzaxajyizsnovyzqqimibnvzudcicgutp',NULL,3);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Iowa',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'x',NULL,928);
+INSERT INTO t1 VALUES (1,0,NULL,'k',NULL,-88);
+INSERT INTO t1 VALUES (30550,0,NULL,'p',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'huzvzaxajyizsnovyzqqimibnvzudcicgutpkrnsuqdzqjvnnesqq',NULL,577);
+INSERT INTO t1 VALUES (22824,0,NULL,'uzvzaxajyizsnovyzqqimibnvzudcicgutpkrnsuqdz',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'z',NULL,0);
+INSERT INTO t1 VALUES (9,0,NULL,'Rhode Island',NULL,120);
+INSERT INTO t1 VALUES (5,0,NULL,'zaxajyizsnovyzqqimibnvzudcicgutpkrnsuqdzqjvnnesqqprogbfwnjvym',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'xajyizsnovyzqqimibnvzudcicg',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'certainly',NULL,0);
+INSERT INTO t1 VALUES (-32548,0,NULL,'zs',NULL,-232);
+INSERT INTO t1 VALUES (32767,0,NULL,'vy',NULL,5);
+INSERT INTO t1 VALUES (151,0,NULL,'Vermont',NULL,171);
+INSERT INTO t1 VALUES (32767,0,NULL,'Virginia',NULL,0);
+INSERT INTO t1 VALUES (9,0,NULL,'h',NULL,719);
+INSERT INTO t1 VALUES (19723,0,NULL,'Oregon',NULL,96);
+INSERT INTO t1 VALUES (0,0,NULL,'Utah',NULL,2);
+INSERT INTO t1 VALUES (73,0,NULL,'qimibnvz',NULL,-160);
+INSERT INTO t1 VALUES (NULL,0,NULL,'i',NULL,NULL);
+INSERT INTO t1 VALUES (29652,0,NULL,'vzudcicgutpkrnsuq',NULL,117);
+INSERT INTO t1 VALUES (-8160,0,NULL,'Alabama',NULL,380);
+INSERT INTO t1 VALUES (28910,0,NULL,'slow',NULL,-720);
+INSERT INTO t1 VALUES (23824,0,NULL,'d',NULL,0);
+INSERT INTO t1 VALUES (12,0,NULL,'wake',NULL,-328);
+INSERT INTO t1 VALUES (9,0,NULL,'p',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'tpkrnsuqdzqjvnnesqqprogbfwnjvymzpewbtuefqwbjzvynkwcko',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'krnsuqdzqjvnnesqq',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'r',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'nsuqdzqjvnnesqqprogbfwnjvymzpewb',NULL,264);
+INSERT INTO t1 VALUES (30,0,NULL,'qdzqjvnnesqqprogbfw',NULL,749);
+INSERT INTO t1 VALUES (NULL,0,NULL,'t',NULL,NULL);
+INSERT INTO t1 VALUES (250,0,NULL,'qj',NULL,736);
+INSERT INTO t1 VALUES (0,0,NULL,'South Carolina',NULL,113);
+INSERT INTO t1 VALUES (NULL,0,NULL,'l',NULL,532);
+INSERT INTO t1 VALUES (29641,0,NULL,'sqqprogbfwnjvymzpewbtuefqwbjzvynkwckorhjvecyethcprwnxptf',NULL,9);
+INSERT INTO t1 VALUES (0,0,NULL,'qprogbfwnjvymzpewbtuefqwbjzvynkwckor',NULL,491);
+INSERT INTO t1 VALUES (4,0,NULL,'ogbfwnjvymzpewbtuefqwbjzvynkwckorhjvecyethcprwnxpt',NULL,987);
+INSERT INTO t1 VALUES (-164,0,NULL,'i',NULL,2);
+INSERT INTO t1 VALUES (18056,0,NULL,'pair',NULL,3);
+INSERT INTO t1 VALUES (7,0,NULL,'appointment',NULL,5);
+INSERT INTO t1 VALUES (6,0,NULL,'n',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'Massachusetts',NULL,-832);
+INSERT INTO t1 VALUES (32767,0,NULL,'m',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'zpewbtuefqwbjzvynkwckorh',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'announcement',NULL,3);
+INSERT INTO t1 VALUES (9,0,NULL,'e',NULL,864);
+INSERT INTO t1 VALUES (54,0,NULL,'f',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'beard',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'jungle',NULL,5);
+INSERT INTO t1 VALUES (32767,0,NULL,'South Dakota',NULL,8);
+INSERT INTO t1 VALUES (23375,0,NULL,'s',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Idaho',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'b',NULL,0);
+INSERT INTO t1 VALUES (28335,0,NULL,'qw',NULL,NULL);
+INSERT INTO t1 VALUES (147,0,NULL,'jzvynkwckorhjvecyethcprwnxptfrrcftpelmjjhwzgdgqxaeqgknlz',NULL,16);
+INSERT INTO t1 VALUES (32767,0,NULL,'Texas',NULL,184);
+INSERT INTO t1 VALUES (NULL,0,NULL,'amazing',NULL,0);
+INSERT INTO t1 VALUES (176,0,NULL,'ckorhjvecyethcprwnxptfrrcftpelmjjhwzgdgqxaeqgknlzzhcl',NULL,219);
+INSERT INTO t1 VALUES (5824,0,NULL,'rhjvecyethcprwnxptfrrcftpelmjjhwzgdgqxaeqgknlzz',NULL,8);
+INSERT INTO t1 VALUES (7,0,NULL,'jvecyethcprwnxp',NULL,NULL);
+INSERT INTO t1 VALUES (31315,0,NULL,'k',NULL,0);
+INSERT INTO t1 VALUES (6,0,NULL,'y',NULL,-472);
+INSERT INTO t1 VALUES (1,0,NULL,'Wisconsin',NULL,-208);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Louisiana',NULL,928);
+INSERT INTO t1 VALUES (9,0,NULL,'d',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'giant',NULL,505);
+INSERT INTO t1 VALUES (NULL,0,NULL,'xptfrrcftpelmjjhwzgdgqxaeqgknlzzhclsosqpyoeakxhqnjaa',NULL,941);
+INSERT INTO t1 VALUES (NULL,0,NULL,'w',NULL,0);
+INSERT INTO t1 VALUES (6693,0,NULL,'Ohio',NULL,3);
+INSERT INTO t1 VALUES (182,0,NULL,'Delaware',NULL,119);
+INSERT INTO t1 VALUES (26419,0,NULL,'tp',NULL,0);
+INSERT INTO t1 VALUES (77,0,NULL,'elmjjhwzgdgqxaeqgknlzzhc',NULL,227);
+INSERT INTO t1 VALUES (NULL,0,NULL,'m',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'f',NULL,653);
+INSERT INTO t1 VALUES (5,0,NULL,'how',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'pick',NULL,-128);
+INSERT INTO t1 VALUES (21683,0,NULL,'Missouri',NULL,135);
+INSERT INTO t1 VALUES (27244,0,NULL,'q',NULL,155);
+INSERT INTO t1 VALUES (0,0,NULL,'Delaware',NULL,309);
+INSERT INTO t1 VALUES (0,0,NULL,'eqgknlzzhclsosqpyoeakxhqnjaagzutblkgqduiopczwkjkkzjqg',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'failure',NULL,800);
+INSERT INTO t1 VALUES (0,0,NULL,'Rhode Island',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'h',NULL,NULL);
+INSERT INTO t1 VALUES (10453,0,NULL,'Oregon',NULL,0);
+INSERT INTO t1 VALUES (4,0,NULL,'b',NULL,-648);
+INSERT INTO t1 VALUES (0,0,NULL,'s',NULL,104);
+INSERT INTO t1 VALUES (8,0,NULL,'qp',NULL,344);
+INSERT INTO t1 VALUES (4200,0,NULL,'pyoeakxhqnjaagzutblkgqduiopczwkjkkzjqgcnzxrfvzsgcobwhzif',NULL,86);
+INSERT INTO t1 VALUES (NULL,0,NULL,'property',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'akxhqnjaag',NULL,213);
+INSERT INTO t1 VALUES (131,0,NULL,'New Mexico',NULL,207);
+INSERT INTO t1 VALUES (NULL,0,NULL,'contest',NULL,184);
+INSERT INTO t1 VALUES (-13903,0,NULL,'decade',NULL,-96);
+INSERT INTO t1 VALUES (32767,0,NULL,'aagzutbl',NULL,395);
+INSERT INTO t1 VALUES (7,0,NULL,'like',NULL,324);
+INSERT INTO t1 VALUES (137,0,NULL,'u',NULL,0);
+INSERT INTO t1 VALUES (1,0,NULL,'b',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'g',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'duiopczwkjkkzjqgcnzxrfvzsgcobwhzifhnulqzxdrmpoeyfsifyi',NULL,-960);
+INSERT INTO t1 VALUES (86,0,NULL,'s',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'op',NULL,889);
+INSERT INTO t1 VALUES (5,0,NULL,'g',NULL,NULL);
+INSERT INTO t1 VALUES (6,0,NULL,'czwkjkkzjq',NULL,48);
+INSERT INTO t1 VALUES (195,0,NULL,'w',NULL,86);
+INSERT INTO t1 VALUES (15,0,NULL,'kkzjqgcnzxrfvzsgcobwhzifhnulqzxdrmpoeyfsifyiiycarluqadgl',NULL,0);
+INSERT INTO t1 VALUES (7366,0,NULL,'e',NULL,8);
+INSERT INTO t1 VALUES (29558,0,NULL,'j',NULL,NULL);
+INSERT INTO t1 VALUES (2268,0,NULL,'cn',NULL,9);
+INSERT INTO t1 VALUES (32767,0,NULL,'nzxrfvzsgcobwhzifhnulqzxdrmpoeyfsifyiiycarluqadgldl',NULL,866);
+INSERT INTO t1 VALUES (0,0,NULL,'zx',NULL,172);
+INSERT INTO t1 VALUES (3,0,NULL,'xrfvzsgcobwhzifhnulqzxdrmpoeyfsify',NULL,8);
+INSERT INTO t1 VALUES (NULL,0,NULL,'South Dakota',NULL,584);
+INSERT INTO t1 VALUES (32767,0,NULL,'z',NULL,0);
+INSERT INTO t1 VALUES (-7091,0,NULL,'g',NULL,5);
+INSERT INTO t1 VALUES (32767,0,NULL,'o',NULL,311);
+INSERT INTO t1 VALUES (4,0,NULL,'f',NULL,432);
+INSERT INTO t1 VALUES (116,0,NULL,'Indiana',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'boundary',NULL,2);
+INSERT INTO t1 VALUES (219,0,NULL,'n',NULL,626);
+INSERT INTO t1 VALUES (70,0,NULL,'u',NULL,7);
+INSERT INTO t1 VALUES (NULL,0,NULL,'lqz',NULL,935);
+INSERT INTO t1 VALUES (9,0,NULL,'coat',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'y',NULL,0);
+INSERT INTO t1 VALUES (6631,0,NULL,'master',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'rmpoeyfsifyii',NULL,654);
+INSERT INTO t1 VALUES (6,0,NULL,'p',NULL,24);
+INSERT INTO t1 VALUES (-30502,0,NULL,'eyfsifyiiycarluqadgldleafqwtnqxbjccqnslyksq',NULL,6);
+INSERT INTO t1 VALUES (32767,0,NULL,'r',NULL,0);
+INSERT INTO t1 VALUES (22650,0,NULL,'Ohio',NULL,152);
+INSERT INTO t1 VALUES (21205,0,NULL,'burning',NULL,14);
+INSERT INTO t1 VALUES (65,0,NULL,'condemn',NULL,200);
+INSERT INTO t1 VALUES (7,0,NULL,'fyiiycarluqadgldleafqwtnq',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'iy',NULL,242);
+INSERT INTO t1 VALUES (NULL,0,NULL,'ca',NULL,796);
+INSERT INTO t1 VALUES (8,0,NULL,'r',NULL,8);
+INSERT INTO t1 VALUES (184,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'Georgia',NULL,752);
+INSERT INTO t1 VALUES (81,0,NULL,'North Carolina',NULL,0);
+INSERT INTO t1 VALUES (-15767,0,NULL,'u',NULL,656);
+INSERT INTO t1 VALUES (3,0,NULL,'Texas',NULL,784);
+INSERT INTO t1 VALUES (12921,0,NULL,'girlfriend',NULL,49);
+INSERT INTO t1 VALUES (69,0,NULL,'n',NULL,7);
+INSERT INTO t1 VALUES (5823,0,NULL,'a',NULL,929);
+INSERT INTO t1 VALUES (245,0,NULL,'fqwtnq',NULL,100);
+INSERT INTO t1 VALUES (0,0,NULL,'w',NULL,-328);
+INSERT INTO t1 VALUES (32767,0,NULL,'tn',NULL,256);
+INSERT INTO t1 VALUES (0,0,NULL,'q',NULL,-192);
+INSERT INTO t1 VALUES (19430,0,NULL,'o',NULL,NULL);
+INSERT INTO t1 VALUES (21086,0,NULL,'producer',NULL,0);
+INSERT INTO t1 VALUES (6,0,NULL,'cq',NULL,568);
+INSERT INTO t1 VALUES (0,0,NULL,'South Dakota',NULL,253);
+INSERT INTO t1 VALUES (32767,0,NULL,'kill',NULL,129);
+INSERT INTO t1 VALUES (NULL,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (18210,0,NULL,'seal',NULL,29);
+INSERT INTO t1 VALUES (102,0,NULL,'jmxngcvwlwuvtuwmyxzulbiys',NULL,0);
+INSERT INTO t1 VALUES (29116,0,NULL,'ngcvwlwuvtuwmyxzulbiysrlgjzzendrgndm',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'vw',NULL,9);
+INSERT INTO t1 VALUES (0,0,NULL,'West Virginia',NULL,258);
+INSERT INTO t1 VALUES (32767,0,NULL,'wuvtuwmyxz',NULL,67);
+INSERT INTO t1 VALUES (32767,0,NULL,'New Hampshire',NULL,113);
+INSERT INTO t1 VALUES (0,0,NULL,'a',NULL,NULL);
+INSERT INTO t1 VALUES (7,0,NULL,'p',NULL,24);
+INSERT INTO t1 VALUES (251,0,NULL,'m',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'y',NULL,0);
+INSERT INTO t1 VALUES (31980,0,NULL,'s',NULL,989);
+INSERT INTO t1 VALUES (32767,0,NULL,'encounter',NULL,NULL);
+INSERT INTO t1 VALUES (10072,0,NULL,'laboratory',NULL,110);
+INSERT INTO t1 VALUES (64,0,NULL,'ysrlgjzzendrgndmbuqakniwwuvhdkzkpviuzhjcaeovskckoeqzaydcn',NULL,711);
+INSERT INTO t1 VALUES (33,0,NULL,'a',NULL,0);
+INSERT INTO t1 VALUES (9768,0,NULL,'rl',NULL,4);
+INSERT INTO t1 VALUES (32767,0,NULL,'Massachusetts',NULL,0);
+INSERT INTO t1 VALUES (-27608,0,NULL,'zzendrg',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'narrative',NULL,0);
+INSERT INTO t1 VALUES (32652,0,NULL,'nd',NULL,758);
+INSERT INTO t1 VALUES (-27421,0,NULL,'gndmbuqakniwwuvhdkzkp',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'Michigan',NULL,672);
+INSERT INTO t1 VALUES (63,0,NULL,'Washington',NULL,177);
+INSERT INTO t1 VALUES (32767,0,NULL,'South Dakota',NULL,NULL);
+INSERT INTO t1 VALUES (89,0,NULL,'road',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'a',NULL,161);
+INSERT INTO t1 VALUES (NULL,0,NULL,'breathing',NULL,4);
+INSERT INTO t1 VALUES (-3678,0,NULL,'Georgia',NULL,0);
+INSERT INTO t1 VALUES (20068,0,NULL,'Minnesota',NULL,199);
+INSERT INTO t1 VALUES (2,0,NULL,'v',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'Pennsylvania',NULL,177);
+INSERT INTO t1 VALUES (5,0,NULL,'commonly',NULL,0);
+INSERT INTO t1 VALUES (1,0,NULL,'iuzhjcaeovskckoeqzaydc',NULL,NULL);
+INSERT INTO t1 VALUES (-28253,0,NULL,'c',NULL,362);
+INSERT INTO t1 VALUES (NULL,0,NULL,'cook',NULL,NULL);
+INSERT INTO t1 VALUES (68,0,NULL,'standard',NULL,212);
+INSERT INTO t1 VALUES (71,0,NULL,'Illinois',NULL,0);
+INSERT INTO t1 VALUES (25059,0,NULL,'d',NULL,952);
+INSERT INTO t1 VALUES (-17615,0,NULL,'d',NULL,19);
+INSERT INTO t1 VALUES (0,0,NULL,'butt',NULL,-112);
+INSERT INTO t1 VALUES (32767,0,NULL,'v',NULL,-264);
+INSERT INTO t1 VALUES (NULL,0,NULL,'missing',NULL,250);
+INSERT INTO t1 VALUES (-17641,0,NULL,'kc',NULL,105);
+INSERT INTO t1 VALUES (30903,0,NULL,'once',NULL,595);
+INSERT INTO t1 VALUES (113,0,NULL,'m',NULL,-616);
+INSERT INTO t1 VALUES (NULL,0,NULL,'za',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Alaska',NULL,318);
+INSERT INTO t1 VALUES (32767,0,NULL,'Oregon',NULL,NULL);
+INSERT INTO t1 VALUES (21013,0,NULL,'dear',NULL,0);
+INSERT INTO t1 VALUES (23803,0,NULL,'a',NULL,936);
+INSERT INTO t1 VALUES (6861,0,NULL,'c',NULL,244);
+INSERT INTO t1 VALUES (1,0,NULL,'ri',NULL,9);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New Mexico',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'xupthytmhktihnxeysankgnfqmmf',NULL,84);
+INSERT INTO t1 VALUES (59,0,NULL,'d',NULL,4);
+INSERT INTO t1 VALUES (NULL,0,NULL,'suddenly',NULL,162);
+INSERT INTO t1 VALUES (0,0,NULL,'share',NULL,202);
+INSERT INTO t1 VALUES (NULL,0,NULL,'h',NULL,0);
+INSERT INTO t1 VALUES (12334,0,NULL,'kt',NULL,0);
+INSERT INTO t1 VALUES (18729,0,NULL,'hn',NULL,311);
+INSERT INTO t1 VALUES (0,0,NULL,'ey',NULL,1);
+INSERT INTO t1 VALUES (10,0,NULL,'Virginia',NULL,0);
+INSERT INTO t1 VALUES (1167,0,NULL,'Nevada',NULL,1);
+INSERT INTO t1 VALUES (11065,0,NULL,'v',NULL,30);
+INSERT INTO t1 VALUES (32767,0,NULL,'Mississippi',NULL,96);
+INSERT INTO t1 VALUES (5376,0,NULL,'g',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'q',NULL,161);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hozhvbkimrkwyfogyxqgovowrlzdlkn',NULL,145);
+INSERT INTO t1 VALUES (53,0,NULL,'z',NULL,NULL);
+INSERT INTO t1 VALUES (3,0,NULL,'Connecticut',NULL,0);
+INSERT INTO t1 VALUES (-1242,0,NULL,'v',NULL,711);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Kansas',NULL,NULL);
+INSERT INTO t1 VALUES (3,0,NULL,'q',NULL,0);
+INSERT INTO t1 VALUES (-7994,0,NULL,'rkwyfogyxqgovowrlzdlkngplowqyzdunpamanuewqasgpjuajeyvbeqhywn',NULL,426);
+INSERT INTO t1 VALUES (NULL,0,NULL,'yfogyxqgovowrlzdlkngplowqyzdunpamanuewqasgpjuajeyv',NULL,6);
+INSERT INTO t1 VALUES (55,0,NULL,'o',NULL,73);
+INSERT INTO t1 VALUES (NULL,0,NULL,'qgovowrlzdlk',NULL,89);
+INSERT INTO t1 VALUES (32767,0,NULL,'ovowrlzdlkngp',NULL,1);
+INSERT INTO t1 VALUES (0,0,NULL,'poll',NULL,73);
+INSERT INTO t1 VALUES (15368,0,NULL,'Kansas',NULL,0);
+INSERT INTO t1 VALUES (-11422,0,NULL,'zdlkngplow',NULL,9);
+INSERT INTO t1 VALUES (-8890,0,NULL,'kngplowqyzdunpamanuewqasgpjuajeyvbeqhywnkzbtgviyukxz',NULL,685);
+INSERT INTO t1 VALUES (2184,0,NULL,'ng',NULL,3);
+INSERT INTO t1 VALUES (0,0,NULL,'rider',NULL,-448);
+INSERT INTO t1 VALUES (3,0,NULL,'s',NULL,227);
+INSERT INTO t1 VALUES (NULL,0,NULL,'true',NULL,1);
+INSERT INTO t1 VALUES (0,0,NULL,'d',NULL,274);
+INSERT INTO t1 VALUES (9689,0,NULL,'suite',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'Michigan',NULL,2);
+INSERT INTO t1 VALUES (-30937,0,NULL,'n',NULL,202);
+INSERT INTO t1 VALUES (NULL,0,NULL,'g',NULL,22);
+INSERT INTO t1 VALUES (32767,0,NULL,'w',NULL,147);
+INSERT INTO t1 VALUES (217,0,NULL,'d',NULL,461);
+INSERT INTO t1 VALUES (6058,0,NULL,'a',NULL,432);
+INSERT INTO t1 VALUES (-2853,0,NULL,'sg',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'n',NULL,196);
+INSERT INTO t1 VALUES (8,0,NULL,'j',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'j',NULL,974);
+INSERT INTO t1 VALUES (0,0,NULL,'industry',NULL,0);
+INSERT INTO t1 VALUES (-8236,0,NULL,'d',NULL,24);
+INSERT INTO t1 VALUES (NULL,0,NULL,'qh',NULL,NULL);
+INSERT INTO t1 VALUES (26313,0,NULL,'California',NULL,836);
+INSERT INTO t1 VALUES (0,0,NULL,'ywnkzbtgviyukxzdxkwj',NULL,NULL);
+INSERT INTO t1 VALUES (22547,0,NULL,'zbtgviyukxzdxkwjxmyiszwsexxwhejgdbsainxfsu',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'Wyoming',NULL,-696);
+INSERT INTO t1 VALUES (411,0,NULL,'credit',NULL,798);
+INSERT INTO t1 VALUES (1,0,NULL,'v',NULL,231);
+INSERT INTO t1 VALUES (4,0,NULL,'there',NULL,156);
+INSERT INTO t1 VALUES (-2887,0,NULL,'Illinois',NULL,889);
+INSERT INTO t1 VALUES (4,0,NULL,'yukxzdxkwjxmyiszwsexxwhejgdbsainxfsuurwwueiuzlljraimezc',NULL,-128);
+INSERT INTO t1 VALUES (0,0,NULL,'q',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'xz',NULL,296);
+INSERT INTO t1 VALUES (8,0,NULL,'d',NULL,2);
+INSERT INTO t1 VALUES (19143,0,NULL,'ysuamdortdfpeqhchat',NULL,1);
+INSERT INTO t1 VALUES (128,0,NULL,'unknown',NULL,-864);
+INSERT INTO t1 VALUES (49,0,NULL,'ortdfpeqhchatthkorvzlyvcemotaanbknuuoisfyggsebeowudp',NULL,1);
+INSERT INTO t1 VALUES (NULL,0,NULL,'North Carolina',NULL,8);
+INSERT INTO t1 VALUES (-17574,0,NULL,'tdfpeqhchatthkorvzlyvcemotaanbknuuoisfyggsebeowudpihwiusfzabegk',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'f',NULL,137);
+INSERT INTO t1 VALUES (-13055,0,NULL,'qh',NULL,209);
+INSERT INTO t1 VALUES (NULL,0,NULL,'a',NULL,165);
+INSERT INTO t1 VALUES (127,0,NULL,'hatthkorvzlyvcemotaanbkn',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'casualty',NULL,-824);
+INSERT INTO t1 VALUES (189,0,NULL,'w',NULL,850);
+INSERT INTO t1 VALUES (0,0,NULL,'th',NULL,872);
+INSERT INTO t1 VALUES (7,0,NULL,'b',NULL,103);
+INSERT INTO t1 VALUES (11552,0,NULL,'r',NULL,584);
+INSERT INTO t1 VALUES (7,0,NULL,'halfway',NULL,-544);
+INSERT INTO t1 VALUES (246,0,NULL,'peak',NULL,0);
+INSERT INTO t1 VALUES (2218,0,NULL,'d',NULL,0);
+INSERT INTO t1 VALUES (26017,0,NULL,'emotaanbknuuoisfyggsebeowudpihwiusfzabegktdhkddnhpuliqiao',NULL,3);
+INSERT INTO t1 VALUES (32767,0,NULL,'killing',NULL,NULL);
+INSERT INTO t1 VALUES (-18822,0,NULL,'Hawaii',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'New Jersey',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'Oklahoma',NULL,344);
+INSERT INTO t1 VALUES (NULL,0,NULL,'nuuoisfyggsebeowudpihwiusfzabegktdhkddnhpul',NULL,896);
+INSERT INTO t1 VALUES (2,0,NULL,'approval',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'v',NULL,117);
+INSERT INTO t1 VALUES (0,0,NULL,'w',NULL,525);
+INSERT INTO t1 VALUES (8,0,NULL,'uoisfyggseb',NULL,231);
+INSERT INTO t1 VALUES (0,0,NULL,'Oklahoma',NULL,36);
+INSERT INTO t1 VALUES (NULL,0,NULL,'p',NULL,-312);
+INSERT INTO t1 VALUES (0,0,NULL,'South Carolina',NULL,5);
+INSERT INTO t1 VALUES (127,0,NULL,'n',NULL,198);
+INSERT INTO t1 VALUES (175,0,NULL,'ebeowudpihwiusfzabegktdhkddnhpuliq',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'beowudpihwiusfzabegktdhkddnhp',NULL,0);
+INSERT INTO t1 VALUES (145,0,NULL,'e',NULL,888);
+INSERT INTO t1 VALUES (-26393,0,NULL,'recall',NULL,172);
+INSERT INTO t1 VALUES (32767,0,NULL,'Massachusetts',NULL,210);
+INSERT INTO t1 VALUES (125,0,NULL,'hwiusfzabegktdhkddnhpuliqiaocxuasqfm',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'wi',NULL,132);
+INSERT INTO t1 VALUES (208,0,NULL,'b',NULL,174);
+INSERT INTO t1 VALUES (-2811,0,NULL,'Michigan',NULL,35);
+INSERT INTO t1 VALUES (31649,0,NULL,'fz',NULL,817);
+INSERT INTO t1 VALUES (NULL,0,NULL,'b',NULL,100);
+INSERT INTO t1 VALUES (32767,0,NULL,'k',NULL,224);
+INSERT INTO t1 VALUES (119,0,NULL,'t',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'be',NULL,NULL);
+INSERT INTO t1 VALUES (9,0,NULL,'communication',NULL,960);
+INSERT INTO t1 VALUES (3,0,NULL,'concrete',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'z',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'uliqiaocxuasqfmrtqzapk',NULL,115);
+INSERT INTO t1 VALUES (10801,0,NULL,'Utah',NULL,473);
+INSERT INTO t1 VALUES (0,0,NULL,'i',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Delaware',NULL,0);
+INSERT INTO t1 VALUES (20394,0,NULL,'input',NULL,0);
+INSERT INTO t1 VALUES (-7220,0,NULL,'Minnesota',NULL,214);
+INSERT INTO t1 VALUES (11769,0,NULL,'o',NULL,176);
+INSERT INTO t1 VALUES (0,0,NULL,'a',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'q',NULL,330);
+INSERT INTO t1 VALUES (NULL,0,NULL,'loyal',NULL,4);
+INSERT INTO t1 VALUES (28380,0,NULL,'p',NULL,721);
+INSERT INTO t1 VALUES (0,0,NULL,'zapkkyoihc',NULL,NULL);
+INSERT INTO t1 VALUES (141,0,NULL,'kkyoihcjkajdhiiuoamcqdozgdlrctoxousgtwbkorqhjxntnwvkmnpma',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'ky',NULL,-784);
+INSERT INTO t1 VALUES (25414,0,NULL,'yoihcjkajdhiiuoamcqdozgdl',NULL,NULL);
+INSERT INTO t1 VALUES (-23163,0,NULL,'h',NULL,720);
+INSERT INTO t1 VALUES (7,0,NULL,'n',NULL,928);
+INSERT INTO t1 VALUES (3,0,NULL,'kaj',NULL,NULL);
+INSERT INTO t1 VALUES (145,0,NULL,'draft',NULL,88);
+INSERT INTO t1 VALUES (5,0,NULL,'b',NULL,49);
+INSERT INTO t1 VALUES (4,0,NULL,'dhiiuoamcqdozgdlrctoxou',NULL,0);
+INSERT INTO t1 VALUES (171,0,NULL,'iu',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'mc',NULL,384);
+INSERT INTO t1 VALUES (4,0,NULL,'Illinois',NULL,0);
+INSERT INTO t1 VALUES (6,0,NULL,'etc',NULL,104);
+INSERT INTO t1 VALUES (NULL,0,NULL,'v',NULL,968);
+INSERT INTO t1 VALUES (7,0,NULL,'rctoxousgtwbkorqhjxntnwvkmnpmazmeyarrywowwntwuedjsu',NULL,NULL);
+INSERT INTO t1 VALUES (57,0,NULL,'voting',NULL,9);
+INSERT INTO t1 VALUES (26320,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'x',NULL,5);
+INSERT INTO t1 VALUES (7,0,NULL,'us',NULL,251);
+INSERT INTO t1 VALUES (3,0,NULL,'twbkorqhjxn',NULL,334);
+INSERT INTO t1 VALUES (9,0,NULL,'copy',NULL,563);
+INSERT INTO t1 VALUES (0,0,NULL,'North Carolina',NULL,0);
+INSERT INTO t1 VALUES (249,0,NULL,'Arkansas',NULL,114);
+INSERT INTO t1 VALUES (152,0,NULL,'hjxntnwvkmnpmazmeyarrywowwntwuedjs',NULL,7);
+INSERT INTO t1 VALUES (0,0,NULL,'xntnwvkmnpmazmeyarrywowwntwue',NULL,23);
+INSERT INTO t1 VALUES (28399,0,NULL,'tnwvkmnpmazmeyarr',NULL,914);
+INSERT INTO t1 VALUES (32767,0,NULL,'Iowa',NULL,0);
+INSERT INTO t1 VALUES (43,0,NULL,'n',NULL,8);
+INSERT INTO t1 VALUES (-18416,0,NULL,'maximum',NULL,190);
+INSERT INTO t1 VALUES (169,0,NULL,'Louisiana',NULL,0);
+INSERT INTO t1 VALUES (14,0,NULL,'q',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'n',NULL,86);
+INSERT INTO t1 VALUES (0,0,NULL,'k',NULL,-912);
+INSERT INTO t1 VALUES (NULL,0,NULL,'rr',NULL,368);
+INSERT INTO t1 VALUES (32767,0,NULL,'g',NULL,768);
+INSERT INTO t1 VALUES (3,0,NULL,'pickup',NULL,8);
+INSERT INTO t1 VALUES (0,0,NULL,'honest',NULL,34);
+INSERT INTO t1 VALUES (16895,0,NULL,'so',NULL,888);
+INSERT INTO t1 VALUES (32767,0,NULL,'e',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'play',NULL,82);
+INSERT INTO t1 VALUES (12622,0,NULL,'m',NULL,42);
+INSERT INTO t1 VALUES (0,0,NULL,'ue',NULL,0);
+INSERT INTO t1 VALUES (2,0,NULL,'djsuvvuntfauimqchxjgbzfiambcxhvmtltykjwu',NULL,NULL);
+INSERT INTO t1 VALUES (210,0,NULL,'su',NULL,77);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Florida',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'Arkansas',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'untfauimqchxjgbzfia',NULL,3);
+INSERT INTO t1 VALUES (29576,0,NULL,'Arkansas',NULL,980);
+INSERT INTO t1 VALUES (227,0,NULL,'u',NULL,520);
+INSERT INTO t1 VALUES (3,0,NULL,'imqchxjgbzfiambcxhvmtltykjwulfefqfiykyhqozcnbtzpxonitsw',NULL,-136);
+INSERT INTO t1 VALUES (NULL,0,NULL,'chx',NULL,1);
+INSERT INTO t1 VALUES (5537,0,NULL,'Mississippi',NULL,872);
+INSERT INTO t1 VALUES (0,0,NULL,'jgbzfiambcxhvmtl',NULL,-728);
+INSERT INTO t1 VALUES (229,0,NULL,'bzfiambcxhvmtltykjwulfefqfiykyhqozcnbtzpxonits',NULL,211);
+INSERT INTO t1 VALUES (-16943,0,NULL,'f',NULL,641);
+INSERT INTO t1 VALUES (6,0,NULL,'q',NULL,7);
+INSERT INTO t1 VALUES (1066,0,NULL,'buy',NULL,NULL);
+INSERT INTO t1 VALUES (9,0,NULL,'k',NULL,952);
+INSERT INTO t1 VALUES (11079,0,NULL,'g',NULL,0);
+INSERT INTO t1 VALUES (2,0,NULL,'xh',NULL,NULL);
+INSERT INTO t1 VALUES (5,0,NULL,'mtltykjwulfefqfiykyhqozcn',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'w',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'a',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'influential',NULL,8);
+INSERT INTO t1 VALUES (-26136,0,NULL,'u',NULL,460);
+INSERT INTO t1 VALUES (10308,0,NULL,'lfefqfiykyhqozcnbtzpxonitswxmkoaagmmpxhyefkvhynit',NULL,383);
+INSERT INTO t1 VALUES (6,0,NULL,'fq',NULL,800);
+INSERT INTO t1 VALUES (9,0,NULL,'x',NULL,19);
+INSERT INTO t1 VALUES (0,0,NULL,'y',NULL,0);
+INSERT INTO t1 VALUES (197,0,NULL,'yhqozcnbtzpxonitswxmkoaagmmpxhyefkvhynitxebnkuj',NULL,28);
+INSERT INTO t1 VALUES (0,0,NULL,'Nevada',NULL,746);
+INSERT INTO t1 VALUES (233,0,NULL,'Vermont',NULL,0);
+INSERT INTO t1 VALUES (34,0,NULL,'s',NULL,2);
+INSERT INTO t1 VALUES (32767,0,NULL,'cnbtzpxonitswxmkoaagmmpxhyefkvhynitxebnkujdffizkgzsobnkapdhsgi',NULL,NULL);
+INSERT INTO t1 VALUES (27288,0,NULL,'btzpxonitswxmkoaagmmpxhyefkvhynitxebnkujdffizkgzsobnkapd',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'m',NULL,4);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Nebraska',NULL,NULL);
+INSERT INTO t1 VALUES (-27150,0,NULL,'o',NULL,242);
+INSERT INTO t1 VALUES (0,0,NULL,'explain',NULL,15);
+INSERT INTO t1 VALUES (26756,0,NULL,'x',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'than',NULL,9);
+INSERT INTO t1 VALUES (NULL,0,NULL,'session',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'tswxmkoaagmmpxhyefkvhynitxebnkujdffizkgzsobnkapdhsgiyimagniglns',NULL,587);
+INSERT INTO t1 VALUES (45,0,NULL,'pursue',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'m',NULL,132);
+INSERT INTO t1 VALUES (9,0,NULL,'Idaho',NULL,4);
+INSERT INTO t1 VALUES (1,0,NULL,'flavor',NULL,139);
+INSERT INTO t1 VALUES (0,0,NULL,'offender',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'gmmpxhyefkvhynitxebnkujdffizkgzsobnkapdhsgiyimagnigl',NULL,-544);
+INSERT INTO t1 VALUES (87,0,NULL,'mmpxhyefkvhyn',NULL,4);
+INSERT INTO t1 VALUES (159,0,NULL,'pxhyefkvhynitxebnkujdffizkgzsobnkapdhsgi',NULL,0);
+INSERT INTO t1 VALUES (242,0,NULL,'hy',NULL,113);
+INSERT INTO t1 VALUES (30,0,NULL,'e',NULL,325);
+INSERT INTO t1 VALUES (NULL,0,NULL,'kv',NULL,-624);
+INSERT INTO t1 VALUES (0,0,NULL,'ynitxebnkujdffizkgzsobnkapdhsgiyimagniglnsaocuagnv',NULL,708);
+INSERT INTO t1 VALUES (227,0,NULL,'Utah',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'Kentucky',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hard',NULL,3);
+INSERT INTO t1 VALUES (8,0,NULL,'c',NULL,NULL);
+INSERT INTO t1 VALUES (4,0,NULL,'i',NULL,0);
+INSERT INTO t1 VALUES (174,0,NULL,'nk',NULL,188);
+INSERT INTO t1 VALUES (106,0,NULL,'spectacular',NULL,2);
+INSERT INTO t1 VALUES (0,0,NULL,'quiet',NULL,586);
+INSERT INTO t1 VALUES (155,0,NULL,'chop',NULL,237);
+INSERT INTO t1 VALUES (1,0,NULL,'undergraduate',NULL,464);
+INSERT INTO t1 VALUES (NULL,0,NULL,'iz',NULL,-224);
+INSERT INTO t1 VALUES (32767,0,NULL,'Maryland',NULL,619);
+INSERT INTO t1 VALUES (NULL,0,NULL,'kgzsobnkapdhsgiyimagniglnsaocuagnvqciwxiiquuzmfzfffty',NULL,-200);
+INSERT INTO t1 VALUES (8,0,NULL,'so',NULL,581);
+INSERT INTO t1 VALUES (1,0,NULL,'nkapdhsgiyimagniglnsaocuagnvqciwxiiquuzmfzffft',NULL,NULL);
+INSERT INTO t1 VALUES (2,0,NULL,'b',NULL,0);
+INSERT INTO t1 VALUES (-22001,0,NULL,'corridor',NULL,NULL);
+INSERT INTO t1 VALUES (4,0,NULL,'sgiyimagniglnsaocuagnvqciwxiiquuzmfzffftyxvxxv',NULL,-24);
+INSERT INTO t1 VALUES (122,0,NULL,'g',NULL,624);
+INSERT INTO t1 VALUES (0,0,NULL,'makeup',NULL,NULL);
+INSERT INTO t1 VALUES (32,0,NULL,'chest',NULL,-680);
+INSERT INTO t1 VALUES (3,0,NULL,'w',NULL,63);
+INSERT INTO t1 VALUES (224,0,NULL,'Utah',NULL,800);
+INSERT INTO t1 VALUES (194,0,NULL,'ni',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'i',NULL,3);
+INSERT INTO t1 VALUES (28,0,NULL,'ln',NULL,NULL);
+INSERT INTO t1 VALUES (-27045,0,NULL,'protection',NULL,349);
+INSERT INTO t1 VALUES (4,0,NULL,'ns',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'Tennessee',NULL,0);
+INSERT INTO t1 VALUES (-21629,0,NULL,'c',NULL,4);
+INSERT INTO t1 VALUES (28847,0,NULL,'g',NULL,46);
+INSERT INTO t1 VALUES (44,0,NULL,'nvqciwxiiquuzmfzffftyxvxxvnsfpxpqdny',NULL,220);
+INSERT INTO t1 VALUES (4,0,NULL,'s',NULL,26);
+INSERT INTO t1 VALUES (77,0,NULL,'abandon',NULL,-848);
+INSERT INTO t1 VALUES (-27160,0,NULL,'m',NULL,2);
+INSERT INTO t1 VALUES (0,0,NULL,'qciwxiiquuzmfzffftyxvxxvnsfpxpqdnyzusaefncvuyxnqbwedgpprpgf',NULL,55);
+INSERT INTO t1 VALUES (32767,0,NULL,'w',NULL,192);
+INSERT INTO t1 VALUES (0,0,NULL,'could',NULL,0);
+INSERT INTO t1 VALUES (6,0,NULL,'charge',NULL,-408);
+INSERT INTO t1 VALUES (-22785,0,NULL,'North Dakota',NULL,-320);
+INSERT INTO t1 VALUES (11582,0,NULL,'d',NULL,945);
+INSERT INTO t1 VALUES (NULL,0,NULL,'mf',NULL,0);
+INSERT INTO t1 VALUES (126,0,NULL,'routine',NULL,1);
+INSERT INTO t1 VALUES (0,0,NULL,'zffftyxvxxvnsfpxpqdnyzu',NULL,928);
+INSERT INTO t1 VALUES (16638,0,NULL,'necessity',NULL,3);
+INSERT INTO t1 VALUES (32431,0,NULL,'fty',NULL,9);
+INSERT INTO t1 VALUES (0,0,NULL,'Maryland',NULL,136);
+INSERT INTO t1 VALUES (NULL,0,NULL,'yxvxxvnsfpxpqdnyzusaefncvuyxnqbwedgpp',NULL,3);
+INSERT INTO t1 VALUES (0,0,NULL,'vxxvnsfpxpqdnyzusaefncvuyxnqbwedgpprpgfqyh',NULL,3);
+INSERT INTO t1 VALUES (32767,0,NULL,'anxiety',NULL,580);
+INSERT INTO t1 VALUES (32767,0,NULL,'defensive',NULL,27);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Pennsylvania',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'l',NULL,2);
+INSERT INTO t1 VALUES (143,0,NULL,'b',NULL,31);
+INSERT INTO t1 VALUES (0,0,NULL,'f',NULL,NULL);
+INSERT INTO t1 VALUES (9,0,NULL,'x',NULL,-528);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Oklahoma',NULL,0);
+INSERT INTO t1 VALUES (42,0,NULL,'p',NULL,67);
+INSERT INTO t1 VALUES (3,0,NULL,'Vermont',NULL,9);
+INSERT INTO t1 VALUES (58,0,NULL,'ny',NULL,0);
+INSERT INTO t1 VALUES (135,0,NULL,'saefncvuyxnqbwedgpprpgfqyhmoqdmwmiwrgehdnteyvlymyccrdlobsqnvuhm',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'West Virginia',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'efncvuyxnqbwedgpprpgfqyhmoqdmwmiwrgehdnteyvlymyccrdlobs',NULL,568);
+INSERT INTO t1 VALUES (1,0,NULL,'l',NULL,6);
+INSERT INTO t1 VALUES (46,0,NULL,'cvuyxnqbwedgpprpgfqyhmoq',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'uyxnqbwed',NULL,928);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Minnesota',NULL,0);
+INSERT INTO t1 VALUES (31825,0,NULL,'Illinois',NULL,NULL);
+INSERT INTO t1 VALUES (9,0,NULL,'South Dakota',NULL,0);
+INSERT INTO t1 VALUES (162,0,NULL,'t',NULL,74);
+INSERT INTO t1 VALUES (99,0,NULL,'dg',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'pr',NULL,0);
+INSERT INTO t1 VALUES (7,0,NULL,'officially',NULL,-712);
+INSERT INTO t1 VALUES (12140,0,NULL,'p',NULL,0);
+INSERT INTO t1 VALUES (1291,0,NULL,'yh',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'h',NULL,115);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Colorado',NULL,2);
+INSERT INTO t1 VALUES (32767,0,NULL,'k',NULL,3);
+INSERT INTO t1 VALUES (0,0,NULL,'miwrgehdnteyvlymyccrdlobsqnvuhmgyvukmp',NULL,386);
+INSERT INTO t1 VALUES (NULL,0,NULL,'North Dakota',NULL,0);
+INSERT INTO t1 VALUES (-20852,0,NULL,'g',NULL,912);
+INSERT INTO t1 VALUES (0,0,NULL,'dnteyvl',NULL,54);
+INSERT INTO t1 VALUES (7,0,NULL,'tey',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'yvlymyccrdlobsqnvuhmg',NULL,88);
+INSERT INTO t1 VALUES (0,0,NULL,'y',NULL,NULL);
+INSERT INTO t1 VALUES (156,0,NULL,'my',NULL,361);
+INSERT INTO t1 VALUES (32767,0,NULL,'f',NULL,227);
+INSERT INTO t1 VALUES (NULL,0,NULL,'California',NULL,915);
+INSERT INTO t1 VALUES (179,0,NULL,'Ohio',NULL,-968);
+INSERT INTO t1 VALUES (117,0,NULL,'lobsqnvuhmgyvukmprhonjoiawllmhf',NULL,201);
+INSERT INTO t1 VALUES (-27545,0,NULL,'m',NULL,109);
+INSERT INTO t1 VALUES (251,0,NULL,'q',NULL,762);
+INSERT INTO t1 VALUES (NULL,0,NULL,'royal',NULL,0);
+INSERT INTO t1 VALUES (31557,0,NULL,'Montana',NULL,398);
+INSERT INTO t1 VALUES (6,0,NULL,'gyvukmprhonjoiawllmhfdjzwfflnops',NULL,100);
+INSERT INTO t1 VALUES (27311,0,NULL,'vu',NULL,990);
+INSERT INTO t1 VALUES (0,0,NULL,'North Carolina',NULL,992);
+INSERT INTO t1 VALUES (790,0,NULL,'mprhonjoiawllmhfdjzwfflnopswkconfvcfgxnaubjgqaouxnruacblp',NULL,911);
+INSERT INTO t1 VALUES (99,0,NULL,'glass',NULL,874);
+INSERT INTO t1 VALUES (3,0,NULL,'roman',NULL,821);
+INSERT INTO t1 VALUES (6,0,NULL,'rhonjoiawllmhfdjzwfflnopswkconfvcfgxnaubjgqaouxn',NULL,-8);
+INSERT INTO t1 VALUES (94,0,NULL,'Wisconsin',NULL,207);
+INSERT INTO t1 VALUES (0,0,NULL,'Alabama',NULL,2);
+INSERT INTO t1 VALUES (6,0,NULL,'suspect',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'aw',NULL,-520);
+INSERT INTO t1 VALUES (9,0,NULL,'lmhfdjzwfflnopswkconfvcfgxnaubjgqaouxnruacblpwurbz',NULL,3);
+INSERT INTO t1 VALUES (9568,0,NULL,'g',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'djzwfflnopswkconfvcfgxnaubjgqaouxnruacblpwurbzdlpncouones',NULL,880);
+INSERT INTO t1 VALUES (7001,0,NULL,'m',NULL,306);
+INSERT INTO t1 VALUES (23109,0,NULL,'s',NULL,448);
+INSERT INTO t1 VALUES (32767,0,NULL,'introduce',NULL,8);
+INSERT INTO t1 VALUES (1,0,NULL,'fflnopswkconfvcfgxnaubjgqaouxnru',NULL,-544);
+INSERT INTO t1 VALUES (214,0,NULL,'l',NULL,56);
+INSERT INTO t1 VALUES (5,0,NULL,'Kentucky',NULL,259);
+INSERT INTO t1 VALUES (-757,0,NULL,'p',NULL,192);
+INSERT INTO t1 VALUES (NULL,0,NULL,'wkconfvcfgxnaubjgqaouxnruacblpwurbzdlpncouonesd',NULL,8);
+INSERT INTO t1 VALUES (0,0,NULL,'confvcfgxnaubjgqaouxnruacblpwurb',NULL,0);
+INSERT INTO t1 VALUES (-31049,0,NULL,'longtime',NULL,65);
+INSERT INTO t1 VALUES (25,0,NULL,'walking',NULL,NULL);
+INSERT INTO t1 VALUES (2393,0,NULL,'f',NULL,20);
+INSERT INTO t1 VALUES (1,0,NULL,'Oregon',NULL,438);
+INSERT INTO t1 VALUES (14610,0,NULL,'Maryland',NULL,NULL);
+INSERT INTO t1 VALUES (13039,0,NULL,'New Mexico',NULL,0);
+INSERT INTO t1 VALUES (24175,0,NULL,'naubjgqaouxnruacblpwurbzdlpncouonesdoepwzafzqjbxvwo',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'u',NULL,7);
+INSERT INTO t1 VALUES (9,0,NULL,'gqaouxnruacblpwurbzdlpncouonesdoepwza',NULL,498);
+INSERT INTO t1 VALUES (8,0,NULL,'observation',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'ouxn',NULL,132);
+INSERT INTO t1 VALUES (13366,0,NULL,'nruacblpwurbzdlpncouonesdoepwzafzqjbxvwo',NULL,287);
+INSERT INTO t1 VALUES (145,0,NULL,'uacblpwurbzdlpncouonesdoepwzafzqjbxvwoe',NULL,0);
+INSERT INTO t1 VALUES (14293,0,NULL,'c',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'institution',NULL,8);
+INSERT INTO t1 VALUES (147,0,NULL,'Maryland',NULL,0);
+INSERT INTO t1 VALUES (-31412,0,NULL,'c',NULL,-440);
+INSERT INTO t1 VALUES (0,0,NULL,'rbz',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'achieve',NULL,472);
+INSERT INTO t1 VALUES (31,0,NULL,'s',NULL,8);
+INSERT INTO t1 VALUES (5,0,NULL,'g',NULL,7);
+INSERT INTO t1 VALUES (NULL,0,NULL,'North Carolina',NULL,380);
+INSERT INTO t1 VALUES (32767,0,NULL,'t',NULL,-336);
+INSERT INTO t1 VALUES (0,0,NULL,'lpncouonesdoepwzafzqjbxvwoekkivtce',NULL,33);
+INSERT INTO t1 VALUES (0,0,NULL,'Montana',NULL,NULL);
+INSERT INTO t1 VALUES (3,0,NULL,'pncouonesdoepwzafzqjbxvwoekkivtcesl',NULL,723);
+INSERT INTO t1 VALUES (NULL,0,NULL,'u',NULL,0);
+INSERT INTO t1 VALUES (63,0,NULL,'on',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'frustrate',NULL,83);
+INSERT INTO t1 VALUES (NULL,0,NULL,'klcvzuvzzhvxqjupfbbocyvbgiwysnfjiojwzzfvdgaregnglbhd',NULL,128);
+INSERT INTO t1 VALUES (25809,0,NULL,'z',NULL,NULL);
+INSERT INTO t1 VALUES (34,0,NULL,'bonus',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'discover',NULL,NULL);
+INSERT INTO t1 VALUES (191,0,NULL,'shorts',NULL,245);
+INSERT INTO t1 VALUES (32767,0,NULL,'hungry',NULL,-944);
+INSERT INTO t1 VALUES (2,0,NULL,'o',NULL,958);
+INSERT INTO t1 VALUES (209,0,NULL,'ju',NULL,4);
+INSERT INTO t1 VALUES (-14598,0,NULL,'spot',NULL,190);
+INSERT INTO t1 VALUES (2077,0,NULL,'West Virginia',NULL,NULL);
+INSERT INTO t1 VALUES (4,0,NULL,'e',NULL,350);
+INSERT INTO t1 VALUES (-19212,0,NULL,'Louisiana',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'North Carolina',NULL,0);
+INSERT INTO t1 VALUES (60,0,NULL,'w',NULL,6);
+INSERT INTO t1 VALUES (2496,0,NULL,'Alabama',NULL,NULL);
+INSERT INTO t1 VALUES (30994,0,NULL,'s',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'h',NULL,2);
+INSERT INTO t1 VALUES (148,0,NULL,'w',NULL,87);
+INSERT INTO t1 VALUES (-28993,0,NULL,'Nebraska',NULL,5);
+INSERT INTO t1 VALUES (NULL,0,NULL,'solar',NULL,NULL);
+INSERT INTO t1 VALUES (6,0,NULL,'Delaware',NULL,440);
+INSERT INTO t1 VALUES (0,0,NULL,'io',NULL,-456);
+INSERT INTO t1 VALUES (0,0,NULL,'nonprofit',NULL,3);
+INSERT INTO t1 VALUES (94,0,NULL,'p',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'New Jersey',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'badly',NULL,-976);
+INSERT INTO t1 VALUES (0,0,NULL,'vdgaregnglbhdyuz',NULL,-512);
+INSERT INTO t1 VALUES (53,0,NULL,'y',NULL,3);
+INSERT INTO t1 VALUES (1334,0,NULL,'re',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'gnglbhdyuzefxyqyvzgqengmivoxdyeps',NULL,91);
+INSERT INTO t1 VALUES (32767,0,NULL,'r',NULL,170);
+INSERT INTO t1 VALUES (0,0,NULL,'Delaware',NULL,255);
+INSERT INTO t1 VALUES (83,0,NULL,'hd',NULL,811);
+INSERT INTO t1 VALUES (-3048,0,NULL,'Maryland',NULL,-704);
+INSERT INTO t1 VALUES (32767,0,NULL,'resist',NULL,80);
+INSERT INTO t1 VALUES (32767,0,NULL,'u',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'uzefxyqyvzgqengmivoxdyepsuxvtphayypszsnjuol',NULL,496);
+INSERT INTO t1 VALUES (32767,0,NULL,'Hawaii',NULL,812);
+INSERT INTO t1 VALUES (32767,0,NULL,'Missouri',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'yvzgqengmivoxdyepsuxv',NULL,0);
+INSERT INTO t1 VALUES (-14971,0,NULL,'Iowa',NULL,158);
+INSERT INTO t1 VALUES (5,0,NULL,'zgqengmivoxdyepsuxvtphayypszsnjuoldxekhknxplp',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'gqengmivoxdyepsuxvtphayypszsnjuoldx',NULL,652);
+INSERT INTO t1 VALUES (0,0,NULL,'t',NULL,649);
+INSERT INTO t1 VALUES (0,0,NULL,'m',NULL,40);
+INSERT INTO t1 VALUES (6,0,NULL,'oxdyepsuxvtphayypszsnjuold',NULL,NULL);
+INSERT INTO t1 VALUES (4374,0,NULL,'e',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'t',NULL,168);
+INSERT INTO t1 VALUES (250,0,NULL,'yepsuxvtphayypszsnjuo',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New York',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'complete',NULL,871);
+INSERT INTO t1 VALUES (9,0,NULL,'uxvtphayy',NULL,-144);
+INSERT INTO t1 VALUES (56,0,NULL,'nod',NULL,-504);
+INSERT INTO t1 VALUES (0,0,NULL,'v',NULL,680);
+INSERT INTO t1 VALUES (181,0,NULL,'Massachusetts',NULL,322);
+INSERT INTO t1 VALUES (32767,0,NULL,'nuclear',NULL,664);
+INSERT INTO t1 VALUES (163,0,NULL,'u',NULL,117);
+INSERT INTO t1 VALUES (32767,0,NULL,'ay',NULL,-280);
+INSERT INTO t1 VALUES (11214,0,NULL,'z',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'y',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'m',NULL,822);
+INSERT INTO t1 VALUES (0,0,NULL,'California',NULL,91);
+INSERT INTO t1 VALUES (-26918,0,NULL,'date',NULL,343);
+INSERT INTO t1 VALUES (-25243,0,NULL,'reception',NULL,NULL);
+INSERT INTO t1 VALUES (210,0,NULL,'comment',NULL,4);
+INSERT INTO t1 VALUES (73,0,NULL,'w',NULL,734);
+INSERT INTO t1 VALUES (-7394,0,NULL,'j',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'j',NULL,5);
+INSERT INTO t1 VALUES (-4137,0,NULL,'Georgia',NULL,0);
+INSERT INTO t1 VALUES (140,0,NULL,'l',NULL,-880);
+INSERT INTO t1 VALUES (-12829,0,NULL,'Nebraska',NULL,0);
+INSERT INTO t1 VALUES (16211,0,NULL,'hknxplpjbfdlgldb',NULL,NULL);
+INSERT INTO t1 VALUES (14906,0,NULL,'d',NULL,218);
+INSERT INTO t1 VALUES (148,0,NULL,'x',NULL,-736);
+INSERT INTO t1 VALUES (0,0,NULL,'pl',NULL,59);
+INSERT INTO t1 VALUES (NULL,0,NULL,'x',NULL,183);
+INSERT INTO t1 VALUES (0,0,NULL,'fd',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'possibility',NULL,3);
+INSERT INTO t1 VALUES (-7506,0,NULL,'Washington',NULL,512);
+INSERT INTO t1 VALUES (32767,0,NULL,'Illinois',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'bhmxtau',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Colorado',NULL,0);
+INSERT INTO t1 VALUES (1,0,NULL,'mxta',NULL,NULL);
+INSERT INTO t1 VALUES (6,0,NULL,'m',NULL,994);
+INSERT INTO t1 VALUES (0,0,NULL,'Massachusetts',NULL,16);
+INSERT INTO t1 VALUES (-17799,0,NULL,'Massachusetts',NULL,91);
+INSERT INTO t1 VALUES (32767,0,NULL,'motion',NULL,139);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Utah',NULL,-160);
+INSERT INTO t1 VALUES (6,0,NULL,'tolerate',NULL,144);
+INSERT INTO t1 VALUES (0,0,NULL,'Florida',NULL,0);
+INSERT INTO t1 VALUES (9,0,NULL,'Vermont',NULL,178);
+INSERT INTO t1 VALUES (13228,0,NULL,'g',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'s',NULL,0);
+INSERT INTO t1 VALUES (18675,0,NULL,'dcuzmmvrllxwkmcyemoriwjoyrkbhssjesnylouaiygiodldcgwktzumjpot',NULL,130);
+INSERT INTO t1 VALUES (7,0,NULL,'Indiana',NULL,0);
+INSERT INTO t1 VALUES (1,0,NULL,'entertainment',NULL,-736);
+INSERT INTO t1 VALUES (-15594,0,NULL,'zmmvrllxwkmcyemoriwjoyrkbhssj',NULL,728);
+INSERT INTO t1 VALUES (0,0,NULL,'mvrllxwkmcyemoriwjoyrk',NULL,295);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Virginia',NULL,23);
+INSERT INTO t1 VALUES (NULL,0,NULL,'llxwkmcyemoriwjoyrkbhssjesnylouaiygiodldcgwktzumjpotwry',NULL,NULL);
+INSERT INTO t1 VALUES (840,0,NULL,'tiny',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'b',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'v',NULL,0);
+INSERT INTO t1 VALUES (4,0,NULL,'Pennsylvania',NULL,133);
+INSERT INTO t1 VALUES (0,0,NULL,'i',NULL,34);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Tennessee',NULL,157);
+INSERT INTO t1 VALUES (7375,0,NULL,'New York',NULL,124);
+INSERT INTO t1 VALUES (8,0,NULL,'e',NULL,0);
+INSERT INTO t1 VALUES (201,0,NULL,'Maine',NULL,597);
+INSERT INTO t1 VALUES (22036,0,NULL,'forty',NULL,168);
+INSERT INTO t1 VALUES (3,0,NULL,'jo',NULL,0);
+INSERT INTO t1 VALUES (16007,0,NULL,'yr',NULL,906);
+INSERT INTO t1 VALUES (NULL,0,NULL,'universe',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'jesnylouaiygiodldcgwktzumjpotwrysvhzzsophhfh',NULL,120);
+INSERT INTO t1 VALUES (0,0,NULL,'Ohio',NULL,4);
+INSERT INTO t1 VALUES (NULL,0,NULL,'sn',NULL,3);
+INSERT INTO t1 VALUES (0,0,NULL,'nylouaiygiodldcgwktzumjpotwrysvhzzsophhfhw',NULL,48);
+INSERT INTO t1 VALUES (233,0,NULL,'dissolve',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'z',NULL,45);
+INSERT INTO t1 VALUES (0,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'mentally',NULL,5);
+INSERT INTO t1 VALUES (32767,0,NULL,'b',NULL,185);
+INSERT INTO t1 VALUES (32767,0,NULL,'poor',NULL,104);
+INSERT INTO t1 VALUES (0,0,NULL,'l',NULL,2);
+INSERT INTO t1 VALUES (20709,0,NULL,'West Virginia',NULL,31);
+INSERT INTO t1 VALUES (196,0,NULL,'ie',NULL,237);
+INSERT INTO t1 VALUES (1,0,NULL,'tz',NULL,NULL);
+INSERT INTO t1 VALUES (214,0,NULL,'mj',NULL,224);
+INSERT INTO t1 VALUES (5,0,NULL,'interpretation',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'q',NULL,1);
+INSERT INTO t1 VALUES (2,0,NULL,'Colorado',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'ry',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'s',NULL,8);
+INSERT INTO t1 VALUES (1,0,NULL,'vhzzsophhfhwxrajsnelqegm',NULL,730);
+INSERT INTO t1 VALUES (-12909,0,NULL,'web',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'zz',NULL,138);
+INSERT INTO t1 VALUES (NULL,0,NULL,'New Hampshire',NULL,NULL);
+INSERT INTO t1 VALUES (56,0,NULL,'u',NULL,297);
+INSERT INTO t1 VALUES (0,0,NULL,'o',NULL,5);
+INSERT INTO t1 VALUES (32767,0,NULL,'consume',NULL,7);
+INSERT INTO t1 VALUES (21901,0,NULL,'g',NULL,0);
+INSERT INTO t1 VALUES (4,0,NULL,'f',NULL,230);
+INSERT INTO t1 VALUES (240,0,NULL,'tension',NULL,1);
+INSERT INTO t1 VALUES (0,0,NULL,'xr',NULL,3);
+INSERT INTO t1 VALUES (0,0,NULL,'h',NULL,679);
+INSERT INTO t1 VALUES (5996,0,NULL,'js',NULL,197);
+INSERT INTO t1 VALUES (-22204,0,NULL,'snelqegmghyhblwpwxfwdt',NULL,0);
+INSERT INTO t1 VALUES (29005,0,NULL,'lqegmghyhblwpwx',NULL,329);
+INSERT INTO t1 VALUES (NULL,0,NULL,'c',NULL,0);
+INSERT INTO t1 VALUES (92,0,NULL,'gm',NULL,NULL);
+INSERT INTO t1 VALUES (5022,0,NULL,'u',NULL,7);
+INSERT INTO t1 VALUES (1,0,NULL,'gh',NULL,-336);
+INSERT INTO t1 VALUES (58,0,NULL,'hyhblwpwxfwdtkjqznxsfkdilpdqhjnyyvkqbqlbighvqntgezzqyfncjcdc',NULL,NULL);
+INSERT INTO t1 VALUES (18629,0,NULL,'bl',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'availability',NULL,-968);
+INSERT INTO t1 VALUES (-17586,0,NULL,'f',NULL,347);
+INSERT INTO t1 VALUES (0,0,NULL,'d',NULL,0);
+INSERT INTO t1 VALUES (6,0,NULL,'consumer',NULL,7);
+INSERT INTO t1 VALUES (2,0,NULL,'jqznxsfkd',NULL,0);
+INSERT INTO t1 VALUES (2,0,NULL,'amazing',NULL,2);
+INSERT INTO t1 VALUES (0,0,NULL,'accompany',NULL,-720);
+INSERT INTO t1 VALUES (NULL,0,NULL,'nxsfkdilpd',NULL,92);
+INSERT INTO t1 VALUES (96,0,NULL,'f',NULL,9);
+INSERT INTO t1 VALUES (NULL,0,NULL,'dilpdqhjnyyvkqbqlbi',NULL,208);
+INSERT INTO t1 VALUES (19,0,NULL,'ribbon',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'Oklahoma',NULL,9);
+INSERT INTO t1 VALUES (22507,0,NULL,'j',NULL,NULL);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Rhode Island',NULL,473);
+INSERT INTO t1 VALUES (167,0,NULL,'Oklahoma',NULL,0);
+INSERT INTO t1 VALUES (65,0,NULL,'y',NULL,42);
+INSERT INTO t1 VALUES (NULL,0,NULL,'container',NULL,0);
+INSERT INTO t1 VALUES (NULL,0,NULL,'ql',NULL,5);
+INSERT INTO t1 VALUES (3,0,NULL,'lbighvqntgezzqyfncjcdcedujseoodxdgibhgrvxgviemzgn',NULL,NULL);
+INSERT INTO t1 VALUES (-18007,0,NULL,'suggest',NULL,0);
+INSERT INTO t1 VALUES (32767,0,NULL,'g',NULL,-88);
+INSERT INTO t1 VALUES (32767,0,NULL,'hvqntgezzqyfncjcdcedujseoodxdgibhgrvxgviemz',NULL,85);
+INSERT INTO t1 VALUES (0,0,NULL,'Oregon',NULL,584);
+INSERT INTO t1 VALUES (32767,0,NULL,'tg',NULL,128);
+INSERT INTO t1 VALUES (57,0,NULL,'ez',NULL,0);
+INSERT INTO t1 VALUES (25235,0,NULL,'Florida',NULL,0);
+INSERT INTO t1 VALUES (245,0,NULL,'Kentucky',NULL,4);
+INSERT INTO t1 VALUES (202,0,NULL,'u',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'fn',NULL,9);
+INSERT INTO t1 VALUES (30016,0,NULL,'d',NULL,0);
+INSERT INTO t1 VALUES (21837,0,NULL,'cd',NULL,6);
+INSERT INTO t1 VALUES (NULL,0,NULL,'cedujseoodxdgibhgrvxgviemzgngjtolxd',NULL,-648);
+INSERT INTO t1 VALUES (NULL,0,NULL,'jseoodxdgibhgrvxgviemzgngjtolxdrc',NULL,154);
+INSERT INTO t1 VALUES (0,0,NULL,'v',NULL,-160);
+INSERT INTO t1 VALUES (32767,0,NULL,'Oklahoma',NULL,27);
+INSERT INTO t1 VALUES (189,0,NULL,'v',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'solar',NULL,5);
+INSERT INTO t1 VALUES (3423,0,NULL,'dg',NULL,880);
+INSERT INTO t1 VALUES (10026,0,NULL,'g',NULL,68);
+INSERT INTO t1 VALUES (2786,0,NULL,'argue',NULL,NULL);
+INSERT INTO t1 VALUES (32767,0,NULL,'i',NULL,NULL);
+INSERT INTO t1 VALUES (18620,0,NULL,'Florida',NULL,197);
+INSERT INTO t1 VALUES (169,0,NULL,'Michigan',NULL,584);
+INSERT INTO t1 VALUES (NULL,0,NULL,'x',NULL,9);
+INSERT INTO t1 VALUES (-21070,0,NULL,'cemetery',NULL,NULL);
+INSERT INTO t1 VALUES (-26771,0,NULL,'Ohio',NULL,2);
+INSERT INTO t1 VALUES (9937,0,NULL,'m',NULL,321);
+INSERT INTO t1 VALUES (4659,0,NULL,'z',NULL,116);
+INSERT INTO t1 VALUES (15502,0,NULL,'n',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'y',NULL,57);
+INSERT INTO t1 VALUES (1,0,NULL,'l',NULL,70);
+INSERT INTO t1 VALUES (52,0,NULL,'y',NULL,-552);
+INSERT INTO t1 VALUES (0,0,NULL,'deem',NULL,544);
+INSERT INTO t1 VALUES (0,0,NULL,'f',NULL,9);
+INSERT INTO t1 VALUES (32767,0,NULL,'r',NULL,52);
+INSERT INTO t1 VALUES (NULL,0,NULL,'o',NULL,154);
+INSERT INTO t1 VALUES (11,0,NULL,'Rhode Island',NULL,176);
+INSERT INTO t1 VALUES (32767,0,NULL,'South Carolina',NULL,1);
+INSERT INTO t1 VALUES (32767,0,NULL,'p',NULL,672);
+INSERT INTO t1 VALUES (0,0,NULL,'u',NULL,4);
+INSERT INTO t1 VALUES (NULL,0,NULL,'positive',NULL,218);
+INSERT INTO t1 VALUES (NULL,0,NULL,'tomorrow',NULL,-48);
+INSERT INTO t1 VALUES (-30122,0,NULL,'rh',NULL,261);
+INSERT INTO t1 VALUES (4,0,NULL,'tap',NULL,NULL);
+INSERT INTO t1 VALUES (0,0,NULL,'overall',NULL,5);
+INSERT INTO t1 VALUES (0,0,NULL,'n',NULL,146);
+INSERT INTO t1 VALUES (32767,0,NULL,'sometimes',NULL,6);
+INSERT INTO t1 VALUES (0,0,NULL,'n',NULL,488);
+INSERT INTO t1 VALUES (NULL,0,NULL,'hw',NULL,NULL);
+INSERT INTO t1 VALUES (2179,0,NULL,'o',NULL,-176);
+INSERT INTO t1 VALUES (NULL,0,NULL,'Pennsylvania',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'dd',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'d',NULL,0);
+INSERT INTO t1 VALUES (160,0,NULL,'h',NULL,633);
+INSERT INTO t1 VALUES (228,0,NULL,'r',NULL,54);
+INSERT INTO t1 VALUES (0,0,NULL,'p',NULL,7);
+INSERT INTO t1 VALUES (0,0,NULL,'jr',NULL,NULL);
+INSERT INTO t1 VALUES (2,0,NULL,'q',NULL,0);
+INSERT INTO t1 VALUES (29,0,NULL,'w',NULL,184);
+INSERT INTO t1 VALUES (14801,0,NULL,'q',NULL,0);
+INSERT INTO t1 VALUES (-24663,0,NULL,'progress',NULL,270);
+INSERT INTO t1 VALUES (0,0,NULL,'w',NULL,-912);
+INSERT INTO t1 VALUES (27423,0,NULL,'ok',NULL,8);
+INSERT INTO t1 VALUES (NULL,0,NULL,'re',NULL,NULL);
+INSERT INTO t1 VALUES (29082,0,NULL,'d',NULL,2);
+INSERT INTO t1 VALUES (32767,0,NULL,'name',NULL,162);
+INSERT INTO t1 VALUES (NULL,0,NULL,'p',NULL,219);
+INSERT INTO t1 VALUES (4801,0,NULL,'wixljp',NULL,266);
+INSERT INTO t1 VALUES (36,0,NULL,'xl',NULL,NULL);
+INSERT INTO t1 VALUES (1,0,NULL,'l',NULL,0);
+INSERT INTO t1 VALUES (0,0,NULL,'i',NULL,584);
+INSERT INTO t1 VALUES (160,0,NULL,'w',NULL,0);
+INSERT INTO t1 VALUES (4,0,NULL,'s',NULL,0);
+INSERT INTO t1 VALUES (20,0,NULL,'d',NULL,NULL);
+INSERT INTO t1 VALUES (31136,0,NULL,'god',NULL,4);
+--enable_query_log
+ALTER TABLE t1 ENABLE KEYS;
+
+--echo # Must not crash:
+SELECT * FROM t1 WHERE ( a BETWEEN 255 AND 270 OR f = 200 ) AND f IN ( 1, 4, 112, 143 ) AND d IN ('Montana', 'South Dakota');
+DROP TABLE t1;
diff --git a/mysql-test/main/rowid_filter_myisam_debug.result b/mysql-test/main/rowid_filter_myisam_debug.result
new file mode 100644
index 00000000000..16fcb2a416e
--- /dev/null
+++ b/mysql-test/main/rowid_filter_myisam_debug.result
@@ -0,0 +1,54 @@
+#
+# MDEV-22761 KILL QUERY during rowid_filter, crashes
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
+create table t2(a int);
+insert into t2 select A.a + B.a* 10 from t0 A, t0 B;
+CREATE TABLE t3 (
+key1 int ,
+key2 int,
+filler varchar(255),
+KEY (key1),
+KEY (key2)
+);
+select engine from information_schema.tables
+where table_schema=database() and table_name='t3';
+engine
+MyISAM
+insert into t3
+select
+A.a,
+A.a,
+'filler-data-filler-data'
+from
+t0 A, t1 B;
+analyze table t2,t3;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status Table is already up to date
+explain
+select * from t2, t3
+where
+t3.key1=t2.a and t3.key2 in (2,3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 100 Using where
+1 SIMPLE t3 ref|filter key1,key2 key1|key2 5|5 test.t2.a 1000 (18%) Using where; Using rowid filter
+set debug_sync='handler_rowid_filter_check SIGNAL at_rowid_filter_check WAIT_FOR go';
+select * from t2, t3
+where
+t3.key1=t2.a and t3.key2 in (2,3);
+connect con1, localhost, root,,;
+connection con1;
+set debug_sync='now WAIT_FOR at_rowid_filter_check';
+kill query $target_id;
+set debug_sync='now SIGNAL go';
+connection default;
+disconnect con1;
+ERROR 70100: Query execution was interrupted
+set debug_sync='RESET';
+drop table t0,t1,t2,t3;
diff --git a/mysql-test/main/rowid_filter_myisam_debug.test b/mysql-test/main/rowid_filter_myisam_debug.test
new file mode 100644
index 00000000000..ba2f79772a9
--- /dev/null
+++ b/mysql-test/main/rowid_filter_myisam_debug.test
@@ -0,0 +1,3 @@
+
+--source include/rowid_filter_debug_kill.inc
+
diff --git a/mysql-test/main/secure_file_priv_win.result b/mysql-test/main/secure_file_priv_win.result
index d456c24d20c..af402ae9537 100644
--- a/mysql-test/main/secure_file_priv_win.result
+++ b/mysql-test/main/secure_file_priv_win.result
@@ -1,6 +1,8 @@
CREATE TABLE t1 (c1 longtext);
INSERT INTO t1 values ('a');
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
show global variables like 'secure_file_priv';
Variable_name Value
secure_file_priv MYSQL_TMP_DIR/
@@ -32,7 +34,15 @@ ERROR HY000: The MariaDB server is running with the --secure-file-priv option so
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517-2.tmp';
ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
DROP TABLE t1;
diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result
index 43202ef0f6f..8af44477e80 100644
--- a/mysql-test/main/select.result
+++ b/mysql-test/main/select.result
@@ -2117,8 +2117,8 @@ INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
gvid the_success the_fail the_size the_time
Warnings:
-Warning 1292 Incorrect datetime value: 'wrong-date-value'
-Warning 1292 Incorrect datetime value: 'wrong-date-value'
+Warning 1292 Truncated incorrect datetime value: 'wrong-date-value'
+Warning 1292 Truncated incorrect datetime value: 'wrong-date-value'
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
gvid the_success the_fail the_size the_time
DROP TABLE t1,t2;
@@ -2785,7 +2785,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
+1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
0.6158
@@ -3407,7 +3407,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
INSERT INTO t1 VALUES
-(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10);
+(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10), (70, 10);
INSERT INTO t2 VALUES
(10, 10, 'aaa'), (20, 10, 'bbb'), (30, 10, 'ccc'), (40, 20, 'ddd'),
(50, 10, 'eee'), (60, 20, 'fff'), (70, 20, 'ggg'), (80, 30, 'hhh');
@@ -3421,7 +3421,7 @@ SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition
DROP TABLE t1,t2;
SET SQL_MODE='NO_UNSIGNED_SUBTRACTION';
CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);
@@ -3452,6 +3452,7 @@ create table t2 (a int, b int, c int, e int, primary key(a,b,c));
insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
Z
@@ -3473,13 +3474,13 @@ INSERT INTO t2 VALUES
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition
-1 SIMPLE t2 ref c c 5 test.t1.a 2
+1 SIMPLE t2 ALL c NULL NULL NULL 18 Using where
+1 SIMPLE t1 eq_ref|filter PRIMARY,b PRIMARY|b 4|5 test.t2.c 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where
-1 SIMPLE t2 ref c c 5 test.t1.a 2
+1 SIMPLE t2 ALL c NULL NULL NULL 18 Using where
+1 SIMPLE t1 eq_ref|filter PRIMARY,b PRIMARY|b 4|5 test.t2.c 1 (30%) Using where; Using rowid filter
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
@@ -3521,7 +3522,7 @@ INSERT INTO t2 VALUES
EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t2 ref idx idx 4 const 7 Using index
+1 SIMPLE t2 ref idx idx 4 const 8 Using index
EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
@@ -3532,14 +3533,14 @@ INSERT INTO t1 VALUES (1,2), (2,NULL), (3,2);
CREATE TABLE t2 (b int, c INT, INDEX idx1(b));
INSERT INTO t2 VALUES (2,1), (3,2);
CREATE TABLE t3 (d int, e int, INDEX idx1(d));
-INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50);
+INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50), (1,60), (3,70), (1,80), (3,90);
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
WHERE t1.id=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 const idx1 NULL NULL NULL 1
-1 SIMPLE t3 ref idx1 idx1 5 const 3
+1 SIMPLE t3 ref idx1 idx1 5 const 4
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
WHERE t1.id=2;
id a b c d e
@@ -3568,7 +3569,7 @@ EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
@@ -3615,7 +3616,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
@@ -3623,7 +3624,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee') ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3697,6 +3698,10 @@ INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SELECT COUNT(*) FROM t1 WHERE ID1_with_null IS NULL AND ID2_with_null=3;
COUNT(*)
24
@@ -3712,45 +3717,47 @@ COUNT(*)
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
DROP INDEX idx1 ON t1;
CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND
(ID2_with_null=1 OR ID2_with_null=2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx1|idx2 5|4 const 2 (1%) Using index condition; Using where; Using rowid filter
DROP TABLE t1;
CREATE TABLE t1 (a INT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, KEY ts(ts));
INSERT INTO t1 VALUES (30,"2006-01-03 23:00:00"), (31,"2006-01-03 23:00:00");
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE t2 (a INT, dt1 DATETIME, dt2 DATETIME, PRIMARY KEY (a));
INSERT INTO t2 VALUES (30, "2006-01-01 00:00:00", "2999-12-31 00:00:00");
INSERT INTO t2 SELECT a+1,dt1,dt2 FROM t2;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
@@ -3758,7 +3765,7 @@ AND t1.ts BETWEEN t2.dt1 AND t2.dt2
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range ts ts 4 NULL 1 Using index condition; Using where
+1 SIMPLE t1 range ts ts 4 NULL 2 Using index condition; Using where
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
AND t1.ts BETWEEN t2.dt1 AND t2.dt2
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
@@ -3800,6 +3807,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
name n
bb 1
@@ -3809,27 +3817,39 @@ cc  4
cc 5
bb 6
cc 7
+bb 8
+aa 9
+aa 10
+bb 11
SELECT * FROM t2 ORDER BY name;
name n
aa 2
+aa 10
+aa 9
bb 1
+bb 8
bb 6
+bb 11
cc  4
-cc 3
-cc 5
cc 7
+cc 5
+cc 3
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
+aa 2 10
+aa 2 9
bb 2 1
+bb 3 8
bb 3 6
+bb 2 11
cc  4 4
-cc 5 3
-cc 2 5
cc 3 7
+cc 2 5
+cc 5 3
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref name name 6 const 3 Using where
+1 SIMPLE t2 ref name name 6 const 4 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
@@ -3837,7 +3857,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where
+1 SIMPLE t2 range name name 6 NULL 4 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
@@ -3846,7 +3866,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
+1 SIMPLE t2 range name name 6 NULL 4 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
@@ -3862,11 +3882,17 @@ name name n
ccc NULL NULL
bb bb 1
bb bb 6
+bb bb 8
+bb bb 11
cc cc 3
cc cc 5
cc cc 7
aa aa 2
+aa aa 9
+aa aa 10
aa aa 2
+aa aa 9
+aa aa 10
DROP TABLE t1,t2;
CREATE TABLE t1 (name text);
CREATE TABLE t2 (name text, n int, KEY (name(3)));
@@ -3874,6 +3900,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
name n
bb 1
@@ -3883,11 +3910,19 @@ cc  4
cc 5
bb 6
cc 7
+bb 8
+aa 9
+aa 10
+bb 11
SELECT * FROM t2 ORDER BY name;
name n
aa 2
+aa 9
+aa 10
bb 1
bb 6
+bb 8
+bb 11
cc  4
cc 3
cc 5
@@ -3895,15 +3930,19 @@ cc 7
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
+aa 2 9
+aa 2 10
bb 2 1
bb 3 6
+bb 3 8
+bb 2 11
cc  4 4
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref name name 6 const 3 Using where
+1 SIMPLE t2 ref name name 6 const 4 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
@@ -3911,7 +3950,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where
+1 SIMPLE t2 range name name 6 NULL 4 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
@@ -3920,7 +3959,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
+1 SIMPLE t2 range name name 6 NULL 4 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
@@ -3936,11 +3975,17 @@ name name n
ccc NULL NULL
bb bb 1
bb bb 6
+bb bb 8
+bb bb 11
cc cc 3
cc cc 5
cc cc 7
aa aa 2
+aa aa 9
+aa aa 10
aa aa 2
+aa aa 9
+aa aa 10
DROP TABLE t1,t2;
CREATE TABLE t1 (
access_id int NOT NULL default '0',
@@ -4110,7 +4155,7 @@ select str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6';
str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6'
0
Warnings:
-Warning 1292 Incorrect datetime value: '2007/10/2000:00:00 GMT-6'
+Warning 1292 Truncated incorrect datetime value: '2007/10/2000:00:00 GMT-6'
select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6';
str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6'
1
@@ -4197,7 +4242,7 @@ select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'
0
@@ -4211,22 +4256,22 @@ select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''
0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
0
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
0
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
select str_to_date('','%Y-%m-%d') = '';
str_to_date('','%Y-%m-%d') = ''
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01';
str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'
1
@@ -4644,6 +4689,8 @@ WHERE int_key IN (SELECT 1 FROM t1)
HAVING date_nokey = '10:41:7'
ORDER BY date_key;
date_nokey
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '10:41:7'
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT NOT NULL, b INT);
INSERT INTO t1 VALUES (1, 1);
@@ -5210,7 +5257,7 @@ INSERT INTO `CC` VALUES
EXPLAIN SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CC range int_key int_key 4 NULL 10 Using index condition; Using where; Using filesort
+1 SIMPLE CC range int_key int_key 4 NULL 9 Using index condition; Using where; Using filesort
SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1
@@ -5281,30 +5328,30 @@ SELECT * FROM t1 HAVING f1 = 'zz';
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'zz'
SELECT * FROM t1 HAVING f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM t1 HAVING f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM t1 WHERE f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM v1 HAVING f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
DROP TABLE t1;
DROP VIEW v1;
#
diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test
index 7e9d6bcf0ad..407108e6206 100644
--- a/mysql-test/main/select.test
+++ b/mysql-test/main/select.test
@@ -2916,7 +2916,7 @@ CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
INSERT INTO t1 VALUES
- (10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10);
+ (10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10), (70, 10);
INSERT INTO t2 VALUES
(10, 10, 'aaa'), (20, 10, 'bbb'), (30, 10, 'ccc'), (40, 20, 'ddd'),
@@ -3049,7 +3049,7 @@ CREATE TABLE t2 (b int, c INT, INDEX idx1(b));
INSERT INTO t2 VALUES (2,1), (3,2);
CREATE TABLE t3 (d int, e int, INDEX idx1(d));
-INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50);
+INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50), (1,60), (3,70), (1,80), (3,90);
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
@@ -3231,6 +3231,8 @@ INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
+ANALYZE TABLE t1;
+
SELECT COUNT(*) FROM t1 WHERE ID1_with_null IS NULL AND ID2_with_null=3;
SELECT COUNT(*) FROM t1 WHERE ID1_with_null=3 AND ID2_with_null IS NULL;
SELECT COUNT(*) FROM t1 WHERE ID1_with_null IS NULL AND ID2_with_null IS NULL;
@@ -3312,6 +3314,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
SELECT * FROM t2 ORDER BY name;
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
@@ -3333,6 +3336,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
SELECT * FROM t2 ORDER BY name;
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result
index c727b6050da..5a3476cf7d0 100644
--- a/mysql-test/main/select_jcl6.result
+++ b/mysql-test/main/select_jcl6.result
@@ -2128,8 +2128,8 @@ INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
gvid the_success the_fail the_size the_time
Warnings:
-Warning 1292 Incorrect datetime value: 'wrong-date-value'
-Warning 1292 Incorrect datetime value: 'wrong-date-value'
+Warning 1292 Truncated incorrect datetime value: 'wrong-date-value'
+Warning 1292 Truncated incorrect datetime value: 'wrong-date-value'
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
gvid the_success the_fail the_size the_time
DROP TABLE t1,t2;
@@ -2796,7 +2796,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
+1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
0.6158
@@ -3418,7 +3418,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
INSERT INTO t1 VALUES
-(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10);
+(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10), (70, 10);
INSERT INTO t2 VALUES
(10, 10, 'aaa'), (20, 10, 'bbb'), (30, 10, 'ccc'), (40, 20, 'ddd'),
(50, 10, 'eee'), (60, 20, 'fff'), (70, 20, 'ggg'), (80, 30, 'hhh');
@@ -3432,7 +3432,7 @@ SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Rowid-ordered scan
DROP TABLE t1,t2;
SET SQL_MODE='NO_UNSIGNED_SUBTRACTION';
CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);
@@ -3463,6 +3463,7 @@ create table t2 (a int, b int, c int, e int, primary key(a,b,c));
insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
Z
@@ -3484,13 +3485,13 @@ INSERT INTO t2 VALUES
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Rowid-ordered scan
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t2 ALL c NULL NULL NULL 18 Using where
+1 SIMPLE t1 eq_ref|filter PRIMARY,b PRIMARY|b 4|5 test.t2.c 1 (30%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t2 ALL c NULL NULL NULL 18 Using where
+1 SIMPLE t1 eq_ref|filter PRIMARY,b PRIMARY|b 4|5 test.t2.c 1 (30%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
@@ -3532,7 +3533,7 @@ INSERT INTO t2 VALUES
EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t2 ref idx idx 4 const 7 Using index
+1 SIMPLE t2 ref idx idx 4 const 8 Using index
EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
@@ -3543,14 +3544,14 @@ INSERT INTO t1 VALUES (1,2), (2,NULL), (3,2);
CREATE TABLE t2 (b int, c INT, INDEX idx1(b));
INSERT INTO t2 VALUES (2,1), (3,2);
CREATE TABLE t3 (d int, e int, INDEX idx1(d));
-INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50);
+INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50), (1,60), (3,70), (1,80), (3,90);
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
WHERE t1.id=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 const idx1 NULL NULL NULL 1
-1 SIMPLE t3 ref idx1 idx1 5 const 3
+1 SIMPLE t3 ref idx1 idx1 5 const 4
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
WHERE t1.id=2;
id a b c d e
@@ -3579,7 +3580,7 @@ EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Rowid-ordered scan
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
@@ -3626,7 +3627,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
@@ -3634,7 +3635,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee') ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using where; Rowid-ordered scan
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3708,6 +3709,10 @@ INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SELECT COUNT(*) FROM t1 WHERE ID1_with_null IS NULL AND ID2_with_null=3;
COUNT(*)
24
@@ -3723,45 +3728,47 @@ COUNT(*)
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
DROP INDEX idx1 ON t1;
CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND
(ID2_with_null=1 OR ID2_with_null=2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx1|idx2 5|4 const 2 (1%) Using index condition; Using where; Using rowid filter
DROP TABLE t1;
CREATE TABLE t1 (a INT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, KEY ts(ts));
INSERT INTO t1 VALUES (30,"2006-01-03 23:00:00"), (31,"2006-01-03 23:00:00");
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE t2 (a INT, dt1 DATETIME, dt2 DATETIME, PRIMARY KEY (a));
INSERT INTO t2 VALUES (30, "2006-01-01 00:00:00", "2999-12-31 00:00:00");
INSERT INTO t2 SELECT a+1,dt1,dt2 FROM t2;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
@@ -3769,7 +3776,7 @@ AND t1.ts BETWEEN t2.dt1 AND t2.dt2
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range ts ts 4 NULL 1 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range ts ts 4 NULL 2 Using index condition; Using where; Rowid-ordered scan
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
AND t1.ts BETWEEN t2.dt1 AND t2.dt2
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
@@ -3811,6 +3818,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
name n
bb 1
@@ -3820,27 +3828,39 @@ cc  4
cc 5
bb 6
cc 7
+bb 8
+aa 9
+aa 10
+bb 11
SELECT * FROM t2 ORDER BY name;
name n
aa 2
+aa 10
+aa 9
bb 1
+bb 8
bb 6
+bb 11
cc  4
-cc 3
-cc 5
cc 7
+cc 5
+cc 3
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
+aa 2 10
+aa 2 9
bb 2 1
+bb 3 8
bb 3 6
+bb 2 11
cc  4 4
-cc 5 3
-cc 2 5
cc 3 7
+cc 2 5
+cc 5 3
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref name name 6 const 3 Using where
+1 SIMPLE t2 ref name name 6 const 4 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
@@ -3848,7 +3868,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where
+1 SIMPLE t2 range name name 6 NULL 4 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
@@ -3857,7 +3877,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
+1 SIMPLE t2 range name name 6 NULL 4 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
@@ -3873,11 +3893,17 @@ name name n
ccc NULL NULL
bb bb 1
bb bb 6
+bb bb 8
+bb bb 11
cc cc 3
cc cc 5
cc cc 7
aa aa 2
+aa aa 9
+aa aa 10
aa aa 2
+aa aa 9
+aa aa 10
DROP TABLE t1,t2;
CREATE TABLE t1 (name text);
CREATE TABLE t2 (name text, n int, KEY (name(3)));
@@ -3885,6 +3911,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
name n
bb 1
@@ -3894,11 +3921,19 @@ cc  4
cc 5
bb 6
cc 7
+bb 8
+aa 9
+aa 10
+bb 11
SELECT * FROM t2 ORDER BY name;
name n
aa 2
+aa 9
+aa 10
bb 1
bb 6
+bb 8
+bb 11
cc  4
cc 3
cc 5
@@ -3906,15 +3941,19 @@ cc 7
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
+aa 2 9
+aa 2 10
bb 2 1
bb 3 6
+bb 3 8
+bb 2 11
cc  4 4
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref name name 6 const 3 Using where
+1 SIMPLE t2 ref name name 6 const 4 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
@@ -3922,7 +3961,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where
+1 SIMPLE t2 range name name 6 NULL 4 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
@@ -3931,7 +3970,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
+1 SIMPLE t2 range name name 6 NULL 4 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
@@ -3947,11 +3986,17 @@ name name n
ccc NULL NULL
bb bb 1
bb bb 6
+bb bb 8
+bb bb 11
cc cc 3
cc cc 5
cc cc 7
aa aa 2
+aa aa 9
+aa aa 10
aa aa 2
+aa aa 9
+aa aa 10
DROP TABLE t1,t2;
CREATE TABLE t1 (
access_id int NOT NULL default '0',
@@ -4121,7 +4166,7 @@ select str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6';
str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6'
0
Warnings:
-Warning 1292 Incorrect datetime value: '2007/10/2000:00:00 GMT-6'
+Warning 1292 Truncated incorrect datetime value: '2007/10/2000:00:00 GMT-6'
select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6';
str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6'
1
@@ -4208,7 +4253,7 @@ select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'
0
@@ -4222,22 +4267,22 @@ select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''
0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
0
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
0
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
select str_to_date('','%Y-%m-%d') = '';
str_to_date('','%Y-%m-%d') = ''
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01';
str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'
1
@@ -4655,6 +4700,8 @@ WHERE int_key IN (SELECT 1 FROM t1)
HAVING date_nokey = '10:41:7'
ORDER BY date_key;
date_nokey
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '10:41:7'
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT NOT NULL, b INT);
INSERT INTO t1 VALUES (1, 1);
@@ -5221,7 +5268,7 @@ INSERT INTO `CC` VALUES
EXPLAIN SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CC range int_key int_key 4 NULL 10 Using index condition; Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE CC range int_key int_key 4 NULL 9 Using index condition; Using where; Rowid-ordered scan; Using filesort
SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1
@@ -5292,30 +5339,30 @@ SELECT * FROM t1 HAVING f1 = 'zz';
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'zz'
SELECT * FROM t1 HAVING f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM t1 HAVING f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM t1 WHERE f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM v1 HAVING f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
DROP TABLE t1;
DROP VIEW v1;
#
diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result
index 43202ef0f6f..8af44477e80 100644
--- a/mysql-test/main/select_pkeycache.result
+++ b/mysql-test/main/select_pkeycache.result
@@ -2117,8 +2117,8 @@ INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
gvid the_success the_fail the_size the_time
Warnings:
-Warning 1292 Incorrect datetime value: 'wrong-date-value'
-Warning 1292 Incorrect datetime value: 'wrong-date-value'
+Warning 1292 Truncated incorrect datetime value: 'wrong-date-value'
+Warning 1292 Truncated incorrect datetime value: 'wrong-date-value'
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
gvid the_success the_fail the_size the_time
DROP TABLE t1,t2;
@@ -2785,7 +2785,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index
+1 SIMPLE t1 index key1 key1 5 NULL 4 Using where; Using index
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
0.6158
@@ -3407,7 +3407,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
INSERT INTO t1 VALUES
-(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10);
+(10, 10), (20, 10), (30, 20), (40, 30), (50, 10), (60, 10), (70, 10);
INSERT INTO t2 VALUES
(10, 10, 'aaa'), (20, 10, 'bbb'), (30, 10, 'ccc'), (40, 20, 'ddd'),
(50, 10, 'eee'), (60, 20, 'fff'), (70, 20, 'ggg'), (80, 30, 'hhh');
@@ -3421,7 +3421,7 @@ SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition
DROP TABLE t1,t2;
SET SQL_MODE='NO_UNSIGNED_SUBTRACTION';
CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);
@@ -3452,6 +3452,7 @@ create table t2 (a int, b int, c int, e int, primary key(a,b,c));
insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
Z
@@ -3473,13 +3474,13 @@ INSERT INTO t2 VALUES
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition
-1 SIMPLE t2 ref c c 5 test.t1.a 2
+1 SIMPLE t2 ALL c NULL NULL NULL 18 Using where
+1 SIMPLE t1 eq_ref|filter PRIMARY,b PRIMARY|b 4|5 test.t2.c 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where
-1 SIMPLE t2 ref c c 5 test.t1.a 2
+1 SIMPLE t2 ALL c NULL NULL NULL 18 Using where
+1 SIMPLE t1 eq_ref|filter PRIMARY,b PRIMARY|b 4|5 test.t2.c 1 (30%) Using where; Using rowid filter
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
@@ -3521,7 +3522,7 @@ INSERT INTO t2 VALUES
EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t2 ref idx idx 4 const 7 Using index
+1 SIMPLE t2 ref idx idx 4 const 8 Using index
EXPLAIN SELECT b FROM t1, t2 WHERE b=c AND a=4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
@@ -3532,14 +3533,14 @@ INSERT INTO t1 VALUES (1,2), (2,NULL), (3,2);
CREATE TABLE t2 (b int, c INT, INDEX idx1(b));
INSERT INTO t2 VALUES (2,1), (3,2);
CREATE TABLE t3 (d int, e int, INDEX idx1(d));
-INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50);
+INSERT INTO t3 VALUES (2,10), (2,20), (1,30), (2,40), (2,50), (1,60), (3,70), (1,80), (3,90);
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
WHERE t1.id=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 const idx1 NULL NULL NULL 1
-1 SIMPLE t3 ref idx1 idx1 5 const 3
+1 SIMPLE t3 ref idx1 idx1 5 const 4
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
WHERE t1.id=2;
id a b c d e
@@ -3568,7 +3569,7 @@ EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
@@ -3615,7 +3616,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
@@ -3623,7 +3624,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee') ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using where
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
+1 SIMPLE t3 eq_ref|filter PRIMARY,ci PRIMARY|ci 4|5 test.t2.a 1 (30%) Using where; Using rowid filter
EXPLAIN
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3697,6 +3698,10 @@ INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID1_with_null IS NULL;
INSERT INTO t1 SELECT * FROM t1 WHERE ID2_with_null IS NULL;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
SELECT COUNT(*) FROM t1 WHERE ID1_with_null IS NULL AND ID2_with_null=3;
COUNT(*)
24
@@ -3712,45 +3717,47 @@ COUNT(*)
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
DROP INDEX idx1 ON t1;
CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null IS NULL ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref idx1,idx2 idx2 4 const 2 Using where
EXPLAIN SELECT * FROM t1
WHERE ID_better=1 AND ID1_with_null IS NULL AND
(ID2_with_null=1 OR ID2_with_null=2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1,idx2 idx2 4 const 1 Using where
+1 SIMPLE t1 ref|filter idx1,idx2 idx1|idx2 5|4 const 2 (1%) Using index condition; Using where; Using rowid filter
DROP TABLE t1;
CREATE TABLE t1 (a INT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, KEY ts(ts));
INSERT INTO t1 VALUES (30,"2006-01-03 23:00:00"), (31,"2006-01-03 23:00:00");
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE t2 (a INT, dt1 DATETIME, dt2 DATETIME, PRIMARY KEY (a));
INSERT INTO t2 VALUES (30, "2006-01-01 00:00:00", "2999-12-31 00:00:00");
INSERT INTO t2 SELECT a+1,dt1,dt2 FROM t2;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
@@ -3758,7 +3765,7 @@ AND t1.ts BETWEEN t2.dt1 AND t2.dt2
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range ts ts 4 NULL 1 Using index condition; Using where
+1 SIMPLE t1 range ts ts 4 NULL 2 Using index condition; Using where
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
AND t1.ts BETWEEN t2.dt1 AND t2.dt2
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
@@ -3800,6 +3807,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
name n
bb 1
@@ -3809,27 +3817,39 @@ cc  4
cc 5
bb 6
cc 7
+bb 8
+aa 9
+aa 10
+bb 11
SELECT * FROM t2 ORDER BY name;
name n
aa 2
+aa 10
+aa 9
bb 1
+bb 8
bb 6
+bb 11
cc  4
-cc 3
-cc 5
cc 7
+cc 5
+cc 3
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
+aa 2 10
+aa 2 9
bb 2 1
+bb 3 8
bb 3 6
+bb 2 11
cc  4 4
-cc 5 3
-cc 2 5
cc 3 7
+cc 2 5
+cc 5 3
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref name name 6 const 3 Using where
+1 SIMPLE t2 ref name name 6 const 4 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
@@ -3837,7 +3857,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where
+1 SIMPLE t2 range name name 6 NULL 4 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
@@ -3846,7 +3866,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
+1 SIMPLE t2 range name name 6 NULL 4 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
@@ -3862,11 +3882,17 @@ name name n
ccc NULL NULL
bb bb 1
bb bb 6
+bb bb 8
+bb bb 11
cc cc 3
cc cc 5
cc cc 7
aa aa 2
+aa aa 9
+aa aa 10
aa aa 2
+aa aa 9
+aa aa 10
DROP TABLE t1,t2;
CREATE TABLE t1 (name text);
CREATE TABLE t2 (name text, n int, KEY (name(3)));
@@ -3874,6 +3900,7 @@ INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
+INSERT INTO t2 VALUES ('bb ',8), ('aa',9), ('aa',10), ('bb',11);
SELECT * FROM t2;
name n
bb 1
@@ -3883,11 +3910,19 @@ cc  4
cc 5
bb 6
cc 7
+bb 8
+aa 9
+aa 10
+bb 11
SELECT * FROM t2 ORDER BY name;
name n
aa 2
+aa 9
+aa 10
bb 1
bb 6
+bb 8
+bb 11
cc  4
cc 3
cc 5
@@ -3895,15 +3930,19 @@ cc 7
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
+aa 2 9
+aa 2 10
bb 2 1
bb 3 6
+bb 3 8
+bb 2 11
cc  4 4
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref name name 6 const 3 Using where
+1 SIMPLE t2 ref name name 6 const 4 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
@@ -3911,7 +3950,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where
+1 SIMPLE t2 range name name 6 NULL 4 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
@@ -3920,7 +3959,7 @@ cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
+1 SIMPLE t2 range name name 6 NULL 4 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
@@ -3936,11 +3975,17 @@ name name n
ccc NULL NULL
bb bb 1
bb bb 6
+bb bb 8
+bb bb 11
cc cc 3
cc cc 5
cc cc 7
aa aa 2
+aa aa 9
+aa aa 10
aa aa 2
+aa aa 9
+aa aa 10
DROP TABLE t1,t2;
CREATE TABLE t1 (
access_id int NOT NULL default '0',
@@ -4110,7 +4155,7 @@ select str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6';
str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6'
0
Warnings:
-Warning 1292 Incorrect datetime value: '2007/10/2000:00:00 GMT-6'
+Warning 1292 Truncated incorrect datetime value: '2007/10/2000:00:00 GMT-6'
select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6';
str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6'
1
@@ -4197,7 +4242,7 @@ select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'
0
@@ -4211,22 +4256,22 @@ select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''
0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
0
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
0
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
select str_to_date('','%Y-%m-%d') = '';
str_to_date('','%Y-%m-%d') = ''
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01';
str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'
1
@@ -4644,6 +4689,8 @@ WHERE int_key IN (SELECT 1 FROM t1)
HAVING date_nokey = '10:41:7'
ORDER BY date_key;
date_nokey
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '10:41:7'
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT NOT NULL, b INT);
INSERT INTO t1 VALUES (1, 1);
@@ -5210,7 +5257,7 @@ INSERT INTO `CC` VALUES
EXPLAIN SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CC range int_key int_key 4 NULL 10 Using index condition; Using where; Using filesort
+1 SIMPLE CC range int_key int_key 4 NULL 9 Using index condition; Using where; Using filesort
SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1
@@ -5281,30 +5328,30 @@ SELECT * FROM t1 HAVING f1 = 'zz';
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'zz'
SELECT * FROM t1 HAVING f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM t1 HAVING f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM t1 WHERE f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
SELECT * FROM v1 HAVING f1 = 'zz' AND f1 <= 'aa' ;
f1
0000-00-00
Warnings:
-Warning 1292 Incorrect datetime value: 'zz'
-Warning 1292 Incorrect datetime value: 'aa'
+Warning 1292 Truncated incorrect datetime value: 'zz'
+Warning 1292 Truncated incorrect datetime value: 'aa'
DROP TABLE t1;
DROP VIEW v1;
#
diff --git a/mysql-test/main/select_safe.result b/mysql-test/main/select_safe.result
index 60364b8c4ec..649e2dc484e 100644
--- a/mysql-test/main/select_safe.result
+++ b/mysql-test/main/select_safe.result
@@ -62,19 +62,20 @@ a b
5 a
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
insert into t1 values (null,"b"),(null,"b"),(null,"c"),(null,"c"),(null,"d"),(null,"d"),(null,"e"),(null,"e"),(null,"a"),(null,"e");
insert into t1 values (null,"x"),(null,"x"),(null,"y"),(null,"y"),(null,"z"),(null,"z"),(null,"v"),(null,"v"),(null,"a"),(null,"v");
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL b NULL NULL NULL 41 Using where
-1 SIMPLE t2 ref b b 21 test.t1.b 6
+1 SIMPLE t1 ALL b NULL NULL NULL 11
+1 SIMPLE t2 ALL b NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
set MAX_SEEKS_FOR_KEY=1;
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL b NULL NULL NULL 41 Using where
-1 SIMPLE t2 ref b b 21 test.t1.b 6
+1 SIMPLE t1 ALL b NULL NULL NULL 11
+1 SIMPLE t2 ALL b NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
SET MAX_SEEKS_FOR_KEY=DEFAULT;
drop table t1;
create table t1 (a int);
diff --git a/mysql-test/main/selectivity.result b/mysql-test/main/selectivity.result
index 4a39726fb91..7e3202337ec 100644
--- a/mysql-test/main/selectivity.result
+++ b/mysql-test/main/selectivity.result
@@ -12,6 +12,7 @@ set @save_histogram_size=@@histogram_size;
set @save_histogram_type=@@histogram_type;
set join_cache_level=2;
set @@global.histogram_size=0,@@local.histogram_size=0;
+set histogram_type='single_prec_hb';
set optimizer_use_condition_selectivity=3;
create table t1 (a int);
insert into t1 values
@@ -143,9 +144,9 @@ order by s_suppkey;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using filesort
1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where
-3 DERIVED lineitem range i_l_shipdate,i_l_suppkey i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort
-2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 268 100.00
-4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort
+3 DERIVED lineitem range i_l_shipdate,i_l_suppkey i_l_shipdate 4 NULL 269 100.00 Using where; Using temporary; Using filesort
+2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 269 100.00
+4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 269 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 /* select#1 */ select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where `revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey` and `revenue0`.`total_revenue` = (/* select#2 */ select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`) order by `dbt3_s001`.`supplier`.`s_suppkey`
select s_suppkey, s_name, s_address, s_phone, total_revenue
@@ -164,9 +165,9 @@ order by s_suppkey;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY supplier ALL PRIMARY NULL NULL NULL 10 100.00 Using filesort
1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where
-3 DERIVED lineitem range i_l_shipdate,i_l_suppkey i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort
-2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 268 100.00
-4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 268 100.00 Using where; Using temporary; Using filesort
+3 DERIVED lineitem range i_l_shipdate,i_l_suppkey i_l_shipdate 4 NULL 269 100.00 Using where; Using temporary; Using filesort
+2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 269 100.00
+4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 269 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 /* select#1 */ select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where `revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey` and `revenue0`.`total_revenue` = (/* select#2 */ select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`) order by `dbt3_s001`.`supplier`.`s_suppkey`
select s_suppkey, s_name, s_address, s_phone, total_revenue
@@ -1371,14 +1372,14 @@ test.t2 analyze status Table is already up to date
explain extended
select * from t1 straight_join t2 where t1.a=t2.a and t1.a<10;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.96 Using where
1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` < 10
explain extended
select * from t1 straight_join t2 where t1.a=t2.a and t2.a<10;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.96 Using where
1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` < 10
@@ -1633,17 +1634,11 @@ SELECT @cnt;
@cnt
2
alter table t1 force;
-set @@use_stat_tables= @save_use_stat_tables;
-set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
drop function f1;
#
# MDEV-19834 Selectivity of an equality condition discounted twice
#
-set @@optimizer_use_condition_selectivity=4;
-set @@use_stat_tables='preferably';
-set @save_histogram_size=@@histogram_size;
-set @@histogram_size=0;
create table t1 (a int, b int, key (b), key (a));
insert into t1
select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
@@ -1654,19 +1649,19 @@ test.t1 analyze status Table is already up to date
# Check what info the optimizer has about selectivities
explain extended select * from t1 use index () where a in (17,51,5);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 2.97 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 3.90 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`a` in (17,51,5)
explain extended select * from t1 use index () where b=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 4.76 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 5.47 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`b` = 2
# Now, the equality is used for ref access, while the range condition
# gives selectivity data
explain extended select * from t1 where a in (17,51,5) and b=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref b,a b 5 const 58 2.90 Using where
+1 SIMPLE t1 ref|filter b,a b|a 5|5 const 58 (3%) 2.90 Using where; Using rowid filter
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (17,51,5)
drop table t1;
diff --git a/mysql-test/main/selectivity.test b/mysql-test/main/selectivity.test
index 4d7dcdc9781..1d96dc0bf80 100644
--- a/mysql-test/main/selectivity.test
+++ b/mysql-test/main/selectivity.test
@@ -18,6 +18,7 @@ set @save_histogram_size=@@histogram_size;
set @save_histogram_type=@@histogram_type;
set join_cache_level=2;
set @@global.histogram_size=0,@@local.histogram_size=0;
+set histogram_type='single_prec_hb';
# check that statistics on nulls is used
@@ -1101,18 +1102,12 @@ set @@optimizer_use_condition_selectivity=4;
SELECT * FROM t1 WHERE a = f1();
SELECT @cnt;
alter table t1 force;
-set @@use_stat_tables= @save_use_stat_tables;
-set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
drop function f1;
--echo #
--echo # MDEV-19834 Selectivity of an equality condition discounted twice
--echo #
-set @@optimizer_use_condition_selectivity=4;
-set @@use_stat_tables='preferably';
-set @save_histogram_size=@@histogram_size;
-set @@histogram_size=0;
create table t1 (a int, b int, key (b), key (a));
insert into t1
select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result
index 53fa6e663fb..2159989597a 100644
--- a/mysql-test/main/selectivity_innodb.result
+++ b/mysql-test/main/selectivity_innodb.result
@@ -15,6 +15,7 @@ set @save_histogram_size=@@histogram_size;
set @save_histogram_type=@@histogram_type;
set join_cache_level=2;
set @@global.histogram_size=0,@@local.histogram_size=0;
+set histogram_type='single_prec_hb';
set optimizer_use_condition_selectivity=3;
create table t1 (a int);
insert into t1 values
@@ -1381,14 +1382,14 @@ test.t2 analyze status OK
explain extended
select * from t1 straight_join t2 where t1.a=t2.a and t1.a<10;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.96 Using where
1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` < 10
explain extended
select * from t1 straight_join t2 where t1.a=t2.a and t2.a<10;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 0.99 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1.96 Using where
1 SIMPLE t2 ref a a 5 test.t1.a 10 100.00
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` straight_join `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` < 10
@@ -1442,7 +1443,7 @@ EXPLAIN EXTENDED
SELECT * FROM t1, t2
WHERE a <> 'USARussian' AND b IS NULL;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref PRIMARY,b b 5 const 2 66.67 Using where; Using index
+1 SIMPLE t1 ref PRIMARY,b b 5 const 1 100.00 Using where; Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 14 100.00 Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`i` AS `i` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` <> 'USARussian' and `test`.`t1`.`b` is null
@@ -1643,17 +1644,11 @@ SELECT @cnt;
@cnt
2
alter table t1 force;
-set @@use_stat_tables= @save_use_stat_tables;
-set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
drop function f1;
#
# MDEV-19834 Selectivity of an equality condition discounted twice
#
-set @@optimizer_use_condition_selectivity=4;
-set @@use_stat_tables='preferably';
-set @save_histogram_size=@@histogram_size;
-set @@histogram_size=0;
create table t1 (a int, b int, key (b), key (a));
insert into t1
select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000;
@@ -1664,19 +1659,19 @@ test.t1 analyze status OK
# Check what info the optimizer has about selectivities
explain extended select * from t1 use index () where a in (17,51,5);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 2.97 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 3.90 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`a` in (17,51,5)
explain extended select * from t1 use index () where b=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 4.76 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 5.47 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`b` = 2
# Now, the equality is used for ref access, while the range condition
# gives selectivity data
explain extended select * from t1 where a in (17,51,5) and b=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref b,a b 5 const 59 2.90 Using where
+1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 2.90 Using where; Using rowid filter
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (17,51,5)
drop table t1;
diff --git a/mysql-test/main/selectivity_no_engine.result b/mysql-test/main/selectivity_no_engine.result
index c513c19133d..b6830e91f61 100644
--- a/mysql-test/main/selectivity_no_engine.result
+++ b/mysql-test/main/selectivity_no_engine.result
@@ -161,7 +161,7 @@ Note 1003 select `test`.`t1`.`key1` AS `key1`,`test`.`t1`.`col1` AS `col1` from
# Must show 100%, not 10%
explain extended select * from t1 where key1=2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref key1 key1 5 const 98 100.00
+1 SIMPLE t1 ref key1 key1 5 const 99 100.00
Warnings:
Note 1003 select `test`.`t1`.`key1` AS `key1`,`test`.`t1`.`col1` AS `col1` from `test`.`t1` where `test`.`t1`.`key1` = 2
drop table t0, t1;
@@ -231,11 +231,12 @@ f2 varchar(1024),
KEY (f1,f2(255))
);
INSERT INTO t2 VALUES ('foo','baz','qux'),('bar','baz','qux');
+INSERT INTO t2 VALUES ('foo','bazz','qux'),('bar','bazz','qux');
set optimizer_use_condition_selectivity=2;
explain
select * from t1,t2 where t1.id = t2.t1_id and t2.f2='qux' and t2.f1='baz';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref f1 f1 325 const,const 1 Using index condition; Using where
+1 SIMPLE t2 ref f1 f1 325 const,const 2 Using index condition; Using where
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 122 test.t2.t1_id 1
select * from t1,t2 where t1.id = t2.t1_id and t2.f2='qux' and t2.f1='baz';
id dt t1_id f1 f2
@@ -310,8 +311,8 @@ INSERT INTO t2 VALUES (1);
EXPLAIN
SELECT * FROM t1 AS a NATURAL JOIN t1 AS b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE a ALL NULL NULL NULL NULL 4
-1 SIMPLE b hash_ALL NULL #hash#$hj 828 test.a.Host,test.a.User,test.a.Password,test.a.Select_priv,test.a.Insert_priv,test.a.Update_priv,test.a.Delete_priv,test.a.Create_priv,test.a.Drop_priv,test.a.Reload_priv,test.a.Shutdown_priv,test.a.Process_priv,test.a.File_priv,test.a.Grant_priv,test.a.References_priv,test.a.Index_priv,test.a.Alter_priv,test.a.Show_db_priv,test.a.Super_priv,test.a.Create_tmp_table_priv,test.a.Lock_tables_priv,test.a.Execute_priv,test.a.Repl_slave_priv,test.a.Repl_client_priv,test.a.Create_view_priv,test.a.Show_view_priv,test.a.Create_routine_priv,test.a.Alter_routine_priv,test.a.Create_user_priv,test.a.Event_priv,test.a.Trigger_priv,test.a.Create_tablespace_priv,test.a.Delete_history_priv,test.a.ssl_type,test.a.ssl_cipher,test.a.x509_issuer,test.a.x509_subject,test.a.max_questions,test.a.max_updates,test.a.max_connections,test.a.max_user_connections,test.a.plugin,test.a.authentication_string,test.a.password_expired,test.a.is_role,test.a.default_role,test.a.max_statement_time 4 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE a ALL NULL NULL NULL NULL 5 Using where
+1 SIMPLE b hash_ALL NULL #hash#$hj 612 test.a.Host,test.a.User,test.a.Password,test.a.Select_priv,test.a.Insert_priv,test.a.Update_priv,test.a.Delete_priv,test.a.Create_priv,test.a.Drop_priv,test.a.Reload_priv,test.a.Shutdown_priv,test.a.Process_priv,test.a.File_priv,test.a.Grant_priv,test.a.References_priv,test.a.Index_priv,test.a.Alter_priv,test.a.Show_db_priv,test.a.Super_priv,test.a.Create_tmp_table_priv,test.a.Lock_tables_priv,test.a.Execute_priv,test.a.Repl_slave_priv,test.a.Repl_client_priv,test.a.Create_view_priv,test.a.Show_view_priv,test.a.Create_routine_priv,test.a.Alter_routine_priv,test.a.Create_user_priv,test.a.Event_priv,test.a.Trigger_priv,test.a.Create_tablespace_priv,test.a.Delete_history_priv,test.a.ssl_type,test.a.ssl_cipher,test.a.x509_issuer,test.a.x509_subject,test.a.max_questions,test.a.max_updates,test.a.max_connections,test.a.max_user_connections,test.a.plugin,test.a.authentication_string,test.a.password_expired,test.a.is_role,test.a.default_role,test.a.max_statement_time 5 Using where; Using join buffer (flat, BNLH join)
DROP TABLE t1,t2,t3;
#
# End of the test file
diff --git a/mysql-test/main/selectivity_no_engine.test b/mysql-test/main/selectivity_no_engine.test
index b5f52dd167d..5bc78e03781 100644
--- a/mysql-test/main/selectivity_no_engine.test
+++ b/mysql-test/main/selectivity_no_engine.test
@@ -182,6 +182,7 @@ CREATE TABLE t2 (
);
INSERT INTO t2 VALUES ('foo','baz','qux'),('bar','baz','qux');
+INSERT INTO t2 VALUES ('foo','bazz','qux'),('bar','bazz','qux');
set optimizer_use_condition_selectivity=2;
explain
diff --git a/mysql-test/main/set_password.result b/mysql-test/main/set_password.result
index 11432a40d28..a3d8683ee64 100644
--- a/mysql-test/main/set_password.result
+++ b/mysql-test/main/set_password.result
@@ -1,19 +1,29 @@
set global secure_auth=0;
create user natauth@localhost identified via 'mysql_native_password' using '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
+create user invalidauth@localhost identified via 'mysql_native_password' using 'invalid';
create user newpass@localhost identified by password '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
+create user invalidpass@localhost identified by password 'invalid';
create user newpassnat@localhost identified via 'mysql_native_password';
set password for newpassnat@localhost = '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
+create user invalidpassnat@localhost identified by password 'invalid';
+set password for invalidpassnat@localhost = 'invalid';
create user oldauth@localhost identified with 'mysql_old_password' using '378b243e220ca493';
create user oldpass@localhost identified by password '378b243e220ca493';
create user oldpassold@localhost identified with 'mysql_old_password';
set password for oldpassold@localhost = '378b243e220ca493';
+create user invalidmysql57auth@localhost identified via 'mysql_native_password' using '*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE';
select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
-user host password plugin authentication_string
-natauth localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
-newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
+User Host Password plugin authentication_string
+invalidauth localhost invalid mysql_native_password invalid
+invalidmysql57auth localhost *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE mysql_native_password *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE
+invalidpass localhost invalid mysql_native_password invalid
+invalidpassnat localhost invalid mysql_native_password invalid
+mariadb.sys localhost mysql_native_password
+natauth localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
+newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
newpassnat localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
-oldauth localhost 378b243e220ca493
-oldpass localhost 378b243e220ca493
+oldauth localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
+oldpass localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
oldpassold localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
connect con,localhost,natauth,test,;
select current_user();
@@ -85,7 +95,12 @@ set password for oldauth@localhost = PASSWORD('test2');
set password for oldpass@localhost = PASSWORD('test2');
set password for oldpassold@localhost = PASSWORD('test2');
select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
-user host password plugin authentication_string
+User Host Password plugin authentication_string
+invalidauth localhost invalid mysql_native_password invalid
+invalidmysql57auth localhost *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE mysql_native_password *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE
+invalidpass localhost invalid mysql_native_password invalid
+invalidpassnat localhost invalid mysql_native_password invalid
+mariadb.sys localhost mysql_native_password
natauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
newpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
newpassnat localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
@@ -139,6 +154,18 @@ select current_user();
current_user()
newpassnat@localhost
disconnect con;
+connect(localhost,invalidauth,invalid,test,MASTER_PORT,MASTER_SOCKET);
+connect con,localhost,invalidauth,invalid,;
+ERROR 28000: Access denied for user 'invalidauth'@'localhost' (using password: YES)
+connect(localhost,invalidpass,invalid,test,MASTER_PORT,MASTER_SOCKET);
+connect con,localhost,invalidpass,invalid,;
+ERROR 28000: Access denied for user 'invalidpass'@'localhost' (using password: YES)
+connect(localhost,invalidpassnat,invalid,test,MASTER_PORT,MASTER_SOCKET);
+connect con,localhost,invalidpassnat,invalid,;
+ERROR 28000: Access denied for user 'invalidpassnat'@'localhost' (using password: YES)
+connect(localhost,invalidmysql57auth,invalid,test,MASTER_PORT,MASTER_SOCKET);
+connect con,localhost,invalidmysql57auth,invalid,;
+ERROR 28000: Access denied for user 'invalidmysql57auth'@'localhost' (using password: YES)
connect con,localhost,oldauth,test2,;
select current_user();
current_user()
@@ -156,8 +183,10 @@ oldpassold@localhost
disconnect con;
connection default;
drop user natauth@localhost, newpass@localhost, newpassnat@localhost;
+drop user invalidauth@localhost, invalidpass@localhost, invalidpassnat@localhost,invalidmysql57auth@localhost;
drop user oldauth@localhost, oldpass@localhost, oldpassold@localhost;
set global secure_auth=default;
+# switching from mysql.global_priv to mysql.user
create user foo@localhost identified with mysql_native_password;
update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost';
set password for 'foo'@'localhost' = password('bar');
@@ -173,9 +202,10 @@ disconnect foo;
connection default;
select user,host,password,plugin,authentication_string from mysql.user where user='foo';
user host password plugin authentication_string
-foo localhost *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
+foo localhost mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
set password for 'foo'@'localhost' = '';
select user,host,password,plugin,authentication_string from mysql.user where user='foo';
user host password plugin authentication_string
foo localhost mysql_native_password
drop user foo@localhost;
+# switching back from mysql.user to mysql.global_priv
diff --git a/mysql-test/main/set_password.test b/mysql-test/main/set_password.test
index fc1ecb5ef5c..ec652a09274 100644
--- a/mysql-test/main/set_password.test
+++ b/mysql-test/main/set_password.test
@@ -12,11 +12,18 @@ set global secure_auth=0;
# The hash (old and new) is for 'test'
create user natauth@localhost identified via 'mysql_native_password' using '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
+create user invalidauth@localhost identified via 'mysql_native_password' using 'invalid';
+
create user newpass@localhost identified by password '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
+create user invalidpass@localhost identified by password 'invalid';
+
create user newpassnat@localhost identified via 'mysql_native_password';
set password for newpassnat@localhost = '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
+create user invalidpassnat@localhost identified by password 'invalid';
+set password for invalidpassnat@localhost = 'invalid';
+
create user oldauth@localhost identified with 'mysql_old_password' using '378b243e220ca493';
create user oldpass@localhost identified by password '378b243e220ca493';
@@ -24,6 +31,8 @@ create user oldpass@localhost identified by password '378b243e220ca493';
create user oldpassold@localhost identified with 'mysql_old_password';
set password for oldpassold@localhost = '378b243e220ca493';
+create user invalidmysql57auth@localhost identified via 'mysql_native_password' using '*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE';
+
--sorted_result
select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
@@ -114,6 +123,20 @@ select current_user();
--connect(con,localhost,newpassnat,test2,)
select current_user();
--disconnect con
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+--connect(con,localhost,invalidauth,invalid,)
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+--connect(con,localhost,invalidpass,invalid,)
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+--connect(con,localhost,invalidpassnat,invalid,)
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+--connect(con,localhost,invalidmysql57auth,invalid,)
+
--connect(con,localhost,oldauth,test2,)
select current_user();
--disconnect con
@@ -126,12 +149,14 @@ select current_user();
--connection default
drop user natauth@localhost, newpass@localhost, newpassnat@localhost;
+drop user invalidauth@localhost, invalidpass@localhost, invalidpassnat@localhost,invalidmysql57auth@localhost;
drop user oldauth@localhost, oldpass@localhost, oldpassold@localhost;
set global secure_auth=default;
#
# MDEV-16238 root/localhost authn prioritizes authentication_string over Password
#
+--source include/switch_to_mysql_user.inc
create user foo@localhost identified with mysql_native_password;
update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost';
set password for 'foo'@'localhost' = password('bar');
@@ -145,3 +170,4 @@ select user,host,password,plugin,authentication_string from mysql.user where use
set password for 'foo'@'localhost' = '';
select user,host,password,plugin,authentication_string from mysql.user where user='foo';
drop user foo@localhost;
+--source include/switch_to_mysql_global_priv.inc
diff --git a/mysql-test/main/set_statement.result b/mysql-test/main/set_statement.result
index 9e9d7e8c74e..0197495cc0d 100644
--- a/mysql-test/main/set_statement.result
+++ b/mysql-test/main/set_statement.result
@@ -1254,3 +1254,21 @@ select @@log_queries_not_using_indexes;
#
# End of 10.3 tests
#
+create table t (a int);
+SET sql_mode=ORACLE;
+SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
+Table Op Msg_type Msg_text
+test.t optimize status Table is already up to date
+SET sql_mode=default;
+SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
+Table Op Msg_type Msg_text
+test.t optimize status Table is already up to date
+drop table t;
+#
+# MDEV-18358: Server crash when using SET STATEMENT max_statement_time
+#
+SET sql_mode=ORACLE;
+SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unknown';
+SET sql_mode=default;
+SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unknown';
+# End of 10.4 tests
diff --git a/mysql-test/main/set_statement.test b/mysql-test/main/set_statement.test
index 0df223860b9..0bf9f423dab 100644
--- a/mysql-test/main/set_statement.test
+++ b/mysql-test/main/set_statement.test
@@ -1137,6 +1137,7 @@ while ($1)
--echo # @rnd should be 0
select @rnd;
+
--echo #
--echo # MDEV-24860: Incorrect behaviour of SET STATEMENT in case
--echo # it is executed as a prepared statement
@@ -1169,3 +1170,21 @@ select @@log_queries_not_using_indexes;
--echo #
--echo # End of 10.3 tests
--echo #
+
+create table t (a int);
+SET sql_mode=ORACLE;
+SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
+SET sql_mode=default;
+SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
+drop table t;
+
+
+--echo #
+--echo # MDEV-18358: Server crash when using SET STATEMENT max_statement_time
+--echo #
+SET sql_mode=ORACLE;
+SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unknown';
+SET sql_mode=default;
+SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unknown';
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/shm-master.opt b/mysql-test/main/shm-master.opt
deleted file mode 100644
index d71395213b1..00000000000
--- a/mysql-test/main/shm-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---skip-grant-tables --loose-shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$MTR_BUILD_THREAD --loose-shared-memory=1
diff --git a/mysql-test/main/shm.result b/mysql-test/main/shm.result
deleted file mode 100644
index beaa2ecd3a7..00000000000
--- a/mysql-test/main/shm.result
+++ /dev/null
@@ -1,2173 +0,0 @@
-connect shm_con,localhost,root,,,,$shm_name,SHM;
-drop table if exists t1,t2,t3,t4;
-CREATE TABLE t1 (
-Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
-Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
-);
-INSERT INTO t1 VALUES (9410,9412);
-select period from t1;
-period
-9410
-select * from t1;
-Period Varor_period
-9410 9412
-select t1.* from t1;
-Period Varor_period
-9410 9412
-CREATE TABLE t2 (
-auto int not null auto_increment,
-fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,
-companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL,
-fld3 char(30) DEFAULT '' NOT NULL,
-fld4 char(35) DEFAULT '' NOT NULL,
-fld5 char(35) DEFAULT '' NOT NULL,
-fld6 char(4) DEFAULT '' NOT NULL,
-UNIQUE fld1 (fld1),
-KEY fld3 (fld3),
-PRIMARY KEY (auto)
-);
-select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
-fld3
-imaginable
-select fld3 from t2 where fld3 like "%cultivation" ;
-fld3
-cultivation
-select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
-fld3 companynr
-concoct 58
-druggists 58
-engrossing 58
-Eurydice 58
-exclaimers 58
-ferociousness 58
-hopelessness 58
-Huey 58
-imaginable 58
-judges 58
-merging 58
-ostrich 58
-peering 58
-Phelps 58
-presumes 58
-Ruth 58
-sentences 58
-Shylock 58
-straggled 58
-synergy 58
-thanking 58
-tying 58
-unlocks 58
-select fld3,companynr from t2 where companynr = 58 order by fld3;
-fld3 companynr
-concoct 58
-druggists 58
-engrossing 58
-Eurydice 58
-exclaimers 58
-ferociousness 58
-hopelessness 58
-Huey 58
-imaginable 58
-judges 58
-merging 58
-ostrich 58
-peering 58
-Phelps 58
-presumes 58
-Ruth 58
-sentences 58
-Shylock 58
-straggled 58
-synergy 58
-thanking 58
-tying 58
-unlocks 58
-select fld3 from t2 order by fld3 desc limit 10;
-fld3
-youthfulness
-yelped
-Wotan
-workers
-Witt
-witchcraft
-Winsett
-Willy
-willed
-wildcats
-select fld3 from t2 order by fld3 desc limit 5;
-fld3
-youthfulness
-yelped
-Wotan
-workers
-Witt
-select fld3 from t2 order by fld3 desc limit 5,5;
-fld3
-witchcraft
-Winsett
-Willy
-willed
-wildcats
-select t2.fld3 from t2 where fld3 = 'honeysuckle';
-fld3
-honeysuckle
-select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
-fld3
-honeysuckle
-select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
-fld3
-honeysuckle
-select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
-fld3
-honeysuckle
-select t2.fld3 from t2 where fld3 LIKE 'h%le';
-fld3
-honeysuckle
-select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
-fld3
-select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
-fld3
-explain select t2.fld3 from t2 where fld3 = 'honeysuckle';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
-explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
-explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
-explain select fld3 from t2 ignore index (fld3,not_used);
-ERROR 42000: Key 'not_used' doesn't exist in table 't2'
-explain select fld3 from t2 use index (not_used);
-ERROR 42000: Key 'not_used' doesn't exist in table 't2'
-select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
-fld3
-honeysuckle
-honoring
-explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range fld3 fld3 30 NULL 2 Using where; Using index
-select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
-fld1 fld3
-148504 Colombo
-068305 Colombo
-000000 nondecreasing
-select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes';
-fld1 fld3
-232605 appendixes
-1232605 appendixes
-1232606 appendixes
-1232607 appendixes
-1232608 appendixes
-1232609 appendixes
-select fld1 from t2 where fld1=250501 or fld1="250502";
-fld1
-250501
-250502
-explain select fld1 from t2 where fld1=250501 or fld1="250502";
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range fld1 fld1 4 NULL 2 Using where; Using index
-select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
-fld1
-250501
-250502
-250505
-250601
-explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
-select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
-fld1 fld3
-012001 flanking
-013602 foldout
-013606 fingerings
-018007 fanatic
-018017 featherweight
-018054 fetters
-018103 flint
-018104 flopping
-036002 funereal
-038017 fetched
-038205 firearm
-058004 Fenton
-088303 feminine
-186002 freakish
-188007 flurried
-188505 fitting
-198006 furthermore
-202301 Fitzpatrick
-208101 fiftieth
-208113 freest
-218008 finishers
-218022 feed
-218401 faithful
-226205 foothill
-226209 furnishings
-228306 forthcoming
-228311 fated
-231315 freezes
-232102 forgivably
-238007 filial
-238008 fixedly
-select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
-fld3
-select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
-fld3
-Chantilly
-select fld1,fld3 from t2 where fld1 like "25050%";
-fld1 fld3
-250501 poisoning
-250502 Iraqis
-250503 heaving
-250504 population
-250505 bomb
-select fld1,fld3 from t2 where fld1 like "25050_";
-fld1 fld3
-250501 poisoning
-250502 Iraqis
-250503 heaving
-250504 population
-250505 bomb
-select distinct companynr from t2;
-companynr
-00
-37
-36
-50
-58
-29
-40
-53
-65
-41
-34
-68
-select distinct companynr from t2 order by companynr;
-companynr
-00
-29
-34
-36
-37
-40
-41
-50
-53
-58
-65
-68
-select distinct companynr from t2 order by companynr desc;
-companynr
-68
-65
-58
-53
-50
-41
-40
-37
-36
-34
-29
-00
-select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
-fld3 period
-obliterates 9410
-offload 9410
-opaquely 9410
-organizer 9410
-overestimating 9410
-overlay 9410
-select distinct fld3 from t2 where companynr = 34 order by fld3;
-fld3
-absentee
-accessed
-ahead
-alphabetic
-Asiaticizations
-attitude
-aye
-bankruptcies
-belays
-Blythe
-bomb
-boulevard
-bulldozes
-cannot
-caressing
-charcoal
-checksumming
-chess
-clubroom
-colorful
-cosy
-creator
-crying
-Darius
-diffusing
-duality
-Eiffel
-Epiphany
-Ernestine
-explorers
-exterminated
-famine
-forked
-Gershwins
-heaving
-Hodges
-Iraqis
-Italianization
-Lagos
-landslide
-libretto
-Majorca
-mastering
-narrowed
-occurred
-offerers
-Palestine
-Peruvianizes
-pharmaceutic
-poisoning
-population
-Pygmalion
-rats
-realest
-recording
-regimented
-retransmitting
-reviver
-rouses
-scars
-sicker
-sleepwalk
-stopped
-sugars
-translatable
-uncles
-unexpected
-uprisings
-versatility
-vest
-select distinct fld3 from t2 limit 10;
-fld3
-abates
-abiding
-Abraham
-abrogating
-absentee
-abut
-accessed
-accruing
-accumulating
-accuracies
-select distinct fld3 from t2 having fld3 like "A%" limit 10;
-fld3
-abates
-abiding
-Abraham
-abrogating
-absentee
-abut
-accessed
-accruing
-accumulating
-accuracies
-select distinct substring(fld3,1,3) from t2 where fld3 like "A%";
-substring(fld3,1,3)
-aba
-abi
-Abr
-abs
-abu
-acc
-acq
-acu
-Ade
-adj
-Adl
-adm
-Ado
-ads
-adv
-aer
-aff
-afi
-afl
-afo
-agi
-ahe
-aim
-air
-Ald
-alg
-ali
-all
-alp
-alr
-ama
-ame
-amm
-ana
-and
-ane
-Ang
-ani
-Ann
-Ant
-api
-app
-aqu
-Ara
-arc
-Arm
-arr
-Art
-Asi
-ask
-asp
-ass
-ast
-att
-aud
-Aug
-aut
-ave
-avo
-awe
-aye
-Azt
-select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10;
-a
-aba
-abi
-Abr
-abs
-abu
-acc
-acq
-acu
-Ade
-adj
-select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10;
-substring(fld3,1,3)
-aba
-abi
-Abr
-abs
-abu
-acc
-acq
-acu
-Ade
-adj
-select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
-a
-aba
-abi
-Abr
-abs
-abu
-acc
-acq
-acu
-Ade
-adj
-create table t3 (
-period int not null,
-name char(32) not null,
-companynr int not null,
-price double(11,0),
-price2 double(11,0),
-key (period),
-key (name)
-);
-create temporary table tmp engine = myisam select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-insert into tmp select * from t3;
-insert into t3 select * from tmp;
-alter table t3 add t2nr int not null auto_increment primary key first;
-drop table tmp;
-SET BIG_TABLES=1;
-select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
-namn
-Abraham Abraham
-abrogating abrogating
-admonishing admonishing
-Adolph Adolph
-afield afield
-aging aging
-ammonium ammonium
-analyzable analyzable
-animals animals
-animized animized
-SET BIG_TABLES=0;
-select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
-concat(fld3," ",fld3)
-Abraham Abraham
-abrogating abrogating
-admonishing admonishing
-Adolph Adolph
-afield afield
-aging aging
-ammonium ammonium
-analyzable analyzable
-animals animals
-animized animized
-select distinct fld5 from t2 limit 10;
-fld5
-neat
-Steinberg
-jarring
-tinily
-balled
-persist
-attainments
-fanatic
-measures
-rightfulness
-select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-fld3 count(*)
-affixed 1
-and 1
-annoyers 1
-Anthony 1
-assayed 1
-assurers 1
-attendants 1
-bedlam 1
-bedpost 1
-boasted 1
-SET BIG_TABLES=1;
-select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-fld3 count(*)
-affixed 1
-and 1
-annoyers 1
-Anthony 1
-assayed 1
-assurers 1
-attendants 1
-bedlam 1
-bedpost 1
-boasted 1
-SET BIG_TABLES=0;
-select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
-fld3 repeat("a",length(fld3)) count(*)
-circus aaaaaa 1
-cited aaaaa 1
-Colombo aaaaaaa 1
-congresswoman aaaaaaaaaaaaa 1
-contrition aaaaaaaaaa 1
-corny aaaaa 1
-cultivation aaaaaaaaaaa 1
-definiteness aaaaaaaaaaaa 1
-demultiplex aaaaaaaaaaa 1
-disappointing aaaaaaaaaaaaa 1
-select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2;
-companynr rtrim(space(512+companynr))
-37
-78
-101
-154
-311
-447
-512
-select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3;
-fld3
-explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
-explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181
-explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index period period 4 NULL 1
-1 SIMPLE t1 ref period period 4 test.t3.period 4181
-explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index period period 4 NULL 1
-1 SIMPLE t3 ref period period 4 test.t1.period 4181
-select period from t1;
-period
-9410
-select period from t1 where period=1900;
-period
-select fld3,period from t1,t2 where fld1 = 011401 order by period;
-fld3 period
-breaking 9410
-select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001;
-fld3 period
-breaking 1001
-explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 const fld1 fld1 4 const 1
-1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1
-select fld3,period from t2,t1 where companynr*10 = 37*10;
-fld3 period
-breaking 9410
-Romans 9410
-intercepted 9410
-bewilderingly 9410
-astound 9410
-admonishing 9410
-sumac 9410
-flanking 9410
-combed 9410
-subjective 9410
-scatterbrain 9410
-Eulerian 9410
-Kane 9410
-overlay 9410
-perturb 9410
-goblins 9410
-annihilates 9410
-Wotan 9410
-snatching 9410
-concludes 9410
-laterally 9410
-yelped 9410
-grazing 9410
-Baird 9410
-celery 9410
-misunderstander 9410
-handgun 9410
-foldout 9410
-mystic 9410
-succumbed 9410
-Nabisco 9410
-fingerings 9410
-aging 9410
-afield 9410
-ammonium 9410
-boat 9410
-intelligibility 9410
-Augustine 9410
-teethe 9410
-dreaded 9410
-scholastics 9410
-audiology 9410
-wallet 9410
-parters 9410
-eschew 9410
-quitter 9410
-neat 9410
-Steinberg 9410
-jarring 9410
-tinily 9410
-balled 9410
-persist 9410
-attainments 9410
-fanatic 9410
-measures 9410
-rightfulness 9410
-capably 9410
-impulsive 9410
-starlet 9410
-terminators 9410
-untying 9410
-announces 9410
-featherweight 9410
-pessimist 9410
-daughter 9410
-decliner 9410
-lawgiver 9410
-stated 9410
-readable 9410
-attrition 9410
-cascade 9410
-motors 9410
-interrogate 9410
-pests 9410
-stairway 9410
-dopers 9410
-testicle 9410
-Parsifal 9410
-leavings 9410
-postulation 9410
-squeaking 9410
-contrasted 9410
-leftover 9410
-whiteners 9410
-erases 9410
-Punjab 9410
-Merritt 9410
-Quixotism 9410
-sweetish 9410
-dogging 9410
-scornfully 9410
-bellow 9410
-bills 9410
-cupboard 9410
-sureties 9410
-puddings 9410
-fetters 9410
-bivalves 9410
-incurring 9410
-Adolph 9410
-pithed 9410
-Miles 9410
-trimmings 9410
-tragedies 9410
-skulking 9410
-flint 9410
-flopping 9410
-relaxing 9410
-offload 9410
-suites 9410
-lists 9410
-animized 9410
-multilayer 9410
-standardizes 9410
-Judas 9410
-vacuuming 9410
-dentally 9410
-humanness 9410
-inch 9410
-Weissmuller 9410
-irresponsibly 9410
-luckily 9410
-culled 9410
-medical 9410
-bloodbath 9410
-subschema 9410
-animals 9410
-Micronesia 9410
-repetitions 9410
-Antares 9410
-ventilate 9410
-pityingly 9410
-interdependent 9410
-Graves 9410
-neonatal 9410
-chafe 9410
-honoring 9410
-realtor 9410
-elite 9410
-funereal 9410
-abrogating 9410
-sorters 9410
-Conley 9410
-lectured 9410
-Abraham 9410
-Hawaii 9410
-cage 9410
-hushes 9410
-Simla 9410
-reporters 9410
-Dutchman 9410
-descendants 9410
-groupings 9410
-dissociate 9410
-coexist 9410
-Beebe 9410
-Taoism 9410
-Connally 9410
-fetched 9410
-checkpoints 9410
-rusting 9410
-galling 9410
-obliterates 9410
-traitor 9410
-resumes 9410
-analyzable 9410
-terminator 9410
-gritty 9410
-firearm 9410
-minima 9410
-Selfridge 9410
-disable 9410
-witchcraft 9410
-betroth 9410
-Manhattanize 9410
-imprint 9410
-peeked 9410
-swelling 9410
-interrelationships 9410
-riser 9410
-Gandhian 9410
-peacock 9410
-bee 9410
-kanji 9410
-dental 9410
-scarf 9410
-chasm 9410
-insolence 9410
-syndicate 9410
-alike 9410
-imperial 9410
-convulsion 9410
-railway 9410
-validate 9410
-normalizes 9410
-comprehensive 9410
-chewing 9410
-denizen 9410
-schemer 9410
-chronicle 9410
-Kline 9410
-Anatole 9410
-partridges 9410
-brunch 9410
-recruited 9410
-dimensions 9410
-Chicana 9410
-announced 9410
-praised 9410
-employing 9410
-linear 9410
-quagmire 9410
-western 9410
-relishing 9410
-serving 9410
-scheduling 9410
-lore 9410
-eventful 9410
-arteriole 9410
-disentangle 9410
-cured 9410
-Fenton 9410
-avoidable 9410
-drains 9410
-detectably 9410
-husky 9410
-impelling 9410
-undoes 9410
-evened 9410
-squeezes 9410
-destroyer 9410
-rudeness 9410
-beaner 9410
-boorish 9410
-Everhart 9410
-encompass 9410
-mushrooms 9410
-Alison 9410
-externally 9410
-pellagra 9410
-cult 9410
-creek 9410
-Huffman 9410
-Majorca 9410
-governing 9410
-gadfly 9410
-reassigned 9410
-intentness 9410
-craziness 9410
-psychic 9410
-squabbled 9410
-burlesque 9410
-capped 9410
-extracted 9410
-DiMaggio 9410
-exclamation 9410
-subdirectory 9410
-Gothicism 9410
-feminine 9410
-metaphysically 9410
-sanding 9410
-Miltonism 9410
-freakish 9410
-index 9410
-straight 9410
-flurried 9410
-denotative 9410
-coming 9410
-commencements 9410
-gentleman 9410
-gifted 9410
-Shanghais 9410
-sportswriting 9410
-sloping 9410
-navies 9410
-leaflet 9410
-shooter 9410
-Joplin 9410
-babies 9410
-assails 9410
-admiring 9410
-swaying 9410
-Goldstine 9410
-fitting 9410
-Norwalk 9410
-analogy 9410
-deludes 9410
-cokes 9410
-Clayton 9410
-exhausts 9410
-causality 9410
-sating 9410
-icon 9410
-throttles 9410
-communicants 9410
-dehydrate 9410
-priceless 9410
-publicly 9410
-incidentals 9410
-commonplace 9410
-mumbles 9410
-furthermore 9410
-cautioned 9410
-parametrized 9410
-registration 9410
-sadly 9410
-positioning 9410
-babysitting 9410
-eternal 9410
-hoarder 9410
-congregates 9410
-rains 9410
-workers 9410
-sags 9410
-unplug 9410
-garage 9410
-boulder 9410
-specifics 9410
-Teresa 9410
-Winsett 9410
-convenient 9410
-buckboards 9410
-amenities 9410
-resplendent 9410
-sews 9410
-participated 9410
-Simon 9410
-certificates 9410
-Fitzpatrick 9410
-Evanston 9410
-misted 9410
-textures 9410
-save 9410
-count 9410
-rightful 9410
-chaperone 9410
-Lizzy 9410
-clenched 9410
-effortlessly 9410
-accessed 9410
-beaters 9410
-Hornblower 9410
-vests 9410
-indulgences 9410
-infallibly 9410
-unwilling 9410
-excrete 9410
-spools 9410
-crunches 9410
-overestimating 9410
-ineffective 9410
-humiliation 9410
-sophomore 9410
-star 9410
-rifles 9410
-dialysis 9410
-arriving 9410
-indulge 9410
-clockers 9410
-languages 9410
-Antarctica 9410
-percentage 9410
-ceiling 9410
-specification 9410
-regimented 9410
-ciphers 9410
-pictures 9410
-serpents 9410
-allot 9410
-realized 9410
-mayoral 9410
-opaquely 9410
-hostess 9410
-fiftieth 9410
-incorrectly 9410
-decomposition 9410
-stranglings 9410
-mixture 9410
-electroencephalography 9410
-similarities 9410
-charges 9410
-freest 9410
-Greenberg 9410
-tinting 9410
-expelled 9410
-warm 9410
-smoothed 9410
-deductions 9410
-Romano 9410
-bitterroot 9410
-corset 9410
-securing 9410
-environing 9410
-cute 9410
-Crays 9410
-heiress 9410
-inform 9410
-avenge 9410
-universals 9410
-Kinsey 9410
-ravines 9410
-bestseller 9410
-equilibrium 9410
-extents 9410
-relatively 9410
-pressure 9410
-critiques 9410
-befouled 9410
-rightfully 9410
-mechanizing 9410
-Latinizes 9410
-timesharing 9410
-Aden 9410
-embassies 9410
-males 9410
-shapelessly 9410
-mastering 9410
-Newtonian 9410
-finishers 9410
-abates 9410
-teem 9410
-kiting 9410
-stodgy 9410
-feed 9410
-guitars 9410
-airships 9410
-store 9410
-denounces 9410
-Pyle 9410
-Saxony 9410
-serializations 9410
-Peruvian 9410
-taxonomically 9410
-kingdom 9410
-stint 9410
-Sault 9410
-faithful 9410
-Ganymede 9410
-tidiness 9410
-gainful 9410
-contrary 9410
-Tipperary 9410
-tropics 9410
-theorizers 9410
-renew 9410
-already 9410
-terminal 9410
-Hegelian 9410
-hypothesizer 9410
-warningly 9410
-journalizing 9410
-nested 9410
-Lars 9410
-saplings 9410
-foothill 9410
-labeled 9410
-imperiously 9410
-reporters 9410
-furnishings 9410
-precipitable 9410
-discounts 9410
-excises 9410
-Stalin 9410
-despot 9410
-ripeness 9410
-Arabia 9410
-unruly 9410
-mournfulness 9410
-boom 9410
-slaughter 9410
-Sabine 9410
-handy 9410
-rural 9410
-organizer 9410
-shipyard 9410
-civics 9410
-inaccuracy 9410
-rules 9410
-juveniles 9410
-comprised 9410
-investigations 9410
-stabilizes 9410
-seminaries 9410
-Hunter 9410
-sporty 9410
-test 9410
-weasels 9410
-CERN 9410
-tempering 9410
-afore 9410
-Galatean 9410
-techniques 9410
-error 9410
-veranda 9410
-severely 9410
-Cassites 9410
-forthcoming 9410
-guides 9410
-vanish 9410
-lied 9410
-sawtooth 9410
-fated 9410
-gradually 9410
-widens 9410
-preclude 9410
-evenhandedly 9410
-percentage 9410
-disobedience 9410
-humility 9410
-gleaning 9410
-petted 9410
-bloater 9410
-minion 9410
-marginal 9410
-apiary 9410
-measures 9410
-precaution 9410
-repelled 9410
-primary 9410
-coverings 9410
-Artemia 9410
-navigate 9410
-spatial 9410
-Gurkha 9410
-meanwhile 9410
-Melinda 9410
-Butterfield 9410
-Aldrich 9410
-previewing 9410
-glut 9410
-unaffected 9410
-inmate 9410
-mineral 9410
-impending 9410
-meditation 9410
-ideas 9410
-miniaturizes 9410
-lewdly 9410
-title 9410
-youthfulness 9410
-creak 9410
-Chippewa 9410
-clamored 9410
-freezes 9410
-forgivably 9410
-reduce 9410
-McGovern 9410
-Nazis 9410
-epistle 9410
-socializes 9410
-conceptions 9410
-Kevin 9410
-uncovering 9410
-chews 9410
-appendixes 9410
-appendixes 9410
-appendixes 9410
-appendixes 9410
-appendixes 9410
-appendixes 9410
-raining 9410
-infest 9410
-compartment 9410
-minting 9410
-ducks 9410
-roped 9410
-waltz 9410
-Lillian 9410
-repressions 9410
-chillingly 9410
-noncritical 9410
-lithograph 9410
-spongers 9410
-parenthood 9410
-posed 9410
-instruments 9410
-filial 9410
-fixedly 9410
-relives 9410
-Pandora 9410
-watering 9410
-ungrateful 9410
-secures 9410
-poison 9410
-dusted 9410
-encompasses 9410
-presentation 9410
-Kantian 9410
-select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price;
-fld3 period price price2
-admonishing 1002 28357832 8723648
-analyzable 1002 28357832 8723648
-annihilates 1001 5987435 234724
-Antares 1002 28357832 8723648
-astound 1001 5987435 234724
-audiology 1001 5987435 234724
-Augustine 1002 28357832 8723648
-Baird 1002 28357832 8723648
-bewilderingly 1001 5987435 234724
-breaking 1001 5987435 234724
-Conley 1001 5987435 234724
-dentally 1002 28357832 8723648
-dissociate 1002 28357832 8723648
-elite 1001 5987435 234724
-eschew 1001 5987435 234724
-Eulerian 1001 5987435 234724
-flanking 1001 5987435 234724
-foldout 1002 28357832 8723648
-funereal 1002 28357832 8723648
-galling 1002 28357832 8723648
-Graves 1001 5987435 234724
-grazing 1001 5987435 234724
-groupings 1001 5987435 234724
-handgun 1001 5987435 234724
-humility 1002 28357832 8723648
-impulsive 1002 28357832 8723648
-inch 1001 5987435 234724
-intelligibility 1001 5987435 234724
-jarring 1001 5987435 234724
-lawgiver 1001 5987435 234724
-lectured 1002 28357832 8723648
-Merritt 1002 28357832 8723648
-neonatal 1001 5987435 234724
-offload 1002 28357832 8723648
-parters 1002 28357832 8723648
-pityingly 1002 28357832 8723648
-puddings 1002 28357832 8723648
-Punjab 1001 5987435 234724
-quitter 1002 28357832 8723648
-realtor 1001 5987435 234724
-relaxing 1001 5987435 234724
-repetitions 1001 5987435 234724
-resumes 1001 5987435 234724
-Romans 1002 28357832 8723648
-rusting 1001 5987435 234724
-scholastics 1001 5987435 234724
-skulking 1002 28357832 8723648
-stated 1002 28357832 8723648
-suites 1002 28357832 8723648
-sureties 1001 5987435 234724
-testicle 1002 28357832 8723648
-tinily 1002 28357832 8723648
-tragedies 1001 5987435 234724
-trimmings 1001 5987435 234724
-vacuuming 1001 5987435 234724
-ventilate 1001 5987435 234724
-wallet 1001 5987435 234724
-Weissmuller 1002 28357832 8723648
-Wotan 1002 28357832 8723648
-select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37;
-fld1 fld3 period price price2
-018201 relaxing 1001 5987435 234724
-018601 vacuuming 1001 5987435 234724
-018801 inch 1001 5987435 234724
-018811 repetitions 1001 5987435 234724
-create table t4 (
-companynr tinyint(2) unsigned zerofill NOT NULL default '00',
-companyname char(30) NOT NULL default '',
-PRIMARY KEY (companynr),
-UNIQUE KEY companyname(companyname)
-) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames';
-select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
-companynr companyname
-00 Unknown
-29 company 1
-34 company 2
-36 company 3
-37 company 4
-40 company 5
-41 company 6
-50 company 11
-53 company 7
-58 company 8
-65 company 9
-68 company 10
-select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
-companynr companyname
-00 Unknown
-29 company 1
-34 company 2
-36 company 3
-37 company 4
-40 company 5
-41 company 6
-50 company 11
-53 company 7
-58 company 8
-65 company 9
-68 company 10
-select * from t1,t1 t12;
-Period Varor_period Period Varor_period
-9410 9412 9410 9412
-select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
-fld1 fld1
-250501 250501
-250502 250501
-250503 250501
-250504 250501
-250505 250501
-250501 250502
-250502 250502
-250503 250502
-250504 250502
-250505 250502
-250501 250503
-250502 250503
-250503 250503
-250504 250503
-250505 250503
-250501 250504
-250502 250504
-250503 250504
-250504 250504
-250505 250504
-250501 250505
-250502 250505
-250503 250505
-250504 250505
-250505 250505
-SET @local_optimizer_switch=@@optimizer_switch;
-set @local_join_cache_level=@@join_cache_level;
-set @@join_cache_level=2;
-set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
-insert into t2 (fld1, companynr) values (999999,99);
-select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
-companynr companyname
-99 NULL
-select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
-count(*)
-1199
-explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1200
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL NULL NULL NULL NULL 12
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists
-select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
-companynr companyname
-select count(*) from t2 left join t4 using (companynr) where companynr is not null;
-count(*)
-1200
-explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-delete from t2 where fld1=999999;
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
-explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL NULL NULL NULL NULL 12
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL NULL NULL NULL NULL 12
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-SET @@optimizer_switch=@local_optimizer_switch;
-select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
-companynr companynr
-37 36
-41 40
-explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
-SET @@join_cache_level=@local_join_cache_level;
-select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
-fld1 companynr fld3 period
-038008 37 reporters 1008
-038208 37 Selfridge 1008
-select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
-fld1 companynr fld3 period
-038008 37 reporters 1008
-038208 37 Selfridge 1008
-select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
-fld1 companynr fld3 period
-038008 37 reporters 1008
-038208 37 Selfridge 1008
-select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909);
-period
-9410
-select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6)));
-period
-9410
-select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
-fld1
-250501
-250502
-250503
-250505
-select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606);
-fld1
-250502
-250503
-select fld1 from t2 where fld1 between 250502 and 250504;
-fld1
-250502
-250503
-250504
-select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ;
-fld3
-label
-labeled
-labeled
-landslide
-laterally
-leaflet
-lewdly
-Lillian
-luckily
-select count(*) from t1;
-count(*)
-1
-select companynr,count(*),sum(fld1) from t2 group by companynr;
-companynr count(*) sum(fld1)
-00 82 10355753
-29 95 14473298
-34 70 17788966
-36 215 22786296
-37 588 83602098
-40 37 6618386
-41 52 12816335
-50 11 1595438
-53 4 793210
-58 23 2254293
-65 10 2284055
-68 12 3097288
-select companynr,count(*) from t2 group by companynr order by companynr desc limit 5;
-companynr count(*)
-68 12
-65 10
-58 23
-53 4
-50 11
-select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
-count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
-70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069
-explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where
-Warnings:
-Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> ''
-select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3;
-companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
-00 82 Anthony windmills 10355753 126289.6707 115550.9757 13352027981.7087
-29 95 abut wetness 14473298 152350.5053 8368.5480 70032594.9026
-34 70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069
-select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
-companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
-37 1 1 5987435 5987435 5987435 5987435.0000
-37 2 1 28357832 28357832 28357832 28357832.0000
-37 3 1 39654943 39654943 39654943 39654943.0000
-37 11 1 5987435 5987435 5987435 5987435.0000
-37 12 1 28357832 28357832 28357832 28357832.0000
-37 13 1 39654943 39654943 39654943 39654943.0000
-37 21 1 5987435 5987435 5987435 5987435.0000
-37 22 1 28357832 28357832 28357832 28357832.0000
-37 23 1 39654943 39654943 39654943 39654943.0000
-37 31 1 5987435 5987435 5987435 5987435.0000
-select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
-companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
-37 1 1 5987435 5987435 5987435 5987435.0000
-37 2 1 28357832 28357832 28357832 28357832.0000
-37 3 1 39654943 39654943 39654943 39654943.0000
-37 11 1 5987435 5987435 5987435 5987435.0000
-37 12 1 28357832 28357832 28357832 28357832.0000
-37 13 1 39654943 39654943 39654943 39654943.0000
-37 21 1 5987435 5987435 5987435 5987435.0000
-37 22 1 28357832 28357832 28357832 28357832.0000
-37 23 1 39654943 39654943 39654943 39654943.0000
-37 31 1 5987435 5987435 5987435 5987435.0000
-select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ;
-companynr count(price) sum(price) min(price) max(price) avg(price)
-37 12543 309394878010 5987435 39654943 24666736.6667
-78 8362 414611089292 726498 98439034 49582766.0000
-101 4181 3489454238 834598 834598 834598.0000
-154 4181 4112197254950 983543950 983543950 983543950.0000
-311 4181 979599938 234298 234298 234298.0000
-447 4181 9929180954 2374834 2374834 2374834.0000
-512 4181 3288532102 786542 786542 786542.0000
-select distinct mod(companynr,10) from t4 group by companynr;
-mod(companynr,10)
-0
-9
-4
-6
-7
-1
-3
-8
-5
-select distinct 1 from t4 group by companynr;
-1
-1
-select count(distinct fld1) from t2;
-count(distinct fld1)
-1199
-select companynr,count(distinct fld1) from t2 group by companynr;
-companynr count(distinct fld1)
-00 82
-29 95
-34 70
-36 215
-37 588
-40 37
-41 52
-50 11
-53 4
-58 23
-65 10
-68 12
-select companynr,count(*) from t2 group by companynr;
-companynr count(*)
-00 82
-29 95
-34 70
-36 215
-37 588
-40 37
-41 52
-50 11
-53 4
-58 23
-65 10
-68 12
-select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr;
-companynr count(distinct concat(fld1,repeat(65,1000)))
-00 82
-29 95
-34 70
-36 215
-37 588
-40 37
-41 52
-50 11
-53 4
-58 23
-65 10
-68 12
-select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr;
-companynr count(distinct concat(fld1,repeat(65,200)))
-00 82
-29 95
-34 70
-36 215
-37 588
-40 37
-41 52
-50 11
-53 4
-58 23
-65 10
-68 12
-select companynr,count(distinct floor(fld1/100)) from t2 group by companynr;
-companynr count(distinct floor(fld1/100))
-00 47
-29 35
-34 14
-36 69
-37 108
-40 16
-41 11
-50 9
-53 1
-58 1
-65 1
-68 1
-select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr;
-companynr count(distinct concat(repeat(65,1000),floor(fld1/100)))
-00 47
-29 35
-34 14
-36 69
-37 108
-40 16
-41 11
-50 9
-53 1
-58 1
-65 1
-68 1
-select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10;
-sum(fld1) fld3
-11402 Romans
-select name,count(*) from t3 where name='cloakroom' group by name;
-name count(*)
-cloakroom 4181
-select name,count(*) from t3 where name='cloakroom' and price>10 group by name;
-name count(*)
-cloakroom 4181
-select count(*) from t3 where name='cloakroom' and price2=823742;
-count(*)
-4181
-select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name;
-name count(*)
-cloakroom 4181
-select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name;
-name count(*)
-extramarital 4181
-gazer 4181
-gems 4181
-Iranizes 4181
-spates 4181
-tucked 4181
-violinist 4181
-select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
-fld3 count(*)
-spates 4181
-select companynr|0,companyname from t4 group by 1;
-companynr|0 companyname
-0 Unknown
-29 company 1
-34 company 2
-36 company 3
-37 company 4
-40 company 5
-41 company 6
-50 company 11
-53 company 7
-58 company 8
-65 company 9
-68 company 10
-select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname;
-companynr companyname count(*)
-29 company 1 95
-68 company 10 12
-50 company 11 11
-34 company 2 70
-36 company 3 215
-37 company 4 588
-40 company 5 37
-41 company 6 52
-53 company 7 4
-58 company 8 23
-65 company 9 10
-00 Unknown 82
-select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
-fld1 count(*)
-158402 4181
-select sum(Period)/count(*) from t1;
-sum(Period)/count(*)
-9410.0000
-select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
-companynr count sum diff func
-37 12543 309394878010 0.0000 464091
-78 8362 414611089292 0.0000 652236
-101 4181 3489454238 0.0000 422281
-154 4181 4112197254950 0.0000 643874
-311 4181 979599938 0.0000 1300291
-447 4181 9929180954 0.0000 1868907
-512 4181 3288532102 0.0000 2140672
-select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg;
-companynr avg
-154 983543950.0000
-select companynr,count(*) from t2 group by companynr order by 2 desc;
-companynr count(*)
-37 588
-36 215
-29 95
-00 82
-34 70
-41 52
-40 37
-58 23
-68 12
-50 11
-65 10
-53 4
-select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc;
-companynr count(*)
-41 52
-58 23
-68 12
-50 11
-65 10
-53 4
-select t2.fld4,t2.fld1,count(price),sum(price),min(price),max(price),avg(price) from t3,t2 where t3.companynr = 37 and t2.fld1 = t3.t2nr group by fld1,t2.fld4;
-fld4 fld1 count(price) sum(price) min(price) max(price) avg(price)
-teethe 000001 1 5987435 5987435 5987435 5987435.0000
-dreaded 011401 1 5987435 5987435 5987435 5987435.0000
-scholastics 011402 1 28357832 28357832 28357832 28357832.0000
-audiology 011403 1 39654943 39654943 39654943 39654943.0000
-wallet 011501 1 5987435 5987435 5987435 5987435.0000
-parters 011701 1 5987435 5987435 5987435 5987435.0000
-eschew 011702 1 28357832 28357832 28357832 28357832.0000
-quitter 011703 1 39654943 39654943 39654943 39654943.0000
-neat 012001 1 5987435 5987435 5987435 5987435.0000
-Steinberg 012003 1 39654943 39654943 39654943 39654943.0000
-balled 012301 1 5987435 5987435 5987435 5987435.0000
-persist 012302 1 28357832 28357832 28357832 28357832.0000
-attainments 012303 1 39654943 39654943 39654943 39654943.0000
-capably 012501 1 5987435 5987435 5987435 5987435.0000
-impulsive 012602 1 28357832 28357832 28357832 28357832.0000
-starlet 012603 1 39654943 39654943 39654943 39654943.0000
-featherweight 012701 1 5987435 5987435 5987435 5987435.0000
-pessimist 012702 1 28357832 28357832 28357832 28357832.0000
-daughter 012703 1 39654943 39654943 39654943 39654943.0000
-lawgiver 013601 1 5987435 5987435 5987435 5987435.0000
-stated 013602 1 28357832 28357832 28357832 28357832.0000
-readable 013603 1 39654943 39654943 39654943 39654943.0000
-testicle 013801 1 5987435 5987435 5987435 5987435.0000
-Parsifal 013802 1 28357832 28357832 28357832 28357832.0000
-leavings 013803 1 39654943 39654943 39654943 39654943.0000
-squeaking 013901 1 5987435 5987435 5987435 5987435.0000
-contrasted 016001 1 5987435 5987435 5987435 5987435.0000
-leftover 016201 1 5987435 5987435 5987435 5987435.0000
-whiteners 016202 1 28357832 28357832 28357832 28357832.0000
-erases 016301 1 5987435 5987435 5987435 5987435.0000
-Punjab 016302 1 28357832 28357832 28357832 28357832.0000
-Merritt 016303 1 39654943 39654943 39654943 39654943.0000
-sweetish 018001 1 5987435 5987435 5987435 5987435.0000
-dogging 018002 1 28357832 28357832 28357832 28357832.0000
-scornfully 018003 1 39654943 39654943 39654943 39654943.0000
-fetters 018012 1 28357832 28357832 28357832 28357832.0000
-bivalves 018013 1 39654943 39654943 39654943 39654943.0000
-skulking 018021 1 5987435 5987435 5987435 5987435.0000
-flint 018022 1 28357832 28357832 28357832 28357832.0000
-flopping 018023 1 39654943 39654943 39654943 39654943.0000
-Judas 018032 1 28357832 28357832 28357832 28357832.0000
-vacuuming 018033 1 39654943 39654943 39654943 39654943.0000
-medical 018041 1 5987435 5987435 5987435 5987435.0000
-bloodbath 018042 1 28357832 28357832 28357832 28357832.0000
-subschema 018043 1 39654943 39654943 39654943 39654943.0000
-interdependent 018051 1 5987435 5987435 5987435 5987435.0000
-Graves 018052 1 28357832 28357832 28357832 28357832.0000
-neonatal 018053 1 39654943 39654943 39654943 39654943.0000
-sorters 018061 1 5987435 5987435 5987435 5987435.0000
-epistle 018062 1 28357832 28357832 28357832 28357832.0000
-Conley 018101 1 5987435 5987435 5987435 5987435.0000
-lectured 018102 1 28357832 28357832 28357832 28357832.0000
-Abraham 018103 1 39654943 39654943 39654943 39654943.0000
-cage 018201 1 5987435 5987435 5987435 5987435.0000
-hushes 018202 1 28357832 28357832 28357832 28357832.0000
-Simla 018402 1 28357832 28357832 28357832 28357832.0000
-reporters 018403 1 39654943 39654943 39654943 39654943.0000
-coexist 018601 1 5987435 5987435 5987435 5987435.0000
-Beebe 018602 1 28357832 28357832 28357832 28357832.0000
-Taoism 018603 1 39654943 39654943 39654943 39654943.0000
-Connally 018801 1 5987435 5987435 5987435 5987435.0000
-fetched 018802 1 28357832 28357832 28357832 28357832.0000
-checkpoints 018803 1 39654943 39654943 39654943 39654943.0000
-gritty 018811 1 5987435 5987435 5987435 5987435.0000
-firearm 018812 1 28357832 28357832 28357832 28357832.0000
-minima 019101 1 5987435 5987435 5987435 5987435.0000
-Selfridge 019102 1 28357832 28357832 28357832 28357832.0000
-disable 019103 1 39654943 39654943 39654943 39654943.0000
-witchcraft 019201 1 5987435 5987435 5987435 5987435.0000
-betroth 030501 1 5987435 5987435 5987435 5987435.0000
-Manhattanize 030502 1 28357832 28357832 28357832 28357832.0000
-imprint 030503 1 39654943 39654943 39654943 39654943.0000
-swelling 031901 1 5987435 5987435 5987435 5987435.0000
-interrelationships 036001 1 5987435 5987435 5987435 5987435.0000
-riser 036002 1 28357832 28357832 28357832 28357832.0000
-bee 038001 1 5987435 5987435 5987435 5987435.0000
-kanji 038002 1 28357832 28357832 28357832 28357832.0000
-dental 038003 1 39654943 39654943 39654943 39654943.0000
-railway 038011 1 5987435 5987435 5987435 5987435.0000
-validate 038012 1 28357832 28357832 28357832 28357832.0000
-normalizes 038013 1 39654943 39654943 39654943 39654943.0000
-Kline 038101 1 5987435 5987435 5987435 5987435.0000
-Anatole 038102 1 28357832 28357832 28357832 28357832.0000
-partridges 038103 1 39654943 39654943 39654943 39654943.0000
-recruited 038201 1 5987435 5987435 5987435 5987435.0000
-dimensions 038202 1 28357832 28357832 28357832 28357832.0000
-Chicana 038203 1 39654943 39654943 39654943 39654943.0000
-select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3;
-companynr fld3 sum(price)
-512 boat 786542
-512 capably 786542
-512 cupboard 786542
-512 decliner 786542
-512 descendants 786542
-512 dopers 786542
-512 erases 786542
-512 Micronesia 786542
-512 Miles 786542
-512 skies 786542
-select t2.companynr,count(*),min(fld3),max(fld3),sum(price),avg(price) from t2,t3 where t3.companynr >= 30 and t3.companynr <= 58 and t3.t2nr = t2.fld1 and 1+1=2 group by t2.companynr;
-companynr count(*) min(fld3) max(fld3) sum(price) avg(price)
-00 1 Omaha Omaha 5987435 5987435.0000
-36 1 dubbed dubbed 28357832 28357832.0000
-37 83 Abraham Wotan 1908978016 22999735.1325
-50 2 scribbled tapestry 68012775 34006387.5000
-select t3.companynr+0,t3.t2nr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 37 group by 1,t3.t2nr,fld3,fld3,fld3,fld3,fld3 order by fld1;
-t3.companynr+0 t2nr fld3 sum(price)
-37 1 Omaha 5987435
-37 11401 breaking 5987435
-37 11402 Romans 28357832
-37 11403 intercepted 39654943
-37 11501 bewilderingly 5987435
-37 11701 astound 5987435
-37 11702 admonishing 28357832
-37 11703 sumac 39654943
-37 12001 flanking 5987435
-37 12003 combed 39654943
-37 12301 Eulerian 5987435
-37 12302 dubbed 28357832
-37 12303 Kane 39654943
-37 12501 annihilates 5987435
-37 12602 Wotan 28357832
-37 12603 snatching 39654943
-37 12701 grazing 5987435
-37 12702 Baird 28357832
-37 12703 celery 39654943
-37 13601 handgun 5987435
-37 13602 foldout 28357832
-37 13603 mystic 39654943
-37 13801 intelligibility 5987435
-37 13802 Augustine 28357832
-37 13803 teethe 39654943
-37 13901 scholastics 5987435
-37 16001 audiology 5987435
-37 16201 wallet 5987435
-37 16202 parters 28357832
-37 16301 eschew 5987435
-37 16302 quitter 28357832
-37 16303 neat 39654943
-37 18001 jarring 5987435
-37 18002 tinily 28357832
-37 18003 balled 39654943
-37 18012 impulsive 28357832
-37 18013 starlet 39654943
-37 18021 lawgiver 5987435
-37 18022 stated 28357832
-37 18023 readable 39654943
-37 18032 testicle 28357832
-37 18033 Parsifal 39654943
-37 18041 Punjab 5987435
-37 18042 Merritt 28357832
-37 18043 Quixotism 39654943
-37 18051 sureties 5987435
-37 18052 puddings 28357832
-37 18053 tapestry 39654943
-37 18061 trimmings 5987435
-37 18062 humility 28357832
-37 18101 tragedies 5987435
-37 18102 skulking 28357832
-37 18103 flint 39654943
-37 18201 relaxing 5987435
-37 18202 offload 28357832
-37 18402 suites 28357832
-37 18403 lists 39654943
-37 18601 vacuuming 5987435
-37 18602 dentally 28357832
-37 18603 humanness 39654943
-37 18801 inch 5987435
-37 18802 Weissmuller 28357832
-37 18803 irresponsibly 39654943
-37 18811 repetitions 5987435
-37 18812 Antares 28357832
-37 19101 ventilate 5987435
-37 19102 pityingly 28357832
-37 19103 interdependent 39654943
-37 19201 Graves 5987435
-37 30501 neonatal 5987435
-37 30502 scribbled 28357832
-37 30503 chafe 39654943
-37 31901 realtor 5987435
-37 36001 elite 5987435
-37 36002 funereal 28357832
-37 38001 Conley 5987435
-37 38002 lectured 28357832
-37 38003 Abraham 39654943
-37 38011 groupings 5987435
-37 38012 dissociate 28357832
-37 38013 coexist 39654943
-37 38101 rusting 5987435
-37 38102 galling 28357832
-37 38103 obliterates 39654943
-37 38201 resumes 5987435
-37 38202 analyzable 28357832
-37 38203 terminator 39654943
-select sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1= t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008;
-sum(price)
-234298
-select t2.fld1,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1 = t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008 or t3.t2nr = t2.fld1 and t2.fld1 = 38008 group by t2.fld1;
-fld1 sum(price)
-038008 234298
-explain select fld3 from t2 where 1>2 or 2>3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-explain select fld3 from t2 where fld1=fld1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
-select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502;
-companynr fld1
-34 250501
-34 250502
-select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502;
-companynr fld1
-34 250501
-34 250502
-select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000;
-companynr count sum
-00 82 10355753
-29 95 14473298
-34 70 17788966
-37 588 83602098
-41 52 12816335
-select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ;
-companynr
-00
-29
-34
-37
-41
-select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40;
-companynr companyname count(*)
-68 company 10 12
-50 company 11 11
-40 company 5 37
-41 company 6 52
-53 company 7 4
-58 company 8 23
-65 company 9 10
-select count(*) from t2;
-count(*)
-1199
-select count(*) from t2 where fld1 < 098024;
-count(*)
-387
-select min(fld1) from t2 where fld1>= 098024;
-min(fld1)
-98024
-select max(fld1) from t2 where fld1>= 098024;
-max(fld1)
-1232609
-select count(*) from t3 where price2=76234234;
-count(*)
-4181
-select count(*) from t3 where companynr=512 and price2=76234234;
-count(*)
-4181
-explain select min(fld1),max(fld1),count(*) from t2;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-select min(fld1),max(fld1),count(*) from t2;
-min(fld1) max(fld1) count(*)
-0 1232609 1199
-select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742;
-min(t2nr) max(t2nr)
-2115 2115
-select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78;
-count(*) min(t2nr) max(t2nr)
-4181 4 41804
-select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20;
-t2nr count(*)
-9 1
-19 1
-29 1
-39 1
-49 1
-59 1
-69 1
-79 1
-89 1
-99 1
-109 1
-119 1
-129 1
-139 1
-149 1
-159 1
-169 1
-179 1
-189 1
-199 1
-select max(t2nr) from t3 where price=983543950;
-max(t2nr)
-41807
-select t1.period from t3 = t1 limit 1;
-period
-1001
-select t1.period from t1 as t1 limit 1;
-period
-9410
-select t1.period as "Nuvarande period" from t1 as t1 limit 1;
-Nuvarande period
-9410
-select period as ok_period from t1 limit 1;
-ok_period
-9410
-select period as ok_period from t1 group by ok_period limit 1;
-ok_period
-9410
-select 1+1 as summa from t1 group by summa limit 1;
-summa
-2
-select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1;
-Nuvarande period
-9410
-show tables;
-Tables_in_test
-t1
-t2
-t3
-t4
-show tables from test like "s%";
-Tables_in_test (s%)
-show tables from test like "t?";
-Tables_in_test (t?)
-show full columns from t2;
-Field Type Collation Null Key Default Extra Privileges Comment
-auto int(11) NULL NO PRI NULL auto_increment #
-fld1 int(6) unsigned zerofill NULL NO UNI 000000 #
-companynr tinyint(2) unsigned zerofill NULL NO 00 #
-fld3 char(30) latin1_swedish_ci NO MUL #
-fld4 char(35) latin1_swedish_ci NO #
-fld5 char(35) latin1_swedish_ci NO #
-fld6 char(4) latin1_swedish_ci NO #
-show full columns from t2 from test like 'f%';
-Field Type Collation Null Key Default Extra Privileges Comment
-fld1 int(6) unsigned zerofill NULL NO UNI 000000 #
-fld3 char(30) latin1_swedish_ci NO MUL #
-fld4 char(35) latin1_swedish_ci NO #
-fld5 char(35) latin1_swedish_ci NO #
-fld6 char(4) latin1_swedish_ci NO #
-show full columns from t2 from test like 's%';
-Field Type Collation Null Key Default Extra Privileges Comment
-show keys from t2;
-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
-t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
-t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
-drop table t4, t3, t2, t1;
-CREATE TABLE t1 (
-cont_nr int(11) NOT NULL auto_increment,
-ver_nr int(11) NOT NULL default '0',
-aufnr int(11) NOT NULL default '0',
-username varchar(50) NOT NULL default '',
-hdl_nr int(11) NOT NULL default '0',
-eintrag date NOT NULL default '0000-00-00',
-st_klasse varchar(40) NOT NULL default '',
-st_wert varchar(40) NOT NULL default '',
-st_zusatz varchar(40) NOT NULL default '',
-st_bemerkung varchar(255) NOT NULL default '',
-kunden_art varchar(40) NOT NULL default '',
-mcbs_knr int(11) default NULL,
-mcbs_aufnr int(11) NOT NULL default '0',
-schufa_status char(1) default '?',
-bemerkung text,
-wirknetz text,
-wf_igz int(11) NOT NULL default '0',
-tarifcode varchar(80) default NULL,
-recycle char(1) default NULL,
-sim varchar(30) default NULL,
-mcbs_tpl varchar(30) default NULL,
-emp_nr int(11) NOT NULL default '0',
-laufzeit int(11) default NULL,
-hdl_name varchar(30) default NULL,
-prov_hdl_nr int(11) NOT NULL default '0',
-auto_wirknetz varchar(50) default NULL,
-auto_billing varchar(50) default NULL,
-touch timestamp NOT NULL,
-kategorie varchar(50) default NULL,
-kundentyp varchar(20) NOT NULL default '',
-sammel_rech_msisdn varchar(30) NOT NULL default '',
-p_nr varchar(9) NOT NULL default '',
-suffix char(3) NOT NULL default '',
-PRIMARY KEY (cont_nr),
-KEY idx_aufnr(aufnr),
-KEY idx_hdl_nr(hdl_nr),
-KEY idx_st_klasse(st_klasse),
-KEY ver_nr(ver_nr),
-KEY eintrag_idx(eintrag),
-KEY emp_nr_idx(emp_nr),
-KEY wf_igz(wf_igz),
-KEY touch(touch),
-KEY hdl_tag(eintrag,hdl_nr),
-KEY prov_hdl_nr(prov_hdl_nr),
-KEY mcbs_aufnr(mcbs_aufnr),
-KEY kundentyp(kundentyp),
-KEY p_nr(p_nr,suffix)
-) ENGINE=MyISAM;
-INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
-INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
-INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
-INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
-INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007');
-INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
-INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
-SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
-Kundentyp kategorie
-Privat (Private Nutzung) Mobilfunk
-Warnings:
-Warning 1052 Column 'kundentyp' in group statement is ambiguous
-drop table t1;
-connection default;
-disconnect shm_con;
-mysqld is alive
-SET @max_allowed_packet= @@global.max_allowed_packet;
-SET @net_buffer_length= @@global.net_buffer_length;
-SET GLOBAL max_allowed_packet= 1024;
-Warnings:
-Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
-SET GLOBAL net_buffer_length= 1024;
-ERROR 1153 (08S01) at line 1: Got a packet bigger than 'max_allowed_packet' bytes
-SET GLOBAL max_allowed_packet= @max_allowed_packet;
-SET GLOBAL net_buffer_length= @net_buffer_length;
-End of 5.0 tests.
diff --git a/mysql-test/main/shm.test b/mysql-test/main/shm.test
deleted file mode 100644
index 346ce49476e..00000000000
--- a/mysql-test/main/shm.test
+++ /dev/null
@@ -1,47 +0,0 @@
-# We currently only have shm support on windows, so in order
-# to optimize things we skip this test on all other platforms
---source include/windows.inc
-
-# thread pool causes different results
--- source include/not_threadpool.inc
-
-# Only run this test if shared memory is avaliable
-let $shm= query_get_value("SHOW VARIABLES LIKE 'shared_memory'", Value, 1);
-if ($shm != ON){
- skip No shm support;
-}
-let $shm_name= query_get_value("SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'", Value, 1);
-
-# Connect using SHM for testing
-connect(shm_con,localhost,root,,,,$shm_name,SHM);
-
-# Source select test case
--- source include/common-tests.inc
-
-connection default;
-disconnect shm_con;
-
-#
-# Bug #24924: shared-memory-base-name that is too long causes buffer overflow
-#
---exec $MYSQLADMIN --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping
-
-#
-# Bug #33899: Deadlock in mysql_real_query with shared memory connections
-#
-
-let $stmt= `SELECT REPEAT('a', 2048)`;
-
-SET @max_allowed_packet= @@global.max_allowed_packet;
-SET @net_buffer_length= @@global.net_buffer_length;
-
-SET GLOBAL max_allowed_packet= 1024;
-SET GLOBAL net_buffer_length= 1024;
-
---error 1
---exec echo SELECT '$stmt'| $MYSQL --protocol=memory --shared-memory-base-name=$shm_name 2>&1
-
-SET GLOBAL max_allowed_packet= @max_allowed_packet;
-SET GLOBAL net_buffer_length= @net_buffer_length;
-
---echo End of 5.0 tests.
diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result
index 81b1566cb4c..3498dcd13c0 100644
--- a/mysql-test/main/show_check.result
+++ b/mysql-test/main/show_check.result
@@ -164,8 +164,9 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def Table 253 128 7 Y 0 39 8
def Op 253 10 7 Y 0 39 8
def Msg_type 253 10 6 Y 0 39 8
-def Msg_text 250 393216 2 Y 0 39 8
+def Msg_text 250 393216 39 Y 0 39 8
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -263,7 +264,10 @@ create table t1(n int);
insert into t1 values (1);
show open tables;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
test t1 0 0
drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
@@ -757,11 +761,11 @@ View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache current_timestamp() AS `NOW()` binary binary
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE NOW();
-ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE
+ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE
CREATE VIEW v1 AS SELECT SQL_NO_CACHE SQL_CACHE NOW();
ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE
CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE SQL_CACHE NOW();
-ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE
+ERROR HY000: Option 'SQL_CACHE' used twice in statement
CREATE PROCEDURE p1()
BEGIN
SET @s= 'CREATE VIEW v1 AS SELECT SQL_CACHE 1';
diff --git a/mysql-test/main/show_check.test b/mysql-test/main/show_check.test
index d56202d0773..38bcb5f14e7 100644
--- a/mysql-test/main/show_check.test
+++ b/mysql-test/main/show_check.test
@@ -569,7 +569,7 @@ CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE NOW();
--error ER_WRONG_USAGE
CREATE VIEW v1 AS SELECT SQL_NO_CACHE SQL_CACHE NOW();
---error ER_WRONG_USAGE
+--error ER_DUP_ARGUMENT
CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE SQL_CACHE NOW();
# Check CREATE VIEW in a prepared statement in a procedure.
diff --git a/mysql-test/main/show_create_user.result b/mysql-test/main/show_create_user.result
index 63acc38295a..e7d68041a1d 100644
--- a/mysql-test/main/show_create_user.result
+++ b/mysql-test/main/show_create_user.result
@@ -10,10 +10,10 @@ create user foo2@test identified by 'password';
show create user foo2@test;
CREATE USER for foo2@test
CREATE USER `foo2`@`test` IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'
-alter user foo2@test identified with 'someplugin' as 'somepassword';
+alter user foo2@test identified with 'mysql_old_password' as '0123456789ABCDEF';
show create user foo2@test;
CREATE USER for foo2@test
-CREATE USER `foo2`@`test` IDENTIFIED VIA someplugin USING 'somepassword'
+CREATE USER `foo2`@`test` IDENTIFIED BY PASSWORD '0123456789ABCDEF'
create user foo3@test require SSL;
show create user foo3@test;
CREATE USER for foo3@test
diff --git a/mysql-test/main/show_create_user.test b/mysql-test/main/show_create_user.test
index a10c8aeeda6..03852b5abbc 100644
--- a/mysql-test/main/show_create_user.test
+++ b/mysql-test/main/show_create_user.test
@@ -9,7 +9,7 @@ show create user foo@test;
create user foo2@test identified by 'password';
show create user foo2@test;
-alter user foo2@test identified with 'someplugin' as 'somepassword';
+alter user foo2@test identified with 'mysql_old_password' as '0123456789ABCDEF';
show create user foo2@test;
create user foo3@test require SSL;
diff --git a/mysql-test/main/show_explain.result b/mysql-test/main/show_explain.result
index e280ae7040e..69dc506527b 100644
--- a/mysql-test/main/show_explain.result
+++ b/mysql-test/main/show_explain.result
@@ -28,7 +28,7 @@ select count(*) from t1 where a < 100000;
connection default;
show explain for $thr2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index a a 5 NULL 1000 Using where; Using index
+1 SIMPLE t1 range a a 5 NULL 999 Using where; Using index
Warnings:
Note 1003 select count(*) from t1 where a < 100000
connection con1;
@@ -641,7 +641,7 @@ SELECT 'test' FROM t1 WHERE a=1;
connection default;
show explain for $thr2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 5 const 1 Using index
+1 SIMPLE t1 ref a a 5 const 2 Using index
Warnings:
Note 1003 SELECT 'test' FROM t1 WHERE a=1
connection con1;
diff --git a/mysql-test/main/show_explain.test b/mysql-test/main/show_explain.test
index 542701bc42b..515eb9efa47 100644
--- a/mysql-test/main/show_explain.test
+++ b/mysql-test/main/show_explain.test
@@ -4,6 +4,7 @@
--source include/have_debug.inc
--source include/have_innodb.inc
+
--disable_warnings
drop table if exists t0, t1, t2, t3, t4;
drop view if exists v1;
@@ -328,6 +329,7 @@ connection con1;
SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @show_explain_probe_select_id=1;
+
send select distinct a from t0;
connection default;
--source include/wait_condition.inc
@@ -1209,3 +1211,4 @@ drop table t0,t1,t2;
connection default;
disconnect con1;
set debug_sync='RESET';
+
diff --git a/mysql-test/main/show_grants_with_plugin-7985.result b/mysql-test/main/show_grants_with_plugin-7985.result
deleted file mode 100644
index b07603aaf91..00000000000
--- a/mysql-test/main/show_grants_with_plugin-7985.result
+++ /dev/null
@@ -1,197 +0,0 @@
-call mtr.add_suppression("password and an authentication plugin");
-#
-# Create a user with mysql_native_password plugin.
-# The user has no password or auth_string set.
-#
-create user u1;
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password;
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 %
-#
-# The user's grants should show no password at all.
-#
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%`
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-#
-# Test to see if connecting with no password is succesful.
-#
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%`
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Test after flushing privileges.
-#
-flush privileges;
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%`
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Now add a mysql_native password string in authentication_string.
-#
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % *7AFEFD08B6B720E781FB000CAA418F54FA662626
-#
-# Test to see if connecting with password is succesful.
-#
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Test after flushing privileges.
-#
-flush privileges;
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Now we also set a password for the user.
-#
-set password for u1 = PASSWORD('SOMETHINGELSE');
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 mysql_native_password *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
-#
-# Here we should use the password field, as that primes over
-# the authentication_string field.
-#
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-#
-# Logging in with the user's password should work.
-#
-connect con1, localhost, u1,'SOMETHINGELSE',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Reload privileges and test logging in again.
-#
-flush privileges;
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-#
-# Here we connect via the user's password again.
-#
-connect con1, localhost, u1,'SOMETHINGELSE',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Now we remove the authentication plugin password, flush privileges and
-# try again.
-#
-update mysql.user set password=authentication_string, plugin='', authentication_string='' where user='u1';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
-flush privileges;
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-#
-# Here we connect via the user's password.
-#
-connect con1, localhost, u1,'SOMETHINGELSE',;
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
-disconnect con1;
-connection default;
-#
-# Try and set a wrong auth_string password, with mysql_native_password.
-# Make sure it fails.
-#
-GRANT USAGE ON *.* TO u1 IDENTIFIED VIA mysql_native_password USING 'asd';
-ERROR HY000: Password hash should be a 41-digit hexadecimal number
-#
-# Now set a correct password.
-#
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-#
-# Test if the user can now use that password instead.
-#
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-#
-# Test if the user can now use that password instead, after flushing privileges;
-#
-connection default;
-flush privileges;
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Clear all passwords from the user.
-#
-set password for u1 = '';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % mysql_native_password
-#
-# Test no password connect.
-#
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%`
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-#
-# Test no password connect, after flushing privileges.
-#
-flush privileges;
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO `u1`@`%`
-GRANT SELECT ON `mysql`.* TO `u1`@`%`
-disconnect con1;
-connection default;
-drop user u1;
diff --git a/mysql-test/main/show_grants_with_plugin-7985.test b/mysql-test/main/show_grants_with_plugin-7985.test
deleted file mode 100644
index 85952870254..00000000000
--- a/mysql-test/main/show_grants_with_plugin-7985.test
+++ /dev/null
@@ -1,160 +0,0 @@
---source include/not_embedded.inc
-call mtr.add_suppression("password and an authentication plugin");
-
---echo #
---echo # Create a user with mysql_native_password plugin.
---echo # The user has no password or auth_string set.
---echo #
-
-create user u1;
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password;
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-
---echo #
---echo # The user's grants should show no password at all.
---echo #
-show grants for u1;
---echo #
---echo # Test to see if connecting with no password is succesful.
---echo #
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
-
---connection default
---echo #
---echo # Test after flushing privileges.
---echo #
-flush privileges;
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
-
---connection default
---echo #
---echo # Now add a mysql_native password string in authentication_string.
---echo #
-# Password string is SOMETHING
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
---echo #
---echo # Test to see if connecting with password is succesful.
---echo #
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
-
---connection default
---echo #
---echo # Test after flushing privileges.
---echo #
-flush privileges;
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Now we also set a password for the user.
---echo #
-set password for u1 = PASSWORD('SOMETHINGELSE');
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-
---echo #
---echo # Here we should use the password field, as that primes over
---echo # the authentication_string field.
---echo #
-show grants for u1;
-
---echo #
---echo # Logging in with the user's password should work.
---echo #
---connect (con1, localhost, u1,'SOMETHINGELSE',)
-show grants;
---disconnect con1
---connection default
---echo #
---echo # Reload privileges and test logging in again.
---echo #
-flush privileges;
-show grants for u1;
---echo #
---echo # Here we connect via the user's password again.
---echo #
---connect (con1, localhost, u1,'SOMETHINGELSE',)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Now we remove the authentication plugin password, flush privileges and
---echo # try again.
---echo #
-update mysql.user set password=authentication_string, plugin='', authentication_string='' where user='u1';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-flush privileges;
-show grants for u1;
---echo #
---echo # Here we connect via the user's password.
---echo #
---connect (con1, localhost, u1,'SOMETHINGELSE',)
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
---disconnect con1
---connection default
-
---echo #
---echo # Try and set a wrong auth_string password, with mysql_native_password.
---echo # Make sure it fails.
---echo #
---error ER_PASSWD_LENGTH
-GRANT USAGE ON *.* TO u1 IDENTIFIED VIA mysql_native_password USING 'asd';
---echo #
---echo # Now set a correct password.
---echo #
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-show grants for u1;
-
---echo #
---echo # Test if the user can now use that password instead.
---echo #
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
-
---echo #
---echo # Test if the user can now use that password instead, after flushing privileges;
---echo #
---connection default
-flush privileges;
-
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Clear all passwords from the user.
---echo #
-set password for u1 = '';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-
---echo #
---echo # Test no password connect.
---echo #
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Test no password connect, after flushing privileges.
---echo #
-flush privileges;
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
---connection default
-
-drop user u1;
diff --git a/mysql-test/main/shutdown_not_windows.combinations b/mysql-test/main/shutdown_not_windows.combinations
new file mode 100644
index 00000000000..684d4cfd61d
--- /dev/null
+++ b/mysql-test/main/shutdown_not_windows.combinations
@@ -0,0 +1,5 @@
+[1tpc]
+--thread-handling=one-thread-per-connection
+
+[pot]
+--thread-handling=pool-of-threads
diff --git a/mysql-test/main/shutdown_not_windows.result b/mysql-test/main/shutdown_not_windows.result
new file mode 100644
index 00000000000..524cdf20fa2
--- /dev/null
+++ b/mysql-test/main/shutdown_not_windows.result
@@ -0,0 +1,8 @@
+#
+# MDEV-18353 Shutdown may miss to wait for connection thread
+#
+call mtr.add_suppression('Thread .* did not exit');
+set @old_dbug=@@global.debug_dbug;
+set global debug_dbug='+d,CONNECT_wait';
+select variable_value into @cons from information_schema.global_status where variable_name='connections';
+# restart
diff --git a/mysql-test/main/shutdown_not_windows.test b/mysql-test/main/shutdown_not_windows.test
new file mode 100644
index 00000000000..e93867e2227
--- /dev/null
+++ b/mysql-test/main/shutdown_not_windows.test
@@ -0,0 +1,14 @@
+source include/not_windows.inc;
+source include/not_embedded.inc;
+source include/have_debug.inc;
+--echo #
+--echo # MDEV-18353 Shutdown may miss to wait for connection thread
+--echo #
+call mtr.add_suppression('Thread .* did not exit');
+set @old_dbug=@@global.debug_dbug;
+set global debug_dbug='+d,CONNECT_wait';
+select variable_value into @cons from information_schema.global_status where variable_name='connections';
+exec $MYSQL -e 'select sleep(3600)' >/dev/null 2>&1 &;
+let $wait_condition= select variable_value>@cons from information_schema.global_status where variable_name='connections';
+source include/wait_condition.inc;
+source include/restart_mysqld.inc;
diff --git a/mysql-test/main/signal.result b/mysql-test/main/signal.result
index 87ec2551b46..b5b479db017 100644
--- a/mysql-test/main/signal.result
+++ b/mysql-test/main/signal.result
@@ -2285,17 +2285,13 @@ begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
SIGNAL foo SET MYSQL_ERRNO = `65`; /* illegal */
end $$
-call test_signal $$
-ERROR 42S22: Unknown column '65' in 'field list'
-drop procedure test_signal $$
+ERROR 42000: Undeclared variable: 65
create procedure test_signal()
begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
SIGNAL foo SET MYSQL_ERRNO = `A`; /* illegal */
end $$
-call test_signal $$
-ERROR 42S22: Unknown column 'A' in 'field list'
-drop procedure test_signal $$
+ERROR 42000: Undeclared variable: A
create procedure test_signal()
begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
@@ -2346,9 +2342,7 @@ DECLARE foo CONDITION FOR SQLSTATE '12345';
SIGNAL foo SET MYSQL_ERRNO = 1000,
MESSAGE_TEXT = `Hello`;
end $$
-call test_signal $$
-ERROR 42S22: Unknown column 'Hello' in 'field list'
-drop procedure test_signal $$
+ERROR 42000: Undeclared variable: Hello
create procedure test_signal()
begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
diff --git a/mysql-test/main/signal.test b/mysql-test/main/signal.test
index e4dcb5a71cf..22cfc080895 100644
--- a/mysql-test/main/signal.test
+++ b/mysql-test/main/signal.test
@@ -2546,25 +2546,21 @@ end $$
call test_signal $$
drop procedure test_signal $$
+-- error ER_SP_UNDECLARED_VAR
create procedure test_signal()
begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
SIGNAL foo SET MYSQL_ERRNO = `65`; /* illegal */
end $$
--- error ER_BAD_FIELD_ERROR
-call test_signal $$
-drop procedure test_signal $$
+-- error ER_SP_UNDECLARED_VAR
create procedure test_signal()
begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
SIGNAL foo SET MYSQL_ERRNO = `A`; /* illegal */
end $$
--- error ER_BAD_FIELD_ERROR
-call test_signal $$
-drop procedure test_signal $$
create procedure test_signal()
begin
@@ -2620,6 +2616,7 @@ end $$
call test_signal $$
drop procedure test_signal $$
+-- error ER_SP_UNDECLARED_VAR
create procedure test_signal()
begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
@@ -2627,10 +2624,6 @@ begin
MESSAGE_TEXT = `Hello`;
end $$
--- error ER_BAD_FIELD_ERROR
-call test_signal $$
-drop procedure test_signal $$
-
create procedure test_signal()
begin
DECLARE foo CONDITION FOR SQLSTATE '12345';
diff --git a/mysql-test/main/signal_demo1.result b/mysql-test/main/signal_demo1.result
index 752f23a48d6..d919f48404f 100644
--- a/mysql-test/main/signal_demo1.result
+++ b/mysql-test/main/signal_demo1.result
@@ -75,6 +75,9 @@ end;
end case;
end
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create procedure check_pk_inventory(in id integer)
begin
declare x integer;
@@ -92,6 +95,8 @@ MYSQL_ERRNO = 10000;
end if;
end
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create procedure check_pk_order(in id integer)
begin
declare x integer;
@@ -108,6 +113,8 @@ MYSQL_ERRNO = 10000;
end if;
end
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create trigger po_order_bi before insert on po_order
for each row
begin
diff --git a/mysql-test/main/skip_grants.result b/mysql-test/main/skip_grants.result
index aca2f42f02b..a8633807571 100644
--- a/mysql-test/main/skip_grants.result
+++ b/mysql-test/main/skip_grants.result
@@ -109,3 +109,33 @@ ERROR HY000: The MariaDB server is running with the --skip-grant-tables option s
#
# End of 10.2 tests
#
+show create user root@localhost;
+ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
+insert mysql.global_priv values ('foo', 'bar', '{}');
+insert mysql.global_priv values ('baz', 'baz', '{"plugin":"baz"}');
+set password for bar@foo = password("pass word");
+ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
+flush privileges;
+show create user root@localhost;
+CREATE USER for root@localhost
+CREATE USER `root`@`localhost`
+show create user bar@foo;
+CREATE USER for bar@foo
+CREATE USER `bar`@`foo`
+show create user baz@baz;
+CREATE USER for baz@baz
+CREATE USER `baz`@`baz` IDENTIFIED VIA baz
+set password for bar@foo = password("pass word");
+show create user bar@foo;
+CREATE USER for bar@foo
+CREATE USER `bar`@`foo` IDENTIFIED BY PASSWORD '*EDBBEA7F4E7B5D8B0BC8D7AC5D1936FB7DA10611'
+alter user baz@baz identified with mysql_native_password as password("baz");
+show create user baz@baz;
+CREATE USER for baz@baz
+CREATE USER `baz`@`baz` IDENTIFIED BY PASSWORD '*E52096EF8EB0240275A7FE9E069101C33F98CF07'
+drop user bar@foo;
+drop user baz@baz;
+# restart
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/skip_grants.test b/mysql-test/main/skip_grants.test
index 0ecaa022fd4..eb8d3c3df88 100644
--- a/mysql-test/main/skip_grants.test
+++ b/mysql-test/main/skip_grants.test
@@ -15,8 +15,6 @@ use test;
# - BUG#13504: creation view with DEFINER clause if --skip-grant-tables
#
-# Prepare.
-
# Test case.
CREATE TABLE t1(c INT);
@@ -139,3 +137,30 @@ set role x;
--echo #
--echo # End of 10.2 tests
--echo #
+
+#
+# MDEV-18297
+# How to reset a forgotten root password
+#
+--error ER_OPTION_PREVENTS_STATEMENT
+show create user root@localhost;
+insert mysql.global_priv values ('foo', 'bar', '{}');
+insert mysql.global_priv values ('baz', 'baz', '{"plugin":"baz"}');
+--error ER_OPTION_PREVENTS_STATEMENT
+set password for bar@foo = password("pass word");
+flush privileges;
+show create user root@localhost;
+show create user bar@foo;
+show create user baz@baz;
+set password for bar@foo = password("pass word");
+show create user bar@foo;
+alter user baz@baz identified with mysql_native_password as password("baz");
+show create user baz@baz;
+drop user bar@foo;
+drop user baz@baz;
+# need to restart the server to restore the --skip-grant state
+--source include/restart_mysqld.inc
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/main/sp-anchor-row-type-cursor.result b/mysql-test/main/sp-anchor-row-type-cursor.result
index add771c534c..64359988a3d 100644
--- a/mysql-test/main/sp-anchor-row-type-cursor.result
+++ b/mysql-test/main/sp-anchor-row-type-cursor.result
@@ -936,6 +936,8 @@ SELECT rec1.a, rec1.b;
END;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: The used SELECT statements have a different number of columns
DROP TABLE t1;
@@ -955,6 +957,8 @@ SELECT rec1.a, rec1.b;
END;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: Operand should contain 2 column(s)
DROP TABLE t1;
@@ -972,6 +976,8 @@ SELECT rec1.a, rec1.b;
END;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
rec1.a rec1.b
10 b10
diff --git a/mysql-test/main/sp-anchor-row-type-table.result b/mysql-test/main/sp-anchor-row-type-table.result
index 6abf1e18315..b51ee5bf55d 100644
--- a/mysql-test/main/sp-anchor-row-type-table.result
+++ b/mysql-test/main/sp-anchor-row-type-table.result
@@ -606,6 +606,8 @@ SELECT 10,'a','b' FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: The used SELECT statements have a different number of columns
DROP TABLE t1;
@@ -622,6 +624,8 @@ SELECT 10,'a' FROM t1 INTO rec1, rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: Operand should contain 2 column(s)
DROP TABLE t1;
@@ -638,6 +642,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
rec1.a rec1.b
10 b10
diff --git a/mysql-test/main/sp-anchor-type.result b/mysql-test/main/sp-anchor-type.result
index 2b61854d514..f7674735821 100644
--- a/mysql-test/main/sp-anchor-type.result
+++ b/mysql-test/main/sp-anchor-type.result
@@ -957,6 +957,8 @@ SELECT * FROM t1 INTO v_a, v_b, v_c;
SELECT v_a, v_b, v_c;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
v_a v_b v_c
1 b1 2001-01-01 10:20:30.123
diff --git a/mysql-test/main/sp-big.result b/mysql-test/main/sp-big.result
index 611ac9b74e9..ea93f2cac60 100644
--- a/mysql-test/main/sp-big.result
+++ b/mysql-test/main/sp-big.result
@@ -77,6 +77,8 @@ select count(*) as cnt from (select id1 from t1 force index (primary) where id1
set id1_cond = id1_cond + 1;
end while;
end//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
insert t1 select seq, seq, 1, 1, seq, seq, seq from seq_1_to_2000;
set @before=unix_timestamp();
call select_test();
diff --git a/mysql-test/main/sp-bugs.result b/mysql-test/main/sp-bugs.result
index d758981b6ba..a166a5a0a9a 100644
--- a/mysql-test/main/sp-bugs.result
+++ b/mysql-test/main/sp-bugs.result
@@ -60,20 +60,6 @@ ERROR HY000: Trigger does not exist
DROP TABLE t1;
DROP PROCEDURE p1;
#
-# Bug#50423: Crash on second call of a procedure dropping a trigger
-#
-DROP TABLE IF EXISTS t1;
-DROP TRIGGER IF EXISTS tr1;
-DROP PROCEDURE IF EXISTS p1;
-CREATE TABLE t1 (f1 INTEGER);
-CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
-CREATE PROCEDURE p1 () DROP TRIGGER tr1;
-CALL p1 ();
-CALL p1 ();
-ERROR HY000: Trigger does not exist
-DROP TABLE t1;
-DROP PROCEDURE p1;
-#
# Bug#54375: Error in stored procedure leaves connection
# in different default schema
#
@@ -367,3 +353,13 @@ drop table _t1;
#
# End of 10.3 tests
#
+#
+# MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP
+#
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR 2 ; END $
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR (SELECT 2) ; END $
+KILL (('x' IN ( SELECT 1)) MOD 44);
+ERROR HY000: Unknown thread id: 0
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/sp-bugs.test b/mysql-test/main/sp-bugs.test
index 0693ee5f2fc..18fe14dc8bc 100644
--- a/mysql-test/main/sp-bugs.test
+++ b/mysql-test/main/sp-bugs.test
@@ -81,27 +81,6 @@ DROP TABLE t1;
DROP PROCEDURE p1;
--echo #
---echo # Bug#50423: Crash on second call of a procedure dropping a trigger
---echo #
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TRIGGER IF EXISTS tr1;
-DROP PROCEDURE IF EXISTS p1;
---enable_warnings
-
-CREATE TABLE t1 (f1 INTEGER);
-CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
-CREATE PROCEDURE p1 () DROP TRIGGER tr1;
-
-CALL p1 ();
---error ER_TRG_DOES_NOT_EXIST
-CALL p1 ();
-
-DROP TABLE t1;
-DROP PROCEDURE p1;
-
---echo #
--echo # Bug#54375: Error in stored procedure leaves connection
--echo # in different default schema
--echo #
@@ -392,3 +371,18 @@ drop table _t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP
+--echo #
+--delimiter $
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR 2 ; END $
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR (SELECT 2) ; END $
+--delimiter ;
+
+--error ER_NO_SUCH_THREAD
+KILL (('x' IN ( SELECT 1)) MOD 44);
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/sp-destruct.result b/mysql-test/main/sp-destruct.result
index 10cfcafdb3b..b5e01f8beeb 100644
--- a/mysql-test/main/sp-destruct.result
+++ b/mysql-test/main/sp-destruct.result
@@ -71,19 +71,49 @@ values
'alksj wpsj sa ^#!@ '
);
select bug14233_1();
-ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Warning 1601 Creation context of stored routine `test`.`bug14233_1` is invalid
+Error 1064 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 'select count(*) from mysql.user' at line 3
+Error 1457 Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
create view v1 as select bug14233_1();
-ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Warning 1601 Creation context of stored routine `test`.`bug14233_1` is invalid
+Error 1064 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 'select count(*) from mysql.user' at line 3
+Error 1457 Failed to load routine test.bug14233_1 (internal code -6). For more details, run SHOW WARNINGS
select bug14233_2();
-ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Warning 1601 Creation context of stored routine `test`.`bug14233_2` is invalid
+Error 1320 No RETURN found in FUNCTION test.bug14233_2
+Error 1457 Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
create view v1 as select bug14233_2();
-ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Warning 1601 Creation context of stored routine `test`.`bug14233_2` is invalid
+Error 1320 No RETURN found in FUNCTION test.bug14233_2
+Error 1457 Failed to load routine test.bug14233_2 (internal code -6). For more details, run SHOW WARNINGS
call bug14233_3();
-ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Warning 1601 Creation context of stored routine `test`.`bug14233_3` is invalid
+Error 1064 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 'wpsj sa ^#!@ ' at line 3
+Error 1457 Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
drop trigger t1_ai;
create trigger t1_ai after insert on t1 for each row call bug14233_3();
insert into t1 values (0);
-ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Warning 1601 Creation context of stored routine `test`.`bug14233_3` is invalid
+Error 1064 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 'wpsj sa ^#!@ ' at line 3
+Error 1457 Failed to load routine test.bug14233_3 (internal code -6). For more details, run SHOW WARNINGS
drop trigger t1_ai;
drop table t1;
drop function bug14233_1;
diff --git a/mysql-test/main/sp-destruct.test b/mysql-test/main/sp-destruct.test
index 8870df29299..4bdfed70545 100644
--- a/mysql-test/main/sp-destruct.test
+++ b/mysql-test/main/sp-destruct.test
@@ -17,8 +17,8 @@ call mtr.add_suppression("Stored routine .test...bug14233_[123].: invalid value
let $MYSQLD_DATADIR= `select @@datadir`;
flush table mysql.proc;
--copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm
---copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD
---copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI
+--copy_file $MYSQLD_DATADIR/mysql/proc.MAD $MYSQLTEST_VARDIR/tmp/proc.MAD
+--copy_file $MYSQLD_DATADIR/mysql/proc.MAI $MYSQLTEST_VARDIR/tmp/proc.MAI
use test;
@@ -70,8 +70,8 @@ flush table mysql.proc;
# Drop the mysql.proc table
--remove_file $MYSQLD_DATADIR/mysql/proc.frm
---remove_file $MYSQLD_DATADIR/mysql/proc.MYD
---remove_file $MYSQLD_DATADIR/mysql/proc.MYI
+--remove_file $MYSQLD_DATADIR/mysql/proc.MAD
+--remove_file $MYSQLD_DATADIR/mysql/proc.MAI
--error ER_NO_SUCH_TABLE
call bug14233();
--error ER_NO_SUCH_TABLE
@@ -81,11 +81,11 @@ insert into t1 values (0);
# Restore mysql.proc
--copy_file $MYSQLTEST_VARDIR/tmp/proc.frm $MYSQLD_DATADIR/mysql/proc.frm
---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYD $MYSQLD_DATADIR/mysql/proc.MYD
---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYI $MYSQLD_DATADIR/mysql/proc.MYI
+--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAD $MYSQLD_DATADIR/mysql/proc.MAD
+--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAI $MYSQLD_DATADIR/mysql/proc.MAI
--remove_file $MYSQLTEST_VARDIR/tmp/proc.frm
---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYD
---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYI
+--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAD
+--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAI
flush table mysql.proc;
flush privileges;
@@ -128,20 +128,26 @@ values
--error ER_SP_PROC_TABLE_CORRUPT
select bug14233_1();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
create view v1 as select bug14233_1();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
select bug14233_2();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
create view v1 as select bug14233_2();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
call bug14233_3();
+show warnings;
drop trigger t1_ai;
create trigger t1_ai after insert on t1 for each row call bug14233_3();
--error ER_SP_PROC_TABLE_CORRUPT
insert into t1 values (0);
+show warnings;
# Clean-up
drop trigger t1_ai;
@@ -233,8 +239,8 @@ drop database if exists mysqltest;
flush table mysql.proc;
let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm
---copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD
---copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI
+--copy_file $MYSQLD_DATADIR/mysql/proc.MAD $MYSQLTEST_VARDIR/tmp/proc.MAD
+--copy_file $MYSQLD_DATADIR/mysql/proc.MAI $MYSQLTEST_VARDIR/tmp/proc.MAI
create database mysqltest;
--echo # Corrupt mysql.proc to make it unusable by current version of server.
@@ -245,11 +251,11 @@ drop database mysqltest;
--echo # Restore mysql.proc.
drop table mysql.proc;
--copy_file $MYSQLTEST_VARDIR/tmp/proc.frm $MYSQLD_DATADIR/mysql/proc.frm
---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYD $MYSQLD_DATADIR/mysql/proc.MYD
---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYI $MYSQLD_DATADIR/mysql/proc.MYI
+--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAD $MYSQLD_DATADIR/mysql/proc.MAD
+--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAI $MYSQLD_DATADIR/mysql/proc.MAI
--remove_file $MYSQLTEST_VARDIR/tmp/proc.frm
---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYD
---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYI
+--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAD
+--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAI
--echo #
diff --git a/mysql-test/main/sp-error.result b/mysql-test/main/sp-error.result
index 47d601eb4fe..1fe5bd6b77b 100644
--- a/mysql-test/main/sp-error.result
+++ b/mysql-test/main/sp-error.result
@@ -1,5 +1,7 @@
drop table if exists t1, t2;
SELECT * FROM mysql.proc INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/proc.txt';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
delete from mysql.proc;
create procedure syntaxerror(t int)|
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 '' at line 1
@@ -12,6 +14,8 @@ create table t3 ( x int )|
insert into t3 values (2), (3)|
create procedure bad_into(out param int)
select x from t3 into param|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
call bad_into(@x)|
ERROR 42000: Result consisted of more than one row
drop procedure bad_into|
@@ -439,6 +443,9 @@ create procedure nodb.bug3339() begin end|
ERROR 42000: Unknown database 'nodb'
create procedure bug2653_1(a int, out b int)
set b = aa|
+call bug2653_1(1, @b)|
+ERROR 42S22: Unknown column 'aa' in 'field list'
+drop procedure bug2653_1|
create procedure bug2653_2(a int, out b int)
begin
if aa < 0 then
@@ -447,12 +454,7 @@ else
set b = a;
end if;
end|
-call bug2653_1(1, @b)|
-ERROR 42S22: Unknown column 'aa' in 'field list'
-call bug2653_2(2, @b)|
-ERROR 42S22: Unknown column 'aa' in 'field list'
-drop procedure bug2653_1|
-drop procedure bug2653_2|
+ERROR 42000: Undeclared variable: aa
create procedure bug4344() drop procedure bug4344|
ERROR HY000: Can't drop or alter a PROCEDURE from within another stored routine
create procedure bug4344() drop function bug4344|
@@ -1067,6 +1069,7 @@ IF bug13037_foo THEN
SELECT 1;
END IF;
END|
+ERROR 42000: Undeclared variable: bug13037_foo
CREATE PROCEDURE bug13037_p2()
BEGIN
SET @bug13037_foo = bug13037_bar;
@@ -1076,19 +1079,14 @@ BEGIN
SELECT bug13037_foo;
END|
-CALL bug13037_p1();
-ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'
CALL bug13037_p2();
ERROR 42S22: Unknown column 'bug13037_bar' in 'field list'
CALL bug13037_p3();
ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'
-CALL bug13037_p1();
-ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'
CALL bug13037_p2();
ERROR 42S22: Unknown column 'bug13037_bar' in 'field list'
CALL bug13037_p3();
ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'
-DROP PROCEDURE bug13037_p1;
DROP PROCEDURE bug13037_p2;
DROP PROCEDURE bug13037_p3;
create database mysqltest1;
@@ -2848,6 +2846,8 @@ DECLARE v VARCHAR(5) DEFAULT -1;
SELECT b FROM t1 WHERE a = 2 INTO v;
RETURN v;
END|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Here we check that the NOT_FOUND condition raised in f1()
# is not visible in the outer function (f2), i.e. the continue
diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test
index 082b7b8698f..45a54fddad4 100644
--- a/mysql-test/main/sp-error.test
+++ b/mysql-test/main/sp-error.test
@@ -610,6 +610,12 @@ create procedure nodb.bug3339() begin end|
create procedure bug2653_1(a int, out b int)
set b = aa|
+--error ER_BAD_FIELD_ERROR
+call bug2653_1(1, @b)|
+
+drop procedure bug2653_1|
+
+--error ER_SP_UNDECLARED_VAR
create procedure bug2653_2(a int, out b int)
begin
if aa < 0 then
@@ -619,13 +625,6 @@ begin
end if;
end|
---error 1054
-call bug2653_1(1, @b)|
---error 1054
-call bug2653_2(2, @b)|
-
-drop procedure bug2653_1|
-drop procedure bug2653_2|
#
# BUG#4344
@@ -1509,6 +1508,7 @@ DROP PROCEDURE IF EXISTS bug13037_p3;
delimiter |;
+--error ER_SP_UNDECLARED_VAR
CREATE PROCEDURE bug13037_p1()
BEGIN
IF bug13037_foo THEN
@@ -1531,20 +1531,15 @@ delimiter ;|
--echo
--error 1054
-CALL bug13037_p1();
---error 1054
CALL bug13037_p2();
--error 1054
CALL bug13037_p3();
--error 1054
-CALL bug13037_p1();
---error 1054
CALL bug13037_p2();
--error 1054
CALL bug13037_p3();
-DROP PROCEDURE bug13037_p1;
DROP PROCEDURE bug13037_p2;
DROP PROCEDURE bug13037_p3;
diff --git a/mysql-test/main/sp-row.result b/mysql-test/main/sp-row.result
index da8258d9ec4..4b87798e0bb 100644
--- a/mysql-test/main/sp-row.result
+++ b/mysql-test/main/sp-row.result
@@ -2135,6 +2135,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: The used SELECT statements have a different number of columns
DROP TABLE t1;
@@ -2149,6 +2151,8 @@ SELECT * FROM t1 INTO rec1, rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: Operand should contain 2 column(s)
DROP TABLE t1;
@@ -2163,6 +2167,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
rec1.a rec1.b
10 b10
diff --git a/mysql-test/main/sp-security.result b/mysql-test/main/sp-security.result
index 1dea23a5271..5050955c806 100644
--- a/mysql-test/main/sp-security.result
+++ b/mysql-test/main/sp-security.result
@@ -507,9 +507,9 @@ DROP DATABASE mysqltest;
GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
user19857@localhost;
-SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
-Host User Password
-localhost user19857 *82DC221D557298F6CE9961037DB1C90604792F5C
+SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
+Host User plugin authentication_string
+localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C
connect mysqltest_2_con,localhost,user19857,meow,test;
connection mysqltest_2_con;
USE test;
@@ -534,9 +534,9 @@ connection mysqltest_2_con;
DROP PROCEDURE IF EXISTS test.sp19857;
connection con1root;
disconnect mysqltest_2_con;
-SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
-Host User Password
-localhost user19857 *82DC221D557298F6CE9961037DB1C90604792F5C
+SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
+Host User plugin authentication_string
+localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C
DROP USER user19857@localhost;
disconnect con1root;
connection default;
@@ -712,9 +712,7 @@ disconnect con2;
DROP USER user2@localhost;
DROP DATABASE db1;
create user foo@local_ost;
-create user foo@`local\_ost`;
-update mysql.user set plugin='foobar' where host='local\\_ost';
-flush privileges;
+create user foo@`local\_ost` identified via mysql_old_password using '0123456789ABCDEF';
create database foodb;
grant create routine on foodb.* to foo@local_ost;
connect con1,localhost,foo;
@@ -768,21 +766,23 @@ connection default;
disconnect conn1;
drop user bug12602983_user@localhost;
drop database mysqltest_db;
+create user u1@localhost;
+grant all privileges on *.* to u1@localhost with grant option;
+connect u1, localhost, u1;
set password=password('foobar');
create procedure sp1() select 1;
show grants;
-Grants for root@localhost
-GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
-GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+Grants for u1@localhost
+GRANT ALL PRIVILEGES ON *.* TO `u1`@`localhost` IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
grant execute on procedure sp1 to current_user() identified by 'barfoo';
show grants;
-Grants for root@localhost
-GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
-GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO `root`@`localhost`
-GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+Grants for u1@localhost
+GRANT ALL PRIVILEGES ON *.* TO `u1`@`localhost` IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
+GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO `u1`@`localhost`
drop procedure sp1;
-set password='';
-update mysql.user set plugin='';
+disconnect u1;
+connection default;
+drop user u1@localhost;
#
# MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE
#
diff --git a/mysql-test/main/sp-security.test b/mysql-test/main/sp-security.test
index 622c75c48f7..acc05cafa21 100644
--- a/mysql-test/main/sp-security.test
+++ b/mysql-test/main/sp-security.test
@@ -744,7 +744,7 @@ DROP DATABASE mysqltest;
GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
user19857@localhost;
-SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
+SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
--connect (mysqltest_2_con,localhost,user19857,meow,test)
--connection mysqltest_2_con
@@ -772,7 +772,7 @@ DROP PROCEDURE IF EXISTS test.sp19857;
--disconnect mysqltest_2_con
-SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
+SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
DROP USER user19857@localhost;
@@ -979,16 +979,7 @@ DROP DATABASE db1;
# Bug#27407480: AUTOMATIC_SP_PRIVILEGES REQUIRES NEED THE INSERT PRIVILEGES FOR MYSQL.USER TABLE
#
create user foo@local_ost;
-#
-# Create a user with an authentification plugin 'foobar'.
-# Instead of using a normal "CREATE USER <user> IDENTIFIED VIA <plugin>"
-# we do CREATE (without VIA) followed by UPDATE and FLUSH.
-# This is to avoid installing a real plugin and thus avoid the test dependency.
-# We won't login under this user in the below test, so this is fine.
-#
-create user foo@`local\_ost`;
-update mysql.user set plugin='foobar' where host='local\\_ost';
-flush privileges;
+create user foo@`local\_ost` identified via mysql_old_password using '0123456789ABCDEF';
create database foodb;
grant create routine on foodb.* to foo@local_ost;
connect con1,localhost,foo;
@@ -1046,15 +1037,18 @@ drop database mysqltest_db;
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
+create user u1@localhost;
+grant all privileges on *.* to u1@localhost with grant option;
+connect u1, localhost, u1;
set password=password('foobar');
create procedure sp1() select 1;
show grants;
grant execute on procedure sp1 to current_user() identified by 'barfoo';
show grants;
drop procedure sp1;
-set password='';
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
+disconnect u1;
+connection default;
+drop user u1@localhost;
--echo #
--echo # MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 8d543c8d9e8..48794c7032c 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -316,10 +316,12 @@ delete from t1|
drop procedure b|
drop procedure if exists b2|
create procedure b2(x int)
-repeat(select 1 into outfile 'b2');
+repeat(select 1) into outfile 'b2';
insert into test.t1 values (repeat("b2",3), x);
set x = x-1;
until x = 0 end repeat|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
drop procedure b2|
drop procedure if exists c|
create procedure c(x int)
@@ -2293,9 +2295,11 @@ create procedure bug3843()
analyze table t1|
call bug3843()|
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
call bug3843()|
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
select 1+2|
1+2
@@ -2442,7 +2446,7 @@ drop procedure if exists bug4904|
create procedure bug4904()
begin
declare continue handler for sqlstate 'HY000' begin end;
-create table t2 as select * from t3;
+create table not_existing_table as select * from t3;
end|
call bug4904()|
ERROR 42S02: Table 'test.t3' doesn't exist
@@ -4182,6 +4186,7 @@ select v, isnull(v);
end if;
end;
end|
+ERROR 42000: Undeclared variable: undefined_var
create procedure bug14643_2()
begin
declare continue handler for sqlexception select 'boo' as 'Handler';
@@ -4193,18 +4198,7 @@ select 2;
end case;
select undefined_var;
end|
-call bug14643_1()|
-Handler
-boo
-v isnull(v)
-NULL 1
-call bug14643_2()|
-Handler
-boo
-Handler
-boo
-drop procedure bug14643_1|
-drop procedure bug14643_2|
+ERROR 42000: Undeclared variable: undefined_var
drop procedure if exists bug14304|
drop table if exists t3, t4|
create table t3(a int primary key auto_increment)|
@@ -4234,9 +4228,7 @@ create procedure bug14376()
begin
declare x int default x;
end|
-call bug14376()|
-ERROR 42S22: Unknown column 'x' in 'field list'
-drop procedure bug14376|
+ERROR 42000: Undeclared variable: x
create procedure bug14376()
begin
declare x int default 42;
@@ -4293,6 +4285,9 @@ select i as 'A local variable in a nested compound statement takes precedence o
end;
end;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
call bug5967("a - stored procedure parameter")|
a
a - stored procedure parameter
@@ -4341,8 +4336,11 @@ test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not of type 'BASE TABLE'
test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not of type 'BASE TABLE'
test.v1 analyze status Operation failed
@@ -4360,8 +4358,11 @@ test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not of type 'BASE TABLE'
test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not of type 'BASE TABLE'
test.v1 analyze status Operation failed
@@ -4379,8 +4380,11 @@ test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not of type 'BASE TABLE'
test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not of type 'BASE TABLE'
test.v1 analyze status Operation failed
@@ -4479,6 +4483,7 @@ select 'no' as 'v';
end if;
select 'done' as 'End';
end|
+ERROR 42000: Undeclared variable: v
create procedure bug14498_2()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -4487,6 +4492,7 @@ select 'yes' as 'v';
end while;
select 'done' as 'End';
end|
+ERROR 42000: Undeclared variable: v
create procedure bug14498_3()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -4495,6 +4501,7 @@ select 'maybe' as 'v';
until v end repeat;
select 'done' as 'End';
end|
+ERROR 42000: Undeclared variable: v
create procedure bug14498_4()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -4508,6 +4515,7 @@ select '?' as 'v';
end case;
select 'done' as 'End';
end|
+ERROR 42000: Undeclared variable: v
create procedure bug14498_5()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -4521,38 +4529,7 @@ select '?' as 'v';
end case;
select 'done' as 'End';
end|
-call bug14498_1()|
-Handler
-error
-End
-done
-call bug14498_2()|
-Handler
-error
-End
-done
-call bug14498_3()|
-v
-maybe
-Handler
-error
-End
-done
-call bug14498_4()|
-Handler
-error
-End
-done
-call bug14498_5()|
-Handler
-error
-End
-done
-drop procedure bug14498_1|
-drop procedure bug14498_2|
-drop procedure bug14498_3|
-drop procedure bug14498_4|
-drop procedure bug14498_5|
+ERROR 42000: Undeclared variable: v
drop table if exists t3|
drop procedure if exists bug15231_1|
drop procedure if exists bug15231_2|
@@ -5329,8 +5306,12 @@ drop database if exists това_е_дълго_име_за_база_данни_Ð
create database това_е_дълго_име_за_база_данни_нали|
INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','', 'utf8', 'utf8_general_ci', 'utf8_general_ci', 'n/a', 'NONE')|
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго()|
-ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго (internal code -6). For more details, run SHOW WARNINGS
drop database това_е_дълго_име_за_база_данни_нали|
+show warnings|
+Level Code Message
+Error 1064 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 '' at line 2
+Error 1457 Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго (internal code -6). For more details, run SHOW WARNINGS
CREATE TABLE t3 (
Member_ID varchar(15) NOT NULL,
PRIMARY KEY (Member_ID)
@@ -5800,6 +5781,8 @@ end;
select 1 from no_such_view limit 1 into x;
return x;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create function func_8407_b() returns int
begin
declare x int default 0;
@@ -7753,7 +7736,7 @@ UPDATE t1 SET a = '+' WHERE daynum=tdn();
SHOW STATUS LIKE '%Handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 2
+Handler_read_key 9
Handler_read_last 0
Handler_read_next 4097
Handler_read_prev 0
@@ -8424,14 +8407,12 @@ DECLARE name VARCHAR(10);
SET name="hello";
call p1(name2);
END|
+ERROR 42000: Undeclared variable: name2
call p2();
a
hello
-call p3();
-ERROR 42S22: Unknown column 'name2' in 'field list'
drop procedure p1;
drop procedure p2;
-drop procedure p3;
#
# MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM
# LAST_INSERT_ID ()
@@ -8721,11 +8702,11 @@ RETURN a = timestamp'2038-01-19 03:14:07.999999'
END
$$
SELECT f1(e) FROM t1;
-ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30'
+ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
SELECT f2(e) FROM t1;
-ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30'
+ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
SELECT f3(e) FROM t1;
-ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30'
+ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
@@ -8935,3 +8916,24 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE PROCEDURE sp1() CREATE SEQUENCE s1 START WITH 300 INCREMENT BY 30 RESTART WITH 100;
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 'RESTART' at line 1
# End of 10.3 tests
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-19637 Crash on an SP variable assignment to a wrong subselect
+#
+BEGIN NOT ATOMIC
+DECLARE a INT;
+SET a=(SELECT 1 FROM DUAL UNION SELECT HIGH_PRIORITY 2 FROM DUAL);
+END;
+$$
+ERROR 42000: Incorrect usage/placement of 'HIGH_PRIORITY'
+#
+# MDEV-21173: Assertion `m_thd == __null' failed in sp_head::~sp_head
+#
+CREATE TABLE t1 (a INT);
+CREATE PROCEDURE p1() SELECT 1 FROM t1 PROCEDURE ANALYSE( 10, (SELECT a FROM t1));
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
+DROP TABLE t1;
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index d167c1e8f73..a93689ba4da 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -448,7 +448,7 @@ drop procedure b|
drop procedure if exists b2|
--enable_warnings
create procedure b2(x int)
-repeat(select 1 into outfile 'b2');
+repeat(select 1) into outfile 'b2';
insert into test.t1 values (repeat("b2",3), x);
set x = x-1;
until x = 0 end repeat|
@@ -2926,7 +2926,7 @@ create procedure bug4904()
begin
declare continue handler for sqlstate 'HY000' begin end;
- create table t2 as select * from t3;
+ create table not_existing_table as select * from t3;
end|
-- error 1146
@@ -5049,6 +5049,7 @@ drop procedure if exists bug14643_1|
drop procedure if exists bug14643_2|
--enable_warnings
+--error ER_SP_UNDECLARED_VAR
create procedure bug14643_1()
begin
declare continue handler for sqlexception select 'boo' as 'Handler';
@@ -5064,6 +5065,7 @@ begin
end;
end|
+--error ER_SP_UNDECLARED_VAR
create procedure bug14643_2()
begin
declare continue handler for sqlexception select 'boo' as 'Handler';
@@ -5078,11 +5080,6 @@ begin
select undefined_var;
end|
-call bug14643_1()|
-call bug14643_2()|
-
-drop procedure bug14643_1|
-drop procedure bug14643_2|
#
# BUG#14304: auto_increment field incorrect set in SP
@@ -5123,15 +5120,12 @@ drop table t3, t4|
drop procedure if exists bug14376|
--enable_warnings
+--error ER_SP_UNDECLARED_VAR
create procedure bug14376()
begin
declare x int default x;
end|
-# Not the error we want, but that's what we got for now...
---error ER_BAD_FIELD_ERROR
-call bug14376()|
-drop procedure bug14376|
create procedure bug14376()
begin
@@ -5353,6 +5347,7 @@ drop procedure if exists bug14498_4|
drop procedure if exists bug14498_5|
--enable_warnings
+--error ER_SP_UNDECLARED_VAR
create procedure bug14498_1()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -5365,6 +5360,7 @@ begin
select 'done' as 'End';
end|
+--error ER_SP_UNDECLARED_VAR
create procedure bug14498_2()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -5375,6 +5371,7 @@ begin
select 'done' as 'End';
end|
+--error ER_SP_UNDECLARED_VAR
create procedure bug14498_3()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -5385,6 +5382,7 @@ begin
select 'done' as 'End';
end|
+--error ER_SP_UNDECLARED_VAR
create procedure bug14498_4()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -5400,6 +5398,7 @@ begin
select 'done' as 'End';
end|
+--error ER_SP_UNDECLARED_VAR
create procedure bug14498_5()
begin
declare continue handler for sqlexception select 'error' as 'Handler';
@@ -5415,17 +5414,6 @@ begin
select 'done' as 'End';
end|
-call bug14498_1()|
-call bug14498_2()|
-call bug14498_3()|
-call bug14498_4()|
-call bug14498_5()|
-
-drop procedure bug14498_1|
-drop procedure bug14498_2|
-drop procedure bug14498_3|
-drop procedure bug14498_4|
-drop procedure bug14498_5|
#
# BUG#15231: Stored procedure bug with not found condition handler
@@ -6330,7 +6318,7 @@ INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_да
--error ER_SP_PROC_TABLE_CORRUPT
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго()|
drop database това_е_дълго_име_за_база_данни_нали|
-
+show warnings|
#
# BUG#21493: Crash on the second call of a procedure containing
@@ -9945,6 +9933,8 @@ BEGIN
SET name="hello";
call p1(name);
END|
+
+--error ER_SP_UNDECLARED_VAR
CREATE OR REPLACE PROCEDURE p3 ()
BEGIN
DECLARE name VARCHAR(10);
@@ -9955,11 +9945,8 @@ END|
DELIMITER ;|
call p2();
---error ER_BAD_FIELD_ERROR
-call p3();
drop procedure p1;
drop procedure p2;
-drop procedure p3;
--echo #
--echo # MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM
@@ -10490,3 +10477,33 @@ CREATE PROCEDURE sp1() CREATE SEQUENCE s1 START WITH 300 INCREMENT BY 30 RESTART
CREATE PROCEDURE sp1() CREATE SEQUENCE s1 START WITH 300 INCREMENT BY 30 RESTART WITH 100;
--echo # End of 10.3 tests
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-19637 Crash on an SP variable assignment to a wrong subselect
+--echo #
+
+DELIMITER $$;
+--error ER_CANT_USE_OPTION_HERE
+BEGIN NOT ATOMIC
+ DECLARE a INT;
+ SET a=(SELECT 1 FROM DUAL UNION SELECT HIGH_PRIORITY 2 FROM DUAL);
+END;
+$$
+DELIMITER ;$$
+
+--echo #
+--echo # MDEV-21173: Assertion `m_thd == __null' failed in sp_head::~sp_head
+--echo #
+CREATE TABLE t1 (a INT);
+--error ER_SUBQUERIES_NOT_SUPPORTED
+CREATE PROCEDURE p1() SELECT 1 FROM t1 PROCEDURE ANALYSE( 10, (SELECT a FROM t1));
+
+DROP TABLE t1;
+
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/sp2.result b/mysql-test/main/sp2.result
index 30e97890e5a..55f3d80f25b 100644
--- a/mysql-test/main/sp2.result
+++ b/mysql-test/main/sp2.result
@@ -5,8 +5,8 @@ Db Name Type Definer Modified Created Security_type Comment character_set_client
mtr add_suppression PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
mtr check_testcase PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
mtr check_warnings PROCEDURE root@localhost # # DEFINER utf8 utf8_general_ci latin1_swedish_ci
-mysql AddGeometryColumn PROCEDURE root@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
-mysql DropGeometryColumn PROCEDURE root@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
+mysql AddGeometryColumn PROCEDURE mariadb.sys@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
+mysql DropGeometryColumn PROCEDURE mariadb.sys@localhost # # INVOKER latin1 latin1_swedish_ci latin1_swedish_ci
test sp2 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
test1 sp1 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
test1 sp3 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/main/sp_notembedded.result b/mysql-test/main/sp_notembedded.result
index 0d04f23326d..e03361598a6 100644
--- a/mysql-test/main/sp_notembedded.result
+++ b/mysql-test/main/sp_notembedded.result
@@ -212,6 +212,7 @@ disconnect rl_contender;
drop procedure p1;
drop table t1;
set session low_priority_updates=default;
+# switching from mysql.global_priv to mysql.user
INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv,
@@ -231,8 +232,7 @@ CREATE PROCEDURE p1(i INT) BEGIN END;
disconnect con1;
connection default;
DROP PROCEDURE p1;
-DELETE FROM mysql.user WHERE User='mysqltest_1';
-FLUSH PRIVILEGES;
+# switching back from mysql.user to mysql.global_priv
#
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
#
@@ -325,8 +325,9 @@ DROP EVENT teste_bug11763507;
# ------------------------------------------------------------------
# -- End of 5.1 tests
# ------------------------------------------------------------------
+# switching from mysql.global_priv to mysql.user
grant create routine on test.* to foo1@localhost identified by 'foo';
-update mysql.user set password = replace(password, '*', '-') where user='foo1';
+update mysql.user set authentication_string = replace(authentication_string, '*', '-') where user='foo1';
connect foo,localhost,foo1,foo;
show grants;
Grants for foo1@localhost
@@ -349,4 +350,5 @@ connection default;
disconnect foo;
drop procedure spfoo;
drop user foo1@localhost;
+# switching back from mysql.user to mysql.global_priv
set @@global.concurrent_insert= @old_concurrent_insert;
diff --git a/mysql-test/main/sp_notembedded.test b/mysql-test/main/sp_notembedded.test
index 1b481767fbe..29901c1221b 100644
--- a/mysql-test/main/sp_notembedded.test
+++ b/mysql-test/main/sp_notembedded.test
@@ -305,6 +305,7 @@ set session low_priority_updates=default;
#
# Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N
#
+--source include/switch_to_mysql_user.inc
INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv,
@@ -323,10 +324,7 @@ CREATE PROCEDURE p1(i INT) BEGIN END;
disconnect con1;
connection default;
DROP PROCEDURE p1;
-
-DELETE FROM mysql.user WHERE User='mysqltest_1';
-FLUSH PRIVILEGES;
-
+--source include/switch_to_mysql_global_priv.inc
--echo #
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
@@ -464,8 +462,9 @@ DROP EVENT teste_bug11763507;
# A case of SHOW GRANTS
# (creating a new procedure changes the password)
#
+--source include/switch_to_mysql_user.inc
grant create routine on test.* to foo1@localhost identified by 'foo';
-update mysql.user set password = replace(password, '*', '-') where user='foo1';
+update mysql.user set authentication_string = replace(authentication_string, '*', '-') where user='foo1';
--connect (foo,localhost,foo1,foo)
show grants;
--connection default
@@ -479,6 +478,7 @@ show grants;
--disconnect foo
drop procedure spfoo;
drop user foo1@localhost;
+--source include/switch_to_mysql_global_priv.inc
#
# Restore global concurrent_insert value. Keep in the end of the test file.
diff --git a/mysql-test/main/sp_trans.result b/mysql-test/main/sp_trans.result
index deb0d6797fe..cee2a7e5188 100644
--- a/mysql-test/main/sp_trans.result
+++ b/mysql-test/main/sp_trans.result
@@ -506,6 +506,8 @@ insert into t3 select a from t3;
select count(*)*255 from t3 into table_size;
until table_size > max_table_size*2 end repeat;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
call bug14210_fill_table()|
drop procedure bug14210_fill_table|
create table t4 like t3|
diff --git a/mysql-test/main/sp_trans_log.result b/mysql-test/main/sp_trans_log.result
index b72e8332fad..adc9eafc370 100644
--- a/mysql-test/main/sp_trans_log.result
+++ b/mysql-test/main/sp_trans_log.result
@@ -11,6 +11,8 @@ insert into t1 values (null);
select count(*) from t1 into @a;
return @a;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
reset master;
insert into t2 values (bug23333(),1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
diff --git a/mysql-test/main/sql_mode.result b/mysql-test/main/sql_mode.result
index 238bae2efd8..25a90703bf5 100644
--- a/mysql-test/main/sql_mode.result
+++ b/mysql-test/main/sql_mode.result
@@ -476,10 +476,14 @@ select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
set sql_mode=2147483648*2*2*2;
-ERROR 42000: Variable 'sql_mode' can't be set to the value of '17179869184'
select @@sql_mode;
@@sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
+TIME_ROUND_FRACTIONAL
+set sql_mode=2147483648*2*2*2*2;
+ERROR 42000: Variable 'sql_mode' can't be set to the value of '34359738368'
+select @@sql_mode;
+@@sql_mode
+TIME_ROUND_FRACTIONAL
set sql_mode=PAD_CHAR_TO_FULL_LENGTH;
create table t1 (a int auto_increment primary key, b char(5));
insert into t1 (b) values('a'),('b\t'),('c ');
diff --git a/mysql-test/main/sql_mode.test b/mysql-test/main/sql_mode.test
index 8cf50f73f6f..97f5cf42791 100644
--- a/mysql-test/main/sql_mode.test
+++ b/mysql-test/main/sql_mode.test
@@ -263,8 +263,10 @@ set sql_mode=4194304;
select @@sql_mode;
set sql_mode=16384+(65536*4);
select @@sql_mode;
+set sql_mode=2147483648*2*2*2;
+select @@sql_mode;
--error 1231
-set sql_mode=2147483648*2*2*2; # that mode does not exist
+set sql_mode=2147483648*2*2*2*2; # that mode does not exist
select @@sql_mode;
#
diff --git a/mysql-test/main/ssl_cipher.opt b/mysql-test/main/ssl_cipher.opt
new file mode 100644
index 00000000000..6545e04ba5f
--- /dev/null
+++ b/mysql-test/main/ssl_cipher.opt
@@ -0,0 +1 @@
+--loose-tls-version=TLSv1.0,TLSv1.1,TLSv1.2
diff --git a/mysql-test/main/ssl_cipher.result b/mysql-test/main/ssl_cipher.result
index ec7cf7bea75..bd5b34347fe 100644
--- a/mysql-test/main/ssl_cipher.result
+++ b/mysql-test/main/ssl_cipher.result
@@ -56,6 +56,7 @@ grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
Variable_name Value
Ssl_cipher AES256-SHA
drop user mysqltest_1@localhost;
+# restart: --ssl-cipher=AES128-SHA
connect ssl_con,localhost,root,,,,,SSL;
SHOW STATUS LIKE 'Ssl_cipher';
Variable_name Value
diff --git a/mysql-test/main/ssl_cipher.test b/mysql-test/main/ssl_cipher.test
index 4aa9ce812b7..2ca18df1f20 100644
--- a/mysql-test/main/ssl_cipher.test
+++ b/mysql-test/main/ssl_cipher.test
@@ -43,7 +43,7 @@ drop user ssl_user1@localhost, ssl_user2@localhost, ssl_user3@localhost, ssl_use
#
# Bug#21611 Slave can't connect when master-ssl-cipher specified
# - Apparently selecting a cipher doesn't work at all
-# - Use a cipher that both yaSSL and OpenSSL supports
+# - Use a cipher that both WolfSSL and OpenSSL supports
#
--write_file $MYSQLTEST_VARDIR/tmp/test.sql
SHOW STATUS LIKE 'Ssl_cipher';
diff --git a/mysql-test/main/stat_tables.result b/mysql-test/main/stat_tables.result
index fa181fb78eb..53557b39b05 100644
--- a/mysql-test/main/stat_tables.result
+++ b/mysql-test/main/stat_tables.result
@@ -7,8 +7,10 @@ COMPLEMENTARY
set @save_use_stat_tables=@@use_stat_tables;
set @save_histogram_size=@@global.histogram_size;
set @@global.histogram_size=0,@@local.histogram_size=0;
-set optimizer_use_condition_selectivity=1;
+set optimizer_use_condition_selectivity=4;
set use_stat_tables='preferably';
+set @save_histogram_type=@@histogram_type;
+set histogram_type='single_prec_hb';
DROP DATABASE IF EXISTS dbt3_s001;
CREATE DATABASE dbt3_s001;
use dbt3_s001;
@@ -67,12 +69,12 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 179 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6
+1 SIMPLE orders ref|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (12%) Using where; Using rowid filter
1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -83,7 +85,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stats;
@@ -174,12 +176,12 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 179 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6
+1 SIMPLE orders ref|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (12%) Using where; Using rowid filter
1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -190,7 +192,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
EXPLAIN select o_year,
@@ -210,14 +212,14 @@ and o_orderdate between date '1995-01-01' and date '1996-12-31'
group by o_year
order by o_year;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE part ALL PRIMARY NULL NULL NULL 200 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey_partkey 5 dbt3_s001.part.p_partkey 30 Using index condition
1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
1 SIMPLE n2 eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1
+1 SIMPLE orders eq_ref PRIMARY,i_o_orderdate,i_o_custkey PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
+1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 Using where
select o_year,
sum(case when nation = 'UNITED STATES' then volume else 0 end) /
sum(volume) as mkt_share
@@ -333,9 +335,9 @@ from part, lineitem, orders
where p_retailprice > 1100 and o_orderdate='1997-01-01'
and o_orderkey=l_orderkey and p_partkey=l_partkey;
id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE part range PRIMARY,i_p_retailprice i_p_retailprice 9 NULL 1 Using index condition
1 SIMPLE orders ref PRIMARY,i_o_orderdate i_o_orderdate 4 const 1
1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE part eq_ref PRIMARY,i_p_retailprice PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where
select o_orderkey, p_partkey
from part, lineitem, orders
where p_retailprice > 1100 and o_orderdate='1997-01-01'
@@ -590,7 +592,7 @@ explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL
-1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
+1 SIMPLE global_priv ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
@@ -627,6 +629,7 @@ SELECT MAX(pk) FROM t1;
MAX(pk)
NULL
DROP TABLE t1;
+set use_stat_tables=@save_use_stat_tables;
#
# MDEV-17605: SHOW INDEXES with use_stat_tables='preferably'
#
@@ -798,8 +801,9 @@ col1
2004-02-29
0000-10-31
set @@sql_mode= @save_sql_mode;
-set use_stat_tables=@save_use_stat_tables;
+set @@use_stat_tables=@save_use_stat_tables;
set @@histogram_size= @save_histogram_size;
+set @@histogram_type=@save_histogram_type;
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
#
@@ -841,3 +845,62 @@ test.t1 analyze error Invalid argument
DROP TABLE t1;
# please keep this at the last
set @@global.histogram_size=@save_histogram_size;
+# Start of 10.4 tests
+set histogram_size=0;
+#
+# MDEV-17255: New optimizer defaults and ANALYZE TABLE
+#
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+set use_stat_tables= preferably_for_queries;
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will not collect statistics
+#
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 100.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will collect statistics if we use PERSISTENT
+# for columns, indexes or everything
+#
+analyze table t1 persistent for columns (a) indexes ();
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 25.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY
+# analyze table t1 will collect statistics
+#
+set use_stat_tables=PREFERABLY;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+test t1 b 2 10 0.0000 4.0000 1.1111 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a=1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
+drop table t1;
+set @@global.histogram_size=@save_histogram_size;
+# End of 10.4 tests
diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test
index f7c18637cdd..9955908bd60 100644
--- a/mysql-test/main/stat_tables.test
+++ b/mysql-test/main/stat_tables.test
@@ -7,9 +7,11 @@ select @@session.use_stat_tables;
set @save_use_stat_tables=@@use_stat_tables;
set @save_histogram_size=@@global.histogram_size;
set @@global.histogram_size=0,@@local.histogram_size=0;
-set optimizer_use_condition_selectivity=1;
+set optimizer_use_condition_selectivity=4;
set use_stat_tables='preferably';
+set @save_histogram_type=@@histogram_type;
+set histogram_type='single_prec_hb';
--disable_warnings
DROP DATABASE IF EXISTS dbt3_s001;
@@ -195,7 +197,7 @@ FLUSH TABLE t1;
SET use_stat_tables='never';
EXPLAIN SELECT * FROM t1;
---move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD.save
+--move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD.save
FLUSH TABLES;
SET use_stat_tables='preferably';
@@ -204,7 +206,7 @@ EXPLAIN SELECT * FROM t1;
--enable_warnings
# Cleanup
---move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD.save $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD
+--move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD.save $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
@@ -404,6 +406,8 @@ CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, t TEXT);
SELECT MAX(pk) FROM t1;
DROP TABLE t1;
+set use_stat_tables=@save_use_stat_tables;
+
--echo #
@@ -542,8 +546,9 @@ update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and
select min_value from mysql.column_stats where db_name='test' and table_name='t1';
select * from t1;
set @@sql_mode= @save_sql_mode;
-set use_stat_tables=@save_use_stat_tables;
+set @@use_stat_tables=@save_use_stat_tables;
set @@histogram_size= @save_histogram_size;
+set @@histogram_type=@save_histogram_type;
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
@@ -582,3 +587,53 @@ DROP TABLE t1;
--echo # please keep this at the last
set @@global.histogram_size=@save_histogram_size;
+
+--echo # Start of 10.4 tests
+
+set histogram_size=0;
+
+--echo #
+--echo # MDEV-17255: New optimizer defaults and ANALYZE TABLE
+--echo #
+
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+set use_stat_tables= preferably_for_queries;
+--echo #
+--echo # with use_stat_tables= PREFERABLY_FOR_QUERIES
+--echo # analyze table t1 will not collect statistics
+--echo #
+
+analyze table t1;
+select * from mysql.column_stats;
+analyze
+select * from t1 where a = 1 and b=3;
+
+--echo #
+--echo # with use_stat_tables= PREFERABLY_FOR_QUERIES
+--echo # analyze table t1 will collect statistics if we use PERSISTENT
+--echo # for columns, indexes or everything
+--echo #
+
+analyze table t1 persistent for columns (a) indexes ();
+select * from mysql.column_stats;
+--echo # filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a = 1 and b=3;
+
+--echo #
+--echo # with use_stat_tables= PREFERABLY
+--echo # analyze table t1 will collect statistics
+--echo #
+
+set use_stat_tables=PREFERABLY;
+analyze table t1;
+select * from mysql.column_stats;
+--echo # filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a=1 and b=3;
+drop table t1;
+
+set @@global.histogram_size=@save_histogram_size;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/stat_tables_disabled.result b/mysql-test/main/stat_tables_disabled.result
index f57abc34e0c..c974bba5a4b 100644
--- a/mysql-test/main/stat_tables_disabled.result
+++ b/mysql-test/main/stat_tables_disabled.result
@@ -1,10 +1,15 @@
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
SET SESSION STORAGE_ENGINE='InnoDB';
select @@global.use_stat_tables;
@@global.use_stat_tables
-NEVER
+PREFERABLY
select @@session.use_stat_tables;
@@session.use_stat_tables
-NEVER
+PREFERABLY
set @save_use_stat_tables=@@use_stat_tables;
set use_stat_tables='preferably';
DROP DATABASE IF EXISTS dbt3_s001;
@@ -12,6 +17,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off';
+set optimizer_switch='rowid_filter=off';
#
# Bug mdev-503: optimizer ignores setting use_stat_tables='preferably'
#
@@ -68,3 +74,6 @@ DROP DATABASE dbt3_s001;
use test;
set use_stat_tables=@save_use_stat_tables;
SET SESSION STORAGE_ENGINE=DEFAULT;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/stat_tables_disabled.test b/mysql-test/main/stat_tables_disabled.test
index c9d923f903b..427cf4874bc 100644
--- a/mysql-test/main/stat_tables_disabled.test
+++ b/mysql-test/main/stat_tables_disabled.test
@@ -1,3 +1,9 @@
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
--source include/have_innodb.inc
SET SESSION STORAGE_ENGINE='InnoDB';
@@ -19,6 +25,7 @@ use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off';
+set optimizer_switch='rowid_filter=off';
--disable_query_log
--disable_result_log
@@ -76,3 +83,7 @@ set use_stat_tables=@save_use_stat_tables;
SET SESSION STORAGE_ENGINE=DEFAULT;
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/stat_tables_innodb.result b/mysql-test/main/stat_tables_innodb.result
index c6341c9bbac..41fd303ed4c 100644
--- a/mysql-test/main/stat_tables_innodb.result
+++ b/mysql-test/main/stat_tables_innodb.result
@@ -1,6 +1,11 @@
SET SESSION STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
select @@global.use_stat_tables;
@@global.use_stat_tables
COMPLEMENTARY
@@ -10,8 +15,10 @@ COMPLEMENTARY
set @save_use_stat_tables=@@use_stat_tables;
set @save_histogram_size=@@global.histogram_size;
set @@global.histogram_size=0,@@local.histogram_size=0;
-set optimizer_use_condition_selectivity=1;
+set optimizer_use_condition_selectivity=4;
set use_stat_tables='preferably';
+set @save_histogram_type=@@histogram_type;
+set histogram_type='single_prec_hb';
DROP DATABASE IF EXISTS dbt3_s001;
CREATE DATABASE dbt3_s001;
use dbt3_s001;
@@ -70,12 +77,12 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 Using index
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6 Using index
+1 SIMPLE orders ref|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (14%) Using where; Using rowid filter
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey 9 dbt3_s001.supplier.s_suppkey,dbt3_s001.orders.o_orderkey 1
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -86,7 +93,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stats;
@@ -201,12 +208,12 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 Using index
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6 Using index
+1 SIMPLE orders ref|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (14%) Using where; Using rowid filter
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey 9 dbt3_s001.supplier.s_suppkey,dbt3_s001.orders.o_orderkey 1
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -217,7 +224,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
EXPLAIN select o_year,
@@ -237,14 +244,14 @@ and o_orderdate between date '1995-01-01' and date '1996-12-31'
group by o_year
order by o_year;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE part ALL PRIMARY NULL NULL NULL 200 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey_partkey 5 dbt3_s001.part.p_partkey 30 Using index condition
1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
1 SIMPLE n2 eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1
+1 SIMPLE orders eq_ref PRIMARY,i_o_orderdate,i_o_custkey PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
+1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 Using where
select o_year,
sum(case when nation = 'UNITED STATES' then volume else 0 end) /
sum(volume) as mkt_share
@@ -617,7 +624,7 @@ explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL
-1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
+1 SIMPLE global_priv ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
@@ -654,6 +661,7 @@ SELECT MAX(pk) FROM t1;
MAX(pk)
NULL
DROP TABLE t1;
+set use_stat_tables=@save_use_stat_tables;
#
# MDEV-17605: SHOW INDEXES with use_stat_tables='preferably'
#
@@ -825,8 +833,9 @@ col1
2004-02-29
0000-10-31
set @@sql_mode= @save_sql_mode;
-set use_stat_tables=@save_use_stat_tables;
+set @@use_stat_tables=@save_use_stat_tables;
set @@histogram_size= @save_histogram_size;
+set @@histogram_type=@save_histogram_type;
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
#
@@ -868,6 +877,68 @@ test.t1 analyze error Invalid argument
DROP TABLE t1;
# please keep this at the last
set @@global.histogram_size=@save_histogram_size;
+# Start of 10.4 tests
+set histogram_size=0;
+#
+# MDEV-17255: New optimizer defaults and ANALYZE TABLE
+#
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+set use_stat_tables= preferably_for_queries;
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will not collect statistics
+#
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 100.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will collect statistics if we use PERSISTENT
+# for columns, indexes or everything
+#
+analyze table t1 persistent for columns (a) indexes ();
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 25.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY
+# analyze table t1 will collect statistics
+#
+set use_stat_tables=PREFERABLY;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+test t1 b 2 10 0.0000 4.0000 1.1111 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a=1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
+drop table t1;
+set @@global.histogram_size=@save_histogram_size;
+# End of 10.4 tests
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
#
# MDEV-22851: Engine independent index statistics are incorrect for large tables on Windows.
diff --git a/mysql-test/main/stat_tables_innodb.test b/mysql-test/main/stat_tables_innodb.test
index 008ca6911e9..301ee8692b9 100644
--- a/mysql-test/main/stat_tables_innodb.test
+++ b/mysql-test/main/stat_tables_innodb.test
@@ -6,7 +6,16 @@ SET SESSION STORAGE_ENGINE='InnoDB';
set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch;
set optimizer_switch='extended_keys=on';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
--source stat_tables.test
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
diff --git a/mysql-test/main/stat_tables_missing.result b/mysql-test/main/stat_tables_missing.result
new file mode 100644
index 00000000000..a7cd35b1d1f
--- /dev/null
+++ b/mysql-test/main/stat_tables_missing.result
@@ -0,0 +1,11 @@
+create table t1 (a int);
+alter table mysql.column_stats rename to mysql.column_stats1;
+flush tables;
+alter table t1 change a b varchar(100);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` varchar(100) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table mysql.column_stats1 rename to mysql.column_stats;
+drop table t1;
diff --git a/mysql-test/main/stat_tables_missing.test b/mysql-test/main/stat_tables_missing.test
new file mode 100644
index 00000000000..63ee9d5dde3
--- /dev/null
+++ b/mysql-test/main/stat_tables_missing.test
@@ -0,0 +1,10 @@
+#
+# MDEV-18788 Live upgrade from MySQL 5.6/5.7 to MariaDB 10.4 fails with "Event Scheduler: An error occurred when initializing system tables"
+#
+create table t1 (a int);
+alter table mysql.column_stats rename to mysql.column_stats1;
+flush tables;
+alter table t1 change a b varchar(100);
+show create table t1;
+alter table mysql.column_stats1 rename to mysql.column_stats;
+drop table t1;
diff --git a/mysql-test/main/stat_tables_rbr.result b/mysql-test/main/stat_tables_rbr.result
index 7ae7ade4398..130d1f6da9a 100644
--- a/mysql-test/main/stat_tables_rbr.result
+++ b/mysql-test/main/stat_tables_rbr.result
@@ -1,15 +1,15 @@
#
# Bug mdev-463: assertion failure when running ANALYZE with RBR on
#
-SET GLOBAL use_stat_tables = PREFERABLY;
connect con1,localhost,root,,;
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+set use_stat_tables= PREFERABLY;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
-SET GLOBAL use_stat_tables = DEFAULT;
+SET use_stat_tables = DEFAULT;
disconnect con1;
connection default;
SET use_stat_tables = PREFERABLY;
diff --git a/mysql-test/main/stat_tables_rbr.test b/mysql-test/main/stat_tables_rbr.test
index 29f7c4e6622..1b6a9603743 100644
--- a/mysql-test/main/stat_tables_rbr.test
+++ b/mysql-test/main/stat_tables_rbr.test
@@ -6,15 +6,14 @@
--echo # Bug mdev-463: assertion failure when running ANALYZE with RBR on
--echo #
-SET GLOBAL use_stat_tables = PREFERABLY;
-
--connect (con1,localhost,root,,)
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+set use_stat_tables= PREFERABLY;
ANALYZE TABLE t1;
# Cleanup
DROP TABLE t1;
-SET GLOBAL use_stat_tables = DEFAULT;
+SET use_stat_tables = DEFAULT;
--disconnect con1
--connection default
diff --git a/mysql-test/main/statement-expr.result b/mysql-test/main/statement-expr.result
index c73ed2825ec..56b90e4a4cc 100644
--- a/mysql-test/main/statement-expr.result
+++ b/mysql-test/main/statement-expr.result
@@ -12,9 +12,9 @@ ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)
0
DROP TABLE t1;
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
-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 'SELECT * FROM t1)' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
CREATE TABLE t1 (id INT);
INSERT INTO t1 VALUES (10);
CREATE PROCEDURE p1(a INT) BEGIN END;
@@ -45,21 +45,21 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SIGNAL SQLSTATE '01000';
END' at line 3
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
-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 '(SELECT * FROM t1)' at line 1
+ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
-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 '(SELECT * FROM t1)' at line 1
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
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 '(1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO' at line 1
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
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 'EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO' at line 1
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
-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 '(SELECT * FROM t1)' at line 1
+ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
DO 1 IN (SELECT * FROM t1);
diff --git a/mysql-test/main/statement-expr.test b/mysql-test/main/statement-expr.test
index 7e968d4fb66..aab14963c54 100644
--- a/mysql-test/main/statement-expr.test
+++ b/mysql-test/main/statement-expr.test
@@ -15,9 +15,9 @@ SELECT ROW(1,7) IN (SELECT id, id1 FROM t1 WHERE id1= 8);
EXECUTE IMMEDIATE 'SELECT ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)';
DROP TABLE t1;
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
@@ -52,14 +52,14 @@ $$
DELIMITER ;$$
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
--error ER_PARSE_ERROR
@@ -67,9 +67,9 @@ GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
--error ER_PARSE_ERROR
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
CREATE TABLE t1 (a INT);
diff --git a/mysql-test/main/statistics.result b/mysql-test/main/statistics.result
index e800c327db6..1ba087dd7a1 100644
--- a/mysql-test/main/statistics.result
+++ b/mysql-test/main/statistics.result
@@ -2,6 +2,8 @@ drop table if exists t1,t2;
set @save_use_stat_tables=@@use_stat_tables;
set @save_histogram_size=@@global.histogram_size;
set @@global.histogram_size=0,@@local.histogram_size=0;
+set @save_hist_type=@@histogram_type;
+set histogram_type='single_prec_hb';
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stats;
@@ -248,7 +250,7 @@ test t1 e 0.01 0.112 0.2250 6.2000 8 DOUBLE_PREC_HB 000005056464E1E1
test t1 f 1 5 0.2000 6.4000 8 DOUBLE_PREC_HB FF3FFF7FFFBFFFBF
DELETE FROM mysql.column_stats;
set histogram_size= 0;
-set histogram_type=default;
+set histogram_type='single_prec_hb';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -1506,8 +1508,8 @@ hist_size 254
hist_type DOUBLE_PREC_HB
hex(histogram) 1F00A1002B023002350238023F02430249024E02520258025D02630268026E02720276027B02800285028C02920297029D02A102A802AC02B402BC02C402CC02D302DA02E302EA02F102F802010305030C03120319031F03290333033D0343034F03590363036D037803840390039A03A603B303C303D103E003F203020412042404330440045304600472047F049104A204B804C804DE04F2040A0526053F0558056F058E05B305D905F4051306380667068406AB06DA06020731075C079407C507F8072E085E08A508DF0824096909CC092E0A760AD50A400BA90B150CAD0C310D240E130F0E103B11B9126B14F0166B192F1CB71FFF240630483FC567
decode_histogram(hist_type,histogram) 0.00047,0.00198,0.00601,0.00008,0.00008,0.00005,0.00011,0.00006,0.00009,0.00008,0.00006,0.00009,0.00008,0.00009,0.00008,0.00009,0.00006,0.00006,0.00008,0.00008,0.00008,0.00011,0.00009,0.00008,0.00009,0.00006,0.00011,0.00006,0.00012,0.00012,0.00012,0.00012,0.00011,0.00011,0.00014,0.00011,0.00011,0.00011,0.00014,0.00006,0.00011,0.00009,0.00011,0.00009,0.00015,0.00015,0.00015,0.00009,0.00018,0.00015,0.00015,0.00015,0.00017,0.00018,0.00018,0.00015,0.00018,0.00020,0.00024,0.00021,0.00023,0.00027,0.00024,0.00024,0.00027,0.00023,0.00020,0.00029,0.00020,0.00027,0.00020,0.00027,0.00026,0.00034,0.00024,0.00034,0.00031,0.00037,0.00043,0.00038,0.00038,0.00035,0.00047,0.00056,0.00058,0.00041,0.00047,0.00056,0.00072,0.00044,0.00060,0.00072,0.00061,0.00072,0.00066,0.00085,0.00075,0.00078,0.00082,0.00073,0.00108,0.00089,0.00105,0.00105,0.00151,0.00150,0.00110,0.00145,0.00163,0.00160,0.00165,0.00232,0.00201,0.00371,0.00365,0.00383,0.00459,0.00583,0.00662,0.00984,0.00969,0.01080,0.01379,0.02063,0.04308,0.05960,0.15816,0.59464
-set histogram_type=default;
-set histogram_size=default;
+set histogram_type='single_prec_hb';
+set histogram_size=0;
use test;
DROP DATABASE world;
SELECT UPPER(db_name), UPPER(table_name), cardinality
@@ -1602,8 +1604,8 @@ hist_size, hist_type, HEX(histogram)
FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
test t1 a 1 5 0.0000 1.0000 10 DOUBLE_PREC_HB 0000FF3FFF7FFFBFFFFF
-set histogram_size=default;
-set histogram_type=default;
+set histogram_size=0;
+set histogram_type='single_prec_hb';
drop table t1;
#
# Bug mdev-4369: histogram for a column with many distinct values
@@ -1643,7 +1645,7 @@ hist_size, hist_type, HEX(histogram)
FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
test t2 id 1 1024 0.0000 8.0000 63 SINGLE_PREC_HB 03070B0F13171B1F23272B2F33373B3F43474B4F53575B5F63676B6F73777B7F83878B8F93979B9FA3A7ABAFB3B7BBBFC3C7CBCFD3D7DBDFE3E7EBEFF3F7FB
-set histogram_size=default;
+set histogram_size=0;
drop table t1, t2;
set use_stat_tables=@save_use_stat_tables;
#
@@ -1773,4 +1775,111 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+set histogram_size=@save_histogram_size, histogram_type=@save_hist_type;
+#
+# Start of 10.4 tests
+#
+#
+# Test analyze_sample_percentage system variable.
+#
+set @save_use_stat_tables=@@use_stat_tables;
+set @save_analyze_sample_percentage=@@analyze_sample_percentage;
+set session rand_seed1=42;
+set session rand_seed2=62;
+set use_stat_tables=PREFERABLY;
+set histogram_size=10;
+CREATE TABLE t1 (id int);
+INSERT INTO t1 (id) VALUES (1), (1), (1), (1), (1), (1), (1);
+INSERT INTO t1 (id) SELECT id FROM t1;
+INSERT INTO t1 SELECT id+1 FROM t1;
+INSERT INTO t1 SELECT id+2 FROM t1;
+INSERT INTO t1 SELECT id+4 FROM t1;
+INSERT INTO t1 SELECT id+8 FROM t1;
+INSERT INTO t1 SELECT id+16 FROM t1;
+INSERT INTO t1 SELECT id+32 FROM t1;
+INSERT INTO t1 SELECT id+64 FROM t1;
+INSERT INTO t1 SELECT id+128 FROM t1;
+INSERT INTO t1 SELECT id+256 FROM t1;
+INSERT INTO t1 SELECT id+512 FROM t1;
+INSERT INTO t1 SELECT id+1024 FROM t1;
+INSERT INTO t1 SELECT id+2048 FROM t1;
+INSERT INTO t1 SELECT id+4096 FROM t1;
+INSERT INTO t1 SELECT id+9192 FROM t1;
+#
+# This query will should show a full table scan analysis.
+#
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
+t1 id 1 17384 0.0000 4.0000 14.0000 0.15705,0.15711,0.21463,0.15705,0.15711,0.15706
+set analyze_sample_percentage=0.1;
+#
+# This query will show an innacurate avg_frequency value.
+#
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
+t1 id 111 17026 0.0000 4.0000 10.4739 0.13649,0.14922,0.16921,0.21141,0.18355,0.15012
+#
+# This query will show a better avg_frequency value.
+#
+set analyze_sample_percentage=25;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
+t1 id 1 17384 0.0000 4.0000 14.0401 0.15566,0.15590,0.15729,0.21538,0.15790,0.15787
+set analyze_sample_percentage=0;
+#
+# Test self adjusting sampling level.
+#
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
+t1 id 1 17384 0.0000 4.0000 13.9812 0.15860,0.15767,0.21515,0.15573,0.15630,0.15654
+#
+# Test record estimation is working properly.
+#
+select count(*) from t1;
+count(*)
+229376
+explain select * from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 229060
+set analyze_sample_percentage=100;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
+t1 id 1 17384 0.0000 4.0000 14.0000 0.15705,0.15711,0.21463,0.15705,0.15711,0.15706
+explain select * from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 229376
+drop table t1;
+set analyze_sample_percentage=@save_analyze_sample_percentage;
+set histogram_size=@save_histogram_size;
+set use_stat_tables=@save_use_stat_tables;
set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/statistics.test b/mysql-test/main/statistics.test
index 0ed63ac8bf2..1f99aaa33e5 100644
--- a/mysql-test/main/statistics.test
+++ b/mysql-test/main/statistics.test
@@ -7,6 +7,8 @@ drop table if exists t1,t2;
set @save_use_stat_tables=@@use_stat_tables;
set @save_histogram_size=@@global.histogram_size;
set @@global.histogram_size=0,@@local.histogram_size=0;
+set @save_hist_type=@@histogram_type;
+set histogram_type='single_prec_hb';
DELETE FROM mysql.table_stats;
--sorted_result
@@ -198,7 +200,7 @@ SELECT db_name, table_name, column_name,
DELETE FROM mysql.column_stats;
set histogram_size= 0;
-set histogram_type=default;
+set histogram_type='single_prec_hb';
ANALYZE TABLE t1;
@@ -659,8 +661,8 @@ FLUSH TABLES;
--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';
--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';
-set histogram_type=default;
-set histogram_size=default;
+set histogram_type='single_prec_hb';
+set histogram_size=0;
use test;
DROP DATABASE world;
@@ -734,8 +736,8 @@ select db_name, table_name, column_name,
hist_size, hist_type, HEX(histogram)
FROM mysql.column_stats;
-set histogram_size=default;
-set histogram_type=default;
+set histogram_size=0;
+set histogram_type='single_prec_hb';
drop table t1;
@@ -778,7 +780,7 @@ select db_name, table_name, column_name,
hist_size, hist_type, HEX(histogram)
FROM mysql.column_stats;
-set histogram_size=default;
+set histogram_size=0;
drop table t1, t2;
@@ -915,5 +917,96 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+set histogram_size=@save_histogram_size, histogram_type=@save_hist_type;
+
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # Test analyze_sample_percentage system variable.
+--echo #
+set @save_use_stat_tables=@@use_stat_tables;
+set @save_analyze_sample_percentage=@@analyze_sample_percentage;
+
+set session rand_seed1=42;
+set session rand_seed2=62;
+
+set use_stat_tables=PREFERABLY;
+set histogram_size=10;
+
+CREATE TABLE t1 (id int);
+INSERT INTO t1 (id) VALUES (1), (1), (1), (1), (1), (1), (1);
+INSERT INTO t1 (id) SELECT id FROM t1;
+INSERT INTO t1 SELECT id+1 FROM t1;
+INSERT INTO t1 SELECT id+2 FROM t1;
+INSERT INTO t1 SELECT id+4 FROM t1;
+INSERT INTO t1 SELECT id+8 FROM t1;
+INSERT INTO t1 SELECT id+16 FROM t1;
+INSERT INTO t1 SELECT id+32 FROM t1;
+INSERT INTO t1 SELECT id+64 FROM t1;
+INSERT INTO t1 SELECT id+128 FROM t1;
+INSERT INTO t1 SELECT id+256 FROM t1;
+INSERT INTO t1 SELECT id+512 FROM t1;
+INSERT INTO t1 SELECT id+1024 FROM t1;
+INSERT INTO t1 SELECT id+2048 FROM t1;
+INSERT INTO t1 SELECT id+4096 FROM t1;
+INSERT INTO t1 SELECT id+9192 FROM t1;
+
+--echo #
+--echo # This query will should show a full table scan analysis.
+--echo #
+ANALYZE TABLE t1;
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+ DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+set analyze_sample_percentage=0.1;
+
+--echo #
+--echo # This query will show an innacurate avg_frequency value.
+--echo #
+ANALYZE TABLE t1;
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+ DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+
+--echo #
+--echo # This query will show a better avg_frequency value.
+--echo #
+set analyze_sample_percentage=25;
+ANALYZE TABLE t1;
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+ DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+
+
+set analyze_sample_percentage=0;
+--echo #
+--echo # Test self adjusting sampling level.
+--echo #
+ANALYZE TABLE t1;
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+ DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+-- echo #
+-- echo # Test record estimation is working properly.
+-- echo #
+select count(*) from t1;
+explain select * from t1;
+
+set analyze_sample_percentage=100;
+ANALYZE TABLE t1;
+select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
+ DECODE_HISTOGRAM(hist_type, histogram)
+from mysql.column_stats;
+explain select * from t1;
+
+
+drop table t1;
+set analyze_sample_percentage=@save_analyze_sample_percentage;
+set histogram_size=@save_histogram_size;
+set use_stat_tables=@save_use_stat_tables;
set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/status.result b/mysql-test/main/status.result
index 688d8acee1a..37c551328f0 100644
--- a/mysql-test/main/status.result
+++ b/mysql-test/main/status.result
@@ -324,7 +324,7 @@ Handler_mrr_key_refills 0
Handler_mrr_rowid_refills 0
Handler_prepare 0
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 9
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
@@ -403,9 +403,9 @@ Table_open_cache_overflows 0
SHOW STATUS LIKE 'Table_open_cache%';
Variable_name Value
Table_open_cache_active_instances 1
-Table_open_cache_hits 30
-Table_open_cache_misses 15
-Table_open_cache_overflows 5
+Table_open_cache_hits 72
+Table_open_cache_misses 18
+Table_open_cache_overflows 8
FLUSH TABLES;
FLUSH STATUS;
SET @@global.table_open_cache= @old_table_open_cache;
diff --git a/mysql-test/main/str_to_datetime_457.result b/mysql-test/main/str_to_datetime_457.result
index 4fd0d00691c..e365c303c81 100644
--- a/mysql-test/main/str_to_datetime_457.result
+++ b/mysql-test/main/str_to_datetime_457.result
@@ -1,6 +1,6 @@
select cast('01:02:03 ' as time), cast('01:02:03 ' as time);
cast('01:02:03 ' as time) cast('01:02:03 ' as time)
-01:02:03 00:00:00
+01:02:03 01:02:03
select cast('2002-011-012' as date), cast('2002.11.12' as date), cast('2002.011.012' as date);
cast('2002-011-012' as date) cast('2002.11.12' as date) cast('2002.011.012' as date)
2002-11-12 2002-11-12 2002-11-12
@@ -17,10 +17,7 @@ Warnings:
Warning 1292 Incorrect datetime value: '0'
select extract(hour from '100000:02:03'), extract(hour from '100000:02:03 ');
extract(hour from '100000:02:03') extract(hour from '100000:02:03 ')
-NULL NULL
-Warnings:
-Warning 1292 Truncated incorrect time value: '100000:02:03'
-Warning 1292 Truncated incorrect time value: '100000:02:03 '
+16 16
#
# backward compatibility craziness
#
diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result
index 512e0e7808f..02c362616f9 100644
--- a/mysql-test/main/subselect.result
+++ b/mysql-test/main/subselect.result
@@ -6,7 +6,7 @@ set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=1;
SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
@@ -83,7 +83,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE(1))' at line 1
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -180,7 +180,8 @@ select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
a b
1 7
2 7
-(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3;
+(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1))
+union (select * from t4 order by a limit 2) order by a limit 3;
a b
1 7
2 7
@@ -344,7 +345,7 @@ patient_uq clinic_uq
explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index
-1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t6 ALL i1 NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where `test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`
@@ -1132,7 +1133,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN;
HANDLER t1 READ a=((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: HANDLER..READ does not support subqueries or stored functions
HANDLER t1 CLOSE;
drop table t1;
create table t1 (a int);
@@ -1441,7 +1442,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1451,7 +1452,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1461,8 +1462,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1630,7 +1631,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -3103,13 +3104,18 @@ create table t1(a int, primary key (a));
insert into t1 values (10);
create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b));
insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989');
+insert into t2(a, c, b) values (4,10,'360'), (5,10,'35998'), (6,10,'35999');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using where
+2 SUBQUERY t2 range b b 40 NULL 3 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
@@ -3121,7 +3127,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using index condition
+2 SUBQUERY t2 range b b 40 NULL 3 Using index condition
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
@@ -3708,7 +3714,7 @@ ORDER BY t1.t DESC LIMIT 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
1 PRIMARY t1 index NULL PRIMARY 13 NULL 11 Using where; Using index
-2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 5 Using where; Using index
+2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 6 Using where; Using index
SELECT * FROM t1,t2
WHERE t1.t = (SELECT t1.t FROM t1
WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
@@ -3727,11 +3733,14 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
i
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-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 'UNION (SELECT i FROM t1)))' at line 2
+i
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
-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 'union (select t12.i from t1 t12))
-from t1' at line 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
id select_type table type possible_keys key key_len ref rows Extra
@@ -4977,7 +4986,7 @@ UNIQUE KEY b (b,c),
KEY c (c),
KEY b_2 (b)
);
-INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1), (3,33,1), (4,34,2);
explain
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5187,11 +5196,11 @@ a 1
1 1
2 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
-ERROR 42000: Every derived table must have its own alias
+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 'ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
@@ -5290,13 +5299,16 @@ SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
a b
SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+1
+1
( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+1
+1
SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) )
+1
SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
1
@@ -5304,9 +5316,9 @@ SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
((SELECT 1 UNION SELECT 1 UNION SELECT 1))
1
SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: Every derived table must have its own alias
+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 '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ) a;
1
1
@@ -5314,21 +5326,29 @@ SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
1
1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
a
1
@@ -7022,8 +7042,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
@@ -7082,12 +7102,6 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
-SELECT
-(SELECT user FROM mysql.user
-WHERE h.host in (SELECT host FROM mysql.user)
-) AS sq
-FROM mysql.host h GROUP BY h.host;
-sq
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
@@ -7369,3 +7383,18 @@ a
1
drop table t1,t2,t3;
# End of 10.2 tests
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16861 Split Item::update_null_value() into a new virtual method in Type_handler
+#
+SELECT ROW(1,2) = EXISTS (SELECT 1);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test
index 3dcff34e773..d87aba57567 100644
--- a/mysql-test/main/subselect.test
+++ b/mysql-test/main/subselect.test
@@ -27,7 +27,7 @@ if (`select @join_cache_level_for_subselect_test is not null`)
set join_cache_level=@join_cache_level_for_subselect_test;
}
SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
select (select 2);
explain extended select (select 2);
@@ -56,7 +56,7 @@ SELECT 1 IN (SELECT 1);
SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
-- error ER_PARSE_ERROR
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
--- error ER_PARSE_ERROR
+-- error ER_SUBQUERIES_NOT_SUPPORTED
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-- error ER_BAD_FIELD_ERROR
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
@@ -100,7 +100,8 @@ select (select a from t3), a from t2;
select * from t2 where t2.a=(select a from t1);
insert into t3 values (6),(7),(3);
select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
-(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3;
+(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1))
+union (select * from t4 order by a limit 2) order by a limit 3;
(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a);
explain extended (select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a);
select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2;
@@ -622,7 +623,7 @@ set @a:=(SELECT a from t1);
CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN;
--- error ER_PARSE_ERROR
+-- error ER_SUBQUERIES_NOT_SUPPORTED
HANDLER t1 READ a=((SELECT 1));
HANDLER t1 CLOSE;
drop table t1;
@@ -2026,6 +2027,8 @@ insert into t1 values (10);
create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b));
insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989');
+insert into t2(a, c, b) values (4,10,'360'), (5,10,'35998'), (6,10,'35999');
+analyze table t1;
explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
@@ -2605,13 +2608,9 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
(SELECT i FROM t1)
);
-#TODO:not supported
---error ER_PARSE_ERROR
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-#TODO:not supported
---error ER_PARSE_ERROR
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
@@ -3880,7 +3879,7 @@ CREATE TABLE t3 (
KEY b_2 (b)
);
-INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1), (3,33,1), (4,34,2);
explain
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
@@ -4314,7 +4313,7 @@ SELECT * FROM (SELECT 1 a UNION SELECT 1 a ORDER BY a LIMIT 1) t1a;
# aliases after.
#
SELECT * FROM t1 JOIN (SELECT 1 UNION SELECT 1) alias ON 1;
---error ER_DERIVED_MUST_HAVE_ALIAS
+--error ER_PARSE_ERROR
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
--error ER_PARSE_ERROR
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
@@ -4392,12 +4391,9 @@ SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
# Make sure the parser does not allow nested UNIONs anywhere
---error ER_PARSE_ERROR
SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
---error ER_PARSE_ERROR
( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
---error ER_PARSE_ERROR
SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
--error ER_PARSE_ERROR
SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
@@ -4406,27 +4402,19 @@ SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
--error ER_PARSE_ERROR
SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
---error ER_DERIVED_MUST_HAVE_ALIAS
+--error ER_PARSE_ERROR
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ) a;
SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
---error ER_PARSE_ERROR
SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
@@ -5934,13 +5922,6 @@ call procedure2();
drop procedure procedure2;
-SELECT
- (SELECT user FROM mysql.user
- WHERE h.host in (SELECT host FROM mysql.user)
- ) AS sq
-FROM mysql.host h GROUP BY h.host;
-
-
--echo #
--echo # MDEV-7846:Server crashes in Item_subselect::fix
--echo #_fields or fails with Thread stack overrun
@@ -6226,3 +6207,23 @@ select a from t3
drop table t1,t2,t3;
--echo # End of 10.2 tests
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16861 Split Item::update_null_value() into a new virtual method in Type_handler
+--echo #
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,2) = EXISTS (SELECT 1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/subselect2.result b/mysql-test/main/subselect2.result
index 8b20460f611..c54d635230f 100644
--- a/mysql-test/main/subselect2.result
+++ b/mysql-test/main/subselect2.result
@@ -132,7 +132,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 eq_ref PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 34 test.t3.PARENTID 1 Using where
1 PRIMARY t3 eq_ref PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 34 test.t3.PARENTID 1 Using where
1 PRIMARY t3 eq_ref PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 34 test.t3.PARENTID 1 Using where
-1 PRIMARY t3 eq_ref PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 34 test.t3.PARENTID 1 Using where
+1 PRIMARY t3 ref|filter PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX FFOLDERID_IDX|CMFLDRPARNT_IDX 34|35 test.t3.PARENTID 1 (29%) Using where; Using rowid filter
drop table t1, t2, t3, t4;
CREATE TABLE t1 (a int(10) , PRIMARY KEY (a)) Engine=InnoDB;
INSERT INTO t1 VALUES (1),(2);
@@ -286,8 +286,8 @@ WHERE date < '2012-12-12 12:12:12'
ORDER BY mirror_date ASC
) AS calculated_result;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
-2 DERIVED t1 range date date 6 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using filesort
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3
+2 DERIVED t1 ALL date NULL NULL NULL 3 Using where; Using filesort
SELECT * FROM (
SELECT node_uid, date, mirror_date, @result := 0 AS result
FROM t1
@@ -309,8 +309,8 @@ WHERE date < '2012-12-12 12:12:12'
ORDER BY mirror_date ASC
) AS calculated_result;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
-2 DERIVED t1 range date date 6 NULL 2 Using index condition; Using where; Using filesort
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3
+2 DERIVED t1 ALL date NULL NULL NULL 3 Using where; Using filesort
SELECT * FROM (
SELECT node_uid, date, mirror_date, @result := 0 AS result
FROM t1
@@ -413,6 +413,6 @@ f1 test
1 1
2 1
Warnings:
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '2'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '2'
DROP TABLE t1,t2;
diff --git a/mysql-test/main/subselect4.result b/mysql-test/main/subselect4.result
index c794aade773..262adc51d3a 100644
--- a/mysql-test/main/subselect4.result
+++ b/mysql-test/main/subselect4.result
@@ -2258,7 +2258,7 @@ SELECT a3 FROM t3 WHERE b2 = b1 AND b2 <= b1 ORDER BY b3
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
-3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
+1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; FirstMatch(t1); Using join buffer (flat, BNL join)
SELECT * FROM t1 WHERE a1 IN (
SELECT a2 FROM t2 WHERE a2 IN (
SELECT a3 FROM t3 WHERE b2 = b1 AND b2 <= b1 ORDER BY b3
@@ -3155,3 +3155,52 @@ b
2
drop table t1,t2,t3,t4;
# End of 10.3 tests
+#
+# MDEV-19134: EXISTS() slower if ORDER BY is defined
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int, b int);
+insert into t1 select
+A.a + B.a*10, A.a + B.a*10 from t0 A, t0 B;
+create table t2 as select * from t1;
+# This will be converted to semi-join:
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 100
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 100
+# query with a non-zero constant LIMIT is converted to semi-join, too:
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b limit 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 100
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 100
+# Zero LIMIT should prevent the conversion (but it is not visible atm
+# due to MDEV-19429)
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b limit 0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
+2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Zero limit
+# LIMIT+OFFSET prevents the conversion:
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b limit 2,3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 100 Using where; Using filesort
+# This will be merged and converted into a semi-join:
+explain
+select * from t1 where t1.a in (select t2.a from t2 order by t2.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 100
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 100
+drop table t0, t1, t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test
index 6aedabcd3f5..63f08016ad8 100644
--- a/mysql-test/main/subselect4.test
+++ b/mysql-test/main/subselect4.test
@@ -2552,3 +2552,45 @@ eval $q6;
drop table t1,t2,t3,t4;
--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-19134: EXISTS() slower if ORDER BY is defined
+--echo #
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1(a int, b int);
+insert into t1 select
+ A.a + B.a*10, A.a + B.a*10 from t0 A, t0 B;
+
+create table t2 as select * from t1;
+
+--echo # This will be converted to semi-join:
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b);
+
+--echo # query with a non-zero constant LIMIT is converted to semi-join, too:
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b limit 2);
+
+--echo # Zero LIMIT should prevent the conversion (but it is not visible atm
+--echo # due to MDEV-19429)
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b limit 0);
+
+--echo # LIMIT+OFFSET prevents the conversion:
+explain
+select * from t1
+where exists (select * from t2 where t2.a=t1.a order by t2.b limit 2,3);
+
+--echo # This will be merged and converted into a semi-join:
+explain
+select * from t1 where t1.a in (select t2.a from t2 order by t2.b);
+
+
+drop table t0, t1, t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/subselect_exists2in.result b/mysql-test/main/subselect_exists2in.result
index 16136fcb5ae..6ff518b5a29 100644
--- a/mysql-test/main/subselect_exists2in.result
+++ b/mysql-test/main/subselect_exists2in.result
@@ -142,6 +142,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
create table t2 (
a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' '
@@ -169,6 +170,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
create table t3 (
a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' '
@@ -230,6 +232,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
diff --git a/mysql-test/main/subselect_exists2in_costmat.result b/mysql-test/main/subselect_exists2in_costmat.result
index a46996d9bad..1c9574aafd3 100644
--- a/mysql-test/main/subselect_exists2in_costmat.result
+++ b/mysql-test/main/subselect_exists2in_costmat.result
@@ -37,6 +37,8 @@ create index Language on CountryLanguage(Language);
create index CityName on City(Name);
alter table City change population population int(11) null default 0;
select max(id) from City into @max_city_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
insert into City values (@max_city_id + 1,'Kilifarevo','BGR',NULL);
SELECT COUNT(*) FROM Country;
COUNT(*)
@@ -63,7 +65,7 @@ Name LIKE 'L%') AND
surfacearea > 1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL Name,SurfaceArea NULL NULL NULL 239 Using where
-2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4080 Using where
+2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4079 Using where
SELECT Name FROM Country
WHERE (EXISTS (select 1 from City where City.Population > 100000 and
Code = Country) OR
diff --git a/mysql-test/main/subselect_extra.result b/mysql-test/main/subselect_extra.result
index dbcf00268c2..c654fdfca13 100644
--- a/mysql-test/main/subselect_extra.result
+++ b/mysql-test/main/subselect_extra.result
@@ -132,6 +132,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
create table t2 (
a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' '
@@ -159,6 +160,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
create table t3 (
a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' '
@@ -220,6 +222,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
@@ -302,6 +305,7 @@ INSERT INTO t1 SELECT a + 64,b FROM t1;
INSERT INTO t1 SELECT a + 128,b FROM t1 limit 16;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT 1 FROM t1 WHERE a IN
(SELECT a FROM t1 USE INDEX (i2) IGNORE INDEX (i2));
diff --git a/mysql-test/main/subselect_extra_no_semijoin.result b/mysql-test/main/subselect_extra_no_semijoin.result
index 49a1431eb9b..faeaf75c590 100644
--- a/mysql-test/main/subselect_extra_no_semijoin.result
+++ b/mysql-test/main/subselect_extra_no_semijoin.result
@@ -136,6 +136,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
create table t2 (
a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' '
@@ -163,6 +164,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
create table t3 (
a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' '
@@ -224,6 +226,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
@@ -306,6 +309,7 @@ INSERT INTO t1 SELECT a + 64,b FROM t1;
INSERT INTO t1 SELECT a + 128,b FROM t1 limit 16;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT 1 FROM t1 WHERE a IN
(SELECT a FROM t1 USE INDEX (i2) IGNORE INDEX (i2));
diff --git a/mysql-test/main/subselect_innodb.result b/mysql-test/main/subselect_innodb.result
index fd75cce00b2..a32c9ebe09c 100644
--- a/mysql-test/main/subselect_innodb.result
+++ b/mysql-test/main/subselect_innodb.result
@@ -1,6 +1,5 @@
set @subselect_innodb_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-drop table if exists t1,t2,t3;
CREATE TABLE t1
(
FOLDERID VARCHAR(32)BINARY NOT NULL
@@ -154,6 +153,9 @@ EXECUTE my_stmt;
b count(*)
deallocate prepare my_stmt;
drop table t1,t2;
+#
+# End of 4.1 tests
+#
CREATE TABLE t1 (
school_name varchar(45) NOT NULL,
country varchar(45) NOT NULL,
@@ -287,7 +289,6 @@ LIMIT 10;
col_time_key col_datetime_key
DROP TABLE t1;
DROP TABLE t2;
-# End of Bug #58756
#
# Bug#60085 crash in Item::save_in_field() with time data type
#
@@ -311,7 +312,7 @@ EXPLAIN SELECT 1 FROM t1 WHERE NOT EXISTS
(SELECT 1 FROM t2 WHERE d = (SELECT d FROM t2 WHERE a >= 1) ORDER BY d);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1 Using where
-2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY,d PRIMARY 1 func 1 Using where
+2 DEPENDENT SUBQUERY t2 unique_subquery PRIMARY,d PRIMARY 1 func 1 Using where
3 DEPENDENT SUBQUERY t2 index NULL d 2 NULL 1 Using index
DROP TABLE t2;
CREATE TABLE t2 (b INT, c INT, UNIQUE KEY (b), UNIQUE KEY (b, c )) ENGINE=INNODB;
@@ -356,7 +357,9 @@ LIMIT 1;
maxkey
NULL
DROP TABLE t1,t2;
-End of 5.1 tests
+#
+# End of 5.1 tests
+#
#
# lp:827416 Crash in select_describe() on EXPLAIN with DISTINCT in nested subqueries
#
@@ -458,7 +461,7 @@ EXPLAIN
SELECT * FROM t1 WHERE EXISTS ( SELECT b FROM t2, t3 GROUP BY b HAVING b != 3 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-2 SUBQUERY t2 index NULL PRIMARY 4 NULL 1 Using index; Using temporary; Using filesort
+2 SUBQUERY t2 index NULL PRIMARY 4 NULL 1 Using index; Using temporary
2 SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
SELECT * FROM t1 WHERE EXISTS ( SELECT b FROM t2, t3 GROUP BY b HAVING b != 3 );
a
@@ -480,7 +483,7 @@ HAVING SQ2_alias1 . col_int_key >= 7
);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-2 SUBQUERY SQ2_alias2 index NULL col_int_key 5 NULL 1 Using index; Using temporary; Using filesort
+2 SUBQUERY SQ2_alias2 index NULL col_int_key 5 NULL 1 Using index; Using temporary
2 SUBQUERY SQ2_alias1 ref col_int_key col_int_key 5 test.SQ2_alias2.col_int_key 1 Using where; Using index
SELECT 1 FROM t1 AS alias1
WHERE EXISTS ( SELECT SQ2_alias1 . col_int_key AS SQ2_field1
@@ -561,6 +564,7 @@ update t2 set key2=key1;
alter table t2 add key(key2);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
flush tables;
# Table tsubq must use 'ref' + Using filesort (not 'index' w/o filesort)
@@ -577,7 +581,7 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY t2 ref key1 key1 5 test.t1.a # Using where; Using filesort
drop table t1,t2;
#
-# mdev-12931: semi-join in ON expression of STRAIGHT_JOIN
+# MDEV-12931: semi-join in ON expression of STRAIGHT_JOIN
# joining a base table and a mergeable derived table
#
CREATE TABLE t1 (f1 int) ENGINE=InnoDB;
@@ -672,3 +676,54 @@ SELECT 1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t
1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)))
1
drop table t1,t2;
+#
+# End of 10.2 tests
+#
+#
+# MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
+# failed in Item_equal::fix_fields, server crashes after 2nd execution
+# of PS
+#
+create table t1 (a int, b int);
+create table t2 (x int, y int);
+insert into t1 values (1,1),(2,2);
+insert into t2 values (1,1),(2,2),(2,3);
+# here we can see conditions pushdown (see HAVING):
+prepare stmt from "
+explain extended
+SELECT * FROM t1
+WHERE a = b
+ AND (a,b) IN (SELECT t2.x, COUNT(t2.y) FROM t2 WHERE 1=2 GROUP BY t2.x);";
+execute stmt;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select `test`.`t2`.`x`,count(`test`.`t2`.`y`) from `test`.`t2` where 0 group by `test`.`t2`.`x` having `COUNT(t2.y)` = `test`.`t2`.`x`) join `test`.`t1` where 0
+# here re-execution of the pushdown does not crash:
+prepare stmt from "
+SELECT * FROM t1
+WHERE a = b
+ AND (a,b) IN (SELECT t2.x, COUNT(t2.y) FROM t2 WHERE 1=2 GROUP BY t2.x);";
+execute stmt;
+a b
+execute stmt;
+a b
+execute stmt;
+a b
+drop table t1,t2;
+#
+# MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING
+#
+create table t1 (a text(60) not null) engine=innodb;
+insert into t1 values ('1'),('0');
+select distinct a from t1 where '' in (select 'x' like a having a like a);
+a
+1
+0
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+drop table t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/subselect_innodb.test b/mysql-test/main/subselect_innodb.test
index 5d8f3dcc1b5..fef954edc28 100644
--- a/mysql-test/main/subselect_innodb.test
+++ b/mysql-test/main/subselect_innodb.test
@@ -4,9 +4,6 @@
# settings are not relevant.
set @subselect_innodb_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
---disable_warnings
-drop table if exists t1,t2,t3;
---enable_warnings
#
# key field overflow test
@@ -164,7 +161,9 @@ EXECUTE my_stmt;
deallocate prepare my_stmt;
drop table t1,t2;
-# End of 4.1 tests
+--echo #
+--echo # End of 4.1 tests
+--echo #
CREATE TABLE t1 (
school_name varchar(45) NOT NULL,
@@ -289,8 +288,6 @@ LIMIT 10;
DROP TABLE t1;
DROP TABLE t2;
---echo # End of Bug #58756
-
--echo #
--echo # Bug#60085 crash in Item::save_in_field() with time data type
--echo #
@@ -354,7 +351,9 @@ eval $query;
DROP TABLE t1,t2;
---echo End of 5.1 tests
+--echo #
+--echo # End of 5.1 tests
+--echo #
--echo #
--echo # lp:827416 Crash in select_describe() on EXPLAIN with DISTINCT in nested subqueries
@@ -507,8 +506,6 @@ drop table t1,t2;
--echo # for a subquery from the expression used in ref access
--echo #
---source include/have_innodb.inc
-
CREATE TABLE t1 (i1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
@@ -578,7 +575,7 @@ from
drop table t1,t2;
--echo #
---echo # mdev-12931: semi-join in ON expression of STRAIGHT_JOIN
+--echo # MDEV-12931: semi-join in ON expression of STRAIGHT_JOIN
--echo # joining a base table and a mergeable derived table
--echo #
@@ -667,5 +664,51 @@ SELECT 1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t
drop table t1,t2;
-# End of 10.2 tests
+--echo #
+--echo # End of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
+--echo # failed in Item_equal::fix_fields, server crashes after 2nd execution
+--echo # of PS
+--echo #
+create table t1 (a int, b int);
+create table t2 (x int, y int);
+
+insert into t1 values (1,1),(2,2);
+insert into t2 values (1,1),(2,2),(2,3);
+
+--echo # here we can see conditions pushdown (see HAVING):
+prepare stmt from "
+explain extended
+SELECT * FROM t1
+WHERE a = b
+ AND (a,b) IN (SELECT t2.x, COUNT(t2.y) FROM t2 WHERE 1=2 GROUP BY t2.x);";
+
+execute stmt;
+
+--echo # here re-execution of the pushdown does not crash:
+prepare stmt from "
+SELECT * FROM t1
+WHERE a = b
+ AND (a,b) IN (SELECT t2.x, COUNT(t2.y) FROM t2 WHERE 1=2 GROUP BY t2.x);";
+
+execute stmt;
+execute stmt;
+execute stmt;
+
+drop table t1,t2;
+
+--echo #
+--echo # MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING
+--echo #
+create table t1 (a text(60) not null) engine=innodb;
+insert into t1 values ('1'),('0');
+select distinct a from t1 where '' in (select 'x' like a having a like a);
+drop table t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/subselect_mat.result b/mysql-test/main/subselect_mat.result
index a6d8738a674..0d464604730 100644
--- a/mysql-test/main/subselect_mat.result
+++ b/mysql-test/main/subselect_mat.result
@@ -38,6 +38,20 @@ create index it3i3 on t3i (c1, c2);
insert into t1i select * from t1;
insert into t2i select * from t2;
insert into t3i select * from t3;
+analyze table t1,t2,t3,t1i,t2i,t3i;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
+test.t1i analyze status Engine-independent statistics collected
+test.t1i analyze status Table is already up to date
+test.t2i analyze status Engine-independent statistics collected
+test.t2i analyze status Table is already up to date
+test.t3i analyze status Engine-independent statistics collected
+test.t3i analyze status Table is already up to date
set @@optimizer_switch='materialization=on,in_to_exists=off,firstmatch=off';
/******************************************************************************
* Simple tests.
@@ -47,7 +61,7 @@ explain extended
select * from t1 where a1 in (select b1 from t2 where b1 > '0');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`>(<in_optimizer>(`test`.`t1`.`a1`,`test`.`t1`.`a1` in ( <materialize> (/* select#2 */ select `test`.`t2`.`b1` from `test`.`t2` where `test`.`t2`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1`))))
select * from t1 where a1 in (select b1 from t2 where b1 > '0');
@@ -58,7 +72,7 @@ explain extended
select * from t1 where a1 in (select b1 from t2 where b1 > '0' group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`>(<in_optimizer>(`test`.`t1`.`a1`,`test`.`t1`.`a1` in ( <materialize> (/* select#2 */ select `test`.`t2`.`b1` from `test`.`t2` where `test`.`t2`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1`))))
select * from t1 where a1 in (select b1 from t2 where b1 > '0' group by b1);
@@ -69,7 +83,7 @@ explain extended
select * from t1 where (a1, a2) in (select b1, b2 from t2 where b1 > '0' group by b1, b2);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1` and `test`.`t1`.`a2` = `<subquery2>`.`b2`))))
select * from t1 where (a1, a2) in (select b1, b2 from t2 where b1 > '0' group by b1, b2);
@@ -80,7 +94,7 @@ explain extended
select * from t1 where (a1, a2) in (select b1, min(b2) from t2 where b1 > '0' group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using temporary
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where; Using temporary
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2`.`b1`,min(`test`.`t2`.`b2`) from `test`.`t2` where `test`.`t2`.`b1` > '0' group by `test`.`t2`.`b1` ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1` and `test`.`t1`.`a2` = `<subquery2>`.`min(b2)`))))
select * from t1 where (a1, a2) in (select b1, min(b2) from t2 where b1 > '0' group by b1);
@@ -124,7 +138,7 @@ explain extended
select * from t1i where (a1, a2) in (select b1, max(b2) from t2i where b1 > '0' group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1i index NULL # # # 3 100.00 #
-2 MATERIALIZED t2i range it2i1,it2i3 # # # 3 100.00 #
+2 MATERIALIZED t2i range it2i1,it2i3 # # # 5 100.00 #
Warnings:
Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <expr_cache><`test`.`t1i`.`a1`,`test`.`t1i`.`a2`>(<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,max(`test`.`t2i`.`b2`) from `test`.`t2i` where `test`.`t2i`.`b1` > '0' group by `test`.`t2i`.`b1` ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery2>`.`b1` and `test`.`t1i`.`a2` = `<subquery2>`.`max(b2)`))))
select * from t1i where (a1, a2) in (select b1, max(b2) from t2i where b1 > '0' group by b1);
@@ -135,34 +149,52 @@ explain extended
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1i index NULL # # # 3 100.00 #
-2 MATERIALIZED t2i range it2i1,it2i3 # # # 3 100.00 #
+2 MATERIALIZED t2i range it2i1,it2i3 # # # 5 100.00 #
Warnings:
Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <expr_cache><`test`.`t1i`.`a1`,`test`.`t1i`.`a2`>(<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,min(`test`.`t2i`.`b2`) from `test`.`t2i` where `test`.`t2i`.`b1` > '0' group by `test`.`t2i`.`b1` ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key where `test`.`t1i`.`a1` = `<subquery2>`.`b1` and `test`.`t1i`.`a2` = `<subquery2>`.`min(b2)`))))
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
+create table t2i_c like t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+analyze table t2i_c;
+Table Op Msg_type Msg_text
+test.t2i_c analyze status Engine-independent statistics collected
+test.t2i_c analyze status OK
+show create table t2i_c;
+Table Create Table
+t2i_c CREATE TABLE `t2i_c` (
+ `b1` char(8) DEFAULT NULL,
+ `b2` char(8) DEFAULT NULL,
+ KEY `it2i1` (`b1`),
+ KEY `it2i2` (`b2`),
+ KEY `it2i3` (`b1`,`b2`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
explain extended
-select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1);
+select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-2 MATERIALIZED t2i range NULL it2i3 9 NULL 3 100.00 Using index for group-by
+2 MATERIALIZED t2i_c range NULL it2i3 9 NULL 4 100.00 Using index for group-by
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,max(`test`.`t2i`.`b2`) from `test`.`t2i` group by `test`.`t2i`.`b1` ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1` and `test`.`t1`.`a2` = `<subquery2>`.`max(b2)`))))
-select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1);
+Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2i_c`.`b1`,max(`test`.`t2i_c`.`b2`) from `test`.`t2i_c` group by `test`.`t2i_c`.`b1` ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1` and `test`.`t1`.`a2` = `<subquery2>`.`max(b2)`))))
+select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1);
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
-prepare st1 from "explain select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1)";
+prepare st1 from "explain select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1)";
execute st1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-2 MATERIALIZED t2i range NULL it2i3 9 NULL 3 Using index for group-by
+2 MATERIALIZED t2i_c range NULL it2i3 9 NULL 4 Using index for group-by
execute st1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-2 MATERIALIZED t2i range NULL it2i3 9 NULL 3 Using index for group-by
-prepare st2 from "select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1)";
+2 MATERIALIZED t2i_c range NULL it2i3 9 NULL 4 Using index for group-by
+prepare st2 from "select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1)";
execute st2;
a1 a2
1 - 01 2 - 01
@@ -171,11 +203,12 @@ execute st2;
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
+drop table t2i_c;
explain extended
select * from t1 where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-2 MATERIALIZED t2i range it2i1,it2i3 it2i3 18 NULL 3 100.00 Using where; Using index for group-by
+2 MATERIALIZED t2i range it2i1,it2i3 it2i3 9 NULL 5 100.00 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,min(`test`.`t2i`.`b2`) from `test`.`t2i` where `test`.`t2i`.`b1` > '0' group by `test`.`t2i`.`b1` ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1` and `test`.`t1`.`a2` = `<subquery2>`.`min(b2)`))))
select * from t1 where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
@@ -288,7 +321,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
4 MATERIALIZED t2i index it2i2 it2i3 18 NULL 5 100.00 Using where; Using index
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#2 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` > '0' ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery2>`.`b1` and `test`.`t1`.`a2` = `<subquery2>`.`b2`)))) and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#3 */ select `test`.`t3`.`c1`,`test`.`t3`.`c2` from `test`.`t3` where <expr_cache><`test`.`t3`.`c1`,`test`.`t3`.`c2`>(<in_optimizer>((`test`.`t3`.`c1`,`test`.`t3`.`c2`),(`test`.`t3`.`c1`,`test`.`t3`.`c2`) in ( <materialize> (/* select#4 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b2` > '0' ), <primary_index_lookup>(`test`.`t3`.`c1` in <temporary table> on distinct_key where `test`.`t3`.`c1` = `<subquery4>`.`b1` and `test`.`t3`.`c2` = `<subquery4>`.`b2`)))) ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery3>`.`c1` and `test`.`t1`.`a2` = `<subquery3>`.`c2`))))
select * from t1
@@ -418,8 +451,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
5 MATERIALIZED t2i index it2i2 it2i3 18 NULL 5 100.00 Using where; Using index
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 99.22 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 99.22 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select `test`.`t1`.`a1`,`test`.`t1`.`a2` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t1`.`a1`) = `test`.`t1`.`a1` and <cache>(`test`.`t1`.`a2`) = `test`.`t1`.`a2` union /* select#3 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`b1` and <cache>(`test`.`t1`.`a2`) = `test`.`t2`.`b2`))) and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (/* select#4 */ select `test`.`t3`.`c1`,`test`.`t3`.`c2` from `test`.`t3` where <expr_cache><`test`.`t3`.`c1`,`test`.`t3`.`c2`>(<in_optimizer>((`test`.`t3`.`c1`,`test`.`t3`.`c2`),(`test`.`t3`.`c1`,`test`.`t3`.`c2`) in ( <materialize> (/* select#5 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b2` > '0' ), <primary_index_lookup>(`test`.`t3`.`c1` in <temporary table> on distinct_key where `test`.`t3`.`c1` = `<subquery5>`.`b1` and `test`.`t3`.`c2` = `<subquery5>`.`b2`)))) ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key where `test`.`t1`.`a1` = `<subquery4>`.`c1` and `test`.`t1`.`a2` = `<subquery4>`.`c2`))))
@@ -441,8 +474,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
5 MATERIALIZED t2i index it2i2 it2i3 18 NULL 5 100.00 Using where; Using index
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 99.22 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 99.22 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t1` join `test`.`t3` where `test`.`t3`.`c1` = `test`.`t1`.`a1` and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select `test`.`t1`.`a1`,`test`.`t1`.`a2` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t1`.`a1`) = `test`.`t1`.`a1` and <cache>(`test`.`t1`.`a2`) = `test`.`t1`.`a2` union /* select#3 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`b1` and <cache>(`test`.`t1`.`a2`) = `test`.`t2`.`b2`))) and <expr_cache><`test`.`t3`.`c1`,`test`.`t3`.`c2`>(<in_optimizer>((`test`.`t3`.`c1`,`test`.`t3`.`c2`),(`test`.`t3`.`c1`,`test`.`t3`.`c2`) in ( <materialize> (/* select#4 */ select `test`.`t3`.`c1`,`test`.`t3`.`c2` from `test`.`t3` where <expr_cache><`test`.`t3`.`c1`,`test`.`t3`.`c2`>(<in_optimizer>((`test`.`t3`.`c1`,`test`.`t3`.`c2`),(`test`.`t3`.`c1`,`test`.`t3`.`c2`) in ( <materialize> (/* select#5 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` where `test`.`t2i`.`b2` > '0' ), <primary_index_lookup>(`test`.`t3`.`c1` in <temporary table> on distinct_key where `test`.`t3`.`c1` = `<subquery5>`.`b1` and `test`.`t3`.`c2` = `<subquery5>`.`b2`)))) ), <primary_index_lookup>(`test`.`t3`.`c1` in <temporary table> on distinct_key where `test`.`t3`.`c1` = `<subquery4>`.`c1` and `test`.`t3`.`c2` = `<subquery4>`.`c2`))))
@@ -463,8 +496,8 @@ select * from t3
where c1 in (select a1 from t1 where a1 > '0' UNION select b1 from t2 where b1 < '9');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 99.22 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 99.22 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t3` where <expr_cache><`test`.`t3`.`c1`>(<in_optimizer>(`test`.`t3`.`c1`,<exists>(/* select#2 */ select `test`.`t1`.`a1` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t3`.`c1`) = `test`.`t1`.`a1` union /* select#3 */ select `test`.`t2`.`b1` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t3`.`c1`) = `test`.`t2`.`b1`)))
@@ -484,7 +517,7 @@ where (c1, c2) in (select b1, b2 from t2i where b2 > '0' or b2 = a2));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
5 DEPENDENT SUBQUERY t3c ALL NULL NULL NULL NULL 4 100.00 Using where
-6 DEPENDENT SUBQUERY t2i index_subquery it2i1,it2i2,it2i3 it2i3 18 func,func 2 100.00 Using index; Using where
+6 DEPENDENT SUBQUERY t2i index_subquery it2i1,it2i2,it2i3 it2i3 18 func,func 1 100.00 Using index; Using where
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where
4 MATERIALIZED t3b ALL NULL NULL NULL NULL 4 100.00 Using where
3 DEPENDENT SUBQUERY t3a ALL NULL NULL NULL NULL 4 100.00 Using where
@@ -678,7 +711,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t1_16 ALL NULL NULL NULL NULL 3 100.00 Using where
3 DEPENDENT SUBQUERY t2_16 ALL NULL NULL NULL NULL 3 100.00 Using where
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
-4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
+4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 99.22 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><concat(`test`.`t1`.`a1`,'x')>(<in_optimizer>(concat(`test`.`t1`.`a1`,'x'),<exists>(/* select#2 */ select left(`test`.`t1_16`.`a1`,8) from `test`.`t1_16` where <expr_cache><`test`.`t1_16`.`a1`,`test`.`t1_16`.`a2`>(<in_optimizer>((`test`.`t1_16`.`a1`,`test`.`t1_16`.`a2`),<exists>(/* select#3 */ select `test`.`t2_16`.`b1`,`test`.`t2_16`.`b2` from `test`.`t2_16` join `test`.`t2` where `test`.`t2`.`b2` = substr(`test`.`t2_16`.`b2`,1,6) and <expr_cache><`test`.`t2`.`b1`>(<in_optimizer>(`test`.`t2`.`b1`,`test`.`t2`.`b1` in ( <materialize> (/* select#4 */ select `test`.`t3`.`c1` from `test`.`t3` where `test`.`t3`.`c2` > '0' ), <primary_index_lookup>(`test`.`t2`.`b1` in <temporary table> on distinct_key where `test`.`t2`.`b1` = `<subquery4>`.`c1`)))) and <cache>(`test`.`t1_16`.`a1`) = `test`.`t2_16`.`b1` and <cache>(`test`.`t1_16`.`a2`) = `test`.`t2_16`.`b2`))) and <cache>(concat(`test`.`t1`.`a1`,'x')) = left(`test`.`t1_16`.`a1`,8))))
drop table t1_16, t2_16, t3_16;
@@ -1900,7 +1933,7 @@ INSERT INTO t2 values(1),(2);
EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using temporary
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary
flush status;
CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
SHOW STATUS LIKE 'Created_tmp_tables';
@@ -1924,7 +1957,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2`) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7)
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2` having `MAX(c)` is null or `MAX(c)` = 7) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7)
SELECT * FROM t1
WHERE a IN (SELECT MAX(c) FROM t2) AND b=7 AND (a IS NULL OR a=b);
a b
@@ -2613,7 +2646,7 @@ select * from t1 where (a,b) in (select max(a),b from t2 group by b);
show status where Variable_name like 'Handler_read%' or Variable_name like 'Handler_%write%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 5000
+Handler_read_key 5004
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
diff --git a/mysql-test/main/subselect_mat_cost.result b/mysql-test/main/subselect_mat_cost.result
index d7b2efd3580..083917cef7e 100644
--- a/mysql-test/main/subselect_mat_cost.result
+++ b/mysql-test/main/subselect_mat_cost.result
@@ -39,6 +39,8 @@ create index Language on CountryLanguage(Language);
create index CityName on City(Name);
alter table City change population population int(11) null default 0;
select max(id) from City into @max_city_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
insert into City values (@max_city_id + 1,'Kilifarevo','BGR',NULL);
SELECT COUNT(*) FROM Country;
COUNT(*)
@@ -64,7 +66,7 @@ Name LIKE 'L%') AND
surfacearea > 1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL Name,SurfaceArea NULL NULL NULL 239 Using where
-2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4080 Using where
+2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4079 Using where
SELECT Name FROM Country
WHERE (Code IN (select Country from City where City.Population > 100000) OR
Name LIKE 'L%') AND
@@ -110,7 +112,7 @@ Name LIKE 'L%') AND
surfacearea > 10*1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range Name,SurfaceArea SurfaceArea 4 NULL 5 Using index condition; Using where; Rowid-ordered scan
-2 DEPENDENT SUBQUERY City index_subquery Population,Country Country 3 func 18 Using where
+2 DEPENDENT SUBQUERY City index_subquery Population,Country Country 3 func 17 Using where
SELECT Name FROM Country
WHERE (Code IN (select Country from City where City.Population > 100000) OR
Name LIKE 'L%') AND
@@ -132,7 +134,7 @@ Country.SurfaceArea < 3000 AND Country.SurfaceArea > 10 AND
City.name LIKE '%Island%');
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL PRIMARY,SurfaceArea NULL NULL NULL 239 Using where
-1 PRIMARY City ref Country Country 3 world.Country.Code 18 Using where
+1 PRIMARY City ref Country Country 3 world.Country.Code 17 Using where
2 MATERIALIZED CountryLanguage ALL Percentage,Language NULL NULL NULL 984 Using where
SELECT *
FROM Country, City
@@ -157,7 +159,7 @@ Country.SurfaceArea < 3000 AND Country.SurfaceArea > 10 AND
Country.name LIKE '%Island%');
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL PRIMARY,SurfaceArea NULL NULL NULL 239 Using where
-1 PRIMARY City ref Country Country 3 world.Country.Code 18
+1 PRIMARY City ref Country Country 3 world.Country.Code 17
2 DEPENDENT SUBQUERY CountryLanguage index_subquery Percentage,Language Language 30 func 2 Using where
SELECT *
FROM Country, City
@@ -202,7 +204,7 @@ OR
(select Country, Language from CountryLanguage));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL PRIMARY,SurfaceArea NULL NULL NULL 239 Using where
-1 PRIMARY City ref Country Country 3 world.Country.Code 18 Using where
+1 PRIMARY City ref Country Country 3 world.Country.Code 17 Using where
3 MATERIALIZED CountryLanguage index PRIMARY,Language PRIMARY 33 NULL 984 Using index
2 DEPENDENT SUBQUERY CountryLanguage unique_subquery PRIMARY,Percentage,Language PRIMARY 33 func,func 1 Using where
SELECT City.Name, Country.Name
@@ -231,7 +233,7 @@ select count(*) from City
where City.id not in (select capital from Country
where capital is not null and population < 100000);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY City index NULL PRIMARY 4 NULL 4080 Using where; Using index
+1 PRIMARY City index NULL PRIMARY 4 NULL 4079 Using where; Using index
2 MATERIALIZED Country ALL NULL NULL NULL NULL 239 Using where
Q2.2e:
@@ -245,7 +247,7 @@ WHERE Code NOT IN (SELECT Country FROM CountryLanguage WHERE Language = 'English
AND CountryLanguage.Language = 'French'
AND Code = Country;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY CountryLanguage ref PRIMARY,Language Language 30 const 20 Using index condition
+1 PRIMARY CountryLanguage ref PRIMARY,Language Language 30 const 19 Using index condition
1 PRIMARY Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where
2 DEPENDENT SUBQUERY CountryLanguage unique_subquery PRIMARY,Language PRIMARY 33 func,const 1 Using index; Using where
SELECT Country.Name
@@ -277,6 +279,7 @@ Q2.2m:
Countries that speak French OR Spanish, but do not speak English
MATERIALIZATION because the outer query filters less rows than Q5-a,
so there are more lookups.
+set statement optimizer_switch='rowid_filter=off' for
EXPLAIN
SELECT Country.Name
FROM Country, CountryLanguage
@@ -284,9 +287,10 @@ WHERE Code NOT IN (SELECT Country FROM CountryLanguage WHERE Language = 'English
AND (CountryLanguage.Language = 'French' OR CountryLanguage.Language = 'Spanish')
AND Code = Country;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY CountryLanguage range PRIMARY,Language Language 30 NULL 45 Using index condition; Using where; Rowid-ordered scan
+1 PRIMARY CountryLanguage range PRIMARY,Language Language 30 NULL 44 Using index condition; Rowid-ordered scan
1 PRIMARY Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where
-2 MATERIALIZED CountryLanguage ref PRIMARY,Language Language 30 const 47 Using index condition
+3 MATERIALIZED CountryLanguage ref PRIMARY,Language Language 30 const 48 Using index condition
+set statement optimizer_switch='rowid_filter=off' for
SELECT Country.Name
FROM Country, CountryLanguage
WHERE Code NOT IN (SELECT Country FROM CountryLanguage WHERE Language = 'English')
@@ -346,7 +350,7 @@ where (Language, Country) NOT IN
FROM City LEFT JOIN Country ON (Country = Code and City.Population < 10000))
AND Language IN ('English','Spanish');
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY CountryLanguage range Language Language 30 NULL 72 Using index condition; Using where; Rowid-ordered scan
+1 PRIMARY CountryLanguage range Language Language 30 NULL 73 Using index condition; Using where; Rowid-ordered scan
2 DEPENDENT SUBQUERY City ref CityName CityName 35 func 1 Using index condition
2 DEPENDENT SUBQUERY Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using index
select count(*)
@@ -370,7 +374,7 @@ FROM City LEFT JOIN Country ON (Country = Code)
HAVING City.Name LIKE "Santa%");
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY CountryLanguage index NULL PRIMARY 33 NULL 984 Using where; Using index
-2 MATERIALIZED City ALL NULL NULL NULL NULL 4080
+2 MATERIALIZED City ALL NULL NULL NULL NULL 4079
2 MATERIALIZED Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using index
select count(*)
from CountryLanguage
@@ -428,7 +432,7 @@ capital is null);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL NULL NULL NULL NULL 239 Using where
1 PRIMARY City eq_ref PRIMARY PRIMARY 4 world.Country.Capital 1 Using where
-2 MATERIALIZED City index NULL CityName 35 NULL 4080 Using index
+2 MATERIALIZED City index NULL CityName 35 NULL 4079 Using index
select * from Country, City
where capital = id and
(City.name in (SELECT name FROM City
@@ -449,7 +453,7 @@ WHERE Country.Code NOT IN
(SELECT Country FROM City GROUP BY Name HAVING COUNT(Name) = 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL NULL NULL NULL NULL 239 Using where
-2 MATERIALIZED City ALL NULL NULL NULL NULL 4080 Using temporary
+2 MATERIALIZED City ALL NULL NULL NULL NULL 4079 Using temporary
SELECT Name
FROM Country
WHERE Country.Code NOT IN
@@ -478,7 +482,7 @@ select Name, City.id in (select capital from Country where capital is not null)
from City
where City.population > 10000000;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY City range Population Population 5 NULL 4 Using index condition; Rowid-ordered scan
+1 PRIMARY City range Population Population 5 NULL 3 Using index condition; Rowid-ordered scan
2 MATERIALIZED Country ALL NULL NULL NULL NULL 239 Using where
select Name, City.id in (select capital from Country where capital is not null) as is_capital
from City
@@ -494,7 +498,7 @@ select Name, City.id in (select capital from Country where capital is not null)
from City
where City.population > 10000000;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY City range Population Population 5 NULL 4 Using index condition; Rowid-ordered scan
+1 PRIMARY City range Population Population 5 NULL 3 Using index condition; Rowid-ordered scan
2 SUBQUERY Country index_subquery CountryCapital CountryCapital 5 func 2 Using index; Using where
select Name, City.id in (select capital from Country where capital is not null) as is_capital
from City
@@ -512,7 +516,7 @@ GROUP BY City.Name
HAVING City.Name IN (select Name from Country where population < 1000000);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country index PRIMARY PRIMARY 3 NULL 239 Using index; Using temporary; Using filesort
-1 PRIMARY City ref Country Country 3 world.Country.Code 18
+1 PRIMARY City ref Country Country 3 world.Country.Code 17
2 MATERIALIZED Country ALL Name NULL NULL NULL 239 Using where
SELECT City.Name, City.Population
FROM City JOIN Country ON City.Country = Country.Code
@@ -537,7 +541,7 @@ SELECT Name, round(Population/1000)
FROM City
WHERE Country = "IND" AND Population < 100000);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY City ALL NULL NULL NULL NULL 4080 Using where
+1 PRIMARY City ALL NULL NULL NULL NULL 4079 Using where
2 DEPENDENT SUBQUERY City ref Population,Country,CityName CityName 35 func 1 Using where
3 DEPENDENT UNION City ref Population,Country,CityName CityName 35 func 1 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
diff --git a/mysql-test/main/subselect_mat_cost.test b/mysql-test/main/subselect_mat_cost.test
index b183e2496c6..73ba717a8dc 100644
--- a/mysql-test/main/subselect_mat_cost.test
+++ b/mysql-test/main/subselect_mat_cost.test
@@ -207,6 +207,9 @@ WHERE Code NOT IN (SELECT Country FROM CountryLanguage WHERE Language = 'English
-- echo Countries that speak French OR Spanish, but do not speak English
-- echo MATERIALIZATION because the outer query filters less rows than Q5-a,
-- echo so there are more lookups.
+
+
+set statement optimizer_switch='rowid_filter=off' for
EXPLAIN
SELECT Country.Name
FROM Country, CountryLanguage
@@ -214,6 +217,7 @@ WHERE Code NOT IN (SELECT Country FROM CountryLanguage WHERE Language = 'English
AND (CountryLanguage.Language = 'French' OR CountryLanguage.Language = 'Spanish')
AND Code = Country;
+set statement optimizer_switch='rowid_filter=off' for
SELECT Country.Name
FROM Country, CountryLanguage
WHERE Code NOT IN (SELECT Country FROM CountryLanguage WHERE Language = 'English')
diff --git a/mysql-test/main/subselect_mat_cost_bugs.result b/mysql-test/main/subselect_mat_cost_bugs.result
index af2f3d8d79f..1b5f94c427b 100644
--- a/mysql-test/main/subselect_mat_cost_bugs.result
+++ b/mysql-test/main/subselect_mat_cost_bugs.result
@@ -148,7 +148,7 @@ FROM t2 GROUP BY f1
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 SUBQUERY t1 system NULL NULL NULL NULL 1
-3 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+3 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using temporary
drop table t1, t2, t3;
#
# LP BUG#715034 Item_sum_distinct::clear(): Assertion `tree != 0' failed
@@ -189,8 +189,8 @@ SELECT alias2.f2 AS field1
FROM t1 AS alias1 JOIN ( SELECT * FROM t2 ) AS alias2 ON alias2.f3 = alias1.f1
WHERE (
SELECT t2.f2
-FROM t2 JOIN t1 ON t1.f1
-WHERE t1.f1 AND alias2.f10
+FROM t2 JOIN t1 ON (t1.f1>0 or t1.f1<0)
+WHERE (t1.f1>0 or t1.f1<0) AND alias2.f10
)
ORDER BY field1 ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -203,8 +203,8 @@ SELECT alias2.f2 AS field1
FROM t1 AS alias1 JOIN ( SELECT * FROM t2 ) AS alias2 ON alias2.f3 = alias1.f1
WHERE (
SELECT t2.f2
-FROM t2 JOIN t1 ON t1.f1
-WHERE t1.f1 AND alias2.f10
+FROM t2 JOIN t1 ON (t1.f1>0 or t1.f1<0)
+WHERE (t1.f1>0 or t1.f1<0) AND alias2.f10
)
ORDER BY field1 ;
field1
@@ -310,6 +310,7 @@ create index key3 on t2 (kp2);
SET @@optimizer_switch='materialization=off,semijoin=off,in_to_exists=on';
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
select c1 from t1 where c1 in (select kp1 from t2 where kp2 = 10 and c2 = 4) or c1 > 7;
diff --git a/mysql-test/main/subselect_mat_cost_bugs.test b/mysql-test/main/subselect_mat_cost_bugs.test
index 028cdced560..ba1aad06a15 100644
--- a/mysql-test/main/subselect_mat_cost_bugs.test
+++ b/mysql-test/main/subselect_mat_cost_bugs.test
@@ -217,8 +217,8 @@ SELECT alias2.f2 AS field1
FROM t1 AS alias1 JOIN ( SELECT * FROM t2 ) AS alias2 ON alias2.f3 = alias1.f1
WHERE (
SELECT t2.f2
- FROM t2 JOIN t1 ON t1.f1
- WHERE t1.f1 AND alias2.f10
+ FROM t2 JOIN t1 ON (t1.f1>0 or t1.f1<0)
+ WHERE (t1.f1>0 or t1.f1<0) AND alias2.f10
)
ORDER BY field1 ;
@@ -226,8 +226,8 @@ SELECT alias2.f2 AS field1
FROM t1 AS alias1 JOIN ( SELECT * FROM t2 ) AS alias2 ON alias2.f3 = alias1.f1
WHERE (
SELECT t2.f2
- FROM t2 JOIN t1 ON t1.f1
- WHERE t1.f1 AND alias2.f10
+ FROM t2 JOIN t1 ON (t1.f1>0 or t1.f1<0)
+ WHERE (t1.f1>0 or t1.f1<0) AND alias2.f10
)
ORDER BY field1 ;
diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result
index 798382de2b3..a75a2527758 100644
--- a/mysql-test/main/subselect_no_exists_to_in.result
+++ b/mysql-test/main/subselect_no_exists_to_in.result
@@ -10,7 +10,7 @@ set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=1;
SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
@@ -87,7 +87,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE(1))' at line 1
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -184,7 +184,8 @@ select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
a b
1 7
2 7
-(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3;
+(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1))
+union (select * from t4 order by a limit 2) order by a limit 3;
a b
1 7
2 7
@@ -1136,7 +1137,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN;
HANDLER t1 READ a=((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: HANDLER..READ does not support subqueries or stored functions
HANDLER t1 CLOSE;
drop table t1;
create table t1 (a int);
@@ -1445,7 +1446,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1455,7 +1456,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1465,8 +1466,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1634,7 +1635,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -3106,13 +3107,18 @@ create table t1(a int, primary key (a));
insert into t1 values (10);
create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b));
insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989');
+insert into t2(a, c, b) values (4,10,'360'), (5,10,'35998'), (6,10,'35999');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using where
+2 SUBQUERY t2 range b b 40 NULL 3 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
@@ -3124,7 +3130,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using index condition
+2 SUBQUERY t2 range b b 40 NULL 3 Using index condition
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
@@ -3711,7 +3717,7 @@ ORDER BY t1.t DESC LIMIT 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
1 PRIMARY t1 index NULL PRIMARY 13 NULL 11 Using where; Using index
-2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 5 Using where; Using index
+2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 6 Using where; Using index
SELECT * FROM t1,t2
WHERE t1.t = (SELECT t1.t FROM t1
WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
@@ -3730,11 +3736,14 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
i
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-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 'UNION (SELECT i FROM t1)))' at line 2
+i
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
-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 'union (select t12.i from t1 t12))
-from t1' at line 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
id select_type table type possible_keys key key_len ref rows Extra
@@ -4979,7 +4988,7 @@ UNIQUE KEY b (b,c),
KEY c (c),
KEY b_2 (b)
);
-INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1), (3,33,1), (4,34,2);
explain
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5189,11 +5198,11 @@ a 1
1 1
2 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
-ERROR 42000: Every derived table must have its own alias
+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 'ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
@@ -5292,13 +5301,16 @@ SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
a b
SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+1
+1
( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+1
+1
SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) )
+1
SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
1
@@ -5306,9 +5318,9 @@ SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
((SELECT 1 UNION SELECT 1 UNION SELECT 1))
1
SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: Every derived table must have its own alias
+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 '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ) a;
1
1
@@ -5316,21 +5328,29 @@ SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
1
1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
a
1
@@ -7022,8 +7042,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
@@ -7082,12 +7102,6 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
-SELECT
-(SELECT user FROM mysql.user
-WHERE h.host in (SELECT host FROM mysql.user)
-) AS sq
-FROM mysql.host h GROUP BY h.host;
-sq
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
@@ -7369,6 +7383,21 @@ a
1
drop table t1,t2,t3;
# End of 10.2 tests
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16861 Split Item::update_null_value() into a new virtual method in Type_handler
+#
+SELECT ROW(1,2) = EXISTS (SELECT 1);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+#
+# End of 10.4 tests
+#
set optimizer_switch=default;
select @@optimizer_switch like '%exists_to_in=off%';
@@optimizer_switch like '%exists_to_in=off%'
diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result
index 99da96db344..5101e9ee57d 100644
--- a/mysql-test/main/subselect_no_mat.result
+++ b/mysql-test/main/subselect_no_mat.result
@@ -13,7 +13,7 @@ set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
@@ -90,7 +90,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE(1))' at line 1
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -187,7 +187,8 @@ select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
a b
1 7
2 7
-(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3;
+(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1))
+union (select * from t4 order by a limit 2) order by a limit 3;
a b
1 7
2 7
@@ -351,7 +352,7 @@ patient_uq clinic_uq
explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index
-1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t6 ALL i1 NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where `test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`
@@ -1139,7 +1140,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN;
HANDLER t1 READ a=((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: HANDLER..READ does not support subqueries or stored functions
HANDLER t1 CLOSE;
drop table t1;
create table t1 (a int);
@@ -1448,7 +1449,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1458,7 +1459,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1468,8 +1469,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1637,7 +1638,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -3108,13 +3109,18 @@ create table t1(a int, primary key (a));
insert into t1 values (10);
create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b));
insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989');
+insert into t2(a, c, b) values (4,10,'360'), (5,10,'35998'), (6,10,'35999');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using where
+2 SUBQUERY t2 range b b 40 NULL 3 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
@@ -3126,7 +3132,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using index condition
+2 SUBQUERY t2 range b b 40 NULL 3 Using index condition
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
@@ -3711,7 +3717,7 @@ ORDER BY t1.t DESC LIMIT 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
1 PRIMARY t1 index NULL PRIMARY 13 NULL 11 Using where; Using index
-2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 5 Using where; Using index
+2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 6 Using where; Using index
SELECT * FROM t1,t2
WHERE t1.t = (SELECT t1.t FROM t1
WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
@@ -3730,11 +3736,14 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
i
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-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 'UNION (SELECT i FROM t1)))' at line 2
+i
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
-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 'union (select t12.i from t1 t12))
-from t1' at line 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
id select_type table type possible_keys key key_len ref rows Extra
@@ -4977,7 +4986,7 @@ UNIQUE KEY b (b,c),
KEY c (c),
KEY b_2 (b)
);
-INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1), (3,33,1), (4,34,2);
explain
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5187,11 +5196,11 @@ a 1
1 1
2 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
-ERROR 42000: Every derived table must have its own alias
+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 'ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
@@ -5290,13 +5299,16 @@ SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
a b
SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+1
+1
( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+1
+1
SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) )
+1
SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
1
@@ -5304,9 +5316,9 @@ SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
((SELECT 1 UNION SELECT 1 UNION SELECT 1))
1
SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: Every derived table must have its own alias
+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 '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ) a;
1
1
@@ -5314,21 +5326,29 @@ SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
1
1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
a
1
@@ -7075,12 +7095,6 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
-SELECT
-(SELECT user FROM mysql.user
-WHERE h.host in (SELECT host FROM mysql.user)
-) AS sq
-FROM mysql.host h GROUP BY h.host;
-sq
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
@@ -7362,6 +7376,21 @@ a
1
drop table t1,t2,t3;
# End of 10.2 tests
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16861 Split Item::update_null_value() into a new virtual method in Type_handler
+#
+SELECT ROW(1,2) = EXISTS (SELECT 1);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+#
+# End of 10.4 tests
+#
set optimizer_switch=default;
select @@optimizer_switch like '%materialization=on%';
@@optimizer_switch like '%materialization=on%'
diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result
index e59af172381..feef7dc9cdc 100644
--- a/mysql-test/main/subselect_no_opts.result
+++ b/mysql-test/main/subselect_no_opts.result
@@ -9,7 +9,7 @@ set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
@@ -86,7 +86,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE(1))' at line 1
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -183,7 +183,8 @@ select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
a b
1 7
2 7
-(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3;
+(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1))
+union (select * from t4 order by a limit 2) order by a limit 3;
a b
1 7
2 7
@@ -1135,7 +1136,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN;
HANDLER t1 READ a=((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: HANDLER..READ does not support subqueries or stored functions
HANDLER t1 CLOSE;
drop table t1;
create table t1 (a int);
@@ -1633,7 +1634,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -3104,13 +3105,18 @@ create table t1(a int, primary key (a));
insert into t1 values (10);
create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b));
insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989');
+insert into t2(a, c, b) values (4,10,'360'), (5,10,'35998'), (6,10,'35999');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using where
+2 SUBQUERY t2 range b b 40 NULL 3 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
@@ -3122,7 +3128,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using index condition
+2 SUBQUERY t2 range b b 40 NULL 3 Using index condition
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
@@ -3707,7 +3713,7 @@ ORDER BY t1.t DESC LIMIT 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
1 PRIMARY t1 index NULL PRIMARY 13 NULL 11 Using where; Using index
-2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 5 Using where; Using index
+2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 6 Using where; Using index
SELECT * FROM t1,t2
WHERE t1.t = (SELECT t1.t FROM t1
WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
@@ -3726,11 +3732,14 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
i
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-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 'UNION (SELECT i FROM t1)))' at line 2
+i
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
-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 'union (select t12.i from t1 t12))
-from t1' at line 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
id select_type table type possible_keys key key_len ref rows Extra
@@ -4973,7 +4982,7 @@ UNIQUE KEY b (b,c),
KEY c (c),
KEY b_2 (b)
);
-INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1), (3,33,1), (4,34,2);
explain
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5183,11 +5192,11 @@ a 1
1 1
2 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
-ERROR 42000: Every derived table must have its own alias
+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 'ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
@@ -5286,13 +5295,16 @@ SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
a b
SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+1
+1
( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+1
+1
SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) )
+1
SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
1
@@ -5300,9 +5312,9 @@ SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
((SELECT 1 UNION SELECT 1 UNION SELECT 1))
1
SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: Every derived table must have its own alias
+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 '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ) a;
1
1
@@ -5310,21 +5322,29 @@ SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
1
1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
a
1
@@ -7013,8 +7033,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
@@ -7073,12 +7093,6 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
-SELECT
-(SELECT user FROM mysql.user
-WHERE h.host in (SELECT host FROM mysql.user)
-) AS sq
-FROM mysql.host h GROUP BY h.host;
-sq
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
@@ -7360,4 +7374,19 @@ a
1
drop table t1,t2,t3;
# End of 10.2 tests
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16861 Split Item::update_null_value() into a new virtual method in Type_handler
+#
+SELECT ROW(1,2) = EXISTS (SELECT 1);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+#
+# End of 10.4 tests
+#
set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result
index 9f667f71520..7eb41b4a813 100644
--- a/mysql-test/main/subselect_no_scache.result
+++ b/mysql-test/main/subselect_no_scache.result
@@ -12,7 +12,7 @@ set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
@@ -89,7 +89,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE(1))' at line 1
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -186,7 +186,8 @@ select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
a b
1 7
2 7
-(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3;
+(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1))
+union (select * from t4 order by a limit 2) order by a limit 3;
a b
1 7
2 7
@@ -350,7 +351,7 @@ patient_uq clinic_uq
explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index
-1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t6 ALL i1 NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where `test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`
@@ -1138,7 +1139,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN;
HANDLER t1 READ a=((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: HANDLER..READ does not support subqueries or stored functions
HANDLER t1 CLOSE;
drop table t1;
create table t1 (a int);
@@ -1447,7 +1448,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1457,7 +1458,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1467,8 +1468,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1636,7 +1637,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -3109,13 +3110,18 @@ create table t1(a int, primary key (a));
insert into t1 values (10);
create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b));
insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989');
+insert into t2(a, c, b) values (4,10,'360'), (5,10,'35998'), (6,10,'35999');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using where
+2 SUBQUERY t2 range b b 40 NULL 3 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
@@ -3127,7 +3133,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using index condition
+2 SUBQUERY t2 range b b 40 NULL 3 Using index condition
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
@@ -3714,7 +3720,7 @@ ORDER BY t1.t DESC LIMIT 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
1 PRIMARY t1 index NULL PRIMARY 13 NULL 11 Using where; Using index
-2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 5 Using where; Using index
+2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 6 Using where; Using index
SELECT * FROM t1,t2
WHERE t1.t = (SELECT t1.t FROM t1
WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
@@ -3733,11 +3739,14 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
i
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-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 'UNION (SELECT i FROM t1)))' at line 2
+i
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
-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 'union (select t12.i from t1 t12))
-from t1' at line 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
id select_type table type possible_keys key key_len ref rows Extra
@@ -4983,7 +4992,7 @@ UNIQUE KEY b (b,c),
KEY c (c),
KEY b_2 (b)
);
-INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1), (3,33,1), (4,34,2);
explain
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5193,11 +5202,11 @@ a 1
1 1
2 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
-ERROR 42000: Every derived table must have its own alias
+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 'ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
@@ -5296,13 +5305,16 @@ SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
a b
SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+1
+1
( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+1
+1
SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) )
+1
SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
1
@@ -5310,9 +5322,9 @@ SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
((SELECT 1 UNION SELECT 1 UNION SELECT 1))
1
SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: Every derived table must have its own alias
+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 '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ) a;
1
1
@@ -5320,21 +5332,29 @@ SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
1
1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
a
1
@@ -7028,8 +7048,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
@@ -7088,12 +7108,6 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
-SELECT
-(SELECT user FROM mysql.user
-WHERE h.host in (SELECT host FROM mysql.user)
-) AS sq
-FROM mysql.host h GROUP BY h.host;
-sq
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
@@ -7375,6 +7389,21 @@ a
1
drop table t1,t2,t3;
# End of 10.2 tests
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16861 Split Item::update_null_value() into a new virtual method in Type_handler
+#
+SELECT ROW(1,2) = EXISTS (SELECT 1);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+#
+# End of 10.4 tests
+#
set optimizer_switch=default;
select @@optimizer_switch like '%subquery_cache=on%';
@@optimizer_switch like '%subquery_cache=on%'
diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result
index c904e29de36..3424a9749f4 100644
--- a/mysql-test/main/subselect_no_semijoin.result
+++ b/mysql-test/main/subselect_no_semijoin.result
@@ -9,7 +9,7 @@ set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test,
"semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off");
set join_cache_level=@join_cache_level_for_subselect_test;
SET optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
-SET optimizer_use_condition_selectivity=1;
+SET optimizer_use_condition_selectivity=4;
select (select 2);
(select 2)
2
@@ -86,7 +86,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE(1))' at line 1
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: PROCEDURE does not support subqueries or stored functions
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -183,7 +183,8 @@ select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
a b
1 7
2 7
-(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)) union (select * from t4 order by a limit 2) limit 3;
+(select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1))
+union (select * from t4 order by a limit 2) order by a limit 3;
a b
1 7
2 7
@@ -1135,7 +1136,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN;
HANDLER t1 READ a=((SELECT 1));
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1
+ERROR 42000: HANDLER..READ does not support subqueries or stored functions
HANDLER t1 CLOSE;
drop table t1;
create table t1 (a int);
@@ -3104,13 +3105,18 @@ create table t1(a int, primary key (a));
insert into t1 values (10);
create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b));
insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989');
+insert into t2(a, c, b) values (4,10,'360'), (5,10,'35998'), (6,10,'35999');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using where
+2 SUBQUERY t2 range b b 40 NULL 3 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
@@ -3122,7 +3128,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
-2 SUBQUERY t2 range b b 40 NULL 2 Using index condition
+2 SUBQUERY t2 range b b 40 NULL 3 Using index condition
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
@@ -3707,7 +3713,7 @@ ORDER BY t1.t DESC LIMIT 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
1 PRIMARY t1 index NULL PRIMARY 13 NULL 11 Using where; Using index
-2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 5 Using where; Using index
+2 SUBQUERY t1 range PRIMARY PRIMARY 13 NULL 6 Using where; Using index
SELECT * FROM t1,t2
WHERE t1.t = (SELECT t1.t FROM t1
WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
@@ -3726,11 +3732,14 @@ SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS
i
SELECT * FROM t1
WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1)));
-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 'UNION (SELECT i FROM t1)))' at line 2
+i
explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12))
from t1;
-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 'union (select t12.i from t1 t12))
-from t1' at line 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
explain select * from t1 where not exists
((select t11.i from t1 t11) union (select t12.i from t1 t12));
id select_type table type possible_keys key key_len ref rows Extra
@@ -4973,7 +4982,7 @@ UNIQUE KEY b (b,c),
KEY c (c),
KEY b_2 (b)
);
-INSERT INTO t3 VALUES (1,1,1), (2,32,1);
+INSERT INTO t3 VALUES (1,1,1), (2,32,1), (3,33,1), (4,34,2);
explain
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -5183,11 +5192,11 @@ a 1
1 1
2 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
-ERROR 42000: Every derived table must have its own alias
+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 'ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
@@ -5286,13 +5295,16 @@ SELECT ( SELECT a FROM t1 WHERE a = 1 UNION SELECT 1 ), a FROM t1;
SELECT * FROM t2 WHERE (a, b) IN (SELECT a, b FROM t2);
a b
SELECT 1 UNION ( SELECT 1 UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+1
+1
( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1' at line 1
+1
+1
SELECT ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) )
+1
SELECT ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
( SELECT 1 UNION SELECT 1 UNION SELECT 1 )
1
@@ -5300,9 +5312,9 @@ SELECT ((SELECT 1 UNION SELECT 1 UNION SELECT 1));
((SELECT 1 UNION SELECT 1 UNION SELECT 1))
1
SELECT * FROM ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: Every derived table must have its own alias
+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 '' at line 1
SELECT * FROM ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 ) a;
1
1
@@ -5310,21 +5322,29 @@ SELECT * FROM ( SELECT 1 UNION SELECT 1 UNION SELECT 1 ) a;
1
1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( SELECT 1 UNION ( SELECT 1 UNION SELECT 1 ) );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ALL ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ANY ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 ) UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a IN ( ( SELECT 1 UNION SELECT 1 ) UNION SELECT 1 );
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 )' at line 1
+a
+1
SELECT * FROM t1 WHERE a = ( SELECT 1 UNION SELECT 1 UNION SELECT 1 );
a
1
@@ -7013,8 +7033,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
@@ -7073,12 +7093,6 @@ call procedure2();
ControlRev
NULL
drop procedure procedure2;
-SELECT
-(SELECT user FROM mysql.user
-WHERE h.host in (SELECT host FROM mysql.user)
-) AS sq
-FROM mysql.host h GROUP BY h.host;
-sq
#
# MDEV-7846:Server crashes in Item_subselect::fix
#_fields or fails with Thread stack overrun
@@ -7361,6 +7375,21 @@ a
drop table t1,t2,t3;
# End of 10.2 tests
#
+# Start of 10.4 tests
+#
+#
+# MDEV-16861 Split Item::update_null_value() into a new virtual method in Type_handler
+#
+SELECT ROW(1,2) = EXISTS (SELECT 1);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
+ERROR HY000: Illegal parameter data types row and boolean for operation '='
+#
+# End of 10.4 tests
+#
+#
# MDEV-19714: JOIN::pseudo_bits_cond is not visible in EXPLAIN FORMAT=JSON
#
CREATE TABLE t1 ( a INT );
diff --git a/mysql-test/main/subselect_notembedded.result b/mysql-test/main/subselect_notembedded.result
index 9153706fc27..23a35a28bf4 100644
--- a/mysql-test/main/subselect_notembedded.result
+++ b/mysql-test/main/subselect_notembedded.result
@@ -1,5 +1,5 @@
purge master logs before (select adddate(current_timestamp(), interval -4 day));
-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 'select adddate(current_timestamp(), interval -4 day))' at line 1
+ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
purge master logs before adddate(current_timestamp(), interval -4 day);
drop table if exists t1;
create table t1(a int,b int,key(a),key(b));
diff --git a/mysql-test/main/subselect_notembedded.test b/mysql-test/main/subselect_notembedded.test
index dcda71c767f..f6e383592bc 100644
--- a/mysql-test/main/subselect_notembedded.test
+++ b/mysql-test/main/subselect_notembedded.test
@@ -4,7 +4,7 @@
# BUG#10308: purge log with subselect
# Bug#28553: mysqld crash in "purge master log before(select time from information_schema)"
#
---error 1064
+--error ER_SUBQUERIES_NOT_SUPPORTED
purge master logs before (select adddate(current_timestamp(), interval -4 day));
purge master logs before adddate(current_timestamp(), interval -4 day);
diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result
index 43b4528a864..a3eefb8c354 100644
--- a/mysql-test/main/subselect_sj.result
+++ b/mysql-test/main/subselect_sj.result
@@ -205,7 +205,7 @@ a b a b
insert into t1 select (A.a + 10 * B.a),1 from t0 A, t0 B;
explain extended select * from t1 where a in (select pk from t10 where pk<3);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t10 range PRIMARY PRIMARY 4 NULL 4 100.00 Using where; Using index
+1 PRIMARY t10 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index
1 PRIMARY t1 ALL NULL NULL NULL NULL 103 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t10` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t10`.`pk` and `test`.`t10`.`pk` < 3
@@ -1241,7 +1241,7 @@ set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on,materialization=off';
set optimizer_switch='firstmatch=off,loosescan=on';
set @tmp_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
-set optimizer_use_condition_selectivity=1;
+set optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (i INTEGER);
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
CREATE TABLE t2 (i INTEGER, j INTEGER, KEY k(i, j));
@@ -1249,8 +1249,8 @@ INSERT INTO t2 VALUES (1, 0), (1, 1), (2, 0), (2, 1);
EXPLAIN
SELECT * FROM t1 WHERE (i) IN (SELECT i FROM t2 where j > 0);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5
-1 PRIMARY t2 index k k 10 NULL 4 Using where; Using index; Start temporary; End temporary
+1 PRIMARY t2 index k k 10 NULL 4 Using where; Using index; Start temporary
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; End temporary; Using join buffer (flat, BNL join)
SELECT * FROM t1 WHERE (i) IN (SELECT i FROM t2 where j > 0);
i
1
@@ -2565,7 +2565,9 @@ INSERT INTO t2 VALUES
(1,2),(2,1),(3,3),(4,2),(5,5),(6,3),(7,1);
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
SELECT a, b, d FROM t1, t2
@@ -2623,8 +2625,11 @@ insert into t2
select (A.a+1000*B.a)/20, 'filler_data' from t10 A, t0 B;
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
delete from t1 where kp2 in (1,3);
# Ref + LooseScan on t1:
@@ -2635,7 +2640,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 const PRIMARY PRIMARY 4 const 1 Using index
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where
1 PRIMARY t1 ref kp1 kp1 5 test.t3.a 10 Using where; Using index; LooseScan
-1 PRIMARY t2 ref a a 5 test.t1.kp2 20 Using index
+1 PRIMARY t2 ref a a 5 test.t1.kp2 19 Using index
select sum(t2.a)
from t2,t3
where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2);
@@ -3140,9 +3145,11 @@ set optimizer_switch= @tmp_mdev6859;
set @tmp_mdev12675=@@optimizer_switch;
set optimizer_switch=default;
create table t1 (a int) engine=myisam;
-insert into t1 values (5),(3),(2),(7),(2),(5),(1);
+insert into t1 values (3),(2),(7),(2),(1);
create table t2 (b int, index idx(b)) engine=myisam;
-insert into t2 values (2),(3),(2),(1),(3),(4);
+insert into t2 values (2),(3),(2),(1),(3),(4),(1),(2),(1),(2);
+insert into t2 select b+10 from t2;
+insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
@@ -3156,20 +3163,22 @@ insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
select a from t1, t2 where b between 1 and 2 and a in (select b from t2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 256 Using index; FirstMatch(t1)
-1 PRIMARY t2 range idx idx 5 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t2 ref idx idx 5 test.t1.a 1462 Using index; FirstMatch(t1)
+1 PRIMARY t2 range idx idx 5 NULL 5 Using where; Using index; Using join buffer (flat, BNL join)
explain
select a from t1 join t2 on b between 1 and 2 and a in (select b from t2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 256 Using index; FirstMatch(t1)
-1 PRIMARY t2 range idx idx 5 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t2 ref idx idx 5 test.t1.a 1462 Using index; FirstMatch(t1)
+1 PRIMARY t2 range idx idx 5 NULL 5 Using where; Using index; Using join buffer (flat, BNL join)
drop table t1,t2;
set optimizer_switch= @tmp_mdev12675;
#
@@ -3281,7 +3290,7 @@ SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
-2 MATERIALIZED t2 ref col1 col1 5 const 1 100.00 Using index condition; Using where
+2 MATERIALIZED t2 ref col1 col1 5 const 2 100.00 Using index condition; Using where
Warnings:
Note 1003 select 1 AS `Id` from (`test`.`t2`) where `test`.`t2`.`t1_Id` = 1 and `test`.`t2`.`col1` is null
DROP TABLE t1, t2;
diff --git a/mysql-test/main/subselect_sj.test b/mysql-test/main/subselect_sj.test
index f9c087e87f0..c869f56c837 100644
--- a/mysql-test/main/subselect_sj.test
+++ b/mysql-test/main/subselect_sj.test
@@ -1149,7 +1149,7 @@ set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on,materialization=off';
set optimizer_switch='firstmatch=off,loosescan=on';
set @tmp_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
-set optimizer_use_condition_selectivity=1;
+set optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (i INTEGER);
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
@@ -2836,9 +2836,11 @@ set optimizer_switch= @tmp_mdev6859;
set @tmp_mdev12675=@@optimizer_switch;
set optimizer_switch=default;
create table t1 (a int) engine=myisam;
-insert into t1 values (5),(3),(2),(7),(2),(5),(1);
+insert into t1 values (3),(2),(7),(2),(1);
create table t2 (b int, index idx(b)) engine=myisam;
-insert into t2 values (2),(3),(2),(1),(3),(4);
+insert into t2 values (2),(3),(2),(1),(3),(4),(1),(2),(1),(2);
+insert into t2 select b+10 from t2;
+insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
diff --git a/mysql-test/main/subselect_sj2.result b/mysql-test/main/subselect_sj2.result
index ea74a8c0b8d..8045a810e3f 100644
--- a/mysql-test/main/subselect_sj2.result
+++ b/mysql-test/main/subselect_sj2.result
@@ -1,3 +1,8 @@
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
set @subselect_sj2_tmp= @@optimizer_switch;
set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
@@ -67,6 +72,14 @@ primary key(pk1, pk2, pk3)
) engine=innodb;
insert into t3 select a,a, a,a,a from t0;
insert into t3 select a,a, a+100,a+100,a+100 from t0;
+analyze table t1,t2,t3;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
explain select * from t3 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL 20
@@ -800,15 +813,23 @@ CREATE TABLE t2 (f14 int(11) NOT NULL, f12 varchar(1) NOT NULL, KEY (f12,f14)) E
INSERT INTO t2 VALUES (6,'y');
CREATE TABLE t3 (f12 varchar(1) NOT NULL) ENGINE=InnoDB;
INSERT INTO t3 VALUES ('r'),('s'),('t'),('v'),('w'),('x'),('y');
+analyze table t1,t2,t3 persistent for all;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
# The following must use LooseScan but not join buffering
explain
SELECT * FROM t3
WHERE f12 IN (SELECT alias2.f12 FROM t1 AS alias1, t2 AS alias2, t1 WHERE alias1.f13 = 24);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias1 const PRIMARY PRIMARY 4 const 1 Using index
-1 PRIMARY alias2 index f12 f12 7 NULL 1 Using index; LooseScan
-1 PRIMARY t1 index NULL PRIMARY 4 NULL 2 Using index; FirstMatch(alias2)
-1 PRIMARY t3 ALL NULL NULL NULL NULL 7 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY alias1 const PRIMARY PRIMARY 4 const # Using index
+1 PRIMARY alias2 index f12 f12 7 NULL # Using index; LooseScan
+1 PRIMARY t1 index NULL PRIMARY 4 NULL # Using index; FirstMatch(alias2)
+1 PRIMARY t3 ALL NULL NULL NULL NULL # Using where; Using join buffer (flat, BNL join)
SELECT * FROM t3
WHERE f12 IN (SELECT alias2.f12 FROM t1 AS alias1, t2 AS alias2, t1 WHERE alias1.f13 = 24);
f12
@@ -924,6 +945,12 @@ INSERT INTO t2 VALUES
(6,'u',6),(7,'m',7),(8,'k',8),(9,'o',9),(10,'w',1),
(11,'m',2),(12,'q',3),(13,'m',4),(14,'d',5),
(15,'g',6),(16,'x',7),(17,'f',8);
+analyze table t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
explain
SELECT * FROM t1 WHERE b IN (
SELECT d FROM t2, t1
@@ -955,6 +982,10 @@ INSERT INTO t1 VALUES
('y','y'),('t','t'),('d','d'),('s','s'),('r','r'),
('m','m'),('b','b'),('x','x'),('g','g'),('p','p'),
('q','q'),('w','w'),('d','d'),('e','e');
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
# This query returned 6 rows instead of 19
SELECT * FROM v1
@@ -988,6 +1019,10 @@ y y
CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(1) NOT NULL, KEY(a)) ENGINE=InnoDB;
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t2 SELECT * FROM t1;
+ANALYZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT * FROM t2
WHERE (a, a) IN (SELECT alias2.b, alias2.a FROM t1 AS alias1, t1 AS alias2
@@ -1075,6 +1110,14 @@ INSERT INTO t2 VALUES
(9,'d','d'),(10,'s','s'),(11,'r','r'),(12,'m','m'),
(13,'b','b'),(14,'x','x'),(15,'g','g'),(16,'p','p'),
(17,'q','q'),(18,'w','w'),(19,'d','d');
+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
+analyze table t2 persistent for all;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
@@ -1083,11 +1126,11 @@ WHERE alias5.b = alias4.b
AND ( alias5.b >= alias3.b OR alias5.c != alias3.c )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL 19 Using where
-1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d 1 Using index
-1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b 1 Using where; FirstMatch(alias3)
-1 PRIMARY alias2 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
-1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
+1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
+1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
+1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
+1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
+1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
@@ -1104,11 +1147,11 @@ WHERE alias5.b = alias4.b
AND ( alias5.b >= alias3.b OR alias3.c != alias5.c )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL 19 Using where
-1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d 1 Using index
-1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b 1 Using where; FirstMatch(alias3)
-1 PRIMARY alias2 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
-1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
+1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
+1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
+1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
+1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
+1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
@@ -1234,6 +1277,14 @@ INSERT IGNORE INTO t2 (t2id, t1idref) SELECT t1id, t1id FROM t1;
INSERT IGNORE INTO t1 VALUES (200001, 'a');
INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+ANALYZE TABLE t1,t2,t3;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
set @tmp7474= @@optimizer_search_depth;
SET SESSION optimizer_search_depth = 1;
SELECT SQL_NO_CACHE
@@ -1334,4 +1385,7 @@ a pk b
DROP TABLE t1,t2,t3;
DROP VIEW v3;
# This must be the last in the file:
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
set optimizer_switch=@subselect_sj2_tmp;
diff --git a/mysql-test/main/subselect_sj2.test b/mysql-test/main/subselect_sj2.test
index f63de3cd35a..be2d91571e7 100644
--- a/mysql-test/main/subselect_sj2.test
+++ b/mysql-test/main/subselect_sj2.test
@@ -1,6 +1,13 @@
#
# DuplicateElimination strategy test
#
+
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
--source include/have_innodb.inc
set @subselect_sj2_tmp= @@optimizer_switch;
@@ -57,6 +64,8 @@ create table t3 (
insert into t3 select a,a, a,a,a from t0;
insert into t3 select a,a, a+100,a+100,a+100 from t0;
+analyze table t1,t2,t3;
+
explain select * from t3 where b in (select a from t1);
select * from t3 where b in (select a from t1);
@@ -985,7 +994,10 @@ INSERT INTO t2 VALUES (6,'y');
CREATE TABLE t3 (f12 varchar(1) NOT NULL) ENGINE=InnoDB;
INSERT INTO t3 VALUES ('r'),('s'),('t'),('v'),('w'),('x'),('y');
+analyze table t1,t2,t3 persistent for all;
--echo # The following must use LooseScan but not join buffering
+
+--replace_column 9 #
explain
SELECT * FROM t3
WHERE f12 IN (SELECT alias2.f12 FROM t1 AS alias1, t2 AS alias2, t1 WHERE alias1.f13 = 24);
@@ -1113,6 +1125,8 @@ INSERT INTO t2 VALUES
(11,'m',2),(12,'q',3),(13,'m',4),(14,'d',5),
(15,'g',6),(16,'x',7),(17,'f',8);
+analyze table t1,t2;
+
explain
SELECT * FROM t1 WHERE b IN (
SELECT d FROM t2, t1
@@ -1139,6 +1153,8 @@ INSERT INTO t1 VALUES
('m','m'),('b','b'),('x','x'),('g','g'),('p','p'),
('q','q'),('w','w'),('d','d'),('e','e');
+ANALYZE TABLE t1;
+
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
--echo # This query returned 6 rows instead of 19
@@ -1155,6 +1171,9 @@ WHERE ( a, a ) IN (
CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(1) NOT NULL, KEY(a)) ENGINE=InnoDB;
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t2 SELECT * FROM t1;
+
+ANALYZE TABLE t2;
+
EXPLAIN
SELECT * FROM t2
WHERE (a, a) IN (SELECT alias2.b, alias2.a FROM t1 AS alias1, t1 AS alias2
@@ -1207,6 +1226,9 @@ INSERT INTO t2 VALUES
(13,'b','b'),(14,'x','x'),(15,'g','g'),(16,'p','p'),
(17,'q','q'),(18,'w','w'),(19,'d','d');
+analyze table t1 persistent for all;
+analyze table t2 persistent for all;
+--replace_column 9 #
EXPLAIN
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
@@ -1226,6 +1248,7 @@ WHERE alias3.d IN (
# Do the same EXPLAIN SELECT and SELECT
# with "alias3.c != alias5.c" instead of "alias5.c != alias3.c"
+--replace_column 9 #
EXPLAIN
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
@@ -1379,6 +1402,8 @@ INSERT IGNORE INTO t1 VALUES (200001, 'a');
INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+ANALYZE TABLE t1,t2,t3;
+
set @tmp7474= @@optimizer_search_depth;
SET SESSION optimizer_search_depth = 1;
@@ -1465,4 +1490,7 @@ DROP TABLE t1,t2,t3;
DROP VIEW v3;
--echo # This must be the last in the file:
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
set optimizer_switch=@subselect_sj2_tmp;
diff --git a/mysql-test/main/subselect_sj2_jcl6.result b/mysql-test/main/subselect_sj2_jcl6.result
index 5974553210c..22310ab5361 100644
--- a/mysql-test/main/subselect_sj2_jcl6.result
+++ b/mysql-test/main/subselect_sj2_jcl6.result
@@ -9,6 +9,11 @@ Variable_name Value
join_cache_level 6
set @optimizer_switch_for_subselect_sj2_test=@@optimizer_switch;
set @join_cache_level_for_subselect_sj2_test=@@join_cache_level;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
set @subselect_sj2_tmp= @@optimizer_switch;
set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
@@ -78,6 +83,14 @@ primary key(pk1, pk2, pk3)
) engine=innodb;
insert into t3 select a,a, a,a,a from t0;
insert into t3 select a,a, a+100,a+100,a+100 from t0;
+analyze table t1,t2,t3;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
explain select * from t3 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL 20
@@ -813,15 +826,23 @@ CREATE TABLE t2 (f14 int(11) NOT NULL, f12 varchar(1) NOT NULL, KEY (f12,f14)) E
INSERT INTO t2 VALUES (6,'y');
CREATE TABLE t3 (f12 varchar(1) NOT NULL) ENGINE=InnoDB;
INSERT INTO t3 VALUES ('r'),('s'),('t'),('v'),('w'),('x'),('y');
+analyze table t1,t2,t3 persistent for all;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
# The following must use LooseScan but not join buffering
explain
SELECT * FROM t3
WHERE f12 IN (SELECT alias2.f12 FROM t1 AS alias1, t2 AS alias2, t1 WHERE alias1.f13 = 24);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias1 const PRIMARY PRIMARY 4 const 1 Using index
-1 PRIMARY alias2 index f12 f12 7 NULL 1 Using index; LooseScan
-1 PRIMARY t1 index NULL PRIMARY 4 NULL 2 Using index; FirstMatch(alias2)
-1 PRIMARY t3 ALL NULL NULL NULL NULL 7 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY alias1 const PRIMARY PRIMARY 4 const # Using index
+1 PRIMARY alias2 index f12 f12 7 NULL # Using index; LooseScan
+1 PRIMARY t1 index NULL PRIMARY 4 NULL # Using index; FirstMatch(alias2)
+1 PRIMARY t3 ALL NULL NULL NULL NULL # Using where; Using join buffer (flat, BNL join)
SELECT * FROM t3
WHERE f12 IN (SELECT alias2.f12 FROM t1 AS alias1, t2 AS alias2, t1 WHERE alias1.f13 = 24);
f12
@@ -937,6 +958,12 @@ INSERT INTO t2 VALUES
(6,'u',6),(7,'m',7),(8,'k',8),(9,'o',9),(10,'w',1),
(11,'m',2),(12,'q',3),(13,'m',4),(14,'d',5),
(15,'g',6),(16,'x',7),(17,'f',8);
+analyze table t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
explain
SELECT * FROM t1 WHERE b IN (
SELECT d FROM t2, t1
@@ -968,6 +995,10 @@ INSERT INTO t1 VALUES
('y','y'),('t','t'),('d','d'),('s','s'),('r','r'),
('m','m'),('b','b'),('x','x'),('g','g'),('p','p'),
('q','q'),('w','w'),('d','d'),('e','e');
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
# This query returned 6 rows instead of 19
SELECT * FROM v1
@@ -1001,6 +1032,10 @@ y y
CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(1) NOT NULL, KEY(a)) ENGINE=InnoDB;
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t2 SELECT * FROM t1;
+ANALYZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT * FROM t2
WHERE (a, a) IN (SELECT alias2.b, alias2.a FROM t1 AS alias1, t1 AS alias2
@@ -1088,6 +1123,14 @@ INSERT INTO t2 VALUES
(9,'d','d'),(10,'s','s'),(11,'r','r'),(12,'m','m'),
(13,'b','b'),(14,'x','x'),(15,'g','g'),(16,'p','p'),
(17,'q','q'),(18,'w','w'),(19,'d','d');
+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
+analyze table t2 persistent for all;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
@@ -1096,11 +1139,11 @@ WHERE alias5.b = alias4.b
AND ( alias5.b >= alias3.b OR alias5.c != alias3.c )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL 19 Using where
-1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d 1 Using index
-1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b 1 Using where; FirstMatch(alias3)
-1 PRIMARY alias2 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
-1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 Using join buffer (incremental, BNL join)
+1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
+1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
+1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
+1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
+1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (incremental, BNL join)
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
@@ -1117,11 +1160,11 @@ WHERE alias5.b = alias4.b
AND ( alias5.b >= alias3.b OR alias3.c != alias5.c )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL 19 Using where
-1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d 1 Using index
-1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b 1 Using where; FirstMatch(alias3)
-1 PRIMARY alias2 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
-1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 Using join buffer (incremental, BNL join)
+1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
+1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
+1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
+1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
+1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (incremental, BNL join)
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
@@ -1247,6 +1290,14 @@ INSERT IGNORE INTO t2 (t2id, t1idref) SELECT t1id, t1id FROM t1;
INSERT IGNORE INTO t1 VALUES (200001, 'a');
INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+ANALYZE TABLE t1,t2,t3;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
set @tmp7474= @@optimizer_search_depth;
SET SESSION optimizer_search_depth = 1;
SELECT SQL_NO_CACHE
@@ -1347,7 +1398,15 @@ a pk b
DROP TABLE t1,t2,t3;
DROP VIEW v3;
# This must be the last in the file:
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
set optimizer_switch=@subselect_sj2_tmp;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
#
# Bug #898073: potential incremental join cache for semijoin
#
@@ -1438,6 +1497,9 @@ v v
set optimizer_switch=@tmp_optimizer_switch;
set join_cache_level=default;
DROP TABLE t1,t2;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_subselect_sj2_test=NULL;
set @join_cache_level_subselect_sj2_test=NULL;
diff --git a/mysql-test/main/subselect_sj2_jcl6.test b/mysql-test/main/subselect_sj2_jcl6.test
index 49994988ea2..a0c8a6c0f04 100644
--- a/mysql-test/main/subselect_sj2_jcl6.test
+++ b/mysql-test/main/subselect_sj2_jcl6.test
@@ -16,6 +16,13 @@ set @join_cache_level_for_subselect_sj2_test=@@join_cache_level;
--source subselect_sj2.test
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
+
--echo #
--echo # Bug #898073: potential incremental join cache for semijoin
--echo #
@@ -103,6 +110,10 @@ set join_cache_level=default;
DROP TABLE t1,t2;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
+
set @@optimizer_switch=@save_optimizer_switch_jcl6;
set @optimizer_switch_for_subselect_sj2_test=NULL;
set @join_cache_level_subselect_sj2_test=NULL;
diff --git a/mysql-test/main/subselect_sj2_mat.result b/mysql-test/main/subselect_sj2_mat.result
index ab3e4652deb..e2c9adbfc37 100644
--- a/mysql-test/main/subselect_sj2_mat.result
+++ b/mysql-test/main/subselect_sj2_mat.result
@@ -1,5 +1,10 @@
set optimizer_switch='materialization=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
set @subselect_sj2_tmp= @@optimizer_switch;
set optimizer_switch='semijoin=on,firstmatch=on,loosescan=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
@@ -69,6 +74,14 @@ primary key(pk1, pk2, pk3)
) engine=innodb;
insert into t3 select a,a, a,a,a from t0;
insert into t3 select a,a, a+100,a+100,a+100 from t0;
+analyze table t1,t2,t3;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
explain select * from t3 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL 20
@@ -802,15 +815,23 @@ CREATE TABLE t2 (f14 int(11) NOT NULL, f12 varchar(1) NOT NULL, KEY (f12,f14)) E
INSERT INTO t2 VALUES (6,'y');
CREATE TABLE t3 (f12 varchar(1) NOT NULL) ENGINE=InnoDB;
INSERT INTO t3 VALUES ('r'),('s'),('t'),('v'),('w'),('x'),('y');
+analyze table t1,t2,t3 persistent for all;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
# The following must use LooseScan but not join buffering
explain
SELECT * FROM t3
WHERE f12 IN (SELECT alias2.f12 FROM t1 AS alias1, t2 AS alias2, t1 WHERE alias1.f13 = 24);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias1 const PRIMARY PRIMARY 4 const 1 Using index
-1 PRIMARY alias2 index f12 f12 7 NULL 1 Using index; LooseScan
-1 PRIMARY t1 index NULL PRIMARY 4 NULL 2 Using index; FirstMatch(alias2)
-1 PRIMARY t3 ALL NULL NULL NULL NULL 7 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY alias1 const PRIMARY PRIMARY 4 const # Using index
+1 PRIMARY alias2 index f12 f12 7 NULL # Using index; LooseScan
+1 PRIMARY t1 index NULL PRIMARY 4 NULL # Using index; FirstMatch(alias2)
+1 PRIMARY t3 ALL NULL NULL NULL NULL # Using where; Using join buffer (flat, BNL join)
SELECT * FROM t3
WHERE f12 IN (SELECT alias2.f12 FROM t1 AS alias1, t2 AS alias2, t1 WHERE alias1.f13 = 24);
f12
@@ -926,6 +947,12 @@ INSERT INTO t2 VALUES
(6,'u',6),(7,'m',7),(8,'k',8),(9,'o',9),(10,'w',1),
(11,'m',2),(12,'q',3),(13,'m',4),(14,'d',5),
(15,'g',6),(16,'x',7),(17,'f',8);
+analyze table t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
explain
SELECT * FROM t1 WHERE b IN (
SELECT d FROM t2, t1
@@ -957,6 +984,10 @@ INSERT INTO t1 VALUES
('y','y'),('t','t'),('d','d'),('s','s'),('r','r'),
('m','m'),('b','b'),('x','x'),('g','g'),('p','p'),
('q','q'),('w','w'),('d','d'),('e','e');
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
# This query returned 6 rows instead of 19
SELECT * FROM v1
@@ -990,6 +1021,10 @@ y y
CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(1) NOT NULL, KEY(a)) ENGINE=InnoDB;
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t2 SELECT * FROM t1;
+ANALYZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT * FROM t2
WHERE (a, a) IN (SELECT alias2.b, alias2.a FROM t1 AS alias1, t1 AS alias2
@@ -1077,6 +1112,14 @@ INSERT INTO t2 VALUES
(9,'d','d'),(10,'s','s'),(11,'r','r'),(12,'m','m'),
(13,'b','b'),(14,'x','x'),(15,'g','g'),(16,'p','p'),
(17,'q','q'),(18,'w','w'),(19,'d','d');
+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
+analyze table t2 persistent for all;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
@@ -1085,11 +1128,11 @@ WHERE alias5.b = alias4.b
AND ( alias5.b >= alias3.b OR alias5.c != alias3.c )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL 19 Using where
-1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d 1 Using index
-1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b 1 Using where; FirstMatch(alias3)
-1 PRIMARY alias2 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
-1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
+1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
+1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
+1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
+1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
+1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
@@ -1106,11 +1149,11 @@ WHERE alias5.b = alias4.b
AND ( alias5.b >= alias3.b OR alias3.c != alias5.c )
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL 19 Using where
-1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d 1 Using index
-1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b 1 Using where; FirstMatch(alias3)
-1 PRIMARY alias2 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
-1 PRIMARY alias1 ALL NULL NULL NULL NULL 14 Using join buffer (flat, BNL join)
+1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
+1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
+1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
+1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
+1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
WHERE alias3.d IN (
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
@@ -1236,6 +1279,14 @@ INSERT IGNORE INTO t2 (t2id, t1idref) SELECT t1id, t1id FROM t1;
INSERT IGNORE INTO t1 VALUES (200001, 'a');
INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(200013, 200001);
INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
+ANALYZE TABLE t1,t2,t3;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
set @tmp7474= @@optimizer_search_depth;
SET SESSION optimizer_search_depth = 1;
SELECT SQL_NO_CACHE
@@ -1336,7 +1387,15 @@ a pk b
DROP TABLE t1,t2,t3;
DROP VIEW v3;
# This must be the last in the file:
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
set optimizer_switch=@subselect_sj2_tmp;
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+@@innodb_stats_persistent_sample_pages;
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
set optimizer_switch=default;
select @@optimizer_switch like '%materialization=on%';
@@optimizer_switch like '%materialization=on%'
@@ -1421,7 +1480,7 @@ WHERE t1.cat_id = t3.cat_id AND
t3.cat_id IN (SELECT cat_id FROM t2) AND
t3.sack_id = 33479 AND t3.kit_id = 6;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 ref PRIMARY PRIMARY 5 const,const 4 Using index
+1 PRIMARY t3 ref PRIMARY PRIMARY 5 const,const 5 Using index
1 PRIMARY t2 ref cat_id cat_id 4 test.t3.cat_id 2 Using where; Using index; FirstMatch(t3)
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.cat_id 1 Using where; Using index
SELECT count(*) FROM t1, t3
@@ -1437,7 +1496,7 @@ WHERE t1.cat_id = t3.cat_id AND
t3.cat_id IN (SELECT cat_id FROM t4) AND
t3.sack_id = 33479 AND t3.kit_id = 6;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 ref PRIMARY PRIMARY 5 const,const 4 Using index
+1 PRIMARY t3 ref PRIMARY PRIMARY 5 const,const 5 Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t3.cat_id 1 Using index
2 MATERIALIZED t4 index cat_id cat_id 4 NULL 19 Using index
@@ -1453,7 +1512,7 @@ WHERE t1.cat_id = t3.cat_id AND
t3.cat_id IN (SELECT cat_id FROM t2) AND
t3.sack_id = 33479 AND t3.kit_id = 6;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 ref PRIMARY PRIMARY 5 const,const 4 Using index
+1 PRIMARY t3 ref PRIMARY PRIMARY 5 const,const 5 Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t3.cat_id 1 Using index
2 MATERIALIZED t2 index cat_id cat_id 4 NULL 19 Using index
@@ -1694,6 +1753,11 @@ insert into t1(`id`,`local_name`) values
(11,'Rollover - Internet Payday'),
(12,'AL Monthly Installment'),
(13,'AL Semi-Monthly Installment');
+insert into t1 select seq,"ignore" from seq_1000_to_1100;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
explain
SELECT SQL_NO_CACHE t.id
FROM t1 t
@@ -1703,10 +1767,10 @@ OR
(t.id IN (0,4,12,13,1,10,3,11))
);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t index PRIMARY PRIMARY 4 NULL 13 Using where; Using index
-2 MATERIALIZED A ALL PRIMARY NULL NULL NULL 13
+1 PRIMARY t index PRIMARY PRIMARY 4 NULL 114 Using where; Using index
+2 MATERIALIZED A ALL PRIMARY NULL NULL NULL 114
2 MATERIALIZED <subquery3> eq_ref distinct_key distinct_key 67 func 1
-3 MATERIALIZED B ALL PRIMARY NULL NULL NULL 13 Using where
+3 MATERIALIZED B range PRIMARY PRIMARY 4 NULL 8 Using where
SELECT SQL_NO_CACHE t.id
FROM t1 t
WHERE (
@@ -1843,6 +1907,19 @@ CREATE TABLE t5 (id_product int) ENGINE=MyISAM;
INSERT INTO `t5` VALUES
(652),(668),(669),(670),(671),(673),(674),(675),(676),
(677),(679),(680),(681),(682),(683),(684),(685),(686);
+ANALYZE TABLE t1,t2,t3,t,t5;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
+test.t analyze Error Table 'test.t' doesn't exist
+test.t analyze status Operation failed
+test.t5 analyze status Engine-independent statistics collected
+test.t5 analyze status OK
+set optimizer_switch='rowid_filter=off';
explain
SELECT * FROM t3
JOIN t4 ON (t4.id_product = t3.id_product AND t4.id_shop = 1)
@@ -1855,18 +1932,22 @@ AND t3.id_product IN (SELECT id_product FROM t2 t2_3 WHERE t2_3.id_t2 = 18 OR t2
AND t3.id_product IN (SELECT id_product FROM t2 t2_4 WHERE t2_4.id_t2 = 34 OR t2_4.id_t2 = 23)
AND t3.id_product IN (SELECT id_product FROM t2 t2_5 WHERE t2_5.id_t2 = 29 OR t2_5.id_t2 = 28 OR t2_5.id_t2 = 26);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL PRIMARY 8 NULL 73 Using index
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.id_product 1 Using index
+1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 12
+1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t2_2.id_product 1 Using where; Using index
1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t1.id_product,const 1 Using where; Using index
-1 PRIMARY <subquery6> eq_ref distinct_key distinct_key 4 func 1 Using where
1 PRIMARY t5 ALL NULL NULL NULL NULL 18 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <subquery6> eq_ref distinct_key distinct_key 4 func 1 Using where
+1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t3.id_product,const 1 Using where; Using index
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where
+1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
+1 PRIMARY t1 index NULL PRIMARY 8 NULL 73 Using where; Using index; Using join buffer (flat, BNL join)
+3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12 Using where
5 MATERIALIZED t2_4 range id_t2,id_product id_t2 5 NULL 18 Using index condition; Using where
-4 MATERIALIZED t2_3 range id_t2,id_product id_t2 5 NULL 32 Using index condition; Using where
-3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12
-2 MATERIALIZED t2_1 ref id_t2,id_product id_t2 5 const 50
-6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 30 Using index condition; Using where
+6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 31 Using index condition; Using where
+2 MATERIALIZED t2_1 ref id_t2,id_product id_t2 5 const 51
+4 MATERIALIZED t2_3 range id_t2,id_product id_t2 5 NULL 33 Using index condition; Using where
+set optimizer_switch='rowid_filter=default';
drop table t1,t2,t3,t4,t5;
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/subselect_sj2_mat.test b/mysql-test/main/subselect_sj2_mat.test
index d8e515aa993..4b768652670 100644
--- a/mysql-test/main/subselect_sj2_mat.test
+++ b/mysql-test/main/subselect_sj2_mat.test
@@ -2,11 +2,18 @@
# Run subselect_sj2.test with subquery materialization.
#
--source include/default_optimizer_switch.inc
+--source include/have_sequence.inc
set optimizer_switch='materialization=on';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
--source subselect_sj2.test
+set @innodb_stats_persistent_save= @@innodb_stats_persistent;
+set @innodb_stats_persistent_sample_pages_save=
+ @@innodb_stats_persistent_sample_pages;
+
+set global innodb_stats_persistent= 1;
+set global innodb_stats_persistent_sample_pages=100;
set optimizer_switch=default;
select @@optimizer_switch like '%materialization=on%';
@@ -302,6 +309,8 @@ HAVING f1 != 'foo'
ORDER BY f1;
eval $q;
+# Number of rows can be 3 or 4
+--replace_result 4 3
eval explain $q;
DROP TABLE t1,t2;
@@ -330,6 +339,8 @@ insert into t1(`id`,`local_name`) values
(11,'Rollover - Internet Payday'),
(12,'AL Monthly Installment'),
(13,'AL Semi-Monthly Installment');
+insert into t1 select seq,"ignore" from seq_1000_to_1100;
+ANALYZE TABLE t1;
explain
SELECT SQL_NO_CACHE t.id
@@ -469,6 +480,10 @@ CREATE TABLE t5 (id_product int) ENGINE=MyISAM;
INSERT INTO `t5` VALUES
(652),(668),(669),(670),(671),(673),(674),(675),(676),
(677),(679),(680),(681),(682),(683),(684),(685),(686);
+
+ANALYZE TABLE t1,t2,t3,t,t5;
+
+set optimizer_switch='rowid_filter=off';
explain
SELECT * FROM t3
@@ -482,4 +497,10 @@ AND t3.id_product IN (SELECT id_product FROM t2 t2_3 WHERE t2_3.id_t2 = 18 OR t2
AND t3.id_product IN (SELECT id_product FROM t2 t2_4 WHERE t2_4.id_t2 = 34 OR t2_4.id_t2 = 23)
AND t3.id_product IN (SELECT id_product FROM t2 t2_5 WHERE t2_5.id_t2 = 29 OR t2_5.id_t2 = 28 OR t2_5.id_t2 = 26);
+set optimizer_switch='rowid_filter=default';
+
drop table t1,t2,t3,t4,t5;
+
+set global innodb_stats_persistent= @innodb_stats_persistent_save;
+set global innodb_stats_persistent_sample_pages=
+ @innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/subselect_sj_jcl6.result b/mysql-test/main/subselect_sj_jcl6.result
index cdc0899477a..2547d9bd487 100644
--- a/mysql-test/main/subselect_sj_jcl6.result
+++ b/mysql-test/main/subselect_sj_jcl6.result
@@ -216,7 +216,7 @@ a b a b
insert into t1 select (A.a + 10 * B.a),1 from t0 A, t0 B;
explain extended select * from t1 where a in (select pk from t10 where pk<3);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t10 range PRIMARY PRIMARY 4 NULL 4 100.00 Using where; Using index
+1 PRIMARY t10 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index
1 PRIMARY t1 ALL NULL NULL NULL NULL 103 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t10` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t10`.`pk` and `test`.`t10`.`pk` < 3
@@ -1252,7 +1252,7 @@ set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='semijoin=on,materialization=off';
set optimizer_switch='firstmatch=off,loosescan=on';
set @tmp_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
-set optimizer_use_condition_selectivity=1;
+set optimizer_use_condition_selectivity=4;
CREATE TABLE t1 (i INTEGER);
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
CREATE TABLE t2 (i INTEGER, j INTEGER, KEY k(i, j));
@@ -1260,8 +1260,8 @@ INSERT INTO t2 VALUES (1, 0), (1, 1), (2, 0), (2, 1);
EXPLAIN
SELECT * FROM t1 WHERE (i) IN (SELECT i FROM t2 where j > 0);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5
-1 PRIMARY t2 index k k 10 NULL 4 Using where; Using index; Start temporary; End temporary; Using join buffer (flat, BNL join)
+1 PRIMARY t2 index k k 10 NULL 4 Using where; Using index; Start temporary
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; End temporary; Using join buffer (flat, BNL join)
SELECT * FROM t1 WHERE (i) IN (SELECT i FROM t2 where j > 0);
i
1
@@ -2576,7 +2576,9 @@ INSERT INTO t2 VALUES
(1,2),(2,1),(3,3),(4,2),(5,5),(6,3),(7,1);
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
SELECT a, b, d FROM t1, t2
@@ -2634,8 +2636,11 @@ insert into t2
select (A.a+1000*B.a)/20, 'filler_data' from t10 A, t0 B;
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
delete from t1 where kp2 in (1,3);
# Ref + LooseScan on t1:
@@ -2646,7 +2651,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 const PRIMARY PRIMARY 4 const 1 Using index
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where
1 PRIMARY t1 ref kp1 kp1 5 test.t3.a 10 Using where; Using index; LooseScan
-1 PRIMARY t2 ref a a 5 test.t1.kp2 20 Using index
+1 PRIMARY t2 ref a a 5 test.t1.kp2 19 Using index
select sum(t2.a)
from t2,t3
where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2);
@@ -3151,9 +3156,11 @@ set optimizer_switch= @tmp_mdev6859;
set @tmp_mdev12675=@@optimizer_switch;
set optimizer_switch=default;
create table t1 (a int) engine=myisam;
-insert into t1 values (5),(3),(2),(7),(2),(5),(1);
+insert into t1 values (3),(2),(7),(2),(1);
create table t2 (b int, index idx(b)) engine=myisam;
-insert into t2 values (2),(3),(2),(1),(3),(4);
+insert into t2 values (2),(3),(2),(1),(3),(4),(1),(2),(1),(2);
+insert into t2 select b+10 from t2;
+insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
@@ -3167,20 +3174,22 @@ insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
select a from t1, t2 where b between 1 and 2 and a in (select b from t2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 256 Using index; FirstMatch(t1)
-1 PRIMARY t2 range idx idx 5 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t2 ref idx idx 5 test.t1.a 1462 Using index; FirstMatch(t1)
+1 PRIMARY t2 range idx idx 5 NULL 5 Using where; Using index; Using join buffer (flat, BNL join)
explain
select a from t1 join t2 on b between 1 and 2 and a in (select b from t2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 256 Using index; FirstMatch(t1)
-1 PRIMARY t2 range idx idx 5 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t2 ref idx idx 5 test.t1.a 1462 Using index; FirstMatch(t1)
+1 PRIMARY t2 range idx idx 5 NULL 5 Using where; Using index; Using join buffer (flat, BNL join)
drop table t1,t2;
set optimizer_switch= @tmp_mdev12675;
#
@@ -3292,7 +3301,7 @@ SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
-2 MATERIALIZED t2 ref col1 col1 5 const 1 100.00 Using index condition; Using where
+2 MATERIALIZED t2 ref col1 col1 5 const 2 100.00 Using index condition; Using where
Warnings:
Note 1003 select 1 AS `Id` from (`test`.`t2`) where `test`.`t2`.`t1_Id` = 1 and `test`.`t2`.`col1` is null
DROP TABLE t1, t2;
@@ -3558,7 +3567,7 @@ EXPLAIN
SELECT a FROM t1 t WHERE a IN (SELECT b FROM t1, t2 WHERE b = a)
GROUP BY a HAVING a != 'z';
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t index idx_a idx_a 4 NULL 3 Using index
+1 PRIMARY t range idx_a idx_a 4 NULL 3 Using where; Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where
2 MATERIALIZED t1 ref idx_a idx_a 4 test.t2.b 2 Using index
@@ -3572,7 +3581,7 @@ EXPLAIN
SELECT a FROM t1 t WHERE a IN (SELECT b FROM t1, t2 WHERE b = a)
GROUP BY a HAVING a != 'z';
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t index idx_a idx_a 4 NULL 3 Using index
+1 PRIMARY t range idx_a idx_a 4 NULL 3 Using where; Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where
2 MATERIALIZED t1 ref idx_a idx_a 4 test.t2.b 2 Using index
diff --git a/mysql-test/main/subselect_sj_mat.result b/mysql-test/main/subselect_sj_mat.result
index 64f156ae03f..8f681b59fc6 100644
--- a/mysql-test/main/subselect_sj_mat.result
+++ b/mysql-test/main/subselect_sj_mat.result
@@ -37,6 +37,20 @@ create index it3i3 on t3i (c1, c2);
insert into t1i select * from t1;
insert into t2i select * from t2;
insert into t3i select * from t3;
+analyze table t1,t2,t3,t1i,t2i,t3i;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
+test.t3 analyze status OK
+test.t1i analyze status Engine-independent statistics collected
+test.t1i analyze status Table is already up to date
+test.t2i analyze status Engine-independent statistics collected
+test.t2i analyze status Table is already up to date
+test.t3i analyze status Engine-independent statistics collected
+test.t3i analyze status Table is already up to date
set @@optimizer_switch='materialization=on,in_to_exists=off,firstmatch=off';
/******************************************************************************
* Simple tests.
@@ -45,9 +59,9 @@ set @@optimizer_switch='materialization=on,in_to_exists=off,firstmatch=off';
explain extended
select * from t1 where a1 in (select b1 from t2 where b1 > '0');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 99.22
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func 1 100.00
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`b1` > '0'
select * from t1 where a1 in (select b1 from t2 where b1 > '0');
@@ -57,9 +71,9 @@ a1 a2
explain extended
select * from t1 where a1 in (select b1 from t2 where b1 > '0' group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 99.22
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func 1 100.00
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`b1` > '0'
select * from t1 where a1 in (select b1 from t2 where b1 > '0' group by b1);
@@ -69,9 +83,9 @@ a1 a2
explain extended
select * from t1 where (a1, a2) in (select b1, b2 from t2 where b1 > '0' group by b1, b2);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 99.22
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func,func 1 100.00
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`b1` > '0'
select * from t1 where (a1, a2) in (select b1, b2 from t2 where b1 > '0' group by b1, b2);
@@ -83,7 +97,7 @@ select * from t1 where (a1, a2) in (select b1, min(b2) from t2 where b1 > '0' gr
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 test.t1.a1,test.t1.a2 1 100.00
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using temporary
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where; Using temporary
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2`.`b1`,min(`test`.`t2`.`b2`) from `test`.`t2` where `test`.`t2`.`b1` > '0' group by `test`.`t2`.`b1`) join `test`.`t1` where `<subquery2>`.`b1` = `test`.`t1`.`a1` and `<subquery2>`.`min(b2)` = `test`.`t1`.`a2`
select * from t1 where (a1, a2) in (select b1, min(b2) from t2 where b1 > '0' group by b1);
@@ -129,7 +143,7 @@ select * from t1i where (a1, a2) in (select b1, max(b2) from t2i where b1 > '0'
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1i index it1i1,it1i2,it1i3 # # # 3 100.00 #
1 PRIMARY <subquery2> eq_ref distinct_key # # # 1 100.00 #
-2 MATERIALIZED t2i range it2i1,it2i3 # # # 3 100.00 #
+2 MATERIALIZED t2i range it2i1,it2i3 # # # 5 100.00 #
Warnings:
Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,max(`test`.`t2i`.`b2`) from `test`.`t2i` where `test`.`t2i`.`b1` > '0' group by `test`.`t2i`.`b1`) join `test`.`t1i` where `<subquery2>`.`b1` = `test`.`t1i`.`a1` and `<subquery2>`.`max(b2)` = `test`.`t1i`.`a2`
select * from t1i where (a1, a2) in (select b1, max(b2) from t2i where b1 > '0' group by b1);
@@ -141,37 +155,55 @@ select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0'
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1i index it1i1,it1i2,it1i3 # # # 3 100.00 #
1 PRIMARY <subquery2> eq_ref distinct_key # # # 1 100.00 #
-2 MATERIALIZED t2i range it2i1,it2i3 # # # 3 100.00 #
+2 MATERIALIZED t2i range it2i1,it2i3 # # # 5 100.00 #
Warnings:
Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,min(`test`.`t2i`.`b2`) from `test`.`t2i` where `test`.`t2i`.`b1` > '0' group by `test`.`t2i`.`b1`) join `test`.`t1i` where `<subquery2>`.`b1` = `test`.`t1i`.`a1` and `<subquery2>`.`min(b2)` = `test`.`t1i`.`a2`
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
+create table t2i_c like t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+analyze table t2i_c;
+Table Op Msg_type Msg_text
+test.t2i_c analyze status Engine-independent statistics collected
+test.t2i_c analyze status OK
+show create table t2i_c;
+Table Create Table
+t2i_c CREATE TABLE `t2i_c` (
+ `b1` char(8) DEFAULT NULL,
+ `b2` char(8) DEFAULT NULL,
+ KEY `it2i1` (`b1`),
+ KEY `it2i2` (`b2`),
+ KEY `it2i3` (`b1`,`b2`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
explain extended
-select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1);
+select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 test.t1.a1,test.t1.a2 1 100.00
-2 MATERIALIZED t2i range NULL it2i3 9 NULL 3 100.00 Using index for group-by
+2 MATERIALIZED t2i_c range NULL it2i3 9 NULL 4 100.00 Using index for group-by
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,max(`test`.`t2i`.`b2`) from `test`.`t2i` group by `test`.`t2i`.`b1`) join `test`.`t1` where `<subquery2>`.`b1` = `test`.`t1`.`a1` and `<subquery2>`.`max(b2)` = `test`.`t1`.`a2`
-select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1);
+Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2i_c`.`b1`,max(`test`.`t2i_c`.`b2`) from `test`.`t2i_c` group by `test`.`t2i_c`.`b1`) join `test`.`t1` where `<subquery2>`.`b1` = `test`.`t1`.`a1` and `<subquery2>`.`max(b2)` = `test`.`t1`.`a2`
+select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1);
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
-prepare st1 from "explain select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1)";
+prepare st1 from "explain select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1)";
execute st1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 test.t1.a1,test.t1.a2 1
-2 MATERIALIZED t2i range NULL it2i3 9 NULL 3 Using index for group-by
+2 MATERIALIZED t2i_c range NULL it2i3 9 NULL 4 Using index for group-by
execute st1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 test.t1.a1,test.t1.a2 1
-2 MATERIALIZED t2i range NULL it2i3 9 NULL 3 Using index for group-by
-prepare st2 from "select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1)";
+2 MATERIALIZED t2i_c range NULL it2i3 9 NULL 4 Using index for group-by
+prepare st2 from "select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1)";
execute st2;
a1 a2
1 - 01 2 - 01
@@ -180,12 +212,13 @@ execute st2;
a1 a2
1 - 01 2 - 01
1 - 02 2 - 02
+drop table t2i_c;
explain extended
select * from t1 where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 test.t1.a1,test.t1.a2 1 100.00
-2 MATERIALIZED t2i range it2i1,it2i3 it2i3 18 NULL 3 100.00 Using where; Using index for group-by
+2 MATERIALIZED t2i range it2i1,it2i3 it2i3 9 NULL 5 100.00 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,min(`test`.`t2i`.`b2`) from `test`.`t2i` where `test`.`t2i`.`b1` > '0' group by `test`.`t2i`.`b1`) join `test`.`t1` where `<subquery2>`.`b1` = `test`.`t1`.`a1` and `<subquery2>`.`min(b2)` = `test`.`t1`.`a2`
select * from t1 where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
@@ -231,11 +264,11 @@ set @@optimizer_switch=@local_optimizer_switch;
explain extended
select * from t1 where (a1, a2) in (select b1, b2 from t2 order by b1, b2);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 test.t1.a1,test.t1.a2 1 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func,func 1 100.00
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` order by `test`.`t2`.`b1`,`test`.`t2`.`b2`) join `test`.`t1` where `<subquery2>`.`b1` = `test`.`t1`.`a1` and `<subquery2>`.`b2` = `test`.`t1`.`a2`
+Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2`) where 1
select * from t1 where (a1, a2) in (select b1, b2 from t2 order by b1, b2);
a1 a2
1 - 01 2 - 01
@@ -243,11 +276,10 @@ a1 a2
explain extended
select * from t1i where (a1, a2) in (select b1, b2 from t2i order by b1, b2);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1i index it1i1,it1i2,it1i3 it1i3 18 NULL 3 100.00 Using where; Using index
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 test.t1i.a1,test.t1i.a2 1 100.00
-2 MATERIALIZED t2i index NULL it2i3 18 NULL 5 100.00 Using index
+1 PRIMARY t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 50.00 Using where; Using index; LooseScan
+1 PRIMARY t1i ref it1i1,it1i2,it1i3 it1i3 18 test.t2i.b1,test.t2i.b2 1 100.00 Using index
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from <materialize> (/* select#2 */ select `test`.`t2i`.`b1`,`test`.`t2i`.`b2` from `test`.`t2i` order by `test`.`t2i`.`b1`,`test`.`t2i`.`b2`) join `test`.`t1i` where `<subquery2>`.`b1` = `test`.`t1i`.`a1` and `<subquery2>`.`b2` = `test`.`t1i`.`a2`
+Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) where `test`.`t1i`.`a1` = `test`.`t2i`.`b1` and `test`.`t1i`.`a2` = `test`.`t2i`.`b2`
select * from t1i where (a1, a2) in (select b1, b2 from t2i order by b1, b2);
a1 a2
1 - 01 2 - 01
@@ -297,12 +329,12 @@ where (a1, a2) in (select b1, b2 from t2 where b1 > '0') and
(a1, a2) in (select c1, c2 from t3
where (c1, c2) in (select b1, b2 from t2i where b2 > '0'));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 98.44
1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 16 func,func 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func,func 1 100.00
-3 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-3 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+3 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 98.44 Using where
+3 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 1 100.00 Using index
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 98.44 Using where
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2`) semi join (`test`.`t2i` join `test`.`t3`) where `test`.`t2i`.`b1` = `test`.`t3`.`c1` and `test`.`t2i`.`b2` = `test`.`t3`.`c2` and `test`.`t2`.`b1` > '0' and `test`.`t3`.`c2` > '0'
select * from t1
@@ -321,7 +353,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2i index it2i1,it2i2,it2i3 # # # 5 50.00 #
1 PRIMARY t1i ref it1i1,it1i2,it1i3 # # # 1 100.00 #
1 PRIMARY t3i ref it3i1,it3i2,it3i3 # # # 1 100.00 #
-1 PRIMARY t2i ref it2i1,it2i2,it2i3 # # # 2 100.00 #
+1 PRIMARY t2i ref it2i1,it2i2,it2i3 # # # 1 100.00 #
Warnings:
Note 1003 select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) semi join (`test`.`t2i` join `test`.`t3i`) where `test`.`t1i`.`a1` = `test`.`t2i`.`b1` and `test`.`t3i`.`c1` = `test`.`t2i`.`b1` and `test`.`t2i`.`b1` = `test`.`t2i`.`b1` and `test`.`t1i`.`a2` = `test`.`t2i`.`b2` and `test`.`t3i`.`c2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b1` > '0' and `test`.`t2i`.`b2` > '0'
select * from t1i
@@ -339,12 +371,12 @@ b2 in (select c2 from t3 where c2 LIKE '%03')) and
(a1, a2) in (select c1, c2 from t3
where (c1, c2) in (select b1, b2 from t2i where b2 > '0'));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 99.22
1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 16 func,func 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func,func 1 100.00
-5 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-5 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+5 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 99.22 Using where
+5 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 1 100.00 Using index
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 99.22 Using where
4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
Warnings:
@@ -365,11 +397,11 @@ b2 in (select c2 from t3 t3b where c2 LIKE '%03')) and
(a1, a2) in (select c1, c2 from t3 t3c
where (c1, c2) in (select b1, b2 from t2i where b2 > '0'));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 99.22
1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 16 func,func 1 100.00
-1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary; End temporary; Using join buffer (flat, BNL join)
-5 MATERIALIZED t3c ALL NULL NULL NULL NULL 4 100.00 Using where
-5 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t2 ALL NULL NULL NULL NULL 5 99.22 Using where; Start temporary; End temporary; Using join buffer (flat, BNL join)
+5 MATERIALIZED t3c ALL NULL NULL NULL NULL 4 99.22 Using where
+5 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3c.c1,test.t3c.c2 1 100.00 Using index
4 MATERIALIZED t3b ALL NULL NULL NULL NULL 4 100.00 Using where
3 DEPENDENT SUBQUERY t3a ALL NULL NULL NULL NULL 4 100.00 Using where
Warnings:
@@ -398,18 +430,18 @@ where (a1, a2) in (select b1, b2 from t2i where b1 > '0') and
(a1, a2) in (select c1, c2 from t3i
where (c1, c2) in (select b1, b2 from t2i where b2 > '0')));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL # # # 3 100.00 #
+1 PRIMARY t1 ALL NULL # # # 3 99.22 #
1 PRIMARY <subquery5> eq_ref distinct_key # # # 1 100.00 #
1 PRIMARY <subquery2> eq_ref distinct_key # # # 1 100.00 #
-5 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
-5 MATERIALIZED t2i index it2i1,it2i2,it2i3 # # # 5 80.00 #
-2 MATERIALIZED t2 ALL NULL # # # 5 100.00 #
+5 MATERIALIZED t3 ALL NULL # # # 4 99.22 #
+5 MATERIALIZED t2i ref it2i1,it2i2,it2i3 # # # 1 100.00 #
+2 MATERIALIZED t2 ALL NULL # # # 5 99.22 #
4 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
3 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
7 UNION t2i index it2i1,it2i2,it2i3 # # # 5 50.00 #
7 UNION t1i ref it1i1,it1i2,it1i3 # # # 1 100.00 #
7 UNION t3i ref it3i1,it3i2,it3i3 # # # 1 100.00 #
-7 UNION t2i ref it2i1,it2i2,it2i3 # # # 2 100.00 #
+7 UNION t2i ref it2i1,it2i2,it2i3 # # # 1 100.00 #
NULL UNION RESULT <union1,7> ALL NULL # # # NULL NULL #
Warnings:
Note 1003 (/* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2`) semi join (`test`.`t2i` join `test`.`t3`) where `test`.`t2i`.`b1` = `test`.`t3`.`c1` and `test`.`t2i`.`b2` = `test`.`t3`.`c2` and (<expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#3 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%02' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery3>`.`c2`)))) or <expr_cache><`test`.`t2`.`b2`>(<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (/* select#4 */ select `test`.`t3`.`c2` from `test`.`t3` where `test`.`t3`.`c2` like '%03' ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key where `test`.`t2`.`b2` = `<subquery4>`.`c2`))))) and `test`.`t3`.`c2` > '0') union (/* select#7 */ select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` semi join (`test`.`t2i`) semi join (`test`.`t2i` join `test`.`t3i`) where `test`.`t1i`.`a1` = `test`.`t2i`.`b1` and `test`.`t3i`.`c1` = `test`.`t2i`.`b1` and `test`.`t2i`.`b1` = `test`.`t2i`.`b1` and `test`.`t1i`.`a2` = `test`.`t2i`.`b2` and `test`.`t3i`.`c2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b2` = `test`.`t2i`.`b2` and `test`.`t2i`.`b1` > '0' and `test`.`t2i`.`b2` > '0')
@@ -434,12 +466,12 @@ where (a1, a2) in (select * from t1 where a1 > '0' UNION select * from t2 where
(a1, a2) in (select c1, c2 from t3
where (c1, c2) in (select b1, b2 from t2i where b2 > '0'));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 99.22 Using where
1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 16 func,func 1 100.00
-4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-4 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 99.22 Using where
+4 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 1 100.00 Using index
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 99.22 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 99.22 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2i` join `test`.`t3`) where `test`.`t2i`.`b1` = `test`.`t3`.`c1` and `test`.`t2i`.`b2` = `test`.`t3`.`c2` and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select `test`.`t1`.`a1`,`test`.`t1`.`a2` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t1`.`a1`) = `test`.`t1`.`a1` and <cache>(`test`.`t1`.`a2`) = `test`.`t1`.`a2` union /* select#3 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`b1` and <cache>(`test`.`t1`.`a2`) = `test`.`t2`.`b2`))) and `test`.`t3`.`c2` > '0'
@@ -458,12 +490,12 @@ where (c1, c2) in (select b1, b2 from t2i where b2 > '0')) and
a1 = c1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 PRIMARY t3 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t3 ALL NULL NULL NULL NULL 4 99.22 Using where; Using join buffer (flat, BNL join)
1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 16 func,func 1 100.00
-4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-4 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 99.22 Using where
+4 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 1 100.00 Using index
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 99.22 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 99.22 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t1` semi join (`test`.`t2i` join `test`.`t3`) join `test`.`t3` where `test`.`t3`.`c1` = `test`.`t1`.`a1` and `test`.`t2i`.`b1` = `test`.`t3`.`c1` and `test`.`t2i`.`b2` = `test`.`t3`.`c2` and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select `test`.`t1`.`a1`,`test`.`t1`.`a2` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t1`.`a1`) = `test`.`t1`.`a1` and <cache>(`test`.`t1`.`a2`) = `test`.`t1`.`a2` union /* select#3 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`b1` and <cache>(`test`.`t1`.`a2`) = `test`.`t2`.`b2`))) and `test`.`t3`.`c2` > '0'
@@ -484,8 +516,8 @@ select * from t3
where c1 in (select a1 from t1 where a1 > '0' UNION select b1 from t2 where b1 < '9');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 99.22 Using where
+3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 99.22 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t3` where <expr_cache><`test`.`t3`.`c1`>(<in_optimizer>(`test`.`t3`.`c1`,<exists>(/* select#2 */ select `test`.`t1`.`a1` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t3`.`c1`) = `test`.`t1`.`a1` union /* select#3 */ select `test`.`t2`.`b1` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t3`.`c1`) = `test`.`t2`.`b1`)))
@@ -504,7 +536,7 @@ b2 in (select c2 from t3 t3b where c2 LIKE '%03')) and
where (c1, c2) in (select b1, b2 from t2i where b2 > '0' or b2 = a2));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 PRIMARY t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t1.a1,test.t1.a2 2 100.00 Using index; Start temporary
+1 PRIMARY t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t1.a1,test.t1.a2 1 100.00 Using index; Start temporary
1 PRIMARY t3c ALL NULL NULL NULL NULL 4 100.00 Using where; End temporary; Using join buffer (flat, BNL join)
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary; End temporary; Using join buffer (flat, BNL join)
4 MATERIALIZED t3b ALL NULL NULL NULL NULL 4 100.00 Using where
@@ -700,7 +732,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
1 PRIMARY t1_16 ALL NULL NULL NULL NULL 3 100.00 Using where; Start temporary; Using join buffer (flat, BNL join)
1 PRIMARY t2_16 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t3 ALL NULL NULL NULL NULL 4 99.22 Using where; Using join buffer (flat, BNL join)
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; End temporary; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t3` join `test`.`t2_16` join `test`.`t2` join `test`.`t1_16`) where `test`.`t2`.`b1` = `test`.`t3`.`c1` and `test`.`t2_16`.`b1` = `test`.`t1_16`.`a1` and `test`.`t2_16`.`b2` = `test`.`t1_16`.`a2` and `test`.`t2`.`b2` = substr(`test`.`t1_16`.`a2`,1,6) and `test`.`t3`.`c2` > '0' and concat(`test`.`t1`.`a1`,'x') = left(`test`.`t1_16`.`a1`,8)
@@ -1438,10 +1470,7 @@ INSERT INTO t2 VALUES (10,0),(11,0);
explain SELECT * FROM t1 JOIN t2 USING (f1)
WHERE t1.f1 IN (SELECT t1.pk FROM t1 ORDER BY t1.f1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 system NULL NULL NULL NULL 1
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 const 1
-1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
-2 MATERIALIZED t1 system NULL NULL NULL NULL 1
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
SELECT * FROM t1 JOIN t2 USING (f1)
WHERE t1.f1 IN (SELECT t1.pk FROM t1 ORDER BY t1.f1);
f1 pk pk
@@ -1938,7 +1967,7 @@ EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t1.a 1
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using temporary
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary
flush status;
CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
SHOW STATUS LIKE 'Created_tmp_tables';
@@ -1962,7 +1991,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2`) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7)
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2` having `MAX(c)` is null or `MAX(c)` = 7) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7)
SELECT * FROM t1
WHERE a IN (SELECT MAX(c) FROM t2) AND b=7 AND (a IS NULL OR a=b);
a b
@@ -2653,7 +2682,7 @@ select * from t1 where (a,b) in (select max(a),b from t2 group by b);
show status where Variable_name like 'Handler_read%' or Variable_name like 'Handler_%write%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 5000
+Handler_read_key 5004
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
diff --git a/mysql-test/main/subselect_sj_mat.test b/mysql-test/main/subselect_sj_mat.test
index 8583a6951b9..1de8701ecbb 100644
--- a/mysql-test/main/subselect_sj_mat.test
+++ b/mysql-test/main/subselect_sj_mat.test
@@ -56,6 +56,7 @@ create index it3i3 on t3i (c1, c2);
insert into t1i select * from t1;
insert into t2i select * from t2;
insert into t3i select * from t3;
+analyze table t1,t2,t3,t1i,t2i,t3i;
# force the use of materialization
set @@optimizer_switch='materialization=on,in_to_exists=off,firstmatch=off';
@@ -109,16 +110,24 @@ select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0'
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
# BUG#31639: Wrong plan for uncorrelated subquery when loose scan is applicable.
+create table t2i_c like t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+insert into t2i_c select * from t2i;
+analyze table t2i_c;
+show create table t2i_c;
explain extended
-select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1);
-select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1);
+select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1);
+select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1);
-prepare st1 from "explain select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1)";
+prepare st1 from "explain select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1)";
execute st1;
execute st1;
-prepare st2 from "select * from t1 where (a1, a2) in (select b1, max(b2) from t2i group by b1)";
+prepare st2 from "select * from t1 where (a1, a2) in (select b1, max(b2) from t2i_c group by b1)";
execute st2;
execute st2;
+drop table t2i_c;
explain extended
select * from t1 where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
@@ -153,6 +162,7 @@ execute st1;
set @@optimizer_switch=@local_optimizer_switch;
# materialize the result of ORDER BY
+# No longer really happens as the optimizer is now smart enough not to sort in this case
# non-indexed fields
explain extended
select * from t1 where (a1, a2) in (select b1, b2 from t2 order by b1, b2);
diff --git a/mysql-test/main/system_mysql_db.result b/mysql-test/main/system_mysql_db.result
index 300907d9d7a..37ade694489 100644
--- a/mysql-test/main/system_mysql_db.result
+++ b/mysql-test/main/system_mysql_db.result
@@ -6,12 +6,12 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
-host
index_stats
innodb_index_stats
innodb_table_stats
@@ -59,84 +59,10 @@ db CREATE TABLE `db` (
`Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
-show create table host;
-Table Create Table
-host CREATE TABLE `host` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- PRIMARY KEY (`Host`,`Db`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges'
show create table user;
-Table Create Table
-user CREATE TABLE `user` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `ssl_cipher` blob NOT NULL,
- `x509_issuer` blob NOT NULL,
- `x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
- `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
- `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
- `max_user_connections` int(11) NOT NULL DEFAULT 0,
- `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
- `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
- PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
+View Create View character_set_client collation_connection
+user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci
show create table func;
Table Create Table
func CREATE TABLE `func` (
@@ -145,7 +71,15 @@ func CREATE TABLE `func` (
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -159,7 +93,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges'
show create table columns_priv;
Table Create Table
columns_priv CREATE TABLE `columns_priv` (
@@ -171,7 +105,7 @@ columns_priv CREATE TABLE `columns_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges'
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
@@ -185,7 +119,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges'
show create table servers;
Table Create Table
servers CREATE TABLE `servers` (
@@ -199,7 +133,7 @@ servers CREATE TABLE `servers` (
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table'
show create table proc;
Table Create Table
proc CREATE TABLE `proc` (
@@ -217,7 +151,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -225,7 +159,7 @@ proc CREATE TABLE `proc` (
`body_utf8` longblob DEFAULT NULL,
`aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE',
PRIMARY KEY (`db`,`name`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures'
show create table event;
Table Create Table
event CREATE TABLE `event` (
@@ -243,7 +177,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
@@ -252,7 +186,7 @@ event CREATE TABLE `event` (
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
PRIMARY KEY (`db`,`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
@@ -287,7 +221,7 @@ table_stats CREATE TABLE `table_stats` (
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables'
show create table column_stats;
Table Create Table
column_stats CREATE TABLE `column_stats` (
@@ -303,7 +237,7 @@ column_stats CREATE TABLE `column_stats` (
`hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
`histogram` varbinary(255) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns'
show create table index_stats;
Table Create Table
index_stats CREATE TABLE `index_stats` (
@@ -313,6 +247,6 @@ index_stats CREATE TABLE `index_stats` (
`prefix_arity` int(11) unsigned NOT NULL,
`avg_frequency` decimal(12,4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes'
show tables;
Tables_in_test
diff --git a/mysql-test/main/system_mysql_db_507.result b/mysql-test/main/system_mysql_db_507.result
new file mode 100644
index 00000000000..8069405aa3a
--- /dev/null
+++ b/mysql-test/main/system_mysql_db_507.result
@@ -0,0 +1,226 @@
+#
+# MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir:
+# Fatal error: mysql.user table is damaged or in
+# unsupported 3.20 format
+#
+# switching from mysql.global_priv to mysql.user
+#
+# Original mysql.user table
+#
+describe mysql.user;
+Field Type Null Key Default Extra
+Host char(60) NO PRI
+User char(80) NO PRI
+Password char(41) NO
+Select_priv enum('N','Y') NO N
+Insert_priv enum('N','Y') NO N
+Update_priv enum('N','Y') NO N
+Delete_priv enum('N','Y') NO N
+Create_priv enum('N','Y') NO N
+Drop_priv enum('N','Y') NO N
+Reload_priv enum('N','Y') NO N
+Shutdown_priv enum('N','Y') NO N
+Process_priv enum('N','Y') NO N
+File_priv enum('N','Y') NO N
+Grant_priv enum('N','Y') NO N
+References_priv enum('N','Y') NO N
+Index_priv enum('N','Y') NO N
+Alter_priv enum('N','Y') NO N
+Show_db_priv enum('N','Y') NO N
+Super_priv enum('N','Y') NO N
+Create_tmp_table_priv enum('N','Y') NO N
+Lock_tables_priv enum('N','Y') NO N
+Execute_priv enum('N','Y') NO N
+Repl_slave_priv enum('N','Y') NO N
+Repl_client_priv enum('N','Y') NO N
+Create_view_priv enum('N','Y') NO N
+Show_view_priv enum('N','Y') NO N
+Create_routine_priv enum('N','Y') NO N
+Alter_routine_priv enum('N','Y') NO N
+Create_user_priv enum('N','Y') NO N
+Event_priv enum('N','Y') NO N
+Trigger_priv enum('N','Y') NO N
+Create_tablespace_priv enum('N','Y') NO N
+Delete_history_priv enum('N','Y') NO N
+ssl_type enum('','ANY','X509','SPECIFIED') NO
+ssl_cipher blob NO NULL
+x509_issuer blob NO NULL
+x509_subject blob NO NULL
+max_questions int(11) unsigned NO 0
+max_updates int(11) unsigned NO 0
+max_connections int(11) unsigned NO 0
+max_user_connections int(11) NO 0
+plugin char(64) NO
+authentication_string text NO NULL
+password_expired enum('N','Y') NO N
+is_role enum('N','Y') NO N
+default_role char(80) NO
+max_statement_time decimal(12,6) NO 0.000000
+#
+# Drop the password column.
+#
+alter table mysql.user drop column password,
+drop column is_role,
+drop column default_role,
+add column password_last_changed timestamp null default null after password_expired,
+add column password_lifetime smallint unsigned after password_last_changed,
+add column account_locked enum('n','y') character set utf8 not null default 'n' after password_lifetime;
+flush privileges;
+#
+# Create users without the password column present.
+#
+create user foo;
+create user goo identified by "foo";
+select OLD_PASSWORD("ioo");
+OLD_PASSWORD("ioo")
+7a8f886d28473e85
+create user ioo identified with "mysql_old_password" as "7a8f886d28473e85";
+#
+# Check if users have grants loaded correctly.
+#
+show grants for foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%`
+show grants for goo;
+Grants for goo@%
+GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
+show grants for ioo;
+Grants for ioo@%
+GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
+select user, host, select_priv, plugin, authentication_string from mysql.user
+where user like "%oo"
+order by user;
+user host select_priv plugin authentication_string
+foo % N mysql_native_password
+goo % N mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF
+ioo % N mysql_old_password 7a8f886d28473e85
+#
+# Test setting password.
+#
+SET PASSWORD FOR foo=PASSWORD("bar");
+show grants for foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
+show grants for goo;
+Grants for goo@%
+GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
+show grants for ioo;
+Grants for ioo@%
+GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
+select user, host, select_priv, plugin, authentication_string from mysql.user
+where user like "%oo"
+order by user;
+user host select_priv plugin authentication_string
+foo % N mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
+goo % N mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF
+ioo % N mysql_old_password 7a8f886d28473e85
+#
+# Test flush privileges without password column.
+#
+flush privileges;
+show grants for foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
+show grants for goo;
+Grants for goo@%
+GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
+show grants for ioo;
+Grants for ioo@%
+GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
+#
+# Test granting of privileges.
+#
+grant select on *.* to foo;
+grant select on *.* to goo;
+grant select on *.* to ioo;
+show grants for foo;
+Grants for foo@%
+GRANT SELECT ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
+show grants for goo;
+Grants for goo@%
+GRANT SELECT ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
+show grants for ioo;
+Grants for ioo@%
+GRANT SELECT ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
+#
+# Check to see if grants are stable on flush.
+#
+flush privileges;
+show grants for foo;
+Grants for foo@%
+GRANT SELECT ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB'
+show grants for goo;
+Grants for goo@%
+GRANT SELECT ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
+show grants for ioo;
+Grants for ioo@%
+GRANT SELECT ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85'
+#
+# Check internal table representation.
+#
+select user, host, select_priv, plugin, authentication_string from mysql.user
+where user like "%oo"
+order by user;
+user host select_priv plugin authentication_string
+foo % Y mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
+goo % Y mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF
+ioo % Y mysql_old_password 7a8f886d28473e85
+#
+# Test account locking
+#
+create user user1@localhost account lock;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Access denied, this account is locked
+flush privileges;
+connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
+connect con1,localhost,user1;
+ERROR HY000: Access denied, this account is locked
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost` ACCOUNT LOCK
+alter user user1@localhost account unlock;
+connect con1,localhost,user1;
+disconnect con1;
+connection default;
+show create user user1@localhost;
+CREATE USER for user1@localhost
+CREATE USER `user1`@`localhost`
+#
+# Test password expiration fields are loaded correctly
+#
+create user user@localhost;
+show create user user@localhost;
+CREATE USER for user@localhost
+CREATE USER `user`@`localhost`
+alter user user@localhost password expire;
+show create user user@localhost;
+CREATE USER for user@localhost
+CREATE USER `user`@`localhost` PASSWORD EXPIRE
+set password for user@localhost= password('');
+alter user user@localhost password expire default;
+show create user user@localhost;
+CREATE USER for user@localhost
+CREATE USER `user`@`localhost`
+alter user user@localhost password expire never;
+show create user user@localhost;
+CREATE USER for user@localhost
+CREATE USER `user`@`localhost` PASSWORD EXPIRE NEVER
+alter user user@localhost password expire interval 123 day;
+show create user user@localhost;
+CREATE USER for user@localhost
+CREATE USER `user`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
+alter user user@localhost password expire;
+show create user user@localhost;
+CREATE USER for user@localhost
+CREATE USER `user`@`localhost` PASSWORD EXPIRE
+ALTER USER `user`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
+set password for user@localhost= password('');
+show create user user@localhost;
+CREATE USER for user@localhost
+CREATE USER `user`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
+drop user user@localhost;
+#
+# Reset to final original state.
+#
+# switching back from mysql.user to mysql.global_priv
diff --git a/mysql-test/main/system_mysql_db_507.test b/mysql-test/main/system_mysql_db_507.test
new file mode 100644
index 00000000000..cfefcdc602e
--- /dev/null
+++ b/mysql-test/main/system_mysql_db_507.test
@@ -0,0 +1,132 @@
+--source include/not_embedded.inc
+--echo #
+--echo # MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir:
+--echo # Fatal error: mysql.user table is damaged or in
+--echo # unsupported 3.20 format
+--echo #
+
+--source include/switch_to_mysql_user.inc
+
+--echo #
+--echo # Original mysql.user table
+--echo #
+describe mysql.user;
+
+--echo #
+--echo # Drop the password column.
+--echo #
+alter table mysql.user drop column password,
+ drop column is_role,
+ drop column default_role,
+ add column password_last_changed timestamp null default null after password_expired,
+ add column password_lifetime smallint unsigned after password_last_changed,
+ add column account_locked enum('n','y') character set utf8 not null default 'n' after password_lifetime;
+flush privileges;
+
+--echo #
+--echo # Create users without the password column present.
+--echo #
+create user foo;
+create user goo identified by "foo";
+select OLD_PASSWORD("ioo");
+create user ioo identified with "mysql_old_password" as "7a8f886d28473e85";
+
+--echo #
+--echo # Check if users have grants loaded correctly.
+--echo #
+show grants for foo;
+show grants for goo;
+show grants for ioo;
+
+select user, host, select_priv, plugin, authentication_string from mysql.user
+where user like "%oo"
+order by user;
+
+--echo #
+--echo # Test setting password.
+--echo #
+SET PASSWORD FOR foo=PASSWORD("bar");
+
+show grants for foo;
+show grants for goo;
+show grants for ioo;
+
+select user, host, select_priv, plugin, authentication_string from mysql.user
+where user like "%oo"
+order by user;
+
+--echo #
+--echo # Test flush privileges without password column.
+--echo #
+flush privileges;
+show grants for foo;
+show grants for goo;
+show grants for ioo;
+
+--echo #
+--echo # Test granting of privileges.
+--echo #
+grant select on *.* to foo;
+grant select on *.* to goo;
+grant select on *.* to ioo;
+show grants for foo;
+show grants for goo;
+show grants for ioo;
+
+--echo #
+--echo # Check to see if grants are stable on flush.
+--echo #
+flush privileges;
+show grants for foo;
+show grants for goo;
+show grants for ioo;
+
+--echo #
+--echo # Check internal table representation.
+--echo #
+select user, host, select_priv, plugin, authentication_string from mysql.user
+where user like "%oo"
+order by user;
+
+--echo #
+--echo # Test account locking
+--echo #
+create user user1@localhost account lock;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+connect(con1,localhost,user1);
+flush privileges;
+--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
+--error ER_ACCOUNT_HAS_BEEN_LOCKED
+connect(con1,localhost,user1);
+show create user user1@localhost;
+alter user user1@localhost account unlock;
+connect(con1,localhost,user1);
+disconnect con1;
+connection default;
+show create user user1@localhost;
+
+--echo #
+--echo # Test password expiration fields are loaded correctly
+--echo #
+create user user@localhost;
+show create user user@localhost;
+alter user user@localhost password expire;
+show create user user@localhost;
+set password for user@localhost= password('');
+alter user user@localhost password expire default;
+show create user user@localhost;
+alter user user@localhost password expire never;
+show create user user@localhost;
+alter user user@localhost password expire interval 123 day;
+show create user user@localhost;
+alter user user@localhost password expire;
+show create user user@localhost;
+set password for user@localhost= password('');
+show create user user@localhost;
+drop user user@localhost;
+
+--echo #
+--echo # Reset to final original state.
+--echo #
+--source include/switch_to_mysql_global_priv.inc
diff --git a/mysql-test/main/system_mysql_db_fix40123.result b/mysql-test/main/system_mysql_db_fix40123.result
index 300907d9d7a..f76a4b37e31 100644
--- a/mysql-test/main/system_mysql_db_fix40123.result
+++ b/mysql-test/main/system_mysql_db_fix40123.result
@@ -1,3 +1,40 @@
+use test;
+set storage_engine=myisam;
+CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+Warnings:
+Warning 1280 Name 'Host' ignored for PRIMARY key.
+INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
+INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
+CREATE TABLE host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+Warnings:
+Warning 1280 Name 'Host' ignored for PRIMARY key.
+CREATE TABLE user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+Warnings:
+Warning 1280 Name 'Host' ignored for PRIMARY key.
+INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
+INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
+CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+CREATE TABLE tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TABLE columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+CREATE TABLE help_topic ( help_topic_id int unsigned not null, name varchar(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url varchar(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE help_category ( help_category_id smallint unsigned not null, name varchar(64) not null, parent_category_id smallint unsigned null, url varchar(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+CREATE TABLE help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+CREATE TABLE help_keyword ( help_keyword_id int unsigned not null, name varchar(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+CREATE TABLE time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+Warnings:
+Warning 1280 Name 'Name' ignored for PRIMARY key.
+CREATE TABLE time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+Warnings:
+Warning 1280 Name 'TzId' ignored for PRIMARY key.
+CREATE TABLE time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+Warnings:
+Warning 1280 Name 'TzIdTranTime' ignored for PRIMARY key.
+CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+Warnings:
+Warning 1280 Name 'TzIdTrTId' ignored for PRIMARY key.
+CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+Warnings:
+Warning 1280 Name 'TranTime' ignored for PRIMARY key.
show tables;
Tables_in_db
column_stats
@@ -6,6 +43,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -59,84 +97,10 @@ db CREATE TABLE `db` (
`Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
-show create table host;
-Table Create Table
-host CREATE TABLE `host` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- PRIMARY KEY (`Host`,`Db`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges'
show create table user;
-Table Create Table
-user CREATE TABLE `user` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `ssl_cipher` blob NOT NULL,
- `x509_issuer` blob NOT NULL,
- `x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
- `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
- `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
- `max_user_connections` int(11) NOT NULL DEFAULT 0,
- `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
- `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
- PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
+View Create View character_set_client collation_connection
+user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci
show create table func;
Table Create Table
func CREATE TABLE `func` (
@@ -145,7 +109,15 @@ func CREATE TABLE `func` (
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -159,7 +131,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges'
show create table columns_priv;
Table Create Table
columns_priv CREATE TABLE `columns_priv` (
@@ -171,7 +143,7 @@ columns_priv CREATE TABLE `columns_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges'
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
@@ -185,7 +157,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges'
show create table servers;
Table Create Table
servers CREATE TABLE `servers` (
@@ -199,7 +171,7 @@ servers CREATE TABLE `servers` (
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table'
show create table proc;
Table Create Table
proc CREATE TABLE `proc` (
@@ -217,7 +189,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -225,7 +197,7 @@ proc CREATE TABLE `proc` (
`body_utf8` longblob DEFAULT NULL,
`aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE',
PRIMARY KEY (`db`,`name`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures'
show create table event;
Table Create Table
event CREATE TABLE `event` (
@@ -243,7 +215,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
@@ -252,7 +224,7 @@ event CREATE TABLE `event` (
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
PRIMARY KEY (`db`,`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
@@ -287,7 +259,7 @@ table_stats CREATE TABLE `table_stats` (
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables'
show create table column_stats;
Table Create Table
column_stats CREATE TABLE `column_stats` (
@@ -303,7 +275,7 @@ column_stats CREATE TABLE `column_stats` (
`hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
`histogram` varbinary(255) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns'
show create table index_stats;
Table Create Table
index_stats CREATE TABLE `index_stats` (
@@ -313,6 +285,8 @@ index_stats CREATE TABLE `index_stats` (
`prefix_arity` int(11) unsigned NOT NULL,
`avg_frequency` decimal(12,4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes'
+DROP VIEW user;
+DROP TABLE db, host, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
show tables;
Tables_in_test
diff --git a/mysql-test/main/system_mysql_db_fix40123.test b/mysql-test/main/system_mysql_db_fix40123.test
index 2d17a0964e5..00747cd7ba0 100644
--- a/mysql-test/main/system_mysql_db_fix40123.test
+++ b/mysql-test/main/system_mysql_db_fix40123.test
@@ -19,62 +19,43 @@ if (!$MYSQL_FIX_PRIVILEGE_TABLES)
# mysql_fix_system_tables which should be ignored.
# Instead, concentrate on the errors in r/system_mysql_db.reject
--- disable_result_log
--- disable_query_log
-
use test;
# create system tables as in mysql-4.1.23
# created by executing "./mysql_create_system_tables real ."
set storage_engine=myisam;
-CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
-
-CREATE TABLE host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
-
-
-CREATE TABLE user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+CREATE TABLE user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
-
-CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
-
-
-CREATE TABLE tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
-CREATE TABLE columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
-
-CREATE TABLE help_topic ( help_topic_id int unsigned not null, name varchar(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url varchar(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
-CREATE TABLE help_category ( help_category_id smallint unsigned not null, name varchar(64) not null, parent_category_id smallint unsigned null, url varchar(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
-CREATE TABLE help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
-CREATE TABLE help_keyword ( help_keyword_id int unsigned not null, name varchar(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
-
-CREATE TABLE time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
-
-CREATE TABLE time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
-
-CREATE TABLE time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
-
-CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
-
-CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+CREATE TABLE tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TABLE columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+CREATE TABLE help_topic ( help_topic_id int unsigned not null, name varchar(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url varchar(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE help_category ( help_category_id smallint unsigned not null, name varchar(64) not null, parent_category_id smallint unsigned null, url varchar(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+CREATE TABLE help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+CREATE TABLE help_keyword ( help_keyword_id int unsigned not null, name varchar(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+CREATE TABLE time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+CREATE TABLE time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+CREATE TABLE time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
# Run the mysql_fix_privilege_tables.sql using "mysql --force"
+-- disable_result_log
--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES
-
--- enable_query_log
-- enable_result_log
# Dump the tables that should be compared
-- source include/system_db_struct.inc
--- disable_query_log
-
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos;
-
--- enable_query_log
+DROP VIEW user;
+DROP TABLE db, host, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
# check that we dropped all system tables
show tables;
diff --git a/mysql-test/main/system_mysql_db_fix50030.result b/mysql-test/main/system_mysql_db_fix50030.result
index 81b6da4c16d..a9ef62aa5d4 100644
--- a/mysql-test/main/system_mysql_db_fix50030.result
+++ b/mysql-test/main/system_mysql_db_fix50030.result
@@ -1,3 +1,44 @@
+use test;
+set storage_engine=myisam;
+CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+Warnings:
+Warning 1280 Name 'Host' ignored for PRIMARY key.
+INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
+INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
+CREATE TABLE host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+Warnings:
+Warning 1280 Name 'Host' ignored for PRIMARY key.
+CREATE TABLE user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+Warnings:
+Warning 1280 Name 'Host' ignored for PRIMARY key.
+INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0, 0);
+CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+CREATE TABLE tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TABLE columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+CREATE TABLE help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+CREATE TABLE help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+CREATE TABLE help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+CREATE TABLE time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+Warnings:
+Warning 1280 Name 'Name' ignored for PRIMARY key.
+CREATE TABLE time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+Warnings:
+Warning 1280 Name 'TzId' ignored for PRIMARY key.
+CREATE TABLE time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+Warnings:
+Warning 1280 Name 'TzIdTranTime' ignored for PRIMARY key.
+CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+Warnings:
+Warning 1280 Name 'TzIdTrTId' ignored for PRIMARY key.
+CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+Warnings:
+Warning 1280 Name 'TranTime' ignored for PRIMARY key.
+CREATE TABLE proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob DEFAULT '' NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob DEFAULT '' NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
+CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
+CREATE TABLE servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
+INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root');
show tables;
Tables_in_db
column_stats
@@ -6,6 +47,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -59,84 +101,10 @@ db CREATE TABLE `db` (
`Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
-show create table host;
-Table Create Table
-host CREATE TABLE `host` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- PRIMARY KEY (`Host`,`Db`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges'
show create table user;
-Table Create Table
-user CREATE TABLE `user` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `ssl_cipher` blob NOT NULL,
- `x509_issuer` blob NOT NULL,
- `x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
- `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
- `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
- `max_user_connections` int(11) NOT NULL DEFAULT 0,
- `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
- `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
- PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
+View Create View character_set_client collation_connection
+user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci
show create table func;
Table Create Table
func CREATE TABLE `func` (
@@ -145,7 +113,15 @@ func CREATE TABLE `func` (
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -159,7 +135,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges'
show create table columns_priv;
Table Create Table
columns_priv CREATE TABLE `columns_priv` (
@@ -171,7 +147,7 @@ columns_priv CREATE TABLE `columns_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges'
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
@@ -185,7 +161,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges'
show create table servers;
Table Create Table
servers CREATE TABLE `servers` (
@@ -199,7 +175,7 @@ servers CREATE TABLE `servers` (
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table'
show create table proc;
Table Create Table
proc CREATE TABLE `proc` (
@@ -217,7 +193,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -225,7 +201,7 @@ proc CREATE TABLE `proc` (
`body_utf8` longblob DEFAULT NULL,
`aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE',
PRIMARY KEY (`db`,`name`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures'
show create table event;
Table Create Table
event CREATE TABLE `event` (
@@ -243,7 +219,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
@@ -252,7 +228,7 @@ event CREATE TABLE `event` (
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
PRIMARY KEY (`db`,`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
@@ -287,7 +263,7 @@ table_stats CREATE TABLE `table_stats` (
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables'
show create table column_stats;
Table Create Table
column_stats CREATE TABLE `column_stats` (
@@ -303,7 +279,7 @@ column_stats CREATE TABLE `column_stats` (
`hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
`histogram` varbinary(255) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns'
show create table index_stats;
Table Create Table
index_stats CREATE TABLE `index_stats` (
@@ -313,6 +289,8 @@ index_stats CREATE TABLE `index_stats` (
`prefix_arity` int(11) unsigned NOT NULL,
`avg_frequency` decimal(12,4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes'
+DROP VIEW user;
+DROP TABLE db, host, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
show tables;
Tables_in_test
diff --git a/mysql-test/main/system_mysql_db_fix50030.test b/mysql-test/main/system_mysql_db_fix50030.test
index 9506c3465e7..085286637b0 100644
--- a/mysql-test/main/system_mysql_db_fix50030.test
+++ b/mysql-test/main/system_mysql_db_fix50030.test
@@ -19,69 +19,47 @@ if (!$MYSQL_FIX_PRIVILEGE_TABLES)
# mysql_fix_system_tables which should be ignored.
# Instead, concentrate on the errors in r/system_mysql_db.reject
--- disable_result_log
--- disable_query_log
-
use test;
# create system tables as in mysql-5.0.30
# created by executing "./mysql_create_system_tables real ."
set storage_engine=myisam;
-CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
-
-CREATE TABLE host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
-
-CREATE TABLE user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+CREATE TABLE user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0, 0);
-
-CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
-
-CREATE TABLE tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
-
-CREATE TABLE columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
-
-CREATE TABLE help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
-CREATE TABLE help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
-CREATE TABLE help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
-CREATE TABLE help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
-
-CREATE TABLE time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
-
-CREATE TABLE time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
-
-CREATE TABLE time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
-
-CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
-
-CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
-
-CREATE TABLE proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob DEFAULT '' NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob DEFAULT '' NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
-
-CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
-
+CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+CREATE TABLE tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TABLE columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+CREATE TABLE help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+CREATE TABLE help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+CREATE TABLE help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+CREATE TABLE time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+CREATE TABLE time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+CREATE TABLE time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+CREATE TABLE proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob DEFAULT '' NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob DEFAULT '' NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
+CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
CREATE TABLE servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
-
INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root');
+-- disable_result_log
# Run the mysql_fix_privilege_tables.sql using "mysql --force"
--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES
-
--- enable_query_log
-- enable_result_log
# Dump the tables that should be compared
-- source include/system_db_struct.inc
--- disable_query_log
-
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos;
-
--- enable_query_log
+DROP VIEW user;
+DROP TABLE db, host, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
# check that we dropped all system tables
show tables;
diff --git a/mysql-test/main/system_mysql_db_fix50117.result b/mysql-test/main/system_mysql_db_fix50117.result
index 2abcfb92ffa..1557817fc80 100644
--- a/mysql-test/main/system_mysql_db_fix50117.result
+++ b/mysql-test/main/system_mysql_db_fix50117.result
@@ -1,3 +1,24 @@
+use test;
+CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='MySQL plugins';
+CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
+CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE IF NOT EXISTS help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+CREATE TABLE IF NOT EXISTS help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+CREATE TABLE IF NOT EXISTS help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+CREATE TABLE IF NOT EXISTS time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+CREATE TABLE IF NOT EXISTS time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+CREATE TABLE IF NOT EXISTS time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+CREATE TABLE IF NOT EXISTS proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
+CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
+CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT NULL, definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED', on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', PRIMARY KEY (db, name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
show tables;
Tables_in_db
column_stats
@@ -6,6 +27,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -59,84 +81,10 @@ db CREATE TABLE `db` (
`Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
-show create table host;
-Table Create Table
-host CREATE TABLE `host` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- PRIMARY KEY (`Host`,`Db`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges'
show create table user;
-Table Create Table
-user CREATE TABLE `user` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `ssl_cipher` blob NOT NULL,
- `x509_issuer` blob NOT NULL,
- `x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
- `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
- `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
- `max_user_connections` int(11) NOT NULL DEFAULT 0,
- `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
- `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
- PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
+View Create View character_set_client collation_connection
+user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci
show create table func;
Table Create Table
func CREATE TABLE `func` (
@@ -145,7 +93,15 @@ func CREATE TABLE `func` (
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -159,7 +115,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges'
show create table columns_priv;
Table Create Table
columns_priv CREATE TABLE `columns_priv` (
@@ -171,7 +127,7 @@ columns_priv CREATE TABLE `columns_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges'
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
@@ -185,7 +141,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges'
show create table servers;
Table Create Table
servers CREATE TABLE `servers` (
@@ -199,7 +155,7 @@ servers CREATE TABLE `servers` (
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table'
show create table proc;
Table Create Table
proc CREATE TABLE `proc` (
@@ -217,7 +173,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -225,7 +181,7 @@ proc CREATE TABLE `proc` (
`body_utf8` longblob DEFAULT NULL,
`aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE',
PRIMARY KEY (`db`,`name`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures'
show create table event;
Table Create Table
event CREATE TABLE `event` (
@@ -243,7 +199,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
@@ -252,7 +208,7 @@ event CREATE TABLE `event` (
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
PRIMARY KEY (`db`,`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
+) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
@@ -287,7 +243,7 @@ table_stats CREATE TABLE `table_stats` (
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables'
show create table column_stats;
Table Create Table
column_stats CREATE TABLE `column_stats` (
@@ -303,7 +259,7 @@ column_stats CREATE TABLE `column_stats` (
`hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
`histogram` varbinary(255) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns'
show create table index_stats;
Table Create Table
index_stats CREATE TABLE `index_stats` (
@@ -313,6 +269,8 @@ index_stats CREATE TABLE `index_stats` (
`prefix_arity` int(11) unsigned NOT NULL,
`avg_frequency` decimal(12,4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes'
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes'
+DROP VIEW user;
+DROP TABLE db, host, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
show tables;
Tables_in_test
diff --git a/mysql-test/main/system_mysql_db_fix50117.test b/mysql-test/main/system_mysql_db_fix50117.test
index d7c825817cb..28b8621a638 100644
--- a/mysql-test/main/system_mysql_db_fix50117.test
+++ b/mysql-test/main/system_mysql_db_fix50117.test
@@ -19,86 +19,41 @@ if (!$MYSQL_FIX_PRIVILEGE_TABLES)
# mysql_fix_system_tables which should be ignored.
# Instead, concentrate on the errors in r/system_mysql_db.reject
--- disable_result_log
--- disable_query_log
-
use test;
# create system tables as in mysql-5.1.17
-
-
-CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
-
-
-CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
-
-
-CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
-
-
-CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
-
-
+CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='MySQL plugins';
-
-
CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
-
-
-CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
-
-CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
-
-
-CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
-
-
-CREATE TABLE IF NOT EXISTS help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
-
-
+CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE IF NOT EXISTS help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
CREATE TABLE IF NOT EXISTS help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
-
-
-CREATE TABLE IF NOT EXISTS help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
-
-
-CREATE TABLE IF NOT EXISTS time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
-
-
-CREATE TABLE IF NOT EXISTS time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
-
-
-CREATE TABLE IF NOT EXISTS time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
-
-
-CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
-
-
-CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
-
-
-CREATE TABLE IF NOT EXISTS proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
-
-
-CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
-
+CREATE TABLE IF NOT EXISTS help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+CREATE TABLE IF NOT EXISTS time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+CREATE TABLE IF NOT EXISTS time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+CREATE TABLE IF NOT EXISTS time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+CREATE TABLE IF NOT EXISTS proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
+CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT NULL, definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED', on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', PRIMARY KEY (db, name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
+-- disable_result_log
# Run the mysql_fix_privilege_tables.sql using "mysql --force"
--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES
-
--- enable_query_log
-- enable_result_log
# Dump the tables that should be compared
-- source include/system_db_struct.inc
--- disable_query_log
-
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos;
-
--- enable_query_log
+DROP VIEW user;
+DROP TABLE db, host, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
# check that we dropped all system tables
show tables;
diff --git a/mysql-test/main/system_mysql_db_refs.result b/mysql-test/main/system_mysql_db_refs.result
index 96ecd2f27c0..870a550bb95 100644
--- a/mysql-test/main/system_mysql_db_refs.result
+++ b/mysql-test/main/system_mysql_db_refs.result
@@ -2,9 +2,6 @@ set @name="This is a very long string, that mustn't find room in a system field
create table test_db select * from mysql.db;
delete from test_db;
insert ignore into test_db (Host,Db,User) values (@name,@name,@name);
-create table test_host select * from mysql.host;
-delete from test_host;
-insert ignore into test_host (Host,Db) values (@name,@name);
create table test_user select * from mysql.user;
delete from test_user;
insert ignore into test_user (Host,User) values (@name,@name);
@@ -19,28 +16,24 @@ delete from test_columns_priv;
insert ignore into test_columns_priv (Host,Db,User,Table_name,Column_name) values (@name,@name,@name,@name,@name);
select
if(isnull(test_db.Host),'WRONG!!!','ok') as test_db_Host,
-if(isnull(test_host.Host),'WRONG!!!','ok') as test_host_Host,
if(isnull(test_user.Host),'WRONG!!!','ok') as test_user_Host,
if(isnull(test_tables_priv.Host),'WRONG!!!','ok') as test_tables_priv_Host,
if(isnull(test_columns_priv.Host),'WRONG!!!','ok') as test_columns_priv_Host
from test_db
-left join test_host on test_db.Host=test_host.Host
left join test_user on test_db.Host=test_user.Host
left join test_tables_priv on test_db.Host=test_tables_priv.Host
left join test_columns_priv on test_db.Host=test_columns_priv.Host;
-test_db_Host test_host_Host test_user_Host test_tables_priv_Host test_columns_priv_Host
-ok ok ok ok ok
+test_db_Host test_user_Host test_tables_priv_Host test_columns_priv_Host
+ok ok ok ok
select
if(isnull(test_db.Db),'WRONG!!!','ok') as test_db_Db,
-if(isnull(test_host.Db),'WRONG!!!','ok') as test_host_Db,
if(isnull(test_tables_priv.Db),'WRONG!!!','ok') as test_tables_priv_Db,
if(isnull(test_columns_priv.Db),'WRONG!!!','ok') as est_columns_priv_Db
from test_db
-left join test_host on test_db.Db=test_host.Db
left join test_tables_priv on test_db.Db=test_tables_priv.Db
left join test_columns_priv on test_db.Db=test_columns_priv.Db;
-test_db_Db test_host_Db test_tables_priv_Db est_columns_priv_Db
-ok ok ok ok
+test_db_Db test_tables_priv_Db est_columns_priv_Db
+ok ok ok
select
if(isnull(test_db.User),'WRONG!!!','ok') as test_db_User,
if(isnull(test_user.User),'WRONG!!!','ok') as test_user_User,
@@ -62,6 +55,5 @@ ok ok
drop table test_columns_priv;
drop table test_tables_priv;
drop table test_func;
-drop table test_host;
drop table test_user;
drop table test_db;
diff --git a/mysql-test/main/system_mysql_db_refs.test b/mysql-test/main/system_mysql_db_refs.test
index 63f30e7db63..084d5bbf868 100644
--- a/mysql-test/main/system_mysql_db_refs.test
+++ b/mysql-test/main/system_mysql_db_refs.test
@@ -14,12 +14,6 @@ delete from test_db;
insert ignore into test_db (Host,Db,User) values (@name,@name,@name);
--enable_warnings
-create table test_host select * from mysql.host;
-delete from test_host;
---disable_warnings
-insert ignore into test_host (Host,Db) values (@name,@name);
---enable_warnings
-
create table test_user select * from mysql.user;
delete from test_user;
--disable_warnings
@@ -48,13 +42,11 @@ insert ignore into test_columns_priv (Host,Db,User,Table_name,Column_name) value
select
if(isnull(test_db.Host),'WRONG!!!','ok') as test_db_Host,
- if(isnull(test_host.Host),'WRONG!!!','ok') as test_host_Host,
if(isnull(test_user.Host),'WRONG!!!','ok') as test_user_Host,
if(isnull(test_tables_priv.Host),'WRONG!!!','ok') as test_tables_priv_Host,
if(isnull(test_columns_priv.Host),'WRONG!!!','ok') as test_columns_priv_Host
from test_db
-left join test_host on test_db.Host=test_host.Host
left join test_user on test_db.Host=test_user.Host
left join test_tables_priv on test_db.Host=test_tables_priv.Host
left join test_columns_priv on test_db.Host=test_columns_priv.Host;
@@ -63,12 +55,10 @@ left join test_columns_priv on test_db.Host=test_columns_priv.Host;
select
if(isnull(test_db.Db),'WRONG!!!','ok') as test_db_Db,
- if(isnull(test_host.Db),'WRONG!!!','ok') as test_host_Db,
if(isnull(test_tables_priv.Db),'WRONG!!!','ok') as test_tables_priv_Db,
if(isnull(test_columns_priv.Db),'WRONG!!!','ok') as est_columns_priv_Db
from test_db
-left join test_host on test_db.Db=test_host.Db
left join test_tables_priv on test_db.Db=test_tables_priv.Db
left join test_columns_priv on test_db.Db=test_columns_priv.Db;
@@ -96,7 +86,6 @@ left join test_columns_priv on test_tables_priv.Table_name=test_columns_priv.Tab
drop table test_columns_priv;
drop table test_tables_priv;
drop table test_func;
-drop table test_host;
drop table test_user;
drop table test_db;
diff --git a/mysql-test/main/table_elim.result b/mysql-test/main/table_elim.result
index b72ab1182ea..b49e7b11ed6 100644
--- a/mysql-test/main/table_elim.result
+++ b/mysql-test/main/table_elim.result
@@ -138,7 +138,7 @@ Note 1003 /* select#1 */ select `f`.`id` AS `id` from `test`.`t0` `f` join `test
This should use facts, a2 and its subquery:
explain extended select id from v1 where attr2 between 12 and 14;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition; Using where
+1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 4 100.00 Using index condition; Using where
1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using index
3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.a2.id 2 100.00 Using index
Warnings:
@@ -166,7 +166,7 @@ Note 1003 /* select#1 */ select `f`.`id` AS `id` from `test`.`t0` `f` join `test
This should use facts, a2 and its subquery:
explain extended select id from v2 where attr2 between 12 and 14;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition
+1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 4 100.00 Using index condition
1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using where; Using index
3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.f.id 2 100.00 Using index
Warnings:
@@ -419,7 +419,7 @@ select t1.*
from t1 left join t2 on (t2.pk=3 and t2.b=3) or (t2.pk= 4 and t2.b=3);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where
+1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where
drop table t1, t2;
#
# LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB
diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result
index d2d961dabd0..c8e6363c110 100644
--- a/mysql-test/main/table_value_constr.result
+++ b/mysql-test/main/table_value_constr.result
@@ -2313,8 +2313,8 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 1,2) union /* select#2 */ select 2 A
2
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2) union select 2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
@@ -2326,8 +2326,8 @@ Note 1003 (/* select#1 */ select `tvc_0`.`5` AS `5` from (values (5),(7),(1),(3)
2
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1) union select 2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
@@ -2374,8 +2374,8 @@ Note 1003 /* select#1 */ select 3 AS `3` union all (/* select#3 */ select `tvc_0
3
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2) union all select 3;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
@@ -2435,8 +2435,8 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 3,2) union all /* select#2 */ select
5
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3 order by 1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
Warnings:
@@ -2449,8 +2449,8 @@ order by 1 limit 2 offset 1;
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3
order by 1 limit 2 offset 1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
Warnings:
@@ -3045,16 +3045,16 @@ create table t1 (a int);
insert into t1 values (3), (7), (1);
select * from ( (select * from t1 limit 2) order by 1 desc) as dt;
a
-7
3
+7
(values (3), (7), (1) limit 2) order by 1 desc;
3
7
3
select * from ( (values (3), (7), (1) limit 2) order by 1 desc) as dt;
3
-7
3
+7
select * from ( select * from t1 order by 1 limit 2 ) as dt;
a
1
@@ -3119,3 +3119,19 @@ a b
DROP TABLE t1;
SET @@in_predicate_conversion_threshold = @save_in_predicate_conversion_threshold;
End of 10.3 tests
+#
+# MDEV-22610 Crash in INSERT INTO t1 (VALUES (DEFAULT) UNION VALUES (DEFAULT))
+#
+VALUES (DEFAULT) UNION VALUES (DEFAULT);
+ERROR HY000: 'default' is not allowed in this context
+VALUES (IGNORE) UNION VALUES (IGNORE);
+ERROR HY000: 'ignore' is not allowed in this context
+CREATE TABLE t1 (a INT DEFAULT 10);
+INSERT INTO t1 (VALUES (DEFAULT) UNION VALUES (DEFAULT));
+ERROR HY000: 'default' is not allowed in this context
+INSERT INTO t1 (VALUES (IGNORE) UNION VALUES (IGNORE));
+ERROR HY000: 'ignore' is not allowed in this context
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test
index 673e7dcdc6e..367ce9a4366 100644
--- a/mysql-test/main/table_value_constr.test
+++ b/mysql-test/main/table_value_constr.test
@@ -1697,3 +1697,22 @@ DROP TABLE t1;
SET @@in_predicate_conversion_threshold = @save_in_predicate_conversion_threshold;
--echo End of 10.3 tests
+
+--echo #
+--echo # MDEV-22610 Crash in INSERT INTO t1 (VALUES (DEFAULT) UNION VALUES (DEFAULT))
+--echo #
+
+--error ER_UNKNOWN_ERROR
+VALUES (DEFAULT) UNION VALUES (DEFAULT);
+--error ER_UNKNOWN_ERROR
+VALUES (IGNORE) UNION VALUES (IGNORE);
+CREATE TABLE t1 (a INT DEFAULT 10);
+--error ER_UNKNOWN_ERROR
+INSERT INTO t1 (VALUES (DEFAULT) UNION VALUES (DEFAULT));
+--error ER_UNKNOWN_ERROR
+INSERT INTO t1 (VALUES (IGNORE) UNION VALUES (IGNORE));
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/tc_heuristic_recover.result b/mysql-test/main/tc_heuristic_recover.result
index 193a73c77f8..32c3a9779ad 100644
--- a/mysql-test/main/tc_heuristic_recover.result
+++ b/mysql-test/main/tc_heuristic_recover.result
@@ -27,6 +27,7 @@ FOUND 3 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
FOUND 2 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
FOUND 2 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err
+# restart
FOUND 3 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
diff --git a/mysql-test/main/temp_table_frm.result b/mysql-test/main/temp_table_frm.result
index 19c66380af2..a9c59ff5969 100644
--- a/mysql-test/main/temp_table_frm.result
+++ b/mysql-test/main/temp_table_frm.result
@@ -1,3 +1,7 @@
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set @@optimizer_use_condition_selectivity=1;
+set @@use_stat_tables= NEVER;
set @@session.max_heap_table_size=16*1024*1024;
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
create temporary table t2 (a int) engine=memory;
@@ -18,4 +22,6 @@ OPENED_PLUGIN_LIBRARIES 0
OPENED_TABLE_DEFINITIONS 2
OPENED_TABLES 1
OPENED_VIEWS 0
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
diff --git a/mysql-test/main/temp_table_frm.test b/mysql-test/main/temp_table_frm.test
index 178bd15004b..ddc4ffa575c 100644
--- a/mysql-test/main/temp_table_frm.test
+++ b/mysql-test/main/temp_table_frm.test
@@ -3,6 +3,11 @@
#
# Ensure we don't overflow the internal heap table size in the join
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+
+set @@optimizer_use_condition_selectivity=1;
+set @@use_stat_tables= NEVER;
set @@session.max_heap_table_size=16*1024*1024;
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
create temporary table t2 (a int) engine=memory;
@@ -13,4 +18,6 @@ let $tmpdir= `select @@tmpdir`;
truncate table t2;
select variable_name, session_status.variable_value - t1.variable_value
from information_schema.session_status join t1 using (variable_name);
-drop table t1;
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+drop table t1; \ No newline at end of file
diff --git a/mysql-test/main/temporal_literal.result b/mysql-test/main/temporal_literal.result
index d2417d7f9eb..2197b990f3b 100644
--- a/mysql-test/main/temporal_literal.result
+++ b/mysql-test/main/temporal_literal.result
@@ -294,17 +294,17 @@ SELECT TIMESTAMP'2001-00-00 00:00:00.9999999';
TIMESTAMP'2001-00-00 00:00:00.9999999'
2001-00-00 00:00:00.999999
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-00-00 00:00:00.9999999'
+Note 1292 Truncated incorrect DATETIME value: '2001-00-00 00:00:00.9999999'
SELECT TIMESTAMP'2001-00-01 00:00:00.9999999';
TIMESTAMP'2001-00-01 00:00:00.9999999'
2001-00-01 00:00:00.999999
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-00-01 00:00:00.9999999'
+Note 1292 Truncated incorrect DATETIME value: '2001-00-01 00:00:00.9999999'
SELECT TIMESTAMP'2001-01-00 00:00:00.9999999';
TIMESTAMP'2001-01-00 00:00:00.9999999'
2001-01-00 00:00:00.999999
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-01-00 00:00:00.9999999'
+Note 1292 Truncated incorrect DATETIME value: '2001-01-00 00:00:00.9999999'
#
# String literal with bad dates and nanoseconds to DATETIME(N)
#
@@ -416,7 +416,7 @@ SELECT TIME'10:10:10.1234567';
TIME'10:10:10.1234567'
10:10:10.123456
Warnings:
-Note 1292 Truncated incorrect time value: '10:10:10.1234567'
+Note 1292 Truncated incorrect TIME value: '10:10:10.1234567'
SELECT TIME('10:10:10.1234567');
TIME('10:10:10.1234567')
10:10:10.123456
@@ -440,7 +440,7 @@ SELECT TIMESTAMP'2001-01-01 10:10:10.1234567';
TIMESTAMP'2001-01-01 10:10:10.1234567'
2001-01-01 10:10:10.123456
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567'
+Note 1292 Truncated incorrect DATETIME value: '2001-01-01 10:10:10.1234567'
SELECT TIMESTAMP('2001-01-01 10:10:10.1234567');
TIMESTAMP('2001-01-01 10:10:10.1234567')
2001-01-01 10:10:10.123456
@@ -463,7 +463,7 @@ Warning 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567xyz
CREATE TABLE t1 (a TIME(6));
INSERT INTO t1 VALUES (TIME'10:20:30.1234567');
Warnings:
-Note 1292 Truncated incorrect time value: '10:20:30.1234567'
+Note 1292 Truncated incorrect TIME value: '10:20:30.1234567'
INSERT INTO t1 VALUES (TIME('10:20:30.1234567'));
Warnings:
Note 1292 Truncated incorrect time value: '10:20:30.1234567'
diff --git a/mysql-test/main/timezone2.result b/mysql-test/main/timezone2.result
index c4d13f6c678..806255f26f5 100644
--- a/mysql-test/main/timezone2.result
+++ b/mysql-test/main/timezone2.result
@@ -365,3 +365,314 @@ DROP TABLE t1, t2, t3;
#
# End of 10.1 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors
+# (an addition for the test for MDEV-4653)
+SET timestamp=unix_timestamp('2001-02-03 10:20:30');
+SET old_mode=ZERO_DATE_TIME_CAST;
+SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5');
+CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '00:00:00'
+SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
+CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '00:00:00'
+SET old_mode=DEFAULT;
+SET timestamp=DEFAULT;
+#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125
+SELECT UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+a
+1288481125
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 SELECT MAX(a) AS a FROM t1;
+SELECT a, UNIX_TIMESTAMP(a) FROM t2;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:25 1288481125
+DROP TABLE t2;
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t2 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(t1.a), UNIX_TIMESTAMP(t2.a) FROM t1,t2;
+UNIX_TIMESTAMP(t1.a) UNIX_TIMESTAMP(t2.a)
+1288477526 1288481125
+SELECT * FROM t1,t2 WHERE t1.a < t2.a;
+a a
+2010-10-31 02:25:26 2010-10-31 02:25:25
+DROP TABLE t1,t2;
+BEGIN NOT ATOMIC
+DECLARE a,b TIMESTAMP;
+SET time_zone='+00:00';
+SET a=FROM_UNIXTIME(1288477526);
+SET b=FROM_UNIXTIME(1288481125);
+SELECT a < b;
+SET time_zone='Europe/Moscow';
+SELECT a < b;
+END;
+$$
+a < b
+1
+a < b
+1
+CREATE OR REPLACE FUNCTION f1(uts INT) RETURNS TIMESTAMP
+BEGIN
+DECLARE ts TIMESTAMP;
+DECLARE tz VARCHAR(64) DEFAULT @@time_zone;
+SET time_zone='+00:00';
+SET ts=FROM_UNIXTIME(uts);
+SET time_zone=tz;
+RETURN ts;
+END;
+$$
+SET time_zone='+00:00';
+SELECT f1(1288477526) < f1(1288481125);
+f1(1288477526) < f1(1288481125)
+1
+SET time_zone='Europe/Moscow';
+SELECT f1(1288477526) < f1(1288481125);
+f1(1288477526) < f1(1288481125)
+1
+DROP FUNCTION f1;
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/,
+FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT *, LEAST(a,b) FROM t1;
+a b LEAST(a,b)
+2010-10-30 22:25:26 2010-10-30 23:25:25 2010-10-30 22:25:26
+SET time_zone='Europe/Moscow';
+SELECT *, LEAST(a,b) FROM t1;
+a b LEAST(a,b)
+2010-10-31 02:25:26 2010-10-31 02:25:25 2010-10-31 02:25:26
+SELECT UNIX_TIMESTAMP(a), UNIX_TIMESTAMP(b), UNIX_TIMESTAMP(LEAST(a,b)) FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) UNIX_TIMESTAMP(LEAST(a,b))
+1288477526 1288481125 1288477526
+DROP TABLE t1;
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP,c TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (
+FROM_UNIXTIME(1288477526) /*summer time in Moscow*/,
+FROM_UNIXTIME(1288481125) /*winter time in Moscow*/,
+FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SELECT b BETWEEN a AND c FROM t1;
+b BETWEEN a AND c
+1
+SET time_zone='Europe/Moscow';
+SELECT b BETWEEN a AND c FROM t1;
+b BETWEEN a AND c
+1
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-30 22:25:26 1288477526
+2010-10-30 23:25:25 1288481125
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-30 22:25:26 1288477526
+2010-10-30 23:25:25 1288481125
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 GROUP BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:26 1288481126
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 ne
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 ne
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP,c TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126),FROM_UNIXTIME(1288481127));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 0
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 0
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000000),FROM_UNIXTIME(1200000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000001),FROM_UNIXTIME(1200000001));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000000),FROM_UNIXTIME(1400000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000001),FROM_UNIXTIME(1400000001));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+DROP TABLE t1;
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+CREATE TABLE t2 (a TIMESTAMP);
+SET timestamp=1288479599 /*summer time in Mowcow*/;
+INSERT INTO t1 VALUES (CURRENT_TIMESTAMP);
+SET timestamp=1288479599+3600 /*winter time in Mowcow*/;
+INSERT INTO t2 VALUES (CURRENT_TIMESTAMP);
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1, t2;
+a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a)
+2010-10-31 02:59:59 1288479599 2010-10-31 02:59:59 1288483199
+SELECT NULLIF(t1.a, t2.a) FROM t1,t2;
+NULLIF(t1.a, t2.a)
+2010-10-31 02:59:59
+DROP TABLE t1, t2;
+SET time_zone=DEFAULT;
+SET timestamp=DEFAULT;
+#
+# MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (a INT, ts TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1, FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+CREATE TABLE t2 AS SELECT ts, COALESCE(ts) AS cts FROM t1 GROUP BY cts;
+SELECT ts, cts, UNIX_TIMESTAMP(ts) AS uts, UNIX_TIMESTAMP(cts) AS ucts FROM t2;
+ts cts uts ucts
+2010-10-31 02:25:26 2010-10-31 02:25:26 1288481126 1288481126
+DROP TABLE t1,t2;
+SET time_zone=DEFAULT;
+#
+# MDEV-19961 MIN(timestamp_column) returns a wrong result in a GROUP BY query
+#
+SET time_zone='Europe/Moscow';
+CREATE OR REPLACE TABLE t1 (i INT, d TIMESTAMP);
+SET timestamp=1288477526 /* this is summer time */ ;
+INSERT INTO t1 VALUES (3,NULL);
+SET timestamp=1288477526+3599 /* this is winter time*/ ;
+INSERT INTO t1 VALUES (3,NULL);
+SELECT i, d, UNIX_TIMESTAMP(d) FROM t1 ORDER BY d;
+i d UNIX_TIMESTAMP(d)
+3 2010-10-31 02:25:26 1288477526
+3 2010-10-31 02:25:25 1288481125
+SELECT i, MIN(d) FROM t1 GROUP BY i;
+i MIN(d)
+3 2010-10-31 02:25:26
+SELECT i, MAX(d) FROM t1 GROUP BY i;
+i MAX(d)
+3 2010-10-31 02:25:25
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+#
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (i INT, d TIMESTAMP(6));
+SET timestamp=1288479599.999999 /* this is the last second in summer time */ ;
+INSERT INTO t1 VALUES (1,NULL);
+SET timestamp=1288479600.000000 /* this is the first second in winter time */ ;
+INSERT INTO t1 VALUES (2,NULL);
+SELECT i, d, UNIX_TIMESTAMP(d) FROM t1 ORDER BY d;
+i d UNIX_TIMESTAMP(d)
+1 2010-10-31 02:59:59.999999 1288479599.999999
+2 2010-10-31 02:00:00.000000 1288479600.000000
+CREATE TABLE t2 (i INT, d TIMESTAMP, expected_unix_timestamp INT UNSIGNED);
+INSERT INTO t2 SELECT i, ROUND(d) AS d, ROUND(UNIX_TIMESTAMP(d)) FROM t1;
+# UNIX_TIMESTAMP(d) and expected_unix_timestamp should return the same value.
+# Currently they do not, because ROUND(timestamp) is performed as DATETIME.
+# We should fix this eventually.
+SELECT i, d, UNIX_TIMESTAMP(d), expected_unix_timestamp FROM t2 ORDER BY i;
+i d UNIX_TIMESTAMP(d) expected_unix_timestamp
+1 2010-10-31 03:00:00 1288483200 1288479600
+2 2010-10-31 02:00:00 1288476000 1288479600
+DROP TABLE t2;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# End of 10.4 tests
+#
+#
+# MDEV-27101 Subquery using the ALL keyword on TIMESTAMP columns produces a wrong result
+#
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP NULL);
+SET timestamp=1288477526;
+/* this is summer time, earlier */
+INSERT INTO t1 VALUES (NOW());
+SET timestamp=1288477526+3599;
+/* this is winter time, later */
+INSERT INTO t1 VALUES (NOW());
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 WHERE a <= ALL (SELECT * FROM t1);
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 WHERE a >= ALL (SELECT * FROM t1);
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:25 1288481125
+DROP TABLE t1;
diff --git a/mysql-test/main/timezone2.test b/mysql-test/main/timezone2.test
index 1e5615502da..1feb8916871 100644
--- a/mysql-test/main/timezone2.test
+++ b/mysql-test/main/timezone2.test
@@ -339,3 +339,277 @@ DROP TABLE t1, t2, t3;
--echo #
--echo # End of 10.1 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors
+--echo # (an addition for the test for MDEV-4653)
+
+SET timestamp=unix_timestamp('2001-02-03 10:20:30');
+SET old_mode=ZERO_DATE_TIME_CAST;
+SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5');
+SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
+SET old_mode=DEFAULT;
+SET timestamp=DEFAULT;
+
+--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+
+# MAX()
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+SELECT UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 SELECT MAX(a) AS a FROM t1;
+SELECT a, UNIX_TIMESTAMP(a) FROM t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+# Comparison
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t2 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(t1.a), UNIX_TIMESTAMP(t2.a) FROM t1,t2;
+SELECT * FROM t1,t2 WHERE t1.a < t2.a;
+DROP TABLE t1,t2;
+
+
+# SP variable comparison
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE a,b TIMESTAMP;
+ SET time_zone='+00:00';
+ SET a=FROM_UNIXTIME(1288477526);
+ SET b=FROM_UNIXTIME(1288481125);
+ SELECT a < b;
+ SET time_zone='Europe/Moscow';
+ SELECT a < b;
+END;
+$$
+DELIMITER ;$$
+
+
+# SP function comparison
+DELIMITER $$;
+CREATE OR REPLACE FUNCTION f1(uts INT) RETURNS TIMESTAMP
+BEGIN
+ DECLARE ts TIMESTAMP;
+ DECLARE tz VARCHAR(64) DEFAULT @@time_zone;
+ SET time_zone='+00:00';
+ SET ts=FROM_UNIXTIME(uts);
+ SET time_zone=tz;
+ RETURN ts;
+END;
+$$
+DELIMITER ;$$
+SET time_zone='+00:00';
+SELECT f1(1288477526) < f1(1288481125);
+SET time_zone='Europe/Moscow';
+SELECT f1(1288477526) < f1(1288481125);
+DROP FUNCTION f1;
+
+
+# LEAST()
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/,
+ FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT *, LEAST(a,b) FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT *, LEAST(a,b) FROM t1;
+SELECT UNIX_TIMESTAMP(a), UNIX_TIMESTAMP(b), UNIX_TIMESTAMP(LEAST(a,b)) FROM t1;
+DROP TABLE t1;
+
+
+# BETWEEN
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP,c TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (
+ FROM_UNIXTIME(1288477526) /*summer time in Moscow*/,
+ FROM_UNIXTIME(1288481125) /*winter time in Moscow*/,
+ FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SELECT b BETWEEN a AND c FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT b BETWEEN a AND c FROM t1;
+DROP TABLE t1;
+
+
+# ORDER BY
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+
+# GROUP BY
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 GROUP BY a;
+DROP TABLE t1;
+
+
+# CASE
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+DROP TABLE t1;
+
+
+# IN
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP,c TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126),FROM_UNIXTIME(1288481127));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+DROP TABLE t1;
+
+# Comparison and IN in combination with a subquery (with one row)
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+DROP TABLE t1;
+
+# Comparison and IN in combinarion with a subquery (with multiple rows)
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000000),FROM_UNIXTIME(1200000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000001),FROM_UNIXTIME(1200000001));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000000),FROM_UNIXTIME(1400000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000001),FROM_UNIXTIME(1400000001));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+DROP TABLE t1;
+
+# NULLIF
+
+SET time_zone='Europe/Moscow';
+
+CREATE TABLE t1 (a TIMESTAMP);
+CREATE TABLE t2 (a TIMESTAMP);
+SET timestamp=1288479599 /*summer time in Mowcow*/;
+INSERT INTO t1 VALUES (CURRENT_TIMESTAMP);
+SET timestamp=1288479599+3600 /*winter time in Mowcow*/;
+INSERT INTO t2 VALUES (CURRENT_TIMESTAMP);
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1, t2;
+SELECT NULLIF(t1.a, t2.a) FROM t1,t2;
+DROP TABLE t1, t2;
+SET time_zone=DEFAULT;
+SET timestamp=DEFAULT;
+
+
+--echo #
+--echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (a INT, ts TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1, FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+CREATE TABLE t2 AS SELECT ts, COALESCE(ts) AS cts FROM t1 GROUP BY cts;
+SELECT ts, cts, UNIX_TIMESTAMP(ts) AS uts, UNIX_TIMESTAMP(cts) AS ucts FROM t2;
+DROP TABLE t1,t2;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # MDEV-19961 MIN(timestamp_column) returns a wrong result in a GROUP BY query
+--echo #
+
+SET time_zone='Europe/Moscow';
+CREATE OR REPLACE TABLE t1 (i INT, d TIMESTAMP);
+SET timestamp=1288477526 /* this is summer time */ ;
+INSERT INTO t1 VALUES (3,NULL);
+SET timestamp=1288477526+3599 /* this is winter time*/ ;
+INSERT INTO t1 VALUES (3,NULL);
+SELECT i, d, UNIX_TIMESTAMP(d) FROM t1 ORDER BY d;
+SELECT i, MIN(d) FROM t1 GROUP BY i;
+SELECT i, MAX(d) FROM t1 GROUP BY i;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+--echo #
+
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (i INT, d TIMESTAMP(6));
+SET timestamp=1288479599.999999 /* this is the last second in summer time */ ;
+INSERT INTO t1 VALUES (1,NULL);
+SET timestamp=1288479600.000000 /* this is the first second in winter time */ ;
+INSERT INTO t1 VALUES (2,NULL);
+SELECT i, d, UNIX_TIMESTAMP(d) FROM t1 ORDER BY d;
+
+CREATE TABLE t2 (i INT, d TIMESTAMP, expected_unix_timestamp INT UNSIGNED);
+INSERT INTO t2 SELECT i, ROUND(d) AS d, ROUND(UNIX_TIMESTAMP(d)) FROM t1;
+
+--echo # UNIX_TIMESTAMP(d) and expected_unix_timestamp should return the same value.
+--echo # Currently they do not, because ROUND(timestamp) is performed as DATETIME.
+--echo # We should fix this eventually.
+
+SELECT i, d, UNIX_TIMESTAMP(d), expected_unix_timestamp FROM t2 ORDER BY i;
+DROP TABLE t2;
+
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-27101 Subquery using the ALL keyword on TIMESTAMP columns produces a wrong result
+--echo #
+
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP NULL);
+SET timestamp=1288477526; /* this is summer time, earlier */
+INSERT INTO t1 VALUES (NOW());
+SET timestamp=1288477526+3599; /* this is winter time, later */
+INSERT INTO t1 VALUES (NOW());
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 WHERE a <= ALL (SELECT * FROM t1);
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 WHERE a >= ALL (SELECT * FROM t1);
+DROP TABLE t1;
diff --git a/mysql-test/main/tls_version.opt b/mysql-test/main/tls_version.opt
new file mode 100644
index 00000000000..5f30e3749a4
--- /dev/null
+++ b/mysql-test/main/tls_version.opt
@@ -0,0 +1 @@
+--tls_version=TLSv1.1,TLSv1.2
diff --git a/mysql-test/main/tls_version.result b/mysql-test/main/tls_version.result
new file mode 100644
index 00000000000..d1b20a121fe
--- /dev/null
+++ b/mysql-test/main/tls_version.result
@@ -0,0 +1,14 @@
+Variable_name Value
+Ssl_version TLSv1.2
+Variable_name Value
+Ssl_version TLSv1.2
+Variable_name Value
+Ssl_version TLSv1.1
+Variable_name Value
+Ssl_version TLSv1.1
+Variable_name Value
+Ssl_version TLSv1.2
+Variable_name Value
+Ssl_version TLSv1.2
+@@tls_version
+TLSv1.1,TLSv1.2
diff --git a/mysql-test/main/tls_version.test b/mysql-test/main/tls_version.test
new file mode 100644
index 00000000000..875fed19821
--- /dev/null
+++ b/mysql-test/main/tls_version.test
@@ -0,0 +1,24 @@
+# Tests for SSL connections, only run if mysqld is compiled
+# with support for SSL.
+
+-- source include/have_ssl_communication.inc
+#default is highest available version: TLSv1.2
+--exec $MYSQL --host=localhost --ssl -e "show status like 'ssl_version';"
+# TLSv1.2
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.2 -e "show status like 'ssl_version';"
+# TLSv1.1
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.1 -e "show status like 'ssl_version';"
+# if a gap is between TLS versions, lowest version number should be used (TLS1.1)
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.1,TLSv1.3 -e "show status like 'ssl_version';"
+# TLSv1.3 is not enabled, so TLSv1.2 should be used
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.2,TLSv1.3 -e "show status like 'ssl_version';"
+# Highest TLS version number should be used (TLSv1.2)
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.1,TLSv1.2 -e "show status like 'ssl_version';"
+# Errors:
+# TLS v1.0 is disabled on server, so we should get an error
+--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
+--error 1
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';"
+# finally list available protocols
+--exec $MYSQL --host=localhost --ssl -e "select @@tls_version;"
+
diff --git a/mysql-test/main/tls_version1.opt b/mysql-test/main/tls_version1.opt
new file mode 100644
index 00000000000..91715074d40
--- /dev/null
+++ b/mysql-test/main/tls_version1.opt
@@ -0,0 +1 @@
+--tls_version=TLSv1.0
diff --git a/mysql-test/main/tls_version1.result b/mysql-test/main/tls_version1.result
new file mode 100644
index 00000000000..8333bfec159
--- /dev/null
+++ b/mysql-test/main/tls_version1.result
@@ -0,0 +1,6 @@
+Variable_name Value
+Ssl_version TLSv1
+Variable_name Value
+Ssl_version TLSv1
+@@tls_version
+TLSv1.0
diff --git a/mysql-test/main/tls_version1.test b/mysql-test/main/tls_version1.test
new file mode 100644
index 00000000000..d38de876ba3
--- /dev/null
+++ b/mysql-test/main/tls_version1.test
@@ -0,0 +1,12 @@
+# Tests for SSL connections, only run if mysqld is compiled
+# with support for SSL.
+
+-- source include/have_ssl_communication.inc
+--exec $MYSQL --host=localhost --ssl -e "show status like 'ssl_version';"
+--error 1
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.2 -e "show status like 'ssl_version';"
+--error 1
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.1 -e "show status like 'ssl_version';"
+--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';"
+--exec $MYSQL --host=localhost --ssl -e "select @@tls_version;"
+
diff --git a/mysql-test/main/tmp_table_count-7586.result b/mysql-test/main/tmp_table_count-7586.result
index 0c526e0d4a3..637e7385685 100644
--- a/mysql-test/main/tmp_table_count-7586.result
+++ b/mysql-test/main/tmp_table_count-7586.result
@@ -38,7 +38,7 @@ EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t1.a 1
-2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using temporary
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary
truncate table performance_schema.events_statements_history_long;
flush status;
CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
diff --git a/mysql-test/main/trigger-compat.result b/mysql-test/main/trigger-compat.result
index 387d4fb1489..656edc63a7d 100644
--- a/mysql-test/main/trigger-compat.result
+++ b/mysql-test/main/trigger-compat.result
@@ -142,3 +142,298 @@ DROP TRIGGER tr12;
DROP TRIGGER tr11;
DROP TABLE t1;
DROP TABLE t2;
+#
+# MDEV-25659 trigger name is empty after upgrade to 10.4
+#
+# START: Total triggers 1, broken triggers 1, DROP TABLE
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+FLUSH TABLES;
+DELETE FROM t1 WHERE a=1;
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+INSERT INTO t1 VALUES (2);
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+SET time_zone='+00:00';
+SHOW TRIGGERS LIKE 't1';
+Trigger tr1
+Event DELETE
+Table t1
+Statement CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+Timing AFTER
+Created 2022-01-13 08:23:06.47
+sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+Definer
+character_set_client utf8
+collation_connection utf8_general_ci
+Database Collation latin1_swedish_ci
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+TRIGGER_CATALOG def
+TRIGGER_SCHEMA test
+TRIGGER_NAME tr1
+EVENT_MANIPULATION DELETE
+EVENT_OBJECT_CATALOG def
+EVENT_OBJECT_SCHEMA test
+EVENT_OBJECT_TABLE t1
+ACTION_ORDER 1
+ACTION_CONDITION NULL
+ACTION_STATEMENT CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+ACTION_ORIENTATION ROW
+ACTION_TIMING AFTER
+ACTION_REFERENCE_OLD_TABLE NULL
+ACTION_REFERENCE_NEW_TABLE NULL
+ACTION_REFERENCE_OLD_ROW OLD
+ACTION_REFERENCE_NEW_ROW NEW
+CREATED 2022-01-13 08:23:06.47
+SQL_MODE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DEFINER
+CHARACTER_SET_CLIENT utf8
+COLLATION_CONNECTION utf8_general_ci
+DATABASE_COLLATION latin1_swedish_ci
+SET time_zone=DEFAULT;
+# Listing trigger files
+t1.TRG
+tr1.TRN
+# Listing trigger files done
+DROP TABLE t1;
+# Listing trigger files
+# Listing trigger files done
+# END: Total triggers 1, broken triggers 1, DROP TABLE
+# START: Total triggers 1, broken triggers 1, DROP TRIGGER
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+FLUSH TABLES;
+DELETE FROM t1 WHERE a=1;
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+INSERT INTO t1 VALUES (2);
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+SET time_zone='+00:00';
+SHOW TRIGGERS LIKE 't1';
+Trigger tr1
+Event DELETE
+Table t1
+Statement CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+Timing AFTER
+Created 2022-01-13 08:23:06.47
+sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+Definer
+character_set_client utf8
+collation_connection utf8_general_ci
+Database Collation latin1_swedish_ci
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+TRIGGER_CATALOG def
+TRIGGER_SCHEMA test
+TRIGGER_NAME tr1
+EVENT_MANIPULATION DELETE
+EVENT_OBJECT_CATALOG def
+EVENT_OBJECT_SCHEMA test
+EVENT_OBJECT_TABLE t1
+ACTION_ORDER 1
+ACTION_CONDITION NULL
+ACTION_STATEMENT CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+ACTION_ORIENTATION ROW
+ACTION_TIMING AFTER
+ACTION_REFERENCE_OLD_TABLE NULL
+ACTION_REFERENCE_NEW_TABLE NULL
+ACTION_REFERENCE_OLD_ROW OLD
+ACTION_REFERENCE_NEW_ROW NEW
+CREATED 2022-01-13 08:23:06.47
+SQL_MODE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DEFINER
+CHARACTER_SET_CLIENT utf8
+COLLATION_CONNECTION utf8_general_ci
+DATABASE_COLLATION latin1_swedish_ci
+SET time_zone=DEFAULT;
+# Listing trigger files
+t1.TRG
+tr1.TRN
+# Listing trigger files done
+DROP TRIGGER tr1;
+# Listing trigger files
+# Listing trigger files done
+DROP TABLE t1;
+# END: Total triggers 1, broken triggers 1, DROP TRIGGER
+# START: Total triggers 2, broken triggers 1, DROP TABLE
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+FLUSH TABLES;
+DELETE FROM t1 WHERE a=1;
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+INSERT INTO t1 VALUES (2);
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+SET time_zone='+00:00';
+SHOW TRIGGERS LIKE 't1';
+Trigger tr2
+Event INSERT
+Table t1
+Statement INSERT INTO t2 VALUES (NEW.a+100)
+Timing AFTER
+Created 2022-01-13 10:01:48.74
+sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+Definer root@localhost
+character_set_client utf8
+collation_connection utf8_general_ci
+Database Collation latin1_swedish_ci
+Trigger tr1
+Event DELETE
+Table t1
+Statement CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+Timing AFTER
+Created 2022-01-13 10:01:48.73
+sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+Definer
+character_set_client utf8
+collation_connection utf8_general_ci
+Database Collation latin1_swedish_ci
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+TRIGGER_CATALOG def
+TRIGGER_SCHEMA test
+TRIGGER_NAME tr1
+EVENT_MANIPULATION DELETE
+EVENT_OBJECT_CATALOG def
+EVENT_OBJECT_SCHEMA test
+EVENT_OBJECT_TABLE t1
+ACTION_ORDER 1
+ACTION_CONDITION NULL
+ACTION_STATEMENT CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+ACTION_ORIENTATION ROW
+ACTION_TIMING AFTER
+ACTION_REFERENCE_OLD_TABLE NULL
+ACTION_REFERENCE_NEW_TABLE NULL
+ACTION_REFERENCE_OLD_ROW OLD
+ACTION_REFERENCE_NEW_ROW NEW
+CREATED 2022-01-13 10:01:48.73
+SQL_MODE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DEFINER
+CHARACTER_SET_CLIENT utf8
+COLLATION_CONNECTION utf8_general_ci
+DATABASE_COLLATION latin1_swedish_ci
+SET time_zone=DEFAULT;
+# Listing trigger files
+t1.TRG
+tr1.TRN
+tr2.TRN
+# Listing trigger files done
+DROP TABLE t1;
+# Listing trigger files
+# Listing trigger files done
+# END: Total triggers 2, broken triggers 1, using DROP TABLE
+# START: Total triggers 2, broken triggers 1, DROP TRIGGER
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+FLUSH TABLES;
+DELETE FROM t1 WHERE a=1;
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+INSERT INTO t1 VALUES (2);
+ERROR 42000: Trigger 'tr1' has an error in its body: 'Undeclared variable: unknown_variable'
+SET time_zone='+00:00';
+SHOW TRIGGERS LIKE 't1';
+Trigger tr2
+Event INSERT
+Table t1
+Statement INSERT INTO t2 VALUES (NEW.a+100)
+Timing AFTER
+Created 2022-01-13 10:01:48.74
+sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+Definer root@localhost
+character_set_client utf8
+collation_connection utf8_general_ci
+Database Collation latin1_swedish_ci
+Trigger tr1
+Event DELETE
+Table t1
+Statement CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+Timing AFTER
+Created 2022-01-13 10:01:48.73
+sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+Definer
+character_set_client utf8
+collation_connection utf8_general_ci
+Database Collation latin1_swedish_ci
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+TRIGGER_CATALOG def
+TRIGGER_SCHEMA test
+TRIGGER_NAME tr1
+EVENT_MANIPULATION DELETE
+EVENT_OBJECT_CATALOG def
+EVENT_OBJECT_SCHEMA test
+EVENT_OBJECT_TABLE t1
+ACTION_ORDER 1
+ACTION_CONDITION NULL
+ACTION_STATEMENT CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ IF unknown_variable
+ THEN
+ INSERT INTO t2 VALUES (OLD.a);
+ END IF;
+END
+ACTION_ORIENTATION ROW
+ACTION_TIMING AFTER
+ACTION_REFERENCE_OLD_TABLE NULL
+ACTION_REFERENCE_NEW_TABLE NULL
+ACTION_REFERENCE_OLD_ROW OLD
+ACTION_REFERENCE_NEW_ROW NEW
+CREATED 2022-01-13 10:01:48.73
+SQL_MODE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DEFINER
+CHARACTER_SET_CLIENT utf8
+COLLATION_CONNECTION utf8_general_ci
+DATABASE_COLLATION latin1_swedish_ci
+SET time_zone=DEFAULT;
+# Listing trigger files
+t1.TRG
+tr1.TRN
+tr2.TRN
+# Listing trigger files done
+DROP TRIGGER tr1;
+# Listing trigger files
+t1.TRG
+tr2.TRN
+# Listing trigger files done
+INSERT INTO t1 VALUES (100);
+ERROR 42S02: Table 'test.t2' doesn't exist
+DROP TABLE t1;
+# Listing trigger files
+# Listing trigger files done
+# END: Total triggers 2, broken triggers 1, using DROP TRIGGER
diff --git a/mysql-test/main/trigger-compat.test b/mysql-test/main/trigger-compat.test
index baf3cad11d6..4d9160c7728 100644
--- a/mysql-test/main/trigger-compat.test
+++ b/mysql-test/main/trigger-compat.test
@@ -289,3 +289,219 @@ DROP TRIGGER tr11;
DROP TABLE t1;
DROP TABLE t2;
+
+
+--echo #
+--echo # MDEV-25659 trigger name is empty after upgrade to 10.4
+--echo #
+
+--echo # START: Total triggers 1, broken triggers 1, DROP TABLE
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+
+--write_file $MYSQLD_DATADIR/test/tr1.TRN
+TYPE=TRIGGERNAME
+trigger_table=t1
+EOF
+
+--write_file $MYSQLD_DATADIR/test/t1.TRG
+TYPE=TRIGGERS
+triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW\nBEGIN\n IF unknown_variable\n THEN\n INSERT INTO t2 VALUES (OLD.a);\n END IF;\nEND'
+sql_modes=1411383296
+definers='root@localhost'
+client_cs_names='utf8'
+connection_cl_names='utf8_general_ci'
+db_cl_names='latin1_swedish_ci'
+created=164206218647
+EOF
+
+FLUSH TABLES;
+--error ER_PARSE_ERROR
+DELETE FROM t1 WHERE a=1;
+--error ER_PARSE_ERROR
+INSERT INTO t1 VALUES (2);
+
+SET time_zone='+00:00';
+--vertical_results
+SHOW TRIGGERS LIKE 't1';
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+--horizontal_results
+SET time_zone=DEFAULT;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+DROP TABLE t1;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+--echo # END: Total triggers 1, broken triggers 1, DROP TABLE
+
+
+--echo # START: Total triggers 1, broken triggers 1, DROP TRIGGER
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+
+--write_file $MYSQLD_DATADIR/test/tr1.TRN
+TYPE=TRIGGERNAME
+trigger_table=t1
+EOF
+
+--write_file $MYSQLD_DATADIR/test/t1.TRG
+TYPE=TRIGGERS
+triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW\nBEGIN\n IF unknown_variable\n THEN\n INSERT INTO t2 VALUES (OLD.a);\n END IF;\nEND'
+sql_modes=1411383296
+definers='root@localhost'
+client_cs_names='utf8'
+connection_cl_names='utf8_general_ci'
+db_cl_names='latin1_swedish_ci'
+created=164206218647
+EOF
+
+FLUSH TABLES;
+--error ER_PARSE_ERROR
+DELETE FROM t1 WHERE a=1;
+--error ER_PARSE_ERROR
+INSERT INTO t1 VALUES (2);
+
+SET time_zone='+00:00';
+--vertical_results
+SHOW TRIGGERS LIKE 't1';
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+--horizontal_results
+SET time_zone=DEFAULT;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+DROP TRIGGER tr1;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+DROP TABLE t1;
+
+--echo # END: Total triggers 1, broken triggers 1, DROP TRIGGER
+
+
+--echo # START: Total triggers 2, broken triggers 1, DROP TABLE
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+
+--write_file $MYSQLD_DATADIR/test/tr1.TRN
+TYPE=TRIGGERNAME
+trigger_table=t1
+EOF
+
+--write_file $MYSQLD_DATADIR/test/tr2.TRN
+TYPE=TRIGGERNAME
+trigger_table=t1
+EOF
+
+--write_file $MYSQLD_DATADIR/test/t1.TRG
+TYPE=TRIGGERS
+triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr2 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a+100)' 'CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW\nBEGIN\n IF unknown_variable\n THEN\n INSERT INTO t2 VALUES (OLD.a);\n END IF;\nEND'
+sql_modes=1411383296 1411383296
+definers='root@localhost' 'root@localhost'
+client_cs_names='utf8' 'utf8'
+connection_cl_names='utf8_general_ci' 'utf8_general_ci'
+db_cl_names='latin1_swedish_ci' 'latin1_swedish_ci'
+created=164206810874 164206810873
+EOF
+
+FLUSH TABLES;
+--error ER_PARSE_ERROR
+DELETE FROM t1 WHERE a=1;
+--error ER_PARSE_ERROR
+INSERT INTO t1 VALUES (2);
+
+SET time_zone='+00:00';
+--vertical_results
+SHOW TRIGGERS LIKE 't1';
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+--horizontal_results
+SET time_zone=DEFAULT;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+DROP TABLE t1;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+--echo # END: Total triggers 2, broken triggers 1, using DROP TABLE
+
+
+--echo # START: Total triggers 2, broken triggers 1, DROP TRIGGER
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1);
+
+--write_file $MYSQLD_DATADIR/test/tr1.TRN
+TYPE=TRIGGERNAME
+trigger_table=t1
+EOF
+
+--write_file $MYSQLD_DATADIR/test/tr2.TRN
+TYPE=TRIGGERNAME
+trigger_table=t1
+EOF
+
+--write_file $MYSQLD_DATADIR/test/t1.TRG
+TYPE=TRIGGERS
+triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr2 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a+100)' 'CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW\nBEGIN\n IF unknown_variable\n THEN\n INSERT INTO t2 VALUES (OLD.a);\n END IF;\nEND'
+sql_modes=1411383296 1411383296
+definers='root@localhost' 'root@localhost'
+client_cs_names='utf8' 'utf8'
+connection_cl_names='utf8_general_ci' 'utf8_general_ci'
+db_cl_names='latin1_swedish_ci' 'latin1_swedish_ci'
+created=164206810874 164206810873
+EOF
+
+FLUSH TABLES;
+--error ER_PARSE_ERROR
+DELETE FROM t1 WHERE a=1;
+--error ER_PARSE_ERROR
+INSERT INTO t1 VALUES (2);
+
+SET time_zone='+00:00';
+--vertical_results
+SHOW TRIGGERS LIKE 't1';
+SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='tr1';
+--horizontal_results
+SET time_zone=DEFAULT;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+DROP TRIGGER tr1;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+# Now we dropped the broken trigger. Make sure the good one is fired.
+# If everything goes as expected, it will try to insert into t2,
+# which does not exists, hence the (expected) error.
+--error ER_NO_SUCH_TABLE
+INSERT INTO t1 VALUES (100);
+
+DROP TABLE t1;
+
+--echo # Listing trigger files
+--list_files $MYSQLD_DATADIR/test *.TR?
+--echo # Listing trigger files done
+
+--echo # END: Total triggers 2, broken triggers 1, using DROP TRIGGER
diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result
index 49b8b9977fe..571d78aa9e2 100644
--- a/mysql-test/main/trigger.result
+++ b/mysql-test/main/trigger.result
@@ -319,7 +319,7 @@ drop table t1;
drop table t3;
create temporary table t1 (i int);
create trigger trg before insert on t1 for each row set @a:=1;
-ERROR HY000: Trigger's 't1' is view or temporary table
+ERROR HY000: Trigger's 't1' is view, temporary table or sequence
drop table t1;
create table t1 (x1col char);
create trigger tx1 before insert on t1 for each row set new.x1col = 'x';
@@ -736,6 +736,8 @@ select user() into user;
set NEW.username = user;
select count(*) from ((select 1) union (select 2)) as d1 into i;
end|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
update t1 set data = 1;
connection addconroot1;
update t1 set data = 2;
@@ -2084,6 +2086,8 @@ FOR EACH ROW BEGIN
SELECT 1 FROM t1 c WHERE
(@bug51650 IS NULL OR @bug51650 != c.b) AND c.b = NEW.a LIMIT 1 INTO @foo;
END//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SET @bug51650 = 1;
INSERT IGNORE INTO t2 VALUES();
INSERT IGNORE INTO t1 SET b = '777';
@@ -2142,7 +2146,7 @@ insert into t2 values (1),(2);
delete from t1 where i=1;
show status like 'Opened_tables';
Variable_name Value
-Opened_tables 3
+Opened_tables 6
select * from t1;
i
2
diff --git a/mysql-test/main/trigger_notembedded.test b/mysql-test/main/trigger_notembedded.test
index 1e9e31c0692..9f89e66bbfe 100644
--- a/mysql-test/main/trigger_notembedded.test
+++ b/mysql-test/main/trigger_notembedded.test
@@ -908,7 +908,7 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
create trigger t1_bi before insert on t1 for each row begin end;
unlock tables;
diff --git a/mysql-test/main/truncate_coverage.result b/mysql-test/main/truncate_coverage.result
index 078de1ef3ab..9a343832b69 100644
--- a/mysql-test/main/truncate_coverage.result
+++ b/mysql-test/main/truncate_coverage.result
@@ -40,7 +40,7 @@ TRUNCATE TABLE m1;
connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
# Sending:
-FLUSH TABLES;
+FLUSH TABLES m1;
connection default;
# Waiting for FLUSH TABLES to be blocked.
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/truncate_coverage.test b/mysql-test/main/truncate_coverage.test
index 3351ce84232..1b793c6638c 100644
--- a/mysql-test/main/truncate_coverage.test
+++ b/mysql-test/main/truncate_coverage.test
@@ -81,12 +81,12 @@ SET DEBUG_SYNC= 'open_tables_after_open_and_process_table SIGNAL opened WAIT_FOR
connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
--echo # Sending:
---send FLUSH TABLES
+--send FLUSH TABLES m1
connection default;
--echo # Waiting for FLUSH TABLES to be blocked.
let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state= 'Waiting for table flush' AND info= 'FLUSH TABLES';
+ WHERE state= 'Waiting for table metadata lock' AND info= 'FLUSH TABLES m1';
--source include/wait_condition.inc
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/type_bit.result b/mysql-test/main/type_bit.result
index 7eaba70d7fa..4e9d698b0c2 100644
--- a/mysql-test/main/type_bit.result
+++ b/mysql-test/main/type_bit.result
@@ -256,7 +256,7 @@ a+0 b+0
127 403
explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 2 NULL 8 Using where; Using index; Using filesort
+1 SIMPLE t1 range a a 2 NULL 9 Using where; Using index; Using filesort
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
a+0 b+0
57 135
@@ -677,9 +677,13 @@ DROP TABLE t2;
CREATE TABLE t1(a BIT(13), KEY(a));
INSERT IGNORE INTO t1(a) VALUES
(65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
EXPLAIN SELECT 1 FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 3 NULL 6 Using index for group-by
+1 SIMPLE t1 range NULL a 3 NULL 2 Using index for group-by
SELECT 1 FROM t1 GROUP BY a;
1
1
@@ -762,7 +766,7 @@ CREATE TABLE t1 (a BIT(7), b BIT(9), KEY(a, b));
INSERT INTO t1 VALUES(0, 0), (5, 3), (5, 6), (6, 4), (7, 0);
EXPLAIN SELECT a+0, b+0 FROM t1 WHERE a > 4 and b < 7 ORDER BY 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 2 NULL 4 Using where; Using index; Using filesort
+1 SIMPLE t1 index a a 5 NULL 5 Using where; Using index; Using filesort
DROP TABLE t1;
End of 5.0 tests
create table t1(a bit(7));
@@ -856,3 +860,1004 @@ DROP TABLE IF EXISTS t1;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-15759 Expect "Impossible WHERE" for indexed_int_column=out_of_range_int_constant
+#
+CREATE TABLE t1 (a BIT(7), KEY(a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+EXPLAIN SELECT * FROM t1 WHERE a=200;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT * FROM t1 WHERE a<=>200;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+DROP TABLE t1;
+#
+# MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument
+#
+BEGIN NOT ATOMIC
+FOR i IN 1..64
+DO
+SELECT '-----', CONCAT('BIT(',i,')') AS Type;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a BIT(64))','64', i);
+INSERT IGNORE INTO t1 VALUES (0xFFFFFFFFFFFFFFFF);
+CREATE TABLE t2 AS SELECT
+a,
+FLOOR(a) AS cf,
+CEILING(a) AS cc,
+ROUND(a) AS cr,
+TRUNCATE(a,0) AS ct
+FROM t1;
+SHOW CREATE TABLE t2;
+SELECT CAST(a AS UNSIGNED) AS a, cf, cc, cr, ct FROM t2;
+DROP TABLE t2;
+DROP TABLE t1;
+END FOR;
+END;
+$$
+----- -----
+Type BIT(1)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(1) DEFAULT NULL,
+ `cf` int(1) unsigned DEFAULT NULL,
+ `cc` int(1) unsigned DEFAULT NULL,
+ `cr` int(1) unsigned DEFAULT NULL,
+ `ct` int(1) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1
+cf 1
+cc 1
+cr 1
+ct 1
+----- -----
+Type BIT(2)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(2) DEFAULT NULL,
+ `cf` int(1) unsigned DEFAULT NULL,
+ `cc` int(1) unsigned DEFAULT NULL,
+ `cr` int(1) unsigned DEFAULT NULL,
+ `ct` int(1) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 3
+cf 3
+cc 3
+cr 3
+ct 3
+----- -----
+Type BIT(3)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(3) DEFAULT NULL,
+ `cf` int(1) unsigned DEFAULT NULL,
+ `cc` int(1) unsigned DEFAULT NULL,
+ `cr` int(1) unsigned DEFAULT NULL,
+ `ct` int(1) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 7
+cf 7
+cc 7
+cr 7
+ct 7
+----- -----
+Type BIT(4)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(4) DEFAULT NULL,
+ `cf` int(2) unsigned DEFAULT NULL,
+ `cc` int(2) unsigned DEFAULT NULL,
+ `cr` int(2) unsigned DEFAULT NULL,
+ `ct` int(2) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 15
+cf 15
+cc 15
+cr 15
+ct 15
+----- -----
+Type BIT(5)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(5) DEFAULT NULL,
+ `cf` int(2) unsigned DEFAULT NULL,
+ `cc` int(2) unsigned DEFAULT NULL,
+ `cr` int(2) unsigned DEFAULT NULL,
+ `ct` int(2) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 31
+cf 31
+cc 31
+cr 31
+ct 31
+----- -----
+Type BIT(6)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(6) DEFAULT NULL,
+ `cf` int(2) unsigned DEFAULT NULL,
+ `cc` int(2) unsigned DEFAULT NULL,
+ `cr` int(2) unsigned DEFAULT NULL,
+ `ct` int(2) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 63
+cf 63
+cc 63
+cr 63
+ct 63
+----- -----
+Type BIT(7)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(7) DEFAULT NULL,
+ `cf` int(3) unsigned DEFAULT NULL,
+ `cc` int(3) unsigned DEFAULT NULL,
+ `cr` int(3) unsigned DEFAULT NULL,
+ `ct` int(3) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 127
+cf 127
+cc 127
+cr 127
+ct 127
+----- -----
+Type BIT(8)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(8) DEFAULT NULL,
+ `cf` int(3) unsigned DEFAULT NULL,
+ `cc` int(3) unsigned DEFAULT NULL,
+ `cr` int(3) unsigned DEFAULT NULL,
+ `ct` int(3) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 255
+cf 255
+cc 255
+cr 255
+ct 255
+----- -----
+Type BIT(9)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(9) DEFAULT NULL,
+ `cf` int(3) unsigned DEFAULT NULL,
+ `cc` int(3) unsigned DEFAULT NULL,
+ `cr` int(3) unsigned DEFAULT NULL,
+ `ct` int(3) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 511
+cf 511
+cc 511
+cr 511
+ct 511
+----- -----
+Type BIT(10)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(10) DEFAULT NULL,
+ `cf` int(4) unsigned DEFAULT NULL,
+ `cc` int(4) unsigned DEFAULT NULL,
+ `cr` int(4) unsigned DEFAULT NULL,
+ `ct` int(4) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1023
+cf 1023
+cc 1023
+cr 1023
+ct 1023
+----- -----
+Type BIT(11)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(11) DEFAULT NULL,
+ `cf` int(4) unsigned DEFAULT NULL,
+ `cc` int(4) unsigned DEFAULT NULL,
+ `cr` int(4) unsigned DEFAULT NULL,
+ `ct` int(4) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 2047
+cf 2047
+cc 2047
+cr 2047
+ct 2047
+----- -----
+Type BIT(12)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(12) DEFAULT NULL,
+ `cf` int(4) unsigned DEFAULT NULL,
+ `cc` int(4) unsigned DEFAULT NULL,
+ `cr` int(4) unsigned DEFAULT NULL,
+ `ct` int(4) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 4095
+cf 4095
+cc 4095
+cr 4095
+ct 4095
+----- -----
+Type BIT(13)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(13) DEFAULT NULL,
+ `cf` int(4) unsigned DEFAULT NULL,
+ `cc` int(4) unsigned DEFAULT NULL,
+ `cr` int(4) unsigned DEFAULT NULL,
+ `ct` int(4) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 8191
+cf 8191
+cc 8191
+cr 8191
+ct 8191
+----- -----
+Type BIT(14)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(14) DEFAULT NULL,
+ `cf` int(5) unsigned DEFAULT NULL,
+ `cc` int(5) unsigned DEFAULT NULL,
+ `cr` int(5) unsigned DEFAULT NULL,
+ `ct` int(5) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 16383
+cf 16383
+cc 16383
+cr 16383
+ct 16383
+----- -----
+Type BIT(15)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(15) DEFAULT NULL,
+ `cf` int(5) unsigned DEFAULT NULL,
+ `cc` int(5) unsigned DEFAULT NULL,
+ `cr` int(5) unsigned DEFAULT NULL,
+ `ct` int(5) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 32767
+cf 32767
+cc 32767
+cr 32767
+ct 32767
+----- -----
+Type BIT(16)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(16) DEFAULT NULL,
+ `cf` int(5) unsigned DEFAULT NULL,
+ `cc` int(5) unsigned DEFAULT NULL,
+ `cr` int(5) unsigned DEFAULT NULL,
+ `ct` int(5) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 65535
+cf 65535
+cc 65535
+cr 65535
+ct 65535
+----- -----
+Type BIT(17)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(17) DEFAULT NULL,
+ `cf` int(6) unsigned DEFAULT NULL,
+ `cc` int(6) unsigned DEFAULT NULL,
+ `cr` int(6) unsigned DEFAULT NULL,
+ `ct` int(6) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 131071
+cf 131071
+cc 131071
+cr 131071
+ct 131071
+----- -----
+Type BIT(18)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(18) DEFAULT NULL,
+ `cf` int(6) unsigned DEFAULT NULL,
+ `cc` int(6) unsigned DEFAULT NULL,
+ `cr` int(6) unsigned DEFAULT NULL,
+ `ct` int(6) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 262143
+cf 262143
+cc 262143
+cr 262143
+ct 262143
+----- -----
+Type BIT(19)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(19) DEFAULT NULL,
+ `cf` int(6) unsigned DEFAULT NULL,
+ `cc` int(6) unsigned DEFAULT NULL,
+ `cr` int(6) unsigned DEFAULT NULL,
+ `ct` int(6) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 524287
+cf 524287
+cc 524287
+cr 524287
+ct 524287
+----- -----
+Type BIT(20)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(20) DEFAULT NULL,
+ `cf` int(7) unsigned DEFAULT NULL,
+ `cc` int(7) unsigned DEFAULT NULL,
+ `cr` int(7) unsigned DEFAULT NULL,
+ `ct` int(7) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1048575
+cf 1048575
+cc 1048575
+cr 1048575
+ct 1048575
+----- -----
+Type BIT(21)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(21) DEFAULT NULL,
+ `cf` int(7) unsigned DEFAULT NULL,
+ `cc` int(7) unsigned DEFAULT NULL,
+ `cr` int(7) unsigned DEFAULT NULL,
+ `ct` int(7) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 2097151
+cf 2097151
+cc 2097151
+cr 2097151
+ct 2097151
+----- -----
+Type BIT(22)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(22) DEFAULT NULL,
+ `cf` int(7) unsigned DEFAULT NULL,
+ `cc` int(7) unsigned DEFAULT NULL,
+ `cr` int(7) unsigned DEFAULT NULL,
+ `ct` int(7) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 4194303
+cf 4194303
+cc 4194303
+cr 4194303
+ct 4194303
+----- -----
+Type BIT(23)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(23) DEFAULT NULL,
+ `cf` int(7) unsigned DEFAULT NULL,
+ `cc` int(7) unsigned DEFAULT NULL,
+ `cr` int(7) unsigned DEFAULT NULL,
+ `ct` int(7) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 8388607
+cf 8388607
+cc 8388607
+cr 8388607
+ct 8388607
+----- -----
+Type BIT(24)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(24) DEFAULT NULL,
+ `cf` int(8) unsigned DEFAULT NULL,
+ `cc` int(8) unsigned DEFAULT NULL,
+ `cr` int(8) unsigned DEFAULT NULL,
+ `ct` int(8) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 16777215
+cf 16777215
+cc 16777215
+cr 16777215
+ct 16777215
+----- -----
+Type BIT(25)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(25) DEFAULT NULL,
+ `cf` int(8) unsigned DEFAULT NULL,
+ `cc` int(8) unsigned DEFAULT NULL,
+ `cr` int(8) unsigned DEFAULT NULL,
+ `ct` int(8) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 33554431
+cf 33554431
+cc 33554431
+cr 33554431
+ct 33554431
+----- -----
+Type BIT(26)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(26) DEFAULT NULL,
+ `cf` int(8) unsigned DEFAULT NULL,
+ `cc` int(8) unsigned DEFAULT NULL,
+ `cr` int(8) unsigned DEFAULT NULL,
+ `ct` int(8) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 67108863
+cf 67108863
+cc 67108863
+cr 67108863
+ct 67108863
+----- -----
+Type BIT(27)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(27) DEFAULT NULL,
+ `cf` int(9) unsigned DEFAULT NULL,
+ `cc` int(9) unsigned DEFAULT NULL,
+ `cr` int(9) unsigned DEFAULT NULL,
+ `ct` int(9) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 134217727
+cf 134217727
+cc 134217727
+cr 134217727
+ct 134217727
+----- -----
+Type BIT(28)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(28) DEFAULT NULL,
+ `cf` int(9) unsigned DEFAULT NULL,
+ `cc` int(9) unsigned DEFAULT NULL,
+ `cr` int(9) unsigned DEFAULT NULL,
+ `ct` int(9) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 268435455
+cf 268435455
+cc 268435455
+cr 268435455
+ct 268435455
+----- -----
+Type BIT(29)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(29) DEFAULT NULL,
+ `cf` int(9) unsigned DEFAULT NULL,
+ `cc` int(9) unsigned DEFAULT NULL,
+ `cr` int(9) unsigned DEFAULT NULL,
+ `ct` int(9) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 536870911
+cf 536870911
+cc 536870911
+cr 536870911
+ct 536870911
+----- -----
+Type BIT(30)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(30) DEFAULT NULL,
+ `cf` int(10) unsigned DEFAULT NULL,
+ `cc` int(10) unsigned DEFAULT NULL,
+ `cr` int(10) unsigned DEFAULT NULL,
+ `ct` int(10) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1073741823
+cf 1073741823
+cc 1073741823
+cr 1073741823
+ct 1073741823
+----- -----
+Type BIT(31)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(31) DEFAULT NULL,
+ `cf` int(10) unsigned DEFAULT NULL,
+ `cc` int(10) unsigned DEFAULT NULL,
+ `cr` int(10) unsigned DEFAULT NULL,
+ `ct` int(10) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 2147483647
+cf 2147483647
+cc 2147483647
+cr 2147483647
+ct 2147483647
+----- -----
+Type BIT(32)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(32) DEFAULT NULL,
+ `cf` int(10) unsigned DEFAULT NULL,
+ `cc` int(10) unsigned DEFAULT NULL,
+ `cr` int(10) unsigned DEFAULT NULL,
+ `ct` int(10) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 4294967295
+cf 4294967295
+cc 4294967295
+cr 4294967295
+ct 4294967295
+----- -----
+Type BIT(33)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(33) DEFAULT NULL,
+ `cf` bigint(10) unsigned DEFAULT NULL,
+ `cc` bigint(10) unsigned DEFAULT NULL,
+ `cr` bigint(10) unsigned DEFAULT NULL,
+ `ct` bigint(10) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 8589934591
+cf 8589934591
+cc 8589934591
+cr 8589934591
+ct 8589934591
+----- -----
+Type BIT(34)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(34) DEFAULT NULL,
+ `cf` bigint(11) unsigned DEFAULT NULL,
+ `cc` bigint(11) unsigned DEFAULT NULL,
+ `cr` bigint(11) unsigned DEFAULT NULL,
+ `ct` bigint(11) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 17179869183
+cf 17179869183
+cc 17179869183
+cr 17179869183
+ct 17179869183
+----- -----
+Type BIT(35)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(35) DEFAULT NULL,
+ `cf` bigint(11) unsigned DEFAULT NULL,
+ `cc` bigint(11) unsigned DEFAULT NULL,
+ `cr` bigint(11) unsigned DEFAULT NULL,
+ `ct` bigint(11) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 34359738367
+cf 34359738367
+cc 34359738367
+cr 34359738367
+ct 34359738367
+----- -----
+Type BIT(36)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(36) DEFAULT NULL,
+ `cf` bigint(11) unsigned DEFAULT NULL,
+ `cc` bigint(11) unsigned DEFAULT NULL,
+ `cr` bigint(11) unsigned DEFAULT NULL,
+ `ct` bigint(11) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 68719476735
+cf 68719476735
+cc 68719476735
+cr 68719476735
+ct 68719476735
+----- -----
+Type BIT(37)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(37) DEFAULT NULL,
+ `cf` bigint(12) unsigned DEFAULT NULL,
+ `cc` bigint(12) unsigned DEFAULT NULL,
+ `cr` bigint(12) unsigned DEFAULT NULL,
+ `ct` bigint(12) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 137438953471
+cf 137438953471
+cc 137438953471
+cr 137438953471
+ct 137438953471
+----- -----
+Type BIT(38)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(38) DEFAULT NULL,
+ `cf` bigint(12) unsigned DEFAULT NULL,
+ `cc` bigint(12) unsigned DEFAULT NULL,
+ `cr` bigint(12) unsigned DEFAULT NULL,
+ `ct` bigint(12) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 274877906943
+cf 274877906943
+cc 274877906943
+cr 274877906943
+ct 274877906943
+----- -----
+Type BIT(39)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(39) DEFAULT NULL,
+ `cf` bigint(12) unsigned DEFAULT NULL,
+ `cc` bigint(12) unsigned DEFAULT NULL,
+ `cr` bigint(12) unsigned DEFAULT NULL,
+ `ct` bigint(12) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 549755813887
+cf 549755813887
+cc 549755813887
+cr 549755813887
+ct 549755813887
+----- -----
+Type BIT(40)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(40) DEFAULT NULL,
+ `cf` bigint(13) unsigned DEFAULT NULL,
+ `cc` bigint(13) unsigned DEFAULT NULL,
+ `cr` bigint(13) unsigned DEFAULT NULL,
+ `ct` bigint(13) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1099511627775
+cf 1099511627775
+cc 1099511627775
+cr 1099511627775
+ct 1099511627775
+----- -----
+Type BIT(41)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(41) DEFAULT NULL,
+ `cf` bigint(13) unsigned DEFAULT NULL,
+ `cc` bigint(13) unsigned DEFAULT NULL,
+ `cr` bigint(13) unsigned DEFAULT NULL,
+ `ct` bigint(13) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 2199023255551
+cf 2199023255551
+cc 2199023255551
+cr 2199023255551
+ct 2199023255551
+----- -----
+Type BIT(42)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(42) DEFAULT NULL,
+ `cf` bigint(13) unsigned DEFAULT NULL,
+ `cc` bigint(13) unsigned DEFAULT NULL,
+ `cr` bigint(13) unsigned DEFAULT NULL,
+ `ct` bigint(13) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 4398046511103
+cf 4398046511103
+cc 4398046511103
+cr 4398046511103
+ct 4398046511103
+----- -----
+Type BIT(43)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(43) DEFAULT NULL,
+ `cf` bigint(13) unsigned DEFAULT NULL,
+ `cc` bigint(13) unsigned DEFAULT NULL,
+ `cr` bigint(13) unsigned DEFAULT NULL,
+ `ct` bigint(13) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 8796093022207
+cf 8796093022207
+cc 8796093022207
+cr 8796093022207
+ct 8796093022207
+----- -----
+Type BIT(44)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(44) DEFAULT NULL,
+ `cf` bigint(14) unsigned DEFAULT NULL,
+ `cc` bigint(14) unsigned DEFAULT NULL,
+ `cr` bigint(14) unsigned DEFAULT NULL,
+ `ct` bigint(14) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 17592186044415
+cf 17592186044415
+cc 17592186044415
+cr 17592186044415
+ct 17592186044415
+----- -----
+Type BIT(45)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(45) DEFAULT NULL,
+ `cf` bigint(14) unsigned DEFAULT NULL,
+ `cc` bigint(14) unsigned DEFAULT NULL,
+ `cr` bigint(14) unsigned DEFAULT NULL,
+ `ct` bigint(14) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 35184372088831
+cf 35184372088831
+cc 35184372088831
+cr 35184372088831
+ct 35184372088831
+----- -----
+Type BIT(46)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(46) DEFAULT NULL,
+ `cf` bigint(14) unsigned DEFAULT NULL,
+ `cc` bigint(14) unsigned DEFAULT NULL,
+ `cr` bigint(14) unsigned DEFAULT NULL,
+ `ct` bigint(14) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 70368744177663
+cf 70368744177663
+cc 70368744177663
+cr 70368744177663
+ct 70368744177663
+----- -----
+Type BIT(47)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(47) DEFAULT NULL,
+ `cf` bigint(15) unsigned DEFAULT NULL,
+ `cc` bigint(15) unsigned DEFAULT NULL,
+ `cr` bigint(15) unsigned DEFAULT NULL,
+ `ct` bigint(15) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 140737488355327
+cf 140737488355327
+cc 140737488355327
+cr 140737488355327
+ct 140737488355327
+----- -----
+Type BIT(48)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(48) DEFAULT NULL,
+ `cf` bigint(15) unsigned DEFAULT NULL,
+ `cc` bigint(15) unsigned DEFAULT NULL,
+ `cr` bigint(15) unsigned DEFAULT NULL,
+ `ct` bigint(15) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 281474976710655
+cf 281474976710655
+cc 281474976710655
+cr 281474976710655
+ct 281474976710655
+----- -----
+Type BIT(49)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(49) DEFAULT NULL,
+ `cf` bigint(15) unsigned DEFAULT NULL,
+ `cc` bigint(15) unsigned DEFAULT NULL,
+ `cr` bigint(15) unsigned DEFAULT NULL,
+ `ct` bigint(15) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 562949953421311
+cf 562949953421311
+cc 562949953421311
+cr 562949953421311
+ct 562949953421311
+----- -----
+Type BIT(50)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(50) DEFAULT NULL,
+ `cf` bigint(16) unsigned DEFAULT NULL,
+ `cc` bigint(16) unsigned DEFAULT NULL,
+ `cr` bigint(16) unsigned DEFAULT NULL,
+ `ct` bigint(16) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1125899906842623
+cf 1125899906842623
+cc 1125899906842623
+cr 1125899906842623
+ct 1125899906842623
+----- -----
+Type BIT(51)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(51) DEFAULT NULL,
+ `cf` bigint(16) unsigned DEFAULT NULL,
+ `cc` bigint(16) unsigned DEFAULT NULL,
+ `cr` bigint(16) unsigned DEFAULT NULL,
+ `ct` bigint(16) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 2251799813685247
+cf 2251799813685247
+cc 2251799813685247
+cr 2251799813685247
+ct 2251799813685247
+----- -----
+Type BIT(52)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(52) DEFAULT NULL,
+ `cf` bigint(16) unsigned DEFAULT NULL,
+ `cc` bigint(16) unsigned DEFAULT NULL,
+ `cr` bigint(16) unsigned DEFAULT NULL,
+ `ct` bigint(16) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 4503599627370495
+cf 4503599627370495
+cc 4503599627370495
+cr 4503599627370495
+ct 4503599627370495
+----- -----
+Type BIT(53)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(53) DEFAULT NULL,
+ `cf` bigint(16) unsigned DEFAULT NULL,
+ `cc` bigint(16) unsigned DEFAULT NULL,
+ `cr` bigint(16) unsigned DEFAULT NULL,
+ `ct` bigint(16) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 9007199254740991
+cf 9007199254740991
+cc 9007199254740991
+cr 9007199254740991
+ct 9007199254740991
+----- -----
+Type BIT(54)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(54) DEFAULT NULL,
+ `cf` bigint(17) unsigned DEFAULT NULL,
+ `cc` bigint(17) unsigned DEFAULT NULL,
+ `cr` bigint(17) unsigned DEFAULT NULL,
+ `ct` bigint(17) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 18014398509481983
+cf 18014398509481983
+cc 18014398509481983
+cr 18014398509481983
+ct 18014398509481983
+----- -----
+Type BIT(55)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(55) DEFAULT NULL,
+ `cf` bigint(17) unsigned DEFAULT NULL,
+ `cc` bigint(17) unsigned DEFAULT NULL,
+ `cr` bigint(17) unsigned DEFAULT NULL,
+ `ct` bigint(17) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 36028797018963967
+cf 36028797018963967
+cc 36028797018963967
+cr 36028797018963967
+ct 36028797018963967
+----- -----
+Type BIT(56)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(56) DEFAULT NULL,
+ `cf` bigint(17) unsigned DEFAULT NULL,
+ `cc` bigint(17) unsigned DEFAULT NULL,
+ `cr` bigint(17) unsigned DEFAULT NULL,
+ `ct` bigint(17) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 72057594037927935
+cf 72057594037927935
+cc 72057594037927935
+cr 72057594037927935
+ct 72057594037927935
+----- -----
+Type BIT(57)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(57) DEFAULT NULL,
+ `cf` bigint(18) unsigned DEFAULT NULL,
+ `cc` bigint(18) unsigned DEFAULT NULL,
+ `cr` bigint(18) unsigned DEFAULT NULL,
+ `ct` bigint(18) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 144115188075855871
+cf 144115188075855871
+cc 144115188075855871
+cr 144115188075855871
+ct 144115188075855871
+----- -----
+Type BIT(58)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(58) DEFAULT NULL,
+ `cf` bigint(18) unsigned DEFAULT NULL,
+ `cc` bigint(18) unsigned DEFAULT NULL,
+ `cr` bigint(18) unsigned DEFAULT NULL,
+ `ct` bigint(18) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 288230376151711743
+cf 288230376151711743
+cc 288230376151711743
+cr 288230376151711743
+ct 288230376151711743
+----- -----
+Type BIT(59)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(59) DEFAULT NULL,
+ `cf` bigint(18) unsigned DEFAULT NULL,
+ `cc` bigint(18) unsigned DEFAULT NULL,
+ `cr` bigint(18) unsigned DEFAULT NULL,
+ `ct` bigint(18) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 576460752303423487
+cf 576460752303423487
+cc 576460752303423487
+cr 576460752303423487
+ct 576460752303423487
+----- -----
+Type BIT(60)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(60) DEFAULT NULL,
+ `cf` bigint(19) unsigned DEFAULT NULL,
+ `cc` bigint(19) unsigned DEFAULT NULL,
+ `cr` bigint(19) unsigned DEFAULT NULL,
+ `ct` bigint(19) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 1152921504606846975
+cf 1152921504606846975
+cc 1152921504606846975
+cr 1152921504606846975
+ct 1152921504606846975
+----- -----
+Type BIT(61)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(61) DEFAULT NULL,
+ `cf` bigint(19) unsigned DEFAULT NULL,
+ `cc` bigint(19) unsigned DEFAULT NULL,
+ `cr` bigint(19) unsigned DEFAULT NULL,
+ `ct` bigint(19) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 2305843009213693951
+cf 2305843009213693951
+cc 2305843009213693951
+cr 2305843009213693951
+ct 2305843009213693951
+----- -----
+Type BIT(62)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(62) DEFAULT NULL,
+ `cf` bigint(19) unsigned DEFAULT NULL,
+ `cc` bigint(19) unsigned DEFAULT NULL,
+ `cr` bigint(19) unsigned DEFAULT NULL,
+ `ct` bigint(19) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 4611686018427387903
+cf 4611686018427387903
+cc 4611686018427387903
+cr 4611686018427387903
+ct 4611686018427387903
+----- -----
+Type BIT(63)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(63) DEFAULT NULL,
+ `cf` bigint(19) unsigned DEFAULT NULL,
+ `cc` bigint(19) unsigned DEFAULT NULL,
+ `cr` bigint(19) unsigned DEFAULT NULL,
+ `ct` bigint(19) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 9223372036854775807
+cf 9223372036854775807
+cc 9223372036854775807
+cr 9223372036854775807
+ct 9223372036854775807
+----- -----
+Type BIT(64)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bit(64) DEFAULT NULL,
+ `cf` bigint(20) unsigned DEFAULT NULL,
+ `cc` bigint(20) unsigned DEFAULT NULL,
+ `cr` bigint(20) unsigned DEFAULT NULL,
+ `ct` bigint(20) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 18446744073709551615
+cf 18446744073709551615
+cc 18446744073709551615
+cr 18446744073709551615
+ct 18446744073709551615
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_bit.test b/mysql-test/main/type_bit.test
index 216995fc479..2353fc535ad 100644
--- a/mysql-test/main/type_bit.test
+++ b/mysql-test/main/type_bit.test
@@ -326,6 +326,7 @@ CREATE TABLE t1(a BIT(13), KEY(a));
--disable_warnings
INSERT IGNORE INTO t1(a) VALUES
(65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535);
+ANALYZE TABLE t1;
--enable_warnings
EXPLAIN SELECT 1 FROM t1 GROUP BY a;
@@ -492,3 +493,50 @@ DROP TABLE IF EXISTS t1;
--echo # End of 10.2 tests
--echo #
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-15759 Expect "Impossible WHERE" for indexed_int_column=out_of_range_int_constant
+--echo #
+
+CREATE TABLE t1 (a BIT(7), KEY(a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+EXPLAIN SELECT * FROM t1 WHERE a=200;
+EXPLAIN SELECT * FROM t1 WHERE a<=>200;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument
+--echo #
+
+--vertical_results
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ FOR i IN 1..64
+ DO
+ SELECT '-----', CONCAT('BIT(',i,')') AS Type;
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a BIT(64))','64', i);
+ INSERT IGNORE INTO t1 VALUES (0xFFFFFFFFFFFFFFFF);
+ CREATE TABLE t2 AS SELECT
+ a,
+ FLOOR(a) AS cf,
+ CEILING(a) AS cc,
+ ROUND(a) AS cr,
+ TRUNCATE(a,0) AS ct
+ FROM t1;
+ SHOW CREATE TABLE t2;
+ SELECT CAST(a AS UNSIGNED) AS a, cf, cc, cr, ct FROM t2;
+ DROP TABLE t2;
+ DROP TABLE t1;
+ END FOR;
+END;
+$$
+DELIMITER ;$$
+--horizontal_results
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_blob.result b/mysql-test/main/type_blob.result
index 38021807b55..a0a5f82a656 100644
--- a/mysql-test/main/type_blob.result
+++ b/mysql-test/main/type_blob.result
@@ -369,8 +369,6 @@ HELLO MY 1
a 1
hello 1
drop table t1;
-create table t1 (a text, unique (a(2100)));
-ERROR 42000: Specified key was too long; max key length is 1000 bytes
create table t1 (a text, key (a(2100)));
Warnings:
Note 1071 Specified key was too long; max key length is 1000 bytes
@@ -618,7 +616,8 @@ id txt
3 Ford
drop table t1;
create table t1 (id integer primary key auto_increment, txt text, index txt_index (txt (20)));
-insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL);
+insert into t1 (txt) values
+('Chevy'), ('Chevy '), (NULL), ('Honda'), ('Subaru'), ('Honda');
select * from t1 where txt='Chevy' or txt is NULL;
id txt
1 Chevy
@@ -626,7 +625,10 @@ id txt
3 NULL
explain select * from t1 where txt='Chevy' or txt is NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where
+1 SIMPLE t1 ALL txt_index NULL NULL NULL 6 Using where
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 3 Using where
select * from t1 where txt='Chevy ';
id txt
1 Chevy
@@ -648,7 +650,7 @@ select * from t1 where txt='Chevy' or txt='Chevy ' or txt='Ford';
id txt
1 Chevy
2 Chevy
-4 Ford
+7 Ford
select * from t1 where txt='Chevy' or txt='Chevy ';
id txt
1 Chevy
@@ -688,12 +690,18 @@ id txt
2 Chevy
select * from t1 where txt > 'Chevy';
id txt
-4 Ford
+4 Honda
+5 Subaru
+6 Honda
+7 Ford
select * from t1 where txt >= 'Chevy';
id txt
1 Chevy
2 Chevy
-4 Ford
+4 Honda
+5 Subaru
+6 Honda
+7 Ford
alter table t1 modify column txt blob;
explain select * from t1 where txt='Chevy' or txt is NULL;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1088,3 +1096,49 @@ drop table t1;
#
# End of 10.2 test
#
+#
+# Start of 10.4 test
+#
+#
+# MDEV-19317 TEXT column accepts too long literals as a default value
+#
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a TINYTEXT DEFAULT ?)' USING REPEAT('a', 255);
+INSERT INTO t1 VALUES ();
+SELECT LENGTH(a), LENGTH(DEFAULT(a)) FROM t1;
+LENGTH(a) LENGTH(DEFAULT(a))
+255 255
+DROP TABLE t1;
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a TINYTEXT DEFAULT ?)' USING REPEAT('a', 256);
+ERROR 42000: Invalid default value for 'a'
+CREATE OR REPLACE TABLE t1 (a TINYTEXT DEFAULT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
+ERROR 42000: Invalid default value for 'a'
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a TEXT DEFAULT ?)' USING REPEAT('a', 256);
+INSERT INTO t1 VALUES ();
+SELECT LENGTH(a), LENGTH(DEFAULT(a)) FROM t1;
+LENGTH(a) LENGTH(DEFAULT(a))
+256 256
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a TEXT DEFAULT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
+INSERT INTO t1 VALUES ();
+SELECT LENGTH(a), LENGTH(DEFAULT(a)) FROM t1;
+LENGTH(a) LENGTH(DEFAULT(a))
+256 256
+DROP TABLE t1;
+#
+# ASAN heap-use-after-free in my_hash_sort_bin or ER_KEY_NOT_FOUND
+# upon INSERT into table with long unique blob
+#
+SET @save_sql_mode=@@sql_mode;
+SET SQL_MODE='STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=innodb;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+CREATE TABLE t2 (c BIT, d BLOB, UNIQUE(d)) ENGINE=innodb;
+INSERT INTO t2 SELECT * FROM t1;
+ERROR 22001: Data too long for column 'c' at row 2
+select * from t2;
+c d
+DROP TABLE t1, t2;
+SET @@sql_mode=@save_sql_mode;
+#
+# End of 10.4 test
+#
diff --git a/mysql-test/main/type_blob.test b/mysql-test/main/type_blob.test
index f97ddc755ce..a9b044b5318 100644
--- a/mysql-test/main/type_blob.test
+++ b/mysql-test/main/type_blob.test
@@ -1,6 +1,7 @@
# This test can't be run with running server (--extern) as this uses
# load_file() on a file in the tree.
#
+--source include/have_innodb.inc
#
# Basic cleanup
@@ -131,8 +132,6 @@ select c,count(*) from t1 group by c;
select d,count(*) from t1 group by d;
drop table t1;
--- error 1071
-create table t1 (a text, unique (a(2100))); # should give an error
create table t1 (a text, key (a(2100))); # key is auto-truncated
show create table t1;
drop table t1;
@@ -360,9 +359,11 @@ select * from t1 where txt >= 'Chevy';
drop table t1;
create table t1 (id integer primary key auto_increment, txt text, index txt_index (txt (20)));
-insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL);
+insert into t1 (txt) values
+ ('Chevy'), ('Chevy '), (NULL), ('Honda'), ('Subaru'), ('Honda');
select * from t1 where txt='Chevy' or txt is NULL;
explain select * from t1 where txt='Chevy' or txt is NULL;
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL;
select * from t1 where txt='Chevy ';
select * from t1 where txt='Chevy ' or txt='Chevy';
select * from t1 where txt='Chevy' or txt='Chevy ';
@@ -703,3 +704,58 @@ drop table t1;
--echo #
--echo # End of 10.2 test
--echo #
+
+
+--echo #
+--echo # Start of 10.4 test
+--echo #
+
+--echo #
+--echo # MDEV-19317 TEXT column accepts too long literals as a default value
+--echo #
+
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a TINYTEXT DEFAULT ?)' USING REPEAT('a', 255);
+INSERT INTO t1 VALUES ();
+SELECT LENGTH(a), LENGTH(DEFAULT(a)) FROM t1;
+DROP TABLE t1;
+
+--error ER_INVALID_DEFAULT
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a TINYTEXT DEFAULT ?)' USING REPEAT('a', 256);
+
+--error ER_INVALID_DEFAULT
+CREATE OR REPLACE TABLE t1 (a TINYTEXT DEFAULT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
+
+
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a TEXT DEFAULT ?)' USING REPEAT('a', 256);
+INSERT INTO t1 VALUES ();
+SELECT LENGTH(a), LENGTH(DEFAULT(a)) FROM t1;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a TEXT DEFAULT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
+INSERT INTO t1 VALUES ();
+SELECT LENGTH(a), LENGTH(DEFAULT(a)) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # ASAN heap-use-after-free in my_hash_sort_bin or ER_KEY_NOT_FOUND
+--echo # upon INSERT into table with long unique blob
+--echo #
+
+# Note that this test worked with myisam as it caches blobs differently than
+# InnoDB
+
+SET @save_sql_mode=@@sql_mode;
+SET SQL_MODE='STRICT_ALL_TABLES';
+
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=innodb;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+CREATE TABLE t2 (c BIT, d BLOB, UNIQUE(d)) ENGINE=innodb;
+--error ER_DATA_TOO_LONG
+INSERT INTO t2 SELECT * FROM t1;
+select * from t2;
+DROP TABLE t1, t2;
+SET @@sql_mode=@save_sql_mode;
+
+--echo #
+--echo # End of 10.4 test
+--echo #
diff --git a/mysql-test/main/type_date.result b/mysql-test/main/type_date.result
index 78e17786461..1dee43a13d6 100644
--- a/mysql-test/main/type_date.result
+++ b/mysql-test/main/type_date.result
@@ -211,7 +211,7 @@ a
SET SQL_MODE=TRADITIONAL;
EXPLAIN SELECT * FROM t1 WHERE a = '0000-00-00';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref i i 4 const 1 Using index
+1 SIMPLE t1 ref i i 4 const 2 Using index
SELECT * FROM t1 WHERE a = '0000-00-00';
a
0000-00-00
@@ -240,7 +240,7 @@ a
SET SQL_MODE=TRADITIONAL;
EXPLAIN SELECT * FROM t1 WHERE a = '1000-00-00';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref i i 4 const 1 Using index
+1 SIMPLE t1 ref i i 4 const 2 Using index
SELECT * FROM t1 WHERE a = '1000-00-00';
a
1000-00-00
@@ -621,7 +621,7 @@ SELECT * FROM t1 WHERE LENGTH(a)=11+RAND() AND a=' garbage ';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Warning 1292 Incorrect datetime value: ' garbage '
+Warning 1292 Truncated incorrect datetime value: ' garbage '
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = DATE'0000-00-00' and <cache>(octet_length(DATE'0000-00-00')) = 11 + rand()
DROP TABLE t1;
CREATE TABLE t1 (a DATE);
@@ -935,7 +935,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1995.0000000 BETWEEN f AND '2012-12-12';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index f f 4 NULL 2 50.00 Using where; Using index
Warnings:
-Warning 1292 Incorrect datetime value: '1995.0000000'
+Warning 1292 Truncated incorrect datetime value: '1995.0000000'
Note 1003 select `test`.`t1`.`f` AS `f` from `test`.`t1` where '0000-00-00' between `test`.`t1`.`f` and <cache>('2012-12-12')
DROP TABLE t1;
#
@@ -977,3 +977,173 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+#
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('2001-01-01'),('2001-01-02'),('2001-01-03');
+# Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE'2001:01:01',a)<=>COALESCE(DATE'2001-01-01',a);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING DATE'2001-01-01',DATE'2001-01-01';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE''2001-01-01'',a)<=>COALESCE(?,a)' USING DATE'2001-01-01';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(DATE''2001-01-01'',a)' USING DATE'2001-01-01';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+# Equal values but of different data types (should not propagate)
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE'2001:01:01',a)<=>COALESCE(TIMESTAMP'2001-01-01 00:00:00',a);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(DATE'2001-01-01',`test`.`t1`.`a`) <=> coalesce(TIMESTAMP'2001-01-01 00:00:00',`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING DATE'2001-01-01',TIMESTAMP'2001-01-01 00:00:00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(DATE'2001-01-01'),`test`.`t1`.`a`) <=> coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:00'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE''2001-01-01'',a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(DATE'2001-01-01',`test`.`t1`.`a`) <=> coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:00'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(DATE''2001-01-01'',a)' USING TIMESTAMP'2001-01-01 00:00:00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:00'),`test`.`t1`.`a`) <=> coalesce(DATE'2001-01-01',`test`.`t1`.`a`)
+# Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE'2001-01-01',a)<=>COALESCE(DATE'2001-01-02',a);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(DATE'2001-01-01',`test`.`t1`.`a`) <=> coalesce(DATE'2001-01-02',`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING DATE'2001-01-01',DATE'2001-01-02';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(DATE'2001-01-01'),`test`.`t1`.`a`) <=> coalesce(<cache>(DATE'2001-01-02'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE''2001-01-01'',a)<=>COALESCE(?,a)' USING DATE'2001-01-02';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(DATE'2001-01-01',`test`.`t1`.`a`) <=> coalesce(<cache>(DATE'2001-01-02'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(DATE''2001-01-01'',a)' USING DATE'2001-01-02';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(DATE'2001-01-02'),`test`.`t1`.`a`) <=> coalesce(DATE'2001-01-01',`test`.`t1`.`a`)
+DROP TABLE t1;
+#
+# MDEV-15406 NO_ZERO_IN_DATE erroneously affects how CAST(AS DATE) warns about fractional digit truncation
+#
+SET sql_mode='';
+CREATE TABLE t1 (a DATE);
+SELECT CAST(20061108.01 AS DATE);
+CAST(20061108.01 AS DATE)
+2006-11-08
+Warnings:
+Note 1292 Truncated incorrect date value: '20061108.01'
+INSERT INTO t1 VALUES (20061108.01);
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+DROP TABLE t1;
+SET sql_mode=NO_ZERO_IN_DATE;
+SELECT CAST(20061108.01 AS DATE);
+CAST(20061108.01 AS DATE)
+2006-11-08
+Warnings:
+Note 1292 Truncated incorrect date value: '20061108.01'
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (20061108.01);
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning
+#
+SET sql_mode='';
+CREATE TABLE t1 (i1 date );
+CREATE TABLE t2 (i2 int unsigned );
+INSERT INTO t2 VALUES (0);
+INSERT INTO t1 SELECT * FROM t2;
+DROP TABLE t1,t2;
+SET sql_mode=DEFAULT;
+#
+# MDEV-19301 Assertion `!is_valid_datetime() || fraction_remainder(((item->decimals) < (6) ? (item->decimals) : (6))) == 0' failed in Datetime_truncation_not_needed::Datetime_truncation_not_needed
+#
+SELECT NULLIF(CAST(1012.5 AS DATE), 1);
+NULLIF(CAST(1012.5 AS DATE), 1)
+2000-10-12
+Warnings:
+Note 1292 Truncated incorrect date value: '1012.5'
+Warning 1292 Truncated incorrect datetime value: '1'
+Note 1292 Truncated incorrect date value: '1012.5'
+SELECT CAST(1012.5 AS DATE) * 1.0;
+CAST(1012.5 AS DATE) * 1.0
+20001012.0
+Warnings:
+Note 1292 Truncated incorrect date value: '1012.5'
+#
+# MDEV-23351 Rounding functions return wrong data types for DATE input
+#
+CREATE TABLE t1 (a date);
+CREATE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a),TRUNCATE(a,0) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `FLOOR(a)` int(8) unsigned DEFAULT NULL,
+ `CEIL(a)` int(8) unsigned DEFAULT NULL,
+ `ROUND(a)` int(8) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` int(8) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2,t1;
+#
+# MDEV-23388 Assertion `args[0]->decimals == 0' failed in Item_func_round::fix_arg_int
+#
+SELECT ROUND(GREATEST('1', CAST('2020-12-12' AS DATE)));
+ROUND(GREATEST('1', CAST('2020-12-12' AS DATE)))
+20201212
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '1'
+SELECT GREATEST('1', CAST('2020-12-12' AS DATE));
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def GREATEST('1', CAST('2020-12-12' AS DATE)) 10 10 10 Y 128 0 63
+GREATEST('1', CAST('2020-12-12' AS DATE))
+2020-12-12
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '1'
+CREATE TABLE t1 (c_date DATE NOT NULL, c_int INT NOT NULL);
+CREATE TABLE t2 AS SELECT
+GREATEST(c_date,c_date),
+GREATEST(c_date,c_int),
+GREATEST(c_int,c_date)
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `GREATEST(c_date,c_date)` date NOT NULL,
+ `GREATEST(c_date,c_int)` date DEFAULT NULL,
+ `GREATEST(c_int,c_date)` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_date.test b/mysql-test/main/type_date.test
index 44cb37f68f2..1136062bb88 100644
--- a/mysql-test/main/type_date.test
+++ b/mysql-test/main/type_date.test
@@ -679,3 +679,107 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+--echo #
+
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('2001-01-01'),('2001-01-02'),('2001-01-03');
+--echo # Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE'2001:01:01',a)<=>COALESCE(DATE'2001-01-01',a);
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING DATE'2001-01-01',DATE'2001-01-01';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE''2001-01-01'',a)<=>COALESCE(?,a)' USING DATE'2001-01-01';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(DATE''2001-01-01'',a)' USING DATE'2001-01-01';
+
+--echo # Equal values but of different data types (should not propagate)
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE'2001:01:01',a)<=>COALESCE(TIMESTAMP'2001-01-01 00:00:00',a);
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING DATE'2001-01-01',TIMESTAMP'2001-01-01 00:00:00';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE''2001-01-01'',a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(DATE''2001-01-01'',a)' USING TIMESTAMP'2001-01-01 00:00:00';
+
+--echo # Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE'2001-01-01',a)<=>COALESCE(DATE'2001-01-02',a);
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING DATE'2001-01-01',DATE'2001-01-02';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(DATE''2001-01-01'',a)<=>COALESCE(?,a)' USING DATE'2001-01-02';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(DATE''2001-01-01'',a)' USING DATE'2001-01-02';
+
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-15406 NO_ZERO_IN_DATE erroneously affects how CAST(AS DATE) warns about fractional digit truncation
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (a DATE);
+SELECT CAST(20061108.01 AS DATE);
+INSERT INTO t1 VALUES (20061108.01);
+DROP TABLE t1;
+
+SET sql_mode=NO_ZERO_IN_DATE;
+SELECT CAST(20061108.01 AS DATE);
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (20061108.01);
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo #
+--echo # MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning
+--echo #
+SET sql_mode='';
+CREATE TABLE t1 (i1 date );
+CREATE TABLE t2 (i2 int unsigned );
+INSERT INTO t2 VALUES (0);
+INSERT INTO t1 SELECT * FROM t2;
+DROP TABLE t1,t2;
+SET sql_mode=DEFAULT;
+
+
+--echo #
+--echo # MDEV-19301 Assertion `!is_valid_datetime() || fraction_remainder(((item->decimals) < (6) ? (item->decimals) : (6))) == 0' failed in Datetime_truncation_not_needed::Datetime_truncation_not_needed
+--echo #
+
+SELECT NULLIF(CAST(1012.5 AS DATE), 1);
+SELECT CAST(1012.5 AS DATE) * 1.0;
+
+--echo #
+--echo # MDEV-23351 Rounding functions return wrong data types for DATE input
+--echo #
+
+CREATE TABLE t1 (a date);
+CREATE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a),TRUNCATE(a,0) FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2,t1;
+
+--echo #
+--echo # MDEV-23388 Assertion `args[0]->decimals == 0' failed in Item_func_round::fix_arg_int
+--echo #
+
+SELECT ROUND(GREATEST('1', CAST('2020-12-12' AS DATE)));
+
+--disable_ps_protocol
+--enable_metadata
+SELECT GREATEST('1', CAST('2020-12-12' AS DATE));
+--disable_metadata
+--enable_ps_protocol
+
+CREATE TABLE t1 (c_date DATE NOT NULL, c_int INT NOT NULL);
+CREATE TABLE t2 AS SELECT
+ GREATEST(c_date,c_date),
+ GREATEST(c_date,c_int),
+ GREATEST(c_int,c_date)
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_date_round.result b/mysql-test/main/type_date_round.result
new file mode 100644
index 00000000000..0da78c6afe5
--- /dev/null
+++ b/mysql-test/main/type_date_round.result
@@ -0,0 +1,174 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# DATE: SET
+#
+CREATE TABLE t1 (a DATE, b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT a FROM t1;
+a
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+#
+# DATE: ALTER
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATE;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT a FROM t1;
+a
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATE;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATE;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+#
+# DATE: CAST
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATE) FROM t1;
+a CAST(a AS DATE)
+2000-12-31 23:59:59.9999 2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATE) FROM t1;
+a CAST(a AS DATE)
+2000-12-31 23:59:59.9999 2000-12-31
+2000-12-31 23:59:59.9999999 2000-12-31
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATE) FROM t1;
+a CAST(a AS DATE)
+20001231235959.9999000000 2000-12-31
+20001231235959.9999999000 2000-12-31
+DROP TABLE t1;
+#
+# Equal field propagation
+#
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (20010101);
+INSERT INTO t1 VALUES (20010102);
+SELECT * FROM t1 WHERE a= 20010101235959.9999999;
+a
+2001-01-02
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999';
+a
+2001-01-02
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+a
+2001-01-02
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+a
+2001-01-02
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = DATE'2001-01-02'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = DATE'2001-01-02'
+DROP TABLE t1;
+#
+# Comparing non-temporal to DATE
+#
+# Although conversion from non-temporal to DATE (e.g. on SET) does not round,
+# comparison between non-temporal to DATE is performed as DATETIME.
+# So rounding does happen here.
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE CONCAT(a)=DATE'2001-01-02';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+a
+20010101235959.9999999
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+a
+20010101235959.9999999
+DROP TABLE t1;
diff --git a/mysql-test/main/type_date_round.test b/mysql-test/main/type_date_round.test
new file mode 100644
index 00000000000..61e1d0a401c
--- /dev/null
+++ b/mysql-test/main/type_date_round.test
@@ -0,0 +1,113 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # DATE: SET
+--echo #
+
+CREATE TABLE t1 (a DATE, b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATE, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATE, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # DATE: ALTER
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATE;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATE;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATE;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # DATE: CAST
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATE) FROM t1;
+DROP TABLE t1;
+
+# This truncates microseconds but rounds nanoseconds (MySQL Bug #92475)
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATE) FROM t1;
+DROP TABLE t1;
+
+# This truncates microseconds but rounds nanoseconds (MySQL Bug #92475)
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATE) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Equal field propagation
+--echo #
+
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (20010101);
+INSERT INTO t1 VALUES (20010102);
+# DATE is compared to non-temporal as DATETIME
+# In the below queries nanoseconds should round to microseconds
+SELECT * FROM t1 WHERE a= 20010101235959.9999999;
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999';
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+DROP TABLE t1;
+
+
+--echo #
+--echo # Comparing non-temporal to DATE
+--echo #
+
+--echo # Although conversion from non-temporal to DATE (e.g. on SET) does not round,
+--echo # comparison between non-temporal to DATE is performed as DATETIME.
+--echo # So rounding does happen here.
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+SELECT * FROM t1 WHERE CONCAT(a)=DATE'2001-01-02';
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+DROP TABLE t1;
diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result
index a9de6172c30..bb3e86b6543 100644
--- a/mysql-test/main/type_datetime.result
+++ b/mysql-test/main/type_datetime.result
@@ -105,7 +105,7 @@ date numfacture expedition
0000-00-00 00:00:00 1212 0001-00-00 00:00:00
EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref expedition expedition 5 const 1
+1 SIMPLE t1 ref expedition expedition 5 const 2
drop table t1;
create table t1 (a datetime not null, b datetime not null);
insert into t1 values (now(), now());
@@ -365,7 +365,7 @@ greatest(cast('01-01-01' as date), '01-01-02') + 0
20010102
select least(cast('01-01-01' as datetime), '01-01-02') + 0;
least(cast('01-01-01' as datetime), '01-01-02') + 0
-20010101000000.000000
+20010101000000
select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed);
cast(least(cast('01-01-01' as datetime), '01-01-02') as signed)
20010101000000
@@ -403,7 +403,7 @@ if(@bug28261 = f1, '', @bug28261:= f1)
2001-01-01
2002-02-02
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
if(@bug28261 = f1, '', @bug28261:= f1)
2001-01-01
@@ -427,11 +427,11 @@ f1
2001-01-01 00:00:00
2002-02-02 00:00:00
Warnings:
-Warning 1292 Incorrect datetime value: '2002010'
+Warning 1292 Truncated incorrect datetime value: '2002010'
select * from t1 where f1 between 20020101 and 2007010100000;
f1
Warnings:
-Warning 1292 Incorrect datetime value: '2007010100000'
+Warning 1292 Truncated incorrect datetime value: '2007010100000'
drop table t1;
#
# Bug#27216: functions with parameters of different date types may
@@ -502,7 +502,7 @@ f1
45:44:44
15:44:44
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
drop table t1;
create table t1 (a tinyint);
insert into t1 values (), (), ();
@@ -579,18 +579,18 @@ CAST('NULL' AS DATE) < CAST('NULL' AS DATE) n9;
n1 n2 n3 n4 n5 n6 n7 n8 n9
0 0 1 1 1 0 1 0 0
Warnings:
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect datetime value: 'NULL'
End of 5.0 tests
set @org_mode=@@sql_mode;
create table t1 (da date default '1962-03-03 23:33:34', dt datetime default '1962-03-03');
@@ -921,7 +921,7 @@ CREATE TABLE t1 (a DATETIME);
INSERT INTO t1 VALUES ('0000-00-00 10:20:30');
SELECT a, LEAST(a,'2001-01-01 10:20:30') FROM t1;
a LEAST(a,'2001-01-01 10:20:30')
-0000-00-00 10:20:30 0000-00-00 10:20:30.000000
+0000-00-00 10:20:30 0000-00-00 10:20:30
DROP TABLE t1;
CREATE TABLE t1 (a DATETIME(6));
INSERT INTO t1 VALUES ('0000-00-00 00:00:00.000001');
@@ -1016,7 +1016,7 @@ SELECT * FROM t1 WHERE LENGTH(a)=30+RAND() AND a=' garbage ';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Warning 1292 Incorrect datetime value: ' garbage '
+Warning 1292 Truncated incorrect datetime value: ' garbage '
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-00-00 00:00:00' and <cache>(octet_length(TIMESTAMP'0000-00-00 00:00:00')) = 30 + rand()
DROP TABLE t1;
CREATE TABLE t1 (a DATETIME);;
@@ -1135,11 +1135,11 @@ INSERT INTO t1 VALUES ('00:00:00'),('00:01:00');
SELECT 1 FROM t1 WHERE 2016 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
1
Warnings:
-Warning 1292 Incorrect datetime value: '2016'
+Warning 1292 Truncated incorrect datetime value: '2016'
SELECT * FROM t1 WHERE 2016 > CAST(a AS DATETIME);
a
Warnings:
-Warning 1292 Incorrect datetime value: '2016'
+Warning 1292 Truncated incorrect datetime value: '2016'
SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
1
1
@@ -1342,7 +1342,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1995.0000000 BETWEEN f AND '2012-12-12';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index f f 6 NULL 2 50.00 Using where; Using index
Warnings:
-Warning 1292 Incorrect datetime value: '1995.0000000'
+Warning 1292 Truncated incorrect datetime value: '1995.0000000'
Note 1003 select `test`.`t1`.`f` AS `f` from `test`.`t1` where '0000-00-00 00:00:00.000000' between `test`.`t1`.`f` and <cache>('2012-12-12')
DROP TABLE t1;
#
@@ -1402,7 +1402,7 @@ INSERT INTO t1 VALUES ('2001-01-01 23:00:03', 'yes');
INSERT INTO t1 VALUES ('2001-01-01 23:00:04', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('2001-01-01 23:00:01','2001-01-01 23:00:02');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 6 NULL 5 Using index condition
+1 SIMPLE t1 range a a 6 NULL 4 Using index condition
SELECT * FROM t1 WHERE a NOT IN ('2001-01-01 23:00:01','2001-01-01 23:00:02');
a filler
2001-01-01 23:00:03 yes
@@ -1441,7 +1441,7 @@ INSERT INTO t1 VALUES ('2001-01-01 23:00:03.1', 'yes');
INSERT INTO t1 VALUES ('2001-01-01 23:00:04.1', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('2001-01-01 23:00:01.1','2001-01-01 23:00:02.1');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 7 NULL 5 Using index condition
+1 SIMPLE t1 range a a 7 NULL 4 Using index condition
SELECT * FROM t1 WHERE a NOT IN ('2001-01-01 23:00:01.1','2001-01-01 23:00:02.1');
a filler
2001-01-01 23:00:03.1 yes
@@ -1450,3 +1450,138 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+#
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2001-01-02 00:00:00'),('2001-01-03 00:00:00');
+# Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP'2001:01:01 00:00:00',a)<=>COALESCE(TIMESTAMP'2001-01-01 00:00:00',a);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00',TIMESTAMP'2001-01-01 00:00:00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)' USING TIMESTAMP'2001-01-01 00:00:00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+# Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP'2001:01:01 00:00:00',a)<=>COALESCE(TIMESTAMP'2001-01-01 00:00:01',a);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(TIMESTAMP'2001-01-01 00:00:00',`test`.`t1`.`a`) <=> coalesce(TIMESTAMP'2001-01-01 00:00:01',`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00',TIMESTAMP'2001-01-01 00:00:01';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:00'),`test`.`t1`.`a`) <=> coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:01'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:01';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(TIMESTAMP'2001-01-01 00:00:00',`test`.`t1`.`a`) <=> coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:01'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)' USING TIMESTAMP'2001-01-01 00:00:01';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:01'),`test`.`t1`.`a`) <=> coalesce(TIMESTAMP'2001-01-01 00:00:00',`test`.`t1`.`a`)
+DROP TABLE t1;
+#
+# MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+#
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2001-01-01 00:00:01'),('2001-01-01 00:00:02');
+Equal values
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a));
+a
+2001-01-01 00:00:00
+2001-01-01 00:00:01
+2001-01-01 00:00:02
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.0';
+a
+2001-01-01 00:00:00
+2001-01-01 00:00:01
+2001-01-01 00:00:02
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.0';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIME'00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:00.0'),`test`.`t1`.`a`))
+Values with different formats
+SELECT LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a)),LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.00',a)) FROM t1;
+LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a)) LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.00',a))
+21 22
+21 22
+21 22
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.00',a));
+a
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.00',a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIMESTAMP'2001-01-01 00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(TIMESTAMP'2001-01-01 00:00:00.00',`test`.`t1`.`a`))
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.00';
+a
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIME'00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:00.00'),`test`.`t1`.`a`))
+DROP TABLE t1;
+#
+# MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning
+#
+CREATE TABLE t1 (b BIT(20));
+CREATE TABLE t2 (t DATETIME);
+INSERT IGNORE INTO t1 VALUES (b'000001001100000');
+INSERT INTO t2 SELECT * FROM t1;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED);
+DROP TABLE t1;
+#
+# MDEV-17563 Different results using table or view when comparing values of time type
+#
+CREATE TABLE t1 (pk int, x1 datetime, x2 varchar(1));
+INSERT INTO t1 VALUES (17,'2001-01-01 09:16:37','');
+INSERT INTO t1 VALUES (18,'2001-01-01 09:16:37','k');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT pk FROM t1 WHERE x1 >x2;
+pk
+17
+18
+Warnings:
+Warning 1292 Truncated incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: 'k'
+SELECT pk FROM v1 WHERE x1 >x2;
+pk
+17
+18
+Warnings:
+Warning 1292 Truncated incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: 'k'
+DROP VIEW v1;
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test
index 240a96a6208..4fddf1c1a74 100644
--- a/mysql-test/main/type_datetime.test
+++ b/mysql-test/main/type_datetime.test
@@ -953,3 +953,84 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+--echo #
+
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2001-01-02 00:00:00'),('2001-01-03 00:00:00');
+--echo # Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP'2001:01:01 00:00:00',a)<=>COALESCE(TIMESTAMP'2001-01-01 00:00:00',a);
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00',TIMESTAMP'2001-01-01 00:00:00';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)' USING TIMESTAMP'2001-01-01 00:00:00';
+
+--echo # Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP'2001:01:01 00:00:00',a)<=>COALESCE(TIMESTAMP'2001-01-01 00:00:01',a);
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:00',TIMESTAMP'2001-01-01 00:00:01';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)<=>COALESCE(?,a)' USING TIMESTAMP'2001-01-01 00:00:01';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIMESTAMP''2001-01-01 00:00:00'',a)' USING TIMESTAMP'2001-01-01 00:00:01';
+
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+--echo #
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2001-01-01 00:00:01'),('2001-01-01 00:00:02');
+
+--echo Equal values
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a));
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a));
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.0';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.0';
+
+--echo Values with different formats
+SELECT LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a)),LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.00',a)) FROM t1;
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.00',a));
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.0',a))<=>LENGTH(COALESCE(TIMESTAMP'2001-01-01 00:00:00.00',a));
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.00';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIMESTAMP'2001-01-01 00:00:00.00';
+
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning
+--echo #
+
+CREATE TABLE t1 (b BIT(20));
+CREATE TABLE t2 (t DATETIME);
+INSERT IGNORE INTO t1 VALUES (b'000001001100000');
+INSERT INTO t2 SELECT * FROM t1;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED);
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17563 Different results using table or view when comparing values of time type
+--echo #
+
+CREATE TABLE t1 (pk int, x1 datetime, x2 varchar(1));
+INSERT INTO t1 VALUES (17,'2001-01-01 09:16:37','');
+INSERT INTO t1 VALUES (18,'2001-01-01 09:16:37','k');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT pk FROM t1 WHERE x1 >x2;
+SELECT pk FROM v1 WHERE x1 >x2;
+DROP VIEW v1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_datetime_hires.result b/mysql-test/main/type_datetime_hires.result
index 38e2c2a5ac8..02adadd16c5 100644
--- a/mysql-test/main/type_datetime_hires.result
+++ b/mysql-test/main/type_datetime_hires.result
@@ -17,8 +17,8 @@ a
2010-12-11 01:02:03.456
2010-12-11 03:04:05.789
2010-12-11 15:47:11.123
-select truncate(a, 6) from t1;
-truncate(a, 6)
+select cast(a AS double(30,6)) from t1;
+cast(a AS double(30,6))
0.000000
20101211002003.120000
20101211010203.457031
@@ -352,3 +352,718 @@ NULL
978307200.0000
DROP TABLE t1;
SET @@time_zone=DEFAULT;
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+#
+CREATE TABLE t1 (a1 DATETIME(6), a2 DATETIME(6) NOT NULL);
+CREATE TABLE t2 AS SELECT
+ROUND(a1) AS r1,
+ROUND(a2) AS r2,
+TRUNCATE(a1,0) AS t1,
+TRUNCATE(a2,0) AS t2
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `r1` datetime DEFAULT NULL,
+ `r2` datetime DEFAULT NULL,
+ `t1` datetime DEFAULT NULL,
+ `t2` datetime NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES
+('0000-00-00 00:00:00.999999'),
+('0000-00-00 23:59:59.999999'),
+('0000-00-01 00:00:00.999999'),
+('0000-00-01 23:59:59.999999'),
+('0000-00-31 23:59:59.999999'),
+('0000-01-01 00:00:00.999999'),
+('0000-01-01 23:59:59.999999'),
+('0000-01-31 23:59:59.999999'),
+('0000-02-28 23:59:59.999999'),
+('0000-12-31 23:59:59.999999'),
+('0001-01-01 00:00:00.999999'),
+('0001-02-28 23:59:59.999999'),
+('0001-12-31 23:59:59.999999'),
+('0004-02-28 23:59:59.999999'),
+('0004-02-29 23:59:59.999999'),
+('2000-02-29 23:59:59.999999'),
+('2000-12-31 23:59:59.999999'),
+('9999-12-31 23:59:59.999999');
+SELECT a, TRUNCATE(a,0) FROM t1;
+a TRUNCATE(a,0)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59
+SELECT a, TRUNCATE(a,1) FROM t1;
+a TRUNCATE(a,1)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.9
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.9
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.9
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.9
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.9
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.9
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.9
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.9
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.9
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.9
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.9
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.9
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.9
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.9
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.9
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.9
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.9
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.9
+SELECT a, TRUNCATE(a,2) FROM t1;
+a TRUNCATE(a,2)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.99
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.99
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.99
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.99
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.99
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.99
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.99
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.99
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.99
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.99
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.99
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.99
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.99
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.99
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.99
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.99
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.99
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.99
+SELECT a, TRUNCATE(a,3) FROM t1;
+a TRUNCATE(a,3)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.999
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.999
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.999
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.999
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.999
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.999
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.999
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.999
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.999
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.999
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.999
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.999
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.999
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.999
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999
+SELECT a, TRUNCATE(a,4) FROM t1;
+a TRUNCATE(a,4)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.9999
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.9999
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.9999
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.9999
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.9999
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.9999
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.9999
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.9999
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.9999
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.9999
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.9999
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.9999
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.9999
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.9999
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.9999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.9999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.9999
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.9999
+SELECT a, TRUNCATE(a,5) FROM t1;
+a TRUNCATE(a,5)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.99999
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.99999
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.99999
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.99999
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.99999
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.99999
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.99999
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.99999
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.99999
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.99999
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.99999
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.99999
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.99999
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.99999
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.99999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.99999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.99999
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.99999
+SELECT a, TRUNCATE(a,6) FROM t1;
+a TRUNCATE(a,6)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.999999
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.999999
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.999999
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.999999
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.999999
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.999999
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.999999
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.999999
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.999999
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.999999
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.999999
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.999999
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.999999
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.999999
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999999
+SELECT a, TRUNCATE(a,7) FROM t1;
+a TRUNCATE(a,7)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.999999
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.999999
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.999999
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.999999
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.999999
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.999999
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.999999
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.999999
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.999999
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.999999
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.999999
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.999999
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.999999
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.999999
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999999
+SELECT a, TRUNCATE(a,-1) FROM t1;
+a TRUNCATE(a,-1)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59
+SELECT a, TRUNCATE(a,-6) FROM t1;
+a TRUNCATE(a,-6)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59
+SELECT a, ROUND(a) FROM t1;
+a ROUND(a)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,0) FROM t1;
+a ROUND(a,0)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,1) FROM t1;
+a ROUND(a,1)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01.0
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01.0
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01.0
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01.0
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00.0
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00.0
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00.0
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00.0
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.0
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.0
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.9
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,2) FROM t1;
+a ROUND(a,2)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01.00
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01.00
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01.00
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01.00
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00.00
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00.00
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00.00
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00.00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.00
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.99
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,3) FROM t1;
+a ROUND(a,3)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01.000
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01.000
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01.000
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01.000
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00.000
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00.000
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00.000
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00.000
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.000
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.000
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,4) FROM t1;
+a ROUND(a,4)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01.0000
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01.0000
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01.0000
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01.0000
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00.0000
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00.0000
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00.0000
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00.0000
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.0000
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.0000
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.9999
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,5) FROM t1;
+a ROUND(a,5)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01.00000
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01.00000
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01.00000
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01.00000
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00.00000
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00.00000
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00.00000
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00.00000
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.00000
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.00000
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.99999
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,6) FROM t1;
+a ROUND(a,6)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.999999
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.999999
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.999999
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.999999
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.999999
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.999999
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.999999
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.999999
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.999999
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.999999
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.999999
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.999999
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.999999
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.999999
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999999
+SELECT a, ROUND(a,7) FROM t1;
+a ROUND(a,7)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:00.999999
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59.999999
+0000-00-01 00:00:00.999999 0000-00-01 00:00:00.999999
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59.999999
+0000-00-31 23:59:59.999999 0000-00-31 23:59:59.999999
+0000-01-01 00:00:00.999999 0000-01-01 00:00:00.999999
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59.999999
+0000-01-31 23:59:59.999999 0000-01-31 23:59:59.999999
+0000-02-28 23:59:59.999999 0000-02-28 23:59:59.999999
+0000-12-31 23:59:59.999999 0000-12-31 23:59:59.999999
+0001-01-01 00:00:00.999999 0001-01-01 00:00:00.999999
+0001-02-28 23:59:59.999999 0001-02-28 23:59:59.999999
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59.999999
+0004-02-28 23:59:59.999999 0004-02-28 23:59:59.999999
+0004-02-29 23:59:59.999999 0004-02-29 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999999
+SELECT a, ROUND(a,-1) FROM t1;
+a ROUND(a,-1)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+SELECT a, ROUND(a,-6) FROM t1;
+a ROUND(a,-6)
+0000-00-00 00:00:00.999999 0000-00-00 00:00:01
+0000-00-00 23:59:59.999999 NULL
+0000-00-01 00:00:00.999999 0000-00-01 00:00:01
+0000-00-01 23:59:59.999999 NULL
+0000-00-31 23:59:59.999999 NULL
+0000-01-01 00:00:00.999999 0000-01-01 00:00:01
+0000-01-01 23:59:59.999999 NULL
+0000-01-31 23:59:59.999999 NULL
+0000-02-28 23:59:59.999999 NULL
+0000-12-31 23:59:59.999999 NULL
+0001-01-01 00:00:00.999999 0001-01-01 00:00:01
+0001-02-28 23:59:59.999999 0001-03-01 00:00:00
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00
+0004-02-28 23:59:59.999999 0004-02-29 00:00:00
+0004-02-29 23:59:59.999999 0004-03-01 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-31' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-02-28' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-12-31' for function round(datetime)
+DROP TABLE t1;
+#
+# MDEV-20984 Possibly wrong result or Assertion `args[0]->type_handler()->mysql_timestamp_type() == MYSQL_TIMESTAMP_DATETIME' failed in Item_func_round::date_op
+#
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('1979-01-03 10:33:32'),('2012-12-12 12:12:12');
+SELECT ROUND(a) AS f FROM t1 GROUP BY a WITH ROLLUP;
+f
+1979-01-03 10:33:32
+2012-12-12 12:12:12
+NULL
+DROP TABLE t1;
+#
+# MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE()
+#
+CREATE TABLE t1 AS SELECT
+FLOOR(TIMESTAMP'2001-01-01 00:00:00.999999'),
+CEILING(TIMESTAMP'2001-01-01 00:00:00.999999');
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `FLOOR(TIMESTAMP'2001-01-01 00:00:00.999999')` datetime DEFAULT NULL,
+ `CEILING(TIMESTAMP'2001-01-01 00:00:00.999999')` datetime DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.1');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.0');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.1');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.0');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.1');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.0');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.1');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.0');
+CREATE FUNCTION FLOOR_SP(a DATETIME(6)) RETURNS DATETIME
+BEGIN
+RETURN
+CASE
+WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a
+ELSE TRUNCATE(a,0)
+END;
+END;
+$$
+CREATE FUNCTION CEILING_SP(a DATETIME(6)) RETURNS DATETIME
+BEGIN
+RETURN
+CASE
+WHEN TRUNCATE(a,0)=TIMESTAMP'9999-12-31 23:59:59' THEN a
+WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a
+ELSE TRUNCATE(a,0)+INTERVAL 1 SECOND
+END;
+END;
+$$
+SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a;
+a FLOOR(a) FLOOR_SP(a) FLOOR(a)=FLOOR_SP(a)
+0001-12-31 23:59:59.000000 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.100000 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.900000 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.990000 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.999000 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.999900 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.999990 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.999999 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0999-12-31 23:59:59.000000 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.100000 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.900000 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.990000 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.999000 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.999900 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.999990 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.999999 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+9999-12-30 23:59:59.000000 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.100000 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.900000 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.990000 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.999000 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.999900 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.999990 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.999999 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-31 23:59:59.000000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.100000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.900000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.990000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999900 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999990 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a;
+a CEILING(a) CEILING_SP(a) CEILING(a)=CEILING_SP(a)
+0001-12-31 23:59:59.000000 0001-12-31 23:59:59 0001-12-31 23:59:59 1
+0001-12-31 23:59:59.100000 0002-01-01 00:00:00 0002-01-01 00:00:00 1
+0001-12-31 23:59:59.900000 0002-01-01 00:00:00 0002-01-01 00:00:00 1
+0001-12-31 23:59:59.990000 0002-01-01 00:00:00 0002-01-01 00:00:00 1
+0001-12-31 23:59:59.999000 0002-01-01 00:00:00 0002-01-01 00:00:00 1
+0001-12-31 23:59:59.999900 0002-01-01 00:00:00 0002-01-01 00:00:00 1
+0001-12-31 23:59:59.999990 0002-01-01 00:00:00 0002-01-01 00:00:00 1
+0001-12-31 23:59:59.999999 0002-01-01 00:00:00 0002-01-01 00:00:00 1
+0999-12-31 23:59:59.000000 0999-12-31 23:59:59 0999-12-31 23:59:59 1
+0999-12-31 23:59:59.100000 1000-01-01 00:00:00 1000-01-01 00:00:00 1
+0999-12-31 23:59:59.900000 1000-01-01 00:00:00 1000-01-01 00:00:00 1
+0999-12-31 23:59:59.990000 1000-01-01 00:00:00 1000-01-01 00:00:00 1
+0999-12-31 23:59:59.999000 1000-01-01 00:00:00 1000-01-01 00:00:00 1
+0999-12-31 23:59:59.999900 1000-01-01 00:00:00 1000-01-01 00:00:00 1
+0999-12-31 23:59:59.999990 1000-01-01 00:00:00 1000-01-01 00:00:00 1
+0999-12-31 23:59:59.999999 1000-01-01 00:00:00 1000-01-01 00:00:00 1
+9999-12-30 23:59:59.000000 9999-12-30 23:59:59 9999-12-30 23:59:59 1
+9999-12-30 23:59:59.100000 9999-12-31 00:00:00 9999-12-31 00:00:00 1
+9999-12-30 23:59:59.900000 9999-12-31 00:00:00 9999-12-31 00:00:00 1
+9999-12-30 23:59:59.990000 9999-12-31 00:00:00 9999-12-31 00:00:00 1
+9999-12-30 23:59:59.999000 9999-12-31 00:00:00 9999-12-31 00:00:00 1
+9999-12-30 23:59:59.999900 9999-12-31 00:00:00 9999-12-31 00:00:00 1
+9999-12-30 23:59:59.999990 9999-12-31 00:00:00 9999-12-31 00:00:00 1
+9999-12-30 23:59:59.999999 9999-12-31 00:00:00 9999-12-31 00:00:00 1
+9999-12-31 23:59:59.000000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.100000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.900000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.990000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999000 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999900 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999990 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+9999-12-31 23:59:59.999999 9999-12-31 23:59:59 9999-12-31 23:59:59 1
+DROP FUNCTION FLOOR_SP;
+DROP FUNCTION CEILING_SP;
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('0000-00-00 23:59:59.999999');
+INSERT INTO t1 VALUES ('0000-00-01 23:59:59.999999');
+INSERT INTO t1 VALUES ('0000-01-01 23:59:59.999999');
+INSERT INTO t1 VALUES ('0001-00-00 23:59:59.999999');
+SELECT a, FLOOR(a), CEILING(a) FROM t1;
+a FLOOR(a) CEILING(a)
+0000-00-00 23:59:59.999999 0000-00-00 23:59:59 NULL
+0000-00-01 23:59:59.999999 0000-00-01 23:59:59 NULL
+0000-01-01 23:59:59.999999 0000-01-01 23:59:59 NULL
+0001-00-00 23:59:59.999999 0001-00-00 23:59:59 NULL
+Warnings:
+Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime)
+Warning 1411 Incorrect date value: '0001-00-00' for function round(datetime)
+DROP TABLE t1;
+SET sql_mode=ALLOW_INVALID_DATES;
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('2001-02-28 23:59:59.999999');
+INSERT INTO t1 VALUES ('2001-02-29 23:59:59.999999');
+SELECT a, FLOOR(a), CEILING(a) FROM t1;
+a FLOOR(a) CEILING(a)
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59 2001-03-01 00:00:00
+2001-02-29 23:59:59.999999 2001-02-29 23:59:59 NULL
+Warnings:
+Warning 1411 Incorrect date value: '2001-02-29' for function round(datetime)
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_datetime_hires.test b/mysql-test/main/type_datetime_hires.test
index d220a4601eb..6476d7fb182 100644
--- a/mysql-test/main/type_datetime_hires.test
+++ b/mysql-test/main/type_datetime_hires.test
@@ -79,3 +79,181 @@ INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2000-00-00 00:00:00');
SELECT UNIX_TIMESTAMP(a) FROM t1 ORDER BY 1;
DROP TABLE t1;
SET @@time_zone=DEFAULT;
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+--echo #
+
+CREATE TABLE t1 (a1 DATETIME(6), a2 DATETIME(6) NOT NULL);
+CREATE TABLE t2 AS SELECT
+ ROUND(a1) AS r1,
+ ROUND(a2) AS r2,
+ TRUNCATE(a1,0) AS t1,
+ TRUNCATE(a2,0) AS t2
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES
+('0000-00-00 00:00:00.999999'),
+('0000-00-00 23:59:59.999999'),
+('0000-00-01 00:00:00.999999'),
+('0000-00-01 23:59:59.999999'),
+('0000-00-31 23:59:59.999999'),
+('0000-01-01 00:00:00.999999'),
+('0000-01-01 23:59:59.999999'),
+('0000-01-31 23:59:59.999999'),
+('0000-02-28 23:59:59.999999'),
+('0000-12-31 23:59:59.999999'),
+('0001-01-01 00:00:00.999999'),
+('0001-02-28 23:59:59.999999'),
+('0001-12-31 23:59:59.999999'),
+('0004-02-28 23:59:59.999999'),
+('0004-02-29 23:59:59.999999'),
+('2000-02-29 23:59:59.999999'),
+('2000-12-31 23:59:59.999999'),
+('9999-12-31 23:59:59.999999');
+SELECT a, TRUNCATE(a,0) FROM t1;
+SELECT a, TRUNCATE(a,1) FROM t1;
+SELECT a, TRUNCATE(a,2) FROM t1;
+SELECT a, TRUNCATE(a,3) FROM t1;
+SELECT a, TRUNCATE(a,4) FROM t1;
+SELECT a, TRUNCATE(a,5) FROM t1;
+SELECT a, TRUNCATE(a,6) FROM t1;
+SELECT a, TRUNCATE(a,7) FROM t1;
+SELECT a, TRUNCATE(a,-1) FROM t1;
+SELECT a, TRUNCATE(a,-6) FROM t1;
+
+SELECT a, ROUND(a) FROM t1;
+SELECT a, ROUND(a,0) FROM t1;
+SELECT a, ROUND(a,1) FROM t1;
+SELECT a, ROUND(a,2) FROM t1;
+SELECT a, ROUND(a,3) FROM t1;
+SELECT a, ROUND(a,4) FROM t1;
+SELECT a, ROUND(a,5) FROM t1;
+SELECT a, ROUND(a,6) FROM t1;
+SELECT a, ROUND(a,7) FROM t1;
+SELECT a, ROUND(a,-1) FROM t1;
+SELECT a, ROUND(a,-6) FROM t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20984 Possibly wrong result or Assertion `args[0]->type_handler()->mysql_timestamp_type() == MYSQL_TIMESTAMP_DATETIME' failed in Item_func_round::date_op
+--echo #
+
+CREATE TABLE t1 (a DATETIME);
+INSERT INTO t1 VALUES ('1979-01-03 10:33:32'),('2012-12-12 12:12:12');
+SELECT ROUND(a) AS f FROM t1 GROUP BY a WITH ROLLUP;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE()
+--echo #
+
+CREATE TABLE t1 AS SELECT
+ FLOOR(TIMESTAMP'2001-01-01 00:00:00.999999'),
+ CEILING(TIMESTAMP'2001-01-01 00:00:00.999999');
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(6));
+
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.1');
+INSERT INTO t1 VALUES ('9999-12-31 23:59:59.0');
+
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.1');
+INSERT INTO t1 VALUES ('9999-12-30 23:59:59.0');
+
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.1');
+INSERT INTO t1 VALUES ('0999-12-31 23:59:59.0');
+
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.1');
+INSERT INTO t1 VALUES ('0001-12-31 23:59:59.0');
+
+
+DELIMITER $$;
+CREATE FUNCTION FLOOR_SP(a DATETIME(6)) RETURNS DATETIME
+BEGIN
+ RETURN
+ CASE
+ WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a
+ ELSE TRUNCATE(a,0)
+ END;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+CREATE FUNCTION CEILING_SP(a DATETIME(6)) RETURNS DATETIME
+BEGIN
+ RETURN
+ CASE
+ WHEN TRUNCATE(a,0)=TIMESTAMP'9999-12-31 23:59:59' THEN a
+ WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a
+ ELSE TRUNCATE(a,0)+INTERVAL 1 SECOND
+ END;
+END;
+$$
+DELIMITER ;$$
+
+SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a;
+SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a;
+
+DROP FUNCTION FLOOR_SP;
+DROP FUNCTION CEILING_SP;
+
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('0000-00-00 23:59:59.999999');
+INSERT INTO t1 VALUES ('0000-00-01 23:59:59.999999');
+INSERT INTO t1 VALUES ('0000-01-01 23:59:59.999999');
+INSERT INTO t1 VALUES ('0001-00-00 23:59:59.999999');
+SELECT a, FLOOR(a), CEILING(a) FROM t1;
+DROP TABLE t1;
+
+SET sql_mode=ALLOW_INVALID_DATES;
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('2001-02-28 23:59:59.999999');
+INSERT INTO t1 VALUES ('2001-02-29 23:59:59.999999');
+SELECT a, FLOOR(a), CEILING(a) FROM t1;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_datetime_round.result b/mysql-test/main/type_datetime_round.result
new file mode 100644
index 00000000000..c6584223268
--- /dev/null
+++ b/mysql-test/main/type_datetime_round.result
@@ -0,0 +1,205 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# DATETIME: SET
+#
+CREATE TABLE t1 (a DATETIME(3), b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# DATETIME: ALTER
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# Corner case:
+# ALTER DATETIME to a shorter DATETIME
+# All values round, maximum possible value truncates.
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a DATETIME(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '9999-12-30 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '9999-12-31 22:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '9999-12-31 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (3, '9999-12-31 23:59:59.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a DATETIME(5);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 4
+SELECT * FROM t1;
+ID a comment
+0 9999-12-30 23:59:59.00000 Should round
+1 9999-12-31 23:00:00.00000 Should round
+2 9999-12-31 23:59:59.00000 Should round
+3 9999-12-31 23:59:59.99999 Should truncate
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# NOW
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a DATETIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-01 00:00:00.0000
+3 2011-01-01 00:00:00.0000
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# DATETIME: CAST
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+a CAST(a AS DATETIME(3))
+2000-12-31 23:59:59.9999 2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+a CAST(a AS DATETIME(3))
+2000-12-31 23:59:59.9999 2001-01-01 00:00:00.000
+2000-12-31 23:59:59.9999999 2001-01-01 00:00:00.000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+a CAST(a AS DATETIME(3))
+20001231235959.9999000000 2001-01-01 00:00:00.000
+20001231235959.9999999000 2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# Equal field propagation
+#
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES (20010101235959.999999);
+INSERT INTO t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=20010101235959.9999999;
+a
+2001-01-02 00:00:00.000000
+SELECT * FROM t1 WHERE a='20010101235959.9999999';
+a
+2001-01-02 00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+a
+2001-01-02 00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+a
+2001-01-02 00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'2001-01-02 00:00:00'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'2001-01-02 00:00:00'
+DROP TABLE t1;
+#
+# Comparing non-temporal to DATETIME
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE CONCAT(a)=TIMESTAMP'2001-01-02 00:00:00';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+a
+20010101235959.9999999
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+a
+20010101235959.9999999
+DROP TABLE t1;
+#
+# Literal corner case
+#
+SELECT TIMESTAMP'9999-12-31 23:59:59.999999';
+TIMESTAMP'9999-12-31 23:59:59.999999'
+9999-12-31 23:59:59.999999
+SELECT TIME'9999-12-31 23:59:59.9999999';
+ERROR HY000: Incorrect TIME value: '9999-12-31 23:59:59.9999999'
diff --git a/mysql-test/main/type_datetime_round.test b/mysql-test/main/type_datetime_round.test
new file mode 100644
index 00000000000..15aec2cf4e0
--- /dev/null
+++ b/mysql-test/main/type_datetime_round.test
@@ -0,0 +1,147 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # DATETIME: SET
+--echo #
+
+CREATE TABLE t1 (a DATETIME(3), b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # DATETIME: ALTER
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Corner case:
+--echo # ALTER DATETIME to a shorter DATETIME
+--echo # All values round, maximum possible value truncates.
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a DATETIME(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '9999-12-30 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '9999-12-31 22:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '9999-12-31 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (3, '9999-12-31 23:59:59.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a DATETIME(5);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # NOW
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a DATETIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # DATETIME: CAST
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Equal field propagation
+--echo #
+
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES (20010101235959.999999);
+INSERT INTO t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=20010101235959.9999999;
+SELECT * FROM t1 WHERE a='20010101235959.9999999';
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+DROP TABLE t1;
+
+--echo #
+--echo # Comparing non-temporal to DATETIME
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+SELECT * FROM t1 WHERE CONCAT(a)=TIMESTAMP'2001-01-02 00:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+DROP TABLE t1;
+
+--echo #
+--echo # Literal corner case
+--echo #
+
+SELECT TIMESTAMP'9999-12-31 23:59:59.999999';
+--error ER_WRONG_VALUE
+SELECT TIME'9999-12-31 23:59:59.9999999';
diff --git a/mysql-test/main/type_decimal.result b/mysql-test/main/type_decimal.result
index 03d6a6fa331..0228652f74c 100644
--- a/mysql-test/main/type_decimal.result
+++ b/mysql-test/main/type_decimal.result
@@ -1212,3 +1212,114 @@ t2 CREATE TABLE `t2` (
DROP TABLE t2;
DROP TABLE t1;
DROP TABLE t1dec102;
+#
+# End of 10.3 tests
+#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-11362 True condition elimination does not work for DECIMAL dynamic SQL parameters
+#
+CREATE TABLE t1 (a DECIMAL(10,1));
+INSERT INTO t1 VALUES (1),(2),(3);
+# Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>1.0+a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1.0,1.0;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>?+a' USING 1.0;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1.0+a' USING 1.0;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+# Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>1.1+a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1.0 + `test`.`t1`.`a` <=> 1.1 + `test`.`t1`.`a`
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1.0,1.1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1.0 + `test`.`t1`.`a` <=> 1.1 + `test`.`t1`.`a`
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>?+a' USING 1.1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1.0 + `test`.`t1`.`a` <=> 1.1 + `test`.`t1`.`a`
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1.0+a' USING 1.1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1.1 + `test`.`t1`.`a` <=> 1.0 + `test`.`t1`.`a`
+DROP TABLE t1;
+#
+# MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+#
+CREATE TABLE t1 (a DECIMAL(10,3));
+INSERT INTO t1 VALUES (10.0),(10.1);
+Equal values
+SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.0)+a;
+a
+10.000
+10.100
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.0)+a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.0;
+a
+10.000
+10.100
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.0;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+Values with different formats
+SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.00)+a;
+a
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.00)+a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <cache>(octet_length(10.0)) + `test`.`t1`.`a` <=> <cache>(octet_length(10.00)) + `test`.`t1`.`a`
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.00;
+a
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.00;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <cache>(octet_length(10.0)) + `test`.`t1`.`a` <=> <cache>(octet_length(10.00)) + `test`.`t1`.`a`
+DROP TABLE t1;
+#
+# MDEV-16984 Assertion `dec' failed in Dec_ptr::cmp
+#
+SET sql_mode='';
+CREATE TABLE t1 (dc decimal(10));
+INSERT INTO t1 VALUES (0000000),(NULL);
+SELECT 1 FROM t1 GROUP BY 'm' <=> dc;
+1
+1
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'm'
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_decimal.test b/mysql-test/main/type_decimal.test
index 05c60a48eec..1076592fe62 100644
--- a/mysql-test/main/type_decimal.test
+++ b/mysql-test/main/type_decimal.test
@@ -759,3 +759,67 @@ DROP TABLE t2;
DROP TABLE t1;
DROP TABLE t1dec102;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-11362 True condition elimination does not work for DECIMAL dynamic SQL parameters
+--echo #
+
+CREATE TABLE t1 (a DECIMAL(10,1));
+INSERT INTO t1 VALUES (1),(2),(3);
+--echo # Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>1.0+a;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1.0,1.0;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>?+a' USING 1.0;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1.0+a' USING 1.0;
+--echo # Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>1.1+a;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1.0,1.1;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1.0+a<=>?+a' USING 1.1;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1.0+a' USING 1.1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+--echo #
+
+CREATE TABLE t1 (a DECIMAL(10,3));
+INSERT INTO t1 VALUES (10.0),(10.1);
+
+--echo Equal values
+SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.0)+a;
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.0)+a;
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.0;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.0;
+
+--echo Values with different formats
+SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.00)+a;
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(10.00)+a;
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.00;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(10.0)+a<=>LENGTH(?)+a' USING 10.00;
+
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-16984 Assertion `dec' failed in Dec_ptr::cmp
+--echo #
+SET sql_mode='';
+CREATE TABLE t1 (dc decimal(10));
+INSERT INTO t1 VALUES (0000000),(NULL);
+SELECT 1 FROM t1 GROUP BY 'm' <=> dc;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_enum.result b/mysql-test/main/type_enum.result
index 58c723ac1eb..d17b94bbb4f 100644
--- a/mysql-test/main/type_enum.result
+++ b/mysql-test/main/type_enum.result
@@ -2332,3 +2332,24 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP PROCEDURE p1;
DROP TABLE t1;
+#
+# MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument
+#
+CREATE TABLE t1 (a ENUM('999999999999999999999999999999999999999999999999999999999999'));
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS
+SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` enum('999999999999999999999999999999999999999999999999999999999999') DEFAULT NULL,
+ `FLOOR(a)` int(5) unsigned DEFAULT NULL,
+ `CEILING(a)` int(5) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` int(5) unsigned DEFAULT NULL,
+ `ROUND(a)` int(5) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a)
+999999999999999999999999999999999999999999999999999999999999 1 1 1 1
+DROP TABLE t2;
+DROP TABLE t1;
diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test
index 5c461922166..6ff3e257feb 100644
--- a/mysql-test/main/type_enum.test
+++ b/mysql-test/main/type_enum.test
@@ -538,3 +538,16 @@ DELIMITER ;$$
CALL p1();
DROP PROCEDURE p1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument
+--echo #
+
+CREATE TABLE t1 (a ENUM('999999999999999999999999999999999999999999999999999999999999'));
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS
+ SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+DROP TABLE t2;
+DROP TABLE t1;
diff --git a/mysql-test/main/type_float.result b/mysql-test/main/type_float.result
index af3355b1a2d..5137a8229b6 100644
--- a/mysql-test/main/type_float.result
+++ b/mysql-test/main/type_float.result
@@ -862,9 +862,6 @@ DROP TABLE t1;
# End of 10.2 tests
#
#
-# Start of 10.3 tests
-#
-#
# MDEV-19468 Hybrid type expressions return wrong format for FLOAT
#
CREATE TABLE t1 (a FLOAT);
@@ -966,3 +963,202 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+#
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES (1),(2),(3);
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1e0+a<=>1e0+a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1e0,1e0;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1e0+a' USING 1e0;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1e0+a<=>?+a' USING 1e0;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+DROP TABLE t1;
+#
+# MDEV-23415 Server crash or Assertion `dec_length <= str_length' failed in Item_func_format::val_str_ascii
+#
+SELECT FORMAT('0', 50, 'de_DE');
+FORMAT('0', 50, 'de_DE')
+0,00000000000000000000000000000000000000
+SELECT FORMAT(0e0, 50, 'de_DE');
+FORMAT(0e0, 50, 'de_DE')
+0,00000000000000000000000000000000000000
+FOR d IN 0..50
+DO
+SELECT
+d,
+FORMAT(123456789.123456789e0, d, 'de_DE') AS fdbl,
+FORMAT(123456789.123456789, d, 'de_DE') AS fdec;
+END FOR;
+$$
+d 0
+fdbl 123.456.789
+fdec 123.456.789
+d 1
+fdbl 123.456.789,1
+fdec 123.456.789,1
+d 2
+fdbl 123.456.789,12
+fdec 123.456.789,12
+d 3
+fdbl 123.456.789,123
+fdec 123.456.789,123
+d 4
+fdbl 123.456.789,1235
+fdec 123.456.789,1235
+d 5
+fdbl 123.456.789,12346
+fdec 123.456.789,12346
+d 6
+fdbl 123.456.789,123457
+fdec 123.456.789,123457
+d 7
+fdbl 123.456.789,1234568
+fdec 123.456.789,1234568
+d 8
+fdbl 123.456.789,12345680
+fdec 123.456.789,12345679
+d 9
+fdbl 123.456.789,123456790
+fdec 123.456.789,123456789
+d 10
+fdbl 123.456.789,1234567900
+fdec 123.456.789,1234567890
+d 11
+fdbl 123.456.789,12345680000
+fdec 123.456.789,12345678900
+d 12
+fdbl 123.456.789,123456790000
+fdec 123.456.789,123456789000
+d 13
+fdbl 123.456.789,1234568000000
+fdec 123.456.789,1234567890000
+d 14
+fdbl 123.456.789,12345679000000
+fdec 123.456.789,12345678900000
+d 15
+fdbl 123.456.789,123456790000000
+fdec 123.456.789,123456789000000
+d 16
+fdbl 123.456.789,1234567800000000
+fdec 123.456.789,1234567890000000
+d 17
+fdbl 123.456.789,12345679000000000
+fdec 123.456.789,12345678900000000
+d 18
+fdbl 123.456.789,123456790000000000
+fdec 123.456.789,123456789000000000
+d 19
+fdbl 123.456.789,1234567900000000000
+fdec 123.456.789,1234567890000000000
+d 20
+fdbl 123.456.789,12345679000000000000
+fdec 123.456.789,12345678900000000000
+d 21
+fdbl 123.456.789,123456800000000000000
+fdec 123.456.789,123456789000000000000
+d 22
+fdbl 123.456.789,1234567900000000000000
+fdec 123.456.789,1234567890000000000000
+d 23
+fdbl 123.456.789,12345680000000000000000
+fdec 123.456.789,12345678900000000000000
+d 24
+fdbl 123.456.789,123456790000000000000000
+fdec 123.456.789,123456789000000000000000
+d 25
+fdbl 123.456.789,1234567900000000000000000
+fdec 123.456.789,1234567890000000000000000
+d 26
+fdbl 123.456.789,12345679000000000000000000
+fdec 123.456.789,12345678900000000000000000
+d 27
+fdbl 123.456.789,123456780000000000000000000
+fdec 123.456.789,123456789000000000000000000
+d 28
+fdbl 123.456.789,1234567900000000000000000000
+fdec 123.456.789,1234567890000000000000000000
+d 29
+fdbl 123.456.789,12345678000000000000000000000
+fdec 123.456.789,12345678900000000000000000000
+d 30
+fdbl 123.456.789,123456790000000000000000000000
+fdec 123.456.789,123456789000000000000000000000
+d 31
+fdbl 123.456.789,1234567900000000000000000000000
+fdec 123.456.789,1234567890000000000000000000000
+d 32
+fdbl 123.456.789,12345679000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000
+d 33
+fdbl 123.456.789,123456790000000000000000000000000
+fdec 123.456.789,123456789000000000000000000000000
+d 34
+fdbl 123.456.789,1234567900000000000000000000000000
+fdec 123.456.789,1234567890000000000000000000000000
+d 35
+fdbl 123.456.789,12345679000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000
+d 36
+fdbl 123.456.789,123456790000000000000000000000000000
+fdec 123.456.789,123456789000000000000000000000000000
+d 37
+fdbl 123.456.789,1234567900000000000000000000000000000
+fdec 123.456.789,1234567890000000000000000000000000000
+d 38
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 39
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 40
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 41
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 42
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 43
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 44
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 45
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 46
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 47
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 48
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 49
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+d 50
+fdbl 123.456.789,12345678000000000000000000000000000000
+fdec 123.456.789,12345678900000000000000000000000000000
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_float.test b/mysql-test/main/type_float.test
index 1ac169002a6..a12bf67a426 100644
--- a/mysql-test/main/type_float.test
+++ b/mysql-test/main/type_float.test
@@ -597,10 +597,6 @@ DROP TABLE t1;
--echo #
--echo #
---echo # Start of 10.3 tests
---echo #
-
---echo #
--echo # MDEV-19468 Hybrid type expressions return wrong format for FLOAT
--echo #
@@ -671,3 +667,39 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+--echo #
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES (1),(2),(3);
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1e0+a<=>1e0+a;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1e0,1e0;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1e0+a' USING 1e0;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1e0+a<=>?+a' USING 1e0;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23415 Server crash or Assertion `dec_length <= str_length' failed in Item_func_format::val_str_ascii
+--echo #
+
+SELECT FORMAT('0', 50, 'de_DE');
+SELECT FORMAT(0e0, 50, 'de_DE');
+
+--vertical_results
+DELIMITER $$;
+FOR d IN 0..50
+DO
+ SELECT
+ d,
+ FORMAT(123456789.123456789e0, d, 'de_DE') AS fdbl,
+ FORMAT(123456789.123456789, d, 'de_DE') AS fdec;
+END FOR;
+$$
+DELIMITER ;$$
+--horizontal_results
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_hex_hybrid.result b/mysql-test/main/type_hex_hybrid.result
new file mode 100644
index 00000000000..26ff385a709
--- /dev/null
+++ b/mysql-test/main/type_hex_hybrid.result
@@ -0,0 +1,236 @@
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+#
+SET NAMES utf8;
+CREATE TABLE t1 (a DECIMAL(10,3));
+INSERT INTO t1 VALUES (10.0),(10.1);
+SELECT CHARSET('a'),CHARSET(0x61),LENGTH(CHARSET('a'))+a,LENGTH(CHARSET(0x61))+a FROM t1;
+CHARSET('a') CHARSET(0x61) LENGTH(CHARSET('a'))+a LENGTH(CHARSET(0x61))+a
+utf8 binary 14.000 16.000
+utf8 binary 14.100 16.100
+SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a;
+a
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <cache>(octet_length(charset('a'))) + `test`.`t1`.`a` <=> <cache>(octet_length(charset(0x61))) + `test`.`t1`.`a`
+DROP TABLE t1;
+#
+# MDEV-23320 Hex hybrid constants 0xHHHH work badly in rounding functions
+#
+BEGIN NOT ATOMIC
+DECLARE arg TEXT DEFAULT '';
+DECLARE query TEXT DEFAULT
+'CREATE TABLE t1 AS SELECT '
+ '0xFFFFFFFFFFFFFFFF+0 AS c1,'
+ 'FLOOR(0xFFFFFFFFFFFFFFFF) AS c2,'
+ 'CEILING(0xFFFFFFFFFFFFFFFF) AS c3,'
+ 'ROUND(0xFFFFFFFFFFFFFFFF) AS c4,'
+ 'TRUNCATE(0xFFFFFFFFFFFFFFFF,0) AS c5';
+FOR i IN 1..9
+DO
+SET arg= CONCAT('0x',REPEAT('FF',i));
+SELECT i, arg;
+EXECUTE IMMEDIATE REPLACE(query,'0xFFFFFFFFFFFFFFFF', arg);
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+END FOR;
+END;
+$$
+i 1
+arg 0xFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` int(4) unsigned NOT NULL,
+ `c2` int(3) unsigned NOT NULL,
+ `c3` int(3) unsigned NOT NULL,
+ `c4` int(3) unsigned NOT NULL,
+ `c5` int(3) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 255
+c2 255
+c3 255
+c4 255
+c5 255
+i 2
+arg 0xFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` int(6) unsigned NOT NULL,
+ `c2` int(5) unsigned NOT NULL,
+ `c3` int(5) unsigned NOT NULL,
+ `c4` int(5) unsigned NOT NULL,
+ `c5` int(5) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 65535
+c2 65535
+c3 65535
+c4 65535
+c5 65535
+i 3
+arg 0xFFFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` int(9) unsigned NOT NULL,
+ `c2` int(8) unsigned NOT NULL,
+ `c3` int(8) unsigned NOT NULL,
+ `c4` int(8) unsigned NOT NULL,
+ `c5` int(8) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 16777215
+c2 16777215
+c3 16777215
+c4 16777215
+c5 16777215
+i 4
+arg 0xFFFFFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(11) unsigned NOT NULL,
+ `c2` bigint(10) unsigned NOT NULL,
+ `c3` bigint(10) unsigned NOT NULL,
+ `c4` bigint(10) unsigned NOT NULL,
+ `c5` bigint(10) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 4294967295
+c2 4294967295
+c3 4294967295
+c4 4294967295
+c5 4294967295
+i 5
+arg 0xFFFFFFFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(14) unsigned NOT NULL,
+ `c2` bigint(13) unsigned NOT NULL,
+ `c3` bigint(13) unsigned NOT NULL,
+ `c4` bigint(13) unsigned NOT NULL,
+ `c5` bigint(13) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 1099511627775
+c2 1099511627775
+c3 1099511627775
+c4 1099511627775
+c5 1099511627775
+i 6
+arg 0xFFFFFFFFFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(16) unsigned NOT NULL,
+ `c2` bigint(15) unsigned NOT NULL,
+ `c3` bigint(15) unsigned NOT NULL,
+ `c4` bigint(15) unsigned NOT NULL,
+ `c5` bigint(15) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 281474976710655
+c2 281474976710655
+c3 281474976710655
+c4 281474976710655
+c5 281474976710655
+i 7
+arg 0xFFFFFFFFFFFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(18) unsigned NOT NULL,
+ `c2` bigint(17) unsigned NOT NULL,
+ `c3` bigint(17) unsigned NOT NULL,
+ `c4` bigint(17) unsigned NOT NULL,
+ `c5` bigint(17) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 72057594037927935
+c2 72057594037927935
+c3 72057594037927935
+c4 72057594037927935
+c5 72057594037927935
+i 8
+arg 0xFFFFFFFFFFFFFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(21) unsigned NOT NULL,
+ `c2` bigint(20) unsigned NOT NULL,
+ `c3` bigint(20) unsigned NOT NULL,
+ `c4` bigint(20) unsigned NOT NULL,
+ `c5` bigint(20) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 18446744073709551615
+c2 18446744073709551615
+c3 18446744073709551615
+c4 18446744073709551615
+c5 18446744073709551615
+i 9
+arg 0xFFFFFFFFFFFFFFFFFF
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(21) unsigned NOT NULL,
+ `c2` bigint(20) unsigned NOT NULL,
+ `c3` bigint(20) unsigned NOT NULL,
+ `c4` bigint(20) unsigned NOT NULL,
+ `c5` bigint(20) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+c1 18446744073709551615
+c2 18446744073709551615
+c3 18446744073709551615
+c4 18446744073709551615
+c5 18446744073709551615
+#
+# MDEV-23368 ROUND(18446744073709551615,-11) returns a wrong result
+#
+SELECT ROUND(0xFFFFFFFFFFFFFFFF,-10), ROUND(0xFFFFFFFFFFFFFFFF,-11);
+ROUND(0xFFFFFFFFFFFFFFFF,-10) ROUND(0xFFFFFFFFFFFFFFFF,-11)
+18446744070000000000 18446744100000000000
+CREATE TABLE t1 AS SELECT ROUND(0xFFFFFFFFFFFFFFFF,-10), ROUND(0xFFFFFFFFFFFFFFFF,-11);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ROUND(0xFFFFFFFFFFFFFFFF,-10)` decimal(21,0) unsigned NOT NULL,
+ `ROUND(0xFFFFFFFFFFFFFFFF,-11)` decimal(21,0) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+ROUND(0xFFFFFFFFFFFFFFFF,-10) ROUND(0xFFFFFFFFFFFFFFFF,-11)
+18446744070000000000 18446744100000000000
+DROP TABLE t1;
+#
+# MDEV-23366 ROUND(18446744073709551615,rand()*0) returns a wrong result
+#
+SELECT
+ROUND(0xFFFFFFFFFFFFFFFF,NULL) AS c1,
+ROUND(0xFFFFFFFFFFFFFFFF,rand()*0) AS c2,
+ROUND(0xFFFFFFFFFFFFFFFF,-1) AS c3,
+ROUND(0xFFFFFFFFFFFFFFFF,-19) AS c4,
+ROUND(0xFFFFFFFFFFFFFFFF,rand()*0-19) AS c5;
+c1 NULL
+c2 18446744073709551615
+c3 18446744073709551620
+c4 20000000000000000000
+c5 20000000000000000000
+CREATE OR REPLACE TABLE t1 AS
+SELECT
+ROUND(0xFFFFFFFFFFFFFFFF,NULL) AS c1,
+ROUND(0xFFFFFFFFFFFFFFFF,rand()*0) AS c2,
+ROUND(0xFFFFFFFFFFFFFFFF,-1) AS c3,
+ROUND(0xFFFFFFFFFFFFFFFF,-19) AS c4,
+ROUND(0xFFFFFFFFFFFFFFFF,rand()*0-19) AS c5;
+SELECT * FROM t1;
+c1 NULL
+c2 18446744073709551615
+c3 18446744073709551620
+c4 20000000000000000000
+c5 20000000000000000000
+SHOW CREATE TABLE t1;
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(20) unsigned DEFAULT NULL,
+ `c2` decimal(21,0) unsigned NOT NULL,
+ `c3` decimal(21,0) unsigned NOT NULL,
+ `c4` decimal(21,0) unsigned NOT NULL,
+ `c5` decimal(21,0) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_hex_hybrid.test b/mysql-test/main/type_hex_hybrid.test
new file mode 100644
index 00000000000..175169fbda4
--- /dev/null
+++ b/mysql-test/main/type_hex_hybrid.test
@@ -0,0 +1,87 @@
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+--echo #
+
+# It's important for CHARSET('a') and CHARSET(0x61) to have different lengths in this test.
+# 'latin1' and 'binary' have same lengths, so using 'utf8'.
+SET NAMES utf8;
+CREATE TABLE t1 (a DECIMAL(10,3));
+INSERT INTO t1 VALUES (10.0),(10.1);
+SELECT CHARSET('a'),CHARSET(0x61),LENGTH(CHARSET('a'))+a,LENGTH(CHARSET(0x61))+a FROM t1;
+SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a;
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23320 Hex hybrid constants 0xHHHH work badly in rounding functions
+--echo #
+
+--vertical_results
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE arg TEXT DEFAULT '';
+ DECLARE query TEXT DEFAULT
+ 'CREATE TABLE t1 AS SELECT '
+ '0xFFFFFFFFFFFFFFFF+0 AS c1,'
+ 'FLOOR(0xFFFFFFFFFFFFFFFF) AS c2,'
+ 'CEILING(0xFFFFFFFFFFFFFFFF) AS c3,'
+ 'ROUND(0xFFFFFFFFFFFFFFFF) AS c4,'
+ 'TRUNCATE(0xFFFFFFFFFFFFFFFF,0) AS c5';
+ FOR i IN 1..9
+ DO
+ SET arg= CONCAT('0x',REPEAT('FF',i));
+ SELECT i, arg;
+ EXECUTE IMMEDIATE REPLACE(query,'0xFFFFFFFFFFFFFFFF', arg);
+ SHOW CREATE TABLE t1;
+ SELECT * FROM t1;
+ DROP TABLE t1;
+ END FOR;
+END;
+$$
+DELIMITER ;$$
+--horizontal_results
+
+
+--echo #
+--echo # MDEV-23368 ROUND(18446744073709551615,-11) returns a wrong result
+--echo #
+
+SELECT ROUND(0xFFFFFFFFFFFFFFFF,-10), ROUND(0xFFFFFFFFFFFFFFFF,-11);
+CREATE TABLE t1 AS SELECT ROUND(0xFFFFFFFFFFFFFFFF,-10), ROUND(0xFFFFFFFFFFFFFFFF,-11);
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-23366 ROUND(18446744073709551615,rand()*0) returns a wrong result
+--echo #
+
+--vertical_results
+SELECT
+ ROUND(0xFFFFFFFFFFFFFFFF,NULL) AS c1,
+ ROUND(0xFFFFFFFFFFFFFFFF,rand()*0) AS c2,
+ ROUND(0xFFFFFFFFFFFFFFFF,-1) AS c3,
+ ROUND(0xFFFFFFFFFFFFFFFF,-19) AS c4,
+ ROUND(0xFFFFFFFFFFFFFFFF,rand()*0-19) AS c5;
+
+CREATE OR REPLACE TABLE t1 AS
+SELECT
+ ROUND(0xFFFFFFFFFFFFFFFF,NULL) AS c1,
+ ROUND(0xFFFFFFFFFFFFFFFF,rand()*0) AS c2,
+ ROUND(0xFFFFFFFFFFFFFFFF,-1) AS c3,
+ ROUND(0xFFFFFFFFFFFFFFFF,-19) AS c4,
+ ROUND(0xFFFFFFFFFFFFFFFF,rand()*0-19) AS c5;
+
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+--horizontal_results
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_int.result b/mysql-test/main/type_int.result
index 4220ff11a47..96b19f142e5 100644
--- a/mysql-test/main/type_int.result
+++ b/mysql-test/main/type_int.result
@@ -457,3 +457,1208 @@ DROP TABLE betweentest;
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1+a<=>1+a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1,1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1+a' USING 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1+a<=>?+a' USING 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+DROP TABLE t1;
+#
+# MDEV-15759 Expect "Impossible WHERE" for indexed_int_column=out_of_range_int_constant
+#
+CREATE TABLE t1 (a TINYINT, KEY(a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+EXPLAIN SELECT * FROM t1 WHERE a=200;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT * FROM t1 WHERE a<=>200;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+DROP TABLE t1;
+#
+# MDEV-8554 Expect "Impossible WHERE" for never true values like a!=a, a<a, a>a
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+EXPLAIN SELECT * FROM t1 WHERE a!=a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT COUNT(*) FROM t1 WHERE a!=a;
+COUNT(*)
+0
+EXPLAIN SELECT * FROM t1 WHERE a>a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT COUNT(*) FROM t1 WHERE a>a;
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a<a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT COUNT(*) FROM t1 WHERE a<a;
+COUNT(*)
+0
+ALTER TABLE t1 MODIFY a TINYINT NOT NULL;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a!=a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT COUNT(*) FROM t1 WHERE a!=a;
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a>a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT COUNT(*) FROM t1 WHERE a>a;
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a<a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT COUNT(*) FROM t1 WHERE a<a;
+COUNT(*)
+0
+#
+# MDEV-8554 Modifing expression doesn't hit "Impossible WHERE" clause
+#
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE not (a!=a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+SELECT COUNT(*) FROM t1 WHERE not (a!=a);
+COUNT(*)
+3
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a>a-1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
+SELECT COUNT(*) FROM t1 WHERE a>a-1;
+COUNT(*)
+3
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a<a+1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
+SELECT COUNT(*) FROM t1 WHERE a<a+1;
+COUNT(*)
+3
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a-1<a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
+SELECT COUNT(*) FROM t1 WHERE a-1<a;
+COUNT(*)
+3
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a NOT LIKE a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
+SELECT COUNT(*) FROM t1 WHERE a NOT LIKE a;
+COUNT(*)
+0
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a XOR a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
+SELECT COUNT(*) FROM t1 WHERE a XOR a;
+COUNT(*)
+0
+DROP TABLE t1;
+#
+# MDEV-23337 Rounding functions create a wrong data type for numeric input
+# MDEV-23350 ROUND(bigint_22_or_longer) returns a wrong data type
+#
+CREATE PROCEDURE p1(t VARCHAR(64))
+BEGIN
+SELECT t AS ``;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a TYPE)', 'TYPE', t);
+INSERT IGNORE INTO t1 VALUES (-100000000000000000000000000000);
+INSERT IGNORE INTO t1 VALUES (100000000000000000000000000000);
+CREATE TABLE t2 AS SELECT a, ROUND(a), ROUND(a,1), ROUND(a,10), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+DROP TABLE t1, t2;
+END;
+$$
+CALL p1('tinyint');
+ tinyint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` tinyint(4) DEFAULT NULL,
+ `ROUND(a)` tinyint(4) DEFAULT NULL,
+ `ROUND(a,1)` tinyint(4) DEFAULT NULL,
+ `ROUND(a,10)` tinyint(4) DEFAULT NULL,
+ `TRUNCATE(a,0)` tinyint(4) DEFAULT NULL,
+ `FLOOR(a)` tinyint(4) DEFAULT NULL,
+ `CEILING(a)` tinyint(4) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -128
+ROUND(a) -128
+ROUND(a,1) -128
+ROUND(a,10) -128
+TRUNCATE(a,0) -128
+FLOOR(a) -128
+CEILING(a) -128
+a 127
+ROUND(a) 127
+ROUND(a,1) 127
+ROUND(a,10) 127
+TRUNCATE(a,0) 127
+FLOOR(a) 127
+CEILING(a) 127
+CALL p1('smallint');
+ smallint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` smallint(6) DEFAULT NULL,
+ `ROUND(a)` smallint(6) DEFAULT NULL,
+ `ROUND(a,1)` smallint(6) DEFAULT NULL,
+ `ROUND(a,10)` smallint(6) DEFAULT NULL,
+ `TRUNCATE(a,0)` smallint(6) DEFAULT NULL,
+ `FLOOR(a)` smallint(6) DEFAULT NULL,
+ `CEILING(a)` smallint(6) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -32768
+ROUND(a) -32768
+ROUND(a,1) -32768
+ROUND(a,10) -32768
+TRUNCATE(a,0) -32768
+FLOOR(a) -32768
+CEILING(a) -32768
+a 32767
+ROUND(a) 32767
+ROUND(a,1) 32767
+ROUND(a,10) 32767
+TRUNCATE(a,0) 32767
+FLOOR(a) 32767
+CEILING(a) 32767
+CALL p1('mediumint');
+ mediumint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` mediumint(9) DEFAULT NULL,
+ `ROUND(a)` mediumint(9) DEFAULT NULL,
+ `ROUND(a,1)` mediumint(9) DEFAULT NULL,
+ `ROUND(a,10)` mediumint(9) DEFAULT NULL,
+ `TRUNCATE(a,0)` mediumint(9) DEFAULT NULL,
+ `FLOOR(a)` mediumint(9) DEFAULT NULL,
+ `CEILING(a)` mediumint(9) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -8388608
+ROUND(a) -8388608
+ROUND(a,1) -8388608
+ROUND(a,10) -8388608
+TRUNCATE(a,0) -8388608
+FLOOR(a) -8388608
+CEILING(a) -8388608
+a 8388607
+ROUND(a) 8388607
+ROUND(a,1) 8388607
+ROUND(a,10) 8388607
+TRUNCATE(a,0) 8388607
+FLOOR(a) 8388607
+CEILING(a) 8388607
+CALL p1('int');
+ int
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `ROUND(a)` int(11) DEFAULT NULL,
+ `ROUND(a,1)` int(11) DEFAULT NULL,
+ `ROUND(a,10)` int(11) DEFAULT NULL,
+ `TRUNCATE(a,0)` int(11) DEFAULT NULL,
+ `FLOOR(a)` int(11) DEFAULT NULL,
+ `CEILING(a)` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -2147483648
+ROUND(a) -2147483648
+ROUND(a,1) -2147483648
+ROUND(a,10) -2147483648
+TRUNCATE(a,0) -2147483648
+FLOOR(a) -2147483648
+CEILING(a) -2147483648
+a 2147483647
+ROUND(a) 2147483647
+ROUND(a,1) 2147483647
+ROUND(a,10) 2147483647
+TRUNCATE(a,0) 2147483647
+FLOOR(a) 2147483647
+CEILING(a) 2147483647
+CALL p1('bigint');
+ bigint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) DEFAULT NULL,
+ `ROUND(a)` bigint(20) DEFAULT NULL,
+ `ROUND(a,1)` bigint(20) DEFAULT NULL,
+ `ROUND(a,10)` bigint(20) DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(20) DEFAULT NULL,
+ `FLOOR(a)` bigint(20) DEFAULT NULL,
+ `CEILING(a)` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a) -9223372036854775808
+ROUND(a,1) -9223372036854775808
+ROUND(a,10) -9223372036854775808
+TRUNCATE(a,0) -9223372036854775808
+FLOOR(a) -9223372036854775808
+CEILING(a) -9223372036854775808
+a 9223372036854775807
+ROUND(a) 9223372036854775807
+ROUND(a,1) 9223372036854775807
+ROUND(a,10) 9223372036854775807
+TRUNCATE(a,0) 9223372036854775807
+FLOOR(a) 9223372036854775807
+CEILING(a) 9223372036854775807
+CALL p1('bigint(20)');
+ bigint(20)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) DEFAULT NULL,
+ `ROUND(a)` bigint(20) DEFAULT NULL,
+ `ROUND(a,1)` bigint(20) DEFAULT NULL,
+ `ROUND(a,10)` bigint(20) DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(20) DEFAULT NULL,
+ `FLOOR(a)` bigint(20) DEFAULT NULL,
+ `CEILING(a)` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a) -9223372036854775808
+ROUND(a,1) -9223372036854775808
+ROUND(a,10) -9223372036854775808
+TRUNCATE(a,0) -9223372036854775808
+FLOOR(a) -9223372036854775808
+CEILING(a) -9223372036854775808
+a 9223372036854775807
+ROUND(a) 9223372036854775807
+ROUND(a,1) 9223372036854775807
+ROUND(a,10) 9223372036854775807
+TRUNCATE(a,0) 9223372036854775807
+FLOOR(a) 9223372036854775807
+CEILING(a) 9223372036854775807
+CALL p1('bigint(21)');
+ bigint(21)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(21) DEFAULT NULL,
+ `ROUND(a)` bigint(21) DEFAULT NULL,
+ `ROUND(a,1)` bigint(21) DEFAULT NULL,
+ `ROUND(a,10)` bigint(21) DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(21) DEFAULT NULL,
+ `FLOOR(a)` bigint(21) DEFAULT NULL,
+ `CEILING(a)` bigint(21) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a) -9223372036854775808
+ROUND(a,1) -9223372036854775808
+ROUND(a,10) -9223372036854775808
+TRUNCATE(a,0) -9223372036854775808
+FLOOR(a) -9223372036854775808
+CEILING(a) -9223372036854775808
+a 9223372036854775807
+ROUND(a) 9223372036854775807
+ROUND(a,1) 9223372036854775807
+ROUND(a,10) 9223372036854775807
+TRUNCATE(a,0) 9223372036854775807
+FLOOR(a) 9223372036854775807
+CEILING(a) 9223372036854775807
+CALL p1('bigint(22)');
+ bigint(22)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(22) DEFAULT NULL,
+ `ROUND(a)` bigint(22) DEFAULT NULL,
+ `ROUND(a,1)` bigint(22) DEFAULT NULL,
+ `ROUND(a,10)` bigint(22) DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(22) DEFAULT NULL,
+ `FLOOR(a)` bigint(22) DEFAULT NULL,
+ `CEILING(a)` bigint(22) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a) -9223372036854775808
+ROUND(a,1) -9223372036854775808
+ROUND(a,10) -9223372036854775808
+TRUNCATE(a,0) -9223372036854775808
+FLOOR(a) -9223372036854775808
+CEILING(a) -9223372036854775808
+a 9223372036854775807
+ROUND(a) 9223372036854775807
+ROUND(a,1) 9223372036854775807
+ROUND(a,10) 9223372036854775807
+TRUNCATE(a,0) 9223372036854775807
+FLOOR(a) 9223372036854775807
+CEILING(a) 9223372036854775807
+CALL p1('bigint(23)');
+ bigint(23)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(23) DEFAULT NULL,
+ `ROUND(a)` bigint(23) DEFAULT NULL,
+ `ROUND(a,1)` bigint(23) DEFAULT NULL,
+ `ROUND(a,10)` bigint(23) DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(23) DEFAULT NULL,
+ `FLOOR(a)` bigint(23) DEFAULT NULL,
+ `CEILING(a)` bigint(23) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a) -9223372036854775808
+ROUND(a,1) -9223372036854775808
+ROUND(a,10) -9223372036854775808
+TRUNCATE(a,0) -9223372036854775808
+FLOOR(a) -9223372036854775808
+CEILING(a) -9223372036854775808
+a 9223372036854775807
+ROUND(a) 9223372036854775807
+ROUND(a,1) 9223372036854775807
+ROUND(a,10) 9223372036854775807
+TRUNCATE(a,0) 9223372036854775807
+FLOOR(a) 9223372036854775807
+CEILING(a) 9223372036854775807
+CALL p1('bigint(30)');
+ bigint(30)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(30) DEFAULT NULL,
+ `ROUND(a)` bigint(30) DEFAULT NULL,
+ `ROUND(a,1)` bigint(30) DEFAULT NULL,
+ `ROUND(a,10)` bigint(30) DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(30) DEFAULT NULL,
+ `FLOOR(a)` bigint(30) DEFAULT NULL,
+ `CEILING(a)` bigint(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a) -9223372036854775808
+ROUND(a,1) -9223372036854775808
+ROUND(a,10) -9223372036854775808
+TRUNCATE(a,0) -9223372036854775808
+FLOOR(a) -9223372036854775808
+CEILING(a) -9223372036854775808
+a 9223372036854775807
+ROUND(a) 9223372036854775807
+ROUND(a,1) 9223372036854775807
+ROUND(a,10) 9223372036854775807
+TRUNCATE(a,0) 9223372036854775807
+FLOOR(a) 9223372036854775807
+CEILING(a) 9223372036854775807
+CALL p1('tinyint unsigned');
+ tinyint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` tinyint(3) unsigned DEFAULT NULL,
+ `ROUND(a)` tinyint(3) unsigned DEFAULT NULL,
+ `ROUND(a,1)` tinyint(3) unsigned DEFAULT NULL,
+ `ROUND(a,10)` tinyint(3) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` tinyint(3) unsigned DEFAULT NULL,
+ `FLOOR(a)` tinyint(3) unsigned DEFAULT NULL,
+ `CEILING(a)` tinyint(3) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 255
+ROUND(a) 255
+ROUND(a,1) 255
+ROUND(a,10) 255
+TRUNCATE(a,0) 255
+FLOOR(a) 255
+CEILING(a) 255
+CALL p1('smallint unsigned');
+ smallint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` smallint(5) unsigned DEFAULT NULL,
+ `ROUND(a)` smallint(5) unsigned DEFAULT NULL,
+ `ROUND(a,1)` smallint(5) unsigned DEFAULT NULL,
+ `ROUND(a,10)` smallint(5) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` smallint(5) unsigned DEFAULT NULL,
+ `FLOOR(a)` smallint(5) unsigned DEFAULT NULL,
+ `CEILING(a)` smallint(5) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 65535
+ROUND(a) 65535
+ROUND(a,1) 65535
+ROUND(a,10) 65535
+TRUNCATE(a,0) 65535
+FLOOR(a) 65535
+CEILING(a) 65535
+CALL p1('mediumint unsigned');
+ mediumint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` mediumint(8) unsigned DEFAULT NULL,
+ `ROUND(a)` mediumint(8) unsigned DEFAULT NULL,
+ `ROUND(a,1)` mediumint(8) unsigned DEFAULT NULL,
+ `ROUND(a,10)` mediumint(8) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` mediumint(8) unsigned DEFAULT NULL,
+ `FLOOR(a)` mediumint(8) unsigned DEFAULT NULL,
+ `CEILING(a)` mediumint(8) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 16777215
+ROUND(a) 16777215
+ROUND(a,1) 16777215
+ROUND(a,10) 16777215
+TRUNCATE(a,0) 16777215
+FLOOR(a) 16777215
+CEILING(a) 16777215
+CALL p1('int unsigned');
+ int unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` int(10) unsigned DEFAULT NULL,
+ `ROUND(a)` int(10) unsigned DEFAULT NULL,
+ `ROUND(a,1)` int(10) unsigned DEFAULT NULL,
+ `ROUND(a,10)` int(10) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` int(10) unsigned DEFAULT NULL,
+ `FLOOR(a)` int(10) unsigned DEFAULT NULL,
+ `CEILING(a)` int(10) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 4294967295
+ROUND(a) 4294967295
+ROUND(a,1) 4294967295
+ROUND(a,10) 4294967295
+TRUNCATE(a,0) 4294967295
+FLOOR(a) 4294967295
+CEILING(a) 4294967295
+CALL p1('bigint unsigned');
+ bigint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a)` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a,1)` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a,10)` bigint(20) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(20) unsigned DEFAULT NULL,
+ `FLOOR(a)` bigint(20) unsigned DEFAULT NULL,
+ `CEILING(a)` bigint(20) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 18446744073709551615
+ROUND(a) 18446744073709551615
+ROUND(a,1) 18446744073709551615
+ROUND(a,10) 18446744073709551615
+TRUNCATE(a,0) 18446744073709551615
+FLOOR(a) 18446744073709551615
+CEILING(a) 18446744073709551615
+CALL p1('bigint(20) unsigned');
+ bigint(20) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a)` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a,1)` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a,10)` bigint(20) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(20) unsigned DEFAULT NULL,
+ `FLOOR(a)` bigint(20) unsigned DEFAULT NULL,
+ `CEILING(a)` bigint(20) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 18446744073709551615
+ROUND(a) 18446744073709551615
+ROUND(a,1) 18446744073709551615
+ROUND(a,10) 18446744073709551615
+TRUNCATE(a,0) 18446744073709551615
+FLOOR(a) 18446744073709551615
+CEILING(a) 18446744073709551615
+CALL p1('bigint(21) unsigned');
+ bigint(21) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(21) unsigned DEFAULT NULL,
+ `ROUND(a)` bigint(21) unsigned DEFAULT NULL,
+ `ROUND(a,1)` bigint(21) unsigned DEFAULT NULL,
+ `ROUND(a,10)` bigint(21) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(21) unsigned DEFAULT NULL,
+ `FLOOR(a)` bigint(21) unsigned DEFAULT NULL,
+ `CEILING(a)` bigint(21) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 18446744073709551615
+ROUND(a) 18446744073709551615
+ROUND(a,1) 18446744073709551615
+ROUND(a,10) 18446744073709551615
+TRUNCATE(a,0) 18446744073709551615
+FLOOR(a) 18446744073709551615
+CEILING(a) 18446744073709551615
+CALL p1('bigint(22) unsigned');
+ bigint(22) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(22) unsigned DEFAULT NULL,
+ `ROUND(a)` bigint(22) unsigned DEFAULT NULL,
+ `ROUND(a,1)` bigint(22) unsigned DEFAULT NULL,
+ `ROUND(a,10)` bigint(22) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(22) unsigned DEFAULT NULL,
+ `FLOOR(a)` bigint(22) unsigned DEFAULT NULL,
+ `CEILING(a)` bigint(22) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 18446744073709551615
+ROUND(a) 18446744073709551615
+ROUND(a,1) 18446744073709551615
+ROUND(a,10) 18446744073709551615
+TRUNCATE(a,0) 18446744073709551615
+FLOOR(a) 18446744073709551615
+CEILING(a) 18446744073709551615
+CALL p1('bigint(23) unsigned');
+ bigint(23) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(23) unsigned DEFAULT NULL,
+ `ROUND(a)` bigint(23) unsigned DEFAULT NULL,
+ `ROUND(a,1)` bigint(23) unsigned DEFAULT NULL,
+ `ROUND(a,10)` bigint(23) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(23) unsigned DEFAULT NULL,
+ `FLOOR(a)` bigint(23) unsigned DEFAULT NULL,
+ `CEILING(a)` bigint(23) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 18446744073709551615
+ROUND(a) 18446744073709551615
+ROUND(a,1) 18446744073709551615
+ROUND(a,10) 18446744073709551615
+TRUNCATE(a,0) 18446744073709551615
+FLOOR(a) 18446744073709551615
+CEILING(a) 18446744073709551615
+CALL p1('bigint(30) unsigned');
+ bigint(30) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(30) unsigned DEFAULT NULL,
+ `ROUND(a)` bigint(30) unsigned DEFAULT NULL,
+ `ROUND(a,1)` bigint(30) unsigned DEFAULT NULL,
+ `ROUND(a,10)` bigint(30) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` bigint(30) unsigned DEFAULT NULL,
+ `FLOOR(a)` bigint(30) unsigned DEFAULT NULL,
+ `CEILING(a)` bigint(30) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a) 0
+ROUND(a,1) 0
+ROUND(a,10) 0
+TRUNCATE(a,0) 0
+FLOOR(a) 0
+CEILING(a) 0
+a 18446744073709551615
+ROUND(a) 18446744073709551615
+ROUND(a,1) 18446744073709551615
+ROUND(a,10) 18446744073709551615
+TRUNCATE(a,0) 18446744073709551615
+FLOOR(a) 18446744073709551615
+CEILING(a) 18446744073709551615
+DROP PROCEDURE p1;
+#
+# MDEV-23368 ROUND(18446744073709551615,-11) returns a wrong result
+#
+SELECT ROUND(18446744073709551615,-10), ROUND(18446744073709551615,-11);
+ROUND(18446744073709551615,-10) ROUND(18446744073709551615,-11)
+18446744070000000000 18446744100000000000
+CREATE TABLE t1 AS SELECT ROUND(18446744073709551615,-10), ROUND(18446744073709551615,-11);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ROUND(18446744073709551615,-10)` decimal(21,0) unsigned NOT NULL,
+ `ROUND(18446744073709551615,-11)` decimal(21,0) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+ROUND(18446744073709551615,-10) ROUND(18446744073709551615,-11)
+18446744070000000000 18446744100000000000
+DROP TABLE t1;
+#
+# MDEV-23367 ROUND(18446744073709551615,-1) returns a wrong result
+#
+SELECT
+ROUND(18446744073709551615,-1) AS c01,
+ROUND(18446744073709551615,-19) AS c19;
+c01 18446744073709551620
+c19 20000000000000000000
+CREATE OR REPLACE TABLE t1 AS
+SELECT
+ROUND(18446744073709551615,-1) AS c01,
+ROUND(18446744073709551615,-19) AS c19;
+SELECT * FROM t1;
+c01 18446744073709551620
+c19 20000000000000000000
+SHOW CREATE TABLE t1;
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c01` decimal(21,0) unsigned NOT NULL,
+ `c19` decimal(21,0) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE PROCEDURE p1(t VARCHAR(64))
+BEGIN
+SELECT t AS ``;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a TYPE)', 'TYPE', t);
+INSERT IGNORE INTO t1 VALUES (-100000000000000000000000000000);
+INSERT IGNORE INTO t1 VALUES (100000000000000000000000000000);
+CREATE TABLE t2 AS SELECT
+a, ROUND(a,-1), ROUND(a,-2), ROUND(a,-19), ROUND(a,-20), ROUND(a,-30)
+FROM t1
+ORDER BY a;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+DROP TABLE t1, t2;
+END;
+$$
+CALL p1('tinyint');
+ tinyint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` tinyint(4) DEFAULT NULL,
+ `ROUND(a,-1)` int(5) DEFAULT NULL,
+ `ROUND(a,-2)` int(5) DEFAULT NULL,
+ `ROUND(a,-19)` int(5) DEFAULT NULL,
+ `ROUND(a,-20)` int(5) DEFAULT NULL,
+ `ROUND(a,-30)` int(5) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -128
+ROUND(a,-1) -130
+ROUND(a,-2) -100
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 127
+ROUND(a,-1) 130
+ROUND(a,-2) 100
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('smallint');
+ smallint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` smallint(6) DEFAULT NULL,
+ `ROUND(a,-1)` int(7) DEFAULT NULL,
+ `ROUND(a,-2)` int(7) DEFAULT NULL,
+ `ROUND(a,-19)` int(7) DEFAULT NULL,
+ `ROUND(a,-20)` int(7) DEFAULT NULL,
+ `ROUND(a,-30)` int(7) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -32768
+ROUND(a,-1) -32770
+ROUND(a,-2) -32800
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 32767
+ROUND(a,-1) 32770
+ROUND(a,-2) 32800
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('mediumint');
+ mediumint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` mediumint(9) DEFAULT NULL,
+ `ROUND(a,-1)` bigint(10) DEFAULT NULL,
+ `ROUND(a,-2)` bigint(10) DEFAULT NULL,
+ `ROUND(a,-19)` bigint(10) DEFAULT NULL,
+ `ROUND(a,-20)` bigint(10) DEFAULT NULL,
+ `ROUND(a,-30)` bigint(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -8388608
+ROUND(a,-1) -8388610
+ROUND(a,-2) -8388600
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 8388607
+ROUND(a,-1) 8388610
+ROUND(a,-2) 8388600
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('int');
+ int
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `ROUND(a,-1)` bigint(12) DEFAULT NULL,
+ `ROUND(a,-2)` bigint(12) DEFAULT NULL,
+ `ROUND(a,-19)` bigint(12) DEFAULT NULL,
+ `ROUND(a,-20)` bigint(12) DEFAULT NULL,
+ `ROUND(a,-30)` bigint(12) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -2147483648
+ROUND(a,-1) -2147483650
+ROUND(a,-2) -2147483600
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 2147483647
+ROUND(a,-1) 2147483650
+ROUND(a,-2) 2147483600
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint');
+ bigint
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) DEFAULT NULL,
+ `ROUND(a,-1)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-2)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-19)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-20)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-30)` decimal(20,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a,-1) -9223372036854775810
+ROUND(a,-2) -9223372036854775800
+ROUND(a,-19) -10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 9223372036854775807
+ROUND(a,-1) 9223372036854775810
+ROUND(a,-2) 9223372036854775800
+ROUND(a,-19) 10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(20)');
+ bigint(20)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) DEFAULT NULL,
+ `ROUND(a,-1)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-2)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-19)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-20)` decimal(20,0) DEFAULT NULL,
+ `ROUND(a,-30)` decimal(20,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a,-1) -9223372036854775810
+ROUND(a,-2) -9223372036854775800
+ROUND(a,-19) -10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 9223372036854775807
+ROUND(a,-1) 9223372036854775810
+ROUND(a,-2) 9223372036854775800
+ROUND(a,-19) 10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(21)');
+ bigint(21)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(21) DEFAULT NULL,
+ `ROUND(a,-1)` decimal(21,0) DEFAULT NULL,
+ `ROUND(a,-2)` decimal(21,0) DEFAULT NULL,
+ `ROUND(a,-19)` decimal(21,0) DEFAULT NULL,
+ `ROUND(a,-20)` decimal(21,0) DEFAULT NULL,
+ `ROUND(a,-30)` decimal(21,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a,-1) -9223372036854775810
+ROUND(a,-2) -9223372036854775800
+ROUND(a,-19) -10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 9223372036854775807
+ROUND(a,-1) 9223372036854775810
+ROUND(a,-2) 9223372036854775800
+ROUND(a,-19) 10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(22)');
+ bigint(22)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(22) DEFAULT NULL,
+ `ROUND(a,-1)` decimal(22,0) DEFAULT NULL,
+ `ROUND(a,-2)` decimal(22,0) DEFAULT NULL,
+ `ROUND(a,-19)` decimal(22,0) DEFAULT NULL,
+ `ROUND(a,-20)` decimal(22,0) DEFAULT NULL,
+ `ROUND(a,-30)` decimal(22,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a,-1) -9223372036854775810
+ROUND(a,-2) -9223372036854775800
+ROUND(a,-19) -10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 9223372036854775807
+ROUND(a,-1) 9223372036854775810
+ROUND(a,-2) 9223372036854775800
+ROUND(a,-19) 10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(23)');
+ bigint(23)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(23) DEFAULT NULL,
+ `ROUND(a,-1)` decimal(23,0) DEFAULT NULL,
+ `ROUND(a,-2)` decimal(23,0) DEFAULT NULL,
+ `ROUND(a,-19)` decimal(23,0) DEFAULT NULL,
+ `ROUND(a,-20)` decimal(23,0) DEFAULT NULL,
+ `ROUND(a,-30)` decimal(23,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a,-1) -9223372036854775810
+ROUND(a,-2) -9223372036854775800
+ROUND(a,-19) -10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 9223372036854775807
+ROUND(a,-1) 9223372036854775810
+ROUND(a,-2) 9223372036854775800
+ROUND(a,-19) 10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(30)');
+ bigint(30)
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(30) DEFAULT NULL,
+ `ROUND(a,-1)` decimal(30,0) DEFAULT NULL,
+ `ROUND(a,-2)` decimal(30,0) DEFAULT NULL,
+ `ROUND(a,-19)` decimal(30,0) DEFAULT NULL,
+ `ROUND(a,-20)` decimal(30,0) DEFAULT NULL,
+ `ROUND(a,-30)` decimal(30,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9223372036854775808
+ROUND(a,-1) -9223372036854775810
+ROUND(a,-2) -9223372036854775800
+ROUND(a,-19) -10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 9223372036854775807
+ROUND(a,-1) 9223372036854775810
+ROUND(a,-2) 9223372036854775800
+ROUND(a,-19) 10000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('tinyint unsigned');
+ tinyint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` tinyint(3) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` int(4) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` int(4) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` int(4) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` int(4) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` int(4) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 255
+ROUND(a,-1) 260
+ROUND(a,-2) 300
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('smallint unsigned');
+ smallint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` smallint(5) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` int(6) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` int(6) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` int(6) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` int(6) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` int(6) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 65535
+ROUND(a,-1) 65540
+ROUND(a,-2) 65500
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('mediumint unsigned');
+ mediumint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` mediumint(8) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` int(9) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` int(9) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` int(9) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` int(9) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` int(9) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 16777215
+ROUND(a,-1) 16777220
+ROUND(a,-2) 16777200
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('int unsigned');
+ int unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` int(10) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` bigint(11) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` bigint(11) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` bigint(11) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` bigint(11) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` bigint(11) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 4294967295
+ROUND(a,-1) 4294967300
+ROUND(a,-2) 4294967300
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint unsigned');
+ bigint unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` decimal(21,0) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 18446744073709551615
+ROUND(a,-1) 18446744073709551620
+ROUND(a,-2) 18446744073709551600
+ROUND(a,-19) 20000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(20) unsigned');
+ bigint(20) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(20) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` decimal(21,0) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` decimal(21,0) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 18446744073709551615
+ROUND(a,-1) 18446744073709551620
+ROUND(a,-2) 18446744073709551600
+ROUND(a,-19) 20000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(21) unsigned');
+ bigint(21) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(21) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` decimal(22,0) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` decimal(22,0) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` decimal(22,0) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` decimal(22,0) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` decimal(22,0) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 18446744073709551615
+ROUND(a,-1) 18446744073709551620
+ROUND(a,-2) 18446744073709551600
+ROUND(a,-19) 20000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(22) unsigned');
+ bigint(22) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(22) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` decimal(23,0) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` decimal(23,0) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` decimal(23,0) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` decimal(23,0) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` decimal(23,0) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 18446744073709551615
+ROUND(a,-1) 18446744073709551620
+ROUND(a,-2) 18446744073709551600
+ROUND(a,-19) 20000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(23) unsigned');
+ bigint(23) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(23) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` decimal(24,0) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` decimal(24,0) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` decimal(24,0) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` decimal(24,0) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` decimal(24,0) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 18446744073709551615
+ROUND(a,-1) 18446744073709551620
+ROUND(a,-2) 18446744073709551600
+ROUND(a,-19) 20000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+CALL p1('bigint(30) unsigned');
+ bigint(30) unsigned
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` bigint(30) unsigned DEFAULT NULL,
+ `ROUND(a,-1)` decimal(31,0) unsigned DEFAULT NULL,
+ `ROUND(a,-2)` decimal(31,0) unsigned DEFAULT NULL,
+ `ROUND(a,-19)` decimal(31,0) unsigned DEFAULT NULL,
+ `ROUND(a,-20)` decimal(31,0) unsigned DEFAULT NULL,
+ `ROUND(a,-30)` decimal(31,0) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0
+ROUND(a,-1) 0
+ROUND(a,-2) 0
+ROUND(a,-19) 0
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+a 18446744073709551615
+ROUND(a,-1) 18446744073709551620
+ROUND(a,-2) 18446744073709551600
+ROUND(a,-19) 20000000000000000000
+ROUND(a,-20) 0
+ROUND(a,-30) 0
+DROP PROCEDURE p1;
+#
+# MDEV-23366 ROUND(18446744073709551615,rand()*0) returns a wrong result
+#
+SELECT
+ROUND(18446744073709551615,NULL) AS c1,
+ROUND(18446744073709551615,rand()*0) AS c2,
+ROUND(18446744073709551615,rand()*0-19) AS c3;
+c1 NULL
+c2 18446744073709551615
+c3 20000000000000000000
+CREATE OR REPLACE TABLE t1 AS
+SELECT
+ROUND(18446744073709551615,NULL) AS c1,
+ROUND(18446744073709551615,rand()*0) AS c2,
+ROUND(18446744073709551615,rand()*0-19) AS c3;
+SELECT * FROM t1;
+c1 NULL
+c2 18446744073709551615
+c3 20000000000000000000
+SHOW CREATE TABLE t1;
+Table t1
+Create Table CREATE TABLE `t1` (
+ `c1` bigint(20) unsigned DEFAULT NULL,
+ `c2` decimal(21,0) unsigned NOT NULL,
+ `c3` decimal(21,0) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_int.test b/mysql-test/main/type_int.test
index 23e585b4264..3029c8b1375 100644
--- a/mysql-test/main/type_int.test
+++ b/mysql-test/main/type_int.test
@@ -325,3 +325,218 @@ DROP TABLE betweentest;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1+a<=>1+a;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING 1,1;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>1+a' USING 1;
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1+a<=>?+a' USING 1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-15759 Expect "Impossible WHERE" for indexed_int_column=out_of_range_int_constant
+--echo #
+
+CREATE TABLE t1 (a TINYINT, KEY(a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+EXPLAIN SELECT * FROM t1 WHERE a=200;
+EXPLAIN SELECT * FROM t1 WHERE a<=>200;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-8554 Expect "Impossible WHERE" for never true values like a!=a, a<a, a>a
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+
+EXPLAIN SELECT * FROM t1 WHERE a!=a;
+SELECT COUNT(*) FROM t1 WHERE a!=a;
+EXPLAIN SELECT * FROM t1 WHERE a>a;
+SELECT COUNT(*) FROM t1 WHERE a>a;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a<a;
+SELECT COUNT(*) FROM t1 WHERE a<a;
+
+ALTER TABLE t1 MODIFY a TINYINT NOT NULL;
+
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a!=a;
+SELECT COUNT(*) FROM t1 WHERE a!=a;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a>a;
+SELECT COUNT(*) FROM t1 WHERE a>a;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a<a;
+SELECT COUNT(*) FROM t1 WHERE a<a;
+
+--echo #
+--echo # MDEV-8554 Modifing expression doesn't hit "Impossible WHERE" clause
+--echo #
+
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE not (a!=a);
+SELECT COUNT(*) FROM t1 WHERE not (a!=a);
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a>a-1;
+SELECT COUNT(*) FROM t1 WHERE a>a-1;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a<a+1;
+SELECT COUNT(*) FROM t1 WHERE a<a+1;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a-1<a;
+SELECT COUNT(*) FROM t1 WHERE a-1<a;
+
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a NOT LIKE a;
+SELECT COUNT(*) FROM t1 WHERE a NOT LIKE a;
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE a XOR a;
+SELECT COUNT(*) FROM t1 WHERE a XOR a;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23337 Rounding functions create a wrong data type for numeric input
+--echo # MDEV-23350 ROUND(bigint_22_or_longer) returns a wrong data type
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1(t VARCHAR(64))
+BEGIN
+ SELECT t AS ``;
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a TYPE)', 'TYPE', t);
+ INSERT IGNORE INTO t1 VALUES (-100000000000000000000000000000);
+ INSERT IGNORE INTO t1 VALUES (100000000000000000000000000000);
+ CREATE TABLE t2 AS SELECT a, ROUND(a), ROUND(a,1), ROUND(a,10), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1;
+ SHOW CREATE TABLE t2;
+ SELECT * FROM t2;
+ DROP TABLE t1, t2;
+END;
+$$
+DELIMITER ;$$
+
+--vertical_results
+CALL p1('tinyint');
+CALL p1('smallint');
+CALL p1('mediumint');
+CALL p1('int');
+CALL p1('bigint');
+CALL p1('bigint(20)');
+CALL p1('bigint(21)');
+CALL p1('bigint(22)');
+CALL p1('bigint(23)');
+CALL p1('bigint(30)');
+
+CALL p1('tinyint unsigned');
+CALL p1('smallint unsigned');
+CALL p1('mediumint unsigned');
+CALL p1('int unsigned');
+CALL p1('bigint unsigned');
+CALL p1('bigint(20) unsigned');
+CALL p1('bigint(21) unsigned');
+CALL p1('bigint(22) unsigned');
+CALL p1('bigint(23) unsigned');
+CALL p1('bigint(30) unsigned');
+--horizontal_results
+
+DROP PROCEDURE p1;
+
+--echo #
+--echo # MDEV-23368 ROUND(18446744073709551615,-11) returns a wrong result
+--echo #
+
+SELECT ROUND(18446744073709551615,-10), ROUND(18446744073709551615,-11);
+CREATE TABLE t1 AS SELECT ROUND(18446744073709551615,-10), ROUND(18446744073709551615,-11);
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23367 ROUND(18446744073709551615,-1) returns a wrong result
+--echo #
+
+--vertical_results
+SELECT
+ ROUND(18446744073709551615,-1) AS c01,
+ ROUND(18446744073709551615,-19) AS c19;
+
+CREATE OR REPLACE TABLE t1 AS
+SELECT
+ ROUND(18446744073709551615,-1) AS c01,
+ ROUND(18446744073709551615,-19) AS c19;
+
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+--horizontal_results
+
+DELIMITER $$;
+CREATE PROCEDURE p1(t VARCHAR(64))
+BEGIN
+ SELECT t AS ``;
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a TYPE)', 'TYPE', t);
+ INSERT IGNORE INTO t1 VALUES (-100000000000000000000000000000);
+ INSERT IGNORE INTO t1 VALUES (100000000000000000000000000000);
+ CREATE TABLE t2 AS SELECT
+ a, ROUND(a,-1), ROUND(a,-2), ROUND(a,-19), ROUND(a,-20), ROUND(a,-30)
+ FROM t1
+ ORDER BY a;
+ SHOW CREATE TABLE t2;
+ SELECT * FROM t2;
+ DROP TABLE t1, t2;
+END;
+$$
+DELIMITER ;$$
+
+--vertical_results
+CALL p1('tinyint');
+CALL p1('smallint');
+CALL p1('mediumint');
+CALL p1('int');
+CALL p1('bigint');
+CALL p1('bigint(20)');
+CALL p1('bigint(21)');
+CALL p1('bigint(22)');
+CALL p1('bigint(23)');
+CALL p1('bigint(30)');
+
+CALL p1('tinyint unsigned');
+CALL p1('smallint unsigned');
+CALL p1('mediumint unsigned');
+CALL p1('int unsigned');
+CALL p1('bigint unsigned');
+CALL p1('bigint(20) unsigned');
+CALL p1('bigint(21) unsigned');
+CALL p1('bigint(22) unsigned');
+CALL p1('bigint(23) unsigned');
+CALL p1('bigint(30) unsigned');
+--horizontal_results
+
+DROP PROCEDURE p1;
+
+
+--echo #
+--echo # MDEV-23366 ROUND(18446744073709551615,rand()*0) returns a wrong result
+--echo #
+
+--vertical_results
+SELECT
+ ROUND(18446744073709551615,NULL) AS c1,
+ ROUND(18446744073709551615,rand()*0) AS c2,
+ ROUND(18446744073709551615,rand()*0-19) AS c3;
+
+CREATE OR REPLACE TABLE t1 AS
+SELECT
+ ROUND(18446744073709551615,NULL) AS c1,
+ ROUND(18446744073709551615,rand()*0) AS c2,
+ ROUND(18446744073709551615,rand()*0-19) AS c3;
+
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+--horizontal_results
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_interval.result b/mysql-test/main/type_interval.result
new file mode 100644
index 00000000000..65c84022210
--- /dev/null
+++ b/mysql-test/main/type_interval.result
@@ -0,0 +1,83 @@
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-17776 CAST(x AS INTERVAL DAY_SECOND(N))
+#
+CREATE TABLE t1 (a VARCHAR(128));
+INSERT INTO t1 VALUES
+('00:00:00'),
+('+00:00:01'),
+('-00:00:01'),
+('838:59:59'),
+('839:00:00'),
+('2018:01:02'),
+('87649415:59:59'),
+('3652058 23:59:59'),
+('87649416:00:00'),
+('3652059 00:00:00');
+SELECT
+EXTRACT(DAY FROM a) AS d,
+EXTRACT(HOUR FROM a) AS h,
+a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+d h a cast_itds
+0 0 00:00:00 00:00:00.000000
+0 0 +00:00:01 00:00:01.000000
+0 0 -00:00:01 -00:00:01.000000
+34 22 838:59:59 34 22:59:59.000000
+34 23 839:00:00 34 23:00:00.000000
+84 2 2018:01:02 84 02:01:02.000000
+3652058 23 87649415:59:59 3652058 23:59:59.000000
+3652058 23 3652058 23:59:59 3652058 23:59:59.000000
+NULL NULL 87649416:00:00 NULL
+NULL NULL 3652059 00:00:00 NULL
+Warnings:
+Warning 1292 Incorrect interval value: '87649416:00:00'
+Warning 1292 Incorrect interval value: '87649416:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649416:00:00'
+Warning 1292 Incorrect interval value: '3652059 00:00:00'
+Warning 1292 Incorrect interval value: '3652059 00:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '3652059 00:00:00'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(0),
+(1),
+(-1),
+(8385959),
+(8390000),
+(20180102),
+(876494155959),
+(876494160000);
+SELECT
+EXTRACT(DAY FROM a) AS d,
+EXTRACT(HOUR FROM a) AS h,
+a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+d h a cast_itds
+0 0 0.000000000 00:00:00.000000
+0 0 1.000000000 00:00:01.000000
+0 0 -1.000000000 -00:00:01.000000
+34 22 8385959.000000000 34 22:59:59.000000
+34 23 8390000.000000000 34 23:00:00.000000
+84 2 20180102.000000000 84 02:01:02.000000
+3652058 23 876494155959.000000000 3652058 23:59:59.000000
+NULL NULL 876494160000.000000000 NULL
+Warnings:
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '1.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '-1.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8390000.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '20180102.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494155959.000000000'
+Warning 1292 Incorrect interval value: '876494160000.000000000' for column `test`.`t1`.`a` at row 8
+Warning 1292 Incorrect interval value: '876494160000.000000000' for column `test`.`t1`.`a` at row 8
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '876494160000.000000000'
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_interval.test b/mysql-test/main/type_interval.test
new file mode 100644
index 00000000000..15999dc609d
--- /dev/null
+++ b/mysql-test/main/type_interval.test
@@ -0,0 +1,54 @@
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-17776 CAST(x AS INTERVAL DAY_SECOND(N))
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(128));
+INSERT INTO t1 VALUES
+('00:00:00'),
+('+00:00:01'),
+('-00:00:01'),
+('838:59:59'),
+('839:00:00'),
+('2018:01:02'),
+('87649415:59:59'),
+('3652058 23:59:59'),
+('87649416:00:00'),
+('3652059 00:00:00');
+
+SELECT
+ EXTRACT(DAY FROM a) AS d,
+ EXTRACT(HOUR FROM a) AS h,
+ a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(0),
+(1),
+(-1),
+(8385959),
+(8390000),
+(20180102),
+(876494155959),
+(876494160000);
+
+SELECT
+ EXTRACT(DAY FROM a) AS d,
+ EXTRACT(HOUR FROM a) AS h,
+ a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_json.result b/mysql-test/main/type_json.result
index 0045847097b..96e96cca404 100644
--- a/mysql-test/main/type_json.result
+++ b/mysql-test/main/type_json.result
@@ -2,7 +2,7 @@ create or replace table t1(a json);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+ `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`a`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1(a json character set utf8);
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 'character set utf8)' at line 1
@@ -10,7 +10,7 @@ create or replace table t1(a json default '{a:1}');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '{a:1}'
+ `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '{a:1}' CHECK (json_valid(`a`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1(a json not null check (json_valid(a)));
show create table t1;
@@ -21,18 +21,79 @@ t1 CREATE TABLE `t1` (
insert t1 values ('[]');
insert t1 values ('a');
ERROR 23000: CONSTRAINT `t1.a` failed for `test`.`t1`
+create or replace table t1(a json not null);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`a`))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t1 values ('[]');
+insert t1 values ('a');
+ERROR 23000: CONSTRAINT `t1.a` failed for `test`.`t1`
set timestamp=unix_timestamp('2010:11:12 13:14:15');
create or replace table t1(a json default(json_object('now', now())));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT json_object('now',current_timestamp())
+ `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT json_object('now',current_timestamp()) CHECK (json_valid(`a`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert t1 values ();
select * from t1;
a
{"now": "2010-11-12 13:14:15"}
drop table t1;
+create table t1 (t json) as select json_quote('foo') as t;
+create table t2 (a json) as select json_quote('foo') as t;
+create table t3 like t1;
+select * from t1;
+t
+"foo"
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`t`))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`a`)),
+ `t` varchar(38) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `t` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`t`))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1,t2,t3;
+create table t1 (t json check (length(t) > 0));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (octet_length(`t`) > 0)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (t text) engine=myisam;
+insert into t1 values ("{}"),("");
+create table t2 (t json) select t from t1;
+ERROR 23000: CONSTRAINT `t2.t` failed for `test`.`t2`
+select * from t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+drop table t1;
+create or replace table t1(a json default(json_object('now', 1)) check (json_valid(a)));
+insert into t1 values ();
+insert into t1 values ("{}");
+insert into t1 values ("xxx");
+ERROR 23000: CONSTRAINT `t1.a` failed for `test`.`t1`
+select * from t1;
+a
+{"now": 1}
+{}
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT json_object('now',1) CHECK (json_valid(`a`))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
select cast('{a:1}' as text);
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 'text)' at line 1
select cast('{a:1}' as json);
diff --git a/mysql-test/main/type_json.test b/mysql-test/main/type_json.test
index 0cff9366145..bd13dc1fcf4 100644
--- a/mysql-test/main/type_json.test
+++ b/mysql-test/main/type_json.test
@@ -17,12 +17,47 @@ insert t1 values ('[]');
--error ER_CONSTRAINT_FAILED
insert t1 values ('a');
+create or replace table t1(a json not null);
+show create table t1;
+insert t1 values ('[]');
+--error ER_CONSTRAINT_FAILED
+insert t1 values ('a');
+
set timestamp=unix_timestamp('2010:11:12 13:14:15');
create or replace table t1(a json default(json_object('now', now())));
show create table t1;
insert t1 values ();
select * from t1;
+drop table t1;
+
+create table t1 (t json) as select json_quote('foo') as t;
+create table t2 (a json) as select json_quote('foo') as t;
+create table t3 like t1;
+select * from t1;
+show create table t1;
+show create table t2;
+show create table t3;
+drop table t1,t2,t3;
+create table t1 (t json check (length(t) > 0));
+show create table t1;
+drop table t1;
+
+create table t1 (t text) engine=myisam;
+insert into t1 values ("{}"),("");
+--error ER_CONSTRAINT_FAILED
+create table t2 (t json) select t from t1;
+--error ER_NO_SUCH_TABLE
+select * from t2;
+drop table t1;
+
+create or replace table t1(a json default(json_object('now', 1)) check (json_valid(a)));
+insert into t1 values ();
+insert into t1 values ("{}");
+--error ER_CONSTRAINT_FAILED
+insert into t1 values ("xxx");
+select * from t1;
+show create table t1;
drop table t1;
--error ER_PARSE_ERROR
diff --git a/mysql-test/main/type_newdecimal.result b/mysql-test/main/type_newdecimal.result
index 57b385eb8da..b76ba029ad6 100644
--- a/mysql-test/main/type_newdecimal.result
+++ b/mysql-test/main/type_newdecimal.result
@@ -2482,3 +2482,323 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-23032 FLOOR()/CEIL() incorrectly calculate the precision of a DECIMAL(M,D) column.
+#
+CREATE PROCEDURE p1(prec INT, scale INT, suffix VARCHAR(32))
+BEGIN
+EXECUTE IMMEDIATE CONCAT('CREATE TABLE t1 (a decimal(',prec,',',scale,')',suffix,')');
+INSERT IGNORE INTO t1 VALUES (-1e100), (+1e100);
+CREATE TABLE t2 AS SELECT
+a,
+FLOOR(a) AS fa,
+CEILING(a) AS ca,
+LENGTH(FLOOR(a)),
+LENGTH(CEILING(a))
+FROM t1 ORDER BY a;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+DROP TABLE t2, t1;
+END;
+$$
+CALL p1(38,10,'');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(38,10) DEFAULT NULL,
+ `fa` decimal(29,0) DEFAULT NULL,
+ `ca` decimal(29,0) DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9999999999999999999999999999.9999999999
+fa -10000000000000000000000000000
+ca -9999999999999999999999999999
+LENGTH(FLOOR(a)) 30
+LENGTH(CEILING(a)) 29
+a 9999999999999999999999999999.9999999999
+fa 9999999999999999999999999999
+ca 10000000000000000000000000000
+LENGTH(FLOOR(a)) 28
+LENGTH(CEILING(a)) 29
+CALL p1(28,10,'');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(28,10) DEFAULT NULL,
+ `fa` decimal(19,0) DEFAULT NULL,
+ `ca` decimal(19,0) DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -999999999999999999.9999999999
+fa -1000000000000000000
+ca -999999999999999999
+LENGTH(FLOOR(a)) 20
+LENGTH(CEILING(a)) 19
+a 999999999999999999.9999999999
+fa 999999999999999999
+ca 1000000000000000000
+LENGTH(FLOOR(a)) 18
+LENGTH(CEILING(a)) 19
+CALL p1(27,10,'');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(27,10) DEFAULT NULL,
+ `fa` bigint(19) DEFAULT NULL,
+ `ca` bigint(19) DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -99999999999999999.9999999999
+fa -100000000000000000
+ca -99999999999999999
+LENGTH(FLOOR(a)) 19
+LENGTH(CEILING(a)) 18
+a 99999999999999999.9999999999
+fa 99999999999999999
+ca 100000000000000000
+LENGTH(FLOOR(a)) 17
+LENGTH(CEILING(a)) 18
+CALL p1(20,10,'');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(20,10) DEFAULT NULL,
+ `fa` bigint(12) DEFAULT NULL,
+ `ca` bigint(12) DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -9999999999.9999999999
+fa -10000000000
+ca -9999999999
+LENGTH(FLOOR(a)) 12
+LENGTH(CEILING(a)) 11
+a 9999999999.9999999999
+fa 9999999999
+ca 10000000000
+LENGTH(FLOOR(a)) 10
+LENGTH(CEILING(a)) 11
+CALL p1(19,10,'');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(19,10) DEFAULT NULL,
+ `fa` bigint(11) DEFAULT NULL,
+ `ca` bigint(11) DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -999999999.9999999999
+fa -1000000000
+ca -999999999
+LENGTH(FLOOR(a)) 11
+LENGTH(CEILING(a)) 10
+a 999999999.9999999999
+fa 999999999
+ca 1000000000
+LENGTH(FLOOR(a)) 9
+LENGTH(CEILING(a)) 10
+CALL p1(18,10,'');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(18,10) DEFAULT NULL,
+ `fa` int(10) DEFAULT NULL,
+ `ca` int(10) DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -99999999.9999999999
+fa -100000000
+ca -99999999
+LENGTH(FLOOR(a)) 10
+LENGTH(CEILING(a)) 9
+a 99999999.9999999999
+fa 99999999
+ca 100000000
+LENGTH(FLOOR(a)) 8
+LENGTH(CEILING(a)) 9
+CALL p1(10,10,'');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(10,10) DEFAULT NULL,
+ `fa` int(2) DEFAULT NULL,
+ `ca` int(2) DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a -0.9999999999
+fa -1
+ca 0
+LENGTH(FLOOR(a)) 2
+LENGTH(CEILING(a)) 1
+a 0.9999999999
+fa 0
+ca 1
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+CALL p1(38,10,' UNSIGNED');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(38,10) unsigned DEFAULT NULL,
+ `fa` decimal(28,0) unsigned DEFAULT NULL,
+ `ca` decimal(29,0) unsigned DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0.0000000000
+fa 0
+ca 0
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+a 9999999999999999999999999999.9999999999
+fa 9999999999999999999999999999
+ca 10000000000000000000000000000
+LENGTH(FLOOR(a)) 28
+LENGTH(CEILING(a)) 29
+CALL p1(28,10,' UNSIGNED');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(28,10) unsigned DEFAULT NULL,
+ `fa` bigint(18) unsigned DEFAULT NULL,
+ `ca` decimal(19,0) unsigned DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0.0000000000
+fa 0
+ca 0
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+a 999999999999999999.9999999999
+fa 999999999999999999
+ca 1000000000000000000
+LENGTH(FLOOR(a)) 18
+LENGTH(CEILING(a)) 19
+CALL p1(27,10,' UNSIGNED');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(27,10) unsigned DEFAULT NULL,
+ `fa` bigint(17) unsigned DEFAULT NULL,
+ `ca` bigint(18) unsigned DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0.0000000000
+fa 0
+ca 0
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+a 99999999999999999.9999999999
+fa 99999999999999999
+ca 100000000000000000
+LENGTH(FLOOR(a)) 17
+LENGTH(CEILING(a)) 18
+CALL p1(20,10,' UNSIGNED');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(20,10) unsigned DEFAULT NULL,
+ `fa` bigint(10) unsigned DEFAULT NULL,
+ `ca` bigint(11) unsigned DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0.0000000000
+fa 0
+ca 0
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+a 9999999999.9999999999
+fa 9999999999
+ca 10000000000
+LENGTH(FLOOR(a)) 10
+LENGTH(CEILING(a)) 11
+CALL p1(19,10,' UNSIGNED');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(19,10) unsigned DEFAULT NULL,
+ `fa` int(9) unsigned DEFAULT NULL,
+ `ca` bigint(10) unsigned DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0.0000000000
+fa 0
+ca 0
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+a 999999999.9999999999
+fa 999999999
+ca 1000000000
+LENGTH(FLOOR(a)) 9
+LENGTH(CEILING(a)) 10
+CALL p1(18,10,' UNSIGNED');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(18,10) unsigned DEFAULT NULL,
+ `fa` int(8) unsigned DEFAULT NULL,
+ `ca` int(9) unsigned DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0.0000000000
+fa 0
+ca 0
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+a 99999999.9999999999
+fa 99999999
+ca 100000000
+LENGTH(FLOOR(a)) 8
+LENGTH(CEILING(a)) 9
+CALL p1(10,10,' UNSIGNED');
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(10,10) unsigned DEFAULT NULL,
+ `fa` int(1) unsigned DEFAULT NULL,
+ `ca` int(1) unsigned DEFAULT NULL,
+ `LENGTH(FLOOR(a))` int(10) DEFAULT NULL,
+ `LENGTH(CEILING(a))` int(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+a 0.0000000000
+fa 0
+ca 0
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+a 0.9999999999
+fa 0
+ca 1
+LENGTH(FLOOR(a)) 1
+LENGTH(CEILING(a)) 1
+DROP PROCEDURE p1;
+#
+# MDEV-23118 FORMAT(d1,dec) where dec=0/38 and d1 is DECIMAL(38,38) gives incorrect results
+#
+CREATE OR REPLACE TABLE t1 (a DECIMAL(38,38));
+INSERT INTO t1 VALUES (-0.9999999999999999999999999999999999999), (0.9999999999999999999999999999999999999);
+SELECT a, FORMAT(a,0), FORMAT(a,38) FROM t1;
+a -0.99999999999999999999999999999999999990
+FORMAT(a,0) -1
+FORMAT(a,38) -0.99999999999999999999999999999999999990
+a 0.99999999999999999999999999999999999990
+FORMAT(a,0) 1
+FORMAT(a,38) 0.99999999999999999999999999999999999990
+CREATE OR REPLACE TABLE t2 AS SELECT a, FORMAT(a,0), FORMAT(a,38) FROM t1;
+SELECT * FROM t2;
+a -0.99999999999999999999999999999999999990
+FORMAT(a,0) -1
+FORMAT(a,38) -0.99999999999999999999999999999999999990
+a 0.99999999999999999999999999999999999990
+FORMAT(a,0) 1
+FORMAT(a,38) 0.99999999999999999999999999999999999990
+SHOW CREATE TABLE t2;
+Table t2
+Create Table CREATE TABLE `t2` (
+ `a` decimal(38,38) DEFAULT NULL,
+ `FORMAT(a,0)` varchar(2) DEFAULT NULL,
+ `FORMAT(a,38)` varchar(41) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2,t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_newdecimal.test b/mysql-test/main/type_newdecimal.test
index a5cb15e1a2c..011c6dbc743 100644
--- a/mysql-test/main/type_newdecimal.test
+++ b/mysql-test/main/type_newdecimal.test
@@ -1916,3 +1916,70 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-23032 FLOOR()/CEIL() incorrectly calculate the precision of a DECIMAL(M,D) column.
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE p1(prec INT, scale INT, suffix VARCHAR(32))
+BEGIN
+ EXECUTE IMMEDIATE CONCAT('CREATE TABLE t1 (a decimal(',prec,',',scale,')',suffix,')');
+ INSERT IGNORE INTO t1 VALUES (-1e100), (+1e100);
+ CREATE TABLE t2 AS SELECT
+ a,
+ FLOOR(a) AS fa,
+ CEILING(a) AS ca,
+ LENGTH(FLOOR(a)),
+ LENGTH(CEILING(a))
+ FROM t1 ORDER BY a;
+ SHOW CREATE TABLE t2;
+ SELECT * FROM t2;
+ DROP TABLE t2, t1;
+END;
+$$
+DELIMITER ;$$
+
+--vertical_results
+CALL p1(38,10,'');
+CALL p1(28,10,'');
+CALL p1(27,10,'');
+CALL p1(20,10,'');
+CALL p1(19,10,'');
+CALL p1(18,10,'');
+CALL p1(10,10,'');
+
+CALL p1(38,10,' UNSIGNED');
+CALL p1(28,10,' UNSIGNED');
+CALL p1(27,10,' UNSIGNED');
+CALL p1(20,10,' UNSIGNED');
+CALL p1(19,10,' UNSIGNED');
+CALL p1(18,10,' UNSIGNED');
+CALL p1(10,10,' UNSIGNED');
+
+--horizontal_results
+
+DROP PROCEDURE p1;
+
+
+--echo #
+--echo # MDEV-23118 FORMAT(d1,dec) where dec=0/38 and d1 is DECIMAL(38,38) gives incorrect results
+--echo #
+
+--vertical_results
+CREATE OR REPLACE TABLE t1 (a DECIMAL(38,38));
+INSERT INTO t1 VALUES (-0.9999999999999999999999999999999999999), (0.9999999999999999999999999999999999999);
+SELECT a, FORMAT(a,0), FORMAT(a,38) FROM t1;
+CREATE OR REPLACE TABLE t2 AS SELECT a, FORMAT(a,0), FORMAT(a,38) FROM t1;
+SELECT * FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t2,t1;
+--horizontal_results
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_num.result b/mysql-test/main/type_num.result
index 6577143859d..849190b68f4 100644
--- a/mysql-test/main/type_num.result
+++ b/mysql-test/main/type_num.result
@@ -565,7 +565,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='1 ';
COUNT(*)
2
Warnings:
-Note 1292 Truncated incorrect DOUBLE value: '1 '
+Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE d='1 ';
COUNT(*)
2
@@ -600,7 +600,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE d='';
COUNT(*)
2
@@ -635,7 +635,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='x';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE d='x';
COUNT(*)
2
@@ -670,7 +670,7 @@ SELECT COUNT(*) FROM t1 WHERE i8=' x';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: ' x'
+Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE d=' x';
COUNT(*)
2
@@ -705,7 +705,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='.';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '.'
+Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE d='.';
COUNT(*)
2
@@ -740,7 +740,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='-';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '-'
+Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE d='-';
COUNT(*)
2
@@ -775,7 +775,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='+';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '+'
+Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE d='+';
COUNT(*)
2
@@ -810,7 +810,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='1x';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1x'
+Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE d='1x';
COUNT(*)
2
@@ -845,7 +845,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='1e';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1e'
+Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE d='1e';
COUNT(*)
2
@@ -880,7 +880,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='1e+';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1e+'
+Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE d='1e+';
COUNT(*)
2
@@ -915,7 +915,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='1E-';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1E-'
+Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE d='1E-';
COUNT(*)
2
@@ -950,7 +950,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='1Ex';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1Ex'
+Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE d='1Ex';
COUNT(*)
2
@@ -985,7 +985,7 @@ SELECT COUNT(*) FROM t1 WHERE i8='1e+x';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1e+x'
+Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE d='1e+x';
COUNT(*)
2
@@ -1060,7 +1060,7 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(i8) WHERE i8='1 ';
COUNT(*)
2
Warnings:
-Note 1292 Truncated incorrect DOUBLE value: '1 '
+Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d='1 ';
COUNT(*)
2
@@ -1085,7 +1085,7 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(i8) WHERE i8='';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d='';
COUNT(*)
2
diff --git a/mysql-test/main/type_set.result b/mysql-test/main/type_set.result
index 76a0c343973..5f54521c9dc 100644
--- a/mysql-test/main/type_set.result
+++ b/mysql-test/main/type_set.result
@@ -358,3 +358,24 @@ DROP TABLE t1;
SET NAMES utf8;
CREATE TABLE t1 (a SET('a,bü'));
ERROR 22007: Illegal set 'a,bü' value found during parsing
+#
+# MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument
+#
+CREATE TABLE t1 (a SET('999999999999999999999999999999999999999999999999999999999999'));
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS
+SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` set('999999999999999999999999999999999999999999999999999999999999') DEFAULT NULL,
+ `FLOOR(a)` int(5) unsigned DEFAULT NULL,
+ `CEILING(a)` int(5) unsigned DEFAULT NULL,
+ `TRUNCATE(a,0)` int(5) unsigned DEFAULT NULL,
+ `ROUND(a)` int(5) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a)
+999999999999999999999999999999999999999999999999999999999999 1 1 1 1
+DROP TABLE t2;
+DROP TABLE t1;
diff --git a/mysql-test/main/type_set.test b/mysql-test/main/type_set.test
index 8a81c406c63..2d0c81340ae 100644
--- a/mysql-test/main/type_set.test
+++ b/mysql-test/main/type_set.test
@@ -248,3 +248,16 @@ DROP TABLE t1;
SET NAMES utf8;
--error ER_ILLEGAL_VALUE_FOR_TYPE
CREATE TABLE t1 (a SET('a,bü'));
+
+--echo #
+--echo # MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument
+--echo #
+
+CREATE TABLE t1 (a SET('999999999999999999999999999999999999999999999999999999999999'));
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS
+ SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+DROP TABLE t2;
+DROP TABLE t1;
diff --git a/mysql-test/main/type_temporal_innodb.result b/mysql-test/main/type_temporal_innodb.result
index c129f4810e2..b11ea8476bd 100644
--- a/mysql-test/main/type_temporal_innodb.result
+++ b/mysql-test/main/type_temporal_innodb.result
@@ -56,7 +56,7 @@ SELECT DATE'0000-00-00'='';
DATE'0000-00-00'=''
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
CREATE TABLE t1 (a ENUM('a'), b DATE, c INT, KEY(b)) ENGINE=InnoDB;
INSERT IGNORE INTO t1 VALUES ('','0000-00-00',0);
Warnings:
@@ -65,49 +65,49 @@ SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
ALTER TABLE t1 ENGINE=MyISAM;
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
DROP TABLE t1;
SELECT TIMESTAMP'0000-00-00 00:00:00'='';
TIMESTAMP'0000-00-00 00:00:00'=''
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
CREATE TABLE t1 (a ENUM('a'), b DATETIME, c INT, KEY(b)) ENGINE=InnoDB;
INSERT IGNORE INTO t1 VALUES ('','0000-00-00 00:00:00',0);
Warnings:
@@ -116,43 +116,43 @@ SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
ALTER TABLE t1 ENGINE=MyISAM;
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT * FROM t1 WHERE a=b;
a b c
0000-00-00 00:00:00 0
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
DROP TABLE t1;
CREATE TABLE t1 (d DATE) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('2012-12-21');
@@ -175,3 +175,16 @@ SET sql_mode=DEFAULT;
#
# End of 10.3 tests
#
+#
+# MDEV-19166 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv
+#
+CREATE TABLE t1 (f TIMESTAMP DEFAULT 0) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('2024-02-29');
+SELECT * FROM t1 WHERE SUBSTR(1 FROM BIT_LENGTH(f) FOR DEFAULT(f));
+f
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: ''
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_temporal_innodb.test b/mysql-test/main/type_temporal_innodb.test
index 94f61d54634..4adaa483ca2 100644
--- a/mysql-test/main/type_temporal_innodb.test
+++ b/mysql-test/main/type_temporal_innodb.test
@@ -85,3 +85,16 @@ SET sql_mode=DEFAULT;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-19166 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv
+--echo #
+
+CREATE TABLE t1 (f TIMESTAMP DEFAULT 0) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('2024-02-29');
+SELECT * FROM t1 WHERE SUBSTR(1 FROM BIT_LENGTH(f) FOR DEFAULT(f));
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_temporal_mysql56_debug.result b/mysql-test/main/type_temporal_mysql56_debug.result
new file mode 100644
index 00000000000..a6a6c071ea3
--- /dev/null
+++ b/mysql-test/main/type_temporal_mysql56_debug.result
@@ -0,0 +1,416 @@
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16542 Fix ALTER TABLE FORCE to upgrade temporal types
+#
+CREATE PROCEDURE mdev16542_create_select()
+BEGIN
+SELECT '# CREATE..SELECT and SHOW' AS ``;
+CREATE TABLE t2 AS SELECT
+a0, a1, a2, a3, a4, a5, a6,
+COALESCE(a0),
+COALESCE(a1),
+COALESCE(a2),
+COALESCE(a3),
+COALESCE(a4),
+COALESCE(a5),
+COALESCE(a6)
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+END;
+$$
+CREATE PROCEDURE mdev16542_alter_force_and_show()
+BEGIN
+SELECT '# ALTER..FORCE and SHOW' AS ``;
+ALTER TABLE t1 FORCE;
+SHOW CREATE TABLE t1;
+END;
+$$
+CREATE PROCEDURE mdev16542()
+BEGIN
+SET SESSION debug_dbug="+d,sql_type";
+SELECT '# Original table' AS ``;
+SHOW CREATE TABLE t1;
+CALL mdev16542_create_select();
+CALL mdev16542_alter_force_and_show();
+SELECT '# Setting @@global.mysql56_temporal_format=false' AS ``;
+SET @@global.mysql56_temporal_format=false;
+CALL mdev16542_create_select();
+CALL mdev16542_alter_force_and_show();
+SELECT '# Setting @@global.mysql56_temporal_format=true' AS ``;
+SET @@global.mysql56_temporal_format=true;
+CALL mdev16542_create_select();
+CALL mdev16542_alter_force_and_show();
+SET SESSION debug_dbug="-d,sql_type";
+END;
+$$
+SET @@global.mysql56_temporal_format=true;
+CREATE TABLE t1 (
+a0 TIME,
+a1 TIME(1),
+a2 TIME(2),
+a3 TIME(3),
+a4 TIME(4),
+a5 TIME(5),
+a6 TIME(6)
+);
+CALL mdev16542;
+
+# Original table
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# Setting @@global.mysql56_temporal_format=false
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` time /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` time(6) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a0)` time /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a1)` time(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a2)` time(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a3)` time(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a4)` time(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a5)` time(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a6)` time(6) /* mariadb-5.3 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` time /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` time(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` time(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` time(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` time(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` time(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` time(6) /* mariadb-5.3 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# Setting @@global.mysql56_temporal_format=true
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` time /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` time(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` time /* mysql-5.6 */ DEFAULT NULL,
+ `a1` time(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` time(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` time(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` time(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` time(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` time(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (
+a0 DATETIME,
+a1 DATETIME(1),
+a2 DATETIME(2),
+a3 DATETIME(3),
+a4 DATETIME(4),
+a5 DATETIME(5),
+a6 DATETIME(6)
+);
+CALL mdev16542;
+
+# Original table
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# Setting @@global.mysql56_temporal_format=false
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a0)` datetime /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a1)` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a2)` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a3)` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a4)` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a5)` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `COALESCE(a6)` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` datetime /* mariadb-5.3 */ DEFAULT NULL,
+ `a1` datetime(1) /* mariadb-5.3 */ DEFAULT NULL,
+ `a2` datetime(2) /* mariadb-5.3 */ DEFAULT NULL,
+ `a3` datetime(3) /* mariadb-5.3 */ DEFAULT NULL,
+ `a4` datetime(4) /* mariadb-5.3 */ DEFAULT NULL,
+ `a5` datetime(5) /* mariadb-5.3 */ DEFAULT NULL,
+ `a6` datetime(6) /* mariadb-5.3 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# Setting @@global.mysql56_temporal_format=true
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a0)` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a1)` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a2)` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a3)` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a4)` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a5)` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `COALESCE(a6)` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` datetime /* mysql-5.6 */ DEFAULT NULL,
+ `a1` datetime(1) /* mysql-5.6 */ DEFAULT NULL,
+ `a2` datetime(2) /* mysql-5.6 */ DEFAULT NULL,
+ `a3` datetime(3) /* mysql-5.6 */ DEFAULT NULL,
+ `a4` datetime(4) /* mysql-5.6 */ DEFAULT NULL,
+ `a5` datetime(5) /* mysql-5.6 */ DEFAULT NULL,
+ `a6` datetime(6) /* mysql-5.6 */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (
+a0 TIMESTAMP,
+a1 TIMESTAMP(1),
+a2 TIMESTAMP(2),
+a3 TIMESTAMP(3),
+a4 TIMESTAMP(4),
+a5 TIMESTAMP(5),
+a6 TIMESTAMP(6)
+);
+CALL mdev16542;
+
+# Original table
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# Setting @@global.mysql56_temporal_format=false
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `COALESCE(a0)` timestamp /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a1)` timestamp(1) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a2)` timestamp(2) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a3)` timestamp(3) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a4)` timestamp(4) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a5)` timestamp(5) /* mariadb-5.3 */ NULL DEFAULT NULL,
+ `COALESCE(a6)` timestamp(6) /* mariadb-5.3 */ NULL DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` timestamp /* mariadb-5.3 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# Setting @@global.mysql56_temporal_format=true
+
+# CREATE..SELECT and SHOW
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `COALESCE(a0)` timestamp /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a1)` timestamp(1) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a2)` timestamp(2) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a3)` timestamp(3) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a4)` timestamp(4) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a5)` timestamp(5) /* mysql-5.6 */ NULL DEFAULT NULL,
+ `COALESCE(a6)` timestamp(6) /* mysql-5.6 */ NULL DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+
+# ALTER..FORCE and SHOW
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a0` timestamp /* mysql-5.6 */ NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a1` timestamp(1) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0',
+ `a2` timestamp(2) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00',
+ `a3` timestamp(3) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000',
+ `a4` timestamp(4) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
+ `a5` timestamp(5) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
+ `a6` timestamp(6) /* mysql-5.6 */ NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=DEFAULT;
+DROP PROCEDURE mdev16542;
+DROP PROCEDURE mdev16542_create_select;
+DROP PROCEDURE mdev16542_alter_force_and_show;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_temporal_mysql56_debug.test b/mysql-test/main/type_temporal_mysql56_debug.test
new file mode 100644
index 00000000000..12edde94598
--- /dev/null
+++ b/mysql-test/main/type_temporal_mysql56_debug.test
@@ -0,0 +1,107 @@
+--source include/have_debug.inc
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16542 Fix ALTER TABLE FORCE to upgrade temporal types
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE mdev16542_create_select()
+BEGIN
+ SELECT '# CREATE..SELECT and SHOW' AS ``;
+ CREATE TABLE t2 AS SELECT
+ a0, a1, a2, a3, a4, a5, a6,
+ COALESCE(a0),
+ COALESCE(a1),
+ COALESCE(a2),
+ COALESCE(a3),
+ COALESCE(a4),
+ COALESCE(a5),
+ COALESCE(a6)
+ FROM t1;
+ SHOW CREATE TABLE t2;
+ DROP TABLE t2;
+END;
+$$
+
+CREATE PROCEDURE mdev16542_alter_force_and_show()
+BEGIN
+ SELECT '# ALTER..FORCE and SHOW' AS ``;
+ ALTER TABLE t1 FORCE;
+ SHOW CREATE TABLE t1;
+END;
+$$
+
+CREATE PROCEDURE mdev16542()
+BEGIN
+ SET SESSION debug_dbug="+d,sql_type";
+ SELECT '# Original table' AS ``;
+ SHOW CREATE TABLE t1;
+ CALL mdev16542_create_select();
+ CALL mdev16542_alter_force_and_show();
+
+ SELECT '# Setting @@global.mysql56_temporal_format=false' AS ``;
+ SET @@global.mysql56_temporal_format=false;
+ CALL mdev16542_create_select();
+ CALL mdev16542_alter_force_and_show();
+
+ SELECT '# Setting @@global.mysql56_temporal_format=true' AS ``;
+ SET @@global.mysql56_temporal_format=true;
+ CALL mdev16542_create_select();
+ CALL mdev16542_alter_force_and_show();
+ SET SESSION debug_dbug="-d,sql_type";
+END;
+$$
+DELIMITER ;$$
+
+SET @@global.mysql56_temporal_format=true;
+
+CREATE TABLE t1 (
+ a0 TIME,
+ a1 TIME(1),
+ a2 TIME(2),
+ a3 TIME(3),
+ a4 TIME(4),
+ a5 TIME(5),
+ a6 TIME(6)
+);
+CALL mdev16542;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (
+ a0 DATETIME,
+ a1 DATETIME(1),
+ a2 DATETIME(2),
+ a3 DATETIME(3),
+ a4 DATETIME(4),
+ a5 DATETIME(5),
+ a6 DATETIME(6)
+);
+CALL mdev16542;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (
+ a0 TIMESTAMP,
+ a1 TIMESTAMP(1),
+ a2 TIMESTAMP(2),
+ a3 TIMESTAMP(3),
+ a4 TIMESTAMP(4),
+ a5 TIMESTAMP(5),
+ a6 TIMESTAMP(6)
+);
+CALL mdev16542;
+DROP TABLE t1;
+
+SET @@global.mysql56_temporal_format=DEFAULT;
+DROP PROCEDURE mdev16542;
+DROP PROCEDURE mdev16542_create_select;
+DROP PROCEDURE mdev16542_alter_force_and_show;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_time.result b/mysql-test/main/type_time.result
index 4227edf02e8..e383704fdb8 100644
--- a/mysql-test/main/type_time.result
+++ b/mysql-test/main/type_time.result
@@ -188,7 +188,7 @@ create table t1(f1 time);
insert into t1 values ('23:38:57');
select f1, f1 = '2010-10-11 23:38:57' from t1;
f1 f1 = '2010-10-11 23:38:57'
-23:38:57 0
+23:38:57 1
drop table t1;
#
# MDEV-4634 Crash in CONVERT_TZ
@@ -841,6 +841,18 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-00-01 10:20:30' and octet_length(`test`.`t1`.`a`) = 30 + rand()
+EXPLAIN EXTENDED
+SELECT * FROM t1 WHERE a=TIMESTAMP'0000-01-00 10:20:30' AND LENGTH(a)=8;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-01-00 10:20:30' and octet_length(`test`.`t1`.`a`) = 8
+EXPLAIN EXTENDED
+SELECT * FROM t1 WHERE a=TIMESTAMP'0001-00-00 10:20:30' AND LENGTH(a)=8;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0001-00-00 10:20:30' and octet_length(`test`.`t1`.`a`) = 8
# Old mode, TIMESTAMP-alike string literal, zero YYYYMMDD, Ok to propagate
SELECT * FROM t1 WHERE a='0000-00-00 10:20:30';
a
@@ -1364,7 +1376,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1995.0000000 BETWEEN f AND '23:59:59';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index f f 4 NULL 2 50.00 Using where; Using index
Warnings:
-Warning 1292 Incorrect datetime value: '1995.0000000'
+Warning 1292 Truncated incorrect time value: '1995.0000000'
Note 1003 select `test`.`t1`.`f` AS `f` from `test`.`t1` where '00:00:00.000000' between `test`.`t1`.`f` and <cache>('23:59:59')
DROP TABLE t1;
#
@@ -1541,9 +1553,9 @@ GREATEST('2010-01-01 10:10:10',TIME('-20:20:20')) AS gt_minus20_implicit,
GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-20:20:20')) AS gt_minis20_explicit,
GREATEST('2010-01-01 10:10:10',TIME('20:20:20')) AS gt_plus20_implicit,
GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('20:20:20')) AS gt_plus20_explicit;
-gt_minus20_implicit 10:10:10.000000
+gt_minus20_implicit 10:10:10
gt_minis20_explicit 10:10:10.000000
-gt_plus20_implicit 20:20:20.000000
+gt_plus20_implicit 20:20:20
gt_plus20_explicit 20:20:20.000000
SELECT
HOUR(GREATEST('2010-01-01 10:10:10',TIME('-20:20:20'))) AS gt_minus20_implicit,
@@ -1559,9 +1571,9 @@ LEAST('2010-01-01 10:10:10',TIME('-20:20:20')) AS lt_minus20_implicit,
LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-20:20:20')) AS lt_minus20_explicit,
LEAST('2010-01-01 10:10:10',TIME('20:20:20')) AS lt_plus20_implicit,
LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('20:20:20')) AS lt_plus20_explicit;
-lt_minus20_implicit -20:20:20.000000
+lt_minus20_implicit -20:20:20
lt_minus20_explicit -20:20:20.000000
-lt_plus20_implicit 10:10:10.000000
+lt_plus20_implicit 10:10:10
lt_plus20_explicit 10:10:10.000000
SELECT
HOUR(LEAST('2010-01-01 10:10:10',TIME('-20:20:20'))) AS lt_minus20_implicit,
@@ -1577,9 +1589,9 @@ GREATEST('2010-01-01 10:10:10',TIME('-200:20:20')) AS gt_minus200_implicit,
GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-200:20:20')) AS gt_minus200_explictit,
GREATEST('2010-01-01 10:10:10',TIME('200:20:20')) AS gt_plus200_implicit,
GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('200:20:20')) AS gt_plus200_explicit;
-gt_minus200_implicit 10:10:10.000000
+gt_minus200_implicit 10:10:10
gt_minus200_explictit 10:10:10.000000
-gt_plus200_implicit 200:20:20.000000
+gt_plus200_implicit 200:20:20
gt_plus200_explicit 200:20:20.000000
SELECT
HOUR(GREATEST('2010-01-01 10:10:10',TIME('-200:20:20'))) AS gt_minus200_implicit,
@@ -1595,9 +1607,9 @@ LEAST('2010-01-01 10:10:10',TIME('-200:20:20')) AS lt_minus200_implicit,
LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-200:20:20')) AS lt_minus200_explictit,
LEAST('2010-01-01 10:10:10',TIME('200:20:20')) AS lt_plus200_implicit,
LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('200:20:20')) AS lt_plus200_explicit;
-lt_minus200_implicit -200:20:20.000000
+lt_minus200_implicit -200:20:20
lt_minus200_explictit -200:20:20.000000
-lt_plus200_implicit 10:10:10.000000
+lt_plus200_implicit 10:10:10
lt_plus200_explicit 10:10:10.000000
SELECT
HOUR(LEAST('2010-01-01 10:10:10',TIME('-200:20:20'))) AS lt_minus200_implicit,
@@ -1686,7 +1698,7 @@ INSERT INTO t1 VALUES ('23:00:03', 'yes');
INSERT INTO t1 VALUES ('23:00:04', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('23:00:01','23:00:02');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 5 Using index condition
+1 SIMPLE t1 range a a 4 NULL 4 Using index condition
SELECT * FROM t1 WHERE a NOT IN ('23:00:01','23:00:02');
a filler
23:00:03 yes
@@ -1764,7 +1776,7 @@ INSERT INTO t1 VALUES ('24:00:03', 'yes');
INSERT INTO t1 VALUES ('24:00:04', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('24:00:01','24:00:02');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 5 Using index condition
+1 SIMPLE t1 range a a 4 NULL 4 Using index condition
SELECT * FROM t1 WHERE a NOT IN ('24:00:01','24:00:02');
a filler
24:00:03 yes
@@ -1842,7 +1854,7 @@ INSERT INTO t1 VALUES ('838:00:03', 'yes');
INSERT INTO t1 VALUES ('838:00:04', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('838:00:01','838:00:02');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 5 Using index condition
+1 SIMPLE t1 range a a 4 NULL 4 Using index condition
SELECT * FROM t1 WHERE a NOT IN ('838:00:01','838:00:02');
a filler
838:00:03 yes
@@ -1920,7 +1932,7 @@ INSERT INTO t1 VALUES ('23:00:03.1', 'yes');
INSERT INTO t1 VALUES ('23:00:04.1', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('23:00:01.1','23:00:02.1');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 5 Using index condition
+1 SIMPLE t1 range a a 5 NULL 4 Using index condition
SELECT * FROM t1 WHERE a NOT IN ('23:00:01.1','23:00:02.1');
a filler
23:00:03.1 yes
@@ -1998,7 +2010,7 @@ INSERT INTO t1 VALUES ('838:00:03.1', 'yes');
INSERT INTO t1 VALUES ('838:00:04.1', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('838:00:01.1','838:00:02.1');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 5 Using index condition
+1 SIMPLE t1 range a a 5 NULL 4 Using index condition
SELECT * FROM t1 WHERE a NOT IN ('838:00:01.1','838:00:02.1');
a filler
838:00:03.1 yes
@@ -2043,3 +2055,370 @@ a filler
-838:00:04.1 yes
-838:00:03.1 yes
DROP TABLE t1;
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+#
+CREATE TABLE t1 (a TIME);
+INSERT INTO t1 VALUES (1),(2),(3);
+# Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME'10:20:30',a)<=>COALESCE(TIME'10:20:30',a);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIME'10:20:30',TIME'10:20:30';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME''10:20:30'',a)<=>COALESCE(?,a)' USING TIME'10:20:30';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIME''10:20:30'',a)' USING TIME'10:20:30';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+# Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME'10:20:30',a)<=>COALESCE(TIME'10:20:31',a);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(TIME'10:20:30',`test`.`t1`.`a`) <=> coalesce(TIME'10:20:31',`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIME'10:20:30',TIME'10:20:31';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(TIME'10:20:30'),`test`.`t1`.`a`) <=> coalesce(<cache>(TIME'10:20:31'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME''10:20:30'',a)<=>COALESCE(?,a)' USING TIME'10:20:31';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(TIME'10:20:30',`test`.`t1`.`a`) <=> coalesce(<cache>(TIME'10:20:31'),`test`.`t1`.`a`)
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIME''10:20:30'',a)' USING TIME'10:20:31';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(TIME'10:20:31'),`test`.`t1`.`a`) <=> coalesce(TIME'10:20:30',`test`.`t1`.`a`)
+DROP TABLE t1;
+#
+# MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+#
+CREATE TABLE t1 (a TIME);
+INSERT INTO t1 VALUES ('00:00:00'),('00:00:01'),('00:00:02');
+Equal values
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.0',a));
+a
+00:00:00
+00:00:01
+00:00:02
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.0',a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.0';
+a
+00:00:00
+00:00:01
+00:00:02
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.0';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 1
+Values with different formats
+SELECT LENGTH(COALESCE(TIME'00:00:00.0',a)),LENGTH(COALESCE(TIME'00:00:00.00',a)) FROM t1;
+LENGTH(COALESCE(TIME'00:00:00.0',a)) LENGTH(COALESCE(TIME'00:00:00.00',a))
+10 11
+10 11
+10 11
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.00',a));
+a
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.00',a));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIME'00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(TIME'00:00:00.00',`test`.`t1`.`a`))
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.00';
+a
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.00';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIME'00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(<cache>(TIME'00:00:00.00'),`test`.`t1`.`a`))
+DROP TABLE t1;
+#
+# MDEV-16971 Assertion `is_valid_value_slow()' failed in Time::adjust_time_range_or_invalidate
+#
+SET sql_mode='';
+CREATE TABLE t1 (d1 date, t1 time, KEY t1 (t1));
+INSERT INTO t1 VALUES ('1982-12-19','08:16:31'),('1981-04-19','21:52:59'),('1971-06-09','07:15:44'),('2007-08-15','03:55:02'),('1993-06-05','04:17:51'),('2034-07-01','17:31:12'),('1998-08-24','08:09:27'),('1991-01-15','01:14:07'),('2001-02-25','10:41:28'),('1974-06-24','10:21:58'),('1977-04-21','16:38:05'),('1981-12-03','01:24:42'),('1972-06-15','20:19:16'),('1989-08-10','08:53:47'),('2018-05-19','15:06:49'),('1984-01-12','15:56:11'),('2013-01-23','04:16:16'),('2000-06-10','02:06:44'),('1995-01-03','04:51:38');
+CREATE TABLE t2 (d1 date );
+INSERT INTO t2 VALUES ('2018-06-01'),('1979-10-25'),('1974-08-22'),('1980-06-17');
+SELECT * FROM (t1 JOIN t2 ON (t2.d1 = t1.t1)) WHERE (t1.d1 > 70 );
+d1 t1 d1
+UPDATE (t1 JOIN t2 ON (t2.d1 = t1.t1)) SET t1.d1 = '2018-07-07' WHERE (t1.d1 > 70 );
+DROP TABLE t1,t2;
+#
+# MDEV-17219 Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning
+#
+SET optimizer_use_condition_selectivity=3;
+CREATE TABLE t1 (it TIME NOT NULL);
+INSERT INTO t1 VALUES ('07:25:13'),('05:15:55'),('09:58:01'),('04:23:57'),('19:37:28'),('01:38:05'),('20:50:52');
+SELECT 1 FROM t1 WHERE it < -7487797330456870912;
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '-7487797330456870912'
+DROP TABLE t1;
+SET optimizer_use_condition_selectivity=DEFAULT;
+#
+# MDEV-17417 TIME(99991231235959) returns 838:59:59 instead of 23:59:58
+#
+SELECT TIME(99991231235957), TIME(99991231235958), TIME(99991231235959);
+TIME(99991231235957) TIME(99991231235958) TIME(99991231235959)
+23:59:57 23:59:58 23:59:59
+#
+# MDEV-17634 Regression: TIME(0)=TIME('z') returns NULL vs 1
+#
+SELECT
+TIMESTAMP(0)=TIMESTAMP('z') AS ts,
+DATE(0)=DATE('z') AS d,
+TIME(0)=TIME('z') AS t;
+ts d t
+1 1 1
+Warnings:
+Warning 1292 Truncated incorrect datetime value: 'z'
+Warning 1292 Truncated incorrect datetime value: 'z'
+Warning 1292 Truncated incorrect time value: 'z'
+SELECT
+TIMESTAMP(0)=TIMESTAMP('') AS ts,
+DATE(0)=DATE('') AS d,
+TIME(0)=TIME('') AS t;
+ts d t
+1 1 1
+Warnings:
+Warning 1292 Truncated incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
+Warning 1292 Truncated incorrect time value: ''
+#
+# MDEV-17563 Different results using table or view when comparing values of time type
+#
+CREATE TABLE t1 (pk int, x1 time, x2 varchar(1));
+INSERT INTO t1 VALUES (17,'09:16:37','k'),(70,'19:44:22','k');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT pk FROM t1 WHERE x1 >x2;
+pk
+17
+70
+Warnings:
+Warning 1292 Truncated incorrect time value: 'k'
+Warning 1292 Truncated incorrect time value: 'k'
+SELECT pk FROM v1 WHERE x1 >x2;
+pk
+17
+70
+Warnings:
+Warning 1292 Truncated incorrect time value: 'k'
+Warning 1292 Truncated incorrect time value: 'k'
+DROP VIEW v1;
+DROP TABLE t1;
+CREATE TABLE t1 (pk int, x1 time, x2 varchar(1));
+INSERT INTO t1 VALUES (17,'09:16:37',''),(70,'19:44:22','k');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT pk FROM t1 WHERE x1 >x2;
+pk
+17
+70
+Warnings:
+Warning 1292 Truncated incorrect time value: ''
+Warning 1292 Truncated incorrect time value: 'k'
+SELECT pk FROM v1 WHERE x1 >x2;
+pk
+17
+70
+Warnings:
+Warning 1292 Truncated incorrect time value: ''
+Warning 1292 Truncated incorrect time value: 'k'
+DROP VIEW IF EXISTS v1;
+DROP TABLE IF EXISTS t1;
+#
+# MDEV-17625 Different warnings when comparing a garbage to DATETIME vs TIME
+#
+SELECT TIMESTAMP(0)='z', DATE(0)='z', TIME(0)='z';
+TIMESTAMP(0)='z' DATE(0)='z' TIME(0)='z'
+1 1 1
+Warnings:
+Warning 1292 Truncated incorrect datetime value: 'z'
+Warning 1292 Truncated incorrect datetime value: 'z'
+Warning 1292 Truncated incorrect time value: 'z'
+#
+# MDEV-17319 Assertion `ts_type != MYSQL_TIMESTAMP_TIME' failed upon inserting into TIME field
+#
+CREATE TABLE t1 (t TIME);
+SET SESSION SQL_MODE='TRADITIONAL';
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00'),('0000-00-00 00:00:00');
+ERROR 22007: Incorrect time value: '0000-00-00 00:00:00' for column `test`.`t1`.`t` at row 1
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+#
+# MDEV-18070 Assertion `nanoseconds <= 1000000000' failed in Temporal::add_nanoseconds_ssff with TIME_ROUND_FRACTIONAL
+#
+CREATE TABLE t1 (t TIME);
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+INSERT INTO t1 VALUES (3e19);
+Warnings:
+Warning 1264 Out of range value for column 't' at row 1
+DROP TABLE t1;
+#
+# MDEV-18876 Assertion `is_valid_time_slow()' failed in Time::valid_MYSQL_TIME_to_valid_value
+#
+CREATE TABLE t1 (f INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT f FROM t1 ORDER BY 1 && ( '1972-11-06 16:58:58' BETWEEN CONVERT( 0, TIME ) AND '20:31:05' );
+f
+1
+2
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a VARCHAR(32));
+INSERT INTO t1 VALUES ('1972-11-06 16:58:58');
+SELECT * FROM t1 WHERE a < TIME'20:31:05';
+a
+1972-11-06 16:58:58
+SELECT a < TIME'20:31:05' FROM t1;
+a < TIME'20:31:05'
+1
+DROP TABLE t1;
+SELECT '1972-11-06 16:58:58' < TIME'20:31:05';
+'1972-11-06 16:58:58' < TIME'20:31:05'
+1
+#
+# MDEV-23525 Wrong result of MIN(time_expr) and MAX(time_expr) with GROUP BY
+#
+SET timestamp=UNIX_TIMESTAMP('2020-08-21 18:19:20');
+CREATE PROCEDURE p1()
+BEGIN
+SELECT MIN(t), MAX(t) FROM t1;
+SELECT i, MIN(t), MAX(t) FROM t1 GROUP BY i;
+SELECT i, MIN(COALESCE(t)), MAX(COALESCE(t)) FROM t1 GROUP BY i;
+SELECT i, MIN(t+INTERVAL 1 SECOND), MAX(t+INTERVAL 1 SECOND) FROM t1 GROUP BY i;
+SELECT i, MIN(TIME'10:20:30'+INTERVAL 1 SECOND) FROM t1 GROUP BY i;
+SELECT i, MIN(CURRENT_TIME), MAX(CURRENT_TIME) FROM t1 GROUP BY i;
+SELECT
+i,
+MIN((SELECT MAX(CURRENT_TIME) FROM t1)),
+MAX((SELECT MAX(CURRENT_TIME) FROM t1))
+FROM t1 GROUP BY i;
+SELECT
+i,
+MIN(NAME_CONST('name',TIME'10:20:30')),
+MAX(NAME_CONST('name',TIME'10:20:30'))
+FROM t1 GROUP BY i;
+EXECUTE IMMEDIATE "SELECT i, MIN(?),MAX(?) FROM t1 GROUP BY i"
+ USING TIME'10:20:30', TIME'10:20:30';
+END;
+$$
+CREATE TABLE t1 (i INT, t TIME);
+INSERT INTO t1 VALUES (1,'10:20:30');
+INSERT INTO t1 VALUES (1,'100:20:20');
+CALL p1;
+MIN(t) MAX(t)
+10:20:30 100:20:20
+i MIN(t) MAX(t)
+1 10:20:30 100:20:20
+i MIN(COALESCE(t)) MAX(COALESCE(t))
+1 10:20:30 100:20:20
+i MIN(t+INTERVAL 1 SECOND) MAX(t+INTERVAL 1 SECOND)
+1 10:20:31 100:20:21
+i MIN(TIME'10:20:30'+INTERVAL 1 SECOND)
+1 10:20:31
+i MIN(CURRENT_TIME) MAX(CURRENT_TIME)
+1 18:19:20 18:19:20
+i MIN((SELECT MAX(CURRENT_TIME) FROM t1)) MAX((SELECT MAX(CURRENT_TIME) FROM t1))
+1 18:19:20 18:19:20
+i MIN(NAME_CONST('name',TIME'10:20:30')) MAX(NAME_CONST('name',TIME'10:20:30'))
+1 10:20:30 10:20:30
+i MIN(?) MAX(?)
+1 10:20:30 10:20:30
+DROP TABLE t1;
+CREATE TABLE t1 (i INT, t TIME(3));
+INSERT INTO t1 VALUES (1,'10:20:30.123');
+INSERT INTO t1 VALUES (1,'100:20:20.123');
+CALL p1;
+MIN(t) MAX(t)
+10:20:30.123 100:20:20.123
+i MIN(t) MAX(t)
+1 10:20:30.123 100:20:20.123
+i MIN(COALESCE(t)) MAX(COALESCE(t))
+1 10:20:30.123 100:20:20.123
+i MIN(t+INTERVAL 1 SECOND) MAX(t+INTERVAL 1 SECOND)
+1 10:20:31.123 100:20:21.123
+i MIN(TIME'10:20:30'+INTERVAL 1 SECOND)
+1 10:20:31
+i MIN(CURRENT_TIME) MAX(CURRENT_TIME)
+1 18:19:20 18:19:20
+i MIN((SELECT MAX(CURRENT_TIME) FROM t1)) MAX((SELECT MAX(CURRENT_TIME) FROM t1))
+1 18:19:20 18:19:20
+i MIN(NAME_CONST('name',TIME'10:20:30')) MAX(NAME_CONST('name',TIME'10:20:30'))
+1 10:20:30 10:20:30
+i MIN(?) MAX(?)
+1 10:20:30 10:20:30
+DROP TABLE t1;
+CREATE TABLE t1 (i INT, t TIME(6));
+INSERT INTO t1 VALUES (1,'10:20:30.123456');
+INSERT INTO t1 VALUES (1,'100:20:20.123456');
+CALL p1;
+MIN(t) MAX(t)
+10:20:30.123456 100:20:20.123456
+i MIN(t) MAX(t)
+1 10:20:30.123456 100:20:20.123456
+i MIN(COALESCE(t)) MAX(COALESCE(t))
+1 10:20:30.123456 100:20:20.123456
+i MIN(t+INTERVAL 1 SECOND) MAX(t+INTERVAL 1 SECOND)
+1 10:20:31.123456 100:20:21.123456
+i MIN(TIME'10:20:30'+INTERVAL 1 SECOND)
+1 10:20:31
+i MIN(CURRENT_TIME) MAX(CURRENT_TIME)
+1 18:19:20 18:19:20
+i MIN((SELECT MAX(CURRENT_TIME) FROM t1)) MAX((SELECT MAX(CURRENT_TIME) FROM t1))
+1 18:19:20 18:19:20
+i MIN(NAME_CONST('name',TIME'10:20:30')) MAX(NAME_CONST('name',TIME'10:20:30'))
+1 10:20:30 10:20:30
+i MIN(?) MAX(?)
+1 10:20:30 10:20:30
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=false;
+CREATE TABLE t1 (i INT, t TIME(6));
+INSERT INTO t1 VALUES (1,'10:20:30.123456');
+INSERT INTO t1 VALUES (1,'100:20:20.123456');
+CALL p1;
+MIN(t) MAX(t)
+10:20:30.123456 100:20:20.123456
+i MIN(t) MAX(t)
+1 10:20:30.123456 100:20:20.123456
+i MIN(COALESCE(t)) MAX(COALESCE(t))
+1 10:20:30.123456 100:20:20.123456
+i MIN(t+INTERVAL 1 SECOND) MAX(t+INTERVAL 1 SECOND)
+1 10:20:31.123456 100:20:21.123456
+i MIN(TIME'10:20:30'+INTERVAL 1 SECOND)
+1 10:20:31
+i MIN(CURRENT_TIME) MAX(CURRENT_TIME)
+1 18:19:20 18:19:20
+i MIN((SELECT MAX(CURRENT_TIME) FROM t1)) MAX((SELECT MAX(CURRENT_TIME) FROM t1))
+1 18:19:20 18:19:20
+i MIN(NAME_CONST('name',TIME'10:20:30')) MAX(NAME_CONST('name',TIME'10:20:30'))
+1 10:20:30 10:20:30
+i MIN(?) MAX(?)
+1 10:20:30 10:20:30
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=default;
+DROP PROCEDURE p1;
+SET timestamp=DEFAULT;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_time.test b/mysql-test/main/type_time.test
index 2655122069b..0739348fcf0 100644
--- a/mysql-test/main/type_time.test
+++ b/mysql-test/main/type_time.test
@@ -514,6 +514,11 @@ SELECT * FROM t1 WHERE a=TIMESTAMP'0000-00-01 10:20:30' AND LENGTH(a)=8;
EXPLAIN EXTENDED
SELECT * FROM t1 WHERE a=TIMESTAMP'0000-00-01 10:20:30' AND LENGTH(a)=30+RAND();
+EXPLAIN EXTENDED
+SELECT * FROM t1 WHERE a=TIMESTAMP'0000-01-00 10:20:30' AND LENGTH(a)=8;
+EXPLAIN EXTENDED
+SELECT * FROM t1 WHERE a=TIMESTAMP'0001-00-00 10:20:30' AND LENGTH(a)=8;
+
--echo # Old mode, TIMESTAMP-alike string literal, zero YYYYMMDD, Ok to propagate
SELECT * FROM t1 WHERE a='0000-00-00 10:20:30';
SELECT * FROM t1 WHERE a='0000-00-00 10:20:30' AND LENGTH(a)=8;
@@ -1343,3 +1348,218 @@ INSERT INTO t1 VALUES ('-838:00:04.1', 'yes');
EXPLAIN SELECT * FROM t1 WHERE a NOT IN ('-838:00:01.1','-838:00:02.1');
SELECT * FROM t1 WHERE a NOT IN ('-838:00:01.1','-838:00:02.1');
DROP TABLE t1;
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-11362 True condition elimination does not work for DECIMAL and temporal dynamic SQL parameters
+--echo #
+
+CREATE TABLE t1 (a TIME);
+INSERT INTO t1 VALUES (1),(2),(3);
+--echo # Equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME'10:20:30',a)<=>COALESCE(TIME'10:20:30',a);
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIME'10:20:30',TIME'10:20:30';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME''10:20:30'',a)<=>COALESCE(?,a)' USING TIME'10:20:30';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIME''10:20:30'',a)' USING TIME'10:20:30';
+--echo # Not equal values
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME'10:20:30',a)<=>COALESCE(TIME'10:20:31',a);
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(?,a)' USING TIME'10:20:30',TIME'10:20:31';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(TIME''10:20:30'',a)<=>COALESCE(?,a)' USING TIME'10:20:31';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALESCE(TIME''10:20:30'',a)' USING TIME'10:20:31';
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-16426 Optimizer erroneously treats equal constants of different formats as same
+--echo #
+CREATE TABLE t1 (a TIME);
+INSERT INTO t1 VALUES ('00:00:00'),('00:00:01'),('00:00:02');
+
+--echo Equal values
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.0',a));
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.0',a));
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.0';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.0';
+
+--echo Values with different formats
+SELECT LENGTH(COALESCE(TIME'00:00:00.0',a)),LENGTH(COALESCE(TIME'00:00:00.00',a)) FROM t1;
+SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.00',a));
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME'00:00:00.0',a))<=>LENGTH(COALESCE(TIME'00:00:00.00',a));
+EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.00';
+EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME''00:00:00.0'',a))<=>LENGTH(COALESCE(?,a))' USING TIME'00:00:00.00';
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-16971 Assertion `is_valid_value_slow()' failed in Time::adjust_time_range_or_invalidate
+--echo #
+SET sql_mode='';
+CREATE TABLE t1 (d1 date, t1 time, KEY t1 (t1));
+INSERT INTO t1 VALUES ('1982-12-19','08:16:31'),('1981-04-19','21:52:59'),('1971-06-09','07:15:44'),('2007-08-15','03:55:02'),('1993-06-05','04:17:51'),('2034-07-01','17:31:12'),('1998-08-24','08:09:27'),('1991-01-15','01:14:07'),('2001-02-25','10:41:28'),('1974-06-24','10:21:58'),('1977-04-21','16:38:05'),('1981-12-03','01:24:42'),('1972-06-15','20:19:16'),('1989-08-10','08:53:47'),('2018-05-19','15:06:49'),('1984-01-12','15:56:11'),('2013-01-23','04:16:16'),('2000-06-10','02:06:44'),('1995-01-03','04:51:38');
+CREATE TABLE t2 (d1 date );
+INSERT INTO t2 VALUES ('2018-06-01'),('1979-10-25'),('1974-08-22'),('1980-06-17');
+SELECT * FROM (t1 JOIN t2 ON (t2.d1 = t1.t1)) WHERE (t1.d1 > 70 );
+UPDATE (t1 JOIN t2 ON (t2.d1 = t1.t1)) SET t1.d1 = '2018-07-07' WHERE (t1.d1 > 70 );
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-17219 Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning
+--echo #
+SET optimizer_use_condition_selectivity=3;
+CREATE TABLE t1 (it TIME NOT NULL);
+INSERT INTO t1 VALUES ('07:25:13'),('05:15:55'),('09:58:01'),('04:23:57'),('19:37:28'),('01:38:05'),('20:50:52');
+SELECT 1 FROM t1 WHERE it < -7487797330456870912;
+DROP TABLE t1;
+SET optimizer_use_condition_selectivity=DEFAULT;
+
+--echo #
+--echo # MDEV-17417 TIME(99991231235959) returns 838:59:59 instead of 23:59:58
+--echo #
+SELECT TIME(99991231235957), TIME(99991231235958), TIME(99991231235959);
+
+--echo #
+--echo # MDEV-17634 Regression: TIME(0)=TIME('z') returns NULL vs 1
+--echo #
+SELECT
+ TIMESTAMP(0)=TIMESTAMP('z') AS ts,
+ DATE(0)=DATE('z') AS d,
+ TIME(0)=TIME('z') AS t;
+
+SELECT
+ TIMESTAMP(0)=TIMESTAMP('') AS ts,
+ DATE(0)=DATE('') AS d,
+ TIME(0)=TIME('') AS t;
+
+
+--echo #
+--echo # MDEV-17563 Different results using table or view when comparing values of time type
+--echo #
+
+CREATE TABLE t1 (pk int, x1 time, x2 varchar(1));
+INSERT INTO t1 VALUES (17,'09:16:37','k'),(70,'19:44:22','k');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT pk FROM t1 WHERE x1 >x2;
+SELECT pk FROM v1 WHERE x1 >x2;
+DROP VIEW v1;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (pk int, x1 time, x2 varchar(1));
+INSERT INTO t1 VALUES (17,'09:16:37',''),(70,'19:44:22','k');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT pk FROM t1 WHERE x1 >x2;
+SELECT pk FROM v1 WHERE x1 >x2;
+DROP VIEW IF EXISTS v1;
+DROP TABLE IF EXISTS t1;
+
+
+--echo #
+--echo # MDEV-17625 Different warnings when comparing a garbage to DATETIME vs TIME
+--echo #
+
+SELECT TIMESTAMP(0)='z', DATE(0)='z', TIME(0)='z';
+
+
+--echo #
+--echo # MDEV-17319 Assertion `ts_type != MYSQL_TIMESTAMP_TIME' failed upon inserting into TIME field
+--echo #
+
+CREATE TABLE t1 (t TIME);
+SET SESSION SQL_MODE='TRADITIONAL';
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00'),('0000-00-00 00:00:00');
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18070 Assertion `nanoseconds <= 1000000000' failed in Temporal::add_nanoseconds_ssff with TIME_ROUND_FRACTIONAL
+--echo #
+
+CREATE TABLE t1 (t TIME);
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+INSERT INTO t1 VALUES (3e19);
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-18876 Assertion `is_valid_time_slow()' failed in Time::valid_MYSQL_TIME_to_valid_value
+--echo #
+
+CREATE TABLE t1 (f INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT f FROM t1 ORDER BY 1 && ( '1972-11-06 16:58:58' BETWEEN CONVERT( 0, TIME ) AND '20:31:05' );
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a VARCHAR(32));
+INSERT INTO t1 VALUES ('1972-11-06 16:58:58');
+SELECT * FROM t1 WHERE a < TIME'20:31:05';
+SELECT a < TIME'20:31:05' FROM t1;
+DROP TABLE t1;
+
+SELECT '1972-11-06 16:58:58' < TIME'20:31:05';
+
+--echo #
+--echo # MDEV-23525 Wrong result of MIN(time_expr) and MAX(time_expr) with GROUP BY
+--echo #
+
+SET timestamp=UNIX_TIMESTAMP('2020-08-21 18:19:20');
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ SELECT MIN(t), MAX(t) FROM t1;
+ SELECT i, MIN(t), MAX(t) FROM t1 GROUP BY i;
+ SELECT i, MIN(COALESCE(t)), MAX(COALESCE(t)) FROM t1 GROUP BY i;
+ SELECT i, MIN(t+INTERVAL 1 SECOND), MAX(t+INTERVAL 1 SECOND) FROM t1 GROUP BY i;
+ SELECT i, MIN(TIME'10:20:30'+INTERVAL 1 SECOND) FROM t1 GROUP BY i;
+ SELECT i, MIN(CURRENT_TIME), MAX(CURRENT_TIME) FROM t1 GROUP BY i;
+ SELECT
+ i,
+ MIN((SELECT MAX(CURRENT_TIME) FROM t1)),
+ MAX((SELECT MAX(CURRENT_TIME) FROM t1))
+ FROM t1 GROUP BY i;
+ SELECT
+ i,
+ MIN(NAME_CONST('name',TIME'10:20:30')),
+ MAX(NAME_CONST('name',TIME'10:20:30'))
+ FROM t1 GROUP BY i;
+ EXECUTE IMMEDIATE "SELECT i, MIN(?),MAX(?) FROM t1 GROUP BY i"
+ USING TIME'10:20:30', TIME'10:20:30';
+END;
+$$
+DELIMITER ;$$
+
+CREATE TABLE t1 (i INT, t TIME);
+INSERT INTO t1 VALUES (1,'10:20:30');
+INSERT INTO t1 VALUES (1,'100:20:20');
+CALL p1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (i INT, t TIME(3));
+INSERT INTO t1 VALUES (1,'10:20:30.123');
+INSERT INTO t1 VALUES (1,'100:20:20.123');
+CALL p1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (i INT, t TIME(6));
+INSERT INTO t1 VALUES (1,'10:20:30.123456');
+INSERT INTO t1 VALUES (1,'100:20:20.123456');
+CALL p1;
+DROP TABLE t1;
+
+SET @@global.mysql56_temporal_format=false;
+CREATE TABLE t1 (i INT, t TIME(6));
+INSERT INTO t1 VALUES (1,'10:20:30.123456');
+INSERT INTO t1 VALUES (1,'100:20:20.123456');
+CALL p1;
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=default;
+
+DROP PROCEDURE p1;
+SET timestamp=DEFAULT;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_time_hires.result b/mysql-test/main/type_time_hires.result
index 47185116bea..c7fecbef76b 100644
--- a/mysql-test/main/type_time_hires.result
+++ b/mysql-test/main/type_time_hires.result
@@ -25,8 +25,8 @@ a
03:04:05.789
15:47:11.123
838:59:59.999
-select truncate(a, 6) from t1;
-truncate(a, 6)
+select cast(a AS double(30,6)) from t1;
+cast(a AS double(30,6))
2003.123000
10203.456000
30405.789062
@@ -67,8 +67,10 @@ a
01:02:03.4567
select extract(microsecond from a + interval 100 microsecond) from t1 where a>'2010-11-12 01:02:03.456';
extract(microsecond from a + interval 100 microsecond)
+456800
select a from t1 where a>'2010-11-12 01:02:03.456' group by a;
a
+01:02:03.4567
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -115,6 +117,11 @@ NULL
delete from t1 where a < 20110101;
select * from t1;
a
+01:02:13.3332
+NULL
+delete from t1 where a is not null;
+select * from t1;
+a
NULL
create table t2 select * from t1;
create table t3 like t1;
@@ -352,3 +359,551 @@ drop table t1;
select cast(1e-6 as time(6));
cast(1e-6 as time(6))
00:00:00.000001
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+#
+CREATE TABLE t1 (a1 TIME(6), a2 TIME(6) NOT NULL);
+CREATE TABLE t2 AS SELECT
+ROUND(a1) AS r1,
+ROUND(a2) AS r2,
+TRUNCATE(a1,0) AS t1,
+TRUNCATE(a2,0) AS t2
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `r1` time DEFAULT NULL,
+ `r2` time NOT NULL,
+ `t1` time DEFAULT NULL,
+ `t2` time NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES
+('-838:59:59.999999'),
+('-837:59:59.999999'),
+('-23:59:59.999999'),
+('-00:59:59.999999'),
+('-00:00:59.999999'),
+('00:00:00.999999'),
+('00:00:59.999999'),
+('00:59:59.999999'),
+('23:59:59.999999'),
+('837:59:59.999999'),
+('838:59:59.999999');
+SELECT a, TRUNCATE(a,0) FROM t1;
+a TRUNCATE(a,0)
+-838:59:59.999999 -838:59:59
+-837:59:59.999999 -837:59:59
+-23:59:59.999999 -23:59:59
+-00:59:59.999999 -00:59:59
+-00:00:59.999999 -00:00:59
+00:00:00.999999 00:00:00
+00:00:59.999999 00:00:59
+00:59:59.999999 00:59:59
+23:59:59.999999 23:59:59
+837:59:59.999999 837:59:59
+838:59:59.999999 838:59:59
+SELECT a, TRUNCATE(a,1) FROM t1;
+a TRUNCATE(a,1)
+-838:59:59.999999 -838:59:59.9
+-837:59:59.999999 -837:59:59.9
+-23:59:59.999999 -23:59:59.9
+-00:59:59.999999 -00:59:59.9
+-00:00:59.999999 -00:00:59.9
+00:00:00.999999 00:00:00.9
+00:00:59.999999 00:00:59.9
+00:59:59.999999 00:59:59.9
+23:59:59.999999 23:59:59.9
+837:59:59.999999 837:59:59.9
+838:59:59.999999 838:59:59.9
+SELECT a, TRUNCATE(a,2) FROM t1;
+a TRUNCATE(a,2)
+-838:59:59.999999 -838:59:59.99
+-837:59:59.999999 -837:59:59.99
+-23:59:59.999999 -23:59:59.99
+-00:59:59.999999 -00:59:59.99
+-00:00:59.999999 -00:00:59.99
+00:00:00.999999 00:00:00.99
+00:00:59.999999 00:00:59.99
+00:59:59.999999 00:59:59.99
+23:59:59.999999 23:59:59.99
+837:59:59.999999 837:59:59.99
+838:59:59.999999 838:59:59.99
+SELECT a, TRUNCATE(a,3) FROM t1;
+a TRUNCATE(a,3)
+-838:59:59.999999 -838:59:59.999
+-837:59:59.999999 -837:59:59.999
+-23:59:59.999999 -23:59:59.999
+-00:59:59.999999 -00:59:59.999
+-00:00:59.999999 -00:00:59.999
+00:00:00.999999 00:00:00.999
+00:00:59.999999 00:00:59.999
+00:59:59.999999 00:59:59.999
+23:59:59.999999 23:59:59.999
+837:59:59.999999 837:59:59.999
+838:59:59.999999 838:59:59.999
+SELECT a, TRUNCATE(a,4) FROM t1;
+a TRUNCATE(a,4)
+-838:59:59.999999 -838:59:59.9999
+-837:59:59.999999 -837:59:59.9999
+-23:59:59.999999 -23:59:59.9999
+-00:59:59.999999 -00:59:59.9999
+-00:00:59.999999 -00:00:59.9999
+00:00:00.999999 00:00:00.9999
+00:00:59.999999 00:00:59.9999
+00:59:59.999999 00:59:59.9999
+23:59:59.999999 23:59:59.9999
+837:59:59.999999 837:59:59.9999
+838:59:59.999999 838:59:59.9999
+SELECT a, TRUNCATE(a,5) FROM t1;
+a TRUNCATE(a,5)
+-838:59:59.999999 -838:59:59.99999
+-837:59:59.999999 -837:59:59.99999
+-23:59:59.999999 -23:59:59.99999
+-00:59:59.999999 -00:59:59.99999
+-00:00:59.999999 -00:00:59.99999
+00:00:00.999999 00:00:00.99999
+00:00:59.999999 00:00:59.99999
+00:59:59.999999 00:59:59.99999
+23:59:59.999999 23:59:59.99999
+837:59:59.999999 837:59:59.99999
+838:59:59.999999 838:59:59.99999
+SELECT a, TRUNCATE(a,6) FROM t1;
+a TRUNCATE(a,6)
+-838:59:59.999999 -838:59:59.999999
+-837:59:59.999999 -837:59:59.999999
+-23:59:59.999999 -23:59:59.999999
+-00:59:59.999999 -00:59:59.999999
+-00:00:59.999999 -00:00:59.999999
+00:00:00.999999 00:00:00.999999
+00:00:59.999999 00:00:59.999999
+00:59:59.999999 00:59:59.999999
+23:59:59.999999 23:59:59.999999
+837:59:59.999999 837:59:59.999999
+838:59:59.999999 838:59:59.999999
+SELECT a, TRUNCATE(a,7) FROM t1;
+a TRUNCATE(a,7)
+-838:59:59.999999 -838:59:59.999999
+-837:59:59.999999 -837:59:59.999999
+-23:59:59.999999 -23:59:59.999999
+-00:59:59.999999 -00:59:59.999999
+-00:00:59.999999 -00:00:59.999999
+00:00:00.999999 00:00:00.999999
+00:00:59.999999 00:00:59.999999
+00:59:59.999999 00:59:59.999999
+23:59:59.999999 23:59:59.999999
+837:59:59.999999 837:59:59.999999
+838:59:59.999999 838:59:59.999999
+SELECT a, TRUNCATE(a,-1) FROM t1;
+a TRUNCATE(a,-1)
+-838:59:59.999999 -838:59:59
+-837:59:59.999999 -837:59:59
+-23:59:59.999999 -23:59:59
+-00:59:59.999999 -00:59:59
+-00:00:59.999999 -00:00:59
+00:00:00.999999 00:00:00
+00:00:59.999999 00:00:59
+00:59:59.999999 00:59:59
+23:59:59.999999 23:59:59
+837:59:59.999999 837:59:59
+838:59:59.999999 838:59:59
+SELECT a, TRUNCATE(a,-6) FROM t1;
+a TRUNCATE(a,-6)
+-838:59:59.999999 -838:59:59
+-837:59:59.999999 -837:59:59
+-23:59:59.999999 -23:59:59
+-00:59:59.999999 -00:59:59
+-00:00:59.999999 -00:00:59
+00:00:00.999999 00:00:00
+00:00:59.999999 00:00:59
+00:59:59.999999 00:59:59
+23:59:59.999999 23:59:59
+837:59:59.999999 837:59:59
+838:59:59.999999 838:59:59
+SELECT a, ROUND(a) FROM t1;
+a ROUND(a)
+-838:59:59.999999 -838:59:59
+-837:59:59.999999 -838:00:00
+-23:59:59.999999 -24:00:00
+-00:59:59.999999 -01:00:00
+-00:00:59.999999 -00:01:00
+00:00:00.999999 00:00:01
+00:00:59.999999 00:01:00
+00:59:59.999999 01:00:00
+23:59:59.999999 24:00:00
+837:59:59.999999 838:00:00
+838:59:59.999999 838:59:59
+SELECT a, ROUND(a,0) FROM t1;
+a ROUND(a,0)
+-838:59:59.999999 -838:59:59
+-837:59:59.999999 -838:00:00
+-23:59:59.999999 -24:00:00
+-00:59:59.999999 -01:00:00
+-00:00:59.999999 -00:01:00
+00:00:00.999999 00:00:01
+00:00:59.999999 00:01:00
+00:59:59.999999 01:00:00
+23:59:59.999999 24:00:00
+837:59:59.999999 838:00:00
+838:59:59.999999 838:59:59
+SELECT a, ROUND(a,1) FROM t1;
+a ROUND(a,1)
+-838:59:59.999999 -838:59:59.9
+-837:59:59.999999 -838:00:00.0
+-23:59:59.999999 -24:00:00.0
+-00:59:59.999999 -01:00:00.0
+-00:00:59.999999 -00:01:00.0
+00:00:00.999999 00:00:01.0
+00:00:59.999999 00:01:00.0
+00:59:59.999999 01:00:00.0
+23:59:59.999999 24:00:00.0
+837:59:59.999999 838:00:00.0
+838:59:59.999999 838:59:59.9
+SELECT a, ROUND(a,2) FROM t1;
+a ROUND(a,2)
+-838:59:59.999999 -838:59:59.99
+-837:59:59.999999 -838:00:00.00
+-23:59:59.999999 -24:00:00.00
+-00:59:59.999999 -01:00:00.00
+-00:00:59.999999 -00:01:00.00
+00:00:00.999999 00:00:01.00
+00:00:59.999999 00:01:00.00
+00:59:59.999999 01:00:00.00
+23:59:59.999999 24:00:00.00
+837:59:59.999999 838:00:00.00
+838:59:59.999999 838:59:59.99
+SELECT a, ROUND(a,3) FROM t1;
+a ROUND(a,3)
+-838:59:59.999999 -838:59:59.999
+-837:59:59.999999 -838:00:00.000
+-23:59:59.999999 -24:00:00.000
+-00:59:59.999999 -01:00:00.000
+-00:00:59.999999 -00:01:00.000
+00:00:00.999999 00:00:01.000
+00:00:59.999999 00:01:00.000
+00:59:59.999999 01:00:00.000
+23:59:59.999999 24:00:00.000
+837:59:59.999999 838:00:00.000
+838:59:59.999999 838:59:59.999
+SELECT a, ROUND(a,4) FROM t1;
+a ROUND(a,4)
+-838:59:59.999999 -838:59:59.9999
+-837:59:59.999999 -838:00:00.0000
+-23:59:59.999999 -24:00:00.0000
+-00:59:59.999999 -01:00:00.0000
+-00:00:59.999999 -00:01:00.0000
+00:00:00.999999 00:00:01.0000
+00:00:59.999999 00:01:00.0000
+00:59:59.999999 01:00:00.0000
+23:59:59.999999 24:00:00.0000
+837:59:59.999999 838:00:00.0000
+838:59:59.999999 838:59:59.9999
+SELECT a, ROUND(a,5) FROM t1;
+a ROUND(a,5)
+-838:59:59.999999 -838:59:59.99999
+-837:59:59.999999 -838:00:00.00000
+-23:59:59.999999 -24:00:00.00000
+-00:59:59.999999 -01:00:00.00000
+-00:00:59.999999 -00:01:00.00000
+00:00:00.999999 00:00:01.00000
+00:00:59.999999 00:01:00.00000
+00:59:59.999999 01:00:00.00000
+23:59:59.999999 24:00:00.00000
+837:59:59.999999 838:00:00.00000
+838:59:59.999999 838:59:59.99999
+SELECT a, ROUND(a,6) FROM t1;
+a ROUND(a,6)
+-838:59:59.999999 -838:59:59.999999
+-837:59:59.999999 -837:59:59.999999
+-23:59:59.999999 -23:59:59.999999
+-00:59:59.999999 -00:59:59.999999
+-00:00:59.999999 -00:00:59.999999
+00:00:00.999999 00:00:00.999999
+00:00:59.999999 00:00:59.999999
+00:59:59.999999 00:59:59.999999
+23:59:59.999999 23:59:59.999999
+837:59:59.999999 837:59:59.999999
+838:59:59.999999 838:59:59.999999
+SELECT a, ROUND(a,7) FROM t1;
+a ROUND(a,7)
+-838:59:59.999999 -838:59:59.999999
+-837:59:59.999999 -837:59:59.999999
+-23:59:59.999999 -23:59:59.999999
+-00:59:59.999999 -00:59:59.999999
+-00:00:59.999999 -00:00:59.999999
+00:00:00.999999 00:00:00.999999
+00:00:59.999999 00:00:59.999999
+00:59:59.999999 00:59:59.999999
+23:59:59.999999 23:59:59.999999
+837:59:59.999999 837:59:59.999999
+838:59:59.999999 838:59:59.999999
+SELECT a, ROUND(a,-1) FROM t1;
+a ROUND(a,-1)
+-838:59:59.999999 -838:59:59
+-837:59:59.999999 -838:00:00
+-23:59:59.999999 -24:00:00
+-00:59:59.999999 -01:00:00
+-00:00:59.999999 -00:01:00
+00:00:00.999999 00:00:01
+00:00:59.999999 00:01:00
+00:59:59.999999 01:00:00
+23:59:59.999999 24:00:00
+837:59:59.999999 838:00:00
+838:59:59.999999 838:59:59
+SELECT a, ROUND(a,-6) FROM t1;
+a ROUND(a,-6)
+-838:59:59.999999 -838:59:59
+-837:59:59.999999 -838:00:00
+-23:59:59.999999 -24:00:00
+-00:59:59.999999 -01:00:00
+-00:00:59.999999 -00:01:00
+00:00:00.999999 00:00:01
+00:00:59.999999 00:01:00
+00:59:59.999999 01:00:00
+23:59:59.999999 24:00:00
+837:59:59.999999 838:00:00
+838:59:59.999999 838:59:59
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE()
+#
+CREATE TABLE t1 AS SELECT
+FLOOR(TIME'00:00:00.999999'),
+CEILING(TIME'00:00:00.999999');
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `FLOOR(TIME'00:00:00.999999')` time NOT NULL,
+ `CEILING(TIME'00:00:00.999999')` time NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES ('838:59:59.999999');
+INSERT INTO t1 VALUES ('838:59:59.99999');
+INSERT INTO t1 VALUES ('838:59:59.9999');
+INSERT INTO t1 VALUES ('838:59:59.999');
+INSERT INTO t1 VALUES ('838:59:59.99');
+INSERT INTO t1 VALUES ('838:59:59.9');
+INSERT INTO t1 VALUES ('838:59:59.1');
+INSERT INTO t1 VALUES ('838:59:59.0');
+INSERT INTO t1 VALUES ('837:59:59.999999');
+INSERT INTO t1 VALUES ('837:59:59.99999');
+INSERT INTO t1 VALUES ('837:59:59.9999');
+INSERT INTO t1 VALUES ('837:59:59.999');
+INSERT INTO t1 VALUES ('837:59:59.99');
+INSERT INTO t1 VALUES ('837:59:59.9');
+INSERT INTO t1 VALUES ('837:59:59.1');
+INSERT INTO t1 VALUES ('837:59:59.0');
+INSERT INTO t1 VALUES ('23:59:59.999999');
+INSERT INTO t1 VALUES ('23:59:59.99999');
+INSERT INTO t1 VALUES ('23:59:59.9999');
+INSERT INTO t1 VALUES ('23:59:59.999');
+INSERT INTO t1 VALUES ('23:59:59.99');
+INSERT INTO t1 VALUES ('23:59:59.9');
+INSERT INTO t1 VALUES ('23:59:59.1');
+INSERT INTO t1 VALUES ('23:59:59.0');
+INSERT INTO t1 VALUES ('00:00:00.999999');
+INSERT INTO t1 VALUES ('00:00:00.99999');
+INSERT INTO t1 VALUES ('00:00:00.9999');
+INSERT INTO t1 VALUES ('00:00:00.999');
+INSERT INTO t1 VALUES ('00:00:00.99');
+INSERT INTO t1 VALUES ('00:00:00.9');
+INSERT INTO t1 VALUES ('00:00:00.1');
+INSERT INTO t1 VALUES ('00:00:00.0');
+INSERT INTO t1 VALUES ('-00:00:00.999999');
+INSERT INTO t1 VALUES ('-00:00:00.99999');
+INSERT INTO t1 VALUES ('-00:00:00.9999');
+INSERT INTO t1 VALUES ('-00:00:00.999');
+INSERT INTO t1 VALUES ('-00:00:00.99');
+INSERT INTO t1 VALUES ('-00:00:00.9');
+INSERT INTO t1 VALUES ('-00:00:00.1');
+INSERT INTO t1 VALUES ('-00:00:00.0');
+INSERT INTO t1 VALUES ('-23:59:59.999999');
+INSERT INTO t1 VALUES ('-23:59:59.99999');
+INSERT INTO t1 VALUES ('-23:59:59.9999');
+INSERT INTO t1 VALUES ('-23:59:59.999');
+INSERT INTO t1 VALUES ('-23:59:59.99');
+INSERT INTO t1 VALUES ('-23:59:59.9');
+INSERT INTO t1 VALUES ('-23:59:59.1');
+INSERT INTO t1 VALUES ('-23:59:59.0');
+INSERT INTO t1 VALUES ('-837:59:59.999999');
+INSERT INTO t1 VALUES ('-837:59:59.99999');
+INSERT INTO t1 VALUES ('-837:59:59.9999');
+INSERT INTO t1 VALUES ('-837:59:59.999');
+INSERT INTO t1 VALUES ('-837:59:59.99');
+INSERT INTO t1 VALUES ('-837:59:59.9');
+INSERT INTO t1 VALUES ('-837:59:59.1');
+INSERT INTO t1 VALUES ('-837:59:59.0');
+INSERT INTO t1 VALUES ('-838:59:59.999999');
+INSERT INTO t1 VALUES ('-838:59:59.99999');
+INSERT INTO t1 VALUES ('-838:59:59.9999');
+INSERT INTO t1 VALUES ('-838:59:59.999');
+INSERT INTO t1 VALUES ('-838:59:59.99');
+INSERT INTO t1 VALUES ('-838:59:59.9');
+INSERT INTO t1 VALUES ('-838:59:59.1');
+INSERT INTO t1 VALUES ('-838:59:59.0');
+CREATE FUNCTION FLOOR_SP(a TIME(6)) RETURNS TIME
+BEGIN
+RETURN
+CASE
+WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a
+WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a
+WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits
+WHEN a<0 THEN TRUNCATE(a,0)-INTERVAL 1 SECOND -- negative values
+WHEN a>0 THEN TRUNCATE(a,0) -- positive values
+END;
+END;
+$$
+CREATE FUNCTION CEILING_SP(a TIME(6)) RETURNS TIME
+BEGIN
+RETURN
+CASE
+WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a
+WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a
+WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits
+WHEN a<0 THEN TRUNCATE(a,0) -- negative values
+WHEN a>0 THEN TRUNCATE(a,0)+INTERVAL 1 SECOND -- positive values
+END;
+END;
+$$
+SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a;
+a FLOOR(a) FLOOR_SP(a) FLOOR(a)=FLOOR_SP(a)
+-838:59:59.999999 -838:59:59 -838:59:59 1
+-838:59:59.999990 -838:59:59 -838:59:59 1
+-838:59:59.999900 -838:59:59 -838:59:59 1
+-838:59:59.999000 -838:59:59 -838:59:59 1
+-838:59:59.990000 -838:59:59 -838:59:59 1
+-838:59:59.900000 -838:59:59 -838:59:59 1
+-838:59:59.100000 -838:59:59 -838:59:59 1
+-838:59:59.000000 -838:59:59 -838:59:59 1
+-837:59:59.999999 -838:00:00 -838:00:00 1
+-837:59:59.999990 -838:00:00 -838:00:00 1
+-837:59:59.999900 -838:00:00 -838:00:00 1
+-837:59:59.999000 -838:00:00 -838:00:00 1
+-837:59:59.990000 -838:00:00 -838:00:00 1
+-837:59:59.900000 -838:00:00 -838:00:00 1
+-837:59:59.100000 -838:00:00 -838:00:00 1
+-837:59:59.000000 -837:59:59 -837:59:59 1
+-23:59:59.999999 -24:00:00 -24:00:00 1
+-23:59:59.999990 -24:00:00 -24:00:00 1
+-23:59:59.999900 -24:00:00 -24:00:00 1
+-23:59:59.999000 -24:00:00 -24:00:00 1
+-23:59:59.990000 -24:00:00 -24:00:00 1
+-23:59:59.900000 -24:00:00 -24:00:00 1
+-23:59:59.100000 -24:00:00 -24:00:00 1
+-23:59:59.000000 -23:59:59 -23:59:59 1
+-00:00:00.999999 -00:00:01 -00:00:01 1
+-00:00:00.999990 -00:00:01 -00:00:01 1
+-00:00:00.999900 -00:00:01 -00:00:01 1
+-00:00:00.999000 -00:00:01 -00:00:01 1
+-00:00:00.990000 -00:00:01 -00:00:01 1
+-00:00:00.900000 -00:00:01 -00:00:01 1
+-00:00:00.100000 -00:00:01 -00:00:01 1
+00:00:00.000000 00:00:00 00:00:00 1
+00:00:00.000000 00:00:00 00:00:00 1
+00:00:00.100000 00:00:00 00:00:00 1
+00:00:00.900000 00:00:00 00:00:00 1
+00:00:00.990000 00:00:00 00:00:00 1
+00:00:00.999000 00:00:00 00:00:00 1
+00:00:00.999900 00:00:00 00:00:00 1
+00:00:00.999990 00:00:00 00:00:00 1
+00:00:00.999999 00:00:00 00:00:00 1
+23:59:59.000000 23:59:59 23:59:59 1
+23:59:59.100000 23:59:59 23:59:59 1
+23:59:59.900000 23:59:59 23:59:59 1
+23:59:59.990000 23:59:59 23:59:59 1
+23:59:59.999000 23:59:59 23:59:59 1
+23:59:59.999900 23:59:59 23:59:59 1
+23:59:59.999990 23:59:59 23:59:59 1
+23:59:59.999999 23:59:59 23:59:59 1
+837:59:59.000000 837:59:59 837:59:59 1
+837:59:59.100000 837:59:59 837:59:59 1
+837:59:59.900000 837:59:59 837:59:59 1
+837:59:59.990000 837:59:59 837:59:59 1
+837:59:59.999000 837:59:59 837:59:59 1
+837:59:59.999900 837:59:59 837:59:59 1
+837:59:59.999990 837:59:59 837:59:59 1
+837:59:59.999999 837:59:59 837:59:59 1
+838:59:59.000000 838:59:59 838:59:59 1
+838:59:59.100000 838:59:59 838:59:59 1
+838:59:59.900000 838:59:59 838:59:59 1
+838:59:59.990000 838:59:59 838:59:59 1
+838:59:59.999000 838:59:59 838:59:59 1
+838:59:59.999900 838:59:59 838:59:59 1
+838:59:59.999990 838:59:59 838:59:59 1
+838:59:59.999999 838:59:59 838:59:59 1
+SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a;
+a CEILING(a) CEILING_SP(a) CEILING(a)=CEILING_SP(a)
+-838:59:59.999999 -838:59:59 -838:59:59 1
+-838:59:59.999990 -838:59:59 -838:59:59 1
+-838:59:59.999900 -838:59:59 -838:59:59 1
+-838:59:59.999000 -838:59:59 -838:59:59 1
+-838:59:59.990000 -838:59:59 -838:59:59 1
+-838:59:59.900000 -838:59:59 -838:59:59 1
+-838:59:59.100000 -838:59:59 -838:59:59 1
+-838:59:59.000000 -838:59:59 -838:59:59 1
+-837:59:59.999999 -837:59:59 -837:59:59 1
+-837:59:59.999990 -837:59:59 -837:59:59 1
+-837:59:59.999900 -837:59:59 -837:59:59 1
+-837:59:59.999000 -837:59:59 -837:59:59 1
+-837:59:59.990000 -837:59:59 -837:59:59 1
+-837:59:59.900000 -837:59:59 -837:59:59 1
+-837:59:59.100000 -837:59:59 -837:59:59 1
+-837:59:59.000000 -837:59:59 -837:59:59 1
+-23:59:59.999999 -23:59:59 -23:59:59 1
+-23:59:59.999990 -23:59:59 -23:59:59 1
+-23:59:59.999900 -23:59:59 -23:59:59 1
+-23:59:59.999000 -23:59:59 -23:59:59 1
+-23:59:59.990000 -23:59:59 -23:59:59 1
+-23:59:59.900000 -23:59:59 -23:59:59 1
+-23:59:59.100000 -23:59:59 -23:59:59 1
+-23:59:59.000000 -23:59:59 -23:59:59 1
+-00:00:00.999999 00:00:00 00:00:00 1
+-00:00:00.999990 00:00:00 00:00:00 1
+-00:00:00.999900 00:00:00 00:00:00 1
+-00:00:00.999000 00:00:00 00:00:00 1
+-00:00:00.990000 00:00:00 00:00:00 1
+-00:00:00.900000 00:00:00 00:00:00 1
+-00:00:00.100000 00:00:00 00:00:00 1
+00:00:00.000000 00:00:00 00:00:00 1
+00:00:00.000000 00:00:00 00:00:00 1
+00:00:00.100000 00:00:01 00:00:01 1
+00:00:00.900000 00:00:01 00:00:01 1
+00:00:00.990000 00:00:01 00:00:01 1
+00:00:00.999000 00:00:01 00:00:01 1
+00:00:00.999900 00:00:01 00:00:01 1
+00:00:00.999990 00:00:01 00:00:01 1
+00:00:00.999999 00:00:01 00:00:01 1
+23:59:59.000000 23:59:59 23:59:59 1
+23:59:59.100000 24:00:00 24:00:00 1
+23:59:59.900000 24:00:00 24:00:00 1
+23:59:59.990000 24:00:00 24:00:00 1
+23:59:59.999000 24:00:00 24:00:00 1
+23:59:59.999900 24:00:00 24:00:00 1
+23:59:59.999990 24:00:00 24:00:00 1
+23:59:59.999999 24:00:00 24:00:00 1
+837:59:59.000000 837:59:59 837:59:59 1
+837:59:59.100000 838:00:00 838:00:00 1
+837:59:59.900000 838:00:00 838:00:00 1
+837:59:59.990000 838:00:00 838:00:00 1
+837:59:59.999000 838:00:00 838:00:00 1
+837:59:59.999900 838:00:00 838:00:00 1
+837:59:59.999990 838:00:00 838:00:00 1
+837:59:59.999999 838:00:00 838:00:00 1
+838:59:59.000000 838:59:59 838:59:59 1
+838:59:59.100000 838:59:59 838:59:59 1
+838:59:59.900000 838:59:59 838:59:59 1
+838:59:59.990000 838:59:59 838:59:59 1
+838:59:59.999000 838:59:59 838:59:59 1
+838:59:59.999900 838:59:59 838:59:59 1
+838:59:59.999990 838:59:59 838:59:59 1
+838:59:59.999999 838:59:59 838:59:59 1
+DROP FUNCTION FLOOR_SP;
+DROP FUNCTION CEILING_SP;
+DROP TABLE t1;
diff --git a/mysql-test/main/type_time_hires.test b/mysql-test/main/type_time_hires.test
index 3785a23f1eb..f9b4a5a9f27 100644
--- a/mysql-test/main/type_time_hires.test
+++ b/mysql-test/main/type_time_hires.test
@@ -10,3 +10,189 @@ select min(a - interval 1 hour), max(a - interval 1 hour) from t1 where a < 0;
drop table t1;
select cast(1e-6 as time(6));
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+--echo #
+
+CREATE TABLE t1 (a1 TIME(6), a2 TIME(6) NOT NULL);
+CREATE TABLE t2 AS SELECT
+ ROUND(a1) AS r1,
+ ROUND(a2) AS r2,
+ TRUNCATE(a1,0) AS t1,
+ TRUNCATE(a2,0) AS t2
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES
+('-838:59:59.999999'),
+('-837:59:59.999999'),
+('-23:59:59.999999'),
+('-00:59:59.999999'),
+('-00:00:59.999999'),
+('00:00:00.999999'),
+('00:00:59.999999'),
+('00:59:59.999999'),
+('23:59:59.999999'),
+('837:59:59.999999'),
+('838:59:59.999999');
+
+
+SELECT a, TRUNCATE(a,0) FROM t1;
+SELECT a, TRUNCATE(a,1) FROM t1;
+SELECT a, TRUNCATE(a,2) FROM t1;
+SELECT a, TRUNCATE(a,3) FROM t1;
+SELECT a, TRUNCATE(a,4) FROM t1;
+SELECT a, TRUNCATE(a,5) FROM t1;
+SELECT a, TRUNCATE(a,6) FROM t1;
+SELECT a, TRUNCATE(a,7) FROM t1;
+SELECT a, TRUNCATE(a,-1) FROM t1;
+SELECT a, TRUNCATE(a,-6) FROM t1;
+
+SELECT a, ROUND(a) FROM t1;
+SELECT a, ROUND(a,0) FROM t1;
+SELECT a, ROUND(a,1) FROM t1;
+SELECT a, ROUND(a,2) FROM t1;
+SELECT a, ROUND(a,3) FROM t1;
+SELECT a, ROUND(a,4) FROM t1;
+SELECT a, ROUND(a,5) FROM t1;
+SELECT a, ROUND(a,6) FROM t1;
+SELECT a, ROUND(a,7) FROM t1;
+SELECT a, ROUND(a,-1) FROM t1;
+SELECT a, ROUND(a,-6) FROM t1;
+
+DROP TABLE t1;
+
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE()
+--echo #
+
+CREATE TABLE t1 AS SELECT
+ FLOOR(TIME'00:00:00.999999'),
+ CEILING(TIME'00:00:00.999999');
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6));
+
+INSERT INTO t1 VALUES ('838:59:59.999999');
+INSERT INTO t1 VALUES ('838:59:59.99999');
+INSERT INTO t1 VALUES ('838:59:59.9999');
+INSERT INTO t1 VALUES ('838:59:59.999');
+INSERT INTO t1 VALUES ('838:59:59.99');
+INSERT INTO t1 VALUES ('838:59:59.9');
+INSERT INTO t1 VALUES ('838:59:59.1');
+INSERT INTO t1 VALUES ('838:59:59.0');
+
+INSERT INTO t1 VALUES ('837:59:59.999999');
+INSERT INTO t1 VALUES ('837:59:59.99999');
+INSERT INTO t1 VALUES ('837:59:59.9999');
+INSERT INTO t1 VALUES ('837:59:59.999');
+INSERT INTO t1 VALUES ('837:59:59.99');
+INSERT INTO t1 VALUES ('837:59:59.9');
+INSERT INTO t1 VALUES ('837:59:59.1');
+INSERT INTO t1 VALUES ('837:59:59.0');
+
+INSERT INTO t1 VALUES ('23:59:59.999999');
+INSERT INTO t1 VALUES ('23:59:59.99999');
+INSERT INTO t1 VALUES ('23:59:59.9999');
+INSERT INTO t1 VALUES ('23:59:59.999');
+INSERT INTO t1 VALUES ('23:59:59.99');
+INSERT INTO t1 VALUES ('23:59:59.9');
+INSERT INTO t1 VALUES ('23:59:59.1');
+INSERT INTO t1 VALUES ('23:59:59.0');
+
+INSERT INTO t1 VALUES ('00:00:00.999999');
+INSERT INTO t1 VALUES ('00:00:00.99999');
+INSERT INTO t1 VALUES ('00:00:00.9999');
+INSERT INTO t1 VALUES ('00:00:00.999');
+INSERT INTO t1 VALUES ('00:00:00.99');
+INSERT INTO t1 VALUES ('00:00:00.9');
+INSERT INTO t1 VALUES ('00:00:00.1');
+INSERT INTO t1 VALUES ('00:00:00.0');
+
+INSERT INTO t1 VALUES ('-00:00:00.999999');
+INSERT INTO t1 VALUES ('-00:00:00.99999');
+INSERT INTO t1 VALUES ('-00:00:00.9999');
+INSERT INTO t1 VALUES ('-00:00:00.999');
+INSERT INTO t1 VALUES ('-00:00:00.99');
+INSERT INTO t1 VALUES ('-00:00:00.9');
+INSERT INTO t1 VALUES ('-00:00:00.1');
+INSERT INTO t1 VALUES ('-00:00:00.0');
+
+INSERT INTO t1 VALUES ('-23:59:59.999999');
+INSERT INTO t1 VALUES ('-23:59:59.99999');
+INSERT INTO t1 VALUES ('-23:59:59.9999');
+INSERT INTO t1 VALUES ('-23:59:59.999');
+INSERT INTO t1 VALUES ('-23:59:59.99');
+INSERT INTO t1 VALUES ('-23:59:59.9');
+INSERT INTO t1 VALUES ('-23:59:59.1');
+INSERT INTO t1 VALUES ('-23:59:59.0');
+
+INSERT INTO t1 VALUES ('-837:59:59.999999');
+INSERT INTO t1 VALUES ('-837:59:59.99999');
+INSERT INTO t1 VALUES ('-837:59:59.9999');
+INSERT INTO t1 VALUES ('-837:59:59.999');
+INSERT INTO t1 VALUES ('-837:59:59.99');
+INSERT INTO t1 VALUES ('-837:59:59.9');
+INSERT INTO t1 VALUES ('-837:59:59.1');
+INSERT INTO t1 VALUES ('-837:59:59.0');
+
+INSERT INTO t1 VALUES ('-838:59:59.999999');
+INSERT INTO t1 VALUES ('-838:59:59.99999');
+INSERT INTO t1 VALUES ('-838:59:59.9999');
+INSERT INTO t1 VALUES ('-838:59:59.999');
+INSERT INTO t1 VALUES ('-838:59:59.99');
+INSERT INTO t1 VALUES ('-838:59:59.9');
+INSERT INTO t1 VALUES ('-838:59:59.1');
+INSERT INTO t1 VALUES ('-838:59:59.0');
+
+DELIMITER $$;
+CREATE FUNCTION FLOOR_SP(a TIME(6)) RETURNS TIME
+BEGIN
+ RETURN
+ CASE
+ WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a
+ WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a
+ WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits
+ WHEN a<0 THEN TRUNCATE(a,0)-INTERVAL 1 SECOND -- negative values
+ WHEN a>0 THEN TRUNCATE(a,0) -- positive values
+ END;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+CREATE FUNCTION CEILING_SP(a TIME(6)) RETURNS TIME
+BEGIN
+ RETURN
+ CASE
+ WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a
+ WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a
+ WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits
+ WHEN a<0 THEN TRUNCATE(a,0) -- negative values
+ WHEN a>0 THEN TRUNCATE(a,0)+INTERVAL 1 SECOND -- positive values
+ END;
+END;
+$$
+DELIMITER ;$$
+
+SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a;
+SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a;
+
+DROP FUNCTION FLOOR_SP;
+DROP FUNCTION CEILING_SP;
+
+DROP TABLE t1;
diff --git a/mysql-test/main/type_time_round.result b/mysql-test/main/type_time_round.result
new file mode 100644
index 00000000000..31e97c888db
--- /dev/null
+++ b/mysql-test/main/type_time_round.result
@@ -0,0 +1,260 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# TIME: SET
+#
+CREATE TABLE t1 (a TIME(3), b TIME(4));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(3), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT a FROM t1;
+a
+00:00:01.000000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000000
+DROP TABLE t1;
+#
+# TIME: ALTER
+#
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+a
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+ALTER TABLE t1 MODIFY a TIME(3);
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+#
+# TIME: CAST
+#
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+00:00:00.9999 00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+00:00:00.9999 00:00:01.000
+00:00:00.9999999 00:00:01.000
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+0.9999000000 00:00:01.000
+0.9999999000 00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+0.9999 00:00:01.000
+0.9999999 00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+a CAST(a AS TIME(6))
+00:00:00.9999999 00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+a CAST(a AS TIME(6))
+0.9999999000 00:00:01.000000
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+a CAST(a AS TIME(6))
+0.9999999 00:00:01.000000
+DROP TABLE t1;
+#
+# NOW
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+id a
+1 24:00:00.0000
+2 24:00:00.0000
+3 24:00:00.0000
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# Equal field propagation
+#
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES (0.999999);
+INSERT INTO t1 VALUES (0.9999999);
+SELECT * FROM t1 WHERE a=0.9999999;
+a
+00:00:01.000000
+SELECT * FROM t1 WHERE a='0.9999999';
+a
+00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+a
+00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1292 Truncated incorrect time value: '0.9999999'
+SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+a
+00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIME'00:00:01'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIME'00:00:01'
+DROP TABLE t1;
+#
+# Comparing non-temporal to TIME
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('22:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+a
+22:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '22:59:59.9999999'
+SELECT * FROM t1 WHERE CONCAT(a)=TIME'23:00:00';
+a
+22:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '22:59:59.9999999'
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+a
+22:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '22:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (225959.9999999);
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+a
+225959.9999999
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+a
+225959.9999999
+DROP TABLE t1;
+#
+# Literal corner case
+#
+SELECT TIME'838:59:59.999999';
+TIME'838:59:59.999999'
+838:59:59.999999
+SELECT TIME'838:59:59.9999999';
+ERROR HY000: Incorrect TIME value: '838:59:59.9999999'
+SELECT TIME'839:00:00';
+ERROR HY000: Incorrect TIME value: '839:00:00'
diff --git a/mysql-test/main/type_time_round.test b/mysql-test/main/type_time_round.test
new file mode 100644
index 00000000000..6d4b2d8947a
--- /dev/null
+++ b/mysql-test/main/type_time_round.test
@@ -0,0 +1,184 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # TIME: SET
+--echo #
+
+CREATE TABLE t1 (a TIME(3), b TIME(4));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(3), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # TIME: ALTER
+--echo #
+
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # TIME: CAST
+--echo #
+
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # NOW
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # Equal field propagation
+--echo #
+
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES (0.999999);
+INSERT INTO t1 VALUES (0.9999999);
+SELECT * FROM t1 WHERE a=0.9999999;
+SELECT * FROM t1 WHERE a='0.9999999';
+SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+DROP TABLE t1;
+
+
+--echo #
+--echo # Comparing non-temporal to TIME
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('22:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+SELECT * FROM t1 WHERE CONCAT(a)=TIME'23:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (225959.9999999);
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+DROP TABLE t1;
+
+--echo #
+--echo # Literal corner case
+--echo #
+
+SELECT TIME'838:59:59.999999';
+--error ER_WRONG_VALUE
+SELECT TIME'838:59:59.9999999';
+--error ER_WRONG_VALUE
+SELECT TIME'839:00:00';
diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result
index 498cc472f17..e6fa9756b1d 100644
--- a/mysql-test/main/type_timestamp.result
+++ b/mysql-test/main/type_timestamp.result
@@ -492,8 +492,12 @@ INSERT INTO t1 (f2,f3) VALUES (NOW(), "0000-00-00 00:00:00");
INSERT INTO t1 (f2,f3) VALUES (NOW(), NULL);
INSERT INTO t1 (f2,f3) VALUES (NOW(), ASCII(NULL));
INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME('9999999999'));
+Warnings:
+Warning 1292 Truncated incorrect unixtime value: '9999999999'
INSERT INTO t1 (f2,f3) VALUES (NOW(), TIME(NULL));
UPDATE t1 SET f2=NOW(), f3=FROM_UNIXTIME('9999999999') WHERE f1=1;
+Warnings:
+Warning 1292 Truncated incorrect unixtime value: '9999999999'
SELECT f1,f2-f3 FROM t1;
f1 f2-f3
1 0
@@ -528,6 +532,10 @@ DROP TABLE t1;
# are appended with .0
#
CREATE TABLE t1 ( a TIMESTAMP, KEY ( a ) );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:01' );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:02' );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:03' );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:04' );
INSERT INTO t1 VALUES( '2010-02-01 09:31:01' );
INSERT INTO t1 VALUES( '2010-02-01 09:31:02' );
INSERT INTO t1 VALUES( '2010-02-01 09:31:03' );
@@ -544,10 +552,18 @@ a
2010-02-01 09:31:04
SELECT * FROM t1 WHERE a <= '2010-02-01 09:31:02.0';
a
+2010-02-01 09:30:01
+2010-02-01 09:30:02
+2010-02-01 09:30:03
+2010-02-01 09:30:04
2010-02-01 09:31:01
2010-02-01 09:31:02
SELECT * FROM t1 WHERE '2010-02-01 09:31:02.0' >= a;
a
+2010-02-01 09:30:01
+2010-02-01 09:30:02
+2010-02-01 09:30:03
+2010-02-01 09:30:04
2010-02-01 09:31:01
2010-02-01 09:31:02
EXPLAIN
@@ -869,7 +885,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Warning 1292 Incorrect datetime value: ' garbage '
-Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-00-00 00:00:00' and <cache>(octet_length(TIMESTAMP'0000-00-00 00:00:00')) = 30 + rand()
+Warning 1292 Incorrect datetime value: ' garbage '
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(`test`.`t1`.`a`) = 30 + rand() and `test`.`t1`.`a` = ' garbage '
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP);;
INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2001-01-01 00:00:01');
@@ -1014,3 +1031,294 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning
+#
+CREATE TABLE t1 (b BIT(20));
+CREATE TABLE t2 (t TIMESTAMP);
+INSERT IGNORE INTO t1 VALUES (b'000001001100000');
+INSERT INTO t2 SELECT * FROM t1;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED);
+DROP TABLE t1;
+#
+# MDEV-17928 Conversion from TIMESTAMP to VARCHAR SP variables does not work well on fractional digits
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE ts10 TIMESTAMP(1) DEFAULT NOW();
+DECLARE ts16 TIMESTAMP(1) DEFAULT NOW(6);
+DECLARE dt10 DATETIME(1) DEFAULT NOW();
+DECLARE dt16 DATETIME(1) DEFAULT NOW(6);
+DECLARE vts10 VARCHAR(32) DEFAULT ts10;
+DECLARE vts16 VARCHAR(32) DEFAULT ts16;
+DECLARE vdt10 VARCHAR(32) DEFAULT dt10;
+DECLARE vdt16 VARCHAR(32) DEFAULT dt16;
+DECLARE tts10 TEXT(32) DEFAULT ts10;
+DECLARE tts16 TEXT(32) DEFAULT ts16;
+DECLARE tdt10 TEXT(32) DEFAULT dt10;
+DECLARE tdt16 TEXT(32) DEFAULT dt16;
+SELECT vts10, vts16, vdt10, vdt16;
+SELECT tts10, tts16, tdt10, tdt16;
+END;
+$$
+CALL p1;
+vts10 2001-01-01 10:20:30.0
+vts16 2001-01-01 10:20:30.1
+vdt10 2001-01-01 10:20:30.0
+vdt16 2001-01-01 10:20:30.1
+tts10 2001-01-01 10:20:30.0
+tts16 2001-01-01 10:20:30.1
+tdt10 2001-01-01 10:20:30.0
+tdt16 2001-01-01 10:20:30.1
+DROP PROCEDURE p1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+# Testing Item_func_rollup_const::val_native()
+# There is a bug in the below output (MDEV-16612)
+# Please remove this comment when MDEV-16612 is fixed and results are re-recorded
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2);
+BEGIN NOT ATOMIC
+DECLARE v TIMESTAMP DEFAULT '2001-01-01 10:20:30'; -- "v" will be wrapped into Item_func_rollup_const
+SELECT id, v AS v, COUNT(*) FROM t1 GROUP BY id,v WITH ROLLUP;
+END;
+$$
+id v COUNT(*)
+1 2001-01-01 10:20:30 1
+1 2001-01-01 10:20:30 1
+2 2001-01-01 10:20:30 1
+2 2001-01-01 10:20:30 1
+NULL 2001-01-01 10:20:30 2
+DROP TABLE t1;
+#
+# Testing Type_handler_timestamp_common::Item_save_in_field()
+# "txt" is expected to have three fractional digits
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+CREATE TABLE t1 (ts1 TIMESTAMP(1) NOT NULL, ts2 TIMESTAMP(3) NOT NULL, txt TEXT);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00', '0000-00-00 00:00:00',COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(),NOW(),COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(1),NOW(3),COALESCE(ts1,ts2));
+SELECT * FROM t1;
+ts1 ts2 txt
+0000-00-00 00:00:00.0 0000-00-00 00:00:00.000 0000-00-00 00:00:00.000
+2001-01-01 10:20:30.0 2001-01-01 10:20:30.000 2001-01-01 10:20:30.000
+2001-01-01 10:20:30.1 2001-01-01 10:20:30.123 2001-01-01 10:20:30.100
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# Testing Field_timestamp::store_native
+#
+SET sql_mode='';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00','0000-00-00 00:00:00');
+SET sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE';
+UPDATE t1 SET a=b;
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`a` at row 1
+UPDATE t1 SET a=COALESCE(b);
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`a` at row 1
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+#
+CREATE TABLE t1 (a INT, b TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'2018-06-19 00:00:00');
+SELECT NULLIF(b, 'N/A') AS f, MAX(a) FROM t1 GROUP BY f;
+f MAX(a)
+2018-06-19 00:00:00 1
+Warnings:
+Warning 1292 Truncated incorrect datetime value: 'N/A'
+DROP TABLE t1;
+#
+# MDEV-17972 Assertion `is_valid_value_slow()' failed in Datetime::Datetime
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(6)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30');
+FLUSH TABLES;
+MYD
+FF77777777FFFFFF
+SELECT a, CAST(a AS DATETIME) AS dt0, CAST(a AS DATETIME(6)) AS dt6 FROM t1;
+a dt0 dt6
+2033-07-07 03:01:11.999999 2033-07-07 03:01:11 2033-07-07 03:01:11.999999
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# MDEV-18072 Assertion `is_null() == item->null_value || conv' failed in Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon query with GROUP BY
+#
+CREATE TABLE t1 (t TIMESTAMP);
+INSERT INTO t1 () VALUES (),();
+SELECT IF(0,t,NULL) AS f FROM t1 GROUP BY 'foo';
+f
+NULL
+DROP TABLE t1;
+#
+# MDEV-18145 Assertion `0' failed in Item::val_native upon SELECT subquery with timestamp
+#
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2);
+CREATE TABLE t3 (pk INT PRIMARY KEY, b TIMESTAMP) ENGINE=MyISAM;
+SELECT ( SELECT b FROM t1 LIMIT 1 ) AS sq FROM t2 LEFT JOIN t3 USING (pk);
+sq
+NULL
+NULL
+DROP TABLE t1, t2, t3;
+#
+# MDEV-18447 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv
+#
+CREATE TABLE t1 (a TIMESTAMP DEFAULT 0, b TIMESTAMP DEFAULT 0, c TIME DEFAULT 0);
+INSERT INTO t1 VALUES (0,0,0);
+SELECT c IN (GREATEST(a,b)) FROM t1;
+c IN (GREATEST(a,b))
+0
+DROP TABLE t1;
+#
+# MDEV-17969 Assertion `name' failed in THD::push_warning_truncated_value_for_field
+#
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('2018-01-01'),('2019-01-01');
+SET SESSION SQL_MODE= 'STRICT_ALL_TABLES,NO_ZERO_DATE';
+CREATE TABLE t2 SELECT 1 AS f FROM t1 GROUP BY FROM_DAYS(d);
+ERROR 22007: Truncated incorrect date value: '0000-00-00'
+DROP TABLE t1;
+#
+# MDEV-19124 Assertion `0' failed in Item::val_native
+#
+CREATE TABLE t1 (d1 TIMESTAMP(5));
+INSERT INTO t1 VALUES ('2018-10-14 15:31:01');
+SELECT LEAD(d1,1) OVER(ORDER BY d1) FROM t1;
+LEAD(d1,1) OVER(ORDER BY d1)
+NULL
+SELECT LAG(d1,1) OVER(ORDER BY d1) FROM t1;
+LAG(d1,1) OVER(ORDER BY d1)
+NULL
+INSERT INTO t1 VALUES ('2018-10-14 15:31:02');
+INSERT INTO t1 VALUES ('2018-10-14 15:31:03');
+SELECT LEAD(d1,1) OVER(ORDER BY d1) FROM t1;
+LEAD(d1,1) OVER(ORDER BY d1)
+2018-10-14 15:31:02.00000
+2018-10-14 15:31:03.00000
+NULL
+SELECT LAG(d1,1) OVER(ORDER BY d1) FROM t1;
+LAG(d1,1) OVER(ORDER BY d1)
+NULL
+2018-10-14 15:31:01.00000
+2018-10-14 15:31:02.00000
+DROP TABLE t1;
+#
+# MDEV-18240 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed
+#
+CREATE TABLE t1 (c1 timestamp);
+SELECT MIN(t1.c1) AS k1 FROM t1 HAVING (k1 >= ALL(SELECT 'a' UNION SELECT 'r'));
+k1
+Warnings:
+Warning 1292 Truncated incorrect datetime value: 'r'
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT 'a' UNION SELECT 'r');
+c1
+Warnings:
+Warning 1292 Truncated incorrect datetime value: 'r'
+DROP TABLE t1;
+CREATE TABLE t1 (c1 timestamp);
+INSERT INTO t1 VALUES ('2010-01-01 00:00:00');
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2010-01-01 10:00:00' UNION SELECT '2001-01-01 10:00:01');
+c1
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2000-01-01 10:00:00' UNION SELECT '2000-01-01 10:00:01');
+c1
+2010-01-01 00:00:00
+DROP TABLE t1;
+#
+# MDEV-18595 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed / Predicant_to_list_comparator::cmp_arg
+#
+CREATE TABLE t1 (t TIMESTAMP DEFAULT '1971-01-01 00:00:00', f INT);
+INSERT INTO t1 VALUES ('1978-05-25 22:25:03',1),('2000-01-01 00:00:00',2);
+SELECT * FROM t1 WHERE f IN (DEFAULT(t),1);
+t f
+1978-05-25 22:25:03 1
+Warnings:
+Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`f` at row 1
+Warning 1292 Incorrect datetime value: '2' for column `test`.`t1`.`f` at row 2
+DROP TABLE t1;
+#
+# MDEV-18503 Assertion `native.length() == binlen' failed in Type_handler_timestamp_common::make_sort_key
+#
+SET sql_mode='';
+CREATE TABLE t1 (a TIMESTAMP(3) DEFAULT 0, b TIMESTAMP);
+INSERT INTO t1 (b) VALUES ('2012-12-12 12:12:12'),('1988-08-26 12:12:12');
+SELECT GREATEST(a,b) AS f FROM t1 ORDER BY 1;
+f
+1988-08-26 12:12:12.000
+2012-12-12 12:12:12.000
+SELECT GREATEST(a,b) AS f FROM t1 ORDER BY 1 DESC;
+f
+2012-12-12 12:12:12.000
+1988-08-26 12:12:12.000
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-20417 Assertion `(m_ptr == __null) == item->null_value' failed in VDec::VDec(Item*)
+#
+CREATE TABLE t1 (a TIMESTAMP(4), b TIMESTAMP DEFAULT 0) ENGINE=MyISAM;
+INSERT IGNORE INTO t1 VALUES ('2001-01-01','2002-01-01'),('2003-01-01','2004-01-01');
+SELECT * FROM t1 WHERE DEFAULT(b) - a;
+a b
+Warnings:
+Warning 1916 Got overflow when converting '-20010101000000' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-20030101000000' to UNSIGNED INT. Value truncated
+SELECT LEFT('', DEFAULT(b)-a) FROM t1;
+LEFT('', DEFAULT(b)-a)
+
+
+Warnings:
+Warning 1916 Got overflow when converting '-20010101000000' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-20030101000000' to UNSIGNED INT. Value truncated
+DROP TABLE t1;
+CREATE TABLE t1 (a TIMESTAMP(4), b TIMESTAMP DEFAULT 0) ENGINE=MyISAM;
+INSERT IGNORE INTO t1 (a) VALUES ('2001-01-01'),('2003-01-01');
+SELECT * FROM t1 WHERE (SELECT MIN(b) FROM t1) - a;
+a b
+Warnings:
+Warning 1916 Got overflow when converting '-20010101000000' to UNSIGNED INT. Value truncated
+Warning 1916 Got overflow when converting '-20030101000000' to UNSIGNED INT. Value truncated
+SELECT (SELECT MIN(b) FROM t1) - a FROM t1;
+(SELECT MIN(b) FROM t1) - a
+-20010101000000.0000
+-20030101000000.0000
+DROP TABLE t1;
+#
+# MDEV-22734 Assertion `mon > 0 && mon < 13' failed in sec_since_epoch
+#
+SET time_zone="-02:00";
+CREATE TABLE t1(c TIMESTAMP KEY);
+SELECT * FROM t1 WHERE c='2010-00-01 00:00:00';
+c
+Warnings:
+Warning 1292 Incorrect datetime value: '2010-00-01 00:00:00'
+DROP TABLE t1;
+#
+# MDEV-22854 Garbage returned with SELECT CASE..DEFAULT(timestamp_field_with_now_as_default)
+#
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.456789');
+CREATE TABLE t1 (a TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP);
+INSERT INTO t1 VALUES ('2019-02-23 11:31:04'),('2023-02-09 00:00:00');
+SELECT CASE WHEN a THEN DEFAULT(a) END FROM t1;
+CASE WHEN a THEN DEFAULT(a) END
+2001-01-01 10:20:30.456
+2001-01-01 10:20:30.456
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test
index 6d81a86331a..9c5b57b8885 100644
--- a/mysql-test/main/type_timestamp.test
+++ b/mysql-test/main/type_timestamp.test
@@ -367,6 +367,10 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 ( a TIMESTAMP, KEY ( a ) );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:01' );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:02' );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:03' );
+INSERT INTO t1 VALUES( '2010-02-01 09:30:04' );
INSERT INTO t1 VALUES( '2010-02-01 09:31:01' );
INSERT INTO t1 VALUES( '2010-02-01 09:31:02' );
INSERT INTO t1 VALUES( '2010-02-01 09:31:03' );
@@ -606,3 +610,271 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning
+--echo #
+
+CREATE TABLE t1 (b BIT(20));
+CREATE TABLE t2 (t TIMESTAMP);
+INSERT IGNORE INTO t1 VALUES (b'000001001100000');
+INSERT INTO t2 SELECT * FROM t1;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED);
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17928 Conversion from TIMESTAMP to VARCHAR SP variables does not work well on fractional digits
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE ts10 TIMESTAMP(1) DEFAULT NOW();
+ DECLARE ts16 TIMESTAMP(1) DEFAULT NOW(6);
+ DECLARE dt10 DATETIME(1) DEFAULT NOW();
+ DECLARE dt16 DATETIME(1) DEFAULT NOW(6);
+ DECLARE vts10 VARCHAR(32) DEFAULT ts10;
+ DECLARE vts16 VARCHAR(32) DEFAULT ts16;
+ DECLARE vdt10 VARCHAR(32) DEFAULT dt10;
+ DECLARE vdt16 VARCHAR(32) DEFAULT dt16;
+ DECLARE tts10 TEXT(32) DEFAULT ts10;
+ DECLARE tts16 TEXT(32) DEFAULT ts16;
+ DECLARE tdt10 TEXT(32) DEFAULT dt10;
+ DECLARE tdt16 TEXT(32) DEFAULT dt16;
+
+ SELECT vts10, vts16, vdt10, vdt16;
+ SELECT tts10, tts16, tdt10, tdt16;
+END;
+$$
+DELIMITER ;$$
+--vertical_results
+CALL p1;
+--horizontal_results
+DROP PROCEDURE p1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+
+--echo # Testing Item_func_rollup_const::val_native()
+
+--echo # There is a bug in the below output (MDEV-16612)
+--echo # Please remove this comment when MDEV-16612 is fixed and results are re-recorded
+
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2);
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE v TIMESTAMP DEFAULT '2001-01-01 10:20:30'; -- "v" will be wrapped into Item_func_rollup_const
+ SELECT id, v AS v, COUNT(*) FROM t1 GROUP BY id,v WITH ROLLUP;
+END;
+$$
+DELIMITER ;$$
+DROP TABLE t1;
+
+--echo #
+--echo # Testing Type_handler_timestamp_common::Item_save_in_field()
+--echo # "txt" is expected to have three fractional digits
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+CREATE TABLE t1 (ts1 TIMESTAMP(1) NOT NULL, ts2 TIMESTAMP(3) NOT NULL, txt TEXT);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00', '0000-00-00 00:00:00',COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(),NOW(),COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(1),NOW(3),COALESCE(ts1,ts2));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # Testing Field_timestamp::store_native
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00','0000-00-00 00:00:00');
+SET sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE';
+--error ER_TRUNCATED_WRONG_VALUE
+UPDATE t1 SET a=b;
+--error ER_TRUNCATED_WRONG_VALUE
+UPDATE t1 SET a=COALESCE(b);
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+--echo #
+
+CREATE TABLE t1 (a INT, b TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'2018-06-19 00:00:00');
+SELECT NULLIF(b, 'N/A') AS f, MAX(a) FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17972 Assertion `is_valid_value_slow()' failed in Datetime::Datetime
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(6)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30');
+FLUSH TABLES;
+--remove_file $MYSQLD_DATADIR/test/t1.MYD
+--disable_query_log
+# Write a data file with one record:
+# 0xFF - record flags
+# 0x77777777 - TIMESTAMP integer part
+# 0xFFFFFF - TIMESTAMP bad fractional part
+--eval SELECT CONCAT(0xFF,0x77777777,0xFFFFFF) INTO OUTFILE '$MYSQLD_DATADIR/test/t1.MYD' FIELDS TERMINATED BY '' ESCAPED BY '' LINES TERMINATED BY ''
+--eval SELECT HEX(LOAD_FILE('$MYSQLD_DATADIR/test/t1.MYD')) AS MYD
+--enable_query_log
+SELECT a, CAST(a AS DATETIME) AS dt0, CAST(a AS DATETIME(6)) AS dt6 FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # MDEV-18072 Assertion `is_null() == item->null_value || conv' failed in Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon query with GROUP BY
+--echo #
+
+CREATE TABLE t1 (t TIMESTAMP);
+INSERT INTO t1 () VALUES (),();
+SELECT IF(0,t,NULL) AS f FROM t1 GROUP BY 'foo';
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18145 Assertion `0' failed in Item::val_native upon SELECT subquery with timestamp
+--echo #
+
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2);
+CREATE TABLE t3 (pk INT PRIMARY KEY, b TIMESTAMP) ENGINE=MyISAM;
+SELECT ( SELECT b FROM t1 LIMIT 1 ) AS sq FROM t2 LEFT JOIN t3 USING (pk);
+DROP TABLE t1, t2, t3;
+
+--echo #
+--echo # MDEV-18447 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP DEFAULT 0, b TIMESTAMP DEFAULT 0, c TIME DEFAULT 0);
+INSERT INTO t1 VALUES (0,0,0);
+SELECT c IN (GREATEST(a,b)) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17969 Assertion `name' failed in THD::push_warning_truncated_value_for_field
+--echo #
+
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('2018-01-01'),('2019-01-01');
+SET SESSION SQL_MODE= 'STRICT_ALL_TABLES,NO_ZERO_DATE';
+--error ER_TRUNCATED_WRONG_VALUE
+CREATE TABLE t2 SELECT 1 AS f FROM t1 GROUP BY FROM_DAYS(d);
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-19124 Assertion `0' failed in Item::val_native
+--echo #
+
+CREATE TABLE t1 (d1 TIMESTAMP(5));
+INSERT INTO t1 VALUES ('2018-10-14 15:31:01');
+SELECT LEAD(d1,1) OVER(ORDER BY d1) FROM t1;
+SELECT LAG(d1,1) OVER(ORDER BY d1) FROM t1;
+INSERT INTO t1 VALUES ('2018-10-14 15:31:02');
+INSERT INTO t1 VALUES ('2018-10-14 15:31:03');
+SELECT LEAD(d1,1) OVER(ORDER BY d1) FROM t1;
+SELECT LAG(d1,1) OVER(ORDER BY d1) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18240 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed
+--echo #
+
+CREATE TABLE t1 (c1 timestamp);
+SELECT MIN(t1.c1) AS k1 FROM t1 HAVING (k1 >= ALL(SELECT 'a' UNION SELECT 'r'));
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT 'a' UNION SELECT 'r');
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 timestamp);
+INSERT INTO t1 VALUES ('2010-01-01 00:00:00');
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2010-01-01 10:00:00' UNION SELECT '2001-01-01 10:00:01');
+SELECT * FROM t1 HAVING MIN(t1.c1) >= ALL(SELECT '2000-01-01 10:00:00' UNION SELECT '2000-01-01 10:00:01');
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18595 Assertion `0' failed in Item_cache_timestamp::val_datetime_packed / Predicant_to_list_comparator::cmp_arg
+--echo #
+
+CREATE TABLE t1 (t TIMESTAMP DEFAULT '1971-01-01 00:00:00', f INT);
+INSERT INTO t1 VALUES ('1978-05-25 22:25:03',1),('2000-01-01 00:00:00',2);
+SELECT * FROM t1 WHERE f IN (DEFAULT(t),1);
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-18503 Assertion `native.length() == binlen' failed in Type_handler_timestamp_common::make_sort_key
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (a TIMESTAMP(3) DEFAULT 0, b TIMESTAMP);
+INSERT INTO t1 (b) VALUES ('2012-12-12 12:12:12'),('1988-08-26 12:12:12');
+SELECT GREATEST(a,b) AS f FROM t1 ORDER BY 1;
+SELECT GREATEST(a,b) AS f FROM t1 ORDER BY 1 DESC;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo #
+--echo # MDEV-20417 Assertion `(m_ptr == __null) == item->null_value' failed in VDec::VDec(Item*)
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP(4), b TIMESTAMP DEFAULT 0) ENGINE=MyISAM;
+INSERT IGNORE INTO t1 VALUES ('2001-01-01','2002-01-01'),('2003-01-01','2004-01-01');
+SELECT * FROM t1 WHERE DEFAULT(b) - a;
+SELECT LEFT('', DEFAULT(b)-a) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIMESTAMP(4), b TIMESTAMP DEFAULT 0) ENGINE=MyISAM;
+INSERT IGNORE INTO t1 (a) VALUES ('2001-01-01'),('2003-01-01');
+SELECT * FROM t1 WHERE (SELECT MIN(b) FROM t1) - a;
+SELECT (SELECT MIN(b) FROM t1) - a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22734 Assertion `mon > 0 && mon < 13' failed in sec_since_epoch
+--echo #
+SET time_zone="-02:00";
+CREATE TABLE t1(c TIMESTAMP KEY);
+SELECT * FROM t1 WHERE c='2010-00-01 00:00:00';
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-22854 Garbage returned with SELECT CASE..DEFAULT(timestamp_field_with_now_as_default)
+--echo #
+
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.456789');
+CREATE TABLE t1 (a TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP);
+INSERT INTO t1 VALUES ('2019-02-23 11:31:04'),('2023-02-09 00:00:00');
+SELECT CASE WHEN a THEN DEFAULT(a) END FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_timestamp_hires.result b/mysql-test/main/type_timestamp_hires.result
index fa6adc075ed..64675ff9973 100644
--- a/mysql-test/main/type_timestamp_hires.result
+++ b/mysql-test/main/type_timestamp_hires.result
@@ -17,8 +17,8 @@ a
2010-12-11 01:02:03.456
2010-12-11 03:04:05.789
2010-12-11 15:47:11.123
-select truncate(a, 6) from t1;
-truncate(a, 6)
+select cast(a AS double(30,6)) from t1;
+cast(a AS double(30,6))
0.000000
20101211002003.120000
20101211010203.457031
@@ -333,3 +333,310 @@ t1 CREATE TABLE `t1` (
`a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+#
+# ROUND(timestamp) and TRUNCATE(timestamp) currently return DATETIME.
+# This may change in the future to return TIMESTAMP.
+CREATE TABLE t1 (a1 TIMESTAMP(6) NULL DEFAULT '2001-01-01 00:00:00', a2 TIMESTAMP(6) NOT NULL);
+CREATE TABLE t2 AS SELECT
+ROUND(a1) AS r1,
+ROUND(a2) AS r2,
+TRUNCATE(a1,0) AS t1,
+TRUNCATE(a2,0) AS t2
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `r1` datetime DEFAULT NULL,
+ `r2` datetime DEFAULT NULL,
+ `t1` datetime DEFAULT NULL,
+ `t2` datetime NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(6));
+INSERT INTO t1 VALUES
+('1970-01-01 00:00:01.999999'),
+('2000-01-01 00:00:00.999999'),
+('2000-01-01 23:59:59.999999'),
+('2000-02-29 23:59:59.999999'),
+('2000-12-31 23:59:59.999999'),
+('2001-01-01 00:00:00.999999'),
+('2001-01-01 23:59:59.999999'),
+('2001-02-28 23:59:59.999999'),
+('2001-12-31 23:59:59.999999'),
+('2038-01-19 03:14:07.999999');
+SELECT a, TRUNCATE(a,0) FROM t1;
+a TRUNCATE(a,0)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07
+SELECT a, TRUNCATE(a,1) FROM t1;
+a TRUNCATE(a,1)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.9
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.9
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.9
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.9
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.9
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.9
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.9
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.9
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.9
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.9
+SELECT a, TRUNCATE(a,2) FROM t1;
+a TRUNCATE(a,2)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.99
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.99
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.99
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.99
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.99
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.99
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.99
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.99
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.99
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.99
+SELECT a, TRUNCATE(a,3) FROM t1;
+a TRUNCATE(a,3)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.999
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.999
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.999
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.999
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.999
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.999
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.999
+SELECT a, TRUNCATE(a,4) FROM t1;
+a TRUNCATE(a,4)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.9999
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.9999
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.9999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.9999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.9999
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.9999
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.9999
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.9999
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.9999
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.9999
+SELECT a, TRUNCATE(a,5) FROM t1;
+a TRUNCATE(a,5)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.99999
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.99999
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.99999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.99999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.99999
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.99999
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.99999
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.99999
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.99999
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.99999
+SELECT a, TRUNCATE(a,6) FROM t1;
+a TRUNCATE(a,6)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.999999
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.999999
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.999999
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.999999
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.999999
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.999999
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.999999
+SELECT a, TRUNCATE(a,7) FROM t1;
+a TRUNCATE(a,7)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.999999
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.999999
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.999999
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.999999
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.999999
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.999999
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.999999
+SELECT a, TRUNCATE(a,-1) FROM t1;
+a TRUNCATE(a,-1)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07
+SELECT a, TRUNCATE(a,-6) FROM t1;
+a TRUNCATE(a,-6)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07
+SELECT a, ROUND(a) FROM t1;
+a ROUND(a)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08
+SELECT a, ROUND(a,0) FROM t1;
+a ROUND(a,0)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08
+SELECT a, ROUND(a,1) FROM t1;
+a ROUND(a,1)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02.0
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01.0
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00.0
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.0
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.0
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01.0
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00.0
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00.0
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00.0
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08.0
+SELECT a, ROUND(a,2) FROM t1;
+a ROUND(a,2)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02.00
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01.00
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00.00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.00
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01.00
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00.00
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00.00
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00.00
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08.00
+SELECT a, ROUND(a,3) FROM t1;
+a ROUND(a,3)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02.000
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01.000
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00.000
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.000
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.000
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01.000
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00.000
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00.000
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00.000
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08.000
+SELECT a, ROUND(a,4) FROM t1;
+a ROUND(a,4)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02.0000
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01.0000
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00.0000
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.0000
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.0000
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01.0000
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00.0000
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00.0000
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00.0000
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08.0000
+SELECT a, ROUND(a,5) FROM t1;
+a ROUND(a,5)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02.00000
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01.00000
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00.00000
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00.00000
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00.00000
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01.00000
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00.00000
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00.00000
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00.00000
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08.00000
+SELECT a, ROUND(a,6) FROM t1;
+a ROUND(a,6)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.999999
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.999999
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.999999
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.999999
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.999999
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.999999
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.999999
+SELECT a, ROUND(a,7) FROM t1;
+a ROUND(a,7)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:01.999999
+2000-01-01 00:00:00.999999 2000-01-01 00:00:00.999999
+2000-01-01 23:59:59.999999 2000-01-01 23:59:59.999999
+2000-02-29 23:59:59.999999 2000-02-29 23:59:59.999999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+2001-01-01 00:00:00.999999 2001-01-01 00:00:00.999999
+2001-01-01 23:59:59.999999 2001-01-01 23:59:59.999999
+2001-02-28 23:59:59.999999 2001-02-28 23:59:59.999999
+2001-12-31 23:59:59.999999 2001-12-31 23:59:59.999999
+2038-01-19 03:14:07.999999 2038-01-19 03:14:07.999999
+SELECT a, ROUND(a,-1) FROM t1;
+a ROUND(a,-1)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08
+SELECT a, ROUND(a,-6) FROM t1;
+a ROUND(a,-6)
+1970-01-01 00:00:01.999999 1970-01-01 00:00:02
+2000-01-01 00:00:00.999999 2000-01-01 00:00:01
+2000-01-01 23:59:59.999999 2000-01-02 00:00:00
+2000-02-29 23:59:59.999999 2000-03-01 00:00:00
+2000-12-31 23:59:59.999999 2001-01-01 00:00:00
+2001-01-01 00:00:00.999999 2001-01-01 00:00:01
+2001-01-01 23:59:59.999999 2001-01-02 00:00:00
+2001-02-28 23:59:59.999999 2001-03-01 00:00:00
+2001-12-31 23:59:59.999999 2002-01-01 00:00:00
+2038-01-19 03:14:07.999999 2038-01-19 03:14:08
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE()
+#
+CREATE TABLE t1 (a TIMESTAMP NOT NULL);
+CREATE TABLE t2 AS SELECT FLOOR(a), CEILING(a) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `FLOOR(a)` datetime DEFAULT NULL,
+ `CEILING(a)` datetime DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_timestamp_hires.test b/mysql-test/main/type_timestamp_hires.test
index 0b05f81ef42..27aed16d6be 100644
--- a/mysql-test/main/type_timestamp_hires.test
+++ b/mysql-test/main/type_timestamp_hires.test
@@ -40,3 +40,83 @@ show create table t1;
create or replace table t1 (a timestamp(5) on update current_timestamp(6));
show create table t1;
drop table t1;
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()
+--echo #
+
+--echo # ROUND(timestamp) and TRUNCATE(timestamp) currently return DATETIME.
+--echo # This may change in the future to return TIMESTAMP.
+
+CREATE TABLE t1 (a1 TIMESTAMP(6) NULL DEFAULT '2001-01-01 00:00:00', a2 TIMESTAMP(6) NOT NULL);
+CREATE TABLE t2 AS SELECT
+ ROUND(a1) AS r1,
+ ROUND(a2) AS r2,
+ TRUNCATE(a1,0) AS t1,
+ TRUNCATE(a2,0) AS t2
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+SET time_zone='+00:00';
+
+CREATE TABLE t1 (a TIMESTAMP(6));
+INSERT INTO t1 VALUES
+('1970-01-01 00:00:01.999999'),
+('2000-01-01 00:00:00.999999'),
+('2000-01-01 23:59:59.999999'),
+('2000-02-29 23:59:59.999999'),
+('2000-12-31 23:59:59.999999'),
+('2001-01-01 00:00:00.999999'),
+('2001-01-01 23:59:59.999999'),
+('2001-02-28 23:59:59.999999'),
+('2001-12-31 23:59:59.999999'),
+('2038-01-19 03:14:07.999999');
+
+SELECT a, TRUNCATE(a,0) FROM t1;
+SELECT a, TRUNCATE(a,1) FROM t1;
+SELECT a, TRUNCATE(a,2) FROM t1;
+SELECT a, TRUNCATE(a,3) FROM t1;
+SELECT a, TRUNCATE(a,4) FROM t1;
+SELECT a, TRUNCATE(a,5) FROM t1;
+SELECT a, TRUNCATE(a,6) FROM t1;
+SELECT a, TRUNCATE(a,7) FROM t1;
+SELECT a, TRUNCATE(a,-1) FROM t1;
+SELECT a, TRUNCATE(a,-6) FROM t1;
+
+SELECT a, ROUND(a) FROM t1;
+SELECT a, ROUND(a,0) FROM t1;
+SELECT a, ROUND(a,1) FROM t1;
+SELECT a, ROUND(a,2) FROM t1;
+SELECT a, ROUND(a,3) FROM t1;
+SELECT a, ROUND(a,4) FROM t1;
+SELECT a, ROUND(a,5) FROM t1;
+SELECT a, ROUND(a,6) FROM t1;
+SELECT a, ROUND(a,7) FROM t1;
+SELECT a, ROUND(a,-1) FROM t1;
+SELECT a, ROUND(a,-6) FROM t1;
+
+DROP TABLE t1;
+
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE()
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP NOT NULL);
+CREATE TABLE t2 AS SELECT FLOOR(a), CEILING(a) FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1, t2;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_timestamp_round.result b/mysql-test/main/type_timestamp_round.result
new file mode 100644
index 00000000000..7931aa0ff5b
--- /dev/null
+++ b/mysql-test/main/type_timestamp_round.result
@@ -0,0 +1,191 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# TIMESTAMP: SET
+#
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# TIMESTAMP: ALTER
+#
+CREATE TABLE t1 (a TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# Corner case:
+# ALTER TIMESTAMP to a shorter TIMESTAMP
+# All values round, maximum possible value truncates.
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a TIMESTAMP(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '2038-01-18 23:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '2038-01-19 03:14:06.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '2038-01-19 03:14:07.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a TIMESTAMP(5);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 3
+SELECT * FROM t1;
+ID a comment
+0 2038-01-19 00:00:00.00000 Should round
+1 2038-01-19 03:14:07.00000 Should round
+2 2038-01-19 03:14:07.99999 Should truncate
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# NOW
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-01 00:00:00.0000
+3 2011-01-01 00:00:00.0000
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# DATETIME to TIMESTAMP conversion with DST change
+#
+SET sql_mode=IF(@@version LIKE '%MariaDB%',
+'STRICT_ALL_TABLES,TIME_ROUND_FRACTIONAL',
+'STRICT_ALL_TABLES');
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap */);
+ERROR 22007: Incorrect datetime value: '2010-03-28 01:59:59.9' for column `test`.`t1`.`a` at row 1
+SELECT * FROM t1;
+a
+2010-03-28 01:59:59
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET sql_mode=@default_sql_mode;
+SET sql_mode=IF(@@version LIKE '%MariaDB%','TIME_ROUND_FRACTIONAL','');
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap, then gets fixed to the first second of the summer time */);
+Warnings:
+Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+a UNIX_TIMESTAMP(a)
+2010-03-28 01:59:59 1269730799
+2010-03-28 03:00:00 1269730800
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET sql_mode=@default_sql_mode;
+#
+# Comparing non-temporal to TIMESTAMP
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+a a
+2001-01-01 23:59:59.9999999 2001-01-02 00:00:00
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1,t2 WHERE CONCAT(t1.a)=t2.a;
+a a
+2001-01-01 23:59:59.9999999 2001-01-02 00:00:00
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+a a
+2001-01-01 23:59:59.9999999 2001-01-02 00:00:00
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+a a
+20010101235959.9999999 2001-01-02 00:00:00
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+a a
+20010101235959.9999999 2001-01-02 00:00:00
+DROP TABLE t1,t2;
+#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+# Test Field_timestamp::store_native()
+#
+SET sql_mode=@default_sql_mode;
+SET time_zone='+00:00';
+CREATE TABLE t1 (ts0 TIMESTAMP, ts1 TIMESTAMP(1));
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30', '2001-01-01 10:20:30.9');
+SELECT * FROM t1;
+ts0 ts1
+2001-01-01 10:20:30 2001-01-01 10:20:30.9
+# This should round
+UPDATE t1 SET ts0=COALESCE(ts1);
+SELECT * FROM t1;
+ts0 ts1
+2001-01-01 10:20:31 2001-01-01 10:20:30.9
+# Corner case
+UPDATE t1 SET ts1=FROM_UNIXTIME(2147483647.9);
+UPDATE t1 SET ts0=COALESCE(ts1);
+Warnings:
+Warning 1264 Out of range value for column 'ts0' at row 1
+SELECT * FROM t1;
+ts0 ts1
+2038-01-19 03:14:07 2038-01-19 03:14:07.9
+DROP TABLE t1;
+SET time_zone=DEFAULT;
diff --git a/mysql-test/main/type_timestamp_round.test b/mysql-test/main/type_timestamp_round.test
new file mode 100644
index 00000000000..19e0ea86da5
--- /dev/null
+++ b/mysql-test/main/type_timestamp_round.test
@@ -0,0 +1,160 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # TIMESTAMP: SET
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # TIMESTAMP: ALTER
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Corner case:
+--echo # ALTER TIMESTAMP to a shorter TIMESTAMP
+--echo # All values round, maximum possible value truncates.
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a TIMESTAMP(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '2038-01-18 23:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '2038-01-19 03:14:06.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '2038-01-19 03:14:07.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a TIMESTAMP(5);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # NOW
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # DATETIME to TIMESTAMP conversion with DST change
+--echo #
+
+--disable_warnings
+SET sql_mode=IF(@@version LIKE '%MariaDB%',
+ 'STRICT_ALL_TABLES,TIME_ROUND_FRACTIONAL',
+ 'STRICT_ALL_TABLES');
+--enable_warnings
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap */);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+--disable_warnings
+SET sql_mode=@default_sql_mode;
+--enable_warnings
+
+SET sql_mode=IF(@@version LIKE '%MariaDB%','TIME_ROUND_FRACTIONAL','');
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap, then gets fixed to the first second of the summer time */);
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+--disable_warnings
+SET sql_mode=@default_sql_mode;
+--enable_warnings
+
+
+--echo #
+--echo # Comparing non-temporal to TIMESTAMP
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+SELECT * FROM t1,t2 WHERE CONCAT(t1.a)=t2.a;
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+DROP TABLE t1,t2;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+DROP TABLE t1,t2;
+
+
+--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+--echo # Test Field_timestamp::store_native()
+--echo #
+
+SET sql_mode=@default_sql_mode;
+SET time_zone='+00:00';
+CREATE TABLE t1 (ts0 TIMESTAMP, ts1 TIMESTAMP(1));
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30', '2001-01-01 10:20:30.9');
+SELECT * FROM t1;
+--echo # This should round
+UPDATE t1 SET ts0=COALESCE(ts1);
+SELECT * FROM t1;
+--echo # Corner case
+UPDATE t1 SET ts1=FROM_UNIXTIME(2147483647.9);
+UPDATE t1 SET ts0=COALESCE(ts1);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
diff --git a/mysql-test/main/type_varchar.result b/mysql-test/main/type_varchar.result
index 1e9de7b78c5..2d8d8f4b247 100644
--- a/mysql-test/main/type_varchar.result
+++ b/mysql-test/main/type_varchar.result
@@ -12,7 +12,7 @@ t1 CREATE TABLE `t1` (
show create table vchar;
Table Create Table
vchar CREATE TABLE `vchar` (
- `v` varchar(30) DEFAULT NULL,
+ `v` varchar(30)/*old*/ DEFAULT NULL,
`c` char(3) DEFAULT NULL,
`e` enum('abc','def','ghi') DEFAULT NULL,
`t` text DEFAULT NULL
@@ -108,7 +108,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 257 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 257 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 257 NULL 3 Using where; Using index
alter table t1 change v v varchar(255);
select * from t1 where v like 'This is a test' order by v;
v
@@ -132,7 +132,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 258 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 258 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 258 NULL 3 Using where; Using index
alter table t1 change v v varchar(256);
select * from t1 where v like 'This is a test' order by v;
v
@@ -156,7 +156,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 259 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 259 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 259 NULL 3 Using where; Using index
alter table t1 change v v varchar(257);
select * from t1 where v like 'This is a test' order by v;
v
@@ -180,7 +180,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 260 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 260 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 260 NULL 3 Using where; Using index
alter table t1 change v v varchar(258);
select * from t1 where v like 'This is a test' order by v;
v
@@ -204,7 +204,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 261 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 261 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 261 NULL 3 Using where; Using index
alter table t1 change v v varchar(259);
select * from t1 where v like 'This is a test' order by v;
v
@@ -228,7 +228,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 262 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 262 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 262 NULL 3 Using where; Using index
alter table t1 change v v varchar(258);
select * from t1 where v like 'This is a test' order by v;
v
@@ -252,7 +252,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 261 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 261 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 261 NULL 3 Using where; Using index
alter table t1 change v v varchar(257);
select * from t1 where v like 'This is a test' order by v;
v
@@ -276,7 +276,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 260 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 260 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 260 NULL 3 Using where; Using index
alter table t1 change v v varchar(256);
select * from t1 where v like 'This is a test' order by v;
v
@@ -300,7 +300,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 259 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 259 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 259 NULL 3 Using where; Using index
alter table t1 change v v varchar(255);
select * from t1 where v like 'This is a test' order by v;
v
@@ -324,7 +324,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 258 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 258 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 258 NULL 3 Using where; Using index
alter table t1 change v v varchar(254);
select * from t1 where v like 'This is a test' order by v;
v
@@ -348,7 +348,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 257 const 3 Using where; Using index
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 257 NULL 2 Using where; Using index
+1 SIMPLE t1 range v v 257 NULL 3 Using where; Using index
alter table t1 change v v varchar(253);
alter table t1 change v v varchar(254), drop key v;
alter table t1 change v v varchar(300), add key (v(10));
@@ -374,7 +374,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const 4 Using where
explain select * from t1 where v like 'S%' order by v;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range v v 13 NULL 2 Using where; Using filesort
+1 SIMPLE t1 range v v 13 NULL 3 Using where; Using filesort
drop table t1;
create table t1 (pkcol varchar(16), othercol varchar(16), primary key (pkcol));
insert into t1 values ('test', 'something');
@@ -704,3 +704,37 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+SET sql_mode='';
+CREATE TABLE t1 (c VARCHAR(1) DEFAULT 'foo');
+ERROR 42000: Invalid default value for 'c'
+SHOW WARNINGS;
+Level Code Message
+Warning 1265 Data truncated for column 'c' at row 1
+Error 1067 Invalid default value for 'c'
+SET sql_mode='STRICT_ALL_TABLES';
+CREATE TABLE t1 (c VARCHAR(1) DEFAULT 'foo');
+ERROR 42000: Invalid default value for 'c'
+SHOW WARNINGS;
+Level Code Message
+Warning 1265 Data truncated for column 'c' at row 1
+Error 1067 Invalid default value for 'c'
+CREATE TABLE t1 (c VARCHAR(1));
+SET sql_mode='';
+ALTER TABLE t1 ALTER column c SET DEFAULT 'foo';
+ERROR 42000: Invalid default value for 'c'
+SHOW WARNINGS;
+Level Code Message
+Warning 1265 Data truncated for column 'c' at row 1
+Error 1067 Invalid default value for 'c'
+SET sql_mode='STRICT_ALL_TABLES';
+ALTER TABLE t1 ALTER column c SET DEFAULT 'foo';
+ERROR 42000: Invalid default value for 'c'
+SHOW WARNINGS;
+Level Code Message
+Warning 1265 Data truncated for column 'c' at row 1
+Error 1067 Invalid default value for 'c'
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_varchar.test b/mysql-test/main/type_varchar.test
index 8060b383981..9d0ad8a128b 100644
--- a/mysql-test/main/type_varchar.test
+++ b/mysql-test/main/type_varchar.test
@@ -347,3 +347,29 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+SET sql_mode='';
+--error ER_INVALID_DEFAULT
+CREATE TABLE t1 (c VARCHAR(1) DEFAULT 'foo');
+SHOW WARNINGS;
+
+SET sql_mode='STRICT_ALL_TABLES';
+--error ER_INVALID_DEFAULT
+CREATE TABLE t1 (c VARCHAR(1) DEFAULT 'foo');
+SHOW WARNINGS;
+
+CREATE TABLE t1 (c VARCHAR(1));
+SET sql_mode='';
+--error ER_INVALID_DEFAULT
+ALTER TABLE t1 ALTER column c SET DEFAULT 'foo';
+SHOW WARNINGS;
+SET sql_mode='STRICT_ALL_TABLES';
+--error ER_INVALID_DEFAULT
+ALTER TABLE t1 ALTER column c SET DEFAULT 'foo';
+SHOW WARNINGS;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_varchar_mysql41.result b/mysql-test/main/type_varchar_mysql41.result
new file mode 100644
index 00000000000..116e29a27c5
--- /dev/null
+++ b/mysql-test/main/type_varchar_mysql41.result
@@ -0,0 +1,113 @@
+#
+# MDEV-16325 CREATE..SELECT..UNION creates a wrong field type for old varchar
+#
+CREATE PROCEDURE p1(col VARCHAR(32))
+BEGIN
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_simple AS SELECT col FROM t1old','col',col);
+SHOW CREATE TABLE t2_simple;
+DROP TABLE t2_simple;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_union_vv AS SELECT col FROM t1old UNION SELECT col FROM t1old','col',col);
+SHOW CREATE TABLE t2_union_vv;
+DROP TABLE t2_union_vv;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_union_vn AS SELECT col FROM t1old UNION SELECT NULL','col',col);
+SHOW CREATE TABLE t2_union_vn;
+DROP TABLE t2_union_vn;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_union_nv AS SELECT NULL AS col UNION SELECT col FROM t1old','col',col);
+SHOW CREATE TABLE t2_union_nv;
+DROP TABLE t2_union_nv;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2 AS SELECT
+ COALESCE(col),
+ COALESCE(col,col),
+ COALESCE(col,NULL),
+ COALESCE(NULL,col)
+ FROM t1old', 'col', col);
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2 AS SELECT
+ LEAST(col,col),
+ LEAST(col,NULL),
+ LEAST(NULL,col)
+ FROM t1old','col',col);
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+END;
+$$
+TRUNCATE TABLE t1old;
+SHOW CREATE TABLE t1old;
+Table Create Table
+t1old CREATE TABLE `t1old` (
+ `v` varchar(30)/*old*/ DEFAULT NULL,
+ `c` char(3) DEFAULT NULL,
+ `e` enum('abc','def','ghi') DEFAULT NULL,
+ `t` text DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+CALL p1('v');
+Table Create Table
+t2_simple CREATE TABLE `t2_simple` (
+ `v` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2_union_vv CREATE TABLE `t2_union_vv` (
+ `v` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2_union_vn CREATE TABLE `t2_union_vn` (
+ `v` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2_union_nv CREATE TABLE `t2_union_nv` (
+ `v` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `COALESCE(v)` varchar(30) DEFAULT NULL,
+ `COALESCE(v,v)` varchar(30) DEFAULT NULL,
+ `COALESCE(v,NULL)` varchar(30) DEFAULT NULL,
+ `COALESCE(NULL,v)` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `LEAST(v,v)` varchar(30) DEFAULT NULL,
+ `LEAST(v,NULL)` varchar(30) DEFAULT NULL,
+ `LEAST(NULL,v)` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1old;
+TRUNCATE TABLE t1old;
+SHOW CREATE TABLE t1old;
+Table Create Table
+t1old CREATE TABLE `t1old` (
+ `a` varbinary(255)/*old*/ DEFAULT NULL,
+ `b` varchar(255)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+CALL p1('a');
+Table Create Table
+t2_simple CREATE TABLE `t2_simple` (
+ `a` varbinary(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2_union_vv CREATE TABLE `t2_union_vv` (
+ `a` varbinary(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2_union_vn CREATE TABLE `t2_union_vn` (
+ `a` varbinary(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2_union_nv CREATE TABLE `t2_union_nv` (
+ `a` varbinary(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `COALESCE(a)` varbinary(255) DEFAULT NULL,
+ `COALESCE(a,a)` varbinary(255) DEFAULT NULL,
+ `COALESCE(a,NULL)` varbinary(255) DEFAULT NULL,
+ `COALESCE(NULL,a)` varbinary(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `LEAST(a,a)` varbinary(255) DEFAULT NULL,
+ `LEAST(a,NULL)` varbinary(255) DEFAULT NULL,
+ `LEAST(NULL,a)` varbinary(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1old;
+DROP PROCEDURE p1;
diff --git a/mysql-test/main/type_varchar_mysql41.test b/mysql-test/main/type_varchar_mysql41.test
new file mode 100644
index 00000000000..5624e9edaaa
--- /dev/null
+++ b/mysql-test/main/type_varchar_mysql41.test
@@ -0,0 +1,59 @@
+--echo #
+--echo # MDEV-16325 CREATE..SELECT..UNION creates a wrong field type for old varchar
+--echo #
+
+
+DELIMITER $$;
+CREATE PROCEDURE p1(col VARCHAR(32))
+BEGIN
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_simple AS SELECT col FROM t1old','col',col);
+ SHOW CREATE TABLE t2_simple;
+ DROP TABLE t2_simple;
+
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_union_vv AS SELECT col FROM t1old UNION SELECT col FROM t1old','col',col);
+ SHOW CREATE TABLE t2_union_vv;
+ DROP TABLE t2_union_vv;
+
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_union_vn AS SELECT col FROM t1old UNION SELECT NULL','col',col);
+ SHOW CREATE TABLE t2_union_vn;
+ DROP TABLE t2_union_vn;
+
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2_union_nv AS SELECT NULL AS col UNION SELECT col FROM t1old','col',col);
+ SHOW CREATE TABLE t2_union_nv;
+ DROP TABLE t2_union_nv;
+
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2 AS SELECT
+ COALESCE(col),
+ COALESCE(col,col),
+ COALESCE(col,NULL),
+ COALESCE(NULL,col)
+ FROM t1old', 'col', col);
+ SHOW CREATE TABLE t2;
+ DROP TABLE t2;
+
+ EXECUTE IMMEDIATE REPLACE('CREATE TABLE t2 AS SELECT
+ LEAST(col,col),
+ LEAST(col,NULL),
+ LEAST(NULL,col)
+ FROM t1old','col',col);
+ SHOW CREATE TABLE t2;
+ DROP TABLE t2;
+END;
+$$
+DELIMITER ;$$
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+copy_file $MYSQL_TEST_DIR/std_data/vchar.frm $MYSQLD_DATADIR/test/t1old.frm;
+TRUNCATE TABLE t1old;
+SHOW CREATE TABLE t1old;
+CALL p1('v');
+DROP TABLE t1old;
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+copy_file $MYSQL_TEST_DIR/std_data/bug19371.frm $MYSQLD_DATADIR/test/t1old.frm;
+TRUNCATE TABLE t1old;
+SHOW CREATE TABLE t1old;
+CALL p1('a');
+DROP TABLE t1old;
+
+DROP PROCEDURE p1;
diff --git a/mysql-test/main/type_year.result b/mysql-test/main/type_year.result
index acdc729f4c2..b0fe62523c0 100644
--- a/mysql-test/main/type_year.result
+++ b/mysql-test/main/type_year.result
@@ -565,3 +565,115 @@ drop table t1;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-16451 Split Item_equal::add_const() into a virtual method in type_handler()
+#
+CREATE TABLE t1 (a YEAR(4));
+INSERT INTO t1 VALUES (93),(94);
+SELECT * FROM t1;
+a
+1993
+1994
+SELECT * FROM t1 WHERE a=1993 and a=93;
+a
+1993
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1993 and a=93;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1993
+DROP TABLE t1;
+CREATE TABLE t1 (a YEAR(2));
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+INSERT INTO t1 VALUES (93),(94);
+SELECT * FROM t1;
+a
+93
+94
+SELECT * FROM t1 WHERE a=1993 and a=93;
+a
+93
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1993 and a=93;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 93
+DROP TABLE t1;
+#
+# MDEV-16926 CAST(COALESCE(year_field)) returns wrong value
+#
+CREATE OR REPLACE TABLE t1 (a YEAR);
+INSERT INTO t1 VALUES (1970),(1978),(2000),(2069);
+SELECT a, CAST(a AS DATE), CAST(COALESCE(a) AS DATE) FROM t1;
+a CAST(a AS DATE) CAST(COALESCE(a) AS DATE)
+1970 1970-00-00 1970-00-00
+1978 1978-00-00 1978-00-00
+2000 2000-00-00 2000-00-00
+2069 2069-00-00 2069-00-00
+SELECT MIN(a), MAX(a) FROM t1;
+MIN(a) MAX(a)
+1970 2069
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a YEAR(2));
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+INSERT INTO t1 VALUES (1970),(1978),(2000),(2069);
+SELECT a, CAST(a AS DATE), CAST(COALESCE(a) AS DATE) FROM t1;
+a CAST(a AS DATE) CAST(COALESCE(a) AS DATE)
+70 1970-00-00 1970-00-00
+78 1978-00-00 1978-00-00
+00 2000-00-00 2000-00-00
+69 2069-00-00 2069-00-00
+SELECT MIN(a), MAX(a) FROM t1;
+MIN(a) MAX(a)
+70 69
+DROP TABLE t1;
+#
+# MDEV-17015 Assertion `m_year <= 9999' failed in Year::Year upon bad argument to MAKEDATE
+#
+SELECT MAKEDATE(18446744073709551615, 1);
+MAKEDATE(18446744073709551615, 1)
+NULL
+#
+# MDEV-17607 DATE(COALESCE(year_column)) returns a wrong result
+#
+CREATE TABLE t1 (a YEAR);
+INSERT INTO t1 VALUES (NULL);
+SELECT COALESCE(a), DATE(COALESCE(a)) FROM t1;
+COALESCE(a) DATE(COALESCE(a))
+NULL NULL
+DROP TABLE t1;
+#
+# MDEV-23337 Rounding functions create a wrong data type for numeric input
+#
+CREATE TABLE t1 (a YEAR(2));
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1;
+Warnings:
+Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+DESC t2;
+Field Type Null Key Default Extra
+a year(2) YES NULL
+ROUND(a) int(2) unsigned YES NULL
+TRUNCATE(a,0) int(2) unsigned YES NULL
+FLOOR(a) int(2) unsigned YES NULL
+CEILING(a) int(2) unsigned YES NULL
+DROP TABLE t2,t1;
+CREATE TABLE t1 (a YEAR(4));
+CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1;
+DESC t2;
+Field Type Null Key Default Extra
+a year(4) YES NULL
+ROUND(a) int(4) unsigned YES NULL
+TRUNCATE(a,0) int(4) unsigned YES NULL
+FLOOR(a) int(4) unsigned YES NULL
+CEILING(a) int(4) unsigned YES NULL
+DROP TABLE t2,t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_year.test b/mysql-test/main/type_year.test
index 34c417d9026..c1231cc3e79 100644
--- a/mysql-test/main/type_year.test
+++ b/mysql-test/main/type_year.test
@@ -280,3 +280,75 @@ drop table t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-16451 Split Item_equal::add_const() into a virtual method in type_handler()
+--echo #
+
+CREATE TABLE t1 (a YEAR(4));
+INSERT INTO t1 VALUES (93),(94);
+SELECT * FROM t1;
+SELECT * FROM t1 WHERE a=1993 and a=93;
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1993 and a=93;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a YEAR(2));
+INSERT INTO t1 VALUES (93),(94);
+SELECT * FROM t1;
+SELECT * FROM t1 WHERE a=1993 and a=93;
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=1993 and a=93;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-16926 CAST(COALESCE(year_field)) returns wrong value
+--echo #
+
+CREATE OR REPLACE TABLE t1 (a YEAR);
+INSERT INTO t1 VALUES (1970),(1978),(2000),(2069);
+SELECT a, CAST(a AS DATE), CAST(COALESCE(a) AS DATE) FROM t1;
+SELECT MIN(a), MAX(a) FROM t1;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a YEAR(2));
+INSERT INTO t1 VALUES (1970),(1978),(2000),(2069);
+SELECT a, CAST(a AS DATE), CAST(COALESCE(a) AS DATE) FROM t1;
+SELECT MIN(a), MAX(a) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17015 Assertion `m_year <= 9999' failed in Year::Year upon bad argument to MAKEDATE
+--echo #
+SELECT MAKEDATE(18446744073709551615, 1);
+
+--echo #
+--echo # MDEV-17607 DATE(COALESCE(year_column)) returns a wrong result
+--echo #
+
+CREATE TABLE t1 (a YEAR);
+INSERT INTO t1 VALUES (NULL);
+SELECT COALESCE(a), DATE(COALESCE(a)) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23337 Rounding functions create a wrong data type for numeric input
+--echo #
+
+CREATE TABLE t1 (a YEAR(2));
+CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1;
+DESC t2;
+DROP TABLE t2,t1;
+
+CREATE TABLE t1 (a YEAR(4));
+CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1;
+DESC t2;
+DROP TABLE t2,t1;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/udf.result b/mysql-test/main/udf.result
index f426e484735..27bd17e7e31 100644
--- a/mysql-test/main/udf.result
+++ b/mysql-test/main/udf.result
@@ -497,7 +497,114 @@ ERROR 42000: FUNCTION test.unexisting_udf does not exist
#
call mtr.add_suppression('Invalid row in mysql.func table');
insert mysql.func () values ();
+# restart
delete from mysql.func where name = '';
#
# End of 10.2 tests
#
+#
+# MDEV-15073: Generic UDAF parser code in server for window functions
+#
+CREATE AGGREGATE FUNCTION avgcost
+RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+CREATE AGGREGATE FUNCTION avg2
+RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+create table t1(pk int primary key,
+a int,
+sum int,
+price float(24));
+insert into t1 values
+(1, 1, 100, 50.00),
+(2, 1, 100, 100.00),
+(3, 1, 100, 50.00),
+(4, 1, 100, 50.00),
+(5, 1, 100, 50.00),
+(6, 1, 100, NULL),
+(7, 1, NULL, NULL),
+(8, 2, 2, 2),
+(9, 2, 4, 4);
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+pk a sum price avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+1 1 100 50 75.0000
+2 1 100 100 66.6667
+3 1 100 50 66.6667
+4 1 100 50 50.0000
+5 1 100 50 50.0000
+6 1 100 NULL 50.0000
+7 1 NULL NULL 0.0000
+8 2 2 2 3.3333
+9 2 4 4 3.3333
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+pk a sum price avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+1 1 100 50 50.0000
+2 1 100 100 75.0000
+3 1 100 50 75.0000
+4 1 100 50 50.0000
+5 1 100 50 50.0000
+6 1 100 NULL 50.0000
+7 1 NULL NULL 0.0000
+8 2 2 2 2.0000
+9 2 4 4 3.3333
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+pk a sum price avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+1 1 100 50 0.7500
+2 1 100 100 0.6667
+3 1 100 50 0.6667
+4 1 100 50 0.5000
+5 1 100 50 0.5000
+6 1 100 NULL 0.5000
+7 1 NULL NULL 0.0000
+8 2 2 2 1.0000
+9 2 4 4 1.0000
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+pk a sum price avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+1 1 100 50 0.5000
+2 1 100 100 0.7500
+3 1 100 50 0.7500
+4 1 100 50 0.5000
+5 1 100 50 0.5000
+6 1 100 NULL 0.5000
+7 1 NULL NULL 0.0000
+8 2 2 2 1.0000
+9 2 4 4 1.0000
+select pk, a, sum, price, tttttttt(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+fr...' at line 1
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+fr...' at line 1
+select pk, a, sum, price, round(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+fr...' at line 1
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+fr...' at line 1
+set @save_sql_mode = @@sql_mode;
+set sql_mode="oracle";
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+pk a sum price avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+1 1 100 50 0.5000
+2 1 100 100 0.7500
+3 1 100 50 0.7500
+4 1 100 50 0.5000
+5 1 100 50 0.5000
+6 1 100 NULL 0.5000
+7 1 NULL NULL 0.0000
+8 2 2 2 1.0000
+9 2 4 4 1.0000
+set sql_mode= @save_sql_mode;
+drop table t1;
+DROP FUNCTION avgcost;
+DROP FUNCTION avg2;
+DROP FUNCTION myfunc_double;
+# End of 10.4 tests
diff --git a/mysql-test/main/udf.test b/mysql-test/main/udf.test
index d0c71ffa7e6..058f131273d 100644
--- a/mysql-test/main/udf.test
+++ b/mysql-test/main/udf.test
@@ -573,3 +573,71 @@ delete from mysql.func where name = '';
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-15073: Generic UDAF parser code in server for window functions
+--echo #
+
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE AGGREGATE FUNCTION avgcost
+ RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE AGGREGATE FUNCTION avg2
+ RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
+
+create table t1(pk int primary key,
+ a int,
+ sum int,
+ price float(24));
+insert into t1 values
+ (1, 1, 100, 50.00),
+ (2, 1, 100, 100.00),
+ (3, 1, 100, 50.00),
+ (4, 1, 100, 50.00),
+ (5, 1, 100, 50.00),
+ (6, 1, 100, NULL),
+ (7, 1, NULL, NULL),
+ (8, 2, 2, 2),
+ (9, 2, 4, 4);
+
+--sorted_result
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+--sorted_result
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+
+--sorted_result
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+--sorted_result
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, tttttttt(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, round(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+
+set @save_sql_mode = @@sql_mode;
+set sql_mode="oracle";
+--sorted_result
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+set sql_mode= @save_sql_mode;
+
+drop table t1;
+DROP FUNCTION avgcost;
+DROP FUNCTION avg2;
+DROP FUNCTION myfunc_double;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/udf_notembedded.result b/mysql-test/main/udf_notembedded.result
index 377af563d3e..80df03862b2 100644
--- a/mysql-test/main/udf_notembedded.result
+++ b/mysql-test/main/udf_notembedded.result
@@ -2,5 +2,6 @@ create function udf_sequence returns integer soname "UDF_EXAMPLE_LIB";
create table t1 (n int key not null auto_increment, msg int as (udf_sequence()) virtual);
select * from t1;
n msg
+# restart
drop table t1;
drop function udf_sequence;
diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result
index 011d65578cb..fb1a2e35eb2 100644
--- a/mysql-test/main/union.result
+++ b/mysql-test/main/union.result
@@ -81,7 +81,7 @@ a b
2 b
1 a
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b;
-ERROR 42000: Table 't1' from one of the SELECTs cannot be used in global ORDER clause
+ERROR 42000: Table 't1' from one of the SELECTs cannot be used in ORDER clause
explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
@@ -494,7 +494,7 @@ drop temporary table t1;
create table t1 select a from t1 union select a from t2;
ERROR 42S01: Table 't1' already exists
select a from t1 union select a from t2 order by t2.a;
-ERROR 42000: Table 't2' from one of the SELECTs cannot be used in field list
+ERROR 42000: Table 't2' from one of the SELECTs cannot be used in ORDER clause
drop table t1,t2;
select length(version()) > 1 as `*` UNION select 2;
*
@@ -561,12 +561,12 @@ a b
3 3
4 4
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=1;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index
-2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+2 UNION t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity,@@optimizer_switch=@save_optimizer_switch;
explain (select * from t1 where a=1) union (select * from t1 where b=1);
@@ -1533,12 +1533,15 @@ SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY c) AS test;
ERROR 42S22: Unknown column 'c' in 'order clause'
DROP TABLE t1;
(select 1 into @var) union (select 1);
-ERROR HY000: Incorrect usage of UNION and INTO
+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 'into @var) union (select 1)' at line 1
(select 1) union (select 1 into @var);
-select @var;
-@var
-1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'into @var)' at line 1
(select 2) union (select 1 into @var);
+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 'into @var)' at line 1
+(select 1) union (select 1) into @var;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+(select 2) union (select 1) into @var;
ERROR 42000: Result consisted of more than one row
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (10), (20);
@@ -1664,8 +1667,20 @@ UNION
SELECT a FROM t1 WHERE 0
) alias;
SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
+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 'FROM t1' at line 1
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file5' FROM t1;
+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 'FROM t1' at line 1
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file6' FROM t1;
+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 'FROM t1' at line 1
+SELECT a FROM t1 UNION SELECT a FROM t1 INTO @v ;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+SELECT a FROM t1 UNION SELECT a FROM t1 INTO OUTFILE 'union.out.file5';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+SELECT a FROM t1 UNION SELECT a FROM t1 INTO OUTFILE 'union.out.file6';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
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 'UNION SELECT a FROM t1' at line 1
SELECT a INTO OUTFILE 'union.out.file7' FROM t1 UNION SELECT a FROM t1;
@@ -2022,7 +2037,7 @@ insert t1 values (1),(2),(3),(1);
explain select 1 from dual where exists (select max(a) from t1 group by a union select a+2 from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
-2 SUBQUERY t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
+2 SUBQUERY t1 ALL NULL NULL NULL NULL 4 Using temporary
3 UNION t1 ALL NULL NULL NULL NULL 4
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
drop table t1;
@@ -2160,7 +2175,7 @@ select id from t5 where name = (select name from t3 where id = t1.product_id)) l
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
2 SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 func 1 Using where
-3 SUBQUERY t2 ref PRIMARY PRIMARY 4 const 3 Using index
+3 SUBQUERY t2 ref PRIMARY PRIMARY 4 const 4 Using index
4 UNION t2 ref PRIMARY PRIMARY 4 func 1 Using where; Using index
5 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
6 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
@@ -2303,9 +2318,9 @@ GROUP BY i
HAVING i = 10;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
-2 UNION NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
+2 UNION NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Note 1003 /* select#1 */ select 1 AS `1`,2 AS `2` union all /* select#2 */ select 1 AS `i`,count(0) AS `COUNT(*)` from `test`.`t2` where 1 group by 1 having 0
+Note 1003 /* select#1 */ select 1 AS `1`,2 AS `2` union all /* select#2 */ select 1 AS `i`,count(0) AS `COUNT(*)` from `test`.`t2` where 0 group by 1 having 1
DROP TABLE t1,t2;
#
# MDEV-10120: Wrong result of UNION .. ORDER BY GROUP_CONCAT()
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index 484393611ae..a7adc347a53 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -341,7 +341,7 @@ explain extended (select * from t1 where a=1) union (select * from t2 where a=1)
(select * from t1 where a=1) union (select t1.a,t2.a from t1,t2 where t1.a=t2.a);
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity,@save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=1;
+SET optimizer_switch='outer_join_with_cache=off',@@optimizer_use_condition_selectivity=4;
explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a);
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity,@@optimizer_switch=@save_optimizer_switch;
@@ -978,13 +978,17 @@ DROP TABLE t1;
#
# Bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
+# (fixed)
#
---error 1221
+--error ER_PARSE_ERROR
(select 1 into @var) union (select 1);
+--error ER_PARSE_ERROR
(select 1) union (select 1 into @var);
-select @var;
---error 1172
+--error ER_PARSE_ERROR
(select 2) union (select 1 into @var);
+(select 1) union (select 1) into @var;
+--error ER_TOO_MANY_ROWS
+(select 2) union (select 1) into @var;
#
# Bug#27848: order-by of union clashes with rollup of select part
@@ -1104,9 +1108,15 @@ SELECT a INTO DUMPFILE 'union.out.file2' FROM (
SELECT a FROM t1 WHERE 0
) alias;
+--error ER_PARSE_ERROR
SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
+--error ER_PARSE_ERROR
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file5' FROM t1;
+--error ER_PARSE_ERROR
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file6' FROM t1;
+SELECT a FROM t1 UNION SELECT a FROM t1 INTO @v ;
+SELECT a FROM t1 UNION SELECT a FROM t1 INTO OUTFILE 'union.out.file5';
+SELECT a FROM t1 UNION SELECT a FROM t1 INTO OUTFILE 'union.out.file6';
--error ER_PARSE_ERROR
SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
--error ER_PARSE_ERROR
diff --git a/mysql-test/main/unique.result b/mysql-test/main/unique.result
new file mode 100644
index 00000000000..e982e1c4163
--- /dev/null
+++ b/mysql-test/main/unique.result
@@ -0,0 +1,9 @@
+CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, a varchar(30000), UNIQUE (a)) ENGINE=innodb;
+INSERT INTO t1 (a) VALUES (20),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
+SELECT * FROM t1 WHERE a BETWEEN '1' AND '100';
+pk a
+DROP TABLE t1;
+CREATE TABLE t2 (n BLOB, UNIQUE(n));
+INSERT INTO t2 VALUES (1);
+DELETE FROM t2 WHERE n = 1;
+DROP TABLE t2;
diff --git a/mysql-test/main/unique.test b/mysql-test/main/unique.test
new file mode 100644
index 00000000000..677ceb15a79
--- /dev/null
+++ b/mysql-test/main/unique.test
@@ -0,0 +1,22 @@
+--source include/have_innodb.inc
+
+#
+# MDEV-19224 Assertion `marked_for_read()' failed in various places with long
+# unique key
+#
+
+CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, a varchar(30000), UNIQUE (a)) ENGINE=innodb;
+INSERT INTO t1 (a) VALUES (20),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
+SELECT * FROM t1 WHERE a BETWEEN '1' AND '100';
+DROP TABLE t1;
+
+#
+# MDEV-19252 Warning about assertion failure marked_for_write_or_computed()
+# printed by release build with DBUG_ASSERT_AS_PRINTF, but no failure on debug
+# build
+#
+
+CREATE TABLE t2 (n BLOB, UNIQUE(n));
+INSERT INTO t2 VALUES (1);
+DELETE FROM t2 WHERE n = 1;
+DROP TABLE t2;
diff --git a/mysql-test/main/update.result b/mysql-test/main/update.result
index 9e19abc4e9c..f5edf1c6be3 100644
--- a/mysql-test/main/update.result
+++ b/mysql-test/main/update.result
@@ -234,7 +234,9 @@ insert into t2 values ( 1, 'abcd1e');
insert into t2 values ( 2, 'abcd2e');
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
update t1, t2 set t1.a = t2.a where t2.b = t1.b;
show warnings;
@@ -326,7 +328,7 @@ delete from t1 order by a limit 1;
show status like 'handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 0
+Handler_read_key 4
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
@@ -447,7 +449,7 @@ UPDATE t1 SET user_id=null WHERE request_id=9999999999999;
show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 3
+Handler_read_key 2
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
@@ -459,7 +461,7 @@ UPDATE t1 SET user_id=null WHERE request_id=999999999999999999999999999999;
show status like '%Handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 3
+Handler_read_key 2
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
diff --git a/mysql-test/main/update_innodb.result b/mysql-test/main/update_innodb.result
index 695561122f0..beab54833d1 100644
--- a/mysql-test/main/update_innodb.result
+++ b/mysql-test/main/update_innodb.result
@@ -89,3 +89,57 @@ update t1, t2 set a=NULL, b=2, c=NULL where b=d and e=200;
drop table t1,t2;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set @@use_stat_tables= @save_use_stat_tables;
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+BEGIN;
+SELECT * FROM t1 UNION
+SELECT * FROM t2 FOR UPDATE;
+a
+1
+2
+connect con2,localhost,root,,;
+BEGIN;
+SELECT * FROM t2 FOR UPDATE;;
+connection default;
+select * from t2;
+a
+2
+update t2 set a=a+100;
+commit;
+connection con2;
+a
+102
+commit;
+connection default;
+drop table t1,t2;
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+BEGIN;
+SELECT * FROM (
+SELECT * FROM t1 UNION
+SELECT * FROM t2 FOR UPDATE
+) t;
+a
+1
+2
+connection con2;
+BEGIN;
+SELECT * FROM t2 FOR UPDATE;;
+connection default;
+select * from t2;
+a
+2
+update t2 set a=a+100;
+commit;
+connection con2;
+a
+102
+commit;
+connection default;
+disconnect con2;
+drop table t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/main/update_innodb.test b/mysql-test/main/update_innodb.test
index a29dd071cf8..a5c6acf8620 100644
--- a/mysql-test/main/update_innodb.test
+++ b/mysql-test/main/update_innodb.test
@@ -76,6 +76,7 @@ UPDATE t1 SET b_id = (SELECT t2.b_id FROM t2 t2 WHERE t2.c_id = t1.c_id);
SELECT * FROM t1;
drop table t1,t2;
+
--echo #
--echo # MDEV-18300: ASAN error in Field_blob::get_key_image upon UPDATE with subquery
--echo #
@@ -104,3 +105,59 @@ drop table t1,t2;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set @@use_stat_tables= @save_use_stat_tables;
+
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+BEGIN;
+SELECT * FROM t1 UNION
+SELECT * FROM t2 FOR UPDATE;
+
+--connect(con2,localhost,root,,)
+BEGIN;
+--send SELECT * FROM t2 FOR UPDATE;
+--connection default
+
+select * from t2;
+update t2 set a=a+100;
+commit;
+
+--connection con2
+--reap
+
+commit;
+
+--connection default
+drop table t1,t2;
+
+
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (2);
+BEGIN;
+SELECT * FROM (
+ SELECT * FROM t1 UNION
+ SELECT * FROM t2 FOR UPDATE
+ ) t;
+
+--connection con2
+BEGIN;
+--send SELECT * FROM t2 FOR UPDATE;
+--connection default
+
+select * from t2;
+update t2 set a=a+100;
+commit;
+
+--connection con2
+--reap
+
+commit;
+
+--connection default
+disconnect con2;
+drop table t1,t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/update_use_source.result b/mysql-test/main/update_use_source.result
index e5585fcee5d..9e43b54d81c 100644
--- a/mysql-test/main/update_use_source.result
+++ b/mysql-test/main/update_use_source.result
@@ -1177,6 +1177,7 @@ insert t1 (c1,c2,c3) select 3,seq,seq%10 from seq_1_to_200;
create index t1_idx1 on t1(c3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
update t1 set c1=2 where exists (select 'x' from t1);
select count(*) from t1 where c1=2;
diff --git a/mysql-test/main/upgrade_MDEV-19650.result b/mysql-test/main/upgrade_MDEV-19650.result
new file mode 100644
index 00000000000..7e8610683e2
--- /dev/null
+++ b/mysql-test/main/upgrade_MDEV-19650.result
@@ -0,0 +1,208 @@
+call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted");
+create database mysqltest1;
+use mysqltest1;
+create table save_global_priv as select * from mysql.global_priv;
+create table save_tables_priv as select * from mysql.tables_priv;
+create table save_proxies_priv as select * from mysql.proxies_priv;
+create table mysql.save_proc like mysql.proc;
+insert into mysql.save_proc select * from mysql.proc;
+set @save_sql_mode= @@sql_mode;
+use mysql;
+# make old definition of gis procedures and user view
+drop view user;
+CREATE DEFINER='root'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
+Host,
+User,
+IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password,
+IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv,
+IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv,
+IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv,
+IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv,
+IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv,
+IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv,
+IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv,
+IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv,
+IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv,
+IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv,
+IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv,
+IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv,
+IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv,
+IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv,
+IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv,
+IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
+IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
+IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
+ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
+IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
+IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
+IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
+IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
+IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
+'N' AS password_expired,
+ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
+IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
+FROM global_priv;
+SET sql_mode='';
+DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn;
+DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn;
+CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
+begin
+set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
+begin
+set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+set @@sql_mode= @save_sql_mode;
+drop user 'mariadb.sys'@'localhost';
+# check old definitions mysql_upgrade
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+# Run mysql_upgrade
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.save_proc OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+mysqltest1
+mysqltest1.save_global_priv OK
+mysqltest1.save_proxies_priv OK
+mysqltest1.save_tables_priv OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+# check new definitions mysql_upgrade
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+1
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
+'mariadb.sys'@'localhost' def USAGE NO
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'mariadb.sys'@'localhost' def mysql global_priv SELECT NO
+'mariadb.sys'@'localhost' def mysql global_priv DELETE NO
+# check non root
+CREATE USER 'not_root'@'localhost';
+GRANT ALL PRIVILEGES ON *.* TO 'not_root'@'localhost';
+GRANT PROXY ON ''@'%' TO 'not_root'@'localhost' WITH GRANT OPTION;
+connect con1,localhost,not_root,,;
+connection con1;
+DROP USER 'root'@'localhost';
+DROP USER 'root'@'127.0.0.1';
+DROP USER 'root'@'::1';
+use mysqltest1;
+create table t1 (a int);
+call mysql.AddGeometryColumn("def", "mysqltest1", "t1", "g", 101);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `g` geometry DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+use mysql;
+select count(*) from user;
+count(*)
+3
+# restore environment
+delete from global_priv;
+delete from tables_priv;
+delete from proxies_priv;
+delete from proc;
+insert into mysql.global_priv select * from mysqltest1.save_global_priv;
+insert into mysql.tables_priv select * from mysqltest1.save_tables_priv;
+insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
+disconnect default;
+connect default,localhost,root,,;
+connection default;
+disconnect con1;
+drop database mysqltest1;
+# End of 10.4 tests (but better do not add other tests here)
diff --git a/mysql-test/main/upgrade_MDEV-19650.test b/mysql-test/main/upgrade_MDEV-19650.test
new file mode 100644
index 00000000000..a2f9fee705f
--- /dev/null
+++ b/mysql-test/main/upgrade_MDEV-19650.test
@@ -0,0 +1,159 @@
+
+-- source include/mysql_upgrade_preparation.inc
+
+call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted");
+create database mysqltest1;
+use mysqltest1;
+create table save_global_priv as select * from mysql.global_priv;
+create table save_tables_priv as select * from mysql.tables_priv;
+create table save_proxies_priv as select * from mysql.proxies_priv;
+create table mysql.save_proc like mysql.proc;
+insert into mysql.save_proc select * from mysql.proc;
+set @save_sql_mode= @@sql_mode;
+
+use mysql;
+
+--echo # make old definition of gis procedures and user view
+
+drop view user;
+
+CREATE DEFINER='root'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
+ Host,
+ User,
+ IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password,
+ IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
+ IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
+ IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
+ IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
+ IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
+ IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
+ 'N' AS password_expired,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
+ IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
+ FROM global_priv;
+
+
+SET sql_mode='';
+
+DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn;
+DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn;
+
+delimiter |;
+
+CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+
+CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+
+delimiter ;|
+set @@sql_mode= @save_sql_mode;
+
+drop user 'mariadb.sys'@'localhost';
+
+--echo # check old definitions mysql_upgrade
+
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost';
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--echo # Run mysql_upgrade
+--exec $MYSQL_UPGRADE 2>&1
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo # check new definitions mysql_upgrade
+
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost';
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+
+--echo # check non root
+
+CREATE USER 'not_root'@'localhost';
+GRANT ALL PRIVILEGES ON *.* TO 'not_root'@'localhost';
+GRANT PROXY ON ''@'%' TO 'not_root'@'localhost' WITH GRANT OPTION;
+
+connect con1,localhost,not_root,,;
+
+connection con1;
+
+DROP USER 'root'@'localhost';
+DROP USER 'root'@'127.0.0.1';
+DROP USER 'root'@'::1';
+
+use mysqltest1;
+
+create table t1 (a int);
+call mysql.AddGeometryColumn("def", "mysqltest1", "t1", "g", 101);
+
+show create table t1;
+use mysql;
+
+select count(*) from user;
+
+--echo # restore environment
+
+delete from global_priv;
+delete from tables_priv;
+delete from proxies_priv;
+delete from proc;
+insert into mysql.global_priv select * from mysqltest1.save_global_priv;
+insert into mysql.tables_priv select * from mysqltest1.save_tables_priv;
+insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
+
+disconnect default;
+connect default,localhost,root,,;
+connection default;
+disconnect con1;
+
+drop database mysqltest1;
+
+--echo # End of 10.4 tests (but better do not add other tests here)
diff --git a/mysql-test/main/upgrade_MDEV-23102-1.result b/mysql-test/main/upgrade_MDEV-23102-1.result
new file mode 100644
index 00000000000..8caa49180ee
--- /dev/null
+++ b/mysql-test/main/upgrade_MDEV-23102-1.result
@@ -0,0 +1,286 @@
+#
+# MDEV-23102: 10.4 create mariadb.sys user on each update even
+# is the user is not needed
+#
+# part 1: reassigning mysql.user and gis procedures to other user
+call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted");
+create database mysqltest1;
+use mysqltest1;
+create table save_global_priv as select * from mysql.global_priv;
+create table save_tables_priv as select * from mysql.tables_priv;
+create table save_proxies_priv as select * from mysql.proxies_priv;
+create table mysql.save_proc like mysql.proc;
+insert into mysql.save_proc select * from mysql.proc;
+set @save_sql_mode= @@sql_mode;
+use mysql;
+# make changed definition of gis procedures and user view
+create user superuser@localhost;
+grant all privileges on mysql.* to superuser@localhost;
+drop view user;
+CREATE DEFINER='superuser'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
+Host,
+User,
+IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password,
+IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv,
+IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv,
+IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv,
+IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv,
+IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv,
+IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv,
+IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv,
+IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv,
+IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv,
+IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv,
+IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv,
+IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv,
+IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv,
+IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv,
+IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv,
+IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
+IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
+IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
+ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
+IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
+IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
+IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
+IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
+IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
+'N' AS password_expired,
+ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
+IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
+FROM global_priv;
+SET sql_mode='';
+DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn;
+DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn;
+CREATE DEFINER=`superuser`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
+begin
+set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+CREATE DEFINER=`superuser`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
+begin
+set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+set @@sql_mode= @save_sql_mode;
+drop user 'mariadb.sys'@'localhost';
+# check changed definitions mysql_upgrade
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+# Run mysql_upgrade
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.save_proc OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+mysqltest1
+mysqltest1.save_global_priv OK
+mysqltest1.save_proxies_priv OK
+mysqltest1.save_tables_priv OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+# check new definitions mysql_upgrade
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+select count(*) from global_priv where user='mariadb.sys' and host='localhost';
+count(*)
+0
+# above should be 0 (no mariadb.sys@localhost user)
+# restore environment
+DROP USER 'superuser'@'localhost';
+DROP VIEW mysql.user;
+DROP PROCEDURE AddGeometryColumn;
+DROP PROCEDURE DropGeometryColumn;
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.save_proc OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+mysqltest1
+mysqltest1.save_global_priv OK
+mysqltest1.save_proxies_priv OK
+mysqltest1.save_tables_priv OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+delete from global_priv;
+delete from tables_priv;
+delete from proxies_priv;
+delete from proc;
+insert into mysql.global_priv select * from mysqltest1.save_global_priv;
+insert into mysql.tables_priv select * from mysqltest1.save_tables_priv;
+insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
+disconnect default;
+connect default,localhost,root,,;
+connection default;
+drop database mysqltest1;
+# End of 10.4 tests (but better do not add other tests here)
diff --git a/mysql-test/main/upgrade_MDEV-23102-1.test b/mysql-test/main/upgrade_MDEV-23102-1.test
new file mode 100644
index 00000000000..172e0d595b2
--- /dev/null
+++ b/mysql-test/main/upgrade_MDEV-23102-1.test
@@ -0,0 +1,162 @@
+--echo #
+--echo # MDEV-23102: 10.4 create mariadb.sys user on each update even
+--echo # is the user is not needed
+--echo #
+--echo # part 1: reassigning mysql.user and gis procedures to other user
+
+--source include/mysql_upgrade_preparation.inc
+
+call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted");
+create database mysqltest1;
+use mysqltest1;
+create table save_global_priv as select * from mysql.global_priv;
+create table save_tables_priv as select * from mysql.tables_priv;
+create table save_proxies_priv as select * from mysql.proxies_priv;
+create table mysql.save_proc like mysql.proc;
+insert into mysql.save_proc select * from mysql.proc;
+set @save_sql_mode= @@sql_mode;
+
+use mysql;
+
+--echo # make changed definition of gis procedures and user view
+
+create user superuser@localhost;
+grant all privileges on mysql.* to superuser@localhost;
+
+drop view user;
+
+CREATE DEFINER='superuser'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
+ Host,
+ User,
+ IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password,
+ IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
+ IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
+ IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
+ IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
+ IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
+ IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
+ 'N' AS password_expired,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
+ IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
+ FROM global_priv;
+
+SET sql_mode='';
+
+DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn;
+DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn;
+
+delimiter |;
+
+CREATE DEFINER=`superuser`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+
+CREATE DEFINER=`superuser`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+
+delimiter ;|
+
+set @@sql_mode= @save_sql_mode;
+
+drop user 'mariadb.sys'@'localhost';
+
+--echo # check changed definitions mysql_upgrade
+
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--echo # Run mysql_upgrade
+--exec $MYSQL_UPGRADE 2>&1
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo # check new definitions mysql_upgrade
+
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+
+select count(*) from global_priv where user='mariadb.sys' and host='localhost';
+--echo # above should be 0 (no mariadb.sys@localhost user)
+
+--echo # restore environment
+
+DROP USER 'superuser'@'localhost';
+DROP VIEW mysql.user;
+DROP PROCEDURE AddGeometryColumn;
+DROP PROCEDURE DropGeometryColumn;
+--exec $MYSQL_UPGRADE 2>&1
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+delete from global_priv;
+delete from tables_priv;
+delete from proxies_priv;
+delete from proc;
+insert into mysql.global_priv select * from mysqltest1.save_global_priv;
+insert into mysql.tables_priv select * from mysqltest1.save_tables_priv;
+insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
+
+disconnect default;
+connect default,localhost,root,,;
+connection default;
+
+drop database mysqltest1;
+
+--echo # End of 10.4 tests (but better do not add other tests here)
diff --git a/mysql-test/main/upgrade_MDEV-23102-2.result b/mysql-test/main/upgrade_MDEV-23102-2.result
new file mode 100644
index 00000000000..4702fae812f
--- /dev/null
+++ b/mysql-test/main/upgrade_MDEV-23102-2.result
@@ -0,0 +1,262 @@
+#
+# MDEV-23102: 10.4 create mariadb.sys user on each update even
+# is the user is not needed
+#
+# part 2: reassigning mysql.user and deleting gis procedures
+call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted");
+create database mysqltest1;
+use mysqltest1;
+create table save_global_priv as select * from mysql.global_priv;
+create table save_tables_priv as select * from mysql.tables_priv;
+create table save_proxies_priv as select * from mysql.proxies_priv;
+create table mysql.save_proc like mysql.proc;
+insert into mysql.save_proc select * from mysql.proc;
+set @save_sql_mode= @@sql_mode;
+use mysql;
+# make changed definition of gis procedures and user view
+create user superuser@localhost;
+grant all privileges on mysql.* to superuser@localhost;
+drop view user;
+CREATE DEFINER='superuser'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
+Host,
+User,
+IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password,
+IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv,
+IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv,
+IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv,
+IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv,
+IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv,
+IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv,
+IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv,
+IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv,
+IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv,
+IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv,
+IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv,
+IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv,
+IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv,
+IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv,
+IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv,
+IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv,
+IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv,
+IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv,
+IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv,
+IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
+IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
+IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
+ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
+IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
+IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
+IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
+IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
+IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
+'N' AS password_expired,
+ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
+IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
+CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
+FROM global_priv;
+DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn;
+DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn;
+drop user 'mariadb.sys'@'localhost';
+# check changed definitions mysql_upgrade
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn';
+count(*)
+0
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+# Run mysql_upgrade
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.save_proc OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+mysqltest1
+mysqltest1.save_global_priv OK
+mysqltest1.save_proxies_priv OK
+mysqltest1.save_tables_priv OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+# check new definitions mysql_upgrade
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn';
+count(*)
+0
+select count(*) from global_priv where user='mariadb.sys' and host='localhost';
+count(*)
+0
+# above should be 0 (no mariadb.sys@localhost user)
+# restore environment
+DROP USER 'superuser'@'localhost';
+DROP VIEW mysql.user;
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.save_proc OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+mysqltest1
+mysqltest1.save_global_priv OK
+mysqltest1.save_proxies_priv OK
+mysqltest1.save_tables_priv OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+delete from global_priv;
+delete from tables_priv;
+delete from proxies_priv;
+delete from proc;
+insert into mysql.global_priv select * from mysqltest1.save_global_priv;
+insert into mysql.tables_priv select * from mysqltest1.save_tables_priv;
+insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
+disconnect default;
+connect default,localhost,root,,;
+connection default;
+drop database mysqltest1;
+# End of 10.4 tests (but better do not add other tests here)
diff --git a/mysql-test/main/upgrade_MDEV-23102-2.test b/mysql-test/main/upgrade_MDEV-23102-2.test
new file mode 100644
index 00000000000..f2d7ac578e0
--- /dev/null
+++ b/mysql-test/main/upgrade_MDEV-23102-2.test
@@ -0,0 +1,140 @@
+--echo #
+--echo # MDEV-23102: 10.4 create mariadb.sys user on each update even
+--echo # is the user is not needed
+--echo #
+--echo # part 2: reassigning mysql.user and deleting gis procedures
+
+--source include/mysql_upgrade_preparation.inc
+
+call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted");
+create database mysqltest1;
+use mysqltest1;
+create table save_global_priv as select * from mysql.global_priv;
+create table save_tables_priv as select * from mysql.tables_priv;
+create table save_proxies_priv as select * from mysql.proxies_priv;
+create table mysql.save_proc like mysql.proc;
+insert into mysql.save_proc select * from mysql.proc;
+set @save_sql_mode= @@sql_mode;
+
+use mysql;
+
+--echo # make changed definition of gis procedures and user view
+
+create user superuser@localhost;
+grant all privileges on mysql.* to superuser@localhost;
+
+drop view user;
+
+CREATE DEFINER='superuser'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
+ Host,
+ User,
+ IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password,
+ IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
+ IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
+ IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
+ IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
+ IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
+ IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
+ 'N' AS password_expired,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
+ IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
+ FROM global_priv;
+
+DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn;
+DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn;
+
+
+drop user 'mariadb.sys'@'localhost';
+
+--echo # check changed definitions mysql_upgrade
+
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn';
+
+SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--echo # Run mysql_upgrade
+--exec $MYSQL_UPGRADE 2>&1
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo # check new definitions mysql_upgrade
+
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def'
+and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'superuser@localhost';
+SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn';
+
+
+select count(*) from global_priv where user='mariadb.sys' and host='localhost';
+--echo # above should be 0 (no mariadb.sys@localhost user)
+
+--echo # restore environment
+
+DROP USER 'superuser'@'localhost';
+DROP VIEW mysql.user;
+--exec $MYSQL_UPGRADE 2>&1
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+delete from global_priv;
+delete from tables_priv;
+delete from proxies_priv;
+delete from proc;
+insert into mysql.global_priv select * from mysqltest1.save_global_priv;
+insert into mysql.tables_priv select * from mysqltest1.save_tables_priv;
+insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
+
+disconnect default;
+connect default,localhost,root,,;
+connection default;
+
+drop database mysqltest1;
+
+--echo # End of 10.4 tests (but better do not add other tests here)
diff --git a/mysql-test/main/upgrade_geometrycolumn_procedure_definer.result b/mysql-test/main/upgrade_geometrycolumn_procedure_definer.result
new file mode 100644
index 00000000000..58cd91f706d
--- /dev/null
+++ b/mysql-test/main/upgrade_geometrycolumn_procedure_definer.result
@@ -0,0 +1,123 @@
+#
+# The definer of Add/DropGeometryColumn procedures should be updated to mariadb.sys during upgrade
+#
+use mysql;
+create table save_proc like proc;
+insert into save_proc select * from proc;
+set @save_sql_mode= @@sql_mode;
+#
+# If the definer is root before the upgrade:
+# Drop the procedures if exists and recreate with root definer
+#
+DROP PROCEDURE IF EXISTS AddGeometryColumn;
+DROP PROCEDURE IF EXISTS DropGeometryColumn;
+CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
+begin
+set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
+begin
+set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'root@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'root@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+0
+#
+# Run mysql_upgrade
+#
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.save_proc OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+#
+# check new definers of Add/DropGeometryColumn
+#
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'root@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'root@localhost';
+count(*)
+0
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+1
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+count(*)
+1
+#
+# restore environment
+#
+delete from proc;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
diff --git a/mysql-test/main/upgrade_geometrycolumn_procedure_definer.test b/mysql-test/main/upgrade_geometrycolumn_procedure_definer.test
new file mode 100644
index 00000000000..5111fcdf4ea
--- /dev/null
+++ b/mysql-test/main/upgrade_geometrycolumn_procedure_definer.test
@@ -0,0 +1,66 @@
+--echo #
+--echo # The definer of Add/DropGeometryColumn procedures should be updated to mariadb.sys during upgrade
+--echo #
+
+--source include/mysql_upgrade_preparation.inc
+
+use mysql;
+
+create table save_proc like proc;
+insert into save_proc select * from proc;
+set @save_sql_mode= @@sql_mode;
+
+--echo #
+--echo # If the definer is root before the upgrade:
+--echo # Drop the procedures if exists and recreate with root definer
+--echo #
+DROP PROCEDURE IF EXISTS AddGeometryColumn;
+DROP PROCEDURE IF EXISTS DropGeometryColumn;
+
+DELIMITER |;
+
+CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+
+CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end |
+
+DELIMITER ;|
+
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'root@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'root@localhost';
+
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--echo #
+--echo # Run mysql_upgrade
+--echo #
+--exec $MYSQL_UPGRADE 2>&1
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo #
+--echo # check new definers of Add/DropGeometryColumn
+--echo #
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'root@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'root@localhost';
+
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='AddGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+SELECT count(*) FROM information_schema.ROUTINES WHERE ROUTINE_CATALOG = 'def' and ROUTINE_SCHEMA = 'mysql' and ROUTINE_NAME='DropGeometryColumn' and DEFINER = 'mariadb.sys@localhost';
+
+--echo #
+--echo # restore environment
+--echo #
+delete from proc;
+rename table proc to bad_proc;
+rename table save_proc to proc;
+drop table bad_proc;
+flush privileges;
+
diff --git a/mysql-test/main/upgrade_mdev_24363.result b/mysql-test/main/upgrade_mdev_24363.result
new file mode 100644
index 00000000000..d507193088e
--- /dev/null
+++ b/mysql-test/main/upgrade_mdev_24363.result
@@ -0,0 +1,129 @@
+#
+# MDEV-24363 10.4: change definition of mysql.user view
+# to reflect the correct value from mysql.global_priv
+# This change was added because mysql.user view definition
+# was already changed when mariadb.sys was introduced, so
+# it's decently ok if we change it again to fix mdev-24363
+#
+# Test that mysql.user password_expired column
+# shows the right value as in mysql.global_priv
+#
+create user gigi@localhost;
+show create user gigi@localhost;
+CREATE USER for gigi@localhost
+CREATE USER `gigi`@`localhost`
+select password_expired from mysql.user where user='gigi' and host='localhost';
+password_expired
+N
+alter user gigi@localhost password expire;
+show create user gigi@localhost;
+CREATE USER for gigi@localhost
+CREATE USER `gigi`@`localhost` PASSWORD EXPIRE
+select password_expired from mysql.user where user='gigi' and host='localhost';
+password_expired
+Y
+drop user gigi@localhost;
+#
+# Test that upgrades from 10.4+ versions before this mdev
+# correctly drop and recreate the mysql.user view
+#
+use mysql;
+set @def = (select view_definition from information_schema.views where table_name='user' and table_schema='mysql');
+set @trimmed_def = (select trim(trailing 'from `mysql`.`global_priv`' from @def));
+set @newdef = (select concat(@trimmed_def, ", 'N' AS password_expired from mysql.global_priv"));
+set @pos = (select instr(@newdef, 'password_expired'));
+create or replace view user as select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,if(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.password_last_changed'),1) = 0,'Y','N') AS `abcsword_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` , 'N' AS password_expired from mysql.global_priv;;
+create user gigi@localhost;
+show create user gigi@localhost;
+CREATE USER for gigi@localhost
+CREATE USER `gigi`@`localhost`
+select password_expired from mysql.user where user='gigi' and host='localhost';
+password_expired
+N
+alter user gigi@localhost password expire;
+show create user gigi@localhost;
+CREATE USER for gigi@localhost
+CREATE USER `gigi`@`localhost` PASSWORD EXPIRE
+select password_expired from mysql.user where user='gigi' and host='localhost';
+password_expired
+N
+drop user gigi@localhost;
+# Run mysql_upgrade
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+
+Repairing tables
+mysql.innodb_index_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.innodb_table_stats
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+mysql.transaction_registry
+Error : Unknown storage engine 'InnoDB'
+error : Corrupt
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+create user gigi@localhost;
+show create user gigi@localhost;
+CREATE USER for gigi@localhost
+CREATE USER `gigi`@`localhost`
+select password_expired from mysql.user where user='gigi' and host='localhost';
+password_expired
+N
+alter user gigi@localhost password expire;
+show create user gigi@localhost;
+CREATE USER for gigi@localhost
+CREATE USER `gigi`@`localhost` PASSWORD EXPIRE
+select password_expired from mysql.user where user='gigi' and host='localhost';
+password_expired
+Y
+drop user gigi@localhost;
diff --git a/mysql-test/main/upgrade_mdev_24363.test b/mysql-test/main/upgrade_mdev_24363.test
new file mode 100644
index 00000000000..cdb49037a40
--- /dev/null
+++ b/mysql-test/main/upgrade_mdev_24363.test
@@ -0,0 +1,71 @@
+--echo #
+--echo # MDEV-24363 10.4: change definition of mysql.user view
+--echo # to reflect the correct value from mysql.global_priv
+--echo # This change was added because mysql.user view definition
+--echo # was already changed when mariadb.sys was introduced, so
+--echo # it's decently ok if we change it again to fix mdev-24363
+
+--echo #
+--echo # Test that mysql.user password_expired column
+--echo # shows the right value as in mysql.global_priv
+--echo #
+
+create user gigi@localhost;
+show create user gigi@localhost;
+select password_expired from mysql.user where user='gigi' and host='localhost';
+
+alter user gigi@localhost password expire;
+show create user gigi@localhost;
+select password_expired from mysql.user where user='gigi' and host='localhost';
+
+drop user gigi@localhost;
+
+--echo #
+--echo # Test that upgrades from 10.4+ versions before this mdev
+--echo # correctly drop and recreate the mysql.user view
+--echo #
+
+--source include/mysql_upgrade_preparation.inc
+
+use mysql;
+
+# Do all these string operations to replace password_expired definition
+# with "'N' as password_expired" and avoid listing in one more test
+# all the fields of the user view
+set @def = (select view_definition from information_schema.views where table_name='user' and table_schema='mysql');
+set @trimmed_def = (select trim(trailing 'from `mysql`.`global_priv`' from @def));
+set @newdef = (select concat(@trimmed_def, ", 'N' AS password_expired from mysql.global_priv"));
+set @pos = (select instr(@newdef, 'password_expired'));
+let $viewdef = `select insert(@newdef, @pos, 3, 'abc')`;
+
+--eval create or replace view user as $viewdef;
+
+create user gigi@localhost;
+show create user gigi@localhost;
+select password_expired from mysql.user where user='gigi' and host='localhost';
+
+# password should be expired, but mysql.user.password_expired should be 'N'
+alter user gigi@localhost password expire;
+show create user gigi@localhost;
+select password_expired from mysql.user where user='gigi' and host='localhost';
+
+drop user gigi@localhost;
+
+--echo # Run mysql_upgrade
+--exec $MYSQL_UPGRADE 2>&1
+let $MYSQLD_DATADIR= `select @@datadir`;
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+create user gigi@localhost;
+show create user gigi@localhost;
+select password_expired from mysql.user where user='gigi' and host='localhost';
+
+# mysql.user view should've been recreated by mariadb_upgrade, thus
+# password_expired should show 'Y'
+alter user gigi@localhost password expire;
+show create user gigi@localhost;
+select password_expired from mysql.user where user='gigi' and host='localhost';
+
+drop user gigi@localhost;
+
diff --git a/mysql-test/main/user_var.result b/mysql-test/main/user_var.result
index bf3d4f6dada..b475a8ca60a 100644
--- a/mysql-test/main/user_var.result
+++ b/mysql-test/main/user_var.result
@@ -22,7 +22,7 @@ i @vv1:=if(sv1.i,1,0) @vv2:=if(sv2.i,1,0) @vv3:=if(sv3.i,1,0) @vv1+@vv2+@vv3
2 1 0 0 1
explain select * from t1 where i=@vv1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref i i 4 const 1
+1 SIMPLE t1 ref i i 4 const 2
select @vv1,i,v from t1 where i=@vv1;
@vv1 i v
1 1 1
@@ -35,7 +35,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL i 4 NULL 3 Using where; Using index
explain select * from t1 where i=@vv1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref i i 4 const 1
+1 SIMPLE t1 ref i i 4 const 2
drop table t1,t2;
set @a=0,@b=0;
select @a:=10, @b:=1, @a > @b, @a < @b;
diff --git a/mysql-test/main/userstat.result b/mysql-test/main/userstat.result
index 86eac9e2691..5315317e33a 100644
--- a/mysql-test/main/userstat.result
+++ b/mysql-test/main/userstat.result
@@ -1,4 +1,6 @@
select variable_value from information_schema.global_status where variable_name="handler_read_key" into @global_read_key;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
show columns from information_schema.client_statistics;
Field Type Null Key Default Extra
CLIENT varchar(64) NO NULL
@@ -116,7 +118,7 @@ Handler_mrr_key_refills 0
Handler_mrr_rowid_refills 0
Handler_prepare 18
Handler_read_first 0
-Handler_read_key 9
+Handler_read_key 17
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
@@ -134,7 +136,7 @@ Handler_update 5
Handler_write 7
select variable_value - @global_read_key as "handler_read_key" from information_schema.global_status where variable_name="handler_read_key";
handler_read_key
-9
+17
disconnect ssl_con;
set @@global.userstat=0;
select * from information_schema.index_statistics;
diff --git a/mysql-test/main/varbinary.result b/mysql-test/main/varbinary.result
index 58cab5ad1ca..3a182e74692 100644
--- a/mysql-test/main/varbinary.result
+++ b/mysql-test/main/varbinary.result
@@ -82,8 +82,8 @@ drop table t1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(255) DEFAULT NULL,
- `b` varchar(255) DEFAULT NULL
+ `a` varbinary(255)/*old*/ DEFAULT NULL,
+ `b` varchar(255)/*old*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select length(a), length(b) from t1;
length(a) length(b)
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index 82f618066a8..9cce0d0f626 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -614,6 +614,7 @@ select is_updatable from information_schema.views;
is_updatable
YES
YES
+YES
select * from t1;
col1 col2
5 Hello, view world
@@ -2452,6 +2453,8 @@ SELECT Meaning FROM v1 INTO retn;
RETURN retn;
END
//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE VIEW v2 AS SELECT f1();
select * from v2;
f1()
@@ -2623,6 +2626,8 @@ declare mx int;
select max(a) from t1 into mx;
return mx;
end//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create view v1 as select f1() as a;
create view v2 as select * from v1;
drop table t1;
@@ -3161,10 +3166,14 @@ DROP VIEW v1;
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
SELECT * FROM (SELECT 1) AS t into @w;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE VIEW v1 AS SELECT * FROM (SELECT 1) AS t into @w;
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 'into @w' at line 1
# Previously the following would fail.
SELECT * FROM (SELECT 1) AS t into @w;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
drop view if exists view_24532_a;
drop view if exists view_24532_b;
drop table if exists table_24532;
@@ -3961,6 +3970,8 @@ BEGIN
SELECT a FROM v2 INTO @a;
RETURN @a;
END//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Trigger pre-locking when opening v2.
CREATE VIEW v1 AS SELECT f1() FROM t1;
SHOW CREATE VIEW v1;
@@ -4393,7 +4404,8 @@ DROP VIEW v1,v2;
DROP TABLE t1;
CREATE TABLE t1 (a varchar(10), KEY (a)) ;
INSERT INTO t1 VALUES
-('DD'), ('ZZ'), ('ZZ'), ('KK'), ('FF'), ('HH'),('MM');
+('DD'), ('ZZ'), ('ZZ'), ('KK'), ('FF'), ('HH'), ('MM'),
+('AA'), ('DD'), ('CC'), ('GG');
CREATE VIEW v1 AS SELECT * FROM t1;
# t1 and v1 should return the same result set
SELECT * FROM v1 WHERE a > 'JJ' OR a <> 0 AND a = 'VV';
@@ -6879,3 +6891,32 @@ drop table t1;
#
# End of 10.3 tests
#
+#
+# MDEV-25206: view specification contains unknown column reference
+#
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (b int);
+INSERT INTO t2 VALUES (2),(3);
+CREATE TABLE t3 (c int);
+CREATE VIEW v1 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
+ERROR 42S22: Unknown column 't1.x' in 'on clause'
+INSERT INTO t3 SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
+ERROR 42S22: Unknown column 't1.x' in 'on clause'
+CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
+ERROR 42S22: Unknown column 't1.x' in 'on clause'
+DROP TABLE t1,t2,t3;
+#
+# MDEV-29088: view specification contains unknown column in ON condition
+#
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+create view v as
+select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+ERROR 42S22: Unknown column 'd' in 'field list'
+create algorithm=merge view v as
+select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+ERROR 42S22: Unknown column 'd' in 'field list'
+drop table t1,t2,t3;
+# End of 10.4 tests
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index 770be8dbb5f..f8a51ec7a2c 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -4258,7 +4258,8 @@ DROP TABLE t1;
CREATE TABLE t1 (a varchar(10), KEY (a)) ;
INSERT INTO t1 VALUES
- ('DD'), ('ZZ'), ('ZZ'), ('KK'), ('FF'), ('HH'),('MM');
+ ('DD'), ('ZZ'), ('ZZ'), ('KK'), ('FF'), ('HH'), ('MM'),
+ ('AA'), ('DD'), ('CC'), ('GG');
CREATE VIEW v1 AS SELECT * FROM t1;
@@ -6607,3 +6608,42 @@ drop table t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-25206: view specification contains unknown column reference
+--echo #
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (b int);
+INSERT INTO t2 VALUES (2),(3);
+CREATE TABLE t3 (c int);
+
+--error ER_BAD_FIELD_ERROR
+CREATE VIEW v1 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t3 SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
+--error ER_BAD_FIELD_ERROR
+CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
+
+DROP TABLE t1,t2,t3;
+
+--echo #
+--echo # MDEV-29088: view specification contains unknown column in ON condition
+--echo #
+
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+
+--error ER_BAD_FIELD_ERROR
+create view v as
+ select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+
+--error ER_BAD_FIELD_ERROR
+create algorithm=merge view v as
+ select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+
+drop table t1,t2,t3;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result
index 00a93488919..954b57db768 100644
--- a/mysql-test/main/view_grant.result
+++ b/mysql-test/main/view_grant.result
@@ -410,6 +410,8 @@ create table t2 (s1 int);
drop function if exists f2;
create function f2 () returns int begin declare v int; select s1 from t2
into v; return v; end//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create algorithm=TEMPTABLE view v1 as select f2() from t1;
create algorithm=MERGE view v2 as select f2() from t1;
create algorithm=TEMPTABLE SQL SECURITY INVOKER view v3 as select f2() from t1;
@@ -453,6 +455,8 @@ create table t2 (s1 int);
drop function if exists f2;
create function f2 () returns int begin declare v int; select s1 from t2
into v; return v; end//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create user mysqltest_1@localhost;
grant select on t1 to mysqltest_1@localhost;
grant execute on function f2 to mysqltest_1@localhost;
@@ -562,11 +566,6 @@ use test;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
drop user mysqltest_1@localhost;
drop database mysqltest;
-drop view if exists v1;
-drop table if exists t1;
-create table t1 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
create user 'test14256'@'%';
grant all on test.* to 'test14256'@'%';
connect test14256,localhost,test14256,,test;
@@ -592,9 +591,6 @@ test14256@% test14256@% 1
connection root;
disconnect test14256;
drop user test14256;
-insert into mysql.user select * from t1;
-flush privileges;
-drop table t1;
connection root;
create database mysqltest;
use mysqltest;
@@ -1347,6 +1343,8 @@ disconnect root;
connection default;
select * from information_schema.table_privileges;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
+'mariadb.sys'@'localhost' def mysql global_priv SELECT NO
+'mariadb.sys'@'localhost' def mysql global_priv DELETE NO
End of 5.0 tests.
connection default;
DROP VIEW IF EXISTS v1;
diff --git a/mysql-test/main/view_grant.test b/mysql-test/main/view_grant.test
index df4ca502dff..cc17cae58d1 100644
--- a/mysql-test/main/view_grant.test
+++ b/mysql-test/main/view_grant.test
@@ -674,16 +674,6 @@ drop database mysqltest;
#
# Bug#14256 definer in view definition is not fully qualified
#
---disable_warnings
-drop view if exists v1;
-drop table if exists t1;
---enable_warnings
-
-# Backup anonymous users and remove them. (They get in the way of
-# the one we test with here otherwise.)
-create table t1 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
# Create the test user
create user 'test14256'@'%';
@@ -713,12 +703,6 @@ connection root;
disconnect test14256;
drop user test14256;
-# Restore the anonymous users.
-insert into mysql.user select * from t1;
-flush privileges;
-
-drop table t1;
-
#
# Bug#14726 freeing stack variable in case of an error of opening a view when
# we have locked tables with LOCK TABLES statement.
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result
index cc2824cb01d..bb4acddf1f6 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -4337,3 +4337,14 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# MDEV-16722: Assertion `type() != NULL_ITEM' failed
+#
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+SELECT row_number() OVER (order by a) FROM t1 order by NAME_CONST('myname',NULL);
+row_number() OVER (order by a)
+1
+2
+3
+drop table t1;
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index a4bd0888ea7..ce32626510a 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2817,3 +2817,12 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-16722: Assertion `type() != NULL_ITEM' failed
+--echo #
+
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+SELECT row_number() OVER (order by a) FROM t1 order by NAME_CONST('myname',NULL);
+drop table t1;
diff --git a/mysql-test/main/win_big-mdev-11697.result b/mysql-test/main/win_big-mdev-11697.result
index e5dc271839c..ec9d2243c88 100644
--- a/mysql-test/main/win_big-mdev-11697.result
+++ b/mysql-test/main/win_big-mdev-11697.result
@@ -12,6 +12,7 @@ select * from data_generator
commit;
analyze table test_table;
Table Op Msg_type Msg_text
+test.test_table analyze status Engine-independent statistics collected
test.test_table analyze status OK
explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -44,6 +45,7 @@ select * from data_generator
commit;
analyze table test_table;
Table Op Msg_type Msg_text
+test.test_table analyze status Engine-independent statistics collected
test.test_table analyze status OK
explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/main/win_sum.result b/mysql-test/main/win_sum.result
index 66a48fe8293..71d87bd6eca 100644
--- a/mysql-test/main/win_sum.result
+++ b/mysql-test/main/win_sum.result
@@ -93,3 +93,15 @@ pk a c sum(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FO
126 6 NULL NULL
127 6 NULL NULL
drop table t1;
+#
+# End of 10.2 tests
+#
+#
+# MDEV-28094 Window function in expression in ORDER BY
+#
+SELECT EXISTS (SELECT 1 ORDER BY 1+sum(2) OVER ());
+EXISTS (SELECT 1 ORDER BY 1+sum(2) OVER ())
+1
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/win_sum.test b/mysql-test/main/win_sum.test
index aa4965bfd5a..640576acc53 100644
--- a/mysql-test/main/win_sum.test
+++ b/mysql-test/main/win_sum.test
@@ -45,3 +45,16 @@ select pk, a, c, sum(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDIN
from t1;
drop table t1;
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-28094 Window function in expression in ORDER BY
+--echo #
+SELECT EXISTS (SELECT 1 ORDER BY 1+sum(2) OVER ());
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/wolfssl.opt b/mysql-test/main/wolfssl.opt
new file mode 100644
index 00000000000..812dba7bcbd
--- /dev/null
+++ b/mysql-test/main/wolfssl.opt
@@ -0,0 +1 @@
+--ssl_cipher=ECDHE-RSA-AES256-GCM-SHA384 \ No newline at end of file
diff --git a/mysql-test/main/wolfssl.result b/mysql-test/main/wolfssl.result
new file mode 100644
index 00000000000..88df540ca95
--- /dev/null
+++ b/mysql-test/main/wolfssl.result
@@ -0,0 +1,3 @@
+SELECT @@ssl_cipher;
+@@ssl_cipher
+ECDHE-RSA-AES256-GCM-SHA384
diff --git a/mysql-test/main/wolfssl.test b/mysql-test/main/wolfssl.test
new file mode 100644
index 00000000000..d9afc43901f
--- /dev/null
+++ b/mysql-test/main/wolfssl.test
@@ -0,0 +1,6 @@
+#
+# Various tests that require WolfSSL
+#
+--source include/have_ssl_communication.inc
+--source include/not_embedded.inc
+SELECT @@ssl_cipher;
diff --git a/mysql-test/main/xtradb_mrr.result b/mysql-test/main/xtradb_mrr.result
index a538b119dd5..28c75e1f1d7 100644
--- a/mysql-test/main/xtradb_mrr.result
+++ b/mysql-test/main/xtradb_mrr.result
@@ -186,7 +186,7 @@ explain
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
or c='no-such-row2');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 range idx1 idx1 29 NULL 16 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t4 range idx1 idx1 29 NULL 16 Using index condition; Rowid-ordered scan
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
or c='no-such-row2');
a b c filler
@@ -208,7 +208,7 @@ NULL NULL NULL NULL-1
explain
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 range idx1 idx1 29 NULL 32 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t4 range idx1 idx1 29 NULL 32 Using index condition; Rowid-ordered scan
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
a b c filler
b-1 NULL c-1 NULL-15
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 60955ac61a7..c2c4332db56 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -102,6 +102,7 @@ use mtr_unique;
use mtr_results;
use IO::Socket::INET;
use IO::Select;
+use Time::HiRes qw(gettimeofday);
require "mtr_process.pl";
require "mtr_io.pl";
@@ -142,10 +143,6 @@ my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
my $file_wsrep_provider;
-my $extra_path;
-my $mariabackup_path;
-my $mariabackup_exe;
-my $garbd_exe;
my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far.
our @global_suppressions;
@@ -183,6 +180,7 @@ my @DEFAULT_SUITES= qw(
binlog_encryption-
csv-
compat/oracle-
+ compat/mssql-
compat/maxdb-
encryption-
federated-
@@ -211,6 +209,7 @@ my @DEFAULT_SUITES= qw(
unit-
vcol-
versioning-
+ period-
);
my $opt_suites;
@@ -343,171 +342,6 @@ $| = 1; # Automatically flush STDOUT
main();
-sub have_wsrep() {
- my $wsrep_on= $mysqld_variables{'wsrep-on'};
- return defined $wsrep_on
-}
-
-sub have_wsrep_provider() {
- return $file_wsrep_provider ne "";
-}
-
-sub have_mariabackup() {
- return $mariabackup_path ne "";
-}
-
-sub have_garbd() {
- return $garbd_exe ne "";
-}
-
-sub check_wsrep_version() {
- if ($My::SafeProcess::wsrep_check_version ne "") {
- system($My::SafeProcess::wsrep_check_version);
- return ($? >> 8) == 0;
- }
- else {
- return 0;
- }
-}
-
-sub wsrep_version_message() {
- if ($My::SafeProcess::wsrep_check_version ne "") {
- my $output= `$My::SafeProcess::wsrep_check_version -p`;
- if (($? >> 8) == 0) {
- $output =~ s/\s+\z//;
- return "Wsrep provider version mismatch (".$output.")";
- }
- else {
- return "Galera library does not contain a version symbol";
- }
- }
- else {
- return "Unable to find a wsrep version check utility";
- }
-}
-
-sub which($) { return `sh -c "command -v $_[0]"` }
-
-sub check_garbd_support() {
- if (defined $ENV{'MTR_GARBD_EXE'}) {
- if (mtr_file_exists($ENV{'MTR_GARBD_EXE'}) ne "") {
- $garbd_exe= $ENV{'MTR_GARBD_EXE'};
- } else {
- mtr_error("MTR_GARBD_EXE env set to an invalid path");
- }
- }
- else {
- my $wsrep_path= dirname($file_wsrep_provider);
- $garbd_exe=
- mtr_file_exists($wsrep_path."/garb/garbd",
- $wsrep_path."/../../bin/garb/garbd");
- if ($garbd_exe ne "") {
- $ENV{MTR_GARBD_EXE}= $garbd_exe;
- }
- }
-}
-
-sub check_wsrep_support() {
- $garbd_exe= "";
- if (have_wsrep()) {
- mtr_report(" - binaries built with wsrep patch");
-
- # ADD scripts to $PATH to that wsrep_sst_* can be found
- my ($spath) = grep { -f "$_/wsrep_sst_rsync"; } "$bindir/scripts", $path_client_bindir;
- mtr_error("No SST scripts") unless $spath;
- my $separator= (IS_WINDOWS) ? ';' : ':';
- $ENV{PATH}="$spath$separator$ENV{PATH}";
-
- # ADD mysql client library path to path so that wsrep_notify_cmd can find mysql
- # client for loading the tables. (Don't assume each machine has mysql install)
- my ($cpath) = grep { -f "$_/mysql"; } "$bindir/scripts", $path_client_bindir;
- mtr_error("No scritps") unless $cpath;
- $ENV{PATH}="$cpath$separator$ENV{PATH}" unless $cpath eq $spath;
-
- # ADD my_print_defaults script path to path so that SST scripts can find it
- my $my_print_defaults_exe=
- mtr_exe_maybe_exists(
- "$bindir/extra/my_print_defaults",
- "$bindir/extra/$multiconfig/my_print_defaults",
- "$path_client_bindir/my_print_defaults");
- my $epath= "";
- if ($my_print_defaults_exe ne "") {
- $epath= dirname($my_print_defaults_exe);
- }
- mtr_error("No my_print_defaults") unless $epath;
- $ENV{PATH}="$epath$separator$ENV{PATH}" unless ($epath eq $spath) or
- ($epath eq $cpath);
-
- $extra_path= $epath;
-
- if (!IS_WINDOWS) {
- if (which("socat")) {
- $ENV{MTR_GALERA_TFMT}="socat";
- } elsif (which("nc")) {
- $ENV{MTR_GALERA_TFMT}="nc";
- }
- }
-
- # Check whether WSREP_PROVIDER environment variable is set.
- if (defined $ENV{'WSREP_PROVIDER'}) {
- $file_wsrep_provider= "";
- if ($ENV{'WSREP_PROVIDER'} ne "none") {
- if (mtr_file_exists($ENV{'WSREP_PROVIDER'}) ne "") {
- $file_wsrep_provider= $ENV{'WSREP_PROVIDER'};
- } else {
- mtr_error("WSREP_PROVIDER env set to an invalid path");
- }
- check_garbd_support();
- }
- # WSREP_PROVIDER is valid; set to a valid path or "none").
- mtr_verbose("WSREP_PROVIDER env set to $ENV{'WSREP_PROVIDER'}");
- } else {
- # WSREP_PROVIDER env not defined. Lets try to locate the wsrep provider
- # library.
- $file_wsrep_provider=
- mtr_file_exists("/usr/lib64/galera-3/libgalera_smm.so",
- "/usr/lib64/galera/libgalera_smm.so",
- "/usr/lib/galera-3/libgalera_smm.so",
- "/usr/lib/galera/libgalera_smm.so");
- if ($file_wsrep_provider ne "") {
- # wsrep provider library found !
- mtr_verbose("wsrep provider library found : $file_wsrep_provider");
- $ENV{'WSREP_PROVIDER'}= $file_wsrep_provider;
- check_garbd_support();
- } else {
- mtr_verbose("Could not find wsrep provider library, setting it to 'none'");
- $ENV{'WSREP_PROVIDER'}= "none";
- }
- }
- } else {
- $file_wsrep_provider= "";
- $extra_path= "";
- }
-}
-
-sub check_mariabackup_support() {
- $mariabackup_path= "";
- $mariabackup_exe=
- mtr_exe_maybe_exists(
- "$bindir/extra/mariabackup$multiconfig/mariabackup",
- "$path_client_bindir/mariabackup");
- if ($mariabackup_exe ne "") {
- my $bpath= dirname($mariabackup_exe);
- my $separator= (IS_WINDOWS) ? ';' : ':';
- $ENV{PATH}="$bpath$separator$ENV{PATH}" unless $bpath eq $extra_path;
-
- $mariabackup_path= $bpath;
-
- $ENV{XTRABACKUP}= $mariabackup_exe;
-
- $ENV{XBSTREAM}= mtr_exe_maybe_exists(
- "$bindir/extra/mariabackup/$multiconfig/mbstream",
- "$path_client_bindir/mbstream");
-
- $ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex";
- }
-}
-
sub main {
$ENV{MTR_PERL}=$^X;
@@ -552,8 +386,7 @@ sub main {
}
check_ssl_support();
check_debug_support();
- check_wsrep_support();
- check_mariabackup_support();
+ environment_setup();
if (!$opt_suites) {
$opt_suites= join ',', collect_default_suites(@DEFAULT_SUITES);
@@ -1913,7 +1746,6 @@ sub collect_mysqld_features {
}
-
sub collect_mysqld_features_from_running_server ()
{
my $mysql= mtr_exe_exists("$path_client_bindir/mysql");
@@ -2223,8 +2055,11 @@ sub environment_setup {
#
$ENV{'LC_ALL'}= "C";
$ENV{'LC_CTYPE'}= "C";
-
$ENV{'LC_COLLATE'}= "C";
+
+ $ENV{'OPENSSL_CONF'}= $mysqld_variables{'version-ssl-library'} gt 'OpenSSL 1.1.1'
+ ? "$glob_mysql_test_dir/lib/openssl.cnf" : '/dev/null';
+
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
@@ -2269,6 +2104,11 @@ sub environment_setup {
$ENV{'EXE_MYSQL'}= $exe_mysql;
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
+ if(IS_WINDOWS)
+ {
+ $ENV{'MYSQL_INSTALL_DB_EXE'}= mtr_exe_exists("$bindir/sql$multiconfig/mysql_install_db",
+ "$bindir/bin/mysql_install_db");
+ }
my $client_config_exe=
mtr_exe_maybe_exists(
@@ -2370,10 +2210,23 @@ sub environment_setup {
my $exe_innochecksum=
mtr_exe_maybe_exists("$bindir/extra$multiconfig/innochecksum",
"$path_client_bindir/innochecksum");
- if ($exe_innochecksum)
- {
- $ENV{'INNOCHECKSUM'}= native_path($exe_innochecksum);
- }
+ $ENV{'INNOCHECKSUM'}= native_path($exe_innochecksum) if $exe_innochecksum;
+
+ # ----------------------------------------------------
+ # mariabackup
+ # ----------------------------------------------------
+ my $exe_mariabackup= mtr_exe_maybe_exists(
+ "$bindir/extra/mariabackup$multiconfig/mariabackup",
+ "$path_client_bindir/mariabackup");
+
+ $ENV{XTRABACKUP}= native_path($exe_mariabackup) if $exe_mariabackup;
+
+ my $exe_xbstream= mtr_exe_maybe_exists(
+ "$bindir/extra/mariabackup/$multiconfig/mbstream",
+ "$path_client_bindir/mbstream");
+ $ENV{XBSTREAM}= native_path($exe_xbstream) if $exe_xbstream;
+
+ $ENV{INNOBACKUPEX}= "$exe_mariabackup --innobackupex";
# Add dir of this perl to aid mysqltest in finding perl
my $perldir= dirname($^X);
@@ -2548,68 +2401,71 @@ sub setup_vardir() {
copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022");
# create a plugin dir and copy or symlink plugins into it
- if ($source_dist)
+ unless($plugindir)
{
- $plugindir="$opt_vardir/plugins";
- mkpath($plugindir);
- if (IS_WINDOWS)
+ if ($source_dist)
{
- if (!$opt_embedded_server)
+ $plugindir="$opt_vardir/plugins";
+ mkpath($plugindir);
+ if (IS_WINDOWS)
{
- for (<$bindir/storage/*$multiconfig/*.dll>,
- <$bindir/plugin/*$multiconfig/*.dll>,
- <$bindir/libmariadb$multiconfig/*.dll>,
- <$bindir/sql$multiconfig/*.dll>)
+ if (!$opt_embedded_server)
+ {
+ for (<$bindir/storage/*$multiconfig/*.dll>,
+ <$bindir/plugin/*$multiconfig/*.dll>,
+ <$bindir/libmariadb$multiconfig/*.dll>,
+ <$bindir/sql$multiconfig/*.dll>)
+ {
+ my $pname=basename($_);
+ copy rel2abs($_), "$plugindir/$pname";
+ set_plugin_var($pname);
+ }
+ }
+ }
+ else
+ {
+ my $opt_use_copy= 1;
+ if (symlink "$opt_vardir/run", "$plugindir/symlink_test")
+ {
+ $opt_use_copy= 0;
+ unlink "$plugindir/symlink_test";
+ }
+
+ for (<$bindir/storage/*$multiconfig/*.so>,
+ <$bindir/plugin/*$multiconfig/*.so>,
+ <$bindir/libmariadb/plugins/*/*.so>,
+ <$bindir/libmariadb/$multiconfig/*.so>,
+ <$bindir/sql$multiconfig/*.so>)
{
my $pname=basename($_);
- copy rel2abs($_), "$plugindir/$pname";
+ if ($opt_use_copy)
+ {
+ copy rel2abs($_), "$plugindir/$pname";
+ }
+ else
+ {
+ symlink rel2abs($_), "$plugindir/$pname";
+ }
set_plugin_var($pname);
}
}
}
else
{
- my $opt_use_copy= 1;
- if (symlink "$opt_vardir/run", "$plugindir/symlink_test")
- {
- $opt_use_copy= 0;
- unlink "$plugindir/symlink_test";
- }
-
- for (<$bindir/storage/*$multiconfig/*.so>,
- <$bindir/plugin/*$multiconfig/*.so>,
- <$bindir/libmariadb/plugins/*/*.so>,
- <$bindir/libmariadb/$multiconfig/*.so>,
- <$bindir/sql$multiconfig/*.so>)
+ # hm, what paths work for debs and for rpms ?
+ for (<$bindir/lib64/mysql/plugin/*.so>,
+ <$bindir/lib/mysql/plugin/*.so>,
+ <$bindir/lib64/mariadb/plugin/*.so>,
+ <$bindir/lib/mariadb/plugin/*.so>,
+ <$bindir/lib/plugin/*.so>, # bintar
+ <$bindir/lib/plugin/*.dll>)
{
my $pname=basename($_);
- if ($opt_use_copy)
- {
- copy rel2abs($_), "$plugindir/$pname";
- }
- else
- {
- symlink rel2abs($_), "$plugindir/$pname";
- }
set_plugin_var($pname);
+ $plugindir=dirname($_) unless $plugindir;
}
}
}
- else
- {
- $plugindir= $mysqld_variables{'plugin-dir'} || '.';
- # hm, what paths work for debs and for rpms ?
- for (<$bindir/lib64/mysql/plugin/*.so>,
- <$bindir/lib/mysql/plugin/*.so>,
- <$bindir/lib64/mariadb/plugin/*.so>,
- <$bindir/lib/mariadb/plugin/*.so>,
- <$bindir/lib/plugin/*.so>, # bintar
- <$bindir/lib/plugin/*.dll>)
- {
- my $pname=basename($_);
- set_plugin_var($pname);
- }
- }
# Remove old log files
foreach my $name (glob("r/*.progress r/*.log r/*.warnings"))
@@ -2691,7 +2547,7 @@ sub check_debug_support {
#
-# Helper function to find the correct value for the opt_vs_config
+# Helper function to find the correct value for the multiconfig
# if it was not set explicitly.
#
# the configuration with the most recent build dir in sql/ is selected.
@@ -2725,7 +2581,7 @@ sub fix_vs_config_dir () {
#
# Helper function to handle configuration-based subdirectories which Visual
-# Studio uses for storing binaries. If opt_vs_config is set, this returns
+# Studio uses for storing binaries. If multiconfig is set, this returns
# a path based on that setting; if not, it returns paths for the default
# /release/ and /debug/ subdirectories.
#
@@ -2889,6 +2745,7 @@ sub mysql_server_wait {
return 1;
}
}
+
return 0;
}
@@ -3226,8 +3083,8 @@ sub mysql_install_db {
$bootstrap_sql_file);
# mysql.gtid_slave_pos was created in InnoDB, but many tests
- # run without InnoDB. Alter it to MyISAM now
- mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=MyISAM;\n");
+ # run without InnoDB. Alter it to Aria now
+ mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=Aria transactional=0;\n");
}
else
{
@@ -3244,7 +3101,7 @@ sub mysql_install_db {
# Remove anonymous users
mtr_tofile($bootstrap_sql_file,
- "DELETE FROM mysql.user where user= '';\n");
+ "DELETE FROM mysql.global_priv where user= '';\n");
# Create mtr database
mtr_tofile($bootstrap_sql_file,
@@ -3267,6 +3124,7 @@ sub mysql_install_db {
# Create directories mysql
mkpath("$install_datadir/mysql");
+ my $realtime= gettimeofday();
if ( My::SafeProcess->run
(
name => "bootstrap",
@@ -3297,6 +3155,10 @@ sub mysql_install_db {
"Could not install system database from $bootstrap_sql_file\n" .
"The $path_bootstrap_log file contains:\n$data\n");
}
+ else
+ {
+ mtr_verbose("Spent " . sprintf("%.3f", (gettimeofday() - $realtime)) . " seconds in bootstrap");
+ }
}
@@ -4518,6 +4380,7 @@ sub extract_warning_lines ($$) {
qr|Access denied for user|,
qr|Aborted connection|,
qr|table.*is full|,
+ qr|\[ERROR\] mysqld: \Z|, # Warning from Aria recovery
qr|Linux Native AIO|, # warning that aio does not work on /dev/shm
qr|InnoDB: io_setup\(\) attempt|,
qr|InnoDB: io_setup\(\) failed with EAGAIN|,
@@ -4548,7 +4411,14 @@ sub extract_warning_lines ($$) {
qr/InnoDB: Cannot open .*ib_buffer_pool.* for reading: No such file or directory*/,
qr/InnoDB: Table .*mysql.*innodb_table_stats.* not found./,
qr/InnoDB: User stopword table .* does not exist./,
- qr/Detected table cache mutex contention at instance .* waits. Additional table cache instance cannot be activated: consider raising table_open_cache_instances. Number of active instances/
+ qr/Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+/,
+ qr/Detected table cache mutex contention at instance .* waits. Additional table cache instance cannot be activated: consider raising table_open_cache_instances. Number of active instances/,
+
+ # for UBSAN
+ qr/decimal\.c.*: runtime error: signed integer overflow/,
+ # Disable test for UBSAN on dynamically loaded objects
+ qr/runtime error: member call.*object.*'Handler_share'/,
+ qr/sql_type\.cc.* runtime error: member call.*object.* 'Type_collection'/,
);
my $matched_lines= [];
@@ -5508,7 +5378,6 @@ sub start_servers($) {
for (all_servers()) {
next unless $_->{WAIT} and started($_);
if ($_->{WAIT}->($_, $tinfo)) {
- $tinfo->{comment}= "Failed to start ".$_->name() . "\n";
return 1;
}
}
diff --git a/mysql-test/std_data/binlog-header.binlog b/mysql-test/std_data/binlog-header.binlog
new file mode 100644
index 00000000000..d37fac92f19
--- /dev/null
+++ b/mysql-test/std_data/binlog-header.binlog
Binary files differ
diff --git a/mysql-test/std_data/client-certkey.pem b/mysql-test/std_data/client-certkey.pem
new file mode 100644
index 00000000000..f60b9db309a
--- /dev/null
+++ b/mysql-test/std_data/client-certkey.pem
@@ -0,0 +1,108 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 5 (0x5)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
+ Validity
+ Not Before: Jan 27 10:11:15 2019 GMT
+ Not After : Jan 22 10:11:15 2039 GMT
+ Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=client
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Public-Key: (2048 bit)
+ Modulus:
+ 00:a9:10:77:b5:42:8f:e8:ad:69:2a:03:e9:56:f5:
+ 2d:d5:ba:92:06:cc:7f:c8:d2:0f:c5:47:fd:3e:db:
+ e1:5b:2b:40:ca:f8:05:9c:12:55:ef:0c:4a:92:3d:
+ 01:ac:0a:21:72:c4:b4:d9:59:82:75:1d:0c:63:fe:
+ 5a:20:7f:c5:53:b2:b9:05:88:60:c7:d9:fd:0f:ce:
+ 8f:10:a3:23:74:8f:21:70:56:73:c2:07:f0:79:20:
+ 52:1d:e0:30:9d:ed:0d:5a:f2:68:1b:0c:9e:2d:62:
+ d6:5c:e3:72:2d:92:79:aa:d0:f0:3a:ed:d6:52:30:
+ 3a:e7:91:5e:98:4e:2f:a0:07:d7:73:78:42:02:7d:
+ c4:2c:d3:63:03:b7:72:a5:33:da:f7:e9:3f:93:c9:
+ 37:19:9f:33:62:4f:1a:03:c3:a6:4b:f4:f5:51:e4:
+ ef:af:d6:a7:9a:55:5f:bc:d3:a9:77:90:59:8c:29:
+ b5:2d:3d:ef:ba:cd:21:54:24:79:6e:91:be:08:b6:
+ b1:9c:78:be:6d:2f:56:72:10:69:91:ee:b3:bd:eb:
+ 77:b3:c1:bf:c7:28:c6:ad:70:37:68:da:42:8a:7f:
+ dc:3b:40:78:d5:f2:a5:c1:43:c3:61:8e:bb:d0:b8:
+ 2d:05:41:7e:f2:b2:49:86:8b:ad:d7:fb:e0:9b:48:
+ 7d:af
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ Netscape Comment:
+ OpenSSL Generated Certificate
+ X509v3 Subject Key Identifier:
+ CE:F4:DF:1F:F9:52:2E:37:2D:3D:8A:B6:DE:41:8C:13:F6:14:4E:57
+ X509v3 Authority Key Identifier:
+ keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93
+
+ Signature Algorithm: sha256WithRSAEncryption
+ 65:61:98:4c:62:3c:25:3b:12:2b:4d:78:9a:81:20:e2:4d:1e:
+ 1e:c3:78:ca:1b:5b:84:13:7b:11:da:f3:ad:d0:19:f0:02:0c:
+ 99:44:d8:52:89:e5:ee:61:9d:8e:ac:30:7a:dc:fc:7e:73:e3:
+ 28:39:25:00:78:f2:00:66:63:96:3a:10:af:2b:35:b5:3e:09:
+ 87:99:97:dd:29:0b:23:eb:95:fe:a8:f4:f5:4f:db:dd:ac:96:
+ 94:7b:b1:ef:47:15:54:6f:d8:1b:43:39:00:34:9f:ad:49:fb:
+ 21:26:94:74:20:61:ce:c5:b3:3d:5f:51:46:58:56:dc:2c:8c:
+ c3:74:97:83:63:3d:ad:0b:f6:81:63:4d:cb:30:af:45:ce:28:
+ fe:e0:68:c4:8f:1a:61:80:7e:56:8d:fc:31:5a:9f:33:37:1f:
+ ae:4e:0d:6c:25:e3:0e:13:af:01:1b:82:41:95:a1:83:47:61:
+ 40:dd:d4:36:fb:73:7a:98:61:d1:e2:5f:1e:a1:a1:a8:ea:e3:
+ 30:c8:74:c2:d2:82:6d:30:e5:e8:8f:b0:2d:1a:93:8e:ab:6b:
+ a6:17:36:a3:a2:0c:86:9c:b2:4e:1f:d7:6f:ef:04:f9:05:20:
+ b7:4f:e5:e3:9b:58:38:06:aa:d3:64:15:9a:bf:8a:97:fd:39:
+ b7:5f:e2:9e
+-----BEGIN CERTIFICATE-----
+MIIDojCCAoqgAwIBAgIBBTANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwMTI3MTAxMTE1WhcNMzkwMTIy
+MTAxMTE1WjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZjbGllbnQw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpEHe1Qo/orWkqA+lW9S3V
+upIGzH/I0g/FR/0+2+FbK0DK+AWcElXvDEqSPQGsCiFyxLTZWYJ1HQxj/logf8VT
+srkFiGDH2f0Pzo8QoyN0jyFwVnPCB/B5IFId4DCd7Q1a8mgbDJ4tYtZc43Itknmq
+0PA67dZSMDrnkV6YTi+gB9dzeEICfcQs02MDt3KlM9r36T+TyTcZnzNiTxoDw6ZL
+9PVR5O+v1qeaVV+806l3kFmMKbUtPe+6zSFUJHlukb4ItrGceL5tL1ZyEGmR7rO9
+63ezwb/HKMatcDdo2kKKf9w7QHjV8qXBQ8NhjrvQuC0FQX7yskmGi63X++CbSH2v
+AgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2Vu
+ZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTO9N8f+VIuNy09irbeQYwT9hRO
+VzAfBgNVHSMEGDAWgBTKcZmJ8HKrdWa7ZWoDBHKle5WmkzANBgkqhkiG9w0BAQsF
+AAOCAQEAZWGYTGI8JTsSK014moEg4k0eHsN4yhtbhBN7EdrzrdAZ8AIMmUTYUonl
+7mGdjqwwetz8fnPjKDklAHjyAGZjljoQrys1tT4Jh5mX3SkLI+uV/qj09U/b3ayW
+lHux70cVVG/YG0M5ADSfrUn7ISaUdCBhzsWzPV9RRlhW3CyMw3SXg2M9rQv2gWNN
+yzCvRc4o/uBoxI8aYYB+Vo38MVqfMzcfrk4NbCXjDhOvARuCQZWhg0dhQN3UNvtz
+ephh0eJfHqGhqOrjMMh0wtKCbTDl6I+wLRqTjqtrphc2o6IMhpyyTh/Xb+8E+QUg
+t0/l45tYOAaq02QVmr+Kl/05t1/ing==
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAqRB3tUKP6K1pKgPpVvUt1bqSBsx/yNIPxUf9PtvhWytAyvgF
+nBJV7wxKkj0BrAohcsS02VmCdR0MY/5aIH/FU7K5BYhgx9n9D86PEKMjdI8hcFZz
+wgfweSBSHeAwne0NWvJoGwyeLWLWXONyLZJ5qtDwOu3WUjA655FemE4voAfXc3hC
+An3ELNNjA7dypTPa9+k/k8k3GZ8zYk8aA8OmS/T1UeTvr9anmlVfvNOpd5BZjCm1
+LT3vus0hVCR5bpG+CLaxnHi+bS9WchBpke6zvet3s8G/xyjGrXA3aNpCin/cO0B4
+1fKlwUPDYY670LgtBUF+8rJJhout1/vgm0h9rwIDAQABAoIBAQCAMnODZ+C13+DR
+sjua67mAysN2ElWHUvoQb2Ex7At7VVYBUob2bNTqulhFgasl6FyqqUw1T/Fjms5N
+eI6g/CIGMIyqDFrO0JZbCRdk1z/IX8xMYdHPPLP1NTPvYZOb/SfWYd/dOvkqkzrX
+HsTyl5JYm6y+EqEkm1vfQlUHiqoEXxG7hkYSIU6uXmRgeHHfw0Nuy/DizQFVZTAi
+yPoYQlMm13S1oIhr1cQRAHS41aWGl4dmprbS0Drqqr8kl2xrFEgZ/YLcwYKjAMzi
+UbkgOBU11DuLd0E+J/9iUhK5YTsMxo1TO89p7yNLHvT4NBhV3cuicq9aaWYeSijf
+VhDo+k4hAoGBAN1jlrElHmJcxI6JpA7BfX2BI5XTiQrq07jNkNMD1IlUe3zAnnq0
+DbwtXWYcolapYA9SbsXgHoEDhBjFJsz8fjqX/RKpBy0XZQuWImP0sYBficyWkKSQ
+yO0I9RNq6zERKSCP/wJMBGuRAVjlgrY6mBNVr2NmyqvVLzNNNUeCTcC/AoGBAMN+
+vrALUkMrJ8Oh5ay4IW+5toOu6/4TUyOK7zN23jGaObbPy/tLcgvpZ1xQsvuhvesG
+ubIr98st7J9+V/+mGMrvf5s4TlHUtB26E56wZrque98tBe8IG7Wh5dYut9PLw31K
+npT9fAYy8nsY2c7g5cs/vfJ+ixFj5ytsiYgjjI8RAoGBAMz32xh/CTaANOrSvDV9
+JrX/zfZ1NrgI2aSLjb4QGcJbmUjS/OcVtHG4fnR/pj0d63XEGBLTgOppWu+j+Fxo
+mGWfOgsAu0ggFMk5YvWwInZ7/ZSRAbGa6quqU1x67O0suisPpkV2I9GDGwA23WHh
+tdKQziT1kkasxVp17RIbrej5AoGAHMki5uUj3cQS/Nlv6jjKo5ri5wzwrt7FlSw2
+AIv2N7OP3/1E+eGoD1z03UD8udSdFGhPG48h04cVmn6OEpSwfeE6Fu75iU8anm3x
+yaIL3l0m3DvS7dlxyxLltt32L3eHd4FvTFzu0DLcRYfpOm8fJwhhvb0oWQ0u0tQO
+hD9HySECgYEAnLQnpkmFfr+1Gfg19N28Pvgh9NJMxvt4zVP+MZ8xR8gI+peqjZLp
+KDGtIlQ7bPnjMopeWojf7mOnlsvR4mChXJ6Uw1XGZjgMQnQtOrrHSuzdoWDJDteu
+8ftYoxWkqclzIrytpsOxon/Epq9i/D019V3+p+IhJ7NKiwqh0Ui66co=
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/galera_certs/INFORMATION b/mysql-test/std_data/galera_certs/INFORMATION
new file mode 100644
index 00000000000..439ba394e09
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/INFORMATION
@@ -0,0 +1,2 @@
+WSREP certificates signed with root certificate.
+Password used is `galera`.
diff --git a/mysql-test/std_data/galera_certs/galera.1.crt b/mysql-test/std_data/galera_certs/galera.1.crt
new file mode 100644
index 00000000000..c1c1818a88c
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.1.crt
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIEODCCAiACFG1AlRipIFaH2nn79vsiU6s8yxqwMA0GCSqGSIb3DQEBCwUAMFox
+CzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVsc2lu
+a2kxDzANBgNVBAoMBkdhbGVyYTEUMBIGA1UEAwwLZ2FsZXJhLnJvb3QwHhcNMjEw
+MjA0MTMxOTU3WhcNMzAxMTA0MTMxOTU3WjBXMQswCQYDVQQGEwJGaTERMA8GA1UE
+CAwISGVsc2lua2kxETAPBgNVBAcMCEhlbHNpbmtpMQ8wDQYDVQQKDAZHYWxlcmEx
+ETAPBgNVBAMMCGdhbGVyYS4xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEAq1/qI8oopqwSG6TWLSzMOpm5iXilzQ5bM0E440ZVrdPo/OZvAb99yofMFJi9
+uD1zUigHA+PXoJhm0HYTt5VsymByYwKCT8aYC6Sm6a2H82uuS7Ze8JUBdl4ymZCe
+f56fYmh3EVu0Kf+rk9uCQGouzwrDNuS+MWxsV+lxVoAA08F19yJdvxehBNlGopqc
+Sw6NNa9SISCqjg32oR2RuFzkifV/olPHGl1FSzyzJ/zO2CQYjzT8W+UA/EtnFFCo
+XVJzOKHIbzTNKmj/kkX6esBZ7ItmAdGaTlIV6A/OR/wcKxzZBopd9wFSm42x+Dxk
+eMPKS7OFhaOypl/PHo1LsSrzKwIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQApP88p
+5jaa26DhqBonGMBwgbnGzzXqrDlE6GX8Z5TffgOQjg7ZmMzdnS50iW5Jj9PcG3PL
+VpdxtKnyV/3qKJ40WpRvnUMcghyRB74h44y09Qh013uSpFR4ST7As1kAsRKYU7YP
+gc7Bc+rc3fjCOxqwRBIg/mosFCmW7UoogpeGNhuXFgl7ED3pjszAOjbLDxUkaQTj
+vbS9nWvtzE68STBdVTct91OIJPY2hNno8trwYqchQOG7wPOH/V+HzQ3jeLdE8AKw
+/PouspuE5RJmU9zcRzlKBKUsmjl+zD6nkyEzkfRO/JoDhBB0ReHsxaR+SU42K78n
+2H/qGjfhIcWsQVyIaRGqRTPZ6AhRX/04n8RTLHHkG/CLsgBcZnaOvVhraItUAEzC
+AQtD9vvF5uyzdmj0uu2TZNHJnbx+NXoNGJOJI2qUISLSdrVkS6qAHIdavypxDZZg
+4o5NZz+Jyc7Zq61LxLemKfD0isVsY91610A/1JwCy+Li99Mvng8gAJoP2NX/Cvmv
+i0QowP5uRRSL6YmiqRByer9yveSlxR03FvLeFSdftln3eEIyS9/kU74oJ+rOXPus
+fuB2ZNFHjmX7iXj3zf1kkpNCc03eaLY6P3+h2Opnqitz/XAT/eSWQ1huMKGm78ih
+C3Cd/yrwiA+AfxhYMJHl6CTpEWcJnqZQbPBjug==
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/galera_certs/galera.1.csr b/mysql-test/std_data/galera_certs/galera.1.csr
new file mode 100644
index 00000000000..f0c396836f0
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.1.csr
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICnDCCAYQCAQAwVzELMAkGA1UEBhMCRmkxETAPBgNVBAgMCEhlbHNpbmtpMREw
+DwYDVQQHDAhIZWxzaW5raTEPMA0GA1UECgwGR2FsZXJhMREwDwYDVQQDDAhnYWxl
+cmEuMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKtf6iPKKKasEhuk
+1i0szDqZuYl4pc0OWzNBOONGVa3T6PzmbwG/fcqHzBSYvbg9c1IoBwPj16CYZtB2
+E7eVbMpgcmMCgk/GmAukpumth/Nrrku2XvCVAXZeMpmQnn+en2JodxFbtCn/q5Pb
+gkBqLs8KwzbkvjFsbFfpcVaAANPBdfciXb8XoQTZRqKanEsOjTWvUiEgqo4N9qEd
+kbhc5In1f6JTxxpdRUs8syf8ztgkGI80/FvlAPxLZxRQqF1SczihyG80zSpo/5JF
++nrAWeyLZgHRmk5SFegPzkf8HCsc2QaKXfcBUpuNsfg8ZHjDykuzhYWjsqZfzx6N
+S7Eq8ysCAwEAAaAAMA0GCSqGSIb3DQEBCwUAA4IBAQCUyo7S6TThiPiTRbMMu9Pu
+/YAK7mcxF3zG5rMzcf4fgaJAuUfE1Ct4y9eJ0k4gPevt37J2AhyTei6yS2ivESie
+exc/kztendR1PQmnRlICWa3ErXC1ZBJAVjaOx/S+Ttq5Tp4Bd/X2gvUb5JT+9Xbi
+NtxlnISh9cjO9BP7nfsCAbjqBhYT1hmYMlCDkTgHOPRpBQDQlRZ7e5jXDyzHaKzq
+yMfX0jo934oq2lkrV68q/9vmW0SrUU0X9GVDVRo8+4wTb1/dHQOcDaFO1LrsklaQ
+MqJkffv0tJB249+JkXHMzOZbfUTFn6jVJvMrSAQmOCIgXpswk0qmMM6ipEQkAlKW
+-----END CERTIFICATE REQUEST-----
diff --git a/mysql-test/std_data/galera_certs/galera.1.key b/mysql-test/std_data/galera_certs/galera.1.key
new file mode 100644
index 00000000000..adcd6a396a1
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.1.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAq1/qI8oopqwSG6TWLSzMOpm5iXilzQ5bM0E440ZVrdPo/OZv
+Ab99yofMFJi9uD1zUigHA+PXoJhm0HYTt5VsymByYwKCT8aYC6Sm6a2H82uuS7Ze
+8JUBdl4ymZCef56fYmh3EVu0Kf+rk9uCQGouzwrDNuS+MWxsV+lxVoAA08F19yJd
+vxehBNlGopqcSw6NNa9SISCqjg32oR2RuFzkifV/olPHGl1FSzyzJ/zO2CQYjzT8
+W+UA/EtnFFCoXVJzOKHIbzTNKmj/kkX6esBZ7ItmAdGaTlIV6A/OR/wcKxzZBopd
+9wFSm42x+DxkeMPKS7OFhaOypl/PHo1LsSrzKwIDAQABAoIBABrfppLIL8m7L/e/
+yIo6/SevVYX2MmHOf4SxFJ+nNuZUVbPa2st2YN5ynxEXxqBumnfmqPr2LqkTXQQR
+kBP4zZ+KskVObmreJJem0TnRqYEFgMaEqaymYR1TtjGYmRJAKJRA93L0Y3M2kYxV
+Hr7FJ+P1txkTk7OiYfcDN2+uEPMjoIwPTZYqcpw8UggF3zMZosBH3tf4yk/+5Q52
+MilRRjmoOFJSs9617OdgLoXEwQ4sAvg9UecrNR/octMnBUXKq5vWT+L9ub0fxATV
+8U+GUiv2gBnHGikbsqfV/7hZZy+R1V6b/hFrpTlTHXhKpM56ownT85tcI2WNVVOR
+FkDFXDECgYEA1gkIXzQ1O4wuxEBZCwH3hpzT2qCDou/yA91pQN6sekdxJffz8VJs
+5MUmr53vBTD3j57l+iPfa1yApNYEeQDXmiervdLjC0ep3FqyK8qS/J9x86K2E9Bt
+R8ElYGEsYoT93pzM7txPEZo3awgHAqmlPQ9mhujBpsR9xBjYi1IrGDkCgYEAzPmj
+ezryhMqFosh9OK5tirjGw3T28p+ywIl7wS5/Le32HV6sGsva3UpZhb67SkpCDbpF
+ihDV7KHFQqOvZBNSFc8gPvBgFlv4k5IzbU2q1/nO/TzgSnp1sAwlZv4shsiLz7sv
+x2ZhR8gPfO7cTS4281rdlhUuAMe79W2FRwm9/oMCgYEAkPSjH9864i5pie5On97g
+JeHWtS2amWJKFQYB/7YPN+1kmyNXqit5pmJDdhLPS0PDlhg2hvd+m7aVRY3Qj6bb
+XgLaFIBb1krdpmgiXPggHklaIngjOj4hlMQhrSmCpuKNERQ+0tKQFkrMl4djQBFm
+4HiqplnCtVBEIOf22Dx5BTkCgYAQssmhsWSucr0+TKz+4B7mbTUsGSxBCceLLega
+DcqomDkznVHSAQd8faEbZzVk0PXenm0p2UNEOs2SJzmTootOYYhT+EsrpyRyCTgN
+UIV5gM1fDgWLq7xIskSdxlkkRdQ2AR7cVLfaHC8+00q5MumhG6bvohwUTjE+xkRU
+TDPhNwKBgQDKmYS+6sUiUim69J1dP/DNCs4fabbOi/uKaAk0HdN1abnxgRROzrPI
+0BsD84XrG8/e0JhRiKG3Doq18ejNjfWsuyliHPCoJrTIj4IUq7bFvVbdOD6BQHNw
+VzHa3UImlF1LthRqRMV5As+GOF0pRCHeXyihi6KBDEZBG/SKaCp9rw==
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/galera_certs/galera.2.crt b/mysql-test/std_data/galera_certs/galera.2.crt
new file mode 100644
index 00000000000..2d7ebb2d533
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.2.crt
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIEODCCAiACFG1AlRipIFaH2nn79vsiU6s8yxqxMA0GCSqGSIb3DQEBCwUAMFox
+CzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVsc2lu
+a2kxDzANBgNVBAoMBkdhbGVyYTEUMBIGA1UEAwwLZ2FsZXJhLnJvb3QwHhcNMjEw
+MjA0MTMyMTMzWhcNMzAxMTA0MTMyMTMzWjBXMQswCQYDVQQGEwJGSTERMA8GA1UE
+CAwISGVsc2lua2kxETAPBgNVBAcMCEhlbHNpbmtpMQ8wDQYDVQQKDAZHYWxlcmEx
+ETAPBgNVBAMMCGdhbGVyYS4yMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEAq0DluHNB6VlRjMlQVhnABzB+wTAsC4DBQBAy/AzCPdEg67pZj1j1UKNitdfO
+/FLn6DCLoFhw/z5gFUpev3JzgHcbguOlf3AQA4p9zZn/R/g8fGJtUHolkYXT+V+j
++xUQ8dzdjelu6Xd0kpN9wigtKO4PUd3fzZ7QKen68zQPNEf+KFbSj/Dhk2iokt3N
+entl3MpLGJ+FsxPQwm7bagRdn66x7zAeRu4DifYh3i7lWkC+xE+bnB82BrzBHcMh
+N6uqdnKSdj078hRj/gcSJFMlOSaWCWoZdHQ7+3gp/bCi/dGywNxOgbsmuHznlUpE
+ELbhv6G0m6LzzB1NW7HFctyrNwIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQAwtXxJ
+8ZQw1jZKUo0TP1D17Jdu36x2Tl8YwB+WMGdEvQSuKAnUEL/k4zOB5WI1VlNbJFAF
+dgsbHXjYrVCbDEpmN15sYXZ4J2NfGTmHAz38gB+r2LDlWj/+5L+VK+hkwGdbcaPX
+cDxm5M66ZbTvCFfozlHRh68/vGKhLnT0Iof3DekP7vaPUlfUUZGFh75vxUW8TM/S
+Ii4Tdo5D/gV4J/fUX2VKMKrJIYKcUxk48AFT0acCfzs9Uc5f4YYJ0vMrtGeVR0gl
+QLavAk3OW7IVY7trVrb0+qKfVuaxFli2hZN58ug/fpSN4wEMP31UxZ8WihG3xJ4x
+9ona+VR023ltpJerLWgHZyvH/HR8QnrQpPJ7y+2XLdI01gIQpYDwHsBBa8EkGjvG
+ra5YB07xOxxR4Wfr7/7gZzMvBkRr0wG/96iAfIB/ILYRJX+93gyqaVHS4RZRRQxe
+fsOpYOy5wMfPIjQQ4/Zd35NH+Y/dQcYqV+GdbbardXtNbT0tqLQesT3boBpsTxA9
+fkA9RayzTKHGojTv8p/FHh6yusfwa9MMdNsbkikM0YoAOTQwrBe7S9sm17Z6HxWr
+A7QqZGxAzAqI6aRRoro6z0KLNjuuiJysCSBqHB3yvPn6bV84UEUreoXFIHINkF/L
+B9S5zL+uYnA3X/ozdSmayNpipA3uYqqhUVSG9g==
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/galera_certs/galera.2.csr b/mysql-test/std_data/galera_certs/galera.2.csr
new file mode 100644
index 00000000000..0fba110b92a
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.2.csr
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICnDCCAYQCAQAwVzELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREw
+DwYDVQQHDAhIZWxzaW5raTEPMA0GA1UECgwGR2FsZXJhMREwDwYDVQQDDAhnYWxl
+cmEuMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKtA5bhzQelZUYzJ
+UFYZwAcwfsEwLAuAwUAQMvwMwj3RIOu6WY9Y9VCjYrXXzvxS5+gwi6BYcP8+YBVK
+Xr9yc4B3G4LjpX9wEAOKfc2Z/0f4PHxibVB6JZGF0/lfo/sVEPHc3Y3pbul3dJKT
+fcIoLSjuD1Hd382e0Cnp+vM0DzRH/ihW0o/w4ZNoqJLdzXp7ZdzKSxifhbMT0MJu
+22oEXZ+use8wHkbuA4n2Id4u5VpAvsRPm5wfNga8wR3DITerqnZyknY9O/IUY/4H
+EiRTJTkmlglqGXR0O/t4Kf2wov3RssDcToG7Jrh855VKRBC24b+htJui88wdTVux
+xXLcqzcCAwEAAaAAMA0GCSqGSIb3DQEBCwUAA4IBAQB1Je87IIfWW4YTvf1evm4/
+ICxImyQ4T5m3IOPrv9dV/DdxIoNSEfeudjyOmdeXchV5XxlGD2a6JDW4Pmf/gMlU
+5E6ySf4yvI/heDM05GdG623Nye41hCAqh9AIBOvhZEFlQ8/eDZFBXT9nZ4PFUshv
+7v1KlMNKHq5E3Y2eet3d0wDzE0CYJfkc0yoYX/y1IGVM2Td7/YmsSTz8Xm1OvIfx
+hbLzbnYIv4OLfSda/ntFxUy32c8jRxusbbrL4NKE5+eO5Sro1JR/rxRW9DIarp02
+8fzUyf1WhYIGtP/N3ZiZ4jqCsRyj0QmuwIohk33pKtb0APIA+qy8a13QSLUCPuHf
+-----END CERTIFICATE REQUEST-----
diff --git a/mysql-test/std_data/galera_certs/galera.2.key b/mysql-test/std_data/galera_certs/galera.2.key
new file mode 100644
index 00000000000..5b9bf3d0eac
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.2.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAq0DluHNB6VlRjMlQVhnABzB+wTAsC4DBQBAy/AzCPdEg67pZ
+j1j1UKNitdfO/FLn6DCLoFhw/z5gFUpev3JzgHcbguOlf3AQA4p9zZn/R/g8fGJt
+UHolkYXT+V+j+xUQ8dzdjelu6Xd0kpN9wigtKO4PUd3fzZ7QKen68zQPNEf+KFbS
+j/Dhk2iokt3Nentl3MpLGJ+FsxPQwm7bagRdn66x7zAeRu4DifYh3i7lWkC+xE+b
+nB82BrzBHcMhN6uqdnKSdj078hRj/gcSJFMlOSaWCWoZdHQ7+3gp/bCi/dGywNxO
+gbsmuHznlUpEELbhv6G0m6LzzB1NW7HFctyrNwIDAQABAoIBAQCAnv9qJ3bLkgAD
+43dpE3H8dFnfMxUBlrSOLxx73gFNeHJnWdDGLyQganZK6UlWjdYLt9pGleZYbjqw
+AulilM1XIR4SknPMYRhF8JBICW+IWFLlgO9lUDhDMeZhF4oLnGjbnuzwFvDsfIGb
+TRdY6d/xK8tpy2C6CJuDv25xlxoMQwJvSIViJd1qyCe4x3PDBvZ3TKMiWXfUGoSg
+75Yee6dIryCoWGACTjdiNdJpo99EIMJT8HIGQeBBJuIvSTsAgXMugDlnvUkq98LX
+XLJ+Lilx+enUb1WDbwZDMwJd0DlDVZyRVDJwlJRFUEuJvSRfMNKICEynmqJVc/36
+I7BzHNtRAoGBAOOGrH/r46oiSH6vE0VqgPIdlruLDZWoBIW0tVW1wb9E3NzExK53
+WEGy6FETsFGt3cYxtKd5Qy4rD5gfqYrfmDH/bmkK9p69pSjKcSgynABxCqM0DCth
+F3EGc5ZGDcA7Xar70NEP9COExFvPpi2bBq+8//OHNKWHe/aTYj3FuvyjAoGBAMCv
+ZrUR8NJfxw8Jqygc/L5BBW0gzh8ycHlQQPrpb4j01ncFcjTe1Tsc8BAkHYXZbS7o
+h+3JkgzQf7fHJmafKPO3esj2fZqdCoWBqhAf9Wk+9s33rTPo4OXdk22MdII7kV/e
+VpUKzdznKQmftleoJDVq6qBDMN9qQy8z5hVVv8xdAoGBAJEVSV3wzyWn4s5VWVaE
+SWEaGQnR64Got+mCh7b1xWvvv15PYpNVqsOKD7XTdjU/RxGglG/OVVZVQwZf+j6B
+wYzwMjltMkGa8HwISwu06eEmNABJqhDnQolh8ca7OP2BXYMwO8F0CNu1R3i7+l1O
+Y38gZ52kc5+xuwxKgvSc51U9AoGAKiq4aUvBzegT4eCVyjN9xAzqqRUSxpT9NC8x
+6TcIp4odHPLeKV/Sfhs5Fe8xXsdUM33DsW/5PECskoVMjAyso5k1j6ERn7JaSRk1
+JE46IIwc6roW91MxVFyHFOQ14wIyMC6x9+/jWUJlIqwG9WvgcKgzLFtH6LySc1QC
+OA0J6ikCgYAr7JEzFzckFvXNgdUiADnXztchwmjeV/CJZdaHhlVdHmtt0Z7PiWK9
+wRCKwA+wfTW1MeufP/t3l9MqdFx7MjxBbu2aVnd9BEDtGX6pch1pMa7CHyHayDiL
+UoD0lPrJ9hLftKkyMO2IL3kWlg5g3cpwVBzMKxNBynzQx7TQxUrAgA==
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/galera_certs/galera.root.crt b/mysql-test/std_data/galera_certs/galera.root.crt
new file mode 100644
index 00000000000..e965d5a26d6
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.root.crt
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFlTCCA32gAwIBAgIUKCF88W+48rZzdfgYpE2dXVMGSKgwDQYJKoZIhvcNAQEL
+BQAwWjELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhI
+ZWxzaW5raTEPMA0GA1UECgwGR2FsZXJhMRQwEgYDVQQDDAtnYWxlcmEucm9vdDAe
+Fw0yMTAyMDQxMzE3MDJaFw0yMzExMjUxMzE3MDJaMFoxCzAJBgNVBAYTAkZJMREw
+DwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVsc2lua2kxDzANBgNVBAoMBkdh
+bGVyYTEUMBIGA1UEAwwLZ2FsZXJhLnJvb3QwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQDKqL45jbaq8RLOj+DeilPcEnBN5gn/y9V3IfZ0BQCd4bR09zLz
+7BQKz6QS825Wi56HC155W1xPMR0RYWy3I3owreQtfdGJuYoTKLpRSoqWJgy/FSzR
++Tr34WfpeIj6754YRm7MndWBPVkujPtOWz6EHn+2oUNIpCZAOwXtMrlJzf5GwNBu
+4kwkylz0whs3iTS//pZLyqk6MsLI7tebmfi9qyaM0b+C1OKiBRQRIjPON8Htp7Au
+GDyOqA4Y9IQlAzZVqy2PP79Ci2FpPF3+01ByWGY6vAIxma2VXS/aNvUvGnuzH8hz
+A5xg1+5Fv2kdxffcWLjp5/WSIaTUiBFMBRKswTtfo+vWuVpzXGvlExGHd10m+MhK
+Avoqq6N28ql6E5pDDH5k6aZ1eB6nKF6BU4BMa4SUPBX/qz8PMbb5j0+n645Gj/G2
+0DfCQoyHd6sMAZZ9LgTjGB/R6sz74YF72q6xECTCygn5HY3qjvmx0BYlIkQDKKqh
+bq2ZmsLLCwtyfUeW144eMhErNZA1MwoJxd8LM0TpJ0nXQdEESf5oS5fMLZnVrxah
+dl5QYYMbmyNedNKdwV4idhGCy+Zq7VAX4lBXazI1rD9vQb+oTcPGQiy4i/Vi/g6i
+F+XZTdTiaOWPEmvFFGLLUQxKl4w872hJaupqfteqdiZ+3ICVIUI8qnXHmwIDAQAB
+o1MwUTAdBgNVHQ4EFgQUs75v/MgjJ5RHGE6+0qdiVo4BwlowHwYDVR0jBBgwFoAU
+s75v/MgjJ5RHGE6+0qdiVo4BwlowDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B
+AQsFAAOCAgEAOVhBs28dwwvD5q2r7oVVcxLc+tb8zu4XxpXT1p6hiZYUyPguCh00
+GVdXCgR4JMI/NcyM5fBAbF3S8oK3+9rw2kW09afVV06Qf/8o3nIyOiDl7598tGIP
+CCK4QsUW/dGajx5kvhtQ7qce+u9KfFTof6lq2xkYtFBBhmBdSv9A1jAZJMw2x3bc
+nr99PS8XZMphS0MIExHKj6Ry5DdYm722zZHyIEiiEGyMViDm2m1iug5r/LPH5Z56
+BjQiH4VP+0y5mevBOUGuH8ID+J9Hu9BeoXLhkv+W2Ljs/S6wqzjinMBqVG+wwe0Y
+a8F5pABkl5uX38nMQ7CikSbLxSbn7nRf+sux1sbzqjMldeCSqiv9mI5Ysq97+Ni1
+5qMxNxNc0u/wGRnrXH8fWfxBKPP5moA7DQfVcUWPgDGQwDpA8kn8RlJxFk3g4yaK
++NMwk5MORKyx3tz/A3Yhs9AUXk3okvmQCT2YVSHcKUB8PAU+TaKqbr3wk07Y/tL/
+jFPHS+t3eD91Y05KGUXjdtGi+33zpV0biHmTWAZT78VQowDNvEpTnXhkSx8HGHYR
+nqSMU2m2LboHSatY113RYznx0LJ1azczRlJdGs8oyPWLPDD2JCesZaQqGZVRJoms
+lK4EzYEb5mZTCRgtgoiO+iKcf6XifuOCrWZXoLm4FlLEfOQ3b8yAFlo=
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/galera_certs/galera.root.key b/mysql-test/std_data/galera_certs/galera.root.key
new file mode 100644
index 00000000000..8472f87e714
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.root.key
@@ -0,0 +1,54 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,F0ACFFE47CF32BB2
+
+F5PwhFDgzuaD7ISSmSn3+GpEoWipTwOPjE8ei9LsQ1a/RdcW19kmB9sJojOSVlV6
+CbLeEl/YKkkAZvbupKvpL0i82WTi+V7W9iKNU3M9tN1JE3WNGCYrL16aUrlnXszi
+eiNhWzAGxtpXNTv+d9gdgYZ0mHJrDk390tYGRcnrEp8FasL0aI4AnIWrJq9zgHeP
+m8K0RxIB6Rp07+SEfsO0pZuGPIkO/qVhIDXYhQrEkap3viPZouH1qzaJNaQXD1ZE
+EoP0n/jbX3KuLeep4aGdEGq/eAZx/WUZpZWECOqwZ7HDNFcXj4nZRNQmCpSobEHU
+e+9DL+nnmoMtsFG7Jb6S3d8Fxv5DLqm7LTHweZzlkw0pD5sVVMSeb6Xq2Cshxsf2
+htQGZDtxscTimDrLHsNonw1tVBfY0HPpTNNmjyKpa2lmbQ4KQls3A4i9yZaXM1W4
+pkc1Emk0ot+yXZU+SNPeAgAMCf5rygiQtsALYdbkZVpVvziVVBFdav+v9RtwrMfJ
+fli6GbAwm2mKXdFlc8SnfbNxKw8v2K26IUZFEzwiE/MxwOR4UBwcNa2JcXKsMGVt
+o2pBOJr0dquywV37EV7hu2S6Kgf1nREgksON86REmZoPpzMlCpTf805awdDN/a/K
+jJkRrekRinrPaIDfvwQjIhhXYWSVQywJ2nTL6+78SvnKRNmIFDGdmOY7CtsyRvkp
+P2Qp+JhzT4VM8x2sApBQiN3S3dSr1D8gmdwKGiLp82GhMIdGNjVpxPSVjCFC3Apu
+hvRw3LSJ7iUWLrtsR2yZeDBHh1yDraLYo76qYqvgYDKYa+R1GiJd70t5cDSqgwV9
+EXlnA32VsRrAXdRypGNAq934TSWiO4l+M60bt/K/U41uQHas1gWsGdtWcjCLTylf
+YT8G+4QnIrOGJzyKZeIrawu/GtxrK2S5xe0ZAOwYQmJYiIH4TfvdrNX4DNEfGpd/
+CrBULWCvAtgqNrNgpFuV8027yAZWPpG2DSE+Q+XTahxjNUxAI7kkXB/Xxc5KfhSF
+BaYHQ2TfTWnwD3K1BNWM4yZ/L4up8UIrXyMdk7q0LofwCTKGOgqzwVaez86gpriL
+pphXPYIY9cX9qLBs5YuVGk9ApkbC0VRqmXcCL7OEAzso14ItHVlVU73QSS+I+3sK
+sqwb0USLuN7qZUVhtJIyAkK/D+DmNYSg4eqhcMRnJAanD2acmwtAy0HE+YVcQN/X
+gEwSOdkf7WkwDshvBPA8rl4YWRxwKxstS0wyPG8rzMZWYYB2xf3nd78NtdzVZSnN
+pDUJkUKorCaSuanMvjKS9r+sILzUc1bkO/T//qTY/HtRtl8AffcXIjyJkXb5PSjt
+dxq7ktkeESAB9vb+c7nWolMVqxUD+1KpHi1kwR4IuAWtJe4G+82pDc6wLEZjeJMO
+nd2NNW/CToWv0YfWonGUDZbOFqee7H0Tioqjni4uQbLcDZJHr6i3wwGIncIENo73
+DqfYEpNT3U6uLSC/cNv3lvIRjVziBEB9f0KgOHt38UIsZ4oJAMV/B63Wfn1nd1g4
+NBdNwO48M2KHbxgwXJxxX1jQOj9+IJiVaGIbpzeeJ3yTKDMfkBKH4eQj2/aAA1zK
+pqFRyoBhuviMZ1IeBOVyb3QHJSINry/WiiOKoHLvvFM7KXgygedJwg6k8SHCQCfS
+D9RignCNT/O8VhJ4hpzAXbEpeAXJn+AHYGIxL6Fu+0dwDKJjruvcLpVVt9GLLdzX
+OBgsK0z9m3hLOf8dfY97jMkRTHtokrA28iheLh6l8rFFesJM8lqFreFRRJMTXeHW
+Xwa82PbUdIWygguAlSj035aGUuNRNDZq4Bh4XTVndCDbUfRBlYF9yMduvSqaKsmm
+tLJ8V04vDECQpUcAPTCCbTDFoV8/KVDsxMTgZkdiJG/Vv2y8mzy5FPAJBNk/HCcx
+E8qc7KF80l+YGQ/IgGzzz9r9DqaXy21FwaiA6TRFth9hXMdzZLVBNfpzZ+dGMJEQ
+PAoWUshcNNwAZVU0+GzdQvdckGUcWgnMZpzXswaUmXbMidQ6VQnDTQdj5qIEnrMW
+CrIHVs+hhjcGRbGf6DGHQpQbjD9FWX38PVzPpocu1qmLKVTUoFPqm0EqU01SYLFu
+S9ntmlOqYJJIR0LbXJvAL7tVKHiK4gR8NMfN2YKPi4Eg3GKTZ5XaSpNPQJnR0ZqP
++sU07jjQTcVuCD8Cx8c9LGXa6PNAwBufk3jrz/vZy8AQEs13aMu3thHhLQWKrgi5
+jVdoLNIqQZJH7aY0YjoaD6if+4uHtRQOqUcJPUyxWnwXx+Y/o+9DrpH5K9V9fcVR
+e7Ej8j2Ha4yzZw7M9Uze0unMRQOhE2lbRsP4C6f/TK3izeSlmhG0D/pHfHx9GKbf
+S7TPnD0YhUS9TpXX3BEVSXVjIkkbIiC0djq3OI+3PSn/PJqWjCw8pL7JZp5T8J1u
+sqyQCge4XjYmmj9Np511tcviq+jmobf0b+WMmxxV21/Au+v2uI/7eAwUyWYIJYny
+kcGUDmEZohsFx6hYbRsH+bSEUqC6MuKiUaaqEb97IoR33D3ZajMBchw+Yg0jh/wJ
+S8FKEB0NlS00051UnwdsjBKyuOMWT6xH9VVR8W+7t6i0rMDxb4DjP3T+BqjXCT0d
+kiHRXRALxotk+WVRC4qRVr0kmFut9bLjlFu2Hlbnpmm7zmJcE3hbkhWjXqDsysp7
+SKJAs+IvYrTMEtURflKiN/n7y6SbXdCXvw+lRTeTjT9h8DiIMsK5vw2SSjWPaQnu
+ikCATObciGyro3aImzhaBBY0r/F4Q1KsvLi+xKo+JoDHSVNjNg9SNjQKhyVRFJq/
+quwTP019B5U3ykWj2/i7HV9IBH+nGEUuvpI5esUoIWTvdCkVdAEeSg0vwkJoohbb
+l9HjDYyEJxoLhwaR7Mqh+uDxHBK2Kqh8TkIXjdUbXqTRIX6lajzJ/p7owoE48sHa
+iWo9tN+4bOabEjPAkEhLy2cLUfWEPjClo8YZelif8cZigKzdSDbxdmyugfFtZfQX
+NYwcMYayGBCETNyByLbBjNO+7XPlNcfqQJlFWsGOrzmJdoxtW7CYYqbN8qzhpNox
+MSRK7T+eUDFKNjY53lPfUPUFgcXq+9IKicf6cYE8gsI3/5I9vzLk3Lt7ZLXMgFv7
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/galera_certs/galera.root.srl b/mysql-test/std_data/galera_certs/galera.root.srl
new file mode 100644
index 00000000000..e6c62e06527
--- /dev/null
+++ b/mysql-test/std_data/galera_certs/galera.root.srl
@@ -0,0 +1 @@
+6D409518A9205687DA79FBF6FB2253AB3CCB1AB1
diff --git a/mysql-test/std_data/mdev-28727-pet4.frm b/mysql-test/std_data/mdev-28727-pet4.frm
new file mode 100644
index 00000000000..3ff86d1dca1
--- /dev/null
+++ b/mysql-test/std_data/mdev-28727-pet4.frm
Binary files differ
diff --git a/mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001 b/mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001
new file mode 100644
index 00000000000..5010e164e43
--- /dev/null
+++ b/mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001
Binary files differ
diff --git a/mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001 b/mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001
new file mode 100644
index 00000000000..4d582fdf5bb
--- /dev/null
+++ b/mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001
Binary files differ
diff --git a/mysql-test/std_data/wsrep_notify.sh b/mysql-test/std_data/wsrep_notify.sh
index 7036f603c84..48edad4306f 100755
--- a/mysql-test/std_data/wsrep_notify.sh
+++ b/mysql-test/std_data/wsrep_notify.sh
@@ -56,7 +56,7 @@ configuration_change()
status_update()
{
- echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;"
+ echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
}
COM=status_update # not a configuration change by default
@@ -89,11 +89,11 @@ do
shift
done
-# Undefined means node is shutting down
-if [ "$STATUS" != "Undefined" ]
-then
- $COM | mysql -B -u$USER -h$HOST -P$PORT
-fi
-
-exit 0
-#
+case $STATUS in
+ "joined" | "donor" | "synced")
+ $COM | mysql -B -u$USER -h$HOST -P$PORT
+ ;;
+ *)
+ exit 0
+ ;;
+esac
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 2428f3156b9..5100b4137a2 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -28,6 +28,9 @@ sub skip_combinations {
$skip{'include/maybe_debug.combinations'} =
[ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ];
+ $skip{'include/have_debug.inc'} = 'Requires debug build'
+ unless defined $::mysqld_variables{'debug-dbug'};
+
# and for the wrong word size
# check for exact values, in case the default changes to be small everywhere
my $longsysvar= $::mysqld_variables{'max-binlog-stmt-cache-size'};
@@ -42,13 +45,6 @@ sub skip_combinations {
$skip{'include/not_embedded.inc'} = 'Not run for embedded server'
if $::opt_embedded_server;
- $skip{'include/have_debug.inc'} = 'Requires debug build'
- unless defined $::mysqld_variables{'debug-dbug'};
-
- $skip{'include/have_ssl_communication.inc'} =
- $skip{'include/have_ssl_crypto_functs.inc'} = 'Requires SSL'
- unless defined $::mysqld_variables{'ssl-ca'};
-
$skip{'include/have_example_plugin.inc'} = 'Need example plugin'
unless $ENV{HA_EXAMPLE_SO};
@@ -58,21 +54,6 @@ sub skip_combinations {
$skip{'main/plugin_loaderr.test'} = 'needs compiled-in innodb'
unless $::mysqld_variables{'innodb'} eq "ON";
- $skip{'include/have_mariabackup.inc'} = 'Need mariabackup'
- unless ::have_mariabackup();
-
- $skip{'include/have_mariabackup.inc'} = 'Need socket statistics utility'
- unless IS_WINDOWS || ! ::have_wsrep() || ::which("lsof") || ::which("sockstat") || ::which("ss");
-
- $skip{'include/have_mariabackup.inc'} = 'Need socat or nc'
- unless IS_WINDOWS || $ENV{MTR_GALERA_TFMT};
-
- $skip{'include/have_garbd.inc'} = 'Need garbd'
- unless ::have_garbd();
-
- $skip{'include/have_file_key_management.inc'} = 'Needs file_key_management plugin'
- unless $ENV{FILE_KEY_MANAGEMENT_SO};
-
# disable tests that use ipv6, if unsupported
sub ipv6_ok() {
use Socket;
@@ -84,17 +65,22 @@ sub skip_combinations {
}
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
+ # SSL is complicated
+ my $ssl_lib= $::mysqld_variables{'version-ssl-library'};
+ my $openssl_ver= $ssl_lib =~ /OpenSSL (\S+)/ ? $1 : "";
+
+ $skip{'include/have_ssl_communication.inc'} =
+ $skip{'include/have_ssl_crypto_functs.inc'} = 'Requires SSL' unless $ssl_lib;
+
$skip{'main/openssl_6975.test'} = 'no or wrong openssl version'
- unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
- and $1 ge "1.0.1d" and $1 lt "1.1.1";
+ unless $openssl_ver ge "1.0.1d" and $openssl_ver lt "1.1.1";
$skip{'main/ssl_7937.combinations'} = [ 'x509v3' ]
- unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
- and $1 ge "1.0.2";
+ unless $ssl_lib =~ /WolfSSL/ or $openssl_ver ge "1.0.2";
$skip{'main/ssl_verify_ip.test'} = 'x509v3 support required'
- unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
- and $1 ge "1.0.2";
+ unless $openssl_ver ge "1.0.2";
+
%skip;
}
diff --git a/mysql-test/suite/archive/disabled.def b/mysql-test/suite/archive/disabled.def
new file mode 100644
index 00000000000..888298bbb09
--- /dev/null
+++ b/mysql-test/suite/archive/disabled.def
@@ -0,0 +1,11 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
diff --git a/mysql-test/suite/archive/flush.result b/mysql-test/suite/archive/flush.result
new file mode 100644
index 00000000000..428f32d09f8
--- /dev/null
+++ b/mysql-test/suite/archive/flush.result
@@ -0,0 +1,18 @@
+CREATE TABLE t1(a INT) ENGINE=archive;
+INSERT INTO t1 VALUES(1);
+connect con1, localhost, root;
+LOCK TABLE t1 READ;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+# Must return 1 row
+SELECT * FROM t2;
+a
+1
+SELECT * FROM t1;
+a
+1
+connection con1;
+UNLOCK TABLES;
+connection default;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/archive/flush.test b/mysql-test/suite/archive/flush.test
new file mode 100644
index 00000000000..feadef08d7a
--- /dev/null
+++ b/mysql-test/suite/archive/flush.test
@@ -0,0 +1,25 @@
+--source include/have_archive.inc
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+CREATE TABLE t1(a INT) ENGINE=archive;
+INSERT INTO t1 VALUES(1);
+# Works correct if we uncomment next row
+#FLUSH TABLE t1;
+
+connect(con1, localhost, root);
+LOCK TABLE t1 READ;
+
+connection default;
+FLUSH TABLES WITH READ LOCK;
+copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/t2.frm;
+copy_file $MYSQLD_DATADIR/test/t1.ARZ $MYSQLD_DATADIR/test/t2.ARZ;
+UNLOCK TABLES;
+--echo # Must return 1 row
+SELECT * FROM t2;
+SELECT * FROM t1;
+
+connection con1;
+UNLOCK TABLES;
+
+connection default;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/archive/rnd_pos.result b/mysql-test/suite/archive/rnd_pos.result
new file mode 100644
index 00000000000..b6b6748d53f
--- /dev/null
+++ b/mysql-test/suite/archive/rnd_pos.result
@@ -0,0 +1,56 @@
+create table t1(c1 int not null, c2 double not null, c3 char(255) not null) engine=archive;
+insert t1 select seq, seq+0.7, concat('row with c1 = ', seq) from seq_1_to_10;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using filesort
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
+flush status;
+select c1,c3 from t1 order by c2;
+c1 c3
+1 row with c1 = 1
+2 row with c1 = 2
+3 row with c1 = 3
+4 row with c1 = 4
+5 row with c1 = 5
+6 row with c1 = 6
+7 row with c1 = 7
+8 row with c1 = 8
+9 row with c1 = 9
+10 row with c1 = 10
+set max_length_for_sort_data = default;
+show status where variable_name like '%tmp%' and value != 0;
+Variable_name Value
+Created_tmp_tables 1
+Handler_tmp_write 10
+Rows_tmp_read 20
+alter table t1 partition by hash (c1) partitions 3;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 10 Using filesort
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
+flush status;
+select c1,c3 from t1 order by c2;
+c1 c3
+1 row with c1 = 1
+2 row with c1 = 2
+3 row with c1 = 3
+4 row with c1 = 4
+5 row with c1 = 5
+6 row with c1 = 6
+7 row with c1 = 7
+8 row with c1 = 8
+9 row with c1 = 9
+10 row with c1 = 10
+set max_length_for_sort_data = default;
+show status where variable_name like '%tmp%' and value != 0;
+Variable_name Value
+Created_tmp_tables 1
+Handler_tmp_write 10
+Rows_tmp_read 20
+drop table t1;
diff --git a/mysql-test/suite/archive/rnd_pos.test b/mysql-test/suite/archive/rnd_pos.test
new file mode 100644
index 00000000000..8c7a0e16a79
--- /dev/null
+++ b/mysql-test/suite/archive/rnd_pos.test
@@ -0,0 +1,31 @@
+#
+# MDEV-14500 Support engines without rnd_pos
+#
+source include/have_archive.inc;
+source include/have_sequence.inc;
+source include/have_partition.inc;
+
+create table t1(c1 int not null, c2 double not null, c3 char(255) not null) engine=archive;
+insert t1 select seq, seq+0.7, concat('row with c1 = ', seq) from seq_1_to_10;
+explain partitions select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+flush status;
+select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = default;
+--disable_ps_protocol
+show status where variable_name like '%tmp%' and value != 0;
+--enable_ps_protocol
+
+alter table t1 partition by hash (c1) partitions 3;
+explain partitions select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+flush status;
+select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = default;
+--disable_ps_protocol
+show status where variable_name like '%tmp%' and value != 0;
+--enable_ps_protocol
+
+drop table t1;
diff --git a/mysql-test/suite/binlog/include/binlog.test b/mysql-test/suite/binlog/include/binlog.test
index 6c7d374b41b..948f226b3f5 100644
--- a/mysql-test/suite/binlog/include/binlog.test
+++ b/mysql-test/suite/binlog/include/binlog.test
@@ -269,12 +269,10 @@ create table if not exists t3 like tt1;
# the mysql database is replicated even when the current database is
# 'mysql'.
---disable_warnings
USE mysql;
-INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
-UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
-DELETE FROM user WHERE host='localhost' AND user='@#@';
---enable_warnings
+INSERT db SET host='localhost', user='@#@', db='Just a test';
+UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
+DELETE FROM db WHERE host='localhost' AND user='@#@';
use test;
source include/show_binlog_events.inc;
diff --git a/mysql-test/suite/binlog/include/binlog_write_error.inc b/mysql-test/suite/binlog/include/binlog_write_error.inc
deleted file mode 100644
index be5e9e0cfea..00000000000
--- a/mysql-test/suite/binlog/include/binlog_write_error.inc
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# This include file is used by more than one test suite
-# (currently binlog and binlog_encryption).
-# Please check all dependent tests after modifying it
-#
-
-#
-# === Name ===
-#
-# binlog_write_error.test
-#
-# === Description ===
-#
-# This test case check if the error of writing binlog file is properly
-# reported and handled when executing statements.
-#
-# === Related Bugs ===
-#
-# BUG#37148
-#
-
-source include/have_log_bin.inc;
-source include/have_debug.inc;
-source include/have_binlog_format_mixed_or_statement.inc;
-
---echo #
---echo # Initialization
---echo #
-
-disable_warnings;
-DROP TABLE IF EXISTS t1, t2;
-DROP FUNCTION IF EXISTS f1;
-DROP FUNCTION IF EXISTS f2;
-DROP PROCEDURE IF EXISTS p1;
-DROP PROCEDURE IF EXISTS p2;
-DROP TRIGGER IF EXISTS tr1;
-DROP TRIGGER IF EXISTS tr2;
-DROP VIEW IF EXISTS v1, v2;
-enable_warnings;
-
-call mtr.add_suppression("Write to binary log failed: Error writing file*");
-
---echo #
---echo # Test injecting binlog write error when executing queries
---echo #
-
-let $query= CREATE TABLE t1 (a INT);
-source include/binlog_inject_error.inc;
-
-INSERT INTO t1 VALUES (1),(2),(3);
-
-let $query= INSERT INTO t1 VALUES (4),(5),(6);
-source include/binlog_inject_error.inc;
-
-let $query= UPDATE t1 set a=a+1;
-source include/binlog_inject_error.inc;
-
-let $query= DELETE FROM t1;
-source include/binlog_inject_error.inc;
-
-let $query= CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100);
-source include/binlog_inject_error.inc;
-
-let $query= DROP TRIGGER tr1;
-source include/binlog_inject_error.inc;
-
-let $query= ALTER TABLE t1 ADD (b INT);
-source include/binlog_inject_error.inc;
-
-let $query= CREATE VIEW v1 AS SELECT a FROM t1;
-source include/binlog_inject_error.inc;
-
-let $query= DROP VIEW v1;
-source include/binlog_inject_error.inc;
-
-let $query= CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
-source include/binlog_inject_error.inc;
-
-let $query= DROP PROCEDURE p1;
-source include/binlog_inject_error.inc;
-
-let $query= DROP TABLE t1;
-source include/binlog_inject_error.inc;
-
-let $query= CREATE FUNCTION f1() RETURNS INT return 1;
-source include/binlog_inject_error.inc;
-
-let $query= DROP FUNCTION f1;
-source include/binlog_inject_error.inc;
-
-let $query= CREATE USER user1;
-source include/binlog_inject_error.inc;
-
-let $query= REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1;
-source include/binlog_inject_error.inc;
-
-let $query= DROP USER user1;
-source include/binlog_inject_error.inc;
-
---echo #
---echo # Cleanup
---echo #
-
-disable_warnings;
-DROP TABLE IF EXISTS t1, t2;
-DROP FUNCTION IF EXISTS f1;
-DROP PROCEDURE IF EXISTS p1;
-DROP TRIGGER IF EXISTS tr1;
-DROP VIEW IF EXISTS v1, v2;
-enable_warnings;
diff --git a/mysql-test/suite/binlog/r/backup.result b/mysql-test/suite/binlog/r/backup.result
new file mode 100644
index 00000000000..5c6f8b0b515
--- /dev/null
+++ b/mysql-test/suite/binlog/r/backup.result
@@ -0,0 +1,21 @@
+#
+# Test BACKUP STAGES BLOCK_COMMIT with binary logging on
+#
+SET BINLOG_FORMAT=MIXED;
+RESET MASTER;
+create table t1 (a int) engine=aria;
+insert into t1 values (1);
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT @@gtid_binlog_pos;
+@@gtid_binlog_pos
+0-1-2
+BACKUP STAGE END;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=aria
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `test`; insert into t1 values (1)
+master-bin.000001 # Query # # COMMIT
+drop table t1;
diff --git a/mysql-test/suite/binlog/r/binlog_checkpoint_flush_logs.result b/mysql-test/suite/binlog/r/binlog_checkpoint_flush_logs.result
index 125324e2928..e861f36394c 100644
--- a/mysql-test/suite/binlog/r/binlog_checkpoint_flush_logs.result
+++ b/mysql-test/suite/binlog/r/binlog_checkpoint_flush_logs.result
@@ -17,6 +17,7 @@ ZERO
Wait for Trx_2 has rotated binlog:
SET DEBUG_SYNC= "now WAIT_FOR con_flush_ready";
SET DEBUG_SYNC= "now SIGNAL default_go";
+# restart
connection default;
Must be tree logs in the list:
show binary logs;
diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result
index 4b6b4c7fbee..f643c5a9c35 100644
--- a/mysql-test/suite/binlog/r/binlog_index.result
+++ b/mysql-test/suite/binlog/r/binlog_index.result
@@ -146,6 +146,7 @@ master-bin.000009
master-bin.000010
master-bin.000011
+# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index;
@index
@@ -172,6 +173,7 @@ master-bin.000010
master-bin.000011
master-bin.000012
+# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index;
@index
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_frag.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_frag.result
index fd0184c2ecc..5c880cd5db1 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_frag.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_frag.result
@@ -1,7 +1,7 @@
CREATE TABLE t (a TEXT);
RESET MASTER;
INSERT INTO t SET a=repeat('a', 1024);
-SELECT a from t into @a;
+SELECT a into @a from t;
FLUSH LOGS;
DELETE FROM t;
FOUND 1 /BINLOG @binlog_fragment_0, @binlog_fragment_1/ in mysqlbinlog.sql
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_suppress_O_TMPFILE.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_suppress_O_TMPFILE.result
new file mode 100644
index 00000000000..0154495f502
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_suppress_O_TMPFILE.result
@@ -0,0 +1,21 @@
+RESET MASTER;
+CREATE TABLE t(f text);
+INSERT INTO t VALUES (repeat('x',4096));
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+SELECT COUNT(*) FROM t;
+COUNT(*)
+512
+FLUSH LOGS;
+DROP TABLE t;
+# 512- Rows must be present
+include/assert.inc [Table t should have 512 rows.]
+DROP TABLE t;
+RESET MASTER;
diff --git a/mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result b/mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result
index c77f5844dc3..88ed236a528 100644
--- a/mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result
+++ b/mysql-test/suite/binlog/r/binlog_no_uniqfile_crash.result
@@ -26,6 +26,7 @@ CREATE DATABASE db2;
"re-enable the binary log."
SHOW BINARY LOGS;
ERROR HY000: You are not using binary logging
+# restart
show binary logs;
Log_name File_size
master-bin.000001 #
diff --git a/mysql-test/suite/binlog/r/binlog_recover_checksum_error.result b/mysql-test/suite/binlog/r/binlog_recover_checksum_error.result
index f65f7797d7f..c3a1af2f9c4 100644
--- a/mysql-test/suite/binlog/r/binlog_recover_checksum_error.result
+++ b/mysql-test/suite/binlog/r/binlog_recover_checksum_error.result
@@ -1,6 +1,7 @@
set @@global.binlog_checksum = CRC32;
call mtr.add_suppression("Replication event checksum verification failed");
call mtr.add_suppression("Error in Log_event::read_log_event");
+# restart: --master_verify_checksum=ON --debug_dbug=+d,corrupt_read_log_event_char
set @@global.debug_dbug = VALUE;
set @@global.master_verify_checksum = DO_CHECKSUM;
set @@global.binlog_checksum = BINLOG_CHECKSUM;
diff --git a/mysql-test/suite/binlog/r/binlog_rotate_perf.result b/mysql-test/suite/binlog/r/binlog_rotate_perf.result
new file mode 100644
index 00000000000..d2ebc56e228
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_rotate_perf.result
@@ -0,0 +1,945 @@
+connect conn1,localhost,root,,test;
+reset master;
+create database test_rotate_db;
+use test_rotate_db;
+#currrent engine=myisam
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+CREATE TABLE t1_myisam (c1 INT) ENGINE=myisam;
+insert into t1_myisam values(0),(1);
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+flush logs;
+flush logs;
+flush logs;
+# left times= 99
+flush logs;
+flush logs;
+flush logs;
+# left times= 98
+flush logs;
+flush logs;
+flush logs;
+# left times= 97
+flush logs;
+flush logs;
+flush logs;
+# left times= 96
+flush logs;
+flush logs;
+flush logs;
+# left times= 95
+flush logs;
+flush logs;
+flush logs;
+# left times= 94
+flush logs;
+flush logs;
+flush logs;
+# left times= 93
+flush logs;
+flush logs;
+flush logs;
+# left times= 92
+flush logs;
+flush logs;
+flush logs;
+# left times= 91
+flush logs;
+flush logs;
+flush logs;
+# left times= 90
+flush logs;
+flush logs;
+flush logs;
+# left times= 89
+flush logs;
+flush logs;
+flush logs;
+# left times= 88
+flush logs;
+flush logs;
+flush logs;
+# left times= 87
+flush logs;
+flush logs;
+flush logs;
+# left times= 86
+flush logs;
+flush logs;
+flush logs;
+# left times= 85
+flush logs;
+flush logs;
+flush logs;
+# left times= 84
+flush logs;
+flush logs;
+flush logs;
+# left times= 83
+flush logs;
+flush logs;
+flush logs;
+# left times= 82
+flush logs;
+flush logs;
+flush logs;
+# left times= 81
+flush logs;
+flush logs;
+flush logs;
+# left times= 80
+flush logs;
+flush logs;
+flush logs;
+# left times= 79
+flush logs;
+flush logs;
+flush logs;
+# left times= 78
+flush logs;
+flush logs;
+flush logs;
+# left times= 77
+flush logs;
+flush logs;
+flush logs;
+# left times= 76
+flush logs;
+flush logs;
+flush logs;
+# left times= 75
+flush logs;
+flush logs;
+flush logs;
+# left times= 74
+flush logs;
+flush logs;
+flush logs;
+# left times= 73
+flush logs;
+flush logs;
+flush logs;
+# left times= 72
+flush logs;
+flush logs;
+flush logs;
+# left times= 71
+flush logs;
+flush logs;
+flush logs;
+# left times= 70
+flush logs;
+flush logs;
+flush logs;
+# left times= 69
+flush logs;
+flush logs;
+flush logs;
+# left times= 68
+flush logs;
+flush logs;
+flush logs;
+# left times= 67
+flush logs;
+flush logs;
+flush logs;
+# left times= 66
+flush logs;
+flush logs;
+flush logs;
+# left times= 65
+flush logs;
+flush logs;
+flush logs;
+# left times= 64
+flush logs;
+flush logs;
+flush logs;
+# left times= 63
+flush logs;
+flush logs;
+flush logs;
+# left times= 62
+flush logs;
+flush logs;
+flush logs;
+# left times= 61
+flush logs;
+flush logs;
+flush logs;
+# left times= 60
+flush logs;
+flush logs;
+flush logs;
+# left times= 59
+flush logs;
+flush logs;
+flush logs;
+# left times= 58
+flush logs;
+flush logs;
+flush logs;
+# left times= 57
+flush logs;
+flush logs;
+flush logs;
+# left times= 56
+flush logs;
+flush logs;
+flush logs;
+# left times= 55
+flush logs;
+flush logs;
+flush logs;
+# left times= 54
+flush logs;
+flush logs;
+flush logs;
+# left times= 53
+flush logs;
+flush logs;
+flush logs;
+# left times= 52
+flush logs;
+flush logs;
+flush logs;
+# left times= 51
+flush logs;
+flush logs;
+flush logs;
+# left times= 50
+flush logs;
+flush logs;
+flush logs;
+# left times= 49
+flush logs;
+flush logs;
+flush logs;
+# left times= 48
+flush logs;
+flush logs;
+flush logs;
+# left times= 47
+flush logs;
+flush logs;
+flush logs;
+# left times= 46
+flush logs;
+flush logs;
+flush logs;
+# left times= 45
+flush logs;
+flush logs;
+flush logs;
+# left times= 44
+flush logs;
+flush logs;
+flush logs;
+# left times= 43
+flush logs;
+flush logs;
+flush logs;
+# left times= 42
+flush logs;
+flush logs;
+flush logs;
+# left times= 41
+flush logs;
+flush logs;
+flush logs;
+# left times= 40
+flush logs;
+flush logs;
+flush logs;
+# left times= 39
+flush logs;
+flush logs;
+flush logs;
+# left times= 38
+flush logs;
+flush logs;
+flush logs;
+# left times= 37
+flush logs;
+flush logs;
+flush logs;
+# left times= 36
+flush logs;
+flush logs;
+flush logs;
+# left times= 35
+flush logs;
+flush logs;
+flush logs;
+# left times= 34
+flush logs;
+flush logs;
+flush logs;
+# left times= 33
+flush logs;
+flush logs;
+flush logs;
+# left times= 32
+flush logs;
+flush logs;
+flush logs;
+# left times= 31
+flush logs;
+flush logs;
+flush logs;
+# left times= 30
+flush logs;
+flush logs;
+flush logs;
+# left times= 29
+flush logs;
+flush logs;
+flush logs;
+# left times= 28
+flush logs;
+flush logs;
+flush logs;
+# left times= 27
+flush logs;
+flush logs;
+flush logs;
+# left times= 26
+flush logs;
+flush logs;
+flush logs;
+# left times= 25
+flush logs;
+flush logs;
+flush logs;
+# left times= 24
+flush logs;
+flush logs;
+flush logs;
+# left times= 23
+flush logs;
+flush logs;
+flush logs;
+# left times= 22
+flush logs;
+flush logs;
+flush logs;
+# left times= 21
+flush logs;
+flush logs;
+flush logs;
+# left times= 20
+flush logs;
+flush logs;
+flush logs;
+# left times= 19
+flush logs;
+flush logs;
+flush logs;
+# left times= 18
+flush logs;
+flush logs;
+flush logs;
+# left times= 17
+flush logs;
+flush logs;
+flush logs;
+# left times= 16
+flush logs;
+flush logs;
+flush logs;
+# left times= 15
+flush logs;
+flush logs;
+flush logs;
+# left times= 14
+flush logs;
+flush logs;
+flush logs;
+# left times= 13
+flush logs;
+flush logs;
+flush logs;
+# left times= 12
+flush logs;
+flush logs;
+flush logs;
+# left times= 11
+flush logs;
+flush logs;
+flush logs;
+# left times= 10
+flush logs;
+flush logs;
+flush logs;
+# left times= 9
+flush logs;
+flush logs;
+flush logs;
+# left times= 8
+flush logs;
+flush logs;
+flush logs;
+# left times= 7
+flush logs;
+flush logs;
+flush logs;
+# left times= 6
+flush logs;
+flush logs;
+flush logs;
+# left times= 5
+flush logs;
+flush logs;
+flush logs;
+# left times= 4
+flush logs;
+flush logs;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000291 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+master-bin.000003 #
+master-bin.000004 #
+master-bin.000005 #
+master-bin.000006 #
+master-bin.000007 #
+master-bin.000008 #
+master-bin.000009 #
+master-bin.000010 #
+master-bin.000011 #
+master-bin.000012 #
+master-bin.000013 #
+master-bin.000014 #
+master-bin.000015 #
+master-bin.000016 #
+master-bin.000017 #
+master-bin.000018 #
+master-bin.000019 #
+master-bin.000020 #
+master-bin.000021 #
+master-bin.000022 #
+master-bin.000023 #
+master-bin.000024 #
+master-bin.000025 #
+master-bin.000026 #
+master-bin.000027 #
+master-bin.000028 #
+master-bin.000029 #
+master-bin.000030 #
+master-bin.000031 #
+master-bin.000032 #
+master-bin.000033 #
+master-bin.000034 #
+master-bin.000035 #
+master-bin.000036 #
+master-bin.000037 #
+master-bin.000038 #
+master-bin.000039 #
+master-bin.000040 #
+master-bin.000041 #
+master-bin.000042 #
+master-bin.000043 #
+master-bin.000044 #
+master-bin.000045 #
+master-bin.000046 #
+master-bin.000047 #
+master-bin.000048 #
+master-bin.000049 #
+master-bin.000050 #
+master-bin.000051 #
+master-bin.000052 #
+master-bin.000053 #
+master-bin.000054 #
+master-bin.000055 #
+master-bin.000056 #
+master-bin.000057 #
+master-bin.000058 #
+master-bin.000059 #
+master-bin.000060 #
+master-bin.000061 #
+master-bin.000062 #
+master-bin.000063 #
+master-bin.000064 #
+master-bin.000065 #
+master-bin.000066 #
+master-bin.000067 #
+master-bin.000068 #
+master-bin.000069 #
+master-bin.000070 #
+master-bin.000071 #
+master-bin.000072 #
+master-bin.000073 #
+master-bin.000074 #
+master-bin.000075 #
+master-bin.000076 #
+master-bin.000077 #
+master-bin.000078 #
+master-bin.000079 #
+master-bin.000080 #
+master-bin.000081 #
+master-bin.000082 #
+master-bin.000083 #
+master-bin.000084 #
+master-bin.000085 #
+master-bin.000086 #
+master-bin.000087 #
+master-bin.000088 #
+master-bin.000089 #
+master-bin.000090 #
+master-bin.000091 #
+master-bin.000092 #
+master-bin.000093 #
+master-bin.000094 #
+master-bin.000095 #
+master-bin.000096 #
+master-bin.000097 #
+master-bin.000098 #
+master-bin.000099 #
+master-bin.000100 #
+master-bin.000101 #
+master-bin.000102 #
+master-bin.000103 #
+master-bin.000104 #
+master-bin.000105 #
+master-bin.000106 #
+master-bin.000107 #
+master-bin.000108 #
+master-bin.000109 #
+master-bin.000110 #
+master-bin.000111 #
+master-bin.000112 #
+master-bin.000113 #
+master-bin.000114 #
+master-bin.000115 #
+master-bin.000116 #
+master-bin.000117 #
+master-bin.000118 #
+master-bin.000119 #
+master-bin.000120 #
+master-bin.000121 #
+master-bin.000122 #
+master-bin.000123 #
+master-bin.000124 #
+master-bin.000125 #
+master-bin.000126 #
+master-bin.000127 #
+master-bin.000128 #
+master-bin.000129 #
+master-bin.000130 #
+master-bin.000131 #
+master-bin.000132 #
+master-bin.000133 #
+master-bin.000134 #
+master-bin.000135 #
+master-bin.000136 #
+master-bin.000137 #
+master-bin.000138 #
+master-bin.000139 #
+master-bin.000140 #
+master-bin.000141 #
+master-bin.000142 #
+master-bin.000143 #
+master-bin.000144 #
+master-bin.000145 #
+master-bin.000146 #
+master-bin.000147 #
+master-bin.000148 #
+master-bin.000149 #
+master-bin.000150 #
+master-bin.000151 #
+master-bin.000152 #
+master-bin.000153 #
+master-bin.000154 #
+master-bin.000155 #
+master-bin.000156 #
+master-bin.000157 #
+master-bin.000158 #
+master-bin.000159 #
+master-bin.000160 #
+master-bin.000161 #
+master-bin.000162 #
+master-bin.000163 #
+master-bin.000164 #
+master-bin.000165 #
+master-bin.000166 #
+master-bin.000167 #
+master-bin.000168 #
+master-bin.000169 #
+master-bin.000170 #
+master-bin.000171 #
+master-bin.000172 #
+master-bin.000173 #
+master-bin.000174 #
+master-bin.000175 #
+master-bin.000176 #
+master-bin.000177 #
+master-bin.000178 #
+master-bin.000179 #
+master-bin.000180 #
+master-bin.000181 #
+master-bin.000182 #
+master-bin.000183 #
+master-bin.000184 #
+master-bin.000185 #
+master-bin.000186 #
+master-bin.000187 #
+master-bin.000188 #
+master-bin.000189 #
+master-bin.000190 #
+master-bin.000191 #
+master-bin.000192 #
+master-bin.000193 #
+master-bin.000194 #
+master-bin.000195 #
+master-bin.000196 #
+master-bin.000197 #
+master-bin.000198 #
+master-bin.000199 #
+master-bin.000200 #
+master-bin.000201 #
+master-bin.000202 #
+master-bin.000203 #
+master-bin.000204 #
+master-bin.000205 #
+master-bin.000206 #
+master-bin.000207 #
+master-bin.000208 #
+master-bin.000209 #
+master-bin.000210 #
+master-bin.000211 #
+master-bin.000212 #
+master-bin.000213 #
+master-bin.000214 #
+master-bin.000215 #
+master-bin.000216 #
+master-bin.000217 #
+master-bin.000218 #
+master-bin.000219 #
+master-bin.000220 #
+master-bin.000221 #
+master-bin.000222 #
+master-bin.000223 #
+master-bin.000224 #
+master-bin.000225 #
+master-bin.000226 #
+master-bin.000227 #
+master-bin.000228 #
+master-bin.000229 #
+master-bin.000230 #
+master-bin.000231 #
+master-bin.000232 #
+master-bin.000233 #
+master-bin.000234 #
+master-bin.000235 #
+master-bin.000236 #
+master-bin.000237 #
+master-bin.000238 #
+master-bin.000239 #
+master-bin.000240 #
+master-bin.000241 #
+master-bin.000242 #
+master-bin.000243 #
+master-bin.000244 #
+master-bin.000245 #
+master-bin.000246 #
+master-bin.000247 #
+master-bin.000248 #
+master-bin.000249 #
+master-bin.000250 #
+master-bin.000251 #
+master-bin.000252 #
+master-bin.000253 #
+master-bin.000254 #
+master-bin.000255 #
+master-bin.000256 #
+master-bin.000257 #
+master-bin.000258 #
+master-bin.000259 #
+master-bin.000260 #
+master-bin.000261 #
+master-bin.000262 #
+master-bin.000263 #
+master-bin.000264 #
+master-bin.000265 #
+master-bin.000266 #
+master-bin.000267 #
+master-bin.000268 #
+master-bin.000269 #
+master-bin.000270 #
+master-bin.000271 #
+master-bin.000272 #
+master-bin.000273 #
+master-bin.000274 #
+master-bin.000275 #
+master-bin.000276 #
+master-bin.000277 #
+master-bin.000278 #
+master-bin.000279 #
+master-bin.000280 #
+master-bin.000281 #
+master-bin.000282 #
+master-bin.000283 #
+master-bin.000284 #
+master-bin.000285 #
+master-bin.000286 #
+master-bin.000287 #
+master-bin.000288 #
+master-bin.000289 #
+master-bin.000290 #
+master-bin.000291 #
+reset master;
+# left times= 3
+flush logs;
+flush logs;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000003 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+reset master;
+# left times= 2
+flush logs;
+flush logs;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000003 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+reset master;
+# left times= 1
+flush logs;
+flush logs;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000003 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+reset master;
+# left times= 0
+# [engine=myisam] after first loop_times=0, show master logs results
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=10
+# restart
+# left restart times= 9
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=9
+# restart
+# left restart times= 8
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=8
+# restart
+# left restart times= 7
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=7
+# restart
+# left restart times= 6
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=6
+# restart
+# left restart times= 5
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=5
+# restart
+# left restart times= 4
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=4
+# restart
+# left restart times= 3
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=3
+# restart
+# left restart times= 2
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=2
+# restart
+# left restart times= 1
+flush logs;
+flush logs;
+#begin to restart mysqld current loop_times=1
+# restart
+# left restart times= 0
+# [engine=myisam] after second loop_times=0, show master logs results
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+master-bin.000003 #
+master-bin.000004 #
+master-bin.000005 #
+master-bin.000006 #
+master-bin.000007 #
+master-bin.000008 #
+master-bin.000009 #
+master-bin.000010 #
+master-bin.000011 #
+master-bin.000012 #
+master-bin.000013 #
+master-bin.000014 #
+master-bin.000015 #
+master-bin.000016 #
+master-bin.000017 #
+master-bin.000018 #
+master-bin.000019 #
+master-bin.000020 #
+master-bin.000021 #
+master-bin.000022 #
+master-bin.000023 #
+master-bin.000024 #
+master-bin.000025 #
+master-bin.000026 #
+master-bin.000027 #
+master-bin.000028 #
+master-bin.000029 #
+master-bin.000030 #
+master-bin.000031 #
+# ======= now try to change the log-bin config for mysqld =======
+#begin to restart mysqld
+# restart: --log-bin=new_log_bin
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+master-bin.000003 #
+master-bin.000004 #
+master-bin.000005 #
+master-bin.000006 #
+master-bin.000007 #
+master-bin.000008 #
+master-bin.000009 #
+master-bin.000010 #
+master-bin.000011 #
+master-bin.000012 #
+master-bin.000013 #
+master-bin.000014 #
+master-bin.000015 #
+master-bin.000016 #
+master-bin.000017 #
+master-bin.000018 #
+master-bin.000019 #
+master-bin.000020 #
+master-bin.000021 #
+master-bin.000022 #
+master-bin.000023 #
+master-bin.000024 #
+master-bin.000025 #
+master-bin.000026 #
+master-bin.000027 #
+master-bin.000028 #
+master-bin.000029 #
+master-bin.000030 #
+master-bin.000031 #
+new_log_bin.000001 #
+flush logs;
+flush logs;
+flush logs;
+# left times= 9
+flush logs;
+flush logs;
+flush logs;
+# left times= 8
+flush logs;
+flush logs;
+flush logs;
+# left times= 7
+flush logs;
+flush logs;
+flush logs;
+# left times= 6
+flush logs;
+flush logs;
+flush logs;
+# left times= 5
+flush logs;
+flush logs;
+flush logs;
+# left times= 4
+flush logs;
+flush logs;
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+master-bin.000003 #
+master-bin.000004 #
+master-bin.000005 #
+master-bin.000006 #
+master-bin.000007 #
+master-bin.000008 #
+master-bin.000009 #
+master-bin.000010 #
+master-bin.000011 #
+master-bin.000012 #
+master-bin.000013 #
+master-bin.000014 #
+master-bin.000015 #
+master-bin.000016 #
+master-bin.000017 #
+master-bin.000018 #
+master-bin.000019 #
+master-bin.000020 #
+master-bin.000021 #
+master-bin.000022 #
+master-bin.000023 #
+master-bin.000024 #
+master-bin.000025 #
+master-bin.000026 #
+master-bin.000027 #
+master-bin.000028 #
+master-bin.000029 #
+master-bin.000030 #
+master-bin.000031 #
+new_log_bin.000001 #
+new_log_bin.000002 #
+new_log_bin.000003 #
+new_log_bin.000004 #
+new_log_bin.000005 #
+new_log_bin.000006 #
+new_log_bin.000007 #
+new_log_bin.000008 #
+new_log_bin.000009 #
+new_log_bin.000010 #
+new_log_bin.000011 #
+new_log_bin.000012 #
+new_log_bin.000013 #
+new_log_bin.000014 #
+new_log_bin.000015 #
+new_log_bin.000016 #
+new_log_bin.000017 #
+new_log_bin.000018 #
+new_log_bin.000019 #
+new_log_bin.000020 #
+new_log_bin.000021 #
+reset master;
+# left times= 3
+flush logs;
+flush logs;
+reset master;
+# left times= 2
+flush logs;
+flush logs;
+reset master;
+# left times= 1
+flush logs;
+flush logs;
+reset master;
+# left times= 0
+# [engine=myisam] after third loop_times=0, show master logs results
+show binary logs;
+Log_name File_size
+new_log_bin.000001 #
+drop database test_rotate_db;
diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result
index 948ccee58ca..f15e2f9a0f1 100644
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result
@@ -843,9 +843,9 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
-INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
-UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
-DELETE FROM user WHERE host='localhost' AND user='@#@';
+INSERT db SET host='localhost', user='@#@', db='Just a test';
+UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
+DELETE FROM db WHERE host='localhost' AND user='@#@';
use test;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -894,18 +894,18 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test')
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
+master-bin.000001 # Annotate_rows # # INSERT db SET host='localhost', user='@#@', db='Just a test'
+master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
+master-bin.000001 # Annotate_rows # # UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # DELETE FROM user WHERE host='localhost' AND user='@#@'
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
+master-bin.000001 # Annotate_rows # # DELETE FROM db WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
drop table t1,t2,t3,tt1;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index 5016ed70242..7ef943625de 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -1,4 +1,3 @@
-drop table if exists t1;
create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
@@ -6,8 +5,6 @@ commit;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
@@ -451,9 +448,9 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
-INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
-UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
-DELETE FROM user WHERE host='localhost' AND user='@#@';
+INSERT db SET host='localhost', user='@#@', db='Just a test';
+UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
+DELETE FROM db WHERE host='localhost' AND user='@#@';
use test;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -501,15 +498,14 @@ master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `mysql`; INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test')
+master-bin.000001 # Query # # use `mysql`; INSERT db SET host='localhost', user='@#@', db='Just a test'
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Query # # use `mysql`; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Query # # use `mysql`; DELETE FROM db WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Rotate # # master-bin.000002;pos=POS
drop table t1,t2,t3,tt1;
reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
diff --git a/mysql-test/suite/binlog/r/binlog_write_error.result b/mysql-test/suite/binlog/r/binlog_write_error.result
index 7e8e373c797..46a233718d9 100644
--- a/mysql-test/suite/binlog/r/binlog_write_error.result
+++ b/mysql-test/suite/binlog/r/binlog_write_error.result
@@ -1,14 +1,3 @@
-#
-# Initialization
-#
-DROP TABLE IF EXISTS t1, t2;
-DROP FUNCTION IF EXISTS f1;
-DROP FUNCTION IF EXISTS f2;
-DROP PROCEDURE IF EXISTS p1;
-DROP PROCEDURE IF EXISTS p2;
-DROP TRIGGER IF EXISTS tr1;
-DROP TRIGGER IF EXISTS tr2;
-DROP VIEW IF EXISTS v1, v2;
call mtr.add_suppression("Write to binary log failed: Error writing file*");
#
# Test injecting binlog write error when executing queries
@@ -112,15 +101,13 @@ ERROR HY000: Error writing file 'master-bin' ((errno: #)
set @@global.debug_dbug = @saved_dbug;
set @saved_dbug = @@global.debug_dbug;
SET GLOBAL debug_dbug='d,injecting_fault_writing';
+SET PASSWORD FOR user1=PASSWORD('foobar');
+SET PASSWORD FOR user1=PASSWORD('foobar');
+ERROR HY000: Error writing file 'master-bin' ((errno: #)
+set @@global.debug_dbug = @saved_dbug;
+set @saved_dbug = @@global.debug_dbug;
+SET GLOBAL debug_dbug='d,injecting_fault_writing';
DROP USER user1;
DROP USER user1;
ERROR HY000: Error writing file 'master-bin' ((errno: #)
set @@global.debug_dbug = @saved_dbug;
-#
-# Cleanup
-#
-DROP TABLE IF EXISTS t1, t2;
-DROP FUNCTION IF EXISTS f1;
-DROP PROCEDURE IF EXISTS p1;
-DROP TRIGGER IF EXISTS tr1;
-DROP VIEW IF EXISTS v1, v2;
diff --git a/mysql-test/suite/binlog/r/read_only.result b/mysql-test/suite/binlog/r/read_only.result
index 8aaad55684b..9a173d9a96e 100644
--- a/mysql-test/suite/binlog/r/read_only.result
+++ b/mysql-test/suite/binlog/r/read_only.result
@@ -16,6 +16,7 @@ insert into t1 values(3);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
check table t1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/binlog/r/read_only_statement.result b/mysql-test/suite/binlog/r/read_only_statement.result
index 8aaad55684b..9a173d9a96e 100644
--- a/mysql-test/suite/binlog/r/read_only_statement.result
+++ b/mysql-test/suite/binlog/r/read_only_statement.result
@@ -16,6 +16,7 @@ insert into t1 values(3);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
check table t1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/binlog/r/show_concurrent_rotate.result b/mysql-test/suite/binlog/r/show_concurrent_rotate.result
new file mode 100644
index 00000000000..b830b75eeef
--- /dev/null
+++ b/mysql-test/suite/binlog/r/show_concurrent_rotate.result
@@ -0,0 +1,17 @@
+connect con1,localhost,root,,;
+FLUSH LOGS;
+FLUSH LOGS;
+FLUSH LOGS;
+SET DEBUG_SYNC= "at_after_lock_index SIGNAL con1_ready WAIT_FOR con1_go";
+SHOW BINARY LOGS;
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
+RESET MASTER;
+FLUSH LOGS;
+SET DEBUG_SYNC= "now SIGNAL con1_go";
+connection con1;
+# The correct result must consists of two records
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+SET debug_sync = 'reset';
diff --git a/mysql-test/suite/binlog/t/backup.test b/mysql-test/suite/binlog/t/backup.test
new file mode 100644
index 00000000000..e1d921c787e
--- /dev/null
+++ b/mysql-test/suite/binlog/t/backup.test
@@ -0,0 +1,19 @@
+--source include/have_log_bin.inc
+--source include/have_binlog_format_mixed.inc
+
+--echo #
+--echo # Test BACKUP STAGES BLOCK_COMMIT with binary logging on
+--echo #
+
+SET BINLOG_FORMAT=MIXED;
+RESET MASTER;
+
+create table t1 (a int) engine=aria;
+insert into t1 values (1);
+
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT @@gtid_binlog_pos;
+BACKUP STAGE END;
+source include/show_binlog_events.inc;
+drop table t1;
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test
index 9f79deea3db..3e18ef1e351 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test
@@ -7,7 +7,7 @@ CREATE TABLE t (a TEXT);
# events of interest are guaranteed to stay in 000001 log
RESET MASTER;
--eval INSERT INTO t SET a=repeat('a', 1024)
-SELECT a from t into @a;
+SELECT a into @a from t;
FLUSH LOGS;
DELETE FROM t;
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_suppress_O_TMPFILE.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_suppress_O_TMPFILE.test
new file mode 100644
index 00000000000..c97269a8ad8
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_suppress_O_TMPFILE.test
@@ -0,0 +1,51 @@
+# ==== Purpose ====
+#
+# Suppress the following informational note that gets printed to standard
+# error when O_TMPFILE flag is not supported by underlying operating system.
+#
+# Note: ../client/mysqlbinlog: O_TMPFILE is not supported on /tmp (disabling
+# future attempts)
+#
+# Step 1: Generate a binarylog file with a size greater than 1MB.
+# Step 2: Use mysqlbinlog tool to generate sql file and redirect the standard
+# error to standard output (2>&1)
+# Step 3: Source the generated sql file as inpurt to mysql client, observe no
+# syntax error is reported.
+#
+# ==== References ====
+#
+# MDEV-23846: O_TMPFILE error in mysqlbinlog stream output breaks restore
+#
+--source include/have_binlog_format_row.inc
+
+RESET MASTER;
+CREATE TABLE t(f text);
+INSERT INTO t VALUES (repeat('x',4096));
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+INSERT INTO t SELECT * FROM t;
+SELECT COUNT(*) FROM t;
+FLUSH LOGS;
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql 2>&1
+#
+# Clear database and restore from binlog
+#
+DROP TABLE t;
+
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
+
+--echo # 512- Rows must be present
+--let $assert_cond= COUNT(*) = 512 FROM t
+--let $assert_text= Table t should have 512 rows.
+--source include/assert.inc
+
+DROP TABLE t;
+RESET MASTER;
diff --git a/mysql-test/suite/binlog/t/binlog_rotate_perf.test b/mysql-test/suite/binlog/t/binlog_rotate_perf.test
new file mode 100644
index 00000000000..74c91feca97
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_rotate_perf.test
@@ -0,0 +1,102 @@
+# ==== Purpose ====
+#
+# functional test for open_binlog call using when
+#
+# flush log reset master/slave called
+#
+# ==== Related ====
+#
+# TXSQL feature 67 binlog rotate perf optimization
+
+let $engine= myisam;
+
+--source include/have_binlog_format_row.inc
+--connect(conn1,localhost,root,,test)
+
+reset master;
+create database test_rotate_db;
+use test_rotate_db;
+--echo #currrent engine=$engine
+# Create a new table
+--replace_column 2 #
+show binary logs;
+--eval CREATE TABLE t1_$engine (c1 INT) ENGINE=$engine
+--eval insert into t1_$engine values(0),(1)
+
+# do batch flush and show
+let $loop_times= 100;
+--source include/show_master_status.inc
+while ($loop_times) {
+ flush logs;
+ flush logs;
+ if ($loop_times < 5)
+ {
+ --source include/show_master_status.inc
+ if ($loop_times == 4)
+ {
+ --source include/show_binary_logs.inc
+ }
+ reset master;
+ }
+ if ($loop_times >= 5)
+ {
+ flush logs;
+ }
+
+ #
+ dec $loop_times;
+ --echo # left times= $loop_times
+}
+--echo # [engine=$engine] after first loop_times=$loop_times, show master logs results
+--source include/show_binary_logs.inc
+
+# do batch flush and show with restart mysql
+--source include/show_master_status.inc
+let $loop_times= 10;
+while ($loop_times) {
+ flush logs;
+ flush logs;
+ --echo #begin to restart mysqld current loop_times=$loop_times
+ --source include/restart_mysqld.inc
+ #
+ dec $loop_times;
+ --echo # left restart times= $loop_times
+}
+--echo # [engine=$engine] after second loop_times=$loop_times, show master logs results
+--source include/show_binary_logs.inc
+
+
+# try to change the log-bin configs and restart
+--echo # ======= now try to change the log-bin config for mysqld =======
+--let $restart_parameters="--log-bin=new_log_bin"
+--echo #begin to restart mysqld
+--source include/restart_mysqld.inc
+--let $restart_parameters= ""
+
+--source include/show_binary_logs.inc
+let $loop_times= 10;
+while ($loop_times) {
+ flush logs;
+ flush logs;
+ if ($loop_times < 5)
+ {
+ if ($loop_times == 4)
+ {
+ --source include/show_binary_logs.inc
+ }
+ reset master;
+ }
+ if ($loop_times >= 5)
+ {
+ flush logs;
+ }
+
+ #
+ dec $loop_times;
+ --echo # left times= $loop_times
+}
+--echo # [engine=$engine] after third loop_times=$loop_times, show master logs results
+--source include/show_binary_logs.inc
+
+##cleanup
+drop database test_rotate_db;
diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog.test b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
index c3d8066f807..e9c8e0ed874 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_binlog.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
@@ -3,10 +3,6 @@
let collation=utf8_unicode_ci;
--source include/have_collation.inc
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
# REQUIREMENT
# replace_regex should replace output of SHOW BINLOG EVENTS
diff --git a/mysql-test/suite/binlog/t/binlog_write_error.test b/mysql-test/suite/binlog/t/binlog_write_error.test
index d66efb0bcf3..bd1cb5301b3 100644
--- a/mysql-test/suite/binlog/t/binlog_write_error.test
+++ b/mysql-test/suite/binlog/t/binlog_write_error.test
@@ -1 +1,84 @@
---source include/binlog_write_error.inc
+#
+# This file is included by binlog_encryption.binlog_write_error
+# Please check all dependent tests after modifying it
+#
+
+#
+# === Name ===
+#
+# binlog_write_error.test
+#
+# === Description ===
+#
+# This test case check if the error of writing binlog file is properly
+# reported and handled when executing statements.
+#
+# === Related Bugs ===
+#
+# BUG#37148
+#
+
+source include/have_debug.inc;
+source include/have_binlog_format_mixed_or_statement.inc;
+
+call mtr.add_suppression("Write to binary log failed: Error writing file*");
+
+--echo #
+--echo # Test injecting binlog write error when executing queries
+--echo #
+
+let $query= CREATE TABLE t1 (a INT);
+source include/binlog_inject_error.inc;
+
+INSERT INTO t1 VALUES (1),(2),(3);
+
+let $query= INSERT INTO t1 VALUES (4),(5),(6);
+source include/binlog_inject_error.inc;
+
+let $query= UPDATE t1 set a=a+1;
+source include/binlog_inject_error.inc;
+
+let $query= DELETE FROM t1;
+source include/binlog_inject_error.inc;
+
+let $query= CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100);
+source include/binlog_inject_error.inc;
+
+let $query= DROP TRIGGER tr1;
+source include/binlog_inject_error.inc;
+
+let $query= ALTER TABLE t1 ADD (b INT);
+source include/binlog_inject_error.inc;
+
+let $query= CREATE VIEW v1 AS SELECT a FROM t1;
+source include/binlog_inject_error.inc;
+
+let $query= DROP VIEW v1;
+source include/binlog_inject_error.inc;
+
+let $query= CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
+source include/binlog_inject_error.inc;
+
+let $query= DROP PROCEDURE p1;
+source include/binlog_inject_error.inc;
+
+let $query= DROP TABLE t1;
+source include/binlog_inject_error.inc;
+
+let $query= CREATE FUNCTION f1() RETURNS INT return 1;
+source include/binlog_inject_error.inc;
+
+let $query= DROP FUNCTION f1;
+source include/binlog_inject_error.inc;
+
+let $query= CREATE USER user1;
+source include/binlog_inject_error.inc;
+
+let $query= REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1;
+source include/binlog_inject_error.inc;
+
+let $query= SET PASSWORD FOR user1=PASSWORD('foobar');
+source include/binlog_inject_error.inc;
+
+let $query= DROP USER user1;
+source include/binlog_inject_error.inc;
diff --git a/mysql-test/suite/binlog/t/show_concurrent_rotate.test b/mysql-test/suite/binlog/t/show_concurrent_rotate.test
new file mode 100644
index 00000000000..b5758e3a883
--- /dev/null
+++ b/mysql-test/suite/binlog/t/show_concurrent_rotate.test
@@ -0,0 +1,29 @@
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+# mere to limit it run rate
+--source include/have_binlog_format_row.inc
+
+connect(con1,localhost,root,,);
+FLUSH LOGS;
+FLUSH LOGS;
+FLUSH LOGS;
+
+# This forced synchronization pattern ensures con1 will execute its retry
+# path. More specifically, con1 should see that the cache of log files it
+# creates during SHOW BINARY LOGS becomes invalidated after con2 completes
+# RESET MASTER.
+SET DEBUG_SYNC= "at_after_lock_index SIGNAL con1_ready WAIT_FOR con1_go";
+--send SHOW BINARY LOGS
+
+connect(con2,localhost,root,,);
+SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
+RESET MASTER;
+FLUSH LOGS;
+SET DEBUG_SYNC= "now SIGNAL con1_go";
+
+--connection con1
+--echo # The correct result must consists of two records
+--replace_column 2 #
+--reap
+
+SET debug_sync = 'reset';
diff --git a/mysql-test/suite/binlog_encryption/binlog_index.result b/mysql-test/suite/binlog_encryption/binlog_index.result
index 4b6b4c7fbee..f643c5a9c35 100644
--- a/mysql-test/suite/binlog_encryption/binlog_index.result
+++ b/mysql-test/suite/binlog_encryption/binlog_index.result
@@ -146,6 +146,7 @@ master-bin.000009
master-bin.000010
master-bin.000011
+# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index;
@index
@@ -172,6 +173,7 @@ master-bin.000010
master-bin.000011
master-bin.000012
+# restart
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
SELECT @index;
@index
diff --git a/mysql-test/suite/binlog_encryption/binlog_write_error.result b/mysql-test/suite/binlog_encryption/binlog_write_error.result
index 7e8e373c797..46a233718d9 100644
--- a/mysql-test/suite/binlog_encryption/binlog_write_error.result
+++ b/mysql-test/suite/binlog_encryption/binlog_write_error.result
@@ -1,14 +1,3 @@
-#
-# Initialization
-#
-DROP TABLE IF EXISTS t1, t2;
-DROP FUNCTION IF EXISTS f1;
-DROP FUNCTION IF EXISTS f2;
-DROP PROCEDURE IF EXISTS p1;
-DROP PROCEDURE IF EXISTS p2;
-DROP TRIGGER IF EXISTS tr1;
-DROP TRIGGER IF EXISTS tr2;
-DROP VIEW IF EXISTS v1, v2;
call mtr.add_suppression("Write to binary log failed: Error writing file*");
#
# Test injecting binlog write error when executing queries
@@ -112,15 +101,13 @@ ERROR HY000: Error writing file 'master-bin' ((errno: #)
set @@global.debug_dbug = @saved_dbug;
set @saved_dbug = @@global.debug_dbug;
SET GLOBAL debug_dbug='d,injecting_fault_writing';
+SET PASSWORD FOR user1=PASSWORD('foobar');
+SET PASSWORD FOR user1=PASSWORD('foobar');
+ERROR HY000: Error writing file 'master-bin' ((errno: #)
+set @@global.debug_dbug = @saved_dbug;
+set @saved_dbug = @@global.debug_dbug;
+SET GLOBAL debug_dbug='d,injecting_fault_writing';
DROP USER user1;
DROP USER user1;
ERROR HY000: Error writing file 'master-bin' ((errno: #)
set @@global.debug_dbug = @saved_dbug;
-#
-# Cleanup
-#
-DROP TABLE IF EXISTS t1, t2;
-DROP FUNCTION IF EXISTS f1;
-DROP PROCEDURE IF EXISTS p1;
-DROP TRIGGER IF EXISTS tr1;
-DROP VIEW IF EXISTS v1, v2;
diff --git a/mysql-test/suite/binlog_encryption/binlog_write_error.test b/mysql-test/suite/binlog_encryption/binlog_write_error.test
index 68e59655eab..8add24da984 100644
--- a/mysql-test/suite/binlog_encryption/binlog_write_error.test
+++ b/mysql-test/suite/binlog_encryption/binlog_write_error.test
@@ -1 +1 @@
---source suite/binlog/include/binlog_write_error.inc
+--source suite/binlog/t/binlog_write_error.test
diff --git a/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.test b/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.test
index eec72d64066..1e1b0cbd353 100644
--- a/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.test
+++ b/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.test
@@ -65,7 +65,7 @@ INSERT INTO table1_no_encryption SELECT NULL,NOW(),b FROM table1_no_encryption;
--echo # Part 2: restart master, now with binlog encryption
--echo #####################################################
---let $rpl_server_parameters= --encrypt-binlog=1 --plugin-load-add=$FILE_KEY_MANAGEMENT_SO --file-key-management --loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
+--let $rpl_server_parameters= --encrypt-binlog=1 --plugin-load-add=file_key_management --file-key-management --loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
--let $rpl_server_number= 1
--source restart_server.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result
index 79efad1a27a..b75a66a634a 100644
--- a/mysql-test/suite/binlog_encryption/rpl_parallel.result
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel.result
@@ -1519,6 +1519,7 @@ SET SESSION debug_dbug="+d,binlog_force_commit_id";
SET @commit_id= 10000;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
INSERT INTO t3 VALUES (120, 0);
SET @commit_id= 10001;
diff --git a/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result b/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result
index 2f7f1b07cb4..936f604be2e 100644
--- a/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result
@@ -140,7 +140,7 @@ create table t4 select * from t1 where 3 in (select 1 union select 2 union selec
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
-Warning 1292 Incorrect datetime value: '3'
+Warning 1292 Truncated incorrect datetime value: '3'
insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
create procedure foo()
begin
diff --git a/mysql-test/suite/compat/mssql/parser.result b/mysql-test/suite/compat/mssql/parser.result
new file mode 100644
index 00000000000..817439a826c
--- /dev/null
+++ b/mysql-test/suite/compat/mssql/parser.result
@@ -0,0 +1,87 @@
+SET sql_mode=MSSQL;
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-19142 sql_mode=MSSQL: Bracket identifiers
+#
+SELECT 'test' AS [[];
+[
+test
+SELECT 'test' AS []]];
+]
+test
+SELECT 'test' AS [[a]]];
+[a]
+test
+SELECT 'test' AS [\n];
+\n
+test
+CREATE TABLE [t 1] ([a b] INT);
+SHOW CREATE TABLE [t 1];
+Table Create Table
+t 1 CREATE TABLE "t 1" (
+ "a b" int(11) DEFAULT NULL
+)
+INSERT INTO [t 1] VALUES (10);
+SELECT [a b] FROM [t 1];
+a b
+10
+SELECT [a b] [a b alias] FROM [t 1] [t 1 alias];
+a b alias
+10
+SELECT [a b] FROM [test].[t 1];
+a b
+10
+SELECT [a b], COUNT(*) FROM [t 1] GROUP BY [a b];
+a b COUNT(*)
+10 1
+SELECT [a b], COUNT(*) FROM [t 1] GROUP BY [a b] HAVING [a b]>0;
+a b COUNT(*)
+10 1
+DROP TABLE [t 1];
+CREATE TABLE [t[1]]] (a INT);
+SHOW CREATE TABLE [t[1]]];
+Table Create Table
+t[1] CREATE TABLE "t[1]" (
+ "a" int(11) DEFAULT NULL
+)
+DROP TABLE [t[1]]];
+CREATE TABLE [t 1] ([a b] INT);
+CREATE VIEW [v 1] AS SELECT [a b] FROM [t 1];
+SHOW CREATE VIEW [v 1];
+View Create View character_set_client collation_connection
+v 1 CREATE VIEW "v 1" AS select "t 1"."a b" AS "a b" from "t 1" latin1 latin1_swedish_ci
+SELECT * FROM [v 1];
+a b
+DROP VIEW [v 1];
+DROP TABLE [t 1];
+CREATE PROCEDURE [p 1]()
+BEGIN
+SELECT 'test' [a b];
+END;
+$$
+SHOW CREATE PROCEDURE [p 1];
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+p 1 PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MSSQL,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS CREATE DEFINER="root"@"localhost" PROCEDURE "p 1"()
+BEGIN
+SELECT 'test' [a b];
+END latin1 latin1_swedish_ci latin1_swedish_ci
+CALL [p 1];
+a b
+test
+DROP PROCEDURE [p 1];
+CREATE TABLE [t1] ([a] INT);
+INSERT INTO t1 VALUES (10);
+PREPARE [stmt] FROM 'SELECT [a] FROM [test].[t1]';
+EXECUTE [stmt];
+a
+10
+DEALLOCATE PREPARE [stmt];
+EXECUTE IMMEDIATE 'SELECT [a] FROM [test].[t1]';
+a
+10
+DROP TABLE [t1];
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/compat/mssql/parser.test b/mysql-test/suite/compat/mssql/parser.test
new file mode 100644
index 00000000000..59c6735c6c2
--- /dev/null
+++ b/mysql-test/suite/compat/mssql/parser.test
@@ -0,0 +1,68 @@
+SET sql_mode=MSSQL;
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-19142 sql_mode=MSSQL: Bracket identifiers
+--echo #
+
+# Brackets inside bracket identifiers:
+# - When we want a left bracket inside a bracket identifier,
+# we just add a single left bracket: [
+# - When we want a right bracket inside a bracket identifier,
+# we add two right brackets: ]]
+
+
+SELECT 'test' AS [[];
+SELECT 'test' AS []]];
+SELECT 'test' AS [[a]]];
+
+# Backslash has no special meaning
+SELECT 'test' AS [\n];
+
+
+CREATE TABLE [t 1] ([a b] INT);
+SHOW CREATE TABLE [t 1];
+INSERT INTO [t 1] VALUES (10);
+SELECT [a b] FROM [t 1];
+SELECT [a b] [a b alias] FROM [t 1] [t 1 alias];
+SELECT [a b] FROM [test].[t 1];
+SELECT [a b], COUNT(*) FROM [t 1] GROUP BY [a b];
+SELECT [a b], COUNT(*) FROM [t 1] GROUP BY [a b] HAVING [a b]>0;
+DROP TABLE [t 1];
+
+CREATE TABLE [t[1]]] (a INT);
+SHOW CREATE TABLE [t[1]]];
+DROP TABLE [t[1]]];
+
+CREATE TABLE [t 1] ([a b] INT);
+CREATE VIEW [v 1] AS SELECT [a b] FROM [t 1];
+SHOW CREATE VIEW [v 1];
+SELECT * FROM [v 1];
+DROP VIEW [v 1];
+DROP TABLE [t 1];
+
+DELIMITER $$;
+CREATE PROCEDURE [p 1]()
+BEGIN
+ SELECT 'test' [a b];
+END;
+$$
+DELIMITER ;$$
+SHOW CREATE PROCEDURE [p 1];
+CALL [p 1];
+DROP PROCEDURE [p 1];
+
+CREATE TABLE [t1] ([a] INT);
+INSERT INTO t1 VALUES (10);
+PREPARE [stmt] FROM 'SELECT [a] FROM [test].[t1]';
+EXECUTE [stmt];
+DEALLOCATE PREPARE [stmt];
+EXECUTE IMMEDIATE 'SELECT [a] FROM [test].[t1]';
+DROP TABLE [t1];
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/suite/compat/oracle/r/column_compression.result b/mysql-test/suite/compat/oracle/r/column_compression.result
index 7a12c7b8233..8f643ad2a06 100644
--- a/mysql-test/suite/compat/oracle/r/column_compression.result
+++ b/mysql-test/suite/compat/oracle/r/column_compression.result
@@ -24,7 +24,7 @@ d TINYTEXT COMPRESSED BINARY
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
- "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+ "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid("a")),
"b" varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
"c" varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
"d" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
diff --git a/mysql-test/suite/compat/oracle/r/custom_aggregate_functions.result b/mysql-test/suite/compat/oracle/r/custom_aggregate_functions.result
new file mode 100644
index 00000000000..21fac1939bc
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/r/custom_aggregate_functions.result
@@ -0,0 +1,136 @@
+SET sql_mode=ORACLE;
+create aggregate function f1(x INT) return INT AS
+begin
+insert into t1(sal) values (x);
+return x;
+end|
+ERROR HY000: Aggregate specific instruction(FETCH GROUP NEXT ROW) missing from the aggregate function
+create function f1(x INT) return INT AS
+begin
+set x=5;
+fetch group next row;
+return x+1;
+end |
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE TABLE marks(stud_id INT, grade_count INT);
+INSERT INTO marks VALUES (1,6), (2,4), (3,7), (4,5), (5,8);
+SELECT * FROM marks;
+stud_id grade_count
+1 6
+2 4
+3 7
+4 5
+5 8
+# Using PL/SQL syntax: EXCEPTION WHEN NO_DATA_FOUND
+CREATE AGGREGATE FUNCTION IF NOT EXISTS aggregate_count(x INT) RETURN INT AS
+count_students INT DEFAULT 0;
+BEGIN
+LOOP
+FETCH GROUP NEXT ROW;
+IF x THEN
+count_students:= count_students + 1;
+END IF;
+END LOOP;
+EXCEPTION
+WHEN NO_DATA_FOUND THEN
+RETURN count_students;
+END aggregate_count //
+SELECT aggregate_count(stud_id) FROM marks;
+aggregate_count(stud_id)
+5
+DROP FUNCTION IF EXISTS aggregate_count;
+# Using SQL/PSM systax: CONTINUE HANDLER
+CREATE AGGREGATE FUNCTION IF NOT EXISTS aggregate_count(x INT) RETURN INT AS
+count_students INT DEFAULT 0;
+CONTINUE HANDLER FOR NOT FOUND RETURN count_students;
+BEGIN
+LOOP
+FETCH GROUP NEXT ROW;
+IF x THEN
+SET count_students= count_students + 1;
+END IF;
+END LOOP;
+END //
+SELECT aggregate_count(stud_id) FROM marks;
+aggregate_count(stud_id)
+5
+DROP FUNCTION IF EXISTS aggregate_count;
+DROP TABLE marks;
+#
+# MDEV-18813 PROCEDURE and anonymous blocks silently ignore FETCH GROUP NEXT ROW
+#
+CREATE PROCEDURE p1 AS
+BEGIN
+FETCH GROUP NEXT ROW;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+BEGIN NOT ATOMIC
+FETCH GROUP NEXT ROW;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE DEFINER=root@localhost FUNCTION f1 RETURN INT AS
+BEGIN
+FETCH GROUP NEXT ROW;
+RETURN 0;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER tr1
+AFTER INSERT ON t1 FOR EACH ROW
+FETCH GROUP NEXT ROW;
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+DROP TABLE t1;
+CREATE EVENT ev1
+ON SCHEDULE EVERY 1 HOUR
+STARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH
+ENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK
+DO FETCH GROUP NEXT ROW;
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE PACKAGE pkg1 AS
+PROCEDURE p1;
+FUNCTION f1 RETURN INT;
+END;
+$$
+CREATE PACKAGE BODY pkg1 AS
+PROCEDURE p1 AS
+BEGIN
+FETCH GROUP NEXT ROW; -- In a package procedure
+END;
+FUNCTION f1 RETURN INT AS
+BEGIN
+RETURN 0;
+END;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE PACKAGE BODY pkg1 AS
+PROCEDURE p1 AS
+BEGIN
+NULL;
+END;
+FUNCTION f1 RETURN INT AS
+BEGIN
+FETCH GROUP NEXT ROW; -- In a package function
+RETURN 0;
+END;
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+CREATE PACKAGE BODY pkg1 AS
+PROCEDURE p1 AS
+BEGIN
+NULL;
+END;
+FUNCTION f1 RETURN INT AS
+BEGIN
+RETURN 0;
+END;
+BEGIN
+FETCH GROUP NEXT ROW; -- In a package executable section
+END;
+$$
+ERROR HY000: Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context
+DROP PACKAGE pkg1;
diff --git a/mysql-test/suite/compat/oracle/r/parser.result b/mysql-test/suite/compat/oracle/r/parser.result
index 0b573027c6d..2d9416d59c1 100644
--- a/mysql-test/suite/compat/oracle/r/parser.result
+++ b/mysql-test/suite/compat/oracle/r/parser.result
@@ -643,3 +643,118 @@ END;
#
# End of 10.3 tests
#
+#
+# MDEV-21998: Server crashes in st_select_lex::add_table_to_list
+# upon mix of KILL and sequences
+#
+KILL ( SELECT 1 ) + LASTVAL(s);
+ERROR 42000: KILL does not support subqueries or stored functions
+KILL LASTVAL(s);
+ERROR 42000: KILL does not support subqueries or stored functions
+#
+# MDEV-23094: Multiple calls to a Stored Procedure from another
+# Stored Procedure crashes server
+#
+create table t1 (id1 int primary key, data1 int);
+create table t2 (id2 int primary key, data2 int);
+create procedure p1(id int,dt int) as
+begin
+if (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt))
+then
+select 1;
+end if;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(id int, dt int) as
+begin
+case (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt))
+when 1 then
+select 1;
+else
+select 0;
+end case;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(id int, dt int) as
+begin
+declare wcont int default 1;
+begin
+while (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt)) and wcont
+loop
+select 1;
+set wcont=0;
+end loop;
+end;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(id int, dt int) as
+begin
+declare count int default 1;
+begin
+repeat
+select 1;
+set count=count+1;
+until (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt)) and
+count < 3
+end repeat;
+end;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+create procedure p1(id int, dt int) as
+begin
+for i in 1..(exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt))
+loop
+select 1;
+end loop;
+end //
+call p1(1,2);
+1
+1
+call p1(1,2);
+1
+1
+drop procedure p1;
+set sql_mode=ORACLE;
+create or replace procedure p1(id int, dt int) as
+begin
+while (1)
+loop
+exit when (exists(select * from t1 where id1 = id and data1 = dt) or
+not exists (select * from t2 where id2 = id and data2 = dt));
+end loop;
+end;
+//
+call p1(1,2);
+call p1(1,2);
+drop procedure p1;
+drop table t1,t2;
+# End of 10.4 tests
diff --git a/mysql-test/suite/compat/oracle/r/plugin.result b/mysql-test/suite/compat/oracle/r/plugin.result
new file mode 100644
index 00000000000..c885c03e656
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/r/plugin.result
@@ -0,0 +1,48 @@
+SET sql_mode=ORACLE;
+#
+# MDEV-16294: INSTALL PLUGIN IF NOT EXISTS / UNINSTALL PLUGIN IF EXISTS
+#
+# INSTALL IF NOT EXISTS PLUGIN name SONAME library /
+# UNINSTALL IF EXISTS PLUGIN|SONAME name
+#
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+EXAMPLE ACTIVE STORAGE ENGINE
+INSTALL PLUGIN example SONAME 'ha_example';
+ERROR HY000: Plugin 'example' already installed
+INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
+Warnings:
+Note 1968 Plugin 'example' already installed
+SHOW WARNINGS;
+Level Code Message
+Note 1968 Plugin 'example' already installed
+UNINSTALL PLUGIN IF EXISTS example;
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+UNINSTALL PLUGIN IF EXISTS example;
+Warnings:
+Note 1305 PLUGIN example does not exist
+SHOW WARNINGS;
+Level Code Message
+Note 1305 PLUGIN example does not exist
+UNINSTALL PLUGIN example;
+ERROR 42000: PLUGIN example does not exist
+INSTALL SONAME 'ha_example';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+EXAMPLE ACTIVE STORAGE ENGINE
+UNUSABLE ACTIVE DAEMON
+UNINSTALL SONAME IF EXISTS 'ha_example';
+UNINSTALL SONAME IF EXISTS 'ha_example';
+Warnings:
+Note 1305 SONAME ha_example.so does not exist
+SHOW WARNINGS;
+Level Code Message
+Note 1305 SONAME ha_example.so does not exist
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE
+UNINSTALL SONAME 'ha_example';
+ERROR 42000: SONAME ha_example.so does not exist
diff --git a/mysql-test/suite/compat/oracle/r/ps.result b/mysql-test/suite/compat/oracle/r/ps.result
index 158d15e9f90..818c97b06ab 100644
--- a/mysql-test/suite/compat/oracle/r/ps.result
+++ b/mysql-test/suite/compat/oracle/r/ps.result
@@ -47,7 +47,7 @@ EXECUTE stmt USING @a, @b;
#
PREPARE stmt FROM 'SELECT :1 FROM DUAL';
EXECUTE stmt USING (SELECT 1);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
DEALLOCATE PREPARE stmt;
CREATE FUNCTION f1() RETURN VARCHAR
AS
@@ -155,7 +155,7 @@ DROP TABLE t1;
# Testing disallowed expressions in USING
#
EXECUTE IMMEDIATE 'SELECT :1 FROM DUAL' USING (SELECT 1);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
CREATE FUNCTION f1() RETURN VARCHAR
AS
BEGIN
@@ -163,7 +163,7 @@ RETURN 'test';
END;
$$
EXECUTE IMMEDIATE 'SELECT ? FROM DUAL' USING f1();
-ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
DROP FUNCTION f1;
#
# Testing simple expressions
@@ -182,9 +182,9 @@ ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2
PREPARE stmt FROM _latin1'SELECT 1 AS c FROM ' || _latin2 'DUAL';
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat_operator_oracle'
EXECUTE IMMEDIATE (SELECT 'SELECT 1');
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 'SELECT 1')' at line 1
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
PREPARE stmt FROM (SELECT 'SELECT 1');
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 'SELECT 1')' at line 1
+ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
EXECUTE IMMEDIATE a;
ERROR 42S22: Unknown column 'a' in 'field list'
PREPARE stmt FROM a;
diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result
index a60bbc38883..31d794c9f61 100644
--- a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result
+++ b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result
@@ -1045,7 +1045,7 @@ NULL;
END LOOP;
END;
$$
-ERROR 42000: Undefined CURSOR: c2
+ERROR 42000: Undeclared variable: c2
# Make sure "rec" shadows other declarations outside the loop
CREATE TABLE t1 (a INT, b VARCHAR(10));
INSERT INTO t1 VALUES (10, 'b0');
diff --git a/mysql-test/suite/compat/oracle/r/sp-package-innodb.result b/mysql-test/suite/compat/oracle/r/sp-package-innodb.result
index 50eb2dc6cd0..0ac357df5da 100644
--- a/mysql-test/suite/compat/oracle/r/sp-package-innodb.result
+++ b/mysql-test/suite/compat/oracle/r/sp-package-innodb.result
@@ -23,6 +23,8 @@ a:=a+1;
INSERT INTO t1 VALUES (a,'pkg1 initialization');
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL pkg1.p1;
SELECT * FROM t1 ORDER BY a;
a routine
diff --git a/mysql-test/suite/compat/oracle/r/sp-package-mdl.result b/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
index 18cc834461c..bb46341f202 100644
--- a/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
+++ b/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
@@ -61,8 +61,8 @@ TABLE_NAME pkg1.p1
CONN 2
INFO DROP PACKAGE pkg1
STATE Waiting for stored package body metadata lock
-LOCK_MODE MDL_INTENTION_EXCLUSIVE
-LOCK_TYPE Global read lock
+LOCK_MODE MDL_BACKUP_DDL
+LOCK_TYPE Backup lock
TABLE_NAME
CONN 2
INFO DROP PACKAGE pkg1
diff --git a/mysql-test/suite/compat/oracle/r/sp-package.result b/mysql-test/suite/compat/oracle/r/sp-package.result
index 20e3d43fb85..6fbe568f719 100644
--- a/mysql-test/suite/compat/oracle/r/sp-package.result
+++ b/mysql-test/suite/compat/oracle/r/sp-package.result
@@ -249,7 +249,11 @@ RETURN f2();
END;
END;
$$
-ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Error 1064 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 'garbage' at line 1
+Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
DROP PACKAGE test2;
#
# Broken CREATE PACKAGE at a package function call time
@@ -271,11 +275,23 @@ UPDATE mysql.proc SET `body`='garbage'
WHERE db='test' AND name='test2' AND type='PACKAGE';
# sp-cache-invalidate
SELECT test2.f1();
-ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Error 1064 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 'garbage' at line 1
+Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
SELECT test2.f1();
-ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Error 1064 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 'garbage' at line 1
+Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
SELECT test2.f1();
-ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Error 1064 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 'garbage' at line 1
+Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
DROP PACKAGE test2;
#
# Broken CREATE PACKAGE at a package procedure call time
@@ -297,11 +313,23 @@ UPDATE mysql.proc SET `body`='garbage'
WHERE db='test' AND name='test2' AND type='PACKAGE';
# sp-cache-invalidate
CALL test2.p1();
-ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Error 1064 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 'garbage' at line 1
+Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
CALL test2.p1();
-ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Error 1064 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 'garbage' at line 1
+Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
CALL test2.p1();
-ERROR HY000: Failed to load routine test.test2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
+show warnings;
+Level Code Message
+Error 1064 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 'garbage' at line 1
+Error 1457 Failed to load routine test.test2 (internal code -6). For more details, run SHOW WARNINGS
DROP PACKAGE test2;
#
# Bad routine names
@@ -2036,6 +2064,8 @@ $$
CALL p1.p1();
@a
11
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1.p1();
@a
12
@@ -2067,6 +2097,8 @@ BEGIN
SELECT MAX(a) FROM t1 INTO @a;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1.p1();
@a
11
@@ -2100,6 +2132,8 @@ BEGIN
SELECT 1 FROM t1 INTO @a;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1.p1();
ERROR 42S02: Table 'test.t1' doesn't exist
SELECT p1.f1();
@@ -2658,6 +2692,9 @@ SELECT * FROM t1 INTO b;
SELECT b.a, b.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1.p1;
b.a b.b
10 b
diff --git a/mysql-test/suite/compat/oracle/r/sp-row.result b/mysql-test/suite/compat/oracle/r/sp-row.result
index 72b33768864..218fb5d463a 100644
--- a/mysql-test/suite/compat/oracle/r/sp-row.result
+++ b/mysql-test/suite/compat/oracle/r/sp-row.result
@@ -2833,6 +2833,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: The used SELECT statements have a different number of columns
DROP TABLE t1;
@@ -2847,6 +2849,8 @@ SELECT * FROM t1 INTO rec1, rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: Operand should contain 2 column(s)
DROP TABLE t1;
@@ -2861,6 +2865,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
rec1.a rec1.b
10 b10
@@ -2876,6 +2882,8 @@ SELECT 10,'a','b' FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: The used SELECT statements have a different number of columns
DROP TABLE t1;
@@ -2890,6 +2898,8 @@ SELECT 10,'a' FROM t1 INTO rec1, rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: Operand should contain 2 column(s)
DROP TABLE t1;
@@ -2904,6 +2914,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
rec1.a rec1.b
10 b10
@@ -2920,6 +2932,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: The used SELECT statements have a different number of columns
DROP TABLE t1;
@@ -2935,6 +2949,8 @@ SELECT * FROM t1 INTO rec1, rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
ERROR 21000: Operand should contain 2 column(s)
DROP TABLE t1;
@@ -2950,6 +2966,8 @@ SELECT * FROM t1 INTO rec1;
SELECT rec1.a, rec1.b;
END;
$$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL p1();
rec1.a rec1.b
10 b10
diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result
index e11e0404dd1..d462ee862c5 100644
--- a/mysql-test/suite/compat/oracle/r/sp.result
+++ b/mysql-test/suite/compat/oracle/r/sp.result
@@ -1019,9 +1019,7 @@ LOOP
EXIT WHEN unknown_ident IS NULL;
END LOOP;
END$$
-CALL p1;
-ERROR 42S22: Unknown column 'unknown_ident' in 'field list'
-DROP PROCEDURE p1;
+ERROR 42000: Undeclared variable: unknown_ident
CREATE PROCEDURE p1
AS
BEGIN
@@ -1030,9 +1028,7 @@ LOOP
EXIT label WHEN unknown_ident IS NULL;
END LOOP;
END$$
-CALL p1;
-ERROR 42S22: Unknown column 'unknown_ident' in 'field list'
-DROP PROCEDURE p1;
+ERROR 42000: Undeclared variable: unknown_ident
CREATE PROCEDURE p1
AS
BEGIN
@@ -1040,9 +1036,7 @@ LOOP
CONTINUE WHEN unknown_ident IS NULL;
END LOOP;
END$$
-CALL p1;
-ERROR 42S22: Unknown column 'unknown_ident' in 'field list'
-DROP PROCEDURE p1;
+ERROR 42000: Undeclared variable: unknown_ident
CREATE PROCEDURE p1
AS
BEGIN
@@ -1051,9 +1045,7 @@ LOOP
CONTINUE label WHEN unknown_ident IS NULL;
END LOOP;
END$$
-CALL p1;
-ERROR 42S22: Unknown column 'unknown_ident' in 'field list'
-DROP PROCEDURE p1;
+ERROR 42000: Undeclared variable: unknown_ident
#
# MDEV-10583 sql_mode=ORACLE: SQL%ROWCOUNT
#
@@ -2571,3 +2563,19 @@ SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='t
ACTION_STATEMENT BEGIN END
DROP TRIGGER tr;
DROP TABLE t1;
+#
+# End of 10.3 tests
+#
+#
+# MDEV-19637 Crash on an SP variable assignment to a wrong subselect
+#
+DECLARE
+a INT;
+BEGIN
+SET a=(SELECT 1 FROM DUAL UNION SELECT HIGH_PRIORITY 2 FROM DUAL);
+END;
+$$
+ERROR 42000: Incorrect usage/placement of 'HIGH_PRIORITY'
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/compat/oracle/r/statement-expr.result b/mysql-test/suite/compat/oracle/r/statement-expr.result
index ea3bd5232d3..ab4dce9ad74 100644
--- a/mysql-test/suite/compat/oracle/r/statement-expr.result
+++ b/mysql-test/suite/compat/oracle/r/statement-expr.result
@@ -13,9 +13,9 @@ ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)
0
DROP TABLE t1;
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
-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 'SELECT * FROM t1)' at line 1
+ERROR 42000: EXECUTE..USING does not support subqueries or stored functions
CREATE TABLE t1 (id INT);
INSERT INTO t1 VALUES (10);
CREATE PROCEDURE p1(a INT) AS BEGIN NULL; END;
@@ -47,21 +47,21 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SIGNAL SQLSTATE '01000';
END' at line 3
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
-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 '(SELECT * FROM t1)' at line 1
+ERROR 42000: PREPARE..FROM does not support subqueries or stored functions
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
-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 '(SELECT * FROM t1)' at line 1
+ERROR 42000: EXECUTE IMMEDIATE does not support subqueries or stored functions
GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
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 '(1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO' at line 1
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
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 'EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO' at line 1
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
-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 'SELECT * FROM t1))' at line 1
+ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
-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 '(SELECT * FROM t1)' at line 1
+ERROR 42000: PURGE..BEFORE does not support subqueries or stored functions
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
DO 1 IN (SELECT * FROM t1);
diff --git a/mysql-test/suite/compat/oracle/r/table_value_constr.result b/mysql-test/suite/compat/oracle/r/table_value_constr.result
index daea0eccb19..90b2f2a66f9 100644
--- a/mysql-test/suite/compat/oracle/r/table_value_constr.result
+++ b/mysql-test/suite/compat/oracle/r/table_value_constr.result
@@ -2307,8 +2307,8 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 1,2) union /* select#2 */ select 2 A
2
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2) union select 2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
@@ -2320,8 +2320,8 @@ Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3)
2
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1) union select 2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
@@ -2368,8 +2368,8 @@ Note 1003 /* select#1 */ select 3 AS "3" union all (/* select#3 */ select "tvc_0
3
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2) union all select 3;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
@@ -2429,8 +2429,8 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 3,2) union all /* select#2 */ select
5
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3 order by 1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
Warnings:
@@ -2443,8 +2443,8 @@ order by 1 limit 2 offset 1;
explain extended (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3
order by 1 limit 2 offset 1;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SUBQUERY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
-3 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort
+3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
Warnings:
diff --git a/mysql-test/suite/compat/oracle/r/update_innodb.result b/mysql-test/suite/compat/oracle/r/update_innodb.result
new file mode 100644
index 00000000000..1dae643eeff
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/r/update_innodb.result
@@ -0,0 +1,26 @@
+#
+# MDEV-19535 sql_mode=ORACLE: 'SELECT INTO @var FOR UPDATE' does not lock the table
+#
+SET sql_mode='ORACLE';
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO t1 VALUES (1);
+START TRANSACTION;
+SELECT a AS a_con1 FROM t1 INTO @a FOR UPDATE;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+connect con2,localhost,root,,;
+SET sql_mode='ORACLE';
+START TRANSACTION;
+SELECT a AS a_con2 FROM t1 INTO @a FOR UPDATE;;
+connection default;
+UPDATE t1 SET a=a+100;
+COMMIT;
+connection con2;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+SELECT a AS con2 FROM t1;
+con2
+101
+COMMIT;
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/r/versioning.result b/mysql-test/suite/compat/oracle/r/versioning.result
index ebedcf0f462..bbecfa1f6b1 100644
--- a/mysql-test/suite/compat/oracle/r/versioning.result
+++ b/mysql-test/suite/compat/oracle/r/versioning.result
@@ -14,3 +14,11 @@ SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
a
20
DROP TABLE t1;
+#
+# MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status || thd->lex->select_stack_top == 0' failed in parse_sql upon DELETE HISTORY under ORACLE mode
+#
+SET SQL_MODE= ORACLE;
+CREATE TABLE t1 (a INT);
+DELETE HISTORY FROM t1;
+ERROR HY000: Table `t1` is not system-versioned
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/custom_aggregate_functions.test b/mysql-test/suite/compat/oracle/t/custom_aggregate_functions.test
new file mode 100644
index 00000000000..0affc4efa29
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/t/custom_aggregate_functions.test
@@ -0,0 +1,170 @@
+SET sql_mode=ORACLE;
+
+delimiter |;
+--error ER_INVALID_AGGREGATE_FUNCTION
+create aggregate function f1(x INT) return INT AS
+begin
+ insert into t1(sal) values (x);
+ return x;
+end|
+
+--error ER_NOT_AGGREGATE_FUNCTION
+create function f1(x INT) return INT AS
+begin
+ set x=5;
+ fetch group next row;
+return x+1;
+end |
+
+DELIMITER ;|
+
+
+CREATE TABLE marks(stud_id INT, grade_count INT);
+INSERT INTO marks VALUES (1,6), (2,4), (3,7), (4,5), (5,8);
+SELECT * FROM marks;
+
+--echo # Using PL/SQL syntax: EXCEPTION WHEN NO_DATA_FOUND
+
+DELIMITER //;
+CREATE AGGREGATE FUNCTION IF NOT EXISTS aggregate_count(x INT) RETURN INT AS
+ count_students INT DEFAULT 0;
+BEGIN
+ LOOP
+ FETCH GROUP NEXT ROW;
+ IF x THEN
+ count_students:= count_students + 1;
+ END IF;
+ END LOOP;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ RETURN count_students;
+END aggregate_count //
+DELIMITER ;//
+SELECT aggregate_count(stud_id) FROM marks;
+DROP FUNCTION IF EXISTS aggregate_count;
+
+
+--echo # Using SQL/PSM systax: CONTINUE HANDLER
+
+DELIMITER //;
+CREATE AGGREGATE FUNCTION IF NOT EXISTS aggregate_count(x INT) RETURN INT AS
+ count_students INT DEFAULT 0;
+ CONTINUE HANDLER FOR NOT FOUND RETURN count_students;
+BEGIN
+ LOOP
+ FETCH GROUP NEXT ROW;
+ IF x THEN
+ SET count_students= count_students + 1;
+ END IF;
+ END LOOP;
+END //
+DELIMITER ;//
+SELECT aggregate_count(stud_id) FROM marks;
+DROP FUNCTION IF EXISTS aggregate_count;
+
+
+DROP TABLE marks;
+
+
+--echo #
+--echo # MDEV-18813 PROCEDURE and anonymous blocks silently ignore FETCH GROUP NEXT ROW
+--echo #
+
+
+DELIMITER $$;
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE PROCEDURE p1 AS
+BEGIN
+ FETCH GROUP NEXT ROW;
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_NOT_AGGREGATE_FUNCTION
+BEGIN NOT ATOMIC
+ FETCH GROUP NEXT ROW;
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE DEFINER=root@localhost FUNCTION f1 RETURN INT AS
+BEGIN
+ FETCH GROUP NEXT ROW;
+ RETURN 0;
+END;
+$$
+DELIMITER ;$$
+
+
+CREATE TABLE t1 (a INT);
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE TRIGGER tr1
+ AFTER INSERT ON t1 FOR EACH ROW
+ FETCH GROUP NEXT ROW;
+DROP TABLE t1;
+
+
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE EVENT ev1
+ ON SCHEDULE EVERY 1 HOUR
+ STARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH
+ ENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK
+DO FETCH GROUP NEXT ROW;
+
+
+DELIMITER $$;
+CREATE PACKAGE pkg1 AS
+ PROCEDURE p1;
+ FUNCTION f1 RETURN INT;
+END;
+$$
+
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE PACKAGE BODY pkg1 AS
+ PROCEDURE p1 AS
+ BEGIN
+ FETCH GROUP NEXT ROW; -- In a package procedure
+ END;
+ FUNCTION f1 RETURN INT AS
+ BEGIN
+ RETURN 0;
+ END;
+END;
+$$
+
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE PACKAGE BODY pkg1 AS
+ PROCEDURE p1 AS
+ BEGIN
+ NULL;
+ END;
+ FUNCTION f1 RETURN INT AS
+ BEGIN
+ FETCH GROUP NEXT ROW; -- In a package function
+ RETURN 0;
+ END;
+END;
+$$
+
+--error ER_NOT_AGGREGATE_FUNCTION
+CREATE PACKAGE BODY pkg1 AS
+ PROCEDURE p1 AS
+ BEGIN
+ NULL;
+ END;
+ FUNCTION f1 RETURN INT AS
+ BEGIN
+ RETURN 0;
+ END;
+BEGIN
+ FETCH GROUP NEXT ROW; -- In a package executable section
+END;
+$$
+
+DELIMITER ;$$
+DROP PACKAGE pkg1;
diff --git a/mysql-test/suite/compat/oracle/t/parser.test b/mysql-test/suite/compat/oracle/t/parser.test
index 4d558c5d153..8dabdc1b3bd 100644
--- a/mysql-test/suite/compat/oracle/t/parser.test
+++ b/mysql-test/suite/compat/oracle/t/parser.test
@@ -459,3 +459,135 @@ DELIMITER ;//
--echo #
--echo # End of 10.3 tests
--echo #
+
+
+--echo #
+--echo # MDEV-21998: Server crashes in st_select_lex::add_table_to_list
+--echo # upon mix of KILL and sequences
+--echo #
+
+--error ER_SUBQUERIES_NOT_SUPPORTED
+KILL ( SELECT 1 ) + LASTVAL(s);
+--error ER_SUBQUERIES_NOT_SUPPORTED
+KILL LASTVAL(s);
+
+--echo #
+--echo # MDEV-23094: Multiple calls to a Stored Procedure from another
+--echo # Stored Procedure crashes server
+--echo #
+
+create table t1 (id1 int primary key, data1 int);
+create table t2 (id2 int primary key, data2 int);
+
+delimiter //;
+create procedure p1(id int,dt int) as
+begin
+ if (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt))
+ then
+ select 1;
+ end if;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(id int, dt int) as
+begin
+case (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt))
+when 1 then
+ select 1;
+else
+ select 0;
+end case;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(id int, dt int) as
+begin
+declare wcont int default 1;
+begin
+ while (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt)) and wcont
+ loop
+ select 1;
+ set wcont=0;
+ end loop;
+end;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(id int, dt int) as
+begin
+declare count int default 1;
+begin
+ repeat
+ select 1;
+ set count=count+1;
+ until (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt)) and
+ count < 3
+ end repeat;
+end;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+create procedure p1(id int, dt int) as
+begin
+for i in 1..(exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt))
+loop
+ select 1;
+end loop;
+end //
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+delimiter //;
+set sql_mode=ORACLE;
+create or replace procedure p1(id int, dt int) as
+begin
+ while (1)
+ loop
+ exit when (exists(select * from t1 where id1 = id and data1 = dt) or
+ not exists (select * from t2 where id2 = id and data2 = dt));
+ end loop;
+end;
+//
+delimiter ;//
+
+call p1(1,2);
+call p1(1,2);
+
+drop procedure p1;
+
+drop table t1,t2;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/suite/compat/oracle/t/plugin.test b/mysql-test/suite/compat/oracle/t/plugin.test
new file mode 100644
index 00000000000..a84c4ae7828
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/t/plugin.test
@@ -0,0 +1,3 @@
+SET sql_mode=ORACLE;
+
+--source include/install_plugin_if_exists.inc
diff --git a/mysql-test/suite/compat/oracle/t/ps.test b/mysql-test/suite/compat/oracle/t/ps.test
index 357b50e0eab..39770b48ded 100644
--- a/mysql-test/suite/compat/oracle/t/ps.test
+++ b/mysql-test/suite/compat/oracle/t/ps.test
@@ -33,7 +33,7 @@ EXECUTE stmt USING @a, @b;
--echo #
PREPARE stmt FROM 'SELECT :1 FROM DUAL';
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE stmt USING (SELECT 1);
DEALLOCATE PREPARE stmt;
@@ -153,7 +153,7 @@ DROP TABLE t1;
--echo # Testing disallowed expressions in USING
--echo #
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE 'SELECT :1 FROM DUAL' USING (SELECT 1);
DELIMITER $$;
@@ -189,9 +189,9 @@ EXECUTE IMMEDIATE _latin1'SELECT 1 AS c FROM ' || _latin2 'DUAL';
--error ER_CANT_AGGREGATE_2COLLATIONS
PREPARE stmt FROM _latin1'SELECT 1 AS c FROM ' || _latin2 'DUAL';
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE (SELECT 'SELECT 1');
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PREPARE stmt FROM (SELECT 'SELECT 1');
--error ER_BAD_FIELD_ERROR
diff --git a/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test b/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test
index ba0ca9b6a60..78a38c5f4c6 100644
--- a/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test
+++ b/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test
@@ -1128,7 +1128,7 @@ DELIMITER ;$$
--echo # IN followed by an unknown cursor name
DELIMITER $$;
---error ER_SP_CURSOR_MISMATCH
+--error ER_SP_UNDECLARED_VAR
CREATE PROCEDURE p1 AS
CURSOR c1 IS SELECT 'test' AS a FROM DUAL;
BEGIN
diff --git a/mysql-test/suite/compat/oracle/t/sp-package.test b/mysql-test/suite/compat/oracle/t/sp-package.test
index 578ee4e0073..401a46ad206 100644
--- a/mysql-test/suite/compat/oracle/t/sp-package.test
+++ b/mysql-test/suite/compat/oracle/t/sp-package.test
@@ -335,6 +335,7 @@ CREATE PACKAGE BODY test2 AS
END;
$$
DELIMITER ;$$
+show warnings;
DROP PACKAGE test2;
@@ -367,10 +368,13 @@ UPDATE mysql.proc SET `body`='garbage'
--source sp-cache-invalidate.inc
--error ER_SP_PROC_TABLE_CORRUPT
SELECT test2.f1();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
SELECT test2.f1();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
SELECT test2.f1();
+show warnings;
DROP PACKAGE test2;
@@ -403,10 +407,13 @@ UPDATE mysql.proc SET `body`='garbage'
--source sp-cache-invalidate.inc
--error ER_SP_PROC_TABLE_CORRUPT
CALL test2.p1();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
CALL test2.p1();
+show warnings;
--error ER_SP_PROC_TABLE_CORRUPT
CALL test2.p1();
+show warnings;
DROP PACKAGE test2;
diff --git a/mysql-test/suite/compat/oracle/t/sp.test b/mysql-test/suite/compat/oracle/t/sp.test
index 945968d9512..1e1954a5997 100644
--- a/mysql-test/suite/compat/oracle/t/sp.test
+++ b/mysql-test/suite/compat/oracle/t/sp.test
@@ -1094,6 +1094,7 @@ DROP FUNCTION f1;
--echo #
DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
CREATE PROCEDURE p1
AS
BEGIN
@@ -1102,12 +1103,10 @@ BEGIN
END LOOP;
END$$
DELIMITER ;$$
---error ER_BAD_FIELD_ERROR
-CALL p1;
-DROP PROCEDURE p1;
DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
CREATE PROCEDURE p1
AS
BEGIN
@@ -1117,12 +1116,10 @@ BEGIN
END LOOP;
END$$
DELIMITER ;$$
---error ER_BAD_FIELD_ERROR
-CALL p1;
-DROP PROCEDURE p1;
DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
CREATE PROCEDURE p1
AS
BEGIN
@@ -1131,12 +1128,10 @@ BEGIN
END LOOP;
END$$
DELIMITER ;$$
---error ER_BAD_FIELD_ERROR
-CALL p1;
-DROP PROCEDURE p1;
DELIMITER $$;
+--error ER_SP_UNDECLARED_VAR
CREATE PROCEDURE p1
AS
BEGIN
@@ -1146,9 +1141,6 @@ BEGIN
END LOOP;
END$$
DELIMITER ;$$
---error ER_BAD_FIELD_ERROR
-CALL p1;
-DROP PROCEDURE p1;
--echo #
--echo # MDEV-10583 sql_mode=ORACLE: SQL%ROWCOUNT
@@ -2413,3 +2405,26 @@ SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='t
--horizontal_results
DROP TRIGGER tr;
DROP TABLE t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-19637 Crash on an SP variable assignment to a wrong subselect
+--echo #
+
+DELIMITER $$;
+--error ER_CANT_USE_OPTION_HERE
+DECLARE
+ a INT;
+BEGIN
+ SET a=(SELECT 1 FROM DUAL UNION SELECT HIGH_PRIORITY 2 FROM DUAL);
+END;
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/suite/compat/oracle/t/statement-expr.test b/mysql-test/suite/compat/oracle/t/statement-expr.test
index f4a6a25eff3..1caab623524 100644
--- a/mysql-test/suite/compat/oracle/t/statement-expr.test
+++ b/mysql-test/suite/compat/oracle/t/statement-expr.test
@@ -17,9 +17,9 @@ SELECT ROW(1,7) IN (SELECT id, id1 FROM t1 WHERE id1= 8);
EXECUTE IMMEDIATE 'SELECT ROW(1, 7) IN (SELECT id, id1 FROM t1 WHERE id1= 8)';
DROP TABLE t1;
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE 'SELECT ?' USING (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE 'SELECT ?' USING (SELECT * FROM t1);
@@ -57,14 +57,14 @@ $$
DELIMITER ;$$
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PREPARE stmt FROM (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PREPARE stmt FROM EXISTS (SELECT * FROM t1);
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
EXECUTE IMMEDIATE EXISTS (SELECT * FROM t1);
--error ER_PARSE_ERROR
@@ -72,9 +72,9 @@ GET DIAGNOSTICS CONDITION (1 IN (SELECT * FROM t1)) @errno=MYSQL_ERRNO;
--error ER_PARSE_ERROR
GET DIAGNOSTICS CONDITION EXISTS (SELECT * FROM t1) @errno=MYSQL_ERRNO;
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PURGE BINARY LOGS BEFORE (1 IN (SELECT * FROM t1));
---error ER_PARSE_ERROR
+--error ER_SUBQUERIES_NOT_SUPPORTED
PURGE BINARY LOGS BEFORE EXISTS (SELECT * FROM t1);
CREATE TABLE t1 (a INT);
diff --git a/mysql-test/suite/compat/oracle/t/update_innodb.test b/mysql-test/suite/compat/oracle/t/update_innodb.test
new file mode 100644
index 00000000000..8af219584d6
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/t/update_innodb.test
@@ -0,0 +1,28 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-19535 sql_mode=ORACLE: 'SELECT INTO @var FOR UPDATE' does not lock the table
+--echo #
+
+SET sql_mode='ORACLE';
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
+INSERT INTO t1 VALUES (1);
+START TRANSACTION;
+SELECT a AS a_con1 FROM t1 INTO @a FOR UPDATE;
+
+--connect(con2,localhost,root,,)
+SET sql_mode='ORACLE';
+START TRANSACTION;
+--send SELECT a AS a_con2 FROM t1 INTO @a FOR UPDATE;
+
+--connection default
+UPDATE t1 SET a=a+100;
+COMMIT;
+
+--connection con2
+--reap
+SELECT a AS con2 FROM t1;
+COMMIT;
+
+--connection default
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/versioning.test b/mysql-test/suite/compat/oracle/t/versioning.test
index d70058c56e4..abcca8c588a 100644
--- a/mysql-test/suite/compat/oracle/t/versioning.test
+++ b/mysql-test/suite/compat/oracle/t/versioning.test
@@ -11,3 +11,13 @@ INSERT INTO t1 VALUES (20);
SELECT * FROM t1 FOR SYSTEM_TIME ALL;
SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status || thd->lex->select_stack_top == 0' failed in parse_sql upon DELETE HISTORY under ORACLE mode
+--echo #
+
+SET SQL_MODE= ORACLE;
+CREATE TABLE t1 (a INT);
+--error ER_VERS_NOT_VERSIONED
+DELETE HISTORY FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/csv/flush.result b/mysql-test/suite/csv/flush.result
new file mode 100644
index 00000000000..b0b9b21bd0a
--- /dev/null
+++ b/mysql-test/suite/csv/flush.result
@@ -0,0 +1,25 @@
+CREATE TABLE t1(a INT NOT NULL) ENGINE=csv;
+INSERT INTO t1 VALUES(1);
+connect con1, localhost, root;
+LOCK TABLE t1 READ;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+# Must return 1 row
+SELECT * FROM t2;
+a
+1
+SELECT * FROM t1;
+a
+1
+connection con1;
+UNLOCK TABLES;
+connection default;
+INSERT INTO t2 VALUES(2);
+INSERT INTO t2 VALUES(2);
+SELECT * from t1,t2;
+a a
+1 1
+1 2
+1 2
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/csv/flush.test b/mysql-test/suite/csv/flush.test
new file mode 100644
index 00000000000..934ac26f291
--- /dev/null
+++ b/mysql-test/suite/csv/flush.test
@@ -0,0 +1,30 @@
+--source include/have_csv.inc
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+CREATE TABLE t1(a INT NOT NULL) ENGINE=csv;
+INSERT INTO t1 VALUES(1);
+# works correct if uncommented
+#FLUSH TABLE t1;
+
+connect(con1, localhost, root);
+LOCK TABLE t1 READ;
+
+connection default;
+FLUSH TABLES WITH READ LOCK;
+copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/t2.frm;
+copy_file $MYSQLD_DATADIR/test/t1.CSV $MYSQLD_DATADIR/test/t2.CSV;
+copy_file $MYSQLD_DATADIR/test/t1.CSM $MYSQLD_DATADIR/test/t2.CSM;
+UNLOCK TABLES;
+--echo # Must return 1 row
+SELECT * FROM t2;
+SELECT * FROM t1;
+connection con1;
+UNLOCK TABLES;
+
+connection default;
+
+INSERT INTO t2 VALUES(2);
+INSERT INTO t2 VALUES(2);
+SELECT * from t1,t2;
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/encryption/r/create_or_replace_big.result b/mysql-test/suite/encryption/r/create_or_replace_big.result
index 87f56cc3e2c..2eabab45f0b 100644
--- a/mysql-test/suite/encryption/r/create_or_replace_big.result
+++ b/mysql-test/suite/encryption/r/create_or_replace_big.result
@@ -17,3 +17,4 @@ INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3
SET GLOBAL innodb_encryption_threads = 0;
SET GLOBAL innodb_encrypt_tables = OFF;
DROP TABLE table0_int_autoinc, table1_int_autoinc, table10_int_autoinc;
+# restart
diff --git a/mysql-test/suite/encryption/r/debug_key_management.result b/mysql-test/suite/encryption/r/debug_key_management.result
index 75e2629c1d6..911a369f0c6 100644
--- a/mysql-test/suite/encryption/r/debug_key_management.result
+++ b/mysql-test/suite/encryption/r/debug_key_management.result
@@ -1,3 +1,4 @@
+create table t1(a serial) engine=innoDB;
set global innodb_encrypt_tables=ON;
show variables like 'innodb_encrypt%';
Variable_name Value
@@ -14,5 +15,14 @@ set global debug_key_management_version=10;
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10;
count(*)
0
+SET GLOBAL debug_dbug = '+d,ib_log';
+SET GLOBAL innodb_log_checkpoint_now = 1;
+SET GLOBAL innodb_flush_log_at_trx_commit = 1;
+INSERT INTO t1 VALUES(NULL);
+# restart
set global innodb_encrypt_tables=OFF;
set global debug_key_management_version=1;
+select * from t1;
+a
+1
+drop table t1;
diff --git a/mysql-test/suite/encryption/r/encryption_key_corruption.result b/mysql-test/suite/encryption/r/encryption_key_corruption.result
index f467207d0f7..055abd687b6 100644
--- a/mysql-test/suite/encryption/r/encryption_key_corruption.result
+++ b/mysql-test/suite/encryption/r/encryption_key_corruption.result
@@ -9,5 +9,5 @@ DROP TABLE src;
CREATE TABLE dst (pk INT PRIMARY KEY, value INT) ENGINE=INNODB;
ALTER TABLE dst DISCARD TABLESPACE;
ALTER TABLE dst IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`dst` : Data structure corruption
+ERROR HY000: Index for table 'dst' is corrupt; try to repair it
DROP TABLE dst;
diff --git a/mysql-test/suite/encryption/r/innochecksum.result b/mysql-test/suite/encryption/r/innochecksum.result
index 8d1d0fd91e5..7c68164e52a 100644
--- a/mysql-test/suite/encryption/r/innochecksum.result
+++ b/mysql-test/suite/encryption/r/innochecksum.result
@@ -20,7 +20,8 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
# Run innochecksum on t3
# no encryption corrupting the field should not have effect
# Run innochecksum on t6
-# no encryption corrupting the field should not have effect
+# In new checksum format, checksum calculated for whole page.
+# So It should affected.
# Restore the original tables
# Corrupt FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION+4 (post encryption checksum)
# Run innochecksum on t2
@@ -33,4 +34,5 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
# Run innochecksum on t3
# Run innochecksum on t6
# Restore the original tables
+# restart
DROP TABLE t1, t2, t3, t4, t5, t6;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index 68267f2498d..255dde207ed 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -6,7 +6,9 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
# Start server with keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
@@ -28,15 +30,19 @@ foobar 1
foobar 2
# Restart server with keysbad3.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
DROP TABLE t1;
# Start server with keys3.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
SET GLOBAL innodb_default_encryption_key_id=5;
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
INSERT INTO t2 VALUES ('foobar',1,2);
# Restart server with keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SELECT * FROM t2;
ERROR 42S02: Table 'test.t2' doesn't exist in engine
SELECT * FROM t2 where id = 1;
@@ -66,3 +72,4 @@ ERROR 42S02: Table 'test.t2' doesn't exist in engine
DROP TABLE t2;
# Start server with keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
index 9cf98b6b1fd..af1028f1331 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
@@ -6,10 +6,13 @@ call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
SHOW WARNINGS;
@@ -32,9 +35,11 @@ test.t1 check Error Table 'test.t1' doesn't exist in engine
test.t1 check status Operation failed
SHOW WARNINGS;
Level Code Message
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
FLUSH TABLES t1 FOR EXPORT;
backup: t1
UNLOCK TABLES;
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
ALTER TABLE t1 DISCARD TABLESPACE;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
DROP TABLE t1;
@@ -42,6 +47,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
ALTER TABLE t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
ALTER TABLE t1 DISCARD TABLESPACE;
Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
@@ -55,6 +61,7 @@ t1 CREATE TABLE `t1` (
`f` varchar(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
+# restart: --innodb-encrypt-tables --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
RENAME TABLE t1 TO t1new;
ERROR HY000: Error on rename of './test/t1' to './test/t1new' (errno: 155 "The table does not exist in the storage engine")
ALTER TABLE t1 RENAME TO t1new;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
index 2d414d75c21..160335388b1 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
@@ -22,6 +22,7 @@ backup: t1
UNLOCK TABLES;
ALTER TABLE t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files
+# restart
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
index d3bbe2eccf3..ad218457068 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
@@ -3,10 +3,13 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize Error Table 'test.t1' doesn't exist in engine
@@ -19,4 +22,5 @@ test.t1 check Error Table 'test.t1' doesn't exist in engine
test.t1 check status Operation failed
SHOW WARNINGS;
Level Code Message
+# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
index a43676dcebe..8eac34ab399 100644
--- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
+++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
@@ -9,7 +9,7 @@ SET GLOBAL innodb_encryption_threads = 4;
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_(crc32|none|innodb)\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"(innodb|none|crc32)\"");
SET GLOBAL innodb_checksum_algorithm = innodb;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
SET GLOBAL innodb_default_encryption_key_id=4;
SET GLOBAL innodb_checksum_algorithm=crc32;
create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb
@@ -93,7 +93,7 @@ ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
@@ -120,7 +120,7 @@ ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
@@ -158,7 +158,7 @@ DROP TABLE tce_crc32, tc_crc32, te_crc32,
t_crc32, tpe_crc32, tp_crc32;
SET GLOBAL innodb_checksum_algorithm=innodb;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb
@@ -240,7 +240,7 @@ ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
@@ -267,7 +267,7 @@ ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
@@ -305,7 +305,7 @@ DROP TABLE tce_innodb, tc_innodb, te_innodb,
t_innodb, tpe_innodb, tp_innodb;
SET GLOBAL innodb_checksum_algorithm=none;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
create table tce_none(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_none(a serial, b blob, index(b(10))) engine=innodb
@@ -387,7 +387,7 @@ ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
@@ -414,7 +414,7 @@ ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
index ef49c9a6541..de20b554a67 100644
--- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result
+++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
@@ -3,6 +3,7 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
# Restart mysqld --file-key-management-filename=keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
set GLOBAL innodb_default_encryption_key_id=4;
create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
@@ -14,6 +15,7 @@ insert into t1 values (1, repeat('secret',6000));
insert into t2 values (1, repeat('secret',6000));
insert into t3 values (1, repeat('secret',6000));
# Restart mysqld --file-key-management-filename=keys3.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
ERROR 42S02: Table 'test.t1' doesn't exist in engine
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
@@ -22,4 +24,5 @@ select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
count(*)
1
# Restart mysqld --file-key-management-filename=keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
drop table t1,t2,t3;
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
index 9d6da0a0291..bb4f02b9c39 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
@@ -4,6 +4,7 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` is corrupted");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
+# restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
create table t5 (
`intcol1` int(32) DEFAULT NULL,
`intcol2` int(32) DEFAULT NULL,
@@ -21,9 +22,11 @@ CREATE TABLE `t1` (
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
alter table t1 encrypted='yes' `encryption_key_id`=1;
+# restart: --innodb-encrypt-tables=OFF
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
select * from t5;
ERROR 42S02: Table 'test.t5' doesn't exist in engine
+# restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
drop table t1;
drop table t5;
diff --git a/mysql-test/suite/encryption/r/innodb-first-page-read.result b/mysql-test/suite/encryption/r/innodb-first-page-read.result
deleted file mode 100644
index 4c2a2116669..00000000000
--- a/mysql-test/suite/encryption/r/innodb-first-page-read.result
+++ /dev/null
@@ -1,98 +0,0 @@
-FLUSH STATUS;
-create database innodb_test;
-use innodb_test;
-create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
-create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
-create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic;
-create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed;
-create table innodb_compressed1(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=1;
-create table innodb_compressed2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=2;
-create table innodb_compressed4(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=4;
-create table innodb_compressed8(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=8;
-create table innodb_compressed16(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=16;
-create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
-create table innodb_pagecomp(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes;
-create table innodb_pagecomp1(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=1;
-create table innodb_pagecomp2(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=2;
-create table innodb_pagecomp3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=3;
-create table innodb_pagecomp4(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=4;
-create table innodb_pagecomp5(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=5;
-create table innodb_pagecomp6(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=6;
-create table innodb_pagecomp7(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=7;
-create table innodb_pagecomp8(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=8;
-create table innodb_pagecomp9(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=9;
-create table innodb_datadir1(c1 bigint not null, b char(200)) engine=innodb DATA DIRECTORY='MYSQL_TMP_DIR';
-create table innodb_datadir2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed DATA DIRECTORY='MYSQL_TMP_DIR';
-create table innodb_datadir3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes DATA DIRECTORY='MYSQL_TMP_DIR';
-begin;
-insert into innodb_normal values (1,'secret');
-insert into innodb_compact select * from innodb_normal;
-insert into innodb_dynamic select * from innodb_normal;
-insert into innodb_compressed select * from innodb_normal;
-insert into innodb_compressed1 select * from innodb_normal;
-insert into innodb_compressed2 select * from innodb_normal;
-insert into innodb_compressed4 select * from innodb_normal;
-insert into innodb_compressed8 select * from innodb_normal;
-insert into innodb_compressed16 select * from innodb_normal;
-insert into innodb_redundant select * from innodb_normal;
-insert into innodb_pagecomp select * from innodb_normal;
-insert into innodb_pagecomp1 select * from innodb_normal;
-insert into innodb_pagecomp2 select * from innodb_normal;
-insert into innodb_pagecomp3 select * from innodb_normal;
-insert into innodb_pagecomp4 select * from innodb_normal;
-insert into innodb_pagecomp5 select * from innodb_normal;
-insert into innodb_pagecomp6 select * from innodb_normal;
-insert into innodb_pagecomp7 select * from innodb_normal;
-insert into innodb_pagecomp8 select * from innodb_normal;
-insert into innodb_pagecomp9 select * from innodb_normal;
-insert into innodb_datadir1 select * from innodb_normal;
-insert into innodb_datadir2 select * from innodb_normal;
-insert into innodb_datadir3 select * from innodb_normal;
-commit;
-FLUSH STATUS;
-# Restart server and see how many page 0's are read
-# result should actual number of tables except remote tables could be read twice
-# i.e. < 23 + 3*2 = 29
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-use innodb_test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-use test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-set global innodb_encrypt_tables=OFF;
-# wait until tables are decrypted
-SET GLOBAL innodb_max_dirty_pages_pct=0.0;
-SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
-# result should be actual number of tables except remote tables could be read twice
-# i.e. < 23 + 3*2 = 29
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-use innodb_test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-use test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-FLUSH STATUS;
-# restart and see number read page 0
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-use innodb_test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-use test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-VARIABLE_VALUE <= 29
-1
-drop database innodb_test;
-FLUSH STATUS;
diff --git a/mysql-test/suite/encryption/r/innodb-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
index 26ac03e06c6..012901010b4 100644
--- a/mysql-test/suite/encryption/r/innodb-force-corrupt.result
+++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
@@ -1,5 +1,5 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
-call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=3221342974");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("\\[ERROR\\] mysqld.*: Index for table 't2' is corrupt; try to repair it");
SET GLOBAL innodb_file_per_table = ON;
@@ -16,6 +16,7 @@ INSERT INTO t3 select * from t1;
COMMIT;
# Backup tables before corrupting
# Corrupt tables
+# restart
SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
SELECT * FROM t2;
@@ -23,4 +24,5 @@ Got one of the listed errors
SELECT * FROM t3;
ERROR 42S02: Table 'test.t3' doesn't exist in engine
# Restore the original tables
+# restart
DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result b/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result
index f27f5517e09..4e816bea43b 100644
--- a/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result
@@ -53,4 +53,5 @@ FOUND 1 /public/ in t7.ibd
FOUND 1 /public/ in t8.ibd
# t9 page compressed expecting NOT FOUND
NOT FOUND /public/ in t9.ibd
+# restart
drop database enctests;
diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result
index 3a501335e2d..ecb4ad2c40e 100644
--- a/mysql-test/suite/encryption/r/innodb-missing-key.result
+++ b/mysql-test/suite/encryption/r/innodb-missing-key.result
@@ -4,6 +4,7 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
# Start server with keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
CREATE TABLE t2(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
CREATE TABLE t3(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=NO;
@@ -23,6 +24,7 @@ INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t3 SELECT * FROM t1;
# Restart server with keys3.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
set global innodb_encryption_rotate_key_age = 1;
use test;
CREATE TABLE t4(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
@@ -43,6 +45,7 @@ SELECT COUNT(1) FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
# Start server with keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SELECT COUNT(1) FROM t1;
COUNT(1)
2048
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption.result
index 1069b8652da..2997f90ab97 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption.result
@@ -118,6 +118,7 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0
1
+# restart
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;
@@ -193,6 +194,7 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+# restart
show create table innodb_compact;
Table Create Table
innodb_compact CREATE TABLE `innodb_compact` (
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
index e8e88a1e41f..9ebac86335e 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
@@ -49,6 +49,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
variable_value > 0
1
+# restart: --innodb-encrypt-tables=OFF
set global innodb_compression_algorithm = 1;
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
show create table innodb_normal;
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
index a550b6b01b3..e46b4a0ed6f 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
@@ -51,6 +51,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
variable_value > 0
1
+# restart
BEGIN;
INSERT INTO innodb_normal SET c1 = 1;
INSERT INTO innodb_compact SET c1 = 1;
@@ -121,6 +122,7 @@ drop table innodb_redundant;
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ENCRYPTION_KEY_ID=2 ENCRYPTED=YES;
INSERT INTO t1 VALUES (1),(2);
# Restarting server...
+# restart
SELECT * FROM t1;
pk
1
diff --git a/mysql-test/suite/encryption/r/innodb-read-only.result b/mysql-test/suite/encryption/r/innodb-read-only.result
index 5d063e129e2..35ba28dbe1e 100644
--- a/mysql-test/suite/encryption/r/innodb-read-only.result
+++ b/mysql-test/suite/encryption/r/innodb-read-only.result
@@ -1,3 +1,4 @@
# Wait max 10 min for key encryption threads to encrypt all spaces
# Success!
+# restart: --innodb-read-only=1 --innodb-encrypt-tables=1
# All done
diff --git a/mysql-test/suite/encryption/r/innodb-redo-badkey.result b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
index 2248c692076..f90e7aeb780 100644
--- a/mysql-test/suite/encryption/r/innodb-redo-badkey.result
+++ b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
@@ -7,7 +7,8 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed f
call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
-# Restart mysqld --file-key-management-filename=keys2.txt
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
# Wait max 10 min for key encryption threads to encrypt all spaces
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
@@ -31,9 +32,9 @@ insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
COMMIT;
# Kill the server
-# restart
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
# Kill the server
-# Restart mysqld --innodb-force-recovery=1
+# restart: --innodb-force-recovery=1
# Kill the server
-# Restart mysqld --file-key-management-filename=keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
drop table t1, t2,t3,t4;
diff --git a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
index cc9d385bbbd..0a6beb8da38 100644
--- a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
+++ b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
@@ -5,7 +5,7 @@ call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[0-9]+, page number=[0-9]+\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
-# Restart mysqld --file-key-management-filename=keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
@@ -28,6 +28,6 @@ insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
COMMIT;
# Kill the server
-# restart
-# Restart mysqld --file-key-management-filename=keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
+# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
drop table t1, t2,t3,t4;
diff --git a/mysql-test/suite/encryption/r/innodb-remove-encryption.result b/mysql-test/suite/encryption/r/innodb-remove-encryption.result
index 3b0ce29218b..9bce59dbbea 100644
--- a/mysql-test/suite/encryption/r/innodb-remove-encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-remove-encryption.result
@@ -6,6 +6,7 @@ flush tables;
create table t1(a int not null primary key, b char(200)) engine=innodb;
# Restart server with encryption
+# restart: --plugin-load-add=file_key_management --loose-file-key-management --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys.txt --file-key-management-encryption-algorithm=aes_cbc --innodb-encrypt-tables=ON --innodb-encryption-threads=4 --innodb-tablespaces-encryption --innodb-encryption-rotate-key-age=15
# Wait until encryption threads have encrypted all tablespaces
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
NAME
@@ -31,6 +32,7 @@ NAME
# Success!
# Restart server with no encryption setup, there should be no crashes
+# restart: --skip-file-key-management --innodb-encrypt-tables=OFF --innodb-encryption-threads=0 --innodb-tablespaces-encryption
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
NAME
innodb_system
diff --git a/mysql-test/suite/encryption/r/innodb-spatial-index,full_crc32.rdiff b/mysql-test/suite/encryption/r/innodb-spatial-index,full_crc32.rdiff
new file mode 100644
index 00000000000..2f58318b884
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb-spatial-index,full_crc32.rdiff
@@ -0,0 +1,36 @@
+--- innodb-spatial-index.result
++++ innodb-spatial-index.result
+@@ -1,23 +1,27 @@
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
+ ENCRYPTED=YES;
+-Got one of the listed errors
++INSERT INTO t1(c, coordinate) values('mysql', ST_GeomFromText('POINT(903994614 180726515)'));
++# restart
++INSERT INTO t1(c, coordinate) values('mariadb', ST_GeomFromText('POINT(903994614 180726515)'));
++DROP TABLE t1;
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
+ ALTER TABLE t1 ENCRYPTED=YES;
+-Got one of the listed errors
+ DROP TABLE t1;
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL)
+ PAGE_COMPRESSED=YES, ENCRYPTED=YES ENGINE=INNODB;
+ ALTER TABLE t1 ADD SPATIAL INDEX b1(coordinate), ALGORITHM=COPY;
+-Got one of the listed errors
+ ALTER TABLE t1 ADD SPATIAL INDEX b2(coordinate), FORCE, ALGORITHM=INPLACE;
+-Got one of the listed errors
++Warnings:
++Note 1831 Duplicate index `b2`. This is deprecated and will be disallowed in a future release
+ ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);
+-Got one of the listed errors
++Warnings:
++Note 1831 Duplicate index `coordinate`. This is deprecated and will be disallowed in a future release
+ CREATE SPATIAL INDEX b3 on t1(coordinate);
+-Got one of the listed errors
++Warnings:
++Note 1831 Duplicate index `b3`. This is deprecated and will be disallowed in a future release
+ DROP TABLE t1;
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=DEFAULT ENGINE=INNODB;
diff --git a/mysql-test/suite/encryption/r/innodb-spatial-index,strict_full_crc32.rdiff b/mysql-test/suite/encryption/r/innodb-spatial-index,strict_full_crc32.rdiff
new file mode 100644
index 00000000000..2f58318b884
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb-spatial-index,strict_full_crc32.rdiff
@@ -0,0 +1,36 @@
+--- innodb-spatial-index.result
++++ innodb-spatial-index.result
+@@ -1,23 +1,27 @@
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
+ ENCRYPTED=YES;
+-Got one of the listed errors
++INSERT INTO t1(c, coordinate) values('mysql', ST_GeomFromText('POINT(903994614 180726515)'));
++# restart
++INSERT INTO t1(c, coordinate) values('mariadb', ST_GeomFromText('POINT(903994614 180726515)'));
++DROP TABLE t1;
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
+ ALTER TABLE t1 ENCRYPTED=YES;
+-Got one of the listed errors
+ DROP TABLE t1;
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL)
+ PAGE_COMPRESSED=YES, ENCRYPTED=YES ENGINE=INNODB;
+ ALTER TABLE t1 ADD SPATIAL INDEX b1(coordinate), ALGORITHM=COPY;
+-Got one of the listed errors
+ ALTER TABLE t1 ADD SPATIAL INDEX b2(coordinate), FORCE, ALGORITHM=INPLACE;
+-Got one of the listed errors
++Warnings:
++Note 1831 Duplicate index `b2`. This is deprecated and will be disallowed in a future release
+ ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);
+-Got one of the listed errors
++Warnings:
++Note 1831 Duplicate index `coordinate`. This is deprecated and will be disallowed in a future release
+ CREATE SPATIAL INDEX b3 on t1(coordinate);
+-Got one of the listed errors
++Warnings:
++Note 1831 Duplicate index `b3`. This is deprecated and will be disallowed in a future release
+ DROP TABLE t1;
+ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=DEFAULT ENGINE=INNODB;
diff --git a/mysql-test/suite/encryption/r/innodb-spatial-index.result b/mysql-test/suite/encryption/r/innodb-spatial-index.result
index 7637d61b400..66c3edcd109 100644
--- a/mysql-test/suite/encryption/r/innodb-spatial-index.result
+++ b/mysql-test/suite/encryption/r/innodb-spatial-index.result
@@ -1,22 +1,23 @@
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
ENCRYPTED=YES;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Got one of the listed errors
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
ALTER TABLE t1 ENCRYPTED=YES;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
+Got one of the listed errors
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
-c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
-ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), FORCE, ALGORITHM=INPLACE;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
+c VARCHAR(256), coordinate POINT NOT NULL)
+PAGE_COMPRESSED=YES, ENCRYPTED=YES ENGINE=INNODB;
+ALTER TABLE t1 ADD SPATIAL INDEX b1(coordinate), ALGORITHM=COPY;
+Got one of the listed errors
+ALTER TABLE t1 ADD SPATIAL INDEX b2(coordinate), FORCE, ALGORITHM=INPLACE;
+Got one of the listed errors
ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
-CREATE SPATIAL INDEX b on t1(coordinate);
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
+Got one of the listed errors
+CREATE SPATIAL INDEX b3 on t1(coordinate);
+Got one of the listed errors
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=DEFAULT ENGINE=INNODB;
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_freed.result b/mysql-test/suite/encryption/r/innodb_encrypt_freed.result
new file mode 100644
index 00000000000..c0d8b770403
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_freed.result
@@ -0,0 +1,100 @@
+SHOW VARIABLES LIKE 'innodb_encrypt%';
+Variable_name Value
+innodb_encrypt_log ON
+innodb_encrypt_tables ON
+innodb_encrypt_temporary_tables OFF
+innodb_encryption_rotate_key_age 1
+innodb_encryption_rotation_iops 100
+innodb_encryption_threads 1
+SET GLOBAL innodb_encrypt_tables = ON;
+CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null,
+f3 int not null, index(f1), index idx_1(f2),
+index(f2, f3)) ENGINE=InnoDB;
+# Wait max 10 min for key encryption threads to encrypt all spaces
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+NAME
+innodb_system
+mysql/innodb_index_stats
+mysql/innodb_table_stats
+mysql/transaction_registry
+test/t1
+CREATE TABLE t2 (f1 int not null)engine=innodb;
+# restart: --debug=d,ib_log_checkpoint_avoid
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+connect con1,localhost,root,,,;
+begin;
+insert into t2 values(1);
+connection default;
+set global innodb_encrypt_tables = OFF;
+# Wait max 10 min for key encryption threads to decrypt all spaces
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+NAME
+innodb_system
+mysql/innodb_index_stats
+mysql/innodb_table_stats
+mysql/transaction_registry
+test/t1
+test/t2
+alter table t1 drop index idx_1;
+set global innodb_encrypt_tables = ON;
+# Wait max 10 min for key encryption threads to encrypt all spaces
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+NAME
+innodb_system
+mysql/innodb_index_stats
+mysql/innodb_table_stats
+mysql/transaction_registry
+test/t1
+test/t2
+disconnect con1;
+# restart: --debug=d,ib_log_checkpoint_avoid
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+drop table t1, t2;
+CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null,
+f3 int not null, index(f1), index idx_1(f2),
+index(f2, f3)) ENGINE=InnoDB;
+# Wait max 10 min for key encryption threads to encrypt all spaces
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+NAME
+innodb_system
+mysql/innodb_index_stats
+mysql/innodb_table_stats
+mysql/transaction_registry
+test/t1
+CREATE TABLE t2 (f1 int not null)engine=innodb;
+# restart: --debug=d,ib_log_checkpoint_avoid
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+connect con1,localhost,root,,,;
+begin;
+insert into t2 values(1);
+connection default;
+set global innodb_encrypt_tables = OFF;
+# Wait max 10 min for key encryption threads to decrypt all spaces
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+NAME
+innodb_system
+mysql/innodb_index_stats
+mysql/innodb_table_stats
+mysql/transaction_registry
+test/t1
+test/t2
+alter table t1 drop index idx_1;
+disconnect con1;
+# restart: --debug=d,ib_log_checkpoint_avoid
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+connect con1,localhost,root,,,;
+begin;
+insert into t2 values(1);
+connection default;
+set global innodb_encrypt_tables = ON;
+# Wait max 10 min for key encryption threads to encrypt all spaces
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+NAME
+innodb_system
+mysql/innodb_index_stats
+mysql/innodb_table_stats
+mysql/transaction_registry
+test/t1
+test/t2
+disconnect con1;
+drop table t2, t1;
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log.result b/mysql-test/suite/encryption/r/innodb_encrypt_log.result
index cd37330f2b0..e2b456aa2ed 100644
--- a/mysql-test/suite/encryption/r/innodb_encrypt_log.result
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_log.result
@@ -40,6 +40,7 @@ NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in t0.ibd
# ib_logfile0 expecting NOT FOUND
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
# Restart without redo log encryption
+# restart: --skip-innodb-encrypt-log --innodb-log-files-in-group=1
SELECT COUNT(*) FROM t0;
COUNT(*)
1024
@@ -57,6 +58,7 @@ FOUND 1 /(public|gossip).*/ in ib_logfile0
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1
# t0.ibd expecting NOT FOUND
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in t0.ibd
+# restart
SELECT COUNT(*) FROM t0;
COUNT(*)
1025
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result
index 59b28969559..c64a11dcdd9 100644
--- a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result
@@ -1,10 +1,12 @@
# redo log from before MariaDB 10.2.2/MySQL 5.7.9
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2\./ in mysqld.1.err
# redo log from before MariaDB 10.2.2, with corrupted log checkpoint
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -12,12 +14,14 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err
FOUND 2 /Plugin 'InnoDB' registration as a STORAGE ENGINE failed/ in mysqld.1.err
# redo log from before MariaDB 10.2.2, with corrupted log block
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
# empty redo log from before MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -25,24 +29,28 @@ COUNT(*)
1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err
# distant future redo log format, with valid header checksum
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\./ in mysqld.1.err
# valid header, but old-format checkpoint blocks
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -50,6 +58,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
FOUND 1 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# same, but with current-version header
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -57,6 +66,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 2 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
FOUND 2 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# --innodb-force-recovery=6 (skip the entire redo log)
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -64,11 +74,13 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
FOUND 1 /\[Note\] InnoDB: .* started; log sequence number 0/ in mysqld.1.err
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# --innodb-force-recovery=6 (skip the entire redo log)
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -76,6 +88,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
# Test a corrupted MLOG_FILE_NAME record.
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -88,12 +101,14 @@ FOUND 1 /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8
FOUND 1 /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err
# Test a corrupted MLOG_FILE_NAME record.
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -101,18 +116,21 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err
FOUND 1 /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
# 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# Empty 10.3 redo log
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -120,6 +138,7 @@ COUNT(*)
1
FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
# Empty 10.2 redo log
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -127,11 +146,13 @@ COUNT(*)
1
FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err
+# restart
ib_buffer_pool
ib_logfile0
ib_logfile1
diff --git a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
index 34eb9b0c6dd..8324bdb34f6 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
@@ -146,6 +146,7 @@ variable_value > 0
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
variable_value > 0
1
+# restart
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = off;
update innodb_page_compressed1 set c1 = c1 + 1;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption.result b/mysql-test/suite/encryption/r/innodb_encryption.result
index aa511b0b9d7..3b1552be4be 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption.result
@@ -54,6 +54,7 @@ NAME
innodb_system
# Success!
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
+# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name Value
innodb_encrypt_log ON
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
index 6b38be38b6d..752994d635c 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
@@ -25,6 +25,7 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd
+# restart
db.opt
t1.frm
t1.ibd
@@ -72,6 +73,7 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd
+# restart
ALTER TABLE t1 ENGINE InnoDB;
SHOW CREATE TABLE t1;
Table Create Table
@@ -97,6 +99,7 @@ t3 CREATE TABLE `t3` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `encrypted`=yes
# Restarting server
+# restart
# Done restarting server
# Verify that tables are still usable
SELECT COUNT(1) FROM t1;
@@ -115,8 +118,10 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd
+# restart
# Wait max 10 min for key encryption threads to encrypt all spaces
# Success!
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
+# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
index 3d616ee71e3..46c170dd95e 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
@@ -15,6 +15,7 @@ insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed2 select * from innodb_compressed1;
insert into innodb_compressed3 select * from innodb_compressed1;
insert into innodb_compressed4 select * from innodb_compressed1;
+# restart
# t1 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed1.ibd
# t2 yes on expecting NOT FOUND
@@ -95,6 +96,7 @@ NOT FOUND /private/ in innodb_compressed2.ibd
NOT FOUND /private/ in innodb_compressed3.ibd
# t4 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed4.ibd
+# restart
select * from innodb_compressed1 where d = 40;
c1 d a b
3 40 private evenmoreprivate
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_tables.result b/mysql-test/suite/encryption/r/innodb_encryption_tables.result
index e7bcc207612..1445e78c72f 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_tables.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_tables.result
@@ -101,6 +101,7 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
variable_value >= 0
1
+# restart
update innodb_normal set c1 = c1 + 1;
update innodb_compact set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1;
diff --git a/mysql-test/suite/encryption/r/innodb_first_page.result b/mysql-test/suite/encryption/r/innodb_first_page.result
index aaef462e639..cf576947d9d 100644
--- a/mysql-test/suite/encryption/r/innodb_first_page.result
+++ b/mysql-test/suite/encryption/r/innodb_first_page.result
@@ -1,2 +1,4 @@
+# restart
create table t1 (a int);
+# restart
drop table t1;
diff --git a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
index 779eb5917cd..de0ddf5efe3 100644
--- a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
@@ -40,6 +40,7 @@ NOT FOUND /author/ in t5.ibd
NOT FOUND /mangled/ in t6.ibd
# t7 ... on expecting NOT FOUND
NOT FOUND /mysql/ in t7.ibd
+# restart
SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 ADD COLUMN b int default 2;
ALTER TABLE t2 ADD COLUMN b int default 2;
@@ -134,5 +135,6 @@ NOT FOUND /author/ in t5.ibd
NOT FOUND /mangled/ in t6.ibd
# t7 ... on expecting NOT FOUND
NOT FOUND /mysql/ in t7.ibd
+# restart
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3, t4, t5, t6, t7;
diff --git a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
index d3406e67f18..2b661d531f4 100644
--- a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
+++ b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
@@ -1,4 +1,4 @@
-# Restart mysqld --loose-file-key-management-filename=keys2.txt
+# restart: --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
Level Code Message
@@ -65,7 +65,7 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0
1
-# Restart mysqld --loose-file-key-management-filename=keys3.txt
+# restart: --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
select * from innodb_normal;
c1 b
1 test1
diff --git a/mysql-test/suite/encryption/r/instant_alter_import.result b/mysql-test/suite/encryption/r/instant_alter_import.result
new file mode 100644
index 00000000000..cb6e7ea7307
--- /dev/null
+++ b/mysql-test/suite/encryption/r/instant_alter_import.result
@@ -0,0 +1,24 @@
+SET GLOBAL innodb_encrypt_tables = ON;
+SET GLOBAL innodb_encryption_threads = 4;
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i2 INT, i1 INT)
+ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
+INSERT INTO t1 (i2) SELECT 4 FROM seq_1_to_1024;
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+DROP TABLE t2, t1;
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i2 INT, i1 INT)
+ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=4 PAGE_COMPRESSED=1;
+INSERT INTO t1 (i2) SELECT 4 FROM seq_1_to_1024;
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+DROP TABLE t2, t1;
+SET GLOBAL innodb_encrypt_tables = OFF;
+SET GLOBAL innodb_encryption_threads = 0;
diff --git a/mysql-test/suite/encryption/r/key_version_rotation.result b/mysql-test/suite/encryption/r/key_version_rotation.result
index 1a295abfe8d..afc0a0dd122 100644
--- a/mysql-test/suite/encryption/r/key_version_rotation.result
+++ b/mysql-test/suite/encryption/r/key_version_rotation.result
@@ -2,6 +2,7 @@ create table t1(f1 int not null)engine=innodb;
create table t2(f1 int not null)engine=innodb;
insert into t1 select * from seq_1_to_100;
insert into t2 select * from seq_1_to_100;
+# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=1 --innodb_encryption_rotate_key_age=9
# Enable encryption
set global innodb_encrypt_tables=ON;
# Create a new table and it is added to rotation list
diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
index 16e3d622f50..1d559891bd7 100644
--- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result
+++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
@@ -4344,6 +4344,17 @@ DROP TABLE t1;
# End of 10.3 tests
#
#
+# MDEV-16722: Assertion `type() != NULL_ITEM' failed
+#
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+SELECT row_number() OVER (order by a) FROM t1 order by NAME_CONST('myname',NULL);
+row_number() OVER (order by a)
+1
+2
+3
+drop table t1;
+#
# MDEV-23867: select crash in compute_window_func
#
set @save_sort_buffer_size=@@sort_buffer_size;
@@ -4363,3 +4374,16 @@ COUNT(*) MAX(c)
set @@sort_buffer_size=@save_sort_buffer_size;
DROP TABLE t1,t2,t3;
# end of 10.2 test
+#
+# MDEV-22556: Incorrect result for window function when using encrypt-tmp-files=ON
+#
+set @save_sort_buffer_size=@@sort_buffer_size;
+set sort_buffer_size= 2000;
+create table t1( a DECIMAL(12,0) DEFAULT NULL, b VARCHAR(20) DEFAULT NULL, c DECIMAL(12,0) DEFAULT NULL)engine=INNODB;
+insert into t1 select seq, seq, seq from seq_1_to_5000;
+select count(*) from (select a, b, c, ROW_NUMBER() OVER (PARTITION BY a) FROM t1)q;
+count(*)
+5000
+set @@sort_buffer_size=@save_sort_buffer_size;
+drop table t1;
+# End of 10.4 tests
diff --git a/mysql-test/suite/encryption/t/compressed_import_tablespace.test b/mysql-test/suite/encryption/t/compressed_import_tablespace.test
index b9e4913584b..e79fdb17f02 100644
--- a/mysql-test/suite/encryption/t/compressed_import_tablespace.test
+++ b/mysql-test/suite/encryption/t/compressed_import_tablespace.test
@@ -16,9 +16,8 @@ SHOW CREATE TABLE t1;
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING <> 0
--source include/wait_condition.inc
---source include/shutdown_mysqld.inc
-
---source include/start_mysqld.inc
+let $restart_noprint=2;
+--source include/restart_mysqld.inc
let MYSQLD_DATADIR =`SELECT @@datadir`;
--list_files $MYSQLD_DATADIR/test
diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.combinations b/mysql-test/suite/encryption/t/corrupted_during_recovery.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
index 94fcd5f382d..42cdd13d206 100644
--- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
@@ -11,10 +11,12 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3
call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table.");
--enable_query_log
+let INNODB_CHECKSUM_ALGORITHM = `SELECT @@innodb_checksum_algorithm`;
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES;
INSERT INTO t1 VALUES(1);
# Force a redo log checkpoint.
+let $restart_noprint=2;
--source include/restart_mysqld.inc
--source ../../suite/innodb/include/no_checkpoint_start.inc
CREATE TABLE t2(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES;
@@ -33,7 +35,8 @@ my $ps = $ENV{INNODB_PAGE_SIZE};
my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd";
open(FILE, "+<$file") || die "Unable to open $file";
binmode FILE;
-seek (FILE, $ENV{INNODB_PAGE_SIZE} * 3, SEEK_SET) or die "seek";
+my $offset = ($ENV{INNODB_CHECKSUM_ALGORITHM} =~ /full_crc32/) ? 26 : 0;
+seek (FILE, $ENV{INNODB_PAGE_SIZE} * 3 + $offset, SEEK_SET) or die "seek";
print FILE "junk";
close FILE or die "close";
@@ -51,7 +54,7 @@ EOF
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
--disable_query_log
-call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[1].ibd looks corrupted; key_version=1786080875");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[1].ibd looks corrupted; key_version=");
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted. Please drop the table and recreate.");
--enable_query_log
let $restart_parameters=--innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup;
diff --git a/mysql-test/suite/encryption/t/debug_key_management.test b/mysql-test/suite/encryption/t/debug_key_management.test
index 22b213c6135..c370ecf5bd8 100644
--- a/mysql-test/suite/encryption/t/debug_key_management.test
+++ b/mysql-test/suite/encryption/t/debug_key_management.test
@@ -1,10 +1,15 @@
-- source include/have_innodb.inc
+-- source include/have_debug.inc
+-- source include/not_embedded.inc
+
if (`select count(*) = 0 from information_schema.plugins
where plugin_name = 'debug_key_management' and plugin_status='active'`)
{
--skip Needs debug_key_management
}
+create table t1(a serial) engine=innoDB;
+
set global innodb_encrypt_tables=ON;
show variables like 'innodb_encrypt%';
@@ -17,10 +22,21 @@ set global debug_key_management_version=10;
let $wait_condition= select count(*) = $tables_count from information_schema.innodb_tablespaces_encryption where current_key_version=10;
--source include/wait_condition.inc
-
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10;
+
+# Test redo log key rotation and crash recovery.
+SET GLOBAL debug_dbug = '+d,ib_log';
+SET GLOBAL innodb_log_checkpoint_now = 1;
+SET GLOBAL innodb_flush_log_at_trx_commit = 1;
+INSERT INTO t1 VALUES(NULL);
+let $shutdown_timeout = 0;
+-- source include/restart_mysqld.inc
+
# Note that we expect that key_version is increasing so disable encryption before reset
set global innodb_encrypt_tables=OFF;
set global debug_key_management_version=1;
+select * from t1;
+
+drop table t1;
diff --git a/mysql-test/suite/encryption/t/encryption_key_corruption.test b/mysql-test/suite/encryption/t/encryption_key_corruption.test
index defb2af741e..9b4bd172a3a 100644
--- a/mysql-test/suite/encryption/t/encryption_key_corruption.test
+++ b/mysql-test/suite/encryption/t/encryption_key_corruption.test
@@ -35,7 +35,7 @@ ALTER TABLE dst DISCARD TABLESPACE;
--copy_file $MYSQLD_DATADIR/test/tmp.ibd $MYSQLD_DATADIR/test/dst.ibd
--copy_file $MYSQLD_DATADIR/test/tmp.cfg $MYSQLD_DATADIR/test/dst.cfg
---error ER_INTERNAL_ERROR
+--error ER_NOT_KEYFILE
ALTER TABLE dst IMPORT TABLESPACE;
DROP TABLE dst;
diff --git a/mysql-test/suite/encryption/t/file_creation.test b/mysql-test/suite/encryption/t/file_creation.test
index a0c90975a37..6b0126831a4 100644
--- a/mysql-test/suite/encryption/t/file_creation.test
+++ b/mysql-test/suite/encryption/t/file_creation.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
--source include/have_example_key_management_plugin.inc
-
+let $restart_noprint=2;
# embedded does not support restart
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test
index 16122b77045..1dca45a0711 100644
--- a/mysql-test/suite/encryption/t/innochecksum.test
+++ b/mysql-test/suite/encryption/t/innochecksum.test
@@ -8,16 +8,19 @@
-- source include/have_innodb.inc
-- source include/have_file_key_management_plugin.inc
-- source include/innodb_page_size_small.inc
+-- source include/innodb_checksum_algorithm.inc
if (!$INNOCHECKSUM) {
--echo Need innochecksum binary
--die Need innochecksum binary
}
+let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`;
SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
+
--echo # Create and populate a tables
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
@@ -136,7 +139,20 @@ EOF
--exec $INNOCHECKSUM $t3_IBD
--echo # Run innochecksum on t6
---echo # no encryption corrupting the field should not have effect
+--echo # In new checksum format, checksum calculated for whole page.
+--echo # So It should affected.
+let $error_code = 0;
+if ($checksum_algorithm == "full_crc32")
+{
+ let $error_code = 1;
+}
+
+if ($checksum_algorithm == "strict_full_crc32")
+{
+ let $error_code = 1;
+}
+
+--error $error_code
--exec $INNOCHECKSUM $t6_IBD
--enable_result_log
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.combinations b/mysql-test/suite/encryption/t/innodb-bad-key-change.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index 552b9867d69..a9a32a3d6fc 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -16,6 +16,8 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
+# for innodb_checksum_algorithm=full_crc32 only
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.combinations b/mysql-test/suite/encryption/t/innodb-bad-key-change2.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
index f100c330bad..19399b1e891 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
@@ -17,8 +17,10 @@ call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
+# for innodb_checksum_algorithm=full_crc32 only
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
@@ -27,7 +29,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--source include/restart_mysqld.inc
--error ER_NO_SUCH_TABLE_IN_ENGINE
@@ -46,7 +48,7 @@ CHECK TABLE t1;
--replace_regex /key_id [1-9][0-9]*/\1 /
SHOW WARNINGS;
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
let MYSQLD_DATADIR =`SELECT @@datadir`;
@@ -58,7 +60,7 @@ ib_backup_tablespaces("test", "t1");
EOF
UNLOCK TABLES;
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--source include/restart_mysqld.inc
--error ER_NO_SUCH_TABLE_IN_ENGINE
@@ -76,7 +78,7 @@ ib_discard_tablespaces("test", "t1");
ib_restore_tablespaces("test", "t1");
EOF
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
ALTER TABLE t1 DISCARD TABLESPACE;
@@ -90,7 +92,7 @@ EOF
ALTER TABLE t1 IMPORT TABLESPACE;
SHOW CREATE TABLE t1;
---let $restart_parameters= --innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
+--let $restart_parameters= --innodb-encrypt-tables --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--source include/restart_mysqld.inc
--error ER_ERROR_ON_RENAME
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change3.combinations b/mysql-test/suite/encryption/t/innodb-bad-key-change3.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change3.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
index dbd04748143..9c2918f3118 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
@@ -25,7 +25,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau
4;770A8A65DA156D24EE2A093277530143
EOF
---exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -62,7 +62,7 @@ ib_discard_tablespaces("test", "t1");
ib_restore_tablespaces("test", "t1");
EOF
---exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--source include/restart_mysqld.inc
@@ -89,7 +89,7 @@ SELECT * FROM t1;
4;770A8A65DA156D24EE2A093277530143
EOF
---exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.combinations b/mysql-test/suite/encryption/t/innodb-bad-key-change4.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
index d2f75a3d6c1..58517f14978 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
@@ -13,8 +13,10 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+# for innodb_checksum_algorithm=full_crc32 only
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
SET GLOBAL innodb_file_per_table = ON;
@@ -23,7 +25,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--source include/restart_mysqld.inc
--replace_regex /key_id [1-9][0-9]*/\1 /
@@ -36,7 +38,7 @@ CHECK TABLE t1;
--replace_regex /key_id [1-9][0-9]*/\1 /
SHOW WARNINGS;
---let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/t/innodb-discard-import-change.combinations b/mysql-test/suite/encryption/t/innodb-discard-import-change.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-discard-import-change.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb-discard-import.combinations b/mysql-test/suite/encryption/t/innodb-discard-import.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-discard-import.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
index 2e18b15079b..f0177b2ca4e 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
@@ -124,6 +124,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT;
let $restart_parameters = --innodb_encryption_threads=2;
+let $restart_noprint = 2;
--let $shutdown_timeout= 0
--source include/restart_mysqld.inc
disconnect con1;
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
index 4d0aa04bc56..2097a4ad184 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
@@ -16,7 +16,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` is corrupted");
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
---let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
create table t5 (
@@ -48,7 +48,7 @@ select * from t1;
--error ER_NO_SUCH_TABLE_IN_ENGINE
select * from t5;
---let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
drop table t1;
diff --git a/mysql-test/suite/encryption/t/innodb-first-page-read.test b/mysql-test/suite/encryption/t/innodb-first-page-read.test
deleted file mode 100644
index 600a41cf5ec..00000000000
--- a/mysql-test/suite/encryption/t/innodb-first-page-read.test
+++ /dev/null
@@ -1,111 +0,0 @@
--- source include/have_innodb.inc
--- source include/have_file_key_management_plugin.inc
--- source include/not_embedded.inc
--- source include/have_symlink.inc
-
-FLUSH STATUS;
-
-create database innodb_test;
-use innodb_test;
-create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
-create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
-create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic;
-create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed;
-create table innodb_compressed1(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=1;
-create table innodb_compressed2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=2;
-create table innodb_compressed4(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=4;
-create table innodb_compressed8(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=8;
-create table innodb_compressed16(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=16;
-create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
-create table innodb_pagecomp(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes;
-create table innodb_pagecomp1(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=1;
-create table innodb_pagecomp2(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=2;
-create table innodb_pagecomp3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=3;
-create table innodb_pagecomp4(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=4;
-create table innodb_pagecomp5(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=5;
-create table innodb_pagecomp6(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=6;
-create table innodb_pagecomp7(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=7;
-create table innodb_pagecomp8(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=8;
-create table innodb_pagecomp9(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=9;
-
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-eval create table innodb_datadir1(c1 bigint not null, b char(200)) engine=innodb DATA DIRECTORY='$MYSQL_TMP_DIR';
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-eval create table innodb_datadir2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed DATA DIRECTORY='$MYSQL_TMP_DIR';
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-eval create table innodb_datadir3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes DATA DIRECTORY='$MYSQL_TMP_DIR';
-
-begin;
-insert into innodb_normal values (1,'secret');
-insert into innodb_compact select * from innodb_normal;
-insert into innodb_dynamic select * from innodb_normal;
-insert into innodb_compressed select * from innodb_normal;
-insert into innodb_compressed1 select * from innodb_normal;
-insert into innodb_compressed2 select * from innodb_normal;
-insert into innodb_compressed4 select * from innodb_normal;
-insert into innodb_compressed8 select * from innodb_normal;
-insert into innodb_compressed16 select * from innodb_normal;
-insert into innodb_redundant select * from innodb_normal;
-insert into innodb_pagecomp select * from innodb_normal;
-insert into innodb_pagecomp1 select * from innodb_normal;
-insert into innodb_pagecomp2 select * from innodb_normal;
-insert into innodb_pagecomp3 select * from innodb_normal;
-insert into innodb_pagecomp4 select * from innodb_normal;
-insert into innodb_pagecomp5 select * from innodb_normal;
-insert into innodb_pagecomp6 select * from innodb_normal;
-insert into innodb_pagecomp7 select * from innodb_normal;
-insert into innodb_pagecomp8 select * from innodb_normal;
-insert into innodb_pagecomp9 select * from innodb_normal;
-insert into innodb_datadir1 select * from innodb_normal;
-insert into innodb_datadir2 select * from innodb_normal;
-insert into innodb_datadir3 select * from innodb_normal;
-commit;
-
-FLUSH STATUS;
-
---echo # Restart server and see how many page 0's are read
---source include/restart_mysqld.inc
-
---echo # result should actual number of tables except remote tables could be read twice
---echo # i.e. < 23 + 3*2 = 29
-
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-use innodb_test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-use test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-
-set global innodb_encrypt_tables=OFF;
-
---echo # wait until tables are decrypted
-SET GLOBAL innodb_max_dirty_pages_pct=0.0;
-SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
-
-let $wait_condition =
-SELECT variable_value = 0
-FROM information_schema.global_status
-WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
---source include/wait_condition.inc
-
---echo # result should be actual number of tables except remote tables could be read twice
---echo # i.e. < 23 + 3*2 = 29
-
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-use innodb_test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-use test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-
-FLUSH STATUS;
-
---echo # restart and see number read page 0
--- source include/restart_mysqld.inc
-
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-use innodb_test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-use test;
-SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
-
-drop database innodb_test;
-FLUSH STATUS;
diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
index 399f70e2322..8144f4597e2 100644
--- a/mysql-test/suite/encryption/t/innodb-force-corrupt.test
+++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
@@ -8,7 +8,7 @@
-- source include/not_embedded.inc
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
-call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=3221342974");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("\\[ERROR\\] mysqld.*: Index for table 't2' is corrupt; try to repair it");
diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.combinations b/mysql-test/suite/encryption/t/innodb-redo-badkey.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.test b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
index 484246dbe32..50f81deb462 100644
--- a/mysql-test/suite/encryption/t/innodb-redo-badkey.test
+++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
@@ -2,6 +2,10 @@
-- source include/have_file_key_management_plugin.inc
# embedded does not support restart
-- source include/not_embedded.inc
+# MDEV-20839 innodb-redo-badkey sporadically fails on buildbot with page dump
+# We only require a debug build to avoid getting page dumps, making use of
+# MDEV-19766: Disable page dump output in debug builds
+-- source include/have_debug.inc
call mtr.add_suppression("Plugin 'file_key_management'");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
@@ -12,8 +16,9 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed f
call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
+# for innodb_checksum_algorithm=full_crc32 only
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
---echo # Restart mysqld --file-key-management-filename=keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
@@ -69,7 +74,6 @@ let $cleanup= drop table t1,t2,t3,t4;
--let CLEANUP_IF_CHECKPOINT= $cleanup;
--source ../../suite/innodb/include/no_checkpoint_end.inc
---echo # restart
--error 1
-- source include/start_mysqld.inc
--source include/kill_mysqld.inc
@@ -78,14 +82,12 @@ let $cleanup= drop table t1,t2,t3,t4;
# Now test with innodb-force-recovery=1 i.e. ignore corrupt pages
#
---echo # Restart mysqld --innodb-force-recovery=1
-- let $restart_parameters=--innodb-force-recovery=1
--error 1
-- source include/start_mysqld.inc
--source include/kill_mysqld.inc
---echo # Restart mysqld --file-key-management-filename=keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/start_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
index 66720eb8585..6fa28cd8ca8 100644
--- a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
+++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
@@ -11,7 +11,6 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
call mtr.add_suppression("InnoDB: The page \\[page id: space=[0-9]+, page number=[0-9]+\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
---echo # Restart mysqld --file-key-management-filename=keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
@@ -61,13 +60,11 @@ let $cleanup= drop table t1,t2,t3,t4;
--let CLEANUP_IF_CHECKPOINT= $cleanup;
--source ../../suite/innodb/include/no_checkpoint_end.inc
---echo # restart
-- source include/start_mysqld.inc
#
# In above server does start but InnoDB refuses to start
# thus we need to restart server with correct key file
#
---echo # Restart mysqld --file-key-management-filename=keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/innodb-remove-encryption.test b/mysql-test/suite/encryption/t/innodb-remove-encryption.test
index 24e00a00a02..3d719dbef74 100644
--- a/mysql-test/suite/encryption/t/innodb-remove-encryption.test
+++ b/mysql-test/suite/encryption/t/innodb-remove-encryption.test
@@ -18,7 +18,7 @@ create table t1(a int not null primary key, b char(200)) engine=innodb;
--echo
--echo # Restart server with encryption
--- let $restart_parameters=--plugin-load-add=$FILE_KEY_MANAGEMENT_SO --loose-file-key-management --loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt --file-key-management-encryption-algorithm=aes_cbc --innodb-encrypt-tables=ON --innodb-encryption-threads=4 --innodb-tablespaces-encryption --innodb-encryption-rotate-key-age=15
+-- let $restart_parameters=--plugin-load-add=file_key_management --loose-file-key-management --loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt --file-key-management-encryption-algorithm=aes_cbc --innodb-encrypt-tables=ON --innodb-encryption-threads=4 --innodb-tablespaces-encryption --innodb-encryption-rotate-key-age=15
-- source include/restart_mysqld.inc
--echo # Wait until encryption threads have encrypted all tablespaces
diff --git a/mysql-test/suite/encryption/t/innodb-spatial-index.test b/mysql-test/suite/encryption/t/innodb-spatial-index.test
index 2bf56817740..2caffb141e1 100644
--- a/mysql-test/suite/encryption/t/innodb-spatial-index.test
+++ b/mysql-test/suite/encryption/t/innodb-spatial-index.test
@@ -1,25 +1,43 @@
--source include/have_innodb.inc
--source include/have_file_key_management_plugin.inc
+--source include/innodb_checksum_algorithm.inc
#
# MDEV-11974: MariaDB 10.2 encryption does not support spatial indexes
#
#
-# (1) Do not allow creating table with ENCRYPTED=YES
#
#
---error ER_CANT_CREATE_TABLE
+let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`;
+let $error_code = ER_CANT_CREATE_TABLE, ER_ILLEGAL_HA_CREATE_OPTION;
+if ($checksum_algorithm == "full_crc32")
+{
+ let $error_code = 0;
+}
+if ($checksum_algorithm == "strict_full_crc32")
+{
+ let $error_code = 0;
+}
+
+--error $error_code
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
ENCRYPTED=YES;
+if (!$error_code) {
+INSERT INTO t1(c, coordinate) values('mysql', ST_GeomFromText('POINT(903994614 180726515)'));
+--source include/restart_mysqld.inc
+INSERT INTO t1(c, coordinate) values('mariadb', ST_GeomFromText('POINT(903994614 180726515)'));
+DROP TABLE t1;
+}
+
#
# (2) Alter table
#
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
---error ER_ILLEGAL_HA_CREATE_OPTION
+--error $error_code
ALTER TABLE t1 ENCRYPTED=YES;
DROP TABLE t1;
@@ -27,17 +45,18 @@ DROP TABLE t1;
# Index creation
#
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
-c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
+c VARCHAR(256), coordinate POINT NOT NULL)
+PAGE_COMPRESSED=YES, ENCRYPTED=YES ENGINE=INNODB;
# FIXME: MDEV-13851 Encrypted table refuses some form of ALGORITHM=COPY,
# but allows rebuild by FORCE
---error ER_CANT_CREATE_TABLE
-ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), FORCE, ALGORITHM=INPLACE;
---error ER_ILLEGAL_HA_CREATE_OPTION
+--error $error_code
+ALTER TABLE t1 ADD SPATIAL INDEX b1(coordinate), ALGORITHM=COPY;
+--error $error_code
+ALTER TABLE t1 ADD SPATIAL INDEX b2(coordinate), FORCE, ALGORITHM=INPLACE;
+--error $error_code
ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);
---error ER_ILLEGAL_HA_CREATE_OPTION
-CREATE SPATIAL INDEX b on t1(coordinate);
+--error $error_code
+CREATE SPATIAL INDEX b3 on t1(coordinate);
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_freed.opt b/mysql-test/suite/encryption/t/innodb_encrypt_freed.opt
new file mode 100644
index 00000000000..f6f932c680d
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_freed.opt
@@ -0,0 +1,5 @@
+--innodb-encrypt-tables
+--innodb-encrypt-log
+--innodb-encryption-threads=1
+--innodb-tablespaces-encryption
+--innodb-log-optimize-ddl=OFF
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_freed.test b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
new file mode 100644
index 00000000000..951fc93eef5
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
@@ -0,0 +1,121 @@
+--source include/have_innodb.inc
+--source include/have_example_key_management_plugin.inc
+--source include/have_debug.inc
+--source include/not_embedded.inc
+
+SHOW VARIABLES LIKE 'innodb_encrypt%';
+
+SET GLOBAL innodb_encrypt_tables = ON;
+
+CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null,
+ f3 int not null, index(f1), index idx_1(f2),
+ index(f2, f3)) ENGINE=InnoDB;
+--let $tables_count= `select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`
+
+--echo # Wait max 10 min for key encryption threads to encrypt all spaces
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+--source include/wait_condition.inc
+--sorted_result
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+
+CREATE TABLE t2 (f1 int not null)engine=innodb;
+let $restart_parameters="--debug=d,ib_log_checkpoint_avoid";
+--source include/restart_mysqld.inc
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+
+# Stop the purge
+connect(con1,localhost,root,,,);
+begin;
+insert into t2 values(1);
+
+connection default;
+
+--let $tables_count= `select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`
+set global innodb_encrypt_tables = OFF;
+
+--echo # Wait max 10 min for key encryption threads to decrypt all spaces
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--source include/wait_condition.inc
+--sorted_result
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+
+# Free the index `idx_1`
+alter table t1 drop index idx_1;
+
+set global innodb_encrypt_tables = ON;
+
+--echo # Wait max 10 min for key encryption threads to encrypt all spaces
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+--source include/wait_condition.inc
+--sorted_result
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+
+disconnect con1;
+let $shutdown_timeout=0;
+--source include/restart_mysqld.inc
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+
+drop table t1, t2;
+
+#
+#
+CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null,
+ f3 int not null, index(f1), index idx_1(f2),
+ index(f2, f3)) ENGINE=InnoDB;
+--let $tables_count= `select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`
+
+--echo # Wait max 10 min for key encryption threads to encrypt all spaces
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+--source include/wait_condition.inc
+--sorted_result
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+
+CREATE TABLE t2 (f1 int not null)engine=innodb;
+--source include/restart_mysqld.inc
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+
+# Stop the purge
+connect(con1,localhost,root,,,);
+begin;
+insert into t2 values(1);
+
+connection default;
+
+--let $tables_count= `select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`
+set global innodb_encrypt_tables = OFF;
+
+--echo # Wait max 10 min for key encryption threads to decrypt all spaces
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--source include/wait_condition.inc
+--sorted_result
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+
+# Free the index `idx_1`
+alter table t1 drop index idx_1;
+
+disconnect con1;
+--source include/restart_mysqld.inc
+SET GLOBAL innodb_log_checkpoint_now=TRUE;
+
+# Stop the purge
+connect(con1,localhost,root,,,);
+begin;
+insert into t2 values(1);
+
+connection default;
+set global innodb_encrypt_tables = ON;
+
+--echo # Wait max 10 min for key encryption threads to encrypt all spaces
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+--source include/wait_condition.inc
+--sorted_result
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+
+disconnect con1;
+drop table t2, t1;
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test b/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test
index c3fafb0751b..bc4c43e1ce8 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_key_rotation_age.test
@@ -14,6 +14,7 @@ INSERT INTO t3 SELECT * FROM t1;
--echo # Restart the server with encryption
+let $restart_noprint=2;
let $restart_parameters= --innodb_encryption_threads=5 --innodb_encryption_rotate_key_age=16384;
--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.combinations b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test
index c1a6ad38456..d99a55b9b44 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test
@@ -22,4 +22,3 @@ WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
SELECT variable_value > @old_decrypted FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';
---source include/restart_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/innodb_encryption.test b/mysql-test/suite/encryption/t/innodb_encryption.test
index f10b5735527..2b0b2b8d7fb 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption.test
@@ -14,9 +14,7 @@ SHOW VARIABLES LIKE 'innodb_encrypt%';
SET GLOBAL innodb_encrypt_tables = ON;
-let $undo_count= `select @@global.innodb_undo_tablespaces`;
-
---let $tables_count= `select count(*) + 1 + $undo_count from information_schema.tables where engine = 'InnoDB'`
+--let $tables_count= `select count(*) + @@global.innodb_undo_tablespaces + 1 from information_schema.tables where engine = 'InnoDB'`
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
--let $wait_timeout= 600
diff --git a/mysql-test/suite/encryption/t/innodb_import.test b/mysql-test/suite/encryption/t/innodb_import.test
index 791a1757878..2e5470c5568 100644
--- a/mysql-test/suite/encryption/t/innodb_import.test
+++ b/mysql-test/suite/encryption/t/innodb_import.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--- source include/have_example_key_management_plugin.inc
+--source include/have_example_key_management_plugin.inc
+--source include/innodb_checksum_algorithm.inc
--echo #
--echo # MDEV-26131 SEGV in ha_innobase::discard_or_import_tablespace
--echo #
diff --git a/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test b/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test
index 1babf577473..acba1f600e7 100644
--- a/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test
+++ b/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test
@@ -3,7 +3,6 @@
# embedded does not support restart
-- source include/not_embedded.inc
---echo # Restart mysqld --loose-file-key-management-filename=keys2.txt
-- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
@@ -43,7 +42,6 @@ select * from innodb_redundant;
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
---echo # Restart mysqld --loose-file-key-management-filename=keys3.txt
-- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
-- source include/restart_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/instant_alter_import.test b/mysql-test/suite/encryption/t/instant_alter_import.test
new file mode 100644
index 00000000000..3a00c54665c
--- /dev/null
+++ b/mysql-test/suite/encryption/t/instant_alter_import.test
@@ -0,0 +1,52 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source include/have_file_key_management_plugin.inc
+
+SET GLOBAL innodb_encrypt_tables = ON;
+SET GLOBAL innodb_encryption_threads = 4;
+
+
+--let $MYSQLD_DATADIR= `SELECT @@datadir`
+
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i2 INT, i1 INT)
+ ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
+
+INSERT INTO t1 (i2) SELECT 4 FROM seq_1_to_1024;
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+FLUSH TABLE t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+DROP TABLE t2, t1;
+
+
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i2 INT, i1 INT)
+ ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=4 PAGE_COMPRESSED=1;
+
+INSERT INTO t1 (i2) SELECT 4 FROM seq_1_to_1024;
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+FLUSH TABLE t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+DROP TABLE t2, t1;
+
+
+SET GLOBAL innodb_encrypt_tables = OFF;
+SET GLOBAL innodb_encryption_threads = 0;
diff --git a/mysql-test/suite/encryption/t/tempfiles_encrypted.test b/mysql-test/suite/encryption/t/tempfiles_encrypted.test
index 962893df3f9..7628442f884 100644
--- a/mysql-test/suite/encryption/t/tempfiles_encrypted.test
+++ b/mysql-test/suite/encryption/t/tempfiles_encrypted.test
@@ -29,3 +29,19 @@ set @@sort_buffer_size=@save_sort_buffer_size;
DROP TABLE t1,t2,t3;
--echo # end of 10.2 test
+
+--echo #
+--echo # MDEV-22556: Incorrect result for window function when using encrypt-tmp-files=ON
+--echo #
+
+set @save_sort_buffer_size=@@sort_buffer_size;
+set sort_buffer_size= 2000;
+create table t1( a DECIMAL(12,0) DEFAULT NULL, b VARCHAR(20) DEFAULT NULL, c DECIMAL(12,0) DEFAULT NULL)engine=INNODB;
+insert into t1 select seq, seq, seq from seq_1_to_5000;
+select count(*) from (select a, b, c, ROW_NUMBER() OVER (PARTITION BY a) FROM t1)q;
+
+set @@sort_buffer_size=@save_sort_buffer_size;
+
+drop table t1;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/suite/engines/README b/mysql-test/suite/engines/README
index fde920dbc25..0a1e43cb0b7 100644
--- a/mysql-test/suite/engines/README
+++ b/mysql-test/suite/engines/README
@@ -2,6 +2,11 @@ This directory includes a set of three test suites aimed as testing
functionality in an engine independent way, that is - the tests should
work identically against different engines.
+If you are an engine writer and wants to test if your engine is compatible with
+other engines in MariaDB, you should instead of using this test suite use
+the storage_engine test suite which is more suitable for that purpose.
+
+
The following suites are included:
1) 'funcs' suite
diff --git a/mysql-test/suite/engines/funcs/r/an_calendar.result b/mysql-test/suite/engines/funcs/r/an_calendar.result
index f057c3b618f..669b097b325 100644
--- a/mysql-test/suite/engines/funcs/r/an_calendar.result
+++ b/mysql-test/suite/engines/funcs/r/an_calendar.result
@@ -11,6 +11,7 @@ Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c2' at row 1
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 TIME NULL, c2 TIME NULL);
@@ -25,6 +26,7 @@ Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c2' at row 1
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DATETIME NULL, c2 DATETIME NULL);
@@ -33,6 +35,7 @@ INSERT INTO t1 VALUES(NOW(),NOW());
INSERT INTO t1 VALUES(NOW(),NOW());
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 TIMESTAMP NULL, c2 TIMESTAMP NULL);
@@ -41,5 +44,6 @@ INSERT INTO t1 VALUES(NOW(),NOW());
INSERT INTO t1 VALUES(NOW(),NOW());
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/r/an_number.result b/mysql-test/suite/engines/funcs/r/an_number.result
index a77fc0e7d69..257213d0bf8 100644
--- a/mysql-test/suite/engines/funcs/r/an_number.result
+++ b/mysql-test/suite/engines/funcs/r/an_number.result
@@ -4,6 +4,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT NULL, c2 SMALLINT NULL);
@@ -11,6 +12,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT NULL, c2 MEDIUMINT NULL);
@@ -18,6 +20,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 INT NULL, c2 INT NULL);
@@ -25,6 +28,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER NULL, c2 INTEGER NULL);
@@ -32,6 +36,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT NULL, c2 BIGINT NULL);
@@ -39,6 +44,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DECIMAL NULL, c2 DECIMAL NULL);
@@ -46,6 +52,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DEC NULL, c2 DEC NULL);
@@ -53,6 +60,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 FIXED NULL, c2 FIXED NULL);
@@ -60,6 +68,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 NUMERIC NULL, c2 NUMERIC NULL);
@@ -67,6 +76,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DOUBLE NULL, c2 DOUBLE NULL);
@@ -74,6 +84,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 REAL NULL, c2 REAL NULL);
@@ -81,6 +92,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DOUBLE PRECISION NULL, c2 DOUBLE PRECISION NULL);
@@ -88,6 +100,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 FLOAT NULL, c2 FLOAT NULL);
@@ -95,5 +108,6 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/r/an_string.result b/mysql-test/suite/engines/funcs/r/an_string.result
index c7762155a7d..f3e7eaedb15 100644
--- a/mysql-test/suite/engines/funcs/r/an_string.result
+++ b/mysql-test/suite/engines/funcs/r/an_string.result
@@ -4,6 +4,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(100) NULL, c2 VARCHAR(100) NULL);
@@ -11,6 +12,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 BINARY(100) NULL, c2 BINARY(100) NULL);
@@ -18,6 +20,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 VARBINARY(100) NULL, c2 VARBINARY(100) NULL);
@@ -25,6 +28,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 BLOB(100) NULL, c2 BLOB(100) NULL);
@@ -32,6 +36,9 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c1'
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c2'
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT(100) NULL, c2 TEXT(100) NULL);
@@ -39,5 +46,8 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c1'
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c2'
test.t1 analyze status OK
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_do_grant.result b/mysql-test/suite/engines/funcs/r/rpl_do_grant.result
index 0797e66e9ec..e4b08800287 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_do_grant.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_do_grant.result
@@ -1,14 +1,6 @@
include/master-slave.inc
[connection master]
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
-connection slave;
-delete from mysql.user where user=_binary'rpl_ignore_grant';
-delete from mysql.db where user=_binary'rpl_ignore_grant';
-flush privileges;
-connection master;
create user rpl_do_grant@localhost;
grant select on *.* to rpl_do_grant@localhost;
grant drop on test.* to rpl_do_grant@localhost;
@@ -20,11 +12,11 @@ GRANT DROP ON `test`.* TO `rpl_do_grant`@`localhost`
connection master;
set password for rpl_do_grant@localhost=password("does it work?");
connection slave;
-select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
-authentication_string<>_binary''
+select authentication_string<>'' from mysql.user where user='rpl_do_grant';
+authentication_string<>''
1
connection master;
-update mysql.user set authentication_string='' where user='rpl_do_grant';
+update mysql.global_priv set priv=json_remove(priv, '$.authentication_string') where user='rpl_do_grant';
flush privileges;
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
authentication_string<>''
@@ -37,13 +29,8 @@ select authentication_string<>'' from mysql.user where user='rpl_do_grant';
authentication_string<>''
1
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
+drop user rpl_do_grant@localhost;
connection slave;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
connection master;
show grants for rpl_do_grant@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
@@ -328,4 +315,6 @@ Grantor
root@localhost
connection master;
DROP USER user_bug27606@localhost;
+select priv into @root_priv from mysql.global_priv where user='root' and host='127.0.0.1';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
include/rpl_end.inc
diff --git a/mysql-test/suite/engines/funcs/r/rpl_drop_db.result b/mysql-test/suite/engines/funcs/r/rpl_drop_db.result
index 1b132c20afc..3712527afe4 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_drop_db.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_drop_db.result
@@ -6,6 +6,8 @@ create database mysqltest1;
create table mysqltest1.t1 (n int);
insert into mysqltest1.t1 values (1);
select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create table mysqltest1.t2 (n int);
create table mysqltest1.t3 (n int);
drop database mysqltest1;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_ignore_revoke.result b/mysql-test/suite/engines/funcs/r/rpl_ignore_revoke.result
index c86f2f4e4df..cc65d9dacfd 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_ignore_revoke.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_ignore_revoke.result
@@ -4,26 +4,26 @@ connection master;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
-select_priv
+Select_priv
N
connection slave;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;
-select_priv
+Select_priv
N
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* slave:must be Y */;
-select_priv
+Select_priv
Y
connection master;
revoke select on *.* from 'user_foo';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
-select_priv
+Select_priv
N
connection slave;
select select_priv from mysql.user where user='user_foo' /* slave:must get Y */;
-select_priv
+Select_priv
Y
connection slave;
revoke select on *.* FROM 'user_foo';
diff --git a/mysql-test/suite/engines/funcs/r/rpl_misc_functions.result b/mysql-test/suite/engines/funcs/r/rpl_misc_functions.result
index 6c20623d62b..302cf2351c2 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_misc_functions.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_misc_functions.result
@@ -42,6 +42,8 @@ INSERT INTO t1 (col_a) VALUES (test_replication_sf());
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
connection slave;
select * from t1 into outfile "../../tmp/t1_slave.txt";
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
connection master;
create temporary table t1_slave select * from t1 where 1=0;
load data infile '../../tmp/t1_slave.txt' into table t1_slave;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
index 2f7f1b07cb4..936f604be2e 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
@@ -140,7 +140,7 @@ create table t4 select * from t1 where 3 in (select 1 union select 2 union selec
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
-Warning 1292 Incorrect datetime value: '3'
+Warning 1292 Truncated incorrect datetime value: '3'
insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
create procedure foo()
begin
diff --git a/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result b/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
index 884408d29b3..52a8b2de642 100644
--- a/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
+++ b/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
@@ -33,6 +33,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p5` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 ANALYZE PARTITION p1,p2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 ORDER BY c1;
c1 c2
diff --git a/mysql-test/suite/engines/funcs/t/ai_init_alter_table.test b/mysql-test/suite/engines/funcs/t/ai_init_alter_table.test
index 5d412ab8347..96cd71d6968 100644
--- a/mysql-test/suite/engines/funcs/t/ai_init_alter_table.test
+++ b/mysql-test/suite/engines/funcs/t/ai_init_alter_table.test
@@ -4,7 +4,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -15,7 +15,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -26,7 +26,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -37,7 +37,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -48,7 +48,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -59,7 +59,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -70,7 +70,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -81,7 +81,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -92,7 +92,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -103,7 +103,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -114,7 +114,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -125,7 +125,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -136,7 +136,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -147,7 +147,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -158,7 +158,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -169,7 +169,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -180,7 +180,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -191,7 +191,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -202,7 +202,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -213,7 +213,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -224,7 +224,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -235,7 +235,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -246,7 +246,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -257,7 +257,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -268,7 +268,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -279,7 +279,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -290,7 +290,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -301,7 +301,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -312,7 +312,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -323,7 +323,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -334,7 +334,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -345,7 +345,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -356,7 +356,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -367,7 +367,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -378,7 +378,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -389,7 +389,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -400,7 +400,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -411,7 +411,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -422,7 +422,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -433,7 +433,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -444,7 +444,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -455,7 +455,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -466,7 +466,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -477,7 +477,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -488,7 +488,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -499,7 +499,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -510,7 +510,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -521,7 +521,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -532,7 +532,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -543,7 +543,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -554,7 +554,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -565,7 +565,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -576,7 +576,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -587,7 +587,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -598,7 +598,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -609,7 +609,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -620,7 +620,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -631,7 +631,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -642,7 +642,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -653,7 +653,7 @@ SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
diff --git a/mysql-test/suite/engines/funcs/t/ai_init_create_table.test b/mysql-test/suite/engines/funcs/t/ai_init_create_table.test
index f63ffc080d8..0aa9aad8ab9 100644
--- a/mysql-test/suite/engines/funcs/t/ai_init_create_table.test
+++ b/mysql-test/suite/engines/funcs/t/ai_init_create_table.test
@@ -3,7 +3,7 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -13,7 +13,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -23,7 +23,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -33,7 +33,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -43,7 +43,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -53,7 +53,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -63,7 +63,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -73,7 +73,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -83,7 +83,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -93,7 +93,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -103,7 +103,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -113,7 +113,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -123,7 +123,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -133,7 +133,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -143,7 +143,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -153,7 +153,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -163,7 +163,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -173,7 +173,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -183,7 +183,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -193,7 +193,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -203,7 +203,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -213,7 +213,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -223,7 +223,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -233,7 +233,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -243,7 +243,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -253,7 +253,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -263,7 +263,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -273,7 +273,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -283,7 +283,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -293,7 +293,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -303,7 +303,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -313,7 +313,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -323,7 +323,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -333,7 +333,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -343,7 +343,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -353,7 +353,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -363,7 +363,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -373,7 +373,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -383,7 +383,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -393,7 +393,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -403,7 +403,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -413,7 +413,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -423,7 +423,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -433,7 +433,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -443,7 +443,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -453,7 +453,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -463,7 +463,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -473,7 +473,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -483,7 +483,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -493,7 +493,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -503,7 +503,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -513,7 +513,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -523,7 +523,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -533,7 +533,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -543,7 +543,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -553,7 +553,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -563,7 +563,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -573,7 +573,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -583,7 +583,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -593,7 +593,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
diff --git a/mysql-test/suite/engines/funcs/t/ai_init_insert.test b/mysql-test/suite/engines/funcs/t/ai_init_insert.test
index d70ab2dc8f8..65be9264591 100644
--- a/mysql-test/suite/engines/funcs/t/ai_init_insert.test
+++ b/mysql-test/suite/engines/funcs/t/ai_init_insert.test
@@ -16,7 +16,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -31,7 +31,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -46,7 +46,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
@@ -64,7 +64,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--sorted_result
@@ -78,7 +78,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -93,7 +93,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -108,7 +108,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--sorted_result
@@ -122,7 +122,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -142,7 +142,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -159,7 +159,7 @@ SELECT column_comment,char_length(column_comment) FROM information_schema.column
--sorted_result
SELECT comment FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/t/ai_init_insert_id.test b/mysql-test/suite/engines/funcs/t/ai_init_insert_id.test
index a13aa8f3974..4b1a6e1a5cf 100644
--- a/mysql-test/suite/engines/funcs/t/ai_init_insert_id.test
+++ b/mysql-test/suite/engines/funcs/t/ai_init_insert_id.test
@@ -3,7 +3,7 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -14,7 +14,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -25,7 +25,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -36,7 +36,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -47,7 +47,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -58,7 +58,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -69,7 +69,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -80,7 +80,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -91,7 +91,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -102,7 +102,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -113,7 +113,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -124,7 +124,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -135,7 +135,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -146,7 +146,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -157,7 +157,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -168,7 +168,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -179,7 +179,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -190,7 +190,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -201,7 +201,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -212,7 +212,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -223,7 +223,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -234,7 +234,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -245,7 +245,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -256,7 +256,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -267,7 +267,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -278,7 +278,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -289,7 +289,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -300,7 +300,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -311,7 +311,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -322,7 +322,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -333,7 +333,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -344,7 +344,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -355,7 +355,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -366,7 +366,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -377,7 +377,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -388,7 +388,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -399,7 +399,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -410,7 +410,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -421,7 +421,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -432,7 +432,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -443,7 +443,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -454,7 +454,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -465,7 +465,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -476,7 +476,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -487,7 +487,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -498,7 +498,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -509,7 +509,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -520,7 +520,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -531,7 +531,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -542,7 +542,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -553,7 +553,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -564,7 +564,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -575,7 +575,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -586,7 +586,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -597,7 +597,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -608,7 +608,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -619,7 +619,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -630,7 +630,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -641,7 +641,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
@@ -652,7 +652,7 @@ DROP TABLE t1;
SHOW TABLES;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET INSERT_ID = 10;
INSERT INTO t1 VALUES(null);
diff --git a/mysql-test/suite/engines/funcs/t/ai_overflow_error.test b/mysql-test/suite/engines/funcs/t/ai_overflow_error.test
index bf04e74a10e..f0461aa5ba2 100644
--- a/mysql-test/suite/engines/funcs/t/ai_overflow_error.test
+++ b/mysql-test/suite/engines/funcs/t/ai_overflow_error.test
@@ -4,7 +4,7 @@ DROP TABLE IF EXISTS t1;
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -17,7 +17,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -30,7 +30,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -43,7 +43,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -56,7 +56,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -69,7 +69,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -82,7 +82,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -95,7 +95,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -108,7 +108,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -121,7 +121,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -134,7 +134,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -147,7 +147,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -160,7 +160,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -173,7 +173,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -186,7 +186,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -199,7 +199,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -212,7 +212,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -225,7 +225,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -238,7 +238,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -251,7 +251,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -264,7 +264,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -277,7 +277,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -290,7 +290,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -303,7 +303,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -316,7 +316,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -329,7 +329,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -342,7 +342,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -355,7 +355,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -368,7 +368,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -381,7 +381,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -394,7 +394,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -407,7 +407,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -420,7 +420,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -433,7 +433,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -446,7 +446,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -459,7 +459,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -472,7 +472,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -485,7 +485,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -498,7 +498,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -511,7 +511,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -524,7 +524,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -537,7 +537,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -550,7 +550,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -563,7 +563,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -576,7 +576,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -589,7 +589,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -602,7 +602,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -615,7 +615,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -628,7 +628,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -641,7 +641,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -654,7 +654,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -667,7 +667,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -680,7 +680,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -693,7 +693,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -706,7 +706,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -719,7 +719,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -732,7 +732,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -745,7 +745,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -758,7 +758,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
@@ -771,7 +771,7 @@ SET SQL_MODE='';
SET SQL_MODE='TRADITIONAL';
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY );
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1264
INSERT INTO t1 VALUES(111111111111111111111111111111111111);
diff --git a/mysql-test/suite/engines/funcs/t/ai_reset_by_truncate.test b/mysql-test/suite/engines/funcs/t/ai_reset_by_truncate.test
index e98cf213f5b..9dedce99926 100644
--- a/mysql-test/suite/engines/funcs/t/ai_reset_by_truncate.test
+++ b/mysql-test/suite/engines/funcs/t/ai_reset_by_truncate.test
@@ -3,7 +3,7 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -16,7 +16,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -30,7 +30,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -43,7 +43,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -57,7 +57,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -70,7 +70,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -84,7 +84,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -97,7 +97,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -111,7 +111,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -124,7 +124,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -138,7 +138,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -151,7 +151,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -165,7 +165,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -178,7 +178,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -192,7 +192,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -205,7 +205,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -219,7 +219,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -232,7 +232,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -246,7 +246,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -259,7 +259,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -273,7 +273,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -286,7 +286,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -300,7 +300,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -313,7 +313,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -327,7 +327,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -340,7 +340,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -354,7 +354,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -367,7 +367,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -381,7 +381,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -394,7 +394,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -408,7 +408,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -421,7 +421,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -435,7 +435,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -448,7 +448,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -462,7 +462,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -475,7 +475,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -489,7 +489,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -502,7 +502,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -516,7 +516,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -529,7 +529,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -543,7 +543,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -556,7 +556,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -570,7 +570,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -583,7 +583,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -597,7 +597,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -610,7 +610,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -624,7 +624,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -637,7 +637,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -651,7 +651,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -664,7 +664,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -678,7 +678,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -691,7 +691,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -705,7 +705,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -718,7 +718,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -732,7 +732,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -745,7 +745,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -759,7 +759,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -772,7 +772,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -786,7 +786,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -799,7 +799,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -813,7 +813,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -826,7 +826,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -840,7 +840,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -853,7 +853,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -867,7 +867,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -880,7 +880,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -894,7 +894,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -907,7 +907,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -921,7 +921,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -934,7 +934,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -948,7 +948,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -961,7 +961,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -975,7 +975,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -988,7 +988,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1002,7 +1002,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1015,7 +1015,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1029,7 +1029,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1042,7 +1042,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1056,7 +1056,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1069,7 +1069,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1083,7 +1083,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1096,7 +1096,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1110,7 +1110,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1123,7 +1123,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1137,7 +1137,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1150,7 +1150,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1164,7 +1164,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1177,7 +1177,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1191,7 +1191,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1204,7 +1204,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1218,7 +1218,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1231,7 +1231,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1245,7 +1245,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1258,7 +1258,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1272,7 +1272,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1285,7 +1285,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1299,7 +1299,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1312,7 +1312,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1326,7 +1326,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1339,7 +1339,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1353,7 +1353,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1366,7 +1366,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1380,7 +1380,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1393,7 +1393,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1407,7 +1407,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1420,7 +1420,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1434,7 +1434,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1447,7 +1447,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1461,7 +1461,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1474,7 +1474,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1488,7 +1488,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1501,7 +1501,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1515,7 +1515,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1528,7 +1528,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1542,7 +1542,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1555,7 +1555,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1569,7 +1569,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1582,7 +1582,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1596,7 +1596,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ) AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
@@ -1609,7 +1609,7 @@ INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
ALTER TABLE t1 AUTO_INCREMENT=10;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
diff --git a/mysql-test/suite/engines/funcs/t/comment_column.test b/mysql-test/suite/engines/funcs/t/comment_column.test
index 7831ffb213b..a3328037d0c 100644
--- a/mysql-test/suite/engines/funcs/t/comment_column.test
+++ b/mysql-test/suite/engines/funcs/t/comment_column.test
@@ -7,7 +7,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD COLUMN c8 INTEGER COMMENT 'ABCdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
@@ -15,7 +15,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -24,7 +24,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -33,7 +33,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -42,14 +42,14 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE COLUMN c9 c9_1 INTEGER COMMENT '1234567890';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c1;
@@ -57,7 +57,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -68,7 +68,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
# comment overflow(error)
@@ -79,7 +79,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
set sql_mode='';
@@ -88,7 +88,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -100,7 +100,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
# comment overflow(error)
diff --git a/mysql-test/suite/engines/funcs/t/comment_index.test b/mysql-test/suite/engines/funcs/t/comment_index.test
index e654b5c2e34..f77ff88d115 100644
--- a/mysql-test/suite/engines/funcs/t/comment_index.test
+++ b/mysql-test/suite/engines/funcs/t/comment_index.test
@@ -7,7 +7,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -16,7 +16,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -25,7 +25,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
@@ -34,7 +34,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i8(c8) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd', ADD INDEX i10(c10) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
@@ -42,7 +42,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -52,7 +52,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -63,7 +63,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -72,7 +72,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -85,7 +85,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -96,7 +96,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/t/comment_table.test b/mysql-test/suite/engines/funcs/t/comment_table.test
index e73c1401e66..457451cd032 100644
--- a/mysql-test/suite/engines/funcs/t/comment_table.test
+++ b/mysql-test/suite/engines/funcs/t/comment_table.test
@@ -7,7 +7,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
drop table t1;
@@ -17,7 +17,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
drop table t1;
set sql_mode='TRADITIONAL';
@@ -34,7 +34,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
drop table t1;
diff --git a/mysql-test/suite/engines/funcs/t/ix_index_decimals.test b/mysql-test/suite/engines/funcs/t/ix_index_decimals.test
index 4117f5fce2d..0f175074588 100644
--- a/mysql-test/suite/engines/funcs/t/ix_index_decimals.test
+++ b/mysql-test/suite/engines/funcs/t/ix_index_decimals.test
@@ -5,120 +5,120 @@ CREATE TABLE t6(c1 REAL(1,0) NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 REAL(5,4) NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DOUBLE(1,0) NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DOUBLE(5,4) NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 FLOAT(1,0) NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 FLOAT(5,4) NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DECIMAL(1,0) NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DECIMAL(5,4) NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 NUMERIC(1,0) NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 NUMERIC(5,4) NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 REAL(1,0) NOT NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 REAL(5,4) NOT NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DOUBLE(1,0) NOT NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DOUBLE(5,4) NOT NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 FLOAT(1,0) NOT NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 FLOAT(5,4) NOT NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DECIMAL(1,0) NOT NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DECIMAL(5,4) NOT NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 NUMERIC(1,0) NOT NULL);
CREATE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 NUMERIC(5,4) NOT NULL);
CREATE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_index_lob.test b/mysql-test/suite/engines/funcs/t/ix_index_lob.test
index 8908c6e7b08..f62188353c6 100644
--- a/mysql-test/suite/engines/funcs/t/ix_index_lob.test
+++ b/mysql-test/suite/engines/funcs/t/ix_index_lob.test
@@ -5,96 +5,96 @@ CREATE TABLE t4(c1 TINYBLOB NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BLOB NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMBLOB NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGBLOB NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYTEXT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TEXT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMTEXT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGTEXT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYBLOB NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BLOB NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMBLOB NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGBLOB NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYTEXT NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TEXT NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMTEXT NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGTEXT NOT NULL);
CREATE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_index_non_string.test b/mysql-test/suite/engines/funcs/t/ix_index_non_string.test
index abcb10735a2..149f55d21a0 100644
--- a/mysql-test/suite/engines/funcs/t/ix_index_non_string.test
+++ b/mysql-test/suite/engines/funcs/t/ix_index_non_string.test
@@ -5,192 +5,192 @@ CREATE TABLE t1(c1 BIT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
CREATE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_index_string.test b/mysql-test/suite/engines/funcs/t/ix_index_string.test
index fe58185c01e..32a73b39c4e 100644
--- a/mysql-test/suite/engines/funcs/t/ix_index_string.test
+++ b/mysql-test/suite/engines/funcs/t/ix_index_string.test
@@ -5,48 +5,48 @@ CREATE TABLE t2(c1 CHAR(50) NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARCHAR(50) NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BINARY(50) NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARBINARY(50) NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 CHAR(50) NOT NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARCHAR(50) NOT NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BINARY(50) NOT NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARBINARY(50) NOT NULL);
CREATE INDEX i1 ON t2(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_index_string_length.test b/mysql-test/suite/engines/funcs/t/ix_index_string_length.test
index 7bd3c2b8c3b..4b7fdaa938d 100644
--- a/mysql-test/suite/engines/funcs/t/ix_index_string_length.test
+++ b/mysql-test/suite/engines/funcs/t/ix_index_string_length.test
@@ -5,48 +5,48 @@ CREATE TABLE t3(c1 CHAR(50) NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARCHAR(50) NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BINARY(50) NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARBINARY(50) NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 CHAR(50) NOT NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARCHAR(50) NOT NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BINARY(50) NOT NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARBINARY(50) NOT NULL);
CREATE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_unique_decimals.test b/mysql-test/suite/engines/funcs/t/ix_unique_decimals.test
index 9f59a1148a3..bdc526ceea3 100644
--- a/mysql-test/suite/engines/funcs/t/ix_unique_decimals.test
+++ b/mysql-test/suite/engines/funcs/t/ix_unique_decimals.test
@@ -5,120 +5,120 @@ CREATE TABLE t6(c1 REAL(1,0) NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 REAL(5,4) NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DOUBLE(1,0) NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DOUBLE(5,4) NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 FLOAT(1,0) NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 FLOAT(5,4) NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DECIMAL(1,0) NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DECIMAL(5,4) NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 NUMERIC(1,0) NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 NUMERIC(5,4) NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 REAL(1,0) NOT NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 REAL(5,4) NOT NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DOUBLE(1,0) NOT NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DOUBLE(5,4) NOT NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 FLOAT(1,0) NOT NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 FLOAT(5,4) NOT NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DECIMAL(1,0) NOT NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DECIMAL(5,4) NOT NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 NUMERIC(1,0) NOT NULL);
CREATE UNIQUE INDEX i1 ON t6(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 NUMERIC(5,4) NOT NULL);
CREATE UNIQUE INDEX i1 ON t7(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_unique_lob.test b/mysql-test/suite/engines/funcs/t/ix_unique_lob.test
index 9d635dc5c07..32a6b1bfd5c 100644
--- a/mysql-test/suite/engines/funcs/t/ix_unique_lob.test
+++ b/mysql-test/suite/engines/funcs/t/ix_unique_lob.test
@@ -5,96 +5,96 @@ CREATE TABLE t4(c1 TINYBLOB NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BLOB NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMBLOB NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGBLOB NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYTEXT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TEXT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMTEXT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGTEXT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYBLOB NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BLOB NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMBLOB NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGBLOB NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYTEXT NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TEXT NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMTEXT NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 LONGTEXT NOT NULL);
CREATE UNIQUE INDEX i1 ON t4(c1(100));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_unique_non_string.test b/mysql-test/suite/engines/funcs/t/ix_unique_non_string.test
index 817a9071daa..144067150b7 100644
--- a/mysql-test/suite/engines/funcs/t/ix_unique_non_string.test
+++ b/mysql-test/suite/engines/funcs/t/ix_unique_non_string.test
@@ -5,192 +5,192 @@ CREATE TABLE t1(c1 BIT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
CREATE UNIQUE INDEX i1 ON t1(c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_unique_string.test b/mysql-test/suite/engines/funcs/t/ix_unique_string.test
index c73d941ad8f..798166210cd 100644
--- a/mysql-test/suite/engines/funcs/t/ix_unique_string.test
+++ b/mysql-test/suite/engines/funcs/t/ix_unique_string.test
@@ -7,7 +7,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARCHAR(50) NULL);
CREATE UNIQUE INDEX i1 ON t2(c1);
@@ -15,7 +15,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BINARY(50) NULL);
CREATE UNIQUE INDEX i1 ON t2(c1);
@@ -23,7 +23,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARBINARY(50) NULL);
CREATE UNIQUE INDEX i1 ON t2(c1);
@@ -31,7 +31,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 CHAR(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t2(c1);
@@ -39,7 +39,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARCHAR(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t2(c1);
@@ -47,7 +47,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BINARY(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t2(c1);
@@ -55,7 +55,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARBINARY(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t2(c1);
@@ -63,6 +63,6 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
- --replace_result $ENGINE ENGINE PAGE_CHECKSUM=0 ""
+ --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_unique_string_length.test b/mysql-test/suite/engines/funcs/t/ix_unique_string_length.test
index 59fd73138a5..f977b3def29 100644
--- a/mysql-test/suite/engines/funcs/t/ix_unique_string_length.test
+++ b/mysql-test/suite/engines/funcs/t/ix_unique_string_length.test
@@ -5,48 +5,48 @@ CREATE TABLE t3(c1 CHAR(50) NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARCHAR(50) NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BINARY(50) NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARBINARY(50) NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 CHAR(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARCHAR(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BINARY(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 VARBINARY(50) NOT NULL);
CREATE UNIQUE INDEX i1 ON t3(c1(10));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ix_using_order.test b/mysql-test/suite/engines/funcs/t/ix_using_order.test
index 0d0560f8e4d..6508066ab94 100644
--- a/mysql-test/suite/engines/funcs/t/ix_using_order.test
+++ b/mysql-test/suite/engines/funcs/t/ix_using_order.test
@@ -1,23 +1,29 @@
+if (`select @@default_storage_engine = "aria"`)
+{
+ skip "Aria is not supported for this test (Index on virtual columns)";
+}
+
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE INDEX i1 USING BTREE ON t1(c1 ASC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE INDEX i1 USING BTREE ON t1(c1 DESC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE UNIQUE INDEX i1 USING BTREE ON t1(c1 ASC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
@@ -25,7 +31,7 @@ DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE UNIQUE INDEX i1 USING BTREE ON t1(c1 DESC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
@@ -33,21 +39,21 @@ DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE INDEX i1 USING HASH ON t1(c1 ASC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE INDEX i1 USING HASH ON t1(c1 DESC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE UNIQUE INDEX i1 USING HASH ON t1(c1 ASC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
@@ -55,7 +61,7 @@ DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
CREATE UNIQUE INDEX i1 USING HASH ON t1(c1 DESC);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
diff --git a/mysql-test/suite/engines/funcs/t/jp_comment_column.test b/mysql-test/suite/engines/funcs/t/jp_comment_column.test
index 63867242502..134bf055ae9 100644
--- a/mysql-test/suite/engines/funcs/t/jp_comment_column.test
+++ b/mysql-test/suite/engines/funcs/t/jp_comment_column.test
@@ -8,7 +8,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD COLUMN c8 INTEGER COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦';
@@ -16,7 +16,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -25,7 +25,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -34,7 +34,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -43,14 +43,14 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE COLUMN c9 c9_1 INTEGER COMMENT '1234567890';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c1;
@@ -58,7 +58,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -69,7 +69,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
# comment overflow(error)
@@ -80,7 +80,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
set sql_mode='';
@@ -89,7 +89,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -101,7 +101,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
# comment overflow(error)
diff --git a/mysql-test/suite/engines/funcs/t/jp_comment_index.test b/mysql-test/suite/engines/funcs/t/jp_comment_index.test
index aba14c79c43..03fc39972ff 100644
--- a/mysql-test/suite/engines/funcs/t/jp_comment_index.test
+++ b/mysql-test/suite/engines/funcs/t/jp_comment_index.test
@@ -8,7 +8,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -17,7 +17,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -26,7 +26,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP INDEX i1 ON t1;
@@ -35,7 +35,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i8(c8) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦', ADD INDEX i10(c10) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦';
@@ -43,7 +43,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -53,7 +53,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -64,7 +64,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -73,7 +73,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -86,7 +86,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
@@ -97,7 +97,7 @@ SELECT table_comment,char_length(table_comment) FROM information_schema.tables W
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/t/jp_comment_older_compatibility1.test b/mysql-test/suite/engines/funcs/t/jp_comment_older_compatibility1.test
index c135c3dd554..f02138f16c9 100644
--- a/mysql-test/suite/engines/funcs/t/jp_comment_older_compatibility1.test
+++ b/mysql-test/suite/engines/funcs/t/jp_comment_older_compatibility1.test
@@ -8,7 +8,7 @@ SET NAMES cp932;
CREATE TABLE t1 (c1 INTEGER COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±', c12 INTEGER, c13 DATETIME, c14 CHAR(10), PRIMARY KEY(c1), INDEX(c12,c13)) COMMENT='ƒAƒCƒEƒGƒIƒJƒLƒNƒPƒRƒAƒCƒEƒGƒIƒJƒLƒNƒPƒRƒAƒCƒEƒGƒIƒJƒLƒNƒPƒRƒAƒCƒEƒGƒIƒJƒLƒNƒPƒRƒAƒCƒEƒGƒIƒJƒLƒNƒPƒRƒAƒCƒEƒGƒIƒJƒLƒNƒPƒR';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD COLUMN c2 INTEGER COMMENT 'ƒA‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±';
ALTER TABLE t1 ADD COLUMN c3 INTEGER COMMENT '‚ ƒC‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±';
@@ -16,21 +16,21 @@ ALTER TABLE t1 ADD COLUMN c4 INTEGER COMMENT '‚ ‚¢ƒE‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«
ALTER TABLE t1 ADD COLUMN c5 INTEGER COMMENT '‚ ‚¢‚¤ƒG‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY COLUMN c3 CHAR(10);
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE COLUMN c4 c4_1 INTEGER COMMENT '‚³‚µ‚·‚¹‚»‚½‚¿‚‚ĂÆ';
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/t/jp_comment_table.test b/mysql-test/suite/engines/funcs/t/jp_comment_table.test
index 545260134cf..255ed781a12 100644
--- a/mysql-test/suite/engines/funcs/t/jp_comment_table.test
+++ b/mysql-test/suite/engines/funcs/t/jp_comment_table.test
@@ -7,7 +7,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT '‚ ‚¢‚¤‚¦‚¨ ‚©‚«‚­‚¯‚±', c2 INT
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
drop table t1;
create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INTEGER COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±', c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, INDEX i1 (c1) COMMENT 'i1 comment',INDEX i2(c2)
@@ -15,7 +15,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
drop table t1;
@@ -26,7 +26,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
drop table t1;
@@ -37,7 +37,7 @@ create table t1 (c1 VARCHAR(10) NOT NULL COMMENT 'c1 comment', c2 INTEGER,c3 INT
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
drop table t1;
diff --git a/mysql-test/suite/engines/funcs/t/ld_unique_error3.test b/mysql-test/suite/engines/funcs/t/ld_unique_error3.test
index 184081ccb3b..f62fde33c6d 100644
--- a/mysql-test/suite/engines/funcs/t/ld_unique_error3.test
+++ b/mysql-test/suite/engines/funcs/t/ld_unique_error3.test
@@ -3,7 +3,7 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 TEXT);
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
SHOW TABLES;
copy_file suite/engines/funcs/t/load_unique_error1.inc $MYSQLTEST_VARDIR/tmp/t1.dat;
diff --git a/mysql-test/suite/engines/funcs/t/ta_2part_column_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_2part_column_to_pk.test
index 75b583ab3a2..049c2b5fb9d 100644
--- a/mysql-test/suite/engines/funcs/t/ta_2part_column_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_2part_column_to_pk.test
@@ -4,161 +4,161 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_2part_diff_string_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_2part_diff_string_to_pk.test
index b7b302f6cf1..f5013292269 100644
--- a/mysql-test/suite/engines/funcs/t/ta_2part_diff_string_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_2part_diff_string_to_pk.test
@@ -4,161 +4,161 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 CHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 CHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 CHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 CHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 VARCHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 VARCHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 VARCHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 VARCHAR(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 BINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 BINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 BINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 BINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 VARBINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 VARBINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 VARBINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 VARBINARY(20) NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_2part_diff_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_2part_diff_to_pk.test
index 4ebe6300204..1bc8fe85c21 100644
--- a/mysql-test/suite/engines/funcs/t/ta_2part_diff_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_2part_diff_to_pk.test
@@ -4,2561 +4,2561 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 BIT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 TINYINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 SMALLINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 MEDIUMINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 INT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 INTEGER NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 BIGINT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 REAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 DOUBLE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 FLOAT NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 DECIMAL NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 NUMERIC NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 DATE NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 TIME NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 TIMESTAMP NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR NOT NULL, c3 INT NULL, c4 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_2part_string_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_2part_string_to_pk.test
index 09ef6c95b0a..52d6a615cc4 100644
--- a/mysql-test/suite/engines/funcs/t/ta_2part_string_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_2part_string_to_pk.test
@@ -4,41 +4,41 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_3part_column_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_3part_column_to_pk.test
index 1d6cd6080d7..9c4f16be513 100644
--- a/mysql-test/suite/engines/funcs/t/ta_3part_column_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_3part_column_to_pk.test
@@ -4,161 +4,161 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2,c3);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_3part_string_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_3part_string_to_pk.test
index 45a28490c9f..e5548ceba27 100644
--- a/mysql-test/suite/engines/funcs/t/ta_3part_string_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_3part_string_to_pk.test
@@ -4,41 +4,41 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 CHAR(20) NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 VARCHAR(20) NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 BINARY(20) NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 VARBINARY(20) NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1,c2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_column.test b/mysql-test/suite/engines/funcs/t/ta_add_column.test
index 11b65a977a8..40facb4af3d 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_column.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_column.test
@@ -4,11521 +4,11521 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_column2.test b/mysql-test/suite/engines/funcs/t/ta_add_column2.test
index 20a2475809f..14549e58270 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_column2.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_column2.test
@@ -4,1921 +4,1921 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_column_first.test b/mysql-test/suite/engines/funcs/t/ta_add_column_first.test
index 0452a15e8a4..0c701d2de73 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_column_first.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_column_first.test
@@ -4,11041 +4,11041 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_column_first2.test b/mysql-test/suite/engines/funcs/t/ta_add_column_first2.test
index 6ac0e3713c6..918cd7e1dab 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_column_first2.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_column_first2.test
@@ -4,1921 +4,1921 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 SMALLINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 INTEGER NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BIGINT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 REAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DOUBLE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 FLOAT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DECIMAL NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 NUMERIC NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 DATE NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIME NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 YEAR NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 BLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGBLOB NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TINYTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 TEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 MEDIUMTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c2 LONGTEXT NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_column_middle.test b/mysql-test/suite/engines/funcs/t/ta_add_column_middle.test
index 98812fecb32..9a8f808932d 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_column_middle.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_column_middle.test
@@ -4,11521 +4,11521 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NULL, c3 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NULL, c3 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NULL, c3 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NULL, c3 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NULL, c3 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NULL, c3 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NULL, c3 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NULL, c3 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NULL, c3 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NULL, c3 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NULL, c3 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NULL, c3 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NULL, c3 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NULL, c3 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NULL, c3 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NULL, c3 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NULL, c3 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NULL, c3 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIT NOT NULL, c3 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYINT NOT NULL, c3 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 REAL NOT NULL, c3 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DOUBLE NOT NULL, c3 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 FLOAT NOT NULL, c3 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DECIMAL NOT NULL, c3 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 NUMERIC NOT NULL, c3 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 DATE NOT NULL, c3 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIME NOT NULL, c3 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 YEAR NOT NULL, c3 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYBLOB NOT NULL, c3 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 BLOB NOT NULL, c3 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMBLOB NOT NULL, c3 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB NOT NULL, c3 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TINYTEXT NOT NULL, c3 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 TEXT NOT NULL, c3 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 MEDIUMTEXT NOT NULL, c3 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 LONGTEXT NOT NULL, c3 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_column_middle2.test b/mysql-test/suite/engines/funcs/t/ta_add_column_middle2.test
index 734db13ae44..ba551343ff8 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_column_middle2.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_column_middle2.test
@@ -4,1921 +4,1921 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 SMALLINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 INTEGER NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BIGINT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 REAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DOUBLE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 FLOAT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DECIMAL NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 NUMERIC NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 DATE NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIME NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TIMESTAMP NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 YEAR NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 BLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGBLOB NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TINYTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 TEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 MEDIUMTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(15) NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD c4 LONGTEXT NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_string.test b/mysql-test/suite/engines/funcs/t/ta_add_string.test
index 930b97f97e3..a4c24ca059a 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_string.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_string.test
@@ -4,321 +4,321 @@ DROP TABLE IF EXISTS t5;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL ;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_string2.test b/mysql-test/suite/engines/funcs/t/ta_add_string2.test
index be2a767e43b..eb605432fef 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_string2.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_string2.test
@@ -4,1921 +4,1921 @@ DROP TABLE IF EXISTS t5;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_string_first.test b/mysql-test/suite/engines/funcs/t/ta_add_string_first.test
index db162665a2f..81915cd79bd 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_string_first.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_string_first.test
@@ -4,321 +4,321 @@ DROP TABLE IF EXISTS t5;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(20) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_string_first2.test b/mysql-test/suite/engines/funcs/t/ta_add_string_first2.test
index 4d25fcc3dc7..ae3e3c1114c 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_string_first2.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_string_first2.test
@@ -4,1921 +4,1921 @@ DROP TABLE IF EXISTS t5;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 CHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARCHAR(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 BINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c2 VARBINARY(5) NOT NULL FIRST;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_string_middle.test b/mysql-test/suite/engines/funcs/t/ta_add_string_middle.test
index 12146c2bfff..61109f89cb3 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_string_middle.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_string_middle.test
@@ -4,321 +4,321 @@ DROP TABLE IF EXISTS t5;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NULL, c3 CHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NULL, c3 VARCHAR(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NULL, c3 BINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NULL, c3 VARBINARY(20) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10) NOT NULL, c3 CHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10) NOT NULL, c3 BINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10) NOT NULL, c3 VARBINARY(20) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(20) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_string_middle2.test b/mysql-test/suite/engines/funcs/t/ta_add_string_middle2.test
index 5cfe50606a1..6387ded306f 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_string_middle2.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_string_middle2.test
@@ -4,1281 +4,1281 @@ DROP TABLE IF EXISTS t5;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 CHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARCHAR(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 BINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 REAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DOUBLE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 FLOAT NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DECIMAL NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 NUMERIC NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 DATE NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIME NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TIMESTAMP NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 YEAR NOT NULL PRIMARY KEY, c2 INT NOT NULL, c3 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5;
ALTER TABLE t5 ADD c4 VARBINARY(5) NOT NULL AFTER c2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_string_unique_index.test b/mysql-test/suite/engines/funcs/t/ta_add_string_unique_index.test
index dbe48718626..fc92f941f82 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_string_unique_index.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_string_unique_index.test
@@ -4,721 +4,721 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_add_unique_index.test b/mysql-test/suite/engines/funcs/t/ta_add_unique_index.test
index 2094ff1a69d..f2f5a9196f0 100644
--- a/mysql-test/suite/engines/funcs/t/ta_add_unique_index.test
+++ b/mysql-test/suite/engines/funcs/t/ta_add_unique_index.test
@@ -4,2881 +4,2881 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD CONSTRAINT cst1 UNIQUE INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_from_unsigned.test b/mysql-test/suite/engines/funcs/t/ta_column_from_unsigned.test
index 7beaad6ebea..00504121c87 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_from_unsigned.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_from_unsigned.test
@@ -4,441 +4,441 @@ DROP TABLE IF EXISTS t3;
CREATE TABLE t3(c1 TINYINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 TINYINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 TINYINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 TINYINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_from_zerofill.test b/mysql-test/suite/engines/funcs/t/ta_column_from_zerofill.test
index 190c085b345..84f4163ccc4 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_from_zerofill.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_from_zerofill.test
@@ -4,881 +4,881 @@ DROP TABLE IF EXISTS t4;
CREATE TABLE t4(c1 TINYINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_to_index.test b/mysql-test/suite/engines/funcs/t/ta_column_to_index.test
index 3079e5fb0b1..e7c83c28739 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_to_index.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_to_index.test
@@ -4,1921 +4,1921 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_to_not_null.test b/mysql-test/suite/engines/funcs/t/ta_column_to_not_null.test
index 68dfda5d98f..f91dd3e3cf5 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_to_not_null.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_to_not_null.test
@@ -4,481 +4,481 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 BIT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 TINYINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 SMALLINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 MEDIUMINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 INT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 INTEGER NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 BIGINT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 REAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 DOUBLE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 FLOAT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 DECIMAL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 NUMERIC NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 DATE NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 TIME NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 TIMESTAMP NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 YEAR NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 TINYBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 BLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 MEDIUMBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 LONGBLOB NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 TINYTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 TEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 MEDIUMTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 LONGTEXT NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_to_null.test b/mysql-test/suite/engines/funcs/t/ta_column_to_null.test
index af697033601..b1ea2271ecc 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_to_null.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_to_null.test
@@ -4,481 +4,481 @@ DROP TABLE IF EXISTS t2;
CREATE TABLE t2(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 BIT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 TINYINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 SMALLINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 MEDIUMINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 INT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 INTEGER NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 BIGINT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 REAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 DOUBLE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 FLOAT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 DECIMAL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 NUMERIC NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 DATE NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 TIME NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 TIMESTAMP NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 YEAR NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 TINYBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 BLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 MEDIUMBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 LONGBLOB NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 TINYTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 TEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 MEDIUMTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 LONGTEXT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_column_to_pk.test
index 306bd94d77e..55af6f8daa9 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_to_pk.test
@@ -4,161 +4,161 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_to_unsigned.test b/mysql-test/suite/engines/funcs/t/ta_column_to_unsigned.test
index 90902160135..b87f3280c5d 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_to_unsigned.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_to_unsigned.test
@@ -4,441 +4,441 @@ DROP TABLE IF EXISTS t3;
CREATE TABLE t3(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 TINYINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 SMALLINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 MEDIUMINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INTEGER UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 BIGINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 REAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DOUBLE UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 FLOAT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DECIMAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 NUMERIC UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 TINYINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 SMALLINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 MEDIUMINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INTEGER UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 BIGINT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 REAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DOUBLE UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 FLOAT UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DECIMAL UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 NUMERIC UNSIGNED NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 TINYINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 SMALLINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 MEDIUMINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 INTEGER UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 BIGINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 REAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DOUBLE UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 FLOAT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 DECIMAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 MODIFY c1 NUMERIC UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 TINYINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 SMALLINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 MEDIUMINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 INTEGER UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 BIGINT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 REAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DOUBLE UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 FLOAT UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 DECIMAL UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
ALTER TABLE t3 CHANGE c1 c1 NUMERIC UNSIGNED NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_column_to_zerofill.test b/mysql-test/suite/engines/funcs/t/ta_column_to_zerofill.test
index cf1b6ed1eef..8088fe7afa3 100644
--- a/mysql-test/suite/engines/funcs/t/ta_column_to_zerofill.test
+++ b/mysql-test/suite/engines/funcs/t/ta_column_to_zerofill.test
@@ -4,881 +4,881 @@ DROP TABLE IF EXISTS t4;
CREATE TABLE t4(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC UNSIGNED ZEROFILL NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 TINYINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 SMALLINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 MEDIUMINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 INTEGER UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 BIGINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 REAL UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DOUBLE UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 FLOAT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 DECIMAL UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 MODIFY c1 NUMERIC UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 TINYINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 SMALLINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 MEDIUMINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 INTEGER UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 BIGINT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 REAL UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DOUBLE UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 FLOAT UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 DECIMAL UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4;
ALTER TABLE t4 CHANGE c1 c1 NUMERIC UNSIGNED ZEROFILL NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_drop_column.test b/mysql-test/suite/engines/funcs/t/ta_drop_column.test
index 9b26f41e3c9..8d414f33d42 100644
--- a/mysql-test/suite/engines/funcs/t/ta_drop_column.test
+++ b/mysql-test/suite/engines/funcs/t/ta_drop_column.test
@@ -4,353 +4,353 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_drop_index.test b/mysql-test/suite/engines/funcs/t/ta_drop_index.test
index 256d6d8c9d2..a9fc33d9ac0 100644
--- a/mysql-test/suite/engines/funcs/t/ta_drop_index.test
+++ b/mysql-test/suite/engines/funcs/t/ta_drop_index.test
@@ -4,961 +4,961 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_drop_pk_autoincrement.test b/mysql-test/suite/engines/funcs/t/ta_drop_pk_autoincrement.test
index 068878f32c2..1e4f4fb6d53 100644
--- a/mysql-test/suite/engines/funcs/t/ta_drop_pk_autoincrement.test
+++ b/mysql-test/suite/engines/funcs/t/ta_drop_pk_autoincrement.test
@@ -4,121 +4,121 @@ DROP TABLE IF EXISTS t8;
CREATE TABLE t8(c1 TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 MODIFY c1 TINYINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 MODIFY c1 SMALLINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 MODIFY c1 MEDIUMINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 MODIFY c1 INT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 MODIFY c1 INTEGER NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 MODIFY c1 BIGINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 CHANGE c1 c1 TINYINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 CHANGE c1 c1 SMALLINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 CHANGE c1 c1 MEDIUMINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 CHANGE c1 c1 INT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 CHANGE c1 c1 INTEGER NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8;
ALTER TABLE t8 CHANGE c1 c1 BIGINT NOT NULL, DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_drop_pk_number.test b/mysql-test/suite/engines/funcs/t/ta_drop_pk_number.test
index 0f6113ded3a..b1bcd9d94ec 100644
--- a/mysql-test/suite/engines/funcs/t/ta_drop_pk_number.test
+++ b/mysql-test/suite/engines/funcs/t/ta_drop_pk_number.test
@@ -4,161 +4,161 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 BIT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TINYINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 SMALLINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 MEDIUMINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INTEGER NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BIGINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 REAL NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DOUBLE NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 FLOAT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DECIMAL NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 NUMERIC NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DATE NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIME NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIMESTAMP NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 YEAR NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_drop_pk_string.test b/mysql-test/suite/engines/funcs/t/ta_drop_pk_string.test
index 4074d028a02..22611b96de2 100644
--- a/mysql-test/suite/engines/funcs/t/ta_drop_pk_string.test
+++ b/mysql-test/suite/engines/funcs/t/ta_drop_pk_string.test
@@ -4,41 +4,41 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 CHAR(20) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARCHAR(20) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BINARY(20) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARBINARY(20) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9;
ALTER TABLE t9 DROP PRIMARY KEY;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_drop_string_index.test b/mysql-test/suite/engines/funcs/t/ta_drop_string_index.test
index b3f56e726c8..71628a35cf5 100644
--- a/mysql-test/suite/engines/funcs/t/ta_drop_string_index.test
+++ b/mysql-test/suite/engines/funcs/t/ta_drop_string_index.test
@@ -4,241 +4,241 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP KEY i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, INDEX i1 (c1));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP INDEX i1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_orderby.test b/mysql-test/suite/engines/funcs/t/ta_orderby.test
index a4093777791..211e886a86a 100644
--- a/mysql-test/suite/engines/funcs/t/ta_orderby.test
+++ b/mysql-test/suite/engines/funcs/t/ta_orderby.test
@@ -10,7 +10,7 @@ SELECT * FROM t1;
ALTER TABLE t1 ORDER BY c3,c2,c1 DESC;
SELECT * FROM t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT NOT NULL, c3 SMALLINT NOT NULL);
INSERT INTO t1 VALUES(1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1);
@@ -21,7 +21,7 @@ SELECT * FROM t1;
ALTER TABLE t1 ORDER BY c3,c2,c1 DESC;
SELECT * FROM t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NOT NULL);
INSERT INTO t1 VALUES(1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1);
@@ -32,7 +32,7 @@ SELECT * FROM t1;
ALTER TABLE t1 ORDER BY c3,c2,c1 DESC;
SELECT * FROM t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT NOT NULL, c3 INT NOT NULL);
INSERT INTO t1 VALUES(1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1);
@@ -43,7 +43,7 @@ SELECT * FROM t1;
ALTER TABLE t1 ORDER BY c3,c2,c1 DESC;
SELECT * FROM t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER NOT NULL, c3 INTEGER NOT NULL);
INSERT INTO t1 VALUES(1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1);
@@ -54,7 +54,7 @@ SELECT * FROM t1;
ALTER TABLE t1 ORDER BY c3,c2,c1 DESC;
SELECT * FROM t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT NOT NULL, c3 BIGINT NOT NULL);
INSERT INTO t1 VALUES(1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1);
@@ -65,6 +65,6 @@ SELECT * FROM t1;
ALTER TABLE t1 ORDER BY c3,c2,c1 DESC;
SELECT * FROM t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_rename.test b/mysql-test/suite/engines/funcs/t/ta_rename.test
index 73bb834f62f..26eaf272d91 100644
--- a/mysql-test/suite/engines/funcs/t/ta_rename.test
+++ b/mysql-test/suite/engines/funcs/t/ta_rename.test
@@ -4,385 +4,385 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 BIT NOT NULL, c2 BIT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL, c2 TINYINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL, c2 SMALLINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL, c2 MEDIUMINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL, c2 INT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL, c2 INTEGER);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL, c2 BIGINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL, c2 REAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL, c2 DOUBLE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL, c2 FLOAT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL, c2 DECIMAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL, c2 NUMERIC);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NOT NULL, c2 YEAR);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 RENAME TO t2;
SHOW TABLES;
--error 1051
DROP TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test b/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test
index 7f889dcb905..429b7f59d80 100644
--- a/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test
+++ b/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test
@@ -4,375 +4,375 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 TINYINT NOT NULL PRIMARY KEY, c2 TINYINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL PRIMARY KEY, c2 SMALLINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 MEDIUMINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL PRIMARY KEY, c2 BIGINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL PRIMARY KEY, c2 REAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL PRIMARY KEY, c2 DOUBLE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL PRIMARY KEY, c2 FLOAT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL PRIMARY KEY, c2 DECIMAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL PRIMARY KEY, c2 NUMERIC);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NOT NULL PRIMARY KEY, c2 TINYINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NOT NULL PRIMARY KEY, c2 SMALLINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 MEDIUMINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NOT NULL PRIMARY KEY, c2 BIGINT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NOT NULL PRIMARY KEY, c2 REAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NOT NULL PRIMARY KEY, c2 DOUBLE);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NOT NULL PRIMARY KEY, c2 FLOAT);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NOT NULL PRIMARY KEY, c2 DECIMAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NOT NULL PRIMARY KEY, c2 NUMERIC);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10;
INSERT INTO t1(c1) VALUES(1);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
INSERT IGNORE INTO t1(c1) VALUES(2);
SELECT * FROM t1 ORDER BY c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_string_drop_column.test b/mysql-test/suite/engines/funcs/t/ta_string_drop_column.test
index 810bf3939f4..cd425a7cb1f 100644
--- a/mysql-test/suite/engines/funcs/t/ta_string_drop_column.test
+++ b/mysql-test/suite/engines/funcs/t/ta_string_drop_column.test
@@ -4,89 +4,89 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 CHAR(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 VARCHAR(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 BINARY(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 VARBINARY(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP c2;
--error 1090
ALTER TABLE t1 DROP c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL, c2 CHAR(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL, c2 VARCHAR(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL, c2 BINARY(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL, c2 VARBINARY(30));
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP COLUMN c2;
--error 1090
ALTER TABLE t1 DROP COLUMN c1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_string_to_index.test b/mysql-test/suite/engines/funcs/t/ta_string_to_index.test
index dbdf37caaae..3b7a2d2a9cd 100644
--- a/mysql-test/suite/engines/funcs/t/ta_string_to_index.test
+++ b/mysql-test/suite/engines/funcs/t/ta_string_to_index.test
@@ -4,481 +4,481 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD KEY i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING BTREE (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD INDEX i1 USING HASH (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_string_to_not_null.test b/mysql-test/suite/engines/funcs/t/ta_string_to_not_null.test
index 140735a50a3..fdc89057e12 100644
--- a/mysql-test/suite/engines/funcs/t/ta_string_to_not_null.test
+++ b/mysql-test/suite/engines/funcs/t/ta_string_to_not_null.test
@@ -4,81 +4,81 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 CHAR(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 VARCHAR(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 BINARY(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 MODIFY c1 VARBINARY(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 CHAR(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 CHAR(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 VARCHAR(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 BINARY(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(100) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE c1 c1 VARBINARY(100) NOT NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_string_to_null.test b/mysql-test/suite/engines/funcs/t/ta_string_to_null.test
index 2792e1dd122..ccefa22dcb6 100644
--- a/mysql-test/suite/engines/funcs/t/ta_string_to_null.test
+++ b/mysql-test/suite/engines/funcs/t/ta_string_to_null.test
@@ -4,81 +4,81 @@ DROP TABLE IF EXISTS t2;
CREATE TABLE t2(c1 CHAR(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 CHAR(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARCHAR(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 VARCHAR(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BINARY(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 BINARY(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARBINARY(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 MODIFY c1 VARBINARY(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 CHAR(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 CHAR(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARCHAR(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 VARCHAR(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BINARY(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 BINARY(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 VARBINARY(200) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
ALTER TABLE t2 CHANGE c1 c1 VARBINARY(200) NULL;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/ta_string_to_pk.test b/mysql-test/suite/engines/funcs/t/ta_string_to_pk.test
index 2d9abbe650e..2fe6ad1f234 100644
--- a/mysql-test/suite/engines/funcs/t/ta_string_to_pk.test
+++ b/mysql-test/suite/engines/funcs/t/ta_string_to_pk.test
@@ -4,41 +4,41 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(30) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD PRIMARY KEY (c1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_autoincrement.test b/mysql-test/suite/engines/funcs/t/tc_column_autoincrement.test
index 93fd5f63e79..fdd403f978a 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_autoincrement.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_autoincrement.test
@@ -4,31 +4,31 @@ DROP TABLE IF EXISTS t8;
CREATE TABLE t8(c1 TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
CREATE TABLE t8(c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t8; DROP TABLE t8; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_comment.test b/mysql-test/suite/engines/funcs/t/tc_column_comment.test
index 836cd5ae8ef..f3fd23690c0 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_comment.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_comment.test
@@ -4,141 +4,141 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NULL COMMENT 'This is a BIT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL COMMENT 'This is a TINYINT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL COMMENT 'This is a SMALLINT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL COMMENT 'This is a MEDIUMINT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL COMMENT 'This is a INT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL COMMENT 'This is a INTEGER column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL COMMENT 'This is a BIGINT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL COMMENT 'This is a DECIMAL column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DEC NULL COMMENT 'This is a DEC column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FIXED NULL COMMENT 'This is a FIXED column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL COMMENT 'This is a NUMERIC column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL COMMENT 'This is a DOUBLE column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL COMMENT 'This is a REAL column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE PRECISION NULL COMMENT 'This is a DOUBLE PRECISION column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL COMMENT 'This is a FLOAT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL COMMENT 'This is a DATE column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL COMMENT 'This is a TIME column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL COMMENT 'This is a TIMESTAMP column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATETIME NULL COMMENT 'This is a DATETIME column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL COMMENT 'This is a YEAR column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL COMMENT 'This is a TINYBLOB column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL COMMENT 'This is a BLOB column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL COMMENT 'This is a MEDIUMBLOB column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL COMMENT 'This is a LONGBLOB column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL COMMENT 'This is a TINYTEXT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL COMMENT 'This is a TEXT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL COMMENT 'This is a MEDIUMTEXT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL COMMENT 'This is a LONGTEXT column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_comment_string.test b/mysql-test/suite/engines/funcs/t/tc_column_comment_string.test
index a7297192ba0..48e13e72c4a 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_comment_string.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_comment_string.test
@@ -4,21 +4,21 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(10) NULL COMMENT 'This is a CHAR column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(10) NULL COMMENT 'This is a VARCHAR column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(10) NULL COMMENT 'This is a BINARY column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(10) NULL COMMENT 'This is a VARBINARY column');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_default_decimal.test b/mysql-test/suite/engines/funcs/t/tc_column_default_decimal.test
index 0a510f28c77..82aad6e722d 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_default_decimal.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_default_decimal.test
@@ -5,81 +5,81 @@ DROP TABLE IF EXISTS t13;
CREATE TABLE t12(c1 DECIMAL(5,0) NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 DECIMAL(5,4) NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
CREATE TABLE t12(c1 DEC(5,0) NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 DEC(5,4) NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
CREATE TABLE t12(c1 FIXED(5,0) NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 FIXED(5,4) NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
CREATE TABLE t12(c1 NUMERIC(5,0) NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 NUMERIC(5,4) NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
CREATE TABLE t12(c1 DECIMAL(5,0) NOT NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 DECIMAL(5,4) NOT NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
CREATE TABLE t12(c1 DEC(5,0) NOT NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 DEC(5,4) NOT NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
CREATE TABLE t12(c1 FIXED(5,0) NOT NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 FIXED(5,4) NOT NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
CREATE TABLE t12(c1 NUMERIC(5,0) NOT NULL DEFAULT 2);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t12; DROP TABLE t12; SHOW TABLES;
CREATE TABLE t13(c1 NUMERIC(5,4) NOT NULL DEFAULT 3.1234);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t13; DROP TABLE t13; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_default_number.test b/mysql-test/suite/engines/funcs/t/tc_column_default_number.test
index d5cd32ae90e..7ce002607b0 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_default_number.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_default_number.test
@@ -4,61 +4,61 @@ DROP TABLE IF EXISTS t11;
CREATE TABLE t11(c1 TINYINT(5) NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 SMALLINT(5) NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 MEDIUMINT(5) NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 INT(5) NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 INTEGER(5) NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 BIGINT(5) NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 TINYINT(5) NOT NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 SMALLINT(5) NOT NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 MEDIUMINT(5) NOT NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 INT(5) NOT NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 INTEGER(5) NOT NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
CREATE TABLE t11(c1 BIGINT(5) NOT NULL DEFAULT 1);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t11; DROP TABLE t11; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_default_string.test b/mysql-test/suite/engines/funcs/t/tc_column_default_string.test
index f55e2b9462a..dd031fa55e1 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_default_string.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_default_string.test
@@ -4,41 +4,41 @@ DROP TABLE IF EXISTS t14;
CREATE TABLE t14(c1 CHAR(10) NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
CREATE TABLE t14(c1 VARCHAR(10) NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
CREATE TABLE t14(c1 BINARY(10) NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
CREATE TABLE t14(c1 VARBINARY(10) NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
CREATE TABLE t14(c1 CHAR(10) NOT NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
CREATE TABLE t14(c1 VARCHAR(10) NOT NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
CREATE TABLE t14(c1 BINARY(10) NOT NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
CREATE TABLE t14(c1 VARBINARY(10) NOT NULL DEFAULT 'x');
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t14; DROP TABLE t14; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_enum.test b/mysql-test/suite/engines/funcs/t/tc_column_enum.test
index 9ca98c3b2a9..b63536c4b98 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_enum.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_enum.test
@@ -4,11 +4,11 @@ DROP TABLE IF EXISTS t6;
CREATE TABLE t6(c1 ENUM('a','b','c') NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t6(c1 ENUM('a','b','c') NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_enum_long.test b/mysql-test/suite/engines/funcs/t/tc_column_enum_long.test
index d8819b32065..6d71d54b1ef 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_enum_long.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_enum_long.test
@@ -4,11 +4,11 @@ DROP TABLE IF EXISTS t6;
CREATE TABLE t6(c1 ENUM('a','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefgh') NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t6(c1 ENUM('a','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefgh') NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_key.test b/mysql-test/suite/engines/funcs/t/tc_column_key.test
index 8b9c921042c..2d32a10babf 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_key.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_key.test
@@ -4,101 +4,101 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 BIT NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TINYINT NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 SMALLINT NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 MEDIUMINT NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INT NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INTEGER NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BIGINT NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DECIMAL NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DEC NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 FIXED NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 NUMERIC NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DOUBLE NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 REAL NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DOUBLE PRECISION NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 FLOAT NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DATE NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIME NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIMESTAMP NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DATETIME NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 YEAR NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_key_length.test b/mysql-test/suite/engines/funcs/t/tc_column_key_length.test
index bf6f568261d..480be726eab 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_key_length.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_key_length.test
@@ -4,21 +4,21 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 CHAR(10) NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARCHAR(10) NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BINARY(10) NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARBINARY(10) NOT NULL KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_length.test b/mysql-test/suite/engines/funcs/t/tc_column_length.test
index 984b6613165..f0bad551455 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_length.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_length.test
@@ -4,111 +4,111 @@ DROP TABLE IF EXISTS t5;
CREATE TABLE t5(c1 BIT(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(1) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIT(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 TINYINT(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 SMALLINT(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 MEDIUMINT(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INT(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 INTEGER(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BIGINT(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 CHAR(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARCHAR(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 BINARY(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TABLE t5(c1 VARBINARY(1) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_length_decimals.test b/mysql-test/suite/engines/funcs/t/tc_column_length_decimals.test
index 35f6007e9e5..57a662bc967 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_length_decimals.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_length_decimals.test
@@ -5,81 +5,81 @@ DROP TABLE IF EXISTS t7;
CREATE TABLE t6(c1 DECIMAL(1,0) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DECIMAL(5,4) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DEC(1,0) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DEC(5,4) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 FIXED(1,0) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 FIXED(5,4) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 NUMERIC(1,0) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 NUMERIC(5,4) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DECIMAL(1,0) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DECIMAL(5,4) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 DEC(1,0) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 DEC(5,4) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 FIXED(1,0) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 FIXED(5,4) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t6(c1 NUMERIC(1,0) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t7(c1 NUMERIC(5,4) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_length_zero.test b/mysql-test/suite/engines/funcs/t/tc_column_length_zero.test
index 4ab9d41deb3..fd7d0f204df 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_length_zero.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_length_zero.test
@@ -4,21 +4,21 @@ DROP TABLE IF EXISTS t6;
CREATE TABLE t6(c1 CHAR(0) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t6(c1 VARCHAR(0) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t6(c1 CHAR(0) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
CREATE TABLE t6(c1 VARCHAR(0) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t6; DROP TABLE t6; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_not_null.test b/mysql-test/suite/engines/funcs/t/tc_column_not_null.test
index 97e22e28d89..2766cabe020 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_not_null.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_not_null.test
@@ -4,141 +4,141 @@ DROP TABLE IF EXISTS t2;
CREATE TABLE t2(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DEC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 FIXED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DOUBLE PRECISION NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 DATETIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
CREATE TABLE t2(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_null.test b/mysql-test/suite/engines/funcs/t/tc_column_null.test
index 37568c63f23..0441e4d5316 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_null.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_null.test
@@ -4,141 +4,141 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DEC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FIXED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE PRECISION NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATETIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_primary_key_number.test b/mysql-test/suite/engines/funcs/t/tc_column_primary_key_number.test
index 71be1f734e8..e00061487bc 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_primary_key_number.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_primary_key_number.test
@@ -4,101 +4,101 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 BIT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TINYINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 SMALLINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 MEDIUMINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INTEGER NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BIGINT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DECIMAL NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DEC NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 FIXED NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 NUMERIC NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DOUBLE NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 REAL NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DOUBLE PRECISION NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 FLOAT NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DATE NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIME NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIMESTAMP NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DATETIME NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 YEAR NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_primary_key_string.test b/mysql-test/suite/engines/funcs/t/tc_column_primary_key_string.test
index 264dde0382c..2c14e291250 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_primary_key_string.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_primary_key_string.test
@@ -4,21 +4,21 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 CHAR(10) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARCHAR(10) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BINARY(10) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARBINARY(10) NOT NULL PRIMARY KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_serial.test b/mysql-test/suite/engines/funcs/t/tc_column_serial.test
index b941dc4a151..0a57ea7c130 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_serial.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_serial.test
@@ -4,6 +4,6 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 SERIAL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_set.test b/mysql-test/suite/engines/funcs/t/tc_column_set.test
index e5e9adde42b..f29b1419f8d 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_set.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_set.test
@@ -4,11 +4,11 @@ DROP TABLE IF EXISTS t7;
CREATE TABLE t7(c1 SET('a','b','c') NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t7(c1 SET('a','b','c') NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_set_long.test b/mysql-test/suite/engines/funcs/t/tc_column_set_long.test
index 59ca390bf5c..b8a64df4580 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_set_long.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_set_long.test
@@ -4,11 +4,11 @@ DROP TABLE IF EXISTS t7;
CREATE TABLE t7(c1 SET('a','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefgh') NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
CREATE TABLE t7(c1 SET('a','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefgh') NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t7; DROP TABLE t7; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_unique_key.test b/mysql-test/suite/engines/funcs/t/tc_column_unique_key.test
index 2f8153f74a4..d37a29670e9 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_unique_key.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_unique_key.test
@@ -4,101 +4,101 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 BIT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TINYINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 SMALLINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 MEDIUMINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 INTEGER NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BIGINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DECIMAL NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DEC NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 FIXED NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 NUMERIC NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DOUBLE NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 REAL NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DOUBLE PRECISION NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 FLOAT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DATE NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIME NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 TIMESTAMP NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 DATETIME NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 YEAR NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_unique_key_string.test b/mysql-test/suite/engines/funcs/t/tc_column_unique_key_string.test
index 6955f859a6a..42edcd83ef0 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_unique_key_string.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_unique_key_string.test
@@ -4,21 +4,21 @@ DROP TABLE IF EXISTS t9;
CREATE TABLE t9(c1 CHAR(10) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARCHAR(10) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 BINARY(10) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
CREATE TABLE t9(c1 VARBINARY(10) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t9; DROP TABLE t9; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_unsigned.test b/mysql-test/suite/engines/funcs/t/tc_column_unsigned.test
index c72169f2f5f..145ee6f2caa 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_unsigned.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_unsigned.test
@@ -4,141 +4,141 @@ DROP TABLE IF EXISTS t3;
CREATE TABLE t3(c1 TINYINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DEC UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FIXED UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE PRECISION UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT UNSIGNED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 TINYINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 SMALLINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 INTEGER UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 BIGINT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DECIMAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DEC UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FIXED UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 NUMERIC UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 REAL UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 DOUBLE PRECISION UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
CREATE TABLE t3(c1 FLOAT UNSIGNED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3; DROP TABLE t3; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_column_zerofill.test b/mysql-test/suite/engines/funcs/t/tc_column_zerofill.test
index 835fa82d46e..0e4b82e8332 100644
--- a/mysql-test/suite/engines/funcs/t/tc_column_zerofill.test
+++ b/mysql-test/suite/engines/funcs/t/tc_column_zerofill.test
@@ -4,281 +4,281 @@ DROP TABLE IF EXISTS t4;
CREATE TABLE t4(c1 TINYINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DEC ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FIXED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE PRECISION ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DEC UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FIXED UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE PRECISION UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED ZEROFILL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DEC ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FIXED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE PRECISION ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 TINYINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 SMALLINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 INTEGER UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 BIGINT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DECIMAL UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DEC UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FIXED UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 NUMERIC UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 REAL UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 DOUBLE PRECISION UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
CREATE TABLE t4(c1 FLOAT UNSIGNED ZEROFILL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t4; DROP TABLE t4; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_multicolumn_different.test b/mysql-test/suite/engines/funcs/t/tc_multicolumn_different.test
index d3ef799f3f7..97882f14625 100644
--- a/mysql-test/suite/engines/funcs/t/tc_multicolumn_different.test
+++ b/mysql-test/suite/engines/funcs/t/tc_multicolumn_different.test
@@ -4,9601 +4,9601 @@ DROP TABLE IF EXISTS m3;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DECIMAL(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 FIXED(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 CHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 CHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARCHAR(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARCHAR(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 BINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 BINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 TINYINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 SMALLINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 MEDIUMINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 INTEGER(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TINYINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 SMALLINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 MEDIUMINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 INTEGER NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 BIGINT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DECIMAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DEC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FIXED NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 NUMERIC NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 REAL NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DOUBLE PRECISION NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 FLOAT NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATE NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 TIMESTAMP NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 DATETIME NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
CREATE TABLE m3(c1 YEAR NULL, c2 VARBINARY(25) NOT NULL, c3 BIGINT(4) NULL, c4 VARBINARY(15) NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY,c6 NUMERIC(10,8) NOT NULL DEFAULT 3.141592);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m3; DROP TABLE m3; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_multicolumn_same.test b/mysql-test/suite/engines/funcs/t/tc_multicolumn_same.test
index 1d14179e138..bbe2f2a5e1d 100644
--- a/mysql-test/suite/engines/funcs/t/tc_multicolumn_same.test
+++ b/mysql-test/suite/engines/funcs/t/tc_multicolumn_same.test
@@ -4,101 +4,101 @@ DROP TABLE IF EXISTS m1;
CREATE TABLE m1(c1 BIT NULL, c2 BIT NOT NULL, c3 BIT NULL, c4 BIT NOT NULL PRIMARY KEY, c5 BIT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 TINYINT NULL, c2 TINYINT NOT NULL, c3 TINYINT NULL, c4 TINYINT NOT NULL PRIMARY KEY, c5 TINYINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 SMALLINT NULL, c2 SMALLINT NOT NULL, c3 SMALLINT NULL, c4 SMALLINT NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 MEDIUMINT NULL, c2 MEDIUMINT NOT NULL, c3 MEDIUMINT NULL, c4 MEDIUMINT NOT NULL PRIMARY KEY, c5 MEDIUMINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 INT NULL, c2 INT NOT NULL, c3 INT NULL, c4 INT NOT NULL PRIMARY KEY, c5 INT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 INTEGER NULL, c2 INTEGER NOT NULL, c3 INTEGER NULL, c4 INTEGER NOT NULL PRIMARY KEY, c5 INTEGER NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 BIGINT NULL, c2 BIGINT NOT NULL, c3 BIGINT NULL, c4 BIGINT NOT NULL PRIMARY KEY, c5 BIGINT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 DECIMAL NULL, c2 DECIMAL NOT NULL, c3 DECIMAL NULL, c4 DECIMAL NOT NULL PRIMARY KEY, c5 DECIMAL NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 DEC NULL, c2 DEC NOT NULL, c3 DEC NULL, c4 DEC NOT NULL PRIMARY KEY, c5 DEC NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 FIXED NULL, c2 FIXED NOT NULL, c3 FIXED NULL, c4 FIXED NOT NULL PRIMARY KEY, c5 FIXED NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 NUMERIC NULL, c2 NUMERIC NOT NULL, c3 NUMERIC NULL, c4 NUMERIC NOT NULL PRIMARY KEY, c5 NUMERIC NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 DOUBLE NULL, c2 DOUBLE NOT NULL, c3 DOUBLE NULL, c4 DOUBLE NOT NULL PRIMARY KEY, c5 DOUBLE NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 REAL NULL, c2 REAL NOT NULL, c3 REAL NULL, c4 REAL NOT NULL PRIMARY KEY, c5 REAL NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 DOUBLE PRECISION NULL, c2 DOUBLE PRECISION NOT NULL, c3 DOUBLE PRECISION NULL, c4 DOUBLE PRECISION NOT NULL PRIMARY KEY, c5 DOUBLE PRECISION NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 FLOAT NULL, c2 FLOAT NOT NULL, c3 FLOAT NULL, c4 FLOAT NOT NULL PRIMARY KEY, c5 FLOAT NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 DATE NULL, c2 DATE NOT NULL, c3 DATE NULL, c4 DATE NOT NULL PRIMARY KEY, c5 DATE NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 TIME NULL, c2 TIME NOT NULL, c3 TIME NULL, c4 TIME NOT NULL PRIMARY KEY, c5 TIME NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 TIMESTAMP NULL, c2 TIMESTAMP NOT NULL, c3 TIMESTAMP NULL, c4 TIMESTAMP NOT NULL PRIMARY KEY, c5 TIMESTAMP NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 DATETIME NULL, c2 DATETIME NOT NULL, c3 DATETIME NULL, c4 DATETIME NOT NULL PRIMARY KEY, c5 DATETIME NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
CREATE TABLE m1(c1 YEAR NULL, c2 YEAR NOT NULL, c3 YEAR NULL, c4 YEAR NOT NULL PRIMARY KEY, c5 YEAR NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m1; DROP TABLE m1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_multicolumn_same_string.test b/mysql-test/suite/engines/funcs/t/tc_multicolumn_same_string.test
index cf7ccb855d3..c11c8bd8eac 100644
--- a/mysql-test/suite/engines/funcs/t/tc_multicolumn_same_string.test
+++ b/mysql-test/suite/engines/funcs/t/tc_multicolumn_same_string.test
@@ -4,21 +4,21 @@ DROP TABLE IF EXISTS m2;
CREATE TABLE m2(c1 CHAR(1) NULL, c2 CHAR(5) NOT NULL, c3 CHAR(255) NULL, c4 CHAR(4) NOT NULL PRIMARY KEY, c5 CHAR(30) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m2; DROP TABLE m2; SHOW TABLES;
CREATE TABLE m2(c1 VARCHAR(1) NULL, c2 VARCHAR(5) NOT NULL, c3 VARCHAR(255) NULL, c4 VARCHAR(4) NOT NULL PRIMARY KEY, c5 VARCHAR(30) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m2; DROP TABLE m2; SHOW TABLES;
CREATE TABLE m2(c1 BINARY(1) NULL, c2 BINARY(5) NOT NULL, c3 BINARY(255) NULL, c4 BINARY(4) NOT NULL PRIMARY KEY, c5 BINARY(30) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m2; DROP TABLE m2; SHOW TABLES;
CREATE TABLE m2(c1 VARBINARY(1) NULL, c2 VARBINARY(5) NOT NULL, c3 VARBINARY(255) NULL, c4 VARBINARY(4) NOT NULL PRIMARY KEY, c5 VARBINARY(30) NOT NULL UNIQUE KEY);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE m2; DROP TABLE m2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_partition_remove.test b/mysql-test/suite/engines/funcs/t/tc_partition_remove.test
index b0e99d54611..1d03f8ebd1f 100644
--- a/mysql-test/suite/engines/funcs/t/tc_partition_remove.test
+++ b/mysql-test/suite/engines/funcs/t/tc_partition_remove.test
@@ -6,155 +6,155 @@ INSERT IGNORE INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 SMALLINT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 MEDIUMINT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 INT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 INTEGER NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 BIGINT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 TINYINT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT IGNORE INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 SMALLINT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 INT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 INTEGER NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1 (c1 BIGINT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1);
INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc');
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
ALTER TABLE t1 REMOVE PARTITIONING;
SELECT * FROM t1 ORDER BY c1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_rename.test b/mysql-test/suite/engines/funcs/t/tc_rename.test
index 392b9a81452..c4e1ca4fc3a 100644
--- a/mysql-test/suite/engines/funcs/t/tc_rename.test
+++ b/mysql-test/suite/engines/funcs/t/tc_rename.test
@@ -4,11 +4,11 @@ DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
RENAME TABLE t1 TO t2;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_rename_across_database.test b/mysql-test/suite/engines/funcs/t/tc_rename_across_database.test
index f5518300920..f0c005d82ec 100644
--- a/mysql-test/suite/engines/funcs/t/tc_rename_across_database.test
+++ b/mysql-test/suite/engines/funcs/t/tc_rename_across_database.test
@@ -6,21 +6,21 @@ CREATE DATABASE d1;
CREATE TABLE d1.t2(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE d1.t2;
RENAME TABLE t1 TO d1.t3;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
USE d1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t3;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2; DROP TABLE t2,t3; SHOW TABLES;
DROP DATABASE d1;
diff --git a/mysql-test/suite/engines/funcs/t/tc_rename_error.test b/mysql-test/suite/engines/funcs/t/tc_rename_error.test
index 3fc4901a364..6b56b1e6ca4 100644
--- a/mysql-test/suite/engines/funcs/t/tc_rename_error.test
+++ b/mysql-test/suite/engines/funcs/t/tc_rename_error.test
@@ -5,7 +5,7 @@ CREATE TABLE t1(c1 INTEGER NULL);
CREATE TABLE t2(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
--error 1050
RENAME TABLE t2 TO t1;
@@ -15,10 +15,10 @@ RENAME TABLE t3 TO t1;
RENAME TABLE t3 TO doesnotexist.t1;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t2;
DROP TABLE t2;
SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_structure_comment.test b/mysql-test/suite/engines/funcs/t/tc_structure_comment.test
index 1a8259f956c..977fd41239b 100644
--- a/mysql-test/suite/engines/funcs/t/tc_structure_comment.test
+++ b/mysql-test/suite/engines/funcs/t/tc_structure_comment.test
@@ -4,126 +4,126 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 BIT NULL) COMMENT = 'This table has a BIT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYINT NULL) COMMENT = 'This table has a TINYINT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 SMALLINT NULL) COMMENT = 'This table has a SMALLINT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMINT NULL) COMMENT = 'This table has a MEDIUMINT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INT NULL) COMMENT = 'This table has a INT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 INTEGER NULL) COMMENT = 'This table has a INTEGER column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BIGINT NULL) COMMENT = 'This table has a BIGINT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 REAL NULL) COMMENT = 'This table has a REAL column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DOUBLE NULL) COMMENT = 'This table has a DOUBLE column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 FLOAT NULL) COMMENT = 'This table has a FLOAT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DECIMAL NULL) COMMENT = 'This table has a DECIMAL column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 NUMERIC NULL) COMMENT = 'This table has a NUMERIC column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATE NULL) COMMENT = 'This table has a DATE column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIME NULL) COMMENT = 'This table has a TIME column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 DATETIME NULL) COMMENT = 'This table has a DATETIME column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TIMESTAMP NULL) COMMENT = 'This table has a TIMESTAMP column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 YEAR NULL) COMMENT = 'This table has a YEAR column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYBLOB NULL) COMMENT = 'This table has a TINYBLOB column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BLOB NULL) COMMENT = 'This table has a BLOB column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMBLOB NULL) COMMENT = 'This table has a MEDIUMBLOB column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGBLOB NULL) COMMENT = 'This table has a LONGBLOB column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TINYTEXT NULL) COMMENT = 'This table has a TINYTEXT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 TEXT NULL) COMMENT = 'This table has a TEXT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 MEDIUMTEXT NULL) COMMENT = 'This table has a MEDIUMTEXT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 LONGTEXT NULL) COMMENT = 'This table has a LONGTEXT column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_structure_create_like.test b/mysql-test/suite/engines/funcs/t/tc_structure_create_like.test
index 277bdaf2023..b9c6b0eb7c4 100644
--- a/mysql-test/suite/engines/funcs/t/tc_structure_create_like.test
+++ b/mysql-test/suite/engines/funcs/t/tc_structure_create_like.test
@@ -5,175 +5,175 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BIT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TINYINT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 SMALLINT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 MEDIUMINT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 INT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 INTEGER NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BIGINT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 REAL NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DOUBLE NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 FLOAT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DECIMAL NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 NUMERIC NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DATE NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TIME NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DATETIME NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TIMESTAMP NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 YEAR NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TINYBLOB NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BLOB NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 MEDIUMBLOB NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 LONGBLOB NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TINYTEXT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TEXT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 MEDIUMTEXT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 LONGTEXT NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
diff --git a/mysql-test/suite/engines/funcs/t/tc_structure_create_like_string.test b/mysql-test/suite/engines/funcs/t/tc_structure_create_like_string.test
index 551a87f12ab..96951a2d5ce 100644
--- a/mysql-test/suite/engines/funcs/t/tc_structure_create_like_string.test
+++ b/mysql-test/suite/engines/funcs/t/tc_structure_create_like_string.test
@@ -5,28 +5,28 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 CHAR(10) NULL, PRIMARY KEY(
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 VARCHAR(10) NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BINARY(10) NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 VARBINARY(10) NULL, PRIMARY KEY(c1));
CREATE TABLE dst LIKE src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
DROP TABLE src;
diff --git a/mysql-test/suite/engines/funcs/t/tc_structure_create_select.test b/mysql-test/suite/engines/funcs/t/tc_structure_create_select.test
index e44b233f1c8..efac8f7a46a 100644
--- a/mysql-test/suite/engines/funcs/t/tc_structure_create_select.test
+++ b/mysql-test/suite/engines/funcs/t/tc_structure_create_select.test
@@ -5,7 +5,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BIT NULL, PRIMARY KEY(c1));
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -15,7 +15,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TINYINT NULL, PRIMARY KEY(c
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -25,7 +25,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 SMALLINT NULL, PRIMARY KEY(
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -35,7 +35,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 MEDIUMINT NULL, PRIMARY KEY
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -45,7 +45,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 INT NULL, PRIMARY KEY(c1));
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -55,7 +55,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 INTEGER NULL, PRIMARY KEY(c
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -65,7 +65,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BIGINT NULL, PRIMARY KEY(c1
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -75,7 +75,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 REAL NULL, PRIMARY KEY(c1))
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -85,7 +85,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DOUBLE NULL, PRIMARY KEY(c1
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -95,7 +95,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 FLOAT NULL, PRIMARY KEY(c1)
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -105,7 +105,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DECIMAL NULL, PRIMARY KEY(c
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -115,7 +115,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 NUMERIC NULL, PRIMARY KEY(c
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -125,7 +125,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DATE NULL, PRIMARY KEY(c1))
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -135,7 +135,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TIME NULL, PRIMARY KEY(c1))
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -145,7 +145,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 DATETIME NULL, PRIMARY KEY(
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -155,7 +155,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TIMESTAMP NULL, PRIMARY KEY
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -165,7 +165,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 YEAR NULL, PRIMARY KEY(c1))
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -175,7 +175,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TINYBLOB NULL, PRIMARY KEY(
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -185,7 +185,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BLOB NULL, PRIMARY KEY(c1))
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -195,7 +195,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 MEDIUMBLOB NULL, PRIMARY KE
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -205,7 +205,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 LONGBLOB NULL, PRIMARY KEY(
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -215,7 +215,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TINYTEXT NULL, PRIMARY KEY(
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -225,7 +225,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 TEXT NULL, PRIMARY KEY(c1))
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -235,7 +235,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 MEDIUMTEXT NULL, PRIMARY KE
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -245,7 +245,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 LONGTEXT NULL, PRIMARY KEY(
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_structure_create_select_string.test b/mysql-test/suite/engines/funcs/t/tc_structure_create_select_string.test
index 3942701a5bc..1663c3a4f97 100644
--- a/mysql-test/suite/engines/funcs/t/tc_structure_create_select_string.test
+++ b/mysql-test/suite/engines/funcs/t/tc_structure_create_select_string.test
@@ -5,7 +5,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 CHAR(10) NULL, PRIMARY KEY(
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -15,7 +15,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 VARCHAR(10) NULL, PRIMARY K
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -25,7 +25,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 BINARY(10) NULL, PRIMARY KE
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
@@ -35,7 +35,7 @@ CREATE TABLE src (c1 INT NOT NULL AUTO_INCREMENT, c2 VARBINARY(10) NULL, PRIMARY
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1)) SELECT c1,c2 FROM src;
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE dst; DROP TABLE dst; SHOW TABLES;
CREATE TABLE dst (c1 INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(c1))ENGINE=MyISAM SELECT c1,c2 FROM src;
SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_structure_string_comment.test b/mysql-test/suite/engines/funcs/t/tc_structure_string_comment.test
index 0182617e10f..4dee87e53b3 100644
--- a/mysql-test/suite/engines/funcs/t/tc_structure_string_comment.test
+++ b/mysql-test/suite/engines/funcs/t/tc_structure_string_comment.test
@@ -4,21 +4,21 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(c1 CHAR(10) NULL) COMMENT = 'This table has a CHAR column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARCHAR(10) NULL) COMMENT = 'This table has a VARCHAR column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 BINARY(10) NULL) COMMENT = 'This table has a BINARY column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TABLE t1(c1 VARBINARY(10) NULL) COMMENT = 'This table has a VARBINARY column';
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_temporary_column.test b/mysql-test/suite/engines/funcs/t/tc_temporary_column.test
index eb7c79be88d..a74dbdcab68 100644
--- a/mysql-test/suite/engines/funcs/t/tc_temporary_column.test
+++ b/mysql-test/suite/engines/funcs/t/tc_temporary_column.test
@@ -4,281 +4,281 @@ DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE t1(c1 BIT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TINYINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 SMALLINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 MEDIUMINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 INT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 INTEGER NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 BIGINT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DECIMAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DEC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 FIXED NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 NUMERIC NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DOUBLE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 REAL NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DOUBLE PRECISION NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 FLOAT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DATE NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TIMESTAMP NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DATETIME NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 YEAR NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TINYBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 BLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 MEDIUMBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 LONGBLOB NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TINYTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 MEDIUMTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 LONGTEXT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 BIT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TINYINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 SMALLINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 MEDIUMINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 INT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 INTEGER NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 BIGINT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DECIMAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DEC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 FIXED NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 NUMERIC NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DOUBLE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 REAL NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DOUBLE PRECISION NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 FLOAT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DATE NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TIMESTAMP NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 DATETIME NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 YEAR NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TINYBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 BLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 MEDIUMBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 LONGBLOB NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TINYTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 TEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 MEDIUMTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
CREATE TEMPORARY TABLE t1(c1 LONGTEXT NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/t/tc_temporary_column_length.test b/mysql-test/suite/engines/funcs/t/tc_temporary_column_length.test
index 864f74f0185..dee5abe4a32 100644
--- a/mysql-test/suite/engines/funcs/t/tc_temporary_column_length.test
+++ b/mysql-test/suite/engines/funcs/t/tc_temporary_column_length.test
@@ -4,111 +4,111 @@ DROP TABLE IF EXISTS t5;
CREATE TEMPORARY TABLE t5(c1 BIT(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 TINYINT(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 SMALLINT(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 MEDIUMINT(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 INT(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 INTEGER(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 BIGINT(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 CHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 VARCHAR(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 BINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 VARBINARY(10) NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 BIT(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 TINYINT(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 SMALLINT(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 MEDIUMINT(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 INT(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 INTEGER(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 BIGINT(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 CHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 VARCHAR(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 BINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
CREATE TEMPORARY TABLE t5(c1 VARBINARY(10) NOT NULL);
SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
---replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" ""
+--replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
SHOW CREATE TABLE t5; DROP TABLE t5; SHOW TABLES;
diff --git a/mysql-test/suite/federated/error_on_close-8313.result b/mysql-test/suite/federated/error_on_close-8313.result
index d8b72c1c52a..f1220015cc3 100644
--- a/mysql-test/suite/federated/error_on_close-8313.result
+++ b/mysql-test/suite/federated/error_on_close-8313.result
@@ -18,6 +18,7 @@ connection='s1';
select * from t1;
foo bar
connection slave;
+# restart
connection master;
drop table t1;
drop server s1;
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.result b/mysql-test/suite/federated/federatedx_create_handlers.result
new file mode 100644
index 00000000000..b115cc73b87
--- /dev/null
+++ b/mysql-test/suite/federated/federatedx_create_handlers.result
@@ -0,0 +1,429 @@
+connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
+connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
+connection master;
+CREATE DATABASE federated;
+connection slave;
+CREATE DATABASE federated;
+connection default;
+set global federated_pushdown=1;
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+Warnings:
+Note 1051 Unknown table 'federated.t1'
+CREATE TABLE federated.t1 (
+id int(20) NOT NULL,
+name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+INSERT INTO federated.t1 VALUES
+(3,'xxx'), (7,'yyy'), (4,'xxx'), (1,'zzz'), (5,'yyy');
+DROP TABLE IF EXISTS federated.t2;
+Warnings:
+Note 1051 Unknown table 'federated.t2'
+CREATE TABLE federated.t2 (
+name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+INSERT INTO federated.t2 VALUES
+('yyy'), ('www'), ('yyy'), ('xxx'), ('www'), ('yyy'), ('www');
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+Warnings:
+Note 1051 Unknown table 'federated.t1'
+CREATE TABLE federated.t1 (
+id int(20) NOT NULL,
+name varchar(16) NOT NULL default ''
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
+DROP TABLE IF EXISTS federated.t2;
+Warnings:
+Note 1051 Unknown table 'federated.t2'
+CREATE TABLE federated.t2 (
+name varchar(16) NOT NULL default ''
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t2';
+SELECT * FROM federated.t1;
+id name
+3 xxx
+7 yyy
+4 xxx
+1 zzz
+5 yyy
+SELECT id FROM federated.t1 WHERE id < 5;
+id
+3
+4
+1
+SELECT count(*), name FROM federated.t1 WHERE id < 5 GROUP BY name;
+count(*) name
+2 xxx
+1 zzz
+SELECT * FROM federated.t1, federated.t2
+WHERE federated.t1.name = federated.t2.name;
+id name name
+7 yyy yyy
+5 yyy yyy
+7 yyy yyy
+5 yyy yyy
+3 xxx xxx
+4 xxx xxx
+7 yyy yyy
+5 yyy yyy
+SELECT * FROM federated.t1 LEFT JOIN federated.t2
+ON federated.t1.name = federated.t2.name
+WHERE federated.t1.id > 1;
+id name name
+7 yyy yyy
+5 yyy yyy
+7 yyy yyy
+5 yyy yyy
+3 xxx xxx
+4 xxx xxx
+7 yyy yyy
+5 yyy yyy
+SELECT * FROM federated.t1
+WHERE id IN (SELECT count(*) FROM federated.t2 GROUP BY name);
+id name
+3 xxx
+1 zzz
+EXPLAIN
+SELECT id FROM federated.t1 WHERE id < 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PUSHED SELECT NULL NULL NULL NULL NULL NULL NULL NULL
+EXPLAIN EXTENDED
+SELECT id FROM federated.t1 WHERE id < 5;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PUSHED SELECT NULL NULL NULL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 select `federated`.`t1`.`id` AS `id` from `federated`.`t1` where `federated`.`t1`.`id` < 5
+EXPLAIN FORMAT=JSON
+SELECT id FROM federated.t1 WHERE id < 5;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Pushed select"
+ }
+ }
+}
+ANALYZE
+SELECT id FROM federated.t1 WHERE id < 5;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 PUSHED SELECT NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
+ANALYZE FORMAT=JSON
+SELECT id FROM federated.t1 WHERE id < 5;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Pushed select"
+ }
+ }
+}
+CREATE TABLE federated.t3 (
+name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+INSERT INTO federated.t3 VALUES
+('yyy'), ('www'), ('yyy'), ('xxx'), ('www'), ('yyy'), ('www');
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+name id name
+yyy 5 yyy
+yyy 7 yyy
+yyy 5 yyy
+yyy 7 yyy
+xxx 4 xxx
+yyy 5 yyy
+yyy 7 yyy
+EXPLAIN
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 7
+1 PRIMARY <derived2> ref key0 key0 18 federated.t3.name 2
+2 PUSHED DERIVED NULL NULL NULL NULL NULL NULL NULL NULL
+EXPLAIN FORMAT=JSON
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "rows": 7,
+ "filtered": 100
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "18",
+ "used_key_parts": ["name"],
+ "ref": ["federated.t3.name"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "message": "Pushed derived"
+ }
+ }
+ }
+ }
+ }
+}
+ANALYZE
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 7 7.00 100.00 100.00
+1 PRIMARY <derived2> ref key0 key0 18 federated.t3.name 2 0.00 100.00 100.00
+2 PUSHED DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
+SELECT *
+FROM federated.t3, (SELECT t1.name FROM federated.t1
+WHERE id IN (SELECT count(*)
+FROM federated.t2 GROUP BY name)) t
+WHERE federated.t3.name=t.name;
+name name
+xxx xxx
+EXPLAIN
+SELECT *
+FROM federated.t3, (SELECT t1.name FROM federated.t1
+WHERE id IN (SELECT count(*)
+FROM federated.t2 GROUP BY name)) t
+WHERE federated.t3.name=t.name;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 7
+1 PRIMARY <derived2> ref key0 key0 18 federated.t3.name 2
+2 PUSHED DERIVED NULL NULL NULL NULL NULL NULL NULL NULL
+ANALYZE FORMAT=JSON
+SELECT *
+FROM federated.t3, (SELECT t1.name FROM federated.t1
+WHERE id IN (SELECT count(*)
+FROM federated.t2 GROUP BY name)) t
+WHERE federated.t3.name=t.name;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "table": {
+ "table_name": "t3",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 7,
+ "r_rows": 7,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "18",
+ "used_key_parts": ["name"],
+ "ref": ["federated.t3.name"],
+ "r_loops": 7,
+ "rows": 2,
+ "r_rows": 0,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "message": "Pushed derived"
+ }
+ }
+ }
+ }
+ }
+}
+SELECT t.id, federated.t3.name
+FROM federated.t3,
+( SELECT * FROM federated.t1 WHERE id < 3
+UNION
+SELECT * FROM federated.t1 WHERE id >= 5) t
+WHERE federated.t3.name=t.name;
+id name
+5 yyy
+7 yyy
+5 yyy
+7 yyy
+5 yyy
+7 yyy
+EXPLAIN
+SELECT t.id, federated.t3.name
+FROM federated.t3,
+( SELECT * FROM federated.t1 WHERE id < 3
+UNION
+SELECT * FROM federated.t1 WHERE id >= 5) t
+WHERE federated.t3.name=t.name;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 7
+1 PRIMARY <derived2> ref key0 key0 18 federated.t3.name 2
+2 PUSHED DERIVED NULL NULL NULL NULL NULL NULL NULL NULL
+#
+# MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code
+#
+CREATE TABLE federated.t4 (
+id int(20) NOT NULL,
+name varchar(16) NOT NULL default ''
+) engine=myisam;
+insert into federated.t4 select * from federated.t1;
+select * from federated.t4;
+id name
+1 zzz
+3 xxx
+4 xxx
+5 yyy
+7 yyy
+select name into @var from federated.t1 where id=3 limit 1 ;
+select @var;
+@var
+xxx
+select name into outfile 'tmp.txt' from federated.t1;
+#
+# MDEV-22993: Crash on EXPLAIN with PUSHED DOWN SELECT and subquery
+#
+explain
+select * from federated.t1
+where name in (select name from federated.t2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PUSHED SELECT NULL NULL NULL NULL NULL NULL NULL NULL
+explain format=json
+select * from federated.t1
+where name in (select name from federated.t2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "message": "Pushed select"
+ }
+ }
+}
+#
+# MDEV-22993, testcase #2: EXPLAIN output doesn't make sense when
+# derived table pushdown is used.
+#
+create table t5 (a int) engine=myisam;
+insert into t5 values (1),(2);
+# Must not show lines with id=3
+explain
+select * from t5,
+(select id from federated.t1
+where name in (select name from federated.t2) or name like 'foo%') as TQ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t5 ALL NULL NULL NULL NULL 2
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
+2 PUSHED DERIVED NULL NULL NULL NULL NULL NULL NULL NULL
+# Must not show elements with select_id=3
+explain format=json
+select * from t5,
+(select id from federated.t1
+where name in (select name from federated.t2) or name like 'foo%') as TQ;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t5",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 5,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "65",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "message": "Pushed derived"
+ }
+ }
+ }
+ }
+ }
+}
+drop table t5;
+DROP TABLE federated.t1, federated.t2, federated.t3, federated.t4;
+connection slave;
+DROP TABLE federated.t1, federated.t2;
+connection default;
+#
+# MDEV-23778: Derived handler used for big derived tables
+#
+connection slave;
+CREATE TABLE federated.t1 (
+a varchar(100) NOT NULL default '123'
+)
+DEFAULT CHARSET=latin1;
+CREATE TABLE federated.t2 LIKE federated.t1;
+BEGIN NOT ATOMIC
+DECLARE i INT DEFAULT 0;
+START TRANSACTION;
+WHILE i < 70000 DO
+INSERT INTO federated.t1 VALUES (i);
+SET i = i + 1;
+END WHILE;
+COMMIT;
+END
+$$
+connection master;
+CREATE TABLE federated.t1 (
+a varchar(100) NOT NULL default '123'
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
+CREATE TABLE federated.t2 (
+a varchar(100) NOT NULL default '123'
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t2';
+SELECT COUNT(DISTINCT a) FROM federated.t1;
+COUNT(DISTINCT a)
+70000
+INSERT INTO federated.t2
+SELECT * FROM (SELECT * FROM federated.t1 LIMIT 100) dt;
+SELECT COUNT(DISTINCT a) FROM federated.t2;
+COUNT(DISTINCT a)
+100
+TRUNCATE TABLE federated.t2;
+INSERT INTO federated.t2
+SELECT * FROM (SELECT * FROM federated.t1 LIMIT 70000) dt;
+SELECT COUNT(DISTINCT a) FROM federated.t2;
+COUNT(DISTINCT a)
+70000
+set global federated_pushdown=0;
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.test b/mysql-test/suite/federated/federatedx_create_handlers.test
new file mode 100644
index 00000000000..4b5789e1d96
--- /dev/null
+++ b/mysql-test/suite/federated/federatedx_create_handlers.test
@@ -0,0 +1,271 @@
+--source have_federatedx.inc
+--source include/federated.inc
+
+connection default;
+
+set global federated_pushdown=1;
+
+connection slave;
+
+DROP TABLE IF EXISTS federated.t1;
+
+CREATE TABLE federated.t1 (
+ id int(20) NOT NULL,
+ name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+
+INSERT INTO federated.t1 VALUES
+ (3,'xxx'), (7,'yyy'), (4,'xxx'), (1,'zzz'), (5,'yyy');
+
+DROP TABLE IF EXISTS federated.t2;
+
+CREATE TABLE federated.t2 (
+ name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+
+INSERT INTO federated.t2 VALUES
+ ('yyy'), ('www'), ('yyy'), ('xxx'), ('www'), ('yyy'), ('www');
+
+
+connection master;
+
+DROP TABLE IF EXISTS federated.t1;
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval
+CREATE TABLE federated.t1 (
+ id int(20) NOT NULL,
+ name varchar(16) NOT NULL default ''
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
+
+DROP TABLE IF EXISTS federated.t2;
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval
+CREATE TABLE federated.t2 (
+ name varchar(16) NOT NULL default ''
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2';
+
+SELECT * FROM federated.t1;
+
+SELECT id FROM federated.t1 WHERE id < 5;
+
+SELECT count(*), name FROM federated.t1 WHERE id < 5 GROUP BY name;
+
+SELECT * FROM federated.t1, federated.t2
+ WHERE federated.t1.name = federated.t2.name;
+
+SELECT * FROM federated.t1 LEFT JOIN federated.t2
+ ON federated.t1.name = federated.t2.name
+ WHERE federated.t1.id > 1;
+
+SELECT * FROM federated.t1
+ WHERE id IN (SELECT count(*) FROM federated.t2 GROUP BY name);
+
+EXPLAIN
+SELECT id FROM federated.t1 WHERE id < 5;
+
+EXPLAIN EXTENDED
+SELECT id FROM federated.t1 WHERE id < 5;
+
+EXPLAIN FORMAT=JSON
+SELECT id FROM federated.t1 WHERE id < 5;
+
+ANALYZE
+SELECT id FROM federated.t1 WHERE id < 5;
+
+--source include/analyze-format.inc
+ANALYZE FORMAT=JSON
+SELECT id FROM federated.t1 WHERE id < 5;
+
+CREATE TABLE federated.t3 (
+ name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+
+INSERT INTO federated.t3 VALUES
+ ('yyy'), ('www'), ('yyy'), ('xxx'), ('www'), ('yyy'), ('www');
+
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+
+EXPLAIN
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+
+EXPLAIN FORMAT=JSON
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+
+ANALYZE
+SELECT *
+FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
+WHERE federated.t3.name=t.name;
+
+SELECT *
+FROM federated.t3, (SELECT t1.name FROM federated.t1
+ WHERE id IN (SELECT count(*)
+ FROM federated.t2 GROUP BY name)) t
+WHERE federated.t3.name=t.name;
+
+EXPLAIN
+SELECT *
+FROM federated.t3, (SELECT t1.name FROM federated.t1
+ WHERE id IN (SELECT count(*)
+ FROM federated.t2 GROUP BY name)) t
+WHERE federated.t3.name=t.name;
+
+--source include/analyze-format.inc
+ANALYZE FORMAT=JSON
+SELECT *
+FROM federated.t3, (SELECT t1.name FROM federated.t1
+ WHERE id IN (SELECT count(*)
+ FROM federated.t2 GROUP BY name)) t
+WHERE federated.t3.name=t.name;
+
+SELECT t.id, federated.t3.name
+FROM federated.t3,
+ ( SELECT * FROM federated.t1 WHERE id < 3
+ UNION
+ SELECT * FROM federated.t1 WHERE id >= 5) t
+WHERE federated.t3.name=t.name;
+
+EXPLAIN
+SELECT t.id, federated.t3.name
+FROM federated.t3,
+ ( SELECT * FROM federated.t1 WHERE id < 3
+ UNION
+ SELECT * FROM federated.t1 WHERE id >= 5) t
+WHERE federated.t3.name=t.name;
+
+--echo #
+--echo # MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code
+--echo #
+
+CREATE TABLE federated.t4 (
+ id int(20) NOT NULL,
+ name varchar(16) NOT NULL default ''
+) engine=myisam;
+insert into federated.t4 select * from federated.t1;
+
+--sorted_result
+select * from federated.t4;
+
+select name into @var from federated.t1 where id=3 limit 1 ;
+select @var;
+select name into outfile 'tmp.txt' from federated.t1;
+
+let $path=`select concat(@@datadir, 'test/tmp.txt')`;
+remove_file $path;
+
+--echo #
+--echo # MDEV-22993: Crash on EXPLAIN with PUSHED DOWN SELECT and subquery
+--echo #
+
+explain
+select * from federated.t1
+where name in (select name from federated.t2);
+
+explain format=json
+select * from federated.t1
+where name in (select name from federated.t2);
+
+--echo #
+--echo # MDEV-22993, testcase #2: EXPLAIN output doesn't make sense when
+--echo # derived table pushdown is used.
+--echo #
+
+create table t5 (a int) engine=myisam;
+insert into t5 values (1),(2);
+
+--echo # Must not show lines with id=3
+explain
+select * from t5,
+(select id from federated.t1
+ where name in (select name from federated.t2) or name like 'foo%') as TQ;
+
+--echo # Must not show elements with select_id=3
+explain format=json
+select * from t5,
+(select id from federated.t1
+ where name in (select name from federated.t2) or name like 'foo%') as TQ;
+
+drop table t5;
+
+DROP TABLE federated.t1, federated.t2, federated.t3, federated.t4;
+
+connection slave;
+DROP TABLE federated.t1, federated.t2;
+
+connection default;
+
+--echo #
+--echo # MDEV-23778: Derived handler used for big derived tables
+--echo #
+
+connection slave;
+
+CREATE TABLE federated.t1 (
+ a varchar(100) NOT NULL default '123'
+)
+DEFAULT CHARSET=latin1;
+
+CREATE TABLE federated.t2 LIKE federated.t1;
+
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE i INT DEFAULT 0;
+ START TRANSACTION;
+ WHILE i < 70000 DO
+ INSERT INTO federated.t1 VALUES (i);
+ SET i = i + 1;
+ END WHILE;
+ COMMIT;
+END
+$$
+
+DELIMITER ;$$
+
+connection master;
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval
+CREATE TABLE federated.t1 (
+ a varchar(100) NOT NULL default '123'
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
+
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval
+CREATE TABLE federated.t2 (
+ a varchar(100) NOT NULL default '123'
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t2';
+
+SELECT COUNT(DISTINCT a) FROM federated.t1;
+
+INSERT INTO federated.t2
+ SELECT * FROM (SELECT * FROM federated.t1 LIMIT 100) dt;
+SELECT COUNT(DISTINCT a) FROM federated.t2;
+
+TRUNCATE TABLE federated.t2;
+INSERT INTO federated.t2
+ SELECT * FROM (SELECT * FROM federated.t1 LIMIT 70000) dt;
+SELECT COUNT(DISTINCT a) FROM federated.t2;
+
+set global federated_pushdown=0;
+
+source include/federated_cleanup.inc;
+
diff --git a/mysql-test/suite/federated/federatedx_versioning.result b/mysql-test/suite/federated/federatedx_versioning.result
index d9e8a421989..be3b578e839 100644
--- a/mysql-test/suite/federated/federatedx_versioning.result
+++ b/mysql-test/suite/federated/federatedx_versioning.result
@@ -46,8 +46,12 @@ x check_row(row_start, row_end)
4 HISTORICAL ROW
select * from tf;
x
-# TRUNCATE
+# MDEV-15966: Behavior for TRUNCATE versioned table is not documented
+# and not covered by tests
+# As of standard, TRUNCATE on versioned tables is forbidden
truncate tf;
+ERROR HY000: Got error 10000 'Error on remote system: 4137: System-versioned tables do not support TRUNCATE TABLE' from FEDERATED
+delete history from t1;
select * from t1 for system_time all;
x
# REPLACE
@@ -81,8 +85,10 @@ x check_row(row_start, row_end)
3 HISTORICAL ROW
4 HISTORICAL ROW
# multi-UPDATE
-truncate t1;
-truncate t2;
+delete from t1;
+delete history from t1;
+delete from t2;
+delete history from t2;
insert into t1 values (1);
insert into t2 values (2, 2);
update tf, t2f set tf.x= 11, t2f.y= 22;
diff --git a/mysql-test/suite/federated/federatedx_versioning.test b/mysql-test/suite/federated/federatedx_versioning.test
index 44999522a4d..6c3247cea55 100644
--- a/mysql-test/suite/federated/federatedx_versioning.test
+++ b/mysql-test/suite/federated/federatedx_versioning.test
@@ -32,8 +32,13 @@ select *, check_row(row_start, row_end) from t1 for system_time all
order by x;
select * from tf;
---echo # TRUNCATE
+--echo # MDEV-15966: Behavior for TRUNCATE versioned table is not documented
+--echo # and not covered by tests
+--echo # As of standard, TRUNCATE on versioned tables is forbidden
+--error ER_GET_ERRMSG
truncate tf;
+
+delete history from t1;
select * from t1 for system_time all;
--echo # REPLACE
@@ -62,8 +67,10 @@ select *, check_row(row_start, row_end) from t1 for system_time all
order by x;
--echo # multi-UPDATE
-truncate t1;
-truncate t2;
+delete from t1;
+delete history from t1;
+delete from t2;
+delete history from t2;
insert into t1 values (1);
insert into t2 values (2, 2);
update tf, t2f set tf.x= 11, t2f.y= 22;
diff --git a/mysql-test/suite/federated/net_thd_crash-12725.result b/mysql-test/suite/federated/net_thd_crash-12725.result
index 8c85b7a7594..cd9f5b0a715 100644
--- a/mysql-test/suite/federated/net_thd_crash-12725.result
+++ b/mysql-test/suite/federated/net_thd_crash-12725.result
@@ -5,6 +5,7 @@ CREATE TABLE t2 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:MAST
ALTER TABLE t2 DISABLE KEYS;
ERROR HY000: Storage engine FEDERATED of the table `test`.`t2` doesn't have this option
CREATE TABLE t3 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:MASTER_MYPORT/test/t1";
+# restart
SET GLOBAL query_cache_size= default;
SET GLOBAL query_cache_type= default;
drop table t1, t2, t3;
diff --git a/mysql-test/suite/federated/net_thd_crash-12951.result b/mysql-test/suite/federated/net_thd_crash-12951.result
index 573ac96efff..a46bad2dbdc 100644
--- a/mysql-test/suite/federated/net_thd_crash-12951.result
+++ b/mysql-test/suite/federated/net_thd_crash-12951.result
@@ -5,6 +5,7 @@ create table t2 (i int) engine=federated
CONNECTION="mysql://root@localhost:MASTER_MYPORT/test/t1";
select * from t2;
i
+# restart
drop table t2;
drop table t1;
set global query_cache_type= default;
diff --git a/mysql-test/suite/federated/optimizer.result b/mysql-test/suite/federated/optimizer.result
new file mode 100644
index 00000000000..5d7072e0b35
--- /dev/null
+++ b/mysql-test/suite/federated/optimizer.result
@@ -0,0 +1,52 @@
+connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
+connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
+connection master;
+CREATE DATABASE federated;
+connection slave;
+CREATE DATABASE federated;
+connection default;
+#
+# MDEV-14907 FEDERATEDX doesn't respect DISTINCT
+#
+CREATE TABLE t1 (
+`foo_id` bigint(20) unsigned NOT NULL,
+`foo_name` varchar(255) DEFAULT NULL,
+`parent_foo_id` bigint(20) unsigned DEFAULT NULL,
+PRIMARY KEY (`foo_id`),
+KEY `foo_name` (`foo_name`),
+KEY `parent_foo_id` (`parent_foo_id`)
+) DEFAULT CHARSET=utf8;
+CREATE TABLE `fed_t1` ENGINE=FEDERATED DEFAULT CHARSET=utf8 CONNECTION='mysql://root@127.0.0.1:MASTER_PORT/test/t1';
+INSERT INTO t1 VALUES (968903, 'STRING - 0', 822857);
+INSERT INTO t1 VALUES (968953, 'STRING - 1', 822857);
+INSERT INTO t1 VALUES (971603, 'STRING - 2', 822857);
+INSERT INTO t1 VALUES (971803, 'STRING - 3', 822857);
+INSERT INTO t1 VALUES (975103, 'STRING - 4', 822857);
+INSERT INTO t1 VALUES (822857, 'STRING', NULL);
+select foo_id,parent_foo_id,foo_name from t1 where parent_foo_id = 822857 or foo_name like 'STRING%';
+foo_id parent_foo_id foo_name
+968903 822857 STRING - 0
+968953 822857 STRING - 1
+971603 822857 STRING - 2
+971803 822857 STRING - 3
+975103 822857 STRING - 4
+822857 NULL STRING
+explain
+select foo_id,parent_foo_id,foo_name from fed_t1 where parent_foo_id = 822857 or foo_name like 'STRING%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE fed_t1 ALL foo_name,parent_foo_id NULL NULL NULL 6 Using where
+select foo_id,parent_foo_id,foo_name from fed_t1 where parent_foo_id = 822857 or foo_name like 'STRING%';
+foo_id parent_foo_id foo_name
+968903 822857 STRING - 0
+968953 822857 STRING - 1
+971603 822857 STRING - 2
+971803 822857 STRING - 3
+975103 822857 STRING - 4
+822857 NULL STRING
+DROP TABLE fed_t1, t1;
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
diff --git a/mysql-test/suite/federated/optimizer.test b/mysql-test/suite/federated/optimizer.test
new file mode 100644
index 00000000000..4263060fab5
--- /dev/null
+++ b/mysql-test/suite/federated/optimizer.test
@@ -0,0 +1,39 @@
+#
+#Test optimizer flags related to federated tables
+#
+
+--source have_federatedx.inc
+--source include/federated.inc
+
+connection default;
+
+--echo #
+--echo # MDEV-14907 FEDERATEDX doesn't respect DISTINCT
+--echo #
+
+CREATE TABLE t1 (
+ `foo_id` bigint(20) unsigned NOT NULL,
+ `foo_name` varchar(255) DEFAULT NULL,
+ `parent_foo_id` bigint(20) unsigned DEFAULT NULL,
+ PRIMARY KEY (`foo_id`),
+ KEY `foo_name` (`foo_name`),
+ KEY `parent_foo_id` (`parent_foo_id`)
+) DEFAULT CHARSET=utf8;
+
+--replace_result $MASTER_MYPORT MASTER_PORT
+eval CREATE TABLE `fed_t1` ENGINE=FEDERATED DEFAULT CHARSET=utf8 CONNECTION='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1';
+INSERT INTO t1 VALUES (968903, 'STRING - 0', 822857);
+INSERT INTO t1 VALUES (968953, 'STRING - 1', 822857);
+INSERT INTO t1 VALUES (971603, 'STRING - 2', 822857);
+INSERT INTO t1 VALUES (971803, 'STRING - 3', 822857);
+INSERT INTO t1 VALUES (975103, 'STRING - 4', 822857);
+INSERT INTO t1 VALUES (822857, 'STRING', NULL);
+
+select foo_id,parent_foo_id,foo_name from t1 where parent_foo_id = 822857 or foo_name like 'STRING%';
+
+explain
+select foo_id,parent_foo_id,foo_name from fed_t1 where parent_foo_id = 822857 or foo_name like 'STRING%';
+select foo_id,parent_foo_id,foo_name from fed_t1 where parent_foo_id = 822857 or foo_name like 'STRING%';
+DROP TABLE fed_t1, t1;
+
+source include/federated_cleanup.inc;
diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result
index 917388437e5..e9fa172c321 100644
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result
@@ -2473,12 +2473,12 @@ my_time, id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL order by id;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073701165657 -838:59:59 2
+0 -838:59:59 2
8385959 838:59:59 3
130000 13:00:00 4
100000 10:00:00 5
Warnings:
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2487,12 +2487,12 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL) order by id;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073701165657 -838:59:59 2
+0 -838:59:59 2
8385959 838:59:59 3
130000 13:00:00 4
100000 10:00:00 5
Warnings:
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -2581,15 +2581,14 @@ my_double, id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL order by id;
CAST(my_double AS UNSIGNED INTEGER) my_double id
NULL NULL 1
-9223372036854775808 -1.7976931348623e308 2
-9223372036854775807 1.7976931348623e308 3
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
0 0 4
-18446744073709551615 -1 5
+0 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2598,15 +2597,14 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL) order by id;
CAST(my_double AS UNSIGNED INTEGER) my_double id
NULL NULL 1
-9223372036854775808 -1.7976931348623e308 2
-9223372036854775807 1.7976931348623e308 3
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
0 0 4
-18446744073709551615 -1 5
+0 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -2964,8 +2962,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2979,8 +2977,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -3754,14 +3752,14 @@ WHERE select_id = 51 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 23
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3771,14 +3769,14 @@ WHERE select_id = 51 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 23
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;
@@ -3789,15 +3787,15 @@ my_binary_30, id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1
-00:00:00 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 22
Warnings:
-Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SHOW CREATE VIEW v1;
@@ -3808,15 +3806,15 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1
-00:00:00
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$--
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
-00:00:01 -1
41:58:00 1 17:58
Warnings:
-Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;
@@ -3830,14 +3828,14 @@ WHERE select_id = 49 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 21
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3847,14 +3845,14 @@ WHERE select_id = 49 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 21
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;
@@ -3866,14 +3864,14 @@ WHERE select_id = 48 OR select_id IS NULL order by id;
CAST(my_char_30 AS TIME) my_char_30 id
NULL NULL 1
NULL 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 20
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3883,14 +3881,14 @@ WHERE select_id = 48 OR select_id IS NULL) order by id;
CAST(my_char_30 AS TIME) my_char_30 id
NULL NULL 1
NULL 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 20
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
index 4753efd1794..b2ea135e011 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
@@ -237,7 +237,7 @@ Testcase 3.5.5.2:
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
Create trigger trg2 before INSERT
on t1_temp for each row set new.f2=9999;
-ERROR HY000: Trigger's 't1_temp' is view or temporary table
+ERROR HY000: Trigger's 't1_temp' is view, temporary table or sequence
drop table t1_temp;
Testcase 3.5.5.3:
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result
index e4d0b322563..2436be8142f 100644
--- a/mysql-test/suite/funcs_1/r/is_check_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result
@@ -138,6 +138,7 @@ GRANT SELECT (a) ON `db`.`t1` TO `foo`@`%`
SELECT * FROM information_schema.check_constraints;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
def db t1 CONSTRAINT_1 `b` > 0
+def mysql global_priv Priv json_valid(`Priv`)
CONNECT con1,localhost, foo,, db;
SELECT a FROM t1;
a
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result
index b7c094eec56..910a86b31f0 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result
@@ -206,6 +206,10 @@ def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varc
def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL
def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
+def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select NEVER NULL
+def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(20) select NEVER NULL
+def information_schema OPTIMIZER_TRACE QUERY 1 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
+def information_schema OPTIMIZER_TRACE TRACE 2 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
def information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
def information_schema PARAMETERS CHARACTER_OCTET_LENGTH 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL
def information_schema PARAMETERS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
@@ -746,6 +750,10 @@ NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NU
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
+1.0000 information_schema OPTIMIZER_TRACE QUERY longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
+1.0000 information_schema OPTIMIZER_TRACE TRACE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
+NULL information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE int NULL NULL NULL NULL int(20)
+NULL information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES tinyint NULL NULL NULL NULL tinyint(1)
3.0000 information_schema PARAMETERS SPECIFIC_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema PARAMETERS SPECIFIC_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PARAMETERS SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
index 0855cdf58d6..80865e6347d 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
@@ -206,6 +206,10 @@ def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varc
def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL
def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
+def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) NEVER NULL
+def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(20) NEVER NULL
+def information_schema OPTIMIZER_TRACE QUERY 1 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
+def information_schema OPTIMIZER_TRACE TRACE 2 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
def information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
def information_schema PARAMETERS CHARACTER_OCTET_LENGTH 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL
def information_schema PARAMETERS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
@@ -746,6 +750,10 @@ NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NU
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
+1.0000 information_schema OPTIMIZER_TRACE QUERY longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
+1.0000 information_schema OPTIMIZER_TRACE TRACE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
+NULL information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE int NULL NULL NULL NULL int(20)
+NULL information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES tinyint NULL NULL NULL NULL tinyint(1)
3.0000 information_schema PARAMETERS SPECIFIC_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema PARAMETERS SPECIFIC_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PARAMETERS SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
index a8e8cd33e8f..f5f134bd7a7 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
@@ -61,7 +61,7 @@ def mysql event modified 9 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NUL
def mysql event name 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NEVER NULL
def mysql event on_completion 14 'DROP' NO enum 8 24 NULL NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NEVER NULL
def mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
-def mysql event sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') select,insert,update,references NEVER NULL
+def mysql event sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') select,insert,update,references NEVER NULL
def mysql event starts 11 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def mysql event status 13 'ENABLED' NO enum 18 54 NULL NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NEVER NULL
def mysql event time_zone 18 'SYSTEM' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL
@@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NEVER NULL
+def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
+def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
@@ -93,26 +96,6 @@ def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL
def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references NEVER NULL
def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text select,insert,update,references NEVER NULL
-def mysql host Alter_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Alter_routine_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Create_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Create_routine_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Create_tmp_table_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Create_view_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL
-def mysql host Delete_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Drop_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Execute_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Grant_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
-def mysql host Index_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Insert_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Lock_tables_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host References_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Select_priv 3 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Show_view_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Trigger_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql host Update_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL
def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL
def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL
@@ -153,7 +136,7 @@ def mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL
def mysql proc security_type 8 'DEFINER' NO enum 7 21 NULL NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references NEVER NULL
def mysql proc specific_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NEVER NULL
-def mysql proc sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') select,insert,update,references NEVER NULL
+def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') select,insert,update,references NEVER NULL
def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI select,insert,update,references NEVER NULL
def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL
def mysql procs_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL select,insert,update,references NEVER NULL
@@ -226,53 +209,53 @@ def mysql transaction_registry commit_id 2 NULL NO bigint NULL NULL 20 0 NULL NU
def mysql transaction_registry commit_timestamp 4 '0000-00-00 00:00:00.000000' NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) MUL select,insert,update,references NEVER NULL
def mysql transaction_registry isolation_level 5 NULL NO enum 16 48 NULL NULL NULL utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') select,insert,update,references NEVER NULL
def mysql transaction_registry transaction_id 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references NEVER NULL
-def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references NEVER NULL
-def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL
-def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
-def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
-def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
+def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL
-def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
-def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
-def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) select,insert,update,references NEVER NULL
-def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL
-def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
-def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references NEVER NULL
-def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
-def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
-def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
+def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select,insert,update,references NEVER NULL
+def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) select,insert,update,references NEVER NULL
+def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL
+def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
@@ -289,11 +272,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 blob NULL NULL
1.0000 longblob NULL NULL
1.0000 varbinary NULL NULL
-1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
1.0000 text utf8 utf8_bin
1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_general_ci
+1.0000 longtext utf8mb4 utf8mb4_bin
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
@@ -400,7 +384,7 @@ NULL mysql event starts datetime NULL NULL NULL NULL datetime
NULL mysql event ends datetime NULL NULL NULL NULL datetime
3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
-3.0000 mysql event sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql event sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
@@ -418,6 +402,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
+3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60)
+3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
@@ -436,26 +423,6 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5)
1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text
1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text
1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text
-3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60)
-3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64)
-3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql index_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64)
@@ -491,7 +458,7 @@ NULL mysql innodb_table_stats sum_of_other_index_sizes bigint NULL NULL NULL NUL
3.0000 mysql proc definer char 141 423 utf8 utf8_bin char(141)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
-3.0000 mysql proc sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql proc sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
1.0000 mysql proc comment text 65535 65535 utf8 utf8_bin text
3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc collation_connection char 32 96 utf8 utf8_bin char(32)
@@ -571,48 +538,48 @@ NULL mysql transaction_registry commit_timestamp timestamp NULL NULL NULL NULL t
3.0000 mysql transaction_registry isolation_level enum 16 48 utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE')
3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user User char 80 240 utf8 utf8_bin char(80)
-1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41)
-3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED')
-1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob
-NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
-1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64)
-1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
-3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
+1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
+1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
index 8e8d632fa22..0a375faf072 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
@@ -61,7 +61,7 @@ def mysql event modified 9 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NUL
def mysql event name 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI NEVER NULL
def mysql event on_completion 14 'DROP' NO enum 8 24 NULL NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') NEVER NULL
def mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
-def mysql event sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NEVER NULL
+def mysql event sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NEVER NULL
def mysql event starts 11 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
def mysql event status 13 'ENABLED' NO enum 18 54 NULL NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NEVER NULL
def mysql event time_zone 18 'SYSTEM' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) NEVER NULL
@@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext NEVER NULL
+def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL
+def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL
def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
@@ -93,26 +96,6 @@ def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL
def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI NEVER NULL
def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text NEVER NULL
-def mysql host Alter_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Alter_routine_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Create_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Create_routine_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Create_tmp_table_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Create_view_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL
-def mysql host Delete_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Drop_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Execute_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Grant_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL
-def mysql host Index_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Insert_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Lock_tables_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host References_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Select_priv 3 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Show_view_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Trigger_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql host Update_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL
def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI NEVER NULL
def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI NEVER NULL
@@ -139,7 +122,7 @@ def mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL
def mysql proc security_type 8 'DEFINER' NO enum 7 21 NULL NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') NEVER NULL
def mysql proc specific_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL
def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NEVER NULL
-def mysql proc sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NEVER NULL
+def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NEVER NULL
def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI NEVER NULL
def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL
def mysql procs_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL NEVER NULL
@@ -207,53 +190,53 @@ def mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NUL
def mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
-def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text NEVER NULL
-def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL
-def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL
-def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL
-def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL
+def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) NEVER NULL
+def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) NEVER NULL
-def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL
-def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
-def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) NEVER NULL
-def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) NEVER NULL
-def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
-def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') NEVER NULL
-def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL
-def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
-def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
+def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) NEVER NULL
+def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL
+def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
@@ -274,11 +257,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 blob NULL NULL
1.0000 longblob NULL NULL
1.0000 varbinary NULL NULL
-1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
1.0000 text utf8 utf8_bin
1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_general_ci
+1.0000 longtext utf8mb4 utf8mb4_bin
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
@@ -397,7 +381,7 @@ NULL mysql event starts datetime NULL NULL NULL NULL datetime
NULL mysql event ends datetime NULL NULL NULL NULL datetime
3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
-3.0000 mysql event sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql event sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
@@ -415,6 +399,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
+3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60)
+3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
@@ -433,26 +420,6 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5)
1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text
1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text
1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text
-3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60)
-3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64)
-3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql index_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64)
@@ -474,7 +441,7 @@ NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
3.0000 mysql proc definer char 141 423 utf8 utf8_bin char(141)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
-3.0000 mysql proc sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql proc sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
1.0000 mysql proc comment text 65535 65535 utf8 utf8_bin text
3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc collation_connection char 32 96 utf8 utf8_bin char(32)
@@ -549,50 +516,50 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(
3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8)
3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user User char 80 240 utf8 utf8_bin char(80)
-1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41)
-3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED')
-1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob
-NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
-1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64)
-1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
-3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
+1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
+1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
index 2e85a385d47..6b4f3712d4e 100644
--- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
@@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User
def mysql PRIMARY def mysql event db
def mysql PRIMARY def mysql event name
def mysql PRIMARY def mysql func name
+def mysql PRIMARY def mysql global_priv Host
+def mysql PRIMARY def mysql global_priv User
def mysql PRIMARY def mysql gtid_slave_pos domain_id
def mysql PRIMARY def mysql gtid_slave_pos sub_id
def mysql PRIMARY def mysql help_category help_category_id
@@ -100,8 +102,6 @@ def mysql PRIMARY def mysql help_relation help_keyword_id
def mysql PRIMARY def mysql help_relation help_topic_id
def mysql PRIMARY def mysql help_topic help_topic_id
def mysql name def mysql help_topic name
-def mysql PRIMARY def mysql host Db
-def mysql PRIMARY def mysql host Host
def mysql PRIMARY def mysql index_stats db_name
def mysql PRIMARY def mysql index_stats index_name
def mysql PRIMARY def mysql index_stats prefix_arity
@@ -144,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
def mysql commit_id def mysql transaction_registry commit_id
def mysql PRIMARY def mysql transaction_registry transaction_id
-def mysql PRIMARY def mysql user Host
-def mysql PRIMARY def mysql user User
########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
########################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
index 42bbc170dbc..b21498a4a83 100644
--- a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
@@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User
def mysql PRIMARY def mysql event db
def mysql PRIMARY def mysql event name
def mysql PRIMARY def mysql func name
+def mysql PRIMARY def mysql global_priv Host
+def mysql PRIMARY def mysql global_priv User
def mysql PRIMARY def mysql gtid_slave_pos domain_id
def mysql PRIMARY def mysql gtid_slave_pos sub_id
def mysql PRIMARY def mysql help_category help_category_id
@@ -100,8 +102,6 @@ def mysql PRIMARY def mysql help_relation help_keyword_id
def mysql PRIMARY def mysql help_relation help_topic_id
def mysql PRIMARY def mysql help_topic help_topic_id
def mysql name def mysql help_topic name
-def mysql PRIMARY def mysql host Db
-def mysql PRIMARY def mysql host Host
def mysql PRIMARY def mysql index_stats db_name
def mysql PRIMARY def mysql index_stats index_name
def mysql PRIMARY def mysql index_stats prefix_arity
@@ -144,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
def mysql commit_id def mysql transaction_registry commit_id
def mysql PRIMARY def mysql transaction_registry transaction_id
-def mysql PRIMARY def mysql user Host
-def mysql PRIMARY def mysql user User
########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
########################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result
index 44fa1123f57..eefd2826eb6 100644
--- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result
@@ -197,12 +197,12 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
SELECT * FROM db_datadict_2.res_6_408002_2;
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
-check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
- set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
- set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
connect testuser2, localhost, testuser2, , db_datadict;
SELECT * FROM information_schema.routines;
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -213,12 +213,12 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
SELECT * FROM db_datadict_2.res_6_408002_2;
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
-check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
- set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
- set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
connect testuser3, localhost, testuser3, , test;
SELECT * FROM information_schema.routines;
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -229,12 +229,12 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
SELECT * FROM db_datadict_2.res_6_408002_2;
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
-check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' AND variable_name != 'THREAD_POOL_SIZE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
- set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
- set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
connection default;
disconnect testuser1;
disconnect testuser2;
diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result
index 56dfe587378..09d5dcaa264 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -101,6 +101,8 @@ def mysql db mysql User
def mysql event mysql PRIMARY
def mysql event mysql PRIMARY
def mysql func mysql PRIMARY
+def mysql global_priv mysql PRIMARY
+def mysql global_priv mysql PRIMARY
def mysql gtid_slave_pos mysql PRIMARY
def mysql gtid_slave_pos mysql PRIMARY
def mysql help_category mysql name
@@ -111,8 +113,6 @@ def mysql help_relation mysql PRIMARY
def mysql help_relation mysql PRIMARY
def mysql help_topic mysql name
def mysql help_topic mysql PRIMARY
-def mysql host mysql PRIMARY
-def mysql host mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
@@ -150,8 +150,6 @@ def mysql time_zone_transition mysql PRIMARY
def mysql time_zone_transition mysql PRIMARY
def mysql time_zone_transition_type mysql PRIMARY
def mysql time_zone_transition_type mysql PRIMARY
-def mysql user mysql PRIMARY
-def mysql user mysql PRIMARY
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
@@ -240,8 +238,8 @@ def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
SHOW GRANTS FOR 'testuser2'@'localhost';
Grants for testuser2@localhost
GRANT USAGE ON *.* TO `testuser2`@`localhost`
@@ -259,8 +257,8 @@ def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
-GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
+GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
SHOW GRANTS FOR 'testuser2'@'localhost';
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql'
connection testuser2;
diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
index 31fb460f9aa..c01c456edf8 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
@@ -22,6 +22,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE
def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
@@ -32,8 +34,6 @@ def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BT
def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE
-def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE
@@ -82,8 +82,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL
def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE
def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE
def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.statistics
WHERE table_schema = 'mysql'
diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
index c81052321f8..b7bd3ec2e23 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
@@ -22,6 +22,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE
def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
@@ -32,8 +34,6 @@ def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BT
def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE
-def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE
@@ -82,8 +82,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL
def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE
def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE
def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.statistics
WHERE table_schema = 'mysql'
@@ -104,6 +102,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE
def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
@@ -114,8 +114,6 @@ def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BT
def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE
-def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE
@@ -164,8 +162,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL
def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE
def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE
def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result
index c1655c69534..5e1a9f44e7f 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result
@@ -63,6 +63,8 @@ def mysql PRIMARY mysql column_stats
def mysql PRIMARY mysql db
def mysql PRIMARY mysql event
def mysql PRIMARY mysql func
+def mysql PRIMARY mysql global_priv
+def mysql Priv mysql global_priv
def mysql PRIMARY mysql gtid_slave_pos
def mysql name mysql help_category
def mysql PRIMARY mysql help_category
@@ -71,7 +73,6 @@ def mysql PRIMARY mysql help_keyword
def mysql PRIMARY mysql help_relation
def mysql name mysql help_topic
def mysql PRIMARY mysql help_topic
-def mysql PRIMARY mysql host
def mysql PRIMARY mysql index_stats
def mysql PRIMARY mysql innodb_index_stats
def mysql PRIMARY mysql innodb_table_stats
@@ -90,7 +91,6 @@ def mysql PRIMARY mysql time_zone_transition
def mysql PRIMARY mysql time_zone_transition_type
def mysql commit_id mysql transaction_registry
def mysql PRIMARY mysql transaction_registry
-def mysql PRIMARY mysql user
#########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information
#########################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
index b56c5115f16..d5da807388b 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
@@ -12,6 +12,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY
def mysql PRIMARY mysql db PRIMARY KEY
def mysql PRIMARY mysql event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
def mysql name mysql help_category UNIQUE
def mysql PRIMARY mysql help_category PRIMARY KEY
@@ -20,7 +22,6 @@ def mysql PRIMARY mysql help_keyword PRIMARY KEY
def mysql PRIMARY mysql help_relation PRIMARY KEY
def mysql name mysql help_topic UNIQUE
def mysql PRIMARY mysql help_topic PRIMARY KEY
-def mysql PRIMARY mysql host PRIMARY KEY
def mysql PRIMARY mysql index_stats PRIMARY KEY
def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
@@ -39,7 +40,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
def mysql commit_id mysql transaction_registry UNIQUE
def mysql PRIMARY mysql transaction_registry PRIMARY KEY
-def mysql PRIMARY mysql user PRIMARY KEY
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'mysql'
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
index b40bc0ea0c7..0426877bc1c 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
@@ -12,6 +12,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY
def mysql PRIMARY mysql db PRIMARY KEY
def mysql PRIMARY mysql event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
def mysql name mysql help_category UNIQUE
def mysql PRIMARY mysql help_category PRIMARY KEY
@@ -20,7 +22,6 @@ def mysql PRIMARY mysql help_keyword PRIMARY KEY
def mysql PRIMARY mysql help_relation PRIMARY KEY
def mysql name mysql help_topic UNIQUE
def mysql PRIMARY mysql help_topic PRIMARY KEY
-def mysql PRIMARY mysql host PRIMARY KEY
def mysql PRIMARY mysql index_stats PRIMARY KEY
def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
@@ -39,7 +40,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
def mysql commit_id mysql transaction_registry UNIQUE
def mysql PRIMARY mysql transaction_registry PRIMARY KEY
-def mysql PRIMARY mysql user PRIMARY KEY
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'mysql'
@@ -50,6 +50,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY
def mysql PRIMARY mysql db PRIMARY KEY
def mysql PRIMARY mysql event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
def mysql name mysql help_category UNIQUE
def mysql PRIMARY mysql help_category PRIMARY KEY
@@ -58,7 +60,6 @@ def mysql PRIMARY mysql help_keyword PRIMARY KEY
def mysql PRIMARY mysql help_relation PRIMARY KEY
def mysql name mysql help_topic UNIQUE
def mysql PRIMARY mysql help_topic PRIMARY KEY
-def mysql PRIMARY mysql host PRIMARY KEY
def mysql PRIMARY mysql index_stats PRIMARY KEY
def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
@@ -77,7 +78,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
def mysql commit_id mysql transaction_registry UNIQUE
def mysql PRIMARY mysql transaction_registry PRIMARY KEY
-def mysql PRIMARY mysql user PRIMARY KEY
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result
index 9a8764b29d0..0d3e3268074 100644
--- a/mysql-test/suite/funcs_1/r/is_table_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result
@@ -55,6 +55,8 @@ IS_GRANTABLE varchar(3) NO NULL
SELECT table_catalog, table_schema, table_name, privilege_type
FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name privilege_type
+def mysql global_priv SELECT
+def mysql global_priv DELETE
######################################################################
# Testcase 3.2.11.2+3.2.11.3+3.2.11.4:
# INFORMATION_SCHEMA.TABLE_PRIVILEGES accessible information
@@ -227,8 +229,8 @@ ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localh
SHOW GRANTS FOR 'the_user'@'localhost';
Grants for the_user@localhost
GRANT USAGE ON *.* TO `the_user`@`localhost`
-GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost`
GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost`
SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges
WHERE table_name LIKE 't1_%'
ORDER BY table_schema,table_name;
@@ -247,8 +249,8 @@ test t1_view
SHOW GRANTS FOR 'the_user'@'localhost';
Grants for the_user@localhost
GRANT USAGE ON *.* TO `the_user`@`localhost`
-GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost`
GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost`
+GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost`
REVOKE ALL PRIVILEGES ON test.t1_table FROM 'the_user'@'localhost';
REVOKE ALL PRIVILEGES ON test.t1_view FROM 'the_user'@'localhost';
DROP VIEW test.t1_view;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result
index 338f445c2d4..597eb002841 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_is.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_is.result
@@ -514,6 +514,31 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@@ -1605,6 +1630,31 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
diff --git a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
index 338f445c2d4..597eb002841 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
@@ -514,6 +514,31 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@@ -1605,6 +1630,31 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
+TABLE_NAME OPTIMIZER_TRACE
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY Y
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
index ea565e14b7a..be432e2422a 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
@@ -16,7 +16,7 @@ TABLE_NAME columns_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -66,7 +66,7 @@ TABLE_NAME db
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -116,7 +116,7 @@ TABLE_NAME func
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -162,11 +162,11 @@ user_comment General log
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME gtid_slave_pos
+TABLE_NAME global_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -177,17 +177,17 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
+TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment Replication slave GTID position
+user_comment Users and global privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_category
+TABLE_NAME gtid_slave_pos
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -202,21 +202,21 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_general_ci
+TABLE_COLLATION latin1_swedish_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help categories
+user_comment Replication slave GTID position
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
+TABLE_NAME help_category
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -233,15 +233,15 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help keywords
+user_comment help categories
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_relation
+TABLE_NAME help_keyword
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -258,11 +258,11 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment keyword-topic relation
+user_comment help keywords
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_topic
+TABLE_NAME help_relation
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -283,15 +283,15 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help topics
+user_comment keyword-topic relation
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME host
+TABLE_NAME help_topic
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -302,13 +302,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment Host privileges; Merged with database privileges
+user_comment help topics
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
@@ -441,7 +441,7 @@ TABLE_NAME procs_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -466,7 +466,7 @@ TABLE_NAME proxies_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -491,7 +491,7 @@ TABLE_NAME roles_mapping
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -566,7 +566,7 @@ TABLE_NAME tables_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -616,7 +616,7 @@ TABLE_NAME time_zone
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -641,7 +641,7 @@ TABLE_NAME time_zone_leap_second
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -666,7 +666,7 @@ TABLE_NAME time_zone_name
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -691,7 +691,7 @@ TABLE_NAME time_zone_transition
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -716,7 +716,7 @@ TABLE_NAME time_zone_transition_type
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -763,10 +763,10 @@ Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME user
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -777,13 +777,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION NULL
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
-TEMPORARY N
-user_comment Users and global privileges
+TEMPORARY NULL
+user_comment VIEW
Separator -----------------------------------------------------
DROP USER testuser1@localhost;
CREATE USER testuser1@localhost;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
index 5d6c063fbd8..01381a5e746 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
@@ -16,7 +16,7 @@ TABLE_NAME columns_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -66,7 +66,7 @@ TABLE_NAME db
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -116,7 +116,7 @@ TABLE_NAME func
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -162,11 +162,11 @@ user_comment General log
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME gtid_slave_pos
+TABLE_NAME global_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -177,17 +177,17 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
+TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment Replication slave GTID position
+user_comment Users and global privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_category
+TABLE_NAME gtid_slave_pos
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -202,21 +202,21 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_general_ci
+TABLE_COLLATION latin1_swedish_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help categories
+user_comment Replication slave GTID position
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
+TABLE_NAME help_category
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -233,15 +233,15 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help keywords
+user_comment help categories
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_relation
+TABLE_NAME help_keyword
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -258,11 +258,11 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment keyword-topic relation
+user_comment help keywords
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_topic
+TABLE_NAME help_relation
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -283,15 +283,15 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help topics
+user_comment keyword-topic relation
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME host
+TABLE_NAME help_topic
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -302,13 +302,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment Host privileges; Merged with database privileges
+user_comment help topics
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
@@ -441,7 +441,7 @@ TABLE_NAME procs_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -466,7 +466,7 @@ TABLE_NAME proxies_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -491,7 +491,7 @@ TABLE_NAME roles_mapping
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -566,7 +566,7 @@ TABLE_NAME tables_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -616,7 +616,7 @@ TABLE_NAME time_zone
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -641,7 +641,7 @@ TABLE_NAME time_zone_leap_second
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -666,7 +666,7 @@ TABLE_NAME time_zone_name
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -691,7 +691,7 @@ TABLE_NAME time_zone_transition
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -716,7 +716,7 @@ TABLE_NAME time_zone_transition_type
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -763,10 +763,10 @@ Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME user
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -777,13 +777,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION NULL
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
-TEMPORARY N
-user_comment Users and global privileges
+TEMPORARY NULL
+user_comment VIEW
Separator -----------------------------------------------------
DROP USER testuser1@localhost;
CREATE USER testuser1@localhost;
@@ -805,7 +805,7 @@ TABLE_NAME columns_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -855,7 +855,7 @@ TABLE_NAME db
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -905,7 +905,7 @@ TABLE_NAME func
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -951,11 +951,11 @@ user_comment General log
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME gtid_slave_pos
+TABLE_NAME global_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -966,17 +966,17 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
+TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment Replication slave GTID position
+user_comment Users and global privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_category
+TABLE_NAME gtid_slave_pos
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -991,21 +991,21 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_general_ci
+TABLE_COLLATION latin1_swedish_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help categories
+user_comment Replication slave GTID position
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_keyword
+TABLE_NAME help_category
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1022,15 +1022,15 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help keywords
+user_comment help categories
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_relation
+TABLE_NAME help_keyword
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1047,11 +1047,11 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment keyword-topic relation
+user_comment help keywords
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME help_topic
+TABLE_NAME help_relation
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -1072,15 +1072,15 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment help topics
+user_comment keyword-topic relation
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME host
+TABLE_NAME help_topic
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1091,13 +1091,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY N
-user_comment Host privileges; Merged with database privileges
+user_comment help topics
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
@@ -1230,7 +1230,7 @@ TABLE_NAME procs_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1255,7 +1255,7 @@ TABLE_NAME proxies_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1280,7 +1280,7 @@ TABLE_NAME roles_mapping
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1355,7 +1355,7 @@ TABLE_NAME tables_priv
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1405,7 +1405,7 @@ TABLE_NAME time_zone
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1430,7 +1430,7 @@ TABLE_NAME time_zone_leap_second
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1455,7 +1455,7 @@ TABLE_NAME time_zone_name
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1480,7 +1480,7 @@ TABLE_NAME time_zone_transition
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1505,7 +1505,7 @@ TABLE_NAME time_zone_transition_type
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1552,10 +1552,10 @@ Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME user
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1566,13 +1566,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION NULL
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
-TEMPORARY N
-user_comment Users and global privileges
+TEMPORARY NULL
+user_comment VIEW
Separator -----------------------------------------------------
connection default;
disconnect testuser1;
diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result
index 2a7016baa3d..95ef390629f 100644
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result
@@ -54,7 +54,6 @@ grantee table_catalog privilege_type
# Testcases 3.2.16.2+3.2.16.3+3.2.16.4: INFORMATION_SCHEMA.USER_PRIVILEGES
# accessible information
##########################################################################
-DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
@@ -63,7 +62,7 @@ CREATE USER 'testuser2'@'localhost';
DROP USER 'testuser3'@'localhost';
CREATE USER 'testuser3'@'localhost';
GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
GRANT INSERT ON *.* TO 'testuser2'@'localhost';
GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
SELECT * FROM information_schema.user_privileges
@@ -85,149 +84,32 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
#
# Add GRANT OPTION db_datadict.* to testuser1;
GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
@@ -250,149 +132,32 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
connect testuser1, localhost, testuser1, , db_datadict;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -401,154 +166,37 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT SELECT, UPDATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost`
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
# Now add SELECT on *.* to testuser1;
connection default;
@@ -574,149 +222,32 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv Y
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
#
# Here <SELECT YES> is shown correctly for testuser1;
@@ -739,149 +270,32 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv Y
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv Y
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1025,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -890,154 +304,37 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE SELECT
IS_GRANTABLE YES
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv Y
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv Y
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1025,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT SELECT ON *.* TO `testuser1`@`localhost` WITH GRANT OPTION
GRANT SELECT, UPDATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost`
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
connect testuser2, localhost, testuser2, , db_datadict;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1050,9 +347,9 @@ GRANTEE 'testuser2'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE UPDATE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser2@localhost
GRANT INSERT, UPDATE ON *.* TO `testuser2`@`localhost`
@@ -1064,9 +361,9 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser3@localhost
GRANT USAGE ON *.* TO `testuser3`@`localhost`
@@ -1093,149 +390,32 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1244,9 +424,9 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
@@ -1259,19 +439,19 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_66'
-# Add ALL on db_datadict.* (and select on mysql.user) to testuser1;
+# Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1;
connection default;
GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_catalog, privilege_type;
@@ -1291,149 +471,32 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1442,154 +505,37 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost`
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_56'
USE db_datadict;
@@ -1600,154 +546,37 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost`
+GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
CREATE TABLE tb_57 ( c1 TEXT )
ENGINE = <other_engine_type>;
@@ -1773,149 +602,32 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "",
+ "password_last_changed": #
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1924,9 +636,9 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
diff --git a/mysql-test/suite/funcs_1/r/is_views.result b/mysql-test/suite/funcs_1/r/is_views.result
index 82c35913844..45cfd87f46c 100644
--- a/mysql-test/suite/funcs_1/r/is_views.result
+++ b/mysql-test/suite/funcs_1/r/is_views.result
@@ -70,6 +70,7 @@ ALGORITHM varchar(10) NO NULL
SELECT table_catalog, table_schema, table_name
FROM information_schema.views WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name
+def mysql user
################################################################################
# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information
################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_views_embedded.result b/mysql-test/suite/funcs_1/r/is_views_embedded.result
index 06c2dc05c67..044c80f473b 100644
--- a/mysql-test/suite/funcs_1/r/is_views_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_views_embedded.result
@@ -70,6 +70,7 @@ ALGORITHM varchar(10) NO NULL
SELECT table_catalog, table_schema, table_name
FROM information_schema.views WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name
+def mysql user
################################################################################
# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information
################################################################################
diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result
index 9cc133e96dc..744166bb849 100644
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result
@@ -2474,12 +2474,12 @@ my_time, id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL order by id;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073701165657 -838:59:59 2
+0 -838:59:59 2
8385959 838:59:59 3
130000 13:00:00 4
100000 10:00:00 5
Warnings:
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2488,12 +2488,12 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL) order by id;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073701165657 -838:59:59 2
+0 -838:59:59 2
8385959 838:59:59 3
130000 13:00:00 4
100000 10:00:00 5
Warnings:
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -2582,15 +2582,14 @@ my_double, id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL order by id;
CAST(my_double AS UNSIGNED INTEGER) my_double id
NULL NULL 1
-9223372036854775808 -1.7976931348623e308 2
-9223372036854775807 1.7976931348623e308 3
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
0 0 4
-18446744073709551615 -1 5
+0 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2599,15 +2598,14 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL) order by id;
CAST(my_double AS UNSIGNED INTEGER) my_double id
NULL NULL 1
-9223372036854775808 -1.7976931348623e308 2
-9223372036854775807 1.7976931348623e308 3
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
0 0 4
-18446744073709551615 -1 5
+0 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -2965,8 +2963,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2980,8 +2978,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -3755,14 +3753,14 @@ WHERE select_id = 51 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 23
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3772,14 +3770,14 @@ WHERE select_id = 51 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 23
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;
@@ -3790,15 +3788,15 @@ my_binary_30, id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1
-00:00:00 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 22
Warnings:
-Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SHOW CREATE VIEW v1;
@@ -3809,15 +3807,15 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1
-00:00:00
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$--
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
-00:00:01 -1
41:58:00 1 17:58
Warnings:
-Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;
@@ -3831,14 +3829,14 @@ WHERE select_id = 49 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 21
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3848,14 +3846,14 @@ WHERE select_id = 49 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 21
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;
@@ -3867,14 +3865,14 @@ WHERE select_id = 48 OR select_id IS NULL order by id;
CAST(my_char_30 AS TIME) my_char_30 id
NULL NULL 1
NULL 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 20
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3884,14 +3882,14 @@ WHERE select_id = 48 OR select_id IS NULL) order by id;
CAST(my_char_30 AS TIME) my_char_30 id
NULL NULL 1
NULL 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 20
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0407.result b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
index c21c206f118..48858e8787a 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
@@ -237,7 +237,7 @@ Testcase 3.5.5.2:
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
Create trigger trg2 before INSERT
on t1_temp for each row set new.f2=9999;
-ERROR HY000: Trigger's 't1_temp' is view or temporary table
+ERROR HY000: Trigger's 't1_temp' is view, temporary table or sequence
drop table t1_temp;
Testcase 3.5.5.3:
diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result
index 9cc133e96dc..744166bb849 100644
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result
@@ -2474,12 +2474,12 @@ my_time, id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL order by id;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073701165657 -838:59:59 2
+0 -838:59:59 2
8385959 838:59:59 3
130000 13:00:00 4
100000 10:00:00 5
Warnings:
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2488,12 +2488,12 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL) order by id;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073701165657 -838:59:59 2
+0 -838:59:59 2
8385959 838:59:59 3
130000 13:00:00 4
100000 10:00:00 5
Warnings:
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-838:59:59' to UNSIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -2582,15 +2582,14 @@ my_double, id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL order by id;
CAST(my_double AS UNSIGNED INTEGER) my_double id
NULL NULL 1
-9223372036854775808 -1.7976931348623e308 2
-9223372036854775807 1.7976931348623e308 3
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
0 0 4
-18446744073709551615 -1 5
+0 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2599,15 +2598,14 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL) order by id;
CAST(my_double AS UNSIGNED INTEGER) my_double id
NULL NULL 1
-9223372036854775808 -1.7976931348623e308 2
-9223372036854775807 1.7976931348623e308 3
+0 -1.7976931348623e308 2
+18446744073709551615 1.7976931348623e308 3
0 0 4
-18446744073709551615 -1 5
+0 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
-Note 1105 Cast to unsigned converted negative integer to it's positive complement
+Note 1916 Got overflow when converting '-1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to UNSIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -2965,8 +2963,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2980,8 +2978,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated
-Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated
+Note 1916 Got overflow when converting '-1.7976931348623e308' to SIGNED BIGINT. Value truncated
+Note 1916 Got overflow when converting '1.7976931348623e308' to SIGNED BIGINT. Value truncated
DROP VIEW v1;
@@ -3755,14 +3753,14 @@ WHERE select_id = 51 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 23
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3772,14 +3770,14 @@ WHERE select_id = 51 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 23
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;
@@ -3790,15 +3788,15 @@ my_binary_30, id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1
-00:00:00 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL 2
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 22
Warnings:
-Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SHOW CREATE VIEW v1;
@@ -3809,15 +3807,15 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1
-00:00:00
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$--
+NULL
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$--
-00:00:01 -1
41:58:00 1 17:58
Warnings:
-Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;
@@ -3831,14 +3829,14 @@ WHERE select_id = 49 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 21
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3848,14 +3846,14 @@ WHERE select_id = 49 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS TIME) my_varchar_1000 id
NULL NULL 1
NULL 2
-00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 21
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;
@@ -3867,14 +3865,14 @@ WHERE select_id = 48 OR select_id IS NULL order by id;
CAST(my_char_30 AS TIME) my_char_30 id
NULL NULL 1
NULL 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 20
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3884,14 +3882,14 @@ WHERE select_id = 48 OR select_id IS NULL) order by id;
CAST(my_char_30 AS TIME) my_char_30 id
NULL NULL 1
NULL 2
-00:00:00 <--------30 characters-------> 3
--00:00:00 ---äÖüß@µ*$-- 4
+NULL <--------30 characters-------> 3
+NULL ---äÖüß@µ*$-- 4
-00:00:01 -1 5
41:58:00 1 17:58 20
Warnings:
-Warning 1292 Truncated incorrect time value: ''
-Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
-Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
+Warning 1292 Incorrect time value: ''
+Warning 1292 Incorrect time value: '<--------30 characters------->'
+Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--'
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
index c21c206f118..48858e8787a 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
@@ -237,7 +237,7 @@ Testcase 3.5.5.2:
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
Create trigger trg2 before INSERT
on t1_temp for each row set new.f2=9999;
-ERROR HY000: Trigger's 't1_temp' is view or temporary table
+ERROR HY000: Trigger's 't1_temp' is view, temporary table or sequence
drop table t1_temp;
Testcase 3.5.5.3:
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index 61d5eb8c492..c68e2221801 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -15690,6 +15690,7 @@ Testcase 4.3.7:
DROP PROCEDURE IF EXISTS sp7;
CREATE PROCEDURE sp7()
BEGIN
+DECLARE count INT DEFAULT 100;
label1: loop
set @dummystring = 'temp value';
if count > 10 then leave label1;
@@ -15699,7 +15700,7 @@ END label1 loop;
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 'iterate;
END label1 loop;
-END' at line 7
+END' at line 8
DROP PROCEDURE IF EXISTS sp7;
CREATE PROCEDURE sp7()
BEGIN
diff --git a/mysql-test/suite/funcs_1/t/is_user_privileges.test b/mysql-test/suite/funcs_1/t/is_user_privileges.test
index a61e9187d15..4293c4e16fb 100644
--- a/mysql-test/suite/funcs_1/t/is_user_privileges.test
+++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test
@@ -77,9 +77,6 @@ WHERE table_catalog IS NULL OR table_catalog <> 'def';
# 3.2.16.4: Ensure that the table does not show any information on any
# privileges that are not user privileges for the current user.
#
---disable_warnings
-DROP DATABASE IF EXISTS db_datadict;
---enable_warnings
CREATE DATABASE db_datadict;
--error 0,ER_CANNOT_USER
@@ -93,7 +90,7 @@ DROP USER 'testuser3'@'localhost';
CREATE USER 'testuser3'@'localhost';
GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
GRANT INSERT ON *.* TO 'testuser2'@'localhost';
GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
@@ -101,11 +98,12 @@ GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
let $my_select1= SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_catalog, privilege_type;
-let $my_select2= SELECT * FROM mysql.user
+let $my_select2= SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
let $my_show= SHOW GRANTS;
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
@@ -114,6 +112,7 @@ eval $my_select2;
GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
@@ -121,6 +120,7 @@ eval $my_select2;
connect (testuser1, localhost, testuser1, , db_datadict);
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -134,6 +134,7 @@ GRANT SELECT ON *.* TO 'testuser1'@'localhost';
--echo # Here <SELECT NO> is shown correctly for testuser1;
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
@@ -142,6 +143,7 @@ GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
--echo # Here <SELECT YES> is shown correctly for testuser1;
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
@@ -149,6 +151,7 @@ eval $my_select2;
connection testuser1;
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -177,6 +180,7 @@ connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
@@ -203,18 +207,20 @@ eval $my_show;
CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
--echo
---echo # Add ALL on db_datadict.* (and select on mysql.user) to testuser1;
+--echo # Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1;
connection default;
GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
connection testuser1;
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -227,6 +233,7 @@ CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
USE db_datadict;
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
eval $my_show;
@@ -241,6 +248,7 @@ connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost';
--vertical_results
eval $my_select1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
eval $my_select2;
--horizontal_results
diff --git a/mysql-test/suite/funcs_1/t/row_count_func.test b/mysql-test/suite/funcs_1/t/row_count_func.test
index 1694928b26c..3a76a6cac7c 100644
--- a/mysql-test/suite/funcs_1/t/row_count_func.test
+++ b/mysql-test/suite/funcs_1/t/row_count_func.test
@@ -14,6 +14,7 @@ INSERT INTO t1 VALUES (1), (2), (3);
--echo
--echo # -- Check 1.
+--disable_warnings
--enable_info
--echo SELECT * FROM t1 INTO OUTFILE "MYSQL_TMP_DIR/bug21818.txt";
--disable_query_log # to avoid $MYSQL_TMP_DIR in query log
@@ -34,6 +35,7 @@ SELECT a FROM t1 LIMIT 1 INTO @a;
--echo
SELECT ROW_COUNT();
+--enable_warnings
--echo
--echo # -- Check 3.
diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test
index f5852ea016f..7ca9ba6f3d1 100644
--- a/mysql-test/suite/funcs_1/t/storedproc.test
+++ b/mysql-test/suite/funcs_1/t/storedproc.test
@@ -18863,6 +18863,7 @@ delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp7()
BEGIN
+ DECLARE count INT DEFAULT 100;
label1: loop
set @dummystring = 'temp value';
if count > 10 then leave label1;
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 84babda2fa0..6727aa3d945 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -10,21 +10,23 @@
#
##############################################################################
-MW-328A : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
-MW-328B : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
+GCF-939 : MDEV-21520 galera.GCF-939
MW-329 : MDEV-19962 Galera test failure on MW-329
+galera_as_slave_ctas : MDEV-28378 timeout
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
-galera_concurrent_ctas : MDEV-24842 Galera test failure on galera_concurrent_ctas
+galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
+galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed
+galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
-galera_mdl_race : MDEV-21524: galera.galera_mdl_race MTR failed: query 'reap' succeeded - should have failed with errno 1213
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
-galera_partition : MDEV-21806: galera.galera_partition MTR failed: failed to recover from DONOR state
+galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
+galera_var_ignore_apply_errors : MDEV-26770 galera_var_ignore_apply_errors fails Server did not transition to READY state
galera_var_node_address : MDEV-20485 Galera test failure
-#galera_wan : MDEV-17259 Test failure on galera.galera_wan
+galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
+galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
partition : MDEV-19958 Galera test failure on galera.partition
query_cache: MDEV-15805 Test failure on galera.query_cache
-#sql_log_bin : MDEV-21491 galera.sql_log_bin
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
-galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons
-pxc-421: wsrep_provider is read-only for security reasons
+galera_bf_abort_at_after_statement : Unstable
+
diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf
index 2688954cc03..3532c1f2134 100644
--- a/mysql-test/suite/galera/galera_2nodes.cnf
+++ b/mysql-test/suite/galera/galera_2nodes.cnf
@@ -8,39 +8,31 @@ innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
# enforce read-committed characteristics across the cluster
+# wsrep-causal-reads=ON
wsrep-sync-wait=15
-wsrep-on=1
[mysqld.1]
-loose-innodb
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-wsrep-cluster-address=gcomm://
+wsrep_cluster_address=gcomm://
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
-# enforce read-committed characteristics across the cluster
-wsrep_causal_reads=ON
-wsrep_sync_wait = 15
-
[mysqld.2]
-loose-innodb
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
-# enforce read-committed characteristics across the cluster
-wsrep_causal_reads=ON
-wsrep_sync_wait = 15
-
[ENV]
NODE_MYPORT_1= @mysqld.1.port
NODE_MYSOCK_1= @mysqld.1.socket
diff --git a/mysql-test/suite/galera/galera_2nodes_as_master.cnf b/mysql-test/suite/galera/galera_2nodes_as_master.cnf
index 08e4f97b7b8..ba53d6062c1 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_master.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_master.cnf
@@ -7,50 +7,44 @@
!include include/default_mysqld.cnf
[mysqld]
+loose-innodb
log-bin=mysqld-bin
+log-slave-updates
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
+# enforce read-committed characteristics across the cluster
+# wsrep-causal-reads=ON
+wsrep-sync-wait=15
[mysqld.1]
+wsrep-on=1
+server-id=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-
-server-id=1
-log_slave_updates
-
-wsrep-on=1
-wsrep-provider=@ENV.WSREP_PROVIDER
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
+wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address=gcomm://
-wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
-# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
-wsrep-sync-wait=15
+wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
[mysqld.2]
+wsrep-on=1
+server-id=2
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-
-server-id=2
-log_slave_updates
-
-wsrep-on=1
wsrep_provider=@ENV.WSREP_PROVIDER
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
-# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
-wsrep-sync-wait=15
+wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
[mysqld.3]
+wsrep-on=OFF
server-id=3
[ENV]
diff --git a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
index 315ea1f9b98..f25c7cc6d48 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
@@ -6,58 +6,44 @@
!include include/default_mysqld.cnf
[mysqld]
+loose-innodb
+log-bin=mysqld-bin
+log-slave-updates
binlog-format=row
+innodb-autoinc-lock-mode=2
+default-storage-engine=innodb
+# enforce read-committed characteristics across the cluster
+# wsrep-causal-reads=ON
+wsrep-sync-wait=15
[mysqld.1]
-log-bin
+wsrep-on=1
server-id=1
-
-[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address=gcomm://
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
+wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
+[mysqld.2]
wsrep-on=1
-
-log-bin
-log-slave-updates
-
-innodb-autoinc-lock-mode=2
-default-storage-engine=innodb
-wsrep-provider=@ENV.WSREP_PROVIDER
-wsrep-cluster-address=gcomm://
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
-wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
-
-# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
-wsrep-sync-wait=15
server-id=2
-
-[mysqld.3]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
+wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
-wsrep-on=1
-
-log-bin
-log-slave-updates
-
-innodb-autoinc-lock-mode=2
-default-storage-engine=innodb
-wsrep-provider=@ENV.WSREP_PROVIDER
-wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
-wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
-
-# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
-wsrep-sync-wait=15
+[mysqld.3]
+wsrep-on=OFF
server-id=3
[ENV]
diff --git a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
index 4435255c792..0ecf877b5a3 100644
--- a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
+++ b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
@@ -6,76 +6,57 @@
!include include/default_mysqld.cnf
[mysqld]
-log-bin
+loose-innodb
+log-bin=mysqld-bin
+log-slave-updates
binlog-format=row
+innodb-autoinc-lock-mode=2
+default-storage-engine=innodb
+# enforce read-committed characteristics across the cluster
+# wsrep-causal-reads=ON
+wsrep-sync-wait=15
[mysqld.1]
+wsrep-on=1
server-id=1
-
-[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address=gcomm://
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
+wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
-log-slave-updates
+[mysqld.2]
wsrep-on=1
-
-innodb-autoinc-lock-mode=2
-default-storage-engine=innodb
-wsrep-provider=@ENV.WSREP_PROVIDER
-wsrep-cluster-address=gcomm://
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
+server-id=2
+#galera_port=@OPT.port
+#ist_port=@OPT.port
+#sst_port=@OPT.port
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
-# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
-wsrep-sync-wait=15
-server-id=2
-
[mysqld.3]
+wsrep-on=1
+server-id=3
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-
-log-slave-updates
-wsrep-on=1
-
-innodb-autoinc-lock-mode=2
-default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
-wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
-# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
-wsrep-sync-wait=15
-server-id=3
-
[mysqld.4]
-#galera_port=@OPT.port
-#ist_port=@OPT.port
-#sst_port=@OPT.port
-
-log-slave-updates
-wsrep-on=1
-
-innodb-autoinc-lock-mode=2
-default-storage-engine=innodb
-wsrep-provider=@ENV.WSREP_PROVIDER
-wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
-wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
-wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
-
-# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
-wsrep-sync-wait=15
+wsrep-on=OFF
server-id=4
[ENV]
diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf
index 6b8b335db39..66238a8e4c2 100644
--- a/mysql-test/suite/galera/galera_4nodes.cnf
+++ b/mysql-test/suite/galera/galera_4nodes.cnf
@@ -2,51 +2,55 @@
!include include/default_mysqld.cnf
[mysqld]
+loose-innodb
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
-wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
+# wsrep-causal-reads=ON
wsrep-sync-wait=15
[mysqld.1]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-wsrep-cluster-address=gcomm://
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
+wsrep_cluster_address=gcomm://
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
[mysqld.2]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
[mysqld.3]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
[mysqld.4]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
diff --git a/mysql-test/suite/galera/include/galera_concurrent_test.inc b/mysql-test/suite/galera/include/galera_concurrent_test.inc
new file mode 100644
index 00000000000..3d1bc7674a1
--- /dev/null
+++ b/mysql-test/suite/galera/include/galera_concurrent_test.inc
@@ -0,0 +1,90 @@
+#
+# Perform a quick concurrent test on two nodes using a set of predefined statements.
+#
+# Such tests are not deterministic, so we are hoping to catch assertions, slave apply errors
+# and cases where the two nodes diverge
+#
+# Parameters:
+# - $wsrep_trx_fragment_size
+# - $count
+# - $query_node_1
+# - $query_node_1a (optional)
+# - $query_node_2
+#
+
+if (!$count) {
+ --let $count = 50;
+}
+
+if (!$node_1a_connected) {
+ --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ --let $node_1a_connected = 1
+}
+
+--echo Running a concurrent test with the following queries:
+--echo $query_node_1
+--echo $query_node_1a
+--echo $query_node_2
+
+--connection node_1
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+
+SET SESSION wsrep_sync_wait = 0;
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
+
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
+
+--disable_query_log
+--let $i = `SELECT $count`
+while ($i)
+{
+ --connection node_1
+ --send_eval $query_node_1
+
+ --connection node_1a
+ if ($query_node_1a) {
+ --send_eval $query_node_1a
+ }
+
+ --connection node_2
+ --send_eval $query_node_2
+
+ --connection node_1
+ --error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ --reap
+
+ --connection node_1a
+ if ($query_node_1a) {
+ --error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ --reap
+ }
+
+ --connection node_2
+ --error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ --reap
+ --dec $i
+}
+
+SET SESSION wsrep_sync_wait = 15;
+--enable_query_log
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+DROP TABLE t1;
+
+--let $query_node_1 = ""
+--let $query_node_1a = ""
+--let $query_node_2 = ""
+
+--echo Concurrent test end
diff --git a/mysql-test/suite/galera/include/galera_dump_sr_table.inc b/mysql-test/suite/galera/include/galera_dump_sr_table.inc
new file mode 100644
index 00000000000..1e6ff5548d2
--- /dev/null
+++ b/mysql-test/suite/galera/include/galera_dump_sr_table.inc
@@ -0,0 +1,28 @@
+#
+# Dump the contents of the SR table using mysqldump
+#
+
+--let $sr_min = `SELECT MIN(seqno) FROM mysql.wsrep_streaming_log`
+--let $sr_max = `SELECT MAX(seqno) FROM mysql.wsrep_streaming_log`
+
+--let $seqno = $sr_min
+while ($seqno <= $sr_max)
+{
+ --let $sr_fragment_file = $MYSQLTEST_VARDIR/tmp/sr_fragment.log
+ --exec rm -rf $sr_fragment_file
+ --disable_query_log
+ --eval SELECT frag INTO DUMPFILE '$sr_fragment_file' FROM mysql.wsrep_streaming_log WHERE seqno = $seqno
+ --enable_query_log
+
+ --let $sr_binlog_file = $MYSQLTEST_VARDIR/tmp/sr_binlog.log
+ --exec rm -rf $sr_binlog_file
+
+ --exec cp std_data/binlog-header.binlog $sr_binlog_file
+ --exec cat $sr_fragment_file >> $sr_binlog_file
+
+ --replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /#[0-9]+ +[0-9]+:[0-9]+:[0-9]+/<ISO TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/ /thread_id=[0-9]+/thread_id=<QUERY_THREAD_ID>/ /table id [0-9]+/table id <TABLE_ID>/ /mapped to number [0-9]+/mapped to number <TABLE_ID>/ /auto_increment_increment=[0-9]+/auto_increment_increment=<AUTO_INCREMENT_INCREMENT>/ /auto_increment_offset=[0-9]+/auto_increment_offset=<AUTO_INCREMENT_OFFSET>/ /exec_time=[0-9]+/exec_time=<EXEC_TIME>/
+ --exec $MYSQL_BINLOG $sr_binlog_file --base64-output=decode-rows --start-position=256 --skip-annotate-row-events | grep -v 'SET @' 2>&1
+
+ --inc $seqno
+}
+
diff --git a/mysql-test/suite/galera/include/galera_have_debug_sync.inc b/mysql-test/suite/galera/include/galera_have_debug_sync.inc
deleted file mode 100644
index 21e7b3c88c3..00000000000
--- a/mysql-test/suite/galera/include/galera_have_debug_sync.inc
+++ /dev/null
@@ -1,9 +0,0 @@
---disable_query_log
-
---let $galera_have_debug_sync = `SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters'`
-
---if (!$galera_have_debug_sync) {
- --skip Test requires Galera debug library with debug_sync functionality
-}
-
---enable_query_log
diff --git a/mysql-test/suite/galera/include/galera_sst_restore.inc b/mysql-test/suite/galera/include/galera_sst_restore.inc
index 7c9a08090ad..83d07f086d1 100644
--- a/mysql-test/suite/galera/include/galera_sst_restore.inc
+++ b/mysql-test/suite/galera/include/galera_sst_restore.inc
@@ -20,7 +20,7 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
-
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
--disable_query_log
--eval SET GLOBAL wsrep_sst_method = '$wsrep_sst_method_orig';
--eval SET GLOBAL wsrep_sst_receive_address = '$wsrep_sst_receive_address_orig';
diff --git a/mysql-test/suite/galera/include/galera_st_clean_slave.inc b/mysql-test/suite/galera/include/galera_st_clean_slave.inc
index 44cbf67fd12..de1842e7ccf 100644
--- a/mysql-test/suite/galera/include/galera_st_clean_slave.inc
+++ b/mysql-test/suite/galera/include/galera_st_clean_slave.inc
@@ -2,24 +2,26 @@
--echo This is accomplished by shutting down node #2 and removing its var directory before restarting it
--connection node_1
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
+--source include/wait_condition.inc
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
--echo Shutting down server ...
@@ -38,28 +40,28 @@ COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
--connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
--connection node_2
--echo Starting server ...
@@ -70,52 +72,56 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
--connection node_1
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
--connection node_1a_galera_st_clean_slave
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * from t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COMMIT;
-SET AUTOCOMMIT=ON;
--connection node_1
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * from t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc b/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
index 830a170d50b..ecbd4bad188 100644
--- a/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
+++ b/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
@@ -1,24 +1,24 @@
--echo Performing State Transfer on a server that has been temporarily disconnected
--connection node_1
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
--connection node_2
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
--source suite/galera/include/galera_stop_replication.inc
@@ -29,83 +29,94 @@ COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
--connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
--connection node_2
--source suite/galera/include/galera_start_replication.inc
+#
+# client connections were killed by provider load, so have to re-open here
+#
+--disconnect node_2
+--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2
+--enable_reconnect
+
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
--connection node_1
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
--connection node_1a_galera_st_disconnect_slave
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COMMIT;
SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * FROM t1;
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
--connection node_1
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * FROM t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/include/galera_st_kill_slave.inc b/mysql-test/suite/galera/include/galera_st_kill_slave.inc
index a4d9e91e8be..c69dc1d7542 100644
--- a/mysql-test/suite/galera/include/galera_st_kill_slave.inc
+++ b/mysql-test/suite/galera/include/galera_st_kill_slave.inc
@@ -1,24 +1,26 @@
--echo Performing State Transfer on a server that has been killed and restarted
--connection node_1
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
+--source include/wait_condition.inc
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
--source include/kill_galera.inc
@@ -29,28 +31,28 @@ COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
--connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
--connection node_2
--let $galera_wsrep_recover_server_id=2
@@ -64,52 +66,56 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
--connection node_1
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
--connection node_1a_galera_st_kill_slave
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * FROM t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COMMIT;
-SET AUTOCOMMIT=ON;
--connection node_1
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * FROM t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc b/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc
index bb8c68bd181..22aa4f12f35 100644
--- a/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc
+++ b/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc
@@ -4,22 +4,24 @@ if ($have_debug) {
--echo while a DDL was in progress on it
--connection node_1
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
+--source include/wait_condition.inc
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
# Suspend the applier as it applies the ALTER TABLE
@@ -42,28 +44,28 @@ SET wsrep_sync_wait = 0;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
+INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
--connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
--connection node_2
--let $galera_wsrep_recover_server_id=2
@@ -76,58 +78,66 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
+INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
COMMIT;
--connection node_1
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
+INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
COMMIT;
--connection node_1a_galera_st_kill_slave_ddl
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * FROM t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COMMIT;
-SET AUTOCOMMIT=ON;
--connection node_1
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-SELECT COUNT(*) = 35 FROM t1;
+
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+SELECT * FROM t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
SET GLOBAL debug_dbug = $debug_orig;
}
diff --git a/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc b/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc
index eeb6a15e0a3..7492e9f3579 100644
--- a/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc
+++ b/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc
@@ -1,14 +1,14 @@
--echo Performing State Transfer on a server that has been shut down cleanly and restarted
--connection node_1
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
--connection node_2
@@ -17,11 +17,11 @@ COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
--echo Shutting down server ...
@@ -33,28 +33,28 @@ COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
--connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
--connection node_2
--echo Starting server ...
@@ -65,52 +65,57 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
--connection node_1
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
--connection node_1a_galera_st_shutdown_slave
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+SELECT * from t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COMMIT;
-SET AUTOCOMMIT=ON;
--connection node_1
--let $wait_condition = SELECT COUNT(*)=35 FROM t1
--source include/wait_condition.inc
-SELECT COUNT(*) = 35 FROM t1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+SELECT * from t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
+
diff --git a/mysql-test/suite/galera/include/galera_start_replication.inc b/mysql-test/suite/galera/include/galera_start_replication.inc
index e6ce6411193..b9b201106d7 100644
--- a/mysql-test/suite/galera/include/galera_start_replication.inc
+++ b/mysql-test/suite/galera/include/galera_start_replication.inc
@@ -1,7 +1,74 @@
--echo Loading wsrep provider ...
--disable_query_log
+#
+# count occurences of successful node starts in error log
+#
+perl;
+ use strict;
+ my $test_log=$ENV{'LOG_FILE'} or die "LOG_FILE not set";
+ my $test_log_copy=$test_log . '.copy';
+ if (-e $test_log_copy) {
+ unlink $test_log_copy;
+ }
+
+EOF
+--copy_file $LOG_FILE $LOG_FILE.copy
+
+#
+# now join to the cluster
+#
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
+
+--enable_query_log
+
+#
+# Cluster address change above, will launch SST/IST
+# if mysqldump ST has been configured, mysqld will close all
+# client connections, and it will be hard for us to poll for
+# cluster status during SST process, therefore wait_until_connected_again.inc
+# and wait_until_ready.inc may fail in this phase
+# To workaround this, we do first lazy polling here just to see when
+# client connections will be possible, and after that check for node readyness
+#
+--disable_result_log
+--disable_query_log
+
+--error 0,1
+perl;
+ use strict;
+ my $logfile = $ENV{'LOG_FILE'} or die ("no error log file set");
+
+ my $counter = 1000;
+ #my $found = false
+
+ while ($counter > 0) {
+
+ open(FILE, "$logfile") or die("Unable to open $logfile : $!\n");
+ my $new_sync_count = () = grep(/Synchronized with group/g,<FILE>);
+ close(FILE);
+
+ open(FILEN, "$logfile.copy") or die("Unable to open $logfile.copy : $!\n");
+ my $old_sync_count = () = grep(/Synchronized with group/g,<FILEN>);
+ close(FILEN);
+
+ if ($new_sync_count > $old_sync_count ) {
+ exit(0);
+ }
+ $counter--;
+ sleep(5);
+ }
+ exit(1);
+EOF
+if ($errno)
+{
+--echo "SST failed $errno"
+}
+
+--remove_file $LOG_FILE.copy
+
--enable_query_log
+--enable_result_log
+#--eval SET GLOBAL log_error = $log_error_;
--source include/galera_wait_ready.inc
diff --git a/mysql-test/suite/galera/include/galera_stop_replication.inc b/mysql-test/suite/galera/include/galera_stop_replication.inc
index 83438a947f0..ed7e9bc41f0 100644
--- a/mysql-test/suite/galera/include/galera_stop_replication.inc
+++ b/mysql-test/suite/galera/include/galera_stop_replication.inc
@@ -2,5 +2,13 @@
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+--let $wsrep_error_log_orig = `SELECT @@log_error`
+if(!$wsrep_log_error_orig)
+{
+ # MySQL Server on windows is started with --console and thus
+ # does not know the location of its .err log, use default location
+ let $wsrep_log_error_orig = $MYSQLTEST_VARDIR/log/mysqld.2.err;
+}
+--let LOG_FILE= $wsrep_log_error_orig
SET GLOBAL wsrep_cluster_address = '';
diff --git a/mysql-test/suite/galera/r/GAL-382.result b/mysql-test/suite/galera/r/GAL-382.result
index c16c46d2e58..2150326757c 100644
--- a/mysql-test/suite/galera/r/GAL-382.result
+++ b/mysql-test/suite/galera/r/GAL-382.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb;
Warnings:
diff --git a/mysql-test/suite/galera/r/GAL-401.result b/mysql-test/suite/galera/r/GAL-401.result
index 3b55b7589b7..3dfc32ffb8c 100644
--- a/mysql-test/suite/galera/r/GAL-401.result
+++ b/mysql-test/suite/galera/r/GAL-401.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
connection node_2;
SET @@global.wsrep_desync = 1;
diff --git a/mysql-test/suite/galera/r/GAL-419.result b/mysql-test/suite/galera/r/GAL-419.result
index 3a776e6988e..74508a1e75e 100644
--- a/mysql-test/suite/galera/r/GAL-419.result
+++ b/mysql-test/suite/galera/r/GAL-419.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*");
call mtr.add_suppression("Aborting");
connection node_2;
diff --git a/mysql-test/suite/galera/r/GAL-480.result b/mysql-test/suite/galera/r/GAL-480.result
index 143f48a69e3..8a4f8edcdd6 100644
--- a/mysql-test/suite/galera/r/GAL-480.result
+++ b/mysql-test/suite/galera/r/GAL-480.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB;
FLUSH TABLE t1 FOR EXPORT;
diff --git a/mysql-test/suite/galera/r/GCF-939.result b/mysql-test/suite/galera/r/GCF-939.result
new file mode 100644
index 00000000000..24d4eab67e5
--- /dev/null
+++ b/mysql-test/suite/galera/r/GCF-939.result
@@ -0,0 +1,13 @@
+connection node_2;
+connection node_1;
+connection node_1;
+DROP TABLE t1;
+ERROR 42S02: Unknown table 'test.t1'
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+GRA_.log
+GRA_.log
+DROP TABLE t1;
+CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query");
+connection node_2;
+CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query");
diff --git a/mysql-test/suite/galera/r/MDEV-15443.result b/mysql-test/suite/galera/r/MDEV-15443.result
index 618e5459878..21332b372e8 100644
--- a/mysql-test/suite/galera/r/MDEV-15443.result
+++ b/mysql-test/suite/galera/r/MDEV-15443.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/MDEV-16509.result b/mysql-test/suite/galera/r/MDEV-16509.result
new file mode 100644
index 00000000000..b56622da2c0
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-16509.result
@@ -0,0 +1,76 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC = "wsrep_before_commit_order_leave SIGNAL bcol_reached WAIT_FOR bcol_continue";
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached WAIT_FOR acol_continue";
+SET DEBUG_SYNC = "after_group_after_commit SIGNAL after_group_reached WAIT_FOR after_group_continue";
+INSERT INTO t1 VALUES (1);
+connection ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR bcol_reached";
+wsrep_last_seen_gtid_match
+1
+SELECT * FROM t1;
+f1
+1
+SET DEBUG_SYNC = "now SIGNAL bcol_continue";
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached";
+wsrep_last_seen_gtid_match
+1
+SELECT * FROM t1;
+f1
+1
+SET DEBUG_SYNC = "now SIGNAL acol_continue";
+SET DEBUG_SYNC = "now WAIT_FOR after_group_reached";
+wsrep_last_seen_gtid_do_not_match
+1
+SET DEBUG_SYNC = "now SIGNAL after_group_continue";
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+connection ctrl;
+connection node_1;
+SET DEBUG_SYNC = "wsrep_before_commit_order_leave SIGNAL bcol_reached_1 WAIT_FOR bcol_continue_1";
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached_1 WAIT_FOR acol_continue_1";
+SET DEBUG_SYNC = "after_group_after_commit SIGNAL agac_reached_1 WAIT_FOR agac_continue_1";
+INSERT INTO t1 VALUES (2);;
+connection ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR bcol_reached_1";
+wsrep_last_seen_gtid_match
+1
+connection node_1a;
+SET DEBUG_SYNC = "wsrep_before_commit_order_leave SIGNAL bcol_reached_2 WAIT_FOR bcol_continue_2";
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached_2 WAIT_FOR acol_continue_2";
+SET DEBUG_SYNC = "after_group_after_commit SIGNAL agac_reached_2 WAIT_FOR agac_continue_2";
+INSERT INTO t1 VALUES (3);;
+connection ctrl;
+SET DEBUG_SYNC = "now SIGNAL bcol_continue_1";
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached_1";
+SET DEBUG_SYNC = "now WAIT_FOR bcol_reached_2";
+wsrep_last_seen_gtid_match
+1
+SET DEBUG_SYNC = "now SIGNAL bcol_continue_2";
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached_2";
+wsrep_last_seen_gtid_match
+1
+SET DEBUG_SYNC = "now SIGNAL acol_continue_1";
+SET DEBUG_SYNC = "now WAIT_FOR agac_reached_1";
+wsrep_last_seen_gtid_no_match
+1
+SET DEBUG_SYNC = "now SIGNAL acol_continue_2";
+SET DEBUG_SYNC = "now WAIT_FOR agac_reached_2";
+wsrep_last_seen_gtid_no_match
+1
+SET DEBUG_SYNC = "now SIGNAL agac_continue_1";
+connection node_1;
+connection ctrl;
+SET DEBUG_SYNC = "now SIGNAL agac_continue_2";
+connection node_1a;
+connection ctrl;
+SET DEBUG_SYNC = "RESET";
+DROP TABLE t1;
+disconnect ctrl;
+disconnect node_1a;
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera/r/MDEV-18832.result b/mysql-test/suite/galera/r/MDEV-18832.result
new file mode 100644
index 00000000000..2e0872b9f2e
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-18832.result
@@ -0,0 +1,17 @@
+connection node_2;
+connection node_1;
+CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1;
+CREATE TABLE t1 (Id int(11) NOT NULL, PRIMARY KEY (Id));
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+DROP SEQUENCE Seq1_1;
+CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1;
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+DROP SEQUENCE Seq1_1;
+DROP TABLE t1;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+connection node_2;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
diff --git a/mysql-test/suite/galera/r/MDEV-20225.result b/mysql-test/suite/galera/r/MDEV-20225.result
index d769a3e021b..245051309d1 100644
--- a/mysql-test/suite/galera/r/MDEV-20225.result
+++ b/mysql-test/suite/galera/r/MDEV-20225.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, f2 INT) ENGINE=InnoDB;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, NEW.f1);
@@ -9,11 +11,12 @@ DROP TRIGGER tr1;
connection node_2;
connection node_1;
INSERT INTO t1 VALUES (NULL);
-connection node_2;
+connection node_2a;
SET GLOBAL debug_dbug = 'RESET';
SET DEBUG_SYNC = 'now SIGNAL signal.mdev_20225_continue';
SET DEBUG_SYNC = 'RESET';
SET GLOBAL wsrep_slave_threads = 1;
+connection node_2;
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-20616.result b/mysql-test/suite/galera/r/MDEV-20616.result
new file mode 100644
index 00000000000..488d8985d35
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-20616.result
@@ -0,0 +1,114 @@
+connection node_2;
+connection node_1;
+
+Test phase 1 to make sure that natral deadlock in trigger SP execution is
+handled correctly
+
+CREATE TABLE t1(a INT);
+CREATE TABLE t2(f1 INT, f2 INT, f3 INT);
+CREATE PROCEDURE proc()
+BEGIN
+INSERT INTO t2 VALUES(100, 200, 300);
+UPDATE t2 SET f3 = f3 + 100;
+END|
+CREATE TRIGGER t1 BEFORE INSERT ON t1 FOR EACH ROW CALL proc();
+INSERT INTO t1 VALUES(2);;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+INSERT INTO t1 VALUES(1);;
+connection node_1;
+connection node_1a;
+connection node_1;
+wsrep__bf_aborts
+0
+DROP TABLE t1;
+DROP TABLE t2;
+DROP PROCEDURE proc;
+
+Test phase 2 to make sure that BF abort for SP execution is
+handled correctly
+
+connection node_1;
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+connection node_1a;
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_sync_wait = 0;
+CREATE PROCEDURE proc_update()
+BEGIN
+UPDATE t1 SET f2 = 'b';
+END|
+INSERT INTO t1 VALUES(1, 'a');
+connection node_1;
+SET debug_sync='wsrep_before_certification SIGNAL ready WAIT_FOR cont';
+CALL proc_update;
+connection node_1a;
+SET debug_sync='now WAIT_FOR ready';
+connection node_2;
+UPDATE t1 SET f2='c';
+connection node_1a;
+SET debug_sync='now SIGNAL cont';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1a;
+SET debug_sync='RESET';
+DROP PROCEDURE proc_update;
+connection node_1;
+
+Test phase 3 to make sure natural deadlock is not treated as BF abort
+
+TRUNCATE t1;
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_1;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
+connection node_1a;
+COMMIT;
+wsrep__bf_aborts
+0
+connection node_1;
+ROLLBACK;
+
+Test phase 4 to make sure natural deadlock inside SP execution
+is not treated as BF abort
+
+connection node_1a;
+TRUNCATE t1;
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a');
+CREATE PROCEDURE proc_update_1()
+BEGIN
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT SLEEP(5);
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+COMMIT;
+END|
+CREATE PROCEDURE proc_update_2()
+BEGIN
+START TRANSACTION;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+SELECT SLEEP(5);
+UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
+COMMIT;
+END|
+connection node_1;
+CALL proc_update_1;
+connection node_1a;
+CALL proc_update_2;
+SLEEP(5)
+0
+wsrep__bf_aborts
+0
+connection node_1;
+SLEEP(5)
+0
+DROP PROCEDURE proc_update_1;
+DROP PROCEDURE proc_update_2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-20793.result b/mysql-test/suite/galera/r/MDEV-20793.result
new file mode 100644
index 00000000000..feb068f258f
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-20793.result
@@ -0,0 +1,44 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT);
+INSERT INTO t1 VALUES (1, 0), (5, 0);
+connection node_1_ctrl;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_slave_threads = 2;
+connection node_1;
+SET SESSION wsrep_retry_autocommit = 0;
+START TRANSACTION;
+UPDATE t1 SET f2 = 1;
+connection node_1_ctrl;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+INSERT INTO t1 VALUES (2, 2);
+connection node_1_ctrl;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_slave_enter_sync';
+connection node_2;
+UPDATE t1 SET f2 = 2 WHERE f1 = 5;
+connection node_1_ctrl;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+connection node_1;
+SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue";
+COMMIT;
+connection node_1_ctrl;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION debug_sync = "now WAIT_FOR reached";
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET SESSION debug_sync = "now SIGNAL continue";
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SET debug_sync = "RESET";
+DROP TABLE t1;
+SET GLOBAL wsrep_slave_threads = 1;
diff --git a/mysql-test/suite/galera/r/MDEV-22021.result b/mysql-test/suite/galera/r/MDEV-22021.result
index 590fa518c3c..a217e66e2f0 100644
--- a/mysql-test/suite/galera/r/MDEV-22021.result
+++ b/mysql-test/suite/galera/r/MDEV-22021.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
START TRANSACTION;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/MDEV-22051.result b/mysql-test/suite/galera/r/MDEV-22051.result
new file mode 100644
index 00000000000..229e26fd32a
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-22051.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+FLUSH TABLES WITH READ LOCK;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+ERROR 08S01: Aborting TOI: Replication paused on node for FTWRL/BACKUP STAGE.
+SET wsrep_OSU_method=RSU;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+ERROR 08S01: Aborting TOI: Replication paused on node for FTWRL/BACKUP STAGE.
+SET wsrep_OSU_method=TOI;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+ERROR 08S01: Aborting TOI: Replication paused on node for FTWRL/BACKUP STAGE.
+connection node_1;
+UNLOCK TABLES;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+FLUSH TABLES WITH READ LOCK;
+INSERT INTO t1 VALUES (1);
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+UNLOCK TABLES;
+DROP TABLE t1;
+CALL mtr.add_suppression("CREATE TABLE isolation failure");
diff --git a/mysql-test/suite/galera/r/MDEV-22055.result b/mysql-test/suite/galera/r/MDEV-22055.result
new file mode 100644
index 00000000000..651f8501a0a
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-22055.result
@@ -0,0 +1,18 @@
+connection node_2;
+connection node_1;
+ROLLBACK AND CHAIN;
+CREATE TABLE t1(a int not null primary key) engine=innodb;
+INSERT INTO t1 values (1);
+BEGIN;
+INSERT INTO t1 values (2);
+ROLLBACK AND CHAIN;
+SELECT * FROM t1;
+a
+1
+connection node_2;
+SET SESSION wsrep_sync_wait=15;
+SELECT * FROM t1;
+a
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-22227.result b/mysql-test/suite/galera/r/MDEV-22227.result
new file mode 100644
index 00000000000..d5afc974555
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-22227.result
@@ -0,0 +1,16 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+LOCK TABLE t1 WRITE CONCURRENT;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET lock_wait_timeout= 1;
+CREATE VIEW v1 AS SELECT * FROM t1;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+UNLOCK TABLES;
+connection node_1a;
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-22421.result b/mysql-test/suite/galera/r/MDEV-22421.result
new file mode 100644
index 00000000000..33dc3e449ae
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-22421.result
@@ -0,0 +1,7 @@
+connection node_2;
+connection node_1;
+SET @@local.sql_mode='no_field_options';
+CREATE TABLE t1 (f1 INT, ROW_START BIGINT UNSIGNED AS ROW START INVISIBLE, ROW_END BIGINT UNSIGNED AS ROW END INVISIBLE, PERIOD FOR SYSTEM_TIME(ROW_START, ROW_END)) WITH SYSTEM VERSIONING ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+UPDATE t1 SET f1 = 1 WHERE f1 = 1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-22458.result b/mysql-test/suite/galera/r/MDEV-22458.result
new file mode 100644
index 00000000000..d1f9d94bd1c
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-22458.result
@@ -0,0 +1,10 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (a INT);
+connect con1,localhost,root,,test;
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+SHOW EXPLAIN FOR $con1;
+ERROR HY000: Target is not running an EXPLAINable command
+connection con1;
+INSERT INTO t1 VALUES (5),(6),(7),(8);
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-22707.result b/mysql-test/suite/galera/r/MDEV-22707.result
deleted file mode 100644
index a74844d7e12..00000000000
--- a/mysql-test/suite/galera/r/MDEV-22707.result
+++ /dev/null
@@ -1,26 +0,0 @@
-CREATE TABLE t1(f2 INT) ENGINE=InnoDB;
-connect node_1_applier_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
-connection node_2;
-SET SESSION wsrep_sync_wait = 0;
-INSERT INTO t1 (f2) VALUES (2);
-connection node_1_applier_thd;
-SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
-connection node_1;
-SET SESSION wsrep_sync_wait = 0;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR continue';
-INSERT INTO t1 (f2) VALUES (1);
-connect node_1_flush_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET DEBUG_SYNC="now WAIT_FOR wsrep_before_replication_reached";
-SET GLOBAL debug_dbug = "+d,sync.wsrep_before_mdl_wait";
-FLUSH TABLES;
-connect node_1_sync_release_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET GLOBAL debug_dbug = "";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
-SET DEBUG_SYNC = "now SIGNAL continue";
-SET DEBUG_SYNC = "RESET";
-connection node_1;
-connection node_1_flush_thd;
-connection node_2;
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-22708.result b/mysql-test/suite/galera/r/MDEV-22708.result
new file mode 100644
index 00000000000..a672ed7be0d
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-22708.result
@@ -0,0 +1,11 @@
+connection node_2;
+connection node_1;
+SET @wsrep_forced_binlog_format_saved = @@GLOBAL.wsrep_forced_binlog_format;
+SET @@GLOBAL.wsrep_forced_binlog_format = STATEMENT;
+CREATE TABLE t1(c INT PRIMARY KEY) ENGINE = MyISAM;
+INSERT DELAYED INTO t1 VALUES (1),(2),(3);
+SELECT SLEEP(1);
+SLEEP(1)
+0
+DROP TABLE t1;
+SET @@GLOBAL.wsrep_forced_binlog_format = @wsrep_forced_binlog_format_saved;
diff --git a/mysql-test/suite/galera/r/MDEV-24063.result b/mysql-test/suite/galera/r/MDEV-24063.result
new file mode 100644
index 00000000000..d7eda917cdf
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-24063.result
@@ -0,0 +1,10 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-24143.result b/mysql-test/suite/galera/r/MDEV-24143.result
new file mode 100644
index 00000000000..860d8a35834
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-24143.result
@@ -0,0 +1,23 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
+SELECT get_lock ('test2', 0);
+get_lock ('test2', 0)
+1
+DROP TABLE t1;
+CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_trx_fragment_size=10;
+SET SESSION autocommit=0;
+SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
+c1
+INSERT INTO t1 VALUES (4),(3),(1),(2);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
+ERROR 42S01: Table 't1' already exists
+ALTER TABLE t1 DROP COLUMN c2;
+ERROR 42000: Can't DROP COLUMN `c2`; check that it exists
+SELECT get_lock ('test', 1.5);
+get_lock ('test', 1.5)
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-24327.result b/mysql-test/suite/galera/r/MDEV-24327.result
index e7cd9d08f4b..d309749efa4 100644
--- a/mysql-test/suite/galera/r/MDEV-24327.result
+++ b/mysql-test/suite/galera/r/MDEV-24327.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'f');
INSERT INTO t1 VALUES (2, 'g');
@@ -11,7 +13,7 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
@@ -21,7 +23,7 @@ SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_2;
UPDATE t1 SET f2 = '2' WHERE f1 = 2;
connection node_1a;
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/r/MDEV-25494.result b/mysql-test/suite/galera/r/MDEV-25494.result
new file mode 100644
index 00000000000..e889fecc42e
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-25494.result
@@ -0,0 +1,14 @@
+connection node_2;
+connection node_1;
+SET SESSION binlog_format=STATEMENT;
+Warnings:
+Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
+CREATE TEMPORARY TABLE t (i INT) UNION=(t);
+ALTER TABLE t ADD extrac CHAR(1);
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TEMPORARY TABLE `t` (
+ `i` int(11) DEFAULT NULL,
+ `extrac` char(1) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t;
diff --git a/mysql-test/suite/galera/r/MDEV-25562.result b/mysql-test/suite/galera/r/MDEV-25562.result
new file mode 100644
index 00000000000..ab8340af8a9
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-25562.result
@@ -0,0 +1,6 @@
+connection node_2;
+connection node_1;
+SET SESSION WSREP_ON=0;
+FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT;
+SET SESSION WSREP_ON=1;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/r/MDEV-25740.result b/mysql-test/suite/galera/r/MDEV-25740.result
new file mode 100644
index 00000000000..5a4318a7f19
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-25740.result
@@ -0,0 +1,9 @@
+connection node_2;
+connection node_1;
+SET AUTOCOMMIT = OFF;
+SET completion_type = CHAIN;
+CREATE TABLE t1(f1 INT) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 VALUES (1);
+ROLLBACK;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-26575.result b/mysql-test/suite/galera/r/MDEV-26575.result
new file mode 100644
index 00000000000..5b447e1ae20
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-26575.result
@@ -0,0 +1,11 @@
+connection node_2;
+connection node_1;
+connection node_2;
+call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*");
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+SET SESSION wsrep_on = OFF;
+XA START 'xatest';
+ERROR 42000: This version of MariaDB doesn't yet support 'XA transactions with Galera replication'
diff --git a/mysql-test/suite/galera/r/MDEV-27276.result b/mysql-test/suite/galera/r/MDEV-27276.result
new file mode 100644
index 00000000000..7e5b29fad7e
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-27276.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
+CREATE TABLE p (id INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+INSERT INTO p VALUES(1,0);
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+CREATE TABLE c(id INT NOT NULL PRIMARY KEY, p_id INT, FOREIGN KEY (p_id) REFERENCES p(id) ON DELETE CASCADE) ENGINE=InnoDB;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
+SELECT * FROM p;
+id f2
+SELECT * FROM c;
+id p_id
+DROP TABLE c;
+DROP TABLE p;
diff --git a/mysql-test/suite/galera/r/MDEV-27713.result b/mysql-test/suite/galera/r/MDEV-27713.result
new file mode 100644
index 00000000000..14575cb484d
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-27713.result
@@ -0,0 +1,46 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (
+f1 INT,
+f2 VARCHAR(255) PRIMARY KEY
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO t1 VALUES(1, 'abc');
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2,'def');
+connection node_2;
+SET GLOBAL event_scheduler=ON;
+CREATE PROCEDURE update_table()
+BEGIN
+SET AUTOCOMMIT=OFF;
+DO GET_LOCK('local_lock', 0);
+SET DEBUG_SYNC = 'innodb_row_update_for_mysql_begin SIGNAL blocked WAIT_FOR continue';
+UPDATE t1 SET f2 = 'jkl' WHERE f1 != 2;
+DO RELEASE_LOCK('local_lock');
+END|
+CREATE DEFINER=current_user
+EVENT event
+ON SCHEDULE AT CURRENT_TIMESTAMP
+ON COMPLETION PRESERVE
+ENABLE
+DO CALL update_table();
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+SET DEBUG_SYNC = 'now WAIT_FOR blocked';
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
+connection node_1;
+COMMIT;
+connection node_2b;
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+connection node_2a;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_2;
+SET GLOBAL event_scheduler=default;
+DROP PROCEDURE update_table;
+DROP EVENT event;
+SET DEBUG_SYNC='reset';
+SET GLOBAL debug_dbug = DEFAULT;
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-27862.result b/mysql-test/suite/galera/r/MDEV-27862.result
new file mode 100644
index 00000000000..25b7bc6cfd2
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-27862.result
@@ -0,0 +1,54 @@
+connection node_2;
+connection node_1;
+CREATE SEQUENCE seq_nocache ENGINE=InnoDB;
+DROP SEQUENCE seq_nocache;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+connection node_2;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+connection node_1;
+CREATE SEQUENCE seq NOCACHE ENGINE=InnoDB;
+SELECT NEXTVAL(seq) = 1;
+NEXTVAL(seq) = 1
+1
+connection node_2;
+SELECT NEXTVAL(seq) = 2;
+NEXTVAL(seq) = 2
+1
+connection node_1;
+SELECT NEXTVAL(seq) = 3;
+NEXTVAL(seq) = 3
+1
+SELECT SETVAL(seq, 100);
+SETVAL(seq, 100)
+100
+connection node_2;
+SELECT NEXTVAL(seq) = 101;
+NEXTVAL(seq) = 101
+1
+connection node_1;
+SELECT NEXTVAL(seq) = 102;
+NEXTVAL(seq) = 102
+1
+DROP SEQUENCE seq;
+CREATE TABLE t1(f1 INT);
+CREATE SEQUENCE seq_transaction NOCACHE ENGINE=InnoDB;
+START TRANSACTION;
+INSERT INTO t1 VALUES (0);
+SELECT NEXTVAL(seq_transaction);
+NEXTVAL(seq_transaction)
+1
+INSERT INTO t1 VALUES (NEXTVAL(seq_transaction));
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 2 FROM t1;
+COUNT(*) = 2
+1
+SELECT NEXTVAL(seq_transaction) = 3;
+NEXTVAL(seq_transaction) = 3
+1
+connection node_1;
+SELECT NEXTVAL(seq_transaction) = 4;
+NEXTVAL(seq_transaction) = 4
+1
+DROP SEQUENCE seq_transaction;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MDEV-28053.result b/mysql-test/suite/galera/r/MDEV-28053.result
new file mode 100644
index 00000000000..b3f93688dd0
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-28053.result
@@ -0,0 +1,14 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+connection node_2;
+connection node_3;
+DROP TABLE t1;
+connection node_2;
+connection node_2;
+STOP SLAVE;
+RESET SLAVE ALL;
+connection node_3;
+RESET MASTER;
diff --git a/mysql-test/suite/galera/r/MDEV-6860.result b/mysql-test/suite/galera/r/MDEV-6860.result
new file mode 100644
index 00000000000..72a743537c4
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-6860.result
@@ -0,0 +1,14 @@
+connection node_2;
+connection node_1;
+connection node_2;
+START SLAVE;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
+CREATE TABLE t1 (f1 int, f2 int) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+connection node_3;
+DROP TABLE t1;
+connection node_2;
+STOP SLAVE;
+RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/r/MENT-1047.result b/mysql-test/suite/galera/r/MENT-1047.result
new file mode 100644
index 00000000000..76d58f6d52f
--- /dev/null
+++ b/mysql-test/suite/galera/r/MENT-1047.result
@@ -0,0 +1,4 @@
+connection node_2;
+connection node_1;
+XA START 'trx';
+ERROR 42000: This version of MariaDB doesn't yet support 'XA transactions with Galera replication'
diff --git a/mysql-test/suite/galera/r/MW-252.result b/mysql-test/suite/galera/r/MW-252.result
index 795d3fff670..4d458802614 100644
--- a/mysql-test/suite/galera/r/MW-252.result
+++ b/mysql-test/suite/galera/r/MW-252.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
FLUSH TABLES WITH READ LOCK;
diff --git a/mysql-test/suite/galera/r/MW-258.result b/mysql-test/suite/galera/r/MW-258.result
index 1c2a1744c98..22963557daf 100644
--- a/mysql-test/suite/galera/r/MW-258.result
+++ b/mysql-test/suite/galera/r/MW-258.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
LOCK TABLE t1 WRITE;
diff --git a/mysql-test/suite/galera/r/MW-259.result b/mysql-test/suite/galera/r/MW-259.result
index 5256a95c52c..9a0f2ccfa23 100644
--- a/mysql-test/suite/galera/r/MW-259.result
+++ b/mysql-test/suite/galera/r/MW-259.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result
index 6f7bdf3917a..3df126de728 100644
--- a/mysql-test/suite/galera/r/MW-284.result
+++ b/mysql-test/suite/galera/r/MW-284.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*");
call mtr.add_suppression("WSREP has not yet prepared node for application use");
diff --git a/mysql-test/suite/galera/r/MW-285.result b/mysql-test/suite/galera/r/MW-285.result
index 8c5a21fcbee..762f22d5d25 100644
--- a/mysql-test/suite/galera/r/MW-285.result
+++ b/mysql-test/suite/galera/r/MW-285.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
CREATE TABLE child (
diff --git a/mysql-test/suite/galera/r/MW-286.result b/mysql-test/suite/galera/r/MW-286.result
index f3bef6f7516..b3accb1cd9b 100644
--- a/mysql-test/suite/galera/r/MW-286.result
+++ b/mysql-test/suite/galera/r/MW-286.result
@@ -1,15 +1,24 @@
+connection node_2;
+connection node_1;
connection node_1;
-CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
-INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
-INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
-INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
+INSERT INTO t1 (f1) VALUES (1), (2), (3);
connection node_2;
SET GLOBAL wsrep_desync = TRUE;
SET wsrep_on = FALSE;
-ALTER TABLE t1 ADD PRIMARY KEY (f1);
+SET SESSION debug_sync = "alter_table_inplace_after_lock_upgrade SIGNAL mdl_locked WAIT_FOR mdl_continue";
+ALTER TABLE t1 ADD PRIMARY KEY (f1);;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION debug_sync = "now WAIT_FOR mdl_locked";
+connection node_1;
+INSERT INTO t1(f1) VALUES (11);
+connection node_2a;
+SET debug_sync = "now SIGNAL mdl_continue";
+SET debug_sync='RESET';
+connection node_2;
+ERROR 70100: Query execution was interrupted
SET wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE;
connection node_1;
DROP TABLE t1;
-DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/MW-292.result b/mysql-test/suite/galera/r/MW-292.result
index 5b9214ace2a..81e5a316b63 100644
--- a/mysql-test/suite/galera/r/MW-292.result
+++ b/mysql-test/suite/galera/r/MW-292.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE rand_table (f1 FLOAT);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a');
@@ -10,19 +12,28 @@ SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
f1 f2
2 a
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
-connection node_1;
-COMMIT;;
-connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
-SET SESSION wsrep_on = 0;
-SET SESSION wsrep_on = 1;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_1;
SELECT TIMEDIFF(SYSDATE(), NOW()) < 2;
TIMEDIFF(SYSDATE(), NOW()) < 2
diff --git a/mysql-test/suite/galera/r/MW-309.result b/mysql-test/suite/galera/r/MW-309.result
index 3dd49a041ee..0169b56e3e1 100644
--- a/mysql-test/suite/galera/r/MW-309.result
+++ b/mysql-test/suite/galera/r/MW-309.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/r/MW-313.result b/mysql-test/suite/galera/r/MW-313.result
index dc605ffc370..909caf77f1d 100644
--- a/mysql-test/suite/galera/r/MW-313.result
+++ b/mysql-test/suite/galera/r/MW-313.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/r/MW-328A.result b/mysql-test/suite/galera/r/MW-328A.result
deleted file mode 100644
index 535f04bfbab..00000000000
--- a/mysql-test/suite/galera/r/MW-328A.result
+++ /dev/null
@@ -1,42 +0,0 @@
-CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
-INSERT INTO t1 (f1) VALUES (1);
-CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
-CREATE PROCEDURE proc_update ()
-BEGIN
-DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
-SET SESSION wsrep_sync_wait = 0;
-WHILE 1 DO
-UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4);
-END WHILE;
-END|
-connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1X;
-CALL proc_update();;
-connection node_2;
-SET SESSION wsrep_retry_autocommit = 0;
-connection node_1;
-connection node_1X;
-Got one of the listed errors
-connection node_1;
-DROP PROCEDURE proc_update;
-DROP TABLE t1, t2;
-CALL mtr.add_suppression("conflict state ABORTED after post commit");
-connection node_1;
-CREATE TABLE t1 (i int primary key, j int) engine=innodb;
-INSERT INTO t1 values (1,0);
-BEGIN;
-UPDATE t1 SET j=1 WHERE i=1;
-connection node_2;
-UPDATE t1 SET j=2 WHERE i=1;
-connection node_1;
-COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
-SELECT * FROM t1;
-i j
-1 2
-connection node_2;
-SELECT * FROM t1;
-i j
-1 2
-connection node_1;
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-328B.result b/mysql-test/suite/galera/r/MW-328B.result
deleted file mode 100644
index 531c5de8029..00000000000
--- a/mysql-test/suite/galera/r/MW-328B.result
+++ /dev/null
@@ -1,23 +0,0 @@
-CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
-INSERT INTO t1 (f1) VALUES (1);
-CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
-CREATE PROCEDURE proc_update ()
-BEGIN
-DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
-SET SESSION wsrep_sync_wait = 0;
-WHILE 1 DO
-UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4);
-END WHILE;
-END|
-connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1X;
-CALL proc_update();;
-connection node_2;
-SET SESSION wsrep_retry_autocommit = 0;
-connection node_1;
-connection node_1X;
-Got one of the listed errors
-connection node_1;
-DROP PROCEDURE proc_update;
-DROP TABLE t1, t2;
-CALL mtr.add_suppression("conflict state ABORTED after post commit");
diff --git a/mysql-test/suite/galera/r/MW-328D.result b/mysql-test/suite/galera/r/MW-328D.result
deleted file mode 100644
index 6562136ec27..00000000000
--- a/mysql-test/suite/galera/r/MW-328D.result
+++ /dev/null
@@ -1,20 +0,0 @@
-CREATE TABLE t1 (i INT) ENGINE = InnoDB;
-INSERT INTO t1 (i) VALUES(1);
-CREATE TABLE t2 (i INT) ENGINE = InnoDB;
-connection node_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-SELECT * FROM t1 WHERE i = 1 LOCK IN SHARE MODE;
-i
-1
-connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1a;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE i = 1 FOR UPDATE;;
-connection node_1;
-DELETE FROM t1 WHERE i = 1;
-COMMIT;
-connection node_1a;
-ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
-DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/r/MW-328E.result b/mysql-test/suite/galera/r/MW-328E.result
deleted file mode 100644
index 89654ec066a..00000000000
--- a/mysql-test/suite/galera/r/MW-328E.result
+++ /dev/null
@@ -1,20 +0,0 @@
-create table t1 (i int primary key, j int) engine=innodb;
-create table t2 (i int primary key, j int) engine=innodb;
-insert into t1 values (1,0);
-insert into t2 values (2,0);
-set autocommit=off;
-start transaction;
-update t1 set j=1 where i=1;
-connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1a;
-set autocommit=off;
-start transaction;
-begin;
-update t2 set j=1 where i=2;
-connection node_1;
-insert into t1 select * from t2;;
-connection node_1a;
-insert into t2 select * from t1;
-ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
-connection node_1;
-DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result
index b6d88573d58..54d55eea7ca 100644
--- a/mysql-test/suite/galera/r/MW-329.result
+++ b/mysql-test/suite/galera/r/MW-329.result
@@ -1,10 +1,8 @@
+connection node_2;
+connection node_1;
CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*");
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1),(65535);
-FLUSH STATUS;
-SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
-VARIABLE_VALUE = 0
-1
CREATE PROCEDURE proc_insert ()
BEGIN
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
@@ -16,7 +14,6 @@ END WHILE;
END|
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1b;
-SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
connection node_1;
connection node_1b;
connection node_1;
diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result
index dc1f0763a3f..8996b85c77c 100644
--- a/mysql-test/suite/galera/r/MW-336.result
+++ b/mysql-test/suite/galera/r/MW-336.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
diff --git a/mysql-test/suite/galera/r/MW-357.result b/mysql-test/suite/galera/r/MW-357.result
index 35855e21233..dc391be4dd3 100644
--- a/mysql-test/suite/galera/r/MW-357.result
+++ b/mysql-test/suite/galera/r/MW-357.result
@@ -1,4 +1,6 @@
connection node_2;
+connection node_1;
+connection node_2;
SET GLOBAL wsrep_slave_threads = 0;
Warnings:
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
diff --git a/mysql-test/suite/galera/r/MW-369.result b/mysql-test/suite/galera/r/MW-369.result
index 9e209529db3..9f0a77edbbc 100644
--- a/mysql-test/suite/galera/r/MW-369.result
+++ b/mysql-test/suite/galera/r/MW-369.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ;
@@ -17,17 +19,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -59,14 +61,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
connection node_2;
@@ -99,14 +101,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
connection node_2;
@@ -135,17 +137,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -175,17 +177,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -196,3 +198,87 @@ f1 p_id f2
1 1 1
DROP TABLE c;
DROP TABLE p;
+#
+# Start of 10.4 tests
+#
+connection node_1;
+CREATE TABLE pf (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE cf (
+f1 INTEGER PRIMARY KEY,
+p_id INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pf (f1)
+);
+INSERT INTO pf VALUES (1);
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+INSERT INTO cf (f1, p_id) VALUES (10, 1);
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+INSERT INTO cf (f1, p_id) VALUES (20, 1);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+connection node_2;
+SELECT * FROM pf;
+f1
+1
+SELECT * FROM cf;
+f1 p_id
+10 1
+20 1
+DROP TABLE cf;
+DROP TABLE pf;
+connection node_1;
+CREATE TABLE pg (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE cg (f1 INTEGER PRIMARY KEY, p_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pg (f1)) ;
+INSERT INTO pg VALUES (1, 0);
+INSERT INTO pg VALUES (2, 0);
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE pg SET f2 = 1 WHERE f1 = 1;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+INSERT INTO cg VALUES (1, 1, 0);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+connection node_2;
+SELECT * FROM pg;
+f1 f2
+1 1
+2 0
+SELECT * FROM cg;
+f1 p_id f2
+1 1 0
+DROP TABLE cg;
+DROP TABLE pg;
diff --git a/mysql-test/suite/galera/r/MW-388.result b/mysql-test/suite/galera/r/MW-388.result
index 59d499e117d..b16addc542a 100644
--- a/mysql-test/suite/galera/r/MW-388.result
+++ b/mysql-test/suite/galera/r/MW-388.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
CREATE PROCEDURE insert_proc ()
@@ -27,7 +29,7 @@ connection node_2;
connection node_1;
SELECT @errno = 1213;
@errno = 1213
-0
+1
SELECT * FROM t1;
f1 f2
1 node 2
diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result
index 9f04984adc8..f692c90d611 100644
--- a/mysql-test/suite/galera/r/MW-402.result
+++ b/mysql-test/suite/galera/r/MW-402.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
@@ -20,17 +22,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -60,17 +62,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -102,17 +104,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -135,17 +137,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -159,8 +161,10 @@ DROP TABLE p;
connection node_1;
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
-CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER,
-CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE,
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ON DELETE CASCADE,
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1));
INSERT INTO p1 VALUES (1, 0);
INSERT INTO p2 VALUES (1, 0);
@@ -179,14 +183,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
connection node_2;
@@ -197,4 +201,52 @@ f1 f2
1 2
SELECT * FROM c;
f1 p1_id p2_id f2
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
+connection node_1;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ON DELETE CASCADE,
+CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ON DELETE CASCADE);
+INSERT INTO p1 VALUES (1, 0);
+INSERT INTO p2 VALUES (1, 0);
+INSERT INTO c VALUES (1, 1, 1, 0);
+connection node_1a;
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+DELETE FROM p2 WHERE f1=1;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+DELETE FROM p1 WHERE f1=1;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
+SELECT * FROM p1;
+f1 f2
+SELECT * FROM p2;
+f1 f2
+1 0
+SELECT * FROM c;
+f1 p1_id p2_id f2
DROP TABLE c,p1,p2;
diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result
index 499b5350972..68406c4dcf4 100644
--- a/mysql-test/suite/galera/r/MW-416.result
+++ b/mysql-test/suite/galera/r/MW-416.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE USER 'userMW416'@'localhost';
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost';
connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1;
diff --git a/mysql-test/suite/galera/r/MW-44.result b/mysql-test/suite/galera/r/MW-44.result
index 7335acc445a..604bd139024 100644
--- a/mysql-test/suite/galera/r/MW-44.result
+++ b/mysql-test/suite/galera/r/MW-44.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
TRUNCATE TABLE mysql.general_log;
connection node_2;
diff --git a/mysql-test/suite/galera/r/MW-86-wait1.result b/mysql-test/suite/galera/r/MW-86-wait1.result
index 85729c6462e..8ad9c8bf181 100644
--- a/mysql-test/suite/galera/r/MW-86-wait1.result
+++ b/mysql-test/suite/galera/r/MW-86-wait1.result
@@ -1,9 +1,13 @@
connection node_2;
+connection node_1;
+SET @orig_debug=@@debug_dbug;
+connection node_2;
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
+set debug_sync='RESET';
SET SESSION wsrep_sync_wait = 1;
-SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
connection node_1;
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait1 VALUES (1);
@@ -34,11 +38,11 @@ SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
-SET GLOBAL debug_dbug = "";
+SET GLOBAL debug_dbug = @orig_debug;
SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait1;
-SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result
index d1341542ef7..07e59ebbe0a 100644
--- a/mysql-test/suite/galera/r/MW-86-wait8.result
+++ b/mysql-test/suite/galera/r/MW-86-wait8.result
@@ -1,9 +1,12 @@
connection node_2;
+connection node_1;
+SET @orig_debug=@@debug_dbug;
+connection node_2;
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
SET SESSION wsrep_sync_wait = 8;
-SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
connection node_1;
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait8 VALUES (1);
@@ -36,11 +39,11 @@ SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
-SET GLOBAL debug_dbug = "";
+SET GLOBAL debug_dbug = @orig_debug;
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait8;
-SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
diff --git a/mysql-test/suite/galera/r/basic.result b/mysql-test/suite/galera/r/basic.result
index e85c805253f..10f180e7a94 100644
--- a/mysql-test/suite/galera/r/basic.result
+++ b/mysql-test/suite/galera/r/basic.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
USE test;
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
diff --git a/mysql-test/suite/galera/r/binlog_checksum.result b/mysql-test/suite/galera/r/binlog_checksum.result
index e86f3892ac7..4106354eb7d 100644
--- a/mysql-test/suite/galera/r/binlog_checksum.result
+++ b/mysql-test/suite/galera/r/binlog_checksum.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
diff --git a/mysql-test/suite/galera/r/create.result b/mysql-test/suite/galera/r/create.result
index a445b32e8bf..6ad94dd3d43 100644
--- a/mysql-test/suite/galera/r/create.result
+++ b/mysql-test/suite/galera/r/create.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
#
diff --git a/mysql-test/suite/galera/r/enforce_storage_engine.result b/mysql-test/suite/galera/r/enforce_storage_engine.result
index 746aa22bf20..1a453241427 100644
--- a/mysql-test/suite/galera/r/enforce_storage_engine.result
+++ b/mysql-test/suite/galera/r/enforce_storage_engine.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-8831 : enforce_storage_engine doesn't block table creation on
# other nodes (galera cluster)
diff --git a/mysql-test/suite/galera/r/enforce_storage_engine2.result b/mysql-test/suite/galera/r/enforce_storage_engine2.result
index 4b80d335bb0..e0fb8d867dc 100644
--- a/mysql-test/suite/galera/r/enforce_storage_engine2.result
+++ b/mysql-test/suite/galera/r/enforce_storage_engine2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-9312: storage engine not enforced during galera cluster
# replication
diff --git a/mysql-test/suite/galera/r/ev51914.result b/mysql-test/suite/galera/r/ev51914.result
index 3f3d67d01ef..b9d8a82bfa0 100644
--- a/mysql-test/suite/galera/r/ev51914.result
+++ b/mysql-test/suite/galera/r/ev51914.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SAVEPOINT in a stored function should be forbidden
CREATE FUNCTION f1 () RETURNS INT BEGIN
diff --git a/mysql-test/suite/galera/r/fk.result b/mysql-test/suite/galera/r/fk.result
index ab8e1c8f680..17fc99a904e 100644
--- a/mysql-test/suite/galera/r/fk.result
+++ b/mysql-test/suite/galera/r/fk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
USE test;
# On node_1
diff --git a/mysql-test/suite/galera/r/galera#414.result b/mysql-test/suite/galera/r/galera#414.result
index 34dcb6242d3..2c1dccfd131 100644
--- a/mysql-test/suite/galera/r/galera#414.result
+++ b/mysql-test/suite/galera/r/galera#414.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera#500.result b/mysql-test/suite/galera/r/galera#500.result
index 2e3f659bd79..a5ab0b19718 100644
--- a/mysql-test/suite/galera/r/galera#500.result
+++ b/mysql-test/suite/galera/r/galera#500.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera#505.result b/mysql-test/suite/galera/r/galera#505.result
index 8d3e3ec072a..d5e78c570b5 100644
--- a/mysql-test/suite/galera/r/galera#505.result
+++ b/mysql-test/suite/galera/r/galera#505.result
@@ -1,5 +1,8 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION wsrep_sync_wait=0;
+# Correct Galera library found
SET SESSION wsrep_sync_wait=DEFAULT;
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
diff --git a/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result b/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result
index 3eb638ca49a..5ae577a6323 100644
--- a/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result
+++ b/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE user(id int primary key, j int) ENGINE=InnoDB;
CREATE TABLE user_session(id int primary key, fk1 int, fk2 int) ENGINE=InnoDB;
alter table user_session add foreign key (fk1) references user(id);
diff --git a/mysql-test/suite/galera/r/galera_UK_conflict.result b/mysql-test/suite/galera/r/galera_UK_conflict.result
index 2795a86d6a6..b0420d58ede 100644
--- a/mysql-test/suite/galera/r/galera_UK_conflict.result
+++ b/mysql-test/suite/galera/r/galera_UK_conflict.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
INSERT INTO t1 VALUES (1, 1, 0);
INSERT INTO t1 VALUES (3, 3, 0);
@@ -23,14 +25,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
@@ -39,13 +41,13 @@ SET debug_sync='RESET';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SET GLOBAL debug_dbug = NULL;
SET debug_sync='RESET';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
SELECT * FROM t1;
@@ -55,8 +57,91 @@ f1 f2 f3
4 4 2
5 5 2
10 10 0
-wsrep_local_replays
-1
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+connection node_2;
+SELECT * FROM t1;
+f1 f2 f3
+1 1 0
+3 3 1
+4 4 2
+5 5 2
+10 10 0
+INSERT INTO t1 VALUES (7,7,7);
+INSERT INTO t1 VALUES (8,8,8);
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+SELECT * FROM t1;
+f1 f2 f3
+1 1 0
+3 3 1
+4 4 2
+5 5 2
+7 7 7
+8 8 8
+10 10 0
+connection node_1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+SELECT * FROM t1;
+f1 f2 f3
+1 1 0
+3 3 1
+4 4 2
+5 5 2
+7 7 7
+8 8 8
+10 10 0
+DROP TABLE t1;
+test scenario 2
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
+INSERT INTO t1 VALUES (1, 1, 0);
+INSERT INTO t1 VALUES (3, 3, 0);
+INSERT INTO t1 VALUES (10, 10, 0);
+SET GLOBAL wsrep_slave_threads = 3;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_1;
+SET SESSION wsrep_sync_wait=0;
+START TRANSACTION;
+DELETE FROM t1 WHERE f2 = 3;
+INSERT INTO t1 VALUES (3, 3, 1);
+connection node_1a;
+SET SESSION wsrep_sync_wait=0;
+connection node_2;
+INSERT INTO t1 VALUES (5, 5, 2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_replay_cb";
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_replay_cb_reached";
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync';
+connection node_2;
+INSERT INTO t1 VALUES (4, 4, 2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_replay_cb";
+SET GLOBAL debug_dbug = NULL;
+SET debug_sync='RESET';
+connection node_1;
SET GLOBAL wsrep_slave_threads = DEFAULT;
connection node_2;
SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/r/galera_admin.result b/mysql-test/suite/galera/r/galera_admin.result
index ed753247236..01e2aac16b2 100644
--- a/mysql-test/suite/galera/r/galera_admin.result
+++ b/mysql-test/suite/galera/r/galera_admin.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
DROP TABLE IF EXISTS t1, t2;
DROP TABLE IF EXISTS x1, x2;
connection node_1;
@@ -16,7 +18,9 @@ connection node_2;
connection node_1;
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
connection node_2;
# OPTIMIZE test
diff --git a/mysql-test/suite/galera/r/galera_alter_engine_innodb.result b/mysql-test/suite/galera/r/galera_alter_engine_innodb.result
index ff6ab792c0e..dfa30441f85 100644
--- a/mysql-test/suite/galera/r/galera_alter_engine_innodb.result
+++ b/mysql-test/suite/galera/r/galera_alter_engine_innodb.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
ALTER TABLE t1 ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
index 389383858ac..b3a9bdd30df 100644
--- a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
+++ b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_replicate_myisam = TRUE;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/galera_alter_table_force.result b/mysql-test/suite/galera/r/galera_alter_table_force.result
index d0a2f81b631..271796422cd 100644
--- a/mysql-test/suite/galera/r/galera_alter_table_force.result
+++ b/mysql-test/suite/galera/r/galera_alter_table_force.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
ALTER TABLE t1 FORCE;
diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
index a6607906661..11fda5d8aab 100644
--- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
+++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
index 9711100d155..a5aeb6eb366 100644
--- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
+++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION wsrep_sync_wait = 0;
SET SESSION lock_wait_timeout = 60;
diff --git a/mysql-test/suite/galera/r/galera_as_master.result b/mysql-test/suite/galera/r/galera_as_master.result
index 2a7262359fa..4aca328be56 100644
--- a/mysql-test/suite/galera/r/galera_as_master.result
+++ b/mysql-test/suite/galera/r/galera_as_master.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
START SLAVE;
connection node_1;
@@ -54,4 +56,6 @@ STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
connection node_1;
+set global wsrep_on=OFF;
RESET MASTER;
+set global wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_as_master_large.result b/mysql-test/suite/galera/r/galera_as_master_large.result
index dad74211af9..826d2f32057 100644
--- a/mysql-test/suite/galera/r/galera_as_master_large.result
+++ b/mysql-test/suite/galera/r/galera_as_master_large.result
@@ -2,6 +2,8 @@
# MDEV-9044 : Getting binlog corruption on my Galera cluster (10.1.8)
# making it impossible to async slave.
#
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
START SLAVE;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_as_slave.result b/mysql-test/suite/galera/r/galera_as_slave.result
index 9ccb5106234..391ceecd509 100644
--- a/mysql-test/suite/galera/r/galera_as_slave.result
+++ b/mysql-test/suite/galera/r/galera_as_slave.result
@@ -1,12 +1,14 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
connection node_2;
INSERT INTO t1 VALUES (2);
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
@@ -15,10 +17,10 @@ connection node_2;
SELECT COUNT(*) = 3 FROM t1;
COUNT(*) = 3
1
-connection node_1;
+connection node_3;
DROP TABLE t1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
-connection node_1;
+connection node_3;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
index 60f3216aa9c..ffaa62c0003 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
@@ -1,7 +1,9 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
SET SESSION binlog_format='STATEMENT';
CREATE TABLE t1 (
i int(11) NOT NULL AUTO_INCREMENT,
@@ -9,10 +11,14 @@ c char(32) DEFAULT 'dummy_text',
PRIMARY KEY (i)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
insert into t1(i) values(null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1;
i c
1 dummy_text
@@ -21,8 +27,12 @@ i c
4 dummy_text
SET SESSION auto_increment_increment=7;
insert into t1(i) values(null), (null), (null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
SET SESSION auto_increment_offset=5;
insert into t1(i) values(null), (null), (null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1;
i c
1 dummy_text
@@ -60,7 +70,7 @@ binlog_format ROW
show variables like 'auto_increment_increment';
Variable_name Value
auto_increment_increment 2
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
select * from t1;
i c
1 dummy_text
@@ -79,10 +89,12 @@ binlog_format ROW
show variables like 'auto_increment_increment';
Variable_name Value
auto_increment_increment 2
-connection node_1;
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
+connection node_3;
DROP TABLE t1;
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
-connection node_1;
+connection node_3;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_ctas.result b/mysql-test/suite/galera/r/galera_as_slave_ctas.result
index 13cbbc905e3..a3d28ce42aa 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_ctas.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_ctas.result
@@ -1,28 +1,31 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+SELECT @@wsrep_on;
+@@wsrep_on
+0
+connection node_1;
+START SLAVE;
+connection node_3;
SHOW VARIABLES LIKE 'binlog_format';
Variable_name Value
binlog_format ROW
-connection node_1;
CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE target AS SELECT * FROM source;
+connection node_1;
connection node_2;
connection node_3;
-connection node_1;
DROP TABLE target;
INSERT INTO source VALUES(1);
CREATE TABLE target AS SELECT * FROM source;
+connection node_1;
connection node_2;
connection node_3;
-connection node_1;
DROP TABLE source;
DROP TABLE target;
-connection node_3;
connection node_2;
+connection node_1;
STOP SLAVE;
RESET SLAVE ALL;
-connection node_1;
+connection node_3;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid.result b/mysql-test/suite/galera/r/galera_as_slave_gtid.result
index 844d4f3fb7e..41d9085ccac 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_gtid.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid.result
@@ -1,31 +1,38 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
LENGTH(@@global.gtid_binlog_state) > 1
1
+connection node_1;
connection node_2;
gtid_binlog_state_equal
1
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
gtid_binlog_state_equal
1
-connection node_1;
-DROP TABLE t1;
connection node_3;
+DROP TABLE t1;
+connection node_1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
#cleanup
connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_3;
reset master;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_auto_engine.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_auto_engine.result
new file mode 100644
index 00000000000..cff5bb0a5d0
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_auto_engine.result
@@ -0,0 +1,41 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+SELECT LENGTH(@@global.gtid_binlog_state) > 1;
+LENGTH(@@global.gtid_binlog_state) > 1
+1
+connection node_1;
+connection node_2;
+gtid_binlog_state_equal
+1
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+gtid_binlog_state_equal
+1
+connection node_3;
+DROP TABLE t1;
+connection node_1;
+connection node_2;
+STOP SLAVE;
+RESET SLAVE ALL;
+#cleanup
+connection node_1;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+connection node_2;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+connection node_3;
+reset master;
+connection node_2;
+DROP TABLE mysql.gtid_slave_pos_InnoDB;
+CALL mtr.add_suppression("The automatically created table");
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result
index bea76e19dbb..b498f334bf8 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result
@@ -1,35 +1,46 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+connection node_1;
SELECT @@WSREP_ON;
@@WSREP_ON
+1
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+SELECT @@wsrep_on;
+@@wsrep_on
0
-connection node_2;
+connection node_1;
ALTER TABLE mysql.gtid_slave_pos engine = InnoDB;
START SLAVE;
-connection node_1;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1);
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
LENGTH(@@global.gtid_binlog_state) > 1
1
-connection node_2;
+connection node_1;
gtid_binlog_state_equal
0
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
+connection node_2;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
gtid_binlog_state_equal
0
#cleanup
-connection node_1;
+connection node_3;
DROP TABLE t1;
+connection node_1;
connection node_2;
connection node_3;
+RESET MASTER;
connection node_1;
-reset master;
-connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
+SET GLOBAL WSREP_ON=OFF;
reset master;
-connection node_3;
+SET GLOBAL WSREP_ON=ON;
+connection node_2;
+SET GLOBAL WSREP_ON=OFF;
reset master;
+SET GLOBAL WSREP_ON=ON;
+connection node_3;
+RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
index 6d0bcd4204a..fefc988d9d4 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
@@ -1,25 +1,26 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+connection node_1;
+connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_2;
START SLAVE;
SET SESSION wsrep_sync_wait = 0;
-connection node_1;
+connection node_4;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
-connection node_3;
connection node_1;
+connection node_4;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
connection node_2;
-connection node_3;
+connection node_1;
expected_error
1
connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
-connection node_3;
+connection node_1;
connection node_2;
START SLAVE;
-connection node_1;
+connection node_4;
DROP TABLE t1;
connection node_2;
STOP SLAVE;
@@ -29,5 +30,5 @@ CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
-connection node_1;
+connection node_4;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_replay.result b/mysql-test/suite/galera/r/galera_as_slave_replay.result
index 760617be5f7..05bfeed8f01 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_replay.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_replay.result
@@ -1,10 +1,13 @@
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
+connection node_2;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
RESET MASTER;
connection node_2a;
START SLAVE;
-connection node_1;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (3, 'a');
@@ -18,15 +21,14 @@ f1 f2
UPDATE t1 SET f2 = 'c' WHERE f1 > 1;
connection node_2a;
SET SESSION wsrep_sync_wait = 0;
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
-connection node_3;
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
connection node_2a;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
-connection node_3;
-INSERT INTO test.t1 VALUES (2, 'b');
connection node_1;
+INSERT INTO test.t1 VALUES (2, 'b');
+connection node_3;
COMMIT;
connection node_2a;
SET SESSION wsrep_on = 0;
@@ -35,8 +37,8 @@ SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
connection node_2a;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
-connection node_1;
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_3;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
COUNT(*) = 1
1
@@ -58,38 +60,13 @@ f1 f2
2 b
3 c
SET DEBUG_SYNC = "RESET";
-#
-# test phase with real abort
-#
-connection node_1;
-set binlog_format=ROW;
-insert into t1 values (4, 'd');
-SET AUTOCOMMIT=ON;
-START TRANSACTION;
-UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
-connection node_2a;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
-SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
-connection node_3;
-UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
-connection node_1;
-COMMIT;
-connection node_2a;
-SET GLOBAL debug_dbug = "";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
-connection node_2a;
-SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
-SET DEBUG_SYNC = "RESET";
connection node_2a;
-set session wsrep_sync_wait=15;
-SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
-COUNT(*) = 1
-1
-set session wsrep_sync_wait=0;
STOP SLAVE;
RESET SLAVE;
DROP TABLE t1;
-connection node_1;
+connection node_3;
DROP TABLE t1;
RESET MASTER;
+connection node_1;
+disconnect node_2a;
+disconnect node_3;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_replication_bundle.result b/mysql-test/suite/galera/r/galera_as_slave_replication_bundle.result
deleted file mode 100644
index a86bfd20e2f..00000000000
--- a/mysql-test/suite/galera/r/galera_as_slave_replication_bundle.result
+++ /dev/null
@@ -1,15 +0,0 @@
-START SLAVE USER='root';
-Warnings:
-Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(1);
-INSERT INTO t1 VALUES(2);
-INSERT INTO t1 VALUES(3);
-INSERT INTO t1 VALUES(4);
-INSERT INTO t1 VALUES(5);
-SELECT COUNT(*) = 4 FROM t1;
-COUNT(*) = 4
-1
-DROP TABLE t1;
-STOP SLAVE;
-RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result b/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result
index 00ae490021b..0ba269558d5 100644
--- a/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_backup_stage.result b/mysql-test/suite/galera/r/galera_backup_stage.result
new file mode 100644
index 00000000000..6fb7d1643cd
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_backup_stage.result
@@ -0,0 +1,78 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 varchar(10)) ENGINE=InnoDB;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION wsrep_sync_wait=0;
+SET SESSION wsrep_retry_autocommit=0;
+INSERT INTO t1 (f1) values ("node1_1");
+ALTER TABLE t1 ADD COLUMN (f2 int(10));
+connection node_2;
+INSERT INTO t1 (f1) values ("node2_1");
+ALTER TABLE t1 ADD COLUMN (f3 int(10));
+connection node_1;
+BACKUP STAGE BLOCK_DDL;
+connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1c;
+SET SESSION wsrep_sync_wait=0;
+connection node_2;
+INSERT INTO t1 (f1) values("node2_2");
+ALTER TABLE t1 ADD COLUMN (f5 int(10));
+connection node_1a;
+ALTER TABLE t1 ADD COLUMN (f4 int(10));
+ERROR 08S01: Aborting TOI: Replication paused on node for FTWRL/BACKUP STAGE.
+INSERT INTO t1 (f1) values("node1a");;
+connection node_1c;
+connection node_1;
+BACKUP STAGE BLOCK_COMMIT;
+connection node_1c;
+SELECT variable_value="Donor/Desynced" FROM information_schema.global_status WHERE variable_name="wsrep_local_state_comment";
+variable_value="Donor/Desynced"
+1
+connection node_2;
+INSERT INTO t1 (f1) values("node2_3");
+ALTER TABLE t1 ADD COLUMN (f6 int(10));
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
+SET SESSION wsrep_sync_wait=0;
+SET SESSION wsrep_retry_autocommit=0;
+ALTER TABLE t1 ADD COLUMN (f4 int(10));
+ERROR 08S01: Aborting TOI: Replication paused on node for FTWRL/BACKUP STAGE.
+INSERT INTO t1 (f1) values("node1b");;
+connection node_1c;
+SELECT COUNT(*)=2 FROM t1;
+COUNT(*)=2
+1
+SELECT COUNT(*)=3 FROM information_schema.columns WHERE table_name = 't1';
+COUNT(*)=3
+1
+connection node_1;
+BACKUP STAGE END;
+connection node_1a;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT COUNT(*)=4 FROM t1;
+COUNT(*)=4
+1
+SELECT COUNT(*)=5 FROM information_schema.columns WHERE table_name = 't1';
+COUNT(*)=5
+1
+connection node_2;
+SELECT COUNT(*)=4 FROM t1;
+COUNT(*)=4
+1
+SELECT COUNT(*)=5 FROM information_schema.columns WHERE table_name = 't1';
+COUNT(*)=5
+1
+connection node_1;
+DROP TABLE t1;
+call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
+call mtr.add_suppression("greater than drain seqno");
diff --git a/mysql-test/suite/galera/r/galera_bf_abort.result b/mysql-test/suite/galera/r/galera_bf_abort.result
index c2e89965fce..cb4a27c82fd 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
@@ -9,7 +11,7 @@ INSERT INTO t1 VALUES (1,'node_1');
connection node_2a;
connection node_2;
INSERT INTO t1 VALUES (2, 'node_2');
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_at_after_statement.result b/mysql-test/suite/galera/r/galera_bf_abort_at_after_statement.result
new file mode 100644
index 00000000000..71eeb6861ea
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_bf_abort_at_after_statement.result
@@ -0,0 +1,27 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (id INT PRIMARY KEY, val INT);
+INSERT INTO t1 VALUES (1, 1);
+connection node_2;
+SET DEBUG_SYNC = 'RESET';
+START TRANSACTION;
+SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked WAIT_FOR continue';
+UPDATE t1 SET val=2 WHERE id=1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+SET DEBUG_SYNC = 'now WAIT_FOR blocked';
+connection node_1;
+UPDATE t1 SET val=3 WHERE id=1;
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+set session wsrep_sync_wait=0;
+connection node_2a;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_2;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+SET DEBUG_SYNC = 'RESET';
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+disconnect node_2a;
+disconnect node_2b;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
index 7b98c807efb..1150a9fff63 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result
index ec8bddb087a..7dd3053b7bb 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 10);
connection node_1;
@@ -10,7 +12,7 @@ UPDATE t1 SET f1 = 2;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_bf_aborts_diff
1
connection node_1;
@@ -23,7 +25,7 @@ UPDATE t1 SET f2 = 20;
connection node_1a;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_bf_aborts_diff
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result b/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result
index ae1ca6d2157..43ca6089d78 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
index 8c6c7b7d7a4..0ef2a1a72c6 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2a;
SELECT GET_LOCK("foo", 1000);
@@ -10,7 +12,7 @@ SELECT GET_LOCK("foo", 1000);;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_group_commit.result b/mysql-test/suite/galera/r/galera_bf_abort_group_commit.result
new file mode 100644
index 00000000000..2a2ddd519f4
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_bf_abort_group_commit.result
@@ -0,0 +1,685 @@
+SET SESSION wsrep_sync_wait = 0;
+galera_sr_bf_abort_at_commit = 0
+after_replicate_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+galera_sr_bf_abort_at_commit = 1
+after_replicate_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+galera_sr_bf_abort_at_commit = 1
+after_replicate_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result b/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result
index 81b5816ddbe..e7882e43b6a 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_ps.result b/mysql-test/suite/galera/r/galera_bf_abort_ps.result
new file mode 100644
index 00000000000..42292cb20a0
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_bf_abort_ps.result
@@ -0,0 +1,16 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node_2');
+connection node_1;
+INSERT INTO t1 VALUES (1,'node_1');
+connection node_2a;
+connection node_2;
+INSERT INTO t1 VALUES (2, 'node_2');
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+wsrep_local_aborts_increment
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_ps_bind.result b/mysql-test/suite/galera/r/galera_bf_abort_ps_bind.result
new file mode 100644
index 00000000000..02f4dd25f7c
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_bf_abort_ps_bind.result
@@ -0,0 +1,38 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t (i int primary key auto_increment, j varchar(20) character set utf8);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+insert into t values (1, 'first');
+PS_prepare INSERT INTO t(j) VALUES (?);;
+PS_bind node1;
+PS_execute;
+PS_execute;
+select * from t;
+i j
+1 first
+3 node1
+5 node1
+PS_close;
+PS_prepare INSERT INTO t(j) VALUES (?);;
+PS_bind node1;
+begin;
+update t set j='node1' where i=1;
+connection node_2;
+update t set j='node2' where i=1;
+connection node_1a;
+connection node_1;
+PS_execute;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+PS_execute;
+commit;
+PS_close;
+select * from t;
+i j
+1 node2
+3 node1
+5 node1
+7 node1
+drop table t;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_ps_threadpool.result b/mysql-test/suite/galera/r/galera_bf_abort_ps_threadpool.result
new file mode 100644
index 00000000000..7482e76778e
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_bf_abort_ps_threadpool.result
@@ -0,0 +1,22 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node_2');
+connection node_2a;
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
+connection node_1;
+INSERT INTO t1 VALUES (1,'node_1');
+connection node_2a;
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_2;
+SET DEBUG_SYNC = "wsrep_before_before_command SIGNAL signal.wsrep_apply_cb WAIT_FOR bf_abort";
+INSERT INTO t1 VALUES (2, 'node_2');
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+wsrep_local_aborts_increment
+1
+SET DEBUG_SYNC = 'RESET';
+SET GLOBAL debug_dbug = DEFAULT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
index bf77fd7eae7..5707b68e190 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_sleep.result b/mysql-test/suite/galera/r/galera_bf_abort_sleep.result
index 9cd6abad5a1..00d6600d264 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_sleep.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_sleep.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
@@ -6,7 +8,7 @@ SELECT SLEEP(1000);;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_background_statistics.result b/mysql-test/suite/galera/r/galera_bf_background_statistics.result
index c2c3fce2b14..a8c8842b8e1 100644
--- a/mysql-test/suite/galera/r/galera_bf_background_statistics.result
+++ b/mysql-test/suite/galera/r/galera_bf_background_statistics.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT @@innodb_stats_persistent;
@@innodb_stats_persistent
1
@@ -27,7 +29,7 @@ SELECT SLEEP(1000);;
connection node_1;
ALTER TABLE t1 CHANGE f2 f2 INTEGER NOT NULL DEFAULT 1;
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_kill.result b/mysql-test/suite/galera/r/galera_bf_kill.result
index 2c2e72db1e4..3738e8c9684 100644
--- a/mysql-test/suite/galera/r/galera_bf_kill.result
+++ b/mysql-test/suite/galera/r/galera_bf_kill.result
@@ -1,4 +1,6 @@
connection node_2;
+connection node_1;
+connection node_2;
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB;
insert into t1 values (NULL,1);
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
@@ -46,5 +48,26 @@ a b
2 1
disconnect node_2a;
disconnect node_2b;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_on=OFF;
+begin;
+update t1 set a =5, b=2;
+connection node_2;
+ALTER TABLE t1 ADD UNIQUE KEY b3(b);
+select * from t1;
+a b
+2 1
+disconnect node_2a;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_on=OFF;
+begin;
+update t1 set a =5, b=2;
+connection node_2;
+select * from t1;
+a b
+2 1
+disconnect node_2a;
connection node_1;
drop table t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_lock_wait.result b/mysql-test/suite/galera/r/galera_bf_lock_wait.result
index 0b22f963b29..757fbf50cad 100644
--- a/mysql-test/suite/galera/r/galera_bf_lock_wait.result
+++ b/mysql-test/suite/galera/r/galera_bf_lock_wait.result
@@ -1,4 +1,9 @@
+connection node_2;
+connection node_1;
+connection node_2;
+call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
connection node_1;
+call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
CREATE TABLE t1 ENGINE=InnoDB select 1 as a, 1 as b union select 2, 2;
ALTER TABLE t1 add primary key(a);
CREATE PROCEDURE p1(repeat_count INT)
diff --git a/mysql-test/suite/galera/r/galera_binlog_cache_size.result b/mysql-test/suite/galera/r/galera_binlog_cache_size.result
index 6aac74ab5f0..c5a09074537 100644
--- a/mysql-test/suite/galera/r/galera_binlog_cache_size.result
+++ b/mysql-test/suite/galera/r/galera_binlog_cache_size.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(767)) ENGINE=InnoDB;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_binlog_checksum.result b/mysql-test/suite/galera/r/galera_binlog_checksum.result
index 7303aa61122..3ef7cf5c41e 100644
--- a/mysql-test/suite/galera/r/galera_binlog_checksum.result
+++ b/mysql-test/suite/galera/r/galera_binlog_checksum.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result b/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result
index 46582ff5c4b..b513c491bb0 100644
--- a/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result
+++ b/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 VARCHAR(1000));
diff --git a/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result b/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result
index 7b88af5d5af..6c2279bece0 100644
--- a/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result
+++ b/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(1000));
INSERT INTO t1 VALUES (REPEAT('x', 1000));
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_binlog_row_image.result b/mysql-test/suite/galera/r/galera_binlog_row_image.result
index d54db61105e..20e6bd9fab8 100644
--- a/mysql-test/suite/galera/r/galera_binlog_row_image.result
+++ b/mysql-test/suite/galera/r/galera_binlog_row_image.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION binlog_row_image=minimal;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
index 816f947665c..4fe33674701 100644
--- a/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
+++ b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET GLOBAL auto_increment_offset=1;
connection node_2;
@@ -17,10 +19,14 @@ Variable_name Value
auto_increment_increment 2
auto_increment_offset 1
insert into t1(i) values(null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
@@ -58,10 +64,14 @@ Variable_name Value
auto_increment_increment 3
auto_increment_offset 1
insert into t1(i) values(null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
diff --git a/mysql-test/suite/galera/r/galera_change_user.result b/mysql-test/suite/galera/r/galera_change_user.result
new file mode 100644
index 00000000000..3be9c956a28
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_change_user.result
@@ -0,0 +1,14 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE USER user1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1;
+disconnect node_1a;
+connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+disconnect node_1a;
+connection node_1;
+DROP TABLE t1;
+DROP USER user1;
diff --git a/mysql-test/suite/galera/r/galera_commit_empty.result b/mysql-test/suite/galera/r/galera_commit_empty.result
new file mode 100644
index 00000000000..75b94c54b1e
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_commit_empty.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+START TRANSACTION;
+COMMIT;
+START TRANSACTION;
+COMMIT;
+START TRANSACTION READ ONLY;
+COMMIT;
+START TRANSACTION;
+COMMIT;
+START TRANSACTION;
+START TRANSACTION;
+COMMIT;
+wsrep_last_committed_diff
+1
diff --git a/mysql-test/suite/galera/r/galera_concurrent_ctas.result b/mysql-test/suite/galera/r/galera_concurrent_ctas.result
index 8a3ac1ae0d3..39c55277c52 100644
--- a/mysql-test/suite/galera/r/galera_concurrent_ctas.result
+++ b/mysql-test/suite/galera/r/galera_concurrent_ctas.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/galera_create_function.result b/mysql-test/suite/galera/r/galera_create_function.result
index 9118c2864f3..85fa85d81f1 100644
--- a/mysql-test/suite/galera/r/galera_create_function.result
+++ b/mysql-test/suite/galera/r/galera_create_function.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE USER 'user1';
CREATE
diff --git a/mysql-test/suite/galera/r/galera_create_procedure.result b/mysql-test/suite/galera/r/galera_create_procedure.result
index 98dc4a856dc..24a0bd66b39 100644
--- a/mysql-test/suite/galera/r/galera_create_procedure.result
+++ b/mysql-test/suite/galera/r/galera_create_procedure.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE USER 'user1';
CREATE TABLE t1 (f1 INTEGER);
diff --git a/mysql-test/suite/galera/r/galera_create_table_as_select.result b/mysql-test/suite/galera/r/galera_create_table_as_select.result
new file mode 100644
index 00000000000..6f65ee99f0a
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_create_table_as_select.result
@@ -0,0 +1,103 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET SESSION default_storage_engine=InnoDB;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 AS SELECT * FROM t2;
+ERROR 42S01: Table 't1' already exists
+DROP TABLE t1,t2;
+CREATE TABLE t1 AS SELECT * FROM t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+CREATE TABLE t1 AS SELECT 1 FROM DUAL;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_1;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 AS SELECT * FROM t2;
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1,t2;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT * FROM t2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1,t2;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT MAX(f1) AS f1 FROM t2;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT f1 = 5 FROM t1;
+f1 = 5
+1
+connection node_1;
+DROP TABLE t1,t2;
+connection node_1;
+CREATE PROCEDURE sp1 ()
+BEGIN
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT * FROM t2;
+END|
+CALL sp1();
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1, t2;
+DROP PROCEDURE sp1;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT * FROM t2';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+LOCK TABLE t2 WRITE;
+connection node_1;
+CREATE TABLE t1 AS SELECT * FROM t2;;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t2;
+COUNT(*) = 5
+1
+CREATE TABLE t1 AS SELECT * FROM t2;
+connection node_1a;
+UNLOCK TABLES;
+connection node_1;
+Got one of the listed errors
+DROP TABLE t1, t2;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM t2;
+connection node_2;
+SELECT * FROM t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query");
+connection node_1;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/r/galera_create_table_like.result b/mysql-test/suite/galera/r/galera_create_table_like.result
index 128931381d4..d1633077dcb 100644
--- a/mysql-test/suite/galera/r/galera_create_table_like.result
+++ b/mysql-test/suite/galera/r/galera_create_table_like.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE SCHEMA schema1;
CREATE SCHEMA schema2;
USE schema1;
diff --git a/mysql-test/suite/galera/r/galera_create_trigger.result b/mysql-test/suite/galera/r/galera_create_trigger.result
index d07a007543e..56b35150d87 100644
--- a/mysql-test/suite/galera/r/galera_create_trigger.result
+++ b/mysql-test/suite/galera/r/galera_create_trigger.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE definer_root (f1 INTEGER, trigger_user VARCHAR(100)) ENGINE=InnoDB;
CREATE TABLE definer_user (f1 INTEGER, trigger_user VARCHAR(100)) ENGINE=InnoDB;
CREATE TABLE definer_current_user (f1 INTEGER, trigger_user VARCHAR(100)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_ctas.result b/mysql-test/suite/galera/r/galera_ctas.result
new file mode 100644
index 00000000000..f044f807410
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ctas.result
@@ -0,0 +1,88 @@
+connection node_2;
+connection node_1;
+connection node_1;
+create table t1_Aria(a int, count int, b int, key(b)) engine=Aria;
+INSERT INTO t1_Aria values (1,1,1);
+create table t1_MyISAM(a int, count int, b int, key(b)) engine=MyISAM;
+INSERT INTO t1_MyISAM values (1,1,1);
+create table t1_InnoDB(a int, count int, b int, key(b)) engine=InnoDB;
+INSERT INTO t1_InnoDB values (1,1,1);
+SET SESSION default_storage_engine=MyISAM;
+CREATE TABLE t2 AS SELECT * FROM t1_Aria;
+CREATE TABLE t3 AS SELECT * FROM t1_MyISAM;
+CREATE TABLE t4 AS SELECT * FROM t1_InnoDB;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2, t3,t4;
+SET SESSION default_storage_engine=Aria;
+CREATE TABLE t2 AS SELECT * FROM t1_Aria;
+CREATE TABLE t3 AS SELECT * FROM t1_MyISAM;
+CREATE TABLE t4 AS SELECT * FROM t1_InnoDB;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
+DROP TABLE t2, t3,t4;
+SET SESSION default_storage_engine=InnoDB;
+CREATE TABLE t2 AS SELECT * FROM t1_Aria;
+CREATE TABLE t3 AS SELECT * FROM t1_MyISAM;
+CREATE TABLE t4 AS SELECT * FROM t1_InnoDB;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t4;
+Table Create Table
+t4 CREATE TABLE `t4` (
+ `a` int(11) DEFAULT NULL,
+ `count` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t2, t3,t4;
+DROP TABLE t1_MyISAM, t1_Aria,t1_InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_ddl_fk_conflict.result b/mysql-test/suite/galera/r/galera_ddl_fk_conflict.result
new file mode 100644
index 00000000000..03e84f9facd
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ddl_fk_conflict.result
@@ -0,0 +1,274 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION wsrep_sync_wait=0;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
+SET SESSION wsrep_sync_wait=0;
+######################################################################
+# Test for ALTER ENGINE=INNODB
+######################################################################
+######################################################################
+#
+# Scenario #1: DML working on FK parent table BF aborted by DDL
+# over child table
+#
+######################################################################
+connection node_1;
+SET SESSION wsrep_sync_wait=0;
+CREATE TABLE p1 (pk INTEGER PRIMARY KEY, f2 CHAR(30));
+INSERT INTO p1 VALUES (1, 'INITIAL VALUE');
+CREATE TABLE p2 (pk INTEGER PRIMARY KEY, f2 CHAR(30));
+INSERT INTO p2 VALUES (1, 'INITIAL VALUE');
+INSERT INTO p2 VALUES (2, 'INITIAL VALUE');
+CREATE TABLE c1 (pk INTEGER PRIMARY KEY, fk INTEGER, FOREIGN KEY (fk) REFERENCES p1(pk));
+INSERT INTO c1 VALUES (1,1);
+CREATE TABLE c2 (pk INTEGER PRIMARY KEY, fk1 INTEGER, fk2 INTEGER, FOREIGN KEY (fk1) REFERENCES p1(pk), FOREIGN KEY (fk2) REFERENCES p2(pk));
+INSERT INTO c2 VALUES (1,1,1), (2,1,2);
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+connection node_2;
+SET SESSION wsrep_sync_wait=0;
+ALTER TABLE c1 ENGINE=INNODB;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+######################################################################
+#
+# Scenario #2: DML working on FK parent table tries to replicate, but
+# fails in certification for earlier DDL on child table
+#
+######################################################################
+connection node_1;
+BEGIN;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+ALTER TABLE c1 ENGINE=INNODB;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+COMMIT;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT 'I deadlocked';
+I deadlocked
+I deadlocked
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+######################################################################
+#
+# Scenario #3: 2 DMLs working on two FK parent tables try to replicate,
+# but fails in certification for earlier DDL on child table
+# which is child to both FK parents
+#
+######################################################################
+connection node_1;
+BEGIN;
+connection node_1b;
+BEGIN;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+ALTER TABLE c2 ENGINE=INNODB;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+COMMIT;
+connection node_1b;
+UPDATE p2 SET f2 = 'TO DEADLOCK' WHERE pk = 2;
+COMMIT;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT 'I deadlocked';
+I deadlocked
+I deadlocked
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT 'I deadlocked';
+I deadlocked
+I deadlocked
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+DROP TABLE c1, c2;
+DROP TABLE p1, p2;
+######################################################################
+# Test for TRUNCATE
+######################################################################
+######################################################################
+#
+# Scenario #1: DML working on FK parent table BF aborted by DDL
+# over child table
+#
+######################################################################
+connection node_1;
+SET SESSION wsrep_sync_wait=0;
+CREATE TABLE p1 (pk INTEGER PRIMARY KEY, f2 CHAR(30));
+INSERT INTO p1 VALUES (1, 'INITIAL VALUE');
+CREATE TABLE p2 (pk INTEGER PRIMARY KEY, f2 CHAR(30));
+INSERT INTO p2 VALUES (1, 'INITIAL VALUE');
+INSERT INTO p2 VALUES (2, 'INITIAL VALUE');
+CREATE TABLE c1 (pk INTEGER PRIMARY KEY, fk INTEGER, FOREIGN KEY (fk) REFERENCES p1(pk));
+INSERT INTO c1 VALUES (1,1);
+CREATE TABLE c2 (pk INTEGER PRIMARY KEY, fk1 INTEGER, fk2 INTEGER, FOREIGN KEY (fk1) REFERENCES p1(pk), FOREIGN KEY (fk2) REFERENCES p2(pk));
+INSERT INTO c2 VALUES (1,1,1), (2,1,2);
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+connection node_2;
+SET SESSION wsrep_sync_wait=0;
+TRUNCATE TABLE c1 ;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+######################################################################
+#
+# Scenario #2: DML working on FK parent table tries to replicate, but
+# fails in certification for earlier DDL on child table
+#
+######################################################################
+connection node_1;
+BEGIN;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+TRUNCATE TABLE c1 ;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+COMMIT;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT 'I deadlocked';
+I deadlocked
+I deadlocked
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+######################################################################
+#
+# Scenario #3: 2 DMLs working on two FK parent tables try to replicate,
+# but fails in certification for earlier DDL on child table
+# which is child to both FK parents
+#
+######################################################################
+connection node_1;
+BEGIN;
+connection node_1b;
+BEGIN;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+TRUNCATE TABLE c2 ;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+COMMIT;
+connection node_1b;
+UPDATE p2 SET f2 = 'TO DEADLOCK' WHERE pk = 2;
+COMMIT;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT 'I deadlocked';
+I deadlocked
+I deadlocked
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT 'I deadlocked';
+I deadlocked
+I deadlocked
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+EXPECT_1
+1
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+EXPECT_2
+2
+DROP TABLE c1, c2;
+DROP TABLE p1, p2;
diff --git a/mysql-test/suite/galera/r/galera_ddl_fk_no_conflict.result b/mysql-test/suite/galera/r/galera_ddl_fk_no_conflict.result
new file mode 100644
index 00000000000..43046922143
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ddl_fk_no_conflict.result
@@ -0,0 +1,330 @@
+connection node_2;
+connection node_1;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+OPTIMIZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child optimize note Table does not support optimize, doing recreate + analyze instead
+test.child optimize status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+OPTIMIZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child optimize note Table does not support optimize, doing recreate + analyze instead
+test.child optimize status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+OPTIMIZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child optimize note Table does not support optimize, doing recreate + analyze instead
+test.child optimize status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+OPTIMIZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child optimize note Table does not support optimize, doing recreate + analyze instead
+test.child optimize status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+REPAIR TABLE child;;
+Table Op Msg_type Msg_text
+test.child repair note The storage engine for the table doesn't support repair
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+REPAIR TABLE child;;
+Table Op Msg_type Msg_text
+test.child repair note The storage engine for the table doesn't support repair
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+REPAIR TABLE child;;
+Table Op Msg_type Msg_text
+test.child repair note The storage engine for the table doesn't support repair
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+REPAIR TABLE child;;
+Table Op Msg_type Msg_text
+test.child repair note The storage engine for the table doesn't support repair
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+CHECK TABLE child;;
+Table Op Msg_type Msg_text
+test.child check status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+CHECK TABLE child;;
+Table Op Msg_type Msg_text
+test.child check status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+CHECK TABLE child;;
+Table Op Msg_type Msg_text
+test.child check status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+CHECK TABLE child;;
+Table Op Msg_type Msg_text
+test.child check status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) );
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ANALYZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child analyze status Engine-independent statistics collected
+test.child analyze status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ANALYZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child analyze status Engine-independent statistics collected
+test.child analyze status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ANALYZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child analyze status Engine-independent statistics collected
+test.child analyze status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) ON UPDATE CASCADE ON DELETE CASCADE);
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+connection node_1;
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+pk
+1
+2
+3
+4
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ANALYZE TABLE child;;
+Table Op Msg_type Msg_text
+test.child analyze status Engine-independent statistics collected
+test.child analyze status OK
+connection node_1;
+COMMIT;
+DROP TABLE child, parent;
+disconnect node_1a;
diff --git a/mysql-test/suite/galera/r/galera_ddl_multiline.result b/mysql-test/suite/galera/r/galera_ddl_multiline.result
index 339a91125eb..9e70731a62b 100644
--- a/mysql-test/suite/galera/r/galera_ddl_multiline.result
+++ b/mysql-test/suite/galera/r/galera_ddl_multiline.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index e7a2508c0f3..9a5c1e54b06 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -1,6 +1,9 @@
-SELECT COUNT(*) = 43 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
-COUNT(*) = 43
-0
+connection node_2;
+connection node_1;
+# Correct Galera library found
+SELECT COUNT(*) `expect 49` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+expect 49
+49
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME LIKE 'wsrep_%'
@@ -25,14 +28,15 @@ WSREP_CLUSTER_ADDRESS gcomm://
WSREP_CLUSTER_NAME my_wsrep_cluster
WSREP_CONVERT_LOCK_TO_TRX OFF
WSREP_DBUG_OPTION
-WSREP_DEBUG OFF
+WSREP_DEBUG NONE
WSREP_DESYNC OFF
WSREP_DIRTY_READS OFF
WSREP_DRUPAL_282555_WORKAROUND OFF
WSREP_FORCED_BINLOG_FORMAT NONE
WSREP_GTID_DOMAIN_ID 0
WSREP_GTID_MODE OFF
-WSREP_LOAD_DATA_SPLITTING ON
+WSREP_IGNORE_APPLY_ERRORS 7
+WSREP_LOAD_DATA_SPLITTING OFF
WSREP_LOG_CONFLICTS OFF
WSREP_MAX_WS_ROWS 0
WSREP_MAX_WS_SIZE 2147483647
@@ -48,8 +52,11 @@ WSREP_RETRY_AUTOCOMMIT 1
WSREP_SLAVE_FK_CHECKS ON
WSREP_SLAVE_THREADS 1
WSREP_SLAVE_UK_CHECKS OFF
+WSREP_SR_STORE table
WSREP_SST_AUTH
WSREP_SST_DONOR
WSREP_SST_DONOR_REJECTS_QUERIES OFF
WSREP_SST_METHOD rsync
WSREP_SYNC_WAIT 15
+WSREP_TRX_FRAGMENT_SIZE 0
+WSREP_TRX_FRAGMENT_UNIT bytes
diff --git a/mysql-test/suite/galera/r/galera_delete_limit.result b/mysql-test/suite/galera/r/galera_delete_limit.result
index f6fb2e56346..9898bfcf169 100644
--- a/mysql-test/suite/galera/r/galera_delete_limit.result
+++ b/mysql-test/suite/galera/r/galera_delete_limit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_desync_overlapped.result b/mysql-test/suite/galera/r/galera_desync_overlapped.result
index f9920e7f7ad..e3f40d444ee 100644
--- a/mysql-test/suite/galera/r/galera_desync_overlapped.result
+++ b/mysql-test/suite/galera/r/galera_desync_overlapped.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_drop_database.result b/mysql-test/suite/galera/r/galera_drop_database.result
index 794e934206f..03b55136c6f 100644
--- a/mysql-test/suite/galera/r/galera_drop_database.result
+++ b/mysql-test/suite/galera/r/galera_drop_database.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
CREATE DATABASE fts;
diff --git a/mysql-test/suite/galera/r/galera_drop_multi.result b/mysql-test/suite/galera/r/galera_drop_multi.result
index 7793ef93b90..1ff8afe3219 100644
--- a/mysql-test/suite/galera/r/galera_drop_multi.result
+++ b/mysql-test/suite/galera/r/galera_drop_multi.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result b/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result
index 38480d186ba..fdfca3316b1 100644
--- a/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result
+++ b/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
diff --git a/mysql-test/suite/galera/r/galera_enum.result b/mysql-test/suite/galera/r/galera_enum.result
index a2a6317e2a0..40fc6931f6a 100644
--- a/mysql-test/suite/galera/r/galera_enum.result
+++ b/mysql-test/suite/galera/r/galera_enum.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 ENUM('', 'one', 'two'), KEY (f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('');
@@ -38,7 +40,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1;
SELECT COUNT(*) FROM t1 WHERE f1 = 'three';
COUNT(*)
diff --git a/mysql-test/suite/galera/r/galera_events.result b/mysql-test/suite/galera/r/galera_events.result
index e925e62cb91..373f063c2bd 100644
--- a/mysql-test/suite/galera/r/galera_events.result
+++ b/mysql-test/suite/galera/r/galera_events.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE EVENT event1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT 1;
Warnings:
diff --git a/mysql-test/suite/galera/r/galera_events2.result b/mysql-test/suite/galera/r/galera_events2.result
index 8fb98e03fab..26d3a74a7f3 100644
--- a/mysql-test/suite/galera/r/galera_events2.result
+++ b/mysql-test/suite/galera/r/galera_events2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result
index ba5feadb1ff..9bb004d0ed8 100644
--- a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result
+++ b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# test phase with cascading foreign key through 3 tables
#
@@ -46,3 +48,113 @@ id parent_id
DROP TABLE child;
DROP TABLE parent;
DROP TABLE grandparent;
+
+Scenario 2, testing PA applying with FK cascade delete
+
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ON DELETE CASCADE,
+CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ON DELETE CASCADE);
+connection node_2;
+set global wsrep_slave_threads=DEFAULT;
+SELECT * FROM p1;
+f1 f2
+SELECT * FROM p2;
+f1 f2
+SELECT * FROM c;
+f1 p1_id p2_id f2
+connection node_1;
+DROP TABLE c;
+DROP TABLE p1,p2;
+
+Scenario 4, testing PA applying with FK cascade delete on
+more than one level
+
+CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1)
+ON DELETE CASCADE
+) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1)
+ON DELETE CASCADE
+) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ON DELETE CASCADE,
+CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ON DELETE CASCADE) ENGINE=INNODB;
+connection node_2;
+set global wsrep_slave_threads=DEFAULT;
+SELECT * FROM gp1;
+f1 f2
+SELECT * FROM gp2;
+f1 f2
+SELECT * FROM p1;
+f1 p1_id p2_id f2
+SELECT * FROM p2;
+f1 p1_id p2_id f2
+SELECT * FROM c;
+f1 p1_id p2_id f2
+connection node_1;
+DROP TABLE c;
+DROP TABLE p1,p2;
+DROP TABLE gp1,gp2;
+
+Scenario 3, testing PA applying with FK cascade delete on
+more than one level in a diamond topology
+
+CREATE TABLE ggp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT pfk_6 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1)
+ON DELETE CASCADE
+) ENGINE=INNODB;
+CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT pfk_5 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1)
+ON DELETE CASCADE
+) ENGINE=INNODB;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1)
+ON DELETE CASCADE
+) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1)
+ON DELETE CASCADE
+) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ON DELETE CASCADE,
+CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ON DELETE CASCADE) ENGINE=INNODB;
+connection node_2;
+set global wsrep_slave_threads=DEFAULT;
+SELECT * FROM ggp1;
+f1 f2
+SELECT * FROM gp2;
+f1 p1_id p2_id f2
+SELECT * FROM gp1;
+f1 p1_id p2_id f2
+SELECT * FROM p1;
+f1 p1_id p2_id f2
+SELECT * FROM p2;
+f1 p1_id p2_id f2
+SELECT * FROM c;
+f1 p1_id p2_id f2
+connection node_1;
+DROP TABLE c;
+DROP TABLE p1,p2;
+DROP TABLE gp1,gp2;
+DROP TABLE ggp1;
diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result b/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result
index e2879c30a98..e545da53855 100644
--- a/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result
+++ b/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# test phase with foreign key of varchar type
#
diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_update.result b/mysql-test/suite/galera/r/galera_fk_cascade_update.result
index 5fe8b532473..5294826a8f9 100644
--- a/mysql-test/suite/galera/r/galera_fk_cascade_update.result
+++ b/mysql-test/suite/galera/r/galera_fk_cascade_update.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE grandparent (
id INT NOT NULL PRIMARY KEY
) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_fk_conflict.result b/mysql-test/suite/galera/r/galera_fk_conflict.result
index a08aa30a82e..f9f151abce4 100644
--- a/mysql-test/suite/galera/r/galera_fk_conflict.result
+++ b/mysql-test/suite/galera/r/galera_fk_conflict.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT PRIMARY KEY,
KEY (id)
@@ -22,6 +24,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE child;
DROP TABLE parent;
diff --git a/mysql-test/suite/galera/r/galera_fk_lock_wait.result b/mysql-test/suite/galera/r/galera_fk_lock_wait.result
index 7bbbf40cb29..0d87aa2aa57 100644
--- a/mysql-test/suite/galera/r/galera_fk_lock_wait.result
+++ b/mysql-test/suite/galera/r/galera_fk_lock_wait.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent(parent_id int not null AUTO_INCREMENT PRIMARY KEY,
parent_name varchar(80)) ENGINE=InnoDB;
CREATE TABLE child(child_id int not null AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/galera/r/galera_fk_mismatch.result b/mysql-test/suite/galera/r/galera_fk_mismatch.result
index bdc60c9e099..a030b1214c5 100644
--- a/mysql-test/suite/galera/r/galera_fk_mismatch.result
+++ b/mysql-test/suite/galera/r/galera_fk_mismatch.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id1 INT,
id2 INT,
diff --git a/mysql-test/suite/galera/r/galera_fk_multibyte.result b/mysql-test/suite/galera/r/galera_fk_multibyte.result
index dfb3b86ff38..f035d324394 100644
--- a/mysql-test/suite/galera/r/galera_fk_multibyte.result
+++ b/mysql-test/suite/galera/r/galera_fk_multibyte.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
create table p (i varchar(100) primary key, j int) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table c1 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk1 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table c2 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk2 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/mysql-test/suite/galera/r/galera_fk_multicolumn.result b/mysql-test/suite/galera/r/galera_fk_multicolumn.result
index f5b6aa23692..b626d963af8 100644
--- a/mysql-test/suite/galera/r/galera_fk_multicolumn.result
+++ b/mysql-test/suite/galera/r/galera_fk_multicolumn.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t0 (
f1 INT PRIMARY KEY,
f2 INT UNIQUE
diff --git a/mysql-test/suite/galera/r/galera_fk_multitable.result b/mysql-test/suite/galera/r/galera_fk_multitable.result
index 04ff7adc3e9..83e1491ab34 100644
--- a/mysql-test/suite/galera/r/galera_fk_multitable.result
+++ b/mysql-test/suite/galera/r/galera_fk_multitable.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t0 (
f0 INT PRIMARY KEY
);
diff --git a/mysql-test/suite/galera/r/galera_fk_no_pk.result b/mysql-test/suite/galera/r/galera_fk_no_pk.result
index e7b5f0b2b64..622e63dbb8f 100644
--- a/mysql-test/suite/galera/r/galera_fk_no_pk.result
+++ b/mysql-test/suite/galera/r/galera_fk_no_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT,
KEY (id)
diff --git a/mysql-test/suite/galera/r/galera_fk_selfreferential.result b/mysql-test/suite/galera/r/galera_fk_selfreferential.result
index 3b4dbf2a8e9..9a64521e7b8 100644
--- a/mysql-test/suite/galera/r/galera_fk_selfreferential.result
+++ b/mysql-test/suite/galera/r/galera_fk_selfreferential.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (
f1 INT NOT NULL PRIMARY KEY,
f2 INT,
diff --git a/mysql-test/suite/galera/r/galera_fk_setnull.result b/mysql-test/suite/galera/r/galera_fk_setnull.result
index d4f20fe60a3..afb3fc3b9b8 100644
--- a/mysql-test/suite/galera/r/galera_fk_setnull.result
+++ b/mysql-test/suite/galera/r/galera_fk_setnull.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT NOT NULL,
PRIMARY KEY (id)
diff --git a/mysql-test/suite/galera/r/galera_fk_truncate.result b/mysql-test/suite/galera/r/galera_fk_truncate.result
new file mode 100644
index 00000000000..a90f3e27ab7
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_fk_truncate.result
@@ -0,0 +1,47 @@
+connection node_2;
+connection node_1;
+CREATE TABLE author (
+id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+name VARCHAR(100) NOT NULL
+) ENGINE = InnoDB;
+CREATE TABLE book (
+id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+title VARCHAR(200) NOT NULL,
+author_id SMALLINT UNSIGNED NOT NULL,
+CONSTRAINT `fk_book_author`
+ FOREIGN KEY (author_id) REFERENCES author (id)
+ON DELETE CASCADE
+ON UPDATE RESTRICT
+) ENGINE = InnoDB;
+INSERT INTO author (name) VALUES ('Abdul Alhazred');
+INSERT INTO book (title, author_id) VALUES ('Necronomicon', LAST_INSERT_ID());
+TRUNCATE TABLE book;
+SELECT * FROM author;
+id name
+1 Abdul Alhazred
+SELECT * FROM book;
+id title author_id
+connection node_2;
+SELECT * FROM author;
+id name
+1 Abdul Alhazred
+SELECT * FROM book;
+id title author_id
+INSERT INTO author (name) VALUES ('Abdul Alhazred');
+INSERT INTO book (title, author_id) VALUES ('Necronomicon', LAST_INSERT_ID());
+TRUNCATE TABLE book;
+SELECT * FROM author;
+id name
+1 Abdul Alhazred
+2 Abdul Alhazred
+SELECT * FROM book;
+id title author_id
+connection node_1;
+TRUNCATE TABLE book;
+SELECT * FROM author;
+id name
+1 Abdul Alhazred
+2 Abdul Alhazred
+SELECT * FROM book;
+id title author_id
+DROP TABLE book, author;
diff --git a/mysql-test/suite/galera/r/galera_flush_local.result b/mysql-test/suite/galera/r/galera_flush_local.result
index a8e798a693d..146833fc3c8 100644
--- a/mysql-test/suite/galera/r/galera_flush_local.result
+++ b/mysql-test/suite/galera/r/galera_flush_local.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
DROP TABLE IF EXISTS t1, t2, x1, x2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
@@ -45,7 +47,9 @@ UNLOCK TABLES;
FLUSH LOCAL TABLES t1;
ANALYZE LOCAL TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
OPTIMIZE LOCAL TABLE t1, t2;
Table Op Msg_type Msg_text
@@ -120,7 +124,9 @@ UNLOCK TABLES;
FLUSH TABLES t1;
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
OPTIMIZE TABLE t1, t2;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format.result b/mysql-test/suite/galera/r/galera_forced_binlog_format.result
index 3653a311d83..4132d32c418 100644
--- a/mysql-test/suite/galera/r/galera_forced_binlog_format.result
+++ b/mysql-test/suite/galera/r/galera_forced_binlog_format.result
@@ -1,7 +1,10 @@
+connection node_2;
connection node_1;
-SET SESSION wsrep_on=OFF;
+connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
-SET SESSION wsrep_on=ON;
+SET GLOBAL wsrep_on=ON;
+FLUSH BINARY LOGS;
SET SESSION binlog_format = 'STATEMENT';
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
@@ -11,18 +14,7 @@ SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
-mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
-mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
-mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
-mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
-mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
-mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
-mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
-mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
-mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
-mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
-mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
-mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Rotate 1 <End_log_pos> mysqld-bin.000002;pos=4
DROP TABLE t1;
#
# MDEV-9401: wsrep_forced_binlog_format with binlog causes crash
@@ -41,6 +33,4 @@ GRANT ALL PRIVILEGES ON `testdb_9401`.`t1` TO `dummy`@`localhost`
REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
DROP USER dummy@localhost;
DROP DATABASE testdb_9401;
-disconnect node_2;
-disconnect node_1;
# End of tests
diff --git a/mysql-test/suite/galera/r/galera_ftwrl.result b/mysql-test/suite/galera/r/galera_ftwrl.result
index 0565781c051..eae8028a7f4 100644
--- a/mysql-test/suite/galera/r/galera_ftwrl.result
+++ b/mysql-test/suite/galera/r/galera_ftwrl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
diff --git a/mysql-test/suite/galera/r/galera_ftwrl_drain.result b/mysql-test/suite/galera/r/galera_ftwrl_drain.result
index f90e6dfcdfd..aa1358a8bf7 100644
--- a/mysql-test/suite/galera/r/galera_ftwrl_drain.result
+++ b/mysql-test/suite/galera/r/galera_ftwrl_drain.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
@@ -22,7 +24,7 @@ connection node_2;
SET SESSION lock_wait_timeout = 1;
SET SESSION innodb_lock_wait_timeout=1;
SET SESSION wait_timeout=1;
-INSERT INTO t2 VALUES (2);
+INSERT INTO t1 VALUES (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
connection node_2a;
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/r/galera_fulltext.result b/mysql-test/suite/galera/r/galera_fulltext.result
index bb482b7f4f7..94780f235ad 100644
--- a/mysql-test/suite/galera/r/galera_fulltext.result
+++ b/mysql-test/suite/galera/r/galera_fulltext.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_gcache_recover.result b/mysql-test/suite/galera/r/galera_gcache_recover.result
index d3ba06c1333..819c595ece3 100644
--- a/mysql-test/suite/galera/r/galera_gcache_recover.result
+++ b/mysql-test/suite/galera/r/galera_gcache_recover.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_sync_wait = 0;
diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
index 9b8408b1b58..94825107741 100644
--- a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
+++ b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result
index 604b24a8fab..a0a45446eff 100644
--- a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result
+++ b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
index bf1a82f9f90..432cf87f66f 100644
--- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
+++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
@@ -1,7 +1,8 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,B INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1);
connection node_2;
-SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
diff --git a/mysql-test/suite/galera/r/galera_gcs_fragment.result b/mysql-test/suite/galera/r/galera_gcs_fragment.result
index 90d36146eeb..bdd749047ee 100644
--- a/mysql-test/suite/galera/r/galera_gcs_fragment.result
+++ b/mysql-test/suite/galera/r/galera_gcs_fragment.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 TEXT);
@@ -20,7 +22,7 @@ INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
connection node_1a;
SET GLOBAL wsrep_provider_options = 'signal=gcs_core_after_frag_send';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR HY000: Got error 6 "No such device or address" during COMMIT
INSERT INTO t1 VALUES (3, "cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
SELECT * FROM t1;
f1 f2
diff --git a/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result b/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result
index ce74f3db433..b97be5733ff 100644
--- a/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result
+++ b/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_gra_log.result b/mysql-test/suite/galera/r/galera_gra_log.result
index 777eda42046..33853188965 100644
--- a/mysql-test/suite/galera/r/galera_gra_log.result
+++ b/mysql-test/suite/galera/r/galera_gra_log.result
@@ -1,4 +1,6 @@
connection node_2;
+connection node_1;
+connection node_2;
SET SESSION wsrep_on=OFF;
CREATE TABLE t1 (f1 INTEGER);
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_gtid.result b/mysql-test/suite/galera/r/galera_gtid.result
index 0346abc5a6c..3f5c5960846 100644
--- a/mysql-test/suite/galera/r/galera_gtid.result
+++ b/mysql-test/suite/galera/r/galera_gtid.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_gtid_slave.result b/mysql-test/suite/galera/r/galera_gtid_slave.result
index f8ca6322d22..7a3048231af 100644
--- a/mysql-test/suite/galera/r/galera_gtid_slave.result
+++ b/mysql-test/suite/galera/r/galera_gtid_slave.result
@@ -1,7 +1,9 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -11,27 +13,31 @@ insert into t2 values(22);
commit;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4
+2-3-4
connection node_2;
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-2
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+0-2-2,2-3-4
+connection node_1;
INSERT INTO t1 VALUES(4);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-2,2-3-3
-connection node_1;
+1-1-1,2-3-4,2-2-6
+connection node_3;
DROP TABLE t1,t2;
connection node_2;
-connection node_3;
+connection node_1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
+SET GLOBAL wsrep_on=OFF;
reset master;
-connection node_3;
-reset master;
+SET GLOBAL wsrep_on=ON;
connection node_1;
+SET GLOBAL wsrep_on=OFF;
+reset master;
+SET GLOBAL wsrep_on=ON;
+connection node_3;
reset master;
diff --git a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
index 380a0235ac2..7c5519af495 100644
--- a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
+++ b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
@@ -1,38 +1,40 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
#Connection 2
connection node_2;
START SLAVE;
-#Connection 1
-connection node_1;
+#Connection 3
+connection node_3;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 int unique) ENGINE=InnoDB;
INSERT INTO t2 VALUES(1,11);
INSERT INTO t2 VALUES(2,22);
INSERT INTO t2 VALUES(3,33);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4
+2-3-4
include/save_master_gtid.inc
#Connection 2
connection node_2;
include/sync_with_master_gtid.inc
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4
+2-3-4
INSERT INTO t2 VALUES(4,44);
INSERT INTO t2 VALUES(5,55);
INSERT INTO t2 VALUES(6,66);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-3
-#Connection 3
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+0-2-3,2-3-4
+#Connection 1
+connection node_1;
INSERT INTO t2 VALUES(7,77);
INSERT INTO t2 VALUES(8,88);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-3,2-3-5
-#Connection 1
-connection node_1;
+1-1-2,2-3-4,2-2-7
+#Connection 3
+connection node_3;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -48,76 +50,78 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
-#Connection 3
-connection node_3;
+#Connection 1
+connection node_1;
+connection node_1;
connection node_2;
-connection node_3;
-Shutting down server ...
#Connection 2
connection node_2;
+Shutting down server ...
+#Connection 1
+connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
COMMIT;
-#Connection 3
-connection node_3;
+#Connection 2
+connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node3_committed_after');
-INSERT INTO t1 VALUES ('node3_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
-#Connection 2
-connection node_2;
+#Connection 1
+connection node_1;
Select * from t1 order by f1;
f1
node1_committed_before
node1_committed_before
node1_committed_during
node1_committed_during
+node2_committed_after
+node2_committed_after
node2_committed_before
node2_committed_before
-node3_committed_after
-node3_committed_after
-#Connection 3
-connection node_3;
+#Connection 2
+connection node_2;
Select * from t1 order by f1;
f1
node1_committed_before
node1_committed_before
node1_committed_during
node1_committed_during
+node2_committed_after
+node2_committed_after
node2_committed_before
node2_committed_before
-node3_committed_after
-node3_committed_after
+#Connection 1
+connection node_1;
+SELECT @@global.gtid_binlog_state;
+@@global.gtid_binlog_state
+1-1-3,2-3-6,2-2-9
#Connection 2
connection node_2;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-6,2-2-7,2-3-8
+0-1-7,0-2-8,2-3-6
#Connection 3
connection node_3;
-SELECT @@global.gtid_binlog_state;
-@@global.gtid_binlog_state
-1-1-6,2-2-7,2-3-8
-#Connection 1
-connection node_1;
SET AUTOCOMMIT=ON;
#Connection 2
connection node_2;
SET AUTOCOMMIT=ON;
-#Connection 3
-connection node_3;
+#Connection 1
+connection node_1;
SET AUTOCOMMIT=ON;
#Connection 2
connection node_2;
STOP slave;
INSERT INTO t1 VALUES ('node2_slave_stoped');
-#Connection 1
-connection node_1;
-INSERT INTO t1 VALUES ('node1_normal_entry');
+#Connection 3
+connection node_3;
+INSERT INTO t1 VALUES ('node3_normal_entry');
include/save_master_gtid.inc
#Connection 2
connection node_2;
@@ -130,31 +134,35 @@ count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-7,2-3-8,2-2-11
-#Connection 3
-connection node_3;
+0-1-7,0-2-11,2-3-7
+#Connection 1
+connection node_1;
SELECT count(*) from t1;
count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-7,2-3-8,2-2-11
-#Connection 1
-connection node_1;
+1-1-3,2-3-7,2-2-12
+#Connection 3
+connection node_3;
DROP TABLE t2,t1;
#Connection 2
connection node_2;
-#Connection 3
-connection node_3;
+#Connection 1
+connection node_1;
#Connection 2
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
set global gtid_slave_pos="";
+#Connection 1
+connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
#Connection 3
connection node_3;
reset master;
-#Connection 1
-connection node_1;
-reset master;
diff --git a/mysql-test/suite/galera/r/galera_inject_bf_long_wait.result b/mysql-test/suite/galera/r/galera_inject_bf_long_wait.result
index e9eab5401c4..eeacc9ab212 100644
--- a/mysql-test/suite/galera/r/galera_inject_bf_long_wait.result
+++ b/mysql-test/suite/galera/r/galera_inject_bf_long_wait.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB;
INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3);
BEGIN;
diff --git a/mysql-test/suite/galera/r/galera_insert_ignore.result b/mysql-test/suite/galera/r/galera_insert_ignore.result
index 7057affaa0e..417524240e7 100644
--- a/mysql-test/suite/galera/r/galera_insert_ignore.result
+++ b/mysql-test/suite/galera/r/galera_insert_ignore.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_sync_wait = 15;
connection node_2;
SET GLOBAL wsrep_sync_wait = 15;
diff --git a/mysql-test/suite/galera/r/galera_insert_multi.result b/mysql-test/suite/galera/r/galera_insert_multi.result
index 913dd42403a..d7a4f01873e 100644
--- a/mysql-test/suite/galera/r/galera_insert_multi.result
+++ b/mysql-test/suite/galera/r/galera_insert_multi.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
@@ -51,7 +53,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
INSERT INTO t1 VALUES (1), (2);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff
index f9f81ea3b40..96e5def88ff 100644
--- a/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff
@@ -1,27 +1,27 @@
--- r/galera_ist_MDEV-28423.result
+++ r/galera_ist_MDEV-28423.reject
-@@ -286,3 +286,111 @@
+@@ -517,3 +517,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result b/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result
index 80a28d349ba..5a71b490a80 100644
--- a/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result
@@ -1,287 +1,519 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been temporarily disconnected
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_disconnect_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff
index ce78050538d..9e6530aa9f7 100644
--- a/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff
@@ -1,27 +1,27 @@
--- r/galera_ist_MDEV-28583.result
+++ r/galera_ist_MDEV-28583.reject
-@@ -285,3 +285,111 @@
+@@ -517,3 +517,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result b/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result
index 80a28d349ba..5a71b490a80 100644
--- a/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result
@@ -1,287 +1,519 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been temporarily disconnected
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_disconnect_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff
index 9684e290778..adf12c23e4a 100644
--- a/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_ist_mariabackup.result 2018-11-21 22:30:21.968817468 +0200
-+++ r/galera_ist_mariabackup.reject 2018-11-22 09:16:27.832601754 +0200
-@@ -285,3 +285,111 @@
+--- r/galera_ist_mariabackup.result 2021-04-10 14:21:16.141724901 +0300
++++ r/galera_ist_mariabackup,debug.reject 2021-04-10 14:49:04.455785652 +0300
+@@ -517,3 +517,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup.result b/mysql-test/suite/galera/r/galera_ist_mariabackup.result
index 80a28d349ba..5a71b490a80 100644
--- a/mysql-test/suite/galera/r/galera_ist_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup.result
@@ -1,287 +1,519 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been temporarily disconnected
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_disconnect_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff
index 792f98b4427..c9457d70812 100644
--- a/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_ist_mariabackup_innodb_flush_logs.result 2018-11-21 21:34:20.157054441 +0200
-+++ r/galera_ist_mariabackup_innodb_flush_logs.reject 2018-11-22 09:16:16.824604445 +0200
-@@ -94,3 +94,111 @@
+--- r/galera_ist_mariabackup_innodb_flush_logs.result 2021-04-10 14:21:52.661886653 +0300
++++ r/galera_ist_mariabackup_innodb_flush_logs,debug.reject 2021-04-10 14:49:56.740062774 +0300
+@@ -172,3 +172,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result
index 7813b5a58fc..2060698bee0 100644
--- a/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result
@@ -1,96 +1,174 @@
+connection node_2;
+connection node_1;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff
index 141b1ebd25f..e4e255deea2 100644
--- a/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_ist_mysqldump.result 2018-11-22 14:25:28.551554055 +0200
-+++ r/galera_ist_mysqldump.reject 2018-11-22 15:46:33.119441931 +0200
-@@ -200,6 +200,114 @@
+--- r/galera_ist_mysqldump.result 2021-04-10 14:23:23.158282307 +0300
++++ r/galera_ist_mysqldump,debug.reject 2021-04-10 15:27:13.316299695 +0300
+@@ -354,6 +354,190 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,58 +59,134 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump.result b/mysql-test/suite/galera/r/galera_ist_mysqldump.result
index 296ecc2adc7..6c57a571b85 100644
--- a/mysql-test/suite/galera/r/galera_ist_mysqldump.result
+++ b/mysql-test/suite/galera/r/galera_ist_mysqldump.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
Setting SST method to mysqldump ...
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
@@ -12,194 +14,346 @@ connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
@@ -210,3 +364,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
diff --git a/mysql-test/suite/galera/r/galera_ist_progress.result b/mysql-test/suite/galera/r/galera_ist_progress.result
index ed36a217624..16772271b72 100644
--- a/mysql-test/suite/galera/r/galera_ist_progress.result
+++ b/mysql-test/suite/galera/r/galera_ist_progress.result
@@ -1,11 +1,13 @@
connection node_2;
+connection node_1;
+connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
connection node_1;
connection node_2;
SET SESSION wsrep_on = OFF;
SET SESSION wsrep_on = ON;
connection node_1;
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
@@ -21,8 +23,7 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
connection node_1;
connection node_2;
connection node_1;
-include/assert_grep.inc [Receiving IST: 11 writesets, seqnos]
-include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete]
-include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete]
+"Trying to find IST progress reporting"
+found
connection node_1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_ist_recv_bind.result b/mysql-test/suite/galera/r/galera_ist_recv_bind.result
index ffc751d8672..be72aa60ab0 100644
--- a/mysql-test/suite/galera/r/galera_ist_recv_bind.result
+++ b/mysql-test/suite/galera/r/galera_ist_recv_bind.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'
diff --git a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
index d739558dfd5..2f78c475762 100644
--- a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
+++ b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
diff --git a/mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff
index 260f8a8cab8..e76b37838fb 100644
--- a/mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_ist_rsync.result 2018-09-11 12:38:42.027479411 +0300
-+++ r/galera_ist_rsync.reject 2018-09-17 10:50:16.527307668 +0300
-@@ -259,3 +259,111 @@
+--- r/galera_ist_rsync.result 2021-04-10 14:24:05.942467091 +0300
++++ r/galera_ist_rsync,debug.reject 2021-04-10 14:52:14.236776538 +0300
+@@ -517,3 +517,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_rsync.result b/mysql-test/suite/galera/r/galera_ist_rsync.result
index 80a28d349ba..5a71b490a80 100644
--- a/mysql-test/suite/galera/r/galera_ist_rsync.result
+++ b/mysql-test/suite/galera/r/galera_ist_rsync.result
@@ -1,287 +1,519 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been temporarily disconnected
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_disconnect_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_kill_applier.result b/mysql-test/suite/galera/r/galera_kill_applier.result
index 0b1a0c12d0d..a47f486b5fb 100644
--- a/mysql-test/suite/galera/r/galera_kill_applier.result
+++ b/mysql-test/suite/galera/r/galera_kill_applier.result
@@ -1,4 +1,9 @@
connection node_2;
+connection node_1;
+connection node_2;
+SELECT @@wsrep_slave_threads;
+@@wsrep_slave_threads
+1
SET GLOBAL wsrep_slave_threads=2;
KILL ID;
Got one of the listed errors
@@ -8,15 +13,18 @@ KILL ID;
Got one of the listed errors
KILL QUERY ID;
Got one of the listed errors
-SET GLOBAL wsrep_slave_threads=1;
+SET GLOBAL wsrep_slave_threads=DEFAULT;
connection node_1;
create table t1(a int not null primary key) engine=innodb;
insert into t1 values (1);
insert into t1 values (2);
connection node_2;
-set global wsrep_sync_wait=15;
+# Wait until one of the appliers has exited
select count(*) from t1;
count(*)
2
+SELECT @@wsrep_slave_threads;
+@@wsrep_slave_threads
+1
connection node_1;
drop table t1;
diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result
index 86796405422..33a1b19095f 100644
--- a/mysql-test/suite/galera/r/galera_kill_ddl.result
+++ b/mysql-test/suite/galera/r/galera_kill_ddl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_kill_largechanges.result b/mysql-test/suite/galera/r/galera_kill_largechanges.result
deleted file mode 100644
index d85d421c164..00000000000
--- a/mysql-test/suite/galera/r/galera_kill_largechanges.result
+++ /dev/null
@@ -1,22 +0,0 @@
-connection node_1;
-connection node_2;
-connection node_1;
-SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
-CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
-connection node_2;
-Killing server ...
-connection node_1;
-INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
-connection node_2;
-connection node_2a;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-1771561
-SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-VARIABLE_VALUE
-2
-connection node_1;
-DROP TABLE t1;
-DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_kill_nochanges.result b/mysql-test/suite/galera/r/galera_kill_nochanges.result
index 8795608a303..f7478e29fd8 100644
--- a/mysql-test/suite/galera/r/galera_kill_nochanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_nochanges.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_kill_smallchanges.result b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
index f500db8871b..9d52de585c2 100644
--- a/mysql-test/suite/galera/r/galera_kill_smallchanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_last_committed_id.result b/mysql-test/suite/galera/r/galera_last_committed_id.result
new file mode 100644
index 00000000000..fabc5337576
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_last_committed_id.result
@@ -0,0 +1,38 @@
+connection node_2;
+connection node_1;
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
+1
+wsrep_last_committed_id_match
+1
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
+1
+connection node_1a;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+wsrep_last_committed_id_match
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
+1
+INSERT INTO t1 VALUES (1);
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1'
+1
+wsrep_last_committed_id_match
+1
+COMMIT;
+wsrep_last_committed_id_advanced
+1
+wsrep_last_committed_id_advanced
+1
+SET AUTOCOMMIT=ON;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_load_data.result b/mysql-test/suite/galera/r/galera_load_data.result
index bbfd14a98f6..84e96f8a36c 100644
--- a/mysql-test/suite/galera/r/galera_load_data.result
+++ b/mysql-test/suite/galera/r/galera_load_data.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
create database cardtest02;
use cardtest02;
@@ -34,6 +36,8 @@ UNLOCK TABLES;
use cardtest02;
ANALYZE TABLE cardtest_tbl;
Table Op Msg_type Msg_text
+cardtest02.cardtest_tbl analyze status Engine-independent statistics collected
+cardtest02.cardtest_tbl analyze Warning Engine-independent statistics are not collected for column 'intro'
cardtest02.cardtest_tbl analyze status OK
SELECT COUNT(*) AS EXPECT_301 FROM cardtest_tbl;
EXPECT_301
@@ -42,6 +46,8 @@ connection node_2;
use cardtest02;
ANALYZE TABLE cardtest_tbl;
Table Op Msg_type Msg_text
+cardtest02.cardtest_tbl analyze status Engine-independent statistics collected
+cardtest02.cardtest_tbl analyze Warning Engine-independent statistics are not collected for column 'intro'
cardtest02.cardtest_tbl analyze status OK
SELECT COUNT(*) AS EXPECT_301 FROM cardtest_tbl;
EXPECT_301
diff --git a/mysql-test/suite/galera/r/galera_lock_table.result b/mysql-test/suite/galera/r/galera_lock_table.result
index ce529deb22c..c3df1749ada 100644
--- a/mysql-test/suite/galera/r/galera_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_lock_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_lock_tables_in_transaction.result b/mysql-test/suite/galera/r/galera_lock_tables_in_transaction.result
new file mode 100644
index 00000000000..68691a4efd2
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_lock_tables_in_transaction.result
@@ -0,0 +1,12 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+LOCK TABLES t2 READ;
+ERROR 42S02: Table 'test.t2' doesn't exist
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+LOCK TABLES t1 READ;
+UNLOCK TABLES;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_log_bin.result b/mysql-test/suite/galera/r/galera_log_bin.result
index eb009a620e0..df7ace9d95a 100644
--- a/mysql-test/suite/galera/r/galera_log_bin.result
+++ b/mysql-test/suite/galera/r/galera_log_bin.result
@@ -1,7 +1,13 @@
+connection node_2;
+connection node_1;
connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
@@ -70,4 +76,6 @@ DROP TABLE t1;
DROP TABLE t2;
#cleanup
connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_log_bin_ext.result b/mysql-test/suite/galera/r/galera_log_bin_ext.result
index 134ccc505bb..b110cb4dba3 100644
--- a/mysql-test/suite/galera/r/galera_log_bin_ext.result
+++ b/mysql-test/suite/galera/r/galera_log_bin_ext.result
@@ -1,9 +1,15 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
@@ -58,4 +64,6 @@ DROP TABLE t1;
DROP TABLE t2;
#cleanup
connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result b/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result
index 134ccc505bb..b110cb4dba3 100644
--- a/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result
@@ -1,9 +1,15 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
@@ -58,4 +64,6 @@ DROP TABLE t1;
DROP TABLE t2;
#cleanup
connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_log_bin_opt.result b/mysql-test/suite/galera/r/galera_log_bin_opt.result
index eb009a620e0..df7ace9d95a 100644
--- a/mysql-test/suite/galera/r/galera_log_bin_opt.result
+++ b/mysql-test/suite/galera/r/galera_log_bin_opt.result
@@ -1,7 +1,13 @@
+connection node_2;
+connection node_1;
connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
@@ -70,4 +76,6 @@ DROP TABLE t1;
DROP TABLE t2;
#cleanup
connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_log_output_csv.result b/mysql-test/suite/galera/r/galera_log_output_csv.result
index ea218abbb59..06b0838d976 100644
--- a/mysql-test/suite/galera/r/galera_log_output_csv.result
+++ b/mysql-test/suite/galera/r/galera_log_output_csv.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) > 0 FROM mysql.general_log;
diff --git a/mysql-test/suite/galera/r/galera_many_columns.result b/mysql-test/suite/galera/r/galera_many_columns.result
index db8a8f5ec9d..64e97f11fa7 100644
--- a/mysql-test/suite/galera/r/galera_many_columns.result
+++ b/mysql-test/suite/galera/r/galera_many_columns.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
INSERT INTO t1 (f1) VALUES (DEFAULT);
connection node_2;
SELECT f1 = 'ABC', f1017 = 'ABC' FROM t1;
@@ -19,7 +21,7 @@ UPDATE t1 SET f2 = 'CDE' WHERE f1 = 'XYZ' AND f1017 = 'XYZ';
COMMIT;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
connection node_2;
ROLLBACK;
diff --git a/mysql-test/suite/galera/r/galera_many_indexes.result b/mysql-test/suite/galera/r/galera_many_indexes.result
index 5691eef4c00..963d3552252 100644
--- a/mysql-test/suite/galera/r/galera_many_indexes.result
+++ b/mysql-test/suite/galera/r/galera_many_indexes.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(767) PRIMARY KEY) ENGINE=InnoDB;
CREATE UNIQUE INDEX i63 ON t1(f1);
CREATE UNIQUE INDEX i62 ON t1(f1);
@@ -91,6 +93,7 @@ COUNT(*) = 1
INSERT INTO t1 VALUES (REPEAT('b', 767));
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
connection node_1;
SELECT COUNT(*) = 2 FROM t1;
@@ -98,6 +101,7 @@ COUNT(*) = 2
1
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DELETE FROM t1 WHERE f1 = REPEAT('b', 767);
connection node_1;
@@ -129,5 +133,5 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_many_rows.result b/mysql-test/suite/galera/r/galera_many_rows.result
index d6669fe6bdf..566bc59f8ab 100644
--- a/mysql-test/suite/galera/r/galera_many_rows.result
+++ b/mysql-test/suite/galera/r/galera_many_rows.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
@@ -37,6 +39,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_many_tables_nopk.result b/mysql-test/suite/galera/r/galera_many_tables_nopk.result
index 573ce758a13..d341a1816e5 100644
--- a/mysql-test/suite/galera/r/galera_many_tables_nopk.result
+++ b/mysql-test/suite/galera/r/galera_many_tables_nopk.result
@@ -1,11 +1,13 @@
+connection node_2;
+connection node_1;
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
COMMIT;
connection node_2;
CREATE TABLE sum_table (f1 INTEGER);
-SELECT SUM(f1) = 900 FROM sum_table;
-SUM(f1) = 900
+SELECT SUM(f1) = 100 FROM sum_table;
+SUM(f1) = 100
1
connection node_1;
SET AUTOCOMMIT=OFF;
@@ -13,11 +15,11 @@ START TRANSACTION;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-UPDATE t900 SET f1 = 3;
+UPDATE t100 SET f1 = 3;
connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP SCHEMA test;
CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera/r/galera_many_tables_pk.result b/mysql-test/suite/galera/r/galera_many_tables_pk.result
index 67624d5edb0..2700df8ebe4 100644
--- a/mysql-test/suite/galera/r/galera_many_tables_pk.result
+++ b/mysql-test/suite/galera/r/galera_many_tables_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%';
@@ -23,7 +25,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
include/diff_servers.inc [servers=1 2]
DROP SCHEMA test;
CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera/r/galera_mdev_10812.result b/mysql-test/suite/galera/r/galera_mdev_10812.result
index de0a08a3794..16eacc6beab 100644
--- a/mysql-test/suite/galera/r/galera_mdev_10812.result
+++ b/mysql-test/suite/galera/r/galera_mdev_10812.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state
# is ABORTED, it causes wrong response to be sent to the client
diff --git a/mysql-test/suite/galera/r/galera_mdev_13787.result b/mysql-test/suite/galera/r/galera_mdev_13787.result
index b1caec0283c..4d0770918c0 100644
--- a/mysql-test/suite/galera/r/galera_mdev_13787.result
+++ b/mysql-test/suite/galera/r/galera_mdev_13787.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
create table t(a int);
insert into t select 1;
diff --git a/mysql-test/suite/galera/r/galera_mdev_15611.result b/mysql-test/suite/galera/r/galera_mdev_15611.result
index 9ea1684494a..5461f8f03fb 100644
--- a/mysql-test/suite/galera/r/galera_mdev_15611.result
+++ b/mysql-test/suite/galera/r/galera_mdev_15611.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (
id int primary key
diff --git a/mysql-test/suite/galera/r/galera_mdl_race.result b/mysql-test/suite/galera/r/galera_mdl_race.result
index 968258e8ec3..cf747ed8efb 100644
--- a/mysql-test/suite/galera/r/galera_mdl_race.result
+++ b/mysql-test/suite/galera/r/galera_mdl_race.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
@@ -22,7 +24,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
UNLOCK TABLES;
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
COUNT(*) = 1
1
diff --git a/mysql-test/suite/galera/r/galera_multi_database.result b/mysql-test/suite/galera/r/galera_multi_database.result
index f6242de663b..a9d58d5d0e2 100644
--- a/mysql-test/suite/galera/r/galera_multi_database.result
+++ b/mysql-test/suite/galera/r/galera_multi_database.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE DATABASE d1;
CREATE TABLE d1.t1(f1 INTEGER) ENGINE=InnoDB;
CREATE DATABASE d2;
diff --git a/mysql-test/suite/galera/r/galera_multirow_rollback.result b/mysql-test/suite/galera/r/galera_multirow_rollback.result
new file mode 100644
index 00000000000..13502d0d3dc
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_multirow_rollback.result
@@ -0,0 +1,73 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+connection node_1;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+COMMIT;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+connection node_1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'b');
+INSERT INTO t1 (f2) VALUES ('c'), ('d');
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+COMMIT;
+expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+f1 f2
+1 a
+2 b
+connection node_2;
+expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+f1 f2
+1 a
+2 b
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+connection node_1;
+INSERT INTO t1 (f2) VALUES ('a'),('b');
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE p(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE c(id int primary key, fk1 int) ENGINE=InnoDB;
+ALTER TABLE c ADD FOREIGN KEY (fk1) references p(id);
+INSERT INTO p VALUES(1, 0);
+START TRANSACTION;
+INSERT INTO c VALUES (3,1);
+INSERT INTO c VALUES (1,1), (2,2);
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`c`, CONSTRAINT `c_ibfk_1` FOREIGN KEY (`fk1`) REFERENCES `p` (`id`))
+COMMIT;
+SELECT * FROM p;
+id j
+1 0
+SELECT * FROM c;
+id fk1
+3 1
+connection node_2;
+SELECT * FROM p;
+id j
+1 0
+SELECT * FROM c;
+id fk1
+3 1
+DROP TABLE c;
+DROP TABLE p;
diff --git a/mysql-test/suite/galera/r/galera_myisam_autocommit.result b/mysql-test/suite/galera/r/galera_myisam_autocommit.result
index e9578a261e6..6213e8f6380 100644
--- a/mysql-test/suite/galera/r/galera_myisam_autocommit.result
+++ b/mysql-test/suite/galera/r/galera_myisam_autocommit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2), (3);
diff --git a/mysql-test/suite/galera/r/galera_myisam_transactions.result b/mysql-test/suite/galera/r/galera_myisam_transactions.result
index 3905e874d12..8a30e265d28 100644
--- a/mysql-test/suite/galera/r/galera_myisam_transactions.result
+++ b/mysql-test/suite/galera/r/galera_myisam_transactions.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t3 (f1 INTEGER) ENGINE=MyISAM;
diff --git a/mysql-test/suite/galera/r/galera_nonPK_and_PA.result b/mysql-test/suite/galera/r/galera_nonPK_and_PA.result
new file mode 100644
index 00000000000..5ad55417fd1
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_nonPK_and_PA.result
@@ -0,0 +1,63 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 VARCHAR(32) NOT NULL) ENGINE=InnoDB;
+INSERT INTO t1 (f1) VALUES ('0e66c5227a8a');
+INSERT INTO t1 (f1) VALUES ('c6c112992c9');
+CREATE TABLE t2 (i int primary key);
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_slave_threads = 2;
+***************************************************************
+scenario 1, conflicting UPDATE
+***************************************************************
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync';
+connection node_1;
+START TRANSACTION;
+UPDATE t1 SET f1='5ffceebfada' WHERE t1.f1 = 'c6c112992c9';
+COMMIT;
+connection node_2;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+connection node_1;
+START TRANSACTION;
+UPDATE t1 SET f1='4ffceebfcdc' WHERE t1.f1 = '0e66c5227a8a';
+COMMIT;
+connection node_2;
+distance
+1
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+***************************************************************
+scenario 2, conflicting DELETE
+***************************************************************
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync';
+connection node_1;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+DELETE FROM t1 WHERE f1='5ffceebfada';
+COMMIT;
+connection node_2;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+connection node_1;
+START TRANSACTION;
+INSERT INTO t2 VALUES (2);
+DELETE FROM t1 WHERE f1='4ffceebfcdc';
+COMMIT;
+connection node_2;
+distance
+1
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+DROP TABLE t1;
+DROP TABLE t2;
+connection node_2;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
diff --git a/mysql-test/suite/galera/r/galera_nopk_bit.result b/mysql-test/suite/galera/r/galera_nopk_bit.result
index 21da039df09..97ded793c08 100644
--- a/mysql-test/suite/galera/r/galera_nopk_bit.result
+++ b/mysql-test/suite/galera/r/galera_nopk_bit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BIT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL),(0),(b'1');
connection node_2;
@@ -28,6 +30,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_nopk_blob.result b/mysql-test/suite/galera/r/galera_nopk_blob.result
index 53e04f72d1e..6a3cee516c9 100644
--- a/mysql-test/suite/galera/r/galera_nopk_blob.result
+++ b/mysql-test/suite/galera/r/galera_nopk_blob.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL),('abc');
connection node_2;
@@ -28,6 +30,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_nopk_large_varchar.result b/mysql-test/suite/galera/r/galera_nopk_large_varchar.result
index a83cf7f2d91..6d29306996b 100644
--- a/mysql-test/suite/galera/r/galera_nopk_large_varchar.result
+++ b/mysql-test/suite/galera/r/galera_nopk_large_varchar.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(8000)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL),(CONCAT(REPEAT('x', 7999), 'a'));
connection node_2;
@@ -31,6 +33,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_nopk_unicode.result b/mysql-test/suite/galera/r/galera_nopk_unicode.result
index b2a8bb63df9..587ba9285da 100644
--- a/mysql-test/suite/galera/r/galera_nopk_unicode.result
+++ b/mysql-test/suite/galera/r/galera_nopk_unicode.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (
f1 VARCHAR(255),
KEY (f1)
@@ -19,7 +21,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT f1 = 'текÑÑ‚2' FROM t1;
f1 = 'текÑÑ‚2'
1
diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
index ab56a8a2aa6..48625b3ba4a 100644
--- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
@@ -8,10 +10,10 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
connection node_2a;
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committing%';
COUNT(*) = 1
1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
COUNT(*) = 1
1
SELECT COUNT(*) = 0 FROM t1;
@@ -30,7 +32,7 @@ COUNT(*) = 1
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committed%';
COUNT(*) = 2
1
SET GLOBAL wsrep_slave_threads = 1;;
diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
index 8d8f4c1a371..6249edbe173 100644
--- a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
+++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
@@ -12,7 +14,19 @@ INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_2;
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+30000
+SELECT COUNT(DISTINCT f1) FROM t1;
+COUNT(DISTINCT f1)
+30000
connection node_1a;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+30000
+SELECT COUNT(DISTINCT f1) FROM t1;
+COUNT(DISTINCT f1)
+30000
connection node_2;
disconnect node_1a;
SELECT COUNT(*) AS EXPECT_30000 FROM t1;
diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result
index 445b818746a..e09e34274dd 100644
--- a/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result
+++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-test/suite/galera/r/galera_parallel_simple.result
index 3f657a0479e..cac784cd16f 100644
--- a/mysql-test/suite/galera/r/galera_parallel_simple.result
+++ b/mysql-test/suite/galera/r/galera_parallel_simple.result
@@ -1,11 +1,13 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
connection node_2;
-SET GLOBAL wsrep_slave_threads = 2;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
NAME
test/t1
test/t2
+SET GLOBAL wsrep_slave_threads = 2;
LOCK TABLE t1 WRITE;
connection node_1;
INSERT INTO t1 VALUES (1);
@@ -18,18 +20,20 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1);
+INSERT INTO t1 select * from t1;
+INSERT INTO t2 select * from t2;
+INSERT INTO t1 select * from t1;
+INSERT INTO t2 select * from t2;
connection node_2;
SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 15;
-SELECT COUNT(*) = 10 FROM t1;
-COUNT(*) = 10
-0
-SELECT COUNT(*) = 10 FROM t2;
-COUNT(*) = 10
-0
+SELECT COUNT(*) as expect_20 FROM t1;
+expect_20
+20
+SELECT COUNT(*) as expect_20 FROM t2;
+expect_20
+20
SET GLOBAL wsrep_slave_threads = 1;;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_partition.result b/mysql-test/suite/galera/r/galera_partition.result
index c21d1005293..0e8894794d7 100644
--- a/mysql-test/suite/galera/r/galera_partition.result
+++ b/mysql-test/suite/galera/r/galera_partition.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*");
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
@@ -395,14 +397,14 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
350
connection node_2;
-call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
-call p1(100);;
+call mtr.add_suppression("WSREP: Sending JOIN failed:");
+call p1(10);
connection node_3;
-call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
-call p1(100);;
+call mtr.add_suppression("WSREP: Sending JOIN failed:");
+call p1(10);
connection node_4;
-call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
-call p1(100);;
+call mtr.add_suppression("WSREP: Sending JOIN failed:");
+call p1(10);
connection node_1;
SET SESSION wsrep_OSU_method='RSU';
SELECT @@wsrep_OSU_method;
@@ -422,3 +424,5 @@ connection node_4;
connection node_1;
DROP TABLE t1;
DROP PROCEDURE p1;
+disconnect node_3;
+disconnect node_4;
diff --git a/mysql-test/suite/galera/r/galera_password.result b/mysql-test/suite/galera/r/galera_password.result
index 94b4090ea94..00ffc1df8f9 100644
--- a/mysql-test/suite/galera/r/galera_password.result
+++ b/mysql-test/suite/galera/r/galera_password.result
@@ -1,5 +1,10 @@
+connection node_2;
+connection node_1;
SHOW VARIABLES LIKE '%password%';
Variable_name Value
+default_password_lifetime 0
+disconnect_on_expired_password OFF
+max_password_errors 4294967295
old_passwords OFF
report_password
strict_password_validation ON
diff --git a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result
index 96ca12a9479..e9f6cae5181 100644
--- a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result
+++ b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_pc_recovery.result b/mysql-test/suite/galera/r/galera_pc_recovery.result
new file mode 100644
index 00000000000..17a43d17211
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_pc_recovery.result
@@ -0,0 +1,37 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 2
+1
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
+connection node_1;
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
+connection node_2;
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
diff --git a/mysql-test/suite/galera/r/galera_performance_schema.result b/mysql-test/suite/galera/r/galera_performance_schema.result
index 5b4994556d6..b40dcb0de60 100644
--- a/mysql-test/suite/galera/r/galera_performance_schema.result
+++ b/mysql-test/suite/galera/r/galera_performance_schema.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
use performance_schema;
SELECT name
FROM threads
@@ -10,20 +12,27 @@ create table t1 (a int not null primary key) engine=innodb;
insert into t1 values (1),(2);
use performance_schema;
select name from mutex_instances where name like 'wait/synch/mutex/sql/LOCK_wsrep%' order by name;
+name wait/synch/mutex/sql/LOCK_wsrep_cluster_config
name wait/synch/mutex/sql/LOCK_wsrep_config_state
name wait/synch/mutex/sql/LOCK_wsrep_desync
+name wait/synch/mutex/sql/LOCK_wsrep_donor_monitor
+name wait/synch/mutex/sql/LOCK_wsrep_group_commit
+name wait/synch/mutex/sql/LOCK_wsrep_joiner_monitor
name wait/synch/mutex/sql/LOCK_wsrep_ready
name wait/synch/mutex/sql/LOCK_wsrep_replaying
-name wait/synch/mutex/sql/LOCK_wsrep_rollback
name wait/synch/mutex/sql/LOCK_wsrep_slave_threads
+name wait/synch/mutex/sql/LOCK_wsrep_SR_pool
+name wait/synch/mutex/sql/LOCK_wsrep_SR_store
name wait/synch/mutex/sql/LOCK_wsrep_sst
name wait/synch/mutex/sql/LOCK_wsrep_sst_init
select name from cond_instances where name like 'wait/synch/cond/sql/COND_wsrep%' order by name;
+name wait/synch/cond/sql/COND_wsrep_donor_monitor
+name wait/synch/cond/sql/COND_wsrep_joiner_monitor
name wait/synch/cond/sql/COND_wsrep_ready
name wait/synch/cond/sql/COND_wsrep_replaying
-name wait/synch/cond/sql/COND_wsrep_rollback
name wait/synch/cond/sql/COND_wsrep_sst
name wait/synch/cond/sql/COND_wsrep_sst_init
+name wait/synch/cond/sql/COND_wsrep_wsrep_slave_threads
connection node_2;
use test;
SET SESSION wsrep_on=OFF;
diff --git a/mysql-test/suite/galera/r/galera_pk_bigint_signed.result b/mysql-test/suite/galera/r/galera_pk_bigint_signed.result
index 807ab62c548..0b538778204 100644
--- a/mysql-test/suite/galera/r/galera_pk_bigint_signed.result
+++ b/mysql-test/suite/galera/r/galera_pk_bigint_signed.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BIGINT SIGNED PRIMARY KEY, f2 VARCHAR(5)) ENGINE=InnoDB;
INSERT INTO t1 VALUES
(-9223372036854775808, 'min'),
@@ -27,6 +29,6 @@ COMMIT;
SET AUTOCOMMIT=ON;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET AUTOCOMMIT=ON;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result b/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result
index c94b7e2314a..9442f79cd14 100644
--- a/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result
+++ b/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BIGINT UNSIGNED PRIMARY KEY, f2 VARCHAR(5)) ENGINE=InnoDB;
INSERT INTO t1 VALUES
(18446744073709551615, 'max')
@@ -24,6 +26,6 @@ COMMIT;
SET AUTOCOMMIT=ON;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET AUTOCOMMIT=ON;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_prepared_statement.result b/mysql-test/suite/galera/r/galera_prepared_statement.result
index 6f546b32819..b84f25e9929 100644
--- a/mysql-test/suite/galera/r/galera_prepared_statement.result
+++ b/mysql-test/suite/galera/r/galera_prepared_statement.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t2 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t3 (f1 CHAR(5)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_query_cache.result b/mysql-test/suite/galera/r/galera_query_cache.result
index e64c9438646..8f5bc4b6f37 100644
--- a/mysql-test/suite/galera/r/galera_query_cache.result
+++ b/mysql-test/suite/galera/r/galera_query_cache.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
index a994852a78a..0f2f61ea97f 100644
--- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
+++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_read_only.result b/mysql-test/suite/galera/r/galera_read_only.result
index 4c2523f8691..e7e18ca8145 100644
--- a/mysql-test/suite/galera/r/galera_read_only.result
+++ b/mysql-test/suite/galera/r/galera_read_only.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL read_only=TRUE;
@@ -15,10 +17,18 @@ connect foo_node_2,127.0.0.1,foo,,test,$port_2,;
connection foo_node_2;
INSERT INTO t1 VALUES (2);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
connection node_2;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
1
+connection node_2;
+SET GLOBAL read_only=TRUE;
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
SET GLOBAL read_only=FALSE;
DROP TABLE t1;
DROP USER foo@localhost;
diff --git a/mysql-test/suite/galera/r/galera_repair_view.result b/mysql-test/suite/galera/r/galera_repair_view.result
new file mode 100644
index 00000000000..8dfe8c8db52
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_repair_view.result
@@ -0,0 +1,17 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1(a int not null primary key) engine=innodb;
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair note The storage engine for the table doesn't support repair
+CREATE VIEW v1 AS SELECT a FROM t1;
+REPAIR VIEW v1;
+Table Op Msg_type Msg_text
+test.v1 repair status OK
+DROP VIEW v1;
+DROP TABLE t1;
+CREATE VIEW v1 AS SELECT table_name FROM information_schema.tables;
+REPAIR VIEW v1;
+Table Op Msg_type Msg_text
+test.v1 repair status OK
+DROP VIEW v1;
diff --git a/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result b/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result
index 2470f59c497..3d421216f93 100644
--- a/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result
+++ b/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET GLOBAL wsrep_provider_options = 'repl.key_format=FLAT16';
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
index da24a741351..0528df7b9f6 100644
--- a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
+++ b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
@@ -1,8 +1,10 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
INSERT INTO t1 VALUES (REPEAT('a', 512));
-ERROR HY000: Got error 90 "Message too long" during COMMIT
+ERROR HY000: Got error 5 "Input/output error" during COMMIT
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
diff --git a/mysql-test/suite/galera/r/galera_restart_nochanges.result b/mysql-test/suite/galera/r/galera_restart_nochanges.result
index b35ae50e2fb..09f8d9a586b 100644
--- a/mysql-test/suite/galera/r/galera_restart_nochanges.result
+++ b/mysql-test/suite/galera/r/galera_restart_nochanges.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
index e748859beb7..b1ee6f5955f 100644
--- a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
+++ b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result
index 7d6c57e8131..35487185db2 100644
--- a/mysql-test/suite/galera/r/galera_roles.result
+++ b/mysql-test/suite/galera/r/galera_roles.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# Testing CREATE/GRANT role
#
diff --git a/mysql-test/suite/galera/r/galera_rsu_add_pk.result b/mysql-test/suite/galera/r/galera_rsu_add_pk.result
index 2df08c3e4ff..a38f3ff30cb 100644
--- a/mysql-test/suite/galera/r/galera_rsu_add_pk.result
+++ b/mysql-test/suite/galera/r/galera_rsu_add_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_rsu_drop_pk.result b/mysql-test/suite/galera/r/galera_rsu_drop_pk.result
index a8b623cc37f..61aa5f015a1 100644
--- a/mysql-test/suite/galera/r/galera_rsu_drop_pk.result
+++ b/mysql-test/suite/galera/r/galera_rsu_drop_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_rsu_error.result b/mysql-test/suite/galera/r/galera_rsu_error.result
index 5c16e34b492..f78e8fa544c 100644
--- a/mysql-test/suite/galera/r/galera_rsu_error.result
+++ b/mysql-test/suite/galera/r/galera_rsu_error.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 VALUES (1), (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_rsu_simple.result b/mysql-test/suite/galera/r/galera_rsu_simple.result
index d0ddcfb4d64..d75ef094065 100644
--- a/mysql-test/suite/galera/r/galera_rsu_simple.result
+++ b/mysql-test/suite/galera/r/galera_rsu_simple.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_2;
SET SESSION wsrep_OSU_method = "RSU";
diff --git a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
index a103e810588..310611a0e49 100644
--- a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
+++ b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_desync=1;
diff --git a/mysql-test/suite/galera/r/galera_sbr.result b/mysql-test/suite/galera/r/galera_sbr.result
index 0bdaeef5b8a..c5fdecece0e 100644
--- a/mysql-test/suite/galera/r/galera_sbr.result
+++ b/mysql-test/suite/galera/r/galera_sbr.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
diff --git a/mysql-test/suite/galera/r/galera_sbr_binlog.result b/mysql-test/suite/galera/r/galera_sbr_binlog.result
index 0bdaeef5b8a..c5fdecece0e 100644
--- a/mysql-test/suite/galera/r/galera_sbr_binlog.result
+++ b/mysql-test/suite/galera/r/galera_sbr_binlog.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
diff --git a/mysql-test/suite/galera/r/galera_schema.result b/mysql-test/suite/galera/r/galera_schema.result
new file mode 100644
index 00000000000..24a4099c94d
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_schema.result
@@ -0,0 +1,114 @@
+connection node_2;
+connection node_1;
+CREATE TABLE IF NOT EXISTS wsrep_cluster
+(
+cluster_uuid CHAR(36) PRIMARY KEY,
+view_id BIGINT NOT NULL,
+view_seqno BIGINT NOT NULL,
+protocol_version INT NOT NULL,
+capabilities INT NOT NULL
+) ENGINE=InnoDB;
+CREATE TABLE IF NOT EXISTS wsrep_cluster_members
+(
+node_uuid CHAR(36) PRIMARY KEY,
+cluster_uuid CHAR(36) NOT NULL,
+node_name CHAR(32) NOT NULL,
+node_incoming_address VARCHAR(256) NOT NULL
+) ENGINE=InnoDB;
+CREATE TABLE IF NOT EXISTS wsrep_cluster_members_history
+(
+node_uuid CHAR(36) PRIMARY KEY,
+cluster_uuid CHAR(36) NOT NULL,
+last_view_id BIGINT NOT NULL,
+last_view_seqno BIGINT NOT NULL,
+node_name CHAR(32) NOT NULL,
+node_incoming_address VARCHAR(256) NOT NULL
+) ENGINE=InnoDB;
+CREATE TABLE IF NOT EXISTS wsrep_streaming_log
+(
+node_uuid CHAR(36),
+trx_id BIGINT,
+seqno BIGINT,
+flags INT NOT NULL,
+frag LONGBLOB NOT NULL,
+PRIMARY KEY (node_uuid, trx_id, seqno)
+) ENGINE=InnoDB;
+DELETE FROM wsrep_cluster;
+DELETE FROM wsrep_cluster_members;
+ALTER TABLE wsrep_cluster STATS_PERSISTENT=0;
+ALTER TABLE wsrep_cluster_members STATS_PERSISTENT=0;
+ALTER TABLE wsrep_cluster_members_history STATS_PERSISTENT=0;
+ALTER TABLE wsrep_streaming_log STATS_PERSISTENT=0;
+SHOW CREATE TABLE wsrep_cluster;
+Table Create Table
+wsrep_cluster CREATE TABLE `wsrep_cluster` (
+ `cluster_uuid` char(36) NOT NULL,
+ `view_id` bigint(20) NOT NULL,
+ `view_seqno` bigint(20) NOT NULL,
+ `protocol_version` int(11) NOT NULL,
+ `capabilities` int(11) NOT NULL,
+ PRIMARY KEY (`cluster_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE wsrep_cluster_members;
+Table Create Table
+wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` (
+ `node_uuid` char(36) NOT NULL,
+ `cluster_uuid` char(36) NOT NULL,
+ `node_name` char(32) NOT NULL,
+ `node_incoming_address` varchar(256) NOT NULL,
+ PRIMARY KEY (`node_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE wsrep_cluster_members_history;
+Table Create Table
+wsrep_cluster_members_history CREATE TABLE `wsrep_cluster_members_history` (
+ `node_uuid` char(36) NOT NULL,
+ `cluster_uuid` char(36) NOT NULL,
+ `last_view_id` bigint(20) NOT NULL,
+ `last_view_seqno` bigint(20) NOT NULL,
+ `node_name` char(32) NOT NULL,
+ `node_incoming_address` varchar(256) NOT NULL,
+ PRIMARY KEY (`node_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE wsrep_streaming_log;
+Table Create Table
+wsrep_streaming_log CREATE TABLE `wsrep_streaming_log` (
+ `node_uuid` char(36) NOT NULL,
+ `trx_id` bigint(20) NOT NULL,
+ `seqno` bigint(20) NOT NULL,
+ `flags` int(11) NOT NULL,
+ `frag` longblob NOT NULL,
+ PRIMARY KEY (`node_uuid`,`trx_id`,`seqno`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE mysql.wsrep_cluster;
+Table Create Table
+wsrep_cluster CREATE TABLE `wsrep_cluster` (
+ `cluster_uuid` char(36) NOT NULL,
+ `view_id` bigint(20) NOT NULL,
+ `view_seqno` bigint(20) NOT NULL,
+ `protocol_version` int(11) NOT NULL,
+ `capabilities` int(11) NOT NULL,
+ PRIMARY KEY (`cluster_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+Table Create Table
+wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` (
+ `node_uuid` char(36) NOT NULL,
+ `cluster_uuid` char(36) NOT NULL,
+ `node_name` char(32) NOT NULL,
+ `node_incoming_address` varchar(256) NOT NULL,
+ PRIMARY KEY (`node_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE mysql.wsrep_streaming_log;
+Table Create Table
+wsrep_streaming_log CREATE TABLE `wsrep_streaming_log` (
+ `node_uuid` char(36) NOT NULL,
+ `trx_id` bigint(20) NOT NULL,
+ `seqno` bigint(20) NOT NULL,
+ `flags` int(11) NOT NULL,
+ `frag` longblob NOT NULL,
+ PRIMARY KEY (`node_uuid`,`trx_id`,`seqno`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+DROP TABLE wsrep_cluster;
+DROP TABLE wsrep_cluster_members;
+DROP TABLE wsrep_cluster_members_history;
+DROP TABLE wsrep_streaming_log;
diff --git a/mysql-test/suite/galera/r/galera_schema_dirty_reads.result b/mysql-test/suite/galera/r/galera_schema_dirty_reads.result
index edf20da92c6..fbac9ff4eb7 100644
--- a/mysql-test/suite/galera/r/galera_schema_dirty_reads.result
+++ b/mysql-test/suite/galera/r/galera_schema_dirty_reads.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
USE information_schema;
SELECT * FROM SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep_dirty_reads";
VARIABLE_NAME VARIABLE_VALUE
diff --git a/mysql-test/suite/galera/r/galera_sequences.result b/mysql-test/suite/galera/r/galera_sequences.result
new file mode 100644
index 00000000000..7276cb8dbde
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sequences.result
@@ -0,0 +1,52 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB;
+SHOW CREATE SEQUENCE seq;
+Table Create Table
+seq CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB
+connection node_2;
+SHOW CREATE SEQUENCE seq;
+Table Create Table
+seq CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB
+connection node_1;
+ALTER SEQUENCE seq MAXVALUE = 10000;
+SHOW CREATE SEQUENCE seq;
+Table Create Table
+seq CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 10000 increment by 0 cache 1000 nocycle ENGINE=InnoDB
+connection node_2;
+SHOW CREATE SEQUENCE seq;
+Table Create Table
+seq CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 10000 increment by 0 cache 1000 nocycle ENGINE=InnoDB
+connection node_1;
+DROP SEQUENCE seq;
+SHOW CREATE SEQUENCE seq;
+ERROR 42S02: Table 'test.seq' doesn't exist
+connection node_2;
+SHOW CREATE SEQUENCE seq;
+ERROR 42S02: Table 'test.seq' doesn't exist
+connection node_1;
+CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1;
+select NEXT VALUE FOR Seq1_1;
+NEXT VALUE FOR Seq1_1
+1
+alter table Seq1_1 engine=myisam;
+select NEXT VALUE FOR Seq1_1;
+NEXT VALUE FOR Seq1_1
+1001
+alter table Seq1_1 engine=innodb;
+select NEXT VALUE FOR Seq1_1;
+NEXT VALUE FOR Seq1_1
+2001
+connection node_2;
+SHOW CREATE SEQUENCE Seq1_1;
+Table Create Table
+Seq1_1 CREATE SEQUENCE `Seq1_1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
+select NEXT VALUE FOR Seq1_1;
+NEXT VALUE FOR Seq1_1
+3001
+connection node_1;
+DROP SEQUENCE Seq1_1;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+connection node_2;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
diff --git a/mysql-test/suite/galera/r/galera_serializable.result b/mysql-test/suite/galera/r/galera_serializable.result
index be3f93a081f..e3785663271 100644
--- a/mysql-test/suite/galera/r/galera_serializable.result
+++ b/mysql-test/suite/galera/r/galera_serializable.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
@@ -9,7 +11,7 @@ connection node_2;
INSERT INTO t1 VALUES (1,1);
connection node_1;
SELECT * FROM t1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
DELETE FROM t1;
connection node_1;
@@ -22,7 +24,7 @@ connection node_2;
UPDATE t1 SET f2 = 2;
connection node_1;
UPDATE t1 SET f2 = 3;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
DELETE FROM t1;
connection node_1;
@@ -33,5 +35,5 @@ connection node_2;
INSERT INTO t1 VALUES (1,2);
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_server.result b/mysql-test/suite/galera/r/galera_server.result
index cc08b826e82..5130dee3459 100644
--- a/mysql-test/suite/galera/r/galera_server.result
+++ b/mysql-test/suite/galera/r/galera_server.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
# On node_1
CREATE SERVER s1
diff --git a/mysql-test/suite/galera/r/galera_set_position_after_cert_failure.result b/mysql-test/suite/galera/r/galera_set_position_after_cert_failure.result
new file mode 100644
index 00000000000..7717428ba21
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_set_position_after_cert_failure.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+connection node_1;
+INSERT INTO t1 VALUES (1, 'node_1');;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_retry_autocommit = 0;
+INSERT INTO t1 VALUES (1, 'node_2');;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+connection node_2;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+connection node_2a;
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "RESET";
+disconnect node_2a;
+connection node_2;
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+Performing --wsrep-recover ...
+connection node_2;
+Using --wsrep-start-position when starting mysqld ...
+connection node_1;
+DROP TABLE t1;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
diff --git a/mysql-test/suite/galera/r/galera_set_position_after_dummy_writeset.result b/mysql-test/suite/galera/r/galera_set_position_after_dummy_writeset.result
new file mode 100644
index 00000000000..da398b76754
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_set_position_after_dummy_writeset.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+connection node_2;
+INSERT INTO t1 VALUES (1, 'node_2');;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION wsrep_sync_wait=0;
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_retry_autocommit = 0;
+INSERT INTO t1 VALUES (1, 'node_1');;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
+connection node_2;
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+Performing --wsrep-recover ...
+connection node_2;
+Using --wsrep-start-position when starting mysqld ...
+connection node_1;
+DROP TABLE t1;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG=NULL;
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera/r/galera_shutdown_nonprim.result b/mysql-test/suite/galera/r/galera_shutdown_nonprim.result
index 5353543e395..8b7697432a3 100644
--- a/mysql-test/suite/galera/r/galera_shutdown_nonprim.result
+++ b/mysql-test/suite/galera/r/galera_shutdown_nonprim.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_slave_replay.result b/mysql-test/suite/galera/r/galera_slave_replay.result
index 760617be5f7..0b0199c4a02 100644
--- a/mysql-test/suite/galera/r/galera_slave_replay.result
+++ b/mysql-test/suite/galera/r/galera_slave_replay.result
@@ -1,10 +1,13 @@
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
+connection node_2;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
RESET MASTER;
connection node_2a;
START SLAVE;
-connection node_1;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (3, 'a');
@@ -18,15 +21,14 @@ f1 f2
UPDATE t1 SET f2 = 'c' WHERE f1 > 1;
connection node_2a;
SET SESSION wsrep_sync_wait = 0;
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
-connection node_3;
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
connection node_2a;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
-connection node_3;
-INSERT INTO test.t1 VALUES (2, 'b');
connection node_1;
+INSERT INTO test.t1 VALUES (2, 'b');
+connection node_3;
COMMIT;
connection node_2a;
SET SESSION wsrep_on = 0;
@@ -35,8 +37,8 @@ SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
connection node_2a;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
-connection node_1;
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_3;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
COUNT(*) = 1
1
@@ -61,27 +63,24 @@ SET DEBUG_SYNC = "RESET";
#
# test phase with real abort
#
-connection node_1;
+connection node_3;
set binlog_format=ROW;
insert into t1 values (4, 'd');
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
connection node_2a;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
-connection node_3;
-UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
connection node_1;
+UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
+connection node_2a;
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_3;
COMMIT;
connection node_2a;
SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
connection node_2a;
-SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
-SET DEBUG_SYNC = "RESET";
-connection node_2a;
set session wsrep_sync_wait=15;
SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
COUNT(*) = 1
@@ -89,7 +88,8 @@ COUNT(*) = 1
set session wsrep_sync_wait=0;
STOP SLAVE;
RESET SLAVE;
+SET DEBUG_SYNC = "RESET";
DROP TABLE t1;
-connection node_1;
+connection node_3;
DROP TABLE t1;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_sp_bf_abort.result b/mysql-test/suite/galera/r/galera_sp_bf_abort.result
index 918a8a8bf1c..9216cc4fa5a 100644
--- a/mysql-test/suite/galera/r/galera_sp_bf_abort.result
+++ b/mysql-test/suite/galera/r/galera_sp_bf_abort.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
@@ -141,8 +143,6 @@ SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
connection node_1;
-Warnings:
-Error 1317 Query execution was interrupted
SET SESSION wsrep_sync_wait = default;
SELECT * FROM t1;
f1 f2
@@ -182,8 +182,6 @@ SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
connection node_1;
-Warnings:
-Error 1317 Query execution was interrupted
SET SESSION wsrep_sync_wait = default;
SELECT * FROM t1;
f1 f2
@@ -223,8 +221,6 @@ SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
connection node_1;
-Warnings:
-Error 1317 Query execution was interrupted
SET SESSION wsrep_sync_wait = default;
SELECT * FROM t1;
f1 f2
diff --git a/mysql-test/suite/galera/r/galera_sp_insert_parallel.result b/mysql-test/suite/galera/r/galera_sp_insert_parallel.result
new file mode 100644
index 00000000000..3f072be7004
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sp_insert_parallel.result
@@ -0,0 +1,41 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+CREATE PROCEDURE proc_insert()
+BEGIN
+DECLARE i INT;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET i = 0;
+WHILE i < 1000 DO
+INSERT IGNORE INTO t1 (f1, f2)
+VALUES (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+(FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15));
+SET i = i + 1;
+END WHILE;
+END|
+connection node_1;
+SELECT 0;
+0
+0
+SET SESSION wsrep_sync_wait = 0;
+CALL proc_insert;
+connection node_2;
+SELECT 0;
+0
+0
+SET SESSION wsrep_sync_wait = 0;
+CALL proc_insert;
+connection node_1;
+SET SESSION wsrep_sync_wait = default;
+connection node_2;
+SET SESSION wsrep_sync_wait = default;
+connection node_1;
+DROP PROCEDURE proc_insert;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_split_brain.result b/mysql-test/suite/galera/r/galera_split_brain.result
index 7c669e5516a..374fb31afd1 100644
--- a/mysql-test/suite/galera/r/galera_split_brain.result
+++ b/mysql-test/suite/galera/r/galera_split_brain.result
@@ -1,12 +1,16 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
call mtr.add_suppression("WSREP: TO isolation failed for: ");
connection node_1;
+call mtr.add_suppression("CREATE TABLE isolation failure");
connection node_2;
Killing server ...
connection node_1;
+SET SESSION lock_wait_timeout= 3;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
-ERROR 40001: WSREP replication failed. Check your wsrep connection state and retry the query.
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
connection node_2;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
disconnect node_2;
diff --git a/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result b/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result
index 14407c917a1..e9f81192386 100644
--- a/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result
+++ b/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET SESSION sql_log_bin = 0;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/galera_ssl.result b/mysql-test/suite/galera/r/galera_ssl.result
index 022d06319b8..ec3b717e3f3 100644
--- a/mysql-test/suite/galera/r/galera_ssl.result
+++ b/mysql-test/suite/galera/r/galera_ssl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
diff --git a/mysql-test/suite/galera/r/galera_ssl_compression.result b/mysql-test/suite/galera/r/galera_ssl_compression.result
index 333d646376c..0acc4b97eea 100644
--- a/mysql-test/suite/galera/r/galera_ssl_compression.result
+++ b/mysql-test/suite/galera/r/galera_ssl_compression.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
diff --git a/mysql-test/suite/galera/r/galera_ssl_upgrade.result b/mysql-test/suite/galera/r/galera_ssl_upgrade.result
index 32b5cf10757..9993b86e0e9 100644
--- a/mysql-test/suite/galera/r/galera_ssl_upgrade.result
+++ b/mysql-test/suite/galera/r/galera_ssl_upgrade.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
call mtr.add_suppression("WSREP: write_handler().*");
connection node_2;
@@ -24,6 +26,7 @@ connection node_1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
+connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: write_handler().*");
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_sst_encrypted.result b/mysql-test/suite/galera/r/galera_sst_encrypted.result
index bd464267e98..52ca6e06bae 100644
--- a/mysql-test/suite/galera/r/galera_sst_encrypted.result
+++ b/mysql-test/suite/galera/r/galera_sst_encrypted.result
@@ -1,194 +1,348 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
index 819bcba7cac..3aad611cacb 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_sst_mariabackup.result 2018-11-21 16:50:35.766982279 +0200
-+++ r/galera_sst_mariabackup.reject 2018-11-22 09:20:10.344408266 +0200
-@@ -286,5 +286,113 @@
+--- r/galera_sst_mariabackup.result
++++ r/galera_sst_mariabackup.reject
+@@ -516,5 +516,189 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,58 +59,134 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup.result b/mysql-test/suite/galera/r/galera_sst_mariabackup.result
index fdb5883b590..caf602c017c 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup.result
@@ -1,290 +1,520 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
index f06da63561a..870b12de3c9 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_sst_mariabackup_data_dir.result 2018-12-12 13:59:56.525554689 +0100
-+++ r/galera_sst_mariabackup_data_dir.reject 2018-12-12 14:33:50.868181956 +0100
-@@ -286,5 +286,113 @@
+--- r/galera_sst_mariabackup_data_dir.result 2021-04-10 14:26:02.798965488 +0300
++++ r/galera_sst_mariabackup_data_dir,debug.reject 2021-04-10 14:54:44.825538224 +0300
+@@ -516,5 +516,189 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,58 +59,134 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result
index fdb5883b590..caf602c017c 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result
@@ -1,290 +1,520 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key-openssl.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key-openssl.result
index 990e0a29506..409da775d9a 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key-openssl.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key-openssl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT 1;
1
1
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result
index 8048cafecd8..f3a140c5dce 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT 1;
1
1
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key_server.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key_server.result
index 8048cafecd8..f3a140c5dce 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key_server.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key_server.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT 1;
1
1
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery,debug.rdiff
index 819bcba7cac..bad8355b514 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_sst_mariabackup.result 2018-11-21 16:50:35.766982279 +0200
-+++ r/galera_sst_mariabackup.reject 2018-11-22 09:20:10.344408266 +0200
-@@ -286,5 +286,113 @@
+--- r/galera_sst_mariabackup.result 2021-04-10 14:25:04.142716409 +0300
++++ r/galera_sst_mariabackup,debug.reject 2021-04-10 14:53:30.033162191 +0300
+@@ -516,5 +516,189 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,58 +59,134 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery.result
index fdb5883b590..caf602c017c 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_force_recovery.result
@@ -1,290 +1,520 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive,debug.rdiff
index e6757c7561e..a9c796da607 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive,debug.rdiff
@@ -1,27 +1,27 @@
--- r/galera_sst_mariabackup_logarchive.result
+++ r/galera_sst_mariabackup_logarchive.reject
-@@ -286,5 +286,113 @@
+@@ -516,5 +516,189 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,58 +59,134 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive.result
index 09e49e6f717..c2bbb94653a 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_logarchive.result
@@ -1,292 +1,522 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_2;
connection node_1;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_lost_found.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_lost_found.result
index b2a2005748f..2d5705c6e35 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_lost_found.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_lost_found.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_qpress.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_qpress.result
index 684a6d00c7e..8e7d19ce3a2 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_qpress.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_qpress.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT 1;
1
1
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result
index 9180ed5e421..568c06de94c 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that starts from a clean var directory
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
index 3eadee615ed..e73a27ad0ac 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
@@ -1,27 +1,27 @@
---- galera_sst_mysqldump.result
-+++ galera_sst_mysqldump,debug.reject
-@@ -388,6 +388,114 @@
+--- r/galera_sst_mysqldump.result 2021-04-18 13:15:29.909314729 +0300
++++ r/galera_sst_mysqldump.reject 2021-04-18 13:50:47.096965646 +0300
+@@ -698,6 +698,190 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,58 +59,134 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump.result b/mysql-test/suite/galera/r/galera_sst_mysqldump.result
index 6bdc933a9fc..e63b6f6f98d 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump.result
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
Setting SST method to mysqldump ...
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
@@ -11,385 +13,691 @@ connection node_1;
connection node_2;
Performing State Transfer on a server that has been temporarily disconnected
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_disconnect_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
@@ -400,3 +708,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
index aee525936d1..7d73f7a6ae6 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
@@ -1,27 +1,27 @@
---- r/galera_sst_mysqldump_with_key.result 2019-07-04 09:39:54.993971174 +0300
-+++ r/galera_sst_mysqldump_with_key.reject 2019-07-04 09:55:34.171175305 +0300
-@@ -204,6 +204,114 @@
+--- r/galera_sst_mysqldump_with_key.result 2021-04-10 14:33:29.441606621 +0300
++++ r/galera_sst_mysqldump_with_key,debug.reject 2021-04-10 15:02:45.367881573 +0300
+@@ -358,6 +358,190 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,58 +59,134 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
index de52ac2fd1d..fcb250f02ce 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
Setting SST method to mysqldump ...
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
@@ -16,194 +18,346 @@ GRANT USAGE ON *.* TO sslsst REQUIRE SSL;
SET GLOBAL wsrep_sst_auth = 'sslsst:';
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
@@ -214,4 +368,5 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
DROP USER sslsst;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff
index 7b10cd23b60..87f8a463bd0 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff
@@ -1,27 +1,27 @@
--- galera_sst_rsync.result
+++ galera_sst_rsync.reject
-@@ -286,3 +286,111 @@
+@@ -516,3 +516,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync.result b/mysql-test/suite/galera/r/galera_sst_rsync.result
index ff85a7d6c0f..8b531bc6a3f 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync.result
@@ -1,288 +1,518 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff
index 23ed9862ea4..14f67770572 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff
@@ -1,27 +1,27 @@
---- suite/galera/r/galera_sst_rsync2.result
-+++ suite/galera/r/galera_sst_rsync2.reject
-@@ -286,3 +286,111 @@
+--- r/galera_sst_rsync2.result 2021-04-10 14:34:48.646288119 +0300
++++ r/galera_sst_rsync2,debug.reject 2021-04-10 15:04:10.276286996 +0300
+@@ -516,3 +516,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync2.result b/mysql-test/suite/galera/r/galera_sst_rsync2.result
index ff85a7d6c0f..8b531bc6a3f 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync2.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync2.result
@@ -1,288 +1,518 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_binlogname.result b/mysql-test/suite/galera/r/galera_sst_rsync_binlogname.result
index 0f0a673947c..9b56a09d369 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_binlogname.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_binlogname.result
@@ -1,96 +1,174 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff
index e307a2ff0f9..00b42d53b51 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff
@@ -1,27 +1,27 @@
---- suite/galera/r/galera_sst_rsync_data_dir.result 2018-09-13 14:52:50.848220719 +0200
-+++ suite/galera/r/galera_sst_rsync_data_dir.reject 2018-09-13 15:03:32.339135247 +0200
-@@ -286,3 +286,111 @@
+--- r/galera_sst_rsync_data_dir.result 2021-04-10 14:35:28.090610315 +0300
++++ r/galera_sst_rsync_data_dir,debug.reject 2021-04-10 15:50:26.945234998 +0300
+@@ -516,3 +516,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +32,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +59,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result
index ff85a7d6c0f..8b531bc6a3f 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result
@@ -1,288 +1,518 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff
new file mode 100644
index 00000000000..59417d4d6e4
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff
@@ -0,0 +1,191 @@
+--- r/galera_sst_rsync_encrypt_with_server.result
++++ r/galera_sst_rsync_encrypt_with_server,debug.reject
+@@ -519,4 +519,188 @@
+ 1
+ DROP TABLE t1;
+ COMMIT;
++Performing State Transfer on a server that has been killed and restarted
++while a DDL was in progress on it
++connection node_1;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
++connection node_2;
++START TRANSACTION;
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
++COMMIT;
++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
++ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
++SET wsrep_sync_wait = 0;
++Killing server ...
++connection node_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
++COMMIT;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
++connection node_2;
++Performing --wsrep-recover ...
++connection node_2;
++Starting server ...
++Using --wsrep-start-position when starting mysqld ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
++COMMIT;
++connection node_1;
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
++COMMIT;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
++COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
++ROLLBACK;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++COMMIT;
++connection node_1;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++DROP TABLE t1;
++COMMIT;
++SET GLOBAL debug_dbug = $debug_orig;
+ include/assert_grep.inc [Using stunnel for SSL encryption]
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result
index 170ba62dd12..be8c845bdcf 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result
@@ -1,398 +1,520 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
SET AUTOCOMMIT=ON;
-connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-DROP TABLE t1;
-COMMIT;
-SET AUTOCOMMIT=ON;
-Performing State Transfer on a server that has been killed and restarted
-while a DDL was in progress on it
-connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-connection node_2;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
-SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
connection node_1;
-ALTER TABLE t1 ADD COLUMN f2 INTEGER;
-connection node_2;
-SET wsrep_sync_wait = 0;
-Killing server ...
-connection node_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-COMMIT;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-connection node_2;
-Performing --wsrep-recover ...
-connection node_2;
-Starting server ...
-Using --wsrep-start-position when starting mysqld ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-COMMIT;
-connection node_1;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-COMMIT;
-connection node_1a_galera_st_kill_slave_ddl;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-ROLLBACK;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
SET AUTOCOMMIT=ON;
-connection node_1;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
-SET GLOBAL debug_dbug = $debug_orig;
include/assert_grep.inc [Using stunnel for SSL encryption]
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key,debug.rdiff
new file mode 100644
index 00000000000..0d654130486
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key,debug.rdiff
@@ -0,0 +1,191 @@
+--- r/galera_sst_rsync_encrypt_with_key.result
++++ r/galera_sst_rsync_encrypt_with_key,debug.reject
+@@ -519,4 +519,188 @@
+ 1
+ DROP TABLE t1;
+ COMMIT;
++Performing State Transfer on a server that has been killed and restarted
++while a DDL was in progress on it
++connection node_1;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
++connection node_2;
++START TRANSACTION;
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
++COMMIT;
++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
++ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
++SET wsrep_sync_wait = 0;
++Killing server ...
++connection node_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
++COMMIT;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
++connection node_2;
++Performing --wsrep-recover ...
++connection node_2;
++Starting server ...
++Using --wsrep-start-position when starting mysqld ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
++COMMIT;
++connection node_1;
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
++COMMIT;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
++COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
++ROLLBACK;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++COMMIT;
++connection node_1;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++DROP TABLE t1;
++COMMIT;
++SET GLOBAL debug_dbug = $debug_orig;
+ include/assert_grep.inc [Using stunnel for SSL encryption]
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result
index 170ba62dd12..be8c845bdcf 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result
@@ -1,398 +1,520 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
SET AUTOCOMMIT=ON;
-connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-DROP TABLE t1;
-COMMIT;
-SET AUTOCOMMIT=ON;
-Performing State Transfer on a server that has been killed and restarted
-while a DDL was in progress on it
-connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-connection node_2;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
-SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
connection node_1;
-ALTER TABLE t1 ADD COLUMN f2 INTEGER;
-connection node_2;
-SET wsrep_sync_wait = 0;
-Killing server ...
-connection node_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-COMMIT;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-connection node_2;
-Performing --wsrep-recover ...
-connection node_2;
-Starting server ...
-Using --wsrep-start-position when starting mysqld ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-COMMIT;
-connection node_1;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-COMMIT;
-connection node_1a_galera_st_kill_slave_ddl;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-ROLLBACK;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
SET AUTOCOMMIT=ON;
-connection node_1;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
-SET GLOBAL debug_dbug = $debug_orig;
include/assert_grep.inc [Using stunnel for SSL encryption]
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server,debug.rdiff
new file mode 100644
index 00000000000..59417d4d6e4
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server,debug.rdiff
@@ -0,0 +1,191 @@
+--- r/galera_sst_rsync_encrypt_with_server.result
++++ r/galera_sst_rsync_encrypt_with_server,debug.reject
+@@ -519,4 +519,188 @@
+ 1
+ DROP TABLE t1;
+ COMMIT;
++Performing State Transfer on a server that has been killed and restarted
++while a DDL was in progress on it
++connection node_1;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
++connection node_2;
++START TRANSACTION;
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
++COMMIT;
++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
++ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
++SET wsrep_sync_wait = 0;
++Killing server ...
++connection node_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
++COMMIT;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
++connection node_2;
++Performing --wsrep-recover ...
++connection node_2;
++Starting server ...
++Using --wsrep-start-position when starting mysqld ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
++COMMIT;
++connection node_1;
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
++COMMIT;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
++COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
++ROLLBACK;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++COMMIT;
++connection node_1;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++DROP TABLE t1;
++COMMIT;
++SET GLOBAL debug_dbug = $debug_orig;
+ include/assert_grep.inc [Using stunnel for SSL encryption]
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result
index 170ba62dd12..be8c845bdcf 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result
@@ -1,398 +1,520 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
SET AUTOCOMMIT=ON;
-connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
-DROP TABLE t1;
-COMMIT;
-SET AUTOCOMMIT=ON;
-Performing State Transfer on a server that has been killed and restarted
-while a DDL was in progress on it
-connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-connection node_2;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
-SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
connection node_1;
-ALTER TABLE t1 ADD COLUMN f2 INTEGER;
-connection node_2;
-SET wsrep_sync_wait = 0;
-Killing server ...
-connection node_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-COMMIT;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-connection node_2;
-Performing --wsrep-recover ...
-connection node_2;
-Starting server ...
-Using --wsrep-start-position when starting mysqld ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-COMMIT;
-connection node_1;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-COMMIT;
-connection node_1a_galera_st_kill_slave_ddl;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-ROLLBACK;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
SET AUTOCOMMIT=ON;
-connection node_1;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
-SET GLOBAL debug_dbug = $debug_orig;
include/assert_grep.inc [Using stunnel for SSL encryption]
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result b/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result
index 0f0a673947c..9b56a09d369 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result
@@ -1,96 +1,174 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto,debug.rdiff
index 4f9a4ddd32a..5bc47c58303 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto,debug.rdiff
@@ -1,27 +1,25 @@
---- galera_sst_rsync_recv_auto.result
-+++ galera_sst_rsync_recv_auto.reject
-@@ -286,3 +286,111 @@
+@@ -516,3 +516,187 @@
+ 1
DROP TABLE t1;
COMMIT;
- SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
-+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
-+INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
+connection node_2;
+START TRANSACTION;
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
-+INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
@@ -32,26 +30,26 @@
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
@@ -59,56 +57,132 @@
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
-+SET AUTOCOMMIT=ON;
+connection node_1;
-+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-+COUNT(*) = 2
-+1
-+SELECT COUNT(*) = 35 FROM t1;
-+COUNT(*) = 35
-+1
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
-+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto.result b/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto.result
index ff85a7d6c0f..8b531bc6a3f 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_recv_auto.result
@@ -1,288 +1,518 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_shutdown_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Shutting down server ...
connection node_1;
Cleaning var directory ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_clean_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_kill_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_status_cluster.result b/mysql-test/suite/galera/r/galera_status_cluster.result
index ad92a51b775..9db0b88adc9 100644
--- a/mysql-test/suite/galera/r/galera_status_cluster.result
+++ b/mysql-test/suite/galera/r/galera_status_cluster.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
diff --git a/mysql-test/suite/galera/r/galera_status_local_index.result b/mysql-test/suite/galera/r/galera_status_local_index.result
index 8c36b60cc5f..c67498fff9f 100644
--- a/mysql-test/suite/galera/r/galera_status_local_index.result
+++ b/mysql-test/suite/galera/r/galera_status_local_index.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE wsrep_local_indexes (wsrep_local_index INTEGER);
INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index'));
diff --git a/mysql-test/suite/galera/r/galera_status_local_state.result b/mysql-test/suite/galera/r/galera_status_local_state.result
index 65713f1975c..3fe988ee6ac 100644
--- a/mysql-test/suite/galera/r/galera_status_local_state.result
+++ b/mysql-test/suite/galera/r/galera_status_local_state.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
VARIABLE_VALUE = 4
1
diff --git a/mysql-test/suite/galera/r/galera_suspend_slave.result b/mysql-test/suite/galera/r/galera_suspend_slave.result
index 07433399081..ce49b491778 100644
--- a/mysql-test/suite/galera/r/galera_suspend_slave.result
+++ b/mysql-test/suite/galera/r/galera_suspend_slave.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result
index def771ff88d..793da3246ff 100644
--- a/mysql-test/suite/galera/r/galera_sync_wait_show.result
+++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result
@@ -1,4 +1,6 @@
connection node_2;
+connection node_1;
+connection node_2;
SET SESSION wsrep_sync_wait = 8;
connection node_1;
CREATE DATABASE db1;
diff --git a/mysql-test/suite/galera/r/galera_sync_wait_upto.result b/mysql-test/suite/galera/r/galera_sync_wait_upto.result
new file mode 100644
index 00000000000..7d691e105da
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sync_wait_upto.result
@@ -0,0 +1,43 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SELECT WSREP_SYNC_WAIT_UPTO_GTID(NULL);
+ERROR HY000: Incorrect arguments to wsrep_sync_wait_upto_gtid
+SELECT WSREP_SYNC_WAIT_UPTO_GTID('a');
+ERROR HY000: Incorrect arguments to wsrep_sync_wait_upto_gtid
+SELECT WSREP_SYNC_WAIT_UPTO_GTID(2);
+ERROR HY000: Incorrect arguments to wsrep_sync_wait_upto_gtid
+WSREP_SYNC_WAIT_UPTO
+1
+WSREP_SYNC_WAIT_UPTO
+1
+WSREP_SYNC_WAIT_UPTO
+1
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection node_2;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+connection node_1;
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+connection node_2;
+WSREP_SYNC_WAIT_UPTO
+1
+gtid_current = gtid_first
+1
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+WSREP_SYNC_WAIT_UPTO
+1
+seqno_current = seqno_second
+1
+SET DEBUG_SYNC = "RESET";
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_to_error.result b/mysql-test/suite/galera/r/galera_to_error.result
deleted file mode 100644
index 545029bf069..00000000000
--- a/mysql-test/suite/galera/r/galera_to_error.result
+++ /dev/null
@@ -1,30 +0,0 @@
-connection node_1;
-connection node_2;
-connection node_1;
-call mtr.add_suppression("WSREP: TO isolation failed for: ");
-CREATE TABLE t2(a int not null auto_increment primary key, b int, key(b)) engine=innodb;
-INSERT INTO t2 values (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6);
-connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1a;
-BEGIN;
-UPDATE t2 set b = b + 20 where b BETWEEN 2 and 5;;
-connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1b;
-connection node_2;
-Killing server ...
-connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_1c;
-CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-Got one of the listed errors
-Got one of the listed errors
-CREATE UNIQUE INDEX b2 ON t2(b);
-Got one of the listed errors
-connection node_1;
-disconnect node_1a;
-disconnect node_1b;
-disconnect node_1c;
-connection node_2;
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
-DROP TABLE t2;
-disconnect node_2;
-disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result b/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result
index 68b67977550..a9923ba4211 100644
--- a/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result
+++ b/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_error.result b/mysql-test/suite/galera/r/galera_toi_ddl_error.result
index dafad153867..386dc28bed3 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_error.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_error.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
@@ -19,3 +21,6 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
DROP TABLE ten;
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query.");
+connection node_2;
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query.");
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
index a972394f87c..2493075b635 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result b/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result
index a5db90aa965..a7966e36133 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_locking.result b/mysql-test/suite/galera/r/galera_toi_ddl_locking.result
index 68743c024a0..bbe181ce6f5 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_locking.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_locking.result
@@ -1,32 +1,46 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
connection node_1;
-SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
+SET DEBUG_SYNC= 'RESET';
+SET DEBUG_SYNC = 'alter_table_before_open_tables SIGNAL before_open_tables WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC= 'now WAIT_FOR before_open_tables';
+SET wsrep_retry_autocommit=0;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
-INSERT INTO t1 VALUES (1);
-Got one of the listed errors
+INSERT INTO t1 VALUES (1);;
+connection node_1c;
+SET SESSION wsrep_sync_wait = 0;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t2;
+COUNT(*) = 0
+1
INSERT INTO t2 VALUES (1);
COMMIT;;
connection node_1b;
SET SESSION wsrep_sync_wait = 0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
-COUNT(*) = 1
-1
SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
+COUNT(*) = 1
+1
SET DEBUG_SYNC= 'now SIGNAL continue';
connection node_1a;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1c;
connection node_1;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
@@ -34,6 +48,7 @@ COUNT(*) = 0
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
+SET debug_sync='RESET';
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
@@ -41,9 +56,5 @@ COUNT(*) = 0
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
-connection node_1;
-SET DEBUG_SYNC= 'RESET';
-connection node_1b;
-SET DEBUG_SYNC= 'RESET';
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result b/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result
index 3844fa97d82..5412cd3faee 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
connection node_2;
ALTER TABLE t1 ADD COLUMN f3 INTEGER; INSERT INTO t1 (f1, f2) VALUES (DEFAULT, 123);;
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result b/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result
index 722bb9d9e12..db702b1a59e 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_toi_drop_database.result b/mysql-test/suite/galera/r/galera_toi_drop_database.result
index 6d88c8ea230..48056c70126 100644
--- a/mysql-test/suite/galera/r/galera_toi_drop_database.result
+++ b/mysql-test/suite/galera/r/galera_toi_drop_database.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE DATABASE database1;
USE database1;
@@ -14,9 +16,9 @@ INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, te
connection node_2;
DROP DATABASE database1;;
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1a;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
connection node_1;
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
diff --git a/mysql-test/suite/galera/r/galera_toi_ftwrl.result b/mysql-test/suite/galera/r/galera_toi_ftwrl.result
index 0f13e95b689..fdc8b294c1c 100644
--- a/mysql-test/suite/galera/r/galera_toi_ftwrl.result
+++ b/mysql-test/suite/galera/r/galera_toi_ftwrl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
FLUSH TABLES WITH READ LOCK;
diff --git a/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result b/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result
index f5cc14ed0f1..ee8c826fd18 100644
--- a/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result
+++ b/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
@@ -8,7 +10,7 @@ connection node_2a;
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=EXCLUSIVE;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1;
INSERT INTO t1 VALUES (2, 2);
SELECT COUNT(*) = 2 FROM t1;
diff --git a/mysql-test/suite/galera/r/galera_toi_lock_shared.result b/mysql-test/suite/galera/r/galera_toi_lock_shared.result
index 950c4d83c70..ec54d1019e9 100644
--- a/mysql-test/suite/galera/r/galera_toi_lock_shared.result
+++ b/mysql-test/suite/galera/r/galera_toi_lock_shared.result
@@ -1,15 +1,26 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=SHARED;
connection node_1;
INSERT INTO t1 VALUES (2, 2);
-SELECT COUNT(*) = 2 FROM t1;
-COUNT(*) = 2
-1
+SELECT COUNT(*) AS EXPECT_2 FROM t1;
+EXPECT_2
+2
+SELECT * FROM t1;
+id f2
+1 NULL
+2 2
connection node_2;
INSERT INTO t1 VALUES (3, 3);
-SELECT COUNT(*) = 3 FROM t1;
-COUNT(*) = 3
-1
+SELECT COUNT(*) AS EXPECT_3 FROM t1;
+EXPECT_3
+3
+SELECT * FROM t1;
+id f2
+1 NULL
+2 2
+3 3
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_toi_truncate.result b/mysql-test/suite/galera/r/galera_toi_truncate.result
index c92da869a02..bd3ee0dd75e 100644
--- a/mysql-test/suite/galera/r/galera_toi_truncate.result
+++ b/mysql-test/suite/galera/r/galera_toi_truncate.result
@@ -1,16 +1,26 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key auto_increment, f1 INTEGER) ENGINE=InnoDB;
connection node_2;
-SET SESSION wsrep_retry_autocommit = 0;
-INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6, ten AS a7, ten AS a8;
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
-connection node_2a;
+set session wsrep_sync_wait=0;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+connection node_2;
+INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1;
+connection node_1b;
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_1;
+TRUNCATE TABLE t1;;
+connection node_1b;
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "";
+SET DEBUG_SYNC = "RESET";
connection node_1;
-TRUNCATE TABLE t1;
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
@@ -18,5 +28,6 @@ connection node_1;
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
+disconnect node_1b;
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_transaction_read_only.result b/mysql-test/suite/galera/r/galera_transaction_read_only.result
index b388f195fb1..55923f58b65 100644
--- a/mysql-test/suite/galera/r/galera_transaction_read_only.result
+++ b/mysql-test/suite/galera/r/galera_transaction_read_only.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_transaction_replay.result b/mysql-test/suite/galera/r/galera_transaction_replay.result
index 7fd837433d2..272086c4eba 100644
--- a/mysql-test/suite/galera/r/galera_transaction_replay.result
+++ b/mysql-test/suite/galera/r/galera_transaction_replay.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (2, 'a');
@@ -9,19 +11,73 @@ SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
f1 f2
2 a
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
connection node_1;
-COMMIT;;
+COMMIT;
connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+wsrep_local_replays
+1
connection node_2;
-UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1 f2
+2 a
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_1;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
COUNT(*) = 1
@@ -46,22 +102,34 @@ SELECT * FROM t1;
i j
1 0
3 0
+SET AUTOCOMMIT=ON;
PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0";
connection node_1a;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
-connection node_1;
-EXECUTE stmt1;;
-connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
-SET SESSION wsrep_on = 0;
-SET SESSION wsrep_on = 1;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
INSERT INTO t1 VALUES(2,2);
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+SET SESSION wsrep_sync_wait=0;
+EXECUTE stmt1;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_1;
+SET SESSION wsrep_sync_wait=7;
SELECT * FROM t1;
i j
1 1
@@ -74,5 +142,7 @@ i j
2 2
3 1
connection node_1;
+wsrep_local_replays
+1
DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_trigger.result b/mysql-test/suite/galera/r/galera_trigger.result
index 059f8ef13f9..2a31a104404 100644
--- a/mysql-test/suite/galera/r/galera_trigger.result
+++ b/mysql-test/suite/galera/r/galera_trigger.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE IF NOT EXISTS t1 (id int(10) not null primary key) engine=innodb;
CREATE OR REPLACE TRIGGER tr1
BEFORE INSERT ON t1 FOR EACH ROW
diff --git a/mysql-test/suite/galera/r/galera_truncate.result b/mysql-test/suite/galera/r/galera_truncate.result
index 4f3d72dbca7..c9a4bc854f8 100644
--- a/mysql-test/suite/galera/r/galera_truncate.result
+++ b/mysql-test/suite/galera/r/galera_truncate.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
@@ -30,6 +32,17 @@ SELECT AUTO_INCREMENT = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME IN ('t
AUTO_INCREMENT = 1
1
1
+connection node_1;
+TRUNCATE TABLE mysql.user;
+ERROR 42S02: Table 'mysql.user' doesn't exist
+TRUNCATE TABLE performance_schema.threads;
+ERROR HY000: Invalid performance_schema usage
+TRUNCATE TABLE information_schema.tables;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+TRUNCATE TABLE mysql.innodb_index_stats;
+TRUNCATE TABLE foo.bar;
+ERROR 42S02: Table 'foo.bar' doesn't exist
+TRUNCATE TABLE t1;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
diff --git a/mysql-test/suite/galera/r/galera_truncate_temporary.result b/mysql-test/suite/galera/r/galera_truncate_temporary.result
index 183ebd9d24a..81373bda739 100644
--- a/mysql-test/suite/galera/r/galera_truncate_temporary.result
+++ b/mysql-test/suite/galera/r/galera_truncate_temporary.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TEMPORARY TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 VALUES (1);
TRUNCATE TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_unicode_identifiers.result b/mysql-test/suite/galera/r/galera_unicode_identifiers.result
index 77848bc751f..5db1be8c910 100644
--- a/mysql-test/suite/galera/r/galera_unicode_identifiers.result
+++ b/mysql-test/suite/galera/r/galera_unicode_identifiers.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_sync_wait = 15;
connection node_2;
SET GLOBAL wsrep_sync_wait = 15;
diff --git a/mysql-test/suite/galera/r/galera_unicode_pk.result b/mysql-test/suite/galera/r/galera_unicode_pk.result
index 0e8965a76e3..8ed1a3a077e 100644
--- a/mysql-test/suite/galera/r/galera_unicode_pk.result
+++ b/mysql-test/suite/galera/r/galera_unicode_pk.result
@@ -1,3 +1,6 @@
+connection node_2;
+connection node_1;
+connection node_1;
CREATE TABLE t1 (
f1 VARCHAR(255) PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -18,7 +21,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT f1 = 'текÑÑ‚2' FROM t1;
f1 = 'текÑÑ‚2'
1
@@ -35,6 +38,6 @@ connection node_2;
COMMIT;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
COMMIT;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_update_limit.result b/mysql-test/suite/galera/r/galera_update_limit.result
index 20a94e6f504..bd021136ac2 100644
--- a/mysql-test/suite/galera/r/galera_update_limit.result
+++ b/mysql-test/suite/galera/r/galera_update_limit.result
@@ -1,7 +1,9 @@
+connection node_2;
+connection node_1;
connection node_1;
-CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
+CREATE TABLE ten (f1 INTEGER not null primary key) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 SELECT f1 FROM ten ORDER BY RAND();
connection node_2;
UPDATE IGNORE t1 SET f1 = FLOOR(1 + (RAND() * 10)) ORDER BY RAND() LIMIT 5;
diff --git a/mysql-test/suite/galera/r/galera_v1_row_events.result b/mysql-test/suite/galera/r/galera_v1_row_events.result
index b0ea2293119..80fe2fb6d8d 100644
--- a/mysql-test/suite/galera/r/galera_v1_row_events.result
+++ b/mysql-test/suite/galera/r/galera_v1_row_events.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_var_OSU_method.result b/mysql-test/suite/galera/r/galera_var_OSU_method.result
index 18e8bd2271a..2b0a713e86b 100644
--- a/mysql-test/suite/galera/r/galera_var_OSU_method.result
+++ b/mysql-test/suite/galera/r/galera_var_OSU_method.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
SET SESSION wsrep_OSU_method = "RSU";
diff --git a/mysql-test/suite/galera/r/galera_var_OSU_method2.result b/mysql-test/suite/galera/r/galera_var_OSU_method2.result
index 0e3751645a8..ca4f617d903 100644
--- a/mysql-test/suite/galera/r/galera_var_OSU_method2.result
+++ b/mysql-test/suite/galera/r/galera_var_OSU_method2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
SET SESSION wsrep_OSU_method = "TOI";
diff --git a/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result b/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result
index ba117b4c2d5..86c30fa4b23 100644
--- a/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result
+++ b/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET GLOBAL wsrep_auto_increment_control = OFF;
SET GLOBAL auto_increment_increment = 1;
@@ -59,7 +61,7 @@ connection node_1a;
COMMIT;
connection node_2a;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1a;
SELECT * FROM t1;
f1 node
diff --git a/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result b/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
index b71cf4c831d..48c649b66a8 100644
--- a/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
+++ b/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, node VARCHAR(10)) ENGINE=InnoDB;
SELECT @@auto_increment_increment = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size');
diff --git a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result
index ca3844bf6bf..f5472aa931f 100644
--- a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result
+++ b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_certify_nonPK = OFF;
connection node_2;
SET GLOBAL wsrep_certify_nonPK = OFF;
diff --git a/mysql-test/suite/galera/r/galera_var_cluster_address.result b/mysql-test/suite/galera/r/galera_var_cluster_address.result
index e254b601b64..9cfe5a8f765 100644
--- a/mysql-test/suite/galera/r/galera_var_cluster_address.result
+++ b/mysql-test/suite/galera/r/galera_var_cluster_address.result
@@ -1,7 +1,11 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_2;
SET GLOBAL wsrep_cluster_address = 'foo://';
+SHOW STATUS;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET SESSION wsrep_sync_wait=0;
SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
COUNT(*) > 0
@@ -11,7 +15,7 @@ Variable_name Value
wsrep_ready OFF
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
-wsrep_cluster_status non-Primary
+wsrep_cluster_status Disconnected
SHOW STATUS LIKE 'wsrep_local_state';
Variable_name Value
wsrep_local_state 0
@@ -39,7 +43,7 @@ CALL mtr.add_suppression("Failed to initialize backend using 'foo");
CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo");
CALL mtr.add_suppression("gcs connect failed: Socket type not supported");
CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
-CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)");
+CALL mtr.add_suppression("gcs_caused\\(\\) returned -[0-9]+ \\(Software caused connection abort\\)");
CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110");
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
diff --git a/mysql-test/suite/galera/r/galera_var_cluster_conf_id.result b/mysql-test/suite/galera/r/galera_var_cluster_conf_id.result
new file mode 100644
index 00000000000..c78d704d9b1
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_cluster_conf_id.result
@@ -0,0 +1,10 @@
+connection node_2;
+connection node_1;
+connection node_1;
+show status like 'wsrep_cluster_conf_id';
+Variable_name Value
+wsrep_cluster_conf_id #
+connection node_2;
+show status like 'wsrep_cluster_conf_id';
+Variable_name Value
+wsrep_cluster_conf_id #
diff --git a/mysql-test/suite/galera/r/galera_var_desync_on.result b/mysql-test/suite/galera/r/galera_var_desync_on.result
index 26798e51926..6a2e501eee2 100644
--- a/mysql-test/suite/galera/r/galera_var_desync_on.result
+++ b/mysql-test/suite/galera/r/galera_var_desync_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
index 50938d61a4b..240f1802385 100644
--- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result
+++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP has not yet prepared node for application use");
connection node_1;
connection node_2;
@@ -15,7 +17,7 @@ Variable_name Value
wsrep_ready OFF
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
-wsrep_cluster_status non-Primary
+wsrep_cluster_status Disconnected
SELECT * FROM t1;
Got one of the listed errors
SELECT 1 FROM t1;
@@ -51,4 +53,3 @@ i
DROP TABLE t1;
disconnect node_2;
disconnect node_1;
-# End of test
diff --git a/mysql-test/suite/galera/r/galera_var_fkchecks.result b/mysql-test/suite/galera/r/galera_var_fkchecks.result
index 8b1b913a584..42f8085ee1a 100644
--- a/mysql-test/suite/galera/r/galera_var_fkchecks.result
+++ b/mysql-test/suite/galera/r/galera_var_fkchecks.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT PRIMARY KEY,
KEY (id)
diff --git a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
index afe72a10877..3a23f0c8122 100644
--- a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
+++ b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
list of GTID variables :
@@ -80,9 +82,13 @@ connection node_1;
DROP TABLE t1, t2;
#cleanup
connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result
new file mode 100644
index 00000000000..082d2e8eb1d
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result
@@ -0,0 +1,186 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 1;
+connection node_1;
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+DROP TABLE t1;
+SET GLOBAL wsrep_on = OFF;
+CREATE SCHEMA s1;
+SET GLOBAL wsrep_on = ON;
+DROP SCHEMA s1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+DROP INDEX idx1 ON t1;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+ALTER TABLE t1 DROP INDEX idx1;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+SET GLOBAL wsrep_on = ON;
+ALTER TABLE t1 DROP COLUMN f2;
+DROP TABLE t1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+DELETE FROM t1 WHERE f1 = 1;
+connection node_1;
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) as expect_1 FROM t1;
+expect_1
+1
+connection node_2;
+SELECT COUNT(*) as expect_1 FROM t1;
+expect_1
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+connection node_1;
+DELETE FROM t1;
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+DELETE FROM t1 WHERE f1 = 4;
+DELETE FROM t1 WHERE f1 = 5;
+COMMIT;
+SET AUTOCOMMIT=ON;
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM t2 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+connection node_1;
+DELETE t1, t2 FROM t1 JOIN t2 WHERE t1.f1 = t2.f1;
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) as expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1,t2;
+connection node_1;
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+INSERT INTO parent VALUES (1),(2),(3);
+CREATE TABLE child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE) ENGINE=INNODB;
+INSERT INTO child VALUES (1,1),(2,2),(3,3);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM child WHERE parent_id = 2;
+SET SESSION wsrep_on = ON;
+connection node_1;
+DELETE FROM parent;
+SELECT COUNT(*) as expect_0 FROM parent;
+expect_0
+0
+SELECT COUNT(*) as expect_0 FROM child;
+expect_0
+0
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) as expect_0 FROM parent;
+expect_0
+0
+SELECT COUNT(*) as expect_0 FROM child;
+expect_0
+0
+DROP TABLE child, parent;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 4;
+connection node_2;
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 INTEGER);
+DROP TABLE t1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+CALL mtr.add_suppression("Can't find record in 't.*'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query.");
diff --git a/mysql-test/suite/galera/r/galera_var_load_data_splitting.result b/mysql-test/suite/galera/r/galera_var_load_data_splitting.result
index 3e451abbed1..66bc6bc4a9a 100644
--- a/mysql-test/suite/galera/r/galera_var_load_data_splitting.result
+++ b/mysql-test/suite/galera/r/galera_var_load_data_splitting.result
@@ -1,6 +1,10 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL wsrep_load_data_splitting = TRUE;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
connection node_2;
SELECT COUNT(*) = 95000 FROM t1;
COUNT(*) = 95000
@@ -8,5 +12,11 @@ COUNT(*) = 95000
wsrep_last_committed_diff
1
connection node_1;
-SET GLOBAL wsrep_load_data_splitting = 1;;
+SET GLOBAL wsrep_load_data_splitting = 0;;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
+connection node_2;
+SET GLOBAL wsrep_load_data_splitting = 0;;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_log_bin.result b/mysql-test/suite/galera/r/galera_var_log_bin.result
index b0ea2293119..80fe2fb6d8d 100644
--- a/mysql-test/suite/galera/r/galera_var_log_bin.result
+++ b/mysql-test/suite/galera/r/galera_var_log_bin.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
index 6bf67a3fb60..16e868f0485 100644
--- a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
+++ b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_size.result b/mysql-test/suite/galera/r/galera_var_max_ws_size.result
index 53bac04fa86..89c9698eed4 100644
--- a/mysql-test/suite/galera/r/galera_var_max_ws_size.result
+++ b/mysql-test/suite/galera/r/galera_var_max_ws_size.result
@@ -1,8 +1,10 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine=InnoDB;
SET GLOBAL wsrep_max_ws_size = 1024;
INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
-ERROR HY000: Got error 90 "Message too long" during COMMIT
+ERROR HY000: Got error 5 "Input/output error" during COMMIT
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
diff --git a/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result b/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result
index 202633a020e..d7a38d24722 100644
--- a/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result
+++ b/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
SET GLOBAL wsrep_mysql_replication_bundle = 2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_var_node_address.result b/mysql-test/suite/galera/r/galera_var_node_address.result
index 0c85d554229..6b91a9f3ea3 100644
--- a/mysql-test/suite/galera/r/galera_var_node_address.result
+++ b/mysql-test/suite/galera/r/galera_var_node_address.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP: Stray state UUID msg: .*");
call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .*");
call mtr.add_suppression("WSREP: Sending JOIN failed: .*");
diff --git a/mysql-test/suite/galera/r/galera_var_notify_cmd.result b/mysql-test/suite/galera/r/galera_var_notify_cmd.result
index 823407fbba7..432d6c0adbd 100644
--- a/mysql-test/suite/galera/r/galera_var_notify_cmd.result
+++ b/mysql-test/suite/galera/r/galera_var_notify_cmd.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership;
EXPECT_2
diff --git a/mysql-test/suite/galera/r/galera_var_reject_queries.result b/mysql-test/suite/galera/r/galera_var_reject_queries.result
index 22e2e6d764a..33ee9262638 100644
--- a/mysql-test/suite/galera/r/galera_var_reject_queries.result
+++ b/mysql-test/suite/galera/r/galera_var_reject_queries.result
@@ -1,5 +1,6 @@
-call mtr.add_suppression("WSREP has not yet prepared node for application use");
-CREATE TABLE t1 (f1 INTEGER);
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) engine=innodb;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
SET SESSION wsrep_reject_queries = ALL;
@@ -21,7 +22,7 @@ VARIABLE_VALUE = 2
INSERT INTO t1 VALUES (1);
connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET GLOBAL wsrep_reject_queries = NONE;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
index 382466b1387..8968f89d11b 100644
--- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
+++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_replicate_myisam = FALSE;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=MyISAM;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
index 87f8862df7e..314da703e58 100644
--- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
+++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_1;
SET GLOBAL wsrep_replicate_myisam = TRUE;
@@ -51,8 +53,8 @@ COUNT(*) = 0
1
DROP TABLE t1;
connection node_1;
-CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
-CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
@@ -98,13 +100,151 @@ DROP TABLE t2;
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
#
connection node_1;
-CREATE TABLE t1 (i INT) ENGINE=INNODB;
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
i
1
DROP TABLE t1;
connection node_1;
-SET GLOBAL wsrep_replicate_myisam = 0;
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+PREPARE upd from 'update t1 set b = 100 where id = 5';
+PREPARE ins from 'insert into t1 values (11,11)';
+PREPARE del from 'delete from t1 where id = 4';
+PREPARE rep from 'replace into t1 values (12,12),(6,600)';
+EXECUTE upd;
+EXECUTE ins;
+EXECUTE del;
+EXECUTE rep;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+connection node_2;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+CREATE PROCEDURE proc()
+BEGIN
+UPDATE t1 set b = 100 WHERE id = 5;
+INSERT INTO t1 VALUES (11,11);
+DELETE FROM t1 WHERE id = 4;
+REPLACE INTO t1 VALUES (12,12),(6,600);
+COMMIT;
+END|
+CALL proc();
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+connection node_2;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 2
+3 3
+5 100
+6 600
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+DROP PROCEDURE proc;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM;
+CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT) ENGINE=MyISAM;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, NEW.b);
+CREATE TRIGGER tr2 BEFORE UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b),(NULL, NEW.b);
+CREATE TRIGGER tr3 BEFORE DELETE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b);
+INSERT INTO t1 VALUES (11,11);
+UPDATE t1 SET b = 200 WHERE id = 2;
+DELETE FROM t1 where id = 5;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 200
+3 3
+4 4
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+SELECT * FROM t2 ORDER BY id;
+id b
+1 11
+2 2
+3 200
+4 5
+connection node_2;
+SELECT * FROM t1 ORDER BY id;
+id b
+1 1
+2 200
+3 3
+4 4
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+SELECT * FROM t2 ORDER BY id;
+id b
+1 11
+2 2
+3 200
+4 5
+DROP TRIGGER tr1;
+DROP TRIGGER tr2;
+DROP TRIGGER tr3;
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a INT, b INT, UNIQUE(a)) ENGINE=MyISAM;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a=1;
+SET GLOBAL wsrep_replicate_myisam=ON;
+INSERT INTO t1 (a,b) VALUES (10,20);
+connection node_2;
+SELECT * from t1;
+a b
+1 20
+connection node_1;
+DROP TABLE t1;
connection node_2;
-SET GLOBAL wsrep_replicate_myisam = 0;
diff --git a/mysql-test/suite/galera/r/galera_var_retry_autocommit.result b/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
index c0bf6035184..56c2c995402 100644
--- a/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
+++ b/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
@@ -1,59 +1,60 @@
+connection node_2;
+connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 0;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
INSERT INTO t1 (f1) VALUES (2);
connection node_1a;
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+0
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
-INSERT INTO t1 (f1) VALUES (2);
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
+INSERT INTO t1 (f1) VALUES (3);
connection node_1a;
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+0
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 2';
-INSERT INTO t1 VALUES (2);;
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 2';
+INSERT INTO t1 VALUES (4);;
connection node_1a;
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
-SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_rep';
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+0
+SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+0
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
DROP TABLE t1;
@@ -61,11 +62,11 @@ connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 64;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 64';
-INSERT INTO t1 VALUES (2);
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
+INSERT INTO t1 VALUES (5);
connection node_1;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result
index d77a5a54cbf..36dc79bdf82 100644
--- a/mysql-test/suite/galera/r/galera_var_slave_threads.result
+++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result
@@ -1,3 +1,7 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB;
@@ -53,3 +57,4 @@ DROP TABLE t1;
connection node_2;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
NAME
+# End of tests
diff --git a/mysql-test/suite/galera/r/galera_var_sst_auth.result b/mysql-test/suite/galera/r/galera_var_sst_auth.result
index e03576175c5..98d683c3b2d 100644
--- a/mysql-test/suite/galera/r/galera_var_sst_auth.result
+++ b/mysql-test/suite/galera/r/galera_var_sst_auth.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
SELECT @@global.wsrep_sst_auth;
diff --git a/mysql-test/suite/galera/r/galera_var_sync_wait.result b/mysql-test/suite/galera/r/galera_var_sync_wait.result
index 3dfe902767c..80fbd3f3e05 100644
--- a/mysql-test/suite/galera/r/galera_var_sync_wait.result
+++ b/mysql-test/suite/galera/r/galera_var_sync_wait.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-10161: wsrep_sync_wait not enabled when set to 1 in config file
#
diff --git a/mysql-test/suite/galera/r/galera_var_trx_fragment_size.result b/mysql-test/suite/galera/r/galera_var_trx_fragment_size.result
new file mode 100644
index 00000000000..be14c53548b
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_trx_fragment_size.result
@@ -0,0 +1,95 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SET SESSION wsrep_trx_fragment_size=0;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SET GLOBAL wsrep_trx_fragment_size=0;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SET GLOBAL wsrep_trx_fragment_size=-1;
+Warnings:
+Warning 1292 Truncated incorrect wsrep_trx_fragment_size value: '-1'
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SET SESSION wsrep_trx_fragment_size=-1;
+Warnings:
+Warning 1292 Truncated incorrect wsrep_trx_fragment_size value: '-1'
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SET GLOBAL wsrep_trx_fragment_size=100;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 0
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SET SESSION wsrep_trx_fragment_size=100;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SET GLOBAL wsrep_trx_fragment_size='A';
+ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SET SESSION wsrep_trx_fragment_size='A';
+ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SET GLOBAL wsrep_trx_fragment_size=NULL;
+ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SET SESSION wsrep_trx_fragment_size=NULL;
+ERROR 42000: Incorrect argument type to variable 'wsrep_trx_fragment_size'
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+Variable_name Value
+wsrep_trx_fragment_size 100
+SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result b/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result
index 36340f505ff..98cda08845f 100644
--- a/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result
+++ b/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_on = FALSE;
@@ -20,3 +22,111 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3;
COUNT(*) = 1
1
DROP TABLE t1;
+connection node_1;
+connection node_1;
+START TRANSACTION;
+SET SESSION wsrep_on=OFF;
+ERROR 25000: You are not allowed to execute this command in a transaction
+SET GLOBAL wsrep_on=OFF;
+ERROR 25000: You are not allowed to execute this command in a transaction
+COMMIT;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
+connection node_1a;
+SET GLOBAL wsrep_on = OFF;
+connection node_1;
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+Variable_name Value
+wsrep_on ON
+SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
+Variable_name Value
+wsrep_on OFF
+INSERT INTO t1 VALUES (2);
+COMMIT;
+connection node_2;
+SET SESSION wsrep_sync_wait = 15;
+SELECT * FROM t1;
+f1
+1
+2
+connection node_1a;
+SET GLOBAL wsrep_on = ON;
+DROP TABLE t1;
+connection node_2;
+connection node_1;
+SET GLOBAL wsrep_on = OFF;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
+connection node_1b;
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+Variable_name Value
+wsrep_on OFF
+SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
+Variable_name Value
+wsrep_on OFF
+CREATE TABLE t2 (f1 INTEGER);
+DROP TABLE t2;
+SET GLOBAL wsrep_on = ON;
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+Variable_name Value
+wsrep_on ON
+disconnect node_1b;
+connection node_2;
+connection node_1;
+SET GLOBAL wsrep_on = OFF;
+SET SESSION wsrep_on = ON;
+ERROR HY000: Can't enable @@session.wsrep_on, while @@global.wsrep_on is disabled
+SET GLOBAL wsrep_on = ON;
+SET SESSION wsrep_on = ON;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET GLOBAL wsrep_on = OFF;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
+connection node_1b;
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+Variable_name Value
+wsrep_on OFF
+SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
+Variable_name Value
+wsrep_on OFF
+SET GLOBAL wsrep_on = ON;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+COMMIT;
+SELECT * FROM t1;
+f1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+DROP TABLE t1;
+connection node_1;
+connection node_1;
+SET SESSION wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+DROP TABLE t1;
+connection node_2;
+SHOW TABLES;
+Tables_in_test
+connection node_1;
+SET SESSION wsrep_on = ON;
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+connection node_2;
+SHOW TABLES;
+Tables_in_test
+connection node_1;
+DROP TABLE t1;
+SET GLOBAL wsrep_on = ON;
+connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_provider_options.result b/mysql-test/suite/galera/r/galera_var_wsrep_provider_options.result
new file mode 100644
index 00000000000..5ef4a23fd90
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_wsrep_provider_options.result
@@ -0,0 +1,10 @@
+connection node_2;
+connection node_1;
+call mtr.add_suppression("WSREP: Unknown parameter 'a'");
+call mtr.add_suppression("WSREP: Set options returned 7");
+SET GLOBAL wsrep_provider_options=NULL;
+ERROR HY000: Incorrect arguments to SET
+SET GLOBAL wsrep_provider_options='';
+SET GLOBAL wsrep_provider_options=' ';
+SET GLOBAL wsrep_provider_options='a=1';
+ERROR HY000: Incorrect arguments to SET
diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result
new file mode 100644
index 00000000000..3d409f90eac
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result
@@ -0,0 +1,105 @@
+connection node_2;
+connection node_1;
+#
+# wsrep_start_position
+#
+CALL mtr.add_suppression("WSREP: SST failed for position .*");
+SET @wsrep_start_position_global_saved = @@global.wsrep_start_position;
+# default
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+
+# scope
+SELECT @@session.wsrep_start_position;
+ERROR HY000: Variable 'wsrep_start_position' is a GLOBAL variable
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+
+# valid values
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1';
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '00000000-0000-0000-0000-000000000000:0'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+# invalid values
+SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '00000000-0000-0000-0000-000000000000:-2'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2A';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '00000000-0000-0000-0000-000000000000:-2A'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0A';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '00000000-0000-0000-0000-000000000000:0A'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '000000000000000-0000-0000-0000-000000000000:-1'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-12345-123456789012:100'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='12345678-1234-123-12345-123456789012:0';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-123-12345-123456789012:0'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:_99999';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:_99999'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:a';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:a'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='OFF';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'OFF'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position=ON;
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'ON'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of ''
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position=NULL;
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'NULL'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET @@global.wsrep_start_position='junk';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'junk'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+
+# restore the initial value
+SET @@global.wsrep_start_position = @wsrep_start_position_global_saved;
+# End of test
diff --git a/mysql-test/suite/galera/r/galera_virtual_blob.result b/mysql-test/suite/galera/r/galera_virtual_blob.result
index 91952b1d52d..fd1c84f7083 100644
--- a/mysql-test/suite/galera/r/galera_virtual_blob.result
+++ b/mysql-test/suite/galera/r/galera_virtual_blob.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t (f INT GENERATED ALWAYS AS (a+b)VIRTUAL,a INT,b INT,h BLOB);
INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0);
SELECT * from t;
diff --git a/mysql-test/suite/galera/r/galera_virtual_column.result b/mysql-test/suite/galera/r/galera_virtual_column.result
index c4b425964c5..71820ed8225 100644
--- a/mysql-test/suite/galera/r/galera_virtual_column.result
+++ b/mysql-test/suite/galera/r/galera_virtual_column.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE p (id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT) ENGINE = InnoDB;
CREATE TABLE c (id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, pid INT UNSIGNED, bitmap TINYINT UNSIGNED NOT NULL DEFAULT 0, bitmap5 TINYINT UNSIGNED GENERATED ALWAYS AS (bitmap&(1<<5)) VIRTUAL, FOREIGN KEY (pid) REFERENCES p (id) ON DELETE CASCADE ON UPDATE CASCADE);
diff --git a/mysql-test/suite/galera/r/galera_wan.result b/mysql-test/suite/galera/r/galera_wan.result
index 41b915fa5bf..bc4113ffb1c 100644
--- a/mysql-test/suite/galera/r/galera_wan.result
+++ b/mysql-test/suite/galera/r/galera_wan.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*");
CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*");
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
diff --git a/mysql-test/suite/galera/r/galera_wan_restart_ist.result b/mysql-test/suite/galera/r/galera_wan_restart_ist.result
index 58ed9f057da..46865a9c48c 100644
--- a/mysql-test/suite/galera/r/galera_wan_restart_ist.result
+++ b/mysql-test/suite/galera/r/galera_wan_restart_ist.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_wan_restart_sst.result b/mysql-test/suite/galera/r/galera_wan_restart_sst.result
index 2744c91a06b..2433a1d9c48 100644
--- a/mysql-test/suite/galera/r/galera_wan_restart_sst.result
+++ b/mysql-test/suite/galera/r/galera_wan_restart_sst.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_1;
@@ -54,23 +56,23 @@ SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19
19
connection node_2;
-SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-EXPECT_4
-4
+SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 4
+1
SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19
19
connection node_3;
-SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-EXPECT_4
-4
+SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 4
+1
SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19
19
connection node_4;
-SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-EXPECT_4
-4
+SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 4
+1
SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19
19
@@ -79,11 +81,13 @@ DROP TABLE t1;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
connection node_2;
+CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_3;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_4;
+CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_1;
disconnect node_3;
diff --git a/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result b/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result
index 99c680c7b12..e01825fd944 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result b/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
index fa49d8c57c2..59883f1ca7e 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (
f1 VARCHAR(255) PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -20,6 +22,6 @@ connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
include/assert_grep.inc [cluster conflict due to high priority abort for threads]
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
index 3ba34e8ea79..244623d52b7 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE
diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result
index f19dc40205b..0f7cd134156 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'");
call mtr.add_suppression("WSREP\: Set options returned 7");
SET GLOBAL wsrep_provider_options="gmcasts.segment=1";
diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result b/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
deleted file mode 100644
index d56d9340474..00000000000
--- a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
+++ /dev/null
@@ -1,21 +0,0 @@
-connection node_1;
-connection node_2;
-connection node_1;
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-connection node_2;
-SET GLOBAL wsrep_provider='none';
-INSERT INTO t1 VALUES (2);
-connection node_1;
-INSERT INTO t1 VALUES (3);
-connection node_2;
-SET SESSION wsrep_sync_wait = 0;
-INSERT INTO t1 VALUES (4);
-SELECT COUNT(*) = 4 FROM t1;
-COUNT(*) = 4
-1
-connection node_1;
-SELECT COUNT(*) = 3 FROM t1;
-COUNT(*) = 3
-1
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_zero_length_column.result b/mysql-test/suite/galera/r/galera_zero_length_column.result
index 572d94d6756..fa29264704f 100644
--- a/mysql-test/suite/galera/r/galera_zero_length_column.result
+++ b/mysql-test/suite/galera/r/galera_zero_length_column.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY , f2 VARCHAR(0)) ENGINE=InnoDB;
CREATE TABLE t2 (f1 VARCHAR(0)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/grant.result b/mysql-test/suite/galera/r/grant.result
index a2ca72ee8ec..56f56d3b023 100644
--- a/mysql-test/suite/galera/r/grant.result
+++ b/mysql-test/suite/galera/r/grant.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV#6266: Changing password fails on galera cluster
#
@@ -13,7 +15,7 @@ SET PASSWORD FOR 'user_6266'@'localhost' = PASSWORD('newpass');
# On node_2
connection node_2;
SELECT user FROM mysql.user WHERE user='user_6266';
-user
+User
user_6266
DROP USER 'user_6266'@'localhost';
disconnect node_2;
diff --git a/mysql-test/suite/galera/r/lp1276424.result b/mysql-test/suite/galera/r/lp1276424.result
index 363758e0d66..be27ee5374f 100644
--- a/mysql-test/suite/galera/r/lp1276424.result
+++ b/mysql-test/suite/galera/r/lp1276424.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT DEFAULT NULL, UNIQUE KEY i1 (f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
diff --git a/mysql-test/suite/galera/r/lp1347768.result b/mysql-test/suite/galera/r/lp1347768.result
index 7beb167d538..49c8894c081 100644
--- a/mysql-test/suite/galera/r/lp1347768.result
+++ b/mysql-test/suite/galera/r/lp1347768.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE `r8kmb_redirect_links` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`old_url` varchar(255) DEFAULT NULL,
diff --git a/mysql-test/suite/galera/r/lp1376747-2.result b/mysql-test/suite/galera/r/lp1376747-2.result
index b85e130f4f4..5e5b5be6c86 100644
--- a/mysql-test/suite/galera/r/lp1376747-2.result
+++ b/mysql-test/suite/galera/r/lp1376747-2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/lp1376747-3.result b/mysql-test/suite/galera/r/lp1376747-3.result
index a2c55b5f1f6..62893b85bcf 100644
--- a/mysql-test/suite/galera/r/lp1376747-3.result
+++ b/mysql-test/suite/galera/r/lp1376747-3.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/lp1376747-4.result b/mysql-test/suite/galera/r/lp1376747-4.result
index efce740ea88..9c021c3eac3 100644
--- a/mysql-test/suite/galera/r/lp1376747-4.result
+++ b/mysql-test/suite/galera/r/lp1376747-4.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/lp1376747.result b/mysql-test/suite/galera/r/lp1376747.result
index 16d4fa3fc52..1b9dd545409 100644
--- a/mysql-test/suite/galera/r/lp1376747.result
+++ b/mysql-test/suite/galera/r/lp1376747.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/lp1438990.result b/mysql-test/suite/galera/r/lp1438990.result
index d48d2435faa..a324121d7da 100644
--- a/mysql-test/suite/galera/r/lp1438990.result
+++ b/mysql-test/suite/galera/r/lp1438990.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
diff --git a/mysql-test/suite/galera/r/lp959512.result b/mysql-test/suite/galera/r/lp959512.result
index 55adfa360b0..589030002db 100644
--- a/mysql-test/suite/galera/r/lp959512.result
+++ b/mysql-test/suite/galera/r/lp959512.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
DROP TABLE IF EXISTS variable;
Warnings:
Note 1051 Unknown table 'test.variable'
diff --git a/mysql-test/suite/galera/r/mdev-22543.result b/mysql-test/suite/galera/r/mdev-22543.result
index 02f2b632b32..9386b7405d4 100644
--- a/mysql-test/suite/galera/r/mdev-22543.result
+++ b/mysql-test/suite/galera/r/mdev-22543.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/mdev_10518.result b/mysql-test/suite/galera/r/mdev_10518.result
index aedf7cc4038..b07f5303586 100644
--- a/mysql-test/suite/galera/r/mdev_10518.result
+++ b/mysql-test/suite/galera/r/mdev_10518.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
list of GTID variables :
@@ -80,9 +82,13 @@ connection node_1;
DROP TABLE t1, t2;
#cleanup
connection node_1;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/mdev_18730.result b/mysql-test/suite/galera/r/mdev_18730.result
new file mode 100644
index 00000000000..ff0a934ba6d
--- /dev/null
+++ b/mysql-test/suite/galera/r/mdev_18730.result
@@ -0,0 +1,27 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+connection node_1;
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached WAIT_FOR acol_continue";
+INSERT INTO t1 VALUES (1);
+connection ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached";
+connection node_1_sr;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_unit = 'rows';
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+connection ctrl;
+SET DEBUG_SYNC = "now SIGNAL acol_continue";
+connection node_1;
+connection node_1_sr;
+ROLLBACK;
+connection ctrl;
+SET DEBUG_SYNC = "RESET";
+disconnect ctrl;
+disconnect node_1_sr;
+connection node_1;
+DROP TABLE t1;
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera/r/mdev_21025.result b/mysql-test/suite/galera/r/mdev_21025.result
new file mode 100644
index 00000000000..6a8d5ac8367
--- /dev/null
+++ b/mysql-test/suite/galera/r/mdev_21025.result
@@ -0,0 +1,11 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+START TRANSACTION;
+INSERT IGNORE INTO t1 (f1) VALUES (1);
+Warnings:
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+START TRANSACTION;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/mdev_21718.result b/mysql-test/suite/galera/r/mdev_21718.result
new file mode 100644
index 00000000000..ce938614854
--- /dev/null
+++ b/mysql-test/suite/galera/r/mdev_21718.result
@@ -0,0 +1,16 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+connection node_1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SET DEBUG_SYNC = "wsrep_before_before_command SIGNAL reached WAIT_FOR continue";
+COMMIT;
+connection node_1_ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR reached";
+connection node_2;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera/r/mdev_9290.result b/mysql-test/suite/galera/r/mdev_9290.result
index 276ab9e8ecb..d8fc35b02f4 100644
--- a/mysql-test/suite/galera/r/mdev_9290.result
+++ b/mysql-test/suite/galera/r/mdev_9290.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353
# InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#110.result b/mysql-test/suite/galera/r/mysql-wsrep#110.result
index 6d4031d71cd..344185f4f4e 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#110.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#110.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#198.result b/mysql-test/suite/galera/r/mysql-wsrep#198.result
index 33f36d407db..5b569ffae27 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#198.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#198.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result
index fe5725cab27..e55c38ea7cc 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#201.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#237.result b/mysql-test/suite/galera/r/mysql-wsrep#237.result
index 19503dd5781..bc348613d25 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#237.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#237.result
@@ -1,6 +1,8 @@
+connection node_2;
+connection node_1;
CREATE TABLE t (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
-SET DEBUG_SYNC = 'wsrep_before_replication WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue';
INSERT INTO t values (1);;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#247.result b/mysql-test/suite/galera/r/mysql-wsrep#247.result
index e59c6d1a299..704f0ba923c 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#247.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#247.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET GLOBAL wsrep_desync=1;
SET wsrep_OSU_method=RSU;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#31.result b/mysql-test/suite/galera/r/mysql-wsrep#31.result
index 1092f4ddb0c..d1d2861ec3a 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#31.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#31.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#33,debug.rdiff b/mysql-test/suite/galera/r/mysql-wsrep#33,debug.rdiff
new file mode 100644
index 00000000000..971f11bb8ec
--- /dev/null
+++ b/mysql-test/suite/galera/r/mysql-wsrep#33,debug.rdiff
@@ -0,0 +1,193 @@
+--- r/mysql-wsrep#33.result 2021-04-10 14:36:42.663191908 +0300
++++ r/mysql-wsrep#33,debug.reject 2021-04-10 15:43:02.420168969 +0300
+@@ -698,6 +698,190 @@
+ 1
+ DROP TABLE t1;
+ COMMIT;
++Performing State Transfer on a server that has been killed and restarted
++while a DDL was in progress on it
++connection node_1;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
++connection node_2;
++START TRANSACTION;
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
++COMMIT;
++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
++ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
++SET wsrep_sync_wait = 0;
++Killing server ...
++connection node_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
++COMMIT;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
++connection node_2;
++Performing --wsrep-recover ...
++connection node_2;
++Starting server ...
++Using --wsrep-start-position when starting mysqld ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
++COMMIT;
++connection node_1;
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
++COMMIT;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
++COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
++ROLLBACK;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++COMMIT;
++connection node_1;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++DROP TABLE t1;
++COMMIT;
++SET GLOBAL debug_dbug = $debug_orig;
+ connection node_2;
+ connection node_1;
+ CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#33.result b/mysql-test/suite/galera/r/mysql-wsrep#33.result
index 4cc49c0cf07..2c116347fca 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#33.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#33.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Setting SST method to mysqldump ...
@@ -11,99 +13,692 @@ connection node_2;
SET GLOBAL wsrep_sst_method = 'mysqldump';
Performing State Transfer on a server that has been temporarily disconnected
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
COMMIT;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
COMMIT;
connection node_1;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
COMMIT;
connection node_1a_galera_st_disconnect_slave;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
+DROP TABLE t1;
COMMIT;
+Performing State Transfer on a server that has been shut down cleanly and restarted
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Shutting down server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Starting server ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_shutdown_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
connection node_1;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
1
+DROP TABLE t1;
+COMMIT;
+Performing State Transfer on a server that starts from a clean var directory
+This is accomplished by shutting down node #2 and removing its var directory before restarting it
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Shutting down server ...
+connection node_1;
+Cleaning var directory ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Starting server ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_clean_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
+Performing State Transfer on a server that has been killed and restarted
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Killing server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+connection node_1;
SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+connection node_2;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
@@ -114,5 +709,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
-connection node_2;
-Restarting server ...
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
+SET GLOBAL general_log = ON;
+SET GLOBAL slow_query_log = ON;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#332.result b/mysql-test/suite/galera/r/mysql-wsrep#332.result
index 3986e4ab940..565979a93ae 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#332.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#332.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
@@ -19,17 +21,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
@@ -62,17 +64,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p1;
f1 f2
@@ -110,17 +112,17 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p1;
f1 f2
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#90.result b/mysql-test/suite/galera/r/mysql-wsrep#90.result
index 0b8f55e6219..b0fa06ffaf8 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#90.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#90.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
SET GLOBAL wsrep_OSU_method = "RSU";
diff --git a/mysql-test/suite/galera/r/mysql-wsrep-bugs-607.result b/mysql-test/suite/galera/r/mysql-wsrep-bugs-607.result
new file mode 100644
index 00000000000..9d9614ffefe
--- /dev/null
+++ b/mysql-test/suite/galera/r/mysql-wsrep-bugs-607.result
@@ -0,0 +1,31 @@
+connection node_2;
+connection node_1;
+#
+# test the order of wsrep XID storage after certifiation failure
+#
+connection node_1;
+set session wsrep_sync_wait=0;
+create table t1 (i int primary key, j int);
+insert into t1 values (4, 0);
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2b;
+set session wsrep_sync_wait=0;
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+connection node_1;
+UPDATE test.t1 set j=1 where i=4;
+connection node_2b;
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_2;
+set session wsrep_sync_wait=0;
+set session wsrep_retry_autocommit=0;
+UPDATE test.t1 SET j=2 WHERE i=4;
+connection node_2b;
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "";
+SET DEBUG_SYNC = "RESET";
+connection node_2;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+select * from t1;
+i j
+4 1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/mysql_tzinfo_to_sql.result b/mysql-test/suite/galera/r/mysql_tzinfo_to_sql.result
index a140f517ac8..e0cee3a50bf 100644
--- a/mysql-test/suite/galera/r/mysql_tzinfo_to_sql.result
+++ b/mysql-test/suite/galera/r/mysql_tzinfo_to_sql.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
#
diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result
index bdf6df25589..2e16d06519c 100644
--- a/mysql-test/suite/galera/r/partition.result
+++ b/mysql-test/suite/galera/r/partition.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV#4953 Galera: DELETE from a partitioned table is not replicated
#
@@ -116,6 +118,8 @@ connection node_1;
# Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002
# entries.
SET GLOBAL wsrep_load_data_splitting = ON;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
@@ -123,11 +127,13 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
20002
wsrep_last_committed_diff
-1
+AS_EXPECTED_3_or_5
DROP TABLE t1;
# Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries.
connection node_1;
SET GLOBAL wsrep_load_data_splitting = ON;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
@@ -141,6 +147,8 @@ DROP TABLE t1;
# entries.
connection node_1;
SET GLOBAL wsrep_load_data_splitting = OFF;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
@@ -148,10 +156,12 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
20002
wsrep_last_committed_diff
-1
+AS_EXPECTED_1_or_2
DROP TABLE t1;
connection node_1;
-SET GLOBAL wsrep_load_data_splitting = 1;;
+SET GLOBAL wsrep_load_data_splitting = 0;;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/pxc-421.result b/mysql-test/suite/galera/r/pxc-421.result
deleted file mode 100644
index a317b3e40e1..00000000000
--- a/mysql-test/suite/galera/r/pxc-421.result
+++ /dev/null
@@ -1,44 +0,0 @@
-connection node_1;
-connection node_2;
-connection node_1;
-set GLOBAL wsrep_slave_threads=26;
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t1 (f1) SELECT * from t1 as x1;
-connection node_2;
-set GLOBAL wsrep_slave_threads=16;
-SET GLOBAL wsrep_provider='none';
-INSERT INTO t1 VALUES (2);
-connection node_1;
-INSERT INTO t1 VALUES (3);
-connection node_2;
-INSERT INTO t1 VALUES (4);
-set GLOBAL wsrep_slave_threads=5;
-SELECT COUNT(*) = 5 FROM t1;
-COUNT(*) = 5
-1
-connection node_1;
-set GLOBAL wsrep_slave_threads=12;
-SELECT COUNT(*) = 4 FROM t1;
-COUNT(*) = 4
-1
-INSERT INTO t1 VALUES (100), (101), (102);
-connection node_2;
-set GLOBAL wsrep_slave_threads=5;
-INSERT INTO t1 (f1) SELECT * from t1 as x1;
-show global variables like 'wsrep_slave_threads';
-Variable_name Value
-wsrep_slave_threads 5
-SET GLOBAL wsrep_slave_threads = 1;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-16
-connection node_1;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-15
-show global variables like 'wsrep_slave_threads';
-Variable_name Value
-wsrep_slave_threads 12
-SET GLOBAL wsrep_slave_threads = 1;
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/query_cache.result b/mysql-test/suite/galera/r/query_cache.result
index a1d5d96d627..5dabd38a982 100644
--- a/mysql-test/suite/galera/r/query_cache.result
+++ b/mysql-test/suite/galera/r/query_cache.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# Execute FLUSH/RESET commands.
# On node-1
@@ -1336,9 +1338,13 @@ show status like "Qcache_hits";
Variable_name Value
Qcache_hits 12
select * from t1 into outfile "query_cache.out.file";
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select * from t1 into outfile "query_cache.out.file";
ERROR HY000: File 'query_cache.out.file' already exists
select * from t1 limit 1 into dumpfile "query_cache.dump.file";
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
diff --git a/mysql-test/suite/galera/r/rename.result b/mysql-test/suite/galera/r/rename.result
index a7ec431657b..3ad715fa38c 100644
--- a/mysql-test/suite/galera/r/rename.result
+++ b/mysql-test/suite/galera/r/rename.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-8598 : Failed MySQL DDL commands and Galera replication
#
diff --git a/mysql-test/suite/galera/r/rpl_row_annotate.result b/mysql-test/suite/galera/r/rpl_row_annotate.result
index 23de06f015b..61fa2bc286c 100644
--- a/mysql-test/suite/galera/r/rpl_row_annotate.result
+++ b/mysql-test/suite/galera/r/rpl_row_annotate.result
@@ -1,9 +1,15 @@
+connection node_2;
+connection node_1;
# On node_2
connection node_2;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
# On node_1
connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
CREATE TABLE t1(i INT)ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
DELETE FROM t1 WHERE i = 1;
@@ -68,6 +74,4 @@ mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1)
mysqld-bin.000001 # Delete_rows_v1 2 # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid 2 # COMMIT /* xid= */
DROP TABLE t1;
-disconnect node_2;
-disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/sql_log_bin.result b/mysql-test/suite/galera/r/sql_log_bin.result
index c175a0a0e7a..6efd70ca8b8 100644
--- a/mysql-test/suite/galera/r/sql_log_bin.result
+++ b/mysql-test/suite/galera/r/sql_log_bin.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
diff --git a/mysql-test/suite/galera/r/unique_key.result b/mysql-test/suite/galera/r/unique_key.result
index 9f1fc858389..bb7e22014d9 100644
--- a/mysql-test/suite/galera/r/unique_key.result
+++ b/mysql-test/suite/galera/r/unique_key.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV#5552 Deadlock when inserting NULL column value in column with
# UNIQUE index
diff --git a/mysql-test/suite/galera/r/versioning_trx_id.result b/mysql-test/suite/galera/r/versioning_trx_id.result
index f15916e51a5..df92d088834 100644
--- a/mysql-test/suite/galera/r/versioning_trx_id.result
+++ b/mysql-test/suite/galera/r/versioning_trx_id.result
@@ -1,8 +1,12 @@
+connection node_2;
+connection node_1;
+call mtr.add_suppression("Sending JOIN failed:.*");
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning;
insert into t1 (a) values (1),(2);
connection node_2;
+set session wsrep_sync_wait=15;
insert into t1 (a) values (3),(4);
select a from t1;
a
@@ -17,6 +21,7 @@ select count(*) from mysql.transaction_registry where begin_timestamp>=commit_ti
count(*)
0
connection node_3;
+set session wsrep_sync_wait=15;
insert into t1 (a) values (5),(6);
select a from t1;
a
@@ -33,6 +38,7 @@ select count(*) from mysql.transaction_registry where begin_timestamp>=commit_ti
count(*)
0
connection node_1;
+set session wsrep_sync_wait=15;
select a from t1;
a
1
@@ -48,5 +54,4 @@ select count(*) from mysql.transaction_registry where begin_timestamp>=commit_ti
count(*)
0
drop table t1;
-disconnect node_2;
-disconnect node_1;
+disconnect node_3;
diff --git a/mysql-test/suite/galera/r/view.result b/mysql-test/suite/galera/r/view.result
index f8da811f9cc..45d5b422f3f 100644
--- a/mysql-test/suite/galera/r/view.result
+++ b/mysql-test/suite/galera/r/view.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-7222: Cluster Node Crash at CREATE DEFINER statement
#
diff --git a/mysql-test/suite/galera/r/wsrep_slave_threads_basic.result b/mysql-test/suite/galera/r/wsrep_slave_threads_basic.result
index 62be5a42416..edfb4747d92 100644
--- a/mysql-test/suite/galera/r/wsrep_slave_threads_basic.result
+++ b/mysql-test/suite/galera/r/wsrep_slave_threads_basic.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# wsrep_slave_threads
#
diff --git a/mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result b/mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result
new file mode 100644
index 00000000000..4139ecd6472
--- /dev/null
+++ b/mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+SELECT variable_value FROM information_schema.session_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+variable_value
+0
+SET SESSION wsrep_trx_fragment_size = 0;
+SET SESSION wsrep_trx_fragment_size = 123;
+SELECT variable_value FROM information_schema.global_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+variable_value
+0
+SET GLOBAL wsrep_trx_fragment_size = 0;
+SET GLOBAL wsrep_trx_fragment_size = 123;
+SET GLOBAL wsrep_trx_fragment_size = default;
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index 9ceedf82a0e..027100fdb30 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -1,16 +1,11 @@
package My::Suite::Galera;
-use File::Basename;
-use My::Find;
-@ISA = qw(My::Suite);
-
-return "Not run for embedded server" if $::opt_embedded_server;
-
-return "WSREP is not compiled in" if not ::have_wsrep();
+use lib 'suite';
+use wsrep::common;
-return "No wsrep provider library" unless ::have_wsrep_provider();
+@ISA = qw(My::Suite);
-return ::wsrep_version_message() unless ::check_wsrep_version();
+return wsrep_not_ok() if wsrep_not_ok();
push @::global_suppressions,
(
@@ -63,18 +58,25 @@ push @::global_suppressions,
qr|WSREP: .*core_handle_uuid_msg.*|,
qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
+ qr|Query apply failed:*|,
+ qr(WSREP: Ignoring error*),
qr(WSREP: Failed to remove page file .*),
qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*),
qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|,
qr|WSREP: Trying to continue unpaused monitor|,
+ qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|,
);
+sub which($) { return `sh -c "command -v $_[0]"` }
+
sub skip_combinations {
my %skip = ();
+ $skip{'include/have_mariabackup.inc'} = 'Need socket statistics utility'
+ unless which("lsof") || which("sockstat") || which("ss");
$skip{'include/have_stunnel.inc'} = "Need 'stunnel' utility"
- unless ::which("stunnel");
+ unless which("stunnel");
$skip{'include/have_qpress.inc'} = "Need 'qpress' utility"
- unless ::which("qpress");
+ unless which("qpress");
%skip;
}
diff --git a/mysql-test/suite/galera/t/GCF-939.test b/mysql-test/suite/galera/t/GCF-939.test
new file mode 100644
index 00000000000..637d656996e
--- /dev/null
+++ b/mysql-test/suite/galera/t/GCF-939.test
@@ -0,0 +1,31 @@
+#
+# GCF-939 Avoid creation of GRA log files when applier is successfull
+#
+
+--source include/galera_cluster.inc
+
+--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
+
+--connection node_1
+--error ER_BAD_TABLE_ERROR
+DROP TABLE t1;
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+# Expect only one GRA_*.log file
+# TODO replace_regex is somehow broken, it will filter out
+# result totally if replacement string is already in result
+# fixed this temporarily by calling list_files twice
+# to get GRA_.log two times, this works for some reason
+#
+--replace_regex /GRA_.+\.log/GRA_.log/
+--list_files $MYSQLTEST_VARDIR/mysqld.2/data GRA_*.log
+--replace_regex /GRA_.+\.log/GRA_.log/
+--list_files $MYSQLTEST_VARDIR/mysqld.2/data GRA_*.log
+
+DROP TABLE t1;
+CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query");
+--connection node_2
+CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query");
+
diff --git a/mysql-test/suite/galera/t/MDEV-16509.test b/mysql-test/suite/galera/t/MDEV-16509.test
new file mode 100644
index 00000000000..ea4430d5e3f
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-16509.test
@@ -0,0 +1,145 @@
+#
+# Test various executions which go through binlog group commit
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+
+--let $galera_connection_name = ctrl
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+# Scenario 1: Block INSERT after commit order release after queued for
+# group commit. Verify that
+#
+# - WSREP_LAST_SEEN_GTID is not advanced before commit finishes
+# - The INSERT does not become visible before commit finishes
+
+# Turn off sync wait to avoid blocking and use WSREP_LAST_SEEN_GTID()
+# to observe gtid position.
+SET SESSION wsrep_sync_wait = 0;
+--let $last_seen_gtid_prev = `SELECT WSREP_LAST_SEEN_GTID()`
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+# Set up sync points
+SET DEBUG_SYNC = "wsrep_before_commit_order_leave SIGNAL bcol_reached WAIT_FOR bcol_continue";
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached WAIT_FOR acol_continue";
+SET DEBUG_SYNC = "after_group_after_commit SIGNAL after_group_reached WAIT_FOR after_group_continue";
+# Send insert which will block in the sync points above
+--send INSERT INTO t1 VALUES (1)
+
+--connection ctrl
+# INSERT has gone through wsrep_ordered_commit() and the transaction is
+# committed in memory.
+SET DEBUG_SYNC = "now WAIT_FOR bcol_reached";
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--enable_query_log
+SELECT * FROM t1;
+SET DEBUG_SYNC = "now SIGNAL bcol_continue";
+
+# SE commit finished but wsrep_after_commit() has not called yet.
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached";
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--enable_query_log
+SELECT * FROM t1;
+SET DEBUG_SYNC = "now SIGNAL acol_continue";
+
+SET DEBUG_SYNC = "now WAIT_FOR after_group_reached";
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_do_not_match
+--enable_query_log
+SET DEBUG_SYNC = "now SIGNAL after_group_continue";
+
+--connection node_1
+--reap
+
+#
+# Scenario 2: Verify that two INSERTs from two different connections
+# queue for commit.
+#
+--let $galera_connection_name = node_1a
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+SET SESSION wsrep_sync_wait = 0;
+
+--connection ctrl
+--let $last_seen_gtid_prev = `SELECT WSREP_LAST_SEEN_GTID()`
+
+--connection node_1
+SET DEBUG_SYNC = "wsrep_before_commit_order_leave SIGNAL bcol_reached_1 WAIT_FOR bcol_continue_1";
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached_1 WAIT_FOR acol_continue_1";
+SET DEBUG_SYNC = "after_group_after_commit SIGNAL agac_reached_1 WAIT_FOR agac_continue_1";
+--send INSERT INTO t1 VALUES (2);
+--connection ctrl
+SET DEBUG_SYNC = "now WAIT_FOR bcol_reached_1";
+
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--enable_query_log
+
+--connection node_1a
+SET DEBUG_SYNC = "wsrep_before_commit_order_leave SIGNAL bcol_reached_2 WAIT_FOR bcol_continue_2";
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached_2 WAIT_FOR acol_continue_2";
+SET DEBUG_SYNC = "after_group_after_commit SIGNAL agac_reached_2 WAIT_FOR agac_continue_2";
+--send INSERT INTO t1 VALUES (3);
+
+# Now INSERTs are queued, node_1 waiting after releasing commit order,
+# node_1a waiting before releasing commit order.
+--connection ctrl
+SET DEBUG_SYNC = "now SIGNAL bcol_continue_1";
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached_1";
+SET DEBUG_SYNC = "now WAIT_FOR bcol_reached_2";
+
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--enable_query_log
+
+SET DEBUG_SYNC = "now SIGNAL bcol_continue_2";
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached_2";
+
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_match
+--enable_query_log
+
+# Last seen GTIDs are incremented one by one once after_group_after_commit
+# is reached.
+SET DEBUG_SYNC = "now SIGNAL acol_continue_1";
+SET DEBUG_SYNC = "now WAIT_FOR agac_reached_1";
+
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_no_match
+--enable_query_log
+
+--let $last_seen_gtid_prev = `SELECT WSREP_LAST_SEEN_GTID()`
+SET DEBUG_SYNC = "now SIGNAL acol_continue_2";
+SET DEBUG_SYNC = "now WAIT_FOR agac_reached_2";
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() != '$last_seen_gtid_prev' AS wsrep_last_seen_gtid_no_match
+--enable_query_log
+
+SET DEBUG_SYNC = "now SIGNAL agac_continue_1";
+
+--connection node_1
+--reap
+
+--connection ctrl
+SET DEBUG_SYNC = "now SIGNAL agac_continue_2";
+
+--connection node_1a
+--reap
+
+--connection ctrl
+SET DEBUG_SYNC = "RESET";
+
+DROP TABLE t1;
+
+--disconnect ctrl
+--disconnect node_1a
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/MDEV-18832.cnf b/mysql-test/suite/galera/t/MDEV-18832.cnf
new file mode 100644
index 00000000000..4c62448fe3d
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-18832.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin
diff --git a/mysql-test/suite/galera/t/MDEV-18832.test b/mysql-test/suite/galera/t/MDEV-18832.test
new file mode 100644
index 00000000000..ba93761435a
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-18832.test
@@ -0,0 +1,23 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1;
+CREATE TABLE t1 (Id int(11) NOT NULL, PRIMARY KEY (Id));
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+DROP SEQUENCE Seq1_1;
+CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1;
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
+DROP SEQUENCE Seq1_1;
+DROP TABLE t1;
+
+# Supress warning for SEQUENCES that are declared without `NOCACHE` introduced with MDEV-27862
+
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+
+--connection node_2
+
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
diff --git a/mysql-test/suite/galera/t/MDEV-20225.test b/mysql-test/suite/galera/t/MDEV-20225.test
index 38efb0d6647..60ab1c53e40 100644
--- a/mysql-test/suite/galera/t/MDEV-20225.test
+++ b/mysql-test/suite/galera/t/MDEV-20225.test
@@ -4,10 +4,8 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
CREATE TABLE t1 (f1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT, f2 INT) ENGINE=InnoDB;
@@ -36,16 +34,19 @@ INSERT INTO t1 VALUES (NULL);
# so there is no sync point or condition to wait.
--sleep 1
---connection node_2
+--let $galera_connection_name = node_2a
+--let $galera_server_number = 2
+--source include/galera_connect.inc
+--connection node_2a
SET GLOBAL debug_dbug = 'RESET';
SET DEBUG_SYNC = 'now SIGNAL signal.mdev_20225_continue';
SET DEBUG_SYNC = 'RESET';
SET GLOBAL wsrep_slave_threads = 1;
---let $wait_condition = SELECT COUNT(*) = 1 FROM test.t1;
---source include/wait_condition.inc
-
+--connection node_2
# Trigger should now be dropped on node_2.
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME like '%tr1'
+--source include/wait_condition.inc
SHOW TRIGGERS;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-20616.test b/mysql-test/suite/galera/t/MDEV-20616.test
new file mode 100644
index 00000000000..1cbc4aadbdd
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-20616.test
@@ -0,0 +1,244 @@
+#
+# Test different deadlock scenarios in innodb and make sure that
+# wsrep patch does not handle them as BF aborts.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+##############################################################################
+# test case to verify that natural deadlock of trigger SP execution is
+# handled correctly
+##############################################################################
+
+--echo
+--echo Test phase 1 to make sure that natral deadlock in trigger SP execution is
+--echo handled correctly
+--echo
+--let $aborts_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+CREATE TABLE t1(a INT);
+CREATE TABLE t2(f1 INT, f2 INT, f3 INT);
+--disable_query_log
+let $run=1000;
+while($run)
+{
+ INSERT INTO t2 VALUES (1, 2, 3);
+ dec $run;
+}
+--enable_query_log
+
+DELIMITER |;
+CREATE PROCEDURE proc()
+BEGIN
+ INSERT INTO t2 VALUES(100, 200, 300);
+ UPDATE t2 SET f3 = f3 + 100;
+END|
+DELIMITER ;|
+
+CREATE TRIGGER t1 BEFORE INSERT ON t1 FOR EACH ROW CALL proc();
+
+--send INSERT INTO t1 VALUES(2);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--send INSERT INTO t1 VALUES(1);
+
+--connection node_1
+--error 0,ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1a
+--error 0,ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1
+--let $aborts_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+--disable_query_log
+--eval SELECT $aborts_new - $aborts_old AS wsrep__bf_aborts;
+--enable_query_log
+DROP TABLE t1;
+DROP TABLE t2;
+DROP PROCEDURE proc;
+
+##############################################################################
+#
+# test case to verify that BF abort for SP execution is handled correctly
+#
+##############################################################################
+
+--echo
+--echo Test phase 2 to make sure that BF abort for SP execution is
+--echo handled correctly
+--echo
+--connection node_1
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+
+# Control connection for Galera sync point management
+--connection node_1a
+
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_sync_wait = 0;
+--let $aborts_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+DELIMITER |;
+CREATE PROCEDURE proc_update()
+BEGIN
+ UPDATE t1 SET f2 = 'b';
+END|
+DELIMITER ;|
+
+INSERT INTO t1 VALUES(1, 'a');
+
+--connection node_1
+SET debug_sync='wsrep_before_certification SIGNAL ready WAIT_FOR cont';
+--send CALL proc_update
+
+--connection node_1a
+SET debug_sync='now WAIT_FOR ready';
+
+--connection node_2
+UPDATE t1 SET f2='c';
+
+--connection node_1a
+# wait for BF to happen
+--let $wait_condition = SELECT VARIABLE_VALUE = $aborts_old + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'
+--source include/wait_condition.inc
+
+SET debug_sync='now SIGNAL cont';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1a
+SET debug_sync='RESET';
+
+DROP PROCEDURE proc_update;
+
+
+##############################################################################
+#
+# test case to verify that natural deadlock does not cause BF abort
+#
+##############################################################################
+
+--connection node_1
+--echo
+--echo Test phase 3 to make sure natural deadlock is not treated as BF abort
+--echo
+TRUNCATE t1;
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a');
+
+--connection node_1a
+--let $aborts_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+
+--connection node_1
+START TRANSACTION;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+--connection node_1a
+# this hangs for lock wait
+--send UPDATE t1 SET f2 = 'b' WHERE f1 = 2
+
+#
+# classic deadlock happens here
+#
+--connection node_1
+--error 0, ER_LOCK_DEADLOCK
+UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
+
+--connection node_1a
+--error 0, ER_LOCK_DEADLOCK
+--reap
+COMMIT;
+
+#
+# either one of SP executions was aborted because of natural deadlock, or in worst case
+# they were ordered seqeuntailly, and both succeeded.
+# anyways, we just check here that no BF aborts happened
+#
+--let $aborts_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+--disable_query_log
+--eval SELECT $aborts_new - $aborts_old AS wsrep__bf_aborts;
+--enable_query_log
+
+--connection node_1
+ROLLBACK;
+
+##############################################################################
+#
+# test case to verify that natural deadlock within SP exceution
+# does not cause BF abort
+#
+##############################################################################
+
+--echo
+--echo Test phase 4 to make sure natural deadlock inside SP execution
+--echo is not treated as BF abort
+--echo
+
+--connection node_1a
+TRUNCATE t1;
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a');
+
+--let $aborts_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+DELIMITER |;
+CREATE PROCEDURE proc_update_1()
+BEGIN
+ START TRANSACTION;
+ UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+ SELECT SLEEP(5);
+ UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+ COMMIT;
+END|
+DELIMITER ;|
+
+DELIMITER |;
+CREATE PROCEDURE proc_update_2()
+BEGIN
+ START TRANSACTION;
+ UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+ SELECT SLEEP(5);
+ UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
+ COMMIT;
+END|
+DELIMITER ;|
+
+--connection node_1
+--send CALL proc_update_1
+
+--connection node_1a
+#
+# calling proc_update_2 should cause a natural deadlock
+# however, this test is not deterministic, and depends on the sleep() to
+# cause expected ordering for update statement execution within SPs
+# We therefore, allow both success and deadlock error for the result
+#
+--error 0, ER_LOCK_DEADLOCK
+CALL proc_update_2;
+
+#
+# either one of SP executions was aborted because of natural deadlock, or in worst case
+# they were ordered seqeuntailly, and both succeeded.
+# anyways, we just check here that no BF aborts happened
+#
+--let $aborts_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+--disable_query_log
+--eval SELECT $aborts_new - $aborts_old AS wsrep__bf_aborts;
+--enable_query_log
+
+
+--connection node_1
+--error 0, ER_LOCK_DEADLOCK
+--reap
+
+DROP PROCEDURE proc_update_1;
+DROP PROCEDURE proc_update_2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-20793.test b/mysql-test/suite/galera/t/MDEV-20793.test
new file mode 100644
index 00000000000..6835a73a2a4
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-20793.test
@@ -0,0 +1,102 @@
+#
+# MDEV-20793 Assertion after certification failure during replay.
+#
+# The test outline:
+# In order to produce certification failure three transactions
+# are needed. One transaction is executing on node_1 and two others
+# on node_2. The first transaction from node_2 BF aborts the transaction
+# on node_1, but does not cause certification conflict. The second
+# transaction from node_2 will cause conflict and the transaction on
+# node_1 fails in certification during replay.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT);
+INSERT INTO t1 VALUES (1, 0), (5, 0);
+
+--let galera_connection_name = node_1_ctrl
+--let galera_server_number = 1
+--source include/galera_connect.inc
+--connection node_1_ctrl
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_slave_threads = 2;
+
+--connection node_1
+# Start transaction which takes gap lock 1 - 5
+SET SESSION wsrep_retry_autocommit = 0;
+START TRANSACTION;
+UPDATE t1 SET f2 = 1;
+
+--connection node_1_ctrl
+# set sync point for incoming applier
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+# Insert into gap from other node. This generates BF abort but does not
+# conflict with update.
+INSERT INTO t1 VALUES (2, 2);
+
+--connection node_1_ctrl
+# wait to see the INSERT from node_2 reaching applier sync point
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# set sync point to catch other write set applying from node_2
+--let $galera_sync_point = local_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+# Make an update which will conflict with update on node_1
+--connection node_2
+UPDATE t1 SET f2 = 2 WHERE f1 = 5;
+
+--connection node_1_ctrl
+# wait until both appliers are stopped in sync points
+--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# set sync point for catching node_1 transaction just before committing
+--let $galera_sync_point = after_replicate_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+# set sync point, which will stop execution after COMMIT has been BF aborted
+# and send the COMMIT, it should stop in commit_monitor_master_enter_sync point
+SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue";
+--send COMMIT
+
+--connection node_1_ctrl
+# wait until both appliers and local COMMIT are idle in their sync points
+--let $galera_sync_point = after_replicate_sync apply_monitor_slave_enter_sync local_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# release local COMMIT processing, it will continue and pause first before certification,
+--let $galera_sync_point = after_replicate_sync
+--source include/galera_signal_sync_point.inc
+
+# release first applier (INSERT), it should BF abort the local COMMIT processing
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+# wait to see that COMMIT was BF aborted and has reached replaying state
+SET SESSION debug_sync = "now WAIT_FOR reached";
+
+# release the latter applier, with real lock conflict
+--let $galera_sync_point = local_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+SET SESSION debug_sync = "now SIGNAL continue";
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+SET debug_sync = "RESET";
+
+DROP TABLE t1;
+SET GLOBAL wsrep_slave_threads = 1;
diff --git a/mysql-test/suite/galera/t/MDEV-22021.test b/mysql-test/suite/galera/t/MDEV-22021.test
index 1f0433117c6..5e189faf5ea 100644
--- a/mysql-test/suite/galera/t/MDEV-22021.test
+++ b/mysql-test/suite/galera/t/MDEV-22021.test
@@ -1,5 +1,5 @@
#
-# SAVEPOINT ROLLBACK can introduce incosistency in cluster.
+# SAVEPOINT ROLLBACK can introduce inconsistency in cluster.
#
--source include/galera_cluster.inc
diff --git a/mysql-test/suite/galera/t/MDEV-22051.test b/mysql-test/suite/galera/t/MDEV-22051.test
new file mode 100644
index 00000000000..a5f05f5cf3b
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22051.test
@@ -0,0 +1,34 @@
+#
+# If FTWRL is issued on node, DDL statement should report error back to
+# user.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+FLUSH TABLES WITH READ LOCK;
+
+--error ER_UNKNOWN_COM_ERROR
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+
+SET wsrep_OSU_method=RSU;
+--error ER_UNKNOWN_COM_ERROR
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+SET wsrep_OSU_method=TOI;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--error ER_UNKNOWN_COM_ERROR
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+
+--connection node_1
+UNLOCK TABLES;
+
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+
+FLUSH TABLES WITH READ LOCK;
+--error ER_CANT_UPDATE_WITH_READLOCK
+INSERT INTO t1 VALUES (1);
+UNLOCK TABLES;
+
+DROP TABLE t1;
+CALL mtr.add_suppression("CREATE TABLE isolation failure");
diff --git a/mysql-test/suite/galera/t/MDEV-22055.test b/mysql-test/suite/galera/t/MDEV-22055.test
new file mode 100644
index 00000000000..ae29c456bf0
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22055.test
@@ -0,0 +1,19 @@
+--source include/galera_cluster.inc
+
+ROLLBACK AND CHAIN;
+
+CREATE TABLE t1(a int not null primary key) engine=innodb;
+INSERT INTO t1 values (1);
+
+BEGIN;
+INSERT INTO t1 values (2);
+ROLLBACK AND CHAIN;
+
+SELECT * FROM t1;
+
+--connection node_2
+SET SESSION wsrep_sync_wait=15;
+SELECT * FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-22227.test b/mysql-test/suite/galera/t/MDEV-22227.test
new file mode 100644
index 00000000000..0ee75b979e2
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22227.test
@@ -0,0 +1,26 @@
+--source include/galera_cluster.inc
+--source include/have_log_bin.inc
+
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+LOCK TABLE t1 WRITE CONCURRENT;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+# TOI operations will ignore lock_wait_timeout
+SET lock_wait_timeout= 1;
+--send CREATE VIEW v1 AS SELECT * FROM t1
+
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Waiting for table level lock'
+--source include/wait_condition.inc
+
+--connection node_1
+UNLOCK TABLES;
+
+--connection node_1a
+--reap
+
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-22421.test b/mysql-test/suite/galera/t/MDEV-22421.test
new file mode 100644
index 00000000000..369e56384a0
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22421.test
@@ -0,0 +1,12 @@
+#
+# Tables with system versioning should not append keys to wsrep.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+SET @@local.sql_mode='no_field_options';
+CREATE TABLE t1 (f1 INT, ROW_START BIGINT UNSIGNED AS ROW START INVISIBLE, ROW_END BIGINT UNSIGNED AS ROW END INVISIBLE, PERIOD FOR SYSTEM_TIME(ROW_START, ROW_END)) WITH SYSTEM VERSIONING ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+UPDATE t1 SET f1 = 1 WHERE f1 = 1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-22458.test b/mysql-test/suite/galera/t/MDEV-22458.test
new file mode 100644
index 00000000000..8f9ba1bb107
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22458.test
@@ -0,0 +1,21 @@
+# MDEV-22458
+#
+# When running SHOW command, thread lock `LOCK_thd_data` should not be taken.
+# Lock will be taken only when we are killing thread
+#
+
+--source include/galera_cluster.inc
+CREATE TABLE t1 (a INT);
+
+--connect (con1,localhost,root,,test)
+--let $con1 = `SELECT CONNECTION_ID()`
+
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+
+--error ER_TARGET_NOT_EXPLAINABLE
+EVALP SHOW EXPLAIN FOR $con1;
+
+--connection con1
+INSERT INTO t1 VALUES (5),(6),(7),(8);
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-22707.test b/mysql-test/suite/galera/t/MDEV-22707.test
deleted file mode 100644
index feb44e5e44f..00000000000
--- a/mysql-test/suite/galera/t/MDEV-22707.test
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# MDEV-22707 galera got stuck after flush tables
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
---source include/have_debug.inc
---source include/have_debug_sync.inc
---source include/galera_have_debug_sync.inc
-
-CREATE TABLE t1(f2 INT) ENGINE=InnoDB;
-
---connect node_1_applier_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1
-SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
-
---connection node_2
-SET SESSION wsrep_sync_wait = 0;
---send INSERT INTO t1 (f2) VALUES (2)
-
---connection node_1_applier_thd
-# Wait for `sync.wsrep_apply_cb_reached` signal
-SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
-
---connection node_1
-SET SESSION wsrep_sync_wait = 0;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR continue';
---send INSERT INTO t1 (f2) VALUES (1)
-
---connect node_1_flush_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1
-SET DEBUG_SYNC="now WAIT_FOR wsrep_before_replication_reached";
-SET GLOBAL debug_dbug = "+d,sync.wsrep_before_mdl_wait";
---send FLUSH TABLES
-
---connect node_1_sync_release_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1
-# First clear all DBUG points
-SET GLOBAL debug_dbug = "";
-# Now signal threads to continue execution
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
-SET DEBUG_SYNC = "now SIGNAL continue";
-SET DEBUG_SYNC = "RESET";
-
---connection node_1
---reap
-
---connection node_1_flush_thd
---reap
-
---connection node_2
---reap
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-22708.cnf b/mysql-test/suite/galera/t/MDEV-22708.cnf
new file mode 100644
index 00000000000..f7ac4f43082
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22708.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/MDEV-22708.test b/mysql-test/suite/galera/t/MDEV-22708.test
new file mode 100644
index 00000000000..5f75715febf
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22708.test
@@ -0,0 +1,14 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+SET @wsrep_forced_binlog_format_saved = @@GLOBAL.wsrep_forced_binlog_format;
+SET @@GLOBAL.wsrep_forced_binlog_format = STATEMENT;
+
+CREATE TABLE t1(c INT PRIMARY KEY) ENGINE = MyISAM;
+
+INSERT DELAYED INTO t1 VALUES (1),(2),(3);
+SELECT SLEEP(1);
+
+DROP TABLE t1;
+
+SET @@GLOBAL.wsrep_forced_binlog_format = @wsrep_forced_binlog_format_saved;
diff --git a/mysql-test/suite/galera/t/MDEV-24063.test b/mysql-test/suite/galera/t/MDEV-24063.test
new file mode 100644
index 00000000000..9646db5d6d5
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-24063.test
@@ -0,0 +1,26 @@
+#
+# MDEV-24063
+#
+# my_bool wsrep_thd_is_aborting(const THD*):
+# Assertion `((&(&thd->LOCK_thd_data)->m_mutex)->count > 0 &&
+# pthread_equal(pthread_self(), (&(&thd->LOCK_thd_data)->m_mutex)->thread))' failed.
+#
+
+--source include/galera_cluster.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+--source include/shutdown_mysqld.inc
+--source include/start_mysqld.inc
+
+DROP TABLE t1;
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/MDEV-24143.test b/mysql-test/suite/galera/t/MDEV-24143.test
new file mode 100644
index 00000000000..e58f147cb7c
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-24143.test
@@ -0,0 +1,20 @@
+--source include/galera_cluster.inc
+--source include/have_sequence.inc
+
+CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
+SELECT get_lock ('test2', 0);
+DROP TABLE t1;
+CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_trx_fragment_size=10;
+SET SESSION autocommit=0;
+SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (4),(3),(1),(2);
+--error ER_TABLE_EXISTS_ERROR
+CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
+--error ER_CANT_DROP_FIELD_OR_KEY
+ALTER TABLE t1 DROP COLUMN c2;
+SELECT get_lock ('test', 1.5);
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/galera/t/MDEV-24327.test b/mysql-test/suite/galera/t/MDEV-24327.test
index fe3dbbe2870..7aeffea11fa 100644
--- a/mysql-test/suite/galera/t/MDEV-24327.test
+++ b/mysql-test/suite/galera/t/MDEV-24327.test
@@ -43,7 +43,7 @@ SET SESSION wsrep_sync_wait=0;
# Block the commit, send the COMMIT and wait until it gets blocked
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
--connection node_1
@@ -53,7 +53,7 @@ SET SESSION wsrep_sync_wait=0;
# wait for the commit to block in sync point
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
@@ -73,7 +73,7 @@ UPDATE t1 SET f2 = '2' WHERE f1 = 2;
--let $wait_condition = SELECT VARIABLE_VALUE = $expected_wsrep_received FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_received'
--source include/wait_condition.inc
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc
diff --git a/mysql-test/suite/galera/t/MDEV-25494.test b/mysql-test/suite/galera/t/MDEV-25494.test
new file mode 100644
index 00000000000..a6a70145469
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-25494.test
@@ -0,0 +1,7 @@
+--source include/galera_cluster.inc
+
+SET SESSION binlog_format=STATEMENT;
+CREATE TEMPORARY TABLE t (i INT) UNION=(t);
+ALTER TABLE t ADD extrac CHAR(1);
+SHOW CREATE TABLE t;
+DROP TABLE t;
diff --git a/mysql-test/suite/galera/t/MDEV-25562.test b/mysql-test/suite/galera/t/MDEV-25562.test
new file mode 100644
index 00000000000..b4552643089
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-25562.test
@@ -0,0 +1,11 @@
+#
+# MDEV-25562 Assertion `pause_seqno_.is_undefined() == false' failed in void wsrep::server_state::resume()
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+SET SESSION WSREP_ON=0;
+FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT;
+SET SESSION WSREP_ON=1;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/t/MDEV-25740.test b/mysql-test/suite/galera/t/MDEV-25740.test
new file mode 100644
index 00000000000..0ea8d5f55c0
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-25740.test
@@ -0,0 +1,14 @@
+#
+# When `completion_type = CHAIN` is used, transaction started should not have previous writeset.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+SET AUTOCOMMIT = OFF;
+SET completion_type = CHAIN;
+CREATE TABLE t1(f1 INT) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 VALUES (1);
+ROLLBACK;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-26575.test b/mysql-test/suite/galera/t/MDEV-26575.test
new file mode 100644
index 00000000000..4554f632c6f
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-26575.test
@@ -0,0 +1,23 @@
+#
+# MDEV-26575 Server crashes when execute shutdown statement after
+# starting an XA transaction
+#
+
+--source include/galera_cluster.inc
+
+--connection node_2
+call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*");
+--connection node_1
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--connection node_2
+SET SESSION wsrep_on = OFF;
+--error ER_NOT_SUPPORTED_YET
+XA START 'xatest';
+--source include/restart_mysqld.inc
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/MDEV-27276.test b/mysql-test/suite/galera/t/MDEV-27276.test
new file mode 100644
index 00000000000..1c589c9e85b
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27276.test
@@ -0,0 +1,44 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+#
+# Testing CREATE TABLE statement having foreign key constraint,
+# while having concurrent DML for the referenced parent table.
+#
+# The replication of CREATE TABLE should have all referenced table names
+# appended in the key set, and DML on the parent table should be considered as
+# conflicting.
+#
+# There are related test scenarios in test mysql-wsrep#332, where a regular table
+# is altered by adding new foreign key reference.
+#
+# We use concurrency facility of test MW-369 to setup the conflict between DDL and DML
+#
+
+# Open connection node_1a here, MW-369.inc will use it later
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+# create FK parent table
+--connection node_1
+CREATE TABLE p (id INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+
+# setup conflicting queries
+--let $mw_369_parent_query = INSERT INTO p VALUES(1,0)
+--let $mw_369_child_query = CREATE TABLE c(id INT NOT NULL PRIMARY KEY, p_id INT, FOREIGN KEY (p_id) REFERENCES p(id) ON DELETE CASCADE) ENGINE=InnoDB
+
+# execute above queries through separate nodes
+--source MW-369.inc
+
+# Expect certification failure
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+SELECT * FROM p;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p;
diff --git a/mysql-test/suite/galera/t/MDEV-27713.test b/mysql-test/suite/galera/t/MDEV-27713.test
new file mode 100644
index 00000000000..4bfcd7e3d50
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27713.test
@@ -0,0 +1,67 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/big_test.inc
+
+CREATE TABLE t1 (
+ f1 INT,
+ f2 VARCHAR(255) PRIMARY KEY
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO t1 VALUES(1, 'abc');
+
+--connection node_1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2,'def');
+
+--connection node_2
+
+SET GLOBAL event_scheduler=ON;
+
+DELIMITER |;
+CREATE PROCEDURE update_table()
+BEGIN
+ SET AUTOCOMMIT=OFF;
+ DO GET_LOCK('local_lock', 0);
+ SET DEBUG_SYNC = 'innodb_row_update_for_mysql_begin SIGNAL blocked WAIT_FOR continue';
+ UPDATE t1 SET f2 = 'jkl' WHERE f1 != 2;
+ DO RELEASE_LOCK('local_lock');
+END|
+DELIMITER ;|
+
+CREATE DEFINER=current_user
+ EVENT event
+ ON SCHEDULE AT CURRENT_TIMESTAMP
+ ON COMPLETION PRESERVE
+ ENABLE
+ DO CALL update_table();
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+SET DEBUG_SYNC = 'now WAIT_FOR blocked';
+
+# Applier control thread
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
+
+--connection node_1
+COMMIT;
+
+# Applier control thread
+--connection node_2b
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+--connection node_2a
+SET DEBUG_SYNC = 'now SIGNAL continue';
+
+--connection node_2
+SET GLOBAL event_scheduler=default;
+DROP PROCEDURE update_table;
+DROP EVENT event;
+SET DEBUG_SYNC='reset';
+SET GLOBAL debug_dbug = DEFAULT;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-27862.combinations b/mysql-test/suite/galera/t/MDEV-27862.combinations
new file mode 100644
index 00000000000..1eeb8fb4614
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27862.combinations
@@ -0,0 +1,4 @@
+[binlogoff]
+
+[binlogon]
+log-bin
diff --git a/mysql-test/suite/galera/t/MDEV-27862.test b/mysql-test/suite/galera/t/MDEV-27862.test
new file mode 100644
index 00000000000..89d3465b91f
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27862.test
@@ -0,0 +1,67 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+# Report WARNING when SEQUENCE is created without `NOCACHE`
+
+CREATE SEQUENCE seq_nocache ENGINE=InnoDB;
+DROP SEQUENCE seq_nocache;
+
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+
+--connection node_2
+
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+
+# NEXTVAL
+
+--connection node_1
+
+CREATE SEQUENCE seq NOCACHE ENGINE=InnoDB;
+
+SELECT NEXTVAL(seq) = 1;
+
+--connection node_2
+
+SELECT NEXTVAL(seq) = 2;
+
+--connection node_1
+
+SELECT NEXTVAL(seq) = 3;
+
+
+# SETVAL
+
+SELECT SETVAL(seq, 100);
+
+--connection node_2
+
+SELECT NEXTVAL(seq) = 101;
+
+--connection node_1
+
+SELECT NEXTVAL(seq) = 102;
+
+DROP SEQUENCE seq;
+
+# TRANSACTIONS
+
+CREATE TABLE t1(f1 INT);
+CREATE SEQUENCE seq_transaction NOCACHE ENGINE=InnoDB;
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (0);
+SELECT NEXTVAL(seq_transaction);
+INSERT INTO t1 VALUES (NEXTVAL(seq_transaction));
+COMMIT;
+
+--connection node_2
+
+SELECT COUNT(*) = 2 FROM t1;
+SELECT NEXTVAL(seq_transaction) = 3;
+
+--connection node_1
+SELECT NEXTVAL(seq_transaction) = 4;
+
+DROP SEQUENCE seq_transaction;
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/galera/t/MDEV-28053.cnf b/mysql-test/suite/galera/t/MDEV-28053.cnf
new file mode 100644
index 00000000000..2a500639d1d
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-28053.cnf
@@ -0,0 +1,6 @@
+!include ../galera_2nodes_as_slave.cnf
+
+[mysqld]
+slave_parallel_threads=4
+slave_parallel_mode=optimistic
+gtid_strict_mode=1
diff --git a/mysql-test/suite/galera/t/MDEV-28053.test b/mysql-test/suite/galera/t/MDEV-28053.test
new file mode 100644
index 00000000000..85cb20c7e10
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-28053.test
@@ -0,0 +1,61 @@
+#
+# MDEV-28053 - Sysbench data load crashes Galera secondary node in
+# async master slave setup
+#
+# Setup: node 3 is a regular MariaDB server, nodes 1 and 2 are members
+# of a Galera cluster. Node 2 connects to node 3 through async replication.
+#
+# Test uses multiple parallel async applier threads (see MDEV-28053.cnf)
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+--connection node_3
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+#
+# Execute a few INSERTs, to simulate sysbench data load phase
+#
+--let $counter=100
+--disable_query_log
+while ($counter) {
+ --connection node_3
+ INSERT INTO t1 VALUES();
+ --dec $counter
+}
+--enable_query_log
+--let gtid = `SELECT @@last_gtid`
+
+#
+# Start async replication on node 2.
+# If bug is present, expect a crash when applying
+# events concurrently.
+#
+--connection node_2
+--disable_query_log
+--disable_result_log
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
+START SLAVE;
+--eval SELECT MASTER_GTID_WAIT('$gtid', 600)
+--enable_result_log
+--enable_query_log
+
+#
+# Cleanup
+#
+--connection node_3
+DROP TABLE t1;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--connection node_2
+STOP SLAVE;
+RESET SLAVE ALL;
+
+--connection node_3
+RESET MASTER;
diff --git a/mysql-test/suite/galera/t/MDEV-6860.cnf b/mysql-test/suite/galera/t/MDEV-6860.cnf
new file mode 100644
index 00000000000..d8defd343ad
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-6860.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes_as_slave.cnf
+
+[mysqld.2]
+slave-parallel-threads=2
+slave-parallel-mode=optimistic
+[mysqld.1]
+wsrep-slave-threads=10
diff --git a/mysql-test/suite/galera/t/MDEV-6860.test b/mysql-test/suite/galera/t/MDEV-6860.test
new file mode 100644
index 00000000000..3a8c98f317f
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-6860.test
@@ -0,0 +1,42 @@
+--source include/have_innodb.inc
+
+--source include/galera_cluster.inc
+
+--connection node_2
+--disable_query_log
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3, MASTER_USE_GTID=slave_pos;
+--enable_query_log
+START SLAVE;
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+--let $inserts=1000
+CREATE TABLE t1 (f1 int, f2 int) ENGINE=InnoDB;
+
+--let $count=0
+--disable_query_log
+while($count < $inserts)
+{
+ --eval insert into t1 values ($count,1)
+ --inc $count
+}
+--enable_query_log
+
+--connection node_2
+
+--let $wait_condition = SELECT COUNT(*) = $inserts FROM t1
+--source include/wait_condition.inc
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = $inserts FROM t1
+--source include/wait_condition.inc
+
+--connection node_3
+DROP TABLE t1;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test'
+--source include/wait_condition.inc
+
+STOP SLAVE;
+RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/t/MENT-1047.test b/mysql-test/suite/galera/t/MENT-1047.test
new file mode 100644
index 00000000000..1431818f806
--- /dev/null
+++ b/mysql-test/suite/galera/t/MENT-1047.test
@@ -0,0 +1,7 @@
+#
+# MENT-1047 - Reject XA with Galera replication
+#
+--source include/galera_cluster.inc
+
+--error ER_NOT_SUPPORTED_YET
+XA START 'trx';
diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test
index 568826db5b0..99fe305d859 100644
--- a/mysql-test/suite/galera/t/MW-284.test
+++ b/mysql-test/suite/galera/t/MW-284.test
@@ -66,5 +66,3 @@ STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression('failed registering on master');
-
-
diff --git a/mysql-test/suite/galera/t/MW-286.test b/mysql-test/suite/galera/t/MW-286.test
index 426b4493bb7..9c849861001 100644
--- a/mysql-test/suite/galera/t/MW-286.test
+++ b/mysql-test/suite/galera/t/MW-286.test
@@ -4,31 +4,55 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source include/big_test.inc
-
+--source include/have_debug_sync.inc
+
--connection node_1
-CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
-INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
-
# Insert some values before the ALTER
-INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
-
-# Insert more values while the ALTER is running
---send INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+INSERT INTO t1 (f1) VALUES (1), (2), (3);
+#
+# run ALTER with no wsrep replication
+#
--connection node_2
SET GLOBAL wsrep_desync = TRUE;
SET wsrep_on = FALSE;
---error 0,ER_QUERY_INTERRUPTED
-ALTER TABLE t1 ADD PRIMARY KEY (f1);
+#
+# stop ALTER processing after it has acquired exclusive MDL lock
+#
+SET SESSION debug_sync = "alter_table_inplace_after_lock_upgrade SIGNAL mdl_locked WAIT_FOR mdl_continue";
+
+--send ALTER TABLE t1 ADD PRIMARY KEY (f1);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION debug_sync = "now WAIT_FOR mdl_locked";
+
+#
+# replicate conflicting insert from node_1
+#
+--connection node_1
+INSERT INTO t1(f1) VALUES (11);
+
+#
+# let parked ALTER processing to continue after the conflict
+#
+--connection node_2a
+SET debug_sync = "now SIGNAL mdl_continue";
+SET debug_sync='RESET';
+
+#
+# ALTER should have been aborted with query interupted error code
+#
+--connection node_2
+--error ER_QUERY_INTERRUPTED
+--reap
SET wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE;
--connection node_1
-reap;
+
DROP TABLE t1;
-DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/MW-292.test b/mysql-test/suite/galera/t/MW-292.test
index ecb1273759e..9580d53d85c 100644
--- a/mysql-test/suite/galera/t/MW-292.test
+++ b/mysql-test/suite/galera/t/MW-292.test
@@ -9,7 +9,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
@@ -25,37 +25,51 @@ START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
-# Block the commit
+# Block the applier on node #1 and issue a conflicting update on node #2
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---let $galera_sync_point = commit_monitor_enter_sync
+SET SESSION wsrep_sync_wait=0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc
---connection node_1
---send COMMIT;
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
-# Wait until commit is blocked
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
-# Issue a conflicting update on node #2
---connection node_2
-UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+# Block the commit, send the COMMIT and wait until it gets blocked
-# Wait for both transactions to be blocked
---connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%';
---source include/wait_condition.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
---source include/wait_condition.inc
+--connection node_1
+--send COMMIT
-# Unblock the commit
--connection node_1a
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
+
+# Let the conflicting UPDATE proceed and wait until it hits abort_trx_end.
+# The victim transaction still sits in commit_monitor_master_sync_point.
+
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# Let the transactions proceed
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
-# Commit succeeds via replay
+# Commit succeeds
--connection node_1
--reap
diff --git a/mysql-test/suite/galera/t/MW-328-footer.inc b/mysql-test/suite/galera/t/MW-328-footer.inc
deleted file mode 100644
index 12a4bf12590..00000000000
--- a/mysql-test/suite/galera/t/MW-328-footer.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Cleanup for MW-328 tests
-#
-
---connection node_1
---disable_query_log
---eval KILL CONNECTION $sp_connection_id
---enable_query_log
-
---connection node_1X
---error 2013,1317
---reap
-
---connection node_1
-DROP PROCEDURE proc_update;
-DROP TABLE t1, t2;
-
-CALL mtr.add_suppression("conflict state ABORTED after post commit");
diff --git a/mysql-test/suite/galera/t/MW-328-header.inc b/mysql-test/suite/galera/t/MW-328-header.inc
deleted file mode 100644
index f0a6ccaccc6..00000000000
--- a/mysql-test/suite/galera/t/MW-328-header.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Initialization for MW-328 tests
-#
-
-CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
-INSERT INTO t1 (f1) VALUES (1);
-
-CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
-
-#
-# Have some random updates going on against t1
-#
-
-DELIMITER |;
-CREATE PROCEDURE proc_update ()
-BEGIN
- DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
- SET SESSION wsrep_sync_wait = 0;
- WHILE 1 DO
- UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4);
- END WHILE;
-END|
-
-DELIMITER ;|
-
---connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1
---connection node_1X
---let $sp_connection_id = `SELECT CONNECTION_ID()`
---send CALL proc_update();
diff --git a/mysql-test/suite/galera/t/MW-328A.cnf b/mysql-test/suite/galera/t/MW-328A.cnf
deleted file mode 100644
index a10ea88bdf2..00000000000
--- a/mysql-test/suite/galera/t/MW-328A.cnf
+++ /dev/null
@@ -1,7 +0,0 @@
-!include ../galera_2nodes.cnf
-
-[mysqld.1]
-wsrep-debug=ON
-
-[mysqld.2]
-wsrep-debug=ON
diff --git a/mysql-test/suite/galera/t/MW-328A.test b/mysql-test/suite/galera/t/MW-328A.test
deleted file mode 100644
index a547823ced0..00000000000
--- a/mysql-test/suite/galera/t/MW-328A.test
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# MW-328 Fix unnecessary/silent BF aborts
-#
-
-#
-# test phase 1 is not deterministic
-#
-# Here we attempt to insert into t2 and check if insert actually
-# inserted rows if a success was reported.
-#
-# However, deadlocks may or may not happen in this test execution
-# it all depends on timing.
-#
-
---source include/galera_cluster.inc
---source include/force_restart.inc
---source suite/galera/t/MW-328-header.inc
-
---connection node_2
---let $count = 100
---let $successes = 0
---let $deadlocks = 0
-
-SET SESSION wsrep_retry_autocommit = 0;
-
---disable_query_log
-
-while ($count)
-{
- TRUNCATE TABLE t2;
-
- --error 0,ER_LOCK_DEADLOCK
- INSERT IGNORE INTO t2 SELECT f2 FROM t1;
- if ($mysql_errno != 1213) {
- --inc $successes
- if (`SELECT COUNT(*) = 0 FROM t2`) {
- --die No rows arrived in table t2
- }
- }
-
- if ($mysql_errno == 1213) {
- --inc $deadlocks
-
- }
-
- --dec $count
-}
-
---enable_query_log
-
-
---source suite/galera/t/MW-328-footer.inc
-
-#
-# Test phase 2 is deterministic
-# Here we generate a sure conflict in node 1 and verify that
-# insert failed in both nodes
-#
---connection node_1
-CREATE TABLE t1 (i int primary key, j int) engine=innodb;
-INSERT INTO t1 values (1,0);
-
-BEGIN;
-UPDATE t1 SET j=1 WHERE i=1;
-
---connection node_2
-UPDATE t1 SET j=2 WHERE i=1;
-
---connection node_1
---error ER_LOCK_DEADLOCK
-COMMIT;
-
-SELECT * FROM t1;
---connection node_2
-SELECT * FROM t1;
---connection node_1
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-328B.cnf b/mysql-test/suite/galera/t/MW-328B.cnf
deleted file mode 100644
index a10ea88bdf2..00000000000
--- a/mysql-test/suite/galera/t/MW-328B.cnf
+++ /dev/null
@@ -1,7 +0,0 @@
-!include ../galera_2nodes.cnf
-
-[mysqld.1]
-wsrep-debug=ON
-
-[mysqld.2]
-wsrep-debug=ON
diff --git a/mysql-test/suite/galera/t/MW-328B.test b/mysql-test/suite/galera/t/MW-328B.test
deleted file mode 100644
index 41581d9c239..00000000000
--- a/mysql-test/suite/galera/t/MW-328B.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# MW-328 Fix unnecessary/silent BF aborts
-#
-
-#
-# Make sure an unrelated SELECT following a BF-aborted query never
-# gets the deadlock error
-#
-
---source include/galera_cluster.inc
---source include/force_restart.inc
---source suite/galera/t/MW-328-header.inc
-
---connection node_2
---let $count = 100
-
-SET SESSION wsrep_retry_autocommit = 0;
-
---disable_query_log
-
-while ($count)
-{
- --error 0,1213
- INSERT IGNORE INTO t2 SELECT f2 FROM t1;
-
- --disable_result_log
- --error 0
- SELECT 1 FROM DUAL;
- --enable_result_log
-
- --dec $count
-}
-
---enable_query_log
-
---source suite/galera/t/MW-328-footer.inc
diff --git a/mysql-test/suite/galera/t/MW-328D.test b/mysql-test/suite/galera/t/MW-328D.test
deleted file mode 100644
index e8a22f22a99..00000000000
--- a/mysql-test/suite/galera/t/MW-328D.test
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# MW-328 Fix unnecessary/silent BF aborts
-#
-
-#
-# Test that non-Galera deadlock error still behaves as expected
-#
-
---source include/galera_cluster.inc
-
-CREATE TABLE t1 (i INT) ENGINE = InnoDB;
-INSERT INTO t1 (i) VALUES(1);
-
-CREATE TABLE t2 (i INT) ENGINE = InnoDB;
-
-# Create a deadlock situation
-
---connection node_1
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-SELECT * FROM t1 WHERE i = 1 LOCK IN SHARE MODE;
-
---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---connection node_1a
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
---send INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE i = 1 FOR UPDATE;
-
---connection node_1
---sleep 2
-DELETE FROM t1 WHERE i = 1;
-COMMIT;
-
-# We expect that ER_LOCK_DEADLOCK will be delivered even though it was a INSERT INGORE statement
---connection node_1a
---error ER_LOCK_DEADLOCK
---reap
-
-DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/t/MW-328E.test b/mysql-test/suite/galera/t/MW-328E.test
deleted file mode 100644
index 34b17be7b08..00000000000
--- a/mysql-test/suite/galera/t/MW-328E.test
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# MW-328 Fix unnecessary/silent BF aborts
-#
-
-#
-# Test that non-Galera deadlock error still behaves as expected (case #2)
-#
-
---source include/galera_cluster.inc
-
-create table t1 (i int primary key, j int) engine=innodb;
-create table t2 (i int primary key, j int) engine=innodb;
-
-insert into t1 values (1,0);
-insert into t2 values (2,0);
-
-set autocommit=off;
-start transaction;
-update t1 set j=1 where i=1;
-
---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---connection node_1a
-set autocommit=off;
-start transaction;
-begin;
-update t2 set j=1 where i=2;
-
---connection node_1
-# Hang expected here
---send insert into t1 select * from t2;
-
---sleep 2
---connection node_1a
---error ER_LOCK_DEADLOCK
-insert into t2 select * from t1;
-
---connection node_1
---reap
-
-DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test
index dc2693ab859..904fc2f95d8 100644
--- a/mysql-test/suite/galera/t/MW-329.test
+++ b/mysql-test/suite/galera/t/MW-329.test
@@ -11,11 +11,6 @@ CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
# We start with a populated table
INSERT INTO t1 (f1) VALUES (1),(65535);
-# Clear the wsrep_local_replays counter
-
-FLUSH STATUS;
-SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
-
#
# Run concurrent INSERTs
#
@@ -45,8 +40,9 @@ DELIMITER ;|
#
--connection node_2
-CALL mtr.add_suppression("WSREP: Failed to report last committed .*");
---let $count = 200
+--let $count = 10
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
while ($count)
{
--let $signature = `SELECT LEFT(MD5(RAND()), 10)`
@@ -60,14 +56,28 @@ while ($count)
--die ROW_COUNT() = 0
}
}
- --dec $count
+
+ #
+ # Ensure at least one replay happens
+ #
+
+ --let $wsrep_replays = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+ --disable_query_log
+ if (`SELECT $wsrep_replays - $wsrep_local_replays_old > 0`) {
+ --dec $count
+ }
+ --enable_query_log
}
#
# Confirm that some transaction replays occurred
#
-SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old > 0 AS wsrep_local_replays;
+--enable_query_log
+
#
# Terminate the stored procedure
diff --git a/mysql-test/suite/galera/t/MW-336.cnf b/mysql-test/suite/galera/t/MW-336.cnf
index 4f23644ca50..e68f891792c 100644
--- a/mysql-test/suite/galera/t/MW-336.cnf
+++ b/mysql-test/suite/galera/t/MW-336.cnf
@@ -1,8 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld.1]
-wsrep-debug=ON
+wsrep-debug=SERVER
[mysqld.2]
-wsrep-debug=ON
-
+wsrep-debug=SERVER
diff --git a/mysql-test/suite/galera/t/MW-360-master.opt b/mysql-test/suite/galera/t/MW-360-master.opt
new file mode 100644
index 00000000000..e51c49c3808
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-360-master.opt
@@ -0,0 +1,2 @@
+--gtid-domain-id=1 --log-bin --log-slave-updates
+
diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc
index 5fd9ef150ae..71df979d6ba 100644
--- a/mysql-test/suite/galera/t/MW-369.inc
+++ b/mysql-test/suite/galera/t/MW-369.inc
@@ -24,7 +24,6 @@
--connection node_1
SET AUTOCOMMIT=ON;
START TRANSACTION;
-
--eval $mw_369_parent_query
#
@@ -51,7 +50,7 @@ SET SESSION wsrep_sync_wait = 0;
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
---let $galera_sync_point = local_monitor_enter_sync
+--let $galera_sync_point = local_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
--connection node_1
@@ -61,7 +60,7 @@ SET SESSION wsrep_sync_wait = 0;
# Wait until both sync points have been reached
#
--connection node_1a
---let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_enter_sync
+--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
#
@@ -70,6 +69,6 @@ SET SESSION wsrep_sync_wait = 0;
--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_signal_sync_point.inc
---let $galera_sync_point = local_monitor_enter_sync
+--let $galera_sync_point = local_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc
diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test
index 720d6daf518..c8f8c974019 100644
--- a/mysql-test/suite/galera/t/MW-369.test
+++ b/mysql-test/suite/galera/t/MW-369.test
@@ -24,7 +24,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
@@ -244,3 +244,101 @@ SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+#
+# Test F Outline:
+# ===============
+#
+# Test two concurrent INSERTs on the child table.
+#
+# The pf table will originally have row (1)
+# The cf table will originally be empty
+#
+# A new row (10, 1) pointing to parent row (1) is inserted from
+# connection node_2. A transaction which tries to INSERT another child
+# row (20, 1), pointing to the same parent, is run from connection node_1.
+#
+# Expected Outcome:
+# =================
+# Both INSERTs should succeed since they don't modify the common parent
+# key.
+#
+# At the end of the test:
+# parent table should have row (1)
+# child table should have rows (10, 1), (20, 1)
+
+--connection node_1
+
+CREATE TABLE pf (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE cf (
+ f1 INTEGER PRIMARY KEY,
+ p_id INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pf (f1)
+);
+
+INSERT INTO pf VALUES (1);
+
+# This is run on node1:
+--let $mw_369_parent_query = INSERT INTO cf (f1, p_id) VALUES (10, 1)
+# This is run on node2:
+--let $mw_369_child_query = INSERT INTO cf (f1, p_id) VALUES (20, 1)
+--source MW-369.inc
+
+--connection node_1
+--reap
+
+--connection node_2
+SELECT * FROM pf;
+SELECT * FROM cf;
+
+DROP TABLE cf;
+DROP TABLE pf;
+
+#
+# Test G Outline:
+# ===============
+#
+# This test is similar to test B where a existing
+# child table row is updated concurrently from another node
+# with a transaction which updates the parent table, except
+# that here the child table row is inserted, not updated.
+#
+# The pg table will originally have rows (1, 0), (2, 0).
+# The cg table will originally be empty
+#
+# Expected outcome:
+# ================
+#
+# Both UPDATE and INSERT should succeed since they are done to separate tables
+# and UPDATE to parent row does not touch the foreign key referenced by the
+# child row INSERT. The parent table shall contain rows (1, 1), (2, 0).
+# The child table shall contain row (1, 1, 0) which points to parent table
+# row (1, 0).
+#
+
+--connection node_1
+CREATE TABLE pg (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE cg (f1 INTEGER PRIMARY KEY, p_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pg (f1)) ;
+
+INSERT INTO pg VALUES (1, 0);
+INSERT INTO pg VALUES (2, 0);
+
+--let mw_369_parent_query = UPDATE pg SET f2 = 1 WHERE f1 = 1
+--let $mw_369_child_query = INSERT INTO cg VALUES (1, 1, 0)
+--source MW-369.inc
+
+# Commit succeeds
+--connection node_1
+--reap
+
+--connection node_2
+SELECT * FROM pg;
+SELECT * FROM cg;
+
+DROP TABLE cg;
+DROP TABLE pg;
+
diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test
index 36b691c6295..4b83e25dc50 100644
--- a/mysql-test/suite/galera/t/MW-402.test
+++ b/mysql-test/suite/galera/t/MW-402.test
@@ -1,6 +1,6 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
#
# we must open connection node_1a here, MW-369.inc will use it later
@@ -135,7 +135,6 @@ SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
-
#
# CASCADE DELETE tests with two parent tables
# Here we cause cascaded operation on child table through
@@ -151,10 +150,11 @@ DROP TABLE p;
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
-CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER,
- CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE,
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ ON DELETE CASCADE,
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1));
-
INSERT INTO p1 VALUES (1, 0);
INSERT INTO p2 VALUES (1, 0);
@@ -171,7 +171,51 @@ INSERT INTO c VALUES (1, 1, 1, 0);
--connection node_1
--reap
-# same as previous, but statements in different order
+--connection node_2
+SELECT * FROM p1;
+SELECT * FROM p2;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
+
+#
+# CASCADE DELETE tests with two parent tables
+# Here we cause cascaded operation on child table through
+# one parent table and issue other delete operation through the
+# other parent table. The cascade progresses to same child table row where
+# we should see the conflict to happen
+#
+# As a result, the update on p2 should fail
+#
+--connection node_1
+
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ ON DELETE CASCADE,
+ CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ ON DELETE CASCADE);
+
+INSERT INTO p1 VALUES (1, 0);
+INSERT INTO p2 VALUES (1, 0);
+
+INSERT INTO c VALUES (1, 1, 1, 0);
+
+--let $mw_369_parent_query = DELETE FROM p2 WHERE f1=1
+--let $mw_369_child_query = DELETE FROM p1 WHERE f1=1
+
+--connection node_1a
+--source MW-369.inc
+
+# Commit succeeds
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
--connection node_2
SELECT * FROM p1;
SELECT * FROM p2;
diff --git a/mysql-test/suite/galera/t/MW-44.test b/mysql-test/suite/galera/t/MW-44.test
index a2acfc57f6c..7b479d45844 100644
--- a/mysql-test/suite/galera/t/MW-44.test
+++ b/mysql-test/suite/galera/t/MW-44.test
@@ -19,7 +19,11 @@ SET SESSION wsrep_osu_method=RSU;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
SET SESSION wsrep_osu_method=TOI;
---let $wait_condition = SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%"
+--let $wait_condition = SELECT COUNT(*) = 1 FROM mysql.general_log WHERE argument LIKE "CREATE%" AND command_type != 'Prepare'
+--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
+--source include/wait_condition_with_debug.inc
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM mysql.general_log WHERE argument LIKE "ALTER%" AND command_type != 'Prepare'
--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
--source include/wait_condition_with_debug.inc
diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test
index c5b78be64e5..7ebd3ba95a0 100644
--- a/mysql-test/suite/galera/t/MW-86-wait1.test
+++ b/mysql-test/suite/galera/t/MW-86-wait1.test
@@ -9,12 +9,15 @@
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
+SET @orig_debug=@@debug_dbug;
+
--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
SELECT @@debug_sync;
+set debug_sync='RESET';
SET SESSION wsrep_sync_wait = 1;
-SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
--connection node_1
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
@@ -92,16 +95,15 @@ SHOW WARNINGS;
--enable_result_log
# Unblock the background INSERT and remove the sync point.
-SET GLOBAL debug_dbug = "";
-SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+SET GLOBAL debug_dbug = @orig_debug;
+SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
# This will wait for the background INSERT to complete before we quit
# from the test.
DROP TABLE t_wait1;
-SET debug_sync='RESET';
-
# Make sure no pending signals are leftover to surprise subsequent tests.
SELECT @@debug_sync;
diff --git a/mysql-test/suite/galera/t/MW-86-wait8.test b/mysql-test/suite/galera/t/MW-86-wait8.test
index a648924b9d8..1b3f355eb25 100644
--- a/mysql-test/suite/galera/t/MW-86-wait8.test
+++ b/mysql-test/suite/galera/t/MW-86-wait8.test
@@ -7,12 +7,14 @@
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
+SET @orig_debug=@@debug_dbug;
+
--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
SELECT @@debug_sync;
SET SESSION wsrep_sync_wait = 8;
-SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
--connection node_1
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
@@ -114,8 +116,10 @@ SHOW WARNINGS;
--enable_query_log
# Unblock the background INSERT and remove the sync point.
-SET GLOBAL debug_dbug = "";
+SET GLOBAL debug_dbug = @orig_debug;
+
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
@@ -123,7 +127,5 @@ SET SESSION wsrep_sync_wait = default;
# from the test.
DROP TABLE t_wait8;
-SET debug_sync='RESET';
-
# Make sure no pending signals are leftover to surprise subsequent tests.
SELECT @@debug_sync;
diff --git a/mysql-test/suite/galera/t/galera#505.test b/mysql-test/suite/galera/t/galera#505.test
index 785b1411596..67ec1045119 100644
--- a/mysql-test/suite/galera/t/galera#505.test
+++ b/mysql-test/suite/galera/t/galera#505.test
@@ -5,12 +5,9 @@
--connection node_1
SET SESSION wsrep_sync_wait=0;
---disable_result_log
---disable_query_log
--let $galera_version=25.3.24
source ../../wsrep/include/check_galera_version.inc;
---enable_result_log
---enable_query_log
+
SET SESSION wsrep_sync_wait=DEFAULT;
# Convert "... pc.weight = N; ..." to "N; ..."
diff --git a/mysql-test/suite/galera/t/galera_UK_conflict.test b/mysql-test/suite/galera/t/galera_UK_conflict.test
index 83d0e47dc3d..7a14821cc32 100644
--- a/mysql-test/suite/galera/t/galera_UK_conflict.test
+++ b/mysql-test/suite/galera/t/galera_UK_conflict.test
@@ -1,14 +1,14 @@
#
# This test tests the operation of transaction replay with a scenario
-# where two subsequent write sets in applying conflict with local transaction
+# where two subsequent write sets being applied conflict with local transaction
# in commit phase. The conflict is "false positive" confict on GAP lock in
# secondary unique index.
# The first applier will cause BF abort for the local committer, which
# starts replaying because of positive certification.
-# In buggy version, scenatio continues so that ehile the local transaction
+# In buggy version, the test scenario continues so that while the local transaction
# is replaying, the latter applier experiences similar UK GAP lock conflict
# and forces the replayer to abort second time.
-# In fixed version, this latter BF abort should not happen.
+# In fixed version, this latter replayer BF abort should not happen.
#
--source include/galera_cluster.inc
@@ -16,15 +16,16 @@
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
---let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+--let $expected_wsrep_local_replays = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
INSERT INTO t1 VALUES (1, 1, 0);
INSERT INTO t1 VALUES (3, 3, 0);
INSERT INTO t1 VALUES (10, 10, 0);
-# we will need 2 appliers threads for applyin two write sets in parallel in node1
-# and 1 applier thread for handling replaying
+# we will need 2 appliers threads for applyin two writes ets in parallel in node1
+# and 1 applier thread for handling replaying
SET GLOBAL wsrep_slave_threads = 3;
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
@@ -42,7 +43,7 @@ INSERT INTO t1 VALUES (3, 3, 1);
--connection node_1a
SET SESSION wsrep_sync_wait=0;
-# send from node 2 first INSERT transaction, which will conflict on GAP lock in node 1
+# send from node 2 first an INSERT transaction, which will conflict on GAP lock in node 1
--connection node_2
INSERT INTO t1 VALUES (5, 5, 2);
@@ -67,7 +68,7 @@ INSERT INTO t1 VALUES (4, 4, 2);
# both appliers are now waiting in separate sync points
# Block the local commit, send the COMMIT and wait until it gets blocked
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
--connection node_1
@@ -75,12 +76,12 @@ INSERT INTO t1 VALUES (4, 4, 2);
--connection node_1a
# wait for the local commit to enter in commit monitor wait state
---let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_enter_sync
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
# release the local transaction to continue with commit
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc
@@ -90,6 +91,11 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SET GLOBAL debug_dbug = NULL;
SET debug_sync='RESET';
+# wait for BF abort to happen and replaying begin
+--let $wait_condition = SELECT VARIABLE_VALUE= $expected_wsrep_local_replays FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
+--let $wait_condition_on_error_output= SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
+--source include/wait_condition_with_debug.inc
+
# set another sync point for second applier
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
@@ -97,11 +103,11 @@ SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_signal_sync_point.inc
-# waiting until second applier is in wait
+# waiting until second applier is in wait state
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
# stopping second applier before commit
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc
--source include/galera_clear_sync_point.inc
@@ -112,9 +118,9 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SET GLOBAL debug_dbug = NULL;
SET debug_sync='RESET';
-# with fixed version, second applier has reached commit monitor, and we can
+# with fixed version, second applier has reached comit monitor, and we can
# release it to complete
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_slave_enter_sync
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc
@@ -124,11 +130,147 @@ SET debug_sync='RESET';
SELECT * FROM t1;
-# wsrep_local_replays has increased by 1
---let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
---disable_query_log
---eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
---enable_query_log
+# returning original slave thread count
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+
+--connection node_2
+SELECT * FROM t1;
+
+# replicate some transactions, so that wsrep slave thread count can reach
+# original state in node 1
+INSERT INTO t1 VALUES (7,7,7);
+INSERT INTO t1 VALUES (8,8,8);
+SELECT COUNT(*) FROM t1;
+SELECT * FROM t1;
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 7 FROM t1
+--source include/wait_condition.inc
+SELECT COUNT(*) FROM t1;
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+##################################################################################
+# test scenario 2
+#
+# commit order is now: INSERT-1, local COMMIT, INSERT-2
+# while local trx is replaying, the latter applier has applied and is waiting
+# for commit.
+# The point in this scenario is to verify that replayer does not try to abort
+# the latter applier
+#################################################################################
+
+--echo test scenario 2
+
+--connection node_1
+--let $expected_wsrep_local_replays = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
+INSERT INTO t1 VALUES (1, 1, 0);
+INSERT INTO t1 VALUES (3, 3, 0);
+INSERT INTO t1 VALUES (10, 10, 0);
+
+# we will need 2 appliers threads for applyin two writes sets in parallel in node1
+# and 1 applier thread for handling replaying
+SET GLOBAL wsrep_slave_threads = 3;
+
+# set sync point for the first INSERT applier
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+# starting a transaction, which deletes and inserts the middle row in test table
+# this will be victim of false positive conflict with appliers
+SET SESSION wsrep_sync_wait=0;
+START TRANSACTION;
+
+DELETE FROM t1 WHERE f2 = 3;
+INSERT INTO t1 VALUES (3, 3, 1);
+
+# Control connection to manage sync points for appliers
+--connection node_1a
+SET SESSION wsrep_sync_wait=0;
+
+# send from node 2 first an INSERT transaction, which will conflict on GAP lock in node 1
+--connection node_2
+INSERT INTO t1 VALUES (5, 5, 2);
+
+--connection node_1a
+# wait to see the INSERT in apply_cb sync point
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Block the local commit, send the COMMIT and wait until it gets blocked
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+--send COMMIT
+
+--connection node_1a
+# wait for the local commit to enter in commit monitor wait state
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# first applier is now waiting in before commit, and local trx in commit monitor
+
+# set sync point before replaying
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_replay_cb";
+
+# release the local transaction to continue with commit
+# it should advance and end up waiting in commit monitor for his turn
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# and now release the first applier, it should force local trx to abort
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# wait for BF abort to happen and replaying begin
+--let $wait_condition = SELECT VARIABLE_VALUE= $expected_wsrep_local_replays FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
+--let $wait_condition_on_error_output= SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
+--source include/wait_condition_with_debug.inc
+
+# replayer should now be in stopped in sync point
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_replay_cb_reached";
+
+# set sync point for the second INSERT
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+# send second insert into same GAP in test table
+INSERT INTO t1 VALUES (4, 4, 2);
+
+--connection node_1a
+# wait for the second applier to enter in commit monitor wait state
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# and, letting the second appier to move forward, it will stop naturally
+# to wait for commit order after replayer's commit
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# and now release the replayer, if all is good,it will commit before the second applier
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_replay_cb";
+SET GLOBAL debug_dbug = NULL;
+SET debug_sync='RESET';
+
+# local commit should succeed
+--connection node_1
+--reap
+
+--let $wait_condition = SELECT COUNT(*)=5 FROM t1;
+--source include/wait_condition.inc
# returning original slave thread count
SET GLOBAL wsrep_slave_threads = DEFAULT;
@@ -140,6 +282,7 @@ SELECT * FROM t1;
# original state in node 1
INSERT INTO t1 VALUES (7,7,7);
INSERT INTO t1 VALUES (8,8,8);
+
SELECT COUNT(*) FROM t1;
SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt
new file mode 100644
index 00000000000..6f688b39fd5
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt
@@ -0,0 +1 @@
+--lock_wait_timeout=5 --innodb_lock_wait_timeout=5 --wait_timeout=60
diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
index 67f2108d263..d62b6552973 100644
--- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
+++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
@@ -19,12 +19,17 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
FLUSH TABLE t1 WITH READ LOCK;
--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--connection node_1
SELECT 1 FROM DUAL;
-# Sleep for longer than the global timeout ...
---sleep 6
+# Wait
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock';
+--source include/wait_condition.inc
+
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock';
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/t/galera_as_master.test b/mysql-test/suite/galera/t/galera_as_master.test
index 49f3c993256..1c439ffff63 100644
--- a/mysql-test/suite/galera/t/galera_as_master.test
+++ b/mysql-test/suite/galera/t/galera_as_master.test
@@ -64,4 +64,6 @@ RESET SLAVE ALL;
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
--connection node_1
+set global wsrep_on=OFF;
RESET MASTER;
+set global wsrep_on=ON;
diff --git a/mysql-test/suite/galera/t/galera_as_slave.test b/mysql-test/suite/galera/t/galera_as_slave.test
index 849b75eadd1..da92437b118 100644
--- a/mysql-test/suite/galera/t/galera_as_slave.test
+++ b/mysql-test/suite/galera/t/galera_as_slave.test
@@ -5,18 +5,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -29,14 +30,14 @@ INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES (2);
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
SELECT COUNT(*) = 2 FROM t1;
INSERT INTO t1 VALUES (3);
--connection node_2
SELECT COUNT(*) = 3 FROM t1;
---connection node_1
+--connection node_3
DROP TABLE t1;
--connection node_2
@@ -46,5 +47,5 @@ DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
---connection node_1
+--connection node_3
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
index 59483d0591c..ce4c87e2bee 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
@@ -5,18 +5,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
##
## Verify the correct operation of the auto-increment when
@@ -62,15 +63,16 @@ select * from t1;
show variables like 'binlog_format';
show variables like 'auto_increment_increment';
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
-
+--connection node_1
select * from t1;
show variables like 'binlog_format';
show variables like 'auto_increment_increment';
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
---connection node_1
+--connection node_3
DROP TABLE t1;
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
@@ -79,5 +81,5 @@ DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
---connection node_1
+--connection node_3
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_ctas.test b/mysql-test/suite/galera/t/galera_as_slave_ctas.test
index 1a5e023b981..eced636c600 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_ctas.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_ctas.test
@@ -6,70 +6,69 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--source include/have_log_bin.inc
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+SELECT @@wsrep_on;
---connection node_2
+--connection node_1
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
-
# make sure master server has binlog_format=ROW
---connection node_1
+--connection node_3
SHOW VARIABLES LIKE 'binlog_format';
#
# test phase one, issue CTAS with empty source table
#
---connection node_1
+
CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE target AS SELECT * FROM source;
---connection node_2
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--source include/wait_condition.inc
---connection node_3
+--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--source include/wait_condition.inc
#
# test phase two, issue CTAS with populated source table
#
---connection node_1
+--connection node_3
DROP TABLE target;
INSERT INTO source VALUES(1);
CREATE TABLE target AS SELECT * FROM source;
---connection node_2
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM target;
--source include/wait_condition.inc
---connection node_3
+--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM target;
--source include/wait_condition.inc
---connection node_1
+--connection node_3
DROP TABLE source;
DROP TABLE target;
---connection node_3
+--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--source include/wait_condition.inc
-
---connection node_2
+--connection node_1
STOP SLAVE;
RESET SLAVE ALL;
---connection node_1
+--connection node_3
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid.inc b/mysql-test/suite/galera/t/galera_as_slave_gtid.inc
index 461e7833a94..ca6cce52497 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_gtid.inc
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid.inc
@@ -8,6 +8,7 @@
#
--source include/have_innodb.inc
+--source include/have_log_bin.inc
--source include/galera_cluster.inc
# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid.test b/mysql-test/suite/galera/t/galera_as_slave_gtid.test
index a3c43540916..c5f45031050 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_gtid.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid.test
@@ -7,71 +7,4 @@
# In addition to performing DDL and DML, we check that the gtid of the master is preserved inside the cluster
#
---source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---source include/galera_cluster.inc
-
---connection node_2
---disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
---enable_query_log
-START SLAVE;
-
---connection node_1
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(1);
-
-SELECT LENGTH(@@global.gtid_binlog_state) > 1;
---let $gtid_binlog_state_node1 = `SELECT @@global.gtid_binlog_state;`
-
---connection node_2
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
---source include/wait_condition.inc
-
---let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
---source include/wait_condition.inc
-
---disable_query_log
---eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
---enable_query_log
-
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
-SELECT COUNT(*) = 1 FROM t1;
-
---disable_query_log
---eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
---enable_query_log
-
---connection node_1
-DROP TABLE t1;
-
-#
-# Unfortunately without the sleep below the following statement fails with "query returned no rows", which
-# is difficult to understand given that it is an aggregate query. A "query execution was interrupted"
-# warning is also reported by MTR, which is also weird.
-#
-
---sleep 1
-
---connection node_3
---let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
---source include/wait_condition.inc
-
---connection node_2
---let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
---source include/wait_condition.inc
-
-STOP SLAVE;
-RESET SLAVE ALL;
-
---echo #cleanup
---connection node_1
-reset master;
-
---connection node_2
-reset master;
-
---connection node_3
-reset master;
+--source galera_as_slave_gtid.inc
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.cnf b/mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.cnf
new file mode 100644
index 00000000000..efabe4161aa
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.cnf
@@ -0,0 +1,8 @@
+!include ../galera_2nodes_as_slave.cnf
+
+[mysqld]
+log-bin=mysqld-bin
+log-slave-updates
+binlog-format=ROW
+
+gtid_pos_auto_engines=InnoDB
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.test
new file mode 100644
index 00000000000..5ef98573660
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_auto_engine.test
@@ -0,0 +1,14 @@
+#
+# Test Galera as a slave to a MariaDB master using GTIDs
+#
+# suite/galera/galera_2nodes_as_slave.cnf describes the setup of the nodes
+# suite/galera/t/galera_as_slave_gtid.cnf has the GTID options
+#
+# In addition to performing DDL and DML, we check that the gtid of the master is preserved inside the cluster
+#
+
+--source galera_as_slave_gtid.inc
+
+--connection node_2
+DROP TABLE mysql.gtid_slave_pos_InnoDB;
+CALL mtr.add_suppression("The automatically created table");
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test
index 940c9c0667d..8787f864a99 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test
@@ -12,29 +12,32 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--source include/have_log_bin.inc
--source include/galera_cluster.inc
SELECT @@WSREP_ON;
---connection node_2
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+SELECT @@wsrep_on;
+
+--connection node_1
# make sure gtid_slave_pos is of innodb engine, mtr does not currently provide that
ALTER TABLE mysql.gtid_slave_pos engine = InnoDB;
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1);
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
--let $gtid_binlog_state_node1 = `SELECT @@global.gtid_binlog_state;`
---connection node_2
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
@@ -45,18 +48,22 @@ SELECT LENGTH(@@global.gtid_binlog_state) > 1;
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
--enable_query_log
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
-SELECT COUNT(*) = 0 FROM t1;
+--connection node_2
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
--disable_query_log
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
--enable_query_log
--echo #cleanup
+--connection node_3
+DROP TABLE t1;
+
--sleep 1
--connection node_1
-DROP TABLE t1;
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
@@ -65,13 +72,19 @@ DROP TABLE t1;
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
+RESET MASTER;
+
--connection node_1
+STOP SLAVE;
+RESET SLAVE ALL;
+SET GLOBAL WSREP_ON=OFF;
reset master;
+SET GLOBAL WSREP_ON=ON;
--connection node_2
-STOP SLAVE;
-RESET SLAVE ALL;
+SET GLOBAL WSREP_ON=OFF;
reset master;
+SET GLOBAL WSREP_ON=ON;
--connection node_3
-reset master;
+RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
index 46a93458271..0d878db29b8 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
@@ -7,22 +7,23 @@
--source include/have_innodb.inc
--source include/big_test.inc
+--source include/galera_cluster.inc
# Step #1. Establish replication
#
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
-#
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---source include/galera_cluster.inc
+# As node 4 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_4 connection here
+--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root';
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_4, MASTER_USER='root';
--enable_query_log
START SLAVE;
SET SESSION wsrep_sync_wait = 0;
---connection node_1
+--connection node_4
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
@@ -34,22 +35,21 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connection node_3
+--connection node_1
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
# Step #3. Force async replication to fail by creating a replication event while the slave is non-prim
---connection node_1
+--connection node_4
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
--connection node_2
--sleep 5
--let $value = query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1)
---connection node_3
+--connection node_1
--disable_query_log
--eval SELECT "$value" IN ("Error 'Unknown command' on query. Default database: 'test'. Query: 'BEGIN'", "Node has dropped from cluster") AS expected_error
--enable_query_log
@@ -58,7 +58,7 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
---connection node_3
+--connection node_1
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
@@ -74,7 +74,7 @@ START SLAVE;
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
--source include/wait_condition.inc
---connection node_1
+--connection node_4
DROP TABLE t1;
--sleep 2
@@ -91,6 +91,5 @@ CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
-
---connection node_1
+--connection node_4
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_replay.cnf b/mysql-test/suite/galera/t/galera_as_slave_replay.cnf
index b1f9d7e9cbd..c20c65f86d9 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_replay.cnf
+++ b/mysql-test/suite/galera/t/galera_as_slave_replay.cnf
@@ -5,7 +5,9 @@ binlog-format=row
[mysqld.1]
wsrep_restart_slave=1
+wsrep-debug=1
[mysqld.2]
wsrep_restart_slave=1
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_as_slave_replay.test b/mysql-test/suite/galera/t/galera_as_slave_replay.test
index 93f95349e6d..725d72c4144 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_replay.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_replay.test
@@ -18,9 +18,10 @@
#--source suite/galera/include/galera_have_debug_sync.inc
#
-# node 1 is native MariaDB server operating as async replication master
+# node 3 is native MariaDB server operating as async replication master
#
---connection node_1
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
RESET MASTER;
--connection node_2a
@@ -31,14 +32,14 @@ RESET MASTER;
#
-# nodes 2 and 3 form a galera cluster, node 2 operates as slave for native MariaDB naster in node 1
+# nodes 1 and 2 form a galera cluster, node 2 operates as slave for native MariaDB naster in node 3
#
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (3, 'a');
@@ -63,15 +64,14 @@ SET SESSION wsrep_sync_wait = 0;
--source include/wait_condition.inc
# wait for create table and inserts to be replicated in cluster
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connection node_3
+--connection node_1
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT COUNT(*) = 2 FROM test.t1;
--source include/wait_condition.inc
--connection node_2a
# Block the future commit of async replication
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
# block also the applier before applying begins
@@ -81,13 +81,13 @@ SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
# now inject a conflicting insert from node 3, it will replicate with
# earlier seqno (than async transaction) and pause before applying in node 2
#
---connection node_3
+--connection node_1
INSERT INTO test.t1 VALUES (2, 'b');
#
# send the update from master, this will succeed here, beceuase of async replication.
# async replication will apply this in node 2 and pause before commit phase,
---connection node_1
+--connection node_3
--error 0
COMMIT;
@@ -108,7 +108,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
--source include/galera_clear_sync_point.inc
--source include/galera_signal_sync_point.inc
---connection node_1
+--connection node_3
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
@@ -131,70 +131,16 @@ set session wsrep_sync_wait=0;
SELECT * FROM t1;
SET DEBUG_SYNC = "RESET";
-#********************************************************************************
-# test phase 2
-#********************************************************************************
-
---echo #
---echo # test phase with real abort
---echo #
-
---connection node_1
-
-set binlog_format=ROW;
-
-insert into t1 values (4, 'd');
-
-SET AUTOCOMMIT=ON;
-START TRANSACTION;
-
-UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
-
---connection node_2a
-# wait for the last insert to be replicated from master
---let $wait_condition = SELECT COUNT(*) = 4 FROM test.t1;
---source include/wait_condition.inc
-
-# Block the commit
---let $galera_sync_point = commit_monitor_enter_sync
---source include/galera_set_sync_point.inc
-
-# block applier
-SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
-
-# Inject a conflicting update from node 3
---connection node_3
-UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
-
-# send the update from master
---connection node_1
---error 0
-COMMIT;
-
---connection node_2a
-
-# release the applier
-SET GLOBAL debug_dbug = "";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
-
-
-# Unblock the async slave commit
---connection node_2a
---source include/galera_clear_sync_point.inc
---source include/galera_signal_sync_point.inc
-SET DEBUG_SYNC = "RESET";
-
--connection node_2a
-
-set session wsrep_sync_wait=15;
-SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
-set session wsrep_sync_wait=0;
-
STOP SLAVE;
RESET SLAVE;
DROP TABLE t1;
---connection node_1
+--connection node_3
DROP TABLE t1;
RESET MASTER;
+
+--connection node_1
+--disconnect node_2a
+--disconnect node_3
diff --git a/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.cnf b/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.cnf
deleted file mode 100644
index d092d88bfaf..00000000000
--- a/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.cnf
+++ /dev/null
@@ -1,4 +0,0 @@
-!include ../galera_2nodes_as_slave.cnf
-
-[mysqld]
-wsrep-mysql-replication-bundle=2
diff --git a/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test b/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test
deleted file mode 100644
index 460e040c010..00000000000
--- a/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Test the wsrep_replication_bundle variable. We expect that multiple async replication events
-# will be grouped together and thus a smaller number of wsrep_last_committed transactions will
-# be reported.
-#
-
---source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---source include/galera_cluster.inc
-
---connection node_2
---disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
---enable_query_log
-START SLAVE;
-
---connection node_1
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(1);
-INSERT INTO t1 VALUES(2);
-INSERT INTO t1 VALUES(3);
-INSERT INTO t1 VALUES(4);
-INSERT INTO t1 VALUES(5);
-
---connection node_2
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
---source include/wait_condition.inc
-
---let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
---source include/wait_condition.inc
-
-# With wsrep_mysql_replication_bundle = 2, the last insert is not delivered
-# because there are not enough events remaining to complete an entire bundle
-SELECT COUNT(*) = 4 FROM t1;
-
-# Bundle is now complete, the last INSERT and the DROP are delivered
---connection node_1
-DROP TABLE t1;
-
---connection node_2
---sleep 1
---let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
---source include/wait_condition.inc
-
-STOP SLAVE;
-RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
index bd6bf9d4f98..cddb8e0e174 100644
--- a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
+++ b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
@@ -5,7 +5,7 @@ wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
[mysqld.1]
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;pc.ignore_sb=true'
[mysqld.2]
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;pc.ignore_sb=true'
diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
index 9c94d7f10d2..ff8bdc9c4cc 100644
--- a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
+++ b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
@@ -20,6 +20,7 @@ INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
--source include/kill_galera.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
--connection node_1
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
diff --git a/mysql-test/suite/galera/t/galera_backup_stage.test b/mysql-test/suite/galera/t/galera_backup_stage.test
new file mode 100644
index 00000000000..31d76816355
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_backup_stage.test
@@ -0,0 +1,120 @@
+#
+# Check that BACKUP STAGE BLOCK_DDL desyncs and pauses the node until BACKUP STAGE END:
+# - Local DDLs will fail immediately
+# - Local DMLs will block until resync
+# - Remote txns will be applied after resync (STAGE END).
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 varchar(10)) ENGINE=InnoDB;
+
+# First, check that BACKUP STAGE END skipping desyncing stages is fine
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait=0;
+SET SESSION wsrep_retry_autocommit=0;
+INSERT INTO t1 (f1) values ("node1_1");
+ALTER TABLE t1 ADD COLUMN (f2 int(10));
+
+--connection node_2
+INSERT INTO t1 (f1) values ("node2_1");
+ALTER TABLE t1 ADD COLUMN (f3 int(10));
+
+# BLOCK_DDL desyncs and pauses the node
+--connection node_1
+BACKUP STAGE BLOCK_DDL;
+
+--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1c
+SET SESSION wsrep_sync_wait=0;
+--let $wait_condition = SELECT variable_value="Donor/Desynced" FROM information_schema.global_status WHERE variable_name="wsrep_local_state_comment"
+--source include/wait_condition.inc
+
+--connection node_2
+INSERT INTO t1 (f1) values("node2_2");
+ALTER TABLE t1 ADD COLUMN (f5 int(10));
+
+--connection node_1a
+--error ER_UNKNOWN_COM_ERROR
+ALTER TABLE t1 ADD COLUMN (f4 int(10));
+--let $insert_id = `SELECT CONNECTION_ID()`
+--send INSERT INTO t1 (f1) values("node1a");
+
+# the insert will block during commit inside the provider, in certify. We can't
+# check for sure it is blocked there, so we wait for the thread to at least
+# reach commit stage. In the unlikely case the interleaving is different, the
+# result of the test should not change.
+--connection node_1c
+--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.processlist WHERE State='Commit' AND ID=$insert_id
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.metadata_lock_info WHERE TABLE_NAME='t1' AND THREAD_ID=$insert_id
+--source include/wait_condition.inc
+
+--connection node_1
+BACKUP STAGE BLOCK_COMMIT;
+
+# node only resumes/resyncs upon STAGE END
+--connection node_1c
+SELECT variable_value="Donor/Desynced" FROM information_schema.global_status WHERE variable_name="wsrep_local_state_comment";
+
+--connection node_2
+INSERT INTO t1 (f1) values("node2_3");
+ALTER TABLE t1 ADD COLUMN (f6 int(10));
+
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
+SET SESSION wsrep_sync_wait=0;
+SET SESSION wsrep_retry_autocommit=0;
+--error ER_UNKNOWN_COM_ERROR
+ALTER TABLE t1 ADD COLUMN (f4 int(10));
+--let $insert_id = `SELECT CONNECTION_ID()`
+--send INSERT INTO t1 (f1) values("node1b");
+
+# wait for insert to get blocked
+--connection node_1c
+--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.processlist WHERE State='Commit' AND ID=$insert_id
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.metadata_lock_info WHERE TABLE_NAME='t1' AND THREAD_ID=$insert_id
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*)=2 FROM information_schema.processlist WHERE Info like 'INSERT INTO t1 (f1) values("node1%")' AND State = 'Commit'
+--source include/wait_condition.inc
+
+# nothing after BLOCK_DDL is applied
+SELECT COUNT(*)=2 FROM t1;
+SELECT COUNT(*)=3 FROM information_schema.columns WHERE table_name = 't1';
+
+# STAGE END resumes and resyncs the node
+--connection node_1
+BACKUP STAGE END;
+
+# Upon resume, blocked inserts will continue but conflict with the applying alters
+--connection node_1a
+--error ER_LOCK_DEADLOCK
+--reap
+--connection node_1b
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1
+SELECT COUNT(*)=4 FROM t1;
+SELECT COUNT(*)=5 FROM information_schema.columns WHERE table_name = 't1';
+
+--connection node_2
+SELECT COUNT(*)=4 FROM t1;
+SELECT COUNT(*)=5 FROM information_schema.columns WHERE table_name = 't1';
+
+--connection node_1
+DROP TABLE t1;
+call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
+call mtr.add_suppression("greater than drain seqno");
diff --git a/mysql-test/suite/galera/t/galera_bad_wsrep_new_cluster.cnf b/mysql-test/suite/galera/t/galera_bad_wsrep_new_cluster.cnf
new file mode 100644
index 00000000000..62cf1854032
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bad_wsrep_new_cluster.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=1
+
+[mysqld.2]
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.cnf b/mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.cnf
new file mode 100644
index 00000000000..62cf1854032
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=1
+
+[mysqld.2]
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.test b/mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.test
new file mode 100644
index 00000000000..224db902569
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_at_after_statement.test
@@ -0,0 +1,58 @@
+#
+# This test checks that the client gets an error for a BF abort,
+# specifically when it gets detected inside the wsrep_after_statement hook
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connection node_1
+# Mare sure both nodes are in the cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+CREATE TABLE t1 (id INT PRIMARY KEY, val INT);
+INSERT INTO t1 VALUES (1, 1);
+
+--connection node_2
+SET DEBUG_SYNC = 'RESET';
+# Mare sure that DLL has replicated and insert has replicated
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1
+--source include/wait_condition.inc
+
+START TRANSACTION;
+SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked WAIT_FOR continue';
+--send UPDATE t1 SET val=2 WHERE id=1
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+SET DEBUG_SYNC = 'now WAIT_FOR blocked';
+
+--connection node_1
+# cause BF abort on other node
+UPDATE t1 SET val=3 WHERE id=1;
+
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+set session wsrep_sync_wait=0;
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 where id = 1 and val = 3
+--source include/wait_condition.inc
+
+--connection node_2a
+SET DEBUG_SYNC = 'now SIGNAL continue';
+
+--connection node_2
+# check we get BF aborted
+--error ER_LOCK_DEADLOCK
+--reap
+COMMIT;
+SET DEBUG_SYNC = 'RESET';
+
+--connection node_1
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+
+--disconnect node_2a
+--disconnect node_2b
+
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf
new file mode 100644
index 00000000000..612418c17c0
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf
@@ -0,0 +1,15 @@
+!include ../galera_2nodes.cnf
+
+# We set repl.commit_order=1 in order to disable provider commit
+# ordering.
+
+[mysqld.1]
+log-bin
+log-slave-updates
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;repl.commit_order=1'
+
+[mysqld.2]
+
+log-bin
+log-slave-updates
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;repl.commit_order=1' \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test
new file mode 100644
index 00000000000..a828701cd0e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test
@@ -0,0 +1,77 @@
+#
+# This test uses galera_sr_bf_abort.inc to probe various BF abort points
+# for SR transactions with wsrep provider commit ordering disabled.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/galera_have_debug_sync.inc
+
+# Control connection for manipulating sync points on node 1
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+
+# SR bf abort on fragment
+--let $wsrep_trx_fragment_size = 1
+--echo galera_sr_bf_abort_at_commit = 0
+--let $galera_sr_bf_abort_at_commit = 0
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+# SR bf abort on commit fragment
+--let $wsrep_trx_fragment_size = 1
+--echo galera_sr_bf_abort_at_commit = 1
+--let $galera_sr_bf_abort_at_commit = 1
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source suite/galera/t/galera_sr_bf_abort.inc
+
+# Normal bf abort on commit
+--let $wsrep_trx_fragment_size = 0
+--echo galera_sr_bf_abort_at_commit = 1
+--let $galera_sr_bf_abort_at_commit = 1
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_ps.cnf b/mysql-test/suite/galera/t/galera_bf_abort_ps.cnf
new file mode 100644
index 00000000000..34c1a8cc3cf
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_ps.cnf
@@ -0,0 +1,3 @@
+!include ../galera_2nodes.cnf
+[mysqltest]
+ps-protocol \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_ps.test b/mysql-test/suite/galera/t/galera_bf_abort_ps.test
new file mode 100644
index 00000000000..d2dfb92651e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_ps.test
@@ -0,0 +1,34 @@
+#
+# MDEV-24255
+# Test BF abort of a transaction that has ps-protocol enabled
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--connection node_2
+--let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node_2');
+
+--connection node_1
+INSERT INTO t1 VALUES (1,'node_1');
+
+--connection node_2a
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'node_1'
+--source include/wait_condition.inc
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (2, 'node_2');
+
+--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+--disable_query_log
+--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment;
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_ps_bind.cnf b/mysql-test/suite/galera/t/galera_bf_abort_ps_bind.cnf
new file mode 100644
index 00000000000..62cf1854032
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_ps_bind.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=1
+
+[mysqld.2]
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_ps_bind.test b/mysql-test/suite/galera/t/galera_bf_abort_ps_bind.test
new file mode 100644
index 00000000000..dcfcb052d49
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_ps_bind.test
@@ -0,0 +1,61 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/no_protocol.inc
+
+CREATE TABLE t (i int primary key auto_increment, j varchar(20) character set utf8);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_1
+insert into t values (1, 'first');
+
+# prepare a statement for inserting rows into table t
+--PS_prepare INSERT INTO t(j) VALUES (?);
+
+# bind parameter, to insert with column j having value 'node1'
+--PS_bind node1
+
+# insert two rows with the PS
+# this is for showing that two execute commands can follow a bind command
+--PS_execute
+--PS_execute
+select * from t;
+
+# close the prepared statement, and prepare a new PS,
+# this happens to be same as the first PS
+# also bind parameter for the PS
+--PS_close
+--PS_prepare INSERT INTO t(j) VALUES (?);
+--PS_bind node1
+
+# start a transaction and make one update
+# leaving the transaction open
+begin;
+update t set j='node1' where i=1;
+
+# replicate a transaction from node2, which BF aborts the open
+# transaction in node1
+--connection node_2
+update t set j='node2' where i=1;
+
+# wait until the BF has completed, and update from node_2 has committed
+--connection node_1a
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t WHERE j='node2'
+--source include/wait_condition.inc
+
+# continue the open transaction, trying to insert third row, deadlock is now observed
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--PS_execute
+
+# try to insert one more row
+--PS_execute
+commit;
+
+--PS_close
+
+select * from t;
+
+drop table t;
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.cnf b/mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.cnf
new file mode 100644
index 00000000000..83baa995c17
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+thread-handling=pool-of-threads
+
+[mysqltest]
+ps-protocol
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.test b/mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.test
new file mode 100644
index 00000000000..56348a6f527
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_ps_threadpool.test
@@ -0,0 +1,54 @@
+#
+# MDEV-24255
+# Test BF abort of a transaction that has ps-protocol enabled
+# This test stresses the case where wsrep_before_command()
+# finds the transaction in state s_must_abort. This only
+# possible when the server is using the thread pool.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--connection node_2
+--let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node_2');
+
+--connection node_2a
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
+
+--connection node_1
+INSERT INTO t1 VALUES (1,'node_1');
+
+--connection node_2a
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+--connection node_2
+SET DEBUG_SYNC = "wsrep_before_before_command SIGNAL signal.wsrep_apply_cb WAIT_FOR bf_abort";
+
+#
+# The following INSERT is expected to enter
+# wsrep_before_command() and find its transaction
+# in state s_must_abort.
+# Notice that the test appears more complicated
+# than it needs to... however we cannot use
+# --send for this INSERT, otherwise mysqltest
+# will not use ps-protocol
+#
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (2, 'node_2');
+
+--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+--disable_query_log
+--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment;
+--enable_query_log
+
+SET DEBUG_SYNC = 'RESET';
+SET GLOBAL debug_dbug = DEFAULT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_bf_kill.cnf b/mysql-test/suite/galera/t/galera_bf_kill.cnf
new file mode 100644
index 00000000000..e68f891792c
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_kill.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=SERVER
+
+[mysqld.2]
+wsrep-debug=SERVER
diff --git a/mysql-test/suite/galera/t/galera_bf_kill.test b/mysql-test/suite/galera/t/galera_bf_kill.test
index f563554b787..c8564bc9219 100644
--- a/mysql-test/suite/galera/t/galera_bf_kill.test
+++ b/mysql-test/suite/galera/t/galera_bf_kill.test
@@ -1,40 +1,54 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+
#
# Test case 1: Start a transaction on node_2a and kill it
# from other connection on same node
#
+
--connection node_2
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB;
insert into t1 values (NULL,1);
+
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
begin;
update t1 set a = 5;
+
--connection node_2
+
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1
--source include/wait_condition.inc
+
--let $k_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1`
+
--disable_query_log
--eval KILL $k_thread
--enable_query_log
+
select * from t1;
--disconnect node_2a
+
#
# Test case 2: Start a transaction on node_2a and use
# kill query from other connection on same node
#
+
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
begin;
update t1 set a =5;
+
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1
--source include/wait_condition.inc
+
--let $k_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1`
+
--disable_query_log
--eval KILL QUERY $k_thread
--enable_query_log
+
select * from t1;
--disconnect node_2a
#
@@ -45,30 +59,83 @@ select * from t1;
--connection node_2a
begin;
update t1 set a =5, b=2;
+
--connection node_2
ALTER TABLE t1 ADD UNIQUE KEY b1(b);
ALTER TABLE t1 DROP KEY b1;
+
select * from t1;
+
--disconnect node_2a
+
#
# Test case 4: Start a transaction on node_2a and conflicting transaction on node_2b
# and start a DDL on other transaction that will then abort node_2a and node_2b
# transactions
#
+
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
begin;
update t1 set a =5, b=2;
+
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2b
begin;
send update t1 set a =6, b=7;
+
--connection node_2
ALTER TABLE t1 ADD UNIQUE KEY b2(b);
ALTER TABLE t1 DROP KEY b2;
+
select * from t1;
+
--disconnect node_2a
--disconnect node_2b
+#
+# Test case 5: Start a transaction on node_2a with wsrep disabled
+# and start a DDL on other transaction that will then abort node_2a
+# transactions
+#
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_on=OFF;
+begin;
+update t1 set a =5, b=2;
+
+--connection node_2
+ALTER TABLE t1 ADD UNIQUE KEY b3(b);
+
+select * from t1;
+
+--disconnect node_2a
+
+#
+# Test case 6: Start a transaction on node_2a with wsrep disabled
+# and kill it from other connection on same node
+#
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_on=OFF;
+begin;
+update t1 set a =5, b=2;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1
+--source include/wait_condition.inc
+
+--let $k_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1`
+
+--disable_query_log
+--eval KILL $k_thread
+--enable_query_log
+
+select * from t1;
+
+--disconnect node_2a
+
--connection node_1
drop table t1;
diff --git a/mysql-test/suite/galera/t/galera_bf_lock_wait.cnf b/mysql-test/suite/galera/t/galera_bf_lock_wait.cnf
new file mode 100644
index 00000000000..e68f891792c
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_lock_wait.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=SERVER
+
+[mysqld.2]
+wsrep-debug=SERVER
diff --git a/mysql-test/suite/galera/t/galera_bf_lock_wait.test b/mysql-test/suite/galera/t/galera_bf_lock_wait.test
index c8a31506ffa..0562b4361ff 100644
--- a/mysql-test/suite/galera/t/galera_bf_lock_wait.test
+++ b/mysql-test/suite/galera/t/galera_bf_lock_wait.test
@@ -1,7 +1,13 @@
--source include/galera_cluster.inc
+--source include/have_innodb.inc
--source include/big_test.inc
+--connection node_2
+call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
+
--connection node_1
+call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
+
CREATE TABLE t1 ENGINE=InnoDB select 1 as a, 1 as b union select 2, 2;
ALTER TABLE t1 add primary key(a);
diff --git a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
index 1c9ee9206fe..994f7695fc6 100644
--- a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
+++ b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
@@ -23,9 +23,17 @@ SET GLOBAL auto_increment_offset=2;
--connection node_2
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
+--disable_query_log
+call mtr.add_suppression("Unsafe statement written to the binary log");
+--enable_query_log
+
--connection node_1
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
+--disable_query_log
+call mtr.add_suppression("Unsafe statement written to the binary log");
+--enable_query_log
+
CREATE TABLE t1 (
i int(11) NOT NULL primary key AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text'
diff --git a/mysql-test/suite/galera/t/galera_change_user.test b/mysql-test/suite/galera/t/galera_change_user.test
new file mode 100644
index 00000000000..89efef1dbb0
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_change_user.test
@@ -0,0 +1,29 @@
+#
+# Check that change user works with Galera
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE USER user1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+
+# Change user in idle connection
+--connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1
+change_user 'user1';
+reset_connection;
+--disconnect node_1a
+
+# Change user with transaction open
+--connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+change_user 'user1';
+reset_connection;
+--disconnect node_1a
+
+--connection node_1
+DROP TABLE t1;
+DROP USER user1;
+
diff --git a/mysql-test/suite/galera/t/galera_commit_empty.test b/mysql-test/suite/galera/t/galera_commit_empty.test
new file mode 100644
index 00000000000..4e1a1e4eb2c
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_commit_empty.test
@@ -0,0 +1,35 @@
+# Test empty transactions.
+#
+# Check that the empty transaction gets terminated by starting and new
+# transaction after it. If the empty transaction is not terminated
+# appropriately, the following START TRANSACTION will fail.
+#
+# Also check that empty transactions don't generate any write sets.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+START TRANSACTION;
+COMMIT;
+
+START TRANSACTION;
+COMMIT;
+
+START TRANSACTION READ ONLY;
+COMMIT;
+
+START TRANSACTION;
+COMMIT;
+
+START TRANSACTION;
+START TRANSACTION;
+COMMIT;
+
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--disable_query_log
+--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before AS wsrep_last_committed_diff
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_concurrent_ctas.test b/mysql-test/suite/galera/t/galera_concurrent_ctas.test
index 6c4e8be68a7..61038664b21 100644
--- a/mysql-test/suite/galera/t/galera_concurrent_ctas.test
+++ b/mysql-test/suite/galera/t/galera_concurrent_ctas.test
@@ -1,32 +1,32 @@
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/big_test.inc
--write_file $MYSQLTEST_VARDIR/tmp/galera_concurrent.sql
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.1);
DROP table t1;
-CREATE table t1 as SELECT SLEEP(0);
-CREATE table t2 as SELECT SLEEP(0);
-CREATE table t3 as SELECT SLEEP(0);
-CREATE table t4 as SELECT SLEEP(0);
-CREATE table t5 as SELECT SLEEP(0);
-CREATE table t6 as SELECT SLEEP(0);
-CREATE table t7 as SELECT SLEEP(0);
-CREATE table t8 as SELECT SLEEP(0);
-CREATE table t9 as SELECT SLEEP(0);
+CREATE table t1 as SELECT SLEEP(0.2);
+CREATE table t2 as SELECT SLEEP(0.2);
+CREATE table t3 as SELECT SLEEP(0.2);
+CREATE table t4 as SELECT SLEEP(0.2);
+CREATE table t5 as SELECT SLEEP(0.2);
+CREATE table t6 as SELECT SLEEP(0.2);
+CREATE table t7 as SELECT SLEEP(0.2);
+CREATE table t8 as SELECT SLEEP(0.2);
+CREATE table t9 as SELECT SLEEP(0.2);
DROP table t1;
DROP table t2;
DROP table t3;
diff --git a/mysql-test/suite/galera/t/galera_create_table_as_select.test b/mysql-test/suite/galera/t/galera_create_table_as_select.test
new file mode 100644
index 00000000000..a6c1f657280
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_create_table_as_select.test
@@ -0,0 +1,145 @@
+#
+# CREATE TABLE AS SELECT tests
+#
+
+--source include/galera_cluster.inc
+
+--connection node_1
+SET SESSION default_storage_engine=InnoDB;
+
+# Left table already exists
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+--error ER_TABLE_EXISTS_ERROR
+CREATE TABLE t1 AS SELECT * FROM t2;
+DROP TABLE t1,t2;
+
+# Right table does not exist
+--error ER_NO_SUCH_TABLE
+CREATE TABLE t1 AS SELECT * FROM t2;
+
+# No right table at all
+CREATE TABLE t1 AS SELECT 1 FROM DUAL;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+
+# Empty right table
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 AS SELECT * FROM t2;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+DROP TABLE t1,t2;
+
+# Right table is MyISAM
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT * FROM t2;
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1,t2;
+
+# Right side is a subquery
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT MAX(f1) AS f1 FROM t2;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT f1 = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1,t2;
+
+# Inside a stored procedure
+
+--connection node_1
+DELIMITER |;
+CREATE PROCEDURE sp1 ()
+BEGIN
+ CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+ INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+ CREATE TABLE t1 AS SELECT * FROM t2;
+END|
+DELIMITER ;|
+CALL sp1();
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1, t2;
+DROP PROCEDURE sp1;
+
+# Inside a prepared statement
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+
+PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT * FROM t2';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
+
+#
+# Multi-master conflict
+#
+
+--connection node_1
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+LOCK TABLE t2 WRITE;
+
+--connection node_1
+--send CREATE TABLE t1 AS SELECT * FROM t2;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t2;
+CREATE TABLE t1 AS SELECT * FROM t2;
+
+--connection node_1a
+UNLOCK TABLES;
+
+--connection node_1
+--error ER_TABLE_EXISTS_ERROR,ER_LOCK_DEADLOCK
+--reap
+
+DROP TABLE t1, t2;
+
+#
+# Temporary table
+#
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM t2;
+
+--connection node_2
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t1;
+
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query");
+
+--connection node_1
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/t/galera_ctas.test b/mysql-test/suite/galera/t/galera_ctas.test
new file mode 100644
index 00000000000..8b9ad9c4a20
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ctas.test
@@ -0,0 +1,39 @@
+--source include/galera_cluster.inc
+
+--connection node_1
+create table t1_Aria(a int, count int, b int, key(b)) engine=Aria;
+INSERT INTO t1_Aria values (1,1,1);
+create table t1_MyISAM(a int, count int, b int, key(b)) engine=MyISAM;
+INSERT INTO t1_MyISAM values (1,1,1);
+create table t1_InnoDB(a int, count int, b int, key(b)) engine=InnoDB;
+INSERT INTO t1_InnoDB values (1,1,1);
+
+SET SESSION default_storage_engine=MyISAM;
+CREATE TABLE t2 AS SELECT * FROM t1_Aria;
+CREATE TABLE t3 AS SELECT * FROM t1_MyISAM;
+CREATE TABLE t4 AS SELECT * FROM t1_InnoDB;
+SHOW CREATE TABLE t2;
+SHOW CREATE TABLE t3;
+SHOW CREATE TABLE t4;
+DROP TABLE t2, t3,t4;
+
+SET SESSION default_storage_engine=Aria;
+CREATE TABLE t2 AS SELECT * FROM t1_Aria;
+CREATE TABLE t3 AS SELECT * FROM t1_MyISAM;
+CREATE TABLE t4 AS SELECT * FROM t1_InnoDB;
+SHOW CREATE TABLE t2;
+SHOW CREATE TABLE t3;
+SHOW CREATE TABLE t4;
+DROP TABLE t2, t3,t4;
+
+SET SESSION default_storage_engine=InnoDB;
+CREATE TABLE t2 AS SELECT * FROM t1_Aria;
+CREATE TABLE t3 AS SELECT * FROM t1_MyISAM;
+CREATE TABLE t4 AS SELECT * FROM t1_InnoDB;
+SHOW CREATE TABLE t2;
+SHOW CREATE TABLE t3;
+SHOW CREATE TABLE t4;
+
+DROP TABLE t2, t3,t4;
+DROP TABLE t1_MyISAM, t1_Aria,t1_InnoDB;
+
diff --git a/mysql-test/suite/galera/t/galera_ddl_fk_conflict.inc b/mysql-test/suite/galera/t/galera_ddl_fk_conflict.inc
new file mode 100644
index 00000000000..06b7bbe41c4
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ddl_fk_conflict.inc
@@ -0,0 +1,192 @@
+#
+# Test for MDL BF-BF lock conflict
+# There are some DDL statements, which take extensive MDL lock for
+# a table referenced by foreign key constraint from the actual affetec table.
+# This extensive MDL lock may cause MDL BF-BF confclict situations, if the
+# FK parent table is not listed as certification key in the replication write set.
+# i.e. if replication allows such DDL to apply in parallel with regular DML operating
+# on the FK parent table.
+#
+# This test has two scenarios, where DML modifies FK parent table in node 1,
+# and offending DDL for FK child table is sent from node 2.
+#
+# param: $table_admin_command
+# DDL table command to test, script will build full SQL statement:
+# $table_admin_command TABLE c;
+#
+# param: $table_admin_command_end
+# Optional additional SQL syntax to end the SQL statement, if any
+# $table_admin_command TABLE c $table_admin_command_end;
+#
+# scenario 1, can be used to test if a DDL statement causes such MDL locking vulnerability.
+# call this test script with some table DDL command in $table_admin_command
+# if scenario 1 passes (especially COMMIT does fail for ER_LOCK_DEADLOCK),
+# then this particular DDL is vulnerable. scenraio 2 should fail for this DDL
+# unless code has not been fixed to append parent table certification keys for it.
+#
+
+--echo ######################################################################
+--echo # Test for $table_admin_command $table_admin_command_end
+--echo ######################################################################
+
+
+--echo ######################################################################
+--echo #
+--echo # Scenario #1: DML working on FK parent table BF aborted by DDL
+--echo # over child table
+--echo #
+--echo ######################################################################
+
+--connection node_1
+SET SESSION wsrep_sync_wait=0;
+
+CREATE TABLE p1 (pk INTEGER PRIMARY KEY, f2 CHAR(30));
+INSERT INTO p1 VALUES (1, 'INITIAL VALUE');
+
+
+CREATE TABLE p2 (pk INTEGER PRIMARY KEY, f2 CHAR(30));
+INSERT INTO p2 VALUES (1, 'INITIAL VALUE');
+INSERT INTO p2 VALUES (2, 'INITIAL VALUE');
+
+CREATE TABLE c1 (pk INTEGER PRIMARY KEY, fk INTEGER, FOREIGN KEY (fk) REFERENCES p1(pk));
+INSERT INTO c1 VALUES (1,1);
+
+CREATE TABLE c2 (pk INTEGER PRIMARY KEY, fk1 INTEGER, fk2 INTEGER, FOREIGN KEY (fk1) REFERENCES p1(pk), FOREIGN KEY (fk2) REFERENCES p2(pk));
+INSERT INTO c2 VALUES (1,1,1), (2,1,2);
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+
+--connection node_2
+SET SESSION wsrep_sync_wait=0;
+# wait for tables to be created in node 2 and all rows inserted as well
+--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/c%'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 2 FROM c2
+--source include/wait_condition.inc
+
+# replicate the DDL to be tested
+--eval $table_admin_command TABLE c1 $table_admin_command_end
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+
+--echo ######################################################################
+--echo #
+--echo # Scenario #2: DML working on FK parent table tries to replicate, but
+--echo # fails in certification for earlier DDL on child table
+--echo #
+--echo ######################################################################
+
+--connection node_1
+BEGIN;
+
+# Block the applier on node #1 and issue DDL on node 2
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+--eval $table_admin_command TABLE c1 $table_admin_command_end
+
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE+1 FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+--connection node_1
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+--send COMMIT
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+SELECT 'I deadlocked';
+
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+
+
+--echo ######################################################################
+--echo #
+--echo # Scenario #3: 2 DMLs working on two FK parent tables try to replicate,
+--echo # but fails in certification for earlier DDL on child table
+--echo # which is child to both FK parents
+--echo #
+--echo ######################################################################
+
+--connection node_1
+BEGIN;
+
+--connection node_1b
+BEGIN;
+
+--connection node_1a
+# Block the applier on node #1 and issue DDL on node 2
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+--eval $table_admin_command TABLE c2 $table_admin_command_end
+
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE+2 FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+--connection node_1
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+--send COMMIT
+
+--connection node_1b
+UPDATE p2 SET f2 = 'TO DEADLOCK' WHERE pk = 2;
+--send COMMIT
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+SELECT 'I deadlocked';
+
+--connection node_1b
+--error ER_LOCK_DEADLOCK
+--reap
+SELECT 'I deadlocked';
+
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+SELECT COUNT(*) AS EXPECT_2 FROM p2 WHERE f2 = 'INITIAL VALUE';
+
+DROP TABLE c1, c2;
+DROP TABLE p1, p2;
diff --git a/mysql-test/suite/galera/t/galera_ddl_fk_conflict.test b/mysql-test/suite/galera/t/galera_ddl_fk_conflict.test
new file mode 100644
index 00000000000..4ec866a9f74
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ddl_fk_conflict.test
@@ -0,0 +1,29 @@
+#
+# MDL BF-BF lock conflict
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+# sync point controlling session
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait=0;
+
+# secondary conflicting DML victim session
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
+SET SESSION wsrep_sync_wait=0;
+
+--let $table_admin_command = ALTER
+--let $table_admin_command_end = ENGINE=INNODB
+--source galera_ddl_fk_conflict.inc
+
+--let $table_admin_command = TRUNCATE
+--let $table_admin_command_end =
+--source galera_ddl_fk_conflict.inc
+
+# CHECK and ANALYZE are not affected
+
diff --git a/mysql-test/suite/galera/t/galera_ddl_fk_conflict_with_tmp.inc b/mysql-test/suite/galera/t/galera_ddl_fk_conflict_with_tmp.inc
new file mode 100644
index 00000000000..acf3c54180b
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ddl_fk_conflict_with_tmp.inc
@@ -0,0 +1,69 @@
+--echo ######################################################################
+--echo # Test for $table_admin_command $table_admin_command_end
+--echo ######################################################################
+
+
+--connection node_1
+SET SESSION wsrep_sync_wait=0;
+
+CREATE TABLE p1 (pk INTEGER PRIMARY KEY, f2 CHAR(30));
+INSERT INTO p1 VALUES (1, 'INITIAL VALUE');
+
+
+CREATE TABLE c1 (pk INTEGER PRIMARY KEY, fk INTEGER, FOREIGN KEY (fk) REFERENCES p1(pk));
+INSERT INTO c1 VALUES (1,1);
+
+--echo ######################################################################
+--echo #
+--echo # Scenario #4: DML working on FK parent table tries to replicate, but
+--echo # fails in certification for earlier DDL on child table
+--echo # and another temporary table. TMP table should be skipped
+--echo # but FK child table should be replicated with proper keys
+--echo #
+--echo ######################################################################
+
+--connection node_1
+BEGIN;
+
+# Block the applier on node #1 and issue DDL on node 2
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+# wait for tables to be created in node 2 and all rows inserted as well
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/c1'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1 FROM c1
+--source include/wait_condition.inc
+CREATE TEMPORARY TABLE tmp (i int);
+--eval $table_admin_command TABLE c1, tmp $table_admin_command_end
+DROP TABLE tmp;
+
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE+1 FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+--connection node_1
+UPDATE p1 SET f2 = 'TO DEADLOCK' WHERE pk = 1;
+--send COMMIT
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+SELECT 'I deadlocked';
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_1 FROM p1 WHERE f2 = 'INITIAL VALUE';
+
+DROP TABLE c1;
+DROP TABLE p1;
diff --git a/mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.inc b/mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.inc
new file mode 100644
index 00000000000..9e2dd391678
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.inc
@@ -0,0 +1,34 @@
+# This test attempts to show that OPTIMIZE on a child table does NOT
+# acquire MDL locks on the parent table. #
+# param: $table_admin_command
+# DDL table command to test, script will build full SQL statement:
+# $table_admin_command TABLE c;
+#
+# param: $FK_constraint
+# Foreign key constraint to use when creating the child table.
+#
+
+CREATE TABLE parent (pk INTEGER PRIMARY KEY);
+--eval CREATE TABLE child (pk INTEGER PRIMARY KEY, parent_id INTEGER, FOREIGN KEY(parent_id) REFERENCES parent(pk) $fk_constraint)
+
+INSERT INTO parent VALUES (1), (2), (3), (4);
+INSERT INTO child VALUES (1,1), (2,2), (3,3), (4,4);
+
+--connection node_1
+# Start a transaction that uses the parent table,
+# so that we acquire MDL lock on parent.
+START TRANSACTION;
+SELECT * FROM parent FOR UPDATE;
+
+# In a different connection, execute the table
+# admin command (OPTIMIZE / REPAIR ...) on the child table.
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--eval $table_admin_command TABLE child;
+
+# Expect no conflict.
+--connection node_1
+COMMIT;
+
+DROP TABLE child, parent;
+
+--disconnect node_1a
diff --git a/mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.test b/mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.test
new file mode 100644
index 00000000000..6307b629e2b
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ddl_fk_no_conflict.test
@@ -0,0 +1,57 @@
+#
+# This test attempts to show that table admin commands
+# (OPTIMIZE / REPAIR / ANALYZE ...) on child table,
+# do NOT cause conflicts on parent table operations.
+# Contrary to what is said in MDEV-21577, which claimed
+# that OPTIMIZE and REPAIR do take MDL locks on parent
+# table.
+#
+# Should this test start failing due to a conflict
+# (i.e. ER_LOCK_DEADLOCK), then it might be that we
+# are missing additional keys for certification
+# on the corresponding table admin command.
+
+--source include/galera_cluster.inc
+
+--let $table_admin_command = OPTIMIZE
+--let $fk_constraint =
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+
+
+--let $table_admin_command = REPAIR
+--let $fk_constraint =
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+
+
+--let $table_admin_command = CHECK
+--let $fk_constraint =
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+
+
+--let $table_admin_command = ANALYZE
+--let $fk_constraint =
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
+--let $fk_constraint = ON UPDATE CASCADE ON DELETE CASCADE
+--source galera_ddl_fk_no_conflict.inc
diff --git a/mysql-test/suite/galera/t/galera_defaults.cnf b/mysql-test/suite/galera/t/galera_defaults.cnf
new file mode 100644
index 00000000000..fb143baf30f
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_defaults.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.segment=1'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.segment=1'
diff --git a/mysql-test/suite/galera/t/galera_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test
index a9e10de0176..28e6f0cce38 100644
--- a/mysql-test/suite/galera/t/galera_defaults.test
+++ b/mysql-test/suite/galera/t/galera_defaults.test
@@ -1,25 +1,24 @@
#
# The purpose of this test is to preserve the current state of the following:
# * SHOW VARIABLES LIKE 'wsrep%'
-# * wsrep_provider_options
# * The names of the Galera status variables
#
+# Note that wsrep_provider_options contains paths and other non-deterministic parts
+#
# This way, if there is any change, inadvertent or not, the test will fail and the
# developer and QA will be alerted.
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/force_restart.inc
# Make sure that the test is operating on the right version of galera library.
---disable_query_log
---let $galera_version=25.3.31
+--let $galera_version=26.4.6
source ../wsrep/include/check_galera_version.inc;
---enable_query_log
# Global Variables
-SELECT COUNT(*) = 43 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+SELECT COUNT(*) `expect 49` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/galera/t/galera_fk_cascade_delete.test b/mysql-test/suite/galera/t/galera_fk_cascade_delete.test
index 49b54f0f7f0..901fc1fc6d1 100644
--- a/mysql-test/suite/galera/t/galera_fk_cascade_delete.test
+++ b/mysql-test/suite/galera/t/galera_fk_cascade_delete.test
@@ -68,3 +68,189 @@ SELECT * FROM child;
DROP TABLE child;
DROP TABLE parent;
DROP TABLE grandparent;
+
+--echo
+--echo Scenario 2, testing PA applying with FK cascade delete
+--echo
+
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ ON DELETE CASCADE,
+ CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ ON DELETE CASCADE);
+
+--let $count = 100
+--disable_query_log
+while ($count)
+{
+ --eval INSERT INTO p1 VALUES ($count, 0);
+ --eval INSERT INTO p2 VALUES ($count, 0);
+ --eval INSERT INTO c VALUES ($count, $count, $count, 0);
+ --dec $count
+}
+
+--connection node_2
+set global wsrep_slave_threads=2;
+
+--connection node_1
+--let $count = 100
+while ($count)
+{
+ --eval DELETE FROM p2 WHERE f1=$count;
+ --eval DELETE FROM p1 WHERE f1=$count;
+
+--dec $count
+}
+--enable_query_log
+
+--connection node_2
+set global wsrep_slave_threads=DEFAULT;
+
+
+SELECT * FROM p1;
+SELECT * FROM p2;
+SELECT * FROM c;
+
+--connection node_1
+DROP TABLE c;
+DROP TABLE p1,p2;
+
+--echo
+--echo Scenario 4, testing PA applying with FK cascade delete on
+--echo more than one level
+--echo
+CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1)
+ ON DELETE CASCADE
+ ) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1)
+ ON DELETE CASCADE
+ ) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ ON DELETE CASCADE,
+ CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ ON DELETE CASCADE) ENGINE=INNODB;
+
+--let $count = 100
+--disable_query_log
+while ($count)
+{
+ --eval INSERT INTO gp1 VALUES ($count, 0);
+ --eval INSERT INTO gp2 VALUES ($count, 0);
+ --eval INSERT INTO p1 VALUES ($count, $count, $count, 0);
+ --eval INSERT INTO p2 VALUES ($count, $count, $count, 0);
+ --eval INSERT INTO c VALUES ($count, $count, $count, 0);
+ --dec $count
+}
+
+--connection node_2
+set global wsrep_slave_threads=2;
+
+--connection node_1
+--let $count = 100
+while ($count)
+{
+ --eval DELETE FROM gp1 WHERE f1=$count;
+ --eval DELETE FROM gp2 WHERE f1=$count;
+
+--dec $count
+}
+--enable_query_log
+
+--connection node_2
+set global wsrep_slave_threads=DEFAULT;
+
+SELECT * FROM gp1;
+SELECT * FROM gp2;
+SELECT * FROM p1;
+SELECT * FROM p2;
+SELECT * FROM c;
+
+--connection node_1
+DROP TABLE c;
+DROP TABLE p1,p2;
+DROP TABLE gp1,gp2;
+
+--echo
+--echo Scenario 3, testing PA applying with FK cascade delete on
+--echo more than one level in a diamond topology
+--echo
+CREATE TABLE ggp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT pfk_6 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1)
+ ON DELETE CASCADE
+ ) ENGINE=INNODB;
+CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT pfk_5 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1)
+ ON DELETE CASCADE
+ ) ENGINE=INNODB;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1)
+ ON DELETE CASCADE
+ ) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1)
+ ON DELETE CASCADE
+ ) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ ON DELETE CASCADE,
+ CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ ON DELETE CASCADE) ENGINE=INNODB;
+
+--let $count = 100
+--disable_query_log
+while ($count)
+{
+ --eval INSERT INTO ggp1 VALUES ($count, 0);
+ --eval INSERT INTO gp1 VALUES ($count, $count, $count, 0);
+ --eval INSERT INTO gp2 VALUES ($count, $count, $count, 0);
+ --eval INSERT INTO p1 VALUES ($count, $count, $count, 0);
+ --eval INSERT INTO p2 VALUES ($count, $count, $count, 0);
+ --eval INSERT INTO c VALUES ($count, $count, $count, 0);
+ --dec $count
+}
+
+--connection node_2
+set global wsrep_slave_threads=2;
+
+--connection node_1
+--let $count = 100
+while ($count)
+{
+ --eval DELETE FROM ggp1 WHERE f1=$count;
+
+--dec $count
+}
+--enable_query_log
+
+--connection node_2
+set global wsrep_slave_threads=DEFAULT;
+
+SELECT * FROM ggp1;
+SELECT * FROM gp2;
+SELECT * FROM gp1;
+SELECT * FROM p1;
+SELECT * FROM p2;
+SELECT * FROM c;
+
+--connection node_1
+DROP TABLE c;
+DROP TABLE p1,p2;
+DROP TABLE gp1,gp2;
+DROP TABLE ggp1;
diff --git a/mysql-test/suite/galera/t/galera_fk_truncate.test b/mysql-test/suite/galera/t/galera_fk_truncate.test
new file mode 100644
index 00000000000..9d54a720432
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_fk_truncate.test
@@ -0,0 +1,39 @@
+--source include/galera_cluster.inc
+
+CREATE TABLE author (
+ id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ name VARCHAR(100) NOT NULL
+) ENGINE = InnoDB;
+
+CREATE TABLE book (
+ id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ title VARCHAR(200) NOT NULL,
+ author_id SMALLINT UNSIGNED NOT NULL,
+ CONSTRAINT `fk_book_author`
+ FOREIGN KEY (author_id) REFERENCES author (id)
+ ON DELETE CASCADE
+ ON UPDATE RESTRICT
+) ENGINE = InnoDB;
+
+INSERT INTO author (name) VALUES ('Abdul Alhazred');
+INSERT INTO book (title, author_id) VALUES ('Necronomicon', LAST_INSERT_ID());
+
+TRUNCATE TABLE book;
+SELECT * FROM author;
+SELECT * FROM book;
+
+--connection node_2
+SELECT * FROM author;
+SELECT * FROM book;
+INSERT INTO author (name) VALUES ('Abdul Alhazred');
+INSERT INTO book (title, author_id) VALUES ('Necronomicon', LAST_INSERT_ID());
+TRUNCATE TABLE book;
+SELECT * FROM author;
+SELECT * FROM book;
+
+--connection node_1
+TRUNCATE TABLE book;
+SELECT * FROM author;
+SELECT * FROM book;
+
+DROP TABLE book, author;
diff --git a/mysql-test/suite/galera/t/galera_flush_local.cnf b/mysql-test/suite/galera/t/galera_flush_local.cnf
deleted file mode 100644
index c92cb58f484..00000000000
--- a/mysql-test/suite/galera/t/galera_flush_local.cnf
+++ /dev/null
@@ -1,12 +0,0 @@
-!include ../galera_2nodes.cnf
-
-[mysqld.1]
-query_cache_type=1
-query_cache_size=1000000
-wsrep_replicate_myisam=ON
-
-[mysqld.2]
-query_cache_type=1
-query_cache_size=1000000
-wsrep_replicate_myisam=ON
-
diff --git a/mysql-test/suite/galera/t/galera_forced_binlog_format.test b/mysql-test/suite/galera/t/galera_forced_binlog_format.test
index 5da70abd255..786837239ed 100644
--- a/mysql-test/suite/galera/t/galera_forced_binlog_format.test
+++ b/mysql-test/suite/galera/t/galera_forced_binlog_format.test
@@ -7,9 +7,10 @@
--source include/galera_cluster.inc
--connection node_1
-SET SESSION wsrep_on=OFF;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
-SET SESSION wsrep_on=ON;
+SET GLOBAL wsrep_on=ON;
+FLUSH BINARY LOGS;
--disable_warnings
SET SESSION binlog_format = 'STATEMENT';
@@ -46,6 +47,6 @@ REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
DROP USER dummy@localhost;
DROP DATABASE testdb_9401;
---source include/galera_end.inc
+#--source include/galera_end.inc
--echo # End of tests
diff --git a/mysql-test/suite/galera/t/galera_ftwrl_drain.test b/mysql-test/suite/galera/t/galera_ftwrl_drain.test
index 9ed93643b3f..33c04fb46d5 100644
--- a/mysql-test/suite/galera/t/galera_ftwrl_drain.test
+++ b/mysql-test/suite/galera/t/galera_ftwrl_drain.test
@@ -12,7 +12,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--connection node_1
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
@@ -56,7 +56,7 @@ SET SESSION innodb_lock_wait_timeout=1;
SET SESSION wait_timeout=1;
--error ER_LOCK_WAIT_TIMEOUT
-INSERT INTO t2 VALUES (2);
+INSERT INTO t1 VALUES (2);
--connection node_2a
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test b/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
index 0d8994f7d7b..6b3e56d8a0f 100644
--- a/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
+++ b/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
@@ -13,6 +13,14 @@ SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
--connection node_1
+
+#
+# Wait until the configuration change is over in order to avoid
+# replication error due to configuration change.
+#
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
index e0626bd8946..d73286dcba2 100644
--- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
+++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
@@ -3,13 +3,16 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/big_test.inc
+--source include/force_restart.inc
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,B INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1);
--connection node_2
-SET SESSION wsrep_sync_wait=15;
+--let $wait_condition = SELECT COUNT(*)=1 FROM t1;
+--source include/wait_condition.inc
+
SELECT COUNT(*) FROM t1;
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
@@ -53,5 +56,6 @@ SELECT COUNT(*) FROM t1;
--disable_query_log
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
--enable_query_log
+--source include/wait_until_connected_again.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_gcs_fragment.test b/mysql-test/suite/galera/t/galera_gcs_fragment.test
index 80d3a5cb659..d2593fec8c8 100644
--- a/mysql-test/suite/galera/t/galera_gcs_fragment.test
+++ b/mysql-test/suite/galera/t/galera_gcs_fragment.test
@@ -1,7 +1,7 @@
# Test fragmentation over configuration changes
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
@@ -54,7 +54,7 @@ INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# Deadlock error should be returned since write set send was
# interrupted by gcs
--connection node_1
---error ER_LOCK_DEADLOCK
+--error ER_ERROR_DURING_COMMIT
--reap
# Do additional insert to verify that node_1 remain operational
diff --git a/mysql-test/suite/galera/t/galera_gtid-master.opt b/mysql-test/suite/galera/t/galera_gtid-master.opt
new file mode 100644
index 00000000000..30317469ae7
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_gtid-master.opt
@@ -0,0 +1 @@
+--log-bin --log-slave-updates --loose-new-servers-for-galera_gtid-test
diff --git a/mysql-test/suite/galera/t/galera_gtid_slave.test b/mysql-test/suite/galera/t/galera_gtid_slave.test
index 19bfd8e17db..df55ea03cb0 100644
--- a/mysql-test/suite/galera/t/galera_gtid_slave.test
+++ b/mysql-test/suite/galera/t/galera_gtid_slave.test
@@ -8,18 +8,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -49,31 +50,43 @@ INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
SELECT @@global.gtid_binlog_state;
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 3 FROM t1;
--source include/wait_condition.inc
INSERT INTO t1 VALUES(4);
SELECT @@global.gtid_binlog_state;
---connection node_1
+--connection node_3
DROP TABLE t1,t2;
+#
+# Unfortunately without the sleep below the following statement fails with "query returned no rows", which
+# is difficult to understand given that it is an aggregate query. A "query execution was interrupted"
+# warning is also reported by MTR, which is also weird.
+#
+
+--sleep 1
+
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
---connection node_3
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--connection node_2
STOP SLAVE;
RESET SLAVE ALL;
+SET GLOBAL wsrep_on=OFF;
reset master;
+SET GLOBAL wsrep_on=ON;
---connection node_3
+--connection node_1
+SET GLOBAL wsrep_on=OFF;
reset master;
+SET GLOBAL wsrep_on=ON;
---connection node_1
+--connection node_3
reset master;
diff --git a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
index 3ed7ec1d09e..d03445d537a 100644
--- a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
+++ b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
@@ -8,21 +8,21 @@
--source include/big_test.inc
--source include/have_innodb.inc
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--echo #Connection 2
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1,master_use_gtid=slave_pos;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3,master_use_gtid=slave_pos;
--enable_query_log
START SLAVE;
--sleep 1
-
---echo #Connection 1
---connection node_1
+--echo #Connection 3
+--connection node_3
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 int unique) ENGINE=InnoDB;
INSERT INTO t2 VALUES(1,11);
INSERT INTO t2 VALUES(2,22);
@@ -30,7 +30,6 @@ INSERT INTO t2 VALUES(3,33);
SELECT @@global.gtid_binlog_state;
--source include/save_master_gtid.inc
-
--echo #Connection 2
--connection node_2
--source include/sync_with_master_gtid.inc
@@ -40,9 +39,8 @@ INSERT INTO t2 VALUES(4,44);
INSERT INTO t2 VALUES(5,55);
INSERT INTO t2 VALUES(6,66);
SELECT @@global.gtid_binlog_state;
-
---echo #Connection 3
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't2';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 6 FROM t2;
@@ -53,8 +51,8 @@ INSERT INTO t2 VALUES(8,88);
SELECT @@global.gtid_binlog_state;
#Perform SST
---echo #Connection 1
---connection node_1
+--echo #Connection 3
+--connection node_3
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -62,7 +60,6 @@ INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
--source include/save_master_gtid.inc
-
--echo #Connection 2
--connection node_2
--source include/sync_with_master_gtid.inc
@@ -71,22 +68,21 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
---let $node_1= node_2
---let $node_2= node_3
+--let $node_1= node_1
+--let $node_2= node_2
--source include/auto_increment_offset_save.inc
---echo Shutting down server ...
---source include/shutdown_mysqld.inc
-
-
--echo #Connection 2
--connection node_2
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
SET AUTOCOMMIT=OFF;
@@ -94,51 +90,46 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
COMMIT;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 2
+--connection node_2
--echo Starting server ...
--source include/start_mysqld.inc
+
--source include/wait_until_ready.inc
--source include/auto_increment_offset_restore.inc
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node3_committed_after');
-INSERT INTO t1 VALUES ('node3_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
-
---echo #Connection 2
---connection node_2
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
--source include/wait_condition.inc
Select * from t1 order by f1;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 2
+--connection node_2
Select * from t1 order by f1;
#SST Done
--sleep 1
+--echo #Connection 1
+--connection node_1
+SELECT @@global.gtid_binlog_state;
--echo #Connection 2
--connection node_2
SELECT @@global.gtid_binlog_state;
-
--echo #Connection 3
--connection node_3
-SELECT @@global.gtid_binlog_state;
-
---echo #Connection 1
---connection node_1
SET AUTOCOMMIT=ON;
#drop table t1;
#CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-
--echo #Connection 2
--connection node_2
SET AUTOCOMMIT=ON;
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
SET AUTOCOMMIT=ON;
#
@@ -148,10 +139,9 @@ SET AUTOCOMMIT=ON;
STOP slave;
--sleep 1
INSERT INTO t1 VALUES ('node2_slave_stoped');
-
---echo #Connection 1
---connection node_1
-INSERT INTO t1 VALUES ('node1_normal_entry');
+--echo #Connection 3
+--connection node_3
+INSERT INTO t1 VALUES ('node3_normal_entry');
--source include/save_master_gtid.inc
#start slave
@@ -163,16 +153,14 @@ start slave;
INSERT INTO t1 VALUES ('node2_slave_started');
SELECT count(*) from t1;
SELECT @@global.gtid_binlog_state;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 12 FROM t1;
--source include/wait_condition.inc
SELECT count(*) from t1;
SELECT @@global.gtid_binlog_state;
-
---echo #Connection 1
---connection node_1
+--echo #Connection 3
+--connection node_3
DROP TABLE t2,t1;
# Unfortunately without the sleep below the following statement fails with "query returned no rows", which
@@ -181,30 +169,31 @@ DROP TABLE t2,t1;
#
--sleep 3
-
--echo #Connection 2
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
--source include/wait_condition.inc
-
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
-
--echo #Connection 2
--connection node_2
STOP SLAVE;
RESET SLAVE ALL;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
--disable_warnings
set global gtid_slave_pos="";
--enable_warnings
-reset master;
-
---echo #Connection 3
---connection node_3
-reset master;
--echo #Connection 1
--connection node_1
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+--echo #Connection 3
+--connection node_3
reset master;
diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf
index 3dc62546591..f03527dc808 100644
--- a/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf
@@ -9,3 +9,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+
+[sst]
+transferfmt=@ENV.MTR_GALERA_TFMT
+streamfmt=mbstream
diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf
index 7979b23e085..e4f52aaad0a 100644
--- a/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf
@@ -11,3 +11,6 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+
+[sst]
+transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_ist_progress.cnf b/mysql-test/suite/galera/t/galera_ist_progress.cnf
index 0a26f6d6c83..b37e7f38ce3 100644
--- a/mysql-test/suite/galera/t/galera_ist_progress.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_progress.cnf
@@ -3,3 +3,5 @@
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
+
+
diff --git a/mysql-test/suite/galera/t/galera_ist_progress.test b/mysql-test/suite/galera/t/galera_ist_progress.test
index 3ba63415c28..60034ec0db1 100644
--- a/mysql-test/suite/galera/t/galera_ist_progress.test
+++ b/mysql-test/suite/galera/t/galera_ist_progress.test
@@ -3,11 +3,11 @@
#
--source include/galera_cluster.inc
-# This could cause out of storage if run /dev/shm
---source include/big_test.inc
# Isolate node #2
--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
--connection node_1
@@ -23,7 +23,7 @@ SET SESSION wsrep_on = ON;
# Node #2 is now isolated. Run some transactions to accumulate writesets for IST
--connection node_1
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
@@ -49,26 +49,15 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
--source include/wait_condition.inc
#
-# Grep for expected IST output in joiner log
+# sed for expected IST output in joiner log
#
--connection node_1
---let $assert_count = 1
---let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
---let $assert_only_after = Need state transfer
-
---let $assert_text = Receiving IST: 11 writesets, seqnos
---let $assert_select = Receiving IST: 11 writesets, seqnos
---source include/assert_grep.inc
-
---let $assert_text = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
---let $assert_select = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
---source include/assert_grep.inc
-
---let $assert_text = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
---let $assert_select = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
---source include/assert_grep.inc
+# Grep is not safe always and we are interested that there is at least one progress report (there can be more)
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+--echo "Trying to find IST progress reporting"
+--exec sed -ne 's/.*Receiving IST.*/found/p' $MYSQLD_DATADIR/../../log/mysqld.2.err | tail -1
# Cleanup
diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
index 686fb0b3f76..c535ac455b9 100644
--- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
+++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
@@ -7,7 +7,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
# This could cause out of storage if run /dev/shm
--source include/big_test.inc
@@ -44,8 +44,6 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
# ... and restart provider to force IST
--echo Loading wsrep_provider ...
--disable_query_log
-# base_port setting is lost for some reason when unloading provider, so we need to restore it
---eval SET GLOBAL wsrep_provider_options= 'base_port=$NODE_GALERAPORT_2';
# Make sure IST will block ...
--let $galera_sync_point = recv_IST_after_apply_trx
--source include/galera_set_sync_point.inc
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.cnf b/mysql-test/suite/galera/t/galera_kill_applier.cnf
new file mode 100644
index 00000000000..62cf1854032
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_kill_applier.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=1
+
+[mysqld.2]
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test
index c9ff795bab6..88ec55ed0c1 100644
--- a/mysql-test/suite/galera/t/galera_kill_applier.test
+++ b/mysql-test/suite/galera/t/galera_kill_applier.test
@@ -7,9 +7,10 @@
--source include/force_restart.inc
--connection node_2
+SELECT @@wsrep_slave_threads;
SET GLOBAL wsrep_slave_threads=2;
---let $wait_condition = SELECT COUNT(*) >= 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
+--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
--let $wait_condition_on_error_output = SELECT COUNT(*), 2 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
@@ -33,7 +34,7 @@ SET GLOBAL wsrep_slave_threads=2;
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL QUERY $aborter_thread
-SET GLOBAL wsrep_slave_threads=1;
+SET GLOBAL wsrep_slave_threads=DEFAULT;
--connection node_1
create table t1(a int not null primary key) engine=innodb;
@@ -41,8 +42,13 @@ insert into t1 values (1);
insert into t1 values (2);
--connection node_2
-set global wsrep_sync_wait=15;
+--echo # Wait until one of the appliers has exited
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 1 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
+
select count(*) from t1;
+SELECT @@wsrep_slave_threads;
--connection node_1
drop table t1;
diff --git a/mysql-test/suite/galera/t/galera_kill_largechanges.test b/mysql-test/suite/galera/t/galera_kill_largechanges.test
deleted file mode 100644
index c671764fa9e..00000000000
--- a/mysql-test/suite/galera/t/galera_kill_largechanges.test
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# This test kill -9-s a slave while a large update has been performed on the master. SST is performed.
-#
-
---source include/big_test.inc
---source include/galera_cluster.inc
-
-# Save original auto_increment_offset values.
---let $node_1=node_1
---let $node_2=node_2
---source include/auto_increment_offset_save.inc
-
---connection node_1
-# Enable the master to continue running during the split-brain situation that
-# occurs when the slave is killed
---let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
-SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-
-CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
-CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
-
---connection node_2
---source include/kill_galera.inc
-
---connection node_1
-# We create a 128Mb (or so) transaction that is larger than gcache. The size of the gcache is not adjustable dynamically
-INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
-
---connection node_2
---source include/start_mysqld.inc
-
---let $galera_connection_name = node_2a
---let $galera_server_number = 2
---source include/galera_connect.inc
---connection node_2a
-
-SELECT COUNT(*) FROM t1;
-SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-
---connection node_1
---disable_query_log
---eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
---enable_query_log
-
---let $node_2=node_2a
---source include/auto_increment_offset_restore.inc
-
-DROP TABLE t1;
-DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/galera_last_committed_id.test b/mysql-test/suite/galera/t/galera_last_committed_id.test
new file mode 100644
index 00000000000..550838cdcd9
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_last_committed_id.test
@@ -0,0 +1,68 @@
+#
+# Tests functions WSREP_LAST_WRITTEN_GTID and WSREP_LAST_SEEN_GTID
+#
+
+--source include/galera_cluster.inc
+
+# Returns -1 if no transactions have been run
+
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+
+--disable_query_log
+--let $seqno = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--let $state = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$state:$seqno' AS wsrep_last_committed_id_match;
+--enable_query_log
+
+# WSREP_LAST_WRITTEN_GTID() should not be influenced by transactions committed
+# on other connections
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+
+# WSREP_LAST_SEEN_GTID() should be influenced by transactions committed
+# on other connections
+
+--connection node_1a
+INSERT INTO t1 VALUES (1);
+--disable_query_log
+--let $wsrep_last_committed_id_conn_1a = `SELECT WSREP_LAST_SEEN_GTID()`
+--enable_query_log
+
+--connection node_1
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_committed_id_conn_1a' AS wsrep_last_committed_id_match;
+--enable_query_log
+
+# Should not advance while a transaction is in progress
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+
+--disable_query_log
+--let $wsrep_last_committed_id_before = `SELECT WSREP_LAST_SEEN_GTID()`
+--enable_query_log
+INSERT INTO t1 VALUES (1);
+SELECT WSREP_LAST_WRITTEN_GTID() = '00000000-0000-0000-0000-000000000000:-1';
+--disable_query_log
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_committed_id_before' AS wsrep_last_committed_id_match;
+--enable_query_log
+
+# Should only advance after the transaction has been committed
+
+COMMIT;
+--disable_query_log
+--let $seqno = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--let $state = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
+--eval SELECT WSREP_LAST_WRITTEN_GTID() = '$state:$seqno' AS wsrep_last_committed_id_advanced;
+--eval SELECT WSREP_LAST_SEEN_GTID() = '$state:$seqno' AS wsrep_last_committed_id_advanced;
+--enable_query_log
+SET AUTOCOMMIT=ON;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_load_data.test b/mysql-test/suite/galera/t/galera_load_data.test
index 183095492fa..c37920a43c4 100644
--- a/mysql-test/suite/galera/t/galera_load_data.test
+++ b/mysql-test/suite/galera/t/galera_load_data.test
@@ -37,6 +37,13 @@ ALTER TABLE cardtest_tbl ENABLE KEYS;
UNLOCK TABLES;
use cardtest02;
+--sleep 20
+
+let $cardinality1 = `SELECT cardinality from information_schema.statistics WHERE TABLE_NAME = 'cardtest_tbl'`;
+let $table_rows1 = `SELECT table_rows from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`;
+let $avg_row_length1 = `SELECT avg_row_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`;
+let $data_length1 = `SELECT data_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`;
+
--let $wait_timeout=600
--let $wait_condition = SELECT COUNT(*) = 301 from cardtest_tbl;
--source include/wait_condition.inc
diff --git a/mysql-test/suite/galera/t/galera_lock_tables_in_transaction.test b/mysql-test/suite/galera/t/galera_lock_tables_in_transaction.test
new file mode 100644
index 00000000000..5cb7347639c
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_lock_tables_in_transaction.test
@@ -0,0 +1,21 @@
+#
+# Check `LOCK TABLES` command with or without existing table in database.
+# Test case for MDEV-22222 / MDEV-22223
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+--error ER_NO_SUCH_TABLE
+LOCK TABLES t2 READ;
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+LOCK TABLES t1 READ;
+UNLOCK TABLES;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_log_bin.inc b/mysql-test/suite/galera/t/galera_log_bin.inc
index 61c94a00218..4c245846752 100644
--- a/mysql-test/suite/galera/t/galera_log_bin.inc
+++ b/mysql-test/suite/galera/t/galera_log_bin.inc
@@ -2,9 +2,13 @@
--source include/force_restart.inc
--connection node_1
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--connection node_2
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
#
# Test Galera with --log-bin --log-slave-updates .
@@ -37,4 +41,6 @@ DROP TABLE t2;
--echo #cleanup
--connection node_1
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/t/galera_log_bin_sst.inc b/mysql-test/suite/galera/t/galera_log_bin_sst.inc
index 3a0ec5f9b36..3d20add6d9e 100644
--- a/mysql-test/suite/galera/t/galera_log_bin_sst.inc
+++ b/mysql-test/suite/galera/t/galera_log_bin_sst.inc
@@ -7,9 +7,13 @@
--source include/auto_increment_offset_save.inc
--connection node_1
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--connection node_2
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
#
# Test Galera with --log-bin --log-slave-updates .
@@ -77,7 +81,9 @@ DROP TABLE t2;
--echo #cleanup
--connection node_1
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_many_tables_nopk.test b/mysql-test/suite/galera/t/galera_many_tables_nopk.test
index 98a65b7c660..5bfab686726 100644
--- a/mysql-test/suite/galera/t/galera_many_tables_nopk.test
+++ b/mysql-test/suite/galera/t/galera_many_tables_nopk.test
@@ -7,18 +7,17 @@ if (!`SELECT @@open_files_limit >= 1024`){
}
#
-# This test forces 900 tables without a PK to participate in a single
-# transaction. The reason for 900 is that some linux system has by default
-# a limit of 1024 open files / process
+# This test forces 100 tables without a PK to participate in a single
+# transaction.
#
#
-# First, create 900 tables
+# First, create 100 tables
#
--connection node_1
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -28,7 +27,7 @@ while ($count)
--dec $count
}
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -39,13 +38,13 @@ while ($count)
}
#
-# Second, perform 900 updates
+# Second, perform 100 updates
#
SET AUTOCOMMIT=OFF;
START TRANSACTION;
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -63,7 +62,7 @@ COMMIT;
--connection node_2
CREATE TABLE sum_table (f1 INTEGER);
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -73,7 +72,7 @@ while ($count)
--dec $count
}
-SELECT SUM(f1) = 900 FROM sum_table;
+SELECT SUM(f1) = 100 FROM sum_table;
#
# Fourth, create a deadlock
@@ -83,7 +82,7 @@ SELECT SUM(f1) = 900 FROM sum_table;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -96,7 +95,7 @@ while ($count)
--connection node_2
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-UPDATE t900 SET f1 = 3;
+UPDATE t100 SET f1 = 3;
--connection node_1
COMMIT;
diff --git a/mysql-test/suite/galera/t/galera_multirow_rollback.combinations b/mysql-test/suite/galera/t/galera_multirow_rollback.combinations
new file mode 100644
index 00000000000..1ce3b45aa1a
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_multirow_rollback.combinations
@@ -0,0 +1,4 @@
+[binlogon]
+log-bin
+
+[binlogoff]
diff --git a/mysql-test/suite/galera/t/galera_multirow_rollback.test b/mysql-test/suite/galera/t/galera_multirow_rollback.test
new file mode 100644
index 00000000000..a5aaedd8bd4
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_multirow_rollback.test
@@ -0,0 +1,89 @@
+#
+# Test multirow insert rollback
+#
+
+--source include/galera_cluster.inc
+
+#
+# Case 1: error on multirow insert results in empty transaction
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+
+--connection node_1
+START TRANSACTION;
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+COMMIT;
+
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+DROP TABLE t1;
+
+
+#
+# Case 2: error on multirow insert does not affect previous statements
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+
+--connection node_1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'b');
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f2) VALUES ('c'), ('d');
+COMMIT;
+
+--echo expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+
+--connection node_2
+--echo expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+
+#
+# Case 3: error on autocommit multirow insert
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+
+--connection node_1
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f2) VALUES ('a'),('b');
+
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+DROP TABLE t1;
+
+
+#
+# Case 4: FK constraint violation on multirow insert
+#
+--connection node_1
+CREATE TABLE p(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE c(id int primary key, fk1 int) ENGINE=InnoDB;
+ALTER TABLE c ADD FOREIGN KEY (fk1) references p(id);
+INSERT INTO p VALUES(1, 0);
+
+START TRANSACTION;
+INSERT INTO c VALUES (3,1);
+--error ER_NO_REFERENCED_ROW_2
+INSERT INTO c VALUES (1,1), (2,2);
+COMMIT;
+
+SELECT * FROM p;
+SELECT * FROM c;
+
+--connection node_2
+SELECT * FROM p;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p;
diff --git a/mysql-test/suite/galera/t/galera_nonPK_and_PA.test b/mysql-test/suite/galera/t/galera_nonPK_and_PA.test
new file mode 100644
index 00000000000..8a5173f576b
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_nonPK_and_PA.test
@@ -0,0 +1,168 @@
+#
+# This test is a modified version of Gabor Orosz (GOro) test in jira tracker:
+# https://jira.mariadb.org/browse/MDEV-25551
+#
+# The underlying problem with MDEV-25551 turned out to be that
+# transactions having changes for tables with no primary key,
+# were not safe to apply in parallel. This is due to excessive locking
+# in innodb side, and even non related row modifications could end up
+# in lock conflict during applying.
+#
+# The test creates a table with no primary key definition and executes two
+# transactions (in node1) modifying separate rows in the table. In node2
+# first applier is paused before commit phase, and second transaction is
+# then submitted to see if it can interfere with the first transaciton.
+# The fix for MDEV-25551 has disabled parallel applying for tables with no PK,
+# and in the test applying of the send trasnaction should not even start, before
+# the fisrt trkansaction is released from the sync point.
+# The test also verifies that certification depedency status reflects the fact
+# that the two transactions depend on each other.
+#
+# The test has two scenarios where both UPDATE and DELETE statements are verified
+# to disable parallel applying
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+
+# Setup
+
+CREATE TABLE t1 (f1 VARCHAR(32) NOT NULL) ENGINE=InnoDB;
+INSERT INTO t1 (f1) VALUES ('0e66c5227a8a');
+INSERT INTO t1 (f1) VALUES ('c6c112992c9');
+
+CREATE TABLE t2 (i int primary key);
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT COUNT(*)=2 FROM t1;
+--source include/wait_condition.inc
+
+# Ensure that we have enough applier threads to process transactions in parallel
+SET GLOBAL wsrep_slave_threads = 2;
+
+--echo ***************************************************************
+--echo scenario 1, conflicting UPDATE
+--echo ***************************************************************
+
+# Set up a synchronization point to catch the first transaction
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+# Invoke the first transaction
+START TRANSACTION;
+UPDATE t1 SET f1='5ffceebfada' WHERE t1.f1 = 'c6c112992c9';
+COMMIT;
+
+--connection node_2
+# Wait for the first transaction to apply until commit phase
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# remember status for received replication counter and certification dependency distance
+--let $expected_wsrep_received = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_received'`
+--let $cert_deps_distance = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cert_deps_distance'`
+
+--connection node_1
+# Invoke the second transaction
+START TRANSACTION;
+UPDATE t1 SET f1='4ffceebfcdc' WHERE t1.f1 = '0e66c5227a8a';
+COMMIT;
+
+# sleep is probably obsolete here, but it is good to give the latter update time to
+# proceed in applying in node 2. In buggy version the update will start applying
+# and cause conflict there.
+--sleep 5
+
+--connection node_2
+# Wait for the second transaction to appear in repliaction queue
+--let $wait_condition = SELECT VARIABLE_VALUE= $expected_wsrep_received FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_received';
+--source include/wait_condition.inc
+
+# verify that certification dependency distance has dropped
+--disable_query_log
+--eval SELECT VARIABLE_VALUE < $cert_deps_distance as 'distance' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cert_deps_distance'
+--enable_query_log
+
+# if deps distance dropped, it is indirect evidence that parallel applying was not approved
+
+# Let the first transaction to proceed
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+# second applier should now hit sync point
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+
+--echo ***************************************************************
+--echo scenario 2, conflicting DELETE
+--echo ***************************************************************
+
+# Set up a synchronization point to catch the first transaction
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+# Invoke the first transaction, mix this with insert to table having PK
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+DELETE FROM t1 WHERE f1='5ffceebfada';
+COMMIT;
+
+--connection node_2
+# Wait for the first transaction to apply until commit phase
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# remember status for received replication counter and certification dependency distance
+--let $expected_wsrep_received = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_received'`
+--let $cert_deps_distance = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cert_deps_distance'`
+
+--connection node_1
+# Invoke the second transaction, again mix this with insert to table having PK
+START TRANSACTION;
+INSERT INTO t2 VALUES (2);
+DELETE FROM t1 WHERE f1='4ffceebfcdc';
+COMMIT;
+
+# sleep is probably obsolete here, but it is good to give the latter update time to
+# proceed in applying in node 2. In buggy version the update will start applying
+# and cause conflict there.
+--sleep 5
+
+--connection node_2
+# Wait for the second transaction to appear in repliaction queue
+--let $wait_condition = SELECT VARIABLE_VALUE= $expected_wsrep_received FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_received';
+--source include/wait_condition.inc
+
+# verify that certification dependency distance has dropped
+--disable_query_log
+--eval SELECT VARIABLE_VALUE < $cert_deps_distance as 'distance' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cert_deps_distance'
+--enable_query_log
+
+# if deps distance dropped, it is indirect evidence that parallel applying was not approved
+
+# Let the first transaction to proceed
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+# second applier should now hit sync point
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Teardown
+--connection node_1
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+
+DROP TABLE t1;
+DROP TABLE t2;
+--connection node_2
+SET GLOBAL wsrep_slave_threads = DEFAULT;
diff --git a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
index 08ed3fac67e..5a33c16c86e 100644
--- a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
+++ b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
@@ -32,8 +32,8 @@ INSERT INTO t2 VALUES (1);
--connection node_2a
--sleep 1
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%';
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committing%';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 0 FROM t2;
@@ -44,7 +44,7 @@ UNLOCK TABLES;
--eval SET SESSION wsrep_sync_wait = $wsrep_sync_wait_orig;
SELECT COUNT(*) = 1 FROM t1;
SELECT COUNT(*) = 1 FROM t2;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committed%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
index adabb4def00..df0200fab55 100644
--- a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
+++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
@@ -37,9 +37,18 @@ SET GLOBAL wsrep_slave_threads = 4;
--connection node_1
--reap
+--let $wait_condition = select count(*)=30000 from t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(DISTINCT f1) FROM t1;
--connection node_1a
--reap
+--let $wait_condition = select count(*)=30000 from t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(DISTINCT f1) FROM t1;
--connection node_2
--reap
diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test
index 2cd840123cf..d49dc0ae876 100644
--- a/mysql-test/suite/galera/t/galera_parallel_simple.test
+++ b/mysql-test/suite/galera/t/galera_parallel_simple.test
@@ -12,7 +12,6 @@ CREATE TABLE t1 (id INT) ENGINE=InnoDB;
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
--connection node_2
-SET GLOBAL wsrep_slave_threads = 2;
# Wait until above DDL's are replicated
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
@@ -20,6 +19,8 @@ SET GLOBAL wsrep_slave_threads = 2;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+SET GLOBAL wsrep_slave_threads = 2;
+
LOCK TABLE t1 WRITE;
--connection node_1
@@ -38,8 +39,11 @@ INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (1);
+INSERT INTO t1 select * from t1;
+INSERT INTO t2 select * from t2;
+
+INSERT INTO t1 select * from t1;
+INSERT INTO t2 select * from t2;
--connection node_2
SET SESSION wsrep_sync_wait = 0;
@@ -47,15 +51,15 @@ SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%';
--source include/wait_condition.inc
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'applied write set%';
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committing%';
--source include/wait_condition.inc
UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 15;
-SELECT COUNT(*) = 10 FROM t1;
-SELECT COUNT(*) = 10 FROM t2;
+SELECT COUNT(*) as expect_20 FROM t1;
+SELECT COUNT(*) as expect_20 FROM t2;
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
diff --git a/mysql-test/suite/galera/t/galera_partition.cnf b/mysql-test/suite/galera/t/galera_partition.cnf
index e6cb13ef523..525eece04ab 100644
--- a/mysql-test/suite/galera/t/galera_partition.cnf
+++ b/mysql-test/suite/galera/t/galera_partition.cnf
@@ -3,16 +3,20 @@
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
+wsrep_debug=1
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
+wsrep_debug=1
[mysqld.3]
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2'
wsrep_slave_threads=10
+wsrep_debug=1
[mysqld.4]
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3'
wsrep_slave_threads=10
+wsrep_debug=1
diff --git a/mysql-test/suite/galera/t/galera_partition.test b/mysql-test/suite/galera/t/galera_partition.test
index 66b2a5c10f6..3de45d54000 100644
--- a/mysql-test/suite/galera/t/galera_partition.test
+++ b/mysql-test/suite/galera/t/galera_partition.test
@@ -1,5 +1,6 @@
--source include/galera_cluster.inc
--source include/have_partition.inc
+--source include/big_test.inc
--connection node_1
@@ -10,6 +11,8 @@ call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
CREATE TABLE t1(
id bigint unsigned NOT NULL AUTO_INCREMENT,
@@ -406,16 +409,16 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
SELECT COUNT(*) FROM t1;
--connection node_2
-call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
---send call p1(100);
+call mtr.add_suppression("WSREP: Sending JOIN failed:");
+send call p1(10);
--connection node_3
-call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
---send call p1(100);
+call mtr.add_suppression("WSREP: Sending JOIN failed:");
+send call p1(10);
--connection node_4
-call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
---send call p1(100);
+call mtr.add_suppression("WSREP: Sending JOIN failed:");
+send call p1(10);
--connection node_1
SET SESSION wsrep_OSU_method='RSU';
@@ -448,3 +451,7 @@ reap;
DROP TABLE t1;
DROP PROCEDURE p1;
+--disconnect node_3
+--disconnect node_4
+
+
diff --git a/mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf b/mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf
new file mode 100644
index 00000000000..ae48aa3ae0f
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf
@@ -0,0 +1,11 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+wsrep_debug=1
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
+
diff --git a/mysql-test/suite/galera/t/galera_pc_recovery.test b/mysql-test/suite/galera/t/galera_pc_recovery.test
new file mode 100644
index 00000000000..1621414aff5
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_pc_recovery.test
@@ -0,0 +1,102 @@
+#
+# Test the pc.recovery=1 option. Killing all nodes simultaneously and
+# restarting them should succeed and the cluster should re-form.
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+# Save galera ports
+--connection node_1
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
+
+--connection node_2
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+# Instruct MTR to not restart the nodes automatically when they are killed
+
+--let $NODE_1_PIDFILE = `SELECT @@pid_file`
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+--let $NODE_2_PIDFILE = `SELECT @@pid_file`
+
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--exec kill -9 `cat $NODE_1_PIDFILE` `cat $NODE_2_PIDFILE`
+
+# Perform --wsrep-recover and preserve the positions into variables by placing them in $MYSQL_TMP_DIR/galera_wsrep_start_position.inc and then --source'ing it
+
+--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.1.log > $MYSQL_TMP_DIR/galera_wsrep_recover.1.log 2>&1
+--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.2.log > $MYSQL_TMP_DIR/galera_wsrep_recover.2.log 2>&1
+
+--perl
+ use strict;
+ my $wsrep_start_position1 = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.1.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
+ chomp($wsrep_start_position1);
+
+ my $wsrep_start_position2 = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.2.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
+ chomp($wsrep_start_position2);
+
+ die if $wsrep_start_position1 eq '' || $wsrep_start_position2 eq '';
+
+ open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
+ print FILE "--let \$galera_wsrep_start_position1 = $wsrep_start_position1\n";
+ print FILE "--let \$galera_wsrep_start_position2 = $wsrep_start_position2\n";
+ close FILE;
+EOF
+
+--source $MYSQL_TMP_DIR/galera_wsrep_start_position.inc
+
+if ($galera_wsrep_start_position1 == '') {
+ --die "Could not obtain wsrep_start_position."
+}
+
+if ($galera_wsrep_start_position2 == '') {
+ --die "Could not obtain wsrep_start_position."
+}
+
+--remove_file $MYSQL_TMP_DIR/galera_wsrep_start_position.inc
+
+# Instruct MTR to perform the actual restart using --wsrep-start-position . Proper --wsrep_cluster_address is used as my.cnf only contains 'gcomm://' for node #1
+
+--exec echo "restart: --wsrep-start-position=$galera_wsrep_start_position1 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart: --wsrep-start-position=$galera_wsrep_start_position2 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+
+--sleep 5
+--connection node_1
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+# Confirm that the cluster has re-formed and data is present
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 1 FROM t1;
+
+--connection node_2
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 1 FROM t1;
+
+DROP TABLE t1;
+
+--connection node_1
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
+
+--connection node_2
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
diff --git a/mysql-test/suite/galera/t/galera_read_only.test b/mysql-test/suite/galera/t/galera_read_only.test
index c0fa4af07e0..56fe2fdd910 100644
--- a/mysql-test/suite/galera/t/galera_read_only.test
+++ b/mysql-test/suite/galera/t/galera_read_only.test
@@ -28,9 +28,20 @@ CREATE USER foo@localhost;
--connection foo_node_2
--error ER_OPTION_PREVENTS_STATEMENT
INSERT INTO t1 VALUES (2);
+# Writes to temporary tables are allowed
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
--connection node_2
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+
+--connection node_2
+SET GLOBAL read_only=TRUE;
+# Writes to temporary tables are allowed
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
# Cleanup
SET GLOBAL read_only=FALSE;
diff --git a/mysql-test/suite/galera/t/galera_repair_view.test b/mysql-test/suite/galera/t/galera_repair_view.test
new file mode 100644
index 00000000000..0010d90c7ec
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_repair_view.test
@@ -0,0 +1,12 @@
+--source include/galera_cluster.inc
+
+CREATE TABLE t1(a int not null primary key) engine=innodb;
+REPAIR TABLE t1;
+CREATE VIEW v1 AS SELECT a FROM t1;
+REPAIR VIEW v1;
+DROP VIEW v1;
+DROP TABLE t1;
+
+CREATE VIEW v1 AS SELECT table_name FROM information_schema.tables;
+REPAIR VIEW v1;
+DROP VIEW v1;
diff --git a/mysql-test/suite/galera/t/galera_schema.test b/mysql-test/suite/galera/t/galera_schema.test
new file mode 100644
index 00000000000..a3ee814c393
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_schema.test
@@ -0,0 +1,61 @@
+--source include/galera_cluster.inc
+
+CREATE TABLE IF NOT EXISTS wsrep_cluster
+(
+ cluster_uuid CHAR(36) PRIMARY KEY,
+ view_id BIGINT NOT NULL,
+ view_seqno BIGINT NOT NULL,
+ protocol_version INT NOT NULL,
+ capabilities INT NOT NULL
+) ENGINE=InnoDB;
+
+CREATE TABLE IF NOT EXISTS wsrep_cluster_members
+(
+ node_uuid CHAR(36) PRIMARY KEY,
+ cluster_uuid CHAR(36) NOT NULL,
+ node_name CHAR(32) NOT NULL,
+ node_incoming_address VARCHAR(256) NOT NULL
+) ENGINE=InnoDB;
+
+CREATE TABLE IF NOT EXISTS wsrep_cluster_members_history
+(
+ node_uuid CHAR(36) PRIMARY KEY,
+ cluster_uuid CHAR(36) NOT NULL,
+ last_view_id BIGINT NOT NULL,
+ last_view_seqno BIGINT NOT NULL,
+ node_name CHAR(32) NOT NULL,
+ node_incoming_address VARCHAR(256) NOT NULL
+) ENGINE=InnoDB;
+
+CREATE TABLE IF NOT EXISTS wsrep_streaming_log
+(
+ node_uuid CHAR(36),
+ trx_id BIGINT,
+ seqno BIGINT,
+ flags INT NOT NULL,
+ frag LONGBLOB NOT NULL,
+ PRIMARY KEY (node_uuid, trx_id, seqno)
+) ENGINE=InnoDB;
+
+DELETE FROM wsrep_cluster;
+DELETE FROM wsrep_cluster_members;
+
+ALTER TABLE wsrep_cluster STATS_PERSISTENT=0;
+ALTER TABLE wsrep_cluster_members STATS_PERSISTENT=0;
+ALTER TABLE wsrep_cluster_members_history STATS_PERSISTENT=0;
+ALTER TABLE wsrep_streaming_log STATS_PERSISTENT=0;
+
+SHOW CREATE TABLE wsrep_cluster;
+SHOW CREATE TABLE wsrep_cluster_members;
+SHOW CREATE TABLE wsrep_cluster_members_history;
+SHOW CREATE TABLE wsrep_streaming_log;
+
+SHOW CREATE TABLE mysql.wsrep_cluster;
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+#SHOW CREATE TABLE mysql.wsrep_cluster_members_history;
+SHOW CREATE TABLE mysql.wsrep_streaming_log;
+
+DROP TABLE wsrep_cluster;
+DROP TABLE wsrep_cluster_members;
+DROP TABLE wsrep_cluster_members_history;
+DROP TABLE wsrep_streaming_log;
diff --git a/mysql-test/suite/galera/t/galera_sequences.test b/mysql-test/suite/galera/t/galera_sequences.test
new file mode 100644
index 00000000000..d469cc73516
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sequences.test
@@ -0,0 +1,52 @@
+--source include/galera_cluster.inc
+
+#
+# MDEV-19353 : Alter Sequence do not replicate to another nodes with in Galera Cluster
+#
+
+--connection node_1
+CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB;
+SHOW CREATE SEQUENCE seq;
+
+--connection node_2
+SHOW CREATE SEQUENCE seq;
+
+--connection node_1
+ALTER SEQUENCE seq MAXVALUE = 10000;
+SHOW CREATE SEQUENCE seq;
+
+--connection node_2
+SHOW CREATE SEQUENCE seq;
+
+--connection node_1
+DROP SEQUENCE seq;
+--error ER_NO_SUCH_TABLE
+SHOW CREATE SEQUENCE seq;
+
+--connection node_2
+--error ER_NO_SUCH_TABLE
+SHOW CREATE SEQUENCE seq;
+
+#
+# MDEV-18848 : Galera: 10.4 node crashed with Assertion `client_state.transaction().active()` after altering SEQUENCE table's engine to myisam and back to innodb
+#
+--connection node_1
+CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1;
+select NEXT VALUE FOR Seq1_1;
+alter table Seq1_1 engine=myisam;
+select NEXT VALUE FOR Seq1_1;
+alter table Seq1_1 engine=innodb;
+select NEXT VALUE FOR Seq1_1;
+
+--connection node_2
+SHOW CREATE SEQUENCE Seq1_1;
+select NEXT VALUE FOR Seq1_1;
+
+--connection node_1
+DROP SEQUENCE Seq1_1;
+
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+
+--connection node_2
+
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
diff --git a/mysql-test/suite/galera/t/galera_set_position_after_cert_failure.test b/mysql-test/suite/galera/t/galera_set_position_after_cert_failure.test
new file mode 100644
index 00000000000..4dfddb0f32a
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_set_position_after_cert_failure.test
@@ -0,0 +1,98 @@
+#
+# Check that wsrep position is updated in innodb after
+# a local certification failure.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+#
+# Cause a certification failure. The INSERT on node_2 will fail certification,
+# and it is going to be the last event before shutting down node_2.
+#
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+--connection node_1
+--send INSERT INTO t1 VALUES (1, 'node_1');
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_retry_autocommit = 0;
+
+--send INSERT INTO t1 VALUES (1, 'node_2');
+
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1
+--reap
+
+--connection node_2a
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "RESET";
+
+#
+# Keep track of the current position in variable $expected_position
+#
+--let $expected_position_uuid = `SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
+--let $expected_position_seqno = `SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--let $expected_position = $expected_position_uuid:$expected_position_seqno
+--disconnect node_2a
+
+#
+# Shutdown node 2
+#
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+#
+# Check that start position matches the position we recorded
+# before shutdown in $expected_position
+#
+--let $galera_wsrep_recover_server_id = 2
+--source suite/galera/include/galera_wsrep_recover.inc
+
+if ($galera_wsrep_start_position != $expected_position)
+{
+ --exec echo "expected position $expected_position"
+ --exec echo "recover position $galera_wsrep_start_position"
+ die("Expected position and recover position did not match");
+}
+
+#
+# Restart node 2 and cleanup
+#
+--connection node_2
+--source include/start_mysqld.inc
+
+--connection node_1
+DROP TABLE t1;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_set_position_after_dummy_writeset.test b/mysql-test/suite/galera/t/galera_set_position_after_dummy_writeset.test
new file mode 100644
index 00000000000..76f6d98168e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_set_position_after_dummy_writeset.test
@@ -0,0 +1,101 @@
+#
+# Check that wsrep position is updated in innodb after
+# a dummy write set is applied.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+#
+# Cause a certification failure. The INSERT on in node_1 will fail certification,
+# and will result in a dummy writeset on node_2. This is going to be the last
+# writeset before shutting down node_2.
+#
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+--connection node_2
+--send INSERT INTO t1 VALUES (1, 'node_2');
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait=0;
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_retry_autocommit = 0;
+
+--send INSERT INTO t1 VALUES (1, 'node_1');
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+--reap
+
+#
+# Keep track of the current position in variable $expected_position
+#
+--let $expected_position_uuid = `SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
+--let $expected_position_seqno = `SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--let $expected_position = $expected_position_uuid:$expected_position_seqno
+
+#
+# Shutdown node 2
+#
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+#
+# Check that start position matches the position we recorded
+# before shutdown in $expected_position
+#
+--let $galera_wsrep_recover_server_id = 2
+--source suite/galera/include/galera_wsrep_recover.inc
+
+if ($galera_wsrep_start_position != $expected_position)
+{
+ --exec echo "expected position $expected_position"
+ --exec echo "recover position $galera_wsrep_start_position"
+ die("Expected position and recover position did not match");
+}
+
+#
+# Restart the node 2 and cleanup
+#
+--connection node_2
+--source include/start_mysqld.inc
+
+--connection node_1
+DROP TABLE t1;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+--source include/auto_increment_offset_restore.inc
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG=NULL;
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera/t/galera_slave_replay.test b/mysql-test/suite/galera/t/galera_slave_replay.test
index b3bdaeaa532..f1500eeaeaa 100644
--- a/mysql-test/suite/galera/t/galera_slave_replay.test
+++ b/mysql-test/suite/galera/t/galera_slave_replay.test
@@ -7,6 +7,7 @@
#
--source include/have_innodb.inc
+--source include/have_log_bin.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
@@ -17,9 +18,10 @@
--source include/galera_cluster.inc
#
-# node 1 is native MariaDB server operating as async replication master
+# node 3 is native MariaDB server operating as async replication master
#
---connection node_1
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
RESET MASTER;
--connection node_2a
@@ -30,14 +32,14 @@ RESET MASTER;
#
-# nodes 2 and 3 form a galera cluster, node 2 operates as slave for native MariaDB naster in node 1
+# nodes 1 and 2 form a galera cluster, node 2 operates as slave for native MariaDB master in node 3
#
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (3, 'a');
@@ -62,31 +64,30 @@ SET SESSION wsrep_sync_wait = 0;
--source include/wait_condition.inc
# wait for create table and inserts to be replicated in cluster
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connection node_3
+--connection node_1
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT COUNT(*) = 2 FROM test.t1;
--source include/wait_condition.inc
--connection node_2a
# Block the future commit of async replication
---let $galera_sync_point = commit_monitor_enter_sync
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
# block also the applier before applying begins
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
#
-# now inject a conflicting insert from node 3, it will replicate with
+# now inject a conflicting insert from node 1, it will replicate with
# earlier seqno (than async transaction) and pause before applying in node 2
#
---connection node_3
+--connection node_1
INSERT INTO test.t1 VALUES (2, 'b');
#
# send the update from master, this will succeed here, beceuase of async replication.
# async replication will apply this in node 2 and pause before commit phase,
---connection node_1
+--connection node_3
--error 0
COMMIT;
@@ -107,7 +108,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
--source include/galera_clear_sync_point.inc
--source include/galera_signal_sync_point.inc
---connection node_1
+--connection node_3
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
@@ -138,7 +139,7 @@ SET DEBUG_SYNC = "RESET";
--echo # test phase with real abort
--echo #
---connection node_1
+--connection node_3
set binlog_format=ROW;
@@ -154,35 +155,31 @@ UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
--let $wait_condition = SELECT COUNT(*) = 4 FROM test.t1;
--source include/wait_condition.inc
-# Block the commit
---let $galera_sync_point = commit_monitor_enter_sync
---source include/galera_set_sync_point.inc
-
# block applier
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
-# Inject a conflicting update from node 3
---connection node_3
+# Inject a conflicting update from node 1
+--connection node_1
UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
+--connection node_2a
+# wait until applier has reached the sync point
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
# send the update from master
---connection node_1
+--connection node_3
--error 0
COMMIT;
--connection node_2a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
-# release the applier
+# release the applier from node 1
SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
-
-# Unblock the async slave commit
---connection node_2a
---source include/galera_clear_sync_point.inc
---source include/galera_signal_sync_point.inc
-SET DEBUG_SYNC = "RESET";
-
--connection node_2a
set session wsrep_sync_wait=15;
@@ -191,9 +188,10 @@ set session wsrep_sync_wait=0;
STOP SLAVE;
RESET SLAVE;
+SET DEBUG_SYNC = "RESET";
DROP TABLE t1;
---connection node_1
+--connection node_3
DROP TABLE t1;
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_sp_bf_abort.cnf b/mysql-test/suite/galera/t/galera_sp_bf_abort.cnf
new file mode 100644
index 00000000000..62cf1854032
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sp_bf_abort.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=1
+
+[mysqld.2]
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_sp_bf_abort.inc b/mysql-test/suite/galera/t/galera_sp_bf_abort.inc
index 7ca8ecf20a9..58345184e98 100644
--- a/mysql-test/suite/galera/t/galera_sp_bf_abort.inc
+++ b/mysql-test/suite/galera/t/galera_sp_bf_abort.inc
@@ -1,3 +1,4 @@
+
#
# Issue an INSERT for gap between 1 and 3 to node_2 and wait until it hits
# apply monitor sync point on node_1
@@ -34,3 +35,4 @@
--source include/galera_signal_sync_point.inc
--let $galera_sync_point = after_replicate_sync
--source include/galera_signal_sync_point.inc
+
diff --git a/mysql-test/suite/galera/t/galera_sp_bf_abort.test b/mysql-test/suite/galera/t/galera_sp_bf_abort.test
index b5f28c23b05..ce5e00ff8dc 100644
--- a/mysql-test/suite/galera/t/galera_sp_bf_abort.test
+++ b/mysql-test/suite/galera/t/galera_sp_bf_abort.test
@@ -3,10 +3,7 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
---source include/have_debug.inc
---source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--connection node_1
@@ -256,7 +253,7 @@ INSERT INTO t1 VALUES (1, 'a'), (3, 'a');
SET SESSION wsrep_sync_wait = 0;
--source galera_sp_bf_abort.inc
--connection node_1
---error ER_DUP_ENTRY,ER_LOCK_DEADLOCK, ER_ERROR_DURING_COMMIT
+--error ER_DUP_ENTRY,ER_LOCK_DEADLOCK
--reap
SET SESSION wsrep_sync_wait = default;
SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/t/galera_sp_insert_parallel.test b/mysql-test/suite/galera/t/galera_sp_insert_parallel.test
new file mode 100644
index 00000000000..b6878a9c32a
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sp_insert_parallel.test
@@ -0,0 +1,55 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+
+
+DELIMITER |;
+CREATE PROCEDURE proc_insert()
+BEGIN
+ DECLARE i INT;
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+
+ SET i = 0;
+ WHILE i < 1000 DO
+ INSERT IGNORE INTO t1 (f1, f2)
+ VALUES (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15)),
+ (FLOOR(1 + RAND() * 65535), FLOOR(1 + RAND() * 15));
+ SET i = i + 1;
+
+ END WHILE;
+END|
+DELIMITER ;|
+
+--connection node_1
+SELECT 0;
+SET SESSION wsrep_sync_wait = 0;
+--send CALL proc_insert
+--connection node_2
+SELECT 0;
+SET SESSION wsrep_sync_wait = 0;
+--send CALL proc_insert
+
+--connection node_1
+--error 0,ER_LOCK_DEADLOCK,ER_QUERY_INTERRUPTED
+--disable_warnings
+--reap
+--enable_warnings
+SET SESSION wsrep_sync_wait = default;
+--connection node_2
+--error 0,ER_LOCK_DEADLOCK,ER_QUERY_INTERRUPTED
+--disable_warnings
+--reap
+--enable_warnings
+SET SESSION wsrep_sync_wait = default;
+
+--connection node_1
+DROP PROCEDURE proc_insert;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_split_brain.test b/mysql-test/suite/galera/t/galera_split_brain.test
index a85a2ad9b8d..b1ea9c9b4ab 100644
--- a/mysql-test/suite/galera/t/galera_split_brain.test
+++ b/mysql-test/suite/galera/t/galera_split_brain.test
@@ -1,6 +1,8 @@
#
-# Confirm that with two nodes, killing one causes the other to stop accepting connections
-# The pc.ignore_sb=true wsrep_provider option is tested in the galera_kill_* tests.
+# Confirm that with two nodes, killing one causes the other to stop accepting
+# connections.
+# The pc.ignore_sb=true wsrep_provider option is tested in the galera_kill_*
+# tests.
#
--source include/galera_cluster.inc
@@ -15,27 +17,24 @@ call mtr.add_suppression("WSREP: TO isolation failed for: ");
--connection node_1
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
+call mtr.add_suppression("CREATE TABLE isolation failure");
--connection node_2
--source include/kill_galera.inc
--connection node_1
---error ER_LOCK_DEADLOCK
+SET SESSION lock_wait_timeout= 3;
+--error ER_LOCK_WAIT_TIMEOUT
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
# Reset the master and restart the slave so that post-test checks can run
-
-
--connection node_2
--source include/start_mysqld.inc
---sleep 5
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
---sleep 10
-
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/wait_until_connected_again.inc
@@ -44,4 +43,3 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
-
diff --git a/mysql-test/suite/galera/t/galera_ssl_upgrade.test b/mysql-test/suite/galera/t/galera_ssl_upgrade.test
index 1098e84488f..2c55238809f 100644
--- a/mysql-test/suite/galera/t/galera_ssl_upgrade.test
+++ b/mysql-test/suite/galera/t/galera_ssl_upgrade.test
@@ -67,6 +67,10 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+# 5. Make sure node_2 is ready as well
+--connection node_2
+--source include/galera_wait_ready.inc
+
# Upgrade complete. Both nodes now use the new key and certificate
# Restore original auto_increment_offset values.
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
index 4110192b947..857a4101406 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
index aeb2301925e..b1caf700a12 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key-openssl.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key-openssl.cnf
index 63eb47b519d..865c91f9a67 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key-openssl.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key-openssl.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
[sst]
encrypt-format=openssl
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
index 646d7322b41..60db7ddba77 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
[SST]
tkey=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key_server.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key_server.cnf
index 9abef8820e5..0dc79df5a80 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key_server.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key_server.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_force_recovery.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_force_recovery.cnf
index 4110192b947..857a4101406 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_force_recovery.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_force_recovery.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.cnf
index c52e1d474a6..04043ac2b74 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.test
index 060617aee49..09a18ab4c2c 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.test
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_logarchive.test
@@ -32,10 +32,10 @@
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
---let sst_test_true_count=7
-if (`select version() like '%debug%'`)
-{
- --let sst_test_true_count=10
+--let sst_test_true_count=6
+--source include/maybe_debug.inc
+if ($have_debug) {
+ --let sst_test_true_count=6
}
--source include/galera_end.inc
@@ -45,16 +45,17 @@ if (`select version() like '%debug%'`)
--perl
use strict;
use warnings;
- my $file= $ENV{'MYSQLTEST_VARDIR'}.'/tmp/logarchive_list';
- my $count= 0;
+ my $file=$ENV{'MYSQLTEST_VARDIR'}.'/tmp/logarchive_list';
+ my $count=0;
open(FILE, "$file") or die("Error $? opening $file: $!\n");
while (<FILE>) {
my $line = $_;
$count++;
}
close(FILE) or die("Error $? closing $file: $!");
- if ($count != $ENV{'sst_test_true_count'}) {
- die("Wrong log archives counter: $count");
+ my $true_count=$ENV{'sst_test_true_count'};
+ if ($count != $true_count) {
+ die("Wrong log archives counter: $count instead of $true_count");
}
EOF
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_qpress.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_qpress.cnf
index f58d22cba52..e99c819d2e8 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_qpress.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_qpress.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf
index 13cb1aa5366..4c57017299f 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf
@@ -3,7 +3,7 @@
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
-wsrep_debug=ON
+wsrep_debug=1
innodb-file-format='Barracuda'
innodb-file-per-table=ON
diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf b/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf
index 574ae28b54a..af4fedf12ce 100644
--- a/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf
@@ -5,7 +5,5 @@
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
-
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
-
diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump.test b/mysql-test/suite/galera/t/galera_sst_mysqldump.test
index 835fac94a68..cce4d374a6d 100644
--- a/mysql-test/suite/galera/t/galera_sst_mysqldump.test
+++ b/mysql-test/suite/galera/t/galera_sst_mysqldump.test
@@ -1,6 +1,5 @@
--source include/big_test.inc
--source include/galera_cluster.inc
-
--source suite/galera/include/galera_sst_set_mysqldump.inc
--let $node_1=node_1
@@ -14,7 +13,6 @@
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_clean_slave.inc
-
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
index 44e5573b3e6..0f38a85744e 100644
--- a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
@@ -5,12 +5,11 @@
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_sync_wait=0
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
-
-[mysqld]
-wsrep_debug=ON
+wsrep_sync_wait=0
[client]
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test
index 57244cb50c7..3e0e944b0df 100644
--- a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test
+++ b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test
@@ -20,7 +20,7 @@ GRANT USAGE ON *.* TO sslsst REQUIRE SSL;
SET GLOBAL wsrep_sst_auth = 'sslsst:';
# We set the required mysqldump SST options here so that they are used every time the server is restarted during the test
---let $start_mysqld_params = --wsrep_sst_auth=sst:'sslsst:' --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=127.0.0.1:$NODE_MYPORT_2 --skip-grant-tables
+--let $start_mysqld_params = --wsrep_sst_auth=sst:'sslsst:' --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=127.0.0.1:$NODE_MYPORT_2
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_kill_slave.inc
diff --git a/mysql-test/suite/galera/t/galera_sync_wait_upto-master.opt b/mysql-test/suite/galera/t/galera_sync_wait_upto-master.opt
new file mode 100644
index 00000000000..0b35236062b
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sync_wait_upto-master.opt
@@ -0,0 +1 @@
+--wsrep-sync-wait=0 --wsrep-causal-reads=OFF \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/galera_sync_wait_upto.test b/mysql-test/suite/galera/t/galera_sync_wait_upto.test
new file mode 100644
index 00000000000..32c6b590c84
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sync_wait_upto.test
@@ -0,0 +1,115 @@
+#
+# Tests the wsrep_sync_wait_upto variable.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+
+# Test with invalid values
+
+--error ER_WRONG_ARGUMENTS
+SELECT WSREP_SYNC_WAIT_UPTO_GTID(NULL);
+
+--error ER_WRONG_ARGUMENTS
+SELECT WSREP_SYNC_WAIT_UPTO_GTID('a');
+
+--error ER_WRONG_ARGUMENTS
+SELECT WSREP_SYNC_WAIT_UPTO_GTID(2);
+
+
+# If set to low value, expect no waiting
+
+--disable_query_log
+--let $seqno = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--let $state = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
+--enable_query_log
+
+--disable_query_log
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('00000000-0000-0000-0000-000000000000:-1') AS WSREP_SYNC_WAIT_UPTO;
+--enable_query_log
+
+--disable_query_log
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$state:0') AS WSREP_SYNC_WAIT_UPTO;
+--enable_query_log
+
+
+# If set to current last_committed value
+
+--disable_query_log
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$state:$seqno') AS WSREP_SYNC_WAIT_UPTO;
+--enable_query_log
+
+
+# If set to very high value, will wait
+
+--disable_query_log
+--error ER_LOCK_WAIT_TIMEOUT
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$state:9223372036854775807', 1) AS WSREP_SYNC_WAIT_UPTO;
+--enable_query_log
+
+
+# If applier is blocked, will wait
+
+--connection node_2
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+
+
+--connection node_1
+# Perform two inserts and record the IDs of each
+INSERT INTO t1 VALUES (2);
+--let $gtid_first = `SELECT WSREP_LAST_WRITTEN_GTID()`
+
+INSERT INTO t1 VALUES (3);
+--let $gtid_second = `SELECT WSREP_LAST_WRITTEN_GTID()`
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+--disable_query_log
+--error ER_LOCK_WAIT_TIMEOUT
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$gtid_first', 1) AS WSREP_SYNC_WAIT_UPTO;
+--enable_query_log
+
+--disable_query_log
+--send_eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$gtid_first') AS WSREP_SYNC_WAIT_UPTO;
+--enable_query_log
+
+# Unblock applier
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE 'SELECT WSREP_SYNC_WAIT%';
+--source include/wait_condition.inc
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+--connection node_2
+--reap
+
+# Confirm that we were allowed to proceed when the applier reached $seqno_first
+--let $gtid_current = `SELECT WSREP_LAST_SEEN_GTID()`
+--disable_query_log
+--eval SELECT '$gtid_current' = '$gtid_first' AS `gtid_current = gtid_first`
+--enable_query_log
+
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+# Move forward some more, to $seqno_second;
+
+--disable_query_log
+--eval SELECT WSREP_SYNC_WAIT_UPTO_GTID('$gtid_second') AS WSREP_SYNC_WAIT_UPTO;
+--enable_query_log
+
+--let $gtid_current = `SELECT WSREP_LAST_SEEN_GTID()`
+--disable_query_log
+--eval SELECT '$gtid_current' = '$gtid_second' AS `seqno_current = seqno_second`
+--enable_query_log
+
+SET DEBUG_SYNC = "RESET";
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_to_error.test b/mysql-test/suite/galera/t/galera_to_error.test
deleted file mode 100644
index 576fa01e64d..00000000000
--- a/mysql-test/suite/galera/t/galera_to_error.test
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Confirm that with two nodes, killing one causes the other to stop accepting connections
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
-
-# Save original auto_increment_offset values.
---let $node_1=node_1
---let $node_2=node_2
---source include/auto_increment_offset_save.inc
-
---connection node_1
-call mtr.add_suppression("WSREP: TO isolation failed for: ");
---let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
-
-CREATE TABLE t2(a int not null auto_increment primary key, b int, key(b)) engine=innodb;
-INSERT INTO t2 values (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6);
-
---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---connection node_1a
-BEGIN;
---send UPDATE t2 set b = b + 20 where b BETWEEN 2 and 5;
-
-#
-# Take thread id for above query
-#
---connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
---connection node_1b
---let $k_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1`
-
---connection node_2
---source include/kill_galera.inc
-
---connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
---connection node_1c
---error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR
-CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-
---disable_query_log
---error ER_LOCK_DEADLOCK, ER_CANNOT_USER,ER_KILL_QUERY_DENIED_ERROR
---eval KILL QUERY $k_thread;
---enable_query_log
-
-# Reset the master and restart the slave so that post-test checks can run
---error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR
-CREATE UNIQUE INDEX b2 ON t2(b);
-
---connection node_1
---disconnect node_1a
---disconnect node_1b
---disconnect node_1c
-
---connection node_2
---source include/start_mysqld.inc
---source include/wait_until_connected_again.inc
-
---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
---source include/wait_condition.inc
-
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---source include/wait_until_connected_again.inc
-
-DROP TABLE t2;
-
-# Restore original auto_increment_offset values.
---let $node_2=node_2a
---source include/auto_increment_offset_restore.inc
-
---source include/galera_end.inc
-
diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_error.test b/mysql-test/suite/galera/t/galera_toi_ddl_error.test
index c586d97bdb5..6ee2a6e9b16 100644
--- a/mysql-test/suite/galera/t/galera_toi_ddl_error.test
+++ b/mysql-test/suite/galera/t/galera_toi_ddl_error.test
@@ -27,3 +27,8 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
DROP TABLE ten;
+
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query.");
+
+--connection node_2
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_locking.test b/mysql-test/suite/galera/t/galera_toi_ddl_locking.test
index 12c83a1f87a..22a45316306 100644
--- a/mysql-test/suite/galera/t/galera_toi_ddl_locking.test
+++ b/mysql-test/suite/galera/t/galera_toi_ddl_locking.test
@@ -11,20 +11,31 @@
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
---connection node_1
-SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
---send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
-
--let $galera_connection_name = node_1a
--let $galera_server_number = 1
--source include/galera_connect.inc
+SET SESSION wsrep_sync_wait = 0;
--let $galera_connection_name = node_1b
--let $galera_server_number = 1
--source include/galera_connect.inc
+# node_1c tests write to unrelated table trough a transaction
+--let $galera_connection_name = node_1c
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+--connection node_1
+SET DEBUG_SYNC= 'RESET';
+SET DEBUG_SYNC = 'alter_table_before_open_tables SIGNAL before_open_tables WAIT_FOR continue';
+--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC= 'now WAIT_FOR before_open_tables';
+
+# if we would retry the insert, it would fail for wrong column count
+# on second try
+SET wsrep_retry_autocommit=0;
# Allowed
SELECT COUNT(*) = 0 FROM t1;
@@ -32,45 +43,56 @@ SELECT COUNT(*) = 0 FROM t1;
# Allowed
SELECT COUNT(*) = 0 FROM t2;
-# Not allowed
---error ER_LOCK_DEADLOCK,ER_ERROR_DURING_COMMIT
-INSERT INTO t1 VALUES (1);
+# Not allowed, this will hang because of ALTER
+--send INSERT INTO t1 VALUES (1);
+
+--connection node_1c
+SET SESSION wsrep_sync_wait = 0;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
# Allowed
+SELECT COUNT(*) = 0 FROM t1;
+
+# Allowed
+SELECT COUNT(*) = 0 FROM t2;
+
+# Allowed (until commit)
INSERT INTO t2 VALUES (1);
# Hangs
--send COMMIT;
---sleep 1
--connection node_1b
SET SESSION wsrep_sync_wait = 0;
# The Commit issued above is still not done
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
+--sleep 1
SELECT COUNT(*) = 0 FROM t2;
+
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
+
SET DEBUG_SYNC= 'now SIGNAL continue';
--connection node_1a
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1c
+# this will succeeed, becaus the query will be replayed
--reap
--connection node_1
--reap
+
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 1 FROM t2;
+SET debug_sync='RESET';
--connection node_2
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 1 FROM t2;
---connection node_1
-SET DEBUG_SYNC= 'RESET';
-
---connection node_1b
-SET DEBUG_SYNC= 'RESET';
-
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_nonconflicting.test b/mysql-test/suite/galera/t/galera_toi_ddl_nonconflicting.test
index dbd2510cba3..d431fc0b9ed 100644
--- a/mysql-test/suite/galera/t/galera_toi_ddl_nonconflicting.test
+++ b/mysql-test/suite/galera/t/galera_toi_ddl_nonconflicting.test
@@ -8,6 +8,8 @@
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
+--source include/wait_condition.inc
--send ALTER TABLE t1 ADD COLUMN f3 INTEGER; INSERT INTO t1 (f1, f2) VALUES (DEFAULT, 123);
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_toi_lock_shared.test b/mysql-test/suite/galera/t/galera_toi_lock_shared.test
index 6b7feec6031..566bc721926 100644
--- a/mysql-test/suite/galera/t/galera_toi_lock_shared.test
+++ b/mysql-test/suite/galera/t/galera_toi_lock_shared.test
@@ -10,17 +10,25 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--connection node_2
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1
--source include/wait_condition.inc
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=SHARED;
--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
INSERT INTO t1 VALUES (2, 2);
-SELECT COUNT(*) = 2 FROM t1;
+SELECT COUNT(*) AS EXPECT_2 FROM t1;
+SELECT * FROM t1;
--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 2 FROM t1
+--source include/wait_condition.inc
INSERT INTO t1 VALUES (3, 3);
-SELECT COUNT(*) = 3 FROM t1;
+SELECT COUNT(*) AS EXPECT_3 FROM t1;
+SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_toi_truncate.test b/mysql-test/suite/galera/t/galera_toi_truncate.test
index 5b23a8c3f3e..ab94d9397ce 100644
--- a/mysql-test/suite/galera/t/galera_toi_truncate.test
+++ b/mysql-test/suite/galera/t/galera_toi_truncate.test
@@ -6,6 +6,7 @@
--source include/galera_cluster.inc
--source include/have_debug_sync.inc
--source include/have_debug.inc
+--source include/galera_have_debug_sync.inc
#
# INSERT and TRUNCATE on different nodes
@@ -15,32 +16,51 @@
CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (id int not null primary key auto_increment, f1 INTEGER) ENGINE=InnoDB;
--connection node_2
+set session wsrep_sync_wait=0;
--let $wait_condition = SELECT COUNT(*) = 10 FROM ten;
--source include/wait_condition.inc
-# Prevent autocommit retring from masking the deadlock error we expect to get
-SET SESSION wsrep_retry_autocommit = 0;
---send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6, ten AS a7, ten AS a8
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---connection node_2a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Sending data%' AND INFO LIKE 'INSERT INTO t1 (f1)%';
---source include/wait_condition.inc
+# block applier before applying
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+
+--connection node_2
+--send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1
+
+--connection node_1b
+# wait until applier has reached the sync point
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
--connection node_1
-TRUNCATE TABLE t1;
+--send TRUNCATE TABLE t1;
+
+--connection node_1b
+# release the applier
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "";
+SET DEBUG_SYNC = "RESET";
+
+--connection node_1
+--reap
--connection node_2
---error ER_LOCK_DEADLOCK
--reap
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_0 FROM t1;
--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_0 FROM t1;
+--disconnect node_1b
+
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/galera_transaction_replay.test b/mysql-test/suite/galera/t/galera_transaction_replay.test
index 29870829ba3..655714f26c9 100644
--- a/mysql-test/suite/galera/t/galera_transaction_replay.test
+++ b/mysql-test/suite/galera/t/galera_transaction_replay.test
@@ -1,12 +1,25 @@
#
-# This test tests the operation of transaction replay. If a potentially conflicting remote transaction arrives at
-# just the right time during the commit of a local transaction, the local transaction will be aborted and replayed.
+# This test tests the operation of transaction replay. If a potentially
+# conflicting remote transaction arrives at just the right time during
+# the commit of a local transaction, the local transaction will be aborted
+# and replayed.
+#
+# Because the write set with higher sequence number cannot BF abort
+# the victim with lower sequence number, the conflicting remote transaction
+# must be executed first and must be allowed to proceed up to the apply
+# monitor before sending the COMMIT for the transaction to be replayed.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+######################################################################
+#
+# Scenario #1, the victim will have higher seqno and will be replayed
+#
+######################################################################
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
@@ -21,34 +34,123 @@ START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
-# Block the commit
+# Block the applier on node #1 and issue a conflicting update on node #2
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---let $galera_sync_point = commit_monitor_enter_sync
+SET SESSION wsrep_sync_wait=0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Block the commit, send the COMMIT and wait until it gets blocked
+
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
--connection node_1
---send COMMIT;
+--send COMMIT
-# Wait until commit is blocked
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Let the conflicting UPDATE proceed and wait until it hits abort_trx_end.
+# The victim transaction still sits in commit_monitor_master_sync_point.
+
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
-# Issue a conflicting update on node #2
+# Let the transactions proceed
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+
+# Commit succeeds
+--connection node_1
+--reap
+
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+# wsrep_local_replays has increased by 1
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--enable_query_log
+
--connection node_2
-UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+DROP TABLE t1;
+
+#########################################################################
+#
+# Scenario #2, the victim will have lower seqno and will not be replayed
+#
+#########################################################################
+
+--connection node_1
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+
+# Block the commit, send the COMMIT and wait until it gets blocked
+
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+--send COMMIT
-# Wait for both transactions to be blocked
--connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%';
---source include/wait_condition.inc
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
---source include/wait_condition.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+
+# Set sync point at the end of BF abort, issue a conflicting update
+# and wait for the conflicting update to hit the sync point.
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
-# Unblock the commit
--connection node_1a
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Let the transactions proceed
--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
# Commit succeeds
@@ -58,10 +160,10 @@ UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
-# wsrep_local_replays has increased by 1
+# wsrep_local_replays should have not increased
--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
--disable_query_log
---eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 0 AS wsrep_local_replays;
--enable_query_log
--connection node_2
@@ -70,55 +172,84 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
DROP TABLE t1;
-#echo "# test for PS replaying"
+########################################
#
# test replaying of prepared statements
#
+########################################
+
--connection node_1
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
CREATE TABLE t1 (i int primary key, j int) ENGINE=INNODB;
INSERT INTO t1 VALUES (1, 0), (3, 0);
SELECT * FROM t1;
-
+SET AUTOCOMMIT=ON;
PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0";
-# block the commit of PS
+
+# Block the applier on node #1 and issue a conflicting update on node #2
--connection node_1a
---let $galera_sync_point = commit_monitor_enter_sync
+SET SESSION wsrep_sync_wait=0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc
---connection node_1
---send EXECUTE stmt1;
+--connection node_2
+INSERT INTO t1 VALUES(2,2);
-# Wait until commit is blocked
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
-# Issue a conflicting update on node_2
---connection node_2
-#UPDATE t1 SET j=2;
-INSERT INTO t1 VALUES(2,2);
+# Block the commit, send the EXECUTE stmt1 and wait until it gets blocked
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
-# Wait until applying begins in node_1
---connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Write_rows_log_event::write_row%';
---source include/wait_condition.inc
+--connection node_1
+SET SESSION wsrep_sync_wait=0;
+--send EXECUTE stmt1
-# Unblock the PS commit
--connection node_1a
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
+
+# Let the conflicting INSERT proceed and wait until it hits abort_trx_end.
+# The victim transaction still sits in commit_monitor_master_sync_point.
+
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# Let the transactions proceed
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
# Commit succeeds
--connection node_1
--reap
+SET SESSION wsrep_sync_wait=7;
SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
--connection node_1
+# wsrep_local_replays has increased by 1
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--enable_query_log
+
DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_truncate.test b/mysql-test/suite/galera/t/galera_truncate.test
index f490943db7c..0000b430e45 100644
--- a/mysql-test/suite/galera/t/galera_truncate.test
+++ b/mysql-test/suite/galera/t/galera_truncate.test
@@ -3,8 +3,7 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
-
+--source include/have_perfschema.inc
#
# Simple case
#
@@ -57,6 +56,23 @@ TRUNCATE TABLE t4;
--connection node_2
SELECT AUTO_INCREMENT = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME IN ('t3', 't4');
+
+#
+# MDEV-24865 : Server crashes when truncate mysql user table
+#
+--connection node_1
+
+--error ER_NO_SUCH_TABLE
+TRUNCATE TABLE mysql.user;
+--error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.threads;
+--error ER_DBACCESS_DENIED_ERROR
+TRUNCATE TABLE information_schema.tables;
+TRUNCATE TABLE mysql.innodb_index_stats;
+--error ER_NO_SUCH_TABLE
+TRUNCATE TABLE foo.bar;
+TRUNCATE TABLE t1;
+
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
diff --git a/mysql-test/suite/galera/t/galera_unicode_pk.cnf b/mysql-test/suite/galera/t/galera_unicode_pk.cnf
new file mode 100644
index 00000000000..62cf1854032
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_unicode_pk.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=1
+
+[mysqld.2]
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_unicode_pk.test b/mysql-test/suite/galera/t/galera_unicode_pk.test
index 0d571f5cfd7..2da9b1b9b8a 100644
--- a/mysql-test/suite/galera/t/galera_unicode_pk.test
+++ b/mysql-test/suite/galera/t/galera_unicode_pk.test
@@ -5,6 +5,11 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--connection node_1
+# Mare sure both nodes are in the cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
CREATE TABLE t1 (
f1 VARCHAR(255) PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -12,6 +17,12 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES ('текÑÑ‚');
--connection node_2
+# Mare sure that DLL has replicated and insert has replicated
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1
+--source include/wait_condition.inc
+
SELECT f1 = 'текÑÑ‚' FROM t1;
#
diff --git a/mysql-test/suite/galera/t/galera_update_limit.cnf b/mysql-test/suite/galera/t/galera_update_limit.cnf
new file mode 100644
index 00000000000..62cf1854032
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_update_limit.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=1
+
+[mysqld.2]
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/galera_update_limit.test b/mysql-test/suite/galera/t/galera_update_limit.test
index baacf2a60b2..e2823bf7124 100644
--- a/mysql-test/suite/galera/t/galera_update_limit.test
+++ b/mysql-test/suite/galera/t/galera_update_limit.test
@@ -4,17 +4,16 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
#
# With a PK
#
--connection node_1
-CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
+CREATE TABLE ten (f1 INTEGER not null primary key) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 SELECT f1 FROM ten ORDER BY RAND();
--connection node_2
diff --git a/mysql-test/suite/galera/t/galera_var_cluster_address.test b/mysql-test/suite/galera/t/galera_var_cluster_address.test
index f8036537925..e25de0aeb21 100644
--- a/mysql-test/suite/galera/t/galera_var_cluster_address.test
+++ b/mysql-test/suite/galera/t/galera_var_cluster_address.test
@@ -19,8 +19,8 @@
SET GLOBAL wsrep_cluster_address = 'foo://';
# With wsrep_sync_wait, this returns an error
-#--error ER_LOCK_WAIT_TIMEOUT
-#SHOW STATUS;
+--error ER_LOCK_WAIT_TIMEOUT
+SHOW STATUS;
SET SESSION wsrep_sync_wait=0;
@@ -29,7 +29,7 @@ SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
# Must return 'OFF'
SHOW STATUS LIKE 'wsrep_ready';
-# Must return 'Non-primary'
+# Must return 'Disconnected'
SHOW STATUS LIKE 'wsrep_cluster_status';
# Must return 0 = 'Initialized'
@@ -49,10 +49,9 @@ SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VA
--connection node_2
--disable_query_log
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node2';
+--source include/galera_wait_ready.inc
--enable_query_log
---source include/wait_until_connected_again.inc
-
--connection node_1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
@@ -63,7 +62,7 @@ CALL mtr.add_suppression("Failed to initialize backend using 'foo");
CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo");
CALL mtr.add_suppression("gcs connect failed: Socket type not supported");
CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
-CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)");
+CALL mtr.add_suppression("gcs_caused\\(\\) returned -[0-9]+ \\(Software caused connection abort\\)");
CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110");
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
diff --git a/mysql-test/suite/galera/t/galera_var_cluster_conf_id.test b/mysql-test/suite/galera/t/galera_var_cluster_conf_id.test
new file mode 100644
index 00000000000..668ace297a8
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_cluster_conf_id.test
@@ -0,0 +1,9 @@
+--source include/galera_cluster.inc
+
+--connection node_1
+--replace_regex /18446744073709551/ERROR/ /[0-9]+/#/
+show status like 'wsrep_cluster_conf_id';
+
+--connection node_2
+--replace_regex /18446744073709551/ERROR/ /[0-9]+/#/
+show status like 'wsrep_cluster_conf_id';
diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
index f18069929f9..85f72e633dc 100644
--- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test
+++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
@@ -28,7 +28,7 @@ SET SESSION wsrep_sync_wait=0;
# Must return 'OFF'
SHOW STATUS LIKE 'wsrep_ready';
-# Must return 'Non-primary'
+# Must return 'Disconnected'
SHOW STATUS LIKE 'wsrep_cluster_status';
--error ER_UNKNOWN_COM_ERROR,1047
@@ -49,6 +49,7 @@ SET @@session.wsrep_dirty_reads=OFF;
--error ER_UNKNOWN_COM_ERROR,1047
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
+
SELECT 1;
USE information_schema;
@@ -61,6 +62,7 @@ SELECT COUNT(*) >= 10 FROM performance_schema.events_statements_history;
--eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved'
--enable_query_log
--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
--connection node_1
USE test;
@@ -68,8 +70,7 @@ SELECT * FROM t1;
# Cleanup
DROP TABLE t1;
+# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
---echo # End of test
-
diff --git a/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test b/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test
index 015f25abf2f..eec47507e3a 100644
--- a/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test
+++ b/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test
@@ -50,10 +50,14 @@ DROP TABLE t1, t2;
--echo #cleanup
--connection node_1
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--connection node_2
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.cnf b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.cnf
new file mode 100644
index 00000000000..545cc8147e0
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_debug=1
+
+[mysqld.2]
+wsrep_debug=1
diff --git a/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test
new file mode 100644
index 00000000000..5a00048a90e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test
@@ -0,0 +1,291 @@
+#
+# Test option wsrep_ignore_apply_errors
+#
+
+--source include/galera_cluster.inc
+
+
+#
+# Ignore reconciling DDL errors on node_2
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 1;
+
+# Drop table that does not exist
+--connection node_1
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+DROP TABLE t1;
+
+# Drop schema that does not exist
+SET GLOBAL wsrep_on = OFF;
+CREATE SCHEMA s1;
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+DROP SCHEMA s1;
+
+# Drop index that does not exist using DROP INDEX
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+DROP INDEX idx1 ON t1;
+DROP TABLE t1;
+
+# Drop index that does not exist using ALTER TABLE
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+ALTER TABLE t1 DROP INDEX idx1;
+DROP TABLE t1;
+
+# Drop column that does not exist
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+ALTER TABLE t1 DROP COLUMN f2;
+DROP TABLE t1;
+
+
+#
+# Ignore reconciling DML errors on node_2
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+
+# Delete row that does not exist
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+DELETE FROM t1 WHERE f1 = 1;
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_0 FROM t1;
+--connection node_2
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_0 FROM t1;
+
+DROP TABLE t1;
+
+# Delete row that does not exist in a multi statement transaction
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_1 FROM t1;
+--connection node_2
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_1 FROM t1;
+
+DROP TABLE t1;
+
+#
+# Multi-row delete where only one row does not exist
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+--source include/galera_wait_ready.inc
+--connection node_1
+DELETE FROM t1;
+
+SELECT COUNT(*) as expect_0 FROM t1;
+--connection node_2
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_0 FROM t1;
+DROP TABLE t1;
+
+#
+# Multi-statement delete where only one row does not exist
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+--source include/galera_wait_ready.inc
+
+--connection node_1
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+DELETE FROM t1 WHERE f1 = 4;
+DELETE FROM t1 WHERE f1 = 5;
+COMMIT;
+SET AUTOCOMMIT=ON;
+
+SELECT COUNT(*) as expect_0 FROM t1;
+--connection node_2
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_0 FROM t1;
+DROP TABLE t1;
+
+#
+# Multi-table delete
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 3 FROM t2;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM t2 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+--source include/galera_wait_ready.inc
+
+--connection node_1
+DELETE t1, t2 FROM t1 JOIN t2 WHERE t1.f1 = t2.f1;
+SELECT COUNT(*) as expect_0 FROM t1;
+
+--connection node_2
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_0 FROM t1;
+DROP TABLE t1,t2;
+
+#
+# Foreign keys
+#
+
+--connection node_1
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+INSERT INTO parent VALUES (1),(2),(3);
+CREATE TABLE child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE) ENGINE=INNODB;
+INSERT INTO child VALUES (1,1),(2,2),(3,3);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 3 FROM child;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM child WHERE parent_id = 2;
+SET SESSION wsrep_on = ON;
+--source include/galera_wait_ready.inc
+
+--connection node_1
+DELETE FROM parent;
+SELECT COUNT(*) as expect_0 FROM parent;
+SELECT COUNT(*) as expect_0 FROM child;
+
+--connection node_2
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--let $wait_condition = SELECT COUNT(*) = 0 FROM parent;
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 0 FROM child;
+--source include/wait_condition.inc
+SELECT COUNT(*) as expect_0 FROM parent;
+SELECT COUNT(*) as expect_0 FROM child;
+DROP TABLE child, parent;
+
+#
+# Ignore all DDL errors on node_2
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 4;
+
+# Create a table that already exists
+--connection node_2
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+--source include/galera_wait_ready.inc
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 INTEGER);
+DROP TABLE t1;
+
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+
+CALL mtr.add_suppression("Can't find record in 't.*'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query.");
diff --git a/mysql-test/suite/galera/t/galera_var_load_data_splitting.test b/mysql-test/suite/galera/t/galera_var_load_data_splitting.test
index 38dab0a981b..621cb69fc16 100644
--- a/mysql-test/suite/galera/t/galera_var_load_data_splitting.test
+++ b/mysql-test/suite/galera/t/galera_var_load_data_splitting.test
@@ -36,4 +36,7 @@ SELECT COUNT(*) = 95000 FROM t1;
--connection node_1
--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
+--connection node_2
+--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
+
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_log_bin.cnf b/mysql-test/suite/galera/t/galera_var_log_bin.cnf
index f7f17e3720a..30ccee2024e 100644
--- a/mysql-test/suite/galera/t/galera_var_log_bin.cnf
+++ b/mysql-test/suite/galera/t/galera_var_log_bin.cnf
@@ -3,3 +3,8 @@
[mysqld]
log-bin
+[mysqld.1]
+log-slave-updates
+
+[mysqld.2]
+log-slave-updates
diff --git a/mysql-test/suite/galera/t/galera_var_reject_queries.test b/mysql-test/suite/galera/t/galera_var_reject_queries.test
index aa31b94d6e0..60aabe9bc17 100644
--- a/mysql-test/suite/galera/t/galera_var_reject_queries.test
+++ b/mysql-test/suite/galera/t/galera_var_reject_queries.test
@@ -5,9 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
-call mtr.add_suppression("WSREP has not yet prepared node for application use");
-
-CREATE TABLE t1 (f1 INTEGER);
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) engine=innodb;
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
@@ -44,6 +42,6 @@ INSERT INTO t1 VALUES (1);
--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET GLOBAL wsrep_reject_queries = NONE;
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test b/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
index 90c786f0af0..acebe4cccdc 100644
--- a/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
+++ b/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test
@@ -80,8 +80,8 @@ DROP TABLE t1;
#
--connection node_1
-CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
-CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
@@ -136,14 +136,104 @@ DROP TABLE t2;
--echo # MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
--echo #
--connection node_1
-CREATE TABLE t1 (i INT) ENGINE=INNODB;
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
# This command should not get replicated.
SELECT * FROM t1;
DROP TABLE t1;
+#
+# Test prepared staments
+#
--connection node_1
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+
+PREPARE upd from 'update t1 set b = 100 where id = 5';
+PREPARE ins from 'insert into t1 values (11,11)';
+PREPARE del from 'delete from t1 where id = 4';
+PREPARE rep from 'replace into t1 values (12,12),(6,600)';
+
+EXECUTE upd;
+EXECUTE ins;
+EXECUTE del;
+EXECUTE rep;
+
+SELECT * FROM t1 ORDER BY id;
+
+--connection node_2
+SELECT * FROM t1 ORDER BY id;
+
+DROP TABLE t1;
+
+#
+# Test procedure
+#
+--connection node_1
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+
+DELIMITER |;
+CREATE PROCEDURE proc()
+BEGIN
+ UPDATE t1 set b = 100 WHERE id = 5;
+ INSERT INTO t1 VALUES (11,11);
+ DELETE FROM t1 WHERE id = 4;
+ REPLACE INTO t1 VALUES (12,12),(6,600);
+ COMMIT;
+END|
+DELIMITER ;|
+
+CALL proc();
+SELECT * FROM t1 ORDER BY id;
+
+--connection node_2
+SELECT * FROM t1 ORDER BY id;
+
+DROP PROCEDURE proc;
+DROP TABLE t1;
+
+#
+# Test trigger
+#
+--connection node_1
+CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM;
+CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT) ENGINE=MyISAM;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, NEW.b);
+CREATE TRIGGER tr2 BEFORE UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b),(NULL, NEW.b);
+CREATE TRIGGER tr3 BEFORE DELETE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b);
+
+INSERT INTO t1 VALUES (11,11);
+UPDATE t1 SET b = 200 WHERE id = 2;
+DELETE FROM t1 where id = 5;
+SELECT * FROM t1 ORDER BY id;
+SELECT * FROM t2 ORDER BY id;
+
+--connection node_2
+SELECT * FROM t1 ORDER BY id;
+SELECT * FROM t2 ORDER BY id;
+DROP TRIGGER tr1;
+DROP TRIGGER tr2;
+DROP TRIGGER tr3;
+DROP TABLE t1,t2;
+
+CREATE TABLE t1 (a INT, b INT, UNIQUE(a)) ENGINE=MyISAM;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a=1;
+SET GLOBAL wsrep_replicate_myisam=ON;
+INSERT INTO t1 (a,b) VALUES (10,20);
+
+--connection node_2
+SELECT * from t1;
+--connection node_1
+DROP TABLE t1;
+
+--disable_query_log
--eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig
+--enable_query_log
--connection node_2
+--disable_query_log
--eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig
+--enable_query_log
+
diff --git a/mysql-test/suite/galera/t/galera_var_retry_autocommit.test b/mysql-test/suite/galera/t/galera_var_retry_autocommit.test
index d12ae7936cb..bd10e448e06 100644
--- a/mysql-test/suite/galera/t/galera_var_retry_autocommit.test
+++ b/mysql-test/suite/galera/t/galera_var_retry_autocommit.test
@@ -18,11 +18,11 @@
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 0;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
--send INSERT INTO t1 (f1) VALUES (2)
--connection node_1a
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
@@ -30,7 +30,7 @@ TRUNCATE TABLE t1;
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
-SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
@@ -44,18 +44,19 @@ DROP TABLE t1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
---send INSERT INTO t1 (f1) VALUES (2)
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
+--send INSERT INTO t1 (f1) VALUES (3)
--connection node_1a
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
--connection node_1
+--error 0,ER_LOCK_DEADLOCK
--reap
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
@@ -70,29 +71,29 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 2';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 2';
---send INSERT INTO t1 VALUES (2);
+--send INSERT INTO t1 VALUES (4);
--connection node_1a
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
--connection node_1a
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
-SELECT COUNT(*) = 0 FROM t1;
-SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_rep';
+SELECT COUNT(*) FROM t1;
+SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
--connection node_1a
-SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) FROM t1;
--connection node_1
---error ER_LOCK_DEADLOCK
+--error 0,ER_LOCK_DEADLOCK
--reap
SET DEBUG_SYNC = 'RESET';
@@ -109,9 +110,9 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 64;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 64';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
---send INSERT INTO t1 VALUES (2)
+--send INSERT INTO t1 VALUES (5)
--disable_query_log
--disable_result_log
@@ -119,14 +120,14 @@ SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue E
while ($count)
{
--connection node_1a
- SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
--connection node_1a
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
- SELECT COUNT(*) = 1 FROM t1;
+ SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
--dec $count
@@ -135,8 +136,9 @@ while ($count)
--enable_query_log
--connection node_1
+--error 0,ER_LOCK_DEADLOCK
--reap
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.cnf b/mysql-test/suite/galera/t/galera_var_slave_threads.cnf
new file mode 100644
index 00000000000..889c81b4a0a
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+auto_increment_offset=1
+
+[mysqld.2]
+auto_increment_offset=2
diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test
index 87e9f6de0ce..4a2dd07098c 100644
--- a/mysql-test/suite/galera/t/galera_var_slave_threads.test
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test
@@ -8,6 +8,11 @@
--source include/have_innodb.inc
--source include/force_restart.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
--connection node_1
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
@@ -109,3 +114,8 @@ DROP TABLE t1;
--source include/wait_condition.inc
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+
+# Restore original auto_increment_offset values.
+--source include/auto_increment_offset_restore.inc
+
+--echo # End of tests
diff --git a/mysql-test/suite/galera/t/galera_var_trx_fragment_size.test b/mysql-test/suite/galera/t/galera_var_trx_fragment_size.test
new file mode 100644
index 00000000000..f19152f37f1
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_trx_fragment_size.test
@@ -0,0 +1,43 @@
+--source include/galera_cluster.inc
+
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET SESSION wsrep_trx_fragment_size=0;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET GLOBAL wsrep_trx_fragment_size=0;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET GLOBAL wsrep_trx_fragment_size=-1;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET SESSION wsrep_trx_fragment_size=-1;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET GLOBAL wsrep_trx_fragment_size=100;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET SESSION wsrep_trx_fragment_size=100;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+--error ER_WRONG_TYPE_FOR_VAR
+SET GLOBAL wsrep_trx_fragment_size='A';
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+--error ER_WRONG_TYPE_FOR_VAR
+SET SESSION wsrep_trx_fragment_size='A';
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+--error ER_WRONG_TYPE_FOR_VAR
+SET GLOBAL wsrep_trx_fragment_size=NULL;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+--error ER_WRONG_TYPE_FOR_VAR
+SET SESSION wsrep_trx_fragment_size=NULL;
+SHOW SESSION VARIABLES LIKE 'wsrep_trx_fragment_size';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_trx_fragment_size';
+SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
diff --git a/mysql-test/suite/galera/t/galera_var_wsrep_on_off.test b/mysql-test/suite/galera/t/galera_var_wsrep_on_off.test
index 783b78792e6..25acfe84591 100644
--- a/mysql-test/suite/galera/t/galera_var_wsrep_on_off.test
+++ b/mysql-test/suite/galera/t/galera_var_wsrep_on_off.test
@@ -30,3 +30,156 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3;
DROP TABLE t1;
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+#
+# Test that variable wsrep_on cannot be changed while in
+# active transaction.
+#
+
+--connection node_1
+START TRANSACTION;
+--error ER_CANT_DO_THIS_DURING_AN_TRANSACTION
+SET SESSION wsrep_on=OFF;
+--error ER_CANT_DO_THIS_DURING_AN_TRANSACTION
+SET GLOBAL wsrep_on=OFF;
+COMMIT;
+
+
+#
+# Test that @@global.wsrep_on does not affect the value of
+# @@session.wsrep_on of current sessions
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+--connection node_1a
+SET GLOBAL wsrep_on = OFF;
+
+--connection node_1
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
+INSERT INTO t1 VALUES (2);
+COMMIT;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 15;
+SELECT * FROM t1;
+
+--connection node_1a
+SET GLOBAL wsrep_on = ON;
+DROP TABLE t1;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+
+#
+# New connections inherit @@session.wsrep_on from @@global.wsrep_on
+#
+
+--connection node_1
+SET GLOBAL wsrep_on = OFF;
+
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+--connection node_1b
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
+CREATE TABLE t2 (f1 INTEGER);
+DROP TABLE t2;
+
+SET GLOBAL wsrep_on = ON;
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+
+--disconnect node_1b
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+--source include/wait_condition.inc
+
+
+#
+# Can't set @@session.wsrep_on = ON, while @@global.wsrep_on = OFF
+#
+
+--connection node_1
+SET GLOBAL wsrep_on = OFF;
+--error ER_WRONG_ARGUMENTS
+SET SESSION wsrep_on = ON;
+
+SET GLOBAL wsrep_on = ON;
+SET SESSION wsrep_on = ON;
+
+
+#
+# @@global.wsrep_on = OFF followed by @@global.wsrep_on = ON
+# in a new connection
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET GLOBAL wsrep_on = OFF;
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+--connection node_1b
+SHOW SESSION VARIABLES LIKE 'wsrep_on';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
+SET GLOBAL wsrep_on = ON;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+COMMIT;
+
+SELECT * FROM t1;
+
+--connection node_2
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+#
+# Test single statement, multi statement, and
+# TOI tansactions while @@session.wsrep_on = OFF
+# and then same @@global.wsrep_on = OFF.
+# Notice, the combination @@global.wsrep_on = OFF
+# and @@session.wsrep_on = ON is not not possible,
+# (as tested above in this test case)
+#
+
+--connection node_1
+SET SESSION wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+DROP TABLE t1;
+--connection node_2
+SHOW TABLES;
+--connection node_1
+SET SESSION wsrep_on = ON;
+
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+START TRANSACTION;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+--connection node_2
+SHOW TABLES;
+--connection node_1
+DROP TABLE t1;
+SET GLOBAL wsrep_on = ON;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
diff --git a/mysql-test/suite/galera/t/galera_var_wsrep_provider_options.test b/mysql-test/suite/galera/t/galera_var_wsrep_provider_options.test
new file mode 100644
index 00000000000..3dc2cbaa7d6
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_wsrep_provider_options.test
@@ -0,0 +1,11 @@
+--source include/galera_cluster.inc
+
+call mtr.add_suppression("WSREP: Unknown parameter 'a'");
+call mtr.add_suppression("WSREP: Set options returned 7");
+
+--error ER_WRONG_ARGUMENTS
+SET GLOBAL wsrep_provider_options=NULL;
+SET GLOBAL wsrep_provider_options='';
+SET GLOBAL wsrep_provider_options=' ';
+--error ER_WRONG_ARGUMENTS
+SET GLOBAL wsrep_provider_options='a=1';
diff --git a/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test
new file mode 100644
index 00000000000..43fd09b902c
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test
@@ -0,0 +1,76 @@
+--source include/galera_cluster.inc
+
+--echo #
+--echo # wsrep_start_position
+--echo #
+
+CALL mtr.add_suppression("WSREP: SST failed for position .*");
+
+SET @wsrep_start_position_global_saved = @@global.wsrep_start_position;
+--echo # default
+SELECT @@global.wsrep_start_position;
+
+--echo
+--echo # scope
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.wsrep_start_position;
+SELECT @@global.wsrep_start_position;
+
+--echo
+--echo # valid values
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1';
+SELECT @@global.wsrep_start_position;
+
+--echo
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0';
+SELECT @@global.wsrep_start_position;
+--echo # invalid values
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2A';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0A';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='12345678-1234-123-12345-123456789012:0';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:_99999';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:a';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='OFF';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position=ON;
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='';
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position=NULL;
+SELECT @@global.wsrep_start_position;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_start_position='junk';
+SELECT @@global.wsrep_start_position;
+
+--echo
+--echo # restore the initial value
+SET @@global.wsrep_start_position = @wsrep_start_position_global_saved;
+
+--echo # End of test
diff --git a/mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt b/mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt
new file mode 100644
index 00000000000..beae84b3862
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt
@@ -0,0 +1 @@
+--log-bin
diff --git a/mysql-test/suite/galera/t/galera_wan_restart_sst.test b/mysql-test/suite/galera/t/galera_wan_restart_sst.test
index 2048977b4ef..7a8c0df4946 100644
--- a/mysql-test/suite/galera/t/galera_wan_restart_sst.test
+++ b/mysql-test/suite/galera/t/galera_wan_restart_sst.test
@@ -10,7 +10,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/force_restart.inc
+--source include/have_innodb.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
@@ -49,9 +49,6 @@ INSERT INTO t1 VALUES (13);
--source include/kill_galera.inc
--connection node_1
---source include/wait_until_connected_again.inc
---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
INSERT INTO t1 VALUES (11);
--connection node_2
@@ -62,10 +59,6 @@ INSERT INTO t1 VALUES (14);
--connection node_3
--source include/start_mysqld.inc
---source include/wait_until_connected_again.inc
-
---let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
INSERT INTO t1 VALUES (131);
@@ -79,10 +72,6 @@ INSERT INTO t1 VALUES (22);
--source include/kill_galera.inc
--connection node_1
---source include/wait_until_connected_again.inc
---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
-
INSERT INTO t1 VALUES (21);
--connection node_3
@@ -93,9 +82,6 @@ INSERT INTO t1 VALUES (24);
--connection node_2
--source include/start_mysqld.inc
---source include/wait_until_connected_again.inc
---let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
INSERT INTO t1 VALUES (221);
@@ -109,9 +95,6 @@ INSERT INTO t1 VALUES (34);
--source include/kill_galera.inc
--connection node_1
---source include/wait_until_connected_again.inc
---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
INSERT INTO t1 VALUES (31);
--connection node_2
@@ -122,9 +105,6 @@ INSERT INTO t1 VALUES (33);
--connection node_4
--source include/start_mysqld.inc
---source include/wait_until_connected_again.inc
---let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
INSERT INTO t1 VALUES (341);
@@ -139,15 +119,15 @@ INSERT INTO t1 VALUES (341);
SELECT COUNT(*) AS EXPECT_19 FROM t1;
--connection node_2
-SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT COUNT(*) AS EXPECT_19 FROM t1;
--connection node_3
-SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT COUNT(*) AS EXPECT_19 FROM t1;
--connection node_4
-SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT COUNT(*) AS EXPECT_19 FROM t1;
--connection node_1
@@ -156,6 +136,7 @@ CALL mtr.add_suppression("There are no nodes in the same segment that will ever
CALL mtr.add_suppression("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
--connection node_2
+CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
--connection node_3
@@ -163,6 +144,7 @@ CALL mtr.add_suppression("There are no nodes in the same segment that will ever
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
--connection node_4
+CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
# Restore original auto_increment_offset values.
diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
index 422759ece59..84b6c032fc6 100644
--- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
+++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
@@ -5,7 +5,6 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test b/mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test
deleted file mode 100644
index 7f91495fcc4..00000000000
--- a/mysql-test/suite/galera/t/galera_wsrep_provider_unset_set.test
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Test that wsrep_provider can be unset and then set back to its original value
-# and replication will continue except for any updates made while the value was 'none'
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
-
-# Save original auto_increment_offset values.
---let $node_1=node_1
---let $node_2=node_2
---source include/auto_increment_offset_save.inc
-
---connection node_1
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-
---connection node_2
---let $wsrep_provider_orig = `SELECT @@wsrep_provider`
---let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
-
-SET GLOBAL wsrep_provider='none';
-INSERT INTO t1 VALUES (2);
-
---connection node_1
-INSERT INTO t1 VALUES (3);
-
---connection node_2
---disable_query_log
---eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
---enable_query_log
-
-SET SESSION wsrep_sync_wait = 0;
-
---source include/wait_until_connected_again.inc
---source include/galera_wait_ready.inc
-
-INSERT INTO t1 VALUES (4);
-
-# Node #2 has all the inserts
-SELECT COUNT(*) = 4 FROM t1;
-
---connection node_1
-# Node #1 is missing the insert made while Node #2 was not replicated
-SELECT COUNT(*) = 3 FROM t1;
-
-DROP TABLE t1;
-
---source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/mdev_10518.test b/mysql-test/suite/galera/t/mdev_10518.test
index 015f25abf2f..eec47507e3a 100644
--- a/mysql-test/suite/galera/t/mdev_10518.test
+++ b/mysql-test/suite/galera/t/mdev_10518.test
@@ -50,10 +50,14 @@ DROP TABLE t1, t2;
--echo #cleanup
--connection node_1
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--connection node_2
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera/t/mdev_18730.test b/mysql-test/suite/galera/t/mdev_18730.test
new file mode 100644
index 00000000000..e32bae68ce9
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_18730.test
@@ -0,0 +1,71 @@
+#
+# Test scenario:
+#
+# Run an autocommit INSERT and stop the execution after the INSERT
+# has released commit order critical section. On another connection,
+# run SR transaction which will store one fragment into streaming log.
+# If the bug is present, the fragment streaming log commit may
+# out of order, and completing INSERT may cause assertion in debug build.
+#
+# Note that due to nature of this bug, it is may not be possible
+# to construct fully deterministic test case which will crash the
+# server each time if the bug is present, but will work with fix.
+#
+
+--source include/galera_cluster.inc
+--source include/have_log_bin.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+
+# Control connection for controlling node_1 debug sync points
+--let $galera_connection_name = ctrl
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+# Another connection for SR transaction
+--let $galera_connection_name = node_1_sr
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+# Set up sync point and send INSERT
+--connection node_1
+SET DEBUG_SYNC = "wsrep_after_commit_order_leave SIGNAL acol_reached WAIT_FOR acol_continue";
+--send INSERT INTO t1 VALUES (1)
+
+# Wait until INSERT releases commit order
+--connection ctrl
+SET DEBUG_SYNC = "now WAIT_FOR acol_reached";
+
+# Streaming transaction, will replicate fragment for each row separately.
+--connection node_1_sr
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_unit = 'rows';
+SET SESSION wsrep_trx_fragment_size = 1;
+
+START TRANSACTION;
+--send INSERT INTO t1 VALUES (2)
+
+--connection ctrl
+# Now let the thread node_1 continue after a one second sleep.
+# The sleep while not completely deterministic, will allow the SR
+# insert to complete the commit out of order in most of the cases if
+# the bug is present, leading to assertion in debug build.
+--sleep 1
+SET DEBUG_SYNC = "now SIGNAL acol_continue";
+
+--connection node_1
+--reap
+--connection node_1_sr
+--reap
+ROLLBACK;
+
+--connection ctrl
+SET DEBUG_SYNC = "RESET";
+--disconnect ctrl
+--disconnect node_1_sr
+
+--connection node_1
+DROP TABLE t1;
+
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/mdev_21025.test b/mysql-test/suite/galera/t/mdev_21025.test
new file mode 100644
index 00000000000..5179b0639ef
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_21025.test
@@ -0,0 +1,22 @@
+#
+# MDEV-21205
+#
+# Start transaction after INSERT IGNORE which had no effect and
+# kept the transaction open caused an assertion on the following
+# START TRANSACTION because the empty transaction was not properly
+# terminated.
+#
+
+--source include/galera_cluster.inc
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+
+START TRANSACTION;
+# This INSERT succeeds with duplicate key warning due to IGNORE clause
+# and keeps the transaction open. The following START TRANSACTION causes
+# an assertion if the bug is present.
+INSERT IGNORE INTO t1 (f1) VALUES (1);
+START TRANSACTION;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/mdev_21718.cnf b/mysql-test/suite/galera/t/mdev_21718.cnf
new file mode 100644
index 00000000000..9e066597a13
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_21718.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+thread-handling=pool-of-threads
diff --git a/mysql-test/suite/galera/t/mdev_21718.test b/mysql-test/suite/galera/t/mdev_21718.test
new file mode 100644
index 00000000000..3fbc4e773d5
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_21718.test
@@ -0,0 +1,35 @@
+#
+# MDEV-21718 Reproduce a case where BF abort after
+# client session acquires the ownership but before calls
+# before_command() causes an assertion in wsrep-lib.
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+
+--let $galera_connection_name = node_1_ctrl
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+--connection node_1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SET DEBUG_SYNC = "wsrep_before_before_command SIGNAL reached WAIT_FOR continue";
+--send COMMIT
+
+--connection node_1_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR reached";
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+# BF abort wakes up node_1 from sync wait.
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+DROP TABLE t1;
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#198.cnf b/mysql-test/suite/galera/t/mysql-wsrep#198.cnf
new file mode 100644
index 00000000000..d599f3940e4
--- /dev/null
+++ b/mysql-test/suite/galera/t/mysql-wsrep#198.cnf
@@ -0,0 +1,9 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+log-bin
+wsrep-debug=1
+
+[mysqld.1]
+log-bin
+wsrep-debug=1
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#198.test b/mysql-test/suite/galera/t/mysql-wsrep#198.test
index a80d030a8b0..a8190f2ae61 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#198.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#198.test
@@ -1,5 +1,6 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/force_restart.inc
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#237.test b/mysql-test/suite/galera/t/mysql-wsrep#237.test
index cba8dfeb275..174266bdbc5 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#237.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#237.test
@@ -7,13 +7,13 @@
CREATE TABLE t (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
--connection node_1
-SET DEBUG_SYNC = 'wsrep_before_replication WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue';
--send INSERT INTO t values (1);
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
SET SESSION wsrep_sync_wait = 0;
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: wsrep_before_replication'
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: wsrep_before_certification'
--source include/wait_condition.inc
--connection node_2
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#33.test b/mysql-test/suite/galera/t/mysql-wsrep#33.test
index 351e457f165..a67336cc67e 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#33.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#33.test
@@ -6,15 +6,23 @@
--let $node_1=node_1
--let $node_2=node_2
--source suite/galera/include/auto_increment_offset_save.inc
+
--source suite/galera/include/galera_sst_set_mysqldump.inc
--source suite/galera/include/galera_st_disconnect_slave.inc
---source suite/galera/include/galera_sst_restore.inc
+--source suite/galera/include/galera_st_shutdown_slave.inc
+--source suite/galera/include/galera_st_clean_slave.inc
+--source suite/galera/include/galera_st_kill_slave.inc
+--source suite/galera/include/galera_st_kill_slave_ddl.inc
--connection node_2
---echo Restarting server ...
---source include/restart_mysqld.inc
-
--source suite/galera/include/auto_increment_offset_restore.inc
+--source suite/galera/include/galera_sst_restore.inc
+
+# We have to manually restore global_log and slow_query_log due to mysql-wsrep#108
+# Otherwise MTR's check_testcases complains
+
+SET GLOBAL general_log = ON;
+SET GLOBAL slow_query_log = ON;
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#332.test b/mysql-test/suite/galera/t/mysql-wsrep#332.test
index 2da01ba900e..e216dfe79d4 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#332.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#332.test
@@ -1,7 +1,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
# Open connection node_1a here, MW-369.inc will use it later
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
@@ -111,3 +111,4 @@ SELECT * FROM c;
DROP TABLE c;
DROP TABLE p1;
DROP TABLE p2;
+
diff --git a/mysql-test/suite/galera/t/mysql-wsrep-bugs-607.test b/mysql-test/suite/galera/t/mysql-wsrep-bugs-607.test
new file mode 100644
index 00000000000..c24ec7911e2
--- /dev/null
+++ b/mysql-test/suite/galera/t/mysql-wsrep-bugs-607.test
@@ -0,0 +1,70 @@
+--source include/galera_cluster.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+--source include/have_log_bin.inc
+
+#
+# Test case to stress the order of wsrep XID checkpointing.
+#
+# In buggy version, the transaction which failed certification can
+# rush to record wsrep XID checkpoint before the offending applier,
+# causing assert in innodb sys header update routine
+#
+
+--echo #
+--echo # test the order of wsrep XID storage after certifiation failure
+--echo #
+
+--connection node_1
+set session wsrep_sync_wait=0;
+
+create table t1 (i int primary key, j int);
+
+insert into t1 values (4, 0);
+
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2b
+set session wsrep_sync_wait=0;
+# wait for the last insert to be replicated from node 1
+--let $wait_condition = SELECT COUNT(*) = 1 FROM test.t1;
+--source include/wait_condition.inc
+
+# block applier before applying
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
+
+# send update from node 1, it will pause in the sync point
+--connection node_1
+UPDATE test.t1 set j=1 where i=4;
+
+--connection node_2b
+# wait until applier has reached the sync point
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+# look number of cert failures so far, and expect one more to happen
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+# Inject a conflicting update in node 2, it should fail in certification
+--connection node_2
+set session wsrep_sync_wait=0;
+set session wsrep_retry_autocommit=0;
+--send UPDATE test.t1 SET j=2 WHERE i=4
+
+--connection node_2b
+# wait until the update has hit certification failure
+
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+# release the applier
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+SET GLOBAL debug_dbug = "";
+SET DEBUG_SYNC = "RESET";
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+--reap
+select * from t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/partition.test b/mysql-test/suite/galera/t/partition.test
index 0159ef8f607..13e09a4e3e6 100644
--- a/mysql-test/suite/galera/t/partition.test
+++ b/mysql-test/suite/galera/t/partition.test
@@ -134,9 +134,12 @@ CREATE TABLE t1 (pk INT PRIMARY KEY)
SELECT COUNT(*) FROM t1;
-# LOAD-ing 20002 rows causes 3 commits to be registered
+# LOAD-ing 20002 rows causes
+# 3 commits to be registered when the Galera library does not support streaming replication and
+# 5 commits to be registered when the Galera library supports streaming replication
--disable_query_log
---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 3 AS wsrep_last_committed_diff;
+--replace_result 3 AS_EXPECTED_3_or_5 5 AS_EXPECTED_3_or_5
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
DROP TABLE t1;
@@ -167,7 +170,7 @@ SELECT COUNT(*) FROM t1;
# LOAD-ing 101 rows causes 1 commit to be registered
--disable_query_log
---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
DROP TABLE t1;
@@ -196,9 +199,12 @@ CREATE TABLE t1 (pk INT PRIMARY KEY)
--source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
-# LOAD-ing 20002 rows causes 1 commit to be registered
+# LOAD-ing 20002 rows causes
+# 1 commit to be registered when the Galera library does not support streaming replication and
+# 2 commits to be registered when the Galera library supports streaming replication
--disable_query_log
---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
+--replace_result 1 AS_EXPECTED_1_or_2 2 AS_EXPECTED_1_or_2
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/pxc-421.test b/mysql-test/suite/galera/t/pxc-421.test
deleted file mode 100644
index 33a2b157f18..00000000000
--- a/mysql-test/suite/galera/t/pxc-421.test
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# PXC-421: Test deadlock involving updates of
-# wsrep_provider, wsrep_cluster_address and wsrep_slave_threads.
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
-
-# Save original auto_increment_offset values.
---let $node_1=node_1
---let $node_2=node_2
---source include/auto_increment_offset_save.inc
-
---connection node_1
---let $wsrep_slave_1 = `SELECT @@wsrep_slave_threads`
-set GLOBAL wsrep_slave_threads=26;
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t1 (f1) SELECT * from t1 as x1;
-
---connection node_2
---let $wsrep_slave_2 = `SELECT @@wsrep_slave_threads`
-set GLOBAL wsrep_slave_threads=16;
---let $wsrep_provider_orig = `SELECT @@wsrep_provider`
---let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
-
-SET GLOBAL wsrep_provider='none';
-INSERT INTO t1 VALUES (2);
-
---connection node_1
-INSERT INTO t1 VALUES (3);
-
---connection node_2
---disable_query_log
---eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
---enable_query_log
-
---source include/wait_until_connected_again.inc
-
-INSERT INTO t1 VALUES (4);
-set GLOBAL wsrep_slave_threads=5;
-
-# Node #2 has all the inserts
-SELECT COUNT(*) = 5 FROM t1;
-
---connection node_1
-set GLOBAL wsrep_slave_threads=12;
-# Node #1 is missing the insert made while Node #2 was not replicated
-SELECT COUNT(*) = 4 FROM t1;
-INSERT INTO t1 VALUES (100), (101), (102);
-
---connection node_2
-set GLOBAL wsrep_slave_threads=5;
-INSERT INTO t1 (f1) SELECT * from t1 as x1;
-show global variables like 'wsrep_slave_threads';
---eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_2
-SELECT COUNT(*) FROM t1;
-
---connection node_1
-SELECT COUNT(*) FROM t1;
-show global variables like 'wsrep_slave_threads';
---eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_1
-DROP TABLE t1;
-
---source include/auto_increment_offset_restore.inc
-
diff --git a/mysql-test/suite/galera/t/rpl_row_annotate.test b/mysql-test/suite/galera/t/rpl_row_annotate.test
index b1cfdb36639..0ec30829982 100644
--- a/mysql-test/suite/galera/t/rpl_row_annotate.test
+++ b/mysql-test/suite/galera/t/rpl_row_annotate.test
@@ -3,11 +3,15 @@
--echo # On node_2
--connection node_2
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
--echo # On node_1
--connection node_1
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
CREATE TABLE t1(i INT)ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
DELETE FROM t1 WHERE i = 1;
@@ -38,5 +42,4 @@ let $start_pos= `select @binlog_start_pos`;
# Cleanup
DROP TABLE t1;
---source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera/t/versioning_trx_id.test b/mysql-test/suite/galera/t/versioning_trx_id.test
index 175ead265a5..017379c32c4 100644
--- a/mysql-test/suite/galera/t/versioning_trx_id.test
+++ b/mysql-test/suite/galera/t/versioning_trx_id.test
@@ -1,5 +1,7 @@
--source include/galera_cluster.inc
+call mtr.add_suppression("Sending JOIN failed:.*");
+
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_1
@@ -7,22 +9,34 @@ create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row
insert into t1 (a) values (1),(2);
--connection node_2
+set session wsrep_sync_wait=15;
insert into t1 (a) values (3),(4);
select a from t1;
select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0';
+if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp`) {
+ select * from mysql.transaction_registry;
+}
select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
--connection node_3
+set session wsrep_sync_wait=15;
insert into t1 (a) values (5),(6);
select a from t1;
select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0';
+if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp`) {
+ select * from mysql.transaction_registry;
+}
select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
--connection node_1
+set session wsrep_sync_wait=15;
select a from t1;
select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0';
+if (`SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp`) {
+ select * from mysql.transaction_registry;
+}
select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
drop table t1;
---source include/galera_end.inc
+--disconnect node_3
diff --git a/mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test b/mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test
new file mode 100644
index 00000000000..a970cc09afc
--- /dev/null
+++ b/mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test
@@ -0,0 +1,22 @@
+-- source include/galera_cluster.inc
+
+-- let $sr = `SELECT variable_value LIKE '%:STREAMING:%' FROM information_schema.session_status WHERE variable_name = 'wsrep_provider_capabilities'`
+
+if (!$sr)
+{
+ -- skip The test requires a wsrep provider that supports streaming replication.
+}
+
+SELECT variable_value FROM information_schema.session_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+
+SET SESSION wsrep_trx_fragment_size = 0;
+SET SESSION wsrep_trx_fragment_size = 123;
+
+SELECT variable_value FROM information_schema.global_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+
+SET GLOBAL wsrep_trx_fragment_size = 0;
+SET GLOBAL wsrep_trx_fragment_size = 123;
+
+SET GLOBAL wsrep_trx_fragment_size = default;
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index bbeddc8dcd8..a45e856d519 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -11,6 +11,7 @@
##############################################################################
GAL-501 : MDEV-24645 galera_3nodes.GAL-501 MTR failed: failed to open gcomm backend connection: 110
+galera_2_cluster : MDEV-22195 temporarily disabled due to issues to be fixed with MDEV-22195
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query
diff --git a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
index 9a8b75006a9..9f99adbd711 100644
--- a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
@@ -2,7 +2,8 @@
!include include/default_mysqld.cnf
[mysqld]
-log-bin
+loose-innodb
+log-bin=mysqld-bin
log-slave-updates
binlog-format=row
innodb-autoinc-lock-mode=2
@@ -11,84 +12,73 @@ wsrep_gtid_mode=1
gtid_ignore_duplicates
auto_increment_increment=3
-wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
# enforce read-committed characteristics across the cluster
# wsrep-causal-reads=ON
-# wsrep-sync-wait=15
+wsrep-sync-wait=15
[mysqld.1]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-wsrep-cluster-address='gcomm://'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
+wsrep_cluster_address=gcomm://
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
[mysqld.2]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
[mysqld.3]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
[mysqld.4]
-wsrep_cluster_name=cluster2
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-
-wsrep-cluster-address='gcomm://'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port
+wsrep_cluster_address='gcomm://
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
[mysqld.5]
-wsrep_cluster_name=cluster2
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.5.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.5.#sst_port
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.5.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.5.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.5.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.5.#sst_port'
[mysqld.6]
-wsrep_cluster_name=cluster2
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.6.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.6.#sst_port
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.6.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.6.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.6.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.6.#sst_port'
diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
index 09267cdbb1e..a7dd4d21bc7 100644
--- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
@@ -2,49 +2,46 @@
!include include/default_mysqld.cnf
[mysqld]
+loose-innodb
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
auto_increment_increment=3
-wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
# enforce read-committed characteristics across the cluster
-wsrep-causal-reads=ON
+# wsrep-causal-reads=ON
wsrep-sync-wait=15
[mysqld.1]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-wsrep-cluster-address='gcomm://'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
+wsrep_cluster_address=gcomm://
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
[mysqld.2]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
[mysqld.3]
+wsrep-on=1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
-
-wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
diff --git a/mysql-test/include/galera_resume.inc b/mysql-test/suite/galera_3nodes/include/galera_resume.inc
index af8f2b956fd..af8f2b956fd 100644
--- a/mysql-test/include/galera_resume.inc
+++ b/mysql-test/suite/galera_3nodes/include/galera_resume.inc
diff --git a/mysql-test/suite/galera_3nodes/include/have_garbd.inc b/mysql-test/suite/galera_3nodes/include/have_garbd.inc
new file mode 100644
index 00000000000..560372c22e9
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/include/have_garbd.inc
@@ -0,0 +1,3 @@
+if (!$MTR_GARBD_EXE) {
+ skip Needs garbd;
+}
diff --git a/mysql-test/suite/galera_3nodes/r/GAL-501.result b/mysql-test/suite/galera_3nodes/r/GAL-501.result
index 4ddf3b2bce6..850fb6f3f78 100644
--- a/mysql-test/suite/galera_3nodes/r/GAL-501.result
+++ b/mysql-test/suite/galera_3nodes/r/GAL-501.result
@@ -1,3 +1,6 @@
+connection node_2;
+connection node_1;
+connection node_3;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_2_cluster.result b/mysql-test/suite/galera_3nodes/r/galera_2_cluster.result
new file mode 100644
index 00000000000..87898891f9b
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_2_cluster.result
@@ -0,0 +1,89 @@
+connection node_2;
+connection node_1;
+connect node_5, 127.0.0.1, root, , test, $NODE_MYPORT_5;
+connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
+connection node_4;
+CHANGE MASTER TO master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos;;
+START SLAVE;
+include/wait_for_slave_to_start.inc
+connection node_1;
+CREATE TABLE t1(c1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 INTEGER);
+INSERT INTO t1(c2) VALUES(1);
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_1;
+include/save_master_gtid.inc
+connection node_4;
+include/sync_with_master_gtid.inc
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connect node_6, 127.0.0.1, root, , test, $NODE_MYPORT_6;
+connection node_6;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_2;
+ALTER TABLE t1 ADD COLUMN t3 INTEGER;
+Node 2 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+COUNT(*) = 3
+1
+connection node_3;
+Node 3 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+COUNT(*) = 3
+1
+connection node_1;
+include/save_master_gtid.inc
+connection node_4;
+include/sync_with_master_gtid.inc
+Node 4 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+COUNT(*) = 3
+1
+connection node_6;
+Node 6 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+COUNT(*) = 3
+1
+connection node_2;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+connection node_1;
+connection node_4;
+connection node_6;
+connection node_1;
+DROP TABLE t1;
+connection node_4;
+STOP SLAVE;
+RESET SLAVE;
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+SET GLOBAL GTID_SLAVE_POS="";
+connection node_1;
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+connection node_2;
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+connection node_3;
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+connection node_5;
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+connection node_6;
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result b/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result
index b1bbb1406a1..6393a30da6f 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_3;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result
index e1528c6f74f..d43b42bec45 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
@@ -11,6 +13,7 @@ connection node_3;
INSERT INTO t2 VALUES (1);
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_3;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
index 34ef5b00033..b1332a5f87c 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_3;
@@ -23,10 +25,10 @@ SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-Resuming node ...
connection node_3;
-CALL mtr.add_suppression("WSREP: gcs_caused.*");
-CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg.*");
+Resuming node ...
+CALL mtr.add_suppression("WSREP: gcs_caused");
+CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg");
SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) FROM t1;
COUNT(*)
diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd.result b/mysql-test/suite/galera_3nodes/r/galera_garbd.result
index fb7e729dc77..ebc5fdf33f4 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_garbd.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_garbd.result
@@ -1,3 +1,7 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
connection node_1;
connection node_2;
connection node_3;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result b/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result
index f176ef1dd7f..4a5e9a4530c 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_1;
connection node_2;
@@ -31,8 +33,6 @@ DROP TABLE ten;
Restarting node #3 to satisfy MTR's end-of-test checks
connection node_3;
connection node_1;
-SET GLOBAL innodb_max_dirty_pages_pct = 75.000000;
-SET GLOBAL innodb_max_dirty_pages_pct_lwm = 0.000000;
connection node_1;
CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)");
connection node_2;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result b/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
index 43064cf6441..afb94d493c4 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
cluster 1 node 1
SHOW STATUS LIKE 'wsrep_cluster_size';
@@ -86,7 +88,7 @@ cluster 1 node 2
connection node_2;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2
+1-11-2,2-21-1
insert into t1 values (1, 12, 3);
select @@gtid_binlog_state;
@@gtid_binlog_state
@@ -100,7 +102,7 @@ cluster 1 node 3
connection node_3;
select @@gtid_binlog_state;
@@gtid_binlog_state
-1-11-2,2-21-1
+1-11-2,1-12-3,2-21-1
insert into t1 values (1, 13, 4);
select @@gtid_binlog_state;
@@gtid_binlog_state
@@ -146,24 +148,40 @@ select @@gtid_binlog_state;
drop table t1;
stop slave;
reset slave;
+cluster 2 node 1
+connection node_4;
+stop slave;
+reset slave;
+cluster 1 node 1
+connection node_1;
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
cluster 2 node 1
connection node_4;
-stop slave;
-reset slave;
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
connection node_2;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_3;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_5;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_6;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
connection node_1;
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_6, master_use_gtid=current_pos, ignore_server_ids=(12,13);;
start slave;
@@ -186,7 +204,7 @@ select @@gtid_slave_pos;
cluster 1 node 1
connection node_1;
-create table t1 (cluster_domain_id int not null,node_server_id int not null, seq_no int not null, primary key(cluster_domain_id, node_server_id,seq_no)) engine=innodb;
+create table t1 (cluster_domain_id int ,node_server_id int, seq_no int);
insert into t1 values (1, 11, 2);
select @@gtid_binlog_state;
@@gtid_binlog_state
@@ -275,27 +293,31 @@ select @@gtid_binlog_state;
drop table t1;
stop slave;
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
cluster 2 node 1
connection node_4;
stop slave;
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
connection node_2;
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
+set global wsrep_on=ON;
connection node_3;
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
+set global wsrep_on=ON;
connection node_5;
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
+set global wsrep_on=ON;
connection node_6;
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
+set global wsrep_on=ON;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result
index 21403542ebe..9a96addbf57 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
index 9a7a2eac18e..182fb1af51e 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result
index 512bb5c8c78..934218492d6 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'");
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
connection node_1;
@@ -33,5 +35,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
connection node_2;
CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort");
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result
index 4ddf3b2bce6..27cbd7dbe55 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
index 4ddf3b2bce6..27cbd7dbe55 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result
index 996363a1ea8..9f1d3fec16e 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_3;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result
index a7234aa9778..a60e2bbb6cc 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (pk INT PRIMARY KEY, node INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1, 1);
diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result
index e3ca22ef01e..7e75bc4b08a 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (pk INT PRIMARY KEY, node INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1, 1);
diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result
index c37b8837900..ea10edfc62c 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (pk INT PRIMARY KEY, node INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1, 1);
diff --git a/mysql-test/suite/galera_3nodes/r/galera_load_data_ist.result b/mysql-test/suite/galera_3nodes/r/galera_load_data_ist.result
deleted file mode 100644
index cfb897e1076..00000000000
--- a/mysql-test/suite/galera_3nodes/r/galera_load_data_ist.result
+++ /dev/null
@@ -1,36 +0,0 @@
-connection node_1;
-connection node_2;
-connection node_3;
-connection node_1;
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
-connection node_2;
-connection node_3;
-SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
-SET SESSION wsrep_on = OFF;
-SET SESSION wsrep_on = ON;
-SET SESSION wsrep_sync_wait = 0;
-connection node_2a;
-SET SESSION wsrep_sync_wait = 0;
-connection node_2;
-SET GLOBAL wsrep_load_data_splitting = TRUE;
-SET DEBUG_SYNC='intermediate_transaction_commit SIGNAL commited WAIT_FOR ist';
-connection node_2a;
-SET DEBUG_SYNC='now WAIT_FOR commited';
-connection node_3;
-SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
-connection node_2a;
-SET DEBUG_SYNC='now SIGNAL ist';
-connection node_1;
-connection node_2;
-SET DEBUG_SYNC='RESET';
-SELECT COUNT(*) = 95000 FROM t1;
-COUNT(*) = 95000
-1
-wsrep_last_committed_diff
-1
-connection node_1;
-SET GLOBAL wsrep_load_data_splitting = 1;;
-DROP TABLE t1;
-disconnect node_3;
-disconnect node_2;
-disconnect node_1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result b/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result
index 4742fc1af9c..087f9e7e279 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result
@@ -1,25 +1,35 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connect node_1_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_3;
SET GLOBAL wsrep_slave_threads = 2;
+connection node_1_ctrl;
+SET SESSION wsrep_sync_wait=0;
connection node_1;
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
UPDATE t1 SET f1 = f1 + 10;;
+connection node_1_ctrl;
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
+SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
connection node_2;
UPDATE t1 SET f1 = f1 + 100;;
+connection node_1_ctrl;
+SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
+SET GLOBAL debug_dbug = NULL;
+SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
connection node_1;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-1
connection node_2;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-1
connection node_3;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
+SELECT f1 = 111 FROM t1;
+f1 = 111
1
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
COUNT(*) IN (1, 2)
1
-SET GLOBAL wsrep_slave_threads = 1;;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
DROP TABLE t1;
+connection node_1;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
index 3405beef12f..3f29c7419eb 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
@@ -1,10 +1,15 @@
+connection node_2;
+connection node_1;
+call mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\).*");
CREATE TABLE t1 (f1 INTEGER);
connection node_1;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
connection node_2;
+SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;
+SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET SESSION wsrep_sync_wait = 0;
connection node_2;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
index 5fb9c1b9d66..94ead54dfe0 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
@@ -85,6 +87,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
connection node_2;
connection node_3;
connection node_1;
+connection node_2;
+connection node_3;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result
index 8b3211b2b26..2138f48adda 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_3;
@@ -39,6 +41,12 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("Plugin 'wsrep' init function returned error.");
+CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed.");
+CALL mtr.add_suppression("Failed to initialize plugins.");
+CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()");
connection node_3;
CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible");
CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node");
@@ -46,6 +54,12 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("Plugin 'wsrep' init function returned error.");
+CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed.");
+CALL mtr.add_suppression("Failed to initialize plugins.");
+CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()");
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ssl_reload.result b/mysql-test/suite/galera_3nodes/r/galera_ssl_reload.result
new file mode 100644
index 00000000000..1daf3bedf4f
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_ssl_reload.result
@@ -0,0 +1,16 @@
+connection node_2;
+connection node_1;
+# Correct Galera library found
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+connection node_2;
+connection node_2;
+# restart: with restart_parameters
+SET GLOBAL wsrep_provider_options = 'socket.ssl_reload=1';
+connection node_3;
+# restart: with restart_parameters
+connection node_2;
+FLUSH SSL;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
index b4944fc87da..776c54aebe1 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_3;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
new file mode 100644
index 00000000000..deef311b1e4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
@@ -0,0 +1,77 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+SHOW CREATE TABLE mysql.wsrep_cluster;
+Table Create Table
+wsrep_cluster CREATE TABLE `wsrep_cluster` (
+ `cluster_uuid` char(36) NOT NULL,
+ `view_id` bigint(20) NOT NULL,
+ `view_seqno` bigint(20) NOT NULL,
+ `protocol_version` int(11) NOT NULL,
+ `capabilities` int(11) NOT NULL,
+ PRIMARY KEY (`cluster_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+Table Create Table
+wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` (
+ `node_uuid` char(36) NOT NULL,
+ `cluster_uuid` char(36) NOT NULL,
+ `node_name` char(32) NOT NULL,
+ `node_incoming_address` varchar(256) NOT NULL,
+ PRIMARY KEY (`node_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster;
+EXPECT_1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+EXPECT_3
+3
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size')
+1
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+EXPECT_1
+1
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+node_incoming_address LIKE '127.0.0.1:%'
+1
+1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+1
+1
+connection node_2;
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+EXPECT_3
+3
+connection node_1;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members;
+EXPECT_2
+2
+connection node_2;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+EXPECT_3
+3
+connection node_1;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+EXPECT_3
+3
+disconnect node_3;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result
new file mode 100644
index 00000000000..d9d3e817bed
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema_init.result
@@ -0,0 +1,94 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+SHOW CREATE TABLE mysql.wsrep_cluster;
+Table Create Table
+wsrep_cluster CREATE TABLE `wsrep_cluster` (
+ `cluster_uuid` char(36) NOT NULL,
+ `view_id` bigint(20) NOT NULL,
+ `view_seqno` bigint(20) NOT NULL,
+ `protocol_version` int(11) NOT NULL,
+ `capabilities` int(11) NOT NULL,
+ PRIMARY KEY (`cluster_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+Table Create Table
+wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` (
+ `node_uuid` char(36) NOT NULL,
+ `cluster_uuid` char(36) NOT NULL,
+ `node_name` char(32) NOT NULL,
+ `node_incoming_address` varchar(256) NOT NULL,
+ PRIMARY KEY (`node_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0
+SELECT @@sql_safe_updates;
+@@sql_safe_updates
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster;
+COUNT(*) = 1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+COUNT(*) = 3
+1
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size')
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+COUNT(*) = 1
+1
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+node_incoming_address LIKE '127.0.0.1:%'
+1
+1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+1
+1
+connection node_2;
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+COUNT(*) = 3
+1
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size')
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+COUNT(*) = 1
+1
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+node_incoming_address LIKE '127.0.0.1:%'
+1
+1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+1
+1
+connection node_3;
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+COUNT(*) = 3
+1
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size')
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+COUNT(*) = 1
+1
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+node_incoming_address LIKE '127.0.0.1:%'
+1
+1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+1
+1
diff --git a/mysql-test/suite/galera_3nodes/suite.pm b/mysql-test/suite/galera_3nodes/suite.pm
index 350e4af98ff..49b93248a58 100644
--- a/mysql-test/suite/galera_3nodes/suite.pm
+++ b/mysql-test/suite/galera_3nodes/suite.pm
@@ -1,16 +1,11 @@
package My::Suite::GALERA_3NODES;
-use File::Basename;
-use My::Find;
-@ISA = qw(My::Suite);
-
-return "Not run for embedded server" if $::opt_embedded_server;
-
-return "WSREP is not compiled in" if not ::have_wsrep();
+use lib 'suite';
+use wsrep::common;
-return "No wsrep provider library" unless ::have_wsrep_provider();
+@ISA = qw(My::Suite);
-return ::wsrep_version_message() unless ::check_wsrep_version();
+return wsrep_not_ok() if wsrep_not_ok();
push @::global_suppressions,
(
@@ -63,10 +58,22 @@ push @::global_suppressions,
qr|WSREP: .*core_handle_uuid_msg.*|,
qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
+ qr|Query apply failed:*|,
+ qr(WSREP: Ignoring error*),
qr(WSREP: Failed to remove page file .*),
qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*),
qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|,
qr|WSREP: Trying to continue unpaused monitor|,
+ qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|,
);
+sub which($) { return `sh -c "command -v $_[0]"` }
+
+sub skip_combinations {
+ my %skip = ();
+ $skip{'include/have_mariabackup.inc'} = 'Need ss'
+ unless which("lsof") || which("sockstat") || which("ss");
+ %skip;
+}
+
bless { };
diff --git a/mysql-test/suite/galera_3nodes/t/GAL-501.test b/mysql-test/suite/galera_3nodes/t/GAL-501.test
index 39f514c07bc..af5b83ae261 100644
--- a/mysql-test/suite/galera_3nodes/t/GAL-501.test
+++ b/mysql-test/suite/galera_3nodes/t/GAL-501.test
@@ -8,6 +8,12 @@
--source include/check_ipv6.inc
--source include/force_restart.inc
+--let $galera_connection_name = node_3
+--let $galera_server_number = 3
+--source include/galera_connect.inc
+--connection node_3
+--source include/galera_wait_ready.inc
+
# Confirm that initial handshake happened over ipv6
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
diff --git a/mysql-test/suite/galera_3nodes/t/galera_2_cluster.cnf b/mysql-test/suite/galera_3nodes/t/galera_2_cluster.cnf
new file mode 100644
index 00000000000..3889a4f4fdd
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_2_cluster.cnf
@@ -0,0 +1,25 @@
+!include ../galera_2x3nodes.cnf
+
+[mysqld.1]
+wsrep_gtid_domain_id=1
+server-id=11
+
+[mysqld.2]
+wsrep_gtid_domain_id=1
+server-id=12
+
+[mysqld.3]
+wsrep_gtid_domain_id=1
+server-id=13
+
+[mysqld.4]
+wsrep_gtid_domain_id=2
+server-id=21
+
+[mysqld.5]
+wsrep_gtid_domain_id=2
+server-id=22
+
+[mysqld.6]
+wsrep_gtid_domain_id=2
+server-id=23 \ No newline at end of file
diff --git a/mysql-test/suite/galera_3nodes/t/galera_2_cluster.test b/mysql-test/suite/galera_3nodes/t/galera_2_cluster.test
new file mode 100644
index 00000000000..8a9a74a7252
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_2_cluster.test
@@ -0,0 +1,148 @@
+#
+# This test creates 2x3 nodes galera cluster.
+#
+# A(1) <-> B(2) <-> C(3) {Galera cluster 1}
+# | {Circular Async replication}
+# D(4) <-> E(5) <-> F(6) {Galera cluster 2}
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_5, 127.0.0.1, root, , test, $NODE_MYPORT_5
+
+--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
+--connection node_4
+
+--replace_result $NODE_MYPORT_1 NODE_MYPORT_1
+--eval CHANGE MASTER TO master_host='127.0.0.1', master_user='root', master_port=$NODE_MYPORT_1, master_use_gtid=current_pos;
+START SLAVE;
+--source include/wait_for_slave_to_start.inc
+
+#
+# CREATE TABLE & INSERT
+#
+
+--connection node_1
+
+CREATE TABLE t1(c1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 INTEGER);
+INSERT INTO t1(c2) VALUES(1);
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+
+SELECT COUNT(*) = 1 FROM t1;
+
+--connection node_1
+--source include/save_master_gtid.inc
+
+--connection node_4
+--source include/sync_with_master_gtid.inc
+
+SELECT COUNT(*) = 1 FROM t1;
+
+--connect node_6, 127.0.0.1, root, , test, $NODE_MYPORT_6
+--connection node_6
+
+SELECT COUNT(*) = 1 FROM t1;
+
+#
+# ALTER TABLE
+#
+
+--connection node_2
+
+ALTER TABLE t1 ADD COLUMN t3 INTEGER;
+--echo Node 2 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+
+--connection node_3
+
+--echo Node 3 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+
+--connection node_1
+--source include/save_master_gtid.inc
+
+--connection node_4
+--source include/sync_with_master_gtid.inc
+
+--echo Node 4 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+
+--connection node_6
+
+--echo Node 6 column number AFTER ALTER
+SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
+
+#
+# OPTIMIZE TABLE
+#
+
+--connection node_2
+
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+OPTIMIZE TABLE t1;
+
+--connection node_1
+
+--let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+--connection node_4
+
+--let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+--connection node_6
+
+--let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+#
+# Cleanup
+#
+
+--connection node_1
+
+DROP TABLE t1;
+
+--connection node_4
+
+STOP SLAVE;
+RESET SLAVE;
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+SET GLOBAL GTID_SLAVE_POS="";
+
+--connection node_1
+
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+
+--connection node_2
+
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+
+--connection node_3
+
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+
+--connection node_5
+
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
+
+--connection node_6
+
+SET GLOBAL wsrep_on = OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on = ON;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test b/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test
index a2ad0765028..5366d2a4a6e 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test
@@ -29,5 +29,7 @@ INSERT INTO t2 VALUES (1);
--error ER_LOCK_DEADLOCK
COMMIT;
+--connection node_3
+--source include/galera_wait_ready.inc
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
index 136fc8fd8a0..3f1140b175d 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
@@ -60,17 +60,17 @@ SELECT COUNT(*) FROM t1;
# Reconnect node #3 so that MTR's end-of-test checks can run
---source include/galera_resume.inc
--connection node_3
+--source include/galera_resume.inc
--source include/wait_until_connected_again.inc
-CALL mtr.add_suppression("WSREP: gcs_caused.*");
-CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg.*");
-
--disable_query_log
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node3';
--enable_query_log
---source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+CALL mtr.add_suppression("WSREP: gcs_caused");
+CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg");
SET SESSION wsrep_sync_wait = 15;
SELECT COUNT(*) FROM t1;
@@ -79,4 +79,3 @@ SELECT COUNT(*) FROM t1;
DROP TABLE t1;
# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc
-
diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test
index 3992259c732..05b1b25930f 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test
@@ -8,9 +8,20 @@
--source include/have_garbd.inc
--source include/big_test.inc
+# Save galera ports
+--connection node_1
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
+
+--connection node_2
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
+
--let $galera_connection_name = node_3
--let $galera_server_number = 3
--source include/galera_connect.inc
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_3 = $_NODE_GALERAPORT
# Save original auto_increment_offset values.
--let $node_1=node_1
@@ -20,8 +31,6 @@
--echo Killing node #3 to free ports for garbd ...
--connection node_3
---let $gp3 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
---let $galera_port_3 = `SELECT SUBSTR('$gp3', 1, LOCATE(';', '$gp3') - 1)`
--source include/shutdown_mysqld.inc
--connection node_1
@@ -29,9 +38,7 @@
--source include/wait_condition.inc
--echo Starting garbd ...
---let $gp1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
---let $galera_port_1 = `SELECT SUBSTR('$gp1', 1, LOCATE(';', '$gp1') - 1)`
---exec $MTR_GARBD_EXE --address "gcomm://127.0.0.1:$galera_port_1" --group my_wsrep_cluster --options 'base_port=$galera_port_3' > $MYSQL_TMP_DIR/garbd.log 2>&1 &
+--exec $MTR_GARBD_EXE --address "gcomm://127.0.0.1:$NODE_GALERAPORT_1" --group my_wsrep_cluster --options 'base_port=$NODE_GALERAPORT_3' > $MYSQL_TMP_DIR/garbd.log 2>&1 &
--sleep 5
@@ -45,7 +52,10 @@ INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
--echo Killing garbd ...
---exec pkill --oldest --full garbd.*$galera_port_3
+# FreeBSD's /bin/pkill only supports short versions of the options:
+# -o Select only the oldest (least recently started)
+# -f Match against full argument lists
+--exec pkill -o -f garbd.*$NODE_GALERAPORT_3
--sleep 5
@@ -62,6 +72,7 @@ DROP TABLE t1;
--echo Restarting node #3 to satisfy MTR's end-of-test checks
--connection node_3
+let $restart_noprint=2;
--source include/start_mysqld.inc
# Restore original auto_increment_offset values.
diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test b/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test
index 302bf430dde..f5eaf6fc59a 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test
@@ -119,8 +119,10 @@ let $restart_noprint=2;
--source include/start_mysqld.inc
--connection node_1
+--disable_query_log
--eval SET GLOBAL innodb_max_dirty_pages_pct = $innodb_max_dirty_pages_pct
--eval SET GLOBAL innodb_max_dirty_pages_pct_lwm = $innodb_max_dirty_pages_pct_lwm
+--enable_query_log
--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test b/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test
index 2bb8d06462c..925600ffaa8 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test
@@ -10,7 +10,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/force_restart.inc
+--source include/have_innodb.inc
--connection node_1
--echo cluster 1 node 1
@@ -29,7 +29,6 @@ SHOW STATUS LIKE 'wsrep_cluster_size';
--connection node_4
--echo cluster 2 node 1
SHOW STATUS LIKE 'wsrep_cluster_size';
-call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log.*");
--connect node_5, 127.0.0.1, root, , test, $NODE_MYPORT_5
--connection node_5
@@ -139,27 +138,45 @@ select @@gtid_binlog_state;
drop table t1;
stop slave;
reset slave;
+
+--echo cluster 2 node 1
+--connection node_4
+stop slave;
+reset slave;
+
+--echo cluster 1 node 1
+--connection node_1
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
--sleep 2
--echo cluster 2 node 1
--connection node_4
-stop slave;
-reset slave;
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
--connection node_2
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--connection node_3
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--connection node_5
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
--connection node_6
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
#--enable_parsing
#
# This test creates 2x 3 nodes galera cluster.
@@ -194,7 +211,7 @@ select @@gtid_slave_pos;
--echo cluster 1 node 1
--connection node_1
-create table t1 (cluster_domain_id int not null,node_server_id int not null, seq_no int not null, primary key(cluster_domain_id, node_server_id,seq_no)) engine=innodb;
+create table t1 (cluster_domain_id int ,node_server_id int, seq_no int);
insert into t1 values (1, 11, 2);
select @@gtid_binlog_state;
@@ -273,30 +290,33 @@ select @@gtid_binlog_state;
drop table t1;
stop slave;
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
--echo cluster 2 node 1
--connection node_4
stop slave;
change master to master_use_gtid=no, ignore_server_ids=();
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
--connection node_2
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
+set global wsrep_on=ON;
--connection node_3
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
+set global wsrep_on=ON;
--connection node_5
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
+set global wsrep_on=ON;
--connection node_6
-set session wsrep_on=off;
+set global wsrep_on=OFF;
reset master;
-set session wsrep_on=on;
-
+set global wsrep_on=ON;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
index 2bb2bb284e9..6e02350b12b 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
@@ -41,24 +41,31 @@ DROP TABLE t1;
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after = CURRENT_TEST
+# The SSTs happen when nodes are started first time
--let $assert_count = 2
--let $assert_text = Streaming the backup to joiner at \[::1\]
--let $assert_select = Streaming the backup to joiner at \[::1\]
--source include/assert_grep.inc
---let $assert_count = 1
+# There will be 3 ISTs donated from node_1 in Galera 4.
+# Two first happen at the initial startup to populate the certification
+# index. The third one is from the IST which happens during the actual test.
+--let $assert_count = 3
--let $assert_text = async IST sender starting to serve tcp://\[::1\]:
--let $assert_select = async IST sender starting to serve tcp://\[::1\]:
--source include/assert_grep.inc
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+# There are two ISTs on joiner, the first at the initial startup, the second
+# during the actual test.
+--let $assert_count = 2
--let $assert_text = IST receiver addr using tcp://\[::1\]
--let $assert_select = IST receiver addr using tcp://\[::1\]
--source include/assert_grep.inc
# The receiver expects IST
---let $assert_count = 1
+--let $assert_count = 2
--let $assert_text = , listening at: tcp://\[::1\]
--let $assert_select = , listening at: tcp://\[::1\]
--source include/assert_grep.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
index 86607e61542..453aa21988d 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
@@ -42,15 +42,15 @@ DROP TABLE t1;
--let $assert_only_after = CURRENT_TEST
# The SSTs happen when nodes are started first time
---let $assert_count= 2
+--let $assert_count = 2
--let $assert_text = Streaming the backup to joiner at \[::1\]
--let $assert_select = Streaming the backup to joiner at \[::1\]
--source include/assert_grep.inc
-# There will be 1 ISTs donated from node_1 in Galera 3.
+# There will be 3 ISTs donated from node_1 in Galera 4.
# Two first happen at the initial startup to populate the certification
# index. The third one is from the IST which happens during the actual test.
---let $assert_count= 1
+--let $assert_count = 3
--let $assert_text = async IST sender starting to serve tcp://\[::1\]:
--let $assert_select = async IST sender starting to serve tcp://\[::1\]:
--source include/assert_grep.inc
@@ -59,14 +59,15 @@ DROP TABLE t1;
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
--let $assert_only_after = CURRENT_TEST
-# There is one ISTs on joiner at Galera 3.
---let $assert_count= 1
+# There are two ISTs on joiner, the first at the initial startup, the second
+# during the actual test.
+--let $assert_count = 2
--let $assert_text = IST receiver addr using tcp://\[::1\]
--let $assert_select = IST receiver addr using tcp://\[::1\]
--source include/assert_grep.inc
# The receiver expects IST
---let $assert_count = 1
+--let $assert_count = 2
--let $assert_text = , listening at: tcp://\[::1\]
--let $assert_select = , listening at: tcp://\[::1\]
--source include/assert_grep.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test
index 79551aa185d..2f8bf07b5b5 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test
@@ -60,6 +60,7 @@ INSERT INTO t1 VALUES (1);
--connection node_2
--echo Starting server ...
--let $start_mysqld_params = --wsrep_sst_auth=sst: --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=[::1].1:$NODE_MYPORT_2
+let $restart_noprint=2;
--source include/start_mysqld.inc
#--source suite/galera/include/galera_start_replication.inc
@@ -78,6 +79,11 @@ DROP TABLE t1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
+# restart node so we don't fail on WSREP_START_POSITION internal check
+--source include/restart_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+--source ../galera/include/auto_increment_offset_restore.inc
--source suite/galera/include/galera_sst_restore.inc
--connection node_2
CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort");
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
index 2719316fb84..210a4c2331e 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
@@ -11,7 +11,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test
index e181b6831af..2248ff5014a 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test
@@ -9,7 +9,7 @@
#
--source include/have_innodb.inc
--source include/galera_cluster.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test
index 7618f5a112c..2fb0e78c759 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test
@@ -9,7 +9,7 @@
#
--source include/have_innodb.inc
--source include/galera_cluster.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test
index 68dea95854c..133903d7cbf 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test
@@ -8,7 +8,7 @@
#
--source include/have_innodb.inc
--source include/galera_cluster.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
diff --git a/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.cnf b/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.cnf
deleted file mode 100644
index 35ecb8b5937..00000000000
--- a/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.cnf
+++ /dev/null
@@ -1,4 +0,0 @@
-!include ../galera_3nodes.cnf
-
-[mysqld]
-wsrep-causal-reads=OFF
diff --git a/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.test b/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.test
deleted file mode 100644
index e1140da229b..00000000000
--- a/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.test
+++ /dev/null
@@ -1,124 +0,0 @@
---source include/have_debug_sync.inc
---source include/galera_cluster.inc
---source include/have_innodb.inc
---source include/big_test.inc
-
-# Establish connection to the third node:
---let $galera_connection_name = node_3
---let $galera_server_number = 3
---source include/galera_connect.inc
-
-# Establish additional connection to the second node
-# (which is used in the test for synchronization control):
---let $galera_connection_name = node_2a
---let $galera_server_number = 2
---source include/galera_connect.inc
-
-# Save original auto_increment_offset values:
---let $node_1=node_1
---let $node_2=node_2
---let $node_3=node_3
---source ../galera/include/auto_increment_offset_save.inc
-
-# Create a file for LOAD DATA with 95K entries
---connection node_1
---perl
-open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_var_load_data_splitting.csv") or die;
-foreach my $i (1..95000) {
- print FILE "$i\n";
-}
-EOF
-
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
-
-# Let's wait for the completion of the formation of a cluster
-# of three nodes:
---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
---connection node_2
---source include/wait_until_ready.inc
---connection node_3
---source include/wait_until_ready.inc
-
-# Disconnect the third node from the cluster:
-SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
-SET SESSION wsrep_on = OFF;
---let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
---source include/wait_condition.inc
-SET SESSION wsrep_on = ON;
-SET SESSION wsrep_sync_wait = 0;
-
-# Disable sync wait for control connection:
---connection node_2a
-SET SESSION wsrep_sync_wait = 0;
-
-# Let's wait until the other nodes stop seeing the third
-# node in the cluster:
---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
-
-# Record wsrep_last_committed as it was before LOAD DATA:
---connection node_2
---let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
-
-# Enable splitting for LOAD DATA:
---let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting`
-SET GLOBAL wsrep_load_data_splitting = TRUE;
-
-# Stop after the first commit and wait for the IST signal:
-SET DEBUG_SYNC='intermediate_transaction_commit SIGNAL commited WAIT_FOR ist';
-
-# Perform the LOAD DATA statement:
---disable_query_log
-let v1='$MYSQLTEST_VARDIR/tmp/galera_var_load_data_splitting.csv';
---send_eval LOAD DATA INFILE $v1 INTO TABLE t1;
---enable_query_log
-
-# Wait for the first commit:
---connection node_2a
-SET DEBUG_SYNC='now WAIT_FOR commited';
-
-# Initiate the IST:
---connection node_3
-SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
-
-# Continue the execution of LOAD DATA:
---connection node_2a
-SET DEBUG_SYNC='now SIGNAL ist';
-
-# Let's wait for the recovery of the cluster
-# of three nodes:
---connection node_1
---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
-
-# Save the LOAD DATA results:
---connection node_2
---reap
-
-# Reset all synchronization points and signals:
-SET DEBUG_SYNC='RESET';
-
-# Read the wsrep_last_commited after LOAD DATA:
---let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
-
-# Check the records:
-SELECT COUNT(*) = 95000 FROM t1;
-
-# LOAD-ing 95K rows should causes 10 commits to be registered:
---disable_query_log
---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 10 AS wsrep_last_committed_diff;
---enable_query_log
-
-# Restore the original splitting:
---connection node_1
---eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
-
-# Drop test table:
-DROP TABLE t1;
-
-# Restore original auto_increment_offset values:
---source ../galera/include/auto_increment_offset_restore.inc
-
---let $galera_cluster_size=3
---source include/galera_end.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test b/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test
index f1168e59193..84629c96c65 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test
@@ -5,46 +5,71 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
---let $galera_connection_name = node_3
---let $galera_server_number = 3
---source include/galera_connect.inc
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connect node_1_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
--connection node_3
---let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
SET GLOBAL wsrep_slave_threads = 2;
+--connection node_1_ctrl
+SET SESSION wsrep_sync_wait=0;
+
+#
+# We will make the following UPDATE depend on the UPDATE below
+#
--connection node_1
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
--send UPDATE t1 SET f1 = f1 + 10;
+--connection node_1_ctrl
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
+SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
+
--connection node_2
--send UPDATE t1 SET f1 = f1 + 100;
---connection node_1
#
-# Note that test is not deterministic. We have following cases possible
-# (1) Both updates are certified locally and then executed by the applier
-# (2) Certification of update in node_1 fails because applier has started
-# update from node_2
-# (3) Certification of update in node_2 fails because applier has started
-# update from node_1
+# Let's wait for the first UPDATE the be BF aborted
+#
+--connection node_1_ctrl
+SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
+
+#
+# and make sure the second has committed
#
---error 0,ER_LOCK_DEADLOCK
+--let $wait_condition = SELECT VARIABLE_VALUE > $wsrep_last_committed_before FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+#
+# now release the first UPDATE.
+#
+SET GLOBAL debug_dbug = NULL;
+SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
+
+#
+# Both UPDATEs should succeed.
+#
+--connection node_1
--reap
-SELECT COUNT(*) FROM t1;
--connection node_2
---error 0,ER_LOCK_DEADLOCK
--reap
-SELECT COUNT(*) FROM t1;
--connection node_3
-SELECT COUNT(*) FROM t1;
+SELECT f1 = 111 FROM t1;
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
---eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
DROP TABLE t1;
+
+--connection node_1
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
index f8381a3324b..ef5bc7dd923 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
@@ -6,6 +6,8 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+call mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\).*");
+
CREATE TABLE t1 (f1 INTEGER);
# Force all nodes to become non-primary
@@ -13,13 +15,19 @@ CREATE TABLE t1 (f1 INTEGER);
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
--connection node_2
+SET SESSION wsrep_sync_wait=0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
-SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_sync_wait=0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
---sleep 10
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
# Node #2 should be non-primary
SET SESSION wsrep_sync_wait = 0;
@@ -44,7 +52,7 @@ INSERT INTO t1 VALUES (1);
# Reconnect all nodes
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
---sleep 10
+
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
@@ -67,7 +75,7 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
--connection node_3
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
---sleep 10
+
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
index 57026ce6928..1a61471d581 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
@@ -1,5 +1,7 @@
-# We need a dedicated .cnf file, even if empty, in order to force this test to run
-# alone on a freshly started cluster. Otherwise there are adverse interactions with
-# following tests such as galera_3nodes.galera_var_dirty_reads2
+# We need a dedicated .cnf file, even if empty, in order to force this test
+# to run alone on a freshly started cluster. Otherwise there are adverse
+# interactions with following tests such as
+# galera_3nodes.galera_var_dirty_reads2
+!include ../galera_3nodes.cnf
!include ../galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
index 0a94e7cd85d..0e407e49aba 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
@@ -1,11 +1,11 @@
#
-# Test the pc.weight wsrep provider option. We set Node #1 to have a high weight and then
-# suspend it. This will cause Nodes #2 and #3 to transition to non-primary component.
+# Test the pc.weight wsrep provider option. We set Node #1 to have a high
+# weight and then suspend it. This will cause Nodes #2 and #3 to transition
+# to non-primary component.
#
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
--connection node_1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
@@ -55,6 +55,9 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
--connection node_1
# For Node #1, we expect a primary component of size 1
+# (NOTE: this is a bit racy as nodes 2 and 3 will try to reconnect ASAP.
+# to avoid the raice they should be suspended first as well, but that's
+# not currently possible)
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
@@ -85,6 +88,15 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
--connection node_1
--source include/wait_condition.inc
+# wait until nodes 2 and 3 have declared ready state (can happen after cluster_size raaise)
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+
+--connection node_3
+--source include/wait_condition.inc
+
+
# On all nodes, we now expect a Primary component of size 3, weight 3, Synced and ready
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
diff --git a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
index e0b2e26927c..65b4000cd1f 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
@@ -4,14 +4,17 @@
--source include/galera_cluster.inc
--source include/force_restart.inc
+#
+# Create connection node_3 and save auto increment variables.
+#
--let $galera_connection_name = node_3
--let $galera_server_number = 3
--source include/galera_connect.inc
-# Save original auto_increment_offset values.
---let $node_1=node_1
---let $node_2=node_2
---let $node_3=node_3
+--let $node_1 = node_1
+--let $node_2 = node_2
+--let $node_3 = node_3
+
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
@@ -63,6 +66,7 @@ INSERT INTO t1 VALUES (1);
#
# Shut down one more node
#
+
--connection node_3
--source include/shutdown_mysqld.inc
@@ -87,8 +91,8 @@ INSERT INTO t1 VALUES (1);
--source include/assert_grep.inc
# Restart one node
-
--connection node_2
+let $restart_noprint=2;
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
@@ -153,6 +157,7 @@ SET SESSION wsrep_on = OFF;
--connection node_1
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+let $restart_noprint=2;
--source include/start_mysqld.inc
--source include/wait_until_connected_again.inc
@@ -162,6 +167,7 @@ SET SESSION wsrep_on = OFF;
--connection node_2
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+let $restart_noprint=2;
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
@@ -170,6 +176,7 @@ SET SESSION wsrep_on = OFF;
--connection node_3
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
+let $restart_noprint=2;
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
@@ -182,6 +189,12 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("Plugin 'wsrep' init function returned error.");
+CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed.");
+CALL mtr.add_suppression("Failed to initialize plugins.");
+CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()");
--connection node_3
CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible");
@@ -190,9 +203,18 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("Plugin 'wsrep' init function returned error.");
+CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed.");
+CALL mtr.add_suppression("Failed to initialize plugins.");
+CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()");
+
SHOW CREATE TABLE t1;
DROP TABLE t1;
-# Restore original auto_increment_offset values.
+#
+# Restore auto increment variables.
+#
--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test b/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test
index 3e8b1557e7b..8e73dee70ae 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test
@@ -25,6 +25,7 @@ SELECT COUNT(*) = 1 FROM db2.t2B;
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
+--source include/galera_wait_ready.inc
SELECT COUNT(*) = 0 FROM db1.t1;
SELECT COUNT(*) = 1 FROM db2.t2A;
SELECT COUNT(*) = 1 FROM db2.t2B;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ssl_reload.cnf b/mysql-test/suite/galera_3nodes/t/galera_ssl_reload.cnf
new file mode 100644
index 00000000000..65d1599268d
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ssl_reload.cnf
@@ -0,0 +1,10 @@
+!include ../galera_3nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_ca=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.root.crt;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.1.crt;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.1.key'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_ca=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.root.crt;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.1.crt;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.1.key'
+
+[mysqld.3]
+wsrep_provider_options='base_port=@mysqld.3.#galera_port;socket.ssl=yes;socket.ssl_ca=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.root.crt;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.1.crt;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera_certs/galera.1.key'
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ssl_reload.test b/mysql-test/suite/galera_3nodes/t/galera_ssl_reload.test
new file mode 100644
index 00000000000..714d4b3f75c
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ssl_reload.test
@@ -0,0 +1,71 @@
+#
+# Test reloading of Galera SSL certificate without shutting down node
+#
+
+--source include/galera_cluster.inc
+--source include/have_openssl.inc
+--source include/have_ssl_communication.inc
+
+--let $galera_version=26.4.8
+source ../../wsrep/include/check_galera_version.inc;
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+# Setup galera ports
+--connection node_1
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
+
+--connection node_2
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
+
+# Setup temporary file for SSL reloading
+let $ssl_cert = $MYSQLTEST_VARDIR/tmp/ssl_cert.pem;
+let $ssl_key = $MYSQLTEST_VARDIR/tmp/ssl_key.pem;
+let $ssl_ca = $MYSQLTEST_VARDIR/tmp/ssl_ca.pem;
+
+copy_file std_data/galera_certs/galera.root.crt $ssl_ca;
+copy_file std_data/galera_certs/galera.1.crt $ssl_cert;
+copy_file std_data/galera_certs/galera.1.key $ssl_key;
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+--let $restart_noprint=1
+--let $restart_parameters = --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1 --wsrep_provider_options=base_port=$NODE_GALERAPORT_2;socket.ssl=yes;socket.ssl_ca=$MYSQL_TEST_DIR/std_data/galera_certs/galera.root.crt;socket.ssl_cert=$MYSQLTEST_VARDIR/tmp/ssl_cert.pem;socket.ssl_key=$MYSQLTEST_VARDIR/tmp/ssl_key.pem
+--source include/start_mysqld.inc
+--source include/galera_wait_ready.inc
+
+# Set certificate and key and reload by setting directly `wsrep_provider_options`
+remove_file $ssl_cert;
+remove_file $ssl_key;
+copy_file std_data/galera_certs/galera.2.crt $ssl_cert;
+copy_file std_data/galera_certs/galera.2.key $ssl_key;
+SET GLOBAL wsrep_provider_options = 'socket.ssl_reload=1';
+
+--connection node_3
+--source include/shutdown_mysqld.inc
+--let $restart_parameters = --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_2
+--source include/start_mysqld.inc
+
+# Set certificate and key and reload by executing `FLUSH SSL`
+--connection node_2
+remove_file $ssl_cert;
+remove_file $ssl_key;
+copy_file std_data/galera_certs/galera.1.crt $ssl_cert;
+copy_file std_data/galera_certs/galera.1.key $ssl_key;
+FLUSH SSL;
+
+# Cleanup
+remove_file $ssl_ca;
+remove_file $ssl_cert;
+remove_file $ssl_key;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
index 63eff486ba3..cbee81b7f94 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
@@ -120,8 +120,9 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
--source include/wait_condition.inc
--connection node_2
---let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test
new file mode 100644
index 00000000000..d6e20d3bbfb
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test
@@ -0,0 +1,81 @@
+#
+# This test performs basic checks on the contents of the wsrep_schema
+#
+# wsrep_members_history checks are temporarily disabled until it
+# can be made configurable.
+#
+
+--source include/galera_cluster.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+# Make the test fail if table structure has changed
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+SHOW CREATE TABLE mysql.wsrep_cluster;
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+
+# Checks for the wsrep_cluster table
+
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster;
+
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+
+# Checks for the wsrep_cluster_members table
+
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+
+--connection node_2
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+
+SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members;
+
+--connection node_2
+let $restart_noprint=2;
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+
+--connection node_1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+
+SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
+
+--source ../galera/include/auto_increment_offset_restore.inc
+
+--disconnect node_3
diff --git a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.cnf b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.cnf
new file mode 100644
index 00000000000..317094cea72
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.cnf
@@ -0,0 +1,5 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+sql-safe-updates=1
+wsrep-debug=1
diff --git a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.test b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.test
new file mode 100644
index 00000000000..7d8089a8ceb
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema_init.test
@@ -0,0 +1,58 @@
+#
+# This test performs basic checks on the contents of the wsrep_schema
+#
+# wsrep_members_history checks are temporarily disabled until it
+# can be made configurable.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+# Make the test fail if table structure has changed
+
+SHOW CREATE TABLE mysql.wsrep_cluster;
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+#disabled SHOW CREATE TABLE mysql.wsrep_member_history;
+SELECT @@sql_safe_updates;
+
+# Checks for the wsrep_cluster table
+
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+
+# Checks for the wsrep_cluster_members table
+
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+
+--connection node_2
+
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+
+--connection node_3
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+
+--source ../galera/include/auto_increment_offset_restore.inc
+
diff --git a/mysql-test/suite/galera_3nodes_sr/disabled.def b/mysql-test/suite/galera_3nodes_sr/disabled.def
new file mode 100644
index 00000000000..900b27860a5
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/disabled.def
@@ -0,0 +1,6 @@
+GCF-336 :
+GCF-582 :
+GCF-810A :
+GCF-810B :
+GCF-810C :
+galera_sr_kill_slave_after_apply_rollback2 : \ No newline at end of file
diff --git a/mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf
new file mode 100644
index 00000000000..62c8214b8f2
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf
@@ -0,0 +1 @@
+!include ../galera_3nodes/galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes_sr/my.cnf b/mysql-test/suite/galera_3nodes_sr/my.cnf
new file mode 100644
index 00000000000..bb25b95ceea
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/my.cnf
@@ -0,0 +1 @@
+!include galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
new file mode 100644
index 00000000000..bb6c11edf36
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
@@ -0,0 +1,26 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_sync_wait=0;
+INSERT INTO t1 VALUES (2);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+ERROR 08S01: WSREP has not yet prepared node for application use
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+DROP TABLE t1;
+CALL mtr.add_suppression("replication aborted");
+CALL mtr.add_suppression("WSREP: fragment replication failed: 3");
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result
new file mode 100644
index 00000000000..9e2a4823973
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result
@@ -0,0 +1,23 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+COMMIT;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result
new file mode 100644
index 00000000000..775f7ee0412
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result
@@ -0,0 +1,38 @@
+connection node_2;
+connection node_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+connection node_1;
+connection node_2a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+SET WSREP_ON=ON;
+connection node_1;
+connection node_2a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_1;
+connection node_1;
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+0
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1
+COMMIT;
+connection node_1;
+SELECT * FROM t1;
+f1
+DROP TABLE t1;
+connection node_2;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result
new file mode 100644
index 00000000000..db7da93c8c0
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result
@@ -0,0 +1,78 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+connection node_2;
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+ERROR 23000: Duplicate entry '11' for key 'PRIMARY'
+INSERT INTO t1 VALUES (31),(32),(33);
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+0
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+0
+COMMIT;
+connection node_2;
+COMMIT;
+SELECT * FROM t1;
+f1
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+31
+32
+33
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+31
+32
+33
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result
new file mode 100644
index 00000000000..9a83ff3c041
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result
@@ -0,0 +1,256 @@
+SET GLOBAL debug="d,crash_last_fragment_commit_before_fragment_removal";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+crash_last_fragment_commit_before_fragment_removal
+COMMIT;
+Got one of the listed errors
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug = '';
+SET GLOBAL debug="d,crash_last_fragment_commit_after_fragment_removal";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+crash_last_fragment_commit_after_fragment_removal
+COMMIT;
+Got one of the listed errors
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug = '';
+SET GLOBAL debug="d,crash_replicate_fragment_success";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+crash_replicate_fragment_success
+COMMIT;
+Got one of the listed errors
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug = '';
+SET GLOBAL debug="d,crash_replicate_fragment_after_certify";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+crash_replicate_fragment_after_certify
+COMMIT;
+Got one of the listed errors
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug = '';
+SET GLOBAL debug="d,crash_replicate_fragment_before_certify";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+crash_replicate_fragment_before_certify
+COMMIT;
+Got one of the listed errors
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug = '';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result
new file mode 100644
index 00000000000..bbec3531a49
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result
@@ -0,0 +1,100 @@
+SET GLOBAL debug="d,crash_apply_cb_before_append_frag";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+COMMIT;
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug = '';
+SET GLOBAL debug="d,crash_apply_cb_after_append_frag";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+COMMIT;
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug = '';
+CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result
new file mode 100644
index 00000000000..1a6dcbfd392
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result
@@ -0,0 +1,177 @@
+SET GLOBAL debug="d,crash_commit_cb_last_fragment_commit_success";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
+SELECT 1 FROM t1;
+Got one of the listed errors
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug="d,crash_commit_cb_before_last_fragment_commit";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
+SELECT 1 FROM t1;
+Got one of the listed errors
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug="d,crash_apply_cb_after_fragment_removal";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
+SELECT 1 FROM t1;
+Got one of the listed errors
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET GLOBAL debug="d,crash_apply_cb_before_fragment_removal";
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary');
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary');
+SELECT 1 FROM t1;
+Got one of the listed errors
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result
new file mode 100644
index 00000000000..4eb0ebca4f4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result
@@ -0,0 +1,54 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_on = OFF;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+connection node_3;
+connection node_1a;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_3;
+connection node_1a;
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1a;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
new file mode 100644
index 00000000000..8333fff98db
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
@@ -0,0 +1,25 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_2;
+SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal";
+CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+COMMIT;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result b/mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result
new file mode 100644
index 00000000000..8de724c1576
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/MDEV-26707.result
@@ -0,0 +1,86 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+connection node_2;
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (21);
+connection node_1;
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+EXPECT_1
+1
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+EXPECT_1
+1
+connection node_3;
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+EXPECT_1
+1
+connection node_3a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2;
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
+COMMIT;
+connection node_2a;
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_2;
+ERROR HY000: Got error 6 "No such device or address" during COMMIT
+connection node_2a;
+SET DEBUG_SYNC = 'RESET';
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_3a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+EXPECT_1
+1
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+EXPECT_1
+1
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_3a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_1a;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_2a;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_3a;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result
new file mode 100644
index 00000000000..bb4eb829abc
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result
@@ -0,0 +1,80 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_2;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_3;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_2;
+connection node_3;
+connection node_1a;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_3;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+CALL mtr.add_suppression("failed to send SR rollback for");
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result
new file mode 100644
index 00000000000..dbdd95f837a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result
@@ -0,0 +1,40 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+# restart
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+COMMIT;
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+connection node_2;
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+connection node_3;
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result
new file mode 100644
index 00000000000..4547d06dcf9
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result
@@ -0,0 +1,34 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_3;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_2;
+Killing server ...
+connection node_3;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);
+connection node_2;
+# restart
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result
new file mode 100644
index 00000000000..db04c24b5b1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result
@@ -0,0 +1,54 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+Killing server ...
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+connection node_2;
+# restart
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 15
+1
+connection node_1;
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 15 FROM t1;
+COUNT(*) = 15
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+connection node_3;
+CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result
new file mode 100644
index 00000000000..ff9215cf31f
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result
@@ -0,0 +1,59 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+Killing server ...
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+connection node_2;
+# restart
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 15
+1
+connection node_1;
+ROLLBACK;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result
new file mode 100644
index 00000000000..21e301ed353
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result
@@ -0,0 +1,31 @@
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+Killing server ...
+INSERT INTO t1 VALUES (6);
+ROLLBACK;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result
new file mode 100644
index 00000000000..933038e00f1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result
@@ -0,0 +1,49 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER);
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+LOCK TABLE t2 WRITE;
+connection node_1;
+INSERT INTO t2 VALUES (1);
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+# restart
+connection node_1;
+COMMIT;
+count_match
+1
+count_match
+1
+connection node_1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_2;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result
new file mode 100644
index 00000000000..1a50bace279
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result
@@ -0,0 +1,117 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (200);
+INSERT INTO t1 VALUES (201);
+INSERT INTO t1 VALUES (202);
+INSERT INTO t1 VALUES (203);
+INSERT INTO t1 VALUES (204);
+connection node_3;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (300);
+INSERT INTO t1 VALUES (301);
+INSERT INTO t1 VALUES (302);
+INSERT INTO t1 VALUES (303);
+INSERT INTO t1 VALUES (304);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1a;
+connection node_2a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_3a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_1a;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+connection node_2a;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_3a;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_1a;
+connection node_2a;
+connection node_3a;
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+wsrep_gcomm_uuid_match
+1
+connection node_3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+wsrep_gcomm_uuid_match
+1
+connection node_1;
+INSERT INTO t1 VALUES (30);
+INSERT INTO t1 VALUES (31);
+INSERT INTO t1 VALUES (32);
+INSERT INTO t1 VALUES (33);
+INSERT INTO t1 VALUES (34);
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34
+1 1 1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+connection node_2;
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34
+1 1 1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+connection node_3;
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34
+1 1 1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+DROP TABLE t1;
+connection node_1;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+connection node_2;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+connection node_3;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split_no_primary.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split_no_primary.result
new file mode 100644
index 00000000000..c634bac9239
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split_no_primary.result
@@ -0,0 +1,85 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+connection node_2;
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+connection node_3;
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (31);
+INSERT INTO t1 VALUES (32);
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+connection node_3a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status non-Primary
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status non-Primary
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_3a;
+SET SESSION wsrep_sync_wait = 0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status non-Primary
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+connection node_3a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+connection node_1a;
+connection node_2a;
+connection node_3a;
+connection node_1a;
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+expect 0
+0
+INSERT INTO t1 VALUES(11);
+INSERT INTO t1 VALUES(21);
+INSERT INTO t1 VALUES(31);
+SELECT * FROM t1;
+f1
+11
+21
+31
+connection node_2a;
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+expect 0
+0
+connection node_3a;
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+expect 0
+0
+connection node_1;
+INSERT INTO t1 VALUES(103);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
+INSERT INTO t1 VALUES(203);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_3;
+INSERT INTO t1 VALUES(303);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/suite.pm b/mysql-test/suite/galera_3nodes_sr/suite.pm
new file mode 100644
index 00000000000..becc764733a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/suite.pm
@@ -0,0 +1,46 @@
+package My::Suite::GALERA_3NODES_SR;
+
+use lib 'suite';
+use wsrep::common;
+
+@ISA = qw(My::Suite);
+
+return wsrep_not_ok() if wsrep_not_ok();
+
+push @::global_suppressions,
+ (
+ qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1),
+ qr(WSREP: Could not open saved state file for reading: .*),
+ qr(WSREP: Could not open state file for reading: .*),
+ qr(WSREP: Gap in state sequence. Need state transfer.),
+ qr(WSREP: Failed to prepare for incremental state transfer:),
+ qr(WSREP:.*down context.*),
+ qr(WSREP: Failed to send state UUID:),
+ qr(WSREP: last inactive check more than .* skipping check),
+ qr(WSREP: SQL statement was ineffective),
+ qr(WSREP: Releasing seqno [0-9]* before [0-9]* was assigned.),
+ qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
+ qr(WSREP: Quorum: No node with complete state),
+ qr(WSREP: Initial position was provided by configuration or SST, avoiding override),
+ qr|WSREP: discarding established \(time wait\) .*|,
+ qr(WSREP: There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside. Will use that one.),
+ qr(WSREP: evs::proto.*),
+ qr|WSREP: Ignoring possible split-brain \(allowed by configuration\) from view:.*|,
+ qr(WSREP: no nodes coming from prim view, prim not possible),
+ qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable),
+ qr(WSREP: user message in state LEAVING),
+ qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
+ qr(WSREP: .* sending install message failed: Resource temporarily unavailable),
+ qr(WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.),
+ qr(WSREP: Could not find peer:),
+ qr|WSREP: gcs_caused\(\) returned .*|,
+ qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
+ qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|,
+ qr(WSREP: Action message in non-primary configuration from member [0-9]*),
+ qr(WSREP: Last Applied Action message in non-primary configuration from member [0-9]*),
+ qr|WSREP: .*core_handle_uuid_msg.*|,
+ qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
+ qr(WSREP: JOIN message from member .* in non-primary configuration. Ignored.),
+ );
+
+bless { };
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test
new file mode 100644
index 00000000000..b8d46db74f1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test
@@ -0,0 +1,47 @@
+--source include/galera_cluster.inc
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_sync_wait=0;
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (2);
+--error ER_UNKNOWN_COM_ERROR
+COMMIT;
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
+DROP TABLE t1;
+
+CALL mtr.add_suppression("replication aborted");
+CALL mtr.add_suppression("WSREP: fragment replication failed: 3");
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+--source include/galera_wait_ready.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test
new file mode 100644
index 00000000000..bf19ea84c87
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test
@@ -0,0 +1,39 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COMMIT;
+SELECT COUNT(*) FROM t1;
+
+--connection node_2
+SELECT COUNT(*) FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test
new file mode 100644
index 00000000000..6d49247ab5e
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test
@@ -0,0 +1,80 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the case where the cluster splits 3 ways.
+# The master transitions to a non-prim view and back to prim. Its ongoing
+# should fail to commit.
+#
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+#
+# Isolate node_2 into a separate non-primary component
+#
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+--disable_query_log
+SET WSREP_ON=OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET WSREP_ON=ON;
+--enable_query_log
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+#
+# Confirm that node_1 has no transactions in SR table
+#
+
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+#
+# Restore cluster
+#
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+--source include/galera_wait_ready.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT * FROM t1;
+COMMIT;
+
+--connection node_1
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--connection node_2
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-609.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-609.test
new file mode 100644
index 00000000000..210b100a9f8
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-609.test
@@ -0,0 +1,37 @@
+#
+# GCF-609 SR: Assertion wsrep_apply_cb on slave after master causes a duplicate key error
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+INSERT INTO t1 VALUES (31),(32),(33);
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COMMIT;
+
+--connection node_2
+COMMIT;
+SELECT * FROM t1;
+
+--connection node_1
+SELECT * FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test
new file mode 100644
index 00000000000..fda16b7265c
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test
@@ -0,0 +1,137 @@
+#
+# Exercise the crash points which crash the server at various points important to SR
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connect node_2_check, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connect node_3_check, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+#
+# crash_last_fragment_commit_before_fragment_removal
+#
+
+--connection node_2
+--enable_reconnect
+SET GLOBAL debug_dbug="d,crash_last_fragment_commit_before_fragment_removal";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
+
+--echo crash_last_fragment_commit_before_fragment_removal
+
+--connection node_2
+--error 2006,2013
+COMMIT;
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_2
+--source include/start_mysqld.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
+
+#
+# crash_last_fragment_commit_after_fragment_removal
+#
+
+--connection node_2
+SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
+
+--echo crash_last_fragment_commit_after_fragment_removal
+
+--connection node_2
+--error 2006,2013
+COMMIT;
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_2
+--source include/start_mysqld.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
+
+#
+# crash_last_fragment_commit_success
+#
+# Case crash_last_fragment_commit_success is commented out,
+# the changes will be visible on slave due to succesful commit,
+# so the galera_sr_crash_post_check will fail.
+#
+
+# --connection node_2
+# SET GLOBAL debug_dbug="d,crash_last_fragment_commit_success";
+# --source suite/galera_3nodes/include/galera_expect_node_crash.inc
+# --source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
+
+# --echo crash_last_fragment_commit_success
+
+# --connection node_2
+# --error 2006,2013
+# COMMIT;
+
+# --source include/start_mysqld.inc
+# --source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
+
+#
+# crash_replicate_fragment_success
+#
+
+--connection node_2
+SET GLOBAL debug_dbug="d,crash_replicate_fragment_success";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
+
+--echo crash_replicate_fragment_success
+
+--connection node_2
+--error 2006,2013
+COMMIT;
+
+--source include/start_mysqld.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
+
+#
+# crash_replicate_fragment_after_certify
+#
+
+--connection node_2
+SET GLOBAL debug_dbug="d,crash_replicate_fragment_after_certify";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
+
+--echo crash_replicate_fragment_after_certify
+
+--connection node_2
+--error 2006,2013
+COMMIT;
+
+--source include/start_mysqld.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
+
+#
+# crash_replicate_fragment_before_certify
+#
+
+--connection node_2
+SET GLOBAL debug_dbug="d,crash_replicate_fragment_before_certify";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes.inc
+
+--echo crash_replicate_fragment_before_certify
+
+--connection node_2
+--error 2006,2013
+COMMIT;
+
+--source include/start_mysqld.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check.inc
+
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test
new file mode 100644
index 00000000000..cb41b2348de
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test
@@ -0,0 +1,49 @@
+#
+# Exercise the crash points which crash the server at various points important to SR
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connect node_2_check, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connect node_3_check, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+#
+# crash_apply_cb_before_append_frag
+#
+
+--connection node_3
+SET GLOBAL debug_dbug="d,crash_apply_cb_before_append_frag";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes2.inc
+
+--connection node_3
+--error 0,2006,2013
+COMMIT;
+
+--source include/start_mysqld.inc
+--sleep 5
+--source suite/galera_3nodes/include/galera_sr_crash_post_check2.inc
+
+#
+# crash_apply_cb_after_append_frag
+#
+
+--connection node_3
+SET GLOBAL debug_dbug="d,crash_apply_cb_after_append_frag";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes2.inc
+
+--connection node_3
+--error 0,2006,2013
+COMMIT;
+
+--source include/start_mysqld.inc
+--sleep 5
+--source suite/galera_3nodes/include/galera_sr_crash_post_check2.inc
+
+--connection node_1
+CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test
new file mode 100644
index 00000000000..6c4da2cb5f0
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test
@@ -0,0 +1,70 @@
+#
+# Exercise the crash points which crash the server at various points important to SR
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connect node_2_check, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--enable_reconnect
+--connect node_3_check, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+#
+# crash_commit_cb_last_fragment_commit_success
+#
+
+--connection node_3
+SET GLOBAL debug_dbug="d,crash_commit_cb_last_fragment_commit_success";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
+
+--source include/start_mysqld.inc
+--sleep 5
+--source include/galera_wait_ready.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
+
+#
+# crash_commit_cb_before_last_fragment_commit
+#
+
+--connection node_3
+SET GLOBAL debug_dbug="d,crash_commit_cb_before_last_fragment_commit";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
+
+--source include/start_mysqld.inc
+--sleep 5
+--source include/galera_wait_ready.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
+
+#
+# crash_apply_cb_after_fragment_removal
+#
+
+--connection node_3
+SET GLOBAL debug_dbug="d,crash_apply_cb_after_fragment_removal";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
+
+--source include/start_mysqld.inc
+--sleep 5
+--source include/galera_wait_ready.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
+
+#
+# crash_apply_cb_before_fragment_removal
+#
+
+--connection node_3
+SET GLOBAL debug_dbug="d,crash_apply_cb_before_fragment_removal";
+--source suite/galera_3nodes/include/galera_expect_node_crash.inc
+--source suite/galera_3nodes/include/galera_sr_crash_prepare_nodes3.inc
+
+--source include/start_mysqld.inc
+--sleep 5
+--source include/galera_wait_ready.inc
+--source suite/galera_3nodes/include/galera_sr_crash_post_check3.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-817.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-817.test
new file mode 100644
index 00000000000..a32da959429
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-817.test
@@ -0,0 +1,109 @@
+#
+# GCF-817 SR: master removes SR trx in non-primary view
+#
+
+--source include/galera_cluster.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--connection node_1a
+# Force node #1 to go non-primary
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+
+SET SESSION wsrep_on = OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+# SR table on master should still contain entries after going non-Prim
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# SR table on slave should eventually clean up entries when master goes non-Prim
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+--connection node_3
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# Restore node #1 to primary
+
+--connection node_1a
+#
+# The following sleep is a workaround for issue GCF-861.
+# Normally it's sufficient to make sure that the CC happened
+# by checking that wsrep_cluster_size has shrinked, as above.
+# However that is not always enough, so we sleep a few seconds.
+# See GCF-861 on how to reproduce.
+#
+
+--connection node_1a
+--sleep 6
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+
+--connection node_3
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--source include/galera_wait_ready.inc
+
+# SR table on master should contain no entries after going back to Prim state
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+--connection node_2
+# And none on slave
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+# SR table is now empty everywhere
+--connection node_1a
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
new file mode 100644
index 00000000000..eb7f5603452
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
@@ -0,0 +1,43 @@
+#
+# GCF-832 SR: mysql.wsrep_streaming_log table remains populated on all nodes after crash
+# followed by immediate recovery
+#
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_2
+SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal";
+
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+--exec echo "wait" > $_expect_file_name
+
+CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+--error 2013
+COMMIT;
+
+--source include/start_mysqld.inc
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--enable_reconnect
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test b/mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test
new file mode 100644
index 00000000000..ed7adc8313a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/MDEV-26707.test
@@ -0,0 +1,162 @@
+#
+# MDEV-26707: SR transaction rolls back locally, but not in cluster
+#
+# This test excercises the following scenario:
+# Initially we have a three node cluster where node 2 has an active
+# SR transaction that has replicated one fragment.
+# Node 3 disconnects from the cluster, followed by disconnect of node 2.
+# Node 2 attempts to COMMIT its transaction, but fails because node 2 is
+# non-primary. This failure causes the transaction to rolled back locally
+# (node 2 can't communicate with the cluster at this point, so rollback
+# fragment cannot be sent successfully)
+# Node 3 joins back creating non-primary view (node 1, node 3).
+# Then node 2 joins back creating primary view (node 1, node 1, node 3).
+# If bug is present, we have that node 2 has rolled back locally, while
+# the same transaction is still active nodes 1 and 3, leaving entries
+# in their wsrep_streaming_log tables.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (21);
+
+--connection node_1
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+
+--connection node_3
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+
+#
+# Disconnect node 3 from cluster
+#
+--connection node_3a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+#
+# Issue commit block COMMIT before certification on node 2
+#
+--connection node_2
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
+--send COMMIT
+
+--connection node_2a
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
+
+#
+# Disconnect node 2
+#
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+
+#
+# Unblock COMMIT and expect it to fail
+#
+SET DEBUG_SYNC = 'now SIGNAL continue';
+
+--connection node_2
+--error ER_ERROR_DURING_COMMIT
+--reap
+
+--connection node_2a
+SET DEBUG_SYNC = 'RESET';
+
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+
+#
+# Reconnect node 3
+#
+--connection node_3a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_streaming_log;
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+
+#
+# Reconnect node 2
+#
+--connection node_2a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_3a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+
+#
+# Expect no entries in wsrep_streaming_log
+#
+--connection node_1a
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+--connection node_2a
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+--connection node_3a
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test
new file mode 100644
index 00000000000..30fd0192f26
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test
@@ -0,0 +1,127 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of gmcast.isolate on master during an SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+
+#
+# Trigger gmcast.isolate=1 .
+# The transaction is aborted and we expect the SR tables to be cleaned up
+#
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+
+#
+# Expect that the transaction is cleaned up entirely across the cluster and in all mysql.wsrep_streaming_log tables
+#
+
+--connection node_2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_3
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+#
+# Restore cluster
+#
+
+--connection node_1a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_3
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_1a
+--source include/galera_wait_ready.inc
+
+#
+# Confirm that the previous transaction is gone on Node #1 as well
+#
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# Confirm that the transaction can be retried
+#
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+CALL mtr.add_suppression("failed to send SR rollback for");
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test
new file mode 100644
index 00000000000..95aa1a37a78
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test
@@ -0,0 +1,59 @@
+#
+# This test kills the slave before a Streaming Replication transaction has started
+# and restarts it when the transaction is already in progress. IST should
+# bring the slave up to date so that it can receive the complete transaction.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+COMMIT;
+SELECT COUNT(*) = 10 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 10 FROM t1;
+
+--connection node_3
+SELECT COUNT(*) = 10 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_master.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_master.test
new file mode 100644
index 00000000000..c7e7528679b
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_master.test
@@ -0,0 +1,58 @@
+#
+# This test kills the master while a Streaming Replication transaction is in progress
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_3
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_2
+--source include/kill_galera.inc
+
+--connection node_3
+# We expect that uncommitted values are no longer present
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# and we can insert them again
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 1 FROM t1;
+
+DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply.test
new file mode 100644
index 00000000000..270af538085
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply.test
@@ -0,0 +1,81 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# and after a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+
+--connection node_2
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 15 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--connection node_3
+CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test
new file mode 100644
index 00000000000..c0df6b2777a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test
@@ -0,0 +1,80 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# and after a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent even if ROLLBACK
+# is issued on the SR transaction after restart.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+
+--connection node_2
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+ROLLBACK;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test
new file mode 100644
index 00000000000..83964769ef5
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test
@@ -0,0 +1,56 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# and after a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+--sleep 1
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+ROLLBACK;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--source include/start_mysqld.inc
+--sleep 1
+
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+--connection node_2
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test
new file mode 100644
index 00000000000..ea549a6bea2
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test
@@ -0,0 +1,90 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# but before a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+
+# Block node #2's applier before table t1's inserts have come into play
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+LOCK TABLE t2 WRITE;
+
+--connection node_1
+INSERT INTO t2 VALUES (1);
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--source include/kill_galera.inc
+--source include/start_mysqld.inc
+
+--connection node_1
+# The following COMMIT usually succeeds. Due to timing,
+# it is however possible that this node delivers the same
+# view twice during configuration change. In which case
+# this transaction will mistakenly be considered orphaned,
+# and aborted.
+--error 0, ER_LOCK_DEADLOCK
+COMMIT;
+
+
+--disable_query_log
+if ($mysql_errno == 0) {
+ --connection node_1
+ SELECT COUNT(*) = 5 AS count_match FROM t1;
+ --connection node_2
+ SELECT COUNT(*) = 5 AS count_match FROM t1;
+}
+
+if ($mysql_errno == 1213) {
+ --connection node_1
+ SELECT COUNT(*) = 0 AS count_match FROM t1;
+ --connection node_2
+ SELECT COUNT(*) = 0 AS count_match FROM t1;
+}
+--enable_query_log
+
+--connection node_1
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE t2;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf
new file mode 100644
index 00000000000..910d945949a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf
@@ -0,0 +1,5 @@
+!include ../galera_3nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.weight=3'
+
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test
new file mode 100644
index 00000000000..62122fe4292
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test
@@ -0,0 +1,177 @@
+#
+# Test the case where the cluster splits 3 ways . The master remains in the
+# primary component and is able to commit its transaction.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+#
+# Begin a separate SR transaction on every node and confirm that each node
+# has SR table entries for every transaction
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (200);
+INSERT INTO t1 VALUES (201);
+INSERT INTO t1 VALUES (202);
+INSERT INTO t1 VALUES (203);
+INSERT INTO t1 VALUES (204);
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 2 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (300);
+INSERT INTO t1 VALUES (301);
+INSERT INTO t1 VALUES (302);
+INSERT INTO t1 VALUES (303);
+INSERT INTO t1 VALUES (304);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+--connection node_1a
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 3 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+#
+# Isolate nodes #2 and #3 into separate non-primary components
+#
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_3a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+
+#
+# Restore cluster
+#
+
+--connection node_2a
+--source include/wsrep_wait_disconnect.inc
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+--source include/galera_wait_ready.inc
+
+--connection node_3a
+--source include/wsrep_wait_disconnect.inc
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+--source include/galera_wait_ready.inc
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--let $node_1_gcomm_uuid = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'`
+
+--connection node_2a
+--source include/wait_condition.inc
+
+--connection node_3a
+--source include/wait_condition.inc
+
+
+#
+# Confirm that the rejoined nodes only have node #1's transaction in their SR tables
+#
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+--disable_query_log
+--eval SELECT DISTINCT node_uuid = '$node_1_gcomm_uuid' AS wsrep_gcomm_uuid_match FROM mysql.wsrep_streaming_log;
+--enable_query_log
+
+--connection node_3
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+--disable_query_log
+--eval SELECT DISTINCT node_uuid = '$node_1_gcomm_uuid' AS wsrep_gcomm_uuid_match FROM mysql.wsrep_streaming_log;
+--enable_query_log
+
+#
+# Finalize transaction on node #1
+#
+
+--connection node_1
+INSERT INTO t1 VALUES (30);
+INSERT INTO t1 VALUES (31);
+INSERT INTO t1 VALUES (32);
+INSERT INTO t1 VALUES (33);
+INSERT INTO t1 VALUES (34);
+COMMIT;
+
+#
+# Confirm that transaction is replicated correctly and SR tables are empty at the end of the test
+#
+
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SET AUTOCOMMIT=ON;
+
+--connection node_2
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SET AUTOCOMMIT=ON;
+
+--connection node_3
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SET AUTOCOMMIT=ON;
+
+DROP TABLE t1;
+
+--connection node_1
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+--connection node_2
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+--connection node_3
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split_no_primary.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split_no_primary.test
new file mode 100644
index 00000000000..f9aab8316f1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split_no_primary.test
@@ -0,0 +1,126 @@
+#
+# This test verifies that an orphaned SR gets cleanup upon cluster
+# reconnection. Specifically, the case where the cluster goes through
+# a state of no primary components, and the nodes rejoin with the
+# same IDs.
+#
+
+--source include/galera_cluster.inc
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+
+--connection node_3
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (31);
+INSERT INTO t1 VALUES (32);
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+
+--connection node_3a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+
+--connection node_1a
+# wait until cluster is partitioned
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_2a
+# wait until cluster is partitioned
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_3a
+# wait until cluster is partitioned
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_2a
+# reconnect node 2
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+
+--connection node_3a
+# reconnect node 3
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+
+# wait for the cluster to whole again
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+
+--connection node_2a
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+
+--connection node_3a
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
+
+--connection node_1a
+# check that the streaming log has been cleared and there are no locks
+# from the SRs by issuing conflicting inserts
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+INSERT INTO t1 VALUES(11);
+INSERT INTO t1 VALUES(21);
+INSERT INTO t1 VALUES(31);
+SELECT * FROM t1;
+
+--connection node_2a
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+--connection node_3a
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+
+
+# check that all 3 SRs have been rolled back
+--connection node_1
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES(103);
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES(203);
+
+--connection node_3
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES(303);
+
+--connection node_1
+DROP TABLE t1;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/disabled.def b/mysql-test/suite/galera_sr/disabled.def
new file mode 100644
index 00000000000..58b4af32300
--- /dev/null
+++ b/mysql-test/suite/galera_sr/disabled.def
@@ -0,0 +1,13 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : MDEV-<xxxx> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+
+GCF-1060 : MDEV-26528 wrong usage of mutex LOCK_thd_kill and LOCK_thd_kill
diff --git a/mysql-test/suite/galera_sr/galera_2nodes.cnf b/mysql-test/suite/galera_sr/galera_2nodes.cnf
new file mode 100644
index 00000000000..0412b5654dd
--- /dev/null
+++ b/mysql-test/suite/galera_sr/galera_2nodes.cnf
@@ -0,0 +1 @@
+!include ../galera/galera_2nodes.cnf
diff --git a/mysql-test/suite/galera_sr/my.cnf b/mysql-test/suite/galera_sr/my.cnf
new file mode 100644
index 00000000000..ca163a540d9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/my.cnf
@@ -0,0 +1 @@
+!include galera_2nodes.cnf
diff --git a/mysql-test/suite/galera_sr/r/GCF-1008.result b/mysql-test/suite/galera_sr/r/GCF-1008.result
new file mode 100644
index 00000000000..f55f6f33f3e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1008.result
@@ -0,0 +1,70 @@
+connection node_2;
+connection node_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'x');
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,before_local_commit_monitor_enter';
+connection node_2;
+COMMIT;
+connection node_2b;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+REPLACE INTO t1 VALUES (1,'y');
+connection node_2b;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'signal=before_local_commit_monitor_enter';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'x');
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,before_certify_apply_monitor_enter';
+connection node_2;
+COMMIT;
+connection node_2b;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+REPLACE INTO t1 VALUES (1,'y');
+connection node_2b;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'signal=before_certify_apply_monitor_enter';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1018.result b/mysql-test/suite/galera_sr/r/GCF-1018.result
new file mode 100644
index 00000000000..12a4d3c70af
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1018.result
@@ -0,0 +1,25 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+INSERT INTO t1 (f2) VALUES ('a');
+INSERT INTO t1 (f2) VALUES ('b');
+INSERT INTO t1 (f2) VALUES ('c');
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_certify_apply_monitor_enter';
+connection node_2;
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;;
+connection node_2a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+connection node_1;
+INSERT INTO t1 (f2) VALUES ('d'),('e');
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'signal=after_certify_apply_monitor_enter';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1018B.result b/mysql-test/suite/galera_sr/r/GCF-1018B.result
new file mode 100644
index 00000000000..4752c072cc1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1018B.result
@@ -0,0 +1,12 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1051.result b/mysql-test/suite/galera_sr/r/GCF-1051.result
new file mode 100644
index 00000000000..82fa389bb1d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1051.result
@@ -0,0 +1,46 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size=1;
+connection node_1;
+START TRANSACTION;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=OFF;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (2);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1060.result b/mysql-test/suite/galera_sr/r/GCF-1060.result
new file mode 100644
index 00000000000..58af97d064b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1060.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+Running a concurrent test with the following queries:
+TRUNCATE TABLE t1
+INSERT INTO t1 VALUE (1,'x'),(2,'x'),(3,'x')
+INSERT INTO t1 VALUE (4, 'z');
+connection node_1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1;
+Concurrent test end
diff --git a/mysql-test/suite/galera_sr/r/GCF-561.result b/mysql-test/suite/galera_sr/r/GCF-561.result
new file mode 100644
index 00000000000..ec5ec786628
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-561.result
@@ -0,0 +1,52 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
+EXPECT_5
+5
+ALTER TABLE t1 DROP COLUMN f2;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_1;
+INSERT INTO t1 VALUES (6, 6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+INSERT INTO t1 VALUES (6, 6);
+ERROR 21S01: Column count doesn't match value count at row 1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_2;
+set global wsrep_sync_wait=15;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+EXPECT_5
+5
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-571.result b/mysql-test/suite/galera_sr/r/GCF-571.result
new file mode 100644
index 00000000000..fd20afd7e6e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-571.result
@@ -0,0 +1,67 @@
+connection node_2;
+connection node_1;
+SET AUTOCOMMIT=OFF;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+SAVEPOINT A;
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+COUNT(*) = 1
+1
+connection node_1;
+ROLLBACK TO SAVEPOINT A;
+connection node_1a;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+COUNT(*) = 1
+0
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+COUNT(*) = 1
+0
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-572.result b/mysql-test/suite/galera_sr/r/GCF-572.result
new file mode 100644
index 00000000000..41ae2378a3f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-572.result
@@ -0,0 +1,59 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
+INSERT INTO t2 VALUES (1),(2),(3);
+ALTER TABLE t2 DROP PRIMARY KEY;
+INSERT INTO t2 VALUES (1);
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 SELECT * FROM t2;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1
+connection node_2;
+SELECT * FROM t1;
+f1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(10)) ENGINE=InnoDB;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'node1');
+connection node_1a;
+INSERT INTO t1 VALUES (5, 'node2');
+connection node_1;
+INSERT INTO t1 VALUES (5, 'node1');
+ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
+SELECT * FROM t1;
+f1 f2
+1 node1
+5 node2
+SET SESSION wsrep_trx_fragment_size = 10000;
+START TRANSACTION;
+INSERT INTO t1 VALUE (10, 'node1');
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+connection node_1a;
+INSERT INTO t1 VALUES(15, 'node2');
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 node1
+5 node2
+10 node1
+INSERT INTO t1 VALUES(15, 'node1');
+ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
+COMMIT;
+SELECT * FROM t1;
+f1 f2
+1 node1
+5 node2
+10 node1
+15 node2
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-580.result b/mysql-test/suite/galera_sr/r/GCF-580.result
new file mode 100644
index 00000000000..3ee69c6c4b3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-580.result
@@ -0,0 +1,13 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+last_committed_matches_fragment_count
+1
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-585.result b/mysql-test/suite/galera_sr/r/GCF-585.result
new file mode 100644
index 00000000000..ab5fed59081
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-585.result
@@ -0,0 +1,28 @@
+connection node_2;
+connection node_1;
+create table t1 (f1 integer primary key) engine=innodb;
+set autocommit=off;
+set session wsrep_trx_fragment_size=1;
+start transaction;
+insert into t1 values (1);
+insert into t1 values (2),(1);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+alter table t1 drop primary key;
+drop table t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+update t1 set f1 = 100 where f1 = 10;
+connection node_2;
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+SET SESSION wsrep_trx_fragment_size=1;
+SET SESSION innodb_lock_wait_timeout=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+delete from t1 where f1 > 10;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+delete from t1 where f1 > 10 and f1 < 100;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-597.result b/mysql-test/suite/galera_sr/r/GCF-597.result
new file mode 100644
index 00000000000..52b13ba3268
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-597.result
@@ -0,0 +1,27 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+connection node_2;
+ROLLBACK;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
+disconnect node_1a;
+disconnect node_2a;
diff --git a/mysql-test/suite/galera_sr/r/GCF-620.result b/mysql-test/suite/galera_sr/r/GCF-620.result
new file mode 100644
index 00000000000..02cb163a199
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-620.result
@@ -0,0 +1,18 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 200;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (1);
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 2 FROM t1;
+COUNT(*) = 2
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-623.result b/mysql-test/suite/galera_sr/r/GCF-623.result
new file mode 100644
index 00000000000..f3500b7ac2b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-623.result
@@ -0,0 +1,29 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-627.result b/mysql-test/suite/galera_sr/r/GCF-627.result
new file mode 100644
index 00000000000..7cd2ab63ff3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-627.result
@@ -0,0 +1,24 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+connection node_2;
+DROP TABLE t1;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+INSERT INTO t1 VALUES (2);
+ERROR 42S02: Table 'test.t1' doesn't exist
+connection node_1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_2;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
diff --git a/mysql-test/suite/galera_sr/r/GCF-845.result b/mysql-test/suite/galera_sr/r/GCF-845.result
new file mode 100644
index 00000000000..df842049332
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-845.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+CREATE TABLE IF NOT EXISTS t1 (f1 INTEGER) ENGINE = InnoDB;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (161);
+COMMIT;
+DELETE FROM t1 WHERE f1 > 13;
+disconnect node_1a;
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+include/assert_grep.inc [No BF-BF log line found]
diff --git a/mysql-test/suite/galera_sr/r/GCF-851.result b/mysql-test/suite/galera_sr/r/GCF-851.result
new file mode 100644
index 00000000000..52aa4c78745
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-851.result
@@ -0,0 +1,30 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+SET SESSION AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (10);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+START TRANSACTION;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+connection node_1;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-867.result b/mysql-test/suite/galera_sr/r/GCF-867.result
new file mode 100644
index 00000000000..9521a86d621
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-867.result
@@ -0,0 +1,4 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-889.result b/mysql-test/suite/galera_sr/r/GCF-889.result
new file mode 100644
index 00000000000..617377de15a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-889.result
@@ -0,0 +1,25 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+DELETE FROM t1 WHERE f1 = 1;
+SET SESSION wsrep_trx_fragment_size = 0;
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) = 1;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT COUNT(*) = 1;
+COUNT(*) = 1
+1
+CALL mtr.add_suppression("Could not execute Delete_rows event on table");
+CALL mtr.add_suppression("Can't find record in 't1'");
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-900.result b/mysql-test/suite/galera_sr/r/GCF-900.result
new file mode 100644
index 00000000000..caa2d2c4138
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-900.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 128;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 0);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2, 0);
+connection node_2;
+ALTER TABLE t1 DROP COLUMN f2;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1a;
+INSERT INTO t1 VALUES (3, 0);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-18585.result b/mysql-test/suite/galera_sr/r/MDEV-18585.result
new file mode 100644
index 00000000000..d30def1ea63
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-18585.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_unit='ROWS';
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES (1), (2);
+SET SESSION wsrep_trx_fragment_unit='BYTES';
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES (3), (4);
+SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES (5), (6);
+SET SESSION wsrep_trx_fragment_unit=default;
+SET SESSION wsrep_trx_fragment_size=default;
+SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 518;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000002 518 Gtid 1 560 BEGIN GTID 0-1-2
+mysqld-bin.000002 560 Annotate_rows 1 613 INSERT INTO t1 VALUES (1), (2)
+mysqld-bin.000002 613 Table_map 1 658 table_id: # (test.t1)
+mysqld-bin.000002 658 Write_rows_v1 1 696 table_id: # flags: STMT_END_F
+mysqld-bin.000002 696 Table_map 1 741 table_id: # (test.t1)
+mysqld-bin.000002 741 Write_rows_v1 1 779 table_id: # flags: STMT_END_F
+mysqld-bin.000002 779 Xid 1 810 COMMIT /* xid=# */
+mysqld-bin.000002 810 Gtid 1 852 BEGIN GTID 0-1-3
+mysqld-bin.000002 852 Annotate_rows 1 905 INSERT INTO t1 VALUES (3), (4)
+mysqld-bin.000002 905 Table_map 1 950 table_id: # (test.t1)
+mysqld-bin.000002 950 Write_rows_v1 1 988 table_id: # flags: STMT_END_F
+mysqld-bin.000002 988 Table_map 1 1033 table_id: # (test.t1)
+mysqld-bin.000002 1033 Write_rows_v1 1 1071 table_id: # flags: STMT_END_F
+mysqld-bin.000002 1071 Xid 1 1102 COMMIT /* xid=# */
+mysqld-bin.000002 1102 Gtid 1 1144 BEGIN GTID 0-1-4
+mysqld-bin.000002 1144 Annotate_rows 1 1197 INSERT INTO t1 VALUES (5), (6)
+mysqld-bin.000002 1197 Table_map 1 1242 table_id: # (test.t1)
+mysqld-bin.000002 1242 Write_rows_v1 1 1285 table_id: # flags: STMT_END_F
+mysqld-bin.000002 1285 Xid 1 1316 COMMIT /* xid=# */
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-21613.result b/mysql-test/suite/galera_sr/r/MDEV-21613.result
new file mode 100644
index 00000000000..67af2d49331
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-21613.result
@@ -0,0 +1,20 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET DEBUG_SYNC = "wsrep_before_fragment_removal SIGNAL fragment_removal_reached WAIT_FOR fragment_removal_continue";
+START TRANSACTION;
+INSERT INTO t1 VALUES(1), (2);
+COMMIT;
+connect node_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR fragment_removal_reached";
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+TRUNCATE TABLE t1;
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_ctrl;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-22616.result b/mysql-test/suite/galera_sr/r/MDEV-22616.result
new file mode 100644
index 00000000000..0c3847bd9b9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-22616.result
@@ -0,0 +1,13 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-23623.result b/mysql-test/suite/galera_sr/r/MDEV-23623.result
new file mode 100644
index 00000000000..edba2a16bcb
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-23623.result
@@ -0,0 +1,26 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+INSERT INTO t1 (f2) VALUES ('a');
+INSERT INTO t1 (f2) VALUES ('b');
+INSERT INTO t1 (f2) VALUES ('c');
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_certify_apply_monitor_enter';
+connection node_2;
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;;
+connection node_2a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+connection node_1;
+INSERT INTO t1 (f2) VALUES ('d'),('e');
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'signal=after_certify_apply_monitor_enter';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-25226.result b/mysql-test/suite/galera_sr/r/MDEV-25226.result
new file mode 100644
index 00000000000..4699023562d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-25226.result
@@ -0,0 +1,24 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+SET SESSION wsrep_on=OFF;
+ERROR 25000: You are not allowed to execute this command in a transaction
+SET GLOBAL wsrep_on=OFF;
+ERROR 25000: You are not allowed to execute this command in a transaction
+INSERT INTO t1 VALUES(2);
+COMMIT;
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-25717.result b/mysql-test/suite/galera_sr/r/MDEV-25717.result
new file mode 100644
index 00000000000..22f8d5eb5db
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-25717.result
@@ -0,0 +1,47 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (4);
+connection node_1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+3
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_toi";
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_bf_abort";
+connection node_1;
+TRUNCATE TABLE t1;
+connection node_1a;
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_bf_abort_reached";
+connection node_2a;
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_toi_reached";
+connection node_2;
+INSERT INTO t1 VALUES (5);
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = DEFAULT;
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_toi";
+connection node_2;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1a;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL DEBUG_DBUG = "+d,sync.wsrep_log_dummy_write_set";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_bf_abort";
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_log_dummy_write_set_reached";
+connection node_1;
+connection node_2;
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "RESET";
+connection node_1;
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "RESET";
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-25718.result b/mysql-test/suite/galera_sr/r/MDEV-25718.result
new file mode 100644
index 00000000000..fa3f67fb342
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-25718.result
@@ -0,0 +1,27 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+SET debug_sync = "ha_write_row_end SIGNAL write_row_end WAIT_FOR write_row_continue";
+INSERT INTO t1 VALUES (1);;
+connect node_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_ctrl;
+SET debug_sync = "now WAIT_FOR write_row_end";
+SET GLOBAL debug_dbug = '+d,wsrep_streaming_rollback';
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+TRUNCATE TABLE t1;;
+connection node_ctrl;
+SET SESSION debug_sync = "now WAIT_FOR wsrep_streaming_rollback_reached";
+SET SESSION wsrep_sync_wait = 0;
+SET debug_sync = "now SIGNAL write_row_continue";
+SET SESSION debug_sync = "now SIGNAL wsrep_streaming_rollback_continue";
+connection node_1a;
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_ctrl;
+SET GLOBAL debug_dbug = "";
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/MDEV-27553.result b/mysql-test/suite/galera_sr/r/MDEV-27553.result
new file mode 100644
index 00000000000..5a6a5bd4956
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-27553.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+connection node_2;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) `Expect 1` FROM mysql.wsrep_streaming_log;
+Expect 1
+1
+SET @@global.debug_dbug="+d,ha_index_init_fail";
+ROLLBACK;
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) `Expect 0` FROM mysql.wsrep_streaming_log;
+Expect 0
+0
+connection node_2;
+SET @@global.debug_dbug="";
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) `Expect 1` FROM mysql.wsrep_streaming_log;
+Expect 1
+1
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+# restart
+SELECT COUNT(*) `Expect 0` FROM mysql.wsrep_streaming_log;
+Expect 0
+0
+DROP TABLE t1;
+CALL mtr.add_suppression("WSREP: Failed to init table for index scan");
+CALL mtr.add_suppression("WSREP: Failed to apply write set");
+CALL mtr.add_suppression("Failed to report last committed");
diff --git a/mysql-test/suite/galera_sr/r/MDEV-27615.result b/mysql-test/suite/galera_sr/r/MDEV-27615.result
new file mode 100644
index 00000000000..a3475811285
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/MDEV-27615.result
@@ -0,0 +1,27 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
+SET DEBUG_SYNC='wsrep_before_fragment_certification SIGNAL before_fragment WAIT_FOR continue';
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC='now WAIT_FOR before_fragment';
+SET GLOBAL wsrep_cluster_address = '';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_2;
+ERROR HY000: Lost connection to MySQL server during query
+connection node_2a;
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT * FROM t1;
+f1
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
diff --git a/mysql-test/suite/galera_sr/r/galera-features#56.result b/mysql-test/suite/galera_sr/r/galera-features#56.result
new file mode 100644
index 00000000000..15fcb475acb
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera-features#56.result
@@ -0,0 +1,38 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) Engine=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+connection node_2;
+set session wsrep_sync_wait=15;
+SELECT COUNT(*) from ten;
+COUNT(*)
+10
+SELECT COUNT(*) from t1;
+COUNT(*)
+0
+set session wsrep_sync_wait=0;
+SET GLOBAL wsrep_slave_threads = 4;
+SET SESSION wsrep_trx_fragment_size = 1;
+connection node_1;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;;
+connection node_1a;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;;
+connection node_2;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;;
+connection node_1;
+connection node_1a;
+connection node_2;
+set session wsrep_sync_wait=15;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+300
+SELECT COUNT(DISTINCT f1) FROM t1;
+COUNT(DISTINCT f1)
+300
+connection default;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result b/mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result
new file mode 100644
index 00000000000..bf92a48b242
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result
@@ -0,0 +1,555 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_sync_wait = 0;
+galera_sr_bf_abort_at_commit = 0
+after_replicate_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+galera_sr_bf_abort_at_commit = 1
+after_replicate_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_blob.result b/mysql-test/suite/galera_sr/r/galera_sr_blob.result
new file mode 100644
index 00000000000..db25f54a611
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_blob.result
@@ -0,0 +1,23 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 TEXT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+connection node_2;
+wsrep_last_committed_delta
+1
+connection node_1;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT LENGTH(f1) = 65535 FROM t1;
+LENGTH(f1) = 65535
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result
new file mode 100644
index 00000000000..9e223414fe4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result
@@ -0,0 +1,66 @@
+connection node_2;
+connection node_1;
+CALL mtr.add_suppression("WSREP: discarding established.*");
+connection node_1;
+connection node_2;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+connection node_1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_cluster_address = '';
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2;
+INSERT INTO t1 VALUES (6);
+ERROR HY000: Lost connection to MySQL server during query
+connection node_1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_2a;
+connection node_1;
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2b;
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+DROP TABLE t1;
+connection node_2b;
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_no_primary.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_no_primary.result
new file mode 100644
index 00000000000..982d8b3aefe
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_no_primary.result
@@ -0,0 +1,70 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_1;
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+connection node_2;
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+SELECT COUNT(*) `expect 6` FROM mysql.wsrep_streaming_log;
+expect 6
+6
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_sync_wait = 0;
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 1
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status non-Primary
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 1
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status non-Primary
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 2
+connection node_1a;
+SHOW STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 2
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+expect 0
+0
+connection node_2a;
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+expect 0
+0
+INSERT INTO t1 VALUES(10);
+INSERT INTO t1 VALUES(20);
+SELECT * FROM t1;
+f1
+10
+20
+connection node_1;
+INSERT INTO t1 VALUES(13);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
+INSERT INTO t1 VALUES(23);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
new file mode 100644
index 00000000000..d439380e2ce
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
@@ -0,0 +1,61 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SET GLOBAL wsrep_cluster_address = '';
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = default;
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (16);
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+CALL mtr.add_suppression("points to own listening address, blacklisting");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_concurrent.result b/mysql-test/suite/galera_sr/r/galera_sr_concurrent.result
new file mode 100644
index 00000000000..75acba366c2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_concurrent.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t2 VALUES (3);
+INSERT INTO t2 VALUES (4);
+INSERT INTO t2 VALUES (5);
+connection node_1;
+COMMIT;
+connection node_1a;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 5 FROM t2;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict.result
new file mode 100644
index 00000000000..a45bffeaa81
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+INSERT INTO t1 VALUES(1);;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_1;
+COMMIT;
+connection node_2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result
new file mode 100644
index 00000000000..5de1ac2422c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result
@@ -0,0 +1,31 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result
new file mode 100644
index 00000000000..2ee3d4c714c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result
@@ -0,0 +1,28 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+INSERT INTO t1 VALUES (5);;
+connection node_1;
+COMMIT;
+connection node_2;
+ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result
new file mode 100644
index 00000000000..92bf007e21b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result
@@ -0,0 +1,29 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+ROLLBACK;
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_create_drop.result b/mysql-test/suite/galera_sr/r/galera_sr_create_drop.result
new file mode 100644
index 00000000000..c8658f09ff0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_create_drop.result
@@ -0,0 +1,28 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ PRIMARY KEY (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+connection node_1;
+DROP TABLE t1;
+connection node_2;
+SHOW CREATE TABLE t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+CREATE DATABASE mdev_18587;
+connection node_2;
+SHOW DATABASES LIKE 'mdev_18587';
+Database (mdev_18587)
+mdev_18587
+connection node_1;
+DROP DATABASE mdev_18587;
+connection node_2;
+SHOW DATABASES LIKE 'mdev_18587';
+Database (mdev_18587)
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
new file mode 100644
index 00000000000..5858a9c6eb8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
@@ -0,0 +1,65 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) as expect_5 FROM mysql.wsrep_streaming_log;
+expect_5
+5
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_1;
+INSERT INTO t1 VALUES (6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+ROLLBACK;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+INSERT INTO t1 (f1) VALUES (2);
+INSERT INTO t1 (f1) VALUES (3);
+INSERT INTO t1 (f1) VALUES (4);
+INSERT INTO t1 (f1) VALUES (5);
+INSERT INTO t1 (f1) VALUES (6);
+COMMIT;
+SELECT COUNT(*) as expect_6 FROM t1;
+expect_6
+6
+SELECT * FROM t1;
+f1 f2
+1 NULL
+2 NULL
+3 NULL
+4 NULL
+5 NULL
+6 NULL
+SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) as expect_6 FROM t1;
+expect_6
+6
+SELECT * FROM t1;
+f1 f2
+1 NULL
+2 NULL
+3 NULL
+4 NULL
+5 NULL
+6 NULL
+SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
+expect_0
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result
new file mode 100644
index 00000000000..fcd6cfa4a6e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result
@@ -0,0 +1,23 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+DROP SCHEMA test;
+SELECT COUNT(*) = 0 FROM test.t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+connection node_1;
+INSERT INTO test.t1 VALUES (6, 6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+INSERT INTO test.t1 VALUES (6, 6);
+ERROR 42S02: Table 'test.t1' doesn't exist
+CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result
new file mode 100644
index 00000000000..58663caf134
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result
@@ -0,0 +1,50 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+ALTER TABLE t1 DROP COLUMN f2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (6, 6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (6, 6);
+ERROR 21S01: Column count doesn't match value count at row 1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result
new file mode 100644
index 00000000000..0f23ade58c1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result
@@ -0,0 +1,42 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+ALTER TABLE t2 DROP COLUMN f2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (6, 6);
+connection node_2;
+connection node_1;
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result b/mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result
new file mode 100644
index 00000000000..ad843c7c2c6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result
@@ -0,0 +1,46 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB;
+CREATE UNIQUE INDEX i1 ON t1 (f1(512));
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1024;
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (REPEAT('g', 1024)),(REPEAT('c', 512));
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+connection node_2;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result b/mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result
new file mode 100644
index 00000000000..1d12533cc1d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result
@@ -0,0 +1,39 @@
+connection node_2;
+connection node_1;
+CREATE TABLE grandparent (
+id INT NOT NULL PRIMARY KEY
+) ENGINE=InnoDB;
+CREATE TABLE parent (
+id INT NOT NULL PRIMARY KEY,
+grandparent_id INT,
+FOREIGN KEY (grandparent_id)
+REFERENCES grandparent(id)
+ON UPDATE CASCADE
+) ENGINE=InnoDB;
+CREATE TABLE child (
+id INT NOT NULL PRIMARY KEY,
+grandparent_id INT,
+FOREIGN KEY (grandparent_id)
+REFERENCES parent(grandparent_id)
+ON UPDATE CASCADE
+) ENGINE=InnoDB;
+INSERT INTO grandparent VALUES (1),(2),(3),(4);
+INSERT INTO parent VALUES (1,1), (2,2);
+INSERT INTO child VALUES (1,1), (2,2);
+connection node_1;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+UPDATE grandparent SET id = 5 WHERE id = 1;
+connection node_2;
+SET SESSION innodb_lock_wait_timeout = 1;
+UPDATE grandparent SET id = 10 WHERE id = 5;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DELETE FROM child;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection node_1;
+COMMIT;
+include/diff_servers.inc [servers=1 2]
+DROP TABLE child;
+DROP TABLE parent;
+DROP TABLE grandparent;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_gtid.result b/mysql-test/suite/galera_sr/r/galera_sr_gtid.result
new file mode 100644
index 00000000000..be631d1d916
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_gtid.result
@@ -0,0 +1,57 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SET SESSION wsrep_trx_fragment_size=1;
+UPDATE t1 SET f1 = 2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=0;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size=0;
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000002 <Pos> Gtid_list 1 <End_log_pos> []
+mysqld-bin.000002 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000002 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000002
+mysqld-bin.000002 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000002 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INT PRIMARY KEY)
+mysqld-bin.000002 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000002 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000002 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000002 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000002 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000002 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000002 <Pos> Annotate_rows 2 <End_log_pos> UPDATE t1 SET f1 = 2
+mysqld-bin.000002 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000002 <Pos> Update_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000002 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+connection node_2;
+SELECT 1 FROM DUAL;
+1
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000003 <Pos> Gtid_list 2 <End_log_pos> []
+mysqld-bin.000003 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000003
+mysqld-bin.000003 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000003 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INT PRIMARY KEY)
+mysqld-bin.000003 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000003 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000003 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000003 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000003 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000003 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000003 <Pos> Annotate_rows 2 <End_log_pos> UPDATE t1 SET f1 = 2
+mysqld-bin.000003 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000003 <Pos> Update_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000003 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_insert_select.result b/mysql-test/suite/galera_sr/r/galera_sr_insert_select.result
new file mode 100644
index 00000000000..0302290123d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_insert_select.result
@@ -0,0 +1,18 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_2;
+connection node_1;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result
new file mode 100644
index 00000000000..45ca6909f29
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result
@@ -0,0 +1,31 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+Killing server ...
+connection node_1;
+# restart
+connection node_2;
+# restart
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result
new file mode 100644
index 00000000000..7ef86c65915
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result
@@ -0,0 +1,35 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+connection node_2;
+Killing server ...
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+Killing server ...
+# restart
+connection node_2;
+# restart
+connection node_1;
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+expect 0
+0
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) `expect 0` FROM t1;
+expect 0
+0
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+expect 0
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result
new file mode 100644
index 00000000000..7731c19e4da
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result
@@ -0,0 +1,32 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+Killing server ...
+connection node_1;
+# restart
+connection node_2;
+# restart
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result
new file mode 100644
index 00000000000..96a85bc038b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result
@@ -0,0 +1,32 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1a;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_query.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
new file mode 100644
index 00000000000..c775cd854a7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
@@ -0,0 +1,41 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;;
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+Killing query ...
+connection node_1;
+ERROR 70100: Query execution was interrupted
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+EXPECT_1000
+1000
+connection node_1;
+SET GLOBAL wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_1;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result
new file mode 100644
index 00000000000..eab6110afb1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result
@@ -0,0 +1,54 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER);
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+LOCK TABLE t2 WRITE;
+connection node_1;
+INSERT INTO t2 VALUES (1);
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+connection node_2;
+# restart
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+COMMIT;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_2;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+15
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result b/mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result
new file mode 100644
index 00000000000..bf111f5cee4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1024 * 1024 * 10;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 50000 FROM t1;
+COUNT(*) > 50000
+1
+connection node_1;
+ROLLBACK;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_load_data.result b/mysql-test/suite/galera_sr/r/galera_sr_load_data.result
new file mode 100644
index 00000000000..99885b42fa0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_load_data.result
@@ -0,0 +1,14 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 512;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+connection node_2;
+SELECT COUNT(*) = 20000 FROM t1;
+COUNT(*) = 20000
+1
+wsrep_last_committed_diff
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result b/mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result
new file mode 100644
index 00000000000..61e4b56aa43
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result
@@ -0,0 +1,19 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_load_data_splitting = TRUE;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+connection node_2;
+SELECT COUNT(*) = 95000 FROM t1;
+COUNT(*) = 95000
+1
+wsrep_last_committed_diff
+1
+connection node_1;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_log_bin.result b/mysql-test/suite/galera_sr/r/galera_sr_log_bin.result
new file mode 100644
index 00000000000..cb8e84383bc
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_log_bin.result
@@ -0,0 +1,124 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t3 VALUES (1);
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t4 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+connection node_1a;
+INSERT INTO t2 VALUES (2);
+COMMIT;
+connection node_2;
+INSERT INTO t3 VALUES (2);
+COMMIT;
+connection node_2a;
+INSERT INTO t4 VALUES (2);
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 2 FROM t4;
+COUNT(*) = 2
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-1
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-4
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+connection node_2;
+SELECT COUNT(*) = 2 FROM t4;
+COUNT(*) = 2
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 2 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-1
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-4
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result b/mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result
new file mode 100644
index 00000000000..8c89d100260
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 10000 FROM t1;
+COUNT(*) = 10000
+1
+connection node_1;
+ROLLBACK;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_multirow_rollback.result b/mysql-test/suite/galera_sr/r/galera_sr_multirow_rollback.result
new file mode 100644
index 00000000000..1795d16bbfa
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_multirow_rollback.result
@@ -0,0 +1,127 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+COMMIT;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'b');
+INSERT INTO t1 (f2) VALUES ('c'), ('d');
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+COMMIT;
+expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+f1 f2
+1 a
+2 b
+connection node_2;
+expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+f1 f2
+1 a
+2 b
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1000;
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+connection node_2;
+SELECT COUNT(*) AS expect_0 FROM t1;
+expect_0
+0
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE p(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE c(id int primary key, fk1 int) ENGINE=InnoDB;
+ALTER TABLE c ADD FOREIGN KEY (fk1) references p(id);
+INSERT INTO p VALUES(1, 0);
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO c VALUES (3,1);
+INSERT INTO c VALUES (1,1), (2,2);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+SELECT * FROM p;
+id j
+1 0
+SELECT * FROM c;
+id fk1
+connection node_2;
+SELECT * FROM p;
+id j
+1 0
+SELECT * FROM c;
+id fk1
+DROP TABLE c;
+DROP TABLE p;
+connection node_1;
+CREATE TABLE p(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE c(id int primary key, fk1 int) ENGINE=InnoDB;
+ALTER TABLE c ADD FOREIGN KEY (fk1) references p(id);
+INSERT INTO p VALUES(1, 0);
+SET SESSION wsrep_trx_fragment_size=1000;
+START TRANSACTION;
+INSERT INTO c VALUES (3,1);
+INSERT INTO c VALUES (1,1), (2,2);
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`c`, CONSTRAINT `c_ibfk_1` FOREIGN KEY (`fk1`) REFERENCES `p` (`id`))
+COMMIT;
+SELECT * FROM p;
+id j
+1 0
+SELECT * FROM c;
+id fk1
+3 1
+connection node_2;
+SELECT * FROM p;
+id j
+1 0
+SELECT * FROM c;
+id fk1
+3 1
+DROP TABLE c;
+DROP TABLE p;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_myisam.result b/mysql-test/suite/galera_sr/r/galera_sr_myisam.result
new file mode 100644
index 00000000000..97818f072e1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_myisam.result
@@ -0,0 +1,16 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 TEXT) ENGINE=MyISAM;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET GLOBAL wsrep_replicate_myisam = TRUE;
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT LENGTH(f1) = 65535 FROM t1;
+LENGTH(f1) = 65535
+1
+DROP TABLE t1;
+connection node_1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result
new file mode 100644
index 00000000000..6789990f18e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result
@@ -0,0 +1,60 @@
+connection node_2;
+connection node_1;
+Setting SST method to mysqldump ...
+call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
+call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
+connection node_1;
+CREATE USER 'sst';
+GRANT ALL PRIVILEGES ON *.* TO 'sst';
+SET GLOBAL wsrep_sst_auth = 'sst:';
+connection node_2;
+SET GLOBAL wsrep_sst_method = 'mysqldump';
+connection node_1;
+connection node_2;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 255) FROM ten AS a1, ten AS a2, ten AS a3;
+UPDATE t1 SET f2 = REPEAT('y', 255);
+connection node_2;
+connection node_2;
+Shutting down server ...
+connection node_1;
+connection node_2;
+# restart: with restart_parameters
+connection node_1;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+UPDATE t1 SET f2 = REPEAT('z', 255);
+COMMIT;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 1000 FROM t1;
+COUNT(*) = 1000
+1
+SELECT COUNT(*) = 1000 FROM t1 WHERE f2 = REPEAT('z', 255);
+COUNT(*) = 1000
+1
+DROP TABLE t1;
+DROP TABLE ten;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=0;
+connection node_1;
+CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
+DROP USER sst;
+connection node_2;
+CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
+CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
+CALL mtr.add_suppression("Can't open and lock time zone table");
+CALL mtr.add_suppression("Can't open and lock privilege tables");
+CALL mtr.add_suppression("Info table is not ready to be used");
+CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_nonPK_and_PA.result b/mysql-test/suite/galera_sr/r/galera_sr_nonPK_and_PA.result
new file mode 100644
index 00000000000..b7e9cf49f95
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_nonPK_and_PA.result
@@ -0,0 +1,46 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_slave_threads = 2;
+flush status;
+connection node_1;
+CREATE TABLE t1 (f1 int, f2 int) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 int primary key, f2 int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,0);
+INSERT INTO t1 VALUES (2,0);
+INSERT INTO t2 VALUES (1,0);
+INSERT INTO t2 VALUES (2,0);
+connection node_2;
+connection node_1;
+set session wsrep_trx_fragment_size=1;
+START TRANSACTION;
+UPDATE t1 SET f2=1 where f1=1;
+connection node_2;
+distance
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync';
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+update t2 set f2=1 where f1=1;
+connection node_2;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_1;
+UPDATE t2 set f2=2 where f1=2;
+connection node_2;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+COMMIT;
+connection node_1;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+DROP TABLE t1;
+DROP TABLE t2;
+connection node_2;
+SET GLOBAL wsrep_slave_threads = DEFAULT;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result b/mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result
new file mode 100644
index 00000000000..e2194e08cb8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result
@@ -0,0 +1,37 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_slave_threads = 5;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_1a;
+ROLLBACK;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
+connection node_2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback.result
new file mode 100644
index 00000000000..4b275c6e0b6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback.result
@@ -0,0 +1,42 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+ROLLBACK;
+connection node_2;
+connection node_1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+COMMIT;
+connection node_2;
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result
new file mode 100644
index 00000000000..1117a50ded1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result
@@ -0,0 +1,34 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+connection node_1;
+ROLLBACK;
+connection node_2;
+SELECT * FROM t1;
+f1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+EXPECT_5
+5
+connection node_1;
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+EXPECT_5
+5
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result
new file mode 100644
index 00000000000..9db548c1616
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result
@@ -0,0 +1,42 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+ROLLBACK TO SAVEPOINT s1;
+INSERT INTO t1 VALUES (21, 'c');
+INSERT INTO t1 VALUES (22, 'c');
+INSERT INTO t1 VALUES (23, 'c');
+INSERT INTO t1 VALUES (24, 'c');
+INSERT INTO t1 VALUES (25, 'c');
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'a';
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 5
+1
+connection node_1;
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result
new file mode 100644
index 00000000000..ce3214afe9e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a');
+INSERT INTO t2 VALUES (3, 'b');
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t2 SELECT * FROM t1;
+ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
+last_committed_diff
+3
+connection node_2;
+connection node_1;
+INSERT INTO t2 VALUES (1, 'c');
+connection node_2;
+INSERT INTO t2 VALUES (2, 'c');
+connection node_1;
+SELECT * FROM t2;
+f1 f2
+1 c
+2 c
+3 b
+connection node_2;
+SELECT * FROM t2;
+f1 f2
+1 c
+2 c
+3 b
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = DEFAULT;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result
new file mode 100644
index 00000000000..051b9d6b7ec
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result
@@ -0,0 +1,32 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1),(2),(3);
+connection node_1;
+connection node_2;
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+# restart
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1),(2),(3);
+connection node_1;
+SELECT COUNT(*) = 3 FROM t1;
+COUNT(*) = 3
+1
+DROP TABLE t1;
+connection node_2;
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for ");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
new file mode 100644
index 00000000000..34995d35a4f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
@@ -0,0 +1,48 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*");
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13);
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21),(22),(23);
+connection node_2;
+connection node_1;
+connection node_1a;
+INSERT INTO t1 VALUES (14),(15),(16);
+COMMIT;
+connection node_2;
+# restart
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SELECT COUNT(*) AS EXPECT_6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
+EXPECT_6
+6
+connection node_1b;
+INSERT INTO t1 VALUES (24),(25),(26);
+COMMIT;
+connection node_2;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+SELECT COUNT(*) AS EXPECT_12 FROM t1;
+EXPECT_12
+12
+connection node_1;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_slow.result b/mysql-test/suite/galera_sr/r/galera_sr_slow.result
new file mode 100644
index 00000000000..a03aac0d085
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_slow.result
@@ -0,0 +1,13 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET GLOBAL wsrep_trx_fragment_unit='bytes';
+SET GLOBAL wsrep_trx_fragment_size=10240000;
+SET GLOBAL slow_query_log=ON;
+SET GLOBAL log_output='TABLE';
+SELECT SLEEP(10);
+SLEEP(10)
+0
+SET GLOBAL wsrep_trx_fragment_unit=DEFAULT;
+SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
+SET GLOBAL log_output=DEFAULT;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result b/mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result
new file mode 100644
index 00000000000..875f2df5214
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SELECT COUNT(*) = 10000 FROM t1;
+COUNT(*) = 10000
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result b/mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result
new file mode 100644
index 00000000000..5806ab5558d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result
@@ -0,0 +1,121 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1 f2
+2 a
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+wsrep_local_replays
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DELETE FROM t1;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 1;
+SET SESSION wsrep_trx_fragment_size = 0;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1 f2
+2 a
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+wsrep_local_replays
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DELETE FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result b/mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result
new file mode 100644
index 00000000000..4e3bd52483e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result
@@ -0,0 +1,54 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 3;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+0
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_1;
+INSERT INTO t1 VALUES (2);
+connection node_2;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+2
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+1
+connection node_1;
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+2
+connection node_1;
+COMMIT;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_2;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result b/mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result
new file mode 100644
index 00000000000..ab090e5c2a7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result
@@ -0,0 +1,20 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_1;
+COMMIT;
+SET AUTOCOMMIT=ON;
+UPDATE t1 SET f1 = 2 WHERE f1 = 1;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result
new file mode 100644
index 00000000000..b7bdd94dd68
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=4096';
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 100 FROM t1;
+COUNT(*) = 100
+1
+DROP TABLE t1;
+DROP TABLE ten;
+connection node_1;
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result
new file mode 100644
index 00000000000..6bd8b6b8212
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result
@@ -0,0 +1,34 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+SET SESSION wsrep_trx_fragment_size = 256;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=128';
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1, ten AS a2;
+Got one of the listed errors
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE ten;
+call mtr.add_suppression('WSREP: SR rollback replication failure.*');
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: SR rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
+call mtr.add_suppression('WSREP: fragment replication failed:');
+call mtr.add_suppression('WSREP: post commit failed for SR rollback');
+call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*');
+call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *');
diff --git a/mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result b/mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result
new file mode 100644
index 00000000000..852208437e5
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result
@@ -0,0 +1,29 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SET SESSION wsrep_trx_fragment_size = 0;
+DROP TABLE t1;
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Can't find record in 't1'");
diff --git a/mysql-test/suite/galera_sr/r/mdev_18631.result b/mysql-test/suite/galera_sr/r/mdev_18631.result
new file mode 100644
index 00000000000..bc6c0e48538
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mdev_18631.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+# On node_1
+connection node_1;
+CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1), (2), (3);
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+3
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+3
+DROP TABLE t1;
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep#215.result b/mysql-test/suite/galera_sr/r/mysql-wsrep#215.result
new file mode 100644
index 00000000000..623bef4c3c4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep#215.result
@@ -0,0 +1,137 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 2;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+connection node_2;
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);;
+connection node_1a;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1a;
+SET DEBUG_SYNC = 'RESET';
+connection node_1;
+TRUNCATE TABLE t1;
+SET SESSION wsrep_trx_fragment_size = 10;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+connection node_2;
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SELECT * FROM t1;
+f1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1a;
+SET DEBUG_SYNC = 'RESET';
+connection node_1;
+TRUNCATE TABLE t1;
+SET SESSION wsrep_trx_fragment_size = 200;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+connection node_2;
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1a;
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
+connection node_2;
+CALL mtr.add_suppression("WSREP: Could not find applier context for");
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-bugs-900.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-bugs-900.result
new file mode 100644
index 00000000000..a51b5299aa2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-bugs-900.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_cluster_name = ' ';
+ERROR HY000: Variable 'wsrep_cluster_name' is a GLOBAL variable and should be set with SET GLOBAL
+INSERT INTO t1 VALUES (2);
+COMMIT;
+SELECT f1 AS expect_1_and_2 FROM t1;
+expect_1_and_2
+1
+2
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result
new file mode 100644
index 00000000000..84246a8eed2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result
@@ -0,0 +1,63 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+COMMIT;
+SET SESSION wsrep_trx_fragment_size = 0;
+INSERT INTO t1 VALUES (3),(4);
+COMMIT;
+connection node_1;
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (3),(4)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+connection node_2;
+SELECT COUNT(*) = 4 FROM t1;
+COUNT(*) = 4
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 2 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (3),(4)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result
new file mode 100644
index 00000000000..fc9afd6e1e0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result
@@ -0,0 +1,24 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+connection node_2;
+SELECT flags FROM mysql.wsrep_streaming_log;
+flags
+1
+0
+connection node_1;
+ROLLBACK;
+INSERT INTO t1 VALUES (3),(4);
+connection node_2;
+SELECT flags FROM mysql.wsrep_streaming_log;
+flags
+1
+0
+connection node_1;
+ROLLBACK;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result
new file mode 100644
index 00000000000..b09c7d4047a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result
@@ -0,0 +1,12 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+COMMIT;
+DROP TABLE t1;
+connection node_2;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
new file mode 100644
index 00000000000..98bf13e9d2b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
@@ -0,0 +1,39 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1);
+connection node_2;
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL debug_dbug = 'd,sync.wsrep_apply_cb';
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);;
+connection node_1;
+INSERT INTO t1 SELECT * FROM t2;;
+connection node_1a;
+INSERT INTO t1 VALUES (6), (7), (8), (9), (10);
+COMMIT;
+connection node_1;
+Got one of the listed errors
+connection node_2;
+SET GLOBAL wsrep_slave_threads = 1;
+SET GLOBAL debug_dbug = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+DROP TABLE t1;
+DROP TABLE t2;
+SET DEBUG_SYNC = RESET;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result
new file mode 100644
index 00000000000..610019e2b48
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result
@@ -0,0 +1,11 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (id INT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result
new file mode 100644
index 00000000000..8ad3ac63438
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result
@@ -0,0 +1,1045 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+connection node_1a;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+connection node_1b;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1c;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+connection node_1a;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+connection node_1;
+connection node_1b;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+connection node_1;
+SET DEBUG_SYNC = 'now SIGNAL continue';
+connection node_1c;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+connection node_1a;
+COMMIT;
+connection node_1b;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result
new file mode 100644
index 00000000000..1215f3341e7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result
@@ -0,0 +1,35 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+ROLLBACK TO SAVEPOINT s1;
+INSERT INTO t1 VALUES (21, 'c');
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+connection node_2;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result
new file mode 100644
index 00000000000..4cbcd49dd24
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result
@@ -0,0 +1,23 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result
new file mode 100644
index 00000000000..ca749a45e9a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result
@@ -0,0 +1,27 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SET AUTOCOMMIT=OFF;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+START TRANSACTION;
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (5);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ROLLBACK;
+connection node_1;
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result
new file mode 100644
index 00000000000..3f463875eb3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result
@@ -0,0 +1,37 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL debug_dbug = '+d,sync.wsrep_apply_cb';
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);;
+connection node_1;
+COMMIT;
+connection node_2a;
+SET GLOBAL debug_dbug = '';
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+connection node_2;
+Got one of the listed errors
+ROLLBACK;
+DROP TABLE t1;
+connection node_2a;
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result
new file mode 100644
index 00000000000..56905c03e10
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result
@@ -0,0 +1,39 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
+connection node_2;
+SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
+COUNT(*) = 13
+1
+connection node_1;
+INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
+COUNT(f2) = 10000
+1
+UPDATE t1 SET f2 = 'abcdefjhk';
+connection node_1;
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
+COUNT(f2) = 10000
+1
+connection node_2;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB;
+connection node_2;
+INSERT INTO t1 (f1) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
+connection node_1;
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('foobarbaz');
+COUNT(f1) = 1000
+1
+UPDATE t1 SET f1 = 'abcdefjhk';
+connection node_2;
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
+COUNT(f1) = 1000
+1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result
new file mode 100644
index 00000000000..312c8efc6ef
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+connection node_2;
+Killing server ...
+connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+# restart
+connection node_2a;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
+COUNT(*) = 2
+1
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 2
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result
new file mode 100644
index 00000000000..17f71213767
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result
@@ -0,0 +1,18 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+START TRANSACTION;
+SAVEPOINT a;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT a;
+INSERT INTO t1 values (2);
+COMMIT;
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result
new file mode 100644
index 00000000000..dbe91aad9fd
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+CREATE TABLE t2 (f2 VARCHAR(32));
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2),(1);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+INSERT INTO t2 VALUES ('abc');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 1 FROM t2;
+COUNT(*) = 1
+1
+connection node_1;
+ROLLBACK;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t2;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/suite.pm b/mysql-test/suite/galera_sr/suite.pm
new file mode 100644
index 00000000000..a9665b5252c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/suite.pm
@@ -0,0 +1,70 @@
+package My::Suite::Galera_sr;
+
+use lib 'suite';
+use wsrep::common;
+
+@ISA = qw(My::Suite);
+
+return wsrep_not_ok() if wsrep_not_ok();
+
+push @::global_suppressions,
+ (
+ qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1),
+ qr(WSREP: Could not open saved state file for reading: .*),
+ qr(WSREP: Could not open state file for reading: .*),
+ qr(WSREP: Gap in state sequence. Need state transfer.),
+ qr(WSREP: Failed to prepare for incremental state transfer:),
+ qr(WSREP:.*down context.*),
+ qr(WSREP: Failed to send state UUID:),
+ qr(WSREP: last inactive check more than .* skipping check),
+ qr(WSREP: Releasing seqno [0-9]* before [0-9]* was assigned.),
+ qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
+ qr(WSREP: Quorum: No node with complete state),
+ qr(WSREP: Initial position was provided by configuration or SST, avoiding override),
+ qr|WSREP: discarding established \(time wait\) .*|,
+ qr(WSREP: There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside. Will use that one.),
+ qr(WSREP: evs::proto.*),
+ qr|WSREP: Ignoring possible split-brain \(allowed by configuration\) from view:.*|,
+ qr(WSREP: no nodes coming from prim view, prim not possible),
+ qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable),
+ qr(WSREP: user message in state LEAVING),
+ qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
+ qr(WSREP: .* sending install message failed: Resource temporarily unavailable),
+ qr(WSREP: Maximum writeset size exceeded by .*),
+ qr(WSREP: transaction size exceeded.*),
+ qr(WSREP: RBR event .*),
+ qr(WSREP: Ignoring error for TO isolated action: .*),
+ qr(WSREP: transaction size limit .*),
+ qr(WSREP: rbr write fail, .*),
+ qr(WSREP: .*Backend not supported: foo.*),
+ qr(WSREP: .*Failed to initialize backend using .*),
+ qr(WSREP: .*Failed to open channel 'my_wsrep_cluster' at .*),
+ qr(WSREP: gcs connect failed: Socket type not supported),
+ qr(WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 .*),
+ qr(WSREP: .*Failed to open backend connection: -110 .*),
+ qr(WSREP: .*Failed to open channel 'my_wsrep_cluster' at .*),
+ qr(WSREP: gcs connect failed: Connection timed out),
+ qr|WSREP: wsrep::connect\(.*\) failed: 7|,
+ qr(WSREP: SYNC message from member .* in non-primary configuration. Ignored.),
+ qr(WSREP: Could not find peer:),
+ qr(WSREP: TO isolation failed for: .*),
+ qr|WSREP: gcs_caused\(\) returned .*|,
+ qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
+ qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|,
+ qr|WSREP: Unsupported protocol downgrade: incremental data collection disabled. Expect abort.|,
+ qr(WSREP: Action message in non-primary configuration from member [0-9]*),
+ qr(WSREP: Last Applied Action message in non-primary configuration from member [0-9]*),
+ qr(WSREP: discarding established .*),
+ qr|WSREP: .*core_handle_uuid_msg.*|,
+ qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
+ qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
+ qr|Query apply failed:*|,
+ qr(WSREP: Ignoring error*),
+ qr(WSREP: Failed to remove page file .*),
+ qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*),
+ qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|,
+ qr|WSREP: Trying to continue unpaused monitor|,
+ qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|,
+ );
+
+bless { };
diff --git a/mysql-test/suite/galera_sr/t/GCF-1008.inc b/mysql-test/suite/galera_sr/t/GCF-1008.inc
new file mode 100644
index 00000000000..a6351243516
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1008.inc
@@ -0,0 +1,38 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'x');
+
+--connection node_2a
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+--send COMMIT
+
+--connection node_2b
+--sleep 1
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+REPLACE INTO t1 VALUES (1,'y');
+
+--connection node_2b
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+
+--connection node_2a
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_2
+--reap
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1008.test b/mysql-test/suite/galera_sr/t/GCF-1008.test
new file mode 100644
index 00000000000..c6926840bd1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1008.test
@@ -0,0 +1,18 @@
+#
+# GCF-1008 SR trx fails to apply because previous trx is not committed yet on applier
+#
+
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/galera_have_debug_sync.inc
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--let $galera_sync_point = before_local_commit_monitor_enter
+--source GCF-1008.inc
+
+--let $galera_sync_point = before_certify_apply_monitor_enter
+--source GCF-1008.inc
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-1018.test b/mysql-test/suite/galera_sr/t/GCF-1018.test
new file mode 100644
index 00000000000..9a184467ebd
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1018.test
@@ -0,0 +1,39 @@
+#
+# SR: Node hang with one thread waiting in InnoDB
+#
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/galera_have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+INSERT INTO t1 (f2) VALUES ('a');
+INSERT INTO t1 (f2) VALUES ('b');
+INSERT INTO t1 (f2) VALUES ('c');
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = after_certify_apply_monitor_enter
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+--send DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;
+
+--connection node_2a
+--source include/galera_wait_sync_point.inc
+
+--connection node_1
+INSERT INTO t1 (f2) VALUES ('d'),('e');
+
+--connection node_2a
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+--reap
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1018B.test b/mysql-test/suite/galera_sr/t/GCF-1018B.test
new file mode 100644
index 00000000000..f11309080c0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1018B.test
@@ -0,0 +1,40 @@
+#
+# SR: Node hang with one thread waiting in InnoDB
+#
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+
+--let $count = 500
+--disable_query_log
+while ($count)
+{
+ --connection node_1
+ --send INSERT INTO t1 (f2) VALUES ('abc'),('abc');
+
+ --connection node_2
+ --send DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;
+
+ --connection node_1
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY,ER_LOCK_WAIT_TIMEOUT,ER_QUERY_INTERRUPTED
+ --reap
+
+ --connection node_2
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY,ER_LOCK_WAIT_TIMEOUT,ER_QUERY_INTERRUPTED
+ --reap
+
+ --dec $count
+}
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1051.test b/mysql-test/suite/galera_sr/t/GCF-1051.test
new file mode 100644
index 00000000000..1db4ed15c41
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1051.test
@@ -0,0 +1,51 @@
+#
+# Test the case where SR is rolled back to savepoint that points to the
+# very beginning of the transaction. This results in regular rollback
+# rather than rollback to savepoint.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size=1;
+
+#
+# Test 1: regular transaction
+#
+--connection node_1
+START TRANSACTION;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# Test 2: AUTOCOMMIT OFF
+#
+--connection node_1
+SET AUTOCOMMIT=OFF;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (2);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1060.test b/mysql-test/suite/galera_sr/t/GCF-1060.test
new file mode 100644
index 00000000000..714a5ef9f90
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1060.test
@@ -0,0 +1,9 @@
+--source include/galera_cluster.inc
+
+--let $count = 100;
+--let $wsrep_trx_fragment_size = 1;
+--let $query_node_1 = TRUNCATE TABLE t1
+--let $query_node_1a = INSERT INTO t1 VALUE (1,'x'),(2,'x'),(3,'x')
+--let $query_node_2 = INSERT INTO t1 VALUE (4, 'z');
+
+--source suite/galera/include/galera_concurrent_test.inc
diff --git a/mysql-test/suite/galera_sr/t/GCF-561.test b/mysql-test/suite/galera_sr/t/GCF-561.test
new file mode 100644
index 00000000000..eadf0263ada
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-561.test
@@ -0,0 +1,72 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of DDL on a concurrent SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 5 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_5 FROM mysql.wsrep_streaming_log;
+
+ALTER TABLE t1 DROP COLUMN f2;
+
+# SR applied before the DDL is no longer visible
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+# Transaction can not continue due to DDL, implicit ROLLBACK
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (6, 6);
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+# DDL is now in effect
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 VALUES (6, 6);
+
+# But it should be possible to reissue the transaction
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+set global wsrep_sync_wait=15;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-571.test b/mysql-test/suite/galera_sr/t/GCF-571.test
new file mode 100644
index 00000000000..aca0b9f7907
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-571.test
@@ -0,0 +1,54 @@
+#
+# GCF-571 ROLLBACK TO SAVEPOINT causes all SR records to be deleted
+#
+
+--source include/galera_cluster.inc
+
+SET AUTOCOMMIT=OFF;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+SAVEPOINT A;
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+
+--connection node_1
+ROLLBACK TO SAVEPOINT A;
+
+--connection node_1a
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+
+--connection node_1
+ROLLBACK;
+
+--connection node_1a
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-572.test b/mysql-test/suite/galera_sr/t/GCF-572.test
new file mode 100644
index 00000000000..be77451a332
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-572.test
@@ -0,0 +1,78 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+#
+# Test 1: statement rollback is not safe.
+# Statement has already replicated some fragments
+#
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
+INSERT INTO t2 VALUES (1),(2),(3);
+ALTER TABLE t2 DROP PRIMARY KEY;
+INSERT INTO t2 VALUES (1);
+
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+
+# The following INSERT .. SELECT inserts a duplicate key,
+# ER_LOCK_DEADLOCK is the only possible outcome at this point.
+# Notice that ER_DUP_ENTRY is NOT an option here because we were
+# forced to rollback the whole transaction (not just the statement)
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 SELECT * FROM t2;
+SELECT * FROM t1;
+
+--connection node_2
+SELECT * FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE t2;
+
+#
+# Test 2: statement rollback is safe.
+# Fragments were already replicated, not in the same statement
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(10)) ENGINE=InnoDB;
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'node1');
+
+--connection node_1a
+INSERT INTO t1 VALUES (5, 'node2');
+
+--connection node_1
+# Only the statement is rolled back, expect ER_DUP_ENTRY
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (5, 'node1');
+
+SELECT * FROM t1;
+
+#
+# Test 3: statement rollback is safe
+# No fragments have been replicated
+#
+SET SESSION wsrep_trx_fragment_size = 10000;
+
+START TRANSACTION;
+INSERT INTO t1 VALUE (10, 'node1');
+SELECT * FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+INSERT INTO t1 VALUES(15, 'node2');
+
+--connection node_1
+SELECT * FROM t1;
+# This time, only the statement is rolled back and we expect ER_DUP_ENTRY.
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES(15, 'node1');
+
+COMMIT;
+SELECT * FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-580.test b/mysql-test/suite/galera_sr/t/GCF-580.test
new file mode 100644
index 00000000000..39a237fda57
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-580.test
@@ -0,0 +1,27 @@
+#
+# GCF-580 wsrep_last_committed_counter increases twice for every SR fragment
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+
+--let $fragments_count = `SELECT COUNT(*) FROM mysql.wsrep_streaming_log`
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--disable_query_log
+--eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) = $fragments_count AS last_committed_matches_fragment_count
+--enable_query_log
+
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-585.test b/mysql-test/suite/galera_sr/t/GCF-585.test
new file mode 100644
index 00000000000..ceb7da60df6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-585.test
@@ -0,0 +1,44 @@
+#
+# GCF-585 SR: Assertion `total_length + wsrep_get_fragment_base(thd) == saved_pos' failed in wsrep_write_cache_once after SQL error
+#
+
+--source include/galera_cluster.inc
+
+# Test case #1
+
+create table t1 (f1 integer primary key) engine=innodb;
+set autocommit=off;
+set session wsrep_trx_fragment_size=1;
+start transaction;
+insert into t1 values (1);
+# If we try to INSERT a duplicate key, ER_LOCK_DEADLOCK is the only possible
+# outcome at this point. Notice that ER_DUP_ENTRY is NOT an option here
+# because we were forced to rollback the whole transaction (not just the
+# statement)
+--error ER_LOCK_DEADLOCK
+insert into t1 values (2),(1);
+alter table t1 drop primary key;
+drop table t1;
+
+# Test case #2
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+update t1 set f1 = 100 where f1 = 10;
+
+--connection node_2
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+SET SESSION wsrep_trx_fragment_size=1;
+SET SESSION innodb_lock_wait_timeout=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+--error ER_LOCK_DEADLOCK
+delete from t1 where f1 > 10;
+--error ER_LOCK_DEADLOCK
+delete from t1 where f1 > 10 and f1 < 100;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-597.test b/mysql-test/suite/galera_sr/t/GCF-597.test
new file mode 100644
index 00000000000..9c86e598154
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-597.test
@@ -0,0 +1,42 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+SET wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+--let $wait_condition = SELECT COUNT(*) = 5 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+--let $wait_condition = SELECT COUNT(*) = 5 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+ROLLBACK;
+
+DROP TABLE t1;
+
+--disconnect node_1a
+--disconnect node_2a
diff --git a/mysql-test/suite/galera_sr/t/GCF-620.test b/mysql-test/suite/galera_sr/t/GCF-620.test
new file mode 100644
index 00000000000..abfba47ee5a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-620.test
@@ -0,0 +1,22 @@
+#
+# GCF-620 SR: ROLLBACK TO SAVEPOINT causes slave crash if wsrep_trx_fragment_size does not fall on boundary
+#
+
+--source include/galera_cluster.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 200;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (1);
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 2 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-623.test b/mysql-test/suite/galera_sr/t/GCF-623.test
new file mode 100644
index 00000000000..6784989bde9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-623.test
@@ -0,0 +1,31 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1; \ No newline at end of file
diff --git a/mysql-test/suite/galera_sr/t/GCF-627.test b/mysql-test/suite/galera_sr/t/GCF-627.test
new file mode 100644
index 00000000000..6990c12314d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-627.test
@@ -0,0 +1,31 @@
+--source include/galera_cluster.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+
+--connection node_2
+DROP TABLE t1;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--error ER_NO_SUCH_TABLE
+INSERT INTO t1 VALUES (2);
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
diff --git a/mysql-test/suite/galera_sr/t/GCF-845.test b/mysql-test/suite/galera_sr/t/GCF-845.test
new file mode 100644
index 00000000000..316317c6a10
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-845.test
@@ -0,0 +1,30 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE IF NOT EXISTS t1 (f1 INTEGER) ENGINE = InnoDB;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (161);
+COMMIT;
+DELETE FROM t1 WHERE f1 > 13;
+--disconnect node_1a
+--sleep 2
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_count = 0
+--let $assert_select = BF-BF X
+--let $assert_text = No BF-BF log line found
+--let $assert_only_after = CURRENT_TEST
+--source include/assert_grep.inc
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-851.test b/mysql-test/suite/galera_sr/t/GCF-851.test
new file mode 100644
index 00000000000..28d5302a422
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-851.test
@@ -0,0 +1,24 @@
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+SET SESSION AUTOCOMMIT=OFF;
+
+INSERT INTO t1 VALUES (10);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+START TRANSACTION;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) > 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) > 0 FROM t1;
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-867.test b/mysql-test/suite/galera_sr/t/GCF-867.test
new file mode 100644
index 00000000000..54476a860b7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-867.test
@@ -0,0 +1,42 @@
+#
+# Test many ongoing SR transactions
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+--disable_query_log
+
+--let $connections = 62
+
+--let $count = $connections
+while ($count)
+{
+--connect $count, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET SESSION wsrep_sync_wait = 0;
+--dec $count
+}
+
+
+--let $count = $connections
+while ($count)
+{
+--connection $count
+START TRANSACTION;
+--send_eval INSERT INTO t1 VALUES ($count)
+--dec $count
+}
+
+--let $count = $connections
+while ($count)
+{
+--connection $count
+--reap
+COMMIT;
+--dec $count
+}
+
+--enable_query_log
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-889.test b/mysql-test/suite/galera_sr/t/GCF-889.test
new file mode 100644
index 00000000000..e785b282019
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-889.test
@@ -0,0 +1,29 @@
+--source include/galera_cluster.inc
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_on = ON;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+DELETE FROM t1 WHERE f1 = 1;
+SET SESSION wsrep_trx_fragment_size = 0;
+
+INSERT INTO t1 VALUES (1);
+
+SELECT COUNT(*) = 1;
+
+--connection node_2
+SELECT COUNT(*) = 1;
+CALL mtr.add_suppression("Could not execute Delete_rows event on table");
+CALL mtr.add_suppression("Can't find record in 't1'");
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+
+--connection node_1
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-900.test b/mysql-test/suite/galera_sr/t/GCF-900.test
new file mode 100644
index 00000000000..b44423c5013
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-900.test
@@ -0,0 +1,31 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 128;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 0);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2, 0);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
+--source include/wait_condition.inc
+
+ALTER TABLE t1 DROP COLUMN f2;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+--connection node_1a
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (3, 0);
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-18585.cnf b/mysql-test/suite/galera_sr/t/MDEV-18585.cnf
new file mode 100644
index 00000000000..00801511d76
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-18585.cnf
@@ -0,0 +1,5 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+log-bin
+log-slave-updates
diff --git a/mysql-test/suite/galera_sr/t/MDEV-18585.test b/mysql-test/suite/galera_sr/t/MDEV-18585.test
new file mode 100644
index 00000000000..18bbbe8f7e0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-18585.test
@@ -0,0 +1,42 @@
+#
+# MDEV-18686 Verify that the Annotate_rows_log_event is written only
+# once per statement into binlog.
+#
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+
+#
+# Unit ROW
+#
+SET SESSION wsrep_trx_fragment_unit='ROWS';
+SET SESSION wsrep_trx_fragment_size=1;
+
+INSERT INTO t1 VALUES (1), (2);
+
+#
+# Unit BYTE
+#
+SET SESSION wsrep_trx_fragment_unit='BYTES';
+SET SESSION wsrep_trx_fragment_size=1;
+
+INSERT INTO t1 VALUES (3), (4);
+
+#
+# Unit STATEMENT
+#
+SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
+SET SESSION wsrep_trx_fragment_size=1;
+
+INSERT INTO t1 VALUES (5), (6);
+
+#
+# Reset to default settings
+#
+SET SESSION wsrep_trx_fragment_unit=default;
+SET SESSION wsrep_trx_fragment_size=default;
+
+--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
+SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 518;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-21613.cnf b/mysql-test/suite/galera_sr/t/MDEV-21613.cnf
new file mode 100644
index 00000000000..d8e3488f044
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-21613.cnf
@@ -0,0 +1,7 @@
+# Set thread-handling as a workaround to avoid MDEV-26528.
+# The file can be removed once fixed.
+
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+thread-handling=pool-of-threads
diff --git a/mysql-test/suite/galera_sr/t/MDEV-21613.test b/mysql-test/suite/galera_sr/t/MDEV-21613.test
new file mode 100644
index 00000000000..8a1fea1b7f5
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-21613.test
@@ -0,0 +1,36 @@
+#
+# MDEV-21613 - galera_sr.GCF-1018B MTR failed:
+# Failed to open table mysql.wsrep_streaming_log for writing
+#
+# A BF abort right before fragment removal caused this error to
+# be logged to the error log.
+#
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET DEBUG_SYNC = "wsrep_before_fragment_removal SIGNAL fragment_removal_reached WAIT_FOR fragment_removal_continue";
+START TRANSACTION;
+INSERT INTO t1 VALUES(1), (2);
+--send COMMIT
+
+--connect node_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR fragment_removal_reached";
+
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+TRUNCATE TABLE t1;
+
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_ctrl
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-22616.test b/mysql-test/suite/galera_sr/t/MDEV-22616.test
new file mode 100644
index 00000000000..818d787703f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-22616.test
@@ -0,0 +1,18 @@
+#
+# MDEV-22616
+#
+# CHECK TABLE fails with wsrep_trx_fragment_size > 0
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+CHECK TABLE t1;
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+CHECK TABLE t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-23623.test b/mysql-test/suite/galera_sr/t/MDEV-23623.test
new file mode 100644
index 00000000000..2fe728f42bb
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-23623.test
@@ -0,0 +1,50 @@
+#
+# MDEV-23623 - trans_commit_stmt(THD*): Assertion
+# `thd->in_active_multi_stmt_transaction() ||
+# thd->m_transaction_psi == __null' failed
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+INSERT INTO t1 (f2) VALUES ('a');
+INSERT INTO t1 (f2) VALUES ('b');
+INSERT INTO t1 (f2) VALUES ('c');
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = after_certify_apply_monitor_enter
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+SET SESSION wsrep_retry_autocommit = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+--send DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;
+
+--connection node_2a
+--source include/galera_wait_sync_point.inc
+
+#
+# This is going to cause a certification
+# failure on node_2
+#
+--connection node_1
+INSERT INTO t1 (f2) VALUES ('d'),('e');
+
+--connection node_2a
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+--reap
+
+#
+# Assertion would happen when the following
+# DROP TABLE is applied on node_2
+#
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-25226.test b/mysql-test/suite/galera_sr/t/MDEV-25226.test
new file mode 100644
index 00000000000..3d19a0b9675
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-25226.test
@@ -0,0 +1,33 @@
+#
+# MDEV-25226 - Test the case the where wsrep_on is set OFF
+# on a transaction that has already replicated a fragment.
+#
+# This would cause: Assertion `transaction_.active() == false ||
+# (transaction_.state() == wsrep::transaction::s_executing ||
+# transaction_.state() == wsrep::transaction::s_prepared ||
+# transaction_.state() == wsrep::transaction::s_aborted ||
+# transaction_.state() == wsrep::transaction::s_must_abort)'
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES(1);
+--error ER_CANT_DO_THIS_DURING_AN_TRANSACTION
+SET SESSION wsrep_on=OFF;
+--error ER_CANT_DO_THIS_DURING_AN_TRANSACTION
+SET GLOBAL wsrep_on=OFF;
+INSERT INTO t1 VALUES(2);
+COMMIT;
+
+--connection node_1
+SELECT * FROM t1;
+
+--connection node_2
+SELECT * FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-25717.test b/mysql-test/suite/galera_sr/t/MDEV-25717.test
new file mode 100644
index 00000000000..7188f8bb172
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-25717.test
@@ -0,0 +1,113 @@
+#
+# MDEV-25717 Assertion `owning_thread_id_ == wsrep::this_thread::get_id()'
+#
+# This test exposes a race condition between rollbacker thread and rollback
+# fragment processing.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+
+#
+# On node_2 we start a SR transaction, it going to
+# be BF aborted later on
+#
+--connection node_2
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (4);
+
+--connection node_1
+SELECT COUNT(*) FROM t1; # Sync wait
+
+#
+# Issue a conflicting TRUNCATE statement on node_1:
+# - on node_2, block it before it is going to apply
+# - on node_1, block before the before it BF aborts the INSERT
+#
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_toi";
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_bf_abort";
+
+--connection node_1
+--send TRUNCATE TABLE t1
+
+--connection node_1a
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_bf_abort_reached";
+
+--connection node_2a
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_toi_reached";
+
+#
+# Generate one more fragment on the SR transaction.
+# This is going to fail certification and results
+# in a rollback fragment.
+#
+--connection node_2
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+--send INSERT INTO t1 VALUES (5)
+
+#
+# Wait until after certify and observe the certification
+# failure. Let both continue and we are done on node_2.
+#
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_toi";
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+--reap
+
+#
+# On node_1 we expect the following things:
+# - the TRUNCATE should successfully bf abort the transaction
+# - A rollback fragment should be delivered as a result of
+# certification failure. We expect the rollback fragment to
+# be delivered after TRUNCATE has bf aborted, therefore rollback
+# fragment logs a dummy writeset.
+#
+--connection node_1a
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL DEBUG_DBUG = "+d,sync.wsrep_log_dummy_write_set";
+
+# Signal the TRUNCATE to continue and observe the BF abort
+--let $expected_bf_aborts = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_bf_abort";
+
+# Expect a timeout if bug is present
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_bf_aborts FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'
+--source include/wait_condition.inc
+
+# Observe logging of dummy writeset
+SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_log_dummy_write_set_reached";
+
+# TRUNCATE succeeds
+--connection node_1
+--reap
+
+#
+# Cleanup
+#
+--connection node_2
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "RESET";
+
+--connection node_1
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "RESET";
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-25718.cnf b/mysql-test/suite/galera_sr/t/MDEV-25718.cnf
new file mode 100644
index 00000000000..d8e3488f044
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-25718.cnf
@@ -0,0 +1,7 @@
+# Set thread-handling as a workaround to avoid MDEV-26528.
+# The file can be removed once fixed.
+
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+thread-handling=pool-of-threads
diff --git a/mysql-test/suite/galera_sr/t/MDEV-25718.test b/mysql-test/suite/galera_sr/t/MDEV-25718.test
new file mode 100644
index 00000000000..9aebbdc7c5c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-25718.test
@@ -0,0 +1,63 @@
+#
+# MDEV-25718 Assertion `transaction.is_streaming()' failed in
+# void wsrep::transaction::adopt()
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+
+#
+# Start a SR transaction and block it after it has replicated
+# a fragment. Notice the transaction is still in executing state.
+#
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+SET debug_sync = "ha_write_row_end SIGNAL write_row_end WAIT_FOR write_row_continue";
+--send INSERT INTO t1 VALUES (1);
+
+--connect node_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_ctrl
+SET debug_sync = "now WAIT_FOR write_row_end";
+SET GLOBAL debug_dbug = '+d,wsrep_streaming_rollback';
+
+#
+# Issue a conflicting DDL, that will block in streaming_rollback
+# sync point.
+#
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+--send TRUNCATE TABLE t1;
+
+--connection node_ctrl
+SET SESSION debug_sync = "now WAIT_FOR wsrep_streaming_rollback_reached";
+
+#
+# Let the INSERT continue. If bug is present will be able to go through
+# before_rollback() / streaming_rollback() and clear its streaming context,
+# which causes the assertion to trigger in BF aborter.
+#
+SET SESSION wsrep_sync_wait = 0;
+SET debug_sync = "now SIGNAL write_row_continue";
+
+# Let's give the INSERT some time, to make sure it does rollback
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = "INSERT INTO t1 VALUES (1)" AND STATE = "Freeing items";
+--source include/wait_condition.inc
+
+# Resume the DDL in streaming_rollback
+SET SESSION debug_sync = "now SIGNAL wsrep_streaming_rollback_continue";
+
+--connection node_1a
+--reap
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+# Cleanup
+--connection node_ctrl
+SET GLOBAL debug_dbug = "";
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-27553.test b/mysql-test/suite/galera_sr/t/MDEV-27553.test
new file mode 100644
index 00000000000..5c557db9201
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-27553.test
@@ -0,0 +1,80 @@
+#
+# MDEV-27553 Assertion `inited==INDEX' failed: int handler::ha_index_end()
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source suite/galera/include/auto_increment_offset_save.inc
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) `Expect 1` FROM mysql.wsrep_streaming_log;
+
+#
+# Issue ROLLBACK and make sure it fails to clean up
+# the streaming log. Failure to remove fragments
+# results in apply failure of the rollback fragment.
+# The node should disconnect from the cluster.
+#
+SET @@global.debug_dbug="+d,ha_index_init_fail";
+ROLLBACK;
+
+
+#
+# Expect the cluster to shrink
+#
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+#
+# ROLLBACK should clean up the streaming log just fine in node 1
+#
+SELECT COUNT(*) `Expect 0` FROM mysql.wsrep_streaming_log;
+
+
+#
+# Expect the failure on ROLLBACK to leave a entry in streaming log
+#
+--connection node_2
+SET @@global.debug_dbug="";
+SET SESSION wsrep_sync_wait = 0;
+# Expect node to be disconnected
+--let wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+SELECT COUNT(*) `Expect 1` FROM mysql.wsrep_streaming_log;
+
+
+#
+# Restart node 2, so that it joins the cluster back
+#
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+--source include/restart_mysqld.inc
+
+#
+# After restart, the streaming log is empty in node 2
+#
+SELECT COUNT(*) `Expect 0` FROM mysql.wsrep_streaming_log;
+
+#
+# Cleanup
+#
+DROP TABLE t1;
+
+CALL mtr.add_suppression("WSREP: Failed to init table for index scan");
+CALL mtr.add_suppression("WSREP: Failed to apply write set");
+CALL mtr.add_suppression("Failed to report last committed");
+
+--source suite/galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/MDEV-27615.test b/mysql-test/suite/galera_sr/t/MDEV-27615.test
new file mode 100644
index 00000000000..121a85fb20c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/MDEV-27615.test
@@ -0,0 +1,72 @@
+#
+# MDEV-27615 - Assertion `server_id.is_undefined() == false'
+# failed in wsrep::transaction::certify_fragment()
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source suite/galera/include/auto_increment_offset_save.inc
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
+
+#
+# Set debug sync point right before the assert
+#
+SET DEBUG_SYNC='wsrep_before_fragment_certification SIGNAL before_fragment WAIT_FOR continue';
+
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+--send INSERT INTO t1 VALUES (1);
+
+
+#
+# Disconnect node_2 from cluster
+#
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $node_2_cluster_address = `SELECT @@wsrep_cluster_address`
+SET DEBUG_SYNC='now WAIT_FOR before_fragment';
+SET GLOBAL wsrep_cluster_address = '';
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+SET DEBUG_SYNC = 'now SIGNAL continue';
+
+
+#
+# Disconnect causes connection to node_2 to be closed
+#
+--connection node_2
+--error 2013 # CR_SERVER_LOST
+--reap
+
+
+#
+# Reconnect node 2
+#
+--connection node_2a
+--disable_query_log
+--eval SET GLOBAL wsrep_cluster_address = '$node_2_cluster_address';
+--enable_query_log
+--source include/wait_wsrep_ready.inc
+
+#
+# Expect the transaction to be rolled back and cleanup
+#
+SELECT * FROM mysql.wsrep_streaming_log;
+SELECT * FROM t1;
+
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
+
+--disconnect node_2
+--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+
+--source suite/galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera-features#56.test b/mysql-test/suite/galera_sr/t/galera-features#56.test
new file mode 100644
index 00000000000..ac73c2efe3d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera-features#56.test
@@ -0,0 +1,62 @@
+##
+## This test tests parallel application of multiple auto-increment insert transactions
+##
+
+--source include/galera_cluster.inc
+
+# Create a second connection to node1 so that we can run transactions concurrently
+--let $galera_connection_name = node_1a
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) Engine=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--connection node_2
+set session wsrep_sync_wait=15;
+SELECT COUNT(*) from ten;
+SELECT COUNT(*) from t1;
+set session wsrep_sync_wait=0;
+
+--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+SET GLOBAL wsrep_slave_threads = 4;
+
+--let $wait_condition = SELECT COUNT(*) >= 3 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
+--source include/wait_condition.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--connection node_1
+--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;
+
+--connection node_1a
+--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;
+
+--connection node_2
+--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;
+
+--connection node_1
+--reap
+
+--connection node_1a
+--reap
+
+--connection node_2
+--reap
+
+set session wsrep_sync_wait=15;
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(DISTINCT f1) FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
+--enable_query_log
+
+--connection default
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc
new file mode 100644
index 00000000000..cd9884cee81
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc
@@ -0,0 +1,145 @@
+#
+# Test SR BF abort for all sync points in master side code path
+#
+# The procedure in all test cases is the following:
+# 1) Start SR transaction on node 1, do INSERT + SELECT .. FOR UPDATE
+# 2) Set up sync point on node 1 to block slave thread processing
+# in apply monitor
+# 3) Do write on node 2 which will conflict with SELECT .. FOR UPDATE
+# 4) Set up desired sync point on master side and commit
+# 5) Wait until commit reaches master side sync point, clear sync points
+# and release all sync point waiters
+# 6) COMMIT on node 1 should return deadlock error
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size
+SET AUTOCOMMIT=OFF;
+
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+
+# Set up sync point
+--connection node_1a
+--let galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+# Conflicting insert
+--connection node_2
+
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = $galera_sr_bf_abort_sync_point
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+if ($galera_sr_bf_abort_at_commit)
+{
+ --send COMMIT
+}
+if (!$galera_sr_bf_abort_at_commit)
+{
+ --send INSERT INTO t1 VALUES (3)
+}
+
+--connection node_1a
+
+--let $cmp = `SELECT STRCMP('apply_monitor_slave_enter_sync', '$galera_sr_bf_abort_sync_point') = -1`
+
+if ($cmp)
+{
+ --let $galera_sync_point = apply_monitor_slave_enter_sync $galera_sr_bf_abort_sync_point
+}
+if (!$cmp)
+{
+ --let $galera_sync_point = $galera_sr_bf_abort_sync_point apply_monitor_slave_enter_sync
+}
+--source include/galera_wait_sync_point.inc
+
+# Let conflicting insert proceed, make sure it hits abort_trx_end and
+# let both threads continue.
+
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end $galera_sr_bf_abort_sync_point
+
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = $galera_sr_bf_abort_sync_point
+--source include/galera_signal_sync_point.inc
+
+# Deadlock should now be retured by node_1
+--connection node_1
+if (!$galera_sr_bf_abort_at_commit)
+{
+ --error ER_LOCK_DEADLOCK
+ --reap
+}
+if ($galera_sr_bf_abort_at_commit)
+{
+ --reap
+}
+
+ROLLBACK;
+
+# Release slave insert
+--connection node_1a
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+
+# Verify that nodes are consistent
+
+# End result:
+# If the statement which was BF aborted was commit,
+# node_1 must replay the transaction so that the table
+# will have rows 1, 2. If it in turn was INSERT,
+# node_1 must abort the transaction so that only
+# INSERT ... VALUES (2) survives.
+
+--connection node_1
+SELECT * FROM t1;
+if ($galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+if (!$galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+--connection node_2
+SELECT * FROM t1;
+if ($galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+if (!$galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Delete entery to verify that node is unblocked
+--connection node_1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test
new file mode 100644
index 00000000000..a2db6a8bad2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test
@@ -0,0 +1,50 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+--let $wsrep_trx_fragment_size = 1
+
+# Control connection for manipulating sync points on node 1
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+
+--echo galera_sr_bf_abort_at_commit = 0
+--let $galera_sr_bf_abort_at_commit = 0
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo galera_sr_bf_abort_at_commit = 1
+--let $galera_sr_bf_abort_at_commit = 1
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_blob.test b/mysql-test/suite/galera_sr/t/galera_sr_blob.test
new file mode 100644
index 00000000000..ed314d09f5a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_blob.test
@@ -0,0 +1,38 @@
+#
+# Test that a single-blob will be replicated using SR if it is sufficiently
+# large.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 TEXT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+
+--connection node_2
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+# Confirm that exactly one fragment was replicated
+
+--disable_query_log
+--eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) = 1 AS wsrep_last_committed_delta;
+--enable_query_log
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT LENGTH(f1) = 65535 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test
new file mode 100644
index 00000000000..da547c59626
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test
@@ -0,0 +1,100 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of Cluster Configuration Change on a concurrently-running SR transaction
+# We use SET GLOBAL wsrep_cluster_address = '' to cause the master (node_2) to temporarily
+# leave the cluster.
+#
+
+CALL mtr.add_suppression("WSREP: discarding established.*");
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+#
+# Trigger CC . The transaction is aborted and we expect the SR tables to be cleaned up
+#
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_sync_wait=0;
+--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
+SET GLOBAL wsrep_cluster_address = '';
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_2
+--error 2013 # CR_SERVER_LOST
+INSERT INTO t1 VALUES (6);
+
+--connection node_1
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+# Restore cluster
+
+--connection node_2a
+--disable_query_log
+--eval SET GLOBAL wsrep_cluster_address='$wsrep_cluster_address_orig'
+--enable_query_log
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2b
+--source include/galera_wait_ready.inc
+SELECT * FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+# Repeat transaction to confirm no locks are left from previous transaction
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--connection node_2b
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
+
+--disconnect node_2
+--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_no_primary.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_no_primary.test
new file mode 100644
index 00000000000..13a1b0f009e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_no_primary.test
@@ -0,0 +1,85 @@
+#
+# This test verifies that an orphaned SR gets cleanup upon cluster
+# reconnection. Specifically, the case where the cluster goes through
+# a state of no primary components, and the nodes rejoin with the
+# same IDs.
+#
+
+--source include/galera_cluster.inc
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=1;
+BEGIN;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+SELECT COUNT(*) `expect 6` FROM mysql.wsrep_streaming_log;
+
+# isolate node 2
+--connection node_2a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_2a
+# reconnect node 2
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+--source include/galera_wait_ready.inc
+SHOW STATUS LIKE 'wsrep_cluster_size';
+
+--connection node_1a
+# wait for reconnection and check that the streaming log has been cleared
+--source include/galera_wait_ready.inc
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+
+--connection node_2a
+# check that the streaming log has been cleared and there are no locks
+# from the SRs by issuing conflicting inserts
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+INSERT INTO t1 VALUES(10);
+INSERT INTO t1 VALUES(20);
+SELECT * FROM t1;
+
+# check that both SRs have been rolled back
+--connection node_1
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES(13);
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES(23);
+
+DROP TABLE t1;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test
new file mode 100644
index 00000000000..7ba0f253b4a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test
@@ -0,0 +1,105 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of Cluster Configuration Change on a concurrently-running SR transaction
+# We use SET GLOBAL wsrep_cluster_address = '' to cause the slave (node_2) to temporarily
+# leave the cluster.
+#
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../../galera/include/auto_increment_offset_save.inc
+
+# Start with a clean slate
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+#
+# Trigger CC . The transaction should be able to continue
+#
+
+--connection node_2
+--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
+SET GLOBAL wsrep_cluster_address = '';
+
+# Wait until the node_2 disconnects from the cluster
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = default;
+
+--connection node_1
+
+# Wait until the node_1 sees the cluster configuration change
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# Continue generating events in the transaction
+
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+# Restore cluster
+
+--connection node_2
+--disable_query_log
+--eval SET GLOBAL wsrep_cluster_address='$wsrep_cluster_address_orig';
+--enable_query_log
+--source include/galera_wait_ready.inc
+
+# Confirm that the SR table still contains entries from ongoing transaction
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+# Continue and finalize transaction
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (16);
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Confirm that transaction was replicated properly
+# and SR table is cleaned up afterwards.
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+
+# Restore original auto_increment_offset values.
+--source ../../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_concurrent.test b/mysql-test/suite/galera_sr/t/galera_sr_concurrent.test
new file mode 100644
index 00000000000..9ec7143d25c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_concurrent.test
@@ -0,0 +1,45 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test two concurrent SR-replicated transactions
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t2 VALUES (3);
+INSERT INTO t2 VALUES (4);
+INSERT INTO t2 VALUES (5);
+
+--connection node_1
+COMMIT;
+
+--connection node_1a
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 5 FROM t2;
+
+--connection node_1
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict.test
new file mode 100644
index 00000000000..dd133c2d12e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict.test
@@ -0,0 +1,45 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# A conflict between a streaming replication fragment and a local transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+# Wait until a streaming replication fragment has arrived
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+# Attempt a conflicting INSERT. This will block
+--send INSERT INTO t1 VALUES(1);
+
+# Observe the block from a separate connection
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'wsrep applier committed%';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'update';
+--source include/wait_condition.inc
+
+# Commit the remote transaction, causing the local transaction to return an error
+--connection node_1
+COMMIT;
+
+--connection node_2
+--error ER_DUP_ENTRY
+--reap
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test
new file mode 100644
index 00000000000..6675321641f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test
@@ -0,0 +1,45 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #2 begins a transaction
+# 2. Node #1 begins conflicting transaction that is SR replicated
+# 3. Node #2 attempts to commit, gets a deadlock error, even before #1 has committed
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+--connection node_1
+COMMIT;
+
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test
new file mode 100644
index 00000000000..0ea52290bb6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test
@@ -0,0 +1,46 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #1 begins a transaction that is SR replicated
+# 2. Node #2 begins a conflicting transaction, hangs
+# 3. Node #1 comits
+# 4. Node #2 gets a dup key error
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--send INSERT INTO t1 VALUES (5);
+
+--sleep 1
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+--error ER_DUP_ENTRY
+--reap
+
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test
new file mode 100644
index 00000000000..cb96fae0122
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test
@@ -0,0 +1,44 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #2 begins a transaction
+# 2. Node #1 begins conflicting transaction that is SR replicated
+# 3. Node #1 rolls back
+# 4. Node #2 can not commit because it was BF-aborted even though the SR transaction was rolled back
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+ROLLBACK;
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_create_drop.test b/mysql-test/suite/galera_sr/t/galera_sr_create_drop.test
new file mode 100644
index 00000000000..b7987d26191
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_create_drop.test
@@ -0,0 +1,33 @@
+#
+# Verify that CREATE/DROP DDLs work when streaming replication is on.
+#
+
+--source include/galera_cluster.inc
+
+SET SESSION wsrep_trx_fragment_size=1;
+
+#
+# CREATE/DROP TABLE succeeds and the change is propagated to node_2.
+#
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+--connection node_2
+SHOW CREATE TABLE t1;
+--connection node_1
+DROP TABLE t1;
+--connection node_2
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE t1;
+
+#
+# CREATE/DROP DATABASE succeeds and the change is propagated to node_2.
+#
+CREATE DATABASE mdev_18587;
+--connection node_2
+SHOW DATABASES LIKE 'mdev_18587';
+--connection node_1
+DROP DATABASE mdev_18587;
+--connection node_2
+SHOW DATABASES LIKE 'mdev_18587';
+--connection node_1
+
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test
new file mode 100644
index 00000000000..3c42cb2a0a2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test
@@ -0,0 +1,66 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events on the master:
+#
+# 1. Connection #1 begins a SR transaction
+# 2. Connection #2 issues DDL
+# 3. Connection #1 attempts to continue the transaction, gets deadlock
+# 4. Connection #1 retries the transaction and succeeds
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+# SR replication is triggered and rows have been delivered to the slave
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+
+SELECT COUNT(*) as expect_5 FROM mysql.wsrep_streaming_log;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (6);
+
+SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
+
+# Check that the transaction thus aborted could be reissued
+
+ROLLBACK;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+INSERT INTO t1 (f1) VALUES (2);
+INSERT INTO t1 (f1) VALUES (3);
+INSERT INTO t1 (f1) VALUES (4);
+INSERT INTO t1 (f1) VALUES (5);
+INSERT INTO t1 (f1) VALUES (6);
+COMMIT;
+
+SELECT COUNT(*) as expect_6 FROM t1;
+SELECT * FROM t1;
+SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) as expect_6 FROM t1;
+SELECT * FROM t1;
+SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test
new file mode 100644
index 00000000000..a3045773387
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test
@@ -0,0 +1,43 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of DROP SCHEMA DDL on a concurrent SR transaction
+# Most other DDL tests work on a table level, so this test exercises a
+# different granularity.
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+DROP SCHEMA test;
+
+--error ER_NO_SUCH_TABLE
+SELECT COUNT(*) = 0 FROM test.t1;
+
+--connection node_1
+
+# Transaction can not continue due to DDL
+--error ER_LOCK_DEADLOCK
+INSERT INTO test.t1 VALUES (6, 6);
+
+# DDL is now in effect
+--error ER_NO_SUCH_TABLE
+INSERT INTO test.t1 VALUES (6, 6);
+
+CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test
new file mode 100644
index 00000000000..4a652284e59
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test
@@ -0,0 +1,65 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of DDL on a concurrent SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+ALTER TABLE t1 DROP COLUMN f2;
+
+# SR applied before the DDL is no longer visible
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+# Transaction can not continue due to DDL, implicit ROLLBACK
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (6, 6);
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# DDL is now in effect
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 VALUES (6, 6);
+
+# But it should be possible to reissue the transaction
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test
new file mode 100644
index 00000000000..77b6e64641d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test
@@ -0,0 +1,53 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of unrelated DDL on a concurrent SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+ALTER TABLE t2 DROP COLUMN f2;
+
+# SR applied before the DDL is still visible
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+
+# Transaction can continue, even after the DDL
+--error 0
+INSERT INTO t1 VALUES (6, 6);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 6 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test b/mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test
new file mode 100644
index 00000000000..146da425d88
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test
@@ -0,0 +1,60 @@
+#
+# Test the case where a duplicate key error happens in the middle of an SR transaction
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB;
+CREATE UNIQUE INDEX i1 ON t1 (f1(512));
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1024;
+
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+# Deadlock error instead of dupkey since the transaction is SR,
+# and the statement has already replicated a fragment (which
+# makes statement rollback unsafe).
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (REPEAT('g', 1024)),(REPEAT('c', 512));
+
+# Confirm that the wsrep_schema table is now empty, as it was a full transaction rollback
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Confirm that the transaction can be restarted on either node
+
+--connection node_1
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+COMMIT;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 6 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 6 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test b/mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test
new file mode 100644
index 00000000000..b83deaee244
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test
@@ -0,0 +1,62 @@
+#
+# Test Foreign Key with SR
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE grandparent (
+ id INT NOT NULL PRIMARY KEY
+) ENGINE=InnoDB;
+
+CREATE TABLE parent (
+ id INT NOT NULL PRIMARY KEY,
+ grandparent_id INT,
+ FOREIGN KEY (grandparent_id)
+ REFERENCES grandparent(id)
+ ON UPDATE CASCADE
+) ENGINE=InnoDB;
+
+CREATE TABLE child (
+ id INT NOT NULL PRIMARY KEY,
+ grandparent_id INT,
+ FOREIGN KEY (grandparent_id)
+ REFERENCES parent(grandparent_id)
+ ON UPDATE CASCADE
+) ENGINE=InnoDB;
+
+INSERT INTO grandparent VALUES (1),(2),(3),(4);
+INSERT INTO parent VALUES (1,1), (2,2);
+INSERT INTO child VALUES (1,1), (2,2);
+
+# Start and SR transaction
+
+--connection node_1
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+
+UPDATE grandparent SET id = 5 WHERE id = 1;
+
+# No conflicting transactions are allowed to proceed on slave
+
+--connection node_2
+SET SESSION innodb_lock_wait_timeout = 1;
+
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE grandparent SET id = 10 WHERE id = 5;
+
+--error ER_LOCK_WAIT_TIMEOUT
+DELETE FROM child;
+
+# SR transaction succesffull
+
+--connection node_1
+COMMIT;
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+DROP TABLE child;
+DROP TABLE parent;
+DROP TABLE grandparent;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt
new file mode 100644
index 00000000000..6623c33c484
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt
@@ -0,0 +1 @@
+ --log-bin --log-slave-updates --loose-galera-sr-gtid-unique
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_gtid.test b/mysql-test/suite/galera_sr/t/galera_sr_gtid.test
new file mode 100644
index 00000000000..56464ba6f63
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_gtid.test
@@ -0,0 +1,46 @@
+#
+# Test basic Galera operation
+#
+
+--source include/have_log_bin.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+
+SET SESSION wsrep_trx_fragment_size=1;
+UPDATE t1 SET f1 = 2;
+
+#--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;`
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size=0;
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=0;
+
+--connection node_1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+
+--disable_query_log
+#--eval SELECT '$gtid_executed_node2' = @@global.gtid_executed AS gtid_executed_equal;
+--enable_query_log
+
+--replace_regex /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/<GTID>/ /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 256;
+
+--connection node_2
+# Perform causal wait
+SELECT 1 FROM DUAL;
+--replace_regex /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/<GTID>/ /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 256;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_insert_select.test b/mysql-test/suite/galera_sr/t/galera_sr_insert_select.test
new file mode 100644
index 00000000000..01481db5a8b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_insert_select.test
@@ -0,0 +1,33 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test large INSERT ... SELECT with SR
+#
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+# Insert 10K rows.
+INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 99 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 10000 FROM t1;
+
+--connection node_1
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test
new file mode 100644
index 00000000000..8fba27f9a73
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test
@@ -0,0 +1,52 @@
+#
+# Kill entire cluster during SR while pc.bootstrap is in effect
+# after restart, confirm that the mysql.wsrep_streaming_log table is empty
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+--connection node_1
+--source include/kill_galera.inc
+
+--sleep 1
+
+# Bootstrap the cluster from scratch
+
+--connection node_1
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+--connection node_2
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf
new file mode 100644
index 00000000000..82c001e0131
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf
@@ -0,0 +1,8 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.recovery=false'
+auto_increment_offset=1
+
+[mysqld.2]
+auto_increment_offset=2
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test
new file mode 100644
index 00000000000..5332b1a1579
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test
@@ -0,0 +1,71 @@
+#
+# Kill entire cluster during SR while pc.recovery is NOT in effect
+# after restart, confirm that the mysql.wsrep_streaming_log table is empty
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../../galera/include/auto_increment_offset_save.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+
+#
+# Kill the entire cluster and restart
+#
+--connection node_2
+--source include/kill_galera.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--let $start_mysqld_params = "--wsrep-new-cluster"
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+--connection node_2
+--let $start_mysqld_params = ""
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+
+#
+# Check that wsrep_streaming_log is empty
+#
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) `expect 0` FROM t1;
+SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log;
+
+
+#
+# Cleanup
+#
+--source ../../galera/include/auto_increment_offset_restore.inc
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test
new file mode 100644
index 00000000000..0ba7cedbd8f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test
@@ -0,0 +1,54 @@
+#
+# Kill entire cluster during SR while pc.recovery is in effect
+# after restart, confirm that the mysql.wsrep_streaming_log table is empty
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+--connection node_1
+--source include/kill_galera.inc
+
+--sleep 1
+
+# Bootstrap the cluster from scratch
+
+--connection node_1
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+--connection node_2
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test
new file mode 100644
index 00000000000..03d09f33fab
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test
@@ -0,0 +1,59 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test KILL CONNECTION on a transaction that has already replicated some data via SR
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+# Confirm that the transaction is SR-replicated
+--connection node_2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+# Kill the transaction by killing the entire connection
+
+--connection node_1
+--let $connection_id = `SELECT CONNECTION_ID()`
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--disable_query_log
+--eval KILL CONNECTION $connection_id
+--enable_query_log
+
+# Confirm that the disconnection caused the updates made so far to be removed
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+
+# Confirm that the transaction can be reissued in its entirety on the slave without a conflict
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+COMMIT;
+
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1a
+SELECT COUNT(*) = 5 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_query.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_query.test
new file mode 100644
index 00000000000..8bce5f6bc36
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_query.test
@@ -0,0 +1,59 @@
+--source include/galera_cluster.inc
+
+#
+# Test KILL QUERY on a statement that has already replicated some data via SR
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--let $connection_id = `SELECT CONNECTION_ID()`
+--send INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
+
+# Wait for some SR to arrive on the slave.
+--connection node_2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT TABLE_ROWS > 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--connection node_1
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--echo Killing query ...
+--disable_query_log
+--eval KILL QUERY $connection_id
+--enable_query_log
+
+--connection node_1
+--error ER_QUERY_INTERRUPTED
+--reap
+
+# Confirm that the kill caused the updates made so far to be removed
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1
+--source include/wait_condition.inc
+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+
+# Confirm that the transaction can be reissued in its entirety on the slave without a conflict
+
+INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+
+--connection node_1
+SET GLOBAL wsrep_sync_wait=15;
+--let $wait_condition = SELECT COUNT(*) = 1000 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf
new file mode 100644
index 00000000000..290d8fe196e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.weight=2'
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test
new file mode 100644
index 00000000000..cbf7213c69f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test
@@ -0,0 +1,85 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in
+# progress but before a fragment has already been applied on the slave. It
+# is expected that after the slave restarts, the cluster will continue to
+# be consistent.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Block node #2's applier before table t1's inserts have come into play
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
+--source include/wait_condition.inc
+
+LOCK TABLE t2 WRITE;
+
+--connection node_1
+INSERT INTO t2 VALUES (1);
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_1
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--source include/kill_galera.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+--connection node_2
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+COMMIT;
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1
+--source include/wait_condition.inc
+
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt
new file mode 100644
index 00000000000..132c6aed246
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt
@@ -0,0 +1 @@
+--innodb_log_file_size=1G --binlog-row-event-max-size=100M
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test
new file mode 100644
index 00000000000..63278555723
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test
@@ -0,0 +1,58 @@
+#
+# Test the replication and subsequent cleanup of a few, very large fragments
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1024 * 1024 * 10;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 50000 FROM t1;
+
+--connection node_1
+ROLLBACK;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_2';
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_1 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_1';
+
+DROP TABLE ten;
+DROP TABLE t1;
+
+CALL mtr.add_suppression('InnoDB: Resizing redo log from');
+CALL mtr.add_suppression('InnoDB: Starting to delete and rewrite log files');
+CALL mtr.add_suppression('InnoDB: New log files created, LSN=');
+
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_load_data.test b/mysql-test/suite/galera_sr/t/galera_sr_load_data.test
new file mode 100644
index 00000000000..363443a9e64
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_load_data.test
@@ -0,0 +1,49 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test Streaming Replication + LOAD DATA
+#
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 512;
+
+# Create a file for LOAD DATA with 20K entries
+--perl
+open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_sr_load_data.csv") or die;
+foreach my $i (1..20000) {
+ print FILE "$i\n";
+}
+EOF
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Record wsrep_last_committed as it was before LOAD DATA
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+--disable_query_log
+--disable_warnings
+set global wsrep_load_data_splitting=ON;
+--enable_warnings
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1;
+--enable_query_log
+
+--connection node_2
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+SELECT COUNT(*) = 20000 FROM t1;
+# LOAD-ing 20K rows causes 3 commits to be registered
+--disable_query_log
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before = 3 AS wsrep_last_committed_diff
+--enable_query_log
+
+--connection node_1
+--disable_query_log
+--disable_warnings
+set global wsrep_load_data_splitting=OFF;
+--enable_warnings
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test b/mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test
new file mode 100644
index 00000000000..40e63e7c67f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test
@@ -0,0 +1,50 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+#
+# Test Streaming Replication and LOAD DATA splitting operating at the same time
+#
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+--let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting`
+
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_load_data_splitting = TRUE;
+
+
+# Create a file for LOAD DATA with 95K entries
+--perl
+open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_sr_load_data.csv") or die;
+foreach my $i (1..95000) {
+ print FILE "$i\n";
+}
+EOF
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Record wsrep_last_committed as it was before LOAD DATA
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+--disable_query_log
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1;
+--enable_query_log
+
+--connection node_2
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+SELECT COUNT(*) = 95000 FROM t1;
+
+# LOAD-ing 95K rows causes 10 'commits' to be registered
+--disable_query_log
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before = 10 AS wsrep_last_committed_diff;
+--enable_query_log
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt
new file mode 100644
index 00000000000..03fcb5d040d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt
@@ -0,0 +1 @@
+--log-slave-updates --log-bin
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_log_bin.test b/mysql-test/suite/galera_sr/t/galera_sr_log_bin.test
new file mode 100644
index 00000000000..7dfa7850c15
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_log_bin.test
@@ -0,0 +1,70 @@
+#
+# Interleave SR and non-SR transactions and confirm that the binlog is in correct order
+#
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
+
+--source include/galera_cluster.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t3 VALUES (1);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t4 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (2);
+COMMIT;
+
+--connection node_1a
+INSERT INTO t2 VALUES (2);
+COMMIT;
+
+--connection node_2
+INSERT INTO t3 VALUES (2);
+COMMIT;
+--connection node_2a
+INSERT INTO t4 VALUES (2);
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 2 FROM t4;
+
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+--connection node_2
+SELECT COUNT(*) = 2 FROM t4;
+
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test b/mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test
new file mode 100644
index 00000000000..9b8dae9d8e3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test
@@ -0,0 +1,53 @@
+#
+# Test the replication and subsequent cleanup of a large number of small transaction fragments
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 10000 FROM t1;
+
+--connection node_1
+ROLLBACK;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_2';
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_1 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_1';
+
+DROP TABLE ten;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.combinations b/mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.combinations
new file mode 100644
index 00000000000..1ce3b45aa1a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.combinations
@@ -0,0 +1,4 @@
+[binlogon]
+log-bin
+
+[binlogoff]
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.test b/mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.test
new file mode 100644
index 00000000000..9004d332393
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_multirow_rollback.test
@@ -0,0 +1,156 @@
+#
+# Test multirow insert rollback with streaming replication
+#
+
+--source include/galera_cluster.inc
+
+
+#
+# Case 1: multirow insert results full rollback if a fragment
+# managed to replicate
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+# With fragment size 1 we expect full rollback
+# because a fragment is already replicated.
+# Therefore, expect ER_LOCK_DEADLOCK instead of ER_DUP_ENTRY
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+COMMIT;
+
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+DROP TABLE t1;
+
+
+#
+# Case 2: error on multirow insert results in empty commit
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+COMMIT;
+
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+DROP TABLE t1;
+
+
+#
+# Case 3: error on multirow insert does not affect previous statements
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'b');
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f2) VALUES ('c'), ('d');
+COMMIT;
+
+--echo expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+
+--connection node_2
+--echo expect (1,'a'), (2, 'b')
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+
+#
+# Case 4: error on autocommit multirow insert
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY DEFAULT 0, f2 char(12));
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+ --connection node_1
+SET SESSION wsrep_trx_fragment_size = 1000;
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f2) VALUES ('a'), ('b');
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS expect_0 FROM t1;
+
+DROP TABLE t1;
+
+
+#
+# Case 5: FK constraint violation on multirow insert results
+# full rollback if a fragment has already replicated
+#
+--connection node_1
+CREATE TABLE p(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE c(id int primary key, fk1 int) ENGINE=InnoDB;
+ALTER TABLE c ADD FOREIGN KEY (fk1) references p(id);
+INSERT INTO p VALUES(1, 0);
+
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO c VALUES (3,1);
+--error ER_LOCK_DEADLOCK
+INSERT INTO c VALUES (1,1), (2,2);
+COMMIT;
+
+SELECT * FROM p;
+SELECT * FROM c;
+
+--connection node_2
+SELECT * FROM p;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p;
+
+
+#
+# Case 6: FK constraint violation on multirow insert results
+# stmt rollback if no fragments have replicated
+#
+--connection node_1
+CREATE TABLE p(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE c(id int primary key, fk1 int) ENGINE=InnoDB;
+ALTER TABLE c ADD FOREIGN KEY (fk1) references p(id);
+INSERT INTO p VALUES(1, 0);
+
+SET SESSION wsrep_trx_fragment_size=1000;
+START TRANSACTION;
+INSERT INTO c VALUES (3,1);
+--error ER_NO_REFERENCED_ROW_2
+INSERT INTO c VALUES (1,1), (2,2);
+COMMIT;
+
+SELECT * FROM p;
+SELECT * FROM c;
+
+--connection node_2
+SELECT * FROM p;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_myisam.test b/mysql-test/suite/galera_sr/t/galera_sr_myisam.test
new file mode 100644
index 00000000000..b037f817610
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_myisam.test
@@ -0,0 +1,29 @@
+#
+# Test that the basic MyISAM replication works even with SR enabled
+# We basically check that the data arrived on the slave and that there
+# were no assertions.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 TEXT) ENGINE=MyISAM;
+
+--let $wsrep_replicate_myisam_orig = `SELECT @@wsrep_replicate_myisam`
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET GLOBAL wsrep_replicate_myisam = TRUE;
+
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT LENGTH(f1) = 65535 FROM t1;
+
+DROP TABLE t1;
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig;
+--enable_query_log
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf
new file mode 100644
index 00000000000..574ae28b54a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf
@@ -0,0 +1,11 @@
+!include ../galera_2nodes.cnf
+
+# We do not set mysqldump-related SST options here because doing so on startup
+# causes the first MTR connection to be forefully dropped by Galera, which in turn confuses MTR
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
+
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test
new file mode 100644
index 00000000000..e660895cde6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test
@@ -0,0 +1,87 @@
+#
+# Test mysqldump SST on slave if SR transaction is in progress
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+
+--source suite/galera/include/galera_sst_set_mysqldump.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source suite/galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+# Insert 1000 rows
+INSERT INTO t1 (f2) SELECT REPEAT('x', 255) FROM ten AS a1, ten AS a2, ten AS a3;
+
+# Update 1000 rows
+UPDATE t1 SET f2 = REPEAT('y', 255);
+
+# Wait for SR replication to kick in
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+# Restart node #2
+
+--connection node_2
+--let $MYSQLD2_DATADIR = `SELECT @@datadir`
+
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+# Force SST
+--remove_file $MYSQLD2_DATADIR/grastate.dat
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+--connection node_2
+--let $restart_noprint = 1
+--let $restart_parameters = --wsrep_sst_auth=sst:sst --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=127.0.0.1:$NODE_MYPORT_2
+--source include/start_mysqld.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# Check that node #2 is caught up with the SR transaction that is still in progress
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+# Finalize transaction
+--connection node_1
+UPDATE t1 SET f2 = REPEAT('z', 255);
+COMMIT;
+
+# Confirm proper replication of entire transaction to node #2
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 1000 FROM t1;
+SELECT COUNT(*) = 1000 FROM t1 WHERE f2 = REPEAT('z', 255);
+
+DROP TABLE t1;
+DROP TABLE ten;
+
+--connection node_1
+# galera_sst_restore.inc uses DROP USER internally which is incompatible
+# with SR, need to disable SR before that.
+SET SESSION wsrep_trx_fragment_size=0;
+--source suite/galera/include/galera_sst_restore.inc
+
+# Restore original auto_increment_offset values.
+--source suite/galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_nonPK_and_PA.test b/mysql-test/suite/galera_sr/t/galera_sr_nonPK_and_PA.test
new file mode 100644
index 00000000000..c343cd202bf
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_nonPK_and_PA.test
@@ -0,0 +1,109 @@
+#
+# This test is a modified version of Gabor Orosz (GOro) test in jira tracker:
+# https://jira.mariadb.org/browse/MDEV-25551
+#
+# The underlying problem with MDEV-25551 turned out to be that
+# transactions having changes for tables with no primary key,
+# were not safe to apply in parallel. This is due to excessive locking
+# in innodb side, and even non related row modifications could end up
+# in lock conflict during applying.
+#
+# The test verifies that a transaction executing a streaming replication
+# will disable parallel applying if it modifies a table with no primary key.
+# And, if PA was disabled temporarily, it will be relaxed if next fragment
+# contains changes for table with primary key.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+
+# Setup
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+# Ensure that we have enough applier threads to process transactions in parallel
+SET GLOBAL wsrep_slave_threads = 2;
+
+flush status;
+
+--connection node_1
+CREATE TABLE t1 (f1 int, f2 int) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 int primary key, f2 int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,0);
+INSERT INTO t1 VALUES (2,0);
+
+INSERT INTO t2 VALUES (1,0);
+INSERT INTO t2 VALUES (2,0);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*)=2 FROM t2;
+--source include/wait_condition.inc
+
+# remember status for received replication counter and certification dependency distance
+--let $cert_deps_distance = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cert_deps_distance'`
+
+--connection node_1
+# Invoke the first transaction
+set session wsrep_trx_fragment_size=1;
+START TRANSACTION;
+UPDATE t1 SET f2=1 where f1=1;
+
+--connection node_2
+# verify that certification dependency distance has dropped
+--disable_query_log
+--eval SELECT VARIABLE_VALUE < $cert_deps_distance as 'distance' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cert_deps_distance'
+--enable_query_log
+
+# if deps distance dropped, it is indirect evidence that parallel applying was not approved
+
+# Try next that PA retricting is relaxed, if next fragment updates table t1 with primary key
+# wsrep_cert_deps_distance cannot be trsuted in this test phase, we verify parallel applying
+# by setting sync point for applier thread
+
+# Set up a synchronization point to catch update on t2
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+update t2 set f2=1 where f1=1;
+
+--connection node_2
+# Wait for the update t2 to apply until commit phase
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# Set up a synchronization point to catch the SR trx applying
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+# continue SR transaction, and now update t2, which has PK
+UPDATE t2 set f2=2 where f1=2;
+
+--connection node_2
+# Wait for the update t2 to apply until commit phase
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# Let the first transaction to proceed
+--let $galera_sync_point = commit_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_1
+COMMIT;
+
+# Teardown
+--connection node_1
+SET GLOBAL wsrep_slave_threads = DEFAULT;
+
+DROP TABLE t1;
+DROP TABLE t2;
+--connection node_2
+SET GLOBAL wsrep_slave_threads = DEFAULT;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test b/mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test
new file mode 100644
index 00000000000..83a7acbe3e0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test
@@ -0,0 +1,59 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test SR with parallel apply
+#
+
+--connection node_2
+--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+SET GLOBAL wsrep_slave_threads = 5;
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+--send INSERT INTO t1 (f2) VALUES (1);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+--send INSERT INTO t1 (f2) VALUES (2);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1 WHERE f2 = 1;
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1 WHERE f2 = 2;
+--source include/wait_condition.inc
+
+--connection node_1
+--reap
+COMMIT;
+
+--connection node_1a
+--reap
+ROLLBACK;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+
+--connection node_2
+--disable_query_log
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
+--enable_query_log
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback.test
new file mode 100644
index 00000000000..33a318f8ae3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback.test
@@ -0,0 +1,76 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that ROLLBACK works correctly with streaming replication
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) >= 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK;
+
+#
+# After ROLLBACK, the table on node #2 should be empty
+#
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+
+#
+# It should be possible to re-insert the values we just rolled back
+#
+
+--connection node_1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) >= 9 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) >= 10 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test
new file mode 100644
index 00000000000..e5d204d85c8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test
@@ -0,0 +1,57 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that a SR transaction that was just ROLLBACKed on one node can be
+# run against another node without any conflicts
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK;
+
+#
+# After ROLLBACK, the table on node #2 should be empty
+#
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+SELECT * FROM t1;
+
+#
+# It should be possible to reissue the same transaction against node #2
+#
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_5 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test
new file mode 100644
index 00000000000..93ff7a948c4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test
@@ -0,0 +1,51 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that ROLLBACK TO SAVEPOINT works correctly with streaming replication
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 5 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK TO SAVEPOINT s1;
+
+INSERT INTO t1 VALUES (21, 'c');
+INSERT INTO t1 VALUES (22, 'c');
+INSERT INTO t1 VALUES (23, 'c');
+INSERT INTO t1 VALUES (24, 'c');
+INSERT INTO t1 VALUES (25, 'c');
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'a';
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'c';
+
+--connection node_1
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test
new file mode 100644
index 00000000000..ba981c8c9a3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test
@@ -0,0 +1,59 @@
+#
+# Test the case where a statement is rolled back due to an error while
+# Streaming Replication is in effect. We construct an INSERT ... SELECT
+# statement that will fail with a duplicate key error towards the end of
+# the statement, after a portion has already been replicated via SR.
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a');
+
+# This poison value is used to cause the INSERT ... SELECT below to fail
+INSERT INTO t2 VALUES (3, 'b');
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--disable_query_log
+--let $last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--enable_query_log
+
+--error ER_DUP_ENTRY
+INSERT INTO t2 SELECT * FROM t1;
+
+#
+# We should see three fragments replicated: Rows 1, 2 and rollback fragment.
+#
+--disable_query_log
+--let $last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--eval SELECT $last_committed_after - $last_committed_before AS last_committed_diff
+--enable_query_log
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t2;
+--source include/wait_condition.inc
+
+# Cluster continues to operate after the implicit ROLLBACK;
+--connection node_1
+INSERT INTO t2 VALUES (1, 'c');
+
+--connection node_2
+INSERT INTO t2 VALUES (2, 'c');
+
+--connection node_1
+SELECT * FROM t2;
+
+--connection node_2
+SELECT * FROM t2;
+
+--connection node_1
+
+SET SESSION wsrep_trx_fragment_size = DEFAULT;
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test
new file mode 100644
index 00000000000..3f7407fe536
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test
@@ -0,0 +1,53 @@
+#
+# Shut down master (node #2) while an SR transaction is in progress
+#
+
+--source include/galera_cluster.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1),(2),(3);
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+# Confirm that SR table on slave is empty
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_2
+--source include/start_mysqld.inc
+
+# SR table on master should be empty too
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Confirm that the INSERT can be re-issued
+INSERT INTO t1 VALUES (1),(2),(3);
+
+--connection node_1
+SELECT COUNT(*) = 3 FROM t1;
+
+DROP TABLE t1;
+
+--connection node_2
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for ");
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
new file mode 100644
index 00000000000..5d4a58b2d03
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
@@ -0,0 +1,74 @@
+#
+# Shut down slave (node #2) while an SR transaction is in progress
+#
+
+--source include/galera_cluster.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../galera/include/auto_increment_offset_save.inc
+--connection node_2
+call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*");
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+
+# We start two transactions on the master so that we can commit one while the slave
+# is down and commit the other after the slave has rejoined
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13);
+
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21),(22),(23);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+# Commit one transaction while the slave is down
+--connection node_1a
+INSERT INTO t1 VALUES (14),(15),(16);
+COMMIT;
+
+# Restart slave
+--connection node_2
+--source include/start_mysqld.inc
+
+# Confirm SR table on slave has entries
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) AS EXPECT_6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
+
+# Commit the second transaction on master after the slave has rejoined
+--connection node_1b
+INSERT INTO t1 VALUES (24),(25),(26);
+COMMIT;
+
+# Confirm that SR table on slave is empty
+--connection node_2
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) AS EXPECT_12 FROM t1;
+
+# SR table on master should be empty too
+--connection node_1
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_slow.test b/mysql-test/suite/galera_sr/t/galera_sr_slow.test
new file mode 100644
index 00000000000..d98305102fc
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_slow.test
@@ -0,0 +1,11 @@
+--source include/galera_cluster.inc
+
+--connection node_1
+SET GLOBAL wsrep_trx_fragment_unit='bytes';
+SET GLOBAL wsrep_trx_fragment_size=10240000;
+SET GLOBAL slow_query_log=ON;
+SET GLOBAL log_output='TABLE';
+SELECT SLEEP(10);
+SET GLOBAL wsrep_trx_fragment_unit=DEFAULT;
+SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
+SET GLOBAL log_output=DEFAULT;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf
new file mode 100644
index 00000000000..c8e17436e71
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf
@@ -0,0 +1,6 @@
+!include ../galera_2nodes.cnf
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=16K'
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=16K'
+
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test
new file mode 100644
index 00000000000..403b44286d9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test
@@ -0,0 +1,21 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# A simple test with a very low value for gcache.size - 16K
+#
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SELECT COUNT(*) = 10000 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test b/mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test
new file mode 100644
index 00000000000..f44d67e5c8c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test
@@ -0,0 +1,260 @@
+#
+# This test tests the operation of SR transaction replay. If a
+# potentially conflicting remote transaction arrives at
+# just the right time during the commit of a local transaction,
+# the local transaction will be aborted and replayed.
+#
+# This test is divided in two sections:
+# 1) Test the scenario where the last fragment does not have write set
+# payload, just commit flag is replicated
+# 2) Test the scenario where the last fragment has write set payload
+# and commit flag
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+# Control connection for manipulating galera sync points
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_1
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+
+#########################################################################
+#
+# 1) Replay without commit fragment write set payload
+#
+#########################################################################
+
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+
+#
+# Block the commit from node_2
+#
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Issue conflicting UPDATE from node_2 and wait until it hits the
+# apply monitor (but does not apply yet)
+#
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Set a new sync point to block in local monitor on node_1 commit
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Send the commit on node_1
+#
+--connection node_1
+--send COMMIT
+
+#
+# Wait until commit reaches sync point
+#
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release conflicting slave transaction and wait until it has BF
+# aborted pending COMMIT
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = abort_trx_end local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release both threads, local thread will now replay
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+
+#
+# Commit must succeed
+#
+--connection node_1
+--reap
+
+
+#
+# Check the outcome and that wsrep schema SR table is empty
+#
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# wsrep_local_replays has increased by 1
+#
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--enable_query_log
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DELETE FROM t1;
+
+#########################################################################
+#
+# 2) Replay with commit fragment write set payload
+#
+#########################################################################
+
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+
+#
+# Do first update SR on
+#
+UPDATE t1 SET f2 = 'x' WHERE f1 = 1;
+
+#
+# Disable SR for following statements
+#
+SET SESSION wsrep_trx_fragment_size = 0;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+
+#
+# Block the commit from node_2
+#
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Issue conflicting UPDATE from node_2 and wait until it hits the
+# apply monitor (but does not apply yet)
+#
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Set a new sync point to block in local monitor on node_1 commit
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Send the commit on node_1
+#
+--connection node_1
+--send COMMIT
+
+#
+# Wait until commit reaches sync point
+#
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release conflicting slave transaction and wait until it has BF
+# aborted pending COMMIT
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = abort_trx_end local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release both threads, local thread will now replay
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+
+#
+# Commit must succeed
+#
+--connection node_1
+--reap
+
+
+#
+# Check the outcome and that wsrep schema SR table is empty
+#
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# wsrep_local_replays has increased by 1
+#
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 2 AS wsrep_local_replays;
+--enable_query_log
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DELETE FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test b/mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test
new file mode 100644
index 00000000000..0cf05765838
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test
@@ -0,0 +1,54 @@
+#
+# Test wsrep_fragment_unit = statements
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 3;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+
+--connection node_1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+# Expect noting is replicated yet, so far we have 2 statements
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+INSERT INTO t1 VALUES (2);
+
+# Expect 2 rows in t1 and 1 fragment in SR table
+--connection node_2
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+ --connection node_1
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+# Expect 5 rows in t1 and 2 fragments in SR table
+--connection node_2
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+COMMIT;
+
+# Expect 5 rows in t1 and empty SR table
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt
new file mode 100644
index 00000000000..0b5f8bf7104
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt
@@ -0,0 +1 @@
+--log-bin-use-v1-row-events=1 --wsrep-trx-fragment-size=1
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test
new file mode 100644
index 00000000000..d3d4d2d0c14
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test
@@ -0,0 +1,27 @@
+#
+# Test that Galera SR continues to run even with --log-bin-use-v1-row-events=1
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 1 FROM t1;
+
+--connection node_1
+COMMIT;
+
+SET AUTOCOMMIT=ON;
+UPDATE t1 SET f1 = 2 WHERE f1 = 1;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test
new file mode 100644
index 00000000000..98f6e796ef6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test
@@ -0,0 +1,70 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that SR transaction is cumulatively allowed to grow beyond repl.max_ws_size
+# if individual fragements are below that size
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=4096';
+
+#
+# Create a transaction larger than repl.max_ws_size
+#
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+
+#
+# We expect that the transaction can proceed successfully
+#
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 10 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+# Commit succeeds
+COMMIT;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 100 FROM t1;
+
+#
+# Cleanup
+#
+
+DROP TABLE t1;
+DROP TABLE ten;
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
+--enable_query_log
+
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test
new file mode 100644
index 00000000000..2b9bc4819b8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test
@@ -0,0 +1,62 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that if wsrep_trx_fragment_size > repl.max_ws_size, no SR takes place and
+# the transaction is properly aborted.
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+
+SET SESSION wsrep_trx_fragment_size = 256;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=128';
+
+#
+# Create a transaction larger than repl.max_ws_size
+#
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+--error ER_ERROR_DURING_COMMIT,ER_ERROR_ON_WRITE,ER_BINLOG_ROW_LOGGING_FAILED
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1, ten AS a2;
+
+#
+# We expect that the transaction can not complete successfully
+#
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--sleep 2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 0 FROM t1;
+
+#
+# Cleanup
+#
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_trx_fragment_size = $wsrep_trx_fragment_size_orig;
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
+--enable_query_log
+
+DROP TABLE t1;
+DROP TABLE ten;
+
+call mtr.add_suppression('WSREP: SR rollback replication failure.*');
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: SR rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
+call mtr.add_suppression('WSREP: fragment replication failed:');
+call mtr.add_suppression('WSREP: post commit failed for SR rollback');
+call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*');
+call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *');
diff --git a/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test
new file mode 100644
index 00000000000..ea40f58db73
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test
@@ -0,0 +1,38 @@
+#
+# Test option wsrep_ignore_apply_errors
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Delete row that does not exist using SR transaction
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 1 FROM t1;
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+
+SET SESSION wsrep_trx_fragment_size = 0;
+DROP TABLE t1;
+
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Can't find record in 't1'"); \ No newline at end of file
diff --git a/mysql-test/suite/galera_sr/t/mdev_18631.cnf b/mysql-test/suite/galera_sr/t/mdev_18631.cnf
new file mode 100644
index 00000000000..6fac754e21b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mdev_18631.cnf
@@ -0,0 +1,23 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin
+log-slave-updates
+log-bin-compress
+
+[mysqld.1]
+#gtid_domain_id=1
+wsrep_gtid_mode=ON
+# Maximum allowed wsrep_gtid_domain_id.
+wsrep_gtid_domain_id=4294967295
+wsrep_trx_fragment_size=1
+wsrep_trx_fragment_unit='ROWS'
+
+[mysqld.2]
+#gtid_domain_id=2
+wsrep_gtid_mode=ON
+wsrep_gtid_domain_id=4294967295
+wsrep_trx_fragment_size=1
+wsrep_trx_fragment_unit='ROWS'
+#wsrep_gitd_domain_id value will be inherited from donor node (mysqld.1)
+#wsrep_gitd_domain_id=X
diff --git a/mysql-test/suite/galera_sr/t/mdev_18631.test b/mysql-test/suite/galera_sr/t/mdev_18631.test
new file mode 100644
index 00000000000..b6a0d85bbd4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mdev_18631.test
@@ -0,0 +1,24 @@
+#
+# Test that streaming replication works with wsrep_gtid_mode=ON.
+# The configuration is provided in mdev_18631.cnf.
+#
+
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--echo # On node_1
+--connection node_1
+CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB;
+
+INSERT INTO t1 VALUES (1), (2), (3);
+
+--connection node_2
+SELECT * FROM t1;
+
+--connection node_1
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep#215.test b/mysql-test/suite/galera_sr/t/mysql-wsrep#215.test
new file mode 100644
index 00000000000..e3e7411c7ea
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep#215.test
@@ -0,0 +1,176 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #1 begins a transaction
+# 2. Node #2 performs a conflicting insert
+# 3. Node #1 attempts to SR-replicate a conflicting transaction
+#
+
+# to sync node_1 appliers
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 2;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+--send INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+# Wait for the above INSERT to fail certification
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+COMMIT;
+
+SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+SET DEBUG_SYNC = 'RESET';
+
+#
+# Similar test with BYTES unit
+#
+--connection node_1
+TRUNCATE TABLE t1;
+
+SET SESSION wsrep_trx_fragment_size = 10;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+--send INSERT INTO t1 VALUES (1)
+
+# Wait for the above INSERT to fail certification
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+ROLLBACK;
+
+SELECT * FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT * FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+SET DEBUG_SYNC = 'RESET';
+
+#
+# One more test with BYTES unit, but now fragment size is adjusted so
+# that second insert should trigger fragment replication.
+# Currently 200 bytes is good choice here, but this may change with
+# future MySQL versions.
+# => If this test fails after some MySQL merge, check if frgament size
+# needs to be tuned to spot at second insert statement.
+#
+--connection node_1
+TRUNCATE TABLE t1;
+
+SET SESSION wsrep_trx_fragment_size = 200;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+--send INSERT INTO t1 VALUES (2)
+
+# Wait for the above INSERT to fail certification
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
+
+--connection node_2
+CALL mtr.add_suppression("WSREP: Could not find applier context for");
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test
new file mode 100644
index 00000000000..d534fcc5524
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test
@@ -0,0 +1,22 @@
+#
+# Statement with no side effects causes unnecessary full rollback
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+# Let's cause some bogus error with a statement that
+# does not cause any replication event.
+# The following used to return error ER_LOCK_DEADLOCK
+# and cause the entire transaction to be rolled back.
+--error ER_GLOBAL_VARIABLE
+SET SESSION wsrep_cluster_name = ' ';
+
+INSERT INTO t1 VALUES (2);
+COMMIT;
+
+SELECT f1 AS expect_1_and_2 FROM t1;
+DROP TABLE t1; \ No newline at end of file
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt
new file mode 100644
index 00000000000..03fcb5d040d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt
@@ -0,0 +1 @@
+--log-slave-updates --log-bin
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test
new file mode 100644
index 00000000000..06e56d3c9cd
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test
@@ -0,0 +1,41 @@
+# SR transactions are not binlogged #136
+
+--source include/galera_cluster.inc
+
+--connection node_1
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+COMMIT;
+
+SET SESSION wsrep_trx_fragment_size = 0;
+INSERT INTO t1 VALUES (3),(4);
+COMMIT;
+
+--connection node_1
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+--connection node_2
+# Wait for all updates to arrive before dumping binlog
+SELECT COUNT(*) = 4 FROM t1;
+
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test
new file mode 100644
index 00000000000..3694dc9ad43
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test
@@ -0,0 +1,25 @@
+# SR: two identical transactions have different value for the WSREP_FLAG_PA_UNSAFE flag
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+
+--connection node_2
+SELECT flags FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+ROLLBACK;
+INSERT INTO t1 VALUES (3),(4);
+
+--connection node_2
+SELECT flags FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+ROLLBACK;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test
new file mode 100644
index 00000000000..deeb890fa0b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test
@@ -0,0 +1,21 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+
+COMMIT;
+
+DROP TABLE t1;
+
+--connection node_2
+--source include/galera_wait_ready.inc
+
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test
new file mode 100644
index 00000000000..e0a443061df
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test
@@ -0,0 +1,62 @@
+# statement rollback for SR transaction causes slave crash for inconsistency
+
+# We test the following:
+# 1. Create a transaction that is blocked by an SR transaction
+# 2. Force the SR transaction to have a statement rollback
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1);
+
+--connection node_2
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL debug_dbug = 'd,sync.wsrep_apply_cb';
+
+# Begin SR transaction
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+
+# Begin non-SR transaction that will block waiting for the SR transaction
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+--send INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+
+# Cause the SR transaction to fail with a duplicate key error
+--connection node_1
+--send INSERT INTO t1 SELECT * FROM t2;
+
+# Continue and commit the non-SR transaction.
+--connection node_1a
+--reap
+INSERT INTO t1 VALUES (6), (7), (8), (9), (10);
+COMMIT;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+--reap
+
+--connection node_2
+SET GLOBAL wsrep_slave_threads = 1;
+SET GLOBAL debug_dbug = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+SELECT COUNT(*) = 10 FROM t1;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+SET DEBUG_SYNC = RESET;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test
new file mode 100644
index 00000000000..4aaff058b30
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test
@@ -0,0 +1,17 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (id INT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc
new file mode 100644
index 00000000000..7f13afa3c47
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc
@@ -0,0 +1,109 @@
+# --source include/galera_cluster.inc
+# --source include/have_debug_sync.inc
+
+#
+# This test attempts to catch a race condition between autocommit
+# transaction and transaction which is rolling back due to
+# deadlock.
+#
+# Test outline:
+# * Trx 1a makes updates
+# * SR trx 1b writes a row 3, then makes updates
+# * AC trx 1c will attempt to write row 3 and will wait for lock
+# held by 1b
+# * Sync point is set for 1b to delay SR rollback
+# * SR trx 1b makes an update which makes it conflict with trx 1a
+# * Slave shows BF - BF conflict and fails in applying write event
+
+--connection node_1
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+
+# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+# --connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+# --connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--connection node_1a
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+
+
+--connection node_1b
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+
+--connection node_2
+SELECT * FROM t1;
+
+# Will block, waiting for 1b
+--connection node_1c
+SET AUTOCOMMIT=ON;
+--send INSERT INTO t1 VALUES (3, 'c')
+
+--connection node_2
+SELECT * FROM t1;
+
+# Will block, waiting for 1b
+--connection node_1a
+--send UPDATE t1 SET f2 = 'a' WHERE f1 = 2
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER != 'system user' AND STATE = 'Updating';
+--source include/wait_condition.inc
+
+# Will deadlock
+--connection node_1b
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+--send UPDATE t1 SET f2 = 'b' WHERE f1 = 1
+
+# Wait until 1b hits rollback
+--connection node_1
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+
+# UPDATE 12.06.2016: as of recent wsrep API changes, rollbacking thread no
+# longer queues ROLLBACKs and blocks on ROLLBACK replication before performing
+# the actual rollback. As a result this test is moot as both node_1a and node_1c
+# connections are hanging now until sync point is released. Thus sync point
+# release had to be moved above to release the connections. However it is not
+# impossible that further changes in the code may reintroduce the race, so
+# leaving the test as close to original as possible.
+#
+# --connection node_1a
+# --reap
+# COMMIT;
+#
+# --connection node_1c
+# --reap
+#
+# UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+
+--connection node_1
+SET DEBUG_SYNC = 'now SIGNAL continue';
+
+--connection node_1c
+--reap
+
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+
+--connection node_1a
+--reap
+COMMIT;
+
+--connection node_1b
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1
+SELECT * FROM t1;
+--connection node_2
+SELECT * FROM t1;
+
+--connection node_1
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test
new file mode 100644
index 00000000000..85d501288b0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test
@@ -0,0 +1,41 @@
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+#
+# This test attempts to catch a race condition between autocommit
+# transaction and transaction which is rolling back due to
+# deadlock.
+#
+# Since it is trying to catch a race condition which may not reliably
+# occur, several runs are necessary for certainty. Hence the body of
+# the test was placed into the .inc file and sourced several times below
+#
+# Test outline:
+# * Trx 1a makes updates
+# * SR trx 1b writes a row 3, then makes updates
+# * AC trx 1c will attempt to write row 3 and will wait for lock
+# held by 1b
+# * Sync point is set for 1b to delay SR rollback
+# * SR trx 1b makes an update which makes it conflict with trx 1a
+# * Slave shows BF - BF conflict and fails in applying write event
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test
new file mode 100644
index 00000000000..544109dadee
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test
@@ -0,0 +1,47 @@
+# Assertion `total_length + thd->wsrep_fragment_base == saved_pos' failed in wsrep_write_cache_inc() with ROLLBACK TO SAVEPOINT and SR
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 10 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK TO SAVEPOINT s1;
+
+INSERT INTO t1 VALUES (21, 'c');
+
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 6 FROM t1;
+
+
+--connection node_2
+SELECT COUNT(*) = 6 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test
new file mode 100644
index 00000000000..f9c09391f8f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test
@@ -0,0 +1,29 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_2
+--sleep 2
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt
new file mode 100644
index 00000000000..a6ef074a120
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt
@@ -0,0 +1 @@
+--innodb-lock-wait-timeout=1
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test
new file mode 100644
index 00000000000..72c7a7b5e82
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test
@@ -0,0 +1,44 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# mysql-wsrep-features#32 Assertion `meta->gtid.seqno == wsrep_thd_trx_seqno(thd)' failed in wsrep_commit_cb with SR
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+SET AUTOCOMMIT=OFF;
+
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (6);
+
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (5);
+ROLLBACK;
+
+--connection node_1
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test
new file mode 100644
index 00000000000..f63e1cca70c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test
@@ -0,0 +1,48 @@
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Block node #2's applier so that it is able to issue a conflicting INSERT before
+# node #1 INSERTs have been applied on it.
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+SELECT COUNT(*) = 0 FROM t1;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL debug_dbug = '+d,sync.wsrep_apply_cb';
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+--send INSERT INTO t1 VALUES (1);
+
+--connection node_1
+COMMIT;
+
+--connection node_2a
+SET GLOBAL debug_dbug = '';
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+--connection node_2
+--error ER_DUP_ENTRY,ER_LOCK_DEADLOCK
+--reap
+ROLLBACK;
+
+DROP TABLE t1;
+
+--connection node_2a
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test
new file mode 100644
index 00000000000..55210386044
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test
@@ -0,0 +1,63 @@
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# InnoDB FULLTEXT indexes
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+#
+# Fulltext index creation causes the creation of multiple system tables
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
+
+--connection node_2
+SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
+
+#
+# Fulltext insertion causes a flurry of updates on those system tables
+#
+
+--connection node_1
+# Insert 10K rows
+INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
+
+UPDATE t1 SET f2 = 'abcdefjhk';
+
+--connection node_1
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
+
+--connection node_2
+
+DROP TABLE t1;
+
+#
+# Same on a table with no PK
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB;
+
+--connection node_2
+# We insert only 1K rows here, because updates without a PK are very slow
+INSERT INTO t1 (f1) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
+
+--connection node_1
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('foobarbaz');
+
+UPDATE t1 SET f1 = 'abcdefjhk';
+
+--connection node_2
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test
new file mode 100644
index 00000000000..cbecf40fadf
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test
@@ -0,0 +1,44 @@
+#
+# mysql-wsrep-features#9 Hang in galera::ReplicatorSMM::cert with Streaming Replication
+# when running the galera_kill_ddl.test test
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+--connection node_1
+
+# Enable the master to continue running during the split-brain situation that
+# occurs when the slave is killed
+--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--connection node_2
+--source include/kill_galera.inc
+
+--connection node_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_2
+--source include/start_mysqld.inc
+--source include/galera_wait_ready.inc
+
+--let $galera_connection_name = node_2a
+--let $galera_server_number = 2
+--source include/galera_connect.inc
+--connection node_2a
+
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test
new file mode 100644
index 00000000000..442a7113537
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test
@@ -0,0 +1,29 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# This test sets a SAVEPOINT at the very beginning
+# of the transaction. When ROLLBACK TO SAVEPOINT is
+# issued, mysql performs a full rollback on SEs that
+# where not part of the transaction.
+# Test that SR transactions are rolled back, and
+# cleaned up properly in this case.
+#
+
+CREATE TABLE t1 (f1 INTEGER);
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+
+START TRANSACTION;
+
+SAVEPOINT a;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT a;
+
+INSERT INTO t1 values (2);
+COMMIT;
+
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test
new file mode 100644
index 00000000000..c773b310183
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test
@@ -0,0 +1,45 @@
+# mysql-wsrep-features#96 - "Sanity check failed" with SR and statement rolled back due to error
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+
+--connection node_1
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+CREATE TABLE t2 (f2 VARCHAR(32));
+
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+# This statement causes full transaction rollback
+# rather than just statement rollback, as it is run under SR
+
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (2),(1);
+INSERT INTO t2 VALUES ('abc');
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 1 FROM t2;
+
+--connection node_1
+ROLLBACK;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM t2;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE t2;
+
+
+
+
diff --git a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
index e02a3828ea2..e745708c22a 100644
--- a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
+++ b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
@@ -620,7 +620,7 @@ CREATE TABLE t1 (
);
INSERT IGNORE INTO t1 (b) VALUES (b'101110001110100'),(b'011101');
-SELECT pk, b FROM t1 INTO OUTFILE 'load.data';
+SELECT pk, b INTO OUTFILE 'load.data' FROM t1;
--error ER_DATA_TOO_LONG
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (pk, b);
diff --git a/mysql-test/suite/gcol/inc/gcol_select.inc b/mysql-test/suite/gcol/inc/gcol_select.inc
index 1f54b2bb3ae..939d2f64e84 100644
--- a/mysql-test/suite/gcol/inc/gcol_select.inc
+++ b/mysql-test/suite/gcol/inc/gcol_select.inc
@@ -40,7 +40,7 @@ insert into t2 (a) values (1);
create table t3 (a int primary key,
b int generated always as (-a) virtual,
c int generated always as (-a) stored unique);
-insert into t3 (a) values (2),(1),(3);
+insert into t3 (a) values (2),(1),(3),(5),(4),(7);
analyze table t1,t2,t3;
--echo # select_type=SIMPLE, type=system
diff --git a/mysql-test/suite/gcol/r/gcol_bug20746926.result b/mysql-test/suite/gcol/r/gcol_bug20746926.result
index 74fe76b3f1a..590caf02503 100644
--- a/mysql-test/suite/gcol/r/gcol_bug20746926.result
+++ b/mysql-test/suite/gcol/r/gcol_bug20746926.result
@@ -11,22 +11,22 @@ c timestamp generated always as ((a not in (b,b))) stored
insert t1(a) values(7777777777);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
-Warning 1292 Incorrect datetime value: '0'
+Warning 1292 Truncated incorrect datetime value: '0'
show warnings;
Level Code Message
Warning 1265 Data truncated for column 'a' at row 1
-Warning 1292 Incorrect datetime value: '0'
+Warning 1292 Truncated incorrect datetime value: '0'
disconnect con1;
connect con2,localhost,root,,;
set sql_mode='';
insert t1(a) values(6666666666);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
-Warning 1292 Incorrect datetime value: '0'
+Warning 1292 Truncated incorrect datetime value: '0'
show warnings;
Level Code Message
Warning 1265 Data truncated for column 'a' at row 1
-Warning 1292 Incorrect datetime value: '0'
+Warning 1292 Truncated incorrect datetime value: '0'
drop table t1;
disconnect con2;
connection default;
diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result
index 0fc609884d6..fc47ccb1016 100644
--- a/mysql-test/suite/gcol/r/gcol_bugfixes.result
+++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result
@@ -231,6 +231,7 @@ Note 1265 Data truncated for column 'col_time_key' at row 5
Note 1265 Data truncated for column 'col_time_key' at row 6
ANALYZE TABLE c;
Table Op Msg_type Msg_text
+test.c analyze status Engine-independent statistics collected
test.c analyze status OK
explain SELECT COUNT(DISTINCT col_varchar_key) AS x
FROM c
@@ -327,6 +328,7 @@ ALTER TABLE t1 ADD COLUMN c INT GENERATED ALWAYS AS (b + 1) VIRTUAL;
ALTER TABLE t1 ADD INDEX( c );
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Make sure the index is correct. That's kinda important.
EXPLAIN
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
index 143e1b725c4..ec5e8c0d70d 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
@@ -627,8 +627,13 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL,
KEY (a(183),b)
);
+Warnings:
+Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
INSERT IGNORE INTO t VALUES(), (), ();
Warnings:
+Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'b' at row 2
Warning 1265 Data truncated for column 'b' at row 3
@@ -760,7 +765,7 @@ UNIQUE(v)
INSERT IGNORE INTO t1 (b) VALUES (b'101110001110100'),(b'011101');
Warnings:
Warning 1264 Out of range value for column 'v' at row 1
-SELECT pk, b FROM t1 INTO OUTFILE 'load.data';
+SELECT pk, b INTO OUTFILE 'load.data' FROM t1;
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (pk, b);
ERROR 22001: Data too long for column 'v' at row 1
DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
index 2c883b2de35..a2ade8c324f 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
@@ -549,8 +549,13 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL,
KEY (a(183),b)
);
+Warnings:
+Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
INSERT IGNORE INTO t VALUES(), (), ();
Warnings:
+Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'b' at row 2
Warning 1265 Data truncated for column 'b' at row 3
@@ -682,7 +687,7 @@ UNIQUE(v)
INSERT IGNORE INTO t1 (b) VALUES (b'101110001110100'),(b'011101');
Warnings:
Warning 1264 Out of range value for column 'v' at row 1
-SELECT pk, b FROM t1 INTO OUTFILE 'load.data';
+SELECT pk, b INTO OUTFILE 'load.data' FROM t1;
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (pk, b);
ERROR 22001: Data too long for column 'v' at row 1
DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
index 2d8b81a0ea1..121ec59678b 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
@@ -348,6 +348,7 @@ CREATE TABLE t1 (f1 int, gc int AS (f1 + 1) STORED, UNIQUE(gc));
INSERT INTO t1(f1) VALUES (1),(2),(0),(9),(3),(4),(8),(7),(5),(6);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Should use index
SELECT * FROM t1 WHERE f1 + 1 > 7;
@@ -455,6 +456,7 @@ INSERT INTO t1(f1) VALUES
(070707),(080808);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 WHERE f1 + 1 > 070707;
f1 gc_int gc_date
@@ -489,6 +491,7 @@ KEY col_int_gc_key(col_int_gc_key)
INSERT INTO t1 ( col_int_key) VALUES (7);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2
FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk))
@@ -727,6 +730,7 @@ INDEX(gc_case));
INSERT INTO t (a, b) VALUES (0, 0), (0, 1), (1, 0), (1, 1);
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
EXPLAIN SELECT a, b FROM t WHERE (a AND b) = 1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -809,7 +813,9 @@ CREATE TABLE t2 (b INTEGER);
INSERT INTO t2 VALUES (1);
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
# Used to choose the index on a1 and get wrong results.
EXPLAIN SELECT * FROM t1 WHERE (a2 AND a2) = 0;
diff --git a/mysql-test/suite/gcol/r/gcol_keys_myisam.result b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
index 17b15826813..c3cb35416ef 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
@@ -205,7 +205,7 @@ outr.col_varchar_nokey in ('c', 'x', 'i')
AND (outr.col_time_key IS NULL OR
outr.col_datetime_key = '2009-09-27');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE outr ALL col_time_key,col_datetime_key NULL NULL NULL 4 x
+1 SIMPLE outr index_merge col_time_key,col_datetime_key col_time_key,col_datetime_key 4,6 NULL 2 x
SELECT
outr.col_time_key AS x
FROM c AS outr
@@ -348,6 +348,7 @@ CREATE TABLE t1 (f1 int, gc int AS (f1 + 1) STORED, UNIQUE(gc));
INSERT INTO t1(f1) VALUES (1),(2),(0),(9),(3),(4),(8),(7),(5),(6);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Should use index
SELECT * FROM t1 WHERE f1 + 1 > 7;
@@ -455,6 +456,7 @@ INSERT INTO t1(f1) VALUES
(070707),(080808);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 WHERE f1 + 1 > 070707;
f1 gc_int gc_date
@@ -489,6 +491,7 @@ KEY col_int_gc_key(col_int_gc_key)
INSERT INTO t1 ( col_int_key) VALUES (7);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2
FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk))
@@ -727,6 +730,7 @@ INDEX(gc_case));
INSERT INTO t (a, b) VALUES (0, 0), (0, 1), (1, 0), (1, 1);
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
EXPLAIN SELECT a, b FROM t WHERE (a AND b) = 1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -809,7 +813,9 @@ CREATE TABLE t2 (b INTEGER);
INSERT INTO t2 VALUES (1);
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
# Used to choose the index on a1 and get wrong results.
EXPLAIN SELECT * FROM t1 WHERE (a2 AND a2) = 0;
diff --git a/mysql-test/suite/gcol/r/gcol_rollback.result b/mysql-test/suite/gcol/r/gcol_rollback.result
index 3fe40d1eccd..5ee94d3ef44 100644
--- a/mysql-test/suite/gcol/r/gcol_rollback.result
+++ b/mysql-test/suite/gcol/r/gcol_rollback.result
@@ -18,6 +18,7 @@ a b
9 9
BEGIN;
INSERT INTO t (a) VALUES (10);
+# restart
SELECT * FROM t;
a b
9 9
diff --git a/mysql-test/suite/gcol/r/gcol_select_innodb.result b/mysql-test/suite/gcol/r/gcol_select_innodb.result
index e6d88d99d90..dd7657d8233 100644
--- a/mysql-test/suite/gcol/r/gcol_select_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_select_innodb.result
@@ -17,11 +17,14 @@ insert into t2 (a) values (1);
create table t3 (a int primary key,
b int generated always as (-a) virtual,
c int generated always as (-a) stored unique);
-insert into t3 (a) values (2),(1),(3);
+insert into t3 (a) values (2),(1),(3),(5),(4),(7);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
# select_type=SIMPLE, type=system
select * from t2;
@@ -76,8 +79,8 @@ a b c
3 -3 -3
explain select * from t1 where b in (select c from t3);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using index
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index
# select_type=PRIMARY, type=range,ref
select * from t1 where c in (select c from t3 where c between -2 and -1);
a b c
@@ -86,7 +89,7 @@ a b c
2 -2 -2
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index
+1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index
1 PRIMARY t1 ALL c NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
@@ -170,7 +173,7 @@ a b c
2 -2 -2
explain select * from t3 where b between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where
# SELECT * FROM tbl_name WHERE <indexed gcol expr>
select * from t3 where c between -2 and -1;
a b c
@@ -233,7 +236,7 @@ a b c
2 -2 -2
explain select * from t3 where b between -2 and -1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index NULL PRIMARY 4 NULL 3 Using where
+1 SIMPLE t3 index NULL PRIMARY 4 NULL 6 Using where
# SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <non-indexed gcol>
select * from t3 where b between -2 and -1 order by b;
a b c
@@ -241,7 +244,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <non-indexed gcol>
select * from t3 where c between -2 and -1 order by b;
a b c
@@ -257,7 +260,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <indexed gcol>
select * from t3 where c between -2 and -1 order by c;
a b c
@@ -493,6 +496,7 @@ Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 't'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
+Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE cc;
SET sql_mode=@save_old_sql_mode;
#
@@ -676,9 +680,13 @@ INSERT INTO t4
VALUES (1, 'j'), (2, 'c'), (0, 'a');
ANALYZE TABLE t1, t2, t3, t4;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
EXPLAIN SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1
FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2
@@ -692,7 +700,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
@@ -747,7 +755,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
@@ -803,7 +811,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
@@ -867,7 +875,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result
index 6ef8a2b41ca..ae86a72a1b6 100644
--- a/mysql-test/suite/gcol/r/gcol_select_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result
@@ -17,11 +17,14 @@ insert into t2 (a) values (1);
create table t3 (a int primary key,
b int generated always as (-a) virtual,
c int generated always as (-a) stored unique);
-insert into t3 (a) values (2),(1),(3);
+insert into t3 (a) values (2),(1),(3),(5),(4),(7);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
# select_type=SIMPLE, type=system
select * from t2;
@@ -57,7 +60,7 @@ a b c
1 -1 -1
explain select * from t3 where c>=-1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 2 Using index condition
+1 SIMPLE t3 range c c 5 NULL 1 Using index condition
# select_type=SIMPLE, type=ref
select * from t1,t3 where t1.c=t3.c and t3.c=-1;
a b c a b c
@@ -76,8 +79,8 @@ a b c
3 -3 -3
explain select * from t1 where b in (select c from t3);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using index
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index
# select_type=PRIMARY, type=range,ref
select * from t1 where c in (select c from t3 where c between -2 and -1);
a b c
@@ -86,7 +89,7 @@ a b c
2 -2 -2
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index
+1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index
1 PRIMARY t1 ref c c 5 test.t3.c 1
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
@@ -162,7 +165,7 @@ a b c
2 -2 -2
explain select * from t3 where a between 1 and 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition
+1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition
# SELECT * FROM tbl_name WHERE <non-indexed gcol expr>
select * from t3 where b between -2 and -1;
a b c
@@ -170,7 +173,7 @@ a b c
2 -2 -2
explain select * from t3 where b between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where
# SELECT * FROM tbl_name WHERE <indexed gcol expr>
select * from t3 where c between -2 and -1;
a b c
@@ -178,7 +181,7 @@ a b c
2 -2 -2
explain select * from t3 where c between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition
# bug#20022189: WL411:DEBUG ASSERT AT FIELD_LONG::VAL_INT IN SQL/FIELD.CC
CREATE TABLE t4 (
`pk` int(11) NOT NULL ,
@@ -208,7 +211,7 @@ a b c
1 -1 -1
explain select * from t3 where a between 1 and 2 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Using filesort
+1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <non-gcol>
select * from t3 where b between -2 and -1 order by a;
a b c
@@ -216,7 +219,7 @@ a b c
2 -2 -2
explain select * from t3 where b between -2 and -1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <non-gcol>
select * from t3 where c between -2 and -1 order by a;
a b c
@@ -224,7 +227,7 @@ a b c
2 -2 -2
explain select * from t3 where c between -2 and -1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Using filesort
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <non-indexed gcol>
select * from t3 where b between -2 and -1 order by b;
a b c
@@ -232,7 +235,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <non-indexed gcol>
select * from t3 where c between -2 and -1 order by b;
a b c
@@ -240,7 +243,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Using filesort
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <indexed gcol>
select * from t3 where b between -2 and -1 order by c;
a b c
@@ -248,7 +251,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <indexed gcol>
select * from t3 where c between -2 and -1 order by c;
a b c
@@ -256,7 +259,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition
# SELECT sum(<non-indexed gcol>) FROM tbl_name GROUP BY <non-indexed gcol>
select sum(b) from t1 group by b;
sum(b)
@@ -791,15 +794,15 @@ KEY (col_int_key)
INSERT INTO cc (col_int_nokey) VALUES (0),(1),(7),(0),(4),(5);
EXPLAIN SELECT pk FROM cc WHERE col_int_key > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE cc ALL col_int_key NULL NULL NULL 6 #
+1 SIMPLE cc range col_int_key col_int_key 5 NULL 3 #
SELECT pk FROM cc WHERE col_int_key > 3;
pk
-3
5
6
+3
EXPLAIN SELECT pk FROM cc WHERE col_int_key > 3 ORDER BY 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE cc ALL col_int_key NULL NULL NULL 6 #
+1 SIMPLE cc range col_int_key col_int_key 5 NULL 3 #
SELECT pk FROM cc WHERE col_int_key > 3 ORDER BY 1;
pk
3
@@ -853,7 +856,9 @@ Warnings:
Note 1265 Data truncated for column 'col_time_key' at row 1
ANALYZE TABLE a, c;
Table Op Msg_type Msg_text
+test.a analyze status Engine-independent statistics collected
test.a analyze status OK
+test.c analyze status Engine-independent statistics collected
test.c analyze status OK
EXPLAIN
SELECT
@@ -931,7 +936,9 @@ col_varchar_nokey
(5, 'b'),(8,'m'),(7, 'j'),(2, 'v');
ANALYZE TABLE c, cc;
Table Op Msg_type Msg_text
+test.c analyze status Engine-independent statistics collected
test.c analyze status OK
+test.cc analyze status Engine-independent statistics collected
test.cc analyze status OK
EXPLAIN SELECT
alias2 . col_varchar_key AS field1
@@ -1073,6 +1080,7 @@ Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 't'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
+Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE cc;
SET sql_mode=@save_old_sql_mode;
#
@@ -1204,7 +1212,7 @@ FROM t0 AS a0, t0 AS a1, t0 AS a2;
EXPLAIN SELECT * FROM t1
WHERE i1 > 41 AND i1 <= 43;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 4 NULL 19 Using index condition
+1 SIMPLE t1 range idx idx 4 NULL 20 Using index condition
SELECT * FROM t1
WHERE i1 > 41 AND i1 <= 43;
pk i1 i2 v1 v2
@@ -1298,9 +1306,13 @@ INSERT INTO t4
VALUES (1, 'j'), (2, 'c'), (0, 'a');
ANALYZE TABLE t1, t2, t3, t4;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
EXPLAIN SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1
FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2
@@ -1314,7 +1326,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
@@ -1370,7 +1382,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY,v_idx,v_idx2 PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
@@ -1428,7 +1440,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY,v_idx2 PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
@@ -1495,7 +1507,7 @@ WHERE t4.c1 < 'o'
AND t1.i1 <= t3.i2_key;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2
1 PRIMARY t3 eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where
diff --git a/mysql-test/suite/gcol/r/gcol_view_innodb.result b/mysql-test/suite/gcol/r/gcol_view_innodb.result
index 03c4a15620a..ac23d64bcee 100644
--- a/mysql-test/suite/gcol/r/gcol_view_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_view_innodb.result
@@ -5,6 +5,7 @@ c int generated always as (-a) stored);
insert into t1 (a) values (1), (1), (2), (2), (3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create view v1 (d,e) as select abs(b), abs(c) from t1;
select d,e from v1;
diff --git a/mysql-test/suite/gcol/r/gcol_view_myisam.result b/mysql-test/suite/gcol/r/gcol_view_myisam.result
index a030c73401c..ddbbf44222c 100644
--- a/mysql-test/suite/gcol/r/gcol_view_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_view_myisam.result
@@ -5,6 +5,7 @@ c int generated always as (-a) stored);
insert into t1 (a) values (1), (1), (2), (2), (3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create view v1 (d,e) as select abs(b), abs(c) from t1;
select d,e from v1;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
index 9228a5f63c6..2ed1f917ca6 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
@@ -277,32 +277,4 @@ pk b v
DROP TABLE t1;
SET debug_sync= reset;
set global debug_dbug= @old_dbug;
-# MDEV-16962 Assertion '!error || !ot_ctx.can_recover_from_failed_open()'
-# failed in open_purge_table upon concurrent ALTER and FLUSH
-CREATE TABLE t1 (
-pk SERIAL,
-c VARCHAR(128),
-d DATE,
-vd DATE AS (d) VIRTUAL,
-PRIMARY KEY(pk),
-KEY(vd,c)
-) ENGINE=InnoDB;
-INSERT IGNORE INTO t1 (pk,c) VALUES (1,'foo');
-set debug_sync="now WAIT_FOR purge";
-connect con1,localhost,root,,test;
-SET GLOBAL innodb_debug_sync="after_open_table_mdl_shared SIGNAL purge WAIT_FOR flush";
-SET global debug_dbug="d,ib_purge_virtual_index_callback";
-REPLACE INTO t1 (pk,c) VALUES (1,'bar');
-connection default;
-SET debug_sync="alter_table_before_rename_result_table WAIT_FOR flush";
-ALTER TABLE t1 ADD FULLTEXT KEY(c), ALGORITHM=COPY;
-connection con1;
-SET debug_sync="after_flush_unlock SIGNAL flush ";
-FLUSH TABLES;
-disconnect con1;
-connection default;
-InnoDB 0 transactions not purged
-DROP TABLE t1;
-SET debug_sync= reset;
-SET global debug_dbug=@old_dbug;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk.result b/mysql-test/suite/gcol/r/innodb_virtual_fk.result
index de61c16f739..8e6ec857602 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_fk.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_fk.result
@@ -705,7 +705,7 @@ ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
SET foreign_key_checks=0;
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk' in the foreign table 't1'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk' in the foreign table 't1'
ALTER TABLE t1 ADD INDEX(v4);
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
SET foreign_key_checks=1;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result b/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
index 1d4766eab19..c45579aec2b 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
@@ -14,6 +14,7 @@ INSERT INTO u1 SET a=1;
INSERT INTO u2 SET b=1;
INSERT INTO t1(fld1) VALUES(1);
INSERT INTO t2(fld1, fld2) VALUES(1, 2);
+# restart
UPDATE t1 SET fld1= 2;
DELETE FROM u1;
SELECT * FROM u2;
@@ -37,6 +38,7 @@ FOREIGN KEY(fld1) REFERENCES t1(fld1)
ON UPDATE CASCADE) engine=innodb;
INSERT INTO t1 VALUES(1), (2);
INSERT INTO t2 VALUES(1, DEFAULT), (2, default);
+# restart
CREATE TEMPORARY TABLE t2 (fld1 INT NOT NULL)ENGINE=INNODB;
UPDATE t1 SET fld1= 3 WHERE fld1= 2;
connect con1,localhost,root,,test;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result b/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result
index 2e35698e47e..35f37034721 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result
@@ -7,31 +7,31 @@ ROW_FORMAT=REDUNDANT;
INSERT INTO t4 SET i=1;
ALTER TABLE t4 ADD INDEX(v), LOCK=NONE;
ALTER TABLE t4 ADD COLUMN k INT, LOCK=NONE;
-ALTER TABLE t4 DROP k, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
-ALTER TABLE t4 DROP INDEX v, LOCK=NONE;
ALTER TABLE t4 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t4 DROP INDEX v, LOCK=NONE;
INSERT INTO t3 SET i=1;
ALTER TABLE t3 ADD INDEX(v), LOCK=NONE;
ALTER TABLE t3 ADD COLUMN k INT, LOCK=NONE;
-ALTER TABLE t3 DROP k, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
-ALTER TABLE t3 DROP INDEX v, LOCK=NONE;
ALTER TABLE t3 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t3 DROP INDEX v, LOCK=NONE;
INSERT INTO t2 SET i=1;
ALTER TABLE t2 ADD INDEX(v), LOCK=NONE;
ALTER TABLE t2 ADD COLUMN k INT, LOCK=NONE;
-ALTER TABLE t2 DROP k, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
-ALTER TABLE t2 DROP INDEX v, LOCK=NONE;
ALTER TABLE t2 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t2 DROP INDEX v, LOCK=NONE;
INSERT INTO t1 SET i=1;
ALTER TABLE t1 ADD INDEX(v), LOCK=NONE;
ALTER TABLE t1 ADD COLUMN k INT, LOCK=NONE;
-ALTER TABLE t1 DROP k, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED
-ALTER TABLE t1 DROP INDEX v, LOCK=NONE;
ALTER TABLE t1 DROP k, LOCK=NONE;
+ERROR 42000: Can't DROP COLUMN `k`; check that it exists
+ALTER TABLE t1 DROP INDEX v, LOCK=NONE;
connect ddl,localhost,root,,test;
connection default;
connection ddl;
diff --git a/mysql-test/suite/gcol/r/virtual_index_drop.result b/mysql-test/suite/gcol/r/virtual_index_drop.result
index 012e61be459..45ee4843b7c 100644
--- a/mysql-test/suite/gcol/r/virtual_index_drop.result
+++ b/mysql-test/suite/gcol/r/virtual_index_drop.result
@@ -25,6 +25,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(f1 INT, f2 INT AS (f1) VIRTUAL)ENGINE=InnoDB;
+INSERT INTO t1(f1) VALUES(1);
SET DEBUG_DBUG="+d,create_index_fail";
SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con1_go WAIT_FOR alter_signal";
ALTER TABLE t1 ADD COLUMN f3 INT AS (f1) VIRTUAL, ADD INDEX(f2, f3);
@@ -33,6 +34,7 @@ SET DEBUG_SYNC="now WAIT_FOR con1_go";
BEGIN;
SELECT * FROM t1;
f1 f2
+1 1
SET DEBUG_SYNC="now SIGNAL alter_signal";
connection default;
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
@@ -47,6 +49,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(f1 INT, f2 INT AS (f1) VIRTUAL)ENGINE=InnoDB;
+INSERT INTO t1(f1) VALUES(1);
SET DEBUG_DBUG="+d,create_index_fail";
SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con1_go WAIT_FOR alter_signal";
ALTER TABLE t1 ADD INDEX(f2);
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
index da203f118a8..9549c2f0f10 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -374,51 +374,4 @@ DROP TABLE t1;
SET debug_sync= reset;
set global debug_dbug= @old_dbug;
-
---echo # MDEV-16962 Assertion '!error || !ot_ctx.can_recover_from_failed_open()'
---echo # failed in open_purge_table upon concurrent ALTER and FLUSH
-
-CREATE TABLE t1 (
- pk SERIAL,
- c VARCHAR(128),
- d DATE,
- vd DATE AS (d) VIRTUAL,
- PRIMARY KEY(pk),
- KEY(vd,c)
-) ENGINE=InnoDB;
-INSERT IGNORE INTO t1 (pk,c) VALUES (1,'foo');
-
---send
-set debug_sync="now WAIT_FOR purge";
---connect (con1,localhost,root,,test)
-# Will break innodb purge thread inside open_purge_table after mdl
-# acquired, but before tdc->flushed check
-SET GLOBAL innodb_debug_sync="after_open_table_mdl_shared SIGNAL purge WAIT_FOR flush";
-
-# Workaround to pass trx_undo_roll_ptr_is_insert() in 10.2
-SET global debug_dbug="d,ib_purge_virtual_index_callback";
-
-REPLACE INTO t1 (pk,c) VALUES (1,'bar');
-
---connection default
-# wait for MDL acquired by purge
---reap
-# MDL_SHARED will be acquired, but will hang before MDL upgrade started.
-SET debug_sync="alter_table_before_rename_result_table WAIT_FOR flush";
---send
-ALTER TABLE t1 ADD FULLTEXT KEY(c), ALGORITHM=COPY;
---connection con1
-# Will hang after tdc->flushed is set, but before emptying tdc cache.
-SET debug_sync="after_flush_unlock SIGNAL flush ";
-FLUSH TABLES;
-
-# Cleanup
---disconnect con1
---connection default
---reap
---source ../../innodb/include/wait_all_purged.inc
-DROP TABLE t1;
-SET debug_sync= reset;
-SET global debug_dbug=@old_dbug;
-
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test b/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test
index 37ab82c46db..fe4f5e307b3 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test
@@ -14,11 +14,12 @@ while ($n)
{
eval INSERT INTO t$n SET i=1;
eval ALTER TABLE t$n ADD INDEX(v), LOCK=NONE;
-eval ALTER TABLE t$n ADD COLUMN k INT, LOCK=NONE;
+# MDEV-17468 FIXME: Fix this, and remove the 2 --error below.
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+eval ALTER TABLE t$n ADD COLUMN k INT, LOCK=NONE;
+--error ER_CANT_DROP_FIELD_OR_KEY
eval ALTER TABLE t$n DROP k, LOCK=NONE;
eval ALTER TABLE t$n DROP INDEX v, LOCK=NONE;
-eval ALTER TABLE t$n DROP k, LOCK=NONE;
dec $n;
}
diff --git a/mysql-test/suite/gcol/t/virtual_index_drop.test b/mysql-test/suite/gcol/t/virtual_index_drop.test
index 016832b9e6d..e1ec43f75e5 100644
--- a/mysql-test/suite/gcol/t/virtual_index_drop.test
+++ b/mysql-test/suite/gcol/t/virtual_index_drop.test
@@ -29,6 +29,7 @@ DROP TABLE t1;
# new_vcol_info in index when rollback of alter happens
CREATE TABLE t1(f1 INT, f2 INT AS (f1) VIRTUAL)ENGINE=InnoDB;
+INSERT INTO t1(f1) VALUES(1);
SET DEBUG_DBUG="+d,create_index_fail";
SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con1_go WAIT_FOR alter_signal";
SEND ALTER TABLE t1 ADD COLUMN f3 INT AS (f1) VIRTUAL, ADD INDEX(f2, f3);
@@ -47,6 +48,7 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE TABLE t1(f1 INT, f2 INT AS (f1) VIRTUAL)ENGINE=InnoDB;
+INSERT INTO t1(f1) VALUES(1);
SET DEBUG_DBUG="+d,create_index_fail";
SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con1_go WAIT_FOR alter_signal";
send ALTER TABLE t1 ADD INDEX(f2);
diff --git a/mysql-test/suite/handler/aria.result b/mysql-test/suite/handler/aria.result
index 433a8a7008e..657f26c27c3 100644
--- a/mysql-test/suite/handler/aria.result
+++ b/mysql-test/suite/handler/aria.result
@@ -808,6 +808,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
@@ -927,6 +928,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
unlock tables;
handler t1 read next;
@@ -1483,7 +1485,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
@@ -1697,6 +1699,8 @@ BEGIN
SELECT 1 FROM t2 INTO @a;
RETURN 1;
END|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT f1();
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TABLE t1(a INT);
diff --git a/mysql-test/suite/handler/heap.result b/mysql-test/suite/handler/heap.result
index 9679b48a367..32d06b79604 100644
--- a/mysql-test/suite/handler/heap.result
+++ b/mysql-test/suite/handler/heap.result
@@ -808,7 +808,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
-test.t1 analyze note The storage engine for the table doesn't support analyze
+test.t1 analyze status Operation failed
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
#
@@ -927,6 +927,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze note The storage engine for the table doesn't support analyze
unlock tables;
handler t1 read next;
@@ -1483,7 +1484,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
@@ -1697,6 +1698,8 @@ BEGIN
SELECT 1 FROM t2 INTO @a;
RETURN 1;
END|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT f1();
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TABLE t1(a INT);
diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result
index 7f9995c9e84..9a3c2d115f1 100644
--- a/mysql-test/suite/handler/innodb.result
+++ b/mysql-test/suite/handler/innodb.result
@@ -810,6 +810,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
@@ -930,6 +931,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
unlock tables;
handler t1 read next;
@@ -1487,7 +1489,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
@@ -1701,6 +1703,8 @@ BEGIN
SELECT 1 FROM t2 INTO @a;
RETURN 1;
END|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT f1();
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TABLE t1(a INT);
diff --git a/mysql-test/suite/handler/interface.result b/mysql-test/suite/handler/interface.result
index 0659d0c0902..a17979cbd39 100644
--- a/mysql-test/suite/handler/interface.result
+++ b/mysql-test/suite/handler/interface.result
@@ -175,6 +175,7 @@ c1
connect flush,localhost,root,,;
connection flush;
flush tables;
+flush table t1;
connect waiter,localhost,root,,;
connection waiter;
connection default;
@@ -258,10 +259,11 @@ a b
flush tables;
handler t1 read a next;
a b
-0 a
+2 c
+flush tables t1;
handler t1 read a next;
a b
-1 b
+0 a
flush tables with read lock;
handler t1 read a next;
a b
diff --git a/mysql-test/suite/handler/interface.test b/mysql-test/suite/handler/interface.test
index 4b9ab57394c..a4ed640dbc0 100644
--- a/mysql-test/suite/handler/interface.test
+++ b/mysql-test/suite/handler/interface.test
@@ -179,12 +179,13 @@ handler t1 open;
handler t1 read first;
connect (flush,localhost,root,,);
connection flush;
-send flush tables;
+flush tables;
+send flush table t1;
connect (waiter,localhost,root,,);
connection waiter;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush";
+ where state = "Waiting for table metadata lock";
--source include/wait_condition.inc
connection default;
handler t2 open;
@@ -282,6 +283,7 @@ handler t1 read a first;
handler t1 read a next;
flush tables;
handler t1 read a next;
+flush tables t1;
handler t1 read a next;
flush tables with read lock;
handler t1 read a next;
diff --git a/mysql-test/suite/handler/myisam.result b/mysql-test/suite/handler/myisam.result
index c444027d062..97ce5cdbb0f 100644
--- a/mysql-test/suite/handler/myisam.result
+++ b/mysql-test/suite/handler/myisam.result
@@ -808,6 +808,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
@@ -927,6 +928,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
unlock tables;
handler t1 read next;
@@ -1483,7 +1485,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
@@ -1697,6 +1699,8 @@ BEGIN
SELECT 1 FROM t2 INTO @a;
RETURN 1;
END|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT f1();
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TABLE t1(a INT);
diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result
index 158dd225bc0..6bd0582a384 100644
--- a/mysql-test/suite/heap/heap.result
+++ b/mysql-test/suite/heap/heap.result
@@ -66,7 +66,7 @@ a
alter table t1 engine=myisam;
explain select * from t1 where a in (869751,736494,226312,802616);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index
+1 SIMPLE t1 index uniq_id uniq_id 4 NULL 5 Using where; Using index
drop table t1;
create table t1 (x int not null, y int not null, key x (x), unique y (y))
engine=heap;
@@ -563,32 +563,32 @@ t1 CREATE TABLE `t1` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1
select count(*) from t1;
count(*)
-270
+267
insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1)));
select count(*) from t1 where v='a';
count(*)
-10
+7
select count(*) from t1 where c='a';
count(*)
-10
+7
select count(*) from t1 where t='a';
count(*)
-10
+7
select count(*) from t1 where v='a ';
count(*)
-10
+7
select count(*) from t1 where c='a ';
count(*)
-10
+7
select count(*) from t1 where t='a ';
count(*)
-10
+7
select count(*) from t1 where v between 'a' and 'a ';
count(*)
-10
+7
select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
count(*)
-10
+7
explain select count(*) from t1 where v='a ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where
@@ -618,9 +618,6 @@ qq
*a *a*a *
*a *a*a *
*a *a*a *
-*a *a*a *
-*a *a*a *
-*a *a*a *
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where
diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test
index ea07d020e4d..237685a6423 100644
--- a/mysql-test/suite/heap/heap.test
+++ b/mysql-test/suite/heap/heap.test
@@ -337,6 +337,7 @@ while ($1)
}
dec $1;
}
+delete from t1 where v like 'a%' and length(v) > 7;
commit;
--enable_query_log
select count(*) from t1;
diff --git a/mysql-test/suite/heap/heap_btree.result b/mysql-test/suite/heap/heap_btree.result
index 83d1bcb6c92..8c1c8217b6a 100644
--- a/mysql-test/suite/heap/heap_btree.result
+++ b/mysql-test/suite/heap/heap_btree.result
@@ -66,7 +66,7 @@ a
alter table t1 engine=myisam;
explain select * from t1 where a in (869751,736494,226312,802616);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index
+1 SIMPLE t1 index uniq_id uniq_id 4 NULL 5 Using where; Using index
drop table t1;
create table t1 (x int not null, y int not null, key x using BTREE (x,y), unique y using BTREE (y))
engine=heap;
diff --git a/mysql-test/suite/heap/heap_btree.test b/mysql-test/suite/heap/heap_btree.test
index aca41c430b3..6e087c7ef24 100644
--- a/mysql-test/suite/heap/heap_btree.test
+++ b/mysql-test/suite/heap/heap_btree.test
@@ -37,6 +37,7 @@ create table t1 (a int not null) engine=heap;
insert into t1 values (869751),(736494),(226312),(802616),(728912);
select * from t1 where a > 736494;
alter table t1 add unique uniq_id using BTREE (a);
+--sorted_result
select * from t1 where a > 736494;
select * from t1 where a = 736494;
select * from t1 where a=869751 or a=736494;
diff --git a/mysql-test/suite/heap/heap_hash.result b/mysql-test/suite/heap/heap_hash.result
index 55d43588403..df1acdae506 100644
--- a/mysql-test/suite/heap/heap_hash.result
+++ b/mysql-test/suite/heap/heap_hash.result
@@ -66,7 +66,7 @@ a
alter table t1 engine=myisam;
explain select * from t1 where a in (869751,736494,226312,802616);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index
+1 SIMPLE t1 ALL uniq_id NULL NULL NULL 5 Using where
drop table t1;
create table t1 (x int not null, y int not null, key x using HASH (x), unique y using HASH (y))
engine=heap;
@@ -426,15 +426,16 @@ select 0+a from t1 where a=869751 or a=736494;
explain select 0+a from t1 where a=869751 or a=736494;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range uniq_id uniq_id 8 NULL 2 Using where
-select 0+a from t1 where a in (869751,736494,226312,802616);
+select 0+a from t1 where a in (869751,736494,226312,802616,728912);
0+a
226312
+728912
736494
802616
869751
-explain select 0+a from t1 where a in (869751,736494,226312,802616);
+explain select 0+a from t1 where a in (869751,736494,226312,802616,728912);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range uniq_id uniq_id 8 NULL 4 Using where
+1 SIMPLE t1 range uniq_id uniq_id 8 NULL 5 Using where
drop table t1;
End of 5.3 tests
#
diff --git a/mysql-test/suite/heap/heap_hash.test b/mysql-test/suite/heap/heap_hash.test
index 3fe95e14205..3a8979a2393 100644
--- a/mysql-test/suite/heap/heap_hash.test
+++ b/mysql-test/suite/heap/heap_hash.test
@@ -313,8 +313,8 @@ select 0+a from t1 where a = 736494;
explain select 0+a from t1 where a = 736494;
select 0+a from t1 where a=869751 or a=736494;
explain select 0+a from t1 where a=869751 or a=736494;
-select 0+a from t1 where a in (869751,736494,226312,802616);
-explain select 0+a from t1 where a in (869751,736494,226312,802616);
+select 0+a from t1 where a in (869751,736494,226312,802616,728912);
+explain select 0+a from t1 where a in (869751,736494,226312,802616,728912);
drop table t1;
--echo End of 5.3 tests
diff --git a/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
index 90288bb2913..50267852fb0 100644
--- a/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
+++ b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
@@ -9,12 +9,10 @@ SELECT s.name 'Space_Name',
s.space_type 'Space_Type',
s.page_size 'Page_Size',
s.zip_page_size 'Zip_Size',
- s.row_format 'Formats_Permitted',
d.path 'Path'
FROM information_schema.innodb_sys_tablespaces s,
information_schema.innodb_sys_datafiles d
WHERE s.space = d.space
AND s.name NOT LIKE 'mysql/%'
- AND s.name NOT LIKE 'sys/%'
ORDER BY s.space;
--enable_query_log
diff --git a/mysql-test/suite/innodb/r/101_compatibility.result b/mysql-test/suite/innodb/r/101_compatibility.result
index a1ca493a6b2..3782ea83baf 100644
--- a/mysql-test/suite/innodb/r/101_compatibility.result
+++ b/mysql-test/suite/innodb/r/101_compatibility.result
@@ -26,6 +26,7 @@ INSERT INTO tdd VALUES(1);
INSERT INTO tp VALUES(1);
INSERT INTO ti VALUES(1);
# Kill the server
+# restart
CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
Table Op Msg_type Msg_text
test.tr check status OK
@@ -35,6 +36,7 @@ test.tz check status OK
test.tdd check status OK
test.tp check status OK
test.ti check status OK
+# restart: --innodb-read-only
CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
Table Op Msg_type Msg_text
test.tr check status OK
@@ -44,4 +46,5 @@ test.tz check status OK
test.tdd check status OK
test.tp check status OK
test.ti check status OK
+# restart
DROP TABLE tr,tc,td,tz,tdd,tp,ti;
diff --git a/mysql-test/suite/innodb/r/alter_algorithm2.result b/mysql-test/suite/innodb/r/alter_algorithm2.result
index 350c1c51482..f4443c80c77 100644
--- a/mysql-test/suite/innodb/r/alter_algorithm2.result
+++ b/mysql-test/suite/innodb/r/alter_algorithm2.result
@@ -54,6 +54,10 @@ DROP PROCEDURE p1;
affected rows: 0
DROP PROCEDURE p2;
affected rows: 0
+SET @save_allowed= @@GLOBAL.innodb_instant_alter_column_allowed;
+affected rows: 0
+SET GLOBAL innodb_instant_alter_column_allowed=never;
+affected rows: 0
CREATE TABLE t1(id INT PRIMARY KEY,
col1 INT UNSIGNED NOT NULL UNIQUE)ENGINE=InnoDB;
affected rows: 0
@@ -63,9 +67,9 @@ info: Records: 3 Duplicates: 0 Warnings: 0
SET ALTER_ALGORITHM=INSTANT;
affected rows: 0
ALTER TABLE t1 DROP COLUMN col1;
-ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
ALTER TABLE t1 DROP COLUMN col1, ALGORITHM=NOCOPY;
-ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
+ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
ALTER TABLE t1 DROP COLUMN col1, ALGORITHM=DEFAULT;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
@@ -74,3 +78,4 @@ affected rows: 3
info: Records: 3 Duplicates: 0 Warnings: 0
DROP TABLE t1;
affected rows: 0
+SET GLOBAL innodb_instant_alter_column_allowed=@save_allowed;
diff --git a/mysql-test/suite/innodb/r/alter_candidate_key.result b/mysql-test/suite/innodb/r/alter_candidate_key.result
index 23989e0da5f..79cb225e3b5 100644
--- a/mysql-test/suite/innodb/r/alter_candidate_key.result
+++ b/mysql-test/suite/innodb/r/alter_candidate_key.result
@@ -34,6 +34,7 @@ CREATE TABLE t1(f1 INT, f2 INT,
PRIMARY KEY(f1, f2),
UNIQUE INDEX uidx2 (f1, f2),
UNIQUE INDEX uidx1 (f2))ENGINE=InnoDB;
+INSERT INTO t1 VALUES(2, 2);
ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1;
Table Create Table
@@ -66,6 +67,7 @@ test.t1 check status OK
DROP TABLE t1;
SET SQL_MODE= strict_trans_tables;
CREATE TABLE t1(a INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL dml WAIT_FOR dml_done';
ALTER TABLE t1 MODIFY COLUMN a INT NOT NULL;
connection con1;
diff --git a/mysql-test/suite/innodb/r/alter_copy.result b/mysql-test/suite/innodb/r/alter_copy.result
index 35f4eb3b2c2..4aece16f0b0 100644
--- a/mysql-test/suite/innodb/r/alter_copy.result
+++ b/mysql-test/suite/innodb/r/alter_copy.result
@@ -51,6 +51,7 @@ ADD INDEX(a,b,d), ADD INDEX(a,d,b), ADD INDEX(b,c,d), ADD INDEX(b,d,c),
ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR hung';
+# restart: --innodb-force-recovery=3
disconnect hang;
#sql-temporary.frm
#sql-temporary.ibd
@@ -120,6 +121,7 @@ t1 CREATE TABLE `t1` (
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+# restart: --innodb-read-only
#sql-temporary.frm
#sql-temporary.ibd
FTS_INDEX_1.ibd
@@ -188,6 +190,7 @@ t1 CREATE TABLE `t1` (
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+# restart
#sql-temporary.frm
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
diff --git a/mysql-test/suite/innodb/r/alter_crash.result b/mysql-test/suite/innodb/r/alter_crash.result
index 70c2102ee0d..bf593c6acca 100644
--- a/mysql-test/suite/innodb/r/alter_crash.result
+++ b/mysql-test/suite/innodb/r/alter_crash.result
@@ -17,6 +17,7 @@ Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index c2 is marked as corrupted
test.t1 check Warning InnoDB: Index c3 is marked as corrupted
test.t1 check error Corrupt
+# restart
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index c2 is marked as corrupted
@@ -47,6 +48,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect.
+# restart
SELECT * FROM information_schema.innodb_sys_tables
WHERE table_id = ID;
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
@@ -86,6 +88,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_before_commit';
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
# Startup the server after the crash
+# restart
SELECT * FROM information_schema.innodb_sys_tables
WHERE name LIKE 'test/#sql-%';
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
@@ -124,6 +127,7 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect.
+# restart
SELECT * FROM information_schema.innodb_sys_tables
WHERE table_id = ID;
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
diff --git a/mysql-test/suite/innodb/r/alter_foreign_crash.result b/mysql-test/suite/innodb/r/alter_foreign_crash.result
index 34577ecf0fd..9a7a23a5b72 100644
--- a/mysql-test/suite/innodb/r/alter_foreign_crash.result
+++ b/mysql-test/suite/innodb/r/alter_foreign_crash.result
@@ -15,6 +15,7 @@ ALTER TABLE child ROW_FORMAT=DYNAMIC, ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR s1';
SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1';
+# restart
disconnect con1;
show tables;
Tables_in_bug
diff --git a/mysql-test/suite/innodb/r/alter_kill.result b/mysql-test/suite/innodb/r/alter_kill.result
index 0f2e7b34837..8195d8e8ed1 100644
--- a/mysql-test/suite/innodb/r/alter_kill.result
+++ b/mysql-test/suite/innodb/r/alter_kill.result
@@ -13,14 +13,14 @@ connection default;
disconnect con1;
# Corrupt FIL_PAGE_OFFSET in bug16720368.ibd,
# and recompute innodb_checksum_algorithm=crc32
-# Restart mysqld
+# restart
SELECT COUNT(*) FROM bug16720368;
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
INSERT INTO bug16720368 VALUES(1);
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
INSERT INTO bug16720368_1 VALUES(1);
# Shut down the server to uncorrupt the data.
-# Restart the server after uncorrupting the file.
+# restart
INSERT INTO bug16720368 VALUES(9,1);
SELECT COUNT(*) FROM bug16720368;
COUNT(*)
@@ -44,7 +44,9 @@ connection default;
# Kill the server
disconnect con1;
# Attempt to start without an *.ibd file.
+# restart
FOUND 1 /\[ERROR\] InnoDB: Tablespace [0-9]+ was not found at .*test.bug16735660.ibd/ in mysqld.1.err
+# restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM bug16735660;
a
diff --git a/mysql-test/suite/innodb/r/alter_missing_tablespace.result b/mysql-test/suite/innodb/r/alter_missing_tablespace.result
index 95415dd4e03..3d071584256 100644
--- a/mysql-test/suite/innodb/r/alter_missing_tablespace.result
+++ b/mysql-test/suite/innodb/r/alter_missing_tablespace.result
@@ -7,6 +7,7 @@ CREATE TABLE t(a SERIAL)ENGINE=InnoDB;
CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t1(a SERIAL)ENGINE=InnoDB;
INSERT INTO t1 VALUES(1),(2),(3);
+# restart
SELECT * FROM t;
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
diff --git a/mysql-test/suite/innodb/r/alter_not_null_debug.result b/mysql-test/suite/innodb/r/alter_not_null_debug.result
index c12f1fbca3d..ff77eaf54c5 100644
--- a/mysql-test/suite/innodb/r/alter_not_null_debug.result
+++ b/mysql-test/suite/innodb/r/alter_not_null_debug.result
@@ -74,5 +74,29 @@ c1 c2 c3
1 2 3
2 0 4
DROP TABLE t1;
-disconnect con1;
SET DEBUG_SYNC='RESET';
+#
+# MDEV-21539 Assertion ...prtype... in row_log_table_apply_convert_mrec
+#
+CREATE TABLE t1 (f VARCHAR(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES('ZERO');
+connection con1;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done';
+ALTER TABLE t1 MODIFY f VARCHAR(256) COLLATE latin1_german2_ci NOT NULL;
+# session default
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR scanned';
+INSERT INTO t1 VALUES('one');
+SET DEBUG_SYNC = 'now SIGNAL insert_done';
+connection con1;
+disconnect con1;
+connection default;
+SET DEBUG_SYNC=RESET;
+ALTER TABLE t1 CHANGE f eins VARCHAR(257) COLLATE latin1_german1_ci NOT NULL,
+ALGORITHM=INSTANT;
+SELECT * FROM t1;
+eins
+ZERO
+one
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/alter_persistent_autoinc.result b/mysql-test/suite/innodb/r/alter_persistent_autoinc.result
new file mode 100644
index 00000000000..52ac4d83ad9
--- /dev/null
+++ b/mysql-test/suite/innodb/r/alter_persistent_autoinc.result
@@ -0,0 +1,42 @@
+CREATE TABLE t1 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t1 MODIFY c INT NULL, ALGORITHM=INSTANT;
+INSERT INTO t1 SET c=1;
+CREATE TABLE t2 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t2 MODIFY c INT NULL, FORCE, ALGORITHM=INPLACE;
+INSERT INTO t2 SET c=1;
+CREATE TABLE t3 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t3 MODIFY c INT NULL, ALGORITHM=INPLACE;
+INSERT INTO t3 SET c=1;
+CREATE TABLE t4 (c1 INT AUTO_INCREMENT NULL UNIQUE, c2 INT) ENGINE=InnoDB;
+ALTER TABLE t4 MODIFY c1 INT NULL, CHANGE COLUMN c2 c3 INT, ALGORITHM=INPLACE;
+INSERT INTO t4 SET c1=1;
+CREATE TABLE t5 (c1 INT AUTO_INCREMENT NULL UNIQUE, c2 INT, c3 INTEGER GENERATED ALWAYS AS (c2)) ENGINE=InnoDB;
+ALTER TABLE t5 MODIFY c1 INT NULL, MODIFY COLUMN c2 INT FIRST, ALGORITHM=INPLACE;
+INSERT INTO t5 SET c1=1;
+CREATE TABLE t6 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB
+PARTITION BY LIST(c) (
+PARTITION p1 VALUES IN (1),
+PARTITION p2 VALUES IN (2)
+);
+ALTER TABLE t6 MODIFY c INT NULL, ALGORITHM=INSTANT;
+INSERT INTO t6 SET c=1;
+INSERT INTO t6 SET c=2;
+CREATE TABLE t7 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB
+PARTITION BY LIST(c) (
+PARTITION p1 VALUES IN (1),
+PARTITION p2 VALUES IN (2)
+);
+ALTER TABLE t7 MODIFY c INT NULL, ALGORITHM=INPLACE;
+INSERT INTO t7 SET c=1;
+INSERT INTO t7 SET c=2;
+CREATE TABLE t8 (c1 INT AUTO_INCREMENT NULL UNIQUE, c2 INT) ENGINE=InnoDB
+PARTITION BY LIST(c1) (
+PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t8 MODIFY c1 INT NULL, CHANGE COLUMN c2 c3 INT, ALGORITHM=INPLACE;
+INSERT INTO t8 SET c1=1;
+INSERT INTO t8 SET c1=2;
+FLUSH TABLES t1, t2, t3, t4, t5, t6, t7, t8 FOR EXPORT;
+AUTO_INCREMENT not partitioned: 0 0 0 0 0
+AUTO_INCREMENT partitioned: (0, 0) (0, 0) (0, 0)
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8;
diff --git a/mysql-test/suite/innodb/r/alter_primary_key.result b/mysql-test/suite/innodb/r/alter_primary_key.result
index afe687871f3..b478691af1f 100644
--- a/mysql-test/suite/innodb/r/alter_primary_key.result
+++ b/mysql-test/suite/innodb/r/alter_primary_key.result
@@ -4,6 +4,7 @@
#
CREATE TABLE t0 (pk INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t1 (c CHAR(2) NOT NULL) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('cd');
connect con1,localhost,root,,;
BEGIN;
INSERT INTO t0 VALUES(1);
@@ -21,6 +22,7 @@ ERROR 23000: Duplicate entry 'a' for key 'PRIMARY'
SET DEBUG_SYNC='RESET';
SELECT * FROM t1;
c
+cd
ab
ac
DROP TABLE t0,t1;
diff --git a/mysql-test/suite/innodb/r/alter_rename_files.result b/mysql-test/suite/innodb/r/alter_rename_files.result
index 7df63a051da..490f6773765 100644
--- a/mysql-test/suite/innodb/r/alter_rename_files.result
+++ b/mysql-test/suite/innodb/r/alter_rename_files.result
@@ -2,7 +2,7 @@ CREATE TABLE t1 (x INT NOT NULL UNIQUE KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(5);
SET GLOBAL innodb_log_checkpoint_now=TRUE;
SET DEBUG_SYNC='commit_cache_rebuild SIGNAL ready WAIT_FOR finish';
-ALTER TABLE t1 ADD PRIMARY KEY(x);
+ALTER TABLE t1 FORCE;;
connect con1,localhost,root,,;
SET DEBUG_SYNC='now WAIT_FOR ready';
SET GLOBAL innodb_log_checkpoint_now=TRUE;
@@ -13,7 +13,6 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`x` int(11) NOT NULL,
- PRIMARY KEY (`x`),
UNIQUE KEY `x` (`x`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/alter_table.result b/mysql-test/suite/innodb/r/alter_table.result
index 46162c167da..7c64511c866 100644
--- a/mysql-test/suite/innodb/r/alter_table.result
+++ b/mysql-test/suite/innodb/r/alter_table.result
@@ -85,4 +85,37 @@ ID b 0
ID c 0
ID u 1
DROP TABLE t1;
+#
# End of 10.2 tests
+#
+#
+# Check that innodb supports transactional=1
+#
+create table t1 (a int) transactional=1 engine=aria;
+create table t2 (a int) transactional=1 engine=innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 TRANSACTIONAL=1
+alter table t1 engine=innodb;
+alter table t1 add column b int;
+drop table t1,t2;
+#
+# MDEV-19272 Assertion unireg_check...Field::NEXT_NUMBER failed
+#
+CREATE TABLE t1 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t1 MODIFY c INT NOT NULL, ALGORITHM=INPLACE;
+DROP TABLE t1;
+CREATE TABLE t1 (c TIMESTAMP AUTO_INCREMENT UNIQUE) ENGINE=InnoDB;
+ERROR 42000: Incorrect column specifier for column 'c'
+CREATE TABLE t1 (c DATETIME AUTO_INCREMENT UNIQUE) ENGINE=InnoDB;
+ERROR 42000: Incorrect column specifier for column 'c'
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/innodb/r/alter_varchar_change.result b/mysql-test/suite/innodb/r/alter_varchar_change.result
index 924e55bb7ad..9bf0d126588 100644
--- a/mysql-test/suite/innodb/r/alter_varchar_change.result
+++ b/mysql-test/suite/innodb/r/alter_varchar_change.result
@@ -412,6 +412,23 @@ ALTER TABLE t1 MODIFY f2 VARCHAR(300);
CALL get_table_id("test/t1", @tbl1_id);
SELECT @tbl1_id = @tbl_id;
@tbl1_id = @tbl_id
+1
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` varchar(300) DEFAULT NULL,
+ KEY `idx` (`f2`(40))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL,
+f2 VARCHAR(128),
+INDEX idx(f2(40)))ENGINE=InnoDB;
+CALL get_table_id("test/t1", @tbl_id);
+ALTER TABLE t1 MODIFY f2 VARCHAR(300);
+CALL get_table_id("test/t1", @tbl1_id);
+SELECT @tbl1_id = @tbl_id;
+@tbl1_id = @tbl_id
0
SHOW CREATE TABLE t1;
Table Create Table
@@ -422,6 +439,23 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(f1 INT NOT NULL,
+f2 VARCHAR(128),
+INDEX idx(f2(40)))ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+CALL get_table_id("test/t1", @tbl_id);
+ALTER TABLE t1 MODIFY f2 VARCHAR(300);
+CALL get_table_id("test/t1", @tbl1_id);
+SELECT @tbl1_id = @tbl_id;
+@tbl1_id = @tbl_id
+1
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` varchar(300) DEFAULT NULL,
+ KEY `idx` (`f2`(40))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL,
f2 VARCHAR(100),
INDEX idx(f2(40)))ENGINE=InnoDB;
CALL get_table_id("test/t1", @tbl_id);
diff --git a/mysql-test/suite/innodb/r/autoinc_debug.result b/mysql-test/suite/innodb/r/autoinc_debug.result
index eb9dfc2a028..5856c75f784 100644
--- a/mysql-test/suite/innodb/r/autoinc_debug.result
+++ b/mysql-test/suite/innodb/r/autoinc_debug.result
@@ -11,6 +11,7 @@ t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
+# restart
# SETTING auto_increment_increment IN CONNECTION1
SET AUTO_INCREMENT_INCREMENT = 2;
SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';
diff --git a/mysql-test/suite/innodb/r/autoinc_persist.result b/mysql-test/suite/innodb/r/autoinc_persist.result
index 083db5f7c3d..ee796160406 100644
--- a/mysql-test/suite/innodb/r/autoinc_persist.result
+++ b/mysql-test/suite/innodb/r/autoinc_persist.result
@@ -244,6 +244,7 @@ Expect 100000000000
100000000000
CREATE TABLE t13(a INT AUTO_INCREMENT PRIMARY KEY) ENGINE = InnoDB,
AUTO_INCREMENT = 1234;
+# restart
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
@@ -394,6 +395,7 @@ INSERT INTO t9 VALUES(0);
SELECT MAX(a) AS `Expect 100000000109` FROM t9;
Expect 100000000109
100000000109
+# restart
INSERT INTO t1 VALUES(0), (0);
SELECT a AS `Expect 110, 111` FROM t1 ORDER BY a DESC LIMIT 2;
Expect 110, 111
@@ -432,6 +434,7 @@ DELETE FROM t7 WHERE a = 100000200;
set global innodb_flush_log_at_trx_commit=1;
INSERT INTO t9 VALUES(100000000200);
DELETE FROM t9 WHERE a = 100000000200;
+# restart
INSERT INTO t1 VALUES(0);
SELECT a AS `Expect 126` FROM t1 ORDER BY a DESC LIMIT 1;
Expect 126
@@ -497,6 +500,7 @@ SELECT * FROM t19;
a
1
2
+# restart
INSERT INTO t1 VALUES(0), (0);
SELECT * FROM t1;
a
@@ -637,6 +641,7 @@ BEGIN;
# Without the fix in page_create_empty() the counter value would be lost
# when ROLLBACK deletes the last row.
ROLLBACK;
+# restart
INSERT INTO t3 VALUES(0);
SELECT MAX(a) AS `Expect 120` FROM t3;
Expect 120
@@ -738,6 +743,7 @@ test.t_inplace optimize status OK
DELETE FROM t_inplace WHERE a >= 123;
CREATE TABLE it_inplace(a INT AUTO_INCREMENT, INDEX(a)) AUTO_INCREMENT=125 ENGINE=InnoDB;
CREATE UNIQUE INDEX idx_aa ON it_inplace(a);
+# restart
INSERT INTO t_inplace VALUES(0), (0);
INSERT INTO it_inplace VALUES(0), (0);
SELECT MAX(a) AS `Expect 126` FROM t_inplace;
@@ -825,6 +831,7 @@ test.t_copy optimize status OK
DELETE FROM t_copy WHERE a >= 123;
CREATE TABLE it_copy(a INT AUTO_INCREMENT, INDEX(a)) AUTO_INCREMENT=125 ENGINE=InnoDB;
CREATE UNIQUE INDEX idx_aa ON it_copy(a);
+# restart
INSERT INTO t_copy VALUES(0), (0);
INSERT INTO it_copy VALUES(0), (0);
SELECT MAX(a) AS `Expect 126` FROM t_copy;
@@ -910,6 +917,7 @@ UPDATE t33 SET a = 10 WHERE a = 1;
INSERT INTO t33 VALUES(2, NULL);
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
COMMIT;
+# restart
# This will not insert 0
INSERT INTO t31(a) VALUES(6), (0);
SELECT * FROM t31;
diff --git a/mysql-test/suite/innodb/r/buf_pool_resize_oom.result b/mysql-test/suite/innodb/r/buf_pool_resize_oom.result
index 588be562ce4..b5ebbd5cc62 100644
--- a/mysql-test/suite/innodb/r/buf_pool_resize_oom.result
+++ b/mysql-test/suite/innodb/r/buf_pool_resize_oom.result
@@ -6,3 +6,4 @@ call mtr.add_suppression("InnoDB: .* failed to allocate the chunk array");
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL debug_dbug='+d,buf_pool_resize_chunk_null';
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size + 1048576;
+# restart
diff --git a/mysql-test/suite/innodb/r/change_column_collation.result b/mysql-test/suite/innodb/r/change_column_collation.result
new file mode 100644
index 00000000000..fa1df1df830
--- /dev/null
+++ b/mysql-test/suite/innodb/r/change_column_collation.result
@@ -0,0 +1,19 @@
+#
+# MDEV-26294 Duplicate entries in unique index not detected when
+# changing collation with INPLACE algorithm
+#
+SET NAMES utf8;
+CREATE TABLE t1 (
+id INT PRIMARY KEY,
+msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_swedish_ci UNIQUE
+) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 'aaa');
+INSERT INTO t1 VALUES (2, 'ååå');
+ALTER TABLE t1
+MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
+ALGORITHM=NOCOPY;
+ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+ALTER TABLE t1 DROP INDEX msg,
+MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
+ALGORITHM=NOCOPY;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/ddl_purge.result b/mysql-test/suite/innodb/r/ddl_purge.result
index 45f4c99e97b..275be16b2d7 100644
--- a/mysql-test/suite/innodb/r/ddl_purge.result
+++ b/mysql-test/suite/innodb/r/ddl_purge.result
@@ -1,5 +1,6 @@
CREATE TABLE t0 (pk INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(100, 100);
connect con1,localhost,root,,test;
BEGIN;
INSERT INTO t0 SET pk=1;
diff --git a/mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff b/mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff
new file mode 100644
index 00000000000..c6c582fab93
--- /dev/null
+++ b/mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff
@@ -0,0 +1,19 @@
+--- default_row_format_alter.result
++++ default_row_format_alter,compact.reject
+@@ -91,7 +91,7 @@
+ ALTER TABLE t1 ADD b INT;
+ SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+ ROW_FORMAT
+-Dynamic
++Compact
+ DROP TABLE t1;
+ #
+ # MDEV-23345 Assertion not_redundant() == old.not_redundant() failed
+@@ -102,6 +102,6 @@
+ ALTER TABLE t1 DROP b;
+ SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+ ROW_FORMAT
+-Dynamic
++Compact
+ DROP TABLE t1;
+ SET GLOBAL innodb_default_row_format = @row_format;
diff --git a/mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff b/mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff
new file mode 100644
index 00000000000..a05a9914271
--- /dev/null
+++ b/mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff
@@ -0,0 +1,19 @@
+--- default_row_format_alter.result
++++ default_row_format_alter,redundant.reject
+@@ -91,7 +91,7 @@
+ ALTER TABLE t1 ADD b INT;
+ SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+ ROW_FORMAT
+-Dynamic
++Redundant
+ DROP TABLE t1;
+ #
+ # MDEV-23345 Assertion not_redundant() == old.not_redundant() failed
+@@ -102,6 +102,6 @@
+ ALTER TABLE t1 DROP b;
+ SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+ ROW_FORMAT
+-Dynamic
++Redundant
+ DROP TABLE t1;
+ SET GLOBAL innodb_default_row_format = @row_format;
diff --git a/mysql-test/suite/innodb/r/default_row_format_alter.result b/mysql-test/suite/innodb/r/default_row_format_alter.result
index a9084e1544c..42cbab8a5f2 100644
--- a/mysql-test/suite/innodb/r/default_row_format_alter.result
+++ b/mysql-test/suite/innodb/r/default_row_format_alter.result
@@ -107,4 +107,27 @@ ALTER TABLE t1 ADD a CHAR(8) DEFAULT '';
DROP TABLE t1;
SET GLOBAL innodb_default_row_format = @row_format;
# End of 10.3 tests
+#
+# MDEV-23295 Assertion fields[i].same(instant.fields[i]) failed
+#
+SET GLOBAL innodb_default_row_format = @row_format;
+CREATE TABLE t1 (a char(8)) ENGINE=InnoDB DEFAULT CHARSET utf8;
+SET GLOBAL innodb_default_row_format= COMPACT;
+ALTER TABLE t1 ADD b INT;
+SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+ROW_FORMAT
+Dynamic
+DROP TABLE t1;
+#
+# MDEV-23345 Assertion not_redundant() == old.not_redundant() failed
+#
+SET GLOBAL innodb_default_row_format = @row_format;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, KEY(b)) ENGINE=InnoDB;
+SET GLOBAL innodb_default_row_format= COMPACT;
+ALTER TABLE t1 DROP b;
+SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+ROW_FORMAT
+Dynamic
+DROP TABLE t1;
+# End of 10.4 tests
SET GLOBAL innodb_default_row_format = @row_format;
diff --git a/mysql-test/suite/innodb/r/default_row_format_compatibility.result b/mysql-test/suite/innodb/r/default_row_format_compatibility.result
index 5070fa33a2e..f7aa984b279 100644
--- a/mysql-test/suite/innodb/r/default_row_format_compatibility.result
+++ b/mysql-test/suite/innodb/r/default_row_format_compatibility.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("Index for table 'tab' is corrupt; try to repair it");
SET @row_format = @@GLOBAL.innodb_default_row_format;
# ###########################################################
# Check with Import/Export tablespace with Default_row_format
@@ -38,7 +39,7 @@ tab InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL 0 N
ALTER TABLE tab DISCARD TABLESPACE;
call mtr.add_suppression("InnoDB: Tried to read .* bytes at offset 0");
ALTER TABLE tab IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`tab` : I/O error
+ERROR HY000: Index for table 'tab' is corrupt; try to repair it
ALTER TABLE tab IMPORT TABLESPACE;
SELECT * FROM tab;
a
diff --git a/mysql-test/suite/innodb/r/doublewrite.result b/mysql-test/suite/innodb/r/doublewrite.result
index 9a94a081abe..5adae545a71 100644
--- a/mysql-test/suite/innodb/r/doublewrite.result
+++ b/mysql-test/suite/innodb/r/doublewrite.result
@@ -4,6 +4,7 @@
# PAGE OF SYSTEM TABLESPACE
#
SET GLOBAL innodb_fast_shutdown = 0;
+# restart
show variables like 'innodb_doublewrite';
Variable_name Value
innodb_doublewrite ON
@@ -26,6 +27,8 @@ commit work;
# tablespace is full of zeroes.
select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Ensure that dirty pages of table t1 is flushed.
flush tables t1 for export;
unlock tables;
@@ -41,6 +44,7 @@ set global innodb_buf_flush_list_now = 1;
# full of zeroes.
#
# MDEV-11623: Use old FSP_SPACE_FLAGS in the doublewrite buffer.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -57,6 +61,8 @@ f1 f2
# tablespace is corrupted.
select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Ensure that dirty pages of table t1 is flushed.
flush tables t1 for export;
unlock tables;
@@ -69,6 +75,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id;
set global innodb_buf_flush_list_now = 1;
# Kill the server
# Corrupt the first page (page_no=0) of the user tablespace.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -85,6 +92,8 @@ f1 f2
# tablespace is full of zeroes.
select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Ensure that dirty pages of table t1 is flushed.
flush tables t1 for export;
unlock tables;
@@ -97,6 +106,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id;
set global innodb_buf_flush_list_now = 1;
# Kill the server
# Make the 2nd page (page_no=1) of the tablespace all zeroes.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -113,6 +123,8 @@ f1 f2
# tablespace is corrupted.
select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# Ensure that dirty pages of table t1 is flushed.
flush tables t1 for export;
unlock tables;
@@ -125,6 +137,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id;
set global innodb_buf_flush_list_now = 1;
# Kill the server
# Corrupt the 2nd page (page_no=1) of the user tablespace.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -151,6 +164,7 @@ set global innodb_buf_flush_list_now = 1;
# Kill the server
# Make the first page (page_no=0) of the system tablespace
# all zeroes.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -176,6 +190,7 @@ set global innodb_fil_make_page_dirty_debug = 0;
set global innodb_buf_flush_list_now = 1;
# Kill the server
# Corrupt the first page (page_no=0) of the system tablespace.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -202,6 +217,7 @@ set global innodb_buf_flush_list_now = 1;
# Kill the server
# Make the 2nd page (page_no=1) of the system tablespace
# all zeroes.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -228,6 +244,7 @@ set global innodb_buf_flush_list_now = 1;
# Kill the server
# Make the 2nd page (page_no=1) of the system tablespace
# all zeroes.
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -244,8 +261,10 @@ drop table t1;
# MDEV-12600 crash during install_db with innodb_page_size=32K
# and ibdata1=3M
#
+# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/doublewrite --innodb-data-file-path=ibdata1:1M;ibdata2:1M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[ERROR\] InnoDB: Cannot create doublewrite buffer/ in mysqld.1.err
+# restart
diff --git a/mysql-test/suite/innodb/r/drop_table_background.result b/mysql-test/suite/innodb/r/drop_table_background.result
index e74bcd5e780..378f3ce00ab 100644
--- a/mysql-test/suite/innodb/r/drop_table_background.result
+++ b/mysql-test/suite/innodb/r/drop_table_background.result
@@ -11,6 +11,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT * from target;
ERROR 42S02: Table 'test.target' doesn't exist
DROP TABLE t;
+# restart
CREATE TABLE t (a INT) ENGINE=InnoDB;
DROP TABLE t;
DROP TABLE target;
diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result
index 127084f5669..45177a4bddf 100644
--- a/mysql-test/suite/innodb/r/foreign-keys.result
+++ b/mysql-test/suite/innodb/r/foreign-keys.result
@@ -115,7 +115,6 @@ UPDATE t2 SET pk=10 WHERE pk=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1';
DEALLOCATE PREPARE stmt;
-FLUSH TABLE t2;
SET debug_sync='now SIGNAL go';
connection default;
disconnect con1;
@@ -123,6 +122,7 @@ connection default;
SET debug_sync='reset';
SHOW OPEN TABLES FROM test;
Database Table In_use Name_locked
+test t2 0 0
DROP TABLE t1, t2;
create table t1 (a int primary key, b int) engine=innodb;
create table t2 (c int primary key, d int,
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index 60829759252..bfc49f49cdf 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -152,6 +152,7 @@ DELETE FROM child;
connection default;
INSERT INTO parent SET a=0;
FLUSH TABLES;
+# restart
disconnect incomplete;
INSERT INTO child SET a=0;
INSERT INTO child SET a=1;
@@ -394,15 +395,15 @@ flush status;
update t1 set data=10 where pk+1>10;
show status like '%opened_tab%';
Variable_name Value
-Opened_table_definitions 1
-Opened_tables 1
+Opened_table_definitions 4
+Opened_tables 4
flush tables;
flush status;
update t2 set t1_pk=11 where t1_pk+1>10;
show status like '%opened_tab%';
Variable_name Value
-Opened_table_definitions 1
-Opened_tables 1
+Opened_table_definitions 4
+Opened_tables 4
flush tables;
flush status;
lock tables t1 write;
@@ -413,8 +414,8 @@ Opened_tables 2
insert t1 values (4,4);
show status like '%opened_tab%';
Variable_name Value
-Opened_table_definitions 2
-Opened_tables 2
+Opened_table_definitions 5
+Opened_tables 5
unlock tables;
create function foo() returns int
begin
@@ -428,8 +429,8 @@ foo()
5
show status like '%opened_tab%';
Variable_name Value
-Opened_table_definitions 2
-Opened_tables 2
+Opened_table_definitions 5
+Opened_tables 5
drop function foo;
drop table t2, t1;
CREATE TABLE t1 (pk INT, a INT, PRIMARY KEY (pk)) ENGINE=InnoDB;
@@ -872,3 +873,20 @@ DROP TABLE `db`.u;
DROP DATABASE `db`;
DROP TABLE t;
# End of 10.3 tests
+CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
+FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;
+ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
+#
+# MDEV-23675 Assertion `pos < table->n_def' in dict_table_get_nth_col
+#
+CREATE TABLE t1 (pk int PRIMARY KEY, a INT, b INT, c INT, KEY(c),
+FOREIGN KEY fx (b) REFERENCES t1 (c))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,0,10,10);
+ALTER TABLE t1 DROP a, ALGORITHM=INSTANT;
+SET FOREIGN_KEY_CHECKS= 0;
+DROP INDEX fx ON t1;
+INSERT INTO t1 VALUES (2,11,11);
+DROP TABLE t1;
+SET FOREIGN_KEY_CHECKS=DEFAULT;
+# End of 10.4 tests
diff --git a/mysql-test/suite/innodb/r/foreign_key_debug.result b/mysql-test/suite/innodb/r/foreign_key_debug.result
index 741200b62b2..10a7e6f36e9 100644
--- a/mysql-test/suite/innodb/r/foreign_key_debug.result
+++ b/mysql-test/suite/innodb/r/foreign_key_debug.result
@@ -44,12 +44,11 @@ SET debug_sync='alter_table_intermediate_table_created SIGNAL ready WAIT_FOR go'
ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE;
connect con1, localhost, root;
SET debug_sync='now WAIT_FOR ready';
-SET lock_wait_timeout=1;
+SET lock_wait_timeout=0;
UPDATE t2 SET pk=10 WHERE pk=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1';
DEALLOCATE PREPARE stmt;
-FLUSH TABLE t2;
SET debug_sync='now SIGNAL go';
connection default;
disconnect con1;
@@ -57,4 +56,5 @@ connection default;
SET debug_sync='reset';
SHOW OPEN TABLES FROM test;
Database Table In_use Name_locked
+test t2 0 0
DROP TABLE t1, t2;
diff --git a/mysql-test/suite/innodb/r/full_crc32_import.result b/mysql-test/suite/innodb/r/full_crc32_import.result
new file mode 100644
index 00000000000..6f0daaf0f0f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/full_crc32_import.result
@@ -0,0 +1,187 @@
+FLUSH TABLES;
+# Treating compact format as dynamic format after import stmt
+CREATE TABLE t1
+(a int AUTO_INCREMENT PRIMARY KEY,
+b blob,
+c blob,
+KEY (b(200))) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 (b, c) values (repeat("ab", 200), repeat("bc", 200));
+INSERT INTO t1 (b, c) values (repeat("bc", 200), repeat("cd", 200));
+INSERT INTO t1 (b, c) values (repeat("cd", 200), repeat("ef", 200));
+INSERT INTO t1 (b, c) values (repeat("de", 200), repeat("fg", 200));
+INSERT INTO t1 (b, c) values (repeat("ef", 200), repeat("gh", 200));
+INSERT INTO t1 (b, c) values (repeat("fg", 200), repeat("hi", 200));
+INSERT INTO t1 (b, c) values (repeat("gh", 200), repeat("ij", 200));
+INSERT INTO t1 (b, c) values (repeat("hi", 200), repeat("jk", 200));
+INSERT INTO t1 (b, c) values (repeat("ij", 200), repeat("kl", 200));
+INSERT INTO t1 (b, c) values (repeat("jk", 200), repeat("lm", 200));
+INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
+INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+40
+FLUSH TABLE t1 FOR EXPORT;
+# List before copying files
+db.opt
+t1.cfg
+t1.frm
+t1.ibd
+backup: t1
+UNLOCK TABLES;
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DISCARD TABLESPACE;
+db.opt
+t1.frm
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing.
+ALTER TABLE t1 DROP INDEX b;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
+ALTER TABLE t1 IMPORT TABLESPACE;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL AUTO_INCREMENT,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+UPDATE t1 set b = repeat("de", 100) where b = repeat("cd", 200);
+explain SELECT a FROM t1 where b = repeat("de", 100);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where
+SELECT a FROM t1 where b = repeat("de", 100);
+a
+3
+13
+28
+38
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+40
+DELETE FROM t1;
+InnoDB 0 transactions not purged
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+CREATE TABLE t1
+(c1 int AUTO_INCREMENT PRIMARY KEY,
+c2 POINT NOT NULL,
+c3 LINESTRING NOT NULL,
+SPATIAL INDEX idx1(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1(c2,c3) VALUES(
+ST_GeomFromText('POINT(10 10)'),
+ST_GeomFromText('LINESTRING(5 5,20 20,30 30)'));
+INSERT INTO t1(c2,c3) VALUES(
+ST_GeomFromText('POINT(20 20)'),
+ST_GeomFromText('LINESTRING(5 15,20 10,30 20)'));
+INSERT INTO t1(c2,c3) VALUES(
+ST_GeomFromText('POINT(30 30)'),
+ST_GeomFromText('LINESTRING(10 5,20 24,30 32)'));
+INSERT INTO t1(c2,c3) VALUES(
+ST_GeomFromText('POINT(40 40)'),
+ST_GeomFromText('LINESTRING(15 5,25 20,35 30)'));
+INSERT INTO t1(c2,c3) VALUES(
+ST_GeomFromText('POINT(50 10)'),
+ST_GeomFromText('LINESTRING(15 15,24 10,31 20)'));
+INSERT INTO t1(c2,c3) VALUES(
+ST_GeomFromText('POINT(60 50)'),
+ST_GeomFromText('LINESTRING(10 15,20 44,35 32)'));
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+FLUSH TABLE t1 FOR EXPORT;
+# List before copying files
+db.opt
+t1.cfg
+t1.frm
+t1.ibd
+backup: t1
+UNLOCK TABLES;
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing.
+ALTER TABLE t1 DROP INDEX idx1;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
+ALTER TABLE t1 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` point NOT NULL,
+ `c3` linestring NOT NULL,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=16372 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+UPDATE t1 SET C2 = ST_GeomFromText('POINT(0 0)');
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+12288
+DELETE FROM t1;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+InnoDB 0 transactions not purged
+DROP TABLE t1;
+SET @save_algo = @@GLOBAL.innodb_compression_algorithm;
+SET GLOBAL innodb_compression_algorithm=2;
+CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+FLUSH TABLE t1 FOR EXPORT;
+# List before copying files
+db.opt
+t1.cfg
+t1.frm
+t1.ibd
+backup: t1
+UNLOCK TABLES;
+SET GLOBAL innodb_compression_algorithm=0;
+ALTER TABLE t1 FORCE;
+ALTER TABLE t1 DISCARD TABLESPACE;
+db.opt
+t1.frm
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+INSERT INTO t1 VALUES(2);
+SELECT * FROM t1;
+a
+1
+2
+SET GLOBAL innodb_compression_algorithm=3;
+FLUSH TABLE t1 FOR EXPORT;
+# List before copying files
+db.opt
+t1.cfg
+t1.frm
+t1.ibd
+backup: t1
+UNLOCK TABLES;
+SET GLOBAL innodb_compression_algorithm=0;
+ALTER TABLE t1 FORCE;
+ALTER TABLE t1 DISCARD TABLESPACE;
+db.opt
+t1.frm
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+INSERT INTO t1 VALUES(3);
+SELECT * FROM t1;
+a
+1
+2
+3
+DROP TABLE t1;
+SET GLOBAL innodb_compression_algorithm=@save_algo;
diff --git a/mysql-test/suite/innodb/r/ibuf_not_empty.result b/mysql-test/suite/innodb/r/ibuf_not_empty.result
index 96aefe29f89..3382c74174e 100644
--- a/mysql-test/suite/innodb/r/ibuf_not_empty.result
+++ b/mysql-test/suite/innodb/r/ibuf_not_empty.result
@@ -22,9 +22,12 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
COMMIT;
InnoDB 0 transactions not purged
+# restart: --innodb-force-recovery=6 --innodb-change-buffer-dump
check table t1;
Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index 'b' contains #### entries, should be 4096.
test.t1 check error Corrupt
+# restart
SET GLOBAL innodb_fast_shutdown=0;
+# restart
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/import_bugs.result b/mysql-test/suite/innodb/r/import_bugs.result
new file mode 100644
index 00000000000..a52fe6abbd6
--- /dev/null
+++ b/mysql-test/suite/innodb/r/import_bugs.result
@@ -0,0 +1,12 @@
+call mtr.add_suppression("Index for table 'imp_t1' is corrupt; try to repair it");
+SET @save_innodb_checksum_algorithm=@@GLOBAL.innodb_checksum_algorithm;
+SET GLOBAL innodb_checksum_algorithm=full_crc32;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE imp_t1 DISCARD TABLESPACE ;
+FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE imp_t1 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (ROW_FORMAT mismatch)
+DROP TABLE imp_t1, t1;
+SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
diff --git a/mysql-test/suite/innodb/r/innodb-32k-crash.result b/mysql-test/suite/innodb/r/innodb-32k-crash.result
index bb46704198d..438d5350263 100644
--- a/mysql-test/suite/innodb/r/innodb-32k-crash.result
+++ b/mysql-test/suite/innodb/r/innodb-32k-crash.result
@@ -123,6 +123,7 @@ BEGIN;
INSERT INTO t1 SELECT * from t2;
BEGIN;
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e;
+# restart
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f,f=@f,g=@f,h=@f,i=@f,j=@f,
k=@f,l=@f,m=@f,n=@f,o=@f,p=@f,q=@f,r=@f,s=@f,t=@f,u=@f,
v=@f,w=@f,x=@b,y=@f,z=@f,
diff --git a/mysql-test/suite/innodb/r/innodb-32k.result b/mysql-test/suite/innodb/r/innodb-32k.result
index 8fe394e9efa..8b67dac8237 100644
--- a/mysql-test/suite/innodb/r/innodb-32k.result
+++ b/mysql-test/suite/innodb/r/innodb-32k.result
@@ -533,6 +533,7 @@ insert into t2 values(
@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,
@a,@a,@a,@a,@a,@a,@a);
update t2 set col190=@b;
+# restart
set @a = repeat('abcdefghijklmnopqrstuvwxyz', 1650);
set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000);
show create table t2;
diff --git a/mysql-test/suite/innodb/r/innodb-64k-crash.result b/mysql-test/suite/innodb/r/innodb-64k-crash.result
index e7998fddf29..1f3b41f75a6 100644
--- a/mysql-test/suite/innodb/r/innodb-64k-crash.result
+++ b/mysql-test/suite/innodb/r/innodb-64k-crash.result
@@ -280,6 +280,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
DELETE FROM t2 LIMIT 1;
disconnect con1;
connection default;
+# restart
check table t1,t2;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb/r/innodb-64k.result b/mysql-test/suite/innodb/r/innodb-64k.result
index 92d2a03d8da..f8dad893d0e 100644
--- a/mysql-test/suite/innodb/r/innodb-64k.result
+++ b/mysql-test/suite/innodb/r/innodb-64k.result
@@ -719,6 +719,7 @@ insert into t2 values(
@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,
@a,@a,@a,@a,@a,@a,@a);
update t2 set col190=@b;
+# restart
set @a = repeat('abcdefghijklmnopqrstuvwxyz', 1650);
set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000);
update t2 set col189 = @b;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-table.result b/mysql-test/suite/innodb/r/innodb-alter-table.result
index 0d5afab6bae..ad3b2cb04af 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-table.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-table.result
@@ -218,6 +218,7 @@ t CREATE TABLE `t` (
PARTITION `p99991231` VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB)
analyze table t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
select count(*) from t where d ='2017-09-15';
count(*)
diff --git a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
index 634a929bd5e..57229d05133 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
@@ -12,6 +12,7 @@ CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
SET debug_dbug='+d,innodb_alter_commit_crash_before_commit';
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
+# restart
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -40,6 +41,7 @@ SET DEBUG_SYNC="alter_table_inplace_after_commit SIGNAL default_signal WAIT_FOR
ALTER TABLE t1 DROP INDEX f2, ALGORITHM=INPLACE;
connection default;
set DEBUG_SYNC="now WAIT_FOR default_signal";
+# restart
disconnect con1;
SHOW KEYS FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -48,6 +50,8 @@ t1 1 f2 1 f2 A NULL NULL NULL Corrupted
Warnings:
Warning 1082 InnoDB: Table test/t1 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB
Warning 1082 InnoDB: Table test/t1 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB
+Warning 1082 InnoDB: Table test/t1 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB
+Warning 1082 InnoDB: Table test/t1 contains 1 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB
DROP TABLE t1;
#
# MDEV-25503 InnoDB hangs on startup during recovery
@@ -57,10 +61,11 @@ connect con1,localhost,root,,;
BEGIN;
DELETE FROM mysql.innodb_table_stats;
connect con2,localhost,root,,;
-SET DEBUG_SYNC='inplace_after_index_build SIGNAL blocked WAIT_FOR ever';
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL blocked WAIT_FOR ever';
ALTER TABLE t1 FORCE;
connection default;
SET DEBUG_SYNC='now WAIT_FOR blocked';
+# restart
SELECT * FROM t1;
a
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index 749e242fce8..da076b270e5 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -449,6 +449,7 @@ FULLTEXT INDEX(t)
ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
DROP TABLE tu;
CREATE TABLE tv (
pk INT PRIMARY KEY, FTS_DOC_ID BIGINT UNSIGNED NOT NULL, t TEXT,
@@ -458,6 +459,7 @@ FULLTEXT INDEX(t)
ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
DROP TABLE tv;
ALTER TABLE t1o CHANGE c1 dB_row_Id INT, ALGORITHM=COPY;
ERROR 42000: Incorrect column name 'dB_row_Id'
@@ -814,6 +816,7 @@ ADD FOREIGN KEY(dd) REFERENCES t1(d),
ALGORITHM=INPLACE;
ALTER TABLE t1 CHANGE b B INT, ALGORITHM=INPLACE;
ALTER TABLE t2 CHANGE aa AA INT, ALGORITHM=INPLACE;
+# restart
ALTER TABLE t1 CHANGE d D INT, ALGORITHM=INPLACE;
ALTER TABLE t2 CHANGE bb BB INT, ALGORITHM=INPLACE;
SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc-44030.result b/mysql-test/suite/innodb/r/innodb-autoinc-44030.result
index 5ec1bd38d80..857a70a03be 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc-44030.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc-44030.result
@@ -9,6 +9,7 @@ SELECT * FROM t1;
d1
1
2
+# restart
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index 00690ecaff7..b41e1c90a43 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -1238,6 +1238,7 @@ Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
+# restart
INSERT INTO t1(C2) VALUES ('innodb');
SHOW CREATE TABLE t1;
Table Create Table
@@ -1249,6 +1250,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
+# restart
INSERT INTO t1(C2) VALUES ('innodb');
SHOW CREATE TABLE t1;
Table Create Table
@@ -1386,6 +1388,7 @@ Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (18446744073709551615);
+# restart
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/innodb/r/innodb-blob.result b/mysql-test/suite/innodb/r/innodb-blob.result
index 8a6327216d0..fdfbfe3e683 100644
--- a/mysql-test/suite/innodb/r/innodb-blob.result
+++ b/mysql-test/suite/innodb/r/innodb-blob.result
@@ -43,6 +43,7 @@ a
3
BEGIN;
INSERT INTO t2 VALUES (42);
+# restart
disconnect con1;
disconnect con2;
connection default;
@@ -103,6 +104,7 @@ DELETE FROM t1;
ROLLBACK;
disconnect con3;
connection con2;
+# restart
disconnect con2;
connection default;
ERROR HY000: Lost connection to MySQL server during query
@@ -134,6 +136,7 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: after_row_upd_extern';
info
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2
+# restart
disconnect con2;
connection default;
ERROR HY000: Lost connection to MySQL server during query
diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
index 156ef0e56be..d795b516d5e 100644
--- a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
+++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
@@ -30,11 +30,13 @@ ERROR HY000: Lost connection to MySQL server during query
disconnect con1;
connection default;
FOUND 1 /Wrote log record for ibuf update in place operation/ in mysqld.1.err
+# restart: --innodb-read-only
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Error Unknown storage engine 'InnoDB'
test.t1 check error Corrupt
FOUND 1 /innodb_read_only prevents crash recovery/ in mysqld.1.err
+# restart: --innodb-force-recovery=5
SELECT * FROM t1 LIMIT 1;
a b c
1 X 1
@@ -42,6 +44,7 @@ SHOW ENGINE INNODB STATUS;
Type Name Status
InnoDB insert 0, delete mark 0
SET GLOBAL innodb_fast_shutdown=0;
+# restart
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb/r/innodb-fk.result b/mysql-test/suite/innodb/r/innodb-fk.result
index 0a269bad828..a7b667b3839 100644
--- a/mysql-test/suite/innodb/r/innodb-fk.result
+++ b/mysql-test/suite/innodb/r/innodb-fk.result
@@ -6,6 +6,7 @@ create table t1 (f1 int primary key) engine=innodb;
insert into t1 values (5);
insert into t1 values (2882);
insert into t1 values (10);
+# restart
update t1 set f1 = 28 where f1 = 2882;
select * from fk_120;
f1
@@ -27,6 +28,7 @@ drop table t1;
# Check if restrict is working fine.
#
create table t1 (f1 int primary key) engine=innodb;
+# restart
delete from t1 where f1 = 29;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`fk_29`, CONSTRAINT `pc29` FOREIGN KEY (`f1`) REFERENCES `t1` (`f1`))
select * from fk_29;
diff --git a/mysql-test/suite/innodb/r/innodb-get-fk.result b/mysql-test/suite/innodb/r/innodb-get-fk.result
index aa1bff8f134..2b1ed5e7c79 100644
--- a/mysql-test/suite/innodb/r/innodb-get-fk.result
+++ b/mysql-test/suite/innodb/r/innodb-get-fk.result
@@ -26,6 +26,7 @@ KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB COMMENT="This is a comment about tables";
+# restart: --innodb-read-only
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
ERROR HY000: Table 'crew_role_assigned' is read only
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
@@ -43,6 +44,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
SET GLOBAL innodb_buffer_pool_load_now = ON;
SET GLOBAL innodb_buffer_pool_dump_now = ON;
SET GLOBAL innodb_buffer_pool_load_abort = ON;
+# restart
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table
@@ -56,6 +58,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
+# restart: --innodb-read-only
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
Table Create Table
crew_role_assigned CREATE TABLE `crew_role_assigned` (
@@ -68,6 +71,7 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
+# restart
DROP TABLE `repro`.`crew_role_assigned`;
DROP TABLE `repro`.`pilot`;
DROP TABLE `repro`.`crew`;
diff --git a/mysql-test/suite/innodb/r/innodb-index-debug.result b/mysql-test/suite/innodb/r/innodb-index-debug.result
index daef31d2caa..2eba29e6c28 100644
--- a/mysql-test/suite/innodb/r/innodb-index-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-index-debug.result
@@ -81,6 +81,7 @@ COUNT(k1) k2 k3
drop table t1;
create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
+INSERT INTO t1 VALUES(1, "test", "test");
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
ALTER TABLE t1 FORCE, ADD COLUMN k4 int;
@@ -100,6 +101,7 @@ SELECT COUNT(k1),k2,k3 FROM t1 GROUP BY k2,k3;
COUNT(k1) k2 k3
480 aaa bbb
480 aaaa bbbb
+1 test test
disconnect con1;
connection default;
show create table t1;
@@ -109,7 +111,7 @@ t1 CREATE TABLE `t1` (
`k2` char(200) DEFAULT NULL,
`k3` char(200) DEFAULT NULL,
PRIMARY KEY (`k1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1023 DEFAULT CHARSET=latin1
+) ENGINE=InnoDB AUTO_INCREMENT=1024 DEFAULT CHARSET=latin1
drop table t1;
drop table t480;
#
@@ -117,6 +119,7 @@ drop table t480;
# in online table rebuild
#
CREATE TABLE t1 (j INT UNIQUE, i INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(2, 2);
connect con1,localhost,root,,test;
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL built WAIT_FOR log';
ALTER TABLE t1 DROP j, FORCE;
diff --git a/mysql-test/suite/innodb/r/innodb-index-online-fk.result b/mysql-test/suite/innodb/r/innodb-index-online-fk.result
index 854afd95aaf..5f69d7ba0ac 100644
--- a/mysql-test/suite/innodb/r/innodb-index-online-fk.result
+++ b/mysql-test/suite/innodb/r/innodb-index-online-fk.result
@@ -36,13 +36,13 @@ SET foreign_key_checks = 0;
ALTER TABLE child ADD CONSTRAINT fk_20 FOREIGN KEY (a1, a2)
REFERENCES parent(a, b) ON DELETE CASCADE ON UPDATE CASCADE,
ALGORITHM = INPLACE;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_20' in the referenced table 'parent'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_20' in the referenced table 'parent'
SHOW WARNINGS;
Level Code Message
-Error 1822 Failed to add the foreign key constaint. Missing index for constraint 'fk_20' in the referenced table 'parent'
+Error 1822 Failed to add the foreign key constraint. Missing index for constraint 'fk_20' in the referenced table 'parent'
SHOW ERRORS;
Level Code Message
-Error 1822 Failed to add the foreign key constaint. Missing index for constraint 'fk_20' in the referenced table 'parent'
+Error 1822 Failed to add the foreign key constraint. Missing index for constraint 'fk_20' in the referenced table 'parent'
CREATE INDEX idx1 on parent(a, b);
ALTER TABLE child ADD CONSTRAINT fk_10 FOREIGN KEY (a1, a2)
REFERENCES parent(a, b) ON DELETE CASCADE ON UPDATE CASCADE,
@@ -143,11 +143,11 @@ SET DEBUG_DBUG = '+d,innodb_test_no_foreign_idx';
ALTER TABLE `#child` ADD CONSTRAINT fk_40 FOREIGN KEY (a1, a2)
REFERENCES `#parent`(a, b) ON DELETE CASCADE ON UPDATE CASCADE,
ALGORITHM = INPLACE;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_40' in the foreign table '#child'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_40' in the foreign table '#child'
SET DEBUG_DBUG = @saved_debug_dbug;
SHOW ERRORS;
Level Code Message
-Error 1821 Failed to add the foreign key constaint. Missing index for constraint 'fk_40' in the foreign table '#child'
+Error 1821 Failed to add the foreign key constraint. Missing index for constraint 'fk_40' in the foreign table '#child'
SELECT * FROM information_schema.INNODB_SYS_FOREIGN;
ID FOR_NAME REF_NAME N_COLS TYPE
test/fk_1 test/child test/parent 1 6
@@ -170,11 +170,11 @@ SET DEBUG_DBUG = '+d,innodb_test_no_reference_idx';
ALTER TABLE child ADD CONSTRAINT fk_42 FOREIGN KEY (a1, a2)
REFERENCES parent(a, b) ON DELETE CASCADE ON UPDATE CASCADE,
ALGORITHM = INPLACE;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_42' in the referenced table 'parent'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_42' in the referenced table 'parent'
SET DEBUG_DBUG = @saved_debug_dbug;
SHOW ERRORS;
Level Code Message
-Error 1822 Failed to add the foreign key constaint. Missing index for constraint 'fk_42' in the referenced table 'parent'
+Error 1822 Failed to add the foreign key constraint. Missing index for constraint 'fk_42' in the referenced table 'parent'
SET DEBUG_DBUG = '+d,innodb_test_wrong_fk_option';
ALTER TABLE child ADD CONSTRAINT fk_42 FOREIGN KEY (a1, a2)
REFERENCES parent(a, b) ON DELETE CASCADE ON UPDATE CASCADE,
@@ -480,7 +480,7 @@ ADD CONSTRAINT fk_new_1 FOREIGN KEY (a1_new) REFERENCES parent(b),
ADD CONSTRAINT fk_new_2 FOREIGN KEY (a2_new) REFERENCES parent(a),
ADD CONSTRAINT fk_new_3 FOREIGN KEY (a3) REFERENCES parent(c),
ALGORITHM = INPLACE;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_new_3' in the referenced table 'parent'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_new_3' in the referenced table 'parent'
SHOW CREATE TABLE child;
Table Create Table
child CREATE TABLE `child` (
@@ -542,7 +542,7 @@ ADD CONSTRAINT fk_new_1 FOREIGN KEY (a1) REFERENCES parent(b),
ADD CONSTRAINT fk_new_2 FOREIGN KEY (a2) REFERENCES parent(a),
ADD CONSTRAINT fk_new_3 FOREIGN KEY (a3) REFERENCES parent(c),
ALGORITHM = INPLACE;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_new_3' in the referenced table 'parent'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_new_3' in the referenced table 'parent'
SHOW CREATE TABLE child;
Table Create Table
child CREATE TABLE `child` (
diff --git a/mysql-test/suite/innodb/r/innodb-index-online.result b/mysql-test/suite/innodb/r/innodb-index-online.result
index 4fd64b5c48a..d3e39a75151 100644
--- a/mysql-test/suite/innodb/r/innodb-index-online.result
+++ b/mysql-test/suite/innodb/r/innodb-index-online.result
@@ -127,6 +127,8 @@ ERROR 23000: Duplicate entry '4' for key 'c2'
ALTER TABLE t1 STATS_PERSISTENT=1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c3'
test.t1 analyze status OK
UPDATE mysql.innodb_index_stats SET stat_value = 5
WHERE database_name = 'test' AND table_name= 't1' AND index_name = 'PRIMARY'
@@ -145,6 +147,7 @@ ALTER TABLE t1_c2_stats ENGINE=INNODB;
DROP INDEX c2 ON t1;
ANALYZE TABLE t1_c2_stats;
Table Op Msg_type Msg_text
+test.t1_c2_stats analyze status Engine-independent statistics collected
test.t1_c2_stats analyze status OK
SELECT * FROM mysql.innodb_index_stats WHERE table_name IN ('t1', 't1_c2_stats');
database_name table_name index_name last_update stat_name stat_value sample_size stat_description
@@ -188,9 +191,11 @@ INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1;
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 80 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c3'
test.t1 analyze status OK
connection con1;
UPDATE t1_c2_stats SET index_name = 'c2d';
@@ -231,8 +236,7 @@ WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
connection con1;
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2e_created WAIT_FOR dml2_done';
SET lock_wait_timeout = 10;
-ALTER TABLE t1 CHANGE c2 c22 INT, DROP INDEX c2d, ADD INDEX c2e(c22),
-ALGORITHM = INPLACE;
+ALTER TABLE t1 CHANGE c2 c22 INT, DROP INDEX c2d, ADD INDEX c2e(c22, c3(10)), ALGORITHM = NOCOPY;
connection default;
INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1;
@@ -290,6 +294,7 @@ INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
ON si.index_id = sf.index_id WHERE si.name = '?c2e';
name pos
c2 0
+c3 1
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
@@ -503,6 +508,7 @@ DROP TABLE t1;
# MDEV-13205 assertion !dict_index_is_online_ddl(index) upon ALTER TABLE
#
CREATE TABLE t1 (c VARCHAR(64)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('foo');
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL t1u_created WAIT_FOR dup_done';
ALTER TABLE t1 ADD UNIQUE(c);
connection con1;
diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result
index 5e91efb7062..3069a7348bf 100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@ -77,6 +77,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
@@ -119,6 +120,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
@@ -810,6 +812,7 @@ a b
2 2
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -846,6 +849,7 @@ a
2
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -954,13 +958,13 @@ FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
ERROR HY000: Failed to add the foreign key constraint on table 't2'. Incorrect options in FOREIGN KEY constraint 'test/fk_t2_ca'
@@ -975,7 +979,7 @@ FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
affected rows: 0
@@ -1915,11 +1919,13 @@ CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB;
CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB;
# Kill the server
# Wrong space_id in a dirty file and a missing file
+# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# Restore t1 and t2
+# restart
SELECT * FROM t1;
f1
SELECT * FROM t2;
diff --git a/mysql-test/suite/innodb/r/innodb-isolation.result b/mysql-test/suite/innodb/r/innodb-isolation.result
index ce9c530ff44..a308f10a8a9 100644
--- a/mysql-test/suite/innodb/r/innodb-isolation.result
+++ b/mysql-test/suite/innodb/r/innodb-isolation.result
@@ -963,15 +963,15 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 12 #
EXPLAIN SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 8 #
+1 PRIMARY t1 index PRIMARY k2 5 NULL 12 #
2 SUBQUERY t1 index NULL k2 5 NULL 12 #
EXPLAIN SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 8 #
+1 PRIMARY t1 index PRIMARY k2 5 NULL 12 #
2 SUBQUERY t1 index NULL k2 5 NULL 12 #
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c1 > (SELECT AVG(c1) FROM t1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 7 #
+1 PRIMARY t1 index PRIMARY k2 5 NULL 12 #
2 SUBQUERY t1 index NULL k2 5 NULL 12 #
#
# Make all indexes in t2 obsolete to the active repeatable read transaction
diff --git a/mysql-test/suite/innodb/r/innodb-lock-schedule-algorithm.result b/mysql-test/suite/innodb/r/innodb-lock-schedule-algorithm.result
index 928cdcfbd97..886a7f477b6 100644
--- a/mysql-test/suite/innodb/r/innodb-lock-schedule-algorithm.result
+++ b/mysql-test/suite/innodb/r/innodb-lock-schedule-algorithm.result
@@ -53,6 +53,7 @@ i2
DROP TABLE t1, t2;
disconnect con1;
# "restart: --loose-innodb-lock-schedule-algorithm=FCFS"
+# restart: --loose_innodb_lock_schedule_algorithm=FCFS
CREATE TABLE t1 (i1 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
diff --git a/mysql-test/suite/innodb/r/innodb-mdev-7513.result b/mysql-test/suite/innodb/r/innodb-mdev-7513.result
index 68f06d89036..24afa594003 100644
--- a/mysql-test/suite/innodb/r/innodb-mdev-7513.result
+++ b/mysql-test/suite/innodb/r/innodb-mdev-7513.result
@@ -198,6 +198,7 @@ text197 TEXT
) ENGINE = InnoDB;
INSERT INTO t1 VALUES ('abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef');
DELETE FROM t1 WHERE text1 = 'abcdef';
+# restart
SELECT * from t1;
text1 text2 text3 text4 text5 text6 text7 text8 text9 text10 text11 text12 text13 text14 text15 text16 text17 text18 text19 text20 text21 text22 text23 text24 text25 text26 text27 text28 text29 text30 text31 text32 text33 text34 text35 text36 text37 text38 text39 text40 text41 text42 text43 text44 text45 text46 text47 text48 text49 text50 text51 text52 text53 text54 text55 text56 text57 text58 text59 text60 text61 text62 text63 text64 text65 text66 text67 text68 text69 text70 text71 text72 text73 text74 text75 text76 text77 text78 text79 text80 text81 text82 text83 text84 text85 text86 text87 text88 text89 text90 text91 text92 text93 text94 text95 text96 text97 text98 text99 text100 text101 text102 text103 text104 text105 text106 text107 text108 text109 text110 text111 text112 text113 text114 text115 text116 text117 text118 text119 text120 text121 text122 text123 text124 text125 text126 text127 text128 text129 text130 text131 text132 text133 text134 text135 text136 text137 text138 text139 text140 text141 text142 text143 text144 text145 text146 text147 text148 text149 text150 text151 text152 text153 text154 text155 text156 text157 text158 text159 text160 text161 text162 text163 text164 text165 text166 text167 text168 text169 text170 text171 text172 text173 text174 text175 text176 text177 text178 text179 text180 text181 text182 text183 text184 text185 text186 text187 text188 text189 text190 text191 text192 text193 text194 text195 text196 text197
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
index 5411f5149d1..34b0d9431b5 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -385,6 +387,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_default.result b/mysql-test/suite/innodb/r/innodb-page_compression_default.result
index 8977a149935..4610d251fc0 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_default.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_default.result
@@ -55,6 +55,7 @@ NOT FOUND /AaAaAaAa/ in innodb_page_compressed7.ibd
NOT FOUND /AaAaAaAa/ in innodb_page_compressed8.ibd
# innodb_page_compressed9 page compressed expected NOT FOUND
NOT FOUND /AaAaAaAa/ in innodb_page_compressed9.ibd
+# restart
select count(*) from innodb_page_compressed1;
count(*)
10000
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
index aefb5c8a0be..8ea650c2241 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -385,6 +387,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
index 606de870d7c..4206b0b83d4 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -385,6 +387,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
index 66783c35d6c..c440d28ddd3 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
@@ -213,6 +213,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -299,6 +300,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
index 98c353e87e3..2f675bcf1b4 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
@@ -56,6 +56,7 @@ NOT FOUND /AaAaAaAa/ in innodb_page_compressed7.ibd
NOT FOUND /AaAaAaAa/ in innodb_page_compressed8.ibd
# innodb_page_compressed9 page compressed expected NOT FOUND
NOT FOUND /AaAaAaAa/ in innodb_page_compressed9.ibd
+# restart
select count(*) from innodb_page_compressed1;
count(*)
10000
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
index 439f409ea59..2aee063c1ac 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
@@ -79,6 +79,7 @@ count(*)
select count(*) from innodb_dynamic where c1 < 1500000;
count(*)
5000
+# restart
update innodb_compact set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1;
select count(*) from innodb_compact where c1 < 1500000;
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
index 9dcf676cb3d..f57ab6a82d2 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
@@ -212,6 +212,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -298,6 +299,7 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
5000
+# restart
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
diff --git a/mysql-test/suite/innodb/r/innodb-rollback.result b/mysql-test/suite/innodb/r/innodb-rollback.result
new file mode 100644
index 00000000000..5eca7ad6967
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-rollback.result
@@ -0,0 +1,10 @@
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+connect con1,localhost,root,,test;
+ALTER TABLE t1;
+connect con2,localhost,root,,test;
+SELECT f() FROM t1;
+ERROR 42000: FUNCTION test.f does not exist
+disconnect con2;
+disconnect con1;
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-system-table-view.result b/mysql-test/suite/innodb/r/innodb-system-table-view.result
index b8d061d3214..65dc0a8e274 100644
--- a/mysql-test/suite/innodb/r/innodb-system-table-view.result
+++ b/mysql-test/suite/innodb/r/innodb-system-table-view.result
@@ -87,11 +87,11 @@ test/t_compressed test/t_compressed 37 5 Compressed 2048 Single
test/t_dynamic test/t_dynamic 33 5 Dynamic 0 Single
test/t_redundant test/t_redundant 0 5 Redundant 0 Single
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t_redundant Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t_redundant.ibd
-test/t_compact Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t_compact.ibd
-test/t_compressed Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t_compressed.ibd
-test/t_dynamic Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t_dynamic.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t_redundant Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_redundant.ibd
+test/t_compact Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_compact.ibd
+test/t_compressed Single DEFAULT 2048 MYSQLD_DATADIR/test/t_compressed.ibd
+test/t_dynamic Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_dynamic.ibd
DROP TABLE t_redundant, t_compact, t_compressed, t_dynamic;
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
count(*)
diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result
index 8b6c2324431..7872332a4a8 100644
--- a/mysql-test/suite/innodb/r/innodb-table-online.result
+++ b/mysql-test/suite/innodb/r/innodb-table-online.result
@@ -201,6 +201,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL ROWS Using where
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET @merge_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff b/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff
new file mode 100644
index 00000000000..bb902e18931
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff
@@ -0,0 +1,5 @@
+120,121c120
+< Warnings:
+< Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
+---
+> ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.)
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff b/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff
new file mode 100644
index 00000000000..bb902e18931
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff
@@ -0,0 +1,5 @@
+120,121c120
+< Warnings:
+< Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
+---
+> ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.)
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 7de37cbc868..729f157b076 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -476,12 +476,6 @@ ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-unlink: t1.ibd
-unlink: t1.cfg
DROP TABLE t1;
CREATE TABLE t1 (
c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
@@ -957,7 +951,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption
+ERROR HY000: Index for table 't1' is corrupt; try to repair it
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result
index 3097a7660ef..88db4c040f5 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522.result
@@ -33,6 +33,7 @@ t1.frm
t1.ibd
t2.frm
t2.ibd
+# restart
FLUSH TABLE t1, t2 FOR EXPORT;
# List before copying files
db.opt
@@ -58,6 +59,7 @@ a b c
1279 Devotion asdfuihknaskdf
1278 Cavalry ..asdasdfaeraf
# Restarting server
+# restart
# Done restarting server
# List before t1 DISCARD
db.opt
@@ -114,7 +116,8 @@ t2.frm
ALTER TABLE t2 IMPORT TABLESPACE;
ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT)
ALTER TABLE t2 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.)
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
DROP TABLE t2;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index 9e7cd74baee..bcdd799f9ff 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -217,6 +217,7 @@ create index skr on t1 (a);
insert into t1 values (3,""), (4,"testing");
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -1687,9 +1688,9 @@ select count(*) from t1 where x = 18446744073709551601;
count(*)
1
drop table t1;
-SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
-variable_value
-ok
+SELECT IF(variable_value BETWEEN 488 AND 512, 'OK', variable_value) FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+IF(variable_value BETWEEN 488 AND 512, 'OK', variable_value)
+OK
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
variable_value
16384
@@ -3236,7 +3237,7 @@ select f1 from t1;
f1
show status like "handler_read_key";
Variable_name Value
-Handler_read_key 0
+Handler_read_key 3
drop table t1;
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
CREATE TEMPORARY TABLE t2 (c1 INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/r/innodb_28867993.result b/mysql-test/suite/innodb/r/innodb_28867993.result
index acc6734eaee..493d3ef0415 100644
--- a/mysql-test/suite/innodb/r/innodb_28867993.result
+++ b/mysql-test/suite/innodb/r/innodb_28867993.result
@@ -1,6 +1,7 @@
create table t1 (a int) engine=innodb;
insert t1 values (1),(2);
create database ib_logfile2;
+# restart
select * from t1;
a
1
diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_fail.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_fail.result
index 9f6959cb993..9879ef206f2 100644
--- a/mysql-test/suite/innodb/r/innodb_buffer_pool_fail.result
+++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_fail.result
@@ -5,3 +5,4 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
#
# MDEV-25019 memory allocation failures during startup cause server failure in different, confusing ways
#
+# restart: --debug_dbug=+d,ib_buf_chunk_init_fails
diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result
index 14ea44550e0..6ecf6035329 100644
--- a/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result
+++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result
@@ -17,6 +17,7 @@ COUNT(*)
596
SET GLOBAL innodb_buffer_pool_dump_now = ON;
SET GLOBAL innodb_fast_shutdown=0;
+# restart
SELECT PAGE_NUMBER FROM information_schema.innodb_buffer_page_lru
WHERE table_name = '`test`.`ib_bp_test`';
PAGE_NUMBER
@@ -36,6 +37,7 @@ call mtr.add_suppression("InnoDB: Error parsing");
SET GLOBAL innodb_buffer_pool_load_now = ON;
# Re-write some valid pages to the dump file, make sure the space
# should be valid but all the page no should be out of bound of the file
+# restart
SET GLOBAL innodb_buffer_pool_load_now = ON;
SELECT variable_value
FROM information_schema.global_status
diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result
index 2b2ea233069..152e7ade73d 100644
--- a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result
+++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result
@@ -44,6 +44,7 @@ select @@global.innodb_adaptive_hash_index;
0
create table t1 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
connection con2;
+set use_stat_tables=never;
analyze table t2;
connection con3;
alter table t3 algorithm=inplace, add index idx (c1);
diff --git a/mysql-test/suite/innodb/r/innodb_bug12902967.result b/mysql-test/suite/innodb/r/innodb_bug12902967.result
index e784c6b306a..6478cdb6c1f 100644
--- a/mysql-test/suite/innodb/r/innodb_bug12902967.result
+++ b/mysql-test/suite/innodb/r/innodb_bug12902967.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key constraints which are not compatible with the new table definition.");
+# restart
create table t1 (f1 integer primary key) engine innodb;
alter table t1 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
diff --git a/mysql-test/suite/innodb/r/innodb_bug14147491.result b/mysql-test/suite/innodb/r/innodb_bug14147491.result
index 15d72b74922..533eaeafeb8 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14147491.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14147491.result
@@ -9,6 +9,7 @@ INSERT INTO t1 (b) VALUES ('corrupt me');
# Corrupt the table
Munged a string.
Munged a string.
+# restart
# Now t1 is corrupted but we should not crash
SELECT * FROM t1;
Got one of the listed errors
diff --git a/mysql-test/suite/innodb/r/innodb_bug14676111.result b/mysql-test/suite/innodb/r/innodb_bug14676111.result
index 49d099263de..738e152b9fa 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14676111.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14676111.result
@@ -16,6 +16,7 @@ insert into t1 values (2);
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -26,6 +27,7 @@ disconnect con4;
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -36,6 +38,7 @@ disconnect con5;
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -47,6 +50,7 @@ disconnect con2;
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -56,6 +60,7 @@ insert into t1 values (2);
rollback;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -65,6 +70,7 @@ insert into t1 values (2);
rollback;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
diff --git a/mysql-test/suite/innodb/r/innodb_bug30113362.result b/mysql-test/suite/innodb/r/innodb_bug30113362.result
index 9d43053b281..cb0f5091650 100644
--- a/mysql-test/suite/innodb/r/innodb_bug30113362.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30113362.result
@@ -33,6 +33,7 @@ call data_load_t1();
DROP PROCEDURE data_load_t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -75,6 +76,7 @@ connection con2;
connection default;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -111,6 +113,7 @@ disconnect con2;
connection default;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
diff --git a/mysql-test/suite/innodb/r/innodb_bug30423.result b/mysql-test/suite/innodb/r/innodb_bug30423.result
index c7f823a06ae..786041370ef 100644
--- a/mysql-test/suite/innodb/r/innodb_bug30423.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30423.result
@@ -19,12 +19,15 @@ select @@innodb_stats_method;
nulls_equal
analyze table bug30243_1;
Table Op Msg_type Msg_text
+test.bug30243_1 analyze status Engine-independent statistics collected
test.bug30243_1 analyze status OK
analyze table bug30243_2;
Table Op Msg_type Msg_text
+test.bug30243_2 analyze status Engine-independent statistics collected
test.bug30243_2 analyze status OK
analyze table bug30243_3;
Table Op Msg_type Msg_text
+test.bug30243_3 analyze status Engine-independent statistics collected
test.bug30243_3 analyze status OK
set global innodb_stats_method = "NULL";
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of 'NULL'
@@ -34,12 +37,15 @@ select @@innodb_stats_method;
nulls_ignored
analyze table bug30243_1;
Table Op Msg_type Msg_text
+test.bug30243_1 analyze status Engine-independent statistics collected
test.bug30243_1 analyze status OK
analyze table bug30243_2;
Table Op Msg_type Msg_text
+test.bug30243_2 analyze status Engine-independent statistics collected
test.bug30243_2 analyze status OK
analyze table bug30243_3;
Table Op Msg_type Msg_text
+test.bug30243_3 analyze status Engine-independent statistics collected
test.bug30243_3 analyze status OK
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
@@ -60,12 +66,15 @@ select @@innodb_stats_method;
nulls_unequal
analyze table bug30243_1;
Table Op Msg_type Msg_text
+test.bug30243_1 analyze status Engine-independent statistics collected
test.bug30243_1 analyze status OK
analyze table bug30243_2;
Table Op Msg_type Msg_text
+test.bug30243_2 analyze status Engine-independent statistics collected
test.bug30243_2 analyze status OK
analyze table bug30243_3;
Table Op Msg_type Msg_text
+test.bug30243_3 analyze status Engine-independent statistics collected
test.bug30243_3 analyze status OK
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
@@ -83,10 +92,12 @@ COUNT(*)
set global innodb_stats_method = "nulls_unequal";
analyze table table_bug30423;
Table Op Msg_type Msg_text
+test.table_bug30423 analyze status Engine-independent statistics collected
test.table_bug30423 analyze status OK
set global innodb_stats_method = "nulls_ignored";
analyze table table_bug30423;
Table Op Msg_type Msg_text
+test.table_bug30423 analyze status Engine-independent statistics collected
test.table_bug30423 analyze status OK
set global innodb_stats_method = nulls_equal;
drop table bug30243_2;
diff --git a/mysql-test/suite/innodb/r/innodb_bug30919.result b/mysql-test/suite/innodb/r/innodb_bug30919.result
index 42aa4ff302b..0062df3f470 100644
--- a/mysql-test/suite/innodb/r/innodb_bug30919.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30919.result
@@ -35,6 +35,10 @@ FROM test.part_tbl; -- debug to show the problem
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL test.proc_part();
internal_count del_count
999 1000
diff --git a/mysql-test/suite/innodb/r/innodb_bug51920.result b/mysql-test/suite/innodb/r/innodb_bug51920.result
index ddb9e29fab2..9bc35174979 100644
--- a/mysql-test/suite/innodb/r/innodb_bug51920.result
+++ b/mysql-test/suite/innodb/r/innodb_bug51920.result
@@ -11,6 +11,8 @@ connection default;
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO="UPDATE bug51920 SET i=2"
INTO @thread_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
KILL @thread_id;
connection con1;
Got one of the listed errors
diff --git a/mysql-test/suite/innodb/r/innodb_bug53046.result b/mysql-test/suite/innodb/r/innodb_bug53046.result
index 69be6c4e0a7..0321d5ace19 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53046.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53046.result
@@ -16,6 +16,7 @@ FROM bug53046_1;
INSERT INTO bug53046_2 VALUES (1), (2);
ANALYZE TABLE bug53046_1;
Table Op Msg_type Msg_text
+test.bug53046_1 analyze status Engine-independent statistics collected
test.bug53046_1 analyze status OK
SHOW TABLE STATUS LIKE 'bug53046_1';
UPDATE bug53046_1 SET c1 = c1 - 1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug53756.result b/mysql-test/suite/innodb/r/innodb_bug53756.result
index 06fa96c2f81..daa6113f8d4 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53756.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53756.result
@@ -77,6 +77,7 @@ pk c1
4 44
START TRANSACTION;
INSERT INTO bug_53756 VALUES (666,666);
+# restart
disconnect con1;
disconnect con2;
disconnect con3;
diff --git a/mysql-test/suite/innodb/r/innodb_bug57252.result b/mysql-test/suite/innodb/r/innodb_bug57252.result
index efa50c742e0..66183c2c42d 100644
--- a/mysql-test/suite/innodb/r/innodb_bug57252.result
+++ b/mysql-test/suite/innodb/r/innodb_bug57252.result
@@ -1,6 +1,7 @@
cardinality
-10
+2
Table Op Msg_type Msg_text
+test.bug57252 analyze status Engine-independent statistics collected
test.bug57252 analyze status OK
cardinality
10
diff --git a/mysql-test/suite/innodb/r/innodb_bug59641.result b/mysql-test/suite/innodb/r/innodb_bug59641.result
index 8bf574e2bec..634edec71dd 100644
--- a/mysql-test/suite/innodb/r/innodb_bug59641.result
+++ b/mysql-test/suite/innodb/r/innodb_bug59641.result
@@ -17,6 +17,7 @@ UPDATE t SET b=4*a WHERE a=32;
XA END '789';
XA PREPARE '789';
CONNECT con3,localhost,root,,;
+# restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
a b
@@ -29,6 +30,7 @@ a b
16 16
32 128
COMMIT;
+# restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
a b
diff --git a/mysql-test/suite/innodb/r/innodb_bug60049.result b/mysql-test/suite/innodb/r/innodb_bug60049.result
new file mode 100644
index 00000000000..47b02dedd01
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug60049.result
@@ -0,0 +1,9 @@
+CREATE TABLE t(a INT)ENGINE=InnoDB STATS_PERSISTENT=0;
+RENAME TABLE t TO u;
+DROP TABLE u;
+SELECT @@innodb_fast_shutdown;
+@@innodb_fast_shutdown
+0
+Last record of ID_IND root page (9):
+18080000180500c0000000000000000c5359535f464f524549474e5f434f4c53
+# restart
diff --git a/mysql-test/suite/innodb/r/innodb_bug68148.result b/mysql-test/suite/innodb/r/innodb_bug68148.result
index 9da4ea80d08..7206bccd50f 100644
--- a/mysql-test/suite/innodb/r/innodb_bug68148.result
+++ b/mysql-test/suite/innodb/r/innodb_bug68148.result
@@ -18,7 +18,7 @@ Tables_in_test
main
ref_table1
ref_table2
-# restart and see if we can still access the main table
+# restart
ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`);
SHOW CREATE TABLE `main`;
Table Create Table
diff --git a/mysql-test/suite/innodb/r/innodb_defrag_stats.result b/mysql-test/suite/innodb/r/innodb_defrag_stats.result
index d1e9e2e78ae..d362608de79 100644
--- a/mysql-test/suite/innodb/r/innodb_defrag_stats.result
+++ b/mysql-test/suite/innodb/r/innodb_defrag_stats.result
@@ -120,6 +120,7 @@ SET GLOBAL innodb_defragment_stats_accuracy = 1;
CREATE TEMPORARY TABLE t (a INT PRIMARY KEY, c CHAR(255) NOT NULL)
ENGINE=InnoDB;
INSERT INTO t SELECT seq, '' FROM seq_1_to_100;
+# restart
SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats;
table_name index_name stat_name
t2 PRIMARY n_leaf_pages_defrag
diff --git a/mysql-test/suite/innodb/r/innodb_defragment.result b/mysql-test/suite/innodb/r/innodb_defragment.result
index 989d3ef3397..533a39eec9d 100644
--- a/mysql-test/suite/innodb/r/innodb_defragment.result
+++ b/mysql-test/suite/innodb/r/innodb_defragment.result
@@ -40,6 +40,7 @@ disconnect con1;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
+# restart
select count(*) from t1;
count(*)
7904
@@ -68,6 +69,7 @@ SET @@global.innodb_defragment_n_pages = 3;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
+# restart
select count(stat_value) < 3 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed');
count(stat_value) < 3
1
@@ -105,6 +107,7 @@ SET @@global.innodb_defragment_n_pages = 10;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
+# restart
select count(stat_value) > 1 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_pages_freed');
count(stat_value) > 1
1
diff --git a/mysql-test/suite/innodb/r/innodb_defragment_fill_factor.result b/mysql-test/suite/innodb/r/innodb_defragment_fill_factor.result
index 5809542db8a..8453050a92a 100644
--- a/mysql-test/suite/innodb/r/innodb_defragment_fill_factor.result
+++ b/mysql-test/suite/innodb/r/innodb_defragment_fill_factor.result
@@ -12,6 +12,7 @@ INSERT INTO t1 (b) SELECT b from t1;
INSERT INTO t1 (b) SELECT b from t1;
INSERT INTO t1 (b) SELECT b from t1;
SET GLOBAL innodb_fast_shutdown = 0;
+# restart
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
@@ -57,6 +58,7 @@ DROP TABLE t1;
Testing table with small records
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(16), c VARCHAR(32), KEY SECOND(a,b,c)) ENGINE=INNODB;
SET GLOBAL innodb_fast_shutdown = 0;
+# restart
optimize table t2;
Table Op Msg_type Msg_text
test.t2 optimize status OK
diff --git a/mysql-test/suite/innodb/r/innodb_force_recovery.result b/mysql-test/suite/innodb/r/innodb_force_recovery.result
index 38892e4c838..9a2cc60ff68 100644
--- a/mysql-test/suite/innodb/r/innodb_force_recovery.result
+++ b/mysql-test/suite/innodb/r/innodb_force_recovery.result
@@ -4,6 +4,7 @@ insert into t1 values(1, 2);
insert into t2 values(1, 2);
SET GLOBAL innodb_fast_shutdown = 0;
# Restart the server with innodb_force_recovery as 4.
+# restart: --innodb-force-recovery=4
select * from t1;
f1 f2
1 2
@@ -34,6 +35,7 @@ Tables_in_test
t1
t2
# Restart the server with innodb_force_recovery as 5.
+# restart: --innodb-force-recovery=5
select * from t2;
f1 f2
1 2
@@ -64,6 +66,7 @@ Tables_in_test
t1
t2
# Restart the server with innodb_force_recovery as 6.
+# restart: --innodb-force-recovery=6
select * from t2;
f1 f2
1 2
@@ -92,6 +95,7 @@ Tables_in_test
t1
t2
# Restart the server with innodb_force_recovery=2
+# restart: --innodb-force-recovery=2
select * from t2;
f1 f2
1 2
@@ -105,6 +109,7 @@ disconnect con1;
connection default;
# Kill the server
# Restart the server with innodb_force_recovery=3
+# restart: --innodb-force-recovery=3
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select * from t2;
f1 f2
@@ -117,6 +122,7 @@ SET SESSION innodb_lock_wait_timeout=1;
insert into t2 values(1,2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
insert into t2 values(9,10);
+# restart
select * from t2;
f1 f2
1 2
diff --git a/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result b/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result
index 42cf8adfc13..c2db4bed2f9 100644
--- a/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result
+++ b/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result
@@ -10,6 +10,7 @@ INSERT INTO t0 SELECT * FROM seq_1_to_1000;
connection default;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+# restart: --innodb-force-recovery=2
disconnect con0;
connection default;
SELECT * FROM t0 LIMIT 0 LOCK IN SHARE MODE;
diff --git a/mysql-test/suite/innodb/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result
index f8b02bb163a..162219cc6ac 100644
--- a/mysql-test/suite/innodb/r/innodb_gis.result
+++ b/mysql-test/suite/innodb/r/innodb_gis.result
@@ -560,29 +560,29 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
1
-INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
-INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)'));
EXPLAIN
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref p p 28 const # Using where
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
DROP TABLE t1, t2;
End of 5.0 tests
#
diff --git a/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result b/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
index 8e3d670e4fe..fc41d0b1471 100644
--- a/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
+++ b/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
@@ -284,6 +284,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -304,6 +306,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -324,6 +328,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
diff --git a/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result b/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
index 50d0971bc63..a9683016925 100644
--- a/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
+++ b/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
@@ -466,6 +466,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -486,6 +488,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -506,6 +510,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index d7a78f8ec90..acd66549d42 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -191,8 +191,8 @@ min(7)
7
explain select min(7) from t2i join t1i;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2i ALL NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
+1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
select min(7) from t2i join t1i;
min(7)
NULL
@@ -207,8 +207,8 @@ max(7)
7
explain select max(7) from t2i join t1i;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2i ALL NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
+1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
select max(7) from t2i join t1i;
max(7)
NULL
@@ -239,7 +239,7 @@ select 1, max(1) from t1i where 1=99;
explain select count(*), min(7), max(7) from t1m, t1i;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1m system NULL NULL NULL NULL 0 Const row not found
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
select count(*), min(7), max(7) from t1m, t1i;
count(*) min(7) max(7)
0 NULL NULL
@@ -253,7 +253,7 @@ count(*) min(7) max(7)
explain select count(*), min(7), max(7) from t2m, t1i;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2m system NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
select count(*), min(7), max(7) from t2m, t1i;
count(*) min(7) max(7)
0 NULL NULL
@@ -303,6 +303,7 @@ create index idx12672_1 on t4 (a1,a2,b,c);
create index idx12672_2 on t4 (a1,a2,b);
analyze table t4;
Table Op Msg_type Msg_text
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
select distinct a1 from t4 where pk_col not in (1,2,3,4);
a1
@@ -382,9 +383,20 @@ INSERT INTO t1(id, dept, age, name) VALUES
(3996, 'cs4', 20, 'rs2'), (4003, 'cs5', 10, 'rs3'), (4004, 'cs6', 20, 'rs3'),
(4011, 'cs7', 10, 'rs4'), (4012, 'cs8', 20, 'rs4'), (4019, 'cs9', 10, 'rs5'),
(4020, 'cs10', 20, 'rs5'),(4027, 'cs11', 10, 'rs6'),(4028, 'cs12', 20, 'rs6');
+set
+@tmp_uss=@@use_stat_tables,
+@tmp_occ=@@optimizer_use_condition_selectivity;
+set
+use_stat_tables='preferably',
+optimizer_use_condition_selectivity=4;
+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
+flush tables;
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range name name 44 NULL 2 Using where; Using index for group-by
+1 SIMPLE t1 ref name name 22 const 2 Using where; Using index
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
name dept
rs5 cs10
@@ -397,6 +409,9 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
name dept
DROP TABLE t1;
+set
+use_stat_tables=@tmp_uss,
+optimizer_use_condition_selectivity=@tmp_occ;
drop table if exists t1;
show variables like 'innodb_rollback_on_timeout';
Variable_name Value
@@ -2352,12 +2367,12 @@ EXPLAIN SELECT c FROM foo2 WHERE b>2;;
id 1
select_type SIMPLE
table foo2
-type range
+type index
possible_keys b
key b
key_len 5
ref NULL
-rows 5
+rows 6
Extra Using where; Using index
EXPLAIN SELECT c FROM bar WHERE c>2;;
id 1
@@ -2699,6 +2714,7 @@ INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
c1 c2 c3
@@ -2851,6 +2867,7 @@ INSERT INTO t1 VALUES (1,1,1,1,1,1), (2,2,2,2,2,2), (3,3,3,3,3,3),
(11,11,11,11,11,11);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT COUNT(*) FROM t1;
id 1
@@ -3050,7 +3067,7 @@ f1 f2 f3 f4
EXPLAIN SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
ORDER BY f1 DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range f2,f4 f4 1 NULL 22 Using where
+1 SIMPLE t1 index f2,f4 PRIMARY 4 NULL 5 Using where
DROP TABLE t1;
#
# Bug#54117 crash in thr_multi_unlock, temporary table
@@ -3126,7 +3143,7 @@ INSERT INTO t1 VALUES (0);
SET SQL_MODE='STRICT_ALL_TABLES';
CREATE TABLE t2
SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
-ERROR 22007: Incorrect datetime value: ''
+ERROR 22007: Truncated incorrect datetime value: ''
DROP TABLE t1;
SET SQL_MODE=DEFAULT;
#
@@ -3163,8 +3180,8 @@ SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 1537
-2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 1537 Using sort_union(idx,PRIMARY); Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL #
+2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL # Using sort_union(idx,PRIMARY); Using where
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
index a43649f4067..1e97c21c253 100644
--- a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
+++ b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
@@ -29,6 +29,7 @@ COUNT(*)
START TRANSACTION;
connection default;
SET GLOBAL innodb_fast_shutdown=3;
+# restart
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
@@ -55,6 +56,7 @@ col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
connection default;
SET GLOBAL innodb_fast_shutdown=3;
+# restart
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
@@ -79,6 +81,7 @@ col_1_text = REPEAT("b", 3500) col_2_text = REPEAT("o", 3500)
1 1
connection default;
SET GLOBAL innodb_fast_shutdown=3;
+# restart
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
index fe851bc3b25..26f3267440e 100644
--- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
+++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
@@ -72,7 +72,6 @@ buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL N
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created)
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written)
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read)
-buffer_pages0_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of page 0 read (innodb_pages0_read)
buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read
buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads avoided triggering cluster read
buffer_data_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Amount of data read in bytes (innodb_data_reads)
@@ -181,7 +180,6 @@ trx_nl_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL N
trx_commits_insert_update transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions committed with inserts and updates
trx_rollbacks transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions rolled back
trx_rollbacks_savepoint transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions rolled back to savepoint
-trx_rollback_active transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of resurrected active transactions rolled back
trx_active_transactions transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of active transactions
trx_rseg_history_len transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Length of the TRX_RSEG_HISTORY list
trx_undo_slots_used transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of undo slots used
@@ -395,7 +393,7 @@ SPACE NAME ENCRYPTION_SCHEME KEYSERVER_REQUESTS MIN_KEY_VERSION CURRENT_KEY_VERS
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_tablespaces_encryption but the InnoDB storage engine is not installed
select * from information_schema.innodb_tablespaces_scrubbing;
-SPACE NAME COMPRESSED LAST_SCRUB_COMPLETED CURRENT_SCRUB_STARTED CURRENT_SCRUB_ACTIVE_THREADS CURRENT_SCRUB_PAGE_NUMBER CURRENT_SCRUB_MAX_PAGE_NUMBER
+SPACE NAME COMPRESSED LAST_SCRUB_COMPLETED CURRENT_SCRUB_STARTED CURRENT_SCRUB_ACTIVE_THREADS CURRENT_SCRUB_PAGE_NUMBER CURRENT_SCRUB_MAX_PAGE_NUMBER ON_SSD
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_tablespaces_scrubbing but the InnoDB storage engine is not installed
select * from information_schema.innodb_mutexes;
diff --git a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result
index b9429046b36..66ef5ed2696 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result
@@ -17,6 +17,7 @@ avg_row_length 0
max_data_length 0
index_length 0
ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats;
+# restart
SELECT seq_in_index, column_name, cardinality
FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted'
ORDER BY index_name, seq_in_index;
diff --git a/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result b/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result
index 1567ac6cb0a..3ae06c48ecb 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result
@@ -1,4 +1,5 @@
Table Op Msg_type Msg_text
+test.innodb_stats_drop_locked analyze status Engine-independent statistics collected
test.innodb_stats_drop_locked analyze status OK
SET autocommit=0;
SELECT table_name FROM mysql.innodb_table_stats
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch.result b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
index b348e41f1d9..d7b7d78ec71 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
@@ -1,3 +1,5 @@
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
CREATE TABLE test_ps_fetch
(a INT, b INT, c INT, d INT, PRIMARY KEY (a, b), INDEX idx (c, d))
ENGINE=INNODB STATS_PERSISTENT=1;
@@ -5,6 +7,10 @@ ANALYZE TABLE test_ps_fetch;
Table test.test_ps_fetch
Op analyze
Msg_type status
+Msg_text Engine-independent statistics collected
+Table test.test_ps_fetch
+Op analyze
+Msg_type status
Msg_text OK
SELECT n_rows, clustered_index_size, sum_of_other_index_sizes
FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_fetch';
@@ -143,3 +149,4 @@ avg_row_length 81
max_data_length 0
index_length 16384
DROP TABLE test_ps_fetch;
+set @@use_stat_tables = @save_use_stat_tables;
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result b/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
index 0f0e941b838..a368f6271b9 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
@@ -7,6 +7,10 @@ ANALYZE TABLE test_ps_fetch_corrupted;
Table test.test_ps_fetch_corrupted
Op analyze
Msg_type status
+Msg_text Engine-independent statistics collected
+Table test.test_ps_fetch_corrupted
+Op analyze
+Msg_type status
Msg_text OK
SELECT n_rows, clustered_index_size, sum_of_other_index_sizes
FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_fetch_corrupted';
@@ -29,3 +33,4 @@ max_data_length 0
index_length 0
ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats;
DROP TABLE test_ps_fetch_corrupted;
+# restart
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result b/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result
index 6093fbae86b..91bb2bf3ecd 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result
@@ -6,6 +6,10 @@ ANALYZE TABLE test_ps_fetch_nonexistent;
Table test.test_ps_fetch_nonexistent
Op analyze
Msg_type status
+Msg_text Engine-independent statistics collected
+Table test.test_ps_fetch_nonexistent
+Op analyze
+Msg_type status
Msg_text OK
SELECT COUNT(*)
FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_fetch_nonexistent';
diff --git a/mysql-test/suite/innodb/r/innodb_stats_persistent.result b/mysql-test/suite/innodb/r/innodb_stats_persistent.result
index e8534e7e8f3..e25ab2a8a24 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_persistent.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_persistent.result
@@ -12,6 +12,7 @@ CREATE TABLE t2 LIKE t1;
INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
connect con1, localhost, root,,;
START TRANSACTION;
@@ -90,7 +91,7 @@ COUNT(*)
# ha_innobase::records_in_range() would count the delete-marked records.
EXPLAIN SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL val 4 NULL 1 Using index
+1 SIMPLE t1 index NULL val 4 NULL 16 Using index
ROLLBACK;
EXPLAIN SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result b/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result
index 9f93f05fd56..ee1ad318d65 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result
@@ -17,6 +17,7 @@ SET GLOBAL innodb_limit_optimistic_insert_debug = @save_debug;
connect con1, localhost, root,,;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
disconnect con1;
connection default;
diff --git a/mysql-test/suite/innodb/r/innodb_wl6326.result b/mysql-test/suite/innodb/r/innodb_wl6326.result
index e0574a6b7b1..85908ca1773 100644
--- a/mysql-test/suite/innodb/r/innodb_wl6326.result
+++ b/mysql-test/suite/innodb/r/innodb_wl6326.result
@@ -24,6 +24,7 @@ a06
);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -39,6 +40,7 @@ INSERT INTO t1 (a00) VALUES ('ag');
INSERT INTO t1 (a00) VALUES ('ah');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -48,6 +50,7 @@ INSERT INTO t1 (a00) VALUES ('aj');
INSERT INTO t1 (a00) VALUES ('ak');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -61,6 +64,7 @@ INSERT INTO t1 (a00) VALUES ('aq');
INSERT INTO t1 (a00) VALUES ('ar');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -74,6 +78,7 @@ INSERT INTO t1 (a00) VALUES ('ax');
INSERT INTO t1 (a00) VALUES ('ay');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -87,6 +92,7 @@ INSERT INTO t1 (a00) VALUES ('be');
INSERT INTO t1 (a00) VALUES ('bf');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -100,6 +106,7 @@ INSERT INTO t1 (a00) VALUES ('bl');
INSERT INTO t1 (a00) VALUES ('bm');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -113,6 +120,7 @@ INSERT INTO t1 (a00) VALUES ('bs');
INSERT INTO t1 (a00) VALUES ('bt');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -140,6 +148,7 @@ INSERT INTO t1 (a00) VALUES ('cn');
INSERT INTO t1 (a00) VALUES ('co');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -195,6 +204,7 @@ INSERT INTO t1 (a00) VALUES ('ek');
INSERT INTO t1 (a00) VALUES ('el');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -249,6 +259,7 @@ INSERT INTO t1 (a00) VALUES ('gg');
INSERT INTO t1 (a00) VALUES ('gh');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -293,6 +304,7 @@ cn a
connection default;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -323,6 +335,7 @@ el a
connection default;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -359,6 +372,7 @@ gb a
connection default;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
diff --git a/mysql-test/suite/innodb/r/instant_alter,32k.rdiff b/mysql-test/suite/innodb/r/instant_alter,32k.rdiff
index 6968ad2d92f..cfe010012b0 100644
--- a/mysql-test/suite/innodb/r/instant_alter,32k.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter,32k.rdiff
@@ -1,5 +1,5 @@
@@ -5,7 +5,7 @@
- SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
-ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
@@ -28,7 +28,7 @@
DROP TABLE t;
connect analyze, localhost, root;
connection default;
-@@ -399,7 +399,7 @@
+@@ -404,7 +404,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -37,7 +37,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -422,7 +422,7 @@
+@@ -428,7 +428,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -46,7 +46,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -435,7 +435,7 @@
+@@ -442,7 +442,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -55,7 +55,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -883,7 +883,7 @@
+@@ -1326,7 +1326,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -64,7 +64,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -906,7 +906,7 @@
+@@ -1350,7 +1350,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -73,7 +73,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -919,7 +919,7 @@
+@@ -1364,7 +1364,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -82,7 +82,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -1367,7 +1367,7 @@
+@@ -2248,7 +2248,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -91,7 +91,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -1390,7 +1390,7 @@
+@@ -2272,7 +2272,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -100,7 +100,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -1403,7 +1403,7 @@
+@@ -2286,7 +2286,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
diff --git a/mysql-test/suite/innodb/r/instant_alter,4k.rdiff b/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
index f65127bca71..d34bb7e7ca0 100644
--- a/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
@@ -1,4 +1,4 @@
-@@ -243,7 +243,7 @@
+@@ -244,7 +244,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -7,7 +7,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -253,7 +253,7 @@
+@@ -255,7 +255,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -16,7 +16,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -264,7 +264,7 @@
+@@ -267,7 +267,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -25,7 +25,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -274,7 +274,7 @@
+@@ -278,11 +278,17 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -33,8 +33,19 @@
+4
connection default;
ALTER TABLE t2 DROP p;
++ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1979. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
++SET innodb_strict_mode = OFF;
++ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -326,8 +326,14 @@
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
++SET innodb_strict_mode = ON;
+ SELECT * FROM t2;
+ id c1 d1
+ 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
+@@ -330,8 +336,14 @@
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL;
@@ -50,7 +61,7 @@
INSERT INTO t3 SET id=4;
ERROR HY000: Field 'c2' doesn't have a default value
INSERT INTO t3 SET id=4, c2=0, b=0xf09f98b1;
-@@ -340,7 +346,9 @@
+@@ -344,7 +356,9 @@
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
@@ -61,7 +72,7 @@
INSERT INTO t3 SET id=5, c2=9;
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
-@@ -354,7 +362,9 @@
+@@ -358,7 +372,9 @@
5 9 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01 ääH binary line of business
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
@@ -72,7 +83,7 @@
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
-@@ -382,6 +392,8 @@
+@@ -386,6 +402,8 @@
(id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000),
p POINT NOT NULL DEFAULT ST_GeomFromText('POINT(0 0)'), SPATIAL INDEX(p))
ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
@@ -81,7 +92,7 @@
BEGIN;
INSERT INTO big
SET id=1, c1=REPEAT('a', 200), c2=REPEAT('b', 200), c3=REPEAT('c', 159);
-@@ -399,13 +411,15 @@
+@@ -404,13 +422,15 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -99,7 +110,7 @@
CHECKSUM TABLE big;
Table Checksum
test.big 1705165209
-@@ -422,7 +436,7 @@
+@@ -428,7 +448,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -108,7 +119,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -435,7 +449,7 @@
+@@ -442,7 +462,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -117,7 +128,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -727,7 +741,7 @@
+@@ -1166,7 +1186,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -126,7 +137,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -737,7 +751,7 @@
+@@ -1177,7 +1197,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -135,7 +146,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -748,7 +762,7 @@
+@@ -1189,7 +1209,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -144,7 +155,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -758,7 +772,7 @@
+@@ -1200,11 +1220,13 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -153,7 +164,14 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -811,7 +825,9 @@
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+ SELECT * FROM t2;
+ id c1 d1
+ 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
+@@ -1253,7 +1275,9 @@
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL;
affected rows: 0
@@ -164,7 +182,7 @@
INSERT INTO t3 SET id=4;
ERROR HY000: Field 'c2' doesn't have a default value
INSERT INTO t3 SET id=4, c2=0, b=0xf09f98b1;
-@@ -824,7 +840,9 @@
+@@ -1266,7 +1290,9 @@
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
@@ -175,7 +193,7 @@
INSERT INTO t3 SET id=5, c2=9;
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
-@@ -838,7 +856,9 @@
+@@ -1280,7 +1306,9 @@
5 9 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01 ääH binary line of business
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
@@ -186,7 +204,7 @@
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
-@@ -866,6 +886,8 @@
+@@ -1308,6 +1336,8 @@
(id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000),
p POINT NOT NULL DEFAULT ST_GeomFromText('POINT(0 0)'), SPATIAL INDEX(p))
ENGINE=InnoDB ROW_FORMAT=COMPACT;
@@ -195,7 +213,7 @@
BEGIN;
INSERT INTO big
SET id=1, c1=REPEAT('a', 200), c2=REPEAT('b', 200), c3=REPEAT('c', 159);
-@@ -883,13 +905,15 @@
+@@ -1326,13 +1356,15 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -213,7 +231,7 @@
CHECKSUM TABLE big;
Table Checksum
test.big 1705165209
-@@ -906,7 +930,7 @@
+@@ -1350,7 +1382,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -222,7 +240,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -919,7 +943,7 @@
+@@ -1364,7 +1396,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -231,7 +249,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -1211,7 +1235,7 @@
+@@ -2088,7 +2120,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -240,7 +258,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -1221,7 +1245,7 @@
+@@ -2099,7 +2131,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -249,7 +267,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -1232,7 +1256,7 @@
+@@ -2111,7 +2143,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -258,7 +276,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -1242,7 +1266,7 @@
+@@ -2122,7 +2154,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -267,7 +285,7 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -1367,7 +1391,7 @@
+@@ -2248,7 +2280,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -276,7 +294,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -1390,7 +1414,7 @@
+@@ -2272,7 +2304,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -285,7 +303,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -1403,7 +1427,7 @@
+@@ -2286,7 +2318,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -294,11 +312,12 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -1514,6 +1538,6 @@
+@@ -2836,7 +2868,7 @@
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
--60
-+61
+-206
++208
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
+ #
diff --git a/mysql-test/suite/innodb/r/instant_alter,64k.rdiff b/mysql-test/suite/innodb/r/instant_alter,64k.rdiff
index 72dc9fe9ee6..4e49b41e93a 100644
--- a/mysql-test/suite/innodb/r/instant_alter,64k.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter,64k.rdiff
@@ -1,5 +1,5 @@
@@ -5,7 +5,7 @@
- SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
-ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
@@ -28,7 +28,7 @@
DROP TABLE t;
connect analyze, localhost, root;
connection default;
-@@ -399,7 +399,7 @@
+@@ -404,7 +404,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -37,7 +37,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -422,7 +422,7 @@
+@@ -428,7 +428,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -46,7 +46,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -435,7 +435,7 @@
+@@ -442,7 +442,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -55,7 +55,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -883,7 +883,7 @@
+@@ -1326,7 +1326,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -64,7 +64,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -906,7 +906,7 @@
+@@ -1350,7 +1350,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -73,7 +73,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -919,7 +919,7 @@
+@@ -1364,7 +1364,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -82,7 +82,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -1367,7 +1367,7 @@
+@@ -2248,7 +2248,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -91,7 +91,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -1390,7 +1390,7 @@
+@@ -2272,7 +2272,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -100,7 +100,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -1403,7 +1403,7 @@
+@@ -2286,7 +2286,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
diff --git a/mysql-test/suite/innodb/r/instant_alter,8k.rdiff b/mysql-test/suite/innodb/r/instant_alter,8k.rdiff
index 63e27300f72..3babe020c09 100644
--- a/mysql-test/suite/innodb/r/instant_alter,8k.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter,8k.rdiff
@@ -1,4 +1,4 @@
-@@ -243,7 +243,7 @@
+@@ -244,7 +244,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -7,7 +7,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -253,7 +253,7 @@
+@@ -255,7 +255,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -16,7 +16,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -264,7 +264,7 @@
+@@ -267,7 +267,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -25,7 +25,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -274,7 +274,7 @@
+@@ -278,7 +278,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -34,7 +34,7 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -399,7 +399,7 @@
+@@ -404,7 +404,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -43,7 +43,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -422,7 +422,7 @@
+@@ -428,7 +428,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -52,7 +52,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -435,7 +435,7 @@
+@@ -442,7 +442,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -61,7 +61,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -727,7 +727,7 @@
+@@ -1166,7 +1166,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -70,7 +70,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -737,7 +737,7 @@
+@@ -1177,7 +1177,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -79,7 +79,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -748,7 +748,7 @@
+@@ -1189,7 +1189,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -88,7 +88,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -758,7 +758,7 @@
+@@ -1200,7 +1200,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -97,7 +97,7 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -883,7 +883,7 @@
+@@ -1326,7 +1326,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -106,7 +106,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -906,7 +906,7 @@
+@@ -1350,7 +1350,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -115,7 +115,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -919,7 +919,7 @@
+@@ -1364,7 +1364,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -124,7 +124,7 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
-@@ -1211,7 +1211,7 @@
+@@ -2088,7 +2088,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -133,7 +133,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -1221,7 +1221,7 @@
+@@ -2099,7 +2099,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -142,7 +142,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -1232,7 +1232,7 @@
+@@ -2111,7 +2111,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -151,7 +151,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -1242,7 +1242,7 @@
+@@ -2122,7 +2122,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -160,7 +160,7 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -1367,7 +1367,7 @@
+@@ -2248,7 +2248,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -169,7 +169,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -1390,7 +1390,7 @@
+@@ -2272,7 +2272,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -178,7 +178,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -1403,7 +1403,7 @@
+@@ -2286,7 +2286,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
diff --git a/mysql-test/suite/innodb/r/instant_alter.result b/mysql-test/suite/innodb/r/instant_alter.result
index 5d76d648345..25665435ad8 100644
--- a/mysql-test/suite/innodb/r/instant_alter.result
+++ b/mysql-test/suite/innodb/r/instant_alter.result
@@ -2,7 +2,7 @@
# MDEV-11369: Instant ADD COLUMN for InnoDB
#
SET @saved_allowance = @@GLOBAL.innodb_instant_alter_column_allowed;
-SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
@@ -185,8 +185,8 @@ affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
INSERT INTO t1 SET id=9;
ALTER TABLE t1 DROP c3;
-affected rows: 9
-info: Records: 9 Duplicates: 0 Warnings: 0
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -239,6 +239,7 @@ UPDATE t2 SET c1 = repeat(id, 4000);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -249,6 +250,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -260,6 +262,7 @@ UPDATE t2 SET d1 = repeat(id, 200);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -270,6 +273,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -395,6 +399,7 @@ COMMIT;
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -418,6 +423,7 @@ test.big 385477733
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -431,6 +437,7 @@ test.big 1705165209
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -539,8 +546,439 @@ ALTER TABLE t1 MODIFY a INT DEFAULT 0;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
-DROP TABLE t1;
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY a INT DEFAULT 0;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
+DROP TABLE t1;
+SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
+CREATE TABLE t1 (a INT, b INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 (a) VALUES (NULL), (NULL);
+ALTER TABLE t1 DROP a, ADD COLUMN a INT;
+DELETE FROM t1;
+BEGIN;
+INSERT INTO t1 SET a=NULL;
+ROLLBACK;
+DELETE FROM t1;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES(347,'');
+ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT;
+SELECT * FROM t1;
+a
+347
+DROP TABLE t1;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1() VALUES();
+ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b;
+SELECT * FROM t1;
+b c a
+NULL NULL NULL
+DROP TABLE t1;
+CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+SET @t=REPEAT('x',@@innodb_page_size / 2);
+INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t);
+ALTER TABLE t1 ADD COLUMN a INT FIRST;
+UPDATE t1 SET a = 0;
+DROP TABLE t1;
+CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET t = @x;
+ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1;
+ALTER TABLE t1 ADD COLUMN t TEXT;
+SELECT * FROM t1;
+i t
+1 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+a c
+3 42
+4 42
+DROP TABLE t1;
+CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+b i v
+NULL 1 1
+DROP TABLE t1;
+CREATE TABLE t1 (ts TIMESTAMP) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+f
+NULL
+NULL
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+id f
+1 NULL
+2 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+f
+NULL
+NULL
+DROP TABLE t1;
+CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT,
+f2 CHAR(255),
+f3 BIGINT,
+f4 INT,
+f5 CHAR(255),
+f6 CHAR(255),
+f7 CHAR(255) NOT NULL,
+f8 INT,
+f9 CHAR(10)
+) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+(2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+(3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+(4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+(5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+(6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+(7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+(8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+(9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+(10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+(11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+(12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+(13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+(14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+(15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+DELETE FROM t1 WHERE pk=1;
+InnoDB 0 transactions not purged
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT, f2 CHAR(32) NOT NULL,
+f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+f7 CHAR(32), f8 CHAR(32)
+) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES
+(1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+(3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+(5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+(7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+(9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+(11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+(13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+(15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+(17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+(19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+(21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+(23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+(25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+(51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+(53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+(55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+(57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+(59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+(61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+(63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+(101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+(103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+(105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+(107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+(109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+(151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+(153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+(155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+(157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+(159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+(201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+(203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+(205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+(207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+(252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+(254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+(256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+(258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+(301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+(303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+(305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+(307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+(351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+(353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+(355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+(357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+(359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+(361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+(363,75,'',66,76,52,'','','');
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (0,0);
+ALTER TABLE t1 MODIFY a INT AFTER b;
+ALTER TABLE t1 ADD COLUMN v INT AS (a) VIRTUAL;
+ALTER TABLE t1 MODIFY b INT NOT NULL AFTER a;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1(t TEXT NOT NULL, FULLTEXT(t)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 MODIFY COLUMN t TEXT;
+DROP TABLE t1;
+CREATE TABLE t1 (f TINYINT, g SMALLINT UNSIGNED) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES(127,6502),(-128,33101);
+ALTER TABLE t1 MODIFY f SMALLINT DEFAULT 12345,
+MODIFY g BIGINT UNSIGNED DEFAULT 1234567;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+SELECT * FROM t1;
+f g
+127 6502
+-128 33101
+DROP TABLE t1;
+CREATE TABLE t1 (f BIT(8)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (b'10000000'),(b'00000001');
+ALTER TABLE t1 MODIFY f BIT(16);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+INSERT INTO t1 VALUES (b'1000000010101111'),(b'10000000');
+SELECT HEX(f) FROM t1;
+HEX(f)
+80
+1
+80AF
+80
+ALTER TABLE t1 MODIFY f SMALLINT;
+ERROR 22003: Out of range value for column 'f' at row 3
+ALTER TABLE t1 MODIFY f SMALLINT UNSIGNED;
+affected rows: 4
+info: Records: 4 Duplicates: 0 Warnings: 0
+SELECT * FROM t1;
+f
+128
+1
+32943
+128
+ALTER TABLE t1 MODIFY f BIT;
+ERROR 22001: Data too long for column 'f' at row 1
+ALTER TABLE t1 MODIFY f BIT(15);
+ERROR 22001: Data too long for column 'f' at row 3
+DELETE FROM t1 LIMIT 3;
+ALTER TABLE t1 MODIFY f BIT(15);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY f BIT(8);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT HEX(f) FROM t1;
+HEX(f)
+80
+DROP TABLE t1;
+CREATE TABLE t1 (b BIT NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT DEFAULT CHARSET utf16;
+INSERT INTO t1 SET b=b'1';
+ALTER TABLE t1 CHANGE b c BIT NOT NULL;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SELECT HEX(c) FROM t1;
+HEX(c)
+1
+DROP TABLE t1;
+CREATE TABLE t1 (c VARCHAR(10) NOT NULL DEFAULT 'scary') ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1() VALUES();
+ALTER TABLE t1 ADD f TINYINT NOT NULL DEFAULT -42;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY f MEDIUMINT NOT NULL DEFAULT 64802,
+MODIFY c VARCHAR(20) NOT NULL DEFAULT 'gory',
+ADD d DATETIME;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+INSERT INTO t1() VALUES();
+INSERT INTO t1 (c,f,d) VALUES ('fury', -8388608, now());
+SELECT * FROM t1;
+c f d
+scary -42 NULL
+gory 64802 NULL
+fury -8388608 1970-01-01 03:00:42
+DROP TABLE t1;
+CREATE TABLE t1 (t TINYINT PRIMARY KEY, m MEDIUMINT UNIQUE) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+SELECT table_id INTO @table_id1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+INSERT INTO t1 VALUES (-42, -123456);
+ALTER TABLE t1 CHANGE t s SMALLINT;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT table_id INTO @table_id2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+affected rows: 1
+ALTER TABLE t1 CHANGE m i INT, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ALTER TABLE t1 CHANGE m i INT;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT table_id INTO @table_id3 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+affected rows: 1
+SELECT @table_id1 = @table_id2, @table_id2 = @table_id3;
+@table_id1 = @table_id2 @table_id2 = @table_id3
+0 0
+INSERT IGNORE INTO t1 VALUES (0, -123456);
+Warnings:
+Warning 1062 Duplicate entry '-123456' for key 'm'
+REPLACE INTO t1 VALUES(-42, 123456);
+INSERT IGNORE INTO t1 VALUES(32768, 2147483648);
+Warnings:
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 'i' at row 1
+SELECT * FROM t1;
+s i
+-42 123456
+32767 2147483647
+DROP TABLE t1;
+CREATE TABLE t1 (a SERIAL, b INT, c TINYINT UNIQUE) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 (c) VALUES(1),(2),(3);
+ALTER TABLE t1 MODIFY c BIGINT;
+affected rows: 3
+info: Records: 3 Duplicates: 0 Warnings: 0
+UPDATE t1 SET b=1 WHERE c=2;
+UPDATE t1 SET c=4 WHERE a=3;
+UPDATE t1 SET b=2 WHERE c>3;
+UPDATE t1 SET c=c+1;
+ERROR 23000: Duplicate entry '2' for key 'c'
+SELECT * FROM t1;
+a b c
+1 NULL 1
+2 1 2
+3 2 4
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES(1,'a');
+ALTER TABLE t1 MODIFY b VARCHAR(256), ADD COLUMN c INT;
+INSERT INTO t1 VALUES(2,'bah',3);
+SELECT * FROM t1;
+a b c
+1 a NULL
+2 bah 3
+DROP TABLE t1;
+CREATE TABLE t1(a CHAR(5) CHARACTER SET utf8 PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES('barf');
+ALTER TABLE t1 ADD b INT FIRST, ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+b a vb
+NULL barf NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b TEXT, PRIMARY KEY(b(9))) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 ADD COLUMN c TEXT FIRST;
+ALTER TABLE t1 ADD COLUMN d TEXT GENERATED ALWAYS AS (SUBSTR(b,1,499)) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1(a CHAR(5), b INT, c CHAR(1), d CHAR(1), PRIMARY KEY(a,b))
+DEFAULT CHARACTER SET utf8 ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET a='fubar',b=42;
+ALTER TABLE t1 DROP c, DROP d, ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+a b vb
+fubar 42 42
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 MODIFY b INT FIRST;
+DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
@@ -669,8 +1107,8 @@ affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
INSERT INTO t1 SET id=9;
ALTER TABLE t1 DROP c3;
-affected rows: 9
-info: Records: 9 Duplicates: 0 Warnings: 0
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -723,6 +1161,7 @@ UPDATE t2 SET c1 = repeat(id, 4000);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -733,6 +1172,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -744,6 +1184,7 @@ UPDATE t2 SET d1 = repeat(id, 200);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -754,6 +1195,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -879,6 +1321,7 @@ COMMIT;
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -902,6 +1345,7 @@ test.big 385477733
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -915,6 +1359,7 @@ test.big 1705165209
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -1023,8 +1468,439 @@ ALTER TABLE t1 MODIFY a INT DEFAULT 0;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
-DROP TABLE t1;
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY a INT DEFAULT 0;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
+DROP TABLE t1;
+SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
+CREATE TABLE t1 (a INT, b INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 (a) VALUES (NULL), (NULL);
+ALTER TABLE t1 DROP a, ADD COLUMN a INT;
+DELETE FROM t1;
+BEGIN;
+INSERT INTO t1 SET a=NULL;
+ROLLBACK;
+DELETE FROM t1;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES(347,'');
+ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT;
+SELECT * FROM t1;
+a
+347
+DROP TABLE t1;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1() VALUES();
+ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b;
+SELECT * FROM t1;
+b c a
+NULL NULL NULL
+DROP TABLE t1;
+CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+SET @t=REPEAT('x',@@innodb_page_size / 2);
+INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t);
+ALTER TABLE t1 ADD COLUMN a INT FIRST;
+UPDATE t1 SET a = 0;
+DROP TABLE t1;
+CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET t = @x;
+ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1;
+ALTER TABLE t1 ADD COLUMN t TEXT;
+SELECT * FROM t1;
+i t
+1 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+a c
+3 42
+4 42
+DROP TABLE t1;
+CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+b i v
+NULL 1 1
+DROP TABLE t1;
+CREATE TABLE t1 (ts TIMESTAMP) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+f
+NULL
+NULL
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+id f
+1 NULL
+2 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+f
+NULL
+NULL
+DROP TABLE t1;
+CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT,
+f2 CHAR(255),
+f3 BIGINT,
+f4 INT,
+f5 CHAR(255),
+f6 CHAR(255),
+f7 CHAR(255) NOT NULL,
+f8 INT,
+f9 CHAR(10)
+) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+(2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+(3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+(4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+(5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+(6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+(7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+(8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+(9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+(10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+(11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+(12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+(13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+(14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+(15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+DELETE FROM t1 WHERE pk=1;
+InnoDB 0 transactions not purged
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT, f2 CHAR(32) NOT NULL,
+f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+f7 CHAR(32), f8 CHAR(32)
+) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES
+(1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+(3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+(5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+(7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+(9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+(11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+(13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+(15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+(17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+(19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+(21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+(23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+(25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+(51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+(53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+(55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+(57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+(59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+(61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+(63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+(101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+(103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+(105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+(107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+(109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+(151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+(153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+(155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+(157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+(159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+(201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+(203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+(205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+(207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+(252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+(254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+(256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+(258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+(301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+(303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+(305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+(307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+(351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+(353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+(355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+(357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+(359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+(361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+(363,75,'',66,76,52,'','','');
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (0,0);
+ALTER TABLE t1 MODIFY a INT AFTER b;
+ALTER TABLE t1 ADD COLUMN v INT AS (a) VIRTUAL;
+ALTER TABLE t1 MODIFY b INT NOT NULL AFTER a;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1(t TEXT NOT NULL, FULLTEXT(t)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 MODIFY COLUMN t TEXT;
+DROP TABLE t1;
+CREATE TABLE t1 (f TINYINT, g SMALLINT UNSIGNED) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES(127,6502),(-128,33101);
+ALTER TABLE t1 MODIFY f SMALLINT DEFAULT 12345,
+MODIFY g BIGINT UNSIGNED DEFAULT 1234567;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+SELECT * FROM t1;
+f g
+127 6502
+-128 33101
+DROP TABLE t1;
+CREATE TABLE t1 (f BIT(8)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (b'10000000'),(b'00000001');
+ALTER TABLE t1 MODIFY f BIT(16);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+INSERT INTO t1 VALUES (b'1000000010101111'),(b'10000000');
+SELECT HEX(f) FROM t1;
+HEX(f)
+80
+1
+80AF
+80
+ALTER TABLE t1 MODIFY f SMALLINT;
+ERROR 22003: Out of range value for column 'f' at row 3
+ALTER TABLE t1 MODIFY f SMALLINT UNSIGNED;
+affected rows: 4
+info: Records: 4 Duplicates: 0 Warnings: 0
+SELECT * FROM t1;
+f
+128
+1
+32943
+128
+ALTER TABLE t1 MODIFY f BIT;
+ERROR 22001: Data too long for column 'f' at row 1
+ALTER TABLE t1 MODIFY f BIT(15);
+ERROR 22001: Data too long for column 'f' at row 3
+DELETE FROM t1 LIMIT 3;
+ALTER TABLE t1 MODIFY f BIT(15);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY f BIT(8);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT HEX(f) FROM t1;
+HEX(f)
+80
+DROP TABLE t1;
+CREATE TABLE t1 (b BIT NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT DEFAULT CHARSET utf16;
+INSERT INTO t1 SET b=b'1';
+ALTER TABLE t1 CHANGE b c BIT NOT NULL;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SELECT HEX(c) FROM t1;
+HEX(c)
+1
+DROP TABLE t1;
+CREATE TABLE t1 (c VARCHAR(10) NOT NULL DEFAULT 'scary') ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1() VALUES();
+ALTER TABLE t1 ADD f TINYINT NOT NULL DEFAULT -42;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY f MEDIUMINT NOT NULL DEFAULT 64802,
+MODIFY c VARCHAR(20) NOT NULL DEFAULT 'gory',
+ADD d DATETIME;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+INSERT INTO t1() VALUES();
+INSERT INTO t1 (c,f,d) VALUES ('fury', -8388608, now());
+SELECT * FROM t1;
+c f d
+scary -42 NULL
+gory 64802 NULL
+fury -8388608 1970-01-01 03:00:42
+DROP TABLE t1;
+CREATE TABLE t1 (t TINYINT PRIMARY KEY, m MEDIUMINT UNIQUE) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+SELECT table_id INTO @table_id1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+INSERT INTO t1 VALUES (-42, -123456);
+ALTER TABLE t1 CHANGE t s SMALLINT;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT table_id INTO @table_id2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+affected rows: 1
+ALTER TABLE t1 CHANGE m i INT, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ALTER TABLE t1 CHANGE m i INT;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT table_id INTO @table_id3 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+affected rows: 1
+SELECT @table_id1 = @table_id2, @table_id2 = @table_id3;
+@table_id1 = @table_id2 @table_id2 = @table_id3
+0 0
+INSERT IGNORE INTO t1 VALUES (0, -123456);
+Warnings:
+Warning 1062 Duplicate entry '-123456' for key 'm'
+REPLACE INTO t1 VALUES(-42, 123456);
+INSERT IGNORE INTO t1 VALUES(32768, 2147483648);
+Warnings:
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 'i' at row 1
+SELECT * FROM t1;
+s i
+-42 123456
+32767 2147483647
+DROP TABLE t1;
+CREATE TABLE t1 (a SERIAL, b INT, c TINYINT UNIQUE) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 (c) VALUES(1),(2),(3);
+ALTER TABLE t1 MODIFY c BIGINT;
+affected rows: 3
+info: Records: 3 Duplicates: 0 Warnings: 0
+UPDATE t1 SET b=1 WHERE c=2;
+UPDATE t1 SET c=4 WHERE a=3;
+UPDATE t1 SET b=2 WHERE c>3;
+UPDATE t1 SET c=c+1;
+ERROR 23000: Duplicate entry '2' for key 'c'
+SELECT * FROM t1;
+a b c
+1 NULL 1
+2 1 2
+3 2 4
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES(1,'a');
+ALTER TABLE t1 MODIFY b VARCHAR(256), ADD COLUMN c INT;
+INSERT INTO t1 VALUES(2,'bah',3);
+SELECT * FROM t1;
+a b c
+1 a NULL
+2 bah 3
+DROP TABLE t1;
+CREATE TABLE t1(a CHAR(5) CHARACTER SET utf8 PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES('barf');
+ALTER TABLE t1 ADD b INT FIRST, ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+b a vb
+NULL barf NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b TEXT, PRIMARY KEY(b(9))) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 ADD COLUMN c TEXT FIRST;
+ALTER TABLE t1 ADD COLUMN d TEXT GENERATED ALWAYS AS (SUBSTR(b,1,499)) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1(a CHAR(5), b INT, c CHAR(1), d CHAR(1), PRIMARY KEY(a,b))
+DEFAULT CHARACTER SET utf8 ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET a='fubar',b=42;
+ALTER TABLE t1 DROP c, DROP d, ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+a b vb
+fubar 42 42
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 MODIFY b INT FIRST;
+DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
@@ -1153,8 +2029,8 @@ affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
INSERT INTO t1 SET id=9;
ALTER TABLE t1 DROP c3;
-affected rows: 9
-info: Records: 9 Duplicates: 0 Warnings: 0
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1207,6 +2083,7 @@ UPDATE t2 SET c1 = repeat(id, 4000);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1217,6 +2094,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1228,6 +2106,7 @@ UPDATE t2 SET d1 = repeat(id, 200);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1238,6 +2117,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1363,6 +2243,7 @@ COMMIT;
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -1386,6 +2267,7 @@ test.big 385477733
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -1399,6 +2281,7 @@ test.big 1705165209
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -1507,13 +2390,506 @@ ALTER TABLE t1 MODIFY a INT DEFAULT 0;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
-DROP TABLE t1;
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_alter_column_allowed=never. Try ALGORITHM=INPLACE
+SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: innodb_instant_atler_column_allowed=add_last. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY a INT DEFAULT 0;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
+DROP TABLE t1;
+SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
+CREATE TABLE t1 (a INT, b INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 (a) VALUES (NULL), (NULL);
+ALTER TABLE t1 DROP a, ADD COLUMN a INT;
+DELETE FROM t1;
+BEGIN;
+INSERT INTO t1 SET a=NULL;
+ROLLBACK;
+DELETE FROM t1;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES(347,'');
+ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT;
+SELECT * FROM t1;
+a
+347
+DROP TABLE t1;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1() VALUES();
+ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b;
+SELECT * FROM t1;
+b c a
+NULL NULL NULL
+DROP TABLE t1;
+CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+SET @t=REPEAT('x',@@innodb_page_size / 2);
+INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t);
+ALTER TABLE t1 ADD COLUMN a INT FIRST;
+UPDATE t1 SET a = 0;
+DROP TABLE t1;
+CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET t = @x;
+ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1;
+ALTER TABLE t1 ADD COLUMN t TEXT;
+SELECT * FROM t1;
+i t
+1 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+a c
+3 42
+4 42
+DROP TABLE t1;
+CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+b i v
+NULL 1 1
+DROP TABLE t1;
+CREATE TABLE t1 (ts TIMESTAMP) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+f
+NULL
+NULL
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+id f
+1 NULL
+2 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+f
+NULL
+NULL
+DROP TABLE t1;
+CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT,
+f2 CHAR(255),
+f3 BIGINT,
+f4 INT,
+f5 CHAR(255),
+f6 CHAR(255),
+f7 CHAR(255) NOT NULL,
+f8 INT,
+f9 CHAR(10)
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+(2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+(3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+(4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+(5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+(6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+(7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+(8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+(9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+(10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+(11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+(12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+(13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+(14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+(15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+DELETE FROM t1 WHERE pk=1;
+InnoDB 0 transactions not purged
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT, f2 CHAR(32) NOT NULL,
+f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+f7 CHAR(32), f8 CHAR(32)
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES
+(1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+(3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+(5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+(7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+(9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+(11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+(13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+(15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+(17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+(19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+(21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+(23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+(25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+(51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+(53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+(55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+(57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+(59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+(61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+(63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+(101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+(103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+(105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+(107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+(109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+(151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+(153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+(155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+(157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+(159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+(201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+(203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+(205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+(207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+(252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+(254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+(256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+(258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+(301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+(303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+(305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+(307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+(351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+(353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+(355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+(357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+(359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+(361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+(363,75,'',66,76,52,'','','');
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (0,0);
+ALTER TABLE t1 MODIFY a INT AFTER b;
+ALTER TABLE t1 ADD COLUMN v INT AS (a) VIRTUAL;
+ALTER TABLE t1 MODIFY b INT NOT NULL AFTER a;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1(t TEXT NOT NULL, FULLTEXT(t)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 MODIFY COLUMN t TEXT;
+DROP TABLE t1;
+CREATE TABLE t1 (f TINYINT, g SMALLINT UNSIGNED) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES(127,6502),(-128,33101);
+ALTER TABLE t1 MODIFY f SMALLINT DEFAULT 12345,
+MODIFY g BIGINT UNSIGNED DEFAULT 1234567;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+SELECT * FROM t1;
+f g
+127 6502
+-128 33101
+DROP TABLE t1;
+CREATE TABLE t1 (f BIT(8)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (b'10000000'),(b'00000001');
+ALTER TABLE t1 MODIFY f BIT(16);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+INSERT INTO t1 VALUES (b'1000000010101111'),(b'10000000');
+SELECT HEX(f) FROM t1;
+HEX(f)
+80
+1
+80AF
+80
+ALTER TABLE t1 MODIFY f SMALLINT;
+ERROR 22003: Out of range value for column 'f' at row 3
+ALTER TABLE t1 MODIFY f SMALLINT UNSIGNED;
+affected rows: 4
+info: Records: 4 Duplicates: 0 Warnings: 0
+SELECT * FROM t1;
+f
+128
+1
+32943
+128
+ALTER TABLE t1 MODIFY f BIT;
+ERROR 22001: Data too long for column 'f' at row 1
+ALTER TABLE t1 MODIFY f BIT(15);
+ERROR 22001: Data too long for column 'f' at row 3
+DELETE FROM t1 LIMIT 3;
+ALTER TABLE t1 MODIFY f BIT(15);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY f BIT(8);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT HEX(f) FROM t1;
+HEX(f)
+80
+DROP TABLE t1;
+CREATE TABLE t1 (b BIT NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARSET utf16;
+INSERT INTO t1 SET b=b'1';
+ALTER TABLE t1 CHANGE b c BIT NOT NULL;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SELECT HEX(c) FROM t1;
+HEX(c)
+1
+DROP TABLE t1;
+CREATE TABLE t1 (c VARCHAR(10) NOT NULL DEFAULT 'scary') ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1() VALUES();
+ALTER TABLE t1 ADD f TINYINT NOT NULL DEFAULT -42;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 MODIFY f MEDIUMINT NOT NULL DEFAULT 64802,
+MODIFY c VARCHAR(20) NOT NULL DEFAULT 'gory',
+ADD d DATETIME;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+INSERT INTO t1() VALUES();
+INSERT INTO t1 (c,f,d) VALUES ('fury', -8388608, now());
+SELECT * FROM t1;
+c f d
+scary -42 NULL
+gory 64802 NULL
+fury -8388608 1970-01-01 03:00:42
+DROP TABLE t1;
+CREATE TABLE t1 (t TINYINT PRIMARY KEY, m MEDIUMINT UNIQUE) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+SELECT table_id INTO @table_id1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+INSERT INTO t1 VALUES (-42, -123456);
+ALTER TABLE t1 CHANGE t s SMALLINT;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT table_id INTO @table_id2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+affected rows: 1
+ALTER TABLE t1 CHANGE m i INT, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ALTER TABLE t1 CHANGE m i INT;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+SELECT table_id INTO @table_id3 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+affected rows: 1
+SELECT @table_id1 = @table_id2, @table_id2 = @table_id3;
+@table_id1 = @table_id2 @table_id2 = @table_id3
+0 0
+INSERT IGNORE INTO t1 VALUES (0, -123456);
+Warnings:
+Warning 1062 Duplicate entry '-123456' for key 'm'
+REPLACE INTO t1 VALUES(-42, 123456);
+INSERT IGNORE INTO t1 VALUES(32768, 2147483648);
+Warnings:
+Warning 1264 Out of range value for column 's' at row 1
+Warning 1264 Out of range value for column 'i' at row 1
+SELECT * FROM t1;
+s i
+-42 123456
+32767 2147483647
+DROP TABLE t1;
+CREATE TABLE t1 (a SERIAL, b INT, c TINYINT UNIQUE) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 (c) VALUES(1),(2),(3);
+ALTER TABLE t1 MODIFY c BIGINT;
+affected rows: 3
+info: Records: 3 Duplicates: 0 Warnings: 0
+UPDATE t1 SET b=1 WHERE c=2;
+UPDATE t1 SET c=4 WHERE a=3;
+UPDATE t1 SET b=2 WHERE c>3;
+UPDATE t1 SET c=c+1;
+ERROR 23000: Duplicate entry '2' for key 'c'
+SELECT * FROM t1;
+a b c
+1 NULL 1
+2 1 2
+3 2 4
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES(1,'a');
+ALTER TABLE t1 MODIFY b VARCHAR(256), ADD COLUMN c INT;
+INSERT INTO t1 VALUES(2,'bah',3);
+SELECT * FROM t1;
+a b c
+1 a NULL
+2 bah 3
+DROP TABLE t1;
+CREATE TABLE t1(a CHAR(5) CHARACTER SET utf8 PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES('barf');
+ALTER TABLE t1 ADD b INT FIRST, ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+b a vb
+NULL barf NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b TEXT, PRIMARY KEY(b(9))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 ADD COLUMN c TEXT FIRST;
+ALTER TABLE t1 ADD COLUMN d TEXT GENERATED ALWAYS AS (SUBSTR(b,1,499)) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1(a CHAR(5), b INT, c CHAR(1), d CHAR(1), PRIMARY KEY(a,b))
+DEFAULT CHARACTER SET utf8 ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET a='fubar',b=42;
+ALTER TABLE t1 DROP c, DROP d, ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+a b vb
+fubar 42 42
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 MODIFY b INT FIRST;
+DROP TABLE t1;
disconnect analyze;
+#
+# MDEV-22465: DROP COLUMN is wrongly claimed to be ALGORITHM=INSTANT
+#
+CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: DROP INDEX. Try ALGORITHM=NOCOPY
+ALTER TABLE t1 DROP b, ALGORITHM=NOCOPY;
+DROP TABLE t1;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-60
+206
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
+#
+# MDEV-18266: Changing an index comment unnecessarily rebuilds index
+#
+CREATE TABLE t1(a INT, b INT) ENGINE=INNODB;
+CREATE INDEX i1 ON t1(a) COMMENT 'comment1';
+ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2', ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ KEY `i1` (`a`) COMMENT 'comment2'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'
+# failed in dtuple_convert_big_rec
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+a CHAR(255) NOT NULL,
+b CHAR(255) NOT NULL, c INT) ENGINE=InnoDB CHARSET utf32;
+ALTER TABLE t1 DROP c;
+INSERT INTO t1(a, b) SELECT '', '' FROM seq_1_to_16;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+16
+DROP TABLE t1;
+#
+# MDEV-25630 Rollback of instant operation adds wrong
+# column to secondary index
+#
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT, f4 INT,
+PRIMARY KEY(f1, f4),
+KEY(f2))ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INT, f2 INT, PRIMARY KEY(f1),
+FOREIGN KEY fk (f2) REFERENCES t2(f1)
+)ENGINE=InnoDB;
+ALTER TABLE t1 ADD f5 INT;
+SET FOREIGN_KEY_CHECKS=0;
+ALTER TABLE t1 DROP COLUMN f3, ADD FOREIGN KEY fk (f1)
+REFERENCES x(x);
+ERROR HY000: Failed to add the foreign key constraint 'test/fk' to system tables
+ALTER TABLE t1 DROP COLUMN f5;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) DEFAULT NULL,
+ `f3` int(11) DEFAULT NULL,
+ `f4` int(11) NOT NULL,
+ PRIMARY KEY (`f1`,`f4`),
+ KEY `f2` (`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result
index 7b658df6565..2d667737a99 100644
--- a/mysql-test/suite/innodb/r/instant_alter_bugs.result
+++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result
@@ -1,3 +1,5 @@
+SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
#
# MDEV-17821 Assertion `!page_rec_is_supremum(rec)' failed
# in btr_pcur_store_position
@@ -120,7 +122,7 @@ INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES
INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES ('impact', 'b', 'h', 185, 'fj', 7, 7, 3);
ERROR 23000: Duplicate entry '7' for key 'f6'
ALTER TABLE t1 ADD COLUMN filler VARCHAR(255) DEFAULT '';
-SELECT * FROM t1 INTO OUTFILE 'load.data';
+SELECT * INTO OUTFILE 'load.data' FROM t1;
UPDATE IGNORE t1 SET pk = 0;
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
HANDLER t1 OPEN AS h;
@@ -202,3 +204,264 @@ c1 c2 c3
1 0 10
DROP TABLE t1;
# End of 10.3 tests
+create table t (
+a varchar(9),
+b int,
+c int,
+row_start bigint unsigned generated always as row start invisible,
+row_end bigint unsigned generated always as row end invisible,
+period for system_time (row_start, row_end)
+) engine=innodb row_format=compressed with system versioning;
+insert into t values (repeat('a', 9), 1, 1);
+set @@system_versioning_alter_history = keep;
+alter table t modify a varchar(10), algorithm=instant;
+alter table t change b bb int, algorithm=instant;
+alter table t modify c int without system versioning, algorithm=instant;
+set @@system_versioning_alter_history = error;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+drop table t;
+#
+# MDEV-18219 Assertion `index->n_core_null_bytes <= ...' failed
+# in rec_init_offsets after instant DROP COLUMN
+#
+CREATE TABLE t1 (a INT, b INT NOT NULL) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(0,9),(2,7),(3,1),(3,4),(8,4),(3,7),(6,1),(3,8),(1,2),(4,1),(0,8),(5,3),
+(1,3),(1,6),(2,1),(8,7),(6,0),(1,9),(9,4),(0,6),(9,3),(0,9),(9,4),(2,4),
+(2,7),(7,8),(8,2),(2,5),(6,1),(4,5),(5,3),(6,8),(4,9),(5,7),(7,5),(5,1),
+(8,8),(5,7),(3,8),(0,1),(8,4),(8,3),(9,7),(4,8),(1,1),(0,4),(2,6),(8,5),
+(8,8),(8,7),(6,7),(1,7),(9,6),(3,6),(1,9),(0,3),(5,3),(2,4),(0,6),(2,0),
+(6,5),(1,6),(2,4),(9,1),(3,0),(6,4),(1,3),(0,8),(3,5),(3,1),(8,9),(9,9),
+(7,9),(4,5),(2,2),(3,8),(0,8),(7,1),(2,0),(1,5),(7,3),(4,4),(3,9),(7,2),
+(6,2),(0,4),(2,0),(1,5),(5,7),(4,5),(3,7),(6,0),(2,1),(5,0),(1,0),(2,0),
+(8,4),(5,7),(3,5),(0,5),(7,6),(5,9),(1,2),(4,2),(8,5),(8,7),(2,8),(1,8),
+(4,3),(1,6),(7,8),(3,7),(4,6),(1,1),(3,0),(1,6),(2,0),(3,4),(4,8),(3,9),
+(8,0),(4,9),(4,0),(3,9),(6,4),(7,4),(5,8),(4,7),(7,3),(5,9),(2,3),(7,3),
+(0,4),(5,9),(9,8),(4,2),(3,6),(2,6),(1,8),(7,0),(0,0),(2,3),(1,2),(3,3),
+(2,7),(6,0),(9,0),(6,9),(4,6),(9,8),(0,7),(9,1),(9,6),(4,3),(7,7),(7,7),
+(4,1),(4,7),(7,3),(2,8),(5,8),(8,9),(3,9),(7,7),(0,8),(4,9),(3,2),(5,0),
+(1,7),(0,3),(2,9),(9,7),(7,5),(6,9),(8,5),(3,6),(1,1),(2,8),(7,9),(4,9),
+(6,6),(5,9),(5,3),(9,8),(3,3),(5,6),(0,9),(3,9),(7,9),(7,3),(5,2),(1,4),
+(4,4),(8,2),(2,2),(8,3),(9,1),(4,9),(9,8),(1,8),(1,8),(9,1),(1,1),(3,0),
+(4,6),(9,3),(3,3),(5,2),(0,1),(3,4),(3,2),(1,3),(4,4),(7,0),(4,6),(7,2),
+(4,5),(8,7),(7,8),(8,1),(3,5),(0,6),(3,5),(2,1),(4,4),(3,4),(2,1),(4,1);
+INSERT INTO t1 SELECT * FROM t1;
+ALTER TABLE t1 DROP a;
+ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL;
+DROP TABLE t1;
+#
+# MDEV-19030 Assertion index->n_core_null_bytes <= ... failed
+# in rec_init_offsets after instant DROP COLUMN
+#
+CREATE TABLE t1 (a INT, b INT NOT NULL DEFAULT 0) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES (),(),(),();
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ALTER TABLE t1 FORCE;
+INSERT INTO t1 SELECT * FROM t1;
+ALTER TABLE t1 DROP a, ADD a SMALLINT NOT NULL;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL;
+DROP TABLE t1;
+#
+# MDEV-18623 Assertion after DROP FULLTEXT INDEX and removing NOT NULL
+#
+CREATE TABLE t1 (c TEXT NOT NULL, FULLTEXT INDEX ftidx(c)) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP INDEX ftidx;
+ALTER TABLE t1 MODIFY c TEXT NULL, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ALTER TABLE t1 MODIFY c TEXT NULL;
+DROP TABLE t1;
+#
+# MDEV-20048 dtuple_get_nth_field(): Assertion 'n < tuple->n_fields'
+# failed on ROLLBACK after instant DROP COLUMN
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD b TEXT, ALGORITHM=INSTANT;
+SET @b = REPEAT('b', @@innodb_page_size / 2 + 1);
+INSERT INTO t1 VALUES(2, @b), (3, @b);
+BEGIN;
+DELETE FROM t1 WHERE a=2;
+connect purge_control,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+COMMIT;
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+connection purge_control;
+SELECT * FROM t1;
+a
+1
+2
+3
+disconnect purge_control;
+connection default;
+ROLLBACK;
+SELECT * FROM t1;
+a
+1
+3
+DROP TABLE t1;
+#
+# MDEV-20479: assertion failure in dict_table_get_nth_col() after INSTANT DROP COLUMN
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN (b INT, c INT, d INT, e INT NOT NULL DEFAULT 0);
+ALTER TABLE t1 ADD UNIQUE INDEX(e);
+ALTER TABLE t1 DROP b, DROP c, DROP d, DROP e;
+DROP TABLE t1;
+#
+# MDEV-20565 Assertion on CHANGE COLUMN...SYSTEM VERSIONING
+#
+set @@system_versioning_alter_history = keep;
+CREATE TABLE t (a INT WITHOUT SYSTEM VERSIONING, b INT) ENGINE=InnoDB
+WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN a alpha INT WITH SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+CREATE TABLE t (alpha INT, b INT) ENGINE=InnoDB WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN alpha a INT WITHOUT SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+set @@system_versioning_alter_history = error;
+#
+# MDEV-20117 Assertion 0 failed in row_sel_get_clust_rec_for_mysql
+#
+CREATE TABLE t (b INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t SET b=1;
+ALTER TABLE t ADD COLUMN a INT FIRST, ALGORITHM=INSTANT;
+DELETE FROM t;
+ALTER TABLE t ADD COLUMN c INT, ALGORITHM=INSTANT;
+ALTER TABLE t DROP COLUMN c, ALGORITHM=INSTANT;
+SELECT * FROM t;
+a b
+DROP TABLE t;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT, e INT) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+INSERT INTO t1 SET a=2;
+BEGIN;
+UPDATE t1 SET b=1;
+DELETE FROM t1;
+COMMIT;
+ALTER TABLE t1 DROP b, DROP c, DROP d, DROP e;
+InnoDB 0 transactions not purged
+SELECT * FROM t1;
+a
+DROP TABLE t1;
+#
+# MDEV-20190 Instant operation fails when add column and collation
+# change on non-indexed column
+#
+CREATE TABLE t1 (a CHAR)ENGINE=INNODB;
+ALTER TABLE t1 DEFAULT COLLATE= latin1_general_cs;
+ALTER TABLE t1 ADD COLUMN b INT NOT NULL, MODIFY a CHAR, ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(1) COLLATE latin1_general_cs DEFAULT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DEFAULT COLLATE = latin1_general_cs;
+ALTER TABLE t1 MODIFY a CHAR, ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(1) COLLATE latin1_general_cs DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs ROW_FORMAT=REDUNDANT
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR NOT NULL) CHARSET latin2 COLLATE latin2_bin
+ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DEFAULT COLLATE = latin2_general_ci;
+ALTER TABLE t1 MODIFY a CHAR, ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(1) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin2 ROW_FORMAT=REDUNDANT
+DROP TABLE t1;
+#
+# MDEV-21645 SIGSEGV in innobase_get_computed_value
+#
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, va INTEGER GENERATED ALWAYS AS (a))
+ENGINE=InnoDB;
+INSERT INTO t1 SET a=1, b=NULL;
+ALTER TABLE t1 MODIFY COLUMN b INT FIRST;
+ALTER TABLE t1 ADD UNIQUE INDEX (va);
+DROP TABLE t1;
+#
+# MDEV-22651 Assertion dict_col_get_fixed_size...
+# in dict_table_t::init_instant()
+#
+CREATE TABLE t (i INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t SET i=1;
+ALTER TABLE t ADD e CHAR(255) CHARACTER SET UTF32 FIRST, ALGORITHM=INSTANT;
+DROP TABLE t;
+#
+# MDEV-23499 Assertion c.same_type(*o) failed
+#
+CREATE TABLE t (pk SERIAL, b TEXT CHARACTER SET utf8) ENGINE=InnoDB;
+ALTER TABLE t MODIFY b TEXT CHARACTER SET utf8mb4 FIRST;
+DROP TABLE t;
+#
+# MDEV-23672 Assertion `v.v_indexes.empty()' failed in dict_table_t::instant_column
+#
+create table t1 (
+col_int integer,
+col_text text not null,
+col_int_g integer generated always as (col_int) unique,
+col_text_g text generated always as (substr(col_text,1,499)) )
+engine innodb row_format = redundant;
+insert into t1 (col_int,col_text) values (0, 'a'), (null, 'b');
+alter table t1 modify column col_text text null, algorithm = instant;
+insert into t1 (col_int,col_text) values (1, null), (null, null);
+update t1 set col_text= 'd';
+select * from t1;
+col_int col_text col_int_g col_text_g
+0 d 0 d
+NULL d NULL d
+1 d 1 d
+NULL d NULL d
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+#
+# MDEV-24072 Assertion 'ib_table.n_v_cols' failed
+# in instant_alter_column_possible()
+#
+CREATE TABLE t (a BLOB) ENGINE=InnoDB;
+INSERT INTO t VALUES ('a');
+ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a+1) VIRTUAL, ADD KEY(c);
+ERROR 22007: Truncated incorrect DOUBLE value: 'a'
+ALTER TABLE t ADD d INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+DROP TABLE t;
+#
+# MDEV-28060 Online DDL fails while checking for instant
+# alter condition
+#
+CREATE TABLE t1(f1 CHAR(10) NOT NULL)ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN(f2 INT NOT NULL, f3 INT NOT NULL,
+f4 INT NOT NULL, f5 INT NOT NULL),
+CHANGE COLUMN f1 f1 CHAR(10) DEFAULT NULL;
+DROP TABLE t1;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
+#
+# MDEV-26420 Buffer overflow on instant ADD/DROP of generated column
+#
+CREATE TABLE t1 (i int AS (0) STORED, j INT) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN i INT GENERATED ALWAYS AS (1), DROP COLUMN i;
+DROP TABLE t1;
+# End of 10.4 tests
diff --git a/mysql-test/suite/innodb/r/instant_alter_charset,redundant.rdiff b/mysql-test/suite/innodb/r/instant_alter_charset,redundant.rdiff
new file mode 100644
index 00000000000..dd4caf125af
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_charset,redundant.rdiff
@@ -0,0 +1,54 @@
+@@ -288,7 +288,6 @@
+ alter table boundary_255
+ modify a varchar(70) charset utf8mb4,
+ algorithm=instant;
+-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ drop table boundary_255;
+ create table t (
+ a char(10) collate utf8mb3_general_ci,
+@@ -306,35 +305,21 @@
+ repeat('a', 10), repeat('a', 10)
+ );
+ alter table t modify a char(10) collate utf8mb4_general_ci, algorithm=instant;
+-check table t;
+-Table Op Msg_type Msg_text
+-test.t check status OK
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ alter table t modify b char(70) collate utf8mb4_general_ci, algorithm=instant;
+-check table t;
+-Table Op Msg_type Msg_text
+-test.t check status OK
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ alter table t modify c char(100) collate utf8mb4_general_ci, algorithm=instant;
+-check table t;
+-Table Op Msg_type Msg_text
+-test.t check status OK
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ alter table t modify aa char(10) collate utf8mb4_general_ci, algorithm=instant;
+-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+-check table t;
+-Table Op Msg_type Msg_text
+-test.t check status OK
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ alter table t modify bb char(70) collate utf8mb4_general_ci, algorithm=instant;
+-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+-check table t;
+-Table Op Msg_type Msg_text
+-test.t check status OK
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ alter table t modify cc char(100) collate utf8mb4_general_ci, algorithm=instant;
+-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+-check table t;
+-Table Op Msg_type Msg_text
+-test.t check status OK
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ alter table t modify d char(10) collate utf8mb4_spanish_ci, algorithm=instant;
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ alter table t modify dd char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+-ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
++ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ select * from t;
+ a b c aa bb cc d dd
+ aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaa
+
+mysqltest: Result length mismatch
diff --git a/mysql-test/suite/innodb/r/instant_alter_charset.result b/mysql-test/suite/innodb/r/instant_alter_charset.result
new file mode 100644
index 00000000000..8fcdca6fc93
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_charset.result
@@ -0,0 +1,2228 @@
+set names utf8;
+create table no_rebuild (
+a char(150) charset utf8mb3 collate utf8mb3_general_ci
+) engine=innodb;
+create table rebuild (
+a varchar(150) charset ascii
+) engine=innodb;
+set @id = (select table_id from information_schema.innodb_sys_tables
+where name = 'test/no_rebuild');
+select name, prtype, len from information_schema.innodb_sys_columns
+where table_id = @id;
+name prtype len
+a 2162942 450
+select c.prtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+where t.name = 'test/rebuild' and c.name = 'a';
+prtype len
+720911 150
+alter table no_rebuild
+change a a char(150) charset utf8mb3 collate utf8mb3_spanish_ci,
+algorithm=inplace;
+alter table rebuild
+change a a varchar(150) charset latin1 not null default 'asdf',
+algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table rebuild
+change a a varchar(150) charset latin1 not null default 'asdf',
+algorithm=copy;
+select name, prtype, len from information_schema.innodb_sys_columns
+where table_id = @id;
+name prtype len
+a 13041918 450
+select c.prtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+where t.name = 'test/rebuild' and c.name = 'a';
+prtype len
+524559 150
+drop table no_rebuild, rebuild;
+create table supported_types (
+id int primary key auto_increment,
+a varchar(150) charset ascii,
+b text(150) charset ascii,
+c text charset ascii,
+d tinytext charset ascii,
+e mediumtext charset ascii,
+f longtext charset ascii
+) engine=innodb;
+alter table supported_types
+convert to charset ascii collate ascii_bin,
+algorithm=instant;
+drop table supported_types;
+create table various_cases (
+a char(150) charset ascii,
+b varchar(150) as (a) virtual,
+c char(150) as (a) persistent
+) engine=innodb;
+alter table various_cases
+change a a char(150) charset ascii collate ascii_bin,
+algorithm=inplace;
+alter table various_cases
+change a a varchar(222),
+algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table various_cases
+change b b varchar(150) as (a) virtual,
+algorithm=inplace;
+alter table various_cases
+change c c char(150) as (a) persistent,
+algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+alter table various_cases
+modify a char(150) charset utf8mb4,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table various_cases;
+create table all_texts (
+a tinytext charset ascii,
+b text charset ascii,
+c mediumtext charset ascii,
+d longtext charset ascii,
+footer int
+) engine=innodb;
+alter table all_texts
+convert to charset ascii collate ascii_bin,
+algorithm=instant;
+drop table all_texts;
+create table all_binaries (
+a tinyblob,
+b blob,
+c mediumblob,
+d longblob,
+e varbinary(150),
+f binary(150)
+) engine=innodb;
+alter table all_binaries modify a tinytext, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_binaries modify b text, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_binaries modify c mediumtext, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_binaries modify d longtext, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_binaries modify e varchar(150), algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_binaries modify f char(150), algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table all_binaries;
+create table all_strings (
+a tinytext,
+b text,
+c mediumtext,
+d longtext,
+e varchar(150),
+f char(150)
+) engine=innodb;
+alter table all_strings modify a tinyblob, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify b blob, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify c mediumblob, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify d longblob, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify e varbinary(150), algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify f binary(150), algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify a tinytext charset binary, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify b text charset binary, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify c mediumtext charset binary, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify d longtext charset binary, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify e varchar(150) charset binary, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table all_strings modify f char(150) charset binary, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table all_strings;
+create table key_part_change (
+a char(150) charset ascii,
+b char(150) charset ascii,
+c char(150) charset ascii,
+unique key ab (a,b)
+) engine=innodb;
+alter table key_part_change
+modify a char(150) charset utf8mb4,
+drop index ab,
+add unique key ab(a,c),
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table key_part_change;
+create table key_part_change_and_rename (
+a char(100) charset ascii,
+b char(100) charset ascii,
+unique key ab (a,b)
+) engine=innodb;
+alter table key_part_change_and_rename
+change a b char(100) charset utf8mb4,
+change b a char(100) charset utf8mb4,
+drop index ab,
+add unique key ab(a,b),
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table key_part_change_and_rename;
+create table enum_and_set (
+a enum('one', 'two') charset utf8mb3,
+b set('three', 'four') charset utf8mb3
+) engine=innodb;
+alter table enum_and_set
+modify a enum('one', 'two') charset utf8mb4,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table enum_and_set
+modify b enum('three', 'four') charset utf8mb4,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table enum_and_set;
+create table compressed (
+a varchar(255) compressed charset utf8mb3
+) engine=innodb;
+insert into compressed values ('AAA'), ('bbb'), ('CCC');
+alter table compressed
+modify a varchar(255) compressed charset utf8mb4,
+algorithm=instant;
+select * from compressed;
+a
+AAA
+bbb
+CCC
+check table compresed;
+Table Op Msg_type Msg_text
+test.compresed check Error Table 'test.compresed' doesn't exist
+test.compresed check status Operation failed
+drop table compressed;
+create table key_part_bug (
+id int primary key auto_increment,
+a varchar(150) charset utf8mb3 unique key
+) engine=innodb;
+alter table key_part_bug
+modify a varchar(150) charset utf8mb4,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table key_part_bug
+modify a varchar(150) charset utf8mb4,
+algorithm=nocopy;
+ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table key_part_bug
+drop index a,
+modify a varchar(150) charset utf8mb4,
+algorithm=nocopy;
+drop table key_part_bug;
+create table latin1_swedish_special_case (
+copy1 varchar(150) charset ascii collate ascii_general_ci,
+copy2 char(150) charset ascii collate ascii_general_ci,
+instant1 varchar(150) charset ascii collate ascii_general_ci,
+instant2 char(150) charset ascii collate ascii_general_ci
+) engine=innodb;
+select c.name, c.prtype, c.mtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+where t.name = 'test/latin1_swedish_special_case';
+name prtype mtype len
+copy1 720911 12 150
+copy2 721150 13 150
+instant1 720911 12 150
+instant2 721150 13 150
+alter table latin1_swedish_special_case
+modify copy1 varchar(150) charset latin1 collate latin1_swedish_ci,
+modify copy2 char(150) charset latin1 collate latin1_swedish_ci,
+algorithm=copy;
+alter table latin1_swedish_special_case
+modify instant1 varchar(150) charset latin1 collate latin1_swedish_ci,
+modify instant2 char(150) charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table latin1_swedish_special_case
+modify instant1 varchar(150) charset latin1 collate latin1_swedish_ci,
+modify instant2 char(150) charset latin1 collate latin1_swedish_ci,
+algorithm=copy;
+select c.name, c.prtype, c.mtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+where t.name = 'test/latin1_swedish_special_case';
+name prtype mtype len
+copy1 524303 1 150
+copy2 524542 2 150
+instant1 524303 1 150
+instant2 524542 2 150
+alter table latin1_swedish_special_case
+modify copy1 varchar(150) charset latin1 collate latin1_general_ci,
+modify copy2 char(150) charset latin1 collate latin1_general_ci,
+algorithm=copy;
+alter table latin1_swedish_special_case
+modify instant1 varchar(150) charset latin1 collate latin1_general_ci,
+modify instant2 char(150) charset latin1 collate latin1_general_ci,
+algorithm=instant;
+select c.name, c.prtype, c.mtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+where t.name = 'test/latin1_swedish_special_case';
+name prtype mtype len
+copy1 3145743 12 150
+copy2 3145982 13 150
+instant1 3145743 12 150
+instant2 3145982 13 150
+drop table latin1_swedish_special_case;
+create table regression (a varchar(100) charset utf8mb3 primary key, b int) engine=innodb;
+alter table regression convert to character set utf8mb4;
+drop table regression;
+create table boundary_255 (
+a varchar(50) charset ascii,
+b varchar(200) charset ascii,
+c varchar(300) charset ascii
+) engine=innodb;
+alter table boundary_255
+modify a varchar(50) charset utf8mb3,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table boundary_255
+modify a varchar(50) charset utf8mb3,
+algorithm=copy;
+alter table boundary_255
+modify b varchar(200) charset utf8mb3,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table boundary_255
+modify c varchar(300) charset utf8mb3,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table boundary_255;
+create table boundary_255 (
+a varchar(70) charset utf8mb3
+) engine=innodb;
+alter table boundary_255
+modify a varchar(70) charset utf8mb4,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table boundary_255;
+create table t (
+a char(10) collate utf8mb3_general_ci,
+b char(70) collate utf8mb3_general_ci,
+c char(100) collate utf8mb3_general_ci,
+aa char(10) collate utf8mb3_general_ci unique,
+bb char(70) collate utf8mb3_general_ci unique,
+cc char(100) collate utf8mb3_general_ci unique,
+d char(10) collate utf8mb3_general_ci,
+dd char(10) collate utf8mb3_general_ci unique
+) engine=innodb;
+insert into t values
+(repeat('a', 10), repeat('a', 70), repeat('a', 100),
+repeat('a', 10), repeat('a', 70), repeat('a', 100),
+repeat('a', 10), repeat('a', 10)
+);
+alter table t modify a char(10) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify b char(70) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify c char(100) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify aa char(10) collate utf8mb4_general_ci, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify bb char(70) collate utf8mb4_general_ci, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify cc char(100) collate utf8mb4_general_ci, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify d char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+alter table t modify dd char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+select * from t;
+a b c aa bb cc d dd
+aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaa
+drop table t;
+create table fully_compatible (
+id int auto_increment unique key,
+from_charset char(255),
+from_collate char(255),
+to_charset char(255),
+to_collate char(255)
+);
+insert into fully_compatible (from_charset, from_collate, to_charset, to_collate) values
+('utf8mb3', 'utf8mb3_general_ci', 'utf8mb4', 'utf8mb4_general_ci'),
+('utf8mb3', 'utf8mb3_bin', 'utf8mb4', 'utf8mb4_bin'),
+('utf8mb3', 'utf8mb3_unicode_ci', 'utf8mb4', 'utf8mb4_unicode_ci'),
+('utf8mb3', 'utf8mb3_icelandic_ci', 'utf8mb4', 'utf8mb4_icelandic_ci'),
+('utf8mb3', 'utf8mb3_latvian_ci', 'utf8mb4', 'utf8mb4_latvian_ci'),
+('utf8mb3', 'utf8mb3_romanian_ci', 'utf8mb4', 'utf8mb4_romanian_ci'),
+('utf8mb3', 'utf8mb3_slovenian_ci', 'utf8mb4', 'utf8mb4_slovenian_ci'),
+('utf8mb3', 'utf8mb3_polish_ci', 'utf8mb4', 'utf8mb4_polish_ci'),
+('utf8mb3', 'utf8mb3_estonian_ci', 'utf8mb4', 'utf8mb4_estonian_ci'),
+('utf8mb3', 'utf8mb3_spanish_ci', 'utf8mb4', 'utf8mb4_spanish_ci'),
+('utf8mb3', 'utf8mb3_swedish_ci', 'utf8mb4', 'utf8mb4_swedish_ci'),
+('utf8mb3', 'utf8mb3_turkish_ci', 'utf8mb4', 'utf8mb4_turkish_ci'),
+('utf8mb3', 'utf8mb3_czech_ci', 'utf8mb4', 'utf8mb4_czech_ci'),
+('utf8mb3', 'utf8mb3_danish_ci', 'utf8mb4', 'utf8mb4_danish_ci'),
+('utf8mb3', 'utf8mb3_lithuanian_ci', 'utf8mb4', 'utf8mb4_lithuanian_ci'),
+('utf8mb3', 'utf8mb3_slovak_ci', 'utf8mb4', 'utf8mb4_slovak_ci'),
+('utf8mb3', 'utf8mb3_spanish2_ci', 'utf8mb4', 'utf8mb4_spanish2_ci'),
+('utf8mb3', 'utf8mb3_roman_ci', 'utf8mb4', 'utf8mb4_roman_ci'),
+('utf8mb3', 'utf8mb3_persian_ci', 'utf8mb4', 'utf8mb4_persian_ci'),
+('utf8mb3', 'utf8mb3_esperanto_ci', 'utf8mb4', 'utf8mb4_esperanto_ci'),
+('utf8mb3', 'utf8mb3_hungarian_ci', 'utf8mb4', 'utf8mb4_hungarian_ci'),
+('utf8mb3', 'utf8mb3_sinhala_ci', 'utf8mb4', 'utf8mb4_sinhala_ci'),
+('utf8mb3', 'utf8mb3_german2_ci', 'utf8mb4', 'utf8mb4_german2_ci'),
+('utf8mb3', 'utf8mb3_croatian_mysql561_ci', 'utf8mb4', 'utf8mb4_croatian_mysql561_ci'),
+('utf8mb3', 'utf8mb3_unicode_520_ci', 'utf8mb4', 'utf8mb4_unicode_520_ci'),
+('utf8mb3', 'utf8mb3_vietnamese_ci', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+('utf8mb3', 'utf8mb3_croatian_ci', 'utf8mb4', 'utf8mb4_croatian_ci'),
+('utf8mb3', 'utf8mb3_myanmar_ci', 'utf8mb4', 'utf8mb4_myanmar_ci'),
+('utf8mb3', 'utf8mb3_thai_520_w2', 'utf8mb4', 'utf8mb4_thai_520_w2'),
+('utf8mb3', 'utf8mb3_general_nopad_ci', 'utf8mb4', 'utf8mb4_general_nopad_ci'),
+('utf8mb3', 'utf8mb3_nopad_bin', 'utf8mb4', 'utf8mb4_nopad_bin'),
+('utf8mb3', 'utf8mb3_unicode_nopad_ci', 'utf8mb4', 'utf8mb4_unicode_nopad_ci'),
+('utf8mb3', 'utf8mb3_unicode_520_nopad_ci', 'utf8mb4', 'utf8mb4_unicode_520_nopad_ci')
+;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_general_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_general_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_general_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_general_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_bin,
+b varchar(50) charset utf8mb3 collate utf8mb3_bin primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_bin,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_bin,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_unicode_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_unicode_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_unicode_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_icelandic_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_icelandic_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_icelandic_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_icelandic_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_icelandic_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_latvian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_latvian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_latvian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_latvian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_latvian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_romanian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_romanian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_romanian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_romanian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_romanian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_slovenian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_slovenian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_slovenian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_slovenian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_slovenian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_polish_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_polish_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_polish_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_polish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_polish_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_estonian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_estonian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_estonian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_estonian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_estonian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_spanish_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_spanish_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_spanish_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_spanish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_spanish_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_swedish_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_swedish_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_swedish_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_swedish_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_turkish_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_turkish_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_turkish_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_turkish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_turkish_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_czech_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_czech_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_czech_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_czech_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_czech_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_danish_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_danish_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_danish_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_lithuanian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_lithuanian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_lithuanian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_lithuanian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_lithuanian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_slovak_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_slovak_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_slovak_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_slovak_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_slovak_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_spanish2_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_spanish2_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_spanish2_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_spanish2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_spanish2_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_roman_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_roman_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_roman_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_roman_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_roman_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_persian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_persian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_persian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_persian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_persian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_esperanto_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_esperanto_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_esperanto_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_esperanto_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_esperanto_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_hungarian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_hungarian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_hungarian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_hungarian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_hungarian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_sinhala_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_sinhala_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_sinhala_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_sinhala_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_sinhala_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_german2_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_german2_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_german2_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_german2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_german2_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_croatian_mysql561_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_croatian_mysql561_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_croatian_mysql561_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_croatian_mysql561_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_croatian_mysql561_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_unicode_520_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_unicode_520_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_520_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_unicode_520_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_520_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_vietnamese_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_vietnamese_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_croatian_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_croatian_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_croatian_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_croatian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_croatian_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_myanmar_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_myanmar_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_myanmar_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_myanmar_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_myanmar_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_thai_520_w2,
+b varchar(50) charset utf8mb3 collate utf8mb3_thai_520_w2 primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_thai_520_w2,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_thai_520_w2,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_thai_520_w2,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_general_nopad_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_general_nopad_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_general_nopad_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_general_nopad_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_general_nopad_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_nopad_bin,
+b varchar(50) charset utf8mb3 collate utf8mb3_nopad_bin primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_nopad_bin,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_nopad_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_nopad_bin,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_unicode_nopad_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_unicode_nopad_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_nopad_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_unicode_nopad_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_nopad_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_unicode_520_nopad_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_unicode_520_nopad_ci primary key
+) engine=innodb;
+insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_520_nopad_ci,
+modify b varchar(50) charset utf8mb4 collate utf8mb4_unicode_520_nopad_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_unicode_520_nopad_ci,
+algorithm=instant;
+check table tmp;
+Table Op Msg_type Msg_text
+test.tmp check status OK
+drop table tmp;
+drop table fully_compatible;
+create table compatible_without_index (
+id int auto_increment unique key,
+from_charset char(255),
+from_collate char(255),
+to_charset char(255),
+to_collate char(255)
+);
+insert into compatible_without_index (from_charset, from_collate, to_charset, to_collate) values
+('utf8mb3', 'utf8mb3_general_ci', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+('utf8mb3', 'utf8mb3_bin', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+('utf8mb3', 'utf8mb3_general_nopad_ci', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+('utf8mb3', 'utf8mb3_nopad_bin', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+('ascii', 'ascii_general_ci', 'ascii', 'ascii_bin'),
+('utf8mb3', 'utf8mb3_roman_ci', 'utf8mb3', 'utf8mb3_lithuanian_ci'),
+('utf8mb4', 'utf8mb4_thai_520_w2', 'utf8mb4', 'utf8mb4_persian_ci'),
+('utf8mb3', 'utf8mb3_myanmar_ci', 'utf8mb4', 'utf8mb4_german2_ci'),
+('utf8mb3', 'utf8mb3_general_ci', 'utf8mb3', 'utf8mb3_unicode_ci'),
+('latin1', 'latin1_general_cs', 'latin1', 'latin1_general_ci'),
+('utf16', 'utf16_general_ci', 'utf16', 'utf16_german2_ci')
+;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_general_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_general_ci unique key,
+c varchar(50) charset utf8mb3 collate utf8mb3_general_ci primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_bin,
+b varchar(50) charset utf8mb3 collate utf8mb3_bin unique key,
+c varchar(50) charset utf8mb3 collate utf8mb3_bin primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_general_nopad_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_general_nopad_ci unique key,
+c varchar(50) charset utf8mb3 collate utf8mb3_general_nopad_ci primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_nopad_bin,
+b varchar(50) charset utf8mb3 collate utf8mb3_nopad_bin unique key,
+c varchar(50) charset utf8mb3 collate utf8mb3_nopad_bin primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb4 collate utf8mb4_vietnamese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset ascii collate ascii_general_ci,
+b varchar(50) charset ascii collate ascii_general_ci unique key,
+c varchar(50) charset ascii collate ascii_general_ci primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset ascii collate ascii_bin,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset ascii collate ascii_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset ascii collate ascii_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_roman_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_roman_ci unique key,
+c varchar(50) charset utf8mb3 collate utf8mb3_roman_ci primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb3 collate utf8mb3_lithuanian_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb3 collate utf8mb3_lithuanian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb3 collate utf8mb3_lithuanian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb4 collate utf8mb4_thai_520_w2,
+b varchar(50) charset utf8mb4 collate utf8mb4_thai_520_w2 unique key,
+c varchar(50) charset utf8mb4 collate utf8mb4_thai_520_w2 primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_persian_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb4 collate utf8mb4_persian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb4 collate utf8mb4_persian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_myanmar_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_myanmar_ci unique key,
+c varchar(50) charset utf8mb3 collate utf8mb3_myanmar_ci primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb4 collate utf8mb4_german2_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb4 collate utf8mb4_german2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb4 collate utf8mb4_german2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf8mb3 collate utf8mb3_general_ci,
+b varchar(50) charset utf8mb3 collate utf8mb3_general_ci unique key,
+c varchar(50) charset utf8mb3 collate utf8mb3_general_ci primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf8mb3 collate utf8mb3_unicode_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf8mb3 collate utf8mb3_unicode_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf8mb3 collate utf8mb3_unicode_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset latin1 collate latin1_general_cs,
+b varchar(50) charset latin1 collate latin1_general_cs unique key,
+c varchar(50) charset latin1 collate latin1_general_cs primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset latin1 collate latin1_general_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset latin1 collate latin1_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset latin1 collate latin1_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(50) charset utf16 collate utf16_general_ci,
+b varchar(50) charset utf16 collate utf16_general_ci unique key,
+c varchar(50) charset utf16 collate utf16_general_ci primary key
+) engine=innodb;
+alter table tmp
+change a a varchar(50) charset utf16 collate utf16_german2_ci,
+algorithm=instant;
+alter table tmp
+modify b varchar(50) charset utf16 collate utf16_german2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table tmp
+modify c varchar(50) charset utf16 collate utf16_german2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+drop table compatible_without_index;
+create table fully_incompatible (
+id int auto_increment unique key,
+from_charset char(255),
+from_collate char(255),
+to_charset char(255),
+to_collate char(255)
+);
+insert into fully_incompatible (from_charset, from_collate, to_charset, to_collate) values
+('ascii', 'ascii_general_ci', 'utf8mb3', 'utf8mb3_general_ci'),
+('ascii', 'ascii_general_ci', 'utf8mb4', 'utf8mb4_general_ci'),
+('ascii', 'ascii_general_ci', 'latin1', 'latin1_general_ci'),
+('ascii', 'ascii_bin', 'latin1', 'latin1_bin'),
+('ascii', 'ascii_nopad_bin', 'latin1', 'latin1_nopad_bin'),
+('ascii', 'ascii_general_ci', 'latin2', 'latin2_general_ci'),
+('ascii', 'ascii_general_ci', 'latin7', 'latin7_general_ci'),
+('ascii', 'ascii_bin', 'koi8u', 'koi8u_bin'),
+('ascii', 'ascii_bin', 'ujis', 'ujis_bin'),
+('ascii', 'ascii_bin', 'big5', 'big5_bin'),
+('ascii', 'ascii_bin', 'gbk', 'gbk_bin'),
+('ascii', 'ascii_general_ci', 'utf8mb3', 'utf8mb3_swedish_ci'),
+('ascii', 'ascii_bin', 'latin1', 'latin1_swedish_ci'),
+('ascii', 'ascii_general_nopad_ci', 'latin1', 'latin1_swedish_ci'),
+('ascii', 'ascii_nopad_bin', 'latin1', 'latin1_swedish_ci'),
+('ascii', 'ascii_general_ci', 'koi8u', 'koi8u_bin'),
+('ascii', 'ascii_general_nopad_ci', 'koi8u', 'koi8u_bin'),
+('ascii', 'ascii_nopad_bin', 'koi8u', 'koi8u_bin'),
+('ascii', 'ascii_general_ci', 'latin1', 'latin1_swedish_ci'),
+('ascii', 'ascii_bin', 'utf8mb3', 'utf8mb3_swedish_ci'),
+('ascii', 'ascii_general_nopad_ci', 'utf8mb3', 'utf8mb3_swedish_ci'),
+('ascii', 'ascii_nopad_bin', 'utf8mb3', 'utf8mb3_swedish_ci'),
+('ascii', 'ascii_general_ci', 'utf8mb4', 'utf8mb4_danish_ci'),
+('ascii', 'ascii_bin', 'utf8mb4', 'utf8mb4_danish_ci'),
+('ascii', 'ascii_general_nopad_ci', 'utf8mb4', 'utf8mb4_danish_ci'),
+('ascii', 'ascii_nopad_bin', 'utf8mb4', 'utf8mb4_danish_ci'),
+('ascii', 'ascii_general_ci', 'gbk', 'gbk_chinese_ci'),
+('ascii', 'ascii_general_ci', 'gbk', 'gbk_chinese_nopad_ci'),
+('ascii', 'ascii_general_ci', 'ujis', 'ujis_japanese_ci'),
+('ascii', 'ascii_general_ci', 'big5', 'big5_chinese_ci'),
+('ascii', 'ascii_general_ci', 'latin2', 'latin2_croatian_ci'),
+('ascii', 'ascii_general_ci', 'latin7', 'latin7_estonian_cs'),
+('ucs2', 'ucs2_general_ci', 'utf16', 'utf16_general_ci'),
+('ucs2', 'ucs2_unicode_ci', 'utf16', 'utf16_unicode_ci'),
+('ucs2', 'ucs2_icelandic_ci', 'utf16', 'utf16_icelandic_ci'),
+('ucs2', 'ucs2_latvian_ci', 'utf16', 'utf16_latvian_ci'),
+('ucs2', 'ucs2_romanian_ci', 'utf16', 'utf16_romanian_ci'),
+('ucs2', 'ucs2_slovenian_ci', 'utf16', 'utf16_slovenian_ci'),
+('ucs2', 'ucs2_polish_ci', 'utf16', 'utf16_polish_ci'),
+('ucs2', 'ucs2_estonian_ci', 'utf16', 'utf16_estonian_ci'),
+('ucs2', 'ucs2_spanish_ci', 'utf16', 'utf16_spanish_ci'),
+('ucs2', 'ucs2_general_ci', 'utf16', 'utf16_general_ci'),
+('ucs2', 'ucs2_myanmar_ci', 'utf16', 'utf16_thai_520_w2'),
+('ucs2', 'ucs2_general_ci', 'utf16', 'utf16_unicode_nopad_ci'),
+('ucs2', 'ucs2_general_mysql500_ci', 'utf16', 'utf16_spanish2_ci'),
+('utf8mb4', 'utf8mb4_general_ci', 'utf8mb3', 'utf8mb3_general_ci'),
+('utf8mb4', 'utf8mb4_general_ci', 'ascii', 'ascii_general_ci'),
+('utf8mb3', 'utf8mb3_general_ci', 'ascii', 'ascii_general_ci'),
+('utf8mb3', 'utf8mb3_general_ci', 'latin1', 'latin1_general_ci'),
+('utf16', 'utf16_general_ci', 'utf32', 'utf32_general_ci'),
+('latin1', 'latin1_general_ci', 'ascii', 'ascii_general_ci'),
+('ascii', 'ascii_general_ci', 'swe7', 'swe7_swedish_ci'),
+('eucjpms', 'eucjpms_japanese_nopad_ci', 'geostd8', 'geostd8_general_ci'),
+('latin1', 'latin1_general_ci', 'utf16', 'utf16_general_ci')
+;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb3 collate utf8mb3_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb3 collate utf8mb3_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb4 collate utf8mb4_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb4 collate utf8mb4_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_nopad_bin,
+b text(150) charset ascii collate ascii_nopad_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_nopad_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_nopad_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin2 collate latin2_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin2 collate latin2_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin7 collate latin7_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin7 collate latin7_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset ujis collate ujis_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset ujis collate ujis_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset big5 collate big5_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset big5 collate big5_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset gbk collate gbk_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset gbk collate gbk_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_nopad_ci,
+b text(150) charset ascii collate ascii_general_nopad_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_nopad_bin,
+b text(150) charset ascii collate ascii_nopad_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_nopad_ci,
+b text(150) charset ascii collate ascii_general_nopad_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_nopad_bin,
+b text(150) charset ascii collate ascii_nopad_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset koi8u collate koi8u_bin,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_nopad_ci,
+b text(150) charset ascii collate ascii_general_nopad_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_nopad_bin,
+b text(150) charset ascii collate ascii_nopad_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb3 collate utf8mb3_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_bin,
+b text(150) charset ascii collate ascii_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_nopad_ci,
+b text(150) charset ascii collate ascii_general_nopad_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_nopad_bin,
+b text(150) charset ascii collate ascii_nopad_bin,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb4 collate utf8mb4_danish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset gbk collate gbk_chinese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset gbk collate gbk_chinese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset gbk collate gbk_chinese_nopad_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset gbk collate gbk_chinese_nopad_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset ujis collate ujis_japanese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset ujis collate ujis_japanese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset big5 collate big5_chinese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset big5 collate big5_chinese_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin2 collate latin2_croatian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin2 collate latin2_croatian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin7 collate latin7_estonian_cs,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin7 collate latin7_estonian_cs,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_general_ci,
+b text(150) charset ucs2 collate ucs2_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_unicode_ci,
+b text(150) charset ucs2 collate ucs2_unicode_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_unicode_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_unicode_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_icelandic_ci,
+b text(150) charset ucs2 collate ucs2_icelandic_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_icelandic_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_icelandic_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_latvian_ci,
+b text(150) charset ucs2 collate ucs2_latvian_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_latvian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_latvian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_romanian_ci,
+b text(150) charset ucs2 collate ucs2_romanian_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_romanian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_romanian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_slovenian_ci,
+b text(150) charset ucs2 collate ucs2_slovenian_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_slovenian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_slovenian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_polish_ci,
+b text(150) charset ucs2 collate ucs2_polish_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_polish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_polish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_estonian_ci,
+b text(150) charset ucs2 collate ucs2_estonian_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_estonian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_estonian_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_spanish_ci,
+b text(150) charset ucs2 collate ucs2_spanish_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_spanish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_spanish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_general_ci,
+b text(150) charset ucs2 collate ucs2_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_myanmar_ci,
+b text(150) charset ucs2 collate ucs2_myanmar_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_thai_520_w2,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_thai_520_w2,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_general_ci,
+b text(150) charset ucs2 collate ucs2_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_unicode_nopad_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_unicode_nopad_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ucs2 collate ucs2_general_mysql500_ci,
+b text(150) charset ucs2 collate ucs2_general_mysql500_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_spanish2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_spanish2_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset utf8mb4 collate utf8mb4_general_ci,
+b text(150) charset utf8mb4 collate utf8mb4_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf8mb3 collate utf8mb3_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf8mb3 collate utf8mb3_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset utf8mb4 collate utf8mb4_general_ci,
+b text(150) charset utf8mb4 collate utf8mb4_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset ascii collate ascii_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset ascii collate ascii_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset utf8mb3 collate utf8mb3_general_ci,
+b text(150) charset utf8mb3 collate utf8mb3_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset ascii collate ascii_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset ascii collate ascii_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset utf8mb3 collate utf8mb3_general_ci,
+b text(150) charset utf8mb3 collate utf8mb3_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset latin1 collate latin1_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset latin1 collate latin1_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset utf16 collate utf16_general_ci,
+b text(150) charset utf16 collate utf16_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf32 collate utf32_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf32 collate utf32_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset latin1 collate latin1_general_ci,
+b text(150) charset latin1 collate latin1_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset ascii collate ascii_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset ascii collate ascii_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset ascii collate ascii_general_ci,
+b text(150) charset ascii collate ascii_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset swe7 collate swe7_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset swe7 collate swe7_swedish_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset eucjpms collate eucjpms_japanese_nopad_ci,
+b text(150) charset eucjpms collate eucjpms_japanese_nopad_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset geostd8 collate geostd8_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset geostd8 collate geostd8_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+create table tmp (
+a varchar(150) charset latin1 collate latin1_general_ci,
+b text(150) charset latin1 collate latin1_general_ci,
+unique key b_idx (b(150))
+) engine=innodb;
+alter table tmp
+change a a varchar(150) charset utf16 collate utf16_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table tmp
+modify b text charset utf16 collate utf16_general_ci,
+algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+drop table tmp;
+drop table fully_incompatible;
+#
+# MDEV-19284 INSTANT ALTER with ucs2-to-utf16 conversion produces bad data
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ucs2, PRIMARY KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('a'),(0xD800);
+ALTER TABLE t1 ALGORITHM=COPY, MODIFY a VARCHAR(10) CHARACTER SET utf16;
+ERROR 22007: Incorrect string value: '\xD8\x00' for column `test`.`t1`.`a` at row 2
+ALTER TABLE t1 ALGORITHM=INSTANT, MODIFY a VARCHAR(10) CHARACTER SET utf16;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET utf16;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 1
+Warnings:
+Warning 1366 Incorrect string value: '\xD8\x00' for column `test`.`t1`.`a` at row 2
+SELECT HEX(a) FROM t1;
+HEX(a)
+003F
+0061
+DROP TABLE t1;
+#
+# MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces currupt data
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii COLLATE ascii_general_ci, PRIMARY KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('a'),(0xC0),('b');
+ALTER TABLE t1 ALGORITHM=COPY, MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_general_ci;
+ERROR 22007: Incorrect string value: '\xC0' for column `test`.`t1`.`a` at row 3
+ALTER TABLE t1 ALGORITHM=INSTANT, MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_general_ci;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_general_ci;
+affected rows: 3
+info: Records: 3 Duplicates: 0 Warnings: 1
+Warnings:
+Warning 1366 Incorrect string value: '\xC0' for column `test`.`t1`.`a` at row 3
+SELECT HEX(a) FROM t1;
+HEX(a)
+3F
+61
+62
+DROP TABLE t1;
+#
+# MDEV-19524 Server crashes in Bitmap<64u>::is_clear_all / Field_longstr::csinfo_change_allows_instant_alter
+#
+CREATE TABLE t1 (a VARCHAR(1), UNIQUE(a)) ENGINE=InnoDB;
+ALTER TABLE t1 MODIFY a INT, ADD b INT, ADD UNIQUE (b), ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+DROP TABLE t1;
+#
+# MDEV-17301 Change of COLLATE unnecessarily requires ALGORITHM=COPY
+#
+create table t (
+a char(10) collate latin1_general_ci primary key,
+b char(10) collate latin1_general_ci,
+c char(10) collate latin1_general_ci,
+unique key b_key(b)
+) engine=innodb;
+insert into t values
+('aaa', 'aaa', 'aaa'), ('ccc', 'ccc', 'ccc'), ('bbb', 'bbb', 'bbb');
+alter table t modify a char(10) collate latin1_general_cs, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table t modify b char(10) collate latin1_general_cs, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table t modify b char(10) collate latin1_general_cs, algorithm=nocopy;
+ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table t modify b char(10) collate latin1_general_cs,
+drop index b_key, algorithm=nocopy;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify c char(10) collate latin1_general_cs, algorithm=instant;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+drop table t;
+create table t (
+a varchar(10) collate latin1_general_ci primary key,
+b varchar(10) collate latin1_general_ci,
+c varchar(10) collate latin1_general_ci,
+unique key b_key(b)
+) engine=innodb;
+insert into t values
+('aaa', 'aaa', 'aaa'), ('ccc', 'ccc', 'ccc'), ('bbb', 'bbb', 'bbb');
+alter table t modify a varchar(10) collate latin1_general_cs, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
+alter table t modify b varchar(10) collate latin1_general_cs, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table t modify b varchar(10) collate latin1_general_cs, algorithm=nocopy;
+ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY
+alter table t modify b varchar(10) collate latin1_general_cs,
+drop index b_key, algorithm=nocopy;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+alter table t modify c varchar(10) collate latin1_general_cs, algorithm=instant;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+drop table t;
+#
+# MDEV-20726: InnoDB: Assertion failure in file data0type.cc line 67
+#
+CREATE TABLE t (
+id int(10) unsigned NOT NULL PRIMARY KEY,
+a text CHARSET utf8mb3,
+KEY a_idx(a(1))
+) ENGINE=InnoDB;
+INSERT INTO t VALUES (1, 'something in the air');
+ALTER TABLE t MODIFY a text CHARSET utf8mb4;
+DROP TABLE t;
+#
+# MDEV-22899: Assertion `field->col->is_binary() || field->prefix_len % field->col->mbmaxlen == 0' failed in dict_index_add_to_cache
+#
+CREATE TABLE t1 (
+a text CHARACTER SET utf8 DEFAULT NULL,
+KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (
+a text CHARACTER SET utf8 DEFAULT NULL,
+b int,
+KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (
+a char(200) CHARACTER SET utf8 DEFAULT NULL,
+KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (
+a char(200) CHARACTER SET utf8 DEFAULT NULL,
+b int,
+KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (
+a varchar(200) CHARACTER SET utf8 DEFAULT NULL,
+KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (
+a varchar(200) CHARACTER SET utf8 DEFAULT NULL,
+b int,
+KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (
+a varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
+KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (
+a varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
+b int,
+KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+#
+# MDEV-23245 Still getting assertion failure in file data0type.cc line 67
+#
+CREATE TABLE Foo
+(
+Bar char(2) CHARACTER SET utf8,
+KEY Bar (Bar(1))
+) ENGINE = InnoDB;
+ALTER TABLE Foo MODIFY Bar char(2) CHARACTER SET utf8mb4;
+INSERT INTO Foo VALUES ('a');
+DROP TABLE Foo;
+CREATE TABLE Foo
+(
+Bar varchar(2) CHARACTER SET utf8,
+KEY Bar (Bar(1))
+) ENGINE = InnoDB;
+ALTER TABLE Foo MODIFY Bar varchar(2) CHARACTER SET utf8mb4;
+INSERT INTO Foo VALUES ('a');
+DROP TABLE Foo;
+CREATE TABLE Foo
+(
+Bar text CHARACTER SET utf8,
+KEY Bar (Bar(1))
+) ENGINE = InnoDB;
+ALTER TABLE Foo MODIFY Bar text CHARACTER SET utf8mb4;
+INSERT INTO Foo VALUES ('a');
+DROP TABLE Foo;
+CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
+PRIMARY KEY (a(1)))
+ENGINE=InnoDB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ PRIMARY KEY (`a`(1))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t1 MODIFY a VARCHAR(2)
+CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ('a');
+DROP TABLE t1;
+#
+# MDEV-22775 [HY000][1553] Changing name of primary key column with foreign key constraint fails.
+#
+create table t1 (id int primary key) engine=innodb default charset=utf8;
+create table t2 (input_id int primary key, id int not null,
+key a (id),
+constraint a foreign key (id) references t1 (id)
+)engine=innodb default charset=utf8;
+alter table t1 change id id2 int;
+drop table t2;
+drop table t1;
+#
+# MDEV-25951 MariaDB crash after ALTER TABLE convert to utf8mb4
+#
+CREATE TABLE t1 (id INT PRIMARY KEY, a VARCHAR(32), KEY (a(7))) ENGINE=INNODB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES (1, 'a1'), (2, 'a1');
+ALTER TABLE t1
+CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci,
+ADD UNIQUE INDEX test_key (a);
+ERROR 23000: Duplicate entry 'a1' for key 'test_key'
+ALTER TABLE t1 CONVERT TO CHARACTER SET UTF8MB4 COLLATE UTF8MB4_UNICODE_520_CI;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+SELECT * FROM t1;
+id a
+1 a1
+2 a1
+DROP TABLE t1;
+CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(32), KEY (a(7))) ENGINE=INNODB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES (1, 'a1'), (2, 'a1');
+ALTER TABLE t1
+CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci,
+ADD UNIQUE INDEX test_key (a);
+ERROR 23000: Duplicate entry 'a1' for key 'test_key'
+ALTER TABLE t1 CONVERT TO CHARACTER SET UTF8MB4 COLLATE UTF8MB4_UNICODE_520_CI;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+SELECT * FROM t1;
+id a
+1 a1
+2 a1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_crash.result b/mysql-test/suite/innodb/r/instant_alter_crash.result
index f2a06882c3c..a2c388fa103 100644
--- a/mysql-test/suite/innodb/r/instant_alter_crash.result
+++ b/mysql-test/suite/innodb/r/instant_alter_crash.result
@@ -19,6 +19,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT;
# Kill the server
disconnect ddl;
+# restart
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1;
id c2
@@ -31,27 +32,60 @@ BEGIN;
DELETE FROM t1;
ROLLBACK;
InnoDB 0 transactions not purged
-INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum');
+INSERT INTO t2 VALUES
+(16,1551,'Omnium enim rerum'),(128,1571,' principia parva sunt');
connect ddl, localhost, root;
SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
-ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum');
+ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere';
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
SET debug_dbug='+d,dict_sys_mutex_avoid';
-DELETE FROM t1;
+UPDATE t1 SET c2=c2+1;
# Kill the server
disconnect ddl;
+# restart
+SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
-FOUND 2 /\[Note\] InnoDB: Rolled back recovered transaction / in mysqld.1.err
SELECT * FROM t1;
id c2
+0 3
SELECT * FROM t2;
id c2 c3
2 1 De finibus bonorum
3 4 accusantium doloremque laudantium
-64 42 De finibus bonorum
-347 33101 et malorum
+16 1551 Omnium enim rerum
+128 1571 principia parva sunt
+BEGIN;
+INSERT INTO t1 SET id=1;
+DELETE FROM t2;
+ROLLBACK;
+InnoDB 0 transactions not purged
+INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum');
+connect ddl, localhost, root;
+ALTER TABLE t2 DROP COLUMN c3;
+SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
+ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum');
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR ddl';
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+SET debug_dbug='+d,dict_sys_mutex_avoid';
+DELETE FROM t1;
+# Kill the server
+disconnect ddl;
+# restart
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+FOUND 3 /\[Note\] InnoDB: Rolled back recovered transaction / in mysqld.1.err
+SELECT * FROM t1;
+id c2
+SELECT * FROM t2;
+id c2
+2 1
+3 4
+64 42
+16 1551
+128 1571
+347 33101
BEGIN;
INSERT INTO t1 SET id=1;
DELETE FROM t2;
@@ -63,32 +97,43 @@ N_RECS=0; LEVEL=0
header=0x010000030074 (id=0x696e66696d756d00)
header=0x010008030000 (id=0x73757072656d756d00)
t2 clustered index root page(type 18):
-N_RECS=5; LEVEL=0
-header=0x010000030088 (id=0x696e66696d756d00)
-header=0x1000100b00b9 (id=0x80000000,
+N_RECS=7; LEVEL=0
+header=0x01000003008f (id=0x0000000000000000)
+header=0x3000100c00d4 (id=0x80000000,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
+ BLOB=0x000000260000000000000008,
c2=NULL(4 bytes),
c3=0x44652066696e6962757320626f6e6f72756d)
-header=0x0000180900d9 (id=0x80000002,
+header=0x0000180900f4 (id=0x80000002,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x80000001)
-header=0x0000200b0119 (id=0x80000003,
+header=0x0000200b0135 (id=0x80000003,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x80000004,
c3=0x6163637573616e7469756d20646f6c6f72656d717565206c617564616e7469756d)
-header=0x000028090139 (id=0x80000040,
+header=0x0000280b0165 (id=0x80000010,
+ DB_TRX_ID=0x000000000000,
+ DB_ROLL_PTR=0x80000000000000,
+ c2=0x8000060f,
+ c3=0x4f6d6e69756d20656e696d20726572756d)
+header=0x000030090185 (id=0x80000040,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x8000002a)
-header=0x0000300b0074 (id=0x8000015b,
+header=0x0000380b01ba (id=0x80000080,
+ DB_TRX_ID=0x000000000000,
+ DB_ROLL_PTR=0x80000000000000,
+ c2=0x80000623,
+ c3=0x207072696e63697069612070617276612073756e74)
+header=0x0000400b0074 (id=0x8000015b,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x8000814d,
c3=0x206574206d616c6f72756d)
-header=0x060008030000 (id=0x73757072656d756d00)
+header=0x080008030000 (id=0x000000000000000100)
UNLOCK TABLES;
DELETE FROM t2;
InnoDB 0 transactions not purged
@@ -108,6 +153,7 @@ SET debug_dbug='+d,dict_sys_mutex_avoid';
INSERT INTO t1 VALUES(0,0);
# Kill the server
disconnect ddl;
+# restart
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -121,7 +167,6 @@ Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL,
`c2` int(11) DEFAULT NULL,
- `c3` text NOT NULL DEFAULT 'De finibus bonorum',
PRIMARY KEY (`id`),
UNIQUE KEY `c2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff b/mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff
new file mode 100644
index 00000000000..379514edad9
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff
@@ -0,0 +1,6 @@
+@@ -470,4 +470,4 @@
+ FROM information_schema.global_status
+ WHERE variable_name = 'innodb_instant_alter_column';
+ instants
+-33
++32
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result
index a189479d772..5b9cee57389 100644
--- a/mysql-test/suite/innodb/r/instant_alter_debug.result
+++ b/mysql-test/suite/innodb/r/instant_alter_debug.result
@@ -1,5 +1,8 @@
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
CREATE TABLE t1 (
pk INT AUTO_INCREMENT PRIMARY KEY,
c1 INT,
@@ -168,6 +171,7 @@ connect stop_purge,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connect ddl,localhost,root,,test;
DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 2);
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged';
ALTER TABLE t1 FORCE;
connection default;
@@ -203,9 +207,11 @@ DELETE FROM t1;
connection ddl;
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged';
ALTER TABLE t1 FORCE;
-disconnect stop_purge;
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR copied';
+connection stop_purge;
+COMMIT;
+connection default;
InnoDB 1 transactions not purged
INSERT INTO t1 SET a=1;
INSERT INTO t1 SET a=2,b=3,c=4;
@@ -217,6 +223,29 @@ SELECT a, b, c FROM t1;
a b c
1 2 NULL
2 3 4
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+connection stop_purge;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+DELETE FROM t1;
+connection ddl;
+SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged';
+ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2 AFTER a, FORCE;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR copied';
+disconnect stop_purge;
+InnoDB 1 transactions not purged
+INSERT INTO t1 SET a=1;
+INSERT INTO t1 SET a=2,c=4;
+SET DEBUG_SYNC = 'now SIGNAL logged';
+connection ddl;
+UPDATE t1 SET b = b + 1 WHERE a = 2;
+connection default;
+SET DEBUG_SYNC = RESET;
+SELECT a, b, c FROM t1;
+a b c
+1 2 NULL
+2 3 4
#
# MDEV-15872 Crash in online ALTER TABLE...ADD PRIMARY KEY
# after instant ADD COLUMN ... NULL
@@ -284,6 +313,30 @@ UPDATE t1 SET b = 1;
SET DEBUG_SYNC='now SIGNAL update';
connection con2;
connection default;
+DROP TABLE t1;
+#
+# MDEV-21658 Error on online ADD PRIMARY KEY after instant DROP/reorder
+#
+CREATE TABLE t1 (a INT, b INT, c INT, col INT) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES ();
+ALTER TABLE t1 DROP b, DROP c, DROP col;
+ALTER TABLE t1 ADD COLUMN col INT;
+ALTER TABLE t1 DROP a, DROP col, ADD COLUMN b INT;
+connection con2;
+SET SQL_MODE= '';
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR dml';
+ALTER TABLE t1 ADD PRIMARY KEY(b);
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR scanned';
+UPDATE t1 SET b = 1;
+SET DEBUG_SYNC = 'now SIGNAL dml';
+connection con2;
+Warnings:
+Warning 1265 Data truncated for column 'b' at row 1
+connection default;
+SELECT * FROM t1;
+b
+1
SET DEBUG_SYNC='RESET';
disconnect con2;
DROP TABLE t1;
@@ -346,4 +399,94 @@ connection default;
SET DEBUG_SYNC=RESET;
DROP TABLE t1;
# End of 10.3 tests
+#
+# MDEV-17899 Assertion failures on rollback of instant ADD/DROP
+# MDEV-18098 Crash after rollback of instant DROP COLUMN
+#
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,ib_commit_inplace_fail_1';
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2);
+ALTER TABLE t1 DROP COLUMN b;
+ERROR HY000: Internal error: Injected error!
+ALTER TABLE t1 DROP COLUMN b;
+ERROR HY000: Internal error: Injected error!
+ALTER TABLE t1 ADD COLUMN c INT;
+ERROR HY000: Internal error: Injected error!
+SELECT * FROM t1;
+a b
+1 2
+DROP TABLE t1;
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN c INT;
+ERROR HY000: Internal error: Injected error!
+BEGIN;
+INSERT INTO t1 VALUES(1, 1);
+ROLLBACK;
+ALTER TABLE t1 DROP COLUMN b;
+ERROR HY000: Internal error: Injected error!
+INSERT INTO t1 values (1,1);
+SELECT * FROM t1;
+a b
+1 1
+DROP TABLE t1;
+SET debug_dbug = @save_dbug;
+#
+# MDEV-24512 Assertion failed in rec_is_metadata()
+# in btr_discard_only_page_on_level()
+#
+SET @save_limit= @@GLOBAL.innodb_limit_optimistic_insert_debug;
+SET GLOBAL innodb_limit_optimistic_insert_debug=2;
+CREATE TABLE t1 (c CHAR(1) UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t1 ADD c2 INT NOT NULL DEFAULT 0 FIRST;
+INSERT INTO t1 (c) VALUES ('x'),('d'),('r'),('f'),('y'),('u'),('m'),('d');
+ERROR 23000: Duplicate entry 'd' for key 'c'
+SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
+SELECT * FROM t1;
+c2 c
+DROP TABLE t1;
+#
+# MDEV-25236 Online log apply fails for ROW_FORMAT=REDUNDANT tables
+#
+CREATE TABLE t1
+(a INT NOT NULL, b INT, c INT, d INT, e INT, f INT, g INT, h INT, i TEXT)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 2, 3, 4, 5, 6, 7, 8, "test");
+ALTER TABLE t1 MODIFY a INT NULL;
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL alter WAIT_FOR go';
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+connect con1,localhost,root,,;
+set DEBUG_SYNC='now WAIT_FOR alter';
+BEGIN;
+INSERT INTO t1 SET a=0, i=REPEAT('1', 10000);
+ROLLBACK;
+set DEBUG_SYNC='now SIGNAL go';
+connection default;
+SELECT * FROM t1;
+a b c d e f g h i
+1 2 3 4 5 6 7 8 test
+DROP TABLE t1;
+SET DEBUG_SYNC=RESET;
+#
+# MDEV-27962 Instant DDL downgrades the MDL when table is empty
+#
+CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)ENGINE=InnoDB;
+SET DEBUG_SYNC="alter_table_inplace_after_lock_downgrade SIGNAL try_insert WAIT_FOR alter_progress";
+ALTER TABLE t1 ADD INDEX(f1), ADD INDEX(f2);
+connection con1;
+SET SESSION lock_wait_timeout=1;
+SET DEBUG_SYNC="now WAIT_FOR try_insert";
+INSERT INTO t1 VALUES(1, 2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC="now SIGNAL alter_progress";
+disconnect con1;
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC=reset;
+# End of 10.4 tests
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+instants
+33
diff --git a/mysql-test/suite/innodb/r/instant_alter_extend,utf8.rdiff b/mysql-test/suite/innodb/r/instant_alter_extend,utf8.rdiff
new file mode 100644
index 00000000000..08f9afa696a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_extend,utf8.rdiff
@@ -0,0 +1,38 @@
+--- instant_alter_convert.result
++++ instant_alter_convert,utf8.result
+@@ -38,7 +38,7 @@
+ best.t check status OK
+ call check_table('t');
+ name mtype prtype len
+-a 2 800FE 200
++a 13 2100FE 600
+ # CHAR enlargement
+ alter table t modify a char(220);
+ affected rows: 2
+@@ -54,7 +54,7 @@
+ best.t check status OK
+ call check_table('t');
+ name mtype prtype len
+-a 2 800FE 220
++a 13 2100FE 660
+ ALTER TABLE t CHANGE COLUMN a a CHAR(230) BINARY;
+ affected rows: 2
+ info: Records: 2 Duplicates: 0 Warnings: 0
+@@ -69,7 +69,7 @@
+ best.t check status OK
+ call check_table('t');
+ name mtype prtype len
+-a 13 2F00FE 230
++a 13 5300FE 690
+ # Convert from VARCHAR to a bigger CHAR
+ alter table t modify a varchar(200);
+ affected rows: 2
+@@ -92,7 +92,7 @@
+ best.t check status OK
+ call check_table('t');
+ name mtype prtype len
+-a 2 800FE 255
++a 13 2100FE 765
+ # BINARY/VARBINARY test
+ create or replace table t (a varbinary(300));
+ insert into t values(NULL);
diff --git a/mysql-test/suite/innodb/r/instant_alter_extend.result b/mysql-test/suite/innodb/r/instant_alter_extend.result
new file mode 100644
index 00000000000..33a5f57c7b6
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_extend.result
Binary files differ
diff --git a/mysql-test/suite/innodb/r/instant_alter_import.result b/mysql-test/suite/innodb/r/instant_alter_import.result
index ab14d44bdff..9a20ed606bd 100644
--- a/mysql-test/suite/innodb/r/instant_alter_import.result
+++ b/mysql-test/suite/innodb/r/instant_alter_import.result
@@ -42,5 +42,114 @@ select * from t1;
x z
1 42
2 41
+# Remove metadata for instant DROP COLUMN, then import
+alter table t1 drop x, add column x int first, algorithm instant;
+select * from t1;
+x z
+NULL 42
+NULL 41
+alter table t1 discard tablespace;
+alter table t1 import tablespace;
+select * from t1;
+x z
+1 42
+2 41
+# Import a data file that contains instant DROP COLUMN metadata
+alter table t2 drop x;
+alter table t1 drop x, force;
+alter table t1 discard tablespace;
+flush tables t2 for export;
+unlock tables;
+alter table t1 import tablespace;
+select * from t1;
+z
+42
+41
drop table t2;
drop table t1;
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i1 INT) ENGINE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY AUTO_INCREMENT, i1 INT, i2 INT) ENGINE=INNODB;
+ALTER TABLE t2 DROP COLUMN i2, ALGORITHM=INSTANT;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+DROP TABLE t2, t1;
+CREATE TABLE t1 (id INT PRIMARY KEY, i2 INT, i1 INT) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 1, 1);
+ALTER TABLE t1 MODIFY COLUMN i2 INT AFTER i1, ALGORITHM=INSTANT;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+SELECT * FROM t2;
+id i1 i2
+1 1 1
+DROP TABLE t2, t1;
+CREATE TABLE t1 (id INT PRIMARY KEY, i2 INT, i1 INT) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 1, 1);
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+SELECT * FROM t2;
+id i1
+1 1
+DROP TABLE t2, t1;
+CREATE TABLE t1 (id INT PRIMARY KEY, i2 INT, i1 INT)
+ENGINE=INNODB PAGE_COMPRESSED=1;
+INSERT INTO t1 VALUES (1, 1, 1);
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+DROP TABLE t2, t1;
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i2 INT, i1 INT) ENGINE=INNODB;
+INSERT INTO t1 (i2) SELECT 4 FROM seq_1_to_1024;
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLE t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+DROP TABLE t2, t1;
+CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb;
+CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb;
+ALTER TABLE test.t1 add COLUMN i3 INT AFTER i1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+ERROR HY000: Index for table 't2' is corrupt; try to repair it
+DROP TABLE t1, t2;
+#
+# MDEV-28919 Assertion `(((core_null) + 7) >> 3) ==
+# oindex.n_core_null_bytes || !not_redundant()' failed
+#
+call mtr.add_suppression(" InnoDB: Tablespace for table `test`.`t` is set as discarded");
+CREATE TABLE t (a INTEGER, b INTEGER as (a) VIRTUAL,
+c INTEGER)engine=innodb;
+ALTER TABLE t DISCARD TABLESPACE;
+ALTER TABLE t DROP COLUMN b, algorithm=instant;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t`
+ALTER TABLE t DROP COLUMN c, algorithm=instant;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t`
+CREATE TABLE t1(a INTEGER)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+FLUSH TABLE t1 FOR EXPORT;
+unlock tables;
+ALTER TABLE t IMPORT tablespace;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+a
+1
+DROP TABLE t, t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_index_rename.result b/mysql-test/suite/innodb/r/instant_alter_index_rename.result
new file mode 100644
index 00000000000..41dec275d90
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_index_rename.result
@@ -0,0 +1,236 @@
+create function get_index_id(tbl_id int, index_name char(100))
+returns int
+begin
+declare res int;
+select index_id into res from information_schema.innodb_sys_indexes where
+name=index_name and table_id = tbl_id;
+return res;
+end|
+create table t (
+pk int primary key,
+a int,
+b int,
+c int,
+unique index a_key (a),
+key c_key (c)
+) engine=innodb stats_persistent=1;
+insert into t values (1, 1, 1, 1);
+set @table_id = (select table_id from information_schema.innodb_sys_tables where name='test/t');
+set @a_key_id = get_index_id(@table_id, 'a_key');
+set @c_key_id = get_index_id(@table_id, 'c_key');
+set @primary_id = get_index_id(@table_id, 'primary');
+select distinct(index_name) from mysql.innodb_index_stats where table_name = 't';
+index_name
+PRIMARY
+a_key
+c_key
+alter table t
+drop index a_key,
+add unique index a_key_strikes_back (a);
+select distinct(index_name) from mysql.innodb_index_stats where table_name = 't';
+index_name
+PRIMARY
+a_key_strikes_back
+c_key
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select @a_key_id = get_index_id(@table_id, 'a_key_strikes_back'),
+@c_key_id = get_index_id(@table_id, 'c_key'),
+@primary_id = get_index_id(@table_id, 'primary');
+@a_key_id = get_index_id(@table_id, 'a_key_strikes_back') @c_key_id = get_index_id(@table_id, 'c_key') @primary_id = get_index_id(@table_id, 'primary')
+1 1 1
+set @a_key_strikes_back_id = get_index_id(@table_id, 'a_key_strikes_back');
+set @c_key_id = get_index_id(@table_id, 'c_key');
+set @primary_id = get_index_id(@table_id, 'primary');
+alter table t
+drop index a_key_strikes_back,
+add unique index a_key_returns (a),
+drop primary key,
+add primary key (pk),
+add unique index b_key (b);
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select @a_key_strikes_back_id = get_index_id(@table_id, 'a_key_returns'),
+@c_key_id = get_index_id(@table_id, 'c_key'),
+@primary_id = get_index_id(@table_id, 'primary');
+@a_key_strikes_back_id = get_index_id(@table_id, 'a_key_returns') @c_key_id = get_index_id(@table_id, 'c_key') @primary_id = get_index_id(@table_id, 'primary')
+1 1 1
+set @a_key_returns_id = get_index_id(@table_id, 'a_key_returns');
+set @b_key_id = get_index_id(@table_id, 'b_key');
+set @c_key_id = get_index_id(@table_id, 'c_key');
+set @primary_id = get_index_id(@table_id, 'primary');
+alter table t
+drop key c_key,
+add key c_key2 (c);
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select @a_key_returns_id = get_index_id(@table_id, 'a_key_returns'),
+@b_key_id = get_index_id(@table_id, 'b_key'),
+@c_key_id = get_index_id(@table_id, 'c_key2'),
+@primary_id = get_index_id(@table_id, 'primary');
+@a_key_returns_id = get_index_id(@table_id, 'a_key_returns') @b_key_id = get_index_id(@table_id, 'b_key') @c_key_id = get_index_id(@table_id, 'c_key2') @primary_id = get_index_id(@table_id, 'primary')
+1 1 1 1
+drop table t;
+create table errors (
+a int,
+unique key a_key (a),
+b int
+) engine=innodb;
+alter table errors
+drop key a_key,
+drop key a_key,
+add unique key a_key2 (a);
+ERROR 42000: Can't DROP INDEX `a_key`; check that it exists
+alter table errors
+drop key a_key,
+drop key a_key2,
+add unique key a_key2 (a);
+ERROR 42000: Can't DROP INDEX `a_key2`; check that it exists
+alter table errors
+add key b_key (b),
+drop key b_key,
+add key bb_key (b);
+ERROR 42000: Can't DROP INDEX `b_key`; check that it exists
+alter table errors
+drop key a_key,
+add key a_key2 (a),
+drop key a_key,
+add key a_key2 (a);
+ERROR 42000: Can't DROP INDEX `a_key`; check that it exists
+drop table errors;
+create table corrupted (
+a int,
+key a_key (a)
+) engine=innodb;
+insert into corrupted values (1);
+select * from corrupted;
+a
+1
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug = '+d,dict_set_index_corrupted';
+check table corrupted;
+Table Op Msg_type Msg_text
+test.corrupted check Warning InnoDB: Index a_key is marked as corrupted
+test.corrupted check error Corrupt
+SET debug_dbug = @save_dbug;
+select * from corrupted;
+ERROR HY000: Index corrupted is corrupted
+alter table corrupted
+drop key a_key,
+add key a_key2 (a);
+ERROR HY000: Index a_key is corrupted
+alter table corrupted
+drop key a_key;
+select * from corrupted;
+a
+1
+check table corrupted;
+Table Op Msg_type Msg_text
+test.corrupted check status OK
+drop table corrupted;
+create table t (
+a int,
+unique key a_key (a)
+) engine=innodb stats_persistent=1;
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug = '+d,ib_rename_index_fail1';
+alter table t
+drop key a_key,
+add unique key a_key2 (a),
+algorithm=instant;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SET debug_dbug = @save_dbug;
+alter table t
+drop key a_key,
+add unique key `GEN_CLUST_INDEX` (a),
+algorithm=instant;
+ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX'
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) DEFAULT NULL,
+ UNIQUE KEY `a_key` (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1
+drop table t;
+create table rename_column_and_index (
+a int,
+unique index a_key(a)
+) engine=innodb;
+insert into rename_column_and_index values (1), (3);
+alter table rename_column_and_index
+change a aa int,
+drop key a_key,
+add unique key aa_key(aa),
+algorithm=instant;
+show create table rename_column_and_index;
+Table Create Table
+rename_column_and_index CREATE TABLE `rename_column_and_index` (
+ `aa` int(11) DEFAULT NULL,
+ UNIQUE KEY `aa_key` (`aa`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+check table rename_column_and_index;
+Table Op Msg_type Msg_text
+test.rename_column_and_index check status OK
+drop table rename_column_and_index;
+#
+# MDEV-19189: ASAN memcpy-param-overlap in fill_alter_inplace_info upon adding indexes
+#
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
+ALTER TABLE t1 ADD FOREIGN KEY f (f2) REFERENCES xx(f2);
+ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t1(f2), ADD KEY (f3), ADD KEY (f1);
+DROP TABLE t1;
+#
+# MDEV-21669 InnoDB: Table ... contains <n> indexes inside InnoDB, which is different from the number of indexes <n> defined in the MariaDB
+#
+CREATE TABLE t1 (col_int INTEGER, col_char CHAR(20), col_varchar VARCHAR(500)) ENGINE=InnoDB;
+SET @table_id = (SELECT table_id FROM information_schema.innodb_sys_tables WHERE name='test/t1');
+ALTER TABLE t1 ADD KEY idx3 (col_varchar(9)), ADD KEY idX2 (col_char(9));
+SET @idx3_key_id = get_index_id(@table_id, 'iDx3');
+ALTER TABLE t1 DROP KEY iDx3, ADD KEY Idx3 (col_varchar(9));
+SELECT @idx3_key_id = get_index_id(@table_id, 'Idx3');
+@idx3_key_id = get_index_id(@table_id, 'Idx3')
+1
+CHECK TABLE t1 EXTENDED ;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+DROP FUNCTION get_index_id;
+#
+# MDEV-23356 InnoDB: Failing assertion: field->col->mtype == type, crash or ASAN failures in row_sel_convert_mysql_key_to_innobase, InnoDB indexes are inconsistent after INDEX changes
+#
+CREATE TABLE t1 (a INT, b INT, c CHAR(8),
+KEY ind1(c), KEY ind2(b)) ENGINE=InnoDB STATS_PERSISTENT=1;
+INSERT INTO t1 SELECT 1, 1, 'a' FROM seq_1_to_100;
+SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats;
+table_name index_name stat_name
+t1 GEN_CLUST_INDEX n_diff_pfx01
+t1 GEN_CLUST_INDEX n_leaf_pages
+t1 GEN_CLUST_INDEX size
+t1 ind1 n_diff_pfx01
+t1 ind1 n_diff_pfx02
+t1 ind1 n_leaf_pages
+t1 ind1 size
+t1 ind2 n_diff_pfx01
+t1 ind2 n_diff_pfx02
+t1 ind2 n_leaf_pages
+t1 ind2 size
+ALTER TABLE t1 DROP INDEX ind2, ADD INDEX ind3(b),
+DROP INDEX ind1, ADD INDEX ind2(c);
+SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats;
+table_name index_name stat_name
+t1 GEN_CLUST_INDEX n_diff_pfx01
+t1 GEN_CLUST_INDEX n_leaf_pages
+t1 GEN_CLUST_INDEX size
+t1 ind2 n_diff_pfx01
+t1 ind2 n_diff_pfx02
+t1 ind2 n_leaf_pages
+t1 ind2 size
+t1 ind3 n_diff_pfx01
+t1 ind3 n_diff_pfx02
+t1 ind3 n_leaf_pages
+t1 ind3 size
+UPDATE t1 SET a = 1 WHERE c = 'foo';
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_limit,16k.rdiff b/mysql-test/suite/innodb/r/instant_alter_limit,16k.rdiff
new file mode 100644
index 00000000000..57d87f7172f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_limit,16k.rdiff
@@ -0,0 +1,13 @@
+--- instant_alter_limit.result 2020-05-26 18:01:27.377946439 +0530
++++ instant_alter_limit,16k.reject 2020-05-26 20:14:38.452463919 +0530
+@@ -45,3 +45,10 @@
+ instants
+ 502
+ DROP TABLE t;
++#
++# MDEV-21787 Alter table failure tries to access uninitialized column
++#
++CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT GENERATED ALWAYS AS (SUBSTR(f4, 1, 400)), f3 VARCHAR(500), f4 TEXT)ENGINE=InnoDB ROW_FORMAT=Compact;
++ALTER TABLE t1 ADD UNIQUE KEY (f2(9));
++ALTER TABLE t1 ADD COLUMN f5 TEXT, ALGORITHM=INPLACE;
++DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_limit,32k.rdiff b/mysql-test/suite/innodb/r/instant_alter_limit,32k.rdiff
new file mode 100644
index 00000000000..8f8cf64b7fc
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_limit,32k.rdiff
@@ -0,0 +1,16 @@
+--- instant_alter_limit.result 2020-05-26 18:01:27.377946439 +0530
++++ instant_alter_limit,32k.reject 2020-05-26 19:59:19.743877366 +0530
+@@ -43,5 +43,12 @@
+ FROM information_schema.global_status
+ WHERE variable_name = 'innodb_instant_alter_column';
+ instants
+-502
++506
+ DROP TABLE t;
++#
++# MDEV-21787 Alter table failure tries to access uninitialized column
++#
++CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT GENERATED ALWAYS AS (SUBSTR(f4, 1, 400)), f3 VARCHAR(500), f4 TEXT)ENGINE=InnoDB ROW_FORMAT=Compact;
++ALTER TABLE t1 ADD UNIQUE KEY (f2(9));
++ALTER TABLE t1 ADD COLUMN f5 TEXT, ALGORITHM=INPLACE;
++DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_limit,4k.rdiff b/mysql-test/suite/innodb/r/instant_alter_limit,4k.rdiff
new file mode 100644
index 00000000000..dad28218a02
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_limit,4k.rdiff
@@ -0,0 +1,313 @@
+--- instant_alter_limit.result 2020-05-26 18:01:27.377946439 +0530
++++ instant_alter_limit,4k.reject 2020-05-26 20:17:53.314736548 +0530
+@@ -5,6 +5,276 @@
+ ENGINE=InnoDB;
+ INSERT INTO t VALUES(1,2,3,4,5);
+ SET innodb_strict_mode = OFF;
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ SELECT * FROM t;
+ b d a c e
+ NULL NULL 1 NULL NULL
+@@ -12,11 +282,17 @@
+ ADD COLUMN b INT, ALGORITHM=INSTANT;
+ ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ ALTER TABLE t CHANGE COLUMN b beta INT AFTER a, ALGORITHM=INSTANT;
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ ALTER TABLE t DROP e, DROP c, DROP d, ALGORITHM=INSTANT;
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ SELECT * FROM t;
+ a beta
+ 1 NULL
+ ALTER TABLE t DROP COLUMN beta, ALGORITHM=INSTANT;
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ ALTER TABLE t ADD COLUMN b INT NOT NULL, ALGORITHM=INSTANT;
+ ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ SELECT variable_value-@old_instant instants
+@@ -43,5 +319,14 @@
+ FROM information_schema.global_status
+ WHERE variable_name = 'innodb_instant_alter_column';
+ instants
+-502
++474
+ DROP TABLE t;
++#
++# MDEV-21787 Alter table failure tries to access uninitialized column
++#
++CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT GENERATED ALWAYS AS (SUBSTR(f4, 1, 400)), f3 VARCHAR(500), f4 TEXT)ENGINE=InnoDB ROW_FORMAT=Compact;
++ALTER TABLE t1 ADD UNIQUE KEY (f2(9));
++ALTER TABLE t1 ADD COLUMN f5 TEXT, ALGORITHM=INPLACE;
++Warnings:
++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
++DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_limit,64k.rdiff b/mysql-test/suite/innodb/r/instant_alter_limit,64k.rdiff
new file mode 100644
index 00000000000..d7479dbba40
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_limit,64k.rdiff
@@ -0,0 +1,16 @@
+--- instant_alter_limit.result 2020-05-26 18:01:27.377946439 +0530
++++ instant_alter_limit,64k.reject 2020-05-26 20:00:22.499711222 +0530
+@@ -43,5 +43,12 @@
+ FROM information_schema.global_status
+ WHERE variable_name = 'innodb_instant_alter_column';
+ instants
+-502
++506
+ DROP TABLE t;
++#
++# MDEV-21787 Alter table failure tries to access uninitialized column
++#
++CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT GENERATED ALWAYS AS (SUBSTR(f4, 1, 400)), f3 VARCHAR(500), f4 TEXT)ENGINE=InnoDB ROW_FORMAT=Compact;
++ALTER TABLE t1 ADD UNIQUE KEY (f2(9));
++ALTER TABLE t1 ADD COLUMN f5 TEXT, ALGORITHM=INPLACE;
++DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_limit,8k.rdiff b/mysql-test/suite/innodb/r/instant_alter_limit,8k.rdiff
new file mode 100644
index 00000000000..1fe3e1a56eb
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_limit,8k.rdiff
@@ -0,0 +1,63 @@
+--- instant_alter_limit.result 2020-05-26 18:01:27.377946439 +0530
++++ instant_alter_limit,8k.reject 2020-05-26 20:19:50.881869095 +0530
+@@ -5,6 +5,28 @@
+ ENGINE=InnoDB;
+ INSERT INTO t VALUES(1,2,3,4,5);
+ SET innodb_strict_mode = OFF;
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ SELECT * FROM t;
+ b d a c e
+ NULL NULL 1 NULL NULL
+@@ -12,11 +34,17 @@
+ ADD COLUMN b INT, ALGORITHM=INSTANT;
+ ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ ALTER TABLE t CHANGE COLUMN b beta INT AFTER a, ALGORITHM=INSTANT;
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ ALTER TABLE t DROP e, DROP c, DROP d, ALGORITHM=INSTANT;
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ SELECT * FROM t;
+ a beta
+ 1 NULL
+ ALTER TABLE t DROP COLUMN beta, ALGORITHM=INSTANT;
++Warnings:
++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ ALTER TABLE t ADD COLUMN b INT NOT NULL, ALGORITHM=INSTANT;
+ ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ SELECT variable_value-@old_instant instants
+@@ -43,5 +71,12 @@
+ FROM information_schema.global_status
+ WHERE variable_name = 'innodb_instant_alter_column';
+ instants
+-502
++492
+ DROP TABLE t;
++#
++# MDEV-21787 Alter table failure tries to access uninitialized column
++#
++CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT GENERATED ALWAYS AS (SUBSTR(f4, 1, 400)), f3 VARCHAR(500), f4 TEXT)ENGINE=InnoDB ROW_FORMAT=Compact;
++ALTER TABLE t1 ADD UNIQUE KEY (f2(9));
++ALTER TABLE t1 ADD COLUMN f5 TEXT, ALGORITHM=INPLACE;
++DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_limit.result b/mysql-test/suite/innodb/r/instant_alter_limit.result
new file mode 100644
index 00000000000..75fe40dade1
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_limit.result
@@ -0,0 +1,47 @@
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
+CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, d INT, e INT)
+ENGINE=InnoDB;
+INSERT INTO t VALUES(1,2,3,4,5);
+SET innodb_strict_mode = OFF;
+SELECT * FROM t;
+b d a c e
+NULL NULL 1 NULL NULL
+ALTER TABLE t DROP b, DROP c, DROP d, DROP e,
+ADD COLUMN b INT, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+ALTER TABLE t CHANGE COLUMN b beta INT AFTER a, ALGORITHM=INSTANT;
+ALTER TABLE t DROP e, DROP c, DROP d, ALGORITHM=INSTANT;
+SELECT * FROM t;
+a beta
+1 NULL
+ALTER TABLE t DROP COLUMN beta, ALGORITHM=INSTANT;
+ALTER TABLE t ADD COLUMN b INT NOT NULL, ALGORITHM=INSTANT;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+instants
+256
+ALTER TABLE t ADD COLUMN b INT NOT NULL;
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+instants
+256
+SELECT * FROM t;
+a b
+1 0
+ALTER TABLE t ADD COLUMN (c CHAR(255) NOT NULL, d BIGINT NOT NULL),
+ALGORITHM=INSTANT;
+UPDATE t SET b=b+1,d=d+1,c='foo';
+SELECT * FROM t;
+a b c d
+1 1 foo 1
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+instants
+502
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/instant_alter_null.result b/mysql-test/suite/innodb/r/instant_alter_null.result
new file mode 100644
index 00000000000..f49d60fc301
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_null.result
@@ -0,0 +1,56 @@
+create table t (a int NOT NULL) engine=innodb row_format= compressed;
+alter table t modify a int NULL, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+drop table t;
+create table t (a int NOT NULL) engine=innodb row_format= dynamic;
+alter table t modify a int NULL, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+drop table t;
+create table t (a int NOT NULL) engine=innodb row_format= compact;
+alter table t modify a int NULL, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+drop table t;
+create table t (
+id int primary key,
+a int NOT NULL default 0,
+b int NOT NULL default 0,
+c int NOT NULL default 0,
+index idx (a,b,c)
+) engine=innodb row_format=redundant;
+insert into t (id, a) values (0, NULL);
+ERROR 23000: Column 'a' cannot be null
+insert into t (id, b) values (0, NULL);
+ERROR 23000: Column 'b' cannot be null
+insert into t (id, c) values (0, NULL);
+ERROR 23000: Column 'c' cannot be null
+insert into t values (1,1,1,1);
+set @id = (select table_id from information_schema.innodb_sys_tables
+where name = 'test/t');
+select * from information_schema.innodb_sys_columns where table_id=@id;
+TABLE_ID NAME POS MTYPE PRTYPE LEN
+TABLE_ID id 0 6 1283 4
+TABLE_ID a 1 6 1283 4
+TABLE_ID b 2 6 1283 4
+TABLE_ID c 3 6 1283 4
+alter table t modify a int NULL, algorithm=instant;
+insert into t values (2, NULL, 2, 2);
+alter table t modify b int NULL, algorithm=nocopy;
+insert into t values (3, NULL, NULL, 3);
+alter table t modify c int NULL, algorithm=inplace;
+insert into t values (4, NULL, NULL, NULL);
+select * from information_schema.innodb_sys_columns where table_id=@id;
+TABLE_ID NAME POS MTYPE PRTYPE LEN
+TABLE_ID id 0 6 1283 4
+TABLE_ID a 1 6 1027 4
+TABLE_ID b 2 6 1027 4
+TABLE_ID c 3 6 1027 4
+select * from t;
+id a b c
+4 NULL NULL NULL
+3 NULL NULL 3
+2 NULL 2 2
+1 1 1 1
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+drop table t;
diff --git a/mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff b/mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff
new file mode 100644
index 00000000000..8722b724c6e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff
@@ -0,0 +1,19 @@
+--- instant_alter_purge.result
++++ instant_alter_purge,release.result
+@@ -32,16 +32,11 @@
+ START TRANSACTION WITH CONSISTENT SNAPSHOT;
+ connection default;
+ DELETE FROM t1;
+-SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL go WAIT_FOR do';
+ ALTER TABLE t1 ADD COLUMN f3 INT;
+ connection purge_control;
+-SET DEBUG_SYNC='now WAIT_FOR go';
+ COMMIT;
+ SET GLOBAL innodb_max_purge_lag_wait= 0;
+-InnoDB 0 transactions not purged
+-SET DEBUG_SYNC='now SIGNAL do';
+ disconnect purge_control;
+ connection default;
+-SET DEBUG_SYNC=RESET;
+ DROP TABLE t1;
+ SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/r/instant_alter_purge.result b/mysql-test/suite/innodb/r/instant_alter_purge.result
new file mode 100644
index 00000000000..8adae3d645f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_purge.result
@@ -0,0 +1,47 @@
+SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+#
+# MDEV-17793 Crash in purge after instant DROP and emptying the table
+#
+connect prevent_purge,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES ();
+ALTER TABLE t1 DROP f2, ADD COLUMN f2 INT;
+ALTER TABLE t1 DROP f1;
+DELETE FROM t1;
+connection prevent_purge;
+COMMIT;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+ALTER TABLE t1 ADD COLUMN extra TINYINT UNSIGNED NOT NULL DEFAULT 42;
+InnoDB 1 transactions not purged
+ALTER TABLE t1 DROP extra;
+disconnect prevent_purge;
+InnoDB 0 transactions not purged
+DROP TABLE t1;
+#
+# MDEV-17813 Crash in instant ALTER TABLE due to purge
+# concurrently emptying table
+#
+CREATE TABLE t1 (f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 SET f2=1;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+connect purge_control,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+DELETE FROM t1;
+SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL go WAIT_FOR do';
+ALTER TABLE t1 ADD COLUMN f3 INT;
+connection purge_control;
+SET DEBUG_SYNC='now WAIT_FOR go';
+COMMIT;
+SET GLOBAL innodb_max_purge_lag_wait= 0;
+InnoDB 0 transactions not purged
+SET DEBUG_SYNC='now SIGNAL do';
+disconnect purge_control;
+connection default;
+SET DEBUG_SYNC=RESET;
+DROP TABLE t1;
+SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/r/instant_alter_rollback.result b/mysql-test/suite/innodb/r/instant_alter_rollback.result
index 2c2083adc46..b51e067c647 100644
--- a/mysql-test/suite/innodb/r/instant_alter_rollback.result
+++ b/mysql-test/suite/innodb/r/instant_alter_rollback.result
@@ -1,29 +1,52 @@
FLUSH TABLES;
#
# MDEV-11369: Instant ADD COLUMN for InnoDB
+# MDEV-15562: Instant DROP COLUMN or changing the order of columns
#
connect to_be_killed, localhost, root;
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
CREATE TABLE empty (id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB;
CREATE TABLE once LIKE empty;
CREATE TABLE twice LIKE empty;
+CREATE TABLE thrice LIKE empty;
INSERT INTO once SET id=1,c2=1;
INSERT INTO twice SET id=1,c2=1;
+INSERT INTO thrice SET id=1,c2=1;
ALTER TABLE empty ADD COLUMN (d1 INT DEFAULT 15);
ALTER TABLE once ADD COLUMN (d1 INT DEFAULT 20);
ALTER TABLE twice ADD COLUMN (d1 INT DEFAULT 20);
+ALTER TABLE thrice ADD COLUMN (d1 INT DEFAULT 20);
ALTER TABLE twice ADD COLUMN
(d2 INT NOT NULL DEFAULT 10,
d3 VARCHAR(15) NOT NULL DEFAULT 'var och en char');
+ALTER TABLE thrice ADD COLUMN
+(d2 INT NOT NULL DEFAULT 10,
+d3 TEXT NOT NULL DEFAULT 'con');
+ALTER TABLE thrice DROP c2, DROP d3, CHANGE d2 d3 INT NOT NULL FIRST;
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+instants
+7
BEGIN;
INSERT INTO empty set id=0,c2=42;
UPDATE once set c2=c2+1;
UPDATE twice set c2=c2+1;
+UPDATE thrice set d3=d3+1;
INSERT INTO twice SET id=2,c2=0,d3='';
+INSERT INTO thrice SET id=2,d3=0;
+DELETE FROM empty;
+DELETE FROM once;
+DELETE FROM twice;
+DELETE FROM thrice;
connection default;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server
disconnect to_be_killed;
+# restart
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
DROP TABLE foo;
@@ -37,4 +60,7 @@ id c2 d1
SELECT * FROM twice;
id c2 d1 d2 d3
1 1 20 10 var och en char
-DROP TABLE empty, once, twice;
+SELECT * FROM thrice;
+d3 id d1
+10 1 20
+DROP TABLE empty, once, twice, thrice;
diff --git a/mysql-test/suite/innodb/r/instant_auto_inc.result b/mysql-test/suite/innodb/r/instant_auto_inc.result
new file mode 100644
index 00000000000..a893b91726b
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_auto_inc.result
@@ -0,0 +1,21 @@
+create table t(id int primary key, a int) engine=InnoDB;
+insert into t (id, a) values (1, 1);
+alter table t modify column id int auto_increment;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+insert into t (a) values (2);
+alter table t modify column id int, algorithm=instant;
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+insert into t (id, a) values (3, 3);
+select * from t;
+id a
+1 1
+2 2
+3 3
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+drop table t;
diff --git a/mysql-test/suite/innodb/r/instant_drop.result b/mysql-test/suite/innodb/r/instant_drop.result
new file mode 100644
index 00000000000..2b82eb3c805
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_drop.result
@@ -0,0 +1,205 @@
+create table t1(f1 int not null, f2 int not null, f3 int not null)engine=innodb;
+insert into t1 values(1, 2, 3),(4, 5, 6);
+alter table t1 drop column f2, algorithm=instant;
+select * from t1;
+f1 f3
+1 3
+4 6
+insert into t1 values(1,2);
+select * from t1;
+f1 f3
+1 3
+4 6
+1 2
+alter table t1 add column f4 int not null default 5, algorithm=instant;
+select * from t1;
+f1 f3 f4
+1 3 5
+4 6 5
+1 2 5
+alter table t1 drop column f1, algorithm=instant;
+select * from t1;
+f3 f4
+3 5
+6 5
+2 5
+insert into t1 values(7, 9);
+select * from t1;
+f3 f4
+3 5
+6 5
+2 5
+7 9
+alter table t1 add column f5 blob default repeat('aaa', 950), drop column f4, algorithm=instant;
+select * from t1;
+f3 f5
+3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+select f3 from t1;
+f3
+3
+6
+2
+7
+update t1 set f3 = 10 where f3 > 2;
+select * from t1;
+f3 f5
+10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+delete from t1 where f3 = 10;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f3` int(11) NOT NULL,
+ `f5` blob DEFAULT repeat('aaa',950)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select f3 from t1;
+f3
+2
+update t1 set f5 = 'world';
+select * from t1;
+f3 f5
+2 world
+drop table t1;
+create table t1(f1 int, f2 int not null, index idx(f2))engine=innodb;
+insert into t1 values(1, 2);
+alter table t1 drop column f1, add column f3 varchar(100) default 'thiru', algorithm=instant;
+select * from t1 force index (idx);
+f2 f3
+2 thiru
+alter table t1 drop column f3, algorithm=instant;
+select * from t1;
+f2
+2
+begin;
+insert into t1 values(10);
+select * from t1;
+f2
+2
+10
+update t1 set f2 = 100;
+select * from t1;
+f2
+100
+100
+delete from t1 where f2 = 100;
+select * from t1;
+f2
+rollback;
+select * from t1;
+f2
+2
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f2` int(11) NOT NULL,
+ KEY `idx` (`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+create table t1(f1 int, f2 int not null)engine=innodb;
+insert into t1 values(1, 2);
+alter table t1 drop column f2, algorithm=instant;
+insert into t1 values(NULL);
+select * from t1;
+f1
+1
+NULL
+drop table t1;
+create table t1(f1 int not null, f2 int not null)engine=innodb;
+insert into t1 values(1, 2);
+alter table t1 add column f5 int default 10, algorithm=instant;
+alter table t1 add column f3 int not null default 100, algorithm=instant;
+alter table t1 add column f4 int default 100, drop column f3, algorithm=instant;
+insert into t1 values(2, 3, 20, 100);
+select * from t1;
+f1 f2 f5 f4
+1 2 10 100
+2 3 20 100
+drop table t1;
+create table t1(f1 int not null, f2 int not null) engine=innodb;
+insert into t1 values(1, 1);
+alter table t1 drop column f2, add column f3 int default 3, algorithm=instant;
+select * from t1;
+f1 f3
+1 3
+update t1 set f3 = 19;
+select * from t1;
+f1 f3
+1 19
+alter table t1 drop column f1, add column f5 tinyint default 10 first,
+algorithm=instant;
+insert into t1 values(4, 10);
+select * from t1;
+f5 f3
+10 19
+4 10
+create table t2(f1 int, f2 int not null) engine=innodb;
+insert into t2(f1, f2) values(1, 2);
+alter table t2 drop column f2, add column f4 varchar(100) default repeat('a', 20), add column f5 int default 10, algorithm=instant;
+select * from t2;
+f1 f4 f5
+1 aaaaaaaaaaaaaaaaaaaa 10
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f1` int(11) DEFAULT NULL,
+ `f4` varchar(100) DEFAULT repeat('a',20),
+ `f5` int(11) DEFAULT 10
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+alter table t2 add column f6 char(100) default repeat('a', 99), algorithm=instant;
+create table t3(f1 int, f2 int not null)engine=innodb;
+insert into t3 values(1, 2);
+alter table t3 drop column f2, add column f3 int default 1, add column f4 int default 4, algorithm=instant;
+create table t4(a varchar(1), b int, c int, primary key(a,b))engine=innodb;
+insert into t4 values('4',5,6);
+alter table t4 drop column c;
+# restart
+select * from t1;
+f5 f3
+10 19
+4 10
+alter table t1 add column f6 int default 9,drop column f5, algorithm = instant;
+insert into t1 values(4, 9);
+alter table t1 force, algorithm=inplace;
+select * from t1;
+f3 f6
+19 9
+10 9
+4 9
+select * from t2;
+f1 f4 f5 f6
+1 aaaaaaaaaaaaaaaaaaaa 10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+alter table t2 force, algorithm=inplace;
+select * from t2;
+f1 f4 f5 f6
+1 aaaaaaaaaaaaaaaaaaaa 10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f1` int(11) DEFAULT NULL,
+ `f4` varchar(100) DEFAULT repeat('a',20),
+ `f5` int(11) DEFAULT 10,
+ `f6` char(100) DEFAULT repeat('a',99)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select * from t3;
+f1 f3 f4
+1 1 4
+alter table t3 add column f5 char(100) default repeat('a', 99), algorithm=instant;
+select * from t4;
+a b
+4 5
+alter table t4 add column d varchar(5) default 'fubar';
+insert into t4 values('',0,'snafu');
+# restart
+select * from t3;
+f1 f3 f4 f5
+1 1 4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+select * from t4;
+a b d
+ 0 snafu
+4 5 fubar
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/suite/innodb/r/log_alter_table.result b/mysql-test/suite/innodb/r/log_alter_table.result
index 9cb9ed77e33..9de89bebaa6 100644
--- a/mysql-test/suite/innodb/r/log_alter_table.result
+++ b/mysql-test/suite/innodb/r/log_alter_table.result
@@ -1,3 +1,4 @@
+# restart
#
# Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN
# FILES ARE CREATED
@@ -10,9 +11,11 @@ INSERT INTO t1 VALUES (1,2);
ALTER TABLE t1 ADD PRIMARY KEY(a), LOCK=SHARED, ALGORITHM=INPLACE;
ALTER TABLE t1 DROP INDEX b, ADD INDEX (b), LOCK=SHARED;
# Kill the server
+# restart: --debug=d,ib_log
FOUND 2 /scan \d+: multi-log rec MLOG_FILE_CREATE2 len \d+ page \d+:0/ in mysqld.1.err
FOUND 3 /scan \d+: log rec MLOG_INDEX_LOAD/ in mysqld.1.err
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+# restart
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/log_corruption.result b/mysql-test/suite/innodb/r/log_corruption.result
index b174546c111..4ec34908035 100644
--- a/mysql-test/suite/innodb/r/log_corruption.result
+++ b/mysql-test/suite/innodb/r/log_corruption.result
@@ -1,10 +1,12 @@
# redo log from before MariaDB 10.2.2/MySQL 5.7.9
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2\./ in mysqld.1.err
# redo log from before MariaDB 10.2.2, with corrupted log checkpoint
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -12,12 +14,14 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err
FOUND 2 /Plugin 'InnoDB' registration as a STORAGE ENGINE failed/ in mysqld.1.err
# redo log from before MariaDB 10.2.2, with corrupted log block
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
# empty redo log from before MariaDB 10.2.2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -25,24 +29,28 @@ COUNT(*)
1
FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# redo log from "after" MariaDB 10.2.2, but with invalid header checksum
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid redo log header checksum/ in mysqld.1.err
# distant future redo log format, with valid header checksum
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\./ in mysqld.1.err
# valid header, but old-format checkpoint blocks
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -50,6 +58,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
FOUND 1 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# same, but with current-version header
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -57,6 +66,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 2 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err
FOUND 2 /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err
# --innodb-force-recovery=6 (skip the entire redo log)
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -64,11 +74,13 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
FOUND 1 /\[Note\] InnoDB: .* started; log sequence number 0/ in mysqld.1.err
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
# --innodb-force-recovery=6 (skip the entire redo log)
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=6
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -76,6 +88,7 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
# Test a corrupted MLOG_FILE_NAME record.
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -88,12 +101,14 @@ FOUND 1 /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8
FOUND 1 /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err
# Test a corrupted MLOG_FILE_NAME record.
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err
# valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -101,18 +116,21 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err
FOUND 1 /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
# 10.2 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# 10.3 missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
# Empty 10.3 redo log
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -120,6 +138,7 @@ COUNT(*)
1
FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
# Empty 10.2 redo log
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -127,6 +146,7 @@ COUNT(*)
1
FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -137,3 +157,4 @@ ib_buffer_pool
ib_logfile0
ib_logfile1
ibdata1
+# restart
diff --git a/mysql-test/suite/innodb/r/log_file.result b/mysql-test/suite/innodb/r/log_file.result
index 952b9f3a3af..838092f9d38 100644
--- a/mysql-test/suite/innodb/r/log_file.result
+++ b/mysql-test/suite/innodb/r/log_file.result
@@ -2,6 +2,7 @@
# Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST
# Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES
# Start mysqld without the possibility to create innodb_undo_tablespaces
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -9,12 +10,14 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002'/ in mysqld.1.err
# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
# Start mysqld with non existent innodb_log_group_home_dir
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend --innodb_log_group_home_dir=/path/to/non-existent/
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err
# Successfully let InnoDB create tablespaces
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -22,6 +25,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
# Backup tmp/logfile/*
# 1. With ibdata2, Without ibdata1
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -44,6 +48,7 @@ undo001
undo002
undo003
# 2. With ibdata1, without ibdata2
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -83,6 +88,7 @@ ib_logfile2
undo001
undo002
undo003
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -116,6 +122,7 @@ ib_buffer_pool
undo001
undo002
undo003
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -144,6 +151,7 @@ bak_undo003
ib_buffer_pool
undo001
undo003
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -170,6 +178,7 @@ bak_undo002
bak_undo003
ib_buffer_pool
undo003
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -202,6 +211,7 @@ ibdata1
ibdata2
undo001
undo003
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -239,6 +249,7 @@ ib_logfile2
ibdata1
ibdata2
undo003
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -271,6 +282,7 @@ bak_undo003
ib_buffer_pool
ib_logfile0
ib_logfile2
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -295,6 +307,7 @@ undo001
undo002
undo003
# 10. With ibdata*, without ib_logfile0
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -334,12 +347,14 @@ ibdata2
undo001
undo002
undo003
+# restart: --innodb-log-files-in-group=3 --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-directory=MYSQLTEST_VARDIR/tmp/log_file --innodb-undo-logs=20 --innodb-undo-tablespaces=3 --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err
+# restart
# Cleanup
bak_ib_logfile0
bak_ib_logfile1
diff --git a/mysql-test/suite/innodb/r/log_file_name.result b/mysql-test/suite/innodb/r/log_file_name.result
index 7812d35d6b4..cb51653f6f6 100644
--- a/mysql-test/suite/innodb/r/log_file_name.result
+++ b/mysql-test/suite/innodb/r/log_file_name.result
@@ -11,18 +11,21 @@ COMMIT;
# Kill the server
# Fault 0 (no real fault): Orphan file with duplicate space_id.
# Fault 1: Two dirty files with the same space_id.
+# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Ignoring data file '.*t2.ibd' with space ID \d+. Another data file called .*t1.ibd exists with the same space ID/ in mysqld.1.err
# Fault 2: Wrong space_id in a dirty file, and a missing file.
+# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Tablespace \d+ was not found at.*t3.ibd/ in mysqld.1.err
# Fault 3: Wrong space_id in a dirty file, and no missing file.
+# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -32,6 +35,7 @@ FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t3.ibd/ in mysqld.1.err
FOUND 2 /InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err
# Fault 4: Missing data file
+# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -39,16 +43,19 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Tablespace \d+ was not found at .*t[12].ibd.
.*InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err
# Fault 5: Wrong type of data file
+# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# restart
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
NOT FOUND /\[Note\] InnoDB: Cannot read first page of .*t2.ibd/ in mysqld.1.err
FOUND 1 /\[ERROR\] InnoDB: Datafile .*t2.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err
+# restart
SELECT * FROM t2;
a
9
@@ -77,6 +84,7 @@ RENAME TABLE u5 TO u6;
INSERT INTO u6 VALUES(2);
# Kill the server
# Fault 6: All-zero data file and innodb_force_recovery
+# restart: --innodb-force-recovery=1
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -85,6 +93,7 @@ FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.i
FOUND 1 /\[ERROR\] InnoDB: Datafile .*u1.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err
NOT FOUND /\[Note\] InnoDB: Cannot read first page of .*u2.ibd/ in mysqld.1.err
# Fault 7: Missing or wrong data file and innodb_force_recovery
+# restart: --innodb-force-recovery=1
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -92,9 +101,11 @@ ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err
FOUND 1 /\[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' because the target file exists/ in mysqld.1.err
+# restart: --innodb-force-recovery=1
FOUND 1 /\[Note\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err
FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err
FOUND 1 /\[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5].ibd, and innodb_force_recovery was set. All redo log for this tablespace will be ignored!/ in mysqld.1.err
+# restart
DROP TABLE u1,u2,u3,u6;
# List of files:
db.opt
diff --git a/mysql-test/suite/innodb/r/log_file_name_debug.result b/mysql-test/suite/innodb/r/log_file_name_debug.result
index 3fe78c91802..2b81caa26b7 100644
--- a/mysql-test/suite/innodb/r/log_file_name_debug.result
+++ b/mysql-test/suite/innodb/r/log_file_name_debug.result
@@ -5,10 +5,14 @@
SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server
+# restart: --debug=d,innodb_log_abort_1 --innodb-log-files-in-group=1 --innodb-log-file-size=4M
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-files-in-group=1 --innodb-log-file-size=4M
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /ib_log: MLOG_CHECKPOINT.* written/ in mysqld.1.err
+# restart
+# restart
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result
index 89d5c6ac4d6..f3e8e9bc30a 100644
--- a/mysql-test/suite/innodb/r/log_file_size.result
+++ b/mysql-test/suite/innodb/r/log_file_size.result
@@ -1,19 +1,24 @@
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!/ in mysqld.1.err
+# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+# restart: --innodb-thread-concurrency=100 --innodb-log-file-size=10M --innodb-log-files-in-group=2
BEGIN;
INSERT INTO t1 VALUES (42);
+# restart: --innodb-log-file-size=6M
SELECT * FROM t1;
a
INSERT INTO t1 VALUES (42);
BEGIN;
DELETE FROM t1;
+# restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M
SELECT * FROM t1;
a
42
@@ -28,50 +33,66 @@ DELETE FROM t1 WHERE a=0;
disconnect con1;
connection default;
# Kill the server
+# restart: --innodb-log-group-home-dir=foo\;bar
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /syntax error in innodb_log_group_home_dir/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_1
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Starting crash recovery from checkpoint LSN=.*/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_3
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
+# restart: --innodb-read-only
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_4
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_5
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
+# restart: --innodb-read-only
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_6
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_7
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
+# restart: --innodb-read-only
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Cannot create log files in read-only mode/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_8
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_9
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_9
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_9
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err
+# restart: --debug=d,innodb_log_abort_10
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
FOUND 1 /InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0/ in mysqld.1.err
+# restart
SELECT * FROM t1;
a
42
diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result
index b65bba276f0..ca1d37fbb2d 100644
--- a/mysql-test/suite/innodb/r/monitor.result
+++ b/mysql-test/suite/innodb/r/monitor.result
@@ -37,7 +37,6 @@ buffer_pool_pages_free disabled
buffer_pages_created disabled
buffer_pages_written disabled
buffer_pages_read disabled
-buffer_pages0_read disabled
buffer_index_sec_rec_cluster_reads disabled
buffer_index_sec_rec_cluster_reads_avoided disabled
buffer_data_reads disabled
@@ -146,7 +145,6 @@ trx_nl_ro_commits disabled
trx_commits_insert_update disabled
trx_rollbacks disabled
trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
trx_active_transactions disabled
trx_rseg_history_len disabled
trx_undo_slots_used disabled
@@ -461,7 +459,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 4 NULL 4 4 NULL 4 enabled
+dml_reads 2 NULL 2 2 NULL 2 enabled
dml_inserts 1 NULL 1 1 NULL 1 enabled
dml_deletes 0 NULL 0 0 NULL 0 enabled
dml_updates 2 NULL 2 2 NULL 2 enabled
@@ -475,7 +473,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 6 NULL 6 6 NULL 6 enabled
+dml_reads 4 NULL 4 4 NULL 4 enabled
dml_inserts 1 NULL 1 1 NULL 1 enabled
dml_deletes 2 NULL 2 2 NULL 2 enabled
dml_updates 2 NULL 2 2 NULL 2 enabled
@@ -489,7 +487,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 6 NULL 6 0 NULL 0 enabled
+dml_reads 4 NULL 4 0 NULL 0 enabled
dml_inserts 1 NULL 1 0 NULL 0 enabled
dml_deletes 2 NULL 2 0 NULL 0 enabled
dml_updates 2 NULL 2 0 NULL 0 enabled
@@ -505,7 +503,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 8 NULL 8 2 NULL 2 enabled
+dml_reads 6 NULL 6 2 NULL 2 enabled
dml_inserts 3 NULL 3 2 NULL 2 enabled
dml_deletes 4 NULL 4 2 NULL 2 enabled
dml_updates 2 NULL 2 0 NULL 0 enabled
@@ -519,7 +517,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 8 NULL 8 2 NULL 2 enabled
+dml_reads 6 NULL 6 2 NULL 2 enabled
dml_inserts 3 NULL 3 2 NULL 2 enabled
dml_deletes 4 NULL 4 2 NULL 2 enabled
dml_updates 2 NULL 2 0 NULL 0 enabled
@@ -533,7 +531,7 @@ max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics
where name like "dml%";
name max_count min_count count max_count_reset min_count_reset count_reset status
-dml_reads 8 NULL 8 2 NULL 2 disabled
+dml_reads 6 NULL 6 2 NULL 2 disabled
dml_inserts 3 NULL 3 2 NULL 2 disabled
dml_deletes 4 NULL 4 2 NULL 2 disabled
dml_updates 2 NULL 2 0 NULL 0 disabled
diff --git a/mysql-test/suite/innodb/r/no_pad.result b/mysql-test/suite/innodb/r/no_pad.result
new file mode 100644
index 00000000000..0c039c30a5e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/no_pad.result
@@ -0,0 +1,7 @@
+CREATE TABLE t1 (a CHAR(8), id INT, PRIMARY KEY (a,id)) COLLATE utf8_nopad_bin
+ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES ('',1);
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES ('',2);
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/purge_secondary.result b/mysql-test/suite/innodb/r/purge_secondary.result
index 8f20f5baacb..1b5f2896887 100644
--- a/mysql-test/suite/innodb/r/purge_secondary.result
+++ b/mysql-test/suite/innodb/r/purge_secondary.result
@@ -134,6 +134,7 @@ test.t1 check status OK
InnoDB 0 transactions not purged
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT OTHER_INDEX_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE NAME='test/t1';
diff --git a/mysql-test/suite/innodb/r/purge_thread_shutdown.result b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
index 38cefbaf3e8..a87cba89917 100644
--- a/mysql-test/suite/innodb/r/purge_thread_shutdown.result
+++ b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
@@ -33,4 +33,5 @@ set global innodb_fast_shutdown=0;
ERROR 42000: Variable 'innodb_fast_shutdown' can't be set to the value of '0'
kill ID;
ERROR 70100: Connection was killed
+# restart
drop table t1;
diff --git a/mysql-test/suite/innodb/r/read_only_recover_committed.result b/mysql-test/suite/innodb/r/read_only_recover_committed.result
index 0bfba662c15..f0579a98024 100644
--- a/mysql-test/suite/innodb/r/read_only_recover_committed.result
+++ b/mysql-test/suite/innodb/r/read_only_recover_committed.result
@@ -20,6 +20,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
BEGIN;
INSERT INTO t VALUES(-10000);
ROLLBACK;
+# restart: --innodb-force-recovery=3
disconnect con1;
disconnect con2;
SELECT * FROM t;
@@ -31,6 +32,7 @@ a
1
20
UPDATE t SET a=3 WHERE a=1;
+# restart: --innodb-read-only
SET GLOBAL innodb_status_output= @@GLOBAL.innodb_status_output;
# Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED.
# In earlier versions, this would return the last committed version
@@ -44,6 +46,7 @@ SELECT * FROM t;
a
3
20
+# restart: --innodb-force-recovery=5
#
# MDEV-15418 innodb_force_recovery=5 displays bogus warnings
# about too new transaction identifier
@@ -70,6 +73,7 @@ BEGIN;
SELECT trx_state FROM information_schema.innodb_trx;
trx_state
COMMIT;
+# restart
SELECT * FROM t;
a
3
diff --git a/mysql-test/suite/innodb/r/read_only_recovery.result b/mysql-test/suite/innodb/r/read_only_recovery.result
index e639e8abacc..e83bf66432e 100644
--- a/mysql-test/suite/innodb/r/read_only_recovery.result
+++ b/mysql-test/suite/innodb/r/read_only_recovery.result
@@ -14,6 +14,7 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
BEGIN;
INSERT INTO t VALUES(0);
ROLLBACK;
+# restart: --innodb-force-recovery=3
disconnect con1;
SELECT * FROM t;
a
@@ -23,6 +24,7 @@ SELECT * FROM t;
a
1
UPDATE t SET a=3 WHERE a=1;
+# restart: --innodb-read-only
# Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED.
# In earlier versions, this would return the last committed version
# (empty table)!
@@ -33,6 +35,7 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
a
3
+# restart
SELECT * FROM t;
a
3
diff --git a/mysql-test/suite/innodb/r/readahead.result b/mysql-test/suite/innodb/r/readahead.result
index f7d6e6fae31..962434c794d 100644
--- a/mysql-test/suite/innodb/r/readahead.result
+++ b/mysql-test/suite/innodb/r/readahead.result
@@ -1,5 +1,6 @@
# Bug#25330449 ASSERT SIZE==SPACE->SIZE DURING BUF_READ_AHEAD_RANDOM
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=INNODB ROW_FORMAT=COMPRESSED;
+# restart
SET @saved = @@GLOBAL.innodb_random_read_ahead;
SET GLOBAL innodb_random_read_ahead = 1;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/recovery_shutdown.result b/mysql-test/suite/innodb/r/recovery_shutdown.result
index d2fd130add8..dc785d580fe 100644
--- a/mysql-test/suite/innodb/r/recovery_shutdown.result
+++ b/mysql-test/suite/innodb/r/recovery_shutdown.result
@@ -66,7 +66,10 @@ connection default;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
CREATE TABLE u(a SERIAL) ENGINE=INNODB;
FLUSH TABLES;
+# restart
+# restart
XA RECOVER;
formatID gtrid_length bqual_length data
1 1 0 x
+# restart
DROP TABLE t,u;
diff --git a/mysql-test/suite/innodb/r/rename_table.result b/mysql-test/suite/innodb/r/rename_table.result
index 9c45117cf10..23bb8c52d4a 100644
--- a/mysql-test/suite/innodb/r/rename_table.result
+++ b/mysql-test/suite/innodb/r/rename_table.result
@@ -7,6 +7,7 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%';
path
./test_jfg2/test.ibd
DROP DATABASE test_jfg;
+# restart
DROP DATABASE test_jfg2;
CREATE DATABASE abc_def;
CREATE DATABASE abc_def2;
@@ -17,6 +18,7 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%';
path
./abc_def2/test1.ibd
DROP DATABASE abc_def;
+# restart
DROP DATABASE abc_def2;
call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)");
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/r/rename_table_debug.result b/mysql-test/suite/innodb/r/rename_table_debug.result
index 646bd4faf5d..d13fc84aa43 100644
--- a/mysql-test/suite/innodb/r/rename_table_debug.result
+++ b/mysql-test/suite/innodb/r/rename_table_debug.result
@@ -6,6 +6,7 @@ SET DEBUG_SYNC='before_rename_table_commit SIGNAL renamed WAIT_FOR ever';
RENAME TABLE t1 TO t2;
connection default;
SET DEBUG_SYNC='now WAIT_FOR renamed';
+# restart
disconnect con1;
SELECT * FROM t1;
a b c d
diff --git a/mysql-test/suite/innodb/r/restart.result b/mysql-test/suite/innodb/r/restart.result
index 606e94d81db..2c786572cd8 100644
--- a/mysql-test/suite/innodb/r/restart.result
+++ b/mysql-test/suite/innodb/r/restart.result
@@ -3,8 +3,8 @@
#
# FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files
# of tables with .isl file or DATA DIRECTORY attribute.
-call mtr.add_suppression("\\[ERROR\\] InnoDB: Invalid flags 0x7a207879 in .*td\\.ibd");
# FIXME: This is much more noisy than MariaDB 10.1!
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Tablespace flags are invalid in datafile: .*test.t[rcd]\\.ibd");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified\\.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them\\.");
@@ -14,11 +14,13 @@ CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT
PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC
STATS_PERSISTENT=0 DATA DIRECTORY='MYSQL_TMP_DIR';
+# restart: --skip-innodb-buffer-pool-load-at-startup
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*)
1
+# restart
SELECT * FROM tr;
a
SELECT * FROM tc;
diff --git a/mysql-test/suite/innodb/r/row_format_redundant.result b/mysql-test/suite/innodb/r/row_format_redundant.result
index 81347ac90d9..73f20653604 100644
--- a/mysql-test/suite/innodb/r/row_format_redundant.result
+++ b/mysql-test/suite/innodb/r/row_format_redundant.result
@@ -1,3 +1,4 @@
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
SET GLOBAL innodb_file_per_table=1;
#
# Bug#21644827 - FTS, ASSERT !SRV_READ_ONLY_MODE || M_IMPL.M_LOG_MODE ==
@@ -32,6 +33,7 @@ row_format=redundant;
insert into t3 values(444, 'dddd', 'bbbbb', 'aaaaa');
insert into t3 values(555, 'eeee', 'ccccc', 'aaaaa');
SET GLOBAL innodb_fast_shutdown=0;
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0 --innodb-read-only
SELECT COUNT(*) FROM t1;
COUNT(*)
4096
@@ -47,12 +49,14 @@ TRUNCATE TABLE t2;
ERROR HY000: Table 't2' is read only
TRUNCATE TABLE t3;
ERROR HY000: Table 't3' is read only
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
TRUNCATE TABLE t3;
corrupted SYS_TABLES.MIX_LEN for test/t1
corrupted SYS_TABLES.MIX_LEN for test/t2
corrupted SYS_TABLES.MIX_LEN for test/t3
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
TRUNCATE TABLE t1;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
TRUNCATE TABLE t2;
@@ -72,6 +76,7 @@ Warnings:
Warning 1932 Table 'test.t1' doesn't exist in engine
DROP TABLE t2,t3;
FOUND 6 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err
+# restart
ib_buffer_pool
ib_logfile0
ib_logfile1
diff --git a/mysql-test/suite/innodb/r/skip_symbolic_links.result b/mysql-test/suite/innodb/r/skip_symbolic_links.result
index 4dc036765a0..e7a8a3cf86b 100644
--- a/mysql-test/suite/innodb/r/skip_symbolic_links.result
+++ b/mysql-test/suite/innodb/r/skip_symbolic_links.result
@@ -15,12 +15,14 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
+# restart: --symbolic-links
CREATE TABLE t1(a INT PRIMARY KEY, b INT) ENGINE=InnoDB
DATA DIRECTORY 'MYSQL_TMP_DIR';
CREATE TABLE t2(a INT PRIMARY KEY, b INT) ENGINE=InnoDB
DATA DIRECTORY 'MYSQL_TMP_DIR';
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
+# restart
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
diff --git a/mysql-test/suite/innodb/r/stats_persistent.result b/mysql-test/suite/innodb/r/stats_persistent.result
index 231ce321ce2..7e9c038d6f7 100644
--- a/mysql-test/suite/innodb/r/stats_persistent.result
+++ b/mysql-test/suite/innodb/r/stats_persistent.result
@@ -13,6 +13,7 @@ SET DEBUG_SYNC='now SIGNAL go';
disconnect con1;
connection default;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET DEBUG_SYNC= 'RESET';
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/stored_fk.result b/mysql-test/suite/innodb/r/stored_fk.result
index 35524d5a88f..b7ef178f1be 100644
--- a/mysql-test/suite/innodb/r/stored_fk.result
+++ b/mysql-test/suite/innodb/r/stored_fk.result
@@ -49,7 +49,7 @@ CREATE TABLE s (a INT, b INT GENERATED ALWAYS AS (0) STORED, c INT,
d INT GENERATED ALWAYS AS (0) VIRTUAL, e INT) ENGINE=innodb;
CREATE TABLE t (a INT) ENGINE=innodb;
ALTER TABLE s ADD CONSTRAINT c FOREIGN KEY (e) REFERENCES t(a) ON UPDATE SET null;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'c' in the referenced table 't'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'c' in the referenced table 't'
ALTER TABLE t ADD PRIMARY KEY(a);
ALTER TABLE s ADD CONSTRAINT c FOREIGN KEY (e) REFERENCES t(a) ON UPDATE SET null;
DROP TABLE s,t;
@@ -57,7 +57,7 @@ CREATE TABLE s (a INT GENERATED ALWAYS AS (0) VIRTUAL,
b INT GENERATED ALWAYS AS (0) STORED, c INT) ENGINE=innodb;
CREATE TABLE t (a INT) ENGINE=innodb;
ALTER TABLE s ADD CONSTRAINT c FOREIGN KEY (c) REFERENCES t(a) ON UPDATE SET null;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'c' in the referenced table 't'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'c' in the referenced table 't'
ALTER TABLE t ADD PRIMARY KEY(a);
ALTER TABLE s ADD CONSTRAINT c FOREIGN KEY (c) REFERENCES t(a) ON UPDATE SET null;
DROP TABLE s,t;
@@ -68,7 +68,7 @@ DROP TABLE s,t;
CREATE TABLE s (a INT, b INT) ENGINE=innodb;
CREATE TABLE t (a INT) ENGINE=innodb;
ALTER TABLE s ADD CONSTRAINT c FOREIGN KEY (a) REFERENCES t(a) ON UPDATE SET null;
-ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'c' in the referenced table 't'
+ERROR HY000: Failed to add the foreign key constraint. Missing index for constraint 'c' in the referenced table 't'
ALTER TABLE t ADD PRIMARY KEY(a);
ALTER TABLE s ADD CONSTRAINT c FOREIGN KEY (a) REFERENCES t(a) ON UPDATE SET null;
DROP TABLE s,t;
diff --git a/mysql-test/suite/innodb/r/system_tables.result b/mysql-test/suite/innodb/r/system_tables.result
index 79a24f7e455..7ccf76f58cc 100644
--- a/mysql-test/suite/innodb/r/system_tables.result
+++ b/mysql-test/suite/innodb/r/system_tables.result
@@ -1,8 +1,9 @@
alter table mysql.time_zone_name engine=InnoDB;
create table envois3 (starttime datetime) engine=InnoDB;
insert envois3 values ('2008-08-11 22:43:00');
+# restart
select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3;
starttime
2008-08-12 02:43:00
drop table envois3;
-alter table mysql.time_zone_name engine=MyISAM;
+alter table mysql.time_zone_name engine=Aria;
diff --git a/mysql-test/suite/innodb/r/table_flags.result b/mysql-test/suite/innodb/r/table_flags.result
index 8c4280738e1..9ef07c6954d 100644
--- a/mysql-test/suite/innodb/r/table_flags.result
+++ b/mysql-test/suite/innodb/r/table_flags.result
@@ -1,3 +1,4 @@
+# restart: with restart_parameters
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE tr(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE tc(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPACT;
@@ -112,6 +113,7 @@ header=0x000050150074 (NAME='test/tz',
CLUSTER_NAME=NULL(0 bytes),
SPACE=0x00000004)
header=0x070008030000 (NAME=0x73757072656d756d00)
+# restart: with restart_parameters
SHOW CREATE TABLE tr;
ERROR 42S02: Table 'test.tr' doesn't exist in engine
SHOW CREATE TABLE tc;
@@ -143,6 +145,7 @@ ERROR 42S02: Table 'test.tp' doesn't exist in engine
FOUND 5 /InnoDB: Table `test`.`t[cp]` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=(129|289|3873|1232[13]) SYS_TABLES\.N_COLS=2147483649/ in mysqld.1.err
FOUND 2 /InnoDB: Table `test`\.`tr` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=65 SYS_TABLES\.MIX_LEN=4294967295\b/ in mysqld.1.err
Restoring SYS_TABLES clustered index root page (8)
+# restart: with restart_parameters
SHOW CREATE TABLE tr;
Table Create Table
tr CREATE TABLE `tr` (
@@ -188,6 +191,7 @@ a
SELECT * FROM tp;
a
DROP TABLE tr,tc,td,tz,tp;
+# restart
ib_logfile0
ib_logfile1
ibdata1
@@ -197,3 +201,13 @@ CREATE TABLE t1(f1 INT, f2 VARCHAR(1), KEY k1(f2),
FULLTEXT KEY(f2),
FOREIGN KEY (f2) REFERENCES t1(f3))ENGINE=InnoDB;
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
+#
+# MDEV-23199 page_compression flag is missing
+# for full_crc32 tablespace
+#
+CREATE TABLE t1(f1 BIGINT PRIMARY KEY)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+ALTER TABLE t1 PAGE_COMPRESSED = 1;
+INSERT INTO t1 VALUES(2);
+# restart
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result
index 40bddd1e760..3758848234a 100644
--- a/mysql-test/suite/innodb/r/temporary_table.result
+++ b/mysql-test/suite/innodb/r/temporary_table.result
@@ -121,6 +121,7 @@ truncate table t1;
select * from t1;
keyc c1 c2
# test condition of full-temp-tablespace
+# restart: --innodb_temp_data_file_path=ibtmp1:12M
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc)) engine = innodb;
@@ -129,6 +130,7 @@ call populate_t1();
ERROR HY000: The table 't1' is full
drop procedure populate_t1;
# test read-only mode
+# restart: --innodb-read-only
# files in MYSQL_DATA_DIR
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
@@ -139,22 +141,27 @@ ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
SET GLOBAL innodb_encrypt_tables=DEFAULT;
# test various bad start-up parameters
FOUND 2 /InnoDB: Unable to create temporary file/ in mysqld.1.err
+# restart: --innodb_data_file_path=ibdata1:12M:autoextend --innodb_temp_data_file_path=ibdata1:12M:autoextend
FOUND 1 /innodb_temporary and innodb_system file names seem to be the same/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# restart: --innodb_temp_data_file_path=foobar:3Gnewraw
FOUND 1 /support raw device/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# restart: --innodb_temp_data_file_path=barbar:3Graw
FOUND 2 /support raw device/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# restart: --innodb_temp_data_file_path=
FOUND 1 /InnoDB: syntax error in file path/ in mysqld.1.err
SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# restart
create temporary table t (
i int)
engine = innodb row_format = compressed;
diff --git a/mysql-test/suite/innodb/r/truncate_crash.result b/mysql-test/suite/innodb/r/truncate_crash.result
index 10ce8e92ab6..0c20e76d331 100644
--- a/mysql-test/suite/innodb/r/truncate_crash.result
+++ b/mysql-test/suite/innodb/r/truncate_crash.result
@@ -6,6 +6,7 @@ SET DEBUG_SYNC='before_trx_state_committed_in_memory SIGNAL c WAIT_FOR ever';
TRUNCATE TABLE t1;
connection default;
SET DEBUG_SYNC='now WAIT_FOR c';
+# restart
disconnect wait;
SELECT COUNT(*) FROM t1;
COUNT(*)
diff --git a/mysql-test/suite/innodb/r/truncate_missing.result b/mysql-test/suite/innodb/r/truncate_missing.result
index 423dc9eb537..938bd5f2213 100644
--- a/mysql-test/suite/innodb/r/truncate_missing.result
+++ b/mysql-test/suite/innodb/r/truncate_missing.result
@@ -10,6 +10,7 @@ t CREATE TABLE `t` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
+# restart
SELECT * FROM t;
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
TRUNCATE TABLE t;
diff --git a/mysql-test/suite/innodb/r/undo_truncate.result b/mysql-test/suite/innodb/r/undo_truncate.result
index 1cc4fb2857c..5be1e5c3426 100644
--- a/mysql-test/suite/innodb/r/undo_truncate.result
+++ b/mysql-test/suite/innodb/r/undo_truncate.result
@@ -1,6 +1,3 @@
-SET @save_undo_logs = @@GLOBAL.innodb_undo_logs;
-SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
-SET @save_truncate = @@GLOBAL.innodb_undo_log_truncate;
SET GLOBAL innodb_undo_log_truncate = 0;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
create table t1(keyc int primary key, c char(100)) engine = innodb;
@@ -34,4 +31,5 @@ connection default;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET GLOBAL innodb_max_purge_lag_wait=0;
set global innodb_fast_shutdown=0;
+# restart
drop table t1, t2;
diff --git a/mysql-test/suite/innodb/r/undo_truncate_recover.result b/mysql-test/suite/innodb/r/undo_truncate_recover.result
index fad69682b84..428a2dec0bb 100644
--- a/mysql-test/suite/innodb/r/undo_truncate_recover.result
+++ b/mysql-test/suite/innodb/r/undo_truncate_recover.result
@@ -11,6 +11,6 @@ set global debug_dbug = '+d,ib_undo_trunc';
commit;
drop table t1;
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
-call mtr.add_suppression("InnoDB: The redo log transaction size ");
SET GLOBAL innodb_fast_shutdown=0;
FOUND 1 /ib_undo_trunc/ in mysqld.1.err
+# restart: with restart_parameters
diff --git a/mysql-test/suite/innodb/r/update_time.result b/mysql-test/suite/innodb/r/update_time.result
index 6014ad4c7b0..50f4f88155f 100644
--- a/mysql-test/suite/innodb/r/update_time.result
+++ b/mysql-test/suite/innodb/r/update_time.result
@@ -27,6 +27,7 @@ XA PREPARE 'xatrx';
CONNECT con1,localhost,root,,;
call mtr.add_suppression("Found 1 prepared XA transactions");
FLUSH TABLES;
+# restart
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
update_time
NULL
diff --git a/mysql-test/suite/innodb/r/update_time_wl6658.result b/mysql-test/suite/innodb/r/update_time_wl6658.result
index fcd7a53351a..fd8f8457758 100644
--- a/mysql-test/suite/innodb/r/update_time_wl6658.result
+++ b/mysql-test/suite/innodb/r/update_time_wl6658.result
@@ -69,6 +69,7 @@ table_name COUNT(update_time)
tab7 1
tab8 1
#restart the server
+# restart
SELECT table_name,update_time
FROM information_schema.tables
WHERE table_name IN ('tab1','tab2','tab3','tab4','tab5','tab7','tab8')
diff --git a/mysql-test/suite/innodb/r/xa_recovery.result b/mysql-test/suite/innodb/r/xa_recovery.result
index a618154804c..ed9f19b7eb3 100644
--- a/mysql-test/suite/innodb/r/xa_recovery.result
+++ b/mysql-test/suite/innodb/r/xa_recovery.result
@@ -12,12 +12,14 @@ INSERT INTO t2 VALUES (1);
XA END 'y';
XA PREPARE 'y';
connection default;
+# restart: --innodb-force-recovery=2
disconnect con1;
disconnect con2;
connect con1,localhost,root;
SELECT * FROM t1 LOCK IN SHARE MODE;
connection default;
DROP TABLE t2;
+# restart
disconnect con1;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t1;
@@ -29,4 +31,5 @@ a
1
DROP TABLE t1;
SET GLOBAL innodb_fast_shutdown=0;
+# restart
XA ROLLBACK 'y';
diff --git a/mysql-test/suite/innodb/r/xa_recovery_debug.result b/mysql-test/suite/innodb/r/xa_recovery_debug.result
index 0a035937b9c..d387bca29b1 100644
--- a/mysql-test/suite/innodb/r/xa_recovery_debug.result
+++ b/mysql-test/suite/innodb/r/xa_recovery_debug.result
@@ -18,6 +18,7 @@ connection default;
SET DEBUG_SYNC='now WAIT_FOR s1';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
DELETE FROM t LIMIT 1;
+# restart
disconnect con1;
XA COMMIT 'zombie';
ERROR XAE04: XAER_NOTA: Unknown XID
diff --git a/mysql-test/suite/innodb/t/alter_algorithm2.test b/mysql-test/suite/innodb/t/alter_algorithm2.test
index cf538e30196..cdece2398f0 100644
--- a/mysql-test/suite/innodb/t/alter_algorithm2.test
+++ b/mysql-test/suite/innodb/t/alter_algorithm2.test
@@ -45,15 +45,19 @@ DROP TABLE t1;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
+SET @save_allowed= @@GLOBAL.innodb_instant_alter_column_allowed;
+SET GLOBAL innodb_instant_alter_column_allowed=never;
+
CREATE TABLE t1(id INT PRIMARY KEY,
col1 INT UNSIGNED NOT NULL UNIQUE)ENGINE=InnoDB;
INSERT INTO t1 VALUES(1,1),(2,2),(3,3);
SET ALTER_ALGORITHM=INSTANT;
---error ER_ALTER_OPERATION_NOT_SUPPORTED
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1 DROP COLUMN col1;
---error ER_ALTER_OPERATION_NOT_SUPPORTED
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1 DROP COLUMN col1, ALGORITHM=NOCOPY;
ALTER TABLE t1 DROP COLUMN col1, ALGORITHM=DEFAULT;
ALTER TABLE t1 DROP PRIMARY KEY, ALGORITHM=DEFAULT;
DROP TABLE t1;
--disable_info
+SET GLOBAL innodb_instant_alter_column_allowed=@save_allowed;
diff --git a/mysql-test/suite/innodb/t/alter_candidate_key.test b/mysql-test/suite/innodb/t/alter_candidate_key.test
index 7429cd89a1a..7c8f5e30993 100644
--- a/mysql-test/suite/innodb/t/alter_candidate_key.test
+++ b/mysql-test/suite/innodb/t/alter_candidate_key.test
@@ -24,6 +24,7 @@ CREATE TABLE t1(f1 INT, f2 INT,
PRIMARY KEY(f1, f2),
UNIQUE INDEX uidx2 (f1, f2),
UNIQUE INDEX uidx1 (f2))ENGINE=InnoDB;
+INSERT INTO t1 VALUES(2, 2);
ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1;
SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter
@@ -42,6 +43,7 @@ DROP TABLE t1;
SET SQL_MODE= strict_trans_tables;
CREATE TABLE t1(a INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL dml WAIT_FOR dml_done';
--send ALTER TABLE t1 MODIFY COLUMN a INT NOT NULL
connection con1;
diff --git a/mysql-test/suite/innodb/t/alter_kill.test b/mysql-test/suite/innodb/t/alter_kill.test
index daaac4bc0ee..2313d63db69 100644
--- a/mysql-test/suite/innodb/t/alter_kill.test
+++ b/mysql-test/suite/innodb/t/alter_kill.test
@@ -2,6 +2,7 @@
# The embedded server does not support restarting in mysql-test-run.
-- source include/not_embedded.inc
-- source include/no_valgrind_without_big.inc
+-- source include/innodb_checksum_algorithm.inc
let MYSQLD_DATADIR=`select @@datadir`;
let PAGE_SIZE=`select @@innodb_page_size`;
@@ -51,20 +52,29 @@ open(FILE, "+<$file") || die "Unable to open $file";
binmode FILE;
my $ps= $ENV{PAGE_SIZE};
my $page;
+die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
+my $full_crc32 = unpack("N",substr($page,54,4)) & 0x10; # FIL_SPACE_FLAGS
sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n";
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
substr($page,4,4)=pack("N",0xc001cafe);
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial);
+ substr($page, $ps-4, 4) = pack("N", $ck);
+}
+else
+{
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+}
sysseek(FILE, 3*$ps, 0) || die "Unable to rewind $file\n";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file";
EOF
--- echo # Restart mysqld
-- source include/start_mysqld.inc
--error ER_NO_SUCH_TABLE_IN_ENGINE
@@ -84,21 +94,29 @@ open(FILE, "+<$file") || die "Unable to open $file";
binmode FILE;
my $ps= $ENV{PAGE_SIZE};
my $page;
+die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
+my $full_crc32 = unpack("N",substr($page,54,4)) & 0x10; # FIL_SPACE_FLAGS
sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n";
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
substr($page,4,4)=pack("N",3);
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial);
+ substr($page, $ps-4, 4) = pack("N", $ck);
+}
+else
+{
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+}
sysseek(FILE, 3*$ps, 0) || die "Unable to rewind $file\n";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file";
EOF
--- echo # Restart the server after uncorrupting the file.
-
-- source include/start_mysqld.inc
INSERT INTO bug16720368 VALUES(9,1);
diff --git a/mysql-test/suite/innodb/t/alter_not_null_debug.test b/mysql-test/suite/innodb/t/alter_not_null_debug.test
index 058f0fc02a5..9c5ba0faff0 100644
--- a/mysql-test/suite/innodb/t/alter_not_null_debug.test
+++ b/mysql-test/suite/innodb/t/alter_not_null_debug.test
@@ -68,5 +68,32 @@ reap;
--disable_info
SELECT * FROM t1;
DROP TABLE t1;
-disconnect con1;
SET DEBUG_SYNC='RESET';
+
+--echo #
+--echo # MDEV-21539 Assertion ...prtype... in row_log_table_apply_convert_mrec
+--echo #
+CREATE TABLE t1 (f VARCHAR(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES('ZERO');
+connection con1;
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done';
+send ALTER TABLE t1 MODIFY f VARCHAR(256) COLLATE latin1_german2_ci NOT NULL;
+
+--echo # session default
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR scanned';
+INSERT INTO t1 VALUES('one');
+SET DEBUG_SYNC = 'now SIGNAL insert_done';
+
+connection con1;
+reap;
+disconnect con1;
+connection default;
+SET DEBUG_SYNC=RESET;
+
+ALTER TABLE t1 CHANGE f eins VARCHAR(257) COLLATE latin1_german1_ci NOT NULL,
+ALGORITHM=INSTANT;
+
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/alter_persistent_autoinc.test b/mysql-test/suite/innodb/t/alter_persistent_autoinc.test
new file mode 100644
index 00000000000..dcaea32700c
--- /dev/null
+++ b/mysql-test/suite/innodb/t/alter_persistent_autoinc.test
@@ -0,0 +1,86 @@
+# Test the ability to remove AUTO_INCREMENT attribute
+--source include/have_innodb.inc
+--source include/have_partition.inc
+
+CREATE TABLE t1 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t1 MODIFY c INT NULL, ALGORITHM=INSTANT;
+INSERT INTO t1 SET c=1;
+
+CREATE TABLE t2 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t2 MODIFY c INT NULL, FORCE, ALGORITHM=INPLACE;
+INSERT INTO t2 SET c=1;
+
+CREATE TABLE t3 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t3 MODIFY c INT NULL, ALGORITHM=INPLACE;
+INSERT INTO t3 SET c=1;
+
+CREATE TABLE t4 (c1 INT AUTO_INCREMENT NULL UNIQUE, c2 INT) ENGINE=InnoDB;
+ALTER TABLE t4 MODIFY c1 INT NULL, CHANGE COLUMN c2 c3 INT, ALGORITHM=INPLACE;
+INSERT INTO t4 SET c1=1;
+
+CREATE TABLE t5 (c1 INT AUTO_INCREMENT NULL UNIQUE, c2 INT, c3 INTEGER GENERATED ALWAYS AS (c2)) ENGINE=InnoDB;
+# ha_innobase::commit_inplace_alter_table() should invoke innobase_reload_table()
+ALTER TABLE t5 MODIFY c1 INT NULL, MODIFY COLUMN c2 INT FIRST, ALGORITHM=INPLACE;
+INSERT INTO t5 SET c1=1;
+
+CREATE TABLE t6 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB
+ PARTITION BY LIST(c) (
+ PARTITION p1 VALUES IN (1),
+ PARTITION p2 VALUES IN (2)
+ );
+ALTER TABLE t6 MODIFY c INT NULL, ALGORITHM=INSTANT;
+INSERT INTO t6 SET c=1;
+INSERT INTO t6 SET c=2;
+
+CREATE TABLE t7 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB
+ PARTITION BY LIST(c) (
+ PARTITION p1 VALUES IN (1),
+ PARTITION p2 VALUES IN (2)
+ );
+ALTER TABLE t7 MODIFY c INT NULL, ALGORITHM=INPLACE;
+INSERT INTO t7 SET c=1;
+INSERT INTO t7 SET c=2;
+
+CREATE TABLE t8 (c1 INT AUTO_INCREMENT NULL UNIQUE, c2 INT) ENGINE=InnoDB
+ PARTITION BY LIST(c1) (
+ PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
+ALTER TABLE t8 MODIFY c1 INT NULL, CHANGE COLUMN c2 c3 INT, ALGORITHM=INPLACE;
+INSERT INTO t8 SET c1=1;
+INSERT INTO t8 SET c1=2;
+
+FLUSH TABLES t1, t2, t3, t4, t5, t6, t7, t8 FOR EXPORT;
+
+--let INNODB_PAGE_SIZE=`select @@innodb_page_size`
+--let MYSQLD_DATADIR = `SELECT @@datadir`
+
+--perl
+my $ps= $ENV{INNODB_PAGE_SIZE};
+my $PAGE_HEADER = 38;
+my $PAGE_ROOT_AUTO_INC = 18;
+print "AUTO_INCREMENT not partitioned: ";
+for (my $i = 1; $i <= 5; ++$i) {
+ my $autoinc= read_autoinc("$ENV{MYSQLD_DATADIR}/test/t$i.ibd");
+ print "$autoinc ";
+}
+print "\n";
+print "AUTO_INCREMENT partitioned: ";
+for (my $i = 6; $i <= 8; ++$i) {
+ my $p1= read_autoinc("$ENV{MYSQLD_DATADIR}/test/t$i#P#p1.ibd");
+ my $p2= read_autoinc("$ENV{MYSQLD_DATADIR}/test/t$i#P#p2.ibd");
+ print "($p1, $p2) ";
+}
+print "\n";
+sub read_autoinc {
+ my $file= shift;
+ open(FILE, "<", $file) || die "Unable to open $file\n";
+ sysseek(FILE, 3*$ps + $PAGE_HEADER + $PAGE_ROOT_AUTO_INC + 4, 0)
+ || die "Unable to seek $file\n";
+ die "Unable to read $file\n" unless sysread(FILE, $_, 4) == 4;
+ my $t1=unpack("N",$_);
+ close(FILE);
+ return $t1;
+}
+EOF
+
+UNLOCK TABLES;
+DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8;
diff --git a/mysql-test/suite/innodb/t/alter_primary_key.test b/mysql-test/suite/innodb/t/alter_primary_key.test
index 4edc0cc023e..bf961c14b43 100644
--- a/mysql-test/suite/innodb/t/alter_primary_key.test
+++ b/mysql-test/suite/innodb/t/alter_primary_key.test
@@ -9,6 +9,7 @@
CREATE TABLE t0 (pk INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t1 (c CHAR(2) NOT NULL) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('cd');
connect (con1,localhost,root,,);
BEGIN;
diff --git a/mysql-test/suite/innodb/t/alter_rename_files.test b/mysql-test/suite/innodb/t/alter_rename_files.test
index 3ed1cb5d9fa..27408320f7d 100644
--- a/mysql-test/suite/innodb/t/alter_rename_files.test
+++ b/mysql-test/suite/innodb/t/alter_rename_files.test
@@ -11,7 +11,7 @@ SET GLOBAL innodb_log_checkpoint_now=TRUE;
# Start an ALTER TABLE and stop it before renaming the files
SET DEBUG_SYNC='commit_cache_rebuild SIGNAL ready WAIT_FOR finish';
---send ALTER TABLE t1 ADD PRIMARY KEY(x)
+--send ALTER TABLE t1 FORCE;
connect (con1,localhost,root,,);
diff --git a/mysql-test/suite/innodb/t/alter_table.test b/mysql-test/suite/innodb/t/alter_table.test
index 5c06388cdba..ae247e7cada 100644
--- a/mysql-test/suite/innodb/t/alter_table.test
+++ b/mysql-test/suite/innodb/t/alter_table.test
@@ -93,4 +93,34 @@ INNER JOIN information_schema.innodb_sys_tables st ON si.table_id=st.table_id
WHERE st.name='test/t1' ORDER BY sf.index_id,sf.pos;
DROP TABLE t1;
+--echo #
--echo # End of 10.2 tests
+--echo #
+
+--echo #
+--echo # Check that innodb supports transactional=1
+--echo #
+
+create table t1 (a int) transactional=1 engine=aria;
+create table t2 (a int) transactional=1 engine=innodb;
+show create table t1;
+show create table t2;
+alter table t1 engine=innodb;
+alter table t1 add column b int;
+drop table t1,t2;
+
+--echo #
+--echo # MDEV-19272 Assertion unireg_check...Field::NEXT_NUMBER failed
+--echo #
+CREATE TABLE t1 (c INT AUTO_INCREMENT NULL UNIQUE) ENGINE=InnoDB;
+ALTER TABLE t1 MODIFY c INT NOT NULL, ALGORITHM=INPLACE;
+DROP TABLE t1;
+--error ER_WRONG_FIELD_SPEC
+CREATE TABLE t1 (c TIMESTAMP AUTO_INCREMENT UNIQUE) ENGINE=InnoDB;
+--error ER_WRONG_FIELD_SPEC
+CREATE TABLE t1 (c DATETIME AUTO_INCREMENT UNIQUE) ENGINE=InnoDB;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
+
diff --git a/mysql-test/suite/innodb/t/alter_varchar_change.test b/mysql-test/suite/innodb/t/alter_varchar_change.test
index b0d63ca15bd..d1ce5d7403e 100644
--- a/mysql-test/suite/innodb/t/alter_varchar_change.test
+++ b/mysql-test/suite/innodb/t/alter_varchar_change.test
@@ -307,6 +307,30 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE TABLE t1(f1 INT NOT NULL,
+ f2 VARCHAR(128),
+ INDEX idx(f2(40)))ENGINE=InnoDB;
+
+CALL get_table_id("test/t1", @tbl_id);
+ALTER TABLE t1 MODIFY f2 VARCHAR(300);
+CALL get_table_id("test/t1", @tbl1_id);
+
+SELECT @tbl1_id = @tbl_id;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT NOT NULL,
+ f2 VARCHAR(128),
+ INDEX idx(f2(40)))ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+
+CALL get_table_id("test/t1", @tbl_id);
+ALTER TABLE t1 MODIFY f2 VARCHAR(300);
+CALL get_table_id("test/t1", @tbl1_id);
+
+SELECT @tbl1_id = @tbl_id;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT NOT NULL,
f2 VARCHAR(100),
INDEX idx(f2(40)))ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/blob-crash.test b/mysql-test/suite/innodb/t/blob-crash.test
index b36c9318e27..beb500553ea 100644
--- a/mysql-test/suite/innodb/t/blob-crash.test
+++ b/mysql-test/suite/innodb/t/blob-crash.test
@@ -29,6 +29,7 @@ begin;
INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 4*1024*1024));
let $shutdown_timeout=0;
+let $restart_noprint=2;
--source include/restart_mysqld.inc
SELECT a, right(b, 50) FROM t1;
diff --git a/mysql-test/suite/innodb/t/change_column_collation.test b/mysql-test/suite/innodb/t/change_column_collation.test
new file mode 100644
index 00000000000..1ba519535bd
--- /dev/null
+++ b/mysql-test/suite/innodb/t/change_column_collation.test
@@ -0,0 +1,24 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-26294 Duplicate entries in unique index not detected when
+--echo # changing collation with INPLACE algorithm
+--echo #
+
+# Detect the duplicate entry after collation change of column
+
+SET NAMES utf8;
+CREATE TABLE t1 (
+ id INT PRIMARY KEY,
+ msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_swedish_ci UNIQUE
+) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 'aaa');
+INSERT INTO t1 VALUES (2, 'ååå');
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1
+MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
+ALGORITHM=NOCOPY;
+ALTER TABLE t1 DROP INDEX msg,
+MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
+ALGORITHM=NOCOPY;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/corrupted_during_recovery.test b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
index 67f2f2dde40..5f1de1bedf9 100644
--- a/mysql-test/suite/innodb/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
@@ -14,6 +14,7 @@ let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
# Force a redo log checkpoint.
+let $restart_noprint=2;
--source include/restart_mysqld.inc
--source ../include/no_checkpoint_start.inc
CREATE TABLE t2(a BIGINT PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/ddl_purge.test b/mysql-test/suite/innodb/t/ddl_purge.test
index 60d17acead8..e38b68c7bc9 100644
--- a/mysql-test/suite/innodb/t/ddl_purge.test
+++ b/mysql-test/suite/innodb/t/ddl_purge.test
@@ -4,6 +4,7 @@
CREATE TABLE t0 (pk INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(100, 100);
--connect (con1,localhost,root,,test)
BEGIN;
diff --git a/mysql-test/suite/innodb/t/default_row_format_alter.test b/mysql-test/suite/innodb/t/default_row_format_alter.test
index 5eab6d51075..f5dd246efb5 100644
--- a/mysql-test/suite/innodb/t/default_row_format_alter.test
+++ b/mysql-test/suite/innodb/t/default_row_format_alter.test
@@ -130,4 +130,26 @@ SET GLOBAL innodb_default_row_format = @row_format;
--echo # End of 10.3 tests
+--echo #
+--echo # MDEV-23295 Assertion fields[i].same(instant.fields[i]) failed
+--echo #
+SET GLOBAL innodb_default_row_format = @row_format;
+CREATE TABLE t1 (a char(8)) ENGINE=InnoDB DEFAULT CHARSET utf8;
+SET GLOBAL innodb_default_row_format= COMPACT;
+ALTER TABLE t1 ADD b INT;
+SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23345 Assertion not_redundant() == old.not_redundant() failed
+--echo #
+SET GLOBAL innodb_default_row_format = @row_format;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, KEY(b)) ENGINE=InnoDB;
+SET GLOBAL innodb_default_row_format= COMPACT;
+ALTER TABLE t1 DROP b;
+SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+--echo # End of 10.4 tests
+
SET GLOBAL innodb_default_row_format = @row_format;
diff --git a/mysql-test/suite/innodb/t/default_row_format_compatibility.test b/mysql-test/suite/innodb/t/default_row_format_compatibility.test
index 3dea78b2ff0..0868974c9df 100644
--- a/mysql-test/suite/innodb/t/default_row_format_compatibility.test
+++ b/mysql-test/suite/innodb/t/default_row_format_compatibility.test
@@ -1,5 +1,8 @@
--source include/have_innodb.inc
+call mtr.add_suppression("Index for table 'tab' is corrupt; try to repair it");
+
+
SET @row_format = @@GLOBAL.innodb_default_row_format;
# set the variables
@@ -79,7 +82,7 @@ ALTER TABLE tab DISCARD TABLESPACE;
call mtr.add_suppression("InnoDB: Tried to read .* bytes at offset 0");
---error ER_INTERNAL_ERROR
+--error ER_NOT_KEYFILE
ALTER TABLE tab IMPORT TABLESPACE;
--remove_file $MYSQLD_DATADIR/test/tab.ibd
--move_file $MYSQLD_DATADIR/tab.ibd $MYSQLD_DATADIR/test/tab.ibd
diff --git a/mysql-test/suite/innodb/t/doublewrite.combinations b/mysql-test/suite/innodb/t/doublewrite.combinations
new file mode 100644
index 00000000000..4f52013f6fc
--- /dev/null
+++ b/mysql-test/suite/innodb/t/doublewrite.combinations
@@ -0,0 +1,7 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+--innodb-use-atomic-writes=0
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
+--innodb-use-atomic-writes=0
diff --git a/mysql-test/suite/innodb/t/doublewrite.test b/mysql-test/suite/innodb/t/doublewrite.test
index 7c8c1180adb..62e8549f21b 100644
--- a/mysql-test/suite/innodb/t/doublewrite.test
+++ b/mysql-test/suite/innodb/t/doublewrite.test
@@ -19,11 +19,14 @@ call mtr.add_suppression("InnoDB: New log files created");
call mtr.add_suppression("InnoDB: Cannot create doublewrite buffer: the first file in innodb_data_file_path must be at least (3|6|12)M\\.");
call mtr.add_suppression("InnoDB: Database creation was aborted");
call mtr.add_suppression("Plugin 'InnoDB' (init function returned error|registration as a STORAGE ENGINE failed)");
+call mtr.add_suppression("InnoDB: A bad Space ID was found in datafile.*");
+call mtr.add_suppression("InnoDB: Checksum mismatch in datafile: .*");
--enable_query_log
--source include/restart_mysqld.inc
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
let MYSQLD_DATADIR=`select @@datadir`;
+let ALGO=`select @@innodb_checksum_algorithm`;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
show variables like 'innodb_doublewrite';
@@ -75,14 +78,22 @@ perl;
use IO::Handle;
do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
my $polynomial = 0x82f63b78; # CRC-32C
+my $algo = $ENV{ALGO};
+die "Unsupported innodb_checksum_algorithm=$algo\n" unless $algo =~ /crc32/;
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd";
my $page_size = $ENV{INNODB_PAGE_SIZE};
my $page;
+do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
open(FILE, "+<", $fname) or die;
sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n";
+my $page1 = $page;
+substr($page1, 34, 4) = pack("N", 0);
+my $polynomial0 = 0x82f63b78; # CRC-32C
+my $ck0 = mycrc32(substr($page1, 0, ($page_size-4)), 0, $polynomial0);
+substr($page1, ($page_size - 4), 4) = pack("N", $ck0);
sysseek(FILE, 0, 0)||die "Unable to seek $fname\n";
-die unless syswrite(FILE, chr(0) x $page_size, $page_size) == $page_size;
+die unless syswrite(FILE, $page1, $page_size) == $page_size;
close FILE;
open(FILE, "+<", "$ENV{MYSQLD_DATADIR}ibdata1")||die "cannot open ibdata1\n";
@@ -105,12 +116,21 @@ for (my $d = $d1; $d < $d2 + 64; $d++)
$badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE
substr ($_, 54, 4) = pack("N", $badflags);
- # Replace the innodb_checksum_algorithm=crc32 checksum
- my $ck= pack("N",
- mycrc32(substr($_, 4, 22), 0, $polynomial) ^
- mycrc32(substr($_, 38, $page_size - 38 - 8), 0, $polynomial));
- substr ($_, 0, 4) = $ck;
- substr ($_, $page_size - 8, 4) = $ck;
+ if ($algo =~ /full_crc32/)
+ {
+ my $ck = mycrc32(substr($_, 0, $page_size - 4), 0, $polynomial);
+ substr($_, $page_size - 4, 4) = pack("N", $ck);
+ }
+ else
+ {
+ # Replace the innodb_checksum_algorithm=crc32 checksum
+ my $ck= pack("N",
+ mycrc32(substr($_, 4, 22), 0, $polynomial) ^
+ mycrc32(substr($_, 38, $page_size - 38 - 8), 0,
+ $polynomial));
+ substr ($_, 0, 4) = $ck;
+ substr ($_, $page_size - 8, 4) = $ck;
+ }
syswrite(FILE, $_, $page_size)==$page_size||die;
close(FILE);
exit 0;
@@ -153,10 +173,12 @@ set global innodb_buf_flush_list_now = 1;
perl;
use IO::Handle;
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd";
+my $page_size = $ENV{INNODB_PAGE_SIZE};
open(FILE, "+<", $fname) or die;
-FILE->autoflush(1);
-binmode FILE;
-print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'}/2);
+sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n";
+substr($page, 28, 4) = pack("N", 1000);
+sysseek(FILE, 0, 0)||die "Unable to seek $fname\n";
+die unless syswrite(FILE, $page, $page_size) == $page_size;
close FILE;
EOF
diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test
index dda87359df9..b93f82c93ef 100644
--- a/mysql-test/suite/innodb/t/foreign-keys.test
+++ b/mysql-test/suite/innodb/t/foreign-keys.test
@@ -145,7 +145,6 @@ SET lock_wait_timeout=0;
UPDATE t2 SET pk=10 WHERE pk=1;
PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1';
DEALLOCATE PREPARE stmt;
-FLUSH TABLE t2;
SET debug_sync='now SIGNAL go';
connection default;
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test
index 3fdaccbc42a..4f3f07757d5 100644
--- a/mysql-test/suite/innodb/t/foreign_key.test
+++ b/mysql-test/suite/innodb/t/foreign_key.test
@@ -910,4 +910,26 @@ DROP TABLE t;
--echo # End of 10.3 tests
+# MDEV-21792 Server aborts upon attempt to create foreign key on spatial field
+# Fail to create foreign key for spatial fields
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
+ FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;
+
+--echo #
+--echo # MDEV-23675 Assertion `pos < table->n_def' in dict_table_get_nth_col
+--echo #
+CREATE TABLE t1 (pk int PRIMARY KEY, a INT, b INT, c INT, KEY(c),
+FOREIGN KEY fx (b) REFERENCES t1 (c))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,0,10,10);
+ALTER TABLE t1 DROP a, ALGORITHM=INSTANT;
+SET FOREIGN_KEY_CHECKS= 0;
+DROP INDEX fx ON t1;
+INSERT INTO t1 VALUES (2,11,11);
+DROP TABLE t1;
+SET FOREIGN_KEY_CHECKS=DEFAULT;
+
+-- echo # End of 10.4 tests
+
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/foreign_key_debug.test b/mysql-test/suite/innodb/t/foreign_key_debug.test
index 75d05801b5f..166cfb7c84e 100644
--- a/mysql-test/suite/innodb/t/foreign_key_debug.test
+++ b/mysql-test/suite/innodb/t/foreign_key_debug.test
@@ -54,12 +54,11 @@ send ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE;
connect con1, localhost, root;
SET debug_sync='now WAIT_FOR ready';
-SET lock_wait_timeout=1; # change to 0 in 10.3
+SET lock_wait_timeout=0;
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t2 SET pk=10 WHERE pk=1;
PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1';
DEALLOCATE PREPARE stmt;
-FLUSH TABLE t2;
SET debug_sync='now SIGNAL go';
connection default;
diff --git a/mysql-test/suite/innodb/t/full_crc32_import.opt b/mysql-test/suite/innodb/t/full_crc32_import.opt
new file mode 100644
index 00000000000..ac859973988
--- /dev/null
+++ b/mysql-test/suite/innodb/t/full_crc32_import.opt
@@ -0,0 +1 @@
+--innodb_checksum_algorithm=full_crc32
diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test
new file mode 100644
index 00000000000..c9195111c05
--- /dev/null
+++ b/mysql-test/suite/innodb/t/full_crc32_import.test
@@ -0,0 +1,210 @@
+-- source include/have_innodb.inc
+# This test is slow on buildbot.
+--source include/big_test.inc
+
+FLUSH TABLES;
+
+let $MYSQLD_TMPDIR = `SELECT @@tmpdir`;
+let $MYSQLD_DATADIR = `SELECT @@datadir`;
+
+--echo # Treating compact format as dynamic format after import stmt
+
+CREATE TABLE t1
+(a int AUTO_INCREMENT PRIMARY KEY,
+ b blob,
+ c blob,
+ KEY (b(200))) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+
+INSERT INTO t1 (b, c) values (repeat("ab", 200), repeat("bc", 200));
+INSERT INTO t1 (b, c) values (repeat("bc", 200), repeat("cd", 200));
+INSERT INTO t1 (b, c) values (repeat("cd", 200), repeat("ef", 200));
+INSERT INTO t1 (b, c) values (repeat("de", 200), repeat("fg", 200));
+INSERT INTO t1 (b, c) values (repeat("ef", 200), repeat("gh", 200));
+INSERT INTO t1 (b, c) values (repeat("fg", 200), repeat("hi", 200));
+INSERT INTO t1 (b, c) values (repeat("gh", 200), repeat("ij", 200));
+INSERT INTO t1 (b, c) values (repeat("hi", 200), repeat("jk", 200));
+INSERT INTO t1 (b, c) values (repeat("ij", 200), repeat("kl", 200));
+INSERT INTO t1 (b, c) values (repeat("jk", 200), repeat("lm", 200));
+INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
+INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
+SELECT COUNT(*) FROM t1;
+
+FLUSH TABLE t1 FOR EXPORT;
+--echo # List before copying files
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+
+--list_files $MYSQLD_DATADIR/test
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+
+UNLOCK TABLES;
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DISCARD TABLESPACE;
+
+--list_files $MYSQLD_DATADIR/test
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_discard_tablespaces("test", "t1");
+ib_restore_tablespaces("test", "t1");
+EOF
+
+--remove_file $MYSQLD_DATADIR/test/t1.cfg
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 IMPORT TABLESPACE;
+ALTER TABLE t1 DROP INDEX b;
+--disable_warnings
+ALTER TABLE t1 IMPORT TABLESPACE;
+--enable_warnings
+SHOW CREATE TABLE t1;
+UPDATE t1 set b = repeat("de", 100) where b = repeat("cd", 200);
+--replace_column 9 #
+explain SELECT a FROM t1 where b = repeat("de", 100);
+SELECT a FROM t1 where b = repeat("de", 100);
+SELECT COUNT(*) FROM t1;
+DELETE FROM t1;
+--source include/wait_all_purged.inc
+CHECK TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1
+(c1 int AUTO_INCREMENT PRIMARY KEY,
+ c2 POINT NOT NULL,
+ c3 LINESTRING NOT NULL,
+ SPATIAL INDEX idx1(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+
+INSERT INTO t1(c2,c3) VALUES(
+ ST_GeomFromText('POINT(10 10)'),
+ ST_GeomFromText('LINESTRING(5 5,20 20,30 30)'));
+
+INSERT INTO t1(c2,c3) VALUES(
+ ST_GeomFromText('POINT(20 20)'),
+ ST_GeomFromText('LINESTRING(5 15,20 10,30 20)'));
+
+INSERT INTO t1(c2,c3) VALUES(
+ ST_GeomFromText('POINT(30 30)'),
+ ST_GeomFromText('LINESTRING(10 5,20 24,30 32)'));
+
+INSERT INTO t1(c2,c3) VALUES(
+ ST_GeomFromText('POINT(40 40)'),
+ ST_GeomFromText('LINESTRING(15 5,25 20,35 30)'));
+
+INSERT INTO t1(c2,c3) VALUES(
+ ST_GeomFromText('POINT(50 10)'),
+ ST_GeomFromText('LINESTRING(15 15,24 10,31 20)'));
+
+INSERT INTO t1(c2,c3) VALUES(
+ ST_GeomFromText('POINT(60 50)'),
+ ST_GeomFromText('LINESTRING(10 15,20 44,35 32)'));
+
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+INSERT INTO t1(c2, c3) SELECT c2, c3 FROM t1;
+
+FLUSH TABLE t1 FOR EXPORT;
+--echo # List before copying files
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+
+--list_files $MYSQLD_DATADIR/test
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+
+UNLOCK TABLES;
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DISCARD TABLESPACE;
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_discard_tablespaces("test", "t1");
+ib_restore_tablespaces("test", "t1");
+EOF
+
+--remove_file $MYSQLD_DATADIR/test/t1.cfg
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 IMPORT TABLESPACE;
+--enable_warnings
+ALTER TABLE t1 DROP INDEX idx1;
+--replace_regex /opening '.*\/test\//opening '.\/test\//
+ALTER TABLE t1 IMPORT TABLESPACE;
+--disable_warnings
+SHOW CREATE TABLE t1;
+UPDATE t1 SET C2 = ST_GeomFromText('POINT(0 0)');
+SELECT COUNT(*) FROM t1;
+DELETE FROM t1;
+CHECK TABLE t1;
+--source include/wait_all_purged.inc
+DROP TABLE t1;
+
+SET @save_algo = @@GLOBAL.innodb_compression_algorithm;
+--error 0,ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_compression_algorithm=2;
+CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+
+FLUSH TABLE t1 FOR EXPORT;
+--echo # List before copying files
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+
+--list_files $MYSQLD_DATADIR/test
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+
+UNLOCK TABLES;
+SET GLOBAL innodb_compression_algorithm=0;
+ALTER TABLE t1 FORCE;
+ALTER TABLE t1 DISCARD TABLESPACE;
+
+--list_files $MYSQLD_DATADIR/test
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_discard_tablespaces("test", "t1");
+ib_restore_tablespaces("test", "t1");
+EOF
+
+ALTER TABLE t1 IMPORT TABLESPACE;
+INSERT INTO t1 VALUES(2);
+SELECT * FROM t1;
+
+
+--error 0,ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_compression_algorithm=3;
+FLUSH TABLE t1 FOR EXPORT;
+--echo # List before copying files
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+
+--list_files $MYSQLD_DATADIR/test
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+
+UNLOCK TABLES;
+SET GLOBAL innodb_compression_algorithm=0;
+ALTER TABLE t1 FORCE;
+ALTER TABLE t1 DISCARD TABLESPACE;
+
+--list_files $MYSQLD_DATADIR/test
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_discard_tablespaces("test", "t1");
+ib_restore_tablespaces("test", "t1");
+EOF
+
+ALTER TABLE t1 IMPORT TABLESPACE;
+INSERT INTO t1 VALUES(3);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SET GLOBAL innodb_compression_algorithm=@save_algo;
diff --git a/mysql-test/suite/innodb/t/ibuf_not_empty.combinations b/mysql-test/suite/innodb/t/ibuf_not_empty.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/ibuf_not_empty.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/innodb/t/ibuf_not_empty.test b/mysql-test/suite/innodb/t/ibuf_not_empty.test
index 43f09bf6828..a3f4ad9ac5c 100644
--- a/mysql-test/suite/innodb/t/ibuf_not_empty.test
+++ b/mysql-test/suite/innodb/t/ibuf_not_empty.test
@@ -61,15 +61,24 @@ open(FILE, "+<$file") || die "Unable to open $file";
binmode FILE;
my $ps= $ENV{PAGE_SIZE};
my $page;
-sysseek(FILE, $ps, 0) || die "Unable to seek $file\n";
+die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
+my $full_crc32 = unpack("N",substr($page,54,4)) & 0x10; # FIL_SPACE_FLAGS
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
# Clean the change buffer bitmap.
substr($page,38,$ps - 38 - 8) = chr(0) x ($ps - 38 - 8);
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
- mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial);
+ substr($page, $ps-4, 4) = pack("N", $ck);
+}
+else
+{
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+ mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+}
sysseek(FILE, $ps, 0) || die "Unable to rewind $file\n";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file";
@@ -93,12 +102,21 @@ my $ps= $ENV{PAGE_SIZE};
my $pages=5;
my $page;
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
+my $full_crc32 = unpack("N",substr($page,54,4)) & 0x10; # FIL_SPACE_FLAGS
substr($page,46,4)=pack("N", $pages);
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
- mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial);
+ substr($page, $ps-4, 4) = pack("N", $ck);
+}
+else
+{
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+ mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+}
sysseek(FILE, 0, 0) || die "Unable to rewind $file\n";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
truncate(FILE, $ps * $pages);
diff --git a/mysql-test/suite/innodb/t/import_bugs.test b/mysql-test/suite/innodb/t/import_bugs.test
new file mode 100644
index 00000000000..42bb5d90ef9
--- /dev/null
+++ b/mysql-test/suite/innodb/t/import_bugs.test
@@ -0,0 +1,19 @@
+--source include/have_innodb.inc
+
+call mtr.add_suppression("Index for table 'imp_t1' is corrupt; try to repair it");
+
+SET @save_innodb_checksum_algorithm=@@GLOBAL.innodb_checksum_algorithm;
+SET GLOBAL innodb_checksum_algorithm=full_crc32;
+
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE imp_t1 DISCARD TABLESPACE ;
+FLUSH TABLES t1 FOR EXPORT;
+let $datadir=`select @@datadir`;
+--copy_file $datadir/test/t1.ibd $datadir/test/imp_t1.ibd
+UNLOCK TABLES;
+--error ER_TABLE_SCHEMA_MISMATCH
+ALTER TABLE imp_t1 IMPORT TABLESPACE;
+DROP TABLE imp_t1, t1;
+
+SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
index cbf8ff9e87f..dac176f3b77 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
@@ -80,7 +80,7 @@ BEGIN;
DELETE FROM mysql.innodb_table_stats;
connect (con2,localhost,root,,);
-SET DEBUG_SYNC='inplace_after_index_build SIGNAL blocked WAIT_FOR ever';
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL blocked WAIT_FOR ever';
send ALTER TABLE t1 FORCE;
connection default;
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index d1adc4c91c0..0bedbdc7bbb 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -207,7 +207,7 @@ CREATE TABLE tu (
) ENGINE=InnoDB;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE;
-# Instant ADD COLUMN (adding after the visible FTS_DOC_ID)
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE;
DROP TABLE tu;
@@ -218,7 +218,7 @@ CREATE TABLE tv (
) ENGINE=InnoDB;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE;
-# Instant ADD COLUMN (adding after the visible FTS_DOC_ID)
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE;
DROP TABLE tv;
diff --git a/mysql-test/suite/innodb/t/innodb-index-debug.test b/mysql-test/suite/innodb/t/innodb-index-debug.test
index 2988a89c651..6e31200570b 100644
--- a/mysql-test/suite/innodb/t/innodb-index-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-index-debug.test
@@ -96,6 +96,7 @@ drop table t1;
# Log file creation failure.
create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
+INSERT INTO t1 VALUES(1, "test", "test");
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
send ALTER TABLE t1 FORCE, ADD COLUMN k4 int;
@@ -122,6 +123,7 @@ drop table t480;
--echo #
CREATE TABLE t1 (j INT UNIQUE, i INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(2, 2);
--connect (con1,localhost,root,,test)
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL built WAIT_FOR log';
--send
diff --git a/mysql-test/suite/innodb/t/innodb-index-online.test b/mysql-test/suite/innodb/t/innodb-index-online.test
index d0f477cd0ef..fc9fed71406 100644
--- a/mysql-test/suite/innodb/t/innodb-index-online.test
+++ b/mysql-test/suite/innodb/t/innodb-index-online.test
@@ -225,8 +225,7 @@ SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2e_created WAIT_FOR dml2_done';
# Ensure that the ALTER TABLE will be executed even with some concurrent DML.
SET lock_wait_timeout = 10;
--send
-ALTER TABLE t1 CHANGE c2 c22 INT, DROP INDEX c2d, ADD INDEX c2e(c22),
-ALGORITHM = INPLACE;
+ALTER TABLE t1 CHANGE c2 c22 INT, DROP INDEX c2d, ADD INDEX c2e(c22, c3(10)), ALGORITHM = NOCOPY;
# Generate some log (delete-mark, delete-unmark, insert etc.)
# while the index creation is blocked. Some of this may run
@@ -474,6 +473,7 @@ DROP TABLE t1;
--echo # MDEV-13205 assertion !dict_index_is_online_ddl(index) upon ALTER TABLE
--echo #
CREATE TABLE t1 (c VARCHAR(64)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('foo');
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL t1u_created WAIT_FOR dup_done';
send ALTER TABLE t1 ADD UNIQUE(c);
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index 474b0e08935..9350672bee9 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -1159,7 +1159,9 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
if ($have_debug) {
# Initiate shutdown in order to issue a redo log checkpoint and to discard
# the redo log record that was emitted due to '+d,fil_names_write_bogus'.
+--let $restart_noprint=2
--source include/restart_mysqld.inc
+--let $restart_noprint=0
}
SELECT * FROM t1;
diff --git a/mysql-test/suite/innodb/t/innodb-rollback.test b/mysql-test/suite/innodb/t/innodb-rollback.test
new file mode 100644
index 00000000000..1d3e05b021f
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-rollback.test
@@ -0,0 +1,17 @@
+--source include/have_innodb.inc
+
+#
+# MDEV-18632: wsrep_is_wsrep_xid: Conditional jump or move depends on uninitialised value
+#
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+--connect (con1,localhost,root,,test)
+ALTER TABLE t1;
+--connect (con2,localhost,root,,test)
+--error ER_SP_DOES_NOT_EXIST
+SELECT f() FROM t1;
+
+# Cleanup
+--disconnect con2
+--disconnect con1
+--connection default
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index b2809aa0669..79ea4753904 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -17,6 +17,7 @@
--source include/default_charset.inc
--source include/have_sequence.inc
+let $restart_noprint=2;
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
@@ -1013,20 +1014,6 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_restore_tablespaces("test", "t1");
EOF
-# Test failure after importing the cluster index
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-
---error ER_NOT_KEYFILE
-ALTER TABLE t1 IMPORT TABLESPACE;
-
-SET SESSION debug_dbug=@saved_debug_dbug;
-
-# Left over from the failed IMPORT
-perl;
-do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
-ib_unlink_tablespace("test", "t1");
-EOF
-
DROP TABLE t1;
--disable_query_log
@@ -1388,7 +1375,7 @@ SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
--replace_regex /'.*t1.cfg'/'t1.cfg'/
---error ER_INTERNAL_ERROR
+--error ER_NOT_KEYFILE
ALTER TABLE t1 IMPORT TABLESPACE;
SET SESSION debug_dbug=@saved_debug_dbug;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test
index bebc6132d1b..47ea4325403 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522.test
@@ -3,6 +3,7 @@
-- source include/have_innodb.inc
-- source include/have_sequence.inc
+-- source include/innodb_checksum_algorithm.inc
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT\\.");
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
@@ -10,6 +11,7 @@ FLUSH TABLES;
let $MYSQLD_TMPDIR = `SELECT @@tmpdir`;
let $MYSQLD_DATADIR = `SELECT @@datadir`;
+let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`;
CREATE TABLE t1
(a INT AUTO_INCREMENT PRIMARY KEY,
@@ -78,8 +80,19 @@ ALTER TABLE t2 DISCARD TABLESPACE;
--error ER_TABLE_SCHEMA_MISMATCH
ALTER TABLE t2 IMPORT TABLESPACE;
--remove_file $MYSQLD_DATADIR/test/t2.cfg
+
+let $error_code = ER_TABLE_SCHEMA_MISMATCH;
+
+if ($checksum_algorithm == "full_crc32") {
+ let $error_code = 0;
+}
+
+if ($checksum_algorithm == "strict_full_crc32") {
+ let $error_code = 0;
+}
+
--replace_regex /(FSP_SPACE_FLAGS=0x)[0-9a-f]+(,.*0x)[0-9a-f]+(.*)/\1*\2*\3/
---error ER_TABLE_SCHEMA_MISMATCH
+--error $error_code
ALTER TABLE t2 IMPORT TABLESPACE;
DROP TABLE t2;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index a7f8159d61b..ba5126e4757 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -1321,8 +1321,7 @@ drop table t1;
# Test for testable InnoDB status variables. This test
# uses previous ones(pages_created, rows_deleted, ...).
---replace_result 511 ok 512 ok 2047 ok 513 ok 514 ok 515 ok
-SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+SELECT IF(variable_value BETWEEN 488 AND 512, 'OK', variable_value) FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test
index d1e17c7622a..d770e719601 100644
--- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test
+++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test
@@ -80,6 +80,7 @@ select @@global.innodb_adaptive_hash_index;
connection con2;
# - analyze table
+set use_stat_tables=never;
--send analyze table t2
connection con3;
diff --git a/mysql-test/suite/innodb/t/innodb_bug68148.test b/mysql-test/suite/innodb/t/innodb_bug68148.test
index 2741c3cba3d..ab4e0311656 100644
--- a/mysql-test/suite/innodb/t/innodb_bug68148.test
+++ b/mysql-test/suite/innodb/t/innodb_bug68148.test
@@ -28,7 +28,6 @@ SET FOREIGN_KEY_CHECKS=0;
DROP INDEX `idx_1` ON `main`;
SHOW TABLES;
---echo # restart and see if we can still access the main table
--source include/restart_mysqld.inc
ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`);
diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test b/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test
index 83a12431802..34c9336e517 100644
--- a/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test
+++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test
@@ -5,6 +5,7 @@
# Test Restart & Crash Recovery.
-- source include/big_test.inc
-- source include/innodb_page_size_small.inc
+let $restart_noprint=2;
# Test Row Format: REDUNDANT.
let $row_format = REDUNDANT;
diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test
index 23bba81c6bd..d495186db25 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test
@@ -850,6 +850,7 @@ set @optimizer_switch_saved=@@optimizer_switch;
SET SESSION optimizer_switch='derived_merge=off';
SET SESSION sort_buffer_size = 1024*36;
+--replace_column 9 #
EXPLAIN
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
diff --git a/mysql-test/suite/innodb/t/innodb_stats.test b/mysql-test/suite/innodb/t/innodb_stats.test
index b9f71f8fa6f..1a962e3568e 100644
--- a/mysql-test/suite/innodb/t/innodb_stats.test
+++ b/mysql-test/suite/innodb/t/innodb_stats.test
@@ -9,6 +9,9 @@
DROP TABLE IF EXISTS test_innodb_stats;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= NEVER;
+
CREATE TABLE test_innodb_stats (
a INT,
KEY a_key (a)
@@ -59,3 +62,4 @@ CREATE TABLE test_innodb_stats (
-- disable_query_log
DROP TABLE test_innodb_stats;
+set @@use_stat_tables= @save_use_stat_tables;
diff --git a/mysql-test/suite/innodb/t/innodb_stats_fetch.test b/mysql-test/suite/innodb/t/innodb_stats_fetch.test
index 8544509ccad..549ad65feff 100644
--- a/mysql-test/suite/innodb/t/innodb_stats_fetch.test
+++ b/mysql-test/suite/innodb/t/innodb_stats_fetch.test
@@ -11,6 +11,9 @@
-- vertical_results
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
CREATE TABLE test_ps_fetch
(a INT, b INT, c INT, d INT, PRIMARY KEY (a, b), INDEX idx (c, d))
ENGINE=INNODB STATS_PERSISTENT=1;
@@ -77,3 +80,4 @@ table_rows, avg_row_length, max_data_length, index_length
FROM information_schema.tables WHERE table_name = 'test_ps_fetch';
DROP TABLE test_ps_fetch;
+set @@use_stat_tables = @save_use_stat_tables;
diff --git a/mysql-test/suite/innodb/t/instant_alter.test b/mysql-test/suite/innodb/t/instant_alter.test
index 6d5c4e96d26..3872f080d6b 100644
--- a/mysql-test/suite/innodb/t/instant_alter.test
+++ b/mysql-test/suite/innodb/t/instant_alter.test
@@ -1,11 +1,12 @@
--source include/innodb_page_size.inc
+--source include/have_sequence.inc
--echo #
--echo # MDEV-11369: Instant ADD COLUMN for InnoDB
--echo #
SET @saved_allowance = @@GLOBAL.innodb_instant_alter_column_allowed;
-SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
@@ -200,9 +201,19 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
connection default;
+if ($redundant_4k)
+{
+--error ER_TOO_BIG_ROWSIZE
+ALTER TABLE t2 DROP p;
+SET innodb_strict_mode = OFF;
+}
--enable_info
ALTER TABLE t2 DROP p;
--disable_info
+if ($redundant_4k)
+{
+SET innodb_strict_mode = ON;
+}
SELECT * FROM t2;
# datetime
@@ -426,15 +437,503 @@ ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
ALTER TABLE t1 MODIFY a INT DEFAULT 0;
--disable_info
ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
-DROP TABLE t1;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+SET GLOBAL innodb_instant_alter_column_allowed = add_drop_reorder;
+ALTER TABLE t1 MODIFY b TEXT FIRST, ALGORITHM=INSTANT;
SET GLOBAL innodb_instant_alter_column_allowed = add_last;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 MODIFY a INT DEFAULT 1, ALGORITHM=INSTANT;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 ADD d TEXT AFTER a, ALGORITHM=INSTANT;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 MODIFY a INT DEFAULT 0, ALGORITHM=INSTANT;
+--enable_info
+ALTER TABLE t1 MODIFY a INT DEFAULT 0;
+--disable_info
+ALTER TABLE t1 MODIFY a INT DEFAULT NULL, ALGORITHM=INSTANT;
+DROP TABLE t1;
+SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
+
+# MDEV-15562 Instant DROP/ADD/reorder columns
+
+eval CREATE TABLE t1 (a INT, b INT UNIQUE) $engine;
+INSERT INTO t1 (a) VALUES (NULL), (NULL);
+ALTER TABLE t1 DROP a, ADD COLUMN a INT;
+DELETE FROM t1;
+BEGIN;INSERT INTO t1 SET a=NULL;ROLLBACK;
+DELETE FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) $engine;
+INSERT INTO t1 VALUES(347,'');
+ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (a INT) $engine;
+INSERT INTO t1() VALUES();
+ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (t TEXT) $engine;
+SET @t=REPEAT('x',@@innodb_page_size / 2);
+INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t);
+ALTER TABLE t1 ADD COLUMN a INT FIRST;
+UPDATE t1 SET a = 0;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (t TEXT) $engine;
+INSERT INTO t1 SET t = @x;
+ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1;
+ALTER TABLE t1 ADD COLUMN t TEXT;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+#
+# MDEV-17735 Assertion failure in row_parse_int() on first ADD/DROP COLUMN
+# when an AUTO_INCREMENT column is not in PRIMARY KEY
+#
+eval CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) $engine;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (i INT) $engine;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-17721 Corrupted data dictionary after instant DROP COLUMN
+eval CREATE TABLE t1 (ts TIMESTAMP) $engine;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) $engine;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) $engine;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+
+# MDEV-17901 Crash after instant DROP COLUMN of AUTO_INCREMENT column
+eval CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) $engine;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+# Adding AUTO_INCREMENT column will always require rebuild.
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-18149 Crash after DROP COLUMN of AUTO_INCREMENT column on nonempty table
+eval CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) $engine;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-18076/MDEV-18077 Crash on AUTO_INCREMENT column after instant DROP
+eval CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) $engine;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+
+eval CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+$engine;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+
+# MDEV-17763 Assertion `len == 20U' failed in rec_convert_dtuple_to_rec_comp
+# upon DROP COLUMN
+eval CREATE TABLE t1 (
+ pk INT PRIMARY KEY,
+ f1 INT,
+ f2 CHAR(255),
+ f3 BIGINT,
+ f4 INT,
+ f5 CHAR(255),
+ f6 CHAR(255),
+ f7 CHAR(255) NOT NULL,
+ f8 INT,
+ f9 CHAR(10)
+) $engine;
+
+INSERT INTO t1 VALUES
+ (1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+ (2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+ (3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+ (4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+ (5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+ (6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+ (7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+ (8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+ (9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+ (10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+ (11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+ (12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+ (13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+ (14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+ (15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+
+DELETE FROM t1 WHERE pk=1;
+--source include/wait_all_purged.inc
+INSERT INTO t1 VALUES
+ (1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+
+# MDEV-17820 Assertion failures on DROP COLUMN
+eval CREATE TABLE t1 (
+ pk INT PRIMARY KEY,
+ f1 INT, f2 CHAR(32) NOT NULL,
+ f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+ f7 CHAR(32), f8 CHAR(32)
+) $engine;
+
+INSERT INTO t1 VALUES
+ (1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+ (3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+ (5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+ (7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+ (9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+ (11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+ (13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+ (15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+ (17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+ (19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+ (21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+ (23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+ (25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+ (51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+ (53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+ (55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+ (57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+ (59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+ (61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+ (63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+ (101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+ (103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+ (105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+ (107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+ (109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+ (151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+ (153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+ (155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+ (157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+ (159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+ (201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+ (203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+ (205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+ (207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+ (252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+ (254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+ (256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+ (258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+ (301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+ (303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+ (305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+ (307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+ (351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+ (353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+ (355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+ (357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+ (359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+ (361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+ (363,75,'',66,76,52,'','','');
+
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) $engine;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+
+# MDEV-18035 Failing assertion on DELETE
+eval CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) $engine;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+
+# MDEV-18048 Failing assertion on ALTER
+eval CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) $engine;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+
+# MDEV-18649 Failing assertion on ALTER for ROW_FORMAT=REDUNDANT
+eval CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) $engine;
+INSERT INTO t1 VALUES (0,0);
+ALTER TABLE t1 MODIFY a INT AFTER b;
+# Exploit MDEV-17468 to force the table definition to be reloaded
+ALTER TABLE t1 ADD COLUMN v INT AS (a) VIRTUAL;
+ALTER TABLE t1 MODIFY b INT NOT NULL AFTER a;
+DROP TABLE t1;
+
+# MDEV-18033/MDEV-18034 Failing assertion on ALTER
+eval CREATE TABLE t1 (a INT NOT NULL) $engine;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+
+# MDEV-18160/MDEV-18162 Failing assertion on ALTER
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) $engine;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) $engine;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+
+# MDEV-18218 Assertion `0' failed in btr_page_reorganize_low upon DROP COLUMN
+eval CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) $engine;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+# this evicts and reloads the table definition until MDEV-17468 is fixed
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+# this would load wrong metadata from the previous DROP COLUMN b, causing a crash
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+
+# MDEV-18315 Assertion instant.fields[i].col->same_format(*fields[i].col)
+# failed in dict_index_t::instant_add_field
+eval CREATE TABLE t1 (a INT, b INT) $engine;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+
+# MDEV-18316 Assertion is_added() failed in dict_col_t::instant_value
+eval CREATE TABLE t1 (a INT, b INT) $engine;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+
+# MDEV-18579 Assertion !ctx->online || num_fts_index == 0
+eval CREATE TABLE t1(t TEXT NOT NULL, FULLTEXT(t)) $engine;
+ALTER TABLE t1 MODIFY COLUMN t TEXT;
+DROP TABLE t1;
+
+# MDEV-18598 Assertions and wrong results after MDEV-15563 extending INT
+eval CREATE TABLE t1 (f TINYINT, g SMALLINT UNSIGNED) $engine;
+INSERT INTO t1 VALUES(127,6502),(-128,33101);
+--enable_info
+ALTER TABLE t1 MODIFY f SMALLINT DEFAULT 12345,
+MODIFY g BIGINT UNSIGNED DEFAULT 1234567;
+--disable_info
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (f BIT(8)) $engine;
+INSERT INTO t1 VALUES (b'10000000'),(b'00000001');
+--enable_info
+ALTER TABLE t1 MODIFY f BIT(16);
+--disable_info
+INSERT INTO t1 VALUES (b'1000000010101111'),(b'10000000');
+SELECT HEX(f) FROM t1;
+--error ER_WARN_DATA_OUT_OF_RANGE
+ALTER TABLE t1 MODIFY f SMALLINT;
+--enable_info
+ALTER TABLE t1 MODIFY f SMALLINT UNSIGNED;
+--disable_info
+SELECT * FROM t1;
+--error ER_DATA_TOO_LONG
+ALTER TABLE t1 MODIFY f BIT;
+--error ER_DATA_TOO_LONG
+ALTER TABLE t1 MODIFY f BIT(15);
+DELETE FROM t1 LIMIT 3;
+--enable_info
+ALTER TABLE t1 MODIFY f BIT(15);
+ALTER TABLE t1 MODIFY f BIT(8);
+--disable_info
+SELECT HEX(f) FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (b BIT NOT NULL) $engine DEFAULT CHARSET utf16;
+INSERT INTO t1 SET b=b'1';
+--enable_info
+ALTER TABLE t1 CHANGE b c BIT NOT NULL;
+--disable_info
+SELECT HEX(c) FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (c VARCHAR(10) NOT NULL DEFAULT 'scary') $engine;
+INSERT INTO t1() VALUES();
+--enable_info
+ALTER TABLE t1 ADD f TINYINT NOT NULL DEFAULT -42;
+ALTER TABLE t1 MODIFY f MEDIUMINT NOT NULL DEFAULT 64802,
+MODIFY c VARCHAR(20) NOT NULL DEFAULT 'gory',
+ADD d DATETIME;
+--disable_info
+INSERT INTO t1() VALUES();
+INSERT INTO t1 (c,f,d) VALUES ('fury', -8388608, now());
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (t TINYINT PRIMARY KEY, m MEDIUMINT UNIQUE) $engine;
+SELECT table_id INTO @table_id1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+INSERT INTO t1 VALUES (-42, -123456);
+--enable_info
+ALTER TABLE t1 CHANGE t s SMALLINT;
+SELECT table_id INTO @table_id2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 CHANGE m i INT, ALGORITHM=INSTANT;
+ALTER TABLE t1 CHANGE m i INT;
+SELECT table_id INTO @table_id3 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name = 'test/t1';
+--disable_info
+SELECT @table_id1 = @table_id2, @table_id2 = @table_id3;
+INSERT IGNORE INTO t1 VALUES (0, -123456);
+REPLACE INTO t1 VALUES(-42, 123456);
+INSERT IGNORE INTO t1 VALUES(32768, 2147483648);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (a SERIAL, b INT, c TINYINT UNIQUE) $engine;
+INSERT INTO t1 (c) VALUES(1),(2),(3);
+--enable_info
+ALTER TABLE t1 MODIFY c BIGINT;
+--disable_info
+UPDATE t1 SET b=1 WHERE c=2;
+UPDATE t1 SET c=4 WHERE a=3;
+UPDATE t1 SET b=2 WHERE c>3;
+--error ER_DUP_ENTRY
+UPDATE t1 SET c=c+1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-18719 Assertion (c.prtype ^ o->prtype) & ... failed on ALTER TABLE
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1)) $engine;
+INSERT INTO t1 VALUES(1,'a');
+ALTER TABLE t1 MODIFY b VARCHAR(256), ADD COLUMN c INT;
+INSERT INTO t1 VALUES(2,'bah',3);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-21088 Table cannot be loaded after instant ADD/DROP COLUMN
+eval CREATE TABLE t1(a CHAR(5) CHARACTER SET utf8 PRIMARY KEY) $engine;
+INSERT INTO t1 VALUES('barf');
+ALTER TABLE t1 ADD b INT FIRST, ALGORITHM=INSTANT;
+# this evicts and reloads the table definition until MDEV-17468 is fixed
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-21148 Assertion failure index->n_core_fields + n_add >= index->n_fields
+eval CREATE TABLE t1 (a INT, b TEXT, PRIMARY KEY(b(9))) $engine;
+ALTER TABLE t1 ADD COLUMN c TEXT FIRST;
+ALTER TABLE t1 ADD COLUMN d TEXT GENERATED ALWAYS AS (SUBSTR(b,1,499)) FIRST;
+DROP TABLE t1;
+
+eval CREATE TABLE t1(a CHAR(5), b INT, c CHAR(1), d CHAR(1), PRIMARY KEY(a,b))
+DEFAULT CHARACTER SET utf8 $engine;
+INSERT INTO t1 SET a='fubar',b=42;
+ALTER TABLE t1 DROP c, DROP d, ALGORITHM=INSTANT;
+# this evicts and reloads the table definition until MDEV-17468 is fixed
+ALTER TABLE t1 ADD vb INT AS (b);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a,b)) $engine;
+ALTER TABLE t1 MODIFY b INT FIRST;
+DROP TABLE t1;
dec $format;
let $redundant_4k= 0;
}
disconnect analyze;
+
+--echo #
+--echo # MDEV-22465: DROP COLUMN is wrongly claimed to be ALGORITHM=INSTANT
+--echo #
+
+CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+ALTER TABLE t1 DROP b, ALGORITHM=NOCOPY;
+DROP TABLE t1;
+
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
+
+--echo #
+--echo # MDEV-18266: Changing an index comment unnecessarily rebuilds index
+--echo #
+
+CREATE TABLE t1(a INT, b INT) ENGINE=INNODB;
+CREATE INDEX i1 ON t1(a) COMMENT 'comment1';
+ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2', ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'
+--echo # failed in dtuple_convert_big_rec
+--echo #
+CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
+ a CHAR(255) NOT NULL,
+ b CHAR(255) NOT NULL, c INT) ENGINE=InnoDB CHARSET utf32;
+ALTER TABLE t1 DROP c;
+INSERT INTO t1(a, b) SELECT '', '' FROM seq_1_to_16;
+SELECT COUNT(*) FROM t1;
+# Cleanup
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-25630 Rollback of instant operation adds wrong
+--echo # column to secondary index
+--echo #
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT, f4 INT,
+ PRIMARY KEY(f1, f4),
+ KEY(f2))ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INT, f2 INT, PRIMARY KEY(f1),
+ FOREIGN KEY fk (f2) REFERENCES t2(f1)
+ )ENGINE=InnoDB;
+
+ALTER TABLE t1 ADD f5 INT;
+SET FOREIGN_KEY_CHECKS=0;
+--error ER_FK_FAIL_ADD_SYSTEM
+ALTER TABLE t1 DROP COLUMN f3, ADD FOREIGN KEY fk (f1)
+ REFERENCES x(x);
+ALTER TABLE t1 DROP COLUMN f5;
+SHOW CREATE TABLE t1;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test
index a7ccefb19af..74e5949818b 100644
--- a/mysql-test/suite/innodb/t/instant_alter_bugs.test
+++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test
@@ -1,5 +1,8 @@
--source include/have_innodb.inc
+SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+
--echo #
--echo # MDEV-17821 Assertion `!page_rec_is_supremum(rec)' failed
--echo # in btr_pcur_store_position
@@ -125,7 +128,7 @@ INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES
INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES ('impact', 'b', 'h', 185, 'fj', 7, 7, 3);
ALTER TABLE t1 ADD COLUMN filler VARCHAR(255) DEFAULT '';
-SELECT * FROM t1 INTO OUTFILE 'load.data';
+SELECT * INTO OUTFILE 'load.data' FROM t1;
UPDATE IGNORE t1 SET pk = 0;
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
HANDLER t1 OPEN AS h;
@@ -205,3 +208,280 @@ SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;
--echo # End of 10.3 tests
+
+
+create table t (
+ a varchar(9),
+ b int,
+ c int,
+ row_start bigint unsigned generated always as row start invisible,
+ row_end bigint unsigned generated always as row end invisible,
+ period for system_time (row_start, row_end)
+) engine=innodb row_format=compressed with system versioning;
+insert into t values (repeat('a', 9), 1, 1);
+set @@system_versioning_alter_history = keep;
+alter table t modify a varchar(10), algorithm=instant;
+alter table t change b bb int, algorithm=instant;
+alter table t modify c int without system versioning, algorithm=instant;
+set @@system_versioning_alter_history = error;
+check table t;
+drop table t;
+
+--echo #
+--echo # MDEV-18219 Assertion `index->n_core_null_bytes <= ...' failed
+--echo # in rec_init_offsets after instant DROP COLUMN
+--echo #
+CREATE TABLE t1 (a INT, b INT NOT NULL) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(0,9),(2,7),(3,1),(3,4),(8,4),(3,7),(6,1),(3,8),(1,2),(4,1),(0,8),(5,3),
+(1,3),(1,6),(2,1),(8,7),(6,0),(1,9),(9,4),(0,6),(9,3),(0,9),(9,4),(2,4),
+(2,7),(7,8),(8,2),(2,5),(6,1),(4,5),(5,3),(6,8),(4,9),(5,7),(7,5),(5,1),
+(8,8),(5,7),(3,8),(0,1),(8,4),(8,3),(9,7),(4,8),(1,1),(0,4),(2,6),(8,5),
+(8,8),(8,7),(6,7),(1,7),(9,6),(3,6),(1,9),(0,3),(5,3),(2,4),(0,6),(2,0),
+(6,5),(1,6),(2,4),(9,1),(3,0),(6,4),(1,3),(0,8),(3,5),(3,1),(8,9),(9,9),
+(7,9),(4,5),(2,2),(3,8),(0,8),(7,1),(2,0),(1,5),(7,3),(4,4),(3,9),(7,2),
+(6,2),(0,4),(2,0),(1,5),(5,7),(4,5),(3,7),(6,0),(2,1),(5,0),(1,0),(2,0),
+(8,4),(5,7),(3,5),(0,5),(7,6),(5,9),(1,2),(4,2),(8,5),(8,7),(2,8),(1,8),
+(4,3),(1,6),(7,8),(3,7),(4,6),(1,1),(3,0),(1,6),(2,0),(3,4),(4,8),(3,9),
+(8,0),(4,9),(4,0),(3,9),(6,4),(7,4),(5,8),(4,7),(7,3),(5,9),(2,3),(7,3),
+(0,4),(5,9),(9,8),(4,2),(3,6),(2,6),(1,8),(7,0),(0,0),(2,3),(1,2),(3,3),
+(2,7),(6,0),(9,0),(6,9),(4,6),(9,8),(0,7),(9,1),(9,6),(4,3),(7,7),(7,7),
+(4,1),(4,7),(7,3),(2,8),(5,8),(8,9),(3,9),(7,7),(0,8),(4,9),(3,2),(5,0),
+(1,7),(0,3),(2,9),(9,7),(7,5),(6,9),(8,5),(3,6),(1,1),(2,8),(7,9),(4,9),
+(6,6),(5,9),(5,3),(9,8),(3,3),(5,6),(0,9),(3,9),(7,9),(7,3),(5,2),(1,4),
+(4,4),(8,2),(2,2),(8,3),(9,1),(4,9),(9,8),(1,8),(1,8),(9,1),(1,1),(3,0),
+(4,6),(9,3),(3,3),(5,2),(0,1),(3,4),(3,2),(1,3),(4,4),(7,0),(4,6),(7,2),
+(4,5),(8,7),(7,8),(8,1),(3,5),(0,6),(3,5),(2,1),(4,4),(3,4),(2,1),(4,1);
+INSERT INTO t1 SELECT * FROM t1;
+ALTER TABLE t1 DROP a;
+# Exploit MDEV-17468 to force the table definition to be reloaded
+ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-19030 Assertion index->n_core_null_bytes <= ... failed
+--echo # in rec_init_offsets after instant DROP COLUMN
+--echo #
+CREATE TABLE t1 (a INT, b INT NOT NULL DEFAULT 0) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES (),(),(),();
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ALTER TABLE t1 FORCE;
+INSERT INTO t1 SELECT * FROM t1;
+ALTER TABLE t1 DROP a, ADD a SMALLINT NOT NULL;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+# Exploit MDEV-17468 to force the table definition to be reloaded
+ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18623 Assertion after DROP FULLTEXT INDEX and removing NOT NULL
+--echo #
+CREATE TABLE t1 (c TEXT NOT NULL, FULLTEXT INDEX ftidx(c)) ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP INDEX ftidx;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 MODIFY c TEXT NULL, ALGORITHM=INSTANT;
+ALTER TABLE t1 MODIFY c TEXT NULL;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20048 dtuple_get_nth_field(): Assertion 'n < tuple->n_fields'
+--echo # failed on ROLLBACK after instant DROP COLUMN
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD b TEXT, ALGORITHM=INSTANT;
+SET @b = REPEAT('b', @@innodb_page_size / 2 + 1);
+INSERT INTO t1 VALUES(2, @b), (3, @b);
+BEGIN;
+DELETE FROM t1 WHERE a=2;
+
+# Stop purge so that it doesn't remove the delete-marked entry.
+connect (purge_control,localhost,root);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+
+COMMIT;
+
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+
+connection purge_control;
+SELECT * FROM t1;
+disconnect purge_control;
+connection default;
+ROLLBACK;
+
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-20479: assertion failure in dict_table_get_nth_col() after INSTANT DROP COLUMN
+--echo #
+
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN (b INT, c INT, d INT, e INT NOT NULL DEFAULT 0);
+ALTER TABLE t1 ADD UNIQUE INDEX(e);
+ALTER TABLE t1 DROP b, DROP c, DROP d, DROP e;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20565 Assertion on CHANGE COLUMN...SYSTEM VERSIONING
+--echo #
+set @@system_versioning_alter_history = keep;
+CREATE TABLE t (a INT WITHOUT SYSTEM VERSIONING, b INT) ENGINE=InnoDB
+WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN a alpha INT WITH SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+
+CREATE TABLE t (alpha INT, b INT) ENGINE=InnoDB WITH SYSTEM VERSIONING;
+ALTER TABLE t CHANGE COLUMN alpha a INT WITHOUT SYSTEM VERSIONING,
+ALGORITHM=INSTANT;
+DROP TABLE t;
+set @@system_versioning_alter_history = error;
+
+--echo #
+--echo # MDEV-20117 Assertion 0 failed in row_sel_get_clust_rec_for_mysql
+--echo #
+
+# This is not repeating the bug itself, but demonstrating that both
+# parts of the fix are needed.
+# To repeat the original bug, we should be somehow able to empty
+# the table of user records while purgeable undo log records exist.
+CREATE TABLE t (b INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t SET b=1;
+ALTER TABLE t ADD COLUMN a INT FIRST, ALGORITHM=INSTANT;
+DELETE FROM t;
+ALTER TABLE t ADD COLUMN c INT, ALGORITHM=INSTANT;
+# If page_cur_delete_rec() emptied the page (and wrongly reset the
+# page type) during the previous ALTER TABLE, the following would hit
+# an assertion failure because of root page type mismatch.
+ALTER TABLE t DROP COLUMN c, ALGORITHM=INSTANT;
+SELECT * FROM t;
+DROP TABLE t;
+
+# The following is nondeterministically repeating the bug in a
+# different scenario: the table is empty at the time the ALTER TABLE
+# is invoked, apparently because purge already processed the records
+# for the DELETE, but not the record for the UPDATE.
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT, e INT) ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+INSERT INTO t1 SET a=2;
+BEGIN;
+UPDATE t1 SET b=1;
+DELETE FROM t1;
+COMMIT;
+
+ALTER TABLE t1 DROP b, DROP c, DROP d, DROP e;
+--source include/wait_all_purged.inc
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20190 Instant operation fails when add column and collation
+--echo # change on non-indexed column
+--echo #
+
+CREATE TABLE t1 (a CHAR)ENGINE=INNODB;
+ALTER TABLE t1 DEFAULT COLLATE= latin1_general_cs;
+ALTER TABLE t1 ADD COLUMN b INT NOT NULL, MODIFY a CHAR, ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DEFAULT COLLATE = latin1_general_cs;
+ALTER TABLE t1 MODIFY a CHAR, ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR NOT NULL) CHARSET latin2 COLLATE latin2_bin
+ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DEFAULT COLLATE = latin2_general_ci;
+ALTER TABLE t1 MODIFY a CHAR, ALGORITHM=INSTANT;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-21645 SIGSEGV in innobase_get_computed_value
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, va INTEGER GENERATED ALWAYS AS (a))
+ENGINE=InnoDB;
+INSERT INTO t1 SET a=1, b=NULL;
+ALTER TABLE t1 MODIFY COLUMN b INT FIRST;
+ALTER TABLE t1 ADD UNIQUE INDEX (va);
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22651 Assertion dict_col_get_fixed_size...
+--echo # in dict_table_t::init_instant()
+--echo #
+--source include/have_innodb.inc
+CREATE TABLE t (i INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t SET i=1;
+ALTER TABLE t ADD e CHAR(255) CHARACTER SET UTF32 FIRST, ALGORITHM=INSTANT;
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-23499 Assertion c.same_type(*o) failed
+--echo #
+CREATE TABLE t (pk SERIAL, b TEXT CHARACTER SET utf8) ENGINE=InnoDB;
+ALTER TABLE t MODIFY b TEXT CHARACTER SET utf8mb4 FIRST;
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-23672 Assertion `v.v_indexes.empty()' failed in dict_table_t::instant_column
+--echo #
+create table t1 (
+ col_int integer,
+ col_text text not null,
+ col_int_g integer generated always as (col_int) unique,
+ col_text_g text generated always as (substr(col_text,1,499)) )
+engine innodb row_format = redundant;
+insert into t1 (col_int,col_text) values (0, 'a'), (null, 'b');
+alter table t1 modify column col_text text null, algorithm = instant;
+insert into t1 (col_int,col_text) values (1, null), (null, null);
+update t1 set col_text= 'd';
+select * from t1;
+check table t1;
+drop table t1;
+
+--echo #
+--echo # MDEV-24072 Assertion 'ib_table.n_v_cols' failed
+--echo # in instant_alter_column_possible()
+--echo #
+CREATE TABLE t (a BLOB) ENGINE=InnoDB;
+INSERT INTO t VALUES ('a');
+--error ER_TRUNCATED_WRONG_VALUE
+ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a+1) VIRTUAL, ADD KEY(c);
+--enable_info
+ALTER TABLE t ADD d INT;
+--disable_info
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-28060 Online DDL fails while checking for instant
+--echo # alter condition
+--echo #
+CREATE TABLE t1(f1 CHAR(10) NOT NULL)ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN(f2 INT NOT NULL, f3 INT NOT NULL,
+ f4 INT NOT NULL, f5 INT NOT NULL),
+ CHANGE COLUMN f1 f1 CHAR(10) DEFAULT NULL;
+DROP TABLE t1;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
+
+--echo #
+--echo # MDEV-26420 Buffer overflow on instant ADD/DROP of generated column
+--echo #
+CREATE TABLE t1 (i int AS (0) STORED, j INT) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN i INT GENERATED ALWAYS AS (1), DROP COLUMN i;
+DROP TABLE t1;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/suite/innodb/t/instant_alter_charset.test b/mysql-test/suite/innodb/t/instant_alter_charset.test
new file mode 100644
index 00000000000..de60c24c0cd
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_charset.test
@@ -0,0 +1,913 @@
+--source include/innodb_row_format.inc
+
+--let $row_format= `SELECT @@GLOBAL.innodb_default_row_format`
+set names utf8;
+
+create table no_rebuild (
+ a char(150) charset utf8mb3 collate utf8mb3_general_ci
+) engine=innodb;
+create table rebuild (
+ a varchar(150) charset ascii
+) engine=innodb;
+
+set @id = (select table_id from information_schema.innodb_sys_tables
+ where name = 'test/no_rebuild');
+select name, prtype, len from information_schema.innodb_sys_columns
+ where table_id = @id;
+select c.prtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+ where t.name = 'test/rebuild' and c.name = 'a';
+alter table no_rebuild
+ change a a char(150) charset utf8mb3 collate utf8mb3_spanish_ci,
+ algorithm=inplace;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table rebuild
+ change a a varchar(150) charset latin1 not null default 'asdf',
+ algorithm=inplace;
+alter table rebuild
+ change a a varchar(150) charset latin1 not null default 'asdf',
+ algorithm=copy;
+select name, prtype, len from information_schema.innodb_sys_columns
+ where table_id = @id;
+select c.prtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+ where t.name = 'test/rebuild' and c.name = 'a';
+
+drop table no_rebuild, rebuild;
+
+create table supported_types (
+ id int primary key auto_increment,
+ a varchar(150) charset ascii,
+ b text(150) charset ascii,
+ c text charset ascii,
+ d tinytext charset ascii,
+ e mediumtext charset ascii,
+ f longtext charset ascii
+) engine=innodb;
+
+alter table supported_types
+ convert to charset ascii collate ascii_bin,
+ algorithm=instant;
+
+drop table supported_types;
+
+create table various_cases (
+ a char(150) charset ascii,
+ b varchar(150) as (a) virtual,
+ c char(150) as (a) persistent
+) engine=innodb;
+
+alter table various_cases
+ change a a char(150) charset ascii collate ascii_bin,
+ algorithm=inplace;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table various_cases
+ change a a varchar(222),
+ algorithm=inplace;
+
+alter table various_cases
+ change b b varchar(150) as (a) virtual,
+ algorithm=inplace;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table various_cases
+ change c c char(150) as (a) persistent,
+ algorithm=inplace;
+
+# Can not grow storage in bytes from CHAR
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table various_cases
+ modify a char(150) charset utf8mb4,
+ algorithm=instant;
+
+drop table various_cases;
+
+
+create table all_texts (
+ a tinytext charset ascii,
+ b text charset ascii,
+ c mediumtext charset ascii,
+ d longtext charset ascii,
+ footer int
+) engine=innodb;
+
+alter table all_texts
+ convert to charset ascii collate ascii_bin,
+ algorithm=instant;
+
+drop table all_texts;
+
+
+create table all_binaries (
+ a tinyblob,
+ b blob,
+ c mediumblob,
+ d longblob,
+ e varbinary(150),
+ f binary(150)
+) engine=innodb;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_binaries modify a tinytext, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_binaries modify b text, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_binaries modify c mediumtext, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_binaries modify d longtext, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_binaries modify e varchar(150), algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_binaries modify f char(150), algorithm=instant;
+
+drop table all_binaries;
+
+create table all_strings (
+ a tinytext,
+ b text,
+ c mediumtext,
+ d longtext,
+ e varchar(150),
+ f char(150)
+) engine=innodb;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify a tinyblob, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify b blob, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify c mediumblob, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify d longblob, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify e varbinary(150), algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify f binary(150), algorithm=instant;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify a tinytext charset binary, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify b text charset binary, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify c mediumtext charset binary, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify d longtext charset binary, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify e varchar(150) charset binary, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table all_strings modify f char(150) charset binary, algorithm=instant;
+
+drop table all_strings;
+
+create table key_part_change (
+ a char(150) charset ascii,
+ b char(150) charset ascii,
+ c char(150) charset ascii,
+ unique key ab (a,b)
+) engine=innodb;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table key_part_change
+ modify a char(150) charset utf8mb4,
+ drop index ab,
+ add unique key ab(a,c),
+ algorithm=instant;
+
+drop table key_part_change;
+
+create table key_part_change_and_rename (
+ a char(100) charset ascii,
+ b char(100) charset ascii,
+ unique key ab (a,b)
+) engine=innodb;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table key_part_change_and_rename
+ change a b char(100) charset utf8mb4,
+ change b a char(100) charset utf8mb4,
+ drop index ab,
+ add unique key ab(a,b),
+ algorithm=instant;
+
+drop table key_part_change_and_rename;
+
+create table enum_and_set (
+ a enum('one', 'two') charset utf8mb3,
+ b set('three', 'four') charset utf8mb3
+) engine=innodb;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table enum_and_set
+ modify a enum('one', 'two') charset utf8mb4,
+ algorithm=instant;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table enum_and_set
+ modify b enum('three', 'four') charset utf8mb4,
+ algorithm=instant;
+
+drop table enum_and_set;
+
+create table compressed (
+ a varchar(255) compressed charset utf8mb3
+) engine=innodb;
+
+insert into compressed values ('AAA'), ('bbb'), ('CCC');
+
+alter table compressed
+ modify a varchar(255) compressed charset utf8mb4,
+ algorithm=instant;
+
+select * from compressed;
+check table compresed;
+
+drop table compressed;
+
+create table key_part_bug (
+ id int primary key auto_increment,
+ a varchar(150) charset utf8mb3 unique key
+) engine=innodb;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table key_part_bug
+ modify a varchar(150) charset utf8mb4,
+ algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table key_part_bug
+ modify a varchar(150) charset utf8mb4,
+ algorithm=nocopy;
+alter table key_part_bug
+ drop index a,
+ modify a varchar(150) charset utf8mb4,
+ algorithm=nocopy;
+
+drop table key_part_bug;
+
+
+create table latin1_swedish_special_case (
+ copy1 varchar(150) charset ascii collate ascii_general_ci,
+ copy2 char(150) charset ascii collate ascii_general_ci,
+ instant1 varchar(150) charset ascii collate ascii_general_ci,
+ instant2 char(150) charset ascii collate ascii_general_ci
+) engine=innodb;
+
+select c.name, c.prtype, c.mtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+ where t.name = 'test/latin1_swedish_special_case';
+alter table latin1_swedish_special_case
+ modify copy1 varchar(150) charset latin1 collate latin1_swedish_ci,
+ modify copy2 char(150) charset latin1 collate latin1_swedish_ci,
+ algorithm=copy;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table latin1_swedish_special_case
+ modify instant1 varchar(150) charset latin1 collate latin1_swedish_ci,
+ modify instant2 char(150) charset latin1 collate latin1_swedish_ci,
+ algorithm=instant;
+alter table latin1_swedish_special_case
+ modify instant1 varchar(150) charset latin1 collate latin1_swedish_ci,
+ modify instant2 char(150) charset latin1 collate latin1_swedish_ci,
+ algorithm=copy;
+select c.name, c.prtype, c.mtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+ where t.name = 'test/latin1_swedish_special_case';
+alter table latin1_swedish_special_case
+ modify copy1 varchar(150) charset latin1 collate latin1_general_ci,
+ modify copy2 char(150) charset latin1 collate latin1_general_ci,
+ algorithm=copy;
+alter table latin1_swedish_special_case
+ modify instant1 varchar(150) charset latin1 collate latin1_general_ci,
+ modify instant2 char(150) charset latin1 collate latin1_general_ci,
+ algorithm=instant;
+select c.name, c.prtype, c.mtype, c.len from information_schema.innodb_sys_columns as c inner join information_schema.innodb_sys_tables t on c.table_id = t.table_id
+ where t.name = 'test/latin1_swedish_special_case';
+
+drop table latin1_swedish_special_case;
+
+create table regression (a varchar(100) charset utf8mb3 primary key, b int) engine=innodb;
+alter table regression convert to character set utf8mb4;
+drop table regression;
+
+# ROW_FORMAT=DYNAMIC limitation:
+# size in bytes cannot be increased from less of equal that 255 to more than 255
+create table boundary_255 (
+ a varchar(50) charset ascii,
+ b varchar(200) charset ascii,
+ c varchar(300) charset ascii
+) engine=innodb;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table boundary_255
+ modify a varchar(50) charset utf8mb3,
+ algorithm=instant;
+alter table boundary_255
+ modify a varchar(50) charset utf8mb3,
+ algorithm=copy;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table boundary_255
+ modify b varchar(200) charset utf8mb3,
+ algorithm=instant;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table boundary_255
+ modify c varchar(300) charset utf8mb3,
+ algorithm=instant;
+
+drop table boundary_255;
+
+create table boundary_255 (
+ a varchar(70) charset utf8mb3
+) engine=innodb;
+
+if ($row_format == 'redundant') {
+alter table boundary_255
+ modify a varchar(70) charset utf8mb4,
+ algorithm=instant;
+}
+if ($row_format != 'redundant') {
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table boundary_255
+ modify a varchar(70) charset utf8mb4,
+ algorithm=instant;
+}
+
+drop table boundary_255;
+
+
+create table t (
+ a char(10) collate utf8mb3_general_ci,
+ b char(70) collate utf8mb3_general_ci,
+ c char(100) collate utf8mb3_general_ci,
+
+ aa char(10) collate utf8mb3_general_ci unique,
+ bb char(70) collate utf8mb3_general_ci unique,
+ cc char(100) collate utf8mb3_general_ci unique,
+
+ d char(10) collate utf8mb3_general_ci,
+ dd char(10) collate utf8mb3_general_ci unique
+) engine=innodb;
+insert into t values
+ (repeat('a', 10), repeat('a', 70), repeat('a', 100),
+ repeat('a', 10), repeat('a', 70), repeat('a', 100),
+ repeat('a', 10), repeat('a', 10)
+);
+if ($row_format != 'redundant') {
+alter table t modify a char(10) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+alter table t modify b char(70) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+alter table t modify c char(100) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify aa char(10) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify bb char(70) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify cc char(100) collate utf8mb4_general_ci, algorithm=instant;
+check table t;
+
+alter table t modify d char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify dd char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+}
+if ($row_format == 'redundant') {
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify a char(10) collate utf8mb4_general_ci, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify b char(70) collate utf8mb4_general_ci, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify c char(100) collate utf8mb4_general_ci, algorithm=instant;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify aa char(10) collate utf8mb4_general_ci, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify bb char(70) collate utf8mb4_general_ci, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify cc char(100) collate utf8mb4_general_ci, algorithm=instant;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify d char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify dd char(10) collate utf8mb4_spanish_ci, algorithm=instant;
+}
+select * from t;
+drop table t;
+
+
+create table fully_compatible (
+ id int auto_increment unique key,
+ from_charset char(255),
+ from_collate char(255),
+ to_charset char(255),
+ to_collate char(255)
+);
+
+insert into fully_compatible (from_charset, from_collate, to_charset, to_collate) values
+ ('utf8mb3', 'utf8mb3_general_ci', 'utf8mb4', 'utf8mb4_general_ci'),
+ ('utf8mb3', 'utf8mb3_bin', 'utf8mb4', 'utf8mb4_bin'),
+ ('utf8mb3', 'utf8mb3_unicode_ci', 'utf8mb4', 'utf8mb4_unicode_ci'),
+ ('utf8mb3', 'utf8mb3_icelandic_ci', 'utf8mb4', 'utf8mb4_icelandic_ci'),
+ ('utf8mb3', 'utf8mb3_latvian_ci', 'utf8mb4', 'utf8mb4_latvian_ci'),
+ ('utf8mb3', 'utf8mb3_romanian_ci', 'utf8mb4', 'utf8mb4_romanian_ci'),
+ ('utf8mb3', 'utf8mb3_slovenian_ci', 'utf8mb4', 'utf8mb4_slovenian_ci'),
+ ('utf8mb3', 'utf8mb3_polish_ci', 'utf8mb4', 'utf8mb4_polish_ci'),
+ ('utf8mb3', 'utf8mb3_estonian_ci', 'utf8mb4', 'utf8mb4_estonian_ci'),
+ ('utf8mb3', 'utf8mb3_spanish_ci', 'utf8mb4', 'utf8mb4_spanish_ci'),
+ ('utf8mb3', 'utf8mb3_swedish_ci', 'utf8mb4', 'utf8mb4_swedish_ci'),
+ ('utf8mb3', 'utf8mb3_turkish_ci', 'utf8mb4', 'utf8mb4_turkish_ci'),
+ ('utf8mb3', 'utf8mb3_czech_ci', 'utf8mb4', 'utf8mb4_czech_ci'),
+ ('utf8mb3', 'utf8mb3_danish_ci', 'utf8mb4', 'utf8mb4_danish_ci'),
+ ('utf8mb3', 'utf8mb3_lithuanian_ci', 'utf8mb4', 'utf8mb4_lithuanian_ci'),
+ ('utf8mb3', 'utf8mb3_slovak_ci', 'utf8mb4', 'utf8mb4_slovak_ci'),
+ ('utf8mb3', 'utf8mb3_spanish2_ci', 'utf8mb4', 'utf8mb4_spanish2_ci'),
+ ('utf8mb3', 'utf8mb3_roman_ci', 'utf8mb4', 'utf8mb4_roman_ci'),
+ ('utf8mb3', 'utf8mb3_persian_ci', 'utf8mb4', 'utf8mb4_persian_ci'),
+ ('utf8mb3', 'utf8mb3_esperanto_ci', 'utf8mb4', 'utf8mb4_esperanto_ci'),
+ ('utf8mb3', 'utf8mb3_hungarian_ci', 'utf8mb4', 'utf8mb4_hungarian_ci'),
+ ('utf8mb3', 'utf8mb3_sinhala_ci', 'utf8mb4', 'utf8mb4_sinhala_ci'),
+ ('utf8mb3', 'utf8mb3_german2_ci', 'utf8mb4', 'utf8mb4_german2_ci'),
+ ('utf8mb3', 'utf8mb3_croatian_mysql561_ci', 'utf8mb4', 'utf8mb4_croatian_mysql561_ci'),
+ ('utf8mb3', 'utf8mb3_unicode_520_ci', 'utf8mb4', 'utf8mb4_unicode_520_ci'),
+ ('utf8mb3', 'utf8mb3_vietnamese_ci', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+ ('utf8mb3', 'utf8mb3_croatian_ci', 'utf8mb4', 'utf8mb4_croatian_ci'),
+ ('utf8mb3', 'utf8mb3_myanmar_ci', 'utf8mb4', 'utf8mb4_myanmar_ci'),
+ ('utf8mb3', 'utf8mb3_thai_520_w2', 'utf8mb4', 'utf8mb4_thai_520_w2'),
+ ('utf8mb3', 'utf8mb3_general_nopad_ci', 'utf8mb4', 'utf8mb4_general_nopad_ci'),
+ ('utf8mb3', 'utf8mb3_nopad_bin', 'utf8mb4', 'utf8mb4_nopad_bin'),
+ ('utf8mb3', 'utf8mb3_unicode_nopad_ci', 'utf8mb4', 'utf8mb4_unicode_nopad_ci'),
+ ('utf8mb3', 'utf8mb3_unicode_520_nopad_ci', 'utf8mb4', 'utf8mb4_unicode_520_nopad_ci')
+;
+
+let $data_size = `select count(*) from fully_compatible`;
+let $counter = 1;
+
+while ($counter <= $data_size) {
+ let $from_charset = `select from_charset from fully_compatible where id = $counter`;
+ let $from_collate = `select from_collate from fully_compatible where id = $counter`;
+ let $to_charset = `select to_charset from fully_compatible where id = $counter`;
+ let $to_collate = `select to_collate from fully_compatible where id = $counter`;
+
+ eval create table tmp (
+ a varchar(50) charset $from_charset collate $from_collate,
+ b varchar(50) charset $from_charset collate $from_collate primary key
+ ) engine=innodb;
+
+ insert into tmp values ('AAA', 'AAA'), ('bbb', 'bbb');
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ eval alter table tmp
+ change a a varchar(50) charset $to_charset collate $to_collate,
+ modify b varchar(50) charset $to_charset collate $to_collate,
+ algorithm=instant;
+
+ eval alter table tmp
+ change a a varchar(50) charset $to_charset collate $to_collate,
+ algorithm=instant;
+
+ check table tmp;
+
+ drop table tmp;
+
+ inc $counter;
+}
+
+drop table fully_compatible;
+
+
+create table compatible_without_index (
+ id int auto_increment unique key,
+ from_charset char(255),
+ from_collate char(255),
+ to_charset char(255),
+ to_collate char(255)
+);
+
+insert into compatible_without_index (from_charset, from_collate, to_charset, to_collate) values
+
+ ('utf8mb3', 'utf8mb3_general_ci', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+ ('utf8mb3', 'utf8mb3_bin', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+ ('utf8mb3', 'utf8mb3_general_nopad_ci', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+ ('utf8mb3', 'utf8mb3_nopad_bin', 'utf8mb4', 'utf8mb4_vietnamese_ci'),
+
+ ('ascii', 'ascii_general_ci', 'ascii', 'ascii_bin'),
+ ('utf8mb3', 'utf8mb3_roman_ci', 'utf8mb3', 'utf8mb3_lithuanian_ci'),
+ ('utf8mb4', 'utf8mb4_thai_520_w2', 'utf8mb4', 'utf8mb4_persian_ci'),
+ ('utf8mb3', 'utf8mb3_myanmar_ci', 'utf8mb4', 'utf8mb4_german2_ci'),
+ ('utf8mb3', 'utf8mb3_general_ci', 'utf8mb3', 'utf8mb3_unicode_ci'),
+ ('latin1', 'latin1_general_cs', 'latin1', 'latin1_general_ci'),
+
+ ('utf16', 'utf16_general_ci', 'utf16', 'utf16_german2_ci')
+;
+
+let $data_size = `select count(*) from compatible_without_index`;
+let $counter = 1;
+
+while ($counter <= $data_size) {
+ let $from_charset = `select from_charset from compatible_without_index where id = $counter`;
+ let $from_collate = `select from_collate from compatible_without_index where id = $counter`;
+ let $to_charset = `select to_charset from compatible_without_index where id = $counter`;
+ let $to_collate = `select to_collate from compatible_without_index where id = $counter`;
+
+ eval create table tmp (
+ a varchar(50) charset $from_charset collate $from_collate,
+ b varchar(50) charset $from_charset collate $from_collate unique key,
+ c varchar(50) charset $from_charset collate $from_collate primary key
+ ) engine=innodb;
+
+ eval alter table tmp
+ change a a varchar(50) charset $to_charset collate $to_collate,
+ algorithm=instant;
+
+ --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ eval alter table tmp
+ modify b varchar(50) charset $to_charset collate $to_collate,
+ algorithm=instant;
+
+ --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ eval alter table tmp
+ modify c varchar(50) charset $to_charset collate $to_collate,
+ algorithm=instant;
+
+ drop table tmp;
+
+ inc $counter;
+}
+
+drop table compatible_without_index;
+
+
+create table fully_incompatible (
+ id int auto_increment unique key,
+ from_charset char(255),
+ from_collate char(255),
+ to_charset char(255),
+ to_collate char(255)
+);
+
+insert into fully_incompatible (from_charset, from_collate, to_charset, to_collate) values
+ ('ascii', 'ascii_general_ci', 'utf8mb3', 'utf8mb3_general_ci'),
+ ('ascii', 'ascii_general_ci', 'utf8mb4', 'utf8mb4_general_ci'),
+ ('ascii', 'ascii_general_ci', 'latin1', 'latin1_general_ci'),
+ ('ascii', 'ascii_bin', 'latin1', 'latin1_bin'),
+ ('ascii', 'ascii_nopad_bin', 'latin1', 'latin1_nopad_bin'),
+ ('ascii', 'ascii_general_ci', 'latin2', 'latin2_general_ci'),
+ ('ascii', 'ascii_general_ci', 'latin7', 'latin7_general_ci'),
+ ('ascii', 'ascii_bin', 'koi8u', 'koi8u_bin'),
+ ('ascii', 'ascii_bin', 'ujis', 'ujis_bin'),
+ ('ascii', 'ascii_bin', 'big5', 'big5_bin'),
+ ('ascii', 'ascii_bin', 'gbk', 'gbk_bin'),
+
+ ('ascii', 'ascii_general_ci', 'utf8mb3', 'utf8mb3_swedish_ci'),
+ ('ascii', 'ascii_bin', 'latin1', 'latin1_swedish_ci'),
+ ('ascii', 'ascii_general_nopad_ci', 'latin1', 'latin1_swedish_ci'),
+ ('ascii', 'ascii_nopad_bin', 'latin1', 'latin1_swedish_ci'),
+
+ ('ascii', 'ascii_general_ci', 'koi8u', 'koi8u_bin'),
+ ('ascii', 'ascii_general_nopad_ci', 'koi8u', 'koi8u_bin'),
+ ('ascii', 'ascii_nopad_bin', 'koi8u', 'koi8u_bin'),
+
+ ('ascii', 'ascii_general_ci', 'latin1', 'latin1_swedish_ci'),
+ ('ascii', 'ascii_bin', 'utf8mb3', 'utf8mb3_swedish_ci'),
+ ('ascii', 'ascii_general_nopad_ci', 'utf8mb3', 'utf8mb3_swedish_ci'),
+ ('ascii', 'ascii_nopad_bin', 'utf8mb3', 'utf8mb3_swedish_ci'),
+
+ ('ascii', 'ascii_general_ci', 'utf8mb4', 'utf8mb4_danish_ci'),
+ ('ascii', 'ascii_bin', 'utf8mb4', 'utf8mb4_danish_ci'),
+ ('ascii', 'ascii_general_nopad_ci', 'utf8mb4', 'utf8mb4_danish_ci'),
+ ('ascii', 'ascii_nopad_bin', 'utf8mb4', 'utf8mb4_danish_ci'),
+
+ ('ascii', 'ascii_general_ci', 'gbk', 'gbk_chinese_ci'),
+ ('ascii', 'ascii_general_ci', 'gbk', 'gbk_chinese_nopad_ci'),
+
+ ('ascii', 'ascii_general_ci', 'ujis', 'ujis_japanese_ci'),
+ ('ascii', 'ascii_general_ci', 'big5', 'big5_chinese_ci'),
+ ('ascii', 'ascii_general_ci', 'latin2', 'latin2_croatian_ci'),
+ ('ascii', 'ascii_general_ci', 'latin7', 'latin7_estonian_cs'),
+
+ ('ucs2', 'ucs2_general_ci', 'utf16', 'utf16_general_ci'),
+ ('ucs2', 'ucs2_unicode_ci', 'utf16', 'utf16_unicode_ci'),
+ ('ucs2', 'ucs2_icelandic_ci', 'utf16', 'utf16_icelandic_ci'),
+ ('ucs2', 'ucs2_latvian_ci', 'utf16', 'utf16_latvian_ci'),
+ ('ucs2', 'ucs2_romanian_ci', 'utf16', 'utf16_romanian_ci'),
+ ('ucs2', 'ucs2_slovenian_ci', 'utf16', 'utf16_slovenian_ci'),
+ ('ucs2', 'ucs2_polish_ci', 'utf16', 'utf16_polish_ci'),
+ ('ucs2', 'ucs2_estonian_ci', 'utf16', 'utf16_estonian_ci'),
+ ('ucs2', 'ucs2_spanish_ci', 'utf16', 'utf16_spanish_ci'),
+ ('ucs2', 'ucs2_general_ci', 'utf16', 'utf16_general_ci'),
+ ('ucs2', 'ucs2_myanmar_ci', 'utf16', 'utf16_thai_520_w2'),
+ ('ucs2', 'ucs2_general_ci', 'utf16', 'utf16_unicode_nopad_ci'),
+ ('ucs2', 'ucs2_general_mysql500_ci', 'utf16', 'utf16_spanish2_ci'),
+
+ ('utf8mb4', 'utf8mb4_general_ci', 'utf8mb3', 'utf8mb3_general_ci'),
+ ('utf8mb4', 'utf8mb4_general_ci', 'ascii', 'ascii_general_ci'),
+ ('utf8mb3', 'utf8mb3_general_ci', 'ascii', 'ascii_general_ci'),
+ ('utf8mb3', 'utf8mb3_general_ci', 'latin1', 'latin1_general_ci'),
+ ('utf16', 'utf16_general_ci', 'utf32', 'utf32_general_ci'),
+ ('latin1', 'latin1_general_ci', 'ascii', 'ascii_general_ci'),
+ ('ascii', 'ascii_general_ci', 'swe7', 'swe7_swedish_ci'),
+ ('eucjpms', 'eucjpms_japanese_nopad_ci', 'geostd8', 'geostd8_general_ci'),
+ ('latin1', 'latin1_general_ci', 'utf16', 'utf16_general_ci')
+;
+
+let $data_size = `select count(*) from fully_incompatible`;
+let $counter = 1;
+
+while ($counter <= $data_size) {
+ let $from_charset = `select from_charset from fully_incompatible where id = $counter`;
+ let $from_collate = `select from_collate from fully_incompatible where id = $counter`;
+ let $to_charset = `select to_charset from fully_incompatible where id = $counter`;
+ let $to_collate = `select to_collate from fully_incompatible where id = $counter`;
+
+ eval create table tmp (
+ a varchar(150) charset $from_charset collate $from_collate,
+ b text(150) charset $from_charset collate $from_collate,
+ unique key b_idx (b(150))
+ ) engine=innodb;
+
+ --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ eval alter table tmp
+ change a a varchar(150) charset $to_charset collate $to_collate,
+ algorithm=instant;
+
+ --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ eval alter table tmp
+ modify b text charset $to_charset collate $to_collate,
+ algorithm=instant;
+
+ drop table tmp;
+
+ inc $counter;
+}
+
+drop table fully_incompatible;
+
+--echo #
+--echo # MDEV-19284 INSTANT ALTER with ucs2-to-utf16 conversion produces bad data
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ucs2, PRIMARY KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('a'),(0xD800);
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+ALTER TABLE t1 ALGORITHM=COPY, MODIFY a VARCHAR(10) CHARACTER SET utf16;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 ALGORITHM=INSTANT, MODIFY a VARCHAR(10) CHARACTER SET utf16;
+--enable_info ONCE
+ALTER IGNORE TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET utf16;
+SELECT HEX(a) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces currupt data
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii COLLATE ascii_general_ci, PRIMARY KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('a'),(0xC0),('b');
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+ALTER TABLE t1 ALGORITHM=COPY, MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_general_ci;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 ALGORITHM=INSTANT, MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_general_ci;
+--enable_info ONCE
+ALTER IGNORE TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_general_ci;
+SELECT HEX(a) FROM t1;
+DROP TABLE t1;
+
+
+
+--echo #
+--echo # MDEV-19524 Server crashes in Bitmap<64u>::is_clear_all / Field_longstr::csinfo_change_allows_instant_alter
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(1), UNIQUE(a)) ENGINE=InnoDB;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 MODIFY a INT, ADD b INT, ADD UNIQUE (b), ALGORITHM=INSTANT;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17301 Change of COLLATE unnecessarily requires ALGORITHM=COPY
+--echo #
+
+create table t (
+ a char(10) collate latin1_general_ci primary key,
+ b char(10) collate latin1_general_ci,
+ c char(10) collate latin1_general_ci,
+ unique key b_key(b)
+) engine=innodb;
+
+insert into t values
+ ('aaa', 'aaa', 'aaa'), ('ccc', 'ccc', 'ccc'), ('bbb', 'bbb', 'bbb');
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify a char(10) collate latin1_general_cs, algorithm=inplace;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify b char(10) collate latin1_general_cs, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify b char(10) collate latin1_general_cs, algorithm=nocopy;
+alter table t modify b char(10) collate latin1_general_cs,
+drop index b_key, algorithm=nocopy;
+check table t;
+
+alter table t modify c char(10) collate latin1_general_cs, algorithm=instant;
+check table t;
+
+drop table t;
+
+create table t (
+ a varchar(10) collate latin1_general_ci primary key,
+ b varchar(10) collate latin1_general_ci,
+ c varchar(10) collate latin1_general_ci,
+ unique key b_key(b)
+) engine=innodb;
+
+insert into t values
+ ('aaa', 'aaa', 'aaa'), ('ccc', 'ccc', 'ccc'), ('bbb', 'bbb', 'bbb');
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify a varchar(10) collate latin1_general_cs, algorithm=inplace;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify b varchar(10) collate latin1_general_cs, algorithm=instant;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify b varchar(10) collate latin1_general_cs, algorithm=nocopy;
+alter table t modify b varchar(10) collate latin1_general_cs,
+drop index b_key, algorithm=nocopy;
+check table t;
+
+alter table t modify c varchar(10) collate latin1_general_cs, algorithm=instant;
+check table t;
+
+drop table t;
+
+--echo #
+--echo # MDEV-20726: InnoDB: Assertion failure in file data0type.cc line 67
+--echo #
+
+CREATE TABLE t (
+ id int(10) unsigned NOT NULL PRIMARY KEY,
+ a text CHARSET utf8mb3,
+ KEY a_idx(a(1))
+) ENGINE=InnoDB;
+
+INSERT INTO t VALUES (1, 'something in the air');
+ALTER TABLE t MODIFY a text CHARSET utf8mb4;
+
+DROP TABLE t;
+
+
+--echo #
+--echo # MDEV-22899: Assertion `field->col->is_binary() || field->prefix_len % field->col->mbmaxlen == 0' failed in dict_index_add_to_cache
+--echo #
+
+CREATE TABLE t1 (
+ a text CHARACTER SET utf8 DEFAULT NULL,
+ KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a text CHARACTER SET utf8 DEFAULT NULL,
+ b int,
+ KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a char(200) CHARACTER SET utf8 DEFAULT NULL,
+ KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a char(200) CHARACTER SET utf8 DEFAULT NULL,
+ b int,
+ KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a varchar(200) CHARACTER SET utf8 DEFAULT NULL,
+ KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a varchar(200) CHARACTER SET utf8 DEFAULT NULL,
+ b int,
+ KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
+ KEY a_key (a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
+ b int,
+ KEY a_key (b, a(1))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ();
+ALTER TABLE t1 MODIFY a text DEFAULT NULL;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23245 Still getting assertion failure in file data0type.cc line 67
+--echo #
+
+CREATE TABLE Foo
+(
+ Bar char(2) CHARACTER SET utf8,
+ KEY Bar (Bar(1))
+) ENGINE = InnoDB;
+ALTER TABLE Foo MODIFY Bar char(2) CHARACTER SET utf8mb4;
+INSERT INTO Foo VALUES ('a');
+DROP TABLE Foo;
+
+CREATE TABLE Foo
+(
+ Bar varchar(2) CHARACTER SET utf8,
+ KEY Bar (Bar(1))
+) ENGINE = InnoDB;
+ALTER TABLE Foo MODIFY Bar varchar(2) CHARACTER SET utf8mb4;
+INSERT INTO Foo VALUES ('a');
+DROP TABLE Foo;
+
+CREATE TABLE Foo
+(
+ Bar text CHARACTER SET utf8,
+ KEY Bar (Bar(1))
+) ENGINE = InnoDB;
+ALTER TABLE Foo MODIFY Bar text CHARACTER SET utf8mb4;
+INSERT INTO Foo VALUES ('a');
+DROP TABLE Foo;
+
+CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
+PRIMARY KEY (a(1)))
+ENGINE=InnoDB;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 MODIFY a VARCHAR(2)
+CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+INSERT INTO t1 VALUES ('a');
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-22775 [HY000][1553] Changing name of primary key column with foreign key constraint fails.
+--echo #
+
+create table t1 (id int primary key) engine=innodb default charset=utf8;
+create table t2 (input_id int primary key, id int not null,
+ key a (id),
+ constraint a foreign key (id) references t1 (id)
+)engine=innodb default charset=utf8;
+alter table t1 change id id2 int;
+drop table t2;
+drop table t1;
+
+
+--echo #
+--echo # MDEV-25951 MariaDB crash after ALTER TABLE convert to utf8mb4
+--echo #
+
+CREATE TABLE t1 (id INT PRIMARY KEY, a VARCHAR(32), KEY (a(7))) ENGINE=INNODB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES (1, 'a1'), (2, 'a1');
+
+--error ER_DUP_ENTRY
+ALTER TABLE t1
+ CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci,
+ ADD UNIQUE INDEX test_key (a);
+
+ALTER TABLE t1 CONVERT TO CHARACTER SET UTF8MB4 COLLATE UTF8MB4_UNICODE_520_CI;
+CHECK TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(32), KEY (a(7))) ENGINE=INNODB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES (1, 'a1'), (2, 'a1');
+
+--error ER_DUP_ENTRY
+ALTER TABLE t1
+ CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci,
+ ADD UNIQUE INDEX test_key (a);
+
+ALTER TABLE t1 CONVERT TO CHARACTER SET UTF8MB4 COLLATE UTF8MB4_UNICODE_520_CI;
+CHECK TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/instant_alter_crash.test b/mysql-test/suite/innodb/t/instant_alter_crash.test
index c0077625102..43db8f619f3 100644
--- a/mysql-test/suite/innodb/t/instant_alter_crash.test
+++ b/mysql-test/suite/innodb/t/instant_alter_crash.test
@@ -44,9 +44,39 @@ DELETE FROM t1;
ROLLBACK;
--source include/wait_all_purged.inc
+INSERT INTO t2 VALUES
+(16,1551,'Omnium enim rerum'),(128,1571,' principia parva sunt');
+
+connect ddl, localhost, root;
+SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
+--send
+ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere';
+
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR ddl';
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+SET debug_dbug='+d,dict_sys_mutex_avoid';
+UPDATE t1 SET c2=c2+1;
+
+--source include/kill_mysqld.inc
+disconnect ddl;
+--source include/start_mysqld.inc
+
+SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+
+SELECT * FROM t1;
+SELECT * FROM t2;
+BEGIN;
+INSERT INTO t1 SET id=1;
+DELETE FROM t2;
+ROLLBACK;
+--source include/wait_all_purged.inc
+
INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum');
connect ddl, localhost, root;
+ALTER TABLE t2 DROP COLUMN c3;
SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
--send
ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum');
@@ -101,16 +131,39 @@ for (my $offset= 0x65; $offset;
my $n_fields= unpack("n", substr($page,$offset-4,2)) >> 1 & 0x3ff;
my $start= 0;
my $name;
- for (my $i= 0; $i < $n_fields; $i++) {
- my $end= unpack("C", substr($page, $offset-7-$i, 1));
- print ",\n " if $i;
- print "$fields[$i]=";
- if ($end & 0x80) {
- print "NULL(", ($end & 0x7f) - $start, " bytes)"
- } else {
- print "0x", unpack("H*", substr($page,$offset+$start,$end-$start))
+ if (unpack("C", substr($page,$offset-3,1)) & 1) {
+ for (my $i= 0; $i < $n_fields; $i++) {
+ my $end= unpack("C", substr($page, $offset-7-$i, 1));
+ print ",\n " if $i;
+ print "$fields[$i]=";
+ if ($end & 0x80) {
+ print "NULL(", ($end & 0x7f) - $start, " bytes)"
+ } else {
+ print "0x", unpack("H*", substr($page,$offset+$start,$end-$start))
+ }
+ $start= $end & 0x7f;
+ }
+ } else {
+ for (my $i= 0; $i < $n_fields; $i++) {
+ my $end= unpack("n", substr($page, $offset-8-2*$i, 2));
+ print ",\n " if $i;
+ if ($i > 2 && !(~unpack("C",substr($page,$offset-6,1)) & 0x30)) {
+ if ($i == 3) {
+ print "BLOB=";
+ $start += 8; # skip the space_id,page_number
+ } else {
+ print "$fields[$i - 1]=";
+ }
+ } else {
+ print "$fields[$i]=";
+ }
+ if ($end & 0x8000) {
+ print "NULL(", ($end & 0x7fff) - $start, " bytes)"
+ } else {
+ print "0x", unpack("H*", substr($page,$offset+$start,($end-$start) & 0x3fff))
+ }
+ $start= $end & 0x3fff;
}
- $start= $end & 0x7f;
}
print ")\n";
}
diff --git a/mysql-test/suite/innodb/t/instant_alter_debug.test b/mysql-test/suite/innodb/t/instant_alter_debug.test
index bbfe8a9fcd4..e31b378ff10 100644
--- a/mysql-test/suite/innodb/t/instant_alter_debug.test
+++ b/mysql-test/suite/innodb/t/instant_alter_debug.test
@@ -6,6 +6,10 @@
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
+
CREATE TABLE t1 (
pk INT AUTO_INCREMENT PRIMARY KEY,
c1 INT,
@@ -182,6 +186,7 @@ connect stop_purge,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connect ddl,localhost,root,,test;
DELETE FROM t1;
+INSERT INTO t1 VALUES(1, 2);
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged';
send ALTER TABLE t1 FORCE;
connection default;
@@ -232,10 +237,11 @@ connection ddl;
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged';
send ALTER TABLE t1 FORCE;
-disconnect stop_purge;
-
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR copied';
+connection stop_purge;
+COMMIT;
+connection default;
let $wait_all_purged = 1;
--source include/wait_all_purged.inc
let $wait_all_purged = 0;
@@ -249,6 +255,34 @@ reap;
connection default;
SET DEBUG_SYNC = RESET;
SELECT a, b, c FROM t1;
+ALTER TABLE t1 DROP b, ALGORITHM=INSTANT;
+connection stop_purge;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+connection default;
+DELETE FROM t1;
+
+connection ddl;
+SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged';
+send ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2 AFTER a, FORCE;
+
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR copied';
+disconnect stop_purge;
+let $wait_all_purged = 1;
+--source include/wait_all_purged.inc
+let $wait_all_purged = 0;
+INSERT INTO t1 SET a=1;
+INSERT INTO t1 SET a=2,c=4;
+SET DEBUG_SYNC = 'now SIGNAL logged';
+
+connection ddl;
+reap;
+UPDATE t1 SET b = b + 1 WHERE a = 2;
+
+connection default;
+SET DEBUG_SYNC = RESET;
+SELECT a, b, c FROM t1;
--echo #
--echo # MDEV-15872 Crash in online ALTER TABLE...ADD PRIMARY KEY
@@ -325,6 +359,32 @@ SET DEBUG_SYNC='now SIGNAL update';
--reap
--connection default
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-21658 Error on online ADD PRIMARY KEY after instant DROP/reorder
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, c INT, col INT) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES ();
+ALTER TABLE t1 DROP b, DROP c, DROP col;
+ALTER TABLE t1 ADD COLUMN col INT;
+ALTER TABLE t1 DROP a, DROP col, ADD COLUMN b INT;
+
+--connection con2
+SET SQL_MODE= '';
+SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR dml';
+send ALTER TABLE t1 ADD PRIMARY KEY(b);
+
+--connection default
+SET DEBUG_SYNC = 'now WAIT_FOR scanned';
+UPDATE t1 SET b = 1;
+SET DEBUG_SYNC = 'now SIGNAL dml';
+--connection con2
+reap;
+--connection default
+SELECT * FROM t1;
+
SET DEBUG_SYNC='RESET';
--disconnect con2
DROP TABLE t1;
@@ -404,4 +464,101 @@ DROP TABLE t1;
--echo # End of 10.3 tests
+--echo #
+--echo # MDEV-17899 Assertion failures on rollback of instant ADD/DROP
+--echo # MDEV-18098 Crash after rollback of instant DROP COLUMN
+--echo #
+
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,ib_commit_inplace_fail_1';
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2);
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 DROP COLUMN b;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 DROP COLUMN b;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 ADD COLUMN c INT;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 ADD COLUMN c INT;
+BEGIN;
+INSERT INTO t1 VALUES(1, 1);
+ROLLBACK;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 values (1,1);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SET debug_dbug = @save_dbug;
+
+--echo #
+--echo # MDEV-24512 Assertion failed in rec_is_metadata()
+--echo # in btr_discard_only_page_on_level()
+--echo #
+
+SET @save_limit= @@GLOBAL.innodb_limit_optimistic_insert_debug;
+SET GLOBAL innodb_limit_optimistic_insert_debug=2;
+CREATE TABLE t1 (c CHAR(1) UNIQUE) ENGINE=InnoDB;
+
+ALTER TABLE t1 ADD c2 INT NOT NULL DEFAULT 0 FIRST;
+--error ER_DUP_ENTRY
+INSERT INTO t1 (c) VALUES ('x'),('d'),('r'),('f'),('y'),('u'),('m'),('d');
+SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-25236 Online log apply fails for ROW_FORMAT=REDUNDANT tables
+--echo #
+
+CREATE TABLE t1
+(a INT NOT NULL, b INT, c INT, d INT, e INT, f INT, g INT, h INT, i TEXT)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 2, 3, 4, 5, 6, 7, 8, "test");
+ALTER TABLE t1 MODIFY a INT NULL;
+
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL alter WAIT_FOR go';
+send ALTER TABLE t1 ADD PRIMARY KEY (a);
+connect(con1,localhost,root,,);
+set DEBUG_SYNC='now WAIT_FOR alter';
+BEGIN;
+INSERT INTO t1 SET a=0, i=REPEAT('1', 10000);
+ROLLBACK;
+set DEBUG_SYNC='now SIGNAL go';
+connection default;
+reap;
+
+SELECT * FROM t1;
+DROP TABLE t1;
+SET DEBUG_SYNC=RESET;
+
+--echo #
+--echo # MDEV-27962 Instant DDL downgrades the MDL when table is empty
+--echo #
+CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)ENGINE=InnoDB;
+SET DEBUG_SYNC="alter_table_inplace_after_lock_downgrade SIGNAL try_insert WAIT_FOR alter_progress";
+send ALTER TABLE t1 ADD INDEX(f1), ADD INDEX(f2);
+connection con1;
+SET SESSION lock_wait_timeout=1;
+SET DEBUG_SYNC="now WAIT_FOR try_insert";
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES(1, 2);
+SET DEBUG_SYNC="now SIGNAL alter_progress";
+disconnect con1;
+connection default;
+reap;
+DROP TABLE t1;
+SET DEBUG_SYNC=reset;
+
+--echo # End of 10.4 tests
+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
+
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
diff --git a/mysql-test/suite/innodb/t/instant_alter_extend.combinations b/mysql-test/suite/innodb/t/instant_alter_extend.combinations
new file mode 100644
index 00000000000..1465bf59ad7
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_extend.combinations
@@ -0,0 +1,5 @@
+[latin1]
+character-set-server=latin1
+
+[utf8]
+character-set-server=utf8
diff --git a/mysql-test/suite/innodb/t/instant_alter_extend.test b/mysql-test/suite/innodb/t/instant_alter_extend.test
new file mode 100644
index 00000000000..7258ba6d238
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_extend.test
@@ -0,0 +1,258 @@
+--source include/have_innodb.inc
+--source include/innodb_row_format.inc
+--source include/maybe_debug.inc
+
+-- echo #
+-- echo # MDEV-15563: Instant ROW_FORMAT=REDUNDANT column type change&extension
+-- echo # (reverted in MDEV-18627)
+-- echo #
+
+# Use character-set-server in test db
+create database best;
+use best;
+
+set default_storage_engine=innodb;
+set @bigval= repeat('0123456789', 30);
+
+delimiter ~~;
+create procedure check_table(table_name varchar(255))
+begin
+ select table_id into @table_id
+ from information_schema.innodb_sys_tables
+ where name = concat('best/', table_name);
+ select name, mtype, hex(prtype) as prtype, len
+ from information_schema.innodb_sys_columns
+ where table_id = @table_id;
+end~~
+delimiter ;~~
+
+
+--echo # VARCHAR -> CHAR, VARBINARY -> BINARY conversion
+set @bigval= repeat('0123456789', 20);
+
+create table t (a varchar(300));
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t modify a char(255), algorithm=instant;
+alter table t modify a char(255), algorithm=copy;
+
+create or replace table t (a varchar(200));
+insert into t values (@bigval);
+insert into t values ('z');
+if ($have_debug) {
+--disable_query_log
+# This should not be reachable.
+set @save_debug= @@SESSION.debug_dbug;
+set debug_dbug= '+d,ib_instant_error';
+--enable_query_log
+}
+--enable_info
+alter table t modify a char(200);
+--disable_info
+select count(a) from t where a = @bigval;
+select a, length(a) from t where a = 'z';
+
+check table t extended;
+call check_table('t');
+
+--echo # CHAR enlargement
+--enable_info
+alter table t modify a char(220);
+--disable_info
+select count(a) from t where a = @bigval;
+select a, length(a) from t where a = 'z';
+
+check table t extended;
+call check_table('t');
+
+--enable_info
+ALTER TABLE t CHANGE COLUMN a a CHAR(230) BINARY;
+ALTER TABLE t ADD COLUMN b INT FIRST;
+ALTER TABLE t DROP b;
+--disable_info
+
+check table t extended;
+call check_table('t');
+
+--echo # Convert from VARCHAR to a bigger CHAR
+--enable_info
+alter table t modify a varchar(200);
+alter table t modify a char(255);
+--disable_info
+select count(a) from t where a = @bigval;
+select a, length(a) from t where a = 'z';
+
+select * from t;
+check table t extended;
+call check_table('t');
+
+--echo # BINARY/VARBINARY test
+create or replace table t (a varbinary(300));
+insert into t values(NULL);
+--enable_info
+alter table t modify a binary(255);
+--disable_info
+
+create or replace table t (a varbinary(200));
+insert into t values (@bigval);
+insert into t values ('z');
+--enable_info
+alter table t modify a binary(200);
+--disable_info
+select count(a) from t where a = @bigval;
+select length(a) from t where left(a, 1) = 'z';
+
+check table t extended;
+call check_table('t');
+
+--echo # BINARY enlargement
+--enable_info
+alter table t modify a binary(220);
+--disable_info
+
+check table t extended;
+call check_table('t');
+
+--echo # Convert from VARBINARY to a bigger BINARY
+--enable_info
+alter table t modify a varbinary(220);
+alter table t modify a binary(255);
+--disable_info
+select count(a) from t where a = @bigval;
+select a, length(a) from t where a = 'z';
+
+select * from t;
+check table t extended;
+call check_table('t');
+
+
+--echo # Integer conversions
+create or replace table t (x tinyint);
+insert into t values (127);
+--enable_info
+alter table t modify x smallint;
+--disable_info
+select * from t;
+check table t extended;
+call check_table('t');
+
+update t set x= 32767;
+--enable_info
+alter table t modify x mediumint;
+--disable_info
+select * from t;
+check table t extended;
+call check_table('t');
+
+update t set x= 8388607;
+--enable_info
+alter table t modify x int;
+--disable_info
+select * from t;
+check table t extended;
+call check_table('t');
+
+update t set x= 2147483647;
+--enable_info
+alter table t modify x bigint;
+--disable_info
+select * from t;
+check table t extended;
+call check_table('t');
+
+if ($have_debug) {
+--disable_query_log
+# This should not be reachable.
+set debug_dbug= @save_debug;
+--enable_query_log
+}
+
+--echo # Check IMPORT TABLESPACE
+--let $MYSQLD_DATADIR= `select @@datadir`
+create or replace table t2 (x int);
+alter table t2 discard tablespace;
+
+create or replace table t1 (x tinyint);
+insert into t1 set x= 42;
+alter table t1 modify x int;
+flush tables t1 for export;
+--move_file $MYSQLD_DATADIR/best/t1.cfg $MYSQLD_DATADIR/best/t2.cfg
+--copy_file $MYSQLD_DATADIR/best/t1.ibd $MYSQLD_DATADIR/best/t2.ibd
+unlock tables;
+
+alter table t2 import tablespace;
+
+select * from t2;
+check table t2 extended;
+call check_table('t2');
+
+--echo # Check innobase_col_to_mysql() len < flen
+create or replace table t1 (x mediumint);
+insert into t1 values (1);
+insert into t1 values (1);
+--enable_info
+alter table t1 add column y int first, modify x int;
+--error ER_DUP_ENTRY
+alter table t1 add column z int first, add primary key (x);
+--disable_info
+
+--echo # Check assertion in wrong instant operation
+create or replace table t1 (a varchar(26) not null) default character set utf8mb4;
+insert into t1 values ('abcdef'), (repeat('x',26));
+--enable_info
+alter ignore table t1 modify a varchar(25) not null;
+--disable_info
+select * from t1;
+
+--echo # Check row_mysql_store_col_in_innobase_format()
+create or replace table t1(x int primary key, a varchar(20));
+insert into t1 (x) values (1);
+update t1 set a= 'foo' where x = 2;
+
+--echo #
+--echo # MDEV-18124 PK on inplace-enlarged type fails
+--echo #
+create or replace table t1 (x int, y int);
+insert into t1 (x, y) values (11, 22);
+--enable_info
+alter table t1 modify x bigint;
+alter table t1 add primary key (x);
+--disable_info
+select * from t1;
+check table t1;
+
+create or replace table t1 (a varchar(10), y int);
+insert into t1 (a, y) values ("0123456789", 33);
+--enable_info
+alter table t1 modify a char(15);
+alter table t1 add primary key (a);
+--disable_info
+select * from t1;
+check table t1;
+
+create or replace table t1 (x int primary key, y int);
+insert into t1 (x, y) values (44, 55);
+--enable_info
+alter table t1 modify x bigint;
+--disable_info
+select * from t1;
+check table t1;
+
+create or replace table t1 (x int primary key, y int);
+insert into t1 values (66, 77);
+--enable_info
+alter table t1 add column z int;
+alter table t1 drop column y;
+--disable_info
+select * from t1;
+check table t1;
+
+create or replace table t1 (x integer, a varchar(20));
+--enable_info
+insert into t1 (x, a) values (73, 'a');
+alter table t1 add index idx3 (a);
+alter table t1 modify a char(20);
+--disable_info
+select * from t1;
+check table t1;
+
+drop database best;
diff --git a/mysql-test/suite/innodb/t/instant_alter_import.test b/mysql-test/suite/innodb/t/instant_alter_import.test
index 5bd10a7994e..7bd5645436c 100644
--- a/mysql-test/suite/innodb/t/instant_alter_import.test
+++ b/mysql-test/suite/innodb/t/instant_alter_import.test
@@ -1,4 +1,12 @@
--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source include/innodb_checksum_algorithm.inc
+
+--disable_query_log
+call mtr.add_suppression("Table `test`.`t2` contains unrecognizable instant ALTER metadata");
+call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
+--enable_query_log
+
set default_storage_engine=innodb;
--echo #
@@ -43,10 +51,179 @@ flush tables t2 for export;
--move_file $MYSQLD_DATADIR/test/t2.cfg $MYSQLD_DATADIR/test/t1.cfg
--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t1.ibd
unlock tables;
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t1b.cfg
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t1b.ibd
--echo # The instant ADD COLUMN has to be removed from the metadata.
alter table t1 import tablespace;
select * from t1;
+--echo # Remove metadata for instant DROP COLUMN, then import
+alter table t1 drop x, add column x int first, algorithm instant;
+select * from t1;
+alter table t1 discard tablespace;
+
+--move_file $MYSQLD_DATADIR/test/t1b.cfg $MYSQLD_DATADIR/test/t1.cfg
+--move_file $MYSQLD_DATADIR/test/t1b.ibd $MYSQLD_DATADIR/test/t1.ibd
+alter table t1 import tablespace;
+select * from t1;
+
+--echo # Import a data file that contains instant DROP COLUMN metadata
+alter table t2 drop x;
+alter table t1 drop x, force;
+alter table t1 discard tablespace;
+
+flush tables t2 for export;
+--move_file $MYSQLD_DATADIR/test/t2.cfg $MYSQLD_DATADIR/test/t1.cfg
+--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t1.ibd
+unlock tables;
+
+alter table t1 import tablespace;
+select * from t1;
+
drop table t2;
drop table t1;
+
+
+--let $MYSQLD_DATADIR= `SELECT @@datadir`
+
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i1 INT) ENGINE=INNODB;
+
+CREATE TABLE t2 (id INT PRIMARY KEY AUTO_INCREMENT, i1 INT, i2 INT) ENGINE=INNODB;
+ALTER TABLE t2 DROP COLUMN i2, ALGORITHM=INSTANT;
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+FLUSH TABLE t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+DROP TABLE t2, t1;
+
+
+CREATE TABLE t1 (id INT PRIMARY KEY, i2 INT, i1 INT) ENGINE=INNODB;
+
+INSERT INTO t1 VALUES (1, 1, 1);
+ALTER TABLE t1 MODIFY COLUMN i2 INT AFTER i1, ALGORITHM=INSTANT;
+
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+
+FLUSH TABLE t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+SELECT * FROM t2;
+
+DROP TABLE t2, t1;
+
+
+CREATE TABLE t1 (id INT PRIMARY KEY, i2 INT, i1 INT) ENGINE=INNODB;
+
+INSERT INTO t1 VALUES (1, 1, 1);
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+
+FLUSH TABLE t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+SELECT * FROM t2;
+
+DROP TABLE t2, t1;
+
+
+CREATE TABLE t1 (id INT PRIMARY KEY, i2 INT, i1 INT)
+ ENGINE=INNODB PAGE_COMPRESSED=1;
+
+INSERT INTO t1 VALUES (1, 1, 1);
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+FLUSH TABLE t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+DROP TABLE t2, t1;
+
+
+CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT, i2 INT, i1 INT) ENGINE=INNODB;
+
+INSERT INTO t1 (i2) SELECT 4 FROM seq_1_to_1024;
+ALTER TABLE t1 DROP COLUMN i2, ALGORITHM=INSTANT;
+
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+FLUSH TABLE t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+DROP TABLE t2, t1;
+
+
+CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb;
+CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb;
+
+ALTER TABLE test.t1 add COLUMN i3 INT AFTER i1;
+
+ALTER TABLE t2 DISCARD TABLESPACE;
+FLUSH TABLES t1 FOR EXPORT;
+
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+
+UNLOCK TABLES;
+--error ER_NOT_KEYFILE
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-28919 Assertion `(((core_null) + 7) >> 3) ==
+--echo # oindex.n_core_null_bytes || !not_redundant()' failed
+--echo #
+call mtr.add_suppression(" InnoDB: Tablespace for table `test`.`t` is set as discarded");
+CREATE TABLE t (a INTEGER, b INTEGER as (a) VIRTUAL,
+ c INTEGER)engine=innodb;
+ALTER TABLE t DISCARD TABLESPACE;
+# Table does reload
+ALTER TABLE t DROP COLUMN b, algorithm=instant;
+ALTER TABLE t DROP COLUMN c, algorithm=instant;
+
+CREATE TABLE t1(a INTEGER)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+FLUSH TABLE t1 FOR EXPORT;
+--let $MYSQLD_DATADIR= `select @@datadir`
+--move_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t.cfg
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t.ibd
+unlock tables;
+ALTER TABLE t IMPORT tablespace;
+check table t;
+select * from t;
+DROP TABLE t, t1;
diff --git a/mysql-test/suite/innodb/t/instant_alter_index_rename.test b/mysql-test/suite/innodb/t/instant_alter_index_rename.test
new file mode 100644
index 00000000000..af66c1027cc
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_index_rename.test
@@ -0,0 +1,229 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_sequence.inc
+
+delimiter |;
+create function get_index_id(tbl_id int, index_name char(100))
+ returns int
+begin
+ declare res int;
+ select index_id into res from information_schema.innodb_sys_indexes where
+ name=index_name and table_id = tbl_id;
+ return res;
+end|
+
+delimiter ;|
+
+create table t (
+ pk int primary key,
+ a int,
+ b int,
+ c int,
+ unique index a_key (a),
+ key c_key (c)
+) engine=innodb stats_persistent=1;
+
+insert into t values (1, 1, 1, 1);
+
+set @table_id = (select table_id from information_schema.innodb_sys_tables where name='test/t');
+
+set @a_key_id = get_index_id(@table_id, 'a_key');
+set @c_key_id = get_index_id(@table_id, 'c_key');
+set @primary_id = get_index_id(@table_id, 'primary');
+
+select distinct(index_name) from mysql.innodb_index_stats where table_name = 't';
+alter table t
+ drop index a_key,
+ add unique index a_key_strikes_back (a);
+select distinct(index_name) from mysql.innodb_index_stats where table_name = 't';
+
+check table t;
+select @a_key_id = get_index_id(@table_id, 'a_key_strikes_back'),
+ @c_key_id = get_index_id(@table_id, 'c_key'),
+ @primary_id = get_index_id(@table_id, 'primary');
+
+set @a_key_strikes_back_id = get_index_id(@table_id, 'a_key_strikes_back');
+set @c_key_id = get_index_id(@table_id, 'c_key');
+set @primary_id = get_index_id(@table_id, 'primary');
+
+alter table t
+ drop index a_key_strikes_back,
+ add unique index a_key_returns (a),
+ drop primary key,
+ add primary key (pk),
+ add unique index b_key (b);
+
+check table t;
+select @a_key_strikes_back_id = get_index_id(@table_id, 'a_key_returns'),
+ @c_key_id = get_index_id(@table_id, 'c_key'),
+ @primary_id = get_index_id(@table_id, 'primary');
+
+set @a_key_returns_id = get_index_id(@table_id, 'a_key_returns');
+set @b_key_id = get_index_id(@table_id, 'b_key');
+set @c_key_id = get_index_id(@table_id, 'c_key');
+set @primary_id = get_index_id(@table_id, 'primary');
+
+alter table t
+ drop key c_key,
+ add key c_key2 (c);
+
+check table t;
+select @a_key_returns_id = get_index_id(@table_id, 'a_key_returns'),
+ @b_key_id = get_index_id(@table_id, 'b_key'),
+ @c_key_id = get_index_id(@table_id, 'c_key2'),
+ @primary_id = get_index_id(@table_id, 'primary');
+
+drop table t;
+
+create table errors (
+ a int,
+ unique key a_key (a),
+ b int
+) engine=innodb;
+
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table errors
+ drop key a_key,
+ drop key a_key,
+ add unique key a_key2 (a);
+
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table errors
+ drop key a_key,
+ drop key a_key2,
+ add unique key a_key2 (a);
+
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table errors
+ add key b_key (b),
+ drop key b_key,
+ add key bb_key (b);
+
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table errors
+ drop key a_key,
+ add key a_key2 (a),
+ drop key a_key,
+ add key a_key2 (a);
+
+drop table errors;
+
+--disable_query_log
+call mtr.add_suppression("Flagged corruption of `a_key` in table `test`.`corrupted` in dict_set_index_corrupted");
+--enable_query_log
+
+create table corrupted (
+ a int,
+ key a_key (a)
+) engine=innodb;
+
+insert into corrupted values (1);
+
+select * from corrupted;
+
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug = '+d,dict_set_index_corrupted';
+check table corrupted;
+SET debug_dbug = @save_dbug;
+
+--error ER_INDEX_CORRUPT
+select * from corrupted;
+
+--error ER_INDEX_CORRUPT
+alter table corrupted
+ drop key a_key,
+ add key a_key2 (a);
+
+alter table corrupted
+ drop key a_key;
+
+select * from corrupted;
+
+check table corrupted;
+
+drop table corrupted;
+
+create table t (
+ a int,
+ unique key a_key (a)
+) engine=innodb stats_persistent=1;
+
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug = '+d,ib_rename_index_fail1';
+-- error ER_LOCK_DEADLOCK
+alter table t
+ drop key a_key,
+ add unique key a_key2 (a),
+ algorithm=instant;
+SET debug_dbug = @save_dbug;
+
+--error ER_WRONG_NAME_FOR_INDEX
+alter table t
+ drop key a_key,
+ add unique key `GEN_CLUST_INDEX` (a),
+ algorithm=instant;
+
+show create table t;
+
+drop table t;
+
+
+create table rename_column_and_index (
+ a int,
+ unique index a_key(a)
+) engine=innodb;
+
+insert into rename_column_and_index values (1), (3);
+
+alter table rename_column_and_index
+ change a aa int,
+ drop key a_key,
+ add unique key aa_key(aa),
+ algorithm=instant;
+
+show create table rename_column_and_index;
+check table rename_column_and_index;
+drop table rename_column_and_index;
+
+
+--echo #
+--echo # MDEV-19189: ASAN memcpy-param-overlap in fill_alter_inplace_info upon adding indexes
+--echo #
+
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
+ALTER TABLE t1 ADD FOREIGN KEY f (f2) REFERENCES xx(f2);
+ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t1(f2), ADD KEY (f3), ADD KEY (f1);
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-21669 InnoDB: Table ... contains <n> indexes inside InnoDB, which is different from the number of indexes <n> defined in the MariaDB
+--echo #
+CREATE TABLE t1 (col_int INTEGER, col_char CHAR(20), col_varchar VARCHAR(500)) ENGINE=InnoDB;
+SET @table_id = (SELECT table_id FROM information_schema.innodb_sys_tables WHERE name='test/t1');
+ALTER TABLE t1 ADD KEY idx3 (col_varchar(9)), ADD KEY idX2 (col_char(9));
+SET @idx3_key_id = get_index_id(@table_id, 'iDx3');
+ALTER TABLE t1 DROP KEY iDx3, ADD KEY Idx3 (col_varchar(9));
+SELECT @idx3_key_id = get_index_id(@table_id, 'Idx3');
+CHECK TABLE t1 EXTENDED ;
+DROP TABLE t1;
+
+DROP FUNCTION get_index_id;
+
+--echo #
+--echo # MDEV-23356 InnoDB: Failing assertion: field->col->mtype == type, crash or ASAN failures in row_sel_convert_mysql_key_to_innobase, InnoDB indexes are inconsistent after INDEX changes
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, c CHAR(8),
+ KEY ind1(c), KEY ind2(b)) ENGINE=InnoDB STATS_PERSISTENT=1;
+
+INSERT INTO t1 SELECT 1, 1, 'a' FROM seq_1_to_100;
+
+SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats;
+
+ALTER TABLE t1 DROP INDEX ind2, ADD INDEX ind3(b),
+ DROP INDEX ind1, ADD INDEX ind2(c);
+
+SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats;
+
+UPDATE t1 SET a = 1 WHERE c = 'foo';
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/instant_alter_limit.test b/mysql-test/suite/innodb/t/instant_alter_limit.test
new file mode 100644
index 00000000000..b7fb3ee55c1
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_limit.test
@@ -0,0 +1,76 @@
+--source include/innodb_page_size.inc
+
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
+
+CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, d INT, e INT)
+ENGINE=InnoDB;
+INSERT INTO t VALUES(1,2,3,4,5);
+SET innodb_strict_mode = OFF;
+--disable_query_log
+call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot add .* in table `test`\\.`t` because after adding it, the row size");
+let $n=253;
+while ($n) {
+dec $n;
+ALTER TABLE t DROP b, DROP c, DROP d, DROP e,
+ADD COLUMN b INT FIRST, ADD COLUMN c INT, ADD COLUMN d INT AFTER b,
+ADD COLUMN e INT AFTER c, ALGORITHM=INSTANT;
+}
+--enable_query_log
+SELECT * FROM t;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t DROP b, DROP c, DROP d, DROP e,
+ADD COLUMN b INT, ALGORITHM=INSTANT;
+ALTER TABLE t CHANGE COLUMN b beta INT AFTER a, ALGORITHM=INSTANT;
+ALTER TABLE t DROP e, DROP c, DROP d, ALGORITHM=INSTANT;
+SELECT * FROM t;
+ALTER TABLE t DROP COLUMN beta, ALGORITHM=INSTANT;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t ADD COLUMN b INT NOT NULL, ALGORITHM=INSTANT;
+
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+
+ALTER TABLE t ADD COLUMN b INT NOT NULL;
+
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+
+SELECT * FROM t;
+ALTER TABLE t ADD COLUMN (c CHAR(255) NOT NULL, d BIGINT NOT NULL),
+ALGORITHM=INSTANT;
+
+--disable_query_log
+let $n=253;
+while ($n) {
+dec $n;
+ALTER TABLE t DROP b, DROP c, DROP d,
+ADD COLUMN (b INT NOT NULL, c CHAR(255) NOT NULL, d BIGINT NOT NULL);
+}
+--enable_query_log
+
+UPDATE t SET b=b+1,d=d+1,c='foo';
+SELECT * FROM t;
+
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-21787 Alter table failure tries to access uninitialized column
+--echo #
+CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT GENERATED ALWAYS AS (SUBSTR(f4, 1, 400)), f3 VARCHAR(500), f4 TEXT)ENGINE=InnoDB ROW_FORMAT=Compact;
+ALTER TABLE t1 ADD UNIQUE KEY (f2(9));
+let $error_code = 0;
+let $innodb_page_size = `SELECT @@INNODB_PAGE_SIZE`;
+if ($innodb_page_size == 4k) {
+ let $error_code= ER_TOO_BIG_ROWSIZE;
+}
+--error $error_code
+ALTER TABLE t1 ADD COLUMN f5 TEXT, ALGORITHM=INPLACE;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/instant_alter_null.test b/mysql-test/suite/innodb/t/instant_alter_null.test
new file mode 100644
index 00000000000..69fb1ae4495
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_null.test
@@ -0,0 +1,57 @@
+--source include/have_innodb.inc
+
+create table t (a int NOT NULL) engine=innodb row_format= compressed;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t modify a int NULL, algorithm=instant;
+drop table t;
+
+create table t (a int NOT NULL) engine=innodb row_format= dynamic;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t modify a int NULL, algorithm=instant;
+drop table t;
+
+create table t (a int NOT NULL) engine=innodb row_format= compact;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t modify a int NULL, algorithm=instant;
+drop table t;
+
+create table t (
+ id int primary key,
+ a int NOT NULL default 0,
+ b int NOT NULL default 0,
+ c int NOT NULL default 0,
+ index idx (a,b,c)
+) engine=innodb row_format=redundant;
+
+--error ER_BAD_NULL_ERROR
+insert into t (id, a) values (0, NULL);
+--error ER_BAD_NULL_ERROR
+insert into t (id, b) values (0, NULL);
+--error ER_BAD_NULL_ERROR
+insert into t (id, c) values (0, NULL);
+
+insert into t values (1,1,1,1);
+
+set @id = (select table_id from information_schema.innodb_sys_tables
+where name = 'test/t');
+
+--replace_column 1 TABLE_ID
+select * from information_schema.innodb_sys_columns where table_id=@id;
+
+alter table t modify a int NULL, algorithm=instant;
+insert into t values (2, NULL, 2, 2);
+
+alter table t modify b int NULL, algorithm=nocopy;
+insert into t values (3, NULL, NULL, 3);
+
+alter table t modify c int NULL, algorithm=inplace;
+insert into t values (4, NULL, NULL, NULL);
+
+--replace_column 1 TABLE_ID
+select * from information_schema.innodb_sys_columns where table_id=@id;
+
+select * from t;
+
+check table t;
+
+drop table t;
diff --git a/mysql-test/suite/innodb/t/instant_alter_purge.test b/mysql-test/suite/innodb/t/instant_alter_purge.test
new file mode 100644
index 00000000000..5ccce2ad1d6
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_purge.test
@@ -0,0 +1,76 @@
+--source include/have_innodb.inc
+--source include/maybe_debug.inc
+if ($have_debug) {
+--source include/have_debug_sync.inc
+}
+
+SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+
+--echo #
+--echo # MDEV-17793 Crash in purge after instant DROP and emptying the table
+--echo #
+
+connect (prevent_purge,localhost,root);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+connection default;
+CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES ();
+ALTER TABLE t1 DROP f2, ADD COLUMN f2 INT;
+ALTER TABLE t1 DROP f1;
+DELETE FROM t1;
+
+connection prevent_purge;
+COMMIT;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+
+ALTER TABLE t1 ADD COLUMN extra TINYINT UNSIGNED NOT NULL DEFAULT 42;
+let $wait_all_purged= 1;
+--source include/wait_all_purged.inc
+ALTER TABLE t1 DROP extra;
+disconnect prevent_purge;
+let $wait_all_purged= 0;
+--source include/wait_all_purged.inc
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17813 Crash in instant ALTER TABLE due to purge
+--echo # concurrently emptying table
+--echo #
+CREATE TABLE t1 (f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 SET f2=1;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+
+connect (purge_control,localhost,root);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+connection default;
+DELETE FROM t1;
+
+if ($have_debug) {
+SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL go WAIT_FOR do';
+}
+send ALTER TABLE t1 ADD COLUMN f3 INT;
+
+connection purge_control;
+if ($have_debug) {
+SET DEBUG_SYNC='now WAIT_FOR go';
+}
+COMMIT;
+SET GLOBAL innodb_max_purge_lag_wait= 0;
+if ($have_debug) {
+--source include/wait_all_purged.inc
+SET DEBUG_SYNC='now SIGNAL do';
+}
+disconnect purge_control;
+
+connection default;
+reap;
+if ($have_debug) {
+SET DEBUG_SYNC=RESET;
+}
+DROP TABLE t1;
+
+SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/t/instant_alter_rollback.test b/mysql-test/suite/innodb/t/instant_alter_rollback.test
index b68a6ad3880..cfece7e0738 100644
--- a/mysql-test/suite/innodb/t/instant_alter_rollback.test
+++ b/mysql-test/suite/innodb/t/instant_alter_rollback.test
@@ -8,28 +8,49 @@ FLUSH TABLES;
--echo #
--echo # MDEV-11369: Instant ADD COLUMN for InnoDB
+--echo # MDEV-15562: Instant DROP COLUMN or changing the order of columns
--echo #
connect to_be_killed, localhost, root;
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
CREATE TABLE empty (id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB;
CREATE TABLE once LIKE empty;
CREATE TABLE twice LIKE empty;
+CREATE TABLE thrice LIKE empty;
INSERT INTO once SET id=1,c2=1;
INSERT INTO twice SET id=1,c2=1;
+INSERT INTO thrice SET id=1,c2=1;
ALTER TABLE empty ADD COLUMN (d1 INT DEFAULT 15);
ALTER TABLE once ADD COLUMN (d1 INT DEFAULT 20);
ALTER TABLE twice ADD COLUMN (d1 INT DEFAULT 20);
+ALTER TABLE thrice ADD COLUMN (d1 INT DEFAULT 20);
ALTER TABLE twice ADD COLUMN
(d2 INT NOT NULL DEFAULT 10,
d3 VARCHAR(15) NOT NULL DEFAULT 'var och en char');
+ALTER TABLE thrice ADD COLUMN
+(d2 INT NOT NULL DEFAULT 10,
+ d3 TEXT NOT NULL DEFAULT 'con');
+ALTER TABLE thrice DROP c2, DROP d3, CHANGE d2 d3 INT NOT NULL FIRST;
+
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
BEGIN;
INSERT INTO empty set id=0,c2=42;
UPDATE once set c2=c2+1;
UPDATE twice set c2=c2+1;
+UPDATE thrice set d3=d3+1;
INSERT INTO twice SET id=2,c2=0,d3='';
+INSERT INTO thrice SET id=2,d3=0;
+DELETE FROM empty;
+DELETE FROM once;
+DELETE FROM twice;
+DELETE FROM thrice;
connection default;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
@@ -48,4 +69,5 @@ SET GLOBAL innodb_purge_rseg_truncate_frequency=@saved_frequency;
SELECT * FROM empty;
SELECT * FROM once;
SELECT * FROM twice;
-DROP TABLE empty, once, twice;
+SELECT * FROM thrice;
+DROP TABLE empty, once, twice, thrice;
diff --git a/mysql-test/suite/innodb/t/instant_auto_inc.test b/mysql-test/suite/innodb/t/instant_auto_inc.test
new file mode 100644
index 00000000000..4aea81c1c49
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_auto_inc.test
@@ -0,0 +1,13 @@
+--source include/have_innodb.inc
+
+create table t(id int primary key, a int) engine=InnoDB;
+insert into t (id, a) values (1, 1);
+alter table t modify column id int auto_increment;
+check table t;
+insert into t (a) values (2);
+alter table t modify column id int, algorithm=instant;
+check table t;
+insert into t (id, a) values (3, 3);
+select * from t;
+check table t;
+drop table t;
diff --git a/mysql-test/suite/innodb/t/instant_drop.test b/mysql-test/suite/innodb/t/instant_drop.test
new file mode 100644
index 00000000000..566ac02b314
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_drop.test
@@ -0,0 +1,108 @@
+--source include/have_innodb.inc
+
+create table t1(f1 int not null, f2 int not null, f3 int not null)engine=innodb;
+insert into t1 values(1, 2, 3),(4, 5, 6);
+alter table t1 drop column f2, algorithm=instant;
+select * from t1;
+insert into t1 values(1,2);
+select * from t1;
+alter table t1 add column f4 int not null default 5, algorithm=instant;
+select * from t1;
+alter table t1 drop column f1, algorithm=instant;
+select * from t1;
+insert into t1 values(7, 9);
+select * from t1;
+alter table t1 add column f5 blob default repeat('aaa', 950), drop column f4, algorithm=instant;
+select * from t1;
+select f3 from t1;
+update t1 set f3 = 10 where f3 > 2;
+select * from t1;
+delete from t1 where f3 = 10;
+show create table t1;
+select f3 from t1;
+update t1 set f5 = 'world';
+select * from t1;
+drop table t1;
+
+create table t1(f1 int, f2 int not null, index idx(f2))engine=innodb;
+insert into t1 values(1, 2);
+alter table t1 drop column f1, add column f3 varchar(100) default 'thiru', algorithm=instant;
+select * from t1 force index (idx);
+alter table t1 drop column f3, algorithm=instant;
+select * from t1;
+begin;
+insert into t1 values(10);
+select * from t1;
+update t1 set f2 = 100;
+select * from t1;
+delete from t1 where f2 = 100;
+select * from t1;
+rollback;
+select * from t1;
+show create table t1;
+drop table t1;
+
+create table t1(f1 int, f2 int not null)engine=innodb;
+insert into t1 values(1, 2);
+alter table t1 drop column f2, algorithm=instant;
+insert into t1 values(NULL);
+select * from t1;
+drop table t1;
+
+create table t1(f1 int not null, f2 int not null)engine=innodb;
+insert into t1 values(1, 2);
+alter table t1 add column f5 int default 10, algorithm=instant;
+alter table t1 add column f3 int not null default 100, algorithm=instant;
+alter table t1 add column f4 int default 100, drop column f3, algorithm=instant;
+insert into t1 values(2, 3, 20, 100);
+select * from t1;
+drop table t1;
+
+create table t1(f1 int not null, f2 int not null) engine=innodb;
+insert into t1 values(1, 1);
+alter table t1 drop column f2, add column f3 int default 3, algorithm=instant;
+select * from t1;
+update t1 set f3 = 19;
+select * from t1;
+alter table t1 drop column f1, add column f5 tinyint default 10 first,
+algorithm=instant;
+insert into t1 values(4, 10);
+select * from t1;
+
+create table t2(f1 int, f2 int not null) engine=innodb;
+insert into t2(f1, f2) values(1, 2);
+alter table t2 drop column f2, add column f4 varchar(100) default repeat('a', 20), add column f5 int default 10, algorithm=instant;
+select * from t2;
+show create table t2;
+alter table t2 add column f6 char(100) default repeat('a', 99), algorithm=instant;
+
+create table t3(f1 int, f2 int not null)engine=innodb;
+insert into t3 values(1, 2);
+alter table t3 drop column f2, add column f3 int default 1, add column f4 int default 4, algorithm=instant;
+
+create table t4(a varchar(1), b int, c int, primary key(a,b))engine=innodb;
+insert into t4 values('4',5,6);
+alter table t4 drop column c;
+
+--source include/restart_mysqld.inc
+select * from t1;
+alter table t1 add column f6 int default 9,drop column f5, algorithm = instant;
+insert into t1 values(4, 9);
+alter table t1 force, algorithm=inplace;
+select * from t1;
+
+select * from t2;
+alter table t2 force, algorithm=inplace;
+select * from t2;
+show create table t2;
+
+select * from t3;
+alter table t3 add column f5 char(100) default repeat('a', 99), algorithm=instant;
+
+select * from t4;
+alter table t4 add column d varchar(5) default 'fubar';
+insert into t4 values('',0,'snafu');
+--source include/restart_mysqld.inc
+select * from t3;
+select * from t4;
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.combinations b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
index faed87630b2..8943ee2352f 100644
--- a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test
@@ -20,6 +20,7 @@ INSERT INTO t1 VALUES(1, 'sql'), (2, 'server'), (3, 'mariadb'),
(8, 'test4'), (9, 'test5'), (10, 'test6'), (11, 'test7'),
(12, 'test8');
+let $restart_noprint=2;
--source include/restart_mysqld.inc
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
@@ -37,7 +38,7 @@ perl;
my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd";
open(FILE, "+<$file") || die "Unable to open $file";
binmode FILE;
-seek (FILE, $ENV{INNODB_PAGE_SIZE} * 19, SEEK_SET) or die "seek";
+seek (FILE, $ENV{INNODB_PAGE_SIZE} * 19 + 38, SEEK_SET) or die "seek";
print FILE "junk";
close FILE or die "close";
EOF
diff --git a/mysql-test/suite/innodb/t/log_data_file_size.test b/mysql-test/suite/innodb/t/log_data_file_size.test
index f01e013ddfa..fe75b9ab236 100644
--- a/mysql-test/suite/innodb/t/log_data_file_size.test
+++ b/mysql-test/suite/innodb/t/log_data_file_size.test
@@ -57,6 +57,7 @@ for (my $d = $d1; $d < $d2 + 64; $d++) {
close FILE;
open(FILE, ">$ENV{MYSQLTEST_VARDIR}/log/start_mysqld.txt") || die;
print FILE "--let \$restart_parameters=$restart\n" if $restart;
+print FILE "--let \$restart_noprint=2\n";
print FILE "--source include/start_mysqld.inc\n";
close FILE;
open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}test/ibd4.ibd") or die;
diff --git a/mysql-test/suite/innodb/t/missing_tablespaces.test b/mysql-test/suite/innodb/t/missing_tablespaces.test
index 98efc51d7b8..b4da9745ba4 100644
--- a/mysql-test/suite/innodb/t/missing_tablespaces.test
+++ b/mysql-test/suite/innodb/t/missing_tablespaces.test
@@ -16,6 +16,7 @@ USE `..................................................`;
CREATE TABLE `..................................................` (ID INT)
ENGINE=INNODB;
+let $restart_noprint=2;
--source include/shutdown_mysqld.inc
--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e/@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.ibd
diff --git a/mysql-test/suite/innodb/t/no_pad.test b/mysql-test/suite/innodb/t/no_pad.test
new file mode 100644
index 00000000000..1be1972c9ca
--- /dev/null
+++ b/mysql-test/suite/innodb/t/no_pad.test
@@ -0,0 +1,10 @@
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (a CHAR(8), id INT, PRIMARY KEY (a,id)) COLLATE utf8_nopad_bin
+ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+
+INSERT INTO t1 VALUES ('',1);
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES ('',2);
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/page_id_innochecksum.test b/mysql-test/suite/innodb/t/page_id_innochecksum.test
index a7e61cdbe5f..106da09df6d 100644
--- a/mysql-test/suite/innodb/t/page_id_innochecksum.test
+++ b/mysql-test/suite/innodb/t/page_id_innochecksum.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
+--source include/innodb_checksum_algorithm.inc
--echo # Set the environmental variables
let MYSQLD_BASEDIR= `SELECT @@basedir`;
let MYSQLD_DATADIR= `SELECT @@datadir`;
@@ -9,6 +10,7 @@ create table t1(f1 int not null)engine=innodb;
insert into t1 values(1), (2), (3);
let $resultlog=$MYSQLTEST_VARDIR/tmp/result.log;
+let $restart_noprint=2;
--source include/shutdown_mysqld.inc
--echo # Change the page offset
perl;
@@ -21,22 +23,32 @@ my $page_size = $ENV{INNODB_PAGE_SIZE};
sysopen IBD_FILE, "$ENV{MYSQLD_DATADIR}/test/t1.ibd", O_RDWR
|| die "Cannot open t1.ibd\n";
-sysread(IBD_FILE, $_, 38) || die "Cannot read t1.ibd\n";
-my $space = unpack("x[34]N", $_);
+sysread(IBD_FILE, $_, 58) || die "Cannot read t1.ibd\n";
+my ($space,$flags) = unpack("x[34]Nx[16]N", $_);
+my $full_crc32 = $flags & 0x10;
sysseek(IBD_FILE, $page_size * 3, SEEK_SET) || die "Cannot seek t1.ibd\n";
-my $head = pack("Nx[18]", 4); # better to have a valid page number
-my $body = chr(0) x ($page_size - 38 - 8);
+my $page= pack("NNx[18]NNN", 0, 4, 1, 0, $space).(chr(0) x ($page_size - 38));
-# Calculate innodb_checksum_algorithm=crc32 for the unencrypted page.
-# The following bytes are excluded:
-# bytes 0..3 (the checksum is stored there)
-# bytes 26..37 (encryption key version, post-encryption checksum, tablespace id)
-# bytes $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN)
+# Calculate innodb_checksum_algorithm=crc32 or full_crc32.
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial);
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $page_size-4), 0, $polynomial);
+ substr($page, $page_size-4, 4) = pack("N", $ck);
+}
+else
+{
+ # The following bytes are excluded:
+ # 0..3 (the checksum is stored there)
+ # 26..37 (encryption key version, post-encryption checksum, tablespace id)
+ # $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN)
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+ mycrc32(substr($page, 38, $page_size-38-8), 0, $polynomial));
+ substr($page,0,4)=$ck;
+ substr($page,$page_size-8,4)=$ck;
+}
-my $page= pack("N",$ck).$head.pack("NNN",1,$ck,$space).$body.pack("Nx[4]",$ck);
die unless syswrite(IBD_FILE, $page, $page_size) == $page_size;
close IBD_FILE;
EOF
diff --git a/mysql-test/suite/innodb/t/purge_thread_shutdown.test b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
index 8a9a834454c..5be29b7a6a3 100644
--- a/mysql-test/suite/innodb/t/purge_thread_shutdown.test
+++ b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
@@ -32,7 +32,9 @@ delete from t1 where a=3;
error ER_WRONG_VALUE_FOR_VAR;
set global innodb_fast_shutdown=0;
-let $me=`select connection_id()`;
+# Get id with space prefix to ensure that replace_result doesn't replace
+# the error code
+let $me=`select concat(' ', connection_id())`;
replace_result $me ID;
error ER_CONNECTION_KILLED;
eval kill $me;
diff --git a/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test b/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
index f1d1537237e..645ae8c7855 100644
--- a/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
+++ b/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
@@ -12,6 +12,7 @@
# is independent of the page size.
--source include/have_innodb_16k.inc
+let $restart_noprint=2;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
diff --git a/mysql-test/suite/innodb/t/restart.test b/mysql-test/suite/innodb/t/restart.test
index 16c6d20f621..cd5e7532354 100644
--- a/mysql-test/suite/innodb/t/restart.test
+++ b/mysql-test/suite/innodb/t/restart.test
@@ -15,8 +15,8 @@ let page_size= `select @@innodb_page_size`;
--echo # FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files
--echo # of tables with .isl file or DATA DIRECTORY attribute.
-call mtr.add_suppression("\\[ERROR\\] InnoDB: Invalid flags 0x7a207879 in .*td\\.ibd");
--echo # FIXME: This is much more noisy than MariaDB 10.1!
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Tablespace flags are invalid in datafile: .*test.t[rcd]\\.ibd");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified\\.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them\\.");
diff --git a/mysql-test/suite/innodb/t/row_format_redundant.opt b/mysql-test/suite/innodb/t/row_format_redundant.opt
new file mode 100644
index 00000000000..c44c611ed60
--- /dev/null
+++ b/mysql-test/suite/innodb/t/row_format_redundant.opt
@@ -0,0 +1 @@
+--innodb-checksum-algorithm=crc32
diff --git a/mysql-test/suite/innodb/t/row_format_redundant.test b/mysql-test/suite/innodb/t/row_format_redundant.test
index b23093009bb..e8869b886c8 100644
--- a/mysql-test/suite/innodb/t/row_format_redundant.test
+++ b/mysql-test/suite/innodb/t/row_format_redundant.test
@@ -95,6 +95,9 @@ do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
my $ps= $ENV{INNODB_PAGE_SIZE};
my $file= "$ENV{bugdir}/ibdata1";
open(FILE, "+<", $file) || die "Unable to open $file\n";
+die "Unable to read $file" unless sysread(FILE, $_, $ps) == $ps;
+my $full_crc32 = unpack("N",substr($_,54,4)) & 0x10; # FIL_SPACE_FLAGS;
+sysseek(FILE, 0, 0) || die "Unable to seek $file";
# Read DICT_HDR_TABLES, the root page number of CLUST_IND (SYS_TABLES.NAME).
sysseek(FILE, 7*$ps+38+32, 0) || die "Unable to seek $file";
die "Unable to read $file" unless sysread(FILE, $_, 4) == 4;
@@ -121,10 +124,16 @@ for (my $offset= 0x65; $offset;
}
}
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+if ($full_crc32) {
+ my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial);
+ substr($page, $ps-4, 4) = pack("N", $ck);
+} else {
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+}
+
sysseek(FILE, $sys_tables_root*$ps, 0) || die "Unable to seek $file";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file\n";
diff --git a/mysql-test/suite/innodb/t/system_tables.test b/mysql-test/suite/innodb/t/system_tables.test
index 90cb8c59fbd..172628790f8 100644
--- a/mysql-test/suite/innodb/t/system_tables.test
+++ b/mysql-test/suite/innodb/t/system_tables.test
@@ -9,4 +9,4 @@ insert envois3 values ('2008-08-11 22:43:00');
--source include/restart_mysqld.inc
select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3;
drop table envois3;
-alter table mysql.time_zone_name engine=MyISAM;
+alter table mysql.time_zone_name engine=Aria;
diff --git a/mysql-test/suite/innodb/t/table_flags.combinations b/mysql-test/suite/innodb/t/table_flags.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/table_flags.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/innodb/t/table_flags.opt b/mysql-test/suite/innodb/t/table_flags.opt
new file mode 100644
index 00000000000..c44c611ed60
--- /dev/null
+++ b/mysql-test/suite/innodb/t/table_flags.opt
@@ -0,0 +1 @@
+--innodb-checksum-algorithm=crc32
diff --git a/mysql-test/suite/innodb/t/table_flags.test b/mysql-test/suite/innodb/t/table_flags.test
index 13e1fc01dc0..79b2c3dd77a 100644
--- a/mysql-test/suite/innodb/t/table_flags.test
+++ b/mysql-test/suite/innodb/t/table_flags.test
@@ -16,6 +16,7 @@ call mtr.add_suppression("InnoDB: Operating system error number .* in a file ope
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself");
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of file ");
+call mtr.add_suppression("InnoDB: Parent table of FTS auxiliary table .* not found.");
FLUSH TABLES;
--enable_query_log
@@ -34,6 +35,7 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags;
if ($have_debug) {
--let $d=$d --debug=d,create_and_drop_garbage
}
+--let $restart_noprint=1
--let $restart_parameters=$d --innodb-stats-persistent=0
--source include/restart_mysqld.inc
@@ -56,6 +58,8 @@ do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
my $ps= $ENV{INNODB_PAGE_SIZE};
my $file= "$ENV{bugdir}/ibdata1";
open(FILE, "+<", $file) || die "Unable to open $file\n";
+die "Unable to read $file" unless sysread(FILE, $_, 58) == 58;
+my $full_crc32 = unpack("N",substr($_,54,4)) & 0x10; # FIL_SPACE_FLAGS
# Read DICT_HDR_TABLES, the root page number of CLUST_IND (SYS_TABLES.NAME).
sysseek(FILE, 7*$ps+38+32, 0) || die "Unable to seek $file";
die "Unable to read $file" unless sysread(FILE, $_, 4) == 4;
@@ -129,10 +133,18 @@ for (my $offset= 0x65; $offset;
print ")\n";
}
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial);
+ substr($page, $ps-4, 4) = pack("N", $ck);
+}
+else
+{
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+}
sysseek(FILE, $sys_tables_root*$ps, 0) || die "Unable to seek $file";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file\n";
@@ -226,3 +238,16 @@ call mtr.add_suppression("ERROR HY000: Can't create table `test`.`t1`");
CREATE TABLE t1(f1 INT, f2 VARCHAR(1), KEY k1(f2),
FULLTEXT KEY(f2),
FOREIGN KEY (f2) REFERENCES t1(f3))ENGINE=InnoDB;
+
+--echo #
+--echo # MDEV-23199 page_compression flag is missing
+--echo # for full_crc32 tablespace
+--echo #
+
+CREATE TABLE t1(f1 BIGINT PRIMARY KEY)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+ALTER TABLE t1 PAGE_COMPRESSED = 1;
+INSERT INTO t1 VALUES(2);
+let $shutdown_timeout = 0;
+--source include/restart_mysqld.inc
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/trx_id_future.combinations b/mysql-test/suite/innodb/t/trx_id_future.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/trx_id_future.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/innodb/t/trx_id_future.test b/mysql-test/suite/innodb/t/trx_id_future.test
index e65dc537fd8..b897800fa91 100644
--- a/mysql-test/suite/innodb/t/trx_id_future.test
+++ b/mysql-test/suite/innodb/t/trx_id_future.test
@@ -14,6 +14,7 @@ INSERT INTO t1 VALUES(1);
let MYSQLD_DATADIR=`select @@datadir`;
--source include/wait_all_purged.inc
+let $restart_noprint=2;
--source include/shutdown_mysqld.inc
perl;
@@ -29,6 +30,8 @@ binmode FILE;
my $ps= $ENV{PAGE_SIZE};
my $page;
+die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
+my $full_crc32 = unpack("N",substr($page,54,4)) & 0x10; # FIL_SPACE_FLAGS
sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n";
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
#In this case the first record should be at offset 135
@@ -37,10 +40,18 @@ die unless unpack("n", substr($page, 99, 2)) == 135;
substr($page,135+6,6) = "\xff" x 6;
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $ps - 4), 0, $polynomial);
+ substr($page, $ps - 4, 4) = pack("N", $ck);
+}
+else
+{
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+}
sysseek(FILE, 3*$ps, 0) || die "Unable to rewind $file\n";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file";
diff --git a/mysql-test/suite/innodb/t/undo_truncate.opt b/mysql-test/suite/innodb/t/undo_truncate.opt
deleted file mode 100644
index 1c897ab6cfc..00000000000
--- a/mysql-test/suite/innodb/t/undo_truncate.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb-log-buffer-size=2m
diff --git a/mysql-test/suite/innodb/t/undo_truncate.test b/mysql-test/suite/innodb/t/undo_truncate.test
index 2ca4f67d0bf..0e73a9b4e21 100644
--- a/mysql-test/suite/innodb/t/undo_truncate.test
+++ b/mysql-test/suite/innodb/t/undo_truncate.test
@@ -4,9 +4,6 @@
--source include/not_embedded.inc
--source include/have_sequence.inc
-SET @save_undo_logs = @@GLOBAL.innodb_undo_logs;
-SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
-SET @save_truncate = @@GLOBAL.innodb_undo_log_truncate;
SET GLOBAL innodb_undo_log_truncate = 0;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
diff --git a/mysql-test/suite/innodb/t/undo_truncate_recover.combinations b/mysql-test/suite/innodb/t/undo_truncate_recover.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/undo_truncate_recover.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/innodb/t/undo_truncate_recover.test b/mysql-test/suite/innodb/t/undo_truncate_recover.test
index f3034c16988..64b1f6f23a1 100644
--- a/mysql-test/suite/innodb/t/undo_truncate_recover.test
+++ b/mysql-test/suite/innodb/t/undo_truncate_recover.test
@@ -28,6 +28,7 @@ while ($i) {
--enable_query_log
commit;
+let $checksum_algorithm = `SELECT @@GLOBAL.innodb_checksum_algorithm`;
let SEARCH_PATTERN = ib_undo_trunc;
begin;
update t1 set c = 'MariaDB';
@@ -36,11 +37,18 @@ eval set global debug_dbug = '+d,$SEARCH_PATTERN';
commit;
drop table t1;
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
-# FIXME: remove this work-around, and generate less log!
-call mtr.add_suppression("InnoDB: The redo log transaction size ");
SET GLOBAL innodb_fast_shutdown=0;
--source include/shutdown_mysqld.inc
--source include/search_pattern_in_file.inc
-# FIXME: remove this work-around, and generate less log!
---let $restart_parameters= --innodb-buffer-pool-size=16m --innodb-undo-tablespaces=1
+--let $restart_parameters= --innodb-undo-tablespaces=1
+--let $restart_noprint=1
+if ($checksum_algorithm == "strict_full_crc32")
+{
+ let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_crc32;
+}
+
+if ($checksum_algorithm == "strict_crc32")
+{
+ let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_full_crc32;
+}
--source include/start_mysqld.inc
diff --git a/mysql-test/suite/innodb_fts/r/crash_recovery.result b/mysql-test/suite/innodb_fts/r/crash_recovery.result
index 0dd092ecfa6..fd00e3e8457 100644
--- a/mysql-test/suite/innodb_fts/r/crash_recovery.result
+++ b/mysql-test/suite/innodb_fts/r/crash_recovery.result
@@ -24,6 +24,7 @@ DELETE FROM articles LIMIT 1;
ROLLBACK;
disconnect flush_redo_log;
connection default;
+# restart
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
CREATE FULLTEXT INDEX idx ON articles (title,body);
@@ -54,6 +55,7 @@ DELETE FROM articles LIMIT 1;
ROLLBACK;
disconnect flush_redo_log;
connection default;
+# restart
disconnect dml;
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...');
@@ -113,6 +115,7 @@ id title body
1 MySQL Tutorial DBMS stands for Database...
2 MariaDB Tutorial DB means Database ...
connection default;
+# restart
disconnect dml;
disconnect dml2;
INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...');
@@ -144,5 +147,6 @@ col_text_1 TEXT
) ENGINE = InnoDB ROW_FORMAT = Redundant ;
ALTER TABLE t1 ADD FULLTEXT KEY `ftidx` ( col_text ) ;
INSERT INTO t1 VALUES ( 1255, "mariadb", "InnoDB");
+# restart
ALTER TABLE t1 ADD FULLTEXT(col_text_1);
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/fulltext2.result b/mysql-test/suite/innodb_fts/r/fulltext2.result
index e9a089ab80d..7ec2df8ee46 100644
--- a/mysql-test/suite/innodb_fts/r/fulltext2.result
+++ b/mysql-test/suite/innodb_fts/r/fulltext2.result
@@ -260,6 +260,7 @@ INSERT INTO t1 (id, first_name, last_name) VALUES
(16, 'Nelson', 'Muntz');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT fts_doc_id, first_name, last_name, MATCH(first_name) AGAINST('Homer' IN BOOLEAN MODE) AS score FROM t1;
fts_doc_id first_name last_name score
diff --git a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result
index 503f117d02f..0d3a4a85b86 100644
--- a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result
+++ b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result
@@ -129,7 +129,7 @@ group by
a.text, b.id, b.betreff
order by
match(b.betreff) against ('+abc' in boolean mode) desc;
-ERROR 42000: Table 'b' from one of the SELECTs cannot be used in field list
+ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause
select a.text, b.id, b.betreff
from
t2 a inner join t3 b on a.id = b.forum inner join
@@ -145,7 +145,7 @@ where
match(c.beitrag) against ('+abc' in boolean mode)
order by
match(b.betreff) against ('+abc' in boolean mode) desc;
-ERROR 42000: Table 'b' from one of the SELECTs cannot be used in field list
+ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause
select a.text, b.id, b.betreff
from
t2 a inner join t3 b on a.id = b.forum inner join
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result b/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result
index 36d3826be59..f998881f11b 100644
--- a/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result
@@ -36,6 +36,8 @@ count
2
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('+MySQL -YourSQL' IN BOOLEAN MODE);
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result b/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result
index dea2f2360da..cad1acb3b01 100644
--- a/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result
@@ -249,6 +249,8 @@ articles CREATE TABLE `articles` (
ALTER TABLE articles ADD FULLTEXT INDEX idx (title,body);
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH(title,body) AGAINST ("where will");
id title body
@@ -571,6 +573,8 @@ select @@innodb_ft_enable_stopword;
1
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH(title,body) AGAINST ("where will");
id title body
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
index 94513831afd..8717d002d32 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
@@ -697,7 +697,6 @@ DROP TABLE t1;
CREATE TABLE t1 (id INT,char_column VARCHAR(60));
CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB;
ALTER TABLE t2 DROP a;
-SET @@autocommit=0;
CREATE FULLTEXT INDEX i ON t1 (char_column);
INSERT INTO t1 values (1,'aaa');
CREATE TABLE mdev20987_1(f1 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB;
@@ -711,6 +710,7 @@ ALTER TABLE mdev22358 DROP KEY ftidx;
INSERT INTO mdev22358 (a) VALUES (2),(2);
ALTER TABLE mdev22358 ADD UNIQUE KEY uidx (a), ADD FULLTEXT KEY ftidx (b);
ERROR 23000: Duplicate entry '2' for key 'uidx'
+# restart
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result b/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result
index afe452a137e..38cf6c81617 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result
@@ -37,9 +37,13 @@ DELETE FROM t1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a2`) REFERENCES `t1` (`a1`) ON UPDATE CASCADE)
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'b1'
test.t1 analyze status OK
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze Warning Engine-independent statistics are not collected for column 'b2'
test.t2 analyze status OK
SELECT id1 FROM t1 WHERE MATCH (a1,b1) AGAINST ('tutorial') ORDER BY id1;
id1
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result
index e636b30852b..83c5066a898 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result
@@ -125,6 +125,7 @@ INSERT INTO articles (title, body) VALUES
('Optimizing MySQL','In this tutorial we will show ...'),
('1001 MySQL Tricks','How to use full-text search engine'),
('Go MySQL Tricks','How to use full text search engine');
+# restart
SELECT COUNT(*) FROM articles;
COUNT(*)
0
@@ -137,6 +138,7 @@ INSERT INTO articles (title, body) VALUES
('Optimizing MySQL','In this tutorial we will show ...'),
('1001 MySQL Tricks','How to use full-text search engine'),
('Go MariaDB Tricks','How to use full text search engine');
+# restart
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('MySQL') ORDER BY id;
id title body
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result b/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result
index c49c7f8ae6c..f2cfcd93af9 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result
@@ -256,6 +256,7 @@ SELECT * FROM articles WHERE MATCH (title)
AGAINST ('love' IN NATURAL LANGUAGE MODE);
id title
# Shutdown and restart mysqld
+# restart
SET NAMES utf8;
INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
@@ -297,6 +298,7 @@ AGAINST ('love' IN NATURAL LANGUAGE MODE);
id title
DROP TABLE user_stopword;
# Shutdown and restart mysqld
+# restart
SET NAMES utf8;
INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug.result b/mysql-test/suite/innodb_fts/r/misc_debug.result
index 9f13822ecda..e252d7f6b11 100644
--- a/mysql-test/suite/innodb_fts/r/misc_debug.result
+++ b/mysql-test/suite/innodb_fts/r/misc_debug.result
@@ -30,6 +30,7 @@ DROP TABLE t2, t1;
# MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
#
CREATE TABLE t1(a INT, b TEXT, c TEXT, FULLTEXT INDEX(b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, "test", "test_1");
connect con1,localhost,root,,test;
SET DEBUG_DBUG="+d,innodb_OOM_inplace_alter";
SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL s2 WAIT_FOR g2';
@@ -39,6 +40,7 @@ SET DEBUG_SYNC='now WAIT_FOR s2';
START TRANSACTION;
SELECT * FROM t1;
a b c
+1 test test_1
SET DEBUG_SYNC='now SIGNAL g2';
connection con1;
ERROR HY000: Out of memory.
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug2.result b/mysql-test/suite/innodb_fts/r/misc_debug2.result
index 583d43bd9db..f1ebef6175f 100644
--- a/mysql-test/suite/innodb_fts/r/misc_debug2.result
+++ b/mysql-test/suite/innodb_fts/r/misc_debug2.result
@@ -4,6 +4,7 @@ CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
set debug_dbug="+d,fts_instrument_sync_request";
INSERT INTO mdev21563 VALUES('This is a test');
ALTER TABLE mdev21563 DISCARD TABLESPACE;
+# restart
DROP TABLE mdev21563;
#
# MDEV-29342 Assertion failure in file que0que.cc line 728
@@ -14,6 +15,7 @@ set debug_dbug="+d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('test');
set debug_dbug="-d,fts_instrument_sync_debug";
INSERT INTO t1 VALUES('This is a fts issue');
+# restart
set debug_dbug="+d,fts_instrument_sync_debug";
UPDATE t1 SET f1="mariadb";
set debug_dbug="-d,fts_instrument_sync_debug";
diff --git a/mysql-test/suite/innodb_fts/r/stopword.result b/mysql-test/suite/innodb_fts/r/stopword.result
index 82679cb71c4..05516d10f34 100644
--- a/mysql-test/suite/innodb_fts/r/stopword.result
+++ b/mysql-test/suite/innodb_fts/r/stopword.result
@@ -248,6 +248,8 @@ articles CREATE TABLE `articles` (
ALTER TABLE articles ADD FULLTEXT INDEX idx (title,body);
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH(title,body) AGAINST ("where will");
id title body
@@ -554,6 +556,8 @@ select @@innodb_ft_enable_stopword;
1
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH(title,body) AGAINST ("where will");
id title body
diff --git a/mysql-test/suite/innodb_fts/r/sync.result b/mysql-test/suite/innodb_fts/r/sync.result
index 4d28866ec82..5b8e4810028 100644
--- a/mysql-test/suite/innodb_fts/r/sync.result
+++ b/mysql-test/suite/innodb_fts/r/sync.result
@@ -98,6 +98,7 @@ INSERT INTO t1(title) VALUES('database');
SET debug_dbug = '+d,fts_instrument_sync_debug,fts_write_node_crash';
INSERT INTO t1(title) VALUES('mysql');
ERROR HY000: Lost connection to MySQL server during query
+# restart
After restart
SELECT title FROM t1 WHERE MATCH(title) AGAINST ('mysql database');
title
@@ -120,6 +121,7 @@ PRIMARY KEY(id)) ENGINE=InnoDB;
SET debug_dbug = '+d,fts_instrument_sync';
INSERT INTO t1(title) VALUES('mysql');
SET debug_dbug = @old_dbug;
+# restart
SET @old_global_dbug = @@GLOBAL.debug_dbug;
SET @old_dbug = @@SESSION.debug_dbug;
SET GLOBAL debug_dbug='+d,fts_instrument_sync,fts_instrument_sync_interrupted';
diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
index d17ebecb0b6..8f4902fd2de 100644
--- a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
+++ b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
@@ -663,7 +663,6 @@ DROP TABLE t1;
CREATE TABLE t1 (id INT,char_column VARCHAR(60));
CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB;
ALTER TABLE t2 DROP a;
-SET @@autocommit=0;
CREATE FULLTEXT INDEX i ON t1 (char_column);
INSERT INTO t1 values (1,'aaa');
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test
index c8542152d4d..4a0edf4ef88 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug.test
@@ -59,6 +59,7 @@ DROP TABLE t2, t1;
--echo # MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
--echo #
CREATE TABLE t1(a INT, b TEXT, c TEXT, FULLTEXT INDEX(b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, "test", "test_1");
connect(con1,localhost,root,,test);
SET DEBUG_DBUG="+d,innodb_OOM_inplace_alter";
SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL s2 WAIT_FOR g2';
diff --git a/mysql-test/suite/innodb_gis/r/0.result b/mysql-test/suite/innodb_gis/r/0.result
index ffe423005d2..6dd2cd16437 100644
--- a/mysql-test/suite/innodb_gis/r/0.result
+++ b/mysql-test/suite/innodb_gis/r/0.result
@@ -560,29 +560,29 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
1
-INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
-INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)'));
EXPLAIN
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref p p 28 const # Using where
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
DROP TABLE t1, t2;
End of 5.0 tests
#
diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result
index dd66c880c08..b881777edec 100644
--- a/mysql-test/suite/innodb_gis/r/1.result
+++ b/mysql-test/suite/innodb_gis/r/1.result
@@ -947,29 +947,29 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
1
-INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
-INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)'));
EXPLAIN
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref p p 28 const # Using where
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
DROP TABLE t1, t2;
End of 5.0 tests
#
diff --git a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
index 6730aa89486..ae7f8c08d45 100644
--- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
@@ -447,6 +447,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
ALTER TABLE tab ADD SPATIAL INDEX idx2(c2 ASC);
affected rows: 0
@@ -467,8 +468,7 @@ ALTER TABLE tab MODIFY COLUMN c2 GEOMETRY NOT NULL;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tab MODIFY COLUMN c3 POLYGON NOT NULL;
-affected rows: 10
-info: Records: 10 Duplicates: 0 Warnings: 0
+ERROR 22007: Incorrect POLYGON value: 'LINESTRING(5 5,20 20,30 30)' for column `test`.`tab`.`c3` at row 1
ALTER TABLE tab add COLUMN c7 POINT NOT NULL;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
@@ -504,13 +504,13 @@ HEX(c8)
ROLLBACK;
ALTER TABLE tab add COLUMN c9 POINT NOT NULL AFTER c5, ALGORITHM = INPLACE, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: Do not support online operation on table with GIS index. Try LOCK=SHARED
+ALTER TABLE tab DROP COLUMN c9, ALGORITHM=INSTANT;
SHOW CREATE TABLE tab;
Table Create Table
tab CREATE TABLE `tab` (
`c1` int(11) NOT NULL,
`c2` geometry NOT NULL,
- `c3` polygon NOT NULL,
+ `c3` linestring NOT NULL,
`c4` polygon NOT NULL,
`c5` geometry NOT NULL,
`c7` point NOT NULL,
@@ -547,7 +547,7 @@ Table Create Table
tab CREATE TABLE `tab` (
`c1` int(11) NOT NULL,
`c2` geometry NOT NULL,
- `c3` polygon NOT NULL,
+ `c3` linestring NOT NULL,
`c4` geometry NOT NULL,
`c5` geometry NOT NULL,
`c7` point NOT NULL,
@@ -569,6 +569,7 @@ tab 1 idx5 1 c5 A # 32 NULL SPATIAL testing spatial index on Geometry
tab 1 idx6 1 c4 A # 10 NULL BTREE
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
SET @g2 = ST_GeomFromText('LINESTRING(140 140,150 150,160 160)');
@@ -588,15 +589,13 @@ AND MBREquals(tab.c3,@g2) ORDER BY c1;
c1 ST_Astext(c2) ST_AsText(c3) ST_Astext(c4)
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))');
SET @g2 = ST_GeomFromText('LINESTRING(1 1,2 2,3 3)');
ALTER TABLE tab MODIFY COLUMN c2 POINT NOT NULL;
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
-ALTER TABLE tab MODIFY COLUMN c3 LINESTRING NOT NULL;
-affected rows: 8
-info: Records: 8 Duplicates: 0 Warnings: 0
ALTER TABLE tab MODIFY COLUMN c4 POLYGON NOT NULL;
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
@@ -627,6 +626,7 @@ tab 1 idx5 1 c5 A # 32 NULL SPATIAL testing spatial index on Geometry
tab 1 idx6 1 c4 A # 10 NULL BTREE
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
SET @g2 = ST_GeomFromText('LINESTRING(1 1,2 2,3 3)');
@@ -661,6 +661,7 @@ ALTER TABLE tab ENGINE Myisam;
ALTER TABLE tab ENGINE InnoDB;
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))');
SET @g2 = ST_GeomFromText('LINESTRING(400 400,500 500,600 700)');
diff --git a/mysql-test/suite/innodb_gis/r/create_spatial_index.result b/mysql-test/suite/innodb_gis/r/create_spatial_index.result
index 1af03c251bf..c69d67c411f 100644
--- a/mysql-test/suite/innodb_gis/r/create_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/create_spatial_index.result
@@ -55,6 +55,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
@@ -483,6 +484,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
@@ -900,6 +902,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result
index ee926cecb8f..321f20cb745 100644
--- a/mysql-test/suite/innodb_gis/r/gis.result
+++ b/mysql-test/suite/innodb_gis/r/gis.result
@@ -943,29 +943,29 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
1
-INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
-INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)'));
EXPLAIN
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref p p 28 const # Using where
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
EXPLAIN
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
COUNT(*)
-2
+1
DROP TABLE t1, t2;
End of 5.0 tests
#
diff --git a/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result b/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result
index 97dc96e1b03..5f0187eaa30 100644
--- a/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result
+++ b/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result
@@ -744,6 +744,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/innodb_gis/r/precise.result b/mysql-test/suite/innodb_gis/r/precise.result
index 3c05b814602..6cc0368fbb4 100644
--- a/mysql-test/suite/innodb_gis/r/precise.result
+++ b/mysql-test/suite/innodb_gis/r/precise.result
@@ -216,7 +216,7 @@ st_u
MULTIPOLYGON(((525400 18370,525000.9677614468 183300,525400 183300,525400 18370)),((525000 183300,525000 183700,525000.9677614468 183300,525000 183300)),((525265.58 183481.95,525263.95 183484.75,525260.7 183491.55,525276.79 183500,525278.39 183500.84,525278.63 183500.97,525280.98 183502.26,525283.17 183503.47,525289.11 183506.62,525296.42 183510.31,525296.57 183510.39,525298.67 183511.53,525302.81 183513.8,525304.5 183510.83,525307.85 183504.95,525304.45 183504.25,525301.75 183509.35,525283.55 183500,525282.2 183499.3,525282.3 183499.1,525280.35 183498.2,525275.5 183495.7,525276.5 183493.45,525278.97 183488.73,525265.58 183481.95),(525266.99 183484.33,525263.26 183491.55,525266.15 183493.04,525269.88 183485.82,525266.99 183484.33),(525272.06 183488.37,525268.94 183494.51,525271.94 183496.03,525275.06 183489.89,525272.06 183488.37)))
SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F;
SELECT ST_ASTEXT(ST_TOUCHES(@a, ST_GEOMFROMTEXT('point(0 0)'))) t;
-ERROR HY000: Illegal parameter data type int for operation 'st_astext'
+ERROR HY000: Illegal parameter data type boolean for operation 'st_astext'
DROP TABLE IF EXISTS p1;
CREATE PROCEDURE p1(dist DOUBLE, geom TEXT)
BEGIN
diff --git a/mysql-test/suite/innodb_gis/r/rt_precise.result b/mysql-test/suite/innodb_gis/r/rt_precise.result
index 9e2c6adc2d9..c83b88b568c 100644
--- a/mysql-test/suite/innodb_gis/r/rt_precise.result
+++ b/mysql-test/suite/innodb_gis/r/rt_precise.result
@@ -18,6 +18,7 @@ count(*)
150
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 140))'));
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/suite/innodb_gis/r/rtree.result b/mysql-test/suite/innodb_gis/r/rtree.result
index de9067b428b..b7cdc8ec7c9 100644
--- a/mysql-test/suite/innodb_gis/r/rtree.result
+++ b/mysql-test/suite/innodb_gis/r/rtree.result
@@ -6,6 +6,7 @@ insert into t1 values (1, POINT(3.1,3.1));
insert into t1 values (1, POINT(5,5));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1);
@@ -151,6 +152,7 @@ insert into t1 values (4, "444", POINT(3.1,3.1));
insert into t1 values (5, "555", POINT(5,5));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1);
diff --git a/mysql-test/suite/innodb_gis/r/rtree_drop_index.result b/mysql-test/suite/innodb_gis/r/rtree_drop_index.result
index 8ac1a049b8e..e2e64786281 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_drop_index.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_drop_index.result
@@ -19,4 +19,5 @@ COMMIT;
disconnect purge_control;
connection default;
set global innodb_fast_shutdown = 0;
+# restart
drop table t1;
diff --git a/mysql-test/suite/innodb_gis/r/rtree_estimate.result b/mysql-test/suite/innodb_gis/r/rtree_estimate.result
index 251685df018..edb37778f54 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_estimate.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_estimate.result
@@ -20,6 +20,7 @@ POLYGON((5 5,20 5,20 21,5 21,5 5))
POLYGON((1.79769e308 1.79769e308,20 5,-1.79769e308 -1.79769e308,1.79769e308 1.79769e308))
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRContains(g, @g1);
id select_type table type possible_keys key key_len ref rows Extra
@@ -29,7 +30,7 @@ ST_AsText(g)
POINT(10 10)
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRDisjoint(g, @g1);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range g g 34 NULL 2 Using where
+1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where
SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1);
ST_AsText(g)
POINT(10 10)
@@ -74,14 +75,14 @@ POINT(10 10)
POLYGON((5 5,20 5,20 21,5 21,5 5))
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRIntersects(g, @g2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range g g 34 NULL 2 Using where
+1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where
SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2);
ST_AsText(g)
POINT(10 10)
POLYGON((5 5,20 5,20 21,5 21,5 5))
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range g g 34 NULL 2 Using where
+1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where
SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2);
ST_AsText(g)
POINT(10 10)
diff --git a/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result b/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result
index 83fd0c3e849..0165887a9f1 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result
@@ -6,6 +6,7 @@ insert into t1 values (4, "444", POINT(3.1,3.1));
insert into t1 values (5, "555", POINT(5,5));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1);
diff --git a/mysql-test/suite/innodb_gis/r/rtree_recovery.result b/mysql-test/suite/innodb_gis/r/rtree_recovery.result
index 4fee60caf85..6f5b02e7feb 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_recovery.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_recovery.result
@@ -1,3 +1,4 @@
+# restart
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
create procedure insert_t1(IN total int)
begin
@@ -17,6 +18,7 @@ end while;
end|
CALL insert_t1(367);
COMMIT;
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -27,6 +29,7 @@ CALL update_t1(367);
SET @poly1 = ST_GeomFromText('POLYGON((10000 10000, 10000 10350, 10350 10350, 10350 10000, 10000 10000))');
delete from t1 where ST_Contains(@poly1, c2);
COMMIT;
+# restart
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb_gis/r/types.result b/mysql-test/suite/innodb_gis/r/types.result
index dc46710c365..9eb40dc4231 100644
--- a/mysql-test/suite/innodb_gis/r/types.result
+++ b/mysql-test/suite/innodb_gis/r/types.result
@@ -51,6 +51,7 @@ FLUSH TABLES;
INSERT INTO t_wl6455 VALUES(11, POINT(11,11));
BEGIN;
INSERT INTO t_wl6455 VALUES(1, POINT(1,1));
+# restart
CHECK TABLE t_wl6455;
Table Op Msg_type Msg_text
test.t_wl6455 check status OK
diff --git a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
index 2039e2d1c39..de1d301245f 100644
--- a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
+++ b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
@@ -484,6 +484,7 @@ ALTER TABLE tab ADD INDEX idx6(c4(10)) USING BTREE;
ALTER TABLE tab MODIFY COLUMN c2 GEOMETRY NOT NULL;
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
ALTER TABLE tab MODIFY COLUMN c3 POLYGON NOT NULL;
ALTER TABLE tab add COLUMN c7 POINT NOT NULL;
@@ -499,9 +500,8 @@ FROM tab LIMIT 1;
SELECT HEX(c8) FROM tab;
ROLLBACK;
-# not instant, not supported
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE tab add COLUMN c9 POINT NOT NULL AFTER c5, ALGORITHM = INPLACE, LOCK=NONE;
+ALTER TABLE tab DROP COLUMN c9, ALGORITHM=INSTANT;
SHOW CREATE TABLE tab;
@@ -561,8 +561,6 @@ SET @g2 = ST_GeomFromText('LINESTRING(1 1,2 2,3 3)');
--enable_info
ALTER TABLE tab MODIFY COLUMN c2 POINT NOT NULL;
-ALTER TABLE tab MODIFY COLUMN c3 LINESTRING NOT NULL;
-
ALTER TABLE tab MODIFY COLUMN c4 POLYGON NOT NULL;
--disable_info
diff --git a/mysql-test/suite/innodb_gis/t/kill_server.test b/mysql-test/suite/innodb_gis/t/kill_server.test
index 028bbbdd40d..d6657c74bcc 100644
--- a/mysql-test/suite/innodb_gis/t/kill_server.test
+++ b/mysql-test/suite/innodb_gis/t/kill_server.test
@@ -6,6 +6,7 @@
--source include/have_innodb.inc
--source include/big_test.inc
+let $restart_noprint=2;
# Create table with R-tree index.
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
diff --git a/mysql-test/suite/innodb_gis/t/rtree_compress2.test b/mysql-test/suite/innodb_gis/t/rtree_compress2.test
index e7e303242f6..051fcfcac46 100644
--- a/mysql-test/suite/innodb_gis/t/rtree_compress2.test
+++ b/mysql-test/suite/innodb_gis/t/rtree_compress2.test
@@ -8,6 +8,7 @@
--source include/big_test.inc
# Valgrind takes too much time on PB2 even in the --big-test runs.
--source include/not_valgrind.inc
+let $restart_noprint=2;
SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_gis/t/rtree_estimate.test b/mysql-test/suite/innodb_gis/t/rtree_estimate.test
index 4caa5feb5b1..7038799a26a 100644
--- a/mysql-test/suite/innodb_gis/t/rtree_estimate.test
+++ b/mysql-test/suite/innodb_gis/t/rtree_estimate.test
@@ -15,6 +15,7 @@ SET @g1 = ST_GeomFromText('POINT(10 10)');
SET @g2 = ST_GeomFromText('POLYGON((5 5, 20 5, 20 21, 5 21, 5 5))');
SET @g3 = ST_GeomFromText('POLYGON((1.79769e+308 1.79769e+308, 20 5, -1.79769e+308 -1.79769e+308, 1.79769e+308 1.79769e+308))');
+
# Test empty table
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRContains(g, @g1);
SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1);
diff --git a/mysql-test/suite/innodb_gis/t/rtree_split.test b/mysql-test/suite/innodb_gis/t/rtree_split.test
index af626dba6b7..6f285187508 100644
--- a/mysql-test/suite/innodb_gis/t/rtree_split.test
+++ b/mysql-test/suite/innodb_gis/t/rtree_split.test
@@ -9,6 +9,7 @@
--source include/not_valgrind.inc
--source include/have_debug.inc
--source include/have_sequence.inc
+let $restart_noprint=2;
# Create table with R-tree index.
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
diff --git a/mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff
new file mode 100644
index 00000000000..97daeacd1e8
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/16k,full_crc32.rdiff
@@ -0,0 +1,16 @@
+--- 16k.result
++++ 16k.reject
+@@ -41,10 +41,10 @@
+ test/t4 5 33 PRIMARY 3 3 1 50
+ === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+ Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+-test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+-test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
++test/t1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
++test/t2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
+ test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
+-test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
++test/t4 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
+ DROP TABLE t1, t2, t3, t4;
+ # Test 4) The maximum row size is dependent upon the page size.
+ # Redundant: 8123, Compact: 8126.
diff --git a/mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff
new file mode 100644
index 00000000000..97daeacd1e8
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/16k,strict_full_crc32.rdiff
@@ -0,0 +1,16 @@
+--- 16k.result
++++ 16k.reject
+@@ -41,10 +41,10 @@
+ test/t4 5 33 PRIMARY 3 3 1 50
+ === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+ Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+-test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+-test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
++test/t1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
++test/t2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
+ test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
+-test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
++test/t4 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
+ DROP TABLE t1, t2, t3, t4;
+ # Test 4) The maximum row size is dependent upon the page size.
+ # Redundant: 8123, Compact: 8126.
diff --git a/mysql-test/suite/innodb_zip/r/8k,full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/8k,full_crc32.rdiff
new file mode 100644
index 00000000000..f0f414b3bc3
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/8k,full_crc32.rdiff
@@ -0,0 +1,16 @@
+--- 8k.result
++++ 8k.result
+@@ -45,10 +45,10 @@
+ test/t4 5 33 PRIMARY 3 3 1 50
+ === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+ Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+-test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+-test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
++test/t1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
++test/t2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
+ test/t3 Single DEFAULT 4096 Compressed MYSQLD_DATADIR/test/t3.ibd
+-test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
++test/t4 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
+ DROP TABLE t1, t2, t3, t4;
+ # Test 4) The maximum row size is dependent upon the page size.
+ # Redundant: 4027, Compact: 4030.
diff --git a/mysql-test/suite/innodb_zip/r/8k,strict_full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/8k,strict_full_crc32.rdiff
new file mode 100644
index 00000000000..f0f414b3bc3
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/8k,strict_full_crc32.rdiff
@@ -0,0 +1,16 @@
+--- 8k.result
++++ 8k.result
+@@ -45,10 +45,10 @@
+ test/t4 5 33 PRIMARY 3 3 1 50
+ === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+ Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+-test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+-test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
++test/t1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1.ibd
++test/t2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2.ibd
+ test/t3 Single DEFAULT 4096 Compressed MYSQLD_DATADIR/test/t3.ibd
+-test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
++test/t4 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4.ibd
+ DROP TABLE t1, t2, t3, t4;
+ # Test 4) The maximum row size is dependent upon the page size.
+ # Redundant: 4027, Compact: 4030.
diff --git a/mysql-test/suite/innodb_zip/r/bug56680.result b/mysql-test/suite/innodb_zip/r/bug56680.result
index 02ec24c98ae..1a1a5b40707 100644
--- a/mysql-test/suite/innodb_zip/r/bug56680.result
+++ b/mysql-test/suite/innodb_zip/r/bug56680.result
@@ -116,6 +116,7 @@ DF
CHECK TABLE bug56680_2;
Table Op Msg_type Msg_text
test.bug56680_2 check status OK
+# restart
CHECK TABLE bug56680_2;
Table Op Msg_type Msg_text
test.bug56680_2 check status OK
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum.result b/mysql-test/suite/innodb_zip/r/innochecksum.result
index 31d9450df80..e1d3a187186 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum.result
@@ -47,6 +47,7 @@ FOUND 1 /Error while setting value \'no\' to \'strict-check\'/ in my_restart.err
[14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
# Also check the long form of write option.
# start the server with innodb_checksum_algorithm=InnoDB
+# restart: --innodb_checksum_algorithm=innodb
INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
SELECT c1,c2 FROM tab1 order by c1,c2;
c1 c2
@@ -56,6 +57,7 @@ c1 c2
[15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
# Also check the short form of write option.
# Start the server with checksum algorithm=none
+# restart: --innodb_checksum_algorithm=none
INSERT INTO tab1 VALUES(3, 'Innochecksum None');
SELECT c1,c2 FROM tab1 order by c1,c2;
c1 c2
@@ -66,6 +68,7 @@ DROP TABLE t1;
# Stop the server
[16]: rewrite into new checksum=crc32 with innochecksum
# Restart the DB server with innodb_checksum_algorithm=crc32
+# restart: --innodb_checksum_algorithm=crc32
SELECT * FROM tab1;
c1 c2
1 Innochecksum InnoDB1
@@ -79,6 +82,7 @@ c1 c2
# Stop server
[17]: rewrite into new checksum=InnoDB
# Restart the DB server with innodb_checksum_algorithm=InnoDB
+# restart: --innodb_checksum_algorithm=innodb
DELETE FROM tab1 where c1=2;
SELECT * FROM tab1;
c1 c2
@@ -88,4 +92,5 @@ c1 c2
FOUND 1 /Error while setting value \'strict_crc32\' to \'write\'/ in my_restart.err
FOUND 1 /Error while setting value \'strict_innodb\' to \'write\'/ in my_restart.err
FOUND 1 /Error while setting value \'crc23\' to \'write\'/ in my_restart.err
+# restart
DROP TABLE tab1;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
index cb06a453855..7de90721d64 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
@@ -39,6 +39,7 @@ SELECT * FROM tab2 ORDER BY col_7;
# stop the server
[1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
: start the server with innodb_checksum_algorithm=strict_innodb
+# restart: --innodb_checksum_algorithm=strict_innodb
INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
SET @col_1 = repeat('a', 5);
@@ -55,6 +56,7 @@ SELECT * FROM tab2 ORDER BY col_7;
# stop the server
[1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
# start the server with innodb_checksum_algorithm=strict_crc32
+# restart: --innodb_checksum_algorithm=strict_crc32
INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
@@ -71,6 +73,7 @@ FROM tab1 ORDER BY pk;
SELECT * FROM tab2 ORDER BY col_7;
# stop the server
[1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
+# restart: --innodb_checksum_algorithm=strict_none
INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
SET @col_1 = repeat('m', 5);
@@ -224,4 +227,5 @@ NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_resta
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
+# restart
DROP TABLE tab1,tab2;
diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result
index 0da1d6bbe85..e0a454b75a4 100644
--- a/mysql-test/suite/innodb_zip/r/innodb-zip.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result
@@ -121,9 +121,13 @@ disconnect a;
disconnect b;
analyze table t1;
Table Op Msg_type Msg_text
+mysqltest_innodb_zip.t1 analyze status Engine-independent statistics collected
+mysqltest_innodb_zip.t1 analyze Warning Engine-independent statistics are not collected for column 'b'
mysqltest_innodb_zip.t1 analyze status OK
analyze table t2;
Table Op Msg_type Msg_text
+mysqltest_innodb_zip.t2 analyze status Engine-independent statistics collected
+mysqltest_innodb_zip.t2 analyze Warning Engine-independent statistics are not collected for column 'b'
mysqltest_innodb_zip.t2 analyze status OK
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql' order by table_name;
table_schema table_name row_format data_length index_length
diff --git a/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff b/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff
index 126958e24ec..0d13875e9d1 100644
--- a/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff
+++ b/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff
@@ -15,12 +15,12 @@
+test/t3 5 37 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
- Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
- test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
- test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
--test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
-+test/t3 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3.ibd
- test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
+ Space_Name Space_Type Page_Size Zip_Size Path
+ test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
+ test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
+-test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
++test/t3 Single DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd
+ test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
@@ -51,141 +51,90 @@
@@ -343,7 +343,7 @@
-test.t1 check status OK
-EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
-id select_type table type possible_keys key key_len ref rows Extra
--1 SIMPLE t1 range b b 769 NULL 12 Using where
+-1 SIMPLE t1 range b b 769 NULL # Using where
-DROP TABLE t1;
# Test 8) Test creating a table that could lead to undo log overflow.
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
diff --git a/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff b/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff
index 3fe83372185..10db0f1c10f 100644
--- a/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff
+++ b/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff
@@ -15,12 +15,12 @@
+test/t3 5 39 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
- Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
- test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
- test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
--test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
-+test/t3 Single DEFAULT 4096 Compressed MYSQLD_DATADIR/test/t3.ibd
- test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
+ Space_Name Space_Type Page_Size Zip_Size Path
+ test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
+ test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
+-test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
++test/t3 Single DEFAULT 4096 MYSQLD_DATADIR/test/t3.ibd
+ test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
@@ -53,133 +53,97 @@
@@ -313,7 +313,7 @@
-test.t1 check status OK
-EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
-id select_type table type possible_keys key key_len ref rows Extra
--1 SIMPLE t1 range b b 769 NULL 12 Using where
+-1 SIMPLE t1 range b b 769 NULL # Using where
-DROP TABLE t1;
# Test 8) Test creating a table that could lead to undo log overflow.
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
diff --git a/mysql-test/suite/innodb_zip/r/page_size.result b/mysql-test/suite/innodb_zip/r/page_size.result
index cd521183793..4b126341108 100644
--- a/mysql-test/suite/innodb_zip/r/page_size.result
+++ b/mysql-test/suite/innodb_zip/r/page_size.result
@@ -39,11 +39,11 @@ test/t2 5 1 PRIMARY 3 3 1 50
test/t3 5 41 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
-test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
-test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
-test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
+test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
+test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
+test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
# Each row format has its own amount of overhead that
@@ -373,7 +373,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 769 NULL 12 Using where
+1 SIMPLE t1 range b b 769 NULL # Using where
DROP TABLE t1;
# Test 8) Test creating a table that could lead to undo log overflow.
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
diff --git a/mysql-test/suite/innodb_zip/r/recover.result b/mysql-test/suite/innodb_zip/r/recover.result
index 97051efb645..b7452655268 100644
--- a/mysql-test/suite/innodb_zip/r/recover.result
+++ b/mysql-test/suite/innodb_zip/r/recover.result
@@ -11,6 +11,7 @@ insert into a select null, uuid() from a a, a b, a c;
insert into a select null, uuid() from a a, a b, a c;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
COMMIT;
+# restart
SELECT COUNT(*) from a;
COUNT(*)
1010
diff --git a/mysql-test/suite/innodb_zip/r/restart.result b/mysql-test/suite/innodb_zip/r/restart.result
index 262c34df5fb..5b488c277aa 100644
--- a/mysql-test/suite/innodb_zip/r/restart.result
+++ b/mysql-test/suite/innodb_zip/r/restart.result
@@ -210,19 +210,19 @@ test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd
-test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd
-test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
-test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t1_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart Single DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
#
# Shutdown the server and list the tablespace OS files
#
@@ -263,6 +263,7 @@ t7_restart#p#p1#sp#s3.ibd
#
# Start the server and show that tables are still visible and accessible.
#
+# restart
SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value
innodb_file_per_table ON
@@ -394,19 +395,19 @@ test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd
-test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd
-test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
-test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t1_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart Single DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
DROP TABLE t1_restart;
DROP TABLE t2_restart;
DROP TABLE t3_restart;
@@ -417,16 +418,16 @@ TRUNCATE TABLE t5_restart;
ALTER TABLE t6_restart TRUNCATE PARTITION p2;
ALTER TABLE t7_restart TRUNCATE PARTITION p1;
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
@@ -517,20 +518,21 @@ t7_restart#p#p1#sp#s3.ibd
#
# Start the server and show the tablespaces.
#
+# restart
SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value
innodb_file_per_table ON
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
-test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
-test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
-test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
-test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
-test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
-test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
-test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
-test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
SELECT count(*) FROM t5_restart;
count(*)
8
@@ -622,16 +624,16 @@ RENAME TABLE t5_restart TO t55_restart;
RENAME TABLE t6_restart TO t66_restart;
RENAME TABLE t7_restart TO t77_restart;
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
SELECT count(*) FROM t55_restart;
count(*)
@@ -715,20 +717,21 @@ t77_restart#p#p1#sp#s3.ibd
#
# Restart the server
#
+# restart
SHOW VARIABLES LIKE 'innodb_file_per_table';
Variable_name Value
innodb_file_per_table ON
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
SELECT count(*) FROM t55_restart;
count(*)
@@ -851,17 +854,18 @@ t77_restart#p#p1#sp#s3.ibd
#
# Start the server and check tablespaces.
#
+# restart
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t4_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
SELECT count(*) FROM t4_restart;
count(*)
@@ -988,17 +992,18 @@ t77_restart.par
#
# Start the server and check tablespaces.
#
+# restart
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
-Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
-test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
-test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
-test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
-test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
-test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
-test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd
-test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
-test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
-test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
+test/t55_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t55_restart.ibd
+test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
SELECT count(*) FROM t4_restart;
count(*)
diff --git a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
index 4036640d3d3..927cc0aefcb 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
@@ -106,12 +106,6 @@ ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-unlink: t1.ibd
-unlink: t1.cfg
DROP TABLE t1;
CREATE TABLE t1 (
c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
@@ -413,7 +407,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption
+ERROR HY000: Index for table 't1' is corrupt; try to repair it
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
unlink: t1.ibd
diff --git a/mysql-test/suite/innodb_zip/r/wl5522_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_zip.result
index e85223574d7..210b3b1b0d6 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_zip.result
@@ -30,6 +30,7 @@ db.opt
t1.frm
t1.ibd
# Restarting server
+# restart
# Done restarting server
FLUSH TABLE t1 FOR EXPORT;
# List before copying files
@@ -53,6 +54,7 @@ a b c
1279 Devotion asdfuihknaskdf
1278 Cavalry ..asdasdfaeraf
# Restarting server
+# restart
# Done restarting server
# List before t1 DISCARD
db.opt
diff --git a/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
index c48bc32d596..05b4793eb4d 100644
--- a/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
+++ b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
@@ -314,6 +314,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ;
compress_stat 1
The size of the tab5.ibd file: 5242880
+# restart
# set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags
@@ -650,6 +651,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ;
compress_stat 1
The size of the tab5.ibd file: 2097152
+# restart
# set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags
@@ -1920,6 +1922,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ;
compress_stat 1
The size of the tab5.ibd file: 65536
+# restart
# set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags
@@ -2258,6 +2261,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ;
compress_stat 1
The size of the tab5.ibd file: 65536
+# restart
# set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags
@@ -5013,6 +5017,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ;
compress_stat 1
The size of the tab5.ibd file: 65536
+# restart
# set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags
@@ -6600,6 +6605,7 @@ AND table_name='tab5' AND database_name='test'
AND index_name like 'idx%' ;
compress_stat 1
The size of the tab5.ibd file: 65536
+# restart
# set the flag on (default off)
SET GLOBAL innodb_cmp_per_index_enabled=ON;
# set the flags
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.combinations b/mysql-test/suite/innodb_zip/t/innochecksum.combinations
new file mode 100644
index 00000000000..79e5f7836ed
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum.combinations
@@ -0,0 +1,5 @@
+[crc32]
+--innodb-checksum-algorithm=crc32
+
+[full_crc32]
+--innodb-checksum-algorithm=full_crc32
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test
index fec8acf52c4..ea5654056d9 100644
--- a/mysql-test/suite/innodb_zip/t/innochecksum.test
+++ b/mysql-test/suite/innodb_zip/t/innochecksum.test
@@ -13,6 +13,8 @@
let MYSQLD_BASEDIR= `SELECT @@basedir`;
let MYSQLD_DATADIR= `SELECT @@datadir`;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
+let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`;
+
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
@@ -79,22 +81,34 @@ let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --
--echo [9]: check the innochecksum with full form --strict-check=innodb
# Server Default checksum = crc32
---error 1
+let $error_code = 0;
+
+if ($checksum_algorithm == "crc32")
+{
+ let $error_code = 1;
+}
+
+if ($checksum_algorithm == "strict_crc32")
+{
+ let $error_code = 1;
+}
+
+--error $error_code
--exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [10]: check the innochecksum with full form --strict-check=none
--echo # when server Default checksum=crc32
---error 1
+--error $error_code
--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [11]: check the innochecksum with short form -C innodb
--echo # when server Default checksum=crc32
---error 1
+--error $error_code
--exec $INNOCHECKSUM -C innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [12]: check the innochecksum with short form -C none
--echo # when server Default checksum=crc32
---error 1
+--error $error_code
--exec $INNOCHECKSUM -C none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [13]: check strict-check with invalid values
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.test b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
index 330bb81ba75..1efe653cd1a 100644
--- a/mysql-test/suite/innodb_zip/t/innochecksum_2.test
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
@@ -18,6 +18,7 @@ call mtr.add_suppression("\\[Warning\\] InnoDB: Difficult to find free blocks in
let MYSQLD_BASEDIR= `SELECT @@basedir`;
let MYSQLD_DATADIR= `SELECT @@datadir`;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
+let $restart_noprint=2;
SET GLOBAL innodb_compression_level=0;
SELECT @@innodb_compression_level;
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.combinations b/mysql-test/suite/innodb_zip/t/innochecksum_3.combinations
new file mode 100644
index 00000000000..79e5f7836ed
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.combinations
@@ -0,0 +1,5 @@
+[crc32]
+--innodb-checksum-algorithm=crc32
+
+[full_crc32]
+--innodb-checksum-algorithm=full_crc32
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.opt b/mysql-test/suite/innodb_zip/t/innochecksum_3.opt
new file mode 100644
index 00000000000..287c7ed5280
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.opt
@@ -0,0 +1 @@
+--innodb_checksum_algorithm=crc32
diff --git a/mysql-test/suite/innodb_zip/t/page_size.test b/mysql-test/suite/innodb_zip/t/page_size.test
index f7fd21a20ec..bee2d585101 100644
--- a/mysql-test/suite/innodb_zip/t/page_size.test
+++ b/mysql-test/suite/innodb_zip/t/page_size.test
@@ -1,4 +1,5 @@
--source include/innodb_page_size_small.inc
+--source include/innodb_checksum_algorithm.inc
SET default_storage_engine=InnoDB;
--disable_query_log
@@ -542,6 +543,7 @@ SELECT a,
LENGTH(b), b=LEFT(REPEAT(d,100*a), 65535),LENGTH(c), c=REPEAT(d,20*a), d FROM t1;
SHOW CREATE TABLE t1;
CHECK TABLE t1;
+--replace_column 9 #
EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
# The following tests are disabled because of the introduced timeouts for
diff --git a/mysql-test/suite/innodb_zip/t/restart.test b/mysql-test/suite/innodb_zip/t/restart.test
index 1c4af461dfc..6962d62b21f 100644
--- a/mysql-test/suite/innodb_zip/t/restart.test
+++ b/mysql-test/suite/innodb_zip/t/restart.test
@@ -4,7 +4,9 @@
--source include/innodb_page_size_small.inc
--source include/have_partition.inc
--source include/not_embedded.inc
+--source include/innodb_checksum_algorithm.inc
--source include/have_symlink.inc
+
SET default_storage_engine=InnoDB;
LET $MYSQLD_DATADIR = `select @@datadir`;
LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
diff --git a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
index 411d47118f6..9cab7733481 100644
--- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
+++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
@@ -275,20 +275,6 @@ do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl";
ib_restore_tablespaces("test", "t1");
EOF
-# Test failure after importing the cluster index
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-
---error ER_NOT_KEYFILE
-ALTER TABLE t1 IMPORT TABLESPACE;
-
-SET SESSION debug_dbug=@saved_debug_dbug;
-
-# Left over from the failed IMPORT
-perl;
-do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl";
-ib_unlink_tablespace("test", "t1");
-EOF
-
DROP TABLE t1;
--disable_query_log
@@ -638,7 +624,7 @@ EOF
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
---error ER_INTERNAL_ERROR
+--error ER_NOT_KEYFILE
ALTER TABLE t1 IMPORT TABLESPACE;
SET SESSION debug_dbug=@saved_debug_dbug;
diff --git a/mysql-test/suite/large_tests/r/maria_recover_encrypted.result b/mysql-test/suite/large_tests/r/maria_recover_encrypted.result
new file mode 100644
index 00000000000..a7293d45db6
--- /dev/null
+++ b/mysql-test/suite/large_tests/r/maria_recover_encrypted.result
@@ -0,0 +1,53 @@
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS proc_insert_many;
+CREATE TABLE t1 (
+field1 INTEGER NOT NULL,
+field2 INTEGER NOT NULL,
+field3 INTEGER NOT NULL,
+KEY i_1 (field1),
+KEY i_2 (field2),
+KEY i_3 (field3),
+KEY i_12 (field1, field2),
+KEY i_13 (field1, field3),
+KEY i_21 (field2, field1),
+KEY i_23 (field2, field3),
+KEY i_31 (field3, field1),
+KEY i_32 (field3, field2),
+KEY i_123 (field1, field2, field3),
+KEY i_132 (field1, field3, field2),
+KEY i_213 (field2, field1, field3),
+KEY i_231 (field2, field3, field1),
+KEY i_312 (field3, field1, field2),
+KEY i_321 (field3, field2, field1)
+) ENGINE=Aria;
+CREATE PROCEDURE proc_insert_many()
+BEGIN
+DECLARE iRow INT DEFAULT 0;
+insertRows: LOOP
+IF (iRow = 70000) THEN
+LEAVE insertRows;
+END IF;
+INSERT INTO t1 VALUES (1000000+iRow,2000000+iRow,3000000+iRow);
+SET iRow = iRow + 1;
+END LOOP insertRows;
+END|
+LOCK TABLES t1 WRITE;
+CALL proc_insert_many();
+UNLOCK TABLES;
+SET debug_dbug="d,crash_shutdown";
+shutdown;
+ERROR HY000: Lost connection to MySQL server during query
+SELECT * FROM t1 ORDER BY 1 DESC LIMIT 10;
+field1 field2 field3
+1069999 2069999 3069999
+1069998 2069998 3069998
+1069997 2069997 3069997
+1069996 2069996 3069996
+1069995 2069995 3069995
+1069994 2069994 3069994
+1069993 2069993 3069993
+1069992 2069992 3069992
+1069991 2069991 3069991
+1069990 2069990 3069990
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS proc_insert_many;
diff --git a/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result b/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
index ad704c0c683..5f3ad54662b 100644
--- a/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
+++ b/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
@@ -17,7 +17,11 @@ include/start_slave.inc
include/stop_slave.inc
connection master;
select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
include/assert.inc [time between last reconnection and the reconnection before that should be >= slave_net_timeout]
connection master;
set @@global.general_log = @save_general_log;
diff --git a/mysql-test/suite/large_tests/t/maria_recover_encrypted.test b/mysql-test/suite/large_tests/t/maria_recover_encrypted.test
new file mode 100644
index 00000000000..4c590e5e1f9
--- /dev/null
+++ b/mysql-test/suite/large_tests/t/maria_recover_encrypted.test
@@ -0,0 +1,90 @@
+# MDEV-18187: If server crashes before flushing index pages in an
+# encrypted Aria table, it could permanently fail to repair the table
+
+--source include/have_maria.inc
+--source include/default_charset.inc
+
+# Cleanup
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS proc_insert_many;
+--enable_warnings
+
+# --------
+
+# Configure encryption
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--shutdown_server
+--source include/wait_until_disconnected.inc
+
+--write_file $MYSQLTEST_VARDIR/key.txt
+1;76025E3ADC78D74819927DB02AAA4C35
+EOF
+
+--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+# Create table with many indexes so that its index size grows quickly
+# and it can be grown to needed size without too many inserts
+CREATE TABLE t1 (
+ field1 INTEGER NOT NULL,
+ field2 INTEGER NOT NULL,
+ field3 INTEGER NOT NULL,
+ KEY i_1 (field1),
+ KEY i_2 (field2),
+ KEY i_3 (field3),
+ KEY i_12 (field1, field2),
+ KEY i_13 (field1, field3),
+ KEY i_21 (field2, field1),
+ KEY i_23 (field2, field3),
+ KEY i_31 (field3, field1),
+ KEY i_32 (field3, field2),
+ KEY i_123 (field1, field2, field3),
+ KEY i_132 (field1, field3, field2),
+ KEY i_213 (field2, field1, field3),
+ KEY i_231 (field2, field3, field1),
+ KEY i_312 (field3, field1, field2),
+ KEY i_321 (field3, field2, field1)
+) ENGINE=Aria;
+
+# Create procedures to insert many rows.
+DELIMITER |;
+CREATE PROCEDURE proc_insert_many()
+BEGIN
+ DECLARE iRow INT DEFAULT 0;
+ insertRows: LOOP
+ IF (iRow = 70000) THEN
+ LEAVE insertRows;
+ END IF;
+
+ INSERT INTO t1 VALUES (1000000+iRow,2000000+iRow,3000000+iRow);
+ SET iRow = iRow + 1;
+ END LOOP insertRows;
+END|
+DELIMITER ;|
+
+# Call the procedure to insert rows.
+# Use 'LOCK TABLES' to make things a lot faster.
+# Note that his code doesn't reproduce for some reason:
+# INSERT INTO t1 SELECT 1000000+seq,2000000+seq,3000000+seq FROM seq_1_to_70000;
+LOCK TABLES t1 WRITE;
+CALL proc_insert_many();
+UNLOCK TABLES;
+
+# Crash and restart the server while it's still flushing index
+--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+SET debug_dbug="d,crash_shutdown";
+--error 2013
+shutdown;
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+# Access the table to trigger repair; validate repaired data
+SELECT * FROM t1 ORDER BY 1 DESC LIMIT 10;
+
+# --------
+
+# Cleanup
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS proc_insert_many;
diff --git a/mysql-test/suite/maria/alter.result b/mysql-test/suite/maria/alter.result
index 849aa6803f1..e1a57ed654f 100644
--- a/mysql-test/suite/maria/alter.result
+++ b/mysql-test/suite/maria/alter.result
@@ -73,7 +73,7 @@ SELECT count(a),sum(a) FROM t2;
count(a) sum(a)
0 NULL
ALTER TABLE t2 CHANGE IF EXISTS d c INT;
-ERROR 22007: Incorrect datetime value: '4'
+ERROR 22007: Truncated incorrect datetime value: '4'
SELECT count(a),sum(a) FROM t2;
count(a) sum(a)
0 NULL
@@ -104,3 +104,83 @@ DROP TABLE t1;
#
# End of 10.2 test
#
+#
+# MDEV-17665 Assertion `!share || share->page_type == PAGECACHE_LSN_PAGE',
+# `type != PAGECACHE_READ_UNKNOWN_PAGE' and similar ones upon concurrent
+# Aria operations
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, KEY(a)) ENGINE=Aria;
+ALTER TABLE t1 DISABLE KEYS;
+INSERT INTO t1 SELECT seq, seq FROM seq_1_to_100;
+connect con1,localhost,root,,test;
+connect con2,localhost,root,,test;
+INSERT INTO t1 SELECT seq, seq FROM seq_1_to_100;
+connection con1;
+FLUSH TABLES;
+connection default;
+INSERT INTO t1 SELECT 1;
+ERROR 21S01: Column count doesn't match value count at row 1
+connection con2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+disconnect con2;
+connection con1;
+disconnect con1;
+connection default;
+DROP TABLE t1;
+#
+# MDEV-22674 Server crash in compare_bin, ASAN heap-buffer-overflow in
+# _ma_dpointer, Assertion `!info->s->have_versioning ||
+# info->s->lock_key_trees' failed in restore_table_state_after_repair
+#
+CREATE TABLE t1 (id INT, d DATETIME, PRIMARY KEY(d,id),INDEX(d)) ENGINE=Aria;
+INSERT INTO t1 SELECT seq, NOW() FROM seq_1_to_500;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1);
+connect con1,localhost,root,,test;
+ALTER TABLE t1 DISABLE KEYS;
+INSERT INTO t1 (id) SELECT b FROM t2;
+connection default;
+INSERT INTO t1 SELECT a FROM t2;
+ERROR 21S01: Column count doesn't match value count at row 1
+connection con1;
+ERROR 42S22: Unknown column 'b' in 'field list'
+disconnect con1;
+connection default;
+drop table t1, t2;
+# This is also in MDEV-22674
+CREATE TABLE t1 (id INT, d DATETIME, PRIMARY KEY(d,id),INDEX(d)) ENGINE=Aria;
+INSERT INTO t1 SELECT seq, NOW() FROM seq_1_to_500;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1);
+ALTER TABLE t1 DISABLE KEYS;
+INSERT INTO t1 (id) SELECT b FROM t2;
+ERROR 42S22: Unknown column 'b' in 'field list'
+INSERT INTO t1 SELECT a FROM t2;
+ERROR 21S01: Column count doesn't match value count at row 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+500
+DROP TABLE t1,t2;
+#
+# MDEV-23296 Assertion `block->type == PAGECACHE_EMPTY_PAGE ||
+# block->type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == type ||
+# (block->type == PAGECACHE_PLAIN_PAGE && type == PAGECACHE_LSN_PAGE)'
+# with aria_max_sort_file_size
+#
+SET @max_size.save= @@aria_max_sort_file_size;
+SET GLOBAL aria_max_sort_file_size= 0;
+CREATE TABLE t1 (pk INT PRIMARY KEY, a CHAR(255), KEY(a)) ENGINE=Aria;
+ALTER TABLE t1 DISABLE KEYS;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+ALTER TABLE t1 ENABLE KEYS;
+INSERT INTO t1 VALUES (3,'nice try');
+SELECT * FROM t1;
+pk a
+1 foo
+2 bar
+3 nice try
+DROP TABLE t1;
+SET GLOBAL aria_max_sort_file_size= @max_size.save;
+#
+# End of 10.4 test
+#
diff --git a/mysql-test/suite/maria/alter.test b/mysql-test/suite/maria/alter.test
index 31eeac1df87..f2950f0a6d3 100644
--- a/mysql-test/suite/maria/alter.test
+++ b/mysql-test/suite/maria/alter.test
@@ -1,6 +1,8 @@
# Testing of potential problems in Aria and alter table
-- source include/have_maria.inc
+-- source include/have_innodb.inc
+-- source include/have_sequence.inc
drop table if exists t1;
@@ -90,3 +92,103 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 test
--echo #
+
+--echo #
+--echo # MDEV-17665 Assertion `!share || share->page_type == PAGECACHE_LSN_PAGE',
+--echo # `type != PAGECACHE_READ_UNKNOWN_PAGE' and similar ones upon concurrent
+--echo # Aria operations
+--echo #
+
+CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, KEY(a)) ENGINE=Aria;
+ALTER TABLE t1 DISABLE KEYS;
+INSERT INTO t1 SELECT seq, seq FROM seq_1_to_100;
+
+--connect (con1,localhost,root,,test)
+--connect (con2,localhost,root,,test)
+--send
+ INSERT INTO t1 SELECT seq, seq FROM seq_1_to_100;
+
+--connection con1
+--send
+ FLUSH TABLES;
+
+--connection default
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 SELECT 1;
+
+# Cleanup
+--connection con2
+--error ER_DUP_ENTRY
+--reap
+--disconnect con2
+--connection con1
+--reap
+--disconnect con1
+--connection default
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22674 Server crash in compare_bin, ASAN heap-buffer-overflow in
+--echo # _ma_dpointer, Assertion `!info->s->have_versioning ||
+--echo # info->s->lock_key_trees' failed in restore_table_state_after_repair
+--echo #
+
+CREATE TABLE t1 (id INT, d DATETIME, PRIMARY KEY(d,id),INDEX(d)) ENGINE=Aria;
+INSERT INTO t1 SELECT seq, NOW() FROM seq_1_to_500;
+
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1);
+
+--connect (con1,localhost,root,,test)
+ALTER TABLE t1 DISABLE KEYS;
+--send
+ INSERT INTO t1 (id) SELECT b FROM t2;
+
+--connection default
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 SELECT a FROM t2;
+
+# Cleanup
+--connection con1
+--error ER_BAD_FIELD_ERROR
+--reap
+--disconnect con1
+
+--connection default
+drop table t1, t2;
+
+--echo # This is also in MDEV-22674
+
+CREATE TABLE t1 (id INT, d DATETIME, PRIMARY KEY(d,id),INDEX(d)) ENGINE=Aria;
+INSERT INTO t1 SELECT seq, NOW() FROM seq_1_to_500;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1);
+ALTER TABLE t1 DISABLE KEYS;
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t1 (id) SELECT b FROM t2;
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 SELECT a FROM t2;
+SELECT COUNT(*) FROM t1;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-23296 Assertion `block->type == PAGECACHE_EMPTY_PAGE ||
+--echo # block->type == PAGECACHE_READ_UNKNOWN_PAGE || block->type == type ||
+--echo # (block->type == PAGECACHE_PLAIN_PAGE && type == PAGECACHE_LSN_PAGE)'
+--echo # with aria_max_sort_file_size
+--echo #
+
+SET @max_size.save= @@aria_max_sort_file_size;
+SET GLOBAL aria_max_sort_file_size= 0;
+CREATE TABLE t1 (pk INT PRIMARY KEY, a CHAR(255), KEY(a)) ENGINE=Aria;
+ALTER TABLE t1 DISABLE KEYS;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+ALTER TABLE t1 ENABLE KEYS;
+INSERT INTO t1 VALUES (3,'nice try');
+SELECT * FROM t1;
+DROP TABLE t1;
+SET GLOBAL aria_max_sort_file_size= @max_size.save;
+
+--echo #
+--echo # End of 10.4 test
+--echo #
diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.result b/mysql-test/suite/maria/aria_pack_mdev14183.result
index b20f60c5b8a..1f71ccd53b5 100644
--- a/mysql-test/suite/maria/aria_pack_mdev14183.result
+++ b/mysql-test/suite/maria/aria_pack_mdev14183.result
@@ -15,6 +15,7 @@ Original trees: 4 After join: 1
- Compressing file
Min record length: 5 Max length: 5 Mean total length: 35
99.57%
+# restart
SELECT * FROM t;
col_1 col_2 col_3 col_4
foobar qux 0 0
diff --git a/mysql-test/suite/maria/disabled.def b/mysql-test/suite/maria/disabled.def
new file mode 100644
index 00000000000..fd72451f61b
--- /dev/null
+++ b/mysql-test/suite/maria/disabled.def
@@ -0,0 +1,13 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+
+small_blocksize: Can't be used when Aria is used for privilege tables
diff --git a/mysql-test/suite/maria/encrypt-wrong-key.test b/mysql-test/suite/maria/encrypt-wrong-key.test
index 2afa785dd0f..ca65e1018d0 100644
--- a/mysql-test/suite/maria/encrypt-wrong-key.test
+++ b/mysql-test/suite/maria/encrypt-wrong-key.test
@@ -17,7 +17,7 @@ call mtr.add_suppression("Failed to decrypt");
1;770A8A65DA156D24EE2A093277530142
EOF
---exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -32,7 +32,7 @@ INSERT INTO t1 VALUES (1);
2;770A8A65DA156D24EE2A093277530143
EOF
---exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -44,7 +44,7 @@ INSERT INTO t1 VALUES (2);
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result
index b3b8efc745a..975c280d467 100644
--- a/mysql-test/suite/maria/icp.result
+++ b/mysql-test/suite/maria/icp.result
@@ -450,11 +450,11 @@ c1 INT NOT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t1 VALUES (1,9),(2,7),(3,6),(4,3),(5,1);
-EXPLAIN SELECT pk, c1 FROM t1 WHERE pk <> 3;
+EXPLAIN SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 5 Using where
SET SESSION optimizer_switch='index_condition_pushdown=off';
-SELECT pk, c1 FROM t1 WHERE pk <> 3;
+SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3);
pk c1
1 9
2 7
@@ -507,7 +507,7 @@ SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1
WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
(t1.pk > 1 AND t2.pk BETWEEN 6 AND 6);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Rowid-ordered scan
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join)
SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1
WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR
@@ -590,6 +590,12 @@ i1 INTEGER NOT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t2 VALUES (4,1);
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
EXPLAIN
SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
WHERE t2.pk <> t1.d1 AND t2.pk = 4;
@@ -647,7 +653,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 13 NULL 2 Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 range b b 13 NULL # Using where; Rowid-ordered scan; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -659,7 +665,7 @@ SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 13 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 range b b 13 NULL # Using index condition; Rowid-ordered scan; Using filesort
SELECT * FROM t1
WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania'
ORDER BY a;
@@ -676,23 +682,23 @@ INSERT INTO t2 VALUES
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
SET SESSION optimizer_switch='index_condition_pushdown=off';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
1 SIMPLE t2 ref a a 515 const 1 Using where
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
1 4
SET SESSION optimizer_switch='index_condition_pushdown=on';
EXPLAIN
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1
1 SIMPLE t2 ref a a 515 const 1 Using where
-SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0
+SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
HAVING t1.c != 5 ORDER BY t1.c;
b c
1 4
@@ -795,6 +801,12 @@ INSERT INTO t2 (g,h) VALUES
(0,'p'),(0,'f'),(0,'p'),(7,'d'),(7,'f'),(5,'j'),
(3,'e'),(1,'u'),(4,'v'),(9,'u'),(6,'i'),(1,'x'),
(7,'f'),(5,'j'),(3,'e'),(1,'u'),(4,'v'),(9,'u');
+ANALYZE TABLE t1,t2;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status Table is already up to date
SET @save_optimize_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on';
EXPLAIN
@@ -804,7 +816,7 @@ AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)
OR a = 0 AND h < 'z' );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
-1 PRIMARY t2 ref g g 5 test.t.c 19 Using where
+1 PRIMARY t2 ref g g 5 test.t.c 18 Using where
2 DEPENDENT SUBQUERY t1 index PRIMARY PRIMARY 4 NULL 64 Using where; Using index
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
SELECT COUNT(*) FROM t1 AS t, t2
diff --git a/mysql-test/suite/maria/maria-autozerofill.result b/mysql-test/suite/maria/maria-autozerofill.result
index 76ccc67ebb5..064ac9e6496 100644
--- a/mysql-test/suite/maria/maria-autozerofill.result
+++ b/mysql-test/suite/maria/maria-autozerofill.result
@@ -56,6 +56,7 @@ mysqltest.t3 optimize Note Zerofilling moved table ./mysqltest/t3
mysqltest.t3 optimize status OK
analyze table t4;
Table Op Msg_type Msg_text
+mysqltest.t4 analyze status Engine-independent statistics collected
mysqltest.t4 analyze Note Zerofilling moved table ./mysqltest/t4
mysqltest.t4 analyze status OK
repair table t5;
diff --git a/mysql-test/suite/maria/maria-autozerofill.test b/mysql-test/suite/maria/maria-autozerofill.test
index e56f71d2c5f..4baa118302c 100644
--- a/mysql-test/suite/maria/maria-autozerofill.test
+++ b/mysql-test/suite/maria/maria-autozerofill.test
@@ -39,11 +39,11 @@ flush tables;
# Check that table is not zerofilled, not movable
let $MYSQLD_DATADIR= `select @@datadir`;
---exec $MARIA_CHK -dv --ignore-control-file $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
+--exec $MARIA_CHK -dv --ignore-control-file $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/autozerofill.txt
perl;
use strict;
use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
+ my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/autozerofill.txt";
open(FILE, "<", $fname) or die;
my @content= <FILE>;
print grep(/Status:.*(zerofilled|movable)/, @content);
@@ -64,11 +64,11 @@ enable_ps_protocol;
flush table t1;
# Check that table is auto-zerofilled, movable
---exec $MARIA_CHK -dv --ignore-control-file $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
+--exec $MARIA_CHK -dv --ignore-control-file $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/autozerofill.txt
perl;
use strict;
use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
+ my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/autozerofill.txt";
open(FILE, "<", $fname) or die;
my @content= <FILE>;
print grep(/Status:.*zerofilled/, @content);
@@ -81,11 +81,11 @@ insert into t1 values(2);
flush table t1;
# Check that table is not zerofilled, not movable
---exec $MARIA_CHK -dv --ignore-control-file $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
+--exec $MARIA_CHK -dv --ignore-control-file $MYSQLD_DATADIR/mysqltest/t1 >$MYSQLTEST_VARDIR/tmp/autozerofill.txt
perl;
use strict;
use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/ariachk.txt";
+ my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/autozerofill.txt";
open(FILE, "<", $fname) or die;
my @content= <FILE>;
print grep(/Status:.*(zerofilled|movable)/, @content);
@@ -115,7 +115,7 @@ check table t5;
# Check that if we zerofill with aria_chk, we should not get any warnings when
# accessing the table
---exec $MARIA_CHK --zerofill $MYSQLD_DATADIR/mysqltest/t6 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
+--exec $MARIA_CHK --ignore-control-file --zerofill $MYSQLD_DATADIR/mysqltest/t6 >$MYSQLTEST_VARDIR/tmp/autozerofill.txt 2>&1
select * from t6;
check table t6;
diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
index 8bea5edb6fb..2f8c1b9408c 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
@@ -749,6 +749,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result
index 4a2f97fbd41..1c0d9e756a4 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-trans.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result
@@ -749,6 +749,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result
index 901a7bee397..e39430a2efb 100644
--- a/mysql-test/suite/maria/maria-gis-rtree.result
+++ b/mysql-test/suite/maria/maria-gis-rtree.result
@@ -749,6 +749,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/maria/maria-no-logging.result b/mysql-test/suite/maria/maria-no-logging.result
index fb175d0e326..e79686c4731 100644
--- a/mysql-test/suite/maria/maria-no-logging.result
+++ b/mysql-test/suite/maria/maria-no-logging.result
@@ -31,6 +31,9 @@ insert into t1 select * from t2;
show engine aria logs;
Type Name Status
Aria Size 24576 aria_log.00000001 unknown
+select count(*) from t1;
+count(*)
+65
connection default;
connection admin;
* shut down mysqld, removed logs, restarted it
@@ -40,6 +43,9 @@ insert into t1 select * from t2;
show engine aria logs;
Type Name Status
Aria Size 16384 aria_log.00000001 unknown
+select count(*) from t1;
+count(*)
+64
drop table t1;
connection default;
connection admin;
diff --git a/mysql-test/suite/maria/maria-no-logging.test b/mysql-test/suite/maria/maria-no-logging.test
index fb2f34f7708..5d8029156ed 100644
--- a/mysql-test/suite/maria/maria-no-logging.test
+++ b/mysql-test/suite/maria/maria-no-logging.test
@@ -48,6 +48,7 @@ insert into t1 values('a');
insert into t1 select * from t2;
--replace_regex /; .+aria_log/aria_log/
show engine aria logs;
+select count(*) from t1;
# optimization because table is empty
-- source include/maria_empty_logs.inc
@@ -55,6 +56,7 @@ truncate table t1;
insert into t1 select * from t2;
--replace_regex /; .+aria_log/aria_log/
show engine aria logs;
+select count(*) from t1;
drop table t1;
diff --git a/mysql-test/suite/maria/maria-recover.result b/mysql-test/suite/maria/maria-recover.result
index 4d0b4317afe..8a33307b2b0 100644
--- a/mysql-test/suite/maria/maria-recover.result
+++ b/mysql-test/suite/maria/maria-recover.result
@@ -27,7 +27,7 @@ ThursdayMorningsMarket
ThursdayMorningsMarketb
Warnings:
Error 145 t_corrupted2' is marked as crashed and should be repaired
-Error 1034 1 client is using or hasn't closed the table properly
+Warning 1034 1 client is using or hasn't closed the table properly
Error 1034 Wrong base information on indexpage at page: 1
select * from t_corrupted2;
a
diff --git a/mysql-test/suite/maria/maria-recover.test b/mysql-test/suite/maria/maria-recover.test
index 100e4333f6f..36fa41d9adb 100644
--- a/mysql-test/suite/maria/maria-recover.test
+++ b/mysql-test/suite/maria/maria-recover.test
@@ -3,6 +3,18 @@
--source include/have_maria.inc
--source include/default_charset.inc
+#
+# Ensure that we don't get warnings from mysql.proc (used by check_mysqld)
+#
+
+--disable_query_log
+--disable_warnings
+--disable_result_log
+select count(*) from mysql.proc;
+--enable_result_log
+--enable_warnings
+--enable_query_log
+
--disable_query_log
# Note: \\. matches a single period. We use '.' as directory separator to
# account for Unix and Windows variation.
diff --git a/mysql-test/suite/maria/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result
index 73c45759373..321a374f4c2 100644
--- a/mysql-test/suite/maria/maria-ucs2.result
+++ b/mysql-test/suite/maria/maria-ucs2.result
@@ -1,6 +1,6 @@
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-Aria YES Crash-safe tables with MyISAM heritage NO NO NO
+Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO
set global storage_engine=aria;
set session storage_engine=aria;
drop table if exists t1;
diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result
index baf57a0fee5..fa0554077c2 100644
--- a/mysql-test/suite/maria/maria.result
+++ b/mysql-test/suite/maria/maria.result
@@ -1,7 +1,7 @@
call mtr.add_suppression("Can't find record in '.*'");
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-Aria YES Crash-safe tables with MyISAM heritage NO NO NO
+Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO
set global storage_engine=aria;
set session storage_engine=aria;
set global aria_page_checksum=0;
@@ -353,8 +353,6 @@ test.t1 check status OK
drop table t1;
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
ERROR 42000: Specified key was too long; max key length is 1000 bytes
-CREATE TABLE t1 (a varchar(32000), unique key(a));
-ERROR 42000: Specified key was too long; max key length is 1000 bytes
CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b));
ERROR 42000: Too many key parts specified; max 32 parts allowed
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
@@ -402,10 +400,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 4 test.t2.a 1
explain select * from t1 where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 5 Using index condition; Using where
+1 SIMPLE t1 ALL a NULL NULL NULL 10 Using where
explain select * from t1 force index (a) where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 5 Using index condition; Using where
+1 SIMPLE t1 range a a 4 NULL 5 Using index condition
explain select * from t1 where c=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c,c_2 c 5 const 2
@@ -739,6 +737,7 @@ insert into t1 values (0),(1),(2),(3),(4);
insert into t1 select NULL from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -752,6 +751,8 @@ show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 a 1 a A 10 NULL NULL YES BTREE
set aria_stats_method=nulls_equal;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
show variables like 'aria_stats_method';
Variable_name Value
aria_stats_method nulls_equal
@@ -759,6 +760,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -771,6 +773,7 @@ test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 a 1 a A 5 NULL NULL YES BTREE
+set @@use_stat_tables= @save_use_stat_tables;
set aria_stats_method=DEFAULT;
show variables like 'aria_stats_method';
Variable_name Value
@@ -779,6 +782,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -796,6 +800,8 @@ set aria_stats_method=nulls_ignored;
show variables like 'aria_stats_method';
Variable_name Value
aria_stats_method nulls_ignored
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
create table t1 (
a char(3), b char(4), c char(5), d char(6),
key(a,b,c,d)
@@ -806,6 +812,7 @@ insert into t1 values ('bce','def1', 'yuu', NULL);
insert into t1 values ('bce','def2', NULL, 'quux');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -816,6 +823,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE
delete from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -823,6 +831,7 @@ t1 1 a 1 a A 0 NULL NULL YES BTREE
t1 1 a 2 b A 0 NULL NULL YES BTREE
t1 1 a 3 c A 0 NULL NULL YES BTREE
t1 1 a 4 d A 0 NULL NULL YES BTREE
+set @@use_stat_tables= @save_use_stat_tables;
set aria_stats_method=DEFAULT;
drop table t1;
create table t1(
@@ -1690,9 +1699,11 @@ create table t1 (a int, key(a));
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test
index 6ab95a565b8..a326bb12d2a 100644
--- a/mysql-test/suite/maria/maria.test
+++ b/mysql-test/suite/maria/maria.test
@@ -374,8 +374,6 @@ drop table t1;
--error 1071
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
---error 1071
-CREATE TABLE t1 (a varchar(32000), unique key(a));
--error 1070
CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b));
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
@@ -701,6 +699,10 @@ show index from t1;
# Set nulls to be equal:
set aria_stats_method=nulls_equal;
+
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
+
show variables like 'aria_stats_method';
insert into t1 values (11);
delete from t1 where a=11;
@@ -714,6 +716,7 @@ delete from t1 where a=11;
check table t1;
show index from t1;
+set @@use_stat_tables= @save_use_stat_tables;
# Set nulls back to be equal
set aria_stats_method=DEFAULT;
show variables like 'aria_stats_method';
@@ -735,6 +738,9 @@ drop table t1;
set aria_stats_method=nulls_ignored;
show variables like 'aria_stats_method';
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
+
create table t1 (
a char(3), b char(4), c char(5), d char(6),
key(a,b,c,d)
@@ -753,6 +759,7 @@ delete from t1;
analyze table t1;
show index from t1;
+set @@use_stat_tables= @save_use_stat_tables;
set aria_stats_method=DEFAULT;
drop table t1;
diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result
index 6005bedf7bb..09fc696c272 100644
--- a/mysql-test/suite/maria/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
@@ -1,6 +1,6 @@
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-Aria YES Crash-safe tables with MyISAM heritage NO NO NO
+Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO
set global storage_engine=aria;
set session storage_engine=aria;
set global aria_page_checksum=0;
@@ -209,11 +209,13 @@ create table t2 like t1;
insert into t2 select * from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
delete from t2;
insert into t2 select * from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
drop table t1,t2;
create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000));
diff --git a/mysql-test/suite/maria/mrr.result b/mysql-test/suite/maria/mrr.result
index aa8034e0bb7..7913dcb34ce 100644
--- a/mysql-test/suite/maria/mrr.result
+++ b/mysql-test/suite/maria/mrr.result
@@ -187,7 +187,7 @@ explain
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
or c='no-such-row2');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 range idx1 idx1 29 NULL 16 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t4 range idx1 idx1 29 NULL 16 Using index condition; Rowid-ordered scan
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
or c='no-such-row2');
a b c filler
@@ -209,7 +209,7 @@ NULL NULL NULL NULL-1
explain
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t4 range idx1 idx1 29 NULL 32 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t4 range idx1 idx1 29 NULL 32 Using index condition; Rowid-ordered scan
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
a b c filler
b-1 NULL c-1 NULL-15
diff --git a/mysql-test/suite/maria/ps_maria.result b/mysql-test/suite/maria/ps_maria.result
index bd5f2b4c55b..6f5d557569b 100644
--- a/mysql-test/suite/maria/ps_maria.result
+++ b/mysql-test/suite/maria/ps_maria.result
@@ -1161,7 +1161,7 @@ def possible_keys 253 4_OR_8_K 0 Y 0 39 8
def key 253 64 0 Y 0 39 8
def key_len 253 4_OR_8_K 0 Y 0 39 8
def ref 253 2048 0 Y 0 39 8
-def rows 8 10 1 Y 32928 0 63
+def rows 253 64 1 Y 0 39 8
def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
diff --git a/mysql-test/suite/maria/system_tables.result b/mysql-test/suite/maria/system_tables.result
new file mode 100644
index 00000000000..c9944482638
--- /dev/null
+++ b/mysql-test/suite/maria/system_tables.result
@@ -0,0 +1,14 @@
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE;
+connect con1,localhost,root,,test;
+SET lock_wait_timeout= 2;
+FLUSH TABLES;
+FLUSH TABLES t1;
+connection default;
+CALL non_existing_sp;
+ERROR 42000: PROCEDURE test.non_existing_sp does not exist
+connection con1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+disconnect con1;
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/maria/system_tables.test b/mysql-test/suite/maria/system_tables.test
new file mode 100644
index 00000000000..950989fa5ca
--- /dev/null
+++ b/mysql-test/suite/maria/system_tables.test
@@ -0,0 +1,27 @@
+#
+# Test related to Aria system tables
+#
+
+#
+# MDEV-16986 Unitialized mutex, SIGSEGV and assorted assertion failures in
+# Aria code
+#
+
+CREATE TABLE t1 (i INT) ENGINE=Aria;
+LOCK TABLE t1 WRITE;
+
+--connect (con1,localhost,root,,test)
+SET lock_wait_timeout= 2;
+FLUSH TABLES;
+--send FLUSH TABLES t1
+--connection default
+--error ER_SP_DOES_NOT_EXIST
+CALL non_existing_sp;
+--connection con1
+--error ER_LOCK_WAIT_TIMEOUT
+--reap
+
+# Cleanup
+--disconnect con1
+--connection default
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/absolute_ibdata_paths.result b/mysql-test/suite/mariabackup/absolute_ibdata_paths.result
index fe211e71f2f..a29d9af65de 100644
--- a/mysql-test/suite/mariabackup/absolute_ibdata_paths.result
+++ b/mysql-test/suite/mariabackup/absolute_ibdata_paths.result
@@ -1,9 +1,11 @@
CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1);
+# restart
# xtrabackup backup
# remove datadir
# xtrabackup copy back
# restart server
+# restart
SELECT * from t;
i
1
diff --git a/mysql-test/suite/mariabackup/apply-log-only-incr.result b/mysql-test/suite/mariabackup/apply-log-only-incr.result
index 917a9647511..f84e8ea5607 100644
--- a/mysql-test/suite/mariabackup/apply-log-only-incr.result
+++ b/mysql-test/suite/mariabackup/apply-log-only-incr.result
@@ -22,7 +22,7 @@ count(*)
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart: --innodb-force-recovery=3
SELECT COUNT(*) FROM t;
COUNT(*)
1
@@ -30,6 +30,7 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT COUNT(*) FROM t;
COUNT(*)
201
+# restart
SELECT * FROM t;
a
0
diff --git a/mysql-test/suite/mariabackup/apply-log-only-incr.test b/mysql-test/suite/mariabackup/apply-log-only-incr.test
index 74ab680d840..c2d23c88a3e 100644
--- a/mysql-test/suite/mariabackup/apply-log-only-incr.test
+++ b/mysql-test/suite/mariabackup/apply-log-only-incr.test
@@ -36,7 +36,7 @@ connection default;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir ;
-exec $XTRABACKUP --prepare --verbose --apply-log-only --target-dir=$basedir ;
+exec $XTRABACKUP --prepare --verbose --target-dir=$basedir ;
--enable_result_log
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
@@ -44,7 +44,7 @@ let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
--source include/search_pattern_in_file.inc
--echo # expect NOT FOUND
-exec $XTRABACKUP --prepare --verbose --apply-log-only --target-dir=$basedir --incremental-dir=$incremental_dir ;
+exec $XTRABACKUP --prepare --verbose --target-dir=$basedir --incremental-dir=$incremental_dir ;
--source include/search_pattern_in_file.inc
--echo # expect NOT FOUND
diff --git a/mysql-test/suite/mariabackup/apply-log-only.test b/mysql-test/suite/mariabackup/apply-log-only.test
index 5a3c45f2914..7ffed0719f0 100644
--- a/mysql-test/suite/mariabackup/apply-log-only.test
+++ b/mysql-test/suite/mariabackup/apply-log-only.test
@@ -11,7 +11,7 @@ INSERT INTO t VALUES(1);
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
--enable_result_log
-exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir ;
+exec $XTRABACKUP --prepare --target-dir=$basedir ;
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
--let SEARCH_PATTERN= Rolled back recovered transaction
diff --git a/mysql-test/suite/mariabackup/backup_ssl.result b/mysql-test/suite/mariabackup/backup_ssl.result
index 6e59da6d43a..099b8d42a85 100644
--- a/mysql-test/suite/mariabackup/backup_ssl.result
+++ b/mysql-test/suite/mariabackup/backup_ssl.result
@@ -5,5 +5,5 @@ FLUSH PRIVILEGES;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
DROP USER backup_user;
diff --git a/mysql-test/suite/mariabackup/big_innodb_log.result b/mysql-test/suite/mariabackup/big_innodb_log.result
index 6577c0c9aae..7bd5d20049d 100644
--- a/mysql-test/suite/mariabackup/big_innodb_log.result
+++ b/mysql-test/suite/mariabackup/big_innodb_log.result
@@ -1,4 +1,5 @@
# Kill the server
+# restart: --debug-dbug=+d,innodb_small_log_block_no_limit
CREATE TABLE t(i INT) ENGINE InnoDB;
INSERT INTO t VALUES
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
@@ -20,7 +21,7 @@ count(*)
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart: --debug-dbug=+d,innodb_small_log_block_no_limit
SELECT count(*) FROM t WHERE i = 0;
count(*)
0
@@ -28,3 +29,4 @@ Ok
Ok
DROP TABLE t;
# Kill the server
+# restart
diff --git a/mysql-test/suite/mariabackup/binlog.test b/mysql-test/suite/mariabackup/binlog.test
index 998397bb495..b2f08c2d7bb 100644
--- a/mysql-test/suite/mariabackup/binlog.test
+++ b/mysql-test/suite/mariabackup/binlog.test
@@ -12,7 +12,7 @@ SHOW VARIABLES like 'log_bin';
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
--enable_result_log
-exec $XTRABACKUP --prepare --binlog-info=1 --apply-log-only --target-dir=$basedir ;
+exec $XTRABACKUP --prepare --binlog-info=1 --target-dir=$basedir ;
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
--let SEARCH_PATTERN= Last binlog file .*, position .*
diff --git a/mysql-test/suite/mariabackup/compress_qpress.result b/mysql-test/suite/mariabackup/compress_qpress.result
index 69427f5fc4d..ff940813440 100644
--- a/mysql-test/suite/mariabackup/compress_qpress.result
+++ b/mysql-test/suite/mariabackup/compress_qpress.result
@@ -9,7 +9,7 @@ t.ibd.qp
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/create_during_backup.result b/mysql-test/suite/mariabackup/create_during_backup.result
index f99c2633ab5..374c3dfc137 100644
--- a/mysql-test/suite/mariabackup/create_during_backup.result
+++ b/mysql-test/suite/mariabackup/create_during_backup.result
@@ -3,7 +3,7 @@
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT COUNT(*) from t1;
COUNT(*)
10000
diff --git a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result
index a06150bcb6a..be97675c40f 100644
--- a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result
+++ b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result
@@ -4,7 +4,7 @@ DROP TABLE t;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/data_directory.result b/mysql-test/suite/mariabackup/data_directory.result
index e7201918cbd..4e45127bd6a 100644
--- a/mysql-test/suite/mariabackup/data_directory.result
+++ b/mysql-test/suite/mariabackup/data_directory.result
@@ -6,7 +6,7 @@ DROP TABLE t;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
a
1
diff --git a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result
index 9349457ffbb..f42b6469db6 100644
--- a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result
+++ b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result
@@ -19,7 +19,7 @@ SET GLOBAL debug_dbug=@old_debug_dbug;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT count(*) FROM t1;
count(*)
2
diff --git a/mysql-test/suite/mariabackup/drop_table_during_backup.result b/mysql-test/suite/mariabackup/drop_table_during_backup.result
index 8a77945e586..a0fa9db5b94 100644
--- a/mysql-test/suite/mariabackup/drop_table_during_backup.result
+++ b/mysql-test/suite/mariabackup/drop_table_during_backup.result
@@ -7,7 +7,7 @@ CREATE TABLE t5 (i int) ENGINE=INNODB;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
CREATE TABLE t1(i int);
DROP TABLE t1;
CREATE TABLE t2(i int);
diff --git a/mysql-test/suite/mariabackup/encrypted_page_compressed.result b/mysql-test/suite/mariabackup/encrypted_page_compressed.result
index 293addd2b03..de4c966caf4 100644
--- a/mysql-test/suite/mariabackup/encrypted_page_compressed.result
+++ b/mysql-test/suite/mariabackup/encrypted_page_compressed.result
@@ -1,7 +1,9 @@
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+call mtr.add_suppression("InnoDB: Encrypted page .* in file .*test.t1\\.ibd looks corrupted; key_version=1");
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
insert into t1(b, c) values("mariadb", "mariabackup");
# Corrupt the table
+# restart
# xtrabackup backup
FOUND 1 /Database page corruption detected.*/ in backup.log
drop table t1;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_compressed.test b/mysql-test/suite/mariabackup/encrypted_page_compressed.test
index b0bcdd9e33b..54fffb7d08f 100644
--- a/mysql-test/suite/mariabackup/encrypted_page_compressed.test
+++ b/mysql-test/suite/mariabackup/encrypted_page_compressed.test
@@ -1,5 +1,6 @@
source include/have_file_key_management.inc;
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+call mtr.add_suppression("InnoDB: Encrypted page .* in file .*test.t1\\.ibd looks corrupted; key_version=1");
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
insert into t1(b, c) values("mariadb", "mariabackup");
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption,full_crc32.rdiff b/mysql-test/suite/mariabackup/encrypted_page_corruption,full_crc32.rdiff
new file mode 100644
index 00000000000..3326f0ca3d3
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption,full_crc32.rdiff
@@ -0,0 +1,9 @@
+--- encrypted_page_corruption,crc32.result
++++ encrypted_page_corruption,full_crc32.result
+@@ -5,5 +5,5 @@
+ # Corrupt the table
+ # restart
+ # xtrabackup backup
+-FOUND 1 /Database page corruption detected.*/ in backup.log
++NOT FOUND /Database page corruption detected.*/ in backup.log
+ drop table t1;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.combinations b/mysql-test/suite/mariabackup/encrypted_page_corruption.combinations
new file mode 100644
index 00000000000..79e5f7836ed
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.combinations
@@ -0,0 +1,5 @@
+[crc32]
+--innodb-checksum-algorithm=crc32
+
+[full_crc32]
+--innodb-checksum-algorithm=full_crc32
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.result b/mysql-test/suite/mariabackup/encrypted_page_corruption.result
index 9a6202a5ea1..b328d361cd6 100644
--- a/mysql-test/suite/mariabackup/encrypted_page_corruption.result
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.result
@@ -3,6 +3,7 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Table `test`\\.`t1` has an unreada
CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB, encrypted=yes;
insert into t1 select repeat('a',100);
# Corrupt the table
+# restart
# xtrabackup backup
FOUND 1 /Database page corruption detected.*/ in backup.log
drop table t1;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.test b/mysql-test/suite/mariabackup/encrypted_page_corruption.test
index 5ba77597b35..1beb020b463 100644
--- a/mysql-test/suite/mariabackup/encrypted_page_corruption.test
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.test
@@ -19,27 +19,36 @@ use warnings;
use Fcntl qw(:DEFAULT :seek);
do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
-my $page_size = $ENV{INNODB_PAGE_SIZE};
+my $ps = $ENV{INNODB_PAGE_SIZE};
sysopen IBD_FILE, "$ENV{MYSQLD_DATADIR}/test/t1.ibd", O_RDWR
|| die "Cannot open t1.ibd\n";
-sysread(IBD_FILE, $_, 38) || die "Cannot read t1.ibd\n";
+sysread(IBD_FILE, $_, 58) || die "Cannot read t1.ibd\n";
my $space = unpack("x[34]N", $_);
-sysseek(IBD_FILE, $page_size * 3, SEEK_SET) || die "Cannot seek t1.ibd\n";
+my $full_crc32 = unpack("N",substr($_,54,4)) & 0x10; # FIL_SPACE_FLAGS
+sysseek(IBD_FILE, $ps * 3, SEEK_SET) || die "Cannot seek t1.ibd\n";
-my $head = pack("Nx[18]", 3); # better to have a valid page number
-my $body = chr(0) x ($page_size - 38 - 8);
+# better to have a valid page number (3)
+my $page = pack("x[4]Nx[18]Nx[4]N", 3, 1, $space) . chr(0) x ($ps - 38);
-# Calculate innodb_checksum_algorithm=crc32 for the unencrypted page.
-# The following bytes are excluded:
-# bytes 0..3 (the checksum is stored there)
-# bytes 26..37 (encryption key version, post-encryption checksum, tablespace id)
-# bytes $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN)
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial);
-
-my $page= pack("N",$ck).$head.pack("NNN",1,$ck,$space).$body.pack("Nx[4]",$ck);
-die unless syswrite(IBD_FILE, $page, $page_size) == $page_size;
+if ($full_crc32)
+{
+ # no possibility of bug here
+ my $ck = mycrc32(substr($page, 0, $ps - 4), 0, $polynomial);
+ substr($page, $ps - 4, 4) = pack("N", $ck);
+}
+else
+{
+ my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+ mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
+ substr($page,0,4)=$ck;
+ substr($page,$ps-8,4)=$ck;
+ # trigger the bug by having the same "post-encryption" checksum!
+ substr($page,30,4)=$ck;
+}
+
+die unless syswrite(IBD_FILE, $page, $ps) == $ps;
close IBD_FILE;
EOF
@@ -49,8 +58,13 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
+let $expect_error= 1;
+if (`select @@innodb_checksum_algorithm LIKE '%full_crc32'`)
+{
+ let $expect_error= 0;
+}
--disable_result_log
---error 1
+--error $expect_error
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --extended-validation --target-dir=$targetdir --core-file > $backuplog;
--enable_result_log
diff --git a/mysql-test/suite/mariabackup/error_during_copyback.result b/mysql-test/suite/mariabackup/error_during_copyback.result
index 9b12c1135d2..ba27f0f83e6 100644
--- a/mysql-test/suite/mariabackup/error_during_copyback.result
+++ b/mysql-test/suite/mariabackup/error_during_copyback.result
@@ -3,6 +3,7 @@ INSERT INTO t VALUES(1);
# xtrabackup backup
# xtrabackup prepare
# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/full_backup.result b/mysql-test/suite/mariabackup/full_backup.result
index 954151bbad7..e2d5cf185d5 100644
--- a/mysql-test/suite/mariabackup/full_backup.result
+++ b/mysql-test/suite/mariabackup/full_backup.result
@@ -7,7 +7,7 @@ INSERT INTO t VALUES(2);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/huge_lsn.combinations b/mysql-test/suite/mariabackup/huge_lsn.combinations
new file mode 100644
index 00000000000..729380593f3
--- /dev/null
+++ b/mysql-test/suite/mariabackup/huge_lsn.combinations
@@ -0,0 +1,5 @@
+[strict_crc32]
+--innodb-checksum-algorithm=strict_crc32
+
+[strict_full_crc32]
+--innodb-checksum-algorithm=strict_full_crc32
diff --git a/mysql-test/suite/mariabackup/huge_lsn.result b/mysql-test/suite/mariabackup/huge_lsn.result
index 2225a958756..2dd8e5098af 100644
--- a/mysql-test/suite/mariabackup/huge_lsn.result
+++ b/mysql-test/suite/mariabackup/huge_lsn.result
@@ -1,6 +1,7 @@
#
# MDEV-13416 mariabackup fails with EFAULT "Bad Address"
#
+# restart
FOUND 1 /InnoDB: New log files created, LSN=175964\d{8}/ in mysqld.1.err
CREATE TABLE t(i INT) ENGINE=INNODB ENCRYPTED=YES;
INSERT INTO t VALUES(1);
@@ -11,7 +12,7 @@ INSERT INTO t VALUES(2);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
@@ -27,4 +28,4 @@ DROP TABLE t;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
diff --git a/mysql-test/suite/mariabackup/huge_lsn.test b/mysql-test/suite/mariabackup/huge_lsn.test
index 55978071be3..900940452c8 100644
--- a/mysql-test/suite/mariabackup/huge_lsn.test
+++ b/mysql-test/suite/mariabackup/huge_lsn.test
@@ -24,10 +24,12 @@ my $page;
die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
substr($page,26,8) = pack("NN", 4096, ~1024);
my $polynomial = 0x82f63b78; # CRC-32C
-my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
- mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
-substr($page,0,4)=$ck;
-substr($page,$ps-8,4)=$ck;
+my $full_crc32 = unpack("N",substr($page,54,4)) & 0x10; # FIL_SPACE_FLAGS
+if ($full_crc32)
+{
+ my $ck = mycrc32(substr($page, 0, $ps-4), 0, $polynomial);
+ substr($page, $ps-4, 4) = pack("N", $ck);
+}
sysseek(FILE, 0, 0) || die "Unable to rewind $file\n";
syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
close(FILE) || die "Unable to close $file\n";
diff --git a/mysql-test/suite/mariabackup/include/restart_and_restore.inc b/mysql-test/suite/mariabackup/include/restart_and_restore.inc
index 9056867b07f..2d1e5493957 100644
--- a/mysql-test/suite/mariabackup/include/restart_and_restore.inc
+++ b/mysql-test/suite/mariabackup/include/restart_and_restore.inc
@@ -5,5 +5,4 @@ echo # remove datadir;
rmdir $_datadir;
echo # xtrabackup move back;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir --parallel=2 --throttle=1;
-echo # restart server;
--source include/start_mysqld.inc
diff --git a/mysql-test/suite/mariabackup/incremental_backup.result b/mysql-test/suite/mariabackup/incremental_backup.result
index 70cc2cf8c4a..d6a78655a0c 100644
--- a/mysql-test/suite/mariabackup/incremental_backup.result
+++ b/mysql-test/suite/mariabackup/incremental_backup.result
@@ -24,7 +24,7 @@ disconnect con1;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/incremental_ddl_before_backup.result b/mysql-test/suite/mariabackup/incremental_ddl_before_backup.result
index a6273a20ff5..71f250bfd8d 100644
--- a/mysql-test/suite/mariabackup/incremental_ddl_before_backup.result
+++ b/mysql-test/suite/mariabackup/incremental_ddl_before_backup.result
@@ -25,7 +25,7 @@ count(*)
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
select count(*) from t7;
count(*)
7168
diff --git a/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test b/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test
index 2136771b97e..f243ac1acd9 100644
--- a/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test
@@ -33,7 +33,7 @@ select count(*) from t7;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
--echo # XTRABACKUP PREPARE
-exec $XTRABACKUP --apply-log-only --prepare --target-dir=$basedir;
+exec $XTRABACKUP --prepare --target-dir=$basedir;
--echo # XTRABACKUP INCREMENTAL PREPARE
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir;
diff --git a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.result b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.result
index e9746083178..33a3b0001a1 100644
--- a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.result
+++ b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.result
@@ -10,7 +10,7 @@ INSERT into t1 values(1);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
CREATE TABLE t1(i int);
DROP TABLE t1;
SELECT * from t1_renamed;
diff --git a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test
index 1ee6038f072..ebdb2137523 100644
--- a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test
@@ -29,7 +29,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir
--let after_load_tablespaces=
--disable_result_log
echo # Prepare full backup, apply incremental one;
-exec $XTRABACKUP --apply-log-only --prepare --target-dir=$basedir;
+exec $XTRABACKUP --prepare --target-dir=$basedir;
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ;
echo # Restore and check results;
diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.result b/mysql-test/suite/mariabackup/incremental_encrypted.result
index e9525c9c4b7..6a23f399f0e 100644
--- a/mysql-test/suite/mariabackup/incremental_encrypted.result
+++ b/mysql-test/suite/mariabackup/incremental_encrypted.result
@@ -13,7 +13,7 @@ i
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/incremental_newdb_while_backup.result b/mysql-test/suite/mariabackup/incremental_newdb_while_backup.result
index e1d5c7a5df4..ac74893d2cf 100644
--- a/mysql-test/suite/mariabackup/incremental_newdb_while_backup.result
+++ b/mysql-test/suite/mariabackup/incremental_newdb_while_backup.result
@@ -10,7 +10,7 @@ CREATE TABLE t1(i INT PRIMARY KEY) ENGINE INNODB;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT COUNT(*) FROM test.t1;
COUNT(*)
0
diff --git a/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test b/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test
index 2433fb4a35a..c4695edb845 100644
--- a/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test
@@ -26,7 +26,7 @@ CREATE TABLE t1(i INT PRIMARY KEY) ENGINE INNODB;
--let after_load_tablespaces=
--disable_result_log
--echo # Prepare full backup, apply incremental one
---exec $XTRABACKUP --apply-log-only --prepare --target-dir=$basedir
+--exec $XTRABACKUP --prepare --target-dir=$basedir
--exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir
--enable_result_log
diff --git a/mysql-test/suite/mariabackup/incremental_rocksdb.result b/mysql-test/suite/mariabackup/incremental_rocksdb.result
index 4e5b9c43389..f319b46669d 100644
--- a/mysql-test/suite/mariabackup/incremental_rocksdb.result
+++ b/mysql-test/suite/mariabackup/incremental_rocksdb.result
@@ -10,7 +10,7 @@ INSERT INTO t2 VALUES(2);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t2;
i
2
diff --git a/mysql-test/suite/mariabackup/innodb_force_recovery.result b/mysql-test/suite/mariabackup/innodb_force_recovery.result
index 94a265cfabe..6626bb0bc55 100644
--- a/mysql-test/suite/mariabackup/innodb_force_recovery.result
+++ b/mysql-test/suite/mariabackup/innodb_force_recovery.result
@@ -19,7 +19,7 @@ NOT FOUND /innodb_force_recovery = 1/ in backup.log
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result
index 47b74e0f709..f27f9d0d303 100644
--- a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result
+++ b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result
@@ -18,7 +18,7 @@ call a();
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
DROP PROCEDURE a;
CHECK TABLE tz,tr,td;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/mariabackup/innodb_xa_rollback.result b/mysql-test/suite/mariabackup/innodb_xa_rollback.result
index cd5e2cd39a9..1bf6a9a23d3 100644
--- a/mysql-test/suite/mariabackup/innodb_xa_rollback.result
+++ b/mysql-test/suite/mariabackup/innodb_xa_rollback.result
@@ -14,14 +14,14 @@ XA ROLLBACK 'test1';
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
XA RECOVER;
formatID gtrid_length bqual_length data
# xtrabackup prepare and DO NOT rollback prepared XA
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
XA RECOVER;
formatID gtrid_length bqual_length data
1 5 0 test1
@@ -30,14 +30,14 @@ XA ROLLBACK 'test1';
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
XA RECOVER;
formatID gtrid_length bqual_length data
# xtrabackup prepare for export and DO NOT rollback prepared XA
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
XA RECOVER;
formatID gtrid_length bqual_length data
1 5 0 test1
diff --git a/mysql-test/suite/mariabackup/log_checksum_mismatch.result b/mysql-test/suite/mariabackup/log_checksum_mismatch.result
index 806a5e62cb6..31bd9dcc0d1 100644
--- a/mysql-test/suite/mariabackup/log_checksum_mismatch.result
+++ b/mysql-test/suite/mariabackup/log_checksum_mismatch.result
@@ -7,7 +7,7 @@ INSERT INTO t VALUES(2);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/log_page_corruption.result b/mysql-test/suite/mariabackup/log_page_corruption.result
index b1dc6c8fd5f..101471002b8 100644
--- a/mysql-test/suite/mariabackup/log_page_corruption.result
+++ b/mysql-test/suite/mariabackup/log_page_corruption.result
@@ -22,6 +22,7 @@ INSERT INTO t5_corrupted_to_rename VALUES (3), (4), (5), (6), (7), (8), (9);
INSERT INTO t6_corrupted_to_drop VALUES (3), (4), (5), (6), (7), (8), (9);
INSERT INTO t7_corrupted_to_alter VALUES (3), (4), (5), (6), (7), (8), (9);
# Corrupt tables
+# restart
# Backup must fail due to page corruption
FOUND 1 /Database page corruption detected.*/ in backup.log
# "innodb_corrupted_pages" file must not exist
@@ -43,6 +44,7 @@ test/t7_corrupted_to_alter
INSERT INTO t1_inc_corrupted VALUES (3), (4), (5), (6), (7), (8), (9);
INSERT INTO t2_inc_corrupted VALUES (3), (4), (5), (6), (7), (8), (9);
INSERT INTO t3_inc VALUES (3), (4), (5), (6), (7), (8), (9);
+# restart
# Backup must not fail, but "innodb_corrupted_pages" file must be created due to --log-innodb-page-corruption option
--- "innodb_corrupted_pages" file content: ---
test/t1_corrupted
@@ -79,12 +81,14 @@ DROP TABLE t7_inc_corrupted_to_alter;
###
# Extend some tablespace and corrupt extended pages for full backup
+# restart
# Full backup with --log-innodb-page-corruption
--- "innodb_corrupted_pages" file content: ---
test/t3
4 6
------
# Extend some tablespace and corrupt extended pages for incremental backup
+# restart
# Incremental backup --log-innodb-page-corruption
--- "innodb_corrupted_pages" file content: ---
test/t3
@@ -104,7 +108,7 @@ FOUND 1 /was successfuly fixed.*/ in backup.log
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t3;
c
3
diff --git a/mysql-test/suite/mariabackup/mdev-14447.result b/mysql-test/suite/mariabackup/mdev-14447.result
index 6600c13ed74..357e883178b 100644
--- a/mysql-test/suite/mariabackup/mdev-14447.result
+++ b/mysql-test/suite/mariabackup/mdev-14447.result
@@ -14,6 +14,7 @@ FOUND 1 /Checksum mismatch in datafile/ in backup.log
# remove datadir
# xtrabackup move back
# restart server
+# restart
SELECT count(*) FROM t;
count(*)
100000
diff --git a/mysql-test/suite/mariabackup/mdev-14447.test b/mysql-test/suite/mariabackup/mdev-14447.test
index 799d81a8710..7877a7805e1 100644
--- a/mysql-test/suite/mariabackup/mdev-14447.test
+++ b/mysql-test/suite/mariabackup/mdev-14447.test
@@ -30,13 +30,12 @@ remove_file $backuplog;
--disable_result_log
echo # Prepare full backup, apply incremental one;
-exec $XTRABACKUP --prepare --verbose --apply-log-only --target-dir=$basedir;
+exec $XTRABACKUP --prepare --verbose --target-dir=$basedir;
-exec $XTRABACKUP --prepare --verbose --apply-log-only --target-dir=$basedir --incremental-dir=$incremental_dir ;
+exec $XTRABACKUP --prepare --verbose --target-dir=$basedir --incremental-dir=$incremental_dir ;
echo # Restore and check results;
let $targetdir=$basedir;
-#-- source include/restart_and_restore.inc
let $_datadir= `SELECT @@datadir`;
let $innodb_data_file_path=`SELECT @@innodb_data_file_path`;
diff --git a/mysql-test/suite/mariabackup/missing_ibd.result b/mysql-test/suite/mariabackup/missing_ibd.result
index 7ff63b7d434..1ad18e8b14d 100644
--- a/mysql-test/suite/mariabackup/missing_ibd.result
+++ b/mysql-test/suite/mariabackup/missing_ibd.result
@@ -1,5 +1,6 @@
create table t1(c1 int) engine=InnoDB;
INSERT INTO t1 VALUES(1);
+# restart
# xtrabackup backup
select * from t1;
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
diff --git a/mysql-test/suite/mariabackup/mlog_index_load.result b/mysql-test/suite/mariabackup/mlog_index_load.result
index 8925e897399..b2367d52dce 100644
--- a/mysql-test/suite/mariabackup/mlog_index_load.result
+++ b/mysql-test/suite/mariabackup/mlog_index_load.result
@@ -9,7 +9,7 @@ t1.new
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT COUNT(*) from t1;
COUNT(*)
10000
diff --git a/mysql-test/suite/mariabackup/options_check.result b/mysql-test/suite/mariabackup/options_check.result
new file mode 100644
index 00000000000..59666754f04
--- /dev/null
+++ b/mysql-test/suite/mariabackup/options_check.result
@@ -0,0 +1,8 @@
+# Check for unknown options in command-line
+# Check for unknown options in "mariabackup" group
+# Check for unknown options in "xtrabackup" group
+# Check for unknown options in "mariadb-backup" group
+# Check for options overwriting
+# Check if uknown options that follow --mysqld-args are ingored
+# Check if [mariadb-client] group is not loaded (MDEV-22894)
+# Check if --help presents
diff --git a/mysql-test/suite/mariabackup/options_check.test b/mysql-test/suite/mariabackup/options_check.test
new file mode 100644
index 00000000000..022bcbd5d10
--- /dev/null
+++ b/mysql-test/suite/mariabackup/options_check.test
@@ -0,0 +1,69 @@
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+--let $custom_cnf=$MYSQLTEST_VARDIR/tmp/custom_my.cnf
+
+--echo # Check for unknown options in command-line
+--disable_result_log
+--error 7
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --unknown-option=xxx --target-dir=$targetdir;
+--error 2
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --unknown-option --target-dir=$targetdir;
+
+--echo # Check for unknown options in "mariabackup" group
+--write_file $custom_cnf
+[mariabackup]
+unknown-option=XXX
+EOF
+--error 7
+exec $XTRABACKUP --defaults-file=$custom_cnf --backup --target-dir=$targetdir;
+--remove_file $custom_cnf
+
+--echo # Check for unknown options in "xtrabackup" group
+--write_file $custom_cnf
+[xtrabackup]
+unknown-option=XXX
+EOF
+--error 7
+exec $XTRABACKUP --defaults-file=$custom_cnf --backup --target-dir=$targetdir;
+--remove_file $custom_cnf
+
+--echo # Check for unknown options in "mariadb-backup" group
+--write_file $custom_cnf
+[mariadb-backup]
+unknown-option=XXX
+EOF
+--error 7
+exec $XTRABACKUP --defaults-file=$custom_cnf --backup --target-dir=$targetdir;
+--remove_file $custom_cnf
+
+--echo # Check for options overwriting
+--write_file $custom_cnf
+[mariadbd]
+innodb-flush-method=O_DIRECT
+
+[mariabackup]
+innodb-flush-method=blablabla
+EOF
+--error 13
+exec $XTRABACKUP --defaults-file=$custom_cnf --backup --target-dir=$targetdir;
+--remove_file $custom_cnf
+
+--echo # Check if uknown options that follow --mysqld-args are ingored
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --mysqld-args --unknown-option;
+--rmdir $targetdir
+
+--echo # Check if [mariadb-client] group is not loaded (MDEV-22894)
+--copy_file $MYSQLTEST_VARDIR/my.cnf $custom_cnf
+--append_file $custom_cnf
+[mariadb-client]
+user=bla
+password=bla
+EOF
+exec $XTRABACKUP --defaults-file=$custom_cnf --backup --target-dir=$targetdir;
+--remove_file $custom_cnf
+--rmdir $targetdir
+
+--echo # Check if --help presents
+exec $XTRABACKUP --help;
+exec $XTRABACKUP -?;
+--enable_result_log
+
diff --git a/mysql-test/suite/mariabackup/partition_datadir.result b/mysql-test/suite/mariabackup/partition_datadir.result
index 3fc5fe30907..f00db641fea 100644
--- a/mysql-test/suite/mariabackup/partition_datadir.result
+++ b/mysql-test/suite/mariabackup/partition_datadir.result
@@ -11,7 +11,7 @@ DROP TABLE t;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/recreate_table_during_backup.result b/mysql-test/suite/mariabackup/recreate_table_during_backup.result
index 4e038fee71a..821f9301ab6 100644
--- a/mysql-test/suite/mariabackup/recreate_table_during_backup.result
+++ b/mysql-test/suite/mariabackup/recreate_table_during_backup.result
@@ -7,7 +7,7 @@ INSERT INTO t3 SELECT UUID() FROM seq_1_to_1000;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT COUNT(*) from t1;
COUNT(*)
100
diff --git a/mysql-test/suite/mariabackup/rename_during_backup.result b/mysql-test/suite/mariabackup/rename_during_backup.result
index a4cf06b7633..ba1dbec0e1b 100644
--- a/mysql-test/suite/mariabackup/rename_during_backup.result
+++ b/mysql-test/suite/mariabackup/rename_during_backup.result
@@ -18,7 +18,7 @@ INSERT INTO b1 VALUES('b1');
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
CREATE TABLE t1(i int);
DROP TABLE t1;
SELECT * from t1_renamed;
diff --git a/mysql-test/suite/mariabackup/rename_during_mdl_lock.result b/mysql-test/suite/mariabackup/rename_during_mdl_lock.result
index 3b64cdc38bc..607460f4f05 100644
--- a/mysql-test/suite/mariabackup/rename_during_mdl_lock.result
+++ b/mysql-test/suite/mariabackup/rename_during_mdl_lock.result
@@ -3,7 +3,7 @@ CREATE TABLE t1(i int) ENGINE INNODB;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
CREATE TABLE t1(i int);
DROP TABLE t1;
SELECT * from t2;
diff --git a/mysql-test/suite/mariabackup/skip_innodb.result b/mysql-test/suite/mariabackup/skip_innodb.result
index 0d56b55bf4b..859b3c56f43 100644
--- a/mysql-test/suite/mariabackup/skip_innodb.result
+++ b/mysql-test/suite/mariabackup/skip_innodb.result
@@ -3,7 +3,7 @@ INSERT INTO t VALUES(1);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * from t;
i
1
diff --git a/mysql-test/suite/mariabackup/suite.pm b/mysql-test/suite/mariabackup/suite.pm
index 14e38d16158..f0db4482156 100644
--- a/mysql-test/suite/mariabackup/suite.pm
+++ b/mysql-test/suite/mariabackup/suite.pm
@@ -7,12 +7,13 @@ use strict;
return "Not run for embedded server" if $::opt_embedded_server;
-return "No mariabackup" unless ::have_mariabackup();
+return "No mariabackup" unless $ENV{XTRABACKUP};
my $have_qpress = index(`qpress 2>&1`,"Compression") > 0;
sub skip_combinations {
my %skip;
+ $skip{'include/have_file_key_management.inc'} = 'needs file_key_management plugin' unless $ENV{FILE_KEY_MANAGEMENT_SO};
$skip{'compress_qpress.test'}= 'needs qpress executable in PATH' unless $have_qpress;
%skip;
}
diff --git a/mysql-test/suite/mariabackup/system_versioning.result b/mysql-test/suite/mariabackup/system_versioning.result
index 0e1e9253dd0..83e9cf04150 100644
--- a/mysql-test/suite/mariabackup/system_versioning.result
+++ b/mysql-test/suite/mariabackup/system_versioning.result
@@ -5,7 +5,7 @@ insert into t values (3);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
show create table t;
Table Create Table
t CREATE TABLE `t` (
@@ -30,7 +30,7 @@ insert into t values (3);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
show create table t;
Table Create Table
t CREATE TABLE `t` (
diff --git a/mysql-test/suite/mariabackup/undo_space_id.test b/mysql-test/suite/mariabackup/undo_space_id.test
index 8adeb18e5a7..e903a0ad4c5 100644
--- a/mysql-test/suite/mariabackup/undo_space_id.test
+++ b/mysql-test/suite/mariabackup/undo_space_id.test
@@ -17,7 +17,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir
list_files $basedir undo*;
--echo # xtrabackup prepare
-exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir;
+exec $XTRABACKUP --prepare --target-dir=$basedir;
--echo # Display undo log files from targer directory
list_files $basedir undo*;
diff --git a/mysql-test/suite/mariabackup/unencrypted_page_compressed.result b/mysql-test/suite/mariabackup/unencrypted_page_compressed.result
index daeb9ecf8b7..7edf66b027a 100644
--- a/mysql-test/suite/mariabackup/unencrypted_page_compressed.result
+++ b/mysql-test/suite/mariabackup/unencrypted_page_compressed.result
@@ -4,6 +4,7 @@ CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=I
insert into t1(b, c) values("mariadb", "mariabackup");
InnoDB 0 transactions not purged
# Corrupt the table
+# restart: --skip-innodb-buffer-pool-load-at-startup
# xtrabackup backup
FOUND 1 /Database page corruption detected.*/ in backup.log
drop table t1;
diff --git a/mysql-test/suite/mariabackup/xb_aws_key_management.result b/mysql-test/suite/mariabackup/xb_aws_key_management.result
index fd12344dfa0..0ca72291b1c 100644
--- a/mysql-test/suite/mariabackup/xb_aws_key_management.result
+++ b/mysql-test/suite/mariabackup/xb_aws_key_management.result
@@ -1,13 +1,10 @@
CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes;
-Warnings:
-Note 1105 AWS KMS plugin: generated encrypted datakey for key id=1, version=1
-Note 1105 AWS KMS plugin: loaded key 1, version 1, key length 128 bit
INSERT INTO t VALUES('foobar1');
# xtrabackup backup
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * from t;
c
foobar1
diff --git a/mysql-test/suite/mariabackup/xb_compressed_encrypted.result b/mysql-test/suite/mariabackup/xb_compressed_encrypted.result
index 9ba332b7ca5..22a4c151b07 100644
--- a/mysql-test/suite/mariabackup/xb_compressed_encrypted.result
+++ b/mysql-test/suite/mariabackup/xb_compressed_encrypted.result
@@ -7,7 +7,7 @@ drop table t1;
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
select sum(c1) from t1;
sum(c1)
12497500
diff --git a/mysql-test/suite/mariabackup/xb_file_key_management.result b/mysql-test/suite/mariabackup/xb_file_key_management.result
index 721d10a9d91..6cedfd2213b 100644
--- a/mysql-test/suite/mariabackup/xb_file_key_management.result
+++ b/mysql-test/suite/mariabackup/xb_file_key_management.result
@@ -8,7 +8,7 @@ INSERT INTO t VALUES('foobar2');
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
ib_logfile0
SELECT * FROM t;
c
diff --git a/mysql-test/suite/mariabackup/xb_fulltext_encrypted.result b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.result
index 01a99e59200..7c0a6451820 100644
--- a/mysql-test/suite/mariabackup/xb_fulltext_encrypted.result
+++ b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.result
@@ -10,5 +10,5 @@ FULLTEXT KEY (title)
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
drop table film_text;
diff --git a/mysql-test/suite/mariabackup/xb_fulltext_encrypted.test b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.test
index d5a5003c11a..f7b72b5ccea 100644
--- a/mysql-test/suite/mariabackup/xb_fulltext_encrypted.test
+++ b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.test
@@ -16,7 +16,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --no-timestamp $targetdir;
-exec $INNOBACKUPEX --apply-log --rebuild-indexes --rebuild-threads=2 $targetdir;
+exec $INNOBACKUPEX --apply-log $targetdir;
--source include/restart_and_restore.inc
--enable_result_log
diff --git a/mysql-test/suite/mariabackup/xb_partition.result b/mysql-test/suite/mariabackup/xb_partition.result
index f5b6ae0b24d..69896371f25 100644
--- a/mysql-test/suite/mariabackup/xb_partition.result
+++ b/mysql-test/suite/mariabackup/xb_partition.result
@@ -45,7 +45,7 @@ INSERT INTO isam_p VALUES (401), (501);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * from p;
a
201
diff --git a/mysql-test/suite/mariabackup/xb_partition.test b/mysql-test/suite/mariabackup/xb_partition.test
index e6f8c5d996f..3d027b67fc1 100644
--- a/mysql-test/suite/mariabackup/xb_partition.test
+++ b/mysql-test/suite/mariabackup/xb_partition.test
@@ -38,7 +38,7 @@ INSERT INTO isam_p VALUES (1), (101), (201), (301);
let $targetdir=$MYSQLTEST_VARDIR/tmp;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --no-timestamp --backup --target-dir=$targetdir/full;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir/full;
--enable_result_log
DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/xb_rocksdb.result b/mysql-test/suite/mariabackup/xb_rocksdb.result
index 84476eeaba0..fafa4925e93 100644
--- a/mysql-test/suite/mariabackup/xb_rocksdb.result
+++ b/mysql-test/suite/mariabackup/xb_rocksdb.result
@@ -6,7 +6,7 @@ INSERT INTO t VALUES(2);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
@@ -16,6 +16,7 @@ i
# remove datadir
# xtrabackup move back
# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/xb_rocksdb_datadir.result b/mysql-test/suite/mariabackup/xb_rocksdb_datadir.result
index 9227198cbec..76130c2f041 100644
--- a/mysql-test/suite/mariabackup/xb_rocksdb_datadir.result
+++ b/mysql-test/suite/mariabackup/xb_rocksdb_datadir.result
@@ -3,6 +3,7 @@ INSERT INTO t VALUES(1);
# xtrabackup backup
INSERT INTO t VALUES(2);
# xtrabackup prepare
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/xb_rocksdb_datadir_debug.result b/mysql-test/suite/mariabackup/xb_rocksdb_datadir_debug.result
index 9227198cbec..76130c2f041 100644
--- a/mysql-test/suite/mariabackup/xb_rocksdb_datadir_debug.result
+++ b/mysql-test/suite/mariabackup/xb_rocksdb_datadir_debug.result
@@ -3,6 +3,7 @@ INSERT INTO t VALUES(1);
# xtrabackup backup
INSERT INTO t VALUES(2);
# xtrabackup prepare
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/mariabackup/xbstream.result b/mysql-test/suite/mariabackup/xbstream.result
index f340fedb861..93f68eca9ef 100644
--- a/mysql-test/suite/mariabackup/xbstream.result
+++ b/mysql-test/suite/mariabackup/xbstream.result
@@ -6,7 +6,7 @@ INSERT INTO t VALUES(1);
# shutdown server
# remove datadir
# xtrabackup move back
-# restart server
+# restart
SELECT * FROM t;
i
1
diff --git a/mysql-test/suite/multi_source/gtid_ignore_duplicates.result b/mysql-test/suite/multi_source/gtid_ignore_duplicates.result
index 96627b42c97..e142ff8b981 100644
--- a/mysql-test/suite/multi_source/gtid_ignore_duplicates.result
+++ b/mysql-test/suite/multi_source/gtid_ignore_duplicates.result
@@ -492,21 +492,21 @@ SET GLOBAL slave_parallel_threads= @old_parallel;
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
connection server_1;
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
include/reset_master_slave.inc
disconnect server_1;
connection server_2;
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
include/reset_master_slave.inc
disconnect server_2;
connection server_3;
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
include/reset_master_slave.inc
disconnect server_3;
connection server_4;
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
include/reset_master_slave.inc
disconnect server_4;
diff --git a/mysql-test/suite/multi_source/gtid_ignore_duplicates.test b/mysql-test/suite/multi_source/gtid_ignore_duplicates.test
index b61da0f0f33..3d2d151bd0d 100644
--- a/mysql-test/suite/multi_source/gtid_ignore_duplicates.test
+++ b/mysql-test/suite/multi_source/gtid_ignore_duplicates.test
@@ -432,24 +432,24 @@ SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
--connection server_1
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_1
--connection server_2
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_2
--connection server_3
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_3
--connection server_4
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_4
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
index f5554563a18..40f505d8260 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
@@ -245,7 +245,7 @@ UNLOCK TABLES;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ;
+select * from `table5` where (col2 <= '6566-06-15' AND (col24 < 'd' or col24 > 'd')) group by `col83` order by `col83` desc ;
col0 col1 col2 col3 col4 col5 col6 col7 col8 col9 col10 col11 col12 col13 col14 col15 col16 col17 col18 col19 col20 col21 col22 col23 col24 col25 col26 col27 col28 col29 col30 col31 col32 col33 col34 col35 col36 col37 col38 col39 col40 col41 col42 col43 col44 col45 col46 col47 col48 col49 col50 col51 col52 col53 col54 col55 col56 col57 col58 col59 col60 col61 col62 col63 col64 col65 col66 col67 col68 col69 col70 col71 col72 col73 col74 col75 col76 col77 col78 col79 col80 col81 col82 col83 col84 col85 col86 col87 col88 col89 col90 col91 col92 col93 col94 col95 col96 col97 col98 col99 col100 col101 col102 col103 col104 col105 col106 col107 col108 col109 col110 col111 col112 col113 col114 col115 col116 col117 col118 col119 col120 col121 col122 col123 col124 col125 col126 col127 col128 col129 col130 col131 col132 col133 col134 col135 col136 col137 col138 col139 col140 col141 col142 col143 col144 col145 col146 col147 col148 col149 col150 col151 col152 col153 col154 col155 col156 col157 col158 col159 col160 col161 col162 col163 col164 col165 col166 col167 col168 col169 col170 col171 col172 col173 col174 col175
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'd'
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
index d59e9e1fbeb..9e8e5c4b3cd 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
@@ -242,9 +242,9 @@ UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-#explain select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ;
+#explain select * from `table5` where (col2 <= '6566-06-15' AND (col24 < 'd' or col24 > 'd') group by `col83` order by `col83` desc ;
-select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ;
+select * from `table5` where (col2 <= '6566-06-15' AND (col24 < 'd' or col24 > 'd')) group by `col83` order by `col83` desc ;
drop table `table5`;
SET debug_dbug= @saved_dbug;
diff --git a/mysql-test/suite/parts/r/optimizer.result b/mysql-test/suite/parts/r/optimizer.result
index 465c6c7d762..42d85dbbd39 100644
--- a/mysql-test/suite/parts/r/optimizer.result
+++ b/mysql-test/suite/parts/r/optimizer.result
@@ -25,7 +25,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 5 NULL 2 Using where; Using index for group-by
+1 SIMPLE t2 range a a 5 NULL 2 Using where; Using index
FLUSH status;
SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
a MAX(b)
@@ -41,5 +41,5 @@ a MAX(b)
# Should be no more than 4 reads.
SHOW status LIKE 'handler_read_key';
Variable_name Value
-Handler_read_key 4
+Handler_read_key 2
DROP TABLE t1, t2;
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
index 5f3610b7999..0e8db677cdf 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
@@ -517,6 +517,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1009,6 +1010,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1516,6 +1518,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2017,6 +2020,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2516,6 +2520,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3026,6 +3031,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3538,6 +3544,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4038,6 +4045,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4531,6 +4539,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5023,6 +5032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5530,6 +5540,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6031,6 +6042,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6530,6 +6542,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7040,6 +7053,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7552,6 +7566,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8052,6 +8067,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8562,6 +8578,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9070,6 +9087,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9593,6 +9611,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10110,6 +10129,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10625,6 +10645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11151,6 +11172,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11679,6 +11701,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12195,6 +12218,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12704,6 +12728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13212,6 +13237,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13735,6 +13761,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14252,6 +14279,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14767,6 +14795,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15293,6 +15322,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15821,6 +15851,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16337,6 +16368,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16832,6 +16864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17325,6 +17358,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17833,6 +17867,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18335,6 +18370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18835,6 +18871,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19346,6 +19383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19859,6 +19897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20360,6 +20399,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20854,6 +20894,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21347,6 +21388,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21855,6 +21897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22357,6 +22400,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22857,6 +22901,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23368,6 +23413,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23881,6 +23927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24382,6 +24429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24876,6 +24924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25369,6 +25418,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25877,6 +25927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26379,6 +26430,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26879,6 +26931,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27390,6 +27443,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27903,6 +27957,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28404,6 +28459,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
index ce3dd51496e..0f12c15e4e9 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
@@ -543,6 +543,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1066,6 +1067,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1610,6 +1612,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2144,6 +2147,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2680,6 +2684,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3227,6 +3232,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3776,6 +3782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4315,6 +4322,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4833,6 +4841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5356,6 +5365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5900,6 +5910,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6434,6 +6445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6970,6 +6982,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7517,6 +7530,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8066,6 +8080,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8605,6 +8620,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
index 12f028782ed..919e6344615 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
@@ -835,6 +835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1327,6 +1328,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1834,6 +1836,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2335,6 +2338,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2836,6 +2840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3346,6 +3351,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3858,6 +3864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4358,6 +4365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4851,6 +4859,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5343,6 +5352,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5850,6 +5860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6351,6 +6362,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6852,6 +6864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7362,6 +7375,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7874,6 +7888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8374,6 +8389,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8884,6 +8900,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9392,6 +9409,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9915,6 +9933,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10432,6 +10451,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10949,6 +10969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11475,6 +11496,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12003,6 +12025,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12519,6 +12542,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13028,6 +13052,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13536,6 +13561,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14059,6 +14085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14576,6 +14603,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15093,6 +15121,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15619,6 +15648,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16147,6 +16177,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16663,6 +16694,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
index a276e1593ee..05176399246 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
@@ -702,6 +702,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1225,6 +1226,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1769,6 +1771,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2303,6 +2306,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2841,6 +2845,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3388,6 +3393,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3937,6 +3943,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4476,6 +4483,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4994,6 +5002,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5517,6 +5526,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6061,6 +6071,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6595,6 +6606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7133,6 +7145,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7680,6 +7693,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8229,6 +8243,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8768,6 +8783,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
index 36823665fa1..3f720024f72 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
@@ -464,6 +464,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -904,6 +905,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1359,6 +1361,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1808,6 +1811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2257,6 +2261,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2715,6 +2720,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3175,6 +3181,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3623,6 +3630,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4064,6 +4072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4504,6 +4513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4959,6 +4969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5408,6 +5419,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5857,6 +5869,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6315,6 +6328,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6775,6 +6789,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7223,6 +7238,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7680,6 +7696,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8136,6 +8153,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8607,6 +8625,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9072,6 +9091,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9537,6 +9557,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10011,6 +10032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10487,6 +10509,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10951,6 +10974,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11396,6 +11420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11836,6 +11861,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12291,6 +12317,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12740,6 +12767,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13187,6 +13215,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13645,6 +13674,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14105,6 +14135,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14553,6 +14584,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14994,6 +15026,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15434,6 +15467,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15889,6 +15923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16338,6 +16373,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16785,6 +16821,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17243,6 +17280,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17703,6 +17741,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18151,6 +18190,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18609,6 +18649,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19065,6 +19106,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19536,6 +19578,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20001,6 +20044,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20464,6 +20508,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20938,6 +20983,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21414,6 +21460,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21878,6 +21925,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22335,6 +22383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22791,6 +22840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23262,6 +23312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23727,6 +23778,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24190,6 +24242,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24664,6 +24717,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25140,6 +25194,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25604,6 +25659,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26046,6 +26102,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26486,6 +26543,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26941,6 +26999,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27390,6 +27449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27837,6 +27897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28295,6 +28356,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28755,6 +28817,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29203,6 +29266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29644,6 +29708,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30084,6 +30149,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30539,6 +30605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30988,6 +31055,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31435,6 +31503,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31893,6 +31962,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32353,6 +32423,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32801,6 +32872,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33258,6 +33330,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33714,6 +33787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34185,6 +34259,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34650,6 +34725,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35113,6 +35189,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35587,6 +35664,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36063,6 +36141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36527,6 +36606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
index b4e1ddc577b..ba6a7e7fbbd 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
@@ -489,6 +489,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -960,6 +961,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1452,6 +1454,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1934,6 +1937,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2420,6 +2424,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2915,6 +2920,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3412,6 +3418,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3899,6 +3906,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4369,6 +4377,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4840,6 +4849,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5332,6 +5342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5814,6 +5825,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6298,6 +6310,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6793,6 +6806,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7290,6 +7304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7777,6 +7792,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8243,6 +8259,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8714,6 +8731,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9206,6 +9224,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9688,6 +9707,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10172,6 +10192,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10667,6 +10688,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11164,6 +11186,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11651,6 +11674,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12117,6 +12141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12588,6 +12613,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13080,6 +13106,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13562,6 +13589,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14046,6 +14074,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14541,6 +14570,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15038,6 +15068,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15525,6 +15556,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
index 586b24e4049..ff7d659613d 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
@@ -481,6 +481,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -937,6 +938,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1408,6 +1410,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1873,6 +1876,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2338,6 +2342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2812,6 +2817,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3288,6 +3294,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3752,6 +3759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4248,6 +4256,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4742,6 +4751,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5251,6 +5261,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5754,6 +5765,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6257,6 +6269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6769,6 +6782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7283,6 +7297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7785,6 +7800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8280,6 +8296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8774,6 +8791,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9283,6 +9301,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9786,6 +9805,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10289,6 +10309,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10801,6 +10822,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11315,6 +11337,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11817,6 +11840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12327,6 +12351,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12835,6 +12860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13358,6 +13384,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13875,6 +13902,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14392,6 +14420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14918,6 +14947,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15446,6 +15476,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15962,6 +15993,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16471,6 +16503,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16979,6 +17012,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17502,6 +17536,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18019,6 +18054,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18536,6 +18572,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19062,6 +19099,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19590,6 +19628,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20106,6 +20145,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
index 5a71f1063f5..a537b74201d 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
@@ -477,6 +477,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -933,6 +934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1404,6 +1406,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1869,6 +1872,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2332,6 +2336,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2806,6 +2811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3282,6 +3288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3746,6 +3753,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4243,6 +4251,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4738,6 +4747,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5248,6 +5258,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5752,6 +5763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6254,6 +6266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6767,6 +6780,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7282,6 +7296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7785,6 +7800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8281,6 +8297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8776,6 +8793,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9286,6 +9304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9790,6 +9809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10292,6 +10312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10805,6 +10826,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11320,6 +11342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11823,6 +11846,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12333,6 +12357,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12841,6 +12866,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13364,6 +13390,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13881,6 +13908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14396,6 +14424,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14922,6 +14951,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15450,6 +15480,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15966,6 +15997,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16475,6 +16507,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16983,6 +17016,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17506,6 +17540,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18023,6 +18058,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18538,6 +18574,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19064,6 +19101,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19592,6 +19630,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20108,6 +20147,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_maria.result b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
index 7196be3a602..0af69f09639 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
@@ -491,6 +491,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -962,6 +963,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1454,6 +1456,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1936,6 +1939,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2422,6 +2426,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2917,6 +2922,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3414,6 +3420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3901,6 +3908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4420,6 +4428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4943,6 +4952,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5487,6 +5497,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6021,6 +6032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6559,6 +6571,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7106,6 +7119,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7655,6 +7669,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8194,6 +8209,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8712,6 +8728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9235,6 +9252,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9779,6 +9797,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10313,6 +10332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10851,6 +10871,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11398,6 +11419,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11947,6 +11969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12486,6 +12509,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12957,6 +12981,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13428,6 +13453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13920,6 +13946,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14402,6 +14429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14886,6 +14914,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15381,6 +15410,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15878,6 +15908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16365,6 +16396,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16884,6 +16916,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17407,6 +17440,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17951,6 +17985,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18485,6 +18520,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19021,6 +19057,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19568,6 +19605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20117,6 +20155,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20656,6 +20695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21174,6 +21214,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21697,6 +21738,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22241,6 +22283,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22775,6 +22818,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23311,6 +23355,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23858,6 +23903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24407,6 +24453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24946,6 +24993,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
index 59039b97f65..60cb5a2e733 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
@@ -491,6 +491,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -962,6 +963,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1454,6 +1456,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1936,6 +1939,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2422,6 +2426,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2917,6 +2922,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3414,6 +3420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3901,6 +3908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4420,6 +4428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4943,6 +4952,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5487,6 +5497,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6021,6 +6032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6559,6 +6571,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7106,6 +7119,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7655,6 +7669,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8194,6 +8209,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8712,6 +8728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9235,6 +9252,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9779,6 +9797,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10313,6 +10332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10851,6 +10871,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11398,6 +11419,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11947,6 +11969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12486,6 +12509,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12957,6 +12981,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13428,6 +13453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13920,6 +13946,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14402,6 +14429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14886,6 +14914,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15381,6 +15410,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15878,6 +15908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16365,6 +16396,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16884,6 +16916,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17407,6 +17440,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17951,6 +17985,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18485,6 +18520,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19021,6 +19057,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19568,6 +19605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20117,6 +20155,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20656,6 +20695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21174,6 +21214,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21697,6 +21738,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22241,6 +22283,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22775,6 +22818,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23311,6 +23355,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23858,6 +23903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24407,6 +24453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24946,6 +24993,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
index 1d90f8f6368..d0d4e1602fd 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
@@ -483,6 +483,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -941,6 +942,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1414,6 +1416,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1879,6 +1882,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2346,6 +2350,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2820,6 +2825,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3298,6 +3304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3764,6 +3771,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4261,6 +4269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4757,6 +4766,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5268,6 +5278,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5771,6 +5782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6276,6 +6288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6788,6 +6801,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7304,6 +7318,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7808,6 +7823,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8305,6 +8321,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8801,6 +8818,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9312,6 +9330,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9815,6 +9834,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10320,6 +10340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10832,6 +10853,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11348,6 +11370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11852,6 +11875,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12364,6 +12388,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12874,6 +12899,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13399,6 +13425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13916,6 +13943,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14435,6 +14463,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14961,6 +14990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15491,6 +15521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16009,6 +16040,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16520,6 +16552,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17030,6 +17063,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17555,6 +17589,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18072,6 +18107,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18591,6 +18627,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19117,6 +19154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19647,6 +19685,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20165,6 +20204,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
index 4b0a481340f..4332588fda7 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
@@ -479,6 +479,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -938,6 +939,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1412,6 +1414,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1882,6 +1885,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2350,6 +2354,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2829,6 +2834,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3308,6 +3314,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3775,6 +3782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4275,6 +4283,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4773,6 +4782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5286,6 +5296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5795,6 +5806,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6302,6 +6314,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6820,6 +6833,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7338,6 +7352,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7844,6 +7859,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8343,6 +8359,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8841,6 +8858,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9354,6 +9372,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9863,6 +9882,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10370,6 +10390,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10888,6 +10909,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11406,6 +11428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11912,6 +11935,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12425,6 +12449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12936,6 +12961,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13462,6 +13488,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13984,6 +14011,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14504,6 +14532,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15035,6 +15064,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15566,6 +15596,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16085,6 +16116,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16597,6 +16629,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17108,6 +17141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17634,6 +17668,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18156,6 +18191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18676,6 +18712,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19207,6 +19244,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19738,6 +19776,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20257,6 +20296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_maria.result b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
index 66d5770e20e..9cc64b8239b 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
@@ -493,6 +493,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -966,6 +967,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1460,6 +1462,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1942,6 +1945,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2430,6 +2434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2925,6 +2930,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3424,6 +3430,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3913,6 +3920,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4434,6 +4442,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4959,6 +4968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5505,6 +5515,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6039,6 +6050,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6579,6 +6591,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7126,6 +7139,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7677,6 +7691,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8218,6 +8233,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8738,6 +8754,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9263,6 +9280,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9809,6 +9827,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10343,6 +10362,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10883,6 +10903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11430,6 +11451,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11981,6 +12003,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12522,6 +12545,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12995,6 +13019,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13469,6 +13494,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13964,6 +13990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14451,6 +14478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14940,6 +14968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15440,6 +15469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15940,6 +15970,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16430,6 +16461,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16952,6 +16984,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17478,6 +17511,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18025,6 +18059,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18564,6 +18599,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19105,6 +19141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19657,6 +19694,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20209,6 +20247,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20751,6 +20790,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21272,6 +21312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21798,6 +21839,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22345,6 +22387,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22884,6 +22927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23425,6 +23469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23977,6 +24022,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24529,6 +24575,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25071,6 +25118,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
index 69548fdb94b..32a840c1577 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
@@ -493,6 +493,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -966,6 +967,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1460,6 +1462,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1942,6 +1945,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2430,6 +2434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2925,6 +2930,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3424,6 +3430,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3913,6 +3920,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4434,6 +4442,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4959,6 +4968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5505,6 +5515,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6039,6 +6050,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6579,6 +6591,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7126,6 +7139,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7677,6 +7691,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8218,6 +8233,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8738,6 +8754,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9263,6 +9280,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9809,6 +9827,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10343,6 +10362,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10883,6 +10903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11430,6 +11451,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11981,6 +12003,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12522,6 +12545,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12995,6 +13019,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13469,6 +13494,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13964,6 +13990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14451,6 +14478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14940,6 +14968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15440,6 +15469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15940,6 +15970,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16430,6 +16461,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16952,6 +16984,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17478,6 +17511,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18025,6 +18059,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18564,6 +18599,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19105,6 +19141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19657,6 +19694,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20209,6 +20247,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20751,6 +20790,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21272,6 +21312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21798,6 +21839,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22345,6 +22387,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22884,6 +22927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23425,6 +23469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23977,6 +24022,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24529,6 +24575,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25071,6 +25118,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter4_innodb.result b/mysql-test/suite/parts/r/partition_alter4_innodb.result
index 644a5f32f84..d88bdfcbe00 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -60,6 +60,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -483,6 +484,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -519,6 +521,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -945,6 +948,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -989,6 +993,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1418,6 +1423,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1460,6 +1466,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1885,6 +1892,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1925,6 +1933,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2352,6 +2361,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2396,6 +2406,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2828,6 +2839,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2872,6 +2884,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3306,6 +3319,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3346,6 +3360,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3772,6 +3787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3810,6 +3826,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4233,6 +4250,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4269,6 +4287,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4695,6 +4714,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4739,6 +4759,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5168,6 +5189,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5210,6 +5232,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5635,6 +5658,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5675,6 +5699,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6102,6 +6127,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6146,6 +6172,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6578,6 +6605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6622,6 +6650,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7056,6 +7085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7096,6 +7126,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7522,6 +7553,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7983,6 +8015,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8445,6 +8478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8918,6 +8952,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9385,6 +9420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9852,6 +9888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10328,6 +10365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10806,6 +10844,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11272,6 +11311,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11733,6 +11773,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12195,6 +12236,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12668,6 +12710,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13135,6 +13178,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13602,6 +13646,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14078,6 +14123,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14556,6 +14602,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15022,6 +15069,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15060,6 +15108,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15483,6 +15532,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15519,6 +15569,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15945,6 +15996,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15989,6 +16041,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16418,6 +16471,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16460,6 +16514,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16885,6 +16940,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16925,6 +16981,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17352,6 +17409,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17396,6 +17454,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17828,6 +17887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17872,6 +17932,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18306,6 +18367,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18346,6 +18408,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18772,6 +18835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19236,6 +19300,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19698,6 +19763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20171,6 +20237,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20638,6 +20705,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21105,6 +21173,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21581,6 +21650,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22059,6 +22129,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22525,6 +22596,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22986,6 +23058,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23448,6 +23521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23921,6 +23995,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24388,6 +24463,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24855,6 +24931,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25331,6 +25408,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25809,6 +25887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26275,6 +26354,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26736,6 +26816,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27198,6 +27279,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27671,6 +27753,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28138,6 +28221,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28605,6 +28689,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29081,6 +29166,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29559,6 +29645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30025,6 +30112,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30486,6 +30574,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30948,6 +31037,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31421,6 +31511,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31888,6 +31979,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32355,6 +32447,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32831,6 +32924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33309,6 +33403,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33775,6 +33870,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34236,6 +34332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34698,6 +34795,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35171,6 +35269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35638,6 +35737,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36105,6 +36205,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36581,6 +36682,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37059,6 +37161,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37525,6 +37628,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37990,6 +38094,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38453,6 +38558,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38927,6 +39033,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39395,6 +39502,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39863,6 +39971,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40340,6 +40449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40819,6 +40929,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41286,6 +41397,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41748,6 +41860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42211,6 +42324,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42685,6 +42799,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43153,6 +43268,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43621,6 +43737,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44098,6 +44215,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44577,6 +44695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45044,6 +45163,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45505,6 +45625,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45967,6 +46088,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46440,6 +46562,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46907,6 +47030,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47374,6 +47498,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47850,6 +47975,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48328,6 +48454,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48794,6 +48921,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49255,6 +49383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49717,6 +49846,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50190,6 +50320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50657,6 +50788,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51124,6 +51256,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51600,6 +51733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52078,6 +52212,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52544,6 +52679,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53006,6 +53142,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53469,6 +53606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53943,6 +54081,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54411,6 +54550,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54879,6 +55019,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55356,6 +55497,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55835,6 +55977,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56302,6 +56445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56764,6 +56908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57224,6 +57369,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57695,6 +57841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58160,6 +58307,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58625,6 +58773,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59099,6 +59248,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59575,6 +59725,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60039,6 +60190,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60498,6 +60650,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60958,6 +61111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61429,6 +61583,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61894,6 +62049,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62359,6 +62515,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62833,6 +62990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63309,6 +63467,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63773,6 +63932,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -64552,6 +64712,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65012,6 +65173,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65483,6 +65645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65948,6 +66111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66413,6 +66577,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66887,6 +67052,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67363,6 +67529,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67827,6 +67994,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68291,6 +68459,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68753,6 +68922,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69226,6 +69396,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69693,6 +69864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70160,6 +70332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70636,6 +70809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71114,6 +71288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71580,6 +71755,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72041,6 +72217,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72503,6 +72680,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72976,6 +73154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73443,6 +73622,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73910,6 +74090,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74386,6 +74567,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74864,6 +75046,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75330,6 +75513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75791,6 +75975,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76253,6 +76438,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76726,6 +76912,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77193,6 +77380,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77660,6 +77848,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78136,6 +78325,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78614,6 +78804,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79080,6 +79271,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79541,6 +79733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80003,6 +80196,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80476,6 +80670,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80943,6 +81138,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81410,6 +81606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81886,6 +82083,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82364,6 +82562,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82830,6 +83029,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83291,6 +83491,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83753,6 +83954,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84226,6 +84428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84693,6 +84896,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85160,6 +85364,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85636,6 +85841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86114,6 +86320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86580,6 +86787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87039,6 +87247,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87493,6 +87702,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87955,6 +88165,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88415,6 +88626,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88873,6 +89085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89335,6 +89548,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89797,6 +90011,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -90255,6 +90470,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter4_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index 41723a268e1..90edd1b2210 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -60,6 +60,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -493,6 +494,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -528,6 +530,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -970,6 +973,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1013,6 +1017,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1464,6 +1469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1505,6 +1511,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1948,6 +1955,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1987,6 +1995,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2436,6 +2445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2479,6 +2489,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2933,6 +2944,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2976,6 +2988,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3432,6 +3445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3471,6 +3485,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3921,6 +3936,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3958,6 +3974,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4391,6 +4408,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4426,6 +4444,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4868,6 +4887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4911,6 +4931,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5362,6 +5383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5403,6 +5425,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5846,6 +5869,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5885,6 +5909,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6334,6 +6359,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6377,6 +6403,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6831,6 +6858,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6874,6 +6902,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7330,6 +7359,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7369,6 +7399,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7819,6 +7850,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8289,6 +8321,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8766,6 +8799,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9260,6 +9294,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9744,6 +9779,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10232,6 +10268,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10729,6 +10766,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11228,6 +11266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11717,6 +11756,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12187,6 +12227,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12664,6 +12705,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13158,6 +13200,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13642,6 +13685,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14130,6 +14174,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14627,6 +14672,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15126,6 +15172,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15615,6 +15662,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15652,6 +15700,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16085,6 +16134,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16120,6 +16170,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16562,6 +16613,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16605,6 +16657,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17056,6 +17109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17097,6 +17151,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17540,6 +17595,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17579,6 +17635,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18028,6 +18085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18071,6 +18129,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18525,6 +18584,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18568,6 +18628,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -19024,6 +19085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19063,6 +19125,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -19513,6 +19576,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19986,6 +20050,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20463,6 +20528,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20957,6 +21023,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21441,6 +21508,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21929,6 +21997,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22426,6 +22495,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22925,6 +22995,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23414,6 +23485,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23884,6 +23956,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24361,6 +24434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24855,6 +24929,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25339,6 +25414,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25827,6 +25903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26324,6 +26401,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26823,6 +26901,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27312,6 +27391,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27782,6 +27862,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28259,6 +28340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28753,6 +28835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29237,6 +29320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29725,6 +29809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30222,6 +30307,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30721,6 +30807,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31210,6 +31297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31680,6 +31768,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32157,6 +32246,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32651,6 +32741,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33135,6 +33226,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33623,6 +33715,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34120,6 +34213,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34619,6 +34713,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35108,6 +35203,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35578,6 +35674,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36055,6 +36152,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36549,6 +36647,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37033,6 +37132,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37521,6 +37621,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38018,6 +38119,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38517,6 +38619,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39006,6 +39109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39479,6 +39583,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39956,6 +40061,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40450,6 +40556,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40934,6 +41041,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41422,6 +41530,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41919,6 +42028,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42418,6 +42528,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42907,6 +43018,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43377,6 +43489,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43854,6 +43967,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44348,6 +44462,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44832,6 +44947,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45320,6 +45436,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45817,6 +45934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46316,6 +46434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46805,6 +46924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47275,6 +47395,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47752,6 +47873,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48246,6 +48368,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48730,6 +48853,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49218,6 +49342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49715,6 +49840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50214,6 +50340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50703,6 +50830,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51173,6 +51301,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51650,6 +51779,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52144,6 +52274,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52628,6 +52759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53116,6 +53248,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53613,6 +53746,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54112,6 +54246,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54601,6 +54736,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55071,6 +55207,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55548,6 +55685,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56042,6 +56180,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56526,6 +56665,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57014,6 +57154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57511,6 +57652,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58010,6 +58152,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58499,6 +58642,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58970,6 +59114,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59445,6 +59590,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59937,6 +60083,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60419,6 +60566,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60905,6 +61053,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61400,6 +61549,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61897,6 +62047,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62384,6 +62535,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62852,6 +63004,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63327,6 +63480,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63819,6 +63973,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -64301,6 +64456,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -64787,6 +64943,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65282,6 +65439,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65779,6 +65937,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66266,6 +66425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67054,6 +67214,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67529,6 +67690,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68021,6 +68183,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68503,6 +68666,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68989,6 +69153,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69484,6 +69649,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69981,6 +70147,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70468,6 +70635,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70941,6 +71109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71418,6 +71587,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71912,6 +72082,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72396,6 +72567,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72884,6 +73056,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73381,6 +73554,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73880,6 +74054,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74369,6 +74544,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74839,6 +75015,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75316,6 +75493,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75810,6 +75988,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76294,6 +76473,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76782,6 +76962,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77279,6 +77460,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77778,6 +77960,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78267,6 +78450,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78737,6 +78921,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79214,6 +79399,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79708,6 +79894,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80192,6 +80379,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80680,6 +80868,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81177,6 +81366,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81676,6 +81866,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82165,6 +82356,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82635,6 +82827,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83112,6 +83305,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83606,6 +83800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84090,6 +84285,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84578,6 +84774,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85075,6 +85272,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85574,6 +85772,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86063,6 +86262,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86533,6 +86733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87010,6 +87211,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87504,6 +87706,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87988,6 +88191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88476,6 +88680,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88973,6 +89178,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89472,6 +89678,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89961,6 +90168,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -90426,6 +90634,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -90886,6 +91095,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -91354,6 +91564,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -91820,6 +92031,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -92284,6 +92496,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -92752,6 +92965,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -93220,6 +93434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -93684,6 +93899,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter_instant.result b/mysql-test/suite/parts/r/partition_alter_instant.result
new file mode 100644
index 00000000000..e5ef57db992
--- /dev/null
+++ b/mysql-test/suite/parts/r/partition_alter_instant.result
@@ -0,0 +1,34 @@
+CREATE TABLE t1 (
+id INT NOT NULL,
+name VARCHAR(30))ENGINE=InnoDB ROW_FORMAT=COMPACT CHARACTER SET=latin1
+PARTITION BY RANGE (id) (
+PARTITION p0 VALUES LESS THAN (50),
+PARTITION p1 VALUES LESS THAN (MAXVALUE)
+);
+INSERT INTO t1(id, name) VALUES(16, 'Me'), (337, 'ROFL');
+# Add and drop 31 Instant columns
+CREATE TABLE t2 LIKE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `name` varchar(30) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+ PARTITION BY RANGE (`id`)
+(PARTITION `p0` VALUES LESS THAN (50) ENGINE = InnoDB,
+ PARTITION `p1` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
+ALTER TABLE t2 REMOVE PARTITIONING;
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `name` varchar(30) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SET ALTER_ALGORITHM=INSTANT;
+ALTER TABLE t1 ADD COLUMN col1 VARCHAR(255) NOT NULL DEFAULT repeat('a', 255);
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+SET ALTER_ALGORITHM=INPLACE;
+ALTER TABLE t1 ADD COLUMN col1 VARCHAR(255) NOT NULL DEFAULT repeat('a', 255);
+DROP TABLE t1, t2;
+SET ALTER_ALGORITHM=DEFAULT;
diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result
index 570a30bcd81..5ea1f98ddcb 100644
--- a/mysql-test/suite/parts/r/partition_basic_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_innodb.result
@@ -486,6 +486,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -946,6 +947,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1424,6 +1426,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1894,6 +1897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2366,6 +2370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2847,6 +2852,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3334,6 +3340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3806,6 +3813,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4265,6 +4273,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4725,6 +4734,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5203,6 +5213,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5673,6 +5684,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6143,6 +6155,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6624,6 +6637,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7107,6 +7121,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7579,6 +7594,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8079,6 +8095,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8576,6 +8593,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9091,6 +9109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9598,6 +9617,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10107,6 +10127,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10625,6 +10646,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11149,6 +11171,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11658,6 +11681,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12153,6 +12177,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12650,6 +12675,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13165,6 +13191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13672,6 +13699,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14181,6 +14209,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14699,6 +14728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15223,6 +15253,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15732,6 +15763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16243,6 +16275,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16756,6 +16789,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17287,6 +17321,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17810,6 +17845,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18335,6 +18371,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18869,6 +18906,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19409,6 +19447,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19934,6 +19973,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20434,6 +20474,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20931,6 +20972,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21446,6 +21488,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21953,6 +21996,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22460,6 +22504,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22978,6 +23023,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23498,6 +23544,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24007,6 +24054,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24502,6 +24550,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24999,6 +25048,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25514,6 +25564,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26021,6 +26072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26528,6 +26580,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27046,6 +27099,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27566,6 +27620,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28075,6 +28130,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28586,6 +28642,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29099,6 +29156,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29630,6 +29688,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30153,6 +30212,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30676,6 +30736,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31210,6 +31271,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31746,6 +31808,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32271,6 +32334,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result
index 3b84c0295f2..06bf043b382 100644
--- a/mysql-test/suite/parts/r/partition_basic_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_myisam.result
@@ -490,6 +490,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -956,6 +957,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1443,6 +1445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1920,6 +1923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2401,6 +2405,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2891,6 +2896,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3387,6 +3393,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3869,6 +3876,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4331,6 +4339,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4797,6 +4806,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5284,6 +5294,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5761,6 +5772,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6240,6 +6252,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6730,6 +6743,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7222,6 +7236,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7704,6 +7719,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8223,6 +8239,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8742,6 +8759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9282,6 +9300,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9812,6 +9831,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10346,6 +10366,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10889,6 +10910,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11438,6 +11460,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11973,6 +11996,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12492,6 +12516,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13011,6 +13036,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13551,6 +13577,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14081,6 +14108,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14613,6 +14641,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15156,6 +15185,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15701,6 +15731,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16236,6 +16267,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
index 5e59c8f08ba..df141a93033 100644
--- a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
@@ -505,6 +505,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1000,6 +1001,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1511,6 +1513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2012,6 +2015,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2517,6 +2521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3027,6 +3032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3559,6 +3565,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4065,6 +4072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4538,6 +4546,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5033,6 +5042,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5544,6 +5554,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6045,6 +6056,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6548,6 +6560,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7058,6 +7071,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7590,6 +7604,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8096,6 +8111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8626,6 +8642,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9174,6 +9191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9738,6 +9756,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10292,6 +10311,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10850,6 +10870,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11413,6 +11434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11998,6 +12020,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12557,6 +12580,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13087,6 +13111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13635,6 +13660,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14199,6 +14225,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14753,6 +14780,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15309,6 +15337,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15872,6 +15901,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16457,6 +16487,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17016,6 +17047,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17540,6 +17572,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18078,6 +18111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18635,6 +18669,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19177,6 +19212,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19723,6 +19759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20279,6 +20316,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20830,6 +20868,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result
index 002fe90c78a..38221951ae8 100644
--- a/mysql-test/suite/parts/r/partition_engine_innodb.result
+++ b/mysql-test/suite/parts/r/partition_engine_innodb.result
@@ -475,6 +475,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -933,6 +934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1395,6 +1397,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1920,6 +1923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2421,6 +2425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2883,6 +2888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3342,6 +3348,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3804,6 +3811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4269,6 +4277,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4723,6 +4732,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5178,6 +5188,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result
index f940b250c19..683729fa2f3 100644
--- a/mysql-test/suite/parts/r/partition_engine_myisam.result
+++ b/mysql-test/suite/parts/r/partition_engine_myisam.result
@@ -485,6 +485,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -952,6 +953,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1427,6 +1429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1965,6 +1968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2479,6 +2483,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2954,6 +2959,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3422,6 +3428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3897,6 +3904,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4375,6 +4383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4836,6 +4845,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5300,6 +5310,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
index 88469a339ad..023195e9760 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
@@ -1020,6 +1020,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
index 585bd24dca6..0b5f96696b0 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
@@ -1020,6 +1020,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
index 59181388bd0..8461d4136e0 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
@@ -1020,6 +1020,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
index c4d63f663e1..4c541d9467e 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
index d29dfd343a6..8f934506ee2 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
index f26b975b75e..47e07ecc3a6 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
index a1dad1b34b3..6cd4c4991b7 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
index 88f59da8f13..d1b7a599923 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
index a498d4667b1..ad83e95929a 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result
index 4b9e3f5c283..151ff802a82 100644
--- a/mysql-test/suite/parts/r/partition_recover_myisam.result
+++ b/mysql-test/suite/parts/r/partition_recover_myisam.result
@@ -18,10 +18,10 @@ a
11
Warnings:
Error 145 Table 't1_will_crash' is marked as crashed and should be repaired
-Error 1034 1 client is using or hasn't closed the table properly
+Warning 1034 1 client is using or hasn't closed the table properly
Error 1034 Size of indexfile is: 1024 Should be: 2048
-Error 1034 Size of datafile is: 77 Should be: 7
-Error 1034 Number of rows changed from 1 to 11
+Warning 1034 Size of datafile is: 77 Should be: 7
+Warning 1034 Number of rows changed from 1 to 11
DROP TABLE t1_will_crash;
CREATE TABLE t1_will_crash (a INT, KEY (a))
ENGINE=MyISAM
@@ -47,8 +47,8 @@ a
11
Warnings:
Error 145 Table 't1_will_crash#P#p1' is marked as crashed and should be repaired
-Error 1034 1 client is using or hasn't closed the table properly
+Warning 1034 1 client is using or hasn't closed the table properly
Error 1034 Size of indexfile is: 1024 Should be: 2048
-Error 1034 Size of datafile is: 28 Should be: 7
-Error 1034 Number of rows changed from 1 to 4
+Warning 1034 Size of datafile is: 28 Should be: 7
+Warning 1034 Number of rows changed from 1 to 4
DROP TABLE t1_will_crash;
diff --git a/mysql-test/suite/parts/r/partition_repair_myisam.result b/mysql-test/suite/parts/r/partition_repair_myisam.result
index 6e99f1d3632..0521263df12 100644
--- a/mysql-test/suite/parts/r/partition_repair_myisam.result
+++ b/mysql-test/suite/parts/r/partition_repair_myisam.result
@@ -322,7 +322,8 @@ FLUSH TABLES;
# replacing p6 with a crashed MYD file (1) (splitted dynamic record)
ANALYZE TABLE t1_will_crash;
Table Op Msg_type Msg_text
-test.t1_will_crash analyze status OK
+test.t1_will_crash analyze Warning Engine-independent statistics are not collected for column 'c'
+test.t1_will_crash analyze status Operation failed
OPTIMIZE TABLE t1_will_crash;
Table Op Msg_type Msg_text
test.t1_will_crash optimize info Found row block followed by deleted block
diff --git a/mysql-test/suite/parts/r/partition_special_innodb.result b/mysql-test/suite/parts/r/partition_special_innodb.result
index c375c2d2232..01c6e1f9e64 100644
--- a/mysql-test/suite/parts/r/partition_special_innodb.result
+++ b/mysql-test/suite/parts/r/partition_special_innodb.result
@@ -327,3 +327,11 @@ disconnect con3;
disconnect con2;
disconnect con1;
connection default;
+CREATE TABLE t1(
+f1 INT, f2 VARCHAR(10) CHARSET ascii,
+f3 CHAR(150) CHARSET ascii,
+f4 TEXT CHARSET ascii)ENGINE=InnoDB
+PARTITION BY RANGE(f1) (PARTITION p1 VALUES LESS THAN(10),
+PARTITION p2 VALUES LESS THAN (100));
+ALTER TABLE t1 convert to charset ascii collate ascii_bin, ALGORITHM=INSTANT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result
index 480ab219c34..dcd45ce4fe1 100644
--- a/mysql-test/suite/parts/r/rpl_partition.result
+++ b/mysql-test/suite/parts/r/rpl_partition.result
@@ -65,6 +65,10 @@ DELETE FROM t1 WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE PROCEDURE p2()
BEGIN
DECLARE ins_count INT DEFAULT 1000;
@@ -86,6 +90,10 @@ DELETE FROM t2 WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE PROCEDURE p3()
BEGIN
DECLARE ins_count INT DEFAULT 1000;
@@ -107,6 +115,10 @@ DELETE FROM t3 WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
begin;
CALL p1();
commit;
diff --git a/mysql-test/suite/parts/t/partition_alter_instant.test b/mysql-test/suite/parts/t/partition_alter_instant.test
new file mode 100644
index 00000000000..3d798791517
--- /dev/null
+++ b/mysql-test/suite/parts/t/partition_alter_instant.test
@@ -0,0 +1,43 @@
+--source include/have_partition.inc
+--source include/have_innodb.inc
+--source include/have_innodb_16k.inc
+
+# MDEV-21832 FORCE all partition to rebuild if any one of the
+# partition does rebuild
+CREATE TABLE t1 (
+ id INT NOT NULL,
+ name VARCHAR(30))ENGINE=InnoDB ROW_FORMAT=COMPACT CHARACTER SET=latin1
+ PARTITION BY RANGE (id) (
+ PARTITION p0 VALUES LESS THAN (50),
+ PARTITION p1 VALUES LESS THAN (MAXVALUE)
+);
+
+INSERT INTO t1(id, name) VALUES(16, 'Me'), (337, 'ROFL');
+
+--echo # Add and drop 31 Instant columns
+--disable_query_log
+let $i = 1;
+while ($i < 32) {
+--eval ALTER TABLE t1 ADD COLUMN col$i VARCHAR(255) NOT NULL DEFAULT repeat('a', 255);
+inc $i;
+}
+
+let $i = 31;
+while ($i > 0) {
+--eval ALTER TABLE t1 DROP COLUMN col$i
+dec $i;
+}
+--enable_query_log
+
+CREATE TABLE t2 LIKE t1;
+SHOW CREATE TABLE t2;
+ALTER TABLE t2 REMOVE PARTITIONING;
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+SHOW CREATE TABLE t2;
+SET ALTER_ALGORITHM=INSTANT;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 ADD COLUMN col1 VARCHAR(255) NOT NULL DEFAULT repeat('a', 255);
+SET ALTER_ALGORITHM=INPLACE;
+ALTER TABLE t1 ADD COLUMN col1 VARCHAR(255) NOT NULL DEFAULT repeat('a', 255);
+DROP TABLE t1, t2;
+SET ALTER_ALGORITHM=DEFAULT;
diff --git a/mysql-test/suite/parts/t/partition_special_innodb.test b/mysql-test/suite/parts/t/partition_special_innodb.test
index 1fc9ac7fafc..ef7cf4bd4cf 100644
--- a/mysql-test/suite/parts/t/partition_special_innodb.test
+++ b/mysql-test/suite/parts/t/partition_special_innodb.test
@@ -205,3 +205,13 @@ DROP TABLE t4;
--disconnect con1
--connection default
# End of Test #3
+
+# MDEV-21693 ALGORITHM=INSTANT does not work for partitioned tables
+CREATE TABLE t1(
+ f1 INT, f2 VARCHAR(10) CHARSET ascii,
+ f3 CHAR(150) CHARSET ascii,
+ f4 TEXT CHARSET ascii)ENGINE=InnoDB
+ PARTITION BY RANGE(f1) (PARTITION p1 VALUES LESS THAN(10),
+ PARTITION p2 VALUES LESS THAN (100));
+ALTER TABLE t1 convert to charset ascii collate ascii_bin, ALGORITHM=INSTANT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf b/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf
new file mode 100644
index 00000000000..eee52ede869
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf
@@ -0,0 +1,53 @@
+
+# Default values that applies to all MySQL Servers
+[mysqld]
+local-infile
+character-set-server= latin1
+default-storage-engine=myisam
+
+# Increase default connect_timeout to avoid intermittent
+# disconnects when test servers are put under load see BUG#28359
+connect-timeout= 60
+
+log-bin-trust-function-creators=1
+key_buffer_size= 1M
+sort_buffer_size= 256K
+max_heap_table_size= 1M
+
+loose-innodb_data_file_path= ibdata1:10M:autoextend
+loose-innodb_buffer_pool_size= 8M
+loose-innodb_lru_scan_depth= 100
+loose-innodb_write_io_threads= 2
+loose-innodb_read_io_threads= 2
+loose-innodb_log_buffer_size= 1M
+loose-innodb_log_file_size= 5M
+loose-innodb_log_files_in_group= 2
+
+slave-net-timeout=120
+
+log-bin=mysqld-bin
+
+# No performance schema sizing provided
+
+# Disable everything, we only need the sizing data,
+# and also need a stable output for show engine performance_schema status
+loose-performance-schema-consumer-global-instrumentation=OFF
+
+loose-performance-schema-instrument='%=ON'
+
+loose-performance-schema-consumer-events-stages-current=ON
+loose-performance-schema-consumer-events-stages-history=ON
+loose-performance-schema-consumer-events-stages-history-long=ON
+loose-performance-schema-consumer-events-statements-current=ON
+loose-performance-schema-consumer-events-statements-history=ON
+loose-performance-schema-consumer-events-statements-history-long=ON
+loose-performance-schema-consumer-events-transactions-current=ON
+loose-performance-schema-consumer-events-transactions-history=ON
+loose-performance-schema-consumer-events-transactions-history-long=ON
+loose-performance-schema-consumer-events-waits-current=ON
+loose-performance-schema-consumer-events-waits-history=ON
+loose-performance-schema-consumer-events-waits-history-long=ON
+loose-performance-schema-consumer-thread-instrumentation=ON
+
+binlog-direct-non-transactional-updates
+
diff --git a/mysql-test/suite/perfschema/include/have_aligned_memory.inc b/mysql-test/suite/perfschema/include/have_aligned_memory.inc
index 9638cbe1da4..d420f0e055a 100644
--- a/mysql-test/suite/perfschema/include/have_aligned_memory.inc
+++ b/mysql-test/suite/perfschema/include/have_aligned_memory.inc
@@ -4,10 +4,7 @@
# For tests sensitive to the internal sizes (show engine performance_schema
# status), make sure we use a platform with aligned memory.
---disable_query_log
-let $aligned = `SELECT count(*) from performance_schema.session_connect_attrs where PROCESSLIST_ID = connection_id() and ATTR_NAME = '_os' and ATTR_VALUE in ('Linux', 'Windows')`;
-if (!$aligned)
+if (`SELECT count(*)=0 from performance_schema.session_connect_attrs where PROCESSLIST_ID = connection_id() and ATTR_NAME = '_os' and ATTR_VALUE in ('Linux', 'Windows')`)
{
skip Need a platform with aligned memory;
}
---enable_query_log
diff --git a/mysql-test/suite/perfschema/include/sizing_auto.inc b/mysql-test/suite/perfschema/include/sizing_auto.inc
index 3bb4db2276f..6cb077e3cf7 100644
--- a/mysql-test/suite/perfschema/include/sizing_auto.inc
+++ b/mysql-test/suite/perfschema/include/sizing_auto.inc
@@ -3,7 +3,7 @@ show variables like "table_definition_cache";
show variables like "table_open_cache";
show variables like "max_connections";
# open_files_limit depends on OS configuration (ulimit -n)
-#show variables like "open_files_limit";
+show variables like "open_files_limit";
show variables where
`Variable_name` != "performance_schema_max_statement_classes" and
`Variable_name` like "performance_schema%";
@@ -17,7 +17,7 @@ show status like "%performance_schema%";
# is very dependent on the platform,
# so it is not printed here to ensure stability of the .results files.
# To troubleshoot the performance schema memory consumption at different
-# configuration settings, comment the following line.
+# configuration settings, uncomment the following line.
# Debug only:
# show engine performance_schema status;
diff --git a/mysql-test/suite/perfschema/r/bad_option_1.result b/mysql-test/suite/perfschema/r/bad_option_1.result
index 02fd04afd33..05ff5663882 100644
--- a/mysql-test/suite/perfschema/r/bad_option_1.result
+++ b/mysql-test/suite/perfschema/r/bad_option_1.result
@@ -1,2 +1,4 @@
+# Kill the server
Found: unknown variable 'performance-schema-enabled=maybe'
Found: Aborting
+# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_2.result b/mysql-test/suite/perfschema/r/bad_option_2.result
index 7a5ab31aabd..c2809525827 100644
--- a/mysql-test/suite/perfschema/r/bad_option_2.result
+++ b/mysql-test/suite/perfschema/r/bad_option_2.result
@@ -1 +1,3 @@
+# Kill the server
FOUND 1 /ambiguous option '--performance-schema-max_=12'/ in bad_option_2.txt
+# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_3.result b/mysql-test/suite/perfschema/r/bad_option_3.result
index ec717d6f7d2..1981f0b2044 100644
--- a/mysql-test/suite/perfschema/r/bad_option_3.result
+++ b/mysql-test/suite/perfschema/r/bad_option_3.result
@@ -1,2 +1,4 @@
+# Kill the server
Found: unknown option '-x'
Found: Aborting
+# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_4.result b/mysql-test/suite/perfschema/r/bad_option_4.result
index 812ee546200..1d50a80be3d 100644
--- a/mysql-test/suite/perfschema/r/bad_option_4.result
+++ b/mysql-test/suite/perfschema/r/bad_option_4.result
@@ -1,2 +1,4 @@
+# Kill the server
Found: Can't change dir to.*bad_option_h_param
Found: Aborting
+# restart
diff --git a/mysql-test/suite/perfschema/r/bad_option_5.result b/mysql-test/suite/perfschema/r/bad_option_5.result
index b318b6e0482..840717023ac 100644
--- a/mysql-test/suite/perfschema/r/bad_option_5.result
+++ b/mysql-test/suite/perfschema/r/bad_option_5.result
@@ -1,2 +1,4 @@
+# Kill the server
Found: unknown option '-X'
Found: Aborting
+# restart
diff --git a/mysql-test/suite/perfschema/r/dml_handler.result b/mysql-test/suite/perfschema/r/dml_handler.result
index ab850aee933..ce0f87e7733 100644
--- a/mysql-test/suite/perfschema/r/dml_handler.result
+++ b/mysql-test/suite/perfschema/r/dml_handler.result
@@ -6,6 +6,8 @@ SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='performance_schema'
ORDER BY TABLE_NAME;
SELECT COUNT(*) FROM table_list INTO @table_count;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
# For each table in the performance schema, attempt HANDLER...OPEN,
# which should fail with an error 1031, ER_ILLEGAL_HA.
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 63e3bc20adb..3be1da544e4 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -21,16 +21,16 @@ where name like 'Wait/Synch/Rwlock/sql/%'
'wait/synch/rwlock/sql/LOCK_named_pipe_full_access_group')
order by name limit 10;
NAME ENABLED TIMED
+wait/synch/rwlock/sql/LOCK_all_status_vars YES YES
wait/synch/rwlock/sql/LOCK_dboptions YES YES
wait/synch/rwlock/sql/LOCK_grant YES YES
wait/synch/rwlock/sql/LOCK_SEQUENCE YES YES
+wait/synch/rwlock/sql/LOCK_ssl_refresh YES YES
wait/synch/rwlock/sql/LOCK_system_variables_hash YES YES
wait/synch/rwlock/sql/LOCK_sys_init_connect YES YES
wait/synch/rwlock/sql/LOCK_sys_init_slave YES YES
wait/synch/rwlock/sql/LOGGER::LOCK_logger YES YES
wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for YES YES
-wait/synch/rwlock/sql/MDL_lock::rwlock YES YES
-wait/synch/rwlock/sql/Query_cache_query::lock YES YES
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Cond/sql/%'
and name not in (
diff --git a/mysql-test/suite/perfschema/r/event_aggregate.result b/mysql-test/suite/perfschema/r/event_aggregate.result
index 9ab62329fc9..7fa08534bb1 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate.result
@@ -235,38 +235,38 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -363,10 +363,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -375,10 +375,10 @@ user2 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -387,24 +387,24 @@ user2 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -518,10 +518,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -530,10 +530,10 @@ user2 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -542,24 +542,24 @@ user2 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -677,10 +677,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -694,10 +694,10 @@ user3 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -711,24 +711,24 @@ user3 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -863,10 +863,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -880,10 +880,10 @@ user3 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -897,24 +897,24 @@ user3 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1053,10 +1053,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1075,10 +1075,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1097,24 +1097,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1270,10 +1270,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1292,10 +1292,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1314,24 +1314,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1478,10 +1478,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1500,10 +1500,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1522,24 +1522,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1684,10 +1684,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1706,10 +1706,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1728,24 +1728,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1887,10 +1887,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1909,10 +1909,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1931,24 +1931,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2087,10 +2087,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2109,10 +2109,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2131,24 +2131,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2288,10 +2288,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2310,10 +2310,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2332,24 +2332,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2488,10 +2488,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2510,10 +2510,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2532,24 +2532,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2688,10 +2688,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2710,10 +2710,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2732,24 +2732,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2888,10 +2888,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2910,10 +2910,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2932,24 +2932,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3088,10 +3088,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -3110,10 +3110,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3132,24 +3132,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3288,10 +3288,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -3310,10 +3310,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3332,24 +3332,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3510,10 +3510,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3532,24 +3532,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3732,24 +3732,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3939,17 +3939,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4146,10 +4146,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4346,10 +4346,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4546,10 +4546,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4746,10 +4746,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4946,10 +4946,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5146,10 +5146,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5310,10 +5310,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5418,10 +5418,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5506,10 +5506,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
index ece0402335d..19dec52aa47 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
@@ -217,31 +217,31 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -326,10 +326,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -338,24 +338,24 @@ user2 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -452,10 +452,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -464,24 +464,24 @@ user2 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -578,10 +578,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -595,24 +595,24 @@ user3 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -721,10 +721,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -738,24 +738,24 @@ user3 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -864,10 +864,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -886,24 +886,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1024,10 +1024,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1046,24 +1046,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1175,10 +1175,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1197,24 +1197,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1324,10 +1324,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1346,24 +1346,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1470,10 +1470,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1492,24 +1492,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1613,10 +1613,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1635,24 +1635,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1757,10 +1757,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1779,24 +1779,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1900,10 +1900,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1922,24 +1922,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2043,10 +2043,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2065,24 +2065,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2186,10 +2186,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2208,24 +2208,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2329,10 +2329,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2351,24 +2351,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2472,10 +2472,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2494,24 +2494,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2615,10 +2615,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2637,24 +2637,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2780,24 +2780,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2930,17 +2930,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3080,10 +3080,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3223,10 +3223,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3366,10 +3366,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3509,10 +3509,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3652,10 +3652,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3795,10 +3795,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3938,10 +3938,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4045,10 +4045,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4132,10 +4132,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
index 083e1bffdd2..3aa27664cac 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
@@ -185,26 +185,26 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -280,10 +280,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -294,17 +294,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -392,10 +392,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -406,17 +406,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -504,10 +504,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -523,17 +523,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -633,10 +633,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -652,17 +652,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -762,10 +762,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -786,17 +786,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -908,10 +908,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -932,17 +932,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1045,10 +1045,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1069,17 +1069,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1180,10 +1180,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1204,17 +1204,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1312,10 +1312,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1336,17 +1336,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1441,10 +1441,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1465,17 +1465,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1571,10 +1571,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1595,17 +1595,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1700,10 +1700,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1724,17 +1724,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1829,10 +1829,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1853,17 +1853,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1958,10 +1958,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1982,17 +1982,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2087,10 +2087,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2111,17 +2111,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2216,10 +2216,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2240,17 +2240,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2345,10 +2345,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2369,17 +2369,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2498,17 +2498,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2627,17 +2627,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2763,10 +2763,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2892,10 +2892,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3021,10 +3021,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3150,10 +3150,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3279,10 +3279,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3408,10 +3408,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3537,10 +3537,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3630,10 +3630,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3703,10 +3703,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
index c9b2b768691..4d4a842948f 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
@@ -199,24 +199,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -289,24 +289,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -386,24 +386,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -479,24 +479,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -579,24 +579,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -675,24 +675,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -778,24 +778,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -872,24 +872,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -964,24 +964,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1053,24 +1053,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1139,24 +1139,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1226,24 +1226,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1312,24 +1312,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1398,24 +1398,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1484,24 +1484,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1570,24 +1570,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1656,24 +1656,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1742,24 +1742,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1828,24 +1828,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1921,17 +1921,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2014,10 +2014,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2100,10 +2100,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2186,10 +2186,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2272,10 +2272,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2358,10 +2358,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2444,10 +2444,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2530,10 +2530,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2616,10 +2616,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2702,10 +2702,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
index 89443515f31..db281652c0c 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
@@ -169,17 +169,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -245,17 +245,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -328,17 +328,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -407,17 +407,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -493,17 +493,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -575,17 +575,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -664,17 +664,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -744,17 +744,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -822,17 +822,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -897,17 +897,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -969,17 +969,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1042,17 +1042,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1114,17 +1114,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1186,17 +1186,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1258,17 +1258,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1330,17 +1330,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1402,17 +1402,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1474,17 +1474,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1546,17 +1546,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1618,17 +1618,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1697,10 +1697,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1769,10 +1769,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1841,10 +1841,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1913,10 +1913,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1985,10 +1985,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2057,10 +2057,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2129,10 +2129,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2201,10 +2201,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2273,10 +2273,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
index 0ea5d90ea41..c8996fa2846 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
@@ -203,33 +203,33 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -317,10 +317,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -329,10 +329,10 @@ user2 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -343,17 +343,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -458,10 +458,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -470,10 +470,10 @@ user2 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -484,17 +484,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -603,10 +603,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -620,10 +620,10 @@ user3 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -639,17 +639,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -775,10 +775,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -792,10 +792,10 @@ user3 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -811,17 +811,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -951,10 +951,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -973,10 +973,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -997,17 +997,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1154,10 +1154,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1176,10 +1176,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1200,17 +1200,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1348,10 +1348,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1370,10 +1370,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1394,17 +1394,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1540,10 +1540,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1562,10 +1562,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1586,17 +1586,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1729,10 +1729,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1751,10 +1751,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1775,17 +1775,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1915,10 +1915,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1937,10 +1937,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1961,17 +1961,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2102,10 +2102,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2124,10 +2124,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2148,17 +2148,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2288,10 +2288,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2310,10 +2310,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2334,17 +2334,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2474,10 +2474,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2496,10 +2496,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2520,17 +2520,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2660,10 +2660,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2682,10 +2682,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2706,17 +2706,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2846,10 +2846,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2868,10 +2868,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2892,17 +2892,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3032,10 +3032,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -3054,10 +3054,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3078,17 +3078,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3240,10 +3240,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3264,17 +3264,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3450,17 +3450,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3636,17 +3636,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3829,10 +3829,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4015,10 +4015,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4201,10 +4201,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4387,10 +4387,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4573,10 +4573,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4759,10 +4759,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4909,10 +4909,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5003,10 +5003,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5077,10 +5077,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
index 52c674024bd..508a65d9ba0 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
@@ -215,33 +215,33 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -324,10 +324,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -338,24 +338,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -450,10 +450,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -464,24 +464,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -576,10 +576,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -595,24 +595,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -719,10 +719,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -738,24 +738,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -862,10 +862,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -886,24 +886,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1022,10 +1022,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1046,24 +1046,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1173,10 +1173,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1197,24 +1197,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1322,10 +1322,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1346,24 +1346,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1468,10 +1468,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1492,24 +1492,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1611,10 +1611,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1635,24 +1635,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1755,10 +1755,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1779,24 +1779,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1898,10 +1898,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1922,24 +1922,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2041,10 +2041,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2065,24 +2065,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2184,10 +2184,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2208,24 +2208,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2327,10 +2327,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2351,24 +2351,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2470,10 +2470,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2494,24 +2494,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2637,24 +2637,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2780,24 +2780,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2930,17 +2930,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3080,10 +3080,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3223,10 +3223,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3366,10 +3366,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3509,10 +3509,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3652,10 +3652,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3795,10 +3795,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3902,10 +3902,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3989,10 +3989,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4076,10 +4076,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
index a493631d71f..579fadc51c0 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
@@ -183,10 +183,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -194,17 +194,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -278,10 +278,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -294,17 +294,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -390,10 +390,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -406,17 +406,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -502,10 +502,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -523,17 +523,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -631,10 +631,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -652,17 +652,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -760,10 +760,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -786,17 +786,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -906,10 +906,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -932,17 +932,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1043,10 +1043,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1069,17 +1069,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1178,10 +1178,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1204,17 +1204,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1310,10 +1310,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1336,17 +1336,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1439,10 +1439,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1465,17 +1465,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1569,10 +1569,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1595,17 +1595,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1698,10 +1698,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1724,17 +1724,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1827,10 +1827,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1853,17 +1853,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1956,10 +1956,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1982,17 +1982,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2085,10 +2085,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2111,17 +2111,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2214,10 +2214,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2240,17 +2240,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2369,17 +2369,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2498,17 +2498,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2627,17 +2627,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2763,10 +2763,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2892,10 +2892,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3021,10 +3021,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3150,10 +3150,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3279,10 +3279,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3408,10 +3408,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3501,10 +3501,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3574,10 +3574,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3647,10 +3647,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result
index ac40e37dd66..fdb2c53fcf3 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_ed25519.result
@@ -12,19 +12,21 @@ User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user plug1@'santa.claus.ipv4.example.com'
- identified with ed25519 as 'foo';
+ identified with ed25519;
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'foo') where user='plug1';
+flush privileges;
create user plug2@'santa.claus.ipv4.example.com'
identified with ED25519 as 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI';
set @saved_dbug = @@global.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect(127.0.0.1,plug1,foo,test,PORT,SOCKET);
connect con1, 127.0.0.1, plug1,foo,,$MASTER_MYPORT;
-ERROR 28000: Access denied for user 'plug1'@'santa.claus.ipv4.example.com' (using password: NO)
+ERROR 28000: Access denied for user 'plug1'@'santa.claus.ipv4.example.com' (using password: YES)
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
-SUM_CONNECT_ERRORS 0
+SUM_CONNECT_ERRORS 1
COUNT_HOST_BLOCKED_ERRORS 0
COUNT_NAMEINFO_TRANSIENT_ERRORS 0
COUNT_NAMEINFO_PERMANENT_ERRORS 0
@@ -34,8 +36,8 @@ COUNT_ADDRINFO_PERMANENT_ERRORS 0
COUNT_FCRDNS_ERRORS 0
COUNT_HOST_ACL_ERRORS 0
COUNT_NO_AUTH_PLUGIN_ERRORS 0
-COUNT_AUTH_PLUGIN_ERRORS 1
-COUNT_HANDSHAKE_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 1
COUNT_PROXY_USER_ERRORS 0
COUNT_PROXY_USER_ACL_ERRORS 0
COUNT_AUTHENTICATION_ERRORS 0
@@ -55,7 +57,7 @@ ERROR 28000: Access denied for user 'plug2'@'santa.claus.ipv4.example.com' (usin
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
-SUM_CONNECT_ERRORS 0
+SUM_CONNECT_ERRORS 1
COUNT_HOST_BLOCKED_ERRORS 0
COUNT_NAMEINFO_TRANSIENT_ERRORS 0
COUNT_NAMEINFO_PERMANENT_ERRORS 0
@@ -65,8 +67,8 @@ COUNT_ADDRINFO_PERMANENT_ERRORS 0
COUNT_FCRDNS_ERRORS 0
COUNT_HOST_ACL_ERRORS 0
COUNT_NO_AUTH_PLUGIN_ERRORS 0
-COUNT_AUTH_PLUGIN_ERRORS 1
-COUNT_HANDSHAKE_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 1
COUNT_PROXY_USER_ERRORS 0
COUNT_PROXY_USER_ACL_ERRORS 0
COUNT_AUTHENTICATION_ERRORS 1
@@ -99,8 +101,8 @@ COUNT_ADDRINFO_PERMANENT_ERRORS 0
COUNT_FCRDNS_ERRORS 0
COUNT_HOST_ACL_ERRORS 0
COUNT_NO_AUTH_PLUGIN_ERRORS 0
-COUNT_AUTH_PLUGIN_ERRORS 1
-COUNT_HANDSHAKE_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 1
COUNT_PROXY_USER_ERRORS 0
COUNT_PROXY_USER_ACL_ERRORS 0
COUNT_AUTHENTICATION_ERRORS 1
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
index 7bafd9e636f..bc7721aef30 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
@@ -107,7 +107,7 @@ Con4 is alive
Con4 is alive
select current_user();
current_user()
-root@192.0.2.4
+root@santa.claus.ipv4.example.com
disconnect con4;
connection default;
"Dumping performance_schema.host_cache"
@@ -144,7 +144,7 @@ Con5 is alive
Con5 is alive
select current_user();
current_user()
-root@192.0.2.4
+root@santa.claus.ipv4.example.com
disconnect con5;
connection default;
"Dumping performance_schema.host_cache"
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
index 2bb23e99203..357dfd3db3e 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
@@ -107,7 +107,7 @@ Con4 is alive
Con4 is alive
select current_user();
current_user()
-root@2001:db8::6:6
+root@santa.claus.ipv6.example.com
disconnect con4;
connection default;
"Dumping performance_schema.host_cache"
@@ -144,7 +144,7 @@ Con5 is alive
Con5 is alive
select current_user();
current_user()
-root@2001:db8::6:6
+root@santa.claus.ipv6.example.com
disconnect con5;
connection default;
"Dumping performance_schema.host_cache"
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index 37681757973..6f0030489f6 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -107,152 +107,161 @@ and (end_event_id <= @marker_end)
) all_events
order by relative_event_id asc;
relative_event_id relative_end_event_id event_name comment nesting_event_type relative_nesting_event_id
-0 20 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
-1 4 stage/sql/Init (stage) STATEMENT 0
+0 21 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
+1 5 stage/sql/Init (stage) STATEMENT 0
2 2 wait/io/socket/sql/client_connection recv STAGE 1
3 3 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
-4 4 wait/io/file/sql/query_log write STAGE 1
-5 5 stage/sql/Checking permissions (stage) STATEMENT 0
-6 6 stage/sql/Opening tables (stage) STATEMENT 0
-7 7 stage/sql/After opening tables (stage) STATEMENT 0
-8 8 stage/sql/Init (stage) STATEMENT 0
-9 9 stage/sql/Optimizing (stage) STATEMENT 0
-10 10 stage/sql/Executing (stage) STATEMENT 0
-11 11 stage/sql/End of update loop (stage) STATEMENT 0
-12 12 stage/sql/Query end (stage) STATEMENT 0
-13 13 stage/sql/Commit (stage) STATEMENT 0
-14 14 stage/sql/Closing tables (stage) STATEMENT 0
-15 15 stage/sql/Starting cleanup (stage) STATEMENT 0
-16 16 stage/sql/Freeing items (stage) STATEMENT 0
-17 17 wait/io/socket/sql/client_connection send STATEMENT 0
-18 18 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 0
-19 20 stage/sql/Reset for next command (stage) STATEMENT 0
-20 20 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 19
-21 21 idle idle NULL NULL
-22 42 statement/sql/select select "This is simple statement one" as payload NULL NULL
-23 26 stage/sql/Init (stage) STATEMENT 22
-24 24 wait/io/socket/sql/client_connection recv STAGE 23
-25 25 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 23
-26 26 wait/io/file/sql/query_log write STAGE 23
-27 27 stage/sql/Checking permissions (stage) STATEMENT 22
-28 28 stage/sql/Opening tables (stage) STATEMENT 22
-29 29 stage/sql/After opening tables (stage) STATEMENT 22
-30 30 stage/sql/Init (stage) STATEMENT 22
-31 31 stage/sql/Optimizing (stage) STATEMENT 22
-32 32 stage/sql/Executing (stage) STATEMENT 22
-33 33 stage/sql/End of update loop (stage) STATEMENT 22
-34 34 stage/sql/Query end (stage) STATEMENT 22
-35 35 stage/sql/Commit (stage) STATEMENT 22
-36 36 stage/sql/Closing tables (stage) STATEMENT 22
-37 37 stage/sql/Starting cleanup (stage) STATEMENT 22
-38 38 stage/sql/Freeing items (stage) STATEMENT 22
-39 39 wait/io/socket/sql/client_connection send STATEMENT 22
-40 40 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 22
-41 42 stage/sql/Reset for next command (stage) STATEMENT 22
-42 42 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 41
-43 43 idle idle NULL NULL
-44 64 statement/sql/select select "This is simple statement two" as payload NULL NULL
-45 48 stage/sql/Init (stage) STATEMENT 44
-46 46 wait/io/socket/sql/client_connection recv STAGE 45
-47 47 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 45
-48 48 wait/io/file/sql/query_log write STAGE 45
-49 49 stage/sql/Checking permissions (stage) STATEMENT 44
-50 50 stage/sql/Opening tables (stage) STATEMENT 44
-51 51 stage/sql/After opening tables (stage) STATEMENT 44
-52 52 stage/sql/Init (stage) STATEMENT 44
-53 53 stage/sql/Optimizing (stage) STATEMENT 44
-54 54 stage/sql/Executing (stage) STATEMENT 44
-55 55 stage/sql/End of update loop (stage) STATEMENT 44
-56 56 stage/sql/Query end (stage) STATEMENT 44
-57 57 stage/sql/Commit (stage) STATEMENT 44
-58 58 stage/sql/Closing tables (stage) STATEMENT 44
-59 59 stage/sql/Starting cleanup (stage) STATEMENT 44
-60 60 stage/sql/Freeing items (stage) STATEMENT 44
-61 61 wait/io/socket/sql/client_connection send STATEMENT 44
-62 62 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 44
-63 64 stage/sql/Reset for next command (stage) STATEMENT 44
-64 64 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 63
-65 65 idle idle NULL NULL
-66 85 statement/sql/select select "This is the first part of a multi query" as payload;
+4 4 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
+5 5 wait/io/file/sql/query_log write STAGE 1
+6 6 stage/sql/Checking permissions (stage) STATEMENT 0
+7 7 stage/sql/Opening tables (stage) STATEMENT 0
+8 8 stage/sql/After opening tables (stage) STATEMENT 0
+9 9 stage/sql/Init (stage) STATEMENT 0
+10 10 stage/sql/Optimizing (stage) STATEMENT 0
+11 11 stage/sql/Executing (stage) STATEMENT 0
+12 12 stage/sql/End of update loop (stage) STATEMENT 0
+13 13 stage/sql/Query end (stage) STATEMENT 0
+14 14 stage/sql/Commit (stage) STATEMENT 0
+15 15 stage/sql/Closing tables (stage) STATEMENT 0
+16 16 stage/sql/Starting cleanup (stage) STATEMENT 0
+17 17 stage/sql/Freeing items (stage) STATEMENT 0
+18 18 wait/io/socket/sql/client_connection send STATEMENT 0
+19 19 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 0
+20 21 stage/sql/Reset for next command (stage) STATEMENT 0
+21 21 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 20
+22 22 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 0
+23 23 idle idle NULL NULL
+24 45 statement/sql/select select "This is simple statement one" as payload NULL NULL
+25 29 stage/sql/Init (stage) STATEMENT 24
+26 26 wait/io/socket/sql/client_connection recv STAGE 25
+27 27 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 25
+28 28 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 25
+29 29 wait/io/file/sql/query_log write STAGE 25
+30 30 stage/sql/Checking permissions (stage) STATEMENT 24
+31 31 stage/sql/Opening tables (stage) STATEMENT 24
+32 32 stage/sql/After opening tables (stage) STATEMENT 24
+33 33 stage/sql/Init (stage) STATEMENT 24
+34 34 stage/sql/Optimizing (stage) STATEMENT 24
+35 35 stage/sql/Executing (stage) STATEMENT 24
+36 36 stage/sql/End of update loop (stage) STATEMENT 24
+37 37 stage/sql/Query end (stage) STATEMENT 24
+38 38 stage/sql/Commit (stage) STATEMENT 24
+39 39 stage/sql/Closing tables (stage) STATEMENT 24
+40 40 stage/sql/Starting cleanup (stage) STATEMENT 24
+41 41 stage/sql/Freeing items (stage) STATEMENT 24
+42 42 wait/io/socket/sql/client_connection send STATEMENT 24
+43 43 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 24
+44 45 stage/sql/Reset for next command (stage) STATEMENT 24
+45 45 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 44
+46 46 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 24
+47 47 idle idle NULL NULL
+48 69 statement/sql/select select "This is simple statement two" as payload NULL NULL
+49 53 stage/sql/Init (stage) STATEMENT 48
+50 50 wait/io/socket/sql/client_connection recv STAGE 49
+51 51 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 49
+52 52 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 49
+53 53 wait/io/file/sql/query_log write STAGE 49
+54 54 stage/sql/Checking permissions (stage) STATEMENT 48
+55 55 stage/sql/Opening tables (stage) STATEMENT 48
+56 56 stage/sql/After opening tables (stage) STATEMENT 48
+57 57 stage/sql/Init (stage) STATEMENT 48
+58 58 stage/sql/Optimizing (stage) STATEMENT 48
+59 59 stage/sql/Executing (stage) STATEMENT 48
+60 60 stage/sql/End of update loop (stage) STATEMENT 48
+61 61 stage/sql/Query end (stage) STATEMENT 48
+62 62 stage/sql/Commit (stage) STATEMENT 48
+63 63 stage/sql/Closing tables (stage) STATEMENT 48
+64 64 stage/sql/Starting cleanup (stage) STATEMENT 48
+65 65 stage/sql/Freeing items (stage) STATEMENT 48
+66 66 wait/io/socket/sql/client_connection send STATEMENT 48
+67 67 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 48
+68 69 stage/sql/Reset for next command (stage) STATEMENT 48
+69 69 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 68
+70 70 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 48
+71 71 idle idle NULL NULL
+72 92 statement/sql/select select "This is the first part of a multi query" as payload;
select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-67 71 stage/sql/Init (stage) STATEMENT 66
-68 68 wait/io/socket/sql/client_connection recv STAGE 67
-69 69 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 67
-70 70 wait/io/file/sql/query_log write STAGE 67
-71 71 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 67
-72 72 stage/sql/Checking permissions (stage) STATEMENT 66
-73 73 stage/sql/Opening tables (stage) STATEMENT 66
-74 74 stage/sql/After opening tables (stage) STATEMENT 66
-75 75 stage/sql/Init (stage) STATEMENT 66
-76 76 stage/sql/Optimizing (stage) STATEMENT 66
-77 77 stage/sql/Executing (stage) STATEMENT 66
-78 78 stage/sql/End of update loop (stage) STATEMENT 66
-79 79 stage/sql/Query end (stage) STATEMENT 66
-80 80 stage/sql/Commit (stage) STATEMENT 66
-81 81 stage/sql/Closing tables (stage) STATEMENT 66
-82 82 stage/sql/Starting cleanup (stage) STATEMENT 66
-83 85 stage/sql/Freeing items (stage) STATEMENT 66
-84 84 wait/io/socket/sql/client_connection send STAGE 83
-85 85 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 83
-86 103 statement/sql/select select "And this is the second part of a multi query" as payload;
+73 78 stage/sql/Init (stage) STATEMENT 72
+74 74 wait/io/socket/sql/client_connection recv STAGE 73
+75 75 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
+76 76 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
+77 77 wait/io/file/sql/query_log write STAGE 73
+78 78 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
+79 79 stage/sql/Checking permissions (stage) STATEMENT 72
+80 80 stage/sql/Opening tables (stage) STATEMENT 72
+81 81 stage/sql/After opening tables (stage) STATEMENT 72
+82 82 stage/sql/Init (stage) STATEMENT 72
+83 83 stage/sql/Optimizing (stage) STATEMENT 72
+84 84 stage/sql/Executing (stage) STATEMENT 72
+85 85 stage/sql/End of update loop (stage) STATEMENT 72
+86 86 stage/sql/Query end (stage) STATEMENT 72
+87 87 stage/sql/Commit (stage) STATEMENT 72
+88 88 stage/sql/Closing tables (stage) STATEMENT 72
+89 89 stage/sql/Starting cleanup (stage) STATEMENT 72
+90 92 stage/sql/Freeing items (stage) STATEMENT 72
+91 91 wait/io/socket/sql/client_connection send STAGE 90
+92 92 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 90
+93 110 statement/sql/select select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-87 89 stage/sql/Init (stage) STATEMENT 86
-88 88 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 87
-89 89 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 87
-90 90 stage/sql/Checking permissions (stage) STATEMENT 86
-91 91 stage/sql/Opening tables (stage) STATEMENT 86
-92 92 stage/sql/After opening tables (stage) STATEMENT 86
-93 93 stage/sql/Init (stage) STATEMENT 86
-94 94 stage/sql/Optimizing (stage) STATEMENT 86
-95 95 stage/sql/Executing (stage) STATEMENT 86
-96 96 stage/sql/End of update loop (stage) STATEMENT 86
-97 97 stage/sql/Query end (stage) STATEMENT 86
-98 98 stage/sql/Commit (stage) STATEMENT 86
-99 99 stage/sql/Closing tables (stage) STATEMENT 86
-100 100 stage/sql/Starting cleanup (stage) STATEMENT 86
-101 103 stage/sql/Freeing items (stage) STATEMENT 86
-102 102 wait/io/socket/sql/client_connection send STAGE 101
-103 103 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 101
-104 122 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
-105 106 stage/sql/Init (stage) STATEMENT 104
-106 106 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 105
-107 107 stage/sql/Checking permissions (stage) STATEMENT 104
-108 108 stage/sql/Opening tables (stage) STATEMENT 104
-109 109 stage/sql/After opening tables (stage) STATEMENT 104
-110 110 stage/sql/Init (stage) STATEMENT 104
-111 111 stage/sql/Optimizing (stage) STATEMENT 104
-112 112 stage/sql/Executing (stage) STATEMENT 104
-113 113 stage/sql/End of update loop (stage) STATEMENT 104
-114 114 stage/sql/Query end (stage) STATEMENT 104
-115 115 stage/sql/Commit (stage) STATEMENT 104
-116 116 stage/sql/Closing tables (stage) STATEMENT 104
-117 117 stage/sql/Starting cleanup (stage) STATEMENT 104
-118 118 stage/sql/Freeing items (stage) STATEMENT 104
-119 119 wait/io/socket/sql/client_connection send STATEMENT 104
-120 120 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 104
-121 122 stage/sql/Reset for next command (stage) STATEMENT 104
-122 122 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 121
-123 123 idle idle NULL NULL
-124 144 statement/sql/select select "MARKER_END" as marker NULL NULL
-125 128 stage/sql/Init (stage) STATEMENT 124
-126 126 wait/io/socket/sql/client_connection recv STAGE 125
-127 127 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 125
-128 128 wait/io/file/sql/query_log write STAGE 125
-129 129 stage/sql/Checking permissions (stage) STATEMENT 124
-130 130 stage/sql/Opening tables (stage) STATEMENT 124
-131 131 stage/sql/After opening tables (stage) STATEMENT 124
-132 132 stage/sql/Init (stage) STATEMENT 124
-133 133 stage/sql/Optimizing (stage) STATEMENT 124
-134 134 stage/sql/Executing (stage) STATEMENT 124
-135 135 stage/sql/End of update loop (stage) STATEMENT 124
-136 136 stage/sql/Query end (stage) STATEMENT 124
-137 137 stage/sql/Commit (stage) STATEMENT 124
-138 138 stage/sql/Closing tables (stage) STATEMENT 124
-139 139 stage/sql/Starting cleanup (stage) STATEMENT 124
-140 140 stage/sql/Freeing items (stage) STATEMENT 124
-141 141 wait/io/socket/sql/client_connection send STATEMENT 124
-142 142 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 124
-143 144 stage/sql/Reset for next command (stage) STATEMENT 124
-144 144 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 143
+94 96 stage/sql/Init (stage) STATEMENT 93
+95 95 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 94
+96 96 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 94
+97 97 stage/sql/Checking permissions (stage) STATEMENT 93
+98 98 stage/sql/Opening tables (stage) STATEMENT 93
+99 99 stage/sql/After opening tables (stage) STATEMENT 93
+100 100 stage/sql/Init (stage) STATEMENT 93
+101 101 stage/sql/Optimizing (stage) STATEMENT 93
+102 102 stage/sql/Executing (stage) STATEMENT 93
+103 103 stage/sql/End of update loop (stage) STATEMENT 93
+104 104 stage/sql/Query end (stage) STATEMENT 93
+105 105 stage/sql/Commit (stage) STATEMENT 93
+106 106 stage/sql/Closing tables (stage) STATEMENT 93
+107 107 stage/sql/Starting cleanup (stage) STATEMENT 93
+108 110 stage/sql/Freeing items (stage) STATEMENT 93
+109 109 wait/io/socket/sql/client_connection send STAGE 108
+110 110 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 108
+111 129 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
+112 113 stage/sql/Init (stage) STATEMENT 111
+113 113 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 112
+114 114 stage/sql/Checking permissions (stage) STATEMENT 111
+115 115 stage/sql/Opening tables (stage) STATEMENT 111
+116 116 stage/sql/After opening tables (stage) STATEMENT 111
+117 117 stage/sql/Init (stage) STATEMENT 111
+118 118 stage/sql/Optimizing (stage) STATEMENT 111
+119 119 stage/sql/Executing (stage) STATEMENT 111
+120 120 stage/sql/End of update loop (stage) STATEMENT 111
+121 121 stage/sql/Query end (stage) STATEMENT 111
+122 122 stage/sql/Commit (stage) STATEMENT 111
+123 123 stage/sql/Closing tables (stage) STATEMENT 111
+124 124 stage/sql/Starting cleanup (stage) STATEMENT 111
+125 125 stage/sql/Freeing items (stage) STATEMENT 111
+126 126 wait/io/socket/sql/client_connection send STATEMENT 111
+127 127 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 111
+128 129 stage/sql/Reset for next command (stage) STATEMENT 111
+129 129 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 128
+130 130 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 111
+131 131 idle idle NULL NULL
+132 153 statement/sql/select select "MARKER_END" as marker NULL NULL
+133 137 stage/sql/Init (stage) STATEMENT 132
+134 134 wait/io/socket/sql/client_connection recv STAGE 133
+135 135 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 133
+136 136 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 133
+137 137 wait/io/file/sql/query_log write STAGE 133
+138 138 stage/sql/Checking permissions (stage) STATEMENT 132
+139 139 stage/sql/Opening tables (stage) STATEMENT 132
+140 140 stage/sql/After opening tables (stage) STATEMENT 132
+141 141 stage/sql/Init (stage) STATEMENT 132
+142 142 stage/sql/Optimizing (stage) STATEMENT 132
+143 143 stage/sql/Executing (stage) STATEMENT 132
+144 144 stage/sql/End of update loop (stage) STATEMENT 132
+145 145 stage/sql/Query end (stage) STATEMENT 132
+146 146 stage/sql/Commit (stage) STATEMENT 132
+147 147 stage/sql/Closing tables (stage) STATEMENT 132
+148 148 stage/sql/Starting cleanup (stage) STATEMENT 132
+149 149 stage/sql/Freeing items (stage) STATEMENT 132
+150 150 wait/io/socket/sql/client_connection send STATEMENT 132
+151 151 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 132
+152 153 stage/sql/Reset for next command (stage) STATEMENT 132
+153 153 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 152
disconnect con1;
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index 299551051c9..dfd31a80b3f 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -95,6 +95,8 @@ close pfs_cursor;
signal sqlstate '01000' set message_text='Done', mysql_errno=12000;
end
$
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
show variables where
`Variable_name` != "performance_schema_max_statement_classes" and
`Variable_name` like "performance_schema%";
@@ -109,7 +111,7 @@ performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 100
-performance_schema_max_cond_classes 80
+performance_schema_max_cond_classes 90
performance_schema_max_cond_instances 1000
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 5443c178502..fd56d3e1776 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -1,3 +1,4 @@
+# restart
drop table if exists test.marker;
create table test.marker(a int);
update performance_schema.setup_consumers set enabled='NO';
@@ -8,7 +9,6 @@ truncate table performance_schema.events_waits_history_long;
flush status;
flush tables;
# We are forced to suppress here the server response.
-optimize table mysql.host;
optimize table mysql.user;
optimize table mysql.db;
optimize table mysql.proxies_priv;
@@ -38,7 +38,7 @@ performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 100
-performance_schema_max_cond_classes 80
+performance_schema_max_cond_classes 90
performance_schema_max_cond_instances 1000
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
@@ -96,12 +96,12 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test", "mysql")
order by thread_id, event_id;
event_name short_source object_type object_schema pretty_name operation number_of_bytes
-wait/io/table/sql/handler handler.cc: TABLE mysql host fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
@@ -110,8 +110,11 @@ wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql roles_mapping fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql procs_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql servers fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql table_stats fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql column_stats fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
diff --git a/mysql-test/suite/perfschema/r/selects.result b/mysql-test/suite/perfschema/r/selects.result
index c14d152856f..d623d45a6e8 100644
--- a/mysql-test/suite/perfschema/r/selects.result
+++ b/mysql-test/suite/perfschema/r/selects.result
@@ -93,6 +93,8 @@ SELECT thread_id FROM performance_schema.threads
WHERE PROCESSLIST_ID = conid INTO pid;
END;
|
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL t_ps_proc(connection_id(), @p_id);
DROP FUNCTION IF EXISTS t_ps_proc;
CREATE FUNCTION t_ps_func(conid INT) RETURNS int
diff --git a/mysql-test/suite/perfschema/r/server_init.result b/mysql-test/suite/perfschema/r/server_init.result
index 1bdb9884606..25f3f180735 100644
--- a/mysql-test/suite/perfschema/r/server_init.result
+++ b/mysql-test/suite/perfschema/r/server_init.result
@@ -68,10 +68,6 @@ where name like "wait/synch/mutex/sql/LOCK_crypt";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_slave_list";
-count(name)
-1
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_active_mi";
count(name)
1
diff --git a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
index f31bb1a8b7a..7384313917d 100644
--- a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
+++ b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
@@ -17,7 +17,6 @@ SELECT * FROM performance_schema.setup_instruments
WHERE name = 'wait/synch/mutex/sql/LOCK_thread_count'
AND enabled = 'no' AND timed = 'no';
NAME ENABLED TIMED
-wait/synch/mutex/sql/LOCK_thread_count NO NO
SELECT * FROM performance_schema.setup_instruments
WHERE name IN (
'wait/synch/mutex/sql/LOG_INFO::lock',
@@ -25,7 +24,6 @@ WHERE name IN (
AND enabled = 'yes' AND timed = 'yes'
ORDER BY name;
NAME ENABLED TIMED
-wait/synch/mutex/sql/LOG_INFO::lock YES YES
wait/synch/mutex/sql/THD::LOCK_thd_data YES YES
SELECT * FROM performance_schema.setup_instruments
WHERE name = 'wait/synch/mutex/sql/hash_filo::lock'
diff --git a/mysql-test/suite/perfschema/r/sizing_default.result b/mysql-test/suite/perfschema/r/sizing_default.result
index 07fbf35619b..ea611315be3 100644
--- a/mysql-test/suite/perfschema/r/sizing_default.result
+++ b/mysql-test/suite/perfschema/r/sizing_default.result
@@ -1,43 +1,46 @@
show variables like "table_definition_cache";
Variable_name Value
-table_definition_cache 1400
+table_definition_cache 400
show variables like "table_open_cache";
Variable_name Value
-table_open_cache 2000
+table_open_cache 421
show variables like "max_connections";
Variable_name Value
max_connections 151
+show variables like "open_files_limit";
+Variable_name Value
+open_files_limit 1024
show variables where
`Variable_name` != "performance_schema_max_statement_classes" and
`Variable_name` like "performance_schema%";
Variable_name Value
performance_schema ON
performance_schema_accounts_size 100
-performance_schema_digests_size 10000
-performance_schema_events_stages_history_long_size 10000
-performance_schema_events_stages_history_size 10
-performance_schema_events_statements_history_long_size 10000
-performance_schema_events_statements_history_size 10
-performance_schema_events_waits_history_long_size 10000
-performance_schema_events_waits_history_size 10
+performance_schema_digests_size 5000
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 20
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 20
+performance_schema_events_waits_history_long_size 1000
+performance_schema_events_waits_history_size 20
performance_schema_hosts_size 100
-performance_schema_max_cond_classes 80
-performance_schema_max_cond_instances 3504
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1360
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 7693
+performance_schema_max_file_instances 2500
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 15906
+performance_schema_max_mutex_instances 5648
performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 9102
+performance_schema_max_rwlock_instances 3073
performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 322
-performance_schema_max_stage_classes\t160
-performance_schema_max_table_handles 4000
-performance_schema_max_table_instances 12500
+performance_schema_max_socket_instances 230
+performance_schema_max_stage_classes 160
+performance_schema_max_table_handles 2858
+performance_schema_max_table_instances 667
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 402
+performance_schema_max_thread_instances 288
performance_schema_session_connect_attrs_size 512
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/sizing_high.result b/mysql-test/suite/perfschema/r/sizing_high.result
index 1cf84a14d22..1f63ac6015a 100644
--- a/mysql-test/suite/perfschema/r/sizing_high.result
+++ b/mysql-test/suite/perfschema/r/sizing_high.result
@@ -3,41 +3,44 @@ Variable_name Value
table_definition_cache 5000
show variables like "table_open_cache";
Variable_name Value
-table_open_cache 400
+table_open_cache 397
show variables like "max_connections";
Variable_name Value
max_connections 200
+show variables like "open_files_limit";
+Variable_name Value
+open_files_limit 1024
show variables where
`Variable_name` != "performance_schema_max_statement_classes" and
`Variable_name` like "performance_schema%";
Variable_name Value
performance_schema ON
performance_schema_accounts_size 100
-performance_schema_digests_size 10000
-performance_schema_events_stages_history_long_size 10000
-performance_schema_events_stages_history_size 10
-performance_schema_events_statements_history_long_size 10000
-performance_schema_events_statements_history_size 10
-performance_schema_events_waits_history_long_size 10000
-performance_schema_events_waits_history_size 10
+performance_schema_digests_size 5000
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 20
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 20
+performance_schema_events_waits_history_long_size 1000
+performance_schema_events_waits_history_size 20
performance_schema_hosts_size 100
-performance_schema_max_cond_classes 80
-performance_schema_max_cond_instances 10900
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 23385
+performance_schema_max_file_instances 2500
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 52200
+performance_schema_max_mutex_instances 5858
performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 30800
+performance_schema_max_rwlock_instances 3143
performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 420
-performance_schema_max_stage_classes\t160
-performance_schema_max_table_handles 800
-performance_schema_max_table_instances 12500
+performance_schema_max_socket_instances 300
+performance_schema_max_stage_classes 160
+performance_schema_max_table_handles 2858
+performance_schema_max_table_instances 667
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 500
+performance_schema_max_thread_instances 358
performance_schema_session_connect_attrs_size 512
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/sizing_low.result b/mysql-test/suite/perfschema/r/sizing_low.result
index 4569ebd7a5e..d6d6baeca9a 100644
--- a/mysql-test/suite/perfschema/r/sizing_low.result
+++ b/mysql-test/suite/perfschema/r/sizing_low.result
@@ -7,41 +7,44 @@ table_open_cache 100
show variables like "max_connections";
Variable_name Value
max_connections 50
+show variables like "open_files_limit";
+Variable_name Value
+open_files_limit 1024
show variables where
`Variable_name` != "performance_schema_max_statement_classes" and
`Variable_name` like "performance_schema%";
Variable_name Value
performance_schema ON
-performance_schema_accounts_size 10
-performance_schema_digests_size 1000
-performance_schema_events_stages_history_long_size 100
-performance_schema_events_stages_history_size 5
-performance_schema_events_statements_history_long_size 100
-performance_schema_events_statements_history_size 5
-performance_schema_events_waits_history_long_size 100
-performance_schema_events_waits_history_size 5
-performance_schema_hosts_size 20
-performance_schema_max_cond_classes 80
-performance_schema_max_cond_instances 612
+performance_schema_accounts_size 100
+performance_schema_digests_size 5000
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 20
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 20
+performance_schema_events_waits_history_long_size 1000
+performance_schema_events_waits_history_size 20
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1072
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 1556
+performance_schema_max_file_instances 2500
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 2945
+performance_schema_max_mutex_instances 5215
performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 1612
+performance_schema_max_rwlock_instances 2929
performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 67
-performance_schema_max_stage_classes\t160
-performance_schema_max_table_handles 112
-performance_schema_max_table_instances 445
+performance_schema_max_socket_instances 86
+performance_schema_max_stage_classes 160
+performance_schema_max_table_handles 2858
+performance_schema_max_table_instances 667
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 112
+performance_schema_max_thread_instances 143
performance_schema_session_connect_attrs_size 512
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
-performance_schema_users_size 5
+performance_schema_users_size 100
show status like "%performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
diff --git a/mysql-test/suite/perfschema/r/sizing_med.result b/mysql-test/suite/perfschema/r/sizing_med.result
index 24fba02d16b..f662809b5cd 100644
--- a/mysql-test/suite/perfschema/r/sizing_med.result
+++ b/mysql-test/suite/perfschema/r/sizing_med.result
@@ -7,6 +7,9 @@ table_open_cache 401
show variables like "max_connections";
Variable_name Value
max_connections 152
+show variables like "open_files_limit";
+Variable_name Value
+open_files_limit 1024
show variables where
`Variable_name` != "performance_schema_max_statement_classes" and
`Variable_name` like "performance_schema%";
@@ -15,27 +18,27 @@ performance_schema ON
performance_schema_accounts_size 100
performance_schema_digests_size 5000
performance_schema_events_stages_history_long_size 1000
-performance_schema_events_stages_history_size 10
+performance_schema_events_stages_history_size 20
performance_schema_events_statements_history_long_size 1000
-performance_schema_events_statements_history_size 10
+performance_schema_events_statements_history_size 20
performance_schema_events_waits_history_long_size 1000
-performance_schema_events_waits_history_size 10
+performance_schema_events_waits_history_size 20
performance_schema_hosts_size 100
-performance_schema_max_cond_classes 80
-performance_schema_max_cond_instances 1079
+performance_schema_max_cond_classes 90
+performance_schema_max_cond_instances 1363
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 1754
+performance_schema_max_file_instances 2500
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 4230
+performance_schema_max_mutex_instances 5652
performance_schema_max_rwlock_classes 40
-performance_schema_max_rwlock_instances 2222
+performance_schema_max_rwlock_instances 3075
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 232
-performance_schema_max_stage_classes\t160
-performance_schema_max_table_handles 573
-performance_schema_max_table_instances 556
+performance_schema_max_stage_classes 160
+performance_schema_max_table_handles 2858
+performance_schema_max_table_instances 667
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 289
performance_schema_session_connect_attrs_size 512
diff --git a/mysql-test/suite/perfschema/r/sizing_off.result b/mysql-test/suite/perfschema/r/sizing_off.result
index e49a9824f42..d3c0a0de0a1 100644
--- a/mysql-test/suite/perfschema/r/sizing_off.result
+++ b/mysql-test/suite/perfschema/r/sizing_off.result
@@ -12,7 +12,7 @@ performance_schema_events_statements_history_size -1
performance_schema_events_waits_history_long_size -1
performance_schema_events_waits_history_size -1
performance_schema_hosts_size -1
-performance_schema_max_cond_classes 80
+performance_schema_max_cond_classes 90
performance_schema_max_cond_instances -1
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
@@ -24,7 +24,7 @@ performance_schema_max_rwlock_classes 40
performance_schema_max_rwlock_instances -1
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances -1
-performance_schema_max_stage_classes\t160
+performance_schema_max_stage_classes 160
performance_schema_max_table_handles -1
performance_schema_max_table_instances -1
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_global.result b/mysql-test/suite/perfschema/r/stage_mdl_global.result
index 5dab04b6044..aab68fa7cc7 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_global.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_global.result
@@ -21,7 +21,7 @@ call dump_one_thread('user2');
username event_name sql_text
user2 statement/sql/insert insert into test.t1 values (1), (2), (3)
username event_name nesting_event_type
-user2 stage/sql/Waiting for global read lock STATEMENT
+user2 stage/sql/Waiting for backup lock STATEMENT
username event_name nesting_event_type
user2 stage/sql/Init STATEMENT
user2 stage/sql/Checking permissions STATEMENT
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
index df5373ead87..bb3d0a24db9 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
@@ -21,7 +21,7 @@ show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_cond_classes";
Variable_name Value
-performance_schema_max_cond_classes 80
+performance_schema_max_cond_classes 90
select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/cond/%";
count(*) > 0
diff --git a/mysql-test/suite/perfschema/r/start_server_variables.result b/mysql-test/suite/perfschema/r/start_server_variables.result
index 3f2df9603b3..6199fb94f92 100644
--- a/mysql-test/suite/perfschema/r/start_server_variables.result
+++ b/mysql-test/suite/perfschema/r/start_server_variables.result
@@ -33,7 +33,7 @@ performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 100
-performance_schema_max_cond_classes 80
+performance_schema_max_cond_classes 90
performance_schema_max_cond_instances 1000
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result
index 12cddc08e3b..4142c6b7acd 100644
--- a/mysql-test/suite/perfschema/r/table_schema.result
+++ b/mysql-test/suite/perfschema/r/table_schema.result
@@ -799,6 +799,8 @@ def performance_schema users TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 N
select count(*) from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
and column_name like "%number_of_bytes" into @count_byte_columns;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select @count_byte_columns > 0;
@count_byte_columns > 0
1
@@ -806,12 +808,16 @@ select count(*) from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%number_of_bytes"
and column_type not like "%unsigned" into @count_byte_signed;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select (@count_byte_columns - @count_byte_signed) = 0;
(@count_byte_columns - @count_byte_signed) = 0
1
select count(*) from information_schema.columns
where table_schema="performance_schema" and data_type = "bigint"
and column_name like "%object_instance_begin" into @count_object_columns;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select @count_object_columns > 0;
@count_object_columns > 0
1
@@ -819,6 +825,8 @@ select count(*) from information_schema.columns
where table_schema="performance_schema" and data_type="bigint"
and column_name like "%object_instance_begin"
and column_type like "%unsigned" into @count_object_unsigned;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select (@count_object_columns - @count_object_unsigned) = 0;
(@count_object_columns - @count_object_unsigned) = 0
1
diff --git a/mysql-test/suite/perfschema/t/bad_option_1.test b/mysql-test/suite/perfschema/t/bad_option_1.test
index 1c76dbdc512..bba0d6d5357 100644
--- a/mysql-test/suite/perfschema/t/bad_option_1.test
+++ b/mysql-test/suite/perfschema/t/bad_option_1.test
@@ -4,9 +4,13 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/kill_mysqld.inc
+
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_1.txt;
+--disable_warnings
--error 0,1
--remove_file $outfile
+--enable_warnings
--error 7
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $outfile 2>&1
@@ -32,3 +36,4 @@ perl;
EOF
--remove_file $outfile
+--source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_2.test b/mysql-test/suite/perfschema/t/bad_option_2.test
index ce3e5c3243b..d6c2b905167 100644
--- a/mysql-test/suite/perfschema/t/bad_option_2.test
+++ b/mysql-test/suite/perfschema/t/bad_option_2.test
@@ -4,9 +4,13 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/kill_mysqld.inc
+
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt;
+--disable_warnings
--error 0,1
--remove_file $outfile
+--enable_warnings
--error 3
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --enable-getopt-prefix-matching --performance-schema-max_=12 > $outfile 2>&1
--let SEARCH_PATTERN=ambiguous option '--performance-schema-max_=12'
@@ -14,3 +18,4 @@ let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt;
--source include/search_pattern_in_file.inc
--remove_file $outfile
+--source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_3.test b/mysql-test/suite/perfschema/t/bad_option_3.test
index 63565df14a2..a4efcbccd74 100644
--- a/mysql-test/suite/perfschema/t/bad_option_3.test
+++ b/mysql-test/suite/perfschema/t/bad_option_3.test
@@ -4,9 +4,13 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/kill_mysqld.inc
+
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_3.txt;
+--disable_warnings
--error 0,1
--remove_file $outfile
+--enable_warnings
--error 2
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -x > $outfile 2>&1
@@ -32,3 +36,4 @@ perl;
EOF
--remove_file $outfile
+--source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_4.test b/mysql-test/suite/perfschema/t/bad_option_4.test
index 27a32c201a9..ee8705788bc 100644
--- a/mysql-test/suite/perfschema/t/bad_option_4.test
+++ b/mysql-test/suite/perfschema/t/bad_option_4.test
@@ -4,9 +4,13 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/kill_mysqld.inc
+
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_4.txt;
+--disable_warnings
--error 0,1
--remove_file $outfile
+--enable_warnings
--error 1
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -h bad_option_h_param > $outfile 2>&1
@@ -32,3 +36,4 @@ perl;
EOF
--remove_file $outfile
+--source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/bad_option_5.test b/mysql-test/suite/perfschema/t/bad_option_5.test
index ada8228b249..c9c6fc75d52 100644
--- a/mysql-test/suite/perfschema/t/bad_option_5.test
+++ b/mysql-test/suite/perfschema/t/bad_option_5.test
@@ -4,9 +4,13 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/kill_mysqld.inc
+
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_5.txt;
+--disable_warnings
--error 0,1
--remove_file $outfile
+--enable_warnings
--error 2
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -aXbroken > $outfile 2>&1
@@ -35,3 +39,4 @@ perl;
EOF
--remove_file $outfile
+--source include/start_mysqld.inc
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_ed25519.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_ed25519.test
index 6a97b6d0958..4c68d3af51e 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_ed25519.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_ed25519.test
@@ -23,7 +23,10 @@ source ../include/wait_for_pfs_thread_count.inc;
source ../include/hostcache_set_state.inc;
create user plug1@'santa.claus.ipv4.example.com'
- identified with ed25519 as 'foo';
+ identified with ed25519;
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'foo') where user='plug1';
+flush privileges;
+
create user plug2@'santa.claus.ipv4.example.com'
identified with ED25519 as 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI';
diff --git a/mysql-test/suite/perfschema/t/nesting.test b/mysql-test/suite/perfschema/t/nesting.test
index d0547d8a932..6144d0ff6d3 100644
--- a/mysql-test/suite/perfschema/t/nesting.test
+++ b/mysql-test/suite/perfschema/t/nesting.test
@@ -6,6 +6,8 @@
# event, which changes the test output.
--source include/not_windows.inc
--source include/no_protocol.inc
+# Work around MDEV-24232: WSREP causes extra operations on LOCK_thd_data etc.
+--source include/have_wsrep.inc
--source ../include/wait_for_pfs_thread_count.inc
--disable_query_log
diff --git a/mysql-test/suite/perfschema/t/privilege_table_io.test b/mysql-test/suite/perfschema/t/privilege_table_io.test
index 6f729537072..a74805f5c7b 100644
--- a/mysql-test/suite/perfschema/t/privilege_table_io.test
+++ b/mysql-test/suite/perfschema/t/privilege_table_io.test
@@ -17,7 +17,6 @@
# Therefore we suppress the query_log here.
--echo # We are forced to suppress here the server response.
--disable_result_log
-optimize table mysql.host;
optimize table mysql.user;
optimize table mysql.db;
optimize table mysql.proxies_priv;
diff --git a/mysql-test/suite/perfschema/t/server_init.test b/mysql-test/suite/perfschema/t/server_init.test
index c6d25f18426..36e09adea78 100644
--- a/mysql-test/suite/perfschema/t/server_init.test
+++ b/mysql-test/suite/perfschema/t/server_init.test
@@ -71,9 +71,6 @@ select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_crypt";
select count(name) from mutex_instances
- where name like "wait/synch/mutex/sql/LOCK_slave_list";
-
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_active_mi";
select count(name) from mutex_instances
diff --git a/mysql-test/suite/perfschema/t/sizing_default.cnf b/mysql-test/suite/perfschema/t/sizing_default.cnf
index 6a929998329..0515832d41c 100644
--- a/mysql-test/suite/perfschema/t/sizing_default.cnf
+++ b/mysql-test/suite/perfschema/t/sizing_default.cnf
@@ -1,5 +1,5 @@
-!include include/default_mysqld_autosize.cnf
+!include suite/perfschema/include/default_mysqld_autosize.cnf
[mysqld.1]
@@ -14,6 +14,8 @@
# Automated sizing for everything
+loose-enable-performance-schema
+
loose-performance-schema-accounts-size=-1
loose-performance-schema-digests-size=-1
loose-performance-schema-hosts-size=-1
diff --git a/mysql-test/suite/perfschema/t/sizing_default.test b/mysql-test/suite/perfschema/t/sizing_default.test
index d5fb8be9f77..f8086cc7afd 100644
--- a/mysql-test/suite/perfschema/t/sizing_default.test
+++ b/mysql-test/suite/perfschema/t/sizing_default.test
@@ -5,27 +5,25 @@
--source include/not_valgrind.inc
--source ../include/have_aligned_memory.inc
+#SELECT @@open_files_limit, @@table_open_cache, @@table_definition_cache, @@max_connections;
+#exit;
+
# Skip test if not defaults is used.
-let $max_open_files_limit= `SELECT @@open_files_limit < 5000`;
-if ($max_open_files_limit)
+if (`SELECT @@open_files_limit < 1024`)
{
- skip Need open_files_limit to be at least 5000;
+ skip Need open_files_limit to be at least 1024;
}
-let $max_table_open_cache= `SELECT @@table_open_cache != 2000`;
-if ($max_table_open_cache)
+if (`SELECT @@table_open_cache != 421`)
{
- skip Need table_open_cache to be exactly 2000;
+ skip Need table_open_cache to be exactly 421;
}
-let $max_table_definition_cache= `SELECT @@table_definition_cache != 1400`;
-if ($max_table_definition_cache)
+if (`SELECT @@table_definition_cache != 400`)
{
- skip Need table_definition_cache to be exactly 1400;
+ skip Need table_definition_cache to be exactly 400;
}
-let $max_connections= `SELECT @@max_connections != 151`;
-if ($max_connections)
+if (`SELECT @@max_connections != 151`)
{
skip Need max_connections to be exactly 151;
}
--source ../include/sizing_auto.inc
-
diff --git a/mysql-test/suite/perfschema/t/sizing_high.cnf b/mysql-test/suite/perfschema/t/sizing_high.cnf
index 8445ff60928..519ad79f3ad 100644
--- a/mysql-test/suite/perfschema/t/sizing_high.cnf
+++ b/mysql-test/suite/perfschema/t/sizing_high.cnf
@@ -1,5 +1,5 @@
-!include include/default_mysqld_autosize.cnf
+!include suite/perfschema/include/default_mysqld_autosize.cnf
[mysqld.1]
@@ -32,6 +32,7 @@ open_files_limit=1024
# max_connections*5 = 200*5 = 1000
# Automated sizing for everything
+loose-enable-performance-schema
loose-performance-schema-accounts-size=-1
loose-performance-schema-digests-size=-1
diff --git a/mysql-test/suite/perfschema/t/sizing_low.cnf b/mysql-test/suite/perfschema/t/sizing_low.cnf
index 54c881830cf..79e891bda60 100644
--- a/mysql-test/suite/perfschema/t/sizing_low.cnf
+++ b/mysql-test/suite/perfschema/t/sizing_low.cnf
@@ -1,5 +1,5 @@
-!include include/default_mysqld_autosize.cnf
+!include suite/perfschema/include/default_mysqld_autosize.cnf
[mysqld.1]
@@ -9,6 +9,7 @@ max_connections=50
open_files_limit=1024
# Automated sizing for everything
+loose-enable-performance-schema
loose-performance-schema-accounts-size=-1
loose-performance-schema-digests-size=-1
diff --git a/mysql-test/suite/perfschema/t/sizing_med.cnf b/mysql-test/suite/perfschema/t/sizing_med.cnf
index 8aff531ea69..4a113272e38 100644
--- a/mysql-test/suite/perfschema/t/sizing_med.cnf
+++ b/mysql-test/suite/perfschema/t/sizing_med.cnf
@@ -1,5 +1,5 @@
-!include include/default_mysqld_autosize.cnf
+!include suite/perfschema/include/default_mysqld_autosize.cnf
[mysqld.1]
@@ -9,6 +9,7 @@ max_connections=152
open_files_limit=1024
# Automated sizing for everything
+loose-enable-performance-schema
loose-performance-schema-accounts-size=-1
loose-performance-schema-digests-size=-1
diff --git a/mysql-test/suite/perfschema/t/sizing_off.cnf b/mysql-test/suite/perfschema/t/sizing_off.cnf
index 24ca58bbb0b..80c00494791 100644
--- a/mysql-test/suite/perfschema/t/sizing_off.cnf
+++ b/mysql-test/suite/perfschema/t/sizing_off.cnf
@@ -1,5 +1,5 @@
-!include include/default_mysqld_autosize.cnf
+!include suite/perfschema/include/default_mysqld_autosize.cnf
[mysqld.1]
diff --git a/mysql-test/suite/perfschema/t/stage_mdl_global.test b/mysql-test/suite/perfschema/t/stage_mdl_global.test
index 8863d2da903..03c3d315899 100644
--- a/mysql-test/suite/perfschema/t/stage_mdl_global.test
+++ b/mysql-test/suite/perfschema/t/stage_mdl_global.test
@@ -9,7 +9,7 @@ flush tables with read lock;
connect (con2, localhost, user2, , );
-# Will wait on con1, "Waiting for global read lock"
+# Will wait on con1, "Waiting for backup lock"
--send
insert into test.t1 values (1), (2), (3);
@@ -26,7 +26,7 @@ let $wait_condition=
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user2'
- and PROCESSLIST_STATE = 'Waiting for global read lock';
+ and PROCESSLIST_STATE = 'Waiting for backup lock';
--source include/wait_condition.inc
call dump_one_thread('user1');
diff --git a/mysql-test/suite/period/create_triggers.inc b/mysql-test/suite/period/create_triggers.inc
new file mode 100644
index 00000000000..1126ae0845b
--- /dev/null
+++ b/mysql-test/suite/period/create_triggers.inc
@@ -0,0 +1,38 @@
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+
+create or replace procedure log(s text)
+ insert into log_tbl(log) values(s);
+
+if (!$trig_table)
+{
+ die "No $trig_table specified";
+}
+
+if (!$trig_cols)
+{
+ let $trig_cols= s, e;
+}
+
+let $old_trig_args= `select REGEXP_REPLACE('$trig_cols', '([[:word:]]+)',
+ 'old.\\\\\\\\1')`;
+let $old_trig_args= `select REPLACE('$old_trig_args', ',', ', ", ", ')`;
+let $new_trig_args= `select REGEXP_REPLACE('$trig_cols', '([[:word:]]+)',
+ 'new.\\\\\\\\1')`;
+let $new_trig_args= `select REPLACE('$new_trig_args', ',', ', ", ", ')`;
+
+eval create trigger tr1upd_$trig_table before update on $trig_table
+ for each row call log(CONCAT('>UPD: ', $old_trig_args, ' -> ', $new_trig_args));
+eval create trigger tr2upd_$trig_table after update on $trig_table
+ for each row call log(CONCAT('<UPD: ', $old_trig_args, ' -> ', $new_trig_args));
+eval create trigger tr1del_$trig_table before delete on $trig_table
+ for each row call log(CONCAT('>DEL: ', $old_trig_args));
+eval create trigger tr2del_$trig_table after delete on $trig_table
+ for each row call log(CONCAT('<DEL: ', $old_trig_args));
+eval create trigger tr1ins_$trig_table before insert on $trig_table
+ for each row call log(CONCAT('>INS: ', $new_trig_args));
+eval create trigger tr2ins_$trig_table after insert on $trig_table
+ for each row call log(CONCAT('<INS: ', $new_trig_args));
+
+
+let trig_cols= 0;
+let trig_table= 0;
diff --git a/mysql-test/suite/period/engines.combinations b/mysql-test/suite/period/engines.combinations
new file mode 100644
index 00000000000..b740ec62a42
--- /dev/null
+++ b/mysql-test/suite/period/engines.combinations
@@ -0,0 +1,6 @@
+[innodb]
+innodb
+default-storage-engine=innodb
+
+[myisam]
+default-storage-engine=myisam
diff --git a/mysql-test/suite/period/engines.inc b/mysql-test/suite/period/engines.inc
new file mode 100644
index 00000000000..9a52c7d0640
--- /dev/null
+++ b/mysql-test/suite/period/engines.inc
@@ -0,0 +1,3 @@
+#
+# see engines.combinations
+#
diff --git a/mysql-test/suite/period/r/alter.result b/mysql-test/suite/period/r/alter.result
new file mode 100644
index 00000000000..875dab93b68
--- /dev/null
+++ b/mysql-test/suite/period/r/alter.result
@@ -0,0 +1,206 @@
+set @s= '1992-01-01';
+set @e= '1999-12-31';
+create table t (s date, e date);
+# period start/end columns are implicit NOT NULL
+alter table t add period for a(s, e);
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `a` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t (s date, e date);
+alter table t change s s date, add period for a(s, e);
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `a` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t add id int;
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ `id` int(11) DEFAULT NULL,
+ PERIOD FOR `a` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t drop id;
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `a` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t values(@e, @s);
+ERROR 23000: CONSTRAINT `a` failed for `test`.`t`
+alter table t drop constraint a;
+ERROR HY000: Can't DROP CONSTRAINT `a`. Use DROP PERIOD `a` for this
+# no-op
+alter table t drop period if exists for b;
+Warnings:
+Note 1091 Can't DROP PERIOD `b`; check that it exists
+# no-op
+alter table t add period if not exists for a(e, s);
+Warnings:
+Note 1060 Duplicate column name 'a'
+alter table t drop period if exists for a;
+# no-op
+alter table t drop period if exists for a;
+Warnings:
+Note 1091 Can't DROP PERIOD `a`; check that it exists
+alter table t add period for a(s, e), add period if not exists for a(e, s);
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `a` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t drop period for a;
+# Constraint is dropped
+insert t values(@e, @s);
+alter table t drop period for a;
+ERROR 42000: Can't DROP PERIOD `a`; check that it exists
+alter table t add period for a(s, e), drop period for a;
+ERROR 42000: Can't DROP PERIOD `a`; check that it exists
+truncate t;
+alter table t add period for a(s, e);
+insert t values(@e, @s);
+ERROR 23000: CONSTRAINT `a` failed for `test`.`t`
+alter table t add period for a(s, e), drop period for a;
+insert t values(@e, @s);
+ERROR 23000: CONSTRAINT `a` failed for `test`.`t`
+alter table t add s1 date not null, add period for b(s1, e), drop period for a;
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ `s1` date NOT NULL,
+ PERIOD FOR `b` (`s1`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t(s, s1, e) values(@e, @s, @e);
+insert t(s, s1, e) values(@e, @e, @s);
+ERROR 23000: CONSTRAINT `b` failed for `test`.`t`
+create table t1 like t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ `s1` date NOT NULL,
+ PERIOD FOR `b` (`s1`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t2 (period for b(s,e)) select * from t;
+ERROR 23000: CONSTRAINT `b` failed for `test`.`t2`
+create table t2 (period for b(s1,e)) select * from t;
+drop table t2;
+# SQL16 11.27 <add table period definition>, Syntax Rules, 5)g)
+# The declared type of BC1 shall be either DATE or a timestamp type
+# and shall be equivalent to the declared type of BC2.
+create or replace table t (s timestamp not null, e timestamp(6) not null);
+alter table t add period for a(s, e);
+ERROR HY000: Fields of PERIOD FOR `a` have different types
+# SQL16 11.27 <add table period definition>, Syntax Rules, 5)c)
+# No column of T shall have a column name that is equivalent to ATPN.
+create or replace table t (a int, s date, e date);
+alter table t add period for a(s, e);
+ERROR 42S21: Duplicate column name 'a'
+# SQL16 11.27 <add table period definition>, Syntax Rules, 5)i)
+# Neither BC1 nor BC2 shall be an identity column, a generated column,
+# a system-time period start column, or a system-time period end column.
+create or replace table t (id int primary key,
+s date,
+e date generated always as (s+1));
+alter table t add period for a(s, e);
+ERROR HY000: Period field `e` cannot be GENERATED ALWAYS AS
+create or replace table t (id int primary key,
+s date,
+e date as (s+1) VIRTUAL);
+alter table t add period for a(s, e);
+ERROR HY000: Period field `e` cannot be GENERATED ALWAYS AS
+create or replace table t (id int primary key, s timestamp(6), e timestamp(6),
+st timestamp(6) as row start,
+en timestamp(6) as row end,
+period for system_time (st, en)) with system versioning;
+alter table t add period for a(s, en);
+ERROR HY000: Period field `en` cannot be GENERATED ALWAYS AS
+# SQL16 11.27 <add table period definition>, Syntax Rules, 5)b)
+# The table descriptor of T shall not include a period descriptor other
+# than a system-time period descriptor.
+alter table t add period for a(s, e);
+alter table t add period for b(s, e);
+ERROR HY000: Cannot specify more than one application-time period
+# SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)e)v)2)B)
+# Let S be the schema identified by the explicit or implicit
+# <schema name> of TN. Let IDCN be an implementation-dependent
+# <constraint name> that is not equivalent to the <constraint name> of
+# any table constraint descriptor included in S. The following
+# <table constraint definition> is implicit:
+# CONSTRAINT IDCN CHECK ( CN1 < CN2 )
+#
+# Due to the above standard limitation, the constraint name can't always
+# match the period name. So it matches when possible; and when not, it
+# is unique not taken name prefixed with period name.
+create or replace table t (x int, s date, e date,
+period for mytime(s, e));
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `x` int(11) DEFAULT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `mytime` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+alter table t add constraint mytime check (x > 1);
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `x` int(11) DEFAULT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `mytime` (`s`, `e`),
+ CONSTRAINT `mytime` CHECK (`x` > 1)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t values (2, @e, @s);
+ERROR 23000: CONSTRAINT `mytime_1` failed for `test`.`t`
+alter table t add constraint mytime_1 check (x > 2);
+insert t values (3, @e, @s);
+ERROR 23000: CONSTRAINT `mytime_2` failed for `test`.`t`
+drop table t;
+#
+# MDEV-20494 ER_NOT_FORM_FILE or assertion upon adding partition to period table
+#
+create table t1 (f date, t date, period for app(f,t)) with system versioning partition by system_time ( partition p1 history, partition pn current );
+lock table t1 write;
+alter table t1 add partition (partition p2 history);
+Warnings:
+Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
+unlock tables;
+create or replace table t1 (x int, s date, e date, period for app(s,e));
+insert into t1 values(1, '2020-03-01', '2020-03-02');
+insert into t1 values(1, '2020-03-01', '2020-03-02');
+alter table t1 add primary key(x, s, e);
+ERROR 23000: Duplicate entry '1-2020-03-01-2020-03-02' for key 'PRIMARY'
+alter table t1 add system versioning;
+drop table t1;
+#
+# MDEV-18873 Server crashes in Compare_identifiers::operator or in
+# my_strcasecmp_utf8 upon ADD PERIOD IF NOT EXISTS with empty name
+#
+alter table t add period if not exists for `` (s,e);
+ERROR 42000: Incorrect column name ''
+create table t(s DATE, e DATE);
+alter table t add period if not exists for `` (s,e);
+ERROR 42000: Incorrect column name ''
+alter table t add period if not exists for ` ` (s,e);
+ERROR 42000: Incorrect column name ' '
+create table t2 (period for `` (s,e)) select * from t;
+ERROR 42000: Incorrect column name ''
+drop table t;
diff --git a/mysql-test/suite/period/r/create.result b/mysql-test/suite/period/r/create.result
new file mode 100644
index 00000000000..da4cf998918
--- /dev/null
+++ b/mysql-test/suite/period/r/create.result
@@ -0,0 +1,102 @@
+create table t (id int primary key, s date, e date, period for mytime(s,e));
+# CONSTRAINT CHECK (s < e) is added implicitly, and shouldn't be shown
+# this is important for correct command-based replication
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `id` int(11) NOT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PRIMARY KEY (`id`),
+ PERIOD FOR `mytime` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t (id int primary key, s timestamp(6), e timestamp(6),
+period for mytime(s,e));
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `id` int(11) NOT NULL,
+ `s` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ `e` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+ PRIMARY KEY (`id`),
+ PERIOD FOR `mytime` (`s`, `e`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+# SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)a)
+# 2) If a <table period definition> TPD is specified, then:
+# a) <table scope> shall not be specified.
+create or replace temporary table t (s date, e date, period for mytime(s,e));
+ERROR HY000: Application-time period table cannot be temporary
+# SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)e)iii)
+# The <data type or domain name> contained in CD1 is either DATE or a
+# timestamp type and it is equivalent to the <data type or domain name>
+# contained in CD2.
+create or replace table t (id int primary key, s datetime, e date,
+period for mytime(s,e));
+ERROR HY000: Fields of PERIOD FOR `mytime` have different types
+create or replace table t (s timestamp(2), e timestamp(6),
+period for mytime(s,e));
+ERROR HY000: Fields of PERIOD FOR `mytime` have different types
+create or replace table t (id int primary key, s int, e date,
+period for mytime(s,e));
+ERROR 42000: Incorrect column specifier for column 's'
+create or replace table t (id int primary key, s time, e time,
+period for mytime(s,e));
+ERROR 42000: Incorrect column specifier for column 's'
+create or replace table t (id int primary key, s date, e date,
+period for mytime(s,x));
+ERROR 42S22: Unknown column 'x' in 'mytime'
+# MDEV-18842: Unfortunate error message when the same column is used
+# for application period start and end
+create or replace table t (s date, t date, period for apt(s,s));
+ERROR 42000: Column 's' specified twice
+create or replace table t (id int primary key, s date, e date,
+period for mytime(s,e),
+period for mytime2(s,e));
+ERROR HY000: Cannot specify more than one application-time period
+# SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)d)
+# No <column name> in any <column definition> shall be equivalent to PN.
+create or replace table t (mytime int, s date, e date,
+period for mytime(s,e));
+ERROR 42S21: Duplicate column name 'mytime'
+# SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)e)v)2)A)
+# Neither CD1 nor CD2 shall contain an <identity column specification>, a
+# <generation clause>, a <system time period start column specification>,
+# or a <system time period end column specification>.
+create or replace table t (id int primary key,
+s date,
+e date generated always as (s+1),
+period for mytime(s,e));
+ERROR HY000: Period field `e` cannot be GENERATED ALWAYS AS
+create or replace table t (id int primary key,
+s date,
+e date as (s+1) VIRTUAL,
+period for mytime(s,e));
+ERROR HY000: Period field `e` cannot be GENERATED ALWAYS AS
+create or replace table t (id int primary key, s timestamp(6), e timestamp(6),
+st timestamp(6) as row start,
+en timestamp(6) as row end,
+period for system_time (st, en),
+period for mytime(st,e)) with system versioning;
+ERROR HY000: Period field `st` cannot be GENERATED ALWAYS AS
+# SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)
+# Let IDCN be an implementation-dependent <constraint name> that is not
+# equivalent to the <constraint name> of any table constraint descriptor
+# included in S.
+create or replace table t (x int, s date, e date,
+period for mytime(s, e),
+constraint mytime check (x > 1));
+show create table t;
+Table Create Table
+t CREATE TABLE `t` (
+ `x` int(11) DEFAULT NULL,
+ `s` date NOT NULL,
+ `e` date NOT NULL,
+ PERIOD FOR `mytime` (`s`, `e`),
+ CONSTRAINT `mytime` CHECK (`x` > 1)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t values (2, '2001-01-01', '2001-01-01');
+ERROR 23000: CONSTRAINT `mytime_1` failed for `test`.`t`
+show status like "Feature_application_time_periods";
+Variable_name Value
+Feature_application_time_periods 6
+drop table t;
diff --git a/mysql-test/suite/period/r/delete,myisam.rdiff b/mysql-test/suite/period/r/delete,myisam.rdiff
new file mode 100644
index 00000000000..78fb972b0bc
--- /dev/null
+++ b/mysql-test/suite/period/r/delete,myisam.rdiff
@@ -0,0 +1,18 @@
+--- suite/period/r/delete.result 2019-02-16 11:14:23.511258191 +0100
++++ suite/period/r/delete.reject 2019-02-16 11:14:32.869258690 +0100
+@@ -250,7 +250,6 @@
+ ERROR 22003: Out of range value for column 'id' at row 1
+ select * from t;
+ id s e
+-127 1999-01-01 2018-12-12
+ # same for trigger case
+ create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+ create or replace procedure log(s text)
+@@ -277,7 +276,6 @@
+ ERROR 22003: Out of range value for column 'id' at row 1
+ select * from t;
+ id s e
+-127 1999-01-01 2018-12-12
+ select * from log_tbl order by id;
+ id log
+ 1 >DEL: 1999-01-01, 2018-12-12
diff --git a/mysql-test/suite/period/r/delete.result b/mysql-test/suite/period/r/delete.result
new file mode 100644
index 00000000000..a58f57761b6
--- /dev/null
+++ b/mysql-test/suite/period/r/delete.result
@@ -0,0 +1,390 @@
+create table t (id int, s date, e date, period for apptime(s,e));
+insert into t values(1, '1999-01-01', '2018-12-12');
+insert into t values(1, '1999-01-01', '2017-01-01');
+insert into t values(1, '2017-01-01', '2019-01-01');
+insert into t values(2, '1998-01-01', '2018-12-12');
+insert into t values(3, '1997-01-01', '2015-01-01');
+insert into t values(4, '2016-01-01', '2020-01-01');
+insert into t values(5, '2010-01-01', '2015-01-01');
+create or replace table t1 (id int, s date, e date, period for apptime(s,e));
+insert t1 select * from t;
+create or replace table t2 (id int, s date, e date, period for apptime(s,e));
+insert t2 select * from t;
+create or replace table t3 (id int, s date, e date, period for apptime(s,e));
+insert t3 select * from t;
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t1 before update on t1
+for each row call log(CONCAT('>UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2upd_t1 after update on t1
+for each row call log(CONCAT('<UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr1del_t1 before delete on t1
+for each row call log(CONCAT('>DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr2del_t1 after delete on t1
+for each row call log(CONCAT('<DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr1ins_t1 before insert on t1
+for each row call log(CONCAT('>INS: ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2ins_t1 after insert on t1
+for each row call log(CONCAT('<INS: ', new.id, ", ", new.s, ", ", new.e));
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+delete from t1 for portion of APPTIME from '2000-01-01' to '2018-01-01';
+select * from t;
+id s e
+1 1999-01-01 2000-01-01
+1 1999-01-01 2000-01-01
+1 2018-01-01 2018-12-12
+1 2018-01-01 2019-01-01
+2 1998-01-01 2000-01-01
+2 2018-01-01 2018-12-12
+3 1997-01-01 2000-01-01
+4 2018-01-01 2020-01-01
+select * from t1;
+id s e
+1 1999-01-01 2000-01-01
+1 1999-01-01 2000-01-01
+1 2018-01-01 2018-12-12
+1 2018-01-01 2019-01-01
+2 1998-01-01 2000-01-01
+2 2018-01-01 2018-12-12
+3 1997-01-01 2000-01-01
+4 2018-01-01 2020-01-01
+select * from log_tbl order by id;
+id log
+1 >DEL: 1, 1999-01-01, 2018-12-12
+2 >INS: 1, 1999-01-01, 2000-01-01
+3 <INS: 1, 1999-01-01, 2000-01-01
+4 >INS: 1, 2018-01-01, 2018-12-12
+5 <INS: 1, 2018-01-01, 2018-12-12
+6 <DEL: 1, 1999-01-01, 2018-12-12
+7 >DEL: 1, 1999-01-01, 2017-01-01
+8 >INS: 1, 1999-01-01, 2000-01-01
+9 <INS: 1, 1999-01-01, 2000-01-01
+10 <DEL: 1, 1999-01-01, 2017-01-01
+11 >DEL: 1, 2017-01-01, 2019-01-01
+12 >INS: 1, 2018-01-01, 2019-01-01
+13 <INS: 1, 2018-01-01, 2019-01-01
+14 <DEL: 1, 2017-01-01, 2019-01-01
+15 >DEL: 2, 1998-01-01, 2018-12-12
+16 >INS: 2, 1998-01-01, 2000-01-01
+17 <INS: 2, 1998-01-01, 2000-01-01
+18 >INS: 2, 2018-01-01, 2018-12-12
+19 <INS: 2, 2018-01-01, 2018-12-12
+20 <DEL: 2, 1998-01-01, 2018-12-12
+21 >DEL: 3, 1997-01-01, 2015-01-01
+22 >INS: 3, 1997-01-01, 2000-01-01
+23 <INS: 3, 1997-01-01, 2000-01-01
+24 <DEL: 3, 1997-01-01, 2015-01-01
+25 >DEL: 4, 2016-01-01, 2020-01-01
+26 >INS: 4, 2018-01-01, 2020-01-01
+27 <INS: 4, 2018-01-01, 2020-01-01
+28 <DEL: 4, 2016-01-01, 2020-01-01
+29 >DEL: 5, 2010-01-01, 2015-01-01
+30 <DEL: 5, 2010-01-01, 2015-01-01
+# INSERT trigger only also works
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t2 before update on t2
+for each row call log(CONCAT('>UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2upd_t2 after update on t2
+for each row call log(CONCAT('<UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr1del_t2 before delete on t2
+for each row call log(CONCAT('>DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr2del_t2 after delete on t2
+for each row call log(CONCAT('<DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr1ins_t2 before insert on t2
+for each row call log(CONCAT('>INS: ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2ins_t2 after insert on t2
+for each row call log(CONCAT('<INS: ', new.id, ", ", new.s, ", ", new.e));
+drop trigger tr1del_t2;
+drop trigger tr2del_t2;
+delete from t2 for portion of APPTIME from '2000-01-01' to '2018-01-01';
+select * from log_tbl order by id;
+id log
+1 >INS: 1, 1999-01-01, 2000-01-01
+2 <INS: 1, 1999-01-01, 2000-01-01
+3 >INS: 1, 2018-01-01, 2018-12-12
+4 <INS: 1, 2018-01-01, 2018-12-12
+5 >INS: 1, 1999-01-01, 2000-01-01
+6 <INS: 1, 1999-01-01, 2000-01-01
+7 >INS: 1, 2018-01-01, 2019-01-01
+8 <INS: 1, 2018-01-01, 2019-01-01
+9 >INS: 2, 1998-01-01, 2000-01-01
+10 <INS: 2, 1998-01-01, 2000-01-01
+11 >INS: 2, 2018-01-01, 2018-12-12
+12 <INS: 2, 2018-01-01, 2018-12-12
+13 >INS: 3, 1997-01-01, 2000-01-01
+14 <INS: 3, 1997-01-01, 2000-01-01
+15 >INS: 4, 2018-01-01, 2020-01-01
+16 <INS: 4, 2018-01-01, 2020-01-01
+# removing BEFORE INSERT trigger enables internal substitution
+# DELETE+INSERT -> UPDATE, but without any side effects.
+# The optimization is disabled for non-transactional engines
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t3 before update on t3
+for each row call log(CONCAT('>UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr2upd_t3 after update on t3
+for each row call log(CONCAT('<UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr1del_t3 before delete on t3
+for each row call log(CONCAT('>DEL: ', old.s, ", ", old.e));
+create trigger tr2del_t3 after delete on t3
+for each row call log(CONCAT('<DEL: ', old.s, ", ", old.e));
+create trigger tr1ins_t3 before insert on t3
+for each row call log(CONCAT('>INS: ', new.s, ", ", new.e));
+create trigger tr2ins_t3 after insert on t3
+for each row call log(CONCAT('<INS: ', new.s, ", ", new.e));
+drop trigger tr1ins_t3;
+delete from t3 for portion of APPTIME from '2000-01-01' to '2018-01-01';
+select * from log_tbl order by id;
+id log
+1 >DEL: 1999-01-01, 2018-12-12
+2 <INS: 1999-01-01, 2000-01-01
+3 <INS: 2018-01-01, 2018-12-12
+4 <DEL: 1999-01-01, 2018-12-12
+5 >DEL: 1999-01-01, 2017-01-01
+6 <INS: 1999-01-01, 2000-01-01
+7 <DEL: 1999-01-01, 2017-01-01
+8 >DEL: 2017-01-01, 2019-01-01
+9 <INS: 2018-01-01, 2019-01-01
+10 <DEL: 2017-01-01, 2019-01-01
+11 >DEL: 1998-01-01, 2018-12-12
+12 <INS: 1998-01-01, 2000-01-01
+13 <INS: 2018-01-01, 2018-12-12
+14 <DEL: 1998-01-01, 2018-12-12
+15 >DEL: 1997-01-01, 2015-01-01
+16 <INS: 1997-01-01, 2000-01-01
+17 <DEL: 1997-01-01, 2015-01-01
+18 >DEL: 2016-01-01, 2020-01-01
+19 <INS: 2018-01-01, 2020-01-01
+20 <DEL: 2016-01-01, 2020-01-01
+21 >DEL: 2010-01-01, 2015-01-01
+22 <DEL: 2010-01-01, 2015-01-01
+# multi-table DELETE is not possible
+delete t, t1 from t1, t for portion of apptime from '2000-01-01' to '2018-01-01';
+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 'for portion of apptime from '2000-01-01' to '2018-01-01'' at line 1
+delete t for portion of apptime from '2000-01-01' to '2018-01-01', t1 from t, t1;
+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 'for portion of apptime from '2000-01-01' to '2018-01-01', t1 from t, t1' at line 1
+# Here another check fails before parsing ends
+delete t, t1 from t for portion of apptime from '2000-01-01' to '2018-01-01', t1;
+ERROR 42S02: Unknown table 't1' in MULTI DELETE
+delete history from t2 for portion of apptime from '2000-01-01' to '2018-01-01';
+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 'for portion of apptime from '2000-01-01' to '2018-01-01'' at line 1
+delete from t for portion of othertime from '2000-01-01' to '2018-01-01';
+ERROR HY000: Period `othertime` is not found in table
+delete from t for portion of system_time from '2000-01-01' to '2018-01-01';
+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 'of system_time from '2000-01-01' to '2018-01-01'' at line 1
+create or replace table t (id int, str text, s date, e date,
+period for apptime(s,e));
+insert into t values(1, 'data', '1999-01-01', '2018-12-12');
+insert into t values(1, 'other data', '1999-01-01', '2018-12-12');
+insert into t values(1, 'deleted', '2000-01-01', '2018-01-01');
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+show warnings;
+Level Code Message
+select * from t;
+id str s e
+1 data 1999-01-01 2000-01-01
+1 data 2018-01-01 2018-12-12
+1 other data 1999-01-01 2000-01-01
+1 other data 2018-01-01 2018-12-12
+drop table t1;
+# SQL16, Part 2, 15.7 <Effect of deleting rows from base tables>,
+# General rules, 8)b)i)
+# If the column descriptor that corresponds to the i-th field of BR
+# describes an identity column, a generated column, a system-time period
+# start column, or a system-time period end column, then let V i be
+# DEFAULT.
+# auto_increment field is updated
+create or replace table t (id int primary key auto_increment, s date, e date,
+period for apptime(s, e));
+insert into t values (default, '1999-01-01', '2018-12-12');
+select * from t;
+id s e
+1 1999-01-01 2018-12-12
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select * from t;
+id s e
+2 1999-01-01 2000-01-01
+3 2018-01-01 2018-12-12
+truncate t;
+# same for trigger case
+insert into t values (default, '1999-01-01', '2018-12-12');
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t before update on t
+for each row call log(CONCAT('>UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr2upd_t after update on t
+for each row call log(CONCAT('<UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr1del_t before delete on t
+for each row call log(CONCAT('>DEL: ', old.s, ", ", old.e));
+create trigger tr2del_t after delete on t
+for each row call log(CONCAT('<DEL: ', old.s, ", ", old.e));
+create trigger tr1ins_t before insert on t
+for each row call log(CONCAT('>INS: ', new.s, ", ", new.e));
+create trigger tr2ins_t after insert on t
+for each row call log(CONCAT('<INS: ', new.s, ", ", new.e));
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select * from t;
+id s e
+2 1999-01-01 2000-01-01
+3 2018-01-01 2018-12-12
+select * from log_tbl order by id;
+id log
+1 >DEL: 1999-01-01, 2018-12-12
+2 >INS: 1999-01-01, 2000-01-01
+3 <INS: 1999-01-01, 2000-01-01
+4 >INS: 2018-01-01, 2018-12-12
+5 <INS: 2018-01-01, 2018-12-12
+6 <DEL: 1999-01-01, 2018-12-12
+# generated columns are updated
+create or replace table t (s date, e date,
+xs date as (s) stored, xe date as (e) stored,
+period for apptime(s, e));
+insert into t values('1999-01-01', '2018-12-12', default, default);
+select * from t;
+s e xs xe
+1999-01-01 2018-12-12 1999-01-01 2018-12-12
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select * from t;
+s e xs xe
+1999-01-01 2000-01-01 1999-01-01 2000-01-01
+2018-01-01 2018-12-12 2018-01-01 2018-12-12
+truncate t;
+# same for trigger case
+insert into t values('1999-01-01', '2018-12-12', default, default);
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t before update on t
+for each row call log(CONCAT('>UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr2upd_t after update on t
+for each row call log(CONCAT('<UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr1del_t before delete on t
+for each row call log(CONCAT('>DEL: ', old.s, ", ", old.e));
+create trigger tr2del_t after delete on t
+for each row call log(CONCAT('<DEL: ', old.s, ", ", old.e));
+create trigger tr1ins_t before insert on t
+for each row call log(CONCAT('>INS: ', new.s, ", ", new.e));
+create trigger tr2ins_t after insert on t
+for each row call log(CONCAT('<INS: ', new.s, ", ", new.e));
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select * from t;
+s e xs xe
+1999-01-01 2000-01-01 1999-01-01 2000-01-01
+2018-01-01 2018-12-12 2018-01-01 2018-12-12
+select * from log_tbl order by id;
+id log
+1 >DEL: 1999-01-01, 2018-12-12
+2 >INS: 1999-01-01, 2000-01-01
+3 <INS: 1999-01-01, 2000-01-01
+4 >INS: 2018-01-01, 2018-12-12
+5 <INS: 2018-01-01, 2018-12-12
+6 <DEL: 1999-01-01, 2018-12-12
+# View can't be used
+create or replace view v as select * from t;
+delete from v for portion of p from '2000-01-01' to '2018-01-01';
+ERROR 42S02: 'v' is a view
+# View can't be used
+create or replace view v as select t.* from t, t as t1;
+delete from v for portion of p from '2000-01-01' to '2018-01-01';
+ERROR HY000: Can not delete from join view 'test.v'
+# auto_increment field overflow
+create or replace table t (id tinyint auto_increment primary key,
+s date, e date, period for apptime(s,e));
+insert into t values(127, '1999-01-01', '2018-12-12');
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+ERROR 22003: Out of range value for column 'id' at row 1
+select * from t;
+id s e
+127 1999-01-01 2018-12-12
+# same for trigger case
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t before update on t
+for each row call log(CONCAT('>UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr2upd_t after update on t
+for each row call log(CONCAT('<UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr1del_t before delete on t
+for each row call log(CONCAT('>DEL: ', old.s, ", ", old.e));
+create trigger tr2del_t after delete on t
+for each row call log(CONCAT('<DEL: ', old.s, ", ", old.e));
+create trigger tr1ins_t before insert on t
+for each row call log(CONCAT('>INS: ', new.s, ", ", new.e));
+create trigger tr2ins_t after insert on t
+for each row call log(CONCAT('<INS: ', new.s, ", ", new.e));
+# negotiate side effects of non-transactional MyISAM engine
+replace into t values(127, '1999-01-01', '2018-12-12');
+select * from t;
+id s e
+127 1999-01-01 2018-12-12
+truncate table log_tbl;
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+ERROR 22003: Out of range value for column 'id' at row 1
+select * from t;
+id s e
+127 1999-01-01 2018-12-12
+select * from log_tbl order by id;
+id log
+1 >DEL: 1999-01-01, 2018-12-12
+# custom constraint for period fields
+create or replace table t(id int, s date, e date, period for apptime(s,e),
+constraint dist2days check (datediff(e, s) >= 2));
+insert into t values(1, '1999-01-01', '2018-12-12'),
+(2, '1999-01-01', '1999-12-12');
+delete from t for portion of apptime from '1999-01-02' to '2018-12-12';
+ERROR 23000: CONSTRAINT `dist2days` failed for `test`.`t`
+# negotiate side effects of non-transactional MyISAM engine
+truncate t;
+insert into t values(1, '1999-01-01', '2018-12-12'),
+(2, '1999-01-01', '1999-12-12');
+delete from t for portion of apptime from '1999-01-01' to '2018-12-11';
+ERROR 23000: CONSTRAINT `dist2days` failed for `test`.`t`
+truncate t;
+insert into t values(1, '1999-01-01', '2018-12-12'),
+(2, '1999-01-01', '1999-12-12');
+delete from t for portion of apptime from '1999-01-03' to '2018-12-10';
+select *, datediff(e, s) from t;
+id s e datediff(e, s)
+1 1999-01-01 1999-01-03 2
+1 2018-12-10 2018-12-12 2
+2 1999-01-01 1999-01-03 2
+#
+# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
+#
+create or replace table t1 (id int, s date, e date, period for apptime(s,e));
+create or replace procedure sp()
+delete from t1 for portion of othertime from '2000-01-01' to '2018-01-01';
+call sp;
+ERROR HY000: Period `othertime` is not found in table
+call sp;
+ERROR HY000: Period `othertime` is not found in table
+drop table t1;
+drop procedure sp;
+drop table t,t2,t3,log_tbl;
+drop view v;
+drop procedure log;
+# MDEV-19130 Assertion
+# `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
+# failed in handler::update_auto_increment after error 167
+create or replace table t (f tinyint auto_increment null,
+s timestamp, e timestamp,
+period for app(s,e), key(f, s));
+insert into t (s,e) values
+('2021-08-22 10:28:43', '2023-09-17 00:00:00'),
+('2019-05-09 21:45:24', '2020-04-22 14:38:49');
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+insert into t (s,e) values ('2015-07-07 00:00:00','2020-03-11 08:48:52');
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+insert into t select * from t;
+ERROR 22003: Out of range value for column 'f' at row ROW
+delete ignore from t
+for portion of app from '2015-07-07 00:00:00' to '2020-03-11 08:48:52';
+drop table t;
diff --git a/mysql-test/suite/period/r/update.result b/mysql-test/suite/period/r/update.result
new file mode 100644
index 00000000000..f726b4c07cf
--- /dev/null
+++ b/mysql-test/suite/period/r/update.result
@@ -0,0 +1,309 @@
+create table t (id int, s date, e date, period for apptime(s,e));
+insert into t values(1, '1999-01-01', '2018-12-12');
+insert into t values(1, '1999-01-01', '2017-01-01');
+insert into t values(1, '2017-01-01', '2019-01-01');
+insert into t values(2, '1998-01-01', '2018-12-12');
+insert into t values(3, '1997-01-01', '2015-01-01');
+insert into t values(4, '2016-01-01', '2020-01-01');
+insert into t values(5, '2010-01-01', '2015-01-01');
+create or replace table t1 (id int, s date, e date, period for apptime(s,e));
+insert t1 select * from t;
+create or replace table t2 (id int, s date, e date, period for apptime(s,e));
+insert t2 select * from t;
+update t for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id=id + 6;
+select * from t;
+id s e
+1 1999-01-01 2000-01-01
+1 1999-01-01 2000-01-01
+1 2018-01-01 2018-12-12
+1 2018-01-01 2019-01-01
+10 2016-01-01 2018-01-01
+11 2010-01-01 2015-01-01
+2 1998-01-01 2000-01-01
+2 2018-01-01 2018-12-12
+3 1997-01-01 2000-01-01
+4 2018-01-01 2020-01-01
+7 2000-01-01 2017-01-01
+7 2000-01-01 2018-01-01
+7 2017-01-01 2018-01-01
+8 2000-01-01 2018-01-01
+9 2000-01-01 2015-01-01
+# Check triggers
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t1 before update on t1
+for each row call log(CONCAT('>UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2upd_t1 after update on t1
+for each row call log(CONCAT('<UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr1del_t1 before delete on t1
+for each row call log(CONCAT('>DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr2del_t1 after delete on t1
+for each row call log(CONCAT('<DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr1ins_t1 before insert on t1
+for each row call log(CONCAT('>INS: ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2ins_t1 after insert on t1
+for each row call log(CONCAT('<INS: ', new.id, ", ", new.s, ", ", new.e));
+update t1 for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id=id + 6;
+select * from t1;
+id s e
+1 1999-01-01 2000-01-01
+1 1999-01-01 2000-01-01
+1 2018-01-01 2018-12-12
+1 2018-01-01 2019-01-01
+10 2016-01-01 2018-01-01
+11 2010-01-01 2015-01-01
+2 1998-01-01 2000-01-01
+2 2018-01-01 2018-12-12
+3 1997-01-01 2000-01-01
+4 2018-01-01 2020-01-01
+7 2000-01-01 2017-01-01
+7 2000-01-01 2018-01-01
+7 2017-01-01 2018-01-01
+8 2000-01-01 2018-01-01
+9 2000-01-01 2015-01-01
+select * from log_tbl order by id;
+id log
+1 >UPD: 1, 1999-01-01, 2018-12-12 -> 7, 2000-01-01, 2018-01-01
+2 >INS: 1, 1999-01-01, 2000-01-01
+3 <INS: 1, 1999-01-01, 2000-01-01
+4 >INS: 1, 2018-01-01, 2018-12-12
+5 <INS: 1, 2018-01-01, 2018-12-12
+6 <UPD: 1, 1999-01-01, 2018-12-12 -> 7, 2000-01-01, 2018-01-01
+7 >UPD: 1, 1999-01-01, 2017-01-01 -> 7, 2000-01-01, 2017-01-01
+8 >INS: 1, 1999-01-01, 2000-01-01
+9 <INS: 1, 1999-01-01, 2000-01-01
+10 <UPD: 1, 1999-01-01, 2017-01-01 -> 7, 2000-01-01, 2017-01-01
+11 >UPD: 1, 2017-01-01, 2019-01-01 -> 7, 2017-01-01, 2018-01-01
+12 >INS: 1, 2018-01-01, 2019-01-01
+13 <INS: 1, 2018-01-01, 2019-01-01
+14 <UPD: 1, 2017-01-01, 2019-01-01 -> 7, 2017-01-01, 2018-01-01
+15 >UPD: 2, 1998-01-01, 2018-12-12 -> 8, 2000-01-01, 2018-01-01
+16 >INS: 2, 1998-01-01, 2000-01-01
+17 <INS: 2, 1998-01-01, 2000-01-01
+18 >INS: 2, 2018-01-01, 2018-12-12
+19 <INS: 2, 2018-01-01, 2018-12-12
+20 <UPD: 2, 1998-01-01, 2018-12-12 -> 8, 2000-01-01, 2018-01-01
+21 >UPD: 3, 1997-01-01, 2015-01-01 -> 9, 2000-01-01, 2015-01-01
+22 >INS: 3, 1997-01-01, 2000-01-01
+23 <INS: 3, 1997-01-01, 2000-01-01
+24 <UPD: 3, 1997-01-01, 2015-01-01 -> 9, 2000-01-01, 2015-01-01
+25 >UPD: 4, 2016-01-01, 2020-01-01 -> 10, 2016-01-01, 2018-01-01
+26 >INS: 4, 2018-01-01, 2020-01-01
+27 <INS: 4, 2018-01-01, 2020-01-01
+28 <UPD: 4, 2016-01-01, 2020-01-01 -> 10, 2016-01-01, 2018-01-01
+29 >UPD: 5, 2010-01-01, 2015-01-01 -> 11, 2010-01-01, 2015-01-01
+30 <UPD: 5, 2010-01-01, 2015-01-01 -> 11, 2010-01-01, 2015-01-01
+# INSERT trigger only also works
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t2 before update on t2
+for each row call log(CONCAT('>UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2upd_t2 after update on t2
+for each row call log(CONCAT('<UPD: ', old.id, ", ", old.s, ", ", old.e, ' -> ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr1del_t2 before delete on t2
+for each row call log(CONCAT('>DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr2del_t2 after delete on t2
+for each row call log(CONCAT('<DEL: ', old.id, ", ", old.s, ", ", old.e));
+create trigger tr1ins_t2 before insert on t2
+for each row call log(CONCAT('>INS: ', new.id, ", ", new.s, ", ", new.e));
+create trigger tr2ins_t2 after insert on t2
+for each row call log(CONCAT('<INS: ', new.id, ", ", new.s, ", ", new.e));
+drop trigger tr1upd_t2;
+drop trigger tr2upd_t2;
+update t2 for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id=id + 6;
+select * from t2;
+id s e
+1 1999-01-01 2000-01-01
+1 1999-01-01 2000-01-01
+1 2018-01-01 2018-12-12
+1 2018-01-01 2019-01-01
+10 2016-01-01 2018-01-01
+11 2010-01-01 2015-01-01
+2 1998-01-01 2000-01-01
+2 2018-01-01 2018-12-12
+3 1997-01-01 2000-01-01
+4 2018-01-01 2020-01-01
+7 2000-01-01 2017-01-01
+7 2000-01-01 2018-01-01
+7 2017-01-01 2018-01-01
+8 2000-01-01 2018-01-01
+9 2000-01-01 2015-01-01
+select * from log_tbl order by id;
+id log
+1 >INS: 1, 1999-01-01, 2000-01-01
+2 <INS: 1, 1999-01-01, 2000-01-01
+3 >INS: 1, 2018-01-01, 2018-12-12
+4 <INS: 1, 2018-01-01, 2018-12-12
+5 >INS: 1, 1999-01-01, 2000-01-01
+6 <INS: 1, 1999-01-01, 2000-01-01
+7 >INS: 1, 2018-01-01, 2019-01-01
+8 <INS: 1, 2018-01-01, 2019-01-01
+9 >INS: 2, 1998-01-01, 2000-01-01
+10 <INS: 2, 1998-01-01, 2000-01-01
+11 >INS: 2, 2018-01-01, 2018-12-12
+12 <INS: 2, 2018-01-01, 2018-12-12
+13 >INS: 3, 1997-01-01, 2000-01-01
+14 <INS: 3, 1997-01-01, 2000-01-01
+15 >INS: 4, 2018-01-01, 2020-01-01
+16 <INS: 4, 2018-01-01, 2020-01-01
+select * from t for portion of apptime from 0 to 1 for system_time all;
+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 'portion of apptime from 0 to 1 for system_time all' at line 1
+update t for portion of apptime from 0 to 1 for system_time all set id=1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'system_time all set id=1' at line 1
+# Modifying period start/end fields is forbidden.
+# SQL16: 14.14 <update statement: searched>, Syntax Rules, 7)a)ii)
+# Neither BSTARTCOL nor BENDCOL shall be an explicit <object column>
+# contained in the <set clause list>.
+update t for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id= id + 6, s=subdate(s, 5), e=adddate(e, 5);
+ERROR HY000: Column `s` used in period `apptime` specified in update SET list
+# Precision timestamps
+create or replace table t (id int, s timestamp(5), e timestamp(5),
+period for apptime(s,e));
+insert into t values(1, '1999-01-01', '2018-12-12');
+insert into t values(1, '1999-01-01', '2017-01-01');
+update t for portion of apptime from '2000-01-01 00:00:00.00015'
+ to '2018-01-01 12:34:56.31415'
+ set id= id + 5;
+select * from t;
+id s e
+1 1999-01-01 00:00:00.00000 2000-01-01 00:00:00.00015
+1 1999-01-01 00:00:00.00000 2000-01-01 00:00:00.00015
+1 2018-01-01 12:34:56.31415 2018-12-12 00:00:00.00000
+6 2000-01-01 00:00:00.00015 2017-01-01 00:00:00.00000
+6 2000-01-01 00:00:00.00015 2018-01-01 12:34:56.31415
+# Strings
+create or replace table t (id int, str text, s date, e date,
+period for apptime(s,e));
+insert into t values(1, 'data', '1999-01-01', '2018-12-12');
+insert into t values(1, 'other data', '1999-01-01', '2018-12-12');
+update t for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id= id + 5;
+select * from t;
+id str s e
+1 data 1999-01-01 2000-01-01
+1 data 2018-01-01 2018-12-12
+1 other data 1999-01-01 2000-01-01
+1 other data 2018-01-01 2018-12-12
+6 data 2000-01-01 2018-01-01
+6 other data 2000-01-01 2018-01-01
+# multi-table UPDATE is impossible
+create or replace table t1(x int);
+update t for portion of apptime from '2000-01-01' to '2018-01-01', t1
+set t.id= t.id + 5;
+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 ' t1
+set t.id= t.id + 5' at line 1
+update t1 set x= (select id from t for portion of apptime from '2000-01-01' to '2018-01-01');
+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 'portion of apptime from '2000-01-01' to '2018-01-01')' at line 1
+# single-table views
+create or replace view v1 as select * from t where id<10;
+update v1 for portion of apptime from '2000-01-01' to '2018-01-01' set id= id + 5;
+ERROR 42S02: 'v1' is a view
+# multi-table views
+create or replace view v1 as select * from t, t1 where x=id;
+update v1 for portion of apptime from '2000-01-01' to '2018-01-01' set id= id + 5;
+ERROR 42S02: 'v1' is a view
+# SQL16: 14.14 <update statement: searched>, Syntax Rules, 7)a) iii-iv)
+# Let FROMVAL be <point in time 1>. FROMVAL shall not generally contain a
+# reference to a column of T or a <routine invocation>
+# whose subject routine is an SQL-invoked routine that
+# is possibly non-deterministic or that possibly modifies SQL-data.
+# ...Same for <point in time 2> (TOVAL)
+update t for portion of apptime from 5*(5+s) to 1 set t.id= t.id + 5;
+ERROR HY000: Expression in FOR PORTION OF must be constant
+update t for portion of apptime from 1 to e set t.id= t.id + 5;
+ERROR HY000: Expression in FOR PORTION OF must be constant
+set @s= '2000-01-01';
+set @e= '2018-01-01';
+create or replace function f() returns date return @e;
+create or replace function g() returns date not deterministic return @e;
+create or replace function h() returns date deterministic return @e;
+update t for portion of apptime from @s to f() set t.id= t.id + 5;
+ERROR HY000: Expression in FOR PORTION OF must be constant
+update t for portion of apptime from @s to g() set t.id= t.id + 5;
+ERROR HY000: Expression in FOR PORTION OF must be constant
+# success
+update t for portion of apptime from @s to h() set t.id= t.id + 5;
+# select value is cached
+update t for portion of apptime from (select s from t2 limit 1) to h() set t.id= t.id + 5;
+# auto_inrement field is updated
+create or replace table t (id int primary key auto_increment, x int,
+s date, e date, period for apptime(s, e));
+insert into t values (default, 1, '1999-01-01', '2018-12-12');
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= x + 5;
+select * from t;
+id x s e
+1 6 2000-01-01 2018-01-01
+2 1 1999-01-01 2000-01-01
+3 1 2018-01-01 2018-12-12
+truncate t;
+insert into t values (default, 1, '1999-01-01', '2018-12-12');
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= 1;
+select * from t;
+id x s e
+1 1 2000-01-01 2018-01-01
+2 1 1999-01-01 2000-01-01
+3 1 2018-01-01 2018-12-12
+# generated columns are updated
+create or replace table t (x int, s date, e date,
+xs date as (s) stored, xe date as (e) stored,
+period for apptime(s, e));
+insert into t values(1, '1999-01-01', '2018-12-12', default, default);
+select * from t;
+x s e xs xe
+1 1999-01-01 2018-12-12 1999-01-01 2018-12-12
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= x + 5;
+select *, xs=s and xe=e from t;
+x s e xs xe xs=s and xe=e
+1 1999-01-01 2000-01-01 1999-01-01 2000-01-01 1
+1 2018-01-01 2018-12-12 2018-01-01 2018-12-12 1
+6 2000-01-01 2018-01-01 2000-01-01 2018-01-01 1
+# MDEV-18921 Server crashes in bitmap_bits_set or bitmap_is_set upon
+# UPDATE IGNORE .. FOR PORTION with binary logging
+create or replace table t1 (f int, s date, e date, period for app(s,e));
+insert into t1 values (1,'2016-09-21','2019-06-14');
+update ignore t1 for portion of app from '2019-03-13' to '2019-03-14' set f = 1;
+drop table t,t1,t2,log_tbl;
+drop view v1;
+drop function f;
+drop function g;
+drop function h;
+drop procedure log;
+#
+# MDEV-21471 ER_CRASHED_ON_USAGE upon UPDATE FOR PORTION on Aria table
+#
+create table t1 (s date, e date, period for app(s,e), f varchar(8)) engine=aria row_format=fixed;
+insert into t1 values ('2024-05-13','2026-03-25','foo');
+update t1 for portion of app from '2024-04-02' to '2026-03-15' set f = 'bar';
+drop table t1;
+# MDEV-19130 Assertion
+# `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
+# failed in handler::update_auto_increment after error 167
+create table t1 (id int auto_increment, f int, s datetime, e datetime, period for p(s,e), primary key(id));
+insert into t1 (s,e) values ('1994-01-06','2004-11-30'),('1994-06-21','1997-06-20');
+update ignore t1 set id = 2429681664;
+Warnings:
+Warning 1264 Out of range value for column 'id' at row 1
+Warning 1264 Out of range value for column 'id' at row 2
+update ignore t1 for portion of p from '1995-07-06' to '2009-01-12' set f = 1;
+drop table t1;
+#
+# MDEV-22805 SIGSEGV in check_fields on UPDATE (optimized builds) | Assertion `thd->lex->sql_command == SQLCOM_UPDATE' failed.
+#
+CREATE TABLE t1 (a INT, b DATE, c DATE, PERIOD FOR APPTIME(b, c));
+INSERT INTO t1 VALUES(1, '1999-01-01', '2018-12-12');
+UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100;
+ERROR 42000: This version of MariaDB doesn't yet support 'updating and querying the same temporal periods table'
+set @tmp= "UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100";
+execute immediate @tmp;
+ERROR 42000: This version of MariaDB doesn't yet support 'updating and querying the same temporal periods table'
+CREATE VIEW v1 AS SELECT * FROM t1;
+UPDATE v1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100;
+ERROR 42S02: 'v1' is a view
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/period/r/versioning.result b/mysql-test/suite/period/r/versioning.result
new file mode 100644
index 00000000000..6a55e48217c
--- /dev/null
+++ b/mysql-test/suite/period/r/versioning.result
@@ -0,0 +1,90 @@
+# DELETE
+create table t (
+s date, e date,
+row_start SYS_TYPE as row start invisible,
+row_end SYS_TYPE as row end invisible,
+period for apptime(s, e),
+period for system_time (row_start, row_end)) with system versioning;
+insert into t values('1999-01-01', '2018-12-12'),
+('1999-01-01', '1999-12-12');
+select row_start into @ins_time from t limit 1;
+select * from t order by s, e;
+s e
+1999-01-01 1999-12-12
+1999-01-01 2018-12-12
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select *, if(row_start = @ins_time, "OLD", "NEW"), check_row(row_start, row_end)
+from t for system_time all
+order by s, e, row_start;
+s e if(row_start = @ins_time, "OLD", "NEW") check_row(row_start, row_end)
+1999-01-01 1999-12-12 OLD CURRENT ROW
+1999-01-01 2000-01-01 NEW CURRENT ROW
+1999-01-01 2018-12-12 OLD HISTORICAL ROW
+2018-01-01 2018-12-12 NEW CURRENT ROW
+# same for trigger case
+delete from t;
+delete history from t;
+insert into t values('1999-01-01', '2018-12-12'),
+('1999-01-01', '1999-12-12');
+create or replace table log_tbl(id int auto_increment primary key, log text) engine=myisam;
+create or replace procedure log(s text)
+insert into log_tbl(log) values(s);
+create trigger tr1upd_t before update on t
+for each row call log(CONCAT('>UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr2upd_t after update on t
+for each row call log(CONCAT('<UPD: ', old.s, ", ", old.e, ' -> ', new.s, ", ", new.e));
+create trigger tr1del_t before delete on t
+for each row call log(CONCAT('>DEL: ', old.s, ", ", old.e));
+create trigger tr2del_t after delete on t
+for each row call log(CONCAT('<DEL: ', old.s, ", ", old.e));
+create trigger tr1ins_t before insert on t
+for each row call log(CONCAT('>INS: ', new.s, ", ", new.e));
+create trigger tr2ins_t after insert on t
+for each row call log(CONCAT('<INS: ', new.s, ", ", new.e));
+select row_start into @ins_time from t limit 1;
+select * from t order by s, e;
+s e
+1999-01-01 1999-12-12
+1999-01-01 2018-12-12
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select *, if(row_start = @ins_time, "OLD", "NEW"), check_row(row_start, row_end)
+from t for system_time all
+order by s, e, row_start;
+s e if(row_start = @ins_time, "OLD", "NEW") check_row(row_start, row_end)
+1999-01-01 1999-12-12 OLD CURRENT ROW
+1999-01-01 2000-01-01 NEW CURRENT ROW
+1999-01-01 2018-12-12 OLD HISTORICAL ROW
+2018-01-01 2018-12-12 NEW CURRENT ROW
+select * from log_tbl order by id;
+id log
+1 >DEL: 1999-01-01, 2018-12-12
+2 >INS: 1999-01-01, 2000-01-01
+3 <INS: 1999-01-01, 2000-01-01
+4 >INS: 2018-01-01, 2018-12-12
+5 <INS: 2018-01-01, 2018-12-12
+6 <DEL: 1999-01-01, 2018-12-12
+# UPDATE
+create or replace table t (x int, s date, e date,
+row_start SYS_TYPE as row start invisible,
+row_end SYS_TYPE as row end invisible,
+period for apptime(s, e),
+period for system_time(row_start, row_end)) with system versioning;
+insert into t values(1, '1999-01-01', '2018-12-12'),
+(2, '1999-01-01', '1999-12-12');
+select row_start into @ins_time from t limit 1;
+select * from t;
+x s e
+1 1999-01-01 2018-12-12
+2 1999-01-01 1999-12-12
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= x + 5;
+select *, if(row_start = @ins_time, "OLD", "NEW"), check_row(row_start, row_end)
+from t for system_time all
+order by x, s, e, row_start;
+x s e if(row_start = @ins_time, "OLD", "NEW") check_row(row_start, row_end)
+1 1999-01-01 2000-01-01 NEW CURRENT ROW
+1 1999-01-01 2018-12-12 OLD HISTORICAL ROW
+1 2018-01-01 2018-12-12 NEW CURRENT ROW
+2 1999-01-01 1999-12-12 OLD CURRENT ROW
+6 2000-01-01 2018-01-01 NEW CURRENT ROW
+drop table t,log_tbl;
+drop procedure log;
diff --git a/mysql-test/suite/period/t/alter.test b/mysql-test/suite/period/t/alter.test
new file mode 100644
index 00000000000..2a82f74b670
--- /dev/null
+++ b/mysql-test/suite/period/t/alter.test
@@ -0,0 +1,176 @@
+--source include/have_partition.inc
+
+set @s= '1992-01-01';
+set @e= '1999-12-31';
+
+create table t (s date, e date);
+
+--echo # period start/end columns are implicit NOT NULL
+alter table t add period for a(s, e);
+show create table t;
+
+create or replace table t (s date, e date);
+alter table t change s s date, add period for a(s, e);
+show create table t;
+
+alter table t add id int;
+show create table t;
+alter table t drop id;
+show create table t;
+
+--error ER_CONSTRAINT_FAILED
+insert t values(@e, @s);
+
+--error ER_PERIOD_CONSTRAINT_DROP
+alter table t drop constraint a;
+
+--echo # no-op
+alter table t drop period if exists for b;
+--echo # no-op
+alter table t add period if not exists for a(e, s);
+
+alter table t drop period if exists for a;
+--echo # no-op
+alter table t drop period if exists for a;
+
+alter table t add period for a(s, e), add period if not exists for a(e, s);
+show create table t;
+
+alter table t drop period for a;
+--echo # Constraint is dropped
+insert t values(@e, @s);
+
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t drop period for a;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t add period for a(s, e), drop period for a;
+
+truncate t;
+alter table t add period for a(s, e);
+--error ER_CONSTRAINT_FAILED
+insert t values(@e, @s);
+alter table t add period for a(s, e), drop period for a;
+--error ER_CONSTRAINT_FAILED
+insert t values(@e, @s);
+alter table t add s1 date not null, add period for b(s1, e), drop period for a;
+show create table t;
+insert t(s, s1, e) values(@e, @s, @e);
+--error ER_CONSTRAINT_FAILED
+insert t(s, s1, e) values(@e, @e, @s);
+
+create table t1 like t;
+show create table t1;
+drop table t1;
+
+--error ER_CONSTRAINT_FAILED
+create table t2 (period for b(s,e)) select * from t;
+
+create table t2 (period for b(s1,e)) select * from t;
+drop table t2;
+
+--echo # SQL16 11.27 <add table period definition>, Syntax Rules, 5)g)
+--echo # The declared type of BC1 shall be either DATE or a timestamp type
+--echo # and shall be equivalent to the declared type of BC2.
+create or replace table t (s timestamp not null, e timestamp(6) not null);
+--error ER_PERIOD_TYPES_MISMATCH
+alter table t add period for a(s, e);
+
+--echo # SQL16 11.27 <add table period definition>, Syntax Rules, 5)c)
+--echo # No column of T shall have a column name that is equivalent to ATPN.
+create or replace table t (a int, s date, e date);
+--error ER_DUP_FIELDNAME
+alter table t add period for a(s, e);
+
+--echo # SQL16 11.27 <add table period definition>, Syntax Rules, 5)i)
+--echo # Neither BC1 nor BC2 shall be an identity column, a generated column,
+--echo # a system-time period start column, or a system-time period end column.
+create or replace table t (id int primary key,
+ s date,
+ e date generated always as (s+1));
+--error ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+alter table t add period for a(s, e);
+
+create or replace table t (id int primary key,
+ s date,
+ e date as (s+1) VIRTUAL);
+--error ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+alter table t add period for a(s, e);
+
+create or replace table t (id int primary key, s timestamp(6), e timestamp(6),
+ st timestamp(6) as row start,
+ en timestamp(6) as row end,
+ period for system_time (st, en)) with system versioning;
+--error ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+alter table t add period for a(s, en);
+
+--echo # SQL16 11.27 <add table period definition>, Syntax Rules, 5)b)
+--echo # The table descriptor of T shall not include a period descriptor other
+--echo # than a system-time period descriptor.
+alter table t add period for a(s, e);
+--error ER_MORE_THAN_ONE_PERIOD
+alter table t add period for b(s, e);
+
+--echo # SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)e)v)2)B)
+--echo # Let S be the schema identified by the explicit or implicit
+--echo # <schema name> of TN. Let IDCN be an implementation-dependent
+--echo # <constraint name> that is not equivalent to the <constraint name> of
+--echo # any table constraint descriptor included in S. The following
+--echo # <table constraint definition> is implicit:
+--echo # CONSTRAINT IDCN CHECK ( CN1 < CN2 )
+--echo #
+--echo # Due to the above standard limitation, the constraint name can't always
+--echo # match the period name. So it matches when possible; and when not, it
+--echo # is unique not taken name prefixed with period name.
+create or replace table t (x int, s date, e date,
+ period for mytime(s, e));
+show create table t;
+alter table t add constraint mytime check (x > 1);
+show create table t;
+--error ER_CONSTRAINT_FAILED
+insert t values (2, @e, @s);
+alter table t add constraint mytime_1 check (x > 2);
+--error ER_CONSTRAINT_FAILED
+insert t values (3, @e, @s);
+
+drop table t;
+
+--echo #
+--echo # MDEV-20494 ER_NOT_FORM_FILE or assertion upon adding partition to period table
+--echo #
+create table t1 (f date, t date, period for app(f,t)) with system versioning partition by system_time ( partition p1 history, partition pn current );
+lock table t1 write;
+alter table t1 add partition (partition p2 history);
+unlock tables;
+
+create or replace table t1 (x int, s date, e date, period for app(s,e));
+insert into t1 values(1, '2020-03-01', '2020-03-02');
+insert into t1 values(1, '2020-03-01', '2020-03-02');
+--error ER_DUP_ENTRY
+alter table t1 add primary key(x, s, e);
+alter table t1 add system versioning;
+
+# cleanup
+drop table t1;
+
+--echo #
+--echo # MDEV-18873 Server crashes in Compare_identifiers::operator or in
+--echo # my_strcasecmp_utf8 upon ADD PERIOD IF NOT EXISTS with empty name
+--echo #
+
+# When there is no table defined.
+--error ER_WRONG_COLUMN_NAME
+alter table t add period if not exists for `` (s,e);
+
+# When there is an actual table.
+create table t(s DATE, e DATE);
+--error ER_WRONG_COLUMN_NAME
+alter table t add period if not exists for `` (s,e);
+
+# When the last character is space
+--error ER_WRONG_COLUMN_NAME
+alter table t add period if not exists for ` ` (s,e);
+
+# Create table with an empty period name
+--error ER_WRONG_COLUMN_NAME
+create table t2 (period for `` (s,e)) select * from t;
+drop table t;
diff --git a/mysql-test/suite/period/t/create.test b/mysql-test/suite/period/t/create.test
new file mode 100644
index 00000000000..49dcc6ad3c7
--- /dev/null
+++ b/mysql-test/suite/period/t/create.test
@@ -0,0 +1,87 @@
+create table t (id int primary key, s date, e date, period for mytime(s,e));
+--echo # CONSTRAINT CHECK (s < e) is added implicitly, and shouldn't be shown
+--echo # this is important for correct command-based replication
+show create table t;
+create or replace table t (id int primary key, s timestamp(6), e timestamp(6),
+ period for mytime(s,e));
+show create table t;
+
+--echo # SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)a)
+--echo # 2) If a <table period definition> TPD is specified, then:
+--echo # a) <table scope> shall not be specified.
+--error ER_PERIOD_TEMPORARY_NOT_ALLOWED
+create or replace temporary table t (s date, e date, period for mytime(s,e));
+
+--echo # SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)e)iii)
+--echo # The <data type or domain name> contained in CD1 is either DATE or a
+--echo # timestamp type and it is equivalent to the <data type or domain name>
+--echo # contained in CD2.
+--error ER_PERIOD_TYPES_MISMATCH
+create or replace table t (id int primary key, s datetime, e date,
+ period for mytime(s,e));
+--error ER_PERIOD_TYPES_MISMATCH
+create or replace table t (s timestamp(2), e timestamp(6),
+ period for mytime(s,e));
+--error ER_WRONG_FIELD_SPEC
+create or replace table t (id int primary key, s int, e date,
+ period for mytime(s,e));
+--error ER_WRONG_FIELD_SPEC
+create or replace table t (id int primary key, s time, e time,
+ period for mytime(s,e));
+--error ER_BAD_FIELD_ERROR
+create or replace table t (id int primary key, s date, e date,
+ period for mytime(s,x));
+
+--echo # MDEV-18842: Unfortunate error message when the same column is used
+--echo # for application period start and end
+--error ER_FIELD_SPECIFIED_TWICE
+create or replace table t (s date, t date, period for apt(s,s));
+
+--error ER_MORE_THAN_ONE_PERIOD
+create or replace table t (id int primary key, s date, e date,
+ period for mytime(s,e),
+ period for mytime2(s,e));
+
+--echo # SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)d)
+--echo # No <column name> in any <column definition> shall be equivalent to PN.
+--error ER_DUP_FIELDNAME
+create or replace table t (mytime int, s date, e date,
+ period for mytime(s,e));
+
+--echo # SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)e)v)2)A)
+--echo # Neither CD1 nor CD2 shall contain an <identity column specification>, a
+--echo # <generation clause>, a <system time period start column specification>,
+--echo # or a <system time period end column specification>.
+--error ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+create or replace table t (id int primary key,
+ s date,
+ e date generated always as (s+1),
+ period for mytime(s,e));
+
+--error ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+create or replace table t (id int primary key,
+ s date,
+ e date as (s+1) VIRTUAL,
+ period for mytime(s,e));
+
+--error ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+create or replace table t (id int primary key, s timestamp(6), e timestamp(6),
+ st timestamp(6) as row start,
+ en timestamp(6) as row end,
+ period for system_time (st, en),
+ period for mytime(st,e)) with system versioning;
+
+--echo # SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)
+--echo # Let IDCN be an implementation-dependent <constraint name> that is not
+--echo # equivalent to the <constraint name> of any table constraint descriptor
+--echo # included in S.
+create or replace table t (x int, s date, e date,
+ period for mytime(s, e),
+ constraint mytime check (x > 1));
+show create table t;
+--error ER_CONSTRAINT_FAILED
+insert t values (2, '2001-01-01', '2001-01-01');
+
+show status like "Feature_application_time_periods";
+
+drop table t;
diff --git a/mysql-test/suite/period/t/delete.test b/mysql-test/suite/period/t/delete.test
new file mode 100644
index 00000000000..2a5f65d80ba
--- /dev/null
+++ b/mysql-test/suite/period/t/delete.test
@@ -0,0 +1,227 @@
+source suite/period/engines.inc;
+source include/have_log_bin.inc;
+
+create table t (id int, s date, e date, period for apptime(s,e));
+
+insert into t values(1, '1999-01-01', '2018-12-12');
+insert into t values(1, '1999-01-01', '2017-01-01');
+insert into t values(1, '2017-01-01', '2019-01-01');
+insert into t values(2, '1998-01-01', '2018-12-12');
+insert into t values(3, '1997-01-01', '2015-01-01');
+insert into t values(4, '2016-01-01', '2020-01-01');
+insert into t values(5, '2010-01-01', '2015-01-01');
+
+create or replace table t1 (id int, s date, e date, period for apptime(s,e));
+insert t1 select * from t;
+create or replace table t2 (id int, s date, e date, period for apptime(s,e));
+insert t2 select * from t;
+create or replace table t3 (id int, s date, e date, period for apptime(s,e));
+insert t3 select * from t;
+
+--let $trig_cols=id, s, e
+--let $trig_table=t1
+--source suite/period/create_triggers.inc
+
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+delete from t1 for portion of APPTIME from '2000-01-01' to '2018-01-01';
+--sorted_result
+select * from t;
+--sorted_result
+select * from t1;
+select * from log_tbl order by id;
+
+--echo # INSERT trigger only also works
+--let $trig_cols=id, s, e
+--let $trig_table=t2
+--source suite/period/create_triggers.inc
+drop trigger tr1del_t2;
+drop trigger tr2del_t2;
+delete from t2 for portion of APPTIME from '2000-01-01' to '2018-01-01';
+select * from log_tbl order by id;
+
+--echo # removing BEFORE INSERT trigger enables internal substitution
+--echo # DELETE+INSERT -> UPDATE, but without any side effects.
+--echo # The optimization is disabled for non-transactional engines
+--let $trig_table=t3
+--source suite/period/create_triggers.inc
+drop trigger tr1ins_t3;
+delete from t3 for portion of APPTIME from '2000-01-01' to '2018-01-01';
+select * from log_tbl order by id;
+
+--echo # multi-table DELETE is not possible
+--error ER_PARSE_ERROR
+delete t, t1 from t1, t for portion of apptime from '2000-01-01' to '2018-01-01';
+
+--error ER_PARSE_ERROR
+delete t for portion of apptime from '2000-01-01' to '2018-01-01', t1 from t, t1;
+
+--echo # Here another check fails before parsing ends
+--error ER_UNKNOWN_TABLE
+delete t, t1 from t for portion of apptime from '2000-01-01' to '2018-01-01', t1;
+
+--error ER_PARSE_ERROR
+delete history from t2 for portion of apptime from '2000-01-01' to '2018-01-01';
+
+--error ER_PERIOD_NOT_FOUND
+delete from t for portion of othertime from '2000-01-01' to '2018-01-01';
+--error ER_PARSE_ERROR
+delete from t for portion of system_time from '2000-01-01' to '2018-01-01';
+
+create or replace table t (id int, str text, s date, e date,
+ period for apptime(s,e));
+
+insert into t values(1, 'data', '1999-01-01', '2018-12-12');
+insert into t values(1, 'other data', '1999-01-01', '2018-12-12');
+insert into t values(1, 'deleted', '2000-01-01', '2018-01-01');
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+show warnings;
+--sorted_result
+select * from t;
+
+drop table t1;
+
+--echo # SQL16, Part 2, 15.7 <Effect of deleting rows from base tables>,
+--echo # General rules, 8)b)i)
+--echo # If the column descriptor that corresponds to the i-th field of BR
+--echo # describes an identity column, a generated column, a system-time period
+--echo # start column, or a system-time period end column, then let V i be
+--echo # DEFAULT.
+
+--echo # auto_increment field is updated
+create or replace table t (id int primary key auto_increment, s date, e date,
+ period for apptime(s, e));
+insert into t values (default, '1999-01-01', '2018-12-12');
+select * from t;
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+--sorted_result
+select * from t;
+truncate t;
+--echo # same for trigger case
+insert into t values (default, '1999-01-01', '2018-12-12');
+--let $trig_table=t
+--source suite/period/create_triggers.inc
+
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+--sorted_result
+select * from t;
+select * from log_tbl order by id;
+
+--echo # generated columns are updated
+create or replace table t (s date, e date,
+ xs date as (s) stored, xe date as (e) stored,
+ period for apptime(s, e));
+insert into t values('1999-01-01', '2018-12-12', default, default);
+--sorted_result
+select * from t;
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+--sorted_result
+select * from t;
+truncate t;
+--echo # same for trigger case
+insert into t values('1999-01-01', '2018-12-12', default, default);
+--let $trig_table=t
+--source suite/period/create_triggers.inc
+
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+--sorted_result
+select * from t;
+select * from log_tbl order by id;
+
+--echo # View can't be used
+create or replace view v as select * from t;
+--error ER_IT_IS_A_VIEW
+delete from v for portion of p from '2000-01-01' to '2018-01-01';
+
+--echo # View can't be used
+create or replace view v as select t.* from t, t as t1;
+--error ER_VIEW_DELETE_MERGE_VIEW
+delete from v for portion of p from '2000-01-01' to '2018-01-01';
+
+--echo # auto_increment field overflow
+create or replace table t (id tinyint auto_increment primary key,
+ s date, e date, period for apptime(s,e));
+
+insert into t values(127, '1999-01-01', '2018-12-12');
+
+--error HA_ERR_AUTOINC_ERANGE
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select * from t;
+
+--echo # same for trigger case
+--let $trig_table=t
+--source suite/period/create_triggers.inc
+--echo # negotiate side effects of non-transactional MyISAM engine
+replace into t values(127, '1999-01-01', '2018-12-12');
+select * from t;
+truncate table log_tbl;
+
+--error HA_ERR_AUTOINC_ERANGE
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select * from t;
+select * from log_tbl order by id;
+
+--echo # custom constraint for period fields
+create or replace table t(id int, s date, e date, period for apptime(s,e),
+ constraint dist2days check (datediff(e, s) >= 2));
+insert into t values(1, '1999-01-01', '2018-12-12'),
+ (2, '1999-01-01', '1999-12-12');
+--error ER_CONSTRAINT_FAILED
+delete from t for portion of apptime from '1999-01-02' to '2018-12-12';
+--echo # negotiate side effects of non-transactional MyISAM engine
+truncate t;
+insert into t values(1, '1999-01-01', '2018-12-12'),
+ (2, '1999-01-01', '1999-12-12');
+--error ER_CONSTRAINT_FAILED
+delete from t for portion of apptime from '1999-01-01' to '2018-12-11';
+truncate t;
+insert into t values(1, '1999-01-01', '2018-12-12'),
+ (2, '1999-01-01', '1999-12-12');
+
+delete from t for portion of apptime from '1999-01-03' to '2018-12-10';
+--sorted_result
+select *, datediff(e, s) from t;
+
+--echo #
+--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
+--echo #
+create or replace table t1 (id int, s date, e date, period for apptime(s,e));
+create or replace procedure sp()
+delete from t1 for portion of othertime from '2000-01-01' to '2018-01-01';
+--error ER_PERIOD_NOT_FOUND
+call sp;
+--error ER_PERIOD_NOT_FOUND
+call sp;
+drop table t1;
+drop procedure sp;
+
+drop table t,t2,t3,log_tbl;
+drop view v;
+drop procedure log;
+
+--echo # MDEV-19130 Assertion
+--echo # `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
+--echo # failed in handler::update_auto_increment after error 167
+
+create or replace table t (f tinyint auto_increment null,
+ s timestamp, e timestamp,
+ period for app(s,e), key(f, s));
+insert into t (s,e) values
+ ('2021-08-22 10:28:43', '2023-09-17 00:00:00'),
+ ('2019-05-09 21:45:24', '2020-04-22 14:38:49');
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+insert into t (s,e) values ('2015-07-07 00:00:00','2020-03-11 08:48:52');
+insert into t (s,e) select s,e from t;
+insert into t (s,e) select s,e from t;
+
+--replace_regex /row \d+/row ROW/
+--error HA_ERR_AUTOINC_ERANGE
+insert into t select * from t;
+
+--disable_warnings
+delete ignore from t
+ for portion of app from '2015-07-07 00:00:00' to '2020-03-11 08:48:52';
+--enable_warnings
+
+drop table t;
diff --git a/mysql-test/suite/period/t/update.test b/mysql-test/suite/period/t/update.test
new file mode 100644
index 00000000000..3f4dd2bdc68
--- /dev/null
+++ b/mysql-test/suite/period/t/update.test
@@ -0,0 +1,207 @@
+source suite/period/engines.inc;
+source include/have_log_bin.inc;
+
+create table t (id int, s date, e date, period for apptime(s,e));
+
+insert into t values(1, '1999-01-01', '2018-12-12');
+insert into t values(1, '1999-01-01', '2017-01-01');
+insert into t values(1, '2017-01-01', '2019-01-01');
+insert into t values(2, '1998-01-01', '2018-12-12');
+insert into t values(3, '1997-01-01', '2015-01-01');
+insert into t values(4, '2016-01-01', '2020-01-01');
+insert into t values(5, '2010-01-01', '2015-01-01');
+
+create or replace table t1 (id int, s date, e date, period for apptime(s,e));
+insert t1 select * from t;
+create or replace table t2 (id int, s date, e date, period for apptime(s,e));
+insert t2 select * from t;
+
+update t for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id=id + 6;
+--sorted_result
+select * from t;
+
+--echo # Check triggers
+--let $trig_cols=id, s, e
+--let $trig_table=t1
+--source suite/period/create_triggers.inc
+
+update t1 for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id=id + 6;
+--sorted_result
+select * from t1;
+select * from log_tbl order by id;
+
+--echo # INSERT trigger only also works
+--let $trig_cols=id, s, e
+--let $trig_table=t2
+--source suite/period/create_triggers.inc
+drop trigger tr1upd_t2;
+drop trigger tr2upd_t2;
+update t2 for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id=id + 6;
+--sorted_result
+select * from t2;
+select * from log_tbl order by id;
+
+--error ER_PARSE_ERROR
+select * from t for portion of apptime from 0 to 1 for system_time all;
+--error ER_PARSE_ERROR
+update t for portion of apptime from 0 to 1 for system_time all set id=1;
+
+--echo # Modifying period start/end fields is forbidden.
+--echo # SQL16: 14.14 <update statement: searched>, Syntax Rules, 7)a)ii)
+--echo # Neither BSTARTCOL nor BENDCOL shall be an explicit <object column>
+--echo # contained in the <set clause list>.
+--error ER_PERIOD_COLUMNS_UPDATED
+update t for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id= id + 6, s=subdate(s, 5), e=adddate(e, 5);
+
+--echo # Precision timestamps
+create or replace table t (id int, s timestamp(5), e timestamp(5),
+ period for apptime(s,e));
+insert into t values(1, '1999-01-01', '2018-12-12');
+insert into t values(1, '1999-01-01', '2017-01-01');
+update t for portion of apptime from '2000-01-01 00:00:00.00015'
+ to '2018-01-01 12:34:56.31415'
+ set id= id + 5;
+--sorted_result
+select * from t;
+
+-- echo # Strings
+create or replace table t (id int, str text, s date, e date,
+ period for apptime(s,e));
+
+insert into t values(1, 'data', '1999-01-01', '2018-12-12');
+insert into t values(1, 'other data', '1999-01-01', '2018-12-12');
+update t for portion of apptime from '2000-01-01' to '2018-01-01'
+ set id= id + 5;
+--sorted_result
+select * from t;
+
+--echo # multi-table UPDATE is impossible
+create or replace table t1(x int);
+--error ER_PARSE_ERROR
+update t for portion of apptime from '2000-01-01' to '2018-01-01', t1
+ set t.id= t.id + 5;
+
+--error ER_PARSE_ERROR
+update t1 set x= (select id from t for portion of apptime from '2000-01-01' to '2018-01-01');
+
+--echo # single-table views
+create or replace view v1 as select * from t where id<10;
+--error ER_IT_IS_A_VIEW
+update v1 for portion of apptime from '2000-01-01' to '2018-01-01' set id= id + 5;
+
+--echo # multi-table views
+create or replace view v1 as select * from t, t1 where x=id;
+--error ER_IT_IS_A_VIEW
+update v1 for portion of apptime from '2000-01-01' to '2018-01-01' set id= id + 5;
+
+--echo # SQL16: 14.14 <update statement: searched>, Syntax Rules, 7)a) iii-iv)
+--echo # Let FROMVAL be <point in time 1>. FROMVAL shall not generally contain a
+--echo # reference to a column of T or a <routine invocation>
+--echo # whose subject routine is an SQL-invoked routine that
+--echo # is possibly non-deterministic or that possibly modifies SQL-data.
+--echo # ...Same for <point in time 2> (TOVAL)
+--error ER_NOT_CONSTANT_EXPRESSION
+update t for portion of apptime from 5*(5+s) to 1 set t.id= t.id + 5;
+--error ER_NOT_CONSTANT_EXPRESSION
+update t for portion of apptime from 1 to e set t.id= t.id + 5;
+
+set @s= '2000-01-01';
+set @e= '2018-01-01';
+
+create or replace function f() returns date return @e;
+create or replace function g() returns date not deterministic return @e;
+create or replace function h() returns date deterministic return @e;
+
+--error ER_NOT_CONSTANT_EXPRESSION
+update t for portion of apptime from @s to f() set t.id= t.id + 5;
+--error ER_NOT_CONSTANT_EXPRESSION
+update t for portion of apptime from @s to g() set t.id= t.id + 5;
+
+--echo # success
+update t for portion of apptime from @s to h() set t.id= t.id + 5;
+--echo # select value is cached
+update t for portion of apptime from (select s from t2 limit 1) to h() set t.id= t.id + 5;
+
+--echo # auto_inrement field is updated
+create or replace table t (id int primary key auto_increment, x int,
+ s date, e date, period for apptime(s, e));
+insert into t values (default, 1, '1999-01-01', '2018-12-12');
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= x + 5;
+--sorted_result
+select * from t;
+
+truncate t;
+insert into t values (default, 1, '1999-01-01', '2018-12-12');
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= 1;
+--sorted_result
+select * from t;
+
+--echo # generated columns are updated
+create or replace table t (x int, s date, e date,
+ xs date as (s) stored, xe date as (e) stored,
+ period for apptime(s, e));
+insert into t values(1, '1999-01-01', '2018-12-12', default, default);
+--sorted_result
+select * from t;
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= x + 5;
+--sorted_result
+select *, xs=s and xe=e from t;
+
+--echo # MDEV-18921 Server crashes in bitmap_bits_set or bitmap_is_set upon
+--echo # UPDATE IGNORE .. FOR PORTION with binary logging
+create or replace table t1 (f int, s date, e date, period for app(s,e));
+insert into t1 values (1,'2016-09-21','2019-06-14');
+update ignore t1 for portion of app from '2019-03-13' to '2019-03-14' set f = 1;
+
+drop table t,t1,t2,log_tbl;
+drop view v1;
+drop function f;
+drop function g;
+drop function h;
+drop procedure log;
+
+--echo #
+--echo # MDEV-21471 ER_CRASHED_ON_USAGE upon UPDATE FOR PORTION on Aria table
+--echo #
+create table t1 (s date, e date, period for app(s,e), f varchar(8)) engine=aria row_format=fixed;
+insert into t1 values ('2024-05-13','2026-03-25','foo');
+update t1 for portion of app from '2024-04-02' to '2026-03-15' set f = 'bar';
+
+# cleanup
+drop table t1;
+
+--echo # MDEV-19130 Assertion
+--echo # `next_insert_id >= auto_inc_interval_for_cur_row.minimum()'
+--echo # failed in handler::update_auto_increment after error 167
+create table t1 (id int auto_increment, f int, s datetime, e datetime, period for p(s,e), primary key(id));
+insert into t1 (s,e) values ('1994-01-06','2004-11-30'),('1994-06-21','1997-06-20');
+update ignore t1 set id = 2429681664;
+update ignore t1 for portion of p from '1995-07-06' to '2009-01-12' set f = 1;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-22805 SIGSEGV in check_fields on UPDATE (optimized builds) | Assertion `thd->lex->sql_command == SQLCOM_UPDATE' failed.
+--echo #
+CREATE TABLE t1 (a INT, b DATE, c DATE, PERIOD FOR APPTIME(b, c));
+
+INSERT INTO t1 VALUES(1, '1999-01-01', '2018-12-12');
+
+# Without a patch the following statement crashs a server built in debug mode
+let $stmt= UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100;
+--error ER_NOT_SUPPORTED_YET
+eval $stmt;
+eval set @tmp= "$stmt";
+--error ER_NOT_SUPPORTED_YET
+execute immediate @tmp;
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+--error ER_IT_IS_A_VIEW
+UPDATE v1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100;
+
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/period/t/versioning.test b/mysql-test/suite/period/t/versioning.test
new file mode 100644
index 00000000000..5d38d81349e
--- /dev/null
+++ b/mysql-test/suite/period/t/versioning.test
@@ -0,0 +1,61 @@
+source suite/versioning/engines.inc;
+source suite/versioning/common.inc;
+
+--echo # DELETE
+--replace_result $sys_datatype_expl SYS_TYPE
+eval create table t (
+ s date, e date,
+ row_start $sys_datatype_expl as row start invisible,
+ row_end $sys_datatype_expl as row end invisible,
+ period for apptime(s, e),
+ period for system_time (row_start, row_end)) with system versioning;
+insert into t values('1999-01-01', '2018-12-12'),
+ ('1999-01-01', '1999-12-12');
+
+select row_start into @ins_time from t limit 1;
+select * from t order by s, e;
+
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select *, if(row_start = @ins_time, "OLD", "NEW"), check_row(row_start, row_end)
+ from t for system_time all
+ order by s, e, row_start;
+
+--echo # same for trigger case
+delete from t;
+delete history from t;
+insert into t values('1999-01-01', '2018-12-12'),
+ ('1999-01-01', '1999-12-12');
+--let $trig_table=t
+--source suite/period/create_triggers.inc
+
+select row_start into @ins_time from t limit 1;
+select * from t order by s, e;
+
+delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
+select *, if(row_start = @ins_time, "OLD", "NEW"), check_row(row_start, row_end)
+ from t for system_time all
+ order by s, e, row_start;
+select * from log_tbl order by id;
+
+--echo # UPDATE
+--replace_result $sys_datatype_expl SYS_TYPE
+eval create or replace table t (x int, s date, e date,
+ row_start $sys_datatype_expl as row start invisible,
+ row_end $sys_datatype_expl as row end invisible,
+ period for apptime(s, e),
+ period for system_time(row_start, row_end)) with system versioning;
+insert into t values(1, '1999-01-01', '2018-12-12'),
+ (2, '1999-01-01', '1999-12-12');
+
+select row_start into @ins_time from t limit 1;
+--sorted_result
+select * from t;
+
+update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= x + 5;
+select *, if(row_start = @ins_time, "OLD", "NEW"), check_row(row_start, row_end)
+ from t for system_time all
+ order by x, s, e, row_start;
+
+drop table t,log_tbl;
+drop procedure log;
+source suite/versioning/common_finish.inc;
diff --git a/mysql-test/suite/plugins/r/audit_null.result b/mysql-test/suite/plugins/r/audit_null.result
index 75eb5a9f682..ada85b661ee 100644
--- a/mysql-test/suite/plugins/r/audit_null.result
+++ b/mysql-test/suite/plugins/r/audit_null.result
@@ -74,6 +74,9 @@ root[root] @ localhost [] >> create table t1 (a int)
root[root] @ localhost [] test.t1 : create
root[root] @ localhost [] >> insert t1 values (1), (2)
root[root] @ localhost [] test.t1 : write
+root[root] @ localhost [] mysql.table_stats : read
+root[root] @ localhost [] mysql.column_stats : read
+root[root] @ localhost [] mysql.index_stats : read
root[root] @ localhost [] >> select * from t1
root[root] @ localhost [] test.t1 : read
root[root] @ localhost [] >> rename table t1 to t2
@@ -90,6 +93,9 @@ root[root] @ localhost [] test.t2 : read
root[root] @ localhost [] >> select * from v1
root[root] @ localhost [] test.t2 : read
root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] mysql.table_stats : read
+root[root] @ localhost [] mysql.column_stats : read
+root[root] @ localhost [] mysql.index_stats : read
root[root] @ localhost [] >> drop view v1
root[root] @ localhost [] >> create temporary table t2 (a date)
root[root] @ localhost [] >> insert t2 values ('2020-10-09')
diff --git a/mysql-test/suite/plugins/r/audit_null_debug.result b/mysql-test/suite/plugins/r/audit_null_debug.result
index e70de36a2ec..727bd67aecf 100644
--- a/mysql-test/suite/plugins/r/audit_null_debug.result
+++ b/mysql-test/suite/plugins/r/audit_null_debug.result
@@ -1,3 +1,6 @@
+alter table mysql.plugin engine=myisam;
+Warnings:
+Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
set @old_dbug=@@debug_dbug;
call mtr.add_suppression("Index for table.*mysql.plugin.MYI");
call mtr.add_suppression("Index for table 'plugin' is corrupt; try to repair it");
@@ -14,3 +17,4 @@ uninstall plugin audit_null;
uninstall plugin audit_null;
ERROR 42000: PLUGIN audit_null does not exist
delete from mysql.plugin where name='audit_null';
+alter table mysql.plugin engine=aria;
diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result
index 7ae385b79cb..6769d867167 100644
--- a/mysql-test/suite/plugins/r/auth_ed25519.result
+++ b/mysql-test/suite/plugins/r/auth_ed25519.result
@@ -22,22 +22,45 @@ ed25519_password(NULL)
NULL
select * from information_schema.plugins where plugin_name='ed25519';
PLUGIN_NAME ed25519
-PLUGIN_VERSION 1.0
+PLUGIN_VERSION 1.1
PLUGIN_STATUS ACTIVE
PLUGIN_TYPE AUTHENTICATION
-PLUGIN_TYPE_VERSION 2.1
+PLUGIN_TYPE_VERSION 2.2
PLUGIN_LIBRARY auth_ed25519.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication
PLUGIN_LICENSE GPL
LOAD_OPTION ON
PLUGIN_MATURITY Stable
-PLUGIN_AUTH_VERSION 1.0
+PLUGIN_AUTH_VERSION 1.1
create user test1@localhost identified via ed25519 using 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY';
show grants for test1@localhost;
Grants for test1@localhost
GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
+drop user test1@localhost;
+create user test1@localhost identified via ed25519 using 'foo';
+ERROR HY000: Password hash should be 43 characters long
+create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890';
+ERROR HY000: Password hash should be base64 encoded
+create user test1@localhost identified via ed25519 using password('foo');
+show grants for test1@localhost;
+Grants for test1@localhost
+GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI'
+select ed25519_password('foo');
+ed25519_password('foo')
+vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI
+set password for test1@localhost = password('bar');
+show create user test1@localhost;
+CREATE USER for test1@localhost
+CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10'
+select ed25519_password('bar');
+ed25519_password('bar')
+pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10
+set password for test1@localhost = 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY';
+show create user test1@localhost;
+CREATE USER for test1@localhost
+CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
connect(localhost,test1,public,test,PORT,SOCKET);
connect con1, localhost, test1, public;
ERROR 28000: Access denied for user 'test1'@'localhost' (using password: YES)
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result
index 8eb730355ca..218d12fb884 100644
--- a/mysql-test/suite/plugins/r/cracklib_password_check.result
+++ b/mysql-test/suite/plugins/r/cracklib_password_check.result
@@ -6,7 +6,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_LIBRARY cracklib_password_check.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Password validation via CrackLib
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_load.result b/mysql-test/suite/plugins/r/feedback_plugin_load.result
index 8b2a561b9f0..4323dcce0a6 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_load.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_load.result
@@ -20,23 +20,23 @@ WHERE VARIABLE_NAME LIKE 'Collation used %'
ORDER BY VARIABLE_NAME;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
prepare stmt from "SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK WHERE VARIABLE_NAME LIKE 'Collation used %' ORDER BY VARIABLE_NAME";
execute stmt;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
execute stmt;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
deallocate prepare stmt;
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_send.result b/mysql-test/suite/plugins/r/feedback_plugin_send.result
index fec42f577ad..69046e16dd9 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_send.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_send.result
@@ -20,26 +20,27 @@ WHERE VARIABLE_NAME LIKE 'Collation used %'
ORDER BY VARIABLE_NAME;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
prepare stmt from "SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK WHERE VARIABLE_NAME LIKE 'Collation used %' ORDER BY VARIABLE_NAME";
execute stmt;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
execute stmt;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
deallocate prepare stmt;
set global sql_mode=ONLY_FULL_GROUP_BY;
+# restart
feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent
feedback plugin: server replied 'ok'
diff --git a/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result b/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result
new file mode 100644
index 00000000000..82d464e3cb2
--- /dev/null
+++ b/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result
@@ -0,0 +1,12 @@
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'named_pipe';
+set global max_password_errors=1;
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser,,,,,PIPE;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser,,,,,PIPE;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result b/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result
new file mode 100644
index 00000000000..eb7cb64167b
--- /dev/null
+++ b/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result
@@ -0,0 +1,12 @@
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'unix_socket';
+set global max_password_errors=1;
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/r/multiauth.result b/mysql-test/suite/plugins/r/multiauth.result
new file mode 100644
index 00000000000..75b604555a7
--- /dev/null
+++ b/mysql-test/suite/plugins/r/multiauth.result
@@ -0,0 +1,208 @@
+install soname 'auth_ed25519';
+create user 'USER' identified via unix_socket OR mysql_native_password as password("GOOD");
+create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E'
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user 'USER', mysqltest1;
+create user 'USER' identified via mysql_native_password as password("GOOD") OR unix_socket;
+create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR unix_socket
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
+drop user 'USER', mysqltest1;
+create user 'USER' identified via unix_socket OR ed25519 as password("GOOD");
+create user mysqltest1 identified via unix_socket OR ed25519 as password("good");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user 'USER', mysqltest1;
+create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket;
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
+drop user 'USER', mysqltest1;
+create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works");
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, second password works = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user 'USER', mysqltest1;
+create user mysqltest1 identified via mysql_native_password as password("good") OR mysql_native_password as password("works");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+# password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# second password works = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user mysqltest1;
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+show grants for mysqltest1;
+Grants for mysqltest1@%
+GRANT USAGE ON *.* TO `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+select json_detailed(priv) from mysql.global_priv where user='mysqltest1';
+json_detailed(priv)
+{
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": "*7D8C3DF236D9163B6C274A9D47704BC496988460",
+ "auth_or":
+ [
+
+ {
+ "plugin": "ed25519",
+ "authentication_string": "F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc"
+ },
+
+ {
+ "plugin": "unix_socket"
+ },
+
+ {
+ }
+ ],
+ "password_last_changed": #
+}
+select password,plugin,authentication_string from mysql.user where user='mysqltest1';
+Password plugin authentication_string
+*7D8C3DF236D9163B6C274A9D47704BC496988460 mysql_native_password *7D8C3DF236D9163B6C274A9D47704BC496988460
+flush privileges;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+set password for mysqltest1 = password('foobar');
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'qv2mG6HWCuy32Slb5xhV4THStewNz2VINVPbgk+XAJ8' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+alter user mysqltest1 identified via unix_socket OR mysql_native_password as password("some");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971'
+set password for mysqltest1 = password('foobar');
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*9B500343BC52E2911172EB52AE5CF4847604C6E5'
+alter user mysqltest1 identified via unix_socket;
+set password for mysqltest1 = password('bla');
+ERROR HY000: SET PASSWORD is ignored for users authenticating via unix_socket plugin
+alter user mysqltest1 identified via mysql_native_password as password("some") or unix_socket;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971' OR unix_socket
+drop user mysqltest1;
+# switching from mysql.global_priv to mysql.user
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+ERROR HY000: Column count of mysql.user is wrong. Expected 3, found 47. Created with MariaDB XX.YY.ZZ, now running XX.YY.ZZ. Please use mysql_upgrade to fix this error
+# switching back from mysql.user to mysql.global_priv
+create user 'USER' identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
+create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
+update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901234567890a', 'invalid password');
+flush privileges;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING 'invalid password' OR unix_socket
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match = failure
+mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
+# SET PASSWORD helps
+set password for mysqltest1 = password('bla');
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+drop user 'USER', mysqltest1;
+create user mysqltest1 identified via ed25519 as password("good");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
+# no plugin = failure
+mysqltest: Could not open connection 'default': 1045 Plugin client_ed25519 could not be loaded: no such file
+alter user mysqltest1 identified via ed25519 as password("good") OR mysql_native_password as password("works");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+# no plugin = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+# no plugin, second password works = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+drop user mysqltest1;
+uninstall soname 'auth_ed25519';
+create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR unix_socket
+alter user mysqltest1 identified via mysql_native_password as password("better");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED BY PASSWORD '*6E6CABC9967AB586F009616BA69DAC2953849C88'
+flush privileges;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED BY PASSWORD '*6E6CABC9967AB586F009616BA69DAC2953849C88'
+drop user mysqltest1;
diff --git a/mysql-test/suite/plugins/r/pam.result b/mysql-test/suite/plugins/r/pam.result
index 46f1223d7b3..b8588916169 100644
--- a/mysql-test/suite/plugins/r/pam.result
+++ b/mysql-test/suite/plugins/r/pam.result
@@ -7,9 +7,9 @@ grant proxy on pam_test to test_pam;
# note that current_user() differs from user()
#
Challenge input first.
-Enter: not very secret challenge
+Enter: *************************
Now, the magic number!
-PIN: ****
+PIN: 9225
select user(), current_user(), database();
user() current_user() database()
test_pam@localhost pam_test@% test
@@ -17,9 +17,58 @@ test_pam@localhost pam_test@% test
# athentication is unsuccessful
#
Challenge input first.
-Enter: not very secret challenge
+Enter: *************************
Now, the magic number!
-PIN: ****
+PIN: 9224
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: ****************
+Now, the magic number!
+PIN: 616
+#
+# athentication is successful
+#
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Now, the magic number!
+PIN: 9212
+#
+# MDEV-26339 Account specifics to be handled before proxying
+#
+alter user pam_test account lock;
+alter user pam_test require subject 'foobar';
+alter user pam_test password expire;
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+alter user pam_test account unlock;
+alter user pam_test require none;
+alter user pam_test identified by '';
+show create user pam_test;
+CREATE USER for pam_test@%
+CREATE USER `pam_test`@`%`
+alter user test_pam account lock;
+Now, the magic number!
+PIN: 9212
+alter user test_pam account unlock;
+alter user test_pam require subject 'foobar';
+Now, the magic number!
+PIN: 9212
+alter user test_pam require none;
+alter user test_pam password expire;
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
drop user test_pam;
drop user pam_test;
create user PAM_TEST identified via pam using 'mariadb_mtr';
@@ -27,19 +76,36 @@ create user PAM_TEST identified via pam using 'mariadb_mtr';
# athentication is unsuccessful
#
Challenge input first.
-Enter: not very secret challenge
+Enter: *************************
Now, the magic number!
-PIN: ****
+PIN: 9225
set global pam_winbind_workaround=1;
#
# athentication is successful
#
Challenge input first.
-Enter: not very secret challenge
+Enter: *************************
Now, the magic number!
-PIN: ****
+PIN: 9225
select user(), current_user(), database();
user() current_user() database()
PAM_TEST@localhost PAM_TEST@% test
drop user PAM_TEST;
+#
+# MDEV-27341 Use SET PASSWORD to change PAM service
+#
+create user pam_test identified via pam using 'mariadb_mtr';
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9225
+select user(), current_user(), database();
+user() current_user() database()
+pam_test@localhost pam_test@% test
+set password='foo';
+ERROR HY000: SET PASSWORD is ignored for users authenticating via pam plugin
+show create user;
+CREATE USER for pam_test@%
+CREATE USER `pam_test`@`%` IDENTIFIED VIA pam USING 'mariadb_mtr'
+drop user pam_test;
uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/r/pam_cleartext.result b/mysql-test/suite/plugins/r/pam_cleartext.result
index 824e8329cc3..07c379a4b7f 100644
--- a/mysql-test/suite/plugins/r/pam_cleartext.result
+++ b/mysql-test/suite/plugins/r/pam_cleartext.result
@@ -8,6 +8,14 @@ pam_use_cleartext_plugin ON
#
# same test as in pam.test now fails
#
+#
+# success
+#
+user() current_user() database()
+test_pam@localhost pam_test@% NULL
+#
+# failure
+#
drop user test_pam;
drop user pam_test;
uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/r/pam_v1.result b/mysql-test/suite/plugins/r/pam_v1.result
new file mode 100644
index 00000000000..66776e3bca7
--- /dev/null
+++ b/mysql-test/suite/plugins/r/pam_v1.result
@@ -0,0 +1,38 @@
+install plugin pam soname 'auth_pam_v1.so';
+create user test_pam identified via pam using 'mariadb_mtr';
+create user pam_test;
+grant proxy on pam_test to test_pam;
+#
+# athentication is successful, challenge/pin are ok
+# note that current_user() differs from user()
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9225
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9224
+#
+# athentication is successful
+#
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Now, the magic number!
+PIN: 9212
+drop user test_pam;
+drop user pam_test;
+uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result
index 7f88297a121..9768040aa94 100644
--- a/mysql-test/suite/plugins/r/server_audit.result
+++ b/mysql-test/suite/plugins/r/server_audit.result
@@ -322,19 +322,25 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t2 (id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users=\'odin, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'SHOW WARNINGS',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
-TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0
@@ -351,6 +357,9 @@ TIME,HOSTNAME,root,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t1 (id2 int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
@@ -363,6 +372,9 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,sa_db,sa_t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table sa_t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into sa_t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
@@ -376,36 +388,36 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'ALTER USER u3 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
@@ -434,55 +446,55 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',
TIME,HOSTNAME,user1,localhost,ID,ID,CREATE,sa_db,t1,
TIME,HOSTNAME,user1,localhost,ID,ID,WRITE,sa_db,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_logging= off',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_incl_users=\'root, plug_dest\'',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug IDENTIFIED WITH \'test_plugin_server\' AS \'plug_dest\'',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug_dest IDENTIFIED BY *****',0
TIME,HOSTNAME,plug,localhost,ID,0,FAILED_CONNECT,,,ID
TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0
TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0
TIME,HOSTNAME,plug,localhost,ID,ID,QUERY,test,'select USER(),CURRENT_USER()',0
TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,test,,0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug_dest',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0
diff --git a/mysql-test/suite/plugins/r/show_all_plugins.result b/mysql-test/suite/plugins/r/show_all_plugins.result
index dd6cbfce4c4..3bdaf39d0d0 100644
--- a/mysql-test/suite/plugins/r/show_all_plugins.result
+++ b/mysql-test/suite/plugins/r/show_all_plugins.result
@@ -4,8 +4,8 @@ Variable_name Value
Opened_plugin_libraries 0
select * from information_schema.all_plugins where plugin_library='ha_example.so';
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE PLUGIN_TYPE_VERSION PLUGIN_LIBRARY PLUGIN_LIBRARY_VERSION PLUGIN_AUTHOR PLUGIN_DESCRIPTION PLUGIN_LICENSE LOAD_OPTION PLUGIN_MATURITY PLUGIN_AUTH_VERSION
-EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.13 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
-UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.13 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
+EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.14 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
+UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.14 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
show status like '%libraries%';
Variable_name Value
Opened_plugin_libraries 1
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
index e8f98d1a9c8..c4f8d15fc51 100644
--- a/mysql-test/suite/plugins/r/simple_password_check.result
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -6,7 +6,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_LIBRARY simple_password_check.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Simple password strength checks
PLUGIN_LICENSE GPL
@@ -200,9 +200,11 @@ Level Code Message
Warning 1819 simple_password_check: The password equal to the user name
Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
Error 1396 Operation CREATE USER failed for 'foo2'@'%'
+grant select on *.* to foo2 identified with mysql_old_password using '';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
grant select on *.* to foo2 identified with mysql_old_password;
-ERROR 28000: Can't find any matching row in the user table
-update mysql.user set password='xxx' where user='foo1';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
set global strict_password_validation=0;
set password for foo1 = '';
ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
@@ -224,6 +226,27 @@ set global strict_password_validation=1;
drop user foo1;
create role r1;
drop role r1;
+flush privileges;
uninstall plugin simple_password_check;
create user foo1 identified by 'pwd';
drop user foo1;
+#
+# MDEV-26650: Failed ALTER USER/GRANT statement removes the
+# password from the cache
+#
+create user foo1@localhost identified by '<GDFH:3ghj';
+show grants for foo1@localhost;
+Grants for foo1@localhost
+GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
+install soname "simple_password_check";
+ALTER USER foo1@localhost identified by 'foo1';
+ERROR HY000: Operation ALTER USER failed for 'foo1'@'localhost'
+show grants for foo1@localhost;
+Grants for foo1@localhost
+GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
+flush privileges;
+show grants for foo1@localhost;
+Grants for foo1@localhost
+GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
+drop user foo1@localhost;
+uninstall plugin simple_password_check;
diff --git a/mysql-test/suite/plugins/r/thread_pool_server_audit.result b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
index 250450e6451..8c6ece53227 100644
--- a/mysql-test/suite/plugins/r/thread_pool_server_audit.result
+++ b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
@@ -251,19 +251,25 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t2 (id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users=\'odin, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'SHOW WARNINGS',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
-TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0
@@ -280,6 +286,9 @@ TIME,HOSTNAME,root,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t1 (id2 int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
@@ -292,6 +301,9 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,sa_db,sa_t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table sa_t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into sa_t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
@@ -305,34 +317,34 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
diff --git a/mysql-test/suite/plugins/r/unix_socket.result b/mysql-test/suite/plugins/r/unix_socket.result
index 096b736cd68..b663d341221 100644
--- a/mysql-test/suite/plugins/r/unix_socket.result
+++ b/mysql-test/suite/plugins/r/unix_socket.result
@@ -1,4 +1,3 @@
-install plugin unix_socket soname 'auth_socket.so';
#
# with named user
#
@@ -28,4 +27,3 @@ USER@localhost @% test
#
delete from mysql.user where user='';
FLUSH PRIVILEGES;
-uninstall plugin unix_socket;
diff --git a/mysql-test/suite/plugins/suite.pm b/mysql-test/suite/plugins/suite.pm
index a2ac3957af0..359a5409fa3 100644
--- a/mysql-test/suite/plugins/suite.pm
+++ b/mysql-test/suite/plugins/suite.pm
@@ -4,6 +4,13 @@ use My::Platform;
@ISA = qw(My::Suite);
+if (-d '../sql' && !&::using_extern()) {
+ my $src = "$::bindir/plugin/auth_pam/auth_pam_tool";
+ my $dst = "$::plugindir/auth_pam_tool_dir/auth_pam_tool";
+ ::mkpath( "$::plugindir/auth_pam_tool_dir");
+ eval { symlink $src, $dst } or ::copy $src, $dst;
+}
+
sub cassandra_running() {
return 0 if IS_WINDOWS;
system 'echo show version | cqlsh -3 2>/dev/null >/dev/null';
@@ -12,8 +19,10 @@ sub cassandra_running() {
sub skip_combinations {
my %skip;
- $skip{'t/pam.test'} = 'No pam setup for mtr'
+ $skip{'t/pam_init.inc'} = 'No pam setup for mtr'
unless -e '/etc/pam.d/mariadb_mtr';
+ $skip{'t/pam_init.inc'} = 'Not run as user owning auth_pam_tool_dir'
+ unless -o $::plugindir . '/auth_pam_tool_dir';
$skip{'t/cassandra.test'} = 'Cassandra is not running'
unless cassandra_running();
$skip{'t/cassandra_qcache.test'} = $skip{'t/cassandra.test'};
diff --git a/mysql-test/suite/plugins/t/audit_null_debug.test b/mysql-test/suite/plugins/t/audit_null_debug.test
index f3c88d24c0c..52c50f13b74 100644
--- a/mysql-test/suite/plugins/t/audit_null_debug.test
+++ b/mysql-test/suite/plugins/t/audit_null_debug.test
@@ -5,6 +5,8 @@ if (!$ADT_NULL_SO) {
skip No NULL_AUDIT plugin;
}
+alter table mysql.plugin engine=myisam;
+
set @old_dbug=@@debug_dbug;
call mtr.add_suppression("Index for table.*mysql.plugin.MYI");
call mtr.add_suppression("Index for table 'plugin' is corrupt; try to repair it");
@@ -31,4 +33,4 @@ uninstall plugin audit_null;
uninstall plugin audit_null;
delete from mysql.plugin where name='audit_null';
-
+alter table mysql.plugin engine=aria;
diff --git a/mysql-test/suite/plugins/t/auth_ed25519.test b/mysql-test/suite/plugins/t/auth_ed25519.test
index 3e02bdf97d2..8e0bdd1d460 100644
--- a/mysql-test/suite/plugins/t/auth_ed25519.test
+++ b/mysql-test/suite/plugins/t/auth_ed25519.test
@@ -28,6 +28,19 @@ query_vertical select * from information_schema.plugins where plugin_name='ed255
let $pwd=`select ed25519_password("secret")`;
eval create user test1@localhost identified via ed25519 using '$pwd';
show grants for test1@localhost;
+drop user test1@localhost;
+--error ER_PASSWD_LENGTH
+create user test1@localhost identified via ed25519 using 'foo';
+--error ER_PASSWD_LENGTH
+create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890';
+create user test1@localhost identified via ed25519 using password('foo');
+show grants for test1@localhost;
+select ed25519_password('foo');
+set password for test1@localhost = password('bar');
+show create user test1@localhost;
+select ed25519_password('bar');
+eval set password for test1@localhost = '$pwd';
+show create user test1@localhost;
replace_result $MASTER_MYPORT PORT $MASTER_MYSOCK SOCKET;
error ER_ACCESS_DENIED_ERROR;
diff --git a/mysql-test/suite/plugins/t/feedback_plugin_load.test b/mysql-test/suite/plugins/t/feedback_plugin_load.test
index 9fbe523e5f3..f67397afdfe 100644
--- a/mysql-test/suite/plugins/t/feedback_plugin_load.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_load.test
@@ -32,11 +32,11 @@ select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%debug%';
# Embedded server does not use the table mysqld.user and thus
-# does not automatically use latin1_bin on startup. Use it manually.
+# does not automatically use utf8mb4 on startup. Use it manually.
--disable_query_log
if (`SELECT VERSION() LIKE '%embedded%'`)
{
- DO _latin1'test' COLLATE latin1_bin;
+ create temporary table t1 (a json);
}
--enable_query_log
SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt
new file mode 100644
index 00000000000..52bf94f3511
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt
@@ -0,0 +1 @@
+--loose-enable-named-pipe --plugin-load=$AUTH_NAMED_PIPE_SO
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test
new file mode 100644
index 00000000000..79aeb7d3cbe
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test
@@ -0,0 +1,22 @@
+# Tests that max_password_errors has no effect on login errors with
+# passwordless plugins (Windows version / auth_named_pipe)
+
+--source include/not_embedded.inc
+--source include/have_auth_named_pipe.inc
+if (`SELECT '$USERNAME' = 'nosuchuser'`) {
+ skip skipped for nosuchuser;
+}
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'named_pipe';
+
+set global max_password_errors=1;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser,,,,,PIPE);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser,,,,,PIPE);
+
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt
new file mode 100644
index 00000000000..91bb73e34f7
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt
@@ -0,0 +1 @@
+--loose-enable-named-pipe --plugin-load=$AUTH_SOCKET_SO
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_socket.test b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.test
new file mode 100644
index 00000000000..495a68a0b59
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.test
@@ -0,0 +1,23 @@
+# Tests that max_password_errors has no effect on login errors with
+# passwordless plugins (Unix version / auth_unix_socket)
+
+--source include/not_embedded.inc
+--source include/have_unix_socket.inc
+
+if (`SELECT '$USER' = 'nosuchuser'`) {
+ skip USER is nosuchuser;
+}
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'unix_socket';
+
+set global max_password_errors=1;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser);
+
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/t/multiauth.test b/mysql-test/suite/plugins/t/multiauth.test
new file mode 100644
index 00000000000..10558f322cf
--- /dev/null
+++ b/mysql-test/suite/plugins/t/multiauth.test
@@ -0,0 +1,208 @@
+--source include/not_ubsan.inc
+#
+# MDEV-11340 Allow multiple alternative authentication methods for the same user
+#
+--source include/have_unix_socket.inc
+if (`SELECT '$USER' = 'mysqltest1'`) {
+ skip USER is mysqltest1;
+}
+if (!$AUTH_ED25519_SO) {
+ skip No auth_ed25519 plugin;
+}
+
+--let $plugindir=`SELECT @@global.plugin_dir`
+install soname 'auth_ed25519';
+
+--let $try_auth=$MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/peercred_test.txt 2>&1
+
+--write_file $MYSQLTEST_VARDIR/tmp/peercred_test.txt
+--let $replace1=$USER@localhost
+--let $replace2=$USER@%
+--replace_result $replace1 "USER@localhost" $replace2 "USER@%"
+select user(), current_user(), database();
+EOF
+
+--let $creplace=create user '$USER'
+--let $dreplace=drop user '$USER'
+
+#
+# socket,password
+#
+--replace_result $creplace "create user 'USER'"
+eval $creplace identified via unix_socket OR mysql_native_password as password("GOOD");
+create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good");
+show create user mysqltest1;
+--echo # name match = ok
+--exec $try_auth -u $USER
+--echo # name does not match, password good = ok
+--exec $try_auth -u mysqltest1 -pgood
+--echo # name does not match, password bad = failure
+--error 1
+--exec $try_auth -u mysqltest1 -pbad
+--replace_result $dreplace "drop user 'USER'"
+eval $dreplace, mysqltest1;
+
+#
+# password,socket
+#
+--replace_result $creplace "create user 'USER'"
+eval $creplace identified via mysql_native_password as password("GOOD") OR unix_socket;
+create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
+show create user mysqltest1;
+--echo # name match = ok
+--exec $try_auth -u $USER
+--echo # name does not match, password good = ok
+--exec $try_auth -u mysqltest1 -pgood
+--echo # name does not match, password bad = failure
+--error 1
+--exec $try_auth -u mysqltest1 -pbad
+--replace_result $dreplace "drop user 'USER'"
+eval $dreplace, mysqltest1;
+
+#
+# socket,ed25519
+#
+--replace_result $creplace "create user 'USER'"
+eval $creplace identified via unix_socket OR ed25519 as password("GOOD");
+create user mysqltest1 identified via unix_socket OR ed25519 as password("good");
+show create user mysqltest1;
+--echo # name match = ok
+--exec $try_auth -u $USER
+--echo # name does not match, password good = ok
+--exec $try_auth -u mysqltest1 -pgood
+--echo # name does not match, password bad = failure
+--error 1
+--exec $try_auth -u mysqltest1 -pbad
+--replace_result $dreplace "drop user 'USER'"
+eval $dreplace, mysqltest1;
+
+#
+# ed25519,socket
+#
+--replace_result $creplace "create user 'USER'"
+eval $creplace identified via ed25519 as password("GOOD") OR unix_socket;
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket;
+show create user mysqltest1;
+--echo # name match = ok
+--exec $try_auth -u $USER
+--echo # name does not match, password good = ok
+--exec $try_auth -u mysqltest1 -pgood
+--echo # name does not match, password bad = failure
+--error 1
+--exec $try_auth -u mysqltest1 -pbad
+--replace_result $dreplace "drop user 'USER'"
+eval $dreplace, mysqltest1;
+
+#
+# ed25519,socket,password
+#
+--replace_result $creplace "create user 'USER'"
+eval $creplace identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works");
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+show create user mysqltest1;
+--echo # name match = ok
+--exec $try_auth -u $USER
+--echo # name does not match, password good = ok
+--exec $try_auth -u mysqltest1 -pgood
+--echo # name does not match, second password works = ok
+--exec $try_auth -u mysqltest1 -pworks
+--echo # name does not match, password bad = failure
+--error 1
+--exec $try_auth -u mysqltest1 -pbad
+--replace_result $dreplace "drop user 'USER'"
+eval $dreplace, mysqltest1;
+
+#
+# password,password
+#
+create user mysqltest1 identified via mysql_native_password as password("good") OR mysql_native_password as password("works");
+show create user mysqltest1;
+--echo # password good = ok
+--exec $try_auth -u mysqltest1 -pgood
+--echo # second password works = ok
+--exec $try_auth -u mysqltest1 -pworks
+--echo # password bad = failure
+--error 1
+--exec $try_auth -u mysqltest1 -pbad
+drop user mysqltest1;
+
+#
+# show grants, flush privileges, set password, alter user
+#
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+show grants for mysqltest1;
+--replace_regex /password_last_changed": [0-9]*/password_last_changed": #/
+select json_detailed(priv) from mysql.global_priv where user='mysqltest1';
+select password,plugin,authentication_string from mysql.user where user='mysqltest1';
+flush privileges;
+show create user mysqltest1;
+set password for mysqltest1 = password('foobar');
+show create user mysqltest1;
+alter user mysqltest1 identified via unix_socket OR mysql_native_password as password("some");
+show create user mysqltest1;
+set password for mysqltest1 = password('foobar');
+show create user mysqltest1;
+alter user mysqltest1 identified via unix_socket;
+--error ER_SET_PASSWORD_AUTH_PLUGIN
+set password for mysqltest1 = password('bla');
+alter user mysqltest1 identified via mysql_native_password as password("some") or unix_socket;
+show create user mysqltest1;
+drop user mysqltest1;
+
+--source include/switch_to_mysql_user.inc
+--replace_regex /\d{6}/XX.YY.ZZ/
+--error ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+--source include/switch_to_mysql_global_priv.inc
+
+#
+# invalid password,socket
+#
+--replace_result $creplace "create user 'USER'"
+eval $creplace identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
+create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
+update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901234567890a', 'invalid password');
+flush privileges;
+show create user mysqltest1;
+--echo # name match = ok
+--exec $try_auth -u $USER
+--echo # name does not match = failure
+--error 1
+--exec $try_auth -u mysqltest1
+--echo # SET PASSWORD helps
+set password for mysqltest1 = password('bla');
+--exec $try_auth -u mysqltest1 -pbla
+--replace_result $dreplace "drop user 'USER'"
+eval $dreplace, mysqltest1;
+
+#
+# missing client-side plugin
+#
+create user mysqltest1 identified via ed25519 as password("good");
+show create user mysqltest1;
+--echo # no plugin = failure
+--replace_regex /loaded: .*client_ed25519.so: cannot open shared object file: No such file or directory/loaded: no such file/ /loaded: Cannot open.*client_ed25519.so./loaded: no such file/
+--error 1
+--exec $try_auth -u mysqltest1 -pgood --plugin-dir=$plugindir/no
+alter user mysqltest1 identified via ed25519 as password("good") OR mysql_native_password as password("works");
+show create user mysqltest1;
+--echo # no plugin = failure
+--error 1
+--exec $try_auth -u mysqltest1 -pgood --plugin-dir=$plugindir/no
+--echo # no plugin, second password works = ok
+--exec $try_auth -u mysqltest1 -pworks --plugin-dir=$plugindir/no
+drop user mysqltest1;
+
+uninstall soname 'auth_ed25519';
+--remove_file $MYSQLTEST_VARDIR/tmp/peercred_test.txt
+
+#
+# MDEV-21928 ALTER USER doesn't remove excess authentication plugins from mysql.global_priv
+#
+create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
+show create user mysqltest1;
+alter user mysqltest1 identified via mysql_native_password as password("better");
+show create user mysqltest1;
+flush privileges;
+show create user mysqltest1;
+drop user mysqltest1;
diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test
index 8441b83c5c3..9077de4c98b 100644
--- a/mysql-test/suite/plugins/t/pam.test
+++ b/mysql-test/suite/plugins/t/pam.test
@@ -1,4 +1,4 @@
-
+let $PAM_PLUGIN_VERSION= $AUTH_PAM_SO;
--source pam_init.inc
--write_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
@@ -13,6 +13,17 @@ not very secret challenge
select user(), current_user(), database();
EOF
+--write_file $MYSQLTEST_VARDIR/tmp/pam_ugly.txt
+crash pam module
+616
+select user(), current_user(), database();
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+9212
+select user(), current_user(), database();
+EOF
+
--echo #
--echo # athentication is successful, challenge/pin are ok
--echo # note that current_user() differs from user()
@@ -25,6 +36,53 @@ EOF
--error 1
--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+--echo #
+--echo # athentication is unsuccessful
+--echo #
+--error 1
+--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_ugly.txt
+
+--echo #
+--echo # athentication is successful
+--echo #
+--exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+
+--echo #
+--echo # athentication is unsuccessful
+--echo #
+--error 1
+--exec $MYSQL_TEST -u test_pam -pbadpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+
+--echo #
+--echo # MDEV-26339 Account specifics to be handled before proxying
+--echo #
+
+# one can connect if the proxy account is locked
+alter user pam_test account lock;
+alter user pam_test require subject 'foobar';
+alter user pam_test password expire;
+--error 0
+--exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+alter user pam_test account unlock;
+alter user pam_test require none;
+alter user pam_test identified by '';
+show create user pam_test;
+
+#one cannot connect if the proxied account is locked
+alter user test_pam account lock;
+--error 1
+--exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+alter user test_pam account unlock;
+
+alter user test_pam require subject 'foobar';
+--error 1
+--exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+alter user test_pam require none;
+
+alter user test_pam password expire;
+--error 1
+--exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+
drop user test_pam;
drop user pam_test;
create user PAM_TEST identified via pam using 'mariadb_mtr';
@@ -42,9 +100,27 @@ set global pam_winbind_workaround=1;
--exec $MYSQL_TEST -u PAM_TEST < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_good2.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_ugly.txt
drop user PAM_TEST;
+--echo #
+--echo # MDEV-27341 Use SET PASSWORD to change PAM service
+--echo #
+create user pam_test identified via pam using 'mariadb_mtr';
+--write_file $MYSQLTEST_VARDIR/tmp/setpwd.txt
+not very secret challenge
+9225
+select user(), current_user(), database();
+error ER_SET_PASSWORD_AUTH_PLUGIN;
+set password='foo';
+show create user;
+EOF
+--exec $MYSQL_TEST -u pam_test < $MYSQLTEST_VARDIR/tmp/setpwd.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/setpwd.txt
+drop user pam_test;
+
let $count_sessions= 1;
--source include/wait_until_count_sessions.inc
uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/t/pam_cleartext.test b/mysql-test/suite/plugins/t/pam_cleartext.test
index 29ed7430649..7542c8f51f6 100644
--- a/mysql-test/suite/plugins/t/pam_cleartext.test
+++ b/mysql-test/suite/plugins/t/pam_cleartext.test
@@ -1,4 +1,4 @@
-
+let $PAM_PLUGIN_VERSION= $AUTH_PAM_SO;
--source pam_init.inc
show variables like 'pam_use_%';
@@ -14,9 +14,22 @@ EOF
--echo #
--error 1
--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--error 1
+--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir -p'something' < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--echo #
+--echo # success
+--echo #
+--exec $MYSQL -u test_pam --plugin-dir=$plugindir -p'cleartext good' -e 'select user(), current_user(), database()'
+
+--echo #
+--echo # failure
+--echo #
+--error 1
+--exec $MYSQL -u test_pam --plugin-dir=$plugindir -p'cleartext bad' -e 'select user(), current_user(), database()'
+
drop user test_pam;
drop user pam_test;
let $count_sessions= 1;
diff --git a/mysql-test/suite/plugins/t/pam_init.inc b/mysql-test/suite/plugins/t/pam_init.inc
index 281666d51a6..131b787f6b9 100644
--- a/mysql-test/suite/plugins/t/pam_init.inc
+++ b/mysql-test/suite/plugins/t/pam_init.inc
@@ -1,11 +1,11 @@
--source include/not_embedded.inc
-if (!$AUTH_PAM_SO) {
+if (!$PAM_PLUGIN_VERSION) {
skip No pam auth plugin;
}
-eval install plugin pam soname '$AUTH_PAM_SO';
+eval install plugin pam soname '$PAM_PLUGIN_VERSION';
create user test_pam identified via pam using 'mariadb_mtr';
create user pam_test;
grant proxy on pam_test to test_pam;
diff --git a/mysql-test/suite/plugins/t/pam_v1.test b/mysql-test/suite/plugins/t/pam_v1.test
new file mode 100644
index 00000000000..c9c0a97f6a9
--- /dev/null
+++ b/mysql-test/suite/plugins/t/pam_v1.test
@@ -0,0 +1,52 @@
+let $PAM_PLUGIN_VERSION= $AUTH_PAM_V1_SO;
+--source pam_init.inc
+
+--write_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+not very secret challenge
+9225
+select user(), current_user(), database();
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+not very secret challenge
+9224
+select user(), current_user(), database();
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+9212
+select user(), current_user(), database();
+EOF
+
+--echo #
+--echo # athentication is successful, challenge/pin are ok
+--echo # note that current_user() differs from user()
+--echo #
+--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+
+--echo #
+--echo # athentication is unsuccessful
+--echo #
+--error 1
+--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+
+--echo #
+--echo # athentication is successful
+--echo #
+--error 0
+--exec $MYSQL_TEST -u test_pam -pgoodpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+
+--echo #
+--echo # athentication is unsuccessful
+--echo #
+--error 1
+--exec $MYSQL_TEST -u test_pam -pbadpassword --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_good2.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+drop user test_pam;
+drop user pam_test;
+let $count_sessions= 1;
+--source include/wait_until_count_sessions.inc
+uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test
index e7ca54cffb2..d8f8b9d0165 100644
--- a/mysql-test/suite/plugins/t/server_audit.test
+++ b/mysql-test/suite/plugins/t/server_audit.test
@@ -71,7 +71,7 @@ show variables like 'server_audit%';
set global server_audit_mode=1;
set global server_audit_events='';
create database sa_db;
-let SEARCH_COUNT= 41;
+let SEARCH_COUNT= 47;
source include/wait_for_line_count_in_file.inc;
connect (con1,localhost,root,,test);
@@ -85,7 +85,7 @@ insert into sa_t1 values (1), (2);
drop table sa_t1;
drop database sa_db;
disconnect con1;
-let SEARCH_COUNT= 68;
+let SEARCH_COUNT= 80;
source include/wait_for_line_count_in_file.inc;
connection default;
diff --git a/mysql-test/suite/plugins/t/simple_password_check.test b/mysql-test/suite/plugins/t/simple_password_check.test
index d0ba7e1180b..3ce2d86cd68 100644
--- a/mysql-test/suite/plugins/t/simple_password_check.test
+++ b/mysql-test/suite/plugins/t/simple_password_check.test
@@ -96,11 +96,13 @@ grant select on *.* to foo2 identified with mysql_old_password using '2222222222
--error ER_NOT_VALID_PASSWORD
create user foo2 identified with mysql_native_password using '';
show warnings;
---error ER_PASSWORD_NO_MATCH
+--error ER_NOT_VALID_PASSWORD
+grant select on *.* to foo2 identified with mysql_old_password using '';
+--error ER_NOT_VALID_PASSWORD
grant select on *.* to foo2 identified with mysql_old_password;
# direct updates are not protected
-update mysql.user set password='xxx' where user='foo1';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
set global strict_password_validation=0;
@@ -127,8 +129,24 @@ drop user foo1;
create role r1;
drop role r1;
+flush privileges;
+
uninstall plugin simple_password_check;
create user foo1 identified by 'pwd';
drop user foo1;
+--echo #
+--echo # MDEV-26650: Failed ALTER USER/GRANT statement removes the
+--echo # password from the cache
+--echo #
+create user foo1@localhost identified by '<GDFH:3ghj';
+show grants for foo1@localhost;
+install soname "simple_password_check";
+--error ER_CANNOT_USER
+ALTER USER foo1@localhost identified by 'foo1';
+show grants for foo1@localhost;
+flush privileges;
+show grants for foo1@localhost;
+drop user foo1@localhost;
+uninstall plugin simple_password_check;
diff --git a/mysql-test/suite/plugins/t/unix_socket.test b/mysql-test/suite/plugins/t/unix_socket.test
index 75409ec70b4..be2afb0ca66 100644
--- a/mysql-test/suite/plugins/t/unix_socket.test
+++ b/mysql-test/suite/plugins/t/unix_socket.test
@@ -1,13 +1,5 @@
--source include/have_unix_socket.inc
-if (!$USER) {
- skip USER variable is undefined;
-}
-
-let $plugindir=`SELECT @@global.plugin_dir`;
-
-eval install plugin unix_socket soname '$AUTH_SOCKET_SO';
-
--echo #
--echo # with named user
--echo #
@@ -26,13 +18,13 @@ EOF
--echo #
--echo # name match = ok
--echo #
---exec $MYSQL_TEST -u $USER --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
+--exec $MYSQL_TEST -u $USER < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
--echo #
--echo # name does not match = failure
--echo #
--error 1
---exec $MYSQL_TEST -u foobar --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
+--exec $MYSQL_TEST -u foobar < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
--let $replace=drop user '$USER'
--replace_result $replace "drop user 'USER'"
@@ -45,16 +37,15 @@ grant SELECT ON test.* TO '' identified via unix_socket;
--echo #
--echo # name match = ok
--echo #
---exec $MYSQL_TEST -u $USER --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
+--exec $MYSQL_TEST -u $USER < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
--echo #
--echo # name does not match = failure
--echo #
--error 1
---exec $MYSQL_TEST -u foobar --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
+--exec $MYSQL_TEST -u foobar < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
# restoring mysql.user to the original state.
delete from mysql.user where user='';
FLUSH PRIVILEGES;
-uninstall plugin unix_socket;
--remove_file $MYSQLTEST_VARDIR/tmp/peercred_test.txt
diff --git a/mysql-test/suite/roles/acl_statistics.result b/mysql-test/suite/roles/acl_statistics.result
index 46e48b86936..f43f692cc48 100644
--- a/mysql-test/suite/roles/acl_statistics.result
+++ b/mysql-test/suite/roles/acl_statistics.result
@@ -9,8 +9,8 @@ Acl_package_body_grants 0
Acl_proxy_users 2
Acl_role_grants 0
Acl_roles 0
-Acl_table_grants 0
-Acl_users 4
+Acl_table_grants 1
+Acl_users 5
SELECT count(*) COLUMN_GRANTS from mysql.columns_priv;
COLUMN_GRANTS
0
@@ -34,10 +34,10 @@ ROLES
0
SELECT count(*) TABLE_GRANTS from mysql.tables_priv;
TABLE_GRANTS
-0
+1
SELECT count(*) USERS from mysql.user where is_role='N';
USERS
-4
+5
CREATE USER u1;
CREATE ROLE r1;
CREATE ROLE r2;
@@ -74,8 +74,8 @@ Acl_package_body_grants 0
Acl_proxy_users 3
Acl_role_grants 4
Acl_roles 2
-Acl_table_grants 2
-Acl_users 5
+Acl_table_grants 3
+Acl_users 6
SELECT count(*) COLUMN_GRANTS from mysql.columns_priv;
COLUMN_GRANTS
2
@@ -99,10 +99,10 @@ ROLES
2
SELECT count(*) TABLE_GRANTS from mysql.tables_priv;
TABLE_GRANTS
-2
+3
SELECT count(*) USERS from mysql.user where is_role='N';
USERS
-5
+6
DROP PROCEDURE mysql.test_proc;
DROP FUNCTION mysql.test_func;
DROP ROLE r2;
diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result
index ad0561aed4d..90bf1506b37 100644
--- a/mysql-test/suite/roles/create_and_drop_role.result
+++ b/mysql-test/suite/roles/create_and_drop_role.result
@@ -7,7 +7,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
create role test_role1;
create role test_role2, test_role3;
select user, host, is_role from user where user like 'test%';
-user host is_role
+User Host is_role
test_role1 Y
test_role2 Y
test_role3 Y
@@ -19,7 +19,7 @@ ERROR HY000: Operation CREATE ROLE failed for 'test_role1'
create role test_role1, test_role2;
ERROR HY000: Operation CREATE ROLE failed for 'test_role1'
select user, host, is_role from user where user like 'test%';
-user host is_role
+User Host is_role
test_role1 Y
test_role2 Y
drop role test_role1;
@@ -34,7 +34,7 @@ drop role dummy;
ERROR HY000: Operation DROP ROLE failed for 'dummy'
drop user dummy@'';
select user, host, is_role from user where user like 'test%';
-user host is_role
+User Host is_role
disconnect mysql;
connection default;
create role '';
diff --git a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result
index afe00ed7729..412ddf9d423 100644
--- a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result
+++ b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result
@@ -1,3 +1,4 @@
+# switching from mysql.global_priv to mysql.user
connect mysql, localhost, root,,;
use mysql;
alter table user drop column is_role;
@@ -15,7 +16,6 @@ create role test_role;
create user test_user@localhost;
grant test_role to test_user@localhost;
set default role test_role for root@localhost;
-ERROR HY000: Column count of mysql.user is wrong. Expected 46, found 45. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
drop role test_role;
drop user test_user@localhost;
alter table user add column default_role char(80) binary default '' not null
@@ -27,3 +27,4 @@ update user set is_role='N';
flush privileges;
create role test_role;
drop role test_role;
+# switching back from mysql.user to mysql.global_priv
diff --git a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
index ebd75c34ca1..9cf0d7b4aff 100644
--- a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
+++ b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
@@ -3,6 +3,7 @@
# that don't have 'default_role' column
#
source include/not_embedded.inc;
+source include/switch_to_mysql_user.inc;
connect (mysql, localhost, root,,);
use mysql;
@@ -29,8 +30,8 @@ after password_expired;
create role test_role;
create user test_user@localhost;
grant test_role to test_user@localhost;
---replace_regex /10\d\d\d\d/MYSQL_VERSION_ID/
---error ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
+#--replace_regex /10\d\d\d\d/MYSQL_VERSION_ID/
+#--error ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
set default role test_role for root@localhost;
drop role test_role;
drop user test_user@localhost;
@@ -46,3 +47,5 @@ update user set is_role='N';
flush privileges;
create role test_role;
drop role test_role;
+
+source include/switch_to_mysql_global_priv.inc;
diff --git a/mysql-test/suite/roles/default_create_user_not_role.result b/mysql-test/suite/roles/default_create_user_not_role.result
index 171015f6e82..3f32329b80c 100644
--- a/mysql-test/suite/roles/default_create_user_not_role.result
+++ b/mysql-test/suite/roles/default_create_user_not_role.result
@@ -2,7 +2,7 @@ connect mysql, localhost, root,,;
use mysql;
create user 'test'@'localhost';
select user, host, is_role from user where user='test' and host='localhost';
-user host is_role
+User Host is_role
test localhost N
drop user 'test'@'localhost';
disconnect mysql;
diff --git a/mysql-test/suite/roles/flush_roles-17898.result b/mysql-test/suite/roles/flush_roles-17898.result
index 970c0d12195..85aeca368e7 100644
--- a/mysql-test/suite/roles/flush_roles-17898.result
+++ b/mysql-test/suite/roles/flush_roles-17898.result
@@ -1,12 +1,8 @@
use mysql;
insert db (db,user,select_priv) values ('foo','dwr_foo','Y'), ('bar','dwr_bar','Y');
insert roles_mapping (user,role) values ('dwr_qux_dev','dwr_foo'),('dwr_qux_dev','dwr_bar');
-insert ignore user (user,show_db_priv,is_role) values ('dwr_foo','N','Y'), ('dwr_bar','N','Y'), ('dwr_qux_dev','Y','Y');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert global_priv values ('','dwr_foo','{"is_role":true}'), ('','dwr_bar','{"is_role":true}'),
+('','dwr_qux_dev','{"access":16384,"is_role":true}');
flush privileges;
drop role dwr_foo;
drop role dwr_bar;
diff --git a/mysql-test/suite/roles/flush_roles-17898.test b/mysql-test/suite/roles/flush_roles-17898.test
index 22568196c30..8dc55a87a01 100644
--- a/mysql-test/suite/roles/flush_roles-17898.test
+++ b/mysql-test/suite/roles/flush_roles-17898.test
@@ -5,7 +5,8 @@ source include/not_embedded.inc;
use mysql;
insert db (db,user,select_priv) values ('foo','dwr_foo','Y'), ('bar','dwr_bar','Y');
insert roles_mapping (user,role) values ('dwr_qux_dev','dwr_foo'),('dwr_qux_dev','dwr_bar');
-insert ignore user (user,show_db_priv,is_role) values ('dwr_foo','N','Y'), ('dwr_bar','N','Y'), ('dwr_qux_dev','Y','Y');
+insert global_priv values ('','dwr_foo','{"is_role":true}'), ('','dwr_bar','{"is_role":true}'),
+ ('','dwr_qux_dev','{"access":16384,"is_role":true}');
flush privileges;
drop role dwr_foo;
drop role dwr_bar;
diff --git a/mysql-test/suite/roles/grant_revoke_current.result b/mysql-test/suite/roles/grant_revoke_current.result
index e231a465317..329cab6474b 100644
--- a/mysql-test/suite/roles/grant_revoke_current.result
+++ b/mysql-test/suite/roles/grant_revoke_current.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
grant select on *.* to current_role;
ERROR 0L000: Invalid definer
revoke select on *.* from current_role;
@@ -39,5 +40,5 @@ GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*34391
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
GRANT USAGE ON *.* TO `r1`
set password='';
-update mysql.user set plugin='';
drop role r1;
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/suite/roles/grant_revoke_current.test b/mysql-test/suite/roles/grant_revoke_current.test
index bffc04087b1..fda55358b20 100644
--- a/mysql-test/suite/roles/grant_revoke_current.test
+++ b/mysql-test/suite/roles/grant_revoke_current.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
--error ER_MALFORMED_DEFINER
grant select on *.* to current_role;
@@ -25,7 +26,7 @@ show grants;
grant r1 to current_user() identified by 'barfoo';
show grants;
set password='';
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
+#cleanup
drop role r1;
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/suite/roles/grant_role_auto_create_user.result b/mysql-test/suite/roles/grant_role_auto_create_user.result
index 3f6139e84d0..61ce0359c0d 100644
--- a/mysql-test/suite/roles/grant_role_auto_create_user.result
+++ b/mysql-test/suite/roles/grant_role_auto_create_user.result
@@ -23,7 +23,7 @@ grant auto_create to foo@localhost;
ERROR 28000: Can't find any matching row in the user table
grant auto_create to bar@localhost identified by 'baz';
select user, host from mysql.user where user = 'bar';
-user host
+User Host
bar localhost
set sql_mode = '';
connect con1,localhost,bar,baz,;
diff --git a/mysql-test/suite/roles/i_s_applicable_roles_is_default.result b/mysql-test/suite/roles/i_s_applicable_roles_is_default.result
index 63127f8b176..ee7d17f3a1f 100644
--- a/mysql-test/suite/roles/i_s_applicable_roles_is_default.result
+++ b/mysql-test/suite/roles/i_s_applicable_roles_is_default.result
@@ -78,3 +78,4 @@ drop role role3;
drop role role2;
drop role role1;
drop user foo;
+update mysql.global_priv set priv=json_compact(json_remove(priv, '$.default_role'));
diff --git a/mysql-test/suite/roles/i_s_applicable_roles_is_default.test b/mysql-test/suite/roles/i_s_applicable_roles_is_default.test
index 59ba1f8bf75..0e6436924a9 100644
--- a/mysql-test/suite/roles/i_s_applicable_roles_is_default.test
+++ b/mysql-test/suite/roles/i_s_applicable_roles_is_default.test
@@ -51,7 +51,6 @@ set default role role3;
--sorted_result
select * from information_schema.applicable_roles;
-
set default role none;
--sorted_result
select * from information_schema.applicable_roles;
@@ -60,3 +59,4 @@ drop role role3;
drop role role2;
drop role role1;
drop user foo;
+update mysql.global_priv set priv=json_compact(json_remove(priv, '$.default_role'));
diff --git a/mysql-test/suite/roles/none_public.result b/mysql-test/suite/roles/none_public.result
index 5dd1480e8c3..c253ae1478b 100644
--- a/mysql-test/suite/roles/none_public.result
+++ b/mysql-test/suite/roles/none_public.result
@@ -40,17 +40,9 @@ ERROR OP000: Invalid role specification `none`
create definer=public view test.v1 as select 1;
ERROR OP000: Invalid role specification `public`
drop role role1;
-optimize table mysql.user;
-Table Op Msg_type Msg_text
-mysql.user optimize status OK
-insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert mysql.global_priv values ('', 'none', '{"is_role":true}'), ('', 'public', '{"is_role":true}');
flush privileges;
Warnings:
Error 1959 Invalid role specification `none`
Error 1959 Invalid role specification `public`
-delete from mysql.user where is_role='Y';
+delete from mysql.global_priv where host='';
diff --git a/mysql-test/suite/roles/none_public.test b/mysql-test/suite/roles/none_public.test
index 838a4955df5..a0ec2315cfc 100644
--- a/mysql-test/suite/roles/none_public.test
+++ b/mysql-test/suite/roles/none_public.test
@@ -50,8 +50,6 @@ create definer=public view test.v1 as select 1;
drop role role1;
-optimize table mysql.user; # to remove deleted rows and have stable row order
-insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
+insert mysql.global_priv values ('', 'none', '{"is_role":true}'), ('', 'public', '{"is_role":true}');
flush privileges;
-delete from mysql.user where is_role='Y';
-
+delete from mysql.global_priv where host='';
diff --git a/mysql-test/suite/roles/prepare_stmt_with_role.result b/mysql-test/suite/roles/prepare_stmt_with_role.result
index ecd662c7d3e..10387936c83 100644
--- a/mysql-test/suite/roles/prepare_stmt_with_role.result
+++ b/mysql-test/suite/roles/prepare_stmt_with_role.result
@@ -13,7 +13,7 @@ EXECUTE stmtCreateRole;
#
SELECT user, host,is_role FROM mysql.user
WHERE user = 'developers';
-user host is_role
+User Host is_role
developers Y
SHOW GRANTS;
Grants for root@localhost
@@ -73,7 +73,7 @@ EXECUTE stmtDropRole;
#
SELECT user, host,is_role FROM mysql.user
WHERE user = 'developers';
-user host is_role
+User Host is_role
SELECT * FROM mysql.roles_mapping;
Host User Role Admin_option
SHOW GRANTS;
@@ -89,7 +89,7 @@ GRANT USAGE ON *.* TO `test_user`@`%`
EXECUTE stmtCreateRole;
SELECT user, host,is_role FROM mysql.user
WHERE user = 'developers';
-user host is_role
+User Host is_role
developers Y
SELECT * FROM mysql.roles_mapping;
Host User Role Admin_option
diff --git a/mysql-test/suite/roles/rename_user.result b/mysql-test/suite/roles/rename_user.result
index 8548a1cdb26..367f6e4b0fe 100644
--- a/mysql-test/suite/roles/rename_user.result
+++ b/mysql-test/suite/roles/rename_user.result
@@ -12,7 +12,7 @@ localhost root test_role2 Y
localhost test_user test_role1 N
rename user 'test_user'@'localhost' to 'test_user_rm'@'newhost';
select user, host from user where user like 'test%';
-user host
+User Host
test_role1
test_role2
test_user_rm newhost
diff --git a/mysql-test/suite/roles/role_case_sensitive-10744.result b/mysql-test/suite/roles/role_case_sensitive-10744.result
index 05ac5c95e31..2f27db1525a 100644
--- a/mysql-test/suite/roles/role_case_sensitive-10744.result
+++ b/mysql-test/suite/roles/role_case_sensitive-10744.result
@@ -11,7 +11,7 @@ create role test_role;
# Test if mysql.user has the roles created.
#
select user, host from mysql.user where is_role='y' and user like 'test%';
-user host
+User Host
test_ROLE
test_role
create database secret_db;
diff --git a/mysql-test/suite/roles/set_default_role_clear.result b/mysql-test/suite/roles/set_default_role_clear.result
index fbfb9369cae..d8508f5d0d6 100644
--- a/mysql-test/suite/roles/set_default_role_clear.result
+++ b/mysql-test/suite/roles/set_default_role_clear.result
@@ -10,7 +10,7 @@ set default role test_role;
select user, host, default_role from mysql.user;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
show grants;
Grants for test_user@localhost
@@ -19,16 +19,16 @@ GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
SET DEFAULT ROLE `test_role` FOR `test_user`@`localhost`
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
set default role NONE;
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost
set default role invalid_role;
ERROR OP000: Invalid role specification `invalid_role`
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost
select user, host, default_role from mysql.user;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
diff --git a/mysql-test/suite/roles/set_default_role_for.result b/mysql-test/suite/roles/set_default_role_for.result
index 4c8163b7459..3ddf48eb416 100644
--- a/mysql-test/suite/roles/set_default_role_for.result
+++ b/mysql-test/suite/roles/set_default_role_for.result
@@ -23,17 +23,17 @@ GRANT USAGE ON *.* TO `user_a`@`localhost`
GRANT SELECT ON *.* TO `role_a`
SET DEFAULT ROLE `role_a` FOR `user_a`@`localhost`
select user, host, default_role from mysql.user where user like 'user_%';
-user host default_role
+User Host default_role
user_a localhost role_a
user_b localhost role_b
set default role NONE for current_user;
select user, host, default_role from mysql.user where user like 'user_%';
-user host default_role
+User Host default_role
user_a localhost
user_b localhost role_b
set default role current_role for current_user;
select user, host, default_role from mysql.user where user like 'user_%';
-user host default_role
+User Host default_role
user_a localhost role_a
user_b localhost role_b
set default role role_b for current_user;
@@ -46,12 +46,6 @@ GRANT INSERT, UPDATE ON *.* TO `role_b`
SET DEFAULT ROLE `role_b` FOR `user_b`@`localhost`
select user, host, default_role from mysql.user where user like 'user_%';
ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table 'user'
-insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
set default role NONE for user_a@localhost;
show grants;
Grants for user_a@localhost
@@ -62,6 +56,5 @@ select user, host, default_role from mysql.user where user like 'user_%';
ERROR 42000: SELECT command denied to user 'user_a'@'localhost' for table 'user'
drop role role_a;
drop role role_b;
-delete from mysql.user where user = 'someuser' && host = 'somehost';
drop user user_a@localhost;
drop user user_b@localhost;
diff --git a/mysql-test/suite/roles/set_default_role_for.test b/mysql-test/suite/roles/set_default_role_for.test
index 985eaa16e3d..eff999a522b 100644
--- a/mysql-test/suite/roles/set_default_role_for.test
+++ b/mysql-test/suite/roles/set_default_role_for.test
@@ -65,8 +65,6 @@ show grants;
--error ER_TABLEACCESS_DENIED_ERROR
select user, host, default_role from mysql.user where user like 'user_%';
-# Make sure the default role setting worked from root.
-insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
# Since we have update privileges on the mysql.user table, we should
# be able to set a default role for a different user.
set default role NONE for user_a@localhost;
@@ -82,6 +80,5 @@ change_user 'root';
drop role role_a;
drop role role_b;
-delete from mysql.user where user = 'someuser' && host = 'somehost';
drop user user_a@localhost;
drop user user_b@localhost;
diff --git a/mysql-test/suite/roles/set_default_role_invalid.result b/mysql-test/suite/roles/set_default_role_invalid.result
index ffe8689e715..eb3924dc617 100644
--- a/mysql-test/suite/roles/set_default_role_invalid.result
+++ b/mysql-test/suite/roles/set_default_role_invalid.result
@@ -17,7 +17,7 @@ set default role test_role;
select user, host, default_role from mysql.user;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
show grants;
Grants for test_user@localhost
@@ -26,12 +26,12 @@ GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
SET DEFAULT ROLE `test_role` FOR `test_user`@`localhost`
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
set default role invalid_role;
ERROR OP000: Invalid role specification `invalid_role`
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
revoke test_role from test_user@localhost;
select user, host, default_role from mysql.user where user='test_user';
@@ -123,7 +123,7 @@ ERROR OP000: Invalid role specification `invalid_role`
SET DEFAULT ROLE invalid_role FOR a;
ERROR OP000: Invalid role specification `invalid_role`
SELECT user, host, default_role FROM mysql.user where user='a' or user='b';
-user host default_role
+User Host default_role
a % r1
b % r2
DROP ROLE r1, r2;
diff --git a/mysql-test/suite/roles/set_default_role_new_connection.result b/mysql-test/suite/roles/set_default_role_new_connection.result
index 997ea46624c..5c51b782ab7 100644
--- a/mysql-test/suite/roles/set_default_role_new_connection.result
+++ b/mysql-test/suite/roles/set_default_role_new_connection.result
@@ -15,7 +15,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'us
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
connect c1, localhost, test_user,,;
show grants;
@@ -25,13 +25,13 @@ GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
SET DEFAULT ROLE `test_role` FOR `test_user`@`localhost`
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
set default role NONE;
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost
connect c1, localhost, test_user,,;
show grants;
@@ -43,7 +43,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'us
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost
set default role test_role for test_user@localhost;
connect c1, localhost, test_user,,;
@@ -54,7 +54,7 @@ GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
SET DEFAULT ROLE `test_role` FOR `test_user`@`localhost`
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
disconnect c1;
connection default;
diff --git a/mysql-test/suite/roles/set_default_role_ps-6960.result b/mysql-test/suite/roles/set_default_role_ps-6960.result
index c186e7bccb0..505861e89df 100644
--- a/mysql-test/suite/roles/set_default_role_ps-6960.result
+++ b/mysql-test/suite/roles/set_default_role_ps-6960.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
create role r1;
prepare stmt from "set password = '11111111111111111111111111111111111111111'";
execute stmt;
@@ -6,4 +7,4 @@ execute stmt;
set password = '';
set default role NONE;
drop role r1;
-update mysql.user set plugin='';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/suite/roles/set_default_role_ps-6960.test b/mysql-test/suite/roles/set_default_role_ps-6960.test
index 8af95c9e8a0..fd965c2aa75 100644
--- a/mysql-test/suite/roles/set_default_role_ps-6960.test
+++ b/mysql-test/suite/roles/set_default_role_ps-6960.test
@@ -4,6 +4,8 @@
--source include/not_embedded.inc
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
+
create role r1;
prepare stmt from "set password = '11111111111111111111111111111111111111111'";
execute stmt;
@@ -13,5 +15,6 @@ execute stmt;
set password = '';
set default role NONE;
drop role r1;
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
+
+#cleanup
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/suite/roles/set_role-database-recursive.result b/mysql-test/suite/roles/set_role-database-recursive.result
index c919a800220..bc3914413a3 100644
--- a/mysql-test/suite/roles/set_role-database-recursive.result
+++ b/mysql-test/suite/roles/set_role-database-recursive.result
@@ -5,7 +5,8 @@ grant test_role1 to test_user@localhost;
grant test_role2 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/set_role-database-simple.result b/mysql-test/suite/roles/set_role-database-simple.result
index e21a55edf2e..a48f04985bb 100644
--- a/mysql-test/suite/roles/set_role-database-simple.result
+++ b/mysql-test/suite/roles/set_role-database-simple.result
@@ -2,7 +2,8 @@ create user 'test_user'@'localhost';
create role test_role1;
grant test_role1 to test_user@localhost;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_user localhost
select * from mysql.roles_mapping;
diff --git a/mysql-test/suite/roles/set_role-recursive.result b/mysql-test/suite/roles/set_role-recursive.result
index d1378f327a8..102ee392581 100644
--- a/mysql-test/suite/roles/set_role-recursive.result
+++ b/mysql-test/suite/roles/set_role-recursive.result
@@ -4,7 +4,8 @@ grant test_role1 to test_user@localhost;
create role test_role2;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/set_role-routine-simple.result b/mysql-test/suite/roles/set_role-routine-simple.result
index 2df370b273d..eaa630f4b6a 100644
--- a/mysql-test/suite/roles/set_role-routine-simple.result
+++ b/mysql-test/suite/roles/set_role-routine-simple.result
@@ -6,7 +6,8 @@ grant test_role1 to test_user@localhost;
grant test_role3 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_role2
test_role3
diff --git a/mysql-test/suite/roles/set_role-simple.result b/mysql-test/suite/roles/set_role-simple.result
index af237113bb3..59e61d4836a 100644
--- a/mysql-test/suite/roles/set_role-simple.result
+++ b/mysql-test/suite/roles/set_role-simple.result
@@ -2,7 +2,8 @@ create user test_user@localhost;
create role test_role1;
grant test_role1 to test_user@localhost;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_user localhost
select * from mysql.roles_mapping;
diff --git a/mysql-test/suite/roles/set_role-table-column-priv.result b/mysql-test/suite/roles/set_role-table-column-priv.result
index 738b3313bb2..4aaa0388170 100644
--- a/mysql-test/suite/roles/set_role-table-column-priv.result
+++ b/mysql-test/suite/roles/set_role-table-column-priv.result
@@ -4,7 +4,8 @@ create role test_role2;
grant test_role1 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_role2
test_user localhost
@@ -62,6 +63,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'ro
drop user 'test_user'@'localhost';
select * from mysql.tables_priv;
Host Db User Table_name Grantor Timestamp Table_priv Column_priv
+localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Delete
mysql test_role2 roles_mapping root@localhost 0000-00-00 00:00:00 Select
revoke select on mysql.roles_mapping from test_role2;
delete from mysql.user where user like'test_%';
diff --git a/mysql-test/suite/roles/set_role-table-simple.result b/mysql-test/suite/roles/set_role-table-simple.result
index dcd0914db8d..f33df34d85e 100644
--- a/mysql-test/suite/roles/set_role-table-simple.result
+++ b/mysql-test/suite/roles/set_role-table-simple.result
@@ -4,7 +4,8 @@ create role test_role2;
grant test_role1 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_role2
test_user localhost
@@ -60,6 +61,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'ro
drop user 'test_user'@'localhost';
select * from mysql.tables_priv;
Host Db User Table_name Grantor Timestamp Table_priv Column_priv
+localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Delete
mysql test_role2 roles_mapping root@localhost 0000-00-00 00:00:00 Select
revoke select on mysql.roles_mapping from test_role2;
delete from mysql.user where user like'test_%';
diff --git a/mysql-test/suite/roles/show_grants.result b/mysql-test/suite/roles/show_grants.result
index 048397bb290..7ae499a9cfc 100644
--- a/mysql-test/suite/roles/show_grants.result
+++ b/mysql-test/suite/roles/show_grants.result
@@ -5,7 +5,8 @@ grant test_role1 to test_user@localhost;
grant test_role2 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
+mariadb.sys localhost
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/show_grants_replicated.result b/mysql-test/suite/roles/show_grants_replicated.result
index f635aa0827e..9438939b024 100644
--- a/mysql-test/suite/roles/show_grants_replicated.result
+++ b/mysql-test/suite/roles/show_grants_replicated.result
@@ -17,7 +17,7 @@ connection slave;
# it's visible in mysql.user and I_S:
#
select user, host, is_role from mysql.user where user in ('u1', 'r1');
-user host is_role
+User Host is_role
r1 Y
u1 % N
select * from information_schema.applicable_roles;
diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def
index 5f5dc459ffa..57907210693 100644
--- a/mysql-test/suite/rpl/disabled.def
+++ b/mysql-test/suite/rpl/disabled.def
@@ -13,3 +13,5 @@
rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table
rpl_row_binlog_max_cache_size : MDEV-11092
rpl_row_index_choice : MDEV-11666
+rpl_auto_increment_update_failure : disabled for now
+rpl_current_user : waits for MDEV-22374 fix
diff --git a/mysql-test/suite/rpl/include/rpl_EE_err.test b/mysql-test/suite/rpl/include/rpl_EE_err.test
index 0b3fec1f605..fa135d12436 100644
--- a/mysql-test/suite/rpl/include/rpl_EE_err.test
+++ b/mysql-test/suite/rpl/include/rpl_EE_err.test
@@ -15,7 +15,7 @@
-- source include/master-slave.inc
eval create table t1 (a int) engine=$engine_type;
-flush tables;
+flush tables t1;
let $MYSQLD_DATADIR= `select @@datadir`;
remove_file $MYSQLD_DATADIR/test/t1.MYI ;
drop table if exists t1;
diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
index 114cd53d244..bb1a2c173de 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
@@ -289,7 +289,6 @@ DROP TRIGGER tr1;
--echo
--echo
--echo ******************** EVENTS ********************
-GRANT EVENT ON *.* TO 'root'@'localhost';
INSERT INTO t1 VALUES(1, 'test1');
CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1;
--source suite/rpl/include/rpl_mixed_check_event.inc
diff --git a/mysql-test/suite/rpl/include/rpl_row_001.test b/mysql-test/suite/rpl/include/rpl_row_001.test
deleted file mode 100644
index 4df2d793244..00000000000
--- a/mysql-test/suite/rpl/include/rpl_row_001.test
+++ /dev/null
@@ -1,96 +0,0 @@
-let $LOAD_FILE= $MYSQLTEST_VARDIR/std_data/words.dat;
-CREATE TABLE t1 (word CHAR(20) NOT NULL);
---replace_result $LOAD_FILE LOAD_FILE
-eval LOAD DATA INFILE '$LOAD_FILE' INTO TABLE t1;
---replace_result $LOAD_FILE LOAD_FILE
-eval LOAD DATA INFILE '$LOAD_FILE' INTO TABLE t1;
-SELECT * FROM t1 ORDER BY word LIMIT 10;
-
-#
-# Save password row for root
-#
-
-create temporary table tmp select * from mysql.user where host="localhost" and user="root";
-
-#
-# Test slave with wrong password
-#
-
-save_master_pos;
-connection slave;
-sync_with_master;
-STOP SLAVE;
-connection master;
-UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
-connection slave;
-START SLAVE;
-connection master;
-#
-# Give slave time to do at last one failed connect retry
-# This one must be short so that the slave will not stop retrying
-real_sleep 2;
-UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
-# Give slave time to connect (will retry every second)
-
-sleep 2;
-
-CREATE TABLE t3(n INT);
-INSERT INTO t3 VALUES(1),(2);
-sync_slave_with_master;
-SELECT * FROM t3 ORDER BY n;
-SELECT SUM(LENGTH(word)) FROM t1;
-connection master;
-DROP TABLE t1,t3;
-save_master_pos;
-connection slave;
-sync_with_master;
-
-# Test if the slave SQL thread can be more than 16K behind the slave
-# I/O thread (> IO_SIZE)
-
-connection master;
-# we'll use table-level locking to delay slave SQL thread
-eval CREATE TABLE t1 (n INT) ENGINE=$engine_type;
-sync_slave_with_master;
-connection master;
-RESET MASTER;
-connection slave;
-STOP SLAVE;
-RESET SLAVE;
-
-connection master;
-let $1=5000;
-# Generate 16K of relay log
-disable_query_log;
-while ($1)
-{
- eval INSERT INTO t1 VALUES($1);
- dec $1;
-}
-enable_query_log;
-SELECT COUNT(*) FROM t1;
-save_master_pos;
-
-# Try to cause a large relay log lag on the slave by locking t1
-connection slave;
-LOCK TABLES t1 READ;
-START SLAVE;
-UNLOCK TABLES;
-sync_with_master;
-SELECT COUNT(*) FROM t1;
-
-connection master;
-DROP TABLE t1;
-CREATE TABLE t1 (n INT);
-INSERT INTO t1 VALUES(3456);
-sync_slave_with_master;
-SELECT n FROM t1;
-
-connection master;
-DROP TABLE t1;
-
-# resttore old passwords
-replace into mysql.user select * from tmp;
-drop temporary table tmp;
-
-sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/include/rpl_row_annotate.test b/mysql-test/suite/rpl/include/rpl_row_annotate.test
index 317a9c86539..8b4b704cef9 100644
--- a/mysql-test/suite/rpl/include/rpl_row_annotate.test
+++ b/mysql-test/suite/rpl/include/rpl_row_annotate.test
@@ -147,7 +147,7 @@ let $start_pos= `select @binlog_start_pos`;
connection master;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
-FLUSH TABLES;
+FLUSH TABLES test1.t4;
SELECT * FROM test1.t4 ORDER BY a;
sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test b/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test
index bad308ff814..03c7b5282a8 100644
--- a/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test
+++ b/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test
@@ -10,7 +10,7 @@ eval create table t1(a int not null primary key) engine=$engine_type;
insert delayed into t1 values (1);
insert delayed into t1 values (2);
insert delayed into t1 values (3);
-flush tables;
+flush tables t1;
SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc b/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc
new file mode 100644
index 00000000000..4726bbe1889
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_shutdown_wait_slaves.inc
@@ -0,0 +1,91 @@
+--connection server_1
+
+CREATE TABLE t1 (a INT) ENGINE=innodb;
+
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+
+--connection server_3
+--sync_with_master
+
+--connection server_4
+--source include/stop_slave.inc
+
+--connection server_1
+--disable_query_log
+--let $count=1000
+while ($count)
+{
+ INSERT INTO t1 SET a=1;
+ --dec $count
+}
+--enable_query_log
+--save_master_pos
+
+# Shutdown master and restart server_4 who will be waiting for the master
+# to start replication at its shutdown beginning phase.
+# The being forked out server_4 dump thread must relate to a record
+# in slave_list, and it won't start sending out binlog events
+# until has received a signal from the shutdown thread.
+# This also proves delivery to a started-in-middle-of-shutdown slave.
+--connection server_1
+SET @@GLOBAL.debug_dbug="+d,simulate_delay_at_shutdown";
+
+--connection server_4
+--source include/start_slave.inc
+
+--connection server_1
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+wait
+EOF
+# --shutdown_server
+--send SHUTDOWN WAIT FOR ALL SLAVES
+--reap
+--source include/wait_until_disconnected.inc
+#
+# MDEV-18450 liveness condition:
+# Despite shutdown even "late" slave #4 is in sync
+#
+--connection server_4
+--sync_with_master
+
+--connection server_3
+--sync_with_master
+
+--connection server_2
+--sync_with_master
+
+--connection server_1
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+restart
+EOF
+
+--connection default
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--connection server_1
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+#
+# Cleanup
+#
+--connection server_1
+DROP TABLE t1;
+
+--connection server_2
+--disable_warnings
+--source include/start_slave.inc
+--enable_warnings
+
+--connection server_3
+--disable_warnings
+--source include/start_slave.inc
+--enable_warnings
+
+--connection server_4
+--disable_warnings
+--source include/start_slave.inc
+--enable_warnings
diff --git a/mysql-test/suite/rpl/r/parallel_backup.result b/mysql-test/suite/rpl/r/parallel_backup.result
new file mode 100644
index 00000000000..d87c61f2d0f
--- /dev/null
+++ b/mysql-test/suite/rpl/r/parallel_backup.result
@@ -0,0 +1,40 @@
+include/master-slave.inc
+[connection master]
+#
+# MDEV-21953: deadlock between BACKUP STAGE BLOCK_COMMIT and parallel
+# replication
+#
+connection master;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = innodb;
+connection slave;
+include/stop_slave.inc
+SET @old_parallel_threads= @@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
+SET @@global.slave_parallel_threads= 2;
+SET @@global.slave_parallel_mode = 'optimistic';
+connection master;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+connect aux_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
+BEGIN;
+INSERT INTO t1 VALUES (1);
+connection slave;
+include/start_slave.inc
+connection aux_slave;
+connect backup_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_COMMIT;
+connection aux_slave;
+ROLLBACK;
+connection backup_slave;
+BACKUP STAGE END;
+connection slave;
+include/diff_tables.inc [master:t1,slave:t1]
+connection slave;
+include/stop_slave.inc
+SET @@global.slave_parallel_threads= @old_parallel_threads;
+SET @@global.slave_parallel_mode = @old_parallel_mode;
+include/start_slave.inc
+connection server_1;
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/password_expiration.result b/mysql-test/suite/rpl/r/password_expiration.result
new file mode 100644
index 00000000000..13fc11a3b96
--- /dev/null
+++ b/mysql-test/suite/rpl/r/password_expiration.result
@@ -0,0 +1,28 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+include/stop_slave.inc
+connection master;
+create user 'repl_user' password expire;
+grant replication slave on *.* to repl_user;
+flush privileges;
+set global disconnect_on_expired_password=ON;
+connection slave;
+CHANGE MASTER TO MASTER_USER= 'repl_user';
+START SLAVE;
+include/wait_for_slave_io_error.inc [errno=1862]
+include/stop_slave_sql.inc
+RESET SLAVE;
+connection master;
+set global disconnect_on_expired_password=OFF;
+connection slave;
+START SLAVE;
+include/wait_for_slave_io_error.inc [errno=1820]
+connection master;
+DROP USER 'repl_user';
+set global disconnect_on_expired_password=default;
+connection slave;
+include/stop_slave_sql.inc
+CHANGE MASTER TO MASTER_USER='root';
+RESET SLAVE;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result
index 1f605935005..0b0ee84229f 100644
--- a/mysql-test/suite/rpl/r/rpl_EE_err.result
+++ b/mysql-test/suite/rpl/r/rpl_EE_err.result
@@ -1,7 +1,7 @@
include/master-slave.inc
[connection master]
create table t1 (a int) engine=myisam;
-flush tables;
+flush tables t1;
drop table if exists t1;
Warnings:
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_user.result b/mysql-test/suite/rpl/r/rpl_create_drop_user.result
index f8cc271e8cf..61b351b50df 100644
--- a/mysql-test/suite/rpl/r/rpl_create_drop_user.result
+++ b/mysql-test/suite/rpl/r/rpl_create_drop_user.result
@@ -17,15 +17,15 @@ CURRENT_USER
u2@localhost
disconnect user_a;
connection master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
-user password
-u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
-u2
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
+User Password plugin authentication_string
+u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
+u2 mysql_native_password
connection slave;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
-user password
-u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
-u2
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
+User Password plugin authentication_string
+u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
+u2 mysql_native_password
connection master;
CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'abcdefghijk2';
connect user_a, localhost, u1,'abcdefghijk2',;
@@ -35,25 +35,25 @@ CURRENT_USER
u1@localhost
disconnect user_a;
connection master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
-user password
-u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
-u2
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
+User Password plugin authentication_string
+u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
+u2 mysql_native_password
connection slave;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
-user password
-u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
-u2
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
+User Password plugin authentication_string
+u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
+u2 mysql_native_password
connection master;
CREATE USER u1@localhost;
ERROR HY000: Operation CREATE USER failed for 'u1'@'localhost'
DROP USER u3@localhost;
ERROR HY000: Operation DROP USER failed for 'u3'@'localhost'
connection slave;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
-user password
-u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
-u2
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
+User Password plugin authentication_string
+u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
+u2 mysql_native_password
connection master;
DROP USER IF EXISTS u1@localhost;
DROP USER u2@localhost;
@@ -61,6 +61,6 @@ DROP USER IF EXISTS u3@localhost;
Warnings:
Note 1974 Can't drop user 'u3'@'localhost'; it doesn't exist
connection slave;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
-user password
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
+User Password plugin authentication_string
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
index d74fd07189c..b31eacfc236 100644
--- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
+++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
@@ -25,8 +25,6 @@ connection slave;
connection slave;
SHOW TABLES in mysqltest;
Tables_in_mysqltest
-t
-t1
SHOW EVENTS in mysqltest;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest e root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/suite/rpl/r/rpl_ddl.result b/mysql-test/suite/rpl/r/rpl_ddl.result
index 68c5e91f42e..22ce9a288c1 100644
--- a/mysql-test/suite/rpl/r/rpl_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_ddl.result
@@ -1354,11 +1354,11 @@ MAX(f1)
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
connection master;
SELECT user FROM mysql.user WHERE user = 'user1';
-user
+User
user1
connection slave;
SELECT user FROM mysql.user WHERE user = 'user1';
-user
+User
user1
connection master;
@@ -1399,11 +1399,11 @@ MAX(f1)
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
connection master;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
rename1
connection slave;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
rename1
connection master;
@@ -1444,10 +1444,10 @@ MAX(f1)
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
connection master;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
connection slave;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
use test;
connection master;
DROP TEMPORARY TABLE mysqltest1.t22;
diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result
index 0797e66e9ec..e4b08800287 100644
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result
@@ -1,14 +1,6 @@
include/master-slave.inc
[connection master]
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
-connection slave;
-delete from mysql.user where user=_binary'rpl_ignore_grant';
-delete from mysql.db where user=_binary'rpl_ignore_grant';
-flush privileges;
-connection master;
create user rpl_do_grant@localhost;
grant select on *.* to rpl_do_grant@localhost;
grant drop on test.* to rpl_do_grant@localhost;
@@ -20,11 +12,11 @@ GRANT DROP ON `test`.* TO `rpl_do_grant`@`localhost`
connection master;
set password for rpl_do_grant@localhost=password("does it work?");
connection slave;
-select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
-authentication_string<>_binary''
+select authentication_string<>'' from mysql.user where user='rpl_do_grant';
+authentication_string<>''
1
connection master;
-update mysql.user set authentication_string='' where user='rpl_do_grant';
+update mysql.global_priv set priv=json_remove(priv, '$.authentication_string') where user='rpl_do_grant';
flush privileges;
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
authentication_string<>''
@@ -37,13 +29,8 @@ select authentication_string<>'' from mysql.user where user='rpl_do_grant';
authentication_string<>''
1
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
+drop user rpl_do_grant@localhost;
connection slave;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
connection master;
show grants for rpl_do_grant@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
@@ -328,4 +315,6 @@ Grantor
root@localhost
connection master;
DROP USER user_bug27606@localhost;
+select priv into @root_priv from mysql.global_priv where user='root' and host='127.0.0.1';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result
index 1b132c20afc..3712527afe4 100644
--- a/mysql-test/suite/rpl/r/rpl_drop_db.result
+++ b/mysql-test/suite/rpl/r/rpl_drop_db.result
@@ -6,6 +6,8 @@ create database mysqltest1;
create table mysqltest1.t1 (n int);
insert into mysqltest1.t1 values (1);
select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create table mysqltest1.t2 (n int);
create table mysqltest1.t3 (n int);
drop database mysqltest1;
diff --git a/mysql-test/suite/rpl/r/rpl_drop_temp_table_invalid_lex.result b/mysql-test/suite/rpl/r/rpl_drop_temp_table_invalid_lex.result
new file mode 100644
index 00000000000..f3c4cb4def2
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_drop_temp_table_invalid_lex.result
@@ -0,0 +1,11 @@
+include/master-slave.inc
+[connection master]
+connect con1,localhost,root,,;
+CREATE TEMPORARY TABLE tmp (a INT);
+CREATE TABLE non_existing_db.t SELECT 1 AS b;
+disconnect con1;
+connection master;
+connection slave;
+connection slave;
+include/assert.inc ["Slave_open_temp_tables count should be 0"]
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result
index 0f546f7edc4..274a8505fb8 100644
--- a/mysql-test/suite/rpl/r/rpl_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_grant.result
@@ -4,7 +4,7 @@ connection master;
CREATE USER dummy@localhost;
CREATE USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
dummy localhost
dummy1 localhost
dummy2 localhost
@@ -14,7 +14,7 @@ COUNT(*)
connection slave;
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
dummy localhost
dummy1 localhost
dummy2 localhost
@@ -28,13 +28,13 @@ DROP USER nonexisting@localhost, dummy@localhost;
ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
DROP USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
0
connection slave;
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
0
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result
index ac608c3c2a3..de4a815ab60 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result
@@ -79,7 +79,7 @@ a
9
connection server_1;
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode;
SET debug_sync = "reset";
connection server_2;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result
index aaeb0c8f119..5dffdd9809c 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result
@@ -3,7 +3,7 @@ include/master-slave.inc
connection slave;
include/stop_slave.inc
SET sql_log_bin=0;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET sql_log_bin=1;
include/start_slave.inc
connection master;
@@ -16,36 +16,32 @@ INSERT INTO t1 VALUES (1);
connection slave;
connection slave;
include/stop_slave.inc
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,gtid_slave_pos_simulate_failed_delete";
SET sql_log_bin= 0;
-CALL mtr.add_suppression("Can't find file");
+CALL mtr.add_suppression("<DEBUG> Error deleting old GTID row");
SET sql_log_bin= 1;
include/start_slave.inc
connection master;
-INSERT INTO t1 VALUES (2);
-connection slave;
-include/wait_for_slave_sql_error.inc [errno=1942]
-STOP SLAVE IO_THREAD;
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
-ORDER BY domain_id, sub_id DESC LIMIT 1;
-domain_id server_id seq_no
-0 1 3
+connection slave;
+SELECT COUNT(*), MAX(seq_no) INTO @pre_count, @pre_max_seq_no
+FROM mysql.gtid_slave_pos;
+SELECT IF(@pre_count >= 20, "OK", CONCAT("Error: too few rows seen while errors injected: ", @pre_count));
+IF(@pre_count >= 20, "OK", CONCAT("Error: too few rows seen while errors injected: ", @pre_count))
+OK
SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
connection master;
-INSERT INTO t1 VALUES (3);
-connection slave;
-connection slave;
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
-ORDER BY domain_id, sub_id DESC LIMIT 1;
-domain_id server_id seq_no
-0 1 4
-SELECT * FROM t1 ORDER BY i;
-i
-1
-2
-3
+connection slave;
+connection slave;
+SELECT IF(COUNT(*) >= 1, "OK", CONCAT("Error: too few rows seen after errors no longer injected: ", COUNT(*)))
+FROM mysql.gtid_slave_pos
+WHERE seq_no <= @pre_max_seq_no;
+IF(COUNT(*) >= 1, "OK", CONCAT("Error: too few rows seen after errors no longer injected: ", COUNT(*)))
+OK
connection master;
DROP TABLE t1;
+connection slave;
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
index ff845794c22..50f24d56e9a 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
@@ -159,7 +159,7 @@ a
8
9
SET sql_log_bin= 0;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET sql_log_bin= 1;
include/start_slave.inc
connection server_1;
@@ -171,7 +171,7 @@ include/start_slave.inc
*** MDEV-4692: mysql.gtid_slave_pos accumulates values for a domain ***
SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id COUNT(*)
-0 2
+0 3
1 2
connection server_1;
INSERT INTO t1 VALUES (11);
@@ -179,7 +179,7 @@ connection server_2;
FLUSH NO_WRITE_TO_BINLOG TABLES;
SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id COUNT(*)
-0 2
+0 4
1 2
include/start_slave.inc
connection server_1;
@@ -189,8 +189,8 @@ connection server_2;
FLUSH NO_WRITE_TO_BINLOG TABLES;
SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id COUNT(*)
-0 2
-1 2
+0 3
+1 1
*** MDEV-4650: show variables; ERROR 1946 (HY000): Failed to load replication slave GTID position ***
connection server_2;
SET sql_log_bin=0;
diff --git a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result
index c86f2f4e4df..cc65d9dacfd 100644
--- a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result
+++ b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result
@@ -4,26 +4,26 @@ connection master;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
-select_priv
+Select_priv
N
connection slave;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;
-select_priv
+Select_priv
N
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* slave:must be Y */;
-select_priv
+Select_priv
Y
connection master;
revoke select on *.* from 'user_foo';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
-select_priv
+Select_priv
N
connection slave;
select select_priv from mysql.user where user='user_foo' /* slave:must get Y */;
-select_priv
+Select_priv
Y
connection slave;
revoke select on *.* FROM 'user_foo';
diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result
index 1e0d6f537ab..3e6cdac820e 100644
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result
@@ -1,7 +1,7 @@
include/master-slave.inc
[connection master]
call mtr.add_suppression("Can't find record in 't.'");
-call mtr.add_suppression("Can't find record in 'user'");
+call mtr.add_suppression("Can't find record in 'global_priv'");
call mtr.add_suppression("Can't find record in 'tables_priv'");
**** Test case for BUG#16487 ****
connection master;
@@ -32,39 +32,34 @@ to mysqltest3@localhost;
create database mysqltest2;
create table mysqltest2.t2 (id int);
GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass';
-insert into mysql.user (user, host) values ("mysqltest5", "somehost");
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert into mysql.global_priv (user, host) values ("mysqltest5", "somehost");
GRANT SELECT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON test.* TO mysqltest6@localhost;
GRANT INSERT ON test.t1 TO mysqltest6@localhost;
show grants for mysqltest1@localhost;
Grants for mysqltest1@localhost
-GRANT USAGE ON *.* TO `mysqltest1`@`localhost`
GRANT SELECT ON `test`.`t1` TO `mysqltest1`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest1`@`localhost`
show grants for mysqltest2@localhost;
Grants for mysqltest2@localhost
-GRANT USAGE ON *.* TO `mysqltest2`@`localhost`
-GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localhost`
GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost`
+GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest2`@`localhost`
show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
-GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
-GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost`
+GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
-GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
show grants for mysqltest6@localhost;
Grants for mysqltest6@localhost
-GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost`
GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost`
GRANT INSERT ON `test`.`t1` TO `mysqltest6`@`localhost`
+GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost`
flush privileges;
show grants for mysqltest5@somehost;
Grants for mysqltest5@somehost
@@ -74,24 +69,24 @@ connection slave;
**** Checking grants on slave ****
show grants for mysqltest2@localhost;
Grants for mysqltest2@localhost
-GRANT USAGE ON *.* TO `mysqltest2`@`localhost`
GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest2`@`localhost`
show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
-GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
-GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost`
+GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
-GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
show grants for mysqltest5@somehost;
Grants for mysqltest5@somehost
GRANT USAGE ON *.* TO `mysqltest5`@`somehost`
show grants for mysqltest6@localhost;
Grants for mysqltest6@localhost
-GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost`
GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost`
+GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost`
show grants for mysqltest1@localhost;
ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost'
**** Revoking grants on master ****
@@ -105,9 +100,9 @@ Grants for mysqltest1@localhost
GRANT USAGE ON *.* TO `mysqltest1`@`localhost`
show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
-GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
-GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost`
+GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
+GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
index a666ae26c51..69215ecb545 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
@@ -51,6 +51,10 @@ DELETE FROM test.regular_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE PROCEDURE test.proc_bykey()
BEGIN
DECLARE ins_count INT DEFAULT 1000;
@@ -72,6 +76,10 @@ DELETE FROM test.bykey_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE PROCEDURE test.proc_byrange()
BEGIN
DECLARE ins_count INT DEFAULT 1000;
@@ -93,6 +101,10 @@ DELETE FROM test.byrange_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
begin;
CALL test.proc_norm();
commit;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
index d4640a36a7d..da6888e76a0 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
@@ -26,6 +26,10 @@ DELETE FROM test.regular_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL test.proc_norm();
connection slave;
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
index dce79837700..7dd3907f102 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -481,77 +481,78 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
******************** CREATE USER ********************
CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection master;
******************** GRANT ********************
GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 Y
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 Y
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 Y
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 Y
connection master;
******************** REVOKE ********************
REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection master;
******************** SET PASSWORD ********************
SET PASSWORD FOR 'user_test_rpl'@'localhost' = '*0000000000000000000000000000000000000000';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection master;
******************** RENAME USER ********************
RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection master;
******************** DROP USER ********************
DROP USER 'user_test_rpl_2'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
connection master;
INSERT INTO t1 VALUES(100, 'test');
******************** ANALYZE ********************
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test_rpl.t1 analyze status Engine-independent statistics collected
test_rpl.t1 analyze status OK
******************** CHECK TABLE ********************
@@ -676,7 +677,6 @@ DROP TRIGGER tr1;
******************** EVENTS ********************
-GRANT EVENT ON *.* TO 'root'@'localhost';
INSERT INTO t1 VALUES(1, 'test1');
CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1;
Warnings:
@@ -1100,8 +1100,6 @@ master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP TRIGGER tr1
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost'
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
master-bin.000001 # Xid # # COMMIT /* XID */
diff --git a/mysql-test/suite/rpl/r/rpl_mark_optimize_tbl_ddl.result b/mysql-test/suite/rpl/r/rpl_mark_optimize_tbl_ddl.result
index a39dad85244..9aa31a73e49 100644
--- a/mysql-test/suite/rpl/r/rpl_mark_optimize_tbl_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_mark_optimize_tbl_ddl.result
@@ -33,6 +33,7 @@ Table Op Msg_type Msg_text
test.t1 repair note The storage engine for the table doesn't support repair
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
FLUSH LOGS;
FOUND 1 /GTID 0-1-8 ddl/ in mysqlbinlog.out
@@ -54,6 +55,7 @@ PARTITION pmax VALUES LESS THAN (MAXVALUE));
INSERT INTO t1 VALUES (1), (10), (100), (1000);
ALTER TABLE t1 ANALYZE PARTITION p0;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 OPTIMIZE PARTITION p0;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/rpl/r/rpl_mdev10863.result b/mysql-test/suite/rpl/r/rpl_mdev10863.result
index 6accd1ee830..0326316563c 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev10863.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev10863.result
@@ -46,6 +46,6 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads;
SET GLOBAL max_relay_log_size= @old_max_relay;
include/start_slave.inc
connection server_1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
DROP TABLE t1;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_mdev12179.result b/mysql-test/suite/rpl/r/rpl_mdev12179.result
index 8373eb43774..dcda036cdfb 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev12179.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev12179.result
@@ -49,7 +49,7 @@ a
1
include/stop_slave.inc
SET sql_log_bin=0;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos;
ALTER TABLE mysql.gtid_slave_pos_innodb ENGINE=InnoDB;
INSERT INTO mysql.gtid_slave_pos_innodb SELECT * FROM mysql.gtid_slave_pos;
@@ -77,7 +77,7 @@ SELECT table_name, engine FROM information_schema.tables
WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%'
ORDER BY table_name;
table_name engine
-gtid_slave_pos MyISAM
+gtid_slave_pos Aria
gtid_slave_pos_innodb InnoDB
SELECT @@gtid_pos_auto_engines;
@@gtid_pos_auto_engines
@@ -122,7 +122,7 @@ table_name engine
gtid_slave_pos InnoDB
include/stop_slave.inc
SET sql_log_bin=0;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET sql_log_bin=1;
connection server_1;
INSERT INTO t1 VALUES (5);
@@ -157,7 +157,7 @@ SELECT lower(table_name), engine FROM information_schema.tables
WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%'
ORDER BY table_name;
lower(table_name) engine
-gtid_slave_pos MyISAM
+gtid_slave_pos Aria
gtid_slave_pos_innodb InnoDB
include/stop_slave.inc
SET sql_log_bin=0;
@@ -202,7 +202,7 @@ SELECT table_name, engine FROM information_schema.tables
WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%'
ORDER BY table_name;
table_name engine
-gtid_slave_pos MyISAM
+gtid_slave_pos Aria
SELECT domain_id, max(seq_no) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id max(seq_no)
0 11
@@ -250,7 +250,7 @@ SELECT lower(table_name), engine FROM information_schema.tables
WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%'
ORDER BY table_name;
lower(table_name) engine
-gtid_slave_pos MyISAM
+gtid_slave_pos Aria
gtid_slave_pos_innodb InnoDB
SELECT domain_id, max(seq_no) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id max(seq_no)
@@ -259,6 +259,8 @@ connection server_2;
*** Restart the slave server to prove 'gtid_slave_pos_innodb' autodiscovery ***
connection server_2;
SELECT max(seq_no) FROM mysql.gtid_slave_pos_InnoDB into @seq_no;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
connection server_1;
INSERT INTO t2(a) SELECT 1+MAX(a) FROM t2;
include/save_master_gtid.inc
diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result
index 6c20623d62b..302cf2351c2 100644
--- a/mysql-test/suite/rpl/r/rpl_misc_functions.result
+++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result
@@ -42,6 +42,8 @@ INSERT INTO t1 (col_a) VALUES (test_replication_sf());
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
connection slave;
select * from t1 into outfile "../../tmp/t1_slave.txt";
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
connection master;
create temporary table t1_slave select * from t1 where 1=0;
load data infile '../../tmp/t1_slave.txt' into table t1_slave;
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
index 55d0c020fcd..9fbb7b0ab19 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
@@ -30,6 +30,7 @@ test.tt_2 preload_keys note The storage engine for the table doesn't support pre
INSERT INTO tt_1(ddl_case) VALUES (39);
ANALYZE TABLE nt_1;
Table Op Msg_type Msg_text
+test.nt_1 analyze status Engine-independent statistics collected
test.nt_1 analyze status Table is already up to date
INSERT INTO tt_1(ddl_case) VALUES (38);
CHECK TABLE nt_1;
diff --git a/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result b/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result
new file mode 100644
index 00000000000..bedd103c2a0
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result
@@ -0,0 +1,22 @@
+#
+# MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+#
+include/master-slave.inc
+[connection master]
+connection slave;
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+include/stop_slave.inc
+connection master;
+include/rpl_stop_server.inc [server_number=1]
+include/rpl_start_server.inc [server_number=1]
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+include/start_slave.inc
+connection master;
+connection slave;
+SELECT * FROM t1 ORDER BY id;
+id a
+1 2001-01-01 00:00:01.000
+include/stop_slave.inc
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result b/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result
new file mode 100644
index 00000000000..23b3217895a
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result
@@ -0,0 +1,23 @@
+#
+# MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+#
+include/master-slave.inc
+[connection master]
+connection slave;
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+include/stop_slave.inc
+connection master;
+include/rpl_stop_server.inc [server_number=1]
+include/rpl_start_server.inc [server_number=1]
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+include/start_slave.inc
+connection master;
+connection slave;
+SELECT * FROM t1 ORDER BY id;
+id a
+1 2001-01-01 00:00:01.000
+2 2001-01-01 00:00:00.999
+include/stop_slave.inc
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_mysql_manager_race_condition.result b/mysql-test/suite/rpl/r/rpl_mysql_manager_race_condition.result
new file mode 100644
index 00000000000..1172d8e39a9
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_mysql_manager_race_condition.result
@@ -0,0 +1,27 @@
+include/master-slave.inc
+[connection master]
+connection master;
+# Create a GTID event so the binlog background thread will submit a
+# mysql handler job the next time mysqld is restarted.
+create table t1 (a int);
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+# Set a debug point that forces the main mysqld thread to sleep before
+# anything is initialized for the mysql handle manager
+# Restart the slave mysqld instance so it re-initializes with the
+# binlog background thread submitting a mysql handler job and the
+# mysql handler initialization suspending for a second. Without the fix
+# associated with this test/patch, the following restart will error
+# with a failed assertion.
+include/rpl_restart_server.inc [server_number=2 parameters: --debug_dbug="+d,delay_start_handle_manager"]
+include/start_slave.inc
+#
+# Cleanup
+#
+connection master;
+drop table t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result
index 2601b30279e..9b2e68d366e 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel.result
@@ -1518,6 +1518,7 @@ SET SESSION debug_dbug="+d,binlog_force_commit_id";
SET @commit_id= 10000;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
INSERT INTO t3 VALUES (120, 0);
SET @commit_id= 10001;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
index 74d9cf55cd4..eff939512e2 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
@@ -12,6 +12,8 @@ SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
SET GLOBAL slave_parallel_mode='optimistic';
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 1000000;
connection server_1;
INSERT INTO t1 VALUES(1,1);
BEGIN;
@@ -131,6 +133,11 @@ c
204
205
206
+SELECT IF(COUNT(*) >= 30, "OK", CONCAT("Error: too few old rows found: ", COUNT(*)))
+FROM mysql.gtid_slave_pos;
+IF(COUNT(*) >= 30, "OK", CONCAT("Error: too few old rows found: ", COUNT(*)))
+OK
+SET GLOBAL gtid_cleanup_batch_size=1;
*** Test @@skip_parallel_replication. ***
connection server_2;
include/stop_slave.inc
@@ -358,6 +365,7 @@ connection server_1;
ALTER TABLE t2 COMMENT "123abc";
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
INSERT INTO t1 VALUES (1,2);
INSERT INTO t1 VALUES (2,2);
@@ -478,6 +486,7 @@ SET @old_server_id= @@SESSION.server_id;
SET SESSION server_id= 100;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SET SESSION server_id= @old_server_id;
INSERT INTO t1 VALUES (37,0);
@@ -651,9 +660,10 @@ DROP TABLE t1, t2, t3;
include/save_master_gtid.inc
connection server_2;
include/sync_with_master_gtid.inc
-Check that no more than the expected last four GTIDs are in mysql.gtid_slave_pos
-select count(4) <= 4 from mysql.gtid_slave_pos order by domain_id, sub_id;
-count(4) <= 4
+SELECT COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
+FROM mysql.gtid_slave_pos;
+COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
1
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
connection server_1;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_retry.result b/mysql-test/suite/rpl/r/rpl_parallel_retry.result
index 66428c94086..b43556815d1 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_retry.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_retry.result
@@ -372,7 +372,7 @@ connection server_2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET @@GLOBAL.debug_dbug="+d,rpl_parallel_simulate_wait_at_retry";
include/start_slave.inc
-# Make sure the 2nd seqno_1001 worker has gotten to waiting
+# Make sure both workers are waiting at their sync points
# Signal to the 1st to proceed after it has reached termination state
SET @@DEBUG_SYNC='now SIGNAL proceed_by_1000';
connection spoiler_21;
diff --git a/mysql-test/suite/rpl/r/rpl_read_only2.result b/mysql-test/suite/rpl/r/rpl_read_only2.result
index c457f49e67d..db0f1c1f742 100644
--- a/mysql-test/suite/rpl/r/rpl_read_only2.result
+++ b/mysql-test/suite/rpl/r/rpl_read_only2.result
@@ -20,6 +20,7 @@ a
3
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
drop temporary table tmp1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result
index f7684d5ad97..976ac0996bf 100644
--- a/mysql-test/suite/rpl/r/rpl_row_001.result
+++ b/mysql-test/suite/rpl/r/rpl_row_001.result
@@ -1,44 +1,6 @@
include/master-slave.inc
[connection master]
-CREATE TABLE t1 (word CHAR(20) NOT NULL);
-LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
-LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
-SELECT * FROM t1 ORDER BY word LIMIT 10;
-word
-Aarhus
-Aarhus
-Aarhus
-Aarhus
-Aaron
-Aaron
-Aaron
-Aaron
-Ababa
-Ababa
-create temporary table tmp select * from mysql.user where host="localhost" and user="root";
-connection slave;
-STOP SLAVE;
-connection master;
-UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
-connection slave;
-START SLAVE;
-connection master;
-UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
-CREATE TABLE t3(n INT);
-INSERT INTO t3 VALUES(1),(2);
-connection slave;
-SELECT * FROM t3 ORDER BY n;
-n
-1
-2
-SELECT SUM(LENGTH(word)) FROM t1;
-SUM(LENGTH(word))
-1022
-connection master;
-DROP TABLE t1,t3;
-connection slave;
-connection master;
-CREATE TABLE t1 (n INT) ENGINE=MYISAM;
+CREATE TABLE t1 (n INT);
connection slave;
connection master;
RESET MASTER;
@@ -66,7 +28,5 @@ n
3456
connection master;
DROP TABLE t1;
-replace into mysql.user select * from tmp;
-drop temporary table tmp;
connection slave;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_annotate_do.result b/mysql-test/suite/rpl/r/rpl_row_annotate_do.result
index 52f7b180fae..ba1922566bf 100644
--- a/mysql-test/suite/rpl/r/rpl_row_annotate_do.result
+++ b/mysql-test/suite/rpl/r/rpl_row_annotate_do.result
@@ -180,7 +180,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
connection master;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
-FLUSH TABLES;
+FLUSH TABLES test1.t4;
SELECT * FROM test1.t4 ORDER BY a;
a b
1 1
diff --git a/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result b/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result
index c657cf2fbb5..65535d5d417 100644
--- a/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result
+++ b/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result
@@ -160,7 +160,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
connection master;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
-FLUSH TABLES;
+FLUSH TABLES test1.t4;
SELECT * FROM test1.t4 ORDER BY a;
a b
1 1
diff --git a/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff b/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff
index 0849c5dcf64..2ff34004702 100644
--- a/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff
+++ b/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff
@@ -4,28 +4,28 @@
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 1
--master-bin.000002 # Table_map 1 # table_id: 4294967295 (test.t)
--master-bin.000002 # Write_rows_v1 1 # table_id: 4294967295 flags: STMT_END_F
-+master-bin.000002 # Table_map 1 # table_id: 1 (test.t)
-+master-bin.000002 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F
+-master-bin.000002 # Table_map 1 # table_id: 4294967298 (test.t)
+-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967298 flags: STMT_END_F
++master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t)
++master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 2
--master-bin.000002 # Table_map 1 # table_id: 4294967296 (test.t)
--master-bin.000002 # Write_rows_v1 1 # table_id: 4294967296 flags: STMT_END_F
-+master-bin.000002 # Table_map 1 # table_id: 2 (test.t)
-+master-bin.000002 # Write_rows_v1 1 # table_id: 2 flags: STMT_END_F
+-master-bin.000002 # Table_map 1 # table_id: 4294967299 (test.t)
+-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967299 flags: STMT_END_F
++master-bin.000002 # Table_map 1 # table_id: 1 (test.t)
++master-bin.000002 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 3
--master-bin.000002 # Table_map 1 # table_id: 4294967297 (test.t)
--master-bin.000002 # Write_rows_v1 1 # table_id: 4294967297 flags: STMT_END_F
-+master-bin.000002 # Table_map 1 # table_id: 3 (test.t)
-+master-bin.000002 # Write_rows_v1 1 # table_id: 3 flags: STMT_END_F
+-master-bin.000002 # Table_map 1 # table_id: 4294967300 (test.t)
+-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967300 flags: STMT_END_F
++master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t)
++master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT
connection slave;
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_big_table_id.result b/mysql-test/suite/rpl/r/rpl_row_big_table_id.result
index 9a7a97e3d00..4899dda5e5a 100644
--- a/mysql-test/suite/rpl/r/rpl_row_big_table_id.result
+++ b/mysql-test/suite/rpl/r/rpl_row_big_table_id.result
@@ -23,22 +23,22 @@ master-bin.000002 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 1
-master-bin.000002 # Table_map 1 # table_id: 4294967295 (test.t)
-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967295 flags: STMT_END_F
+master-bin.000002 # Table_map 1 # table_id: 4294967298 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967298 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 2
-master-bin.000002 # Table_map 1 # table_id: 4294967296 (test.t)
-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967296 flags: STMT_END_F
+master-bin.000002 # Table_map 1 # table_id: 4294967299 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967299 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT
master-bin.000002 # Gtid 1 # GTID #-#-#
master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 3
-master-bin.000002 # Table_map 1 # table_id: 4294967297 (test.t)
-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967297 flags: STMT_END_F
+master-bin.000002 # Table_map 1 # table_id: 4294967300 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967300 flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT
connection slave;
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
index 978c3d30dbd..4d439c202f5 100644
--- a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
+++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
@@ -5,7 +5,7 @@ create table t1(a int not null primary key) engine=myisam;
insert delayed into t1 values (1);
insert delayed into t1 values (2);
insert delayed into t1 values (3);
-flush tables;
+flush tables t1;
SELECT * FROM t1 ORDER BY a;
a
1
diff --git a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
index 40754a73cb8..c97f8968136 100644
--- a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
@@ -30,6 +30,7 @@ test.tt_2 preload_keys note The storage engine for the table doesn't support pre
INSERT INTO tt_1(ddl_case) VALUES (39);
ANALYZE TABLE nt_1;
Table Op Msg_type Msg_text
+test.nt_1 analyze status Engine-independent statistics collected
test.nt_1 analyze status Table is already up to date
INSERT INTO tt_1(ddl_case) VALUES (38);
CHECK TABLE nt_1;
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_shutdown_await_ack.result b/mysql-test/suite/rpl/r/rpl_semi_sync_shutdown_await_ack.result
new file mode 100644
index 00000000000..719b61b796b
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_shutdown_await_ack.result
@@ -0,0 +1,517 @@
+#############################
+# Common setup for all tests
+#############################
+# Note: Simulated slave delay is hardcoded to 800 milliseconds
+# Note: Simulated master shutdown delay is hardcoded to 500 milliseconds
+include/rpl_init.inc [topology=1->2, 1->3]
+connection server_1;
+# Slaves which simulate an error will produce a timeout on the primary
+call mtr.add_suppression("Timeout waiting");
+call mtr.add_suppression("did not exit");
+# Suppress slave errors related to the simulated error
+connection server_2;
+call mtr.add_suppression("reply failed");
+call mtr.add_suppression("Replication event checksum verification");
+call mtr.add_suppression("Relay log write failure");
+call mtr.add_suppression("Failed to kill the active semi-sync connection");
+connection server_3;
+call mtr.add_suppression("reply failed");
+call mtr.add_suppression("Replication event checksum verification");
+call mtr.add_suppression("Relay log write failure");
+call mtr.add_suppression("Failed to kill the active semi-sync connection");
+connection server_1;
+CREATE TABLE t1 (a int);
+connection server_2;
+connection server_3;
+connect server_1_con2, localhost, root,,;
+#############################
+# Test cases
+#############################
+#
+# Test Case 1) If both replicas simulate a delay that is within the
+# allowed timeout, the primary should delay killing the suspended thread
+# until an ACK is received (Rpl_semi_sync_master_yes_tx should be 1).
+#
+connection server_1;
+#--
+#-- Semi-sync Setup
+connection server_1;
+#-- Enable semi-sync on slaves
+let slave_last= 3
+connection server_2;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+connection server_3;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+#-- Enable semi-sync on master
+connection server_1;
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
+set @@global.rpl_semi_sync_master_timeout= 1600;
+#-- Wait for master to recognize semi-sync slaves
+connection server_1;
+#-- Master should have semi-sync enabled with 2 connections
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status ON
+show status like 'Rpl_semi_sync_master_clients';
+Variable_name Value
+Rpl_semi_sync_master_clients 2
+#-- Prepare servers to simulate delay or error
+connection server_1;
+SET @@GLOBAL.debug_dbug= "";
+connection server_2;
+SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
+connection server_3;
+SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
+#--
+#-- Test begins
+connection server_1;
+#-- Begin semi-sync transaction
+INSERT INTO t1 VALUES (1);
+connection server_1_con2;
+#-- Wait until master recognizes a connection is awaiting semi-sync ACK
+show status like 'Rpl_semi_sync_master_wait_sessions';
+Variable_name Value
+Rpl_semi_sync_master_wait_sessions 1
+#-- Give enough time after timeout/ack received to query yes_tx/no_tx
+SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
+#-- Begin master shutdown
+SHUTDOWN WAIT FOR ALL SLAVES;
+connection server_1;
+#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
+show status like 'Rpl_semi_sync_master_yes_tx';
+Variable_name Value
+Rpl_semi_sync_master_yes_tx 1
+show status like 'Rpl_semi_sync_master_no_tx';
+Variable_name Value
+Rpl_semi_sync_master_no_tx 0
+connection server_1_con2;
+# Check logs to ensure shutdown was delayed
+FOUND 1 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
+# Validate slave data is in correct state
+connection server_2;
+select count(*)=1 from t1;
+count(*)=1
+1
+connection server_3;
+select count(*)=1 from t1;
+count(*)=1
+1
+#
+#-- Re-synchronize slaves with master and disable semi-sync
+#-- Stop slaves
+connection server_2;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+connection server_3;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+#-- Bring the master back up
+connection server_1_con2;
+connection default;
+connection server_1;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 0;
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status OFF
+TRUNCATE TABLE t1;
+#-- Bring slaves back up
+connection server_2;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+connection server_3;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+#
+# Test Case 2) If both replicas simulate an error before sending an ACK,
+# the primary should delay killing the suspended thread until the
+# timeout is reached (Rpl_semi_sync_master_no_tx should be 1).
+#
+connection server_1;
+#--
+#-- Semi-sync Setup
+connection server_1;
+#-- Enable semi-sync on slaves
+let slave_last= 3
+connection server_2;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+connection server_3;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+#-- Enable semi-sync on master
+connection server_1;
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
+set @@global.rpl_semi_sync_master_timeout= 500;
+#-- Wait for master to recognize semi-sync slaves
+connection server_1;
+#-- Master should have semi-sync enabled with 2 connections
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status ON
+show status like 'Rpl_semi_sync_master_clients';
+Variable_name Value
+Rpl_semi_sync_master_clients 2
+#-- Prepare servers to simulate delay or error
+connection server_1;
+SET @@GLOBAL.debug_dbug= "+d,mysqld_delay_kill_threads_phase_1";
+connection server_2;
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event";
+connection server_3;
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event";
+#--
+#-- Test begins
+connection server_1;
+#-- Begin semi-sync transaction
+INSERT INTO t1 VALUES (1);
+connection server_1_con2;
+#-- Wait until master recognizes a connection is awaiting semi-sync ACK
+show status like 'Rpl_semi_sync_master_wait_sessions';
+Variable_name Value
+Rpl_semi_sync_master_wait_sessions 1
+#-- Give enough time after timeout/ack received to query yes_tx/no_tx
+SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
+#-- Begin master shutdown
+SHUTDOWN WAIT FOR ALL SLAVES;
+connection server_1;
+#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
+show status like 'Rpl_semi_sync_master_yes_tx';
+Variable_name Value
+Rpl_semi_sync_master_yes_tx 0
+show status like 'Rpl_semi_sync_master_no_tx';
+Variable_name Value
+Rpl_semi_sync_master_no_tx 1
+connection server_1_con2;
+# Check logs to ensure shutdown was delayed
+FOUND 2 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
+# Validate slave data is in correct state
+connection server_2;
+select count(*)=0 from t1;
+count(*)=0
+1
+connection server_3;
+select count(*)=0 from t1;
+count(*)=0
+1
+#
+#-- Re-synchronize slaves with master and disable semi-sync
+#-- Stop slaves
+connection server_2;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+connection server_3;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+#-- Bring the master back up
+connection server_1_con2;
+connection default;
+connection server_1;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 0;
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status OFF
+TRUNCATE TABLE t1;
+#-- Bring slaves back up
+connection server_2;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+connection server_3;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+#
+# Test Case 3) If one replica simulates a delay within the allowed
+# timeout and the other simulates an error before sending an ACK, the
+# primary should delay killing the suspended thread until it receives an
+# ACK from the delayed slave (Rpl_semi_sync_master_yes_tx should be 1).
+#
+connection server_1;
+#--
+#-- Semi-sync Setup
+connection server_1;
+#-- Enable semi-sync on slaves
+let slave_last= 3
+connection server_2;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+connection server_3;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+#-- Enable semi-sync on master
+connection server_1;
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
+set @@global.rpl_semi_sync_master_timeout= 1600;
+#-- Wait for master to recognize semi-sync slaves
+connection server_1;
+#-- Master should have semi-sync enabled with 2 connections
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status ON
+show status like 'Rpl_semi_sync_master_clients';
+Variable_name Value
+Rpl_semi_sync_master_clients 2
+#-- Prepare servers to simulate delay or error
+connection server_1;
+SET @@GLOBAL.debug_dbug= "+d,mysqld_delay_kill_threads_phase_1";
+connection server_2;
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event";
+connection server_3;
+SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
+#--
+#-- Test begins
+connection server_1;
+#-- Begin semi-sync transaction
+INSERT INTO t1 VALUES (1);
+connection server_1_con2;
+#-- Wait until master recognizes a connection is awaiting semi-sync ACK
+show status like 'Rpl_semi_sync_master_wait_sessions';
+Variable_name Value
+Rpl_semi_sync_master_wait_sessions 1
+#-- Give enough time after timeout/ack received to query yes_tx/no_tx
+SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
+#-- Begin master shutdown
+SHUTDOWN WAIT FOR ALL SLAVES;
+connection server_1;
+#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
+show status like 'Rpl_semi_sync_master_yes_tx';
+Variable_name Value
+Rpl_semi_sync_master_yes_tx 1
+show status like 'Rpl_semi_sync_master_no_tx';
+Variable_name Value
+Rpl_semi_sync_master_no_tx 0
+connection server_1_con2;
+# Check logs to ensure shutdown was delayed
+FOUND 3 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
+# Validate slave data is in correct state
+connection server_2;
+select count(*)=0 from t1;
+count(*)=0
+1
+connection server_3;
+select count(*)=1 from t1;
+count(*)=1
+1
+#
+#-- Re-synchronize slaves with master and disable semi-sync
+#-- Stop slaves
+connection server_2;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+connection server_3;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+#-- Bring the master back up
+connection server_1_con2;
+connection default;
+connection server_1;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 0;
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status OFF
+TRUNCATE TABLE t1;
+#-- Bring slaves back up
+connection server_2;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+connection server_3;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+#
+# Test Case 4) If a replica errors before sending an ACK, it will cause
+# the IO thread to stop and handle the error. During error handling, if
+# semi-sync is active, the replica will form a new connection with the
+# primary to kill the active connection. However, if the primary is
+# shutting down, it may kill the new connection, thereby leaving the
+# active semi-sync connection in-tact. The slave should notice this, and
+# not issue a `QUIT` command to the primary, which would otherwise be
+# sent to kill an active connection. This test case validates that the
+# slave does not send a `QUIT` in this case (Rpl_semi_sync_master_yes_tx
+# should be 1 because server_3 will send the ACK within a valid timeout).
+#
+connection server_1;
+#--
+#-- Semi-sync Setup
+connection server_1;
+#-- Enable semi-sync on slaves
+let slave_last= 3
+connection server_2;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+connection server_3;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status ON
+#-- Enable semi-sync on master
+connection server_1;
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
+set @@global.rpl_semi_sync_master_timeout= 1600;
+#-- Wait for master to recognize semi-sync slaves
+connection server_1;
+#-- Master should have semi-sync enabled with 2 connections
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status ON
+show status like 'Rpl_semi_sync_master_clients';
+Variable_name Value
+Rpl_semi_sync_master_clients 2
+#-- Prepare servers to simulate delay or error
+connection server_1;
+SET @@GLOBAL.debug_dbug= "+d,mysqld_delay_kill_threads_phase_1";
+connection server_2;
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event,slave_delay_killing_semisync_connection";
+connection server_3;
+SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
+#--
+#-- Test begins
+connection server_1;
+#-- Begin semi-sync transaction
+INSERT INTO t1 VALUES (1);
+connection server_1_con2;
+#-- Wait until master recognizes a connection is awaiting semi-sync ACK
+show status like 'Rpl_semi_sync_master_wait_sessions';
+Variable_name Value
+Rpl_semi_sync_master_wait_sessions 1
+#-- Give enough time after timeout/ack received to query yes_tx/no_tx
+SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
+#-- Begin master shutdown
+SHUTDOWN WAIT FOR ALL SLAVES;
+connection server_1;
+#-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
+show status like 'Rpl_semi_sync_master_yes_tx';
+Variable_name Value
+Rpl_semi_sync_master_yes_tx 1
+show status like 'Rpl_semi_sync_master_no_tx';
+Variable_name Value
+Rpl_semi_sync_master_no_tx 0
+connection server_1_con2;
+# Check logs to ensure shutdown was delayed
+FOUND 4 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
+# Validate slave data is in correct state
+connection server_2;
+select count(*)=0 from t1;
+count(*)=0
+1
+connection server_3;
+select count(*)=1 from t1;
+count(*)=1
+1
+#
+#-- Re-synchronize slaves with master and disable semi-sync
+#-- Stop slaves
+connection server_2;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+connection server_3;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
+include/stop_slave.inc
+#-- Bring the master back up
+connection server_1_con2;
+connection default;
+connection server_1;
+SET @@GLOBAL.debug_dbug= "";
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 0;
+show status like 'Rpl_semi_sync_master_status';
+Variable_name Value
+Rpl_semi_sync_master_status OFF
+TRUNCATE TABLE t1;
+#-- Bring slaves back up
+connection server_2;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+connection server_3;
+include/start_slave.inc
+show status like 'Rpl_semi_sync_slave_status';
+Variable_name Value
+Rpl_semi_sync_slave_status OFF
+SELECT COUNT(*)=0 from t1;
+COUNT(*)=0
+1
+#############################
+# Cleanup
+#############################
+connection server_2;
+include/stop_slave.inc
+include/start_slave.inc
+connection server_3;
+include/stop_slave.inc
+include/start_slave.inc
+connection server_1;
+drop table t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_wait_point.result b/mysql-test/suite/rpl/r/rpl_semi_sync_wait_point.result
index 404f0890e7c..a0ea06afa89 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_wait_point.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_wait_point.result
@@ -68,6 +68,7 @@ i
1
2
# Now restart server
+# restart
# Done restarting server
# Reset setting that were lost in restart
SET @@global.rpl_semi_sync_master_timeout = 60000;
@@ -141,6 +142,7 @@ i
2
3
# Now restart server
+# restart
# Done restarting server
# Reset setting that were lost in restart
SET @@global.rpl_semi_sync_master_timeout = 60000;
diff --git a/mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result b/mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result
new file mode 100644
index 00000000000..cecc3daf340
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_shutdown_wait_semisync_slaves.result
@@ -0,0 +1,52 @@
+include/rpl_init.inc [topology=1->2, 1->3, 1->4]
+connection server_1;
+call mtr.add_suppression("Timeout waiting for reply of binlog");
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
+connection server_2;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+set global rpl_semi_sync_slave_enabled = 1;
+connection server_3;
+set global rpl_semi_sync_slave_enabled = 1;
+include/stop_slave.inc
+include/start_slave.inc
+set global rpl_semi_sync_slave_enabled = 1;
+connection server_1;
+CREATE TABLE t1 (a INT) ENGINE=innodb;
+connection server_2;
+connection server_3;
+connection server_4;
+include/stop_slave.inc
+connection server_1;
+connection server_1;
+SET @@GLOBAL.debug_dbug="+d,simulate_delay_at_shutdown";
+connection server_4;
+include/start_slave.inc
+connection server_1;
+SHUTDOWN WAIT FOR ALL SLAVES;
+connection server_4;
+connection server_3;
+connection server_2;
+connection server_1;
+connection default;
+connection server_1;
+connection server_1;
+DROP TABLE t1;
+connection server_2;
+include/start_slave.inc
+connection server_3;
+include/start_slave.inc
+connection server_4;
+include/start_slave.inc
+connection server_2;
+include/stop_slave.inc
+include/start_slave.inc
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = 0;;
+connection server_3;
+include/stop_slave.inc
+include/start_slave.inc
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = 0;;
+connection server_1;
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 0;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result b/mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result
new file mode 100644
index 00000000000..3b238332462
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_shutdown_wait_slaves.result
@@ -0,0 +1,29 @@
+include/rpl_init.inc [topology=1->2, 1->3, 1->4]
+connection server_1;
+CREATE TABLE t1 (a INT) ENGINE=innodb;
+connection server_2;
+connection server_3;
+connection server_4;
+include/stop_slave.inc
+connection server_1;
+connection server_1;
+SET @@GLOBAL.debug_dbug="+d,simulate_delay_at_shutdown";
+connection server_4;
+include/start_slave.inc
+connection server_1;
+SHUTDOWN WAIT FOR ALL SLAVES;
+connection server_4;
+connection server_3;
+connection server_2;
+connection server_1;
+connection default;
+connection server_1;
+connection server_1;
+DROP TABLE t1;
+connection server_2;
+include/start_slave.inc
+connection server_3;
+include/start_slave.inc
+connection server_4;
+include/start_slave.inc
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result
index 0b9ed6fc09c..9ef2ca3bc53 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_000001.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result
@@ -19,11 +19,16 @@ abandons
connection slave;
stop slave;
connection master;
-UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
+create temporary table tmp select * from mysql.global_priv where host="localhost" and user="root";
+set password for root@"localhost" = password('foo');
connection slave;
start slave;
connection master;
-UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
+replace into mysql.global_priv select * from tmp;
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave
+drop temporary table tmp;
+flush privileges;
create table t3(n int);
insert into t3 values(1),(2);
connection slave;
@@ -38,7 +43,7 @@ connection master;
drop table t1,t3;
connection slave;
connection master;
-create table t1 (n int) engine=myisam;
+create table t1 (n int);
connection slave;
connection master;
reset master;
@@ -76,31 +81,4 @@ count(*)
5000
connection master1;
drop table t1;
-create table t1 (n int);
-insert into t1 values(3456);
-insert ignore into mysql.user (Host, User, Password)
-VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-select_priv user
-N blafasel2
-update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-select_priv user
-Y blafasel2
-connection slave;
-select n from t1;
-n
-3456
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-select_priv user
-Y blafasel2
-connection master1;
-drop table t1;
-delete from mysql.user where user="blafasel2";
-connection slave;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
index 55d0c020fcd..9fbb7b0ab19 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
@@ -30,6 +30,7 @@ test.tt_2 preload_keys note The storage engine for the table doesn't support pre
INSERT INTO tt_1(ddl_case) VALUES (39);
ANALYZE TABLE nt_1;
Table Op Msg_type Msg_text
+test.nt_1 analyze status Engine-independent statistics collected
test.nt_1 analyze status Table is already up to date
INSERT INTO tt_1(ddl_case) VALUES (38);
CHECK TABLE nt_1;
diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
index 2f7f1b07cb4..936f604be2e 100644
--- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
@@ -140,7 +140,7 @@ create table t4 select * from t1 where 3 in (select 1 union select 2 union selec
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
-Warning 1292 Incorrect datetime value: '3'
+Warning 1292 Truncated incorrect datetime value: '3'
insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
create procedure foo()
begin
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_round.result b/mysql-test/suite/rpl/r/rpl_temporal_round.result
new file mode 100644
index 00000000000..df8cc431a74
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_temporal_round.result
@@ -0,0 +1,50 @@
+include/master-slave.inc
+[connection master]
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES ('2011-01-01 23:59:59.999999');
+CREATE TABLE t2 (id SERIAL, a DATETIME(4));
+INSERT INTO t2 (a) VALUES (now(6));
+INSERT INTO t2 (a) VALUES ('2011-01-01 23:59:59.999999');
+CREATE TABLE t3 (id SERIAL, a TIME(4));
+INSERT INTO t3 (a) VALUES (now(6));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+INSERT INTO t3 (a) VALUES ('2011-01-01 23:59:59.999999');
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t2;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t3;
+id a
+1 24:00:00.0000
+2 24:00:00.0000
+connection slave;
+connection slave;
+SET time_zone='+00:00';
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t2;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t3;
+id a
+1 24:00:00.0000
+2 24:00:00.0000
+connection master;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
index fb8e2a349bb..0eef8fa7371 100644
--- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
+++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
@@ -149,43 +149,43 @@ UNLOCK TABLE;
DROP DATABASE mysqltest2;
LOCK TABLE t1 WRITE;
CREATE USER test_1@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("CREATE USER test_1@localhost with table locked");
UNLOCK TABLE;
CREATE USER test_2@localhost;
LOCK TABLE t1 WRITE;
GRANT SELECT ON t1 TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT select on table to user with table locked");
GRANT ALL ON f2 TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT ALL ON f2 TO test_2 with table locked");
GRANT ALL ON p2 TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT ALL ON p2 TO test_2 with table locked");
GRANT USAGE ON *.* TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT USAGE ON *.* TO test_2 with table locked");
REVOKE ALL PRIVILEGES ON f2 FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE ALL PRIVILEGES on function to user with table locked");
REVOKE ALL PRIVILEGES ON p2 FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE ALL PRIVILEGES on procedure to user with table locked");
REVOKE ALL PRIVILEGES ON t1 FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE ALL PRIVILEGES on table to user with table locked");
REVOKE USAGE ON *.* FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE USAGE ON *.* TO test_2 with table locked");
RENAME USER test_2@localhost TO test_3@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("RENAME USER test_2 TO test_3 with table locked");
UNLOCK TABLE;
RENAME USER test_2@localhost TO test_3@localhost;
LOCK TABLE t1 WRITE;
DROP USER test_3@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
UNLOCK TABLE;
CREATE DATABASE db;
diff --git a/mysql-test/suite/rpl/t/parallel_backup.test b/mysql-test/suite/rpl/t/parallel_backup.test
new file mode 100644
index 00000000000..6ed182c024b
--- /dev/null
+++ b/mysql-test/suite/rpl/t/parallel_backup.test
@@ -0,0 +1,75 @@
+--source include/have_innodb.inc
+# The test is not format specific, MIXED is required to optimize testing time
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # MDEV-21953: deadlock between BACKUP STAGE BLOCK_COMMIT and parallel
+--echo # replication
+--echo #
+
+--connection master
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = innodb;
+
+--sync_slave_with_master
+--source include/stop_slave.inc
+SET @old_parallel_threads= @@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
+SET @@global.slave_parallel_threads= 2;
+SET @@global.slave_parallel_mode = 'optimistic';
+
+--connection master
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+--save_master_pos
+
+# The plot:
+# Block the 1st of two workers and, at waiting-for-prior-commit by the 2nd,
+# issue BACKUP commands.
+# BLOCK_COMMIT may hang so it is --send.
+# Release the 1st worker to observe a deadlock unless its fixed.
+
+--connect (aux_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,)
+BEGIN;
+# block the 1st worker and wait for the 2nd ready to commit
+INSERT INTO t1 VALUES (1);
+
+--connection slave
+--source include/start_slave.inc
+
+--connection aux_slave
+--let $wait_condition= SELECT COUNT(*) > 0 FROM information_schema.processlist WHERE state = "Waiting for prior transaction to commit"
+--source include/wait_condition.inc
+
+# While the 1st worker is locked out run backup
+--connect (backup_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,)
+BACKUP STAGE START;
+--send BACKUP STAGE BLOCK_COMMIT
+
+# release the 1st work
+--connection aux_slave
+--sleep 1
+ROLLBACK;
+
+--connection backup_slave
+--reap
+BACKUP STAGE END;
+
+--connection slave
+--sync_with_master
+
+--let $diff_tables= master:t1,slave:t1
+--source include/diff_tables.inc
+
+
+# Clean up.
+--connection slave
+--source include/stop_slave.inc
+SET @@global.slave_parallel_threads= @old_parallel_threads;
+SET @@global.slave_parallel_mode = @old_parallel_mode;
+--source include/start_slave.inc
+
+--connection server_1
+DROP TABLE t1;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/password_expiration.test b/mysql-test/suite/rpl/t/password_expiration.test
new file mode 100644
index 00000000000..6934500cb40
--- /dev/null
+++ b/mysql-test/suite/rpl/t/password_expiration.test
@@ -0,0 +1,53 @@
+#
+# Test a slave connection is properly handled when the replication
+# user has an expired password
+#
+
+--source include/not_embedded.inc
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+
+--connection slave
+--source include/stop_slave.inc
+
+--connection master
+create user 'repl_user' password expire;
+grant replication slave on *.* to repl_user;
+flush privileges;
+set global disconnect_on_expired_password=ON;
+
+--connection slave
+--let $master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1)
+CHANGE MASTER TO MASTER_USER= 'repl_user';
+
+START SLAVE;
+# ER_MUST_CHANGE_PASSWORD_LOGIN
+--let $slave_io_errno= 1862
+--source include/wait_for_slave_io_error.inc
+
+# restart slave
+--source include/stop_slave_sql.inc
+RESET SLAVE;
+
+--connection master
+# force sandbox mode for repl_user
+set global disconnect_on_expired_password=OFF;
+
+--connection slave
+START SLAVE;
+# ER_MUST_CHANGE_PASSWORD
+--let $slave_io_errno= 1820
+--source include/wait_for_slave_io_error.inc
+
+--connection master
+DROP USER 'repl_user';
+set global disconnect_on_expired_password=default;
+
+--connection slave
+--source include/stop_slave_sql.inc
+eval CHANGE MASTER TO MASTER_USER='$master_user';
+RESET SLAVE;
+
+--let $rpl_only_running_threads= 1
+--source include/rpl_end.inc
+
diff --git a/mysql-test/suite/rpl/t/rpl_create_drop_user.test b/mysql-test/suite/rpl/t/rpl_create_drop_user.test
index 5fcf0a14c36..c5f193a0d0c 100644
--- a/mysql-test/suite/rpl/t/rpl_create_drop_user.test
+++ b/mysql-test/suite/rpl/t/rpl_create_drop_user.test
@@ -15,9 +15,11 @@ SELECT CURRENT_USER;
disconnect user_a;
connection master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
+--sorted_result
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
sync_slave_with_master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
+--sorted_result
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
connection master;
CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'abcdefghijk2';
@@ -26,9 +28,11 @@ connection user_a;
SELECT CURRENT_USER;
disconnect user_a;
connection master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
+--sorted_result
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
sync_slave_with_master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
+--sorted_result
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
connection master;
--error ER_CANNOT_USER
@@ -38,7 +42,8 @@ CREATE USER u1@localhost;
DROP USER u3@localhost;
sync_slave_with_master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
+--sorted_result
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
connection master;
DROP USER IF EXISTS u1@localhost;
@@ -46,6 +51,7 @@ DROP USER u2@localhost;
DROP USER IF EXISTS u3@localhost;
sync_slave_with_master;
-SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user;
+--sorted_result
+SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test
index 0024c7039e4..1350585ff93 100644
--- a/mysql-test/suite/rpl/t/rpl_do_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_do_grant.test
@@ -3,18 +3,6 @@
-- source include/master-slave.inc
-# do not be influenced by other tests.
-connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
-sync_slave_with_master;
-# if these DELETE did nothing on the master, we need to do them manually on the
-# slave.
-delete from mysql.user where user=_binary'rpl_ignore_grant';
-delete from mysql.db where user=_binary'rpl_ignore_grant';
-flush privileges;
-
# test replication of GRANT
connection master;
create user rpl_do_grant@localhost;
@@ -27,13 +15,13 @@ show grants for rpl_do_grant@localhost;
connection master;
set password for rpl_do_grant@localhost=password("does it work?");
sync_slave_with_master;
-select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
+select authentication_string<>'' from mysql.user where user='rpl_do_grant';
#
# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
#
connection master;
-update mysql.user set authentication_string='' where user='rpl_do_grant';
+update mysql.global_priv set priv=json_remove(priv, '$.authentication_string') where user='rpl_do_grant';
flush privileges;
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
set sql_mode='ANSI_QUOTES';
@@ -42,18 +30,10 @@ set sql_mode='';
sync_slave_with_master;
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
-
# clear what we have done, to not influence other tests.
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
+drop user rpl_do_grant@localhost;
sync_slave_with_master;
-# The mysql database is not replicated, so we have to do the deletes
-# manually on the slave as well.
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
# End of 4.1 tests
@@ -363,5 +343,8 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
--connection master
DROP USER user_bug27606@localhost;
+select priv into @root_priv from mysql.global_priv where user='root' and host='127.0.0.1';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
+
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp_table_invalid_lex.test b/mysql-test/suite/rpl/t/rpl_drop_temp_table_invalid_lex.test
new file mode 100644
index 00000000000..475afef12fc
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_drop_temp_table_invalid_lex.test
@@ -0,0 +1,41 @@
+# ==== Purpose ====
+#
+# Test verifies that no ASAN issues are reported at the time of writing DROP
+# TEMPORARY TABLE statements to binary log as part of session cleanup.
+#
+# ==== Implementation ====
+#
+# Steps:
+# 1 - Create a new connection named 'con1'.
+# 2 - Create a temporary table named 'tmp' as part of connection 'con1'.
+# 3 - Try to disconnect the current session when a CREATE .. SELECT
+# statement is in the middle of execution.
+# 4 - Observe that no ASAN issue is reported.
+#
+# ==== References ====
+#
+# MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event /
+# THD::log_events_and_free_tmp_shares
+
+--source include/have_binlog_format_mixed_or_statement.inc
+--source include/master-slave.inc
+
+--connect (con1,localhost,root,,)
+CREATE TEMPORARY TABLE tmp (a INT);
+
+--send CREATE TABLE non_existing_db.t SELECT 1 AS b
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--connection master
+--let $wait_binlog_event= DROP
+--source include/wait_for_binlog_event.inc
+sync_slave_with_master;
+
+--connection slave
+--let $open_temp_tbl_count=query_get_value(show status like 'Slave_open_temp_tables', Value, 1)
+--let $assert_cond= "open_temp_tbl_count" = 0
+--let $assert_text= "Slave_open_temp_tables count should be 0"
+--source include/assert.inc
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_ignored.test b/mysql-test/suite/rpl/t/rpl_gtid_ignored.test
index 6e927bd5a77..3c1324b2ea6 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_ignored.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_ignored.test
@@ -129,7 +129,7 @@ SELECT * FROM t1 ORDER BY a;
# Clean up.
--connection server_1
DROP TABLE t1;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode;
SET debug_sync = "reset";
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test
index e1f5696f5a1..5c17653da8a 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test
@@ -9,7 +9,7 @@
# back). So fix it to make sure we are consistent, in case an earlier test case
# left it as InnoDB.
SET sql_log_bin=0;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET sql_log_bin=1;
--source include/start_slave.inc
@@ -28,37 +28,79 @@ INSERT INTO t1 VALUES (1);
# Inject an artificial error deleting entries, and check that the error handling code works.
--connection slave
--source include/stop_slave.inc
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,gtid_slave_pos_simulate_failed_delete";
SET sql_log_bin= 0;
-CALL mtr.add_suppression("Can't find file");
+CALL mtr.add_suppression("<DEBUG> Error deleting old GTID row");
SET sql_log_bin= 1;
--source include/start_slave.inc
--connection master
-INSERT INTO t1 VALUES (2);
+--disable_query_log
+let $i = 20;
+while ($i) {
+ eval INSERT INTO t1 VALUES ($i+10);
+ dec $i;
+}
+--enable_query_log
+--save_master_pos
--connection slave
---let $slave_sql_errno= 1942
---source include/wait_for_slave_sql_error.inc
-STOP SLAVE IO_THREAD;
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
- ORDER BY domain_id, sub_id DESC LIMIT 1;
+--sync_with_master
+
+# Now wait for the slave background thread to try to delete old rows and
+# hit the error injection.
+--let _TEST_MYSQLD_ERROR_LOG=$MYSQLTEST_VARDIR/log/mysqld.2.err
+--perl
+ open F, '<', $ENV{'_TEST_MYSQLD_ERROR_LOG'} or die;
+ outer: while (1) {
+ inner: while (<F>) {
+ last outer if /<DEBUG> Error deleting old GTID row/;
+ }
+ # Easy way to do sub-second sleep without extra modules.
+ select(undef, undef, undef, 0.1);
+ }
+EOF
+
+# Since we injected error in the cleanup code, the rows should remain in
+# mysql.gtid_slave_pos. Check that we have at least 20 (more robust against
+# non-deterministic cleanup and future changes than checking for exact number).
+SELECT COUNT(*), MAX(seq_no) INTO @pre_count, @pre_max_seq_no
+ FROM mysql.gtid_slave_pos;
+SELECT IF(@pre_count >= 20, "OK", CONCAT("Error: too few rows seen while errors injected: ", @pre_count));
SET GLOBAL debug_dbug= @old_dbug;
---source include/start_slave.inc
--connection master
-INSERT INTO t1 VALUES (3);
+--disable_query_log
+let $i = 20;
+while ($i) {
+ eval INSERT INTO t1 VALUES ($i+40);
+ dec $i;
+}
+--enable_query_log
--sync_slave_with_master
--connection slave
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
- ORDER BY domain_id, sub_id DESC LIMIT 1;
-SELECT * FROM t1 ORDER BY i;
-
+# Now check that 1) rows are being deleted again after removing error
+# injection, and 2) old rows are left that failed their delete while errors
+# where injected (again compensating for non-deterministic deletion).
+# Deletion is async and slightly non-deterministic, so we wait for at
+# least 10 of the 20 new rows to be deleted.
+let $wait_condition=
+ SELECT COUNT(*) <= 20-10
+ FROM mysql.gtid_slave_pos
+ WHERE seq_no > @pre_max_seq_no;
+--source include/wait_condition.inc
+SELECT IF(COUNT(*) >= 1, "OK", CONCAT("Error: too few rows seen after errors no longer injected: ", COUNT(*)))
+ FROM mysql.gtid_slave_pos
+ WHERE seq_no <= @pre_max_seq_no;
# Clean up
--connection master
DROP TABLE t1;
+--connection slave
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
index 4202aa82516..fd4cdf71f6f 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
@@ -230,7 +230,7 @@ EOF
--enable_reconnect
--source include/wait_until_connected_again.inc
SET sql_log_bin= 0;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET sql_log_bin= 1;
# Do a second restart to get the mysql.gtid_slave_pos table loaded with
# the right engine.
diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test
index 3360b789475..19797b89013 100644
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test
@@ -3,7 +3,7 @@ source include/have_collation.inc;
source include/master-slave.inc;
call mtr.add_suppression("Can't find record in 't.'");
-call mtr.add_suppression("Can't find record in 'user'");
+call mtr.add_suppression("Can't find record in 'global_priv'");
call mtr.add_suppression("Can't find record in 'tables_priv'");
#
@@ -69,7 +69,7 @@ create table mysqltest2.t2 (id int);
GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass';
# Create a grant manually
-insert into mysql.user (user, host) values ("mysqltest5", "somehost");
+insert into mysql.global_priv (user, host) values ("mysqltest5", "somehost");
# Partial replicate 3 with *.*
GRANT SELECT ON *.* TO mysqltest6@localhost;
@@ -77,10 +77,15 @@ GRANT INSERT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON test.* TO mysqltest6@localhost;
GRANT INSERT ON test.t1 TO mysqltest6@localhost;
+--sorted_result
show grants for mysqltest1@localhost;
+--sorted_result
show grants for mysqltest2@localhost;
+--sorted_result
show grants for mysqltest3@localhost;
+--sorted_result
show grants for mysqltest4@localhost;
+--sorted_result
show grants for mysqltest6@localhost;
flush privileges;
@@ -92,10 +97,15 @@ sync_slave_with_master;
--echo **** Checking grants on slave ****
# Check that grants are replicated to slave
+--sorted_result
show grants for mysqltest2@localhost;
+--sorted_result
show grants for mysqltest3@localhost;
+--sorted_result
show grants for mysqltest4@localhost;
+--sorted_result
show grants for mysqltest5@somehost;
+--sorted_result
show grants for mysqltest6@localhost;
# mysqltest1 should not be on slave
@@ -109,8 +119,11 @@ REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost;
REVOKE select(a) on t4
from mysqltest3@localhost;
+--sorted_result
show grants for mysqltest1@localhost;
+--sorted_result
show grants for mysqltest3@localhost;
+--sorted_result
show grants for mysqltest4@localhost;
sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/t/rpl_mdev10863.test b/mysql-test/suite/rpl/t/rpl_mdev10863.test
index 81cdfd84dbe..73062df861e 100644
--- a/mysql-test/suite/rpl/t/rpl_mdev10863.test
+++ b/mysql-test/suite/rpl/t/rpl_mdev10863.test
@@ -99,7 +99,7 @@ SET GLOBAL max_relay_log_size= @old_max_relay;
--source include/start_slave.inc
--connection server_1
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
DROP TABLE t1;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mdev12179.test b/mysql-test/suite/rpl/t/rpl_mdev12179.test
index a0241784c85..e3caccde6b4 100644
--- a/mysql-test/suite/rpl/t/rpl_mdev12179.test
+++ b/mysql-test/suite/rpl/t/rpl_mdev12179.test
@@ -44,7 +44,7 @@ SELECT * FROM t1 ORDER BY a;
SET sql_log_bin=0;
# Reset storage engine for mysql.gtid_slave_pos in case an earlier test
# might have changed it to InnoDB.
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos;
ALTER TABLE mysql.gtid_slave_pos_innodb ENGINE=InnoDB;
INSERT INTO mysql.gtid_slave_pos_innodb SELECT * FROM mysql.gtid_slave_pos;
@@ -128,7 +128,7 @@ SELECT table_name, engine FROM information_schema.tables
--source include/stop_slave.inc
SET sql_log_bin=0;
-ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
SET sql_log_bin=1;
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
diff --git a/mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test b/mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test
new file mode 100644
index 00000000000..675b7db0603
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test
@@ -0,0 +1,58 @@
+--source include/have_binlog_format_statement.inc
+
+--echo #
+--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+--echo #
+
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection slave
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+--source include/stop_slave.inc
+
+--connection master
+--let $datadir= `SELECT @@datadir`
+
+--let $rpl_server_number= 1
+--source include/rpl_stop_server.inc
+
+--remove_file $datadir/master-bin.000001
+
+#
+# Simulate MySQL 5.7.x master
+#
+# mysql-5.7.11-stm-temporal-round-binlog.000001 was recorded against a
+# table with this structure:
+#CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+# (note, the CREATE statement is not inside the binary log)
+#
+# using this command line:
+# mysqld --log-bin --binlog-format=statement
+# with the following single SQL statement:
+#
+#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
+#
+
+--copy_file $MYSQL_TEST_DIR/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001 $datadir/master-bin.000001
+
+--let $rpl_server_number= 1
+--source include/rpl_start_server.inc
+
+--source include/wait_until_connected_again.inc
+
+--connection slave
+--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
+eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+
+--source include/start_slave.inc
+
+--connection master
+--sync_slave_with_master
+SELECT * FROM t1 ORDER BY id;
+
+--source include/stop_slave.inc
+DROP TABLE t1;
+
+--let $rpl_only_running_threads= 1
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test b/mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test
new file mode 100644
index 00000000000..ad6df9d9993
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test
@@ -0,0 +1,62 @@
+--source include/have_binlog_format_statement.inc
+
+--echo #
+--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+--echo #
+
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection slave
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+--source include/stop_slave.inc
+
+--connection master
+--let $datadir= `SELECT @@datadir`
+
+--let $rpl_server_number= 1
+--source include/rpl_stop_server.inc
+
+--remove_file $datadir/master-bin.000001
+
+#
+# Simulate MySQL 8.0.x master
+#
+# mysql-8.0.13-stm-temporal-round-binlog.000001 was recorded against a
+# table with this structure:
+#CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+# (note, the CREATE statement is not inside the binary log)
+#
+# using this command line:
+# mysqld --log-bin --binlog-format=statement --server-id=1 --character-set-server=latin1
+# with the following SQL script:
+#
+#SET NAMES latin1 COLLATE latin1_swedish_ci;
+#SET sql_mode='';
+#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
+#SET sql_mode=TIME_TRUNCATE_FRACTIONAL;
+#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
+#
+
+--copy_file $MYSQL_TEST_DIR/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001 $datadir/master-bin.000001
+
+--let $rpl_server_number= 1
+--source include/rpl_start_server.inc
+
+--source include/wait_until_connected_again.inc
+
+--connection slave
+--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
+eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+
+--source include/start_slave.inc
+
+--connection master
+--sync_slave_with_master
+SELECT * FROM t1 ORDER BY id;
+
+--source include/stop_slave.inc
+DROP TABLE t1;
+
+--let $rpl_only_running_threads= 1
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition-slave.opt b/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition-slave.opt
new file mode 100644
index 00000000000..d127ef62043
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition-slave.opt
@@ -0,0 +1 @@
+--gtid-cleanup-batch-size=1
diff --git a/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition.test b/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition.test
new file mode 100644
index 00000000000..751da3158b7
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition.test
@@ -0,0 +1,67 @@
+#
+# Purpose:
+# This test ensures that, during mysqld initialization, the mysql handle
+# manager starts before the binlog background thread. This is because the
+# binlog background thread uses the mysql handle manager, and if the background
+# thread tries to submit a job to the handle manager before it is
+# initialized/started, mysqld can crash (the actual behavior is undefined).
+# This race condition lead to the problem described in MDEV-26473.
+#
+# Methodology:
+# This test ensures that the binlog background thread cannot be started
+# before the mysql manager is started. Specifically, it forces a path in
+# the binlog background thread to call mysql_manager_submit() by reducing
+# --gtid-cleanup-batch-size to be 1 (which submits a job to delete unused rows
+# from the mysql.gtid_slave_pos* tables). With this path forced, the main
+# mysqld thread is suspended just before its handle manager initialization to
+# allow time for the binlog thread to call mysql_manager_submit. The fix
+# associated with this test should enforce that the binlog background thread is
+# not created before the handle manager is initialized.
+#
+# References:
+# MDEV-26473 mysqld got exception 0xc0000005 (rpl_slave_state/rpl_load_gtid_slave_state)
+#
+
+--source include/have_debug.inc
+--source include/master-slave.inc
+
+# The race condition discovered from MDEV-26473 is binlog format independent.
+# We use ROW format though because it was used by the reporter.
+--source include/have_binlog_format_row.inc
+
+--connection master
+
+--echo # Create a GTID event so the binlog background thread will submit a
+--echo # mysql handler job the next time mysqld is restarted.
+create table t1 (a int);
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+
+--echo # Set a debug point that forces the main mysqld thread to sleep before
+--echo # anything is initialized for the mysql handle manager
+--let $rpl_server_parameters=--debug_dbug="+d,delay_start_handle_manager"
+
+
+--echo # Restart the slave mysqld instance so it re-initializes with the
+--echo # binlog background thread submitting a mysql handler job and the
+--echo # mysql handler initialization suspending for a second. Without the fix
+--echo # associated with this test/patch, the following restart will error
+--echo # with a failed assertion.
+--source include/rpl_restart_server.inc
+--source include/start_slave.inc
+
+
+--echo #
+--echo # Cleanup
+--echo #
+
+--connection master
+drop table t1;
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
index 0b10dd3cda7..f5e48282326 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
@@ -21,6 +21,10 @@ SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
SET GLOBAL slave_parallel_mode='optimistic';
+# Run the first part of the test with high batch size and see that
+# old rows remain in the table.
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 1000000;
--connection server_1
@@ -108,7 +112,12 @@ SELECT * FROM t3 ORDER BY c;
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
SELECT * FROM t3 ORDER BY c;
-#SHOW STATUS LIKE 'Slave_retried_transactions';
+# Check that we have a bunch of old rows left-over - they were not deleted
+# due to high @@gtid_cleanup_batch_size. Then set a low
+# @@gtid_cleanup_batch_size so we can test that rows start being deleted.
+SELECT IF(COUNT(*) >= 30, "OK", CONCAT("Error: too few old rows found: ", COUNT(*)))
+ FROM mysql.gtid_slave_pos;
+SET GLOBAL gtid_cleanup_batch_size=1;
--echo *** Test @@skip_parallel_replication. ***
@@ -557,25 +566,18 @@ DROP TABLE t1, t2, t3;
--connection server_2
--source include/sync_with_master_gtid.inc
-# Check for left-over rows in table mysql.gtid_slave_pos (MDEV-12147).
-#
-# There was a bug when a transaction got a conflict and was rolled back. It
-# might have also handled deletion of some old rows, and these deletions would
-# then also be rolled back. And since the deletes were never re-tried, old no
-# longer needed rows would accumulate in the table without limit.
-#
-# The earlier part of this test file have plenty of transactions being rolled
-# back. But the last DROP TABLE statement runs on its own and should never
-# conflict, thus at this point the mysql.gtid_slave_pos table should be clean.
-#
-# To support @@gtid_pos_auto_engines, when a row is inserted in the table, it
-# is associated with the engine of the table at insertion time, and it will
-# only be deleted during record_gtid from a table of the same engine. Since we
-# alter the table from MyISAM to InnoDB at the start of this test, we should
-# end up with 4 rows: two left-over from when the table was MyISAM, and two
-# left-over from the InnoDB part.
---echo Check that no more than the expected last four GTIDs are in mysql.gtid_slave_pos
-select count(4) <= 4 from mysql.gtid_slave_pos order by domain_id, sub_id;
+# Check that old rows are deleted from mysql.gtid_slave_pos.
+# Deletion is asynchronous, so use wait_condition.inc.
+# Also, there is a small amount of non-determinism in the deletion of old
+# rows, so it is not guaranteed that there can never be more than
+# @@gtid_cleanup_batch_size rows in the table; so allow a bit of slack
+# here.
+let $wait_condition=
+ SELECT COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
+ FROM mysql.gtid_slave_pos;
+--source include/wait_condition.inc
+eval $wait_condition;
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
--connection server_1
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_retry.test b/mysql-test/suite/rpl/t/rpl_parallel_retry.test
index 0140784c8b9..97a3a709eb5 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_retry.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_retry.test
@@ -426,8 +426,8 @@ SET @old_dbug= @@GLOBAL.debug_dbug;
SET @@GLOBAL.debug_dbug="+d,rpl_parallel_simulate_wait_at_retry";
--source include/start_slave.inc
---echo # Make sure the 2nd seqno_1001 worker has gotten to waiting
---let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE '%debug sync point: now%';
+--echo # Make sure both workers are waiting at their sync points
+--let $wait_condition= SELECT count(*)=2 FROM information_schema.processlist WHERE state LIKE '%debug sync point%';
--source include/wait_condition.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_001.test b/mysql-test/suite/rpl/t/rpl_row_001.test
index 06d01f2476e..f66c61ffb6e 100644
--- a/mysql-test/suite/rpl/t/rpl_row_001.test
+++ b/mysql-test/suite/rpl/t/rpl_row_001.test
@@ -2,10 +2,50 @@
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
########################################################
-- source include/have_binlog_format_row.inc
-# Slow test, don't run during staging part
--- source include/not_staging.inc
-- source include/master-slave.inc
-let $engine_type=MYISAM;
--- source include/rpl_row_001.test
+# Test if the slave SQL thread can be more than 16K behind the slave
+# I/O thread (> IO_SIZE)
+
+# we'll use table-level locking to delay slave SQL thread
+eval CREATE TABLE t1 (n INT);
+sync_slave_with_master;
+connection master;
+RESET MASTER;
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
+
+connection master;
+let $1=5000;
+# Generate 16K of relay log
+disable_query_log;
+while ($1)
+{
+ eval INSERT INTO t1 VALUES($1);
+ dec $1;
+}
+enable_query_log;
+SELECT COUNT(*) FROM t1;
+save_master_pos;
+
+# Try to cause a large relay log lag on the slave by locking t1
+connection slave;
+LOCK TABLES t1 READ;
+START SLAVE;
+UNLOCK TABLES;
+sync_with_master;
+SELECT COUNT(*) FROM t1;
+
+connection master;
+DROP TABLE t1;
+CREATE TABLE t1 (n INT);
+INSERT INTO t1 VALUES(3456);
+sync_slave_with_master;
+SELECT n FROM t1;
+
+connection master;
+DROP TABLE t1;
+
+sync_slave_with_master;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.cnf b/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.cnf
new file mode 100644
index 00000000000..2cf1b1786bd
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.cnf
@@ -0,0 +1,14 @@
+!include ../my.cnf
+
+[mysqld.1]
+log_warnings=9
+
+[mysqld.2]
+log_warnings=9
+
+[mysqld.3]
+log_warnings=9
+
+[ENV]
+SERVER_MYPORT_3= @mysqld.3.port
+SERVER_MYSOCK_3= @mysqld.3.socket
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.inc b/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.inc
new file mode 100644
index 00000000000..a232f68540d
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.inc
@@ -0,0 +1,163 @@
+#
+# Helper file to ensure that a primary waits for all ACKS (or timeout) from its
+# replicas before shutting down.
+#
+# Parameters:
+# server_1_dbug (string) Debug setting for primary (server 1)
+# server_2_dbug (string) Debug setting to simulate delay or error on
+# the first replica (server 2)
+# server_3_dbug (string) Debug setting to simulate delay or error on
+# the second replica (server 3)
+# semisync_timeout (int) Rpl_semi_sync_master_timeout to use
+# server_2_expect_row_count (int) The number of rows expected on the first
+# replica after the shutdown
+# server_3_expect_row_count (int) The number of rows expected on the second
+# replica after the shutdown
+#
+
+--connection server_1
+let $log_error_file= `SELECT @@GLOBAL.log_error`;
+
+--echo #--
+--echo #-- Semi-sync Setup
+
+--connection server_1
+--save_master_pos
+
+echo #-- Enable semi-sync on slaves
+let slave_last= 3;
+--let i= 2
+while (`SELECT $i <= $slave_last`)
+{
+ --connection server_$i
+ --sync_with_master
+
+ set global rpl_semi_sync_slave_enabled = 1;
+ source include/stop_slave.inc;
+ source include/start_slave.inc;
+ show status like 'Rpl_semi_sync_slave_status';
+
+ --inc $i
+}
+
+--echo #-- Enable semi-sync on master
+--connection server_1
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
+--eval set @@global.rpl_semi_sync_master_timeout= $semisync_timeout
+
+--echo #-- Wait for master to recognize semi-sync slaves
+--connection server_1
+let $status_var= Rpl_semi_sync_master_clients;
+let $status_var_value= 2;
+source include/wait_for_status_var.inc;
+
+--echo #-- Master should have semi-sync enabled with 2 connections
+show status like 'Rpl_semi_sync_master_status';
+show status like 'Rpl_semi_sync_master_clients';
+
+--echo #-- Prepare servers to simulate delay or error
+--connection server_1
+--eval SET @@GLOBAL.debug_dbug= $server_1_dbug
+--connection server_2
+--eval SET @@GLOBAL.debug_dbug= $server_2_dbug
+--connection server_3
+--eval SET @@GLOBAL.debug_dbug= $server_3_dbug
+
+--echo #--
+--echo #-- Test begins
+
+--connection server_1
+--echo #-- Begin semi-sync transaction
+--send INSERT INTO t1 VALUES (1)
+
+--connection server_1_con2
+--echo #-- Wait until master recognizes a connection is awaiting semi-sync ACK
+let $status_var= Rpl_semi_sync_master_wait_sessions;
+let $status_var_value= 1;
+source include/wait_for_status_var.inc;
+show status like 'Rpl_semi_sync_master_wait_sessions';
+
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+wait
+EOF
+
+--echo #-- Give enough time after timeout/ack received to query yes_tx/no_tx
+SET @@GLOBAL.debug_dbug= "+d,delay_shutdown_phase_2_after_semisync_wait";
+
+--echo #-- Begin master shutdown
+--send SHUTDOWN WAIT FOR ALL SLAVES
+
+--connection server_1
+--reap
+--echo #-- Ensure either ACK was received (yes_tx=1) or timeout (no_tx=1)
+show status like 'Rpl_semi_sync_master_yes_tx';
+show status like 'Rpl_semi_sync_master_no_tx';
+
+--connection server_1_con2
+--reap
+--source include/wait_until_disconnected.inc
+
+--echo # Check logs to ensure shutdown was delayed
+--let SEARCH_FILE=$log_error_file
+--let SEARCH_PATTERN=Delaying shutdown to await semi-sync ACK
+--source include/search_pattern_in_file.inc
+
+--echo # Validate slave data is in correct state
+--connection server_2
+--eval select count(*)=$server_2_expect_row_count from t1
+--connection server_3
+--eval select count(*)=$server_3_expect_row_count from t1
+
+--echo #
+--echo #-- Re-synchronize slaves with master and disable semi-sync
+
+--echo #-- Stop slaves
+
+--connection server_2
+--eval SET @@GLOBAL.debug_dbug= "$sav_server_2_dbug"
+--eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0
+source include/stop_slave.inc;
+
+--connection server_3
+--eval SET @@GLOBAL.debug_dbug= "$sav_server_3_dbug"
+--eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0
+source include/stop_slave.inc;
+
+--echo #-- Bring the master back up
+--connection server_1_con2
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+restart
+EOF
+
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--connection default
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--connection server_1
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--eval SET @@GLOBAL.debug_dbug= "$sav_master_dbug"
+let $status_var= Rpl_semi_sync_master_clients;
+let $status_var_value= 0;
+source include/wait_for_status_var.inc;
+--eval SET @@GLOBAL.rpl_semi_sync_master_enabled = 0
+show status like 'Rpl_semi_sync_master_status';
+
+TRUNCATE TABLE t1;
+--save_master_pos
+
+--echo #-- Bring slaves back up
+--let i= 2
+while (`SELECT $i <= $slave_last`)
+{
+ --connection server_$i
+ source include/start_slave.inc;
+ show status like 'Rpl_semi_sync_slave_status';
+ --sync_with_master
+ SELECT COUNT(*)=0 from t1;
+ --inc $i
+}
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.test b/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.test
new file mode 100644
index 00000000000..5e9cda6466e
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.test
@@ -0,0 +1,214 @@
+#
+# Purpose:
+# This test validates that data is consistent between a primary and replica
+# in semi-sync mode when the primary is issued `SHUTDOWN WAIT FOR SLAVES`
+# during an active communication. More specifically, the primary should not
+# kill the connection until it is sure a replica has received all binlog
+# data, i.e. once the primary receives the ACK. If a primary is issued a
+# shutdown before receiving an ACK, it should wait until either 1) the ACK is
+# received, or 2) the configured timeout (rpl_semi_sync_master_timeout) is
+# reached.
+#
+# Methodology:
+# Using a topology consisting of one primary with two replicas, all in
+# semi-sync mode, we use DEBUG_DBUG to simulate an error or delay on the
+# replicas during an active communication while the primary is issued
+# `SHUTDOWN WAIT FOR SLAVES`. We create four test cases to ensure the primary
+# will correctly wait for the communication to finish, and use the semi-sync
+# status variables Rpl_semi_sync_master_yes_tx and Rpl_semi_sync_master_no_tx
+# to ensure the connection was not prematurely killed due to the shutdown.
+# Test Case 1) If both replicas simulate a delay that is within the allowed
+# timeout, the primary should delay killing the suspended thread
+# until an ACK is received (Rpl_semi_sync_master_yes_tx should
+# be 1).
+# Test Case 2) If both replicas simulate an error before sending an ACK, the
+# primary should delay killing the suspended thread until the
+# the timeout is reached (Rpl_semi_sync_master_no_tx should be
+# 1).
+# Test Case 3) If one replica simulates a delay within the allowed timeout
+# and the other simulates an error before sending an ACK, the
+# primary should delay killing the suspended thread until it
+# receives an ACK from the delayed slave
+# (Rpl_semi_sync_master_yes_tx should be 1).
+# Test Case 4) If a replica errors before sending an ACK, it will cause the
+# IO thread to stop and handle the error. During error handling,
+# if semi-sync is active, the replica will form a new connection
+# with the primary to kill the active connection. However, if
+# the primary is shutting down, it may kill the new connection,
+# thereby leaving the active semi-sync connection in-tact. The
+# slave should notice this, and not issue a `QUIT` command to
+# the primary, which would otherwise be sent to kill an active
+# connection. This test case validates that the slave does not
+# send a `QUIT` in this case (Rpl_semi_sync_master_yes_tx should
+# be 1 because server_3 will send the ACK within a valid
+# timeout).
+#
+# References:
+# MDEV-11853: semisync thread can be killed after sync binlog but before ACK
+# in the sync state
+# MDEV-28114: Semi-sync Master ACK Receiver Thread Can Error on COM_QUIT
+#
+
+--echo #############################
+--echo # Common setup for all tests
+--echo #############################
+
+--echo # Note: Simulated slave delay is hardcoded to 800 milliseconds
+--echo # Note: Simulated master shutdown delay is hardcoded to 500 milliseconds
+
+--source include/have_debug.inc
+--let $rpl_topology=1->2, 1->3
+--source include/rpl_init.inc
+
+--connection server_1
+
+--echo # Slaves which simulate an error will produce a timeout on the primary
+call mtr.add_suppression("Timeout waiting");
+call mtr.add_suppression("did not exit");
+
+--let $sav_master_timeout= `SELECT @@global.rpl_semi_sync_master_timeout`
+--let $sav_enabled_master= `SELECT @@GLOBAL.rpl_semi_sync_master_enabled`
+--let $sav_master_dbug= `SELECT @@GLOBAL.debug_dbug`
+
+--echo # Suppress slave errors related to the simulated error
+--connection server_2
+call mtr.add_suppression("reply failed");
+call mtr.add_suppression("Replication event checksum verification");
+call mtr.add_suppression("Relay log write failure");
+call mtr.add_suppression("Failed to kill the active semi-sync connection");
+--let $sav_enabled_server_2=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled`
+--let $sav_server_2_dbug= `SELECT @@GLOBAL.debug_dbug`
+
+--connection server_3
+call mtr.add_suppression("reply failed");
+call mtr.add_suppression("Replication event checksum verification");
+call mtr.add_suppression("Relay log write failure");
+call mtr.add_suppression("Failed to kill the active semi-sync connection");
+--let $sav_enabled_server_3=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled`
+--let $sav_server_3_dbug= `SELECT @@GLOBAL.debug_dbug`
+
+--connection server_1
+CREATE TABLE t1 (a int);
+--save_master_pos
+
+--let i= 2
+--let slave_last= 3
+while (`SELECT $i <= $slave_last`)
+{
+ --connection server_$i
+ --sync_with_master
+ --inc $i
+}
+
+# Set up the connection used to issue the shutdown
+--connect(server_1_con2, localhost, root,,)
+
+
+--echo #############################
+--echo # Test cases
+--echo #############################
+
+--echo #
+--echo # Test Case 1) If both replicas simulate a delay that is within the
+--echo # allowed timeout, the primary should delay killing the suspended thread
+--echo # until an ACK is received (Rpl_semi_sync_master_yes_tx should be 1).
+--echo #
+--let server_1_dbug= ""
+--let server_2_dbug= "+d,simulate_delay_semisync_slave_reply"
+--let server_3_dbug= "+d,simulate_delay_semisync_slave_reply"
+--let semisync_timeout= 1600
+--let server_2_expect_row_count= 1
+--let server_3_expect_row_count= 1
+--source rpl_semi_sync_shutdown_await_ack.inc
+
+--echo #
+--echo # Test Case 2) If both replicas simulate an error before sending an ACK,
+--echo # the primary should delay killing the suspended thread until the
+--echo # timeout is reached (Rpl_semi_sync_master_no_tx should be 1).
+--echo #
+--let server_1_dbug= "+d,mysqld_delay_kill_threads_phase_1"
+--let server_2_dbug= "+d,corrupt_queue_event"
+--let server_3_dbug= "+d,corrupt_queue_event"
+--let semisync_timeout= 500
+--let server_2_expect_row_count= 0
+--let server_3_expect_row_count= 0
+--source rpl_semi_sync_shutdown_await_ack.inc
+
+--echo #
+--echo # Test Case 3) If one replica simulates a delay within the allowed
+--echo # timeout and the other simulates an error before sending an ACK, the
+--echo # primary should delay killing the suspended thread until it receives an
+--echo # ACK from the delayed slave (Rpl_semi_sync_master_yes_tx should be 1).
+--echo #
+--let server_1_dbug= "+d,mysqld_delay_kill_threads_phase_1"
+--let server_2_dbug= "+d,corrupt_queue_event"
+--let server_3_dbug= "+d,simulate_delay_semisync_slave_reply"
+--let semisync_timeout= 1600
+--let server_2_expect_row_count= 0
+--let server_3_expect_row_count= 1
+--source rpl_semi_sync_shutdown_await_ack.inc
+
+--echo #
+--echo # Test Case 4) If a replica errors before sending an ACK, it will cause
+--echo # the IO thread to stop and handle the error. During error handling, if
+--echo # semi-sync is active, the replica will form a new connection with the
+--echo # primary to kill the active connection. However, if the primary is
+--echo # shutting down, it may kill the new connection, thereby leaving the
+--echo # active semi-sync connection in-tact. The slave should notice this, and
+--echo # not issue a `QUIT` command to the primary, which would otherwise be
+--echo # sent to kill an active connection. This test case validates that the
+--echo # slave does not send a `QUIT` in this case (Rpl_semi_sync_master_yes_tx
+--echo # should be 1 because server_3 will send the ACK within a valid timeout).
+--echo #
+
+# mysqld_delay_kill_threads_phase1 ensures that server_2 will have enough time
+# to start a new connection that has the intent to kill the active semi-sync
+# connection
+--let server_1_dbug= "+d,mysqld_delay_kill_threads_phase_1"
+
+# slave_delay_killing_semisync_connection ensures that the primary has force
+# killed its current connection before it is able to issue `KILL`
+--let server_2_dbug= "+d,corrupt_queue_event,slave_delay_killing_semisync_connection"
+--let server_3_dbug= "+d,simulate_delay_semisync_slave_reply"
+--let semisync_timeout= 1600
+--let server_2_expect_row_count= 0
+--let server_3_expect_row_count= 1
+--source rpl_semi_sync_shutdown_await_ack.inc
+
+--echo #############################
+--echo # Cleanup
+--echo #############################
+
+--connection server_2
+source include/stop_slave.inc;
+source include/start_slave.inc;
+
+--disable_query_log
+--eval SET @@GLOBAL.rpl_semi_sync_slave_enabled = $sav_enabled_server_2
+--eval SET @@GLOBAL.debug_dbug= "$sav_server_2_dbug"
+--enable_query_log
+
+--connection server_3
+source include/stop_slave.inc;
+source include/start_slave.inc;
+
+--disable_query_log
+--eval SET @@GLOBAL.rpl_semi_sync_slave_enabled = $sav_enabled_server_3
+--eval SET @@GLOBAL.debug_dbug= "$sav_server_3_dbug"
+--enable_query_log
+
+
+--connection server_1
+let $status_var= Rpl_semi_sync_master_clients;
+let $status_var_value= 0;
+source include/wait_for_status_var.inc;
+
+--disable_query_log
+--eval SET @@GLOBAL.rpl_semi_sync_master_timeout= $sav_master_timeout
+--eval SET @@GLOBAL.rpl_semi_sync_master_enabled= $sav_enabled_master
+--eval SET @@GLOBAL.debug_dbug= "$sav_master_dbug"
+--enable_query_log
+
+drop table t1;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf b/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf
new file mode 100644
index 00000000000..8ff9df0384d
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.cnf
@@ -0,0 +1,16 @@
+!include ../my.cnf
+
+[mysqld.1]
+log_warnings=3
+[mysqld.2]
+
+[mysqld.3]
+
+[mysqld.4]
+
+[ENV]
+SERVER_MYPORT_3= @mysqld.3.port
+SERVER_MYSOCK_3= @mysqld.3.socket
+
+SERVER_MYPORT_4= @mysqld.4.port
+SERVER_MYSOCK_4= @mysqld.4.socket
diff --git a/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.test b/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.test
new file mode 100644
index 00000000000..2c63df30fde
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_shutdown_wait_semisync_slaves.test
@@ -0,0 +1,46 @@
+#
+# MDEV-18450 "Slow" shutdown to wait for slaves that are to be fed
+# with everything in the master binlog before shutdown completes.
+#
+# This is a semisync version of basic tests.
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--let $rpl_topology=1->2, 1->3, 1->4
+--source include/rpl_init.inc
+
+--connection server_1
+call mtr.add_suppression("Timeout waiting for reply of binlog");
+--let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled`
+SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
+
+--let slaves= 3
+--let i= 2
+while (`SELECT $i <= $slaves`)
+{
+ --connection server_$i
+ --let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled`
+ set global rpl_semi_sync_slave_enabled = 1;
+
+ source include/stop_slave.inc;
+ source include/start_slave.inc;
+ set global rpl_semi_sync_slave_enabled = 1;
+
+ --inc $i
+}
+
+--source include/rpl_shutdown_wait_slaves.inc
+--let i= 2
+while (`SELECT $i <= $slaves`)
+{
+ --connection server_$i
+ source include/stop_slave.inc;
+ source include/start_slave.inc;
+ --eval SET @@GLOBAL.rpl_semi_sync_slave_enabled = $sav_enabled_slave;
+
+ --inc $i
+}
+
+--connection server_1
+--eval SET @@GLOBAL.rpl_semi_sync_master_enabled = $sav_enabled_master
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf b/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf
new file mode 100644
index 00000000000..8ff9df0384d
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.cnf
@@ -0,0 +1,16 @@
+!include ../my.cnf
+
+[mysqld.1]
+log_warnings=3
+[mysqld.2]
+
+[mysqld.3]
+
+[mysqld.4]
+
+[ENV]
+SERVER_MYPORT_3= @mysqld.3.port
+SERVER_MYSOCK_3= @mysqld.3.socket
+
+SERVER_MYPORT_4= @mysqld.4.port
+SERVER_MYSOCK_4= @mysqld.4.socket
diff --git a/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.test b/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.test
new file mode 100644
index 00000000000..97363206776
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_shutdown_wait_slaves.test
@@ -0,0 +1,11 @@
+#
+# MDEV-18450 "Slow" shutdown to wait for slaves that are to be fed
+# with everything in the master binlog before shutdown completes.
+#
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--let $rpl_topology=1->2, 1->3, 1->4
+--source include/rpl_init.inc
+
+--source include/rpl_shutdown_wait_slaves.inc
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test
index 119fd6168e0..62b5c5b1cd0 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_000001.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test
@@ -4,7 +4,6 @@
-- source include/master-slave.inc
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
---let $engine_type= myisam
# Load some data into t1
create table t1 (word char(20) not null);
@@ -19,7 +18,8 @@ select * from t1 limit 10;
sync_slave_with_master;
stop slave;
connection master;
-UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
+create temporary table tmp select * from mysql.global_priv where host="localhost" and user="root";
+set password for root@"localhost" = password('foo');
connection slave;
start slave;
connection master;
@@ -27,7 +27,9 @@ connection master;
# Give slave time to do at last one failed connect retry
# This one must be short so that the slave will not stop retrying
real_sleep 2;
-UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
+replace into mysql.global_priv select * from tmp;
+drop temporary table tmp;
+flush privileges;
# Give slave time to connect (will retry every second)
sleep 2;
@@ -45,7 +47,7 @@ sync_slave_with_master;
connection master;
# we'll use table-level locking to delay slave SQL thread
-eval create table t1 (n int) engine=$engine_type;
+eval create table t1 (n int);
sync_slave_with_master;
connection master;
reset master;
@@ -111,20 +113,6 @@ connection slave;
select count(*) from t1;
connection master1;
drop table t1;
-create table t1 (n int);
-insert into t1 values(3456);
-insert ignore into mysql.user (Host, User, Password)
- VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-sync_slave_with_master;
-select n from t1;
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-connection master1;
-drop table t1;
-delete from mysql.user where user="blafasel2";
-sync_slave_with_master;
# End of 4.1 tests
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_temporal_round.test b/mysql-test/suite/rpl/t/rpl_temporal_round.test
new file mode 100644
index 00000000000..c13c18bddb5
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_temporal_round.test
@@ -0,0 +1,35 @@
+--source include/master-slave.inc
+
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+
+CREATE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES ('2011-01-01 23:59:59.999999');
+
+CREATE TABLE t2 (id SERIAL, a DATETIME(4));
+INSERT INTO t2 (a) VALUES (now(6));
+INSERT INTO t2 (a) VALUES ('2011-01-01 23:59:59.999999');
+
+CREATE TABLE t3 (id SERIAL, a TIME(4));
+INSERT INTO t3 (a) VALUES (now(6));
+INSERT INTO t3 (a) VALUES ('2011-01-01 23:59:59.999999');
+
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+sync_slave_with_master;
+connection slave;
+SET time_zone='+00:00';
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+connection master;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/sql_sequence/alter.result b/mysql-test/suite/sql_sequence/alter.result
index 612e2201d26..90de2ebfcc0 100644
--- a/mysql-test/suite/sql_sequence/alter.result
+++ b/mysql-test/suite/sql_sequence/alter.result
@@ -29,7 +29,7 @@ select * from t1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
3 -100 9223372036854775806 50 1 0 0 0
alter sequence t1 minvalue=100 start=100;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
alter sequence t1 minvalue=100 start=100 restart=100;
show create sequence t1;
Table Create Table
@@ -200,21 +200,20 @@ next_not_cached_value minimum_value maximum_value start_value increment cache_si
drop sequence t1;
CREATE SEQUENCE t1 engine=myisam;
alter sequence t1 minvalue=100;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
drop sequence t1;
CREATE SEQUENCE t1 engine=myisam;
alter sequence t1 minvalue=25 maxvalue=20;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
drop sequence t1;
create table t1 (a int);
alter sequence t1 minvalue=100;
ERROR 42S02: 'test.t1' is not a SEQUENCE
drop table t1;
alter sequence if exists t1 minvalue=100;
-Warnings:
-Note 4091 Unknown SEQUENCE: 'test.t1'
+ERROR 42S02: Unknown SEQUENCE: 't1'
alter sequence t1 minvalue=100;
-ERROR 42S02: Table 'test.t1' doesn't exist
+ERROR 42S02: Unknown SEQUENCE: 't1'
create sequence t1;
alter sequence t1;
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 '' at line 1
diff --git a/mysql-test/suite/sql_sequence/alter.test b/mysql-test/suite/sql_sequence/alter.test
index 53f71018337..a5e6245d609 100644
--- a/mysql-test/suite/sql_sequence/alter.test
+++ b/mysql-test/suite/sql_sequence/alter.test
@@ -119,8 +119,9 @@ create table t1 (a int);
alter sequence t1 minvalue=100;
drop table t1;
+--error ER_UNKNOWN_SEQUENCES
alter sequence if exists t1 minvalue=100;
---error ER_NO_SUCH_TABLE
+--error ER_UNKNOWN_SEQUENCES
alter sequence t1 minvalue=100;
create sequence t1;
diff --git a/mysql-test/suite/sql_sequence/aria.result b/mysql-test/suite/sql_sequence/aria.result
index b39d85d58ca..cfc7d946772 100644
--- a/mysql-test/suite/sql_sequence/aria.result
+++ b/mysql-test/suite/sql_sequence/aria.result
@@ -53,7 +53,7 @@ next value for s1
drop sequence s1;
CREATE SEQUENCE t1;
alter sequence t1 minvalue=100;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
alter sequence t1 minvalue=100 start=100 restart=100;
rename table t1 to t2;
select next value for t2;
diff --git a/mysql-test/suite/sql_sequence/binlog.result b/mysql-test/suite/sql_sequence/binlog.result
index 32788c988fc..843cf74c2fa 100644
--- a/mysql-test/suite/sql_sequence/binlog.result
+++ b/mysql-test/suite/sql_sequence/binlog.result
@@ -17,6 +17,7 @@ Table Op Msg_type Msg_text
test.s1 optimize note The storage engine for the table doesn't support optimize
analyze table s1;
Table Op Msg_type Msg_text
+test.s1 analyze status Engine-independent statistics collected
test.s1 analyze note The storage engine for the table doesn't support analyze
repair table s1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/sql_sequence/create.result b/mysql-test/suite/sql_sequence/create.result
index 5a53a66c9a8..beb1561f9d5 100644
--- a/mysql-test/suite/sql_sequence/create.result
+++ b/mysql-test/suite/sql_sequence/create.result
@@ -167,11 +167,11 @@ drop sequence if exists t1;
Warnings:
Note 4091 Unknown SEQUENCE: 'test.t1'
create sequence t1 start with 10 maxvalue=9;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
create sequence t1 minvalue= 100 maxvalue=10;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
create sequence t1 start with 9 minvalue=10;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
create or replace sequence t1 maxvalue=13, increment by -1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' increment by -1' at line 1
create or replace sequence t1 start with= 10 maxvalue=13;
@@ -183,7 +183,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
create or replace sequence t1 start with 10 min_value=1 NO MINVALUE;
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 'NO MINVALUE' at line 1
create sequence t1 start with 10 maxvalue=9223372036854775807;
-ERROR HY000: Sequence 'test.t1' values are conflicting
+ERROR HY000: Sequence 'test.t1' has out of range value for options
create sequence t1 start with 10 minvalue=-9223372036854775808;
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 '9223372036854775808' at line 1
create sequence t1 RESTART WITH 10;
@@ -478,7 +478,7 @@ next value for t1
1
drop temporary table t1;
select previous value for t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
+ERROR 42S02: Unknown SEQUENCE: 't1'
CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 10 increment by 1 cache 10;
select next value for t1;
next value for t1
@@ -507,7 +507,7 @@ next value for t1
1
drop temporary table t1;
select previous value for t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
+ERROR 42S02: Unknown SEQUENCE: 't1'
CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 10 increment by 1 cache 10 engine=innodb;
select next value for t1;
next value for t1
@@ -687,3 +687,33 @@ set global innodb_force_primary_key=default;
ALTER TABLE s1 ADD PRIMARY KEY (next_not_cached_value);
ERROR HY000: Sequence 'test.s1' table structure is invalid (Sequence tables cannot have any keys)
DROP SEQUENCE s1;
+#
+# Beginning of 10.4 Test
+#
+# MDEV-13005: Fixing bugs in SEQUENCE, part 3
+#
+# Task 1:
+SET @x = PREVIOUS VALUE FOR x;
+ERROR 42S02: Unknown SEQUENCE: 'x'
+# Task 2:
+CREATE SEQUENCE x START WITH 1 INCREMENT BY 123456789012345678;
+ERROR HY000: Sequence 'test.x' has out of range value for options
+# Task 3:
+CREATE SEQUENCE seq1 START WITH 1 cache -1;
+ERROR HY000: Sequence 'test.seq1' has out of range value for options
+# Task 4:
+CREATE TEMPORARY TABLE s1 (s1 INT);
+DROP TEMPORARY SEQUENCE s1;
+ERROR 42S02: 'test.s1' is not a SEQUENCE
+DROP TEMPORARY TABLE s1;
+# Task 5:
+CREATE TEMPORARY TABLE s1 (s1 INT);
+CREATE TEMPORARY SEQUENCE s1 (s1 INT);
+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 '(s1 INT)' at line 1
+DROP TEMPORARY TABLE s1;
+# Task 6:
+CREATE SEQUENCE seq1 START WITH 2;
+CREATE TRIGGER s1 BEFORE UPDATE ON seq1 FOR EACH ROW SET @a= 5;
+ERROR HY000: Trigger's 'seq1' is view, temporary table or sequence
+DROP SEQUENCE seq1;
+# End of 10.4 test
diff --git a/mysql-test/suite/sql_sequence/create.test b/mysql-test/suite/sql_sequence/create.test
index ac3aae845cd..aa58b0c5fec 100644
--- a/mysql-test/suite/sql_sequence/create.test
+++ b/mysql-test/suite/sql_sequence/create.test
@@ -382,7 +382,7 @@ drop view v1;
CREATE TEMPORARY SEQUENCE t1;
select next value for t1;
drop temporary table t1;
---error ER_NO_SUCH_TABLE
+--error ER_UNKNOWN_SEQUENCES
select previous value for t1;
CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 10 increment by 1 cache 10;
select next value for t1;
@@ -398,7 +398,7 @@ drop sequence t1;
CREATE TEMPORARY SEQUENCE t1 engine=innodb;
select next value for t1;
drop temporary table t1;
---error ER_NO_SUCH_TABLE
+--error ER_UNKNOWN_SEQUENCES
select previous value for t1;
CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 10 increment by 1 cache 10 engine=innodb;
select next value for t1;
@@ -515,3 +515,41 @@ set global innodb_force_primary_key=default;
--error ER_SEQUENCE_INVALID_TABLE_STRUCTURE
ALTER TABLE s1 ADD PRIMARY KEY (next_not_cached_value);
DROP SEQUENCE s1;
+
+--echo #
+--echo # Beginning of 10.4 Test
+--echo #
+--echo # MDEV-13005: Fixing bugs in SEQUENCE, part 3
+--echo #
+
+--echo # Task 1:
+--error ER_UNKNOWN_SEQUENCES
+SET @x = PREVIOUS VALUE FOR x;
+
+--echo # Task 2:
+--error ER_SEQUENCE_INVALID_DATA
+CREATE SEQUENCE x START WITH 1 INCREMENT BY 123456789012345678;
+
+--echo # Task 3:
+--error ER_SEQUENCE_INVALID_DATA
+CREATE SEQUENCE seq1 START WITH 1 cache -1;
+
+--echo # Task 4:
+CREATE TEMPORARY TABLE s1 (s1 INT);
+--error ER_NOT_SEQUENCE2
+DROP TEMPORARY SEQUENCE s1;
+DROP TEMPORARY TABLE s1;
+
+--echo # Task 5:
+CREATE TEMPORARY TABLE s1 (s1 INT);
+--error ER_PARSE_ERROR
+CREATE TEMPORARY SEQUENCE s1 (s1 INT);
+DROP TEMPORARY TABLE s1;
+
+--echo # Task 6:
+CREATE SEQUENCE seq1 START WITH 2;
+--error ER_TRG_ON_VIEW_OR_TEMP_TABLE
+CREATE TRIGGER s1 BEFORE UPDATE ON seq1 FOR EACH ROW SET @a= 5;
+DROP SEQUENCE seq1;
+
+--echo # End of 10.4 test
diff --git a/mysql-test/suite/sql_sequence/gtid.result b/mysql-test/suite/sql_sequence/gtid.result
index 8ca9a397354..495e4b806b7 100644
--- a/mysql-test/suite/sql_sequence/gtid.result
+++ b/mysql-test/suite/sql_sequence/gtid.result
@@ -109,28 +109,28 @@ maxvalue 100000
increment by 1
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
create sequence s2 start with 1
minvalue 5
maxvalue 5
increment by 1
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
create sequence s2 start with 1
minvalue 5
maxvalue 4
increment by 1
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
create sequence s2 start with 1
minvalue 5
maxvalue 4
increment by 0
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
###########################################
global read lock prevent query sequence
###########################################
@@ -314,7 +314,7 @@ next_not_cached_value minimum_value maximum_value start_value increment cache_si
update s_t set next_not_cached_value= 11,start_value=10, minimum_value=11;
ERROR HY000: Storage engine SEQUENCE of the table `s_db`.`s_t` doesn't have this option
ALTER SEQUENCE s_t restart with 11 start=10 minvalue=11;
-ERROR HY000: Sequence 's_db.s_t' values are conflicting
+ERROR HY000: Sequence 's_db.s_t' has out of range value for options
commit;
create table t_1(id int);
insert into t_1 value(1111);
diff --git a/mysql-test/suite/sql_sequence/next.result b/mysql-test/suite/sql_sequence/next.result
index 76991fbe68c..9d55921006b 100644
--- a/mysql-test/suite/sql_sequence/next.result
+++ b/mysql-test/suite/sql_sequence/next.result
@@ -387,7 +387,7 @@ previous value for t1
1
drop sequence t1;
select previous value for t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
+ERROR 42S02: Unknown SEQUENCE: 't1'
CREATE SEQUENCE t1 start with 5 minvalue 1 maxvalue 10 increment by 1 cache 5 cycle;
select previous value for t1;
previous value for t1
diff --git a/mysql-test/suite/sql_sequence/next.test b/mysql-test/suite/sql_sequence/next.test
index 9f0eebdf774..a80f9fad561 100644
--- a/mysql-test/suite/sql_sequence/next.test
+++ b/mysql-test/suite/sql_sequence/next.test
@@ -166,7 +166,7 @@ select previous value for t1;
flush tables;
select previous value for t1;
drop sequence t1;
---error ER_NO_SUCH_TABLE
+--error ER_UNKNOWN_SEQUENCES
select previous value for t1;
CREATE SEQUENCE t1 start with 5 minvalue 1 maxvalue 10 increment by 1 cache 5 cycle;
select previous value for t1;
diff --git a/mysql-test/suite/sql_sequence/other.result b/mysql-test/suite/sql_sequence/other.result
index 643233149d2..8ac766702d3 100644
--- a/mysql-test/suite/sql_sequence/other.result
+++ b/mysql-test/suite/sql_sequence/other.result
@@ -50,9 +50,9 @@ ERROR HY000: Field 'maximum_value' doesn't have a default value
insert into s1 values (next value for s1, 1,9223372036854775806,1,1,1000,0,0);
ERROR HY000: Table 's1' is specified twice, both as a target for 'INSERT' and as a separate source for data
insert into s1 values(1000,9223372036854775806,1,1,1,1000,0,0);
-ERROR HY000: Sequence 'test.s1' values are conflicting
+ERROR HY000: Sequence 'test.s1' has out of range value for options
insert into s1 values(0,9223372036854775806,1,1,1,1000,0,0);
-ERROR HY000: Sequence 'test.s1' values are conflicting
+ERROR HY000: Sequence 'test.s1' has out of range value for options
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 1000 0 0
@@ -67,7 +67,7 @@ select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
2000 1 9223372036854775806 1 1 1000 0 0
insert into s2 values(0, 1, 10, 1, 2, 1, 1, 0);
-ERROR HY000: Sequence 'test.s2' values are conflicting
+ERROR HY000: Sequence 'test.s2' has out of range value for options
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
2000 1 9223372036854775806 1 1 1000 0 0
diff --git a/mysql-test/suite/sql_sequence/read_only.result b/mysql-test/suite/sql_sequence/read_only.result
index 38edcc0894b..cd8d498bb81 100644
--- a/mysql-test/suite/sql_sequence/read_only.result
+++ b/mysql-test/suite/sql_sequence/read_only.result
@@ -1,4 +1,5 @@
create sequence s1 cache 2 engine=innodb;
+# restart: --innodb-read-only
connection default;
show global variables like 'innodb_read_only';
Variable_name Value
@@ -26,6 +27,7 @@ ERROR HY000: Table 's1' is read only
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 2 0 0
+# restart
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 2 0 0
diff --git a/mysql-test/suite/sql_sequence/rebuild.result b/mysql-test/suite/sql_sequence/rebuild.result
index a7f231d5253..80ac6fa34f3 100644
--- a/mysql-test/suite/sql_sequence/rebuild.result
+++ b/mysql-test/suite/sql_sequence/rebuild.result
@@ -48,6 +48,7 @@ INNODB_TRX
KEYWORDS
KEY_CACHES
KEY_COLUMN_USAGE
+OPTIMIZER_TRACE
PARAMETERS
PARTITIONS
PLUGINS
@@ -109,13 +110,13 @@ file_summary_by_event_name
file_summary_by_instance
func
general_log
+global_priv
global_suppressions
gtid_slave_pos
help_category
help_keyword
help_relation
help_topic
-host
host_cache
hosts
index_stats
@@ -158,6 +159,5 @@ time_zone_name
time_zone_transition
time_zone_transition_type
transaction_registry
-user
users
DROP TABLE t1, t2, s1;
diff --git a/mysql-test/suite/sql_sequence/replication.result b/mysql-test/suite/sql_sequence/replication.result
index 7bf0eac8c47..c429b74b4cd 100644
--- a/mysql-test/suite/sql_sequence/replication.result
+++ b/mysql-test/suite/sql_sequence/replication.result
@@ -227,28 +227,28 @@ maxvalue 100000
increment by 1
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
create sequence s2 start with 1
minvalue 5
maxvalue 5
increment by 1
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
create sequence s2 start with 1
minvalue 5
maxvalue 4
increment by 1
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
create sequence s2 start with 1
minvalue 5
maxvalue 4
increment by 0
nocache
nocycle;
-ERROR HY000: Sequence 's_db.s2' values are conflicting
+ERROR HY000: Sequence 's_db.s2' has out of range value for options
###########################################
global read lock prevent query sequence
###########################################
@@ -412,12 +412,12 @@ select * from s_t;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
16 1 20 1 1 5 1 0
alter sequence s_t minvalue=11 maxvalue=9;
-ERROR HY000: Sequence 's_db.s_t' values are conflicting
+ERROR HY000: Sequence 's_db.s_t' has out of range value for options
select * from s_t;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
16 1 20 1 1 5 1 0
alter sequence s_t restart= 12 start=10 minvalue=11 maxvalue=20;
-ERROR HY000: Sequence 's_db.s_t' values are conflicting
+ERROR HY000: Sequence 's_db.s_t' has out of range value for options
select * from s_t;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
16 1 20 1 1 5 1 0
diff --git a/mysql-test/suite/sys_vars/inc/sysvars_server.inc b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
index 36b41cbdc09..025f8a8922d 100644
--- a/mysql-test/suite/sys_vars/inc/sysvars_server.inc
+++ b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
@@ -23,7 +23,7 @@ select VARIABLE_NAME,VARIABLE_SCOPE,VARIABLE_TYPE,VARIABLE_COMMENT,NUMERIC_MIN_V
variable_name not like 'wsrep%' and
variable_name not like 's3%' and
variable_name not in (
- 'log_tc_size'
+ 'log_tc_size','have_sanitizer'
)
order by variable_name;
diff --git a/mysql-test/suite/sys_vars/r/histogram_size_basic.result b/mysql-test/suite/sys_vars/r/histogram_size_basic.result
index ed01fae787d..b4630cb2746 100644
--- a/mysql-test/suite/sys_vars/r/histogram_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/histogram_size_basic.result
@@ -7,11 +7,11 @@ SELECT @start_global_value = @start_session_value;
SET @@global.histogram_size = DEFAULT;
SELECT @@global.histogram_size;
@@global.histogram_size
-0
+254
SET @@session.histogram_size = DEFAULT;
SELECT @@session.histogram_size;
@@session.histogram_size
-0
+254
'#--------------------FN_DYNVARS_053_03-------------------------#'
SET @@global.histogram_size = 1;
SELECT @@global.histogram_size;
diff --git a/mysql-test/suite/sys_vars/r/histogram_type_basic.result b/mysql-test/suite/sys_vars/r/histogram_type_basic.result
index f688a2a15fd..db42204ac1f 100644
--- a/mysql-test/suite/sys_vars/r/histogram_type_basic.result
+++ b/mysql-test/suite/sys_vars/r/histogram_type_basic.result
@@ -1,16 +1,16 @@
SET @start_global_value = @@global.histogram_type;
SELECT @start_global_value;
@start_global_value
-SINGLE_PREC_HB
+DOUBLE_PREC_HB
SET @start_session_value = @@session.histogram_type;
SELECT @start_session_value;
@start_session_value
-SINGLE_PREC_HB
+DOUBLE_PREC_HB
SET @@global.histogram_type = 1;
SET @@global.histogram_type = DEFAULT;
SELECT @@global.histogram_type;
@@global.histogram_type
-SINGLE_PREC_HB
+DOUBLE_PREC_HB
SET @@global.histogram_type = 0;
SELECT @@global.histogram_type;
@@global.histogram_type
@@ -71,9 +71,9 @@ HISTOGRAM_TYPE DOUBLE_PREC_HB
SET @@global.histogram_type = @start_global_value;
SELECT @@global.histogram_type;
@@global.histogram_type
-SINGLE_PREC_HB
+DOUBLE_PREC_HB
SET @@session.histogram_type = @start_session_value;
SELECT @@session.histogram_type;
@@session.histogram_type
-SINGLE_PREC_HB
+DOUBLE_PREC_HB
set sql_mode='';
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_abort_loads.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_abort_loads.result
index 1e2beea707e..55dc9a9d57a 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_abort_loads.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_abort_loads.result
@@ -40,6 +40,7 @@ INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,
SET GLOBAL innodb_buffer_pool_dump_now=1;
# Restart server
+# restart
# Abort after 16 pages
SET GLOBAL innodb_buffer_pool_load_pages_abort=16,
@@ -54,6 +55,7 @@ INNODB_BUFFER_POOL_LOAD_INCOMPLETE ON
INNODB_BUFFER_POOL_LOAD_STATUS Buffer pool(s) load aborted on request
# Restart server
+# restart
# Load buffer pool
SET GLOBAL innodb_buffer_pool_load_now=1;
@@ -82,6 +84,7 @@ INNODB_BUFFER_POOL_DUMP_STATUS Buffer pool(s) dump completed at
INNODB_BUFFER_POOL_LOAD_INCOMPLETE OFF
# Restart server
+# restart
# Load buffer pool
SET GLOBAL innodb_buffer_pool_load_now=1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result
index ad329cd336f..d16e8d446d3 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result
@@ -16,4 +16,5 @@ SET GLOBAL innodb_buffer_pool_dump_at_shutdown = "string";
Got one of the listed errors
SET GLOBAL innodb_buffer_pool_dump_at_shutdown = 5;
Got one of the listed errors
+# restart
SET GLOBAL innodb_buffer_pool_dump_at_shutdown = default;
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result
index e50890a341c..6c5068956b9 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result
@@ -50,3 +50,4 @@ COUNT(@@GLOBAL.innodb_buffer_pool_size)
1 Expected
SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size;
ERROR 42S22: Unknown column 'innodb_buffer_pool_size' in 'field list'
+# restart
diff --git a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
index 912acb69ab0..5a9c201f494 100644
--- a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
@@ -12,43 +12,51 @@ SELECT @@global.innodb_checksum_algorithm;
strict_crc32
SET GLOBAL innodb_checksum_algorithm = 'innodb';
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
innodb
SET GLOBAL innodb_checksum_algorithm = 'strict_innodb';
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_innodb
SET GLOBAL innodb_checksum_algorithm = 'none';
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
none
SET GLOBAL innodb_checksum_algorithm = 'strict_none';
Warnings:
-Warning 138 Setting innodb_checksum_algorithm to values other than crc32 or strict_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
+Warning 138 Setting innodb_checksum_algorithm to values other than crc32, full_crc32, strict_crc32 or strict_full_crc32 is UNSAFE and DEPRECATED. These deprecated values will be disallowed in MariaDB 10.6.
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_none
+SET GLOBAL innodb_checksum_algorithm = 'full_crc32';
+SELECT @@global.innodb_checksum_algorithm;
+@@global.innodb_checksum_algorithm
+full_crc32
+SET GLOBAL innodb_checksum_algorithm = 'strict_full_crc32';
+SELECT @@global.innodb_checksum_algorithm;
+@@global.innodb_checksum_algorithm
+strict_full_crc32
SET GLOBAL innodb_checksum_algorithm = '';
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of ''
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-strict_none
+strict_full_crc32
SET GLOBAL innodb_checksum_algorithm = 'foobar';
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of 'foobar'
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-strict_none
+strict_full_crc32
SET GLOBAL innodb_checksum_algorithm = 123;
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of '123'
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-strict_none
+strict_full_crc32
SET GLOBAL innodb_checksum_algorithm = @orig;
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
diff --git a/mysql-test/suite/sys_vars/r/innodb_fil_make_page_dirty_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_fil_make_page_dirty_debug_basic.result
index abf2cdaf1c4..477eb7fcb61 100644
--- a/mysql-test/suite/sys_vars/r/innodb_fil_make_page_dirty_debug_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_fil_make_page_dirty_debug_basic.result
@@ -17,6 +17,8 @@ ERROR HY000: Variable 'innodb_fil_make_page_dirty_debug' is a GLOBAL variable an
create table t1 (f1 int primary key) engine = innodb;
select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = @space_id;
drop table t1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_method_func.result b/mysql-test/suite/sys_vars/r/innodb_flush_method_func.result
index a7c8a2d3cc6..afecd9ab6cc 100644
--- a/mysql-test/suite/sys_vars/r/innodb_flush_method_func.result
+++ b/mysql-test/suite/sys_vars/r/innodb_flush_method_func.result
@@ -4,11 +4,13 @@ select @@innodb_flush_method;
fsync
create table t(a serial) engine=innodb;
FLUSH TABLES;
+# restart: --innodb-flush-method=5
select @@innodb_flush_method;
@@innodb_flush_method
O_DIRECT_NO_FSYNC
insert into t values(0);
FLUSH TABLES;
+# restart: --innodb-flush-method=0
select @@innodb_flush_method;
@@innodb_flush_method
fsync
diff --git a/mysql-test/suite/sys_vars/r/innodb_instant_alter_column_allowed_basic.result b/mysql-test/suite/sys_vars/r/innodb_instant_alter_column_allowed_basic.result
index 657fbcbbe67..0c25c788dbe 100644
--- a/mysql-test/suite/sys_vars/r/innodb_instant_alter_column_allowed_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_instant_alter_column_allowed_basic.result
@@ -25,11 +25,15 @@ ERROR 42000: Variable 'innodb_instant_alter_column_allowed' can't be set to the
select @@global.innodb_instant_alter_column_allowed;
@@global.innodb_instant_alter_column_allowed
never
-set global innodb_instant_alter_column_allowed=2;
-ERROR 42000: Variable 'innodb_instant_alter_column_allowed' can't be set to the value of '2'
+set global innodb_instant_alter_column_allowed=3;
+ERROR 42000: Variable 'innodb_instant_alter_column_allowed' can't be set to the value of '3'
select @@global.innodb_instant_alter_column_allowed;
@@global.innodb_instant_alter_column_allowed
never
+set global innodb_instant_alter_column_allowed=2;
+select @@global.innodb_instant_alter_column_allowed;
+@@global.innodb_instant_alter_column_allowed
+add_drop_reorder
set global innodb_instant_alter_column_allowed=1;
select @@global.innodb_instant_alter_column_allowed;
@@global.innodb_instant_alter_column_allowed
@@ -41,5 +45,5 @@ never
set global innodb_instant_alter_column_allowed=default;
select @@global.innodb_instant_alter_column_allowed;
@@global.innodb_instant_alter_column_allowed
-add_last
+add_drop_reorder
SET GLOBAL innodb_instant_alter_column_allowed = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/innodb_saved_page_number_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_saved_page_number_debug_basic.result
index 20e2b78e640..b306749dcb0 100644
--- a/mysql-test/suite/sys_vars/r/innodb_saved_page_number_debug_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_saved_page_number_debug_basic.result
@@ -17,6 +17,8 @@ ERROR HY000: Variable 'innodb_saved_page_number_debug' is a GLOBAL variable and
create table t1 (f1 int primary key) engine = innodb;
select space from information_schema.innodb_sys_tables
where name = 'test/t1' into @space_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = @space_id;
drop table t1;
diff --git a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
index 4a68a4048b6..f6468fd8a7a 100644
--- a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
+++ b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
@@ -66,6 +66,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 17 Using where; Using join buffer (flat, BNL join)
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET MAX_SEEKS_FOR_KEY=1;
EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b;
diff --git a/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result b/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
index cae0e68765b..1de1d195460 100644
--- a/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
+++ b/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
@@ -20,6 +20,7 @@ INSERT INTO t1 SELECT NULL FROM t1;
SET myisam_stats_method = nulls_unequal;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -34,10 +35,13 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t1 1 a 1 a A 10 NULL NULL YES BTREE
'Set nulls to be equal'
SET myisam_stats_method = nulls_equal;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
INSERT INTO t1 VALUES (11);
DELETE FROM t1 WHERE a = 11;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -66,6 +70,7 @@ INSERT INTO t1 VALUES ('bce','def1', 'yuu', NULL);
INSERT INTO t1 VALUES ('bce','def2', NULL, 'quux');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -76,6 +81,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE
DELETE FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -84,5 +90,6 @@ t1 1 a 2 b A 0 NULL NULL YES BTREE
t1 1 a 3 c A 0 NULL NULL YES BTREE
t1 1 a 4 d A 0 NULL NULL YES BTREE
SET myisam_stats_method = DEFAULT;
+set @@use_stat_tables= @save_use_stat_tables;
DROP TABLE t1;
SET @@global.myisam_stats_method= @start_value;
diff --git a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
index fe752e28d56..5c76684306a 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
@@ -1,60 +1,60 @@
set @@global.optimizer_switch=@@optimizer_switch;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
set global optimizer_switch=4101;
set session optimizer_switch=2058;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
set global optimizer_switch="index_merge_sort_union=on";
set session optimizer_switch="index_merge=off";
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+optimizer_switch index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
set session optimizer_switch="default";
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=off
set optimizer_switch = replace(@@optimizer_switch, '=off', '=on');
Warnings:
Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
set global optimizer_switch=1.1;
ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
set global optimizer_switch=1e1;
diff --git a/mysql-test/suite/sys_vars/r/secure_file_priv.result b/mysql-test/suite/sys_vars/r/secure_file_priv.result
index eeeb9a58c0f..74f816df59d 100644
--- a/mysql-test/suite/sys_vars/r/secure_file_priv.result
+++ b/mysql-test/suite/sys_vars/r/secure_file_priv.result
@@ -6,6 +6,8 @@ INSERT INTO t1 VALUES ("one"),("two"),("three"),("four"),("five");
SHOW VARIABLES LIKE 'secure_file_priv';
Variable_name Value
secure_file_priv
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
c1
one
two
diff --git a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result
deleted file mode 100644
index 356b3c9e879..00000000000
--- a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result
+++ /dev/null
@@ -1,21 +0,0 @@
-select @@global.shared_memory_base_name;
-@@global.shared_memory_base_name
-MYSQL_TMP_DIR/mysqld.1.sock
-select @@session.shared_memory_base_name;
-ERROR HY000: Variable 'shared_memory_base_name' is a GLOBAL variable
-show global variables like 'shared_memory_base_name';
-Variable_name Value
-shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock
-show session variables like 'shared_memory_base_name';
-Variable_name Value
-shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock
-select * from information_schema.global_variables where variable_name='shared_memory_base_name';
-VARIABLE_NAME VARIABLE_VALUE
-SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock
-select * from information_schema.session_variables where variable_name='shared_memory_base_name';
-VARIABLE_NAME VARIABLE_VALUE
-SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock
-set global shared_memory_base_name=1;
-ERROR HY000: Variable 'shared_memory_base_name' is a read only variable
-set session shared_memory_base_name=1;
-ERROR HY000: Variable 'shared_memory_base_name' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/shared_memory_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_basic.result
deleted file mode 100644
index ab671af610c..00000000000
--- a/mysql-test/suite/sys_vars/r/shared_memory_basic.result
+++ /dev/null
@@ -1,21 +0,0 @@
-select @@global.shared_memory;
-@@global.shared_memory
-0
-select @@session.shared_memory;
-ERROR HY000: Variable 'shared_memory' is a GLOBAL variable
-show global variables like 'shared_memory';
-Variable_name Value
-shared_memory OFF
-show session variables like 'shared_memory';
-Variable_name Value
-shared_memory OFF
-select * from information_schema.global_variables where variable_name='shared_memory';
-VARIABLE_NAME VARIABLE_VALUE
-SHARED_MEMORY OFF
-select * from information_schema.session_variables where variable_name='shared_memory';
-VARIABLE_NAME VARIABLE_VALUE
-SHARED_MEMORY OFF
-set global shared_memory=1;
-ERROR HY000: Variable 'shared_memory' is a read only variable
-set session shared_memory=1;
-ERROR HY000: Variable 'shared_memory' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/slave_transaction_retry_errors.result b/mysql-test/suite/sys_vars/r/slave_transaction_retry_errors.result
index a7815bb3f78..72b4041599a 100644
--- a/mysql-test/suite/sys_vars/r/slave_transaction_retry_errors.result
+++ b/mysql-test/suite/sys_vars/r/slave_transaction_retry_errors.result
@@ -1,20 +1,20 @@
select @@global.slave_transaction_retry_errors;
@@global.slave_transaction_retry_errors
-1213,1205,10,20,400
+1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
select @@session.slave_transaction_retry_errors;
ERROR HY000: Variable 'slave_transaction_retry_errors' is a GLOBAL variable
show global variables like 'slave_transaction_retry_errors';
Variable_name Value
-slave_transaction_retry_errors 1213,1205,10,20,400
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
show session variables like 'slave_transaction_retry_errors';
Variable_name Value
-slave_transaction_retry_errors 1213,1205,10,20,400
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
select * from information_schema.global_variables where variable_name='slave_transaction_retry_errors';
VARIABLE_NAME VARIABLE_VALUE
-SLAVE_TRANSACTION_RETRY_ERRORS 1213,1205,10,20,400
+SLAVE_TRANSACTION_RETRY_ERRORS 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
select * from information_schema.session_variables where variable_name='slave_transaction_retry_errors';
VARIABLE_NAME VARIABLE_VALUE
-SLAVE_TRANSACTION_RETRY_ERRORS 1213,1205,10,20,400
+SLAVE_TRANSACTION_RETRY_ERRORS 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
set global slave_transaction_retry_errors=1;
ERROR HY000: Variable 'slave_transaction_retry_errors' is a read only variable
set session slave_transaction_retry_errors=1;
diff --git a/mysql-test/suite/sys_vars/r/sql_mode_basic.result b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
index a200f620a7c..d911e80b780 100644
--- a/mysql-test/suite/sys_vars/r/sql_mode_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
@@ -367,7 +367,15 @@ SELECT @@global.sql_mode;
@@global.sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT
SET @@global.sql_mode = 17179869184;
-ERROR 42000: Variable 'sql_mode' can't be set to the value of '17179869184'
+SELECT @@global.sql_mode;
+@@global.sql_mode
+TIME_ROUND_FRACTIONAL
+SET @@global.sql_mode = 34359738367;
+SELECT @@global.sql_mode;
+@@global.sql_mode
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT,TIME_ROUND_FRACTIONAL
+SET @@global.sql_mode = 34359738368;
+ERROR 42000: Variable 'sql_mode' can't be set to the value of '34359738368'
SET @@global.sql_mode = 0.4;
ERROR 42000: Incorrect argument type to variable 'sql_mode'
'#---------------------FN_DYNVARS_152_08----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/sysvars_aria.result b/mysql-test/suite/sys_vars/r/sysvars_aria.result
index 7e5185c0e2f..7b74c85b6da 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_aria.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_aria.result
@@ -7,7 +7,7 @@ DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Block size to be used for Aria index pages.
-NUMERIC_MIN_VALUE 1024
+NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index f47c7de8132..6a23651b9dc 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -372,11 +372,11 @@ SESSION_VALUE NULL
DEFAULT_VALUE crc32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
-VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by MariaDB versions older than 10.0.4
+VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible values are FULL_CRC32 for new files, always use CRC-32C; for old, see CRC32 below; STRICT_FULL_CRC32 for new files, always use CRC-32C; for old, see STRICT_CRC32 below; CRC32 write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by MariaDB versions older than 10.0.4; new files created with full_crc32 are readable by MariaDB 10.4.3+
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST crc32,strict_crc32,innodb,strict_innodb,none,strict_none
+ENUM_VALUE_LIST crc32,strict_crc32,innodb,strict_innodb,none,strict_none,full_crc32,strict_full_crc32
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
@@ -1137,14 +1137,14 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_INSTANT_ALTER_COLUMN_ALLOWED
SESSION_VALUE NULL
-DEFAULT_VALUE add_last
+DEFAULT_VALUE add_drop_reorder
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT File format constraint for ALTER TABLE
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST never,add_last
+ENUM_VALUE_LIST never,add_last,add_drop_reorder
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_IO_CAPACITY
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
index 5e2d984663c..e0aad7fa6d0 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
@@ -7,9 +7,9 @@
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Block size to be used for Aria index pages.
- NUMERIC_MIN_VALUE 1024
+ NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
-@@ -35,7 +35,7 @@
+@@ -44,7 +44,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -18,7 +18,7 @@
VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -45,7 +45,7 @@
+@@ -54,7 +54,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
VARIABLE_SCOPE GLOBAL
@@ -27,7 +27,7 @@
VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -65,7 +65,7 @@
+@@ -74,7 +74,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
VARIABLE_SCOPE GLOBAL
@@ -36,7 +36,7 @@
VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -85,7 +85,7 @@
+@@ -94,7 +94,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -45,7 +45,7 @@
VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -95,7 +95,7 @@
+@@ -104,7 +104,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -54,7 +54,7 @@
VARIABLE_COMMENT Limit for transaction log size
NUMERIC_MIN_VALUE 8388608
NUMERIC_MAX_VALUE 4294967295
-@@ -125,10 +125,10 @@
+@@ -134,10 +134,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
VARIABLE_SCOPE GLOBAL
@@ -67,7 +67,7 @@
NUMERIC_BLOCK_SIZE 100
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -145,7 +145,7 @@
+@@ -154,7 +154,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -76,7 +76,7 @@
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -155,7 +155,7 @@
+@@ -164,7 +164,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
VARIABLE_SCOPE GLOBAL
@@ -85,7 +85,7 @@
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
NUMERIC_MIN_VALUE 128
NUMERIC_MAX_VALUE 16384
-@@ -185,7 +185,7 @@
+@@ -194,7 +194,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -94,7 +94,7 @@
VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -198,7 +198,7 @@
+@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
@@ -103,7 +103,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -255,7 +255,7 @@
+@@ -264,7 +264,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_INCREMENT
VARIABLE_SCOPE SESSION
@@ -112,7 +112,7 @@
VARIABLE_COMMENT Auto-increment columns are incremented by this
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -265,7 +265,7 @@
+@@ -274,7 +274,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_OFFSET
VARIABLE_SCOPE SESSION
@@ -121,7 +121,7 @@
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -275,7 +275,7 @@
+@@ -284,7 +284,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BACK_LOG
VARIABLE_SCOPE GLOBAL
@@ -130,7 +130,7 @@
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -328,7 +328,7 @@
+@@ -337,7 +337,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
@@ -139,7 +139,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -345,20 +345,20 @@
+@@ -354,20 +354,20 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
VARIABLE_SCOPE GLOBAL
@@ -164,7 +164,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -378,7 +378,7 @@
+@@ -387,7 +387,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
NUMERIC_MIN_VALUE 8192
@@ -173,7 +173,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -418,7 +418,7 @@
+@@ -427,7 +427,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
NUMERIC_MIN_VALUE 4096
@@ -182,7 +182,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -428,7 +428,7 @@
+@@ -437,7 +437,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
NUMERIC_MIN_VALUE 0
@@ -191,7 +191,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -615,7 +615,7 @@
+@@ -624,7 +624,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME CONNECT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -200,7 +200,7 @@
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 31536000
-@@ -665,7 +665,7 @@
+@@ -674,7 +674,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
VARIABLE_SCOPE SESSION
@@ -209,7 +209,7 @@
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 33
-@@ -675,7 +675,7 @@
+@@ -684,7 +684,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
VARIABLE_SCOPE SESSION
@@ -218,7 +218,7 @@
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 32
-@@ -685,7 +685,7 @@
+@@ -694,7 +694,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
VARIABLE_SCOPE SESSION
@@ -227,7 +227,7 @@
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -695,7 +695,7 @@
+@@ -704,7 +704,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
VARIABLE_SCOPE SESSION
@@ -236,7 +236,7 @@
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -735,7 +735,7 @@
+@@ -754,7 +754,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_WEEK_FORMAT
VARIABLE_SCOPE SESSION
@@ -245,7 +245,7 @@
VARIABLE_COMMENT The default week format used by WEEK() functions
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 7
-@@ -745,7 +745,7 @@
+@@ -764,7 +764,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -254,7 +254,7 @@
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -755,7 +755,7 @@
+@@ -774,7 +774,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -263,7 +263,7 @@
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -765,7 +765,7 @@
+@@ -784,7 +784,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_QUEUE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -272,7 +272,7 @@
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -785,7 +785,7 @@
+@@ -814,7 +814,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
@@ -281,7 +281,7 @@
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 38
-@@ -865,7 +865,7 @@
+@@ -894,7 +894,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
@@ -290,7 +290,7 @@
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
-@@ -895,7 +895,7 @@
+@@ -924,7 +924,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EXTRA_MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
@@ -299,7 +299,7 @@
VARIABLE_COMMENT The number of connections on extra-port
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100000
-@@ -925,7 +925,7 @@
+@@ -954,7 +954,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME FLUSH_TIME
VARIABLE_SCOPE GLOBAL
@@ -308,7 +308,7 @@
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -955,7 +955,7 @@
+@@ -984,7 +984,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MAX_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -317,7 +317,7 @@
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -965,7 +965,7 @@
+@@ -994,7 +994,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MIN_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -326,7 +326,7 @@
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 84
-@@ -975,7 +975,7 @@
+@@ -1004,7 +1004,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -335,7 +335,7 @@
VARIABLE_COMMENT Number of best matches to use for query expansion
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -1018,7 +1018,7 @@
+@@ -1047,7 +1047,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
NUMERIC_MIN_VALUE 4
@@ -344,7 +344,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1145,7 +1145,7 @@
+@@ -1174,7 +1174,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HISTOGRAM_SIZE
VARIABLE_SCOPE SESSION
@@ -353,7 +353,7 @@
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1175,7 +1175,7 @@
+@@ -1204,7 +1204,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HOST_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -362,7 +362,7 @@
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65536
-@@ -1285,7 +1285,7 @@
+@@ -1314,7 +1314,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INTERACTIVE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -371,7 +371,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -1308,7 +1308,7 @@
+@@ -1347,7 +1347,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
NUMERIC_MIN_VALUE 128
@@ -380,7 +380,7 @@
NUMERIC_BLOCK_SIZE 128
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1325,7 +1325,7 @@
+@@ -1364,7 +1364,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_CACHE_LEVEL
VARIABLE_SCOPE SESSION
@@ -389,7 +389,7 @@
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 8
-@@ -1348,7 +1348,7 @@
+@@ -1387,7 +1387,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
NUMERIC_MIN_VALUE 0
@@ -398,7 +398,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1505,7 +1505,7 @@
+@@ -1544,7 +1544,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCK_WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -407,7 +407,7 @@
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1625,7 +1625,7 @@
+@@ -1664,7 +1664,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_RATE_LIMIT
VARIABLE_SCOPE SESSION
@@ -416,7 +416,7 @@
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1655,7 +1655,7 @@
+@@ -1694,7 +1694,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_WARNINGS
VARIABLE_SCOPE SESSION
@@ -425,7 +425,7 @@
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1705,7 +1705,7 @@
+@@ -1744,7 +1744,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_ALLOWED_PACKET
VARIABLE_SCOPE SESSION
@@ -434,7 +434,7 @@
VARIABLE_COMMENT Max packet length to send to or receive from the server
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -1718,14 +1718,14 @@
+@@ -1757,14 +1757,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
NUMERIC_MIN_VALUE 4096
@@ -451,7 +451,7 @@
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 1073741824
-@@ -1738,14 +1738,14 @@
+@@ -1777,14 +1777,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
NUMERIC_MIN_VALUE 4096
@@ -468,7 +468,7 @@
VARIABLE_COMMENT The number of simultaneous clients allowed
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100000
-@@ -1755,7 +1755,7 @@
+@@ -1794,7 +1794,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECT_ERRORS
VARIABLE_SCOPE GLOBAL
@@ -477,7 +477,7 @@
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1765,7 +1765,7 @@
+@@ -1804,7 +1804,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DELAYED_THREADS
VARIABLE_SCOPE SESSION
@@ -486,7 +486,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -1785,7 +1785,7 @@
+@@ -1824,7 +1824,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_ERROR_COUNT
VARIABLE_SCOPE SESSION
@@ -495,7 +495,7 @@
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -1798,14 +1798,14 @@
+@@ -1837,14 +1837,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
NUMERIC_MIN_VALUE 16384
@@ -512,7 +512,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -1825,7 +1825,7 @@
+@@ -1864,7 +1864,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
VARIABLE_SCOPE SESSION
@@ -521,7 +521,7 @@
VARIABLE_COMMENT Max number of bytes in sorted records
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -1835,7 +1835,7 @@
+@@ -1874,7 +1874,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LONG_DATA_SIZE
VARIABLE_SCOPE GLOBAL
@@ -530,7 +530,7 @@
VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -1855,7 +1855,7 @@
+@@ -1904,7 +1904,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
VARIABLE_SCOPE SESSION
@@ -539,8 +539,16 @@
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1865,7 +1865,7 @@
- COMMAND_LINE_ARGUMENT OPTIONAL
+@@ -1917,14 +1917,14 @@ VARIABLE_SCOPE SESSION
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT The maximum size of the container of a rowid filter
+ NUMERIC_MIN_VALUE 1024
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SEEKS_FOR_KEY
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -548,7 +556,7 @@
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1885,7 +1885,7 @@
+@@ -1944,7 +1944,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
@@ -557,7 +565,7 @@
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
NUMERIC_MIN_VALUE 64
NUMERIC_MAX_VALUE 8388608
-@@ -1895,7 +1895,7 @@
+@@ -1954,7 +1954,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SP_RECURSION_DEPTH
VARIABLE_SCOPE SESSION
@@ -566,7 +574,7 @@
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1915,7 +1915,7 @@
+@@ -1974,7 +1974,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_TMP_TABLES
VARIABLE_SCOPE SESSION
@@ -575,7 +583,7 @@
VARIABLE_COMMENT Unused, will be removed.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1935,7 +1935,7 @@
+@@ -1994,7 +1994,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_WRITE_LOCK_COUNT
VARIABLE_SCOPE GLOBAL
@@ -584,7 +592,7 @@
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1945,7 +1945,7 @@
+@@ -2004,7 +2004,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -593,7 +601,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1048576
-@@ -1955,7 +1955,7 @@
+@@ -2014,7 +2014,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -602,7 +610,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -1965,7 +1965,7 @@
+@@ -2024,7 +2024,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
VARIABLE_SCOPE SESSION
@@ -611,7 +619,7 @@
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1975,7 +1975,7 @@
+@@ -2034,7 +2034,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MRR_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -620,7 +628,7 @@
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -1985,17 +1985,17 @@
+@@ -2044,17 +2044,17 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MULTI_RANGE_COUNT
VARIABLE_SCOPE SESSION
@@ -641,7 +649,7 @@
VARIABLE_COMMENT Block size to be used for MyISAM index pages
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 16384
-@@ -2005,7 +2005,7 @@
+@@ -2064,7 +2064,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
VARIABLE_SCOPE GLOBAL
@@ -650,7 +658,7 @@
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 7
-@@ -2028,7 +2028,7 @@
+@@ -2087,7 +2087,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
NUMERIC_MIN_VALUE 7
@@ -659,7 +667,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -2045,10 +2045,10 @@
+@@ -2104,10 +2104,10 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MYISAM_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -672,7 +680,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2058,7 +2058,7 @@
+@@ -2117,7 +2117,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
NUMERIC_MIN_VALUE 4096
@@ -681,7 +689,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2095,7 +2095,7 @@
+@@ -2154,7 +2154,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME NET_BUFFER_LENGTH
VARIABLE_SCOPE SESSION
@@ -690,7 +698,7 @@
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1048576
-@@ -2105,7 +2105,7 @@
+@@ -2164,7 +2164,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_READ_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -699,7 +707,7 @@
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2115,7 +2115,7 @@
+@@ -2174,7 +2174,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_RETRY_COUNT
VARIABLE_SCOPE SESSION
@@ -708,7 +716,7 @@
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2125,7 +2125,7 @@
+@@ -2184,7 +2184,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_WRITE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -717,7 +725,7 @@
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2175,7 +2175,7 @@
+@@ -2234,7 +2234,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OPEN_FILES_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -726,7 +734,7 @@
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2185,7 +2185,7 @@
+@@ -2244,7 +2244,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
@@ -735,7 +743,7 @@
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1
-@@ -2195,7 +2195,7 @@
+@@ -2254,7 +2254,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
VARIABLE_SCOPE SESSION
@@ -744,7 +752,7 @@
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 62
-@@ -2205,7 +2205,7 @@
+@@ -2264,7 +2264,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
VARIABLE_SCOPE SESSION
@@ -753,7 +761,19 @@
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 4294967295
-@@ -2225,7 +2225,7 @@
+@@ -2294,17 +2294,17 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum allowed size of an optimizer trace
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
VARIABLE_SCOPE SESSION
@@ -762,7 +782,7 @@
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5
-@@ -2245,7 +2245,7 @@
+@@ -2324,7 +2324,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -771,7 +791,7 @@
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2255,7 +2255,7 @@
+@@ -2334,7 +2334,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -789,7 +809,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2275,7 +2275,7 @@
+@@ -2354,7 +2354,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -798,7 +818,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2285,7 +2285,7 @@
+@@ -2364,7 +2364,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -807,7 +827,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2295,7 +2295,7 @@
+@@ -2374,7 +2374,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -816,7 +836,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2305,7 +2305,7 @@
+@@ -2384,7 +2384,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -825,7 +845,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2315,7 +2315,7 @@
+@@ -2394,7 +2394,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -834,7 +854,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2325,7 +2325,7 @@
+@@ -2404,7 +2404,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -843,7 +863,7 @@
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2335,7 +2335,7 @@
+@@ -2414,7 +2414,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -852,7 +872,7 @@
VARIABLE_COMMENT Maximum number of condition instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2345,7 +2345,7 @@
+@@ -2424,7 +2424,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -861,7 +881,7 @@
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2355,7 +2355,7 @@
+@@ -2434,7 +2434,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
VARIABLE_SCOPE GLOBAL
@@ -870,7 +890,7 @@
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2365,7 +2365,7 @@
+@@ -2444,7 +2444,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -879,7 +899,7 @@
VARIABLE_COMMENT Maximum number of file instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2375,7 +2375,7 @@
+@@ -2454,7 +2454,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -888,7 +908,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented files.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2385,7 +2385,7 @@
+@@ -2464,7 +2464,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -897,7 +917,7 @@
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2395,7 +2395,7 @@
+@@ -2474,7 +2474,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -906,7 +926,7 @@
VARIABLE_COMMENT Maximum number of mutex instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2405,7 +2405,7 @@
+@@ -2484,7 +2484,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -915,7 +935,7 @@
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2415,7 +2415,7 @@
+@@ -2494,7 +2494,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -924,7 +944,7 @@
VARIABLE_COMMENT Maximum number of rwlock instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2425,7 +2425,7 @@
+@@ -2504,7 +2504,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -933,7 +953,7 @@
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2435,7 +2435,7 @@
+@@ -2514,7 +2514,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -942,7 +962,7 @@
VARIABLE_COMMENT Maximum number of socket instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2445,7 +2445,7 @@
+@@ -2524,7 +2524,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -951,7 +971,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2455,7 +2455,7 @@
+@@ -2534,7 +2534,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -960,7 +980,7 @@
VARIABLE_COMMENT Maximum number of stage instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2465,7 +2465,7 @@
+@@ -2544,7 +2544,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -969,7 +989,7 @@
VARIABLE_COMMENT Maximum number of statement instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2475,7 +2475,7 @@
+@@ -2554,7 +2554,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -978,7 +998,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2485,7 +2485,7 @@
+@@ -2564,7 +2564,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -987,7 +1007,7 @@
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2495,7 +2495,7 @@
+@@ -2574,7 +2574,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -996,7 +1016,7 @@
VARIABLE_COMMENT Maximum number of thread instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2505,7 +2505,7 @@
+@@ -2584,7 +2584,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -1005,7 +1025,7 @@
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2515,7 +2515,7 @@
+@@ -2594,7 +2594,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1014,7 +1034,7 @@
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2525,7 +2525,7 @@
+@@ -2604,7 +2604,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1023,7 +1043,7 @@
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1024
-@@ -2535,7 +2535,7 @@
+@@ -2614,7 +2614,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1032,7 +1052,7 @@
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2545,7 +2545,7 @@
+@@ -2624,7 +2624,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1041,7 +1061,7 @@
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2595,7 +2595,7 @@
+@@ -2674,7 +2674,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PRELOAD_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1050,7 +1070,7 @@
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -2615,7 +2615,7 @@
+@@ -2694,7 +2694,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROFILING_HISTORY_SIZE
VARIABLE_SCOPE SESSION
@@ -1059,7 +1079,7 @@
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -2625,7 +2625,7 @@
+@@ -2704,7 +2704,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROGRESS_REPORT_TIME
VARIABLE_SCOPE SESSION
@@ -1068,7 +1088,7 @@
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2685,7 +2685,7 @@
+@@ -2764,7 +2764,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
@@ -1077,7 +1097,7 @@
VARIABLE_COMMENT Allocation block size for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2695,7 +2695,7 @@
+@@ -2774,7 +2774,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -1086,7 +1106,7 @@
VARIABLE_COMMENT Don't cache results that are bigger than this
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2705,7 +2705,7 @@
+@@ -2784,7 +2784,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
VARIABLE_SCOPE GLOBAL
@@ -1095,7 +1115,7 @@
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2718,7 +2718,7 @@
+@@ -2797,7 +2797,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
NUMERIC_MIN_VALUE 0
@@ -1104,7 +1124,7 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2755,7 +2755,7 @@
+@@ -2834,7 +2834,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1113,7 +1133,7 @@
VARIABLE_COMMENT Persistent buffer for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2768,7 +2768,7 @@
+@@ -2847,7 +2847,7 @@ VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1122,7 +1142,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2778,14 +2778,14 @@
+@@ -2857,14 +2857,14 @@ VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1139,7 +1159,7 @@
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 4294967295
-@@ -2795,7 +2795,7 @@
+@@ -2874,7 +2874,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME READ_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1148,7 +1168,7 @@
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2815,7 +2815,7 @@
+@@ -2894,7 +2894,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME READ_RND_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1157,7 +1177,7 @@
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 2147483647
-@@ -2825,10 +2825,10 @@
+@@ -2904,10 +2904,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
@@ -1170,7 +1190,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2865,7 +2865,7 @@
+@@ -2944,7 +2944,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SERVER_ID
VARIABLE_SCOPE SESSION
@@ -1179,7 +1199,7 @@
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2935,7 +2935,7 @@
+@@ -3014,7 +3014,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
VARIABLE_SCOPE GLOBAL
@@ -1188,7 +1208,7 @@
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -2945,7 +2945,7 @@
+@@ -3024,7 +3024,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_LAUNCH_TIME
VARIABLE_SCOPE GLOBAL
@@ -1197,7 +1217,7 @@
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -2988,7 +2988,7 @@
+@@ -3067,7 +3067,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
NUMERIC_MIN_VALUE 1024
@@ -1206,7 +1226,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3195,7 +3195,7 @@
+@@ -3274,7 +3274,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STORED_PROGRAM_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1215,7 +1235,7 @@
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
-@@ -3275,7 +3275,7 @@
+@@ -3354,7 +3354,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TABLE_DEFINITION_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1224,7 +1244,7 @@
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
NUMERIC_MAX_VALUE 2097152
-@@ -3285,7 +3285,7 @@
+@@ -3364,7 +3364,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1233,8 +1253,8 @@
VARIABLE_COMMENT The number of cached open tables
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 1048576
-@@ -3335,7 +3335,7 @@
- COMMAND_LINE_ARGUMENT REQUIRED
+@@ -3424,7 +3424,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -1242,7 +1262,7 @@
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -3345,7 +3345,7 @@
+@@ -3434,7 +3434,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_CONCURRENCY
VARIABLE_SCOPE GLOBAL
@@ -1251,7 +1271,7 @@
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -3428,7 +3428,7 @@
+@@ -3527,7 +3527,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1260,7 +1280,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3438,7 +3438,7 @@
+@@ -3537,7 +3537,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
NUMERIC_MIN_VALUE 1024
@@ -1269,7 +1289,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3448,14 +3448,14 @@
+@@ -3547,14 +3547,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1286,7 +1306,7 @@
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -3465,7 +3465,7 @@
+@@ -3564,7 +3564,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1295,7 +1315,7 @@
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -3605,7 +3605,7 @@
+@@ -3704,7 +3704,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -1304,7 +1324,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -3632,7 +3632,7 @@
+@@ -3731,7 +3731,7 @@ order by variable_name;
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 43f3d4313db..9e562426291 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -9,7 +9,7 @@ where variable_name not like 'debug%' and
variable_name not like 'wsrep%' and
variable_name not like 's3%' and
variable_name not in (
-'log_tc_size'
+'log_tc_size','have_sanitizer'
)
order by variable_name;
VARIABLE_NAME ALTER_ALGORITHM
@@ -22,11 +22,21 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME ANALYZE_SAMPLE_PERCENTAGE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE DOUBLE
+VARIABLE_COMMENT Percentage of rows from the table ANALYZE TABLE will sample to collect table statistics. Set to 0 to let MariaDB decide what percentage of rows to sample.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Block size to be used for Aria index pages.
-NUMERIC_MIN_VALUE 1024
+NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
@@ -702,6 +712,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME DEFAULT_PASSWORD_LIFETIME
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT This defines the global password expiration policy. 0 means automatic password expiration is disabled. If the value is a positive integer N, the passwords must be changed every N days. This behavior can be overridden using the password expiration options in ALTER USER.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_REGEX_FLAGS
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
@@ -782,6 +802,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON,ALL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME DISCONNECT_ON_EXPIRED_PASSWORD
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT This variable controls how the server handles clients that are not aware of the sandbox mode. If enabled, the server disconnects the client, otherwise the server puts the client in a sandbox mode.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1852,6 +1882,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_PASSWORD_ERRORS
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT If there is more than this number of failed connect attempts due to invalid password, user will be blocked from further connections until FLUSH_PRIVILEGES.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PREPARED_STMT_COUNT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -1872,6 +1912,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME MAX_ROWID_FILTER_SIZE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum size of the container of a rowid filter
+NUMERIC_MIN_VALUE 1024
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SEEKS_FOR_KEY
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2229,7 +2279,27 @@ VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,default
+ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,default
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME OPTIMIZER_TRACE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE FLAGSET
+VARIABLE_COMMENT Controls tracing of the Optimizer: optimizer_trace=option=val[,option=val...], where option is one of {enabled} and val is one of {on, off, default}
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST enabled,default
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum allowed size of an optimizer trace
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
@@ -3059,7 +3129,7 @@ VARIABLE_COMMENT Sets the sql mode
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT
+ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT,TIME_ROUND_FRACTIONAL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_NOTES
@@ -3342,6 +3412,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME TCP_NODELAY
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Set option TCP_NODELAY (disable Nagle's algorithm) on socket
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -3422,6 +3502,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME TLS_VERSION
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT TLS protocol version for secure connections.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMPDIR
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -3539,7 +3629,7 @@ VARIABLE_COMMENT Specifies how to use system statistics tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY
+ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY,COMPLEMENTARY_FOR_QUERIES,PREFERABLY_FOR_QUERIES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERSION
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
index 3dc6c294435..bfe56dbc1a9 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
@@ -1,15 +1,15 @@
---- sysvars_server_notembedded.result 2019-09-02 17:27:55.739188565 +0300
-+++ sysvars_server_notembedded.reject 2019-09-02 17:55:08.525327501 +0300
-@@ -25,7 +25,7 @@
- COMMAND_LINE_ARGUMENT OPTIONAL
+--- sysvars_server_notembedded.result
++++ sysvars_server_notembedded.result
+@@ -34,7 +34,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Block size to be used for Aria index pages.
- NUMERIC_MIN_VALUE 1024
+ NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
-@@ -35,7 +35,7 @@
+@@ -44,7 +44,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -18,7 +18,7 @@
VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -45,7 +45,7 @@
+@@ -54,7 +54,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_CHECKPOINT_LOG_ACTIVITY
VARIABLE_SCOPE GLOBAL
@@ -27,7 +27,7 @@
VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -65,7 +65,7 @@
+@@ -74,7 +74,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
VARIABLE_SCOPE GLOBAL
@@ -36,7 +36,7 @@
VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -85,7 +85,7 @@
+@@ -94,7 +94,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_GROUP_COMMIT_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -45,7 +45,7 @@
VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -95,7 +95,7 @@
+@@ -104,7 +104,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -54,7 +54,7 @@
VARIABLE_COMMENT Limit for transaction log size
NUMERIC_MIN_VALUE 8388608
NUMERIC_MAX_VALUE 4294967295
-@@ -125,10 +125,10 @@
+@@ -134,10 +134,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_AGE_THRESHOLD
VARIABLE_SCOPE GLOBAL
@@ -67,7 +67,7 @@
NUMERIC_BLOCK_SIZE 100
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -145,7 +145,7 @@
+@@ -154,7 +154,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_DIVISION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -76,7 +76,7 @@
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -155,7 +155,7 @@
+@@ -164,7 +164,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_PAGECACHE_FILE_HASH_SIZE
VARIABLE_SCOPE GLOBAL
@@ -85,7 +85,7 @@
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
NUMERIC_MIN_VALUE 128
NUMERIC_MAX_VALUE 16384
-@@ -185,7 +185,7 @@
+@@ -194,7 +194,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -94,7 +94,7 @@
VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -198,7 +198,7 @@
+@@ -207,7 +207,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.
NUMERIC_MIN_VALUE 4096
@@ -103,7 +103,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -255,7 +255,7 @@
+@@ -264,7 +264,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_INCREMENT
VARIABLE_SCOPE SESSION
@@ -112,7 +112,7 @@
VARIABLE_COMMENT Auto-increment columns are incremented by this
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -265,7 +265,7 @@
+@@ -274,7 +274,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME AUTO_INCREMENT_OFFSET
VARIABLE_SCOPE SESSION
@@ -121,7 +121,7 @@
VARIABLE_COMMENT Offset added to Auto-increment columns. Used when auto-increment-increment != 1
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
-@@ -275,7 +275,7 @@
+@@ -284,7 +284,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BACK_LOG
VARIABLE_SCOPE GLOBAL
@@ -130,7 +130,7 @@
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MariaDB thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -328,7 +328,7 @@
+@@ -337,7 +337,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
@@ -139,7 +139,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -345,20 +345,20 @@
+@@ -354,20 +354,20 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_COMMIT_WAIT_COUNT
VARIABLE_SCOPE GLOBAL
@@ -164,7 +164,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -378,7 +378,7 @@
+@@ -387,7 +387,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of file cache for the binary log
NUMERIC_MIN_VALUE 8192
@@ -173,7 +173,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -418,7 +418,7 @@
+@@ -427,7 +427,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the statement cache for updates to non-transactional engines for the binary log. If you often use statements updating a great number of rows, you can increase this to get more performance.
NUMERIC_MIN_VALUE 4096
@@ -182,7 +182,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -428,7 +428,7 @@
+@@ -437,7 +437,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!
NUMERIC_MIN_VALUE 0
@@ -191,7 +191,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -615,7 +615,7 @@
+@@ -624,7 +624,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME CONNECT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -200,7 +200,7 @@
VARIABLE_COMMENT The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 31536000
-@@ -665,7 +665,7 @@
+@@ -674,7 +674,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_LONG
VARIABLE_SCOPE SESSION
@@ -209,7 +209,7 @@
VARIABLE_COMMENT Long search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 33
-@@ -675,7 +675,7 @@
+@@ -684,7 +684,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_SEARCH_DEPTH_SHORT
VARIABLE_SCOPE SESSION
@@ -218,7 +218,7 @@
VARIABLE_COMMENT Short search depth for the two-step deadlock detection
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 32
-@@ -685,7 +685,7 @@
+@@ -694,7 +694,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_LONG
VARIABLE_SCOPE SESSION
@@ -227,7 +227,7 @@
VARIABLE_COMMENT Long timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -695,7 +695,7 @@
+@@ -704,7 +704,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEADLOCK_TIMEOUT_SHORT
VARIABLE_SCOPE SESSION
@@ -236,7 +236,7 @@
VARIABLE_COMMENT Short timeout for the two-step deadlock detection (in microseconds)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -745,7 +745,7 @@
+@@ -764,7 +764,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME DEFAULT_WEEK_FORMAT
VARIABLE_SCOPE SESSION
@@ -245,7 +245,7 @@
VARIABLE_COMMENT The default week format used by WEEK() functions
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 7
-@@ -755,7 +755,7 @@
+@@ -774,7 +774,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -254,7 +254,7 @@
VARIABLE_COMMENT After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT statements pending. If so, it allows these to execute before continuing.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -765,7 +765,7 @@
+@@ -784,7 +784,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_INSERT_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -263,7 +263,7 @@
VARIABLE_COMMENT How long a INSERT DELAYED thread should wait for INSERT statements before terminating
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -775,7 +775,7 @@
+@@ -794,7 +794,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DELAYED_QUEUE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -272,7 +272,7 @@
VARIABLE_COMMENT What size queue (in rows) should be allocated for handling INSERT DELAYED. If the queue becomes full, any client that does INSERT DELAYED will wait until there is room in the queue again
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -795,7 +795,7 @@
+@@ -824,7 +824,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
@@ -281,7 +281,7 @@
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 38
-@@ -885,7 +885,7 @@
+@@ -914,7 +914,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME EXPIRE_LOGS_DAYS
VARIABLE_SCOPE GLOBAL
@@ -290,7 +290,7 @@
VARIABLE_COMMENT If non-zero, binary logs will be purged after expire_logs_days days; possible purges happen at startup and at binary log rotation
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99
-@@ -915,7 +915,7 @@
+@@ -944,7 +944,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EXTRA_MAX_CONNECTIONS
VARIABLE_SCOPE GLOBAL
@@ -299,7 +299,7 @@
VARIABLE_COMMENT The number of connections on extra-port
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100000
-@@ -945,7 +945,7 @@
+@@ -974,7 +974,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME FLUSH_TIME
VARIABLE_SCOPE GLOBAL
@@ -308,7 +308,7 @@
VARIABLE_COMMENT A dedicated thread is created to flush all tables at the given interval
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -975,7 +975,7 @@
+@@ -1004,7 +1004,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MAX_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -317,7 +317,7 @@
VARIABLE_COMMENT The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -985,7 +985,7 @@
+@@ -1014,7 +1014,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_MIN_WORD_LEN
VARIABLE_SCOPE GLOBAL
@@ -326,7 +326,7 @@
VARIABLE_COMMENT The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 84
-@@ -995,7 +995,7 @@
+@@ -1024,7 +1024,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME FT_QUERY_EXPANSION_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -335,7 +335,7 @@
VARIABLE_COMMENT Number of best matches to use for query expansion
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -1038,7 +1038,7 @@
+@@ -1067,7 +1067,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
NUMERIC_MIN_VALUE 4
@@ -344,7 +344,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1235,7 +1235,7 @@
+@@ -1274,7 +1274,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HISTOGRAM_SIZE
VARIABLE_SCOPE SESSION
@@ -353,7 +353,7 @@
VARIABLE_COMMENT Number of bytes used for a histogram. If set to 0, no histograms are created by ANALYZE.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -1265,7 +1265,7 @@
+@@ -1304,7 +1304,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HOST_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -362,7 +362,7 @@
VARIABLE_COMMENT How many host names should be cached to avoid resolving.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65536
-@@ -1375,7 +1375,7 @@
+@@ -1414,7 +1414,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INTERACTIVE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -371,7 +371,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on an interactive connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -1398,7 +1398,7 @@
+@@ -1447,7 +1447,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer that is used for joins
NUMERIC_MIN_VALUE 128
@@ -380,7 +380,7 @@
NUMERIC_BLOCK_SIZE 128
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1415,7 +1415,7 @@
+@@ -1464,7 +1464,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME JOIN_CACHE_LEVEL
VARIABLE_SCOPE SESSION
@@ -389,7 +389,7 @@
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 8
-@@ -1438,7 +1438,7 @@
+@@ -1487,7 +1487,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
NUMERIC_MIN_VALUE 0
@@ -398,7 +398,7 @@
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1605,7 +1605,7 @@
+@@ -1654,7 +1654,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME LOCK_WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -407,7 +407,7 @@
VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -1755,7 +1755,7 @@
+@@ -1804,7 +1804,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_SLOW_RATE_LIMIT
VARIABLE_SCOPE SESSION
@@ -416,7 +416,7 @@
VARIABLE_COMMENT Write to slow log every #th slow query. Set to 1 to log everything. Increase it to reduce the size of the slow or the performance impact of slow logging
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1785,7 +1785,7 @@
+@@ -1834,7 +1834,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME LOG_WARNINGS
VARIABLE_SCOPE SESSION
@@ -425,7 +425,7 @@
VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1845,7 +1845,7 @@
+@@ -1894,7 +1894,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_ALLOWED_PACKET
VARIABLE_SCOPE SESSION
@@ -434,7 +434,7 @@
VARIABLE_COMMENT Max packet length to send to or receive from the server
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -1858,14 +1858,14 @@
+@@ -1907,14 +1907,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the transactional cache
NUMERIC_MIN_VALUE 4096
@@ -451,7 +451,7 @@
VARIABLE_COMMENT Binary log will be rotated automatically when the size exceeds this value.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 1073741824
-@@ -1878,14 +1878,14 @@
+@@ -1927,14 +1927,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the total size of the statement cache
NUMERIC_MIN_VALUE 4096
@@ -468,7 +468,7 @@
VARIABLE_COMMENT The number of simultaneous clients allowed
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100000
-@@ -1895,7 +1895,7 @@
+@@ -1944,7 +1944,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_CONNECT_ERRORS
VARIABLE_SCOPE GLOBAL
@@ -477,7 +477,7 @@
VARIABLE_COMMENT If there is more than this number of interrupted connections from a host this host will be blocked from further connections
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1905,7 +1905,7 @@
+@@ -1954,7 +1954,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_DELAYED_THREADS
VARIABLE_SCOPE SESSION
@@ -486,7 +486,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -1925,7 +1925,7 @@
+@@ -1974,7 +1974,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_ERROR_COUNT
VARIABLE_SCOPE SESSION
@@ -495,7 +495,7 @@
VARIABLE_COMMENT Max number of errors/warnings to store for a statement
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
-@@ -1938,14 +1938,14 @@
+@@ -1987,14 +1987,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't allow creation of heap tables bigger than this
NUMERIC_MIN_VALUE 16384
@@ -512,7 +512,7 @@
VARIABLE_COMMENT Don't start more than this number of threads to handle INSERT DELAYED statements. If set to zero INSERT DELAYED will be not used
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -1965,7 +1965,7 @@
+@@ -2014,7 +2014,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LENGTH_FOR_SORT_DATA
VARIABLE_SCOPE SESSION
@@ -521,7 +521,7 @@
VARIABLE_COMMENT Max number of bytes in sorted records
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -1975,7 +1975,7 @@
+@@ -2024,7 +2024,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_LONG_DATA_SIZE
VARIABLE_SCOPE GLOBAL
@@ -530,7 +530,7 @@
VARIABLE_COMMENT The maximum BLOB length to send to server from mysql_send_long_data API. Deprecated option; use max_allowed_packet instead.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -1995,7 +1995,7 @@
+@@ -2054,7 +2054,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
VARIABLE_SCOPE SESSION
@@ -539,7 +539,15 @@
VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2015,7 +2015,7 @@
+@@ -2077,14 +2077,14 @@ VARIABLE_SCOPE SESSION
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT The maximum size of the container of a rowid filter
+ NUMERIC_MIN_VALUE 1024
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SEEKS_FOR_KEY
VARIABLE_SCOPE SESSION
@@ -548,7 +556,7 @@
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2035,7 +2035,7 @@
+@@ -2104,7 +2104,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
VARIABLE_SCOPE SESSION
@@ -557,7 +565,7 @@
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2045,7 +2045,7 @@
+@@ -2114,7 +2114,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SP_RECURSION_DEPTH
VARIABLE_SCOPE SESSION
@@ -566,7 +574,7 @@
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -2065,7 +2065,7 @@
+@@ -2134,7 +2134,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_TMP_TABLES
VARIABLE_SCOPE SESSION
@@ -575,7 +583,7 @@
VARIABLE_COMMENT Unused, will be removed.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2085,7 +2085,7 @@
+@@ -2154,7 +2154,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_WRITE_LOCK_COUNT
VARIABLE_SCOPE GLOBAL
@@ -584,7 +592,7 @@
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2095,7 +2095,7 @@
+@@ -2164,7 +2164,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
@@ -593,7 +601,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1048576
-@@ -2105,7 +2105,7 @@
+@@ -2174,7 +2174,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME METADATA_LOCKS_HASH_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -602,7 +610,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2115,7 +2115,7 @@
+@@ -2184,7 +2184,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MIN_EXAMINED_ROW_LIMIT
VARIABLE_SCOPE SESSION
@@ -611,7 +619,7 @@
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2125,7 +2125,7 @@
+@@ -2194,7 +2194,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MRR_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -620,7 +628,7 @@
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2135,17 +2135,17 @@
+@@ -2204,17 +2204,17 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MULTI_RANGE_COUNT
VARIABLE_SCOPE SESSION
@@ -641,7 +649,7 @@
VARIABLE_COMMENT Block size to be used for MyISAM index pages
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 16384
-@@ -2155,7 +2155,7 @@
+@@ -2224,7 +2224,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_DATA_POINTER_SIZE
VARIABLE_SCOPE GLOBAL
@@ -650,7 +658,7 @@
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 7
-@@ -2178,7 +2178,7 @@
+@@ -2247,7 +2247,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Restricts the total memory used for memory mapping of MySQL tables
NUMERIC_MIN_VALUE 7
@@ -659,7 +667,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -2195,10 +2195,10 @@
+@@ -2264,10 +2264,10 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MYISAM_REPAIR_THREADS
VARIABLE_SCOPE SESSION
@@ -672,7 +680,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2208,7 +2208,7 @@
+@@ -2277,7 +2277,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
NUMERIC_MIN_VALUE 4096
@@ -681,7 +689,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2245,7 +2245,7 @@
+@@ -2314,7 +2314,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME NET_BUFFER_LENGTH
VARIABLE_SCOPE SESSION
@@ -690,7 +698,7 @@
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1048576
-@@ -2255,7 +2255,7 @@
+@@ -2324,7 +2324,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_READ_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -699,7 +707,7 @@
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2265,7 +2265,7 @@
+@@ -2334,7 +2334,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_RETRY_COUNT
VARIABLE_SCOPE SESSION
@@ -708,7 +716,7 @@
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2275,7 +2275,7 @@
+@@ -2344,7 +2344,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME NET_WRITE_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -717,7 +725,7 @@
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2325,7 +2325,7 @@
+@@ -2394,7 +2394,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OPEN_FILES_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -726,7 +734,7 @@
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2335,7 +2335,7 @@
+@@ -2404,7 +2404,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_PRUNE_LEVEL
VARIABLE_SCOPE SESSION
@@ -735,7 +743,7 @@
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1
-@@ -2345,7 +2345,7 @@
+@@ -2414,7 +2414,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SEARCH_DEPTH
VARIABLE_SCOPE SESSION
@@ -744,7 +752,7 @@
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 62
-@@ -2355,7 +2355,7 @@
+@@ -2424,7 +2424,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SELECTIVITY_SAMPLING_LIMIT
VARIABLE_SCOPE SESSION
@@ -753,7 +761,19 @@
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 4294967295
-@@ -2375,7 +2375,7 @@
+@@ -2454,17 +2454,17 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum allowed size of an optimizer trace
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 1
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
VARIABLE_SCOPE SESSION
@@ -762,7 +782,7 @@
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5
-@@ -2395,7 +2395,7 @@
+@@ -2484,7 +2484,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME PERFORMANCE_SCHEMA_ACCOUNTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -771,7 +791,7 @@
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2405,7 +2405,7 @@
+@@ -2494,7 +2494,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_DIGESTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -780,7 +800,7 @@
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 200
-@@ -2415,7 +2415,7 @@
+@@ -2504,7 +2504,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -789,7 +809,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2425,7 +2425,7 @@
+@@ -2514,7 +2514,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -798,7 +818,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2435,7 +2435,7 @@
+@@ -2524,7 +2524,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -807,7 +827,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2445,7 +2445,7 @@
+@@ -2534,7 +2534,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -816,7 +836,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2455,7 +2455,7 @@
+@@ -2544,7 +2544,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE
VARIABLE_SCOPE GLOBAL
@@ -825,7 +845,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2465,7 +2465,7 @@
+@@ -2554,7 +2554,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE
VARIABLE_SCOPE GLOBAL
@@ -834,7 +854,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2475,7 +2475,7 @@
+@@ -2564,7 +2564,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_HOSTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -843,7 +863,7 @@
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2485,7 +2485,7 @@
+@@ -2574,7 +2574,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -852,7 +872,7 @@
VARIABLE_COMMENT Maximum number of condition instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2495,7 +2495,7 @@
+@@ -2584,7 +2584,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_COND_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -861,7 +881,7 @@
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2505,7 +2505,7 @@
+@@ -2594,7 +2594,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH
VARIABLE_SCOPE GLOBAL
@@ -870,7 +890,7 @@
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2515,7 +2515,7 @@
+@@ -2604,7 +2604,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -879,7 +899,7 @@
VARIABLE_COMMENT Maximum number of file instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2525,7 +2525,7 @@
+@@ -2614,7 +2614,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -888,7 +908,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented files.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2535,7 +2535,7 @@
+@@ -2624,7 +2624,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -897,7 +917,7 @@
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2545,7 +2545,7 @@
+@@ -2634,7 +2634,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -906,7 +926,7 @@
VARIABLE_COMMENT Maximum number of mutex instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2555,7 +2555,7 @@
+@@ -2644,7 +2644,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -915,7 +935,7 @@
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2565,7 +2565,7 @@
+@@ -2654,7 +2654,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -924,7 +944,7 @@
VARIABLE_COMMENT Maximum number of rwlock instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2575,7 +2575,7 @@
+@@ -2664,7 +2664,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -933,7 +953,7 @@
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2585,7 +2585,7 @@
+@@ -2674,7 +2674,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -942,7 +962,7 @@
VARIABLE_COMMENT Maximum number of socket instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2595,7 +2595,7 @@
+@@ -2684,7 +2684,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -951,7 +971,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2605,7 +2605,7 @@
+@@ -2694,7 +2694,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -960,7 +980,7 @@
VARIABLE_COMMENT Maximum number of stage instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2615,7 +2615,7 @@
+@@ -2704,7 +2704,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -969,7 +989,7 @@
VARIABLE_COMMENT Maximum number of statement instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2625,7 +2625,7 @@
+@@ -2714,7 +2714,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES
VARIABLE_SCOPE GLOBAL
@@ -978,7 +998,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2635,7 +2635,7 @@
+@@ -2724,7 +2724,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -987,7 +1007,7 @@
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2645,7 +2645,7 @@
+@@ -2734,7 +2734,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES
VARIABLE_SCOPE GLOBAL
@@ -996,7 +1016,7 @@
VARIABLE_COMMENT Maximum number of thread instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2655,7 +2655,7 @@
+@@ -2744,7 +2744,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES
VARIABLE_SCOPE GLOBAL
@@ -1005,7 +1025,7 @@
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2665,7 +2665,7 @@
+@@ -2754,7 +2754,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1014,7 +1034,7 @@
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2675,7 +2675,7 @@
+@@ -2764,7 +2764,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_ACTORS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1023,7 +1043,7 @@
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1024
-@@ -2685,7 +2685,7 @@
+@@ -2774,7 +2774,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1032,7 +1052,7 @@
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2695,7 +2695,7 @@
+@@ -2784,7 +2784,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_USERS_SIZE
VARIABLE_SCOPE GLOBAL
@@ -1041,7 +1061,7 @@
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2745,7 +2745,7 @@
+@@ -2834,7 +2834,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PRELOAD_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1050,7 +1070,7 @@
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -2765,7 +2765,7 @@
+@@ -2854,7 +2854,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME PROFILING_HISTORY_SIZE
VARIABLE_SCOPE SESSION
@@ -1059,7 +1079,7 @@
VARIABLE_COMMENT Number of statements about which profiling information is maintained. If set to 0, no profiles are stored. See SHOW PROFILES.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -2775,7 +2775,7 @@
+@@ -2864,7 +2864,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PROGRESS_REPORT_TIME
VARIABLE_SCOPE SESSION
@@ -1068,7 +1088,7 @@
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2835,7 +2835,7 @@
+@@ -2924,7 +2924,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME QUERY_ALLOC_BLOCK_SIZE
VARIABLE_SCOPE SESSION
@@ -1077,7 +1097,7 @@
VARIABLE_COMMENT Allocation block size for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2845,7 +2845,7 @@
+@@ -2934,7 +2934,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -1086,7 +1106,7 @@
VARIABLE_COMMENT Don't cache results that are bigger than this
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2855,7 +2855,7 @@
+@@ -2944,7 +2944,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME QUERY_CACHE_MIN_RES_UNIT
VARIABLE_SCOPE GLOBAL
@@ -1095,7 +1115,7 @@
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2868,7 +2868,7 @@
+@@ -2957,7 +2957,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
NUMERIC_MIN_VALUE 0
@@ -1104,7 +1124,7 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2905,7 +2905,7 @@
+@@ -2994,7 +2994,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME QUERY_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1113,7 +1133,7 @@
VARIABLE_COMMENT Persistent buffer for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -2918,7 +2918,7 @@
+@@ -3007,7 +3007,7 @@ VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1122,7 +1142,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2928,14 +2928,14 @@
+@@ -3017,14 +3017,14 @@ VARIABLE_SCOPE SESSION ONLY
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1139,7 +1159,7 @@
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 4294967295
-@@ -2948,14 +2948,14 @@
+@@ -3037,14 +3037,14 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum speed(KB/s) to read binlog from master (0 = no limit)
NUMERIC_MIN_VALUE 0
@@ -1156,7 +1176,7 @@
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2975,7 +2975,7 @@
+@@ -3064,7 +3064,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME READ_RND_BUFFER_SIZE
VARIABLE_SCOPE SESSION
@@ -1165,7 +1185,7 @@
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 2147483647
-@@ -3175,10 +3175,10 @@
+@@ -3264,10 +3264,10 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ROWID_MERGE_BUFF_SIZE
VARIABLE_SCOPE SESSION
@@ -1178,7 +1198,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3195,20 +3195,20 @@
+@@ -3284,20 +3284,20 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_MASTER_TIMEOUT
VARIABLE_SCOPE GLOBAL
@@ -1203,7 +1223,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3265,10 +3265,10 @@
+@@ -3354,10 +3354,10 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME RPL_SEMI_SYNC_SLAVE_TRACE_LEVEL
VARIABLE_SCOPE GLOBAL
@@ -1216,7 +1236,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3305,7 +3305,7 @@
+@@ -3394,7 +3394,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SERVER_ID
VARIABLE_SCOPE SESSION
@@ -1225,7 +1245,7 @@
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -3435,7 +3435,7 @@
+@@ -3524,7 +3524,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_DOMAIN_PARALLEL_THREADS
VARIABLE_SCOPE GLOBAL
@@ -1234,7 +1254,7 @@
VARIABLE_COMMENT Maximum number of parallel threads to use on slave for events in a single replication domain. When using multiple domains, this can be used to limit a single domain from grabbing all threads and thus stalling other domains. The default of 0 means to allow a domain to grab as many threads as it wants, up to the value of slave_parallel_threads.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -3465,7 +3465,7 @@
+@@ -3554,7 +3554,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_MAX_ALLOWED_PACKET
VARIABLE_SCOPE GLOBAL
@@ -1243,7 +1263,7 @@
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3485,7 +3485,7 @@
+@@ -3574,7 +3574,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_MAX_QUEUED
VARIABLE_SCOPE GLOBAL
@@ -1252,7 +1272,7 @@
VARIABLE_COMMENT Limit on how much memory SQL threads should use per parallel replication thread when reading ahead in the relay log looking for opportunities for parallel replication. Only used when --slave-parallel-threads > 0.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2147483647
-@@ -3505,7 +3505,7 @@
+@@ -3594,7 +3594,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SLAVE_PARALLEL_THREADS
VARIABLE_SCOPE GLOBAL
@@ -1261,7 +1281,7 @@
VARIABLE_COMMENT If non-zero, number of threads to spawn to apply in parallel events on the slave that were group-committed on the master or were logged with GTID in different replication domains. Note that these threads are in addition to the IO and SQL threads, which are always created by a replication slave
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -3515,7 +3515,7 @@
+@@ -3604,7 +3604,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_PARALLEL_WORKERS
VARIABLE_SCOPE GLOBAL
@@ -1270,7 +1290,7 @@
VARIABLE_COMMENT Alias for slave_parallel_threads
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16383
-@@ -3555,7 +3555,7 @@
+@@ -3644,7 +3644,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SLAVE_TRANSACTION_RETRIES
VARIABLE_SCOPE GLOBAL
@@ -1279,7 +1299,7 @@
VARIABLE_COMMENT Number of times the slave SQL thread will retry a transaction in case it failed with a deadlock, elapsed lock wait timeout or listed in slave_transaction_retry_errors, before giving up and stopping
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3575,7 +3575,7 @@
+@@ -3664,7 +3664,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_TRANSACTION_RETRY_INTERVAL
VARIABLE_SCOPE GLOBAL
@@ -1288,7 +1308,7 @@
VARIABLE_COMMENT Interval of the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout or listed in slave_transaction_retry_errors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3600
-@@ -3595,7 +3595,7 @@
+@@ -3684,7 +3684,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLOW_LAUNCH_TIME
VARIABLE_SCOPE GLOBAL
@@ -1297,7 +1317,7 @@
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -3638,7 +3638,7 @@
+@@ -3727,7 +3727,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
NUMERIC_MIN_VALUE 1024
@@ -1306,7 +1326,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3855,7 +3855,7 @@
+@@ -3944,7 +3944,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STORED_PROGRAM_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1315,7 +1335,7 @@
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
-@@ -3955,7 +3955,7 @@
+@@ -4044,7 +4044,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TABLE_DEFINITION_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1324,7 +1344,7 @@
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
NUMERIC_MAX_VALUE 2097152
-@@ -3965,7 +3965,7 @@
+@@ -4054,7 +4054,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TABLE_OPEN_CACHE
VARIABLE_SCOPE GLOBAL
@@ -1333,8 +1353,8 @@
VARIABLE_COMMENT The number of cached open tables
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 1048576
-@@ -4015,7 +4015,7 @@
- COMMAND_LINE_ARGUMENT REQUIRED
+@@ -4114,7 +4114,7 @@ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
@@ -1342,7 +1362,7 @@
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -4025,7 +4025,7 @@
+@@ -4124,7 +4124,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_CONCURRENCY
VARIABLE_SCOPE GLOBAL
@@ -1351,7 +1371,7 @@
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -4178,7 +4178,7 @@
+@@ -4287,7 +4287,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1360,7 +1380,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4188,7 +4188,7 @@
+@@ -4297,7 +4297,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
NUMERIC_MIN_VALUE 1024
@@ -1369,7 +1389,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4198,14 +4198,14 @@
+@@ -4307,14 +4307,14 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MariaDB will automatically convert it to an on-disk MyISAM or Aria table.
NUMERIC_MIN_VALUE 1024
@@ -1386,7 +1406,7 @@
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4215,7 +4215,7 @@
+@@ -4324,7 +4324,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TRANSACTION_PREALLOC_SIZE
VARIABLE_SCOPE SESSION
@@ -1395,7 +1415,7 @@
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4355,7 +4355,7 @@
+@@ -4464,7 +4464,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME WAIT_TIMEOUT
VARIABLE_SCOPE SESSION
@@ -1404,7 +1424,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -4382,7 +4382,7 @@
+@@ -4491,7 +4491,7 @@ order by variable_name;
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index e5910608cb4..b9e4aac3288 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -9,7 +9,7 @@ where variable_name not like 'debug%' and
variable_name not like 'wsrep%' and
variable_name not like 's3%' and
variable_name not in (
-'log_tc_size'
+'log_tc_size','have_sanitizer'
)
order by variable_name;
VARIABLE_NAME ALTER_ALGORITHM
@@ -22,11 +22,21 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST DEFAULT,COPY,INPLACE,NOCOPY,INSTANT
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME ANALYZE_SAMPLE_PERCENTAGE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE DOUBLE
+VARIABLE_COMMENT Percentage of rows from the table ANALYZE TABLE will sample to collect table statistics. Set to 0 to let MariaDB decide what percentage of rows to sample.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_BLOCK_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Block size to be used for Aria index pages.
-NUMERIC_MIN_VALUE 1024
+NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 32768
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
@@ -712,6 +722,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME DEFAULT_PASSWORD_LIFETIME
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT This defines the global password expiration policy. 0 means automatic password expiration is disabled. If the value is a positive integer N, the passwords must be changed every N days. This behavior can be overridden using the password expiration options in ALTER USER.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME DEFAULT_REGEX_FLAGS
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
@@ -792,6 +812,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON,ALL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME DISCONNECT_ON_EXPIRED_PASSWORD
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT This variable controls how the server handles clients that are not aware of the sandbox mode. If enabled, the server disconnects the client, otherwise the server puts the client in a sandbox mode.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME DIV_PRECISION_INCREMENT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -1062,6 +1092,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME GTID_CLEANUP_BATCH_SIZE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Normally does not need tuning. How many old rows must accumulate in the mysql.gtid_slave_pos table before a background job will be run to delete them. Can be increased to reduce number of commits if using many different engines with --gtid_pos_auto_engines, or to reduce CPU overhead if using a huge number of different gtid_domain_ids. Can be decreased to reduce number of old rows in the table.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2147483647
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GTID_CURRENT_POS
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -1992,6 +2032,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_PASSWORD_ERRORS
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT If there is more than this number of failed connect attempts due to invalid password, user will be blocked from further connections until FLUSH_PRIVILEGES.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PREPARED_STMT_COUNT
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
@@ -2022,6 +2072,16 @@ NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_ROWID_FILTER_SIZE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum size of the container of a rowid filter
+NUMERIC_MIN_VALUE 1024
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SEEKS_FOR_KEY
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
@@ -2379,7 +2439,27 @@ VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,default
+ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,split_materialized,condition_pushdown_for_subquery,rowid_filter,condition_pushdown_from_having,default
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME OPTIMIZER_TRACE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE FLAGSET
+VARIABLE_COMMENT Controls tracing of the Optimizer: optimizer_trace=option=val[,option=val...], where option is one of {enabled} and val is one of {on, off, default}
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST enabled,default
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME OPTIMIZER_TRACE_MAX_MEM_SIZE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum allowed size of an optimizer trace
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
@@ -3575,7 +3655,7 @@ COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SLAVE_TRANSACTION_RETRY_ERRORS
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT Tells the slave thread to retry transaction for replication when a query event returns an error from the provided list. Deadlock and elapsed lock wait timeout errors are automatically added to this list
+VARIABLE_COMMENT Tells the slave thread to retry transaction for replication when a query event returns an error from the provided list. Deadlock error, elapsed lock wait timeout, net read error, net read timeout, net write error, net write timeout, connect error and 2 types of lost connection error are automatically added to this list
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -3709,7 +3789,7 @@ VARIABLE_COMMENT Sets the sql mode
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT
+ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT,TIME_ROUND_FRACTIONAL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_NOTES
@@ -4022,6 +4102,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME TCP_NODELAY
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Set option TCP_NODELAY (disable Nagle's algorithm) on socket
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME THREAD_CACHE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
@@ -4172,6 +4262,16 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME TLS_VERSION
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT TLS protocol version for secure connections.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME TMPDIR
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
@@ -4289,7 +4389,7 @@ VARIABLE_COMMENT Specifies how to use system statistics tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY
+ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY,COMPLEMENTARY_FOR_QUERIES,PREFERABLY_FOR_QUERIES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERSION
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index 67e15405313..4bff3d4441e 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@ -129,18 +129,18 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_DEBUG
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
+GLOBAL_VALUE NONE
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
+DEFAULT_VALUE NONE
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT To enable debug level logging
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT WSREP debug level logging
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
+ENUM_VALUE_LIST NONE,SERVER,TRANSACTION,STREAMING,CLIENT
READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_DESYNC
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -225,14 +225,28 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_IGNORE_APPLY_ERRORS
+SESSION_VALUE NULL
+GLOBAL_VALUE 7
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 7
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Ignore replication errors
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 7
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_LOAD_DATA_SPLITTING
SESSION_VALUE NULL
-GLOBAL_VALUE ON
+GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
+DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT To commit LOAD DATA transaction after every 10K rows inserted
+VARIABLE_COMMENT To commit LOAD DATA transaction after every 10K rows inserted (deprecated)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -533,6 +547,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_SR_STORE
+SESSION_VALUE NULL
+GLOBAL_VALUE table
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE table
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Storage for streaming replication fragments
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST none,table
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SST_AUTH
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -631,3 +659,31 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_TRX_FRAGMENT_SIZE
+SESSION_VALUE 0
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Size of transaction fragments for streaming replication (measured in units of 'wsrep_trx_fragment_unit')
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2147483647
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_TRX_FRAGMENT_UNIT
+SESSION_VALUE bytes
+GLOBAL_VALUE bytes
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE bytes
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Unit for streaming replication transaction fragments' size: bytes, rows, statements
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST bytes,rows,statements
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
diff --git a/mysql-test/suite/sys_vars/r/tcp_nodelay.result b/mysql-test/suite/sys_vars/r/tcp_nodelay.result
new file mode 100644
index 00000000000..ebb027e8cf6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/tcp_nodelay.result
@@ -0,0 +1,5 @@
+SET tcp_nodelay=0;
+SET tcp_nodelay=1;
+SET tcp_nodelay=default;
+SET GLOBAL tcp_nodelay=0;
+ERROR HY000: Variable 'tcp_nodelay' is a SESSION variable
diff --git a/mysql-test/suite/sys_vars/r/tmp_disk_table_size_basic.result b/mysql-test/suite/sys_vars/r/tmp_disk_table_size_basic.result
index 0acf8428100..81453d72274 100644
--- a/mysql-test/suite/sys_vars/r/tmp_disk_table_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/tmp_disk_table_size_basic.result
@@ -142,5 +142,17 @@ SELECT global.tmp_disk_table_size;
ERROR 42S02: Unknown table 'global' in field list
SELECT tmp_disk_table_size = @@session.tmp_disk_table_size;
ERROR 42S22: Unknown column 'tmp_disk_table_size' in 'field list'
+#
+# Beginning of 10.4 test
+#
+# Diagnostics_area::sql_errno() const: Assertion `m_status == DA_ERROR'
+# failed on SELECT after setting tmp_disk_table_size.
+#
+SET @@tmp_disk_table_size=16384;
+CREATE VIEW v AS SELECT 'a';
+SELECT table_name FROM INFORMATION_SCHEMA.views;
+ERROR HY000: The table '(temporary)' is full
+DROP VIEW v;
+# End of 10.4 test
SET @@global.tmp_disk_table_size = @start_global_value;
SET @@session.tmp_disk_table_size = @start_session_value;
diff --git a/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result b/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result
index 64f6d868fa6..1de75b65caf 100644
--- a/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result
+++ b/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result
@@ -1,16 +1,16 @@
SET @start_global_value = @@global.use_stat_tables;
SELECT @start_global_value;
@start_global_value
-NEVER
+PREFERABLY
SET @start_session_value = @@session.use_stat_tables;
SELECT @start_session_value;
@start_session_value
-NEVER
+PREFERABLY
SET @@global.use_stat_tables = 2;
SET @@global.use_stat_tables = DEFAULT;
SELECT @@global.use_stat_tables;
@@global.use_stat_tables
-NEVER
+PREFERABLY_FOR_QUERIES
SET @@global.use_stat_tables = 0;
SELECT @@global.use_stat_tables;
@@global.use_stat_tables
@@ -87,9 +87,9 @@ USE_STAT_TABLES COMPLEMENTARY
SET @@global.use_stat_tables = @start_global_value;
SELECT @@global.use_stat_tables;
@@global.use_stat_tables
-NEVER
+PREFERABLY
SET @@session.use_stat_tables = @start_session_value;
SELECT @@session.use_stat_tables;
@@session.use_stat_tables
-NEVER
+PREFERABLY
set sql_mode='';
diff --git a/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result b/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
index 96c262c110c..1c9c2ddf3a3 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
@@ -6,39 +6,45 @@ SET @wsrep_debug_global_saved = @@global.wsrep_debug;
# default
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
-0
+NONE
# scope
SELECT @@session.wsrep_debug;
ERROR HY000: Variable 'wsrep_debug' is a GLOBAL variable
-SET @@global.wsrep_debug=OFF;
+SET @@global.wsrep_debug=0;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
-0
-SET @@global.wsrep_debug=ON;
+NONE
+SET @@global.wsrep_debug=1;
+Warnings:
+Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
-1
+NONE
# valid values
-SET @@global.wsrep_debug='OFF';
+SET @@global.wsrep_debug=NONE;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
-0
-SET @@global.wsrep_debug=ON;
+NONE
+SET @@global.wsrep_debug=SERVER;
+Warnings:
+Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
-1
+NONE
SET @@global.wsrep_debug=default;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
-0
+NONE
# invalid values
SET @@global.wsrep_debug=NULL;
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'NULL'
SET @@global.wsrep_debug='junk';
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'junk'
+SET @@global.wsrep_debug=ON;
+ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'ON'
# restore the initial value
SET @@global.wsrep_debug = @wsrep_debug_global_saved;
diff --git a/mysql-test/suite/sys_vars/r/wsrep_load_data_splitting_basic.result b/mysql-test/suite/sys_vars/r/wsrep_load_data_splitting_basic.result
index 687934a7705..3171a690486 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_load_data_splitting_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_load_data_splitting_basic.result
@@ -6,33 +6,43 @@ SET @wsrep_load_data_splitting_global_saved = @@global.wsrep_load_data_splitting
# default
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
-1
+0
# scope
SELECT @@session.wsrep_load_data_splitting;
ERROR HY000: Variable 'wsrep_load_data_splitting' is a GLOBAL variable
SET @@global.wsrep_load_data_splitting=OFF;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
SET @@global.wsrep_load_data_splitting=ON;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
# valid values
SET @@global.wsrep_load_data_splitting='OFF';
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
SET @@global.wsrep_load_data_splitting=ON;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
SET @@global.wsrep_load_data_splitting=default;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
-1
+0
# invalid values
SET @@global.wsrep_load_data_splitting=NULL;
@@ -42,4 +52,6 @@ ERROR 42000: Variable 'wsrep_load_data_splitting' can't be set to the value of '
# restore the initial value
SET @@global.wsrep_load_data_splitting = @wsrep_load_data_splitting_global_saved;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
# End of test
diff --git a/mysql-test/suite/sys_vars/r/wsrep_on_basic.result b/mysql-test/suite/sys_vars/r/wsrep_on_basic.result
deleted file mode 100644
index 735e2d77180..00000000000
--- a/mysql-test/suite/sys_vars/r/wsrep_on_basic.result
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# wsrep_on
-#
-# save the initial values
-SET @wsrep_on_global_saved = @@global.wsrep_on;
-SET @wsrep_on_session_saved = @@session.wsrep_on;
-# default
-SELECT @@global.wsrep_on;
-@@global.wsrep_on
-0
-SELECT @@session.wsrep_on;
-@@session.wsrep_on
-0
-
-# scope and valid values
-SET @@global.wsrep_on=OFF;
-SELECT @@global.wsrep_on;
-@@global.wsrep_on
-0
-SET @@global.wsrep_on=ON;
-SELECT @@global.wsrep_on;
-@@global.wsrep_on
-1
-SET @@session.wsrep_on=OFF;
-SELECT @@session.wsrep_on;
-@@session.wsrep_on
-0
-SET @@session.wsrep_on=ON;
-SELECT @@session.wsrep_on;
-@@session.wsrep_on
-1
-SET @@session.wsrep_on=default;
-SELECT @@session.wsrep_on;
-@@session.wsrep_on
-1
-
-# invalid values
-SET @@global.wsrep_on=NULL;
-ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
-SET @@global.wsrep_on='junk';
-ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
-SET @@session.wsrep_on=NULL;
-ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
-SET @@session.wsrep_on='junk';
-ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
-
-# restore the initial values
-SET @@global.wsrep_on = @wsrep_on_global_saved;
-SET @@session.wsrep_on = @wsrep_on_session_saved;
-# End of test
diff --git a/mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result b/mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result
new file mode 100644
index 00000000000..525619dba29
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/wsrep_on_without_provider.result
@@ -0,0 +1,5 @@
+SET GLOBAL wsrep_on=ON;
+ERROR HY000: WSREP (galera) can't be enabled if the wsrep_provider is unset or set to 'none'
+SELECT @@global.wsrep_on;
+@@global.wsrep_on
+0
diff --git a/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result b/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result
deleted file mode 100644
index a49e6135d47..00000000000
--- a/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# wsrep_start_position
-#
-# save the initial value
-SET @wsrep_start_position_global_saved = @@global.wsrep_start_position;
-# default
-SELECT @@global.wsrep_start_position;
-@@global.wsrep_start_position
-00000000-0000-0000-0000-000000000000:-1
-
-# scope
-SELECT @@session.wsrep_start_position;
-ERROR HY000: Variable 'wsrep_start_position' is a GLOBAL variable
-SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1';
-SELECT @@global.wsrep_start_position;
-@@global.wsrep_start_position
-00000000-0000-0000-0000-000000000000:-1
-
-# valid values
-SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2';
-SELECT @@global.wsrep_start_position;
-@@global.wsrep_start_position
-00000000-0000-0000-0000-000000000000:-2
-SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
-SELECT @@global.wsrep_start_position;
-@@global.wsrep_start_position
-12345678-1234-1234-1234-123456789012:100
-SET @@global.wsrep_start_position=default;
-SELECT @@global.wsrep_start_position;
-@@global.wsrep_start_position
-00000000-0000-0000-0000-000000000000:-1
-
-# invalid values
-SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '000000000000000-0000-0000-0000-000000000000:-1'
-SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-12345-123456789012:100'
-SET @@global.wsrep_start_position='12345678-1234-123-12345-123456789012:0';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-123-12345-123456789012:0'
-SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:_99999';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:_99999'
-SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:a';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:a'
-SET @@global.wsrep_start_position='OFF';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'OFF'
-SET @@global.wsrep_start_position=ON;
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'ON'
-SET @@global.wsrep_start_position='';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of ''
-SET @@global.wsrep_start_position=NULL;
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'NULL'
-SET @@global.wsrep_start_position='junk';
-ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'junk'
-
-# restore the initial value
-SET @@global.wsrep_start_position = @wsrep_start_position_global_saved;
-# End of test
diff --git a/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test b/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test
index bb0f3417f87..947007a5dd1 100644
--- a/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test
@@ -22,6 +22,12 @@ SELECT @@global.innodb_checksum_algorithm;
SET GLOBAL innodb_checksum_algorithm = 'strict_none';
SELECT @@global.innodb_checksum_algorithm;
+SET GLOBAL innodb_checksum_algorithm = 'full_crc32';
+SELECT @@global.innodb_checksum_algorithm;
+
+SET GLOBAL innodb_checksum_algorithm = 'strict_full_crc32';
+SELECT @@global.innodb_checksum_algorithm;
+
-- error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_checksum_algorithm = '';
SELECT @@global.innodb_checksum_algorithm;
diff --git a/mysql-test/suite/sys_vars/t/innodb_instant_alter_column_allowed_basic.test b/mysql-test/suite/sys_vars/t/innodb_instant_alter_column_allowed_basic.test
index 4ff84b42a3a..c9921b18f96 100644
--- a/mysql-test/suite/sys_vars/t/innodb_instant_alter_column_allowed_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_instant_alter_column_allowed_basic.test
@@ -20,6 +20,8 @@ set global innodb_instant_alter_column_allowed=1.1;
set global innodb_instant_alter_column_allowed=-1;
select @@global.innodb_instant_alter_column_allowed;
--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_instant_alter_column_allowed=3;
+select @@global.innodb_instant_alter_column_allowed;
set global innodb_instant_alter_column_allowed=2;
select @@global.innodb_instant_alter_column_allowed;
set global innodb_instant_alter_column_allowed=1;
diff --git a/mysql-test/suite/sys_vars/t/myisam_stats_method_func.test b/mysql-test/suite/sys_vars/t/myisam_stats_method_func.test
index 42335f00c41..5cb01958aff 100644
--- a/mysql-test/suite/sys_vars/t/myisam_stats_method_func.test
+++ b/mysql-test/suite/sys_vars/t/myisam_stats_method_func.test
@@ -65,6 +65,8 @@ SHOW INDEX FROM t1;
--echo 'Set nulls to be equal'
#=====================================
SET myisam_stats_method = nulls_equal;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
INSERT INTO t1 VALUES (11);
DELETE FROM t1 WHERE a = 11;
@@ -75,6 +77,7 @@ DELETE FROM t1 WHERE a = 11;
CHECK TABLE t1;
SHOW INDEX FROM t1;
+
#=====================================
--echo 'Set nulls to be ignored'
#=====================================
@@ -98,6 +101,7 @@ ANALYZE TABLE t1;
SHOW INDEX FROM t1;
SET myisam_stats_method = DEFAULT;
+set @@use_stat_tables= @save_use_stat_tables;
DROP TABLE t1;
SET @@global.myisam_stats_method= @start_value;
diff --git a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test
deleted file mode 100644
index da165564791..00000000000
--- a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test
+++ /dev/null
@@ -1,25 +0,0 @@
---source include/windows.inc
---source include/not_embedded.inc
-#
-# only global
-#
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-select @@global.shared_memory_base_name;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.shared_memory_base_name;
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-show global variables like 'shared_memory_base_name';
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-show session variables like 'shared_memory_base_name';
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-select * from information_schema.global_variables where variable_name='shared_memory_base_name';
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-select * from information_schema.session_variables where variable_name='shared_memory_base_name';
-
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global shared_memory_base_name=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session shared_memory_base_name=1;
diff --git a/mysql-test/suite/sys_vars/t/shared_memory_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_basic.test
deleted file mode 100644
index 57be4ef7ecd..00000000000
--- a/mysql-test/suite/sys_vars/t/shared_memory_basic.test
+++ /dev/null
@@ -1,20 +0,0 @@
---source include/windows.inc
---source include/not_embedded.inc
-#
-# only global
-#
-select @@global.shared_memory;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.shared_memory;
-show global variables like 'shared_memory';
-show session variables like 'shared_memory';
-select * from information_schema.global_variables where variable_name='shared_memory';
-select * from information_schema.session_variables where variable_name='shared_memory';
-
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global shared_memory=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session shared_memory=1;
diff --git a/mysql-test/suite/sys_vars/t/sql_mode_basic.test b/mysql-test/suite/sys_vars/t/sql_mode_basic.test
index b4841ecd3ff..68be8ba969b 100644
--- a/mysql-test/suite/sys_vars/t/sql_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_mode_basic.test
@@ -310,8 +310,14 @@ SELECT @@global.sql_mode;
SET @@global.sql_mode = 17179869183;
SELECT @@global.sql_mode;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_mode = 17179869184;
+SELECT @@global.sql_mode;
+
+SET @@global.sql_mode = 34359738367;
+SELECT @@global.sql_mode;
+
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.sql_mode = 34359738368;
# use of decimal values
diff --git a/mysql-test/suite/sys_vars/t/tcp_nodelay.test b/mysql-test/suite/sys_vars/t/tcp_nodelay.test
new file mode 100644
index 00000000000..780bad68039
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/tcp_nodelay.test
@@ -0,0 +1,7 @@
+--source include/not_embedded.inc
+# A smoke test for tcp_nodelay option
+SET tcp_nodelay=0;
+SET tcp_nodelay=1;
+SET tcp_nodelay=default;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET GLOBAL tcp_nodelay=0;
diff --git a/mysql-test/suite/sys_vars/t/thread_stack_basic.test b/mysql-test/suite/sys_vars/t/thread_stack_basic.test
index 41015033fe9..39f120e0de1 100644
--- a/mysql-test/suite/sys_vars/t/thread_stack_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_stack_basic.test
@@ -1,6 +1,8 @@
#
# only global
#
+--source include/not_asan.inc
+--source include/not_ubsan.inc
--replace_result 392192 299008
select @@global.thread_stack;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
diff --git a/mysql-test/suite/sys_vars/t/tmp_disk_table_size_basic.test b/mysql-test/suite/sys_vars/t/tmp_disk_table_size_basic.test
index 123f522a3a4..099be354486 100644
--- a/mysql-test/suite/sys_vars/t/tmp_disk_table_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/tmp_disk_table_size_basic.test
@@ -193,6 +193,22 @@ SELECT global.tmp_disk_table_size;
--Error ER_BAD_FIELD_ERROR
SELECT tmp_disk_table_size = @@session.tmp_disk_table_size;
+--echo #
+--echo # Beginning of 10.4 test
+--echo #
+--echo # Diagnostics_area::sql_errno() const: Assertion `m_status == DA_ERROR'
+--echo # failed on SELECT after setting tmp_disk_table_size.
+--echo #
+
+SET @@tmp_disk_table_size=16384;
+CREATE VIEW v AS SELECT 'a';
+
+--error ER_RECORD_FILE_FULL
+SELECT table_name FROM INFORMATION_SCHEMA.views;
+
+DROP VIEW v;
+
+--echo # End of 10.4 test
####################################
# Restore initial value #
diff --git a/mysql-test/suite/sys_vars/t/wsrep_debug_basic.test b/mysql-test/suite/sys_vars/t/wsrep_debug_basic.test
index 50576ff064e..165560bb25a 100644
--- a/mysql-test/suite/sys_vars/t/wsrep_debug_basic.test
+++ b/mysql-test/suite/sys_vars/t/wsrep_debug_basic.test
@@ -14,16 +14,16 @@ SELECT @@global.wsrep_debug;
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_debug;
-SET @@global.wsrep_debug=OFF;
+SET @@global.wsrep_debug=0;
SELECT @@global.wsrep_debug;
-SET @@global.wsrep_debug=ON;
+SET @@global.wsrep_debug=1;
SELECT @@global.wsrep_debug;
--echo
--echo # valid values
-SET @@global.wsrep_debug='OFF';
+SET @@global.wsrep_debug=NONE;
SELECT @@global.wsrep_debug;
-SET @@global.wsrep_debug=ON;
+SET @@global.wsrep_debug=SERVER;
SELECT @@global.wsrep_debug;
SET @@global.wsrep_debug=default;
SELECT @@global.wsrep_debug;
@@ -34,6 +34,8 @@ SELECT @@global.wsrep_debug;
SET @@global.wsrep_debug=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_debug='junk';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_debug=ON;
--echo
--echo # restore the initial value
diff --git a/mysql-test/suite/sys_vars/t/wsrep_on_basic.test b/mysql-test/suite/sys_vars/t/wsrep_on_basic.test
deleted file mode 100644
index 229d771b5e7..00000000000
--- a/mysql-test/suite/sys_vars/t/wsrep_on_basic.test
+++ /dev/null
@@ -1,45 +0,0 @@
---source include/have_wsrep.inc
-
---echo #
---echo # wsrep_on
---echo #
-
---echo # save the initial values
-SET @wsrep_on_global_saved = @@global.wsrep_on;
-SET @wsrep_on_session_saved = @@session.wsrep_on;
-
---echo # default
-SELECT @@global.wsrep_on;
-SELECT @@session.wsrep_on;
-
---echo
---echo # scope and valid values
-SET @@global.wsrep_on=OFF;
-SELECT @@global.wsrep_on;
-SET @@global.wsrep_on=ON;
-SELECT @@global.wsrep_on;
-
-SET @@session.wsrep_on=OFF;
-SELECT @@session.wsrep_on;
-SET @@session.wsrep_on=ON;
-SELECT @@session.wsrep_on;
-SET @@session.wsrep_on=default;
-SELECT @@session.wsrep_on;
-
---echo
---echo # invalid values
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_on=NULL;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_on='junk';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@session.wsrep_on=NULL;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@session.wsrep_on='junk';
-
---echo
---echo # restore the initial values
-SET @@global.wsrep_on = @wsrep_on_global_saved;
-SET @@session.wsrep_on = @wsrep_on_session_saved;
-
---echo # End of test
diff --git a/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test b/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test
new file mode 100644
index 00000000000..5bee3c9a356
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test
@@ -0,0 +1,9 @@
+--source include/not_embedded.inc
+
+#
+# @@global.wsrep_on is not allowed if there
+# is no wsrep_provider
+#
+--error ER_WRONG_ARGUMENTS
+SET GLOBAL wsrep_on=ON;
+SELECT @@global.wsrep_on; \ No newline at end of file
diff --git a/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test b/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test
deleted file mode 100644
index 3e57cfa6da2..00000000000
--- a/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test
+++ /dev/null
@@ -1,56 +0,0 @@
---source include/have_wsrep.inc
-
---echo #
---echo # wsrep_start_position
---echo #
-
---echo # save the initial value
-SET @wsrep_start_position_global_saved = @@global.wsrep_start_position;
-
---echo # default
-SELECT @@global.wsrep_start_position;
-
---echo
---echo # scope
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.wsrep_start_position;
-SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1';
-SELECT @@global.wsrep_start_position;
-
---echo
---echo # valid values
-SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2';
-SELECT @@global.wsrep_start_position;
-SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
-SELECT @@global.wsrep_start_position;
-SET @@global.wsrep_start_position=default;
-SELECT @@global.wsrep_start_position;
-
---echo
---echo # invalid values
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='12345678-1234-123-12345-123456789012:0';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:_99999';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:a';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='OFF';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position=ON;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='';
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position=NULL;
---error ER_WRONG_VALUE_FOR_VAR
-SET @@global.wsrep_start_position='junk';
-
---echo
---echo # restore the initial value
-SET @@global.wsrep_start_position = @wsrep_start_position_global_saved;
-
---echo # End of test
diff --git a/mysql-test/suite/vcol/inc/vcol_select.inc b/mysql-test/suite/vcol/inc/vcol_select.inc
index 0641e14564a..cbd1f2cdd26 100644
--- a/mysql-test/suite/vcol/inc/vcol_select.inc
+++ b/mysql-test/suite/vcol/inc/vcol_select.inc
@@ -35,7 +35,7 @@ insert into t2 (a) values (1);
create table t3 (a int primary key,
b int as (-a),
c int as (-a) persistent unique);
-insert into t3 (a) values (2),(1),(3);
+insert into t3 (a) values (2),(1),(3),(5),(4),(7);
--echo # select_type=SIMPLE, type=system
diff --git a/mysql-test/suite/vcol/r/update.result b/mysql-test/suite/vcol/r/update.result
index 3e8bbc43246..fe235228698 100644
--- a/mysql-test/suite/vcol/r/update.result
+++ b/mysql-test/suite/vcol/r/update.result
@@ -122,7 +122,7 @@ select * from t;
a b c d e
10 5 5 5 5
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -130,7 +130,7 @@ select * from t;
a b c d e
10 6 6 6 6
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
diff --git a/mysql-test/suite/vcol/r/update_binlog.result b/mysql-test/suite/vcol/r/update_binlog.result
index 977037535b4..822381a1944 100644
--- a/mysql-test/suite/vcol/r/update_binlog.result
+++ b/mysql-test/suite/vcol/r/update_binlog.result
@@ -124,7 +124,7 @@ select * from t;
a b c d e
10 5 5 5 5
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -132,7 +132,7 @@ select * from t;
a b c d e
10 6 6 6 6
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -304,7 +304,7 @@ select * from t;
a b c d e
10 5 5 5 5
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -312,7 +312,7 @@ select * from t;
a b c d e
10 6 6 6 6
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
diff --git a/mysql-test/suite/vcol/r/vcol_keys_innodb.result b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
index c327b369ea3..9419c35bb38 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
@@ -257,6 +257,11 @@ insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_y
('foo',1,'2010-05-08 13:08:12.034783','18:32:14','foo',b'0111110101001001',1992,'f',0.2,'','1994-12-26','2019-01-11 00:00:00'),
('bar',6,'1900-01-01 00:00:00','00:00:00','bar',b'10011000001101011000101',1985,'b',0.7,'','2028-04-06','1971-01-01 00:00:00');
alter table t1 add index(vcol_datetime);
+Warnings:
+Warning 1901 Function or expression '`col_datetime`' cannot be used in the GENERATED ALWAYS AS clause of `vcol_datetime`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+Warning 1901 Function or expression '`col_datetime`' cannot be used in the GENERATED ALWAYS AS clause of `vcol_datetime`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
drop table t1;
create table t1 (
pk int,
diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
index dd6e4c414f0..803f7446810 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
@@ -277,6 +277,7 @@ a b c d
delete from t1 where b=12;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -389,7 +390,7 @@ drop table t1;
CREATE TABLE t1 (i INT, d1 DATE, d2 DATE NOT NULL, t TIMESTAMP, KEY(t)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,'2023-03-16','2023-03-15','2012-12-12 12:12:12');
ALTER TABLE t1 MODIFY t FLOAT AS (i) PERSISTENT;
-SELECT i, d1, d2 FROM t1 INTO OUTFILE 'load_t1';
+SELECT i, d1, d2 INTO OUTFILE 'load_t1' FROM t1;
DELETE FROM t1;
LOAD DATA INFILE 'load_t1' INTO TABLE t1 (i,d1,d2);
SELECT * FROM t1 WHERE d2 < d1;
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index 155d647aa0f..8af93c774c8 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -182,16 +182,36 @@ a b c
2 3 y
0 1 y,n
drop table t1,t2;
-CREATE TABLE t1 (
+SET @old_debug= @@global.debug;
+SET @old_debug= @@global.debug;
+SET GLOBAL debug_dbug= "+d,write_delay_wakeup";
+CREATE TABLE t1 (a int,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL
) ENGINE=MyISAM;
-INSERT INTO t1 (tsv) VALUES (DEFAULT);
-INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT);
+# First test FLUSH TABLES
+INSERT INTO t1 (a,tsv) VALUES (1,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (2,DEFAULT);
FLUSH TABLES;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+# Then test FLUSH TABLES t1;
+INSERT INTO t1 (a,tsv) VALUES (3,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (4,DEFAULT);
+FLUSH TABLES t1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+# Then test FLUSH TABLES WITH READ LOCK;
+INSERT INTO t1 (a,tsv) VALUES (5,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (6,DEFAULT);
+FLUSH TABLES WITH READ LOCK;
SELECT COUNT(*) FROM t1;
COUNT(*)
-2
+6
+set GLOBAL debug_dbug= @old_debug;
+unlock tables;
DROP TABLE t1;
#
# MDEV-4823 Server crashes in Item_func_not::fix_fields on
diff --git a/mysql-test/suite/vcol/r/vcol_select_innodb.result b/mysql-test/suite/vcol/r/vcol_select_innodb.result
index 63c35bade07..0f6cdf918f9 100644
--- a/mysql-test/suite/vcol/r/vcol_select_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_select_innodb.result
@@ -9,7 +9,7 @@ insert into t2 (a) values (1);
create table t3 (a int primary key,
b int as (-a),
c int as (-a) persistent unique);
-insert into t3 (a) values (2),(1),(3);
+insert into t3 (a) values (2),(1),(3),(5),(4),(7);
# select_type=SIMPLE, type=system
select * from t2;
a b c
@@ -63,8 +63,8 @@ a b c
3 -3 -3
explain select * from t1 where b in (select c from t3);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using index
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index
# select_type=PRIMARY, type=range,ref
select * from t1 where c in (select c from t3 where c between -2 and -1);
a b c
@@ -73,7 +73,7 @@ a b c
1 -1 -1
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index
+1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index
1 PRIMARY t1 ALL c NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
@@ -160,7 +160,7 @@ a b c
2 -2 -2
explain select * from t3 where b between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where
# SELECT * FROM tbl_name WHERE <indexed vcol expr>
select * from t3 where c between -2 and -1;
a b c
@@ -192,7 +192,7 @@ a b c
2 -2 -2
explain select * from t3 where b between -2 and -1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index NULL PRIMARY 4 NULL 3 Using where
+1 SIMPLE t3 index NULL PRIMARY 4 NULL 6 Using where
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-indexed vcol>
select * from t3 where b between -2 and -1 order by b;
a b c
@@ -200,7 +200,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-indexed vcol>
select * from t3 where c between -2 and -1 order by b;
a b c
@@ -216,7 +216,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <indexed vcol>
select * from t3 where c between -2 and -1 order by c;
a b c
diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result
index d6a8babc045..017531f31eb 100644
--- a/mysql-test/suite/vcol/r/vcol_select_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result
@@ -9,7 +9,7 @@ insert into t2 (a) values (1);
create table t3 (a int primary key,
b int as (-a),
c int as (-a) persistent unique);
-insert into t3 (a) values (2),(1),(3);
+insert into t3 (a) values (2),(1),(3),(5),(4),(7);
# select_type=SIMPLE, type=system
select * from t2;
a b c
@@ -44,7 +44,7 @@ a b c
1 -1 -1
explain select * from t3 where c>=-1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 2 Using index condition
+1 SIMPLE t3 range c c 5 NULL 1 Using index condition
# select_type=SIMPLE, type=ref
select * from t1,t3 where t1.c=t3.c and t3.c=-1;
a b c a b c
@@ -63,8 +63,8 @@ a b c
3 -3 -3
explain select * from t1 where b in (select c from t3);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using index
-1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index
# select_type=PRIMARY, type=range,ref
select * from t1 where c in (select c from t3 where c between -2 and -1);
a b c
@@ -73,8 +73,8 @@ a b c
1 -1 -1
explain select * from t1 where c in (select c from t3 where c between -2 and -1);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index
-1 PRIMARY t1 ref c c 5 test.t3.c 2
+1 PRIMARY t1 range c c 5 NULL 3 Using index condition
+1 PRIMARY t3 eq_ref c c 5 test.t1.c 1 Using index
# select_type=UNION, type=system
# select_type=UNION RESULT, type=<union1,2>
select * from t1 union select * from t2;
@@ -152,7 +152,7 @@ a b c
2 -2 -2
explain select * from t3 where a between 1 and 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition
+1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr>
select * from t3 where b between -2 and -1;
a b c
@@ -160,7 +160,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where
# SELECT * FROM tbl_name WHERE <indexed vcol expr>
select * from t3 where c between -2 and -1;
a b c
@@ -168,7 +168,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition
# SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <indexed vcol>
select * from t3 where a between 1 and 2 order by c;
a b c
@@ -176,7 +176,7 @@ a b c
1 -1 -1
explain select * from t3 where a between 1 and 2 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Using filesort
+1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-vcol>
select * from t3 where b between -2 and -1 order by a;
a b c
@@ -184,7 +184,7 @@ a b c
2 -2 -2
explain select * from t3 where b between -2 and -1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-vcol>
select * from t3 where c between -2 and -1 order by a;
a b c
@@ -192,7 +192,7 @@ a b c
2 -2 -2
explain select * from t3 where c between -2 and -1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Using filesort
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-indexed vcol>
select * from t3 where b between -2 and -1 order by b;
a b c
@@ -200,7 +200,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-indexed vcol>
select * from t3 where c between -2 and -1 order by b;
a b c
@@ -208,7 +208,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Using filesort
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <indexed vcol>
select * from t3 where b between -2 and -1 order by c;
a b c
@@ -216,7 +216,7 @@ a b c
1 -1 -1
explain select * from t3 where b between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort
+1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <indexed vcol>
select * from t3 where c between -2 and -1 order by c;
a b c
@@ -224,7 +224,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range c c 5 NULL 1 Using index condition
+1 SIMPLE t3 range c c 5 NULL 2 Using index condition
# SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol>
select sum(b) from t1 group by b;
sum(b)
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode.result b/mysql-test/suite/vcol/r/vcol_sql_mode.result
index 385939fd037..ecbafc87b84 100644
--- a/mysql-test/suite/vcol/r/vcol_sql_mode.result
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode.result
@@ -26,6 +26,9 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v));
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
DROP TABLE t1;
CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v));
Warnings:
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result b/mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result
new file mode 100644
index 00000000000..151b95095a8
--- /dev/null
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_datetime.result
@@ -0,0 +1,125 @@
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
+#
+SET sql_mode=DEFAULT;
+# OK: same FSP + virtual index
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(4) AS (t) VIRTUAL,
+KEY(v,d)
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(4) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+KEY(v,d)
+);
+DROP TABLE t1;
+# OK: lower FSP + no virtual index
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(3) AS (t) VIRTUAL
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL
+);
+DROP TABLE t1;
+# NOT OK: lower FSP + virtual index
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(3) AS (t) VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(3) AS (COALESCE(t)) VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+# OK: lower FSP + ROUND + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(3) AS (ROUND(t,3)) VIRTUAL,
+KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+t d v
+2006-03-01 12:44:34.0496 2029-10-10 21:27:53 2006-03-01 12:44:34.050
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+# OK: lower FSP + TRUNCATE + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+t DATETIME(4),
+d DATETIME,
+v DATETIME(3) AS (TRUNCATE(t,3)) VIRTUAL,
+KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+t d v
+2006-03-01 12:44:34.0496 2029-10-10 21:27:53 2006-03-01 12:44:34.049
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
+#
+CREATE TABLE t1 (
+a DATETIME(6),
+v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL,
+KEY (v)
+);
+Warnings:
+Warning 1901 Function or expression 'cast(`a` as datetime(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+a DATETIME(6),
+v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
+KEY (v)
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+a DATETIME(6),
+v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
+KEY (v)
+);
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_time.result b/mysql-test/suite/vcol/r/vcol_sql_mode_time.result
new file mode 100644
index 00000000000..adf650fff9f
--- /dev/null
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_time.result
@@ -0,0 +1,125 @@
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
+#
+SET sql_mode=DEFAULT;
+# OK: same FSP + virtual index
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(4) AS (t) VIRTUAL,
+KEY(v,d)
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(4) AS ('10:20:30.1234') VIRTUAL,
+KEY(v,d)
+);
+DROP TABLE t1;
+# OK: lower FSP + no virtual index
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(3) AS (t) VIRTUAL
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL
+);
+DROP TABLE t1;
+# NOT OK: lower FSP + virtual index
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(3) AS (t) VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(3) AS (COALESCE(t)) VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+# OK: lower FSP + ROUND + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(3) AS (ROUND(t,3)) VIRTUAL,
+KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('12:44:34.0496','21:27:53');
+SELECT * FROM t1;
+t d v
+12:44:34.0496 21:27:53 12:44:34.050
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = CURRENT_TIME;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+# OK: lower FSP + TRUNCATE + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+t TIME(4),
+d TIME,
+v TIME(3) AS (TRUNCATE(t,3)) VIRTUAL,
+KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('12:44:34.0496','21:27:53');
+SELECT * FROM t1;
+t d v
+12:44:34.0496 21:27:53 12:44:34.049
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = CURRENT_TIME;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
+#
+CREATE TABLE t1 (
+a TIME(6),
+v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL,
+KEY (v)
+);
+Warnings:
+Warning 1901 Function or expression 'cast(`a` as time(3))' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+a TIME(6),
+v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
+KEY (v)
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+a TIME(6),
+v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
+KEY (v)
+);
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result b/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
new file mode 100644
index 00000000000..7c82856717d
--- /dev/null
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
@@ -0,0 +1,118 @@
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
+#
+SET sql_mode=DEFAULT;
+# OK: same FSP + virtual index
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(4) AS (t) VIRTUAL,
+KEY(v,d)
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(4) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+KEY(v,d)
+);
+DROP TABLE t1;
+# OK: lower FSP + no virtual index
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(3) AS (t) VIRTUAL
+);
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL
+);
+DROP TABLE t1;
+# NOT OK: lower FSP + virtual index
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(3) AS (t) VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression '`t`' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(3) AS (COALESCE(t)) VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression 'coalesce(`t`)' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+KEY(v,d)
+);
+Warnings:
+Warning 1901 Function or expression ''2001-01-01 10:20:30.1234'' cannot be used in the GENERATED ALWAYS AS clause of `v`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+# OK: lower FSP + ROUND + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(3) AS (ROUND(t,3)) VIRTUAL,
+KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+t d v
+2006-03-01 12:44:34.0496 2029-10-10 21:27:53 2006-03-01 12:44:34.050
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+# OK: lower FSP + TRUNCATE + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+t TIMESTAMP(4),
+d DATETIME,
+v TIMESTAMP(3) AS (TRUNCATE(t,3)) VIRTUAL,
+KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+t d v
+2006-03-01 12:44:34.0496 2029-10-10 21:27:53 2006-03-01 12:44:34.049
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-20639 ASAN SEGV in get_prefix upon modifying base column type with existing indexed virtual column
+#
+CREATE TABLE t1 (
+a TIMESTAMP,
+b TIMESTAMP AS (a) VIRTUAL,
+KEY (b)
+);
+ALTER TABLE t1 MODIFY a BLOB FIRST;
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/vcol/r/vcol_syntax.result b/mysql-test/suite/vcol/r/vcol_syntax.result
index e2131be2cce..d1339af2986 100644
--- a/mysql-test/suite/vcol/r/vcol_syntax.result
+++ b/mysql-test/suite/vcol/r/vcol_syntax.result
@@ -170,10 +170,10 @@ select 1 from t1 x natural join t1;
1
1
Warnings:
-Warning 1292 Incorrect datetime value: 'x'
-Warning 1292 Incorrect datetime value: 'root@localhost'
-Warning 1292 Incorrect datetime value: 'x'
-Warning 1292 Incorrect datetime value: 'root@localhost'
+Warning 1292 Truncated incorrect datetime value: 'x'
+Warning 1292 Truncated incorrect datetime value: 'root@localhost'
+Warning 1292 Truncated incorrect datetime value: 'x'
+Warning 1292 Truncated incorrect datetime value: 'root@localhost'
drop table t1;
# MDEV-28089 (duplicate)
create table t1 (a int , b date as (1 in ('x' ,(database () = 'x' is null) ))) ;
diff --git a/mysql-test/suite/vcol/r/wrong_arena.result b/mysql-test/suite/vcol/r/wrong_arena.result
index 8edcd5c881f..d5ba19b3db3 100644
--- a/mysql-test/suite/vcol/r/wrong_arena.result
+++ b/mysql-test/suite/vcol/r/wrong_arena.result
@@ -10,9 +10,9 @@ d int as ((a,a) in ((1,1),(2,1),(NULL,1))), # cmp_item_datetime
e int as ((a,1) in ((1,1),(2,1),(NULL,1))) # cmp_item_row::alloc_comparators()
);
Warnings:
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '2'
-Warning 1292 Incorrect datetime value: '3'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '2'
+Warning 1292 Truncated incorrect datetime value: '3'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -23,21 +23,21 @@ t1 CREATE TABLE `t1` (
`e` int(11) GENERATED ALWAYS AS ((`a`,1) in ((1,1),(2,1),(NULL,1))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Warnings:
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '2'
-Warning 1292 Incorrect datetime value: '3'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '2'
+Warning 1292 Truncated incorrect datetime value: '3'
connect con1, localhost, root;
insert t1 (a) values ('2010-10-10 10:10:10');
select * from t1;
a b c d e
2010-10-10 10:10:10 1 0 0 NULL
Warnings:
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '2'
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '1'
-Warning 1292 Incorrect datetime value: '2'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '2'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '2'
disconnect con1;
connection default;
select * from t1;
@@ -53,14 +53,14 @@ select * from t1;
a b
2010-10-10 10:10:10 0000-00-00 00:00:00
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
disconnect con1;
connection default;
select * from t1;
a b
2010-10-10 10:10:10 0000-00-00 00:00:00
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
drop table t1;
#
# MDEV-13435 Crash when selecting virtual columns generated using JSON functions
diff --git a/mysql-test/suite/vcol/t/update.test b/mysql-test/suite/vcol/t/update.test
index 4218f0e3efb..6065f926bff 100644
--- a/mysql-test/suite/vcol/t/update.test
+++ b/mysql-test/suite/vcol/t/update.test
@@ -93,10 +93,10 @@ check table t; select * from t;
insert t(a,b,d) select 10,4,4 on duplicate key update b=5, d=5;
check table t; select * from t;
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t; select * from t;
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t; select * from t;
--write_file $MYSQLTEST_VARDIR/tmp/vblobs.txt
10 8 foo 8 foo
diff --git a/mysql-test/suite/vcol/t/vcol_keys_myisam.test b/mysql-test/suite/vcol/t/vcol_keys_myisam.test
index 24612f4d55f..6c3a94d2086 100644
--- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test
@@ -281,7 +281,7 @@ drop table t1;
CREATE TABLE t1 (i INT, d1 DATE, d2 DATE NOT NULL, t TIMESTAMP, KEY(t)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,'2023-03-16','2023-03-15','2012-12-12 12:12:12');
ALTER TABLE t1 MODIFY t FLOAT AS (i) PERSISTENT;
-SELECT i, d1, d2 FROM t1 INTO OUTFILE 'load_t1';
+SELECT i, d1, d2 INTO OUTFILE 'load_t1' FROM t1;
DELETE FROM t1;
LOAD DATA INFILE 'load_t1' INTO TABLE t1 (i,d1,d2);
SELECT * FROM t1 WHERE d2 < d1;
diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test
index e693738d5c7..f696d5d5814 100644
--- a/mysql-test/suite/vcol/t/vcol_misc.test
+++ b/mysql-test/suite/vcol/t/vcol_misc.test
@@ -1,4 +1,5 @@
--source include/have_ucs2.inc
+--source include/have_debug.inc
let $MYSQLD_DATADIR= `select @@datadir`;
@@ -184,19 +185,35 @@ drop table t1,t2;
# Bug mdev-3938: INSERT DELAYED for a table with virtual columns
#
-CREATE TABLE t1 (
+SET @old_debug= @@global.debug;
+SET @old_debug= @@global.debug;
+SET GLOBAL debug_dbug= "+d,write_delay_wakeup";
+CREATE TABLE t1 (a int,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL
) ENGINE=MyISAM;
-INSERT INTO t1 (tsv) VALUES (DEFAULT);
-
-INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT);
-
+--echo # First test FLUSH TABLES
+INSERT INTO t1 (a,tsv) VALUES (1,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (2,DEFAULT);
FLUSH TABLES;
+# Count may be 1 or 2, depending on FLUSH happened before or after delayed
+SELECT COUNT(*) > 0 FROM t1;
+--echo # Then test FLUSH TABLES t1;
+INSERT INTO t1 (a,tsv) VALUES (3,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (4,DEFAULT);
+FLUSH TABLES t1;
SELECT COUNT(*) FROM t1;
+--echo # Then test FLUSH TABLES WITH READ LOCK;
+
+INSERT INTO t1 (a,tsv) VALUES (5,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (6,DEFAULT);
+FLUSH TABLES WITH READ LOCK;
+SELECT COUNT(*) FROM t1;
+set GLOBAL debug_dbug= @old_debug;
+unlock tables;
DROP TABLE t1;
--echo #
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test b/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test
new file mode 100644
index 00000000000..bef1e09b719
--- /dev/null
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_datetime.test
@@ -0,0 +1,138 @@
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
+--echo #
+
+SET sql_mode=DEFAULT;
+
+--echo # OK: same FSP + virtual index
+
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(4) AS (t) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(4) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+
+--echo # OK: lower FSP + no virtual index
+
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(3) AS (t) VIRTUAL
+);
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL
+);
+DROP TABLE t1;
+
+
+--echo # NOT OK: lower FSP + virtual index
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(3) AS (t) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(3) AS (COALESCE(t)) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+
+--echo # OK: lower FSP + ROUND + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(3) AS (ROUND(t,3)) VIRTUAL,
+ KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo # OK: lower FSP + TRUNCATE + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+ t DATETIME(4),
+ d DATETIME,
+ v DATETIME(3) AS (TRUNCATE(t,3)) VIRTUAL,
+ KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
+--echo #
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a DATETIME(6),
+ v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL,
+ KEY (v)
+);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a DATETIME(6),
+ v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
+ KEY (v)
+);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a DATETIME(6),
+ v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
+ KEY (v)
+);
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_time.test b/mysql-test/suite/vcol/t/vcol_sql_mode_time.test
new file mode 100644
index 00000000000..05160a43ebb
--- /dev/null
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_time.test
@@ -0,0 +1,139 @@
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
+--echo #
+
+SET sql_mode=DEFAULT;
+
+--echo # OK: same FSP + virtual index
+
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(4) AS (t) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(4) AS ('10:20:30.1234') VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+
+--echo # OK: lower FSP + no virtual index
+
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(3) AS (t) VIRTUAL
+);
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL
+);
+DROP TABLE t1;
+
+
+--echo # NOT OK: lower FSP + virtual index
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(3) AS (t) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(3) AS (COALESCE(t)) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+
+--echo # OK: lower FSP + ROUND + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(3) AS (ROUND(t,3)) VIRTUAL,
+ KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('12:44:34.0496','21:27:53');
+SELECT * FROM t1;
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = CURRENT_TIME;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo # OK: lower FSP + TRUNCATE + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+ t TIME(4),
+ d TIME,
+ v TIME(3) AS (TRUNCATE(t,3)) VIRTUAL,
+ KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('12:44:34.0496','21:27:53');
+SELECT * FROM t1;
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = CURRENT_TIME;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo #
+--echo # MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
+--echo #
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ a TIME(6),
+ v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL,
+ KEY (v)
+);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a TIME(6),
+ v VARCHAR(30) GENERATED ALWAYS AS (TRUNCATE(a,3)) VIRTUAL,
+ KEY (v)
+);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ a TIME(6),
+ v VARCHAR(30) GENERATED ALWAYS AS (ROUND(a,3)) VIRTUAL,
+ KEY (v)
+);
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
new file mode 100644
index 00000000000..4f38da75948
--- /dev/null
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
@@ -0,0 +1,124 @@
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
+--echo #
+
+SET sql_mode=DEFAULT;
+
+--echo # OK: same FSP + virtual index
+
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(4) AS (t) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(4) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+
+--echo # OK: lower FSP + no virtual index
+
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(3) AS (t) VIRTUAL
+);
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL
+);
+DROP TABLE t1;
+
+
+--echo # NOT OK: lower FSP + virtual index
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(3) AS (t) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(3) AS (COALESCE(t)) VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(3) AS ('2001-01-01 10:20:30.1234') VIRTUAL,
+ KEY(v,d)
+);
+DROP TABLE t1;
+
+
+--echo # OK: lower FSP + ROUND + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(3) AS (ROUND(t,3)) VIRTUAL,
+ KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo # OK: lower FSP + TRUNCATE + virtual index
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (
+ t TIMESTAMP(4),
+ d DATETIME,
+ v TIMESTAMP(3) AS (TRUNCATE(t,3)) VIRTUAL,
+ KEY(v,d)
+);
+INSERT IGNORE INTO t1 (t,d) VALUES ('2006-03-01 12:44:34.0496','2029-10-10 21:27:53');
+SELECT * FROM t1;
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+UPDATE IGNORE t1 SET d = NOW();
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # MDEV-20639 ASAN SEGV in get_prefix upon modifying base column type with existing indexed virtual column
+--echo #
+
+CREATE TABLE t1 (
+ a TIMESTAMP,
+ b TIMESTAMP AS (a) VIRTUAL,
+ KEY (b)
+);
+ALTER TABLE t1 MODIFY a BLOB FIRST;
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result
index 9af25d2f858..c3feab166c9 100644
--- a/mysql-test/suite/versioning/r/alter.result
+++ b/mysql-test/suite/versioning/r/alter.result
@@ -199,6 +199,8 @@ a
2
1
select row_start from t where a=3 into @tm;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
alter table t add column b int;
select @tm=row_start from t where a=3;
@tm=row_start
@@ -448,11 +450,11 @@ alter table t1 engine=myisam;
# MDEV-14692 crash in MDL_context::upgrade_shared_lock()
create or replace temporary table t (a int);
alter table t change column if exists b c bigint unsigned generated always as row start;
-ERROR HY000: TEMPORARY tables do not support system versioning
+ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
alter table t change column if exists b c bigint unsigned generated always as row end;
-ERROR HY000: TEMPORARY tables do not support system versioning
+ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
alter table t add system versioning;
-ERROR HY000: TEMPORARY tables do not support system versioning
+ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
drop table t;
# MDEV-14744 trx_id-based and transaction-based mixup in assertion
create or replace table t (c text) engine=innodb with system versioning;
@@ -528,9 +530,9 @@ ERROR HY000: Table `t` is already system-versioned
#
use mysql;
create or replace table t (x int) with system versioning;
-ERROR HY000: System versioning tables in the `mysql` database are not supported
-alter table user add system versioning;
-ERROR HY000: System versioning tables in the `mysql` database are not supported
+ERROR HY000: System-versioned tables in the `mysql` database are not supported
+alter table db add system versioning;
+ERROR HY000: System-versioned tables in the `mysql` database are not supported
use test;
# MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column
create or replace table t1 (i int, j int as (i), s timestamp(6) as row start, e timestamp(6) as row end, period for system_time(s,e)) with system versioning;
@@ -546,6 +548,7 @@ alter table t add check (a > 0);
insert into t values (0);
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t`
insert into t values (2);
+drop table t;
#
# MDEV-18869 Assertion `!((field)->vcol_info && (field)->stored_in_db())' failed in innodb_col_no upon altering table with system versioning
#
diff --git a/mysql-test/suite/versioning/r/commit_id.result b/mysql-test/suite/versioning/r/commit_id.result
index abf2eaf91ba..8815613292e 100644
--- a/mysql-test/suite/versioning/r/commit_id.result
+++ b/mysql-test/suite/versioning/r/commit_id.result
@@ -10,6 +10,8 @@ insert into t1 values ();
set @ts0= now(6);
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx0;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select transaction_id = @tx0 from mysql.transaction_registry
order by transaction_id desc limit 1;
transaction_id = @tx0
@@ -17,6 +19,8 @@ transaction_id = @tx0
set @ts1= now(6);
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx1;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select transaction_id = @tx1 from mysql.transaction_registry
order by transaction_id desc limit 1;
transaction_id = @tx1
@@ -24,6 +28,8 @@ transaction_id = @tx1
set @ts2= now(6);
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx2;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select transaction_id = @tx2 from mysql.transaction_registry
order by transaction_id desc limit 1;
transaction_id = @tx2
@@ -66,24 +72,32 @@ trt_trx_sees(0, @tx2)
set transaction isolation level read uncommitted;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx3;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select isolation_level = 'READ-UNCOMMITTED' from mysql.transaction_registry where transaction_id = @tx3;
isolation_level = 'READ-UNCOMMITTED'
1
set transaction isolation level read committed;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx4;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select isolation_level = 'READ-COMMITTED' from mysql.transaction_registry where transaction_id = @tx4;
isolation_level = 'READ-COMMITTED'
1
set transaction isolation level serializable;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx5;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select isolation_level = 'SERIALIZABLE' from mysql.transaction_registry where transaction_id = @tx5;
isolation_level = 'SERIALIZABLE'
1
set transaction isolation level repeatable read;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx6;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select isolation_level = 'REPEATABLE-READ' from mysql.transaction_registry where transaction_id = @tx6;
isolation_level = 'REPEATABLE-READ'
1
diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result
index f65db4e6ca0..69db9d49237 100644
--- a/mysql-test/suite/versioning/r/create.result
+++ b/mysql-test/suite/versioning/r/create.result
@@ -272,8 +272,12 @@ t3 CREATE TABLE `t3` (
## For versioned table
insert into t1 values (1);
select row_start from t1 into @row_start;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
insert into t0 (y) values (2);
select st from t0 into @st;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
create or replace table t2 with system versioning as select * from t1;
show create table t2;
Table Create Table
@@ -336,8 +340,12 @@ ERROR 42S21: Duplicate column name 'row_end'
# Prepare checking for historical row
delete from t1;
select row_end from t1 for system_time all into @row_end;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
delete from t0;
select en from t0 for system_time all into @en;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
## Combinations of versioned + non-versioned
create or replace table t2 (y int);
insert into t2 values (3);
@@ -358,10 +366,14 @@ insert into t2 (y) values (1), (2);
delete from t2 where y = 2;
create or replace table t3 select * from t2 for system_time all;
select st, en from t3 where y = 1 into @st, @en;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select y from t2 for system_time all where st = @st and en = @en;
y
1
select st, en from t3 where y = 2 into @st, @en;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select y from t2 for system_time all where st = @st and en = @en;
y
2
@@ -414,7 +426,7 @@ t3 CREATE TABLE `t3` (
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
## Errors
create or replace temporary table t (x28 int) with system versioning;
-ERROR HY000: TEMPORARY tables do not support system versioning
+ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
create or replace table t1 (
x29 int unsigned,
Sys_start0 timestamp(6) as row start invisible,
diff --git a/mysql-test/suite/versioning/r/cte.result b/mysql-test/suite/versioning/r/cte.result
index 65cc90da2a7..5c54a23701e 100644
--- a/mysql-test/suite/versioning/r/cte.result
+++ b/mysql-test/suite/versioning/r/cte.result
@@ -137,7 +137,7 @@ where e.mgr = a.emp_id
)
select name from emp where emp_id in (select emp_id from ancestors for system_time as of timestamp @ts_1);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY emp ALL PRIMARY NULL NULL NULL 4 75.00 Using where
+1 PRIMARY emp ALL PRIMARY NULL NULL NULL 4 100.00 Using where
1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 100.00
4 MATERIALIZED <derived2> ALL NULL NULL NULL NULL 4 100.00
2 DERIVED e ALL NULL NULL NULL NULL 4 100.00 Using where
diff --git a/mysql-test/suite/versioning/r/debug.result b/mysql-test/suite/versioning/r/debug.result
index 20e21ff2811..0e2c67fd9aa 100644
--- a/mysql-test/suite/versioning/r/debug.result
+++ b/mysql-test/suite/versioning/r/debug.result
@@ -5,7 +5,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create temporary table tt1 (a int) with system versioning;
-ERROR HY000: TEMPORARY tables do not support system versioning
+ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
set @old_dbug=@@global.debug_dbug;
set global debug_dbug='+d,sysvers_force';
create table t2 (a int);
diff --git a/mysql-test/suite/versioning/r/delete_history.result b/mysql-test/suite/versioning/r/delete_history.result
index 065b1f00876..9cbe3b1ae1f 100644
--- a/mysql-test/suite/versioning/r/delete_history.result
+++ b/mysql-test/suite/versioning/r/delete_history.result
@@ -109,6 +109,31 @@ call pr;
call pr;
drop procedure pr;
drop table t1;
+# MDEV-15966 Behavior for TRUNCATE versioned table is not documented and not covered by tests
+create or replace table t1 (id int);
+create or replace table t2 (id int) with system versioning;
+# force cleaning table shares
+flush tables t1, t2;
+truncate table t1;
+truncate table t2;
+ERROR HY000: System-versioned tables do not support TRUNCATE TABLE
+# fetch table shares
+describe t1;
+Field Type Null Key Default Extra
+id int(11) YES NULL
+describe t2;
+Field Type Null Key Default Extra
+id int(11) YES NULL
+truncate table t1;
+truncate table t2;
+ERROR HY000: System-versioned tables do not support TRUNCATE TABLE
+# enter locked tables mode
+lock tables t1 WRITE, t2 WRITE;
+truncate t1;
+truncate t2;
+ERROR HY000: System-versioned tables do not support TRUNCATE TABLE
+unlock tables;
+drop table t2;
#
# MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY
#
@@ -165,3 +190,15 @@ x
1
drop prepare stmt;
drop table t1;
+#
+# MDEV-28201 Server crashes upon SHOW ANALYZE/EXPLAIN FORMAT=JSON
+#
+CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
+CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
+SET optimizer_trace= 'enabled=on';
+DELETE HISTORY FROM v1 BEFORE SYSTEM_TIME '2021-01-01';
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DELETE HISTORY FROM v1;
+ERROR HY000: The target table v1 of the DELETE is not updatable
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/versioning/r/foreign.result b/mysql-test/suite/versioning/r/foreign.result
index d157916c60c..2dbceebb539 100644
--- a/mysql-test/suite/versioning/r/foreign.result
+++ b/mysql-test/suite/versioning/r/foreign.result
@@ -274,6 +274,8 @@ on update cascade
) engine=innodb;
insert into parent (value) values (23);
select id, value from parent into @id, @value;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
insert into child values (default, @id, @value);
insert into subchild values (default, @id, @value);
select parent_id from subchild;
@@ -358,7 +360,7 @@ key(f)
INSERT INTO t2 VALUES (1,'against'),(2,'q');
SET SQL_MODE= '';
SET timestamp = 2;
-SELECT * FROM t1 INTO OUTFILE 't1.data';
+SELECT * INTO OUTFILE 't1.data' FROM t1;
SET timestamp = 3;
UPDATE t1 SET f13 = 'q';
SET timestamp = 4;
@@ -367,7 +369,7 @@ Warnings:
Warning 1265 Data truncated for column 'f12' at row 2
Warning 1265 Data truncated for column 'f12' at row 4
Warning 1265 Data truncated for column 'f12' at row 7
-SELECT * FROM t1 INTO OUTFILE 't1.data.2' ;
+SELECT * INTO OUTFILE 't1.data.2' FROM t1;
SET timestamp = 5;
LOAD DATA INFILE 't1.data.2' REPLACE INTO TABLE t1;
Warnings:
@@ -376,7 +378,7 @@ Warning 1265 Data truncated for column 'f12' at row 2
Warning 1265 Data truncated for column 'f12' at row 4
Warning 1265 Data truncated for column 'f12' at row 7
Warning 1265 Data truncated for column 'f1' at row 10
-SELECT * FROM t2 INTO OUTFILE 't2.data';
+SELECT * INTO OUTFILE 't2.data' FROM t2;
SET timestamp = 6;
LOAD DATA INFILE 't2.data' REPLACE INTO TABLE t2;
SET FOREIGN_KEY_CHECKS = OFF;
diff --git a/mysql-test/suite/versioning/r/insert.result b/mysql-test/suite/versioning/r/insert.result
index 01d829d3430..2645d0184e8 100644
--- a/mysql-test/suite/versioning/r/insert.result
+++ b/mysql-test/suite/versioning/r/insert.result
@@ -54,6 +54,8 @@ drop view vt1_1;
create or replace table t1( id bigint primary key, a int, b int) with system versioning;
insert into t1 values(1, 1, 1);
select row_start, row_end from t1 into @sys_start, @sys_end;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select id, a, b from t1;
id a b
1 1 1
diff --git a/mysql-test/suite/versioning/r/load_data.result b/mysql-test/suite/versioning/r/load_data.result
index 5e7b36c9a6a..1fcde73e565 100644
--- a/mysql-test/suite/versioning/r/load_data.result
+++ b/mysql-test/suite/versioning/r/load_data.result
@@ -1,6 +1,8 @@
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
Warnings:
Warning 1062 Duplicate entry '1' for key 'a'
diff --git a/mysql-test/suite/versioning/r/online.result b/mysql-test/suite/versioning/r/online.result
index aabf2b98cbf..62d62913428 100644
--- a/mysql-test/suite/versioning/r/online.result
+++ b/mysql-test/suite/versioning/r/online.result
@@ -69,6 +69,7 @@ affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
Warning 1280 Name 'pk' ignored for PRIMARY key.
+# restart
update t1 set a=2;
select count(*) from t1 for system_time all;
count(*)
@@ -115,3 +116,44 @@ select count(*) from t for system_time all;
count(*)
2
drop table t;
+# Start of 10.4 tests
+create or replace table t (a int, b int) engine=innodb;
+alter table t
+add s bigint unsigned as row start,
+add e bigint unsigned as row end,
+add period for system_time(s, e),
+add system versioning;
+alter table t drop column b, algorithm=instant;
+alter table t add index idx(a), lock=none;
+alter table t drop column s, drop column e;
+alter table t drop system versioning, lock=none;
+ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED
+#
+# MDEV-17697 Broken versioning info after instant drop column
+#
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+alter table t1 drop column b, algorithm=instant;
+alter table t1 drop system versioning;
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+alter table t1 drop system versioning;
+#
+# MDEV-18173 Assertion `o->ind == vers_end' or `o->ind == vers_start' failed in dict_table_t::instant_column
+#
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (pk integer primary key, a int, b int, v int as (a))
+with system versioning;
+alter table t1 force;
+alter table t1 drop column b;
+#
+# MDEV-18122 Assertion `table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
+#
+create or replace table t1 (
+x int,
+v int as (x) virtual,
+y int
+) with system versioning;
+alter table t1 drop system versioning;
+drop tables t, t1;
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index eae7d276fde..27610b39865 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -151,6 +151,8 @@ x C D
1 1 1
set @str= concat('select row_start from t1 partition (pn) into @ts0');
prepare stmt from @str;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
execute stmt;
drop prepare stmt;
set @now= now(6);
@@ -162,6 +164,8 @@ execute select_pn;
x C D
set @str= concat('select row_start from t1 partition (p0) into @ts1');
prepare stmt from @str;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
execute stmt;
drop prepare stmt;
select @ts0 = @ts1;
@@ -177,6 +181,8 @@ x C D
2 1 1
set @str= concat('select row_start from t1 partition (pn) into @ts0');
prepare stmt from @str;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
execute stmt;
drop prepare stmt;
set @now= now(6);
@@ -192,14 +198,20 @@ drop prepare select_p0;
drop prepare select_pn;
set @str= concat('select row_start from t1 partition (p0) where x = 2 into @ts1');
prepare stmt from @str;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
execute stmt;
drop prepare stmt;
set @str= concat('select row_end from t1 partition (p0) where x = 2 into @ts2');
prepare stmt from @str;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
execute stmt;
drop prepare stmt;
set @str= concat('select row_start from t1 partition (pn) into @ts3');
prepare stmt from @str;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
execute stmt;
drop prepare stmt;
select @ts0 = @ts1;
@@ -380,6 +392,8 @@ create or replace table t2 (f int);
create or replace trigger tr before insert on t2
for each row select table_rows from information_schema.tables
where table_name = 't1' into @a;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
insert into t2 values (1);
# MDEV-14740 Locking assertion for system_time partitioning
create or replace table t1 (i int) with system versioning
@@ -389,15 +403,9 @@ partition pn current);
create or replace table t2 (f int);
create or replace trigger tr before insert on t2
for each row select count(*) from t1 into @a;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
insert into t2 values (1);
-# MDEV-14741 Assertion `(trx)->start_file == 0' failed in row_truncate_table_for_mysql()
-create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 hour (
-partition p1 history,
-partition pn current);
-set autocommit= off;
-truncate table t1;
-set autocommit= on;
# MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
create or replace table t1 (x int) with system versioning;
lock table t1 write;
@@ -456,7 +464,7 @@ partition_name partition_ordinal_position partition_method timediff(partition_de
p0 1 SYSTEM_TIME 00:00:00.000000
pn 2 SYSTEM_TIME NULL
Warnings:
-Warning 1292 Truncated incorrect time value: 'CURRENT'
+Warning 1292 Incorrect time value: 'CURRENT'
alter table t1 add partition (partition p1 history, partition p2 history);
select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
@@ -465,7 +473,7 @@ p1 2 SYSTEM_TIME 01:00:00.000000
p2 3 SYSTEM_TIME 02:00:00.000000
pn 4 SYSTEM_TIME NULL
Warnings:
-Warning 1292 Truncated incorrect time value: 'CURRENT'
+Warning 1292 Incorrect time value: 'CURRENT'
alter table t1 drop partition p0;
select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
partition_name partition_ordinal_position partition_method timediff(partition_description, @ts)
@@ -473,7 +481,7 @@ p1 1 SYSTEM_TIME 01:00:00.000000
p2 2 SYSTEM_TIME 02:00:00.000000
pn 3 SYSTEM_TIME NULL
Warnings:
-Warning 1292 Truncated incorrect time value: 'CURRENT'
+Warning 1292 Incorrect time value: 'CURRENT'
alter table t1 drop partition p2;
ERROR HY000: Can only drop oldest partitions when rotating by INTERVAL
select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1';
@@ -482,7 +490,7 @@ p1 1 SYSTEM_TIME 01:00:00.000000
p2 2 SYSTEM_TIME 02:00:00.000000
pn 3 SYSTEM_TIME NULL
Warnings:
-Warning 1292 Truncated incorrect time value: 'CURRENT'
+Warning 1292 Incorrect time value: 'CURRENT'
#
# MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW
#
@@ -745,7 +753,7 @@ f varchar(45000)
partition by system_time interval 1 year (partition p1 history,
partition pn current);
insert into t1 () values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),();
-select * from t1 into outfile 'load.data';
+select * into outfile 'load.data' from t1;
load data infile 'load.data' replace into table t1;
load data infile 'load.data' replace into table t1;
ERROR HY000: The table 't1' is full
@@ -881,8 +889,10 @@ x
select * from t1 partition (pn);
x
2
-# TRUNCATE TABLE deletes history and current data
-truncate table t1;
+delete from t1;
+Warnings:
+Warning 4114 Versioned table `test`.`t1`: partition `p2` is full, add more HISTORY partitions
+delete history from t1;
select * from t1 partition (p0);
x
select * from t1 partition (p1);
@@ -1145,5 +1155,30 @@ insert into t values (1),(2);
create trigger tr before insert on t for each row update tcount set c = c + 1;
insert into t select * from t;
drop table tcount, t;
+#
# End of 10.3 tests
+#
+#
+# MDEV-22283 Server crashes in key_copy or unexpected error 156: The table already existed in the storage engine
+#
+create table t1 (a int primary key) engine=aria page_checksum=0
+with system versioning
+partition by system_time (partition p1 history, partition pn current);
+alter table t1 add partition (partition p2 history);
+Warnings:
+Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
+show table status;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Got error 174 "Fatal error during initialization of handler" from storage engine Aria NULL NULL
+Warnings:
+Warning 1030 Got error 174 "Fatal error during initialization of handler" from storage engine Aria
+drop table t1;
+create table t1 (b int) engine=aria row_format=dynamic with system versioning
+partition by system_time (partition p1 history, partition pn current);
+insert into t1 values (1);
+replace into t1 values (1);
+drop table t1;
+#
+# End of 10.4 tests
+#
set global innodb_stats_persistent= @save_persistent;
diff --git a/mysql-test/suite/versioning/r/select,trx_id.rdiff b/mysql-test/suite/versioning/r/select,trx_id.rdiff
new file mode 100644
index 00000000000..8906007a348
--- /dev/null
+++ b/mysql-test/suite/versioning/r/select,trx_id.rdiff
@@ -0,0 +1,11 @@
+--- select.result 2018-06-29 18:09:17.962447067 +0200
++++ select.reject 2018-06-29 18:10:04.618808616 +0200
+@@ -17,6 +17,8 @@
+ (8, 108),
+ (9, 109);
+ set @t0= now(6);
++Warnings:
++Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+ delete from t1 where x = 3;
+ delete from t1 where x > 7;
+ insert into t1(x, y) values(3, 33);
diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result
index 6e0b5784402..aa46d810ed1 100644
--- a/mysql-test/suite/versioning/r/select.result
+++ b/mysql-test/suite/versioning/r/select.result
@@ -21,6 +21,8 @@ delete from t1 where x = 3;
delete from t1 where x > 7;
insert into t1(x, y) values(3, 33);
select sys_trx_start from t1 where x = 3 and y = 33 into @t1;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select x, y from t1;
x y
0 100
@@ -192,6 +194,40 @@ NULL NULL 2 1
NULL NULL 3 1
drop table t1;
drop table t2;
+create or replace table t1(x int) with system versioning;
+insert into t1 values (1);
+delete from t1;
+insert into t1 values (2);
+delete from t1;
+insert into t1 values (3);
+delete from t1;
+select row_start into @start1 from t1 for system_time all where x = 1;
+select row_end into @end1 from t1 for system_time all where x = 1;
+select row_start into @start2 from t1 for system_time all where x = 2;
+select row_end into @end2 from t1 for system_time all where x = 2;
+select row_start into @start3 from t1 for system_time all where x = 3;
+select row_end into @end3 from t1 for system_time all where x = 3;
+select x as ASOF_x from t1 for system_time as of @start2;
+ASOF_x
+2
+select x as ASOF_x from t1 for system_time as of @end2;
+ASOF_x
+select x as FROMTO_x from t1 for system_time from @start1 to @end3;
+FROMTO_x
+1
+2
+3
+select x as FROMTO_x from t1 for system_time from @end1 to @start2;
+FROMTO_x
+select x as BETWAND_x from t1 for system_time between @start1 and @end3;
+BETWAND_x
+1
+2
+3
+select x as BETWAND_x from t1 for system_time between @end1 and @start2;
+BETWAND_x
+2
+drop table t1;
create table t1(
A int
) with system versioning;
@@ -344,6 +380,8 @@ insert into t1 values (1);
set @ts= now(6);
delete from t1;
select sys_trx_start from t1 for system_time all into @trx_start;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
## ensure @trx_start is much lower than unix timestamp
select @trx_start < unix_timestamp(@ts) - 100 as trx_start_good;
trx_start_good
@@ -540,7 +578,11 @@ period for system_time (row_start, row_end)
insert into t1 values (1);
delete from t1;
select row_start from t1 for system_time all into @t1;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select row_end from t1 for system_time all into @t2;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select * from t1 for system_time between @t1 and @t2;
a
1
diff --git a/mysql-test/suite/versioning/r/select2,trx_id.rdiff b/mysql-test/suite/versioning/r/select2,trx_id.rdiff
index d4b35c45568..4075b1b0f28 100644
--- a/mysql-test/suite/versioning/r/select2,trx_id.rdiff
+++ b/mysql-test/suite/versioning/r/select2,trx_id.rdiff
@@ -1,15 +1,15 @@
---- select2.result
-+++ select2,trx_id.result~
-@@ -22,6 +22,8 @@
- delete from t1 where x > 7;
- insert into t1(x, y) values(3, 33);
+--- select2.result 2018-06-29 17:51:17.142172085 +0200
++++ select2,trx_id.reject 2018-06-29 18:03:49.034273090 +0200
+@@ -26,6 +26,8 @@
select sys_start from t1 where x = 3 and y = 33 into @t1;
+ Warnings:
+ Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+set @x1= @t1;
+select trt_commit_ts(@x1) into @t1;
select x, y from t1;
x y
0 100
-@@ -82,7 +84,7 @@
+@@ -86,7 +88,7 @@
8 108
9 109
3 33
@@ -18,7 +18,7 @@
ASOF2_x y
0 100
1 101
-@@ -94,7 +96,7 @@
+@@ -98,7 +100,7 @@
7 107
8 108
9 109
@@ -27,7 +27,7 @@
FROMTO2_x y
0 100
1 101
-@@ -106,7 +108,7 @@
+@@ -110,7 +112,7 @@
7 107
8 108
9 109
diff --git a/mysql-test/suite/versioning/r/select2.result b/mysql-test/suite/versioning/r/select2.result
index 90607335fc1..8c9c519c349 100644
--- a/mysql-test/suite/versioning/r/select2.result
+++ b/mysql-test/suite/versioning/r/select2.result
@@ -18,10 +18,14 @@ insert into t1 (x, y) values
(9, 109);
set @t0= now(6);
select sys_start from t1 limit 1 into @x0;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
delete from t1 where x = 3;
delete from t1 where x > 7;
insert into t1(x, y) values(3, 33);
select sys_start from t1 where x = 3 and y = 33 into @t1;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select x, y from t1;
x y
0 100
@@ -330,7 +334,7 @@ x y
select * from (select * from t1 for system_time all, t2 for system_time all) for system_time all as t;
ERROR HY000: Table `t` is not system-versioned
select * from (t1 for system_time all join t2 for system_time all) for system_time all;
-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 '' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'system_time all' at line 1
# MDEV-16043 Assertion thd->Item_change_list::is_empty() failed in mysql_parse upon SELECT from a view reading from a versioned table
create or replace table t1 (a int) with system versioning;
create or replace view v1 as select * from t1;
diff --git a/mysql-test/suite/versioning/r/sysvars.result b/mysql-test/suite/versioning/r/sysvars.result
index ee9509a0039..a5a3f79990c 100644
--- a/mysql-test/suite/versioning/r/sysvars.result
+++ b/mysql-test/suite/versioning/r/sysvars.result
@@ -70,7 +70,7 @@ Variable_name Value
system_versioning_asof 1990-01-01 00:00:00.000000
set global system_versioning_asof= timestamp'1991-11-11 11:11:11.1111119';
Warnings:
-Note 1292 Truncated incorrect datetime value: '1991-11-11 11:11:11.1111119'
+Note 1292 Truncated incorrect DATETIME value: '1991-11-11 11:11:11.1111119'
show global variables like 'system_versioning_asof';
Variable_name Value
system_versioning_asof 1991-11-11 11:11:11.111111
@@ -96,7 +96,7 @@ Variable_name Value
system_versioning_asof 1990-01-01 00:00:00.000000
set system_versioning_asof= timestamp'1991-11-11 11:11:11.1111119';
Warnings:
-Note 1292 Truncated incorrect datetime value: '1991-11-11 11:11:11.1111119'
+Note 1292 Truncated incorrect DATETIME value: '1991-11-11 11:11:11.1111119'
show variables like 'system_versioning_asof';
Variable_name Value
system_versioning_asof 1991-11-11 11:11:11.111111
@@ -233,3 +233,24 @@ y
3
4
drop tables t1, t2;
+#
+# MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
+#
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET @@global.system_versioning_asof= timestamp'2001-12-31 23:59:59.9999999';
+Warnings:
+Note 1292 Truncated incorrect DATETIME value: '2001-12-31 23:59:59.9999999'
+SELECT @@global.system_versioning_asof;
+@@global.system_versioning_asof
+2002-01-01 00:00:00.000000
+SET @@global.system_versioning_asof= DEFAULT;
+#
+# MDEV-23562 Assertion `time_type == MYSQL_TIMESTAMP_DATETIME' failed upon SELECT from versioned table
+#
+CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
+SET system_versioning_asof= DATE(NOW());
+SELECT * FROM t1;
+a
+DROP TABLE t1;
+SET system_versioning_asof= DEFAULT;
+# End of 10.4 tests
diff --git a/mysql-test/suite/versioning/r/trx_id.result b/mysql-test/suite/versioning/r/trx_id.result
index fbda88fb1d7..c20b744cba0 100644
--- a/mysql-test/suite/versioning/r/trx_id.result
+++ b/mysql-test/suite/versioning/r/trx_id.result
@@ -25,11 +25,15 @@ add period for system_time(s, e),
add system versioning,
algorithm=inplace;
select s from t1 into @trx_start;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select count(*) = 1 from mysql.transaction_registry where transaction_id = @trx_start;
count(*) = 1
1
create or replace table t1 (x int);
select count(*) from mysql.transaction_registry into @tmp;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
alter table t1
add column s bigint unsigned as row start,
add column e bigint unsigned as row end,
@@ -48,11 +52,15 @@ add period for system_time(s, e),
add system versioning,
algorithm=copy;
select s from t1 into @trx_start;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select count(*) = 1 from mysql.transaction_registry where transaction_id = @trx_start;
count(*) = 1
1
create or replace table t1 (x int);
select count(*) from mysql.transaction_registry into @tmp;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
alter table t1
add column s bigint unsigned as row start,
add column e bigint unsigned as row end,
@@ -104,8 +112,14 @@ set @ts2= sysdate(6);
commit;
set @ts3= sysdate(6);
select sys_start from t1 where x = 1 into @trx_id1;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select sys_start from t1 where x = 2 into @trx_id2;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select sys_start from t1 where x = 3 into @trx_id3;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select @trx_id1 < @trx_id2, @trx_id2 < @trx_id3;
@trx_id1 < @trx_id2 @trx_id2 < @trx_id3
1 1
@@ -185,7 +199,7 @@ alter table t1 partition by system_time (
partition p0 history,
partition pn current
);
-ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `#sql-temporary`
+ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
drop table t1;
create or replace table t (
a int primary key,
@@ -197,7 +211,7 @@ partition by key() (
partition p1,
partition p2
);
-ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
create or replace table t (
a int primary key,
row_start bigint unsigned as row start invisible,
@@ -208,7 +222,7 @@ partition by key(a, row_start) (
partition p1,
partition p2
);
-ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
create or replace table t (
a int primary key,
row_start bigint unsigned as row start invisible,
@@ -219,7 +233,7 @@ partition by hash(a + row_end * 2) (
partition p1,
partition p2
);
-ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
create or replace table t (
a int primary key,
row_start bigint unsigned as row start invisible,
@@ -229,7 +243,7 @@ period for system_time(row_start, row_end)
partition by range columns (a, row_start) (
partition p1 values less than (100, 100)
);
-ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
#
# MDEV-16010 Too many rows with AS OF point_in_the_past_or_NULL
#
@@ -257,6 +271,8 @@ set @ts1= now(6);
insert into t1 values (1);
commit;
select row_start from t1 into @trx_id;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
select trt_begin_ts(@trx_id) <= @ts1 as BEGIN_TS_GOOD;
BEGIN_TS_GOOD
1
@@ -583,3 +599,31 @@ drop table t;
uninstall plugin test_versioning;
select trt_begin_ts(0);
ERROR 42000: FUNCTION test.trt_begin_ts does not exist
+#
+# MDEV-21650 Non-empty statement transaction on global rollback after TRT update error
+#
+create table t1 (s date, e date, period for app(s,e)) engine=innodb;
+alter table t1
+add row_start bigint unsigned as row start,
+add row_end bigint unsigned as row end,
+add period for system_time(row_start,row_end),
+with system versioning,
+add period if not exists for app(x,y);
+Warnings:
+Note 1060 Duplicate column name 'app'
+set transaction isolation level serializable;
+start transaction;
+insert into t1 (s,e) values ('2021-07-04','2024-08-18');
+connect con1,localhost,root,,test;
+start transaction;
+insert into t1 (s,e) values ('2018-06-01','2021-09-15');
+connection default;
+select * from t1 for system_time as of now();
+ERROR HY000: TRX_ID ... not found in `mysql.transaction_registry`
+connection con1;
+set innodb_lock_wait_timeout= 1, lock_wait_timeout= 1;
+alter table xx;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+disconnect con1;
+connection default;
+drop table t1;
diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result
index 1db5682c69b..cbb75a10cf5 100644
--- a/mysql-test/suite/versioning/r/update.result
+++ b/mysql-test/suite/versioning/r/update.result
@@ -405,7 +405,7 @@ drop tables t1, t2, t3;
create or replace table t1 (x int) with system versioning;
insert t1 values (1);
update t1 set x= 1;
-select row_start from t1 into @r;
+select row_start into @r from t1;
select check_row_ts(row_start, row_end) from t1 for system_time all where row_start = @r;
check_row_ts(row_start, row_end)
CURRENT ROW
@@ -421,3 +421,20 @@ create or replace view v as select a, b from t1, t2;
update v set b= null where a = 0 order by b;
drop view v;
drop table t1, t2;
+#
+# MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table with unique blob
+#
+create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
+insert into t1 values (1, 1, 'foo'), (2, 11, 'bar');
+update t1 set a = 3 where b <= 9;
+update t1 set a = 3 where b <= 10;
+drop table t1;
+create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
+create table t2 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
+insert into t1 values (1, 1, 'foo'), (2, 11, 'bar');
+insert into t2 values (1, 1, 'foo'), (2, 11, 'bar');
+update t1 set a = 3 where b <= 9;
+update t2 set a = 3 where b <= 9;
+update t1, t2 set t1.a = 3, t2.a = 3 where t1.b <= 10 and t2.b <= 10 and t1.b = t2.b;
+drop tables t1, t2;
+# End of 10.4 tests
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 0900e424bd0..f826ba470f1 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -375,11 +375,11 @@ alter table t1 engine=myisam;
--echo # MDEV-14692 crash in MDL_context::upgrade_shared_lock()
create or replace temporary table t (a int);
---error ER_VERS_TEMPORARY
+--error ER_VERS_NOT_SUPPORTED
alter table t change column if exists b c bigint unsigned generated always as row start;
---error ER_VERS_TEMPORARY
+--error ER_VERS_NOT_SUPPORTED
alter table t change column if exists b c bigint unsigned generated always as row end;
---error ER_VERS_TEMPORARY
+--error ER_VERS_NOT_SUPPORTED
alter table t add system versioning;
drop table t;
@@ -457,7 +457,7 @@ use mysql;
--error ER_VERS_DB_NOT_SUPPORTED
create or replace table t (x int) with system versioning;
--error ER_VERS_DB_NOT_SUPPORTED
-alter table user add system versioning;
+alter table db add system versioning;
use test;
--echo # MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column
@@ -475,6 +475,7 @@ alter table t add check (a > 0);
--error ER_CONSTRAINT_FAILED
insert into t values (0);
insert into t values (2);
+drop table t;
--echo #
--echo # MDEV-18869 Assertion `!((field)->vcol_info && (field)->stored_in_db())' failed in innodb_col_no upon altering table with system versioning
diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test
index 2f894ae890b..f50d75ded9e 100644
--- a/mysql-test/suite/versioning/t/create.test
+++ b/mysql-test/suite/versioning/t/create.test
@@ -310,7 +310,7 @@ show create table t3;
--echo ## Errors
---error ER_VERS_TEMPORARY
+--error ER_VERS_NOT_SUPPORTED
create or replace temporary table t (x28 int) with system versioning;
--error ER_VERS_DUPLICATE_ROW_START_END
diff --git a/mysql-test/suite/versioning/t/debug.test b/mysql-test/suite/versioning/t/debug.test
index ed1b842dab3..be58b67546d 100644
--- a/mysql-test/suite/versioning/t/debug.test
+++ b/mysql-test/suite/versioning/t/debug.test
@@ -5,7 +5,7 @@
create table t1 (a int);
show create table t1;
---error ER_VERS_TEMPORARY
+--error ER_VERS_NOT_SUPPORTED
create temporary table tt1 (a int) with system versioning;
set @old_dbug=@@global.debug_dbug;
diff --git a/mysql-test/suite/versioning/t/delete_history.test b/mysql-test/suite/versioning/t/delete_history.test
index dae7ff2db9b..e57779d07d3 100644
--- a/mysql-test/suite/versioning/t/delete_history.test
+++ b/mysql-test/suite/versioning/t/delete_history.test
@@ -118,6 +118,35 @@ call pr;
drop procedure pr;
drop table t1;
+--echo # MDEV-15966 Behavior for TRUNCATE versioned table is not documented and not covered by tests
+create or replace table t1 (id int);
+create or replace table t2 (id int) with system versioning;
+
+-- echo # force cleaning table shares
+flush tables t1, t2;
+
+truncate table t1;
+--error ER_VERS_NOT_SUPPORTED
+truncate table t2;
+
+-- echo # fetch table shares
+describe t1;
+describe t2;
+
+truncate table t1;
+--error ER_VERS_NOT_SUPPORTED
+truncate table t2;
+
+--echo # enter locked tables mode
+lock tables t1 WRITE, t2 WRITE;
+
+truncate t1;
+--error ER_VERS_NOT_SUPPORTED
+truncate t2;
+
+unlock tables;
+drop table t2;
+
--echo #
--echo # MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY
--echo #
@@ -164,4 +193,17 @@ select * from t1;
drop prepare stmt;
drop table t1;
+--echo #
+--echo # MDEV-28201 Server crashes upon SHOW ANALYZE/EXPLAIN FORMAT=JSON
+--echo #
+CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
+CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
+SET optimizer_trace= 'enabled=on';
+--error ER_NON_UPDATABLE_TABLE
+DELETE HISTORY FROM v1 BEFORE SYSTEM_TIME '2021-01-01';
+--error ER_NON_UPDATABLE_TABLE
+DELETE HISTORY FROM v1;
+DROP VIEW v1;
+DROP TABLE t1;
+
--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/foreign.test b/mysql-test/suite/versioning/t/foreign.test
index 1c834719e0f..20c35028565 100644
--- a/mysql-test/suite/versioning/t/foreign.test
+++ b/mysql-test/suite/versioning/t/foreign.test
@@ -396,15 +396,15 @@ INSERT INTO t2 VALUES (1,'against'),(2,'q');
SET SQL_MODE= '';
SET timestamp = 2;
-SELECT * FROM t1 INTO OUTFILE 't1.data';
+SELECT * INTO OUTFILE 't1.data' FROM t1;
SET timestamp = 3;
UPDATE t1 SET f13 = 'q';
SET timestamp = 4;
LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1;
-SELECT * FROM t1 INTO OUTFILE 't1.data.2' ;
+SELECT * INTO OUTFILE 't1.data.2' FROM t1;
SET timestamp = 5;
LOAD DATA INFILE 't1.data.2' REPLACE INTO TABLE t1;
-SELECT * FROM t2 INTO OUTFILE 't2.data';
+SELECT * INTO OUTFILE 't2.data' FROM t2;
SET timestamp = 6;
LOAD DATA INFILE 't2.data' REPLACE INTO TABLE t2;
SET FOREIGN_KEY_CHECKS = OFF;
diff --git a/mysql-test/suite/versioning/t/online.test b/mysql-test/suite/versioning/t/online.test
index cff3193407b..5932c34687a 100644
--- a/mysql-test/suite/versioning/t/online.test
+++ b/mysql-test/suite/versioning/t/online.test
@@ -133,7 +133,66 @@ show create table t;
select count(*) from t for system_time all;
update t set b=11;
select count(*) from t for system_time all;
-
drop table t;
+--echo # Start of 10.4 tests
+
+create or replace table t (a int, b int) engine=innodb;
+alter table t
+ add s bigint unsigned as row start,
+ add e bigint unsigned as row end,
+ add period for system_time(s, e),
+ add system versioning;
+alter table t drop column b, algorithm=instant;
+alter table t add index idx(a), lock=none;
+alter table t drop column s, drop column e;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t drop system versioning, lock=none;
+
+--echo #
+--echo # MDEV-17697 Broken versioning info after instant drop column
+--echo #
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+alter table t1 drop column b, algorithm=instant;
+alter table t1 drop system versioning;
+
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+
+if ($have_debug) {
+--disable_query_log
+--disable_result_log
+set debug_dbug='+d,ib_commit_inplace_fail_1';
+--error ER_INTERNAL_ERROR
+alter table t1 drop column b, algorithm=instant;
+set debug_dbug= default;
+--enable_query_log
+--enable_result_log
+}
+alter table t1 drop system versioning;
+
+--echo #
+--echo # MDEV-18173 Assertion `o->ind == vers_end' or `o->ind == vers_start' failed in dict_table_t::instant_column
+--echo #
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (pk integer primary key, a int, b int, v int as (a))
+with system versioning;
+
+alter table t1 force;
+alter table t1 drop column b;
+
+--echo #
+--echo # MDEV-18122 Assertion `table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
+--echo #
+create or replace table t1 (
+ x int,
+ v int as (x) virtual,
+ y int
+) with system versioning;
+alter table t1 drop system versioning;
+
+drop tables t, t1;
+
--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index b18493ae91c..7e2d04f8bbf 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -349,15 +349,6 @@ create or replace trigger tr before insert on t2
for each row select count(*) from t1 into @a;
insert into t2 values (1);
---echo # MDEV-14741 Assertion `(trx)->start_file == 0' failed in row_truncate_table_for_mysql()
-create or replace table t1 (i int) with system versioning
-partition by system_time interval 1 hour (
- partition p1 history,
- partition pn current);
-set autocommit= off;
-truncate table t1;
-set autocommit= on;
-
--echo # MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
create or replace table t1 (x int) with system versioning;
lock table t1 write;
@@ -708,7 +699,7 @@ create or replace table t1 (
insert into t1 () values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),();
-select * from t1 into outfile 'load.data';
+select * into outfile 'load.data' from t1;
load data infile 'load.data' replace into table t1;
--error ER_RECORD_FILE_FULL
load data infile 'load.data' replace into table t1;
@@ -850,8 +841,8 @@ select * from t1 partition (p0);
select * from t1 partition (p1);
select * from t1 partition (pn);
---echo # TRUNCATE TABLE deletes history and current data
-truncate table t1;
+delete from t1;
+delete history from t1;
select * from t1 partition (p0);
select * from t1 partition (p1);
select * from t1 partition (pn);
@@ -1098,7 +1089,32 @@ insert into t select * from t;
# cleanup
drop table tcount, t;
+--echo #
--echo # End of 10.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-22283 Server crashes in key_copy or unexpected error 156: The table already existed in the storage engine
+--echo #
+create table t1 (a int primary key) engine=aria page_checksum=0
+with system versioning
+partition by system_time (partition p1 history, partition pn current);
+
+alter table t1 add partition (partition p2 history);
+show table status;
+drop table t1;
+
+create table t1 (b int) engine=aria row_format=dynamic with system versioning
+partition by system_time (partition p1 history, partition pn current);
+insert into t1 values (1);
+replace into t1 values (1);
+
+# cleanup
+drop table t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
set global innodb_stats_persistent= @save_persistent;
diff --git a/mysql-test/suite/versioning/t/select.test b/mysql-test/suite/versioning/t/select.test
index f1217c382cf..1d5d0f323be 100644
--- a/mysql-test/suite/versioning/t/select.test
+++ b/mysql-test/suite/versioning/t/select.test
@@ -108,6 +108,32 @@ for system_time as of timestamp @t0 as t;
drop table t1;
drop table t2;
+# Query conditions check
+
+create or replace table t1(x int) with system versioning;
+insert into t1 values (1);
+delete from t1;
+insert into t1 values (2);
+delete from t1;
+insert into t1 values (3);
+delete from t1;
+
+select row_start into @start1 from t1 for system_time all where x = 1;
+select row_end into @end1 from t1 for system_time all where x = 1;
+select row_start into @start2 from t1 for system_time all where x = 2;
+select row_end into @end2 from t1 for system_time all where x = 2;
+select row_start into @start3 from t1 for system_time all where x = 3;
+select row_end into @end3 from t1 for system_time all where x = 3;
+
+select x as ASOF_x from t1 for system_time as of @start2;
+select x as ASOF_x from t1 for system_time as of @end2;
+select x as FROMTO_x from t1 for system_time from @start1 to @end3;
+select x as FROMTO_x from t1 for system_time from @end1 to @start2;
+select x as BETWAND_x from t1 for system_time between @start1 and @end3;
+select x as BETWAND_x from t1 for system_time between @end1 and @start2;
+
+drop table t1;
+
# Wildcard expansion on hidden fields
create table t1(
diff --git a/mysql-test/suite/versioning/t/sysvars.test b/mysql-test/suite/versioning/t/sysvars.test
index eb76581121d..ab1f612edf3 100644
--- a/mysql-test/suite/versioning/t/sysvars.test
+++ b/mysql-test/suite/versioning/t/sysvars.test
@@ -176,3 +176,25 @@ insert t2 select x + 2 from t1;
select * from t2;
drop tables t1, t2;
+
+
+--echo #
+--echo # MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
+--echo #
+
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET @@global.system_versioning_asof= timestamp'2001-12-31 23:59:59.9999999';
+SELECT @@global.system_versioning_asof;
+SET @@global.system_versioning_asof= DEFAULT;
+
+--echo #
+--echo # MDEV-23562 Assertion `time_type == MYSQL_TIMESTAMP_DATETIME' failed upon SELECT from versioned table
+--echo #
+
+CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
+SET system_versioning_asof= DATE(NOW());
+SELECT * FROM t1;
+DROP TABLE t1;
+SET system_versioning_asof= DEFAULT;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test
index eb0174f2851..c03911eb798 100644
--- a/mysql-test/suite/versioning/t/trx_id.test
+++ b/mysql-test/suite/versioning/t/trx_id.test
@@ -621,3 +621,38 @@ drop table t;
uninstall plugin test_versioning;
--error ER_SP_DOES_NOT_EXIST
select trt_begin_ts(0);
+
+--echo #
+--echo # MDEV-21650 Non-empty statement transaction on global rollback after TRT update error
+--echo #
+create table t1 (s date, e date, period for app(s,e)) engine=innodb;
+alter table t1
+ add row_start bigint unsigned as row start,
+ add row_end bigint unsigned as row end,
+ add period for system_time(row_start,row_end),
+ with system versioning,
+ add period if not exists for app(x,y);
+
+set transaction isolation level serializable;
+start transaction;
+insert into t1 (s,e) values ('2021-07-04','2024-08-18');
+
+--connect (con1,localhost,root,,test)
+start transaction;
+insert into t1 (s,e) values ('2018-06-01','2021-09-15');
+
+--connection default
+--replace_regex /TRX_ID \d+/TRX_ID .../
+--error ER_VERS_NO_TRX_ID
+select * from t1 for system_time as of now();
+
+--connection con1
+set innodb_lock_wait_timeout= 1, lock_wait_timeout= 1;
+# can be existing or non-existing table, does not matter
+--error ER_LOCK_WAIT_TIMEOUT
+alter table xx;
+
+# cleanup
+--disconnect con1
+--connection default
+drop table t1;
diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test
index edf4e4598ab..56bbd909256 100644
--- a/mysql-test/suite/versioning/t/update.test
+++ b/mysql-test/suite/versioning/t/update.test
@@ -332,7 +332,7 @@ drop tables t1, t2, t3;
create or replace table t1 (x int) with system versioning;
insert t1 values (1);
update t1 set x= 1;
-select row_start from t1 into @r;
+select row_start into @r from t1;
select check_row_ts(row_start, row_end) from t1 for system_time all where row_start = @r;
drop table t1;
@@ -349,4 +349,30 @@ update v set b= null where a = 0 order by b;
drop view v;
drop table t1, t2;
+--echo #
+--echo # MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table with unique blob
+--echo #
+create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
+insert into t1 values (1, 1, 'foo'), (2, 11, 'bar');
+
+update t1 set a = 3 where b <= 9;
+update t1 set a = 3 where b <= 10;
+
+# cleanup
+drop table t1;
+
+create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
+create table t2 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
+insert into t1 values (1, 1, 'foo'), (2, 11, 'bar');
+insert into t2 values (1, 1, 'foo'), (2, 11, 'bar');
+
+update t1 set a = 3 where b <= 9;
+update t2 set a = 3 where b <= 9;
+update t1, t2 set t1.a = 3, t2.a = 3 where t1.b <= 10 and t2.b <= 10 and t1.b = t2.b;
+
+# cleanup
+drop tables t1, t2;
+
+--echo # End of 10.4 tests
+
source suite/versioning/common_finish.inc;
diff --git a/mysql-test/suite/wsrep/common.pm b/mysql-test/suite/wsrep/common.pm
new file mode 100644
index 00000000000..8ac3b3ea94c
--- /dev/null
+++ b/mysql-test/suite/wsrep/common.pm
@@ -0,0 +1,117 @@
+package wsrep::common;
+
+use base qw(Exporter);
+our @EXPORT= qw(wsrep_not_ok);
+
+use File::Basename;
+use Memoize;
+memoize 'wrong_wsrep_version';
+memoize 'check_garbd_support';
+memoize 'check_wsrep_support';
+memoize 'wsrep_not_ok';
+
+use mtr_report;
+
+my $extra_path;
+my $mariabackup_path;
+my $mariabackup_exe;
+my $garbd_exe;
+my $file_wsrep_provider;
+
+sub wrong_wsrep_version() {
+ my $check_version= dirname($My::SafeProcess::safe_process_cmd[0]) . '/wsrep_check_version';
+ my $checked = `$check_version -p`;
+ chomp($checked);
+ return $? ? $checked : undef;
+}
+
+sub which($) { return `sh -c "command -v $_[0]"` }
+
+sub check_garbd_support() {
+ my $wsrep_path= dirname($file_wsrep_provider);
+ $garbd_exe= ::mtr_file_exists($wsrep_path."/garb/garbd",
+ $wsrep_path."/../../bin/garb/garbd",
+ '/usr/bin/garbd');
+ $ENV{MTR_GARBD_EXE}= $garbd_exe if $garbd_exe;
+}
+
+sub check_wsrep_support() {
+ mtr_report(" - binaries built with wsrep patch");
+
+ # ADD scripts to $PATH to that wsrep_sst_* can be found
+ my ($spath) = grep { -f "$_/wsrep_sst_rsync"; } "$::bindir/scripts", $::path_client_bindir;
+ mtr_error("No SST scripts") unless $spath;
+ $ENV{PATH}="$spath:$ENV{PATH}";
+
+ # ADD mysql client library path to path so that wsrep_notify_cmd can find mysql
+ # client for loading the tables. (Don't assume each machine has mysql install)
+ my ($cpath) = grep { -f "$_/mysql"; } "$::bindir/scripts", $::path_client_bindir;
+ mtr_error("No scritps") unless $cpath;
+ $ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
+
+ # ADD my_print_defaults script path to path so that SST scripts can find it
+ my $my_print_defaults_exe=
+ ::mtr_exe_maybe_exists(
+ "$::bindir/extra/my_print_defaults",
+ "$::path_client_bindir/my_print_defaults");
+ my $epath= "";
+ if ($my_print_defaults_exe ne "") {
+ $epath= dirname($my_print_defaults_exe);
+ }
+ mtr_error("No my_print_defaults") unless $epath;
+ $ENV{PATH}="$epath:$ENV{PATH}" unless ($epath eq $spath) or
+ ($epath eq $cpath);
+
+ $extra_path= $epath;
+
+ if (which("socat")) {
+ $ENV{MTR_GALERA_TFMT}="socat";
+ } elsif (which("nc")) {
+ $ENV{MTR_GALERA_TFMT}="nc";
+ }
+
+ $ENV{PATH}=dirname($ENV{XTRABACKUP}).":$ENV{PATH}" if $ENV{XTRABACKUP};
+
+ # Check whether WSREP_PROVIDER environment variable is set.
+ if (defined $ENV{'WSREP_PROVIDER'}) {
+ $file_wsrep_provider= "";
+ if ($ENV{'WSREP_PROVIDER'} ne "none") {
+ if (::mtr_file_exists($ENV{'WSREP_PROVIDER'}) ne "") {
+ $file_wsrep_provider= $ENV{'WSREP_PROVIDER'};
+ } else {
+ mtr_error("WSREP_PROVIDER env set to an invalid path");
+ }
+ check_garbd_support();
+ }
+ # WSREP_PROVIDER is valid; set to a valid path or "none").
+ mtr_verbose("WSREP_PROVIDER env set to $ENV{'WSREP_PROVIDER'}");
+ } else {
+ # WSREP_PROVIDER env not defined. Lets try to locate the wsrep provider
+ # library.
+ $file_wsrep_provider=
+ ::mtr_file_exists("/usr/lib64/galera-4/libgalera_smm.so",
+ "/usr/lib64/galera/libgalera_smm.so",
+ "/usr/lib/galera-4/libgalera_smm.so",
+ "/usr/lib/galera/libgalera_smm.so");
+ if ($file_wsrep_provider ne "") {
+ # wsrep provider library found !
+ mtr_verbose("wsrep provider library found : $file_wsrep_provider");
+ $ENV{'WSREP_PROVIDER'}= $file_wsrep_provider;
+ check_garbd_support();
+ } else {
+ mtr_verbose("Could not find wsrep provider library, setting it to 'none'");
+ $ENV{'WSREP_PROVIDER'}= "none";
+ }
+ }
+}
+
+sub wsrep_not_ok() {
+ return "Not run for embedded server" if $::opt_embedded_server;
+ return "WSREP is not compiled in" if not $::mysqld_variables{'wsrep-on'};
+ check_wsrep_support();
+ return "No wsrep provider library" unless $file_wsrep_provider;
+ return wrong_wsrep_version() if wrong_wsrep_version();
+ undef;
+}
+
+1;
diff --git a/mysql-test/suite/wsrep/disabled.def b/mysql-test/suite/wsrep/disabled.def
index 3d204db6945..991109d72b8 100644
--- a/mysql-test/suite/wsrep/disabled.def
+++ b/mysql-test/suite/wsrep/disabled.def
@@ -12,3 +12,6 @@
mdev_6832: wsrep_provider is read-only for security reasons
+MDEV-23092: wsrep_provider is read-only for security reasons
+wsrep_variables_no_provider: wsrep_provider is read-only for security reasons
+MDEV-22443: it is no longer allowed enable wsrep_on if wsrep_provider is 'none'
diff --git a/mysql-test/suite/wsrep/include/check_galera_version.inc b/mysql-test/suite/wsrep/include/check_galera_version.inc
index 32d01197f94..7a58e657f40 100644
--- a/mysql-test/suite/wsrep/include/check_galera_version.inc
+++ b/mysql-test/suite/wsrep/include/check_galera_version.inc
@@ -21,23 +21,27 @@ SELECT CAST(REGEXP_REPLACE(@GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\3')
# Actual
SELECT VARIABLE_VALUE INTO @ACTUAL_GALERA_VERSION FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep_provider_version';
+SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^(\\d+)\\.(\\d+).*','\\1') AS UNSIGNED) INTO @ACTUAL_GALERA_MAJOR_VERSION;
SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^[\\d\\.]*(\\d+)\\.\\d+.*','\\1') AS UNSIGNED) INTO @ACTUAL_GALERA_MINOR_VERSION;
SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^[\\d\\.]*\\.(\\d+).*','\\1') AS UNSIGNED) INTO @ACTUAL_GALERA_RELEASE_VERSION;
+--enable_query_log
# For testing
#SELECT @GALERA_MAJOR_VERSION;
#SELECT @GALERA_MINOR_VERSION;
#SELECT @GALERA_RELEASE_VERSION;
-#SELECT @ACTUAL_GALERA_VERSION;
+#SELECT @ACTUAL_GALERA_MAJOR_VERSION;
#SELECT @ACTUAL_GALERA_MINOR_VERSION;
#SELECT @ACTUAL_GALERA_RELEASE_VERSION;
-if (!`SELECT (@ACTUAL_GALERA_MINOR_VERSION > @GALERA_MINOR_VERSION) OR
- (@ACTUAL_GALERA_MINOR_VERSION = @GALERA_MINOR_VERSION AND
+if (!`SELECT (@ACTUAL_GALERA_MAJOR_VERSION >= @GALERA_MAJOR_VERSION AND @ACTUAL_GALERA_MINOR_VERSION > @GALERA_MINOR_VERSION) OR
+ (@ACTUAL_GALERA_MAJOR_VERSION = @GALERA_MAJOR_VERSION AND
+ @ACTUAL_GALERA_MINOR_VERSION = @GALERA_MINOR_VERSION AND
@ACTUAL_GALERA_RELEASE_VERSION >= @GALERA_RELEASE_VERSION)
`)
{
skip Test requires Galera library version >= $galera_version;
}
---enable_query_log
+--echo # Correct Galera library found
+
diff --git a/mysql-test/suite/wsrep/my.cnf b/mysql-test/suite/wsrep/my.cnf
index f65306ffca5..e35f73f46c1 100644
--- a/mysql-test/suite/wsrep/my.cnf
+++ b/mysql-test/suite/wsrep/my.cnf
@@ -2,7 +2,7 @@
!include include/default_mysqld.cnf
[mysqld.1]
-wsrep-on=1
+wsrep-on=ON
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
diff --git a/mysql-test/suite/wsrep/r/MDEV-20625.result b/mysql-test/suite/wsrep/r/MDEV-20625.result
new file mode 100644
index 00000000000..3e2b621c8f9
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/MDEV-20625.result
@@ -0,0 +1,5 @@
+SET GLOBAL wsrep_on=ON;
+SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 0
+SET GLOBAL wsrep_on=OFF;
diff --git a/mysql-test/suite/wsrep/r/MDEV-22443.result b/mysql-test/suite/wsrep/r/MDEV-22443.result
new file mode 100644
index 00000000000..ea07cbec5a0
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/MDEV-22443.result
@@ -0,0 +1,3 @@
+SET SESSION wsrep_sync_wait=15;
+SET SESSION wsrep_on=1;
+START TRANSACTION READ WRITE;
diff --git a/mysql-test/suite/wsrep/r/MDEV-23081.result b/mysql-test/suite/wsrep/r/MDEV-23081.result
new file mode 100644
index 00000000000..5d0ad90b030
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/MDEV-23081.result
@@ -0,0 +1,24 @@
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+connect con1, localhost, root;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_1 WAIT_FOR continue_before_commit_order_1";
+INSERT INTO t1 VALUES (9);
+connect con_ctrl, localhost, root;
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+connect con2, localhost, root;
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_2 WAIT_FOR continue_before_commit_order_2";
+INSERT INTO t1 VALUES (10);
+connection con_ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_2";
+SET DEBUG_SYNC = "now SIGNAL continue_after_certification";
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_1";
+connection default;
+# Kill the server
+XA RECOVER;
+formatID gtrid_length bqual_length data
+disconnect con1;
+disconnect con2;
+disconnect con_ctrl;
+connection default;
+DROP TABLE t1;
+CALL mtr.add_suppression("You need to use --log-bin to make --binlog-format work");
diff --git a/mysql-test/suite/wsrep/r/MDEV-23092.result b/mysql-test/suite/wsrep/r/MDEV-23092.result
new file mode 100644
index 00000000000..d88aacf7d5c
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/MDEV-23092.result
@@ -0,0 +1,13 @@
+SET COLLATION_CONNECTION='utf16le_bin';
+SET GLOBAL wsrep_provider='/invalid/path/libgalera_smm.so';
+ERROR 42000: Variable 'wsrep_provider' can't be set to the value of '/'
+SET GLOBAL wsrep_cluster_address='OFF';
+SET GLOBAL wsrep_slave_threads=10;
+SELECT 1;
+1
+1
+SET GLOBAL wsrep_cluster_address='gcomm://';
+SET GLOBAL wsrep_slave_threads=DEFAULT;
+CALL mtr.add_suppression("wsrep_load()");
+CALL mtr.add_suppression("Failed to create a new provider");
+CALL mtr.add_suppression("Failed to load provider");
diff --git a/mysql-test/suite/wsrep/r/MDEV-23466.result b/mysql-test/suite/wsrep/r/MDEV-23466.result
new file mode 100644
index 00000000000..6d167c9c95e
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/MDEV-23466.result
@@ -0,0 +1,3 @@
+SELECT WSREP_LAST_SEEN_GTID();
+WSREP_LAST_SEEN_GTID()
+00000000-0000-0000-0000-000000000000:-1
diff --git a/mysql-test/suite/wsrep/r/mdev_22681.result b/mysql-test/suite/wsrep/r/mdev_22681.result
new file mode 100644
index 00000000000..ecce324ead6
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/mdev_22681.result
@@ -0,0 +1,3 @@
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b';
+DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/r/mdev_7798.result b/mysql-test/suite/wsrep/r/mdev_7798.result
index 83a02f3a606..ec906ccd8a2 100644
--- a/mysql-test/suite/wsrep/r/mdev_7798.result
+++ b/mysql-test/suite/wsrep/r/mdev_7798.result
@@ -7,6 +7,7 @@ SELECT @@GLOBAL.WSREP_ON;
1
SET GLOBAL WSREP_ON= 0;
Restart the node.
+# restart
SELECT @@GLOBAL.WSREP_ON;
@@GLOBAL.WSREP_ON
1
diff --git a/mysql-test/suite/wsrep/r/trans.result b/mysql-test/suite/wsrep/r/trans.result
index e0c0c9f7c88..bc225897103 100644
--- a/mysql-test/suite/wsrep/r/trans.result
+++ b/mysql-test/suite/wsrep/r/trans.result
@@ -6,5 +6,4 @@
#
START TRANSACTION WITH CONSISTENT SNAPSHOT;
SAVEPOINT A;
-ERROR HY000: Got error 1 "Operation not permitted" from storage engine binlog
End of test.
diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
index df7ca3787aa..c8174930840 100644
--- a/mysql-test/suite/wsrep/r/variables.result
+++ b/mysql-test/suite/wsrep/r/variables.result
@@ -1,65 +1,78 @@
-call mtr.add_suppression("WSREP: Initial position was provided by configuration or SST, avoiding override");
-SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
-SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
-
-# MDEV#5534: mysql_tzinfo_to_sql generates wrong query
-#
-# Testing wsrep_replicate_myisam variable.
-SELECT @@session.wsrep_replicate_myisam;
-ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable
-SELECT @@global.wsrep_replicate_myisam;
-@@global.wsrep_replicate_myisam
-0
-SET SESSION wsrep_replicate_myisam= ON;
-ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL
-SET GLOBAL wsrep_replicate_myisam= ON;
-SET GLOBAL wsrep_replicate_myisam= OFF;
-#
-# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
-# variables when using "_"
-#
-CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
-SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
+# Correct Galera library found
+SHOW GLOBAL STATUS LIKE 'wsrep%';
Variable_name Value
+wsrep_local_state_uuid #
+wsrep_protocol_version #
+wsrep_last_committed #
+wsrep_replicated #
+wsrep_replicated_bytes #
+wsrep_repl_keys #
+wsrep_repl_keys_bytes #
+wsrep_repl_data_bytes #
+wsrep_repl_other_bytes #
+wsrep_received #
+wsrep_received_bytes #
+wsrep_local_commits #
+wsrep_local_cert_failures #
+wsrep_local_replays #
+wsrep_local_send_queue #
+wsrep_local_send_queue_max #
+wsrep_local_send_queue_min #
+wsrep_local_send_queue_avg #
+wsrep_local_recv_queue #
+wsrep_local_recv_queue_max #
+wsrep_local_recv_queue_min #
+wsrep_local_recv_queue_avg #
+wsrep_local_cached_downto #
+wsrep_flow_control_paused_ns #
+wsrep_flow_control_paused #
+wsrep_flow_control_sent #
+wsrep_flow_control_recv #
+wsrep_flow_control_active #
+wsrep_flow_control_requested #
+wsrep_cert_deps_distance #
+wsrep_apply_oooe #
+wsrep_apply_oool #
+wsrep_apply_window #
+wsrep_apply_waits #
+wsrep_commit_oooe #
+wsrep_commit_oool #
+wsrep_commit_window #
+wsrep_local_state #
wsrep_local_state_comment #
+wsrep_cert_index_size #
+wsrep_causal_reads #
+wsrep_cert_interval #
+wsrep_open_transactions #
+wsrep_open_connections #
+wsrep_incoming_addresses #
+wsrep_cluster_weight #
+wsrep_desync_count #
+wsrep_evs_delayed #
+wsrep_evs_evict_list #
+wsrep_evs_repl_latency #
+wsrep_evs_state #
+wsrep_gcomm_uuid #
+wsrep_gmcast_segment #
+wsrep_applier_thread_count #
+wsrep_cluster_capabilities #
+wsrep_cluster_conf_id #
+wsrep_cluster_size #
+wsrep_cluster_state_uuid #
+wsrep_cluster_status #
+wsrep_connected #
+wsrep_local_bf_aborts #
+wsrep_local_index #
+wsrep_provider_capabilities #
+wsrep_provider_name #
+wsrep_provider_vendor #
+wsrep_provider_version #
+wsrep_ready #
+wsrep_rollbacker_thread_count #
+wsrep_thread_count #
# Should show nothing.
SHOW STATUS LIKE 'x';
Variable_name Value
-
-SHOW STATUS LIKE 'wsrep_local_state_uuid';
-Variable_name Value
-wsrep_local_state_uuid #
-
-SHOW STATUS LIKE 'wsrep_last_committed';
-Variable_name Value
-wsrep_last_committed #
-
-#
-# MDEV#6206: wsrep_slave_threads subtracts from max_connections
-#
-call mtr.add_suppression("WSREP: Failed to get provider options");
-SELECT @@global.wsrep_provider;
-@@global.wsrep_provider
-libgalera_smm.so
-SELECT @@global.wsrep_slave_threads;
-@@global.wsrep_slave_threads
-1
-SELECT @@global.wsrep_cluster_address;
-@@global.wsrep_cluster_address
-gcomm://
-SELECT @@global.wsrep_on;
-@@global.wsrep_on
-1
-SHOW STATUS LIKE 'threads_connected';
-Variable_name Value
-Threads_connected 1
-SHOW STATUS LIKE 'wsrep_thread_count';
-Variable_name Value
-wsrep_thread_count 2
-
-SELECT @@global.wsrep_provider;
-@@global.wsrep_provider
-libgalera_smm.so
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
gcomm://
@@ -72,67 +85,55 @@ Threads_connected 1
SHOW STATUS LIKE 'wsrep_thread_count';
Variable_name Value
wsrep_thread_count 2
-
-# Setting wsrep_cluster_address triggers the creation of
-# applier/rollbacker threads.
-# Wait for applier thread to get created 1.
-# Wait for applier thread to get created 2.
-SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-EXPECT_1
-1
-SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
-EXPECT_1
-1
-SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
-EXPECT_2
-2
-SELECT @@global.wsrep_provider;
-@@global.wsrep_provider
-libgalera_smm.so
-SELECT @@global.wsrep_cluster_address;
-@@global.wsrep_cluster_address
-gcomm://
-SELECT @@global.wsrep_on;
-@@global.wsrep_on
-1
-SHOW STATUS LIKE 'threads_connected';
-Variable_name Value
-Threads_connected 1
-SHOW STATUS LIKE 'wsrep_thread_count';
-Variable_name Value
-wsrep_thread_count 2
-
-SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
-SET GLOBAL wsrep_slave_threads= 10;
-# Wait for 9 applier threads to get created.
-SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-EXPECT_10
-10
-SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
-EXPECT_1
-1
-SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
-EXPECT_11
-11
-SHOW STATUS LIKE 'threads_connected';
-Variable_name Value
-Threads_connected 1
-set wsrep_on=0;
-set wsrep_on=1;
-create user test@localhost;
-connect con1,localhost,test;
-set auto_increment_increment=10;
-set wsrep_on=0;
-ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
-disconnect con1;
-connection default;
-drop user test@localhost;
-#
-# MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
-#
-SET @wsrep_sst_auth_saved= @@global.wsrep_sst_auth;
-SET @@global.wsrep_sst_auth= 'user:pass';
-SET @@global.wsrep_sst_auth= '';
-SET @@global.wsrep_sst_auth= NULL;
-SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
-# End of test.
+# variables
+SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep%" ORDER BY VARIABLE_NAME;
+VARIABLE_NAME
+WSREP_AUTO_INCREMENT_CONTROL
+WSREP_CAUSAL_READS
+WSREP_CERTIFICATION_RULES
+WSREP_CERTIFY_NONPK
+WSREP_CLUSTER_ADDRESS
+WSREP_CLUSTER_NAME
+WSREP_CONVERT_LOCK_TO_TRX
+WSREP_DATA_HOME_DIR
+WSREP_DBUG_OPTION
+WSREP_DEBUG
+WSREP_DESYNC
+WSREP_DIRTY_READS
+WSREP_DRUPAL_282555_WORKAROUND
+WSREP_FORCED_BINLOG_FORMAT
+WSREP_GTID_DOMAIN_ID
+WSREP_GTID_MODE
+WSREP_IGNORE_APPLY_ERRORS
+WSREP_LOAD_DATA_SPLITTING
+WSREP_LOG_CONFLICTS
+WSREP_MAX_WS_ROWS
+WSREP_MAX_WS_SIZE
+WSREP_MYSQL_REPLICATION_BUNDLE
+WSREP_NODE_ADDRESS
+WSREP_NODE_INCOMING_ADDRESS
+WSREP_NODE_NAME
+WSREP_NOTIFY_CMD
+WSREP_ON
+WSREP_OSU_METHOD
+WSREP_PATCH_VERSION
+WSREP_PROVIDER
+WSREP_PROVIDER_OPTIONS
+WSREP_RECOVER
+WSREP_REJECT_QUERIES
+WSREP_REPLICATE_MYISAM
+WSREP_RESTART_SLAVE
+WSREP_RETRY_AUTOCOMMIT
+WSREP_SLAVE_FK_CHECKS
+WSREP_SLAVE_THREADS
+WSREP_SLAVE_UK_CHECKS
+WSREP_SR_STORE
+WSREP_SST_AUTH
+WSREP_SST_DONOR
+WSREP_SST_DONOR_REJECTS_QUERIES
+WSREP_SST_METHOD
+WSREP_SST_RECEIVE_ADDRESS
+WSREP_START_POSITION
+WSREP_SYNC_WAIT
+WSREP_TRX_FRAGMENT_SIZE
+WSREP_TRX_FRAGMENT_UNIT
diff --git a/mysql-test/suite/wsrep/r/variables_debug.result b/mysql-test/suite/wsrep/r/variables_debug.result
new file mode 100644
index 00000000000..fe2bffb3f08
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/variables_debug.result
@@ -0,0 +1,140 @@
+# Correct Galera library found
+SHOW GLOBAL STATUS LIKE 'wsrep%';
+Variable_name Value
+wsrep_local_state_uuid #
+wsrep_protocol_version #
+wsrep_last_committed #
+wsrep_replicated #
+wsrep_replicated_bytes #
+wsrep_repl_keys #
+wsrep_repl_keys_bytes #
+wsrep_repl_data_bytes #
+wsrep_repl_other_bytes #
+wsrep_received #
+wsrep_received_bytes #
+wsrep_local_commits #
+wsrep_local_cert_failures #
+wsrep_local_replays #
+wsrep_local_send_queue #
+wsrep_local_send_queue_max #
+wsrep_local_send_queue_min #
+wsrep_local_send_queue_avg #
+wsrep_local_recv_queue #
+wsrep_local_recv_queue_max #
+wsrep_local_recv_queue_min #
+wsrep_local_recv_queue_avg #
+wsrep_local_cached_downto #
+wsrep_flow_control_paused_ns #
+wsrep_flow_control_paused #
+wsrep_flow_control_sent #
+wsrep_flow_control_recv #
+wsrep_flow_control_active #
+wsrep_flow_control_requested #
+wsrep_cert_deps_distance #
+wsrep_apply_oooe #
+wsrep_apply_oool #
+wsrep_apply_window #
+wsrep_apply_waits #
+wsrep_commit_oooe #
+wsrep_commit_oool #
+wsrep_commit_window #
+wsrep_local_state #
+wsrep_local_state_comment #
+wsrep_cert_index_size #
+wsrep_causal_reads #
+wsrep_cert_interval #
+wsrep_open_transactions #
+wsrep_open_connections #
+wsrep_incoming_addresses #
+wsrep_cluster_weight #
+wsrep_debug_sync_waiters #
+wsrep_desync_count #
+wsrep_evs_delayed #
+wsrep_evs_evict_list #
+wsrep_evs_repl_latency #
+wsrep_evs_state #
+wsrep_gcomm_uuid #
+wsrep_gmcast_segment #
+wsrep_applier_thread_count #
+wsrep_cluster_capabilities #
+wsrep_cluster_conf_id #
+wsrep_cluster_size #
+wsrep_cluster_state_uuid #
+wsrep_cluster_status #
+wsrep_connected #
+wsrep_local_bf_aborts #
+wsrep_local_index #
+wsrep_provider_capabilities #
+wsrep_provider_name #
+wsrep_provider_vendor #
+wsrep_provider_version #
+wsrep_ready #
+wsrep_rollbacker_thread_count #
+wsrep_thread_count #
+# Should show nothing.
+SHOW STATUS LIKE 'x';
+Variable_name Value
+SELECT @@global.wsrep_cluster_address;
+@@global.wsrep_cluster_address
+gcomm://
+SELECT @@global.wsrep_on;
+@@global.wsrep_on
+1
+SHOW STATUS LIKE 'threads_connected';
+Variable_name Value
+Threads_connected 1
+SHOW STATUS LIKE 'wsrep_thread_count';
+Variable_name Value
+wsrep_thread_count 2
+# variables
+SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep%" ORDER BY VARIABLE_NAME;
+VARIABLE_NAME
+WSREP_AUTO_INCREMENT_CONTROL
+WSREP_CAUSAL_READS
+WSREP_CERTIFICATION_RULES
+WSREP_CERTIFY_NONPK
+WSREP_CLUSTER_ADDRESS
+WSREP_CLUSTER_NAME
+WSREP_CONVERT_LOCK_TO_TRX
+WSREP_DATA_HOME_DIR
+WSREP_DBUG_OPTION
+WSREP_DEBUG
+WSREP_DESYNC
+WSREP_DIRTY_READS
+WSREP_DRUPAL_282555_WORKAROUND
+WSREP_FORCED_BINLOG_FORMAT
+WSREP_GTID_DOMAIN_ID
+WSREP_GTID_MODE
+WSREP_IGNORE_APPLY_ERRORS
+WSREP_LOAD_DATA_SPLITTING
+WSREP_LOG_CONFLICTS
+WSREP_MAX_WS_ROWS
+WSREP_MAX_WS_SIZE
+WSREP_MYSQL_REPLICATION_BUNDLE
+WSREP_NODE_ADDRESS
+WSREP_NODE_INCOMING_ADDRESS
+WSREP_NODE_NAME
+WSREP_NOTIFY_CMD
+WSREP_ON
+WSREP_OSU_METHOD
+WSREP_PATCH_VERSION
+WSREP_PROVIDER
+WSREP_PROVIDER_OPTIONS
+WSREP_RECOVER
+WSREP_REJECT_QUERIES
+WSREP_REPLICATE_MYISAM
+WSREP_RESTART_SLAVE
+WSREP_RETRY_AUTOCOMMIT
+WSREP_SLAVE_FK_CHECKS
+WSREP_SLAVE_THREADS
+WSREP_SLAVE_UK_CHECKS
+WSREP_SR_STORE
+WSREP_SST_AUTH
+WSREP_SST_DONOR
+WSREP_SST_DONOR_REJECTS_QUERIES
+WSREP_SST_METHOD
+WSREP_SST_RECEIVE_ADDRESS
+WSREP_START_POSITION
+WSREP_SYNC_WAIT
+WSREP_TRX_FRAGMENT_SIZE
+WSREP_TRX_FRAGMENT_UNIT
diff --git a/mysql-test/suite/wsrep/r/wsrep-recover-v25,binlogon.rdiff b/mysql-test/suite/wsrep/r/wsrep-recover-v25,binlogon.rdiff
index 5bf6502d0d8..596abf9c681 100644
--- a/mysql-test/suite/wsrep/r/wsrep-recover-v25,binlogon.rdiff
+++ b/mysql-test/suite/wsrep/r/wsrep-recover-v25,binlogon.rdiff
@@ -1,17 +1,19 @@
---- r/wsrep-recover-v25.result 2019-01-27 15:38:58.819204748 +0200
-+++ r/wsrep-recover-v25.reject 2019-01-27 15:39:49.967358994 +0200
-@@ -18,11 +18,10 @@
- connection default;
- SET DEBUG_SYNC = "now WAIT_FOR after_prepare_reached";
- # Kill the server
--Expect seqno 3
--3
--Expect 5 7
-+Expect seqno 2
-+2
+--- r/wsrep-recover-v25.result 2019-02-28 09:20:56.153775856 +0200
++++ r/wsrep-recover-v25.reject 2019-02-28 09:22:16.578113115 +0200
+@@ -12,4 +12,16 @@
+ SELECT VARIABLE_VALUE `expect 6` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+ expect 6
+ 6
++connect con1, localhost, root;
++SET DEBUG_SYNC = "ha_commit_trans_after_prepare SIGNAL after_prepare_reached WAIT_FOR continue";
++INSERT INTO t1 VALUES (7);
++connection default;
++SET DEBUG_SYNC = "now WAIT_FOR after_prepare_reached";
++# Kill the server
++Expect seqno 6
++6
+Expect 5
- SELECT * FROM t1;
- f1
- 5
--7
++SELECT * FROM t1;
++f1
++5
DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/r/wsrep-recover-v25.result b/mysql-test/suite/wsrep/r/wsrep-recover-v25.result
index 6d146f67bdf..c6e9246a753 100644
--- a/mysql-test/suite/wsrep/r/wsrep-recover-v25.result
+++ b/mysql-test/suite/wsrep/r/wsrep-recover-v25.result
@@ -1,28 +1,15 @@
# Kill the server
-Expect seqno 0
-0
-CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
-# Kill the server
Expect seqno 1
1
-INSERT INTO t1 VALUES (5);
-# Kill the server
-Expect seqno 2
-2
-SELECT VARIABLE_VALUE `expect 2` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
-expect 2
-2
-connect con1, localhost, root;
-SET DEBUG_SYNC = "ha_commit_trans_after_prepare SIGNAL after_prepare_reached WAIT_FOR continue";
-INSERT INTO t1 VALUES (7);
-connection default;
-SET DEBUG_SYNC = "now WAIT_FOR after_prepare_reached";
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server
Expect seqno 3
3
-Expect 5 7
-SELECT * FROM t1;
-f1
+INSERT INTO t1 VALUES (5);
+# Kill the server
+Expect seqno 5
5
-7
+SELECT VARIABLE_VALUE `expect 6` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+expect 6
+6
DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/r/wsrep-recover.result b/mysql-test/suite/wsrep/r/wsrep-recover.result
new file mode 100644
index 00000000000..44b50a752d9
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/wsrep-recover.result
@@ -0,0 +1,64 @@
+# Kill the server
+Expect seqno 1
+1
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+# Kill the server
+Expect seqno 3
+3
+INSERT INTO t1 VALUES (5);
+# Kill the server
+Expect seqno 5
+5
+SELECT VARIABLE_VALUE `expect 6` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+expect 6
+6
+connect con1, localhost, root;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue";
+INSERT INTO t1 VALUES (7);
+connect con_ctrl, localhost, root;
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+connect con2, localhost, root;
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached WAIT_FOR continue";
+INSERT INTO t1 VALUES (8);
+connection con_ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached";
+connection default;
+# Kill the server
+Expect seqno 6
+6
+disconnect con1;
+disconnect con2;
+disconnect con_ctrl;
+connection default;
+SELECT VARIABLE_VALUE `expect 7` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+expect 7
+7
+connect con1, localhost, root;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_1 WAIT_FOR continue_before_commit_order_1";
+INSERT INTO t1 VALUES (9);
+connect con_ctrl, localhost, root;
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+connect con2, localhost, root;
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_2 WAIT_FOR continue_before_commit_order_2";
+INSERT INTO t1 VALUES (10);
+connection con_ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_2";
+SET DEBUG_SYNC = "now SIGNAL continue_after_certification";
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_1";
+connection default;
+# Kill the server
+Expect seqno 7
+7
+disconnect con1;
+disconnect con2;
+disconnect con_ctrl;
+connection default;
+SELECT VARIABLE_VALUE `expect 8` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+expect 8
+8
+Expect row 5
+SELECT * FROM t1;
+f1
+5
+DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/r/wsrep_on_basic.result b/mysql-test/suite/wsrep/r/wsrep_on_basic.result
new file mode 100644
index 00000000000..b3186fa674f
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/wsrep_on_basic.result
@@ -0,0 +1,50 @@
+#
+# wsrep_on
+#
+# save the initial values
+SET @wsrep_on_global_saved = @@global.wsrep_on;
+SET @wsrep_on_session_saved = @@session.wsrep_on;
+# default
+SELECT @@global.wsrep_on;
+@@global.wsrep_on
+1
+SELECT @@session.wsrep_on;
+@@session.wsrep_on
+1
+
+# scope and valid values
+SET @@global.wsrep_on=OFF;
+SELECT @@global.wsrep_on;
+@@global.wsrep_on
+0
+SET @@global.wsrep_on=ON;
+SELECT @@global.wsrep_on;
+@@global.wsrep_on
+1
+SET @@session.wsrep_on=OFF;
+SELECT @@session.wsrep_on;
+@@session.wsrep_on
+0
+SET @@session.wsrep_on=ON;
+SELECT @@session.wsrep_on;
+@@session.wsrep_on
+1
+SET @@session.wsrep_on=default;
+SELECT @@session.wsrep_on;
+@@session.wsrep_on
+1
+
+# invalid values
+SET @@global.wsrep_on=NULL;
+ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
+SET @@global.wsrep_on='junk';
+ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
+SET @@session.wsrep_on=NULL;
+ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
+SET @@session.wsrep_on='junk';
+ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
+
+# restore the initial values
+SET @@global.wsrep_on = @wsrep_on_global_saved;
+SET @@session.wsrep_on = @wsrep_on_session_saved;
+# End of test
diff --git a/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result b/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result
new file mode 100644
index 00000000000..ad35dc8dbcd
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result
@@ -0,0 +1,44 @@
+SELECT @@wsrep_on;
+@@wsrep_on
+1
+SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads;
+SET @wsrep_debug_saved = @@global.wsrep_debug;
+SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
+SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
+SET GLOBAL wsrep_provider=none;
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
+ERROR HY000: Incorrect arguments to SET
+SELECT @@session.wsrep_trx_fragment_size;
+@@session.wsrep_trx_fragment_size
+0
+SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
+SHOW WARNINGS;
+Level Code Message
+Warning 1231 Cannot set 'wsrep_start_position' because wsrep is switched off or provider is not loaded
+Error 1231 Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET GLOBAL wsrep_debug=1;
+Warnings:
+Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off
+SELECT @@global.wsrep_debug;
+@@global.wsrep_debug
+NONE
+SET GLOBAL wsrep_slave_threads=5;
+SELECT @@global.wsrep_slave_threads;
+@@global.wsrep_slave_threads
+5
+SET GLOBAL wsrep_desync=1;
+ERROR HY000: WSREP (galera) not started
+SELECT @@global.wsrep_desync;
+@@global.wsrep_desync
+0
+SET SESSION wsrep_trx_fragment_unit='rows';
+ERROR HY000: Incorrect arguments to SET
+SELECT @@session.wsrep_trx_fragment_unit;
+@@session.wsrep_trx_fragment_unit
+rows
+SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved;
+SET @@global.wsrep_debug = @wsrep_debug_saved;
diff --git a/mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result b/mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result
new file mode 100644
index 00000000000..7cae89eae8e
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result
@@ -0,0 +1,39 @@
+SELECT @@wsrep_on;
+@@wsrep_on
+0
+SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads;
+SET @wsrep_debug_saved = @@global.wsrep_debug;
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
+ERROR HY000: Incorrect arguments to SET
+SELECT @@session.wsrep_trx_fragment_size;
+@@session.wsrep_trx_fragment_size
+0
+SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
+ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
+SHOW WARNINGS;
+Level Code Message
+Warning 1231 Cannot set 'wsrep_start_position' because wsrep is switched off or provider is not loaded
+Error 1231 Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100'
+SELECT @@global.wsrep_start_position;
+@@global.wsrep_start_position
+00000000-0000-0000-0000-000000000000:-1
+SET GLOBAL wsrep_debug=1;
+Warnings:
+Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off
+SELECT @@global.wsrep_debug;
+@@global.wsrep_debug
+NONE
+SET GLOBAL wsrep_slave_threads=5;
+SELECT @@global.wsrep_slave_threads;
+@@global.wsrep_slave_threads
+5
+SET GLOBAL wsrep_desync=1;
+ERROR HY000: WSREP (galera) not started
+SELECT @@global.wsrep_desync;
+@@global.wsrep_desync
+0
+SET SESSION wsrep_trx_fragment_unit='rows';
+ERROR HY000: Incorrect arguments to SET
+SELECT @@session.wsrep_trx_fragment_unit;
+@@session.wsrep_trx_fragment_unit
+rows
diff --git a/mysql-test/suite/wsrep/suite.pm b/mysql-test/suite/wsrep/suite.pm
index 7b3dae7c8c3..2ee33d83275 100644
--- a/mysql-test/suite/wsrep/suite.pm
+++ b/mysql-test/suite/wsrep/suite.pm
@@ -1,16 +1,11 @@
package My::Suite::WSREP;
-use File::Basename;
-use My::Find;
-@ISA = qw(My::Suite);
-
-return "Not run for embedded server" if $::opt_embedded_server;
+use lib 'suite';
+use wsrep::common;
-return "WSREP is not compiled in" unless ::have_wsrep();
-
-return "No wsrep provider library" unless ::have_wsrep_provider();
+@ISA = qw(My::Suite);
-return ::wsrep_version_message() unless ::check_wsrep_version();
+return wsrep_not_ok() if wsrep_not_ok();
push @::global_suppressions,
(
diff --git a/mysql-test/suite/wsrep/t/MDEV-20625.cnf b/mysql-test/suite/wsrep/t/MDEV-20625.cnf
new file mode 100644
index 00000000000..75f8a25caff
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-20625.cnf
@@ -0,0 +1,8 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=OFF
+binlog-format=ROW
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address='gcomm://'
+innodb_autoinc_lock_mode=2
diff --git a/mysql-test/suite/wsrep/t/MDEV-20625.test b/mysql-test/suite/wsrep/t/MDEV-20625.test
new file mode 100644
index 00000000000..2a537fe432e
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-20625.test
@@ -0,0 +1,10 @@
+#
+# Check SHOW GLOBAL STATUS after dynamic setting WSREP=ON
+#
+--source include/have_innodb.inc
+--source include/have_wsrep_provider.inc
+--source include/have_binlog_format_row.inc
+
+SET GLOBAL wsrep_on=ON;
+SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size';
+SET GLOBAL wsrep_on=OFF;
diff --git a/mysql-test/suite/wsrep/t/MDEV-22443.cnf b/mysql-test/suite/wsrep/t/MDEV-22443.cnf
new file mode 100644
index 00000000000..851f2999a83
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-22443.cnf
@@ -0,0 +1,8 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=OFF
+binlog-format=ROW
+wsrep-provider=none
+wsrep-cluster-address='gcomm://'
+innodb_autoinc_lock_mode=2
diff --git a/mysql-test/suite/wsrep/t/MDEV-22443.test b/mysql-test/suite/wsrep/t/MDEV-22443.test
new file mode 100644
index 00000000000..674cb5ae2d8
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-22443.test
@@ -0,0 +1,12 @@
+#
+# MDEV-22443: terminate called after throwing an instance of
+# 'wsrep::runtime_error' in std::terminate on START TRANSACTION
+#
+
+--source include/have_innodb.inc
+--source include/have_wsrep.inc
+--source include/have_binlog_format_row.inc
+
+SET SESSION wsrep_sync_wait=15;
+SET SESSION wsrep_on=1;
+START TRANSACTION READ WRITE;
diff --git a/mysql-test/suite/wsrep/t/MDEV-23081.cnf b/mysql-test/suite/wsrep/t/MDEV-23081.cnf
new file mode 100644
index 00000000000..489c4385dbd
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-23081.cnf
@@ -0,0 +1,9 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+binlog-format=ROW
+innodb-flush-log-at-trx-commit=1
+wsrep-cluster-address=gcomm://
+wsrep-provider=@ENV.WSREP_PROVIDER
+innodb-autoinc-lock-mode=2
diff --git a/mysql-test/suite/wsrep/t/MDEV-23081.combinations b/mysql-test/suite/wsrep/t/MDEV-23081.combinations
new file mode 100644
index 00000000000..1ce3b45aa1a
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-23081.combinations
@@ -0,0 +1,4 @@
+[binlogon]
+log-bin
+
+[binlogoff]
diff --git a/mysql-test/suite/wsrep/t/MDEV-23081.test b/mysql-test/suite/wsrep/t/MDEV-23081.test
new file mode 100644
index 00000000000..04305b22b24
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-23081.test
@@ -0,0 +1,57 @@
+#
+# MDEV-23081: Stray XA transactions at startup
+# if node restarts with wsrep_on=OFF
+#
+--source include/have_wsrep.inc
+--source include/have_innodb.inc
+--source include/have_wsrep_provider.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+
+#
+# Execute two inserts on block those after becoming
+# prepared, and before they are committed
+#
+--connect con1, localhost, root
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_1 WAIT_FOR continue_before_commit_order_1";
+--send INSERT INTO t1 VALUES (9)
+
+--connect con_ctrl, localhost, root
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+
+--connect con2, localhost, root
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_2 WAIT_FOR continue_before_commit_order_2";
+--send INSERT INTO t1 VALUES (10)
+
+--connection con_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_2";
+SET DEBUG_SYNC = "now SIGNAL continue_after_certification";
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_1";
+
+#
+# Kill the server
+#
+--connection default
+--source include/kill_mysqld.inc
+
+#
+# and restart it with wsrep-on=OFF
+#
+let $restart_noprint=2;
+--let $restart_parameters=--wsrep-on=OFF
+--source include/start_mysqld.inc
+
+#
+# Expect no prepared XA transactions to be reported
+#
+XA RECOVER;
+
+--disconnect con1
+--disconnect con2
+--disconnect con_ctrl
+--connection default
+
+DROP TABLE t1;
+CALL mtr.add_suppression("You need to use --log-bin to make --binlog-format work");
diff --git a/mysql-test/suite/wsrep/t/MDEV-23092.cnf b/mysql-test/suite/wsrep/t/MDEV-23092.cnf
new file mode 100644
index 00000000000..851f2999a83
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-23092.cnf
@@ -0,0 +1,8 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=OFF
+binlog-format=ROW
+wsrep-provider=none
+wsrep-cluster-address='gcomm://'
+innodb_autoinc_lock_mode=2
diff --git a/mysql-test/suite/wsrep/t/MDEV-23092.test b/mysql-test/suite/wsrep/t/MDEV-23092.test
new file mode 100644
index 00000000000..92a6e392013
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-23092.test
@@ -0,0 +1,22 @@
+#
+# MDEV-23092: SIGABRT in wsrep::server_state::provider when setting
+# invalid wsrep_provider (on optimized builds)
+#
+
+--source include/have_innodb.inc
+--source include/have_wsrep.inc
+--source include/have_binlog_format_row.inc
+
+SET COLLATION_CONNECTION='utf16le_bin';
+--error 1231
+SET GLOBAL wsrep_provider='/invalid/path/libgalera_smm.so';
+SET GLOBAL wsrep_cluster_address='OFF';
+SET GLOBAL wsrep_slave_threads=10;
+SELECT 1;
+
+SET GLOBAL wsrep_cluster_address='gcomm://';
+SET GLOBAL wsrep_slave_threads=DEFAULT;
+
+CALL mtr.add_suppression("wsrep_load()");
+CALL mtr.add_suppression("Failed to create a new provider");
+CALL mtr.add_suppression("Failed to load provider");
diff --git a/mysql-test/suite/wsrep/t/MDEV-23466.cnf b/mysql-test/suite/wsrep/t/MDEV-23466.cnf
new file mode 100644
index 00000000000..851f2999a83
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-23466.cnf
@@ -0,0 +1,8 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=OFF
+binlog-format=ROW
+wsrep-provider=none
+wsrep-cluster-address='gcomm://'
+innodb_autoinc_lock_mode=2
diff --git a/mysql-test/suite/wsrep/t/MDEV-23466.test b/mysql-test/suite/wsrep/t/MDEV-23466.test
new file mode 100644
index 00000000000..2615298226e
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/MDEV-23466.test
@@ -0,0 +1,10 @@
+#
+# MDEV-23466: SIGABRT in wsrep::server_state::provider on
+# SELECT WSREP_LAST_SEEN_GTID() on optimized builds
+#
+
+--source include/have_innodb.inc
+--source include/have_wsrep.inc
+--source include/have_binlog_format_row.inc
+
+SELECT WSREP_LAST_SEEN_GTID();
diff --git a/mysql-test/suite/wsrep/t/binlog_format.cnf b/mysql-test/suite/wsrep/t/binlog_format.cnf
new file mode 100644
index 00000000000..7ec24c14d80
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/binlog_format.cnf
@@ -0,0 +1,8 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
+innodb_autoinc_lock_mode=2
+
diff --git a/mysql-test/suite/wsrep/t/binlog_format.opt b/mysql-test/suite/wsrep/t/binlog_format.opt
index 6504506e267..299096e5aa5 100644
--- a/mysql-test/suite/wsrep/t/binlog_format.opt
+++ b/mysql-test/suite/wsrep/t/binlog_format.opt
@@ -1 +1 @@
---innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1
+--wsrep-on=1
diff --git a/mysql-test/suite/wsrep/t/binlog_format.test b/mysql-test/suite/wsrep/t/binlog_format.test
index 07001b17a84..695859a2ad3 100644
--- a/mysql-test/suite/wsrep/t/binlog_format.test
+++ b/mysql-test/suite/wsrep/t/binlog_format.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/wsrep/t/mdev_10186.test b/mysql-test/suite/wsrep/t/mdev_10186.test
index 63d34db7c42..0f0aa287086 100644
--- a/mysql-test/suite/wsrep/t/mdev_10186.test
+++ b/mysql-test/suite/wsrep/t/mdev_10186.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/wsrep/t/mdev_22681.cnf b/mysql-test/suite/wsrep/t/mdev_22681.cnf
new file mode 100644
index 00000000000..2f310476733
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_22681.cnf
@@ -0,0 +1,10 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+log-bin
+binlog-format=ROW
+innodb-flush-log-at-trx-commit=1
+wsrep-cluster-address=gcomm://
+wsrep-provider=@ENV.WSREP_PROVIDER
+innodb-autoinc-lock-mode=2
diff --git a/mysql-test/suite/wsrep/t/mdev_22681.test b/mysql-test/suite/wsrep/t/mdev_22681.test
new file mode 100644
index 00000000000..ce1129c7485
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_22681.test
@@ -0,0 +1,15 @@
+#
+# MDEV-22681: Server crashes in galera::ReplicatorSMM::CommitOrder::CommitOrder
+# or assertion failed in wsrep::transaction::before_prepare.
+#
+# EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b'
+# crashes the server if binlog is on (see mdev_22681.cnf for configuration).
+#
+--source include/have_wsrep.inc
+--source include/have_wsrep_provider.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b';
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/t/mdev_6832.cnf b/mysql-test/suite/wsrep/t/mdev_6832.cnf
new file mode 100644
index 00000000000..0bf01f81fc5
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_6832.cnf
@@ -0,0 +1,7 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
+
diff --git a/mysql-test/suite/wsrep/t/mdev_6832.opt b/mysql-test/suite/wsrep/t/mdev_6832.opt
deleted file mode 100644
index 16f8962dba2..00000000000
--- a/mysql-test/suite/wsrep/t/mdev_6832.opt
+++ /dev/null
@@ -1 +0,0 @@
---wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1
diff --git a/mysql-test/suite/wsrep/t/mdev_6832.test b/mysql-test/suite/wsrep/t/mdev_6832.test
index 9efccface57..d5303ce3fcf 100644
--- a/mysql-test/suite/wsrep/t/mdev_6832.test
+++ b/mysql-test/suite/wsrep/t/mdev_6832.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
@@ -11,5 +12,6 @@ eval SET @@global.wsrep_provider='$WSREP_PROVIDER';
--enable_query_log
SHOW STATUS LIKE 'wsrep_ready';
SET @@global.wsrep_cluster_address='gcomm://';
-
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
--echo # End of test.
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.cnf b/mysql-test/suite/wsrep/t/mdev_7798.cnf
new file mode 100644
index 00000000000..0bf01f81fc5
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_7798.cnf
@@ -0,0 +1,7 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
+
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.opt b/mysql-test/suite/wsrep/t/mdev_7798.opt
deleted file mode 100644
index 1007d5c0b78..00000000000
--- a/mysql-test/suite/wsrep/t/mdev_7798.opt
+++ /dev/null
@@ -1 +0,0 @@
---wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.test b/mysql-test/suite/wsrep/t/mdev_7798.test
index 9dfff0959bc..b9938d936cc 100644
--- a/mysql-test/suite/wsrep/t/mdev_7798.test
+++ b/mysql-test/suite/wsrep/t/mdev_7798.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/wsrep/t/plugin.opt b/mysql-test/suite/wsrep/t/plugin.opt
new file mode 100644
index 00000000000..f043a4a21cf
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/plugin.opt
@@ -0,0 +1 @@
+--binlog_format=ROW --log-bin --wsrep-on=1 --innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm://
diff --git a/mysql-test/suite/wsrep/t/plugin.test b/mysql-test/suite/wsrep/t/plugin.test
index 60738440a55..73d605b0918 100644
--- a/mysql-test/suite/wsrep/t/plugin.test
+++ b/mysql-test/suite/wsrep/t/plugin.test
@@ -1,4 +1,5 @@
--source include/have_wsrep.inc
+--source include/have_innodb.inc
#
# MDEV-7604: wsrep plugin lists its status as Unknown
diff --git a/mysql-test/suite/wsrep/t/trans.opt b/mysql-test/suite/wsrep/t/trans.opt
new file mode 100644
index 00000000000..a8b72174076
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/trans.opt
@@ -0,0 +1 @@
+--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_on=1 --binlog_format=ROW
diff --git a/mysql-test/suite/wsrep/t/trans.test b/mysql-test/suite/wsrep/t/trans.test
index a7f595366b2..d8c4a4722a0 100644
--- a/mysql-test/suite/wsrep/t/trans.test
+++ b/mysql-test/suite/wsrep/t/trans.test
@@ -9,7 +9,6 @@
--echo #
START TRANSACTION WITH CONSISTENT SNAPSHOT;
---error 1030
SAVEPOINT A;
--echo End of test.
diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
index 9187f02f942..e40ac7b8772 100644
--- a/mysql-test/suite/wsrep/t/variables.test
+++ b/mysql-test/suite/wsrep/t/variables.test
@@ -1,151 +1,26 @@
--source include/have_wsrep.inc
--source include/force_restart.inc
--source include/have_innodb.inc
+--source include/galera_no_debug_sync.inc
-call mtr.add_suppression("WSREP: Initial position was provided by configuration or SST, avoiding override");
-
-SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
-SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
-
---echo
---echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
---echo #
---echo # Testing wsrep_replicate_myisam variable.
-
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.wsrep_replicate_myisam;
-SELECT @@global.wsrep_replicate_myisam;
-
---error ER_GLOBAL_VARIABLE
-SET SESSION wsrep_replicate_myisam= ON;
-SET GLOBAL wsrep_replicate_myisam= ON;
-
-# Reset it back.
-SET GLOBAL wsrep_replicate_myisam= OFF;
-#SET GLOBAL wsrep_provider=none;
-
---echo #
---echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
---echo # variables when using "_"
---echo #
-
-CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
-
-#evalp SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
---let $galera_version=25.3.24
+--let $galera_version=26.4.9
source include/check_galera_version.inc;
+source include/galera_variables_ok.inc;
+
--replace_column 2 #
-SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
+SHOW GLOBAL STATUS LIKE 'wsrep%';
--echo # Should show nothing.
SHOW STATUS LIKE 'x';
-# Reset it back.
-#SET GLOBAL wsrep_provider=none;
-
-#evalp SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
-
-# The following 2 variables are used by mariabackup
-# SST.
---echo
---replace_column 2 #
-SHOW STATUS LIKE 'wsrep_local_state_uuid';
---echo
---replace_column 2 #
-SHOW STATUS LIKE 'wsrep_last_committed';
-
-# Reset it back.
-#SET GLOBAL wsrep_provider=none;
-
---echo
---echo #
---echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
---echo #
-call mtr.add_suppression("WSREP: Failed to get provider options");
-
-#evalp SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
-
---replace_regex /.*libgalera.*/libgalera_smm.so/
-SELECT @@global.wsrep_provider;
-SELECT @@global.wsrep_slave_threads;
SELECT @@global.wsrep_cluster_address;
SELECT @@global.wsrep_on;
-SHOW STATUS LIKE 'threads_connected';
-SHOW STATUS LIKE 'wsrep_thread_count';
---echo
-#evalp SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
-
---replace_regex /.*libgalera.*/libgalera_smm.so/
-SELECT @@global.wsrep_provider;
-SELECT @@global.wsrep_cluster_address;
-SELECT @@global.wsrep_on;
-SHOW STATUS LIKE 'threads_connected';
-SHOW STATUS LIKE 'wsrep_thread_count';
---echo
-
---echo # Setting wsrep_cluster_address triggers the creation of
---echo # applier/rollbacker threads.
-#SET GLOBAL wsrep_cluster_address= 'gcomm://';
-
---echo # Wait for applier thread to get created 1.
---let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
---source include/wait_condition.inc
---echo # Wait for applier thread to get created 2.
---let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
---source include/wait_condition.inc
-
-SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
-SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
-
---replace_regex /.*libgalera.*/libgalera_smm.so/
-SELECT @@global.wsrep_provider;
-SELECT @@global.wsrep_cluster_address;
-SELECT @@global.wsrep_on;
SHOW STATUS LIKE 'threads_connected';
SHOW STATUS LIKE 'wsrep_thread_count';
---echo
-
-SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
-SET GLOBAL wsrep_slave_threads= 10;
-
---echo # Wait for 9 applier threads to get created.
---let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
---source include/wait_condition.inc
-
-SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
-SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
-
-SHOW STATUS LIKE 'threads_connected';
-
-#
-# privileges for wsrep_on
-#
-set wsrep_on=0;
-set wsrep_on=1;
---source include/wait_until_connected_again.inc
-create user test@localhost;
-connect con1,localhost,test;
-set auto_increment_increment=10;
---error ER_SPECIFIC_ACCESS_DENIED_ERROR
-set wsrep_on=0;
-disconnect con1;
-connection default;
-drop user test@localhost;
-
---echo #
---echo # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
---echo #
-SET @wsrep_sst_auth_saved= @@global.wsrep_sst_auth;
-SET @@global.wsrep_sst_auth= 'user:pass';
-SET @@global.wsrep_sst_auth= '';
-SET @@global.wsrep_sst_auth= NULL;
-SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
---source include/galera_wait_ready.inc
+--echo # variables
---echo # End of test.
+SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep%" ORDER BY VARIABLE_NAME;
diff --git a/mysql-test/suite/wsrep/t/variables_debug.cnf b/mysql-test/suite/wsrep/t/variables_debug.cnf
new file mode 100644
index 00000000000..b1c96d2614d
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/variables_debug.cnf
@@ -0,0 +1,7 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-cluster-address=gcomm://
+wsrep-provider=@ENV.WSREP_PROVIDER
+binlog-format=ROW
diff --git a/mysql-test/suite/wsrep/t/variables_debug.test b/mysql-test/suite/wsrep/t/variables_debug.test
new file mode 100644
index 00000000000..29747e48f18
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/variables_debug.test
@@ -0,0 +1,28 @@
+--source include/have_wsrep.inc
+--source include/force_restart.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+--let $galera_version=26.4.9
+source include/check_galera_version.inc;
+
+source include/galera_variables_ok.inc;
+
+--replace_column 2 #
+SHOW GLOBAL STATUS LIKE 'wsrep%';
+
+--echo # Should show nothing.
+SHOW STATUS LIKE 'x';
+
+SELECT @@global.wsrep_cluster_address;
+SELECT @@global.wsrep_on;
+
+SHOW STATUS LIKE 'threads_connected';
+SHOW STATUS LIKE 'wsrep_thread_count';
+
+--echo # variables
+
+SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep%" ORDER BY VARIABLE_NAME;
+
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover-v25.test b/mysql-test/suite/wsrep/t/wsrep-recover-v25.test
index cfd77fbdef4..743e2795c1c 100644
--- a/mysql-test/suite/wsrep/t/wsrep-recover-v25.test
+++ b/mysql-test/suite/wsrep/t/wsrep-recover-v25.test
@@ -37,9 +37,11 @@ if ($log_bin) {
# The expected recovered seqno is 1 corresponding to initial cluster
# configuration change.
#
+let $restart_noprint=2;
+
--source include/kill_mysqld.inc
--source wsrep-recover-step.inc
---echo Expect seqno 0
+--echo Expect seqno 1
--echo $wsrep_recover_start_position_seqno
--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
@@ -48,13 +50,15 @@ if ($log_bin) {
#
# Senario 2
-# The expected recovered seqno is 1 corresponding to CREATE TABLE
+# The expected recovered seqno is 3 corresponding to two configuration
+# changes and CREATE TABLE
#
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+let $restart_noprint=2;
--source include/kill_mysqld.inc
--source wsrep-recover-step.inc
---echo Expect seqno 1
+--echo Expect seqno 3
--echo $wsrep_recover_start_position_seqno
--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
@@ -63,57 +67,53 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
#
# Scenario 3
-# The expected recovered seqno is 2 corresponding to CREATE TABLE and INSERT.
+# The expected recovered seqno is 5 corresponding to three configuration
+# changes, CREATE TABLE and INSERT.
#
-# The expected wsrep_last_committed after the server is restarted is 2.
+# The expected wsrep_last_committed after the server is restarted is 6.
#
INSERT INTO t1 VALUES (5);
+let $restart_noprint=2;
--source include/kill_mysqld.inc
--source wsrep-recover-step.inc
---echo Expect seqno 2
+--echo Expect seqno 5
--echo $wsrep_recover_start_position_seqno
--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
--source include/start_mysqld.inc
--source include/wait_wsrep_ready.inc
-SELECT VARIABLE_VALUE `expect 2` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+SELECT VARIABLE_VALUE `expect 6` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
#
# Scenario 4
#
# The INSERT gets prepared but not committed.
#
-# If binlog is off, the expected outcome is that the INSERT gets committed
-# since it is already committed in the cluster. If binlog is on, the INSERT
+# This scenario is not applicable if binlog is not on since the
+# commit is not 2PC.
+#
+# If binlog is on, the INSERT
# should be rolled back during recovery phase since it has not yet
# been logged into binlog.
#
---connect con1, localhost, root
-SET DEBUG_SYNC = "ha_commit_trans_after_prepare SIGNAL after_prepare_reached WAIT_FOR continue";
---send INSERT INTO t1 VALUES (7)
-
---connection default
-SET DEBUG_SYNC = "now WAIT_FOR after_prepare_reached";
---source include/kill_mysqld.inc
---source wsrep-recover-step.inc
if ($log_bin) {
- --echo Expect seqno 2
-}
-if (!$log_bin) {
- --echo Expect seqno 3
-}
---echo $wsrep_recover_start_position_seqno
---let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
---source include/start_mysqld.inc
---source include/wait_wsrep_ready.inc
+ --connect con1, localhost, root
+ SET DEBUG_SYNC = "ha_commit_trans_after_prepare SIGNAL after_prepare_reached WAIT_FOR continue";
+ --send INSERT INTO t1 VALUES (7)
-if ($log_bin) {
- --echo Expect 5
-}
-if (!$log_bin) {
- --echo Expect 5 7
+ --connection default
+ let $restart_noprint=2;
+ SET DEBUG_SYNC = "now WAIT_FOR after_prepare_reached";
+ --source include/kill_mysqld.inc
+ --source wsrep-recover-step.inc
+ --echo Expect seqno 6
+ --echo $wsrep_recover_start_position_seqno
+ --let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+ --source include/start_mysqld.inc
+ --source include/wait_wsrep_ready.inc
+ --echo Expect 5
+ SELECT * FROM t1;
}
-SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover.cnf b/mysql-test/suite/wsrep/t/wsrep-recover.cnf
new file mode 100644
index 00000000000..19986cd97bc
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep-recover.cnf
@@ -0,0 +1,9 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+binlog-format=ROW
+innodb-flush-log-at-trx-commit=1
+wsrep-cluster-address=gcomm://
+wsrep-provider=@ENV.WSREP_PROVIDER
+innodb-autoinc-lock-mode=2 \ No newline at end of file
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover.combinations b/mysql-test/suite/wsrep/t/wsrep-recover.combinations
new file mode 100644
index 00000000000..1ce3b45aa1a
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep-recover.combinations
@@ -0,0 +1,4 @@
+[binlogon]
+log-bin
+
+[binlogoff]
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover.test b/mysql-test/suite/wsrep/t/wsrep-recover.test
new file mode 100644
index 00000000000..75271e45b15
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep-recover.test
@@ -0,0 +1,194 @@
+#
+# Verify that the wsrep XID gets updated in InnoDB rollback segment
+# properly and can be recovered with --wsrep-recover
+#
+# The test runs the following scenarios:
+#
+# 1) The server is started but no SQL is run
+# 2) DDL is executed
+# 3) INSERT is executed
+# 4) Two INSERTs are executed so that the first one in order will be
+# blocked after certification and the second one before entering
+# commit order critical section.
+# 5) Two DMLs are executed so that the prepare step is run out of order.
+# Both transactions are blocked before commit order critical section.
+#
+# After each scenario server is killed and the recovered position
+# is validated.
+#
+
+--source include/have_wsrep.inc
+--source include/have_innodb.inc
+--source include/have_wsrep_provider.inc
+--source include/have_debug_sync.inc
+
+# Binlog option for recovery run. This must be set in the test because
+# combinations file causes log-bin option to be set from command line,
+# not via my.cnf.
+#
+--let $log_bin = `SELECT @@log_bin`
+if ($log_bin) {
+--let $wsrep_recover_binlog_opt = --log-bin
+}
+
+#
+# Scenario 1
+# The expected recovered seqno is 1 corresponding to initial cluster
+# configuration change.
+#
+let $restart_noprint=2;
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 1
+--echo $wsrep_recover_start_position_seqno
+
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+#
+# Senario 2
+# The expected recovered seqno is 3 corresponding to two configuration
+# change events and CREATE TABLE.
+#
+let $restart_noprint=2;
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 3
+--echo $wsrep_recover_start_position_seqno
+
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+#
+# Scenario 3
+# The expected recovered seqno is 5 corresponding to three configuration
+# change events, CREATE TABLE and INSERT.
+#
+# The expected wsrep_last_committed after the server is restarted is 6.
+#
+let $restart_noprint=2;
+
+INSERT INTO t1 VALUES (5);
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 5
+--echo $wsrep_recover_start_position_seqno
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+SELECT VARIABLE_VALUE `expect 6` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+
+#
+# Scenario 4
+#
+# This will cause the following
+#
+# Seqno 7 - the first INSERT is blocked after it is certified but before
+# it gets prepared
+# Seqno 8 - the second INSERT is blocked before it will be ordered for
+# commit, so it becomes prepared
+#
+# As an outcome, the recovery process should return seqno 6 because
+# the range of prepared transactions found after the crash recovery
+# is not continuous up to 8.
+#
+# The expected wsrep_last_committed after server is restarted is 7.
+#
+
+# Send INSERT which will block after certification
+--connect con1, localhost, root
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue";
+--send INSERT INTO t1 VALUES (7)
+
+--connect con_ctrl, localhost, root
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+
+# Send INSERT which will block before commit order critical section
+--connect con2, localhost, root
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached WAIT_FOR continue";
+--send INSERT INTO t1 VALUES (8)
+
+--connection con_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached";
+
+--connection default
+let $restart_noprint=2;
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 6
+--echo $wsrep_recover_start_position_seqno
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+--disconnect con1
+--disconnect con2
+--disconnect con_ctrl
+--connection default
+
+SELECT VARIABLE_VALUE `expect 7` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+
+#
+# Scenario 5
+#
+# This scenario will run two INSERTs in parallel so that they are
+# prepared out of order. The execution is stopped before commit
+# and the server is killed.
+#
+# The transactions will be recovered from InnoDB but
+# will be rolled back:
+# - If binlog is on, the binlog acts as a transaction coordinator.
+# The transaction is not logged into binlog, so the transaction is rolled
+# back.
+# - If binlog is not on, the transaction is 1PC and the wsrep XID
+# is not persisted before commit is complete.
+#
+
+--connect con1, localhost, root
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_1 WAIT_FOR continue_before_commit_order_1";
+--send INSERT INTO t1 VALUES (9)
+
+--connect con_ctrl, localhost, root
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+
+--connect con2, localhost, root
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_2 WAIT_FOR continue_before_commit_order_2";
+--send INSERT INTO t1 VALUES (10)
+
+--connection con_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_2";
+SET DEBUG_SYNC = "now SIGNAL continue_after_certification";
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_1";
+
+--connection default
+let $restart_noprint=2;
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 7
+
+--echo $wsrep_recover_start_position_seqno
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+--disconnect con1
+--disconnect con2
+--disconnect con_ctrl
+--connection default
+
+
+SELECT VARIABLE_VALUE `expect 8` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+
+#
+# Final sanity check: The successful inserts into t1 should result single row
+#
+--echo Expect row 5
+SELECT * FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/t/wsrep_on_basic.opt b/mysql-test/suite/wsrep/t/wsrep_on_basic.opt
new file mode 100644
index 00000000000..9da4dd32881
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_on_basic.opt
@@ -0,0 +1 @@
+--wsrep-provider=$WSREP_PROVIDER --binlog_format=ROW --wsrep-cluster-address=gcomm://
diff --git a/mysql-test/suite/wsrep/t/wsrep_on_basic.test b/mysql-test/suite/wsrep/t/wsrep_on_basic.test
new file mode 100644
index 00000000000..98062dbec83
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_on_basic.test
@@ -0,0 +1,47 @@
+--source include/have_wsrep.inc
+--source include/have_wsrep_provider.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # wsrep_on
+--echo #
+
+--echo # save the initial values
+SET @wsrep_on_global_saved = @@global.wsrep_on;
+SET @wsrep_on_session_saved = @@session.wsrep_on;
+
+--echo # default
+SELECT @@global.wsrep_on;
+SELECT @@session.wsrep_on;
+
+--echo
+--echo # scope and valid values
+SET @@global.wsrep_on=OFF;
+SELECT @@global.wsrep_on;
+SET @@global.wsrep_on=ON;
+SELECT @@global.wsrep_on;
+
+SET @@session.wsrep_on=OFF;
+SELECT @@session.wsrep_on;
+SET @@session.wsrep_on=ON;
+SELECT @@session.wsrep_on;
+SET @@session.wsrep_on=default;
+SELECT @@session.wsrep_on;
+
+--echo
+--echo # invalid values
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_on=NULL;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.wsrep_on='junk';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@session.wsrep_on=NULL;
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@session.wsrep_on='junk';
+
+--echo
+--echo # restore the initial values
+SET @@global.wsrep_on = @wsrep_on_global_saved;
+SET @@session.wsrep_on = @wsrep_on_session_saved;
+
+--echo # End of test
diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf
new file mode 100644
index 00000000000..b73146d26e7
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf
@@ -0,0 +1,12 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+
+[mysqld.1]
+wsrep-on=ON
+binlog-format=ROW
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address='gcomm://'
+#galera_port=@OPT.port
+#ist_port=@OPT.port
+#sst_port=@OPT.port
+
diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test
new file mode 100644
index 00000000000..b44c9c5ebc8
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test
@@ -0,0 +1,38 @@
+--source include/have_wsrep.inc
+--source include/have_innodb.inc
+
+SELECT @@wsrep_on;
+
+SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads;
+SET @wsrep_debug_saved = @@global.wsrep_debug;
+SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
+SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
+
+SET GLOBAL wsrep_provider=none;
+
+--error ER_WRONG_ARGUMENTS
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
+SELECT @@session.wsrep_trx_fragment_size;
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
+SHOW WARNINGS;
+SELECT @@global.wsrep_start_position;
+SET GLOBAL wsrep_debug=1;
+SELECT @@global.wsrep_debug;
+SET GLOBAL wsrep_slave_threads=5;
+SELECT @@global.wsrep_slave_threads;
+--error ER_WRONG_ARGUMENTS
+SET GLOBAL wsrep_desync=1;
+SELECT @@global.wsrep_desync;
+--error ER_WRONG_ARGUMENTS
+SET SESSION wsrep_trx_fragment_unit='rows';
+SELECT @@session.wsrep_trx_fragment_unit;
+
+--disable_query_log
+eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
+SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved;
+SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved;
+--source include/galera_wait_ready.inc
+SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved;
+SET @@global.wsrep_debug = @wsrep_debug_saved;
+--enable_query_log
diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf
new file mode 100644
index 00000000000..2e66b1ef23c
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf
@@ -0,0 +1,12 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+
+[mysqld]
+wsrep-on=OFF
+
+[mysqld.1]
+wsrep-on=OFF
+#galera_port=@OPT.port
+#ist_port=@OPT.port
+#sst_port=@OPT.port
+
diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test
new file mode 100644
index 00000000000..4a9cd2bad5f
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test
@@ -0,0 +1,30 @@
+--source include/have_wsrep.inc
+--source include/have_innodb.inc
+
+SELECT @@wsrep_on;
+
+SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads;
+SET @wsrep_debug_saved = @@global.wsrep_debug;
+
+--error ER_WRONG_ARGUMENTS
+SET SESSION wsrep_trx_fragment_size=DEFAULT;
+SELECT @@session.wsrep_trx_fragment_size;
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
+SHOW WARNINGS;
+SELECT @@global.wsrep_start_position;
+SET GLOBAL wsrep_debug=1;
+SELECT @@global.wsrep_debug;
+SET GLOBAL wsrep_slave_threads=5;
+SELECT @@global.wsrep_slave_threads;
+--error ER_WRONG_ARGUMENTS
+SET GLOBAL wsrep_desync=1;
+SELECT @@global.wsrep_desync;
+--error ER_WRONG_ARGUMENTS
+SET SESSION wsrep_trx_fragment_unit='rows';
+SELECT @@session.wsrep_trx_fragment_unit;
+
+--disable_query_log
+SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved;
+SET @@global.wsrep_debug = @wsrep_debug_saved;
+--enable_query_log
diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests
index cc91fd39902..a76912f4c78 100644
--- a/mysql-test/unstable-tests
+++ b/mysql-test/unstable-tests
@@ -23,140 +23,170 @@
#
##############################################################################
#
-# Based on bb-10.3-release 6f93df1c2 (Merge branch '10.2' into 10.3)
+# Based on bb-10.4-release d348555cd (MDEV-23328 Server hang due to Galera lock conflict resolution)
# for main suite changes and failures, and
-# 10.3 794f66513967891520ec432123dcff8270871b93
+# bb-10.4-release 80c951ce2875aac521b82323b5b6ebf638593445
# for the rest
+
main.alter_table_trans : MDEV-12084 - timeout
main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result
main.auth_named_pipe : MDEV-14724 - System error 2
-main.auto_increment_ranges_innodb : Modified in 10.3.28
+main.auto_increment_ranges_innodb : Modified in 10.4.18
+main.backup_stages : MDEV-23401 - Bad file descriptor
+main.binary_to_hex : MDEV-20211 - Wrong result
+main.check_constraint : Modified in 10.4.18
main.connect : MDEV-17282 - Wrong result
main.connect2 : MDEV-13885 - Server crash
-main.create : Modified in 10.3.28
+main.create : Modified in 10.4.18
main.create_delayed : MDEV-10605 - failed with timeout
main.create_drop_event : MDEV-16271 - Wrong result
-main.cte_nonrecursive : Modified in 10.3.28
-main.cte_nonrecursive_not_embedded : Added in 10.3.28
-main.cte_recursive : Modified in 10.3.28
+main.cte_nonrecursive : Modified in 10.4.18
+main.cte_nonrecursive_not_embedded : Added in 10.4.18
+main.cte_recursive : Modified in 10.4.18
+main.ctype_binary : MDEV-24080 - Data too long for column
+main.ctype_cp932_binlog_stm : MDEV-20534 - Wrong result
main.ctype_ucs : MDEV-17681 - Data too long for column
main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade
main.ctype_utf16 : MDEV-10675: timeout or extra warnings
main.ctype_utf16le : MDEV-10675: timeout or extra warnings
-main.ctype_utf8mb4 : Modified in 10.3.28
-main.ctype_utf8mb4_heap : Include file modified in 10.3.28
-main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.3.28
-main.ctype_utf8mb4_myisam : Include file modified in 10.3.28
+main.ctype_utf8mb4 : Modified in 10.4.18
+main.ctype_utf8mb4_heap : Include file modified in 10.4.18
+main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.4.18
+main.ctype_utf8mb4_myisam : Include file modified in 10.4.18
main.debug_sync : MDEV-10607 - internal error
-main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.3.28
+main.delayed : MDEV-20961 - Assertion failure
+main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.4.18
main.dirty_close : MDEV-19368 - mysqltest failed but provided no output
main.distinct : MDEV-14194 - Crash
main.drop_bad_db_type : MDEV-15676 - Wrong result
main.dyncol : MDEV-19455 - Extra warning
-main.empty_string_literal : Modified in 10.3.28
+main.empty_string_literal : Modified in 10.4.18
main.events_2 : MDEV-13277 - Crash
main.events_bugs : MDEV-12892 - Crash
main.events_restart : MDEV-12236 - Server shutdown problem
main.events_slowlog : MDEV-12821 - Wrong result
main.flush : MDEV-19368 - mysqltest failed but provided no output
-main.func_gconcat : MDEV-21379 - Valgrind warnings; modified in 10.3.28
-main.func_like : Modified in 10.3.28
-main.func_math : MDEV-20532 - Floating point differences
+main.flush_ssl : MDEV-21276 - Aria recovery failure
+main.func_gconcat : MDEV-21379 - Valgrind warnings; modified in 10.4.18
+main.func_like : Modified in 10.4.18
+main.func_math : MDEV-20966 - Wrong error code
main.gis : MDEV-13411 - wrong result on P8
-main.gis-json : Modified in 10.3.28
-main.gis_notembedded : MDEV-21264 - Wrong result with different default charset
-main.group_by : Modified in 10.3.28
+main.gis-json : Modified in 10.4.18
+main.gis_notembedded : MDEV-21264 - Wrong result with non-default charset
+main.group_by : Modified in 10.4.18
main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
main.index_intersect_innodb : MDEV-10643 - failed with timeout
main.index_merge_innodb : MDEV-7142 - Plan mismatch
-main.information_schema : Modified in 10.3.28
+main.information_schema : Modified in 10.4.18
+main.innodb_icp : MDEV-20168 - Wrong execution plans
main.innodb_mrr_cpk : MDEV-24737 - Server crash
main.invisible_field_grant_completely : MDEV-22254 - Syscall param write points to uninitialised bytes
+main.ipv4_and_ipv6 : MDEV-20964 - Wrong result
+main.ipv6 : MDEV-20964 - Wrong result
main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM
-main.kill : MDEV-24801 - Wrong errno on reap; modified in 10.3.28
+main.kill : MDEV-24801 - Wrong errno on reap; modified in 10.4.18
main.kill-2 : MDEV-13257 - Wrong result
main.kill_processlist-6619 : MDEV-10793 - Wrong result
main.loaddata : MDEV-19368 - mysqltest failed but provided no output
main.locale : MDEV-20521 - Missing warning
main.lock_tables_lost_commit : MDEV-24624 - Timeout
-main.lock_view : Modified in 10.3.28
+main.lock_user : Modified in 10.4.18
+main.lock_view : Modified in 10.4.18
main.log_slow : MDEV-13263 - Wrong result
main.log_tables-big : MDEV-13408 - wrong result
+main.log_tables_upgrade : MDEV-20962 - Wrong result
+main.mdev-504 : MDEV-15171 - warning
main.mdev375 : MDEV-10607 - sporadic "can't connect"
main.merge : MDEV-10607 - sporadic "can't connect"
-main.myisam : Modified in 10.3.28
-main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2
+main.myisam : Modified in 10.4.18
+main.mysql : MDEV-20156 - Wrong result
+main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; MDEV-19511 - Big endian issue
main.mysql_client_test_comp : MDEV-16641 - Error in exec
main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed
-main.mysql_upgrade : Modified in 10.3.28
+main.mysql_cp932 : MDEV-21275 - Wrong result
+main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed; modified in 10.4.18
+main.mysql_upgrade-6984 : MDEV-22514 - Wrong result
+main.mysql_upgrade_no_innodb : MDEV-20537 - Wrong result
main.mysql_upgrade_noengine : MDEV-14355 - Wrong result
-main.mysql_upgrade_view : MDEV-23392 - Wrong result
+main.mysql_upgrade_view : MDEV-20161 - Wrong result; MDEV-23392 - Wrong result
+main.mysqladmin : MDEV-20535 - Wrong result
+main.mysqlcheck : MDEV-20164 - Wrong result
main.mysqld_option_err : MDEV-21236 - Wrong error; MDEV-21571 - Crash on bootstrap
-main.mysqldump : Modified in 10.3.28
-main.mysqldump-system : Added in 10.3.28
+main.mysqldump : Modified in 10.4.18
+main.mysqldump-max : MDEV-21272 - Wrong result
+main.mysqldump-system : Modified in 10.4.18
+main.mysqlshow : MDEV-20965 - Wrong result
main.mysqlslap : MDEV-11801 - timeout
main.mysqltest : MDEV-13887 - Wrong result
main.old-mode : MDEV-19373 - Wrong result
main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1
-main.order_by : Modified in 10.3.28
+main.order_by : Modified in 10.4.18
main.order_by_optimizer_innodb : MDEV-10683 - Wrong result
-main.parser : Modified in 10.3.28
+main.parser : Modified in 10.4.18
main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock
-main.partition_innodb : MDEV-23427 - Server crash
+main.partition_innodb : MDEV-20169 - Wrong result; MDEV-23427 - Server crash
main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings
main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1
+main.plugin_auth : MDEV-20957 - Upgrade file was not properly created
+main.plugin_auth_qa_2 : MDEV-20165 - Wrong result
main.pool_of_threads : MDEV-18135 - SSL error: key too small
-main.precedence : Modified in 10.3.28
-main.processlist_notembedded : MDEV-23752 - Not explainable command; modified in 10.3.28
-main.ps : MDEV-11017 - Sporadic wrong Prepared_stmt_count
+main.precedence : Modified in 10.4.18
+main.processlist_notembedded : MDEV-23752 - Not explainable command; modified in 10.4.18
+main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count
main.ps_error : MDEV-24079 - Memory not freed
-main.ps_show_log : Added in 10.3.28
-main.query_cache : MDEV-16180 - Wrong result; modified in 10.3.28
+main.ps_show_log : Added in 10.4.18
+main.query_cache : MDEV-16180 - Wrong result; modified in 10.4.18
main.query_cache_debug : MDEV-15281 - Query cache is disabled
-main.range : Modified in 10.3.28
+main.range : Modified in 10.4.18
main.range_innodb : MDEV-23371 - Server crash
+main.range_notembedded : Added in 10.4.18
main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away
+main.rowid_filter_innodb : MDEV-20538 - Wrong result
main.select : MDEV-20532 - Floating point differences
main.select_jcl6 : MDEV-20532 - Floating point differences
main.select_pkeycache : MDEV-20532 - Floating point differences
+main.set_password : Modified in 10.4.18
main.set_statement : MDEV-13183 - Wrong result
main.set_statement_notembedded : MDEV-19414 - Wrong result
main.shm : MDEV-12727 - Mismatch, ERROR 2013
main.show_explain : MDEV-10674 - Wrong result code
-main.skip_grants : Modified in 10.3.28
-main.sp : MDEV-7866 - Mismatch; modified in 10.3.28
+main.skip_grants : Modified in 10.4.18
+main.sp : MDEV-7866 - Mismatch; modified in 10.4.18
main.sp-security : MDEV-10607 - sporadic "can't connect"
-main.sp-ucs2 : Modified in 10.3.28
+main.sp-ucs2 : Modified in 10.4.18
main.sp_notembedded : MDEV-10607 - internal error
main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1
+main.ssl_7937 : MDEV-20958 - Wrong result
main.ssl_ca : MDEV-10895 - SSL connection error on Power
main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1
main.ssl_timeout : MDEV-11244 - Crash
-main.stat_tables : Modified in 10.3.28
+main.stat_tables : Modified in 10.4.18
main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding
main.status : MDEV-13255 - Wrong result
main.subselect : MDEV-20551 - Valgrind failure
-main.subselect4 : Modified in 10.3.28
+main.subselect4 : Modified in 10.4.18
main.subselect_innodb : MDEV-10614 - Wrong result
-main.table_value_constr : Modified in 10.3.28
+main.table_value_constr : Modified in 10.4.18
main.tc_heuristic_recover : MDEV-14189 - Wrong result
main.temp_table_symlink : MDEV-24058 - Wrong error code
main.type_blob : MDEV-15195 - Wrong result
main.type_datetime_hires : MDEV-10687 - Timeout
main.type_float : MDEV-20532 - Floating point differences
main.type_newdecimal : MDEV-20532 - Floating point differences
+main.type_ranges : MDEV-20532 - Floating point differences
main.type_temporal_innodb : MDEV-24025 - Wrong result
-main.type_year : Modified in 10.3.28
-main.union : Modified in 10.3.28
-main.user_limits : Modified in 10.3.28
+main.type_year : Modified in 10.4.18
+main.union : Modified in 10.4.18
+main.user_limits : Modified in 10.4.18
main.userstat : MDEV-12904 - SSL errors
-main.view : Modified in 10.3.28
+main.view : Modified in 10.4.18
main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query
-main.xa : MDEV-11769 - lock wait timeout; modified in 10.3.28
+main.xa : MDEV-11769 - lock wait timeout; modified in 10.4.18
#-----------------------------------------------------------------------
+archive.archive-big : MDEV-20167 - Wrong error code
archive.archive_bitfield : MDEV-11771 - table is marked as crashed
archive.archive_symlink : MDEV-12170 - unexpected error on rmdir
archive.discover : MDEV-10510 - Table is marked as crashed
@@ -168,15 +198,19 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed
#-----------------------------------------------------------------------
binlog.binlog_commit_wait : MDEV-10150 - Mismatch
+binlog.binlog_innodb : MDEV-22516 - Wrong result
binlog.binlog_killed : MDEV-12925 - Wrong result
binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown
binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files differ
binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ
binlog.binlog_no_uniqfile_crash : MDEV-24078 - Server crash upon shutdown
+binlog.binlog_row_binlog : MDEV-23402 - Wrong result
+binlog.binlog_stm_binlog : MDEV-20412 - Wrong result
binlog.binlog_stm_mix_innodb_myisam : MDEV-24057 - Wrong result
binlog.binlog_xa_recover : MDEV-12908 - Extra checkpoint
binlog.flashback-largebinlog : MDEV-19764 - Out of memory
binlog.load_data_stm_view : MDEV-16948 - Wrong result
+binlog.show_concurrent_rotate : MDEV-20215 - Wrong result
#-----------------------------------------------------------------------
@@ -188,9 +222,11 @@ binlog_encryption.encryption_combo : MDEV-14199 - Table is
binlog_encryption.multisource : MDEV-21289 - Wrong error code
binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash
binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result
+binlog_encryption.rpl_corruption : MDEV-20953 - Wrong error code
binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start
binlog_encryption.rpl_incident : MDEV-21569 - mutex: LOCK_global_system_variables unlocking
binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include
+binlog_encryption.rpl_mixed_binlog_max_cache_size : MDEV-20956 - Incorrect checksum for freed object
binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include
binlog_encryption.rpl_parallel_ignored_errors : MDEV-22471 - Slave crash
binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout
@@ -198,6 +234,7 @@ binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind
binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning; MDEV-20573 - Wrong result
binlog_encryption.rpl_ssl : MDEV-14507 - Timeouts
binlog_encryption.rpl_stm_relay_ign_space : MDEV-19375 - Test assertion failed
+binlog_encryption.rpl_temporal_format_default_to_default : MDEV-21273 - Timeout
binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to MySQL server during query
#-----------------------------------------------------------------------
@@ -299,7 +336,10 @@ galera_3nodes.* : Suite is not stable yet
gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion
gcol.innodb_virtual_debug : MDEV-23111 - Server crash
+gcol.innodb_virtual_fk : MDEV-20640 - Assertion failure
gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure
+gcol.innodb_virtual_purge : MDEV-22952 - Lock wait timeout
+gcol.main_alter_table : MDEV-23403 - Wrong result
#-----------------------------------------------------------------------
@@ -313,7 +353,7 @@ innodb.doublewrite : MDEV-12905 - Server crash
innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed
innodb.group_commit_crash_no_optimize_thread : MDEV-11770 - Checksum mismatch
innodb.ibuf_not_empty : MDEV-19021 - Wrong result
-innodb.innodb-32k-crash : MDEV-20194 - Extra warning
+innodb.innodb-32k-crash : MDEV-20194 - Extra warnings
innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup
innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS
innodb.innodb-alter-table : MDEV-10619 - Testcase timeout
@@ -334,6 +374,9 @@ innodb.innodb-wl5522 : MDEV-13644 - Assertion failure
innodb.innodb-wl5522-1 : MDEV-22945 - Server crash
innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno
innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc
+innodb.innodb_buffer_pool_resize : MDEV-23637 - Assertion failure
+innodb.innodb_buffer_pool_resize_debug : MDEV-22515 - Timeout in wait_condition
+innodb.innodb_buffer_pool_resize_with_chunks : MDEV-23637 - Assertion failure
innodb.innodb_bug30423 : MDEV-7311 - Wrong result
innodb.innodb_bug47167 : MDEV-20524 - Table 'user' is marked as crashed and should be repaired
innodb.innodb_bug48024 : MDEV-14352 - Assertion failure
@@ -350,8 +393,9 @@ innodb.innodb_stats_persistent : MDEV-21567 - Wrong result in exec
innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed
innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait
innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks
+innodb.instant_alter_extend : MDEV-20963 - Binary files differ
innodb.log_corruption : MDEV-13251 - Wrong result
-innodb.log_data_file_size : MDEV-14204 - Server failed to start
+innodb.log_data_file_size : MDEV-14204 - Server failed to start; MDEV-20648 - Assertion failure
innodb.log_file_name : MDEV-14193 - Exception
innodb.log_file_size : MDEV-15668 - Not found pattern
innodb.monitor : MDEV-16179 - Wrong result
@@ -365,7 +409,7 @@ innodb.table_flags : MDEV-13572 - Wrong result; MDEV-1
innodb.temp_table_savepoint : MDEV-24077 - Assertion failure
innodb.temporary_table : MDEV-13265 - Wrong result
innodb.undo_truncate : MDEV-17340 - Server hung; MDEV-20840 - Sporadic timeout
-innodb.undo_truncate_recover : MDEV-17679 - Server has gone away
+innodb.undo_truncate_recover : MDEV-17679 - Server has gone away; MDEV-19200 - Shutdown fails
innodb.update_time : MDEV-14804 - Wrong result
innodb.xa_recovery : MDEV-15279 - mysqld got exception
@@ -394,6 +438,7 @@ innodb_gis.types : MDEV-15679 - Table is marked as crashed
innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed
innodb_zip.create_options : MDEV-24076 - Assertion failure
innodb_zip.index_large_prefix_4k : MDEV-21679 - Row size too large
+innodb_zip.innochecksum : MDEV-14486 - Server failed to shut down
innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings
innodb_zip.recover : MDEV-22512 - Server failed to restart (fixed in 10.5+)
innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2
@@ -457,12 +502,17 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h
#-----------------------------------------------------------------------
+oqgraph.social : MDEV-22280 - Timeout
+
+#-----------------------------------------------------------------------
+
parts.partition_alter1_1_2_innodb : MDEV-18655 - ASAN unknown crash
parts.partition_alter1_1_innodb : MDEV-18655 - ASAN unknown crash
parts.partition_alter1_2_innodb : MDEV-18655 - ASAN unknown crash
parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL server during query
parts.partition_auto_increment_archive : MDEV-16491 - Marked as crashed and should be repaired
parts.partition_auto_increment_maria : MDEV-14430 - Extra warning
+parts.partition_basic_innodb : MDEV-20214 - ASAN error
parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist
parts.partition_exch_qa_10 : MDEV-11765 - wrong result
parts.partition_innodb_status_file : MDEV-12901 - Valgrind
@@ -480,12 +530,19 @@ perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash
perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash
perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash
perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash
+perfschema.nesting : MDEV-23458 - Wrong result
+perfschema.pfs_upgrade_event : MDEV-20957 - Wrong result
+perfschema.pfs_upgrade_func : MDEV-20957 - Upgrade file was not properly created
+perfschema.pfs_upgrade_proc : MDEV-20533 - Upgrade file was not properly created
+perfschema.pfs_upgrade_table : MDEV-20533 - Exec failed
+perfschema.pfs_upgrade_view : MDEV-20533 - Upgrade file was not properly created
perfschema.privilege_table_io : MDEV-13184 - Extra lines
perfschema.relaylog : MDEV-18134 - Wrong result; MDEV-24075 - Extra warning
perfschema.rpl_gtid_func : MDEV-16897 - Wrong result
perfschema.socket_instances_func : MDEV-20140 - Wrong result
perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result
perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result
+perfschema.stage_mdl_function : MDEV-20157 - Wrong result
perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders
perfschema.stage_mdl_procedure : MDEV-11545 - Missing row
perfschema.stage_mdl_table : MDEV-12638 - Wrong result
@@ -499,6 +556,7 @@ perfschema_stress.* : MDEV-10996 - Not maintained
#-----------------------------------------------------------------------
plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such
+plugins.multiauth : MDEV-20163 - Plugin could not be loaded
plugins.processlist : MDEV-16574 - Wrong result
plugins.server_audit : MDEV-14295 - Wrong result
plugins.thread_pool_server_audit : MDEV-14295 - Wrong result
@@ -554,7 +612,10 @@ rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips
rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips
rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log
rpl.rpl_binlog_errors : MDEV-12742 - Crash
+rpl.rpl_binlog_grant : MDEV-21274 - Lost connection at handshake
+rpl.rpl_cant_read_event_incident : MDEV-20960 - Abort on shutdown
rpl.rpl_checksum_cache : MDEV-22510 - Server crash
+rpl.rpl_circular_for_4_hosts : MDEV-20536 - Server crash
rpl.rpl_colSize : MDEV-16112 - Server crash
rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code
rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac
@@ -564,6 +625,7 @@ rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed
rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed
rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start
rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning
+rpl.rpl_extra_col_master_myisam : MDEV-23372 - Extra warning
rpl.rpl_flushlog_loop : MDEV-21570 - Server crash
rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output
rpl.rpl_gtid_basic : MDEV-10681 - server startup problem
@@ -587,13 +649,16 @@ rpl.rpl_mdev12179 : MDEV-19043 - Table marked as crashed
rpl.rpl_mdev6020 : MDEV-23426 - Server crash, ASAN failures; MDEV-15272 - Server crash
rpl.rpl_mixed_mixing_engines : MDEV-21266 - Timeout
rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait
-rpl.rpl_parallel : MDEV-10653 - Timeouts
+rpl.rpl_old_master : MDEV-22956 - Failing assertion
+rpl.rpl_parallel : MDEV-10653 - Timeouts; MDEV-24110 - Slave crash
rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash
+rpl.rpl_parallel_multilevel : MDEV-20160 - Server crash
rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout
rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master
rpl.rpl_parallel_optimistic_nobinlog : MDEV-15278 - Failed to sync with master
rpl.rpl_parallel_optimistic_until : MDEV-23021 - Query didn't return a result set
rpl.rpl_parallel_retry : MDEV-11119 - Crash; MDEV-17109 - Timeout
+rpl.rpl_parallel_stop_on_con_kill : MDEV-24110 - Slave crash
rpl.rpl_parallel_temptable : MDEV-10356 - Crash; MDEV-19076 - Wrong result
rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips
rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings
@@ -611,9 +676,11 @@ rpl.rpl_row_index_choice : MDEV-15196 - Slave crash
rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x
rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum
rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings
+rpl.rpl_semi_sync_skip_repl : MDEV-23371 - Server crash
rpl.rpl_semi_sync_uninstall_plugin : MDEV-24561 - Wrong usage of mutex; MDEV-7140 - Assorted failures
rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition
rpl.rpl_show_slave_hosts : MDEV-10681 - Crash
+rpl.rpl_shutdown_wait_slaves : MDEV-22517 - Timeout on sync_with_master
rpl.rpl_skip_replication : MDEV-23372 - Extra warning
rpl.rpl_slave_load_tmpdir_not_exist : MDEV-23372 - Extra warning
rpl.rpl_slow_query_log : MDEV-13250 - Test abort
@@ -626,6 +693,7 @@ rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries
rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output
rpl.rpl_trigger : MDEV-18055 - Wrong result
rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error
+rpl.rpl_upgrade_master_info : MDEV-16567 - Assertion failure
rpl.rpl_user_variables : MDEV-20522 - Wrong result
rpl.rpl_variables : MDEV-20150 - Server crash
rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result
@@ -653,12 +721,13 @@ spider.basic_sql : MDEV-11186 - Internal check fails
#-----------------------------------------------------------------------
-spider/bg.* : MDEV-24059 - Timeout
-spider/bg.ha : MDEV-9329 - failures on s390x
-spider/bg.ha_part : MDEV-9329 - Fails on Ubuntu/s390x
-spider/bg.spider3_fixes : MDEV-12639 - Syntax error
-spider/bg.spider_fixes : MDEV-9329 - failures on s390x
-spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x
+spider/bg.* : MDEV-24059 - Timeout
+spider/bg.ha : MDEV-9329 - failures on s390x
+spider/bg.ha_part : MDEV-9329 - Fails on Ubuntu/s390x
+spider/bg.spider3_fixes : MDEV-12639 - Syntax error
+spider/bg.spider3_fixes_part : MDEV-24809 - Timeout
+spider/bg.spider_fixes : MDEV-9329 - failures on s390x
+spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x
#-----------------------------------------------------------------------
@@ -668,6 +737,7 @@ spider/handler.* : MDEV-10987, MDEV-10990 - Tests have not been maintained
sql_sequence.concurrent_create : MDEV-16635 - Server crash
sql_sequence.kill : MDEV-23393 - Server crash
+sql_sequence.read_only : MDEV-22956 - Failing assertion
#-----------------------------------------------------------------------
@@ -680,8 +750,10 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout
#-----------------------------------------------------------------------
sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x
+sys_vars.host_cache_size_auto : MDEV-20112 - Wrong result
sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error
sys_vars.innodb_checksum_algorithm_basic : MDEV-21568 - Errno: 2000
+sys_vars.innodb_flush_method_func : MDEV-24810 - Server failed to restart
sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout
sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash
sys_vars.slow_query_log_func : MDEV-14273 - Wrong result
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index 76409477143..e58d0a10124 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1,5 +1,5 @@
# Copyright (c) 2005, 2015, Oracle and/or its affiliates.
-# Copyright (c) 2008, 2017, MariaDB
+# Copyright (c) 2008, 2019, MariaDB
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 09d3f726ffc..5f124f4e659 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -48,7 +48,14 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c my_default.c
file_logger.c my_dlerror.c)
IF (WIN32)
- SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_winthread.c my_wincond.c my_winerr.c my_winfile.c my_windac.c my_conio.c my_minidump.cc)
+ SET (MYSYS_SOURCES ${MYSYS_SOURCES}
+ my_winthread.c
+ my_wincond.c
+ my_winerr.c
+ my_winfile.c
+ my_conio.c
+ my_minidump.cc
+ my_win_popen.cc)
ENDIF()
IF(UNIX)
@@ -59,12 +66,6 @@ IF(HAVE_ALARM)
SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_alarm.c)
ENDIF()
-IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_C_COMPILER_ID MATCHES "SunPro")
- # Inline assembly template for rdtsc
- SET_SOURCE_FILES_PROPERTIES(my_rdtsc.c
- PROPERTIES COMPILE_FLAGS "${CMAKE_CURRENT_SOURCE_DIR}/my_timer_cycles.il")
-ENDIF()
-
IF(HAVE_LINUX_LARGE_PAGES)
SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_largepage.c)
ENDIF()
diff --git a/mysys/errors.c b/mysys/errors.c
index 1b7a55eb1e5..45a77d8c129 100644
--- a/mysys/errors.c
+++ b/mysys/errors.c
@@ -107,12 +107,12 @@ void init_glob_errs()
void wait_for_free_space(const char *filename, int errors)
{
if (errors == 0)
- my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH | ME_JUST_WARNING),
+ my_error(EE_DISK_FULL,MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING),
filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
my_printf_error(EE_DISK_FULL,
"Retry in %d secs. Message reprinted in %d secs",
- MYF(ME_BELL | ME_NOREFRESH | ME_JUST_WARNING),
+ MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING),
MY_WAIT_FOR_USER_TO_FIX_PANIC,
MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC );
(void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
diff --git a/mysys/lf_alloc-pin.c b/mysys/lf_alloc-pin.c
index 280cf74e657..f844920a664 100644
--- a/mysys/lf_alloc-pin.c
+++ b/mysys/lf_alloc-pin.c
@@ -102,6 +102,7 @@
#include <my_global.h>
#include <my_sys.h>
#include <lf.h>
+#include "my_cpu.h"
/*
when using alloca() leave at least that many bytes of the stack -
diff --git a/mysys/lf_hash.c b/mysys/lf_hash.c
index 8bff2e3bfa4..90389c01d6a 100644
--- a/mysys/lf_hash.c
+++ b/mysys/lf_hash.c
@@ -28,6 +28,7 @@
#include <mysys_err.h>
#include <my_bit.h>
#include <lf.h>
+#include "my_cpu.h"
/* An element of the list */
typedef struct {
diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c
index 0085c375aa1..b438d910157 100644
--- a/mysys/ma_dyncol.c
+++ b/mysys/ma_dyncol.c
@@ -865,7 +865,7 @@ dynamic_column_uint_read(DYNAMIC_COLUMN_VALUE *store_it_here,
static size_t dynamic_column_sint_bytes(longlong val)
{
- return dynamic_column_uint_bytes((val << 1) ^
+ return dynamic_column_uint_bytes((((ulonglong) val) << 1) ^
(val < 0 ? 0xffffffffffffffffull : 0));
}
@@ -883,8 +883,8 @@ static enum enum_dyncol_func_result
dynamic_column_sint_store(DYNAMIC_COLUMN *str, longlong val)
{
return dynamic_column_uint_store(str,
- (val << 1) ^
- (val < 0 ? 0xffffffffffffffffULL : 0));
+ (((ulonglong) val) << 1) ^
+ (val < 0 ? 0xffffffffffffffffULL : 0));
}
diff --git a/mysys/mf_cache.c b/mysys/mf_cache.c
index dba5f5b831c..2fec59f4e70 100644
--- a/mysys/mf_cache.c
+++ b/mysys/mf_cache.c
@@ -82,7 +82,7 @@ void close_cached_file(IO_CACHE *cache)
#ifdef CANT_DELETE_OPEN_FILES
if (cache->file_name)
{
- (void) my_delete(cache->file_name,MYF(MY_WME | ME_NOINPUT));
+ (void) my_delete(cache->file_name, MYF(MY_WME));
my_free(cache->file_name);
}
#endif
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 33930316f08..06c6fc088c0 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -496,10 +496,20 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
{
/*
If we change from WRITE_CACHE to READ_CACHE, assume that everything
- after the current positions should be ignored
+ after the current positions should be ignored. In other cases we
+ update end_of_file as it may have changed since last init.
*/
- if (info->type == WRITE_CACHE && type == READ_CACHE)
- info->end_of_file=my_b_tell(info);
+ if (type == READ_CACHE)
+ {
+ if (info->type == WRITE_CACHE)
+ info->end_of_file= my_b_tell(info);
+ else
+ {
+ if (!(info->myflags & MY_ENCRYPT))
+ info->end_of_file= mysql_file_seek(info->file, 0L,
+ MY_SEEK_END, MYF(0));
+ }
+ }
/* flush cache if we want to reuse it */
if (!clear_cache && my_b_flush_io_cache(info,1))
DBUG_RETURN(1);
@@ -1547,8 +1557,7 @@ int _my_b_async_read(IO_CACHE *info, uchar *Buffer, size_t Count)
if (info->aio_result.result.aio_errno)
{
if (info->myflags & MY_WME)
- my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG),
- my_filename(info->file),
+ my_error(EE_READ, MYF(ME_BELL), my_filename(info->file),
info->aio_result.result.aio_errno);
my_errno=info->aio_result.result.aio_errno;
info->error= -1;
@@ -1641,8 +1650,7 @@ int _my_b_async_read(IO_CACHE *info, uchar *Buffer, size_t Count)
if (Count != use_length)
{ /* Didn't find hole block */
if (info->myflags & (MY_WME | MY_FAE | MY_FNABP) && Count != org_Count)
- my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG),
- my_filename(info->file),my_errno);
+ my_error(EE_EOFERR, MYF(ME_BELL), my_filename(info->file), my_errno);
info->error=(int) (read_length+left_length);
return 1;
}
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 8aa60064e06..f09739ae8af 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -576,7 +576,7 @@ int init_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
if (blocks < 8)
{
my_errno= ENOMEM;
- my_error(EE_OUTOFMEMORY, MYF(ME_FATALERROR),
+ my_error(EE_OUTOFMEMORY, MYF(ME_FATAL),
blocks * keycache->key_cache_block_size);
goto err;
}
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index 25bfca344f2..0f1c6d6b1bc 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -65,7 +65,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
File file= -1;
DBUG_ENTER("create_temp_file");
- DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix));
+ DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir ? dir : "(null)", prefix));
DBUG_ASSERT((mode & (O_EXCL | O_TRUNC | O_CREAT | O_RDWR)) == 0);
mode|= O_TRUNC | O_CREAT | O_RDWR; /* not O_EXCL, see Windows code below */
@@ -110,6 +110,35 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
}
}
#elif defined(HAVE_MKSTEMP)
+ if (!dir && ! (dir =getenv("TMPDIR")))
+ dir= DEFAULT_TMPDIR;
+#ifdef O_TMPFILE
+ {
+ static int O_TMPFILE_works= 1;
+
+ if ((MyFlags & MY_TEMPORARY) && O_TMPFILE_works)
+ {
+ /* explictly don't use O_EXCL here has it has a different
+ meaning with O_TMPFILE
+ */
+ if ((file= open(dir, (mode & ~O_CREAT) | O_TMPFILE | O_CLOEXEC,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) >= 0)
+ {
+ my_snprintf(to, FN_REFLEN, "%s/#sql/fd=%d", dir, file);
+ file=my_register_filename(file, to, FILE_BY_O_TMPFILE,
+ EE_CANTCREATEFILE, MyFlags);
+ }
+ else if (errno == EOPNOTSUPP || errno == EINVAL)
+ {
+ my_printf_error(EE_CANTCREATEFILE, "O_TMPFILE is not supported on %s "
+ "(disabling future attempts)",
+ MYF(ME_NOTE | ME_ERROR_LOG_ONLY), dir);
+ O_TMPFILE_works= 0;
+ }
+ }
+ }
+ if (file == -1)
+#endif /* O_TMPFILE */
{
char prefix_buff[30];
uint pfx_len;
@@ -119,8 +148,6 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
prefix ? prefix : "tmp.",
sizeof(prefix_buff)-7),"XXXXXX") -
prefix_buff);
- if (!dir && ! (dir =getenv("TMPDIR")))
- dir= DEFAULT_TMPDIR;
if (strlen(dir)+ pfx_len > FN_REFLEN-2)
{
errno=my_errno= ENAMETOOLONG;
@@ -137,7 +164,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
{
int tmp=my_errno;
close(org_file);
- (void) my_delete(to, MYF(MY_WME | ME_NOINPUT));
+ (void) my_delete(to, MYF(MY_WME));
my_errno=tmp;
}
}
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index a7d4ec1c248..a6f38dcb145 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -193,7 +193,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
length+=ALIGN_SIZE(sizeof(USED_MEM));
if (!(next = (USED_MEM*) my_malloc(length,
- MYF(MY_WME | ME_FATALERROR |
+ MYF(MY_WME | ME_FATAL |
MALLOC_FLAG(mem_root->block_size)))))
{
if (mem_root->error_handler)
@@ -249,7 +249,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
get_size= MY_MAX(get_size, block_size);
if (!(next = (USED_MEM*) my_malloc(get_size,
- MYF(MY_WME | ME_FATALERROR |
+ MYF(MY_WME | ME_FATAL |
MALLOC_FLAG(mem_root->
block_size)))))
{
@@ -495,3 +495,14 @@ void *memdup_root(MEM_ROOT *root, const void *str, size_t len)
memcpy(pos,str,len);
return pos;
}
+
+LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
+{
+ LEX_CSTRING res;
+ if (str.length)
+ res.str= strmake_root(root, str.str, str.length);
+ else
+ res.str= (const char *)"";
+ res.length= str.length;
+ return res;
+}
diff --git a/mysys/my_atomic_writes.c b/mysys/my_atomic_writes.c
index 7f1e353c121..b383af11ba8 100644
--- a/mysys/my_atomic_writes.c
+++ b/mysys/my_atomic_writes.c
@@ -15,7 +15,7 @@
#include "mysys_priv.h"
-my_bool my_may_have_atomic_write= 0;
+my_bool my_may_have_atomic_write= IF_WIN(1,0);
#ifdef __linux__
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c
index 5111174d749..c69eb4748f7 100644
--- a/mysys/my_bitmap.c
+++ b/mysys/my_bitmap.c
@@ -38,17 +38,6 @@
#include <m_string.h>
#include <my_bit.h>
-
-/* Create a mask of the significant bits for the last byte (1,3,7,..255) */
-
-static inline uchar last_byte_mask(uint bits)
-{
- /* Get the number of used bits-1 (0..7) in the last byte */
- unsigned int const used= (bits - 1U) & 7U;
- /* Return bitmask for the significant bits */
- return ((2U << used) - 1);
-}
-
/*
Create a mask with the upper 'unused' bits set and the lower 'used'
bits clear. The bits within each byte is stored in big-endian order.
diff --git a/mysys/my_chsize.c b/mysys/my_chsize.c
index 4fd443f5364..f1affb80b16 100644
--- a/mysys/my_chsize.c
+++ b/mysys/my_chsize.c
@@ -96,6 +96,6 @@ int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
err:
DBUG_PRINT("error", ("errno: %d", errno));
if (MyFlags & MY_WME)
- my_error(EE_CANT_CHSIZE, MYF(ME_BELL+ME_WAITTANG), my_errno);
+ my_error(EE_CANT_CHSIZE, MYF(ME_BELL), my_errno);
DBUG_RETURN(1);
} /* my_chsize */
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index f73737828ce..94ad3f6b665 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -112,7 +112,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
{
my_errno= errno;
if (MyFlags & MY_WME)
- my_error(EE_CHANGE_PERMISSIONS, MYF(ME_BELL+ME_WAITTANG), to, errno);
+ my_error(EE_CHANGE_PERMISSIONS, MYF(ME_BELL), to, errno);
if (MyFlags & MY_FAE)
goto err;
}
@@ -122,7 +122,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
{
my_errno= errno;
if (MyFlags & MY_WME)
- my_error(EE_CANT_COPY_OWNERSHIP, MYF(ME_BELL+ME_WAITTANG), to, errno);
+ my_error(EE_CANT_COPY_OWNERSHIP, MYF(ME_BELL), to, errno);
if (MyFlags & MY_FAE)
goto err;
}
diff --git a/mysys/my_cpu.c b/mysys/my_cpu.c
index 3b0ef08a326..52500d78ef7 100644
--- a/mysys/my_cpu.c
+++ b/mysys/my_cpu.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019, MariaDB Corporation.
+/* Copyright (c) 2019, 2020, 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
@@ -14,28 +14,13 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <my_global.h>
-#include <my_atomic.h>
#include <my_cpu.h>
+#include <my_rdtsc.h>
#ifdef HAVE_PAUSE_INSTRUCTION
/** How many times to invoke PAUSE in a loop */
unsigned my_cpu_relax_multiplier = 200;
-# include <stdint.h>
-
-# ifdef _MSC_VER
-# include <intrin.h>
-# define my_timer_cycles __rdtsc
-# elif !defined __x86_64__
-/* On some x86 targets, __rdtsc() causes an unresolved external symbol error,
-instead of being inlined. Let us fall back to my_timer_cycles(), which
-internally invokes rdtsc. */
-# include <my_rdtsc.h>
-# else
-# include <x86intrin.h>
-# define my_timer_cycles __rdtsc
-# endif
-
#define PAUSE4 MY_RELAX_CPU(); MY_RELAX_CPU(); MY_RELAX_CPU(); MY_RELAX_CPU()
#define PAUSE16 PAUSE4; PAUSE4; PAUSE4; PAUSE4
@@ -82,7 +67,7 @@ internally invokes rdtsc. */
*/
void my_cpu_init(void)
{
- uint64_t t0, t1, t2;
+ ulonglong t0, t1, t2;
t0= my_timer_cycles();
PAUSE16;
t1= my_timer_cycles();
diff --git a/mysys/my_delete.c b/mysys/my_delete.c
index cce26643ef7..face960c1eb 100644
--- a/mysys/my_delete.c
+++ b/mysys/my_delete.c
@@ -47,11 +47,9 @@ int my_delete(const char *name, myf MyFlags)
{
my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME))
- my_error(EE_DELETE,MYF(ME_BELL+ME_WAITTANG+(MyFlags & ME_NOINPUT)),
- name,errno);
+ my_error(EE_DELETE, MYF(ME_BELL), name, errno);
}
- else if ((MyFlags & MY_SYNC_DIR) &&
- my_sync_dir_by_file(name, MyFlags))
+ else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(name, MyFlags))
err= -1;
DBUG_RETURN(err);
} /* my_delete */
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c
index 2450ec85d60..a22ffc50626 100644
--- a/mysys/my_fopen.c
+++ b/mysys/my_fopen.c
@@ -18,6 +18,7 @@
#include "my_static.h"
#include <errno.h>
#include "mysys_err.h"
+#include "my_atomic.h"
static void make_ftype(char * to,int flag);
@@ -76,7 +77,7 @@ FILE *my_fopen(const char *filename, int flags, myf MyFlags)
DBUG_PRINT("error",("Got error %d on open",my_errno));
if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
my_error((flags & O_RDONLY) ? EE_FILENOTFOUND : EE_CANTCREATEFILE,
- MYF(ME_BELL+ME_WAITTANG), filename, my_errno);
+ MYF(ME_BELL), filename, my_errno);
DBUG_RETURN((FILE*) 0);
} /* my_fopen */
@@ -179,8 +180,7 @@ int my_fclose(FILE *fd, myf MyFlags)
{
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
- my_error(EE_BADCLOSE, MYF(ME_BELL+ME_WAITTANG),
- name,errno);
+ my_error(EE_BADCLOSE, MYF(ME_BELL), name, errno);
}
else
statistic_decrement(my_stream_opened, &THR_LOCK_open);
@@ -214,7 +214,7 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags)
{
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
- my_error(EE_CANT_OPEN_STREAM, MYF(ME_BELL+ME_WAITTANG),errno);
+ my_error(EE_CANT_OPEN_STREAM, MYF(ME_BELL), errno);
}
else
{
@@ -223,7 +223,8 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags)
{
if (my_file_info[Filedes].type != UNOPEN)
{
- thread_safe_decrement32(&my_file_opened); /* File is opened with my_open ! */
+ /* File is opened with my_open ! */
+ my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
}
else
{
diff --git a/mysys/my_fstream.c b/mysys/my_fstream.c
index 8a6db2e8502..a43fe13c9f0 100644
--- a/mysys/my_fstream.c
+++ b/mysys/my_fstream.c
@@ -55,11 +55,11 @@ size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags)
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (ferror(stream))
- my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG),
+ my_error(EE_READ, MYF(ME_BELL),
my_filename(my_fileno(stream)),errno);
else
if (MyFlags & (MY_NABP | MY_FNABP))
- my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG),
+ my_error(EE_EOFERR, MYF(ME_BELL),
my_filename(my_fileno(stream)),errno);
}
my_errno=errno ? errno : -1;
@@ -140,8 +140,8 @@ size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
- my_error(EE_WRITE, MYF(ME_BELL+ME_WAITTANG),
- my_filename(my_fileno(stream)),errno);
+ my_error(EE_WRITE, MYF(ME_BELL),
+ my_filename(my_fileno(stream)), errno);
}
writtenbytes= (size_t) -1; /* Return that we got error */
break;
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 7d539cd44fe..c4f83475f7b 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -79,6 +79,12 @@ my_bool my_getopt_skip_unknown= 0;
*/
my_bool my_getopt_prefix_matching= 1;
+/*
+ This is a flag that can be set in client programs. 1 means that
+ handle_options() will not initialize options to default values.
+*/
+my_bool my_handle_options_init_variables = 1;
+
static void default_reporter(enum loglevel level,
const char *format, ...)
{
@@ -212,7 +218,8 @@ int handle_options(int *argc, char ***argv,
DBUG_ASSERT(argv && *argv);
(*argc)--; /* Skip the program name */
(*argv)++; /* --- || ---- */
- init_variables(longopts, init_one_value);
+ if (my_handle_options_init_variables)
+ init_variables(longopts, init_one_value);
/*
Search for args_separator, if found, then the first part of the
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index c4f18b51f35..cdad96b3a84 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -64,7 +64,7 @@ int my_getwd(char * buf, size_t size, myf MyFlags)
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
- my_error(EE_GETWD,MYF(ME_BELL+ME_WAITTANG),errno);
+ my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
@@ -104,7 +104,7 @@ int my_setwd(const char *dir, myf MyFlags)
{
my_errno=errno;
if (MyFlags & MY_WME)
- my_error(EE_SETWD,MYF(ME_BELL+ME_WAITTANG),start,errno);
+ my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 8ce23f65fd3..b61a02449bc 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -189,7 +189,7 @@ err_alloc:
(void) closedir(dirp);
err_open:
if (MyFlags & (MY_FAE | MY_WME))
- my_error(EE_DIR, MYF(ME_BELL | ME_WAITTANG), path, my_errno);
+ my_error(EE_DIR, MYF(ME_BELL), path, my_errno);
DBUG_RETURN(NULL);
} /* my_dir */
@@ -312,7 +312,7 @@ error:
_findclose(handle);
my_dirend(&dirh->dir);
if (MyFlags & (MY_FAE | MY_WME))
- my_error(EE_DIR,MYF(ME_BELL | ME_WAITTANG), path, errno);
+ my_error(EE_DIR,MYF(ME_BELL), path, errno);
DBUG_RETURN(NULL);
} /* my_dir */
@@ -362,7 +362,7 @@ MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
error:
if (my_flags & (MY_FAE+MY_WME))
{
- my_error(EE_STAT, MYF(ME_BELL+ME_WAITTANG),path,my_errno);
+ my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
diff --git a/mysys/my_lock.c b/mysys/my_lock.c
index 3319f6d8cb2..7597436f381 100644
--- a/mysys/my_lock.c
+++ b/mysys/my_lock.c
@@ -219,9 +219,9 @@ int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
if (MyFlags & MY_WME)
{
if (locktype == F_UNLCK)
- my_error(EE_CANTUNLOCK,MYF(ME_BELL+ME_WAITTANG),my_errno);
+ my_error(EE_CANTUNLOCK,MYF(ME_BELL),my_errno);
else
- my_error(EE_CANTLOCK,MYF(ME_BELL+ME_WAITTANG),my_errno);
+ my_error(EE_CANTLOCK,MYF(ME_BELL),my_errno);
}
DBUG_PRINT("error",("my_errno: %d (%d)",my_errno,errno));
DBUG_RETURN(-1);
diff --git a/mysys/my_lockmem.c b/mysys/my_lockmem.c
index 3ce0f07af58..e159502a278 100644
--- a/mysys/my_lockmem.c
+++ b/mysys/my_lockmem.c
@@ -42,7 +42,7 @@ uchar *my_malloc_lock(uint size,myf MyFlags)
if (!(ptr=memalign(pagesize,size)))
{
if (MyFlags & (MY_FAE+MY_WME))
- my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG+ME_FATALERROR), size);
+ my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), size);
DBUG_RETURN(0);
}
success = mlock((uchar*) ptr,size);
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c
index 55ef2673ef2..d54270a7f20 100644
--- a/mysys/my_malloc.c
+++ b/mysys/my_malloc.c
@@ -106,8 +106,7 @@ void *my_malloc(size_t size, myf my_flags)
if (my_flags & MY_FAE)
error_handler_hook=fatal_error_handler_hook;
if (my_flags & (MY_FAE+MY_WME))
- my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_WAITTANG +
- ME_NOREFRESH + ME_FATALERROR),size);
+ my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG+ME_FATAL),size);
if (my_flags & MY_FAE)
abort();
}
@@ -176,7 +175,7 @@ void *my_realloc(void *oldpoint, size_t size, myf my_flags)
DBUG_RETURN(oldpoint);
my_errno=errno;
if (my_flags & (MY_FAE+MY_WME))
- my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_WAITTANG + ME_FATALERROR), size);
+ my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size);
}
else
{
diff --git a/mysys/my_mess.c b/mysys/my_mess.c
index 7bc4c038cb6..c9a1aee64b6 100644
--- a/mysys/my_mess.c
+++ b/mysys/my_mess.c
@@ -21,6 +21,8 @@ void my_message_stderr(uint error __attribute__((unused)),
DBUG_ENTER("my_message_stderr");
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
+ if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY))
+ DBUG_VOID_RETURN;
if (MyFlags & ME_BELL)
(void) fputc('\007', stderr);
if (my_progname)
diff --git a/mysys/my_mkdir.c b/mysys/my_mkdir.c
index 6c0a01abb73..ea1f66f3b7b 100644
--- a/mysys/my_mkdir.c
+++ b/mysys/my_mkdir.c
@@ -36,7 +36,7 @@ int my_mkdir(const char *dir, int Flags, myf MyFlags)
my_errno=errno;
DBUG_PRINT("error",("error %d when creating direcory %s",my_errno,dir));
if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
- my_error(EE_CANT_MKDIR, MYF(ME_BELL+ME_WAITTANG), dir, my_errno);
+ my_error(EE_CANT_MKDIR, MYF(ME_BELL), dir, my_errno);
DBUG_RETURN(-1);
}
DBUG_RETURN(0);
diff --git a/mysys/my_once.c b/mysys/my_once.c
index 28a175579fd..e2bea0a4d1e 100644
--- a/mysys/my_once.c
+++ b/mysys/my_once.c
@@ -59,7 +59,7 @@ void* my_once_alloc(size_t Size, myf MyFlags)
{
my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME))
- my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG+ME_FATALERROR), get_size);
+ my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size);
return((uchar*) 0);
}
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));
diff --git a/mysys/my_open.c b/mysys/my_open.c
index 8edef360f92..09fa201c0bd 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -17,6 +17,7 @@
#include "mysys_err.h"
#include <m_string.h>
#include <errno.h>
+#include "my_atomic.h"
CREATE_NOSYMLINK_FUNCTION(
open_nosymlinks(const char *pathname, int flags, int mode),
@@ -98,14 +99,14 @@ int my_close(File fd, myf MyFlags)
DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
- my_error(EE_BADCLOSE, MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
name,errno);
}
if (name)
{
my_free(name);
}
- thread_safe_decrement32(&my_file_opened);
+ my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
DBUG_RETURN(err);
} /* my_close */
@@ -133,7 +134,7 @@ File my_register_filename(File fd, const char *FileName, enum file_type
DBUG_ENTER("my_register_filename");
if ((int) fd >= MY_FILE_MIN)
{
- thread_safe_increment32(&my_file_opened);
+ my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED);
if ((uint) fd >= my_file_limit)
DBUG_RETURN(fd);
my_file_info[fd].name = (char*) my_strdup(FileName, MyFlags);
@@ -150,7 +151,7 @@ File my_register_filename(File fd, const char *FileName, enum file_type
if (my_errno == EMFILE)
error_message_number= EE_OUT_OF_FILERESOURCES;
my_error(error_message_number,
- MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
FileName, my_errno);
}
DBUG_RETURN(-1);
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index 9d3fdb3e0ee..56cc91ae083 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -98,11 +98,11 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
- MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
- MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
}
if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP)))
@@ -187,7 +187,7 @@ size_t my_pwrite(int Filedes, const uchar *Buffer, size_t Count,
if (MyFlags & (MY_NABP | MY_FNABP))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
- my_error(EE_WRITE, MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
DBUG_RETURN(MY_FILE_ERROR); /* Error on write */
}
diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c
index 605ac20350c..1503a5db442 100644
--- a/mysys/my_rdtsc.c
+++ b/mysys/my_rdtsc.c
@@ -1,4 +1,5 @@
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -74,10 +75,6 @@
#endif
#endif
-#if defined(HAVE_ASM_MSR_H) && defined(HAVE_RDTSCLL)
-#include <asm/msr.h> /* for rdtscll */
-#endif
-
#if defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME)
#include <sys/timeb.h> /* for ftime */
#endif
@@ -86,190 +83,10 @@
#include <sys/times.h> /* for times */
#endif
-#if defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H)
-#include <ia64intrin.h> /* for __GetReg */
-#endif
-
#if defined(__APPLE__) && defined(__MACH__)
#include <mach/mach_time.h>
#endif
-#if defined(__SUNPRO_CC) && defined(__sparcv9) && defined(_LP64) && !defined(__SunOS_5_7)
-extern "C" ulonglong my_timer_cycles_il_sparc64();
-#elif defined(__SUNPRO_CC) && defined(_ILP32) && !defined(__SunOS_5_7)
-extern "C" ulonglong my_timer_cycles_il_sparc32();
-#elif defined(__SUNPRO_CC) && defined(__i386) && defined(_ILP32)
-extern "C" ulonglong my_timer_cycles_il_i386();
-#elif defined(__SUNPRO_CC) && defined(__x86_64) && defined(_LP64)
-extern "C" ulonglong my_timer_cycles_il_x86_64();
-#elif defined(__SUNPRO_C) && defined(__sparcv9) && defined(_LP64) && !defined(__SunOS_5_7)
-ulonglong my_timer_cycles_il_sparc64();
-#elif defined(__SUNPRO_C) && defined(_ILP32) && !defined(__SunOS_5_7)
-ulonglong my_timer_cycles_il_sparc32();
-#elif defined(__SUNPRO_C) && defined(__i386) && defined(_ILP32)
-ulonglong my_timer_cycles_il_i386();
-#elif defined(__SUNPRO_C) && defined(__x86_64) && defined(_LP64)
-ulonglong my_timer_cycles_il_x86_64();
-#endif
-
-#if defined(__INTEL_COMPILER)
-/*
- icc warning #1011 is:
- missing return statement at end of non-void function
-*/
-#pragma warning (disable:1011)
-#endif
-
-/*
- For cycles, we depend on RDTSC for x86 platforms,
- or on time buffer (which is not really a cycle count
- but a separate counter with less than nanosecond
- resolution) for most PowerPC platforms, or on
- gethrtime which is okay for hpux and solaris, or on
- clock_gettime(CLOCK_SGI_CYCLE) for Irix platforms,
- or on read_real_time for aix platforms. There is
- nothing for Alpha platforms, they would be tricky.
-
- On the platforms that do not have a CYCLE timer,
- "wait" events are initialized to use NANOSECOND instead of CYCLE
- during performance_schema initialization (at the server startup).
-
- Linux performance monitor (see "man perf_event_open") can
- provide cycle counter on the platforms that do not have
- other kinds of cycle counters. But we don't use it so far.
-
- ARM notes
- ---------
- During tests on ARMv7 Debian, perf_even_open() based cycle counter provided
- too low frequency with too high overhead:
- MariaDB [performance_schema]> SELECT * FROM performance_timers;
- +-------------+-----------------+------------------+----------------+
- | TIMER_NAME | TIMER_FREQUENCY | TIMER_RESOLUTION | TIMER_OVERHEAD |
- +-------------+-----------------+------------------+----------------+
- | CYCLE | 689368159 | 1 | 970 |
- | NANOSECOND | 1000000000 | 1 | 308 |
- | MICROSECOND | 1000000 | 1 | 417 |
- | MILLISECOND | 1000 | 1000 | 407 |
- | TICK | 127 | 1 | 612 |
- +-------------+-----------------+------------------+----------------+
- Therefore, it was decided not to use perf_even_open() on ARM
- (i.e. go without CYCLE and have "wait" events use NANOSECOND by default).
-*/
-
-ulonglong my_timer_cycles(void)
-{
-#if defined(__GNUC__) && defined(__i386__)
- /* This works much better if compiled with "gcc -O3". */
- ulonglong result;
- __asm__ __volatile__ ("rdtsc" : "=A" (result));
- return result;
-#elif defined(__SUNPRO_C) && defined(__i386)
- __asm("rdtsc");
-#elif defined(__GNUC__) && defined(__x86_64__)
- ulonglong result;
- __asm__ __volatile__ ("rdtsc\n\t" \
- "shlq $32,%%rdx\n\t" \
- "orq %%rdx,%%rax"
- : "=a" (result) :: "%edx");
- return result;
-#elif defined(HAVE_ASM_MSR_H) && defined(HAVE_RDTSCLL)
- {
- ulonglong result;
- rdtscll(result);
- return result;
- }
-#elif defined(_WIN32) && defined(_M_IX86)
- __asm {rdtsc};
-#elif defined(_WIN64) && defined(_M_X64)
- /* For 64-bit Windows: unsigned __int64 __rdtsc(); */
- return __rdtsc();
-#elif defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H)
- return (ulonglong) __getReg(_IA64_REG_AR_ITC); /* (3116) */
-#elif defined(__GNUC__) && defined(__ia64__)
- {
- ulonglong result;
- __asm __volatile__ ("mov %0=ar.itc" : "=r" (result));
- return result;
- }
-#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__POWERPC__) || (defined(_POWER) && defined(_AIX52))) && (defined(__64BIT__) || defined(_ARCH_PPC64))
- {
- ulonglong result;
- __asm __volatile__ ("mftb %0" : "=r" (result));
- return result;
- }
-#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__POWERPC__) || (defined(_POWER) && defined(_AIX52))) && (!defined(__64BIT__) && !defined(_ARCH_PPC64))
- {
- /*
- mftbu means "move from time-buffer-upper to result".
- The loop is saying: x1=upper, x2=lower, x3=upper,
- if x1!=x3 there was an overflow so repeat.
- */
- unsigned int x1, x2, x3;
- ulonglong result;
- for (;;)
- {
- __asm __volatile__ ( "mftbu %0" : "=r"(x1) );
- __asm __volatile__ ( "mftb %0" : "=r"(x2) );
- __asm __volatile__ ( "mftbu %0" : "=r"(x3) );
- if (x1 == x3) break;
- }
- result = x1;
- return ( result << 32 ) | x2;
- }
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(__sparcv9) && defined(_LP64) && !defined(__SunOS_5_7)
- return (my_timer_cycles_il_sparc64());
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(_ILP32) && !defined(__SunOS_5_7)
- return (my_timer_cycles_il_sparc32());
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(__i386) && defined(_ILP32)
- /* This is probably redundant for __SUNPRO_C. */
- return (my_timer_cycles_il_i386());
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(__x86_64) && defined(_LP64)
- return (my_timer_cycles_il_x86_64());
-#elif defined(__GNUC__) && defined(__sparcv9) && defined(_LP64) && (__GNUC__>2)
- {
- ulonglong result;
- __asm __volatile__ ("rd %%tick,%0" : "=r" (result));
- return result;
- }
-#elif defined(__GNUC__) && defined(__sparc__) && !defined(_LP64) && (__GNUC__>2)
- {
- union {
- ulonglong wholeresult;
- struct {
- ulong high;
- ulong low;
- } splitresult;
- } result;
- __asm __volatile__ ("rd %%tick,%1; srlx %1,32,%0" : "=r" (result.splitresult.high), "=r" (result.splitresult.low));
- return result.wholeresult;
- }
-#elif defined(__sgi) && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE)
- {
- struct timespec tp;
- clock_gettime(CLOCK_SGI_CYCLE, &tp);
- return (ulonglong) tp.tv_sec * 1000000000 + (ulonglong) tp.tv_nsec;
- }
-#elif defined(__GNUC__) && defined(__s390__)
- /* covers both s390 and s390x */
- {
- ulonglong result;
- __asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc");
- return result;
- }
-#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
- /* gethrtime may appear as either cycle or nanosecond counter */
- return (ulonglong) gethrtime();
-#else
- return 0;
-#endif
-}
-
-#if defined(__INTEL_COMPILER)
-/* re-enable warning#1011 which was only for my_timer_cycles() */
-/* There may be an icc bug which means we must leave disabled. */
-#pragma warning (default:1011)
-#endif
-
/*
For nanoseconds, most platforms have nothing available that
(a) doesn't require bringing in a 40-kb librt.so library
@@ -538,7 +355,7 @@ static ulonglong my_timer_init_frequency(MY_TIMER_INFO *mti)
/*
Call my_timer_init before the first call to my_timer_xxx().
If something must be initialized, it happens here.
- Set: what routine is being used e.g. "asm_x86"
+ Set: what routine is being used e.g. "rdtsc"
Set: function, overhead, actual frequency, resolution.
*/
@@ -551,42 +368,22 @@ void my_timer_init(MY_TIMER_INFO *mti)
/* cycles */
mti->cycles.frequency= 1000000000;
-#if defined(__GNUC__) && defined(__i386__)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_X86;
-#elif defined(__SUNPRO_C) && defined(__i386)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_X86;
-#elif defined(__GNUC__) && defined(__x86_64__)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_X86_64;
-#elif defined(HAVE_ASM_MSR_H) && defined(HAVE_RDTSCLL)
- mti->cycles.routine= MY_TIMER_ROUTINE_RDTSCLL;
-#elif defined(_WIN32) && defined(_M_IX86)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_X86_WIN;
-#elif defined(_WIN64) && defined(_M_X64)
+#if defined _WIN32 || defined __i386__ || defined __x86_64__
mti->cycles.routine= MY_TIMER_ROUTINE_RDTSC;
#elif defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H)
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_IA64;
#elif defined(__GNUC__) && defined(__ia64__)
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_IA64;
-#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__POWERPC__) || (defined(_POWER) && defined(_AIX52))) && (defined(__64BIT__) || defined(_ARCH_PPC64))
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_PPC64;
-#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__POWERPC__) || (defined(_POWER) && defined(_AIX52))) && (!defined(__64BIT__) && !defined(_ARCH_PPC64))
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_PPC;
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(__sparcv9) && defined(_LP64) && !defined(__SunOS_5_7)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC64;
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(_ILP32) && !defined(__SunOS_5_7)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC32;
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(__i386) && defined(_ILP32)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_SUNPRO_I386;
-#elif (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && defined(__x86_64) && defined(_LP64)
- mti->cycles.routine= MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64;
+#elif defined __GNUC__ && defined __powerpc__
+ mti->cycles.routine= MY_TIMER_ROUTINE_PPC_GET_TIMEBASE;
#elif defined(__GNUC__) && defined(__sparcv9) && defined(_LP64) && (__GNUC__>2)
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_GCC_SPARC64;
#elif defined(__GNUC__) && defined(__sparc__) && !defined(_LP64) && (__GNUC__>2)
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_GCC_SPARC32;
-#elif defined(__sgi) && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE)
- mti->cycles.routine= MY_TIMER_ROUTINE_SGI_CYCLE;
#elif defined(__GNUC__) && defined(__s390__)
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_S390;
+#elif defined(__GNUC__) && defined (__aarch64__)
+ mti->cycles.routine= MY_TIMER_ROUTINE_AARCH64;
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
mti->cycles.routine= MY_TIMER_ROUTINE_GETHRTIME;
#else
@@ -957,8 +754,8 @@ void my_timer_init(MY_TIMER_INFO *mti)
"include <linux/timex.h>" or "include <asm/timex.h>"
can lead to autoconf or compile errors, depending on system.
- rdtsc, __rdtsc, rdtscll: available for x86 with Linux BSD,
- Solaris, Windows. See "possible flaws and dangers" comments.
+ __rdtsc(): available for IA-32 and AMD64.
+ See "possible flaws and dangers" comments.
times(): what we use for ticks. Should just read the last
(xtime) tick count, therefore should be fast, but usually
@@ -992,7 +789,7 @@ void my_timer_init(MY_TIMER_INFO *mti)
getclock(): documented for Alpha, but not found during tests.
mach_absolute_time() and UpTime() are recommended for Apple.
- Inititally they weren't tried, because asm_ppc seems to do the job.
+ Initially they weren't tried, because ppc_get_timebase seems to do the job.
But now we use mach_absolute_time for nanoseconds.
Any clock-based timer can be affected by NPT (ntpd program),
diff --git a/mysys/my_read.c b/mysys/my_read.c
index 9a78e8d7977..6b4f17e9df6 100644
--- a/mysys/my_read.c
+++ b/mysys/my_read.c
@@ -90,11 +90,11 @@ size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
- MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
- MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
}
if (readbytes == (size_t) -1 ||
diff --git a/mysys/my_redel.c b/mysys/my_redel.c
index 96ab410a382..1a69eaa291f 100644
--- a/mysys/my_redel.c
+++ b/mysys/my_redel.c
@@ -102,7 +102,7 @@ int my_copystat(const char *from, const char *to, int MyFlags)
{
my_errno= errno;
if (MyFlags & (MY_FAE+MY_WME))
- my_error(EE_CHANGE_PERMISSIONS, MYF(ME_BELL+ME_WAITTANG), from, errno);
+ my_error(EE_CHANGE_PERMISSIONS, MYF(ME_BELL), from, errno);
return -1;
}
@@ -110,14 +110,14 @@ int my_copystat(const char *from, const char *to, int MyFlags)
if (statbuf.st_nlink > 1 && MyFlags & MY_LINK_WARNING)
{
if (MyFlags & MY_LINK_WARNING)
- my_error(EE_LINK_WARNING,MYF(ME_BELL+ME_WAITTANG),from,statbuf.st_nlink);
+ my_error(EE_LINK_WARNING,MYF(ME_BELL),from,statbuf.st_nlink);
}
/* Copy ownership */
if (chown(to, statbuf.st_uid, statbuf.st_gid))
{
my_errno= errno;
if (MyFlags & MY_WME)
- my_error(EE_CHANGE_OWNERSHIP, MYF(ME_BELL+ME_WAITTANG), from, errno);
+ my_error(EE_CHANGE_OWNERSHIP, MYF(ME_BELL), from, errno);
if (MyFlags & MY_FAE)
return -1;
}
diff --git a/mysys/my_rename.c b/mysys/my_rename.c
index 23dbec2d7ff..389994b9a09 100644
--- a/mysys/my_rename.c
+++ b/mysys/my_rename.c
@@ -101,7 +101,7 @@ int my_rename(const char *from, const char *to, myf MyFlags)
my_errno= errno;
error = -1;
if (MyFlags & (MY_FAE+MY_WME))
- my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,my_errno);
+ my_error(EE_LINK, MYF(ME_BELL),from,to,my_errno);
}
else if (MyFlags & MY_SYNC_DIR)
{
diff --git a/mysys/my_rnd.c b/mysys/my_rnd.c
index c38682a2012..0af251b4ade 100644
--- a/mysys/my_rnd.c
+++ b/mysys/my_rnd.c
@@ -78,20 +78,11 @@ double my_rnd(struct my_rnd_struct *rand_st)
double my_rnd_ssl(struct my_rnd_struct *rand_st)
{
-
-#if defined(HAVE_YASSL) || defined(HAVE_OPENSSL)
- int rc;
- unsigned int res;
-
-#if defined(HAVE_YASSL)
- rc= yaSSL::RAND_bytes((unsigned char *) &res, sizeof (unsigned int));
-#else
+#if defined(HAVE_OPENSSL)
rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int));
-#endif /* HAVE_YASSL */
-
if (rc)
return (double)res / (double)UINT_MAX;
-#endif /* defined(HAVE_YASSL) || defined(HAVE_OPENSSL) */
+#endif /* defined(HAVE_OPENSSL) */
return my_rnd(rand_st);
}
diff --git a/mysys/my_setuser.c b/mysys/my_setuser.c
index 14ab04dd10f..e35d6602aca 100644
--- a/mysys/my_setuser.c
+++ b/mysys/my_setuser.c
@@ -27,7 +27,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
my_errno= EPERM;
if (MyFlags & MY_WME)
my_printf_error(my_errno, "One can only use the --user switch if "
- "running as root", MYF(ME_JUST_WARNING|ME_NOREFRESH));
+ "running as root", MYF(ME_WARNING|ME_ERROR_LOG));
}
}
DBUG_RETURN(NULL);
@@ -38,7 +38,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
{
my_errno= EINVAL;
my_printf_error(my_errno, "Please consult the Knowledge Base to find "
- "out how to run mysqld as root!", MYF(ME_NOREFRESH));
+ "out how to run mysqld as root!", MYF(ME_ERROR_LOG));
}
DBUG_RETURN(NULL);
}
@@ -54,7 +54,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
{
my_errno= EINVAL;
my_printf_error(my_errno, "Can't change to run as user '%s'. Please "
- "check that the user exists!", MYF(ME_NOREFRESH), user);
+ "check that the user exists!", MYF(ME_ERROR_LOG), user);
DBUG_RETURN(NULL);
}
}
@@ -74,7 +74,7 @@ int my_set_user(const char *user, struct passwd *user_info, myf MyFlags)
{
my_errno= errno;
if (MyFlags & MY_WME)
- my_printf_error(errno, "Cannot change uid/gid (errno: %d)", MYF(ME_NOREFRESH),
+ my_printf_error(errno, "Cannot change uid/gid (errno: %d)", MYF(ME_ERROR_LOG),
errno);
DBUG_RETURN(my_errno);
}
diff --git a/mysys/my_static.c b/mysys/my_static.c
index 2b5f6c3eb1d..fc4c60bc237 100644
--- a/mysys/my_static.c
+++ b/mysys/my_static.c
@@ -106,7 +106,7 @@ my_bool my_disable_copystat_in_redel=0;
/* Typelib by all clients */
const char *sql_protocol_names_lib[] =
-{ "TCP", "SOCKET", "PIPE", "MEMORY", NullS };
+{ "TCP", "SOCKET", "PIPE", NullS };
TYPELIB sql_protocol_typelib ={ array_elements(sql_protocol_names_lib) - 1, "",
sql_protocol_names_lib, NULL };
diff --git a/mysys/my_sync.c b/mysys/my_sync.c
index 5a21a511dda..736d97d14ef 100644
--- a/mysys/my_sync.c
+++ b/mysys/my_sync.c
@@ -122,7 +122,7 @@ int my_sync(File fd, myf my_flags)
res= 0;
}
else if (my_flags & MY_WME)
- my_error(EE_SYNC, MYF(ME_BELL+ME_WAITTANG), my_filename(fd), my_errno);
+ my_error(EE_SYNC, MYF(ME_BELL), my_filename(fd), my_errno);
}
else
{
diff --git a/mysys/my_timer_cycles.il b/mysys/my_timer_cycles.il
deleted file mode 100644
index f6eb922c8fc..00000000000
--- a/mysys/my_timer_cycles.il
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (c) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
- Use is subject to license terms.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
-
-/* Sun Studio SPARC inline templates for cycle timer */
-/* Sun Studio i386 and x86_64 inline templates for cycle timer */
-/* I didn't say ".volatile" or ".nonvolatile". */
-
-.inline my_timer_cycles_il_sparc64,0
-rd %tick,%o0
-.end
-
-.inline my_timer_cycles_il_sparc32,0
-rd %tick,%o2
-srlx %o2,32,%o0
-sra %o2,0,%o1
-.end
-
-.inline my_timer_cycles_il_i386,0
-rdtsc
-.end
-
-.inline my_timer_cycles_il_x86_64,0
-rdtsc
-shlq $32,%rdx
-orq %rdx,%rax
-.end
diff --git a/mysys/my_win_popen.cc b/mysys/my_win_popen.cc
new file mode 100644
index 00000000000..f41f54100f1
--- /dev/null
+++ b/mysys/my_win_popen.cc
@@ -0,0 +1,170 @@
+/* 2019, 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-1301 USA */
+
+/*
+ Replacement of the buggy implementations of popen in Windows CRT
+*/
+#include <windows.h>
+#include <fcntl.h>
+#include <io.h>
+#include <mutex>
+#include <stdlib.h>
+#include <unordered_map>
+
+enum
+{
+ REDIRECT_STDIN= 'w',
+ REDIRECT_STDOUT= 'r'
+};
+
+/** Map from FILE* returned by popen() to corresponding process handle.*/
+static std::unordered_map<FILE *, HANDLE> popen_map;
+/* Mutex to protect the map.*/
+static std::mutex popen_mtx;
+
+/**
+Creates a FILE* from HANDLE.
+*/
+static FILE *make_fp(HANDLE *handle, const char *mode)
+{
+ int flags = 0;
+
+ if (mode[0] == REDIRECT_STDOUT)
+ flags |= O_RDONLY;
+ switch (mode[1])
+ {
+ case 't':
+ flags |= _O_TEXT;
+ break;
+ case 'b':
+ flags |= _O_BINARY;
+ break;
+ }
+
+ int fd= _open_osfhandle((intptr_t) *handle, flags);
+ if (fd < 0)
+ return NULL;
+ FILE *fp= fdopen(fd, mode);
+ if (!fp)
+ {
+ /* Closing file descriptor also closes underlying handle.*/
+ close(fd);
+ *handle= 0;
+ }
+ return fp;
+}
+
+/** A home-backed version of popen(). */
+extern "C" FILE *my_win_popen(const char *cmd, const char *mode)
+{
+ FILE *fp(0);
+ char type= mode[0];
+ HANDLE parent_pipe_end(0);
+ HANDLE child_pipe_end(0);
+ PROCESS_INFORMATION pi{};
+ STARTUPINFO si{};
+ std::string command_line;
+
+ /* Create a pipe between this and child process.*/
+ SECURITY_ATTRIBUTES sa_attr{};
+ sa_attr.nLength= sizeof(SECURITY_ATTRIBUTES);
+ sa_attr.bInheritHandle= TRUE;
+ switch (type)
+ {
+ case REDIRECT_STDIN:
+ if (!CreatePipe(&child_pipe_end, &parent_pipe_end, &sa_attr, 0))
+ goto error;
+ break;
+ case REDIRECT_STDOUT:
+ if (!CreatePipe(&parent_pipe_end, &child_pipe_end, &sa_attr, 0))
+ goto error;
+ break;
+ default:
+ /* Unknown mode, éxpected "r", "rt", "w", "wt" */
+ abort();
+ }
+ if (!SetHandleInformation(parent_pipe_end, HANDLE_FLAG_INHERIT, 0))
+ goto error;
+
+ /* Start child process with redirected output.*/
+
+ si.cb= sizeof(STARTUPINFO);
+ si.hStdError= GetStdHandle(STD_ERROR_HANDLE);
+ si.hStdOutput= (type == REDIRECT_STDOUT) ? child_pipe_end
+ : GetStdHandle(STD_OUTPUT_HANDLE);
+ si.hStdInput= (type == REDIRECT_STDIN) ? child_pipe_end
+ : GetStdHandle(STD_INPUT_HANDLE);
+
+ si.dwFlags|= STARTF_USESTDHANDLES;
+ command_line.append("cmd.exe /c ").append(cmd);
+
+ if (!CreateProcess(0, (LPSTR) command_line.c_str(), 0, 0, TRUE, 0, 0, 0, &si,
+ &pi))
+ goto error;
+
+ CloseHandle(pi.hThread);
+ CloseHandle(child_pipe_end);
+ child_pipe_end= 0;
+
+ fp= make_fp(&parent_pipe_end, mode);
+ if (fp)
+ {
+ std::unique_lock<std::mutex> lk(popen_mtx);
+ popen_map[fp]= pi.hProcess;
+ return fp;
+ }
+
+error:
+ for (auto handle : { parent_pipe_end, child_pipe_end })
+ {
+ if (handle)
+ CloseHandle(handle);
+ }
+
+ if (pi.hProcess)
+ {
+ TerminateProcess(pi.hProcess, 1);
+ CloseHandle(pi.hProcess);
+ }
+ return NULL;
+}
+
+/** A home-backed version of pclose(). */
+
+extern "C" int my_win_pclose(FILE *fp)
+{
+ /* Find process entry for given file pointer.*/
+ std::unique_lock<std::mutex> lk(popen_mtx);
+ HANDLE proc= popen_map[fp];
+ if (!proc)
+ {
+ errno= EINVAL;
+ return -1;
+ }
+ popen_map.erase(fp);
+ lk.unlock();
+
+ fclose(fp);
+
+ /* Wait for process to complete, return its exit code.*/
+ DWORD ret;
+ if (WaitForSingleObject(proc, INFINITE) || !GetExitCodeProcess(proc, &ret))
+ {
+ ret= -1;
+ errno= EINVAL;
+ }
+ CloseHandle(proc);
+ return ret;
+}
diff --git a/mysys/my_windac.c b/mysys/my_windac.c
deleted file mode 100644
index 9a2686a44f4..00000000000
--- a/mysys/my_windac.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
-
-#include "mysys_priv.h"
-#include "m_string.h"
-#ifdef __WIN__
-
-/*
- Auxiliary structure to store pointers to the data which we need to keep
- around while SECURITY_ATTRIBUTES is in use.
-*/
-
-typedef struct st_my_security_attr
-{
- PSID everyone_sid;
- PACL dacl;
-} My_security_attr;
-
-
-/*
- Allocate and initialize SECURITY_ATTRIBUTES setting up access
- rights for the owner and group `Everybody'.
-
- SYNOPSIS
- my_security_attr_create()
- psa [OUT] pointer to store the pointer to SA in
- perror [OUT] pointer to store error message if there was an
- error
- owner_rights [IN] access rights for the owner
- everyone_rights [IN] access rights for group Everybody
-
- DESCRIPTION
- Set up the security attributes to provide clients with sufficient
- access rights to a kernel object. We need this function
- because if we simply grant all access to everybody (by installing
- a NULL DACL) a mailicious user can attempt a denial of service
- attack by taking ownership over the kernel object. Upon successful
- return `psa' contains a pointer to SECUIRITY_ATTRIBUTES that can be used
- to create kernel objects with proper access rights.
-
- RETURN
- 0 success, psa is 0 or points to a valid SA structure,
- perror is left intact
- !0 error, SA is set to 0, error message is stored in perror
-*/
-
-int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror,
- DWORD owner_rights, DWORD everyone_rights)
-{
- /* Top-level SID authority */
- SID_IDENTIFIER_AUTHORITY world_auth= SECURITY_WORLD_SID_AUTHORITY;
- PSID everyone_sid= 0;
- HANDLE htoken= 0;
- SECURITY_ATTRIBUTES *sa= 0;
- PACL dacl= 0;
- DWORD owner_token_length, dacl_length;
- SECURITY_DESCRIPTOR *sd;
- PTOKEN_USER owner_token;
- PSID owner_sid;
- My_security_attr *attr;
-
- /*
- Get SID of Everyone group. Easier to retrieve all SIDs each time
- this function is called than worry about thread safety.
- */
- if (! AllocateAndInitializeSid(&world_auth, 1, SECURITY_WORLD_RID,
- 0, 0, 0, 0, 0, 0, 0, &everyone_sid))
- {
- *perror= "Failed to retrieve the SID of Everyone group";
- goto error;
- }
-
- /*
- Get SID of the owner. Using GetSecurityInfo this task can be done
- in just one call instead of five, but GetSecurityInfo declared in
- aclapi.h, so I hesitate to use it.
- SIC: OpenThreadToken works only if there is an active impersonation
- token, hence OpenProcessToken is used.
- */
- if (! OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &htoken))
- {
- *perror= "Failed to retrieve thread access token";
- goto error;
- }
- GetTokenInformation(htoken, TokenUser, 0, 0, &owner_token_length);
-
- if (! my_multi_malloc(MYF(MY_WME),
- &sa, ALIGN_SIZE(sizeof(SECURITY_ATTRIBUTES)) +
- sizeof(My_security_attr),
- &sd, sizeof(SECURITY_DESCRIPTOR),
- &owner_token, owner_token_length,
- 0))
- {
- *perror= "Failed to allocate memory for SECURITY_ATTRIBUTES";
- goto error;
- }
- bzero(owner_token, owner_token_length);
- if (! GetTokenInformation(htoken, TokenUser, owner_token,
- owner_token_length, &owner_token_length))
- {
- *perror= "GetTokenInformation failed";
- goto error;
- }
- owner_sid= owner_token->User.Sid;
-
- if (! IsValidSid(owner_sid))
- {
- *perror= "IsValidSid failed";
- goto error;
- }
-
- /* Calculate the amount of memory that must be allocated for the DACL */
- dacl_length= sizeof(ACL) + (sizeof(ACCESS_ALLOWED_ACE)-sizeof(DWORD)) * 2 +
- GetLengthSid(everyone_sid) + GetLengthSid(owner_sid);
-
- /* Create an ACL */
- if (! (dacl= (PACL) my_malloc(dacl_length, MYF(MY_ZEROFILL|MY_WME))))
- {
- *perror= "Failed to allocate memory for DACL";
- goto error;
- }
- if (! InitializeAcl(dacl, dacl_length, ACL_REVISION))
- {
- *perror= "Failed to initialize DACL";
- goto error;
- }
- if (! AddAccessAllowedAce(dacl, ACL_REVISION, everyone_rights, everyone_sid))
- {
- *perror= "Failed to set up DACL";
- goto error;
- }
- if (! AddAccessAllowedAce(dacl, ACL_REVISION, owner_rights, owner_sid))
- {
- *perror= "Failed to set up DACL";
- goto error;
- }
- if (! InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION))
- {
- *perror= "Could not initialize security descriptor";
- goto error;
- }
- if (! SetSecurityDescriptorDacl(sd, TRUE, dacl, FALSE))
- {
- *perror= "Failed to install DACL";
- goto error;
- }
-
- sa->nLength= sizeof(*sa);
- sa->bInheritHandle= TRUE;
- sa->lpSecurityDescriptor= sd;
- /* Save pointers to everyone_sid and dacl to be able to clean them up */
- attr= (My_security_attr*) (((char*) sa) + ALIGN_SIZE(sizeof(*sa)));
- attr->everyone_sid= everyone_sid;
- attr->dacl= dacl;
- *psa= sa;
-
- CloseHandle(htoken);
- return 0;
-error:
- if (everyone_sid)
- FreeSid(everyone_sid);
- if (htoken)
- CloseHandle(htoken);
- my_free(sa);
- my_free(dacl);
- *psa= 0;
- return 1;
-}
-
-/*
- Cleanup security attributes freeing used memory.
-
- SYNOPSIS
- my_security_attr_free()
- sa security attributes
-*/
-
-void my_security_attr_free(SECURITY_ATTRIBUTES *sa)
-{
- if (sa)
- {
- My_security_attr *attr= (My_security_attr*)
- (((char*)sa) + ALIGN_SIZE(sizeof(*sa)));
- FreeSid(attr->everyone_sid);
- my_free(attr->dacl);
- my_free(sa);
- }
-}
-
-#endif /* __WIN__ */
diff --git a/mysys/my_write.c b/mysys/my_write.c
index 53288b43f2e..06914b25641 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -107,7 +107,7 @@ size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
- my_error(EE_WRITE, MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
+ my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
}
DBUG_RETURN(MY_FILE_ERROR); /* Error on read */
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c
index 8a89762de2a..553dc55bfc3 100644
--- a/mysys/thr_alarm.c
+++ b/mysys/thr_alarm.c
@@ -731,7 +731,8 @@ static void *signal_hand(void *arg __attribute__((unused)))
DBUG_PRINT("info",("Starting signal and alarm handling thread"));
for(;;)
{
- while ((error=my_sigwait(&set,&sig)) == EINTR)
+ int code;
+ while ((error=my_sigwait(&set,&sig,&code)) == EINTR)
printf("sigwait restarted\n");
if (error)
{
@@ -805,8 +806,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
/* Start signal thread and wait for it to start */
mysql_mutex_lock(&LOCK_thread_count);
- mysql_thread_create(0,
- &tid, &thr_attr, signal_hand, NULL);
+ mysql_thread_create(0, &tid, &thr_attr, signal_hand, NULL);
mysql_cond_wait(&COND_thread_count, &LOCK_thread_count);
mysql_mutex_unlock(&LOCK_thread_count);
DBUG_PRINT("info",("signal thread created"));
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index c798c8595e7..363e1a1ea26 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -95,24 +95,6 @@ my_bool thr_lock_inited=0;
ulong locks_immediate = 0L, locks_waited = 0L;
enum thr_lock_type thr_upgraded_concurrent_insert_lock = TL_WRITE;
-#ifdef WITH_WSREP
-static wsrep_thd_is_brute_force_fun wsrep_thd_is_brute_force= NULL;
-static wsrep_abort_thd_fun wsrep_abort_thd= NULL;
-static my_bool wsrep_debug;
-static my_bool wsrep_convert_LOCK_to_trx;
-static wsrep_on_fun wsrep_on = NULL;
-
-void wsrep_thr_lock_init(
- wsrep_thd_is_brute_force_fun bf_fun, wsrep_abort_thd_fun abort_fun,
- my_bool debug, my_bool convert_LOCK_to_trx, wsrep_on_fun on_fun
-) {
- wsrep_thd_is_brute_force = bf_fun;
- wsrep_abort_thd = abort_fun;
- wsrep_debug = debug;
- wsrep_convert_LOCK_to_trx= convert_LOCK_to_trx;
- wsrep_on = on_fun;
-}
-#endif
/* The following constants are only for debug output */
#define MAX_THREADS 1000
#define MAX_LOCKS 1000
@@ -652,93 +634,6 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
DBUG_RETURN(result);
}
-#ifdef WITH_WSREP
-/*
- * If brute force applier would need to wait for a thr lock,
- * it needs to make sure that it will get the lock without (too much)
- * delay.
- * We identify here the owners of blocking locks and ask them to
- * abort. We then put our lock request in the first place in the
- * wait queue. When lock holders abort (one by one) the lock release
- * algorithm should grant the lock to us. We rely on this and proceed
- * to wait_for_locks().
- * wsrep_break_locks() should be called in all the cases, where lock
- * wait would happen.
- *
- * TODO: current implementation might not cover all possible lock wait
- * situations. This needs an review still.
- * TODO: lock release, might favor some other lock (instead our bf).
- * This needs an condition to check for bf locks first.
- * TODO: we still have a debug fprintf, this should be removed
- */
-static my_bool
-wsrep_break_lock(
- THR_LOCK_DATA *data, struct st_lock_list *lock_queue1,
- struct st_lock_list *wait_queue)
-{
- if (wsrep_on && wsrep_on(data->owner->mysql_thd) &&
- wsrep_thd_is_brute_force &&
- wsrep_thd_is_brute_force(data->owner->mysql_thd, TRUE))
- {
- THR_LOCK_DATA *holder;
-
- /* if locking session conversion to transaction has been enabled,
- we know that this conflicting lock must be read lock and furthermore,
- lock holder is read-only. It is safe to wait for him.
- */
-#ifdef TODO_WHEN_LOCK_TABLES_IS_A_TRANSACTION
- if (wsrep_convert_LOCK_to_trx &&
- (THD*)(data->owner->mysql_thd)->in_lock_tables)
- {
- if (wsrep_debug)
- fprintf(stderr,"WSREP wsrep_break_lock read lock untouched\n");
- return FALSE;
- }
-#endif
- if (wsrep_debug)
- fprintf(stderr,"WSREP wsrep_break_lock aborting locks\n");
-
- /* aborting lock holder(s) here */
- for (holder=(lock_queue1) ? lock_queue1->data : NULL;
- holder;
- holder=holder->next)
- {
- if (!wsrep_thd_is_brute_force(holder->owner->mysql_thd, TRUE))
- {
- wsrep_abort_thd(data->owner->mysql_thd,
- holder->owner->mysql_thd, FALSE);
- }
- else
- {
- if (wsrep_debug)
- fprintf(stderr,"WSREP wsrep_break_lock skipping BF lock conflict\n");
- return FALSE;
- }
- }
-
- /* Add our lock to the head of the wait queue */
- if (*(wait_queue->last)==wait_queue->data)
- {
- wait_queue->last=&data->next;
- assert(wait_queue->data==0);
- }
- else
- {
- assert(wait_queue->data!=0);
- wait_queue->data->prev=&data->next;
- }
- data->next=wait_queue->data;
- data->prev=&wait_queue->data;
- wait_queue->data=data;
- data->cond=get_cond();
-
- statistic_increment(locks_immediate,&THR_LOCK_lock);
- return TRUE;
- }
- return FALSE;
-}
-#endif
-
static enum enum_thr_lock_result
thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
{
@@ -746,9 +641,6 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
enum enum_thr_lock_result result= THR_LOCK_SUCCESS;
struct st_lock_list *wait_queue;
enum thr_lock_type lock_type= data->type;
-#ifdef WITH_WSREP
- my_bool wsrep_lock_inserted= FALSE;
-#endif
MYSQL_TABLE_WAIT_VARIABLES(locker, state) /* no ';' */
DBUG_ENTER("thr_lock");
@@ -845,13 +737,6 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
lock but a high priority write waiting in the write_wait queue.
In the latter case we should yield the lock to the writer.
*/
-#ifdef WITH_WSREP
- if (wsrep_break_lock(data, &lock->write, &lock->read_wait))
- {
- wsrep_lock_inserted= TRUE;
- }
-#endif
-
wait_queue= &lock->read_wait;
}
else /* Request for WRITE lock */
@@ -997,20 +882,8 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
(ulong) lock->read.data->owner->thread_id,
data->type));
}
-#ifdef WITH_WSREP
- if (wsrep_break_lock(data, &lock->write, &lock->write_wait))
- {
- wsrep_lock_inserted= TRUE;
- }
-#endif
-
wait_queue= &lock->write_wait;
}
- /* Can't get lock yet; Wait for it */
-#ifdef WITH_WSREP
- if (wsrep_lock_inserted && wsrep_on(data->owner->mysql_thd))
- DBUG_RETURN(wait_for_lock(wait_queue, data, 1, lock_wait_timeout));
-#endif
result= wait_for_lock(wait_queue, data, 0, lock_wait_timeout);
MYSQL_END_TABLE_LOCK_WAIT(locker);
DBUG_RETURN(result);
diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c
index 4564059b31a..1441c25cc59 100644
--- a/mysys/waiting_threads.c
+++ b/mysys/waiting_threads.c
@@ -175,6 +175,7 @@
#include <my_global.h>
#include <waiting_threads.h>
#include <m_string.h>
+#include "my_cpu.h"
/* status variables */
diff --git a/mysys_ssl/CMakeLists.txt b/mysys_ssl/CMakeLists.txt
index 86749128664..1c3f60b5bb0 100644
--- a/mysys_ssl/CMakeLists.txt
+++ b/mysys_ssl/CMakeLists.txt
@@ -36,7 +36,6 @@ SET(MYSYS_SSL_SOURCES
my_crypt.cc
)
-# We do RESTRICT_SYMBOL_EXPORTS(yassl) elsewhere.
# In order to get correct symbol visibility, these files
# must be compiled with "-fvisibility=hidden"
IF(WITH_SSL STREQUAL "bundled" AND HAVE_VISIBILITY_HIDDEN)
diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc
index 65dd5cd769e..e512eee9066 100644
--- a/mysys_ssl/my_crypt.cc
+++ b/mysys_ssl/my_crypt.cc
@@ -18,27 +18,37 @@
#include <my_global.h>
#include <string.h>
-#ifdef HAVE_YASSL
-#include "yassl.cc"
-#else
+#define template _template /* bug in WolfSSL 4.4.0, see also violite.h */
#include <openssl/evp.h>
+#undef template
#include <openssl/aes.h>
#include <openssl/err.h>
#include <openssl/rand.h>
-#endif
#include <my_crypt.h>
#include <ssl_compat.h>
+#include <cstdint>
+
+#ifdef HAVE_WOLFSSL
+#define CTX_ALIGN 16
+#else
+#define CTX_ALIGN 0
+#endif
class MyCTX
{
public:
- char ctx_buf[EVP_CIPHER_CTX_SIZE];
- EVP_CIPHER_CTX *ctx;
-
+ char ctx_buf[EVP_CIPHER_CTX_SIZE + CTX_ALIGN];
+ EVP_CIPHER_CTX* ctx;
MyCTX()
{
- ctx= (EVP_CIPHER_CTX *)ctx_buf;
+#if CTX_ALIGN > 0
+ uintptr_t p= ((uintptr_t)ctx_buf + (CTX_ALIGN - 1)) & ~(CTX_ALIGN - 1);
+ ctx = reinterpret_cast<EVP_CIPHER_CTX*>(p);
+#else
+ ctx = (EVP_CIPHER_CTX*)ctx_buf;
+#endif
+
EVP_CIPHER_CTX_init(ctx);
}
virtual ~MyCTX()
@@ -54,7 +64,7 @@ public:
if (unlikely(!cipher))
return MY_AES_BAD_KEYSIZE;
- if (!EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, encrypt))
+ if (EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, encrypt) != 1)
return MY_AES_OPENSSL_ERROR;
DBUG_ASSERT(EVP_CIPHER_CTX_key_length(ctx) == (int)klen);
@@ -64,13 +74,23 @@ public:
}
virtual int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
{
- if (!EVP_CipherUpdate(ctx, dst, (int*)dlen, src, slen))
+#ifdef HAVE_WOLFSSL
+ // WolfSSL checks parameters and does not like NULL pointers to be passed to function below.
+ if (!src)
+ {
+ static uchar dummy[MY_AES_BLOCK_SIZE];
+ DBUG_ASSERT(!slen);
+ src=dummy;
+ }
+#endif
+
+ if (EVP_CipherUpdate(ctx, dst, (int*)dlen, src, slen) != 1)
return MY_AES_OPENSSL_ERROR;
return MY_AES_OK;
}
virtual int finish(uchar *dst, uint *dlen)
{
- if (!EVP_CipherFinal_ex(ctx, dst, (int*)dlen))
+ if (EVP_CipherFinal_ex(ctx, dst, (int*)dlen) != 1)
return MY_AES_BAD_DATA;
return MY_AES_OK;
}
@@ -127,8 +147,11 @@ public:
uchar mask[MY_AES_BLOCK_SIZE];
uint mlen;
- my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD,
+ int rc= my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD,
oiv, sizeof(mask), mask, &mlen, key, klen, 0, 0);
+ DBUG_ASSERT(rc == MY_AES_OK);
+ if (rc)
+ return rc;
DBUG_ASSERT(mlen == sizeof(mask));
for (uint i=0; i < buf_len; i++)
diff --git a/mysys_ssl/my_md5.cc b/mysys_ssl/my_md5.cc
index 85490c1de77..407dee3bc69 100644
--- a/mysys_ssl/my_md5.cc
+++ b/mysys_ssl/my_md5.cc
@@ -27,26 +27,23 @@
#include <my_md5.h>
#include <stdarg.h>
-#if defined(HAVE_YASSL)
-#include "md5.hpp"
+#if defined(HAVE_WOLFSSL)
+#include <wolfssl/wolfcrypt/md5.h>
#include <ssl_compat.h>
-
-typedef TaoCrypt::MD5 EVP_MD_CTX;
-
+typedef wc_Md5 EVP_MD_CTX;
static void md5_init(EVP_MD_CTX *context)
{
- context= new(context) EVP_MD_CTX;
- context->Init();
+ wc_InitMd5(context);;
}
static void md5_input(EVP_MD_CTX *context, const uchar *buf, unsigned len)
{
- context->Update((const TaoCrypt::byte *) buf, len);
+ wc_Md5Update(context, buf, len);
}
static void md5_result(EVP_MD_CTX *context, uchar digest[MD5_HASH_SIZE])
{
- context->Final((TaoCrypt::byte *) digest);
+ wc_Md5Final(context,digest);
}
#elif defined(HAVE_OPENSSL)
@@ -74,7 +71,7 @@ static void md5_result(EVP_MD_CTX *context, uchar digest[MD5_HASH_SIZE])
EVP_MD_CTX_reset(context);
}
-#endif /* HAVE_YASSL */
+#endif /* HAVE_WOLFSSL */
/**
Wrapper function to compute MD5 message digest.
diff --git a/mysys_ssl/my_sha.inl b/mysys_ssl/my_sha.inl
index 97344dc0415..6bba614765e 100644
--- a/mysys_ssl/my_sha.inl
+++ b/mysys_ssl/my_sha.inl
@@ -28,35 +28,50 @@
#define HASH_SIZE (NUM > 1 ? NUM/8 : 20)
-#if defined(HAVE_YASSL)
-#include "sha.hpp"
-
-#define xCONTEXT(x) TaoCrypt::SHA ## x
+#if defined(HAVE_WOLFSSL)
+#define WOLFSSL_SHA512
+#define WOLFSSL_SHA384
+#define WOLFSSL_SHA224
+#include <wolfcrypt/sha.h>
+#include <wolfcrypt/sha256.h>
+#include <wolfcrypt/sha512.h>
+#define xCONTEXT(x) wc_Sha ## x
#define yCONTEXT(y) xCONTEXT(y)
#define CONTEXT yCONTEXT(NUM)
-#define SHA1 SHA
+#define wc_InitSha1 wc_InitSha
+#define wc_Sha1Final wc_ShaFinal
+#define wc_Sha1Update wc_ShaUpdate
+#define wc_Sha1 wc_Sha
+#define SHA224_CTX SHA256_CTX
+#define SHA384_CTX SHA512_CTX
+#define xSHA_Init(x) wc_InitSha ## x
+#define xSHA_Update(x) wc_Sha ## x ## Update
+#define xSHA_Final(x) wc_Sha ## x ## Final
+#define ySHA_Init(y) xSHA_Init(y)
+#define ySHA_Update(y) xSHA_Update(y)
+#define ySHA_Final(y) xSHA_Final(y)
+#define SHA_Init ySHA_Init(NUM)
+#define SHA_Update ySHA_Update(NUM)
+#define SHA_Final ySHA_Final(NUM)
static void sha_init(CONTEXT *context)
{
- context->Init();
+ SHA_Init(context);
}
-/*
- this is a variant of sha_init to be used in this file only.
- does nothing for yassl, because the context's constructor was called automatically.
-*/
static void sha_init_fast(CONTEXT *context)
{
+ sha_init(context);
}
static void sha_input(CONTEXT *context, const uchar *buf, unsigned len)
{
- context->Update((const TaoCrypt::byte *) buf, len);
+ SHA_Update(context, buf, len);
}
static void sha_result(CONTEXT *context, uchar digest[HASH_SIZE])
{
- context->Final((TaoCrypt::byte *) digest);
+ SHA_Final(context, digest);
}
#elif defined(HAVE_OPENSSL)
@@ -99,7 +114,7 @@ static void sha_result(CONTEXT *context, uchar digest[HASH_SIZE])
SHA_Final(digest, context);
}
-#endif /* HAVE_YASSL */
+#endif /* HAVE_WOLFSSL */
#define xmy_sha_multi(x) my_sha ## x ## _multi
#define xmy_sha_context_size(x) my_sha ## x ## _context_size
diff --git a/mysys_ssl/yassl.cc b/mysys_ssl/yassl.cc
deleted file mode 100644
index 96b6f6867fe..00000000000
--- a/mysys_ssl/yassl.cc
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- Copyright (c) 2015, 2017, 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 */
-
-/*
- The very minimal subset of OpenSSL's EVP* functions.
- Just enough for my_crypt.cc to work.
-
- On the other hand, where it has to implement OpenSSL functionality,
- it tries to be compatible (e.g. same flags and struct member names).
-*/
-
-#include <openssl/ssl.h>
-#include "aes.hpp"
-
-using yaSSL::yaERR_remove_state;
-using yaSSL::yaRAND_bytes;
-
-#define EVP_CIPH_ECB_MODE 0x1U
-#define EVP_CIPH_CBC_MODE 0x2U
-#define EVP_CIPH_NO_PADDING 0x100U
-
-/*
- note that TaoCrypt::AES object is not explicitly put into EVP_CIPHER_CTX.
- That's because we need to control when TaoCrypt::AES constructor and
- destructor are called.
-*/
-typedef struct
-{
- ulong flags;
- int encrypt;
- int key_len;
- int buf_len;
- int final_used;
- uchar tao_buf[sizeof(TaoCrypt::AES)]; // TaoCrypt::AES object
- uchar buf[TaoCrypt::AES::BLOCK_SIZE]; // last partial input block
- uchar final[TaoCrypt::AES::BLOCK_SIZE]; // last decrypted (output) block
-} EVP_CIPHER_CTX;
-
-typedef struct {
- TaoCrypt::Mode mode;
- TaoCrypt::word32 key_len;
-} EVP_CIPHER;
-
-#define gen_cipher(mode, MODE, len) \
- static const EVP_CIPHER *EVP_aes_ ## len ## _ ## mode() \
- { static const EVP_CIPHER c={TaoCrypt::MODE, len/8}; return &c; }
-
-gen_cipher(ecb,ECB,128)
-gen_cipher(ecb,ECB,192)
-gen_cipher(ecb,ECB,256)
-gen_cipher(cbc,CBC,128)
-gen_cipher(cbc,CBC,192)
-gen_cipher(cbc,CBC,256)
-
-static inline TaoCrypt::AES *TAO(EVP_CIPHER_CTX *ctx)
-{
- return (TaoCrypt::AES *)(ctx->tao_buf);
-}
-
-static void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
-{
- ctx->final_used= ctx->buf_len= ctx->flags= 0;
-}
-
-static int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *ctx)
-{
- TAO(ctx)->~AES();
- return 1;
-}
-
-static int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad)
-{
- if (pad)
- ctx->flags&= ~EVP_CIPH_NO_PADDING;
- else
- ctx->flags|= EVP_CIPH_NO_PADDING;
- return 1;
-}
-
-static int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
- void *, const uchar *key, const uchar *iv, int enc)
-{
- new (ctx->tao_buf) TaoCrypt::AES(enc ? TaoCrypt::ENCRYPTION
- : TaoCrypt::DECRYPTION, cipher->mode);
- TAO(ctx)->SetKey(key, cipher->key_len);
- if (iv)
- TAO(ctx)->SetIV(iv);
- ctx->encrypt= enc;
- ctx->key_len= cipher->key_len;
- ctx->flags|= cipher->mode == TaoCrypt::CBC ? EVP_CIPH_CBC_MODE : EVP_CIPH_ECB_MODE;
- return 1;
-}
-
-static int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx)
-{
- return ctx->key_len;
-}
-
-static int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx)
-{
- return ctx->flags & EVP_CIPH_ECB_MODE ? 0 : TaoCrypt::AES::BLOCK_SIZE;
-}
-
-static void do_whole_blocks(EVP_CIPHER_CTX *ctx, uchar *out, int *outl,
- const uchar *in, int inl)
-{
- DBUG_ASSERT(inl);
- DBUG_ASSERT(inl % TaoCrypt::AES::BLOCK_SIZE == 0);
- if (ctx->encrypt || (ctx->flags & EVP_CIPH_NO_PADDING))
- {
- TAO(ctx)->Process(out, in, inl);
- *outl+= inl;
- return;
- }
- /* 'final' is only needed when decrypting with padding */
- if (ctx->final_used)
- {
- memcpy(out, ctx->final, TaoCrypt::AES::BLOCK_SIZE);
- *outl+= TaoCrypt::AES::BLOCK_SIZE;
- out+= TaoCrypt::AES::BLOCK_SIZE;
- }
- inl-= TaoCrypt::AES::BLOCK_SIZE;
- TAO(ctx)->Process(out, in, inl);
- *outl+= inl;
- TAO(ctx)->Process(ctx->final, in + inl, TaoCrypt::AES::BLOCK_SIZE);
- ctx->final_used= 1;
-}
-
-static int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, uchar *out, int *outl,
- const uchar *in, int inl)
-{
- *outl= 0;
- if (ctx->buf_len)
- {
- int prefixl= TaoCrypt::AES::BLOCK_SIZE - ctx->buf_len;
- if (prefixl > inl)
- {
- memcpy(ctx->buf + ctx->buf_len, in, inl);
- ctx->buf_len+= inl;
- return 1;
- }
- memcpy(ctx->buf + ctx->buf_len, in, prefixl);
- do_whole_blocks(ctx, out, outl, ctx->buf, TaoCrypt::AES::BLOCK_SIZE);
- in+= prefixl;
- inl-= prefixl;
- out+= *outl;
- }
- ctx->buf_len= inl % TaoCrypt::AES::BLOCK_SIZE;
- inl-= ctx->buf_len;
- memcpy(ctx->buf, in + inl, ctx->buf_len);
- if (inl)
- do_whole_blocks(ctx, out, outl, in, inl);
- return 1;
-}
-
-static int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, uchar *out, int *outl)
-{
- if (ctx->flags & EVP_CIPH_NO_PADDING)
- return ctx->buf_len == 0;
-
- // PKCS#7 padding
- *outl= 0;
- if (ctx->encrypt)
- {
- int v= TaoCrypt::AES::BLOCK_SIZE - ctx->buf_len;
- memset(ctx->buf + ctx->buf_len, v, v);
- do_whole_blocks(ctx, out, outl, ctx->buf, TaoCrypt::AES::BLOCK_SIZE);
- return 1;
- }
- int n= ctx->final[TaoCrypt::AES::BLOCK_SIZE - 1];
- if (ctx->buf_len || !ctx->final_used ||
- n < 1 || n > TaoCrypt::AES::BLOCK_SIZE)
- return 0;
- *outl= TaoCrypt::AES::BLOCK_SIZE - n;
- memcpy(out, ctx->final, *outl);
- return 1;
-}
-
diff --git a/plugin/auth_ed25519/CMakeLists.txt b/plugin/auth_ed25519/CMakeLists.txt
index 1a3d5cc4bce..1033dc053c8 100644
--- a/plugin/auth_ed25519/CMakeLists.txt
+++ b/plugin/auth_ed25519/CMakeLists.txt
@@ -19,6 +19,10 @@ IF(MSVC)
SET_SOURCE_FILES_PROPERTIES(${REF10_SOURCES} PROPERTY COMPILE_FLAGS "/wd4244 /wd4146")
ENDIF()
+IF(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION LESS 11 AND CMAKE_C_COMPILER_VERSION GREATER 6)
+ SET_SOURCE_FILES_PROPERTIES(${REF10_SOURCES} PROPERTY COMPILE_FLAGS -fno-sanitize=shift)
+ENDIF()
+
# server plugin *cannot* link with the library, it needs all sources to be
# compiled with MYSQL_DYNAMIC_PLUGIN
MYSQL_ADD_PLUGIN(auth_ed25519 server_ed25519.c ${REF10_SOURCES} MODULE_ONLY)
diff --git a/plugin/auth_ed25519/server_ed25519.c b/plugin/auth_ed25519/server_ed25519.c
index e9678450042..b789bd34ca4 100644
--- a/plugin/auth_ed25519/server_ed25519.c
+++ b/plugin/auth_ed25519/server_ed25519.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2017, MariaDB
+ Copyright (c) 2017, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,6 +15,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#include <mysql/plugin_auth.h>
+#include <mysqld_error.h>
#include "common.h"
#if !defined(__attribute__) && !defined(__GNUC__)
@@ -36,16 +37,6 @@ static int auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
int pkt_len;
unsigned long nonce[CRYPTO_LONGS + NONCE_LONGS];
unsigned char *pkt, *reply= (unsigned char*)nonce;
- unsigned char pk[PASSWORD_LEN_BUF/4*3];
- char pw[PASSWORD_LEN_BUF];
-
- /* prepare the pk */
- if (info->auth_string_length != PASSWORD_LEN)
- return CR_ERROR; // bad password in the user table
- memcpy(pw, info->auth_string, PASSWORD_LEN);
- pw[PASSWORD_LEN]= '=';
- if (my_base64_decode(pw, PASSWORD_LEN_BUF, pk, NULL, 0) != CRYPTO_PUBLICKEYBYTES)
- return CR_ERROR; // bad password in the user table
info->password_used= PASSWORD_USED_YES;
@@ -62,17 +53,52 @@ static int auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
return CR_AUTH_HANDSHAKE;
memcpy(reply, pkt, CRYPTO_BYTES);
- if (crypto_sign_open(reply, CRYPTO_BYTES + NONCE_BYTES, pk))
+ if (crypto_sign_open(reply, CRYPTO_BYTES + NONCE_BYTES,
+ (unsigned char*)info->auth_string))
return CR_AUTH_USER_CREDENTIALS; // wrong password provided by the user
return CR_OK;
}
+static int compute_password_digest(const char *pw, size_t pwlen,
+ char *d, size_t *dlen)
+{
+ unsigned char pk[CRYPTO_PUBLICKEYBYTES];
+ if (*dlen < PASSWORD_LEN || pwlen == 0)
+ return 1;
+ *dlen= PASSWORD_LEN;
+ crypto_sign_keypair(pk, (unsigned char*)pw, pwlen);
+ my_base64_encode(pk, CRYPTO_PUBLICKEYBYTES, d);
+ return 0;
+}
+
+static int digest_to_binary(const char *d, size_t dlen,
+ unsigned char *b, size_t *blen)
+{
+ char pw[PASSWORD_LEN_BUF];
+
+ if (*blen < CRYPTO_PUBLICKEYBYTES || dlen != PASSWORD_LEN)
+ {
+ my_printf_error(ER_PASSWD_LENGTH, "Password hash should be %d characters long", 0, PASSWORD_LEN);
+ return 1;
+ }
+
+ *blen= CRYPTO_PUBLICKEYBYTES;
+ memcpy(pw, d, PASSWORD_LEN);
+ pw[PASSWORD_LEN]= '=';
+ if (my_base64_decode(pw, PASSWORD_LEN_BUF, b, 0, 0) == CRYPTO_PUBLICKEYBYTES)
+ return 0;
+ my_printf_error(ER_PASSWD_LENGTH, "Password hash should be base64 encoded", 0);
+ return 1;
+}
+
static struct st_mysql_auth info =
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"client_ed25519",
- auth
+ auth,
+ compute_password_digest,
+ digest_to_binary
};
static int init(void *p __attribute__((unused)))
@@ -97,10 +123,10 @@ maria_declare_plugin(ed25519)
PLUGIN_LICENSE_GPL,
init,
deinit,
- 0x0100,
+ 0x0101,
NULL,
NULL,
- "1.0",
+ "1.1",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/plugin/auth_examples/dialog_examples.c b/plugin/auth_examples/dialog_examples.c
index 096dc3fca08..834c028ce84 100644
--- a/plugin/auth_examples/dialog_examples.c
+++ b/plugin/auth_examples/dialog_examples.c
@@ -81,7 +81,8 @@ static struct st_mysql_auth two_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"dialog", /* requires dialog client plugin */
- two_questions
+ two_questions,
+ NULL, NULL /* no PASSWORD() */
};
/* dialog demo where the number of questions is not known in advance */
@@ -118,7 +119,8 @@ static struct st_mysql_auth three_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"dialog", /* requires dialog client plugin */
- three_attempts
+ three_attempts,
+ NULL, NULL /* no PASSWORD() */
};
mysql_declare_plugin(dialog)
diff --git a/plugin/auth_examples/qa_auth_interface.c b/plugin/auth_examples/qa_auth_interface.c
index a6a7b8456b6..ad1f6fff1b6 100644
--- a/plugin/auth_examples/qa_auth_interface.c
+++ b/plugin/auth_examples/qa_auth_interface.c
@@ -136,7 +136,8 @@ static struct st_mysql_auth qa_auth_test_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"qa_auth_interface", /* requires test_plugin client's plugin */
- qa_auth_interface
+ qa_auth_interface,
+ NULL, NULL /* no PASSWORD() */
};
mysql_declare_plugin(test_plugin)
diff --git a/plugin/auth_examples/qa_auth_server.c b/plugin/auth_examples/qa_auth_server.c
index ff4d957a0a8..67b29d26ee8 100644
--- a/plugin/auth_examples/qa_auth_server.c
+++ b/plugin/auth_examples/qa_auth_server.c
@@ -56,7 +56,8 @@ static struct st_mysql_auth qa_auth_test_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"qa_auth_interface", /* requires test_plugin client's plugin */
- qa_auth_interface
+ qa_auth_interface,
+ NULL, NULL /* no PASSWORD() */
};
mysql_declare_plugin(test_plugin)
diff --git a/plugin/auth_examples/test_plugin.c b/plugin/auth_examples/test_plugin.c
index 4e3ebf74112..04405a1ccb6 100644
--- a/plugin/auth_examples/test_plugin.c
+++ b/plugin/auth_examples/test_plugin.c
@@ -69,7 +69,8 @@ static struct st_mysql_auth auth_test_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"auth_test_plugin", /* requires test_plugin client's plugin */
- auth_test_plugin
+ auth_test_plugin,
+ NULL, NULL /* no PASSWORD() */
};
/**
@@ -99,7 +100,8 @@ static struct st_mysql_auth auth_cleartext_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"mysql_clear_password", /* requires the clear text plugin */
- auth_cleartext_plugin
+ auth_cleartext_plugin,
+ NULL, NULL /* no PASSWORD() */
};
mysql_declare_plugin(test_plugin)
diff --git a/plugin/auth_gssapi/CMakeLists.txt b/plugin/auth_gssapi/CMakeLists.txt
index 1110562d9f1..3ac89404302 100644
--- a/plugin/auth_gssapi/CMakeLists.txt
+++ b/plugin/auth_gssapi/CMakeLists.txt
@@ -25,7 +25,7 @@ ELSE()
SET(GSSAPI_SERVER gssapi_server.cc)
SET(GSSAPI_ERRMSG gssapi_errmsg.cc)
- IF(APPLE)
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET_SOURCE_FILES_PROPERTIES(
${GSSAPI_CLIENT} ${GSSAPI_SERVER} ${GSSAPI_ERRMSG}
PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations")
diff --git a/plugin/auth_gssapi/gssapi_server.cc b/plugin/auth_gssapi/gssapi_server.cc
index 6a1363854ae..1d3cbb7a130 100644
--- a/plugin/auth_gssapi/gssapi_server.cc
+++ b/plugin/auth_gssapi/gssapi_server.cc
@@ -145,7 +145,7 @@ int plugin_deinit()
}
-int auth_server(MYSQL_PLUGIN_VIO *vio,const char *user, size_t userlen, int use_full_name)
+int auth_server(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *auth_info)
{
int rc= CR_ERROR; /* return code */
@@ -157,6 +157,9 @@ int auth_server(MYSQL_PLUGIN_VIO *vio,const char *user, size_t userlen, int use_
gss_name_t client_name;
gss_buffer_desc client_name_buf, input, output;
char *client_name_str;
+ const char *user= 0;
+ size_t userlen;
+ int use_full_name;
/* server acquires credential */
major= gss_acquire_cred(&minor, service_name, GSS_C_INDEFINITE,
@@ -180,6 +183,21 @@ int auth_server(MYSQL_PLUGIN_VIO *vio,const char *user, size_t userlen, int use_
log_error(0, 0, "fail to read token from client");
goto cleanup;
}
+ if (!user)
+ {
+ if (auth_info->auth_string_length > 0)
+ {
+ use_full_name= 1;
+ user= auth_info->auth_string;
+ userlen= auth_info->auth_string_length;
+ }
+ else
+ {
+ use_full_name= 0;
+ user= auth_info->user_name;
+ userlen= auth_info->user_name_length;
+ }
+ }
input.length= len;
major= gss_accept_sec_context(&minor, &ctxt, cred, &input,
diff --git a/plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.result b/plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.result
new file mode 100644
index 00000000000..c65eb7a8634
--- /dev/null
+++ b/plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.result
@@ -0,0 +1,34 @@
+INSTALL SONAME 'auth_gssapi';
+Warnings:
+Note 1105 SSPI: using principal name 'localhost', mech 'Negotiate'
+CREATE USER 'nosuchuser' IDENTIFIED WITH gssapi OR mysql_native_password as password("good");
+connect(localhost,nosuchuser,,test,MASTER_MYPORT,MASTER_MYSOCK);
+connect con1,localhost,nosuchuser,,;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost' (using password: NO)
+connect con1,localhost,nosuchuser,good,;
+SELECT USER(),CURRENT_USER();
+USER() CURRENT_USER()
+nosuchuser@localhost nosuchuser@%
+disconnect con1;
+connection default;
+DROP USER nosuchuser;
+CREATE USER 'nosuchuser' IDENTIFIED WITH mysql_native_password as password("good") OR gssapi;
+connect(localhost,nosuchuser,,test,MASTER_MYPORT,MASTER_MYSOCK);
+connect con1,localhost,nosuchuser,,;
+ERROR 28000: GSSAPI name mismatch, requested 'nosuchuser', actual name 'GSSAPI_SHORTNAME'
+connect con1,localhost,nosuchuser,good,;
+SELECT USER(),CURRENT_USER();
+USER() CURRENT_USER()
+nosuchuser@localhost nosuchuser@%
+disconnect con1;
+connection default;
+DROP USER nosuchuser;
+CREATE USER 'GSSAPI_SHORTNAME' IDENTIFIED WITH mysql_native_password as password("good") OR gssapi;
+connect con1,localhost,$GSSAPI_SHORTNAME,,;
+SELECT USER(),CURRENT_USER();
+USER() CURRENT_USER()
+GSSAPI_SHORTNAME@localhost GSSAPI_SHORTNAME@%
+disconnect con1;
+connection default;
+DROP USER 'GSSAPI_SHORTNAME';
+UNINSTALL SONAME 'auth_gssapi';
diff --git a/plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.test b/plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.test
new file mode 100644
index 00000000000..10e1e80907e
--- /dev/null
+++ b/plugin/auth_gssapi/mysql-test/auth_gssapi/multiauth.test
@@ -0,0 +1,36 @@
+--replace_regex /name '[^']+'/name 'localhost'/
+INSTALL SONAME 'auth_gssapi';
+
+# gssapi,password
+CREATE USER 'nosuchuser' IDENTIFIED WITH gssapi OR mysql_native_password as password("good");
+replace_result $MASTER_MYSOCK MASTER_MYSOCK $MASTER_MYPORT MASTER_MYPORT;
+error ER_ACCESS_DENIED_ERROR;
+connect (con1,localhost,nosuchuser,,);
+connect (con1,localhost,nosuchuser,good,);
+SELECT USER(),CURRENT_USER();
+disconnect con1;
+connection default;
+DROP USER nosuchuser;
+
+# password,gssapi
+CREATE USER 'nosuchuser' IDENTIFIED WITH mysql_native_password as password("good") OR gssapi;
+replace_result $MASTER_MYSOCK MASTER_MYSOCK $MASTER_MYPORT MASTER_MYPORT $GSSAPI_SHORTNAME GSSAPI_SHORTNAME;
+error ER_ACCESS_DENIED_ERROR;
+connect (con1,localhost,nosuchuser,,);
+connect (con1,localhost,nosuchuser,good,);
+SELECT USER(),CURRENT_USER();
+disconnect con1;
+connection default;
+DROP USER nosuchuser;
+
+replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME;
+eval CREATE USER '$GSSAPI_SHORTNAME' IDENTIFIED WITH mysql_native_password as password("good") OR gssapi;
+connect (con1,localhost,$GSSAPI_SHORTNAME,,);
+replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME;
+SELECT USER(),CURRENT_USER();
+disconnect con1;
+connection default;
+replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME;
+eval DROP USER '$GSSAPI_SHORTNAME';
+
+UNINSTALL SONAME 'auth_gssapi';
diff --git a/plugin/auth_gssapi/server_plugin.cc b/plugin/auth_gssapi/server_plugin.cc
index 5db86cffbe4..bce6a812d12 100644
--- a/plugin/auth_gssapi/server_plugin.cc
+++ b/plugin/auth_gssapi/server_plugin.cc
@@ -64,41 +64,11 @@ unsigned long srv_mech;
*/
static int gssapi_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *auth_info)
{
- int use_full_name;
- const char *user;
- int user_len;
-
- /* No user name yet ? Read the client handshake packet with the user name. */
- if (auth_info->user_name == 0)
- {
- unsigned char *pkt;
- if (vio->read_packet(vio, &pkt) < 0)
- return CR_ERROR;
- }
-
/* Send first packet with target name and mech name */
if (vio->write_packet(vio, (unsigned char *)first_packet, first_packet_len))
- {
return CR_ERROR;
- }
-
- /* Figure out whether to use full name (as given in IDENTIFIED AS clause)
- * or just short username auth_string
- */
- if (auth_info->auth_string_length > 0)
- {
- use_full_name= 1;
- user= auth_info->auth_string;
- user_len= auth_info->auth_string_length;
- }
- else
- {
- use_full_name= 0;
- user= auth_info->user_name;
- user_len= auth_info->user_name_length;
- }
-
- return auth_server(vio, user, user_len, use_full_name);
+
+ return auth_server(vio, auth_info);
}
static int initialize_plugin(void *unused)
@@ -169,7 +139,7 @@ static struct st_mysql_sys_var *system_variables[]= {
static struct st_mysql_auth server_handler= {
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
"auth_gssapi_client",
- gssapi_auth
+ gssapi_auth, NULL, NULL
};
maria_declare_plugin(gssapi_server)
diff --git a/plugin/auth_gssapi/server_plugin.h b/plugin/auth_gssapi/server_plugin.h
index 6284a319d03..84552d3a263 100644
--- a/plugin/auth_gssapi/server_plugin.h
+++ b/plugin/auth_gssapi/server_plugin.h
@@ -48,4 +48,4 @@ extern char *srv_keytab_path;
int plugin_init();
int plugin_deinit();
-int auth_server(MYSQL_PLUGIN_VIO *vio, const char *username, size_t username_len, int use_full_name);
+int auth_server(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *auth_info);
diff --git a/plugin/auth_gssapi/sspi_server.cc b/plugin/auth_gssapi/sspi_server.cc
index af78829df6e..44aa5051472 100644
--- a/plugin/auth_gssapi/sspi_server.cc
+++ b/plugin/auth_gssapi/sspi_server.cc
@@ -140,7 +140,7 @@ static int get_client_name_from_context(CtxtHandle *ctxt,
}
-int auth_server(MYSQL_PLUGIN_VIO *vio, const char *user, size_t user_len, int compare_full_name)
+int auth_server(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *auth_info)
{
int ret;
SECURITY_STATUS sspi_ret;
@@ -155,6 +155,8 @@ int auth_server(MYSQL_PLUGIN_VIO *vio, const char *user, size_t user_len, int co
SecBuffer outbuf;
void* out= NULL;
char client_name[MYSQL_USERNAME_LENGTH + 1];
+ const char *user= 0;
+ int compare_full_name;
ret= CR_ERROR;
SecInvalidateHandle(&cred);
@@ -207,6 +209,19 @@ int auth_server(MYSQL_PLUGIN_VIO *vio, const char *user, size_t user_len, int co
log_error(SEC_E_OK, "communication error(read)");
goto cleanup;
}
+ if (!user)
+ {
+ if (auth_info->auth_string_length > 0)
+ {
+ compare_full_name= 1;
+ user= auth_info->auth_string;
+ }
+ else
+ {
+ compare_full_name= 0;
+ user= auth_info->user_name;
+ }
+ }
inbuf.cbBuffer= len;
outbuf.cbBuffer= SSPI_MAX_TOKEN_SIZE;
sspi_ret= AcceptSecurityContext(
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index 9fc5a1e3746..6d2dc72b097 100644
--- a/plugin/auth_pam/CMakeLists.txt
+++ b/plugin/auth_pam/CMakeLists.txt
@@ -36,16 +36,26 @@ SET(CMAKE_REQUIRED_LIBRARIES)
IF(HAVE_PAM_APPL_H AND HAVE_GETGROUPLIST)
FIND_LIBRARY(PAM_LIBRARY pam) # for srpm build-depends detection
- MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
-
- IF(TARGET auth_pam)
+ ADD_DEFINITIONS(-D_GNU_SOURCE)
+ MYSQL_ADD_PLUGIN(auth_pam_v1 auth_pam_v1.c LINK_LIBRARIES pam MODULE_ONLY)
+ MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam ${CMAKE_DL_LIBS} MODULE_ONLY)
+ IF (TARGET auth_pam)
+ MYSQL_ADD_EXECUTABLE(auth_pam_tool auth_pam_tool.c DESTINATION ${INSTALL_PLUGINDIR}/auth_pam_tool_dir COMPONENT Server)
+ TARGET_LINK_LIBRARIES(auth_pam_tool pam)
+ SET(CPACK_RPM_server_USER_FILELIST ${CPACK_RPM_server_USER_FILELIST}
+ "%attr(700,-,-) ${INSTALL_PLUGINDIRABS}/auth_pam_tool_dir"
+ "%attr(4755,-,-) ${INSTALL_PLUGINDIRABS}/auth_pam_tool_dir/auth_pam_tool")
+ SET(CPACK_RPM_server_USER_FILELIST ${CPACK_RPM_server_USER_FILELIST} PARENT_SCOPE)
+ ENDIF()
+ IF(TARGET auth_pam OR TARGET auth_pam_v1)
+ ADD_SUBDIRECTORY(testing)
ADD_LIBRARY(pam_user_map MODULE mapper/pam_user_map.c)
TARGET_LINK_LIBRARIES(pam_user_map pam)
SET_TARGET_PROPERTIES (pam_user_map PROPERTIES PREFIX "")
IF(INSTALL_PAMDIR)
INSTALL(TARGETS pam_user_map DESTINATION ${INSTALL_PAMDIR} COMPONENT Server)
INSTALL(FILES mapper/user_map.conf DESTINATION ${INSTALL_PAMDATADIR} COMPONENT Server)
- SET(CPACK_RPM_server_USER_FILELIST ${CPACK_RPM_server_USER_FILELIST} "%config(noreplace) ${INSTALL_PAMDATADIR}/*" PARENT_SCOPE)
+ SET(CPACK_RPM_server_USER_FILELIST ${CPACK_RPM_server_USER_FILELIST} "%config(noreplace) ${INSTALL_PAMDATADIRABS}/*" PARENT_SCOPE)
ENDIF()
ENDIF()
ENDIF()
diff --git a/plugin/auth_pam/auth_pam.c b/plugin/auth_pam/auth_pam.c
index c80ec51b48d..d232b3b5c65 100644
--- a/plugin/auth_pam/auth_pam.c
+++ b/plugin/auth_pam/auth_pam.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2011, 2019, MariaDB Corporation.
+ Copyright (c) 2011, 2020, 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
@@ -12,39 +12,18 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
-#define _GNU_SOURCE 1 /* for strndup */
#include <config_auth_pam.h>
-#include <mysql/plugin_auth.h>
-#include <stdio.h>
+#include <unistd.h>
#include <string.h>
-#include <security/pam_appl.h>
-#include <security/pam_modules.h>
-
-struct param {
- unsigned char buf[10240], *ptr;
- MYSQL_PLUGIN_VIO *vio;
-};
-
-/* It least solaris doesn't have strndup */
-
-#ifndef HAVE_STRNDUP
-char *strndup(const char *from, size_t length)
-{
- char *ptr;
- size_t max_length= strlen(from);
- if (length > max_length)
- length= max_length;
- if ((ptr= (char*) malloc(length+1)) != 0)
- {
- memcpy((char*) ptr, (char*) from, length);
- ptr[length]=0;
- }
- return ptr;
-}
-#endif
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <spawn.h>
+#include <mysql/plugin_auth.h>
+#include "auth_pam_tool.h"
+#include <my_global.h>
#ifndef DBUG_OFF
static char pam_debug = 0;
@@ -55,164 +34,191 @@ static char pam_debug = 0;
static char winbind_hack = 0;
-static int conv(int n, const struct pam_message **msg,
- struct pam_response **resp, void *data)
+static char *opt_plugin_dir; /* To be dynamically linked. */
+static const char *tool_name= "auth_pam_tool_dir/auth_pam_tool";
+static const int tool_name_len= 31;
+
+/*
+ sleep_limit is now 5 meaning up to 1 second sleep.
+ each step means 10 times longer sleep, so 6 would mean 10 seconds.
+*/
+static const unsigned int sleep_limit= 5;
+
+static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
{
- struct param *param = (struct param *)data;
- unsigned char *end = param->buf + sizeof(param->buf) - 1;
- int i;
+ int p_to_c[2], c_to_p[2]; /* Parent-to-child and child-to-parent pipes. */
+ pid_t proc_id;
+ int result= CR_ERROR, pkt_len= 0;
+ unsigned char field, *pkt;
+ unsigned int n_sleep= 0;
+ useconds_t sleep_time= 100;
+ posix_spawn_file_actions_t file_actions;
+ char toolpath[FN_REFLEN];
+ size_t plugin_dir_len= strlen(opt_plugin_dir);
+ char *const argv[2]= {toolpath, 0};
+ int res;
+
+ PAM_DEBUG((stderr, "PAM: opening pipes.\n"));
+ if (pipe(p_to_c) < 0 || pipe(c_to_p) < 0)
+ {
+ my_printf_error(ENOEXEC, "pam: cannot create pipes (errno: %M)",
+ ME_ERROR_LOG_ONLY, errno);
+ return CR_ERROR;
+ }
+
+ if (plugin_dir_len + tool_name_len + 2 > sizeof(toolpath))
+ {
+ my_printf_error(ENOEXEC, "pam: too long path to <plugindir>/%s",
+ ME_ERROR_LOG_ONLY, tool_name);
+ return CR_ERROR;
+ }
+
+ memcpy(toolpath, opt_plugin_dir, plugin_dir_len);
+ if (plugin_dir_len && toolpath[plugin_dir_len-1] != FN_LIBCHAR)
+ toolpath[plugin_dir_len++]= FN_LIBCHAR;
+ memcpy(toolpath+plugin_dir_len, tool_name, tool_name_len+1);
+
+ PAM_DEBUG((stderr, "PAM: forking %s\n", toolpath));
+ res= posix_spawn_file_actions_init(&file_actions) ||
+ posix_spawn_file_actions_addclose(&file_actions, p_to_c[1]) ||
+ posix_spawn_file_actions_addclose(&file_actions, c_to_p[0]) ||
+ posix_spawn_file_actions_adddup2(&file_actions, p_to_c[0], 0) ||
+ posix_spawn_file_actions_adddup2(&file_actions, c_to_p[1], 1) ||
+ posix_spawn(&proc_id, toolpath, &file_actions, NULL, argv, NULL);
+
+ /* Parent process continues. */
+ posix_spawn_file_actions_destroy(&file_actions);
+ close(p_to_c[0]);
+ close(c_to_p[1]);
+
+ if (res)
+ {
+ my_printf_error(ENOEXEC, "pam: cannot exec %s (errno: %M)",
+ ME_ERROR_LOG_ONLY, toolpath, errno);
+ goto error_ret;
+ }
+
+ /* no user name yet ? read the client handshake packet with the user name */
+ if (info->user_name == 0)
+ {
+ if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
+ goto error_ret;
+ }
+ else
+ pkt= NULL;
+
+ PAM_DEBUG((stderr, "PAM: parent sends user data [%s], [%s].\n",
+ info->user_name, info->auth_string));
+
+#ifndef DBUG_OFF
+ field= pam_debug ? 1 : 0;
+#else
+ field= 0;
+#endif
+ field|= winbind_hack ? 2 : 0;
- *resp = 0;
+ if (write(p_to_c[1], &field, 1) != 1 ||
+ write_string(p_to_c[1], (const uchar *) info->user_name,
+ info->user_name_length) ||
+ write_string(p_to_c[1], (const uchar *) info->auth_string,
+ info->auth_string_length))
+ goto error_ret;
- for (i = 0; i < n; i++)
+ for (;;)
{
- /* if there's a message - append it to the buffer */
- if (msg[i]->msg)
+ PAM_DEBUG((stderr, "PAM: listening to the sandbox.\n"));
+ if (read(c_to_p[0], &field, 1) < 1)
{
- int len = strlen(msg[i]->msg);
- if (len > end - param->ptr)
- len = end - param->ptr;
- if (len > 0)
- {
- memcpy(param->ptr, msg[i]->msg, len);
- param->ptr+= len;
- *(param->ptr)++ = '\n';
- }
+ PAM_DEBUG((stderr, "PAM: read failed.\n"));
+ goto error_ret;
}
- /* if the message style is *_PROMPT_*, meaning PAM asks a question,
- send the accumulated text to the client, read the reply */
- if (msg[i]->msg_style == PAM_PROMPT_ECHO_OFF ||
- msg[i]->msg_style == PAM_PROMPT_ECHO_ON)
+
+ if (field == AP_EOF)
{
- int pkt_len;
- unsigned char *pkt;
+ PAM_DEBUG((stderr, "PAM: auth OK returned.\n"));
+ break;
+ }
- /* allocate the response array.
- freeing it is the responsibility of the caller */
- if (*resp == 0)
+ switch (field)
+ {
+ case AP_AUTHENTICATED_AS:
+ PAM_DEBUG((stderr, "PAM: reading authenticated_as string.\n"));
+ if (read_string(c_to_p[0], info->authenticated_as,
+ sizeof(info->authenticated_as) - 1) < 0)
+ goto error_ret;
+ break;
+
+ case AP_CONV:
{
- *resp = calloc(sizeof(struct pam_response), n);
- if (*resp == 0)
- return PAM_BUF_ERR;
- }
+ unsigned char buf[10240];
+ int buf_len;
- /* dialog plugin interprets the first byte of the packet
- as the magic number.
- 2 means "read the input with the echo enabled"
- 4 means "password-like input, echo disabled"
- C'est la vie. */
- param->buf[0] = msg[i]->msg_style == PAM_PROMPT_ECHO_ON ? 2 : 4;
- PAM_DEBUG((stderr, "PAM: conv: send(%.*s)\n", (int)(param->ptr - param->buf - 1), param->buf));
- if (param->vio->write_packet(param->vio, param->buf, param->ptr - param->buf - 1))
- return PAM_CONV_ERR;
-
- pkt_len = param->vio->read_packet(param->vio, &pkt);
- if (pkt_len < 0)
- {
- PAM_DEBUG((stderr, "PAM: conv: recv() ERROR\n"));
- return PAM_CONV_ERR;
+ PAM_DEBUG((stderr, "PAM: getting CONV string.\n"));
+ if ((buf_len= read_string(c_to_p[0], (char *) buf, sizeof(buf))) < 0)
+ goto error_ret;
+
+ if (!pkt || !*pkt || (buf[0] >> 1) != 2)
+ {
+ PAM_DEBUG((stderr, "PAM: sending CONV string.\n"));
+ if (vio->write_packet(vio, buf, buf_len))
+ goto error_ret;
+
+ PAM_DEBUG((stderr, "PAM: reading CONV answer.\n"));
+ if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
+ goto error_ret;
+ }
+
+ PAM_DEBUG((stderr, "PAM: answering CONV.\n"));
+ if (write_string(p_to_c[1], pkt, pkt_len))
+ goto error_ret;
+
+ pkt= NULL;
}
- PAM_DEBUG((stderr, "PAM: conv: recv(%.*s)\n", pkt_len, pkt));
- /* allocate and copy the reply to the response array */
- if (!((*resp)[i].resp= strndup((char*) pkt, pkt_len)))
- return PAM_CONV_ERR;
- param->ptr = param->buf + 1;
+ break;
+
+ default:
+ PAM_DEBUG((stderr, "PAM: unknown sandbox field.\n"));
+ goto error_ret;
}
}
- return PAM_SUCCESS;
-}
-
-#define DO(X) if ((status = (X)) != PAM_SUCCESS) goto end
+ result= CR_OK;
-#if defined(SOLARIS) || defined(__sun)
-typedef void** pam_get_item_3_arg;
-#else
-typedef const void** pam_get_item_3_arg;
-#endif
+error_ret:
+ close(p_to_c[1]);
+ close(c_to_p[0]);
+ while (waitpid(proc_id, NULL, WNOHANG) != (int) proc_id)
+ {
+ if (n_sleep++ == sleep_limit)
+ {
+ /*
+ The auth_pam_tool application doesn't terminate.
+ Means something wrong happened there like pam_xxx.so hanged.
+ */
+ kill(proc_id, SIGKILL);
+ sleep_time= 1000000; /* 1 second wait should be enough. */
+ PAM_DEBUG((stderr, "PAM: auth_pam_tool doesn't terminate,"
+ " have to kill it.\n"));
+ }
+ else if (n_sleep > sleep_limit)
+ break;
+ usleep(sleep_time);
+ sleep_time*= 10;
+ }
-static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
-{
- pam_handle_t *pamh = NULL;
- int status;
- const char *new_username= NULL;
- struct param param;
- /* The following is written in such a way to make also solaris happy */
- struct pam_conv pam_start_arg = { &conv, (char*) &param };
-
- /*
- get the service name, as specified in
-
- CREATE USER ... IDENTIFIED WITH pam AS "service"
- */
- const char *service = info->auth_string && info->auth_string[0]
- ? info->auth_string : "mysql";
-
- param.ptr = param.buf + 1;
- param.vio = vio;
-
- PAM_DEBUG((stderr, "PAM: pam_start(%s, %s)\n", service, info->user_name));
- DO( pam_start(service, info->user_name, &pam_start_arg, &pamh) );
-
- PAM_DEBUG((stderr, "PAM: pam_authenticate(0)\n"));
- DO( pam_authenticate (pamh, 0) );
-
- PAM_DEBUG((stderr, "PAM: pam_acct_mgmt(0)\n"));
- DO( pam_acct_mgmt(pamh, 0) );
-
- PAM_DEBUG((stderr, "PAM: pam_get_item(PAM_USER)\n"));
- DO( pam_get_item(pamh, PAM_USER, (pam_get_item_3_arg) &new_username) );
-
- if (new_username &&
- (winbind_hack ? strcasecmp : strcmp)(new_username, info->user_name))
- strncpy(info->authenticated_as, new_username,
- sizeof(info->authenticated_as)-1);
- info->authenticated_as[sizeof(info->authenticated_as)-1]= 0;
-
-end:
- pam_end(pamh, status);
- PAM_DEBUG((stderr, "PAM: status = %d user = %s\n", status, info->authenticated_as));
- return status == PAM_SUCCESS ? CR_OK : CR_ERROR;
+ PAM_DEBUG((stderr, "PAM: auth result %d.\n", result));
+ return result;
}
-static struct st_mysql_auth info =
-{
- MYSQL_AUTHENTICATION_INTERFACE_VERSION,
- "dialog",
- pam_auth
-};
-
-static char use_cleartext_plugin;
-static MYSQL_SYSVAR_BOOL(use_cleartext_plugin, use_cleartext_plugin,
- PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
- "Use mysql_cleartext_plugin on the client side instead of the dialog "
- "plugin. This may be needed for compatibility reasons, but it only "
- "supports simple PAM policies that don't require anything besides "
- "a password", NULL, NULL, 0);
-
-static MYSQL_SYSVAR_BOOL(winbind_workaround, winbind_hack, PLUGIN_VAR_OPCMDARG,
- "Compare usernames case insensitively to work around pam_winbind "
- "unconditional username lowercasing", NULL, NULL, 0);
-
-#ifndef DBUG_OFF
-static MYSQL_SYSVAR_BOOL(debug, pam_debug, PLUGIN_VAR_OPCMDARG,
- "Log all PAM activity", NULL, NULL, 0);
-#endif
-
-static struct st_mysql_sys_var* vars[] = {
- MYSQL_SYSVAR(use_cleartext_plugin),
- MYSQL_SYSVAR(winbind_workaround),
-#ifndef DBUG_OFF
- MYSQL_SYSVAR(debug),
-#endif
- NULL
-};
+#include "auth_pam_common.c"
static int init(void *p __attribute__((unused)))
{
if (use_cleartext_plugin)
info.client_auth_plugin= "mysql_clear_password";
+ if (!(opt_plugin_dir= dlsym(RTLD_DEFAULT, "opt_plugin_dir")))
+ return 1;
return 0;
}
@@ -221,15 +227,15 @@ maria_declare_plugin(pam)
MYSQL_AUTHENTICATION_PLUGIN,
&info,
"pam",
- "Sergei Golubchik",
+ "MariaDB Corp",
"PAM based authentication",
PLUGIN_LICENSE_GPL,
init,
NULL,
- 0x0100,
+ 0x0200,
NULL,
vars,
- "1.0",
+ "2.0",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/plugin/auth_pam/auth_pam_base.c b/plugin/auth_pam/auth_pam_base.c
new file mode 100644
index 00000000000..1e8f4a08def
--- /dev/null
+++ b/plugin/auth_pam/auth_pam_base.c
@@ -0,0 +1,179 @@
+/*
+ Copyright (c) 2011, 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+/*
+ This file contains code to interact with the PAM module.
+ To be included into auth_pam_tool.c and auth_pam_v2.c,
+
+ Before the #include these sould be defined:
+
+ struct param {
+ unsigned char buf[10240], *ptr;
+ MYSQL_PLUGIN_VIO *vio;
+ ... other arbitrary fields allowed.
+ };
+ static int write_packet(struct param *param, const unsigned char *buf,
+ int buf_len)
+ static int read_packet(struct param *param, unsigned char **pkt)
+*/
+
+#include <config_auth_pam.h>
+#include <stdio.h>
+#include <string.h>
+#include <security/pam_appl.h>
+#include <security/pam_modules.h>
+
+/* It least solaris doesn't have strndup */
+
+#ifndef HAVE_STRNDUP
+char *strndup(const char *from, size_t length)
+{
+ char *ptr;
+ size_t max_length= strlen(from);
+ if (length > max_length)
+ length= max_length;
+ if ((ptr= (char*) malloc(length+1)) != 0)
+ {
+ memcpy((char*) ptr, (char*) from, length);
+ ptr[length]=0;
+ }
+ return ptr;
+}
+#endif
+
+#ifndef DBUG_OFF
+static char pam_debug = 0;
+#define PAM_DEBUG(X) do { if (pam_debug) { fprintf X; } } while(0)
+#else
+#define PAM_DEBUG(X) /* no-op */
+#endif
+
+static char winbind_hack = 0;
+
+static int conv(int n, const struct pam_message **msg,
+ struct pam_response **resp, void *data)
+{
+ struct param *param = (struct param *)data;
+ unsigned char *end = param->buf + sizeof(param->buf) - 1;
+ int i;
+
+ *resp = 0;
+
+ for (i = 0; i < n; i++)
+ {
+ /* if there's a message - append it to the buffer */
+ if (msg[i]->msg)
+ {
+ int len = strlen(msg[i]->msg);
+ if (len > end - param->ptr)
+ len = end - param->ptr;
+ if (len > 0)
+ {
+ memcpy(param->ptr, msg[i]->msg, len);
+ param->ptr+= len;
+ *(param->ptr)++ = '\n';
+ }
+ }
+ /* if the message style is *_PROMPT_*, meaning PAM asks a question,
+ send the accumulated text to the client, read the reply */
+ if (msg[i]->msg_style == PAM_PROMPT_ECHO_OFF ||
+ msg[i]->msg_style == PAM_PROMPT_ECHO_ON)
+ {
+ int pkt_len;
+ unsigned char *pkt;
+
+ /* allocate the response array.
+ freeing it is the responsibility of the caller */
+ if (*resp == 0)
+ {
+ *resp = calloc(sizeof(struct pam_response), n);
+ if (*resp == 0)
+ return PAM_BUF_ERR;
+ }
+
+ /* dialog plugin interprets the first byte of the packet
+ as the magic number.
+ 2 means "read the input with the echo enabled"
+ 4 means "password-like input, echo disabled"
+ C'est la vie. */
+ param->buf[0] = msg[i]->msg_style == PAM_PROMPT_ECHO_ON ? 2 : 4;
+ PAM_DEBUG((stderr, "PAM: conv: send(%.*s)\n",
+ (int)(param->ptr - param->buf - 1), param->buf));
+ pkt_len= roundtrip(param, param->buf, param->ptr - param->buf - 1, &pkt);
+ if (pkt_len < 0)
+ return PAM_CONV_ERR;
+
+ PAM_DEBUG((stderr, "PAM: conv: recv(%.*s)\n", pkt_len, pkt));
+ /* allocate and copy the reply to the response array */
+ if (!((*resp)[i].resp= strndup((char*) pkt, pkt_len)))
+ return PAM_CONV_ERR;
+ param->ptr = param->buf + 1;
+ }
+ }
+ return PAM_SUCCESS;
+}
+
+#define DO(X) if ((status = (X)) != PAM_SUCCESS) goto end
+
+#if defined(SOLARIS) || defined(__sun)
+typedef void** pam_get_item_3_arg;
+#else
+typedef const void** pam_get_item_3_arg;
+#endif
+
+static int pam_auth_base(struct param *param, MYSQL_SERVER_AUTH_INFO *info)
+{
+ pam_handle_t *pamh = NULL;
+ int status;
+ const char *new_username= NULL;
+ /* The following is written in such a way to make also solaris happy */
+ struct pam_conv pam_start_arg = { &conv, (char*) param };
+
+ /*
+ get the service name, as specified in
+
+ CREATE USER ... IDENTIFIED WITH pam AS "service"
+ */
+ const char *service = info->auth_string && info->auth_string[0]
+ ? info->auth_string : "mysql";
+
+ param->ptr = param->buf + 1;
+
+ PAM_DEBUG((stderr, "PAM: pam_start(%s, %s)\n", service, info->user_name));
+ DO( pam_start(service, info->user_name, &pam_start_arg, &pamh) );
+
+ PAM_DEBUG((stderr, "PAM: pam_authenticate(0)\n"));
+ DO( pam_authenticate (pamh, 0) );
+
+ PAM_DEBUG((stderr, "PAM: pam_acct_mgmt(0)\n"));
+ DO( pam_acct_mgmt(pamh, 0) );
+
+ PAM_DEBUG((stderr, "PAM: pam_get_item(PAM_USER)\n"));
+ DO( pam_get_item(pamh, PAM_USER, (pam_get_item_3_arg) &new_username) );
+
+ if (new_username &&
+ (winbind_hack ? strcasecmp : strcmp)(new_username, info->user_name))
+ strncpy(info->authenticated_as, new_username,
+ sizeof(info->authenticated_as));
+ info->authenticated_as[sizeof(info->authenticated_as)-1]= 0;
+
+end:
+ PAM_DEBUG((stderr, "PAM: status = %d (%s) user = %s\n",
+ status, pam_strerror(pamh, status), info->authenticated_as));
+ pam_end(pamh, status);
+ return status == PAM_SUCCESS ? CR_OK : CR_ERROR;
+}
+
diff --git a/plugin/auth_pam/auth_pam_common.c b/plugin/auth_pam/auth_pam_common.c
new file mode 100644
index 00000000000..ef8f0f658ff
--- /dev/null
+++ b/plugin/auth_pam/auth_pam_common.c
@@ -0,0 +1,56 @@
+/*
+ Copyright (c) 2011, 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+/*
+ In this file we gather the plugin interface definitions
+ that are same in all the PAM plugin versions.
+ To be included into auth_pam.c and auth_pam_v1.c.
+*/
+
+static struct st_mysql_auth info =
+{
+ MYSQL_AUTHENTICATION_INTERFACE_VERSION,
+ "dialog",
+ pam_auth,
+ NULL, NULL /* no PASSWORD() */
+};
+
+static char use_cleartext_plugin;
+static MYSQL_SYSVAR_BOOL(use_cleartext_plugin, use_cleartext_plugin,
+ PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
+ "Use mysql_cleartext_plugin on the client side instead of the dialog "
+ "plugin. This may be needed for compatibility reasons, but it only "
+ "supports simple PAM policies that don't require anything besides "
+ "a password", NULL, NULL, 0);
+
+static MYSQL_SYSVAR_BOOL(winbind_workaround, winbind_hack, PLUGIN_VAR_OPCMDARG,
+ "Compare usernames case insensitively to work around pam_winbind "
+ "unconditional username lowercasing", NULL, NULL, 0);
+
+#ifndef DBUG_OFF
+static MYSQL_SYSVAR_BOOL(debug, pam_debug, PLUGIN_VAR_OPCMDARG,
+ "Log all PAM activity", NULL, NULL, 0);
+#endif
+
+
+static struct st_mysql_sys_var* vars[] = {
+ MYSQL_SYSVAR(use_cleartext_plugin),
+ MYSQL_SYSVAR(winbind_workaround),
+#ifndef DBUG_OFF
+ MYSQL_SYSVAR(debug),
+#endif
+ NULL
+};
diff --git a/plugin/auth_pam/auth_pam_tool.c b/plugin/auth_pam/auth_pam_tool.c
new file mode 100644
index 00000000000..225f35a6624
--- /dev/null
+++ b/plugin/auth_pam/auth_pam_tool.c
@@ -0,0 +1,120 @@
+/*
+ Copyright (c) 2011, 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <mysql/plugin_auth_common.h>
+
+struct param {
+ unsigned char buf[10240], *ptr;
+};
+
+
+#include "auth_pam_tool.h"
+
+
+static int roundtrip(struct param *param, const unsigned char *buf,
+ int buf_len, unsigned char **pkt)
+{
+ unsigned char b= AP_CONV;
+ if (write(1, &b, 1) < 1 || write_string(1, buf, buf_len))
+ return -1;
+ *pkt= (unsigned char *) param->buf;
+ return read_string(0, (char *) param->buf, (int) sizeof(param->buf));
+}
+
+typedef struct st_mysql_server_auth_info
+{
+ /**
+ User name as sent by the client and shown in USER().
+ NULL if the client packet with the user name was not received yet.
+ */
+ char *user_name;
+
+ /**
+ A corresponding column value from the mysql.user table for the
+ matching account name
+ */
+ char *auth_string;
+
+ /**
+ Matching account name as found in the mysql.user table.
+ A plugin can override it with another name that will be
+ used by MySQL for authorization, and shown in CURRENT_USER()
+ */
+ char authenticated_as[MYSQL_USERNAME_LENGTH+1];
+} MYSQL_SERVER_AUTH_INFO;
+
+
+#include "auth_pam_base.c"
+
+
+int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
+{
+ struct param param;
+ MYSQL_SERVER_AUTH_INFO info;
+ unsigned char field;
+ int res;
+ char a_buf[MYSQL_USERNAME_LENGTH + 1 + 1024];
+
+ if ((res= setreuid(0, 0)))
+ fprintf(stderr, "Got error %d from setreuid()\n", (int) errno);
+
+ if (read(0, &field, 1) < 1)
+ return -1;
+#ifndef DBUG_OFF
+ pam_debug= field & 1;
+#endif
+ winbind_hack= field & 2;
+
+ PAM_DEBUG((stderr, "PAM: sandbox started [%s].\n", argv[0]));
+
+ info.user_name= a_buf;
+ if ((res= read_string(0, info.user_name, sizeof(a_buf))) < 0)
+ return -1;
+ PAM_DEBUG((stderr, "PAM: sandbox username [%s].\n", info.user_name));
+
+ info.auth_string= info.user_name + res + 1;
+ if (read_string(0, info.auth_string, sizeof(a_buf) - 1 - res) < 0)
+ return -1;
+
+ PAM_DEBUG((stderr, "PAM: sandbox auth string [%s].\n", info.auth_string));
+
+ if ((res= pam_auth_base(&param, &info)) != CR_OK)
+ {
+ PAM_DEBUG((stderr, "PAM: auth failed, sandbox closed.\n"));
+ return -1;
+ }
+
+ if (info.authenticated_as[0])
+ {
+ PAM_DEBUG((stderr, "PAM: send authenticated_as field.\n"));
+ field= AP_AUTHENTICATED_AS;
+ if (write(1, &field, 1) < 1 ||
+ write_string(1, (unsigned char *) info.authenticated_as,
+ strlen(info.authenticated_as)))
+ return -1;
+ }
+
+ PAM_DEBUG((stderr, "PAM: send OK result.\n"));
+ field= AP_EOF;
+ if (write(1, &field, 1) != 1)
+ return -1;
+
+ PAM_DEBUG((stderr, "PAM: sandbox closed.\n"));
+ return 0;
+}
diff --git a/plugin/auth_pam/auth_pam_tool.h b/plugin/auth_pam/auth_pam_tool.h
new file mode 100644
index 00000000000..60ae016db72
--- /dev/null
+++ b/plugin/auth_pam/auth_pam_tool.h
@@ -0,0 +1,81 @@
+/*
+ Copyright (c) 2011, 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+/*
+ This file contains definitions and functions for
+ the interface between the auth_pam.so (PAM plugin version 2)
+ and the auth_pam_tool executable.
+ To be included both in auth_pam.c and auth_pam_tool.c.
+*/
+
+#define AP_AUTHENTICATED_AS 'A'
+#define AP_CONV 'C'
+#define AP_EOF 'E'
+
+
+static int read_length(int file)
+{
+ unsigned char hdr[2];
+
+ if (read(file, hdr, 2) < 2)
+ return -1;
+
+ return (((int) hdr[0]) << 8) + (int) hdr[1];
+}
+
+
+static void store_length(int len, unsigned char *p_len)
+{
+ p_len[0]= (unsigned char) ((len >> 8) & 0xFF);
+ p_len[1]= (unsigned char) (len & 0xFF);
+}
+
+
+/*
+ Returns the length of the string read,
+ or -1 on error.
+*/
+
+static int read_string(int file, char *s, int s_size)
+{
+ int len;
+
+ len= read_length(file);
+
+ if (len < 0 || len > s_size-1 ||
+ read(file, s, len) < len)
+ return -1;
+
+ s[len]= 0;
+
+ return len;
+}
+
+
+/*
+ Returns 0 on success.
+*/
+
+static int write_string(int file, const unsigned char *s, int s_len)
+{
+ unsigned char hdr[2];
+ store_length(s_len, hdr);
+ return write(file, hdr, 2) < 2 ||
+ write(file, s, s_len) < s_len;
+}
+
+
+#define MAX_PAM_SERVICE_NAME 1024
diff --git a/plugin/auth_pam/auth_pam_v1.c b/plugin/auth_pam/auth_pam_v1.c
new file mode 100644
index 00000000000..a38ef8f53ca
--- /dev/null
+++ b/plugin/auth_pam/auth_pam_v1.c
@@ -0,0 +1,86 @@
+/*
+ Copyright (c) 2011, 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+#include <mysql/plugin_auth.h>
+
+struct param {
+ unsigned char buf[10240], *ptr, *cached;
+ int cached_len;
+ MYSQL_PLUGIN_VIO *vio;
+};
+
+static int roundtrip(struct param *param, const unsigned char *buf,
+ int buf_len, unsigned char **pkt)
+{
+ if (param->cached && *param->cached && (buf[0] >> 1) == 2)
+ {
+ *pkt= param->cached;
+ param->cached= NULL;
+ return param->cached_len;
+ }
+ param->cached= NULL;
+ if (param->vio->write_packet(param->vio, buf, buf_len))
+ return -1;
+ return param->vio->read_packet(param->vio, pkt);
+}
+
+#include "auth_pam_base.c"
+
+static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
+{
+ struct param param;
+ param.vio = vio;
+
+ /* no user name yet ? read the client handshake packet with the user name */
+ if (info->user_name == 0)
+ {
+ if ((param.cached_len= vio->read_packet(vio, &param.cached)) < 0)
+ return CR_ERROR;
+ }
+ else
+ param.cached= NULL;
+
+ return pam_auth_base(&param, info);
+}
+
+
+#include "auth_pam_common.c"
+
+
+static int init(void *p __attribute__((unused)))
+{
+ if (use_cleartext_plugin)
+ info.client_auth_plugin= "mysql_clear_password";
+ return 0;
+}
+
+maria_declare_plugin(pam)
+{
+ MYSQL_AUTHENTICATION_PLUGIN,
+ &info,
+ "pam",
+ "Sergei Golubchik",
+ "PAM based authentication",
+ PLUGIN_LICENSE_GPL,
+ init,
+ NULL,
+ 0x0100,
+ NULL,
+ vars,
+ "1.0",
+ MariaDB_PLUGIN_MATURITY_STABLE
+}
+maria_declare_plugin_end;
diff --git a/plugin/auth_pam/testing/CMakeLists.txt b/plugin/auth_pam/testing/CMakeLists.txt
new file mode 100644
index 00000000000..151823b9419
--- /dev/null
+++ b/plugin/auth_pam/testing/CMakeLists.txt
@@ -0,0 +1,15 @@
+# gcc pam_mariadb_mtr.c -shared -lpam -fPIC -o pam_mariadb_mtr.so
+
+ADD_LIBRARY(pam_mariadb_mtr MODULE pam_mariadb_mtr.c)
+SET_TARGET_PROPERTIES (pam_mariadb_mtr PROPERTIES PREFIX "")
+TARGET_LINK_LIBRARIES(pam_mariadb_mtr pam)
+
+IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ SET_SOURCE_FILES_PROPERTIES(
+ pam_mariadb_mtr.c
+ PROPERTY COMPILE_FLAGS "-Wno-incompatible-pointer-types-discards-qualifiers")
+ENDIF()
+
+SET(dest DESTINATION "${INSTALL_MYSQLTESTDIR}/suite/plugins/pam" COMPONENT Test)
+INSTALL(TARGETS pam_mariadb_mtr ${dest})
+INSTALL(FILES mariadb_mtr.conf RENAME mariadb_mtr ${dest})
diff --git a/plugin/auth_pam/testing/mariadb_mtr.conf b/plugin/auth_pam/testing/mariadb_mtr.conf
new file mode 100644
index 00000000000..241afb4367d
--- /dev/null
+++ b/plugin/auth_pam/testing/mariadb_mtr.conf
@@ -0,0 +1,4 @@
+# Put it in /etc/pam.d/mariadb_mtr
+
+auth required pam_mariadb_mtr.so pam_test
+account required pam_permit.so
diff --git a/plugin/auth_pam/testing/pam_mariadb_mtr.c b/plugin/auth_pam/testing/pam_mariadb_mtr.c
index 473ec246fe0..2075d5fdbf3 100644
--- a/plugin/auth_pam/testing/pam_mariadb_mtr.c
+++ b/plugin/auth_pam/testing/pam_mariadb_mtr.c
@@ -1,19 +1,11 @@
/*
This code is in the public domain and has no copyright.
- Pam module to test pam authentication plugin. Used in pam.test.
+ Pam module to test pam authentication plugin. Used in pam tests.
Linux only.
-
- Compile as
- gcc pam_mariadb_mtr.c -shared -lpam -fPIC -o pam_mariadb_mtr.so
-
Install as appropriate (for example, in /lib/security/).
- Create /etc/pam.d/mariadb_mtr with
-=========================================================
-auth required pam_mariadb_mtr.so pam_test
-account required pam_permit.so
-=========================================================
+ see also mariadb_mtr.conf
*/
#include <stdlib.h>
@@ -23,7 +15,7 @@ account required pam_permit.so
#define N 3
-int pam_sm_authenticate(pam_handle_t *pamh, int flags,
+int pam_sm_authenticate(pam_handle_t *pamh, int flags __attribute__((unused)),
int argc, const char *argv[])
{
struct pam_conv *conv;
@@ -31,7 +23,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
int pam_err, retval = PAM_SYSTEM_ERR;
struct pam_message msg[N] = {
{ PAM_TEXT_INFO, "Challenge input first." },
- { PAM_PROMPT_ECHO_ON, "Enter:" },
+ { PAM_PROMPT_ECHO_OFF, "Enter:" },
{ PAM_ERROR_MSG, "Now, the magic number!" }
};
const struct pam_message *msgp[N] = { msg, msg+1, msg+2 };
@@ -46,19 +38,29 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
if (pam_err != PAM_SUCCESS || !resp || !((r1= resp[1].resp)))
goto ret;
- free(resp);
+ if (strcmp(r1, "cleartext good") == 0)
+ retval = PAM_SUCCESS;
+ else if (strcmp(r1, "cleartext bad") == 0)
+ retval = PAM_AUTH_ERR;
+ else
+ {
+ free(resp);
+ msg[0].msg_style = PAM_PROMPT_ECHO_ON;
+ msg[0].msg = "PIN:";
+ pam_err = (*conv->conv)(1, msgp, &resp, conv->appdata_ptr);
- msg[0].msg_style = PAM_PROMPT_ECHO_OFF;
- msg[0].msg = "PIN:";
- pam_err = (*conv->conv)(1, msgp, &resp, conv->appdata_ptr);
+ if (pam_err != PAM_SUCCESS || !resp || !((r2= resp[0].resp)))
+ goto ret;
- if (pam_err != PAM_SUCCESS || !resp || !((r2= resp[0].resp)))
- goto ret;
+ /* Produce the crash for testing purposes. */
+ if (strcmp(r1, "crash pam module") == 0 && atoi(r2) == 616)
+ abort();
- if (strlen(r1) == atoi(r2) % 100)
- retval = PAM_SUCCESS;
- else
- retval = PAM_AUTH_ERR;
+ if (strlen(r1) == (size_t)atoi(r2) % 100)
+ retval = PAM_SUCCESS;
+ else
+ retval = PAM_AUTH_ERR;
+ }
if (argc > 0 && argv[0])
pam_set_item(pamh, PAM_USER, argv[0]);
@@ -70,8 +72,10 @@ ret:
return retval;
}
-int pam_sm_setcred(pam_handle_t *pamh, int flags,
- int argc, const char *argv[])
+int pam_sm_setcred(pam_handle_t *pamh __attribute__((unused)),
+ int flags __attribute__((unused)),
+ int argc __attribute__((unused)),
+ const char *argv[] __attribute__((unused)))
{
return PAM_SUCCESS;
diff --git a/plugin/auth_socket/CMakeLists.txt b/plugin/auth_socket/CMakeLists.txt
index eafa82bda99..5a59520a3e4 100644
--- a/plugin/auth_socket/CMakeLists.txt
+++ b/plugin/auth_socket/CMakeLists.txt
@@ -65,5 +65,5 @@ ENDIF()
ENDIF()
IF(ok)
- MYSQL_ADD_PLUGIN(auth_socket auth_socket.c)
+ MYSQL_ADD_PLUGIN(auth_socket auth_socket.c DEFAULT)
ENDIF()
diff --git a/plugin/auth_socket/auth_socket.c b/plugin/auth_socket/auth_socket.c
index c31f78a4500..46eae517cb8 100644
--- a/plugin/auth_socket/auth_socket.c
+++ b/plugin/auth_socket/auth_socket.c
@@ -102,7 +102,8 @@ static struct st_mysql_auth socket_auth_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
0,
- socket_auth
+ socket_auth,
+ NULL, NULL /* no PASSWORD() */
};
maria_declare_plugin(auth_socket)
diff --git a/plugin/aws_key_management/CMakeLists.txt b/plugin/aws_key_management/CMakeLists.txt
index 5389ad34bbd..3c6ca018273 100644
--- a/plugin/aws_key_management/CMakeLists.txt
+++ b/plugin/aws_key_management/CMakeLists.txt
@@ -1,180 +1,17 @@
-# We build parts of AWS C++ SDK as CMake external project
-# The restrictions of the SDK (https://github.com/awslabs/aws-sdk-cpp/blob/master/README.md)
-# are
-
-# - OS : Windows,Linux or OSX
-# - C++11 compiler : VS2013+, gcc 4.8+, clang 3.3+
-# - libcurl development package needs to be present on Unixes
-#
-# If we build SDK outselves, we'll need require GIT to be present on the build machine
-
-
-# Give message why the building this plugin is skipped (only if -DVERBOSE is defined)
-# or if plugin is explicitly requested to build. Then bail out.
-MACRO(SKIP_AWS_PLUGIN msg)
- MESSAGE_ONCE(SKIP_AWS_PLUGIN "Skip aws_key_management - ${msg}")
+INCLUDE(aws_sdk)
+CHECK_AWS_SDK(HAVE_AWS_SDK REASON)
+IF(NOT HAVE_AWS_SDK)
+ MESSAGE_ONCE(AWS_KEY_MANAGEMENT_NO_AWS_SDK "Can't build aws_key_management - AWS SDK not available (${REASON})")
ADD_FEATURE_INFO(AWS_KEY_MANAGEMENT "OFF" "AWS Encryption Key Management Plugin")
RETURN()
-ENDMACRO()
-SET(CMAKE_CXX_STANDARD 11)
-
-IF(NOT NOT_FOR_DISTRIBUTION)
- SKIP_AWS_PLUGIN("AWS SDK has Apache 2.0 License which is not complatible with GPLv2. Set -DNOT_FOR_DISTRIBUTION=ON if you need this plugin")
-ENDIF()
-
-# This plugin needs recent C++ compilers (AWS C++ SDK header files are using C++11 features)
-SET(CXX11_FLAGS)
-SET(OLD_COMPILER_MSG "AWS SDK requires c++11 -capable compiler (minimal supported versions are g++ 4.8, clang 3.3, VS2103)")
-
-IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
- IF (GCC_VERSION VERSION_LESS 4.8)
- SKIP_AWS_PLUGIN("${OLD_COMPILER_MSG}")
- ENDIF()
- SET(CXX11_FLAGS "-std=c++11")
-ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- IF ((CMAKE_CXX_COMPILER_VERSION AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3) OR
- (CLANG_VERSION_STRING AND CLANG_VERSION_STRING VERSION_LESS 3.3))
- SKIP_AWS_PLUGIN("${OLD_COMPILER_MSG}")
- ENDIF()
- SET(CXX11_FLAGS "-stdlib=libc++")
-ELSEIF(MSVC)
- IF (MSVC_VERSION LESS 1800)
- SKIP_AWS_PLUGIN("${OLD_COMPILER_MSG}")
- ENDIF()
-ELSE()
- SKIP_AWS_PLUGIN("Compiler not supported by AWS C++ SDK")
-ENDIF()
-
-IF (NOT(WIN32 OR APPLE OR (CMAKE_SYSTEM_NAME MATCHES "Linux")))
- SKIP_AWS_PLUGIN("OS unsupported by AWS SDK")
ENDIF()
+MYSQL_ADD_PLUGIN(aws_key_management
+ aws_key_management_plugin.cc
+ COMPONENT aws-key-management)
-
-FIND_LIBRARY(AWS_CPP_SDK_CORE NAMES aws-cpp-sdk-core PATH_SUFFIXES "${SDK_INSTALL_BINARY_PREFIX}")
-FIND_LIBRARY(AWS_CPP_SDK_KMS NAMES aws-cpp-sdk-kms PATH_SUFFIXES "${SDK_INSTALL_BINARY_PREFIX}")
-FIND_PATH(AWS_CPP_SDK_INCLUDE_DIR NAMES aws/kms/KMSClient.h)
-
-IF(AWS_CPP_SDK_CORE AND AWS_CPP_SDK_KMS AND AWS_CPP_SDK_INCLUDE_DIR)
- # AWS C++ SDK installed
- INCLUDE_DIRECTORIES(${AWS_CPP_SDK_INCLUDE_DIR})
- SET(AWS_SDK_LIBS ${AWS_CPP_SDK_CORE} ${AWS_CPP_SDK_KMS})
-ELSE()
- OPTION(AWS_SDK_EXTERNAL_PROJECT "Allow download and build AWS C++ SDK" OFF)
- IF(NOT AWS_SDK_EXTERNAL_PROJECT)
- SKIP_AWS_PLUGIN("AWS_SDK_EXTERNAL_PROJECT is not set")
- ENDIF()
- # Build from source, using ExternalProject_Add
- # AWS C++ SDK requires cmake 2.8.12
- IF(CMAKE_VERSION VERSION_LESS "2.8.12")
- SKIP_AWS_PLUGIN("CMake is too old")
- ENDIF()
- FIND_PACKAGE(Git)
- IF(NOT GIT_FOUND)
- SKIP_AWS_PLUGIN("no GIT")
- ENDIF()
- INCLUDE(ExternalProject)
- IF(UNIX)
- FIND_PACKAGE(CURL)
- SET_PACKAGE_PROPERTIES(CURL PROPERTIES TYPE REQUIRED)
- IF(NOT CURL_FOUND)
- SKIP_AWS_PLUGIN("AWS C++ SDK requires libcurl development package")
- ENDIF()
- SET(PIC_FLAG -fPIC)
- FIND_PATH(UUID_INCLUDE_DIR uuid/uuid.h)
- IF(NOT UUID_INCLUDE_DIR)
- SKIP_AWS_PLUGIN("AWS C++ SDK requires uuid development package")
- ENDIF()
- IF(NOT APPLE)
- FIND_LIBRARY(UUID_LIBRARIES uuid)
- SET_PACKAGE_PROPERTIES(UUID_LIBRARIES PROPERTIES TYPE REQUIRED)
- IF(NOT UUID_LIBRARIES)
- SKIP_AWS_PLUGIN("AWS C++ SDK requires uuid development package")
- ENDIF()
- FIND_PACKAGE(OpenSSL)
- SET_PACKAGE_PROPERTIES(OpenSSL PROPERTIES TYPE REQUIRED)
- IF(NOT OPENSSL_FOUND)
- SKIP_AWS_PLUGIN("AWS C++ SDK requires openssl development package")
- ENDIF()
- ENDIF()
- ENDIF()
- IF(MSVC)
- SET(EXTRA_SDK_CMAKE_FLAGS -DCMAKE_CXX_FLAGS_DEBUGOPT="" -DCMAKE_EXE_LINKER_FLAGS_DEBUGOPT="" "-DCMAKE_CXX_FLAGS=/wd4530 /wd4577 /WX-")
- ENDIF()
- IF(CMAKE_CXX_COMPILER)
- SET(EXTRA_SDK_CMAKE_FLAGS ${EXTRA_SDK_CMAKE_FLAGS} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
- ENDIF()
-
- SET(byproducts )
- # We do not need to build the whole SDK , just 2 of its libs
- set(AWS_SDK_LIBS aws-cpp-sdk-core aws-cpp-sdk-kms)
- FOREACH(lib ${AWS_SDK_LIBS})
- ADD_LIBRARY(${lib} STATIC IMPORTED GLOBAL)
- ADD_DEPENDENCIES(${lib} aws_sdk_cpp)
- SET(loc "${CMAKE_CURRENT_BINARY_DIR}/aws_sdk_cpp/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
- IF(CMAKE_VERSION VERSION_GREATER "3.1")
- SET(byproducts ${byproducts} BUILD_BYPRODUCTS ${loc})
- ENDIF()
- SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION ${loc})
- ENDFOREACH()
-
- # To be compatible with older cmake, we use older version of the SDK
- IF(CMAKE_VERSION LESS "3.0")
- SET(GIT_TAG "1.0.8")
- ELSE()
- SET(GIT_TAG "1.2.11")
- ENDIF()
-
- SET(AWS_SDK_PATCH_COMMAND )
- ExternalProject_Add(
- aws_sdk_cpp
- GIT_REPOSITORY "https://github.com/awslabs/aws-sdk-cpp.git"
- GIT_TAG ${GIT_TAG}
- UPDATE_COMMAND ""
- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp"
- ${byproducts}
- CMAKE_ARGS
- -DBUILD_ONLY=kms
- -DBUILD_SHARED_LIBS=OFF
- -DFORCE_SHARED_CRT=OFF
- -DENABLE_TESTING=OFF
- "-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} ${PIC_FLAG}"
- "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${PIC_FLAG}"
- "-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} ${PIC_FLAG}"
- "-DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL} ${PIC_FLAG}"
- ${EXTRA_SDK_CMAKE_FLAGS}
- -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/aws_sdk_cpp
- -DCMAKE_INSTALL_LIBDIR=lib
- TEST_COMMAND ""
- )
- SET_TARGET_PROPERTIES(aws_sdk_cpp PROPERTIES EXCLUDE_FROM_ALL TRUE)
-
- IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- # Need whole-archive , otherwise static libraries are not linked
- SET(AWS_SDK_LIBS -Wl,--whole-archive ${AWS_SDK_LIBS} -Wl,--no-whole-archive)
- ENDIF()
- SET_TARGET_PROPERTIES(aws_sdk_cpp PROPERTIES EXCLUDE_FROM_ALL TRUE)
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/aws_sdk_cpp/include)
-ENDIF()
-
-ADD_DEFINITIONS(${SSL_DEFINES}) # Need to know whether openssl should be initialized
-IF(CMAKE_VERSION GREATER "3.0")
- SET(CMAKE_CXX_STANDARD 11)
-ELSE()
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")
-ENDIF()
-IF(WIN32)
- SET(AWS_CPP_SDK_DEPENDENCIES bcrypt winhttp wininet userenv version)
-ELSE()
- SET(AWS_CPP_SDK_DEPENDENCIES ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} ${UUID_LIBRARIES})
-ENDIF()
-MYSQL_ADD_PLUGIN(aws_key_management aws_key_management_plugin.cc
- LINK_LIBRARIES ${AWS_SDK_LIBS} ${AWS_CPP_SDK_DEPENDENCIES}
- COMPONENT aws-key-management)
-
-IF (TARGET aws_key_management)
- SET(NON_DISTRIBUTABLE_WARNING "Apache 2.0" PARENT_SCOPE)
+IF(TARGET aws_key_management)
+ USE_AWS_SDK_LIBS(aws_key_management kms)
ENDIF()
ADD_FEATURE_INFO(AWS_KEY_MANAGEMENT "ON" "AWS Encryption Key Management Plugin")
diff --git a/plugin/aws_key_management/aws_key_management_plugin.cc b/plugin/aws_key_management/aws_key_management_plugin.cc
index 4a8f318986f..e2182336aa6 100644
--- a/plugin/aws_key_management/aws_key_management_plugin.cc
+++ b/plugin/aws_key_management/aws_key_management_plugin.cc
@@ -110,7 +110,7 @@ static void print_kms_error(const char *func, const Aws::Client::AWSError<Aws::K
{
my_printf_error(ER_UNKNOWN_ERROR,
"AWS KMS plugin : KMS Client API '%s' failed : %s - %s",
- ME_ERROR_LOG,
+ ME_ERROR_LOG_ONLY,
func, err.GetExceptionName().c_str(), err.GetMessage().c_str());
}
@@ -161,6 +161,10 @@ public:
{
}
+ virtual void Flush(void) override
+ {
+ }
+
protected:
virtual void ProcessFormattedStatement(Aws::String&& statement) override
{
@@ -214,7 +218,7 @@ Aws::SDKOptions sdkOptions;
static int aws_init()
{
-#ifdef HAVE_YASSL
+#ifdef HAVE_WOLFSSL
sdkOptions.cryptoOptions.initAndCleanupOpenSSL = true;
#else
/* Server initialized OpenSSL already, thus AWS must skip it */
@@ -237,7 +241,7 @@ static int aws_init()
client = new KMSClient(clientConfiguration);
if (!client)
{
- my_printf_error(ER_UNKNOWN_ERROR, "Can not initialize KMS client", ME_ERROR_LOG | ME_WARNING);
+ my_printf_error(ER_UNKNOWN_ERROR, "Can't initialize KMS client", ME_ERROR_LOG_ONLY | ME_WARNING);
return -1;
}
return 0;
@@ -339,12 +343,12 @@ static int load_key(KEY_INFO *info)
if (!ret)
{
- my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: loaded key %u, version %u, key length %u bit", ME_ERROR_LOG | ME_NOTE,
+ my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: loaded key %u, version %u, key length %u bit", ME_ERROR_LOG_ONLY | ME_NOTE,
info->key_id, info->key_version,(uint)info->length*8);
}
else
{
- my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: key %u, version %u could not be decrypted", ME_ERROR_LOG | ME_WARNING,
+ my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: key %u, version %u could not be decrypted", ME_ERROR_LOG_ONLY | ME_WARNING,
info->key_id, info->key_version);
}
return ret;
@@ -443,13 +447,13 @@ static int read_and_decrypt_key(const char *path, KEY_INFO *info)
ifstream ifs(path, ios::binary | ios::ate);
if (!ifs.good())
{
- my_printf_error(ER_UNKNOWN_ERROR, "can't open file %s", ME_ERROR_LOG, path);
+ my_printf_error(ER_UNKNOWN_ERROR, "can't open file %s", ME_ERROR_LOG_ONLY, path);
return(-1);
}
size_t pos = (size_t)ifs.tellg();
if (!pos || pos == SIZE_T_MAX)
{
- my_printf_error(ER_UNKNOWN_ERROR, "invalid key file %s", ME_ERROR_LOG, path);
+ my_printf_error(ER_UNKNOWN_ERROR, "invalid key file %s", ME_ERROR_LOG_ONLY, path);
return(-1);
}
std::vector<char> contents(pos);
@@ -470,7 +474,7 @@ static int read_and_decrypt_key(const char *path, KEY_INFO *info)
if (len > sizeof(info->data))
{
- my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: encoding key too large for %s", ME_ERROR_LOG, path);
+ my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: encoding key too large for %s", ME_ERROR_LOG_ONLY, path);
return(ENCRYPTION_KEY_BUFFER_TOO_SMALL);
}
memcpy(info->data, plaintext.GetUnderlyingData(), len);
@@ -527,19 +531,19 @@ static int generate_and_save_datakey(uint keyid, uint version)
int fd= open(filename, O_WRONLY |O_CREAT|O_BINARY, IF_WIN(_S_IREAD, S_IRUSR| S_IRGRP| S_IROTH));
if (fd < 0)
{
- my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: Can't create file %s", ME_ERROR_LOG, filename);
+ my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: Can't create file %s", ME_ERROR_LOG_ONLY, filename);
return(-1);
}
unsigned int len= (unsigned int)byteBuffer.GetLength();
if (write(fd, byteBuffer.GetUnderlyingData(), len) != len)
{
- my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: can't write to %s", ME_ERROR_LOG, filename);
+ my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: can't write to %s", ME_ERROR_LOG_ONLY, filename);
close(fd);
unlink(filename);
return(-1);
}
close(fd);
- my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: generated encrypted datakey for key id=%u, version=%u", ME_ERROR_LOG | ME_NOTE,
+ my_printf_error(ER_UNKNOWN_ERROR, "AWS KMS plugin: generated encrypted datakey for key id=%u, version=%u", ME_ERROR_LOG_ONLY | ME_NOTE,
keyid, version);
return(0);
}
@@ -552,13 +556,13 @@ static int rotate_single_key(uint key_id)
if (!ver)
{
- my_printf_error(ER_UNKNOWN_ERROR, "key %u does not exist", MYF(ME_JUST_WARNING), key_id);
+ my_printf_error(ER_UNKNOWN_ERROR, "key %u does not exist", MYF(ME_WARNING), key_id);
return -1;
}
else if (generate_and_save_datakey(key_id, ver + 1))
{
my_printf_error(ER_UNKNOWN_ERROR, "Could not generate datakey for key id= %u, ver= %u",
- MYF(ME_JUST_WARNING), key_id, ver);
+ MYF(ME_WARNING), key_id, ver);
return -1;
}
else
@@ -569,7 +573,7 @@ static int rotate_single_key(uint key_id)
if (load_key(&info))
{
my_printf_error(ER_UNKNOWN_ERROR, "Could not load datakey for key id= %u, ver= %u",
- MYF(ME_JUST_WARNING), key_id, ver);
+ MYF(ME_WARNING), key_id, ver);
return -1;
}
}
@@ -594,7 +598,7 @@ static void update_rotate(MYSQL_THD, struct st_mysql_sys_var *, void *, const vo
if (!master_key_id[0])
{
my_printf_error(ER_UNKNOWN_ERROR,
- "aws_key_management_master_key_id must be set to generate new data keys", MYF(ME_JUST_WARNING));
+ "aws_key_management_master_key_id must be set to generate new data keys", MYF(ME_WARNING));
return;
}
mtx.lock();
diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c
index 72f87db94da..20294b070e7 100644
--- a/plugin/cracklib_password_check/cracklib_password_check.c
+++ b/plugin/cracklib_password_check/cracklib_password_check.c
@@ -21,7 +21,8 @@
static char *dictionary;
-static int crackme(MYSQL_CONST_LEX_STRING *username, MYSQL_CONST_LEX_STRING *password)
+static int crackme(const MYSQL_CONST_LEX_STRING *username,
+ const MYSQL_CONST_LEX_STRING *password)
{
char *user= alloca(username->length + 1);
char *host;
diff --git a/plugin/disks/information_schema_disks.cc b/plugin/disks/information_schema_disks.cc
index 414af59098f..bfae81eceac 100644
--- a/plugin/disks/information_schema_disks.cc
+++ b/plugin/disks/information_schema_disks.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2017, MariaDB
+ Copyright (c) 2017, 2019, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugin/feedback/sender_thread.cc b/plugin/feedback/sender_thread.cc
index 9a8e7775d01..3976c950541 100644
--- a/plugin/feedback/sender_thread.cc
+++ b/plugin/feedback/sender_thread.cc
@@ -90,9 +90,7 @@ static int prepare_for_fill(TABLE_LIST *tables)
in SHOW STATUS and we want to avoid skewing the statistics)
*/
thd->variables.pseudo_thread_id= thd->thread_id;
- mysql_mutex_lock(&LOCK_thread_count);
- threads.append(thd);
- mysql_mutex_unlock(&LOCK_thread_count);
+ server_threads.insert(thd);
thd->thread_stack= (char*) &tables;
if (thd->store_globals())
return 1;
@@ -118,11 +116,12 @@ static int prepare_for_fill(TABLE_LIST *tables)
tables->init_one_table(&INFORMATION_SCHEMA_NAME, &tbl_name, 0, TL_READ);
tables->schema_table= i_s_feedback;
tables->schema_table_reformed= 1;
+ tables->select_lex= thd->lex->first_select_lex();
+ DBUG_ASSERT(tables->select_lex);
tables->table= create_schema_table(thd, tables);
if (!tables->table)
return 1;
- tables->select_lex= thd->lex->current_select;
tables->table->pos_in_table_list= tables;
return 0;
@@ -139,7 +138,7 @@ static int prepare_for_fill(TABLE_LIST *tables)
*/
static bool going_down()
{
- return shutdown_plugin || shutdown_in_progress || (thd && thd->killed);
+ return shutdown_plugin || abort_loop || (thd && thd->killed);
}
/**
@@ -258,12 +257,9 @@ ret:
reset all thread local status variables to minimize
the effect of the background thread on SHOW STATUS.
*/
- mysql_mutex_lock(&LOCK_thread_count);
+ server_threads.erase(thd);
thd->set_status_var_init();
thd->killed= KILL_CONNECTION;
- thd->unlink();
- mysql_cond_broadcast(&COND_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
delete thd;
thd= 0;
}
diff --git a/plugin/file_key_management/CMakeLists.txt b/plugin/file_key_management/CMakeLists.txt
index c2f13fb9f63..9b09da9bf20 100644
--- a/plugin/file_key_management/CMakeLists.txt
+++ b/plugin/file_key_management/CMakeLists.txt
@@ -1,4 +1,4 @@
SET(FILE_KEY_MANAGEMENT_PLUGIN_SOURCES file_key_management_plugin.cc parser.cc)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
-MYSQL_ADD_PLUGIN(FILE_KEY_MANAGEMENT ${FILE_KEY_MANAGEMENT_PLUGIN_SOURCES})
+MYSQL_ADD_PLUGIN(FILE_KEY_MANAGEMENT ${FILE_KEY_MANAGEMENT_PLUGIN_SOURCES} MODULE_ONLY)
diff --git a/plugin/file_key_management/parser.cc b/plugin/file_key_management/parser.cc
index 5a9e5e55d63..818c026495f 100644
--- a/plugin/file_key_management/parser.cc
+++ b/plugin/file_key_management/parser.cc
@@ -96,14 +96,6 @@ openssl enc -aes-256-cbc -md sha1 -k "secret" -in keys.txt -out keys.enc
@param secret [in] the given secret as String, provided by the user
@param key [out] 32 Bytes of key are written to this pointer
@param iv [out] 16 Bytes of iv are written to this pointer
-
- Note, that in openssl this whole function can be reduced to
-
- #include <openssl/evp.h>
- EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha1(), salt,
- secret, strlen(secret), 1, key, iv);
-
- but alas! we want to support yassl too
*/
void Parser::bytes_to_key(const unsigned char *salt, const char *input,
diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp
index a76428b29d3..9c0a2d81b98 100644
--- a/plugin/handler_socket/handlersocket/database.cpp
+++ b/plugin/handler_socket/handlersocket/database.cpp
@@ -280,7 +280,7 @@ dbcontext::init_thread(const void *stack_bottom, volatile int& shutdown_flag)
DBG_THR(fprintf(stderr,
"thread_stack = %p sizeof(THD)=%zu sizeof(mtx)=%zu "
"O: %zu %zu %zu %zu %zu %zu %zu\n",
- thd->thread_stack, sizeof(THD), sizeof(LOCK_thread_count),
+ thd->thread_stack, sizeof(THD), sizeof(mysql_mutex_t),
DENA_THR_OFFSETOF(mdl_context),
DENA_THR_OFFSETOF(net),
DENA_THR_OFFSETOF(LOCK_thd_data),
@@ -307,7 +307,7 @@ dbcontext::init_thread(const void *stack_bottom, volatile int& shutdown_flag)
}
{
thd->thread_id = next_thread_id();
- add_to_active_threads(thd);
+ server_threads.insert(thd);
}
DBG_THR(fprintf(stderr, "HNDSOCK init thread wsts\n"));
@@ -341,10 +341,8 @@ dbcontext::term_thread()
close_tables_if();
my_pthread_setspecific_ptr(THR_THD, 0);
{
- pthread_mutex_lock(&LOCK_thread_count);
delete thd;
thd = 0;
- pthread_mutex_unlock(&LOCK_thread_count);
my_thread_end();
}
}
@@ -473,9 +471,7 @@ dbcontext::close_tables_if()
unlock_tables_if();
DENA_VERBOSE(100, fprintf(stderr, "HNDSOCK close tables\n"));
close_thread_tables(thd);
- #if MYSQL_VERSION_ID >= 50505
- thd->mdl_context.release_transactional_locks();
- #endif
+ thd->mdl_context.release_transactional_locks(thd);
if (!table_vec.empty()) {
statistic_increment(close_tables_count, &LOCK_status);
table_vec.clear();
diff --git a/plugin/locale_info/CMakeLists.txt b/plugin/locale_info/CMakeLists.txt
index 8f1dfa0d715..c988d652d40 100644
--- a/plugin/locale_info/CMakeLists.txt
+++ b/plugin/locale_info/CMakeLists.txt
@@ -1,5 +1,4 @@
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/regex
- ${CMAKE_SOURCE_DIR}/extra/yassl/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/regex)
MYSQL_ADD_PLUGIN(LOCALES locale_info.cc RECOMPILE_FOR_EMBEDDED)
diff --git a/plugin/metadata_lock_info/metadata_lock_info.cc b/plugin/metadata_lock_info/metadata_lock_info.cc
index ae52a6b1353..a4c1d8ef205 100644
--- a/plugin/metadata_lock_info/metadata_lock_info.cc
+++ b/plugin/metadata_lock_info/metadata_lock_info.cc
@@ -21,7 +21,7 @@
#include "sql_show.h"
static const LEX_STRING metadata_lock_info_lock_name[] = {
- { C_STRING_WITH_LEN("Global read lock") },
+ { C_STRING_WITH_LEN("Backup lock") },
{ C_STRING_WITH_LEN("Schema metadata lock") },
{ C_STRING_WITH_LEN("Table metadata lock") },
{ C_STRING_WITH_LEN("Stored function metadata lock") },
@@ -29,23 +29,9 @@ static const LEX_STRING metadata_lock_info_lock_name[] = {
{ C_STRING_WITH_LEN("Stored package body metadata lock") },
{ C_STRING_WITH_LEN("Trigger metadata lock") },
{ C_STRING_WITH_LEN("Event metadata lock") },
- { C_STRING_WITH_LEN("Commit lock") },
{ C_STRING_WITH_LEN("User lock") },
};
-static const LEX_STRING metadata_lock_info_lock_mode[] = {
- { C_STRING_WITH_LEN("MDL_INTENTION_EXCLUSIVE") },
- { C_STRING_WITH_LEN("MDL_SHARED") },
- { C_STRING_WITH_LEN("MDL_SHARED_HIGH_PRIO") },
- { C_STRING_WITH_LEN("MDL_SHARED_READ") },
- { C_STRING_WITH_LEN("MDL_SHARED_WRITE") },
- { C_STRING_WITH_LEN("MDL_SHARED_UPGRADABLE") },
- { C_STRING_WITH_LEN("MDL_SHARED_READ_ONLY") },
- { C_STRING_WITH_LEN("MDL_SHARED_NO_WRITE") },
- { C_STRING_WITH_LEN("MDL_SHARED_NO_READ_WRITE") },
- { C_STRING_WITH_LEN("MDL_EXCLUSIVE") },
-};
-
static ST_FIELD_INFO i_s_metadata_lock_info_fields_info[] =
{
{"THREAD_ID", 20, MYSQL_TYPE_LONGLONG, 0,
@@ -71,22 +57,21 @@ struct st_i_s_metadata_param
int i_s_metadata_lock_info_fill_row(
MDL_ticket *mdl_ticket,
- void *arg
+ void *arg,
+ bool granted
) {
st_i_s_metadata_param *param = (st_i_s_metadata_param *) arg;
THD *thd = param->thd;
TABLE *table = param->table;
DBUG_ENTER("i_s_metadata_lock_info_fill_row");
MDL_context *mdl_ctx = mdl_ticket->get_ctx();
- enum_mdl_type mdl_ticket_type = mdl_ticket->get_type();
MDL_key *mdl_key = mdl_ticket->get_key();
MDL_key::enum_mdl_namespace mdl_namespace = mdl_key->mdl_namespace();
+ if (!granted)
+ DBUG_RETURN(0);
table->field[0]->store((longlong) mdl_ctx->get_thread_id(), TRUE);
table->field[1]->set_notnull();
- table->field[1]->store(
- metadata_lock_info_lock_mode[(int) mdl_ticket_type].str,
- metadata_lock_info_lock_mode[(int) mdl_ticket_type].length,
- system_charset_info);
+ table->field[1]->store(mdl_ticket->get_type_name(), system_charset_info);
table->field[2]->set_null();
table->field[3]->set_notnull();
table->field[3]->store(
@@ -122,8 +107,6 @@ static int i_s_metadata_lock_info_init(
compile_time_assert(sizeof(metadata_lock_info_lock_name)/sizeof(LEX_STRING)
== MDL_key::NAMESPACE_END);
- compile_time_assert(sizeof(metadata_lock_info_lock_mode)/sizeof(LEX_STRING)
- == MDL_TYPE_END);
ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p;
DBUG_ENTER("i_s_metadata_lock_info_init");
diff --git a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result
index 5803d7d1290..12afd5010cc 100644
--- a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result
+++ b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result
@@ -3,8 +3,7 @@ lock_mode lock_duration lock_type table_schema table_name
FLUSH TABLES WITH READ LOCK;
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
lock_mode lock_duration lock_type table_schema table_name
-MDL_SHARED NULL Commit lock
-MDL_SHARED NULL Global read lock
+MDL_BACKUP_FTWRL2 NULL Backup lock
UNLOCK TABLES;
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
lock_mode lock_duration lock_type table_schema table_name
diff --git a/plugin/qc_info/CMakeLists.txt b/plugin/qc_info/CMakeLists.txt
index 821ffb79225..b8c5f926cff 100644
--- a/plugin/qc_info/CMakeLists.txt
+++ b/plugin/qc_info/CMakeLists.txt
@@ -1,5 +1,4 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql
- ${PCRE_INCLUDES}
- ${CMAKE_SOURCE_DIR}/extra/yassl/include)
+ ${PCRE_INCLUDES})
MYSQL_ADD_PLUGIN(QUERY_CACHE_INFO qc_info.cc RECOMPILE_FOR_EMBEDDED)
diff --git a/plugin/query_response_time/query_response_time.cc b/plugin/query_response_time/query_response_time.cc
index 5d6119d20ef..a669f7d4236 100644
--- a/plugin/query_response_time/query_response_time.cc
+++ b/plugin/query_response_time/query_response_time.cc
@@ -147,42 +147,36 @@ void print_time(char* buffer, std::size_t buffer_size, const char* format,
class time_collector
{
+ utility *m_utility;
+ Atomic_counter<uint32_t> m_count[OVERALL_POWER_COUNT + 1];
+ Atomic_counter<uint64_t> m_total[OVERALL_POWER_COUNT + 1];
+
public:
- time_collector(utility& u) : m_utility(&u)
- { }
- ~time_collector()
- { }
- uint32 count(uint index)
- {
- return my_atomic_load32((int32*)&m_count[index]);
- }
- uint64 total(uint index)
- {
- return my_atomic_load64((int64*)&m_total[index]);
- }
-public:
+ time_collector(utility& u): m_utility(&u) { flush(); }
+ ~time_collector() { }
+ uint32_t count(uint index) { return m_count[index]; }
+ uint64_t total(uint index) { return m_total[index]; }
void flush()
{
- memset((void*)&m_count,0,sizeof(m_count));
- memset((void*)&m_total,0,sizeof(m_total));
+ for (auto i= 0; i < OVERALL_POWER_COUNT + 1; i++)
+ {
+ m_count[i]= 0;
+ m_total[i]= 0;
+ }
}
- void collect(uint64 time)
+ void collect(uint64_t time)
{
int i= 0;
for(int count= m_utility->bound_count(); count > i; ++i)
{
if(m_utility->bound(i) > time)
{
- my_atomic_add32((int32*)(&m_count[i]), 1);
- my_atomic_add64((int64*)(&m_total[i]), time);
+ m_count[i]++;
+ m_total[i]+= time;
break;
}
}
}
-private:
- utility* m_utility;
- uint32 m_count[OVERALL_POWER_COUNT + 1];
- uint64 m_total[OVERALL_POWER_COUNT + 1];
};
class collector
@@ -191,7 +185,6 @@ public:
collector() : m_time(m_utility)
{
m_utility.setup(DEFAULT_BASE);
- m_time.flush();
}
public:
void flush()
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index 80b4b644732..86f38edf724 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -1,4 +1,5 @@
/* Copyright (C) 2013, 2015, Alexey Botchkov and SkySQL Ab
+ Copyright (c) 2019, 2020, 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
@@ -763,7 +764,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
ADD_ATOMIC(internal_stop_logging, 1);
CLIENT_ERROR(1, "User '%.*b' was removed from the"
" server_audit_excl_users.",
- MYF(ME_JUST_WARNING), (int) cmp_length, users);
+ MYF(ME_WARNING), (int) cmp_length, users);
ADD_ATOMIC(internal_stop_logging, -1);
blank_user(cmp_user);
refill_cmp_coll= 1;
@@ -772,7 +773,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
{
ADD_ATOMIC(internal_stop_logging, 1);
CLIENT_ERROR(1, "User '%.*b' is in the server_audit_incl_users, "
- "so wasn't added.", MYF(ME_JUST_WARNING), (int) cmp_length, users);
+ "so wasn't added.", MYF(ME_WARNING), (int) cmp_length, users);
ADD_ATOMIC(internal_stop_logging, -1);
remove_user(users);
continue;
@@ -1091,7 +1092,7 @@ static int start_logging()
"Could not create file '%s'.", alt_fname);
is_active= 0;
CLIENT_ERROR(1, "SERVER AUDIT plugin can't create file '%s'.",
- MYF(ME_JUST_WARNING), alt_fname);
+ MYF(ME_WARNING), alt_fname);
return 1;
}
error_header();
@@ -2749,7 +2750,7 @@ static void update_file_path(MYSQL_THD thd,
{
error_header();
fprintf(stderr, "Logging was disabled..\n");
- CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_JUST_WARNING));
+ CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_WARNING));
}
goto exit_func;
}
@@ -2964,7 +2965,7 @@ static void update_logging(MYSQL_THD thd,
start_logging();
if (!logging)
{
- CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_JUST_WARNING));
+ CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_WARNING));
}
mark_always_logged(thd);
}
diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c
index 93f759b293b..1762690f2c5 100644
--- a/plugin/simple_password_check/simple_password_check.c
+++ b/plugin/simple_password_check/simple_password_check.c
@@ -22,8 +22,8 @@
static unsigned min_length, min_digits, min_letters, min_others;
-static int validate(MYSQL_CONST_LEX_STRING *username,
- MYSQL_CONST_LEX_STRING *password)
+static int validate(const MYSQL_CONST_LEX_STRING *username,
+ const MYSQL_CONST_LEX_STRING *password)
{
unsigned digits=0 , uppers=0 , lowers=0, others=0, length= (unsigned)password->length;
const char *ptr= password->str, *end= ptr + length;
diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf b/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf
index c9d47e40d4b..8f62cfd0cc9 100644
--- a/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf
+++ b/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf
@@ -2,22 +2,23 @@
!include include/default_mysqld.cnf
[mysqld]
-wsrep-on=1
binlog-format=row
innodb-autoinc-lock-mode=2
-wsrep-cluster-address=gcomm://
wsrep_provider=@ENV.WSREP_PROVIDER
[mysqld.1]
#galera_port=@OPT.port
+#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
+wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.1.#galera_port'
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
wsrep_node_name=test-node-1
[mysqld.2]
#galera_port=@OPT.port
+#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result b/plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result
index f33a628d428..f99f27f3539 100644
--- a/plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result
+++ b/plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result
@@ -1,8 +1,10 @@
+connection node_2;
+connection node_1;
# On node 1
connection node_1;
SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS;
-NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID GAP PROTOCOL_VERSION
-<IDX> Synced Primary 2 <CLUSTER_STATE_UUID> 0 <CLUSTER_CONF_ID> NO 3
+NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID PROTOCOL_VERSION
+<IDX> synced primary 2 <CLUSTER_STATE_UUID> 2 <CLUSTER_CONF_ID> 4
SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME;
INDEX UUID NAME ADDRESS
<IDX> <MEMBER_ID> test-node-1 <ADDRESS>
@@ -10,8 +12,8 @@ INDEX UUID NAME ADDRESS
# On node 2
connection node_2;
SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS;
-NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID GAP PROTOCOL_VERSION
-<IDX> Synced Primary 2 <CLUSTER_STATE_UUID> 0 <CLUSTER_CONF_ID> YES 3
+NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID PROTOCOL_VERSION
+<IDX> synced primary 2 <CLUSTER_STATE_UUID> 2 <CLUSTER_CONF_ID> 4
SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME;
INDEX UUID NAME ADDRESS
<IDX> <MEMBER_ID> test-node-1 <ADDRESS>
diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
index 9170a337bf4..c7d4b0adf5b 100644
--- a/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
+++ b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
@@ -4,15 +4,9 @@ use My::Find;
@ISA = qw(My::Suite);
-return "Not run for embedded server" if $::opt_embedded_server;
-
-return "WSREP is not compiled in" if not ::have_wsrep();
-
-return "No wsrep provider library" unless ::have_wsrep_provider();
-
-return ::wsrep_version_message() unless ::check_wsrep_version();
-
-return "No WSREP_INFO plugin" unless $ENV{WSREP_INFO_SO};
+use lib 'suite';
+use wsrep::common;
+return wsrep_not_ok() if wsrep_not_ok();
push @::global_suppressions,
(
diff --git a/plugin/wsrep_info/plugin.cc b/plugin/wsrep_info/plugin.cc
index 1d9b4e2e2de..f78ecdcb68c 100644
--- a/plugin/wsrep_info/plugin.cc
+++ b/plugin/wsrep_info/plugin.cc
@@ -52,37 +52,9 @@
#define COLUMN_WSREP_STATUS_CLUSTER_STATE_SEQNO 5
/* Cluster membership changes */
#define COLUMN_WSREP_STATUS_CLUSTER_CONF_ID 6
-/* Gap between global and local states ? */
-#define COLUMN_WSREP_STATUS_GAP 7
/* Application protocol version */
-#define COLUMN_WSREP_STATUS_PROTO_VERSION 8
+#define COLUMN_WSREP_STATUS_PROTO_VERSION 7
-static const char* get_member_status(wsrep_member_status_t status)
-{
- switch (status)
- {
- case WSREP_MEMBER_UNDEFINED: return "Undefined";
- case WSREP_MEMBER_JOINER: return "Joiner";
- case WSREP_MEMBER_DONOR: return "Donor";
- case WSREP_MEMBER_JOINED: return "Joined";
- case WSREP_MEMBER_SYNCED: return "Synced";
- case WSREP_MEMBER_ERROR: return "Error";
- default: break;
- }
- return "UNKNOWN";
-}
-
-static const char* get_cluster_status(wsrep_view_status_t status)
-{
- switch (status)
- {
- case WSREP_VIEW_PRIMARY: return "Primary";
- case WSREP_VIEW_NON_PRIMARY: return "Non-primary";
- case WSREP_VIEW_DISCONNECTED: return "Disconnected";
- default: break;
- }
- return "UNKNOWN";
-}
static ST_FIELD_INFO wsrep_memb_fields[]=
{
@@ -107,7 +79,6 @@ static ST_FIELD_INFO wsrep_status_fields[]=
0, 0, 0, 0},
{"CLUSTER_CONF_ID", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG,
0, 0, 0, 0},
- {"GAP", 10, MYSQL_TYPE_STRING, 0, 0, 0, 0},
{"PROTOCOL_VERSION", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG,
0, 0, 0, 0},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, 0}
@@ -122,25 +93,26 @@ static int wsrep_memb_fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
wsrep_config_state->lock();
- Dynamic_array<wsrep_member_info_t> *memb_arr=
- wsrep_config_state->get_member_info();
+ const wsrep::view& view(wsrep_config_state->get_view_info());
+ const std::vector<wsrep::view::member>& members(view.members());
+
TABLE *table= tables->table;
- for (unsigned int i= 0; i < memb_arr->elements(); i ++)
+ for (unsigned int i= 0; i < members.size(); i++)
{
- wsrep_member_info_t memb= memb_arr->at(i);
-
table->field[COLUMN_WSREP_MEMB_INDEX]->store(i, 0);
- char uuid[40];
- wsrep_uuid_print(&memb.id, uuid, sizeof(uuid));
- table->field[COLUMN_WSREP_MEMB_UUID]->store(uuid, sizeof(uuid),
+ std::ostringstream os;
+ os << members[i].id();
+ table->field[COLUMN_WSREP_MEMB_UUID]->store(os.str().c_str(),
+ os.str().length(),
system_charset_info);
- table->field[COLUMN_WSREP_MEMB_NAME]->store(memb.name, strlen(memb.name),
+ table->field[COLUMN_WSREP_MEMB_NAME]->store(members[i].name().c_str(),
+ members[i].name().length(),
system_charset_info);
- table->field[COLUMN_WSREP_MEMB_ADDRESS]->store(memb.incoming,
- strlen(memb.incoming),
+ table->field[COLUMN_WSREP_MEMB_ADDRESS]->store(members[i].incoming().c_str(),
+ members[i].incoming().length(),
system_charset_info);
if (schema_table_store_record(thd, table))
@@ -177,35 +149,34 @@ static int wsrep_status_fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
wsrep_config_state->lock();
- wsrep_view_info_t view= wsrep_config_state->get_view_info();
- wsrep_member_status_t status= wsrep_config_state->get_status();
+ const wsrep::view& view= wsrep_config_state->get_view_info();
+ enum wsrep::server_state::state status= wsrep_config_state->get_status();
TABLE *table= tables->table;
table->field[COLUMN_WSREP_STATUS_NODE_INDEX]
- ->store(view.my_idx, 0);
+ ->store(view.own_index(), 0);
table->field[COLUMN_WSREP_STATUS_NODE_STATUS]
- ->store(get_member_status(status), strlen(get_member_status(status)),
+ ->store(to_c_string(status),
+ strlen(to_c_string(status)),
system_charset_info);
table->field[COLUMN_WSREP_STATUS_CLUSTER_STATUS]
- ->store(get_cluster_status(view.status),
- strlen(get_cluster_status(view.status)),
+ ->store(to_c_string(view.status()),
+ strlen(to_c_string(view.status())),
system_charset_info);
- table->field[COLUMN_WSREP_STATUS_CLUSTER_SIZE]->store(view.memb_num, 0);
+ table->field[COLUMN_WSREP_STATUS_CLUSTER_SIZE]->store(view.members().size(), 0);
- char uuid[40];
- wsrep_uuid_print(&view.state_id.uuid, uuid, sizeof(uuid));
+ std::ostringstream os;
+ os << view.state_id().id();
table->field[COLUMN_WSREP_STATUS_CLUSTER_STATE_UUID]
- ->store(uuid, sizeof(uuid), system_charset_info);
+ ->store(os.str().c_str(), os.str().length(), system_charset_info);
table->field[COLUMN_WSREP_STATUS_CLUSTER_STATE_SEQNO]
- ->store(view.state_id.seqno, 0);
- table->field[COLUMN_WSREP_STATUS_CLUSTER_CONF_ID]->store(view.view, 0);
-
- const char *gap= (view.state_gap == true) ? "YES" : "NO";
- table->field[COLUMN_WSREP_STATUS_GAP]->store(gap, strlen(gap),
- system_charset_info);
- table->field[COLUMN_WSREP_STATUS_PROTO_VERSION]->store(view.proto_ver, 0);
+ ->store(view.state_id().seqno().get(), 0);
+ table->field[COLUMN_WSREP_STATUS_CLUSTER_CONF_ID]
+ ->store(view.view_seqno().get(), 0);
+ table->field[COLUMN_WSREP_STATUS_PROTO_VERSION]
+ ->store(view.protocol_version(), 0);
if (schema_table_store_record(thd, table))
rc= 1;
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index bd8aac00012..358045c17ab 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 2017, Oracle and/or its affiliates.
-# Copyright (c) 2011, 2017, MariaDB Corporation
+# Copyright (c) 2011, 2020, 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
@@ -31,7 +31,7 @@ ENDIF()
IF(CAT_EXECUTABLE)
SET(CAT_COMMAND COMMAND
${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}
- ${CAT_EXECUTABLE} mysql_system_tables.sql mysql_system_tables_fix.sql mysql_performance_tables.sql >
+ ${CAT_EXECUTABLE} mysql_system_tables_fix.sql mysql_system_tables.sql mysql_performance_tables.sql >
${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
)
ELSEIF(WIN32)
@@ -39,7 +39,7 @@ ELSEIF(WIN32)
native_outfile )
SET(CAT_COMMAND
COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}
- cmd /c copy /b mysql_system_tables.sql + mysql_system_tables_fix.sql + mysql_performance_tables.sql
+ cmd /c copy /b mysql_system_tables_fix.sql + mysql_system_tables.sql + mysql_performance_tables.sql
${native_outfile} )
ELSE()
MESSAGE(FATAL_ERROR "Cannot concatenate files")
@@ -161,7 +161,7 @@ ELSE()
SET(CHECK_PID "kill -s SIGCONT $PID > /dev/null 2> /dev/null")
ENDIF()
-SET(HOSTNAME "hostname")
+SET(HOSTNAME "uname -n")
SET(MYSQLD_USER "mysql")
SET(MYSQLD_GROUP "mysql")
ENDIF(UNIX)
@@ -249,7 +249,7 @@ IF(WIN32)
# The resulting files will have .pl extension (those are perl scripts)
# Input files with pl.in extension
- SET(PLIN_FILES mysql_config mysql_secure_installation)
+ SET(PLIN_FILES mysql_config)
# Input files with .sh extension
SET(SH_FILES mysql_convert_table_format mysqld_multi mysqldumpslow
diff --git a/scripts/comp_sql.c b/scripts/comp_sql.c
index abd59e85bb5..56023613157 100644
--- a/scripts/comp_sql.c
+++ b/scripts/comp_sql.c
@@ -74,13 +74,22 @@ char *fgets_fn(char *buffer, size_t size, fgets_input_t input, int *error)
return line;
}
+#define MAX_COLUMN 16000
+
static void print_query(FILE *out, const char *query)
{
const char *ptr= query;
+ int column= 0;
fprintf(out, "\"");
while (*ptr)
{
+ if (column >= MAX_COLUMN)
+ {
+ /* Wrap to the next line, tabulated. */
+ fprintf(out, "\"\n \"");
+ column= 2;
+ }
switch(*ptr)
{
case '\n':
@@ -89,18 +98,22 @@ static void print_query(FILE *out, const char *query)
and wrap to the next line, tabulated.
*/
fprintf(out, "\\n\"\n \"");
+ column= 2;
break;
case '\r':
/* Skipped */
break;
case '\"':
fprintf(out, "\\\"");
+ column+=2;
break;
case '\\':
fprintf(out, "\\\\");
+ column+=2;
break;
default:
putc(*ptr, out);
+ column++;
break;
}
ptr++;
diff --git a/scripts/fill_help_tables.sql b/scripts/fill_help_tables.sql
index 71a44358c95..64e84f204a5 100644
--- a/scripts/fill_help_tables.sql
+++ b/scripts/fill_help_tables.sql
@@ -1,3 +1,4 @@
+
-- Copyright (c) 2003, 2008-2012, Oracle and/or its affiliates. All rights reserved.
--
-- This program is free software; you can redistribute it and/or modify
@@ -31,2045 +32,962 @@ delete from help_category;
delete from help_keyword;
delete from help_relation;
+lock tables help_topic write, help_category write, help_keyword write, help_relation write;
insert into help_category (help_category_id,name,parent_category_id,url) values (1,'Geographic',0,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (2,'Polygon properties',34,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (2,'Polygon Properties',34,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (3,'WKT',34,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (4,'Numeric Functions',38,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (5,'Plugins',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (6,'MBR',34,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (7,'Control flow functions',38,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (7,'Control Flow Functions',38,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (8,'Transactions',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (9,'Help Metadata',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (10,'Account Management',35,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (11,'Point properties',34,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (11,'Point Properties',34,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (12,'Encryption Functions',38,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (13,'LineString properties',34,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (13,'LineString Properties',34,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (14,'Miscellaneous Functions',38,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (15,'Logical operators',38,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (15,'Logical Operators',38,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (16,'Functions and Modifiers for Use with GROUP BY',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (17,'Information Functions',38,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (18,'Comparison operators',38,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (18,'Comparison Operators',38,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (19,'Bit Functions',38,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (20,'Table Maintenance',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (21,'User-Defined Functions',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (22,'Data Types',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (23,'Compound Statements',35,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (24,'Geometry constructors',34,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (25,'GeometryCollection properties',1,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (24,'Geometry Constructors',34,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (25,'GeometryCollection Properties',1,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (26,'Administration',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (27,'Data Manipulation',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (28,'Utility',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (29,'Language Structure',35,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (30,'Geometry relations',34,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (30,'Geometry Relations',34,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (31,'Date and Time Functions',38,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (32,'WKB',34,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (33,'Procedures',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (34,'Geographic Features',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (35,'Contents',0,'');
-insert into help_category (help_category_id,name,parent_category_id,url) values (36,'Geometry properties',34,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (36,'Geometry Properties',34,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (37,'String Functions',38,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (38,'Functions',35,'');
insert into help_category (help_category_id,name,parent_category_id,url) values (39,'Data Definition',35,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (40,'Sequences',35,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (41,'JSON Functions',38,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (42,'Window Functions',38,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (43,'Spider Functions',38,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (44,'Dynamic Column Functions',38,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (45,'Storage Engines',35,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (46,'InnoDB',45,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (47,'Optimization and Indexes',35,'');
+insert into help_category (help_category_id,name,parent_category_id,url) values (48,'Full-text Indexes',47,'');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (0,16,'MIN','Syntax:\nMIN([DISTINCT] expr)\n\nReturns the minimum value of expr. MIN() may take a string argument; in\nsuch cases, it returns the minimum string value.\nThe DISTINCT keyword can be used to find the minimum of the distinct values\nof expr, however, this produces the same result as omitting DISTINCT.\n\nMIN() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/min/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/min/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (1,27,'JOIN','MySQL supports the following JOIN syntaxes for the table_references\npart of SELECT statements and multiple-table DELETE and UPDATE\nstatements:\n\ntable_references:\n table_reference [, table_reference] ...\n\ntable_reference:\n table_factor\n | join_table\n\ntable_factor:\n tbl_name [[AS] alias] [index_hint_list]\n | table_subquery [AS] alias\n | ( table_references )\n | { OJ table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n\njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor [join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON conditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor\n\njoin_condition:\n ON conditional_expr\n | USING (column_list)\n\nindex_hint_list:\n index_hint [, index_hint] ...\n\nindex_hint:\n USE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n\nindex_list:\n index_name [, index_name] ...\n\nA table reference is also known as a join expression.\n\nThe syntax of table_factor is extended in comparison with the SQL\nStandard. The latter accepts only table_reference, not a list of them\ninside a pair of parentheses.\n\nThis is a conservative extension if we consider each comma in a list of\ntable_reference items as equivalent to an inner join. For example:\n\nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nis equivalent to:\n\nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nIn MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n(they can replace each other). In standard SQL, they are not\nequivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used\notherwise.\n\nIn general, parentheses can be ignored in join expressions containing\nonly inner join operations.\n\nIndex hints can be specified to affect how the MySQL optimizer makes\nuse of indexes. For more information, see\nhttps://mariadb.com/kb/en/how-to-force-query-plans/.\n\nURL: https://mariadb.com/kb/en/join-syntax/\n\n','SELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\n WHERE right_tbl.id IS NULL;\n','https://mariadb.com/kb/en/join-syntax/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (2,37,'HEX','Syntax:\nHEX(str), HEX(N)\n\nFor a string argument str, HEX() returns a hexadecimal string\nrepresentation of str where each character in str is converted to two\nhexadecimal digits. The inverse of this operation is performed by the\nUNHEX() function.\n\nFor a numeric argument N, HEX() returns a hexadecimal string\nrepresentation of the value of N treated as a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16). The inverse of this operation is\nperformed by CONV(HEX(N),16,10).\n\nURL: https://mariadb.com/kb/en/hex/\n\n','MariaDB> SELECT 0x616263, HEX(\'abc\'), UNHEX(HEX(\'abc\'));\n -> \'abc\', 616263, \'abc\'\nMariaDB> SELECT HEX(255), CONV(HEX(255),16,10);\n -> \'FF\', 255\n','https://mariadb.com/kb/en/hex/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (3,27,'REPLACE','Syntax:\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n\nREPLACE works exactly like INSERT, except that if an old row in the\ntable has the same value as a new row for a PRIMARY KEY or a UNIQUE\nindex, the old row is deleted before the new row is inserted. See [HELP\nINSERT].\n\nREPLACE is a MySQL extension to the SQL standard. It either inserts, or\ndeletes and inserts. For another MySQL extension to standard SQL---that\neither inserts or updates---see\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nNote that unless the table has a PRIMARY KEY or UNIQUE index, using a\nREPLACE statement makes no sense. It becomes equivalent to INSERT,\nbecause there is no index to be used to determine whether a new row\nduplicates another.\n\nValues for all columns are taken from the values specified in the\nREPLACE statement. Any missing columns are set to their default values,\njust as happens for INSERT. You cannot refer to values from the current\nrow and use them in the new row. If you use an assignment such as SET\ncol_name = col_name + 1, the reference to the column name on the right\nhand side is treated as DEFAULT(col_name), so the assignment is\nequivalent to SET col_name = DEFAULT(col_name) + 1.\n\nTo use REPLACE, you must have both the INSERT and DELETE privileges for\nthe table.\n\nURL: https://mariadb.com/kb/en/replace/\n\n','','https://mariadb.com/kb/en/replace/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (4,30,'CONTAINS','Contains(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 completely contains g2. This\ntests the opposite relationship as Within().\n\nURL: https://mariadb.com/kb/en/contains/\n\n','','https://mariadb.com/kb/en/contains/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (5,36,'SRID','SRID(g)\n\nReturns an integer indicating the Spatial Reference System ID for the\ngeometry value g.\n\nIn MySQL, the SRID value is just an integer associated with the\ngeometry value. All calculations are done assuming Euclidean (planar)\ngeometry.\n\nURL: https://mariadb.com/kb/en/srid/\n\n','MariaDB> SELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n','https://mariadb.com/kb/en/srid/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (6,31,'CURRENT_TIMESTAMP','Syntax:\nCURRENT_TIMESTAMP, CURRENT_TIMESTAMP()\n\nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/current_timestamp/\n\n','','https://mariadb.com/kb/en/current_timestamp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (7,26,'SHOW CONTRIBUTORS','Syntax:\nSHOW CONTRIBUTORS\n\nThe SHOW CONTRIBUTORS statement displays information about the people\nwho contribute to MySQL source or to causes that we support. For each\ncontributor, it displays Name, Location, and Comment values.\n\nURL: https://mariadb.com/kb/en/show-contributors/\n\n','','https://mariadb.com/kb/en/show-contributors/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (8,16,'VARIANCE','Syntax:\nVARIANCE(expr)\n\nReturns the population standard variance of expr. This is an extension\nto standard SQL. The standard SQL function VAR_POP() can be used\ninstead.\n\nVARIANCE() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/variance/\n\n','','https://mariadb.com/kb/en/variance/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (9,39,'DROP SERVER','Syntax:\nDROP SERVER [ IF EXISTS ] server_name\n\nDrops the server definition for the server named server_name. The\ncorresponding row within the mysql.servers table will be deleted. This\nstatement requires the SUPER privilege.\n\nDropping a server for a table does not affect any FEDERATED tables that\nused this connection information when they were created. See [HELP\nCREATE SERVER].\n\nURL: https://mariadb.com/kb/en/drop-server/\n\n','','https://mariadb.com/kb/en/drop-server/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (10,26,'SHOW AUTHORS','Syntax:\nSHOW AUTHORS\n\nThe SHOW AUTHORS statement displays information about the people who\nwork on MySQL. For each author, it displays Name, Location, and Comment\nvalues.\n\nURL: https://mariadb.com/kb/en/show-authors/\n\n','','https://mariadb.com/kb/en/show-authors/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (11,16,'VAR_SAMP','Syntax:\nVAR_SAMP(expr)\n\nReturns the sample variance of expr. That is, the denominator is the\nnumber of rows minus one.\n\nVAR_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_samp/\n\n','','https://mariadb.com/kb/en/var_samp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (12,37,'CONCAT','Syntax:\nCONCAT(str1,str2,...)\n\nReturns the string that results from concatenating the arguments. May\nhave one or more arguments. If all arguments are nonbinary strings, the\nresult is a nonbinary string. If the arguments include any binary\nstrings, the result is a binary string. A numeric argument is converted\nto its equivalent string form. This is a nonbinary string as of MySQL\n5.5.3. Before 5.5.3, it is a binary string; to to avoid that and\nproduce a nonbinary string, you can use an explicit type cast, as in\nthis example:\n\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n\nCONCAT() returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/concat/\n\n','MariaDB> SELECT CONCAT(\'My\', \'S\', \'QL\');\n -> \'MySQL\'\nMariaDB> SELECT CONCAT(\'My\', NULL, \'QL\');\n -> NULL\nMariaDB> SELECT CONCAT(14.3);\n -> \'14.3\'\n','https://mariadb.com/kb/en/concat/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (13,34,'GEOMETRY HIERARCHY','Geometry is the base class. It is an abstract class. The instantiable\nsubclasses of Geometry are restricted to zero-, one-, and\ntwo-dimensional geometric objects that exist in two-dimensional\ncoordinate space. All instantiable geometry classes are defined so that\nvalid instances of a geometry class are topologically closed (that is,\nall defined geometries include their boundary).\n\nThe base Geometry class has subclasses for Point, Curve, Surface, and\nGeometryCollection:\n\no Point represents zero-dimensional objects.\n\no Curve represents one-dimensional objects, and has subclass\n LineString, with sub-subclasses Line and LinearRing.\n\no Surface is designed for two-dimensional objects and has subclass\n Polygon.\n\no GeometryCollection has specialized zero-, one-, and two-dimensional\n collection classes named MultiPoint, MultiLineString, and\n MultiPolygon for modeling geometries corresponding to collections of\n Points, LineStrings, and Polygons, respectively. MultiCurve and\n MultiSurface are introduced as abstract superclasses that generalize\n the collection interfaces to handle Curves and Surfaces.\n\nGeometry, Curve, Surface, MultiCurve, and MultiSurface are defined as\nnoninstantiable classes. They define a common set of methods for their\nsubclasses and are included for extensibility.\n\nPoint, LineString, Polygon, GeometryCollection, MultiPoint,\nMultiLineString, and MultiPolygon are instantiable classes.\n\nURL: https://mariadb.com/kb/en/geometry-hierarchy/\n\n','','https://mariadb.com/kb/en/geometry-hierarchy/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (14,37,'CHAR FUNCTION','Syntax:\nCHAR(N,... [USING charset_name])\n\nCHAR() interprets each argument N as an integer and returns a string\nconsisting of the characters given by the code values of those\nintegers. NULL values are skipped.\nBy default, CHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n\nMariaDB> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n\nIf USING is given and the result string is illegal for the given\ncharacter set, a warning is issued. Also, if strict SQL mode is\nenabled, the result from CHAR() becomes NULL.\n\nURL: https://mariadb.com/kb/en/char-function/\n\n','MariaDB> SELECT CHAR(77,121,83,81,\'76\');\n -> \'MySQL\'\nMariaDB> SELECT CHAR(77,77.3,\'77.3\');\n -> \'MMM\'\n','https://mariadb.com/kb/en/char-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (15,22,'DATETIME','DATETIME\n\nA date and time combination. The supported range is \'1000-01-01\n00:00:00\' to \'9999-12-31 23:59:59\'. MySQL displays DATETIME values in\n\'YYYY-MM-DD HH:MM:SS\' format, but permits assignment of values to\nDATETIME columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/datetime/\n\n','','https://mariadb.com/kb/en/datetime/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (16,26,'SHOW CREATE TRIGGER','Syntax:\nSHOW CREATE TRIGGER trigger_name\n\nThis statement shows a CREATE TRIGGER statement that creates the given\ntrigger.\n\nURL: https://mariadb.com/kb/en/show-create-trigger/\n\n','','https://mariadb.com/kb/en/show-create-trigger/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (17,26,'SHOW CREATE PROCEDURE','Syntax:\nSHOW CREATE PROCEDURE proc_name\n\nThis statement is a MySQL extension. It returns the exact string that\ncan be used to re-create the named stored procedure. A similar\nstatement, SHOW CREATE FUNCTION, displays information about stored\nfunctions (see [HELP SHOW CREATE FUNCTION]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table. If you do not have privileges\nfor the routine itself, the value displayed for the Create Procedure or\nCreate Function field will be NULL.\n\nURL: https://mariadb.com/kb/en/show-create-procedure/\n\n','MariaDB> SHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row ***************************\n Procedure: simpleproc\n sql_mode:\n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nMariaDB> SHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row ***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-procedure/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (18,23,'OPEN','Syntax:\nOPEN cursor_name\n\nThis statement opens a previously declared cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/open/\n\n','','https://mariadb.com/kb/en/open/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (19,22,'INTEGER','INTEGER[(M)] [UNSIGNED] [ZEROFILL]\n\nThis type is a synonym for INT.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-int\n\n','','https://mariadb.com/kb/en/sql_language-data_types-int');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (20,37,'LOWER','Syntax:\nLOWER(str)\n\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT LOWER(\'QUADRATICALLY\');\n -> \'quadratically\'\n\nLOWER() (and UPPER()) are ineffective when applied to binary strings\n(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert\nthe string to a nonbinary string:\n\nMariaDB> SET @str = BINARY \'New York\';\nMariaDB> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+-------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+-------------+-----------------------------------+\n| New York | new york |\n+-------------+-----------------------------------+\n\nURL: https://mariadb.com/kb/en/lower/\n\n','','https://mariadb.com/kb/en/lower/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (21,26,'SHOW COLUMNS','Syntax:\nSHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW COLUMNS displays information about the columns in a given table.\nIt also works for views. The LIKE clause, if present, indicates which\ncolumn names to match. The WHERE clause can be given to select rows\nusing more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nSHOW COLUMNS displays information only for those columns for which you\nhave some privilege.\n\nMariaDB> SHOW COLUMNS FROM City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nIf the data types differ from what you expect them to be based on a\nCREATE TABLE statement, note that MySQL sometimes changes data types\nwhen you create or alter a table. The conditions under which this\noccurs are described in\nhttps://mariadb.com/kb/en/silent-column-changes/.\n\nThe FULL keyword causes the output to include the column collation and\ncomments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. In other words, these two statements are equivalent:\n\nMariaDB> SHOW COLUMNS FROM mytable FROM mydb;\nMariaDB> SHOW COLUMNS FROM mydb.mytable;\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for nonbinary string columns, or NULL\nfor other columns. This value is displayed only if you use the FULL\nkeyword.\n\nThe Null field contains YES if NULL values can be stored in the column,\nNO if not.\n\nThe Key field indicates whether the column is indexed:\n\no If Key is empty, the column either is not indexed or is indexed only\n as a secondary column in a multiple-column, nonunique index.\n\no If Key is PRI, the column is a PRIMARY KEY or is one of the columns\n in a multiple-column PRIMARY KEY.\n\no If Key is UNI, the column is the first column of a UNIQUE index. (A\n UNIQUE index permits multiple NULL values, but you can tell whether\n the column permits NULL by checking the Null field.)\n\no If Key is MUL, the column is the first column of a nonunique index in\n which multiple occurrences of a given value are permitted within the\n column.\n\nIf more than one of the Key values applies to a given column of a\ntable, Key displays the one with the highest priority, in the order\nPRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values\nand there is no PRIMARY KEY in the table. A UNIQUE index may display as\nMUL if several columns form a composite UNIQUE index; although the\ncombination of the columns is unique, each column can still hold\nmultiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the\ncolumn. This is NULL if the column has an explicit default of NULL, or\nif the column definition has no DEFAULT clause.\n\nThe Extra field contains any additional information that is available\nabout a given column. The value is nonempty in these cases:\nauto_increment for columns that have the AUTO_INCREMENT attribute; on\nupdate CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE\nCURRENT_TIMESTAMP attribute.\n\nPrivileges indicates the privileges you have for the column. This value\nis displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed\nonly if you use the FULL keyword.\n\nSHOW FIELDS is a synonym for SHOW COLUMNS. You can also list a table\'s\ncolumns with the mysqlshow db_name tbl_name command.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS.\nSee [HELP DESCRIBE].\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements\nalso provide information about tables. See [HELP SHOW].\n\nURL: https://mariadb.com/kb/en/show-columns/\n\n','','https://mariadb.com/kb/en/show-columns/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (22,39,'CREATE TRIGGER','Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n TRIGGER trigger_name trigger_time trigger_event\n ON tbl_name FOR EACH ROW trigger_body\n\nThis statement creates a new trigger. A trigger is a named database\nobject that is associated with a table, and that activates when a\nparticular event occurs for the table. The trigger becomes associated\nwith the table named tbl_name, which must refer to a permanent table.\nYou cannot associate a trigger with a TEMPORARY table or a view.\n\nCREATE TRIGGER requires the TRIGGER privilege for the table associated\nwith the trigger. The statement might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section. If\nbinary logging is enabled, CREATE TRIGGER might require the SUPER\nprivilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nThe DEFINER clause determines the security context to be used when\nchecking access privileges at trigger activation time. See later in\nthis section for more information.\n\ntrigger_time is the trigger action time. It can be BEFORE or AFTER to\nindicate that the trigger activates before or after each row to be\nmodified.\n\ntrigger_event indicates the kind of statement that activates the\ntrigger. The trigger_event can be one of the following:\n\no INSERT: The trigger is activated whenever a new row is inserted into\n the table; for example, through INSERT, LOAD DATA, and REPLACE\n statements.\n\no UPDATE: The trigger is activated whenever a row is modified; for\n example, through UPDATE statements.\n\no DELETE: The trigger is activated whenever a row is deleted from the\n table; for example, through DELETE and REPLACE statements. However,\n DROP TABLE and TRUNCATE TABLE statements on the table do not activate\n this trigger, because they do not use DELETE. Dropping a partition\n does not activate DELETE triggers, either. See [HELP TRUNCATE TABLE].\n\nURL: https://mariadb.com/kb/en/create-trigger/\n\n','','https://mariadb.com/kb/en/create-trigger/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (23,31,'MONTH','Syntax:\nMONTH(date)\n\nReturns the month for date, in the range 1 to 12 for January to\nDecember, or 0 for dates such as \'0000-00-00\' or \'2008-00-00\' that have\na zero month part.\n\nURL: https://mariadb.com/kb/en/month/\n\n','MariaDB> SELECT MONTH(\'2008-02-03\');\n -> 2\n','https://mariadb.com/kb/en/month/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (24,22,'TINYINT','TINYINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA very small integer. The signed range is -128 to 127. The unsigned\nrange is 0 to 255.\n\nURL: https://mariadb.com/kb/en/tinyint/\n\n','','https://mariadb.com/kb/en/tinyint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (25,26,'SHOW TRIGGERS','Syntax:\nSHOW TRIGGERS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a\ndatabase (the default database unless a FROM clause is given). This\nstatement returns results only for databases and tables for which you\nhave the TRIGGER privilege. The LIKE clause, if present, indicates\nwhich table names to match and causes the statement to display triggers\nfor those tables. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nFor the trigger ins_sum as defined in\nhttps://mariadb.com/kb/en/triggers/, the output of\nthis statement is as shown here:\n\nMariaDB> SHOW TRIGGERS LIKE \'acc%\'\\G\n*************************** 1. row ***************************\n Trigger: ins_sum\n Event: INSERT\n Table: account\n Statement: SET @sum = @sum + NEW.amount\n Timing: BEFORE\n Created: NULL\n sql_mode:\n Definer: myname@localhost\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\ncharacter_set_client is the session value of the character_set_client\nsystem variable when the trigger was created. collation_connection is\nthe session value of the collation_connection system variable when the\ntrigger was created. Database Collation is the collation of the\ndatabase with which the trigger is associated.\n\nURL: https://mariadb.com/kb/en/show-triggers/\n\n','','https://mariadb.com/kb/en/show-triggers/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (26,14,'MASTER_POS_WAIT','Syntax:\nMASTER_POS_WAIT(log_name,log_pos[,timeout])\n\nThis function is useful for control of master/slave synchronization. It\nblocks until the slave has read and applied all updates up to the\nspecified position in the master log. The return value is the number of\nlog events the slave had to wait for to advance to the specified\nposition. The function returns NULL if the slave SQL thread is not\nstarted, the slave\'s master information is not initialized, the\narguments are incorrect, or an error occurs. It returns -1 if the\ntimeout has been exceeded. If the slave SQL thread stops while\nMASTER_POS_WAIT() is waiting, the function returns NULL. If the slave\nis past the specified position, the function returns immediately.\n\nIf a timeout value is specified, MASTER_POS_WAIT() stops waiting when\ntimeout seconds have elapsed. timeout must be greater than 0; a zero or\nnegative timeout means no timeout.\n\nURL: https://mariadb.com/kb/en/master_pos_wait/\n\n','','https://mariadb.com/kb/en/master_pos_wait/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (27,37,'REGEXP','Syntax:\nexpr REGEXP pat, expr RLIKE pat\n\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression. The syntax for\nregular expressions is discussed in\nhttps://mariadb.com/kb/en/regexp/. Returns 1 if expr\nmatches pat; otherwise it returns 0. If either expr or pat is NULL, the\nresult is NULL. RLIKE is a synonym for REGEXP, provided for mSQL\ncompatibility.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\n*Note*: Because MySQL uses the C escape syntax in strings (for example,\n"\\n" to represent the newline character), you must double any "\\" that\nyou use in your REGEXP strings.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nURL: https://mariadb.com/kb/en/regexp/\n\n','MariaDB> SELECT \'Monty!\' REGEXP \'.*\';\n -> 1\nMariaDB> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n -> 1\nMariaDB> SELECT \'a\' REGEXP \'A\', \'a\' REGEXP BINARY \'A\';\n -> 1 0\nMariaDB> SELECT \'a\' REGEXP \'^[a-d]\';\n -> 1\n','https://mariadb.com/kb/en/regexp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (28,23,'IF STATEMENT','Syntax:\nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF\n\nThe IF statement for stored programs implements a basic conditional\nconstruct.\n\n*Note*: There is also an IF() function, which differs from the IF\nstatement described here. See\nhttps://mariadb.com/kb/en/if-function/. The\nIF statement can have THEN, ELSE, and ELSEIF clauses, and it is\nterminated with END IF.\n\nIf the search_condition evaluates to true, the corresponding THEN or\nELSEIF clause statement_list executes. If no search_condition matches,\nthe ELSE clause statement_list executes.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nURL: https://mariadb.com/kb/en/if-statement/\n\n','','https://mariadb.com/kb/en/if-statement/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (29,19,'^','Syntax:\n^\n\nBitwise XOR:\n\nURL: https://mariadb.com/kb/en/bitwise-xor/\n\n','MariaDB> SELECT 1 ^ 1;\n -> 0\nMariaDB> SELECT 1 ^ 0;\n -> 1\nMariaDB> SELECT 11 ^ 3;\n -> 8\n','https://mariadb.com/kb/en/bitwise-xor/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (30,39,'DROP VIEW','Syntax:\nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n\nDROP VIEW removes one or more views. You must have the DROP privilege\nfor each view. If any of the views named in the argument list do not\nexist, MySQL returns an error indicating by name which nonexisting\nviews it was unable to drop, but it also drops all of the views in the\nlist that do exist.\n\nThe IF EXISTS clause prevents an error from occurring for views that\ndon\'t exist. When this clause is given, a NOTE is generated for each\nnonexistent view. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE, if given, are parsed and ignored.\n\nURL: https://mariadb.com/kb/en/drop-view/\n\n','','https://mariadb.com/kb/en/drop-view/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (31,30,'WITHIN','Within(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially within g2. This\ntests the opposite relationship as Contains().\n\nURL: https://mariadb.com/kb/en/within/\n\n','','https://mariadb.com/kb/en/within/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (32,31,'WEEK','Syntax:\nWEEK(date[,mode])\n\nThis function returns the week number for date. The two-argument form\nof WEEK() enables you to specify whether the week starts on Sunday or\nMonday and whether the return value should be in the range from 0 to 53\nor from 1 to 53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/week/\n\n','MariaDB> SELECT WEEK(\'2008-02-20\');\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',0);\n -> 7\nMariaDB> SELECT WEEK(\'2008-02-20\',1);\n -> 8\nMariaDB> SELECT WEEK(\'2008-12-31\',1);\n -> 53\n','https://mariadb.com/kb/en/week/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (33,26,'SHOW PLUGINS','Syntax:\nSHOW PLUGINS\n\nSHOW PLUGINS displays information about server plugins. Plugin\ninformation is also available in the INFORMATION_SCHEMA.PLUGINS table.\nSee https://mariadb.com/kb/en/information_schemaplugins-table/.\n\nExample of SHOW PLUGINS output:\n\nMariaDB> SHOW PLUGINS\\G\n*************************** 1. row ***************************\n Name: binlog\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 2. row ***************************\n Name: CSV\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 3. row ***************************\n Name: MEMORY\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 4. row ***************************\n Name: MyISAM\n Status: ACTIVE\n Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n...\n\nURL: https://mariadb.com/kb/en/show-plugins/\n\n','','https://mariadb.com/kb/en/show-plugins/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (34,21,'DROP FUNCTION UDF','Syntax:\nDROP FUNCTION function_name\n\nThis statement drops the user-defined function (UDF) named\nfunction_name.\n\nTo drop a function, you must have the DELETE privilege for the mysql\ndatabase. This is because DROP FUNCTION removes a row from the\nmysql.func system table that records the function\'s name, type, and\nshared library name.\n\nURL: https://mariadb.com/kb/en/drop-function-udf/\n\n','','https://mariadb.com/kb/en/drop-function-udf/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (35,8,'PREPARE','Syntax:\nPREPARE stmt_name FROM preparable_stmt\n\nThe PREPARE statement prepares a statement and assigns it a name,\nstmt_name, by which to refer to the statement later. Statement names\nare not case sensitive. preparable_stmt is either a string literal or a\nuser variable that contains the text of the statement. The text must\nrepresent a single SQL statement, not multiple statements. Within the\nstatement, "?" characters can be used as parameter markers to indicate\nwhere data values are to be bound to the query later when you execute\nit. The "?" characters should not be enclosed within quotation marks,\neven if you intend to bind them to string values. Parameter markers can\nbe used only where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n\nIf a prepared statement with the given name already exists, it is\ndeallocated implicitly before the new statement is prepared. This means\nthat if the new statement contains an error and cannot be prepared, an\nerror is returned and no statement with the given name exists.\n\nA prepared statement is executed with EXECUTE and released with\nDEALLOCATE PREPARE.\n\nThe scope of a prepared statement is the session within which it is\ncreated. Other sessions cannot see it.\n\nURL: https://mariadb.com/kb/en/prepare-statement/\n\n','','https://mariadb.com/kb/en/prepare-statement/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (36,8,'LOCK','Syntax:\nLOCK TABLES\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n\nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n\nUNLOCK TABLES\n\nMySQL enables client sessions to acquire table locks explicitly for the\npurpose of cooperating with other sessions for access to tables, or to\nprevent other sessions from modifying tables during periods when a\nsession requires exclusive access to them. A session can acquire or\nrelease locks only for itself. One session cannot acquire locks for\nanother session or release locks held by another session.\n\nLocks may be used to emulate transactions or to get more speed when\nupdating tables. This is explained in more detail later in this\nsection.\n\nLOCK TABLES explicitly acquires table locks for the current client\nsession. Table locks can be acquired for base tables or views. You must\nhave the LOCK TABLES privilege, and the SELECT privilege for each\nobject to be locked.\n\nFor view locking, LOCK TABLES adds all base tables used in the view to\nthe set of tables to be locked and locks them automatically. If you\nlock a table explicitly with LOCK TABLES, any tables used in triggers\nare also locked implicitly, as described in\nhttps://mariadb.com/kb/en/triggers-and-implicit-locks/.\n\nUNLOCK TABLES explicitly releases any table locks held by the current\nsession. LOCK TABLES implicitly releases any table locks held by the\ncurrent session before acquiring new locks.\n\nAnother use for UNLOCK TABLES is to release the global read lock\nacquired with the FLUSH TABLES WITH READ LOCK statement, which enables\nyou to lock all tables in all databases. See [HELP FLUSH]. (This is a\nvery convenient way to get backups if you have a file system such as\nVeritas that can take snapshots in time.)\n\nURL: https://mariadb.com/kb/en/transactions-lock/\n\n','','https://mariadb.com/kb/en/transactions-lock/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (37,37,'UPDATEXML','Syntax:\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nThis function replaces a single portion of a given fragment of XML\nmarkup xml_target with a new XML fragment new_xml, and then returns the\nchanged XML. The portion of xml_target that is replaced matches an\nXPath expression xpath_expr supplied by the user. In MySQL 5.5, the\nXPath expression can contain at most 127 characters. (This limitation\nis lifted in MySQL 5.6.)\n\nIf no expression matching xpath_expr is found, or if multiple matches\nare found, the function returns the original xml_target XML fragment.\nAll three arguments should be strings.\n\nURL: https://mariadb.com/kb/en/updatexml/\n\n','MariaDB> SELECT\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a\', \'<e>fff</e>\') AS val1,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/b\', \'<e>fff</e>\') AS val2,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'//b\', \'<e>fff</e>\') AS val3,\n -> UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val4,\n -> UpdateXML(\'<a><d></d><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val5\n -> \\G\n\n*************************** 1. row ***************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n','https://mariadb.com/kb/en/updatexml/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (38,8,'RESET SLAVE','Syntax:\nRESET SLAVE [ALL]\n\nRESET SLAVE makes the slave forget its replication position in the\nmaster\'s binary log. This statement is meant to be used for a clean\nstart: It deletes the master.info and relay-log.info files, all the\nrelay log files, and starts a new relay log file. To use RESET SLAVE,\nthe slave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\n*Note*: All relay log files are deleted, even if they have not been\ncompletely executed by the slave SQL thread. (This is a condition\nlikely to exist on a replication slave if you have issued a STOP SLAVE\nstatement or if the slave is highly loaded.)\n\nIn MySQL 5.5 (unlike the case in MySQL 5.1 and earlier), RESET SLAVE\ndoes not change any replication connection parameters such as master\nhost, master port, master user, or master password, which are retained\nin memory. This means that START SLAVE can be issued without requiring\na CHANGE MASTER TO statement following RESET SLAVE.\n\nIn MySQL 5.5.16 and later, you can use RESET SLAVE ALL to reset these\nconnection parameters (Bug #11809016). Connection parameters are also\nreset if the slave mysqld is shut down.\n\nIf the slave SQL thread was in the middle of replicating temporary\ntables when it was stopped, and RESET SLAVE is issued, these replicated\ntemporary tables are deleted on the slave.\n\nURL: https://mariadb.com/kb/en/reset-slave-connection_name/\n\n','','https://mariadb.com/kb/en/reset-slave-connection_name/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (39,26,'SHOW BINARY LOGS','Syntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [HELP PURGE BINARY LOGS], that shows\nhow to determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/show-binary-logs/\n\n','','https://mariadb.com/kb/en/show-binary-logs/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (40,24,'POLYGON','Polygon(ls1,ls2,...)\n\nConstructs a Polygon value from a number of LineString or WKB\nLineString arguments. If any argument does not represent a LinearRing\n(that is, not a closed and simple LineString), the return value is\nNULL.\n\nURL: https://mariadb.com/kb/en/polygon/\n\n','','https://mariadb.com/kb/en/polygon/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (41,31,'MINUTE','Syntax:\nMINUTE(time)\n\nReturns the minute for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/minute/\n\n','MariaDB> SELECT MINUTE(\'2008-02-03 10:05:03\');\n -> 5\n','https://mariadb.com/kb/en/minute/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (42,31,'DAY','Syntax:\nDAY(date)\n\nDAY() is a synonym for DAYOFMONTH().\n\nURL: https://mariadb.com/kb/en/day/\n\n','','https://mariadb.com/kb/en/day/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (43,37,'MID','Syntax:\nMID(str,pos,len)\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n\nURL: https://mariadb.com/kb/en/mid/\n\n','','https://mariadb.com/kb/en/mid/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (44,14,'UUID','Syntax:\nUUID()\n\nReturns a Universal Unique Identifier (UUID) generated according to\n"DCE 1.1: Remote Procedure Call" (Appendix A) CAE (Common Applications\nEnvironment) Specifications published by The Open Group in October 1997\n(Document Number C706,\nhttp://www.opengroup.org/public/pubs/catalog/c706.htm).\n\nA UUID is designed as a number that is globally unique in space and\ntime. Two calls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate computers\nthat are not connected to each other.\n\nA UUID is a 128-bit number represented by a utf8 string of five\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:\n\no The first three numbers are generated from a timestamp.\n\no The fourth number preserves temporal uniqueness in case the timestamp\n value loses monotonicity (for example, due to daylight saving time).\n\no The fifth number is an IEEE 802 node number that provides spatial\n uniqueness. A random number is substituted if the latter is not\n available (for example, because the host computer has no Ethernet\n card, or we do not know how to find the hardware address of an\n interface on your operating system). In this case, spatial uniqueness\n cannot be guaranteed. Nevertheless, a collision should have very low\n probability.\n\n Currently, the MAC address of an interface is taken into account only\n on FreeBSD and Linux. On other operating systems, MySQL uses a\n randomly generated 48-bit number.\n\nURL: https://mariadb.com/kb/en/uuid/\n\n','MariaDB> SELECT UUID();\n -> \'6ccd780c-baba-1026-9564-0040f4311e29\'\n','https://mariadb.com/kb/en/uuid/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (45,24,'LINESTRING','LineString(pt1,pt2,...)\n\nConstructs a LineString value from a number of Point or WKB Point\narguments. If the number of arguments is less than two, the return\nvalue is NULL.\n\nURL: https://mariadb.com/kb/en/linestring/\n\n','','https://mariadb.com/kb/en/linestring/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (46,14,'SLEEP','Syntax:\nSLEEP(duration)\n\nSleeps (pauses) for the number of seconds given by the duration\nargument, then returns 0. If SLEEP() is interrupted, it returns 1. The\nduration may have a fractional part given in microseconds.\n\nURL: https://mariadb.com/kb/en/sleep/\n\n','','https://mariadb.com/kb/en/sleep/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (47,17,'CONNECTION_ID','Syntax:\nCONNECTION_ID()\n\nReturns the connection ID (thread ID) for the connection. Every\nconnection has an ID that is unique among the set of currently\nconnected clients.\n\nURL: https://mariadb.com/kb/en/connection_id/\n\n','MariaDB> SELECT CONNECTION_ID();\n -> 23786\n','https://mariadb.com/kb/en/connection_id/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (48,27,'DELETE','Syntax:\nSingle-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n\nOr:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n\nFor the single-table syntax, the DELETE statement deletes rows from\ntbl_name and returns a count of the number of deleted rows. This count\ncan be obtained by calling the ROW_COUNT() function (see\nhttps://mariadb.com/kb/en/information-functions-row_count/). The\nWHERE clause, if given, specifies the conditions that identify which\nrows to delete. With no WHERE clause, all rows are deleted. If the\nORDER BY clause is specified, the rows are deleted in the order that is\nspecified. The LIMIT clause places a limit on the number of rows that\ncan be deleted.\n\nFor the multiple-table syntax, DELETE deletes from each tbl_name the\nrows that satisfy the conditions. In this case, ORDER BY and LIMIT\ncannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe deleted. It is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nCurrently, you cannot delete from a table and select from the same\ntable in a subquery.\n\nYou need the DELETE privilege on a table to delete rows from it. You\nneed only the SELECT privilege for any columns that are only read, such\nas those named in the WHERE clause.\n\nAs stated, a DELETE statement with no WHERE clause deletes all rows. A\nfaster way to do this, when you do not need to know the number of\ndeleted rows, is to use TRUNCATE TABLE. However, within a transaction\nor if you have a lock on the table, TRUNCATE TABLE cannot be used\nwhereas DELETE can. See [HELP TRUNCATE TABLE], and [HELP LOCK].\n\nURL: https://mariadb.com/kb/en/delete/\n\n','','https://mariadb.com/kb/en/delete/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (49,4,'ROUND','Syntax:\nROUND(X), ROUND(X,D)\n\nRounds the argument X to D decimal places. The rounding algorithm\ndepends on the data type of X. D defaults to 0 if not specified. D can\nbe negative to cause D digits left of the decimal point of the value X\nto become zero.\n\nURL: https://mariadb.com/kb/en/round/\n\n','MariaDB> SELECT ROUND(-1.23);\n -> -1\nMariaDB> SELECT ROUND(-1.58);\n -> -2\nMariaDB> SELECT ROUND(1.58);\n -> 2\nMariaDB> SELECT ROUND(1.298, 1);\n -> 1.3\nMariaDB> SELECT ROUND(1.298, 0);\n -> 1\nMariaDB> SELECT ROUND(23.298, -1);\n -> 20\n','https://mariadb.com/kb/en/round/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (50,7,'NULLIF','Syntax:\nNULLIF(expr1,expr2)\n\nReturns NULL if expr1 = expr2 is true, otherwise returns expr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.\n\nURL: https://mariadb.com/kb/en/nullif/\n\n','MariaDB> SELECT NULLIF(1,1);\n -> NULL\nMariaDB> SELECT NULLIF(1,2);\n -> 1\n','https://mariadb.com/kb/en/nullif/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (51,23,'CLOSE','Syntax:\nCLOSE cursor_name\n\nThis statement closes a previously opened cursor. For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nAn error occurs if the cursor is not open.\n\nIf not closed explicitly, a cursor is closed at the end of the BEGIN\n... END block in which it was declared.\n\nURL: https://mariadb.com/kb/en/close/\n\n','','https://mariadb.com/kb/en/close/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (52,8,'STOP SLAVE','Syntax:\nSTOP SLAVE [thread_types]\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege.\nRecommended best practice is to execute STOP SLAVE on the slave before\nstopping the slave server (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more\ninformation).\n\nWhen using the row-based logging format: You should execute STOP SLAVE\non the slave prior to shutting down the slave server if you are\nreplicating any tables that use a nontransactional storage engine (see\nthe Note later in this section). In MySQL 5.5.9 and later, you can also\nuse STOP SLAVE SQL_THREAD for this purpose.\n\nLike START SLAVE, this statement may be used with the IO_THREAD and\nSQL_THREAD options to name the thread or threads to be stopped.\n\n*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication\nevent group affecting one or more non-transactional tables has finished\nexecuting (if there is any such replication group), or until the user\nissues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug\n#38205)\n\nURL: https://mariadb.com/kb/en/stop-slave/\n\n','','https://mariadb.com/kb/en/stop-slave/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (53,31,'TIMEDIFF','Syntax:\nTIMEDIFF(expr1,expr2)\n\nTIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and\nexpr2 are time or date-and-time expressions, but both must be of the\nsame type.\n\nThe result returned by TIMEDIFF() is limited to the range allowed for\nTIME values. Alternatively, you can use either of the functions\nTIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.\n\nURL: https://mariadb.com/kb/en/timediff/\n\n','MariaDB> SELECT TIMEDIFF(\'2000:01:01 00:00:00\',\n -> \'2000:01:01 00:00:00.000001\');\n -> \'-00:00:00.000001\'\nMariaDB> SELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\',\n -> \'2008-12-30 01:01:01.000002\');\n -> \'46:58:57.999999\'\n','https://mariadb.com/kb/en/timediff/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (54,37,'REPLACE FUNCTION','Syntax:\nREPLACE(str,from_str,to_str)\n\nReturns the string str with all occurrences of the string from_str\nreplaced by the string to_str. REPLACE() performs a case-sensitive\nmatch when searching for from_str.\n\nURL: https://mariadb.com/kb/en/replace-function/\n\n','MariaDB> SELECT REPLACE(\'www.mariadb.org\', \'w\', \'Ww\');\n -> \'WwWwWw.mariadb.org\'\n','https://mariadb.com/kb/en/replace-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (55,28,'USE','Syntax:\nUSE db_name\n\nThe USE db_name statement tells MySQL to use the db_name database as\nthe default (current) database for subsequent statements. The database\nremains the default until the end of the session or another USE\nstatement is issued:\n\nUSE db1;\nSELECT COUNT(*) FROM mytable; # selects from db1.mytable\nUSE db2;\nSELECT COUNT(*) FROM mytable; # selects from db2.mytable\n\nURL: https://mariadb.com/kb/en/use/\n\n','','https://mariadb.com/kb/en/use/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (56,3,'LINEFROMTEXT','LineFromText(wkt[,srid]), LineStringFromText(wkt[,srid])\n\nConstructs a LINESTRING value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromtext/\n\n','','https://mariadb.com/kb/en/linefromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (57,7,'CASE OPERATOR','Syntax:\nCASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN\nresult ...] [ELSE result] END\n\nCASE WHEN [condition] THEN result [WHEN [condition] THEN result ...]\n[ELSE result] END\n\nThe first version returns the result where value=compare_value. The\nsecond version returns the result for the first condition that is true.\nIf there was no matching result value, the result after ELSE is\nreturned, or NULL if there is no ELSE part.\n\nURL: https://mariadb.com/kb/en/case-operator/\n\n','MariaDB> SELECT CASE 1 WHEN 1 THEN \'one\'\n -> WHEN 2 THEN \'two\' ELSE \'more\' END;\n -> \'one\'\nMariaDB> SELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n -> \'true\'\nMariaDB> SELECT CASE BINARY \'B\'\n -> WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END;\n -> NULL\n','https://mariadb.com/kb/en/case-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (58,26,'SHOW MASTER STATUS','Syntax:\nSHOW MASTER STATUS\n\nThis statement provides status information about the binary log files\nof the master. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nExample:\n\nMariaDB> SHOW MASTER STATUS;\n+---------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+---------------+----------+--------------+------------------+\n| mysql-bin.003 | 73 | test | manual,mysql |\n+---------------+----------+--------------+------------------+\n\nURL: https://mariadb.com/kb/en/show-master-status/\n\n','','https://mariadb.com/kb/en/show-master-status/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (59,31,'ADDTIME','Syntax:\nADDTIME(expr1,expr2)\n\nADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time\nor datetime expression, and expr2 is a time expression.\n\nURL: https://mariadb.com/kb/en/addtime/\n\n','MariaDB> SELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1 1:1:1.000002\');\n -> \'2008-01-02 01:01:01.000001\'\nMariaDB> SELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'03:00:01.999997\'\n','https://mariadb.com/kb/en/addtime/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (60,34,'SPATIAL','For MyISAM tables, MySQL can create spatial indexes using syntax\nsimilar to that for creating regular indexes, but extended with the\nSPATIAL keyword. Currently, columns in spatial indexes must be declared\nNOT NULL. The following examples demonstrate how to create spatial\nindexes:\n\no With CREATE TABLE:\n\nCREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;\n\no With ALTER TABLE:\n\nALTER TABLE geom ADD SPATIAL INDEX(g);\n\no With CREATE INDEX:\n\nCREATE SPATIAL INDEX sp_index ON geom (g);\n\nFor MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage\nengines that support nonspatial indexing of spatial columns, the engine\ncreates a B-tree index. A B-tree index on spatial values will be useful\nfor exact-value lookups, but not for range scans.\n\nFor more information on indexing spatial columns, see [HELP CREATE\nINDEX].\n\nTo drop spatial indexes, use ALTER TABLE or DROP INDEX:\n\no With ALTER TABLE:\n\nALTER TABLE geom DROP INDEX g;\n\no With DROP INDEX:\n\nDROP INDEX sp_index ON geom;\n\nExample: Suppose that a table geom contains more than 32,000\ngeometries, which are stored in the column g of type GEOMETRY. The\ntable also has an AUTO_INCREMENT column fid for storing object ID\nvalues.\n\nURL: https://mariadb.com/kb/en/spatial/\n\n','','https://mariadb.com/kb/en/spatial/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (61,31,'TO_SECONDS','Syntax:\nTO_SECONDS(expr)\n\nGiven a date or datetime expr, returns a the number of seconds since\nthe year 0. If expr is not a valid date or datetime value, returns\nNULL.\n\nURL: https://mariadb.com/kb/en/to_seconds/\n\n','MariaDB> SELECT TO_SECONDS(950501);\n -> 62966505600\nMariaDB> SELECT TO_SECONDS(\'2009-11-29\');\n -> 63426672000\nMariaDB> SELECT TO_SECONDS(\'2009-11-29 13:43:32\');\n -> 63426721412\nMariaDB> SELECT TO_SECONDS( NOW() );\n -> 63426721458\n','https://mariadb.com/kb/en/to_seconds/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (62,31,'TIMESTAMPDIFF','Syntax:\nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n\nReturns datetime_expr2 - datetime_expr1, where datetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One expression may be\na date and the other a datetime; a date value is treated as a datetime\nhaving the time part \'00:00:00\' where necessary. The unit for the\nresult (an integer) is given by the unit argument. The legal values for\nunit are the same as those listed in the description of the\nTIMESTAMPADD() function.\n\nURL: https://mariadb.com/kb/en/timestampdiff/\n\n','MariaDB> SELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n -> 3\nMariaDB> SELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n -> -1\nMariaDB> SELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01 12:05:55\');\n -> 128885\n','https://mariadb.com/kb/en/timestampdiff/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (63,37,'UPPER','Syntax:\nUPPER(str)\n\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nMariaDB> SELECT UPPER(\'Hej\');\n -> \'HEJ\'\n\nSee the description of LOWER() for information that also applies to\nUPPER(), such as information about how to perform lettercase conversion\nof binary strings (BINARY, VARBINARY, BLOB) for which these functions\nare ineffective.\n\nURL: https://mariadb.com/kb/en/upper/\n\n','','https://mariadb.com/kb/en/upper/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (64,31,'FROM_UNIXTIME','Syntax:\nFROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)\n\nReturns a representation of the unix_timestamp argument as a value in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the function is used in a string or numeric context. The value\nis expressed in the current time zone. unix_timestamp is an internal\ntimestamp value such as is produced by the UNIX_TIMESTAMP() function.\n\nIf format is given, the result is formatted according to the format\nstring, which is used the same way as listed in the entry for the\nDATE_FORMAT() function.\n\nURL: https://mariadb.com/kb/en/from_unixtime/\n\n','MariaDB> SELECT FROM_UNIXTIME(1196440219);\n -> \'2007-11-30 10:30:19\'\nMariaDB> SELECT FROM_UNIXTIME(1196440219) + 0;\n -> 20071130103019.000000\nMariaDB> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),\n -> \'%Y %D %M %h:%i:%s %x\');\n -> \'2007 30th November 10:30:59 2007\'\n','https://mariadb.com/kb/en/from_unixtime/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (65,22,'MEDIUMBLOB','MEDIUMBLOB\n\nA BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each\nMEDIUMBLOB value is stored using a 3-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumblob/\n\n','','https://mariadb.com/kb/en/mediumblob/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (66,12,'SHA2','Syntax:\nSHA2(str, hash_length)\n\nCalculates the SHA-2 family of hash functions (SHA-224, SHA-256,\nSHA-384, and SHA-512). The first argument is the cleartext string to be\nhashed. The second argument indicates the desired bit length of the\nresult, which must have a value of 224, 256, 384, 512, or 0 (which is\nequivalent to 256). If either argument is NULL or the hash length is\nnot one of the permitted values, the return value is NULL. Otherwise,\nthe function result is a hash value containing the desired number of\nbits. See the notes at the beginning of this section about storing hash\nvalues efficiently.\n\nAs of MySQL 5.5.6, the return value is a nonbinary string in the\nconnection character set. Before 5.5.6, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha2/\n\n','MariaDB> SELECT SHA2(\'abc\', 224);\n -> \'23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7\'\n','https://mariadb.com/kb/en/sha2/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (67,7,'IFNULL','Syntax:\nIFNULL(expr1,expr2)\n\nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it returns\nexpr2. IFNULL() returns a numeric or string value, depending on the\ncontext in which it is used.\n\nURL: https://mariadb.com/kb/en/ifnull/\n\n','MariaDB> SELECT IFNULL(1,0);\n -> 1\nMariaDB> SELECT IFNULL(NULL,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,10);\n -> 10\nMariaDB> SELECT IFNULL(1/0,\'yes\');\n -> \'yes\'\n','https://mariadb.com/kb/en/ifnull/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (68,26,'SHOW FUNCTION CODE','Syntax:\nSHOW FUNCTION CODE func_name\n\nThis statement is similar to SHOW PROCEDURE CODE but for stored\nfunctions. See [HELP SHOW PROCEDURE CODE].\n\nURL: https://mariadb.com/kb/en/show-function-code/\n\n','','https://mariadb.com/kb/en/show-function-code/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (69,26,'SHOW ERRORS','Syntax:\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW COUNT(*) ERRORS\n\nThis statement is similar to SHOW WARNINGS, except that it displays\ninformation only for errors, rather than for errors, warnings, and\nnotes.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nThe SHOW COUNT(*) ERRORS statement displays the number of errors. You\ncan also retrieve this number from the error_count variable:\n\nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n\nSHOW ERRORS and error_count apply only to errors, not warnings or\nnotes. In other respects, they are similar to SHOW WARNINGS and\nwarning_count. In particular, SHOW ERRORS cannot display information\nfor more than max_error_count messages, and error_count can exceed the\nvalue of max_error_count if the number of errors exceeds\nmax_error_count.\n\nURL: https://mariadb.com/kb/en/show-errors/\n\n','','https://mariadb.com/kb/en/show-errors/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (70,18,'LEAST','Syntax:\nLEAST(value1,value2,...)\n\nWith two or more arguments, returns the smallest (minimum-valued)\nargument. The arguments are compared using the following rules:\n\no If any argument is NULL, the result is NULL. No comparison is needed.\n\no If the return value is used in an INTEGER context or all arguments\n are integer-valued, they are compared as integers.\n\no If the return value is used in a REAL context or all arguments are\n real-valued, they are compared as reals.\n\no If the arguments comprise a mix of numbers and strings, they are\n compared as numbers.\n\no If any argument is a nonbinary (character) string, the arguments are\n compared as nonbinary strings.\n\no In all other cases, the arguments are compared as binary strings.\n\nURL: https://mariadb.com/kb/en/least/\n\n','MariaDB> SELECT LEAST(2,0);\n -> 0\nMariaDB> SELECT LEAST(34.0,3.0,5.0,767.0);\n -> 3.0\nMariaDB> SELECT LEAST(\'B\',\'A\',\'C\');\n -> \'A\'\n','https://mariadb.com/kb/en/least/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (71,18,'=','=\n\nEqual:\n\nURL: https://mariadb.com/kb/en/equal/\n\n','MariaDB> SELECT 1 = 0;\n -> 0\nMariaDB> SELECT \'0\' = 0;\n -> 1\nMariaDB> SELECT \'0.0\' = 0;\n -> 1\nMariaDB> SELECT \'0.01\' = 0;\n -> 0\nMariaDB> SELECT \'.01\' = 0.01;\n -> 1\n','https://mariadb.com/kb/en/equal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (72,37,'REVERSE','Syntax:\nREVERSE(str)\n\nReturns the string str with the order of the characters reversed.\n\nURL: https://mariadb.com/kb/en/reverse/\n\n','MariaDB> SELECT REVERSE(\'abc\');\n -> \'cba\'\n','https://mariadb.com/kb/en/reverse/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (73,18,'ISNULL','Syntax:\nISNULL(expr)\n\nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n\nURL: https://mariadb.com/kb/en/isnull/\n\n','MariaDB> SELECT ISNULL(1+1);\n -> 0\nMariaDB> SELECT ISNULL(1/0);\n -> 1\n','https://mariadb.com/kb/en/isnull/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (74,22,'BINARY','BINARY(M)\n\nThe BINARY type is similar to the CHAR type, but stores binary byte\nstrings rather than nonbinary character strings. M represents the\ncolumn length in bytes.\n\nURL: https://mariadb.com/kb/en/binary/\n\n','','https://mariadb.com/kb/en/binary/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (75,22,'BLOB DATA TYPE','A BLOB is a binary large object that can hold a variable amount of\ndata. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.\nThese differ only in the maximum length of the values they can hold.\nThe four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These\ncorrespond to the four BLOB types and have the same maximum lengths and\nstorage requirements. See\nhttps://mariadb.com/kb/en/data-type-storage-requirements/.\n\nURL: https://mariadb.com/kb/en/sql_language-data_types-blob/\n\n','','https://mariadb.com/kb/en/sql_language-data_types-blob/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (76,36,'BOUNDARY','Boundary(g)\n\nReturns a geometry that is the closure of the combinatorial boundary of\nthe geometry value g.\n\nURL: https://mariadb.com/kb/en/boundary/\n\n','','https://mariadb.com/kb/en/boundary/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (77,10,'CREATE USER','Syntax:\nCREATE USER user_specification\n [, user_specification] ...\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nThe CREATE USER statement creates new MySQL accounts. To use it, you\nmust have the global CREATE USER privilege or the INSERT privilege for\nthe mysql database. For each account, CREATE USER creates a new row in\nthe mysql.user table and assigns the account no privileges. An error\noccurs if the account already exists.\n\nEach account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nThe user specification may indicate how the user should authenticate\nwhen connecting to the server:\n\no To enable the user to connect with no password (which is insecure),\n include no IDENTIFIED BY clause:\n\nCREATE USER \'jeffrey\'@\'localhost\';\n\n In this case, the account uses built-in authentication and clients\n must provide no password.\n\no To assign a password, use IDENTIFIED BY with the literal plaintext\n password value:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To avoid specifying the plaintext password if you know its hash value\n (the value that PASSWORD() would return for the password), specify\n the hash value preceded by the keyword PASSWORD:\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED BY PASSWORD \'*90E462C37378CED12064BB3388827D2BA3A9B689\';\n\n The account uses built-in authentication and clients must match the\n given password.\n\no To authenticate the account using a specific authentication plugin,\n use IDENTIFIED WITH, where auth_plugin is the plugin name. It can be\n an unquoted name or a quoted string literal. \'auth_string\' is an\n optional quoted string literal to pass to the plugin. The plugin\n interprets the meaning of the string, so its format is plugin\n specific. Consult the documentation for a given plugin for\n information about the authentication string values it accepts.\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED WITH my_auth_plugin;\n\n For connections that use this account, the server invokes the named\n plugin and clients must provide credentials as required for the\n authentication method that the plugin implements. If the server\n cannot find the plugin, either at account-creation time or connect\n time, an error occurs. IDENTIFIED WITH can be used as of MySQL 5.5.7.\n\nThe IDENTIFIED BY and IDENTIFIED WITH clauses are mutually exclusive,\nso at most one of them can be specified for a given user.\n\nFor additional information about setting passwords, see\nhttps://mariadb.com/kb/en/create-user/.\n\nURL: https://mariadb.com/kb/en/create-user/\n\n','','https://mariadb.com/kb/en/create-user/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (78,24,'POINT','Point(x,y)\n\nConstructs a Point using its coordinates.\n\nURL: https://mariadb.com/kb/en/point/\n\n','','https://mariadb.com/kb/en/point/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (79,17,'CURRENT_USER','Syntax:\nCURRENT_USER, CURRENT_USER()\n\nReturns the user name and host name combination for the MySQL account\nthat the server used to authenticate the current client. This account\ndetermines your access privileges. The return value is a string in the\nutf8 character set.\n\nThe value of CURRENT_USER() can differ from the value of USER().\n\nURL: https://mariadb.com/kb/en/current_user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\nMariaDB> SELECT * FROM mysql.user;\nERROR 1044: Access denied for user \'\'@\'localhost\' to\ndatabase \'mysql\'\nMariaDB> SELECT CURRENT_USER();\n -> \'@localhost\'\n','https://mariadb.com/kb/en/current_user/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (80,37,'LCASE','Syntax:\nLCASE(str)\n\nLCASE() is a synonym for LOWER().\n\nURL: https://mariadb.com/kb/en/lcase/\n\n','','https://mariadb.com/kb/en/lcase/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (81,18,'<=','Syntax:\n<=\n\nLess than or equal:\n\nURL: https://mariadb.com/kb/en/less-than-or-equal/\n\n','MariaDB> SELECT 0.1 <= 2;\n -> 1\n','https://mariadb.com/kb/en/less-than-or-equal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (82,26,'SHOW PROFILES','Syntax:\nSHOW PROFILES\n\nThe SHOW PROFILES statement, together with SHOW PROFILE, displays\nprofiling information that indicates resource usage for statements\nexecuted during the course of the current session. For more\ninformation, see [HELP SHOW PROFILE].\n\nURL: https://mariadb.com/kb/en/show-profiles/\n\n','','https://mariadb.com/kb/en/show-profiles/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (83,27,'UPDATE','Syntax:\nSingle-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_reference\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n\nMultiple-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n\nFor the single-table syntax, the UPDATE statement updates columns of\nexisting rows in the named table with new values. The SET clause\nindicates which columns to modify and the values they should be given.\nEach value can be given as an expression, or the keyword DEFAULT to set\na column explicitly to its default value. The WHERE clause, if given,\nspecifies the conditions that identify which rows to update. With no\nWHERE clause, all rows are updated. If the ORDER BY clause is\nspecified, the rows are updated in the order that is specified. The\nLIMIT clause places a limit on the number of rows that can be updated.\n\nFor the multiple-table syntax, UPDATE updates rows in each table named\nin table_references that satisfy the conditions. In this case, ORDER BY\nand LIMIT cannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe updated. For expression syntax, see\nhttp://dev.mysql.com/doc/refman/5.5/en/expressions.html.\n\ntable_references and where_condition are is specified as described in\nhttps://mariadb.com/kb/en/select/.\n\nYou need the UPDATE privilege only for columns referenced in an UPDATE\nthat are actually updated. You need only the SELECT privilege for any\ncolumns that are read but not modified.\n\nThe UPDATE statement supports the following modifiers:\n\no With the LOW_PRIORITY keyword, execution of the UPDATE is delayed\n until no other clients are reading from the table. This affects only\n storage engines that use only table-level locking (such as MyISAM,\n MEMORY, and MERGE).\n\no With the IGNORE keyword, the update statement does not abort even if\n errors occur during the update. Rows for which duplicate-key\n conflicts occur are not updated. Rows for which columns are updated\n to values that would cause data conversion errors are updated to the\n closest valid values instead.\n\nURL: https://mariadb.com/kb/en/update/\n\n','','https://mariadb.com/kb/en/update/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (84,18,'IS NOT NULL','Syntax:\nIS NOT NULL\n\nTests whether a value is not NULL.\n\nURL: https://mariadb.com/kb/en/is-not-null/\n\n','MariaDB> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not-null/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (85,23,'CASE STATEMENT','Syntax:\nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nOr:\n\nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n\nThe CASE statement for stored programs implements a complex conditional\nconstruct.\n\n*Note*: There is also a CASE expression, which differs from the CASE\nstatement described here. See\nhttps://mariadb.com/kb/en/case-operator/. The\nCASE statement cannot have an ELSE NULL clause, and it is terminated\nwith END CASE instead of END.\n\nFor the first syntax, case_value is an expression. This value is\ncompared to the when_value expression in each WHEN clause until one of\nthem is equal. When an equal when_value is found, the corresponding\nTHEN clause statement_list executes. If no when_value is equal, the\nELSE clause statement_list executes, if there is one.\n\nThis syntax cannot be used to test for equality with NULL because NULL\n= NULL is false. See\nhttps://mariadb.com/kb/en/null-values/.\n\nFor the second syntax, each WHEN clause search_condition expression is\nevaluated until one is true, at which point its corresponding THEN\nclause statement_list executes. If no search_condition is equal, the\nELSE clause statement_list executes, if there is one.\n\nIf no when_value or search_condition matches the value tested and the\nCASE statement contains no ELSE clause, a Case not found for CASE\nstatement error results.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nTo handle situations where no value is matched by any WHEN clause, use\nan ELSE containing an empty BEGIN ... END block, as shown in this\nexample. (The indentation used here in the ELSE clause is for purposes\nof clarity only, and is not otherwise significant.)\n\nDELIMITER |\n\nCREATE PROCEDURE p()\n BEGIN\n DECLARE v INT DEFAULT 1;\n\n CASE v\n WHEN 2 THEN SELECT v;\n WHEN 3 THEN SELECT 0;\n ELSE\n BEGIN\n END;\n END CASE;\n END;\n |\n\nURL: https://mariadb.com/kb/en/case-statement/\n\n','','https://mariadb.com/kb/en/case-statement/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (86,8,'EXECUTE STATEMENT','Syntax:\nEXECUTE stmt_name\n [USING @var_name [, @var_name] ...]\n\nAfter preparing a statement with PREPARE, you execute it with an\nEXECUTE statement that refers to the prepared statement name. If the\nprepared statement contains any parameter markers, you must supply a\nUSING clause that lists user variables containing the values to be\nbound to the parameters. Parameter values can be supplied only by user\nvariables, and the USING clause must name exactly as many variables as\nthe number of parameter markers in the statement.\n\nYou can execute a given prepared statement multiple times, passing\ndifferent variables to it or setting the variables to different values\nbefore each execution.\n\nURL: https://mariadb.com/kb/en/execute-statement/\n\n','','https://mariadb.com/kb/en/execute-statement/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (87,39,'DROP INDEX','Syntax:\nDROP [ONLINE|OFFLINE] INDEX index_name ON tbl_name\n\nDROP INDEX drops the index named index_name from the table tbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop the index.\nSee [HELP ALTER TABLE].\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: https://mariadb.com/kb/en/drop-index/\n\n','','https://mariadb.com/kb/en/drop-index/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (88,37,'MATCH AGAINST','Syntax:\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nMySQL has support for full-text indexing and searching:\n\no A full-text index in MySQL is an index of type FULLTEXT.\n\no Full-text indexes can be used only with MyISAM tables, and can be\n created only for CHAR, VARCHAR, or TEXT columns.\n\no A FULLTEXT index definition can be given in the CREATE TABLE\n statement when a table is created, or added later using ALTER TABLE\n or CREATE INDEX.\n\no For large data sets, it is much faster to load your data into a table\n that has no FULLTEXT index and then create the index after that, than\n to load data into a table that has an existing FULLTEXT index.\n\nFull-text searching is performed using MATCH() ... AGAINST syntax.\nMATCH() takes a comma-separated list that names the columns to be\nsearched. AGAINST takes a string to search for, and an optional\nmodifier that indicates what type of search to perform. The search\nstring must be a literal string, not a variable or a column name. There\nare three types of full-text searches:\n\no A natural language search interprets the search string as a phrase in\n natural human language (a phrase in free text). There are no special\n operators. The stopword list applies. In addition, words that are\n present in 50% or more of the rows are considered common and do not\n match.\n\n Full-text searches are natural language searches if the IN NATURAL\n LANGUAGE MODE modifier is given or if no modifier is given. For more\n information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-natural-language-mode\n .\n\no A boolean search interprets the search string using the rules of a\n special query language. The string contains the words to search for.\n It can also contain operators that specify requirements such that a\n word must be present or absent in matching rows, or that it should be\n weighted higher or lower than usual. Common words such as "some" or\n "then" are stopwords and do not match if present in the search\n string. The IN BOOLEAN MODE modifier specifies a boolean search. For\n more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#in-boolean-mode.\n\no A query expansion search is a modification of a natural language\n search. The search string is used to perform a natural language\n search. Then words from the most relevant rows returned by the search\n are added to the search string and the search is done again. The\n query returns the rows from the second search. The IN NATURAL\n LANGUAGE MODE WITH QUERY EXPANSION or WITH QUERY EXPANSION modifier\n specifies a query expansion search. For more information, see\n https://mariadb.com/kb/en/fulltext-index-overview#with-query-expansion.\n\nURL: https://mariadb.com/kb/en/match-against/\n\n','MariaDB> SELECT id, body, MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE) AS score\n -> FROM articles WHERE MATCH (title,body) AGAINST\n -> (\'Security implications of running MySQL as root\'\n -> IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014 |\n| 6 | When configured properly, MySQL ... | 1.3114095926285 |\n+----+-------------------------------------+-----------------+\n2 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/match-against/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (89,39,'CREATE EVENT','Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n EVENT\n [IF NOT EXISTS]\n event_name\n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO event_body;\n\nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval\n [STARTS timestamp [+ INTERVAL interval] ...]\n [ENDS timestamp [+ INTERVAL interval] ...]\n\ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n\nThis statement creates and schedules a new event. The event will not\nrun unless the Event Scheduler is enabled. For information about\nchecking Event Scheduler status and enabling it if necessary, see\nhttps://mariadb.com/kb/en/events/.\n\nCREATE EVENT requires the EVENT privilege for the schema in which the\nevent is to be created. It might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section.\n\nThe minimum requirements for a valid CREATE EVENT statement are as\nfollows:\n\no The keywords CREATE EVENT plus an event name, which uniquely\n identifies the event in a database schema.\n\no An ON SCHEDULE clause, which determines when and how often the event\n executes.\n\no A DO clause, which contains the SQL statement to be executed by an\n event.\n\nThis is an example of a minimal CREATE EVENT statement:\n\nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n\nThe previous statement creates an event named myevent. This event\nexecutes once---one hour following its creation---by running an SQL\nstatement that increments the value of the myschema.mytable table\'s\nmycol column by 1.\n\nThe event_name must be a valid MySQL identifier with a maximum length\nof 64 characters. Event names are not case sensitive, so you cannot\nhave two events named myevent and MyEvent in the same schema. In\ngeneral, the rules governing event names are the same as those for\nnames of stored routines. See\nhttps://mariadb.com/kb/en/identifier-names/.\n\nAn event is associated with a schema. If no schema is indicated as part\nof event_name, the default (current) schema is assumed. To create an\nevent in a specific schema, qualify the event name with a schema using\nschema_name.event_name syntax.\n\nURL: https://mariadb.com/kb/en/create-event/\n\n','','https://mariadb.com/kb/en/create-event/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (90,4,'ABS','Syntax:\nABS(X)\n\nReturns the absolute value of X.\n\nURL: https://mariadb.com/kb/en/abs/\n\n','MariaDB> SELECT ABS(2);\n -> 2\nMariaDB> SELECT ABS(-32);\n -> 32\n','https://mariadb.com/kb/en/abs/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (91,32,'POLYFROMWKB','PolyFromWKB(wkb[,srid]), PolygonFromWKB(wkb[,srid])\n\nConstructs a POLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromwkb/\n\n','','https://mariadb.com/kb/en/polyfromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (92,37,'NOT LIKE','Syntax:\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n\nThis is the same as NOT (expr LIKE pat [ESCAPE \'escape_char\']).\n\nURL: https://mariadb.com/kb/en/not-like/\n\n','','https://mariadb.com/kb/en/not-like/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (93,37,'SPACE','Syntax:\nSPACE(N)\n\nReturns a string consisting of N space characters.\n\nURL: https://mariadb.com/kb/en/space/\n\n','MariaDB> SELECT SPACE(6);\n -> \' \'\n','https://mariadb.com/kb/en/space/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (94,6,'MBR DEFINITION','Its MBR (Minimum Bounding Rectangle), or Envelope. This is the bounding\ngeometry, formed by the minimum and maximum (X,Y) coordinates:\n\nURL: https://mariadb.com/kb/en/mbr-definition/\n\n','((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n','https://mariadb.com/kb/en/mbr-definition/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (95,24,'GEOMETRYCOLLECTION','GeometryCollection(g1,g2,...)\n\nConstructs a GeometryCollection.\n\nURL: https://mariadb.com/kb/en/geometrycollection/\n\n','','https://mariadb.com/kb/en/geometrycollection/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (96,16,'MAX','Syntax:\nMAX([DISTINCT] expr)\n\nReturns the maximum value of expr. MAX() may take a string argument; in\nsuch cases, it returns the maximum string value. See\nhttps://mariadb.com/kb/en/max/. The DISTINCT\nkeyword can be used to find the maximum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMAX() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/max/\n\n','MariaDB> SELECT student_name, MIN(test_score), MAX(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/max/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (97,21,'CREATE FUNCTION UDF','Syntax:\nCREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n\nA user-defined function (UDF) is a way to extend MySQL with a new\nfunction that works like a native (built-in) MySQL function such as\nABS() or CONCAT().\n\nfunction_name is the name that should be used in SQL statements to\ninvoke the function. The RETURNS clause indicates the type of the\nfunction\'s return value. DECIMAL is a legal value after RETURNS, but\ncurrently DECIMAL functions return string values and should be written\nlike STRING functions.\n\nshared_library_name is the basename of the shared object file that\ncontains the code that implements the function. The file must be\nlocated in the plugin directory. This directory is given by the value\nof the plugin_dir system variable. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/udf-compiling.html.\n\nTo create a function, you must have the INSERT privilege for the mysql\ndatabase. This is necessary because CREATE FUNCTION adds a row to the\nmysql.func system table that records the function\'s name, type, and\nshared library name. If you do not have this table, you should run the\nmysql_upgrade command to create it. See\nhttps://mariadb.com/kb/en/mysql_upgrade/.\n\nURL: https://mariadb.com/kb/en/create-function-udf/\n\n','','https://mariadb.com/kb/en/create-function-udf/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (98,4,'*','Syntax:\n*\n\nMultiplication:\n\nURL: https://mariadb.com/kb/en/multiplication-operator/\n\n','MariaDB> SELECT 3*5;\n -> 15\nMariaDB> SELECT 18014398509481984*18014398509481984.0;\n -> 324518553658426726783156020576256.0\nMariaDB> SELECT 18014398509481984*18014398509481984;\n -> 0\n','https://mariadb.com/kb/en/multiplication-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (99,22,'TIMESTAMP','TIMESTAMP\n\nA timestamp. The range is \'1970-01-01 00:00:01\' UTC to \'2038-01-19\n03:14:07\' UTC. TIMESTAMP values are stored as the number of seconds\nsince the epoch (\'1970-01-01 00:00:00\' UTC). A TIMESTAMP cannot\nrepresent the value \'1970-01-01 00:00:00\' because that is equivalent to\n0 seconds from the epoch and the value 0 is reserved for representing\n\'0000-00-00 00:00:00\', the "zero" TIMESTAMP value.\n\nUnless specified otherwise, the first TIMESTAMP column in a table is\ndefined to be automatically set to the date and time of the most recent\nmodification if not explicitly assigned a value. This makes TIMESTAMP\nuseful for recording the timestamp of an INSERT or UPDATE operation.\nYou can also set any TIMESTAMP column to the current date and time by\nassigning it a NULL value, unless it has been defined with the NULL\nattribute to permit NULL values. The automatic initialization and\nupdating to the current date and time can be specified using DEFAULT\nCURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, as described\nin\nhttps://mariadb.com/kb/en/timestamp/.\n\n*Note*: The TIMESTAMP format that was used prior to MySQL 4.1 is not\nsupported in MySQL 5.5; see MySQL 3.23, 4.0, 4.1 Reference Manual for\ninformation regarding the old format.\n\nURL: https://mariadb.com/kb/en/timestamp/\n\n','','https://mariadb.com/kb/en/timestamp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (100,12,'DES_DECRYPT','Syntax:\nDES_DECRYPT(crypt_str[,key_str])\n\nDecrypts a string encrypted with DES_ENCRYPT(). If an error occurs,\nthis function returns NULL.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nIf no key_str argument is given, DES_DECRYPT() examines the first byte\nof the encrypted string to determine the DES key number that was used\nto encrypt the original string, and then reads the key from the DES key\nfile to decrypt the message. For this to work, the user must have the\nSUPER privilege. The key file can be specified with the --des-key-file\nserver option.\n\nIf you pass this function a key_str argument, that string is used as\nthe key for decrypting the message.\n\nIf the crypt_str argument does not appear to be an encrypted string,\nMySQL returns the given crypt_str.\n\nURL: https://mariadb.com/kb/en/des_decrypt/\n\n','','https://mariadb.com/kb/en/des_decrypt/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (101,26,'CACHE INDEX','Syntax:\nCACHE INDEX\n tbl_index_list [, tbl_index_list] ...\n [PARTITION (partition_list | ALL)]\n IN key_cache_name\n\ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe CACHE INDEX statement assigns table indexes to a specific key\ncache. It is used only for MyISAM tables. After the indexes have been\nassigned, they can be preloaded into the cache if desired with LOAD\nINDEX INTO CACHE.\n\nThe following statement assigns indexes from the tables t1, t2, and t3\nto the key cache named hot_cache:\n\nMariaDB> CACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n\nURL: https://mariadb.com/kb/en/cache-index/\n\n','','https://mariadb.com/kb/en/cache-index/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (102,13,'ENDPOINT','EndPoint(ls)\n\nReturns the Point that is the endpoint of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/endpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/endpoint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (103,12,'COMPRESS','Syntax:\nCOMPRESS(string_to_compress)\n\nCompresses a string and returns the result as a binary string. This\nfunction requires MySQL to have been compiled with a compression\nlibrary such as zlib. Otherwise, the return value is always NULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n\nURL: https://mariadb.com/kb/en/compress/\n\n','MariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n -> 21\nMariaDB> SELECT LENGTH(COMPRESS(\'\'));\n -> 0\nMariaDB> SELECT LENGTH(COMPRESS(\'a\'));\n -> 13\nMariaDB> SELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n -> 15\n','https://mariadb.com/kb/en/compress/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (104,27,'INSERT','Syntax:\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name\n SET col_name={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col_name=expr\n [, col_name=expr] ... ]\n\nINSERT inserts new rows into an existing table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based on\nexplicitly specified values. The INSERT ... SELECT form inserts rows\nselected from another table or tables. INSERT ... SELECT is discussed\nfurther in [HELP INSERT SELECT].\n\nURL: https://mariadb.com/kb/en/insert/\n\n','','https://mariadb.com/kb/en/insert/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (105,16,'COUNT','Syntax:\nCOUNT(expr)\n\nReturns a count of the number of non-NULL values of expr in the rows\nretrieved by a SELECT statement. The result is a BIGINT value.\n\nCOUNT() returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count/\n\n','MariaDB> SELECT student.student_name,COUNT(*)\n -> FROM student,course\n -> WHERE student.student_id=course.student_id\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/count/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (106,27,'HANDLER','Syntax:\nHANDLER tbl_name OPEN [ [AS] alias]\n\nHANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...)\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }\n [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ { FIRST | NEXT }\n [ WHERE where_condition ] [LIMIT ... ]\n\nHANDLER tbl_name CLOSE\n\nThe HANDLER statement provides direct access to table storage engine\ninterfaces. It is available for MyISAM and InnoDB tables.\n\nURL: https://mariadb.com/kb/en/handler-commands/\n\n','','https://mariadb.com/kb/en/handler-commands/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (107,3,'MLINEFROMTEXT','MLineFromText(wkt[,srid]), MultiLineStringFromText(wkt[,srid])\n\nConstructs a MULTILINESTRING value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromtext/\n\n','','https://mariadb.com/kb/en/mlinefromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (108,32,'GEOMCOLLFROMWKB','GeomCollFromWKB(wkb[,srid]), GeometryCollectionFromWKB(wkb[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromwkb/\n\n','','https://mariadb.com/kb/en/geomcollfromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (109,9,'HELP_DATE','This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25\n','','');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (110,39,'RENAME TABLE','Syntax:\nRENAME TABLE tbl_name TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n\nThis statement renames one or more tables.\n\nThe rename operation is done atomically, which means that no other\nsession can access any of the tables while the rename is running. For\nexample, if you have an existing table old_table, you can create\nanother table new_table that has the same structure but is empty, and\nthen replace the existing table with the empty one as follows (assuming\nthat backup_table does not already exist):\n\nURL: https://mariadb.com/kb/en/rename-table/\n\n','CREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO old_table;\n','https://mariadb.com/kb/en/rename-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (111,22,'BOOLEAN','BOOL, BOOLEAN\n\nThese types are synonyms for TINYINT(1). A value of zero is considered\nfalse. Nonzero values are considered true:\n\nMariaDB> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n\nMariaDB> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nMariaDB> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n\nHowever, the values TRUE and FALSE are merely aliases for 1 and 0,\nrespectively, as shown here:\n\nMariaDB> SELECT IF(0 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n\nMariaDB> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n\nMariaDB> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n\nThe last two statements display the results shown because 2 is equal to\nneither 1 nor 0.\n\nURL: https://mariadb.com/kb/en/boolean/\n\n','','https://mariadb.com/kb/en/boolean/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (112,14,'DEFAULT','Syntax:\nDEFAULT(col_name)\n\nReturns the default value for a table column. An error results if the\ncolumn has no default value.\n\nURL: https://mariadb.com/kb/en/default/\n\n','MariaDB> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;\n','https://mariadb.com/kb/en/default/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (113,4,'MOD','Syntax:\nMOD(N,M), N % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M.\n\nURL: https://mariadb.com/kb/en/mod/\n\n','MariaDB> SELECT MOD(234, 10);\n -> 4\nMariaDB> SELECT 253 % 7;\n -> 1\nMariaDB> SELECT MOD(29,9);\n -> 2\nMariaDB> SELECT 29 MOD 9;\n -> 2\n','https://mariadb.com/kb/en/mod/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (114,22,'TINYTEXT','TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 255 (28 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TINYTEXT value is stored using a 1-byte length prefix\nthat indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinytext/\n\n','','https://mariadb.com/kb/en/tinytext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (115,20,'OPTIMIZE TABLE','Syntax:\nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nOPTIMIZE TABLE should be used if you have deleted a large part of a\ntable or if you have made many changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns).\nDeleted rows are maintained in a linked list and subsequent INSERT\noperations reuse old row positions. You can use OPTIMIZE TABLE to\nreclaim the unused space and to defragment the data file. After\nextensive changes to a table, this statement may also improve\nperformance of statements that use the table, sometimes significantly.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nOPTIMIZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... OPTIMIZE PARTITION to optimize one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/optimize-table/\n\n','','https://mariadb.com/kb/en/optimize-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (116,12,'DECODE','Syntax:\nDECODE(crypt_str,pass_str)\n\nDecrypts the encrypted string crypt_str using pass_str as the password.\ncrypt_str should be a string returned from ENCODE().\n\nURL: https://mariadb.com/kb/en/decode/\n\n','','https://mariadb.com/kb/en/decode/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (117,18,'<=>','Syntax:\n<=>\n\nNULL-safe equal. This operator performs an equality comparison like the\n= operator, but returns 1 rather than NULL if both operands are NULL,\nand 0 rather than NULL if one operand is NULL.\n\nURL: https://mariadb.com/kb/en/null-safe-equal/\n\n','MariaDB> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n -> 1, 1, 0\nMariaDB> SELECT 1 = 1, NULL = NULL, 1 = NULL;\n -> 1, NULL, NULL\n','https://mariadb.com/kb/en/null-safe-equal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (118,28,'HELP STATEMENT','Syntax:\nHELP \'search_string\'\n\nThe HELP statement returns online information from the MySQL Reference\nmanual. Its proper operation requires that the help tables in the mysql\ndatabase be initialized with help topic information.\n\nThe HELP statement searches the help tables for the given search string\nand displays the result of the search. The search string is not case\nsensitive.\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (119,26,'RESET','Syntax:\nRESET reset_option [, reset_option] ...\n\nThe RESET statement is used to clear the state of various server\noperations. You must have the RELOAD privilege to execute RESET.\n\nRESET acts as a stronger version of the FLUSH statement. See [HELP\nFLUSH].\n\nThe RESET statement causes an implicit commit. See\nhttps://mariadb.com/kb/en/sql-statements-that-cause-an-implicit-commit/.\n\nURL: https://mariadb.com/kb/en/reset/\n\n','','https://mariadb.com/kb/en/reset/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (120,14,'GET_LOCK','Syntax:\nGET_LOCK(str,timeout)\n\nTries to obtain a lock with a name given by the string str, using a\ntimeout of timeout seconds. Returns 1 if the lock was obtained\nsuccessfully, 0 if the attempt timed out (for example, because another\nclient has previously locked the name), or NULL if an error occurred\n(such as running out of memory or the thread was killed with mysqladmin\nkill). If you have a lock obtained with GET_LOCK(), it is released when\nyou execute RELEASE_LOCK(), execute a new GET_LOCK(), or your\nconnection terminates (either normally or abnormally). Locks obtained\nwith GET_LOCK() do not interact with transactions. That is, committing\na transaction does not release any such locks obtained during the\ntransaction.\n\nThis function can be used to implement application locks or to simulate\nrecord locks. Names are locked on a server-wide basis. If a name has\nbeen locked by one client, GET_LOCK() blocks any request by another\nclient for a lock with the same name. This enables clients that agree\non a given lock name to use the name to perform cooperative advisory\nlocking. But be aware that it also enables a client that is not among\nthe set of cooperating clients to lock a name, either inadvertently or\ndeliberately, and thus prevent any of the cooperating clients from\nlocking that name. One way to reduce the likelihood of this is to use\nlock names that are database-specific or application-specific. For\nexample, use lock names of the form db_name.str or app_name.str.\n\nURL: https://mariadb.com/kb/en/get_lock/\n\n','MariaDB> SELECT GET_LOCK(\'lock1\',10);\n -> 1\nMariaDB> SELECT IS_FREE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT GET_LOCK(\'lock2\',10);\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock2\');\n -> 1\nMariaDB> SELECT RELEASE_LOCK(\'lock1\');\n -> NULL\n','https://mariadb.com/kb/en/get_lock/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (121,37,'UCASE','Syntax:\nUCASE(str)\n\nUCASE() is a synonym for UPPER().\n\nURL: https://mariadb.com/kb/en/ucase/\n\n','','https://mariadb.com/kb/en/ucase/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (122,26,'SHOW BINLOG EVENTS','Syntax:\nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the binary log. If you do not specify \'log_name\',\nthe first binary log is displayed.\n\nURL: https://mariadb.com/kb/en/show-binlog-events/\n\n','','https://mariadb.com/kb/en/show-binlog-events/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (123,32,'MPOLYFROMWKB','MPolyFromWKB(wkb[,srid]), MultiPolygonFromWKB(wkb[,srid])\n\nConstructs a MULTIPOLYGON value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromwkb/\n\n','','https://mariadb.com/kb/en/mpolyfromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (124,23,'ITERATE','Syntax:\nITERATE label\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.\nITERATE means "start the loop again."\n\nURL: https://mariadb.com/kb/en/iterate/\n\n','','https://mariadb.com/kb/en/iterate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (125,27,'DO','Syntax:\nDO expr [, expr] ...\n\nDO executes the expressions but does not return any results. In most\nrespects, DO is shorthand for SELECT expr, ..., but has the advantage\nthat it is slightly faster when you do not care about the result.\n\nDO is useful primarily with functions that have side effects, such as\nRELEASE_LOCK().\n\nURL: https://mariadb.com/kb/en/do/\n\n','','https://mariadb.com/kb/en/do/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (126,31,'CURTIME','Syntax:\nCURTIME()\n\nReturns the current time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context. The value is expressed in the current time zone.\n\nURL: https://mariadb.com/kb/en/curtime/\n\n','MariaDB> SELECT CURTIME();\n -> \'23:50:26\'\nMariaDB> SELECT CURTIME() + 0;\n -> 235026.000000\n','https://mariadb.com/kb/en/curtime/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (127,37,'CHAR_LENGTH','Syntax:\nCHAR_LENGTH(str)\n\nReturns the length of the string str, measured in characters. A\nmulti-byte character counts as a single character. This means that for\na string containing five 2-byte characters, LENGTH() returns 10,\nwhereas CHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/char_length/\n\n','','https://mariadb.com/kb/en/char_length/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (128,22,'BIGINT','BIGINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to 18446744073709551615.\n\nSERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.\n\nURL: https://mariadb.com/kb/en/bigint/\n\n','','https://mariadb.com/kb/en/bigint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (129,26,'SET','Syntax:\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n\nThe SET statement assigns values to different types of variables that\naffect the operation of the server or your client. Older versions of\nMySQL employed SET OPTION, but this syntax is deprecated in favor of\nSET without OPTION.\n\nURL: https://mariadb.com/kb/en/set/\n\n','','https://mariadb.com/kb/en/set/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (130,27,'LOAD XML','Syntax:\nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'<tagname>\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD XML statement reads data from an XML file into a table. The\nfile_name must be given as a literal string. The tagname in the\noptional ROWS IDENTIFIED BY clause must also be given as a literal\nstring, and must be surrounded by angle brackets (< and >).\n\nLOAD XML acts as the complement of running the mysql client in XML\noutput mode (that is, starting the client with the --xml option). To\nwrite data from a table to an XML file, use a command such as the\nfollowing one from the system shell:\n\nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n\nTo read the file back into a table, use LOAD XML INFILE. By default,\nthe <row> element is considered to be the equivalent of a database\ntable row; this can be changed using the ROWS IDENTIFIED BY clause.\n\nThis statement supports three different XML formats:\n\no Column names as attributes and column values as attribute values:\n\n<row column1="value1" column2="value2" .../>\n\no Column names as tags and column values as the content of these tags:\n\n<row>\n <column1>value1</column1>\n <column2>value2</column2>\n</row>\n\no Column names are the name attributes of <field> tags, and values are\n the contents of these tags:\n\n<row>\n <field name=\'column1\'>value1</field>\n <field name=\'column2\'>value2</field>\n</row>\n\n This is the format used by other MySQL tools, such as mysqldump.\n\nAll 3 formats can be used in the same XML file; the import routine\nautomatically detects the format for each row and interprets it\ncorrectly. Tags are matched based on the tag or attribute name and the\ncolumn name.\n\nThe following clauses work essentially the same way for LOAD XML as\nthey do for LOAD DATA:\n\no LOW_PRIORITY or CONCURRENT\n\no LOCAL\n\no REPLACE or IGNORE\n\no CHARACTER SET\n\no (column_or_user_var,...)\n\no SET\n\nSee [HELP LOAD DATA], for more information about these clauses.\n\nThe IGNORE number LINES or IGNORE number ROWS clause causes the first\nnumber rows in the XML file to be skipped. It is analogous to the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n\nURL: https://mariadb.com/kb/en/load-xml/\n\n','','https://mariadb.com/kb/en/load-xml/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (131,4,'CONV','Syntax:\nCONV(N,from_base,to_base)\n\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base to base\nto_base. Returns NULL if any argument is NULL. The argument N is\ninterpreted as an integer, but may be specified as an integer or a\nstring. The minimum base is 2 and the maximum base is 36. If to_base is\na negative number, N is regarded as a signed number. Otherwise, N is\ntreated as unsigned. CONV() works with 64-bit precision.\n\nURL: https://mariadb.com/kb/en/conv/\n\n','MariaDB> SELECT CONV(\'a\',16,2);\n -> \'1010\'\nMariaDB> SELECT CONV(\'6E\',18,8);\n -> \'172\'\nMariaDB> SELECT CONV(-17,10,-18);\n -> \'-H\'\nMariaDB> SELECT CONV(10+\'10\'+\'10\'+0xa,10,10);\n -> \'40\'\n','https://mariadb.com/kb/en/conv/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (132,22,'DATE','DATE\n\nA date. The supported range is \'1000-01-01\' to \'9999-12-31\'. MySQL\ndisplays DATE values in \'YYYY-MM-DD\' format, but permits assignment of\nvalues to DATE columns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/date/\n\n','','https://mariadb.com/kb/en/date/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (133,15,'ASSIGN-VALUE','Syntax:\n:=\n\nAssignment operator. Causes the user variable on the left hand side of\nthe operator to take on the value to its right. The value on the right\nhand side may be a literal value, another variable storing a value, or\nany legal expression that yields a scalar value, including the result\nof a query (provided that this value is a scalar value). You can\nperform multiple assignments in the same SET statement. You can perform\nmultiple assignments in the same statement-\n\nUnlike =, the := operator is never interpreted as a comparison\noperator. This means you can use := in any valid SQL statement (not\njust in SET statements) to assign a value to a variable.\n\nURL: https://mariadb.com/kb/en/assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n\nMariaDB> SELECT @var1:=COUNT(*) FROM t1;\n -> 4\nMariaDB> SELECT @var1;\n -> 4\n','https://mariadb.com/kb/en/assignment-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (134,26,'SHOW OPEN TABLES','Syntax:\nSHOW OPEN TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open\nin the table cache. See\nhttp://dev.mysql.com/doc/refman/5.5/en/table-cache.html. The FROM\nclause, if present, restricts the tables shown to those present in the\ndb_name database. The LIKE clause, if present, indicates which table\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-open-tables/\n\n','','https://mariadb.com/kb/en/show-open-tables/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (135,31,'EXTRACT','Syntax:\nEXTRACT(unit FROM date)\n\nThe EXTRACT() function uses the same kinds of unit specifiers as\nDATE_ADD() or DATE_SUB(), but extracts parts from the date rather than\nperforming date arithmetic.\n\nURL: https://mariadb.com/kb/en/extract/\n\n','MariaDB> SELECT EXTRACT(YEAR FROM \'2009-07-02\');\n -> 2009\nMariaDB> SELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n -> 200907\nMariaDB> SELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n -> 20102\nMariaDB> SELECT EXTRACT(MICROSECOND\n -> FROM \'2003-01-02 10:30:00.000123\');\n -> 123\n','https://mariadb.com/kb/en/extract/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (136,12,'ENCRYPT','Syntax:\nENCRYPT(str[,salt])\n\nEncrypts str using the Unix crypt() system call and returns a binary\nstring. The salt argument must be a string with at least two characters\nor the result will be NULL. If no salt argument is given, a random\nvalue is used.\n\nURL: https://mariadb.com/kb/en/encrypt/\n\n','MariaDB> SELECT ENCRYPT(\'hello\');\n -> \'VxuFAJXVARROc\'\n','https://mariadb.com/kb/en/encrypt/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (137,26,'SHOW STATUS','Syntax:\nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW STATUS provides server status information. This information also\ncan be obtained using the mysqladmin extended-status command. The LIKE\nclause, if present, indicates which variable names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\nThis statement does not require any privilege. It requires only the\nability to connect to the server.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern:\n\nMariaDB> SHOW STATUS LIKE \'Key%\';\n+--------------------+----------+\n| Variable_name | Value |\n+--------------------+----------+\n| Key_blocks_used | 14955 |\n| Key_read_requests | 96854827 |\n| Key_reads | 162040 |\n| Key_write_requests | 7589728 |\n| Key_writes | 3813196 |\n+--------------------+----------+\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for\nall connections to MySQL. With SESSION, it displays the status values\nfor the current connection. If no modifier is present, the default is\nSESSION. LOCAL is a synonym for SESSION.\n\nSome status variables have only a global value. For these, you get the\nsame value for both GLOBAL and SESSION. The scope for each status\nvariable is listed at\nhttps://mariadb.com/kb/en/server-status-variables/.\n\nEach invocation of the SHOW STATUS statement uses an internal temporary\ntable and increments the global Created_tmp_tables value.\n\nURL: https://mariadb.com/kb/en/show-status/\n\n','','https://mariadb.com/kb/en/show-status/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (138,37,'EXTRACTVALUE','Syntax:\nExtractValue(xml_frag, xpath_expr)\n\nExtractValue() takes two string arguments, a fragment of XML markup\nxml_frag and an XPath expression xpath_expr (also known as a locator);\nit returns the text (CDATA) of the first text node which is a child of\nthe elements or elements matched by the XPath expression. In MySQL 5.5,\nthe XPath expression can contain at most 127 characters. (This\nlimitation is lifted in MySQL 5.6.)\n\nUsing this function is the equivalent of performing a match using the\nxpath_expr after appending /text(). In other words,\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b\') and\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b/text()\') produce the same\nresult.\n\nIf multiple matches are found, the content of the first child text node\nof each matching element is returned (in the order matched) as a\nsingle, space-delimited string.\n\nIf no matching text node is found for the expression (including the\nimplicit /text())---for whatever reason, as long as xpath_expr is\nvalid, and xml_frag consists of elements which are properly nested and\nclosed---an empty string is returned. No distinction is made between a\nmatch on an empty element and no match at all. This is by design.\n\nIf you need to determine whether no matching element was found in\nxml_frag or such an element was found but contained no child text\nnodes, you should test the result of an expression that uses the XPath\ncount() function. For example, both of these statements return an empty\nstring, as shown here:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'/a/b\') |\n+-------------------------------------+\n| |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nHowever, you can determine whether there was actually a matching\nelement using the following:\n\nMariaDB> SELECT ExtractValue(\'<a><b/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 1 |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nMariaDB> SELECT ExtractValue(\'<a><c/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n1 row in set (0.01 sec)\n\n*Important*: ExtractValue() returns only CDATA, and does not return any\ntags that might be contained within a matching tag, nor any of their\ncontent (see the result returned as val1 in the following example).\n\nURL: https://mariadb.com/kb/en/extractvalue/\n\n','MariaDB> SELECT\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a\') AS val1,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a/b\') AS val2,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'//b\') AS val3,\n -> ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/b\') AS val4,\n -> ExtractValue(\'<a>ccc<b>ddd</b><b>eee</b></a>\', \'//b\') AS val5;\n\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n','https://mariadb.com/kb/en/extractvalue/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (139,12,'OLD_PASSWORD','Syntax:\nOLD_PASSWORD(str)\n\nOLD_PASSWORD() was added when the implementation of PASSWORD() was\nchanged in MySQL 4.1 to improve security. OLD_PASSWORD() returns the\nvalue of the pre-4.1 implementation of PASSWORD() as a string, and is\nintended to permit you to reset passwords for any pre-4.1 clients that\nneed to connect to your version 5.5 MySQL server without locking them\nout. See http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/old_password/\n\n','','https://mariadb.com/kb/en/old_password/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (140,37,'FORMAT','Syntax:\nFORMAT(X,D[,locale])\n\nFormats the number X to a format like \'#,###,###.##\', rounded to D\ndecimal places, and returns the result as a string. If D is 0, the\nresult has no decimal point or fractional part.\n\nThe optional third parameter enables a locale to be specified to be\nused for the result number\'s decimal point, thousands separator, and\ngrouping between separators. Permissible locale values are the same as\nthe legal values for the lc_time_names system variable (see\nhttps://mariadb.com/kb/en/server-locale/). If no\nlocale is specified, the default is \'en_US\'.\n\nURL: https://mariadb.com/kb/en/format/\n\n','MariaDB> SELECT FORMAT(12332.123456, 4);\n -> \'12,332.1235\'\nMariaDB> SELECT FORMAT(12332.1,4);\n -> \'12,332.1000\'\nMariaDB> SELECT FORMAT(12332.2,0);\n -> \'12,332\'\nMariaDB> SELECT FORMAT(12332.2,2,\'de_DE\');\n -> \'12.332,20\'\n','https://mariadb.com/kb/en/format/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (141,15,'||','Syntax:\nOR, ||\n\nLogical OR. When both operands are non-NULL, the result is 1 if any\noperand is nonzero, and 0 otherwise. With a NULL operand, the result is\n1 if the other operand is nonzero, and NULL otherwise. If both operands\nare NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/or/\n\n','MariaDB> SELECT 1 || 1;\n -> 1\nMariaDB> SELECT 1 || 0;\n -> 1\nMariaDB> SELECT 0 || 0;\n -> 0\nMariaDB> SELECT 0 || NULL;\n -> NULL\nMariaDB> SELECT 1 || NULL;\n -> 1\n','https://mariadb.com/kb/en/or/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (142,37,'BIT_LENGTH','Syntax:\nBIT_LENGTH(str)\n\nReturns the length of the string str in bits.\n\nURL: https://mariadb.com/kb/en/bit_length/\n\n','MariaDB> SELECT BIT_LENGTH(\'text\');\n -> 32\n','https://mariadb.com/kb/en/bit_length/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (143,2,'EXTERIORRING','ExteriorRing(poly)\n\nReturns the exterior ring of the Polygon value poly as a LineString.\n\nURL: https://mariadb.com/kb/en/exteriorring/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n','https://mariadb.com/kb/en/exteriorring/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (144,32,'GEOMFROMWKB','GeomFromWKB(wkb[,srid]), GeometryFromWKB(wkb[,srid])\n\nConstructs a geometry value of any type using its WKB representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromwkb/\n\n','','https://mariadb.com/kb/en/geomfromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (145,26,'SHOW SLAVE HOSTS','Syntax:\nSHOW SLAVE HOSTS\n\nDisplays a list of replication slaves currently registered with the\nmaster. (Before MySQL 5.5.3, only slaves started with the\n--report-host=host_name option are visible in this list.)\n\nThe list is displayed on any server (not just the master server). The\noutput looks like this:\n\nMariaDB> SHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n\no Server_id: The unique server ID of the slave server, as configured in\n the server\'s option file, or on the command line with\n --server-id=value.\n\no Host: The host name of the slave server, as configured in the\n server\'s option file, or on the command line with\n --report-host=host_name. Note that this can differ from the machine\n name as configured in the operating system.\n\no Port: The port the slave server is listening on.\n\n In MySQL 5.5.23 and later, a zero in this column means that the slave\n port (--report-port) was not set. Prior to MySQL 5.5.23, 3306 was\n used as the default in such cases (Bug #13333431).\n\no Master_id: The unique server ID of the master server that the slave\n server is replicating from.\n\nSome MySQL versions report another variable, Rpl_recovery_rank. This\nvariable was never used, and was removed in MySQL 5.5.3. (Bug #13963)\n\nURL: https://mariadb.com/kb/en/show-slave-hosts/\n\n','','https://mariadb.com/kb/en/show-slave-hosts/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (146,8,'START TRANSACTION','Syntax:\nSTART TRANSACTION [WITH CONSISTENT SNAPSHOT]\nBEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n\nThese statements provide control over use of transactions:\n\no START TRANSACTION or BEGIN start a new transaction.\n\no COMMIT commits the current transaction, making its changes permanent.\n\no ROLLBACK rolls back the current transaction, canceling its changes.\n\no SET autocommit disables or enables the default autocommit mode for\n the current session.\n\nBy default, MySQL runs with autocommit mode enabled. This means that as\nsoon as you execute a statement that updates (modifies) a table, MySQL\nstores the update on disk to make it permanent. The change cannot be\nrolled back.\n\nTo disable autocommit mode implicitly for a single series of\nstatements, use the START TRANSACTION statement:\n\nSTART TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;\n\nWith START TRANSACTION, autocommit remains disabled until you end the\ntransaction with COMMIT or ROLLBACK. The autocommit mode then reverts\nto its previous state.\n\nYou can also begin a transaction like this:\n\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n\nThe WITH CONSISTENT SNAPSHOT option starts a consistent read for\nstorage engines that are capable of it. This applies only to InnoDB.\nThe effect is the same as issuing a START TRANSACTION followed by a\nSELECT from any InnoDB table. See\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html. The\nWITH CONSISTENT SNAPSHOT option does not change the current transaction\nisolation level, so it provides a consistent snapshot only if the\ncurrent isolation level is one that permits consistent read (REPEATABLE\nREAD or SERIALIZABLE).\n\n*Important*: Many APIs used for writing MySQL client applications (such\nas JDBC) provide their own methods for starting transactions that can\n(and sometimes should) be used instead of sending a START TRANSACTION\nstatement from the client. See\nhttp://dev.mysql.com/doc/refman/5.5/en/connectors-apis.html, or the\ndocumentation for your API, for more information.\n\nTo disable autocommit mode explicitly, use the following statement:\n\nSET autocommit=0;\n\nAfter disabling autocommit mode by setting the autocommit variable to\nzero, changes to transaction-safe tables (such as those for InnoDB) are not made permanent immediately. You must use COMMIT to\nstore your changes to disk or ROLLBACK to ignore the changes.\n\nautocommit is a session variable and must be set for each session. To\ndisable autocommit mode for each new connection, see the description of\nthe autocommit system variable at\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nBEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for\ninitiating a transaction. START TRANSACTION is standard SQL syntax and\nis the recommended way to start an ad-hoc transaction.\n\nThe BEGIN statement differs from the use of the BEGIN keyword that\nstarts a BEGIN ... END compound statement. The latter does not begin a\ntransaction. See [HELP BEGIN END].\n\n*Note*: Within all stored programs (stored procedures and functions,\ntriggers, and events), the parser treats BEGIN [WORK] as the beginning\nof a BEGIN ... END block. Begin a transaction in this context with\nSTART TRANSACTION instead.\n\nThe optional WORK keyword is supported for COMMIT and ROLLBACK, as are\nthe CHAIN and RELEASE clauses. CHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of the\ncompletion_type system variable determines the default completion\nbehavior. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nThe AND CHAIN clause causes a new transaction to begin as soon as the\ncurrent one ends, and the new transaction has the same isolation level\nas the just-terminated transaction. The RELEASE clause causes the\nserver to disconnect the current client session after terminating the\ncurrent transaction. Including the NO keyword suppresses CHAIN or\nRELEASE completion, which can be useful if the completion_type system\nvariable is set to cause chaining or release completion by default.\n\nURL: https://mariadb.com/kb/en/start-transaction/\n\n','','https://mariadb.com/kb/en/start-transaction/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (147,18,'BETWEEN AND','Syntax:\nexpr BETWEEN min AND max\n\nIf expr is greater than or equal to min and expr is less than or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is equivalent\nto the expression (min <= expr AND expr <= max) if all the arguments\nare of the same type. Otherwise type conversion takes place according\nto the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the three arguments.\n\nURL: https://mariadb.com/kb/en/between-and/\n\n','MariaDB> SELECT 2 BETWEEN 1 AND 3, 2 BETWEEN 3 and 1;\n -> 1, 0\nMariaDB> SELECT 1 BETWEEN 2 AND 3;\n -> 0\nMariaDB> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'3\';\n -> 1\nMariaDB> SELECT 2 BETWEEN 2 AND \'x-3\';\n -> 0\n','https://mariadb.com/kb/en/between-and/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (148,24,'MULTIPOLYGON','MultiPolygon(poly1,poly2,...)\n\nConstructs a MultiPolygon value from a set of Polygon or WKB Polygon\narguments.\n\nURL: https://mariadb.com/kb/en/multipolygon/\n\n','','https://mariadb.com/kb/en/multipolygon/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (149,31,'TIME_FORMAT','Syntax:\nTIME_FORMAT(time,format)\n\nThis is used like the DATE_FORMAT() function, but the format string may\ncontain format specifiers only for hours, minutes, seconds, and\nmicroseconds. Other specifiers produce a NULL value or 0.\n\nURL: https://mariadb.com/kb/en/time_format/\n\n','MariaDB> SELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n -> \'100 100 04 04 4\'\n','https://mariadb.com/kb/en/time_format/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (150,37,'LEFT','Syntax:\nLEFT(str,len)\n\nReturns the leftmost len characters from the string str, or NULL if any\nargument is NULL.\n\nURL: https://mariadb.com/kb/en/left/\n\n','MariaDB> SELECT LEFT(\'foobarbar\', 5);\n -> \'fooba\'\n','https://mariadb.com/kb/en/left/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (151,26,'FLUSH QUERY CACHE','You can defragment the query cache to better utilize its memory with\nthe FLUSH QUERY CACHE statement. The statement does not remove any\nqueries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the\nquery cache. The FLUSH TABLES statement also does this.\n\nURL: https://mariadb.com/kb/en/flush-query-cache/\n\n','','https://mariadb.com/kb/en/flush-query-cache/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (152,22,'SET DATA TYPE','SET(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA set. A string object that can have zero or more values, each of which\nmust be chosen from the list of values \'value1\', \'value2\', ... A SET\ncolumn can have a maximum of 64 members. SET values are represented\ninternally as integers.\n\nURL: https://mariadb.com/kb/en/set-data-type/\n\n','','https://mariadb.com/kb/en/set-data-type/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (153,4,'RAND','Syntax:\nRAND(), RAND(N)\n\nReturns a random floating-point value v in the range 0 <= v < 1.0. If a\nconstant integer argument N is specified, it is used as the seed value,\nwhich produces a repeatable sequence of column values. In the following\nexample, note that the sequences of values produced by RAND(3) is the\nsame both places where it occurs.\n\nURL: https://mariadb.com/kb/en/rand/\n\n','MariaDB> CREATE TABLE t (i INT);\nQuery OK, 0 rows affected (0.42 sec)\n\nMariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.61914388706828 |\n| 2 | 0.93845168309142 |\n| 3 | 0.83482678498591 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND() FROM t;\n+------+------------------+\n| i | RAND() |\n+------+------------------+\n| 1 | 0.35877890638893 |\n| 2 | 0.28941420772058 |\n| 3 | 0.37073435016976 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i | RAND(3) |\n+------+------------------+\n| 1 | 0.90576975597606 |\n| 2 | 0.37307905813035 |\n| 3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.01 sec)\n','https://mariadb.com/kb/en/rand/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (154,37,'RPAD','Syntax:\nRPAD(str,len,padstr)\n\nReturns the string str, right-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\nURL: https://mariadb.com/kb/en/rpad/\n\n','MariaDB> SELECT RPAD(\'hi\',5,\'?\');\n -> \'hi???\'\nMariaDB> SELECT RPAD(\'hi\',1,\'?\');\n -> \'h\'\n','https://mariadb.com/kb/en/rpad/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (155,39,'CREATE DATABASE','Syntax:\nCREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n [create_specification] ...\n\ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nCREATE DATABASE creates a database with the given name. To use this\nstatement, you need the CREATE privilege for the database. CREATE\nSCHEMA is a synonym for CREATE DATABASE.\n\nURL: https://mariadb.com/kb/en/create-database/\n\n','','https://mariadb.com/kb/en/create-database/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (156,22,'DEC','DEC[(M[,D])] [UNSIGNED] [ZEROFILL], NUMERIC[(M[,D])] [UNSIGNED]\n[ZEROFILL], FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nThese types are synonyms for DECIMAL. The FIXED synonym is available\nfor compatibility with other database systems.\n\nURL: https://mariadb.com/kb/en/dec-numeric-fixed/\n\n','','https://mariadb.com/kb/en/dec-numeric-fixed/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (157,16,'VAR_POP','Syntax:\nVAR_POP(expr)\n\nReturns the population standard variance of expr. It considers rows as\nthe whole population, not as a sample, so it has the number of rows as\nthe denominator. You can also use VARIANCE(), which is equivalent but\nis not standard SQL.\n\nVAR_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/var_pop/\n\n','','https://mariadb.com/kb/en/var_pop/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (158,37,'ELT','Syntax:\nELT(N,str1,str2,str3,...)\n\nReturns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is\nless than 1 or greater than the number of arguments. ELT() is the\ncomplement of FIELD().\n\nURL: https://mariadb.com/kb/en/elt/.html\n\n','MariaDB> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'ej\'\nMariaDB> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n -> \'foo\'\n','https://mariadb.com/kb/en/elt/.html');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (159,39,'ALTER VIEW','Syntax:\nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThis statement changes the definition of a view, which must exist. The\nsyntax is similar to that for CREATE VIEW and the effect is the same as\nfor CREATE OR REPLACE VIEW. See [HELP CREATE VIEW]. This statement\nrequires the CREATE VIEW and DROP privileges for the view, and some\nprivilege for each column referred to in the SELECT statement. ALTER\nVIEW is permitted only to the definer or users with the SUPER\nprivilege.\n\nURL: https://mariadb.com/kb/en/alter-view/\n\n','','https://mariadb.com/kb/en/alter-view/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (160,26,'SHOW DATABASES','Syntax:\nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW DATABASES lists the databases on the MySQL server host. SHOW\nSCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present,\nindicates which database names to match. The WHERE clause can be given\nto select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou see only those databases for which you have some kind of privilege,\nunless you have the global SHOW DATABASES privilege. You can also get\nthis list using the mysqlshow command.\n\nIf the server was started with the --skip-show-database option, you\ncannot use this statement at all unless you have the SHOW DATABASES\nprivilege.\n\nURL: https://mariadb.com/kb/en/show-databases/\n\n','','https://mariadb.com/kb/en/show-databases/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (161,19,'~','Syntax:\n~\n\nInvert all bits.\n\nURL: https://mariadb.com/kb/en/3489/\n\n','MariaDB> SELECT 5 & ~1;\n -> 4\n','https://mariadb.com/kb/en/3489/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (162,22,'TEXT','TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 65,535 (216 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TEXT value is stored using a 2-byte length prefix that\nindicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest TEXT type large enough to hold\nvalues M characters long.\n\nURL: https://mariadb.com/kb/en/text/\n\n','','https://mariadb.com/kb/en/text/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (163,37,'CONCAT_WS','Syntax:\nCONCAT_WS(separator,str1,str2,...)\n\nCONCAT_WS() stands for Concatenate With Separator and is a special form\nof CONCAT(). The first argument is the separator for the rest of the\narguments. The separator is added between the strings to be\nconcatenated. The separator can be a string, as can the rest of the\narguments. If the separator is NULL, the result is NULL.\n\nURL: https://mariadb.com/kb/en/concat_ws/\n\n','MariaDB> SELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last Name\');\n -> \'First name,Second name,Last Name\'\nMariaDB> SELECT CONCAT_WS(\',\',\'First name\',NULL,\'Last Name\');\n -> \'First name,Last Name\'\n','https://mariadb.com/kb/en/concat_ws/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (164,17,'ROW_COUNT','Syntax:\nROW_COUNT()\n\nBefore MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,\ndeleted, or inserted by the last statement if it was an UPDATE, DELETE,\nor INSERT. For other statements, the value may not be meaningful.\n\nAs of MySQL 5.5.5, ROW_COUNT() returns a value as follows:\n\no DDL statements: 0. This applies to statements such as CREATE TABLE or\n DROP TABLE.\n\no DML statements other than SELECT: The number of affected rows. This\n applies to statements such as UPDATE, INSERT, or DELETE (as before),\n but now also to statements such as ALTER TABLE and LOAD DATA INFILE.\n\no SELECT: -1 if the statement returns a result set, or the number of\n rows "affected" if it does not. For example, for SELECT * FROM t1,\n ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE\n \'file_name\', ROW_COUNT() returns the number of rows written to the\n file.\n\no SIGNAL statements: 0.\n\nFor UPDATE statements, the affected-rows value by default is the number\nof rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() when connecting to mysqld, the affected-rows value\nis the number of rows "found"; that is, matched by the WHERE clause.\n\nFor REPLACE statements, the affected-rows value is 2 if the new row\nreplaced an old row, because in this case, one row was inserted after\nthe duplicate was deleted.\n\nFor INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows\nvalue is 1 if the row is inserted as a new row and 2 if an existing row\nis updated.\n\nThe ROW_COUNT() value is similar to the value from the\nmysql_affected_rows() C API function and the row count that the mysql\nclient displays following statement execution.\n\nURL: https://mariadb.com/kb/en/information-functions-row_count/\n\n','MariaDB> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> DELETE FROM t WHERE i IN(1,2);\nQuery OK, 2 rows affected (0.00 sec)\n\nMariaDB> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/information-functions-row_count/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (165,4,'ASIN','Syntax:\nASIN(X)\n\nReturns the arc sine of X, that is, the value whose sine is X. Returns\nNULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/asin/\n\n','MariaDB> SELECT ASIN(0.2);\n -> 0.20135792079033\nMariaDB> SELECT ASIN(\'foo\');\n\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n1 row in set, 1 warning (0.00 sec)\n\nMariaDB> SHOW WARNINGS;\n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\' |\n+---------+------+-----------------------------------------+\n','https://mariadb.com/kb/en/asin/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (166,4,'SIGN','Syntax:\nSIGN(X)\n\nReturns the sign of the argument as -1, 0, or 1, depending on whether X\nis negative, zero, or positive.\n\nURL: https://mariadb.com/kb/en/sign/\n\n','MariaDB> SELECT SIGN(-32);\n -> -1\nMariaDB> SELECT SIGN(0);\n -> 0\nMariaDB> SELECT SIGN(234);\n -> 1\n','https://mariadb.com/kb/en/sign/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (167,31,'SEC_TO_TIME','Syntax:\nSEC_TO_TIME(seconds)\n\nReturns the seconds argument, converted to hours, minutes, and seconds,\nas a TIME value. The range of the result is constrained to that of the\nTIME data type. A warning occurs if the argument corresponds to a value\noutside that range.\n\nURL: https://mariadb.com/kb/en/sec_to_time/\n\n','MariaDB> SELECT SEC_TO_TIME(2378);\n -> \'00:39:38\'\nMariaDB> SELECT SEC_TO_TIME(2378) + 0;\n -> 3938\n','https://mariadb.com/kb/en/sec_to_time/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (168,22,'FLOAT','FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA small (single-precision) floating-point number. Permissible values\nare -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to\n3.402823466E+38. These are the theoretical limits, based on the IEEE\nstandard. The actual range might be slightly smaller depending on your\nhardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A single-precision floating-point\nnumber is accurate to approximately 7 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nUsing FLOAT might give you some unexpected problems because all\ncalculations in MySQL are done with double precision. See\nhttps://mariadb.com/kb/en/floating-point-accuracy/.\n\nURL: https://mariadb.com/kb/en/float/\n\n','','https://mariadb.com/kb/en/float/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (169,37,'LOCATE','Syntax:\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nThe first syntax returns the position of the first occurrence of\nsubstring substr in string str. The second syntax returns the position\nof the first occurrence of substring substr in string str, starting at\nposition pos. Returns 0 if substr is not in str.\n\nURL: https://mariadb.com/kb/en/locate/\n\n','MariaDB> SELECT LOCATE(\'bar\', \'foobarbar\');\n -> 4\nMariaDB> SELECT LOCATE(\'xbar\', \'foobar\');\n -> 0\nMariaDB> SELECT LOCATE(\'bar\', \'foobarbar\', 5);\n -> 7\n','https://mariadb.com/kb/en/locate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (170,26,'SHOW EVENTS','Syntax:\nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement displays information about Event Manager events. It\nrequires the EVENT privilege for the database from which the events are\nto be shown.\n\nIn its simplest form, SHOW EVENTS lists all of the events in the\ncurrent schema:\n\nMariaDB> SELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n1 row in set (0.00 sec)\n\nMariaDB> SHOW EVENTS\\G\n*************************** 1. row ***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n\nTo see events for a specific schema, use the FROM clause. For example,\nto see events for the test schema, use the following statement:\n\nSHOW EVENTS FROM test;\n\nThe LIKE clause, if present, indicates which event names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-events/\n\n','','https://mariadb.com/kb/en/show-events/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (171,17,'CHARSET','Syntax:\nCHARSET(str)\n\nReturns the character set of the string argument.\n\nURL: https://mariadb.com/kb/en/charset/\n\n','MariaDB> SELECT CHARSET(\'abc\');\n -> \'latin1\'\nMariaDB> SELECT CHARSET(CONVERT(\'abc\' USING utf8));\n -> \'utf8\'\nMariaDB> SELECT CHARSET(USER());\n -> \'utf8\'\n','https://mariadb.com/kb/en/charset/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (172,31,'SUBDATE','Syntax:\nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, SUBDATE()\nis a synonym for DATE_SUB(). For information on the INTERVAL unit\nargument, see the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\nMariaDB> SELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2007-12-02\'\n\nThe second form enables the use of an integer value for days. In such\ncases, it is interpreted as the number of days to be subtracted from\nthe date or datetime expression expr.\n\nMariaDB> SELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n -> \'2007-12-02 12:00:00\'\n\nURL: https://mariadb.com/kb/en/subdate/\n\n','','https://mariadb.com/kb/en/subdate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (173,31,'DAYOFYEAR','Syntax:\nDAYOFYEAR(date)\n\nReturns the day of the year for date, in the range 1 to 366.\n\nURL: https://mariadb.com/kb/en/dayofyear/\n\n','MariaDB> SELECT DAYOFYEAR(\'2007-02-03\');\n -> 34\n','https://mariadb.com/kb/en/dayofyear/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (174,4,'%','Syntax:\nN % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M. For more\ninformation, see the description for the MOD() function in\nhttps://mariadb.com/kb/en/mod/.\n\nURL: https://mariadb.com/kb/en/modulo-operator/\n\n','','https://mariadb.com/kb/en/modulo-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (175,22,'LONGTEXT','LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\ncharacters. The effective maximum length is less if the value contains\nmulti-byte characters. The effective maximum length of LONGTEXT columns\nalso depends on the configured maximum packet size in the client/server\nprotocol and available memory. Each LONGTEXT value is stored using a\n4-byte length prefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longtext/\n\n','','https://mariadb.com/kb/en/longtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (176,26,'KILL','Syntax:\nKILL [CONNECTION | QUERY] thread_id\n\nEach connection to mysqld runs in a separate thread. You can see which\nthreads are running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement.\n\nKILL permits an optional CONNECTION or QUERY modifier:\n\no KILL CONNECTION is the same as KILL with no modifier: It terminates\n the connection associated with the given thread_id.\n\no KILL QUERY terminates the statement that the connection is currently\n executing, but leaves the connection itself intact.\n\nIf you have the PROCESS privilege, you can see all threads. If you have\nthe SUPER privilege, you can kill all threads and statements.\nOtherwise, you can see and kill only your own threads and statements.\n\nYou can also use the mysqladmin processlist and mysqladmin kill\ncommands to examine and kill threads.\n\n*Note*: You cannot use KILL with the Embedded MySQL Server library\nbecause the embedded server merely runs inside the threads of the host\napplication. It does not create any connection threads of its own.\n\nURL: https://mariadb.com/kb/en/data-manipulation-kill-connection-query/\n\n','','https://mariadb.com/kb/en/data-manipulation-kill-connection-query/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (177,30,'DISJOINT','Disjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially disjoint from (does\nnot intersect) g2.\n\nURL: https://mariadb.com/kb/en/disjoint/\n\n','','https://mariadb.com/kb/en/disjoint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (178,3,'ASTEXT','AsText(g), AsWKT(g)\n\nConverts a value in internal geometry format to its WKT representation\nand returns the string result.\n\nURL: https://mariadb.com/kb/en/astext/\n\n','MariaDB> SET @g = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(GeomFromText(@g));\n+--------------------------+\n| AsText(GeomFromText(@g)) |\n+--------------------------+\n| LINESTRING(1 1,2 2,3 3) |\n+--------------------------+\n','https://mariadb.com/kb/en/astext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (179,37,'LPAD','Syntax:\nLPAD(str,len,padstr)\n\nReturns the string str, left-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\n\nURL: https://mariadb.com/kb/en/lpad/\n\n','MariaDB> SELECT LPAD(\'hi\',4,\'??\');\n -> \'??hi\'\nMariaDB> SELECT LPAD(\'hi\',1,\'??\');\n -> \'h\'\n','https://mariadb.com/kb/en/lpad/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (180,23,'DECLARE CONDITION','Syntax:\nDECLARE condition_name CONDITION FOR condition_value\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n\nThe DECLARE ... CONDITION statement declares a named error condition,\nassociating a name with a condition that needs specific handling. The\nname can be referred to in a subsequent DECLARE ... HANDLER statement\n(see [HELP DECLARE HANDLER]).\n\nCondition declarations must appear before cursor or handler\ndeclarations.\n\nThe condition_value for DECLARE ... CONDITION can be a MySQL error code\n(a number) or an SQLSTATE value (a 5-character string literal). You\nshould not use MySQL error code 0 or SQLSTATE values that begin with\n\'00\', because those indicate success rather than an error condition.\nFor a list of MySQL error codes and SQLSTATE values, see\nhttps://mariadb.com/kb/en/mariadb-error-codes/.\n\nURL: https://mariadb.com/kb/en/declare-condition/\n\n','','https://mariadb.com/kb/en/declare-condition/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (181,30,'OVERLAPS','Overlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially overlaps g2. The term\nspatially overlaps is used if two geometries intersect and their\nintersection results in a geometry of the same dimension but not equal\nto either of the given geometries.\n\nURL: https://mariadb.com/kb/en/overlaps/\n\n','','https://mariadb.com/kb/en/overlaps/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (182,8,'SET GLOBAL SQL_SLAVE_SKIP_COUNTER','Syntax:\nSET GLOBAL sql_slave_skip_counter = N\n\nThis statement skips the next N events from the master. This is useful\nfor recovering from replication stops caused by a statement.\n\nThis statement is valid only when the slave threads are not running.\nOtherwise, it produces an error.\n\nURL: https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/\n\n','','https://mariadb.com/kb/en/set-global-sql_slave_skip_counter/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (183,25,'NUMGEOMETRIES','NumGeometries(gc)\n\nReturns the number of geometries in the GeometryCollection value gc.\n\nURL: https://mariadb.com/kb/en/numgeometries/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT NumGeometries(GeomFromText(@gc));\n+----------------------------------+\n| NumGeometries(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n','https://mariadb.com/kb/en/numgeometries/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (184,31,'MONTHNAME','Syntax:\nMONTHNAME(date)\n\nReturns the full name of the month for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-locale/).\n\nURL: https://mariadb.com/kb/en/monthname/\n\n','MariaDB> SELECT MONTHNAME(\'2008-02-03\');\n -> \'February\'\n','https://mariadb.com/kb/en/monthname/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (185,8,'CHANGE MASTER TO','Syntax:\nCHANGE MASTER TO option [, option] ...\n\noption:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | IGNORE_SERVER_IDS = (server_id_list)\n\nserver_id_list:\n [server_id [, server_id] ... ]\n\nCHANGE MASTER TO changes the parameters that the slave server uses for\nconnecting to the master server, for reading the master binary log, and\nreading the slave relay log. It also updates the contents of the\nmaster.info and relay-log.info files. To use CHANGE MASTER TO, the\nslave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\nOptions not specified retain their value, except as indicated in the\nfollowing discussion. Thus, in most cases, there is no need to specify\noptions that do not change. For example, if the password to connect to\nyour MySQL master has changed, you just need to issue these statements\nto tell the slave about the new password:\n\nSTOP SLAVE; -- if replication was running\nCHANGE MASTER TO MASTER_PASSWORD=\'new3cret\';\nSTART SLAVE; -- if you want to restart replication\n\nMASTER_HOST, MASTER_USER, MASTER_PASSWORD, and MASTER_PORT provide\ninformation to the slave about how to connect to its master:\n\no MASTER_HOST and MASTER_PORT are the host name (or IP address) of the\n master host and its TCP/IP port.\n\n *Note*: Replication cannot use Unix socket files. You must be able to\n connect to the master MySQL server using TCP/IP.\n\n If you specify the MASTER_HOST or MASTER_PORT option, the slave\n assumes that the master server is different from before (even if the\n option value is the same as its current value.) In this case, the old\n values for the master binary log file name and position are\n considered no longer applicable, so if you do not specify\n MASTER_LOG_FILE and MASTER_LOG_POS in the statement,\n MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4 are silently appended to it.\n\n Setting MASTER_HOST=\'\' (that is, setting its value explicitly to an\n empty string) is not the same as not setting MASTER_HOST at all.\n Beginning with MySQL 5.5, trying to set MASTER_HOST to an empty\n string fails with an error. Previously, setting MASTER_HOST to an\n empty string caused START SLAVE subsequently to fail. (Bug #28796)\n\no MASTER_USER and MASTER_PASSWORD are the user name and password of the\n account to use for connecting to the master.\n\n In MySQL 5.5.20 and later, MASTER_USER cannot be made empty; setting\n MASTER_USER = \'\' or leaving it unset when setting a value for for\n MASTER_PASSWORD causes an error (Bug #13427949).\n\n Currently, a password used for a replication slave account is\n effectively limited to 32 characters in length; the password can be\n longer, but any excess characters are truncated. This is not due to\n any limit imposed by the MySQL Server generally, but rather is an\n issue specific to MySQL Replication. (For more information, see Bug\n #43439.)\n\n The text of a running CHANGE MASTER TO statement, including values\n for MASTER_USER and MASTER_PASSWORD, can be seen in the output of a\n concurrent SHOW PROCESSLIST statement.\n\nThe MASTER_SSL_xxx options provide information about using SSL for the\nconnection. They correspond to the --ssl-xxx options described in\nhttps://mariadb.com/kb/en/ssl-server-system-variables/, and\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-solutions-ssl.html.\nThese options can be changed even on slaves that are compiled without\nSSL support. They are saved to the master.info file, but are ignored if\nthe slave does not have SSL support enabled.\n\nMASTER_CONNECT_RETRY specifies how many seconds to wait between connect\nretries. The default is 60. The number of reconnection attempts is\nlimited by the --master-retry-count server option; for more\ninformation, see\nhttps://mariadb.com/kb/en/replication-and-binary-log-server-system-variables/.\n\nMASTER_HEARTBEAT_PERIOD sets the interval in seconds between\nreplication heartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is reset.\ninterval is a decimal value having the range 0 to 4294967 seconds and a\nresolution in milliseconds; the smallest nonzero value is 0.001.\nHeartbeats are sent by the master only if there are no unsent events in\nthe binary log file for a period longer than interval.\n\nSetting interval to 0 disables heartbeats altogether. The default value\nfor interval is equal to the value of slave_net_timeout divided by 2.\n\nSetting @@global.slave_net_timeout to a value less than that of the\ncurrent heartbeat interval results in a warning being issued. The\neffect of issuing RESET SLAVE on the heartbeat interval is to reset it\nto the default value.\n\nMASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the\nslave I/O thread should begin reading from the master the next time the\nthread starts. RELAY_LOG_FILE and RELAY_LOG_POS are the coordinates at\nwhich the slave SQL thread should begin reading from the relay log the\nnext time the thread starts. If you specify either of MASTER_LOG_FILE\nor MASTER_LOG_POS, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS.\nIf neither of MASTER_LOG_FILE or MASTER_LOG_POS is specified, the slave\nuses the last coordinates of the slave SQL thread before CHANGE MASTER\nTO was issued. This ensures that there is no discontinuity in\nreplication, even if the slave SQL thread was late compared to the\nslave I/O thread, when you merely want to change, say, the password to\nuse.\n\nCHANGE MASTER TO deletes all relay log files and starts a new one,\nunless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay\nlog files are kept; the relay_log_purge global variable is set silently\nto 0.\n\nPrior to MySQL 5.5, RELAY_LOG_FILE required an absolute path. In MySQL\n5.5, the path can be relative, in which case the path is assumed to be\nrelative to the slave\'s data directory. (Bug #12190)\n\nIGNORE_SERVER_IDS was added in MySQL 5.5. This option takes a\ncomma-separated list of 0 or more server IDs. Events originating from\nthe corresponding servers are ignored, with the exception of log\nrotation and deletion events, which are still recorded in the relay\nlog.\n\nIn circular replication, the originating server normally acts as the\nterminator of its own events, so that they are not applied more than\nonce. Thus, this option is useful in circular replication when one of\nthe servers in the circle is removed. Suppose that you have a circular\nreplication setup with 4 servers, having server IDs 1, 2, 3, and 4, and\nserver 3 fails. When bridging the gap by starting replication from\nserver 2 to server 4, you can include IGNORE_SERVER_IDS = (3) in the\nCHANGE MASTER TO statement that you issue on server 4 to tell it to use\nserver 2 as its master instead of server 3. Doing so causes it to\nignore and not to propagate any statements that originated with the\nserver that is no longer in use.\n\nIf a CHANGE MASTER TO statement is issued without any IGNORE_SERVER_IDS\noption, any existing list is preserved; RESET SLAVE also has no effect\non the server ID list. To clear the list of ignored servers, it is\nnecessary to use the option with an empty list:\n\nCHANGE MASTER TO IGNORE_SERVER_IDS = ();\n\nIf IGNORE_SERVER_IDS contains the server\'s own ID and the server was\nstarted with the --replicate-same-server-id option enabled, an error\nresults.\n\nAlso beginning with MySQL 5.5, the master.info file and the output of\nSHOW SLAVE STATUS are extended to provide the list of servers that are\ncurrently ignored. For more information, see\nhttps://mariadb.com/kb/en/show-slave-status/, and\n[HELP SHOW SLAVE STATUS].\n\nBeginning with MySQL 5.5.5, invoking CHANGE MASTER TO causes the\nprevious values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and\nMASTER_LOG_POS to be written to the error log, along with other\ninformation about the slave\'s state prior to execution.\n\nCHANGE MASTER TO is useful for setting up a slave when you have the\nsnapshot of the master and have recorded the master binary log\ncoordinates corresponding to the time of the snapshot. After loading\nthe snapshot into the slave to synchronize it to the slave, you can run\nCHANGE MASTER TO MASTER_LOG_FILE=\'log_name\', MASTER_LOG_POS=log_pos on\nthe slave to specify the coordinates at which the slave should begin\nreading the master binary log.\n\nThe following example changes the master server the slave uses and\nestablishes the master binary log coordinates from which the slave\nbegins reading. This is used when you want to set up the slave to\nreplicate the master:\n\nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n\nThe next example shows an operation that is less frequently employed.\nIt is used when the slave has relay log files that you want it to\nexecute again for some reason. To do this, the master need not be\nreachable. You need only use CHANGE MASTER TO and start the SQL thread\n(START SLAVE SQL_THREAD):\n\nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n\nURL: https://mariadb.com/kb/en/change-master-to/\n\n','','https://mariadb.com/kb/en/change-master-to/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (186,39,'DROP DATABASE','Syntax:\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDROP DATABASE drops all tables in the database and deletes the\ndatabase. Be very careful with this statement! To use DROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is a synonym\nfor DROP DATABASE.\n\n*Important*: When a database is dropped, user privileges on the\ndatabase are not automatically dropped. See [HELP GRANT].\n\nIF EXISTS is used to prevent an error from occurring if the database\ndoes not exist.\n\nURL: https://mariadb.com/kb/en/drop-database/\n\n','','https://mariadb.com/kb/en/drop-database/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (187,6,'MBREQUAL','MBREqual(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are the same.\n\nURL: https://mariadb.com/kb/en/mbrequal/\n\n','','https://mariadb.com/kb/en/mbrequal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (188,31,'TIMESTAMP FUNCTION','Syntax:\nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n\nWith a single argument, this function returns the date or datetime\nexpression expr as a datetime value. With two arguments, it adds the\ntime expression expr2 to the date or datetime expression expr1 and\nreturns the result as a datetime value.\n\nURL: https://mariadb.com/kb/en/timestamp-function/\n\n','MariaDB> SELECT TIMESTAMP(\'2003-12-31\');\n -> \'2003-12-31 00:00:00\'\nMariaDB> SELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'12:00:00\');\n -> \'2004-01-01 00:00:00\'\n','https://mariadb.com/kb/en/timestamp-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (189,33,'PROCEDURE ANALYSE','Syntax:\nANALYSE([max_elements[,max_memory]])\n\nANALYSE() examines the result from a query and returns an analysis of\nthe results that suggests optimal data types for each column that may\nhelp reduce table sizes. To obtain this analysis, append PROCEDURE\nANALYSE to the end of a SELECT statement:\n\nSELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max_elements,[max_memory]])\n\nFor example:\n\nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n\nThe results show some statistics for the values returned by the query,\nand propose an optimal data type for the columns. This can be helpful\nfor checking your existing tables, or after importing new data. You may\nneed to try different settings for the arguments so that PROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n\nThe arguments are optional and are used as follows:\n\no max_elements (default 256) is the maximum number of distinct values\n that ANALYSE() notices per column. This is used by ANALYSE() to check\n whether the optimal data type should be of type ENUM; if there are\n more than max_elements distinct values, then ENUM is not a suggested\n type.\n\no max_memory (default 8192) is the maximum amount of memory that\n ANALYSE() should allocate per column while trying to find all\n distinct values.\n\nURL: https://mariadb.com/kb/en/procedure-analyse/\n\n','','https://mariadb.com/kb/en/procedure-analyse/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (190,9,'HELP_VERSION','This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25 (revision: 31914)\n\nThis information applies to MySQL 5.5 through 5.5.29.\n','','');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (191,37,'CHARACTER_LENGTH','Syntax:\nCHARACTER_LENGTH(str)\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: https://mariadb.com/kb/en/character_length/\n\n','','https://mariadb.com/kb/en/character_length/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (192,26,'SHOW GRANTS','Syntax:\nSHOW GRANTS [FOR user]\n\nThis statement lists the GRANT statement or statements that must be\nissued to duplicate the privileges that are granted to a MySQL user\naccount. The account is named using the same format as for the GRANT\nstatement; for example, \'jeffrey\'@\'localhost\'. If you specify only the\nuser name part of the account name, a host name part of \'%\' is used.\nFor additional information about specifying account names, see [HELP\nGRANT].\n\nMariaDB> SHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n\nTo list the privileges granted to the account that you are using to\nconnect to the server, you can use any of the following statements:\n\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is\nused in DEFINER context, such as within a stored procedure that is\ndefined with SQL SECURITY DEFINER), the grants displayed are those of\nthe definer and not the invoker.\n\nURL: https://mariadb.com/kb/en/show-grants/\n\n','','https://mariadb.com/kb/en/show-grants/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (193,26,'SHOW PRIVILEGES','Syntax:\nSHOW PRIVILEGES\n\nSHOW PRIVILEGES shows the list of system privileges that the MySQL\nserver supports. The exact list of privileges depends on the version of\nyour server.\n\nURL: https://mariadb.com/kb/en/show-privileges/\n\n','','https://mariadb.com/kb/en/show-privileges/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (194,39,'CREATE TABLESPACE','Syntax:\nCREATE TABLESPACE tablespace_name\n ADD DATAFILE \'file_name\'\n USE LOGFILE GROUP logfile_group\n [EXTENT_SIZE [=] extent_size]\n [INITIAL_SIZE [=] initial_size]\n [AUTOEXTEND_SIZE [=] autoextend_size]\n [MAX_SIZE [=] max_size]\n [NODEGROUP [=] nodegroup_id]\n [WAIT]\n [COMMENT [=] comment_text]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.','','https://mariadb.com/kb/en/create-tablespace/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (195,37,'INSERT FUNCTION','Syntax:\nINSERT(str,pos,len,newstr)\n\nReturns the string str, with the substring beginning at position pos\nand len characters long replaced by the string newstr. Returns the\noriginal string if pos is not within the length of the string. Replaces\nthe rest of the string from position pos if len is not within the\nlength of the rest of the string. Returns NULL if any argument is NULL.\n\nURL: https://mariadb.com/kb/en/insert-function/\n\n','MariaDB> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n -> \'QuWhattic\'\nMariaDB> SELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n -> \'Quadratic\'\nMariaDB> SELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n -> \'QuWhat\'\n','https://mariadb.com/kb/en/insert-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (196,4,'CRC32','Syntax:\nCRC32(expr)\n\nComputes a cyclic redundancy check value and returns a 32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The argument is\nexpected to be a string and (if possible) is treated as one if it is\nnot.\n\nURL: https://mariadb.com/kb/en/crc32/\n\n','MariaDB> SELECT CRC32(\'MySQL\');\n -> 3259397556\nMariaDB> SELECT CRC32(\'mysql\');\n -> 2501908538\n','https://mariadb.com/kb/en/crc32/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (197,15,'XOR','Syntax:\nXOR\n\nLogical XOR. Returns NULL if either operand is NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is nonzero,\notherwise 0 is returned.\n\nURL: https://mariadb.com/kb/en/xor/\n\n','MariaDB> SELECT 1 XOR 1;\n -> 0\nMariaDB> SELECT 1 XOR 0;\n -> 1\nMariaDB> SELECT 1 XOR NULL;\n -> NULL\nMariaDB> SELECT 1 XOR 1 XOR 1;\n -> 1\n','https://mariadb.com/kb/en/xor/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (198,13,'STARTPOINT','StartPoint(ls)\n\nReturns the Point that is the start point of the LineString value ls.\n\nURL: https://mariadb.com/kb/en/startpoint/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(StartPoint(GeomFromText(@ls)));\n+---------------------------------------+\n| AsText(StartPoint(GeomFromText(@ls))) |\n+---------------------------------------+\n| POINT(1 1) |\n+---------------------------------------+\n','https://mariadb.com/kb/en/startpoint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (199,10,'GRANT','Syntax:\nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [, user_specification] ...\n [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]\n [WITH with_option ...]\n\nGRANT PROXY ON user_specification\n TO user_specification [, user_specification] ...\n [WITH GRANT OPTION]\n\nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n\npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n\nuser_specification:\n user\n [\n IDENTIFIED BY [PASSWORD] \'password\'\n | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n ]\n\nssl_option:\n SSL\n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n\nwith_option:\n GRANT OPTION\n | MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n\nThe GRANT statement grants privileges to MySQL user accounts. GRANT\nalso serves to specify other account characteristics such as use of\nsecure connections and limits on access to server resources. To use\nGRANT, you must have the GRANT OPTION privilege, and you must have the\nprivileges that you are granting.\n\nNormally, a database administrator first uses CREATE USER to create an\naccount, then GRANT to define its privileges and characteristics. For\nexample:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\nGRANT ALL ON db1.* TO \'jeffrey\'@\'localhost\';\nGRANT SELECT ON db2.invoice TO \'jeffrey\'@\'localhost\';\nGRANT USAGE ON *.* TO \'jeffrey\'@\'localhost\' WITH MAX_QUERIES_PER_HOUR 90;\n\nHowever, if an account named in a GRANT statement does not already\nexist, GRANT may create it under the conditions described later in the\ndiscussion of the NO_AUTO_CREATE_USER SQL mode.\n\nThe REVOKE statement is related to GRANT and enables administrators to\nremove account privileges. See [HELP REVOKE].\n\nWhen successfully executed from the mysql program, GRANT responds with\nQuery OK, 0 rows affected. To determine what privileges result from the\noperation, use SHOW GRANTS. See [HELP SHOW GRANTS].\n\nURL: https://mariadb.com/kb/en/grant/\n\n','','https://mariadb.com/kb/en/grant/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (200,23,'DECLARE VARIABLE','Syntax:\nDECLARE var_name [, var_name] ... type [DEFAULT value]\n\nThis statement declares local variables within stored programs. To\nprovide a default value for a variable, include a DEFAULT clause. The\nvalue can be specified as an expression; it need not be a constant. If\nthe DEFAULT clause is missing, the initial value is NULL.\n\nLocal variables are treated like stored routine parameters with respect\nto data type and overflow checking. See [HELP CREATE PROCEDURE].\n\nVariable declarations must appear before cursor or handler\ndeclarations.\n\nLocal variable names are not case sensitive. Permissible characters and\nquoting rules are the same as for other identifiers, as described in\nhttps://mariadb.com/kb/en/identifier-names/.\n\nThe scope of a local variable is the BEGIN ... END block within which\nit is declared. The variable can be referred to in blocks nested within\nthe declaring block, except those blocks that declare a variable with\nthe same name.\n\nURL: https://mariadb.com/kb/en/declare-variable/\n\n','','https://mariadb.com/kb/en/declare-variable/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (201,3,'MPOLYFROMTEXT','MPolyFromText(wkt[,srid]), MultiPolygonFromText(wkt[,srid])\n\nConstructs a MULTIPOLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpolyfromtext/\n\n','','https://mariadb.com/kb/en/mpolyfromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (202,6,'MBRINTERSECTS','MBRIntersects(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 intersect.\n\nURL: https://mariadb.com/kb/en/mbrintersects/\n\n','','https://mariadb.com/kb/en/mbrintersects/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (203,16,'BIT_OR','Syntax:\nBIT_OR(expr)\n\nReturns the bitwise OR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_or/\n\n','','https://mariadb.com/kb/en/bit_or/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (204,31,'YEARWEEK','Syntax:\nYEARWEEK(date), YEARWEEK(date,mode)\n\nReturns year and week for a date. The mode argument works exactly like\nthe mode argument to WEEK(). The year in the result may be different\nfrom the year in the date argument for the first and the last week of\nthe year.\n\nURL: https://mariadb.com/kb/en/yearweek/\n\n','MariaDB> SELECT YEARWEEK(\'1987-01-01\');\n -> 198653\n','https://mariadb.com/kb/en/yearweek/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (205,18,'NOT BETWEEN','Syntax:\nexpr NOT BETWEEN min AND max\n\nThis is the same as NOT (expr BETWEEN min AND max).\n\nURL: https://mariadb.com/kb/en/not-between/\n\n','','https://mariadb.com/kb/en/not-between/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (206,18,'IS NOT','Syntax:\nIS NOT boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is-not/\n\n','MariaDB> SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;\n -> 1, 1, 0\n','https://mariadb.com/kb/en/is-not/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (207,4,'LOG10','Syntax:\nLOG10(X)\n\nReturns the base-10 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log10/\n\n','MariaDB> SELECT LOG10(2);\n -> 0.30102999566398\nMariaDB> SELECT LOG10(100);\n -> 2\nMariaDB> SELECT LOG10(-100);\n -> NULL\n','https://mariadb.com/kb/en/log10/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (208,4,'SQRT','Syntax:\nSQRT(X)\n\nReturns the square root of a nonnegative number X.\n\nURL: https://mariadb.com/kb/en/sqrt/\n\n','MariaDB> SELECT SQRT(4);\n -> 2\nMariaDB> SELECT SQRT(20);\n -> 4.4721359549996\nMariaDB> SELECT SQRT(-16);\n -> NULL\n','https://mariadb.com/kb/en/sqrt/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (209,22,'DECIMAL','DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nA packed "exact" fixed-point number. M is the total number of digits\n(the precision) and D is the number of digits after the decimal point\n(the scale). The decimal point and (for negative numbers) the "-" sign\nare not counted in M. If D is 0, values have no decimal point or\nfractional part. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30. If D is omitted,\nthe default is 0. If M is omitted, the default is 10.\n\nUNSIGNED, if specified, disallows negative values.\n\nAll basic calculations (+, -, *, /) with DECIMAL columns are done with\na precision of 65 digits.\n\nURL: https://mariadb.com/kb/en/decimal/\n\n','','https://mariadb.com/kb/en/decimal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (210,39,'CREATE INDEX','Syntax:\nCREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [index_option] ...\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nCREATE INDEX is mapped to an ALTER TABLE statement to create indexes.\nSee [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY\nKEY; use ALTER TABLE instead. For more information about indexes, see\nhttps://mariadb.com/kb/en/optimization-and-indexes/.\n\nURL: https://mariadb.com/kb/en/create-index/\n\n','','https://mariadb.com/kb/en/create-index/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (211,39,'CREATE FUNCTION','The CREATE FUNCTION statement is used to create stored functions and\nuser-defined functions (UDFs):\n\no For information about creating stored functions, see [HELP CREATE\n PROCEDURE].\n\no For information about creating user-defined functions, see [HELP\n CREATE FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/create-function/\n\n','','https://mariadb.com/kb/en/create-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (212,39,'ALTER DATABASE','Syntax:\nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n\nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n\nALTER DATABASE enables you to change the overall characteristics of a\ndatabase. These characteristics are stored in the db.opt file in the\ndatabase directory. To use ALTER DATABASE, you need the ALTER privilege\non the database. ALTER SCHEMA is a synonym for ALTER DATABASE.\n\nThe database name can be omitted from the first syntax, in which case\nthe statement applies to the default database.\n\nNational Language Characteristics\n\nThe CHARACTER SET clause changes the default database character set.\nThe COLLATE clause changes the default database collation.\nhttps://mariadb.com/kb/en/data-types-character-sets-and-collations/, discusses\ncharacter set and collation names.\n\nYou can see what character sets and collations are available using,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION statements. See\n[HELP SHOW CHARACTER SET], and [HELP SHOW COLLATION], for more\ninformation.\n\nIf you change the default character set or collation for a database,\nstored routines that use the database defaults must be dropped and\nrecreated so that they use the new defaults. (In a stored routine,\nvariables with character data types use the database defaults if the\ncharacter set or collation are not specified explicitly. See [HELP\nCREATE PROCEDURE].)\n\nUpgrading from Versions Older than MySQL 5.1\n\nThe syntax that includes the UPGRADE DATA DIRECTORY NAME clause updates\nthe name of the directory associated with the database to use the\nencoding implemented in MySQL 5.1 for mapping database names to\ndatabase directory names (see\nhttps://mariadb.com/kb/en/identifier-to-file-name-mapping/). This\nclause is for use under these conditions:\n\no It is intended when upgrading MySQL to 5.1 or later from older\n versions.\n\no It is intended to update a database directory name to the current\n encoding format if the name contains special characters that need\n encoding.\n\no The statement is used by mysqlcheck (as invoked by mysql_upgrade).\n\nFor example, if a database in MySQL 5.0 has the name a-b-c, the name\ncontains instances of the - (dash) character. In MySQL 5.0, the\ndatabase directory is also named a-b-c, which is not necessarily safe\nfor all file systems. In MySQL 5.1 and later, the same database name is\nencoded as a@002db@002dc to produce a file system-neutral directory\nname.\n\nWhen a MySQL installation is upgraded to MySQL 5.1 or later from an\nolder version,the server displays a name such as a-b-c (which is in the\nold format) as #mysql50#a-b-c, and you must refer to the name using the\n#mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME in this case to\nexplicitly tell the server to re-encode the database directory name to\nthe current encoding format:\n\nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n\nAfter executing this statement, you can refer to the database as a-b-c\nwithout the special #mysql50# prefix.\n\nURL: https://mariadb.com/kb/en/alter-database/\n\n','','https://mariadb.com/kb/en/alter-database/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (213,25,'GEOMETRYN','GeometryN(gc,N)\n\nReturns the N-th geometry in the GeometryCollection value gc.\nGeometries are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/geometryn/\n\n','MariaDB> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nMariaDB> SELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n','https://mariadb.com/kb/en/geometryn/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (214,19,'<<','Syntax:\n<<\n\nShifts a longlong (BIGINT) number to the left.\n\nURL: https://mariadb.com/kb/en/shift-left/\n\n','MariaDB> SELECT 1 << 2;\n -> 4\n','https://mariadb.com/kb/en/shift-left/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (215,26,'SHOW TABLE STATUS','Syntax:\nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of\ninformation about each non-TEMPORARY table. You can also get this list\nusing the mysqlshow --status db_name command. The LIKE clause, if\npresent, indicates which table names to match. The WHERE clause can be\ngiven to select rows using more general conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-table-status/\n\n','','https://mariadb.com/kb/en/show-table-status/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (216,12,'MD5','Syntax:\nMD5(str)\n\nCalculates an MD5 128-bit checksum for the string. The value is\nreturned as a string of 32 hex digits, or NULL if the argument was\nNULL. The return value can, for example, be used as a hash key. See the\nnotes at the beginning of this section about storing hash values\nefficiently.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/md5/\n\n','MariaDB> SELECT MD5(\'testing\');\n -> \'ae2b1fca515949e5d54fb22b8ed95575\'\n','https://mariadb.com/kb/en/md5/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (217,18,'<','Syntax:\n<\n\nLess than:\n\nURL: https://mariadb.com/kb/en/less-than/\n\n','MariaDB> SELECT 2 < 2;\n -> 0\n','https://mariadb.com/kb/en/less-than/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (218,31,'UNIX_TIMESTAMP','Syntax:\nUNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)\n\nIf called with no argument, returns a Unix timestamp (seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If UNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the argument as\nseconds since \'1970-01-01 00:00:00\' UTC. date may be a DATE string, a\nDATETIME string, a TIMESTAMP, or a number in the format YYMMDD or\nYYYYMMDD. The server interprets date as a value in the current time\nzone and converts it to an internal value in UTC. Clients can set their\ntime zone as described in\nhttps://mariadb.com/kb/en/time-zones/.\n\nURL: https://mariadb.com/kb/en/unix_timestamp/\n\n','MariaDB> SELECT UNIX_TIMESTAMP();\n -> 1196440210\nMariaDB> SELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n -> 1196440219\n','https://mariadb.com/kb/en/unix_timestamp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (219,31,'DAYOFMONTH','Syntax:\nDAYOFMONTH(date)\n\nReturns the day of the month for date, in the range 1 to 31, or 0 for\ndates such as \'0000-00-00\' or \'2008-00-00\' that have a zero day part.\n\nURL: https://mariadb.com/kb/en/dayofmonth/\n\n','MariaDB> SELECT DAYOFMONTH(\'2007-02-03\');\n -> 3\n','https://mariadb.com/kb/en/dayofmonth/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (220,37,'ASCII','Syntax:\nASCII(str)\n\nReturns the numeric value of the leftmost character of the string str.\nReturns 0 if str is the empty string. Returns NULL if str is NULL.\nASCII() works for 8-bit characters.\n\nURL: https://mariadb.com/kb/en/ascii/\n\n','MariaDB> SELECT ASCII(\'2\');\n -> 50\nMariaDB> SELECT ASCII(2);\n -> 50\nMariaDB> SELECT ASCII(\'dx\');\n -> 100\n','https://mariadb.com/kb/en/ascii/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (221,4,'DIV','Syntax:\nDIV\n\nInteger division. Similar to FLOOR(), but is safe with BIGINT values.\n\nAs of MySQL 5.5.3, if either operand has a noninteger type, the\noperands are converted to DECIMAL and divided using DECIMAL arithmetic\nbefore converting the result to BIGINT. If the result exceeds BIGINT\nrange, an error occurs. Before MySQL 5.5.3, incorrect results may occur\nfor noninteger operands that exceed BIGINT range.\n\nURL: https://mariadb.com/kb/en/div/\n\n','MariaDB> SELECT 5 DIV 2;\n -> 2\n','https://mariadb.com/kb/en/div/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (222,10,'RENAME USER','Syntax:\nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n\nThe RENAME USER statement renames existing MySQL accounts. To use it,\nyou must have the global CREATE USER privilege or the UPDATE privilege\nfor the mysql database. An error occurs if any old account does not\nexist or any new account exists. Each account name uses the format\ndescribed in https://mariadb.com/kb/en/create-user/#account-names.\nFor example:\n\nRENAME USER \'jeffrey\'@\'localhost\' TO \'jeff\'@\'127.0.0.1\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nRENAME USER causes the privileges held by the old user to be those held\nby the new user. However, RENAME USER does not automatically drop or\ninvalidate databases or objects within them that the old user created.\nThis includes stored programs or views for which the DEFINER attribute\nnames the old user. Attempts to access such objects may produce an\nerror if they execute in definer security context. (For information\nabout security context, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.)\n\nThe privilege changes take effect as indicated in\nhttp://dev.mysql.com/doc/refman/5.5/en/privilege-changes.html.\n\nURL: https://mariadb.com/kb/en/rename-user/\n\n','','https://mariadb.com/kb/en/rename-user/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (223,26,'SHOW SLAVE STATUS','Syntax:\nSHOW SLAVE STATUS\n\nThis statement provides status information on essential parameters of\nthe slave threads. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nIf you issue this statement using the mysql client, you can use a \\G\nstatement terminator rather than a semicolon to obtain a more readable\nvertical layout:\n\nMariaDB> SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: localhost\n Master_User: root\n Master_Port: 3306\n Connect_Retry: 3\n Master_Log_File: gbichot-bin.005\n Read_Master_Log_Pos: 79\n Relay_Log_File: gbichot-relay-bin.005\n Relay_Log_Pos: 548\n Relay_Master_Log_File: gbichot-bin.005\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB:\n Replicate_Ignore_DB:\n Replicate_Do_Table:\n Replicate_Ignore_Table:\n Replicate_Wild_Do_Table:\n Replicate_Wild_Ignore_Table:\n Last_Errno: 0\n Last_Error:\n Skip_Counter: 0\n Exec_Master_Log_Pos: 79\n Relay_Log_Space: 552\n Until_Condition: None\n Until_Log_File:\n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File:\n Master_SSL_CA_Path:\n Master_SSL_Cert:\n Master_SSL_Cipher:\n Master_SSL_Key:\n Seconds_Behind_Master: 8\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error:\n Last_SQL_Errno: 0\n Last_SQL_Error:\n Replicate_Ignore_Server_Ids: 0\n Master_Server_Id: 1\n\nURL: https://mariadb.com/kb/en/show-slave-status/\n\n','','https://mariadb.com/kb/en/show-slave-status/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (224,34,'GEOMETRY','MySQL provides a standard way of creating spatial columns for geometry\ntypes, for example, with CREATE TABLE or ALTER TABLE. Currently,\nspatial columns are supported for MyISAM, Aria, InnoDB and ARCHIVE\ntables. See also the annotations about spatial indexes under [HELP\nSPATIAL].\n\nURL: https://mariadb.com/kb/en/gis-functionality/\n\n','CREATE TABLE geom (g GEOMETRY);\n','https://mariadb.com/kb/en/gis-functionality/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (225,13,'NUMPOINTS','NumPoints(ls)\n\nReturns the number of Point objects in the LineString value ls.\n\nURL: https://mariadb.com/kb/en/numpoints/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n','https://mariadb.com/kb/en/numpoints/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (226,39,'ALTER LOGFILE GROUP','Syntax:\nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n','','https://mariadb.com/kb/en/alter-logfile-group/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (227,19,'&','Syntax:\n&\n\nBitwise AND:\n\nURL: https://mariadb.com/kb/en/bitwise_and/\n\n','MariaDB> SELECT 29 & 15;\n -> 13\n','https://mariadb.com/kb/en/bitwise_and/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (228,31,'LOCALTIMESTAMP','Syntax:\nLOCALTIMESTAMP, LOCALTIMESTAMP()\n\nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtimestamp/\n\n','','https://mariadb.com/kb/en/localtimestamp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (229,15,'ASSIGN-EQUAL','Syntax:\n=\n\nThis operator is used to perform value assignments in two cases,\ndescribed in the next two paragraphs.\n\nWithin a SET statement, = is treated as an assignment operator that\ncauses the user variable on the left hand side of the operator to take\non the value to its right. (In other words, when used in a SET\nstatement, = is treated identically to :=.) The value on the right hand\nside may be a literal value, another variable storing a value, or any\nlegal expression that yields a scalar value, including the result of a\nquery (provided that this value is a scalar value). You can perform\nmultiple assignments in the same SET statement.\n\nIn the SET clause of an UPDATE statement, = also acts as an assignment\noperator; in this case, however, it causes the column named on the left\nhand side of the operator to assume the value given to the right,\nprovided any WHERE conditions that are part of the UPDATE are met. You\ncan make multiple assignments in the same SET clause of an UPDATE\nstatement.\n\nIn any other context, = is treated as a comparison operator.\n\nURL: https://mariadb.com/kb/en/assignment-operators-assignment-operator/\n\n','MariaDB> SELECT @var1, @var2;\n -> NULL, NULL\nMariaDB> SELECT @var1 := 1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2;\n -> 1, NULL\nMariaDB> SELECT @var1, @var2 := @var1;\n -> 1, 1\nMariaDB> SELECT @var1, @var2;\n -> 1, 1\n','https://mariadb.com/kb/en/assignment-operators-assignment-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (230,37,'CONVERT','Syntax:\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nThe CONVERT() and CAST() functions take an expression of any type and\nproduce a result value of a specified type.\n\nThe type for the result can be one of the following values:\n\no BINARY[(N)]\n\no CHAR[(N)]\n\no DATE\n\no DATETIME\n\no DECIMAL[(M[,D])]\n\no SIGNED [INTEGER]\n\no TIME\n\no UNSIGNED [INTEGER]\n\nBINARY produces a string with the BINARY data type. See\nhttps://mariadb.com/kb/en/binary/ for a\ndescription of how this affects comparisons. If the optional length N\nis given, BINARY(N) causes the cast to use no more than N bytes of the\nargument. Values shorter than N bytes are padded with 0x00 bytes to a\nlength of N.\n\nCHAR(N) causes the cast to use no more than N characters of the\nargument.\n\nCAST() and CONVERT(... USING ...) are standard SQL syntax. The\nnon-USING form of CONVERT() is ODBC syntax.\n\nCONVERT() with USING is used to convert data between different\ncharacter sets. In MySQL, transcoding names are the same as the\ncorresponding character set names. For example, this statement converts\nthe string \'abc\' in the default character set to the corresponding\nstring in the utf8 character set:\n\nSELECT CONVERT(\'abc\' USING utf8);\n\nURL: https://mariadb.com/kb/en/convert/\n\n','SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);\n','https://mariadb.com/kb/en/convert/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (231,31,'ADDDATE','Syntax:\nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, ADDDATE()\nis a synonym for DATE_ADD(). The related function SUBDATE() is a\nsynonym for DATE_SUB(). For information on the INTERVAL unit argument,\nsee the discussion for DATE_ADD().\n\nMariaDB> SELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\nMariaDB> SELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n -> \'2008-02-02\'\n\nWhen invoked with the days form of the second argument, MySQL treats it\nas an integer number of days to be added to expr.\n\nURL: https://mariadb.com/kb/en/adddate/\n\n','MariaDB> SELECT ADDDATE(\'2008-01-02\', 31);\n -> \'2008-02-02\'\n','https://mariadb.com/kb/en/adddate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (232,23,'REPEAT LOOP','Syntax:\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\nThe statement list within a REPEAT statement is repeated until the\nsearch_condition expression is true. Thus, a REPEAT always enters the\nloop at least once. statement_list consists of one or more statements,\neach terminated by a semicolon (;) statement delimiter.\n\nA REPEAT statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/repeat-loop/\n\n','MariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE dorepeat(p1 INT)\n -> BEGIN\n -> SET @x = 0;\n -> REPEAT\n -> SET @x = @x + 1;\n -> UNTIL @x > p1 END REPEAT;\n -> END\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL dorepeat(1000)//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/repeat-loop/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (233,39,'ALTER FUNCTION','Syntax:\nALTER FUNCTION func_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nfunction. More than one change may be specified in an ALTER FUNCTION\nstatement. However, you cannot change the parameters or body of a\nstored function using this statement; to make such changes, you must\ndrop and re-create the function using DROP FUNCTION and CREATE\nFUNCTION.\n\nYou must have the ALTER ROUTINE privilege for the function. (That\nprivilege is granted automatically to the function creator.) If binary\nlogging is enabled, the ALTER FUNCTION statement might also require the\nSUPER privilege, as described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nURL: https://mariadb.com/kb/en/alter-function/\n\n','','https://mariadb.com/kb/en/alter-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (234,22,'SMALLINT','SMALLINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA small integer. The signed range is -32768 to 32767. The unsigned\nrange is 0 to 65535.\n\nURL: https://mariadb.com/kb/en/smallint/\n\n','','https://mariadb.com/kb/en/smallint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (235,22,'DOUBLE PRECISION','DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED]\n[ZEROFILL]\n\nThese types are synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT\nSQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.\n\nURL: https://mariadb.com/kb/en/double-precision/\n\n','','https://mariadb.com/kb/en/double-precision/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (236,37,'ORD','Syntax:\nORD(str)\n\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the numeric values\nof its constituent bytes using this formula:\n\n (1st byte code)\n+ (2nd byte code * 256)\n+ (3rd byte code * 2562) ...\n\nIf the leftmost character is not a multi-byte character, ORD() returns\nthe same value as the ASCII() function.\n\nURL: https://mariadb.com/kb/en/ord/\n\n','MariaDB> SELECT ORD(\'2\');\n -> 50\n','https://mariadb.com/kb/en/ord/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (237,8,'DEALLOCATE PREPARE','Syntax:\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nTo deallocate a prepared statement produced with PREPARE, use a\nDEALLOCATE PREPARE statement that refers to the prepared statement\nname. Attempting to execute a prepared statement after deallocating it\nresults in an error.\n\nURL: https://mariadb.com/kb/en/deallocate-drop-prepared-statement/\n\n','','https://mariadb.com/kb/en/deallocate-drop-prepared-statement/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (238,36,'ENVELOPE','Envelope(g)\n\nReturns the Minimum Bounding Rectangle (MBR) for the geometry value g.\nThe result is returned as a Polygon value.\n\nThe polygon is defined by the corner points of the bounding box:\n\nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n\nURL: https://mariadb.com/kb/en/envelope/\n\n','MariaDB> SELECT AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\')));\n+-------------------------------------------------------+\n| AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\'))) |\n+-------------------------------------------------------+\n| POLYGON((1 1,2 1,2 2,1 2,1 1)) |\n+-------------------------------------------------------+\n','https://mariadb.com/kb/en/envelope/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (239,14,'IS_FREE_LOCK','Syntax:\nIS_FREE_LOCK(str)\n\nChecks whether the lock named str is free to use (that is, not locked).\nReturns 1 if the lock is free (no one is using the lock), 0 if the lock\nis in use, and NULL if an error occurs (such as an incorrect argument).\n\nURL: https://mariadb.com/kb/en/is_free_lock/\n\n','','https://mariadb.com/kb/en/is_free_lock/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (240,30,'TOUCHES','Touches(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially touches g2. Two\ngeometries spatially touch if the interiors of the geometries do not\nintersect, but the boundary of one of the geometries intersects either\nthe boundary or the interior of the other.\n\nURL: https://mariadb.com/kb/en/touches/\n\n','','https://mariadb.com/kb/en/touches/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (241,14,'INET_ATON','Syntax:\nINET_ATON(expr)\n\nGiven the dotted-quad representation of an IPv4 network address as a\nstring, returns an integer that represents the numeric value of the\naddress in network byte order (big endian). INET_ATON() returns NULL if\nit does not understand its argument.\n\nURL: https://mariadb.com/kb/en/inet_aton/\n\n','MariaDB> SELECT INET_ATON(\'10.0.5.9\');\n -> 167773449\n','https://mariadb.com/kb/en/inet_aton/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (242,12,'UNCOMPRESS','Syntax:\nUNCOMPRESS(string_to_uncompress)\n\nUncompresses a string compressed by the COMPRESS() function. If the\nargument is not a compressed value, the result is NULL. This function\nrequires MySQL to have been compiled with a compression library such as\nzlib. Otherwise, the return value is always NULL.\n\nURL: https://mariadb.com/kb/en/uncompress/\n\n','MariaDB> SELECT UNCOMPRESS(COMPRESS(\'any string\'));\n -> \'any string\'\nMariaDB> SELECT UNCOMPRESS(\'any string\');\n -> NULL\n','https://mariadb.com/kb/en/uncompress/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (243,22,'AUTO_INCREMENT','The AUTO_INCREMENT attribute can be used to generate a unique identity\nfor new rows:\n\nURL: https://mariadb.com/kb/en/auto_increment/\n\n','CREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n);\n\nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'lax\'),(\'whale\'),(\'ostrich\');\n\nSELECT * FROM animals;\n','https://mariadb.com/kb/en/auto_increment/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (244,36,'ISSIMPLE','IsSimple(g)\n\nCurrently, this function is a placeholder and should not be used. If\nimplemented, its behavior will be as described in the next paragraph.\n\nReturns 1 if the geometry value g has no anomalous geometric points,\nsuch as self-intersection or self-tangency. IsSimple() returns 0 if the\nargument is not simple, and -1 if it is NULL.\n\nThe description of each instantiable geometric class given earlier in\nthe chapter includes the specific conditions that cause an instance of\nthat class to be classified as not simple. (See [HELP Geometry\nhierarchy].)\n\nURL: https://mariadb.com/kb/en/issimple/\n\n','','https://mariadb.com/kb/en/issimple/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (245,4,'- BINARY','Syntax:\n-\n\nSubtraction:\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT 3-5;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (246,3,'GEOMCOLLFROMTEXT','GeomCollFromText(wkt[,srid]), GeometryCollectionFromText(wkt[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKT representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/geomcollfromtext/\n\n','','https://mariadb.com/kb/en/geomcollfromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (247,3,'WKT DEFINITION','The Well-Known Text (WKT) representation of Geometry is designed to\nexchange geometry data in ASCII form. For a Backus-Naur grammar that\nspecifies the formal production rules for writing WKT values, see the\nOpenGIS specification document referenced in\nhttps://mariadb.com/kb/en/gis-resources/.\n\nURL: https://mariadb.com/kb/en/wkt-definition/\n\n','','https://mariadb.com/kb/en/wkt-definition/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (248,31,'CURRENT_TIME','Syntax:\nCURRENT_TIME, CURRENT_TIME()\n\nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n\nURL: https://mariadb.com/kb/en/current_time/\n\n','','https://mariadb.com/kb/en/current_time/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (249,10,'REVOKE','Syntax:\nREVOKE\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n\nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n\nREVOKE PROXY ON user\n FROM user [, user] ...\n\nThe REVOKE statement enables system administrators to revoke privileges\nfrom MySQL accounts. Each account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nREVOKE INSERT ON *.* FROM \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nFor details on the levels at which privileges exist, the permissible\npriv_type and priv_level values, and the syntax for specifying users\nand passwords, see [HELP GRANT]\n\nTo use the first REVOKE syntax, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are revoking.\n\nTo revoke all privileges, use the second syntax, which drops all\nglobal, database, table, column, and routine privileges for the named\nuser or users:\n\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n\nTo use this REVOKE syntax, you must have the global CREATE USER\nprivilege or the UPDATE privilege for the mysql database.\n\nURL: https://mariadb.com/kb/en/revoke/\n\n','','https://mariadb.com/kb/en/revoke/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (250,17,'LAST_INSERT_ID','Syntax:\nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n\nLAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value\nrepresenting the first automatically generated value successfully\ninserted for an AUTO_INCREMENT column as a result of the most recently\nexecuted INSERT statement. The value of LAST_INSERT_ID() remains\nunchanged if no rows are successfully inserted.\n\nFor example, after inserting a row that generates an AUTO_INCREMENT\nvalue, you can get the value like this:\n\nMariaDB> SELECT LAST_INSERT_ID();\n -> 195\n\nThe currently executing statement does not affect the value of\nLAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table with its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain\nstable in the second statement; its value for the second and later rows\nis not affected by the earlier row insertions. (However, if you mix\nreferences to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is\nundefined.)\n\nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if the\nstatement is rolled back due to an error, the value of LAST_INSERT_ID()\nis left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()\nis not restored to that before the transaction; it remains as it was at\nthe point of the ROLLBACK.\n\nWithin the body of a stored routine (procedure or function) or a\ntrigger, the value of LAST_INSERT_ID() changes the same way as for\nstatements executed outside the body of these kinds of objects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements depends on the\nkind of routine:\n\no If a stored procedure executes statements that change the value of\n LAST_INSERT_ID(), the changed value is seen by statements that follow\n the procedure call.\n\no For stored functions and triggers that change the value, the value is\n restored when the function or trigger ends, so following statements\n will not see a changed value.\n\nURL: https://mariadb.com/kb/en/last_insert_id/\n\n','','https://mariadb.com/kb/en/last_insert_id/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (251,31,'LAST_DAY','Syntax:\nLAST_DAY(date)\n\nTakes a date or datetime value and returns the corresponding value for\nthe last day of the month. Returns NULL if the argument is invalid.\n\nURL: https://mariadb.com/kb/en/last_day/\n\n','MariaDB> SELECT LAST_DAY(\'2003-02-05\');\n -> \'2003-02-28\'\nMariaDB> SELECT LAST_DAY(\'2004-02-05\');\n -> \'2004-02-29\'\nMariaDB> SELECT LAST_DAY(\'2004-01-01 01:01:01\');\n -> \'2004-01-31\'\nMariaDB> SELECT LAST_DAY(\'2003-03-32\');\n -> NULL\n','https://mariadb.com/kb/en/last_day/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (252,22,'MEDIUMINT','MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA medium-sized integer. The signed range is -8388608 to 8388607. The\nunsigned range is 0 to 16777215.\n\nURL: https://mariadb.com/kb/en/mediumint/\n\n','','https://mariadb.com/kb/en/mediumint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (253,4,'FLOOR','Syntax:\nFLOOR(X)\n\nReturns the largest integer value not greater than X.\n\nURL: https://mariadb.com/kb/en/floor/\n\n','MariaDB> SELECT FLOOR(1.23);\n -> 1\nMariaDB> SELECT FLOOR(-1.23);\n -> -2\n','https://mariadb.com/kb/en/floor/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (254,37,'RTRIM','Syntax:\nRTRIM(str)\n\nReturns the string str with trailing space characters removed.\n\nURL: https://mariadb.com/kb/en/rtrim/\n\n','MariaDB> SELECT RTRIM(\'barbar \');\n -> \'barbar\'\n','https://mariadb.com/kb/en/rtrim/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (255,28,'EXPLAIN','Syntax:\nEXPLAIN [explain_type] SELECT select_options\n\nexplain_type:\n EXTENDED\n | PARTITIONS\n\nOr:\n\nEXPLAIN tbl_name\n\nThe EXPLAIN statement can be used either as a way to obtain information\nabout how MySQL executes a statement, or as a synonym for DESCRIBE:\n\no When you precede a SELECT statement with the keyword EXPLAIN, MySQL\n displays information from the optimizer about the query execution\n plan. That is, MySQL explains how it would process the statement,\n including information about how tables are joined and in which order.\n EXPLAIN EXTENDED can be used to obtain additional information.\n\n For information about using EXPLAIN and EXPLAIN EXTENDED to obtain\n query execution plan information, see\n https://mariadb.com/kb/en/explain/.\n\no EXPLAIN PARTITIONS is useful only when examining queries involving\n partitioned tables. For details, see\n http://dev.mysql.com/doc/refman/5.5/en/partitioning-info.html.\n\no EXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS\n FROM tbl_name. For information about DESCRIBE and SHOW COLUMNS, see\n [HELP DESCRIBE], and [HELP SHOW COLUMNS].\n\nURL: https://mariadb.com/kb/en/explain/\n\n','','https://mariadb.com/kb/en/explain/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (256,4,'DEGREES','Syntax:\nDEGREES(X)\n\nReturns the argument X, converted from radians to degrees.\n\nURL: https://mariadb.com/kb/en/degrees/\n\n','MariaDB> SELECT DEGREES(PI());\n -> 180\nMariaDB> SELECT DEGREES(PI() / 2);\n -> 90\n','https://mariadb.com/kb/en/degrees/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (257,22,'VARCHAR','[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA variable-length string. M represents the maximum column length in\ncharacters. The range of M is 0 to 65,535. The effective maximum length\nof a VARCHAR is subject to the maximum row size (65,535 bytes, which is\nshared among all columns) and the character set used. For example, utf8\ncharacters can require up to three bytes per character, so a VARCHAR\ncolumn that uses the utf8 character set can be declared to be a maximum\nof 21,844 characters. See\nhttp://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.\n\nMySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus\ndata. The length prefix indicates the number of bytes in the value. A\nVARCHAR column uses one length byte if values require no more than 255\nbytes, two length bytes if values may require more than 255 bytes.\n\n*Note*: MySQL 5.5 follows the standard SQL specification, and does not\nremove trailing spaces from VARCHAR values.\n\nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the\nstandard SQL way to define that a VARCHAR column should use some\npredefined character set. MySQL 4.1 and up uses utf8 as this predefined\ncharacter set.\nhttps://mariadb.com/kb/en/varchar/. NVARCHAR\nis shorthand for NATIONAL VARCHAR.\n\nURL: https://mariadb.com/kb/en/varchar/\n\n','','https://mariadb.com/kb/en/varchar/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (258,37,'UNHEX','Syntax:\n\nUNHEX(str)\n\nFor a string argument str, UNHEX(str) performs the inverse operation of\nHEX(str). That is, it interprets each pair of characters in the\nargument as a hexadecimal number and converts it to the character\nrepresented by the number. The return value is a binary string.\n\nURL: https://mariadb.com/kb/en/unhex/\n\n','MariaDB> SELECT UNHEX(\'4D7953514C\');\n -> \'MySQL\'\nMariaDB> SELECT 0x4D7953514C;\n -> \'MySQL\'\nMariaDB> SELECT UNHEX(HEX(\'string\'));\n -> \'string\'\nMariaDB> SELECT HEX(UNHEX(\'1267\'));\n -> \'1267\'\n','https://mariadb.com/kb/en/unhex/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (259,4,'- UNARY','Syntax:\n-\n\nUnary minus. This operator changes the sign of the operand.\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/\n\n','MariaDB> SELECT - 2;\n -> -2\n','https://mariadb.com/kb/en/subtraction-operator-/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (260,16,'STD','Syntax:\nSTD(expr)\n\nReturns the population standard deviation of expr. This is an extension\nto standard SQL. The standard SQL function STDDEV_POP() can be used\ninstead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/std/\n\n','','https://mariadb.com/kb/en/std/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (261,4,'COS','Syntax:\nCOS(X)\n\nReturns the cosine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/cos/\n\n','MariaDB> SELECT COS(PI());\n -> -1\n','https://mariadb.com/kb/en/cos/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (262,31,'DATE FUNCTION','Syntax:\nDATE(expr)\n\nExtracts the date part of the date or datetime expression expr.\n\nURL: https://mariadb.com/kb/en/date-function/\n\n','MariaDB> SELECT DATE(\'2003-12-31 01:02:03\');\n -> \'2003-12-31\'\n','https://mariadb.com/kb/en/date-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (263,39,'DROP TRIGGER','Syntax:\nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n\nThis statement drops a trigger. The schema (database) name is optional.\nIf the schema is omitted, the trigger is dropped from the default\nschema. DROP TRIGGER requires the TRIGGER privilege for the table\nassociated with the trigger.\n\nUse IF EXISTS to prevent an error from occurring for a trigger that\ndoes not exist. A NOTE is generated for a nonexistent trigger when\nusing IF EXISTS. See [HELP SHOW WARNINGS].\n\nTriggers for a table are also dropped if you drop the table.\n\nURL: https://mariadb.com/kb/en/drop-trigger/\n\n','','https://mariadb.com/kb/en/drop-trigger/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (264,8,'RESET MASTER','Syntax:\nRESET MASTER\n\nDeletes all binary log files listed in the index file, resets the\nbinary log index file to be empty, and creates a new binary log file.\nThis statement is intended to be used only when the master is started\nfor the first time.\n\nURL: https://mariadb.com/kb/en/reset-master/\n\n','','https://mariadb.com/kb/en/reset-master/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (265,4,'TAN','Syntax:\nTAN(X)\n\nReturns the tangent of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/tan/\n\n','MariaDB> SELECT TAN(PI());\n -> -1.2246063538224e-16\nMariaDB> SELECT TAN(PI()+1);\n -> 1.5574077246549\n','https://mariadb.com/kb/en/tan/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (266,4,'PI','Syntax:\nPI()\n\nReturns the value of π (pi). The default number of decimal places\ndisplayed is seven, but MySQL uses the full double-precision value\ninternally.\n\nURL: https://mariadb.com/kb/en/pi/\n\n','MariaDB> SELECT PI();\n -> 3.141593\nMariaDB> SELECT PI()+0.000000000000000000;\n -> 3.141592653589793116\n','https://mariadb.com/kb/en/pi/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (267,31,'WEEKOFYEAR','Syntax:\nWEEKOFYEAR(date)\n\nReturns the calendar week of the date as a number in the range from 1\nto 53. WEEKOFYEAR() is a compatibility function that is equivalent to\nWEEK(date,3).\n\nURL: https://mariadb.com/kb/en/weekofyear/\n\n','MariaDB> SELECT WEEKOFYEAR(\'2008-02-20\');\n -> 8\n','https://mariadb.com/kb/en/weekofyear/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (268,4,'/','Syntax:\n/\n\nDivision:\n\nURL: https://mariadb.com/kb/en/division-operator/\n\n','MariaDB> SELECT 3/5;\n -> 0.60\n','https://mariadb.com/kb/en/division-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (269,8,'PURGE BINARY LOGS','Syntax:\nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n\nThe binary log is a set of files that contain information about data\nmodifications made by the MySQL server. The log consists of a set of\nbinary log files, plus an index file (see\nhttps://mariadb.com/kb/en/overview-of-the-binary-log/).\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed\nin the log index file prior to the specified log file name or date.\nBINARY and MASTER are synonyms. Deleted log files also are removed from\nthe list recorded in the index file, so that the given log file becomes\nthe first in the list.\n\nThis statement has no effect if the server was not started with the\n--log-bin option to enable binary logging.\n\nURL: https://mariadb.com/kb/en/sql-commands-purge-logs/\n\n','PURGE BINARY LOGS TO \'mysql-bin.010\';\nPURGE BINARY LOGS BEFORE \'2008-04-02 22:46:26\';\n','https://mariadb.com/kb/en/sql-commands-purge-logs/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (270,16,'STDDEV_SAMP','Syntax:\nSTDDEV_SAMP(expr)\n\nReturns the sample standard deviation of expr (the square root of\nVAR_SAMP().\n\nSTDDEV_SAMP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_samp/\n\n','','https://mariadb.com/kb/en/stddev_samp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (271,17,'SCHEMA','Syntax:\nSCHEMA()\n\nThis function is a synonym for DATABASE().\n\nURL: https://mariadb.com/kb/en/schema/\n\n','','https://mariadb.com/kb/en/schema/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (272,32,'MLINEFROMWKB','MLineFromWKB(wkb[,srid]), MultiLineStringFromWKB(wkb[,srid])\n\nConstructs a MULTILINESTRING value using its WKB representation and\nSRID.\n\nURL: https://mariadb.com/kb/en/mlinefromwkb/\n\n','','https://mariadb.com/kb/en/mlinefromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (273,4,'LOG2','Syntax:\nLOG2(X)\n\nReturns the base-2 logarithm of X.\n\nURL: https://mariadb.com/kb/en/log2/\n\n','MariaDB> SELECT LOG2(65536);\n -> 16\nMariaDB> SELECT LOG2(-100);\n -> NULL\n','https://mariadb.com/kb/en/log2/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (274,31,'SUBTIME','Syntax:\nSUBTIME(expr1,expr2)\n\nSUBTIME() returns expr1 - expr2 expressed as a value in the same format\nas expr1. expr1 is a time or datetime expression, and expr2 is a time\nexpression.\n\nURL: https://mariadb.com/kb/en/subtime/\n\n','MariaDB> SELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\');\n -> \'2007-12-30 22:58:58.999997\'\nMariaDB> SELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n -> \'-00:59:59.999999\'\n','https://mariadb.com/kb/en/subtime/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (275,12,'UNCOMPRESSED_LENGTH','Syntax:\nUNCOMPRESSED_LENGTH(compressed_string)\n\nReturns the length that the compressed string had before being\ncompressed.\n\nURL: https://mariadb.com/kb/en/uncompressed_length/\n\n','MariaDB> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n -> 30\n','https://mariadb.com/kb/en/uncompressed_length/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (276,39,'DROP TABLE','Syntax:\nDROP [TEMPORARY] TABLE [IF EXISTS]\n tbl_name [, tbl_name] ...\n [RESTRICT | CASCADE]\n\nDROP TABLE removes one or more tables. You must have the DROP privilege\nfor each table. All table data and the table definition are removed, so\nbe careful with this statement! If any of the tables named in the\nargument list do not exist, MySQL returns an error indicating by name\nwhich nonexisting tables it was unable to drop, but it also drops all\nof the tables in the list that do exist.\n\n*Important*: When a table is dropped, user privileges on the table are\nnot automatically dropped. See [HELP GRANT].\n\nNote that for a partitioned table, DROP TABLE permanently removes the\ntable definition, all of its partitions, and all of the data which was\nstored in those partitions. It also removes the partitioning definition\n(.par) file associated with the dropped table.\n\nUse IF EXISTS to prevent an error from occurring for tables that do not\nexist. A NOTE is generated for each nonexistent table when using IF\nEXISTS. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE are permitted to make porting easier. In MySQL\n5.5, they do nothing.\n\n*Note*: DROP TABLE automatically commits the current active\ntransaction, unless you use the TEMPORARY keyword.\n\nURL: https://mariadb.com/kb/en/drop-table/\n\n','','https://mariadb.com/kb/en/drop-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (277,4,'POW','Syntax:\nPOW(X,Y)\n\nReturns the value of X raised to the power of Y.\n\nURL: https://mariadb.com/kb/en/pow/\n\n','MariaDB> SELECT POW(2,2);\n -> 4\nMariaDB> SELECT POW(2,-2);\n -> 0.25\n','https://mariadb.com/kb/en/pow/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (278,26,'SHOW CREATE TABLE','Syntax:\nSHOW CREATE TABLE tbl_name\n\nShows the CREATE TABLE statement that creates the given table. To use\nthis statement, you must have some privilege for the table. This\nstatement also works with views.\nSHOW CREATE TABLE quotes table and column names according to the value\nof the sql_quote_show_create option. See\nhttps://mariadb.com/kb/en/server-system-variables/.\n\nURL: https://mariadb.com/kb/en/show-create-table/\n\n','MariaDB> SHOW CREATE TABLE t\\G\n*************************** 1. row ***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id INT(11) default NULL auto_increment,\n s char(60) default NULL,\n PRIMARY KEY (id)\n) ENGINE=MyISAM\n','https://mariadb.com/kb/en/show-create-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (279,27,'DUAL','You are permitted to specify DUAL as a dummy table name in situations\nwhere no tables are referenced:\n\nMariaDB> SELECT 1 + 1 FROM DUAL;\n -> 2\n\nDUAL is purely for the convenience of people who require that all\nSELECT statements should have FROM and possibly other clauses. MySQL\nmay ignore the clauses. MySQL does not require FROM DUAL if no tables\nare referenced.\n\nURL: https://mariadb.com/kb/en/dual/\n\n','','https://mariadb.com/kb/en/dual/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (280,37,'INSTR','Syntax:\nINSTR(str,substr)\n\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of LOCATE(),\nexcept that the order of the arguments is reversed.\n\nURL: https://mariadb.com/kb/en/instr/\n\n','MariaDB> SELECT INSTR(\'foobarbar\', \'bar\');\n -> 4\nMariaDB> SELECT INSTR(\'xbar\', \'foobar\');\n -> 0\n','https://mariadb.com/kb/en/instr/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (281,31,'NOW','Syntax:\nNOW()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed in the\ncurrent time zone.\n\nURL: https://mariadb.com/kb/en/now/\n\n','MariaDB> SELECT NOW();\n -> \'2007-12-15 23:50:26\'\nMariaDB> SELECT NOW() + 0;\n -> 20071215235026.000000\n','https://mariadb.com/kb/en/now/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (282,26,'SHOW ENGINES','Syntax:\nSHOW [STORAGE] ENGINES\n\nSHOW ENGINES displays status information about the server\'s storage\nengines. This is particularly useful for checking whether a storage\nengine is supported, or to see what the default engine is.\n\nURL: https://mariadb.com/kb/en/show-engines/\n\n','','https://mariadb.com/kb/en/show-engines/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (283,18,'>=','Syntax:\n>=\n\nGreater than or equal:\n\nURL: https://mariadb.com/kb/en/greater-than-or-equal/\n\n','MariaDB> SELECT 2 >= 2;\n -> 1\n','https://mariadb.com/kb/en/greater-than-or-equal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (284,4,'EXP','Syntax:\nEXP(X)\n\nReturns the value of e (the base of natural logarithms) raised to the\npower of X. The inverse of this function is LOG() (using a single\nargument only) or LN().\n\nURL: https://mariadb.com/kb/en/exp/\n\n','MariaDB> SELECT EXP(2);\n -> 7.3890560989307\nMariaDB> SELECT EXP(-2);\n -> 0.13533528323661\nMariaDB> SELECT EXP(0);\n -> 1\n','https://mariadb.com/kb/en/exp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (285,22,'LONGBLOB','LONGBLOB\n\nA BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\nbytes. The effective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol and\navailable memory. Each LONGBLOB value is stored using a 4-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/longblob/\n\n','','https://mariadb.com/kb/en/longblob/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (286,13,'POINTN','PointN(ls,N)\n\nReturns the N-th Point in the Linestring value ls. Points are numbered\nbeginning with 1.\n\nURL: https://mariadb.com/kb/en/pointn/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n','https://mariadb.com/kb/en/pointn/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (287,22,'YEAR DATA TYPE','YEAR[(2|4)]\n\nA year in two-digit or four-digit format. The default is four-digit\nformat. YEAR(2) or YEAR(4) differ in display format, but have the same\nrange of values. In four-digit format, values display as 1901 to 2155,\nand 0000. In two-digit format, values display as 70 to 69, representing\nyears from 1970 to 2069. MySQL displays YEAR values in YYYY or\nYYformat, but permits assignment of values to YEAR columns using either\nstrings or numbers.\n\n*Note*: The YEAR(2) data type has certain issues that you should\nconsider before choosing to use it. As of MySQL 5.5.27, YEAR(2) is\ndeprecated. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/migrating-to-year4.html.\n\nFor additional information about YEAR display format and inerpretation\nof input values, see https://mariadb.com/kb/en/year-data-type/.\n\nURL: https://mariadb.com/kb/en/year-data-type/\n\n','','https://mariadb.com/kb/en/year-data-type/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (288,16,'SUM','Syntax:\nSUM([DISTINCT] expr)\n\nReturns the sum of expr. If the return set has no rows, SUM() returns\nNULL. The DISTINCT keyword can be used to sum only the distinct values\nof expr.\n\nSUM() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/sum/\n\n','','https://mariadb.com/kb/en/sum/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (289,37,'OCT','Syntax:\nOCT(N)\n\nReturns a string representation of the octal value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/oct/\n\n','MariaDB> SELECT OCT(12);\n -> \'14\'\n','https://mariadb.com/kb/en/oct/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (290,31,'SYSDATE','Syntax:\nSYSDATE()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context.\n\nSYSDATE() returns the time at which it executes. This differs from the\nbehavior for NOW(), which returns a constant time that indicates the\ntime at which the statement began to execute. (Within a stored function\nor trigger, NOW() returns the time at which the function or triggering\nstatement began to execute.)\n\nMariaDB> SELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:36 | 0 | 2006-04-12 13:47:36 |\n+---------------------+----------+---------------------+\n\nMariaDB> SELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2006-04-12 13:47:44 | 0 | 2006-04-12 13:47:46 |\n+---------------------+----------+---------------------+\n\nIn addition, the SET TIMESTAMP statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp settings in the\nbinary log have no effect on invocations of SYSDATE().\n\nBecause SYSDATE() can return different values even within the same\nstatement, and is not affected by SET TIMESTAMP, it is nondeterministic\nand therefore unsafe for replication if statement-based binary logging\nis used. If that is a problem, you can use row-based logging.\n\nAlternatively, you can use the --sysdate-is-now option to cause\nSYSDATE() to be an alias for NOW(). This works if the option is used on\nboth the master and the slave.\n\nThe nondeterministic nature of SYSDATE() also means that indexes cannot\nbe used for evaluating expressions that refer to it.\n\nURL: https://mariadb.com/kb/en/sysdate/\n\n','','https://mariadb.com/kb/en/sysdate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (291,5,'UNINSTALL PLUGIN','Syntax:\nUNINSTALL PLUGIN plugin_name\n\nThis statement removes an installed server plugin. It requires the\nDELETE privilege for the mysql.plugin table.\n\nplugin_name must be the name of some plugin that is listed in the\nmysql.plugin table. The server executes the plugin\'s deinitialization\nfunction and removes the row for the plugin from the mysql.plugin\ntable, so that subsequent server restarts will not load and initialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s shared\nlibrary file.\n\nURL: https://mariadb.com/kb/en/uninstall-plugin/\n\n','','https://mariadb.com/kb/en/uninstall-plugin/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (292,32,'ASBINARY','AsBinary(g), AsWKB(g)\n\nConverts a value in internal geometry format to its WKB representation\nand returns the binary result.\n\nURL: https://mariadb.com/kb/en/asbinary/\n\n','SELECT AsBinary(g) FROM geom;\n','https://mariadb.com/kb/en/asbinary/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (293,37,'REPEAT FUNCTION','Syntax:\nREPEAT(str,count)\n\nReturns a string consisting of the string str repeated count times. If\ncount is less than 1, returns an empty string. Returns NULL if str or\ncount are NULL.\n\nURL: https://mariadb.com/kb/en/repeat-function/\n\n','MariaDB> SELECT REPEAT(\'MySQL\', 3);\n -> \'MySQLMySQLMySQL\'\n','https://mariadb.com/kb/en/repeat-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (294,26,'SHOW TABLES','Syntax:\nSHOW [FULL] TABLES [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLES lists the non-TEMPORARY tables in a given database. You can\nalso get this list using the mysqlshow db_name command. The LIKE\nclause, if present, indicates which table names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in https://mariadb.com/kb/en/extended-show/.\n\nThis statement also lists any views in the database. The FULL modifier\nis supported such that SHOW FULL TABLES displays a second output\ncolumn. Values for the second column are BASE TABLE for a table and\nVIEW for a view.\n\nIf you have no privileges for a base table or view, it does not show up\nin the output from SHOW TABLES or mysqlshow db_name.\n\nURL: https://mariadb.com/kb/en/show-tables/\n\n','','https://mariadb.com/kb/en/show-tables/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (295,31,'MAKEDATE','Syntax:\nMAKEDATE(year,dayofyear)\n\nReturns a date, given year and day-of-year values. dayofyear must be\ngreater than 0 or the result is NULL.\n\nURL: https://mariadb.com/kb/en/makedate/\n\n','MariaDB> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n -> \'2011-01-31\', \'2011-02-01\'\nMariaDB> SELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n -> \'2011-12-31\', \'2014-12-31\'\nMariaDB> SELECT MAKEDATE(2011,0);\n -> NULL\n','https://mariadb.com/kb/en/makedate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (296,37,'BINARY OPERATOR','Syntax:\nBINARY\n\nThe BINARY operator casts the string following it to a binary string.\nThis is an easy way to force a column comparison to be done byte by\nbyte rather than character by character. This causes the comparison to\nbe case sensitive even if the column is not defined as BINARY or BLOB.\nBINARY also causes trailing spaces to be significant.\n\nURL: https://mariadb.com/kb/en/binary-operator/\n\n','MariaDB> SELECT \'a\' = \'A\';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'A\';\n -> 0\nMariaDB> SELECT \'a\' = \'a \';\n -> 1\nMariaDB> SELECT BINARY \'a\' = \'a \';\n -> 0\n','https://mariadb.com/kb/en/binary-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (297,6,'MBROVERLAPS','MBROverlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 overlap. The term spatially overlaps is\nused if two geometries intersect and their intersection results in a\ngeometry of the same dimension but not equal to either of the given\ngeometries.\n\nURL: https://mariadb.com/kb/en/mbroverlaps/\n\n','','https://mariadb.com/kb/en/mbroverlaps/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (298,37,'SOUNDEX','Syntax:\nSOUNDEX(str)\n\nReturns a soundex string from str. Two strings that sound almost the\nsame should have identical soundex strings. A standard soundex string\nis four characters long, but the SOUNDEX() function returns an\narbitrarily long string. You can use SUBSTRING() on the result to get a\nstandard soundex string. All nonalphabetic characters in str are\nignored. All international alphabetic characters outside the A-Z range\nare treated as vowels.\n\n*Important*: When using SOUNDEX(), you should be aware of the following\nlimitations:\n\no This function, as currently implemented, is intended to work well\n with strings that are in the English language only. Strings in other\n languages may not produce reliable results.\n\no This function is not guaranteed to provide consistent results with\n strings that use multi-byte character sets, including utf-8.\n\n We hope to remove these limitations in a future release. See Bug\n #22638 for more information.\n\nURL: https://mariadb.com/kb/en/soundex/\n\n','MariaDB> SELECT SOUNDEX(\'Hello\');\n -> \'H400\'\nMariaDB> SELECT SOUNDEX(\'Quadratically\');\n -> \'Q36324\'\n','https://mariadb.com/kb/en/soundex/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (299,6,'MBRTOUCHES','MBRTouches(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially touch if\nthe interiors of the geometries do not intersect, but the boundary of\none of the geometries intersects either the boundary or the interior of\nthe other.\n\nURL: https://mariadb.com/kb/en/mbrtouches/\n\n','','https://mariadb.com/kb/en/mbrtouches/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (300,39,'DROP EVENT','Syntax:\nDROP EVENT [IF EXISTS] event_name\n\nThis statement drops the event named event_name. The event immediately\nceases being active, and is deleted completely from the server.\n\nIf the event does not exist, the error ERROR 1517 (HY000): Unknown\nevent \'event_name\' results. You can override this and cause the\nstatement to generate a warning for nonexistent events instead using IF\nEXISTS.\n\nThis statement requires the EVENT privilege for the schema to which the\nevent to be dropped belongs.\n\nURL: https://mariadb.com/kb/en/drop-event/\n\n','','https://mariadb.com/kb/en/drop-event/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (301,27,'INSERT SELECT','Syntax:\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n\nWith INSERT ... SELECT, you can quickly insert many rows into a table\nfrom one or many tables. For example:\n\nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n\nURL: https://mariadb.com/kb/en/insert-select/\n\n','','https://mariadb.com/kb/en/insert-select/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (302,39,'CREATE PROCEDURE','Syntax:\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n\nCREATE\n [DEFINER = { user | CURRENT_USER }]\n FUNCTION sp_name ([func_parameter[,...]])\n RETURNS type\n [characteristic ...] routine_body\n\nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n\nfunc_parameter:\n param_name type\n\ntype:\n Any valid MySQL data type\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nroutine_body:\n Valid SQL routine statement\n\nThese statements create stored routines. By default, a routine is\nassociated with the default database. To associate the routine\nexplicitly with a given database, specify the name as db_name.sp_name\nwhen you create it.\n\nThe CREATE FUNCTION statement is also used in MySQL to support UDFs\n(user-defined functions). See\nhttps://mariadb.com/kb/en/create-function-udf/. A UDF can\nbe regarded as an external stored function. Stored functions share\ntheir namespace with UDFs. See\nhttp://dev.mysql.com/doc/refman/5.5/en/function-resolution.html, for\nthe rules describing how the server interprets references to different\nkinds of functions.\n\nTo invoke a stored procedure, use the CALL statement (see [HELP CALL]).\nTo invoke a stored function, refer to it in an expression. The function\nreturns a value during expression evaluation.\n\nCREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE\nprivilege. They might also require the SUPER privilege, depending on\nthe DEFINER value, as described later in this section. If binary\nlogging is enabled, CREATE FUNCTION might require the SUPER privilege,\nas described in\nhttps://mariadb.com/kb/en/binary-logging-of-stored-routines/.\n\nBy default, MySQL automatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the routine creator. This behavior can be changed by\ndisabling the automatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nThe DEFINER and SQL SECURITY clauses specify the security context to be\nused when checking access privileges at routine execution time, as\ndescribed later in this section.\n\nIf the routine name is the same as the name of a built-in SQL function,\na syntax error occurs unless you use a space between the name and the\nfollowing parenthesis when defining the routine or invoking it later.\nFor this reason, avoid using the names of existing SQL functions for\nyour own stored routines.\n\nThe IGNORE_SPACE SQL mode applies to built-in functions, not to stored\nroutines. It is always permissible to have spaces after a stored\nroutine name, regardless of whether IGNORE_SPACE is enabled.\n\nThe parameter list enclosed within parentheses must always be present.\nIf there are no parameters, an empty parameter list of () should be\nused. Parameter names are not case sensitive.\n\nEach parameter is an IN parameter by default. To specify otherwise for\na parameter, use the keyword OUT or INOUT before the parameter name.\n\n*Note*: Specifying a parameter as IN, OUT, or INOUT is valid only for a\nPROCEDURE. For a FUNCTION, parameters are always regarded as IN\nparameters.\n\nAn IN parameter passes a value into a procedure. The procedure might\nmodify the value, but the modification is not visible to the caller\nwhen the procedure returns. An OUT parameter passes a value from the\nprocedure back to the caller. Its initial value is NULL within the\nprocedure, and its value is visible to the caller when the procedure\nreturns. An INOUT parameter is initialized by the caller, can be\nmodified by the procedure, and any change made by the procedure is\nvisible to the caller when the procedure returns.\n\nFor each OUT or INOUT parameter, pass a user-defined variable in the\nCALL statement that invokes the procedure so that you can obtain its\nvalue when the procedure returns. If you are calling the procedure from\nwithin another stored procedure or function, you can also pass a\nroutine parameter or local routine variable as an IN or INOUT\nparameter.\n\nThe following example shows a simple stored procedure that uses an OUT\nparameter:\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE simpleproc (OUT param1 INT)\n -> BEGIN\n -> SELECT COUNT(*) INTO param1 FROM t;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter ;\n\nMariaDB> CALL simpleproc(@a);\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @a;\n+------+\n| @a |\n+------+\n| 3 |\n+------+\n1 row in set (0.00 sec)\n\nThe example uses the mysql client delimiter command to change the\nstatement delimiter from ; to // while the procedure is being defined.\nThis enables the ; delimiter used in the procedure body to be passed\nthrough to the server rather than being interpreted by mysql itself.\nSee\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nThe RETURNS clause may be specified only for a FUNCTION, for which it\nis mandatory. It indicates the return type of the function, and the\nfunction body must contain a RETURN value statement. If the RETURN\nstatement returns a value of a different type, the value is coerced to\nthe proper type. For example, if a function specifies an ENUM or SET\nvalue in the RETURNS clause, but the RETURN statement returns an\ninteger, the value returned from the function is the string for the\ncorresponding ENUM member of set of SET members.\n\nThe following example function takes a parameter, performs an operation\nusing an SQL function, and returns the result. In this case, it is\nunnecessary to use delimiter because the function definition contains\nno internal ; statement delimiters:\n\nMariaDB> CREATE FUNCTION hello (s CHAR(20))\nMariaDB> RETURNS CHAR(50) DETERMINISTIC\n -> RETURN CONCAT(\'Hello, \',s,\'!\');\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n1 row in set (0.00 sec)\n\nParameter types and function return types can be declared to use any\nvalid data type, except that the COLLATE attribute cannot be used prior\nto MySQL 5.5.3. As of 5.5.3, COLLATE can be used if preceded by the\nCHARACTER SET attribute.\n\nThe routine_body consists of a valid SQL routine statement. This can be\na simple statement such as SELECT or INSERT, or a compound statement\nwritten using BEGIN and END. Compound statements can contain\ndeclarations, loops, and other control structure statements. The syntax\nfor these statements is described in\nhttps://mariadb.com/kb/programmatic-and-compound-statements.\n\nMySQL permits routines to contain DDL statements, such as CREATE and\nDROP. MySQL also permits stored procedures (but not stored functions)\nto contain SQL transaction statements such as COMMIT. Stored functions\nmay not contain statements that perform explicit or implicit commit or\nrollback. Support for these statements is not required by the SQL\nstandard, which states that each DBMS vendor may decide whether to\npermit them.\n\nStatements that return a result set can be used within a stored\nprocedure but not within a stored function. This prohibition includes\nSELECT statements that do not have an INTO var_list clause and other\nstatements such as SHOW, EXPLAIN, and CHECK TABLE. For statements that\ncan be determined at function definition time to return a result set, a\nNot allowed to return a result set from a function error occurs\n(ER_SP_NO_RETSET). For statements that can be determined only at\nruntime to return a result set, a PROCEDURE %s can\'t return a result\nset in the given context error occurs (ER_SP_BADSELECT).\n\nUSE statements within stored routines are not permitted. When a routine\nis invoked, an implicit USE db_name is performed (and undone when the\nroutine terminates). The causes the routine to have the given default\ndatabase while it executes. References to objects in databases other\nthan the routine default database should be qualified with the\nappropriate database name.\n\nFor additional information about statements that are not permitted in\nstored routines, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/\n.\n\nFor information about invoking stored procedures from within programs\nwritten in a language that has a MySQL interface, see [HELP CALL].\n\nMySQL stores the sql_mode system variable setting that is in effect at\nthe time a routine is created, and always executes the routine with\nthis setting in force, regardless of the server SQL mode in effect when\nthe routine is invoked.\n\nThe switch from the SQL mode of the invoker to that of the routine\noccurs after evaluation of arguments and assignment of the resulting\nvalues to routine parameters. If you define a routine in strict SQL\nmode but invoke it in nonstrict mode, assignment of arguments to\nroutine parameters does not take place in strict mode. If you require\nthat expressions passed to a routine be assigned in strict SQL mode,\nyou should invoke the routine with strict mode in effect.\n\nURL: https://mariadb.com/kb/en/create-procedure/\n\n','','https://mariadb.com/kb/en/create-procedure/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (303,22,'VARBINARY','VARBINARY(M)\n\nThe VARBINARY type is similar to the VARCHAR type, but stores binary\nbyte strings rather than nonbinary character strings. M represents the\nmaximum column length in bytes.\n\nURL: https://mariadb.com/kb/en/varbinary/\n\n','','https://mariadb.com/kb/en/varbinary/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (304,26,'LOAD INDEX','Syntax:\nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n\ntbl_index_list:\n tbl_name\n [PARTITION (partition_list | ALL)]\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n\npartition_list:\n partition_name[, partition_name][, ...]\n\nThe LOAD INDEX INTO CACHE statement preloads a table index into the key\ncache to which it has been assigned by an explicit CACHE INDEX\nstatement, or into the default key cache otherwise.\n\nLOAD INDEX INTO CACHE is used only for MyISAM tables. In MySQL 5.5, it\nis also supported for partitioned MyISAM tables; in addition, indexes\non partitioned tables can be preloaded for one, several, or all\npartitions.\n\nThe IGNORE LEAVES modifier causes only blocks for the nonleaf nodes of\nthe index to be preloaded.\n\nIGNORE LEAVES is also supported for partitioned MyISAM tables.\n\nURL: https://mariadb.com/kb/en/load-index/\n\n','','https://mariadb.com/kb/en/load-index/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (305,27,'UNION','Syntax:\nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n\nUNION is used to combine the result from multiple SELECT statements\ninto a single result set.\n\nThe column names from the first SELECT statement are used as the column\nnames for the results returned. Selected columns listed in\ncorresponding positions of each SELECT statement should have the same\ndata type. (For example, the first column selected by the first\nstatement should have the same type as the first column selected by the\nother statements.)\n\nURL: https://mariadb.com/kb/en/union/\n\n','','https://mariadb.com/kb/en/union/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (306,31,'TO_DAYS','Syntax:\nTO_DAYS(date)\n\nGiven a date date, returns a day number (the number of days since year\n0).\n\nURL: https://mariadb.com/kb/en/to_days/\n\n','MariaDB> SELECT TO_DAYS(950501);\n -> 728779\nMariaDB> SELECT TO_DAYS(\'2007-10-07\');\n -> 733321\n','https://mariadb.com/kb/en/to_days/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (307,37,'NOT REGEXP','Syntax:\nexpr NOT REGEXP pat, expr NOT RLIKE pat\n\nThis is the same as NOT (expr REGEXP pat).\n\nURL: https://mariadb.com/kb/en/not-regexp/\n\n','','https://mariadb.com/kb/en/not-regexp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (308,26,'SHOW INDEX','Syntax:\nSHOW {INDEX | INDEXES | KEYS}\n {FROM | IN} tbl_name\n [{FROM | IN} db_name]\n [WHERE expr]\n\nSHOW INDEX returns table index information. The format resembles that\nof the SQLStatistics call in ODBC. This statement requires some\nprivilege for any column in the table.\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. These two statements are equivalent:\n\nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n\nThe WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nYou can also list a table\'s indexes with the mysqlshow -k db_name\ntbl_name command.\n\nURL: https://mariadb.com/kb/en/show-index/\n\n','','https://mariadb.com/kb/en/show-index/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (309,26,'SHOW CREATE DATABASE','Syntax:\nSHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n\nShows the CREATE DATABASE statement that creates the given database. If\nthe SHOW statement includes an IF NOT EXISTS clause, the output too\nincludes such a clause. SHOW CREATE SCHEMA is a synonym for SHOW CREATE\nDATABASE.\n\nURL: https://mariadb.com/kb/en/show-create-database/\n\n','MariaDB> SHOW CREATE DATABASE test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n\nMariaDB> SHOW CREATE SCHEMA test\\G\n*************************** 1. row ***************************\n Database: test\nCreate Database: CREATE DATABASE `test`\n /*!40100 DEFAULT CHARACTER SET latin1 */\n','https://mariadb.com/kb/en/show-create-database/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (310,23,'LEAVE','Syntax:\nLEAVE label\n\nThis statement is used to exit the flow control construct that has the\ngiven label. If the label is for the outermost stored program block,\nLEAVE exits the program.\n\nLEAVE can be used within BEGIN ... END or loop constructs (LOOP,\nREPEAT, WHILE).\n\nURL: https://mariadb.com/kb/en/leave/\n\n','','https://mariadb.com/kb/en/leave/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (311,18,'NOT IN','Syntax:\nexpr NOT IN (value,...)\n\nThis is the same as NOT (expr IN (value,...)).\n\nURL: https://mariadb.com/kb/en/not-in/\n\n','','https://mariadb.com/kb/en/not-in/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (312,15,'!','Syntax:\nNOT, !\n\nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand is\nnonzero, and NOT NULL returns NULL.\n\nURL: https://mariadb.com/kb/en/not/\n\n','MariaDB> SELECT NOT 10;\n -> 0\nMariaDB> SELECT NOT 0;\n -> 1\nMariaDB> SELECT NOT NULL;\n -> NULL\nMariaDB> SELECT ! (1+1);\n -> 0\nMariaDB> SELECT ! 1+1;\n -> 1\n','https://mariadb.com/kb/en/not/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (313,23,'DECLARE HANDLER','Syntax:\nDECLARE handler_action HANDLER\n FOR condition_value [, condition_value] ...\n statement\n\nhandler_action:\n CONTINUE\n | EXIT\n | UNDO\n\ncondition_value:\n mysql_error_code\n | SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n\nThe DECLARE ... HANDLER statement specifies a handler that deals with\none or more conditions. If one of these conditions occurs, the\nspecified statement executes. statement can be a simple statement such\nas SET var_name = value, or a compound statement written using BEGIN\nand END (see [HELP BEGIN END]).\n\nHandler declarations must appear after variable or condition\ndeclarations.\n\nThe handler_action value indicates what action the handler takes after\nexecution of the handler statement:\n\no CONTINUE: Execution of the current program continues.\n\no EXIT: Execution terminates for the BEGIN ... END compound statement\n in which the handler is declared. This is true even if the condition\n occurs in an inner block.\n\no UNDO: Not supported.\n\nThe condition_value for DECLARE ... HANDLER indicates the specific\ncondition or class of conditions that activates the handler:\n\no A MySQL error code (a number) or an SQLSTATE value (a 5-character\n string literal). You should not use MySQL error code 0 or SQLSTATE\n values that begin with \'00\', because those indicate success rather\n than an error condition. For a list of MySQL error codes and SQLSTATE\n values, see\n https://mariadb.com/kb/en/mariadb-error-codes/.\n\no A condition name previously specified with DECLARE ... CONDITION. A\n condition name can be associated with a MySQL error code or SQLSTATE\n value. See [HELP DECLARE CONDITION].\n\no SQLWARNING is shorthand for the class of SQLSTATE values that begin\n with \'01\'.\n\no NOT FOUND is shorthand for the class of SQLSTATE values that begin\n with \'02\'. This is relevant within the context of cursors and is used\n to control what happens when a cursor reaches the end of a data set.\n If no more rows are available, a No Data condition occurs with\n SQLSTATE value \'02000\'. To detect this condition, you can set up a\n handler for it (or for a NOT FOUND condition). For an example, see\n https://mariadb.com/kb/en/cursor-overview/. This condition\n also occurs for SELECT ... INTO var_list statements that retrieve no\n rows.\n\no SQLEXCEPTION is shorthand for the class of SQLSTATE values that do\n not begin with \'00\', \'01\', or \'02\'.\n\nIf a condition occurs for which no handler has been declared, the\naction taken depends on the condition class:\n\no For SQLEXCEPTION conditions, the stored program terminates at the\n statement that raised the condition, as if there were an EXIT\n handler. If the program was called by another stored program, the\n calling program handles the condition using the handler selection\n rules applied to its own handlers.\n\no For SQLWARNING conditions, the program continues executing, as if\n there were a CONTINUE handler.\n\no For NOT FOUND conditions, if the condition was raised normally, the\n action is CONTINUE. If it was raised by SIGNAL or RESIGNAL, the\n action is EXIT.\n\nURL: https://mariadb.com/kb/en/declare-handler/\n\n','MariaDB> CREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> delimiter //\n\nMariaDB> CREATE PROCEDURE handlerdemo ()\n -> BEGIN\n -> DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 = 1;\n -> SET @x = 1;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 2;\n -> INSERT INTO test.t VALUES (1);\n -> SET @x = 3;\n -> END;\n -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> CALL handlerdemo()//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT @x//\n +------+\n | @x |\n +------+\n | 3 |\n +------+\n 1 row in set (0.00 sec)\n','https://mariadb.com/kb/en/declare-handler/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (314,22,'DOUBLE','DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA normal-size (double-precision) floating-point number. Permissible\nvalues are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and\n2.2250738585072014E-308 to 1.7976931348623157E+308. These are the\ntheoretical limits, based on the IEEE standard. The actual range might\nbe slightly smaller depending on your hardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A double-precision floating-point\nnumber is accurate to approximately 15 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nURL: https://mariadb.com/kb/en/double/\n\n','','https://mariadb.com/kb/en/double/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (315,22,'TIME','TIME\n\nA time. The range is \'-838:59:59\' to \'838:59:59\'. MySQL displays TIME\nvalues in \'HH:MM:SS\' format, but permits assignment of values to TIME\ncolumns using either strings or numbers.\n\nURL: https://mariadb.com/kb/en/time/\n\n','','https://mariadb.com/kb/en/time/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (316,15,'&&','Syntax:\nAND, &&\n\nLogical AND. Evaluates to 1 if all operands are nonzero and not NULL,\nto 0 if one or more operands are 0, otherwise NULL is returned.\n\nURL: https://mariadb.com/kb/en/and/\n\n','MariaDB> SELECT 1 && 1;\n -> 1\nMariaDB> SELECT 1 && 0;\n -> 0\nMariaDB> SELECT 1 && NULL;\n -> NULL\nMariaDB> SELECT 0 && NULL;\n -> 0\nMariaDB> SELECT NULL && 0;\n -> 0\n','https://mariadb.com/kb/en/and/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (317,11,'X','X(p)\n\nReturns the X-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/x/\n\n','MariaDB> SELECT X(POINT(56.7, 53.34));\n+-----------------------+\n| X(POINT(56.7, 53.34)) |\n+-----------------------+\n| 56.7 |\n+-----------------------+\n','https://mariadb.com/kb/en/x/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (318,17,'SYSTEM_USER','Syntax:\nSYSTEM_USER()\n\nSYSTEM_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/system_user/\n\n','','https://mariadb.com/kb/en/system_user/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (319,17,'FOUND_ROWS','Syntax:\nFOUND_ROWS()\n\nA SELECT statement may include a LIMIT clause to restrict the number of\nrows the server returns to the client. In some cases, it is desirable\nto know how many rows the statement would have returned without the\nLIMIT, but without running the statement again. To obtain this row\ncount, include a SQL_CALC_FOUND_ROWS option in the SELECT statement,\nand then invoke FOUND_ROWS() afterward:\n\nURL: https://mariadb.com/kb/en/found_rows/\n\n','MariaDB> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name\n -> WHERE id > 100 LIMIT 10;\nMariaDB> SELECT FOUND_ROWS();\n','https://mariadb.com/kb/en/found_rows/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (320,30,'CROSSES','Crosses(g1,g2)\n\nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is a Polygon\nor a MultiPolygon, or if g2 is a Point or a MultiPoint. Otherwise,\nreturns 0.\n\nThe term spatially crosses denotes a spatial relation between two given\ngeometries that has the following properties:\n\no The two geometries intersect\n\no Their intersection results in a geometry that has a dimension that is\n one less than the maximum dimension of the two given geometries\n\no Their intersection is not equal to either of the two given geometries\n\nURL: https://mariadb.com/kb/en/crosses/\n\n','','https://mariadb.com/kb/en/crosses/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (321,39,'TRUNCATE TABLE','Syntax:\nTRUNCATE [TABLE] tbl_name\n\nTRUNCATE TABLE empties a table completely. It requires the DROP\nprivilege.\n\nLogically, TRUNCATE TABLE is similar to a DELETE statement that deletes\nall rows, or a sequence of DROP TABLE and CREATE TABLE statements. To\nachieve high performance, it bypasses the DML method of deleting data.\nThus, it cannot be rolled back, it does not cause ON DELETE triggers to\nfire, and it cannot be performed for InnoDB tables with parent-child\nforeign key relationships.\n\nAlthough TRUNCATE TABLE is similar to DELETE, it is classified as a DDL\nstatement rather than a DML statement. It differs from DELETE in the\nfollowing ways in MySQL 5.5:\n\no Truncate operations drop and re-create the table, which is much\n faster than deleting rows one by one, particularly for large tables.\n\no Truncate operations cause an implicit commit, and so cannot be rolled\n back.\n\no Truncation operations cannot be performed if the session holds an\n active table lock.\n\no TRUNCATE TABLE fails for an InnoDB table if there are any FOREIGN KEY\n constraints from other tables that reference the table. Foreign key\n constraints between columns of the same table are permitted.\n\no Truncation operations do not return a meaningful value for the number\n of deleted rows. The usual result is "0 rows affected," which should\n be interpreted as "no information."\n\no As long as the table format file tbl_name.frm is valid, the table can\n be re-created as an empty table with TRUNCATE TABLE, even if the data\n or index files have become corrupted.\n\no Any AUTO_INCREMENT value is reset to its start value. This is true\n even for MyISAM and InnoDB, which normally do not reuse sequence\n values.\n\no When used with partitioned tables, TRUNCATE TABLE preserves the\n partitioning; that is, the data and index files are dropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\n\no The TRUNCATE TABLE statement does not invoke ON DELETE triggers.\n\nURL: https://mariadb.com/kb/en/truncate-table/\n\n','','https://mariadb.com/kb/en/truncate-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (322,16,'BIT_XOR','Syntax:\nBIT_XOR(expr)\n\nReturns the bitwise XOR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_xor/\n\n','','https://mariadb.com/kb/en/bit_xor/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (323,31,'CURRENT_DATE','Syntax:\nCURRENT_DATE, CURRENT_DATE()\n\nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n\nURL: https://mariadb.com/kb/en/current_date/\n\n','','https://mariadb.com/kb/en/current_date/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (324,8,'START SLAVE','Syntax:\nSTART SLAVE [thread_types]\n\nSTART SLAVE [SQL_THREAD] UNTIL\n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\n\nSTART SLAVE [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\n\nthread_types:\n [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nSTART SLAVE with no thread_type options starts both of the slave\nthreads. The I/O thread reads events from the master server and stores\nthem in the relay log. The SQL thread reads events from the relay log\nand executes them. START SLAVE requires the SUPER privilege.\n\nIf START SLAVE succeeds in starting the slave threads, it returns\nwithout any error. However, even in that case, it might be that the\nslave threads start and then later stop (for example, because they do\nnot manage to connect to the master or read its binary log, or some\nother problem). START SLAVE does not warn you about this. You must\ncheck the slave\'s error log for error messages generated by the slave\nthreads, or check that they are running satisfactorily with SHOW SLAVE\nSTATUS.\n\nURL: https://mariadb.com/kb/en/start-slave/\n\n','','https://mariadb.com/kb/en/start-slave/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (325,2,'AREA','Area(poly)\n\nReturns as a double-precision number the area of the Polygon value\npoly, as measured in its spatial reference system.\n\nURL: https://mariadb.com/kb/en/area/\n\n','MariaDB> SET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1 1))\';\nMariaDB> SELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n','https://mariadb.com/kb/en/area/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (326,26,'FLUSH','Syntax:\nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n\nThe FLUSH statement has several variant forms that clear or reload\nvarious internal caches, flush tables, or acquire locks. To execute\nFLUSH, you must have the RELOAD privilege. Specific flush options might\nrequire additional privileges, as described later.\n\nBy default, the server writes FLUSH statements to the binary log so\nthat they replicate to replication slaves. To suppress logging, use the\noptional NO_WRITE_TO_BINLOG keyword or its alias LOCAL.\n\n*Note*: FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES WITH\nREAD LOCK (with or without a table list) are not written to the binary\nlog in any case because they would cause problems if replicated to a\nslave.\n\nThe FLUSH statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nThe RESET statement is similar to FLUSH. See [HELP RESET], for\ninformation about using the RESET statement with replication.\n\nURL: https://mariadb.com/kb/en/flush/\n\n','','https://mariadb.com/kb/en/flush/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (327,23,'BEGIN END','Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\nBEGIN ... END syntax is used for writing compound statements, which can\nappear within stored programs (stored procedures and functions,\ntriggers, and events). A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords. statement_list\nrepresents a list of one or more statements, each terminated by a\nsemicolon (;) statement delimiter. The statement_list itself is\noptional, so the empty compound statement (BEGIN END) is legal.\n\nBEGIN ... END blocks can be nested.\n\nUse of multiple statements requires that a client is able to send\nstatement strings containing the ; statement delimiter. In the mysql\ncommand-line client, this is handled with the delimiter command.\nChanging the ; end-of-statement delimiter (for example, to //) permit ;\nto be used in a program body. For an example, see\nhttps://mariadb.com/kb/en/stored-procedure-overview/.\n\nA BEGIN ... END block can be labeled. See [HELP labels].\n\nURL: https://mariadb.com/kb/en/begin-end/\n\n','','https://mariadb.com/kb/en/begin-end/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (328,26,'SHOW PROCEDURE STATUS','Syntax:\nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is a MySQL extension. It returns characteristics of a\nstored procedure, such as the database, name, type, creator, creation\nand modification dates, and character set information. A similar\nstatement, SHOW FUNCTION STATUS, displays information about stored\nfunctions (see [HELP SHOW FUNCTION STATUS]).\n\nThe LIKE clause, if present, indicates which procedure or function\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show-procedure-status/\n\n','MariaDB> SHOW PROCEDURE STATUS LIKE \'sp1\'\\G\n*************************** 1. row ***************************\n Db: test\n Name: sp1\n Type: PROCEDURE\n Definer: testuser@localhost\n Modified: 2004-08-03 15:29:37\n Created: 2004-08-03 15:29:37\n Security_type: DEFINER\n Comment:\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-procedure-status/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (329,28,'DESCRIBE','Syntax:\n{DESCRIBE | DESC} tbl_name [col_name | wild]\n\nDESCRIBE provides information about the columns in a table. It is a\nshortcut for SHOW COLUMNS FROM. These statements also display\ninformation for views. (See [HELP SHOW COLUMNS].)\n\ncol_name can be a column name, or a string containing the SQL "%" and\n"_" wildcard characters to obtain output only for the columns with\nnames matching the string. There is no need to enclose the string\nwithin quotation marks unless it contains spaces or other special\ncharacters.\n\nMariaDB> DESCRIBE City;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nThe description for SHOW COLUMNS provides more information about the\noutput columns (see [HELP SHOW COLUMNS]).\n\nURL: https://mariadb.com/kb/en/describe/\n\n','','https://mariadb.com/kb/en/describe/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (330,26,'SHOW WARNINGS','Syntax:\nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW COUNT(*) WARNINGS\n\nSHOW WARNINGS shows information about the conditions (errors, warnings,\nand notes) that resulted from the last statement in the current session\nthat generated messages. It shows nothing if the last statement used a\ntable and generated no messages. (That is, a statement that uses a\ntable but generates no messages clears the message list.) Statements\nthat do not use tables and do not generate messages have no effect on\nthe message list.\n\nWarnings are generated for DML statements such as INSERT, UPDATE, and\nLOAD DATA INFILE as well as DDL statements such as CREATE TABLE and\nALTER TABLE.\n\nSHOW WARNINGS is also used following EXPLAIN EXTENDED, to display the\nextra information generated by EXPLAIN when the EXTENDED keyword is\nused. See https://mariadb.com/kb/en/explain#explain-extended.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttps://mariadb.com/kb/en/select/.\n\nA related statement, SHOW ERRORS, shows only the error conditions (it\nexcludes warnings and notes). See [HELP SHOW ERRORS].\n\nThe SHOW COUNT(*) WARNINGS statement displays the total number of\nerrors, warnings, and notes. You can also retrieve this number from the\nwarning_count system variable:\n\nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n\nURL: https://mariadb.com/kb/en/show-warnings/\n\n','','https://mariadb.com/kb/en/show-warnings/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (331,10,'DROP USER','Syntax:\nDROP USER user [, user] ...\n\nThe DROP USER statement removes one or more MySQL accounts and their\nprivileges. It removes privilege rows for the account from all grant\ntables. To use this statement, you must have the global CREATE USER\nprivilege or the DELETE privilege for the mysql database. Each account\nname uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. For example:\n\nDROP USER \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nURL: https://mariadb.com/kb/en/drop-user/\n\n','','https://mariadb.com/kb/en/drop-user/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (332,16,'STDDEV_POP','Syntax:\nSTDDEV_POP(expr)\n\nReturns the population standard deviation of expr (the square root of\nVAR_POP()). You can also use STD() or STDDEV(), which are equivalent\nbut not standard SQL.\n\nSTDDEV_POP() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev_pop/\n\n','','https://mariadb.com/kb/en/stddev_pop/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (333,26,'SHOW CHARACTER SET','Syntax:\nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n\nThe SHOW CHARACTER SET statement shows all available character sets.\nThe LIKE clause, if present, indicates which character set names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n\nURL: https://mariadb.com/kb/en/show-character-set/\n\n','','https://mariadb.com/kb/en/show-character-set/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (334,37,'SUBSTRING','Syntax:\nSUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n\nThe forms without a len argument return a substring from string str\nstarting at position pos. The forms with a len argument return a\nsubstring len characters long from string str, starting at position\npos. The forms that use FROM are standard SQL syntax. It is also\npossible to use a negative value for pos. In this case, the beginning\nof the substring is pos characters from the end of the string, rather\nthan the beginning. A negative value may be used for pos in any of the\nforms of this function.\n\nFor all forms of SUBSTRING(), the position of the first character in\nthe string from which the substring is to be extracted is reckoned as\n1.\n\nURL: https://mariadb.com/kb/en/substring/\n\n','MariaDB> SELECT SUBSTRING(\'Quadratically\',5);\n -> \'ratically\'\nMariaDB> SELECT SUBSTRING(\'foobarbar\' FROM 4);\n -> \'barbar\'\nMariaDB> SELECT SUBSTRING(\'Quadratically\',5,6);\n -> \'ratica\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -3);\n -> \'ila\'\nMariaDB> SELECT SUBSTRING(\'Sakila\', -5, 3);\n -> \'aki\'\nMariaDB> SELECT SUBSTRING(\'Sakila\' FROM -4 FOR 2);\n -> \'ki\'\n','https://mariadb.com/kb/en/substring/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (335,36,'ISEMPTY','IsEmpty(g)\n\nReturns 1 if the geometry value g is the empty geometry, 0 if it is not\nempty, and -1 if the argument is NULL. If the geometry is empty, it\nrepresents the empty point set.\n\nURL: https://mariadb.com/kb/en/isempty/\n\n','','https://mariadb.com/kb/en/isempty/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (336,26,'SHOW FUNCTION STATUS','Syntax:\nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement is similar to SHOW PROCEDURE STATUS but for stored\nfunctions. See [HELP SHOW PROCEDURE STATUS].\n\nURL: https://mariadb.com/kb/en/show-function-status/\n\n','','https://mariadb.com/kb/en/show-function-status/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (337,37,'LTRIM','Syntax:\nLTRIM(str)\n\nReturns the string str with leading space characters removed.\n\nURL: https://mariadb.com/kb/en/ltrim/\n\n','MariaDB> SELECT LTRIM(\' barbar\');\n -> \'barbar\'\n','https://mariadb.com/kb/en/ltrim/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (338,30,'INTERSECTS','Intersects(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially intersects g2.\n\nURL: https://mariadb.com/kb/en/intersects/\n\n','','https://mariadb.com/kb/en/intersects/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (339,27,'CALL','Syntax:\nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n\nThe CALL statement invokes a stored procedure that was defined\npreviously with CREATE PROCEDURE.\n\nStored procedures that take no arguments can be invoked without\nparentheses. That is, CALL p() and CALL p are equivalent.\n\nCALL can pass back values to its caller using parameters that are\ndeclared as OUT or INOUT parameters. When the procedure returns, a\nclient program can also obtain the number of rows affected for the\nfinal statement executed within the routine: At the SQL level, call the\nROW_COUNT() function; from the C API, call the mysql_affected_rows()\nfunction.\n\nURL: https://mariadb.com/kb/en/call/\n\n','','https://mariadb.com/kb/en/call/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (340,6,'MBRDISJOINT','MBRDisjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are disjoint (do not intersect).\n\nURL: https://mariadb.com/kb/en/mbrdisjoint/\n\n','','https://mariadb.com/kb/en/mbrdisjoint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (341,14,'VALUES','Syntax:\nVALUES(col_name)\n\nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can use the\nVALUES(col_name) function in the UPDATE clause to refer to column\nvalues from the INSERT portion of the statement. In other words,\nVALUES(col_name) in the UPDATE clause refers to the value of col_name\nthat would be inserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts. The VALUES()\nfunction is meaningful only in the ON DUPLICATE KEY UPDATE clause of\nINSERT statements and returns NULL otherwise. See\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/.\n\nURL: https://mariadb.com/kb/en/values/\n\n','MariaDB> INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n -> ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n','https://mariadb.com/kb/en/values/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (342,37,'SUBSTRING_INDEX','Syntax:\nSUBSTRING_INDEX(str,delim,count)\n\nReturns the substring from string str before count occurrences of the\ndelimiter delim. If count is positive, everything to the left of the\nfinal delimiter (counting from the left) is returned. If count is\nnegative, everything to the right of the final delimiter (counting from\nthe right) is returned. SUBSTRING_INDEX() performs a case-sensitive\nmatch when searching for delim.\n\nURL: https://mariadb.com/kb/en/substring_index/\n\n','MariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2);\n -> \'www.mariadb\'\nMariaDB> SELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2);\n -> \'mariadb.org\'\n','https://mariadb.com/kb/en/substring_index/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (343,12,'ENCODE','Syntax:\nENCODE(str,pass_str)\n\nEncrypt str using pass_str as the password. To decrypt the result, use\nDECODE().\n\nThe result is a binary string of the same length as str.\n\nThe strength of the encryption is based on how good the random\ngenerator is. It should suffice for short strings.\n\nURL: https://mariadb.com/kb/en/encode/\n\n','','https://mariadb.com/kb/en/encode/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (344,23,'LOOP','Syntax:\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\nLOOP implements a simple loop construct, enabling repeated execution of\nthe statement list, which consists of one or more statements, each\nterminated by a semicolon (;) statement delimiter. The statements\nwithin the loop are repeated until the loop is terminated. Usually,\nthis is accomplished with a LEAVE statement. Within a stored function,\nRETURN can also be used, which exits the function entirely.\n\nNeglecting to include a loop-termination statement results in an\ninfinite loop.\n\nA LOOP statement can be labeled. For the rules regarding label use, see\n[HELP labels].\n\nURL: https://mariadb.com/kb/en/loop/\n\n','CREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN\n ITERATE label1;\n END IF;\n LEAVE label1;\n END LOOP label1;\n SET @x = p1;\nEND;\n','https://mariadb.com/kb/en/loop/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (345,4,'TRUNCATE','Syntax:\nTRUNCATE(X,D)\n\nReturns the number X, truncated to D decimal places. If D is 0, the\nresult has no decimal point or fractional part. D can be negative to\ncause D digits left of the decimal point of the value X to become zero.\n\nURL: https://mariadb.com/kb/en/truncate/\n\n','MariaDB> SELECT TRUNCATE(1.223,1);\n -> 1.2\nMariaDB> SELECT TRUNCATE(1.999,1);\n -> 1.9\nMariaDB> SELECT TRUNCATE(1.999,0);\n -> 1\nMariaDB> SELECT TRUNCATE(-1.999,1);\n -> -1.9\nMariaDB> SELECT TRUNCATE(122,-2);\n -> 100\nMariaDB> SELECT TRUNCATE(10.28*100,0);\n -> 1028\n','https://mariadb.com/kb/en/truncate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (346,31,'TIMESTAMPADD','Syntax:\nTIMESTAMPADD(unit,interval,datetime_expr)\n\nAdds the integer expression interval to the date or datetime expression\ndatetime_expr. The unit for interval is given by the unit argument,\nwhich should be one of the following values: MICROSECOND\n(microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or\nYEAR.\n\nIt is possible to use FRAC_SECOND in place of MICROSECOND, but\nFRAC_SECOND is deprecated. FRAC_SECOND was removed in MySQL 5.5.3.\n\nThe unit value may be specified using one of keywords as shown, or with\na prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY both are legal.\n\nURL: https://mariadb.com/kb/en/timestampadd/\n\n','MariaDB> SELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n -> \'2003-01-02 00:01:00\'\nMariaDB> SELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n -> \'2003-01-09\'\n','https://mariadb.com/kb/en/timestampadd/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (347,26,'SHOW','SHOW has many forms that provide information about databases, tables,\ncolumns, or status information about the server. This section describes\nthose following:\n\nSHOW AUTHORS\nSHOW {BINARY | MASTER} LOGS\nSHOW BINLOG EVENTS [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE FUNCTION func_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW MASTER STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW SLAVE HOSTS\nSHOW SLAVE STATUS\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW [FULL] TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n\nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n\nIf the syntax for a given SHOW statement includes a LIKE \'pattern\'\npart, \'pattern\' is a string that can contain the SQL "%" and "_"\nwildcard characters. The pattern is useful for restricting statement\noutput to matching values.\n\nSeveral SHOW statements also accept a WHERE clause that provides more\nflexibility in specifying which rows to display. See\nhttps://mariadb.com/kb/en/extended-show/.\n\nURL: https://mariadb.com/kb/en/show/\n\n','','https://mariadb.com/kb/en/show/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (348,18,'GREATEST','Syntax:\nGREATEST(value1,value2,...)\n\nWith two or more arguments, returns the largest (maximum-valued)\nargument. The arguments are compared using the same rules as for\nLEAST().\n\nURL: https://mariadb.com/kb/en/greatest/\n\n','MariaDB> SELECT GREATEST(2,0);\n -> 2\nMariaDB> SELECT GREATEST(34.0,3.0,5.0,767.0);\n -> 767.0\nMariaDB> SELECT GREATEST(\'B\',\'A\',\'C\');\n -> \'C\'\n','https://mariadb.com/kb/en/greatest/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (349,26,'SHOW VARIABLES','Syntax:\nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n\nSHOW VARIABLES shows the values of MySQL system variables. This\ninformation also can be obtained using the mysqladmin variables\ncommand. The LIKE clause, if present, indicates which variable names to\nmatch. The WHERE clause can be given to select rows using more general\nconditions, as discussed in\nhttps://mariadb.com/kb/en/extended-show/. This\nstatement does not require any privilege. It requires only the ability\nto connect to the server.\n\nWith the GLOBAL modifier, SHOW VARIABLES displays the values that are\nused for new connections to MySQL. As of MySQL 5.5.3, if a variable has\nno global value, no value is displayed. Before 5.5.3, the session value\nis displayed. With SESSION, SHOW VARIABLES displays the values that are\nin effect for the current connection. If no modifier is present, the\ndefault is SESSION. LOCAL is a synonym for SESSION.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern. To obtain the row for a\nspecific variable, use a LIKE clause as shown:\n\nSHOW VARIABLES LIKE \'max_join_size\';\nSHOW SESSION VARIABLES LIKE \'max_join_size\';\n\nTo get a list of variables whose name match a pattern, use the "%"\nwildcard character in a LIKE clause:\n\nSHOW VARIABLES LIKE \'%size%\';\nSHOW GLOBAL VARIABLES LIKE \'%size%\';\n\nWildcard characters can be used in any position within the pattern to\nbe matched. Strictly speaking, because "_" is a wildcard that matches\nany single character, you should escape it as "\\_" to match it\nliterally. In practice, this is rarely necessary.\n\nURL: https://mariadb.com/kb/en/show-variables/\n\n','','https://mariadb.com/kb/en/show-variables/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (350,26,'BINLOG','Syntax:\nBINLOG \'str\'\n\nBINLOG is an internal-use statement. It is generated by the mysqlbinlog\nprogram as the printable representation of certain events in binary log\nfiles. (See https://mariadb.com/kb/en/mysqlbinlog/.)\nThe \'str\' value is a base 64-encoded string the that server decodes to\ndetermine the data change indicated by the corresponding event. This\nstatement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/binlog/\n\n','','https://mariadb.com/kb/en/binlog/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (351,16,'BIT_AND','Syntax:\nBIT_AND(expr)\n\nReturns the bitwise AND of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: https://mariadb.com/kb/en/bit_and/\n\n','','https://mariadb.com/kb/en/bit_and/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (352,31,'SECOND','Syntax:\nSECOND(time)\n\nReturns the second for time, in the range 0 to 59.\n\nURL: https://mariadb.com/kb/en/second/\n\n','MariaDB> SELECT SECOND(\'10:05:03\');\n -> 3\n','https://mariadb.com/kb/en/second/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (353,4,'ATAN2','Syntax:\nATAN(Y,X), ATAN2(Y,X)\n\nReturns the arc tangent of the two variables X and Y. It is similar to\ncalculating the arc tangent of Y / X, except that the signs of both\narguments are used to determine the quadrant of the result.\n\nURL: https://mariadb.com/kb/en/atan2/\n\n','MariaDB> SELECT ATAN(-2,2);\n -> -0.78539816339745\nMariaDB> SELECT ATAN2(PI(),0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/atan2/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (354,6,'MBRCONTAINS','MBRContains(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\ncontains the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRWithin().\n\nURL: https://mariadb.com/kb/en/mbrcontains/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Point(1 1)\');\nMariaDB> SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n','https://mariadb.com/kb/en/mbrcontains/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (355,31,'HOUR','Syntax:\nHOUR(time)\n\nReturns the hour for time. The range of the return value is 0 to 23 for\ntime-of-day values. However, the range of TIME values actually is much\nlarger, so HOUR can return values greater than 23.\n\nURL: https://mariadb.com/kb/en/hour/\n\n','MariaDB> SELECT HOUR(\'10:05:03\');\n -> 10\nMariaDB> SELECT HOUR(\'272:59:59\');\n -> 272\n','https://mariadb.com/kb/en/hour/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (356,27,'SELECT','Syntax:\nSELECT\n [ALL | DISTINCT | DISTINCTROW ]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position}\n [ASC | DESC], ... [WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position}\n [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n [PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n export_options\n | INTO DUMPFILE \'file_name\'\n | INTO var_name [, var_name]]\n [FOR UPDATE | LOCK IN SHARE MODE]]\n\nSELECT is used to retrieve rows selected from one or more tables, and\ncan include UNION statements and subqueries. See [HELP UNION], and\nhttps://mariadb.com/kb/en/subqueries/.\n\nThe most commonly used clauses of SELECT statements are these:\n\no Each select_expr indicates a column that you want to retrieve. There\n must be at least one select_expr.\n\no table_references indicates the table or tables from which to retrieve\n rows. Its syntax is described in [HELP JOIN].\n\no The WHERE clause, if given, indicates the condition or conditions\n that rows must satisfy to be selected. where_condition is an\n expression that evaluates to true for each row to be selected. The\n statement selects all rows if there is no WHERE clause.\n\n In the WHERE expression, you can use any of the functions and\n operators that MySQL supports, except for aggregate (summary)\n functions. See\n https://mariadb.com/kb/en/select#select-expressions, and\n https://mariadb.com/kb/en/functions-and-operators/.\n\nSELECT can also be used to retrieve rows computed without reference to\nany table.\n\nURL: https://mariadb.com/kb/en/select/\n\n','','https://mariadb.com/kb/en/select/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (357,4,'COT','Syntax:\nCOT(X)\n\nReturns the cotangent of X.\n\nURL: https://mariadb.com/kb/en/cot/\n\n','MariaDB> SELECT COT(12);\n -> -1.5726734063977\nMariaDB> SELECT COT(0);\n -> NULL\n','https://mariadb.com/kb/en/cot/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (358,26,'SHOW CREATE EVENT','Syntax:\nSHOW CREATE EVENT event_name\n\nThis statement displays the CREATE EVENT statement needed to re-create\na given event. It requires the EVENT privilege for the database from\nwhich the event is to be shown. For example (using the same event\ne_daily defined and then altered in [HELP SHOW EVENTS]):\n\nURL: https://mariadb.com/kb/en/show-create-event/\n\n','MariaDB> SHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row ***************************\n Event: e_daily\n sql_mode:\n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*)\n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n','https://mariadb.com/kb/en/show-create-event/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (359,37,'LOAD_FILE','Syntax:\nLOAD_FILE(file_name)\n\nReads the file and returns the file contents as a string. To use this\nfunction, the file must be located on the server host, you must specify\nthe full path name to the file, and you must have the FILE privilege.\nThe file must be readable by all and its size less than\nmax_allowed_packet bytes. If the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nIf the file does not exist or cannot be read because one of the\npreceding conditions is not satisfied, the function returns NULL.\n\nThe character_set_filesystem system variable controls interpretation of\nfile names that are given as literal strings.\n\nURL: https://mariadb.com/kb/en/load_file/\n\n','MariaDB> UPDATE t\n SET blob_col=LOAD_FILE(\'/tmp/picture\')\n WHERE id=1;\n','https://mariadb.com/kb/en/load_file/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (360,3,'POINTFROMTEXT','PointFromText(wkt[,srid])\n\nConstructs a POINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromtext/\n\n','','https://mariadb.com/kb/en/pointfromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (361,16,'GROUP_CONCAT','Syntax:\nGROUP_CONCAT(expr)\n\nThis function returns a string result with the concatenated non-NULL\nvalues from a group. It returns NULL if there are no non-NULL values.\nThe full syntax is as follows:\n\nGROUP_CONCAT([DISTINCT] expr [,expr ...]\n [ORDER BY {unsigned_integer | col_name | expr}\n [ASC | DESC] [,col_name ...]]\n [SEPARATOR str_val])\n\nURL: https://mariadb.com/kb/en/group_concat/\n\n','MariaDB> SELECT student_name,\n -> GROUP_CONCAT(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/group_concat/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (362,31,'DATE_FORMAT','Syntax:\nDATE_FORMAT(date,format)\n\nFormats the date value according to the format string.\n\nURL: https://mariadb.com/kb/en/date_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n -> \'Sunday October 2009\'\nMariaDB> SELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n -> \'22:23:00\'\nMariaDB> SELECT DATE_FORMAT(\'1900-10-04 22:23:00\',\n -> \'%D %y %a %d %m %b %j\');\n -> \'4th 00 Thu 04 10 Oct 277\'\nMariaDB> SELECT DATE_FORMAT(\'1997-10-04 22:23:00\',\n -> \'%H %k %I %r %T %S %w\');\n -> \'22 22 10 10:23:00 PM 22:23:00 00 6\'\nMariaDB> SELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n -> \'1998 52\'\nMariaDB> SELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n -> \'00\'\n','https://mariadb.com/kb/en/date_format/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (363,17,'BENCHMARK','Syntax:\nBENCHMARK(count,expr)\n\nThe BENCHMARK() function executes the expression expr repeatedly count\ntimes. It may be used to time how quickly MySQL processes the\nexpression. The result value is always 0. The intended use is from\nwithin the mysql client, which reports query execution times:\n\nURL: https://mariadb.com/kb/en/benchmark/\n\n','MariaDB> SELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (4.74 sec)\n','https://mariadb.com/kb/en/benchmark/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (364,31,'YEAR','Syntax:\nYEAR(date)\n\nReturns the year for date, in the range 1000 to 9999, or 0 for the\n"zero" date.\n\nURL: https://mariadb.com/kb/en/year/\n\n','MariaDB> SELECT YEAR(\'1987-01-01\');\n -> 1987\n','https://mariadb.com/kb/en/year/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (365,26,'SHOW ENGINE','Syntax:\nSHOW ENGINE engine_name {STATUS | MUTEX}\n\nSHOW ENGINE displays operational information about a storage engine.\nThe following statements currently are supported:\n\nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n\nSHOW ENGINE INNODB STATUS displays extensive information from the\nstandard InnoDB Monitor about the state of the InnoDB storage engine.\nFor information about the standard monitor and other InnoDB Monitors\nthat provide information about InnoDB processing, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-monitors.html.\n\nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics. The\nstatement displays the following fields:\n\no Type\n\n Always InnoDB.\n\no Name\n\n The source file where the mutex is implemented, and the line number\n in the file where the mutex is created. The line number may change\n depending on your version of MySQL.\n\no Status\n\n The mutex status. This field displays several values if UNIV_DEBUG\n was defined at MySQL compilation time (for example, in include/univ.i\n in the InnoDB part of the MySQL source tree). If UNIV_DEBUG was not\n defined, the statement displays only the os_waits value. In the\n latter case (without UNIV_DEBUG), the information on which the output\n is based is insufficient to distinguish regular mutexes and mutexes\n that protect rw-locks (which permit multiple readers or a single\n writer). Consequently, the output may appear to contain multiple rows\n for the same mutex.\n\n o count indicates how many times the mutex was requested.\n\n o spin_waits indicates how many times the spinlock had to run.\n\n o spin_rounds indicates the number of spinlock rounds. (spin_rounds\n divided by spin_waits provides the average round count.)\n\n o os_waits indicates the number of operating system waits. This\n occurs when the spinlock did not work (the mutex was not locked\n during the spinlock and it was necessary to yield to the operating\n system and wait).\n\n o os_yields indicates the number of times a the thread trying to lock\n a mutex gave up its timeslice and yielded to the operating system\n (on the presumption that permitting other threads to run will free\n the mutex so that it can be locked).\n\n o os_wait_times indicates the amount of time (in ms) spent in\n operating system waits, if the timed_mutexes system variable is 1\n (ON). If timed_mutexes is 0 (OFF), timing is disabled, so\n os_wait_times is 0. timed_mutexes is off by default.\n\nInformation from this statement can be used to diagnose system\nproblems. For example, large values of spin_waits and spin_rounds may\nindicate scalability problems.\n\nUse SHOW ENGINE PERFORMANCE_SCHEMA STATUS to inspect the internal\noperation of the Performance Schema code:\n\nMariaDB> SHOW ENGINE PERFORMANCE_SCHEMA STATUS\\G\n...\n*************************** 3. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_size\nStatus: 76\n*************************** 4. row ***************************\n Type: performance_schema\n Name: events_waits_history.row_count\nStatus: 10000\n*************************** 5. row ***************************\n Type: performance_schema\n Name: events_waits_history.memory\nStatus: 760000\n...\n*************************** 57. row ***************************\n Type: performance_schema\n Name: performance_schema.memory\nStatus: 26459600\n...\n\nThe intent of this statement is to help the DBA to understand the\neffects that different options have on memory requirements.\n\nName values consist of two parts, which name an internal buffer and an\nattribute of the buffer, respectively:\n\no Internal buffers that are exposed as a table in the\n performance_schema database are named after the table. Examples:\n events_waits_history.row_size, mutex_instances.row_count.\n\no Internal buffers that are not exposed as a table are named within\n parentheses. Examples: (pfs_cond_class).row_size,\n (pfs_mutex_class).memory.\n\no Values that apply to the Performance Schema as a whole begin with\n performance_schema. Example: performance_schema.memory.\n\nAttributes have these meanings:\n\no row_size cannot be changed. It is the size of the internal record\n used by the implementation.\n\no row_count can be changed depending on the configuration options.\n\no For a table, tbl_name.memory is the product of row_size multiplied by\n row_count. For the Performance Schema as a whole,\n performance_schema.memory is the sum of all the memory used (the sum\n of all other memory values).\n\nIn some cases, there is a direct relationship between a configuration\nparameter and a SHOW ENGINE value. For example,\nevents_waits_history_long.row_count corresponds to\nperformance_schema_events_waits_history_long_size. In other cases, the\nrelationship is more complex. For example,\nevents_waits_history.row_count corresponds to\nperformance_schema_events_waits_history_size (the number of rows per\nthread) multiplied by performance_schema_max_thread_instances ( the\nnumber of threads).\n\nURL: https://mariadb.com/kb/en/show-engine/\n\n','','https://mariadb.com/kb/en/show-engine/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (366,14,'NAME_CONST','Syntax:\nNAME_CONST(name,value)\n\nReturns the given value. When used to produce a result set column,\nNAME_CONST() causes the column to have the given name. The arguments\nshould be constants.\n\nMariaDB> SELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n\nURL: https://mariadb.com/kb/en/name_const/\n\n','','https://mariadb.com/kb/en/name_const/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (367,14,'RELEASE_LOCK','Syntax:\nRELEASE_LOCK(str)\n\nReleases the lock named by the string str that was obtained with\nGET_LOCK(). Returns 1 if the lock was released, 0 if the lock was not\nestablished by this thread (in which case the lock is not released),\nand NULL if the named lock did not exist. The lock does not exist if it\nwas never obtained by a call to GET_LOCK() or if it has previously been\nreleased.\n\nThe DO statement is convenient to use with RELEASE_LOCK(). See [HELP\nDO].\n\nURL: https://mariadb.com/kb/en/release_lock/\n\n','','https://mariadb.com/kb/en/release_lock/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (368,18,'IS NULL','Syntax:\nIS NULL\n\nTests whether a value is NULL.\n\nURL: https://mariadb.com/kb/en/is-null/\n\n','MariaDB> SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n -> 0, 0, 1\n','https://mariadb.com/kb/en/is-null/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (369,31,'CONVERT_TZ','Syntax:\nCONVERT_TZ(dt,from_tz,to_tz)\n\nCONVERT_TZ() converts a datetime value dt from the time zone given by\nfrom_tz to the time zone given by to_tz and returns the resulting\nvalue. Time zones are specified as described in\nhttps://mariadb.com/kb/en/time-zones/. This\nfunction returns NULL if the arguments are invalid.\n\nURL: https://mariadb.com/kb/en/convert_tz/\n\n','MariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'GMT\',\'MET\');\n -> \'2004-01-01 13:00:00\'\nMariaDB> SELECT CONVERT_TZ(\'2004-01-01 12:00:00\',\'+00:00\',\'+10:00\');\n -> \'2004-01-01 22:00:00\'\n','https://mariadb.com/kb/en/convert_tz/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (370,31,'TIME_TO_SEC','Syntax:\nTIME_TO_SEC(time)\n\nReturns the time argument, converted to seconds.\n\nURL: https://mariadb.com/kb/en/time_to_sec/\n\n','MariaDB> SELECT TIME_TO_SEC(\'22:23:00\');\n -> 80580\nMariaDB> SELECT TIME_TO_SEC(\'00:39:38\');\n -> 2378\n','https://mariadb.com/kb/en/time_to_sec/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (371,31,'WEEKDAY','Syntax:\nWEEKDAY(date)\n\nReturns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 =\nSunday).\n\nURL: https://mariadb.com/kb/en/weekday/\n\n','MariaDB> SELECT WEEKDAY(\'2008-02-03 22:23:00\');\n -> 6\nMariaDB> SELECT WEEKDAY(\'2007-11-06\');\n -> 1\n','https://mariadb.com/kb/en/weekday/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (372,37,'EXPORT_SET','Syntax:\nEXPORT_SET(bits,on,off[,separator[,number_of_bits]])\n\nReturns a string such that for every bit set in the value bits, you get\nan on string and for every bit not set in the value, you get an off\nstring. Bits in bits are examined from right to left (from low-order to\nhigh-order bits). Strings are added to the result from left to right,\nseparated by the separator string (the default being the comma\ncharacter ","). The number of bits examined is given by number_of_bits,\nwhich has a default of 64 if not specified. number_of_bits is silently\nclipped to 64 if larger than 64. It is treated as an unsigned integer,\nso a value of -1 is effectively the same as 64.\n\nURL: https://mariadb.com/kb/en/export_set/\n\n','MariaDB> SELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n -> \'Y,N,Y,N\'\nMariaDB> SELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n -> \'0,1,1,0,0,0,0,0,0,0\'\n','https://mariadb.com/kb/en/export_set/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (373,39,'ALTER SERVER','Syntax:\nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n\nAlters the server information for server_name, adjusting any of the\noptions permitted in the CREATE SERVER statement. See [HELP CREATE\nSERVER]. The corresponding fields in the mysql.servers table are\nupdated accordingly. This statement requires the SUPER privilege.\n\nURL: https://mariadb.com/kb/en/alter-server/\n\n','ALTER SERVER s OPTIONS (USER \'sally\');\n','https://mariadb.com/kb/en/alter-server/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (374,23,'RESIGNAL','Syntax:\nRESIGNAL [condition_value]\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nRESIGNAL passes on the error condition information that is available\nduring execution of a condition handler within a compound statement\ninside a stored procedure or function, trigger, or event. RESIGNAL may\nchange some or all information before passing it on. RESIGNAL is\nrelated to SIGNAL, but instead of originating a condition as SIGNAL\ndoes, RESIGNAL relays existing condition information, possibly after\nmodifying it.\n\nRESIGNAL makes it possible to both handle an error and return the error\ninformation. Otherwise, by executing an SQL statement within the\nhandler, information that caused the handler\'s activation is destroyed.\nRESIGNAL also can make some procedures shorter if a given handler can\nhandle part of a situation, then pass the condition "up the line" to\nanother handler.\n\nNo special privileges are required to execute the RESIGNAL statement.\n\nFor condition_value and signal_information_item, the definitions and\nrules are the same for RESIGNAL as for SIGNAL (see [HELP SIGNAL]).\n\nThe RESIGNAL statement takes condition_value and SET clauses, both of\nwhich are optional. This leads to several possible uses:\n\no RESIGNAL alone:\n\nRESIGNAL;\n\no RESIGNAL with new signal information:\n\nRESIGNAL SET signal_information_item [, signal_information_item] ...;\n\no RESIGNAL with a condition value and possibly new signal information:\n\nRESIGNAL condition_value\n [SET signal_information_item [, signal_information_item] ...];\n\nURL: https://mariadb.com/kb/en/resignal/\n\n','','https://mariadb.com/kb/en/resignal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (375,31,'TIME FUNCTION','Syntax:\nTIME(expr)\n\nExtracts the time part of the time or datetime expression expr and\nreturns it as a string.\n\nURL: https://mariadb.com/kb/en/time-function/\n\n','MariaDB> SELECT TIME(\'2003-12-31 01:02:03\');\n -> \'01:02:03\'\nMariaDB> SELECT TIME(\'2003-12-31 01:02:03.000123\');\n -> \'01:02:03.000123\'\n','https://mariadb.com/kb/en/time-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (376,31,'DATE_ADD','Syntax:\nDATE_ADD(date,INTERVAL expr unit), DATE_SUB(date,INTERVAL expr unit)\n\nThese functions perform date arithmetic. The date argument specifies\nthe starting date or datetime value. expr is an expression specifying\nthe interval value to be added or subtracted from the starting date.\nexpr is a string; it may start with a "-" for negative intervals. unit\nis a keyword indicating the units in which the expression should be\ninterpreted.\n\nURL: https://mariadb.com/kb/en/date_add/\n\n','MariaDB> SELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n -> \'2009-01-01 00:00:00\'\nMariaDB> SELECT INTERVAL 1 DAY + \'2008-12-31\';\n -> \'2009-01-01\'\nMariaDB> SELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n -> \'2004-12-31 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2000-12-31 23:59:59\',\n -> INTERVAL 1 SECOND);\n -> \'2001-01-01 00:00:00\'\nMariaDB> SELECT DATE_ADD(\'2010-12-31 23:59:59\',\n -> INTERVAL 1 DAY);\n -> \'2011-01-01 23:59:59\'\nMariaDB> SELECT DATE_ADD(\'2100-12-31 23:59:59\',\n -> INTERVAL \'1:1\' MINUTE_SECOND);\n -> \'2101-01-01 00:01:00\'\nMariaDB> SELECT DATE_SUB(\'2005-01-01 00:00:00\',\n -> INTERVAL \'1 1:1:1\' DAY_SECOND);\n -> \'2004-12-30 22:58:59\'\nMariaDB> SELECT DATE_ADD(\'1900-01-01 00:00:00\',\n -> INTERVAL \'-1 10\' DAY_HOUR);\n -> \'1899-12-30 14:00:00\'\nMariaDB> SELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n -> \'1997-12-02\'\nMariaDB> SELECT DATE_ADD(\'1992-12-31 23:59:59.000002\',\n -> INTERVAL \'1.999999\' SECOND_MICROSECOND);\n -> \'1993-01-01 00:00:01.000001\'\n','https://mariadb.com/kb/en/date_add/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (377,37,'CAST','Syntax:\nCAST(expr AS type)\n\nThe CAST() function takes an expression of any type and produces a\nresult value of a specified type, similar to CONVERT(). See the\ndescription of CONVERT() for more information.\n\nURL: https://mariadb.com/kb/en/cast/\n\n','','https://mariadb.com/kb/en/cast/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (378,37,'SOUNDS LIKE','Syntax:\nexpr1 SOUNDS LIKE expr2\n\nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n\nURL: https://mariadb.com/kb/en/sounds-like/\n\n','','https://mariadb.com/kb/en/sounds-like/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (379,31,'PERIOD_DIFF','Syntax:\nPERIOD_DIFF(P1,P2)\n\nReturns the number of months between periods P1 and P2. P1 and P2\nshould be in the format YYMM or YYYYMM. Note that the period arguments\nP1 and P2 are not date values.\n\nURL: https://mariadb.com/kb/en/period_diff/\n\n','MariaDB> SELECT PERIOD_DIFF(200802,200703);\n -> 11\n','https://mariadb.com/kb/en/period_diff/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (380,37,'LIKE','Syntax:\nexpr LIKE pat [ESCAPE \'escape_char\']\n\nPattern matching using SQL simple regular expression comparison.\nReturns 1 (TRUE) or 0 (FALSE). If either expr or pat is NULL, the\nresult is NULL.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\nURL: https://mariadb.com/kb/en/like/\n\n','MariaDB> SELECT \'David!\' LIKE \'David_\';\n -> 1\nMariaDB> SELECT \'David!\' LIKE \'%D%v%\';\n -> 1\n','https://mariadb.com/kb/en/like/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (381,24,'MULTIPOINT','MultiPoint(pt1,pt2,...)\n\nConstructs a MultiPoint value using Point or WKB Point arguments.\n\nURL: https://mariadb.com/kb/en/multipoint/\n\n','','https://mariadb.com/kb/en/multipoint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (382,19,'>>','Syntax:\n>>\n\nShifts a longlong (BIGINT) number to the right.\n\nURL: https://mariadb.com/kb/en/shift-right/\n\n','MariaDB> SELECT 4 >> 2;\n -> 1\n','https://mariadb.com/kb/en/shift-right/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (383,23,'FETCH','Syntax:\nFETCH [[NEXT] FROM] cursor_name INTO var_name [, var_name] ...\n\nThis statement fetches the next row for the SELECT statement associated\nwith the specified cursor (which must be open), and advances the cursor\npointer. If a row exists, the fetched columns are stored in the named\nvariables. The number of columns retrieved by the SELECT statement must\nmatch the number of output variables specified in the FETCH statement.\n\nIf no more rows are available, a No Data condition occurs with SQLSTATE\nvalue \'02000\'. To detect this condition, you can set up a handler for\nit (or for a NOT FOUND condition). For an example, see\nhttps://mariadb.com/kb/en/cursor-overview/.\n\nURL: https://mariadb.com/kb/en/fetch/\n\n','','https://mariadb.com/kb/en/fetch/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (384,16,'AVG','Syntax:\nAVG([DISTINCT] expr)\n\nReturns the average value of expr. The DISTINCT option can be used to\nreturn the average of the distinct values of expr.\n\nAVG() returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/avg/\n\n','MariaDB> SELECT student_name, AVG(test_score)\n -> FROM student\n -> GROUP BY student_name;\n','https://mariadb.com/kb/en/avg/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (385,29,'TRUE FALSE','The constants TRUE and FALSE evaluate to 1 and 0, respectively. The\nconstant names can be written in any lettercase.\n\nMariaDB> SELECT TRUE, true, FALSE, false;\n -> 1, 1, 0, 0\n\nURL: https://mariadb.com/kb/en/true-false/\n\n','','https://mariadb.com/kb/en/true-false/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (386,6,'MBRWITHIN','MBRWithin(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangle of g1\nis within the Minimum Bounding Rectangle of g2. This tests the opposite\nrelationship as MBRContains().\n\nURL: https://mariadb.com/kb/en/mbrwithin/\n\n','MariaDB> SET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nMariaDB> SET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nMariaDB> SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n','https://mariadb.com/kb/en/mbrwithin/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (387,17,'SESSION_USER','Syntax:\nSESSION_USER()\n\nSESSION_USER() is a synonym for USER().\n\nURL: https://mariadb.com/kb/en/session_user/\n\n','','https://mariadb.com/kb/en/session_user/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (388,18,'IN','Syntax:\nexpr IN (value,...)\n\nReturns 1 if expr is equal to any of the values in the IN list, else\nreturns 0. If all values are constants, they are evaluated according to\nthe type of expr and sorted. The search for the item then is done using\na binary search. This means IN is very quick if the IN value list\nconsists entirely of constants. Otherwise, type conversion takes place\naccording to the rules described in\nhttps://mariadb.com/kb/en/type-conversion/, but\napplied to all the arguments.\n\nURL: https://mariadb.com/kb/en/in/\n\n','MariaDB> SELECT 2 IN (0,3,5,7);\n -> 0\nMariaDB> SELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n -> 1\n','https://mariadb.com/kb/en/in/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (389,37,'QUOTE','Syntax:\nQUOTE(str)\n\nQuotes a string to produce a result that can be used as a properly\nescaped data value in an SQL statement. The string is returned enclosed\nby single quotation marks and with each instance of backslash ("\\"),\nsingle quote ("\'"), ASCII NUL, and Control+Z preceded by a backslash.\nIf the argument is NULL, the return value is the word "NULL" without\nenclosing single quotation marks.\n\nURL: https://mariadb.com/kb/en/quote/\n\n','MariaDB> SELECT QUOTE(\'Don\\\'t!\');\n -> \'Don\\\'t!\'\nMariaDB> SELECT QUOTE(NULL);\n -> NULL\n','https://mariadb.com/kb/en/quote/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (390,26,'HELP COMMAND','Syntax:\nMariaDB> help search_string\n\nIf you provide an argument to the help command, mysql uses it as a\nsearch string to access server-side help from the contents of the MySQL\nReference Manual. The proper operation of this command requires that\nthe help tables in the mysql database be initialized with help topic\ninformation .\n\nIf there is no match for the search string, the search fails:\n\nMariaDB> help me\n\nNothing found\nPlease try to run \'help contents\' for a list of all accessible topics\n\nUse help contents to see a list of the help categories:\n\nMariaDB> help contents\nYou asked for help about help category: "Contents"\nFor more information, type \'help <item>\', where <item> is one of the\nfollowing categories:\n Account Management\n Administration\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Language Structure\n Plugins\n Storage Engines\n Stored Routines\n Table Maintenance\n Transactions\n Triggers\n\nIf the search string matches multiple items, mysql shows a list of\nmatching topics:\n\nMariaDB> help logs\nMany help items for your request exist.\nTo make a more specific request, please type \'help <item>\',\nwhere <item> is one of the following topics:\n SHOW\n SHOW BINARY LOGS\n SHOW ENGINE\n SHOW LOGS\n\nUse a topic as the search string to see the help entry for that topic:\n\nMariaDB> help show binary logs\nName: \'SHOW BINARY LOGS\'\nDescription:\nSyntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [purge-binary-logs], that shows how\nto determine which logs can be purged.\n\nMariaDB> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name | File_size |\n+---------------+-----------+\n| binlog.000015 | 724935 |\n| binlog.000016 | 733481 |\n+---------------+-----------+\n\nURL: https://mariadb.com/kb/en/help-command/\n\n','','https://mariadb.com/kb/en/help-command/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (391,31,'QUARTER','Syntax:\nQUARTER(date)\n\nReturns the quarter of the year for date, in the range 1 to 4.\n\nURL: https://mariadb.com/kb/en/quarter/\n\n','MariaDB> SELECT QUARTER(\'2008-04-01\');\n -> 2\n','https://mariadb.com/kb/en/quarter/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (392,37,'POSITION','Syntax:\nPOSITION(substr IN str)\n\nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n\nURL: https://mariadb.com/kb/en/position/\n\n','','https://mariadb.com/kb/en/position/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (393,26,'SHOW CREATE FUNCTION','Syntax:\nSHOW CREATE FUNCTION func_name\n\nThis statement is similar to SHOW CREATE PROCEDURE but for stored\nfunctions. See [HELP SHOW CREATE PROCEDURE].\n\nURL: https://mariadb.com/kb/en/show-create-function/\n\n','','https://mariadb.com/kb/en/show-create-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (394,14,'IS_USED_LOCK','Syntax:\nIS_USED_LOCK(str)\n\nChecks whether the lock named str is in use (that is, locked). If so,\nit returns the connection identifier of the client that holds the lock.\nOtherwise, it returns NULL.\n\nURL: https://mariadb.com/kb/en/is_used_lock/\n\n','','https://mariadb.com/kb/en/is_used_lock/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (395,3,'POLYFROMTEXT','PolyFromText(wkt[,srid]), PolygonFromText(wkt[,srid])\n\nConstructs a POLYGON value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/polyfromtext/\n\n','','https://mariadb.com/kb/en/polyfromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (396,12,'DES_ENCRYPT','Syntax:\nDES_ENCRYPT(str[,{key_num|key_str}])\n\nEncrypts the string with the given key using the Triple-DES algorithm.\n\nThis function works only if MySQL has been configured with SSL support.\nSee https://mariadb.com/kb/en/ssl-connections/.\n\nThe encryption key to use is chosen based on the second argument to\nDES_ENCRYPT(), if one was given. With no argument, the first key from\nthe DES key file is used. With a key_num argument, the given key number\n(0 to 9) from the DES key file is used. With a key_str argument, the\ngiven key string is used to encrypt str.\n\nThe key file can be specified with the --des-key-file server option.\n\nThe return string is a binary string where the first character is\nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT() returns NULL.\n\nThe 128 is added to make it easier to recognize an encrypted key. If\nyou use a string key, key_num is 127.\n\nThe string length for the result is given by this formula:\n\nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n\nEach line in the DES key file has the following format:\n\nkey_num des_key_str\n\nEach key_num value must be a number in the range from 0 to 9. Lines in\nthe file may be in any order. des_key_str is the string that is used to\nencrypt the message. There should be at least one space between the\nnumber and the key. The first key is the default key that is used if\nyou do not specify any key argument to DES_ENCRYPT().\n\nYou can tell MySQL to read new key values from the key file with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD privilege.\n\nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted column\nvalues, without giving the end user the right to decrypt those values.\n\nURL: https://mariadb.com/kb/en/des_encrypt/\n\n','MariaDB> SELECT customer_address FROM customer_table \n > WHERE crypted_credit_card = DES_ENCRYPT(\'credit_card_number\');\n','https://mariadb.com/kb/en/des_encrypt/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (397,4,'CEIL','Syntax:\nCEIL(X)\n\nCEIL() is a synonym for CEILING().\n\nURL: https://mariadb.com/kb/en/ceil/\n\n','','https://mariadb.com/kb/en/ceil/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (398,37,'LENGTH','Syntax:\nLENGTH(str)\n\nReturns the length of the string str, measured in bytes. A multi-byte\ncharacter counts as multiple bytes. This means that for a string\ncontaining five 2-byte characters, LENGTH() returns 10, whereas\nCHAR_LENGTH() returns 5.\n\nURL: https://mariadb.com/kb/en/length/\n\n','MariaDB> SELECT LENGTH(\'text\');\n -> 4\n','https://mariadb.com/kb/en/length/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (399,31,'STR_TO_DATE','Syntax:\nSTR_TO_DATE(str,format)\n\nThis is the inverse of the DATE_FORMAT() function. It takes a string\nstr and a format string format. STR_TO_DATE() returns a DATETIME value\nif the format string contains both date and time parts, or a DATE or\nTIME value if the string contains only date or time parts. If the date,\ntime, or datetime value extracted from str is illegal, STR_TO_DATE()\nreturns NULL and produces a warning.\n\nThe server scans str attempting to match format to it. The format\nstring can contain literal characters and format specifiers beginning\nwith %. Literal characters in format must match literally in str.\nFormat specifiers in format must match a date or time part in str. For\nthe specifiers that can be used in format, see the DATE_FORMAT()\nfunction description.\n\nMariaDB> SELECT STR_TO_DATE(\'01,5,2013\',\'%d,%m,%Y\');\n -> \'2013-05-01\'\nMariaDB> SELECT STR_TO_DATE(\'May 1, 2013\',\'%M %d,%Y\');\n -> \'2013-05-01\'\n\nScanning starts at the beginning of str and fails if format is found\nnot to match. Extra characters at the end of str are ignored.\n\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'a%h:%i:%s\');\n -> \'09:30:17\'\nMariaDB> SELECT STR_TO_DATE(\'a09:30:17\',\'%h:%i:%s\');\n -> NULL\nMariaDB> SELECT STR_TO_DATE(\'09:30:17a\',\'%h:%i:%s\');\n -> \'09:30:17\'\n\nUnspecified date or time parts have a value of 0, so incompletely\nspecified values in str produce a result with some or all parts set to\n0:\n\nMariaDB> SELECT STR_TO_DATE(\'abc\',\'abc\');\n -> \'0000-00-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%m\');\n -> \'0000-09-00\'\nMariaDB> SELECT STR_TO_DATE(\'9\',\'%s\');\n -> \'00:00:09\'\n\nURL: https://mariadb.com/kb/en/str_to_date/\n\n','','https://mariadb.com/kb/en/str_to_date/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (400,11,'Y','Y(p)\n\nReturns the Y-coordinate value for the Point object p as a\ndouble-precision number.\n\nURL: https://mariadb.com/kb/en/y/\n\n','MariaDB> SELECT Y(POINT(56.7, 53.34));\n+-----------------------+\n| Y(POINT(56.7, 53.34)) |\n+-----------------------+\n| 53.34 |\n+-----------------------+\n','https://mariadb.com/kb/en/y/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (401,20,'CHECKSUM TABLE','Syntax:\nCHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]\n\nCHECKSUM TABLE reports a table checksum. This statement requires the\nSELECT privilege for the table.\n\nWith QUICK, the live table checksum is reported if it is available, or\nNULL otherwise. This is very fast. A live checksum is enabled by\nspecifying the CHECKSUM=1 table option when you create the table;\ncurrently, this is supported only for MyISAM tables. See [HELP CREATE\nTABLE].\n\nWith EXTENDED, the entire table is read row by row and the checksum is\ncalculated. This can be very slow for large tables.\n\nIf neither QUICK nor EXTENDED is specified, MySQL returns a live\nchecksum if the table storage engine supports it and scans the table\notherwise.\n\nFor a nonexistent table, CHECKSUM TABLE returns NULL and generates a\nwarning.\n\nIn MySQL 5.5, CHECKSUM TABLE returns 0 for partitioned tables unless\nyou include the EXTENDED option. This issue is resolved in MySQL 5.6.\n(Bug #11933226, Bug #60681)\n\nThe checksum value depends on the table row format. If the row format\nchanges, the checksum also changes. For example, the storage format for\nVARCHAR changed between MySQL 4.1 and 5.0, so if a 4.1 table is\nupgraded to MySQL 5.0, the checksum value may change.\n\nURL: https://mariadb.com/kb/en/checksum-table/\n\n','','https://mariadb.com/kb/en/checksum-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (402,2,'NUMINTERIORRINGS','NumInteriorRings(poly)\n\nReturns the number of interior rings in the Polygon value poly.\n\nURL: https://mariadb.com/kb/en/numinteriorrings/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n','https://mariadb.com/kb/en/numinteriorrings/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (403,2,'INTERIORRINGN','InteriorRingN(poly,N)\n\nReturns the N-th interior ring for the Polygon value poly as a\nLineString. Rings are numbered beginning with 1.\n\nURL: https://mariadb.com/kb/en/interiorringn/\n\n','MariaDB> SET @poly =\n -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nMariaDB> SELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n','https://mariadb.com/kb/en/interiorringn/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (404,31,'UTC_TIME','Syntax:\nUTC_TIME, UTC_TIME()\n\nReturns the current UTC time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_time/\n\n','MariaDB> SELECT UTC_TIME(), UTC_TIME() + 0;\n -> \'18:07:53\', 180753.000000\n','https://mariadb.com/kb/en/utc_time/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (405,39,'DROP FUNCTION','The DROP FUNCTION statement is used to drop stored functions and\nuser-defined functions (UDFs):\n\no For information about dropping stored functions, see [HELP DROP\n PROCEDURE].\n\no For information about dropping user-defined functions, see [HELP DROP\n FUNCTION UDF].\n\nURL: https://mariadb.com/kb/en/drop-function/\n\n','','https://mariadb.com/kb/en/drop-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (406,39,'ALTER EVENT','Syntax:\nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO event_body]\n\nThe ALTER EVENT statement changes one or more of the characteristics of\nan existing event without the need to drop and recreate it. The syntax\nfor each of the DEFINER, ON SCHEDULE, ON COMPLETION, COMMENT, ENABLE /\nDISABLE, and DO clauses is exactly the same as when used with CREATE\nEVENT. (See [HELP CREATE EVENT].)\n\nAny user can alter an event defined on a database for which that user\nhas the EVENT privilege. When a user executes a successful ALTER EVENT\nstatement, that user becomes the definer for the affected event.\n\nALTER EVENT works only with an existing event:\n\nMariaDB> ALTER EVENT no_such_event \n > ON SCHEDULE \n > EVERY \'2:3\' DAY_HOUR;\nERROR 1517 (HY000): Unknown event \'no_such_event\'\n\nURL: https://mariadb.com/kb/en/alter-event/\n\n','','https://mariadb.com/kb/en/alter-event/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (407,16,'STDDEV','Syntax:\nSTDDEV(expr)\n\nReturns the population standard deviation of expr. This function is\nprovided for compatibility with Oracle. The standard SQL function\nSTDDEV_POP() can be used instead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/stddev/\n\n','','https://mariadb.com/kb/en/stddev/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (408,31,'DATE_SUB','Syntax:\nDATE_SUB(date,INTERVAL expr unit)\n\nSee the description for DATE_ADD().\n\nURL: https://mariadb.com/kb/en/date_sub/\n\n','','https://mariadb.com/kb/en/date_sub/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (409,31,'PERIOD_ADD','Syntax:\nPERIOD_ADD(P,N)\n\nAdds N months to period P (in the format YYMM or YYYYMM). Returns a\nvalue in the format YYYYMM. Note that the period argument P is not a\ndate value.\n\nURL: https://mariadb.com/kb/en/period_add/\n\n','MariaDB> SELECT PERIOD_ADD(200801,2);\n -> 200803\n','https://mariadb.com/kb/en/period_add/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (410,19,'|','Syntax:\n|\n\nBitwise OR:\n\nURL: https://mariadb.com/kb/en/bitwise-or/\n\n','MariaDB> SELECT 29 | 15;\n -> 31\n','https://mariadb.com/kb/en/bitwise-or/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (411,3,'GEOMFROMTEXT','GeomFromText(wkt[,srid]), GeometryFromText(wkt[,srid])\n\nConstructs a geometry value of any type using its WKT representation\nand SRID.\n\nURL: https://mariadb.com/kb/en/geomfromtext/\n\n','','https://mariadb.com/kb/en/geomfromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (412,14,'UUID_SHORT','Syntax:\nUUID_SHORT()\n\nReturns a "short" universal identifier as a 64-bit unsigned integer\n(rather than a string-form 128-bit identifier as returned by the UUID()\nfunction).\n\nThe value of UUID_SHORT() is guaranteed to be unique if the following\nconditions hold:\n\no The server_id of the current host is unique among your set of master\n and slave servers\n\no server_id is between 0 and 255\n\no You do not set back your system time for your server between mysqld\n restarts\n\no You do not invoke UUID_SHORT() on average more than 16 million times\n per second between mysqld restarts\n\nThe UUID_SHORT() return value is constructed this way:\n\n (server_id & 255) << 56\n+ (server_startup_time_in_seconds << 24)\n+ incremented_variable++;\n\nURL: https://mariadb.com/kb/en/uuid_short/\n\n','MariaDB> SELECT UUID_SHORT();\n -> 92395783831158784\n','https://mariadb.com/kb/en/uuid_short/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (413,37,'RIGHT','Syntax:\nRIGHT(str,len)\n\nReturns the rightmost len characters from the string str, or NULL if\nany argument is NULL.\n\nURL: https://mariadb.com/kb/en/right/\n\n','MariaDB> SELECT RIGHT(\'foobarbar\', 4);\n -> \'rbar\'\n','https://mariadb.com/kb/en/right/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (414,31,'DATEDIFF','Syntax:\nDATEDIFF(expr1,expr2)\n\nDATEDIFF() returns expr1 - expr2 expressed as a value in days from one\ndate to the other. expr1 and expr2 are date or date-and-time\nexpressions. Only the date parts of the values are used in the\ncalculation.\n\nURL: https://mariadb.com/kb/en/datediff/\n\n','MariaDB> SELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n -> 1\nMariaDB> SELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n -> -31\n','https://mariadb.com/kb/en/datediff/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (415,39,'DROP TABLESPACE','Syntax:\nDROP TABLESPACE tablespace_name\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/drop-tablespace/\n\n','','https://mariadb.com/kb/en/drop-tablespace/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (416,39,'DROP PROCEDURE','Syntax:\nDROP {PROCEDURE | FUNCTION} [IF EXISTS] sp_name\n\nThis statement is used to drop a stored procedure or function. That is,\nthe specified routine is removed from the server. You must have the\nALTER ROUTINE privilege for the routine. (If the\nautomatic_sp_privileges system variable is enabled, that privilege and\nEXECUTE are granted automatically to the routine creator when the\nroutine is created and dropped from the creator when the routine is\ndropped. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n)\n\nThe IF EXISTS clause is a MySQL extension. It prevents an error from\noccurring if the procedure or function does not exist. A warning is\nproduced that can be viewed with SHOW WARNINGS.\n\nURL: https://mariadb.com/kb/en/drop-procedure/\n\n','','https://mariadb.com/kb/en/drop-procedure/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (417,20,'CHECK TABLE','Syntax:\nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n\noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED | CHANGED}\n\nCHECK TABLE checks a table or tables for errors. CHECK TABLE works for\nInnoDB, MyISAM, ARCHIVE, and CSV tables. For MyISAM tables, the key\nstatistics are updated as well.\n\nTo check a table, you must have some privilege for it.\n\nCHECK TABLE can also check views for problems, such as tables that are\nreferenced in the view definition that no longer exist.\n\nCHECK TABLE is supported for partitioned tables, and you can use ALTER\nTABLE ... CHECK PARTITION to check one or more partitions; for more\ninformation, see [HELP ALTER TABLE].\n\nURL: https://mariadb.com/kb/en/sql-commands-check-table/\n\n','','https://mariadb.com/kb/en/sql-commands-check-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (418,37,'BIN','Syntax:\nBIN(N)\n\nReturns a string representation of the binary value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,2). Returns\nNULL if N is NULL.\n\nURL: https://mariadb.com/kb/en/bin/\n\n','MariaDB> SELECT BIN(12);\n -> \'1100\'\n','https://mariadb.com/kb/en/bin/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (419,5,'INSTALL PLUGIN','Syntax:\nINSTALL PLUGIN plugin_name SONAME \'shared_library_name\'\n\nThis statement installs a server plugin. It requires the INSERT\nprivilege for the mysql.plugin table.\n\nplugin_name is the name of the plugin as defined in the plugin\ndescriptor structure contained in the library file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/plugin-data-structures.html).\nPlugin names are not case sensitive. For maximal compatibility, plugin\nnames should be limited to ASCII letters, digits, and underscore\nbecause they are used in C source files, shell command lines, M4 and\nBourne shell scripts, and SQL environments.\n\nshared_library_name is the name of the shared library that contains the\nplugin code. The name includes the file name extension (for example,\nlibmyplugin.so, libmyplugin.dll, or libmyplugin.dylib).\n\nThe shared library must be located in the plugin directory (the\ndirectory named by the plugin_dir system variable). The library must be\nin the plugin directory itself, not in a subdirectory. By default,\nplugin_dir is the plugin directory under the directory named by the\npkglibdir configuration variable, but it can be changed by setting the\nvalue of plugin_dir at server startup. For example, set its value in a\nmy.cnf file:\n\n[mysqld]\nplugin_dir=/path/to/plugin/directory\n\nIf the value of plugin_dir is a relative path name, it is taken to be\nrelative to the MySQL base directory (the value of the basedir system\nvariable).\n\nINSTALL PLUGIN loads and initializes the plugin code to make the plugin\navailable for use. A plugin is initialized by executing its\ninitialization function, which handles any setup that the plugin must\nperform before it can be used. When the server shuts down, it executes\nthe deinitialization function for each plugin that is loaded so that\nthe plugin has a change to perform any final cleanup.\n\nINSTALL PLUGIN also registers the plugin by adding a line that\nindicates the plugin name and library file name to the mysql.plugin\ntable. At server startup, the server loads and initializes any plugin\nthat is listed in the mysql.plugin table. This means that a plugin is\ninstalled with INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the server is\nstarted with the --skip-grant-tables option.\n\nA plugin library can contain multiple plugins. For each of them to be\ninstalled, use a separate INSTALL PLUGIN statement. Each statement\nnames a different plugin, but all of them specify the same library\nname.\n\nURL: https://mariadb.com/kb/en/install-plugin/\n\n','','https://mariadb.com/kb/en/install-plugin/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (420,23,'DECLARE CURSOR','Syntax:\nDECLARE cursor_name CURSOR FOR select_statement\n\nThis statement declares a cursor and associates it with a SELECT\nstatement that retrieves the rows to be traversed by the cursor. To\nfetch the rows later, use a FETCH statement. The number of columns\nretrieved by the SELECT statement must match the number of output\nvariables specified in the FETCH statement.\n\nThe SELECT statement cannot have an INTO clause.\n\nCursor declarations must appear before handler declarations and after\nvariable and condition declarations.\n\nA stored program may contain multiple cursor declarations, but each\ncursor declared in a given block must have a unique name. For an\nexample, see https://mariadb.com/kb/en/programmatic-and-compound-statements-cursors/.\n\nFor information available through SHOW statements, it is possible in\nmany cases to obtain equivalent information by using a cursor with an\nINFORMATION_SCHEMA table.\n\nURL: https://mariadb.com/kb/en/declare-cursor/\n\n','','https://mariadb.com/kb/en/declare-cursor/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (421,27,'LOAD DATA','Syntax:\nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number {LINES | ROWS}]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n\nThe LOAD DATA INFILE statement reads rows from a text file into a table\nat a very high speed. The file name must be given as a literal string.\n\nLOAD DATA INFILE is the complement of SELECT ... INTO OUTFILE. (See\nhttps://mariadb.com/kb/en/select-into/.) To write data\nfrom a table to a file, use SELECT ... INTO OUTFILE. To read the file\nback into a table, use LOAD DATA INFILE. The syntax of the FIELDS and\nLINES clauses is the same for both statements. Both clauses are\noptional, but FIELDS must precede LINES if both are specified.\n\nFor more information about the efficiency of INSERT versus LOAD DATA\nINFILE and speeding up LOAD DATA INFILE, see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-speed.html.\n\nThe character set indicated by the character_set_database system\nvariable is used to interpret the information in the file. SET NAMES\nand the setting of character_set_client do not affect interpretation of\ninput. If the contents of the input file use a character set that\ndiffers from the default, it is usually preferable to specify the\ncharacter set of the file by using the CHARACTER SET clause. A\ncharacter set of binary specifies "no conversion."\n\nLOAD DATA INFILE interprets all fields in the file as having the same\ncharacter set, regardless of the data types of the columns into which\nfield values are loaded. For proper interpretation of file contents,\nyou must ensure that it was written with the correct character set. For\nexample, if you write a data file with mysqldump -T or by issuing a\nSELECT ... INTO OUTFILE statement in mysql, be sure to use a\n--default-character-set option with mysqldump or mysql so that output\nis written in the character set to be used when the file is loaded with\nLOAD DATA INFILE.\n\n*Note*: It is not possible to load data files that use the ucs2, utf16,\nor utf32 character set.\n\nThe character_set_filesystem system variable controls the\ninterpretation of the file name.\n\nYou can also load data files by using the mysqlimport utility; it\noperates by sending a LOAD DATA INFILE statement to the server. The\n--local option causes mysqlimport to read data files from the client\nhost. You can specify the --compress option to get better performance\nover slow networks if the client and server support the compressed\nprotocol. See https://mariadb.com/kb/en/mysqlimport/.\n\nIf you use LOW_PRIORITY, execution of the LOAD DATA statement is\ndelayed until no other clients are reading from the table. This affects\nonly storage engines that use only table-level locking (such as MyISAM,\nMEMORY, and MERGE).\n\nIf you specify CONCURRENT with a MyISAM table that satisfies the\ncondition for concurrent inserts (that is, it contains no free blocks\nin the middle), other threads can retrieve data from the table while\nLOAD DATA is executing. Using this option affects the performance of\nLOAD DATA a bit, even if no other thread is using the table at the same\ntime.\n\nPrior to MySQL 5.5.1, CONCURRENT was not replicated when using\nstatement-based replication (see Bug #34628). However, it is replicated\nwhen using row-based replication, regardless of the version. See\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-features-load-data.h\ntml, for more information.\n\nThe LOCAL keyword, if specified, is interpreted with respect to the\nclient end of the connection:\n\no If LOCAL is specified, the file is read by the client program on the\n client host and sent to the server. The file can be given as a full\n path name to specify its exact location. If given as a relative path\n name, the name is interpreted relative to the directory in which the\n client program was started.\n\n When using LOCAL with LOAD DATA, a copy of the file is created in the\n server\'s temporary directory. This is not the directory determined by\n the value of tmpdir or slave_load_tmpdir, but rather the operating\n system\'s temporary directory, and is not configurable in the MySQL\n Server. (Typically the system temporary directory is /tmp on Linux\n systems and C:\\WINDOWS\\TEMP on Windows.) Lack of sufficient space for\n the copy in this directory can cause the LOAD DATA LOCAL statement to\n fail.\n\no If LOCAL is not specified, the file must be located on the server\n host and is read directly by the server. The server uses the\n following rules to locate the file:\n\n o If the file name is an absolute path name, the server uses it as\n given.\n\n o If the file name is a relative path name with one or more leading\n components, the server searches for the file relative to the\n server\'s data directory.\n\n o If a file name with no leading components is given, the server\n looks for the file in the database directory of the default\n database.\n\nNote that, in the non-LOCAL case, these rules mean that a file named as\n./myfile.txt is read from the server\'s data directory, whereas the file\nnamed as myfile.txt is read from the database directory of the default\ndatabase. For example, if db1 is the default database, the following\nLOAD DATA statement reads the file data.txt from the database directory\nfor db1, even though the statement explicitly loads the file into a\ntable in the db2 database:\n\nLOAD DATA INFILE \'data.txt\' INTO TABLE db2.my_table;\n\nWindows path names are specified using forward slashes rather than\nbackslashes. If you do use backslashes, you must double them.\n\nFor security reasons, when reading text files located on the server,\nthe files must either reside in the database directory or be readable\nby all. Also, to use LOAD DATA INFILE on server files, you must have\nthe FILE privilege. See\nhttps://mariadb.com/kb/en/grant/. For\nnon-LOCAL load operations, if the secure_file_priv system variable is\nset to a nonempty directory name, the file to be loaded must be located\nin that directory.\n\nURL: https://mariadb.com/kb/en/load-data-infile/\n\n','','https://mariadb.com/kb/en/load-data-infile/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (422,24,'MULTILINESTRING','MultiLineString(ls1,ls2,...)\n\nConstructs a MultiLineString value using LineString or WKB LineString\narguments.\n\nURL: https://mariadb.com/kb/en/multilinestring/\n\n','','https://mariadb.com/kb/en/multilinestring/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (423,31,'LOCALTIME','Syntax:\nLOCALTIME, LOCALTIME()\n\nLOCALTIME and LOCALTIME() are synonyms for NOW().\n\nURL: https://mariadb.com/kb/en/localtime/\n\n','','https://mariadb.com/kb/en/localtime/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (424,26,'SHOW RELAYLOG EVENTS','Syntax:\nSHOW RELAYLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the relay log of a replication slave. If you do not\nspecify \'log_name\', the first relay log is displayed. This statement\nhas no effect on the master.\n\nURL: https://mariadb.com/kb/en/show-relaylog-events/\n\n','','https://mariadb.com/kb/en/show-relaylog-events/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (425,3,'MPOINTFROMTEXT','MPointFromText(wkt[,srid]), MultiPointFromText(wkt[,srid])\n\nConstructs a MULTIPOINT value using its WKT representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromtext/\n\n','','https://mariadb.com/kb/en/mpointfromtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (426,22,'BLOB','BLOB[(M)]\n\nA BLOB column with a maximum length of 65,535 (216 - 1) bytes. Each\nBLOB value is stored using a 2-byte length prefix that indicates the\nnumber of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest BLOB type large enough to hold\nvalues M bytes long.\n\nURL: https://mariadb.com/kb/en/blob/\n\n','','https://mariadb.com/kb/en/blob/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (427,12,'SHA1','Syntax:\nSHA1(str), SHA(str)\n\nCalculates an SHA-1 160-bit checksum for the string, as described in\nRFC 3174 (Secure Hash Algorithm). The value is returned as a string of\n40 hex digits, or NULL if the argument was NULL. One of the possible\nuses for this function is as a hash key. See the notes at the beginning\nof this section about storing hash values efficiently. You can also use\nSHA1() as a cryptographic function for storing passwords. SHA() is\nsynonymous with SHA1().\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: https://mariadb.com/kb/en/sha1/\n\n','MariaDB> SELECT SHA1(\'abc\');\n -> \'a9993e364706816aba3e25717850c26c9cd0d89d\'\n','https://mariadb.com/kb/en/sha1/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (428,37,'SUBSTR','Syntax:\nSUBSTR(str,pos), SUBSTR(str FROM pos), SUBSTR(str,pos,len), SUBSTR(str\nFROM pos FOR len)\n\nSUBSTR() is a synonym for SUBSTRING().\n\nURL: https://mariadb.com/kb/en/substr/\n\n','','https://mariadb.com/kb/en/substr/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (429,12,'PASSWORD','Syntax:\nPASSWORD(str)\n\nCalculates and returns a hashed password string from the plaintext\npassword str and returns a nonbinary string in the connection character\nset (a binary string before MySQL 5.5.3), or NULL if the argument is\nNULL. This function is the SQL interface to the algorithm used by the\nserver to encrypt MySQL passwords for storage in the mysql.user grant\ntable.\n\nThe password hashing method used by PASSWORD() depends on the value of\nthe old_passwords system variable:\n\nURL: https://mariadb.com/kb/en/password/\n\n','MariaDB> SET old_passwords = 0;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+-------------------------------------------+\n| PASSWORD(\'mypass\') |\n+-------------------------------------------+\n| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |\n+-------------------------------------------+\n\nMariaDB> SET old_passwords = 1;\nMariaDB> SELECT PASSWORD(\'mypass\');\n+--------------------+\n| PASSWORD(\'mypass\') |\n+--------------------+\n| 6f8c114b58f2ce9e |\n+--------------------+\n','https://mariadb.com/kb/en/password/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (430,22,'CHAR','[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA fixed-length string that is always right-padded with spaces to the\nspecified length when stored. M represents the column length in\ncharacters. The range of M is 0 to 255. If M is omitted, the length is\n1.\n\n*Note*: Trailing spaces are removed when CHAR values are retrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n\nURL: https://mariadb.com/kb/en/char/\n\n','','https://mariadb.com/kb/en/char/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (431,31,'UTC_DATE','Syntax:\nUTC_DATE, UTC_DATE()\n\nReturns the current UTC date as a value in \'YYYY-MM-DD\' or YYYYMMDD\nformat, depending on whether the function is used in a string or\nnumeric context.\n\nURL: https://mariadb.com/kb/en/utc_date/\n\n','MariaDB> SELECT UTC_DATE(), UTC_DATE() + 0;\n -> \'2003-08-14\', 20030814\n','https://mariadb.com/kb/en/utc_date/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (432,36,'DIMENSION','Dimension(g)\n\nReturns the inherent dimension of the geometry value g. The result can\nbe -1, 0, 1, or 2. The meaning of these values is given in\nhttps://mariadb.com/kb/en/dimension/.\n\nURL: https://mariadb.com/kb/en/dimension/\n\n','MariaDB> SELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n','https://mariadb.com/kb/en/dimension/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (433,16,'COUNT DISTINCT','Syntax:\nCOUNT(DISTINCT expr,[expr...])\n\nReturns a count of the number of rows with different non-NULL expr\nvalues.\n\nCOUNT(DISTINCT) returns 0 if there were no matching rows.\n\nURL: https://mariadb.com/kb/en/count-distinct/\n\n','MariaDB> SELECT COUNT(DISTINCT results) FROM student;\n','https://mariadb.com/kb/en/count-distinct/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (434,22,'BIT','BIT[(M)]\n\nA bit-field type. M indicates the number of bits per value, from 1 to\n64. The default is 1 if M is omitted.\n\nURL: https://mariadb.com/kb/en/bit/\n\n','','https://mariadb.com/kb/en/bit/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (435,30,'EQUALS','Equals(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially equal to g2.\n\nURL: https://mariadb.com/kb/en/equals/\n\n','','https://mariadb.com/kb/en/equals/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (436,26,'SHOW CREATE VIEW','Syntax:\nSHOW CREATE VIEW view_name\n\nThis statement shows a CREATE VIEW statement that creates the given\nview.\n\nURL: https://mariadb.com/kb/en/show-create-view/\n\n','','https://mariadb.com/kb/en/show-create-view/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (437,18,'INTERVAL','Syntax:\nINTERVAL(N,N1,N2,N3,...)\n\nReturns 0 if N < N1, 1 if N < N2 and so on or -1 if N is NULL. All\narguments are treated as integers. It is required that N1 < N2 < N3 <\n... < Nn for this function to work correctly. This is because a binary\nsearch is used (very fast).\n\nURL: https://mariadb.com/kb/en/interval/\n\n','MariaDB> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);\n -> 3\nMariaDB> SELECT INTERVAL(10, 1, 10, 100, 1000);\n -> 2\nMariaDB> SELECT INTERVAL(22, 23, 30, 44, 200);\n -> 0\n','https://mariadb.com/kb/en/interval/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (438,31,'FROM_DAYS','Syntax:\nFROM_DAYS(N)\n\nGiven a day number N, returns a DATE value.\n\nURL: https://mariadb.com/kb/en/from_days/\n\n','MariaDB> SELECT FROM_DAYS(730669);\n -> \'2007-07-03\'\n','https://mariadb.com/kb/en/from_days/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (439,39,'ALTER PROCEDURE','Syntax:\nALTER PROCEDURE proc_name [characteristic ...]\n\ncharacteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nprocedure. More than one change may be specified in an ALTER PROCEDURE\nstatement. However, you cannot change the parameters or body of a\nstored procedure using this statement; to make such changes, you must\ndrop and re-create the procedure using DROP PROCEDURE and CREATE\nPROCEDURE.\n\nYou must have the ALTER ROUTINE privilege for the procedure. By\ndefault, that privilege is granted automatically to the procedure\ncreator. This behavior can be changed by disabling the\nautomatic_sp_privileges system variable. See\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nURL: https://mariadb.com/kb/en/alter-procedure/\n\n','','https://mariadb.com/kb/en/alter-procedure/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (440,19,'BIT_COUNT','Syntax:\nBIT_COUNT(N)\n\nReturns the number of bits that are set in the argument N.\n\nURL: https://mariadb.com/kb/en/bit_count/\n\n','MariaDB> SELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n -> 4, 3\n','https://mariadb.com/kb/en/bit_count/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (441,37,'OCTET_LENGTH','Syntax:\nOCTET_LENGTH(str)\n\nOCTET_LENGTH() is a synonym for LENGTH().\n\nURL: https://mariadb.com/kb/en/octet_length/\n\n','','https://mariadb.com/kb/en/octet_length/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (442,31,'UTC_TIMESTAMP','Syntax:\nUTC_TIMESTAMP, UTC_TIMESTAMP()\n\nReturns the current UTC date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is used in a string or numeric context.\n\nURL: https://mariadb.com/kb/en/utc_timestamp/\n\n','MariaDB> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n -> \'2003-08-14 18:08:04\', 20030814180804.000000\n','https://mariadb.com/kb/en/utc_timestamp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (443,12,'AES_ENCRYPT','Syntax:\nAES_ENCRYPT(str,key_str)\n\nAES_ENCRYPT() and AES_DECRYPT() enable encryption and decryption of\ndata using the official AES (Advanced Encryption Standard) algorithm,\npreviously known as "Rijndael." Encoding with a 128-bit key length is\nused, but you can extend it up to 256 bits by modifying the source. We\nchose 128 bits because it is much faster and it is secure enough for\nmost purposes.\n\nAES_ENCRYPT() encrypts a string and returns a binary string.\nAES_DECRYPT() decrypts the encrypted string and returns the original\nstring. The input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n\nBecause AES is a block-level algorithm, padding is used to encode\nuneven length strings and so the result string length may be calculated\nusing this formula:\n\n16 * (trunc(string_length / 16) + 1)\n\nIf AES_DECRYPT() detects invalid data or incorrect padding, it returns\nNULL. However, it is possible for AES_DECRYPT() to return a non-NULL\nvalue (possibly garbage) if the input data or the key is invalid.\n\nYou can use the AES functions to store data in an encrypted form by\nmodifying your queries:\n\nURL: https://mariadb.com/kb/en/aes_encrypt/\n\n','INSERT INTO t VALUES (1,AES_ENCRYPT(\'text\',\'password\'));\n','https://mariadb.com/kb/en/aes_encrypt/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (444,4,'+','Syntax:\n+\n\nAddition:\n\nURL: https://mariadb.com/kb/en/addition-operator/\n\n','MariaDB> SELECT 3+5;\n -> 8\n','https://mariadb.com/kb/en/addition-operator/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (445,14,'INET_NTOA','Syntax:\nINET_NTOA(expr)\n\nGiven a numeric IPv4 network address in network byte order, returns the\ndotted-quad representation of the address as a string. INET_NTOA()\nreturns NULL if it does not understand its argument.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: https://mariadb.com/kb/en/inet_ntoa/\n\n','MariaDB> SELECT INET_NTOA(167773449);\n -> \'10.0.5.9\'\n','https://mariadb.com/kb/en/inet_ntoa/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (446,4,'ACOS','Syntax:\nACOS(X)\n\nReturns the arc cosine of X, that is, the value whose cosine is X.\nReturns NULL if X is not in the range -1 to 1.\n\nURL: https://mariadb.com/kb/en/acos/\n\n','MariaDB> SELECT ACOS(1);\n -> 0\nMariaDB> SELECT ACOS(1.0001);\n -> NULL\nMariaDB> SELECT ACOS(0);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/acos/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (447,8,'ISOLATION','Syntax:\nSET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL\n {\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n }\n\nThis statement sets the transaction isolation level, used for\noperations on InnoDB tables.\n\nScope of the Isolation Level\n\nYou can set the isolation level globally, for the current session, or\nfor the next transaction:\n\no With the GLOBAL keyword, the statement sets the default transaction\n level globally for all subsequent sessions. Existing sessions are\n unaffected.\n\no With the SESSION keyword, the statement sets the default transaction\n level for all subsequent transactions performed within the current\n session.\n\no Without any SESSION or GLOBAL keyword, the statement sets the\n isolation level for the next (not started) transaction performed\n within the current session.\n\nA change to the global default isolation level requires the SUPER\nprivilege. Any session is free to change its session isolation level\n(even in the middle of a transaction), or the isolation level for its\nnext transaction.\n\nSET TRANSACTION ISOLATION LEVEL without GLOBAL or SESSION is not\npermitted while there is an active transaction:\n\nMariaDB> START TRANSACTION;\nQuery OK, 0 rows affected (0.02 sec)\n\nMariaDB> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction isolation level can\'t be changed\nwhile a transaction is in progress\n\nTo set the global default isolation level at server startup, use the\n--transaction-isolation=level option to mysqld on the command line or\nin an option file. Values of level for this option use dashes rather\nthan spaces, so the permissible values are READ-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. For example, to set\nthe default isolation level to REPEATABLE READ, use these lines in the\n[mysqld] section of an option file:\n\n[mysqld]\ntransaction-isolation = REPEATABLE-READ\n\nIt is possible to check or set the global and session transaction\nisolation levels at runtime by using the tx_isolation system variable:\n\nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\nSET GLOBAL tx_isolation=\'REPEATABLE-READ\';\nSET SESSION tx_isolation=\'SERIALIZABLE\';\n\nDetails and Usage of Isolation Levels\n\nInnoDB supports each of the transaction isolation levels described here\nusing different locking strategies. You can enforce a high degree of\nconsistency with the default REPEATABLE READ level, for operations on\ncrucial data where ACID compliance is important. Or you can relax the\nconsistency rules with READ COMMITTED or even READ UNCOMMITTED, in\nsituations such as bulk reporting where precise consistency and\nrepeatable results are less important than minimizing the amount of\noverhead for locking. SERIALIZABLE enforces even stricter rules than\nREPEATABLE READ, and is used mainly in specialized situations, such as\nwith XA transactions and for troubleshooting issues with concurrency\nand deadlocks.\n\nFor full information about how these isolation levels work with InnoDB\ntransactions, see\nhttp://dev.mysql.com/doc/refman/5.1/en/innodb-transaction-model.html.\nIn particular, for additional information about InnoDB record-level\nlocks and how it uses them to execute various types of statements, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-record-level-locks.html\nand http://dev.mysql.com/doc/refman/5.5/en/innodb-locks-set.html.\n\nThe following list describes how MySQL supports the different\ntransaction levels. The list goes from the most commonly used level to\nthe least used.\n\no REPEATABLE READ\n\n This is the default isolation level for InnoDB. For consistent reads,\n there is an important difference from the READ COMMITTED isolation\n level: All consistent reads within the same transaction read the\n snapshot established by the first read. This convention means that if\n you issue several plain (nonlocking) SELECT statements within the\n same transaction, these SELECT statements are consistent also with\n respect to each other. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n UPDATE, and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition, or a\n range-type search condition. For a unique index with a unique search\n condition, InnoDB locks only the index record found, not the gap\n before it. For other search conditions, InnoDB locks the index range\n scanned, using gap locks or next-key (gap plus index-record) locks to\n block insertions by other sessions into the gaps covered by the\n range.\n\no READ COMMITTED\n\n A somewhat Oracle-like isolation level with respect to consistent\n (nonlocking) reads: Each consistent read, even within the same\n transaction, sets and reads its own fresh snapshot. See\n http://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html.\n\n For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE),\n InnoDB locks only index records, not the gaps before them, and thus\n permits the free insertion of new records next to locked records. For\n UPDATE and DELETE statements, locking depends on whether the\n statement uses a unique index with a unique search condition (such as\n WHERE id = 100), or a range-type search condition (such as WHERE id >\n 100). For a unique index with a unique search condition, InnoDB locks\n only the index record found, not the gap before it. For range-type\n searches, InnoDB locks the index range scanned, using gap locks or\n next-key (gap plus index-record) locks to block insertions by other\n sessions into the gaps covered by the range. This is necessary\n because "phantom rows" must be blocked for MySQL replication and\n recovery to work.\n\n *Note*: In MySQL 5.5, if the READ COMMITTED isolation level is used\n or the innodb_locks_unsafe_for_binlog system variable is enabled,\n there is no InnoDB gap locking except for foreign-key constraint\n checking and duplicate-key checking. Also, record locks for\n nonmatching rows are released after MySQL has evaluated the WHERE\n condition. If you use READ COMMITTED or enable\n innodb_locks_unsafe_for_binlog, you must use row-based binary\n logging.\n\no READ UNCOMMITTED\n\n SELECT statements are performed in a nonlocking fashion, but a\n possible earlier version of a row might be used. Thus, using this\n isolation level, such reads are not consistent. This is also called a\n "dirty read." Otherwise, this isolation level works like READ\n COMMITTED.\n\no SERIALIZABLE\n\n This level is like REPEATABLE READ, but InnoDB implicitly converts\n all plain SELECT statements to SELECT ... LOCK IN SHARE MODE if\n autocommit is disabled. If autocommit is enabled, the SELECT is its\n own transaction. It therefore is known to be read only and can be\n serialized if performed as a consistent (nonlocking) read and need\n not block for other transactions. (To force a plain SELECT to block\n if other transactions have modified the selected rows, disable\n autocommit.)\n\nURL: https://mariadb.com/kb/en/set-transaction-isolation-level/\n\n','','https://mariadb.com/kb/en/set-transaction-isolation-level/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (448,4,'CEILING','Syntax:\nCEILING(X)\n\nReturns the smallest integer value not less than X.\n\nURL: https://mariadb.com/kb/en/ceiling/\n\n','MariaDB> SELECT CEILING(1.23);\n -> 2\nMariaDB> SELECT CEILING(-1.23);\n -> -1\n','https://mariadb.com/kb/en/ceiling/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (449,4,'SIN','Syntax:\nSIN(X)\n\nReturns the sine of X, where X is given in radians.\n\nURL: https://mariadb.com/kb/en/sin/\n\n','MariaDB> SELECT SIN(PI());\n -> 1.2246063538224e-16\nMariaDB> SELECT ROUND(SIN(PI()));\n -> 0\n','https://mariadb.com/kb/en/sin/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (450,31,'DAYOFWEEK','Syntax:\nDAYOFWEEK(date)\n\nReturns the weekday index for date (1 = Sunday, 2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC standard.\n\nURL: https://mariadb.com/kb/en/dayofweek/\n\n','MariaDB> SELECT DAYOFWEEK(\'2007-02-03\');\n -> 7\n','https://mariadb.com/kb/en/dayofweek/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (451,26,'SHOW PROCESSLIST','Syntax:\nSHOW [FULL] PROCESSLIST\n\nSHOW PROCESSLIST shows you which threads are running. You can also get\nthis information from the INFORMATION_SCHEMA PROCESSLIST table or the\nmysqladmin processlist command. If you have the PROCESS privilege, you\ncan see all threads. Otherwise, you can see only your own threads (that\nis, threads associated with the MySQL account that you are using). If\nyou do not use the FULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n\nURL: https://mariadb.com/kb/en/show-processlist/\n\n','','https://mariadb.com/kb/en/show-processlist/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (452,32,'LINEFROMWKB','LineFromWKB(wkb[,srid]), LineStringFromWKB(wkb[,srid])\n\nConstructs a LINESTRING value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/linefromwkb/\n\n','','https://mariadb.com/kb/en/linefromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (453,36,'GEOMETRYTYPE','GeometryType(g)\n\nReturns as a binary string the name of the geometry type of which the\ngeometry instance g is a member. The name corresponds to one of the\ninstantiable Geometry subclasses.\n\nURL: https://mariadb.com/kb/en/geometrytype/\n\n','MariaDB> SELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n','https://mariadb.com/kb/en/geometrytype/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (454,39,'CREATE VIEW','Syntax:\nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThe CREATE VIEW statement creates a new view, or replaces an existing\none if the OR REPLACE clause is given. If the view does not exist,\nCREATE OR REPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR REPLACE VIEW is the same as ALTER VIEW.\n\nThe select_statement is a SELECT statement that provides the definition\nof the view. (When you select from the view, you select in effect using\nthe SELECT statement.) select_statement can select from base tables or\nother views.\n\nThe view definition is "frozen" at creation time, so changes to the\nunderlying tables afterward do not affect the view definition. For\nexample, if a view is defined as SELECT * on a table, new columns added\nto the table later do not become part of the view.\n\nThe ALGORITHM clause affects how MySQL processes the view. The DEFINER\nand SQL SECURITY clauses specify the security context to be used when\nchecking access privileges at view invocation time. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates to rows in\ntables referenced by the view. These clauses are described later in\nthis section.\n\nThe CREATE VIEW statement requires the CREATE VIEW privilege for the\nview, and some privilege for each column selected by the SELECT\nstatement. For columns used elsewhere in the SELECT statement you must\nhave the SELECT privilege. If the OR REPLACE clause is present, you\nmust also have the DROP privilege for the view. CREATE VIEW might also\nrequire the SUPER privilege, depending on the DEFINER value, as\ndescribed later in this section.\n\nWhen a view is referenced, privilege checking occurs as described later\nin this section.\n\nA view belongs to a database. By default, a new view is created in the\ndefault database. To create the view explicitly in a given database,\nspecify the name as db_name.view_name when you create it:\n\nMariaDB> CREATE VIEW test.v AS SELECT * FROM t;\n\nWithin a database, base tables and views share the same namespace, so a\nbase table and a view cannot have the same name.\n\nColumns retrieved by the SELECT statement can be simple references to\ntable columns. They can also be expressions that use functions,\nconstant values, operators, and so forth.\n\nViews must have unique column names with no duplicates, just like base\ntables. By default, the names of the columns retrieved by the SELECT\nstatement are used for the view column names. To define explicit names\nfor the view columns, the optional column_list clause can be given as a\nlist of comma-separated identifiers. The number of names in column_list\nmust be the same as the number of columns retrieved by the SELECT\nstatement.\n\nUnqualified table or view names in the SELECT statement are interpreted\nwith respect to the default database. A view can refer to tables or\nviews in other databases by qualifying the table or view name with the\nproper database name.\n\nA view can be created from many kinds of SELECT statements. It can\nrefer to base tables or other views. It can use joins, UNION, and\nsubqueries. The SELECT need not even refer to any tables. The following\nexample defines a view that selects two columns from another table, as\nwell as an expression calculated from those columns:\n\nMariaDB> CREATE TABLE t (qty INT, price INT);\nMariaDB> INSERT INTO t VALUES(3, 50);\nMariaDB> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;\nMariaDB> SELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n\nA view definition is subject to the following restrictions:\n\no The SELECT statement cannot contain a subquery in the FROM clause.\n\no The SELECT statement cannot refer to system or user variables.\n\no Within a stored program, the definition cannot refer to program\n parameters or local variables.\n\no The SELECT statement cannot refer to prepared statement parameters.\n\no Any table or view referred to in the definition must exist. However,\n after a view has been created, it is possible to drop a table or view\n that the definition refers to. In this case, use of the view results\n in an error. To check a view definition for problems of this kind,\n use the CHECK TABLE statement.\n\no The definition cannot refer to a TEMPORARY table, and you cannot\n create a TEMPORARY view.\n\no Any tables named in the view definition must exist at definition\n time.\n\no You cannot associate a trigger with a view.\n\no Aliases for column names in the SELECT statement are checked against\n the maximum column length of 64 characters (not the maximum alias\n length of 256 characters).\n\nORDER BY is permitted in a view definition, but it is ignored if you\nselect from a view using a statement that has its own ORDER BY.\n\nFor other options or clauses in the definition, they are added to the\noptions or clauses of the statement that references the view, but the\neffect is undefined. For example, if a view definition includes a LIMIT\nclause, and you select from the view using a statement that has its own\nLIMIT clause, it is undefined which limit applies. This same principle\napplies to options such as ALL, DISTINCT, or SQL_SMALL_RESULT that\nfollow the SELECT keyword, and to clauses such as INTO, FOR UPDATE,\nLOCK IN SHARE MODE, and PROCEDURE.\n\nIf you create a view and then change the query processing environment\nby changing system variables, that may affect the results that you get\nfrom the view:\n\nMariaDB> CREATE VIEW v (mycol) AS SELECT \'abc\';\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SET sql_mode = \'\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT "mycol" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol |\n+-------+\n1 row in set (0.01 sec)\n\nMariaDB> SET sql_mode = \'ANSI_QUOTES\';\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SELECT "mycol" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc |\n+-------+\n1 row in set (0.00 sec)\n\nThe DEFINER and SQL SECURITY clauses determine which MySQL account to\nuse when checking access privileges for the view when a statement is\nexecuted that references the view. The valid SQL SECURITY\ncharacteristic values are DEFINER and INVOKER. These indicate that the\nrequired privileges must be held by the user who defined or invoked the\nview, respectively. The default SQL SECURITY value is DEFINER.\n\nIf a user value is given for the DEFINER clause, it should be a MySQL\naccount specified as \'user_name\'@\'host_name\' (the same format used in\nthe GRANT statement), CURRENT_USER, or CURRENT_USER(). The default\nDEFINER value is the user who executes the CREATE VIEW statement. This\nis the same as specifying DEFINER = CURRENT_USER explicitly.\n\nIf you specify the DEFINER clause, these rules determine the valid\nDEFINER user values:\n\no If you do not have the SUPER privilege, the only valid user value is\n your own account, either specified literally or by using\n CURRENT_USER. You cannot set the definer to some other account.\n\no If you have the SUPER privilege, you can specify any syntactically\n valid account name. If the account does not actually exist, a warning\n is generated.\n\no Although it is possible to create a view with a nonexistent DEFINER\n account, an error occurs when the view is referenced if the SQL\n SECURITY value is DEFINER but the definer account does not exist.\n\nFor more information about view security, see\nhttps://mariadb.com/kb/en/stored-routine-privileges/.\n\nWithin a view definition, CURRENT_USER returns the view\'s DEFINER value\nby default. For views defined with the SQL SECURITY INVOKER\ncharacteristic, CURRENT_USER returns the account for the view\'s\ninvoker. For information about user auditing within views, see\nhttp://dev.mysql.com/doc/refman/5.5/en/account-activity-auditing.html.\n\nWithin a stored routine that is defined with the SQL SECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER value. This\nalso affects a view defined within such a routine, if the view\ndefinition contains a DEFINER value of CURRENT_USER.\n\nView privileges are checked like this:\n\no At view definition time, the view creator must have the privileges\n needed to use the top-level objects accessed by the view. For\n example, if the view definition refers to table columns, the creator\n must have some privilege for each column in the select list of the\n definition, and the SELECT privilege for each column used elsewhere\n in the definition. If the definition refers to a stored function,\n only the privileges needed to invoke the function can be checked. The\n privileges required at function invocation time can be checked only\n as it executes: For different invocations, different execution paths\n within the function might be taken.\n\no The user who references a view must have appropriate privileges to\n access it (SELECT to select from it, INSERT to insert into it, and so\n forth.)\n\no When a view has been referenced, privileges for objects accessed by\n the view are checked against the privileges held by the view DEFINER\n account or invoker, depending on whether the SQL SECURITY\n characteristic is DEFINER or INVOKER, respectively.\n\no If reference to a view causes execution of a stored function,\n privilege checking for statements executed within the function depend\n on whether the function SQL SECURITY characteristic is DEFINER or\n INVOKER. If the security characteristic is DEFINER, the function runs\n with the privileges of the DEFINER account. If the characteristic is\n INVOKER, the function runs with the privileges determined by the\n view\'s SQL SECURITY characteristic.\n\nExample: A view might depend on a stored function, and that function\nmight invoke other stored routines. For example, the following view\ninvokes a stored function f():\n\nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n\nSuppose that f() contains a statement such as this:\n\nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n\nThe privileges required for executing statements within f() need to be\nchecked when f() executes. This might mean that privileges are needed\nfor p1() or p2(), depending on the execution path within f(). Those\nprivileges must be checked at runtime, and the user who must possess\nthe privileges is determined by the SQL SECURITY values of the view v\nand the function f().\n\nThe DEFINER and SQL SECURITY clauses for views are extensions to\nstandard SQL. In standard SQL, views are handled using the rules for\nSQL SECURITY DEFINER. The standard says that the definer of the view,\nwhich is the same as the owner of the view\'s schema, gets applicable\nprivileges on the view (for example, SELECT) and may grant them. MySQL\nhas no concept of a schema "owner", so MySQL adds a clause to identify\nthe definer. The DEFINER clause is an extension where the intent is to\nhave what the standard has; that is, a permanent record of who defined\nthe view. This is why the default DEFINER value is the account of the\nview creator.\n\nThe optional ALGORITHM clause is a MySQL extension to standard SQL. It\naffects how MySQL processes the view. ALGORITHM takes three values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is UNDEFINED if\nno ALGORITHM clause is present. For more information, see\nhttps://mariadb.com/kb/en/view-algorithms/.\n\nSome views are updatable. That is, you can use them in statements such\nas UPDATE, DELETE, or INSERT to update the contents of the underlying\ntable. For a view to be updatable, there must be a one-to-one\nrelationship between the rows in the view and the rows in the\nunderlying table. There are also certain other constructs that make a\nview nonupdatable.\n\nThe WITH CHECK OPTION clause can be given for an updatable view to\nprevent inserts or updates to rows except those for which the WHERE\nclause in the select_statement is true.\n\nIn a WITH CHECK OPTION clause for an updatable view, the LOCAL and\nCASCADED keywords determine the scope of check testing when the view is\ndefined in terms of another view. The LOCAL keyword restricts the CHECK\nOPTION only to the view being defined. CASCADED causes the checks for\nunderlying views to be evaluated as well. When neither keyword is\ngiven, the default is CASCADED.\n\nFor more information about updatable views and the WITH CHECK OPTION\nclause, see\nhttps://mariadb.com/kb/en/inserting-and-updating-with-views/.\n\nURL: https://mariadb.com/kb/en/create-view/\n\n','','https://mariadb.com/kb/en/create-view/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (455,37,'TRIM','Syntax:\nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr\nFROM] str)\n\nReturns the string str with all remstr prefixes or suffixes removed. If\nnone of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is\nassumed. remstr is optional and, if not specified, spaces are removed.\n\nURL: https://mariadb.com/kb/en/trim/\n\n','MariaDB> SELECT TRIM(\' bar \');\n -> \'bar\'\nMariaDB> SELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\');\n -> \'barxxx\'\nMariaDB> SELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\');\n -> \'bar\'\nMariaDB> SELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\');\n -> \'barx\'\n','https://mariadb.com/kb/en/trim/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (456,18,'IS','Syntax:\nIS boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: https://mariadb.com/kb/en/is/\n\n','MariaDB> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n -> 1, 1, 1\n','https://mariadb.com/kb/en/is/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (457,31,'GET_FORMAT','Syntax:\nGET_FORMAT({DATE|TIME|DATETIME}, {\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n\nReturns a format string. This function is useful in combination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n\nURL: https://mariadb.com/kb/en/get_format/\n\n','MariaDB> SELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n -> \'03.10.2003\'\nMariaDB> SELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n -> \'2003-10-31\'\n','https://mariadb.com/kb/en/get_format/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (458,22,'TINYBLOB','TINYBLOB\n\nA BLOB column with a maximum length of 255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a 1-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/tinyblob/\n\n','','https://mariadb.com/kb/en/tinyblob/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (459,23,'SIGNAL','Syntax:\nSIGNAL condition_value\n [SET signal_information_item\n [, signal_information_item] ...]\n\ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n\nsignal_information_item:\n condition_information_item_name = simple_value_specification\n\ncondition_information_item_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n\ncondition_name, simple_value_specification:\n (see following discussion)\n\nSIGNAL is the way to "return" an error. SIGNAL provides error\ninformation to a handler, to an outer portion of the application, or to\nthe client. Also, it provides control over the error\'s characteristics\n(error number, SQLSTATE value, message). Without SIGNAL, it is\nnecessary to resort to workarounds such as deliberately referring to a\nnonexistent table to cause a routine to return an error.\n\nNo special privileges are required to execute the SIGNAL statement.\n\nThe condition_value in a SIGNAL statement indicates the error value to\nbe returned. It can be an SQLSTATE value (a 5-character string literal)\nor a condition_name that refers to a named condition previously defined\nwith DECLARE ... CONDITION (see [HELP DECLARE CONDITION]).\n\nAn SQLSTATE value can indicate errors, warnings, or "not found." The\nfirst two characters of the value indicate its error class, as\ndiscussed in\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items. Some signal values cause statement termination; see\nhttps://mariadb.com/kb/en/signal/#signal-effects.\n\nThe SQLSTATE value for a SIGNAL statement should not start with \'00\'\nbecause such values indicate success and are not valid for signaling an\nerror. This is true whether the SQLSTATE value is specified directly in\nthe SIGNAL statement or in a named condition referred to in the\nstatement. If the value is invalid, a Bad SQLSTATE error occurs.\n\nTo signal a generic SQLSTATE value, use \'45000\', which means "unhandled\nuser-defined exception."\n\nThe SIGNAL statement optionally includes a SET clause that contains\nmultiple signal items, in a comma-separated list of\ncondition_information_item_name = simple_value_specification\nassignments.\n\nEach condition_information_item_name may be specified only once in the\nSET clause. Otherwise, a Duplicate condition information item error\noccurs.\n\nValid simple_value_specification designators can be specified using\nstored procedure or function parameters, stored program local variables\ndeclared with DECLARE, user-defined variables, system variables, or\nliterals. A character literal may include a _charset introducer.\n\nFor information about permissible condition_information_item_name\nvalues, see\nhttps://mariadb.com/kb/en/signal/#signal-condition-inf\normation-items.\n\nURL: https://mariadb.com/kb/en/signal/\n\n','CREATE PROCEDURE p (pval INT)\nBEGIN\n DECLARE specialty CONDITION FOR SQLSTATE \'45000\';\n IF pval = 0 THEN\n SIGNAL SQLSTATE \'01000\';\n ELSEIF pval = 1 THEN\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSEIF pval = 2 THEN\n SIGNAL specialty\n SET MESSAGE_TEXT = \'An error occurred\';\n ELSE\n SIGNAL SQLSTATE \'01000\'\n SET MESSAGE_TEXT = \'A warning occurred\', MYSQL_ERRNO = 1000;\n SIGNAL SQLSTATE \'45000\'\n SET MESSAGE_TEXT = \'An error occurred\', MYSQL_ERRNO = 1001;\n END IF;\nEND;\n','https://mariadb.com/kb/en/signal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (460,8,'SAVEPOINT','Syntax:\nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n\nInnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO SAVEPOINT,\nRELEASE SAVEPOINT and the optional WORK keyword for ROLLBACK.\n\nURL: https://mariadb.com/kb/en/savepoint/\n\n','','https://mariadb.com/kb/en/savepoint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (461,17,'USER','Syntax:\nUSER()\n\nReturns the current MySQL user name and host name as a string in the\nutf8 character set.\n\nURL: https://mariadb.com/kb/en/user/\n\n','MariaDB> SELECT USER();\n -> \'davida@localhost\'\n','https://mariadb.com/kb/en/user/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (462,23,'LABELS','Syntax:\n[begin_label:] BEGIN\n [statement_list]\nEND [end_label]\n\n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n\n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nLabels are permitted for BEGIN ... END blocks and for the LOOP, REPEAT,\nand WHILE statements. Label use for those statements follows these\nrules:\n\no begin_label must be followed by a colon.\n\no begin_label can be given without end_label. If end_label is present,\n it must be the same as begin_label.\n\no end_label cannot be given without begin_label.\n\no Labels at the same nesting level must be distinct.\n\no Labels can be up to 16 characters long.\n\nTo refer to a label within the labeled construct, use an ITERATE or\nLEAVE statement. The following example uses those statements to\ncontinue iterating or terminate the loop:\n\nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n IF p1 < 10 THEN ITERATE label1; END IF;\n LEAVE label1;\n END LOOP label1;\nEND;\n\nThe scope of a block label does not include the code for handlers\ndeclared within the block. For details, see [HELP DECLARE HANDLER].\n\nURL: https://mariadb.com/kb/en/labels/\n\n','','https://mariadb.com/kb/en/labels/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (463,39,'ALTER TABLE','Syntax:\nALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name\n [alter_specification [, alter_specification] ...]\n [partition_options]\n\nalter_specification:\n table_options\n | ADD [COLUMN] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] (col_name column_definition,...)\n | ADD {INDEX|KEY} [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [index_name] (index_col_name,...)\n reference_definition\n | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}\n | CHANGE [COLUMN] old_col_name new_col_name column_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] col_name\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} index_name\n | DROP FOREIGN KEY fk_symbol\n | MAX_ROWS = rows\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO|AS] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | FORCE\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | TRUNCATE PARTITION {partition_names | ALL}\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO (partition_definitions)]\n | ANALYZE PARTITION {partition_names | ALL}\n | CHECK PARTITION {partition_names | ALL}\n | OPTIMIZE PARTITION {partition_names | ALL}\n | REBUILD PARTITION {partition_names | ALL}\n | REPAIR PARTITION {partition_names | ALL}\n | PARTITION BY partitioning_expression\n | REMOVE PARTITIONING\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\ntable_options:\n table_option [[,] table_option] ... (see CREATE TABLE options)\n\npartition_options:\n (see CREATE TABLE options)\n\nALTER TABLE changes the structure of a table. For example, you can add\nor delete columns, create or destroy indexes, change the type of\nexisting columns, or rename columns or the table itself. You can also\nchange characteristics such as the storage engine used for the table or\nthe table comment.\n\nPartitioning-related clauses for ALTER TABLE can be used with\npartitioned tables for repartitioning, for adding, dropping, merging,\nand splitting partitions, and for performing partitioning maintenance.\nFor more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/alter-table-partition-operations\n.html.\n\nFollowing the table name, specify the alterations to be made. If none\nare given, ALTER TABLE does nothing.\n\nURL: https://mariadb.com/kb/en/alter-table/\n\n','','https://mariadb.com/kb/en/alter-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (464,32,'MPOINTFROMWKB','MPointFromWKB(wkb[,srid]), MultiPointFromWKB(wkb[,srid])\n\nConstructs a MULTIPOINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/mpointfromwkb/\n\n','','https://mariadb.com/kb/en/mpointfromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (465,22,'CHAR BYTE','The CHAR BYTE data type is an alias for the BINARY data type. This is a\ncompatibility feature.\n\nURL: https://mariadb.com/kb/en/char-byte/\n\n','','https://mariadb.com/kb/en/char-byte/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (466,20,'REPAIR TABLE','Syntax:\nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n\nREPAIR TABLE repairs a possibly corrupted table. By default, it has the\nsame effect as myisamchk --recover tbl_name. REPAIR TABLE works for\nMyISAM, ARCHIVE, and CSV tables. See\nhttps://mariadb.com/kb/en/myisam-storage-engine/, and\nhttps://mariadb.com/kb/en/archive/, and\nhttps://mariadb.com/kb/en/csv/\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nREPAIR TABLE is supported for partitioned tables. However, the USE_FRM\noption cannot be used with this statement on a partitioned table.\n\nYou can use ALTER TABLE ... REPAIR PARTITION to repair one or more\npartitions; for more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/repair-table/\n\n','','https://mariadb.com/kb/en/repair-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (467,39,'MERGE','The MERGE storage engine, also known as the MRG_MyISAM engine, is a\ncollection of identical MyISAM tables that can be used as one.\n"Identical" means that all tables have identical column and index\ninformation. You cannot merge MyISAM tables in which the columns are\nlisted in a different order, do not have exactly the same columns, or\nhave the indexes in different order. However, any or all of the MyISAM\ntables can be compressed with myisampack. See\nhttps://mariadb.com/kb/en/myisampack/. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS do not\nmatter.\n\nURL: https://mariadb.com/kb/en/merge/\n\n','MariaDB> CREATE TABLE t1 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> CREATE TABLE t2 (\n -> a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> message CHAR(20)) ENGINE=MyISAM;\nMariaDB> INSERT INTO t1 (message) VALUES (\'Testing\'),(\'table\'),(\'t1\');\nMariaDB> INSERT INTO t2 (message) VALUES (\'Testing\'),(\'table\'),(\'t2\');\nMariaDB> CREATE TABLE total (\n -> a INT NOT NULL AUTO_INCREMENT,\n -> message CHAR(20), INDEX(a))\n -> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n','https://mariadb.com/kb/en/merge/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (468,39,'CREATE TABLE','Syntax:\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n (create_definition,...)\n [table_options]\n [partition_options]\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n [(create_definition,...)]\n [table_options]\n [partition_options]\n select_statement\n\nOr:\n\nCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name\n { LIKE old_tbl_name | (LIKE old_tbl_name) }\n\ncreate_definition:\n col_name column_definition\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...)\n [index_option] ...\n | {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY]\n [index_name] [index_type] (index_col_name,...)\n [index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...)\n [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name,...) reference_definition\n | CHECK (expr)\n\ncolumn_definition:\n data_type [NOT NULL | NULL] [DEFAULT default_value]\n [AUTO_INCREMENT] [UNIQUE [KEY] | [PRIMARY] KEY]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [STORAGE {DISK|MEMORY|DEFAULT}]\n [reference_definition]\n\ndata_type:\n BIT[(length)]\n | TINYINT[(length)] [UNSIGNED] [ZEROFILL]\n | SMALLINT[(length)] [UNSIGNED] [ZEROFILL]\n | MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]\n | INT[(length)] [UNSIGNED] [ZEROFILL]\n | INTEGER[(length)] [UNSIGNED] [ZEROFILL]\n | BIGINT[(length)] [UNSIGNED] [ZEROFILL]\n | REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]\n | DECIMAL[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | NUMERIC[(length[,decimals])] [UNSIGNED] [ZEROFILL]\n | DATE\n | TIME\n | TIMESTAMP\n | DATETIME\n | YEAR\n | CHAR[(length)]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | VARCHAR(length)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | BINARY[(length)]\n | VARBINARY(length)\n | TINYBLOB\n | BLOB\n | MEDIUMBLOB\n | LONGBLOB\n | TINYTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | TEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | MEDIUMTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | LONGTEXT [BINARY]\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | ENUM(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | SET(value1,value2,value3,...)\n [CHARACTER SET charset_name] [COLLATE collation_name]\n | spatial_type\n\nindex_col_name:\n col_name [(length)] [ASC | DESC]\n\nindex_type:\n USING {BTREE | HASH}\n\nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n\nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\ntable_options:\n table_option [[,] table_option] ...\n\ntable_option:\n ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=] {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT}\n | TABLESPACE tablespace_name [STORAGE {DISK|MEMORY|DEFAULT}]\n | UNION [=] (tbl_name[,tbl_name]...)\n\npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE{(expr) | COLUMNS(column_list)}\n | LIST{(expr) | COLUMNS(column_list)} }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n\npartition_definition:\n PARTITION partition_name\n [VALUES \n {LESS THAN {(expr | value_list) | MAXVALUE} \n | \n IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n\nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n\nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some valid select statement)\n\nCREATE TABLE creates a table with the given name. You must have the\nCREATE privilege for the table.\n\nRules for permissible table names are given in\nhttps://mariadb.com/kb/en/identifier-names/. By default,\nthe table is created in the default database, using the InnoDB storage\nengine. An error occurs if the table exists, if there is no default\ndatabase, or if the database does not exist.\n\nURL: https://mariadb.com/kb/en/create-table/\n\n','','https://mariadb.com/kb/en/create-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (469,18,'>','Syntax:\n>\n\nGreater than:\n\nURL: https://mariadb.com/kb/en/greater-than/\n\n','MariaDB> SELECT 2 > 2;\n -> 0\n','https://mariadb.com/kb/en/greater-than/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (470,20,'ANALYZE TABLE','Syntax:\nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n\nANALYZE TABLE analyzes and stores the key distribution for a table.\nDuring the analysis, the table is locked with a read lock for InnoDB\nand MyISAM. This statement works with InnoDB, Aria and MyISAM tables.\nFor MyISAM tables, this statement is equivalent to using myisamchk\n--analyze.\n\nFor more information on how the analysis works within InnoDB, see\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html.\n\nMySQL uses the stored key distribution to decide the order in which\ntables should be joined when you perform a join on something other than\na constant. In addition, key distributions can be used when deciding\nwhich indexes to use for a specific table within a query.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nANALYZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... ANALYZE PARTITION to analyze one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: https://mariadb.com/kb/en/analyze-table/\n\n','','https://mariadb.com/kb/en/analyze-table/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (471,31,'MICROSECOND','Syntax:\nMICROSECOND(expr)\n\nReturns the microseconds from the time or datetime expression expr as a\nnumber in the range from 0 to 999999.\n\nURL: https://mariadb.com/kb/en/microsecond/\n\n','MariaDB> SELECT MICROSECOND(\'12:00:00.123456\');\n -> 123456\nMariaDB> SELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n -> 10\n','https://mariadb.com/kb/en/microsecond/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (472,39,'CONSTRAINT','InnoDB supports foreign keys, which let you cross-reference related\ndata across tables, and foreign key constraints, which help keep this\nspread-out data consistent. The syntax for an InnoDB foreign key\nconstraint definition in the CREATE TABLE or ALTER TABLE statement\nlooks like this:\n\n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n\nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n\nURL: https://mariadb.com/kb/en/constraint/\n\n','CREATE TABLE product (category INT NOT NULL, id INT NOT NULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n','https://mariadb.com/kb/en/constraint/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (473,39,'CREATE SERVER','Syntax:\nCREATE SERVER server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n\noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n\nThis statement creates the definition of a server for use with the\nFEDERATED storage engine. The CREATE SERVER statement creates a new row\nwithin the servers table within the mysql database. This statement\nrequires the SUPER privilege.\n\nThe server_name should be a unique reference to the server. Server\ndefinitions are global within the scope of the server, it is not\npossible to qualify the server definition to a specific database.\nserver_name has a maximum length of 64 characters (names longer than 64\ncharacters are silently truncated), and is case insensitive. You may\nspecify the name as a quoted string.\n\nThe wrapper_name should be mysql, and may be quoted with single\nquotation marks. Other values for wrapper_name are not currently\nsupported.\n\nFor each option you must specify either a character literal or numeric\nliteral. Character literals are UTF-8, support a maximum length of 64\ncharacters and default to a blank (empty) string. String literals are\nsilently truncated to 64 characters. Numeric literals must be a number\nbetween 0 and 9999, default value is 0.\n\n*Note*: Note that the OWNER option is currently not applied, and has no\neffect on the ownership or operation of the server connection that is\ncreated.\n\nThe CREATE SERVER statement creates an entry in the mysql.servers table\nthat can later be used with the CREATE TABLE statement when creating a\nFEDERATED table. The options that you specify will be used to populate\nthe columns in the mysql.servers table. The table columns are\nServer_name, Host, Db, Username, Password, Port and Socket.\n\nURL: https://mariadb.com/kb/en/create-server/\n\n','CREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE \'test\');\n','https://mariadb.com/kb/en/create-server/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (474,37,'FIELD','Syntax:\nFIELD(str,str1,str2,str3,...)\n\nReturns the index (position) of str in the str1, str2, str3, ... list.\nReturns 0 if str is not found.\n\nIf all arguments to FIELD() are strings, all arguments are compared as\nstrings. If all arguments are numbers, they are compared as numbers.\nOtherwise, the arguments are compared as double.\n\nIf str is NULL, the return value is 0 because NULL fails equality\ncomparison with any value. FIELD() is the complement of ELT().\n\nURL: https://mariadb.com/kb/en/field/\n\n','MariaDB> SELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 2\nMariaDB> SELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\', \'foo\');\n -> 0\n','https://mariadb.com/kb/en/field/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (475,31,'MAKETIME','Syntax:\nMAKETIME(hour,minute,second)\n\nReturns a time value calculated from the hour, minute, and second\narguments.\n\nURL: https://mariadb.com/kb/en/maketime/\n\n','MariaDB> SELECT MAKETIME(12,15,30);\n -> \'12:15:30\'\n','https://mariadb.com/kb/en/maketime/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (476,31,'CURDATE','Syntax:\nCURDATE()\n\nReturns the current date as a value in \'YYYY-MM-DD\' or YYYYMMDD format,\ndepending on whether the function is used in a string or numeric\ncontext.\n\nURL: https://mariadb.com/kb/en/curdate/\n\n','MariaDB> SELECT CURDATE();\n -> \'2008-06-13\'\nMariaDB> SELECT CURDATE() + 0;\n -> 20080613\n','https://mariadb.com/kb/en/curdate/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (477,10,'SET PASSWORD','Syntax:\nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'cleartext password\')\n | OLD_PASSWORD(\'cleartext password\')\n | \'encrypted password\'\n }\n\nThe SET PASSWORD statement assigns a password to an existing MySQL user\naccount. When the read_only system variable is enabled, the SUPER\nprivilege is required to use SET PASSWORD, in addition to whatever\nother privileges might be required.\n\nIf the password is specified using the PASSWORD() or OLD_PASSWORD()\nfunction, the cleartext (unencrypted) password should be given as the\nargument to the function, which hashes the password and returns the\nencrypted password string. If the password is specified without using\neither function, it should be the already encrypted password value as a\nliteral string. In all cases, the encrypted password string must be in\nthe format required by the authentication method used for the account.\n\nThe old_passwords system variable value determines the hashing method\nused by PASSWORD(). If you specify the password using that function and\nSET PASSWORD rejects the password as not being in the correct format,\nit may be necessary to set old_passwords to change the hashing method.\nFor descriptions of the permitted values, see\nhttps://mariadb.com/kb/en/server-system-variables#old_passwords.\n\nWith no FOR user clause, this statement sets the password for the\ncurrent user. (To see which account the server authenticated you as,\ninvoke the CURRENT_USER() function.) Any client who successfully\nconnects to the server using a nonanonymous account can change the\npassword for that account.\n\nWith a FOR user clause, this statement sets the password for the named\nuser. You must have the UPDATE privilege for the mysql database to do\nthis. The user account name uses the format described in\nhttps://mariadb.com/kb/en/create-user#account-names. The user\nvalue should be given as \'user_name\'@\'host_name\', where \'user_name\' and\n\'host_name\' are exactly as listed in the User and Host columns of the\nmysql.user table row. (If you specify only a user name, a host name of\n\'%\' is used.) For example, to set the password for an account with User\nand Host column values of \'bob\' and \'%.example.org\', write the\nstatement like this:\n\nSET PASSWORD FOR \'bob\'@\'%.example.org\' = PASSWORD(\'cleartext password\');\n\nURL: https://mariadb.com/kb/en/set-password/\n\n','','https://mariadb.com/kb/en/set-password/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (478,39,'ALTER TABLESPACE','Syntax:\nALTER TABLESPACE tablespace_name\n {ADD|DROP} DATAFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n\nThis statement is used with NDB cluster, which is not supported by MariaDB.\n\nURL: https://mariadb.com/kb/en/alter-tablespace/\n\n','','https://mariadb.com/kb/en/alter-tablespace/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (479,7,'IF FUNCTION','Syntax:\nIF(expr1,expr2,expr3)\n\nIf expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns\nexpr2; otherwise it returns expr3. IF() returns a numeric or string\nvalue, depending on the context in which it is used.\n\nURL: https://mariadb.com/kb/en/if-function/\n\n','MariaDB> SELECT IF(1>2,2,3);\n -> 3\nMariaDB> SELECT IF(1<2,\'yes\',\'no\');\n -> \'yes\'\nMariaDB> SELECT IF(STRCMP(\'test\',\'test1\'),\'no\',\'yes\');\n -> \'no\'\n','https://mariadb.com/kb/en/if-function/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (480,22,'ENUM','ENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nAn enumeration. A string object that can have only one value, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or the special \'\'\nerror value. An ENUM column can have a maximum of 65,535 distinct\nvalues. ENUM values are represented internally as integers.\n\nURL: https://mariadb.com/kb/en/enum/\n\n','','https://mariadb.com/kb/en/enum/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (481,17,'DATABASE','Syntax:\nDATABASE()\n\nReturns the default (current) database name as a string in the utf8\ncharacter set. If there is no default database, DATABASE() returns\nNULL. Within a stored routine, the default database is the database\nthat the routine is associated with, which is not necessarily the same\nas the database that is the default in the calling context.\n\nURL: https://mariadb.com/kb/en/database/\n\n','MariaDB> SELECT DATABASE();\n -> \'test\'\n','https://mariadb.com/kb/en/database/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (482,32,'POINTFROMWKB','PointFromWKB(wkb[,srid])\n\nConstructs a POINT value using its WKB representation and SRID.\n\nURL: https://mariadb.com/kb/en/pointfromwkb/\n\n','','https://mariadb.com/kb/en/pointfromwkb/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (483,4,'POWER','Syntax:\nPOWER(X,Y)\n\nThis is a synonym for POW().\n\nURL: https://mariadb.com/kb/en/power/\n\n','','https://mariadb.com/kb/en/power/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (484,4,'ATAN','Syntax:\nATAN(X)\n\nReturns the arc tangent of X, that is, the value whose tangent is X.\n\nURL: https://mariadb.com/kb/en/atan/\n\n','MariaDB> SELECT ATAN(2);\n -> 1.1071487177941\nMariaDB> SELECT ATAN(-2);\n -> -1.1071487177941\n','https://mariadb.com/kb/en/atan/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (485,37,'STRCMP','Syntax:\nSTRCMP(expr1,expr2)\n\nSTRCMP() returns 0 if the strings are the same, -1 if the first\nargument is smaller than the second according to the current sort\norder, and 1 otherwise.\n\nURL: https://mariadb.com/kb/en/strcmp/\n\n','MariaDB> SELECT STRCMP(\'text\', \'text2\');\n -> -1\nMariaDB> SELECT STRCMP(\'text2\', \'text\');\n -> 1\nMariaDB> SELECT STRCMP(\'text\', \'text\');\n -> 0\n','https://mariadb.com/kb/en/strcmp/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (486,27,'INSERT DELAYED','Syntax:\nINSERT DELAYED ...\n\nThe DELAYED option for the INSERT statement is a MySQL extension to\nstandard SQL that is very useful if you have clients that cannot or\nneed not wait for the INSERT to complete. This is a common situation\nwhen you use MySQL for logging and you also periodically run SELECT and\nUPDATE statements that take a long time to complete.\n\nWhen a client uses INSERT DELAYED, it gets an okay from the server at\nonce, and the row is queued to be inserted when the table is not in use\nby any other thread.\n\nAnother major benefit of using INSERT DELAYED is that inserts from many\nclients are bundled together and written in one block. This is much\nfaster than performing many separate inserts.\n\nNote that INSERT DELAYED is slower than a normal INSERT if the table is\nnot otherwise in use. There is also the additional overhead for the\nserver to handle a separate thread for each table for which there are\ndelayed rows. This means that you should use INSERT DELAYED only when\nyou are really sure that you need it.\n\nThe queued rows are held only in memory until they are inserted into\nthe table. This means that if you terminate mysqld forcibly (for\nexample, with kill -9) or if mysqld dies unexpectedly, any queued rows\nthat have not been written to disk are lost.\n\nThere are some constraints on the use of DELAYED:\n\no INSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE, and BLACKHOLE\n tables. For engines that do not support DELAYED, an error occurs.\n\no An error occurs for INSERT DELAYED if used with a table that has been\n locked with LOCK TABLES because the insert must be handled by a\n separate thread, not by the session that holds the lock.\n\no For MyISAM tables, if there are no free blocks in the middle of the\n data file, concurrent SELECT and INSERT statements are supported.\n Under these circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\n\no INSERT DELAYED should be used only for INSERT statements that specify\n value lists. The server ignores DELAYED for INSERT ... SELECT or\n INSERT ... ON DUPLICATE KEY UPDATE statements.\n\no Because the INSERT DELAYED statement returns immediately, before the\n rows are inserted, you cannot use LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\n\no DELAYED rows are not visible to SELECT statements until they actually\n have been inserted.\n\no Prior to MySQL 5.5.7, INSERT DELAYED was treated as a normal INSERT\n if the statement inserted multiple rows, binary logging was enabled,\n and the global logging format was statement-based (that is, whenever\n binlog_format was set to STATEMENT). Beginning with MySQL 5.5.7,\n INSERT DELAYED is always handled as a simple INSERT (that is, without\n the DELAYED option) whenever the value of binlog_format is STATEMENT\n or MIXED. (In the latter case, the statement no longer triggers a\n switch to row-based logging, and so is logged using the\n statement-based format.)\n\n This does not apply when using row-based binary logging mode\n (binlog_format set to ROW), in which INSERT DELAYED statements are\n always executed using the DELAYED option as specified, and logged as\n row-update events.\n\no DELAYED is ignored on slave replication servers, so that INSERT\n DELAYED is treated as a normal INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than the master.\n\no Pending INSERT DELAYED statements are lost if a table is write locked\n and ALTER TABLE is used to modify the table structure.\n\no INSERT DELAYED is not supported for views.\n\no INSERT DELAYED is not supported for partitioned tables.\n\nURL: https://mariadb.com/kb/en/insert-delayed/\n\n','','https://mariadb.com/kb/en/insert-delayed/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (487,26,'SHOW PROFILE','Syntax:\nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n\ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n\nThe SHOW PROFILE and SHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements executed\nduring the course of the current session.\n\nProfiling is controlled by the profiling session variable, which has a\ndefault value of 0 (OFF). Profiling is enabled by setting profiling to\n1 or ON:\n\nMariaDB> SET profiling = 1;\n\nSHOW PROFILES displays a list of the most recent statements sent to the\nserver. The size of the list is controlled by the\nprofiling_history_size session variable, which has a default value of\n15. The maximum value is 100. Setting the value to 0 has the practical\neffect of disabling profiling.\n\nAll statements are profiled except SHOW PROFILE and SHOW PROFILES, so\nyou will find neither of those statements in the profile list.\nMalformed statements are profiled. For example, SHOW PROFILING is an\nillegal statement, and a syntax error occurs if you try to execute it,\nbut it will show up in the profiling list.\n\nSHOW PROFILE displays detailed information about a single statement.\nWithout the FOR QUERY n clause, the output pertains to the most\nrecently executed statement. If FOR QUERY n is included, SHOW PROFILE\ndisplays information for statement n. The values of n correspond to the\nQuery_ID values displayed by SHOW PROFILES.\n\nThe LIMIT row_count clause may be given to limit the output to\nrow_count rows. If LIMIT is given, OFFSET offset may be added to begin\nthe output offset rows into the full set of rows.\n\nBy default, SHOW PROFILE displays Status and Duration columns. The\nStatus values are like the State values displayed by SHOW PROCESSLIST,\nalthough there might be some minor differences in interpretion for the\ntwo statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.5/en/thread-information.html).\n\nOptional type values may be specified to display specific additional\ntypes of information:\n\no ALL displays all information\n\no BLOCK IO displays counts for block input and output operations\n\no CONTEXT SWITCHES displays counts for voluntary and involuntary\n context switches\n\no CPU displays user and system CPU usage times\n\no IPC displays counts for messages sent and received\n\no MEMORY is not currently implemented\n\no PAGE FAULTS displays counts for major and minor page faults\n\no SOURCE displays the names of functions from the source code, together\n with the name and line number of the file in which the function\n occurs\n\no SWAPS displays swap counts\n\nProfiling is enabled per session. When a session ends, its profiling\ninformation is lost.\n\nURL: https://mariadb.com/kb/en/show-profile/\n\n','MariaDB> SELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n1 row in set (0.00 sec)\n\nMariaDB> SET profiling = 1;\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> DROP TABLE IF EXISTS t1;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nMariaDB> CREATE TABLE T1 (id INT);\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB> SHOW PROFILES;\n+----------+----------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+----------+--------------------------+\n| 0 | 0.000088 | SET PROFILING = 1 |\n| 1 | 0.000136 | DROP TABLE IF EXISTS t1 |\n| 2 | 0.011947 | CREATE TABLE t1 (id INT) |\n+----------+----------+--------------------------+\n3 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| checking permissions | 0.000040 |\n| creating table | 0.000056 |\n| After create | 0.011363 |\n| query end | 0.000375 |\n| freeing items | 0.000089 |\n| logging slow query | 0.000019 |\n| cleaning up | 0.000005 |\n+----------------------+----------+\n7 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE FOR QUERY 1;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| query end | 0.000107 |\n| freeing items | 0.000008 |\n| logging slow query | 0.000015 |\n| cleaning up | 0.000006 |\n+--------------------+----------+\n4 rows in set (0.00 sec)\n\nMariaDB> SHOW PROFILE CPU FOR QUERY 2;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| checking permissions | 0.000040 | 0.000038 | 0.000002 |\n| creating table | 0.000056 | 0.000028 | 0.000028 |\n| After create | 0.011363 | 0.000217 | 0.001571 |\n| query end | 0.000375 | 0.000013 | 0.000028 |\n| freeing items | 0.000089 | 0.000010 | 0.000014 |\n| logging slow query | 0.000019 | 0.000009 | 0.000010 |\n| cleaning up | 0.000005 | 0.000003 | 0.000002 |\n+----------------------+----------+----------+------------+\n7 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-profile/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (488,26,'SHOW PROCEDURE CODE','Syntax:\nSHOW PROCEDURE CODE proc_name\n\nThis statement is a MySQL extension that is available only for servers\nthat have been built with debugging support. It displays a\nrepresentation of the internal implementation of the named stored\nprocedure. A similar statement, SHOW FUNCTION CODE, displays\ninformation about stored functions (see [HELP SHOW FUNCTION CODE]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table.\n\nIf the named routine is available, each statement produces a result\nset. Each row in the result set corresponds to one "instruction" in the\nroutine. The first column is Pos, which is an ordinal number beginning\nwith 0. The second column is Instruction, which contains an SQL\nstatement (usually changed from the original source), or a directive\nwhich has meaning only to the stored-routine handler.\n\nURL: https://mariadb.com/kb/en/show-procedure-code/\n\n','MariaDB> DELIMITER //\nMariaDB> CREATE PROCEDURE p1 ()\n -> BEGIN\n -> DECLARE fanta INT DEFAULT 55;\n -> DROP TABLE t2;\n -> LOOP\n -> INSERT INTO t3 VALUES (fanta);\n -> END LOOP;\n -> END//\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB> SHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 "DROP TABLE t2" |\n| 2 | stmt 5 "INSERT INTO t3 VALUES (fanta)" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n4 rows in set (0.00 sec)\n','https://mariadb.com/kb/en/show-procedure-code/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (489,22,'MEDIUMTEXT','MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 16,777,215 (224 - 1) characters.\nThe effective maximum length is less if the value contains multi-byte\ncharacters. Each MEDIUMTEXT value is stored using a 3-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: https://mariadb.com/kb/en/mediumtext/\n\n','','https://mariadb.com/kb/en/mediumtext/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (490,4,'LN','Syntax:\nLN(X)\n\nReturns the natural logarithm of X; that is, the base-e logarithm of X.\nIf X is less than or equal to 0, then NULL is returned.\n\nURL: https://mariadb.com/kb/en/ln/\n\n','MariaDB> SELECT LN(2);\n -> 0.69314718055995\nMariaDB> SELECT LN(-2);\n -> NULL\n','https://mariadb.com/kb/en/ln/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (491,23,'RETURN','Syntax:\nRETURN expr\n\nThe RETURN statement terminates execution of a stored function and\nreturns the value expr to the function caller. There must be at least\none RETURN statement in a stored function. There may be more than one\nif the function has multiple exit points.\n\nThis statement is not used in stored procedures, triggers, or events.\nThe LEAVE statement can be used to exit a stored program of those\ntypes.\n\nURL: https://mariadb.com/kb/en/return/\n\n','','https://mariadb.com/kb/en/return/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (492,26,'SHOW COLLATION','Syntax:\nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n\nThis statement lists collations supported by the server. By default,\nthe output from SHOW COLLATION includes all available collations. The\nLIKE clause, if present, indicates which collation names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttps://mariadb.com/kb/en/extended-show/. For example:\n\nMariaDB> SHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | | 0 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 0 |\n| latin1_danish_ci | latin1 | 15 | | | 0 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 0 |\n| latin1_general_ci | latin1 | 48 | | | 0 |\n| latin1_general_cs | latin1 | 49 | | | 0 |\n| latin1_spanish_ci | latin1 | 94 | | | 0 |\n+-------------------+---------+----+---------+----------+---------+\n\nURL: https://mariadb.com/kb/en/show-collation/\n\n','','https://mariadb.com/kb/en/show-collation/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (493,4,'LOG','Syntax:\nLOG(X), LOG(B,X)\n\nIf called with one parameter, this function returns the natural\nlogarithm of X. If X is less than or equal to 0, then NULL is returned.\n\nThe inverse of this function (when called with a single argument) is\nthe EXP() function.\n\nURL: https://mariadb.com/kb/en/log/\n\n','MariaDB> SELECT LOG(2);\n -> 0.69314718055995\nMariaDB> SELECT LOG(-2);\n -> NULL\n','https://mariadb.com/kb/en/log/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (494,8,'SET SQL_LOG_BIN','Syntax:\nSET sql_log_bin = {0|1}\n\nThe sql_log_bin variable controls whether logging to the binary log is\ndone. The default value is 1 (do logging). To change logging for the\ncurrent session, change the session value of this variable. The session\nuser must have the SUPER privilege to set this variable.\n\nBeginning with MySQL 5.5.5, it is no longer possible to set\n@@session.sql_log_bin within a transaction or subquery. (Bug #53437)\n\nURL: https://mariadb.com/kb/en/set-sql_log_bin/\n\n','','https://mariadb.com/kb/en/set-sql_log_bin/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (495,18,'!=','Syntax:\n<>, !=\n\nNot equal:\n\nURL: https://mariadb.com/kb/en/not-equal/\n\n','MariaDB> SELECT \'.01\' <> \'0.01\';\n -> 1\nMariaDB> SELECT .01 <> \'0.01\';\n -> 0\nMariaDB> SELECT \'zapp\' <> \'zappp\';\n -> 1\n','https://mariadb.com/kb/en/not-equal/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (496,23,'WHILE','Syntax:\n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n\nThe statement list within a WHILE statement is repeated as long as the\nsearch_condition expression is true. statement_list consists of one or\nmore SQL statements, each terminated by a semicolon (;) statement\ndelimiter.\n\nA WHILE statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: https://mariadb.com/kb/en/while/\n\n','CREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n\n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n END WHILE;\nEND;\n','https://mariadb.com/kb/en/while/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (497,12,'AES_DECRYPT','Syntax:\nAES_DECRYPT(crypt_str,key_str)\n\nThis function decrypts data using the official AES (Advanced Encryption\nStandard) algorithm. For more information, see the description of\nAES_ENCRYPT().\n\nURL: https://mariadb.com/kb/en/aes_decrypt/\n\n','','https://mariadb.com/kb/en/aes_decrypt/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (498,31,'DAYNAME','Syntax:\nDAYNAME(date)\n\nReturns the name of the weekday for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(https://mariadb.com/kb/en/server-system-variables#lc_time_names).\n\nURL: https://mariadb.com/kb/en/dayname/\n\n','MariaDB> SELECT DAYNAME(\'2007-02-03\');\n -> \'Saturday\'\n','https://mariadb.com/kb/en/dayname/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (499,17,'COERCIBILITY','Syntax:\nCOERCIBILITY(str)\n\nReturns the collation coercibility value of the string argument.\n\nURL: https://mariadb.com/kb/en/coercibility/\n\n','MariaDB> SELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n -> 0\nMariaDB> SELECT COERCIBILITY(USER());\n -> 3\nMariaDB> SELECT COERCIBILITY(\'abc\');\n -> 4\n','https://mariadb.com/kb/en/coercibility/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (500,22,'INT','INT[(M)] [UNSIGNED] [ZEROFILL]\n\nA normal-size integer. The signed range is -2147483648 to 2147483647.\nThe unsigned range is 0 to 4294967295.\n\nURL: https://mariadb.com/kb/en/int/\n\n','','https://mariadb.com/kb/en/int/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (501,13,'GLENGTH','GLength(ls)\n\nReturns as a double-precision number the length of the LineString value\nls in its associated spatial reference.\n\nURL: https://mariadb.com/kb/en/glength/\n\n','MariaDB> SET @ls = \'LineString(1 1,2 2,3 3)\';\nMariaDB> SELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.8284271247462 |\n+----------------------------+\n','https://mariadb.com/kb/en/glength/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (502,4,'RADIANS','Syntax:\nRADIANS(X)\n\nReturns the argument X, converted from degrees to radians. (Note that\nπ radians equals 180 degrees.)\n\nURL: https://mariadb.com/kb/en/radians/\n\n','MariaDB> SELECT RADIANS(90);\n -> 1.5707963267949\n','https://mariadb.com/kb/en/radians/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (503,17,'COLLATION','Syntax:\nCOLLATION(str)\n\nReturns the collation of the string argument.\n\nURL: https://mariadb.com/kb/en/collation/\n\n','MariaDB> SELECT COLLATION(\'abc\');\n -> \'latin1_swedish_ci\'\nMariaDB> SELECT COLLATION(_utf8\'abc\');\n -> \'utf8_general_ci\'\n','https://mariadb.com/kb/en/collation/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (504,18,'COALESCE','Syntax:\nCOALESCE(value,...)\n\nReturns the first non-NULL value in the list, or NULL if there are no\nnon-NULL values.\n\nURL: https://mariadb.com/kb/en/coalesce/\n\n','MariaDB> SELECT COALESCE(NULL,1);\n -> 1\nMariaDB> SELECT COALESCE(NULL,NULL,NULL);\n -> NULL\n','https://mariadb.com/kb/en/coalesce/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (505,17,'VERSION','Syntax:\nVERSION()\n\nReturns a string that indicates the MySQL server version. The string\nuses the utf8 character set. The value might have a suffix in addition\nto the version number. See the description of the version system\nvariable in\nhttps://mariadb.com/kb/en/server-system-variables#version.\n\nURL: https://mariadb.com/kb/en/version/\n\n','MariaDB> SELECT VERSION();\n -> \'5.5.29-standard\'\n','https://mariadb.com/kb/en/version/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (506,37,'MAKE_SET','Syntax:\nMAKE_SET(bits,str1,str2,...)\n\nReturns a set value (a string containing substrings separated by ","\ncharacters) consisting of the strings that have the corresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and so on. NULL\nvalues in str1, str2, ... are not appended to the result.\n\nURL: https://mariadb.com/kb/en/make_set/\n\n','MariaDB> SELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n -> \'a\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n -> \'hello,world\'\nMariaDB> SELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n -> \'hello\'\nMariaDB> SELECT MAKE_SET(0,\'a\',\'b\',\'c\');\n -> \'\'\n','https://mariadb.com/kb/en/make_set/');
-insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (507,37,'FIND_IN_SET','Syntax:\nFIND_IN_SET(str,strlist)\n\nReturns a value in the range of 1 to N if the string str is in the\nstring list strlist consisting of N substrings. A string list is a\nstring composed of substrings separated by "," characters. If the first\nargument is a constant string and the second is a column of type SET,\nthe FIND_IN_SET() function is optimized to use bit arithmetic. Returns\n0 if str is not in strlist or if strlist is the empty string. Returns\nNULL if either argument is NULL. This function does not work properly\nif the first argument contains a comma (",") character.\n\nURL: https://mariadb.com/kb/en/find_in_set/\n\n','MariaDB> SELECT FIND_IN_SET(\'b\',\'a,b,c,d\');\n -> 2\n','https://mariadb.com/kb/en/find_in_set/');
-
-insert into help_keyword (help_keyword_id,name) values (0,'JOIN');
-insert into help_keyword (help_keyword_id,name) values (1,'HOST');
-insert into help_keyword (help_keyword_id,name) values (2,'REPEAT');
-insert into help_keyword (help_keyword_id,name) values (3,'SERIALIZABLE');
-insert into help_keyword (help_keyword_id,name) values (4,'REPLACE');
-insert into help_keyword (help_keyword_id,name) values (5,'AT');
-insert into help_keyword (help_keyword_id,name) values (6,'SCHEDULE');
-insert into help_keyword (help_keyword_id,name) values (7,'RETURNS');
-insert into help_keyword (help_keyword_id,name) values (8,'STARTS');
-insert into help_keyword (help_keyword_id,name) values (9,'MASTER_SSL_CA');
-insert into help_keyword (help_keyword_id,name) values (10,'NCHAR');
-insert into help_keyword (help_keyword_id,name) values (11,'COLUMNS');
-insert into help_keyword (help_keyword_id,name) values (12,'COMPLETION');
-insert into help_keyword (help_keyword_id,name) values (13,'WORK');
-insert into help_keyword (help_keyword_id,name) values (14,'DATETIME');
-insert into help_keyword (help_keyword_id,name) values (15,'MODE');
-insert into help_keyword (help_keyword_id,name) values (16,'OPEN');
-insert into help_keyword (help_keyword_id,name) values (17,'INTEGER');
-insert into help_keyword (help_keyword_id,name) values (18,'ESCAPE');
-insert into help_keyword (help_keyword_id,name) values (19,'VALUE');
-insert into help_keyword (help_keyword_id,name) values (20,'MASTER_SSL_VERIFY_SERVER_CERT');
-insert into help_keyword (help_keyword_id,name) values (21,'SQL_BIG_RESULT');
-insert into help_keyword (help_keyword_id,name) values (22,'DROP');
-insert into help_keyword (help_keyword_id,name) values (23,'GEOMETRYCOLLECTIONFROMWKB');
-insert into help_keyword (help_keyword_id,name) values (24,'EVENTS');
-insert into help_keyword (help_keyword_id,name) values (25,'MONTH');
-insert into help_keyword (help_keyword_id,name) values (26,'PROFILES');
-insert into help_keyword (help_keyword_id,name) values (27,'DUPLICATE');
-insert into help_keyword (help_keyword_id,name) values (28,'REPLICATION');
-insert into help_keyword (help_keyword_id,name) values (29,'UNLOCK');
-insert into help_keyword (help_keyword_id,name) values (30,'INNODB');
-insert into help_keyword (help_keyword_id,name) values (31,'YEAR_MONTH');
-insert into help_keyword (help_keyword_id,name) values (32,'SUBJECT');
-insert into help_keyword (help_keyword_id,name) values (33,'PREPARE');
-insert into help_keyword (help_keyword_id,name) values (34,'LOCK');
-insert into help_keyword (help_keyword_id,name) values (35,'NDB');
-insert into help_keyword (help_keyword_id,name) values (36,'CHECK');
-insert into help_keyword (help_keyword_id,name) values (37,'FULL');
-insert into help_keyword (help_keyword_id,name) values (38,'INT4');
-insert into help_keyword (help_keyword_id,name) values (39,'BY');
-insert into help_keyword (help_keyword_id,name) values (40,'NO');
-insert into help_keyword (help_keyword_id,name) values (41,'MINUTE');
-insert into help_keyword (help_keyword_id,name) values (42,'PARTITION');
-insert into help_keyword (help_keyword_id,name) values (43,'DATA');
-insert into help_keyword (help_keyword_id,name) values (44,'DAY');
-insert into help_keyword (help_keyword_id,name) values (45,'SHARE');
-insert into help_keyword (help_keyword_id,name) values (46,'REAL');
-insert into help_keyword (help_keyword_id,name) values (47,'SEPARATOR');
-insert into help_keyword (help_keyword_id,name) values (48,'MESSAGE_TEXT');
-insert into help_keyword (help_keyword_id,name) values (49,'MASTER_HEARTBEAT_PERIOD');
-insert into help_keyword (help_keyword_id,name) values (50,'DELETE');
-insert into help_keyword (help_keyword_id,name) values (51,'ON');
-insert into help_keyword (help_keyword_id,name) values (52,'COLUMN_NAME');
-insert into help_keyword (help_keyword_id,name) values (53,'CONNECTION');
-insert into help_keyword (help_keyword_id,name) values (54,'CLOSE');
-insert into help_keyword (help_keyword_id,name) values (55,'X509');
-insert into help_keyword (help_keyword_id,name) values (56,'USE');
-insert into help_keyword (help_keyword_id,name) values (57,'SUBCLASS_ORIGIN');
-insert into help_keyword (help_keyword_id,name) values (58,'WHERE');
-insert into help_keyword (help_keyword_id,name) values (59,'PRIVILEGES');
-insert into help_keyword (help_keyword_id,name) values (60,'SPATIAL');
-insert into help_keyword (help_keyword_id,name) values (61,'EVENT');
-insert into help_keyword (help_keyword_id,name) values (62,'SUPER');
-insert into help_keyword (help_keyword_id,name) values (63,'SQL_BUFFER_RESULT');
-insert into help_keyword (help_keyword_id,name) values (64,'IGNORE');
-insert into help_keyword (help_keyword_id,name) values (65,'SHA2');
-insert into help_keyword (help_keyword_id,name) values (66,'QUICK');
-insert into help_keyword (help_keyword_id,name) values (67,'SIGNED');
-insert into help_keyword (help_keyword_id,name) values (68,'OFFLINE');
-insert into help_keyword (help_keyword_id,name) values (69,'SECURITY');
-insert into help_keyword (help_keyword_id,name) values (70,'AUTOEXTEND_SIZE');
-insert into help_keyword (help_keyword_id,name) values (71,'NDBCLUSTER');
-insert into help_keyword (help_keyword_id,name) values (72,'POLYGONFROMWKB');
-insert into help_keyword (help_keyword_id,name) values (73,'FALSE');
-insert into help_keyword (help_keyword_id,name) values (74,'LEVEL');
-insert into help_keyword (help_keyword_id,name) values (75,'FORCE');
-insert into help_keyword (help_keyword_id,name) values (76,'BINARY');
-insert into help_keyword (help_keyword_id,name) values (77,'TO');
-insert into help_keyword (help_keyword_id,name) values (78,'CHANGE');
-insert into help_keyword (help_keyword_id,name) values (79,'CURRENT_USER');
-insert into help_keyword (help_keyword_id,name) values (80,'HOUR_MINUTE');
-insert into help_keyword (help_keyword_id,name) values (81,'UPDATE');
-insert into help_keyword (help_keyword_id,name) values (82,'PRESERVE');
-insert into help_keyword (help_keyword_id,name) values (83,'TABLE_NAME');
-insert into help_keyword (help_keyword_id,name) values (84,'INTO');
-insert into help_keyword (help_keyword_id,name) values (85,'FEDERATED');
-insert into help_keyword (help_keyword_id,name) values (86,'VARYING');
-insert into help_keyword (help_keyword_id,name) values (87,'MAX_SIZE');
-insert into help_keyword (help_keyword_id,name) values (88,'HOUR_SECOND');
-insert into help_keyword (help_keyword_id,name) values (89,'VARIABLE');
-insert into help_keyword (help_keyword_id,name) values (90,'ROLLBACK');
-insert into help_keyword (help_keyword_id,name) values (91,'PROCEDURE');
-insert into help_keyword (help_keyword_id,name) values (92,'TIMESTAMP');
-insert into help_keyword (help_keyword_id,name) values (93,'IMPORT');
-insert into help_keyword (help_keyword_id,name) values (94,'AGAINST');
-insert into help_keyword (help_keyword_id,name) values (95,'CHECKSUM');
-insert into help_keyword (help_keyword_id,name) values (96,'COUNT');
-insert into help_keyword (help_keyword_id,name) values (97,'LONGBINARY');
-insert into help_keyword (help_keyword_id,name) values (98,'THEN');
-insert into help_keyword (help_keyword_id,name) values (99,'INSERT');
-insert into help_keyword (help_keyword_id,name) values (100,'ENGINES');
-insert into help_keyword (help_keyword_id,name) values (101,'HANDLER');
-insert into help_keyword (help_keyword_id,name) values (102,'PORT');
-insert into help_keyword (help_keyword_id,name) values (103,'DAY_SECOND');
-insert into help_keyword (help_keyword_id,name) values (104,'EXISTS');
-insert into help_keyword (help_keyword_id,name) values (105,'MUTEX');
-insert into help_keyword (help_keyword_id,name) values (106,'HELP_DATE');
-insert into help_keyword (help_keyword_id,name) values (107,'RELEASE');
-insert into help_keyword (help_keyword_id,name) values (108,'BOOLEAN');
-insert into help_keyword (help_keyword_id,name) values (109,'MOD');
-insert into help_keyword (help_keyword_id,name) values (110,'DEFAULT');
-insert into help_keyword (help_keyword_id,name) values (111,'TYPE');
-insert into help_keyword (help_keyword_id,name) values (112,'NO_WRITE_TO_BINLOG');
-insert into help_keyword (help_keyword_id,name) values (113,'OPTIMIZE');
-insert into help_keyword (help_keyword_id,name) values (114,'SQLSTATE');
-insert into help_keyword (help_keyword_id,name) values (115,'RESET');
-insert into help_keyword (help_keyword_id,name) values (116,'CLASS_ORIGIN');
-insert into help_keyword (help_keyword_id,name) values (117,'INSTALL');
-insert into help_keyword (help_keyword_id,name) values (118,'ITERATE');
-insert into help_keyword (help_keyword_id,name) values (119,'DO');
-insert into help_keyword (help_keyword_id,name) values (120,'BIGINT');
-insert into help_keyword (help_keyword_id,name) values (121,'SET');
-insert into help_keyword (help_keyword_id,name) values (122,'ISSUER');
-insert into help_keyword (help_keyword_id,name) values (123,'DATE');
-insert into help_keyword (help_keyword_id,name) values (124,'STATUS');
-insert into help_keyword (help_keyword_id,name) values (125,'FULLTEXT');
-insert into help_keyword (help_keyword_id,name) values (126,'COMMENT');
-insert into help_keyword (help_keyword_id,name) values (127,'MASTER_CONNECT_RETRY');
-insert into help_keyword (help_keyword_id,name) values (128,'INNER');
-insert into help_keyword (help_keyword_id,name) values (129,'RELAYLOG');
-insert into help_keyword (help_keyword_id,name) values (130,'STOP');
-insert into help_keyword (help_keyword_id,name) values (131,'MASTER_LOG_FILE');
-insert into help_keyword (help_keyword_id,name) values (132,'MRG_MYISAM');
-insert into help_keyword (help_keyword_id,name) values (133,'PRECISION');
-insert into help_keyword (help_keyword_id,name) values (134,'REQUIRE');
-insert into help_keyword (help_keyword_id,name) values (135,'TRAILING');
-insert into help_keyword (help_keyword_id,name) values (136,'PARTITIONS');
-insert into help_keyword (help_keyword_id,name) values (137,'LONG');
-insert into help_keyword (help_keyword_id,name) values (138,'OPTION');
-insert into help_keyword (help_keyword_id,name) values (139,'REORGANIZE');
-insert into help_keyword (help_keyword_id,name) values (140,'ELSE');
-insert into help_keyword (help_keyword_id,name) values (141,'DEALLOCATE');
-insert into help_keyword (help_keyword_id,name) values (142,'IO_THREAD');
-insert into help_keyword (help_keyword_id,name) values (143,'CASE');
-insert into help_keyword (help_keyword_id,name) values (144,'CIPHER');
-insert into help_keyword (help_keyword_id,name) values (145,'CONTINUE');
-insert into help_keyword (help_keyword_id,name) values (146,'FROM');
-insert into help_keyword (help_keyword_id,name) values (147,'READ');
-insert into help_keyword (help_keyword_id,name) values (148,'LEFT');
-insert into help_keyword (help_keyword_id,name) values (149,'ELSEIF');
-insert into help_keyword (help_keyword_id,name) values (150,'MINUTE_SECOND');
-insert into help_keyword (help_keyword_id,name) values (151,'COMPACT');
-insert into help_keyword (help_keyword_id,name) values (152,'DEC');
-insert into help_keyword (help_keyword_id,name) values (153,'FOR');
-insert into help_keyword (help_keyword_id,name) values (154,'WARNINGS');
-insert into help_keyword (help_keyword_id,name) values (155,'MIN_ROWS');
-insert into help_keyword (help_keyword_id,name) values (156,'STRING');
-insert into help_keyword (help_keyword_id,name) values (157,'CONDITION');
-insert into help_keyword (help_keyword_id,name) values (158,'ENCLOSED');
-insert into help_keyword (help_keyword_id,name) values (159,'FUNCTION');
-insert into help_keyword (help_keyword_id,name) values (160,'AGGREGATE');
-insert into help_keyword (help_keyword_id,name) values (161,'FIELDS');
-insert into help_keyword (help_keyword_id,name) values (162,'INT3');
-insert into help_keyword (help_keyword_id,name) values (163,'ARCHIVE');
-insert into help_keyword (help_keyword_id,name) values (164,'AVG_ROW_LENGTH');
-insert into help_keyword (help_keyword_id,name) values (165,'ADD');
-insert into help_keyword (help_keyword_id,name) values (166,'KILL');
-insert into help_keyword (help_keyword_id,name) values (167,'FLOAT4');
-insert into help_keyword (help_keyword_id,name) values (168,'TABLESPACE');
-insert into help_keyword (help_keyword_id,name) values (169,'VIEW');
-insert into help_keyword (help_keyword_id,name) values (170,'REPEATABLE');
-insert into help_keyword (help_keyword_id,name) values (171,'INFILE');
-insert into help_keyword (help_keyword_id,name) values (172,'HELP_VERSION');
-insert into help_keyword (help_keyword_id,name) values (173,'ORDER');
-insert into help_keyword (help_keyword_id,name) values (174,'USING');
-insert into help_keyword (help_keyword_id,name) values (175,'CONSTRAINT_CATALOG');
-insert into help_keyword (help_keyword_id,name) values (176,'MIDDLEINT');
-insert into help_keyword (help_keyword_id,name) values (177,'GRANT');
-insert into help_keyword (help_keyword_id,name) values (178,'UNSIGNED');
-insert into help_keyword (help_keyword_id,name) values (179,'DECIMAL');
-insert into help_keyword (help_keyword_id,name) values (180,'GEOMETRYFROMTEXT');
-insert into help_keyword (help_keyword_id,name) values (181,'INDEXES');
-insert into help_keyword (help_keyword_id,name) values (182,'FOREIGN');
-insert into help_keyword (help_keyword_id,name) values (183,'CACHE');
-insert into help_keyword (help_keyword_id,name) values (184,'HOSTS');
-insert into help_keyword (help_keyword_id,name) values (185,'MYSQL_ERRNO');
-insert into help_keyword (help_keyword_id,name) values (186,'COMMIT');
-insert into help_keyword (help_keyword_id,name) values (187,'SCHEMAS');
-insert into help_keyword (help_keyword_id,name) values (188,'LEADING');
-insert into help_keyword (help_keyword_id,name) values (189,'SNAPSHOT');
-insert into help_keyword (help_keyword_id,name) values (190,'CONSTRAINT_NAME');
-insert into help_keyword (help_keyword_id,name) values (191,'DECLARE');
-insert into help_keyword (help_keyword_id,name) values (192,'LOAD');
-insert into help_keyword (help_keyword_id,name) values (193,'SQL_CACHE');
-insert into help_keyword (help_keyword_id,name) values (194,'CONVERT');
-insert into help_keyword (help_keyword_id,name) values (195,'DYNAMIC');
-insert into help_keyword (help_keyword_id,name) values (196,'COLLATE');
-insert into help_keyword (help_keyword_id,name) values (197,'POLYGONFROMTEXT');
-insert into help_keyword (help_keyword_id,name) values (198,'BYTE');
-insert into help_keyword (help_keyword_id,name) values (199,'GLOBAL');
-insert into help_keyword (help_keyword_id,name) values (200,'LINESTRINGFROMWKB');
-insert into help_keyword (help_keyword_id,name) values (201,'WHEN');
-insert into help_keyword (help_keyword_id,name) values (202,'HAVING');
-insert into help_keyword (help_keyword_id,name) values (203,'AS');
-insert into help_keyword (help_keyword_id,name) values (204,'STARTING');
-insert into help_keyword (help_keyword_id,name) values (205,'RELOAD');
-insert into help_keyword (help_keyword_id,name) values (206,'AUTOCOMMIT');
-insert into help_keyword (help_keyword_id,name) values (207,'REVOKE');
-insert into help_keyword (help_keyword_id,name) values (208,'GRANTS');
-insert into help_keyword (help_keyword_id,name) values (209,'OUTER');
-insert into help_keyword (help_keyword_id,name) values (210,'CURSOR_NAME');
-insert into help_keyword (help_keyword_id,name) values (211,'FLOOR');
-insert into help_keyword (help_keyword_id,name) values (212,'EXPLAIN');
-insert into help_keyword (help_keyword_id,name) values (213,'WITH');
-insert into help_keyword (help_keyword_id,name) values (214,'AFTER');
-insert into help_keyword (help_keyword_id,name) values (215,'STD');
-insert into help_keyword (help_keyword_id,name) values (216,'CSV');
-insert into help_keyword (help_keyword_id,name) values (217,'DISABLE');
-insert into help_keyword (help_keyword_id,name) values (218,'UNINSTALL');
-insert into help_keyword (help_keyword_id,name) values (219,'OUTFILE');
-insert into help_keyword (help_keyword_id,name) values (220,'LOW_PRIORITY');
-insert into help_keyword (help_keyword_id,name) values (221,'FILE');
-insert into help_keyword (help_keyword_id,name) values (222,'NODEGROUP');
-insert into help_keyword (help_keyword_id,name) values (223,'SCHEMA');
-insert into help_keyword (help_keyword_id,name) values (224,'SONAME');
-insert into help_keyword (help_keyword_id,name) values (225,'POW');
-insert into help_keyword (help_keyword_id,name) values (226,'DUAL');
-insert into help_keyword (help_keyword_id,name) values (227,'MULTIPOINTFROMWKB');
-insert into help_keyword (help_keyword_id,name) values (228,'INDEX');
-insert into help_keyword (help_keyword_id,name) values (229,'MULTIPOINTFROMTEXT');
-insert into help_keyword (help_keyword_id,name) values (230,'DEFINER');
-insert into help_keyword (help_keyword_id,name) values (231,'MASTER_BIND');
-insert into help_keyword (help_keyword_id,name) values (232,'REMOVE');
-insert into help_keyword (help_keyword_id,name) values (233,'EXTENDED');
-insert into help_keyword (help_keyword_id,name) values (234,'MULTILINESTRINGFROMWKB');
-insert into help_keyword (help_keyword_id,name) values (235,'CROSS');
-insert into help_keyword (help_keyword_id,name) values (236,'CONTRIBUTORS');
-insert into help_keyword (help_keyword_id,name) values (237,'NATIONAL');
-insert into help_keyword (help_keyword_id,name) values (238,'GROUP');
-insert into help_keyword (help_keyword_id,name) values (239,'SHA');
-insert into help_keyword (help_keyword_id,name) values (240,'ONLINE');
-insert into help_keyword (help_keyword_id,name) values (241,'UNDO');
-insert into help_keyword (help_keyword_id,name) values (242,'IGNORE_SERVER_IDS');
-insert into help_keyword (help_keyword_id,name) values (243,'ZEROFILL');
-insert into help_keyword (help_keyword_id,name) values (244,'CLIENT');
-insert into help_keyword (help_keyword_id,name) values (245,'MASTER_PASSWORD');
-insert into help_keyword (help_keyword_id,name) values (246,'OWNER');
-insert into help_keyword (help_keyword_id,name) values (247,'RELAY_LOG_FILE');
-insert into help_keyword (help_keyword_id,name) values (248,'TRUE');
-insert into help_keyword (help_keyword_id,name) values (249,'CHARACTER');
-insert into help_keyword (help_keyword_id,name) values (250,'MASTER_USER');
-insert into help_keyword (help_keyword_id,name) values (251,'SCHEMA_NAME');
-insert into help_keyword (help_keyword_id,name) values (252,'TABLE');
-insert into help_keyword (help_keyword_id,name) values (253,'ENGINE');
-insert into help_keyword (help_keyword_id,name) values (254,'INSERT_METHOD');
-insert into help_keyword (help_keyword_id,name) values (255,'CASCADE');
-insert into help_keyword (help_keyword_id,name) values (256,'RELAY_LOG_POS');
-insert into help_keyword (help_keyword_id,name) values (257,'SQL_CALC_FOUND_ROWS');
-insert into help_keyword (help_keyword_id,name) values (258,'UNION');
-insert into help_keyword (help_keyword_id,name) values (259,'MYISAM');
-insert into help_keyword (help_keyword_id,name) values (260,'LEAVE');
-insert into help_keyword (help_keyword_id,name) values (261,'MODIFY');
-insert into help_keyword (help_keyword_id,name) values (262,'MATCH');
-insert into help_keyword (help_keyword_id,name) values (263,'MASTER_LOG_POS');
-insert into help_keyword (help_keyword_id,name) values (264,'DISTINCTROW');
-insert into help_keyword (help_keyword_id,name) values (265,'DESC');
-insert into help_keyword (help_keyword_id,name) values (266,'TIME');
-insert into help_keyword (help_keyword_id,name) values (267,'NUMERIC');
-insert into help_keyword (help_keyword_id,name) values (268,'EXPANSION');
-insert into help_keyword (help_keyword_id,name) values (269,'CODE');
-insert into help_keyword (help_keyword_id,name) values (270,'CURSOR');
-insert into help_keyword (help_keyword_id,name) values (271,'GEOMETRYCOLLECTIONFROMTEXT');
-insert into help_keyword (help_keyword_id,name) values (272,'CHAIN');
-insert into help_keyword (help_keyword_id,name) values (273,'LOGFILE');
-insert into help_keyword (help_keyword_id,name) values (274,'FLUSH');
-insert into help_keyword (help_keyword_id,name) values (275,'CREATE');
-insert into help_keyword (help_keyword_id,name) values (276,'DESCRIBE');
-insert into help_keyword (help_keyword_id,name) values (277,'EXTENT_SIZE');
-insert into help_keyword (help_keyword_id,name) values (278,'MAX_UPDATES_PER_HOUR');
-insert into help_keyword (help_keyword_id,name) values (279,'INT2');
-insert into help_keyword (help_keyword_id,name) values (280,'PROCESSLIST');
-insert into help_keyword (help_keyword_id,name) values (281,'ENDS');
-insert into help_keyword (help_keyword_id,name) values (282,'LOGS');
-insert into help_keyword (help_keyword_id,name) values (283,'DISCARD');
-insert into help_keyword (help_keyword_id,name) values (284,'HEAP');
-insert into help_keyword (help_keyword_id,name) values (285,'SOUNDS');
-insert into help_keyword (help_keyword_id,name) values (286,'BETWEEN');
-insert into help_keyword (help_keyword_id,name) values (287,'MULTILINESTRINGFROMTEXT');
-insert into help_keyword (help_keyword_id,name) values (288,'REPAIR');
-insert into help_keyword (help_keyword_id,name) values (289,'PACK_KEYS');
-insert into help_keyword (help_keyword_id,name) values (290,'FAST');
-insert into help_keyword (help_keyword_id,name) values (291,'VALUES');
-insert into help_keyword (help_keyword_id,name) values (292,'CALL');
-insert into help_keyword (help_keyword_id,name) values (293,'LOOP');
-insert into help_keyword (help_keyword_id,name) values (294,'VARCHARACTER');
-insert into help_keyword (help_keyword_id,name) values (295,'BEFORE');
-insert into help_keyword (help_keyword_id,name) values (296,'TRUNCATE');
-insert into help_keyword (help_keyword_id,name) values (297,'SHOW');
-insert into help_keyword (help_keyword_id,name) values (298,'ALL');
-insert into help_keyword (help_keyword_id,name) values (299,'REDUNDANT');
-insert into help_keyword (help_keyword_id,name) values (300,'USER_RESOURCES');
-insert into help_keyword (help_keyword_id,name) values (301,'PARTIAL');
-insert into help_keyword (help_keyword_id,name) values (302,'BINLOG');
-insert into help_keyword (help_keyword_id,name) values (303,'END');
-insert into help_keyword (help_keyword_id,name) values (304,'SECOND');
-insert into help_keyword (help_keyword_id,name) values (305,'AND');
-insert into help_keyword (help_keyword_id,name) values (306,'FLOAT8');
-insert into help_keyword (help_keyword_id,name) values (307,'PREV');
-insert into help_keyword (help_keyword_id,name) values (308,'HOUR');
-insert into help_keyword (help_keyword_id,name) values (309,'SELECT');
-insert into help_keyword (help_keyword_id,name) values (310,'DATABASES');
-insert into help_keyword (help_keyword_id,name) values (311,'OR');
-insert into help_keyword (help_keyword_id,name) values (312,'IDENTIFIED');
-insert into help_keyword (help_keyword_id,name) values (313,'WRAPPER');
-insert into help_keyword (help_keyword_id,name) values (314,'MASTER_SSL_CIPHER');
-insert into help_keyword (help_keyword_id,name) values (315,'SQL_SLAVE_SKIP_COUNTER');
-insert into help_keyword (help_keyword_id,name) values (316,'BOTH');
-insert into help_keyword (help_keyword_id,name) values (317,'BOOL');
-insert into help_keyword (help_keyword_id,name) values (318,'YEAR');
-insert into help_keyword (help_keyword_id,name) values (319,'MASTER_PORT');
-insert into help_keyword (help_keyword_id,name) values (320,'CONCURRENT');
-insert into help_keyword (help_keyword_id,name) values (321,'HELP');
-insert into help_keyword (help_keyword_id,name) values (322,'UNIQUE');
-insert into help_keyword (help_keyword_id,name) values (323,'TRIGGERS');
-insert into help_keyword (help_keyword_id,name) values (324,'PROCESS');
-insert into help_keyword (help_keyword_id,name) values (325,'OPTIONS');
-insert into help_keyword (help_keyword_id,name) values (326,'RESIGNAL');
-insert into help_keyword (help_keyword_id,name) values (327,'CONSISTENT');
-insert into help_keyword (help_keyword_id,name) values (328,'MASTER_SSL');
-insert into help_keyword (help_keyword_id,name) values (329,'DATE_ADD');
-insert into help_keyword (help_keyword_id,name) values (330,'MAX_CONNECTIONS_PER_HOUR');
-insert into help_keyword (help_keyword_id,name) values (331,'LIKE');
-insert into help_keyword (help_keyword_id,name) values (332,'PLUGIN');
-insert into help_keyword (help_keyword_id,name) values (333,'FETCH');
-insert into help_keyword (help_keyword_id,name) values (334,'IN');
-insert into help_keyword (help_keyword_id,name) values (335,'COLUMN');
-insert into help_keyword (help_keyword_id,name) values (336,'DUMPFILE');
-insert into help_keyword (help_keyword_id,name) values (337,'USAGE');
-insert into help_keyword (help_keyword_id,name) values (338,'EXECUTE');
-insert into help_keyword (help_keyword_id,name) values (339,'MEMORY');
-insert into help_keyword (help_keyword_id,name) values (340,'CEIL');
-insert into help_keyword (help_keyword_id,name) values (341,'QUERY');
-insert into help_keyword (help_keyword_id,name) values (342,'MASTER_HOST');
-insert into help_keyword (help_keyword_id,name) values (343,'LINES');
-insert into help_keyword (help_keyword_id,name) values (344,'SQL_THREAD');
-insert into help_keyword (help_keyword_id,name) values (345,'SERVER');
-insert into help_keyword (help_keyword_id,name) values (346,'MAX_QUERIES_PER_HOUR');
-insert into help_keyword (help_keyword_id,name) values (347,'MASTER_SSL_CERT');
-insert into help_keyword (help_keyword_id,name) values (348,'MULTIPOLYGONFROMWKB');
-insert into help_keyword (help_keyword_id,name) values (349,'TRANSACTION');
-insert into help_keyword (help_keyword_id,name) values (350,'DAY_MINUTE');
-insert into help_keyword (help_keyword_id,name) values (351,'STDDEV');
-insert into help_keyword (help_keyword_id,name) values (352,'DATE_SUB');
-insert into help_keyword (help_keyword_id,name) values (353,'REBUILD');
-insert into help_keyword (help_keyword_id,name) values (354,'GEOMETRYFROMWKB');
-insert into help_keyword (help_keyword_id,name) values (355,'INT1');
-insert into help_keyword (help_keyword_id,name) values (356,'RENAME');
-insert into help_keyword (help_keyword_id,name) values (357,'PARSER');
-insert into help_keyword (help_keyword_id,name) values (358,'RIGHT');
-insert into help_keyword (help_keyword_id,name) values (359,'ALTER');
-insert into help_keyword (help_keyword_id,name) values (360,'MAX_ROWS');
-insert into help_keyword (help_keyword_id,name) values (361,'SOCKET');
-insert into help_keyword (help_keyword_id,name) values (362,'STRAIGHT_JOIN');
-insert into help_keyword (help_keyword_id,name) values (363,'NATURAL');
-insert into help_keyword (help_keyword_id,name) values (364,'VARIABLES');
-insert into help_keyword (help_keyword_id,name) values (365,'ESCAPED');
-insert into help_keyword (help_keyword_id,name) values (366,'SHA1');
-insert into help_keyword (help_keyword_id,name) values (367,'KEY_BLOCK_SIZE');
-insert into help_keyword (help_keyword_id,name) values (368,'PASSWORD');
-insert into help_keyword (help_keyword_id,name) values (369,'OFFSET');
-insert into help_keyword (help_keyword_id,name) values (370,'CHAR');
-insert into help_keyword (help_keyword_id,name) values (371,'NEXT');
-insert into help_keyword (help_keyword_id,name) values (372,'ERRORS');
-insert into help_keyword (help_keyword_id,name) values (373,'SQL_LOG_BIN');
-insert into help_keyword (help_keyword_id,name) values (374,'TEMPORARY');
-insert into help_keyword (help_keyword_id,name) values (375,'COMMITTED');
-insert into help_keyword (help_keyword_id,name) values (376,'SQL_SMALL_RESULT');
-insert into help_keyword (help_keyword_id,name) values (377,'UPGRADE');
-insert into help_keyword (help_keyword_id,name) values (378,'BEGIN');
-insert into help_keyword (help_keyword_id,name) values (379,'DELAY_KEY_WRITE');
-insert into help_keyword (help_keyword_id,name) values (380,'PROFILE');
-insert into help_keyword (help_keyword_id,name) values (381,'MEDIUM');
-insert into help_keyword (help_keyword_id,name) values (382,'INTERVAL');
-insert into help_keyword (help_keyword_id,name) values (383,'SSL');
-insert into help_keyword (help_keyword_id,name) values (384,'DAY_HOUR');
-insert into help_keyword (help_keyword_id,name) values (385,'NAME');
-insert into help_keyword (help_keyword_id,name) values (386,'REFERENCES');
-insert into help_keyword (help_keyword_id,name) values (387,'AES_ENCRYPT');
-insert into help_keyword (help_keyword_id,name) values (388,'STORAGE');
-insert into help_keyword (help_keyword_id,name) values (389,'ISOLATION');
-insert into help_keyword (help_keyword_id,name) values (390,'CEILING');
-insert into help_keyword (help_keyword_id,name) values (391,'EVERY');
-insert into help_keyword (help_keyword_id,name) values (392,'INT8');
-insert into help_keyword (help_keyword_id,name) values (393,'AUTHORS');
-insert into help_keyword (help_keyword_id,name) values (394,'RESTRICT');
-insert into help_keyword (help_keyword_id,name) values (395,'UNCOMMITTED');
-insert into help_keyword (help_keyword_id,name) values (396,'LINESTRINGFROMTEXT');
-insert into help_keyword (help_keyword_id,name) values (397,'IS');
-insert into help_keyword (help_keyword_id,name) values (398,'NOT');
-insert into help_keyword (help_keyword_id,name) values (399,'ANALYSE');
-insert into help_keyword (help_keyword_id,name) values (400,'DATAFILE');
-insert into help_keyword (help_keyword_id,name) values (401,'DES_KEY_FILE');
-insert into help_keyword (help_keyword_id,name) values (402,'SIGNAL');
-insert into help_keyword (help_keyword_id,name) values (403,'COMPRESSED');
-insert into help_keyword (help_keyword_id,name) values (404,'START');
-insert into help_keyword (help_keyword_id,name) values (405,'PLUGINS');
-insert into help_keyword (help_keyword_id,name) values (406,'SAVEPOINT');
-insert into help_keyword (help_keyword_id,name) values (407,'IF');
-insert into help_keyword (help_keyword_id,name) values (408,'ROWS');
-insert into help_keyword (help_keyword_id,name) values (409,'PRIMARY');
-insert into help_keyword (help_keyword_id,name) values (410,'PURGE');
-insert into help_keyword (help_keyword_id,name) values (411,'LAST');
-insert into help_keyword (help_keyword_id,name) values (412,'USER');
-insert into help_keyword (help_keyword_id,name) values (413,'EXIT');
-insert into help_keyword (help_keyword_id,name) values (414,'KEYS');
-insert into help_keyword (help_keyword_id,name) values (415,'LIMIT');
-insert into help_keyword (help_keyword_id,name) values (416,'KEY');
-insert into help_keyword (help_keyword_id,name) values (417,'MERGE');
-insert into help_keyword (help_keyword_id,name) values (418,'UNTIL');
-insert into help_keyword (help_keyword_id,name) values (419,'SQL_NO_CACHE');
-insert into help_keyword (help_keyword_id,name) values (420,'DELAYED');
-insert into help_keyword (help_keyword_id,name) values (421,'CONSTRAINT_SCHEMA');
-insert into help_keyword (help_keyword_id,name) values (422,'ANALYZE');
-insert into help_keyword (help_keyword_id,name) values (423,'CONSTRAINT');
-insert into help_keyword (help_keyword_id,name) values (424,'SERIAL');
-insert into help_keyword (help_keyword_id,name) values (425,'ACTION');
-insert into help_keyword (help_keyword_id,name) values (426,'WRITE');
-insert into help_keyword (help_keyword_id,name) values (427,'INITIAL_SIZE');
-insert into help_keyword (help_keyword_id,name) values (428,'SESSION');
-insert into help_keyword (help_keyword_id,name) values (429,'DATABASE');
-insert into help_keyword (help_keyword_id,name) values (430,'NULL');
-insert into help_keyword (help_keyword_id,name) values (431,'POWER');
-insert into help_keyword (help_keyword_id,name) values (432,'USE_FRM');
-insert into help_keyword (help_keyword_id,name) values (433,'TERMINATED');
-insert into help_keyword (help_keyword_id,name) values (434,'SLAVE');
-insert into help_keyword (help_keyword_id,name) values (435,'NVARCHAR');
-insert into help_keyword (help_keyword_id,name) values (436,'ASC');
-insert into help_keyword (help_keyword_id,name) values (437,'RETURN');
-insert into help_keyword (help_keyword_id,name) values (438,'OPTIONALLY');
-insert into help_keyword (help_keyword_id,name) values (439,'ENABLE');
-insert into help_keyword (help_keyword_id,name) values (440,'DIRECTORY');
-insert into help_keyword (help_keyword_id,name) values (441,'MAX_USER_CONNECTIONS');
-insert into help_keyword (help_keyword_id,name) values (442,'WHILE');
-insert into help_keyword (help_keyword_id,name) values (443,'LOCAL');
-insert into help_keyword (help_keyword_id,name) values (444,'DISTINCT');
-insert into help_keyword (help_keyword_id,name) values (445,'AES_DECRYPT');
-insert into help_keyword (help_keyword_id,name) values (446,'MASTER_SSL_KEY');
-insert into help_keyword (help_keyword_id,name) values (447,'NONE');
-insert into help_keyword (help_keyword_id,name) values (448,'TABLES');
-insert into help_keyword (help_keyword_id,name) values (449,'<>');
-insert into help_keyword (help_keyword_id,name) values (450,'RLIKE');
-insert into help_keyword (help_keyword_id,name) values (451,'TRIGGER');
-insert into help_keyword (help_keyword_id,name) values (452,'COLLATION');
-insert into help_keyword (help_keyword_id,name) values (453,'SHUTDOWN');
-insert into help_keyword (help_keyword_id,name) values (454,'HIGH_PRIORITY');
-insert into help_keyword (help_keyword_id,name) values (455,'BTREE');
-insert into help_keyword (help_keyword_id,name) values (456,'FIRST');
-insert into help_keyword (help_keyword_id,name) values (457,'COALESCE');
-insert into help_keyword (help_keyword_id,name) values (458,'WAIT');
-insert into help_keyword (help_keyword_id,name) values (459,'CATALOG_NAME');
-insert into help_keyword (help_keyword_id,name) values (460,'MASTER');
-insert into help_keyword (help_keyword_id,name) values (461,'FIXED');
-insert into help_keyword (help_keyword_id,name) values (462,'MULTIPOLYGONFROMTEXT');
-insert into help_keyword (help_keyword_id,name) values (463,'ROW_FORMAT');
-
-insert into help_relation (help_topic_id,help_keyword_id) values (1,0);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,0);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,1);
-insert into help_relation (help_topic_id,help_keyword_id) values (232,2);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,3);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,4);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,4);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,4);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,5);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,6);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,6);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,7);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,8);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,9);
-insert into help_relation (help_topic_id,help_keyword_id) values (430,10);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,11);
-insert into help_relation (help_topic_id,help_keyword_id) values (21,11);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,11);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,11);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,11);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,12);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,12);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,13);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,14);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,15);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,15);
-insert into help_relation (help_topic_id,help_keyword_id) values (18,16);
-insert into help_relation (help_topic_id,help_keyword_id) values (134,16);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,16);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,16);
-insert into help_relation (help_topic_id,help_keyword_id) values (500,17);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,17);
-insert into help_relation (help_topic_id,help_keyword_id) values (380,18);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,19);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,19);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,19);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,19);
-insert into help_relation (help_topic_id,help_keyword_id) values (243,19);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,20);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,21);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (34,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (237,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (300,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (9,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (415,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (276,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (416,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (30,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (87,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (263,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (186,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (405,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (331,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,22);
-insert into help_relation (help_topic_id,help_keyword_id) values (108,23);
-insert into help_relation (help_topic_id,help_keyword_id) values (424,24);
-insert into help_relation (help_topic_id,help_keyword_id) values (122,24);
-insert into help_relation (help_topic_id,help_keyword_id) values (170,24);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,25);
-insert into help_relation (help_topic_id,help_keyword_id) values (82,26);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,27);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,28);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,29);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,30);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,30);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,31);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,32);
-insert into help_relation (help_topic_id,help_keyword_id) values (35,33);
-insert into help_relation (help_topic_id,help_keyword_id) values (237,33);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,34);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,34);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,35);
-insert into help_relation (help_topic_id,help_keyword_id) values (417,36);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,36);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,36);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,37);
-insert into help_relation (help_topic_id,help_keyword_id) values (21,37);
-insert into help_relation (help_topic_id,help_keyword_id) values (294,37);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,37);
-insert into help_relation (help_topic_id,help_keyword_id) values (451,37);
-insert into help_relation (help_topic_id,help_keyword_id) values (500,38);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (77,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (361,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,39);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,40);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,40);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,41);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,42);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,42);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,43);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,43);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,43);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,43);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,44);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,45);
-insert into help_relation (help_topic_id,help_keyword_id) values (314,46);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,46);
-insert into help_relation (help_topic_id,help_keyword_id) values (361,47);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,48);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,48);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,49);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,50);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,50);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,50);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,51);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,51);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,51);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,51);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,52);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,52);
-insert into help_relation (help_topic_id,help_keyword_id) values (176,53);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,53);
-insert into help_relation (help_topic_id,help_keyword_id) values (51,54);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,54);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,55);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,56);
-insert into help_relation (help_topic_id,help_keyword_id) values (55,56);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,56);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,57);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,57);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,58);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,58);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,58);
-insert into help_relation (help_topic_id,help_keyword_id) values (193,59);
-insert into help_relation (help_topic_id,help_keyword_id) values (249,59);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,59);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,60);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,60);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,61);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,61);
-insert into help_relation (help_topic_id,help_keyword_id) values (300,61);
-insert into help_relation (help_topic_id,help_keyword_id) values (358,61);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,62);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,63);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,64);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,64);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,64);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,64);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,64);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,64);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,64);
-insert into help_relation (help_topic_id,help_keyword_id) values (66,65);
-insert into help_relation (help_topic_id,help_keyword_id) values (466,66);
-insert into help_relation (help_topic_id,help_keyword_id) values (417,66);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,66);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,67);
-insert into help_relation (help_topic_id,help_keyword_id) values (87,68);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,68);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,68);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,69);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,70);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,71);
-insert into help_relation (help_topic_id,help_keyword_id) values (91,72);
-insert into help_relation (help_topic_id,help_keyword_id) values (482,72);
-insert into help_relation (help_topic_id,help_keyword_id) values (385,73);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,74);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,75);
-insert into help_relation (help_topic_id,help_keyword_id) values (39,76);
-insert into help_relation (help_topic_id,help_keyword_id) values (269,76);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,76);
-insert into help_relation (help_topic_id,help_keyword_id) values (269,77);
-insert into help_relation (help_topic_id,help_keyword_id) values (460,77);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,77);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,78);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,78);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,79);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,79);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,80);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,81);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,81);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,81);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,81);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,82);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,82);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,83);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,83);
-insert into help_relation (help_topic_id,help_keyword_id) values (304,84);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,84);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,84);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,84);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,85);
-insert into help_relation (help_topic_id,help_keyword_id) values (257,86);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,87);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,88);
-insert into help_relation (help_topic_id,help_keyword_id) values (129,89);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,90);
-insert into help_relation (help_topic_id,help_keyword_id) values (460,90);
-insert into help_relation (help_topic_id,help_keyword_id) values (17,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (416,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (439,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (328,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (189,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (302,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (488,91);
-insert into help_relation (help_topic_id,help_keyword_id) values (188,92);
-insert into help_relation (help_topic_id,help_keyword_id) values (99,92);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,93);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,93);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,94);
-insert into help_relation (help_topic_id,help_keyword_id) values (401,95);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,95);
-insert into help_relation (help_topic_id,help_keyword_id) values (69,96);
-insert into help_relation (help_topic_id,help_keyword_id) values (433,96);
-insert into help_relation (help_topic_id,help_keyword_id) values (330,96);
-insert into help_relation (help_topic_id,help_keyword_id) values (285,97);
-insert into help_relation (help_topic_id,help_keyword_id) values (85,98);
-insert into help_relation (help_topic_id,help_keyword_id) values (57,98);
-insert into help_relation (help_topic_id,help_keyword_id) values (28,98);
-insert into help_relation (help_topic_id,help_keyword_id) values (195,99);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,99);
-insert into help_relation (help_topic_id,help_keyword_id) values (486,99);
-insert into help_relation (help_topic_id,help_keyword_id) values (301,99);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,100);
-insert into help_relation (help_topic_id,help_keyword_id) values (282,100);
-insert into help_relation (help_topic_id,help_keyword_id) values (313,101);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,101);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,102);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,103);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,104);
-insert into help_relation (help_topic_id,help_keyword_id) values (30,104);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,104);
-insert into help_relation (help_topic_id,help_keyword_id) values (300,104);
-insert into help_relation (help_topic_id,help_keyword_id) values (186,104);
-insert into help_relation (help_topic_id,help_keyword_id) values (9,104);
-insert into help_relation (help_topic_id,help_keyword_id) values (276,104);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,105);
-insert into help_relation (help_topic_id,help_keyword_id) values (365,105);
-insert into help_relation (help_topic_id,help_keyword_id) values (109,106);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,107);
-insert into help_relation (help_topic_id,help_keyword_id) values (460,107);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,108);
-insert into help_relation (help_topic_id,help_keyword_id) values (24,108);
-insert into help_relation (help_topic_id,help_keyword_id) values (113,109);
-insert into help_relation (help_topic_id,help_keyword_id) values (174,109);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (200,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (243,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,110);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,111);
-insert into help_relation (help_topic_id,help_keyword_id) values (466,112);
-insert into help_relation (help_topic_id,help_keyword_id) values (326,112);
-insert into help_relation (help_topic_id,help_keyword_id) values (115,112);
-insert into help_relation (help_topic_id,help_keyword_id) values (470,112);
-insert into help_relation (help_topic_id,help_keyword_id) values (115,113);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,113);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,114);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,114);
-insert into help_relation (help_topic_id,help_keyword_id) values (38,115);
-insert into help_relation (help_topic_id,help_keyword_id) values (119,115);
-insert into help_relation (help_topic_id,help_keyword_id) values (264,115);
-insert into help_relation (help_topic_id,help_keyword_id) values (151,115);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,116);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,116);
-insert into help_relation (help_topic_id,help_keyword_id) values (419,117);
-insert into help_relation (help_topic_id,help_keyword_id) values (124,118);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,119);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,119);
-insert into help_relation (help_topic_id,help_keyword_id) values (125,119);
-insert into help_relation (help_topic_id,help_keyword_id) values (496,119);
-insert into help_relation (help_topic_id,help_keyword_id) values (221,120);
-insert into help_relation (help_topic_id,help_keyword_id) values (333,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (129,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (494,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (182,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (477,121);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,122);
-insert into help_relation (help_topic_id,help_keyword_id) values (262,123);
-insert into help_relation (help_topic_id,help_keyword_id) values (132,123);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,123);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,123);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (336,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (365,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (223,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (58,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (328,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (137,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (215,124);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,125);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,125);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,125);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,126);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,126);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,126);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,126);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,126);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,127);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,128);
-insert into help_relation (help_topic_id,help_keyword_id) values (424,129);
-insert into help_relation (help_topic_id,help_keyword_id) values (52,130);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,131);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,132);
-insert into help_relation (help_topic_id,help_keyword_id) values (314,133);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,134);
-insert into help_relation (help_topic_id,help_keyword_id) values (455,135);
-insert into help_relation (help_topic_id,help_keyword_id) values (255,136);
-insert into help_relation (help_topic_id,help_keyword_id) values (285,137);
-insert into help_relation (help_topic_id,help_keyword_id) values (249,138);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,138);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,139);
-insert into help_relation (help_topic_id,help_keyword_id) values (85,140);
-insert into help_relation (help_topic_id,help_keyword_id) values (57,140);
-insert into help_relation (help_topic_id,help_keyword_id) values (237,141);
-insert into help_relation (help_topic_id,help_keyword_id) values (52,142);
-insert into help_relation (help_topic_id,help_keyword_id) values (324,142);
-insert into help_relation (help_topic_id,help_keyword_id) values (85,143);
-insert into help_relation (help_topic_id,help_keyword_id) values (57,143);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,144);
-insert into help_relation (help_topic_id,help_keyword_id) values (313,145);
-insert into help_relation (help_topic_id,help_keyword_id) values (424,146);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,146);
-insert into help_relation (help_topic_id,help_keyword_id) values (455,146);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,146);
-insert into help_relation (help_topic_id,help_keyword_id) values (122,146);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,146);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,147);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,147);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,147);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,148);
-insert into help_relation (help_topic_id,help_keyword_id) values (28,149);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,150);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,151);
-insert into help_relation (help_topic_id,help_keyword_id) values (209,152);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,153);
-insert into help_relation (help_topic_id,help_keyword_id) values (313,153);
-insert into help_relation (help_topic_id,help_keyword_id) values (180,153);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,153);
-insert into help_relation (help_topic_id,help_keyword_id) values (420,153);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,154);
-insert into help_relation (help_topic_id,help_keyword_id) values (330,154);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,155);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,156);
-insert into help_relation (help_topic_id,help_keyword_id) values (180,157);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,158);
-insert into help_relation (help_topic_id,help_keyword_id) values (68,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (336,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (34,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (302,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (416,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (393,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (211,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (405,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (233,159);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,160);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,161);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,161);
-insert into help_relation (help_topic_id,help_keyword_id) values (252,162);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,163);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,164);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,164);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,165);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,165);
-insert into help_relation (help_topic_id,help_keyword_id) values (60,165);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,165);
-insert into help_relation (help_topic_id,help_keyword_id) values (176,166);
-insert into help_relation (help_topic_id,help_keyword_id) values (168,167);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,168);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,168);
-insert into help_relation (help_topic_id,help_keyword_id) values (415,168);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,168);
-insert into help_relation (help_topic_id,help_keyword_id) values (454,169);
-insert into help_relation (help_topic_id,help_keyword_id) values (30,169);
-insert into help_relation (help_topic_id,help_keyword_id) values (159,169);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,170);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,171);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,171);
-insert into help_relation (help_topic_id,help_keyword_id) values (190,172);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,173);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,173);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,173);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,173);
-insert into help_relation (help_topic_id,help_keyword_id) values (361,173);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,174);
-insert into help_relation (help_topic_id,help_keyword_id) values (86,174);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,174);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,175);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,175);
-insert into help_relation (help_topic_id,help_keyword_id) values (252,176);
-insert into help_relation (help_topic_id,help_keyword_id) values (249,177);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,177);
-insert into help_relation (help_topic_id,help_keyword_id) values (314,178);
-insert into help_relation (help_topic_id,help_keyword_id) values (500,178);
-insert into help_relation (help_topic_id,help_keyword_id) values (209,178);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,178);
-insert into help_relation (help_topic_id,help_keyword_id) values (24,178);
-insert into help_relation (help_topic_id,help_keyword_id) values (168,178);
-insert into help_relation (help_topic_id,help_keyword_id) values (128,178);
-insert into help_relation (help_topic_id,help_keyword_id) values (156,179);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,179);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,179);
-insert into help_relation (help_topic_id,help_keyword_id) values (411,180);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,181);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,182);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,182);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,182);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,182);
-insert into help_relation (help_topic_id,help_keyword_id) values (304,183);
-insert into help_relation (help_topic_id,help_keyword_id) values (101,183);
-insert into help_relation (help_topic_id,help_keyword_id) values (151,183);
-insert into help_relation (help_topic_id,help_keyword_id) values (145,184);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,184);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,185);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,185);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,186);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,187);
-insert into help_relation (help_topic_id,help_keyword_id) values (160,187);
-insert into help_relation (help_topic_id,help_keyword_id) values (455,188);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,189);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,190);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,190);
-insert into help_relation (help_topic_id,help_keyword_id) values (313,191);
-insert into help_relation (help_topic_id,help_keyword_id) values (180,191);
-insert into help_relation (help_topic_id,help_keyword_id) values (420,191);
-insert into help_relation (help_topic_id,help_keyword_id) values (200,191);
-insert into help_relation (help_topic_id,help_keyword_id) values (304,192);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,192);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,193);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,194);
-insert into help_relation (help_topic_id,help_keyword_id) values (377,194);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,195);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,196);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,196);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,196);
-insert into help_relation (help_topic_id,help_keyword_id) values (395,197);
-insert into help_relation (help_topic_id,help_keyword_id) values (465,198);
-insert into help_relation (help_topic_id,help_keyword_id) values (129,199);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,199);
-insert into help_relation (help_topic_id,help_keyword_id) values (182,199);
-insert into help_relation (help_topic_id,help_keyword_id) values (349,199);
-insert into help_relation (help_topic_id,help_keyword_id) values (137,199);
-insert into help_relation (help_topic_id,help_keyword_id) values (452,200);
-insert into help_relation (help_topic_id,help_keyword_id) values (85,201);
-insert into help_relation (help_topic_id,help_keyword_id) values (57,201);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,202);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,203);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,203);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,203);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,204);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,205);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,206);
-insert into help_relation (help_topic_id,help_keyword_id) values (249,207);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,208);
-insert into help_relation (help_topic_id,help_keyword_id) values (192,208);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,209);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,210);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,210);
-insert into help_relation (help_topic_id,help_keyword_id) values (221,211);
-insert into help_relation (help_topic_id,help_keyword_id) values (255,212);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,213);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,213);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,213);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,213);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,213);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,214);
-insert into help_relation (help_topic_id,help_keyword_id) values (260,215);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,216);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,216);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,217);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,217);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,217);
-insert into help_relation (help_topic_id,help_keyword_id) values (291,218);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,219);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,220);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,220);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,220);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,220);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,220);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,220);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,220);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,221);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,222);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,223);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,223);
-insert into help_relation (help_topic_id,help_keyword_id) values (309,223);
-insert into help_relation (help_topic_id,help_keyword_id) values (186,223);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,223);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,224);
-insert into help_relation (help_topic_id,help_keyword_id) values (277,225);
-insert into help_relation (help_topic_id,help_keyword_id) values (279,226);
-insert into help_relation (help_topic_id,help_keyword_id) values (464,227);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (304,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (87,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (101,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (60,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (308,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,228);
-insert into help_relation (help_topic_id,help_keyword_id) values (425,229);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,230);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,230);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,231);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,232);
-insert into help_relation (help_topic_id,help_keyword_id) values (466,233);
-insert into help_relation (help_topic_id,help_keyword_id) values (255,233);
-insert into help_relation (help_topic_id,help_keyword_id) values (272,234);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,235);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,236);
-insert into help_relation (help_topic_id,help_keyword_id) values (7,236);
-insert into help_relation (help_topic_id,help_keyword_id) values (257,237);
-insert into help_relation (help_topic_id,help_keyword_id) values (430,237);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,238);
-insert into help_relation (help_topic_id,help_keyword_id) values (226,238);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,238);
-insert into help_relation (help_topic_id,help_keyword_id) values (427,239);
-insert into help_relation (help_topic_id,help_keyword_id) values (87,240);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,240);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,240);
-insert into help_relation (help_topic_id,help_keyword_id) values (313,241);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,242);
-insert into help_relation (help_topic_id,help_keyword_id) values (314,243);
-insert into help_relation (help_topic_id,help_keyword_id) values (500,243);
-insert into help_relation (help_topic_id,help_keyword_id) values (209,243);
-insert into help_relation (help_topic_id,help_keyword_id) values (24,243);
-insert into help_relation (help_topic_id,help_keyword_id) values (168,243);
-insert into help_relation (help_topic_id,help_keyword_id) values (128,243);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,244);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,245);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,246);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,247);
-insert into help_relation (help_topic_id,help_keyword_id) values (385,248);
-insert into help_relation (help_topic_id,help_keyword_id) values (333,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (430,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (257,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,249);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,250);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,251);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,251);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (466,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (110,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (115,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (321,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (470,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (276,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (278,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (417,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (401,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (60,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (215,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,252);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,253);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,253);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,253);
-insert into help_relation (help_topic_id,help_keyword_id) values (365,253);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,253);
-insert into help_relation (help_topic_id,help_keyword_id) values (415,253);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,253);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,254);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,255);
-insert into help_relation (help_topic_id,help_keyword_id) values (30,255);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,255);
-insert into help_relation (help_topic_id,help_keyword_id) values (276,255);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,256);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,257);
-insert into help_relation (help_topic_id,help_keyword_id) values (305,258);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,259);
-insert into help_relation (help_topic_id,help_keyword_id) values (310,260);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,261);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,262);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,263);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,264);
-insert into help_relation (help_topic_id,help_keyword_id) values (329,265);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,265);
-insert into help_relation (help_topic_id,help_keyword_id) values (361,265);
-insert into help_relation (help_topic_id,help_keyword_id) values (315,266);
-insert into help_relation (help_topic_id,help_keyword_id) values (375,266);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,266);
-insert into help_relation (help_topic_id,help_keyword_id) values (209,267);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,268);
-insert into help_relation (help_topic_id,help_keyword_id) values (68,269);
-insert into help_relation (help_topic_id,help_keyword_id) values (488,269);
-insert into help_relation (help_topic_id,help_keyword_id) values (420,270);
-insert into help_relation (help_topic_id,help_keyword_id) values (246,271);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,272);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,273);
-insert into help_relation (help_topic_id,help_keyword_id) values (226,273);
-insert into help_relation (help_topic_id,help_keyword_id) values (326,274);
-insert into help_relation (help_topic_id,help_keyword_id) values (151,274);
-insert into help_relation (help_topic_id,help_keyword_id) values (454,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (97,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (302,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (278,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (309,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (211,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (77,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (17,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (22,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (393,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (60,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (358,275);
-insert into help_relation (help_topic_id,help_keyword_id) values (329,276);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,277);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,278);
-insert into help_relation (help_topic_id,help_keyword_id) values (234,279);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,280);
-insert into help_relation (help_topic_id,help_keyword_id) values (451,280);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,281);
-insert into help_relation (help_topic_id,help_keyword_id) values (39,282);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,282);
-insert into help_relation (help_topic_id,help_keyword_id) values (269,282);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,283);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,284);
-insert into help_relation (help_topic_id,help_keyword_id) values (378,285);
-insert into help_relation (help_topic_id,help_keyword_id) values (147,286);
-insert into help_relation (help_topic_id,help_keyword_id) values (107,287);
-insert into help_relation (help_topic_id,help_keyword_id) values (466,288);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,288);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,289);
-insert into help_relation (help_topic_id,help_keyword_id) values (417,290);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,291);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,291);
-insert into help_relation (help_topic_id,help_keyword_id) values (339,292);
-insert into help_relation (help_topic_id,help_keyword_id) values (344,293);
-insert into help_relation (help_topic_id,help_keyword_id) values (257,294);
-insert into help_relation (help_topic_id,help_keyword_id) values (269,295);
-insert into help_relation (help_topic_id,help_keyword_id) values (321,296);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,296);
-insert into help_relation (help_topic_id,help_keyword_id) values (193,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (68,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (333,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (69,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (336,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (7,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (134,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (278,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (10,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (282,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (137,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (215,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (17,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (21,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (349,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (82,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (223,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (25,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (145,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (294,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (358,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (424,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (33,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (365,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (160,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (488,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (487,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (39,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (309,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (492,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (308,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (170,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (58,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (393,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (328,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (330,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (122,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (192,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (451,297);
-insert into help_relation (help_topic_id,help_keyword_id) values (38,298);
-insert into help_relation (help_topic_id,help_keyword_id) values (305,298);
-insert into help_relation (help_topic_id,help_keyword_id) values (249,298);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,298);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,298);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,299);
-insert into help_relation (help_topic_id,help_keyword_id) values (326,300);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,301);
-insert into help_relation (help_topic_id,help_keyword_id) values (122,302);
-insert into help_relation (help_topic_id,help_keyword_id) values (350,302);
-insert into help_relation (help_topic_id,help_keyword_id) values (85,303);
-insert into help_relation (help_topic_id,help_keyword_id) values (57,303);
-insert into help_relation (help_topic_id,help_keyword_id) values (28,303);
-insert into help_relation (help_topic_id,help_keyword_id) values (327,303);
-insert into help_relation (help_topic_id,help_keyword_id) values (344,303);
-insert into help_relation (help_topic_id,help_keyword_id) values (496,303);
-insert into help_relation (help_topic_id,help_keyword_id) values (232,303);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,304);
-insert into help_relation (help_topic_id,help_keyword_id) values (147,305);
-insert into help_relation (help_topic_id,help_keyword_id) values (316,305);
-insert into help_relation (help_topic_id,help_keyword_id) values (314,306);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,307);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,308);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,309);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,309);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,309);
-insert into help_relation (help_topic_id,help_keyword_id) values (301,309);
-insert into help_relation (help_topic_id,help_keyword_id) values (255,309);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,310);
-insert into help_relation (help_topic_id,help_keyword_id) values (160,310);
-insert into help_relation (help_topic_id,help_keyword_id) values (141,311);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,312);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,312);
-insert into help_relation (help_topic_id,help_keyword_id) values (77,312);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,313);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,314);
-insert into help_relation (help_topic_id,help_keyword_id) values (182,315);
-insert into help_relation (help_topic_id,help_keyword_id) values (455,316);
-insert into help_relation (help_topic_id,help_keyword_id) values (111,317);
-insert into help_relation (help_topic_id,help_keyword_id) values (24,317);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,318);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,319);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,320);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,320);
-insert into help_relation (help_topic_id,help_keyword_id) values (390,321);
-insert into help_relation (help_topic_id,help_keyword_id) values (118,321);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,322);
-insert into help_relation (help_topic_id,help_keyword_id) values (25,323);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,323);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,324);
-insert into help_relation (help_topic_id,help_keyword_id) values (373,325);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,325);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,326);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,327);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,328);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,329);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,330);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,331);
-insert into help_relation (help_topic_id,help_keyword_id) values (378,331);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,332);
-insert into help_relation (help_topic_id,help_keyword_id) values (291,332);
-insert into help_relation (help_topic_id,help_keyword_id) values (419,332);
-insert into help_relation (help_topic_id,help_keyword_id) values (383,333);
-insert into help_relation (help_topic_id,help_keyword_id) values (424,334);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,334);
-insert into help_relation (help_topic_id,help_keyword_id) values (122,334);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,334);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,335);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,336);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,337);
-insert into help_relation (help_topic_id,help_keyword_id) values (86,338);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,338);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,339);
-insert into help_relation (help_topic_id,help_keyword_id) values (397,340);
-insert into help_relation (help_topic_id,help_keyword_id) values (88,341);
-insert into help_relation (help_topic_id,help_keyword_id) values (176,341);
-insert into help_relation (help_topic_id,help_keyword_id) values (151,341);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,342);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,343);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,343);
-insert into help_relation (help_topic_id,help_keyword_id) values (52,344);
-insert into help_relation (help_topic_id,help_keyword_id) values (324,344);
-insert into help_relation (help_topic_id,help_keyword_id) values (373,345);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,345);
-insert into help_relation (help_topic_id,help_keyword_id) values (9,345);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,346);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,347);
-insert into help_relation (help_topic_id,help_keyword_id) values (123,348);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,349);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,349);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,350);
-insert into help_relation (help_topic_id,help_keyword_id) values (407,351);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,352);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,353);
-insert into help_relation (help_topic_id,help_keyword_id) values (144,354);
-insert into help_relation (help_topic_id,help_keyword_id) values (24,355);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,356);
-insert into help_relation (help_topic_id,help_keyword_id) values (110,356);
-insert into help_relation (help_topic_id,help_keyword_id) values (222,356);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,356);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,357);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,357);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,357);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,358);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (439,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (159,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (373,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (226,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (60,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (233,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,359);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,360);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,360);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,361);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,362);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,362);
-insert into help_relation (help_topic_id,help_keyword_id) values (1,363);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,364);
-insert into help_relation (help_topic_id,help_keyword_id) values (349,364);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,365);
-insert into help_relation (help_topic_id,help_keyword_id) values (427,366);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,367);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,368);
-insert into help_relation (help_topic_id,help_keyword_id) values (477,368);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,368);
-insert into help_relation (help_topic_id,help_keyword_id) values (77,368);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,369);
-insert into help_relation (help_topic_id,help_keyword_id) values (465,370);
-insert into help_relation (help_topic_id,help_keyword_id) values (230,370);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,371);
-insert into help_relation (help_topic_id,help_keyword_id) values (69,372);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,372);
-insert into help_relation (help_topic_id,help_keyword_id) values (494,373);
-insert into help_relation (help_topic_id,help_keyword_id) values (276,374);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,375);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,376);
-insert into help_relation (help_topic_id,help_keyword_id) values (417,377);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,377);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,378);
-insert into help_relation (help_topic_id,help_keyword_id) values (327,378);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,379);
-insert into help_relation (help_topic_id,help_keyword_id) values (487,380);
-insert into help_relation (help_topic_id,help_keyword_id) values (417,381);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,382);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,382);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,383);
-insert into help_relation (help_topic_id,help_keyword_id) values (376,384);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,385);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,386);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,386);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,386);
-insert into help_relation (help_topic_id,help_keyword_id) values (443,387);
-insert into help_relation (help_topic_id,help_keyword_id) values (282,388);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,389);
-insert into help_relation (help_topic_id,help_keyword_id) values (448,390);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,391);
-insert into help_relation (help_topic_id,help_keyword_id) values (128,392);
-insert into help_relation (help_topic_id,help_keyword_id) values (10,393);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,393);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,394);
-insert into help_relation (help_topic_id,help_keyword_id) values (30,394);
-insert into help_relation (help_topic_id,help_keyword_id) values (276,394);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,395);
-insert into help_relation (help_topic_id,help_keyword_id) values (56,396);
-insert into help_relation (help_topic_id,help_keyword_id) values (84,397);
-insert into help_relation (help_topic_id,help_keyword_id) values (206,397);
-insert into help_relation (help_topic_id,help_keyword_id) values (456,397);
-insert into help_relation (help_topic_id,help_keyword_id) values (368,397);
-insert into help_relation (help_topic_id,help_keyword_id) values (84,398);
-insert into help_relation (help_topic_id,help_keyword_id) values (206,398);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,398);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,398);
-insert into help_relation (help_topic_id,help_keyword_id) values (312,398);
-insert into help_relation (help_topic_id,help_keyword_id) values (189,399);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,400);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,400);
-insert into help_relation (help_topic_id,help_keyword_id) values (326,401);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,402);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,403);
-insert into help_relation (help_topic_id,help_keyword_id) values (146,404);
-insert into help_relation (help_topic_id,help_keyword_id) values (324,404);
-insert into help_relation (help_topic_id,help_keyword_id) values (33,405);
-insert into help_relation (help_topic_id,help_keyword_id) values (460,406);
-insert into help_relation (help_topic_id,help_keyword_id) values (479,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (300,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (9,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (276,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (28,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (30,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (186,407);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,408);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,409);
-insert into help_relation (help_topic_id,help_keyword_id) values (269,410);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,411);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,412);
-insert into help_relation (help_topic_id,help_keyword_id) values (222,412);
-insert into help_relation (help_topic_id,help_keyword_id) values (331,412);
-insert into help_relation (help_topic_id,help_keyword_id) values (77,412);
-insert into help_relation (help_topic_id,help_keyword_id) values (313,413);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,414);
-insert into help_relation (help_topic_id,help_keyword_id) values (308,414);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,414);
-insert into help_relation (help_topic_id,help_keyword_id) values (424,415);
-insert into help_relation (help_topic_id,help_keyword_id) values (48,415);
-insert into help_relation (help_topic_id,help_keyword_id) values (122,415);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,415);
-insert into help_relation (help_topic_id,help_keyword_id) values (83,415);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,415);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,416);
-insert into help_relation (help_topic_id,help_keyword_id) values (60,416);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,416);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,416);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,416);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,417);
-insert into help_relation (help_topic_id,help_keyword_id) values (232,418);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,419);
-insert into help_relation (help_topic_id,help_keyword_id) values (3,420);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,420);
-insert into help_relation (help_topic_id,help_keyword_id) values (486,420);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,421);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,421);
-insert into help_relation (help_topic_id,help_keyword_id) values (470,422);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,422);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,423);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,423);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,424);
-insert into help_relation (help_topic_id,help_keyword_id) values (243,424);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,425);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,425);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,426);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,427);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,427);
-insert into help_relation (help_topic_id,help_keyword_id) values (129,428);
-insert into help_relation (help_topic_id,help_keyword_id) values (447,428);
-insert into help_relation (help_topic_id,help_keyword_id) values (349,428);
-insert into help_relation (help_topic_id,help_keyword_id) values (137,428);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,429);
-insert into help_relation (help_topic_id,help_keyword_id) values (473,429);
-insert into help_relation (help_topic_id,help_keyword_id) values (155,429);
-insert into help_relation (help_topic_id,help_keyword_id) values (309,429);
-insert into help_relation (help_topic_id,help_keyword_id) values (186,429);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,429);
-insert into help_relation (help_topic_id,help_keyword_id) values (84,430);
-insert into help_relation (help_topic_id,help_keyword_id) values (472,430);
-insert into help_relation (help_topic_id,help_keyword_id) values (368,430);
-insert into help_relation (help_topic_id,help_keyword_id) values (483,431);
-insert into help_relation (help_topic_id,help_keyword_id) values (466,432);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,433);
-insert into help_relation (help_topic_id,help_keyword_id) values (145,434);
-insert into help_relation (help_topic_id,help_keyword_id) values (38,434);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,434);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,434);
-insert into help_relation (help_topic_id,help_keyword_id) values (223,434);
-insert into help_relation (help_topic_id,help_keyword_id) values (52,434);
-insert into help_relation (help_topic_id,help_keyword_id) values (324,434);
-insert into help_relation (help_topic_id,help_keyword_id) values (257,435);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,436);
-insert into help_relation (help_topic_id,help_keyword_id) values (361,436);
-insert into help_relation (help_topic_id,help_keyword_id) values (491,437);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,438);
-insert into help_relation (help_topic_id,help_keyword_id) values (406,439);
-insert into help_relation (help_topic_id,help_keyword_id) values (89,439);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,439);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,440);
-insert into help_relation (help_topic_id,help_keyword_id) values (212,440);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,441);
-insert into help_relation (help_topic_id,help_keyword_id) values (496,442);
-insert into help_relation (help_topic_id,help_keyword_id) values (466,443);
-insert into help_relation (help_topic_id,help_keyword_id) values (326,443);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,443);
-insert into help_relation (help_topic_id,help_keyword_id) values (130,443);
-insert into help_relation (help_topic_id,help_keyword_id) values (115,443);
-insert into help_relation (help_topic_id,help_keyword_id) values (421,443);
-insert into help_relation (help_topic_id,help_keyword_id) values (470,443);
-insert into help_relation (help_topic_id,help_keyword_id) values (0,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (96,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (384,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (288,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (433,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (305,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (361,444);
-insert into help_relation (help_topic_id,help_keyword_id) values (497,445);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,446);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,447);
-insert into help_relation (help_topic_id,help_keyword_id) values (134,448);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,448);
-insert into help_relation (help_topic_id,help_keyword_id) values (294,448);
-insert into help_relation (help_topic_id,help_keyword_id) values (36,448);
-insert into help_relation (help_topic_id,help_keyword_id) values (495,449);
-insert into help_relation (help_topic_id,help_keyword_id) values (27,450);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,451);
-insert into help_relation (help_topic_id,help_keyword_id) values (22,451);
-insert into help_relation (help_topic_id,help_keyword_id) values (263,451);
-insert into help_relation (help_topic_id,help_keyword_id) values (347,452);
-insert into help_relation (help_topic_id,help_keyword_id) values (492,452);
-insert into help_relation (help_topic_id,help_keyword_id) values (199,453);
-insert into help_relation (help_topic_id,help_keyword_id) values (356,454);
-insert into help_relation (help_topic_id,help_keyword_id) values (104,454);
-insert into help_relation (help_topic_id,help_keyword_id) values (210,455);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,456);
-insert into help_relation (help_topic_id,help_keyword_id) values (106,456);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,456);
-insert into help_relation (help_topic_id,help_keyword_id) values (463,457);
-insert into help_relation (help_topic_id,help_keyword_id) values (194,458);
-insert into help_relation (help_topic_id,help_keyword_id) values (478,458);
-insert into help_relation (help_topic_id,help_keyword_id) values (459,459);
-insert into help_relation (help_topic_id,help_keyword_id) values (374,459);
-insert into help_relation (help_topic_id,help_keyword_id) values (39,460);
-insert into help_relation (help_topic_id,help_keyword_id) values (58,460);
-insert into help_relation (help_topic_id,help_keyword_id) values (269,460);
-insert into help_relation (help_topic_id,help_keyword_id) values (185,460);
-insert into help_relation (help_topic_id,help_keyword_id) values (264,460);
-insert into help_relation (help_topic_id,help_keyword_id) values (209,461);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,461);
-insert into help_relation (help_topic_id,help_keyword_id) values (201,462);
-insert into help_relation (help_topic_id,help_keyword_id) values (468,463);
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (1,9,'HELP_DATE','This help information was generated from the MariaDB Knowledge Base\non 2 September 2019.','','');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (2,2,'AREA','A synonym for ST_AREA.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygon-properties-area/','','https://mariadb.com/kb/en/polygon-properties-area/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (3,2,'CENTROID','A synonym for ST_CENTROID.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/centroid/','','https://mariadb.com/kb/en/centroid/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (4,2,'ExteriorRing','A synonym for ST_ExteriorRing.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/polygon-properties-exteriorring/','','https://mariadb.com/kb/en/polygon-properties-exteriorring/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (5,2,'InteriorRingN','A synonym for ST_InteriorRingN.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/polygon-properties-interiorringn/','','https://mariadb.com/kb/en/polygon-properties-interiorringn/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (6,2,'NumInteriorRings','A synonym for ST_NumInteriorRings.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/polygon-properties-numinteriorrings/','','https://mariadb.com/kb/en/polygon-properties-numinteriorrings/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (7,2,'ST_AREA','Syntax\n------ \nST_Area(poly)\nArea(poly)\n \nDescription\n----------- \nReturns as a double-precision number the area of the Polygon\nvalue poly, as measured in its spatial reference system.\n \nST_Area() and Area() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1\n1))\';\n \nSELECT Area(GeomFromText(@poly));\n+---------------------------+\n| Area(GeomFromText(@poly)) |\n+---------------------------+\n| 4 |\n+---------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_area/','','https://mariadb.com/kb/en/st_area/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (8,2,'ST_CENTROID','Syntax\n------ \nST_Centroid(mpoly)\nCentroid(mpoly)\n \nDescription\n----------- \nReturns a point reflecting the mathematical centroid\n(geometric center) for the MultiPolygon mpoly. The resulting\npoint will not necessarily be on the MultiPolygon. \n \nST_Centroid() and Centroid() are synonyms.\n \nExamples\n-------- \nSET @poly = ST_GeomFromText(\'POLYGON((0 0,20 0,20 20,0 20,0\n0))\');\nSELECT ST_AsText(ST_Centroid(@poly)) AS center;\n \n+--------------+\n| center |\n+--------------+\n| POINT(10 10) |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_centroid/','','https://mariadb.com/kb/en/st_centroid/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (9,2,'ST_ExteriorRing','Syntax\n------ \nST_ExteriorRing(poly)\nExteriorRing(poly)\n \nDescription\n----------- \nReturns the exterior ring of the Polygon value poly as a\nLineString.\n \nST_ExteriorRing() and ExteriorRing() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2\n1,1 1))\';\n \nSELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0) |\n+-------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_exteriorring/','','https://mariadb.com/kb/en/st_exteriorring/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (10,2,'ST_InteriorRingN','Syntax\n------ \nST_InteriorRingN(poly,N)\nInteriorRingN(poly,N)\n \nDescription\n----------- \nReturns the N-th interior ring for the Polygon value poly as\na LineString. Rings are numbered beginning with 1.\n \nST_InteriorRingN() and InteriorRingN() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2\n1,1 1))\';\n \nSELECT AsText(InteriorRingN(GeomFromText(@poly),1));\n+----------------------------------------------+\n| AsText(InteriorRingN(GeomFromText(@poly),1)) |\n+----------------------------------------------+\n| LINESTRING(1 1,1 2,2 2,2 1,1 1) |\n+----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_interiorringn/','','https://mariadb.com/kb/en/st_interiorringn/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (11,2,'ST_NumInteriorRings','Syntax\n------ \nST_NumInteriorRings(poly)\nNumInteriorRings(poly)\n \nDescription\n----------- \nReturns an integer containing the number of interior rings\nin the Polygon value poly.\n \nNote that according the the OpenGIS standard, a POLYGON\nshould have exactly one ExteriorRing and all other rings\nshould lie within that ExteriorRing and thus be the\nInteriorRings. Practically, however, some systems, including\nMariaDB\'s, permit polygons to have several\n\'ExteriorRings\'. In the case of there being multiple,\nnon-overlapping exterior rings ST_NumInteriorRings() will\nreturn 1.\n \nST_NumInteriorRings() and NumInteriorRings() are synonyms.\n \nExamples\n-------- \nSET @poly = \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2\n1,1 1))\';\n \nSELECT NumInteriorRings(GeomFromText(@poly));\n+---------------------------------------+\n| NumInteriorRings(GeomFromText(@poly)) |\n+---------------------------------------+\n| 1 |\n+---------------------------------------+\n \nNon-overlapping \'polygon\':\n \nSELECT ST_NumInteriorRings(ST_PolyFromText(\'POLYGON((0 0,10\n0,10 10,0 10,0 0),\n (-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))\')) AS NumInteriorRings;\n \n+------------------+\n| NumInteriorRings |\n+------------------+\n| 1 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_numinteriorrings/','','https://mariadb.com/kb/en/st_numinteriorrings/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (12,3,'WKT Definition','Description\n----------- \nThe Well-Known Text (WKT) representation of Geometry is\ndesigned to exchange geometry data in ASCII form. Examples\nof the basic geometry types include:\n \nGeometry Types | \n \nPOINT | \n \nLINESTRING | \n \nPOLYGON | \n \nMULTIPOINT | \n \nMULTILINESTRING | \n \nMULTIPOLYGON | \n \nGEOMETRYCOLLECTION | \n \nGEOMETRY | \n \n\n\nURL: https://mariadb.com/kb/en/wkt-definition/','','https://mariadb.com/kb/en/wkt-definition/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (13,3,'AsText','A synonym for ST_AsText().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-astext/','','https://mariadb.com/kb/en/wkt-astext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (14,3,'AsWKT','A synonym for ST_AsText().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-aswkt/','','https://mariadb.com/kb/en/wkt-aswkt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (15,3,'GeomCollFromText','A synonym for ST_GeomCollFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-geomcollfromtext/','','https://mariadb.com/kb/en/wkt-geomcollfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (16,3,'GeometryCollectionFromText','A synonym for ST_GeomCollFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometrycollectionfromtext/','','https://mariadb.com/kb/en/geometrycollectionfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (17,3,'GeometryFromText','A synonym for ST_GeomFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometryfromtext/','','https://mariadb.com/kb/en/geometryfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (18,3,'GeomFromText','A synonym for ST_GeomFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-geomfromtext/','','https://mariadb.com/kb/en/wkt-geomfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (19,3,'LineFromText','A synonym for ST_LineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-linefromtext/','','https://mariadb.com/kb/en/wkt-linefromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (20,3,'LineStringFromText','A synonym for ST_LineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestringfromtext/','','https://mariadb.com/kb/en/linestringfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (21,3,'MLineFromText','Syntax\n------ \nMLineFromText(wkt[,srid])\nMultiLineStringFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a MULTILINESTRING value using its WKT\nrepresentation and SRID.\n \nMLineFromText() and MultiLineStringFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_multi_line (g MULTILINESTRING);\nSHOW FIELDS FROM gis_multi_line;\n \nINSERT INTO gis_multi_line VALUES\n (MultiLineStringFromText(\'MULTILINESTRING((10 48,10 21,10\n0),(16 0,16 23,16 48))\')),\n (MLineFromText(\'MULTILINESTRING((10 48,10 21,10 0))\')),\n (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),\nPoint(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21,\n7))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mlinefromtext/','','https://mariadb.com/kb/en/mlinefromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (22,3,'MPointFromText','Syntax\n------ \nMPointFromText(wkt[,srid])\nMultiPointFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOINT value using its WKT representation\nand SRID.\n \nMPointFromText() and MultiPointFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_multi_point (g MULTIPOINT);\nSHOW FIELDS FROM gis_multi_point;\n \nINSERT INTO gis_multi_point VALUES\n (MultiPointFromText(\'MULTIPOINT(0 0,10 10,10 20,20\n20)\')),\n (MPointFromText(\'MULTIPOINT(1 1,11 11,11 21,21 21)\')),\n (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,\n10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpointfromtext/','','https://mariadb.com/kb/en/mpointfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (23,3,'MPolyFromText','Syntax\n------ \nMPolyFromText(wkt[,srid])\nMultiPolygonFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOLYGON value using its WKT representation\nand SRID.\n \nMPolyFromText() and MultiPolygonFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_multi_polygon (g MULTIPOLYGON);\nSHOW FIELDS FROM gis_multi_polygon;\n \nINSERT INTO gis_multi_polygon VALUES\n (MultiPolygonFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84\n42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67\n13,59 13,59 18)))\')),\n (MPolyFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28\n26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59\n13,59 18)))\')),\n (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,\n3), Point(3, 3), Point(3, 0), Point(0, 3)))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpolyfromtext/','','https://mariadb.com/kb/en/mpolyfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (24,3,'MultiLineStringFromText','A synonym for MLineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multilinestringfromtext/','','https://mariadb.com/kb/en/multilinestringfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (25,3,'MultiPointFromText','A synonym for MPointFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipointfromtext/','','https://mariadb.com/kb/en/multipointfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (26,3,'MultiPolygonFromText','A synonym for MPolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipolygonfromtext/','','https://mariadb.com/kb/en/multipolygonfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (27,3,'PointFromText','A synonym for ST_PointFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-pointfromtext/','','https://mariadb.com/kb/en/wkt-pointfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (28,3,'PolyFromText','A synonym for ST_PolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkt-polyfromtext/','','https://mariadb.com/kb/en/wkt-polyfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (29,3,'PolygonFromText','A synonym for ST_PolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygonfromtext/','','https://mariadb.com/kb/en/polygonfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (30,3,'ST_AsText','Syntax\n------ \nST_AsText(g)\nAsText(g)\nST_AsWKT(g)\nAsWKT(g)\n \nDescription\n----------- \nConverts a value in internal geometry format to its WKT\nrepresentation and returns the string result.\n \nST_AsText(), AsText(), ST_AsWKT() and AsWKT() are all\nsynonyms.\n \nExamples\n-------- \nSET @g = \'LineString(1 1,4 4,6 6)\';\n \nSELECT ST_AsText(ST_GeomFromText(@g));\n+--------------------------------+\n| ST_AsText(ST_GeomFromText(@g)) |\n+--------------------------------+\n| LINESTRING(1 1,4 4,6 6) |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_astext/','','https://mariadb.com/kb/en/st_astext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (31,3,'ST_ASWKT','A synonym for ST_ASTEXT().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_aswkt/','','https://mariadb.com/kb/en/st_aswkt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (32,3,'ST_GeomCollFromText','Syntax\n------ \nST_GeomCollFromText(wkt[,srid])\nST_GeometryCollectionFromText(wkt[,srid])\nGeomCollFromText(wkt[,srid])\nGeometryCollectionFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a GEOMETRYCOLLECTION value using its WKT \nrepresentation and SRID.\n \nST_GeomCollFromText(), ST_GeometryCollectionFromText(),\nGeomCollFromText() and GeometryCollectionFromText() are all\nsynonyms.\n \nExample\n \nCREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);\nSHOW FIELDS FROM gis_geometrycollection;\n \nINSERT INTO gis_geometrycollection VALUES\n (GeomCollFromText(\'GEOMETRYCOLLECTION(POINT(0 0),\nLINESTRING(0 0,10 10))\')),\n (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),\nLineString(Point(3, 6), Point(7, 9)))))),\n (GeomFromText(\'GeometryCollection()\')),\n (GeomFromText(\'GeometryCollection EMPTY\'));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomcollfromtext/','','https://mariadb.com/kb/en/st_geomcollfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (33,3,'ST_GeometryCollectionFromText','A synonym for ST_GeomCollFromText.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/st_geometrycollectionfromtext/','','https://mariadb.com/kb/en/st_geometrycollectionfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (34,3,'ST_GeometryFromText','A synonym for ST_GeomFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometryfromtext/','','https://mariadb.com/kb/en/st_geometryfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (35,3,'ST_GeomFromText','Syntax\n------ \nST_GeomFromText(wkt[,srid])\nST_GeometryFromText(wkt[,srid])\nGeomFromText(wkt[,srid])\nGeometryFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a geometry value of any type using its WKT\nrepresentation and SRID.\n \nGeomFromText(), GeometryFromText(), ST_GeomFromText() and\nST_GeometryFromText() are all synonyms.\n \nExample\n \nSET @g = ST_GEOMFROMTEXT(\'POLYGON((1 1,1 5,4 9,6 9,9 3,7\n2,1 1))\');\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomfromtext/','','https://mariadb.com/kb/en/st_geomfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (36,3,'ST_LineFromText','Syntax\n------ \nST_LineFromText(wkt[,srid])\nST_LineStringFromText(wkt[,srid])\nLineFromText(wkt[,srid])\nLineStringFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a LINESTRING value using its WKT representation\nand SRID.\n \nST_LineFromText(), ST_LineStringFromText(),\nST_LineFromText() and ST_LineStringFromText() are all\nsynonyms.\n \nExamples\n-------- \nCREATE TABLE gis_line (g LINESTRING);\nSHOW FIELDS FROM gis_line;\n \nINSERT INTO gis_line VALUES\n (LineFromText(\'LINESTRING(0 0,0 10,10 0)\')),\n (LineStringFromText(\'LINESTRING(10 10,20 10,20 20,10 20,10\n10)\')),\n (LineStringFromWKB(AsWKB(LineString(Point(10, 10),\nPoint(40, 10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linefromtext/','','https://mariadb.com/kb/en/st_linefromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (37,3,'ST_LineStringFromText','A synonym for ST_LineFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linestringfromtext/','','https://mariadb.com/kb/en/st_linestringfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (38,3,'ST_PointFromText','Syntax\n------ \nST_PointFromText(wkt[,srid])\nPointFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a POINT value using its WKT representation and\nSRID.\n \nST_PointFromText() and PointFromText() are synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_point (g POINT);\nSHOW FIELDS FROM gis_point;\n \nINSERT INTO gis_point VALUES\n (PointFromText(\'POINT(10 10)\')),\n (PointFromText(\'POINT(20 10)\')),\n (PointFromText(\'POINT(20 20)\')),\n (PointFromWKB(AsWKB(PointFromText(\'POINT(10 20)\'))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointfromtext/','','https://mariadb.com/kb/en/st_pointfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (39,3,'ST_PolyFromText','Syntax\n------ \nST_PolyFromText(wkt[,srid])\nST_PolygonFromText(wkt[,srid])\nPolyFromText(wkt[,srid])\nPolygonFromText(wkt[,srid])\n \nDescription\n----------- \nConstructs a POLYGON value using its WKT representation and\nSRID.\n \nST_PolyFromText(), ST_PolygonFromText(), PolyFromText() and\nST_PolygonFromText() are all synonyms.\n \nExamples\n-------- \nCREATE TABLE gis_polygon (g POLYGON);\nINSERT INTO gis_polygon VALUES\n (PolygonFromText(\'POLYGON((10 10,20 10,20 20,10 20,10\n10))\')),\n (PolyFromText(\'POLYGON((0 0,50 0,50 50,0 50,0 0), (10\n10,20 10,20 20,10 20,10 10))\'));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polyfromtext/','','https://mariadb.com/kb/en/st_polyfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (40,3,'ST_PolygonFromText','A synonym for ST_PolyFromText.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polygonfromtext/','','https://mariadb.com/kb/en/st_polygonfromtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (41,4,'Addition Operator (+)','Syntax\n------ \n+\n \nDescription\n----------- \nAddition.\n \nIf both operands are integers, the result is calculated with\nBIGINT precision. If either integer is unsigned, the result\nis also an unsigned integer.\n \nFor real or string operands, the operand with the highest\nprecision determines the result precision.\n \nExamples\n-------- \nSELECT 3+5;\n \n+-----+\n| 3+5 |\n+-----+\n| 8 |\n+-----+\n \n\n\nURL: https://mariadb.com/kb/en/addition-operator/','','https://mariadb.com/kb/en/addition-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (42,4,'Subtraction Operator (-)','Syntax\n------ \n-\n \nDescription\n----------- \nSubtraction. The operator is also used as the unary minus\nfor changing sign.\n \nIf both operands are integers, the result is calculated with\nBIGINT precision. If either integer is unsigned, the result\nis also an unsigned integer, unless the\nNO_UNSIGNED_SUBTRACTION SQL_MODE is enabled, in which case\nthe result is always signed.\n \nFor real or string operands, the operand with the highest\nprecision determines the result precision.\n \nExamples\n-------- \nSELECT 96-9;\n \n+------+\n| 96-9 |\n+------+\n| 87 |\n+------+\n \nSELECT 15-17;\n \n+-------+\n| 15-17 |\n+-------+\n| -2 |\n+-------+\n \nSELECT 3.66 + 1.333;\n \n+--------------+\n| 3.66 + 1.333 |\n+--------------+\n| 4.993 |\n+--------------+\n \nUnary minus:\n \n SELECT - (3+5);\n+---------+\n| - (3+5) |\n+---------+\n| -8 |\n+---------+\n \n\n\nURL: https://mariadb.com/kb/en/subtraction-operator-/','','https://mariadb.com/kb/en/subtraction-operator-/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (43,4,'Division Operator (/)','Syntax\n------ \n/\n \nDescription\n----------- \nDivision operator. Dividing by zero will return NULL. By\ndefault, returns four digits after the decimal. This is\ndetermined by the server system variable\ndiv_precision_increment which by default is four. It can be\nset from 0 to 30.\n \nDividing by zero returns NULL. If the\nERROR_ON_DIVISION_BY_ZERO SQL_MODE is used (the default\nsince MariaDB 10.2.4), a division by zero also produces a\nwarning.\n \nExamples\n-------- \nSELECT 4/5;\n \n+--------+\n| 4/5 |\n+--------+\n| 0.8000 |\n+--------+\n \nSELECT 300/(2-2);\n+-----------+\n| 300/(2-2) |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT 300/7;\n \n+---------+\n| 300/7 |\n+---------+\n| 42.8571 |\n+---------+\n \nChanging div_precision_increment for the session from the\ndefault of four to six:\n \nSET div_precision_increment = 6;\n \nSELECT 300/7;\n \n+-----------+\n| 300/7 |\n+-----------+\n| 42.857143 |\n+-----------+\n \nSELECT 300/7;\n \n+-----------+\n| 300/7 |\n+-----------+\n| 42.857143 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/division-operator/','','https://mariadb.com/kb/en/division-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (44,4,'Multiplication Operator (*)','Syntax\n------ \n*\n \nDescription\n----------- \nMultiplication operator.\n \nExamples\n-------- \nSELECT 7*6;\n \n+-----+\n| 7*6 |\n+-----+\n| 42 |\n+-----+\n \nSELECT 1234567890*9876543210;\n \n+-----------------------+\n| 1234567890*9876543210 |\n+-----------------------+\n| -6253480962446024716 |\n+-----------------------+\n \nSELECT 18014398509481984*18014398509481984.0;\n \n+---------------------------------------+\n| 18014398509481984*18014398509481984.0 |\n+---------------------------------------+\n| 324518553658426726783156020576256.0 |\n+---------------------------------------+\n \nSELECT 18014398509481984*18014398509481984;\n \n+-------------------------------------+\n| 18014398509481984*18014398509481984 |\n+-------------------------------------+\n| 0 |\n+-------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/multiplication-operator/','','https://mariadb.com/kb/en/multiplication-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (45,4,'Modulo Operator (%)','Syntax\n------ \nN % M\n \nDescription\n----------- \nModulo operator. Returns the remainder of N divided by M.\nSee also MOD.\n \nExamples\n-------- \nSELECT 1042 % 50;\n \n+-----------+\n| 1042 % 50 |\n+-----------+\n| 42 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/modulo-operator/','','https://mariadb.com/kb/en/modulo-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (46,4,'DIV','Syntax\n------ \nDIV\n \nDescription\n----------- \nInteger division. Similar to FLOOR(), but is safe with\nBIGINT values.\nIncorrect results may occur for non-integer operands that\nexceed BIGINT range.\n \nIf the ERROR_ON_DIVISION_BY_ZERO SQL_MODE is used, a\ndivision by zero produces an error. Otherwise, it returns\nNULL.\n \nThe remainder of a division can be obtained using the MOD\noperator.\n \nExamples\n-------- \nSELECT 300 DIV 7;\n \n+-----------+\n| 300 DIV 7 |\n+-----------+\n| 42 |\n+-----------+\n \nSELECT 300 DIV 0;\n \n+-----------+\n| 300 DIV 0 |\n+-----------+\n| NULL |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/div/','','https://mariadb.com/kb/en/div/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (47,4,'ABS','Syntax\n------ \nABS(X)\n \nDescription\n----------- \nReturns the absolute (non-negative) value of X. If X is not\na number, it is converted to a numeric type.\n \nExamples\n-------- \nSELECT ABS(42);\n+---------+\n| ABS(42) |\n+---------+\n| 42 |\n+---------+\n \nSELECT ABS(-42);\n+----------+\n| ABS(-42) |\n+----------+\n| 42 |\n+----------+\n \nSELECT ABS(DATE \'1994-01-01\');\n+------------------------+\n| ABS(DATE \'1994-01-01\') |\n+------------------------+\n| 19940101 |\n+------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/abs/','','https://mariadb.com/kb/en/abs/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (48,4,'ACOS','Syntax\n------ \nACOS(X)\n \nDescription\n----------- \nReturns the arc cosine of X, that is, the value whose cosine\nis X.\nReturns NULL if X is not in the range -1 to 1.\n \nExamples\n-------- \nSELECT ACOS(1);\n+---------+\n| ACOS(1) |\n+---------+\n| 0 |\n+---------+\n \nSELECT ACOS(1.0001);\n+--------------+\n| ACOS(1.0001) |\n+--------------+\n| NULL |\n+--------------+\n \nSELECT ACOS(0);\n+-----------------+\n| ACOS(0) |\n+-----------------+\n| 1.5707963267949 |\n+-----------------+\n \nSELECT ACOS(0.234);\n+------------------+\n| ACOS(0.234) |\n+------------------+\n| 1.33460644244679 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/acos/','','https://mariadb.com/kb/en/acos/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (49,4,'ASIN','Syntax\n------ \nASIN(X)\n \nDescription\n----------- \nReturns the arc sine of X, that is, the value whose sine is\nX. Returns\nNULL if X is not in the range -1 to 1.\n \nExamples\n-------- \nSELECT ASIN(0.2);\n+--------------------+\n| ASIN(0.2) |\n+--------------------+\n| 0.2013579207903308 |\n+--------------------+\n \nSELECT ASIN(\'foo\');\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n| 0 |\n+-------------+\n \nSHOW WARNINGS;\n \n+---------+------+-----------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\'\n|\n+---------+------+-----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/asin/','','https://mariadb.com/kb/en/asin/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (50,4,'ATAN','Syntax\n------ \nATAN(X)\n \nDescription\n----------- \nReturns the arc tangent of X, that is, the value whose\ntangent is X.\n \nExamples\n-------- \nSELECT ATAN(2);\n+--------------------+\n| ATAN(2) |\n+--------------------+\n| 1.1071487177940904 |\n+--------------------+\n \nSELECT ATAN(-2);\n+---------------------+\n| ATAN(-2) |\n+---------------------+\n| -1.1071487177940904 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/atan/','','https://mariadb.com/kb/en/atan/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (51,4,'ATAN2','Syntax\n------ \nATAN(Y,X), ATAN2(Y,X)\n \nDescription\n----------- \nReturns the arc tangent of the two variables X and Y. It is\nsimilar to\ncalculating the arc tangent of Y / X, except that the signs\nof both\narguments are used to determine the quadrant of the result.\n \nExamples\n-------- \nSELECT ATAN(-2,2);\n+---------------------+\n| ATAN(-2,2) |\n+---------------------+\n| -0.7853981633974483 |\n+---------------------+\n \nSELECT ATAN2(PI(),0);\n+--------------------+\n| ATAN2(PI(),0) |\n+--------------------+\n| 1.5707963267948966 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/atan2/','','https://mariadb.com/kb/en/atan2/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (52,4,'CEIL','Syntax\n------ \nCEIL(X)\n \nDescription\n----------- \nCEIL() is a synonym for CEILING().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ceil/','','https://mariadb.com/kb/en/ceil/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (53,4,'CEILING','Syntax\n------ \nCEILING(X)\n \nDescription\n----------- \nReturns the smallest integer value not less than X.\n \nExamples\n-------- \nSELECT CEILING(1.23);\n+---------------+\n| CEILING(1.23) |\n+---------------+\n| 2 |\n+---------------+\n \nSELECT CEILING(-1.23);\n+----------------+\n| CEILING(-1.23) |\n+----------------+\n| -1 |\n+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ceiling/','','https://mariadb.com/kb/en/ceiling/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (54,4,'CONV','Syntax\n------ \nCONV(N,from_base,to_base)\n \nDescription\n----------- \nConverts numbers between different number bases. Returns a\nstring\nrepresentation of the number N, converted from base\nfrom_base\nto base to_base.\n \nReturns NULL if any argument is NULL, or if the second or\nthird argument are not in the allowed range.\n \nThe argument N is interpreted as an integer, but may be\nspecified as an\ninteger or a string. The minimum base is 2 and the maximum\nbase is 36. If\nto_base is a negative number, N is regarded as a signed\nnumber.\nOtherwise, N is treated as unsigned. CONV() works with\n64-bit\nprecision.\n \nSome shortcuts for this function are also available: BIN(),\nOCT(), HEX(), UNHEX(). Also, MariaDB allows binary literal\nvalues and hexadecimal literal values.\n \nExamples\n-------- \nSELECT CONV(\'a\',16,2);\n+----------------+\n| CONV(\'a\',16,2) |\n+----------------+\n| 1010 |\n+----------------+\n \nSELECT CONV(\'6E\',18,8);\n+-----------------+\n| CONV(\'6E\',18,8) |\n+-----------------+\n| 172 |\n+-----------------+\n \nSELECT CONV(-17,10,-18);\n+------------------+\n| CONV(-17,10,-18) |\n+------------------+\n| -H |\n+------------------+\n \nSELECT CONV(12+\'10\'+\'10\'+0xa,10,10);\n+------------------------------+\n| CONV(12+\'10\'+\'10\'+0xa,10,10) |\n+------------------------------+\n| 42 |\n+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/conv/','','https://mariadb.com/kb/en/conv/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (55,4,'COS','Syntax\n------ \nCOS(X)\n \nDescription\n----------- \nReturns the cosine of X, where X is given in radians.\n \nExamples\n-------- \nSELECT COS(PI());\n+-----------+\n| COS(PI()) |\n+-----------+\n| -1 |\n+-----------\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/cos/','','https://mariadb.com/kb/en/cos/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (56,4,'COT','Syntax\n------ \nCOT(X)\n \nDescription\n----------- \nReturns the cotangent of X.\n \nExamples\n-------- \nSELECT COT(42);\n+--------------------+\n| COT(42) |\n+--------------------+\n| 0.4364167060752729 |\n+--------------------+\n \nSELECT COT(12);\n+---------------------+\n| COT(12) |\n+---------------------+\n| -1.5726734063976893 |\n+---------------------+\n \nSELECT COT(0);\nERROR 1690 (22003): DOUBLE value is out of range in\n\'cot(0)\'\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/cot/','','https://mariadb.com/kb/en/cot/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (57,4,'CRC32','Syntax\n------ \nCRC32(expr)\n \nDescription\n----------- \nComputes a cyclic redundancy check value and returns a\n32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The\nargument is\nexpected to be a string and (if possible) is treated as one\nif it is\nnot.\n \nExamples\n-------- \nSELECT CRC32(\'MariaDB\');\n+------------------+\n| CRC32(\'MariaDB\') |\n+------------------+\n| 4227209140 |\n+------------------+\n \nSELECT CRC32(\'mariadb\');\n+------------------+\n| CRC32(\'mariadb\') |\n+------------------+\n| 2594253378 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/crc32/','','https://mariadb.com/kb/en/crc32/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (58,4,'DEGREES','Syntax\n------ \nDEGREES(X)\n \nDescription\n----------- \nReturns the argument X, converted from radians to degrees.\n \nThis is the converse of the RADIANS() function.\n \nExamples\n-------- \nSELECT DEGREES(PI());\n+---------------+\n| DEGREES(PI()) |\n+---------------+\n| 180 |\n+---------------+\n \nSELECT DEGREES(PI() / 2);\n+-------------------+\n| DEGREES(PI() / 2) |\n+-------------------+\n| 90 |\n+-------------------+\n \nSELECT DEGREES(45);\n+-----------------+\n| DEGREES(45) |\n+-----------------+\n| 2578.3100780887 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/degrees/','','https://mariadb.com/kb/en/degrees/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (59,4,'EXP','Syntax\n------ \nEXP(X)\n \nDescription\n----------- \nReturns the value of e (the base of natural logarithms)\nraised to the\npower of X. The inverse of this function is LOG() (using a\nsingle\nargument only) or LN().\n \nIf X is NULL, this function returns NULL.\n \nExamples\n-------- \nSELECT EXP(2);\n+------------------+\n| EXP(2) |\n+------------------+\n| 7.38905609893065 |\n+------------------+\n \nSELECT EXP(-2);\n+--------------------+\n| EXP(-2) |\n+--------------------+\n| 0.1353352832366127 |\n+--------------------+\n \nSELECT EXP(0);\n+--------+\n| EXP(0) |\n+--------+\n| 1 |\n+--------+\n \nSELECT EXP(NULL);\n+-----------+\n| EXP(NULL) |\n+-----------+\n| NULL |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/exp/','','https://mariadb.com/kb/en/exp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (60,4,'FLOOR','Syntax\n------ \nFLOOR(X)\n \nDescription\n----------- \nReturns the largest integer value not greater than X.\n \nExamples\n-------- \nSELECT FLOOR(1.23);\n+-------------+\n| FLOOR(1.23) |\n+-------------+\n| 1 |\n+-------------+\n \nSELECT FLOOR(-1.23);\n+--------------+\n| FLOOR(-1.23) |\n+--------------+\n| -2 |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/floor/','','https://mariadb.com/kb/en/floor/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (61,4,'LN','Syntax\n------ \nLN(X)\n \nDescription\n----------- \nReturns the natural logarithm of X; that is, the base-e\nlogarithm of X.\nIf X is less than or equal to 0, or NULL, then NULL is\nreturned.\n \nThe inverse of this function is EXP().\n \nExamples\n-------- \nSELECT LN(2);\n+-------------------+\n| LN(2) |\n+-------------------+\n| 0.693147180559945 |\n+-------------------+\n \nSELECT LN(-2);\n+--------+\n| LN(-2) |\n+--------+\n| NULL |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ln/','','https://mariadb.com/kb/en/ln/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (62,4,'LOG','Syntax\n------ \nLOG(X), LOG(B,X)\n \nDescription\n----------- \nIf called with one parameter, this function returns the\nnatural\nlogarithm of X. If X is less than or equal to 0, then NULL\nis\nreturned.\n \nIf called with two parameters, it returns the logarithm of X\nto the base B. If B is \n\nURL: https://mariadb.com/kb/en/log/','','https://mariadb.com/kb/en/log/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (63,4,'LOG10','Syntax\n------ \nLOG10(X)\n \nDescription\n----------- \nReturns the base-10 logarithm of X.\n \nExamples\n-------- \nSELECT LOG10(2);\n+-------------------+\n| LOG10(2) |\n+-------------------+\n| 0.301029995663981 |\n+-------------------+\n \nSELECT LOG10(100);\n+------------+\n| LOG10(100) |\n+------------+\n| 2 |\n+------------+\n \nSELECT LOG10(-100);\n+-------------+\n| LOG10(-100) |\n+-------------+\n| NULL |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/log10/','','https://mariadb.com/kb/en/log10/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (64,4,'LOG2','Syntax\n------ \nLOG2(X)\n \nDescription\n----------- \nReturns the base-2 logarithm of X.\n \nExamples\n-------- \nSELECT LOG2(4398046511104);\n+---------------------+\n| LOG2(4398046511104) |\n+---------------------+\n| 42 |\n+---------------------+\n \nSELECT LOG2(65536);\n+-------------+\n| LOG2(65536) |\n+-------------+\n| 16 |\n+-------------+\n \nSELECT LOG2(-100);\n+------------+\n| LOG2(-100) |\n+------------+\n| NULL |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/log2/','','https://mariadb.com/kb/en/log2/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (65,4,'MOD','Syntax\n------ \nMOD(N,M), N % M, N MOD M\n \nDescription\n----------- \nModulo operation. Returns the remainder of N divided by M.\nSee also Modulo Operator.\n \nIf the ERROR_ON_DIVISION_BY_ZERO SQL_MODE is used, any\nnumber modulus zero produces an error. Otherwise, it returns\nNULL.\n \nThe integer part of a division can be obtained using DIV.\n \nExamples\n-------- \nSELECT 1042 % 50;\n \n+-----------+\n| 1042 % 50 |\n+-----------+\n| 42 |\n+-----------+\n \nSELECT MOD(234, 10);\n+--------------+\n| MOD(234, 10) |\n+--------------+\n| 4 |\n+--------------+\n \nSELECT 253 % 7;\n \n+---------+\n| 253 % 7 |\n+---------+\n| 1 |\n+---------+\n \nSELECT MOD(29,9);\n+-----------+\n| MOD(29,9) |\n+-----------+\n| 2 |\n+-----------+\n \nSELECT 29 MOD 9;\n \n+----------+\n| 29 MOD 9 |\n+----------+\n| 2 |\n+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mod/','','https://mariadb.com/kb/en/mod/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (66,4,'OCT','Syntax\n------ \nOCT(N)\n \nDescription\n----------- \nReturns a string representation of the octal value of N,\nwhere N is a longlong (BIGINT) number. This is equivalent to\nCONV(N,10,8). Returns NULL if N is NULL.\n \nExamples\n-------- \nSELECT OCT(34);\n+---------+\n| OCT(34) |\n+---------+\n| 42 |\n+---------+\n \nSELECT OCT(12);\n+---------+\n| OCT(12) |\n+---------+\n| 14 |\n+---------+\n \n\n\nURL: https://mariadb.com/kb/en/oct/','','https://mariadb.com/kb/en/oct/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (67,4,'PI','Syntax\n------ \nPI()\n \nDescription\n----------- \nReturns the value of π (pi). The default number of decimal\nplaces\ndisplayed is six, but MariaDB uses the full double-precision\nvalue\ninternally.\n \nExamples\n-------- \nSELECT PI();\n+----------+\n| PI() |\n+----------+\n| 3.141593 |\n+----------+\n \nSELECT PI()+0.0000000000000000000000;\n \n+-------------------------------+\n| PI()+0.0000000000000000000000 |\n+-------------------------------+\n| 3.1415926535897931159980 |\n+-------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/pi/','','https://mariadb.com/kb/en/pi/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (68,4,'POW','Syntax\n------ \nPOW(X,Y)\n \nDescription\n----------- \nReturns the value of X raised to the power of Y.\n \nPOWER() is a synonym.\n \nExamples\n-------- \nSELECT POW(2,3);\n+----------+\n| POW(2,3) |\n+----------+\n| 8 |\n+----------+\n \nSELECT POW(2,-2);\n+-----------+\n| POW(2,-2) |\n+-----------+\n| 0.25 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/pow/','','https://mariadb.com/kb/en/pow/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (69,4,'POWER','Syntax\n------ \nPOWER(X,Y)\n \nDescription\n----------- \nThis is a synonym for POW(), which returns the value of X\nraised to the power of Y.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/power/','','https://mariadb.com/kb/en/power/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (70,4,'RADIANS','Syntax\n------ \nRADIANS(X)\n \nDescription\n----------- \nReturns the argument X, converted from degrees to radians.\nNote that\nπ radians equals 180 degrees. \n \nThis is the converse of the DEGREES() function.\n \nExamples\n-------- \nSELECT RADIANS(45);\n+-------------------+\n| RADIANS(45) |\n+-------------------+\n| 0.785398163397448 |\n+-------------------+\n \nSELECT RADIANS(90);\n+-----------------+\n| RADIANS(90) |\n+-----------------+\n| 1.5707963267949 |\n+-----------------+\n \nSELECT RADIANS(PI());\n+--------------------+\n| RADIANS(PI()) |\n+--------------------+\n| 0.0548311355616075 |\n+--------------------+\n \nSELECT RADIANS(180);\n+------------------+\n| RADIANS(180) |\n+------------------+\n| 3.14159265358979 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/radians/','','https://mariadb.com/kb/en/radians/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (71,4,'RAND','Syntax\n------ \nRAND(), RAND(N)\n \nDescription\n----------- \nReturns a random DOUBLE precision floating point value v in\nthe range 0 \n\nURL: https://mariadb.com/kb/en/rand/','','https://mariadb.com/kb/en/rand/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (72,4,'ROUND','Syntax\n------ \nROUND(X), ROUND(X,D)\n \nDescription\n----------- \nRounds the argument X to D decimal places. The rounding\nalgorithm\ndepends on the data type of X. D defaults to 0 if not\nspecified.\nD can be negative to cause D digits left of the decimal\npoint of the\nvalue X to become zero.\n \nExamples\n-------- \nSELECT ROUND(-1.23);\n+--------------+\n| ROUND(-1.23) |\n+--------------+\n| -1 |\n+--------------+\n \nSELECT ROUND(-1.58);\n+--------------+\n| ROUND(-1.58) |\n+--------------+\n| -2 |\n+--------------+\n \nSELECT ROUND(1.58); \n+-------------+\n| ROUND(1.58) |\n+-------------+\n| 2 |\n+-------------+\n \nSELECT ROUND(1.298, 1);\n+-----------------+\n| ROUND(1.298, 1) |\n+-----------------+\n| 1.3 |\n+-----------------+\n \nSELECT ROUND(1.298, 0);\n+-----------------+\n| ROUND(1.298, 0) |\n+-----------------+\n| 1 |\n+-----------------+\n \nSELECT ROUND(23.298, -1);\n+-------------------+\n| ROUND(23.298, -1) |\n+-------------------+\n| 20 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/round/','','https://mariadb.com/kb/en/round/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (73,4,'SIGN','Syntax\n------ \nSIGN(X)\n \nDescription\n----------- \nReturns the sign of the argument as -1, 0, or 1, depending\non whether\nX is negative, zero, or positive.\n \nExamples\n-------- \nSELECT SIGN(-32);\n+-----------+\n| SIGN(-32) |\n+-----------+\n| -1 |\n+-----------+\n \nSELECT SIGN(0);\n+---------+\n| SIGN(0) |\n+---------+\n| 0 |\n+---------+\n \nSELECT SIGN(234);\n+-----------+\n| SIGN(234) |\n+-----------+\n| 1 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/sign/','','https://mariadb.com/kb/en/sign/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (74,4,'SIN','Syntax\n------ \nSIN(X)\n \nDescription\n----------- \nReturns the sine of X, where X is given in radians.\n \nExamples\n-------- \nSELECT SIN(1.5707963267948966);\n+-------------------------+\n| SIN(1.5707963267948966) |\n+-------------------------+\n| 1 |\n+-------------------------+\n \nSELECT SIN(PI());\n+----------------------+\n| SIN(PI()) |\n+----------------------+\n| 1.22460635382238e-16 |\n+----------------------+\n \nSELECT ROUND(SIN(PI()));\n+------------------+\n| ROUND(SIN(PI())) |\n+------------------+\n| 0 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sin/','','https://mariadb.com/kb/en/sin/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (75,4,'SQRT','Syntax\n------ \nSQRT(X)\n \nDescription\n----------- \nReturns the square root of X. If X is negative, NULL is\nreturned.\n \nExamples\n-------- \nSELECT SQRT(4);\n+---------+\n| SQRT(4) |\n+---------+\n| 2 |\n+---------+\n \nSELECT SQRT(20);\n+------------------+\n| SQRT(20) |\n+------------------+\n| 4.47213595499958 |\n+------------------+\n \nSELECT SQRT(-16);\n+-----------+\n| SQRT(-16) |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT SQRT(1764);\n+------------+\n| SQRT(1764) |\n+------------+\n| 42 |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sqrt/','','https://mariadb.com/kb/en/sqrt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (76,4,'TAN','Syntax\n------ \nTAN(X)\n \nDescription\n----------- \nReturns the tangent of X, where X is given in radians.\n \nExamples\n-------- \nSELECT TAN(0.7853981633974483);\n+-------------------------+\n| TAN(0.7853981633974483) |\n+-------------------------+\n| 0.9999999999999999 |\n+-------------------------+\n \nSELECT TAN(PI());\n+-----------------------+\n| TAN(PI()) |\n+-----------------------+\n| -1.22460635382238e-16 |\n+-----------------------+\n \nSELECT TAN(PI()+1);\n+-----------------+\n| TAN(PI()+1) |\n+-----------------+\n| 1.5574077246549 |\n+-----------------+\n \nSELECT TAN(RADIANS(PI()));\n+--------------------+\n| TAN(RADIANS(PI())) |\n+--------------------+\n| 0.0548861508080033 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/tan/','','https://mariadb.com/kb/en/tan/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (77,4,'TRUNCATE','This page documents the TRUNCATE function. See TRUNCATE\nTABLE for the DDL statement.\n \nSyntax\n------ \nTRUNCATE(X,D)\n \nDescription\n----------- \nReturns the number X, truncated to D decimal places. If D is\n0, the\nresult has no decimal point or fractional part. D can be\nnegative to\ncause D digits left of the decimal point of the value X to\nbecome\nzero.\n \nExamples\n-------- \nSELECT TRUNCATE(1.223,1);\n+-------------------+\n| TRUNCATE(1.223,1) |\n+-------------------+\n| 1.2 |\n+-------------------+\n \nSELECT TRUNCATE(1.999,1);\n+-------------------+\n| TRUNCATE(1.999,1) |\n+-------------------+\n| 1.9 |\n+-------------------+\n \nSELECT TRUNCATE(1.999,0); \n+-------------------+\n| TRUNCATE(1.999,0) |\n+-------------------+\n| 1 |\n+-------------------+\n \nSELECT TRUNCATE(-1.999,1);\n+--------------------+\n| TRUNCATE(-1.999,1) |\n+--------------------+\n| -1.9 |\n+--------------------+\n \nSELECT TRUNCATE(122,-2);\n+------------------+\n| TRUNCATE(122,-2) |\n+------------------+\n| 100 |\n+------------------+\n \nSELECT TRUNCATE(10.28*100,0);\n+-----------------------+\n| TRUNCATE(10.28*100,0) |\n+-----------------------+\n| 1028 |\n+-----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/truncate/','','https://mariadb.com/kb/en/truncate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (78,5,'Plugin Overview','Plugins are server components that enhance MariaDB in some\nway. These can be anything from new storage engines, plugins\nfor enhancing full-text parsing, or even small enhancements,\nsuch as a plugin to get a timestamp as an integer.\n \nQuerying Plugin Information\n \nThere are a number of ways to see which plugins are\ncurrently active.\n \nA server almost always has a large number of active plugins,\nbecause the server contains a large number of built-in\nplugins, which are active by default and cannot be\nuninstalled.\n \nQuerying Plugin Information with SHOW PLUGINS\n \nThe SHOW PLUGINS statement can be used to query information\nabout all active plugins.\n \nFor example:\n \nSHOW PLUGINS;\n \n+----------------------------+----------+--------------------+---------+---------+\n| Name | Status | Type | Library | License |\n+----------------------------+----------+--------------------+---------+---------+\n...\n| mysql_native_password | ACTIVE | AUTHENTICATION | NULL |\nGPL |\n| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL\n|\n| MRG_MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |\n...\n+----------------------------+----------+--------------------+---------+---------+\n \nIf a plugin\'s Library column has the NULL value, then the\nplugin is built-in, and it cannot be uninstalled.\n \nQuerying Plugin Information with information_schema.PLUGINS\n \nThe information_schema.PLUGINS table can be queried to get\nmore detailed information about plugins.\n \nFor example:\n \nSELECT * FROM information_schema.PLUGINS\\G\n...\n*************************** 6. row\n***************************\n PLUGIN_NAME: CSV\n PLUGIN_VERSION: 1.0\n PLUGIN_STATUS: ACTIVE\n PLUGIN_TYPE: STORAGE ENGINE\n PLUGIN_TYPE_VERSION: 100003.0\n PLUGIN_LIBRARY: NULL\nPLUGIN_LIBRARY_VERSION: NULL\n PLUGIN_AUTHOR: Brian Aker, MySQL AB\n PLUGIN_DESCRIPTION: CSV storage engine\n PLUGIN_LICENSE: GPL\n LOAD_OPTION: FORCE\n PLUGIN_MATURITY: Stable\n PLUGIN_AUTH_VERSION: 1.0\n*************************** 7. row\n***************************\n PLUGIN_NAME: MEMORY\n PLUGIN_VERSION: 1.0\n PLUGIN_STATUS: ACTIVE\n PLUGIN_TYPE: STORAGE ENGINE\n PLUGIN_TYPE_VERSION: 100003.0\n PLUGIN_LIBRARY: NULL\nPLUGIN_LIBRARY_VERSION: NULL\n PLUGIN_AUTHOR: MySQL AB\n PLUGIN_DESCRIPTION: Hash based, stored in memory, useful\nfor temporary tables\n PLUGIN_LICENSE: GPL\n LOAD_OPTION: FORCE\n PLUGIN_MATURITY: Stable\n PLUGIN_AUTH_VERSION: 1.0\n...\n \nIf a plugin\'s PLUGIN_LIBRARY column has the NULL value,\nthen the plugin is built-in, and it cannot be uninstalled.\n \nQuerying Plugin Information with mysql.plugin\n \nThe mysql.plugin table can be queried to get information\nabout installed plugins.\n \nThis table only contains information about plugins that have\nbeen installed via the following methods:\nThe INSTALL SONAME statement.\nThe INSTALL PLUGIN statement.\nThe mysql_plugin utility.\n \nThis table does not contain information about:\nBuilt-in plugins.\nPlugins loaded with the --plugin-load-add option.\nPlugins loaded with the --plugin-load option.\n \nThis table only contains enough information to reload the\nplugin when the server is restarted, which means it only\ncontains the plugin name and the plugin library.\n \nFor example:\n \nSELECT * FROM mysql.plugin;\n \n+------+------------+\n| name | dl |\n+------+------------+\n| PBXT | libpbxt.so |\n+------+------------+\n \nInstalling a Plugin\n \nThere are three primary ways to install a plugin:\nA plugin can be installed dynamically with an SQL statement.\nA plugin can be installed with a mysqld option, but it\nrequires a server restart.\nA plugin can be installed with the mysql_plugin utility,\nwhile the server is completely offline.\n \nWhen you are installing a plugin, you also have to ensure\nthat:\nThe server\'s plugin directory is properly configured, and\nthe plugin\'s library is in the plugin directory.\nThe server\'s minimum plugin maturity is properly\nconfigured, and the plugin is mature enough to be installed.\n \nInstalling a Plugin Dynamically\n \nA plugin can be installed dynamically by executing either\nthe INSTALL SONAME or the INSTALL PLUGIN statement.\n \nIf a plugin is installed with one of these statements, then\na record will be added to the mysql.plugins table for the\nplugin. This means that the plugin will automatically be\nloaded every time the server restarts, unless specifically\nuninstalled or deactivated.\n \nInstalling a Plugin with INSTALL SONAME\n \nYou can install a plugin dynamically by executing the\nINSTALL SONAME statement. INSTALL SONAME installs all\nplugins from the given plugin library. This could be\nrequired for some plugin libraries.\n \nFor example, to install all plugins in the server_audit\nplugin library (which is currently only the server_audit\naudit plugin), you could execute the following:\n \nINSTALL SONAME \'server_audit\';\n \nInstalling a Plugin with INSTALL PLUGIN\n \nYou can install a plugin dynamically by executing the\nINSTALL PLUGIN statement. INSTALL PLUGIN installs a single\nplugin from the given plugin library.\n \nFor example, to install the server_audit audit plugin from\nthe server_audit plugin library, you could execute the\nfollowing:\n \nINSTALL PLUGIN server_audit SONAME \'server_audit\';\n \nInstalling a Plugin with Plugin Load Options\n \nA plugin can be installed with a mysqld option by providing\neither the --plugin-load-add or the --plugin-load option.\n \nIf a plugin is installed with one of these options, then a\nrecord will not be added to the mysql.plugins table for the\nplugin. This means that if the server is restarted without\nthe same option set, then the plugin will not automatically\nbe loaded.\n \nInstalling a Plugin with --plugin-load-add\n \nYou can install a plugin with the --plugin-load-add option\nby specifying the option as a command-line argument to\nmysqld or by specifying the option in a relevant server\noption group in an option file.\n \nThe --plugin-load-add option uses the following format:\nPlugins can be specified in the format name=library, where\nname is the plugin name and library is the plugin library.\nThis format installs a single plugin from the given plugin\nlibrary.\nPlugins can also be specified in the format library, where\nlibrary is the plugin library. This format installs all\nplugins from the given plugin library.\nMultiple plugins can be specified by separating them with\nsemicolons.\n \nFor example, to install all plugins in the server_audit\nplugin library (which is currently only the server_audit\naudit plugin) and also the ed25519 authentication plugin\nfrom the auth_ed25519 plugin library, you could set the\noption to the following values on the command-line:\n \n$ mysqld --user=mysql --plugin-load-add=\'server_audit\'\n--plugin-load-add=\'ed25519=auth_ed25519\'\n \nYou could also set the option to the same values in an\noption file:\n \n[mariadb]\n...\nplugin_load_add = server_audit\nplugin_load_add = ed25519=auth_ed25519\n \nSpecial care must be taken when specifying both the\n--plugin-load option and the --plugin-load-add option\ntogether. The --plugin-load option resets the plugin load\nlist, and this can cause unexpected problems if you are not\naware. The --plugin-load-add option does not reset the\nplugin load list, so it is much safer to use. See Specifying\nMultiple Plugin Load Options for more information.\n \nInstalling a Plugin with --plugin-load\n \nYou can install a plugin with the --plugin-load option by\nspecifying the option as a command-line argument to mysqld\nor by specifying the option in a relevant server option\ngroup in an option file.\n \nThe --plugin-load option uses the following format:\nPlugins can be specified in the format name=library, where\nname is the plugin name and library is the plugin library.\nThis format installs a single plugin from the given plugin\nlibrary.\nPlugins can also be specified in the format library, where\nlibrary is the plugin library. This format installs all\nplugins from the given plugin library.\nMultiple plugins can be specified by separating them with\nsemicolons.\n \nFor example, to install all plugins in the server_audit\nplugin library (which is currently only the server_audit\naudit plugin) and also the ed25519 authentication plugin\nfrom the auth_ed25519 plugin library, you could set the\noption to the following values on the command-line:\n \n$ mysqld --user=mysql\n--plugin-load=\'server_audit;ed25519=auth_ed25519\'\n \nYou could also set the option to the same values in an\noption file:\n \n[mariadb]\n...\nplugin_load = server_audit;ed25519=auth_ed25519\n \nSpecial care must be taken when specifying the --plugin-load\noption multiple times, or when specifying both the\n--plugin-load option and the --plugin-load-add option\ntogether. The --plugin-load option resets the plugin load\nlist, and this can cause unexpected problems if you are not\naware. The --plugin-load-add option does not reset the\nplugin load list, so it is much safer to use. See Specifying\nMultiple Plugin Load Options for more information.\n \nSpecifying Multiple Plugin Load Options\n \nSpecial care must be taken when specifying the --plugin-load\noption multiple times, or when specifying both the\n--plugin-load option and the --plugin-load-add option. The\n--plugin-load option resets the plugin load list, and this\ncan cause unexpected problems if you are not aware. The\n--plugin-load-add option does not reset the plugin load\nlist, so it is much safer to use.\n \nThis can have the following consequences:\nIf the --plugin-load option is specified multiple times,\nthen only the last instance will have any effect. For\nexample, in the following case, the first instance of the\noption is reset:\n \n[mariadb]\n...\nplugin_load = server_audit\nplugin_load = ed25519=auth_ed25519\nIf the --plugin-load option is specified after the\n--plugin-load-add option, then it will also reset the\nchanges made by that option. For example, in the following\ncase, the --plugin-load-add option does not do anything,\nbecause the subsequent --plugin-load option resets the\nplugin load list:\n \n[mariadb]\n...\nplugin_load_add = server_audit\nplugin_load = ed25519=auth_ed25519\nIn contrast, if the --plugin-load option is specified before\nthe --plugin-load-add option, then it will work fine,\nbecause the --plugin-load-add option does not reset the\nplugin load list. For example, in the following case, both\nplugins are properly loaded:\n \n[mariadb]\n...\nplugin_load = server_audit\nplugin_load_add = ed25519=auth_ed25519\n \nInstalling a Plugin with mysql_plugin\n \nA plugin can be installed with the mysql_plugin utility if\nthe server is completely offline. \n \nThe syntax is:\n \nmysql_plugin [options] \n ENABLE|DISABLE\n \nFor example, to install the server_audit audit plugin, you\ncould execute the following:\n \nmysql_plugin server_audit ENABLE\n \nIf a plugin is installed with this utility, then a record\nwill be added to the mysql.plugins table for the plugin.\nThis means that the plugin will automatically be loaded\nevery time the server restarts, unless specifically\nuninstalled or deactivated.\n \nConfiguring the Plugin Directory\n \nWhen a plugin is being installed, the server looks for the\nplugin\'s library in the server\'s plugin directory. This\ndirectory is configured by the plugin_dir system variable.\nThis can be specified as a command-line argument to mysqld\nor it can be specified in a relevant server option group in\nan option file. For example:\n \n[mariadb]\n...\nplugin_dir = /usr/lib64/mysql/plugin\n \nConfiguring the Minimum Plugin Maturity\n \nWhen a plugin is being installed, the server compares the\nplugin\'s maturity level against the server\'s minimum\nallowed plugin maturity. This can help prevent users from\nusing unstable plugins on production servers. This minimum\nplugin maturity is configured by the plugin_maturity system\nvariable. This can be specified as a command-line argument\nto mysqld or it can be specified in a relevant server option\ngroup in an option file. For example:\n \n[mariadb]\n...\nplugin_maturity = stable\n \nConfiguring Plugin Activation at Server Startup\n \nA plugin will be loaded by default when the server starts\nif:\nThe plugin was installed with the INSTALL SONAME statement.\nThe plugin was installed with the INSTALL PLUGIN statement.\nThe plugin was installed with the mysql_plugin utility.\nThe server is configured to load the plugin with the\n--plugin-load-add option.\nThe server is configured to load the plugin with the\n--plugin-load option.\n \nThis behavior can be changed with special options that take\nthe form --plugin-name. For example, for the server_audit\naudit plugin, the special option is called --server-audit.\n \nThe possible values for these special options are:\n \nOption Value | Description | \n \nOFF | Disables the plugin without removing it from the\nmysql.plugins table. | \n \nON | Enables the plugin. If the plugin cannot be\ninitialized, then the server will still continue starting\nup, but the plugin will be disabled. | \n \nFORCE | Enables the plugin. If the plugin cannot be\ninitialized, then the server will fail to start with an\nerror. | \n \nFORCE_PLUS_PERMANENT | Enables the plugin. If the plugin\ncannot be initialized, then the server will fail to start\nwith an error. In addition, the plugin cannot be uninstalled\nwith UNINSTALL SONAME or UNINSTALL PLUGIN while the server\nis running. | \n \nA plugin\'s status can be found by looking at the\nPLUGIN_STATUS column of the information_schema.PLUGINS\ntable.\n \nUninstalling Plugins\n \nPlugins that are found in the mysql.plugin table, that is\nthose that were installed with INSTALL SONAME, INSTALL\nPLUGIN or mysql_plugin can be uninstalled in one of two\nways:\nThe UNINSTALL SONAME or the UNINSTALL PLUGIN statement while\nthe server is running\nWith mysql_plugin while the server is offline.\n \nPlugins that were enabled as a --plugin-load option do not\nneed to be uninstalled. If --plugin-load is omitted the next\ntime the server starts, or the plugin is not listed as one\nof the --plugin-load entries, the plugin will not be loaded.\n \nUNINSTALL PLUGIN uninstalls a single installed plugin, while\nUNINSTALL SONAME uninstalls all plugins belonging to a given\nlibrary.\n \n\n\nURL: https://mariadb.com/kb/en/plugin-overview/','','https://mariadb.com/kb/en/plugin-overview/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (79,5,'INSTALL PLUGIN','Syntax\n------ \nINSTALL PLUGIN [IF NOT EXISTS] plugin_name SONAME\n\'plugin_library\'\n \nDescription\n----------- \nThis statement installs an individual plugin from the\nspecified library. To install the whole library (which could\nbe required), use INSTALL SONAME.\n \nplugin_name is the name of the plugin as defined in the\nplugin declaration structure contained in the library file.\nPlugin names are\nnot case sensitive. For maximal compatibility, plugin names\nshould be limited\nto ASCII letters, digits, and underscore, because they are\nused in C source\nfiles, shell command lines, M4 and Bourne shell scripts, and\nSQL environments.\n \nplugin_library is the name of the shared library that\ncontains the plugin code. Before MariaDB 5.5.21, the name\nshould include the file name extension (for\nexample, libmyplugin.so or libmyplugin.dll). Starting from\nMariaDB 5.5.21, the file name extension can be omitted\n(which makes the statement look the same on all\narchitectures).\n \nThe shared library must be located in the plugin directory\n(that is,\nthe directory named by the plugin_dir system variable). The\nlibrary must be in the plugin directory itself, not in a\nsubdirectory. By\ndefault, plugin_dir is plugin directory under the directory\nnamed by\nthe pkglibdir configuration variable, but it can be changed\nby setting\nthe value of plugin_dir at server startup. For example, set\nits value in a my.cnf file:\n \n[mysqld]\nplugin_dir=/path/to/plugin/directory\nIf the value of plugin_dir is a relative path name, it is\ntaken to be relative to the MySQL base directory (the value\nof the basedir\nsystem variable).\n \nINSTALL PLUGIN adds a line to the mysql.plugin table that\ndescribes the plugin. This table contains the plugin name\nand library file\nname.\n \nINSTALL PLUGIN causes the server to read\noption (my.cnf) files just as during server startup. This\nenables the plugin to\npick up any relevant options from those files. It is\npossible to add plugin\noptions to an option file even before loading a plugin (if\nthe loose prefix is\nused). It is also possible to uninstall a plugin, edit\nmy.cnf, and install the\nplugin again. Restarting the plugin this way enables it to\nthe new option\nvalues without a server restart.\n \nBefore MySQL 5.1.33, a plugin was started with each option\nset to its\ndefault value.\n \nINSTALL PLUGIN also loads and initializes the plugin code to\nmake the plugin available for use. A plugin is initialized\nby executing its\ninitialization function, which handles any setup that the\nplugin must perform\nbefore it can be used.\n \nTo use INSTALL PLUGIN, you must have the\nINSERT privilege for the mysql.plugin table.\n \nAt server startup, the server loads and initializes any\nplugin that is\nlisted in the mysql.plugin table. This means that a plugin\nis installed\nwith INSTALL PLUGIN only once, not every time the server\nstarts. Plugin loading at startup does not occur if the\nserver is started with\nthe --skip-grant-tables option.\n \nWhen the server shuts down, it executes the deinitialization\nfunction\nfor each plugin that is loaded so that the plugin has a\nchance to\nperform any final cleanup.\n \nIf you need to load plugins for a single server startup when\nthe\n--skip-grant-tables option is given (which tells the server\nnot to read system tables), use the \n--plugin-load mysqld option.\n \nIF NOT EXISTS\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nnote instead of an error if the specified plugin already\nexists. See SHOW WARNINGS.\n \nExamples\n-------- \nINSTALL PLUGIN sphinx SONAME \'ha_sphinx.so\';\n \nStarting from MariaDB 5.5.21, the extension can be omitted:\n \nINSTALL PLUGIN innodb SONAME \'ha_xtradb\';\n \nFrom MariaDB 10.4.0:\n \nINSTALL PLUGIN IF NOT EXISTS example SONAME \'ha_example\';\n \nQuery OK, 0 rows affected (0.104 sec)\n \nINSTALL PLUGIN IF NOT EXISTS example SONAME \'ha_example\';\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------+\n| Note | 1968 | Plugin \'example\' already installed |\n+-------+------+------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/install-plugin/','','https://mariadb.com/kb/en/install-plugin/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (80,5,'UNINSTALL PLUGIN','Syntax\n------ \nUNINSTALL PLUGIN [IF EXISTS] plugin_name\n \nDescription\n----------- \nThis statement removes a single installed plugin. To\nuninstall the whole library which contains the plugin, use\nUNINSTALL SONAME. You cannot uninstall a plugin if any table\nthat uses it is open.\n \nplugin_name must be the name of some plugin that is listed\nin the mysql.plugin table. The server executes the plugin\'s\ndeinitialization\nfunction and removes the row for the plugin from the\nmysql.plugin\ntable, so that subsequent server restarts will not load and\ninitialize\nthe plugin. UNINSTALL PLUGIN does not remove the plugin\'s\nshared library file.\n \nTo use UNINSTALL PLUGIN, you must have the\nDELETE privilege for the mysql.plugin table.\n \nIF EXISTS\n \nIf the IF EXISTS clause is used, MariaDB will return a note\ninstead of an error if the plugin does not exist. See SHOW\nWARNINGS.\n \nExamples\n-------- \nUNINSTALL PLUGIN example;\n \nFrom MariaDB 10.4.0:\n \nUNINSTALL PLUGIN IF EXISTS example;\n \nQuery OK, 0 rows affected (0.099 sec)\n \nUNINSTALL PLUGIN IF EXISTS example;\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------------+\n| Note | 1305 | PLUGIN example does not exist |\n+-------+------+-------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/uninstall-plugin/','','https://mariadb.com/kb/en/uninstall-plugin/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (81,5,'INSTALL SONAME','INSTALL SONAME has been supported since MariaDB 5.5.21.\n \nSyntax\n------ \nINSTALL SONAME \'plugin_library\'\n \nDescription\n----------- \nThis statement is a variant of INSTALL PLUGIN. It installs\nall plugins from a given plugin_library. See INSTALL PLUGIN\nfor details.\n \nplugin_library is the name of the shared library that\ncontains the plugin code. The file name extension (for\nexample, libmyplugin.so or libmyplugin.dll) can be omitted\n(which makes the statement look the same on all\narchitectures).\n \nThe shared library must be located in the plugin directory\n(that is,\nthe directory named by the plugin_dir system variable). The\nlibrary must be in the plugin directory itself, not in a\nsubdirectory. By\ndefault, plugin_dir is plugin directory under the directory\nnamed by\nthe pkglibdir configuration variable, but it can be changed\nby setting\nthe value of plugin_dir at server startup. For example, set\nits value in a my.cnf file:\n \n[mysqld]\nplugin_dir=/path/to/plugin/directory\nIf the value of plugin_dir is a relative path name, it is\ntaken to be relative to the MySQL base directory (the value\nof the basedir\nsystem variable).\n \nINSTALL SONAME adds one or more lines to the mysql.plugin\ntable that\ndescribes the plugin. This table contains the plugin name\nand library file\nname.\n \nINSTALL SONAME causes the server to read\noption (my.cnf) files just as during server startup. This\nenables the plugin to\npick up any relevant options from those files. It is\npossible to add plugin\noptions to an option file even before loading a plugin (if\nthe loose prefix is\nused). It is also possible to uninstall a plugin, edit\nmy.cnf, and install the\nplugin again. Restarting the plugin this way enables it to\nthe new option\nvalues without a server restart.\n \nINSTALL SONAME also loads and initializes the plugin code to\nmake the plugin available for use. A plugin is initialized\nby executing its\ninitialization function, which handles any setup that the\nplugin must perform\nbefore it can be used.\n \nTo use INSTALL SONAME, you must have the\nINSERT privilege for the mysql.plugin table.\n \nAt server startup, the server loads and initializes any\nplugin that is\nlisted in the mysql.plugin table. This means that a plugin\nis installed\nwith INSTALL SONAME only once, not every time the server\nstarts. Plugin loading at startup does not occur if the\nserver is started with\nthe --skip-grant-tables option.\n \nWhen the server shuts down, it executes the deinitialization\nfunction\nfor each plugin that is loaded so that the plugin has a\nchance to\nperform any final cleanup.\n \nIf you need to load plugins for a single server startup when\nthe\n--skip-grant-tables option is given (which tells the server\nnot to read system tables), use the \n--plugin-load mysqld option.\n \nIf you need to install only one plugin from a library, use\nthe INSTALL PLUGIN statement.\n \nExamples\n-------- \nTo load the XtraDB storage engine and all of its\ninformation_schema tables with one statement, use\n \nINSTALL SONAME \'ha_xtradb\';\n \nThis statement can be used instead of INSTALL PLUGIN even\nwhen the library contains only one plugin:\n \nINSTALL SONAME \'ha_sequence\';\n \n\n\nURL: https://mariadb.com/kb/en/install-soname/','','https://mariadb.com/kb/en/install-soname/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (82,5,'UNINSTALL SONAME','UNINSTALL SONAME has been supported since MariaDB 5.5.21.\n \nSyntax\n------ \nUNINSTALL SONAME [IF EXISTS] \'plugin_library\'\n \nDescription\n----------- \nThis statement is a variant of UNINSTALL PLUGIN statement,\nthat removes all plugins belonging to a specified\nplugin_library. See UNINSTALL PLUGIN for details.\n \nplugin_library is the name of the shared library that\ncontains the plugin code. The file name extension (for\nexample, libmyplugin.so or libmyplugin.dll) can be omitted\n(which makes the statement look the same on all\narchitectures).\n \nTo use UNINSTALL SONAME, you must have the\nDELETE privilege for the mysql.plugin table.\n \nIF EXISTS\n \nIf the IF EXISTS clause is used, MariaDB will return a note\ninstead of an error if the plugin library does not exist.\nSee SHOW WARNINGS.\n \nExamples\n-------- \nTo uninstall the XtraDB plugin and all of its\ninformation_schema tables with one statement, use\n \nUNINSTALL SONAME \'ha_xtradb\';\n \nFrom MariaDB 10.4.0:\n \nUNINSTALL SONAME IF EXISTS \'ha_example\';\n \nQuery OK, 0 rows affected (0.099 sec)\n \nUNINSTALL SONAME IF EXISTS \'ha_example\';\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------------------+\n| Note | 1305 | SONAME ha_example.so does not exist |\n+-------+------+-------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/uninstall-soname/','','https://mariadb.com/kb/en/uninstall-soname/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (83,6,'MBR Definition','Description\n----------- \nThe MBR (Minimum Bounding Rectangle), or Envelope is the\nbounding\ngeometry, formed by the minimum and maximum (X,Y)\ncoordinates:\n \nExamples\n-------- \n((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbr-definition/','','https://mariadb.com/kb/en/mbr-definition/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (84,6,'MBRContains','Syntax\n------ \nMBRContains(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangle of\ng1 contains the Minimum Bounding Rectangle of g2. This tests\nthe\nopposite relationship as MBRWithin().\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\n \nSET @g2 = GeomFromText(\'Point(1 1)\');\n \nSELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);\n+----------------------+----------------------+\n| MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |\n+----------------------+----------------------+\n| 1 | 0 |\n+----------------------+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrcontains/','','https://mariadb.com/kb/en/mbrcontains/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (85,6,'MBRDisjoint','Syntax\n------ \nMBRDisjoint(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of the two geometries g1 and g2 are disjoint. Two\ngeometries are disjoint if they do not intersect, that is\ntouch or overlap.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECTmbrdisjoint(@g1,@g2);\n+----------------------+\n| mbrdisjoint(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrdisjoint(@g1,@g2);\n+----------------------+\n| mbrdisjoint(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrdisjoint/','','https://mariadb.com/kb/en/mbrdisjoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (86,6,'MBREqual','Syntax\n------ \nMBREqual(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of\nthe two geometries g1 and g2 are the same.\n \nExamples\n-------- \nSET @g1=GEOMFROMTEXT(\'LINESTRING(0 0, 1 2)\');\nSET @g2=GEOMFROMTEXT(\'POLYGON((0 0, 0 2, 1 2, 1 0, 0\n0))\');\nSELECT MbrEqual(@g1,@g2);\n+-------------------+\n| MbrEqual(@g1,@g2) |\n+-------------------+\n| 1 |\n+-------------------+\n \nSET @g1=GEOMFROMTEXT(\'LINESTRING(0 0, 1 3)\');\nSET @g2=GEOMFROMTEXT(\'POLYGON((0 0, 0 2, 1 4, 1 0, 0\n0))\');\nSELECT MbrEqual(@g1,@g2);\n+-------------------+\n| MbrEqual(@g1,@g2) |\n+-------------------+\n| 0 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrequal/','','https://mariadb.com/kb/en/mbrequal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (87,6,'MBRIntersects','Syntax\n------ \nMBRIntersects(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of the two geometries g1 and g2 intersect.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrintersects(@g1,@g2);\n+------------------------+\n| mbrintersects(@g1,@g2) |\n+------------------------+\n| 1 |\n+------------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECT mbrintersects(@g1,@g2);\n+------------------------+\n| mbrintersects(@g1,@g2) |\n+------------------------+\n| 0 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrintersects/','','https://mariadb.com/kb/en/mbrintersects/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (88,6,'MBROverlaps','Syntax\n------ \nMBROverlaps(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of\nthe two geometries g1 and g2 overlap. The term spatially\noverlaps is\nused if two geometries intersect and their intersection\nresults in a\ngeometry of the same dimension but not equal to either of\nthe given\ngeometries.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECT mbroverlaps(@g1,@g2);\n+----------------------+\n| mbroverlaps(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbroverlaps(@g1,@g2);\n+----------------------+\n| mbroverlaps(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 4,4 4,4 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbroverlaps(@g1,@g2);\n+----------------------+\n| mbroverlaps(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbroverlaps/','','https://mariadb.com/kb/en/mbroverlaps/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (89,6,'MBRTouches','Syntax\n------ \nMBRTouches(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangles of\nthe two geometries g1 and g2 touch. Two geometries spatially\ntouch if\nthe interiors of the geometries do not intersect, but the\nboundary of\none of the geometries intersects either the boundary or the\ninterior\nof the other.\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((4 4,4 7,7 7,7 4,4 4))\');\nSELECT mbrtouches(@g1,@g2);\n+---------------------+\n| mbrtouches(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrtouches(@g1,@g2);\n+---------------------+\n| mbrtouches(@g1,@g2) |\n+---------------------+\n| 1 |\n+---------------------+\n \nSET @g1 = GeomFromText(\'Polygon((0 0,0 4,4 4,4 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((3 3,3 6,6 6,6 3,3 3))\');\nSELECT mbrtouches(@g1,@g2);\n+---------------------+\n| mbrtouches(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrtouches/','','https://mariadb.com/kb/en/mbrtouches/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (90,6,'MBRWithin','Syntax\n------ \nMBRWithin(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether the Minimum Bounding\nRectangle of\ng1 is within the Minimum Bounding Rectangle of g2. This\ntests the\nopposite relationship as MBRContains().\n \nExamples\n-------- \nSET @g1 = GeomFromText(\'Polygon((0 0,0 3,3 3,3 0,0 0))\');\nSET @g2 = GeomFromText(\'Polygon((0 0,0 5,5 5,5 0,0 0))\');\nSELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);\n+--------------------+--------------------+\n| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |\n+--------------------+--------------------+\n| 1 | 0 |\n+--------------------+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mbrwithin/','','https://mariadb.com/kb/en/mbrwithin/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (91,7,'CASE OPERATOR','Syntax\n------ \nCASE value WHEN [compare_value] THEN result [WHEN\n[compare_value] THEN\nresult ...] [ELSE result] END\n \nCASE WHEN [condition] THEN result [WHEN [condition] THEN\nresult ...]\n[ELSE result] END\n \nDescription\n----------- \nThe first version returns the result where\nvalue=compare_value. The\nsecond version returns the result for the first condition\nthat is\ntrue. If there was no matching result value, the result\nafter ELSE is\nreturned, or NULL if there is no ELSE part.\n \nThere is also a CASE statement, which differs from the CASE\noperator described here.\n \nExamples\n-------- \nSELECT CASE 1 WHEN 1 THEN \'one\' WHEN 2 THEN \'two\' ELSE\n\'more\' END;\n \n+------------------------------------------------------------+\n| CASE 1 WHEN 1 THEN \'one\' WHEN 2 THEN \'two\' ELSE\n\'more\' END |\n+------------------------------------------------------------+\n| one |\n+------------------------------------------------------------+\n \nSELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n \n+--------------------------------------------+\n| CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END |\n+--------------------------------------------+\n| true |\n+--------------------------------------------+\n \nSELECT CASE BINARY \'B\' WHEN \'a\' THEN 1 WHEN \'b\' THEN 2\nEND;\n \n+-----------------------------------------------------+\n| CASE BINARY \'B\' WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END\n|\n+-----------------------------------------------------+\n| NULL |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/case-operator/','','https://mariadb.com/kb/en/case-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (92,7,'IF Function','Syntax\n------ \nIF(expr1,expr2,expr3)\n \nDescription\n----------- \nIf expr1 is TRUE (expr1 0 and expr1 NULL) then IF()\nreturns expr2; otherwise it returns expr3. IF() returns a\nnumeric\nor string value, depending on the context in which it is\nused.\n \nNote: There is also an IF statement which differs from the\nIF() function described here.\n \nExamples\n-------- \nSELECT IF(1>2,2,3);\n+-------------+\n| IF(1>2,2,3) |\n+-------------+\n| 3 |\n+-------------+\n \nSELECT IF(1\n\nURL: https://mariadb.com/kb/en/if-function/','','https://mariadb.com/kb/en/if-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (93,7,'IFNULL','Syntax\n------ \nIFNULL(expr1,expr2)\n \nDescription\n----------- \nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it\nreturns\nexpr2. IFNULL() returns a numeric or string value, depending\non the\ncontext in which it is used.\n \nExamples\n-------- \nSELECT IFNULL(1,0); \n+-------------+\n| IFNULL(1,0) |\n+-------------+\n| 1 |\n+-------------+\n \nSELECT IFNULL(NULL,10);\n+-----------------+\n| IFNULL(NULL,10) |\n+-----------------+\n| 10 |\n+-----------------+\n \nSELECT IFNULL(1/0,10);\n+----------------+\n| IFNULL(1/0,10) |\n+----------------+\n| 10.0000 |\n+----------------+\n \nSELECT IFNULL(1/0,\'yes\');\n+-------------------+\n| IFNULL(1/0,\'yes\') |\n+-------------------+\n| yes |\n+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/ifnull/','','https://mariadb.com/kb/en/ifnull/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (94,7,'NULLIF','Syntax\n------ \nNULLIF(expr1,expr2)\n \nDescription\n----------- \nReturns NULL if expr1 = expr2 is true, otherwise returns\nexpr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1\nEND.\n \nExamples\n-------- \nSELECT NULLIF(1,1);\n+-------------+\n| NULLIF(1,1) |\n+-------------+\n| NULL |\n+-------------+\n \nSELECT NULLIF(1,2);\n+-------------+\n| NULLIF(1,2) |\n+-------------+\n| 1 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/nullif/','','https://mariadb.com/kb/en/nullif/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (95,8,'CHANGE MASTER TO','Syntax\n------ \nCHANGE MASTER [\'connection_name\'] TO master_def [,\nmaster_def] ...\n \nmaster_def:\n MASTER_BIND = \'interface_name\'\n | MASTER_HOST = \'host_name\'[\n | MASTER_USER = \'user_name\'\n | MASTER_PASSWORD = \'password\'\n | MASTER_PORT = port_num\n | MASTER_CONNECT_RETRY = interval\n | MASTER_HEARTBEAT_PERIOD = interval\n | MASTER_LOG_FILE = \'master_log_name\'\n | MASTER_LOG_POS = master_log_pos\n | RELAY_LOG_FILE = \'relay_log_name\'\n | RELAY_LOG_POS = relay_log_pos\n | MASTER_DELAY = interval\n | MASTER_SSL = {0|1}\n | MASTER_SSL_CA = \'ca_file_name\'\n | MASTER_SSL_CAPATH = \'ca_directory_name\'\n | MASTER_SSL_CERT = \'cert_file_name\'\n | MASTER_SSL_CRL = \'crl_file_name\'\n | MASTER_SSL_CRLPATH = \'crl_directory_name\'\n | MASTER_SSL_KEY = \'key_file_name\'\n | MASTER_SSL_CIPHER = \'cipher_list\'\n | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n | MASTER_USE_GTID = {current_pos|slave_pos|no}\n | IGNORE_SERVER_IDS = (server_id_list)\n | DO_DOMAIN_IDS = ([N,..])\n | IGNORE_DOMAIN_IDS = ([N,..])\n \nDescription\n----------- \nThe CHANGE MASTER statement sets the options that a\nreplication slave uses to connect to and replicate from a\nreplication master. \n \nMariaDB until 10.0.7\n \nIn MariaDB 10.0.7 and before, the relay_log_purge system\nvariable was silently set to 0 when CHANGE MASTER was\nexecuted.\n \nMulti-Source Replication\n \nMulti-source replication was added in MariaDB 10.0.1.\n \nIf you are using multi-source replication, then you need to\nspecify a connection name when you execute CHANGE MASTER.\nThere are two ways to do this:\nSetting the default_master_connection system variable prior\nto executing CHANGE MASTER.\nSetting the connection_name parameter when executing CHANGE\nMASTER.\n \ndefault_master_connection\n \nSET default_master_connection = \'gandalf\';\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nconnection_name\n \nSTOP SLAVE \'gandalf\';\n \nCHANGE MASTER \'gandalf\' TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE \'gandalf\';\n \nOptions\n \nConnection Options\n \nMASTER_USER\n \nThe MASTER_USER option for CHANGE MASTER defines the user\naccount that the replication slave will use to connect to\nthe replication master.\n \nThis user account will need the REPLICATION SLAVE privilege\non the master.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_USER=\'repl\',\n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nMASTER_PASSWORD\n \nThe MASTER_USER option for CHANGE MASTER defines the\npassword that the replication slave will use to connect to\nthe replication master as the user account defined by the\nMASTER_USER option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nMASTER_HOST\n \nThe MASTER_HOST option for CHANGE MASTER defines the\nhostname or IP address of the replication master.\n \nIf you set the value of the MASTER_HOST option to the empty\nstring, then that is not the same as not setting the\noption\'s value at all. In MariaDB 5.5 and later, if you set\nthe value of the MASTER_HOST option to the empty string,\nthen the CHANGE MASTER command will fail with an error. In\nMariaDB 5.3 and before, if you set the value of the\nMASTER_HOST option to the empty string, then the CHANGE\nMASTER command would succeed, but the subsequent START SLAVE\ncommand would fail.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_HOST=\'dbserver1.example.com\',\n MASTER_USER=\'repl\',\n MASTER_PASSWORD=\'new3cret\',\n MASTER_USE_GTID=slave_pos;\n \nSTART SLAVE;\n \nIf you set the value of the MASTER_HOST option in a CHANGE\nMASTER command, then the slave assumes that the master is\ndifferent from before, even if you set the value of this\noption to the same value it had previously. In this\nscenario, the slave will consider the old values for the\nmaster\'s binary\nlog file name and position to be invalid for the new master.\nAs a side effect, if you do not explicitly set the values of\nthe MASTER_LOG_FILE and MASTER_LOG_POS options in the\nstatement, then the statement will be implicitly appended\nwith MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4. However, if\nyou enable GTID mode for replication by setting the\nMASTER_USE_GTID option to some value other than no in the\nstatement, then these values will effectively be ignored\nanyway.\n \nReplication slaves cannot connect to replication masters\nusing Unix socket files or Windows named pipes. The\nreplication slave must connect to the replication master\nusing TCP/IP.\n \nMASTER_PORT\n \nThe MASTER_PORT option for CHANGE MASTER defines the TCP/IP\nport of the replication master.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_HOST=\'dbserver1.example.com\',\n MASTER_PORT=3307,\n MASTER_USER=\'repl\',\n MASTER_PASSWORD=\'new3cret\',\n MASTER_USE_GTID=slave_pos;\n \nSTART SLAVE;\n \nIf you set the value of the MASTER_PORT option in a CHANGE\nMASTER command, then the slave assumes that the master is\ndifferent from before, even if you set the value of this\noption to the same value it had previously. In this\nscenario, the slave will consider the old values for the\nmaster\'s binary\nlog file name and position to be invalid for the new master.\nAs a side effect, if you do not explicitly set the values of\nthe MASTER_LOG_FILE and MASTER_LOG_POS options in the\nstatement, then the statement will be implicitly appended\nwith MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4. However, if\nyou enable GTID mode for replication by setting the\nMASTER_USE_GTID option to some value other than no in the\nstatement, then these values will effectively be ignored\nanyway.\n \nReplication slaves cannot connect to replication masters\nusing Unix socket files or Windows named pipes. The\nreplication slave must connect to the replication master\nusing TCP/IP.\n \nMASTER_CONNECT_RETRY\n \nThe MASTER_CONNECT_RETRY option for CHANGE MASTER defines\nhow many seconds that the slave will wait between connection\nretries. The default is 60.\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_CONNECT_RETRY=20;\n \nSTART SLAVE;\n \nThe number of connection attempts is limited by the\nmaster_retry_count option. It can be set either on the\ncommand-line or in a server option group in an option file\nprior to starting up the server. For example:\n \n[mariadb]\n...\nmaster_retry_count=4294967295\n \nMASTER_BIND\n \nThe MASTER_BIND option for CHANGE MASTER is only supported\nby MySQL 5.6.2 and later and by MySQL NDB Cluster 7.3.1 and\nlater. This option is not yet supported by MariaDB. See\nMDEV-19248 for more information.\n \nThe MASTER_BIND option for CHANGE MASTER can be used on\nreplication slaves that have multiple network interfaces to\nchoose which network interface the slave will use to connect\nto the master.\n \nMASTER_HEARTBEAT_PERIOD\n \nThe MASTER_HEARTBEAT_PERIOD option for CHANGE MASTER can be\nused to set the interval in seconds between replication\nheartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is\nreset.\n \nThis option\'s interval argument has the following\ncharacteristics:\nIt is a decimal value with a range of 0 to 4294967 seconds.\nIt has a resolution of hundredths of a second.\nIts smallest valid non-zero value is 0.001.\nIts default value is the value of the slave_net_timeout\nsystem variable divided by 2.\nIf it\'s set to 0, then heartbeats are disabled.\n \nHeartbeats are sent by the master only if there are no\nunsent events in the binary log file for a period longer\nthan the interval.\n \nIf the RESET SLAVE statement is executed, then the heartbeat\ninterval is reset to the default.\n \nIf the slave_net_timeout system variable is set to a value\nthat is lower than the current heartbeat interval, then a\nwarning will be issued.\n \nTLS Options\n \nThe TLS options are used for providing information about\nTLS. The options can be set even on slaves that are compiled\nwithout TLS support. The TLS options are saved to either the\ndefault master.info file or the file that is configured by\nthe master_info_file option, but these TLS options are\nignored unless the slave supports TLS.\n \nSee Replication with Secure Connections for more\ninformation.\n \nMASTER_SSL\n \nThe MASTER_SSL option for CHANGE MASTER tells the slave\nwhether to force TLS for the connection. The valid values\nare 0 or 1.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL=1;\n \nSTART SLAVE;\n \nMASTER_SSL_CA\n \nThe MASTER_SSL_CA option for CHANGE MASTER defines a path to\na PEM file that should contain one or more X509 certificates\nfor trusted Certificate Authorities (CAs) to use for TLS.\nThis option requires that you use the absolute path, not a\nrelative path. This option implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Authorities\n(CAs) for more information.\n \nMASTER_SSL_CAPATH\n \nThe MASTER_SSL_CAPATH option for CHANGE MASTER defines a\npath to a directory that contains one or more PEM files that\nshould each contain one X509 certificate for a trusted\nCertificate Authority (CA) to use for TLS. This option\nrequires that you use the absolute path, not a relative\npath. The directory specified by this option needs to be run\nthrough the openssl rehash command. This option implies the\nMASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CAPATH=\'/etc/my.cnf.d/certificates/ca/\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Authorities\n(CAs) for more information.\n \nMASTER_SSL_CERT\n \nThe MASTER_SSL_CERT option for CHANGE MASTER defines a path\nto the X509 certificate file to use for TLS. This option\nrequires that you use the absolute path, not a relative\npath. This option implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nMASTER_SSL_CRL\n \nThe MASTER_SSL_CRL option for CHANGE MASTER defines a path\nto a PEM file that should contain one or more revoked X509\ncertificates to use for TLS. This option requires that you\nuse the absolute path, not a relative path.\n \nThis option is only supported if the server was built with\nOpenSSL. If the server was built with yaSSL, then this\noption is not supported. See TLS and Cryptography Libraries\nUsed by MariaDB for more information about which libraries\nare used on which platforms.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1,\n MASTER_SSL_CRL=\'/etc/my.cnf.d/certificates/crl.pem\';\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Revocation\nLists (CRLs) for more information.\n \nMASTER_SSL_CRLPATH\n \nThe MASTER_SSL_CRLPATH option for CHANGE MASTER defines a\npath to a directory that contains one or more PEM files that\nshould each contain one revoked X509 certificate to use for\nTLS. This option requires that you use the absolute path,\nnot a relative path. The directory specified by this\nvariable needs to be run through the openssl rehash command.\n \nThis option is only supported if the server was built with\nOpenSSL. If the server was built with yaSSL, then this\noption is not supported. See TLS and Cryptography Libraries\nUsed by MariaDB for more information about which libraries\nare used on which platforms.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1,\n MASTER_SSL_CRLPATH=\'/etc/my.cnf.d/certificates/crl/\';\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Certificate Revocation\nLists (CRLs) for more information.\n \nMASTER_SSL_KEY\n \nThe MASTER_SSL_KEY option for CHANGE MASTER defines a path\nto a private key file to use for TLS. This option requires\nthat you use the absolute path, not a relative path. This\noption implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nMASTER_SSL_CIPHER\n \nThe MASTER_SSL_CIPHER option for CHANGE MASTER defines the\nlist of permitted ciphers or cipher suites to use for TLS.\nBesides cipher names, if MariaDB was compiled with OpenSSL,\nthis option could be set to \"SSLv3\" or \"TLSv1.2\" to\nallow all SSLv3 or all TLSv1.2 ciphers. Note that the\nTLSv1.3 ciphers cannot be excluded when using OpenSSL, even\nby using this option. See Using TLSv1.3 for details. This\noption implies the MASTER_SSL option.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1,\n MASTER_SSL_CIPHER=\'TLSv1.2\';\n \nSTART SLAVE;\n \nMASTER_SSL_VERIFY_SERVER_CERT\n \nThe MASTER_SSL_VERIFY_SERVER_CERT option for CHANGE MASTER\nenables server certificate verification. This option is\ndisabled by default.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_SSL_CERT=\'/etc/my.cnf.d/certificates/server-cert.pem\',\n MASTER_SSL_KEY=\'/etc/my.cnf.d/certificates/server-key.pem\',\n MASTER_SSL_CA=\'/etc/my.cnf.d/certificates/ca.pem\',\n MASTER_SSL_VERIFY_SERVER_CERT=1;\n \nSTART SLAVE;\n \nSee Secure Connections Overview: Server Certificate\nVerification for more information.\n \nBinary Log Options\n \nThese options are related to the binary log position on the\nmaster.\n \nMASTER_LOG_FILE\n \nThe MASTER_LOG_FILE option for CHANGE MASTER can be used\nalong with MASTER_LOG_POS to specify the coordinates at\nwhich the slave\'s I/O thread should begin reading from the\nmaster\'s binary logs the next time the thread starts.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4;\n \nSTART SLAVE;\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options cannot be\nspecified if the RELAY_LOG_FILE and RELAY_LOG_POS options\nwere also specified.\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options are\neffectively ignored if you enable GTID mode for replication\nby setting the MASTER_USE_GTID option to some value other\nthan no in the statement.\n \nMASTER_LOG_POS\n \nThe MASTER_LOG_POS option for CHANGE MASTER can be used\nalong with MASTER_LOG_FILE to specify the coordinates at\nwhich the slave\'s I/O thread should begin reading from the\nmaster\'s binary logs the next time the thread starts.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4;\n \nSTART SLAVE;\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options cannot be\nspecified if the RELAY_LOG_FILE and RELAY_LOG_POS options\nwere also specified.\n \nThe MASTER_LOG_FILE and MASTER_LOG_POS options are\neffectively ignored if you enable GTID mode for replication\nby setting the MASTER_USE_GTID option to some value other\nthan no in the statement.\n \nRelay Log Options\n \nThese options are related to the relay log position on the\nslave.\n \nRELAY_LOG_FILE\n \nThe RELAY_LOG_FILE option for CHANGE MASTER can be used\nalong with the RELAY_LOG_POS option to specify the\ncoordinates at which the slave\'s SQL thread should begin\nreading from the relay log the next time the thread starts.\n \nThe CHANGE MASTER statement usually deletes all relay log\nfiles. However, if the RELAY_LOG_FILE and/or RELAY_LOG_POS\noptions are specified, then existing relay log files are\nkept.\n \nWhen you want to change the relay log position, you only\nneed to stop the slave\'s SQL thread. The slave\'s I/O\nthread can continue running. The STOP SLAVE and START SLAVE\nstatements support the SQL_THREAD option for this scenario.\nFor example:\n \nSTOP SLAVE SQL_THREAD;\n \nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n \nSTART SLAVE SQL_THREAD;\n \nWhen the value of this option is changed, the metadata about\nthe slave\'s SQL thread\'s position in the relay logs will\nalso be changed in the relay-log.info file or the file that\nis configured by the relay_log_info_file system variable.\n \nThe RELAY_LOG_FILE and RELAY_LOG_POS options cannot be\nspecified if the MASTER_LOG_FILE and MASTER_LOG_POS options\nwere also specified.\n \nRELAY_LOG_POS\n \nThe RELAY_LOG_POS option for CHANGE MASTER can be used along\nwith the RELAY_LOG_FILE option to specify the coordinates at\nwhich the slave\'s SQL thread should begin reading from the\nrelay log the next time the thread starts.\n \nThe CHANGE MASTER statement usually deletes all relay log\nfiles. However, if the RELAY_LOG_FILE and/or RELAY_LOG_POS\noptions are specified, then existing relay log files are\nkept.\n \nWhen you want to change the relay log position, you only\nneed to stop the slave\'s SQL thread. The slave\'s I/O\nthread can continue running. The STOP SLAVE and START SLAVE\nstatements support the SQL_THREAD option for this scenario.\nFor example:\n \nSTOP SLAVE SQL_THREAD;\n \nCHANGE MASTER TO\n RELAY_LOG_FILE=\'slave-relay-bin.006\',\n RELAY_LOG_POS=4025;\n \nSTART SLAVE SQL_THREAD;\n \nWhen the value of this option is changed, the metadata about\nthe slave\'s SQL thread\'s position in the relay logs will\nalso be changed in the relay-log.info file or the file that\nis configured by the relay_log_info_file system variable.\n \nThe RELAY_LOG_FILE and RELAY_LOG_POS options cannot be\nspecified if the MASTER_LOG_FILE and MASTER_LOG_POS options\nwere also specified.\n \nGTID Options\n \nMASTER_USE_GTID\n \nThe MASTER_USE_GTID option for CHANGE MASTER was first added\nin MariaDB 10.0.2 to enable replication with Global\nTransaction IDs (GTIDs).\n \nThe MASTER_USE_GTID option for CHANGE MASTER can be used to\nconfigure the slave to use the global transaction ID (GTID)\nwhen connecting to a master. The possible values are:\ncurrent_pos - Replicate in GTID mode and use\ngtid_current_pos as the position to start downloading\ntransactions from the master.\nslave_pos - Replicate in GTID mode and use gtid_slave_pos as\nthe position to start downloading transactions from the\nmaster.\nno - Don\'t replicate in GTID mode.\n \nFor example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO\n MASTER_USE_GTID = current_pos;\n \nSTART SLAVE;\n \nOr:\n \nSTOP SLAVE;\n \nSET GLOBAL gtid_slave_pos=\'0-1-153\';\n \nCHANGE MASTER TO\n MASTER_USE_GTID = slave','','https://mariadb.com/kb/en/change-master-to/');
+update help_topic set description = CONCAT(description, '_pos;\n \nSTART SLAVE;\n \nReplication Filter Options\n \nIGNORE_SERVER_IDS\n \nThe IGNORE_SERVER_IDS option for CHANGE MASTER can be used\nto configure a replication slave to ignore binary log events\nthat originated from certain servers. Filtered binary log\nevents will not get logged to the slave’s relay log, and\nthey will not be applied by the slave.\n \nThe option\'s value can be specified by providing a\ncomma-separated list of server_id values. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_SERVER_IDS = (3,5);\nSTART SLAVE;\n \nIf you would like to clear a previously set list, then you\ncan set the value to an empty list. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_SERVER_IDS = ();\nSTART SLAVE;\n \nDO_DOMAIN_IDS\n \nThe DO_DOMAIN_IDS option for CHANGE MASTER was first added\nin MariaDB 10.1.2.\n \nThe DO_DOMAIN_IDS option for CHANGE MASTER can be used to\nconfigure a replication slave to only apply binary log\nevents if the transaction\'s GTID is in a specific\ngtid_domain_id value. Filtered binary log events will not\nget logged to the slave’s relay log, and they will not be\napplied by the slave.\n \nThe option\'s value can be specified by providing a\ncomma-separated list of gtid_domain_id values. Duplicate\nvalues are automatically ignored. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n DO_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nIf you would like to clear a previously set list, then you\ncan set the value to an empty list. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n DO_DOMAIN_IDS = ();\nSTART SLAVE;\n \nThe DO_DOMAIN_IDS option and the IGNORE_DOMAIN_IDS option\ncannot both be set to non-empty values at the same time. If\nyou want to set the DO_DOMAIN_IDS option, and the\nIGNORE_DOMAIN_IDS option was previously set, then you need\nto clear the value of the IGNORE_DOMAIN_IDS option. For\nexample:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_DOMAIN_IDS = (), \n DO_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nThe DO_DOMAIN_IDS option can only be specified if the slave\nis replicating in GTID mode. Therefore, the MASTER_USE_GTID\noption must also be set to some value other than no in order\nto use this option.\n \nIGNORE_DOMAIN_IDS\n \nThe IGNORE_DOMAIN_IDS option for CHANGE MASTER was first\nadded in MariaDB 10.1.2.\n \nThe IGNORE_DOMAIN_IDS option for CHANGE MASTER can be used\nto configure a replication slave to ignore binary log events\nif the transaction\'s GTID is in a specific gtid_domain_id\nvalue. Filtered binary log events will not get logged to the\nslave’s relay log, and they will not be applied by the\nslave.\n \nThe option\'s value can be specified by providing a\ncomma-separated list of gtid_domain_id values. Duplicate\nvalues are automatically ignored. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nIf you would like to clear a previously set list, then you\ncan set the value to an empty list. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n IGNORE_DOMAIN_IDS = ();\nSTART SLAVE;\n \nThe DO_DOMAIN_IDS option and the IGNORE_DOMAIN_IDS option\ncannot both be set to non-empty values at the same time. If\nyou want to set the IGNORE_DOMAIN_IDS option, and the\nDO_DOMAIN_IDS option was previously set, then you need to\nclear the value of the DO_DOMAIN_IDS option. For example:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n DO_DOMAIN_IDS = (), \n IGNORE_DOMAIN_IDS = (1,2);\nSTART SLAVE;\n \nThe IGNORE_DOMAIN_IDS option can only be specified if the\nslave is replicating in GTID mode. Therefore, the\nMASTER_USE_GTID option must also be set to some value other\nthan no in order to use this option.\n \nDelayed Replication Options\n \nMASTER_DELAY\n \nThe MASTER_DELAY option for CHANGE MASTER was first added in\nMariaDB 10.2.3 to enable delayed replication.\n \nThe MASTER_DELAY option for CHANGE MASTER can be used to\nenable delayed replication. This option specifies the time\nin seconds (at least) that a replication slave should lag\nbehind the master. Before executing an event, the slave will\nfirst wait, if necessary, until the given time has passed\nsince the event was created on the master. The result is\nthat the slave will reflect the state of the master some\ntime back in the past. The default is zero, no delay.\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_DELAY=3600;\n \nSTART SLAVE;\n \nChanging Option Values\n \nIf you don\'t specify a given option when executing the\nCHANGE MASTER statement, then the option keeps its old value\nin most cases. Most of the time, there is no need to specify\nthe options that do not need to change. For example, if the\npassword for the user account that the slave uses to connect\nto its master has changed, but no other options need to\nchange, then you can just change the MASTER_PASSWORD option\nby executing the following commands:\n \nSTOP SLAVE;\n \nCHANGE MASTER TO \n MASTER_PASSWORD=\'new3cret\';\n \nSTART SLAVE;\n \nThere are some cases where options are implicitly reset,\nsuch as when the MASTER_HOST and MASTER_PORT options are\nchanged.\n \nOption Persistence\n \nThe values of the MASTER_LOG_FILE and MASTER_LOG_POS options\n(i.e. the binary log position on the master) and most other\noptions are written to either the default master.info file\nor the file that is configured by the master_info_file\noption. The slave\'s I/O thread keeps this binary log\nposition updated as it downloads events only when\nMASTER_USE_GTID option\n is set to NO. Otherwise the file is not updated on a per\nevent basis.\n \nThe master_info_file option can be set either on the\ncommand-line or in a server option group in an option file\nprior to starting up the server. For example:\n \n[mariadb]\n...\nmaster_info_file=/mariadb/myserver1-master.info\n \nThe values of the RELAY_LOG_FILE and RELAY_LOG_POS options\n(i.e. the relay log position) are written to either the\ndefault relay-log.info file or the file that is configured\nby the relay_log_info_file system variable. The slave\'s SQL\nthread keeps this relay log position updated as it applies\nevents.\n \nThe relay_log_info_file system variable can be set either on\nthe command-line or in a server option group in an option\nfile prior to starting up the server. For example:\n \n[mariadb]\n...\nrelay_log_info_file=/mariadb/myserver1-relay-log.info\n \nGTID Persistence\n \nIf the slave is replicating binary log events that contain\nGTIDs, then the slave\'s SQL thread will write every GTID\nthat it applies to the mysql.gtid_slave_pos table. This GTID\ncan be inspected and modified through the gtid_slave_pos\nsystem variable.\n \nIf the slave has the log_slave_updates system variable\nenabled and if the slave has the binary log enabled, then\nevery write by the slave\'s SQL thread will also go into the\nslave\'s binary log. This means that GTIDs of replicated\ntransactions would be reflected in the value of the\ngtid_binlog_pos system variable.\n \nCreating a Slave from a Backup\n \nThe CHANGE MASTER statement is useful for setting up a slave\nwhen you have a backup of the master and you also have the\nbinary log position or GTID position corresponding to the\nbackup.\n \nAfter restoring the backup on the slave, you could execute\nsomething like this to use the binary log position:\n \nCHANGE MASTER TO\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4;\n \nSTART SLAVE;\n \nOr you could execute something like this to use the GTID\nposition:\n \nSET GLOBAL gtid_slave_pos=\'0-1-153\';\n \nCHANGE MASTER TO\n MASTER_USE_GTID=slave_pos;\n \nSTART SLAVE;\n \nSee Setting up a Replication Slave with Mariabackup for more\ninformation on how to do this with Mariabackup.\n \nExample\n \nThe following example changes the master and master\'s\nbinary log coordinates.\nThis is used when you want to set up the slave to replicate\nthe master:\n \nCHANGE MASTER TO\n MASTER_HOST=\'master2.mycompany.com\',\n MASTER_USER=\'replication\',\n MASTER_PASSWORD=\'bigs3cret\',\n MASTER_PORT=3306,\n MASTER_LOG_FILE=\'master2-bin.001\',\n MASTER_LOG_POS=4,\n MASTER_CONNECT_RETRY=10;\n \nSTART SLAVE;\n \n\n\nURL: https://mariadb.com/kb/en/change-master-to/') WHERE help_topic_id = 95;
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (96,8,'COMMIT','The COMMIT statement ends a transaction, saving any changes\nto the data so that they become visible to subsequent\ntransactions. Also, unlocks metadata changed by current\ntransaction. If autocommit is set to 1, an implicit commit\nis performed after each statement. Otherwise, all\ntransactions which don\'t end with an explicit COMMIT are\nimplicitly rollbacked and the changes are lost. The ROLLBACK\nstatement can be used to do this explicitly.\n \nThe required syntax for the COMMIT statement is as follows:\n \nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\n \nCOMMIT is the more important transaction terminator, as well\nas the more interesting one. The basic form of the COMMIT\nstatement is simply the keyword COMMIT (the keyword WORK is\nsimply noise and can be omitted without changing the\neffect).\n \nThe optional AND CHAIN clause is a convenience for\ninitiating a new transaction as soon as the old transaction\nterminates. If AND CHAIN is specified, then there is\neffectively nothing between the old and new transactions,\nalthough they remain separate. The characteristics of the\nnew transaction will be the same as the characteristics of\nthe old one — that is, the new transaction will have the\nsame access mode, isolation level and diagnostics area size\n(we\'ll discuss all of these shortly) as the transaction\njust terminated. \n \nRELEASE tells the server to disconnect the client\nimmediately after the current transaction.\n \nThere are NO RELEASE and AND NO CHAIN options. By default,\ncommits do not RELEASE or CHAIN, but it\'s possible to\nchange this default behavior with the completion_type server\nsystem variable. In this case, the AND NO CHAIN and NO\nRELEASE options override the server default.\n \n\n\nURL: https://mariadb.com/kb/en/commit/','','https://mariadb.com/kb/en/commit/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (97,8,'DEALLOCATE / DROP PREPARE','Syntax\n------ \n{DEALLOCATE | DROP} PREPARE stmt_name\n \nDescription\n----------- \nTo deallocate a prepared statement produced with PREPARE,\nuse a\nDEALLOCATE PREPARE statement that refers to the prepared\nstatement\nname.\n \nA prepared statement is implicitly deallocated when a new\nPREPARE command is issued. In that case, there is no need to\nuse DEALLOCATE.\n \nAttempting to execute a prepared statement after\ndeallocating it\nresults in an error, as if it was not prepared at all:\n \nERROR 1243 (HY000): Unknown prepared statement handler\n(stmt_name) given to EXECUTE\n \nIf the specified statement has not been PREPAREd, an error\nsimilar to the following will be produced:\n \nERROR 1243 (HY000): Unknown prepared statement handler\n(stmt_name) given to DEALLOCATE PREPARE\n \nExample\n \nSee example in PREPARE.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/deallocate-drop-prepared-statement/','','https://mariadb.com/kb/en/deallocate-drop-prepared-statement/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (98,8,'EXECUTE Statement','Syntax\n------ \nEXECUTE stmt_name\n [USING expression[, expression] ...]\n \nEXECUTE with expression as parameters was introduced in\nMariaDB 10.2.3. Before that one could only use variables\n(@var_name) as parameters.\n \nDescription\n----------- \nAfter preparing a statement with PREPARE, you execute it\nwith an\nEXECUTE statement that refers to the prepared statement\nname. If the\nprepared statement contains any parameter markers, you must\nsupply a\nUSING clause that lists user variables containing the values\nto be\nbound to the parameters. Parameter values can be supplied\nonly by user\nvariables, and the USING clause must name exactly as many\nvariables as\nthe number of parameter markers in the statement.\n \nYou can execute a given prepared statement multiple times,\npassing\ndifferent variables to it or setting the variables to\ndifferent values\nbefore each execution.\n \nIf the specified statement has not been PREPAREd, an error\nsimilar to the following is produced:\n \nERROR 1243 (HY000): Unknown prepared statement handler\n(stmt_name) given to EXECUTE\n \nExample\n \nSee example in PREPARE.\n \n\n\nURL: https://mariadb.com/kb/en/execute-statement/','','https://mariadb.com/kb/en/execute-statement/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (99,8,'EXECUTE IMMEDIATE','EXECUTE IMMEDIATE was introduced in MariaDB 10.2.3.\n \nSyntax\n------ \nEXECUTE IMMEDIATE statement\n \nDescription\n----------- \nEXECUTE IMMEDIATE executes a dynamic SQL statement created\non the fly, which can reduce performance overhead.\n \nFor example:\n \nEXECUTE IMMEDIATE \'SELECT 1\' \n \nwhich is shorthand for:\n \nprepare stmt from \"select 1\";\n \nexecute stmt;\n \ndeallocate prepare stmt;\n \nEXECUTE IMMEDIATE supports complex expressions as prepare\nsource and parameters:\n \nEXECUTE IMMEDIATE CONCAT(\'SELECT COUNT(*) FROM \', \'t1\',\n\' WHERE a=?\') USING 5+5;\n \nLimitations: subselects and stored function calls are not\nsupported as a prepare source.\n \nThe following examples return an error:\n \nCREATE OR REPLACE FUNCTION f1() RETURNS VARCHAR(64) RETURN\n\'SELECT * FROM t1\';\nEXECUTE IMMEDIATE f1();\nERROR 1970 (42000): EXECUTE IMMEDIATE does not support\nsubqueries or stored functions\n \nEXECUTE IMMEDIATE (SELECT \'SELECT * FROM t1\');\nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that \n corresponds to your MariaDB server version for the right\nsyntax to use near \n \'SELECT \'SELECT * FROM t1\')\' at line 1\n \nCREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN 10;\nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING f1();\nERROR 1970 (42000): EXECUTE..USING does not support\nsubqueries or stored functions\n \nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING\n(SELECT 10);\nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that \n corresponds to your MariaDB server version for the right\nsyntax to use near \n \'SELECT 10)\' at line 1\n \nOne can use a user or an SP variable as a workaround:\n \nCREATE OR REPLACE FUNCTION f1() RETURNS VARCHAR(64) RETURN\n\'SELECT * FROM t1\';\nSET @stmt=f1();\nEXECUTE IMMEDIATE @stmt;\n \nSET @stmt=(SELECT \'SELECT 1\');\nEXECUTE IMMEDIATE @stmt;\n \nCREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN 10;\nSET @param=f1();\nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING\n@param;\n \nSET @param=(SELECT 10);\nEXECUTE IMMEDIATE \'SELECT * FROM t1 WHERE a=?\' USING\n@param;\n \nEXECUTE IMMEDIATE supports user variables and SP variables\nas OUT parameters\n \nDELIMITER $$\nCREATE OR REPLACE PROCEDURE p1(OUT a INT)\nBEGIN\n SET a:= 10;\nEND;\n$$\nDELIMITER ;\nSET @a=2;\nEXECUTE IMMEDIATE \'CALL p1(?)\' USING @a;\nSELECT @a;\n+------+\n| @a |\n+------+\n| 10 |\n+------+\n \nSimilar to PREPARE, EXECUTE IMMEDIATE is allowed in stored\nprocedures but is not allowed in stored functions.\n \nThis example uses EXECUTE IMMEDIATE inside a stored\nprocedure:\n \nDELIMITER $$\nCREATE OR REPLACE PROCEDURE p1()\nBEGIN\n EXECUTE IMMEDIATE \'SELECT 1\';\nEND;\n$$\nDELIMITER ;\nCALL p1;\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n \nThis script returns an error:\n \nDELIMITER $$\nCREATE FUNCTION f1() RETURNS INT\nBEGIN\n EXECUTE IMMEDIATE \'DO 1\';\n RETURN 1;\nEND;\n$$\nERROR 1336 (0A000): Dynamic SQL is not allowed in stored\nfunction or trigger\n \nEXECUTE IMMEDIATE can use DEFAULT and IGNORE indicators as\nbind parameters:\n \nCREATE OR REPLACE TABLE t1 (a INT DEFAULT 10);\nEXECUTE IMMEDIATE \'INSERT INTO t1 VALUES (?)\' USING\nDEFAULT;\nSELECT * FROM t1;\n+------+\n| a |\n+------+\n| 10 |\n+------+\n \nEXECUTE IMMEDIATE increments the Com_execute_immediate\nstatus variable, as well as the Com_stmt_prepare,\nCom_stmt_execute and Com_stmt_close status variables.\n \nNote, EXECUTE IMMEDIATE does not increment the\nCom_execute_sql status variable. Com_execute_sql is used\nonly for PREPARE..EXECUTE.\n \nThis session screenshot demonstrates how EXECUTE IMMEDIATE\naffects status variables:\n \nSELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE\nVARIABLE_NAME RLIKE \n (\'COM_(EXECUTE|STMT_PREPARE|STMT_EXECUTE|STMT_CLOSE)\');\n \n+-----------------------+----------------+\n| VARIABLE_NAME | VARIABLE_VALUE |\n+-----------------------+----------------+\n| COM_EXECUTE_IMMEDIATE | 0 |\n| COM_EXECUTE_SQL | 0 |\n| COM_STMT_CLOSE | 0 |\n| COM_STMT_EXECUTE | 0 |\n| COM_STMT_PREPARE | 0 |\n+-----------------------+----------------+\n \nEXECUTE IMMEDIATE \'SELECT 1\';\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n \nSELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE\nVARIABLE_NAME RLIKE \n (\'COM_(EXECUTE|STMT_PREPARE|STMT_EXECUTE|STMT_CLOSE)\');\n+-----------------------+----------------+\n| VARIABLE_NAME | VARIABLE_VALUE |\n+-----------------------+----------------+\n| COM_EXECUTE_IMMEDIATE | 1 |\n| COM_EXECUTE_SQL | 0 |\n| COM_STMT_CLOSE | 1 |\n| COM_STMT_EXECUTE | 1 |\n| COM_STMT_PREPARE | 1 |\n+-----------------------+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/execute-immediate/','','https://mariadb.com/kb/en/execute-immediate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (100,8,'LOCK TABLES','Syntax\n------ \nLOCK TABLE[S]\n tbl_name [[AS] alias] lock_type\n [, tbl_name [[AS] alias] lock_type] ...\n [WAIT n|NOWAIT]\n \nlock_type:\n READ [LOCAL]\n | [LOW_PRIORITY] WRITE\n | WRITE CONCURRENT\n \nUNLOCK TABLES\n \nDescription\n----------- \nThe lock_type can be one of:\n \nOption | Description | \n \nREAD | Read lock, no writes allowed | \n \nREAD LOCAL | Read lock, but allow concurrent inserts | \n \nWRITE | Exclusive write lock. No other connections can read\nor write to this table | \n \nLOW_PRIORITY WRITE | Exclusive write lock, but allow new\nread locks on the table until we get the write lock. | \n \nWRITE CONCURRENT | Exclusive write lock, but allow READ\nLOCAL locks to the table. | \n \nMariaDB enables client sessions to acquire table locks\nexplicitly for the\npurpose of cooperating with other sessions for access to\ntables, or to\nprevent other sessions from modifying tables during periods\nwhen a\nsession requires exclusive access to them. A session can\nacquire or\nrelease locks only for itself. One session cannot acquire\nlocks for\nanother session or release locks held by another session.\n \nLocks may be used to emulate transactions or to get more\nspeed when\nupdating tables.\n \nLOCK TABLES explicitly acquires table locks for the current\nclient session.\nTable locks can be acquired for base tables or views. To use\nLOCK TABLES,\nyou must have the LOCK TABLES privilege, and the SELECT\nprivilege for\neach object to be locked. See GRANT\n \nFor view locking, LOCK TABLES adds all base tables used in\nthe view to the\nset of tables to be locked and locks them automatically. If\nyou lock a table\nexplicitly with LOCK TABLES, any tables used in triggers are\nalso locked\nimplicitly, as described in Triggers and Implicit Locks.\n \nUNLOCK TABLES explicitly releases any table locks held by\nthe\ncurrent session.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nLimitations\n \nLOCK TABLES doesn\'t work when using Galera cluster. You may\nexperience crashes or locks when used with Galera.\n \nLOCK TABLES works on XtraDB/InnoDB tables only if the\ninnodb_table_locks system variable is set to 1 (the default)\nand autocommit is set to 0 (1 is default). Please note that\nno error message will be returned on LOCK TABLES with\ninnodb_table_locks = 0.\n \nLOCK TABLES implicitly commits the active transaction, if\nany. Also, starting a transaction always releases all table\nlocks acquired with LOCK TABLES. This means that there is no\nway to have table locks and an active transaction at the\nsame time. The only exceptions are the transactions in\nautocommit mode. To preserve the data integrity between\ntransactional and non-transactional tables, the GET_LOCK()\nfunction can be used.\n \nWhile a connection holds an explicit read lock on a table,\nit cannot modify it. If you try, the following error will be\nproduced:\n \nERROR 1099 (HY000): Table \'tab_name\' was locked with a\nREAD lock and can\'t be updated\n \nWhile a connection holds an explicit lock on a table, it\ncannot access a non-locked table. If you try, the following\nerror will be produced:\n \nERROR 1100 (HY000): Table \'tab_name\' was not locked with\nLOCK TABLES\n \nWhile a connection holds an explicit lock on a table, it\ncannot issue the following: INSERT DELAYED, CREATE TABLE,\nCREATE TABLE ... LIKE, and DDL statements involving stored\nprograms and views (except for triggers). If you try, the\nfollowing error will be produced:\n \nERROR 1192 (HY000): Can\'t execute the given command because\nyou have active locked tables or an active transaction\n \nLOCK TABLES can not be used in stored routines - if you try,\nthe following error will be produced on creation:\n \nERROR 1314 (0A000): LOCK is not allowed in stored procedures\n \n\n\nURL: https://mariadb.com/kb/en/lock-tables/','','https://mariadb.com/kb/en/lock-tables/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (101,8,'ROLLBACK','The ROLLBACK statement rolls back (ends) a transaction,\ndestroying any changes to SQL-data so that they never become\nvisible to subsequent transactions. The required syntax for\nthe ROLLBACK statement is as follows. \n \nROLLBACK [ WORK ] [ AND [ NO ] CHAIN ] \n[ TO [ SAVEPOINT ] { | } ]\n \nThe ROLLBACK statement will either end a transaction,\ndestroying all data changes that happened during any of the\ntransaction, or it will just destroy any data changes that\nhappened since you established a savepoint. The basic form\nof the ROLLBACK statement is just the keyword ROLLBACK (the\nkeyword WORK is simply noise and can be omitted without\nchanging the effect). \n \nThe optional AND CHAIN clause is a convenience for\ninitiating a new transaction as soon as the old transaction\nterminates. If AND CHAIN is specified, then there is\neffectively nothing between the old and new transactions,\nalthough they remain separate. The characteristics of the\nnew transaction will be the same as the characteristics of\nthe old one — that is, the new transaction will have the\nsame access mode, isolation level and diagnostics area size\n(we\'ll discuss all of these shortly) as the transaction\njust terminated. The AND NO CHAIN option just tells your\nDBMS to end the transaction — that is, these four SQL\nstatements are equivalent: \n \nROLLBACK;\n \nROLLBACK WORK;\n \nROLLBACK AND NO CHAIN;\n \nROLLBACK WORK AND NO CHAIN;\n \nAll of them end a transaction without saving any transaction\ncharacteristics. The only other options, the equivalent\nstatements: \n \nROLLBACK AND CHAIN;\n \nROLLBACK WORK AND CHAIN;\n \nboth tell your DBMS to end a transaction, but to save that\ntransaction\'s characteristics for the next transaction. \n \nROLLBACK is much simpler than COMMIT: it may involve no more\nthan a few deletions (of Cursors, locks, prepared SQL\nstatements and log-file entries). It\'s usually assumed that\nROLLBACK can\'t fail, although such a thing is conceivable\n(for example, an encompassing transaction might reject an\nattempt to ROLLBACK because it\'s lining up for a COMMIT). \n \nROLLBACK cancels all effects of a transaction. It does not\ncancel effects on objects outside the DBMS\'s control (for\nexample the values in host program variables or the settings\nmade by some SQL/CLI function calls). But in general, it is\na convenient statement for those situations when you say\n\"oops, this isn\'t working\" or when you simply don\'t care\nwhether your temporary work becomes permanent or not.\n \nHere is a moot question. If all you\'ve been doing is\nSELECTs, so that there have been no data changes, should you\nend the transaction with ROLLBACK or COMMIT? It shouldn\'t\nreally matter because both ROLLBACK and COMMIT do the same\ntransaction-terminating job. However, the popular conception\nis that ROLLBACK implies failure, so after a successful\nseries of SELECT statements the convention is to end the\ntransaction with COMMIT rather than ROLLBACK.\n \nMariaDB (and most other DBMSs) supports rollback of SQL-data\nchange statements, but not of SQL-Schema statements. This\nmeans that if you use any of CREATE, ALTER, DROP, GRANT,\nREVOKE, you are implicitly committing at execution time.\n \nINSERT INTO Table_2 VALUES(5); \nDROP TABLE Table_3 CASCADE;\n \nROLLBACK;\n \nThe result will be that both the INSERT and the DROP will go\nthrough as separate transactions so the ROLLBACK will have\nno effect. \n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/rollback/','','https://mariadb.com/kb/en/rollback/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (102,8,'SAVEPOINT','Syntax\n------ \nSAVEPOINT identifier\nROLLBACK [WORK] TO [SAVEPOINT] identifier\nRELEASE SAVEPOINT identifier\n \nDescription\n----------- \nInnoDB supports the SQL statements SAVEPOINT,\nROLLBACK TO SAVEPOINT, RELEASE SAVEPOINT\nand the optional WORK keyword for\nROLLBACK.\n \nEach savepoint must have a legal MariaDB identifier. A\nsavepoint is a named sub-transaction.\n \nNormally ROLLBACK undoes the changes performed by the whole\ntransaction. When used with the TO clause, it undoes the\nchanges performed after the specified savepoint, and erases\nall subsequent savepoints. However, all locks that have been\nacquired after the save point will survive. RELEASE\nSAVEPOINT does not rollback or commit any changes, but\nremoves the specified savepoint.\n \nWhen the execution of a trigger or a stored function begins,\nit is not possible to use statements which reference a\nsavepoint which was defined from out of that stored program.\n \nWhen a COMMIT (including implicit commits) or a ROLLBACK\nstatement (with no TO clause) is performed, they act on the\nwhole transaction, and all savepoints are removed.\n \nErrors\n \nIf COMMIT or ROLLBACK is issued and no transaction was\nstarted, no error is reported.\n \nIf SAVEPOINT is issued and no transaction was started, no\nerror is reported but no savepoint is created. When ROLLBACK\nTO SAVEPOINT or RELEASE SAVEPOINT is called for a savepoint\nthat does not exist, an error like this is issued:\n \nERROR 1305 (42000): SAVEPOINT svp_name does not exist\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/savepoint/','','https://mariadb.com/kb/en/savepoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (103,8,'Metadata Locking','Metadata locking has been supported since MariaDB 5.5. This\nmeans that when a transaction (including XA transactions)\nuses a table, it locks its metadata until the end of\ntransaction. Non-transactional tables are also locked, as\nwell as views and objects which are related to locked\ntables/views (stored functions, triggers, etc). When a\nconnection tries to use a DDL statement (like an ALTER\nTABLE) which modifies a table that is locked, that\nconnection is queued, and has to wait until it\'s unlocked.\nUsing savepoints and performing a partial rollback does not\nrelease metadata locks.\n \nLOCK TABLES ... WRITE are also queued. Some wrong statements\nwhich produce an error may not need to wait for the lock to\nbe freed.\n \nMetadata lock\'s timeout is determined by the value of the\nlock_wait_timeout server system variable (in seconds).\nHowever, note that its default value is 31536000 (1 year).\nIf this timeout exceeds, the following error is returned:\n \nERROR 1205 (HY000): Lock wait timeout exceeded;\n try restarting transaction\n \nIf the metadata_lock_info plugin is installed, the\nInformation Schema metadata_lock_info table stores\ninformation about existing metadata locks.\n \nExample\n \nLet\'s use the following MEMORY (non-transactional) table:\n \nCREATE TABLE t (a INT) ENGINE = MEMORY;\n \nConnection 1 starts a transaction, and INSERTs a row into t:\n \nSTART TRANSACTION;\n \nINSERT INTO t SET a=1;\n \nt\'s metadata is now locked by connection 1. Connection 2\ntries to alter t, but has to wait:\n \nALTER TABLE t ADD COLUMN b INT;\n \nConnection 2\'s prompt is blocked now.\n \nNow connection 1 ends the transaction:\n \nCOMMIT;\n \n...and connection 2 finally gets the output of its command:\n \nQuery OK, 1 row affected (35.23 sec)\nRecords: 1 Duplicates: 0 Warnings: 0\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/metadata-locking/','','https://mariadb.com/kb/en/metadata-locking/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (104,8,'PREPARE Statement','Syntax\n------ \nPREPARE stmt_name FROM preparable_stmt\n \nDescription\n----------- \nThe PREPARE statement prepares a statement and assigns it a\nname,\nstmt_name, by which to refer to the statement later.\nStatement names\nare not case sensitive. preparable_stmt is either a string\nliteral or a user variable (not a local variable, an SQL\nexpression or a subquery) that contains the text of the\nstatement. The text must \nrepresent a single SQL statement, not multiple statements.\nWithin the\nstatement, \"?\" characters can be used as parameter markers\nto indicate\nwhere data values are to be bound to the query later when\nyou execute\nit. The \"?\" characters should not be enclosed within\nquotes, even if\nyou intend to bind them to string values. Parameter markers\ncan be used\nonly where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n \nThe scope of a prepared statement is the session within\nwhich it is\ncreated. Other sessions cannot see it.\n \nIf a prepared statement with the given name already exists,\nit is\ndeallocated implicitly before the new statement is prepared.\nThis means\nthat if the new statement contains an error and cannot be\nprepared, an\nerror is returned and no statement with the given name\nexists.\n \nPrepared statements can be PREPAREd and EXECUTEd in a stored\nprocedure, but not in a stored function or trigger. Also,\neven if the statement is PREPAREd in a procedure, it will\nnot be deallocated when the procedure execution ends.\n \nA prepared statement can access user-defined variables, but\nnot local variables or procedure\'s parameters.\n \nIf the prepared statement contains a syntax error, PREPARE\nwill fail. As a side effect, stored procedures can use it to\ncheck if a statement is valid. For example:\n \nCREATE PROCEDURE `test_stmt`(IN sql_text TEXT)\nBEGIN\n DECLARE EXIT HANDLER FOR SQLEXCEPTION\n BEGIN\n SELECT CONCAT(sql_text, \' is not valid\');\n END;\n SET @SQL := sql_text;\n PREPARE stmt FROM @SQL;\n DEALLOCATE PREPARE stmt;\nEND;\n \nThe FOUND_ROWS() and ROW_COUNT() functions, if called\nimmediatly after EXECUTE, return the number of rows read or\naffected by the prepared statements; however, if they are\ncalled after DEALLOCATE PREPARE, they provide information\nabout this statement. If the prepared statement produces\nerrors or warnings, GET DIAGNOSTICS return information about\nthem. DEALLOCATE PREPARE shouldn\'t clear the diagnostics\narea, unless it produces an error.\n \nA prepared statement is executed with EXECUTE and released \nwith DEALLOCATE PREPARE.\n \nThe max_prepared_stmt_count server system variable\ndetermines the number of allowed prepared statements that\ncan be prepared on the server. If it is set to 0, prepared\nstatements are not allowed. If the limit is reached, an\nerror similar to the following will be produced:\n \nERROR 1461 (42000): Can\'t create more than\nmax_prepared_stmt_count statements \n (current value: 0)\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, PREPARE stmt FROM \'SELECT\n:1, :2\' is used, instead of ?.\n \nPermitted Statements\n \nNot all statements can be prepared. Only the following SQL\ncommands are permitted:\nALTER TABLE\nANALYZE TABLE\nBINLOG\nCACHE INDEX\nCALL\nCHANGE MASTER\nCHECKSUM {TABLE | TABLES}\nCOMMIT\n{CREATE | DROP} DATABASE\n{CREATE | DROP} INDEX\n{CREATE | RENAME | DROP} TABLE\n{CREATE | RENAME | DROP} USER\n{CREATE | DROP} VIEW\nDELETE\nDESCRIBE\nDO\nEXPLAIN\nFLUSH {TABLE | TABLES | TABLES WITH READ LOCK | HOSTS |\nPRIVILEGES | LOGS | STATUS | \n MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES | QUERY\nCACHE | TABLE_STATISTICS | \n INDEX_STATISTICS | USER_STATISTICS | CLIENT_STATISTICS}\nGRANT\nINSERT\nINSTALL {PLUGIN | SONAME}\nHANDLER READ\nKILL\nLOAD INDEX INTO CACHE\nOPTIMIZE TABLE\nREPAIR TABLE\nREPLACE\nRESET {MASTER | SLAVE | QUERY CACHE}\nREVOKE\nROLLBACK\nSELECT\nSET\nSET GLOBAL SQL_SLAVE_SKIP_COUNTER\nSET ROLE\nSET SQL_LOG_BIN\nSET TRANSACTION ISOLATION LEVEL\nSHOW EXPLAIN\nSHOW {DATABASES | TABLES | OPEN TABLES | TABLE STATUS |\nCOLUMNS | INDEX | TRIGGERS | \n EVENTS | GRANTS | CHARACTER SET | COLLATION | ENGINES |\nPLUGINS [SONAME] | PRIVILEGES | \n PROCESSLIST | PROFILE | PROFILES | VARIABLES | STATUS |\nWARNINGS | ERRORS | \n TABLE_STATISTICS | INDEX_STATISTICS | USER_STATISTICS |\nCLIENT_STATISTICS | AUTHORS | \n CONTRIBUTORS}\nSHOW CREATE {DATABASE | TABLE | VIEW | PROCEDURE | FUNCTION\n| TRIGGER | EVENT}\nSHOW {FUNCTION | PROCEDURE} CODE\nSHOW BINLOG EVENTS\nSHOW SLAVE HOSTS\nSHOW {MASTER | BINARY} LOGS\nSHOW {MASTER | SLAVE | TABLES | INNODB | FUNCTION |\nPROCEDURE} STATUS\nSLAVE {START | STOP}\nTRUNCATE TABLE\nSHUTDOWN\nUNINSTALL {PLUGIN | SONAME}\nUPDATE\n \nSynonyms are not listed here, but can be used. For example,\nDESC can be used instead of DESCRIBE.\n \nCompound statements can be prepared too.\n \nNote that if a statement can be run in a stored routine, it\nwill work even if it is called by a prepared statement. For\nexample, SIGNAL can\'t be directly prepared. However, it is\nallowed in stored routines. If the x() procedure contains\nSIGNAL, you can still prepare and execute the \'CALL x();\'\nprepared statement.\n \nPREPARE now supports most kinds of expressions as well, for\nexample:\n \nPREPARE stmt FROM CONCAT(\'SELECT * FROM \', table_name);\n \nWhen PREPARE is used with a statement which is not\nsupported, the following error is produced:\n \nERROR 1295 (HY000): This command is not supported in the\nprepared statement protocol yet\n \nExample\n \ncreate table t1 (a int,b char(10));\ninsert into t1 values (1,\"one\"),(2,\n\"two\"),(3,\"three\");\nprepare test from \"select * from t1 where a=?\";\nset @param=2;\nexecute test using @param;\n+------+------+\n| a | b |\n+------+------+\n| 2 | two |\n+------+------+\nset @param=3;\nexecute test using @param;\n+------+-------+\n| a | b |\n+------+-------+\n| 3 | three |\n+------+-------+\ndeallocate prepare test;\n \nSince identifiers are not permitted as prepared statements\nparameters, sometimes it is necessary to dynamically compose\nan SQL statement. This technique is called dynamic SQL). The\nfollowing example shows how to use dynamic SQL:\n \nCREATE PROCEDURE test.stmt_test(IN tab_name VARCHAR(64))\nBEGIN\n SET @sql = CONCAT(\'SELECT COUNT(*) FROM \', tab_name);\n PREPARE stmt FROM @sql;\n EXECUTE stmt;\n DEALLOCATE PREPARE stmt;\nEND;\n \nCALL test.stmt_test(\'mysql.user\');\n+----------+\n| COUNT(*) |\n+----------+\n| 4 |\n+----------+\n \nUse of variables in prepared statements:\n \nPREPARE stmt FROM \'SELECT @x;\';\n \nSET @x = 1;\n \nEXECUTE stmt;\n+------+\n| @x |\n+------+\n| 1 |\n+------+\n \nSET @x = 0;\n \nEXECUTE stmt;\n+------+\n| @x |\n+------+\n| 0 |\n+------+\n \nDEALLOCATE PREPARE stmt;\n \n\n\nURL: https://mariadb.com/kb/en/prepare-statement/','','https://mariadb.com/kb/en/prepare-statement/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (105,8,'PURGE BINARY LOGS','Syntax\n------ \nPURGE { BINARY | MASTER } LOGS\n { TO \'log_name\' | BEFORE datetime_expr }\n \nDescription\n----------- \nThe PURGE BINARY LOGS statement deletes all the binary log\nfiles listed in the log index file prior to the specified\nlog file name or\ndate. BINARY and MASTER are synonyms.\nDeleted log files also are removed from the list recorded in\nthe index file, so\nthat the given log file becomes the first in the list.\n \nThe datetime expression is in the format \'YYYY-MM-DD\nhh:mm:ss\'. \n \nIf a slave is active but has yet to read from a binary log\nfile you attempt to delete, the statement will fail with an\nerror. However, if the slave is not connected and has yet to\nread from a log file you delete, the file will be deleted,\nbut the slave will be unable to continue replicating once it\nconnects again.\n \nThis statement has no effect if the server was not started\nwith the\n--log-bin option to enable binary logging.\n \nTo list the binary log files on the server, use SHOW BINARY\nLOGS. To see which files they are reading, use SHOW SLAVE\nSTATUS. You can only delete the files that are older than\nthe oldest file that is used by the slaves.\n \nTo delete all binary log files, use RESET MASTER.\nTo move to a new log file (for example if you want to remove\nthe current log file), use FLUSH LOGS before you execute\nPURGE LOGS.\n \nIf the expire_logs_days server system variable is not set to\n0, the server automatically deletes binary log files after\nthe given number of days.\n \nExamples\n-------- \nPURGE BINARY LOGS TO \'mariadb-bin.000063\';\n \nPURGE BINARY LOGS BEFORE \'2013-04-21\';\n \nPURGE BINARY LOGS BEFORE \'2013-04-22 09:55:22\';\n \n\n\nURL: https://mariadb.com/kb/en/purge-binary-logs/','','https://mariadb.com/kb/en/purge-binary-logs/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (106,8,'RESET MASTER','RESET MASTER [TO #]\n \nDeletes all binary log files listed in the index file,\nresets the\nbinary log index file to be empty, and creates a new binary\nlog file with a suffix of .000001.\n \nIf TO # is given, then the first new binary log file will\nstart from number #.\n \nThis statement is for use only when the master is started\nfor the first time, and should never be used if any slaves\nare actively replicating from the binary log.\n \n\n\nURL: https://mariadb.com/kb/en/reset-master/','','https://mariadb.com/kb/en/reset-master/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (107,8,'RESET SLAVE','RESET SLAVE [\"connection_name\"] [ALL] \n \nRESET SLAVE makes the slave forget its replication position\nin the\nmaster\'s binary log. This statement is meant to be used for\na clean\nstart. It deletes the master.info and relay-log.info files,\nall the\nrelay log files, and starts a new relay log file. To use\nRESET SLAVE,\nthe slave replication threads must be stopped (use STOP\nSLAVE if\nnecessary).\n \nNote: All relay log files are deleted, even if they have not\nbeen\ncompletely executed by the slave SQL thread. (This is a\ncondition\nlikely to exist on a replication slave if you have issued a\nSTOP SLAVE\nstatement or if the slave is highly loaded.)\n \nConnection information stored in the master.info file is\nimmediately\nreset using any values specified in the corresponding\nstartup options.\nThis information includes values such as master host, master\nport,\nmaster user, and master password. If the slave SQL thread\nwas in the\nmiddle of replicating temporary tables when it was stopped,\nand RESET\nSLAVE is issued, these replicated temporary tables are\ndeleted on the\nslave.\n \nThe ALL also resets the PORT, HOST, USER and PASSWORD\nparameters for the slave. If you are using a connection\nname, it will permanently delete it and it will not show up\nanymore in SHOW ALL SLAVES STATUS.\n \nconnection_name\n \nThe connection_name option was added as part of multi-source\nreplication added in MariaDB 10.0\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the RESET SLAVE statement will apply to the\nspecified master. connection_name is case-insensitive.\n \n\n\nURL: https://mariadb.com/kb/en/reset-slave-connection_name/','','https://mariadb.com/kb/en/reset-slave-connection_name/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (108,8,'SET TRANSACTION','Syntax\n------ \nSET [GLOBAL | SESSION] TRANSACTION\n transaction_property [, transaction_property] ...\n \ntransaction_property:\n ISOLATION LEVEL level\n | READ WRITE\n | READ ONLY\n \nlevel:\n REPEATABLE READ\n | READ COMMITTED\n | READ UNCOMMITTED\n | SERIALIZABLE\n \nDescription\n----------- \nThis statement sets the transaction isolation level or the\ntransaction access mode globally, for the current session,\nor for the next transaction:\nWith the GLOBAL keyword, the statement sets the default\n transaction level globally for all subsequent sessions.\nExisting sessions are\n unaffected.\nWith the SESSION keyword, the statement sets the default\n transaction level for all subsequent transactions performed\nwithin the\n current session.\nWithout any SESSION or GLOBAL keyword,\n the statement sets the isolation level for the next (not\nstarted) transaction\n performed within the current session.\n \nA change to the global default isolation level requires the \nSUPER privilege. Any session is free to change its\nsession isolation level (even in the middle of a\ntransaction), or the isolation\nlevel for its next transaction.\n \nIsolation Level\n \nTo set the global default isolation level at server startup,\nuse the\n--transaction-isolation=level option on the command line or\nin an option file. Values of level for this option use\ndashes\nrather than spaces, so the allowable values are\nREAD-UNCOMMITTED,\nREAD-COMMITTED, REPEATABLE-READ, or\nSERIALIZABLE. For example, to set the default isolation\nlevel to REPEATABLE READ, use these lines in the [mysqld]\nsection of an option file:\n \n[mysqld]\ntransaction-isolation = REPEATABLE-READ\nTo determine the global and session transaction isolation\nlevels at\nruntime, check the value of the tx_isolation system\nvariable:\n \nSELECT @@GLOBAL.tx_isolation, @@tx_isolation;\n \nInnoDB supports each of the translation isolation levels\ndescribed here\nusing different locking strategies. The default level is \nREPEATABLE READ. For additional information about InnoDB\nrecord-level locks and how it uses them to execute various\ntypes of statements,\nsee XtraDB/InnoDB Lock Modes,\nand\nhttp://dev.mysql.com/doc/refman/en/innodb-locks-set.html.\n \nIsolation Levels\n \nThe following sections describe how MariaDB supports the\ndifferent transaction levels.\n \nREAD UNCOMMITTED\n \nSELECT statements are performed in a non-locking fashion,\nbut a possible earlier version of a row might be used. Thus,\nusing this\nisolation level, such reads are not consistent. This is also\ncalled a \"dirty\nread.\" Otherwise, this isolation level works like \nREAD COMMITTED.\n \nREAD COMMITTED\n \nA somewhat Oracle-like isolation level with respect to\nconsistent\n(non-locking) reads: Each consistent read, even within the\nsame\ntransaction, sets and reads its own fresh snapshot. See\nhttp://dev.mysql.com/doc/refman/en/innodb-consistent-read.html.\n \nFor locking reads (SELECT with FOR UPDATE\nor LOCK IN SHARE MODE), InnoDB locks only index records, not\nthe gaps before them, and thus allows the free insertion of\nnew records next to\nlocked records. For UPDATE and DELETE\nstatements, locking depends on whether the statement uses a\nunique index with a\nunique search condition (such as WHERE id = 100), or a\nrange-type search condition (such as WHERE id > 100). For a\nunique index with a unique search condition, InnoDB locks\nonly the index record\nfound, not the gap before it. For range-type searches,\nInnoDB locks the index\nrange scanned, using gap locks or next-key (gap plus\nindex-record) locks to\nblock insertions by other sessions into the gaps covered by\nthe range. This is\nnecessary because \"phantom rows\" must be blocked for MySQL\nreplication and\nrecovery to work.\n \nNote: Since MariaDB 5.1, if the READ COMMITTED isolation\nlevel is used or the innodb_locks_unsafe_for_binlog system\nvariable is enabled,\nthere is no InnoDB gap locking except for foreign-key\nconstraint checking and\nduplicate-key checking. Also, record locks for non-matching\nrows are released\nafter MariaDB has evaluated the WHERE condition. As of\nMariaDB/MySQL\n5.1, if you use READ COMMITTED or enable\ninnodb_locks_unsafe_for_binlog, you must use row-based\nbinary logging.\n \nREPEATABLE READ\n \nThis is the default isolation level for InnoDB. For\nconsistent reads,\nthere is an important difference from the READ COMMITTED\nisolation level: All consistent reads within the same\ntransaction read the\nsnapshot established by the first read. This convention\nmeans that if you issue\nseveral plain (non-locking) SELECT statements within the\nsame transaction, these SELECT statements are consistent\nalso with respect to each other. See\nhttp://dev.mysql.com/doc/refman/en/innodb-consistent-read.html.\n \nFor locking reads (SELECT with FOR UPDATE or LOCK IN SHARE\nMODE),\nUPDATE, and DELETE statements, locking depends on whether\nthe\nstatement uses a unique index with a unique search\ncondition, or a\nrange-type search condition. For a unique index with a\nunique search\ncondition, InnoDB locks only the index record found, not the\ngap\nbefore it. For other search conditions, InnoDB locks the\nindex range\nscanned, using gap locks or next-key (gap plus index-record)\nlocks to\nblock insertions by other sessions into the gaps covered by\nthe range.\n \nThis is the minimum isolation level for non-distributed XA\ntransactions.\n \nSERIALIZABLE\n \nThis level is like REPEATABLE READ, but InnoDB implicitly\nconverts all\nplain SELECT statements to SELECT ... LOCK IN SHARE MODE if\nautocommit\nis disabled. If autocommit is enabled, the SELECT is its own\ntransaction. It therefore is known to be read only and can\nbe\nserialized if performed as a consistent (non-locking) read\nand need\nnot block for other transactions. (This means that to force\na plain\nSELECT to block if other transactions have modified the\nselected rows,\nyou should disable autocommit.)\n \nDistributed XA transactions should always use this isolation\nlevel.\n \nAccess Mode\n \nThese clauses appeared in MariaDB 10.0.\n \nThe access mode specifies whether the transaction is allowed\nto write data or not. By default, transactions are in READ\nWRITE mode (see the tx_read_only system variable). READ ONLY\nmode allows the storage engine to apply optimizations that\ncannot be used for transactions which write data. The only\nexception to this rule is that read only transactions can\nperform DDL statements on temporary tables.\n \nIt is not permitted to specify both READ WRITE and READ ONLY\nin the same statement.\n \nREAD WRITE and READ ONLY can also be specified in the START\nTRANSACTION statement, in which case the specified mode is\nonly valid for one transaction.\n \nExamples\n-------- \nSET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;\n \nAttempting to set the isolation level within an existing\ntransaction without specifying GLOBAL or SESSION.\n \nSTART TRANSACTION;\n \nSET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nERROR 1568 (25001): Transaction characteristics can\'t be\nchanged while a transaction is in progress\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/set-transaction/','','https://mariadb.com/kb/en/set-transaction/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (109,8,'START SLAVE','Syntax\n------ \nSTART SLAVE [\"connection_name\"] [thread_type [,\nthread_type] ... ]\nSTART SLAVE [\"connection_name\"] [SQL_THREAD] UNTIL \n MASTER_LOG_FILE = \'log_name\', MASTER_LOG_POS = log_pos\nSTART SLAVE [\"connection_name\"] [SQL_THREAD] UNTIL\n RELAY_LOG_FILE = \'log_name\', RELAY_LOG_POS = log_pos\nSTART SLAVE [\"connection_name\"] [SQL_THREAD] UNTIL\n MASTER_GTID_POS = \nSTART ALL SLAVES [thread_type [, thread_type]]\nthread_type: IO_THREAD | SQL_THREAD\n \nDescription\n----------- \nSTART SLAVE with no thread_type options starts both of the\nslave\nthreads (see replication). The I/O thread reads events from\nthe master server and stores\nthem in the relay log. The SQL thread reads events from the\nrelay log\nand executes them. START SLAVE requires the SUPER privilege.\n \nIf START SLAVE succeeds in starting the slave threads, it\nreturns\nwithout any error. However, even in that case, it might be\nthat the\nslave threads start and then later stop (for example,\nbecause they do\nnot manage to connect to the master or read its binary log,\nor some\nother problem). START SLAVE does not warn you about this.\nYou must\ncheck the slave\'s error log for error messages generated by\nthe slave\nthreads, or check that they are running satisfactorily with\nSHOW SLAVE\nSTATUS.\n \nSTART SLAVE UNTIL\n \nSTART SLAVE UNTIL refers to the SQL_THREAD slave position at\nwhich the SQL_THREAD replication will halt. If SQL_THREAD\nisn\'t specified both threads are started.\n \nSince version 10.0.2, START SLAVE UNTIL master_gtid_pos=xxx\nhas also been supported. See Global Transaction ID/START\nSLAVE UNTIL master_gtid_pos=xxx for more details.\n \nconnection_name\n \nThe connection_name option was added as part of multi-source\nreplication added in MariaDB 10.0\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the START SLAVE statement will apply to the\nspecified master. connection_name is case-insensitive.\n \nSTART ALL SLAVES\n \nSTART ALL SLAVES starts all configured slaves (slaves with\nmaster_host not empty) that were not started before. It will\ngive a note for all started connections. You can check the\nnotes with SHOW WARNINGS.\n \n\n\nURL: https://mariadb.com/kb/en/start-slave/','','https://mariadb.com/kb/en/start-slave/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (110,8,'START TRANSACTION','Syntax\n------ \nSTART TRANSACTION [transaction_property [,\ntransaction_property] ...] | BEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n \ntransaction_property:\n WITH CONSISTENT SNAPSHOT\n | READ WRITE\n | READ ONLY\n \nDescription\n----------- \nThe START TRANSACTION or BEGIN statement\nbegins a new transaction. COMMIT commits the current\ntransaction, making its changes permanent. ROLLBACK rolls\nback the current transaction, canceling its changes. The SET\nautocommit statement disables or enables the default\nautocommit mode for the current session.\n \nSTART TRANSACTION and SET autocommit = 1 implicitly commit\nthe current transaction, if any.\n \nThe optional WORK keyword is supported for\nCOMMIT and ROLLBACK, as are the\nCHAIN and RELEASE clauses.\nCHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of\nthe\ncompletion_type system variable determines the default\ncompletion behavior.\n \nThe AND CHAIN clause causes a new transaction to begin as\nsoon as the current one ends, and the new transaction has\nthe same isolation\nlevel as the just-terminated transaction. The RELEASE clause\ncauses the server to disconnect the current client session\nafter terminating\nthe current transaction. Including the NO keyword suppresses\nCHAIN or RELEASE completion, which can be\nuseful if the completion_type system variable is set to\ncause chaining or release completion by default.\n \nAccess Mode\n \nThese clauses appeared in MariaDB 10.0.\n \nThe access mode specifies whether the transaction is allowed\nto write data or not. By default, transactions are in READ\nWRITE mode (see the tx_read_only system variable). READ ONLY\nmode allows the storage engine to apply optimizations that\ncannot be used for transactions which write data. The only\nexception to this rule is that read only transactions can\nperform DDL statements on temporary tables.\n \nIt is not permitted to specify both READ WRITE and READ ONLY\nin the same statement.\n \nREAD WRITE and READ ONLY can also be specified in the SET\nTRANSACTION statement, in which case the specified mode is\nvalid for all sessions, or for all subsequent transaction\nused by the current session.\n \nautocommit\n \nBy default, MariaDB runs with autocommit mode enabled. This\nmeans that as soon as you execute a statement that updates\n(modifies) a table, MariaDB stores the update on disk to\nmake it permanent. To disable autocommit mode, use the\nfollowing statement:\n \nSET autocommit=0;\n \nAfter disabling autocommit mode by setting the autocommit\nvariable to zero, changes to transaction-safe tables (such\nas those for InnoDB or\nNDBCLUSTER) are not made permanent immediately. You must use\nCOMMIT to store your changes to disk or ROLLBACK to ignore\nthe changes.\n \nTo disable autocommit mode for a single series of\nstatements, use the START TRANSACTION statement.\n \nDDL Statements\n \nDDL statements (CREATE, ALTER, DROP) and administrative\nstatements (FLUSH, RESET, OPTIMIZE, ANALYZE, CHECK, REPAIR,\nCACHE INDEX), and LOAD DATA INFILE, cause an implicit COMMIT\nand start a new transaction. An exception to this rule are\nthe DDL that operate on temporary tables: you can CREATE,\nALTER and DROP them without causing any COMMIT, but those\nactions cannot be rolled back. This means that if you call\nROLLBACK, the temporary tables you created in the\ntransaction will remain, while the rest of the transaction\nwill be rolled back.\n \nTransactions cannot be used in Stored Functions or Triggers.\nIn Stored Procedures and Events BEGIN is not allowed, so you\nshould use START TRANSACTION instead.\n \nA transaction acquires a metadata lock on every table it\naccesses to prevent other connections from altering their\nstructure. The lock is released at the end of the\ntransaction. This happens even with non-transactional\nstorage engines (like MEMORY or CONNECT), so it makes sense\nto use transactions with non-transactional tables.\n \nin_transaction\n \nThe in_transaction system variable appeared in MariaDB 5.3.\n \nIt is a session-only, read-only variable that returns 1\ninside a transaction, and 0 if not in a transaction.\n \nWITH CONSISTENT SNAPSHOT\n \nThe WITH CONSISTENT SNAPSHOT option starts a consistent read\nfor storage engines such as XtraDB and InnoDB that can do\nso, the same as if a START TRANSACTION followed by a SELECT\nfrom any InnoDB table was issued. \n \nMariaDB 5.3 introduced enhancements to this feature. See\nEnhancements for START TRANSACTION WITH CONSISTENT SNAPSHOT.\n \nExamples\n-------- \nSTART TRANSACTION;\n \nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\n \nUPDATE table2 SET summary=@A WHERE type=1;\n \nCOMMIT;\n \n\n\nURL: https://mariadb.com/kb/en/start-transaction/','','https://mariadb.com/kb/en/start-transaction/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (111,8,'STOP SLAVE','Syntax\n------ \nSTOP SLAVE [\"connection_name\"] [thread_type [,\nthread_type] ... ]\n \nSTOP ALL SLAVES [thread_type [, thread_type]]\n \nthread_type: IO_THREAD | SQL_THREAD\n \nDescription\n----------- \nStops the slave threads. STOP SLAVE requires the SUPER\nprivilege.\n \nLike START SLAVE, this statement may be used with the\nIO_THREAD and\nSQL_THREAD options to name the thread or threads to be\nstopped. In almost all cases, one never need to use the\nthread_type options.\n \nSTOP SLAVE waits until any current replication event group\naffecting\none or more non-transactional tables has finished executing\n(if there\nis any such replication group), or until the user issues a\nKILL QUERY or KILL CONNECTION statement.\n \nNote that STOP SLAVE doesn\'t delete the connection\npermanently. Next time you execute START SLAVE or the\nMariaDB server restarts, the slave connection is restored\nwith it\'s original arguments. If you want to delete a\nconnection, you should execute RESET SLAVE.\n \nSTOP ALL SLAVES\n \nSTOP ALL SLAVES stops all your running slaves. It will give\nyou a note for every stopped connection. You can check the\nnotes with SHOW WARNINGS.\n \nconnection_name\n \nThe connection_name option was added as part of multi-source\nreplication added in MariaDB 10.0\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the STOP SLAVE statement will apply to the\nspecified master. connection_name is case-insensitive.\n \n\n\nURL: https://mariadb.com/kb/en/stop-slave/','','https://mariadb.com/kb/en/stop-slave/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (112,8,'Transaction Timeouts','MariaDB has always had the wait_timeout and\ninteractive_timeout settings, which close connections after\na certain period of inactivity.\n \nHowever, these are by default set to a long wait period. In\nsituations where transactions may be started, but not\ncommitted or rolled back, more granular control and a\nshorter timeout may be desirable so as to avoid locks being\nheld for too long.\n \nMariaDB 10.3 introduced three new variables to handle this\nsituation.\nidle_transaction_timeout (all transactions)\nidle_write_transaction_timeout (write transactions - called\nidle_readwrite_transaction_timeout until MariaDB 10.3.2)\nidle_readonly_transaction_timeout (read transactions)\n \nThese accept a time in seconds to time out, by closing the\nconnection, transactions that are idle for longer than this\nperiod. By default all are set to zero, or no timeout.\n \nidle_transaction_timeout affects all transactions,\nidle_write_transaction_timeout affects write transactions\nonly and idle_readonly_transaction_timeout affects read\ntransactions only. The latter two variables work\nindependently. However, if either is set along with\nidle_transaction_timeout, the settings for\nidle_write_transaction_timeout or\nidle_readonly_transaction_timeout will take precedence.\n \nExamples\n-------- \nSET SESSION idle_transaction_timeout=2;\n \nBEGIN;\n \nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n## wait 3 seconds\nSELECT * FROM t;\n \nERROR 2006 (HY000): MySQL server has gone away\n \nSET SESSION idle_write_transaction_timeout=2;\n \nBEGIN;\n \nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n## wait 3 seconds\nSELECT * FROM t;\n \nEmpty set (0.000 sec)\nINSERT INTO t VALUES(1);\n## wait 3 seconds\nSELECT * FROM t;\n \nERROR 2006 (HY000): MySQL server has gone away\n \nSET SESSION idle_transaction_timeout=2, SESSION\nidle_readonly_transaction_timeout=10;\n \nBEGIN;\n \nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n ## wait 3 seconds\nSELECT * FROM t;\n \nEmpty set (0.000 sec)\n## wait 11 seconds\nSELECT * FROM t;\n \nERROR 2006 (HY000): MySQL server has gone away\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/transaction-timeouts/','','https://mariadb.com/kb/en/transaction-timeouts/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (113,8,'UNLOCK TABLES','Syntax\n------ \nUNLOCK TABLES\n \nDescription\n----------- \nUNLOCK TABLES explicitly releases any table locks held by\nthe\ncurrent session. See LOCK TABLES for more information.\n \nIn addition to releasing table locks acquired by the LOCK\nTABLES statement, the UNLOCK TABLES statement also releases\nthe global read lock acquired by the FLUSH TABLES WITH READ\nLOCK statement. The FLUSH TABLES WITH READ LOCK statement is\nvery useful for performing backups. See FLUSH for more\ninformation about FLUSH TABLES WITH READ LOCK.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/transactions-unlock-tables/','','https://mariadb.com/kb/en/transactions-unlock-tables/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (114,8,'WAIT and NOWAIT','MariaDB 10.3.0 introduced extended syntax so that it is\npossible to set innodb_lock_wait_timeout and\nlock_wait_timeout for the following statements:\n \nSyntax\n------ \nALTER TABLE tbl_name [WAIT n|NOWAIT] ...\nCREATE ... INDEX ON tbl_name (index_col_name, ...) [WAIT\nn|NOWAIT] ...\nDROP INDEX ... [WAIT n|NOWAIT]\nDROP TABLE tbl_name [WAIT n|NOWAIT] ...\nLOCK TABLE ... [WAIT n|NOWAIT]\nOPTIMIZE TABLE tbl_name [WAIT n|NOWAIT]\nRENAME TABLE tbl_name [WAIT n|NOWAIT] ...\nSELECT ... FOR UPDATE [WAIT n|NOWAIT]\nSELECT ... LOCK IN SHARE MODE [WAIT n|NOWAIT]\nTRUNCATE TABLE tbl_name [WAIT n|NOWAIT]\n \nDescription\n----------- \nThe lock wait timeout can be explicitly set in the statement\nby using either WAIT n (to set the wait in seconds) or\nNOWAIT, in which case the statement will immediately fail if\nthe lock cannot be obtained. WAIT 0 is equivalent to NOWAIT.\n \n\n\nURL: https://mariadb.com/kb/en/wait-and-nowait/','','https://mariadb.com/kb/en/wait-and-nowait/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (115,8,'XA Transactions','Overview\n \nThe MariaDB XA implementation is based on the X/Open CAE\ndocument Distributed Transaction Processing: The XA\nSpecification. This document is published by The Open Group\nand available at\nhttp://www.opengroup.org/public/pubs/catalog/c193.htm.\n \nXA transactions are designed to allow distributed\ntransactions, where a transaction manager (the application)\ncontrols a transaction which involves multiple resources.\nSuch resources are usually DBMSs, but could be resources of\nany type. The whole set of required transactional operations\nis called a global transaction. Each subset of operations\nwhich involve a single resource is called a local\ntransaction. XA used a 2-phases commit (2PC). With the first\ncommit, the transaction manager tells each resource to\nprepare an effective commit, and waits for a confirm\nmessage. The changes are not still made effective at this\npoint. If any of the resources encountered an error, the\ntransaction manager will rollback the global transaction. If\nall resources communicate that the first commit is\nsuccessful, the transaction manager can require a second\ncommit, which makes the changes effective.\n \nIn MariaDB, XA transactions can only be used with storage\nengines that support them. At least InnoDB, TokuDB, SPIDER\nand MyRocks support them. For InnoDB, XA transactions can be\ndisabled by setting the innodb_support_xa server system\nvariable to 0. \n \nLike regular transactions, XA transactions create metadata\nlocks on accessed tables.\n \nXA transactions require REPEATABLE READ as a minimum\nisolation level. However, distributed transactions should\nalways use SERIALIZABLE.\n \nTrying to start more than one XA transaction at the same\ntime produces a 1400 error (SQLSTATE \'XAE09\'). The same\nerror is produced when attempting to start an XA transaction\nwhile a regular transaction is in effect. Trying to start a\nregular transaction while an XA transaction is in effect\nproduces a 1399 error (SQLSTATE \'XAE07\').\n \nThe statements that cause an implicit COMMIT for regular\ntransactions produce a 1400 error (SQLSTATE \'XAE09\') if a\nXA transaction is in effect.\n \nInternal XA vs External XA\n \nXA transactions are an overloaded term in MariaDB. If a\nstorage engine is XA-capable, it can mean one or both of\nthese:\nIt supports MariaDB\'s internal two-phase commit API. This\nis transparent to the user. Sometimes this is called\n\"internal XA\", since MariaDB\'s internal transaction\ncoordinator log can handle coordinating these transactions.\n \nIt supports XA transactions, with the XA START, XA PREPARE,\nXA COMMIT, etc. statements. Sometimes this is called\n\"external XA\", since it requires the use of an external\ntransaction coordinator to use this feature properly.\n \nTransaction Coordinator Log\n \nIf you have two or more XA-capable storage engines enabled,\nthen a transaction coordinator log must be available.\n \nThere are currently two implementations of the transaction\ncoordinator log:\nBinary log-based transaction coordinator log\nMemory-mapped file-based transaction coordinator log\n \nIf the binary log is enabled on a server, then the server\nwill use the binary log-based transaction coordinator log.\nOtherwise, it will use the memory-mapped file-based\ntransaction coordinator log.\n \nSee Transaction Coordinator Log for more information.\n \nSyntax\n------ \nXA {START|BEGIN} xid [JOIN|RESUME]\n \nXA END xid [SUSPEND [FOR MIGRATE]]\n \nXA PREPARE xid\n \nXA COMMIT xid [ONE PHASE]\n \nXA ROLLBACK xid\n \nXA RECOVER [FORMAT=[\'RAW\'|\'SQL\']]\n \nxid: gtrid [, bqual [, formatID ]]\n \nThe interface to XA transactions is a set of SQL statements\nstarting with XA. Each statement changes a transaction\'s\nstate, determining which actions it can perform. A\ntransaction which does not exist is in the NON-EXISTING\nstate.\n \nXA START (or BEGIN) starts a transaction and defines its xid\n(a transaction identifier). The JOIN or RESUME keywords have\nno effect. The new transaction will be in ACTIVE state.\n \nThe xid can have 3 components, though only the first one is\nmandatory. gtrid is a quoted string representing a global\ntransaction identifier. bqual is a quoted string\nrepresenting a local transaction identifier. formatID is an\nunsigned integer indicating the format used for the first\ntwo components; if not specified, defaults to 1. MariaDB\ndoes not interpret in any way these components, and only\nuses them to identify a transaction. xids of transactions in\neffect must be unique.\n \nXA END declares that the specified ACTIVE transaction is\nfinished and it changes its state to IDLE. SUSPEND [FOR\nMIGRATE] has no effect.\n \nXA PREPARE prepares an IDLE transaction for commit, changing\nits state to PREPARED. This is the first commit.\n \nXA COMMIT definitely commits and terminates a transaction\nwhich has already been PREPARED. If the ONE PHASE clause is\nspecified, this statements performs a 1-phase commit on an\nIDLE transaction.\n \nXA ROLLBACK rolls back and terminates an IDLE or PREPARED\ntransaction.\n \nXA RECOVER shows information about all PREPARED\ntransactions.\n \nWhen trying to execute an operation which is not allowed for\nthe transaction\'s current state, an error is produced:\n \nXA COMMIT \'test\' ONE PHASE;\n \nERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be\nexecuted when global transaction is in the ACTIVE state\n \nXA COMMIT \'test2\';\n \nERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be\nexecuted when global transaction is in the NON-EXISTING\nstate\n \nXA RECOVER\n \nThe XA RECOVER statement shows information about all\ntransactions which are in the PREPARED state. It does not\nmatter which connection created the transaction: if it has\nbeen PREPARED, it appears. But this does not mean that a\nconnection can commit or rollback a transaction which was\nstarted by another connection. Note that transactions using\na 1-phase commit are never in the PREPARED state, so they\ncannot be shown by XA RECOVER.\n \nXA RECOVER produces four columns:\n \nXA RECOVER;\n \n+----------+--------------+--------------+------+\n| formatID | gtrid_length | bqual_length | data |\n+----------+--------------+--------------+------+\n| 1 | 4 | 0 | test |\n+----------+--------------+--------------+------+\n \nYou can use XA RECOVER FORMAT=\'SQL\' to get the data in a\nhuman readable\nform that can be directly copy-pasted into XA COMMIT or XA\nROLLBACK. This is particularly useful for binary xid\ngenerated by some transaction coordinators.\n \nformatID is the formatID part of xid.\n \ndata are the gtrid and bqual parts of xid, concatenated.\n \ngtrid_length and bqual_length are the lengths of gtrid and\nbqual, respectevely.\n \nExamples\n-------- \n2-phases commit:\n \nXA START \'test\';\n \nINSERT INTO t VALUES (1,2);\n \nXA END \'test\';\n \nXA PREPARE \'test\';\n \nXA COMMIT \'test\';\n \n1-phase commit:\n \nXA START \'test\';\n \nINSERT INTO t VALUES (1,2);\n \nXA END \'test\';\n \nXA COMMIT \'test\' ONE PHASE;\n \nHuman-readable:\n \nxa start \'12\\r34\\t67\\v78\', \'abc\\ndef\', 3;\n \ninsert t1 values (40);\n \nxa end \'12\\r34\\t67\\v78\', \'abc\\ndef\', 3;\n \nxa prepare \'12\\r34\\t67\\v78\', \'abc\\ndef\', 3;\n \nxa recover format=\'RAW\';\n \n+----------+--------------+--------------+--------------------+\n| formatID | gtrid_length | bqual_length | data |\n+----------+--------------+--------------+--------------------+\n34 67v78abc 11 | 7 | 12\ndef |\n+----------+--------------+--------------+--------------------+\n \nxa recover format=\'SQL\';\n \n+----------+--------------+--------------+-----------------------------------------------+\n| formatID | gtrid_length | bqual_length | data |\n+----------+--------------+--------------+-----------------------------------------------+\n| 3 | 11 | 7 |\nX\'31320d3334093637763738\',X\'6162630a646566\',3 |\n+----------+--------------+--------------+-----------------------------------------------+\n \nxa rollback\nX\'31320d3334093637763738\',X\'6162630a646566\',3;\n \nKnown Issues\n \nMariaDB Galera Cluster\n \nMariaDB Galera Cluster does not support XA transactions. See\nMDEV-10532 for more information on that. The request to\nimplement that feature is being tracked at MDEV-17099.\n \nHowever, MariaDB Galera Cluster builds include a built-in\nplugin called wsrep. Prior to MariaDB 10.4.3, this plugin\nwas internally considered an XA-capable storage engine.\nConsequently, these MariaDB Galera Cluster builds have\nmultiple XA-capable storage engines by default, even if the\nonly \"real\" storage engine that supports external XA\ntransactions enabled on these builds by default is InnoDB.\nTherefore, when using one these builds MariaDB would be\nforced to use a transaction coordinator log by default,\nwhich could have performance implications.\n \nSee Transaction Coordinator Log Overview: MariaDB Galera\nCluster for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/xa-transactions/','','https://mariadb.com/kb/en/xa-transactions/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (116,10,'Account Locking','Account locking was introduced in MariaDB 10.4.2.\n \nDescription\n----------- \nAccount locking permits privileged administrators to\nlock/unlock user accounts. No new client connections will be\npermitted if an account is locked (existing connections are\nnot affected).\n \nUser accounts can be locked at creation, with the CREATE\nUSER statement, or modified after creation with the ALTER\nUSER statement. For example:\n \nCREATE USER \'lorin\'@\'localhost\' ACCOUNT LOCK;\n \nor\n \nALTER USER \'marijn\'@\'localhost\' ACCOUNT LOCK;\n \nThe server will return an ER_ACCOUNT_HAS_BEEN_LOCKED error\nwhen locked users attempt to connect:\n \nmysql -ulorin\n ERROR 4151 (HY000): Access denied, this account is locked\n \nThe ALTER USER statement is also used to unlock a user:\n \nALTER USER \'lorin\'@\'localhost\' ACCOUNT UNLOCK;\n \nThe SHOW CREATE USER statement will show whether the account\nis locked:\n \nSHOW CREATE USER \'marijn\'@\'localhost\';\n \n+-----------------------------------------------+\n| CREATE USER for marijn@localhost |\n+-----------------------------------------------+\n| CREATE USER \'marijn\'@\'localhost\' ACCOUNT LOCK |\n+-----------------------------------------------+\n \nas well as querying the mysql.global_priv table:\n \nSELECT CONCAT(user, \'@\', host, \' => \',\nJSON_DETAILED(priv)) FROM mysql.global_priv \n WHERE user=\'marijn\';\n+--------------------------------------------------------------------------------------+\n| CONCAT(user, \'@\', host, \' => \', JSON_DETAILED(priv)) |\n+--------------------------------------------------------------------------------------+\n| marijn@localhost => {\n \"access\": 0,\n \"plugin\": \"mysql_native_password\",\n \"authentication_string\": \"\",\n \"account_locked\": true,\n \"password_last_changed\": 1558017158\n} |\n+--------------------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/account-locking/','','https://mariadb.com/kb/en/account-locking/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (117,10,'Authentication from MariaDB 10.4','MariaDB 10.4 introduces a number of changes to the\nauthentication process, intended to make things easier and\nmore intuitive.\n \nOverview\n \nThere are four main changes relating to authentication:\nIt is possible to use more than one authentication plugin\nfor each user account. For example, this can be useful to\nslowly migrate users to the more secure ed25519\nauthentication plugin over time, while allowing the old\nmysql_native_password authentication plugin as an\nalternative for the transitional period.\nThe root@localhost user account created by mysql_install_db\nis created with the ability to use two authentication\nplugins.\nFirst, it is configured to try to use the unix_socket\nauthentication plugin. This allows the the root@localhost\nuser to login without a password via the local Unix socket\nfile defined by the socket system variable, as long as the\nlogin is attempted from a process owned by the operating\nsystem root user account.\nSecond, if authentication fails with the unix_socket\nauthentication plugin, then it is configured to try to use\nthe mysql_native_password authentication plugin. However, an\ninvalid password is initially set, so in order to\nauthenticate this way, a password must be set with SET\nPASSWORD.\nHowever, just using the unix_socket authentication plugin\nmay be fine for many users, and it is very secure. You may\nwant to try going without password authentication to see how\nwell it works for you. Remember, the best way to keep your\npassword safe is not to have one!\n \nAll user accounts, passwords, and global privileges are now\nstored in the mysql.global_priv table. The mysql.user table\nstill exists and has exactly the same set of columns as\nbefore, but it’s now a view that references the\nmysql.global_priv table. Tools that analyze the mysql.user\ntable should continue to workas before.\nMariaDB 10.4 supports User Password Expiry, which is not\nactive by default.\n \nDescription\n----------- \nAs a result of the above changes, the open-for-everyone\nall-powerful root account is finally gone. And installation\nscripts will no longer demand that you “PLEASE REMEMBER TO\nSET A PASSWORD FOR THE MariaDB root USER !â€, because the\nroot account is securely created automatically.\n \nTwo all-powerful accounts are created by default — root\nand the OS user that owns the data directory, typically\nmysql. They are created as:\n \nCREATE USER root@localhost IDENTIFIED VIA unix_socket OR\nmysql_native_password USING \'invalid\'\nCREATE USER mysql@localhost IDENTIFIED VIA unix_socket OR\nmysql_native_password USING \'invalid\'\n \nUsing unix_socket means that if you are the system root\nuser, you can login as root@locahost without a password.\nThis technique was pioneered by Otto Kekäläinen in Debian\nMariaDB packages and has been successfully used in Debian\nsince as early as MariaDB 10.0. \n \nIt is based on a simple fact that asking the system root for\na password adds no extra security — root has full access\nto all the data files and all process memory anyway. But not\nasking for a password means, there is no root password to\nforget (no need for the numerous tutorials on “how to\nreset MariaDB root passwordâ€). And if you want to script\nsome tedious database work, there is no need to store the\nroot password in plain text for the scipt to use (no need\nfor debian-sys-maint user).\n \nStill, some users may wish to log in as MariaDB root without\nusing sudo. Hence the old authentication method —\nconventional MariaDB password — is still available. By\ndefault it is disabled (“invalid†is not a valid\npassword hash), but one can set the password with a usual\nSET PASSWORD statement. And still retain the password-less\naccess via sudo.\n \nIf you install MariaDB locally (say from a tarball, you\nwould not want to use sudo to be able to login. This is why\nMariaDB creates a second all-powerful user with the same\nname as a system user that owns the data directory. In local\n(not system-wide) installations, this will be the user who\ninstalled MariaDB — they automatically get convenient\npassword-less root-like access, because they can access all\nthe data files anyway.\n \nEven if MariaDB is installed system-wide, you may not want\nto run your database maintenance scripts as system root —\nnow you can run them as system mysql user. And you will know\nthat they will never destroy your entire system, even if you\nmake a typo in a shell script.\n \nHowever, seasoned MariaDB DBAs who are used to the old ways\ndo need to makes some changes. See the examples below for\ncommon tasks. \n \nCookbook\n \nAfter installing MariaDB system-wide the first thing\nyou’ve got used to doing is logging in into the\nunprotected root account and protecting it, that is, setting\nthe root password:\n \n$ sudo dnf install MariaDB-server\n$ mysql -uroot\n...\nMariaDB> set password = password(\"XH4VmT3_jt\");\n \nThis is not only unnecessary now, it will simply not work\n— there is no unprotected root account. To login as root\nuse\n \n$ sudo dnf install MariaDB-server\n$ sudo mysql\n \nNote that it implies you are connecting via the unix socket,\nnot tcp. If you happen to have protocol=tcp in a system-wide\n/etc/my.cnf file, use sudo mysql --protocol=socket.\n \nAfter installing MariaDB locally you’ve also used to\nconnect to the unprotected root account using mysql -uroot.\nThis will not work either, simply use mysql without\nspecifying a username.\n \nIf you\'ve forgotten your root password, no problem — you\ncan still connect using sudo and change the password. And if\nyou\'ve also removed unix_socket authentication, to restore\naccess do as follows:\nrestart MariaDB with --skip-grant-tables\nlogin into the unprotected server\nrun FLUSH PRIVILEGES (note, before 10.4 this would’ve been\nthe last step, not anymore). This disables\n--skip-grant-tables and allows you to change the stored\nauthentication method.\nrun SET PASSWORD FOR root@localhost to change the root\npassword\n \nTo view inside privilege tables, the old mysql.user table\nstill exists. You can select from it as before, although you\ncannot update it anymore. It doesn’t show alternative\nauthentication plugins and this was one of the reasons for\nswitching to the mysql.global_priv table — complex\nauthentication rules did not fit into rigid structure of a\nrelational table. You can select from the new table, for\nexample: \n \nselect concat(user, \'@\', host, \' => \',\njson_detailed(priv)) from mysql.global_priv;\n \nReverting to the Previous Authentication Method for\nroot@localhost\n \nIf you don\'t want the root@localhost user account created\nby mysql_install_db to use unix_socket authentication by\ndefault, then there are a few ways to revert to the previous\nmysql_native_password authentication method for this user\naccount.\n \nConfiguring mysql_install_db to Revert to the Previous\nAuthentication Method\n \nOne way to revert to the previous mysql_native_password\nauthentication method for the root@localhost user account is\nto execute mysql_install_db with a special option. If\nmysql_install_db is executed while\n--auth-root-authentication-method=normal is specified, then\nit will create the default user accounts using the default\nbehavior of MariaDB 10.3 and before.\n \nThis means that the root@localhost user account will use\nmysql_native_password authentication by default. There are\nsome other differences as well. See mysql_install_db: User\nAccounts Created by Default for more information.\n \nFor example, the option can be set on the command-line while\nrunning mysql_install_db:\n \nmysql_install_db --user=mysql --datadir=/var/lib/mysql\n--auth-root-authentication-method=normal\n \nThe option can also be set in an option file in an option\ngroup supported by mysql_install_db. For example:\n \n[mysql_install_db]\nauth_root_authentication_method=normal\n \nIf the option is set in an option file and if\nmysql_install_db is executed, then mysql_install_db will\nread this option from the option file, and it will\nautomatically set this option.\n \nAltering the User Account to Revert to the Previous\nAuthentication Method\n \nIf you have already installed MariaDB, and if the\nroot@localhost user account is already using unix_socket\nauthentication, then you can revert to the old\nmysql_native_password authentication method for the user\naccount by executing the following:\n \nALTER USER root@localhost IDENTIFIED VIA\nmysql_native_password USING PASSWORD(\"verysecret\")\n \n\n\nURL:\nhttps://mariadb.com/kb/en/authentication-from-mariadb-104/','','https://mariadb.com/kb/en/authentication-from-mariadb-104/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (118,10,'CREATE USER','Syntax\n------ \nCREATE [OR REPLACE] USER [IF NOT EXISTS] \n user_specification [,user_specification ...] \n [REQUIRE {NONE | tls_option [[AND] tls_option ...] }]\n [WITH resource_option [resource_option ...] ]\n [password_option | lock_option] \n \nuser_specification:\n username [authentication_option]\n \nauthentication_option:\n IDENTIFIED BY \'password\' \n | IDENTIFIED BY PASSWORD \'password_hash\'\n | IDENTIFIED {VIA|WITH} authentication_rule [OR\nauthentication_rule ...]\n \nauthentication_rule:\n authentication_plugin\n | authentication_plugin {USING|AS}\n\'authentication_string\'\n | authentication_plugin {USING|AS} PASSWORD(\'password\')\n \ntls_option:\n SSL \n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n \nresource_option:\n MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n | MAX_STATEMENT_TIME time\n \npassword_option:\n PASSWORD EXPIRE\n | PASSWORD EXPIRE DEFAULT\n | PASSWORD EXPIRE NEVER\n | PASSWORD EXPIRE INTERVAL N DAY\n \nlock_option:\n ACCOUNT LOCK\n | ACCOUNT UNLOCK\n}\n \nDescription\n----------- \nThe CREATE USER statement creates new MariaDB accounts. To\nuse it, you must have the global CREATE USER privilege or\nthe INSERT privilege for the mysql database. For each\naccount, CREATE USER creates a new row in\nthe mysql.user table that has no privileges.\n \nIf any of the specified accounts, or any permissions for the\nspecified accounts, already exist, then the server returns\nERROR 1396 (HY000). If an error occurs, CREATE USER will\nstill create the accounts that do not result in an error.\nOnly one error is produced for all users which have not been\ncreated:\n \nERROR 1396 (HY000): \n Operation CREATE USER failed for \'u1\'@\'%\',\'u2\'@\'%\'\n \nCREATE USER, DROP USER, CREATE ROLE, and DROP ROLE all\nproduce the\nsame error code when they fail.\n \nSee Account Names below for details on how account names are\nspecified. \n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it is basically a\nshortcut for:\n \nDROP USER IF EXISTS name;\n \nCREATE USER name ...;\n \nFor example:\n \nCREATE USER foo2@test IDENTIFIED BY \'password\';\n \nERROR 1396 (HY000): Operation CREATE USER failed for\n\'foo2\'@\'test\'\n \nCREATE OR REPLACE USER foo2@test IDENTIFIED BY \'password\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nIF NOT EXISTS\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified user already\nexists.\n \nFor example:\n \nCREATE USER foo2@test IDENTIFIED BY \'password\';\n \nERROR 1396 (HY000): Operation CREATE USER failed for\n\'foo2\'@\'test\'\n \nCREATE USER IF NOT EXISTS foo2@test IDENTIFIED BY\n\'password\';\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+----------------------------------------------------+\n| Level | Code | Message |\n+-------+------+----------------------------------------------------+\n| Note | 1973 | Can\'t create user \'foo2\'@\'test\';\n it already exists |\n+-------+------+----------------------------------------------------+\n1 row in set (0.00 sec\n \nAuthentication Options\n \nIDENTIFIED BY \'password\'\n \nThe optional IDENTIFIED BY clause can be used to provide an\naccount with a password. The password should be specified in\nplain text. It will be hashed by the PASSWORD function prior\nto being stored to the mysql.user table.\n \nFor example, if our password is mariadb, then we can create\nthe user with:\n \nCREATE USER foo2@test IDENTIFIED BY \'mariadb\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED BY PASSWORD \'password_hash\'\n \nThe optional IDENTIFIED BY PASSWORD clause can be used to\nprovide an account with a password that has already been\nhashed. The password should be specified as a hash that was\nprovided by the PASSWORD function. It will be stored to the\nmysql.user table as-is.\n \nFor example, if our password is mariadb, then we can find\nthe hash with:\n \nSELECT PASSWORD(\'mariadb\');\n+-------------------------------------------+\n| PASSWORD(\'mariadb\') |\n+-------------------------------------------+\n| *54958E764CE10E50764C2EECBB71D01F08549980 |\n+-------------------------------------------+\n1 row in set (0.00 sec)\n \nAnd then we can create a user with the hash:\n \nCREATE USER foo2@test IDENTIFIED BY PASSWORD\n\'*54958E764CE10E50764C2EECBB71D01F08549980\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED {VIA|WITH} authentication_plugin\n \nThe optional IDENTIFIED VIA authentication_plugin allows you\nto specify that the account should be authenticated by a\nspecific authentication plugin. The plugin name must be an\nactive authentication plugin as per SHOW PLUGINS. If it\ndoesn\'t show up in that output, then you will need to\ninstall it with INSTALL PLUGIN or INSTALL SONAME.\n \nFor example, this could be used with the PAM authentication\nplugin:\n \nCREATE USER foo2@test IDENTIFIED VIA pam;\n \nSome authentication plugins allow additional arguments to be\nspecified after a USING or AS keyword. For example, the PAM\nauthentication plugin accepts a service name:\n \nCREATE USER foo2@test IDENTIFIED VIA pam USING \'mariadb\';\n \nThe exact meaning of the additional argument would depend on\nthe specific authentication plugin.\n \nThe USING or AS keyword can also be used to provide a\nplain-text password to a plugin if it\'s provided as an\nargument to the PASSWORD() function. This is only valid for\nauthentication plugins that have implemented a hook for the\nPASSWORD() function. For example, the ed25519 authentication\nplugin supports this:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\');\n \nOne can specify many authentication plugins, they all works\nas alternatives ways of authenticating a user:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\') OR unix_socket;\n \nTLS Options\n \nBy default, MariaDB transmits data between the server and\nclients without encrypting it. This is generally acceptable\nwhen the server and client run on the same host or in\nnetworks where security is guaranteed through other means.\nHowever, in cases where the server and client exist on\nseparate networks or they are in a high-risk network, the\nlack of encryption does introduce security concerns as a\nmalicious actor could potentially eavesdrop on the traffic\nas it is sent over the network between them.\n \nTo mitigate this concern, MariaDB allows you to encrypt data\nin transit between the server and clients using the\nTransport Layer Security (TLS) protocol. TLS was formerly\nknown as Secure Socket Layer (SSL), but strictly speaking\nthe SSL protocol is a predecessor to TLS and, that version\nof the protocol is now considered insecure. The\ndocumentation still uses the term SSL often and for\ncompatibility reasons TLS-related server system and status\nvariables still use the prefix ssl_, but internally, MariaDB\nonly supports its secure successors.\n \nSee Secure Connections Overview for more information about\nhow to determine whether your MariaDB server has TLS\nsupport.\n \nYou can set certain TLS-related restrictions for specific\nuser accounts. For instance, you might use this with user\naccounts that require access to sensitive data while sending\nit across networks that you do not control. These\nrestrictions can be enabled for a user account with the\nCREATE USER, ALTER USER, or GRANT statements. The following\noptions are available:\n \nOption | Description | \n \nREQUIRE NONE | TLS is not required for this account, but can\nstill be used. | \n \nREQUIRE SSL | The account must use TLS, but no valid X509\ncertificate is required. This option cannot be combined with\nother TLS options. | \n \nREQUIRE X509 | The account must use TLS and must have a\nvalid X509 certificate. This option implies REQUIRE SSL.\nThis option cannot be combined with other TLS options. | \n \nREQUIRE ISSUER \'issuer\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the Certificate\nAuthority must be the one specified via the string issuer.\nThis option implies REQUIRE X509. This option can be\ncombined with the SUBJECT, and CIPHER options in any order.\n| \n \nREQUIRE SUBJECT \'subject\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the certificate\'s\nSubject must be the one specified via the string subject.\nThis option implies REQUIRE X509. This option can be\ncombined with the ISSUER, and CIPHER options in any order. |\n\n \nREQUIRE CIPHER \'cipher\' | The account must use TLS, but no\nvalid X509 certificate is required. Also, the encryption\nused for the connection must use one of the methods\nspecified in the string cipher. This option implies REQUIRE\nSSL. This option can be combined with the ISSUER, and\nSUBJECT options in any order. | \n \nThe REQUIRE keyword must be used only once for all specified\noptions, and the AND keyword can be used to separate\nindividual options, but it is not required.\n \nFor example, you can create a user account that requires\nthese TLS options with the following:\n \nCREATE USER \'alice\'@\'%\'\n REQUIRE SUBJECT \'/CN=alice/O=My Dom,\nInc./C=US/ST=Oregon/L=Portland\'\n AND ISSUER \'/C=FI/ST=Somewhere/L=City/ O=Some\nCompany/CN=Peter Parker/emailAddress=p.parker@marvel.com\'\n AND CIPHER \'TLSv1.2\';\n \nIf any of these options are set for a specific user account,\nthen any client who tries to connect with that user account\nwill have to be configured to connect with TLS.\n \nSee Securing Connections for Client and Server for\ninformation on how to enable TLS on the client and server.\n \nResource Limit Options\n \nMariaDB 10.2.0 introduced a number of resource limit\noptions.\n \nIt is possible to set per-account limits for certain server\nresources. The following table shows the values that can be\nset per account:\n \nLimit Type | Decription | \n \nMAX_QUERIES_PER_HOUR | Number of statements that the account\ncan issue per hour (including updates) | \n \nMAX_UPDATES_PER_HOUR | Number of updates (not queries) that\nthe account can issue per hour | \n \nMAX_CONNECTIONS_PER_HOUR | Number of connections that the\naccount can start per hour | \n \nMAX_USER_CONNECTIONS | Number of simultaneous connections\nthat can be accepted from the same account; if it is 0,\nmax_connections will be used instead; if max_connections is\n0, there is no limit for this account\'s simultaneous\nconnections. | \n \nMAX_STATEMENT_TIME | Timeout, in seconds, for statements\nexecuted by the user. See also Aborting Statements that\nExceed a Certain Time to Execute. | \n \nIf any of these limits are set to 0, then there is no limit\nfor that resource for that user.\n \nHere is an example showing how to create a user with\nresource limits:\n \nCREATE USER \'someone\'@\'localhost\' WITH\n MAX_USER_CONNECTIONS 10\n MAX_QUERIES_PER_HOUR 200;\n \nThe resources are tracked per account, which means\n\'user\'@\'server\'; not per user name or per connection.\n \nThe count can be reset for all users using FLUSH\nUSER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.\n \nPer account resource limits are stored in the user table, in\nthe mysql database. Columns used for resources limits are\nnamed max_questions, max_updates, max_connections (for\nMAX_CONNECTIONS_PER_HOUR), and max_user_connections (for\nMAX_USER_CONNECTIONS).\n \nAccount Names\n \nAccount names have both a user name component and a host\nname component, and are specified as\n\'user_name\'@\'host_name\'.\n \nThe user name and host name may be unquoted, quoted as\nstrings using double quotes (\") or\nsingle quotes (\'), or quoted as identifiers using backticks\n(`). You must use quotes\nwhen using special characters (such as a hyphen) or wildcard\ncharacters. If you quote, you \nmust quote the user name and host name separately (for\nexample \'user_name\'@\'host_name\').\n \nHost Name Component\n \nIf the host name is not provided, it is assumed to be \'%\'.\n \nHost names may contain the wildcard characters % and _. They\nare matched as if by\nthe LIKE clause. If you need to use a wildcard character\nliterally (for example, to\nmatch a domain name with an underscore), prefix the\ncharacter with a backslash. See LIKE\nfor more information on escaping wildcard characters.\n \nHost name matches are case-insensitive. Host names can match\neither domain names or IP\naddresses. Use \'localhost\' as the host name to allow only\nlocal client connections.\n \nYou can use a netmask to match a range of IP addresses using\n\'base_ip/netmask\' as the\nhost name. A user with an IP address ip_addr will be allowed\nto connect if the following\ncondition is true:\n \nip_addr & netmask = base_ip\n \nYou can only use netmasks that specify a multiple of 8 bits\nof the address to match. That is,\nonly the following netmasks are allowed:\n \n255.0.0.0\n255.255.0.0\n255.255.255.0\n255.255.255.255\n \nUsing 255.255.255.255 is equivalent to not using a netmask\nat all.\n \nUser Name Component\n \nUser names must match exactly, including case. A user name\nthat is empty is known as an anonymous account and is\nallowed to match a login attempt with any user name\ncomponent. These are described more in the next section.\n \nFor valid identifiers to use as user names, see Identifier\nNames.\n \nIt is possible for more than one account to match when a\nuser connects. MariaDB selects\nthe first matching account after sorting according to the\nfollowing criteria:\nAccounts with an exact host name are sorted before accounts\nusing a wildcard in the\nhost name. Host names using a netmask are considered to be\nexact for sorting.\nAccounts with a wildcard in the host name are sorted\naccording to the position of\nthe first wildcard character. Those with a wildcard\ncharacter later in the host name\nsort before those with a wildcard character earlier in the\nhost name.\nAccounts with a non-empty user name sort before accounts\nwith an empty user name.\nAccounts with an empty user name are sorted last. As\nmentioned previously, these are known as anonymous accounts.\nThese are described more in the next section.\n \nThe following table shows a list of example account as\nsorted by these criteria:\n \n+---------+-------------+\n| User | Host |\n+---------+-------------+\n| joffrey | 192.168.0.3 |\n| | 192.168.0.% |\n| joffrey | 192.168.% |\n| | 192.168.% |\n+---------+-------------+\n \nOnce connected, you only have the privileges granted to the\naccount that matched,\nnot all accounts that could have matched. For example,\nconsider the following\ncommands:\n \nCREATE USER \'joffrey\'@\'192.168.0.3\';\n \nCREATE USER \'joffrey\'@\'%\';\n \nGRANT SELECT ON test.t1 to \'joffrey\'@\'192.168.0.3\';\n \nGRANT SELECT ON test.t2 to \'joffrey\'@\'%\';\n \nIf you connect as joffrey from 192.168.0.3, you will have\nthe SELECT\nprivilege on the table test.t1, but not on the table\ntest.t2. If you connect as joffrey from any other IP\naddress, you will have the SELECT privilege on the table\ntest.t2, but not\non the table test.t1.\n \nBeginning with MariaDB 5.5.31, usernames can be up to 80\ncharacters long. From MariaDB 10.0 the system tables are all\nby default this length. However, in order to enable this\nfeature in MariaDB 5.5, the following schema changes must be\nmade:\n \nALTER TABLE mysql.user MODIFY User CHAR(80) BINARY NOT NULL\nDEFAULT \'\';\n \nALTER TABLE mysql.db MODIFY User CHAR(80) BINARY NOT NULL\nDEFAULT \'\';\n \nALTER TABLE mysql.tables_priv MODIFY User CHAR(80) BINARY\nNOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.columns_priv MODIFY User CHAR(80) BINARY\nNOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.procs_priv MODIFY User CHAR(80) BINARY NOT\nNULL DEFAULT \'\';\n \nALTER TABLE mysql.proc MODIFY definer CHAR(141) COLLATE\nutf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.event MODIFY definer CHAR(141) COLLATE\nutf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.proxies_priv MODIFY User CHAR(80) COLLATE\nutf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.proxies_priv MODIFY Proxied_user CHAR(80)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.proxies_priv MODIFY Grantor CHAR(141)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.servers MODIFY Username CHAR(80) NOT NULL\nDEFAULT \'\';\n \nALTER TABLE mysql.procs_priv MODIFY Grantor CHAR(141)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nALTER TABLE mysql.tables_priv MODIFY Grantor CHAR(141)\nCOLLATE utf8_bin NOT NULL DEFAULT \'\';\n \nFLUSH PRIVILEGES;\n \nAnonymous Accounts\n \nAnonymous accounts are accounts where the user name portion\nof the account name is empty. These accounts act as special\ncatch-all accounts. If a user attempts to log into the\nsystem from a host, and an anonymous account exists with a\nhost name portion that matches the user\'s host, then the\nuser will log in as the anonymous account if there is no\nmore specific account match for the user name that the user\nentered.\n \nFor example, here are some anonymous accounts:\n \nCREATE USER \'\'@\'localhost\';\n \nCREATE USER \'\'@\'192.168.0.3\';\n \nFixing a Legacy Default Anonymous Account\n \nOn some systems, the mysql.db table has some entries for the\n\'\'@\'%\' anonymous account by default. Unfortunately,\nthere is no matching entry in the mysql.user table, which\nmeans that this anonymous account doesn\'t exactly exist,\nbut it does have privileges--usually on the default test\ndatabase created by mysql_install_db. These account-less\nprivileges are a legacy that is leftover from a time when\nMySQL\'s privilege system was less advanced.\n \nThis situation means that you will run into errors if you\ntry to create a \'\'@\'%\' account. For example:\n \nCREATE USER \'\'@\'%\';\n \nERROR 1396 (HY000): Operation CREATE USER failed for\n\'\'@\'%\'\n \nThe fix is to DELETE the row in the mysql.db table and then\nexecute FLUSH PRIVILEGES:\n \nDELETE FROM mysql.db WHERE User=\'\' AND Host=\'%\';\n \nFLUSH PRIVILEGES;\n \nAnd then the account can be created:\n \nCREATE USER \'\'@\'%\';\n \nQuery OK, 0 rows affected (0.01 sec)\n \nSee MDEV-13486 for more information.\n \nPassword Expiry\n \nBesides automatic password expiry, as determined by\ndefault_password_lifetime, password expiry times can be set\non an individual user basis, overriding the global setting,\nfor example:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nSee User Password Expiry for more details.\n \nAccount Locking\n \nAccount locking permits privileged administrators to\nlock/unlock user accounts. No new client connections will be\npermitted if an account is locked (existing connections are\nnot affected). For example:\n \nCREATE USER \'marijn\'@\'localhost\' ACCOUNT LOCK;\n \nSee Account Locking','','https://mariadb.com/kb/en/create-user/');
+update help_topic set description = CONCAT(description, ' for more details.\n \n\n\nURL: https://mariadb.com/kb/en/create-user/') WHERE help_topic_id = 118;
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (119,10,'ALTER USER','The ALTER USER statement was introduced in MariaDB 10.2.0.\n \nSyntax\n------ \nALTER USER [IF EXISTS] \n user_specification [,user_specification] ...\n [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]\n [WITH resource_option [resource_option] ...]\n [password_option | lock_option] \n \nuser_specification:\n username [authentication_option]\n \nauthentication_option:\n IDENTIFIED BY \'password\' \n | IDENTIFIED BY PASSWORD \'password_hash\'\n | IDENTIFIED {VIA|WITH} authentication_plugin\n | IDENTIFIED {VIA|WITH} authentication_plugin {USING|AS}\n\'authentication_string\'\n | IDENTIFIED {VIA|WITH} authentication_plugin {USING|AS}\nPASSWORD(\'password\')\n \ntls_option\n SSL \n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n \nresource_option\n MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n | MAX_STATEMENT_TIME time\n \npassword_option:\n PASSWORD EXPIRE\n | PASSWORD EXPIRE DEFAULT\n | PASSWORD EXPIRE NEVER\n | PASSWORD EXPIRE INTERVAL N DAY\n \nlock_option:\n ACCOUNT LOCK\n | ACCOUNT UNLOCK\n}\n \nDescription\n----------- \nThe ALTER USER statement modifies existing MariaDB accounts.\nTo use it, you must have the global CREATE USER privilege or\nthe UPDATE privilege for the mysql database. The global\nSUPER privilege is also required if the read_only system\nvariable is enabled.\n \nIf any of the specified user accounts do not yet exist, an\nerror results. If an error occurs, ALTER USER will still\nmodify the accounts that do not result in an error. Only one\nerror is produced for all users which have not been\nmodified.\n \nIF EXISTS\n \nWhen the IF EXISTS clause is used, MariaDB will return a\nwarning instead of an error for each specified user that\ndoes not exist.\n \nAccount Names\n \nFor ALTER USER statements, account names are specified as\nthe username argument in the same way as they are for CREATE\nUSER statements. See account names from the CREATE USER page\nfor details on how account names are specified.\n \nCURRENT_USER or CURRENT_USER() can also be used to alter the\naccount logged into the current session. For example, to\nchange the current user\'s password to mariadb:\n \nALTER USER CURRENT_USER() IDENTIFIED BY \'mariadb\';\n \nAuthentication Options\n \nIDENTIFIED BY \'password\'\n \nThe optional IDENTIFIED BY clause can be used to provide an\naccount with a password. The password should be specified in\nplain text. It will be hashed by the PASSWORD function prior\nto being stored to the mysql.user table.\n \nFor example, if our password is mariadb, then we can set the\naccount\'s password with:\n \nALTER USER foo2@test IDENTIFIED BY \'mariadb\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED BY PASSWORD \'password_hash\'\n \nThe optional IDENTIFIED BY PASSWORD clause can be used to\nprovide an account with a password that has already been\nhashed. The password should be specified as a hash that was\nprovided by the PASSWORD function. It will be stored to the\nmysql.user table as-is.\n \nFor example, if our password is mariadb, then we can find\nthe hash with:\n \nSELECT PASSWORD(\'mariadb\');\n+-------------------------------------------+\n| PASSWORD(\'mariadb\') |\n+-------------------------------------------+\n| *54958E764CE10E50764C2EECBB71D01F08549980 |\n+-------------------------------------------+\n1 row in set (0.00 sec)\n \nAnd then we can set an account\'s password with the hash:\n \nALTER USER foo2@test IDENTIFIED BY PASSWORD\n\'*54958E764CE10E50764C2EECBB71D01F08549980\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED {VIA|WITH} authentication_plugin\n \nThe optional IDENTIFIED VIA authentication_plugin allows you\nto specify that the account should be authenticated by a\nspecific authentication plugin. The plugin name must be an\nactive authentication plugin as per SHOW PLUGINS. If it\ndoesn\'t show up in that output, then you will need to\ninstall it with INSTALL PLUGIN or INSTALL SONAME.\n \nFor example, this could be used with the PAM authentication\nplugin:\n \nALTER USER foo2@test IDENTIFIED VIA pam;\n \nSome authentication plugins allow additional arguments to be\nspecified after a USING or AS keyword. For example, the PAM\nauthentication plugin accepts a service name:\n \nALTER USER foo2@test IDENTIFIED VIA pam USING \'mariadb\';\n \nThe exact meaning of the additional argument would depend on\nthe specific authentication plugin.\n \nIn MariaDB 10.4 and later, the USING or AS keyword can also\nbe used to provide a plain-text password to a plugin if\nit\'s provided as an argument to the PASSWORD() function.\nThis is only valid for authentication plugins that have\nimplemented a hook for the PASSWORD() function. For example,\nthe ed25519 authentication plugin supports this:\n \nALTER USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\');\n \nTLS Options\n \nBy default, MariaDB transmits data between the server and\nclients without encrypting it. This is generally acceptable\nwhen the server and client run on the same host or in\nnetworks where security is guaranteed through other means.\nHowever, in cases where the server and client exist on\nseparate networks or they are in a high-risk network, the\nlack of encryption does introduce security concerns as a\nmalicious actor could potentially eavesdrop on the traffic\nas it is sent over the network between them.\n \nTo mitigate this concern, MariaDB allows you to encrypt data\nin transit between the server and clients using the\nTransport Layer Security (TLS) protocol. TLS was formerly\nknown as Secure Socket Layer (SSL), but strictly speaking\nthe SSL protocol is a predecessor to TLS and, that version\nof the protocol is now considered insecure. The\ndocumentation still uses the term SSL often and for\ncompatibility reasons TLS-related server system and status\nvariables still use the prefix ssl_, but internally, MariaDB\nonly supports its secure successors.\n \nSee Secure Connections Overview for more information about\nhow to determine whether your MariaDB server has TLS\nsupport.\n \nYou can set certain TLS-related restrictions for specific\nuser accounts. For instance, you might use this with user\naccounts that require access to sensitive data while sending\nit across networks that you do not control. These\nrestrictions can be enabled for a user account with the\nCREATE USER, ALTER USER, or GRANT statements. The following\noptions are available:\n \nOption | Description | \n \nREQUIRE NONE | TLS is not required for this account, but can\nstill be used. | \n \nREQUIRE SSL | The account must use TLS, but no valid X509\ncertificate is required. This option cannot be combined with\nother TLS options. | \n \nREQUIRE X509 | The account must use TLS and must have a\nvalid X509 certificate. This option implies REQUIRE SSL.\nThis option cannot be combined with other TLS options. | \n \nREQUIRE ISSUER \'issuer\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the Certificate\nAuthority must be the one specified via the string issuer.\nThis option implies REQUIRE X509. This option can be\ncombined with the SUBJECT, and CIPHER options in any order.\n| \n \nREQUIRE SUBJECT \'subject\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the certificate\'s\nSubject must be the one specified via the string subject.\nThis option implies REQUIRE X509. This option can be\ncombined with the ISSUER, and CIPHER options in any order. |\n\n \nREQUIRE CIPHER \'cipher\' | The account must use TLS, but no\nvalid X509 certificate is required. Also, the encryption\nused for the connection must use one of the methods\nspecified in the string cipher. This option implies REQUIRE\nSSL. This option can be combined with the ISSUER, and\nSUBJECT options in any order. | \n \nThe REQUIRE keyword must be used only once for all specified\noptions, and the AND keyword can be used to separate\nindividual options, but it is not required.\n \nFor example, you can alter a user account to require these\nTLS options with the following:\n \nALTER USER \'alice\'@\'%\'\n REQUIRE SUBJECT \'/CN=alice/O=My Dom,\nInc./C=US/ST=Oregon/L=Portland\'\n AND ISSUER \'/C=FI/ST=Somewhere/L=City/ O=Some\nCompany/CN=Peter Parker/emailAddress=p.parker@marvel.com\'\n AND CIPHER \'TLSv1.2\';\n \nIf any of these options are set for a specific user account,\nthen any client who tries to connect with that user account\nwill have to be configured to connect with TLS.\n \nSee Securing Connections for Client and Server for\ninformation on how to enable TLS on the client and server.\n \nResource Limit Options\n \nMariaDB 10.2.0 introduced a number of resource limit\noptions.\n \nIt is possible to set per-account limits for certain server\nresources. The following table shows the values that can be\nset per account:\n \nLimit Type | Decription | \n \nMAX_QUERIES_PER_HOUR | Number of statements that the account\ncan issue per hour (including updates) | \n \nMAX_UPDATES_PER_HOUR | Number of updates (not queries) that\nthe account can issue per hour | \n \nMAX_CONNECTIONS_PER_HOUR | Number of connections that the\naccount can start per hour | \n \nMAX_USER_CONNECTIONS | Number of simultaneous connections\nthat can be accepted from the same account; if it is 0,\nmax_connections will be used instead; if max_connections is\n0, there is no limit for this account\'s simultaneous\nconnections. | \n \nMAX_STATEMENT_TIME | Timeout, in seconds, for statements\nexecuted by the user. See also Aborting Statements that\nExceed a Certain Time to Execute. | \n \nIf any of these limits are set to 0, then there is no limit\nfor that resource for that user.\n \nHere is an example showing how to set an account\'s resource\nlimits:\n \nALTER USER \'someone\'@\'localhost\' WITH\n MAX_USER_CONNECTIONS 10\n MAX_QUERIES_PER_HOUR 200;\n \nThe resources are tracked per account, which means\n\'user\'@\'server\'; not per user name or per connection.\n \nThe count can be reset for all users using FLUSH\nUSER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.\n \nPer account resource limits are stored in the user table, in\nthe mysql database. Columns used for resources limits are\nnamed max_questions, max_updates, max_connections (for\nMAX_CONNECTIONS_PER_HOUR), and max_user_connections (for\nMAX_USER_CONNECTIONS).\n \nPassword Expiry\n \nBesides automatic password expiry, as determined by\ndefault_password_lifetime, password expiry times can be set\non an individual user basis, overriding the global setting,\nfor example:\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE NEVER;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nSee User Password Expiry for more details.\n \nAccount Locking\n \nAccount locking permits privileged administrators to\nlock/unlock user accounts. No new client connections will be\npermitted if an account is locked (existing connections are\nnot affected). For example:\n \nALTER USER \'marijn\'@\'localhost\' ACCOUNT LOCK;\n \nSee Account Locking for more details.\n \n\n\nURL: https://mariadb.com/kb/en/alter-user/','','https://mariadb.com/kb/en/alter-user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (120,10,'DROP USER','Syntax\n------ \nDROP USER [IF EXISTS] user_name [, user_name] ...\n \nDescription\n----------- \nThe DROP USER statement removes one or more MariaDB\naccounts. It removes\nprivilege rows for the account from all grant tables. To use\nthis statement,\nyou must have the global CREATE USER privilege\nor the DELETE privilege for the mysql database.\nEach account is named using the same format as for the\nCREATE USER\nstatement; for example, \'jeffrey\'@\'localhost\'. If you\nspecify\nonly the user name part of the account name, a host name\npart of \'%\' is\nused. For additional information about specifying account\nnames, see\nCREATE USER.\n \nNote that, if you specify an account that is currently\nconnected, it will not\nbe deleted until the connection is closed. The connection\nwill not be\nautomatically closed.\n \nIf any of the specified user accounts do not exist, ERROR\n1396 (HY000)\nresults. If an error occurs, DROP USER will still drop the\naccounts that do\nnot result in an error. Only one error is produced for all\nusers which have not\nbeen dropped:\n \nERROR 1396 (HY000): Operation DROP USER failed for\n\'u1\'@\'%\',\'u2\'@\'%\'\n \nFailed CREATE or DROP operations, for both users and roles,\nproduce the\nsame error code.\n \nIF EXISTS\n \nThe IF EXISTS clause was added in MariaDB 10.1.3\n \nIf the IF EXISTS clause is used, MariaDB will return a note\ninstead of an error if the user does not exist.\n \nExamples\n-------- \nDROP USER bob;\n \nIF EXISTS:\n \nDROP USER bob;\n \nERROR 1396 (HY000): Operation DROP USER failed for\n\'bob\'@\'%\'\n \nDROP USER IF EXISTS bob;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+---------------------------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------------------------+\n| Note | 1974 | Can\'t drop user \'bob\'@\'%\'; it doesn\'t\nexist |\n+-------+------+---------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-user/','','https://mariadb.com/kb/en/drop-user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (121,10,'GRANT','Syntax\n------ \nGRANT\n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n TO user_specification [ user_options ...]\n \nuser_specification:\n username [authentication_option]\n \nauthentication_option:\n IDENTIFIED BY \'password\' \n | IDENTIFIED BY PASSWORD \'password_hash\'\n | IDENTIFIED {VIA|WITH} authentication_rule [OR\nauthentication_rule ...]\n \nauthentication_rule:\n authentication_plugin\n | authentication_plugin {USING|AS}\n\'authentication_string\'\n | authentication_plugin {USING|AS} PASSWORD(\'password\')\n \nGRANT PROXY ON username\n TO username [, username] ...\n [WITH GRANT OPTION]\n \nuser_options:\n [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]\n [WITH with_option [with_option] ...]\n \nobject_type:\n TABLE\n | FUNCTION\n | PROCEDURE\n \npriv_level:\n *\n | *.*\n | db_name.*\n | db_name.tbl_name\n | tbl_name\n | db_name.routine_name\n \nwith_option:\n GRANT OPTION\n | resource_option\n \nresource_option:\n MAX_QUERIES_PER_HOUR count\n | MAX_UPDATES_PER_HOUR count\n | MAX_CONNECTIONS_PER_HOUR count\n | MAX_USER_CONNECTIONS count\n | MAX_STATEMENT_TIME time\n \ntls_option:\n SSL \n | X509\n | CIPHER \'cipher\'\n | ISSUER \'issuer\'\n | SUBJECT \'subject\'\n \nDescription\n----------- \nThe GRANT statement allows you to grant privileges or roles\nto accounts. To use GRANT, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are\ngranting.\n \nUse the REVOKE statement to revoke privileges granted with\nthe GRANT statement.\n \nUse the SHOW GRANTS statement to determine what privileges\nan account has.\n \nAccount Names\n \nFor GRANT statements, account names are specified as the\nusername argument in the same way as they are for CREATE\nUSER statements. See account names from the CREATE USER page\nfor details on how account names are specified.\n \nImplicit Account Creation\n \nThe GRANT statement also allows you to implicitly create\naccounts in some cases.\n \nIf the account does not yet exist, then GRANT can implicitly\ncreate it. To implicitly create an account with GRANT, a\nuser is required to have the same privileges that would be\nrequired to explicitly create the account with the CREATE\nUSER statement.\n \nIf the NO_AUTO_CREATE_USER SQL_MODE is set, then accounts\ncan only be created if authentication information is\nspecified, or with a CREATE USER statement. If no\nauthentication information is provided, GRANT will produce\nan error when the specified account does not exist, for\nexample:\n \nshow variables like \'%sql_mode%\' ;\n+---------------+--------------------------------------------+\n| Variable_name | Value |\n+---------------+--------------------------------------------+\n| sql_mode | NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |\n+---------------+--------------------------------------------+\n \nGRANT USAGE ON *.* TO \'user123\'@\'%\' IDENTIFIED BY \'\';\nERROR 1133 (28000): Can\'t find any matching row in the user\ntable\n \nGRANT USAGE ON *.* TO \'user123\'@\'%\' IDENTIFIED VIA PAM\nusing \'mariadb\' require ssl ;\nQuery OK, 0 rows affected (0.00 sec)\n \nselect host, user from mysql.user where user=\'user123\' ;\n \n+------+----------+\n| host | user |\n+------+----------+\n| % | user123 |\n+------+----------+\n \nPrivilege Levels\n \nPrivileges can be set globally, for an entire database, for\na table or routine,\nor for individual columns in a table. Certain privileges can\nonly be set at\ncertain levels.\nGlobal privileges are granted using *.* for\npriv_level. Global privileges include privileges to\nadminister the database\nand manage user accounts, as well as privileges for all\ntables, functions, and\nprocedures. Global privileges are stored in the mysql.user\ntable.\nDatabase privileges are granted using db_name.*\nfor priv_level, or using just * to use default database.\nDatabase\nprivileges include privileges to create tables and\nfunctions, as well as\nprivileges for all tables, functions, and procedures in the\ndatabase. Database privileges are stored in the mysql.db\ntable.\nTable privileges are granted using db_name.tbl_name\nfor priv_level, or using just tbl_name to specify a table in\nthe default\ndatabase. The TABLE keyword is optional. Table privileges\ninclude the\nability to select and change data in the table. Certain\ntable privileges can\nbe granted for individual columns.\nColumn privileges are granted by specifying a table for\npriv_level and providing a column list after the privilege\ntype. They allow\nyou to control exactly which columns in a table users can\nselect and change.\nFunction privileges are granted using FUNCTION\ndb_name.routine_name\nfor priv_level, or using just FUNCTION routine_name to\nspecify a function\nin the default database.\nProcedure privileges are granted using PROCEDURE\ndb_name.routine_name\nfor priv_level, or using just PROCEDURE routine_name to\nspecify a procedure\nin the default database.\n \nThe USAGE Privilege\n \nThe USAGE privilege grants no real privileges. The SHOW\nGRANTS\nstatement will show a global USAGE privilege for a\nnewly-created user. You\ncan use USAGE with the GRANT statement to change options\nlike GRANT OPTION\nand MAX_USER_CONNECTIONS without changing any account\nprivileges.\n \nThe ALL PRIVILEGES Privilege\n \nThe ALL PRIVILEGES privilege grants all available\nprivileges. Granting all\nprivileges only affects the given privilege level. For\nexample, granting all\nprivileges on a table does not grant any privileges on the\ndatabase or globally.\n \nUsing ALL PRIVILEGES does not grant the special GRANT OPTION\nprivilege.\n \nYou can use ALL instead of ALL PRIVILEGES.\n \nThe GRANT OPTION Privilege\n \nUse the WITH GRANT OPTION clause to give users the ability\nto grant privileges\nto other users at the given privilege level. Users with the\nGRANT OPTION privilege can\nonly grant privileges they have. They cannot grant\nprivileges at a higher privilege level than\nthey have the GRANT OPTION privilege.\n \nThe GRANT OPTION privilege cannot be set for individual\ncolumns.\nIf you use WITH GRANT OPTION when specifying column\nprivileges,\nthe GRANT OPTION privilege will be granted for the entire\ntable.\n \nUsing the WITH GRANT OPTION clause is equivalent to listing\nGRANT OPTION\nas a privilege.\n \nGlobal Privileges\n \nThe following table lists the privileges that can be granted\nglobally. You can\nalso grant all database, table, and function privileges\nglobally. When granted\nglobally, these privileges apply to all databases, tables,\nor functions,\nincluding those created later.\n \nTo set a global privilege, use *.* for priv_level.\n \nPrivilege | Description | \n \nCREATE USER | Create a user using the CREATE USER statement,\nor implicitly create a user with the GRANT statement. | \n \nFILE | Read and write files on the server, using statements\nlike LOAD DATA INFILE or functions like LOAD_FILE(). Also\nneeded to create CONNECT outward tables. MariaDB server must\nhave the permissions to access those files. | \n \nGRANT OPTION | Grant global privileges. You can only grant\nprivileges that you have. | \n \nPROCESS | Show information about the active processes, via\nSHOW PROCESSLIST or mysqladmin processlist. | \n \nRELOAD | Execute FLUSH statements or equivalent mysqladmin\ncommands. | \n \nREPLICATION CLIENT | Execute SHOW MASTER STATUS and SHOW\nSLAVE STATUS informative statements. | \n \nREPLICATION SLAVE | Accounts used by slave servers on the\nmaster need this privilege. This is needed to get the\nupdates made on the master. | \n \nSHOW DATABASES | List all databases using the SHOW DATABASES\nstatement. Without the SHOW DATABASES privilege, you can\nstill issue the SHOW DATABASES statement, but it will only\nlist databases containing tables on which you have\nprivileges. | \n \nSHUTDOWN | Shut down the server using SHUTDOWN or the\nmysqladmin shutdown command. | \n \nSUPER | Execute superuser statements: CHANGE MASTER TO, KILL\n(users who do not have this privilege can only KILL their\nown threads), PURGE LOGS, SET global system variables, or\nthe mysqladmin debug command. Also, this permission allows\nthe user to write data even if the read_only startup option\nis set, enable or disable logging, enable or disable\nreplication on slaves, specify a DEFINER for statements that\nsupport that clause, connect once after reaching the\nMAX_CONNECTIONS. If a statement has been specified for the\ninit-connect mysqld option, that command will not be\nexecuted when a user with SUPER privileges connects to the\nserver. | \n \nDatabase Privileges\n \nThe following table lists the privileges that can be granted\nat the database\nlevel. You can also grant all table and function privileges\nat the database\nlevel. Table and function privileges on a database apply to\nall tables or\nfunctions in that database, including those created later.\n \nTo set a privilege for a database, specify the database\nusing\ndb_name.* for priv_level, or just use *\nto specify the default database.\n \nPrivilege | Description | \n \nCREATE | Create a database using the CREATE DATABASE\nstatement, when the privilege is granted for a database. You\ncan grant the CREATE privilege on databases that do not yet\nexist. This also grants the CREATE privilege on all tables\nin the database. | \n \nCREATE ROUTINE | Create Stored Programs using the CREATE\nPROCEDURE and CREATE FUNCTION statements. | \n \nCREATE TEMPORARY TABLES | Create temporary tables with the\nCREATE TEMPORARY TABLE statement. This privilege enable\nwriting and dropping those temporary tables | \n \nDROP | Drop a database using the DROP DATABASE statement,\nwhen the privilege is granted for a database. This also\ngrants the DROP privilege on all tables in the database. | \n \nEVENT | Create, drop and alter EVENTs. Added in MySQL 5.1.6.\n| \n \nGRANT OPTION | Grant database privileges. You can only grant\nprivileges that you have. | \n \nLOCK TABLES | Acquire explicit locks using the LOCK TABLES\nstatement; you also need to have the SELECT privilege on a\ntable, in order to lock it. | \n \nTable Privileges\n \nPrivilege | Description | \n \nALTER | Change the structure of an existing table using the\nALTER TABLE statement. | \n \nCREATE | Create a table using the CREATE TABLE statement.\nYou can grant the CREATE privilege on tables that do not yet\nexist. | \n \nCREATE VIEW | Create a view using the CREATE_VIEW statement.\n| \n \nDELETE | Remove rows from a table using the DELETE\nstatement. | \n \nDELETE HISTORY | Remove historical rows from a table using\nthe DELETE HISTORY statement. Displays as DELETE VERSIONING\nROWS when running SHOW GRANTS until MariaDB 10.3.15 and\nuntil MariaDB 10.4.5 (MDEV-17655), or when running SHOW\nPRIVILEGES (MDEV-20382). From MariaDB 10.3.4. From MariaDB\n10.3.5, if a user has the SUPER privilege but not this\nprivilege, running mysql_upgrade will grant this privilege\nas well. | \n \nDROP | Drop a table using the DROP TABLE statement or a view\nusing the DROP VIEW statement. Also required to execute the\nTRUNCATE TABLE statement. | \n \nGRANT OPTION | Grant table privileges. You can only grant\nprivileges that you have. | \n \nINDEX | Create an index on a table using the CREATE INDEX\nstatement. Without the INDEX privilege, you can still create\nindexes when creating a table using the CREATE TABLE\nstatement if the you have the CREATE privilege, and you can\ncreate indexes using the ALTER TABLE statement if you have\nthe ALTER privilege. | \n \nINSERT | Add rows to a table using the INSERT statement. The\nINSERT privilege can also be set on individual columns; see\nColumn Privileges below for details. | \n \nREFERENCES | Unused. | \n \nSELECT | Read data from a table using the SELECT statement.\nThe SELECT privilege can also be set on individual columns;\nsee Column Privileges below for details. | \n \nSHOW VIEW | Show the CREATE VIEW statement to create a view\nusing the SHOW CREATE VIEW statement. | \n \nTRIGGER | Execute triggers associated to tables you update,\nexecute the CREATE TRIGGER and DROP TRIGGER statements. You\nwill still be able to see triggers. | \n \nUPDATE | Update existing rows in a table using the UPDATE\nstatement. UPDATE statements usually include a WHERE clause\nto update only certain rows. You must have SELECT privileges\non the table or the appropriate columns for the WHERE\nclause. The UPDATE privilege can also be set on individual\ncolumns; see Column Privileges below for details. | \n \nColumn Privileges\n \nSome table privileges can be set for individual columns of a\ntable. To use\ncolumn privileges, specify the table explicitly and provide\na list of column\nnames after the privilege type. For example, the following\nstatement would allow\nthe user to read the names and positions of employees, but\nnot other information\nfrom the same table, such as salaries.\n \nGRANT SELECT (name, position) on Employee to\n\'jeffrey\'@\'localhost\';\n \nPrivilege | Description | \n \nINSERT (column_list) | Add rows specifying values in columns\nusing the INSERT statement. If you only have column-level\nINSERT privileges, you must specify the columns you are\nsetting in the INSERT statement. All other columns will be\nset to their default values, or NULL. | \n \nREFERENCES (column_list) | Unused. | \n \nSELECT (column_list) | Read values in columns using the\nSELECT statement. You cannot access or query any columns for\nwhich you do not have SELECT privileges, including in WHERE,\nON, GROUP BY, and ORDER BY clauses. | \n \nUPDATE (column_list) | Update values in columns of existing\nrows using the UPDATE statement. UPDATE statements usually\ninclude a WHERE clause to update only certain rows. You must\nhave SELECT privileges on the table or the appropriate\ncolumns for the WHERE clause. | \n \nFunction Privileges\n \nPrivilege | Description | \n \nALTER ROUTINE | Change the characteristics of a stored\nfunction using the ALTER FUNCTION statement. | \n \nEXECUTE | Use a stored function. You need SELECT privileges\nfor any tables or columns accessed by the function. | \n \nGRANT OPTION | Grant function privileges. You can only grant\nprivileges that you have. | \n \nProcedure Privileges\n \nPrivilege | Description | \n \nALTER ROUTINE | Change the characteristics of a stored\nprocedure using the ALTER PROCEDURE statement. | \n \nEXECUTE | Execute a stored procedure using the CALL\nstatement. The privilege to call a procedure may allow you\nto perform actions you wouldn\'t otherwise be able to do,\nsuch as insert rows into a table. | \n \nGRANT OPTION | Grant procedure privileges. You can only\ngrant privileges that you have. | \n \nProxy Privileges\n \nPrivilege | Description | \n \nPROXY | Permits one user to be a proxy for another. | \n \nThe PROXY privilege allows one user to proxy as another\nuser, which means their privileges change to that of the\nproxy user, and the CURRENT_USER() function returns the user\nname of the proxy user.\n \nThe PROXY privilege only works with authentication plugins\nthat support it. The default mysql_native_password\nauthentication plugin does not support proxy users.\n \nThe pam authentication plugin is the only plugin included\nwith MariaDB that currently supports proxy users. The PROXY\nprivilege is commonly used with the pam authentication\nplugin to enable user and group mapping with PAM.\n \nFor example, to grant the PROXY privilege to an anonymous\naccount that authenticates with the pam authentication\nplugin, you could execute the following:\n \nCREATE USER \'dba\'@\'%\' IDENTIFIED BY \'strongpassword\';\n \nGRANT ALL PRIVILEGES ON *.* TO \'dba\'@\'%\' ;\n \nCREATE USER \'\'@\'%\' IDENTIFIED VIA pam USING \'mariadb\';\n \nGRANT PROXY ON \'dba\'@\'%\' TO \'\'@\'%\';\n \nA user account can only grant the PROXY privilege for a\nspecific user account if the granter also has the PROXY\nprivilege for that specific user account, and if that\nprivilege is defined WITH GRANT OPTION. For example, the\nfollowing example fails because the granter does not have\nthe PROXY privilege for that specific user account at all:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' |\n+-----------------------------------------------------------------------------------------------------------------------+\n \nGRANT PROXY ON \'dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nERROR 1698 (28000): Access denied for user\n\'alice\'@\'localhost\'\n \nAnd the following example fails because the granter does\nhave the PROXY privilege for that specific user account, but\nit is not defined WITH GRANT OPTION:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' |\n| GRANT PROXY ON \'dba\'@\'localhost\' TO\n\'alice\'@\'localhost\' |\n+-----------------------------------------------------------------------------------------------------------------------+\n \nMariaDB [(none)]> GRANT PROXY ON \'dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nERROR 1698 (28000): Access denied for user\n\'alice\'@\'localhost\'\n \nBut the following example succeeds because the granter does\nhave the PROXY privilege for that specific user account, and\nit is defined WITH GRANT OPTION:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' WITH GRANT\nOPTION |\n| GRANT PROXY ON \'dba\'@\'localhost\' TO\n\'alice\'@\'localhost\' WITH GRANT OPTION |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n \nGRANT PROXY ON \'dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nQuery OK, 0 rows affected (0.004 sec)\n \nA user account can grant the PROXY privilege for any other\nuser account if th','','https://mariadb.com/kb/en/grant/');
+update help_topic set description = CONCAT(description, 'e granter has the PROXY privilege for the\n\'\'@\'%\' anonymous user account, like this:\n \nGRANT PROXY ON \'\'@\'%\' TO \'dba\'@\'localhost\' WITH\nGRANT OPTION;\n \nFor example, the following example succeeds because the user\ncan grant the PROXY privilege for any other user account:\n \nSELECT USER(), CURRENT_USER();\n+-----------------+-----------------+\n| USER() | CURRENT_USER() |\n+-----------------+-----------------+\n| alice@localhost | alice@localhost |\n+-----------------+-----------------+\n \nSHOW GRANTS;\n \n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Grants for alice@localhost |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'alice\'@\'localhost\'\nIDENTIFIED BY PASSWORD\n\'*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19\' WITH GRANT\nOPTION |\n| GRANT PROXY ON \'\'@\'%\' TO \'alice\'@\'localhost\' WITH\nGRANT OPTION |\n+-----------------------------------------------------------------------------------------------------------------------------------------+\n \nGRANT PROXY ON \'app1_dba\'@\'localhost\' TO\n\'bob\'@\'localhost\';\n \nQuery OK, 0 rows affected (0.004 sec)\n \nGRANT PROXY ON \'app2_dba\'@\'localhost\' TO\n\'carol\'@\'localhost\';\n \nQuery OK, 0 rows affected (0.004 sec)\n \nThe default root user accounts created by mysql_install_db\nhave this privilege. For example:\n \nGRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH\nGRANT OPTION;\n \nGRANT PROXY ON \'\'@\'%\' TO \'root\'@\'localhost\' WITH\nGRANT OPTION;\n \nThis allows the default root user accounts to grant the\nPROXY privilege for any other user account, and it also\nallows the default root user accounts to grant others the\nprivilege to do the same.\n \nAuthentication Options\n \nThe authentication options for the GRANT statement are the\nsame as those for the CREATE USER statement.\n \nIDENTIFIED BY \'password\'\n \nThe optional IDENTIFIED BY clause can be used to provide an\naccount with a password. The password should be specified in\nplain text. It will be hashed by the PASSWORD function prior\nto being stored to the mysql.user table.\n \nFor example, if our password is mariadb, then we can create\nthe user with:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED BY \'mariadb\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nIf the user account already exists and if you provide the\nIDENTIFIED BY clause, then the user\'s password will be\nchanged. You must have the privileges needed for the SET\nPASSWORD\nstatement to change a user\'s password with GRANT.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED BY PASSWORD \'password_hash\'\n \nThe optional IDENTIFIED BY PASSWORD clause can be used to\nprovide an account with a password that has already been\nhashed. The password should be specified as a hash that was\nprovided by the PASSWORD function. It will be stored to the\nmysql.user table as-is.\n \nFor example, if our password is mariadb, then we can find\nthe hash with:\n \nSELECT PASSWORD(\'mariadb\');\n+-------------------------------------------+\n| PASSWORD(\'mariadb\') |\n+-------------------------------------------+\n| *54958E764CE10E50764C2EECBB71D01F08549980 |\n+-------------------------------------------+\n1 row in set (0.00 sec)\n \nAnd then we can create a user with the hash:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED BY PASSWORD\n\'*54958E764CE10E50764C2EECBB71D01F08549980\';\n \nIf you do not specify a password with the IDENTIFIED BY\nclause, the user\nwill be able to connect without a password. A blank password\nis not a wildcard\nto match any password. The user must connect without\nproviding a password if no\npassword is set.\n \nIf the user account already exists and if you provide the\nIDENTIFIED BY clause, then the user\'s password will be\nchanged. You must have the privileges needed for the SET\nPASSWORD\nstatement to change a user\'s password with GRANT.\n \nThe only authentication plugins that this clause supports\nare mysql_native_password and mysql_old_password.\n \nIDENTIFIED {VIA|WITH} authentication_plugin\n \nThe optional IDENTIFIED VIA authentication_plugin allows you\nto specify that the account should be authenticated by a\nspecific authentication plugin. The plugin name must be an\nactive authentication plugin as per SHOW PLUGINS. If it\ndoesn\'t show up in that output, then you will need to\ninstall it with INSTALL PLUGIN or INSTALL SONAME.\n \nFor example, this could be used with the PAM authentication\nplugin:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED VIA pam;\n \nSome authentication plugins allow additional arguments to be\nspecified after a USING or AS keyword. For example, the PAM\nauthentication plugin accepts a service name:\n \nGRANT USAGE ON *.* TO foo2@test IDENTIFIED VIA pam USING\n\'mariadb\';\n \nThe exact meaning of the additional argument would depend on\nthe specific authentication plugin.\n \nThe USING or AS keyword can also be used to provide a\nplain-text password to a plugin if it\'s provided as an\nargument to the PASSWORD() function. This is only valid for\nauthentication plugins that have implemented a hook for the\nPASSWORD() function. For example, the ed25519 authentication\nplugin supports this:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\');\n \nOne can specify many authentication plugins, they all works\nas alternatives ways of authenticating a user:\n \nCREATE USER safe@\'%\' IDENTIFIED VIA ed25519 USING\nPASSWORD(\'secret\') OR unix_socket;\n \nResource Limit Options\n \nMariaDB 10.2.0 introduced a number of resource limit\noptions.\n \nIt is possible to set per-account limits for certain server\nresources. The following table shows the values that can be\nset per account:\n \nLimit Type | Decription | \n \nMAX_QUERIES_PER_HOUR | Number of statements that the account\ncan issue per hour (including updates) | \n \nMAX_UPDATES_PER_HOUR | Number of updates (not queries) that\nthe account can issue per hour | \n \nMAX_CONNECTIONS_PER_HOUR | Number of connections that the\naccount can start per hour | \n \nMAX_USER_CONNECTIONS | Number of simultaneous connections\nthat can be accepted from the same account; if it is 0,\nmax_connections will be used instead; if max_connections is\n0, there is no limit for this account\'s simultaneous\nconnections. | \n \nMAX_STATEMENT_TIME | Timeout, in seconds, for statements\nexecuted by the user. See also Aborting Statements that\nExceed a Certain Time to Execute. | \n \nIf any of these limits are set to 0, then there is no limit\nfor that resource for that user.\n \nTo set resource limits for an account, if you do not want to\nchange that account\'s privileges, you can issue a GRANT\nstatement with the USAGE privilege, which has no meaning.\nThe statement can name some or all limit types, in any\norder.\n \nHere is an example showing how to set resource limits:\n \nGRANT USAGE ON *.* TO \'someone\'@\'localhost\' WITH\n MAX_USER_CONNECTIONS 0\n MAX_QUERIES_PER_HOUR 200;\n \nThe resources are tracked per account, which means\n\'user\'@\'server\'; not per user name or per connection.\n \nThe count can be reset for all users using FLUSH\nUSER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.\n \nPer account resource limits are stored in the user table, in\nthe mysql database. Columns used for resources limits are\nnamed max_questions, max_updates, max_connections (for\nMAX_CONNECTIONS_PER_HOUR), and max_user_connections (for\nMAX_USER_CONNECTIONS).\n \nTLS Options\n \nBy default, MariaDB transmits data between the server and\nclients without encrypting it. This is generally acceptable\nwhen the server and client run on the same host or in\nnetworks where security is guaranteed through other means.\nHowever, in cases where the server and client exist on\nseparate networks or they are in a high-risk network, the\nlack of encryption does introduce security concerns as a\nmalicious actor could potentially eavesdrop on the traffic\nas it is sent over the network between them.\n \nTo mitigate this concern, MariaDB allows you to encrypt data\nin transit between the server and clients using the\nTransport Layer Security (TLS) protocol. TLS was formerly\nknown as Secure Socket Layer (SSL), but strictly speaking\nthe SSL protocol is a predecessor to TLS and, that version\nof the protocol is now considered insecure. The\ndocumentation still uses the term SSL often and for\ncompatibility reasons TLS-related server system and status\nvariables still use the prefix ssl_, but internally, MariaDB\nonly supports its secure successors.\n \nSee Secure Connections Overview for more information about\nhow to determine whether your MariaDB server has TLS\nsupport.\n \nYou can set certain TLS-related restrictions for specific\nuser accounts. For instance, you might use this with user\naccounts that require access to sensitive data while sending\nit across networks that you do not control. These\nrestrictions can be enabled for a user account with the\nCREATE USER, ALTER USER, or GRANT statements. The following\noptions are available:\n \nOption | Description | \n \nREQUIRE NONE | TLS is not required for this account, but can\nstill be used. | \n \nREQUIRE SSL | The account must use TLS, but no valid X509\ncertificate is required. This option cannot be combined with\nother TLS options. | \n \nREQUIRE X509 | The account must use TLS and must have a\nvalid X509 certificate. This option implies REQUIRE SSL.\nThis option cannot be combined with other TLS options. | \n \nREQUIRE ISSUER \'issuer\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the Certificate\nAuthority must be the one specified via the string issuer.\nThis option implies REQUIRE X509. This option can be\ncombined with the SUBJECT, and CIPHER options in any order.\n| \n \nREQUIRE SUBJECT \'subject\' | The account must use TLS and\nmust have a valid X509 certificate. Also, the certificate\'s\nSubject must be the one specified via the string subject.\nThis option implies REQUIRE X509. This option can be\ncombined with the ISSUER, and CIPHER options in any order. |\n\n \nREQUIRE CIPHER \'cipher\' | The account must use TLS, but no\nvalid X509 certificate is required. Also, the encryption\nused for the connection must use one of the methods\nspecified in the string cipher. This option implies REQUIRE\nSSL. This option can be combined with the ISSUER, and\nSUBJECT options in any order. | \n \nThe REQUIRE keyword must be used only once for all specified\noptions, and the AND keyword can be used to separate\nindividual options, but it is not required.\n \nFor example, you can create a user account that requires\nthese TLS options with the following:\n \nGRANT USAGE ON *.* TO \'alice\'@\'%\'\n REQUIRE SUBJECT \'/CN=alice/O=My Dom,\nInc./C=US/ST=Oregon/L=Portland\'\n AND ISSUER \'/C=FI/ST=Somewhere/L=City/ O=Some\nCompany/CN=Peter Parker/emailAddress=p.parker@marvel.com\'\n AND CIPHER \'TLSv1.2\';\n \nIf any of these options are set for a specific user account,\nthen any client who tries to connect with that user account\nwill have to be configured to connect with TLS.\n \nSee Securing Connections for Client and Server for\ninformation on how to enable TLS on the client and server.\n \nRoles\n \nRoles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nGRANT role TO grantee [, grantee2 ... ]\n[ WITH ADMIN OPTION ]\n \nThe GRANT statement is also used to grant the use a role to\none or more users or other roles. In order to be able to\ngrant a role, the grantor doing so must have permission to\ndo so (see WITH ADMIN in the CREATE ROLE article).\n \nSpecifying the WITH ADMIN OPTION permits the grantee to in\nturn grant the role to another.\n \nFor example, the following commands show how to grant the\nsame role to a couple different users.\n \nGRANT journalist TO hulda;\n \nGRANT journalist TO berengar WITH ADMIN OPTION;\n \nIf a user has been granted a role, they do not automatically\nobtain all permissions associated with that role. These\npermissions are only in use when the user activates the role\nwith the SET ROLE statement.\n \nGrant Examples\n \nGranting Root-like Privileges\n \nYou can create a user that has privileges similar to the\ndefault root accounts by executing the following:\n \nCREATE USER \'alexander\'@\'localhost\';\n \nGRANT ALL PRIVILEGES ON *.* to \'alexander\'@\'localhost\'\nWITH GRANT OPTION;\n \n\n\nURL: https://mariadb.com/kb/en/grant/') WHERE help_topic_id = 121;
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (122,10,'User Password Expiry','User password expiry was introduced in MariaDB 10.4.3.\n \nPassword expiry permits administrators to expire user\npasswords, either manually or automatically. \n \nSystem Variables\n \nThere are two system variables which affect password expiry:\ndefault_password_lifetime, which determines the amount of\ntime between requiring the user to change their password. 0,\nthe default, means automatic password expiry is not active.\n \nThe second variable, disconnect_on_expired_password\ndetermines whether a client is permitted to connect if their\npassword has expired, or whether they are permitted to\nconnect in sandbox mode, able to perform a limited subset of\nqueries related to resetting the password, in particular SET\nPASSWORD and SET.\n \nSetting a Password Expiry Limit for a User\n \nBesides automatic password expiry, as determined by\ndefault_password_lifetime, password expiry times can be set\non an individual user basis, overriding the global using the\nCREATE USER or ALTER USER statements, for example:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nLimits can be disabled by use of the NEVER keyword, for\nexample:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE NEVER;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE NEVER;\n \nA manually set limit can be restored the system default by\nuse of DEFAULT, for example:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nALTER USER \'monty\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nSHOW CREATE USER\n \nThe SHOW CREATE USER statement will display information\nabout the password expiry status of the user. Unlike MySQL,\nit will not display if the user is unlocked, or if the\npassword expiry is set to default.\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nCREATE USER \'konstantin\'@\'localhost\' PASSWORD EXPIRE\nNEVER;\n \nCREATE USER \'amse\'@\'localhost\' PASSWORD EXPIRE DEFAULT;\n \nSHOW CREATE USER \'monty\'@\'localhost\';\n \n+------------------------------------------------------------------+\n| CREATE USER for monty@localhost |\n+------------------------------------------------------------------+\n| CREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE\nINTERVAL 120 DAY |\n+------------------------------------------------------------------+\n \nSHOW CREATE USER \'konstantin\'@\'localhost\';\n \n+------------------------------------------------------------+\n| CREATE USER for konstantin@localhost |\n+------------------------------------------------------------+\n| CREATE USER \'konstantin\'@\'localhost\' PASSWORD EXPIRE\nNEVER |\n+------------------------------------------------------------+\n \nSHOW CREATE USER \'amse\'@\'localhost\';\n \n+--------------------------------+\n| CREATE USER for amse@localhost |\n+--------------------------------+\n| CREATE USER \'amse\'@\'localhost\' |\n+--------------------------------+\n \n--connect-expired-password Client Option\n \nThe mysql client --connect-expired-password option notifies\nthe server that the client is prepared to handle expired\npassword sandbox mode (even if the --batch option was\nspecified).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/user-password-expiry/','','https://mariadb.com/kb/en/user-password-expiry/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (123,10,'RENAME USER','Syntax\n------ \nRENAME USER old_user TO new_user\n [, old_user TO new_user] ...\n \nDescription\n----------- \nThe RENAME USER statement renames existing MariaDB accounts.\nTo use it,\nyou must have the global CREATE USER privilege\nor the UPDATE privilege for the mysql database.\nEach account is named using the same format as for the\nCREATE USER\nstatement; for example, \'jeffrey\'@\'localhost\'.\nIf you specify only the user name part of the account name,\na host\nname part of \'%\' is used.\n \nIf any of the old user accounts do not exist or any of the\nnew user accounts already\nexist, ERROR 1396 (HY000) results. If an error occurs,\nRENAME USER\nwill still rename the accounts that do not result in an\nerror.\n \nExamples\n-------- \nCREATE USER \'donald\', \'mickey\';\n \nRENAME USER \'donald\' TO \'duck\'@\'localhost\', \'mickey\'\nTO \'mouse\'@\'localhost\';\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/rename-user/','','https://mariadb.com/kb/en/rename-user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (124,10,'REVOKE','Privileges\n \nSyntax\n------ \nREVOKE \n priv_type [(column_list)]\n [, priv_type [(column_list)]] ...\n ON [object_type] priv_level\n FROM user [, user] ...\n \nREVOKE ALL PRIVILEGES, GRANT OPTION\n FROM user [, user] ...\n \nDescription\n----------- \nThe REVOKE statement enables system administrators to revoke\nprivileges (or roles - see section below) from MariaDB\naccounts. Each account is named using the same format\nas for the GRANT statement; for example,\n\'jeffrey\'@\'localhost\'. If you specify only the user name\npart\nof the account name, a host name part of \'%\' is used. For\ndetails on the levels at which privileges exist, the\nallowable\npriv_type and priv_level values, and the\nsyntax for specifying users and passwords, see GRANT.\n \nTo use the first REVOKE syntax, you must have the\nGRANT OPTION privilege, and you must have the privileges\nthat\nyou are revoking.\n \nTo revoke all privileges, use the second syntax, which drops\nall\nglobal, database, table, column, and routine privileges for\nthe named\nuser or users:\n \nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n \nTo use this REVOKE syntax, you must have the global\nCREATE USER privilege or the\nUPDATE privilege for the mysql database. See\nGRANT.\n \nExamples\n-------- \nREVOKE SUPER ON *.* FROM \'alexander\'@\'localhost\';\n \nRoles\n \nRoles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREVOKE role [, role ...]\n FROM grantee [, grantee2 ... ]\n \nDescription\n----------- \nREVOKE is also used to remove a role from a user or another\nrole that it\'s previously been assigned to. If a role has\npreviously been set as a default role, REVOKE does not\nremove the record of the default role from the mysql.user\ntable. If the role is subsequently granted again, it will\nagain be the user\'s default. Use SET DEFAULT ROLE NONE to\nexplicitly remove this.\n \nBefore MariaDB 10.1.13, the REVOKE role statement was not\npermitted in prepared statements.\n \nExample\n \nREVOKE journalist FROM hulda\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/revoke/','','https://mariadb.com/kb/en/revoke/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (125,10,'SET PASSWORD','Syntax\n------ \nSET PASSWORD [FOR user] =\n {\n PASSWORD(\'some password\')\n | OLD_PASSWORD(\'some password\')\n | \'encrypted password\'\n }\n \nDescription\n----------- \nThe SET PASSWORD statement assigns a password to an existing\nMariaDB user\naccount.\n \nIf the password is specified using the PASSWORD() or\nOLD_PASSWORD()\nfunction, the literal text of the password should be given.\nIf the\npassword is specified without using either function, the\npassword\nshould be the already-encrypted password value as returned\nby\nPASSWORD().\n \nOLD_PASSWORD() should only be used if your MariaDB/MySQL\nclients are very old (< 4.0.0).\n \nWith no FOR clause, this statement sets the password for the\ncurrent\nuser. Any client that has connected to the server using a\nnon-anonymous\naccount can change the password for that account.\n \nWith a FOR clause, this statement sets the password for a\nspecific\naccount on the current server host. Only clients that have\nthe UPDATE\nprivilege for the mysql database can do this. The user value\nshould be\ngiven in user_name@host_name format, where user_name and\nhost_name are\nexactly as they are listed in the User and Host columns of\nthe\nmysql.user table entry. \n \nThe argument to PASSWORD() and the password given to MariaDB\nclients can be of arbitrary length.\n \nAuthentication Plugin Support\n \nIn MariaDB 10.4 and later, SET PASSWORD (with or without\nPASSWORD()) works for accounts authenticated via any\nauthentication plugin that supports passwords stored in the\nmysql.global_priv table.\n \nThe ed25519, mysql_native_password, and mysql_old_password\nauthentication plugins store passwords in the\nmysql.global_priv table.\n \nIf you run SET PASSWORD on an account that authenticates\nwith one of these authentication plugins that stores\npasswords in the mysql.global_priv table, then the\nPASSWORD() function is evaluated by the specific\nauthentication plugin used by the account. The\nauthentication plugin hashes the password with a method that\nis compatible with that specific authentication plugin.\n \nThe unix_socket, named_pipe, gssapi, and pam authentication\nplugins do not store passwords in the mysql.global_priv\ntable. These authentication plugins rely on other methods to\nauthenticate the user.\n \nIf you attempt to run SET PASSWORD on an account that\nauthenticates with one of these authentication plugins that\ndoesn\'t store a password in the mysql.global_priv table,\nthen MariaDB Server will raise a warning like the following:\n \nSET PASSWORD is ignored for users authenticating via\nunix_socket plugin\n \nSee Authentication from MariaDB 10.4 for an overview of\nauthentication changes in MariaDB 10.4.\n \nMariaDB until 10.3\n \nIn MariaDB 10.3 and before, SET PASSWORD (with or without\nPASSWORD()) only works for accounts authenticated via\nmysql_native_password or mysql_old_password authentication\nplugins\n \nPasswordless User Accounts\n \nUser accounts do not always require passwords to login.\n \nThe unix_socket , named_pipe and gssapi authentication\nplugins do not require a password to authenticate the user.\n \nThe pam authentication plugin may or may not require a\npassword to authenticate the user, depending on the specific\nconfiguration.\n \nThe mysql_native_password and mysql_old_password\nauthentication plugins require passwords for authentication,\nbut the password can be blank. In that case, no password is\nrequired.\n \nIf you provide a password while attempting to log into the\nserver as an account that doesn\'t require a password, then\nMariaDB server will simply ignore the password.\n \nIn MariaDB 10.4 and later, a user account can be defined to\nuse multiple authentication plugins in a specific order of\npreference. This specific scenario may be more noticeable in\nthese versions, since an account could be associated with\nsome authentication plugins that require a password, and\nsome that do not.\n \nExample\n \nFor example, if you had an entry with User and\nHost column values of \'bob\' and \n\'%.loc.gov\', you would write the\nstatement like this:\n \nSET PASSWORD FOR \'bob\'@\'%.loc.gov\' =\nPASSWORD(\'newpass\');\n \n\n\nURL: https://mariadb.com/kb/en/set-password/','','https://mariadb.com/kb/en/set-password/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (126,10,'Roles Overview','Roles were introduced in MariaDB 10.0.5.\n \nDescription\n----------- \nA role bundles a number of privileges together. It assists\nlarger organizations where, typically, a number of users\nwould have the same privileges, and, previously, the only\nway to change the privileges for a group of users was by\nchanging each user\'s privileges individually. \n \nAlternatively, multiple external users could have been\nassigned the same user, and there would have been no way to\nsee which actual user was responsible for which action.\n \nWith roles, managing this is easy. For example, there could\nbe a number of users assigned to a journalist role, with\nidentical privileges. Changing the privileges for all the\njournalists is a matter of simply changing the role\'s\nprivileges, while the individual user is still linked with\nany changes that take place.\n \nRoles are created with the CREATE ROLE statement, and\ndropped with the DROP ROLE statement. Roles are then\nassigned to a user with an extension to the GRANT statement,\nwhile privileges are assigned to a role in the regular way\nwith GRANT. Similarly, the REVOKE statement can be used to\nboth revoke a role from a user, or revoke a privilege from a\nrole.\n \nOnce a user has connected, he can obtain all privileges\nassociated with a role by setting a role with the SET ROLE\nstatement. The CURRENT_ROLE function returns the currently\nset role for the session, if any.\n \nOnly roles granted directly to a user can be set, roles\ngranted to other roles cannot. Instead the privileges\ngranted to a role, which is, in turn, granted to another\nrole (grantee), will be immediately available to any user\nwho sets this second grantee role.\n \nRoles were implemented as a GSoC 2013 project by Vicentiu\nCiorbaru. \n \nThe SET DEFAULT ROLE statement allows one to set a default\nrole for a user. A default role is automatically enabled\nwhen a user connects (an implicit SET ROLE statement is\nexecuted immediately after a connection is established).\n \nSystem Tables\n \nInformation about roles and who they\'ve been granted to can\nbe found in the Information Schema APPLICABLE_ROLES table as\nwell as the mysql.ROLES_MAPPING table.\n \nThe Information Schema ENABLED_ROLES table shows the enabled\nroles for the current session.\n \nExamples\n-------- \nCreating a role and granting a privilege:\n \nCREATE ROLE journalist;\n \nGRANT SHOW DATABASES ON *.* TO journalist;\n \nGRANT journalist to hulda;\n \nNote, that hulda has no SHOW DATABASES privilege, even\nthough she was granted the journalist role. She needs to set\nthe role first:\n \nSHOW DATABASES;\n \n+--------------------+\n| Database |\n+--------------------+\n| information_schema |\n+--------------------+\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSET ROLE journalist;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| journalist |\n+--------------+\n \nSHOW DATABASES;\n \n+--------------------+\n| Database |\n+--------------------+\n| ... |\n| information_schema |\n| mysql |\n| performance_schema |\n| test |\n| ... |\n+--------------------+\n \nSET ROLE NONE;\n \nRoles can be granted to roles:\n \nCREATE ROLE writer;\n \nGRANT SELECT ON data.* TO writer;\n \nGRANT writer TO journalist;\n \nBut one does not need to set a role granted to a role. For\nexample, hulda will automatically get all writer privileges\nwhen she sets the journalist role:\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSHOW TABLES FROM data;\n \nEmpty set (0.01 sec)\n \nSET ROLE journalist;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| journalist |\n+--------------+\n \nSHOW TABLES FROM data;\n \n+------------------------------+\n| Tables_in_data |\n+------------------------------+\n| set1 |\n| ... |\n+------------------------------+\n \nRoles and Views (and Stored Routines)\n \nWhen a user sets a role, he, in a sense, has two identities\nwith two associated sets of privileges.\nBut a view (or a stored routine) can have only one definer.\nSo, when a view (or a stored routine) is created with the\nSQL SECURITY DEFINER, one can specify whether the definer\nshould be CURRENT_USER (and the view will have none of the\nprivileges of the user\'s role) or CURRENT_ROLE (in this\ncase, the view will use role\'s privileges, but none of the\nuser\'s privileges). As a result, sometimes one can create a\nview that is impossible to use.\n \nCREATE ROLE r1;\n \nGRANT ALL ON db1.* TO r1;\n \nGRANT r1 TO foo@localhost;\n \nGRANT ALL ON db.* TO foo@localhost;\n \nSELECT CURRENT_USER\n+---------------+\n| current_user |\n+---------------+\n| foo@localhost |\n+---------------+\n \nSET ROLE r1;\n \nCREATE TABLE db1.t1 (i int);\n \nCREATE VIEW db.v1 AS SELECT * FROM db1.t1;\n \nSHOW CREATE VIEW db.v1;\n \n+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| View | Create View | character_set_client |\ncollation_connection |\n+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`foo`@`localhost`\nSQL SECURITY DEFINER VIEW `db`.`v1` AS SELECT `db1`.`t1`.`i`\nAS `i` from `db1`.`t1` | utf8 | utf8_general_ci |\n+------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n \nCREATE DEFINER=CURRENT_ROLE VIEW db.v2 AS SELECT * FROM\ndb1.t1;\n \nSHOW CREATE VIEW db.b2;\n \n+------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| View | Create View | character_set_client |\ncollation_connection |\n+------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n| v2 | CREATE ALGORITHM=UNDEFINED DEFINER=`r1` SQL SECURITY\nDEFINER VIEW `db`.`v2` AS select `db1`.`t1`.`a` AS `a` from\n`db1`.`t1` | utf8 | utf8_general_ci |\n+------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+\n \nOther Resources\n \nRoles Review by Peter Gulutzan\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/roles_overview/','','https://mariadb.com/kb/en/roles_overview/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (127,10,'CREATE ROLE','Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nCREATE [OR REPLACE] ROLE [IF NOT EXISTS] role \n [WITH ADMIN \n {CURRENT_USER | CURRENT_ROLE | user | role}]\n \nDescription\n----------- \nThe CREATE ROLE statement creates one or more MariaDB roles.\nTo\nuse it, you must have the global CREATE USER\nprivilege or the INSERT privilege for the mysql\ndatabase. For each account, CREATE ROLE creates a new row in\nthe\nmysql.user table that has no privileges, and with the\ncorresponding is_role field set to Y. It also creates a\nrecord in the\nmysql.roles_mapping table.\n \nIf any of the specified roles already exist, ERROR 1396\n(HY000) results. If\nan error occurs, CREATE ROLE will still create the roles\nthat do not result\nin an error. The maximum length for a role is 128\ncharacters. Role names can be\nquoted, as explained in the Identifier names page. Only\none error is produced for all roles which have not been\ncreated:\n \nERROR 1396 (HY000): Operation CREATE ROLE failed for\n\'a\',\'b\',\'c\'\n \nFailed CREATE or DROP operations, for both users and roles,\nproduce the\nsame error code.\n \nPUBLIC and NONE are reserved, and cannot be used as role\nnames.\n \nBefore MariaDB 10.1.13, the CREATE ROLE statement was not\npermitted in prepared statements.\n \nFor valid identifiers to use as role names, see Identifier\nNames.\n \nWITH ADMIN\n \nThe optional WITH ADMIN clause determines whether the\ncurrent user, the\ncurrent role or another user or role has use of the newly\ncreated role. If the\nclause is omitted, WITH ADMIN CURRENT_USER is treated as the\ndefault, which\nmeans that the current user will be able to GRANT this role\nto\nusers.\n \nOR REPLACE\n \nThe OR REPLACE clause was added in MariaDB 10.1.3\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP ROLE IF EXISTS name;\n \nCREATE ROLE name ...;\n \nIF NOT EXISTS\n \nThe IF NOT EXISTS clause was added in MariaDB 10.1.3\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified role already\nexists. Cannot be used together with the OR REPLACE clause.\n \nExamples\n-------- \nCREATE ROLE journalist;\n \nCREATE ROLE developer WITH ADMIN lorinda;\n \nThe OR REPLACE and IF NOT EXISTS clauses:\n \nCREATE ROLE journalist;\nERROR 1396 (HY000): Operation CREATE ROLE failed for\n\'journalist\'\n \nCREATE OR REPLACE ROLE journalist;\nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE ROLE IF NOT EXISTS journalist;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n+-------+------+---------------------------------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------------------------------+\n| Note | 1975 | Can\'t create role \'journalist\'; it\nalready exists |\n+-------+------+---------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-role/','','https://mariadb.com/kb/en/create-role/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (128,10,'DROP ROLE','Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nDROP ROLE [IF EXISTS] role_name [,role_name ...]\n \nDescription\n----------- \nThe DROP ROLE statement removes one or more MariaDB roles.\nTo use this\nstatement, you must have the global CREATE USER privilege or\nthe DELETE privilege for the mysql database.\n \nDROP ROLE does not disable roles for connections which\nselected them with SET ROLE. If a role has previously been\nset as a default role, DROP ROLE does not remove the record\nof the default role from the mysql.user table. If the role\nis subsequently recreated and granted, it will again be the\nuser\'s default. Use SET DEFAULT ROLE NONE to explicitly\nremove this.\n \nIf any of the specified user accounts do not exist, ERROR\n1396 (HY000)\nresults. If an error occurs, DROP ROLE will still drop the\nroles that\ndo not result in an error. Only one error is produced for\nall roles which have not been dropped:\n \nERROR 1396 (HY000): Operation DROP ROLE failed for\n\'a\',\'b\',\'c\'\n \nFailed CREATE or DROP operations, for both users and roles,\nproduce the same error code.\n \nBefore MariaDB 10.1.13, the DROP ROLE statement was not\npermitted in prepared statements.\n \nIF EXISTS\n \nThe IF EXISTS clause was added in MariaDB 10.1.3\n \nIf the IF EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the role does not exist.\n \nExamples\n-------- \nDROP ROLE journalist;\n \nThe same thing using the optional IF EXISTS clause:\n \nDROP ROLE journalist;\n \nERROR 1396 (HY000): Operation DROP ROLE failed for\n\'journalist\'\n \nDROP ROLE IF EXISTS journalist;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nNote (Code 1975): Can\'t drop role \'journalist\'; it\ndoesn\'t exist\n \n\n\nURL: https://mariadb.com/kb/en/drop-role/','','https://mariadb.com/kb/en/drop-role/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (129,10,'SET ROLE','Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nSET ROLE { role | NONE }\n \nDescription\n----------- \nThe SET ROLE statement enables a role, along with all of its\nassociated permissions, for the current session. To unset a\nrole, use NONE .\n \nIf a role that doesn\'t exist, or to which the user has not\nbeen assigned, is specified, an ERROR 1959 (OP000): Invalid\nrole specification error occurs.\n \nFrom MariaDB 10.1.1, an automatic SET ROLE is implicitly\nperformed when a user connects if that user has been\nassigned a default role. See SET DEFAULT ROLE.\n \nExample\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSET ROLE staff;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| staff |\n+--------------+\n \nSET ROLE NONE;\n \nQuery OK, 0 rows affected (0.00 sec)\n \nSELECT CURRENT_ROLE();\n+----------------+\n| CURRENT_ROLE() |\n+----------------+\n| NULL |\n+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/set-role/','','https://mariadb.com/kb/en/set-role/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (130,10,'SET DEFAULT ROLE','Default roles were implemented in MariaDB 10.1.1.\n \nSyntax\n------ \nSET DEFAULT ROLE { role | NONE } [ FOR user@host ]\n \nDescription\n----------- \nThe SET DEFAULT ROLE statement sets a default role for a\nspecified (or current) user. A default role is automatically\nenabled when a user connects (an implicit SET ROLE statement\nis executed immediately after a connection is established).\n \nTo be able to set a role as a default, one needs the\nprivileges to enable this role (if you cannot do SET ROLE X,\nyou won\'t be able to do SET DEFAULT ROLE X). To set a\ndefault role for another user one needs to have write access\nto the mysql database.\n \nTo remove a user\'s default role, use SET DEFAULT ROLE NONE\n[ FOR user@host ]. The record of the default role is not\nremoved if the role is dropped or revoked, so if the role is\nsubsequently re-created or granted, it will again be the\nuser\'s default role.\n \nThe default role is stored in a new column in the mysql.user\ntable, and currently viewing this table is the only way to\nsee which role has been assigned to a user as the default. \n \nExamples\n-------- \nSetting a default role for the current user:\n \nSET DEFAULT ROLE journalist;\n \nRemoving a default role from the current user:\n \nSET DEFAULT ROLE NONE;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/set-default-role/','','https://mariadb.com/kb/en/set-default-role/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (131,11,'ST_X','Syntax\n------ \nST_X(p)\nX(p)\n \nDescription\n----------- \nReturns the X-coordinate value for the point p as a\ndouble-precision number.\n \nST_X() and X() are synonyms.\n \nExamples\n-------- \nSET @pt = \'Point(56.7 53.34)\';\n \nSELECT X(GeomFromText(@pt));\n+----------------------+\n| X(GeomFromText(@pt)) |\n+----------------------+\n| 56.7 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_x/','','https://mariadb.com/kb/en/st_x/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (132,11,'ST_Y','Syntax\n------ \nST_Y(p)\nY(p)\n \nDescription\n----------- \nReturns the Y-coordinate value for the point p as a\ndouble-precision number.\n \nST_Y() and Y() are synonyms.\n \nExamples\n-------- \nSET @pt = \'Point(56.7 53.34)\';\n \nSELECT Y(GeomFromText(@pt));\n+----------------------+\n| Y(GeomFromText(@pt)) |\n+----------------------+\n| 53.34 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_y/','','https://mariadb.com/kb/en/st_y/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (133,11,'X','A synonym for ST_X.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/point-properties-x/','','https://mariadb.com/kb/en/point-properties-x/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (134,11,'Y','A synonym for ST_Y.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/point-properties-y/','','https://mariadb.com/kb/en/point-properties-y/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (135,12,'AES_DECRYPT','Syntax\n------ \nAES_DECRYPT(crypt_str,key_str)\n \nDescription\n----------- \nThis function allows decryption of data using the official\nAES\n(Advanced Encryption Standard) algorithm. For more\ninformation, see\nthe description of AES_ENCRYPT().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/aes_decrypt/','','https://mariadb.com/kb/en/aes_decrypt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (136,12,'AES_ENCRYPT','Syntax\n------ \nAES_ENCRYPT(str,key_str)\n \nDescription\n----------- \nAES_ENCRYPT() and AES_DECRYPT() allow encryption and\ndecryption of\ndata using the official AES (Advanced Encryption Standard)\nalgorithm,\npreviously known as \"Rijndael.\" Encoding with a 128-bit\nkey length is\nused, but you can extend it up to 256 bits by modifying the\nsource. We\nchose 128 bits because it is much faster and it is secure\nenough for\nmost purposes.\n \nAES_ENCRYPT() encrypts a string str using the key key_str,\nand returns a binary string.\n \nAES_DECRYPT() decrypts the encrypted string and returns the\noriginal\nstring.\n \nThe input arguments may be any length. If either argument is\nNULL, the result of this function is also NULL.\n \nBecause AES is a block-level algorithm, padding is used to\nencode\nuneven length strings and so the result string length may be\ncalculated using this formula:\n \n16 x (trunc(string_length / 16) + 1)\n \nIf AES_DECRYPT() detects invalid data or incorrect padding,\nit returns\nNULL. However, it is possible for AES_DECRYPT() to return a\nnon-NULL\nvalue (possibly garbage) if the input data or the key is\ninvalid.\n \nExamples\n-------- \nINSERT INTO t VALUES\n(AES_ENCRYPT(\'text\',SHA2(\'password\',512)));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/aes_encrypt/','','https://mariadb.com/kb/en/aes_encrypt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (137,12,'COMPRESS','Syntax\n------ \nCOMPRESS(string_to_compress)\n \nDescription\n----------- \nCompresses a string and returns the result as a binary\nstring. This\nfunction requires MariaDB to have been compiled with a\ncompression\nlibrary such as zlib. Otherwise, the return value is always\nNULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n \nThe have_compress server system variable indicates whether a\ncompression library is present. \n \nExamples\n-------- \nSELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n+------------------------------------+\n| LENGTH(COMPRESS(REPEAT(\'a\',1000))) |\n+------------------------------------+\n| 21 |\n+------------------------------------+\n \nSELECT LENGTH(COMPRESS(\'\'));\n+----------------------+\n| LENGTH(COMPRESS(\'\')) |\n+----------------------+\n| 0 |\n+----------------------+\n \nSELECT LENGTH(COMPRESS(\'a\'));\n+-----------------------+\n| LENGTH(COMPRESS(\'a\')) |\n+-----------------------+\n| 13 |\n+-----------------------+\n \nSELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n+----------------------------------+\n| LENGTH(COMPRESS(REPEAT(\'a\',16))) |\n+----------------------------------+\n| 15 |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/compress/','','https://mariadb.com/kb/en/compress/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (138,12,'DECODE','Syntax\n------ \nDECODE(crypt_str,pass_str)\n \nDescription\n----------- \nDecrypts the encrypted string crypt_str using pass_str as\nthe\npassword. crypt_str should be a string returned from\nENCODE(). The resulting string will be the original string\nonly if pass_str is the same.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/decode/','','https://mariadb.com/kb/en/decode/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (139,12,'DES_DECRYPT','Syntax\n------ \nDES_DECRYPT(crypt_str[,key_str])\n \nDescription\n----------- \nDecrypts a string encrypted with DES_ENCRYPT(). If an error\noccurs,\nthis function returns NULL.\n \nThis function works only if MariaDB has been configured with\nTLS\nsupport.\n \nIf no key_str argument is given, DES_DECRYPT() examines the\nfirst byte\nof the encrypted string to determine the DES key number that\nwas used\nto encrypt the original string, and then reads the key from\nthe DES\nkey file to decrypt the message. For this to work, the user\nmust have\nthe SUPER privilege. The key file can be specified with the\n--des-key-file server option.\n \nIf you pass this function a key_str argument, that string is\nused as\nthe key for decrypting the message.\n \nIf the crypt_str argument does not appear to be an encrypted\nstring,\nMariaDB returns the given crypt_str.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/des_decrypt/','','https://mariadb.com/kb/en/des_decrypt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (140,12,'DES_ENCRYPT','Syntax\n------ \nDES_ENCRYPT(str[,{key_num|key_str}])\n \nDescription\n----------- \nEncrypts the string with the given key using the Triple-DES\nalgorithm.\n \nThis function works only if MariaDB has been configured with\nTLS support.\n \nThe encryption key to use is chosen based on the second\nargument to\nDES_ENCRYPT(), if one was given. With no argument, the first\nkey from\nthe DES key file is used. With a key_num argument, the given\nkey \nnumber (0-9) from the DES key file is used. With a key_str\nargument,\nthe given key string is used to encrypt str. \n \nThe key file can be specified with the --des-key-file server\noption.\n \nThe return string is a binary string where the first\ncharacter is \nCHAR(128 | key_num). If an error occurs, DES_ENCRYPT()\nreturns NULL.\n \nThe 128 is added to make it easier to recognize an encrypted\nkey. If\nyou use a string key, key_num is 127.\n \nThe string length for the result is given by this formula:\n \nnew_len = orig_len + (8 - (orig_len % 8)) + 1\n \nEach line in the DES key file has the following format:\n \nkey_num des_key_str\n \nEach key_num value must be a number in the range from 0 to\n9. Lines in\nthe file may be in any order. des_key_str is the string that\nis used\nto encrypt the message. There should be at least one space\nbetween the\nnumber and the key. The first key is the default key that is\nused if\nyou do not specify any key argument to DES_ENCRYPT().\n \nYou can tell MariaDB to read new key values from the key\nfile with the\nFLUSH DES_KEY_FILE statement. This requires the RELOAD\nprivilege.\n \nOne benefit of having a set of default keys is that it gives\napplications a way to check for the existence of encrypted\ncolumn\nvalues, without giving the end user the right to decrypt\nthose values.\n \nExamples\n-------- \nSELECT customer_address FROM customer_table \n WHERE crypted_credit_card =\nDES_ENCRYPT(\'credit_card_number\');\n \n\n\nURL: https://mariadb.com/kb/en/des_encrypt/','','https://mariadb.com/kb/en/des_encrypt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (141,12,'ENCODE','Syntax\n------ \nENCODE(str,pass_str)\n \nDescription\n----------- \nENCODE is not considered cryptographically secure, and\nshould not be used for password encryption.\n \nEncrypt str using pass_str as the password. To decrypt the\nresult, use\nDECODE().\n \nThe result is a binary string of the same length as str.\n \nThe strength of the encryption is based on how good the\nrandom generator is. \n \nIt is not recommended to rely on the encryption performed by\nthe ENCODE function. Using a salt value (changed when a\npassword is updated) will improve matters somewhat, but for\nstoring passwords, consider a more cryptographically secure\nfunction, such as SHA2().\n \nExamples\n-------- \nENCODE(\'not so secret text\',\nCONCAT(\'random_salt\',\'password\'))\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/encode/','','https://mariadb.com/kb/en/encode/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (142,12,'ENCRYPT','Syntax\n------ \nENCRYPT(str[,salt])\n \nDescription\n----------- \nEncrypts a string using the Unix crypt() system call,\nreturning an encrypted binary string. The salt argument\nshould be a string with at least two characters or the\nreturned result will be NULL. If no salt argument is given,\na random value of sufficient length is used.\n \nIt is not recommended to use ENCRYPT() with utf16, utf32 or\nucs2 multi-byte character sets because the crypt() system\ncall expects a string terminated with a zero byte.\n \nNote that the underlying crypt() system call may have some\nlimitations, such as ignoring all but the first eight\ncharacters.\n \nIf the have_crypt system variable is set to NO (because the\ncrypt() system call is not available), the ENCRYPT function\nwill always return NULL.\n \nExamples\n-------- \nSELECT ENCRYPT(\'encrypt me\');\n+-----------------------+\n| ENCRYPT(\'encrypt me\') |\n+-----------------------+\n| 4I5BsEx0lqTDk |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/encrypt/','','https://mariadb.com/kb/en/encrypt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (143,12,'MD5','Syntax\n------ \nMD5(str)\n \nDescription\n----------- \nCalculates an MD5 128-bit checksum for the string. \n \nThe return value is a 32-hex digit string, and as of MariaDB\n5.5, is a nonbinary string in the connection character set\nand collation, determined by the values of the\ncharacter_set_connection and collation_connection system\nvariables. Before 5.5, the return value was a binary string.\n \nNULL is returned if the argument was NULL. \n \nExamples\n-------- \nSELECT MD5(\'testing\');\n+----------------------------------+\n| MD5(\'testing\') |\n+----------------------------------+\n| ae2b1fca515949e5d54fb22b8ed95575 |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/md5/','','https://mariadb.com/kb/en/md5/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (144,12,'OLD_PASSWORD','Syntax\n------ \nOLD_PASSWORD(str)\n \nDescription\n----------- \nOLD_PASSWORD() was added to MySQL when the implementation of\n\nPASSWORD() was changed to improve security. OLD_PASSWORD()\nreturns the\nvalue of the old (pre-MySQL 4.1) implementation of\nPASSWORD() as a\nstring, and is intended to permit you to reset passwords for\nany\npre-4.1 clients that need to connect to a more recent MySQL\nserver version, or any version of MariaDB,\nwithout locking them out.\n \nAs of MariaDB 5.5, the return value is a nonbinary string in\nthe connection character set and collation, determined by\nthe values of the character_set_connection and\ncollation_connection system variables. Before 5.5, the\nreturn value was a binary string.\n \nThe return value is 16 bytes in length, or NULL if the\nargument was NULL.\n \n\n\nURL: https://mariadb.com/kb/en/old_password/','','https://mariadb.com/kb/en/old_password/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (145,12,'PASSWORD','Syntax\n------ \nPASSWORD(str)\n \nDescription\n----------- \nThe PASSWORD() function is used for hashing passwords for\nuse in authentication by the MariaDB server. It is not\nintended for use in other applications.\n \nCalculates and returns a hashed password string from the\nplaintext password str. Returns an empty string (>= MariaDB\n10.0.4) or NULL (\n\nURL: https://mariadb.com/kb/en/password/','','https://mariadb.com/kb/en/password/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (146,12,'SHA1','Syntax\n------ \nSHA1(str), SHA(str)\n \nDescription\n----------- \nCalculates an SHA-1 160-bit checksum for the string str, as\ndescribed in\nRFC 3174 (Secure Hash Algorithm).\n \nThe value is returned as a string of 40 hex digits, or NULL\nif the argument was NULL. As of MariaDB 5.5, the return\nvalue is a nonbinary string in the connection character set\nand collation, determined by the values of the\ncharacter_set_connection and collation_connection system\nvariables. Before 5.5, the return value was a binary string.\n \nExamples\n-------- \nSELECT SHA1(\'some boring text\');\n+------------------------------------------+\n| SHA1(\'some boring text\') |\n+------------------------------------------+\n| af969fc2085b1bb6d31e517d5c456def5cdd7093 |\n+------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sha1/','','https://mariadb.com/kb/en/sha1/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (147,12,'SHA2','SHA2() was introduced in MariaDB 5.5\n \nSyntax\n------ \nSHA2(str,hash_len)\n \nDescription\n----------- \nGiven a string str, calculates an SHA-2 checksum, which is\nconsidered more cryptographically secure than its SHA-1\nequivalent. The SHA-2 family includes SHA-224, SHA-256,\nSHA-384, and SHA-512, and the hash_len must correspond to\none of these, i.e. 224, 256, 384 or 512. 0 is equivalent to\n256.\n \nThe return value is a nonbinary string in the connection\ncharacter set and collation, determined by the values of the\ncharacter_set_connection and collation_connection system\nvariables. \n \nNULL is returned if the hash length is not valid, or the\nstring str is NULL.\n \nSHA2 will only work if MariaDB was has been configured with\nTLS support. \n \nExamples\n-------- \nSELECT SHA2(\'Maria\',224);\n+----------------------------------------------------------+\n| SHA2(\'Maria\',224) |\n+----------------------------------------------------------+\n| 6cc67add32286412efcab9d0e1675a43a5c2ef3cec8879f81516ff83 |\n+----------------------------------------------------------+\n \nSELECT SHA2(\'Maria\',256);\n+------------------------------------------------------------------+\n| SHA2(\'Maria\',256) |\n+------------------------------------------------------------------+\n|\n9ff18ebe7449349f358e3af0b57cf7a032c1c6b2272cb2656ff85eb112232f16\n|\n+------------------------------------------------------------------+\n \nSELECT SHA2(\'Maria\',0);\n+------------------------------------------------------------------+\n| SHA2(\'Maria\',0) |\n+------------------------------------------------------------------+\n|\n9ff18ebe7449349f358e3af0b57cf7a032c1c6b2272cb2656ff85eb112232f16\n|\n+------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sha2/','','https://mariadb.com/kb/en/sha2/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (148,12,'UNCOMPRESS','Syntax\n------ \nUNCOMPRESS(string_to_uncompress)\n \nDescription\n----------- \nUncompresses a string compressed by the COMPRESS() function.\nIf the\nargument is not a compressed value, the result is NULL. This\nfunction\nrequires MariaDB to have been compiled with a compression\nlibrary such\nas zlib. Otherwise, the return value is always NULL. The\nhave_compress server system variable indicates whether a\ncompression library is present. \n \nExamples\n-------- \nSELECT UNCOMPRESS(COMPRESS(\'a string\'));\n+----------------------------------+\n| UNCOMPRESS(COMPRESS(\'a string\')) |\n+----------------------------------+\n| a string |\n+----------------------------------+\n \nSELECT UNCOMPRESS(\'a string\');\n+------------------------+\n| UNCOMPRESS(\'a string\') |\n+------------------------+\n| NULL |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/uncompress/','','https://mariadb.com/kb/en/uncompress/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (149,12,'UNCOMPRESSED_LENGTH','Syntax\n------ \nUNCOMPRESSED_LENGTH(compressed_string)\n \nDescription\n----------- \nReturns the length that the compressed string had before\nbeing\ncompressed with COMPRESS().\n \nUNCOMPRESSED_LENGTH() returns NULL or an incorrect result if\nthe string is not compressed.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nExamples\n-------- \nSELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n+-----------------------------------------------+\n| UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30))) |\n+-----------------------------------------------+\n| 30 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/uncompressed_length/','','https://mariadb.com/kb/en/uncompressed_length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (150,13,'ENDPOINT','A synonym for ST_ENDPOINT.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/linestring-properties-endpoint/','','https://mariadb.com/kb/en/linestring-properties-endpoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (151,13,'GLENGTH','Syntax\n------ \nGLength(ls)\n \nDescription\n----------- \nReturns as a double-precision number the length of the\nLineString value ls in its associated spatial reference.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT GLength(GeomFromText(@ls));\n+----------------------------+\n| GLength(GeomFromText(@ls)) |\n+----------------------------+\n| 2.82842712474619 |\n+----------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/glength/','','https://mariadb.com/kb/en/glength/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (152,13,'NumPoints','A synonym for ST_NumPoints.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/linestring-properties-numpoints/','','https://mariadb.com/kb/en/linestring-properties-numpoints/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (153,13,'PointN','A synonym for ST_PointN.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestring-properties-pointn/','','https://mariadb.com/kb/en/linestring-properties-pointn/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (154,13,'STARTPOINT','A synonym for ST_STARTPOINT.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/linestring-properties-startpoint/','','https://mariadb.com/kb/en/linestring-properties-startpoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (155,13,'ST_ENDPOINT','Syntax\n------ \nST_EndPoint(ls)\nEndPoint(ls)\n \nDescription\n----------- \nReturns the Point that is the endpoint of the\nLineString value ls.\n \nST_EndPoint() and EndPoint() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_endpoint/','','https://mariadb.com/kb/en/st_endpoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (156,13,'ST_NUMPOINTS','Syntax\n------ \nST_NumPoints(ls)\nNumPoints(ls)\n \nDescription\n----------- \nReturns the number of Point objects in the LineString\nvalue ls.\n \nST_NumPoints() and NumPoints() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n| 3 |\n+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_numpoints/','','https://mariadb.com/kb/en/st_numpoints/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (157,13,'ST_POINTN','Syntax\n------ \nST_PointN(ls,N)\nPointN(ls,N)\n \nDescription\n----------- \nReturns the N-th Point in the LineString value ls.\nPoints are numbered beginning with 1.\n \nST_PointN() and PointN() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2) |\n+-------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointn/','','https://mariadb.com/kb/en/st_pointn/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (158,14,'GET_LOCK','Syntax\n------ \nGET_LOCK(str,timeout)\n \nDescription\n----------- \nTries to obtain a lock with a name given by the string str,\nusing a timeout of timeout seconds. Returns 1 if the lock\nwas obtained successfully, 0 if the attempt timed out (for\nexample, because another client has previously locked the\nname), or NULL if an error occurred (such as running out of\nmemory or the thread was killed with mysqladmin kill).\n \nA lock is released with RELEASE_LOCK(), when the connection\nterminates (either normally or abnormally), or before\nMariaDB 10.0.2, when the connection executes another\nGET_LOCK statement. From MariaDB 10.0.2, a connection can\nhold multiple locks at the same time, so a lock that is no\nlonger needed needs to be explicitly released.\n \nThe IS_FREE_LOCK function returns whether a specified lock a\nfree or not, and the IS_USED_LOCK whether the function is in\nuse or not.\n \nLocks obtained with GET_LOCK() do not interact with\ntransactions. That is, committing a transaction does not\nrelease any such locks obtained during the transaction.\n \nFrom MariaDB 10.0.2, it is also possible to recursively set\nthe same lock. If a lock with the same name is set n times,\nit needs to be released n times as well. \n \nstr is case insensitive for GET_LOCK() and related\nfunctions. If str is an empty string or NULL, GET_LOCK()\nreturns NULL and does nothing. From MariaDB 10.2.2, timeout\nsupports microseconds. Before then, it was rounded to the\nclosest integer.\n \nIf the metadata_lock_info plugin is installed, locks\nacquired with this function are visible in the Information\nSchema METADATA_LOCK_INFO table.\n \nThis function can be used to implement application locks or\nto simulate record locks. Names are locked on a server-wide\nbasis. If a name has been locked by one client, GET_LOCK()\nblocks any request by another client for a lock with the\nsame name. This allows clients that agree on a given lock\nname to use the name to perform cooperative advisory\nlocking. But be aware that it also allows a client that is\nnot among the set of cooperating clients to lock a name,\neither inadvertently or deliberately, and thus prevent any\nof the cooperating clients from locking that name. One way\nto reduce the likelihood of this is to use lock names that\nare database-specific or application-specific. For example,\nuse lock names of the form db_name.str or app_name.str.\n \nStatements using the GET_LOCK() function are not safe for\nreplication.\n \nThe patch to permit multiple locks was contributed by\nKonstantin \"Kostja\" Osipov (MDEV-3917).\n \nExamples\n-------- \nSELECT GET_LOCK(\'lock1\',10);\n+----------------------+\n| GET_LOCK(\'lock1\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT IS_FREE_LOCK(\'lock1\'), IS_USED_LOCK(\'lock1\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock1\') | IS_USED_LOCK(\'lock1\') |\n+-----------------------+-----------------------+\n| 0 | 46 |\n+-----------------------+-----------------------+\n \nSELECT IS_FREE_LOCK(\'lock2\'), IS_USED_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock2\') | IS_USED_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 1 | NULL |\n+-----------------------+-----------------------+\n \nFrom MariaDB 10.0.2, multiple locks can be held:\n \nSELECT GET_LOCK(\'lock2\',10);\n+----------------------+\n| GET_LOCK(\'lock2\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT IS_FREE_LOCK(\'lock1\'), IS_FREE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock1\') | IS_FREE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 0 | 0 |\n+-----------------------+-----------------------+\n \nSELECT RELEASE_LOCK(\'lock1\'), RELEASE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| RELEASE_LOCK(\'lock1\') | RELEASE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 1 | 1 |\n+-----------------------+-----------------------+\n \nBefore MariaDB 10.0.2, a connection could only hold a single\nlock:\n \nSELECT GET_LOCK(\'lock2\',10);\n+----------------------+\n| GET_LOCK(\'lock2\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT IS_FREE_LOCK(\'lock1\'), IS_FREE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| IS_FREE_LOCK(\'lock1\') | IS_FREE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| 1 | 0 |\n+-----------------------+-----------------------+\n \nSELECT RELEASE_LOCK(\'lock1\'), RELEASE_LOCK(\'lock2\');\n+-----------------------+-----------------------+\n| RELEASE_LOCK(\'lock1\') | RELEASE_LOCK(\'lock2\') |\n+-----------------------+-----------------------+\n| NULL | 1 |\n+-----------------------+-----------------------+\n \nFrom MariaDB 10.0.2, it is possible to hold the same lock\nrecursively. This example is viewed using the\nmetadata_lock_info plugin:\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \nEmpty set (0.000 sec)\n \nTimeout example: Connection 1:\n \nSELECT GET_LOCK(\'lock4\',10);\n+----------------------+\n| GET_LOCK(\'lock4\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock4\',10);\n \nAfter 10 seconds...\n \n+----------------------+\n| GET_LOCK(\'lock4\',10) |\n+----------------------+\n| 0 |\n+----------------------+\n \nDeadlocks are automatically detected and resolved.\nConnection 1:\n \nSELECT GET_LOCK(\'lock5\',10); \n+----------------------+\n| GET_LOCK(\'lock5\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock6\',10);\n+----------------------+\n| GET_LOCK(\'lock6\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 1:\n \nSELECT GET_LOCK(\'lock6\',10); \n+----------------------+\n| GET_LOCK(\'lock6\',10) |\n+----------------------+\n| 0 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock5\',10);\nERROR 1213 (40001): Deadlock found when trying to get lock;\n try restarting transaction\n \n\n\nURL: https://mariadb.com/kb/en/get_lock/','','https://mariadb.com/kb/en/get_lock/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (159,14,'INET6_ATON','INET6_ATON() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nINET6_ATON(expr)\n \nDescription\n----------- \nGiven an IPv6 or IPv4 network address as a string, returns a\nbinary string that represents the numeric value of the\naddress.\n \nNo trailing zone ID\'s or traling network masks are\npermitted. For IPv4 addresses, or IPv6 addresses with IPv4\naddress parts, no classful addresses or trailing port\nnumbers are permitted and octal numbers are not supported.\n \nThe returned binary string will be VARBINARY(16) or\nVARBINARY(4) for IPv6 and IPv4 addresses respectively.\n \nReturns NULL if the argument is not understood.\n \nExamples\n-------- \nSELECT HEX(INET6_ATON(\'10.0.1.1\'));\n+-----------------------------+\n| HEX(INET6_ATON(\'10.0.1.1\')) |\n+-----------------------------+\n| 0A000101 |\n+-----------------------------+\n \nSELECT HEX(INET6_ATON(\'48f3::d432:1431:ba23:846f\'));\n+----------------------------------------------+\n| HEX(INET6_ATON(\'48f3::d432:1431:ba23:846f\')) |\n+----------------------------------------------+\n| 48F3000000000000D4321431BA23846F |\n+----------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/inet6_aton/','','https://mariadb.com/kb/en/inet6_aton/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (160,14,'INET6_NTOA','INET6_NTOA() has been available from MariaDB 10.0.12.\n \nSyntax\n------ \nINET6_NTOA(expr)\n \nDescription\n----------- \nGiven an IPv6 or IPv4 network address as a numeric binary\nstring, returns the address as a nonbinary string in the\nconnection character set.\n \nThe return string is lowercase, and is platform independent,\nsince it does not use functions specific to the operating\nsystem. It has a maximum length of 39 characters.\n \nReturns NULL if the argument is not understood.\n \nExamples\n-------- \nSELECT INET6_NTOA(UNHEX(\'0A000101\'));\n+-------------------------------+\n| INET6_NTOA(UNHEX(\'0A000101\')) |\n+-------------------------------+\n| 10.0.1.1 |\n+-------------------------------+\n \nSELECT\nINET6_NTOA(UNHEX(\'48F3000000000000D4321431BA23846F\'));\n+-------------------------------------------------------+\n| INET6_NTOA(UNHEX(\'48F3000000000000D4321431BA23846F\')) |\n+-------------------------------------------------------+\n| 48f3::d432:1431:ba23:846f |\n+-------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/inet6_ntoa/','','https://mariadb.com/kb/en/inet6_ntoa/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (161,14,'INET_ATON','Syntax\n------ \nINET_ATON(expr)\n \nDescription\n----------- \nGiven the dotted-quad representation of an IPv4 network\naddress as a string,\nreturns an integer that represents the numeric value of the\naddress.\nAddresses may be 4- or 8-byte addresses.\n \nReturns NULL if the argument is not understood.\n \nExamples\n-------- \nSELECT INET_ATON(\'192.168.1.1\');\n+--------------------------+\n| INET_ATON(\'192.168.1.1\') |\n+--------------------------+\n| 3232235777 |\n+--------------------------+\n \nThis is calculated as follows: 192 x 2563 + 168 x 256 2 + 1\nx 256 + 1\n \n\n\nURL: https://mariadb.com/kb/en/inet_aton/','','https://mariadb.com/kb/en/inet_aton/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (162,14,'INET_NTOA','Syntax\n------ \nINET_NTOA(expr)\n \nDescription\n----------- \nGiven a numeric IPv4 network address in network byte order\n(4 or 8 byte),\nreturns the dotted-quad representation of the address as a\nstring.\n \nExamples\n-------- \nSELECT INET_NTOA(3232235777);\n+-----------------------+\n| INET_NTOA(3232235777) |\n+-----------------------+\n| 192.168.1.1 |\n+-----------------------+\n \n192.168.1.1 corresponds to 3232235777 since 192 x 2563 + 168\nx 256 2 + 1 x 256 + 1 = 3232235777\n \n\n\nURL: https://mariadb.com/kb/en/inet_ntoa/','','https://mariadb.com/kb/en/inet_ntoa/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (163,14,'IS_FREE_LOCK','Syntax\n------ \nIS_FREE_LOCK(str)\n \nDescription\n----------- \nChecks whether the lock named str is free to use (that is,\nnot locked).\nReturns 1 if the lock is free (no one is using the lock),\n 0 if the lock is in use, and NULL if an\nerror occurs (such as an incorrect argument, like an empty\nstring or NULL). str is case insensitive.\n \nIf the metadata_lock_info plugin is installed, the\nInformation Schema metadata_lock_info table contains\ninformation about locks of this kind (as well as metadata\nlocks).\n \nStatements using the IS_FREE_LOCK() function are not safe\nfor replication.\n \n\n\nURL: https://mariadb.com/kb/en/is_free_lock/','','https://mariadb.com/kb/en/is_free_lock/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (164,14,'IS_IPV4','IS_IPV4() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV4(expr)\n \nDescription\n----------- \nIf the expression is a valid IPv4 address, returns 1,\notherwise returns 0.\n \nIS_IPV4() is stricter than INET_ATON(), but as strict as\nINET6_ATON(), in determining the validity of an IPv4\naddress. This implies that if IS_IPV4 returns 1, the same\nexpression will always return a non-NULL result when passed\nto INET_ATON(), but that the reverse may not apply.\n \nExamples\n-------- \nSELECT IS_IPV4(\'1110.0.1.1\');\n+-----------------------+\n| IS_IPV4(\'1110.0.1.1\') |\n+-----------------------+\n| 0 |\n+-----------------------+\n \nSELECT IS_IPV4(\'48f3::d432:1431:ba23:846f\');\n+--------------------------------------+\n| IS_IPV4(\'48f3::d432:1431:ba23:846f\') |\n+--------------------------------------+\n| 0 |\n+--------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv4/','','https://mariadb.com/kb/en/is_ipv4/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (165,14,'IS_IPV4_COMPAT','IS_IPV4_COMPAT() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV4_COMPAT(expr)\n \nDescription\n----------- \nReturns 1 if a given numeric binary string IPv6 address,\nsuch as returned by INET6_ATON(), is IPv4-compatible,\notherwise returns 0. \n \nExamples\n-------- \nSELECT IS_IPV4_COMPAT(INET6_ATON(\'::10.0.1.1\'));\n+------------------------------------------+\n| IS_IPV4_COMPAT(INET6_ATON(\'::10.0.1.1\')) |\n+------------------------------------------+\n| 1 |\n+------------------------------------------+\n \nSELECT\nIS_IPV4_COMPAT(INET6_ATON(\'::48f3::d432:1431:ba23:846f\'));\n+-----------------------------------------------------------+\n|\nIS_IPV4_COMPAT(INET6_ATON(\'::48f3::d432:1431:ba23:846f\'))\n|\n+-----------------------------------------------------------+\n| 0 |\n+-----------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv4_compat/','','https://mariadb.com/kb/en/is_ipv4_compat/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (166,14,'IS_IPV4_MAPPED','IS_IPV4_MAPPED() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV4_MAPPED(expr)\n \nDescription\n----------- \nReturns 1 if a given a numeric binary string IPv6 address,\nsuch as returned by INET6_ATON(), is a valid IPv4-mapped\naddress, otherwise returns 0.\n \nExamples\n-------- \nSELECT IS_IPV4_MAPPED(INET6_ATON(\'::10.0.1.1\'));\n+------------------------------------------+\n| IS_IPV4_MAPPED(INET6_ATON(\'::10.0.1.1\')) |\n+------------------------------------------+\n| 0 |\n+------------------------------------------+\n \nSELECT IS_IPV4_MAPPED(INET6_ATON(\'::ffff:10.0.1.1\'));\n+-----------------------------------------------+\n| IS_IPV4_MAPPED(INET6_ATON(\'::ffff:10.0.1.1\')) |\n+-----------------------------------------------+\n| 1 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv4_mapped/','','https://mariadb.com/kb/en/is_ipv4_mapped/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (167,14,'IS_IPV6','IS_IPV6() has been available since MariaDB 10.0.12.\n \nSyntax\n------ \nIS_IPV6(expr)\n \nDescription\n----------- \nReturns 1 if the expression is a valid IPv6 address\nspecified as a string, otherwise returns 0. Does not\nconsider IPv4 addresses to be valid IPv6 addresses.\n \nExamples\n-------- \n SELECT IS_IPV6(\'48f3::d432:1431:ba23:846f\');\n+--------------------------------------+\n| IS_IPV6(\'48f3::d432:1431:ba23:846f\') |\n+--------------------------------------+\n| 1 |\n+--------------------------------------+\n1 row in set (0.02 sec)\n \nSELECT IS_IPV6(\'10.0.1.1\');\n+---------------------+\n| IS_IPV6(\'10.0.1.1\') |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is_ipv6/','','https://mariadb.com/kb/en/is_ipv6/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (168,14,'IS_USED_LOCK','Syntax\n------ \nIS_USED_LOCK(str)\n \nDescription\n----------- \nChecks whether the lock named str is in use (that is,\nlocked). If so,\nit returns the connection identifier of the client that\nholds the\nlock. Otherwise, it returns NULL. str is case insensitive.\n \nIf the metadata_lock_info plugin is installed, the\nInformation Schema metadata_lock_info table contains\ninformation about locks of this kind (as well as metadata\nlocks).\n \nStatements using the IS_USED_LOCK() function are not safe\nfor replication.\n \n\n\nURL: https://mariadb.com/kb/en/is_used_lock/','','https://mariadb.com/kb/en/is_used_lock/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (169,14,'MASTER_GTID_WAIT','MASTER_GTID_WAIT() was included in MariaDB 10.0.9.\n \nSyntax\n------ \nMASTER_GTID_WAIT(gtid-list[, timeout)\n \nDescription\n----------- \nThis function takes a string containing a comma-separated\nlist of global transaction id\'s\n(similar to the value of, for example, gtid_binlog_pos). It\nwaits until the value of gtid_slave_pos has the same or\nhigher seq_no within all replication domains specified in\nthe gtid-list; in other words, it waits until the slave has\nreached the specified GTID position.\n \nAn optional second argument gives a timeout in seconds. If\nthe timeout\nexpires before the specified GTID position is reached, then\nthe function\nreturns -1. Passing NULL or a negative number for the\ntimeout means no timeout, and the function will wait\nindefinitely.\n \n If the wait completes without a timeout, 0 is returned.\nPassing NULL for the\n gtid-list makes the function return NULL immediately,\nwithout waiting.\n \nThe gtid-list may be the empty string, in which case\nMASTER_GTID_WAIT()\nreturns immediately. If the gtid-list contains fewer domains\nthan\ngtid_slave_pos, then only those domains are waited upon. If\ngtid-list\ncontains a domain that is not present in @@gtid_slave_pos,\nthen\nMASTER_GTID_WAIT() will wait until an event containing such\ndomain_id arrives\non the slave (or until timed out or killed).\n \nMASTER_GTID_WAIT() can be useful to ensure that a slave has\ncaught up to\na master. Simply take the value of gtid_binlog_pos on the\nmaster, and use it in a MASTER_GTID_WAIT() call on the\nslave; when the call completes, the slave\nwill have caught up with that master position.\n \nMASTER_GTID_WAIT() can also be used in client applications\ntogether with the\nlast_gtid session variable. This is useful in a\nread-scaleout replication setup, where the application\nwrites to a single master but divides the\nreads out to a number of slaves to distribute the load. In\nsuch a setup, there\nis a risk that an application could first do an update on\nthe master, and then\na bit later do a read on a slave, and if the slave is not\nfast enough, the\ndata read from the slave might not include the update just\nmade, possibly\nconfusing the application and/or the end-user. One way to\navoid this is to\nrequest the value of last_gtid on the master just after the\nupdate. Then\nbefore doing the read on the slave, do a MASTER_GTID_WAIT()\non the value\nobtained from the master; this will ensure that the read is\nnot performed\nuntil the slave has replicated sufficiently far for the\nupdate to have become\nvisible.\n \nNote that MASTER_GTID_WAIT() can be used even if the slave\nis configured not\nto use GTID for connections (CHANGE MASTER TO\nmaster_use_gtid=no). This is\nbecause from MariaDB 10, GTIDs are always logged on the\nmaster server, and\nalways recorded on the slave servers.\n \nDifferences to MASTER_POS_WAIT()\n \nMASTER_GTID_WAIT() is global; it waits for any master\nconnection to reach\n the specified GTID position. MASTER_POS_WAIT() works only\nagainst a\n specific connection. This also means that while\nMASTER_POS_WAIT() aborts if\n its master connection is terminated with STOP SLAVE or due\nto an error,\n MASTER_GTID_WAIT() continues to wait while slaves are\nstopped.\n \nMASTER_GTID_WAIT() can take its timeout as a floating-point\nvalue, so a\n timeout in fractional seconds is supported, eg.\nMASTER_GTID_WAIT(\"0-1-100\",\n 0.5). (The minimum wait is one microsecond, 0.000001\nseconds).\n \nMASTER_GTID_WAIT() allows one to specify a timeout of zero\nin order to do a\n non-blocking check to see if the slaves have progressed to\na specific GTID position\n (MASTER_POS_WAIT() takes a zero timeout as meaning an\ninfinite wait). To do\n an infinite MASTER_GTID_WAIT(), specify a negative timeout,\nor omit the\n timeout argument.\n \nMASTER_GTID_WAIT() does not return the number of events\nexecuted since the\n wait started, nor does it return NULL if a slave thread is\nstopped. It\n always returns either 0 for successful wait completed, or\n-1 for timeout\n reached (or NULL if the specified gtid-pos is NULL).\n \nSince MASTER_GTID_WAIT() looks only at the seq_no part of\nthe GTIDs, not the\nserver_id, care is needed if a slave becomes diverged from\nanother server so\nthat two different GTIDs with the same seq_no (in the same\ndomain) arrive at\nthe same server. This situation is in any case best avoided;\nsetting\ngtid_strict_mode is recommended, as this will prevent any\nsuch out-of-order sequence numbers from ever being\nreplicated on a slave.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/master_gtid_wait/','','https://mariadb.com/kb/en/master_gtid_wait/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (170,14,'MASTER_POS_WAIT','MASTER_POS_WAIT was introduced in MariaDB 10.0.9.\n \nSyntax\n------ \nMASTER_POS_WAIT(log_name,log_pos[,timeout,[\"connection_name\"]])\n \nDescription\n----------- \nThis function is useful in replication for controlling\nmaster/slave synchronization. It blocks until the slave has\nread and applied all updates up to the specified position\n(log_name,log_pos) in the master log. The return value is\nthe number of log events the slave had to wait for to\nadvance to the specified position. The function returns NULL\nif\nthe slave SQL thread is not started, the slave\'s master\ninformation is not\ninitialized, the arguments are incorrect, or an error\noccurs. It returns -1 if\nthe timeout has been exceeded. If the slave SQL thread stops\nwhile\n MASTER_POS_WAIT() is waiting, the function returns NULL. If\nthe slave is past the specified position, the function\nreturns immediately.\n \nIf a timeout value is specified, MASTER_POS_WAIT() stops\nwaiting when timeout seconds have elapsed. timeout must be\ngreater than 0; a\nzero or negative timeout means no timeout.\n \nThe connection_name is used when you are using\nmulti-source-replication. If you don\'t specify it, it\'s\nset to the value of the default_master_connection system\nvariable.\n \nStatements using the MASTER_POS_WAIT() function are not safe\nfor replication.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/master_pos_wait/','','https://mariadb.com/kb/en/master_pos_wait/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (171,14,'NAME_CONST','Syntax\n------ \nNAME_CONST(name,value)\n \nDescription\n----------- \nReturns the given value. When used to produce a result set\ncolumn,\n NAME_CONST() causes the column to have the given name. The\narguments should be constants.\n \nThis function is used internally when replicating stored\nprocedures. It makes little sense to use it explicitly in\nSQL statements, and it was not supposed to be used like\nthat.\n \nSELECT NAME_CONST(\'myname\', 14);\n+--------+\n| myname |\n+--------+\n| 14 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/name_const/','','https://mariadb.com/kb/en/name_const/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (172,14,'RELEASE_LOCK','Syntax\n------ \nRELEASE_LOCK(str)\n \nDescription\n----------- \nReleases the lock named by the string str that was obtained\nwith GET_LOCK(). Returns 1 if the lock was released, 0 if\nthe lock was not established by this thread (in which case\nthe lock is not\nreleased), and NULL if the named lock did not exist. The\nlock does not exist if it was never obtained by a call to\nGET_LOCK() or if it has previously been released.\n \nMariaDB until 10.0.1\n \nBefore 10.0.2, GET_LOCK() released the existing lock, if\nany. Since 10.0.2 this does not happen, because multiple\nlocks are allowed.\n \nstr is case insensitive. If str is an empty string or NULL,\nRELEASE_LOCK() returns NULL and does nothing.\n \nStatements using the RELEASE_LOCK() function are not safe\nfor replication.\n \nThe DO statement is convenient to use with RELEASE_LOCK().\n \nExamples\n-------- \nConnection1:\n \nSELECT GET_LOCK(\'lock1\',10);\n+----------------------+\n| GET_LOCK(\'lock1\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 2:\n \nSELECT GET_LOCK(\'lock2\',10);\n+----------------------+\n| GET_LOCK(\'lock2\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nConnection 1:\n \nSELECT RELEASE_LOCK(\'lock1\'), RELEASE_LOCK(\'lock2\'),\nRELEASE_LOCK(\'lock3\');\n+-----------------------+-----------------------+-----------------------+\n| RELEASE_LOCK(\'lock1\') | RELEASE_LOCK(\'lock2\') |\nRELEASE_LOCK(\'lock3\') |\n+-----------------------+-----------------------+-----------------------+\n| 1 | 0 | NULL |\n+-----------------------+-----------------------+-----------------------+\n \nFrom MariaDB 10.0.2, it is possible to hold the same lock\nrecursively. This example is viewed using the\nmetadata_lock_info plugin:\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT GET_LOCK(\'lock3\',10);\n+----------------------+\n| GET_LOCK(\'lock3\',10) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \n+-----------+---------------------+---------------+-----------+--------------+------------+\n| THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |\nTABLE_SCHEMA | TABLE_NAME |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n| 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |\n+-----------+---------------------+---------------+-----------+--------------+------------+\n \nSELECT RELEASE_LOCK(\'lock3\');\n+-----------------------+\n| RELEASE_LOCK(\'lock3\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;\n \nEmpty set (0.000 sec)\n \n\n\nURL: https://mariadb.com/kb/en/release_lock/','','https://mariadb.com/kb/en/release_lock/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (173,14,'SLEEP','Syntax\n------ \nSLEEP(duration)\n \nDescription\n----------- \nSleeps (pauses) for the number of seconds given by the\nduration argument, then\nreturns 0. If SLEEP() is interrupted, it\nreturns 1. The duration may have a fractional part given in\nmicroseconds.\n \nStatements using the SLEEP() function are not safe for\nreplication.\n \nExample\n \nSELECT SLEEP(5.5);\n+------------+\n| SLEEP(5.5) |\n+------------+\n| 0 |\n+------------+\n1 row in set (5.50 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sleep/','','https://mariadb.com/kb/en/sleep/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (174,14,'UUID','Syntax\n------ \nUUID()\n \nDescription\n----------- \nReturns a Universal Unique Identifier (UUID) generated\naccording to \"DCE 1.1:\nRemote Procedure Call\" (Appendix A) CAE (Common\nApplications Environment)\nSpecifications published by The Open Group in October\n1997 \n(Document Number C706).\n \nA UUID is designed as a number that is globally unique in\nspace and time. Two\ncalls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate\ncomputers that are\nnot connected to each other.\n \nA UUID is a 128-bit number represented by a utf8 string of\nfive\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\nformat:\nThe first three numbers are generated from a timestamp.\nThe fourth number preserves temporal uniqueness in case the\ntimestamp value\n loses monotonicity (for example, due to daylight saving\ntime).\nThe fifth number is an IEEE 802 node number that provides\nspatial uniqueness.\n A random number is substituted if the latter is not\navailable (for example,\n because the host computer has no Ethernet card, or we do\nnot know how to find\n the hardware address of an interface on your operating\nsystem). In this case,\n spatial uniqueness cannot be guaranteed. Nevertheless, a\ncollision should\n have very low probability.\n \nCurrently, the MAC address of an interface is taken into\naccount only on FreeBSD and Linux. On other operating\nsystems, MariaDB uses a randomly generated 48-bit number.\n \nStatements using the UUID() function are not safe for\nreplication.\n \nUUID() results are intended to be unique, but cannot always\nbe relied upon to unpredictable and unguessable, so should\nnot be relied upon for these purposes.\n \nExamples\n-------- \nSELECT UUID();\n+--------------------------------------+\n| UUID() |\n+--------------------------------------+\n| cd41294a-afb0-11df-bc9b-00241dd75637 |\n+--------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/uuid/','','https://mariadb.com/kb/en/uuid/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (175,14,'UUID_SHORT','Syntax\n------ \nUUID_SHORT()\n \nDescription\n----------- \nReturns a \"short\" universal identifier as a 64-bit\nunsigned integer (rather\nthan a string-form 128-bit identifier as returned by the\nUUID() function).\n \nThe value of UUID_SHORT() is guaranteed to be unique if the\nfollowing conditions hold:\nThe server_id of the current host is unique among your set\nof master and\n slave servers\nserver_id is between 0 and 255\nYou don\'t set back your system time for your server between\nmysqld restarts\nYou do not invoke UUID_SHORT() on average more than 16\n million times per second between mysqld restarts\n \nThe UUID_SHORT() return value is constructed this way:\n \n (server_id & 255) \n\nURL: https://mariadb.com/kb/en/uuid_short/','','https://mariadb.com/kb/en/uuid_short/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (176,14,'VALUES / VALUE','Syntax\n------ \nVALUE(col_name) \n \nMariaDB until 10.3.2\n \nVALUES(col_name) \n \nDescription\n----------- \nIn an INSERT ... ON DUPLICATE KEY UPDATE statement, you can\nuse the VALUES(col_name) function in the UPDATE clause to\nrefer to column values from the INSERT portion of the\nstatement. In other words, VALUES(col_name) in the UPDATE\nclause refers to the value of col_name that would be\ninserted, had no duplicate-key conflict occurred. This\nfunction is especially useful in multiple-row inserts.\n \nThe VALUES() function is meaningful only in INSERT ... ON\nDUPLICATE KEY UPDATE statements and returns NULL otherwise.\n \nIn MariaDB 10.3.3 this function was renamed to VALUE(),\nbecause it\'s incompatible with the standard Table Value\nConstructors syntax, implemented in MariaDB 10.3.3.\n \nThe VALUES() function can still be used even from MariaDB\n10.3.3, but only in INSERT ... ON DUPLICATE KEY UPDATE\nstatements; it\'s a syntax error otherwise.\n \nExamples\n-------- \nINSERT INTO t (a,b,c) VALUES (1,2,3),(4,5,6)\n ON DUPLICATE KEY UPDATE c=VALUE(a)+VALUE(b);\n \nMariaDB until 10.3.2\n \nINSERT INTO t (a,b,c) VALUES (1,2,3),(4,5,6)\n ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/values-value/','','https://mariadb.com/kb/en/values-value/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (177,15,'!','Syntax\n------ \nNOT, !\n \nDescription\n----------- \nLogical NOT. Evaluates to 1 if the operand is 0, to 0 if the\noperand\nis non-zero, and NOT NULL returns NULL.\n \nBy default, the ! operator has a higher precedence. If the\nHIGH_NOT_PRECEDENCE SQL_MODE flag is set, NOT and ! have the\nsame precedence.\n \nExamples\n-------- \nSELECT NOT 10;\n \n+--------+\n| NOT 10 |\n+--------+\n| 0 |\n+--------+\n \nSELECT NOT 0;\n \n+-------+\n| NOT 0 |\n+-------+\n| 1 |\n+-------+\n \nSELECT NOT NULL;\n \n+----------+\n| NOT NULL |\n+----------+\n| NULL |\n+----------+\n \nSELECT ! (1+1);\n+---------+\n| ! (1+1) |\n+---------+\n| 0 |\n+---------+\n \nSELECT ! 1+1;\n \n+-------+\n| ! 1+1 |\n+-------+\n| 1 |\n+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not/','','https://mariadb.com/kb/en/not/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (178,15,'&amp;&amp;','Syntax\n------ \nAND, &&\n \nDescription\n----------- \nLogical AND. Evaluates to 1 if all operands are non-zero and\nnot NULL,\nto 0 if one or more operands are 0, otherwise NULL is\nreturned.\n \nFor this operator, short-circuit evaluation can be used.\n \nExamples\n-------- \nSELECT 1 && 1;\n \n+--------+\n| 1 && 1 |\n+--------+\n| 1 |\n+--------+\n \nSELECT 1 && 0;\n \n+--------+\n| 1 && 0 |\n+--------+\n| 0 |\n+--------+\n \nSELECT 1 && NULL;\n \n+-----------+\n| 1 && NULL |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT 0 && NULL;\n \n+-----------+\n| 0 && NULL |\n+-----------+\n| 0 |\n+-----------+\n \nSELECT NULL && 0;\n \n+-----------+\n| NULL && 0 |\n+-----------+\n| 0 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/and/','','https://mariadb.com/kb/en/and/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (179,15,'||','Syntax\n------ \nOR, ||\n \nDescription\n----------- \nLogical OR. When both operands are non-NULL, the result is 1\nif any\noperand is non-zero, and 0 otherwise. With a NULL operand,\nthe result\nis 1 if the other operand is non-zero, and NULL otherwise.\nIf both\noperands are NULL, the result is NULL.\n \nFor this operator, short-circuit evaluation can be used.\n \nNote that, if the PIPES_AS_CONCAT SQL_MODE is set, || is\nused as a string concatenation operator. This means that a\n|| b is the same as CONCAT(a,b). See CONCAT() for details.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, || ignores NULL.\n \nExamples\n-------- \nSELECT 1 || 1;\n \n+--------+\n| 1 || 1 |\n+--------+\n| 1 |\n+--------+\n \nSELECT 1 || 0;\n \n+--------+\n| 1 || 0 |\n+--------+\n| 1 |\n+--------+\n \nSELECT 0 || 0;\n \n+--------+\n| 0 || 0 |\n+--------+\n| 0 |\n+--------+\n \nSELECT 0 || NULL;\n \n+-----------+\n| 0 || NULL |\n+-----------+\n| NULL |\n+-----------+\n \nSELECT 1 || NULL;\n \n+-----------+\n| 1 || NULL |\n+-----------+\n| 1 |\n+-----------+\n \nIn Oracle mode, from MariaDB 10.3:\n \nSELECT 0 || NULL;\n \n+-----------+\n| 0 || NULL |\n+-----------+\n| 0 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/or/','','https://mariadb.com/kb/en/or/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (180,15,'XOR','Syntax\n------ \nXOR\n \nDescription\n----------- \nXOR stands for eXclusive OR. Returns NULL if either operand\nis NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is\nnon-zero,\notherwise 0 is returned.\n \nExamples\n-------- \nSELECT 1 XOR 1;\n \n+---------+\n| 1 XOR 1 |\n+---------+\n| 0 |\n+---------+\n \nSELECT 1 XOR 0;\n \n+---------+\n| 1 XOR 0 |\n+---------+\n| 1 |\n+---------+\n \nSELECT 1 XOR NULL;\n \n+------------+\n| 1 XOR NULL |\n+------------+\n| NULL |\n+------------+\n \nIn the following example, the right 1 XOR 1 is evaluated\nfirst, and returns 0. Then, 1 XOR 0 is evaluated, and 1 is\nreturned.\n \nSELECT 1 XOR 1 XOR 1;\n \n+---------------+\n| 1 XOR 1 XOR 1 |\n+---------------+\n| 1 |\n+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/xor/','','https://mariadb.com/kb/en/xor/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (181,15,'Assignment Operator (=)','Syntax\n------ \nidentifier = expr\n \nDescription\n----------- \nThe equal sign is used as both an assignment operator in\ncertain contexts, and as a comparison operator. When used as\nassignment operator, the value on the right is assigned to\nthe variable (or column, in some contexts) on the left.\n \nSince its use can be ambiguous, unlike the := assignment\noperator, the = assignment operator cannot be used in all\ncontexts, and is only valid as part of a SET statement, or\nthe SET clause of an UPDATE statement\n \nThis operator works with both user-defined variables and\nlocal variables.\n \nExamples\n-------- \nUPDATE table_name SET x = 2 WHERE x > 100;\n \nSET @x = 1, @y := 2;\n \n\n \n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/assignment-operators-assignment-operator/','','https://mariadb.com/kb/en/assignment-operators-assignment-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (182,15,'Assignment Operator (:=)','Syntax\n------ \nvar_name := expr\n \nDescription\n----------- \nAssignment operator for assigning a value. The value on the\nright is assigned to the variable on left.\n \nUnlike the = operator, := can always be used to assign a\nvalue to a variable.\n \nThis operator works with both user-defined variables and\nlocal variables.\n \nWhen assigning the same value to several variables,\nLAST_VALUE() can be useful.\n \nExamples\n-------- \n SELECT @x := 10;\n \n+----------+\n| @x := 10 |\n+----------+\n| 10 |\n+----------+\n \nSELECT @x, @y := @x;\n \n+------+----------+\n| @x | @y := @x |\n+------+----------+\n| 10 | 10 |\n+------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/assignment-operator/','','https://mariadb.com/kb/en/assignment-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (183,16,'Stored Aggregate Functions','The ability to create stored aggregate functions was added\nin MariaDB 10.3.3.\n \nAggregate functions are functions that are computed over a\nsequence of rows and return one result for the sequence of\nrows.\n \nCreating a custom aggregate function is done using the\nCREATE FUNCTION statement with two main differences:\nThe addition of the AGGREGATE keyword, so CREATE AGGREGATE\nFUNCTION\nThe FETCH GROUP NEXT ROW instruction inside the loop\nOracle PL/SQL compatibility using SQL/PL is provided\n \nStandard Syntax\n \nCREATE AGGREGATE FUNCTION function_name (parameters) RETURNS\nreturn_type\nBEGIN\n All types of declarations\n DECLARE CONTINUE HANDLER FOR NOT FOUND RETURN return_val;\n LOOP\n FETCH GROUP NEXT ROW; // fetches next row from table\n other instructions\n END LOOP;\nEND\n \nStored aggregate functions were a 2016 Google Summer of Code\nproject by Varun Gupta.\n \nUsing SQL/PL\n \nSET sql_mode=Oracle;\nDELIMITER //\n \nCREATE AGGREGATE FUNCTION function_name (parameters) RETURN\nreturn_type\n declarations\nBEGIN\n LOOP\n FETCH GROUP NEXT ROW; -- fetches next row from table\n -- other instructions\n \n END LOOP;\nEXCEPTION\n WHEN NO_DATA_FOUND THEN\n RETURN return_val;\nEND //\n \nDELIMITER ;\n \nExamples\n-------- \nFirst a simplified example:\n \nCREATE TABLE marks(stud_id INT, grade_count INT);\n \nINSERT INTO marks VALUES (1,6), (2,4), (3,7), (4,5), (5,8);\n \nSELECT * FROM marks;\n \n+---------+-------------+\n| stud_id | grade_count |\n+---------+-------------+\n| 1 | 6 |\n| 2 | 4 |\n| 3 | 7 |\n| 4 | 5 |\n| 5 | 8 |\n+---------+-------------+\n \nDELIMITER //\nCREATE AGGREGATE FUNCTION IF NOT EXISTS aggregate_count(x\nINT) RETURNS INT\nBEGIN\n DECLARE count_students INT DEFAULT 0;\n \n DECLARE CONTINUE HANDLER FOR NOT FOUND\n RETURN count_students;\n \n LOOP\n FETCH GROUP NEXT ROW;\n \n IF x THEN\n SET count_students = count_students+1;\n \n END IF;\n \n END LOOP;\n \nEND //\nDELIMITER ;\n \nA non-trivial example that cannot easily be rewritten using\nexisting functions:\n \nDELIMITER //\nCREATE AGGREGATE FUNCTION medi_int(x INT) RETURNS DOUBLE\nBEGIN\n DECLARE CONTINUE HANDLER FOR NOT FOUND\n BEGIN\n DECLARE res DOUBLE;\n \n DECLARE cnt INT DEFAULT (SELECT COUNT(*) FROM tt);\n DECLARE lim INT DEFAULT (cnt-1) DIV 2;\n \n IF cnt % 2 = 0 THEN\n SET res = (SELECT AVG(a) FROM (SELECT a FROM tt ORDER BY a\nLIMIT lim,2) ttt);\n ELSE\n SET res = (SELECT a FROM tt ORDER BY a LIMIT lim,1);\n END IF;\n \n DROP TEMPORARY TABLE tt;\n \n RETURN res;\n \n END;\n \n CREATE TEMPORARY TABLE tt (a INT);\n LOOP\n FETCH GROUP NEXT ROW;\n \n INSERT INTO tt VALUES (x);\n END LOOP;\n \nEND //\nDELIMITER ;\n \nSQL/PL Example\n \nThis uses the same marks table as created above.\n \nSET sql_mode=Oracle;\n \nDELIMITER //\n \nCREATE AGGREGATE FUNCTION aggregate_count(x INT) RETURN INT\nAS count_students INT DEFAULT 0;\n \nBEGIN\n LOOP\n FETCH GROUP NEXT ROW;\n \n IF x THEN\n SET count_students := count_students+1;\n \n END IF;\n \n END LOOP;\n \nEXCEPTION\n WHEN NO_DATA_FOUND THEN\n RETURN count_students;\n \nEND aggregate_count //\nDELIMITER ;\n \nSELECT aggregate_count(stud_id) FROM marks;\n \n\n\nURL: https://mariadb.com/kb/en/stored-aggregate-functions/','','https://mariadb.com/kb/en/stored-aggregate-functions/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (184,16,'AVG','Syntax\n------ \nAVG([DISTINCT] expr)\n \nDescription\n----------- \nReturns the average value of expr. The DISTINCT option can\nbe used to return the average of the distinct values of\nexpr. NULL values are ignored. It is an aggregate function,\nand so can be used with the GROUP BY clause.\n \nAVG() returns NULL if there were no matching rows.\n \nFrom MariaDB 10.2.0, AVG() can be used as a window function.\n \nExamples\n-------- \nCREATE TABLE sales (sales_value INT);\n \nINSERT INTO sales VALUES(10),(20),(20),(40);\n \nSELECT AVG(sales_value) FROM sales;\n \n+------------------+\n| AVG(sales_value) |\n+------------------+\n| 22.5000 |\n+------------------+\n \nSELECT AVG(DISTINCT(sales_value)) FROM sales;\n \n+----------------------------+\n| AVG(DISTINCT(sales_value)) |\n+----------------------------+\n| 23.3333 |\n+----------------------------+\n \nCommonly, AVG() is used with a GROUP BY clause:\n \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, AVG(score) FROM student GROUP BY name;\n \n+---------+------------+\n| name | AVG(score) |\n+---------+------------+\n| Chun | 74.0000 |\n| Esben | 37.0000 |\n| Kaolin | 72.0000 |\n| Tatiana | 85.0000 |\n+---------+------------+\n \nBe careful to avoid this common mistake, not grouping\ncorrectly and returning mismatched data: \n \nSELECT name,test,AVG(score) FROM student;\n \n+------+------+------------+\n| name | test | MIN(score) |\n+------+------+------------+\n| Chun | SQL | 31 |\n+------+------+------------+\n \nAs a window function:\n \nCREATE TABLE student_test (name CHAR(10), test CHAR(10),\nscore TINYINT); \n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, test, score, AVG(score) OVER (PARTITION BY\ntest) \n AS average_by_test FROM student_test;\n \n+---------+--------+-------+-----------------+\n| name | test | score | average_by_test |\n+---------+--------+-------+-----------------+\n| Chun | SQL | 75 | 65.2500 |\n| Chun | Tuning | 73 | 68.7500 |\n| Esben | SQL | 43 | 65.2500 |\n| Esben | Tuning | 31 | 68.7500 |\n| Kaolin | SQL | 56 | 65.2500 |\n| Kaolin | Tuning | 88 | 68.7500 |\n| Tatiana | SQL | 87 | 65.2500 |\n| Tatiana | Tuning | 83 | 68.7500 |\n+---------+--------+-------+-----------------+\n \n\n\nURL: https://mariadb.com/kb/en/avg/','','https://mariadb.com/kb/en/avg/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (185,16,'BIT_AND','Syntax\n------ \nBIT_AND(expr)\n \nDescription\n----------- \nReturns the bitwise AND of all bits in expr. The calculation\nis performed with 64-bit (BIGINT) precision. It is an\naggregate function, and so can be used with the GROUP BY\nclause.\n \nFrom MariaDB 10.2.0, BIT_AND() can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE vals (x INT);\n \nINSERT INTO vals VALUES(111),(110),(100);\n \nSELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;\n \n+------------+-----------+------------+\n| BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+------------+-----------+------------+\n| 100 | 111 | 101 |\n+------------+-----------+------------+\n \nAs an aggregate function:\n \nCREATE TABLE vals2 (category VARCHAR(1), x INT);\n \nINSERT INTO vals2 VALUES\n (\'a\',111),(\'a\',110),(\'a\',100),\n (\'b\',\'000\'),(\'b\',001),(\'b\',011);\n \nSELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) \n FROM vals GROUP BY category;\n \n+----------+------------+-----------+------------+\n| category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+----------+------------+-----------+------------+\n| a | 100 | 111 | 101 |\n| b | 0 | 11 | 10 |\n+----------+------------+-----------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/bit_and/','','https://mariadb.com/kb/en/bit_and/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (186,16,'BIT_OR','Syntax\n------ \nBIT_OR(expr)\n \nDescription\n----------- \nReturns the bitwise OR of all bits in expr. The calculation\nis performed with 64-bit (BIGINT) precision. It is an\naggregate function, and so can be used with the GROUP BY\nclause.\n \nFrom MariaDB 10.2.0, BIT_OR can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE vals (x INT);\n \nINSERT INTO vals VALUES(111),(110),(100);\n \nSELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;\n \n+------------+-----------+------------+\n| BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+------------+-----------+------------+\n| 100 | 111 | 101 |\n+------------+-----------+------------+\n \nAs an aggregate function:\n \nCREATE TABLE vals2 (category VARCHAR(1), x INT);\n \nINSERT INTO vals2 VALUES\n (\'a\',111),(\'a\',110),(\'a\',100),\n (\'b\',\'000\'),(\'b\',001),(\'b\',011);\n \nSELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) \n FROM vals GROUP BY category;\n \n+----------+------------+-----------+------------+\n| category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+----------+------------+-----------+------------+\n| a | 100 | 111 | 101 |\n| b | 0 | 11 | 10 |\n+----------+------------+-----------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/bit_or/','','https://mariadb.com/kb/en/bit_or/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (187,16,'BIT_XOR','Syntax\n------ \nBIT_XOR(expr)\n \nDescription\n----------- \nReturns the bitwise XOR of all bits in expr. The calculation\nis performed with 64-bit (BIGINT) precision. It is an\naggregate function, and so can be used with the GROUP BY\nclause.\n \nFrom MariaDB 10.2.0, BIT_XOR() can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE vals (x INT);\n \nINSERT INTO vals VALUES(111),(110),(100);\n \nSELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;\n \n+------------+-----------+------------+\n| BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+------------+-----------+------------+\n| 100 | 111 | 101 |\n+------------+-----------+------------+\n \nAs an aggregate function:\n \nCREATE TABLE vals2 (category VARCHAR(1), x INT);\n \nINSERT INTO vals2 VALUES\n (\'a\',111),(\'a\',110),(\'a\',100),\n (\'b\',\'000\'),(\'b\',001),(\'b\',011);\n \nSELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) \n FROM vals GROUP BY category;\n \n+----------+------------+-----------+------------+\n| category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |\n+----------+------------+-----------+------------+\n| a | 100 | 111 | 101 |\n| b | 0 | 11 | 10 |\n+----------+------------+-----------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/bit_xor/','','https://mariadb.com/kb/en/bit_xor/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (188,16,'COUNT','Syntax\n------ \nCOUNT(expr)\n \nDescription\n----------- \nReturns a count of the number of non-NULL values of expr in\nthe rows retrieved by a SELECT statement. The result is a\nBIGINT value. It is an aggregate function, and so can be\nused with the GROUP BY clause.\n \nCOUNT(*) counts the total number of rows in a table.\n \nCOUNT() returns 0 if there were no matching rows.\n \nFrom MariaDB 10.2.0, COUNT() can be used as a window\nfunction.\n \nExamples\n-------- \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT COUNT(*) FROM student;\n \n+----------+\n| COUNT(*) |\n+----------+\n| 8 |\n+----------+\n \nCOUNT(DISTINCT) example:\n \nSELECT COUNT(DISTINCT (name)) FROM student;\n \n+------------------------+\n| COUNT(DISTINCT (name)) |\n+------------------------+\n| 4 |\n+------------------------+\n \nAs a window function\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, COUNT(score) OVER (PARTITION BY\nname) \n AS tests_written FROM student_test;\n \n+---------+--------+-------+---------------+\n| name | test | score | tests_written |\n+---------+--------+-------+---------------+\n| Chun | SQL | 75 | 2 |\n| Chun | Tuning | 73 | 2 |\n| Esben | SQL | 43 | 2 |\n| Esben | Tuning | 31 | 2 |\n| Kaolin | SQL | 56 | 2 |\n| Kaolin | Tuning | 88 | 2 |\n| Tatiana | SQL | 87 | 1 |\n+---------+--------+-------+---------------+\n \n\n\nURL: https://mariadb.com/kb/en/count/','','https://mariadb.com/kb/en/count/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (189,16,'GROUP_CONCAT','Syntax\n------ \nGROUP_CONCAT(expr)\n \nDescription\n----------- \nThis function returns a string result with the concatenated\nnon-NULL\nvalues from a group. It returns NULL if there are no\nnon-NULL values.\n \nThe maximum returned length in bytes is determined by the\ngroup_concat_max_len server system variable, which defaults\nto 1M (>= MariaDB 10.2.4) or 1K (\n\nURL: https://mariadb.com/kb/en/group_concat/','','https://mariadb.com/kb/en/group_concat/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (190,16,'MAX','Syntax\n------ \nMAX([DISTINCT] expr)\n \nDescription\n----------- \nReturns the largest, or maximum, value of expr. MAX() can\nalso take a string\nargument in which case it returns the maximum string value.\nThe DISTINCT\nkeyword can be used to find the maximum of the distinct\nvalues of expr,\nhowever, this produces the same result as omitting DISTINCT.\n \nNote that SET and ENUM fields are currently compared by\ntheir string value rather than their relative position in\nthe set, so MAX() may produce a different highest result\nthan ORDER BY DESC.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, MAX() can be used as a window function.\n \nMAX() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, MAX(score) FROM student GROUP BY name;\n \n+---------+------------+\n| name | MAX(score) |\n+---------+------------+\n| Chun | 75 |\n| Esben | 43 |\n| Kaolin | 88 |\n| Tatiana | 87 |\n+---------+------------+\n \nMAX string:\n \nSELECT MAX(name) FROM student;\n \n+-----------+\n| MAX(name) |\n+-----------+\n| Tatiana |\n+-----------+\n \nBe careful to avoid this common mistake, not grouping\ncorrectly and returning mismatched data: \n \nSELECT name,test,MAX(SCORE) FROM student;\n \n+------+------+------------+\n| name | test | MAX(SCORE) |\n+------+------+------------+\n| Chun | SQL | 88 |\n+------+------+------------+\n \nDifference between ORDER BY DESC and MAX():\n \nCREATE TABLE student2(name CHAR(10),grade\nENUM(\'b\',\'c\',\'a\'));\n \nINSERT INTO student2\nVALUES(\'Chun\',\'b\'),(\'Esben\',\'c\'),(\'Kaolin\',\'a\');\n \nSELECT MAX(grade) FROM student2;\n \n+------------+\n| MAX(grade) |\n+------------+\n| c |\n+------------+\n \nSELECT grade FROM student2 ORDER BY grade DESC LIMIT 1;\n \n+-------+\n| grade |\n+-------+\n| a |\n+-------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, MAX(score) \n OVER (PARTITION BY name) AS highest_score FROM\nstudent_test;\n \n+---------+--------+-------+---------------+\n| name | test | score | highest_score |\n+---------+--------+-------+---------------+\n| Chun | SQL | 75 | 75 |\n| Chun | Tuning | 73 | 75 |\n| Esben | SQL | 43 | 43 |\n| Esben | Tuning | 31 | 43 |\n| Kaolin | SQL | 56 | 88 |\n| Kaolin | Tuning | 88 | 88 |\n| Tatiana | SQL | 87 | 87 |\n+---------+--------+-------+---------------+\n \n\n\nURL: https://mariadb.com/kb/en/max/','','https://mariadb.com/kb/en/max/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (191,16,'MIN','Syntax\n------ \nMIN([DISTINCT] expr)\n \nDescription\n----------- \nReturns the minimum value of expr. MIN() may take a string\nargument, in which case it returns the minimum string value.\nThe DISTINCT\nkeyword can be used to find the minimum of the distinct\nvalues of expr,\nhowever, this produces the same result as omitting DISTINCT.\n \nNote that SET and ENUM fields are currently compared by\ntheir string value rather than their relative position in\nthe set, so MIN() may produce a different lowest result than\nORDER BY ASC.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, MIN() can be used as a window function.\n \nMIN() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nSELECT name, MIN(score) FROM student GROUP BY name;\n \n+---------+------------+\n| name | MIN(score) |\n+---------+------------+\n| Chun | 73 |\n| Esben | 31 |\n| Kaolin | 56 |\n| Tatiana | 83 |\n+---------+------------+\n \nMIN() with a string:\n \nSELECT MIN(name) FROM student;\n \n+-----------+\n| MIN(name) |\n+-----------+\n| Chun |\n+-----------+\n \nBe careful to avoid this common mistake, not grouping\ncorrectly and returning mismatched data: \n \nSELECT name,test,MIN(score) FROM student;\n \n+------+------+------------+\n| name | test | MIN(score) |\n+------+------+------------+\n| Chun | SQL | 31 |\n+------+------+------------+\n \nDifference between ORDER BY ASC and MIN():\n \nCREATE TABLE student2(name CHAR(10),grade\nENUM(\'b\',\'c\',\'a\'));\n \nINSERT INTO student2\nVALUES(\'Chun\',\'b\'),(\'Esben\',\'c\'),(\'Kaolin\',\'a\');\n \nSELECT MIN(grade) FROM student2;\n \n+------------+\n| MIN(grade) |\n+------------+\n| a |\n+------------+\n \nSELECT grade FROM student2 ORDER BY grade ASC LIMIT 1;\n \n+-------+\n| grade |\n+-------+\n| b |\n+-------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, MIN(score) \n OVER (PARTITION BY name) AS lowest_score FROM student_test;\n \n+---------+--------+-------+--------------+\n| name | test | score | lowest_score |\n+---------+--------+-------+--------------+\n| Chun | SQL | 75 | 73 |\n| Chun | Tuning | 73 | 73 |\n| Esben | SQL | 43 | 31 |\n| Esben | Tuning | 31 | 31 |\n| Kaolin | SQL | 56 | 56 |\n| Kaolin | Tuning | 88 | 56 |\n| Tatiana | SQL | 87 | 87 |\n+---------+--------+-------+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/min/','','https://mariadb.com/kb/en/min/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (192,16,'STD','Syntax\n------ \nSTD(expr)\n \nDescription\n----------- \nReturns the population standard deviation of expr. This is\nan extension\nto standard SQL. The standard SQL function STDDEV_POP() can\nbe used instead. \n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STD() can be used as a window function.\n \nThis function returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, STDDEV_POP(score) \n OVER (PARTITION BY test) AS stddev_results FROM\nstudent_test;\n \n+---------+--------+-------+----------------+\n| name | test | score | stddev_results |\n+---------+--------+-------+----------------+\n| Chun | SQL | 75 | 16.9466 |\n| Chun | Tuning | 73 | 24.1247 |\n| Esben | SQL | 43 | 16.9466 |\n| Esben | Tuning | 31 | 24.1247 |\n| Kaolin | SQL | 56 | 16.9466 |\n| Kaolin | Tuning | 88 | 24.1247 |\n| Tatiana | SQL | 87 | 16.9466 |\n+---------+--------+-------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/std/','','https://mariadb.com/kb/en/std/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (193,16,'STDDEV','Syntax\n------ \nSTDDEV(expr)\n \nDescription\n----------- \nReturns the population standard deviation of expr. This\nfunction is\nprovided for compatibility with Oracle. The standard SQL\nfunction\nSTDDEV_POP() can be used instead.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STDDEV() can be used as a window\nfunction.\n \nThis function returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, STDDEV_POP(score) \n OVER (PARTITION BY test) AS stddev_results FROM\nstudent_test;\n \n+---------+--------+-------+----------------+\n| name | test | score | stddev_results |\n+---------+--------+-------+----------------+\n| Chun | SQL | 75 | 16.9466 |\n| Chun | Tuning | 73 | 24.1247 |\n| Esben | SQL | 43 | 16.9466 |\n| Esben | Tuning | 31 | 24.1247 |\n| Kaolin | SQL | 56 | 16.9466 |\n| Kaolin | Tuning | 88 | 24.1247 |\n| Tatiana | SQL | 87 | 16.9466 |\n+---------+--------+-------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/stddev/','','https://mariadb.com/kb/en/stddev/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (194,16,'STDDEV_POP','Syntax\n------ \nSTDDEV_POP(expr)\n \nDescription\n----------- \nReturns the population standard deviation of expr (the\nsquare root of\nVAR_POP()). You can also use STD() or\nSTDDEV(), which are equivalent but not standard SQL.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STDDEV_POP() can be used as a window\nfunction.\n \nSTDDEV_POP() returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, STDDEV_POP(score) \n OVER (PARTITION BY test) AS stddev_results FROM\nstudent_test;\n \n+---------+--------+-------+----------------+\n| name | test | score | stddev_results |\n+---------+--------+-------+----------------+\n| Chun | SQL | 75 | 16.9466 |\n| Chun | Tuning | 73 | 24.1247 |\n| Esben | SQL | 43 | 16.9466 |\n| Esben | Tuning | 31 | 24.1247 |\n| Kaolin | SQL | 56 | 16.9466 |\n| Kaolin | Tuning | 88 | 24.1247 |\n| Tatiana | SQL | 87 | 16.9466 |\n+---------+--------+-------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/stddev_pop/','','https://mariadb.com/kb/en/stddev_pop/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (195,16,'STDDEV_SAMP','Syntax\n------ \nSTDDEV_SAMP(expr)\n \nDescription\n----------- \nReturns the sample standard deviation of expr (the square\nroot of VAR_SAMP()).\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, STDDEV_SAMP() can be used as a window\nfunction.\n \nSTDDEV_SAMP() returns NULL if there were no matching rows.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/stddev_samp/','','https://mariadb.com/kb/en/stddev_samp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (196,16,'SUM','Syntax\n------ \nSUM([DISTINCT] expr)\n \nDescription\n----------- \nReturns the sum of expr. If the return set has no rows,\nSUM() returns\nNULL. The DISTINCT keyword can be used to sum only the\ndistinct values\nof expr.\n \nFrom MariaDB 10.2.0, SUM() can be used as a window function,\nalthough not with the DISTINCT specifier.\n \nExamples\n-------- \nCREATE TABLE sales (sales_value INT);\nINSERT INTO sales VALUES(10),(20),(20),(40);\n \nSELECT SUM(sales_value) FROM sales;\n \n+------------------+\n| SUM(sales_value) |\n+------------------+\n| 90 |\n+------------------+\n \nSELECT SUM(DISTINCT(sales_value)) FROM sales;\n \n+----------------------------+\n| SUM(DISTINCT(sales_value)) |\n+----------------------------+\n| 70 |\n+----------------------------+\n \nCommonly, SUM is used with a GROUP BY clause:\n \nCREATE TABLE sales (name CHAR(10), month CHAR(10), units\nINT);\n \nINSERT INTO sales VALUES \n (\'Chun\', \'Jan\', 75), (\'Chun\', \'Feb\', 73),\n (\'Esben\', \'Jan\', 43), (\'Esben\', \'Feb\', 31),\n (\'Kaolin\', \'Jan\', 56), (\'Kaolin\', \'Feb\', 88),\n (\'Tatiana\', \'Jan\', 87), (\'Tatiana\', \'Feb\', 83);\n \nSELECT name, SUM(units) FROM sales GROUP BY name;\n \n+---------+------------+\n| name | SUM(units) |\n+---------+------------+\n| Chun | 148 |\n| Esben | 74 |\n| Kaolin | 144 |\n| Tatiana | 170 |\n+---------+------------+\n \nThe GROUP BY clause is required when using an aggregate\nfunction along with regular column data, otherwise the\nresult will be a mismatch, as in the following common type\nof mistake:\n \nSELECT name,SUM(units) FROM sales\n;\n+------+------------+\n| name | SUM(units) |\n+------+------------+\n| Chun | 536 |\n+------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, SUM(score) OVER (PARTITION BY\nname) AS total_score FROM student_test;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Chun | SQL | 75 | 148 |\n| Chun | Tuning | 73 | 148 |\n| Esben | SQL | 43 | 74 |\n| Esben | Tuning | 31 | 74 |\n| Kaolin | SQL | 56 | 144 |\n| Kaolin | Tuning | 88 | 144 |\n| Tatiana | SQL | 87 | 87 |\n+---------+--------+-------+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/sum/','','https://mariadb.com/kb/en/sum/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (197,16,'VARIANCE','Syntax\n------ \nVARIANCE(expr) \n \nDescription\n----------- \nReturns the population standard variance of expr. This is an\nextension to\nstandard SQL. The standard SQL function VAR_POP() can be\nused\ninstead.\n \nVariance is calculated by\nworking out the mean for the set\nfor each number, subtracting the mean and squaring the\nresult\ncalculate the average of the resulting differences\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, VARIANCE() can be used as a window\nfunction.\n \nVARIANCE() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE v(i tinyint);\n \nINSERT INTO v VALUES(101),(99);\n \nSELECT VARIANCE(i) FROM v;\n \n+-------------+\n| VARIANCE(i) |\n+-------------+\n| 1.0000 |\n+-------------+\n \nINSERT INTO v VALUES(120),(80);\n \nSELECT VARIANCE(i) FROM v;\n \n+-------------+\n| VARIANCE(i) |\n+-------------+\n| 200.5000 |\n+-------------+\n \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, VAR_POP(score) \n OVER (PARTITION BY test) AS variance_results FROM\nstudent_test;\n \n+---------+--------+-------+------------------+\n| name | test | score | variance_results |\n+---------+--------+-------+------------------+\n| Chun | SQL | 75 | 287.1875 |\n| Chun | Tuning | 73 | 582.0000 |\n| Esben | SQL | 43 | 287.1875 |\n| Esben | Tuning | 31 | 582.0000 |\n| Kaolin | SQL | 56 | 287.1875 |\n| Kaolin | Tuning | 88 | 582.0000 |\n| Tatiana | SQL | 87 | 287.1875 |\n+---------+--------+-------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/variance/','','https://mariadb.com/kb/en/variance/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (198,16,'VAR_POP','Syntax\n------ \nVAR_POP(expr)\n \nDescription\n----------- \nReturns the population standard variance of expr. It\nconsiders rows as\nthe whole population, not as a sample, so it has the number\nof rows as\nthe denominator. You can also use VARIANCE(), which is\nequivalent but\nis not standard SQL.\n \nVariance is calculated by\nworking out the mean for the set\nfor each number, subtracting the mean and squaring the\nresult\ncalculate the average of the resulting differences\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, VAR_POP() can be used as a window\nfunction.\n \nVAR_POP() returns NULL if there were no matching rows.\n \nExamples\n-------- \nCREATE TABLE v(i tinyint);\n \nINSERT INTO v VALUES(101),(99);\n \nSELECT VAR_POP(i) FROM v;\n \n+------------+\n| VAR_POP(i) |\n+------------+\n| 1.0000 |\n+------------+\n \nINSERT INTO v VALUES(120),(80);\n \nSELECT VAR_POP(i) FROM v;\n \n+------------+\n| VAR_POP(i) |\n+------------+\n| 200.5000 |\n+------------+\n \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, VAR_POP(score) \n OVER (PARTITION BY test) AS variance_results FROM\nstudent_test;\n \n+---------+--------+-------+------------------+\n| name | test | score | variance_results |\n+---------+--------+-------+------------------+\n| Chun | SQL | 75 | 287.1875 |\n| Chun | Tuning | 73 | 582.0000 |\n| Esben | SQL | 43 | 287.1875 |\n| Esben | Tuning | 31 | 582.0000 |\n| Kaolin | SQL | 56 | 287.1875 |\n| Kaolin | Tuning | 88 | 582.0000 |\n| Tatiana | SQL | 87 | 287.1875 |\n+---------+--------+-------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/var_pop/','','https://mariadb.com/kb/en/var_pop/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (199,16,'VAR_SAMP','Syntax\n------ \nVAR_SAMP(expr)\n \nDescription\n----------- \nReturns the sample variance of expr. That is, the\ndenominator is the number of rows minus one.\n \nIt is an aggregate function, and so can be used with the\nGROUP BY clause.\n \nFrom MariaDB 10.2.2, VAR_SAMP() can be used as a window\nfunction.\n \nVAR_SAMP() returns NULL if there were no matching rows.\n \nExamples\n-------- \nAs an aggregate function:\n \nCREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);\n \nINSERT INTO stats VALUES \n (\'a\',1),(\'a\',2),(\'a\',3),\n (\'b\',11),(\'b\',12),(\'b\',20),(\'b\',30),(\'b\',60);\n \nSELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) \n FROM stats GROUP BY category;\n \n+----------+---------------+----------------+------------+\n| category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |\n+----------+---------------+----------------+------------+\n| a | 0.8165 | 1.0000 | 0.6667 |\n| b | 18.0400 | 20.1693 | 325.4400 |\n+----------+---------------+----------------+------------+\n \nAs a window function:\n \nCREATE OR REPLACE TABLE student_test (name CHAR(10), test\nCHAR(10), score TINYINT);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, VAR_SAMP(score) \n OVER (PARTITION BY test) AS variance_results FROM\nstudent_test;\n \n+---------+--------+-------+------------------+\n| name | test | score | variance_results |\n+---------+--------+-------+------------------+\n| Chun | SQL | 75 | 382.9167 |\n| Chun | Tuning | 73 | 873.0000 |\n| Esben | SQL | 43 | 382.9167 |\n| Esben | Tuning | 31 | 873.0000 |\n| Kaolin | SQL | 56 | 382.9167 |\n| Kaolin | Tuning | 88 | 873.0000 |\n| Tatiana | SQL | 87 | 382.9167 |\n+---------+--------+-------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/var_samp/','','https://mariadb.com/kb/en/var_samp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (200,17,'BENCHMARK','Syntax\n------ \nBENCHMARK(count,expr)\n \nDescription\n----------- \nThe BENCHMARK() function executes the expression expr\nrepeatedly count\ntimes. It may be used to time how quickly MariaDB processes\nthe\nexpression. The result value is always 0. The intended use\nis from\nwithin the mysql client, which reports query execution\ntimes.\n \nExamples\n-------- \nSELECT BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\'));\n+----------------------------------------------+\n| BENCHMARK(1000000,ENCODE(\'hello\',\'goodbye\')) |\n+----------------------------------------------+\n| 0 |\n+----------------------------------------------+\n1 row in set (0.21 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/benchmark/','','https://mariadb.com/kb/en/benchmark/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (201,17,'BINLOG_GTID_POS','From version 10.0.2, MariaDB supports global transaction IDs\nfor replication.\n \nSyntax\n------ \nBINLOG_GTID_POS(binlog_filename,binlog_offset)\n \nDescription\n----------- \nThe BINLOG_GTID_POS() function takes as input an old-style\nbinary log position in the form of a file name and a file\noffset. It looks up the position in the current binlog, and\nreturns a string representation of the corresponding GTID\nposition. If the position is not found in the current\nbinlog, NULL is returned.\n \nExamples\n-------- \nSELECT BINLOG_GTID_POS(\"master-bin.000001\", 600);\n \n\n\nURL: https://mariadb.com/kb/en/binlog_gtid_pos/','','https://mariadb.com/kb/en/binlog_gtid_pos/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (202,17,'CHARSET','Syntax\n------ \nCHARSET(str)\n \nDescription\n----------- \nReturns the character set of the string argument. If str is\nnot a string, it is considered as a binary string (so the\nfunction returns \'binary\'). This applies to NULL, too. The\nreturn value is a string in the utf8 character set.\n \nExamples\n-------- \nSELECT CHARSET(\'abc\');\n+----------------+\n| CHARSET(\'abc\') |\n+----------------+\n| latin1 |\n+----------------+\n \nSELECT CHARSET(CONVERT(\'abc\' USING utf8));\n+------------------------------------+\n| CHARSET(CONVERT(\'abc\' USING utf8)) |\n+------------------------------------+\n| utf8 |\n+------------------------------------+\n \nSELECT CHARSET(USER());\n+-----------------+\n| CHARSET(USER()) |\n+-----------------+\n| utf8 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/charset/','','https://mariadb.com/kb/en/charset/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (203,17,'COERCIBILITY','Syntax\n------ \nCOERCIBILITY(str)\n \nDescription\n----------- \nReturns the collation coercibility value of the string\nargument. Coercibility defines what will be converted to\nwhat in case of collation conflict, with an expression with\nhigher coercibility being converted to the collation of an\nexpression with lower coercibility.\n \nCoercibility | Description | Example | \n \n0 | Explicit | Value using a COLLATE clause | \n \n1 | No collation | Concatenated strings using different\ncollations | \n \n2 | Implicit | Column value | \n \n3 | Constant | USER() return value | \n \n4 | Coercible | Literal string | \n \n5 | Ignorable | NULL or derived from NULL | \n \nExamples\n-------- \nSELECT COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci);\n+-----------------------------------------------+\n| COERCIBILITY(\'abc\' COLLATE latin1_swedish_ci) |\n+-----------------------------------------------+\n| 0 |\n+-----------------------------------------------+\n \nSELECT COERCIBILITY(USER());\n+----------------------+\n| COERCIBILITY(USER()) |\n+----------------------+\n| 3 |\n+----------------------+\n \nSELECT COERCIBILITY(\'abc\');\n+---------------------+\n| COERCIBILITY(\'abc\') |\n+---------------------+\n| 4 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/coercibility/','','https://mariadb.com/kb/en/coercibility/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (204,17,'COLLATION','Syntax\n------ \nCOLLATION(str)\n \nDescription\n----------- \nReturns the collation of the string argument. If str is not\na string, it is considered as a binary string (so the\nfunction returns \'binary\'). This applies to NULL, too. The\nreturn value is a string in the utf8 character set.\n \nSee Character Sets and Collations.\n \nExamples\n-------- \nSELECT COLLATION(\'abc\');\n+-------------------+\n| COLLATION(\'abc\') |\n+-------------------+\n| latin1_swedish_ci |\n+-------------------+\n \nSELECT COLLATION(_utf8\'abc\');\n+-----------------------+\n| COLLATION(_utf8\'abc\') |\n+-----------------------+\n| utf8_general_ci |\n+-----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/collation/','','https://mariadb.com/kb/en/collation/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (205,17,'CONNECTION_ID','Syntax\n------ \nCONNECTION_ID()\n \nDescription\n----------- \nReturns the connection ID (thread ID) for the connection.\nEvery\nthread (including events) has an ID that is unique among the\nset of currently\nconnected clients.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nExamples\n-------- \nSELECT CONNECTION_ID();\n+-----------------+\n| CONNECTION_ID() |\n+-----------------+\n| 3 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/connection_id/','','https://mariadb.com/kb/en/connection_id/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (206,17,'CURRENT_ROLE','Roles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nCURRENT_ROLE, CURRENT_ROLE()\n \nDescription\n----------- \nReturns the current role name. This determines your access\nprivileges. The return value is a string in the\nutf8 character set.\n \nIf there is no current role, NULL is returned.\n \nThe output of SELECT CURRENT_ROLE is equivalent to the\ncontents of the ENABLED_ROLES Information Schema table.\n \nUSER() returns the combination of user and host used to\nlogin. CURRENT_USER() returns the account used to determine\ncurrent connection\'s privileges.\n \nExamples\n-------- \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| NULL |\n+--------------+\n \nSET ROLE staff;\n \nSELECT CURRENT_ROLE;\n \n+--------------+\n| CURRENT_ROLE |\n+--------------+\n| staff |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/current_role/','','https://mariadb.com/kb/en/current_role/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (207,17,'CURRENT_USER','Syntax\n------ \nCURRENT_USER, CURRENT_USER()\n \nDescription\n----------- \nReturns the user name and host name combination for the\nMariaDB account\nthat the server used to authenticate the current client.\nThis account\ndetermines your access privileges. The return value is a\nstring in the\nutf8 character set.\n \nThe value of CURRENT_USER() can differ from the value of\nUSER(). CURRENT_ROLE() returns the current active role.\n \nExamples\n-------- \nshell> mysql --user=\"anonymous\"\n \nMariaDB [(none)]> select user(),current_user();\n+---------------------+----------------+\n| user() | current_user() |\n+---------------------+----------------+\n| anonymous@localhost | @localhost |\n+---------------------+----------------+\n \nWhen calling CURRENT_USER() in a stored procedure, it\nreturns the owner of the stored procedure, as defined with\nDEFINER.\n \n\n\nURL: https://mariadb.com/kb/en/current_user/','','https://mariadb.com/kb/en/current_user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (208,17,'DATABASE','Syntax\n------ \nDATABASE()\n \nDescription\n----------- \nReturns the default (current) database name as a string in\nthe utf8 character set. If there is no default database,\nDATABASE() returns NULL. Within a stored routine, the\ndefault database is the database that the routine is\nassociated with, which is not necessarily the same as the\ndatabase that is the default in the calling context.\n \nSCHEMA() is a synonym for DATABASE().\n \nTo select a default database, the USE statement can be run.\nAnother way to set the default database is specifying its\nname at mysql command line client startup.\n \nExamples\n-------- \nSELECT DATABASE();\n+------------+\n| DATABASE() |\n+------------+\n| NULL |\n+------------+\n \nUSE test;\n \nDatabase changed\n \nSELECT DATABASE();\n+------------+\n| DATABASE() |\n+------------+\n| test |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/database/','','https://mariadb.com/kb/en/database/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (209,17,'DECODE_HISTOGRAM','DECODE_HISTOGRAM() was introduced in MariaDB 10.0.2\n \nSyntax\n------ \nDECODE_HISTOGRAM(hist_type,histogram)\n \nNote: Before MariaDB 10.0.10 the arguments were reversed.\n \nDescription\n----------- \nReturns a string of comma separated numeric values\ncorresponding to a probability distribution represented by\nthe histogram of type hist_type (SINGLE_PREC_HB or\nDOUBLE_PREC_HB). The hist_type and histogram would be\ncommonly used from the mysql.column_stats table.\n \nSee Histogram Based Statistics for details.\n \nExamples\n-------- \nCREATE TABLE origin (\n i INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,\n v INT UNSIGNED NOT NULL\n);\n \nINSERT INTO origin(v) VALUES \n (1),(2),(3),(4),(5),(10),(20),\n (30),(40),(50),(60),(70),(80),\n (90),(100),(200),(400),(800);\n \nSET histogram_size=10,histogram_type=SINGLE_PREC_HB;\n \nANALYZE TABLE origin PERSISTENT FOR ALL;\n \n+-------------+---------+----------+-----------------------------------------+\n| Table | Op | Msg_type | Msg_text |\n+-------------+---------+----------+-----------------------------------------+\n| test.origin | analyze | status | Engine-independent\nstatistics collected |\n| test.origin | analyze | status | OK |\n+-------------+---------+----------+-----------------------------------------+\n \nSELECT db_name,table_name,column_name,hist_type,\n hex(histogram),decode_histogram(hist_type,histogram) \n FROM mysql.column_stats WHERE db_name=\'test\' and\ntable_name=\'origin\';\n \n+---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+\n| db_name | table_name | column_name | hist_type |\nhex(histogram) | decode_histogram(hist_type,histogram) |\n+---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+\n| test | origin | i | SINGLE_PREC_HB | 0F2D3C5A7887A5C3D2F0\n|\n0.059,0.118,0.059,0.118,0.118,0.059,0.118,0.118,0.059,0.118,0.059\n|\n| test | origin | v | SINGLE_PREC_HB | 000001060C0F161C1F7F\n|\n0.000,0.000,0.004,0.020,0.024,0.012,0.027,0.024,0.012,0.376,0.502\n|\n+---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+\n \nSET histogram_size=20,histogram_type=DOUBLE_PREC_HB;\n \nANALYZE TABLE origin PERSISTENT FOR ALL;\n \n+-------------+---------+----------+-----------------------------------------+\n| Table | Op | Msg_type | Msg_text |\n+-------------+---------+----------+-----------------------------------------+\n| test.origin | analyze | status | Engine-independent\nstatistics collected |\n| test.origin | analyze | status | OK |\n+-------------+---------+----------+-----------------------------------------+\n \nSELECT db_name,table_name,column_name,\n hist_type,hex(histogram),decode_histogram(hist_type,histogram)\n\n FROM mysql.column_stats WHERE db_name=\'test\' and\ntable_name=\'origin\';\n \n+---------+------------+-------------+----------------+------------------------------------------+-----------------------------------------------------------------------------------------+\n| db_name | table_name | column_name | hist_type |\nhex(histogram) | decode_histogram(hist_type,histogram) |\n+---------+------------+-------------+----------------+------------------------------------------+-----------------------------------------------------------------------------------------+\n| test | origin | i | DOUBLE_PREC_HB |\n0F0F2D2D3C3C5A5A78788787A5A5C3C3D2D2F0F0 |\n0.05882,0.11765,0.05882,0.11765,0.11765,0.05882,0.11765,0.11765,0.05882,0.11765,0.05882\n|\n| test | origin | v | DOUBLE_PREC_HB |\n5200F600480116067E0CB30F1B16831CB81FD67F |\n0.00125,0.00250,0.00125,0.01877,0.02502,0.01253,0.02502,0.02502,0.01253,0.37546,0.50063\n|\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/decode_histogram/','','https://mariadb.com/kb/en/decode_histogram/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (210,17,'DEFAULT','Syntax\n------ \nDEFAULT(col_name)\n \nDescription\n----------- \nReturns the default value for a table column. If the column\nhas no default value, NULL is returned.\nFor integer columns using AUTO_INCREMENT, 0 is returned.\n \nWhen using DEFAULT as a value to set in an INSERT or UPDATE\nstatement, you can use the bare keyword DEFAULT without the\nparentheses and argument to\nrefer to the column in context. You can only use DEFAULT as\na bare keyword if you are using it\nalone without a surrounding expression or function.\n \nExamples\n-------- \nSelect only non-default values for a column:\n \nSELECT i FROM t WHERE i != DEFAULT(i);\n \nUpdate values to be one greater than the default value:\n \nUPDATE t SET i = DEFAULT(i)+1 WHERE i \n\nURL: https://mariadb.com/kb/en/default/','','https://mariadb.com/kb/en/default/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (211,17,'FOUND_ROWS','Syntax\n------ \nFOUND_ROWS()\n \nDescription\n----------- \nA SELECT statement may include a LIMIT clause to restrict\nthe number\nof rows the server returns to the client. In some cases, it\nis\ndesirable to know how many rows the statement would have\nreturned\nwithout the LIMIT, but without running the statement again.\nTo obtain\nthis row count, include a SQL_CALC_FOUND_ROWS option in the\nSELECT\nstatement, and then invoke FOUND_ROWS() afterwards.\n \nYou can also use FOUND_ROWS() to obtain the number of rows\nreturned by a SELECT which does not contain a LIMIT clause.\nIn this case you don\'t need to use the SQL_CALC_FOUND_ROWS\noption. This can be useful for example in a stored\nprocedure.\n \nAlso, this function works with some other statements which\nreturn a resultset, including SHOW, DESC and HELP. For\nDELETE ... RETURNING you should use ROW_COUNT(). It also\nworks as a prepared statement, or after executing a prepared\nstatement.\n \nStatements which don\'t return any results don\'t affect\nFOUND_ROWS() - the previous value will still be returned.\n \nWarning: When used after a CALL statement, this function\nreturns the number of rows selected by the last query in the\nprocedure, not by the whole procedure.\n \nStatements using the FOUND_ROWS() function are not safe for\nreplication.\n \nExamples\n-------- \nSHOW ENGINES;\n \n+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+\n| Engine | Support | Comment | Transactions | XA |\nSavepoints |\n+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+\n| InnoDB | DEFAULT | Supports transactions, row-level\nlocking, and foreign keys | YES | YES | YES |\n...\n| SPHINX | YES | Sphinx storage engine | NO | NO | NO |\n+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+\n11 rows in set (0.01 sec)\n \nSELECT FOUND_ROWS();\n+--------------+\n| FOUND_ROWS() |\n+--------------+\n| 11 |\n+--------------+\n \nSELECT SQL_CALC_FOUND_ROWS * FROM tbl_name WHERE id > 100\nLIMIT 10;\n \nSELECT FOUND_ROWS();\n+--------------+\n| FOUND_ROWS() |\n+--------------+\n| 23 |\n+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/found_rows/','','https://mariadb.com/kb/en/found_rows/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (212,17,'LAST_INSERT_ID','Syntax\n------ \nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n \nDescription\n----------- \nLAST_INSERT_ID() (no arguments) returns\nthe first automatically generated value successfully\ninserted for an\nAUTO_INCREMENT column as a result of the most recently\nexecuted INSERT\nstatement. The value of LAST_INSERT_ID() remains unchanged\nif no rows\nare successfully inserted.\n \nIf one gives an argument to LAST_INSERT_ID(), then it will\nreturn the value of the expression and\nthe next call to LAST_INSERT_ID() will return the same\nvalue. The value will also be sent to the client\nand can be accessed by the mysql_insert_id function.\n \nFor example, after inserting a row that generates an\nAUTO_INCREMENT\nvalue, you can get the value like this:\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 9 |\n+------------------+\n \nYou can also use LAST_INSERT_ID() to delete the last\ninserted row:\n \nDELETE FROM product WHERE id = LAST_INSERT_ID();\n \nIf no rows were successfully inserted, LAST_INSERT_ID()\nreturns 0.\n \nThe value of LAST_INSERT_ID() will be consistent across all\nversions\nif all rows in the INSERT or UPDATE statement were\nsuccessful.\n \nThe currently executing statement does not affect the value\nof\nLAST_INSERT_ID(). Suppose that you generate an\nAUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table\nwith its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID()\nwill remain\nstable in the second statement; its value for the second and\nlater\nrows is not affected by the earlier row insertions.\n(However, if you\nmix references to LAST_INSERT_ID() and LAST_INSERT_ID(expr),\nthe\neffect is undefined.)\n \nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if\nthe\nstatement is rolled back due to an error, the value of\nLAST_INSERT_ID() is left undefined. For manual ROLLBACK, the\nvalue of\nLAST_INSERT_ID() is not restored to that before the\ntransaction; it\nremains as it was at the point of the ROLLBACK.\n \nWithin the body of a stored routine (procedure or function)\nor a\ntrigger, the value of LAST_INSERT_ID() changes the same way\nas for\nstatements executed outside the body of these kinds of\nobjects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements\ndepends on the\nkind of routine:\nIf a stored procedure executes statements that change the\nvalue of LAST_INSERT_ID(), the new value will be seen by\nstatements that follow the procedure call.\n \nFor stored functions and triggers that change the value, the\nvalue is restored when the function or trigger ends, so\nfollowing statements will not see a changed value.\n \nExamples\n-------- \nCREATE TABLE t (\n id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY, \n f VARCHAR(1)) \nENGINE = InnoDB;\n \nINSERT INTO t(f) VALUES(\'a\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 1 |\n+------------------+\n \nINSERT INTO t(f) VALUES(\'b\');\n \nINSERT INTO t(f) VALUES(\'c\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 3 |\n+------------------+\n \nINSERT INTO t(f) VALUES(\'d\'),(\'e\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 4 |\n+------------------+\n \nSELECT * FROM t;\n \n+----+------+\n| id | f |\n+----+------+\n| 1 | a |\n| 2 | b |\n| 3 | c |\n| 4 | d |\n| 5 | e |\n+----+------+\n \nSELECT LAST_INSERT_ID(12);\n+--------------------+\n| LAST_INSERT_ID(12) |\n+--------------------+\n| 12 |\n+--------------------+\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 12 |\n+------------------+\n \nINSERT INTO t(f) VALUES(\'f\');\n \nSELECT LAST_INSERT_ID();\n+------------------+\n| LAST_INSERT_ID() |\n+------------------+\n| 6 |\n+------------------+\n \nSELECT * FROM t;\n \n+----+------+\n| id | f |\n+----+------+\n| 1 | a |\n| 2 | b |\n| 3 | c |\n| 4 | d |\n| 5 | e |\n| 6 | f |\n+----+------+\n \nSELECT LAST_INSERT_ID(12);\n+--------------------+\n| LAST_INSERT_ID(12) |\n+--------------------+\n| 12 |\n+--------------------+\n \nINSERT INTO t(f) VALUES(\'g\');\n \nSELECT * FROM t;\n \n+----+------+\n| id | f |\n+----+------+\n| 1 | a |\n| 2 | b |\n| 3 | c |\n| 4 | d |\n| 5 | e |\n| 6 | f |\n| 7 | g |\n+----+------+\n \n\n\nURL: https://mariadb.com/kb/en/last_insert_id/','','https://mariadb.com/kb/en/last_insert_id/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (213,17,'LAST_VALUE','Syntax\n------ \nLAST_VALUE(expr,[expr,...])\n \nLAST_VALUE(expr) OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nLAST_VALUE() evaluates all expressions and returns the last.\n \nThis is useful together with setting user variables to a\nvalue with @var:=expr, for example when you want to get data\nof rows updated/deleted without having to do two queries\nagainst the table.\n \nSince MariaDB 10.2.2, LAST_VALUE can be used as a window\nfunction.\n \nReturns NULL if no last value exists.\n \nExamples\n-------- \nCREATE TABLE t1 (a int, b int);\nINSERT INTO t1 VALUES(1,10),(2,20);\nDELETE FROM t1 WHERE a=1 AND last_value(@a:=a,@b:=b,1);\nSELECT @a,@b;\n \n+------+------+\n| @a | @b |\n+------+------+\n| 1 | 10 |\n+------+------+\n \nAs a window function:\n \nCREATE TABLE t1 (\n pk int primary key,\n a int,\n b int,\n c char(10),\n d decimal(10, 3),\n e real\n);\n \nINSERT INTO t1 VALUES\n( 1, 0, 1, \'one\', 0.1, 0.001),\n( 2, 0, 2, \'two\', 0.2, 0.002),\n( 3, 0, 3, \'three\', 0.3, 0.003),\n( 4, 1, 2, \'three\', 0.4, 0.004),\n( 5, 1, 1, \'two\', 0.5, 0.005),\n( 6, 1, 1, \'one\', 0.6, 0.006),\n( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n( 8, 2, 1, \'n_two\', NULL, 0.008),\n( 9, 2, 2, NULL, 0.7, 0.009),\n(10, 2, 0, \'n_four\', 0.8, 0.010),\n(11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, FIRST_VALUE(pk) OVER (ORDER BY pk) AS first_asc,\n LAST_VALUE(pk) OVER (ORDER BY pk) AS last_asc,\n FIRST_VALUE(pk) OVER (ORDER BY pk DESC) AS first_desc,\n LAST_VALUE(pk) OVER (ORDER BY pk DESC) AS last_desc\nFROM t1\nORDER BY pk DESC;\n \n+----+-----------+----------+------------+-----------+\n| pk | first_asc | last_asc | first_desc | last_desc |\n+----+-----------+----------+------------+-----------+\n| 11 | 1 | 11 | 11 | 11 |\n| 10 | 1 | 10 | 11 | 10 |\n| 9 | 1 | 9 | 11 | 9 |\n| 8 | 1 | 8 | 11 | 8 |\n| 7 | 1 | 7 | 11 | 7 |\n| 6 | 1 | 6 | 11 | 6 |\n| 5 | 1 | 5 | 11 | 5 |\n| 4 | 1 | 4 | 11 | 4 |\n| 3 | 1 | 3 | 11 | 3 |\n| 2 | 1 | 2 | 11 | 2 |\n| 1 | 1 | 1 | 11 | 1 |\n+----+-----------+----------+------------+-----------+\n \nCREATE OR REPLACE TABLE t1 (i int);\nINSERT INTO t1 VALUES\n(1),(2),(3),(4),(5),(6),(7),(8),(9),(10);\n \nSELECT i,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW\nand 1 FOLLOWING) AS f_1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW and\n1 FOLLOWING) AS l_1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING\nAND 1 FOLLOWING) AS f_1p1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND\n1 FOLLOWING) AS f_1p1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING\nAND 1 PRECEDING) AS f_2p1p,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING AND\n1 PRECEDING) AS f_2p1p,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING\nAND 2 FOLLOWING) AS f_1f2f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING AND\n2 FOLLOWING) AS f_1f2f\nFROM t1;\n \n+------+------+------+--------+--------+--------+--------+--------+--------+\n| i | f_1f | l_1f | f_1p1f | f_1p1f | f_2p1p | f_2p1p |\nf_1f2f | f_1f2f |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n| 1 | 1 | 2 | 1 | 2 | NULL | NULL | 2 | 3 |\n| 2 | 2 | 3 | 1 | 3 | 1 | 1 | 3 | 4 |\n| 3 | 3 | 4 | 2 | 4 | 1 | 2 | 4 | 5 |\n| 4 | 4 | 5 | 3 | 5 | 2 | 3 | 5 | 6 |\n| 5 | 5 | 6 | 4 | 6 | 3 | 4 | 6 | 7 |\n| 6 | 6 | 7 | 5 | 7 | 4 | 5 | 7 | 8 |\n| 7 | 7 | 8 | 6 | 8 | 5 | 6 | 8 | 9 |\n| 8 | 8 | 9 | 7 | 9 | 6 | 7 | 9 | 10 |\n| 9 | 9 | 10 | 8 | 10 | 7 | 8 | 10 | 10 |\n| 10 | 10 | 10 | 9 | 10 | 8 | 9 | NULL | NULL |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n \n\n\nURL: https://mariadb.com/kb/en/last_value/','','https://mariadb.com/kb/en/last_value/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (214,17,'PROCEDURE ANALYSE','Syntax\n------ \nanalyse([max_elements[,max_memory]])\n \nDescription\n----------- \nThis procedure is defined in the sql/sql_analyse.cc file. It\nexamines\nthe result from a query and returns an analysis of the\nresults that\nsuggests optimal data types for each column. To obtain this\nanalysis,\nappend PROCEDURE ANALYSE to the end of a SELECT statement:\n \nSELECT ... FROM ... WHERE ... PROCEDURE\nANALYSE([max_elements,[max_memory]])\n \nFor example:\n \nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n \nThe results show some statistics for the values returned by\nthe query,\nand propose an optimal data type for the columns. This can\nbe helpful\nfor checking your existing tables, or after importing new\ndata. You\nmay need to try different settings for the arguments so that\nPROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n \nThe arguments are optional and are used as follows:\nmax_elements (default 256) is the maximum number of distinct\nvalues that analyse notices per column. This is used by\nanalyse to check whether the optimal data type should be of\ntype ENUM; if there are more than max_elements distinct\nvalues, then ENUM is not a suggested type.\nmax_memory (default 8192) is the maximum amount of memory\nthat analyse should allocate per column while trying to find\nall distinct values.\n \n\n\nURL: https://mariadb.com/kb/en/procedure-analyse/','','https://mariadb.com/kb/en/procedure-analyse/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (215,17,'ROW_COUNT','Syntax\n------ \nROW_COUNT()\n \nDescription\n----------- \nROW_COUNT() returns the number of rows updated, inserted or\ndeleted\nby the preceding statement. This is the same as the row\ncount that the\nmysql client displays and the value from the\nmysql_affected_rows() C\nAPI function.\n \nGenerally:\nFor statements which return a result set (such as SELECT,\nSHOW, DESC or HELP), returns -1, even when the result set is\nempty. This is also true for administrative statements, such\nas OPTIMIZE.\nFor DML statements other than SELECT and for ALTER TABLE,\nreturns the number of affected rows.\nFor DDL statements (including TRUNCATE) and for other\nstatements which don\'t return any result set (such as USE,\nDO, SIGNAL or DEALLOCATE PREPARE), returns 0.\n \nFor UPDATE, affected rows is by default the number of rows\nthat were actually changed. If the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() is specified when connecting to mysqld,\naffected rows is instead the number of rows matched by the\nWHERE clause. \n \nFor REPLACE, deleted rows are also counted. So, if REPLACE\ndeletes a row and adds a new row, ROW_COUNT() returns 2.\n \nFor INSERT ... ON DUPLICATE KEY, updated rows are counted\ntwice. So, if INSERT adds a new rows and modifies another\nrow, ROW_COUNT() returns 3.\n \nROW_COUNT() does not take into account rows that are not\ndirectly deleted/updated by the last statement. This means\nthat rows deleted by foreign keys or triggers are not\ncounted.\n \nWarning: You can use ROW_COUNT() with prepared statements,\nbut you need to call it after EXECUTE, not after DEALLOCATE\nPREPARE, because the row count for allocate prepare is\nalways 0.\n \nWarning: When used after a CALL statement, this function\nreturns the number of rows affected by the last statement in\nthe procedure, not by the whole procedure.\n \nWarning: After INSERT DELAYED, ROW_COUNT() returns the\nnumber of the rows you tried to insert, not the number of\nthe successful writes.\n \nThis information can also be found in the diagnostics area.\n \nStatements using the ROW_COUNT() function are not safe for\nreplication.\n \nExamples\n-------- \nCREATE TABLE t (A INT);\n \nINSERT INTO t VALUES(1),(2),(3);\n \nSELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n \nDELETE FROM t WHERE A IN(1,2);\n \nSELECT ROW_COUNT(); \n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 2 |\n+-------------+\n \nExample with prepared statements:\n \nSET @q = \'INSERT INTO t VALUES(1),(2),(3);\';\n \nPREPARE stmt FROM @q;\n \nEXECUTE stmt;\n \nQuery OK, 3 rows affected (0.39 sec)\nRecords: 3 Duplicates: 0 Warnings: 0\n \nSELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n| 3 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/row_count/','','https://mariadb.com/kb/en/row_count/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (216,17,'SCHEMA','Syntax\n------ \nSCHEMA()\n \nDescription\n----------- \nThis function is a synonym for DATABASE().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/schema/','','https://mariadb.com/kb/en/schema/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (217,17,'SESSION_USER','Syntax\n------ \nSESSION_USER()\n \nDescription\n----------- \nSESSION_USER() is a synonym for USER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/session_user/','','https://mariadb.com/kb/en/session_user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (218,17,'SYSTEM_USER','Syntax\n------ \nSYSTEM_USER()\n \nDescription\n----------- \nSYSTEM_USER() is a synonym for USER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/system_user/','','https://mariadb.com/kb/en/system_user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (219,17,'USER','Syntax\n------ \nUSER()\n \nDescription\n----------- \nReturns the current MariaDB user name and host name, given\nwhen authenticating to MariaDB, as a string in the utf8\ncharacter set.\n \nNote that the value of USER() may differ from the value of\nCURRENT_USER(), which is the user used to authenticate the\ncurrent client. \nCURRENT_ROLE() returns the current active role.\n \nSYSTEM_USER() and SESSION_USER are synonyms for USER().\n \nStatements using the USER() function or one of its synonyms\nare not safe for statement level replication.\n \nExamples\n-------- \nshell> mysql --user=\"anonymous\"\n \nMariaDB [(none)]> select user(),current_user();\n+---------------------+----------------+\n| user() | current_user() |\n+---------------------+----------------+\n| anonymous@localhost | @localhost |\n+---------------------+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/user/','','https://mariadb.com/kb/en/user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (220,17,'VERSION','Syntax\n------ \nVERSION()\n \nDescription\n----------- \nReturns a string that indicates the MariaDB server version.\nThe string\nuses the utf8 character set.\n \nExamples\n-------- \nSELECT VERSION();\n+----------------+\n| VERSION() |\n+----------------+\n| 10.4.7-MariaDB |\n+----------------+\n \nThe VERSION() string may have one or more of the following\nsuffixes:\n \nSuffix | Description | \n \n-embedded | The server is an embedded server (libmysqld). | \n \n-log | General logging, slow logging or binary (replication)\nlogging is enabled. | \n \n-debug | The server is compiled for debugging. | \n \n-valgrind |  The server is compiled to be instrumented with\nvalgrind. | \n \nChanging the Version String\n \nSome old legacy code may break because they are parsing the\nVERSION string and expecting a MySQL string or a simple\nversion\nstring like Joomla til API17, see MDEV-7780.\n \nFrom MariaDB 10.2, one can fool these applications by\nsetting the version string from the command line or the\nmy.cnf files with --version=....\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/version/','','https://mariadb.com/kb/en/version/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (221,18,'Not Equal Operator','Syntax\n------ \n, !=\n \nDescription\n----------- \nNot equal operator. Evaluates both SQL expressions and\nreturns 1 if they are not equal and 0 if they are equal, or\nNULL if either expression is NULL. If the expressions return\ndifferent data types, (for instance, a number and a string),\nperforms type conversion.\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) != (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a != t2.x) OR (t1.b != t2.y)\nFROM t1 INNER JOIN t2;\n \nExamples\n-------- \nSELECT \'.01\' \'0.01\';\n \n+-----------------+\n| \'.01\' \'0.01\' |\n+-----------------+\n| 1 |\n+-----------------+\n \nSELECT .01 \'0.01\';\n \n+---------------+\n| .01 \'0.01\' |\n+---------------+\n| 0 |\n+---------------+\n \nSELECT \'zapp\' \'zappp\';\n \n+-------------------+\n| \'zapp\' \'zappp\' |\n+-------------------+\n| 1 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-equal/','','https://mariadb.com/kb/en/not-equal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (222,18,'&lt;','Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/less-than/','','https://mariadb.com/kb/en/less-than/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (223,18,'&lt;=','Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/less-than-or-equal/','','https://mariadb.com/kb/en/less-than-or-equal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (224,18,'&lt;=&gt;','Syntax\n------ \n\n \nDescription\n----------- \nNULL-safe equal operator. It performs an equality comparison\nlike\nthe = operator, but returns 1 rather than NULL if both\noperands are\nNULL, and 0 rather than NULL if one operand is NULL.\n \na b is equivalent to a = b OR (a IS NULL AND b IS NULL).\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a t2.x) AND (t1.b t2.y)\nFROM t1 INNER JOIN t2;\n \nSee also NULL Values in MariaDB.\n \nExamples\n-------- \nSELECT 1 1, NULL NULL, 1 NULL;\n \n+---------+---------------+------------+\n| 1 1 | NULL NULL | 1 NULL |\n+---------+---------------+------------+\n| 1 | 1 | 0 |\n+---------+---------------+------------+\n \nSELECT 1 = 1, NULL = NULL, 1 = NULL;\n \n+-------+-------------+----------+\n| 1 = 1 | NULL = NULL | 1 = NULL |\n+-------+-------------+----------+\n| 1 | NULL | NULL |\n+-------+-------------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/null-safe-equal/','','https://mariadb.com/kb/en/null-safe-equal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (225,18,'=','Syntax\n------ \nleft_expr = right_expr\n \nDescription\n----------- \nEqual operator. Evaluates both SQL expressions and returns 1\nif they are equal, 0 if they are not equal, or NULL if\neither expression is NULL. If the expressions return\ndifferent data types (for example, a number and a string), a\ntype conversion is performed.\n \nWhen used in row comparisons these two queries are\nsynonymous and return the same results:\n \nSELECT (t1.a, t1.b) = (t2.x, t2.y) FROM t1 INNER JOIN t2;\n \nSELECT (t1.a = t2.x) AND (t1.b = t2.y) FROM t1 INNER JOIN\nt2;\n \nTo perform a NULL-safe comparison, use the operator.\n \n= can also be used as an assignment operator.\n \nExamples\n-------- \nSELECT 1 = 0;\n \n+-------+\n| 1 = 0 |\n+-------+\n| 0 |\n+-------+\n \nSELECT \'0\' = 0;\n \n+---------+\n| \'0\' = 0 |\n+---------+\n| 1 |\n+---------+\n \nSELECT \'0.0\' = 0;\n \n+-----------+\n| \'0.0\' = 0 |\n+-----------+\n| 1 |\n+-----------+\n \nSELECT \'0.01\' = 0;\n \n+------------+\n| \'0.01\' = 0 |\n+------------+\n| 0 |\n+------------+\n \nSELECT \'.01\' = 0.01;\n \n+--------------+\n| \'.01\' = 0.01 |\n+--------------+\n| 1 |\n+--------------+\n \nSELECT (5 * 2) = CONCAT(\'1\', \'0\');\n+----------------------------+\n| (5 * 2) = CONCAT(\'1\', \'0\') |\n+----------------------------+\n| 1 |\n+----------------------------+\n \nSELECT 1 = NULL;\n \n+----------+\n| 1 = NULL |\n+----------+\n| NULL |\n+----------+\n \nSELECT NULL = NULL;\n \n+-------------+\n| NULL = NULL |\n+-------------+\n| NULL |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/equal/','','https://mariadb.com/kb/en/equal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (226,18,'&gt;','Syntax\n------ \n>\n \nDescription\n----------- \nGreater than operator. Evaluates both SQL expressions and\nreturns 1 if the left value is greater than the right value\nand 0 if it is not, or NULL if either expression is NULL. If\nthe expressions return different data types, (for instance,\na number and a string), performs type conversion.\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) > (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a > t2.x) OR ((t1.a = t2.x) AND (t1.b > t2.y))\nFROM t1 INNER JOIN t2;\n \nExamples\n-------- \nSELECT 2 > 2;\n \n+-------+\n| 2 > 2 |\n+-------+\n| 0 |\n+-------+\n \nSELECT \'b\' > \'a\';\n \n+-----------+\n| \'b\' > \'a\' |\n+-----------+\n| 1 |\n+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/greater-than/','','https://mariadb.com/kb/en/greater-than/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (227,18,'&gt;=','Syntax\n------ \n>=\n \nDescription\n----------- \nGreater than or equal operator. Evaluates both SQL\nexpressions and returns 1 if the left value is greater than\nor equal to the right value and 0 if it is not, or NULL if\neither expression is NULL. If the expressions return\ndifferent data types, (for instance, a number and a string),\nperforms type conversion.\n \nWhen used in row comparisons these two queries return the\nsame results:\n \nSELECT (t1.a, t1.b) >= (t2.x, t2.y) \nFROM t1 INNER JOIN t2;\n \nSELECT (t1.a > t2.x) OR ((t1.a = t2.x) AND (t1.b >= t2.y))\nFROM t1 INNER JOIN t2;\n \nExamples\n-------- \nSELECT 2 >= 2;\n \n+--------+\n| 2 >= 2 |\n+--------+\n| 1 |\n+--------+\n \nSELECT \'A\' >= \'a\';\n \n+------------+\n| \'A\' >= \'a\' |\n+------------+\n| 1 |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/greater-than-or-equal/','','https://mariadb.com/kb/en/greater-than-or-equal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (228,18,'BETWEEN AND','Syntax\n------ \nexpr BETWEEN min AND max\n \nDescription\n----------- \nIf expr is greater than or equal to min and expr is less\nthan or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is\nequivalent\nto the expression (min \n\nURL: https://mariadb.com/kb/en/between-and/','','https://mariadb.com/kb/en/between-and/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (229,18,'COALESCE','Syntax\n------ \nCOALESCE(value,...)\n \nDescription\n----------- \nReturns the first non-NULL value in the list, or NULL if\nthere are no\nnon-NULL values. At least one parameter must be passed.\n \nSee also NULL Values in MariaDB.\n \nExamples\n-------- \nSELECT COALESCE(NULL,1);\n+------------------+\n| COALESCE(NULL,1) |\n+------------------+\n| 1 |\n+------------------+\n \nSELECT COALESCE(NULL,NULL,NULL);\n+--------------------------+\n| COALESCE(NULL,NULL,NULL) |\n+--------------------------+\n| NULL |\n+--------------------------+\n \nWhen two arguments are given, COALESCE() is the same as\nIFNULL():\n \nSET @a=NULL, @b=1;\n \nSELECT COALESCE(@a, @b), IFNULL(@a, @b);\n+------------------+----------------+\n| COALESCE(@a, @b) | IFNULL(@a, @b) |\n+------------------+----------------+\n| 1 | 1 |\n+------------------+----------------+\n \nHex type confusion:\n \nCREATE TABLE t1 (a INT, b VARCHAR(10));\nINSERT INTO t1 VALUES (0x31, 0x61),(COALESCE(0x31),\nCOALESCE(0x61));\n \nSELECT * FROM t1;\n \n+------+------+\n| a | b |\n+------+------+\n| 49 | a |\n| 1 | a |\n+------+------+\n \nThe reason for the differing results above is that when 0x31\nis inserted directly to the column, it\'s treated as a\nnumber (see Hexadecimal Literals), while when 0x31 is passed\nto COALESCE(), it\'s treated as a string, because:\nHEX values have a string data type by default.\nCOALESCE() has the same data type as the argument. \n \n\n\nURL: https://mariadb.com/kb/en/coalesce/','','https://mariadb.com/kb/en/coalesce/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (230,18,'GREATEST','Syntax\n------ \nGREATEST(value1,value2,...)\n \nDescription\n----------- \nWith two or more arguments, returns the largest\n(maximum-valued)\nargument. The arguments are compared using the same rules as\nfor\nLEAST().\n \nExamples\n-------- \nSELECT GREATEST(2,0);\n+---------------+\n| GREATEST(2,0) |\n+---------------+\n| 2 |\n+---------------+\n \nSELECT GREATEST(34.0,3.0,5.0,767.0);\n+------------------------------+\n| GREATEST(34.0,3.0,5.0,767.0) |\n+------------------------------+\n| 767.0 |\n+------------------------------+\n \nSELECT GREATEST(\'B\',\'A\',\'C\');\n+-----------------------+\n| GREATEST(\'B\',\'A\',\'C\') |\n+-----------------------+\n| C |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/greatest/','','https://mariadb.com/kb/en/greatest/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (231,18,'IN','Syntax\n------ \nexpr IN (value,...)\n \nDescription\n----------- \nReturns 1 if expr is equal to any of the values in the IN\nlist, else\nreturns 0. If all values are constants, they are evaluated\naccording\nto the type of expr and sorted. The search for the item then\nis done\nusing a binary search. This means IN is very quick if the IN\nvalue\nlist consists entirely of constants. Otherwise, type\nconversion takes\nplace according to the rules described at Type Conversion,\nbut\napplied to all the arguments.\n \nIf expr is NULL, IN always returns NULL. If at least one of\nthe values in the list is NULL, and one of the comparisons\nis true, the result is 1. If at least one of the values in\nthe list is NULL and none of the comparisons is true, the\nresult is NULL.\n \nExamples\n-------- \nSELECT 2 IN (0,3,5,7);\n+----------------+\n| 2 IN (0,3,5,7) |\n+----------------+\n| 0 |\n+----------------+\n \nSELECT \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\');\n+----------------------------------+\n| \'wefwf\' IN (\'wee\',\'wefwf\',\'weg\') |\n+----------------------------------+\n| 1 |\n+----------------------------------+ \n \nType conversion:\n \nSELECT 1 IN (\'1\', \'2\', \'3\');\n+----------------------+\n| 1 IN (\'1\', \'2\', \'3\') |\n+----------------------+\n| 1 |\n+----------------------+\n \nSELECT NULL IN (1, 2, 3);\n+-------------------+\n| NULL IN (1, 2, 3) |\n+-------------------+\n| NULL |\n+-------------------+\n \nMariaDB [(none)]> SELECT 1 IN (1, 2, NULL);\n+-------------------+\n| 1 IN (1, 2, NULL) |\n+-------------------+\n| 1 |\n+-------------------+\n \nMariaDB [(none)]> SELECT 5 IN (1, 2, NULL);\n+-------------------+\n| 5 IN (1, 2, NULL) |\n+-------------------+\n| NULL |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/in/','','https://mariadb.com/kb/en/in/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (232,18,'INTERVAL','Syntax\n------ \nINTERVAL(N,N1,N2,N3,...)\n \nDescription\n----------- \nReturns the index of the last argument that is less than the\nfirst argument or is NULL. \n \nReturns 0 if N < N1, 1 if N < N2, 2 if N < N3 and so on or\n-1 if N is NULL. All\narguments are treated as integers. It is required that N1 <\nN2 < N3 \n\nURL: https://mariadb.com/kb/en/interval/','','https://mariadb.com/kb/en/interval/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (233,18,'IS','Syntax\n------ \nIS boolean_value\n \nDescription\n----------- \nTests a value against a boolean value, where boolean_value\ncan be\nTRUE, FALSE, or UNKNOWN.\n \nThere is an important difference between using IS TRUE or\ncomparing a value with TRUE using =. When using =, only 1\nequals to TRUE. But when using IS TRUE, all values which are\nlogically true (like a number > 1) return TRUE.\n \nExamples\n-------- \nSELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;\n+-----------+------------+-----------------+\n| 1 IS TRUE | 0 IS FALSE | NULL IS UNKNOWN |\n+-----------+------------+-----------------+\n| 1 | 1 | 1 |\n+-----------+------------+-----------------+\n \nDifference between = and IS TRUE:\n \nSELECT 2 = TRUE, 2 IS TRUE;\n+----------+-----------+\n| 2 = TRUE | 2 IS TRUE |\n+----------+-----------+\n| 0 | 1 |\n+----------+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/is/','','https://mariadb.com/kb/en/is/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (234,18,'IS NOT','Syntax\n------ \nIS NOT boolean_value\n \nDescription\n----------- \nTests a value against a boolean value, where boolean_value\ncan be\nTRUE, FALSE, or UNKNOWN. \n \nExamples\n-------- \nSELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT\nUNKNOWN;\n+------------------+------------------+---------------------+\n| 1 IS NOT UNKNOWN | 0 IS NOT UNKNOWN | NULL IS NOT UNKNOWN\n|\n+------------------+------------------+---------------------+\n| 1 | 1 | 0 |\n+------------------+------------------+---------------------+\n \nSELECT NULL IS NOT TRUE, NULL IS NOT FALSE;\n+------------------+-------------------+\n| NULL IS NOT TRUE | NULL IS NOT FALSE |\n+------------------+-------------------+\n| 1 | 1 |\n+------------------+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/is-not/','','https://mariadb.com/kb/en/is-not/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (235,18,'IS NOT NULL','Syntax\n------ \nIS NOT NULL\n \nDescription\n----------- \nTests whether a value is not NULL. See also NULL Values in\nMariaDB.\n \nExamples\n-------- \nSELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n+---------------+---------------+------------------+\n| 1 IS NOT NULL | 0 IS NOT NULL | NULL IS NOT NULL |\n+---------------+---------------+------------------+\n| 1 | 1 | 0 |\n+---------------+---------------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/is-not-null/','','https://mariadb.com/kb/en/is-not-null/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (236,18,'IS NULL','Syntax\n------ \nIS NULL\n \nDescription\n----------- \nTests whether a value is NULL. See also NULL Values in\nMariaDB.\n \nExamples\n-------- \nSELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;\n+-----------+-----------+--------------+\n| 1 IS NULL | 0 IS NULL | NULL IS NULL |\n+-----------+-----------+--------------+\n| 0 | 0 | 1 |\n+-----------+-----------+--------------+\n \nCompatibility\n \nSome ODBC applications use the syntax auto_increment_field\nIS NOT NULL to find the latest row that was inserted with an\nautogenerated key value. If your applications need this, you\ncan set the sql_auto_is_null variable to 1.\n \nSET @@sql_auto_is_null=1;\nCREATE TABLE t1 (auto_increment_column INT NOT NULL\nAUTO_INCREMENT PRIMARY KEY);\nINSERT INTO t1 VALUES (NULL);\nSELECT * FROM t1 WHERE auto_increment_column IS NULL;\n \n+-----------------------+\n| auto_increment_column |\n+-----------------------+\n| 1 |\n+-----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/is-null/','','https://mariadb.com/kb/en/is-null/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (237,18,'ISNULL','Syntax\n------ \nISNULL(expr)\n \nDescription\n----------- \nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n \nSee also NULL Values in MariaDB.\n \nExamples\n-------- \nSELECT ISNULL(1+1);\n+-------------+\n| ISNULL(1+1) |\n+-------------+\n| 0 |\n+-------------+\n \nSELECT ISNULL(1/0);\n+-------------+\n| ISNULL(1/0) |\n+-------------+\n| 1 |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/isnull/','','https://mariadb.com/kb/en/isnull/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (238,18,'LEAST','Syntax\n------ \nLEAST(value1,value2,...)\n \nDescription\n----------- \nWith two or more arguments, returns the smallest\n(minimum-valued)\nargument. The arguments are compared using the following\nrules:\nIf the return value is used in an INTEGER context or all\narguments are integer-valued, they are compared as integers.\nIf the return value is used in a REAL context or all\narguments are real-valued, they are compared as reals.\nIf any argument is a case-sensitive string, the arguments\nare compared as case-sensitive strings.\nIn all other cases, the arguments are compared as\ncase-insensitive strings.\n \nLEAST() returns NULL if any argument is NULL.\n \nExamples\n-------- \nSELECT LEAST(2,0);\n+------------+\n| LEAST(2,0) |\n+------------+\n| 0 |\n+------------+\n \nSELECT LEAST(34.0,3.0,5.0,767.0);\n+---------------------------+\n| LEAST(34.0,3.0,5.0,767.0) |\n+---------------------------+\n| 3.0 |\n+---------------------------+\n \nSELECT LEAST(\'B\',\'A\',\'C\');\n+--------------------+\n| LEAST(\'B\',\'A\',\'C\') |\n+--------------------+\n| A |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/least/','','https://mariadb.com/kb/en/least/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (239,18,'NOT BETWEEN','Syntax\n------ \nexpr NOT BETWEEN min AND max\n \nDescription\n----------- \nThis is the same as NOT (expr BETWEEN min AND max).\n \nNote that the meaning of the alternative form NOT expr\nBETWEEN min AND max is affected by the HIGH_NOT_PRECEDENCE\nSQL_MODE flag.\n \nExamples\n-------- \nSELECT 1 NOT BETWEEN 2 AND 3;\n+-----------------------+\n| 1 NOT BETWEEN 2 AND 3 |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT \'b\' NOT BETWEEN \'a\' AND \'c\';\n+-----------------------------+\n| \'b\' NOT BETWEEN \'a\' AND \'c\' |\n+-----------------------------+\n| 0 |\n+-----------------------------+\n \nNULL:\n \nSELECT 1 NOT BETWEEN 1 AND NULL;\n+--------------------------+\n| 1 NOT BETWEEN 1 AND NULL |\n+--------------------------+\n| NULL |\n+--------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-between/','','https://mariadb.com/kb/en/not-between/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (240,18,'NOT IN','Syntax\n------ \nexpr NOT IN (value,...)\n \nDescription\n----------- \nThis is the same as NOT (expr IN (value,...)).\n \nExamples\n-------- \nSELECT 2 NOT IN (0,3,5,7);\n+--------------------+\n| 2 NOT IN (0,3,5,7) |\n+--------------------+\n| 1 |\n+--------------------+\n \nSELECT \'wefwf\' NOT IN (\'wee\',\'wefwf\',\'weg\');\n+--------------------------------------+\n| \'wefwf\' NOT IN (\'wee\',\'wefwf\',\'weg\') |\n+--------------------------------------+\n| 0 |\n+--------------------------------------+\n \nSELECT 1 NOT IN (\'1\', \'2\', \'3\');\n+--------------------------+\n| 1 NOT IN (\'1\', \'2\', \'3\') |\n+--------------------------+\n| 0 |\n+--------------------------+\n \nNULL:\n \nSELECT NULL NOT IN (1, 2, 3);\n+-----------------------+\n| NULL NOT IN (1, 2, 3) |\n+-----------------------+\n| NULL |\n+-----------------------+\n \nSELECT 1 NOT IN (1, 2, NULL);\n+-----------------------+\n| 1 NOT IN (1, 2, NULL) |\n+-----------------------+\n| 0 |\n+-----------------------+\n \nSELECT 5 NOT IN (1, 2, NULL);\n+-----------------------+\n| 5 NOT IN (1, 2, NULL) |\n+-----------------------+\n| NULL |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-in/','','https://mariadb.com/kb/en/not-in/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (241,19,'Operator Precedence','The precedence is the order in which the SQL operators are\nevaluated.\n \nThe following list shows the SQL operator precedence.\nOperators that appear first in the list have a higher\nprecedence. Operators which are listed together have the\nsame precedence.\nINTERVAL\nBINARY, COLLATE\n!\n- (unary minus), [[bitwise-not|]] (unary bit inversion)\n|| (string concatenation)\n^\n*, /, DIV, %, MOD\n-, +\n \n&\n|\n= (comparison), , >=, >, \n\nURL: https://mariadb.com/kb/en/operator-precedence/','','https://mariadb.com/kb/en/operator-precedence/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (242,19,'&amp;','Syntax\n------ \n&\n \nDescription\n----------- \nBitwise AND. Converts the values to binary and compares\nbits. Only if both the corresponding bits are 1 is the\nresulting bit also 1.\n \nSee also bitwise OR.\n \nExamples\n-------- \nSELECT 2&1;\n+-----+\n| 2&1 |\n+-----+\n| 0 |\n+-----+\n \nSELECT 3&1;\n+-----+\n| 3&1 |\n+-----+\n| 1 |\n+-----+\n \nSELECT 29 & 15;\n+---------+\n| 29 & 15 |\n+---------+\n| 13 |\n+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise_and/','','https://mariadb.com/kb/en/bitwise_and/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (243,19,'&lt;&lt;','Syntax\n------ \nvalue1 \n\nURL: https://mariadb.com/kb/en/shift-left/','','https://mariadb.com/kb/en/shift-left/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (244,19,'&gt;&gt;','Syntax\n------ \nvalue1 >> value2\n \nDescription\n----------- \nConverts a longlong (BIGINT) number (value1) to binary and\nshifts value2 units to the right.\n \nExamples\n-------- \nSELECT 4 >> 2;\n+--------+\n| 4 >> 2 |\n+--------+\n| 1 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/shift-right/','','https://mariadb.com/kb/en/shift-right/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (245,19,'BIT_COUNT','Syntax\n------ \nBIT_COUNT(N)\n \nDescription\n----------- \nReturns the number of bits that are set in the argument N.\n \nExamples\n-------- \nSELECT BIT_COUNT(29), BIT_COUNT(b\'101010\');\n+---------------+----------------------+\n| BIT_COUNT(29) | BIT_COUNT(b\'101010\') |\n+---------------+----------------------+\n| 4 | 3 |\n+---------------+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bit_count/','','https://mariadb.com/kb/en/bit_count/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (246,19,'^','Syntax\n------ \n^\n \nDescription\n----------- \nBitwise XOR. Converts the values to binary and compares\nbits. If one (and only one) of the corresponding bits is 1\nis the resulting bit also 1.\n \nExamples\n-------- \nSELECT 1 ^ 1;\n+-------+\n| 1 ^ 1 |\n+-------+\n| 0 |\n+-------+\n \nSELECT 1 ^ 0;\n+-------+\n| 1 ^ 0 |\n+-------+\n| 1 |\n+-------+\n \nSELECT 11 ^ 3;\n+--------+\n| 11 ^ 3 |\n+--------+\n| 8 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise-xor/','','https://mariadb.com/kb/en/bitwise-xor/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (247,19,'|','Syntax\n------ \n|\n \nDescription\n----------- \nBitwise OR. Converts the values to binary and compares bits.\nIf either of the corresponding bits has a value of 1, the\nresulting bit is also 1.\n \nSee also bitwise AND.\n \nExamples\n-------- \nSELECT 2|1;\n+-----+\n| 2|1 |\n+-----+\n| 3 |\n+-----+\n \nSELECT 29 | 15;\n+---------+\n| 29 | 15 |\n+---------+\n| 31 |\n+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise-or/','','https://mariadb.com/kb/en/bitwise-or/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (248,19,'~','Syntax\n------ \n~\n \nDescription\n----------- \nBitwise NOT. Converts the value to 4 bytes binary and\ninverts all bits.\n \nExamples\n-------- \nSELECT 3 & ~1;\n+--------+\n| 3 & ~1 |\n+--------+\n| 2 |\n+--------+\n \nSELECT 5 & ~1;\n+--------+\n| 5 & ~1 |\n+--------+\n| 4 |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bitwise-not/','','https://mariadb.com/kb/en/bitwise-not/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (249,19,'Parentheses','Parentheses are sometimes called precedence operators - this\nmeans that they can be used to change the other operator\'s\nprecedence in an expression. The expressions that are\nwritten between parentheses are computed before the\nexpressions that are written outside. Parentheses must\nalways contain an expression (that is, they cannot be\nempty), and can be nested.\n \nFor example, the following expressions could return\ndifferent results:\nNOT a OR b\nNOT (a OR b)\n \nIn the first case, NOT applies to a, so if a is FALSE or b\nis TRUE, the expression returns TRUE. In the second case,\nNOT applies to the result of a OR b, so if at least one of a\nor b is TRUE, the expression is TRUE.\n \nWhen the precedence of operators is not intuitive, you can\nuse parentheses to make it immediately clear for whoever\nreads the statement.\n \nThe precedence of the NOT operator can also be affected by\nthe HIGH_NOT_PRECEDENCE SQL_MODE flag.\n \nOther uses\n \nParentheses must always be used to enclose subqueries.\n \nParentheses can also be used in a JOIN statement between\nmultiple tables to determine which tables must be joined\nfirst.\n \nAlso, parentheses are used to enclose the list of parameters\nto be passed to built-in functions, user-defined functions\nand stored routines. However, when no parameter is passed to\na stored procedure, parentheses are optional. For builtin\nfunctions and user-defined functions, spaces are not allowed\nbetween the function name and the open parenthesis, unless\nthe IGNORE_SPACE SQL_MODE is set. For stored routines (and\nfor functions if IGNORE_SPACE is set) spaces are allowed\nbefore the open parenthesis, including tab characters and\nnew line characters.\n \nSyntax errors\n \nIf there are more open parentheses than closed parentheses,\nthe error usually looks like this:\n \nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that\ncorresponds to your MariaDB server version for the right\nsyntax to use near \'\' a\nt line 1\n \nNote the empty string.\n \nIf there are more closed parentheses than open parentheses,\nthe error usually looks like this:\n \nERROR 1064 (42000): You have an error in your SQL syntax;\ncheck the manual that\ncorresponds to your MariaDB server version for the right\nsyntax to use near \')\'\nat line 1\n \nNote the quoted closed parenthesis.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/parentheses/','','https://mariadb.com/kb/en/parentheses/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (250,19,'TRUE FALSE','Description\n----------- \nThe constants TRUE and FALSE evaluate to 1 and 0,\nrespectively. The\nconstant names can be written in any lettercase.\n \nExamples\n-------- \nSELECT TRUE, true, FALSE, false;\n \n+------+------+-------+-------+\n| TRUE | TRUE | FALSE | FALSE |\n+------+------+-------+-------+\n| 1 | 1 | 0 | 0 |\n+------+------+-------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/true-false/','','https://mariadb.com/kb/en/true-false/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (251,20,'ANALYZE TABLE','Syntax\n------ \nANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE tbl_name\n[,tbl_name ...] \n [PERSISTENT FOR [ALL|COLUMNS ([col_name [,col_name ...]])] \n [INDEXES ([index_name [,index_name ...]])]] \n \nDescription\n----------- \nANALYZE TABLE analyzes and stores the key distribution for a\ntable (index statistics). During the analysis, the table is\nlocked with a read lock. This statement works with MyISAM,\nAria and InnoDB tables. For MyISAM tables, this statement is\nequivalent\nto using myisamchk --analyze.\n \nFor more information on how the analysis works within\nInnoDB, see\nInnoDB Limitations.\n \nMariaDB uses the stored key distribution to decide the order\nin which\ntables should be joined when you perform a join on something\nother than\na constant. In addition, key distributions can be used when\ndeciding\nwhich indexes to use for a specific table within a query.\n \nThis statement requires SELECT and INSERT privileges for the\ntable.\n \nBy default, ANALYZE TABLE statements are written to the\nbinary log and will be replicated. The NO_WRITE_TO_BINLOG\nkeyword (LOCAL is an alias) will ensure the statement is not\nwritten to the binary log. \n \nANALYZE TABLE is also supported for partitioned tables. You\ncan use ALTER TABLE ... ANALYZE PARTITION to analyze one or\nmore partitions.\n \nThe Aria storage engine supports progress reporting for the\nANALYZE TABLE statement.\n \nEngine-Independent Statistics\n \nIn MariaDB 10.0 and later, ANALYZE TABLE supports\nengine-independent statistics. See Engine-Independent Table\nStatistics: Collecting Statistics with the ANALYZE TABLE\nStatement for more information.\n \n\n\nURL: https://mariadb.com/kb/en/analyze-table/','','https://mariadb.com/kb/en/analyze-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (252,20,'CHECK TABLE','Syntax\n------ \nCHECK TABLE tbl_name [, tbl_name] ... [option] ...\n \noption = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED |\nCHANGED}\n \nDescription\n----------- \nCHECK TABLE checks a table or tables for errors. CHECK TABLE\nworks for\nArchive, Aria, CSV, InnoDB, and MyISAM tables. For Aria and\nMyISAM tables, the\nkey statistics are updated as well. For CSV, see also\nChecking and Repairing CSV Tables.\n \nAs an alternative, myisamchk is a commandline tool for\nchecking MyISAM tables when the tables are not being\naccessed.\n \nFor checking dynamic columns integrity, COLUMN_CHECK() can\nbe used.\n \nCHECK TABLE can also check views for problems, such as\ntables\nthat are referenced in the view definition that no longer\nexist.\n \nCHECK TABLE is also supported for partitioned tables. You\ncan\nuse ALTER TABLE ... CHECK PARTITION \nto check one or more partitions.\n \nThe meaning of the different options are as follows - note\nthat this can vary a bit between\nstorage engines:\n \nFOR UPGRADE | Do a very quick check if the storage format\nfor the table has changed so that one needs to do a REPAIR.\nThis is only needed when one upgrades between major versions\nof MariaDB or MySQL. This is usually done by running\nmysql_upgrade. | \n \nFAST | Only check tables that has not been closed properly\nor are marked as corrupt. Only supported by the MyISAM and\nAria engines. For other engines the table is checked\nnormally | \n \nCHANGED | Check only tables that has changed since last\nREPAIR / CHECK. Only supported by the MyISAM and Aria\nengines. For other engines the table is checked normally. | \n \nQUICK | Do a fast check. For MyISAM and Aria engine this\nmeans we skip checking the delete link chain which may take\nsome time. | \n \nMEDIUM | Scan also the data files. Checks integrity between\ndata and index files with checksums. In most cases this\nshould find all possible errors. | \n \nEXTENDED | Does a full check to verify every possible error.\nFor MyISAM and Aria we verify for each row that all it keys\nexists and points to the row. This may take a long time on\nbig tables! | \n \nFor most cases running CHECK TABLE without options or MEDIUM\nshould be\ngood enough.\n \nSince MariaDB 5.3, the Aria storage engine supports progress\nreporting for this statement.\n \nIf you want to know if two tables are identical, take a look\nat CHECKSUM TABLE.\n \nXtraDB/InnoDB\n \nIf CHECK TABLE finds an error in an InnoDB table, MariaDB\nmight shutdown to prevent the error propagation. In this\ncase, the problem will be reported in the error log.\nOtherwise, since MariaDB 5.5, the table or an index might be\nmarked as corrupted, to prevent use. This does not happen\nwith some minor problems, like a wrong number of entries in\na secondary index. Those problems are reported in the output\nof CHECK TABLE.\n \nEach tablespace contains a header with metadata. This header\nis not checked by this statement.\n \nDuring the execution of CHECK TABLE, other threads may be\nblocked.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sql-commands-check-table/','','https://mariadb.com/kb/en/sql-commands-check-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (253,20,'CHECK VIEW','CHECK VIEW was introduced in MariaDB 10.0.18.\n \nSyntax\n------ \nCHECK VIEW view_name\n \nDescription\n----------- \nThe CHECK VIEW statement was introduced in MariaDB 10.0.18\nto assist with fixing MDEV-6916, an issue introduced in\nMariaDB 5.2 where the view algorithms were swapped. It\nchecks whether the view algorithm is correct. It is run as\npart of mysql_upgrade, and should not normally be required\nin regular use.\n \n\n\nURL: https://mariadb.com/kb/en/check-view/','','https://mariadb.com/kb/en/check-view/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (254,20,'','URL: https://mariadb.com/kb/en/checksum-table/','','https://mariadb.com/kb/en/checksum-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (255,20,'OPTIMIZE TABLE','Syntax\n------ \nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [WAIT n | NOWAIT]\n \nDescription\n----------- \nOPTIMIZE TABLE has two main functions. It can either be used\nto defragment tables, or to update the InnoDB fulltext\nindex.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nDefragmenting\n \nOPTIMIZE TABLE works for InnoDB (before MariaDB 10.1.1, only\nif the innodb_file_per_table server system variable is set),\nAria, MyISAM and ARCHIVE tables, and should be used if you\nhave deleted a large part of a table or if you have made\nmany changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT\ncolumns). Deleted rows are maintained in a\nlinked list and subsequent INSERT operations reuse old row\npositions.\n \nThis statement requires SELECT and INSERT privileges for the\ntable.\n \nBy default, OPTIMIZE TABLE statements are written to the\nbinary log and will be replicated. The NO_WRITE_TO_BINLOG\nkeyword (LOCAL is an alias) will ensure the statement is not\nwritten to the binary log. \n \nOPTIMIZE TABLE is also supported for partitioned tables. You\ncan use \nALTER TABLE ... OPTIMIZE PARTITION \nto optimize one or more partitions.\n \nYou can use OPTIMIZE TABLE to reclaim the unused\nspace and to defragment the data file. With other storage\nengines, OPTIMIZE TABLE does nothing by default, and returns\nthis message: \" The storage engine for the table doesn\'t\nsupport optimize\". However, if the server has been started\nwith the --skip-new option, OPTIMIZE TABLE is linked to\nALTER TABLE, and recreates the table. This operation frees\nthe unused space and updates index statistics.\n \nSince MariaDB 5.3, the Aria storage engine supports progress\nreporting for this statement.\n \nIf a MyISAM table is fragmented, concurrent inserts will not\nbe performed until an OPTIMIZE TABLE statement is executed\non that table, unless the concurrent_insert server system\nvariable is set to ALWAYS.\n \nUpdating an InnoDB fulltext index\n \nWhen rows are added or deleted to an InnoDB fulltext index,\nthe index is not immediately re-organized, as this can be an\nexpensive operation. Change statistics are stored in a\nseparate location . The fulltext index is only fully\nre-organized when an OPTIMIZE TABLE statement is run.\n \nBy default, an OPTIMIZE TABLE will defragment a table. In\norder to use it to update fulltext index statistics, the\ninnodb_optimize_fulltext_only system variable must be set to\n1. This is intended to be a temporary setting, and should be\nreset to 0 once the fulltext index has been re-organized.\n \nSince fulltext re-organization can take a long time, the\ninnodb_ft_num_word_optimize variable limits the\nre-organization to a number of words (2000 by default). You\ncan run multiple OPTIMIZE statements to fully re-organize\nthe index.\n \nDefragmenting InnoDB tablespaces\n \nMariaDB 10.1.1 merged the Facebook/Kakao defragmentation\npatch \n \nMariaDB 10.1.1 merged the Facebook/Kakao defragmentation\npatch, allowing one to use OPTIMIZE TABLE to defragment\nInnoDB tablespaces. For this functionality to be enabled,\nthe innodb_defragment system variable must be enabled. No\nnew tables are created and there is no need to copy data\nfrom old tables to new tables. Instead, this feature loads n\npages (determined by innodb-defragment-n-pages) and tries to\nmove records so that pages would be full of records and then\nfrees pages that are fully empty after the operation. Note\nthat tablespace files (including ibdata1) will not shrink as\nthe result of defragmentation, but one will get better\nmemory utilization in the InnoDB buffer pool as there are\nfewer data pages in use.\n \nSee Defragmenting InnoDB Tablespaces for more details.\n \n\n\nURL: https://mariadb.com/kb/en/optimize-table/','','https://mariadb.com/kb/en/optimize-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (256,20,'REPAIR TABLE','Syntax\n------ \nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n tbl_name [, tbl_name] ...\n [QUICK] [EXTENDED] [USE_FRM]\n \nDescription\n----------- \nREPAIR TABLE repairs a possibly corrupted table. By default,\nit has the same effect as\n \nmyisamchk --recover tbl_name\n \nor\n \naria_chk --recover tbl_name\n \nSee aria_chk and myisamchk for more.\n \nREPAIR TABLE works for Archive, Aria, CSV and MyISAM tables.\nFor XtraDB/InnoDB, see recovery modes. For CSV, see also\nChecking and Repairing CSV Tables. For Archive, this\nstatement also improves compression. If the storage engine\ndoes not support this statement, a warning is issued.\n \nThis statement requires SELECT and INSERT privileges for the\ntable.\n \nBy default, REPAIR TABLE statements are written to the\nbinary log and will be replicated. The NO_WRITE_TO_BINLOG\nkeyword (LOCAL is an alias) will ensure the statement is not\nwritten to the binary log.\n \nWhen an index is recreated, the storage engine may use a\nconfigurable buffer in the process. Incrementing the buffer\nspeeds up the index creation. Aria and MyISAM allocate a\nbuffer whose size is defined by aria_sort_buffer_size or\nmyisam_sort_buffer_size, also used for ALTER TABLE.\n \nREPAIR TABLE is also supported for partitioned tables.\nHowever, the USE_FRM option cannot be used with this\nstatement\non a partitioned table.\n \n ALTER TABLE ... REPAIR PARTITION can be used\nto repair one or more partitions.\n \nThe Aria storage engine supports progress reporting for this\nstatement.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/repair-table/','','https://mariadb.com/kb/en/repair-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (257,20,'REPAIR VIEW','REPAIR VIEW was introduced in MariaDB 10.0.18 and MariaDB\n5.5.43.\n \nSyntax\n------ \nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] VIEW view_name[,\nview_name] ... [FROM MYSQL]\n \nDescription\n----------- \nThe REPAIR VIEW statement was introduced to assist with\nfixing MDEV-6916, an issue introduced in MariaDB 5.2 where\nthe view algorithms were swapped compared to their MySQL on\ndisk representation. It checks whether the view algorithm is\ncorrect. It is run as part of mysql_upgrade, and should not\nnormally be required in regular use.\n \nBy default it corrects the checksum and if necessary adds\nthe mariadb-version field. If the optional FROM MYSQL clause\nis used, and no mariadb-version field is present, the MERGE\nand TEMPTABLE algorithms are toggled.\n \nBy default, REPAIR VIEW statements are written to the binary\nlog and will be replicated. The NO_WRITE_TO_BINLOG keyword\n(LOCAL is an alias) will ensure the statement is not written\nto the binary log.\n \nNote that REPAIR VIEW in MariaDB 10.0.18 and MariaDB 5.5.43\ncould crash the server (see MDEV-8115). Upgrade to a later\nversion.\n \n\n\nURL: https://mariadb.com/kb/en/repair-view/','','https://mariadb.com/kb/en/repair-view/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (258,21,'CREATE FUNCTION UDF','Syntax\n------ \nCREATE [OR REPLACE] [AGGREGATE] FUNCTION [IF NOT EXISTS]\nfunction_name\n RETURNS {STRING|INTEGER|REAL|DECIMAL}\n SONAME shared_library_name\n \nDescription\n----------- \nA user-defined function (UDF) is a way to extend MariaDB\nwith a new function\nthat works like a native (built-in) MariaDB function such as\nABS() or\nCONCAT().\n \nfunction_name is the name that should be used in SQL\nstatements to invoke\nthe function. \n \nTo create a function, you must have the INSERT privilege for\nthe\nmysql database. This is necessary because CREATE FUNCTION\nadds a row to the\nmysql.func system table that records the function\'s name,\ntype, and shared library name. If you do not have this\ntable, you should run\nthe mysql_upgrade command to create it.\n \nUDFs need to be written in C, C++ or another language that\nuses C calling\nconventions, MariaDB needs to have been dynamically\ncompiled, and your\noperating system must support dynamic loading.\n \nFor an example, see sql/udf_example.cc in the source tree.\nFor a collection of existing UDFs see\nhttp://www.mysqludf.org/.\n \nStatements making use of user-defined functions are not\nsafe for replication.\n \nFor creating a stored function as opposed to a user-defined\nfunction, see\nCREATE FUNCTION.\n \nFor valid identifiers to use as function names, see\nIdentifier Names.\n \nRETURNS\n \nThe RETURNS clause indicates the type of the function\'s\nreturn value, and can be one of STRING, INTEGER, REAL or\nDECIMAL. DECIMAL functions currently return string values\nand should be written like STRING functions.\n \nshared_library_name\n \nshared_library_name is the basename of the shared object\nfile that contains\nthe code that implements the function. The file must be\nlocated in the plugin\ndirectory. This directory is given by the value of the\nplugin_dir system variable. Note that\nbefore MariaDB/MySQL 5.1, the shared object could be located\nin any directory\nthat was searched by your system\'s dynamic linker.\n \nAGGREGATE\n \nAggregate functions are summary functions such as SUM() and\nAVG().\n \nAggregate UDF functions can be used as window functions.\n \nOR REPLACE\n \nThe OR REPLACE clause was added in MariaDB 10.1.3\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP FUNCTION IF EXISTS function_name;\n \nCREATE FUNCTION name ...;\n \nIF NOT EXISTS\n \nThe IF NOT EXISTS clause was added in MariaDB 10.1.3\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified function\nalready exists. Cannot be used together with OR REPLACE.\n \nUpgrading a UDF\n \nTo upgrade the UDF\'s shared library, first run a\nDROP FUNCTION statement, then upgrade the shared library and\nfinally run the CREATE FUNCTION statement. If you upgrade\nwithout following\nthis process, you may crash the server.\n \nExamples\n-------- \nCREATE FUNCTION jsoncontains_path RETURNS integer SONAME\n\'ha_connect.so\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE FUNCTION jsoncontains_path RETURNS integer SONAME\n\'ha_connect.so\';\n \nERROR 1125 (HY000): Function \'jsoncontains_path\' already\nexists\n \nCREATE OR REPLACE FUNCTION jsoncontains_path RETURNS integer\nSONAME \'ha_connect.so\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE FUNCTION IF NOT EXISTS jsoncontains_path RETURNS\ninteger SONAME \'ha_connect.so\';\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+---------------------------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------------------------+\n| Note | 1125 | Function \'jsoncontains_path\' already\nexists |\n+-------+------+---------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-function-udf/','','https://mariadb.com/kb/en/create-function-udf/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (259,21,'DROP FUNCTION UDF','Syntax\n------ \nDROP FUNCTION [IF EXISTS] function_name\n \nDescription\n----------- \nThis statement drops the user-defined function (UDF) named\nfunction_name.\n \nTo drop a function, you must have the DELETE privilege for\nthe mysql database. This is because DROP FUNCTION removes\nthe row from the mysql.func system table that records the\nfunction\'s name, type and shared library name.\n \nFor dropping a stored function, see DROP FUNCTION.\n \nUpgrading a UDF\n \nTo upgrade the UDF\'s shared library, first run a DROP\nFUNCTION statement, then upgrade the shared library and\nfinally run the CREATE FUNCTION statement. If you upgrade\nwithout following this process, you may crash the server.\n \nExamples\n-------- \nDROP FUNCTION jsoncontains_path;\n \nIF EXISTS:\n \nDROP FUNCTION jsoncontains_path;\n \nERROR 1305 (42000): FUNCTION test.jsoncontains_path does not\nexist\n \nDROP FUNCTION IF EXISTS jsoncontains_path;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------------------+\n| Note | 1305 | FUNCTION test.jsoncontains_path does not\nexist |\n+-------+------+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/drop-function-udf/','','https://mariadb.com/kb/en/drop-function-udf/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (260,21,'Creating User-Defined Functions','User-defined functions allow MariaDB to be extended with a\nnew function that works like a native (built-in) MariaDB\nfunction such as ABS() or CONCAT(). There are alternative\nways to add a new function: writing a native function (which\nrequires modifying and compiling the server source code), or\nwriting a stored function.\n \nStatements making use of user-defined functions are not safe\nfor replication.\n \nFunctions are written in C or C++, and to make use of them,\nthe operating system must support dynamic loading. \n \nEach new SQL function requires corresponding functions\nwritten in C/C++. In the list below, at least the main\nfunction - x() - and one other, are required. x should be\nreplaced by the name of the function you are creating.\n \nAll functions need to be thread-safe, so not global or\nstatic variables that change can be allocated. Memory is\nallocated in x_init()/ and freed in x_deinit(). \n \nSimple Functions\n \nx()\n \nRequired for all UDF\'s, this is where the results are\ncalculated.\n \nC/C++ type | SQL type | \n \nchar * | STRING | \n \nlong long | INTEGER | \n \ndouble | REAL | \n \nDECIMAL functions return string values, and so should be\nwritten accordingly. It is not possible to create ROW\nfunctions.\n \nx_init()\n \nInitialization function for x(). Can be used for the\nfollowing:\nCheck the number of arguments to X() (the SQL equivalent).\nVerify the argument types, or to force arguments to be of a\nparticular type after the function is called.\nSpecify whether the result can be NULL.\nSpecify the maximum result length.\nFor REAL functions, specify the maximum number of decimals\nfor the result.\nAllocate any required memory.\n To verify that the arguments are of a required type or,\nalternatively, to tell MySQL to coerce arguments to the\nrequired types when the main function is called.\n \nx_deinit()\n \nDe-initialization function for x(). Used to de-allocate\nmemory that was allocated in x_init().\n \nDescription\n----------- \nEach time the SQL function X() is called:\nMariaDB will first call the C/C++ initialization function,\nx_init(), assuming it exists. All setup will be performed,\nand if it returns an error, the SQL statement is aborted and\nno further functions are called.\nIf there is no x_init() function, or it has been called and\ndid not return an error, x() is then called once per row.\nAfter all rows have finished processing, x_deinit() is\ncalled, if present, to clean up by de-allocating any memory\nthat was allocated in x_init().\nSee User-defined Functions Calling Sequences for more\ndetails on the functions.\n \nAggregate Functions\n \nThe following functions are required for aggregate\nfunctions, such as AVG() and SUM(). \n \nx_clear()\n \nUsed to reset the current aggregate, but without inserting\nthe argument as the initial aggregate value for the new\ngroup.\n \nx_add()\n \nUsed to add the argument to the current aggregate. \n \nx_remove()\n \nStaring from MariaDB 10.4 it improves the support of window\nfunctions (so it is not obligatory to add it) and should\nremove the argument from the current aggregate.\n \nDescription\n----------- \nEach time the aggregate SQL function X() is called:\nMariaDB will first call the C/C++ initialization function,\nx_init(), assuming it exists. All setup will be performed,\nand if it returns an error, the SQL statement is aborted and\nno further functions are called.\nIf there is no x_init() function, or it has been called and\ndid not return an error, x() is then called once per row.\nAfter all rows have finished processing, x_deinit() is\ncalled, if present, to clean up by de-allocating any memory\nthat was allocated in x_init().\n \nMariaDB will first call the C/C++ initialization function,\nx_init(), assuming it exists. All setup will be performed,\nand if it returns an error, the SQL statement is aborted and\nno further functions are called.\nThe table is sorted according to the GROUP BY expression.\nx_clear() is called for the first row of each new group.\nx_add() is called once per row for each row in the same\ngroup.\nx() is called when the group changes, or after the last row,\nto get the aggregate result. \nThe latter three steps are repeated until all rows have been\nprocessed.\nAfter all rows have finished processing, x_deinit() is\ncalled, if present, to clean up by de-allocating any memory\nthat was allocated in x_init().\n \nExamples\n-------- \nFor an example, see sql/udf_example.cc in the source tree.\nFor a collection of existing UDFs see\nhttps://github.com/mysqludf.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/creating-user-defined-functions/','','https://mariadb.com/kb/en/creating-user-defined-functions/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (261,21,'User-Defined Functions Calling Sequences','The functions described in Creating User-defined Functions\nare expanded on this page. They are declared as follows:\n \nSimple Functions\n \nx()\n \nIf x() returns an integer, it is declared as follows:\n \nlong long x(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nIf x() returns a string (DECIMAL functions also return\nstring values), it is declared as follows:\n \nchar *x(UDF_INIT *initid, UDF_ARGS *args,\n char *result, unsigned long *length,\n char *is_null, char *error);\n \nIf x() returns a real, it is declared as follows:\n \ndouble x(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nx_init()\n \nmy_bool x_init(UDF_INIT *initid, UDF_ARGS *args, char\n*message);\n \nx_deinit()\n \nvoid x_deinit(UDF_INIT *initid);\n \nDescription\n----------- \ninitid is a parameter passed to all three functions that\npoints to a UDF_INIT structure, used for communicating\ninformation between the functions. Its structure members\nare:\nmy_bool maybe_null\nmaybe_null should be set to 1 if x_init can return a NULL\nvalue, Defaults to 1 if any arguments are declared\nmaybe_null.\n \nunsigned int decimals\nNumber of decimals after the decimal point. The default, if\nan explicit number of decimals is passed in the arguments to\nthe main function, is the maximum number of decimals, so if\n9.5, 9.55 and 9.555 are passed to the function, the default\nwould be three (based on 9.555, the maximum). If there are\nno explicit number of decimals, the default is set to 31, or\none more than the maximum for the DOUBLE, FLOAT and DECIMAL\ntypes. This default can be changed in the function to suit\nthe actual calculation.\n \nunsigned int max_length\nMaximum length of the result. For integers, the default is\n21. For strings, the length of the longest argument. For\nreals, the default is 13 plus the number of decimals\nindicated by initid->decimals. The length includes any signs\nor decimal points. Can also be set to 65KB or 16MB in order\nto return a BLOB. The memory remains unallocated, but this\nis used to decide on the data type to use if the data needs\nto be temporarily stored.\n \nchar *ptr\nA pointer for use as required by the function. Commonly,\ninitid->ptr is used to communicate allocated memory, with\nx_init() allocating the memory and assigning it to this\npointer, x() using it, and x_deinit() de-allocating it.\n \nmy_bool const_item\nShould be set to 1 in x_init() if x() always returns the\nsame value, otherwise 0.\n \n\nAggregate Functions\n \nx_clear()\n \nx_clear() is a required function for aggregate functions,\nand is declared as follows:\n \nvoid x_clear(UDF_INIT *initid, char *is_null, char *error);\n \nIt is called when the summary results need to be reset, that\nis at the beginning of each new group. but also to reset the\nvalues when there were no matching rows.\n \nis_null is set to point to CHAR(0) before calling x_clear().\n \nIn the case of an error, you can store the value to which\nthe error argument points (a single-byte variable, not a\nstring string buffer) in the variable.\n \nx_reset()\n \nx_reset() is declared as follows:\n \nvoid x_reset(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nIt is called on finding the first row in a new group. Should\nreset the summary variables, and then use UDF_ARGS as the\nfirst value in the group\'s internal summary value. The\nfunction is not required if the UDF interface uses\nx_clear().\n \nx_add()\n \nx_add() is declared as follows:\n \nvoid x_add(UDF_INIT *initid, UDF_ARGS *args,\n char *is_null, char *error);\n \nIt is called for all rows belonging to the same group, and\nshould be used to add the value in UDF_ARGS to the internal\nsummary variable.\n \nx_remove()\n \nx_remove() was added in MariaDB 10.4 and is declared as\nfollows (same as x_add()):\n \nvoid x_remove(UDF_INIT* initid, UDF_ARGS* args,\n char* is_null, char *error );\n \nIt adds more efficient support of aggregate UDFs as window\nfunctions. x_remove() should \"subtract\" the row (reverse\nx_add()). In MariaDB 10.4 aggregate UDFs will work as WINDOW\nfunctions without x_remove() but it will not be so\nefficient.\n \nIf x_remove() supported (defined) detected automatically.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/user-defined-functions-calling-sequences/','','https://mariadb.com/kb/en/user-defined-functions-calling-sequences/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (262,21,'User-Defined Functions Security','The MariaDB server imposes a number of limitations on\nuser-defined functions for security purposes.\nThe INSERT privilege for the mysql database is required to\nrun CREATE FUNCTION, as a record will be added to the\nmysql.func-table.\nThe DELETE privilege for the mysql database is required to\nrun DROP FUNCTION as the corresponding record will be\nremoved from the mysql.func-table.\nUDF object files can only be placed in the plugin directory,\nas specified by the value of the plugin_dir system variable.\nAt least one symbol, beyond the required x() - corresponding\nto an SQL function X()) - is required. These can be\nx_init(), x_deinit(), xxx_reset(), x_clear() and x_add()\nfunctions (see Creating User-defined Functions). The\nallow-suspicious-udfs mysqld option (by default unset)\nprovides a workaround, permitting only one symbol to be\nused. This is not recommended, as it opens the possibility\nof loading shared objects that are not legitimate\nuser-defined functions.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/user-defined-functions-security/','','https://mariadb.com/kb/en/user-defined-functions-security/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (263,21,'mysql.func Table','The mysql.func table stores information about user-defined\nfunctions (UDFs) created with the CREATE FUNCTION UDF\nstatement.\n \nIn MariaDB 10.4 and later, this table uses the Aria storage\nengine.\n \nMariaDB until 10.3\n \nIn MariaDB 10.3 and before, this table uses the MyISAM\nstorage engine.\n \nThe mysql.func table contains the following fields:\n \nField | Type | Null | Key | Default | Description | \n \nname | char(64) | NO | PRI | | UDF name | \n \nret | tinyint(1) | NO | | 0 | | \n \ndl | char(128) | NO | | | Shared library name | \n \ntype | enum(\'function\',\'aggregate\') | NO | | NULL |\nType, either function or aggregate. Aggregate functions are\nsummary functions such as SUM() and AVG(). | \n \nExample\n \nSELECT * FROM mysql.func;\n+------------------------------+-----+--------------+-----------+\n| name | ret | dl | type |\n+------------------------------+-----+--------------+-----------+\n| spider_direct_sql | 2 | ha_spider.so | function |\n| spider_bg_direct_sql | 2 | ha_spider.so | aggregate |\n| spider_ping_table | 2 | ha_spider.so | function |\n| spider_copy_tables | 2 | ha_spider.so | function |\n| spider_flush_table_mon_cache | 2 | ha_spider.so | function\n|\n+------------------------------+-----+--------------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mysqlfunc-table/','','https://mariadb.com/kb/en/mysqlfunc-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (264,22,'AUTO_INCREMENT','Description\n----------- \nThe AUTO_INCREMENT attribute can be used to generate a\nunique identity for new rows. When you insert a new record\nto the table, and the auto_increment field is NULL or\nDEFAULT, the value will automatically be incremented. This\nalso applies to 0, unless the NO_AUTO_VALUE_ON_ZERO SQL_MODE\nis enabled.\n \nAUTO_INCREMENT columns start from 1 by default. The\nautomatically generated value can never be lower than 0.\n \nEach table can have only one AUTO_INCREMENT column. It must\ndefined as a key (not necessarily the PRIMARY KEY or UNIQUE\nkey). In some storage engines (including the default\nInnoDB), if the key consists of multiple columns, the\nAUTO_INCREMENT column must be the first column. Storage\nengines that permit the column to be placed elsewhere are\nAria, MyISAM, MERGE, Spider, TokuDB, BLACKHOLE, FederatedX\nand Federated.\n \nCREATE TABLE animals (\n id MEDIUMINT NOT NULL AUTO_INCREMENT,\n name CHAR(30) NOT NULL,\n PRIMARY KEY (id)\n );\n \nINSERT INTO animals (name) VALUES\n (\'dog\'),(\'cat\'),(\'penguin\'),\n (\'fox\'),(\'whale\'),(\'ostrich\');\n \nSELECT * FROM animals;\n \n+----+---------+\n| id | name |\n+----+---------+\n| 1 | dog |\n| 2 | cat |\n| 3 | penguin |\n| 4 | fox |\n| 5 | whale |\n| 6 | ostrich |\n+----+---------+\n \nSERIAL is an alias for BIGINT UNSIGNED NOT NULL\nAUTO_INCREMENT UNIQUE.\n \nCREATE TABLE t (id SERIAL, c CHAR(1)) ENGINE=InnoDB;\n \nSHOW CREATE TABLE t \\G\n*************************** 1. row\n***************************\n Table: t\nCreate Table: CREATE TABLE `t` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `c` char(1) DEFAULT NULL,\n UNIQUE KEY `id` (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nSetting or Changing the Auto_Increment Value\n \nYou can use an ALTER TABLE statement to assign a new value\nto the auto_increment table option, or set the insert_id\nserver system variable to change the next AUTO_INCREMENT\nvalue inserted by the current session.\n \nLAST_INSERT_ID() can be used to see the last AUTO_INCREMENT\nvalue inserted by the current session.\n \nALTER TABLE animals AUTO_INCREMENT=8;\n \nINSERT INTO animals (name) VALUES (\'aardvark\');\n \nSELECT * FROM animals;\n \n+----+-----------+\n| id | name |\n+----+-----------+\n| 1 | dog |\n| 2 | cat |\n| 3 | penguin |\n| 4 | fox |\n| 5 | whale |\n| 6 | ostrich |\n| 8 | aardvark |\n+----+-----------+\n \nSET insert_id=12;\n \nINSERT INTO animals (name) VALUES (\'gorilla\');\n \nSELECT * FROM animals;\n \n+----+-----------+\n| id | name |\n+----+-----------+\n| 1 | dog |\n| 2 | cat |\n| 3 | penguin |\n| 4 | fox |\n| 5 | whale |\n| 6 | ostrich |\n| 8 | aardvark |\n| 12 | gorilla |\n+----+-----------+\n \nInnoDB/XtraDB\n \nUntil MariaDB 10.2.3, InnoDB and XtraDB used an\nauto-increment counter that is stored in memory. When the\nserver restarts, the counter is re-initialized to the\nhighest value used in the table, which cancels the effects\nof any AUTO_INCREMENT = N option in the table statements.\n \nFrom MariaDB 10.2.4, this restriction has been lifted and\nAUTO_INCREMENT is persistent.\n \nSee also AUTO_INCREMENT Handling in XtraDB/InnoDB.\n \nSetting Explicit Values\n \nIt is possible to specify a value for an AUTO_INCREMENT\ncolumn. The value must not exist in the key.\n \nIf the new value is higher than the current maximum value,\nthe AUTO_INCREMENT value is updated, so the next value will\nbe higher. If the new value is lower than the current\nmaximum value, the AUTO_INCREMENT value remains unchanged.\n \nThe following example demonstrates these behaviours:\n \nCREATE TABLE t (id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY\nKEY) ENGINE = InnoDB;\n \nINSERT INTO t VALUES (NULL);\nSELECT id FROM t;\n \n+----+\n| id |\n+----+\n| 1 |\n+----+\n \nINSERT INTO t VALUES (10); -- higher value\nSELECT id FROM t;\n \n+----+\n| id |\n+----+\n| 1 |\n| 10 |\n+----+\n \nINSERT INTO t VALUES (2); -- lower value\nINSERT INTO t VALUES (NULL); -- auto value\nSELECT id FROM t;\n \n+----+\n| id |\n+----+\n| 1 |\n| 2 |\n| 10 |\n| 11 |\n+----+\n \nThe ARCHIVE storage engine does not allow to insert a value\nthat is lower than the current maximum.\n \nMissing Values\n \nAn AUTO_INCREMENT column normally has missing values. This\nhappens because if a row is deleted, or an AUTO_INCREMENT\nvalue is explicitly updated, old values are never re-used.\nThe REPLACE statement also deletes a row, and its value is\nwasted. With InnoDB, values can be reserved by a\ntransaction; but if the transaction fails (for example,\nbecause of a ROLLBACK) the reserved value will be lost.\n \nThus AUTO_INCREMENT values can be used to sort results in a\nchronological order, but not to create a numeric sequence.\n \nReplication\n \nTo make master-master or Galera safe to use AUTO_INCREMENT\none should use the system variables \n auto_increment_increment and auto_increment_offset to\ngenerate unique values for each server.\n \nCHECK Constraints, DEFAULT Values and Virtual Columns\n \nFrom MariaDB 10.2.6 auto_increment columns are no longer\npermitted in CHECK constraints, DEFAULT value expressions\nand virtual columns. They were permitted in earlier\nversions, but did not work correctly. See MDEV-11117.\n \n\n\nURL: https://mariadb.com/kb/en/auto_increment/','','https://mariadb.com/kb/en/auto_increment/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (265,22,'BIGINT','Syntax\n------ \nBIGINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to\n18446744073709551615.\n \nIf a column has been set to ZEROFILL, all values will be\nprepended by zeros so that the BIGINT value contains a\nnumber of M digits.\n \nNote: If the ZEROFILL attribute has been specified, the\ncolumn will automatically become UNSIGNED.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nSERIAL is an alias for:\n \nBIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE\n \nExamples\n-------- \nCREATE TABLE bigints (a BIGINT,b BIGINT UNSIGNED,c BIGINT\nZEROFILL);\n \nINSERT INTO bigints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.08 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO bigints VALUES (-10,10,-10);Query OK, 1 row\naffected, 1 warning (0.08 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO bigints VALUES (-10,10,10);\n \nINSERT INTO bigints VALUES\n(9223372036854775808,9223372036854775808,9223372036854775808);\nQuery OK, 1 row affected, 1 warning (0.07 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO bigints VALUES\n(9223372036854775807,9223372036854775808,9223372036854775808);\n \nSELECT * FROM bigints;\n+---------------------+---------------------+----------------------+\n| a | b | c |\n+---------------------+---------------------+----------------------+\n| -10 | 0 | 00000000000000000000 |\n| -10 | 10 | 00000000000000000000 |\n| -10 | 10 | 00000000000000000010 |\n| 9223372036854775807 | 9223372036854775808 |\n09223372036854775808 |\n| 9223372036854775807 | 9223372036854775808 |\n09223372036854775808 |\n+---------------------+---------------------+----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/bigint/','','https://mariadb.com/kb/en/bigint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (266,22,'BINARY','Syntax\n------ \nBINARY(M)\n \nDescription\n----------- \nThe BINARY type is similar to the CHAR type, but stores\nbinary\nbyte strings rather than non-binary character strings. M\nrepresents the\ncolumn length in bytes.\n \nIt contains no character set, and comparison and sorting are\nbased on the numeric value of the bytes.\n \nIf the maximum length is exceeded, and SQL strict mode is\nnot enabled , the extra characters will be dropped with a\nwarning. If strict mode is enabled, an error will occur.\n \nBINARY values are right-padded with 0x00 (the zero byte) to\nthe specified length when inserted. The padding is not\nremoved on select, so this needs to be taken into account\nwhen sorting and comparing, where all bytes are significant.\nThe zero byte, 0x00 is less than a space for comparison\npurposes.\n \nExamples\n-------- \nInserting too many characters, first with strict mode off,\nthen with it on:\n \nCREATE TABLE bins (a BINARY(10));\n \nINSERT INTO bins VALUES(\'12345678901\');\nQuery OK, 1 row affected, 1 warning (0.04 sec)\n \nSELECT * FROM bins;\n \n+------------+\n| a |\n+------------+\n| 1234567890 |\n+------------+\n \nSET sql_mode=\'STRICT_ALL_TABLES\';\n \nINSERT INTO bins VALUES(\'12345678901\');\nERROR 1406 (22001): Data too long for column \'a\' at row 1\n \nSorting is performed with the byte value:\n \nTRUNCATE bins;\n \nINSERT INTO bins VALUES(\'A\'),(\'B\'),(\'a\'),(\'b\');\n \nSELECT * FROM bins ORDER BY a;\n \n+------+\n| a |\n+------+\n| A |\n| B |\n| a |\n| b |\n+------+\n \nUsing CAST to sort as a CHAR instead:\n \nSELECT * FROM bins ORDER BY CAST(a AS CHAR);\n+------+\n| a |\n+------+\n| a |\n| A |\n| b |\n| B |\n+------+\n \nThe field is a BINARY(10), so padding of two \'\\0\'s are\ninserted, causing comparisons that don\'t take this into\naccount to fail:\n \nTRUNCATE bins;\n \nINSERT INTO bins VALUES(\'12345678\');\n \nSELECT a = \'12345678\', a = \'12345678\\0\\0\' from bins;\n \n+----------------+--------------------+\n| a = \'12345678\' | a = \'12345678\\0\\0\' |\n+----------------+--------------------+\n| 0 | 1 |\n+----------------+--------------------+\n \n\n\nURL: https://mariadb.com/kb/en/binary/','','https://mariadb.com/kb/en/binary/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (267,22,'BIT','Syntax\n------ \nBIT[(M)]\n \nDescription\n----------- \nA bit-field type. M indicates the number of bits per value,\nfrom 1 to\n64. The default is 1 if M is omitted.\n \nBit values can be inserted with b\'value\' notation, where\nvalue is the bit value in 0\'s and 1\'s.\n \nBit fields are automatically zero-padded from the left to\nthe full length of the bit, so for example in a BIT(4)\nfield, \'10\' is equivalent to \'0010\'.\n \nBits are returned as binary, so to display them, either add\n0, or use a function such as HEX, OCT or BIN to convert\nthem.\n \nExamples\n-------- \nCREATE TEMPORARY TABLE b ( b1 BIT(8) );\nINSERT INTO b VALUES\n(b\'11111111\'),(b\'01010101\'),(b\'1111111111111\');\nQuery OK, 3 rows affected, 1 warning (0.10 sec)\nRecords: 3 Duplicates: 0 Warnings: 1\n \nSHOW WARNINGS;\n+---------+------+---------------------------------------------+\n| Level | Code | Message |\n+---------+------+---------------------------------------------+\n| Warning | 1264 | Out of range value for column \'b1\' at\nrow 3 |\n+---------+------+---------------------------------------------+\n \nSELECT b1+0, HEX(b1), OCT(b1), BIN(b1) FROM b;\n+------+---------+---------+----------+\n| b1+0 | HEX(b1) | OCT(b1) | BIN(b1) |\n+------+---------+---------+----------+\n| 255 | FF | 377 | 11111111 |\n| 85 | 55 | 125 | 1010101 |\n| 255 | FF | 377 | 11111111 |\n+------+---------+---------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bit/','','https://mariadb.com/kb/en/bit/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (268,22,'BLOB','Syntax\n------ \nBLOB[(M)]\n \nDescription\n----------- \nA BLOB column with a maximum length of 65,535 (216 - 1)\nbytes. Each\nBLOB value is stored using a two-byte length prefix that\nindicates the\nnumber of bytes in the value.\n \nAn optional length M can be given for this type. If this is\ndone,\nMariaDB creates the column as the smallest BLOB type large\nenough to\nhold values M bytes long.\n \nBLOBS can also be used to store dynamic columns.\n \nBefore MariaDB 10.2.1, BLOB and TEXT columns could not be\nassigned a DEFAULT value. This restriction was lifted in\nMariaDB 10.2.1.\n \nIndexing\n \nIn MariaDB 10.4, it is possible to set a Unique index on a\ncolumn that uses the BLOB data type. In previous releases\nthis was not possible, as the index would only guarantee the\nuniqueness of a fixed number of characters.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, BLOB is a synonym for\nLONGBLOB.\n \n\n\nURL: https://mariadb.com/kb/en/blob/','','https://mariadb.com/kb/en/blob/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (269,22,'BLOB and TEXT Data Types','Description\n----------- \nA BLOB is a binary large object that can hold a variable\namount of\ndata. The four BLOB types are \nTINYBLOB,\nBLOB, \nMEDIUMBLOB, and\nLONGBLOB.\n \nThese differ only in the maximum length of the values they\ncan hold. \n \nThe TEXT types are \nTINYTEXT,\nTEXT,\nMEDIUMTEXT, and\nLONGTEXT.\nJSON (alias for LONGTEXT)\n \nThese correspond to the four BLOB types and have the same\nmaximum lengths and storage requirements.\n \nStarting from MariaDB 10.2.1, BLOB and TEXT columns can have\na DEFAULT value.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/blob-and-text-data-types/','','https://mariadb.com/kb/en/blob-and-text-data-types/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (270,22,'BOOLEAN','Syntax\n------ \nBOOL, BOOLEAN\n \nDescription\n----------- \nThese types are synonyms for TINYINT(1). \nA value of zero is considered false. Non-zero values are\nconsidered true:\n \nmysql> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false |\n+------------------------+\n \nmysql> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n \nmysql> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true |\n+------------------------+\n \nHowever, the values TRUE and FALSE are merely aliases for 1\nand 0,\nrespectively, as shown here:\n \nmysql> SELECT IF(0 = FALSE, \'true\', \'false\');\n \n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true |\n+--------------------------------+\n \nmysql> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true |\n+-------------------------------+\n \nmysql> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false |\n+-------------------------------+\n \nmysql> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false |\n+--------------------------------+\n \nUNKNOWN is an alias for NULL.\n \nThe last two statements display the results shown because 2\nis equal\nto neither 1 nor 0.\n \n\n\nURL: https://mariadb.com/kb/en/boolean/','','https://mariadb.com/kb/en/boolean/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (271,22,'CHAR','This article covers the CHAR data type. See CHAR Function\nfor the function.\n \nSyntax\n------ \n[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA fixed-length string that is always right-padded with\nspaces to the specified\nlength when stored. M represents the column length in\ncharacters. The range\nof M is 0 to 255. If M is omitted, the length is 1.\n \nCHAR(0) columns can contain 2 values: an empty string or\nNULL. Such columns cannot be part of an index. The CONNECT\nstorage engine does not support CHAR(0).\n \nNote: Trailing spaces are removed when CHAR values are\nretrieved\nunless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.\n \nBefore MariaDB 10.2, all collations were of type PADSPACE,\nmeaning that CHAR (as well as VARCHAR and TEXT) values are\ncompared without regard for trailing spaces. This does not\napply to the LIKE pattern-matching operator, which takes\ninto account trailing spaces.\n \nIf a unique index consists of a column where trailing pad\ncharacters are stripped or ignored, inserts into that column\nwhere values differ only by the number of trailing pad\ncharacters will result in a duplicate-key error.\n \nExamples\n-------- \nTrailing spaces:\n \nCREATE TABLE strtest (c CHAR(10));\nINSERT INTO strtest VALUES(\'Maria \');\n \nSELECT c=\'Maria\',c=\'Maria \' FROM strtest;\n \n+-----------+--------------+\n| c=\'Maria\' | c=\'Maria \' |\n+-----------+--------------+\n| 1 | 1 |\n+-----------+--------------+\n \nSELECT c LIKE \'Maria\',c LIKE \'Maria \' FROM strtest;\n \n+----------------+-------------------+\n| c LIKE \'Maria\' | c LIKE \'Maria \' |\n+----------------+-------------------+\n| 1 | 0 |\n+----------------+-------------------+\n \nNO PAD Collations\n \nNO PAD collations regard trailing spaces as normal\ncharacters. You can get a list of all NO PAD collations by\nquerying the Information Schema Collations table, for\nexample:\n \nSELECT collation_name FROM information_schema.collations \n WHERE collation_name LIKE \"%nopad%\";\n \n+------------------------------+\n| collation_name |\n+------------------------------+\n| big5_chinese_nopad_ci |\n| big5_nopad_bin |\n...\n \n\n\nURL: https://mariadb.com/kb/en/char/','','https://mariadb.com/kb/en/char/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (272,22,'CHAR BYTE','Description\n----------- \nThe CHAR BYTE data type is an alias for the \nBINARY data type. This is a\ncompatibility feature.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/char-byte/','','https://mariadb.com/kb/en/char-byte/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (273,22,'DATE','Syntax\n------ \nDATE\n \nDescription\n----------- \nA date. The supported range is \'1000-01-01\' to\n\'9999-12-31\'. MariaDB\ndisplays DATE values in \'YYYY-MM-DD\' format, but can be\nassigned dates in looser formats, including strings or\nnumbers, as long as they make sense. These include a short\nyear, YY-MM-DD, no delimiters, YYMMDD, or any other\nacceptable delimiter, for example YYYY/MM/DD. For details,\nsee date and time literals.\n \n\'0000-00-00\' is a permitted special value (zero-date),\nunless the NO_ZERO_DATE SQL_MODE is used. Also, individual\ncomponents of a date can be set to 0 (for example:\n\'2015-00-12\'), unless the NO_ZERO_IN_DATE SQL_MODE is\nused. In many cases, the result of en expression involving a\nzero-date, or a date with zero-parts, is NULL. If the\nALLOW_INVALID_DATES SQL_MODE is enabled, if the day part is\nin the range between 1 and 31, the date does not produce any\nerror, even for months that have less than 31 days.\n \nExamples\n-------- \nCREATE TABLE t1 (d DATE);\n \nINSERT INTO t1 VALUES (\"2010-01-12\"), (\"2011-2-28\"),\n(\'120314\'),(\'13*04*21\');\n \nSELECT * FROM t1;\n \n+------------+\n| d |\n+------------+\n| 2010-01-12 |\n| 2011-02-28 |\n| 2012-03-14 |\n| 2013-04-21 |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date/','','https://mariadb.com/kb/en/date/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (274,22,'DATETIME','Syntax\n------ \nDATETIME [(microsecond precision)]\n \nDescription\n----------- \nA date and time combination. The supported range is\n\'1000-01-01 00:00:00.000000\' to \'9999-12-31\n23:59:59.999999\'.\nMariaDB displays DATETIME values in \'YYYY-MM-DD HH:MM:SS\'\nformat, but\nallows assignment of values to DATETIME columns using either\nstrings or\nnumbers. For details, see date and time literals.\n \nThe microsecond precision can be from 0-6. If not specified\n0 is used.\n \n\'0000-00-00\' is a permitted special value (zero-date),\nunless the NO_ZERO_DATE SQL_MODE is used. Also, individual\ncomponents of a date can be set to 0 (for example:\n\'2015-00-12\'), unless the NO_ZERO_IN_DATE SQL_MODE is\nused. In many cases, the result of en expression involving a\nzero-date, or a date with zero-parts, is NULL. If the\nALLOW_INVALID_DATES SQL_MODE is enabled, if the day part is\nin the range between 1 and 31, the date does not produce any\nerror, even for months that have less than 31 days.\n \nSince MariaDB 10.0.1, DATETIME columns also accept\nCURRENT_TIMESTAMP as the default value.\n \nMariaDB 10.1.2 introduced the --mysql56-temporal-format\noption, on by default, which allows MariaDB to store\nDATETMEs using the same low-level format MySQL 5.6 uses. For\nmore information, see Internal Format, below.\n \nFor storage requirements, see Data Type Storage\nRequirements.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, DATE with a time portion\nis a synonym for DATETIME.\n \nInternal Format\n \nIn MariaDB 10.1.2 a new temporal format was introduced from\nMySQL 5.6 that alters how the TIME, DATETIME and TIMESTAMP\ncolumns operate at lower levels. These changes allow these\ntemporal data types to have fractional parts and negative\nvalues. You can disable this feature using the\nmysql56_temporal_format system variable.\n \nTables that include TIMESTAMP values that were created on an\nolder version of MariaDB or that were created while the\nmysql56_temporal_format system variable was disabled\ncontinue to store data using the older data type format.\n \nIn order to update table columns from the older format to\nthe newer format, execute an ALTER TABLE... MODIFY COLUMN\nstatement that changes the column to the *same* data type.\nThis change may be needed if you want to export the table\'s\ntablespace and import it onto a server that has\nmysql56_temporal_format=ON set (see MDEV-15225).\n \nFor instance, if you have a DATETIME column in your table: \n \nSHOW VARIABLES LIKE \'mysql56_temporal_format\';\n \n+-------------------------+-------+\n| Variable_name | Value |\n+-------------------------+-------+\n| mysql56_temporal_format | ON |\n+-------------------------+-------+\n \nALTER TABLE example_table MODIFY ts_col DATETIME;\n \nWhen MariaDB executes the ALTER TABLE statement, it converts\nthe data from the older temporal format to the newer one. \n \nIn the event that you have several tables and columns using\ntemporal data types that you want to switch over to the new\nformat, make sure the system variable is enabled, then\nperform a dump and restore using mysqldump. The columns\nusing relevant temporal data types are restored using the\nnew temporal format.\n \nExamples\n-------- \nCREATE TABLE t1 (d DATETIME);\n \nINSERT INTO t1 VALUES (\"2011-03-11\"), (\"2012-04-19\n13:08:22\"),\n (\"2013-07-18 13:44:22.123456\");\n \nSELECT * FROM t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2011-03-11 00:00:00 |\n| 2012-04-19 13:08:22 |\n| 2013-07-18 13:44:22 |\n+---------------------+\n \nCREATE TABLE t2 (d DATETIME(6));\n \nINSERT INTO t2 VALUES (\"2011-03-11\"), (\"2012-04-19\n13:08:22\"),\n (\"2013-07-18 13:44:22.123456\");\n \nSELECT * FROM t2;\n \n+----------------------------+\n| d |\n+----------------------------+\n| 2011-03-11 00:00:00.000000 |\n| 2012-04-19 13:08:22.000000 |\n| 2013-07-18 13:44:22.123456 |\n+----------------------------++\n \nStrings used in datetime context are automatically converted\nto datetime(6). If you want to have a datetime without\nseconds, you should use CONVERT(..,datetime).\n \nSELECT CONVERT(\'2007-11-30 10:30:19\',datetime);\n+-----------------------------------------+\n| CONVERT(\'2007-11-30 10:30:19\',datetime) |\n+-----------------------------------------+\n| 2007-11-30 10:30:19 |\n+-----------------------------------------+\n \nSELECT CONVERT(\'2007-11-30 10:30:19\',datetime(6));\n+--------------------------------------------+\n| CONVERT(\'2007-11-30 10:30:19\',datetime(6)) |\n+--------------------------------------------+\n| 2007-11-30 10:30:19.000000 |\n+--------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/datetime/','','https://mariadb.com/kb/en/datetime/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (275,22,'DECIMAL','Syntax\n------ \nDECIMAL[(M[,D])] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA packed \"exact\" fixed-point number. M is the total number\nof digits (the\nprecision) and D is the number of digits after the decimal\npoint (the\nscale). The decimal point and (for negative numbers) the\n\"-\" sign are not\ncounted in M. If D is 0, values have no decimal point or\nfractional\npart and on INSERT the value will be rounded to the nearest\nDECIMAL. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30 before\nMariadB 10.2.1 and 38 afterwards. If D is omitted, the\ndefault is 0. If M is omitted, the default is 10.\n \nUNSIGNED, if specified, disallows negative values.\n \nZEROFILL, if specified, pads the number with zeros, up to\nthe total number\nof digits specified by M.\n \nAll basic calculations (+, -, *, /) with DECIMAL columns are\ndone with\na precision of 65 digits.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, NUMBER is a synonym.\n \nExamples\n-------- \nCREATE TABLE t1 (d DECIMAL UNSIGNED ZEROFILL);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4.0),(5.2),(5.7);\nQuery OK, 6 rows affected, 2 warnings (0.16 sec)\nRecords: 6 Duplicates: 0 Warnings: 2\n \nNote (Code 1265): Data truncated for column \'d\' at row 5\nNote (Code 1265): Data truncated for column \'d\' at row 6\n \nSELECT * FROM t1;\n \n+------------+\n| d |\n+------------+\n| 0000000001 |\n| 0000000002 |\n| 0000000003 |\n| 0000000004 |\n| 0000000005 |\n| 0000000006 |\n+------------+\n \nINSERT INTO t1 VALUES (-7);\nERROR 1264 (22003): Out of range value for column \'d\' at\nrow 1\n \n\n\nURL: https://mariadb.com/kb/en/decimal/','','https://mariadb.com/kb/en/decimal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (276,22,'ENUM','Syntax\n------ \nENUM(\'value1\',\'value2\',...) [CHARACTER SET charset_name]\n[COLLATE collation_name]\n \nDescription\n----------- \nAn enumeration. A string object that can have only one\nvalue, chosen\nfrom the list of values \'value1\', \'value2\', ..., NULL or\nthe special \n\'\' error value. In theory, an ENUM column can have a\nmaximum of 65,535 distinct\nvalues; in practice, the real maximum depends on many\nfactors. ENUM values are represented internally as integers.\n \nTrailing spaces are automatically stripped from ENUM values\non table creation.\n \nENUMs require relatively little storage space compared to\nstrings, either one or two bytes depending on the number of\nenumeration values.\n \nNULL and empty values\n \nAn ENUM can also contain NULL and empty values. If the ENUM\ncolumn is declared to permit NULL values, NULL becomes a\nvalid value, as well as the default value (see below). If\nstrict SQL Mode is not enabled, and an invalid value is\ninserted into an ENUM, a special empty string, with an index\nvalue of zero (see Numeric index, below), is inserted, with\na warning. This may be confusing, because the empty string\nis also a possible value, and the only difference if that in\nthis case its index is not 0. Inserting will fail with an\nerror if strict mode is active.\n \nIf a DEFAULT clause is missing, the default value will be:\nNULL is the column is nullable;\notherwise, the first value in the enumaration.\n \nNumeric index\n \nENUM values are indexed numerically in the order they are\ndefined, and sorting will be performed in this numeric\norder. We suggest not using ENUM to store numerals, as there\nis little to no storage space benefit, and it is easy to\nconfuse the enum integer with the enum numeral value by\nleaving out the quotes.\n \nAn ENUM defined as ENUM(\'apple\',\'orange\',\'pear\') would\nhave the following index values:\n \nIndex | Value | \n \nNULL | NULL | \n \n0 | \'\' | \n \n1 | \'apple\' | \n \n2 | \'orange\' | \n \n3 | \'pear\' | \n \nExamples\n-------- \nCREATE TABLE fruits (\n id INT NOT NULL auto_increment PRIMARY KEY,\n fruit ENUM(\'apple\',\'orange\',\'pear\'),\n bushels INT);\n \nDESCRIBE fruits;\n \n+---------+-------------------------------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+---------+-------------------------------+------+-----+---------+----------------+\n| id | int(11) | NO | PRI | NULL | auto_increment |\n| fruit | enum(\'apple\',\'orange\',\'pear\') | YES | | NULL\n| |\n| bushels | int(11) | YES | | NULL | |\n+---------+-------------------------------+------+-----+---------+----------------+\n \nINSERT INTO fruits\n (fruit,bushels) VALUES\n (\'pear\',20),\n (\'apple\',100),\n (\'orange\',25);\n \nINSERT INTO fruits\n (fruit,bushels) VALUES\n (\'avocado\',10);\nERROR 1265 (01000): Data truncated for column \'fruit\' at\nrow 1\n \nSELECT * FROM fruits;\n \n+----+--------+---------+\n| id | fruit | bushels |\n+----+--------+---------+\n| 1 | pear | 20 |\n| 2 | apple | 100 |\n| 3 | orange | 25 |\n+----+--------+---------+\n \nSelecting by numeric index:\n \nSELECT * FROM fruits WHERE fruit=2;\n \n+----+--------+---------+\n| id | fruit | bushels |\n+----+--------+---------+\n| 3 | orange | 25 |\n+----+--------+---------+\n \nSorting is according to the index value:\n \nCREATE TABLE enums (a ENUM(\'2\',\'1\'));\n \nINSERT INTO enums VALUES (\'1\'),(\'2\');\n \nSELECT * FROM enums ORDER BY a ASC;\n \n+------+\n| a |\n+------+\n| 2 |\n| 1 |\n+------+\n \nIt\'s easy to get confused between returning the enum\ninteger with the stored value, so we don\'t suggest using\nENUM to store numerals. The first example returns the 1st\nindexed field (\'2\' has an index value of 1, as it\'s\ndefined first), while the second example returns the string\nvalue \'1\'.\n \nSELECT * FROM enums WHERE a=1;\n \n+------+\n| a |\n+------+\n| 2 |\n+------+\n \nSELECT * FROM enums WHERE a=\'1\';\n \n+------+\n| a |\n+------+\n| 1 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/enum/','','https://mariadb.com/kb/en/enum/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (277,22,'DOUBLE','Syntax\n------ \nDOUBLE[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\nDOUBLE PRECISION[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\nREAL[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA normal-size (double-precision) floating-point number (see\nFLOAT for a single-precision floating-point number).\n \nAllowable values are:\n-1.7976931348623157E+308 to -2.2250738585072014E-308\n0\n2.2250738585072014E-308 to 1.7976931348623157E+308\n \nThese are the theoretical limits, based on the IEEE\nstandard. The actual range\nmight be slightly smaller depending on your hardware or\noperating system.\n \nM is the total number of digits and D is the number of\ndigits\nfollowing the decimal point. If M and D are omitted, values\nare stored\nto the limits allowed by the hardware. A double-precision\nfloating-point number is accurate to approximately 15\ndecimal places.\n \nUNSIGNED, if specified, disallows negative values.\n \nZEROFILL, if specified, pads the number with zeros, up to\nthe total number\nof digits specified by M.\n \nREAL and DOUBLE PRECISION are synonyms, unless the\nREAL_AS_FLOAT SQL mode is enabled, in which case REAL is a\nsynonym for FLOAT rather than DOUBLE.\n \nSee Floating Point Accuracy for issues when using\nfloating-point numbers.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nExamples\n-------- \nCREATE TABLE t1 (d DOUBLE(5,0) zerofill);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\n \nSELECT * FROM t1;\n \n+-------+\n| d |\n+-------+\n| 00001 |\n| 00002 |\n| 00003 |\n| 00004 |\n+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/double/','','https://mariadb.com/kb/en/double/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (278,22,'FLOAT','Syntax\n------ \nFLOAT[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA small (single-precision) floating-point number (see DOUBLE\nfor a regular-size floating point number). Allowable values\nare:\n-3.402823466E+38 to -1.175494351E-38\n0\n1.175494351E-38 to 3.402823466E+38. \n \nThese are the theoretical limits, based on the IEEE \nstandard. The actual range might be slightly smaller\ndepending on your\nhardware or operating system.\n \nM is the total number of digits and D is the number of\ndigits\nfollowing the decimal point. If M and D are omitted, values\nare stored\nto the limits allowed by the hardware. A single-precision\nfloating-point number is accurate to approximately 7 decimal\nplaces.\n \nUNSIGNED, if specified, disallows negative values.\n \nUsing FLOAT might give you some unexpected problems because\nall\ncalculations in MariaDB are done with double precision. See\nFloating Point Accuracy.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/float/','','https://mariadb.com/kb/en/float/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (279,22,'Geometry Types','Description\n----------- \nMariaDB provides a standard way of creating spatial columns\nfor geometry types,\nfor example, with CREATE TABLE or ALTER TABLE.\nCurrently, spatial columns are supported for MyISAM, InnoDB,\nNDB, and ARCHIVE\ntables. See also SPATIAL INDEX.\n \nThe basic geometry type is GEOMETRY. But the type can be\nmore specific. The following types are supported:\n \nGeometry Types | \n \nPOINT | \n \nLINESTRING | \n \nPOLYGON | \n \nMULTIPOINT | \n \nMULTILINESTRING | \n \nMULTIPOLYGON | \n \nGEOMETRYCOLLECTION | \n \nGEOMETRY | \n \nExamples\n-------- \nNote: For clarity, only one type is listed per table in the\nexamples below, but a table\nrow can contain multiple types. For example:\n \nCREATE TABLE object (shapeA POLYGON, shapeB LINESTRING);\n \nPOINT\n \nCREATE TABLE gis_point (g POINT);\nSHOW FIELDS FROM gis_point;\n \nINSERT INTO gis_point VALUES\n (PointFromText(\'POINT(10 10)\')),\n (PointFromText(\'POINT(20 10)\')),\n (PointFromText(\'POINT(20 20)\')),\n (PointFromWKB(AsWKB(PointFromText(\'POINT(10 20)\'))));\n \nLINESTRING\n \nCREATE TABLE gis_line (g LINESTRING);\nSHOW FIELDS FROM gis_line;\n \nINSERT INTO gis_line VALUES\n (LineFromText(\'LINESTRING(0 0,0 10,10 0)\')),\n (LineStringFromText(\'LINESTRING(10 10,20 10,20 20,10 20,10\n10)\')),\n (LineStringFromWKB(AsWKB(LineString(Point(10, 10),\nPoint(40, 10)))));\n \nPOLYGON\n \nCREATE TABLE gis_polygon (g POLYGON);\nSHOW FIELDS FROM gis_polygon;\n \nINSERT INTO gis_polygon VALUES\n (PolygonFromText(\'POLYGON((10 10,20 10,20 20,10 20,10\n10))\')),\n (PolyFromText(\'POLYGON((0 0,50 0,50 50,0 50,0 0), (10\n10,20 10,20 20,10 20,10 10))\')),\n (PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0),\nPoint(30, 0), Point(30, 30), Point(0, 0))))));\n \nMULTIPOINT\n \nCREATE TABLE gis_multi_point (g MULTIPOINT);\nSHOW FIELDS FROM gis_multi_point;\n \nINSERT INTO gis_multi_point VALUES\n (MultiPointFromText(\'MULTIPOINT(0 0,10 10,10 20,20\n20)\')),\n (MPointFromText(\'MULTIPOINT(1 1,11 11,11 21,21 21)\')),\n (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,\n10)))));\n \nMULTILINESTRING\n \nCREATE TABLE gis_multi_line (g MULTILINESTRING);\nSHOW FIELDS FROM gis_multi_line;\n \nINSERT INTO gis_multi_line VALUES\n (MultiLineStringFromText(\'MULTILINESTRING((10 48,10 21,10\n0),(16 0,16 23,16 48))\')),\n (MLineFromText(\'MULTILINESTRING((10 48,10 21,10 0))\')),\n (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),\nPoint(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21,\n7))))));\n \nMULTIPOLYGON\n \nCREATE TABLE gis_multi_polygon (g MULTIPOLYGON);\nSHOW FIELDS FROM gis_multi_polygon;\n \nINSERT INTO gis_multi_polygon VALUES\n (MultiPolygonFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84\n42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67\n13,59 13,59 18)))\')),\n (MPolyFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28\n26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59\n13,59 18)))\')),\n (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,\n3), Point(3, 3), Point(3, 0), Point(0, 3)))))));\n \nGEOMETRYCOLLECTION\n \nCREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);\nSHOW FIELDS FROM gis_geometrycollection;\n \nINSERT INTO gis_geometrycollection VALUES\n (GeomCollFromText(\'GEOMETRYCOLLECTION(POINT(0 0),\nLINESTRING(0 0,10 10))\')),\n (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),\nLineString(Point(3, 6), Point(7, 9)))))),\n (GeomFromText(\'GeometryCollection()\')),\n (GeomFromText(\'GeometryCollection EMPTY\'));\n \nGEOMETRY\n \nCREATE TABLE gis_geometry (g GEOMETRY);\nSHOW FIELDS FROM gis_geometry;\n \nINSERT into gis_geometry SELECT * FROM gis_point;\n \nINSERT into gis_geometry SELECT * FROM gis_line;\n \nINSERT into gis_geometry SELECT * FROM gis_polygon;\n \nINSERT into gis_geometry SELECT * FROM gis_multi_point;\n \nINSERT into gis_geometry SELECT * FROM gis_multi_line;\n \nINSERT into gis_geometry SELECT * FROM gis_multi_polygon;\n \nINSERT into gis_geometry SELECT * FROM\ngis_geometrycollection;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-types/','','https://mariadb.com/kb/en/geometry-types/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (280,22,'JSON Data Type','The JSON alias was added in MariaDB 10.2.7. This was done to\nmake it possible to use JSON columns in statement based\nreplication from MySQL to MariaDB and to make it possible\nfor MariaDB to read mysqldumps from MySQL.\n \nJSON is an alias for LONGTEXT introduced for compatibility\nreasons with MySQL\'s JSON data type. MariaDB implements\nthis as a LONGTEXT rather, as the JSON data type contradicts\nthe SQL standard, and MariaDB\'s benchmarks indicate that\nperformance is at least equivalent.\n \nIn order to ensure that a a valid json document is inserted,\nthe JSON_VALID function can be used as a CHECK constraint.\nThis constraint is automatically included for types using\nthe JSON alias from MariaDB 10.4.3.\n \nExamples\n-------- \nCREATE TABLE t (j JSON);\n \nDESC t;\n+-------+----------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+----------+------+-----+---------+-------+\n| j | longtext | YES | | NULL | |\n+-------+----------+------+-----+---------+-------+\n \nWith validation:\n \nCREATE TABLE t2 (\n j JSON \n CHECK (JSON_VALID(j))\n);\n \nINSERT INTO t2 VALUES (\'invalid\');\nERROR 4025 (23000): CONSTRAINT `j` failed for `test`.`t2`\n \nINSERT INTO t2 VALUES (\'{\"id\": 1, \"name\":\n\"Monty\"}\');\nQuery OK, 1 row affected (0.13 sec)\n \nReplicating JSON Data Between MySQL and MariaDB\n \nThe JSON type in MySQL stores the JSON object in a compact\nform, not as LONGTEXT as in MariaDB.\nThis means that row based replication will not work for JSON\ntypes from MySQL to MariaDB.\n \nThere are a a few different ways to solve this:\nUse statement based replication.\nChange the JSON column to type TEXT in MySQL\n \nConverting a MySQL TABLE with JSON Fields to MariaDB\n \nMariaDB can\'t directly access MySQL\'s JSON format.\n \nThere are a a few different ways to move the table to\nMariaDB:\nChange the JSON column to type TEXT in MySQL. After this,\nMariaDB can directly use the table without any need for a\ndump and restore.\nUse mysqldump to copy the table.\n \nDifferences Between MySQL JSON Strings and MariaDB JSON\nStrings\n \nIn MySQL, JSON is an object and is compared according to\njson values. In MariaDB JSON strings are normal strings and\ncompared as strings. One exception is when using\nJSON_EXTRACT() in which case strings are unescaped before\ncomparison.\n \n\n\nURL: https://mariadb.com/kb/en/json-data-type/','','https://mariadb.com/kb/en/json-data-type/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (281,22,'LONGBLOB','Syntax\n------ \nLONGBLOB\n \nDescription\n----------- \nA BLOB column with a \nmaximum length of 4,294,967,295 bytes or 4GB (232 - 1). The\neffective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol\nand\navailable memory. Each LONGBLOB value is stored using a\nfour-byte\nlength prefix that indicates the number of bytes in the\nvalue.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, BLOB is a synonym for\nLONGBLOB.\n \n\n\nURL: https://mariadb.com/kb/en/longblob/','','https://mariadb.com/kb/en/longblob/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (282,22,'LONGTEXT','Syntax\n------ \nLONGTEXT [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a maximum length of 4,294,967,295 or 4GB\n(232 - 1) characters. The effective maximum length is less\nif the value contains multi-byte characters. The effective\nmaximum length of LONGTEXT columns also depends on the\nconfigured maximum packet size in the client/server protocol\nand available memory. Each LONGTEXT value is stored using a\nfour-byte length prefix that indicates the number of bytes\nin the value.\n \nFrom MariaDB 10.2.7, JSON is an alias for LONGTEXT. See JSON\nData Type for details.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, CLOB is a synonym for\nLONGTEXT.\n \n\n\nURL: https://mariadb.com/kb/en/longtext/','','https://mariadb.com/kb/en/longtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (283,22,'MEDIUMBLOB','Syntax\n------ \nMEDIUMBLOB\n \nDescription\n----------- \nA BLOB column with a maximum\nlength of 16,777,215 (224 - 1) bytes.\nEach MEDIUMBLOB value is stored using a three-byte length\nprefix that\nindicates the number of bytes in the value. \n \n\n\nURL: https://mariadb.com/kb/en/mediumblob/','','https://mariadb.com/kb/en/mediumblob/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (284,22,'MEDIUMINT','Syntax\n------ \nMEDIUMINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA medium-sized integer. The signed range is -8388608 to\n8388607. The\nunsigned range is 0 to 16777215.\n \nZEROFILL pads the integer with zeroes and assumes UNSIGNED\n(even if UNSIGNED is not specified).\n \nFor details on the attributes, see Numeric Data Type\nOverview.\n \nExamples\n-------- \nCREATE TABLE mediumints (a MEDIUMINT,b MEDIUMINT UNSIGNED,c\nMEDIUMINT ZEROFILL);\n \nDESCRIBE mediumints;\n+-------+--------------------------------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+--------------------------------+------+-----+---------+-------+\n| a | mediumint(9) | YES | | NULL | |\n| b | mediumint(8) unsigned | YES | | NULL | |\n| c | mediumint(8) unsigned zerofill | YES | | NULL | |\n+-------+--------------------------------+------+-----+---------+-------+\n \nINSERT INTO mediumints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.05 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO mediumints VALUES (-10,10,-10);\nQuery OK, 1 row affected, 1 warning (0.08 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO mediumints VALUES (-10,10,10);\n \nINSERT INTO mediumints VALUES (8388608,8388608,8388608);\nQuery OK, 1 row affected, 1 warning (0.05 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO mediumints VALUES (8388607,8388608,8388608);\n \nSELECT * FROM mediumints;\n+---------+---------+----------+\n| a | b | c |\n+---------+---------+----------+\n| -10 | 0 | 00000000 |\n| -10 | 0 | 00000000 |\n| -10 | 10 | 00000000 |\n| -10 | 10 | 00000010 |\n| 8388607 | 8388608 | 08388608 |\n| 8388607 | 8388608 | 08388608 |\n+---------+---------+----------+\n \n\n\nURL: https://mariadb.com/kb/en/mediumint/','','https://mariadb.com/kb/en/mediumint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (285,22,'MEDIUMTEXT','Syntax\n------ \nMEDIUMTEXT [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a \nmaximum length of 16,777,215 (224 - 1)\ncharacters. The effective maximum length is less if the\nvalue\ncontains multi-byte characters. Each MEDIUMTEXT value is\nstored using\na three-byte length prefix that indicates the number of\nbytes in the\nvalue.\n \n\n\nURL: https://mariadb.com/kb/en/mediumtext/','','https://mariadb.com/kb/en/mediumtext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (286,22,'Numeric Data Type Overview','There are a number of numeric data types:\nTINYINT\nBOOLEAN - Synonym for TINYINT(1)\nSMALLINT\nMEDIUMINT\nINT, INTEGER\nBIGINT\nDECIMAL, DEC, NUMERIC, FIXED\nFLOAT\nDOUBLE, DOUBLE PRECISION, REAL\nBIT\n \nSee the specific articles for detailed information on each.\n \nSIGNED, UNSIGNED and ZEROFILL\n \nMost numeric types can be defined as SIGNED, UNSIGNED or\nZEROFILL, for example:\n \nTINYINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nIf SIGNED, or no attribute, is specified, a portion of the\nnumeric type will be reserved for the sign (plus or minus).\nFor example, a TINYINT SIGNED can range from -128 to 127. \n \nIf UNSIGNED is specified, no portion of the numeric type is\nreserved for the sign, so for integer types range can be\nlarger. For example, a TINYINT UNSIGNED can range from 0 to\n255. Floating point and fixed-point types also can be\nUNSIGNED, but this only prevents negative values from being\nstored and doesn\'t alter the range. \n \nIf ZEROFILL is specified, the column will be set to UNSIGNED\nand the spaces used by default to pad the field are replaced\nwith zeros. ZEROFILL is ignored in expressions or as part of\na UNION. ZEROFILL is a non-standard MySQL and MariaDB\nenhancement.\n \nNote that although the preferred syntax indicates that the\nattributes are exclusive, more than one attribute can be\nspecified.\n \nUntil MariaDB 10.2.7 (MDEV-8659), any combination of the\nattributes could be used in any order, with duplicates. In\nthis case:\nthe presence of ZEROFILL makes the column UNSIGNED ZEROFILL.\nthe presence of UNSIGNED makes the column UNSIGNED.\n \nFrom MariaDB 10.2.8, only the following combinations are\nsupported:\nSIGNED\nUNSIGNED\nZEROFILL\nUNSIGNED ZEROFILL\nZEROFILL UNSIGNED\n \nThe latter two should be replaced with simply ZEROFILL, but\nare still accepted by the parser.\n \nExamples\n-------- \nCREATE TABLE zf (\n i1 TINYINT SIGNED,\n i2 TINYINT UNSIGNED,\n i3 TINYINT ZEROFILL\n);\n \nINSERT INTO zf VALUES (2,2,2);\n \nSELECT * FROM zf;\n \n+------+------+------+\n| i1 | i2 | i3 |\n+------+------+------+\n| 2 | 2 | 002 |\n+------+------+------+\n \nRange\n \nWhen attempting to add a value that is out of the valid\nrange for the numeric type, MariaDB will react depending on\nthe strict SQL_MODE setting.\n \nIf strict_mode has been set (the default from MariaDB\n10.2.4), MariaDB will return an error.\n \nIf strict_mode has not been set (the default until MariaDB\n10.2.3), MariaDB will adjust the number to fit in the field,\nreturning a warning.\n \nExamples\n-------- \nWith strict_mode set:\n \nSHOW VARIABLES LIKE \'sql_mode\';\n \n+---------------+-------------------------------------------------------------------------------------------+\n| Variable_name | Value |\n+---------------+-------------------------------------------------------------------------------------------+\n| sql_mode |\nSTRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\n|\n+---------------+-------------------------------------------------------------------------------------------+\n \nCREATE TABLE ranges (i1 TINYINT, i2 SMALLINT, i3 TINYINT\nUNSIGNED);\n \nINSERT INTO ranges VALUES (257,257,257);\nERROR 1264 (22003): Out of range value for column \'i1\' at\nrow 1\n \nSELECT * FROM ranges;\n \nEmpty set (0.10 sec)\n \nWith strict_mode unset:\n \nSHOW VARIABLES LIKE \'sql_mode%\';\n \n+---------------+-------+\n| Variable_name | Value |\n+---------------+-------+\n| sql_mode | |\n+---------------+-------+\n \nCREATE TABLE ranges (i1 TINYINT, i2 SMALLINT, i3 TINYINT\nUNSIGNED);\n \nINSERT INTO ranges VALUES (257,257,257);\nQuery OK, 1 row affected, 2 warnings (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+---------------------------------------------+\n| Level | Code | Message |\n+---------+------+---------------------------------------------+\n| Warning | 1264 | Out of range value for column \'i1\' at\nrow 1 |\n| Warning | 1264 | Out of range value for column \'i3\' at\nrow 1 |\n+---------+------+---------------------------------------------+\n2 rows in set (0.00 sec)\n \nSELECT * FROM ranges;\n \n+------+------+------+\n| i1 | i2 | i3 |\n+------+------+------+\n| 127 | 257 | 255 |\n+------+------+------+\n \nAuto_increment\n \nThe AUTO_INCREMENT attribute can be used to generate a\nunique identity for new rows. For more details, see\nauto_increment.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/numeric-data-type-overview/','','https://mariadb.com/kb/en/numeric-data-type-overview/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (287,22,'ROW','The ROW data type was introduced in MariaDB 10.3.0.\n \nSyntax\n------ \nROW ( [{, }... ])\n \nDescription\n----------- \nROW is a data type for stored procedure variables.\n \nFeatures\n \nROW fields as normal variables\n \nROW fields (members) act as normal variables, and are able\nto appear in all\nquery parts where a stored procedure variable is allowed:\nAssignment is using the := operator and the SET command:\n \na.x:= 10;\n \na.x:= b.x;\n \nSET a.x= 10, a.y=20, a.z= b.z;\n \nPassing to functions and operators:\n \nSELECT f1(rec.a), rec.a\n\nURL: https://mariadb.com/kb/en/row/','','https://mariadb.com/kb/en/row/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (288,22,'SET Data Type','Syntax\n------ \nSET(\'value1\',\'value2\',...) [CHARACTER SET charset_name]\n[COLLATE collation_name]\n \nDescription\n----------- \nA set. A string object that can have zero or more values,\neach of\nwhich must be chosen from the list of values \'value1\',\n\'value2\', ... A\nSET column can have a maximum of 64 members. SET values are\nrepresented internally as integers.\n \n\n\nURL: https://mariadb.com/kb/en/set-data-type/','','https://mariadb.com/kb/en/set-data-type/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (289,22,'SMALLINT','Syntax\n------ \nSMALLINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA small integer. The signed range is -32768 to 32767. The\nunsigned range is 0 to 65535.\n \nIf a column has been set to ZEROFILL, all values will be\nprepended by zeros so that the SMALLINT value contains a\nnumber of M digits.\n \nNote: If the ZEROFILL attribute has been specified, the\ncolumn will automatically become UNSIGNED.\n \nFor more details on the attributes, see Numeric Data Type\nOverview.\n \nExamples\n-------- \nCREATE TABLE smallints (a SMALLINT,b SMALLINT UNSIGNED,c\nSMALLINT ZEROFILL);\n \nINSERT INTO smallints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.09 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO smallints VALUES (-10,10,-10);\nQuery OK, 1 row affected, 1 warning (0.08 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO smallints VALUES (-10,10,10);\n \nINSERT INTO smallints VALUES (32768,32768,32768);\nQuery OK, 1 row affected, 1 warning (0.04 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO smallints VALUES (32767,32768,32768);\n \nSELECT * FROM smallints;\n+-------+-------+-------+\n| a | b | c |\n+-------+-------+-------+\n| -10 | 0 | 00000 |\n| -10 | 10 | 00000 |\n| -10 | 10 | 00010 |\n| 32767 | 32768 | 32768 |\n| 32767 | 32768 | 32768 |\n+-------+-------+-------+\n \n\n\nURL: https://mariadb.com/kb/en/smallint/','','https://mariadb.com/kb/en/smallint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (290,22,'String Literals','Strings are sequences of characters and are enclosed with\nquotes.\n \nThe syntax is:\n \n[_charset_name]\'string\' [COLLATE collation_name]\n \nFor example:\n \n\'The MariaDB Foundation\'\n_utf8 \'Foundation\' COLLATE utf8_unicode_ci;\n \nStrings can either be enclosed in single quotes or in double\nquotes (the same character must be used to both open and\nclose the string).\n \nThe ANSI SQL-standard does not permit double quotes for\nenclosing strings, and although MariaDB does by default, if\nthe MariaDB server has enabled the ANSI_QUOTES_SQL SQL_MODE,\ndouble quotes will be treated as being used for identifiers\ninstead of strings.\n \nStrings that are next to each other are automatically\nconcatenated. For example:\n \n\'The \' \'MariaDB \' \'Foundation\'\n \nand\n \n\'The MariaDB Foundation\'\n \nare equivalent.\n \nThe \\ (backslash character) is used to escape characters.\nFor example:\n \n\'MariaDB\'s new features\'\n \nis not a valid string because of the single quote in the\nmiddle of the string, which is treated as if it closes the\nstring, but is actually meant as part of the string, an\napostrophe. The backslash character helps in situations like\nthis:\n \n\'MariaDB\\\'s new features\'\n \nis now a valid string, and if displayed, will appear without\nthe backslash.\n \nSELECT \'MariaDB\\\'s new features\';\n+------------------------+\n| MariaDB\'s new features |\n+------------------------+\n| MariaDB\'s new features |\n+------------------------+\n \nAnother way to escape the quoting character is repeating it\ntwice:\n \nSELECT \'I\'\'m here\', \"\"\"Double\"\"\";\n+----------+----------+\n| I\'m here | \"Double\" |\n+----------+----------+\n| I\'m here | \"Double\" |\n+----------+----------+\n \nEscape sequences\n \nThere are other escape sequences also. Here is a full list:\n \nEscape sequence | Character | \n \n\\0 | ASCII NUL (0x00). | \n \n\\\' | Single quote (“\'â€). | \n \n\\\" | Double quote (“\"â€). | \n \n\\b | Backspace. | \n \n\\n | Newline, or linefeed,. | \n \n\\r | Carriage return. | \n \n\\t | Tab. | \n \n\\Z | ASCII 26 (Control+Z). See note following the table. | \n \n\\\\ | Backslash (“\\â€). | \n \n\\% | “%†character. See note following the table. | \n \n\\_ | A “_†character. See note following the table. | \n \nEscaping the % and _ characters can be necessary when using\nthe LIKE operator, which treats them as special characters.\n \nThe ASCII 26 character (\\Z) needs to be escaped when\nincluded in a batch file which needs to be executed in\nWindows. The reason is that ASCII 26, in Windows, is the end\nof file (EOF).\n \nBackslash (\\), if not used as an escape character, must\nalways be escaped. When followed by a character that is not\nin the above table, backslashes will simply be ignored.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/string-literals/','','https://mariadb.com/kb/en/string-literals/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (291,22,'TEXT','Syntax\n------ \nTEXT[(M)] [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a maximum length of 65,535 (216 - 1)\ncharacters. The effective maximum length is less if the\nvalue contains\nmulti-byte characters. Each TEXT value is stored using a\ntwo-byte length\nprefix that indicates the number of bytes in the value. If\nyou need a bigger storage, consider using MEDIUMTEXT\ninstead.\n \nAn optional length M can be given for this type. If this is\ndone, MariaDB\ncreates the column as the smallest TEXT type large enough to\nhold values\nM characters long.\n \nBefore MariaDB 10.2, all MariaDB collations were of type\nPADSPACE, meaning that TEXT (as well as VARCHAR and CHAR\nvalues) are compared without regard for trailing spaces.\nThis does not apply to the LIKE pattern-matching operator,\nwhich takes into account trailing spaces.\n \nBefore MariaDB 10.2.1, BLOB and TEXT columns could not be\nassigned a DEFAULT value. This restriction was lifted in\nMariaDB 10.2.1.\n \nExamples\n-------- \nTrailing spaces:\n \nCREATE TABLE strtest (d TEXT(10));\nINSERT INTO strtest VALUES(\'Maria \');\n \nSELECT d=\'Maria\',d=\'Maria \' FROM strtest;\n+-----------+--------------+\n| d=\'Maria\' | d=\'Maria \' |\n+-----------+--------------+\n| 1 | 1 |\n+-----------+--------------+\n \nSELECT d LIKE \'Maria\',d LIKE \'Maria \' FROM strtest;\n+----------------+-------------------+\n| d LIKE \'Maria\' | d LIKE \'Maria \' |\n+----------------+-------------------+\n| 0 | 1 |\n+----------------+-------------------+\n \nDifference between VARCHAR and TEXT\n \nVARCHAR columns can be fully indexed. TEXT columns can only\nbe indexed over a specified length.\nUsing TEXT or BLOB in a SELECT query that uses temporary\ntables for storing intermediate results will force the\ntemporary table to be disk based (using the Aria storage\nengine instead of the memory storage engine, which is a bit\nslower. This is not that bad as the Aria storage engine\ncaches the rows in memory. To get the benefit of this, one\nshould ensure that the aria_pagecache_buffer_size variable\nis big enough to hold most of the row and index data for\ntemporary tables.\n \nFor Storage Engine Developers\n \nInternally the full length of the VARCHAR column is\nallocated inside each TABLE objects record[] structure. As\nthere are three such buffers, each open table will allocate\n3 times max-length-to-store-varchar bytes of memory.\nTEXT and BLOB columns are stored with a pointer (4 or 8\nbytes) + a 1-4 bytes length. The TEXT data is only stored\nonce. This means that internally TEXT uses less memory for\neach open table but instead has the additional overhead that\neach TEXT object needs to be allocated and freed for each\nrow access (with some caching in between).\n \n\n\nURL: https://mariadb.com/kb/en/text/','','https://mariadb.com/kb/en/text/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (292,22,'TIME','Syntax\n------ \nTIME [()]\n \nDescription\n----------- \nA time. The range is \'-838:59:59.999999\' to\n\'838:59:59.999999\'. Microsecond precision can be from 0-6;\nif not specified 0 is used. Microseconds have been available\nsince MariaDB 5.3. \n \nMariaDB displays TIME values in \'HH:MM:SS.ssssss\' format,\nbut allows assignment of times in looser formats, including\n\'D HH:MM:SS\', \'HH:MM:SS\', \'HH:MM\', \'D HH:MM\', \'D\nHH\', \'SS\', or \'HHMMSS\', as well as permitting dropping\nof any leading zeros when a delimiter is provided, for\nexample \'3:9:10\'. For details, see date and time literals.\n \nMariaDB 10.1.2 introduced the --mysql56-temporal-format\noption, on by default, which allows MariaDB to store TIMEs\nusing the same low-level format MySQL 5.6 uses.\n \nInternal Format\n \nIn MariaDB 10.1.2 a new temporal format was introduced from\nMySQL 5.6 that alters how the TIME, DATETIME and TIMESTAMP\ncolumns operate at lower levels. These changes allow these\ntemporal data types to have fractional parts and negative\nvalues. You can disable this feature using the\nmysql56_temporal_format system variable.\n \nTables that include TIMESTAMP values that were created on an\nolder version of MariaDB or that were created while the\nmysql56_temporal_format system variable was disabled\ncontinue to store data using the older data type format.\n \nIn order to update table columns from the older format to\nthe newer format, execute an ALTER TABLE... MODIFY COLUMN\nstatement that changes the column to the *same* data type.\nThis change may be needed if you want to export the table\'s\ntablespace and import it onto a server that has\nmysql56_temporal_format=ON set (see MDEV-15225).\n \nFor instance, if you have a TIME column in your table: \n \nSHOW VARIABLES LIKE \'mysql56_temporal_format\';\n \n+-------------------------+-------+\n| Variable_name | Value |\n+-------------------------+-------+\n| mysql56_temporal_format | ON |\n+-------------------------+-------+\n \nALTER TABLE example_table MODIFY ts_col TIME;\n \nWhen MariaDB executes the ALTER TABLE statement, it converts\nthe data from the older temporal format to the newer one. \n \nIn the event that you have several tables and columns using\ntemporal data types that you want to switch over to the new\nformat, make sure the system variable is enabled, then\nperform a dump and restore using mysqldump. The columns\nusing relevant temporal data types are restored using the\nnew temporal format.\n \nExamples\n-------- \nINSERT INTO time VALUES (\'90:00:00\'), (\'800:00:00\'),\n(800), (22), (151413), (\'9:6:3\'), (\'12 09\');\n \nSELECT * FROM time;\n+-----------+\n| t |\n+-----------+\n| 90:00:00 |\n| 800:00:00 |\n| 00:08:00 |\n| 00:00:22 |\n| 15:14:13 |\n| 09:06:03 |\n| 297:00:00 |\n+-----------+\n \n\n\nURL: https://mariadb.com/kb/en/time/','','https://mariadb.com/kb/en/time/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (293,22,'TIMESTAMP','Syntax\n------ \nTIMESTAMP [(\n\nURL: https://mariadb.com/kb/en/timestamp/','','https://mariadb.com/kb/en/timestamp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (294,22,'TINYBLOB','Syntax\n------ \nTINYBLOB\n \nDescription\n----------- \nA BLOB column with a maximum length of \n255 (28 - 1) bytes. Each\nTINYBLOB value is stored using a one-byte length prefix that\nindicates\nthe number of bytes in the value.\n \n\n\nURL: https://mariadb.com/kb/en/tinyblob/','','https://mariadb.com/kb/en/tinyblob/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (295,22,'TINYINT','Syntax\n------ \nTINYINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]\n \nDescription\n----------- \nA very small integer. The signed range is -128 to 127. The\nunsigned range is 0 to 255. For details on the attributes,\nsee Numeric Data Type Overview.\n \nExamples\n-------- \nCREATE TABLE tinyints (a TINYINT,b TINYINT UNSIGNED,c\nTINYINT ZEROFILL);\nQuery OK, 0 rows affected (0.43 sec)\n \nINSERT INTO tinyints VALUES (-10,-10,-10);\nQuery OK, 1 row affected, 2 warnings (0.08 sec)\nWarning (Code 1264): Out of range value for column \'b\' at\nrow 1\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO tinyints VALUES (-10,10,-10);\nQuery OK, 1 row affected, 1 warning (0.11 sec)\nWarning (Code 1264): Out of range value for column \'c\' at\nrow 1\n \nINSERT INTO tinyints VALUES (-10,10,10);\n \nSELECT * FROM tinyints;\n+------+------+------+\n| a | b | c |\n+------+------+------+\n| -10 | 0 | 000 |\n| -10 | 10 | 000 |\n| -10 | 10 | 010 |\n+------+------+------+\n \nINSERT INTO tinyints VALUES (128,128,128);\nQuery OK, 1 row affected, 1 warning (0.19 sec)\nWarning (Code 1264): Out of range value for column \'a\' at\nrow 1\n \nINSERT INTO tinyints VALUES (127,128,128);\n \nSELECT * FROM tinyints;\n+------+------+------+\n| a | b | c |\n+------+------+------+\n| -10 | 0 | 000 |\n| -10 | 10 | 000 |\n| -10 | 10 | 010 |\n| 127 | 128 | 128 |\n| 127 | 128 | 128 |\n+------+------+------+\n \n\n\nURL: https://mariadb.com/kb/en/tinyint/','','https://mariadb.com/kb/en/tinyint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (296,22,'TINYTEXT','Syntax\n------ \nTINYTEXT [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA TEXT column with a maximum length of 255 (28 - 1)\ncharacters. The effective maximum length is less if the\nvalue contains multi-byte characters. Each TINYTEXT value is\nstored using a one-byte length prefix that indicates the\nnumber of bytes in the value.\n \n\n\nURL: https://mariadb.com/kb/en/tinytext/','','https://mariadb.com/kb/en/tinytext/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (297,22,'VARBINARY','Syntax\n------ \nVARBINARY(M)\n \nDescription\n----------- \nThe VARBINARY type is similar to the VARCHAR type, but\nstores binary byte strings rather than non-binary character\nstrings. M represents the maximum column length in bytes. \n \nIt contains no character set, and comparison and sorting are\nbased on the numeric value of the bytes.\n \nIf the maximum length is exceeded, and SQL strict mode is\nnot enabled , the extra characters will be dropped with a\nwarning. If strict mode is enabled, an error will occur.\n \nUnlike BINARY values, VARBINARYs are not right-padded when\ninserting.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, RAW is a synonym for\nVARBINARY.\n \nExamples\n-------- \nInserting too many characters, first with strict mode off,\nthen with it on:\n \nCREATE TABLE varbins (a VARBINARY(10));\n \nINSERT INTO varbins VALUES(\'12345678901\');\nQuery OK, 1 row affected, 1 warning (0.04 sec)\n \nSELECT * FROM varbins;\n \n+------------+\n| a |\n+------------+\n| 1234567890 |\n+------------+\n \nSET sql_mode=\'STRICT_ALL_TABLES\';\n \nINSERT INTO varbins VALUES(\'12345678901\');\nERROR 1406 (22001): Data too long for column \'a\' at row 1\n \nSorting is performed with the byte value:\n \nTRUNCATE varbins;\n \nINSERT INTO varbins VALUES(\'A\'),(\'B\'),(\'a\'),(\'b\');\n \nSELECT * FROM varbins ORDER BY a;\n \n+------+\n| a |\n+------+\n| A |\n| B |\n| a |\n| b |\n+------+\n \nUsing CAST to sort as a CHAR instead:\n \nSELECT * FROM varbins ORDER BY CAST(a AS CHAR);\n+------+\n| a |\n+------+\n| a |\n| A |\n| b |\n| B |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/varbinary/','','https://mariadb.com/kb/en/varbinary/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (298,22,'VARCHAR','Syntax\n------ \n[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n \nDescription\n----------- \nA variable-length string. M represents the maximum column\nlength in\ncharacters. The range of M is 0 to 65,532. The effective\nmaximum\nlength of a VARCHAR is subject to the maximum row size and\nthe character set used. For\nexample, utf8 characters can require up to three bytes per\ncharacter,\nso a VARCHAR column that uses the utf8 character set can be\ndeclared\nto be a maximum of 21,844 characters.\n \nMariaDB stores VARCHAR values as a one-byte or two-byte\nlength prefix\nplus data. The length prefix indicates the number of bytes\nin the\nvalue. A VARCHAR column uses one length byte if values\nrequire no more\nthan 255 bytes, two length bytes if values may require more\nthan 255\nbytes.\n \nNote: MariaDB 5.1 and later follow the standard SQL\nspecification, \nand do not remove trailing spaces from VARCHAR values.\n \nVARCHAR(0) columns can contain 2 values: an empty string or\nNULL. Such columns cannot be part of an index. The CONNECT\nstorage engine does not support VARCHAR(0).\n \nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR\nis the\nstandard SQL way to define that a VARCHAR column should use\nsome\npredefined character set. MariaDB uses utf8 as this\npredefined character set, as does MySQL 4.1 and up.\nNVARCHAR is shorthand for NATIONAL VARCHAR.\n \nBefore MariaDB 10.2, all MariaDB collations were of type\nPADSPACE, meaning that VARCHAR (as well as CHAR and TEXT\nvalues) are compared without regard for trailing spaces.\nThis does not apply to the LIKE pattern-matching operator,\nwhich takes into account trailing spaces. From MariaDB 10.2,\na number of NO PAD collations are available.\n \nIf a unique index consists of a column where trailing pad\ncharacters are stripped or ignored, inserts into that column\nwhere values differ only by the number of trailing pad\ncharacters will result in a duplicate-key error.\n \nExamples\n-------- \nThe following are equivalent:\n \nVARCHAR(30) CHARACTER SET utf8\nNATIONAL VARCHAR(30)\nNVARCHAR(30)\nNCHAR VARCHAR(30)\nNATIONAL CHARACTER VARYING(30)\nNATIONAL CHAR VARYING(30)\n \nTrailing spaces:\n \nCREATE TABLE strtest (v VARCHAR(10));\nINSERT INTO strtest VALUES(\'Maria \');\n \nSELECT v=\'Maria\',v=\'Maria \' FROM strtest;\n+-----------+--------------+\n| v=\'Maria\' | v=\'Maria \' |\n+-----------+--------------+\n| 1 | 1 |\n+-----------+--------------+\n \nSELECT v LIKE \'Maria\',v LIKE \'Maria \' FROM strtest;\n+----------------+-------------------+\n| v LIKE \'Maria\' | v LIKE \'Maria \' |\n+----------------+-------------------+\n| 0 | 1 |\n+----------------+-------------------+\n \nTruncation\n \nDepending on whether or not strict sql mode is set, you will\neither get a warning or an error if you try to insert a\nstring that is too long into a VARCHAR column. If the extra\ncharacters are spaces, the spaces that can\'t fit will be\nremoved and you will always get a warning, regardless of the\nsql mode setting.\n \nDifference Between VARCHAR and TEXT\n \nVARCHAR columns can be fully indexed. TEXT columns can only\nbe indexed over a specified length.\nUsing TEXT or BLOB in a SELECT query that uses temporary\ntables for storing intermediate results will force the\ntemporary table to be disk based (using the Aria storage\nengine instead of the memory storage engine, which is a bit\nslower. This is not that bad as the Aria storage engine\ncaches the rows in memory. To get the benefit of this, one\nshould ensure that the aria_pagecache_buffer_size variable\nis big enough to hold most of the row and index data for\ntemporary tables.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, VARCHAR2 is a synonym.\n \nFor Storage Engine Developers\n \nInternally the full length of the VARCHAR column is\nallocated inside each TABLE objects record[] structure. As\nthere are three such buffers, each open table will allocate\n3 times max-length-to-store-varchar bytes of memory.\nTEXT and BLOB columns are stored with a pointer (4 or 8\nbytes) + a 1-4 bytes length. The TEXT data is only stored\nonce. This means that internally TEXT uses less memory for\neach open table but instead has the additional overhead that\neach TEXT object needs to be allocated and freed for each\nrow access (with some caching in between).\n \n\n\nURL: https://mariadb.com/kb/en/varchar/','','https://mariadb.com/kb/en/varchar/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (299,22,'YEAR Data Type','Syntax\n------ \nYEAR[(4)]\n \nDescription\n----------- \nA year in two-digit or four-digit format. The default is\nfour-digit format. Note that the two-digit format has been\ndeprecated since 5.5.27. \n \nIn four-digit format, the allowable values are 1901 to 2155,\nand 0000. In two-digit format, the allowable values are 70\nto 69,\nrepresenting years from 1970 to 2069. MariaDB displays YEAR\nvalues in\nYYYY format, but allows you to assign values to YEAR columns\nusing\neither strings or numbers.\n \nInserting numeric zero has a different result for YEAR(4)\nand YEAR(2). For YEAR(2), the value 00 reflects the year\n2000. For YEAR(4), the value 0000 reflects the year zero.\nThis only applies to numeric zero. String zero always\nreflects the year 2000.\n \nExamples\n-------- \nAccepting a string or a number:\n \nCREATE TABLE y(y YEAR);\n \nINSERT INTO y VALUES (1990),(\'2012\');\n \nSELECT * FROM y;\n+------+\n| y |\n+------+\n| 1990 |\n| 2012 |\n+------+\n \nOut of range:\n \nINSERT INTO y VALUES (1005),(\'3080\');\nQuery OK, 2 rows affected, 2 warnings (0.05 sec)\nRecords: 2 Duplicates: 0 Warnings: 2\n \nSHOW WARNINGS;\n+---------+------+--------------------------------------------+\n| Level | Code | Message |\n+---------+------+--------------------------------------------+\n| Warning | 1264 | Out of range value for column \'y\' at\nrow 1 |\n| Warning | 1264 | Out of range value for column \'y\' at\nrow 2 |\n+---------+------+--------------------------------------------+\n \nSELECT * FROM y;\n+------+\n| y |\n+------+\n| 1990 |\n| 2012 |\n| 0000 |\n| 0000 |\n+------+\n \nTruncating:\n \nINSERT INTO y VALUES (\'2013-12-12\');\nQuery OK, 1 row affected, 1 warning (0.05 sec)\n \nSHOW WARNINGS;\n+---------+------+----------------------------------------+\n| Level | Code | Message |\n+---------+------+----------------------------------------+\n| Warning | 1265 | Data truncated for column \'y\' at row 1\n|\n+---------+------+----------------------------------------+\n \nSELECT * FROM y;\n+------+\n| y |\n+------+\n| 1990 |\n| 2012 |\n| 0000 |\n| 0000 |\n| 2013 |\n+------+\n \nDifference between YEAR(2) and YEAR(4), and string and\nnumeric zero:\n \nCREATE TABLE y2(y YEAR(4), y2 YEAR(2));\nQuery OK, 0 rows affected, 1 warning (0.40 sec)\n \nNote (Code 1287): \'YEAR(2)\' is deprecated and will be\nremoved in a future release. Please use YEAR(4) instead\n \nINSERT INTO y2 VALUES(0,0),(\'0\',\'0\');\n \nSELECT YEAR(y),YEAR(y2) FROM y;\n+---------+----------+\n| YEAR(y) | YEAR(y2) |\n+---------+----------+\n| 0 | 2000 |\n| 2000 | 2000 |\n+---------+----------+\n \n\n\nURL: https://mariadb.com/kb/en/year-data-type/','','https://mariadb.com/kb/en/year-data-type/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (300,23,'BEGIN END','Syntax\n------ \n[begin_label:] BEGIN [NOT ATOMIC]\n [statement_list]\nEND [end_label]\n \nNOT ATOMIC is required when used outside of a stored\nprocedure. Inside stored procedures or within an anonymous\nblock, BEGIN alone starts a new anonymous block.\n \nDescription\n----------- \nBEGIN ... END syntax is used for writing compound\nstatements. A compound statement can contain multiple\nstatements, enclosed by the BEGIN and END keywords.\nstatement_list represents a list of one or more statements,\neach\nterminated by a semicolon (i.e., ;) statement delimiter.\nstatement_list is\noptional, which means that the empty compound statement\n(BEGIN END) is\nlegal.\n \nNote that END will perform a commit. If you are running in\nautocommit mode, every statement will be committed\nseparately. If you are not running in autocommit mode, you\nmust execute a COMMIT or ROLLBACK after END to get the\ndatabase up to date.\n \nUse of multiple statements requires that a client is able to\nsend statement strings containing the ; statement delimiter.\nThis is handled in the mysql command-line client with the\nDELIMITER command.\nChanging the ; end-of-statement delimiter (for example, to\n//) allows ; to be used in a program body.\n \nA compound statement within a stored program can be\nlabeled. end_label cannot be given unless begin_label also\nis present. If both are present, they must be the same.\n \nBEGIN ... END constructs can be nested. Each block can\ndefine its own variables, a CONDITION, a HANDLER and a\nCURSOR, which don\'t exist in the outer blocks. The most\nlocal declarations override the outer objects which use the\nsame name (see example below).\n \nThe declarations order is the following:\nDECLARE local variables;\nDECLARE CONDITIONs;\nDECLARE CURSORs;\nDECLARE HANDLERs;\n \nNote that DECLARE HANDLER contains another BEGIN ... END\nconstruct.\n \nHere is an example of a very simple, anonymous block:\n \nBEGIN NOT ATOMIC\nSET @a=1;\n \nCREATE TABLE test.t1(a INT);\nEND|\n \nBelow is an example of nested blocks in a stored procedure:\n \nCREATE PROCEDURE t( )\nBEGIN\n DECLARE x TINYINT UNSIGNED DEFAULT 1;\n \n BEGIN\n DECLARE x CHAR(2) DEFAULT \'02\';\n \n DECLARE y TINYINT UNSIGNED DEFAULT 10;\n \n SELECT x, y;\n \n END;\n \n SELECT x;\n \nEND;\n \nIn this example, a TINYINT variable, x is declared in the\noutter block. But in the inner block x is re-declared as a\nCHAR and an y variable is declared. The inner SELECT shows\nthe \"new\" value of x, and the value of y. But when x is\nselected in the outer block, the \"old\" value is returned.\nThe final SELECT doesn\'t try to read y, because it doesn\'t\nexist in that context.\n \n\n\nURL: https://mariadb.com/kb/en/begin-end/','','https://mariadb.com/kb/en/begin-end/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (301,23,'CASE Statement','Syntax\n------ \nCASE case_value\n WHEN when_value THEN statement_list\n [WHEN when_value THEN statement_list] ...\n [ELSE statement_list]\nEND CASE\n \nOr:\n \nCASE\n WHEN search_condition THEN statement_list\n [WHEN search_condition THEN statement_list] ...\n [ELSE statement_list] \nEND CASE\n \nDescription\n----------- \nThe CASE statement for stored programs implements a complex\nconditional\nconstruct. If a search_condition evaluates to true, the\ncorresponding SQL\nstatement list is executed. If no search condition matches,\nthe statement list\nin the ELSE clause is executed. Each statement_list consists\nof one or\nmore statements.\n \nIf no when_value or search_condition matches the value\ntested and the CASE\nstatement contains no ELSE clause, a Case not found for CASE\nstatement\nerror results.\n \nEach statement_list consists of one or more statements; an\nempty\nstatement_list is not allowed. To handle situations where no\nvalue is\nmatched by any WHEN clause, use an ELSE containing an\nempty BEGIN ... END block, as shown in this example:\n \nDELIMITER |\nCREATE PROCEDURE p()\nBEGIN\n DECLARE v INT DEFAULT 1;\n \n CASE v\n WHEN 2 THEN SELECT v;\n \n WHEN 3 THEN SELECT 0;\n \n ELSE BEGIN END;\n \n END CASE;\n \nEND;\n \n|\n \nThe indentation used here in the ELSE clause is for purposes\nof clarity only,\nand is not otherwise significant. See Delimiters in the\nmysql client for more on the use of the delimiter command.\n \nNote: The syntax of the CASE statement used inside stored\nprograms\ndiffers slightly from that of the SQL CASE expression\ndescribed in\nCASE OPERATOR.\nThe CASE statement cannot have an ELSE NULL clause, and it\nis\nterminated with END CASE instead of END.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/case-statement/','','https://mariadb.com/kb/en/case-statement/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (302,23,'CLOSE','Syntax\n------ \nCLOSE cursor_name\n \nDescription\n----------- \nThis statement closes a previously opened cursor. The cursor\nmust have been previously opened or else an error occurs.\n \nIf not closed explicitly, a cursor is closed at the end of\nthe\ncompound statement in which it was declared.\n \nSee Cursor Overview for an example.\n \n\n\nURL: https://mariadb.com/kb/en/close/','','https://mariadb.com/kb/en/close/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (303,23,'DECLARE CONDITION','Syntax\n------ \nDECLARE condition_name CONDITION FOR condition_value\n \ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | mysql_error_code\n \nDescription\n----------- \nThe DECLARE ... CONDITION statement defines a named error\ncondition.\nIt specifies a condition that needs specific handling and\nassociates a\nname with that condition. Later, the name can be used in a\nDECLARE ... HANDLER, SIGNAL or RESIGNAL statement (as long\nas the statement is located in the same BEGIN ... END\nblock).\n \nConditions must be declared after local variables, but\nbefore CURSORs and HANDLERs.\n \nA condition_value for DECLARE ... CONDITION can be an\nSQLSTATE value (a\n5-character string literal) or a MySQL error code (a\nnumber). You should not\nuse SQLSTATE value \'00000\' or MySQL error code 0, because\nthose indicate sucess\nrather than an error condition. If you try, or if you\nspecify an invalid SQLSTATE value, an error like this is\nproduced:\n \nERROR 1407 (42000): Bad SQLSTATE: \'00000\'\n \nFor a list of SQLSTATE values and MariaDB error\ncodes, see MariaDB Error Codes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/declare-condition/','','https://mariadb.com/kb/en/declare-condition/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (304,23,'DECLARE CURSOR','Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/declare-cursor/','','https://mariadb.com/kb/en/declare-cursor/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (305,23,'DECLARE HANDLER','Syntax\n------ \nDECLARE handler_type HANDLER\n FOR condition_value [, condition_value] ...\n statement\n \nhandler_type:\n CONTINUE\n | EXIT \n | UNDO\n \ncondition_value:\n SQLSTATE [VALUE] sqlstate_value\n | condition_name\n | SQLWARNING\n | NOT FOUND\n | SQLEXCEPTION\n | mariadb_error_code\n \nDescription\n----------- \nThe DECLARE ... HANDLER statement specifies handlers that\neach may\ndeal with one or more conditions. If one of these conditions\noccurs,\nthe specified statement is executed. statement can be a\nsimple\nstatement (for example, SET var_name = value), or it can be\na compound\nstatement written using BEGIN and END.\n \nHandlers must be declared after local variables, a CONDITION\nand a CURSOR.\n \nFor a CONTINUE handler, execution of the current program\ncontinues\nafter execution of the handler statement. For an EXIT\nhandler,\nexecution terminates for the BEGIN ... END compound\nstatement in which\nthe handler is declared. (This is true even if the condition\noccurs in\nan inner block.) The UNDO handler type statement is not\nsupported.\n \nIf a condition occurs for which no handler has been\ndeclared, the\ndefault action is EXIT.\n \nA condition_value for DECLARE ... HANDLER can be any of the\nfollowing\nvalues:\nAn SQLSTATE value (a 5-character string literal) or a\nMariaDB error\ncode (a number). You should not use SQLSTATE value \'00000\'\nor MariaDB\nerror code 0, because those indicate sucess rather than an\nerror\ncondition. For a list of SQLSTATE values and MariaDB error\ncodes, see\nMariaDB Error Codes.\nA condition name previously specified with DECLARE ...\nCONDITION. It must be in the same stored program. See\nDECLARE CONDITION.\nSQLWARNING is shorthand for the class of SQLSTATE values\nthat begin\nwith \'01\'.\nNOT FOUND is shorthand for the class of SQLSTATE values that\nbegin\nwith \'02\'. This is relevant only the context of cursors\nand is used to\ncontrol what happens when a cursor reaches the end of a data\nset. If\nno more rows are available, a No Data condition occurs with\nSQLSTATE\nvalue 02000. To detect this condition, you can set up a\nhandler for it\n(or for a NOT FOUND condition). An example is shown in\nCursor Overview. This condition also occurs for SELECT ...\nINTO var_list statements that retrieve no\nrows.\nSQLEXCEPTION is shorthand for the class of SQLSTATE values\nthat do\nnot begin with \'00\', \'01\', or \'02\'.\n \nWhen an error raises, in some cases it could be handled by\nmultiple HANDLERs. For example, there may be an handler for\n1050 error, a separate handler for the 42S01 SQLSTATE, and\nanother separate handler for the SQLEXCEPTION class: in\ntheory all occurrences of HANDLER may catch the 1050 error,\nbut MariaDB chooses the HANDLER with the highest precedence.\nHere are the precedence rules:\nHandlers which refer to an error code have the highest\nprecedence.\nHandlers which refer to a SQLSTATE come next.\nHandlers which refer to an error class have the lowest\nprecedence.\n \nIn some cases, a statement could produce multiple errors. If\nthis happens, in some cases multiple handlers could have the\nhighest precedence. In such cases, the choice of the handler\nis indeterminate.\n \nNote that if an error occurs within a CONTINUE HANDLER\nblock, it can be handled by another HANDLER. However, a\nHANDLER which is already in the stack (that is, it has been\ncalled to handle an error and its execution didn\'t finish\nyet) cannot handle new errors—this prevents endless loops.\nFor example, suppose that a stored procedure contains a\nCONTINUE HANDLER for SQLWARNING and another CONTINUE HANDLER\nfor NOT FOUND. At some point, a NOT FOUND error occurs, and\nthe execution enters the NOT FOUND HANDLER. But within that\nhandler, a warning occurs, and the execution enters the\nSQLWARNING HANDLER. If another NOT FOUND error occurs, it\ncannot be handled again by the NOT FOUND HANDLER, because\nits execution is not finished.\n \nWhen a DECLARE HANDLER block can handle more than one error\ncondition, it may be useful to know which errors occurred.\nTo do so, you can use the GET DIAGNOSTICS statement.\n \nAn error that is handled by a DECLARE HANDLER construct can\nbe issued again using the RESIGNAL statement.\n \nBelow is an example using DECLARE HANDLER:\n \nCREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));\n \nDELIMITER //\n \nCREATE PROCEDURE handlerdemo ( )\n BEGIN\n DECLARE CONTINUE HANDLER FOR SQLSTATE \'23000\' SET @x2 =\n1;\n \n SET @x = 1;\n \n INSERT INTO test.t VALUES (1);\n SET @x = 2;\n \n INSERT INTO test.t VALUES (1);\n SET @x = 3;\n \n END;\n \n //\n \nDELIMITER ;\n \nCALL handlerdemo( );\n \nSELECT @x;\n \n+------+\n| @x |\n+------+\n| 3 |\n+------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/declare-handler/','','https://mariadb.com/kb/en/declare-handler/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (306,23,'DECLARE Variable','Syntax\n------ \nDECLARE var_name [, var_name] ... [[ROW] TYPE OF]] type\n[DEFAULT value]\n \nDescription\n----------- \nThis statement is used to declare local variables within\nstored programs. To\nprovide a default value for the variable, include a DEFAULT\nclause. The\nvalue can be specified as an expression (even subqueries are\npermitted); it need not be a constant. If the\nDEFAULT clause is missing, the initial value is NULL.\n \nLocal variables are treated like stored routine parameters\nwith respect to data\ntype and overflow checking. See CREATE PROCEDURE.\n \nLocal variables must be declared before CONDITIONs, CURSORs\nand HANDLERs.\n \nLocal variable names are not case sensitive.\n \nThe scope of a local variable is within the BEGIN ... END\nblock where it is\ndeclared. The variable can be referred to in blocks nested\nwithin the declaring\nblock, except those blocks that declare a variable with the\nsame name.\n \nTYPE OF / ROW TYPE OF\n \nTYPE OF and ROW TYPE OF anchored data types for stored\nroutines were introduced in MariaDB 10.3.\n \nAnchored data types allow a data type to be defined based on\nanother object, such as a table row, rather than\nspecifically set in the declaration. If the anchor object\nchanges, so will the anchored data type. This can lead to\nroutines being easier to maintain, so that if the data type\nin the table is changed, it will automatically be changed in\nthe routine as well.\n \nVariables declared with ROW TYPE OF will have the same\nfeatures as implicit ROW variables. It is not possible to\nuse ROW TYPE OF variables in a LIMIT clause.\n \nThe real data type of TYPE OF and ROW TYPE OF table_name\nwill become known at the very beginning of the stored\nroutine call. ALTER TABLE or DROP TABLE statements performed\ninside the current routine on the tables that appear in\nanchors won\'t affect the data type of the anchored\nvariables, even if the variable is declared after an ALTER\nTABLE or DROP TABLE statement.\n \nThe real data type of a ROW TYPE OF cursor_name variable\nwill become known when execution enters into the block where\nthe variable is declared. Data type instantiation will\nhappen only once. In a cursor ROW TYPE OF variable that is\ndeclared inside a loop, its data type will become known on\nthe very first iteration and won\'t change on further loop\niterations.\n \nThe tables referenced in TYPE OF and ROW TYPE OF\ndeclarations will be checked for existence at the beginning\nof the stored routine call. CREATE PROCEDURE or CREATE\nFUNCTION will not check the referenced tables for existence.\n \nExamples\n-------- \nTYPE OF and ROW TYPE OF from MariaDB 10.3:\n \nDECLARE tmp TYPE OF t1.a;\n -- Get the data type from the column {{a}} in the table\n{{t1}}\n \nDECLARE rec1 ROW TYPE OF t1;\n -- Get the row data type from the table {{t1}}\n \nDECLARE rec2 ROW TYPE OF cur1;\n -- Get the row data type from the cursor {{cur1}}\n \n\n\nURL: https://mariadb.com/kb/en/declare-variable/','','https://mariadb.com/kb/en/declare-variable/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (307,23,'FETCH','Syntax\n------ \nFETCH cursor_name INTO var_name [, var_name] ...\n \nDescription\n----------- \nThis statement fetches the next row (if a row exists) using\nthe\nspecified open cursor, and advances the cursor pointer.\n \nvar_name can be a local variable, but not a user-defined\nvariable.\n \nIf no more rows are available, a No Data condition occurs\nwith\nSQLSTATE value 02000. To detect this condition, you can set\nup a\nhandler for it (or for a NOT FOUND condition).\n \nSee Cursor Overview for an example.\n \n\n\nURL: https://mariadb.com/kb/en/fetch/','','https://mariadb.com/kb/en/fetch/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (308,23,'FOR','FOR loops were introduced in MariaDB 10.3.\n \nSyntax\n------ \nInteger range FOR loop:\n \n[begin_label:]\nFOR var_name IN [ REVERSE ] lower_bound .. upper_bound\nDO statement_list\nEND FOR [ end_label ]\n \nExplicit cursor FOR loop\n \n[begin_label:]\nFOR record_name IN cursor_name [ (\ncursor_actual_parameter_list)]\nDO statement_list\nEND FOR [ end_label ]\n \nExplicit cursor FOR loop (Oracle mode)\n \n[begin_label:]\nFOR record_name IN cursor_name [ (\ncursor_actual_parameter_list)]\nLOOP\n statement_list\nEND LOOP [ end_label ]\n \nImplicit cursor FOR loop\n \n[begin_label:]\nFOR record_name IN ( select_statement )\nDO statement_list\nEND FOR [ end_label ]\n \nDescription\n----------- \nFOR loops allow code to be executed a fixed number of times.\n \nIn an integer range FOR loop, MariaDB will compare the lower\nbound and upper bound values, and assign the lower bound\nvalue to a counter. If REVERSE is not specified, and the\nupper bound value is greater than or equal to the counter,\nthe counter will be incremented and the statement will\ncontinue, after which the loop is entered again. If the\nupper bound value is greater than the counter, the loop will\nbe exited.\n \nIf REVERSE is specified, the counter is decremented, and the\nupper bound value needs to be less than or equal for the\nloop to continue.\n \nExamples\n-------- \nIntger range FOR loop:\n \nCREATE TABLE t1 (a INT);\n \nDELIMITER //\n \nFOR i IN 1..3\nDO\n INSERT INTO t1 VALUES (i);\nEND FOR;\n \n//\n \nDELIMITER ;\n \nSELECT * FROM t1;\n \n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n+------+\n \nREVERSE integer range FOR loop:\n \nCREATE OR REPLACE TABLE t1 (a INT);\n \nDELIMITER //\nFOR i IN REVERSE 12..4\n DO\n INSERT INTO t1 VALUES (i);\nEND FOR;\n \n//\nQuery OK, 9 rows affected (0.422 sec)\n \nDELIMITER ;\n \nSELECT * FROM t1;\n \n+------+\n| a |\n+------+\n| 12 |\n| 11 |\n| 10 |\n| 9 |\n| 8 |\n| 7 |\n| 6 |\n| 5 |\n| 4 |\n+------+\n \nExplicit cursor in Oracle mode:\n \nSET sql_mode=ORACLE;\n \nCREATE OR REPLACE TABLE t1 (a INT, b VARCHAR(32));\n \nINSERT INTO t1 VALUES (10,\'b0\');\nINSERT INTO t1 VALUES (11,\'b1\');\nINSERT INTO t1 VALUES (12,\'b2\');\n \nDELIMITER //\n \nCREATE OR REPLACE PROCEDURE p1(pa INT) AS \n CURSOR cur(va INT) IS\n SELECT a, b FROM t1 WHERE a=va;\n \nBEGIN\n FOR rec IN cur(pa)\n LOOP\n SELECT rec.a, rec.b;\n \n END LOOP;\n \nEND;\n \n//\n \nDELIMITER ;\n \nCALL p1(10);\n+-------+-------+\n| rec.a | rec.b |\n+-------+-------+\n| 10 | b0 |\n+-------+-------+\n \nCALL p1(11);\n+-------+-------+\n| rec.a | rec.b |\n+-------+-------+\n| 11 | b1 |\n+-------+-------+\n \nCALL p1(12);\n+-------+-------+\n| rec.a | rec.b |\n+-------+-------+\n| 12 | b2 |\n+-------+-------+\n \nCALL p1(13);\nQuery OK, 0 rows affected (0.000 sec)\n \n\n\nURL: https://mariadb.com/kb/en/for/','','https://mariadb.com/kb/en/for/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (309,23,'GOTO','The GOTO statement was introduced in MariaDB 10.3 for Oracle\ncompatibility.\n \nSyntax\n------ \nGOTO label\n \nDescription\n----------- \nThe GOTO statement causes the code to jump to the specified\nlabel, and continue operating from there. It is only\naccepted when in Oracle mode.\n \nExample\n \nSET sql_mode=ORACLE;\n \nDELIMITER //\n \nCREATE OR REPLACE PROCEDURE p1 AS\n \nBEGIN\n \n SELECT 1;\n \n GOTO label;\n \n SELECT 2;\n \n SELECT 3;\n \nEND;\n \n//\n \nDELIMITER \n \ncall p1();\n+---+\n| 1 |\n+---+\n| 1 |\n+---+\n1 row in set (0.000 sec)\n \n+---+\n| 3 |\n+---+\n| 3 |\n+---+\n1 row in set (0.000 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/goto/','','https://mariadb.com/kb/en/goto/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (310,23,'IF','Syntax\n------ \nIF search_condition THEN statement_list\n [ELSEIF search_condition THEN statement_list] ...\n [ELSE statement_list]\nEND IF;\n \nDescription\n----------- \nIF implements a basic conditional construct. If the\nsearch_condition\nevaluates to true, the corresponding SQL statement list is\nexecuted.\nIf no search_condition matches, the statement list in the\nELSE clause\nis executed. Each statement_list consists of one or more\nstatements.\n \n\n\nURL: https://mariadb.com/kb/en/if/','','https://mariadb.com/kb/en/if/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (311,23,'ITERATE','Syntax\n------ \nITERATE label\n \nITERATE can appear only within LOOP, REPEAT, and WHILE\nstatements.\nITERATE means \"do the loop again\", and uses the\nstatement\'s label to determine which statements to repeat.\nThe label must be in the same stored program, not in a\ncaller procedure.\n \nIf you try to use ITERATE with a non-existing label, or if\nthe label is associated to a construct which is not a loop,\nthe following error will be produced:\n \nERROR 1308 (42000): ITERATE with no matching label: \n \nBelow is an example of how ITERATE might be used:\n \nCREATE PROCEDURE doiterate(p1 INT)\nBEGIN\n label1: LOOP\n SET p1 = p1 + 1;\n \n IF p1 \n\nURL: https://mariadb.com/kb/en/iterate/','','https://mariadb.com/kb/en/iterate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (312,23,'Labels','Syntax\n------ \nlabel: \n[label]\n \nLabels are MariaDB identifiers which can be used to identify\na BEGIN ... END construct or a loop. They have a maximum\nlength of 16 characters and can be quoted with backticks\n(i.e.., `).\n \nLabels have a start part and an end part. The start part\nmust precede the portion of code it refers to, must be\nfollowed by a colon (:) and can be on the same or different\nline. The end part is optional and adds nothing, but can\nmake the code more readable. If used, the end part must\nprecede the construct\'s delimiter (;). Constructs\nidentified by a label can be nested. Each construct can be\nidentified by only one label.\n \nLabels need not be unique in the stored program they belong\nto. However, a label for an inner loop cannot be identical\nto a label for an outer loop. In this case, the following\nerror would be produced:\n \nERROR 1309 (42000): Redefining label \n \nLEAVE and ITERATE statements can be used to exit or repeat a\nportion of code identified by a label. They must be in the\nsame Stored Routine, Trigger or Event which contains the\ntarget label.\n \nBelow is an example using a simple label that is used to\nexit a LOOP:\n \nCREATE PROCEDURE `test_sp`()\nBEGIN\n `my_label`:\n LOOP\n SELECT \'looping\';\n \n LEAVE `my_label`;\n \n END LOOP;\n \n SELECT \'out of loop\';\n \nEND;\n \nThe following label is used to exit a procedure, and has an\nend part:\n \nCREATE PROCEDURE `test_sp`()\n`my_label`:\nBEGIN\n IF @var = 1 THEN\n LEAVE `my_label`;\n \n END IF;\n \n DO something();\nEND `my_label`;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/labels/','','https://mariadb.com/kb/en/labels/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (313,23,'LEAVE','Syntax\n------ \nLEAVE label\n \nThis statement is used to exit the flow control construct\nthat has the\ngiven label. The label must be in the same stored program,\nnot in a caller procedure. LEAVE can be used within BEGIN\n... END or loop constructs\n(LOOP, REPEAT, WHILE). In Stored Procedures, Triggers and\nEvents, LEAVE can refer to the outmost BEGIN ... END\nconstruct; in that case, the program exits the procedure. In\nStored Functions, RETURN can be used instead.\n \nNote that LEAVE cannot be used to exit a DECLARE HANDLER\nblock.\n \nIf you try to LEAVE a non-existing label, or if you try to\nLEAVE a HANDLER block, the following error will be produced:\n \nERROR 1308 (42000): LEAVE with no matching label: \n \nThe following example uses LEAVE to exit the procedure if a\ncondition is true:\n \nCREATE PROCEDURE proc(IN p TINYINT)\nCONTAINS SQL\n`whole_proc`:\nBEGIN\n SELECT 1;\n \n IF p \n\nURL: https://mariadb.com/kb/en/leave/','','https://mariadb.com/kb/en/leave/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (314,23,'LOOP','Syntax\n------ \n[begin_label:] LOOP\n statement_list\nEND LOOP [end_label]\n \nDescription\n----------- \nLOOP implements a simple loop construct, enabling repeated\nexecution\nof the statement list, which consists of one or more\nstatements, each\nterminated by a semicolon (i.e., ;) statement delimiter. The\nstatements\nwithin the loop are repeated until the loop is exited;\nusually this is\naccomplished with a LEAVE statement.\n \nA LOOP statement can be labeled. end_label cannot be given\nunless\nbegin_label also is present. If both are present, they must\nbe the\nsame.\n \nSee Delimiters in the mysql client for more on delimiter\nusage in the client.\n \n\n\nURL: https://mariadb.com/kb/en/loop/','','https://mariadb.com/kb/en/loop/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (315,23,'OPEN','Syntax\n------ \n\n\nURL: https://mariadb.com/kb/en/open/','','https://mariadb.com/kb/en/open/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (316,23,'REPEAT LOOP','Syntax\n------ \n[begin_label:] REPEAT\n statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n \nThe statement list within a REPEAT statement is repeated\nuntil the\nsearch_condition is true. Thus, a REPEAT always enters the\nloop at\nleast once. statement_list consists of one or more\nstatements, each\nterminated by a semicolon (i.e., ;) statement delimiter.\n \nA REPEAT statement can be labeled. end_label cannot be given\nunless\nbegin_label also is present. If both are present, they must\nbe the\nsame.\n \nSee Delimiters in the mysql client for more on client\ndelimiter usage.\n \nDELIMITER //\n \nCREATE PROCEDURE dorepeat(p1 INT)\n BEGIN\n SET @x = 0;\n \n REPEAT SET @x = @x + 1;\n UNTIL @x > p1 END REPEAT;\n \n END\n//\n \nCALL dorepeat(1000)//\n \nSELECT @x//\n+------+\n| @x |\n+------+\n| 1001 |\n+------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/repeat-loop/','','https://mariadb.com/kb/en/repeat-loop/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (317,23,'RESIGNAL','Syntax\n------ \nRESIGNAL [error_condition]\n [SET error_property\n [, error_property] ...]\n \nerror_condition:\n SQLSTATE [VALUE] \'sqlstate_value\'\n | condition_name\n \nerror_property:\n error_property_name = \n \nerror_property_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n \nDescription\n----------- \nThe syntax of RESIGNAL and its semantics are very similar to\nSIGNAL. This statement can only be used within an error\nHANDLER. It produces an error, like SIGNAL. RESIGNAL clauses\nare the same as SIGNAL, except that they all are optional,\neven SQLSTATE. All the properties which are not specified in\nRESIGNAL, will be identical to the properties of the error\nthat was received by the error HANDLER. For a description of\nthe clauses, see diagnostics area.\n \nNote that RESIGNAL does not empty the diagnostics area: it\njust appends another error condition.\n \nRESIGNAL, without any clauses, produces an error which is\nidentical to the error that was received by HANDLER.\n \nIf used out of a HANDLER construct, RESIGNAL produces the\nfollowing error:\n \nERROR 1645 (0K000): RESIGNAL when handler not active\n \nIn MariaDB 5.5, if a HANDLER contained a CALL to another\nprocedure, that procedure could use RESIGNAL. Since MariaDB\n10.0, trying to do this raises the above error.\n \nFor a list of SQLSTATE values and MariaDB error codes, see\nMariaDB Error Codes.\n \nThe following procedure tries to query two tables which\ndon\'t exist, producing a 1146 error in both cases. Those\nerrors will trigger the HANDLER. The first time the error\nwill be ignored and the client will not receive it, but the\nsecond time, the error is re-signaled, so the client will\nreceive it.\n \nCREATE PROCEDURE test_error( )\nBEGIN\n DECLARE CONTINUE HANDLER\n FOR 1146\n BEGIN\n IF @hide_errors IS FALSE THEN\n RESIGNAL;\n \n END IF;\n \n END;\n \n SET @hide_errors = TRUE;\n \n SELECT \'Next error will be ignored\' AS msg;\n \n SELECT `c` FROM `temptab_one`;\n \n SELECT \'Next error won\'\'t be ignored\' AS msg;\n \n SET @hide_errors = FALSE;\n \n SELECT `c` FROM `temptab_two`;\n \nEND;\n \nCALL test_error( );\n \n+----------------------------+\n| msg |\n+----------------------------+\n| Next error will be ignored |\n+----------------------------+\n \n+-----------------------------+\n| msg |\n+-----------------------------+\n| Next error won\'t be ignored |\n+-----------------------------+\n \nERROR 1146 (42S02): Table \'test.temptab_two\' doesn\'t\nexist\n \nThe following procedure re-signals an error, modifying only\nthe error message to clarify the cause of the problem.\n \nCREATE PROCEDURE test_error()\nBEGIN\n DECLARE CONTINUE HANDLER\n FOR 1146\n BEGIN\n RESIGNAL SET\n MESSAGE_TEXT = \'`temptab` does not exist\';\n \n END;\n \n SELECT `c` FROM `temptab`;\n \nEND;\n \nCALL test_error( );\nERROR 1146 (42S02): `temptab` does not exist\n \nAs explained above, this works on MariaDB 5.5, but produces\na 1645 error since 10.0.\n \nCREATE PROCEDURE handle_error()\nBEGIN\n RESIGNAL;\n \nEND;\n \nCREATE PROCEDURE p()\nBEGIN\n DECLARE EXIT HANDLER FOR SQLEXCEPTION CALL p();\n SIGNAL SQLSTATE \'45000\';\n \nEND;\n \n\n\nURL: https://mariadb.com/kb/en/resignal/','','https://mariadb.com/kb/en/resignal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (318,23,'RETURN','Syntax\n------ \nRETURN expr \n \nThe RETURN statement terminates execution of a stored\nfunction and\nreturns the value expr to the function caller. There must be\nat least\none RETURN statement in a stored function. If the function\nhas multiple exit points, all exit points must have a\nRETURN.\n \nThis statement is not used in stored procedures, triggers,\nor events. LEAVE can be used instead.\n \nThe following example shows that RETURN can return the\nresult of a scalar subquery:\n \nCREATE FUNCTION users_count() RETURNS BOOL\n READS SQL DATA\nBEGIN\n RETURN (SELECT COUNT(DISTINCT User) FROM mysql.user);\nEND;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/return/','','https://mariadb.com/kb/en/return/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (319,23,'SELECT INTO','Syntax\n------ \nSELECT col_name [, col_name] ...\n INTO var_name [, var_name] ...\n table_expr\n \nDescription\n----------- \nSELECT ... INTO enables selected columns to be stored\ndirectly\ninto variables. No resultset is produced. The query should\nreturn a single row. If the query\nreturns no rows, a warning with error code 1329 occurs (No\ndata), and\nthe variable values remain unchanged. If the query returns\nmultiple\nrows, error 1172 occurs (Result consisted of more than one\nrow). If it\nis possible that the statement may retrieve multiple rows,\nyou can use\nLIMIT 1 to limit the result set to a single row.\n \nThe INTO clause can also be specified at the end of the\nstatement.\n \nIn the context of such statements that occur as part of\nevents\nexecuted by the Event Scheduler, diagnostics messages (not\nonly\nerrors, but also warnings) are written to the error log,\nand, on\nWindows, to the application event log.\n \nThis statement can be used with both local variables and\nuser-defined variables.\n \nFor the complete syntax, see SELECT.\n \nAnother way to set a variable\'s value is the SET statement.\n \nSELECT ... INTO results are not stored in the query cache\neven if SQL_CACHE is specified.\n \nExamples\n-------- \nSELECT id, data INTO @x,@y \nFROM test.t1 LIMIT 1;\n \n\n\nURL: https://mariadb.com/kb/en/selectinto/','','https://mariadb.com/kb/en/selectinto/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (320,23,'SIGNAL','Syntax\n------ \nSIGNAL error_condition\n [SET error_property\n [, error_property] ...]\n \nerror_condition:\n SQLSTATE [VALUE] \'sqlstate_value\'\n | condition_name\n \nerror_property:\n error_property_name = \n \nerror_property_name:\n CLASS_ORIGIN\n | SUBCLASS_ORIGIN\n | MESSAGE_TEXT\n | MYSQL_ERRNO\n | CONSTRAINT_CATALOG\n | CONSTRAINT_SCHEMA\n | CONSTRAINT_NAME\n | CATALOG_NAME\n | SCHEMA_NAME\n | TABLE_NAME\n | COLUMN_NAME\n | CURSOR_NAME\n \nSIGNAL empties the diagnostics area and produces a custom\nerror. This statement can be used anywhere, but is generally\nuseful when used inside a stored program. When the error is\nproduced, it can be caught by a HANDLER. If not, the current\nstored program, or the current statement, will terminate\nwith the specified error.\n \nSometimes an error HANDLER just needs to SIGNAL the same\nerror it received, optionally with some changes. Usually the\nRESIGNAL statement is the most convenient way to do this.\n \nerror_condition can be an SQLSTATE value or a named error\ncondition defined via DECLARE CONDITION. SQLSTATE must be a\nconstant string consisting of five characters. These codes\nare standard to ODBC and ANSI SQL. For customized errors,\nthe recommended SQLSTATE is \'45000\'. For a list of\nSQLSTATE values used by MariaDB, see the MariaDB Error Codes\npage. The SQLSTATE can be read via the API method\nmysql_sqlstate( ). \n \nTo specify error properties user-defined variables and local\nvariables can be used, as well as character set conversions\n(but you can\'t set a collation).\n \nThe error properties, their type and their default values\nare explained in the diagnostics area page.\n \nErrors\n \nIf the SQLSTATE is not valid, the following error like this\nwill be produced:\n \nERROR 1407 (42000): Bad SQLSTATE: \'123456\'\n \nIf a property is specified more than once, an error like\nthis will be produced:\n \nERROR 1641 (42000): Duplicate condition information item\n\'MESSAGE_TEXT\'\n \nIf you specify a condition name which is not declared, an\nerror like this will be produced:\n \nERROR 1319 (42000): Undefined CONDITION: cond_name\n \nIf MYSQL_ERRNO is out of range, you will get an error like\nthis:\n \nERROR 1231 (42000): Variable \'MYSQL_ERRNO\' can\'t be set\nto the value of \'0\'\n \nExamples\n-------- \nHere\'s what happens if SIGNAL is used in the client to\ngenerate errors:\n \nSIGNAL SQLSTATE \'01000\';\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+------------------------------------------+\n| Level | Code | Message |\n+---------+------+------------------------------------------+\n| Warning | 1642 | Unhandled user-defined warning condition\n|\n+---------+------+------------------------------------------+\n1 row in set (0.06 sec)\n \nSIGNAL SQLSTATE \'02000\';\n \nERROR 1643 (02000): Unhandled user-defined not found\ncondition\n \nHow to specify MYSQL_ERRNO and MESSAGE_TEXT properties:\n \nSIGNAL SQLSTATE \'45000\' SET MYSQL_ERRNO=30001,\nMESSAGE_TEXT=\'H\nello, world!\';\n \nERROR 30001 (45000): Hello, world!\n \nThe following code shows how to use user variables, local\nvariables and character set conversion with SIGNAL:\n \nCREATE PROCEDURE test_error(x INT)\nBEGIN\n DECLARE errno SMALLINT UNSIGNED DEFAULT 31001;\n \n SET @errmsg = \'Hello, world!\';\n \n IF x = 1 THEN\n SIGNAL SQLSTATE \'45000\' SET\n MYSQL_ERRNO = errno,\n MESSAGE_TEXT = @errmsg;\n \n ELSE\n SIGNAL SQLSTATE \'45000\' SET\n MYSQL_ERRNO = errno,\n MESSAGE_TEXT = _utf8\'Hello, world!\';\n \n END IF;\n \nEND;\n \nHow to use named error conditions:\n \nCREATE PROCEDURE test_error(n INT)\nBEGIN\n DECLARE `too_big` CONDITION FOR SQLSTATE \'45000\';\n \n IF n > 10 THEN\n SIGNAL `too_big`;\n \n END IF;\n \nEND;\n \nIn this example, we\'ll define a HANDLER for an error code.\nWhen the error occurs, we SIGNAL a more informative error\nwhich makes sense for our procedure:\n \nCREATE PROCEDURE test_error()\nBEGIN\n DECLARE EXIT HANDLER\n FOR 1146\n BEGIN\n SIGNAL SQLSTATE \'45000\' SET\n MESSAGE_TEXT = \'Temporary tables not found; did you call\ninit() procedure?\';\n \n END;\n \n -- this will produce a 1146 error\n SELECT `c` FROM `temptab`;\n \nEND;\n \n\n\nURL: https://mariadb.com/kb/en/signal/','','https://mariadb.com/kb/en/signal/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (321,23,'WHILE','Syntax\n------ \n[begin_label:] WHILE search_condition DO\n statement_list\nEND WHILE [end_label]\n \nDescription\n----------- \nThe statement list within a WHILE statement is repeated as\nlong as the\nsearch_condition is true. statement_list consists of one or\nmore\nstatements. If the loop must be executed at least once,\nREPEAT ... LOOP can be used instead.\n \nA WHILE statement can be labeled. end_label cannot be given\nunless\nbegin_label also is present. If both are present, they must\nbe the\nsame.\n \nExamples\n-------- \nCREATE PROCEDURE dowhile()\nBEGIN\n DECLARE v1 INT DEFAULT 5;\n \n WHILE v1 > 0 DO\n ...\n SET v1 = v1 - 1;\n \n END WHILE;\n \nEND\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/while/','','https://mariadb.com/kb/en/while/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (322,24,'BUFFER','A synonym for ST_BUFFER.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/buffer/','','https://mariadb.com/kb/en/buffer/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (323,24,'CONVEXHULL','A synonym for ST_CONVEXHULL.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/convexhull/','','https://mariadb.com/kb/en/convexhull/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (324,24,'GEOMETRYCOLLECTION','Syntax\n------ \nGeometryCollection(g1,g2,...)\n \nDescription\n----------- \nConstructs a WKB GeometryCollection. If any argument is not\na well-formed WKB representation of a geometry, the return\nvalue is NULL.\n \nExamples\n-------- \nCREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);\nSHOW FIELDS FROM gis_geometrycollection;\n \nINSERT INTO gis_geometrycollection VALUES\n (GeomCollFromText(\'GEOMETRYCOLLECTION(POINT(0 0),\nLINESTRING(0 0,10 10))\')),\n (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),\nLineString(Point(3, 6), Point(7, 9)))))),\n (GeomFromText(\'GeometryCollection()\')),\n (GeomFromText(\'GeometryCollection EMPTY\'));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometrycollection/','','https://mariadb.com/kb/en/geometrycollection/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (325,24,'LINESTRING','Syntax\n------ \nLineString(pt1,pt2,...)\n \nDescription\n----------- \nConstructs a WKB LineString value from a number of WKB Point\narguments. If any argument is not a WKB Point, the return\nvalue is\nNULL. If the number of Point arguments is less than two, the\nreturn value is NULL.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3) |\n+-------------------------------------+\n \nCREATE TABLE gis_line (g LINESTRING);\nINSERT INTO gis_line VALUES\n (LineFromText(\'LINESTRING(0 0,0 10,10 0)\')),\n (LineStringFromText(\'LINESTRING(10 10,20 10,20 20,10 20,10\n10)\')),\n (LineStringFromWKB(AsWKB(LineString(Point(10, 10),\nPoint(40, 10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestring/','','https://mariadb.com/kb/en/linestring/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (326,24,'MULTILINESTRING','Syntax\n------ \nMultiLineString(ls1,ls2,...)\n \nDescription\n----------- \nConstructs a WKB MultiLineString value using WKB LineString\narguments. If any argument is not a WKB LineString, the\nreturn value is\nNULL.\n \nExample\n \nCREATE TABLE gis_multi_line (g MULTILINESTRING);\nINSERT INTO gis_multi_line VALUES\n (MultiLineStringFromText(\'MULTILINESTRING((10 48,10 21,10\n0),(16 0,16 23,16 48))\')),\n (MLineFromText(\'MULTILINESTRING((10 48,10 21,10 0))\')),\n (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),\nPoint(3, 5)), LineString(Point(2, 5),Point(5, 8),Point(21,\n7))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multilinestring/','','https://mariadb.com/kb/en/multilinestring/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (327,24,'MULTIPOINT','Syntax\n------ \nMultiPoint(pt1,pt2,...)\n \nDescription\n----------- \nConstructs a WKB MultiPoint value using WKB Point arguments.\nIf any argument is not a WKB Point, the return value is\nNULL.\n \nExamples\n-------- \nSET @g = ST_GEOMFROMTEXT(\'MultiPoint( 1 1, 2 2, 5 3, 7 2, 9\n3, 8 4, 6 6, 6 9, 4 9, 1 5 )\');\n \nCREATE TABLE gis_multi_point (g MULTIPOINT);\nINSERT INTO gis_multi_point VALUES\n (MultiPointFromText(\'MULTIPOINT(0 0,10 10,10 20,20\n20)\')),\n (MPointFromText(\'MULTIPOINT(1 1,11 11,11 21,21 21)\')),\n (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,\n10)))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipoint/','','https://mariadb.com/kb/en/multipoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (328,24,'MULTIPOLYGON','Syntax\n------ \nMultiPolygon(poly1,poly2,...)\n \nDescription\n----------- \nConstructs a WKB MultiPolygon value from a set of WKB\nPolygon arguments. If any argument is not a WKB Polygon, the\nreturn value is NULL.\n \nExample\n \nCREATE TABLE gis_multi_polygon (g MULTIPOLYGON);\nINSERT INTO gis_multi_polygon VALUES\n (MultiPolygonFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84\n42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67\n13,59 13,59 18)))\')),\n (MPolyFromText(\'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28\n26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59\n13,59 18)))\')),\n (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,\n3), Point(3, 3), Point(3, 0), Point(0, 3)))))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipolygon/','','https://mariadb.com/kb/en/multipolygon/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (329,24,'POINT','Syntax\n------ \nPoint(x,y)\n \nDescription\n----------- \nConstructs a WKB Point using the given coordinates.\n \nExamples\n-------- \nSET @g = ST_GEOMFROMTEXT(\'Point(1 1)\');\n \nCREATE TABLE gis_point (g POINT);\nINSERT INTO gis_point VALUES\n (PointFromText(\'POINT(10 10)\')),\n (PointFromText(\'POINT(20 10)\')),\n (PointFromText(\'POINT(20 20)\')),\n (PointFromWKB(AsWKB(PointFromText(\'POINT(10 20)\'))));\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/point/','','https://mariadb.com/kb/en/point/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (330,24,'PointOnSurface','A synonym for ST_PointOnSurface.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/pointonsurface/','','https://mariadb.com/kb/en/pointonsurface/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (331,24,'POLYGON','Syntax\n------ \nPolygon(ls1,ls2,...)\n \nDescription\n----------- \nConstructs a WKB Polygon value from a number of WKB\nLineString\narguments. If any argument does not represent the WKB of a\nLinearRing (that is,\nnot a closed and simple LineString) the return value is\nNULL.\n \nNote that according to the OpenGIS standard, a POLYGON\nshould have exactly one ExteriorRing and all other rings\nshould lie within that ExteriorRing and thus be the\nInteriorRings. Practically, however, some systems, including\nMariaDB\'s, permit polygons to have several\n\'ExteriorRings\'. In the case of there being multiple,\nnon-overlapping exterior rings ST_NUMINTERIORRINGS() will\nreturn 1.\n \nExamples\n-------- \nSET @g = ST_GEOMFROMTEXT(\'POLYGON((1 1,1 5,4 9,6 9,9 3,7\n2,1 1))\');\n \nCREATE TABLE gis_polygon (g POLYGON);\nINSERT INTO gis_polygon VALUES\n (PolygonFromText(\'POLYGON((10 10,20 10,20 20,10 20,10\n10))\')),\n (PolyFromText(\'POLYGON((0 0,50 0,50 50,0 50,0 0), (10\n10,20 10,20 20,10 20,10 10))\')),\n (PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0),\nPoint(30, 0), Point(30, 30), Point(0, 0))))));\n \nNon-overlapping \'polygon\':\n \nSELECT ST_NumInteriorRings(ST_PolyFromText(\'POLYGON((0 0,10\n0,10 10,0 10,0 0),\n (-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))\')) AS NumInteriorRings;\n \n+------------------+\n| NumInteriorRings |\n+------------------+\n| 1 |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygon/','','https://mariadb.com/kb/en/polygon/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (332,24,'ST_BUFFER','Syntax\n------ \nST_BUFFER(g1,r)\nBUFFER(g1,r)\n \nDescription\n----------- \nReturns a geometry that represents all points whose distance\nfrom geometry g1 is less than or equal to distance, or\nradius, r.\n \nUses for this function could include creating for example a\nnew geometry representing a buffer zone around an island.\n \nBUFFER() is a synonym.\n \nExamples\n-------- \nDetermining whether a point is within a buffer zone:\n \nSET @g1 = ST_GEOMFROMTEXT(\'POLYGON((10 10, 10 20, 20 20, 20\n10, 10 10))\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POINT(8 8)\');\n \nSELECT ST_WITHIN(@g2,ST_BUFFER(@g1,5));\n+---------------------------------+\n| ST_WITHIN(@g2,ST_BUFFER(@g1,5)) |\n+---------------------------------+\n| 1 |\n+---------------------------------+\n \nSELECT ST_WITHIN(@g2,ST_BUFFER(@g1,1));\n+---------------------------------+\n| ST_WITHIN(@g2,ST_BUFFER(@g1,1)) |\n+---------------------------------+\n| 0 |\n+---------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_buffer/','','https://mariadb.com/kb/en/st_buffer/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (333,24,'ST_CONVEXHULL','ST_ConvexHull() was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_ConvexHull(g)\nConvexHull(g)\n \nDescription\n----------- \nGiven a geometry, returns a geometry that is the minimum\nconvex geometry enclosing all geometries within the set.\nReturns NULL if the geometry value is NULL or an empty\nvalue.\n \nST_ConvexHull() and ConvexHull() are synonyms.\n \nExamples\n-------- \nThe ConvexHull of a single point is simply the single point:\n \nSET @g = ST_GEOMFROMTEXT(\'Point(0 0)\');\n \nSELECT ST_ASTEXT(ST_CONVEXHULL(@g));\n+------------------------------+\n| ST_ASTEXT(ST_CONVEXHULL(@g)) |\n+------------------------------+\n| POINT(0 0) |\n+------------------------------+\n \nSET @g = ST_GEOMFROMTEXT(\'MultiPoint(0 0, 1 2, 2 3)\');\n \nSELECT ST_ASTEXT(ST_CONVEXHULL(@g));\n+------------------------------+\n| ST_ASTEXT(ST_CONVEXHULL(@g)) |\n+------------------------------+\n| POLYGON((0 0,1 2,2 3,0 0)) |\n+------------------------------+\n \nSET @g = ST_GEOMFROMTEXT(\'MultiPoint( 1 1, 2 2, 5 3, 7 2, 9\n3, 8 4, 6 6, 6 9, 4 9, 1 5 )\');\n \nSELECT ST_ASTEXT(ST_CONVEXHULL(@g));\n+----------------------------------------+\n| ST_ASTEXT(ST_CONVEXHULL(@g)) |\n+----------------------------------------+\n| POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1)) |\n+----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_convexhull/','','https://mariadb.com/kb/en/st_convexhull/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (334,24,'ST_INTERSECTION','Syntax\n------ \nST_INTERSECTION(g1,g2)\n \nDescription\n----------- \nReturns a geometry that is the intersection, or shared\nportion, of geometry g1 and geometry g2.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 1)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 1, 0 2)\');\n \nSELECT ASTEXT(ST_INTERSECTION(@g1,@g2));\n+----------------------------------+\n| ASTEXT(ST_INTERSECTION(@g1,@g2)) |\n+----------------------------------+\n| POINT(2 1) |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_intersection/','','https://mariadb.com/kb/en/st_intersection/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (335,24,'ST_POINTONSURFACE','ST_POINTONSURFACE() was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_PointOnSurface(g)\nPointOnSurface(g)\n \nDescription\n----------- \nGiven a geometry, returns a POINT guaranteed to intersect a\nsurface. However, see MDEV-7514.\n \nST_PointOnSurface() and PointOnSurface() are synonyms.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointonsurface/','','https://mariadb.com/kb/en/st_pointonsurface/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (336,24,'ST_SYMDIFFERENCE','Syntax\n------ \nST_SYMDIFFERENCE(g1,g2)\n \nDescription\n----------- \nReturns a geometry that represents the portions of geometry\ng1 and geometry g2 that don\'t intersect.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(10 20, 10 40)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(10 15, 10 25)\');\n \nSELECT ASTEXT(ST_SYMDIFFERENCE(@g1,@g2));\n+----------------------------------------------+\n| ASTEXT(ST_SYMDIFFERENCE(@g1,@g2)) |\n+----------------------------------------------+\n| MULTILINESTRING((10 15,10 20),(10 25,10 40)) |\n+----------------------------------------------+\n \nSET @g2 = ST_GeomFromText(\'LINESTRING(10 20, 10 41)\');\n \nSELECT ASTEXT(ST_SYMDIFFERENCE(@g1,@g2));\n+-----------------------------------+\n| ASTEXT(ST_SYMDIFFERENCE(@g1,@g2)) |\n+-----------------------------------+\n| LINESTRING(10 40,10 41) |\n+-----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_symdifference/','','https://mariadb.com/kb/en/st_symdifference/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (337,24,'ST_UNION','Syntax\n------ \nST_UNION(g1,g2)\n \nDescription\n----------- \nReturns a geometry that is the union of the geometry g1 and\ngeometry g2.\n \nExamples\n-------- \nSET @g1 = GEOMFROMTEXT(\'POINT (0 2)\');\n \nSET @g2 = GEOMFROMTEXT(\'POINT (2 0)\');\n \nSELECT ASTEXT(ST_UNION(@g1,@g2));\n+---------------------------+\n| ASTEXT(ST_UNION(@g1,@g2)) |\n+---------------------------+\n| MULTIPOINT(2 0,0 2) |\n+---------------------------+\n \nSET @g1 = GEOMFROMTEXT(\'POLYGON((0 0,0 3,3 3,3 0,0 0))\');\n \nSET @g2 = GEOMFROMTEXT(\'POLYGON((2 2,4 2,4 4,2 4,2 2))\');\n \nSELECT ASTEXT(ST_UNION(@g1,@g2));\n+------------------------------------------------+\n| ASTEXT(ST_UNION(@g1,@g2)) |\n+------------------------------------------------+\n| POLYGON((0 0,0 3,2 3,2 4,4 4,4 2,3 2,3 0,0 0)) |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_union/','','https://mariadb.com/kb/en/st_union/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (338,26,'BACKUP STAGE','BACKUP STAGE commands are a set of commands to make it\npossible to make an efficient external backup tool. \n \nThe BACKUP STAGE command was introduced in MariaDB 10.4.1.\n \nSyntax\n------ \nBACKUP STAGE [START | FLUSH | BLOCK_DDL | BLOCK_COMMIT | END\n]\n \nIn the following text, a transactional table means InnoDB or\n\"InnoDB-like engine with redo log that can lock redo purges\nand can be copied without locks by an outside process\".\n \nIn the text we refer to mariabackup as the backup tool to\nuse. However the description should work for any tools that\nsupport BACKUP STAGEs.\n \nGoals with BACKUP STAGE Commands\n \nTo be able to do a majority of the backup with the minimum\npossible server locks. Especially for transactional tables\n(InnoDB, MyRocks etc) there is only need for a very short\nblock of new commits while copying statistics and log\ntables.\nDDL are only needed to be blocked for a very short duration\nof the backup while mariabackup is copying the tables\naffected by DDL during the initial part of the backup.\nMost non transactional tables (those that are not in use)\nwill be copied during BACKUP STAGE START. The exceptions are\nsystem statistic and log tables that are not blocked during\nthe backup until BLOCK_COMMIT.\nShould work efficiently with backup tools that use disk\nsnapshots.\nShould work as efficiently as possible for all table types\nthat store data on the local disks.\nAs little copying as possible under higher level\nstages/locks. For example, .frm (dictionary) and .trn\n(trigger) files should be copying while copying the table\ndata.\n \nBACKUP STAGE Commands\n \nBACKUP STAGE START\n \nThings Done by STAGE START\n \nBlocks purge of redo files for storage engines that needs\nthis (Aria)\nStart logging of DDL commands into \'datadir\'/ddl.log. This\nmay take a short time as the command has to wait until there\nall now active DDL commands.\n \nmariabackup Under START\n \nmariabackup can, under START:\nCopy all transactional tables, aria_log_control, aria_log.#\nand\nother engines redo logs.\nCall BACKUP STAGE FLUSH while copying the last set of files.\n \nTo copy InnoDB tables, mariabackup has to start to watch the\nInnoDB backup redo log and copy all changes to the backup to\nbe able to run the redos later on in the final backup.\n \nBACKUP STAGE FLUSH\n \nThings Done by STAGE FLUSH\n \nFLUSH all changes for inactive non-transactional tables,\nexcept for statistics and log tables.\nClose all tables that are not in use, to ensure they are\nmarked as closed for the backup.\nBLOCK all new write locks for all non transactional tables\n(except statistics and log tables). The command will not\nwait for tables that are in use by read-only transactions.\n \nDDLs don\'t have to be blocked at this stage as they can\'t\ncause the table to be in an inconsistent state. This is true\nalso for non-transactional tables.\n \nmariabackup under STAGE_FLUSH\n \nmariabackup can, under STAGE FLUSH:\nCopy all non-transactional tables that are not in use. This\nlist of used tables can be found with SHOW OPEN TABLES\nCopy all new changes to the aria_log.# tables\n \nAt this point data for all old tables should have been\ncopied (except for some system tables).\n \nBACKUP STAGE BLOCK_DDL\n \nThings Done by BLOCK_DDL\n \nWait for all statements using write locked non-transactional\ntables to end.\nBlocks CREATE TABLE, DROP TABLE, TRUNCATE TABLE, and RENAME\nTABLE.\nBlocks also start off a new ALTER TABLE and the final rename\nphase of ALTER TABLE. Running ALTER TABLES are not blocked.\n \nmariabackup under BLOCK_DDL\n \nmariabackup can, under BLOCK_DDL:\nCopy the non-transactional tables that were in use during\nSTAGE FLUSH\nCopy new tables created before BLOCK DDL. The file names can\nbe read from ddl.log. The log also allows the backup to\nexecute renames of files for which RENAME TABLE was done\ninstead of copying them.\nAdd markers to backup stream of tables that were dropped\nduring the earlier BACKUP STAGEs.\nCopy changes to system log tables (this is easy as these are\nappend only)\nCopy changes to aria_log.# tables (this is easy as these are\nappend only)\n \nBACKUP STAGE BLOCK_COMMIT\n \nThings Done by BLOCK_COMMIT\n \nLock the binary log and commit/rollback to ensure that no\nchanges are committed to any tables. If there are active\ncommits or data to be copied to the binary log this will be\nallowed to finish.\nThis doesn\'t lock temporary tables that are not used by\nreplication. However these will be blocked when it\'s time\nto write to the binary log.\nLock system log tables and statistics tables, flush them and\nmark them closed.\n \nWhen the BLOCK_COMMIT\'s stages return, this is the \'backup\ntime\'. Everything committed will be in the backup and\neverything not committed will roll back.\n \nTransactional engines will continue to do changes to the\nredo log during the BLOCK COMMIT stage, but this is not\nimportant as all of these will roll back later as the\nchanges will not be committed.\n \nmariabackup Under BLOCK_COMMIT\n \nmariabackup can, under BLOCK_COMMIT:\nCopy the last changes to the redo files for InnoDB and Aria\n(aria_log.#), and the part of the binary log that was not\ncopied before.\nMyRocks files can also be hard linked to the backup\ndirectory\nEnd of system log tables (slow_log and general_log) and all\nstatistics tables (table_stats, column_stats and\nindex_stats) should also be copied.\n \nBACKUP STAGE END\n \nThings Done by END\n \nEnd DDL logging\nFree resources\n \nmariabackup After END\n \nmariabackup can, after END:\nCopy MyRocks tables\n \nUsing BACKUP STAGE With Disk Snapshots\n \nA tool that is using disk snapshots for copying MariaDB\nfiles should do\n \nBACKUP STAGE START\nBACKUP STAGE BLOCK_COMMIT\n \ndisk snapshot\n \nBACKUP STAGE END\n \nThe above ensures that all non-transactional tables are\nproperly flushed to disk before the snapshot is done.\nUsing BACKUP STAGEs is also more efficient than using FLUSH\nTABLES WITH READ LOCK as the above set of commands will not\nblock or be blocked by write operations to transactional\ntables.\n \nNote that when the backup is completed, one should delete\nall files with the \"#sql\" prefix, as these are files used\nby concurrent running ALTER TABLE. Note that InnoDB will on\nserver restart automatically delete any tables with the\n\"#sql\" prefix.\n \nPrivileges\n \nBACKUP STAGE requires the RELOAD privilege.\n \nOther Things\n \nOnly one connection can run BACKUP STAGE START. If a second\nconnection tries, it will wait until the first one has\nexecuted BACKUP STAGE END.\nIf the user skips a BACKUP STAGE, all intermediate backup\nstages will automatically be run. This will allow us to add\nnew BACKUP STAGEs in the future with even more precise locks\nwithout causing problems for tools using an earlier version\nof BACKUP STAGEs\nWhile opening files for a table, mariabackup should use\nBACKUP LOCK to ensure that all files for a table are from\nthe same generation, that is, created at the same time.\nOne can use the max_statement_time or lock_wait_timeout\nvariables to ensure that a BACKUP STAGE command doesn\'t\nblock the server too long.\nDDL logging will only be available in MariaDB Enterprise\nserver 10.2, 10.3 and 10.4.\n \n\n\nURL: https://mariadb.com/kb/en/backup-stage/','','https://mariadb.com/kb/en/backup-stage/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (339,26,'BACKUP LOCK','The BACKUP LOCK command was introduced in MariaDB 10.4.2.\n \nBACKUP LOCK blocks a table from DDL statements. This is\nmainly intended to be used by tools like mariabackup that\nneed to ensure there are no DDLs on a table while the table\nfiles are opened. For example, for an Aria table that stores\ndata in 3 files with extensions .frm, .MAI and .MAD.\nNormal read/write operations can continue as normal.\n \nSyntax\n------ \nTo lock a table:\n \nBACKUP LOCK table_name\n \nTo unlock a table:\n \nBACKUP UNLOCK\n \nUsage in a Backup Tool\n \nBACKUP LOCK [database.]table_name;\n - Open all files related to a table (for example, t.frm,\nt.MAI and t.MYD)\nBACKUP UNLOCK;\n- Copy data\n- Close files\n \nThis ensures that all files are from the same generation,\nthat is created at the same time by the MariaDB server.\n \nPrivileges\n \nBACKUP LOCK requires the RELOAD privilege.\n \nNotes\n \nThe idea is that the BACKUP LOCK should be held for as short\na time as possible by the backup tool. The time to take an\nuncontested lock is very short! One can easily do 50,000\nlocks/unlocks per second on low end hardware.\nOne should use different connections for BACKUP STAGE\ncommands and BACKUP LOCK. \n \nImplementation\n \nInternally, BACKUP LOCK is implemented by taking an\nMDLSHARED_HIGH_PRIO MDL lock on the table object, which\nprotects the table from any DDL operations.\n \n\n\nURL: https://mariadb.com/kb/en/backup-lock/','','https://mariadb.com/kb/en/backup-lock/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (340,26,'BINLOG','Syntax\n------ \nBINLOG \'str\'\n \nDescription\n----------- \nBINLOG is an internal-use statement. It is generated by the\nmysqlbinlog program as the printable representation of\ncertain events\nin binary log files. The \'str\' value is a base 64-encoded\nstring the that server decodes to determine the data change\nindicated by the\ncorresponding event. This statement requires the SUPER\nprivilege. It was added in MySQL 5.1.5.\n \n\n\nURL: https://mariadb.com/kb/en/binlog/','','https://mariadb.com/kb/en/binlog/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (341,26,'CACHE INDEX','Syntax\n------ \nCACHE INDEX \n tbl_index_list [, tbl_index_list] ...\n IN key_cache_name \n \ntbl_index_list:\n tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n \nDescription\n----------- \nThe CACHE INDEX statement assigns table indexes to a\nspecific key\ncache. It is used only for MyISAM tables.\n \nA default key cache exists and cannot be destroyed. To\ncreate more key caches, the key_buffer_size server system\nvariable.\n \nThe associations between tables indexes and key caches are\nlost on server restart. To recreate them automatically, it\nis necessary to configure caches in a configuration file and\ninclude some CACHE INDEX (and optionally LOAD INDEX)\nstatements in the init file.\n \nExamples\n-------- \nThe following statement assigns indexes from the tables t1,\nt2, and t3\nto the key cache named hot_cache:\n \nCACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table | Op | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status | OK |\n| test.t2 | assign_to_keycache | status | OK |\n| test.t3 | assign_to_keycache | status | OK |\n+---------+--------------------+----------+----------+\n \nImplementation (for MyISAM)\n \nNormally CACHE INDEX should not take a long time to execute.\nInternally it\'s implemented the following way:\nFind the right key cache (under\nLOCK_global_system_variables)\nOpen the table with a TL_READ_NO_INSERT lock.\nFlush the original key cache for the given file (under key\ncache lock)\nFlush the new key cache for the given file (safety)\nMove the file to the new key cache (under file share lock)\n \nThe only possible long operations are getting the locks for\nthe table and flushing the original key cache, if there were\nmany key blocks for the file in it.\n \nWe plan to also add CACHE INDEX for Aria tables if there is\na need for this.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/cache-index/','','https://mariadb.com/kb/en/cache-index/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (342,26,'FLUSH','Syntax\n------ \nFLUSH [NO_WRITE_TO_BINLOG | LOCAL]\n flush_option [, flush_option] ...\n \nor when flushing tables:\n \nFLUSH [NO_WRITE_TO_BINLOG | LOCAL] TABLES [table_list]\n[table_flush_option]\n \nwhere table_list is a list of tables separated by , (comma).\n \nDescription\n----------- \nThe FLUSH statement clears or reloads various internal\ncaches used by\nMariaDB. To execute FLUSH, you must have the RELOAD\nprivilege. See GRANT.\n \nThe RESET statement is similar to FLUSH. See\nRESET.\n \nYou cannot issue a FLUSH statement from within a stored\nfunction or a trigger. Doing so within a stored procedure is\npermitted, as long as it is not called by a stored function\nor trigger. See Stored Routine Limitations, Stored Function\nLimitations and Trigger Limitations.\n \nIf a listed table is a view, an error like the following\nwill be produced:\n \nERROR 1347 (HY000): \'test.v\' is not BASE TABLE\n \nBy default, FLUSH statements are written to the binary log\nand will be replicated. The NO_WRITE_TO_BINLOG keyword\n(LOCAL is an alias) will ensure the statement is not written\nto the binary log. \n \nThe different flush options are:\n \nOption | Description | \n \nCHANGED_PAGE_BITMAPS | Internal command used for backup\npurposes. See the Information Schema CHANGED_PAGE_BITMAPS\nTable. | \n \nCLIENT_STATISTICS | Reset client statistics (see SHOW\nCLIENT_STATISTICS). | \n \nDES_KEY_FILE | Reloads the DES key file (Specified with the\n--des-key-file startup option). | \n \nHOSTS | Flush the hostname cache (used for converting ip to\nhost names and for unblocking blocked hosts. See\nmax_connect_errors) | \n \nINDEX_STATISTICS | Reset index statistics (see SHOW\nINDEX_STATISTICS). | \n \n[ERROR | ENGINE | GENERAL | SLOW | BINARY | RELAY] LOGS |\nClose and reopen the specified log type, or all log types if\nnone are specified. FLUSH RELAY LOGS [connection-name] can\nbe used to flush the relay logs for a specific connection.\nOnly one connection can be specified per FLUSH command. See\nMulti-source replication. FLUSH ENGINE LOGS will delete all\nunneeded Aria redo logs. Since MariaDB 10.1.30 and MariaDB\n10.2.11, FLUSH BINARY LOGS\nDELETE_DOMAIN_ID=(list-of-domains) can be used to discard\nobsolete GTID domains from the server\'s binary log state.\nIn order for this to be successful, no event group from the\nlisted GTID domains can be present in existing binary log\nfiles. If some still exist, then they must be purged prior\nto executing this command. If the command completes\nsuccessfully, then it also rotates the binary log. | \n \nMASTER | Deprecated option, use RESET MASTER instead. | \n \nPRIVILEGES | Reload all privileges from the privilege tables\nin the mysql database. If the server is started with\n--skip-grant-table option, this will activate the privilege\ntables again. | \n \nQUERY CACHE | Defragment the query cache to better utilize\nits memory. If you want to reset the query cache, you can do\nit with RESET QUERY CACHE. | \n \nQUERY_RESPONSE_TIME | See the QUERY_RESPONSE_TIME plugin. | \n \nSLAVE | Deprecated option, use RESET SLAVE instead. | \n \nSSL | Used to dynamically reinitialize the server\'s TLS\ncontext by reloading the files defined by several TLS system\nvariables. See FLUSH SSL for more information. This command\nwas first added in MariaDB 10.4.1. | \n \nSTATUS | Resets all server status variables that can be\nreset to 0. Not all global status variables support this, so\nnot all global values are reset. See FLUSH STATUS for more\ninformation. | \n \nTABLE | Close tables given as options or all open tables if\nno table list was used. From MariaDB 10.4.1, using without\nany table list will only close tables not in use, and tables\nnot locked by the FLUSH TABLES connection. If there are no\nlocked tables, FLUSH TABLES will be instant and will not\ncause any waits, as it no longer waits for tables in use.\nWhen a table list is provided, from MariaDB 10.4.1, the\nserver will wait for the end of any transactions that are\nusing the tables. Previously, FLUSH TABLES only waited for\nthe statements to complete. | \n \nTABLES | Same as FLUSH TABLE. | \n \nTABLES ... FOR EXPORT | For InnoDB tables, flushes table\nchanges to disk to permit binary table copies while the\nserver is running. Introduced in MariaDB 10.0.8. See FLUSH\nTABLES ... FOR EXPORT for more. | \n \nTABLES WITH READ LOCK | Closes all open tables. New tables\nare only allowed to be opened with read locks until an\nUNLOCK TABLES is given. | \n \nTABLES WITH READ LOCK AND DISABLE CHECKPOINT | As TABLES\nWITH READ LOCK but also disable all checkpoint writes by\ntransactional table engines. This is useful when doing a\ndisk snapshot of all tables. | \n \nTABLE_STATISTICS | Reset table statistics (see SHOW\nTABLE_STATISTICS). | \n \nUSER_RESOURCES | Resets all per hour user resources. This\nenables clients that have exhausted their resources to\nconnect again. | \n \nUSER_STATISTICS | Reset user statistics (see SHOW\nUSER_STATISTICS). | \n \nYou can also use the mysqladmin client to flush things. Use\nmysqladmin --help to examine what flush commands it\nsupports.\n \nFLUSH STATUS\n \nServer status variables can be reset by executing the\nfollowing:\n \nFLUSH STATUS;\n \nGlobal Status Variables that Support FLUSH STATUS\n \nNot all global status variables support being reset by FLUSH\nSTATUS. Currently, the following status variables are reset\nby FLUSH STATUS:\nAborted_clients\nAborted_connects\nAria_pagecache_blocks_not_flushed\nAria_pagecache_blocks_unused\nAria_pagecache_blocks_used\nBinlog_cache_disk_use\nBinlog_cache_use\nBinlog_stmt_cache_disk_use\nBinlog_stmt_cache_use\nConnection_errors_accept\nConnection_errors_internal\nConnection_errors_max_connections\nConnection_errors_peer_address\nConnection_errors_select\nConnection_errors_tcpwrap\nCreated_tmp_files\nDelayed_errors\nDelayed_writes\nFeature_check_constraint\nFeature_delay_key_write\nMax_used_connections\nOpened_plugin_libraries\nPerformance_schema_accounts_lost\nPerformance_schema_cond_instances_lost\nPerformance_schema_digest_lost\nPerformance_schema_file_handles_lost\nPerformance_schema_file_instances_lost\nPerformance_schema_hosts_lost\nPerformance_schema_locker_lost\nPerformance_schema_mutex_instances_lost\nPerformance_schema_rwlock_instances_lost\nPerformance_schema_session_connect_attrs_lost\nPerformance_schema_socket_instances_lost\nPerformance_schema_stage_classes_lost\nPerformance_schema_statement_classes_lost\nPerformance_schema_table_handles_lost\nPerformance_schema_table_instances_lost\nPerformance_schema_thread_instances_lost\nPerformance_schema_users_lost\nQcache_hits\nQcache_inserts\nQcache_lowmem_prunes\nQcache_not_cached\nRpl_semi_sync_master_no_times\nRpl_semi_sync_master_no_tx\nRpl_semi_sync_master_timefunc_failures\nRpl_semi_sync_master_wait_pos_backtraverse\nRpl_semi_sync_master_yes_tx\nRpl_transactions_multi_engine\nServer_audit_writes_failed\nSlave_retried_transactions\nSlow_launch_threads\nSsl_accept_renegotiates\nSsl_accepts\nSsl_callback_cache_hits\nSsl_client_connects\nSsl_connect_renegotiates\nSsl_ctx_verify_depth\nSsl_ctx_verify_mode\nSsl_finished_accepts\nSsl_finished_connects\nSsl_session_cache_hits\nSsl_session_cache_misses\nSsl_session_cache_overflows\nSsl_session_cache_size\nSsl_session_cache_timeouts\nSsl_sessions_reused\nSsl_used_session_cache_entries\nSubquery_cache_hit\nSubquery_cache_miss\nTable_locks_immediate\nTable_locks_waited\nTc_log_max_pages_used\nTc_log_page_waits\nTransactions_gtid_foreign_engine\nTransactions_multi_engine\n \nFLUSH SSL\n \nThe FLUSH SSL command was first added in MariaDB 10.4.\n \nIn MariaDB 10.4 and later, the FLUSH SSL command can be used\nto dynamically reinitialize the server\'s TLS context. This\nis most useful if you need to replace a certificate that is\nabout to expire without restarting the server.\n \nThis operation is performed by reloading the files defined\nby the following TLS system variables:\nssl_cert\nssl_key\nssl_ca\nssl_capath\nssl_crl\nssl_crlpath\n \nThese TLS system variables are not dynamic, so their values\ncan not be changed without restarting the server.\n \nIf you want to dynamically reinitialize the server\'s TLS\ncontext, then you need to change the certificate and key\nfiles at the relevant paths defined by these TLS system\nvariables, without actually changing the values of the\nvariables. See MDEV-19341 for more information.\n \nReducing Memory Usage\n \nTo flush some of the global caches that take up memory, you\ncould execute the following command:\n \nFLUSH LOCAL HOSTS,\n QUERY CACHE, \n TABLE_STATISTICS, \n INDEX_STATISTICS, \n USER_STATISTICS;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/flush/','','https://mariadb.com/kb/en/flush/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (343,26,'FLUSH QUERY CACHE','Description\n----------- \nYou can defragment the query cache to better utilize its\nmemory with\nthe FLUSH QUERY CACHE statement. The statement does not\nremove any queries from the cache.\n \nThe RESET QUERY CACHE statement removes all query results\nfrom the query cache.\nThe FLUSH TABLES statement also does this.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/flush-query-cache/','','https://mariadb.com/kb/en/flush-query-cache/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (344,26,'FLUSH TABLES FOR EXPORT','FLUSH TABLES ... FOR EXPORT was introduced in MariaDB\n10.0.8.\n \nSyntax\n------ \nFLUSH TABLES table_name [, table_name] FOR EXPORT\n \nDescription\n----------- \nFLUSH TABLES ... FOR EXPORT flushes changes to the specified\ntables to disk so that binary copies can be made while the\nserver is still running. This works for Archive, Aria, CSV,\nInnoDB, MyISAM, MERGE, and XtraDB tables.\n \nThe table is read locked until one has issued UNLOCK TABLES.\n \nIf a storage engine does not support FLUSH TABLES FOR\nEXPORT, a 1031 error (SQLSTATE \'HY000\') is produced.\n \nIf FLUSH TABLES ... FOR EXPORT is in effect in the session,\nthe following statements will produce an error if attempted:\nFLUSH TABLES WITH READ LOCK\nFLUSH TABLES ... WITH READ LOCK\nFLUSH TABLES ... FOR EXPORT\nAny statement trying to update any table\n \nIf any of the following statements is in effect in the\nsession, attempting FLUSH TABLES ... FOR EXPORT will\nproduce an error.\nFLUSH TABLES ... WITH READ LOCK\nFLUSH TABLES ... FOR EXPORT\nLOCK TABLES ... READ\nLOCK TABLES ... WRITE\n \nFLUSH FOR EXPORT is not written to the binary log.\n \nThis statement requires the RELOAD and the LOCK TABLES\nprivileges.\n \nIf one of the specified tables cannot be locked, none of the\ntables will be locked.\n \nIf a table does not exist, an error like the following will\nbe produced:\n \nERROR 1146 (42S02): Table \'test.xxx\' doesn\'t exist\n \nIf a table is a view, an error like the following will be\nproduced:\n \nERROR 1347 (HY000): \'test.v\' is not BASE TABLE\n \nExample\n \nFLUSH TABLES test.t1 FOR EXPORT;\n# Copy files related to the table (see below)\nUNLOCK TABLES;\n \nFor a full description, please see copying MariaDB tables.\n \n\n\nURL: https://mariadb.com/kb/en/flush-tables-for-export/','','https://mariadb.com/kb/en/flush-tables-for-export/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (345,26,'HELP Command','Syntax\n------ \nHELP search_string\n \nDescription\n----------- \nThe HELP command can be used in any MariaDB client, such as\nthe mysql command-line client, to get basic syntax help and\na short description for most commands and functions. \n \nIf you provide an argument to the HELP command, the mysql\nclient uses it as a search string to access server-side\nhelp. The proper operation of this command requires that the\nhelp tables in the mysql database be initialized with help\ntopic information.\n \nIf there is no match for the search string, the search\nfails. Use help contents to see a list of the help\ncategories:\n \nHELP contents\nYou asked for help about help category: \"Contents\"\nFor more information, type \'help \', where is one of the\nfollowing\ncategories:\n Account Management\n Administration\n Compound Statements\n Data Definition\n Data Manipulation\n Data Types\n Functions\n Functions and Modifiers for Use with GROUP BY\n Geographic Features\n Help Metadata\n Language Structure\n Plugins\n Procedures\n Sequences\n Table Maintenance\n Transactions\n User-Defined Functions\n Utility\n \nIf a search string matches multiple items, MariaDB shows a\nlist of matching topics:\n \nHELP drop\nMany help items for your request exist.\nTo make a more specific request, please type \'help \',\nwhere is one of the following\ntopics:\n ALTER TABLE\n DROP DATABASE\n DROP EVENT\n DROP FUNCTION\n DROP FUNCTION UDF\n DROP INDEX\n DROP PACKAGE\n DROP PACKAGE BODY\n DROP PROCEDURE\n DROP ROLE\n DROP SEQUENCE\n DROP SERVER\n DROP TABLE\n DROP TRIGGER\n DROP USER\n DROP VIEW\n \nThen you can enter a topic as the search string to see the\nhelp entry for that topic.\n \nThe help is provided with the MariaDB server and makes use\nof four help tables found in the mysql database:\nhelp_relation, help_topic, help_category and help_keyword.\nThese tables are populated by the mysql_install_db or\nfill_help_table.sql scripts which, until MariaDB 10.4.7,\ncontain data generated from an old version of MySQL.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/help-command/','','https://mariadb.com/kb/en/help-command/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (346,26,'KILL [CONNECTION | QUERY]','Syntax\n------ \nKILL [HARD | SOFT] [CONNECTION | QUERY [ID] ] [thread_id |\nUSER user_name | query_id]\n \nMariaDB 5.3.2\n \nThe options HARD | SOFT and USER username were introduced in\nMariaDB 5.3.2\n \nMariaDB 10.0.5\n \nKILL QUERY ID query_id, which permits killing a query by\nquery id rather than thread id, was introduced in MariaDB\n10.0.5.\n \nDescription\n----------- \nEach connection to mysqld runs in a separate thread. You can\nsee which threads\nare running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement. \nKILL allows the optional CONNECTION or\nQUERY modifier:\nKILL CONNECTION is the same as KILL with no\n modifier: It terminates the connection associated with the\ngiven thread or query id.\nKILL QUERY terminates the statement that the connection\nthread_id is\n currently executing, but leaves the connection itself\nintact.\nKILL QUERY ID (introduced in MariaDB 10.0.5) terminates the\nquery by query_id, leaving the connection intact.\n \nIf a connection is terminated that has an active\ntransaction, the transaction will be rolled back. If only a\nquery is killed, the current transaction will stay active.\nSee also idle_transaction_timeout.\n \nIf you have the PROCESS privilege, you can see all threads.\nIf\nyou have the SUPER privilege, you can kill all threads and\nstatements. Otherwise, you can see and kill only your own\nthreads and\nstatements.\n \nKilling queries that repair or create indexes on MyISAM and\nAria tables may result in corrupted tables. Use the SOFT\noption to avoid this!\n \nThe HARD option (default) kills a command as soon as\npossible. If you use\nSOFT, then critical operations that may leave a table in an\ninconsistent state will not be interrupted. Such operations\ninclude REPAIR and INDEX creation for MyISAM and Aria tables\n(REPAIR TABLE, OPTIMIZE TABLE).\n \nKILL ... USER username will kill all connections/queries for\na\ngiven user. USER can be specified one of the following ways:\nusername (Kill without regard to hostname)\nusername@hostname\nCURRENT_USER or CURRENT_USER()\n \nIf you specify a thread id and that thread does not exist,\nyou get the following error:\n \nERROR 1094 (HY000): Unknown thread id: \n \nIf you specify a query id that doesn\'t exist, you get the\nfollowing error:\n \nERROR 1957 (HY000): Unknown query id: \n \nHowever, if you specify a user name, no error is issued for\nnon-connected (or even non-existing) users. To check if the\nconnection/query has been killed, you can use the\nROW_COUNT() function.\n \nA client whose connection is killed receives the following\nerror:\n \nERROR 1317 (70100): Query execution was interrupted\n \nTo obtain a list of existing sessions, use the SHOW\nPROCESSLIST statement or query the Information Schema\nPROCESSLIST table.\n \nNote: You cannot use KILL with the Embedded MySQL Server\nlibrary because the embedded server merely runs inside the\nthreads of the host\napplication. It does not create any connection threads of\nits own.\n \nNote: You can also use \nmysqladmin kill thread_id [,thread_id...]\nto kill connections. To get a list of running queries,\nuse mysqladmin processlist. See mysqladmin.\n \nPercona Toolkit contains a program, pt-kill that can be used\nto automatically kill connections that match certain\ncriteria. For example, it can be used to terminate idle\nconnections, or connections that have been busy for more\nthan 60 seconds.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/data-manipulation-kill-connection-query/','','https://mariadb.com/kb/en/data-manipulation-kill-connection-query/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (347,26,'LOAD INDEX','Syntax\n------ \nLOAD INDEX INTO CACHE\n tbl_index_list [, tbl_index_list] ...\n \ntbl_index_list:\n tbl_name\n [[INDEX|KEY] (index_name[, index_name] ...)]\n [IGNORE LEAVES]\n \nDescription\n----------- \nThe LOAD INDEX INTO CACHE statement preloads a table index\ninto the key\ncache to which it has been assigned by an explicit CACHE\nINDEX\nstatement, or into the default key cache otherwise. \nLOAD INDEX INTO CACHE is used only for MyISAM or Aria\ntables. Until MariaDB 5.3, it was not supported for tables\nhaving user-defined partitioning, but this limitation was\nremoved in MariaDB 5.5.\n \nThe IGNORE LEAVES modifier causes only blocks for the\nnonleaf nodes of\nthe index to be preloaded.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/load-index/','','https://mariadb.com/kb/en/load-index/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (348,26,'RESET','Syntax\n------ \nRESET reset_option [, reset_option] ...\n \nDescription\n----------- \nThe RESET statement is used to clear the state of various\nserver\noperations. You must have the RELOAD privilege to execute\nRESET.\n \nRESET acts as a stronger version of the FLUSH statement.\n \nThe different RESET options are:\n \nOption | Description | \n \nSLAVE [\"connection_name\"] [ALL] | Deletes all relay logs\nfrom the slave and reset the replication position in the\nmaster binary log. | \n \nMASTER | Deletes all old binary logs, makes the binary index\nfile (--log-bin-index) empty and creates a new binary log\nfile. This is useful when you want to reset the master to an\ninitial state. If you want to just delete old, not used\nbinary logs, you should use the PURGE BINARY LOGS command. |\n\n \nQUERY CACHE | Removes all queries from the query cache. See\nalso FLUSH QUERY CACHE. | \n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/reset/','','https://mariadb.com/kb/en/reset/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (349,26,'SET','Syntax\n------ \nSET variable_assignment [, variable_assignment] ...\n \nvariable_assignment:\n user_var_name = expr\n | [GLOBAL | SESSION] system_var_name = expr\n | [@@global. | @@session. | @@]system_var_name = expr\n \nOne can also set a user variable in any expression with this\nsyntax:\n \nuser_var_name:= expr\n \nDescription\n----------- \nThe SET statement assigns values to different types of\nvariables that affect the operation of the server or your\nclient. Older\nversions of MySQL employed SET OPTION, but this syntax was\ndeprecated in favor of SET without OPTION, and was removed\nin MariaDB 10.0.\n \nChanging a system variable by using the SET statement does\nnot make the change permanently. To do so, the change must\nbe made in a configuration file.\n \nFor setting variables on a per-query basis (from MariaDB\n10.1.2), see SET STATEMENT.\n \nSee SHOW VARIABLES for documentation on viewing server\nsystem variables.\n \nSee Server System Variables for a list of all the system\nvariables.\n \nGLOBAL / SESSION\n \nWhen setting a system variable, the scope can be specified\nas either GLOBAL or SESSION.\n \nA global variable change affects all new sessions. It does\nnot affect any currently open sessions, including the one\nthat made the change. \n \nA session variable change affects the current session only.\n \nIf the variable has a session value, not specifying either\nGLOBAL or SESSION will be the same as specifying SESSION. If\nthe variable only has a global value, not specifying GLOBAL\nor SESSION will apply to the change to the global value.\n \nDEFAULT\n \nSetting a global variable to DEFAULT will restore it to the\nserver default, and setting a session variable to DEFAULT\nwill restore it to the current global value.\n \nExamples\n-------- \ninnodb_sync_spin_loops is a global variable.\nskip_parallel_replication is a session variable.\nmax_error_count is both global and session.\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE \n VARIABLE_NAME LIKE \'max_error_count\' OR \n VARIABLE_NAME LIKE \'skip_parallel_replication\' OR \n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 64 | 64 |\n| SKIP_PARALLEL_REPLICATION | OFF | NULL |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSetting the session values:\n \nSET max_error_count=128;\nQuery OK, 0 rows affected (0.000 sec)\n \nSET skip_parallel_replication=ON;\nQuery OK, 0 rows affected (0.000 sec)\n \nSET innodb_sync_spin_loops=60;\n \nERROR 1229 (HY000): Variable \'innodb_sync_spin_loops\' is a\nGLOBAL variable \n and should be set with SET GLOBAL\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE \n VARIABLE_NAME LIKE \'max_error_count\' OR \n VARIABLE_NAME LIKE \'skip_parallel_replication\' OR \n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 128 | 64 |\n| SKIP_PARALLEL_REPLICATION | ON | NULL |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSetting the global values:\n \nSET GLOBAL max_error_count=256;\n \nSET GLOBAL skip_parallel_replication=ON;\n \nERROR 1228 (HY000): Variable \'skip_parallel_replication\'\nis a SESSION variable \n and can\'t be used with SET GLOBAL\n \nSET GLOBAL innodb_sync_spin_loops=120;\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE \n VARIABLE_NAME LIKE \'max_error_count\' OR \n VARIABLE_NAME LIKE \'skip_parallel_replication\' OR \n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 128 | 256 |\n| SKIP_PARALLEL_REPLICATION | ON | NULL |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 120 |\n+---------------------------+---------------+--------------+\n \nSHOW VARIABLES will by default return the session value\nunless the variable is global only.\n \nSHOW VARIABLES LIKE \'max_error_count\';\n \n+-----------------+-------+\n| Variable_name | Value |\n+-----------------+-------+\n| max_error_count | 128 |\n+-----------------+-------+\n \nSHOW VARIABLES LIKE \'skip_parallel_replication\';\n \n+---------------------------+-------+\n| Variable_name | Value |\n+---------------------------+-------+\n| skip_parallel_replication | ON |\n+---------------------------+-------+\n \nSHOW VARIABLES LIKE \'innodb_sync_spin_loops\';\n \n+------------------------+-------+\n| Variable_name | Value |\n+------------------------+-------+\n| innodb_sync_spin_loops | 120 |\n+------------------------+-------+\n \nUsing the inplace syntax:\n \nSELECT (@a:=1);\n+---------+\n| (@a:=1) |\n+---------+\n| 1 |\n+---------+\n \nSELECT @a;\n \n+------+\n| @a |\n+------+\n| 1 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/set/','','https://mariadb.com/kb/en/set/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (350,26,'About SHOW','SHOW has many forms that provide information about\ndatabases, tables, columns, or status information about the\nserver. These include:\nSHOW AUTHORS\nSHOW CHARACTER SET [like_or_where]\nSHOW COLLATION [like_or_where]\nSHOW [FULL] COLUMNS FROM tbl_name [FROM db_name]\n[like_or_where]\nSHOW CONTRIBUTORS\nSHOW CREATE DATABASE db_name\nSHOW CREATE EVENT event_name\nSHOW CREATE PACKAGE package_name\nSHOW CREATE PACKAGE BODY package_name\nSHOW CREATE PROCEDURE proc_name\nSHOW CREATE TABLE tbl_name\nSHOW CREATE TRIGGER trigger_name\nSHOW CREATE VIEW view_name\nSHOW DATABASES [like_or_where]\nSHOW ENGINE engine_name {STATUS | MUTEX}\nSHOW [STORAGE] ENGINES\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW [FULL] EVENTS\nSHOW FUNCTION CODE func_name\nSHOW FUNCTION STATUS [like_or_where]\nSHOW GRANTS FOR user\nSHOW INDEX FROM tbl_name [FROM db_name]\nSHOW INNODB STATUS\nSHOW OPEN TABLES [FROM db_name] [like_or_where]\nSHOW PLUGINS\nSHOW PROCEDURE CODE proc_name\nSHOW PROCEDURE STATUS [like_or_where]\nSHOW PRIVILEGES\nSHOW [FULL] PROCESSLIST\nSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]\nSHOW PROFILES\nSHOW [GLOBAL | SESSION] STATUS [like_or_where]\nSHOW TABLE STATUS [FROM db_name] [like_or_where]\nSHOW TABLES [FROM db_name] [like_or_where]\nSHOW TRIGGERS [FROM db_name] [like_or_where]\nSHOW [GLOBAL | SESSION] VARIABLES [like_or_where]\nSHOW WARNINGS [LIMIT [offset,] row_count]\n \nlike_or_where:\n LIKE \'pattern\'\n | WHERE expr\n \nIf the syntax for a given SHOW statement includes a\nLIKE \'pattern\' part, \'pattern\' is a\nstring that can contain the SQL \"%\" and\n\"_\" wildcard characters. The pattern is useful for\nrestricting statement output to matching values.\n \nSeveral SHOW statements also accept a\nWHERE clause that provides more flexibility in specifying\nwhich rows to display. See Extended Show.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/about-show/','','https://mariadb.com/kb/en/about-show/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (351,26,'SHOW AUTHORS','Syntax\n------ \nSHOW AUTHORS\n \nDescription\n----------- \nThe SHOW AUTHORS statement displays information about the\npeople who work on MariaDB. For each author, it displays\nName, Location, and\nComment values. All columns are encoded as latin1.\n \nIn MariaDB 5.5 this is in somewhat random order.\n \nIn MariaDB 10.0.5 and later you have:\nFirst the active people in MariaDB are listed.\nThen the active people in MySQL.\nLast the people that has contributed to MariaDB/MySQL in the\npast.\n \nThe order is somewhat related to importance of the\ncontribution given to the MariaDB project, but this is not\n100% accurate. There is still room for improvements and\ndebate...\n \nExample\n \nSHOW AUTHORS;\n+--------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Name | Location | Comment |\n+--------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+\n| Michael (Monty) Widenius | Tusby, Finland | Lead developer\nand main author |\n| Sergei Golubchik | Kerpen, Germany | Architect, Full-text\nsearch, precision math, plugin framework, merges etc |\n| Igor Babaev | Bellevue, USA | Optimizer, keycache, core\nwork |\n| Sergey Petrunia | St. Petersburg, Russia | Optimizer |\n| Oleksandr Byelkin | Lugansk, Ukraine | Query Cache (4.0),\nSubqueries (4.1), Views (5.0) |\n| Timour Katchaounov | Sofia , Bulgaria | Optimizer |\n| Kristian Nielsen | Copenhagen, Denmark | Replication,\nAsync client prototocol, General buildbot stuff |\n| Alexander (Bar) Barkov | Izhevsk, Russia | Unicode and\ncharacter sets |\n| Alexey Botchkov (Holyfoot) | Izhevsk, Russia | GIS\nextensions, embedded server, precision math |\n| Daniel Bartholomew | Raleigh, USA | MariaDB documentation\n|\n| Colin Charles | Selangor, Malesia | MariaDB documentation,\ntalks at a LOT of conferences |\n| Sergey Vojtovich | Izhevsk, Russia | initial\nimplementation of plugin architecture, maintained native\nstorage engines (MyISAM, MEMORY, ARCHIVE, etc), rewrite of\ntable cache |\n| Vladislav Vaintroub | Mannheim, Germany | MariaDB Java\nconnector, new thread pool, Windows optimizations |\n| Elena Stepanova | Sankt Petersburg, Russia | QA, test\ncases |\n| Georg Richter | Heidelberg, Germany | New LGPL C\nconnector, PHP connector |\n| Jan Lindström | Ylämylly, Finland | Working on InnoDB |\n| Lixun Peng | Hangzhou, China | Multi Source replication |\n| Percona | CA, USA | XtraDB, microslow patches, extensions\nto slow log \n...\n \nSee Also\n \nSHOW CONTRIBUTORS. This list all members and sponsors of the\nMariaDB Foundation and other sponsors.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-authors/','','https://mariadb.com/kb/en/show-authors/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (352,26,'SHOW BINARY LOGS','Syntax\n------ \nSHOW BINARY LOGS\nSHOW MASTER LOGS\n \nDescription\n----------- \nLists the binary log files on the server. This statement is\nused as part of the\nprocedure described in \nPURGE BINARY LOGS, that shows how to\ndetermine which logs can be purged.\n \nExamples\n-------- \nSHOW BINARY LOGS;\n+--------------------+-----------+\n| Log_name | File_size |\n+--------------------+-----------+\n| mariadb-bin.000001 | 19039 |\n| mariadb-bin.000002 | 717389 |\n| mariadb-bin.000003 | 300 |\n| mariadb-bin.000004 | 333 |\n| mariadb-bin.000005 | 899 |\n| mariadb-bin.000006 | 125 |\n| mariadb-bin.000007 | 18907 |\n| mariadb-bin.000008 | 19530 |\n| mariadb-bin.000009 | 151 |\n| mariadb-bin.000010 | 151 |\n| mariadb-bin.000011 | 125 |\n| mariadb-bin.000012 | 151 |\n| mariadb-bin.000013 | 151 |\n| mariadb-bin.000014 | 125 |\n| mariadb-bin.000015 | 151 |\n| mariadb-bin.000016 | 314 |\n+--------------------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-binary-logs/','','https://mariadb.com/kb/en/show-binary-logs/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (353,26,'SHOW BINLOG EVENTS','Syntax\n------ \nSHOW BINLOG EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n \nDescription\n----------- \nShows the events in the binary log. If you do not specify\n\'log_name\',\nthe first binary log is displayed.\n \nExample\n \nSHOW BINLOG EVENTS IN \'mysql_sandbox10019-bin.000002\';\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n| Log_name | Pos | Event_type | Server_id | End_log_pos |\nInfo |\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n| mysql_sandbox10019-bin.000002 | 4 | Format_desc | 1 | 248\n| Server ver: 10.0.19-MariaDB-log, Binlog ver: 4 |\n| mysql_sandbox10019-bin.000002 | 248 | Gtid_list | 1 | 273\n| [] |\n| mysql_sandbox10019-bin.000002 | 273 | Binlog_checkpoint |\n1 | 325 | mysql_sandbox10019-bin.000002 |\n| mysql_sandbox10019-bin.000002 | 325 | Gtid | 1 | 363 |\nGTID 0-1-1 |\n| mysql_sandbox10019-bin.000002 | 363 | Query | 1 | 446 |\nCREATE DATABASE blog |\n| mysql_sandbox10019-bin.000002 | 446 | Gtid | 1 | 484 |\nGTID 0-1-2 |\n| mysql_sandbox10019-bin.000002 | 484 | Query | 1 | 571 |\nuse `blog`; CREATE TABLE bb (id INT) |\n+-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-binlog-events/','','https://mariadb.com/kb/en/show-binlog-events/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (354,26,'SHOW CHARACTER SET','Syntax\n------ \nSHOW CHARACTER SET\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe SHOW CHARACTER SET statement shows all available\ncharacter sets. The LIKE clause, if present on its own,\nindicates which character\nset names to match. The WHERE and LIKE clauses can be given\nto select rows using more general conditions, as discussed\nin Extended SHOW.\n \nThe same information can be queried from the\ninformation_schema.CHARACTER_SETS table.\n \nSee Setting Character Sets and Collations for details on\nspecifying the character set at the server, database, table\nand column levels.\n \nExamples\n-------- \nSHOW CHARACTER SET LIKE \'latin%\';\n+---------+-----------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+-----------------------------+-------------------+--------+\n| latin1 | cp1252 West European | latin1_swedish_ci | 1 |\n| latin2 | ISO 8859-2 Central European | latin2_general_ci |\n1 |\n| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |\n| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |\n+---------+-----------------------------+-------------------+--------+\n \nSHOW CHARACTER SET WHERE Maxlen LIKE \'2\';\n+---------+---------------------------+-------------------+--------+\n| Charset | Description | Default collation | Maxlen |\n+---------+---------------------------+-------------------+--------+\n| big5 | Big5 Traditional Chinese | big5_chinese_ci | 2 |\n| sjis | Shift-JIS Japanese | sjis_japanese_ci | 2 |\n| euckr | EUC-KR Korean | euckr_korean_ci | 2 |\n| gb2312 | GB2312 Simplified Chinese | gb2312_chinese_ci | 2\n|\n| gbk | GBK Simplified Chinese | gbk_chinese_ci | 2 |\n| ucs2 | UCS-2 Unicode | ucs2_general_ci | 2 |\n| cp932 | SJIS for Windows Japanese | cp932_japanese_ci | 2\n|\n+---------+---------------------------+-------------------+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-character-set/','','https://mariadb.com/kb/en/show-character-set/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (355,26,'SHOW CLIENT_STATISTICS','MariaDB 5.2 introduced the User Statistics feature.\n \nSyntax\n------ \nSHOW CLIENT_STATISTICS\n \nDescription\n----------- \nThe SHOW CLIENT_STATISTICS statement was introduced in\nMariaDB 5.2 as part of the User Statistics feature. It was\nremoved as a separate statement in MariaDB 10.1.1, but\neffectively replaced by the generic SHOW\ninformation_schema_table statement. The\ninformation_schema.CLIENT_STATISTICS table holds statistics\nabout client connections.\n \nThe userstat system variable must be set to 1 to activate\nthis feature. See the User Statistics and\ninformation_schema.CLIENT_STATISTICS articles for more\ninformation.\n \nExample\n \nFrom MariaDB 10.0:\n \nSHOW CLIENT_STATISTICS\\G\n*************************** 1. row\n***************************\n Client: localhost\n Total_connections: 35\nConcurrent_connections: 0\n Connected_time: 708\n Busy_time: 2.5557979999999985\n Cpu_time: 0.04123740000000002\n Bytes_received: 3883\n Bytes_sent: 21595\n Binlog_bytes_written: 0\n Rows_read: 18\n Rows_sent: 115\n Rows_deleted: 0\n Rows_inserted: 0\n Rows_updated: 0\n Select_commands: 70\n Update_commands: 0\n Other_commands: 0\n Commit_transactions: 1\n Rollback_transactions: 0\n Denied_connections: 0\n Lost_connections: 0\n Access_denied: 0\n Empty_queries: 35\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-client-statistics/','','https://mariadb.com/kb/en/show-client-statistics/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (356,26,'SHOW COLLATION','Syntax\n------ \nSHOW COLLATION\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe output from SHOW COLLATION includes all available\ncollations. The LIKE clause, if present on its own,\nindicates which collation names to match. The WHERE and LIKE\nclauses can be given to select rows using more general\nconditions, as discussed in Extended SHOW.\n \nThe same information can be queried from the\ninformation_schema.COLLATIONS table.\n \nSee Setting Character Sets and Collations for details on\nspecifying the collation at the server, database, table and\ncolumn levels.\n \nExamples\n-------- \nSHOW COLLATION LIKE \'latin1%\';\n+-------------------+---------+----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+-------------------+---------+----+---------+----------+---------+\n| latin1_german1_ci | latin1 | 5 | | Yes | 1 |\n| latin1_swedish_ci | latin1 | 8 | Yes | Yes | 1 |\n| latin1_danish_ci | latin1 | 15 | | Yes | 1 |\n| latin1_german2_ci | latin1 | 31 | | Yes | 2 |\n| latin1_bin | latin1 | 47 | | Yes | 1 |\n| latin1_general_ci | latin1 | 48 | | Yes | 1 |\n| latin1_general_cs | latin1 | 49 | | Yes | 1 |\n| latin1_spanish_ci | latin1 | 94 | | Yes | 1 |\n+-------------------+---------+----+---------+----------+---------+\n \nSHOW COLLATION WHERE Sortlen LIKE \'8\' AND Charset LIKE\n\'utf8\';\n+--------------------+---------+-----+---------+----------+---------+\n| Collation | Charset | Id | Default | Compiled | Sortlen |\n+--------------------+---------+-----+---------+----------+---------+\n| utf8_unicode_ci | utf8 | 192 | | Yes | 8 |\n| utf8_icelandic_ci | utf8 | 193 | | Yes | 8 |\n| utf8_latvian_ci | utf8 | 194 | | Yes | 8 |\n| utf8_romanian_ci | utf8 | 195 | | Yes | 8 |\n| utf8_slovenian_ci | utf8 | 196 | | Yes | 8 |\n| utf8_polish_ci | utf8 | 197 | | Yes | 8 |\n| utf8_estonian_ci | utf8 | 198 | | Yes | 8 |\n| utf8_spanish_ci | utf8 | 199 | | Yes | 8 |\n| utf8_swedish_ci | utf8 | 200 | | Yes | 8 |\n| utf8_turkish_ci | utf8 | 201 | | Yes | 8 |\n| utf8_czech_ci | utf8 | 202 | | Yes | 8 |\n| utf8_danish_ci | utf8 | 203 | | Yes | 8 |\n| utf8_lithuanian_ci | utf8 | 204 | | Yes | 8 |\n| utf8_slovak_ci | utf8 | 205 | | Yes | 8 |\n| utf8_spanish2_ci | utf8 | 206 | | Yes | 8 |\n| utf8_roman_ci | utf8 | 207 | | Yes | 8 |\n| utf8_persian_ci | utf8 | 208 | | Yes | 8 |\n| utf8_esperanto_ci | utf8 | 209 | | Yes | 8 |\n| utf8_hungarian_ci | utf8 | 210 | | Yes | 8 |\n| utf8_sinhala_ci | utf8 | 211 | | Yes | 8 |\n| utf8_croatian_ci | utf8 | 213 | | Yes | 8 |\n+--------------------+---------+-----+---------+----------+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-collation/','','https://mariadb.com/kb/en/show-collation/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (357,26,'SHOW COLUMNS','Syntax\n------ \nSHOW [FULL] {COLUMNS | FIELDS} FROM tbl_name [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW COLUMNS displays information about the columns in a\ngiven table. It also works for views. The LIKE clause, if\npresent on its own, indicates which column names to match.\nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nIf the data types differ from what you expect them to be\nbased on a\nCREATE TABLE statement, note that MariaDB sometimes changes\ndata types when you create or alter a table. The conditions\nunder which this\noccurs are described in the Silent Column Changes article.\n \nThe FULL keyword causes the output to include the column\ncollation and comments, as well as the privileges you have\nfor each column.\n \nYou can use db_name.tbl_name as an alternative to the\ntbl_name FROM db_name syntax. In other words, these two\nstatements are equivalent:\n \nSHOW COLUMNS FROM mytable FROM mydb;\nSHOW COLUMNS FROM mydb.mytable;\n \nSHOW COLUMNS displays the following values for each table\ncolumn:\n \nField indicates the column name.\n \nType indicates the column data type.\n \nCollation indicates the collation for non-binary string\ncolumns, or\nNULL for other columns. This value is displayed only if you\nuse the\nFULL keyword.\n \nThe Null field contains YES if NULL values can be stored in\nthe column,\nNO if not.\n \nThe Key field indicates whether the column is indexed:\nIf Key is empty, the column either is not indexed or is\nindexed only as a\n secondary column in a multiple-column, non-unique index.\nIf Key is PRI, the column is a PRIMARY KEY or\n is one of the columns in a multiple-column PRIMARY KEY.\nIf Key is UNI, the column is the first column of a\nunique-valued\n index that cannot contain NULL values.\nIf Key is MUL, multiple occurrences of a given value are\nallowed\n within the column. The column is the first column of a\nnon-unique index or a\n unique-valued index that can contain NULL values.\n \nIf more than one of the Key values applies to a given column\nof a\ntable, Key displays the one with the highest priority, in\nthe order\nPRI, UNI, MUL.\n \nA UNIQUE index may be displayed as PRI if\nit cannot contain NULL values and there is no\nPRIMARY KEY in the table. A UNIQUE index\nmay display as MUL if several columns form a composite\nUNIQUE index; although the combination of the columns is\nunique, each column can still hold multiple occurrences of a\ngiven value.\n \nThe Default field indicates the default value that is\nassigned to the\ncolumn.\n \nThe Extra field contains any additional information that is\navailable about a given column.\n \nValue | Description | \n \nAUTO_INCREMENT | The column was created with the\nAUTO_INCREMENT keyword. | \n \nPERSISTENT | The column was created with the PERSISTENT\nkeyword. (New in 5.3) | \n \nVIRTUAL | The column was created with the VIRTUAL keyword.\n(New in 5.3) | \n \non update CURRENT_TIMESTAMP | The column is a TIMESTAMP\ncolumn that is automatically updated on INSERT and UPDATE. |\n\n \nPrivileges indicates the privileges you have for the column.\nThis\nvalue is displayed only if you use the FULL keyword.\n \nComment indicates any comment the column has. This value is\ndisplayed\nonly if you use the FULL keyword.\n \nSHOW FIELDS is a synonym for\nSHOW COLUMNS. Also DESCRIBE and EXPLAIN can be used as\nshortcuts.\n \nYou can also list a table\'s columns with: \n \nmysqlshow db_name tbl_name\n \nSee the mysqlshow command for more details.\n \nThe DESCRIBE statement provides information similar to SHOW\nCOLUMNS. The information_schema.COLUMNS table provides\nsimilar, but more complete, information.\n \nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX\nstatements also provide information about tables.\n \nExamples\n-------- \nSHOW COLUMNS FROM city;\n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | NO | | | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | NO | | 0 | |\n+------------+----------+------+-----+---------+----------------+\n \nSHOW COLUMNS FROM employees WHERE Type LIKE \'Varchar%\';\n+---------------+-------------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+---------------+-------------+------+-----+---------+-------+\n| first_name | varchar(30) | NO | MUL | NULL | |\n| last_name | varchar(40) | NO | | NULL | |\n| position | varchar(25) | NO | | NULL | |\n| home_address | varchar(50) | NO | | NULL | |\n| home_phone | varchar(12) | NO | | NULL | |\n| employee_code | varchar(25) | NO | UNI | NULL | |\n+---------------+-------------+------+-----+---------+-------+\n \n\n\nURL: https://mariadb.com/kb/en/show-columns/','','https://mariadb.com/kb/en/show-columns/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (358,26,'SHOW CONTRIBUTORS','Syntax\n------ \nSHOW CONTRIBUTORS\n \nDescription\n----------- \nThe SHOW CONTRIBUTORS statement displays information about\nthe companies and people who financially contribute to\nMariaDB. For each contributor, it displays Name, Location,\nand Comment values. All columns are encoded as latin1.\n \nIn MariaDB 5.5 this is in somewhat random order, and the\nfeature was deprecated.\n \nIn MariaDB 10.0.5 it was un-deprecated, and since then\ndisplays all members and sponsors of the MariaDB Foundation\nas well as other financial contributors.\n \nExample\n \nSHOW CONTRIBUTORS;\n+---------------------+-------------------------------+-------------------------------------------------------------+\n| Name | Location | Comment |\n+---------------------+-------------------------------+-------------------------------------------------------------+\n| Booking.com | https://www.booking.com | Founding member,\nPlatinum Sponsor of the MariaDB Foundation |\n| Alibaba Cloud | https://www.alibabacloud.com/ | Platinum\nSponsor of the MariaDB Foundation |\n| Tencent Cloud | https://cloud.tencent.com | Platinum\nSponsor of the MariaDB Foundation |\n| Microsoft | https://microsoft.com/ | Platinum Sponsor of\nthe MariaDB Foundation |\n| MariaDB Corporation | https://mariadb.com | Founding\nmember, Platinum Sponsor of the MariaDB Foundation |\n| Visma | https://visma.com | Gold Sponsor of the MariaDB\nFoundation |\n| DBS | https://dbs.com | Gold Sponsor of the MariaDB\nFoundation |\n| IBM | https://www.ibm.com | Gold Sponsor of the MariaDB\nFoundation |\n| Tencent Games | http://game.qq.com/ | Gold Sponsor of the\nMariaDB Foundation |\n| Nexedi | https://www.nexedi.com | Silver Sponsor of the\nMariaDB Foundation |\n| Acronis | https://www.acronis.com | Silver Sponsor of the\nMariaDB Foundation |\n| Verkkokauppa.com | https://www.verkkokauppa.com | Bronze\nSponsor of the MariaDB Foundation |\n| Virtuozzo | https://virtuozzo.com | Bronze Sponsor of the\nMariaDB Foundation |\n| Tencent Game DBA | http://tencentdba.com/about | Bronze\nSponsor of the MariaDB Foundation |\n| Tencent TDSQL | http://tdsql.org | Bronze Sponsor of the\nMariaDB Foundation |\n| Percona | https://www.percona.com/ | Bronze Sponsor of the\nMariaDB Foundation |\n| Google | USA | Sponsoring encryption, parallel replication\nand GTID |\n| Facebook | USA | Sponsoring non-blocking API, LIMIT ROWS\nEXAMINED etc |\n| Ronald Bradford | Brisbane, Australia | EFF contribution\nfor UC2006 Auction |\n| Sheeri Kritzer | Boston, Mass. USA | EFF contribution for\nUC2006 Auction |\n| Mark Shuttleworth | London, UK. | EFF contribution for\nUC2006 Auction |\n+---------------------+-------------------------------+-------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-contributors/','','https://mariadb.com/kb/en/show-contributors/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (359,26,'SHOW CREATE DATABASE','Syntax\n------ \nSHOW CREATE {DATABASE | SCHEMA} db_name\n \nDescription\n----------- \nShows the CREATE DATABASE statement that\ncreates the given database. SHOW CREATE SCHEMA is a synonym\nfor SHOW CREATE DATABASE. SHOW CREATE DATABASE quotes\ndatabase names according to the value of the\nsql_quote_show_create server system variable.\n \nExamples\n-------- \nSHOW CREATE DATABASE test;\n+----------+-----------------------------------------------------------------+\n| Database | Create Database |\n+----------+-----------------------------------------------------------------+\n| test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER\nSET latin1 */ |\n+----------+-----------------------------------------------------------------+\n \nSHOW CREATE SCHEMA test;\n+----------+-----------------------------------------------------------------+\n| Database | Create Database |\n+----------+-----------------------------------------------------------------+\n| test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER\nSET latin1 */ |\n+----------+-----------------------------------------------------------------+\n \nWith sql_quote_show_create off:\n \nSHOW CREATE DATABASE test;\n+----------+---------------------------------------------------------------+\n| Database | Create Database |\n+----------+---------------------------------------------------------------+\n| test | CREATE DATABASE test /*!40100 DEFAULT CHARACTER SET\nlatin1 */ |\n+----------+---------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-create-database/','','https://mariadb.com/kb/en/show-create-database/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (360,26,'SHOW CREATE EVENT','Syntax\n------ \nSHOW CREATE EVENT event_name\n \nDescription\n----------- \nThis statement displays the CREATE EVENT\nstatement needed to re-create a given event, as well as the\nSQL_MODE that was used when the trigger has been created and\nthe character set used by the connection.. To find out which\nevents are present, use SHOW EVENTS.\n \nThe output of this statement is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nThe information_schema.EVENTS table provides similar, but\nmore complete, information.\n \nExamples\n-------- \nSHOW CREATE EVENT test.e_daily\\G\n*************************** 1. row\n***************************\n Event: e_daily\n sql_mode: \n time_zone: SYSTEM\n Create Event: CREATE EVENT `e_daily`\n ON SCHEDULE EVERY 1 DAY\n STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR\n ON COMPLETION NOT PRESERVE\n ENABLE\n COMMENT \'Saves total number of sessions then\n clears the table each day\'\n DO BEGIN\n INSERT INTO site_activity.totals (time, total)\n SELECT CURRENT_TIMESTAMP, COUNT(*) \n FROM site_activity.sessions;\n DELETE FROM site_activity.sessions;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-event/','','https://mariadb.com/kb/en/show-create-event/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (361,26,'SHOW CREATE FUNCTION','Syntax\n------ \nSHOW CREATE FUNCTION func_name\n \nDescription\n----------- \nThis statement is similar to \nSHOW CREATE PROCEDURE but for\nstored functions.\n \nThe output of this statement is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nExample\n \nMariaDB [test]> SHOW CREATE FUNCTION VatCents\\G\n*************************** 1. row\n***************************\n Function: VatCents\n sql_mode: \n Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION\n`VatCents`(price DECIMAL(10,2)) RETURNS int(11)\n DETERMINISTIC\nBEGIN\n DECLARE x INT;\n SET x = price * 114;\n RETURN x;\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-function/','','https://mariadb.com/kb/en/show-create-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (362,26,'SHOW CREATE PACKAGE','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW CREATE PACKAGE [ db_name . ] package_name\n \nDescription\n----------- \nThe SHOW CREATE PACKAGE statement can be used when Oracle\nSQL_MODE is set.\n \nShows the CREATE statement that creates the given package\nspecification.\n \nExamples\n-------- \nSHOW CREATE PACKAGE employee_tools\\G\n*************************** 1. row\n***************************\n Package: employee_tools\n sql_mode:\nPIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER\n Create Package: CREATE DEFINER=\"root\"@\"localhost\"\nPACKAGE \"employee_tools\" AS\n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n PROCEDURE raiseSalaryStd(eid INT);\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-package/','','https://mariadb.com/kb/en/show-create-package/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (363,26,'SHOW CREATE PACKAGE BODY','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW CREATE PACKAGE BODY [ db_name . ] package_name\n \nDescription\n----------- \nThe SHOW CREATE PACKAGE BODY statement can be used when\nOracle SQL_MODE is set.\n \nShows the CREATE statement that creates the given package\nbody (i.e. the implementation).\n \nExamples\n-------- \nSHOW CREATE PACKAGE BODY employee_tools\\G\n*************************** 1. row\n***************************\n Package body: employee_tools\n sql_mode:\nPIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER\n Create Package Body: CREATE DEFINER=\"root\"@\"localhost\"\nPACKAGE BODY \"employee_tools\" AS\n \n stdRaiseAmount DECIMAL(10,2):=500;\n \n PROCEDURE log (eid INT, ecmnt TEXT) AS\n BEGIN\n INSERT INTO employee_log (id, cmnt) VALUES (eid, ecmnt);\n END;\n \n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2)) AS\n eid INT;\n BEGIN\n INSERT INTO employee (name, salary) VALUES (ename,\nesalary);\n eid:= last_insert_id();\n log(eid, \'hire \' || ename);\n END;\n \n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2) AS\n nSalary DECIMAL(10,2);\n BEGIN\n SELECT salary INTO nSalary FROM employee WHERE id=eid;\n log(eid, \'getSalary id=\' || eid || \' salary=\' ||\nnSalary);\n RETURN nSalary;\n END;\n \n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2)) AS\n BEGIN\n UPDATE employee SET salary=salary+amount WHERE id=eid;\n log(eid, \'raiseSalary id=\' || eid || \' amount=\' ||\namount);\n END;\n \n PROCEDURE raiseSalaryStd(eid INT) AS\n BEGIN\n raiseSalary(eid, stdRaiseAmount);\n log(eid, \'raiseSalaryStd id=\' || eid);\n END;\n \nBEGIN \n log(0, \'Session \' || connection_id() || \' \' ||\ncurrent_user || \' started\');\nEND\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-create-package-body/','','https://mariadb.com/kb/en/show-create-package-body/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (364,26,'SHOW CREATE PROCEDURE','Syntax\n------ \nSHOW CREATE PROCEDURE proc_name\n \nDescription\n----------- \nThis statement is a MariaDB extension. It returns the exact\nstring that\ncan be used to re-create the named stored procedure, as well\nas the SQL_MODE that was used when the trigger has been\ncreated and the character set used by the connection.. A\nsimilar\nstatement, SHOW CREATE FUNCTION,\ndisplays information about stored functions.\n \nBoth statements require that you are the owner of the\nroutine or have the SELECT privilege on the mysql.proc\ntable. When neither is true, the statements display NULL for\nthe Create Procedure or Create Function field.\n \nWarning Users with SELECT privileges on mysql.proc or USAGE\nprivileges on *.* can view the text of routines, even when\nthey do not have privileges for the function or procedure\nitself.\n \nThe output of these statements is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nExamples\n-------- \nHere\'s a comparison of the SHOW CREATE PROCEDURE and SHOW\nCREATE FUNCTION statements.\n \nSHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row\n***************************\n Procedure: simpleproc\n sql_mode: \n Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1\nINT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \nSHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row\n***************************\n Function: hello\n sql_mode:\n Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n RETURNS CHAR(50)\n RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \nWhen the user issuing the statement does not have privileges\non the routine, attempting to CALL the procedure raises\nError 1370.\n \nCALL test.prc1();\nError 1370 (42000): execute command denieed to user\n\'test_user\'@\'localhost\' for routine \'test\'.\'prc1\'\n \nIf the user neither has privilege to the routine nor the\nSELECT privilege on mysql.proc table, it raises Error 1305,\ninforming them that the procedure does not exist.\n \nSHOW CREATE TABLES test.prc1\\G\nError 1305 (42000): PROCEDURE prc1 does not exist\n \n\n\nURL: https://mariadb.com/kb/en/show-create-procedure/','','https://mariadb.com/kb/en/show-create-procedure/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (365,26,'SHOW CREATE SEQUENCE','Sequences were introduced in MariaDB 10.3.\n \nSyntax\n------ \nSHOW CREATE SEQUENCE sequence_name;\n \nDescription\n----------- \nShows the CREATE SEQUENCE statement that created the given\nsequence. The statement requires the SELECT privilege for\nthe table.\n \nExample\n \nCREATE SEQUENCE s1 START WITH 50;\n \nSHOW CREATE SEQUENCE s1\\G;\n \n*************************** 1. row\n***************************\n Table: t1\nCreate Table: CREATE SEQUENCE `s1` start with 50 minvalue 1\nmaxvalue 9223372036854775806\nincrement by 1 cache 1000 nocycle ENGINE=Aria\n \nNotes\n \nIf you want to see the underlying table structure used for\nthe SEQUENCE\nyou can use SHOW CREATE TABLE on the SEQUENCE. You can also\nuse SELECT to read the current recorded state of the\nSEQUENCE:\n \nCREATE SEQUENCE t1;\n \nSHOW CREATE TABLE s1\\G\n*************************** 1. row\n***************************\n Table: s1\nCreate Table: CREATE TABLE `s1` (\n `next_value` bigint(21) NOT NULL COMMENT \'next not cached\nvalue\',\n `min_value` bigint(21) NOT NULL COMMENT \'min value\',\n `max_value` bigint(21) NOT NULL COMMENT \'max value\',\n `start` bigint(21) NOT NULL COMMENT \'start value\',\n `increment` bigint(21) NOT NULL COMMENT \'increment\nvalue\',\n `cache` bigint(21) NOT NULL COMMENT \'cache size\',\n `cycle` tinyint(1) unsigned NOT NULL COMMENT \'cycle\nstate\',\n `round` bigint(21) NOT NULL COMMENT \'How many cycles has\nbeen done\'\n) ENGINE=Aria SEQUENCE=1\n \nSELECT * FROM s1;\n \n+------------+-----------+---------------------+-------+-----------+-------+-------+-------+\n| next_value | min_value | max_value | start | increment |\ncache | cycle | round |\n+------------+-----------+---------------------+-------+-----------+-------+-------+-------+\n| 1 | 1 | 9223372036854775806 | 1 | 1 | 1000 | 0 | 0 |\n+------------+-----------+---------------------+-------+-----------+-------+-------+-------+\n \n\n\nURL: https://mariadb.com/kb/en/show-create-sequence/','','https://mariadb.com/kb/en/show-create-sequence/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (366,26,'SHOW CREATE TABLE','Syntax\n------ \nSHOW CREATE TABLE tbl_name\n \nDescription\n----------- \nShows the CREATE TABLE statement that created the given\ntable. The statement requires the SELECT privilege for the\ntable. This statement also works with views and SEQUENCE.\n \nSHOW CREATE TABLE quotes table and\ncolumn names according to the value of the\nsql_quote_show_create server system variable.\n \nMariaDB and MySQL-specific table options, column options,\nand index options are not included in the output of this\nstatement if the NO_TABLE_OPTIONS, NO_FIELD_OPTIONS and\nNO_KEY_OPTIONS SQL_MODE flags are used.\n \nInvalid table options, column options and index options are\nnormally commented out (note, that it is possible to create\na table with invalid options, by altering a table of a\ndifferent engine, where these options were valid). To have\nthem uncommented, enable IGNORE_BAD_TABLE_OPTIONS SQL_MODE.\nRemember that replaying a CREATE TABLE statement with\nuncommented invalid options will fail with an error, unless\nIGNORE_BAD_TABLE_OPTIONS SQL_MODE is in effect.\n \nNote that SHOW CREATE TABLE is not meant to provide metadata\nabout a table. It provides information about how the table\nwas declared, but the real table structure could differ a\nbit. For example, if an index has been declared as HASH, the\nCREATE TABLE statement returned by SHOW CREATE TABLE will\ndeclare that index as HASH; however, it is possible that the\nindex is in fact a BTREE, because the storage engine does\nnot support HASH.\n \nMariaDB 10.2.1 permits TEXT and BLOB data types to be\nassigned a DEFAULT value. As a result, from MariaDB 10.2.1,\nSHOW CREATE TABLE will append a DEFAULT NULL to nullable\nTEXT or BLOB fields if no specific default is provided. \n \nFrom MariaDB 10.2.2, numbers are no longer quoted in the\nDEFAULT clause in SHOW CREATE statement. Previously, MariaDB\nquoted numbers. \n \nExamples\n-------- \nSHOW CREATE TABLE t\\G\n*************************** 1. row\n***************************\n Table: t\nCreate Table: CREATE TABLE `t` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `s` char(60) DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nWith sql_quote_show_create off:\n \nSHOW CREATE TABLE t\\G\n*************************** 1. row\n***************************\n Table: t\nCreate Table: CREATE TABLE t (\n id int(11) NOT NULL AUTO_INCREMENT,\n s char(60) DEFAULT NULL,\n PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nUnquoted numeric DEFAULTs, from MariaDB 10.2.2:\n \nCREATE TABLE td (link TINYINT DEFAULT 1);\n \nSHOW CREATE TABLE td\\G\n*************************** 1. row\n***************************\n Table: td\nCreate Table: CREATE TABLE `td` (\n `link` tinyint(4) DEFAULT 1\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \nQuoted numeric DEFAULTs, until MariaDB 10.2.1:\n \nCREATE TABLE td (link TINYINT DEFAULT 1);\n \nSHOW CREATE TABLE td\\G\n*************************** 1. row\n***************************\n Table: td\nCreate Table: CREATE TABLE `td` (\n `link` tinyint(4) DEFAULT \'1\'\n) ENGINE=InnoDB DEFAULT CHARSET=latin1\n \n\n\nURL: https://mariadb.com/kb/en/show-create-table/','','https://mariadb.com/kb/en/show-create-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (367,26,'SHOW CREATE TRIGGER','Syntax\n------ \nSHOW CREATE TRIGGER trigger_name\n \nDescription\n----------- \nThis statement shows a CREATE TRIGGER\nstatement that creates the given trigger, as well as the\nSQL_MODE that was used when the trigger has been created and\nthe character set used by the connection.\n \nThe output of this statement is unreliably affected by the\nsql_quote_show_create server system variable - see\nhttp://bugs.mysql.com/bug.php?id=12719\n \nExamples\n-------- \nSHOW CREATE TRIGGER example\\G\n*************************** 1. row\n***************************\n Trigger: example\n sql_mode:\nONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES\n,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_\nENGINE_SUBSTITUTION\nSQL Original Statement: CREATE DEFINER=`root`@`localhost`\nTRIGGER example BEFORE\n INSERT ON t FOR EACH ROW\nBEGIN\n SET NEW.c = NEW.c * 2;\nEND\n character_set_client: cp850\n collation_connection: cp850_general_ci\n Database Collation: utf8_general_ci\n Created: 2016-09-29 13:53:34.35\n \nThe Created column was added in MySQL 5.7 and MariaDB 10.2.3\nas part of introducing multiple trigger events per action.\n \n\n\nURL: https://mariadb.com/kb/en/show-create-trigger/','','https://mariadb.com/kb/en/show-create-trigger/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (368,26,'SHOW CREATE USER','SHOW CREATE USER was introduced in MariaDB 10.2.0\n \nSyntax\n------ \nSHOW CREATE USER user_name\n \nDescription\n----------- \nShows the CREATE USER statement that created the given\nuser. The statement requires the SELECT privilege for the\nmysql database, except for the current user.\n \nExamples\n-------- \nCREATE USER foo4@test require cipher \'text\' \n issuer \'foo_issuer\' subject \'foo_subject\';\n \nSHOW CREATE USER foo4@test\\G\n*************************** 1. row\n***************************\nCREATE USER \'foo4\'@\'test\' \n REQUIRE ISSUER \'foo_issuer\' \n SUBJECT \'foo_subject\' \n CIPHER \'text\'\n \nUser Password Expiry:\n \nCREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE INTERVAL\n120 DAY;\n \nSHOW CREATE USER \'monty\'@\'localhost\';\n \n+------------------------------------------------------------------+\n| CREATE USER for monty@localhost |\n+------------------------------------------------------------------+\n| CREATE USER \'monty\'@\'localhost\' PASSWORD EXPIRE\nINTERVAL 120 DAY |\n+------------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-create-user/','','https://mariadb.com/kb/en/show-create-user/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (369,26,'SHOW CREATE VIEW','Syntax\n------ \nSHOW CREATE VIEW view_name\n \nDescription\n----------- \nThis statement shows a CREATE VIEW statement that creates\nthe given view, as well as the character set used by the\nconnection when the view was created. This statement\nalso works with views.\n \nSHOW CREATE VIEW quotes table, column and stored function\nnames according to the value of the sql_quote_show_create\nserver system variable.\n \nExamples\n-------- \nSHOW CREATE VIEW example\\G\n*************************** 1. row\n***************************\n View: example\n Create View: CREATE ALGORITHM=UNDEFINED\nDEFINER=`root`@`localhost` SQL\nSECURITY DEFINER VIEW `example` AS (select `t`.`id` AS\n`id`,`t`.`s` AS `s` from\n`t`)\ncharacter_set_client: cp850\ncollation_connection: cp850_general_ci\n \nWith sql_quote_show_create off:\n \nSHOW CREATE VIEW example\\G\n*************************** 1. row\n***************************\n View: example\n Create View: CREATE ALGORITHM=UNDEFINED\nDEFINER=root@localhost SQL SECU\nRITY DEFINER VIEW example AS (select t.id AS id,t.s AS s\nfrom t)\ncharacter_set_client: cp850\ncollation_connection: cp850_general_ci\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-create-view/','','https://mariadb.com/kb/en/show-create-view/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (370,26,'SHOW DATABASES','Syntax\n------ \nSHOW {DATABASES | SCHEMAS}\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW DATABASES lists the databases on the MariaDB server\nhost.\nSHOW SCHEMAS is a synonym for \nSHOW DATABASES. The LIKE clause, if\npresent on its own, indicates which database names to match.\nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nYou see only those databases for which you have some kind of\nprivilege, unless you have the global \nSHOW DATABASES privilege. You\ncan also get this list using the mysqlshow command.\n \nIf the server was started with the --skip-show-database\noption, you cannot use this statement at all unless you have\nthe\nSHOW DATABASES privilege.\n \nExample\n \nSHOW DATABASES;\n+--------------------+\n| Database |\n+--------------------+\n| information_schema |\n| mysql |\n| performance_schema |\n| test |\n+--------------------+\n \nSHOW DATABASES LIKE \'m%\';\n+---------------+\n| Database (m%) |\n+---------------+\n| mysql |\n+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-databases/','','https://mariadb.com/kb/en/show-databases/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (371,26,'SHOW ENGINE','Syntax\n------ \nSHOW ENGINE engine_name {STATUS | MUTEX}\n \nDescription\n----------- \nSHOW ENGINE displays operational information about a storage\nengine. The following statements currently are supported:\n \nSHOW ENGINE INNODB STATUS\nSHOW ENGINE INNODB MUTEX\nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n \nIf the Sphinx Storage Engine is installed, the following is\nalso supported:\n \nSHOW ENGINE SPHINX STATUS\n \nSee SHOW ENGINE SPHINX STATUS.\n \nOlder (and now removed) synonyms were SHOW INNODB STATUS\nfor SHOW ENGINE INNODB STATUS and \nSHOW MUTEX STATUS for \nSHOW ENGINE INNODB MUTEX.\n \nSHOW ENGINE BDB LOGS formerly displayed status information\nabout BDB log files. It was deprecated in MySQL 5.1.12 and\nremoved in MariaDB and MySQL 5.5, so now produces an error.\n \nSHOW ENGINE INNODB STATUS\n \nSHOW ENGINE INNODB STATUS displays extensive information\nfrom the standard InnoDB Monitor about the state of the\nInnoDB storage engine.\nSee SHOW ENGINE INNODB STATUS for more.\n \nSHOW ENGINE INNODB MUTEX\n \nSHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics.\n \nThe statement displays the following output fields:\nType: Always InnoDB.\nName: The source file where the mutex is implemented, and\nthe line number\n in the file where the mutex is created. The line number is\ndependent on the MariaDB version.\nStatus: This field displays the following values if\nUNIV_DEBUG was defined at compilation time (for example, in\ninclude/univ.h in the InnoDB part of the source tree). Only\nthe os_waits value is displayed if UNIV_DEBUG was not\ndefined. Without UNIV_DEBUG, the information on which the\noutput is based is insufficient to distinguish regular\nmutexes and mutexes that protect\n rw-locks (which allow multiple readers or a single writer).\nConsequently, the\n output may appear to contain multiple rows for the same\nmutex.\ncount indicates how many times the mutex was requested.\nspin_waits indicates how many times the spinlock had to run.\nspin_rounds indicates the number of spinlock rounds.\n(spin_rounds divided by\n spin_waits provides the average round count.)\nos_waits indicates the number of operating system waits.\nThis occurs when\n the spinlock did not work (the mutex was not locked during\nthe spinlock and\n it was necessary to yield to the operating system and\nwait).\nos_yields indicates the number of times a the thread trying\nto lock a mutex\n gave up its timeslice and yielded to the operating system\n(on the\n presumption that allowing other threads to run will free\nthe mutex so that\n it can be locked).\nos_wait_times indicates the amount of time (in ms) spent in\noperating system\n waits, if the timed_mutexes system variable is 1 (ON). If\ntimed_mutexes is 0\n (OFF), timing is disabled, so os_wait_times is 0.\ntimed_mutexes is off by\n default.\n \nInformation from this statement can be used to diagnose\nsystem problems. For\nexample, large values of spin_waits and spin_rounds may\nindicate scalability\nproblems.\n \nThe information_schema.INNODB_MUTEXES table provides similar\ninformation.\n \nSHOW ENGINE PERFORMANCE_SCHEMA STATUS\n \nThis statement shows how much memory is used for\nperformance_schema tables and internal buffers.\n \nThe output contains the following fields:\nType: Always performance_schema.\nName: The name of a table, the name of an internal buffer,\nor the performance_schema word, followed by a dot and an\nattribute. Internal buffers names are enclosed by\nparenthesis. performance_schema means that the attribute\nrefers to the whole database (it is a total). \nStatus: The value for the attribute.\n \nThe following attributes are shown, in this order, for all\ntables:\nrow_size: The memory used for an individual record. This\nvalue will never change.\nrow_count: The number of rows in the table or buffer. For\nsome tables, this value depends on a server system variable.\nmemory: For tables and performance_schema, this is the\nresult of row_size * row_count.\n \nFor internal buffers, the attributes are:\ncount\nsize\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-engine/','','https://mariadb.com/kb/en/show-engine/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (372,26,'SHOW ENGINE INNODB STATUS','SHOW ENGINE INNODB STATUS is a specific form of the SHOW\nENGINE statement that displays the InnoDB Monitor output,\nwhich is extensive InnoDB information which can be useful in\ndiagnosing problems.\n \nThe following sections are displayed\nStatus: Shows the timestamp, monitor name and the number of\nseconds, or the elapsed time between the current time and\nthe time the InnoDB Monitor output was last displayed. The\nper-second averages are based upon this time.\nBACKGROUND THREAD: srv_master_thread lines show work\nperformed by the main background thread.\nSEMAPHORES: Threads waiting for a semaphore and stats on how\nthe number of times threads have needed a spin or a wait on\na mutex or rw-lock semaphore. If this number of threads is\nlarge, there may be I/O or contention issues. Reducing the\nsize of the innodb_thread_concurrency system variable may\nhelp if contention is related to thread scheduling. Spin\nrounds per wait shows the number of spinlock rounds per OS\nwait for a mutex. \nLATEST FOREIGN KEY ERROR: Only shown if there has been a\nforeign key constraint error, it displays the failed\nstatement and information about the constraint and the\nrelated tables.\nLATEST DETECTED DEADLOCK: Only shown if there has been a\ndeadlock, it displays the transactions involved in the\ndeadlock and the statements being executed, held and\nrequired locked and the transaction rolled back to.\nTRANSACTIONS: The output of this section can help identify\nlock contention, as well as reasons for the deadlocks.\nFILE I/O: InnoDB thread information as well as pending I/O\noperations and I/O performance statistics.\nINSERT BUFFER AND ADAPTIVE HASH INDEX: InnoDB insert buffer\nand adaptive hash index status information, including the\nnumber of each type of operation performed, and adaptive\nhash index performance.\nLOG: InnoDB log information, including current log sequence\nnumber, how far the log has been flushed to disk, the\nposition at which InnoDB last took a checkpoint, pending\nwrites and write performance statistics.\nBUFFER POOL AND MEMORY: Information on buffer pool pages\nread and written, which allows you to see the number of data\nfile I/O operations performed by your queries. See InnoDB\nBuffer Pool for more. Similar information is also available\nfrom the INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS table.\nROW OPERATIONS:Information about the main thread, including\nthe number and performance rate for each type of row\noperation. \n \nIf the innodb_status_output_locks system variable is set to\n1, extended lock information will be displayed.\n \nExample output:\n \n=====================================\n2016-09-12 04:42:15 7f226145fb00 INNODB MONITOR OUTPUT\n=====================================\nPer second averages calculated from the last 29 seconds\n-----------------\nBACKGROUND THREAD\n-----------------\nsrv_master_thread loops: 0 srv_active, 0 srv_shutdown, 527\nsrv_idle\nsrv_master_thread log flush and writes: 527\n----------\nSEMAPHORES\n----------\nOS WAIT ARRAY INFO: reservation count 4\nOS WAIT ARRAY INFO: signal count 4\nMutex spin waits 2, rounds 60, OS waits 2\nRW-shared spins 2, rounds 60, OS waits 2\nRW-excl spins 0, rounds 0, OS waits 0\nSpin rounds per wait: 30.00 mutex, 30.00 RW-shared, 0.00\nRW-excl\n------------\nTRANSACTIONS\n------------\nTrx id counter 2308\nPurge done for trx\'s n:o < 0 undo n:o < 0 state: running\nbut idle\nHistory list length 0\nLIST OF TRANSACTIONS FOR EACH SESSION:\n---TRANSACTION 0, not started\nMySQL thread id 3, OS thread handle 0x7f226145fb00, query id\n4 localhost root init\nSHOW ENGINE INNODB STATUS\n--------\nFILE I/O\n--------\nI/O thread 0 state: waiting for completed aio requests\n(insert buffer thread)\nI/O thread 1 state: waiting for completed aio requests (log\nthread)\nI/O thread 2 state: waiting for completed aio requests (read\nthread)\nI/O thread 3 state: waiting for completed aio requests (read\nthread)\nI/O thread 4 state: waiting for completed aio requests (read\nthread)\nI/O thread 5 state: waiting for completed aio requests (read\nthread)\nI/O thread 6 state: waiting for completed aio requests\n(write thread)\nI/O thread 7 state: waiting for completed aio requests\n(write thread)\nI/O thread 8 state: waiting for completed aio requests\n(write thread)\nI/O thread 9 state: waiting for completed aio requests\n(write thread)\nPending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0,\n0, 0, 0] ,\n ibuf aio reads: 0, log i/o\'s: 0, sync i/o\'s: 0\nPending flushes (fsync) log: 0; buffer pool: 0\n172 OS file reads, 5 OS file writes, 5 OS fsyncs\n0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s\n-------------------------------------\nINSERT BUFFER AND ADAPTIVE HASH INDEX\n-------------------------------------\nIbuf: size 1, free list len 0, seg size 2, 0 merges\nmerged operations:\n insert 0, delete mark 0, delete 0\ndiscarded operations:\n insert 0, delete mark 0, delete 0\n0.00 hash searches/s, 0.00 non-hash searches/s\n---\nLOG\n---\nLog sequence number 1616829\nLog flushed up to 1616829\nPages flushed up to 1616829\nLast checkpoint at 1616829\nMax checkpoint age 80826164\nCheckpoint age target 78300347\nModified age 0\nCheckpoint age 0\n0 pending log writes, 0 pending chkp writes\n8 log i/o\'s done, 0.00 log i/o\'s/second\n----------------------\nBUFFER POOL AND MEMORY\n----------------------\nTotal memory allocated 140771328; in additional pool\nallocated 0\nTotal memory allocated by read views 88\nInternal hash tables (constant factor + variable factor)\n Adaptive hash index 2217568 (2213368 + 4200)\n Page hash 139112 (buffer pool 0 only)\n Dictionary cache 630703 (554768 + 75935)\n File system 817648 (812272 + 5376)\n Lock system 333232 (332872 + 360)\n Recovery system 0 (0 + 0)\nDictionary memory allocated 75935\nBuffer pool size 8191\nBuffer pool size, bytes 134201344\nFree buffers 8037\nDatabase pages 154\nOld database pages 0\nModified db pages 0\nPercent of dirty pages(LRU & free pages): 0.000\nMax dirty pages percent: 75.000\nPending reads 0\nPending writes: LRU 0, flush list 0, single page 0\nPages made young 0, not young 0\n0.00 youngs/s, 0.00 non-youngs/s\nPages read 154, created 0, written 1\n0.00 reads/s, 0.00 creates/s, 0.00 writes/s\nNo buffer pool page gets since the last printout\nPages read ahead 0.00/s, evicted without access 0.00/s,\nRandom read ahead 0.00/s\nLRU len: 154, unzip_LRU len: 0\nI/O sum[0]:cur[0], unzip sum[0]:cur[0]\n--------------\nROW OPERATIONS\n--------------\n0 queries inside InnoDB, 0 queries in queue\n0 read views open inside InnoDB\n0 RW transactions active inside InnoDB\n0 RO transactions active inside InnoDB\n0 out of 1000 descriptors used\nMain thread process no. 3337, id 139784957703936, state:\nsleeping\nNumber of rows inserted 0, updated 0, deleted 0, read 0\n0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s\nNumber of system rows inserted 0, updated 0, deleted 0, read\n0\n0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s\n----------------------------\nEND OF INNODB MONITOR OUTPUT\n============================\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-engine-innodb-status/','','https://mariadb.com/kb/en/show-engine-innodb-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (373,26,'SHOW ENGINES','Syntax\n------ \nSHOW [STORAGE] ENGINES\n \nDescription\n----------- \nSHOW ENGINES displays status information about the server\'s\nstorage engines. This is particularly useful for checking\nwhether a storage\nengine is supported, or to see what the default engine is. \nSHOW TABLE TYPES is a deprecated synonym.\n \nThe information_schema.ENGINES table provides the same\ninformation.\n \nSince storage engines are plugins, different information\nabout them is also shown in the information_schema.PLUGINS\ntable and by the SHOW PLUGINS statement.\n \nNote that both MySQL\'s InnoDB and Percona\'s XtraDB\nreplacement are labeled as InnoDB. However, if XtraDB is in\nuse, it will be specified in the COMMENT field. See XtraDB\nand InnoDB. The same applies to FederatedX.\n \nThe output consists of the following columns:\nEngine indicates the engine\'s name.\nSupport indicates whether the engine is installed, and\nwhether it is the default engine for the current session.\nComment is a brief description.\nTransactions, XA and Savepoints indicate whether\ntransactions, XA transactions and transaction savepoints are\nsupported by the engine.\n \nExamples\n-------- \nSHOW ENGINES\\G\n*************************** 1. row\n***************************\n Engine: InnoDB\n Support: DEFAULT\n Comment: Supports transactions, row-level locking, and\nforeign keys\nTransactions: YES\n XA: YES\n Savepoints: YES\n*************************** 2. row\n***************************\n Engine: CSV\n Support: YES\n Comment: CSV storage engine\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 3. row\n***************************\n Engine: MyISAM\n Support: YES\n Comment: MyISAM storage engine\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 4. row\n***************************\n Engine: BLACKHOLE\n Support: YES\n Comment: /dev/null storage engine (anything you write to it\ndisappears)\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 5. row\n***************************\n Engine: FEDERATED\n Support: YES\n Comment: FederatedX pluggable storage engine\nTransactions: YES\n XA: NO\n Savepoints: YES\n*************************** 6. row\n***************************\n Engine: MRG_MyISAM\n Support: YES\n Comment: Collection of identical MyISAM tables\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 7. row\n***************************\n Engine: ARCHIVE\n Support: YES\n Comment: Archive storage engine\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 8. row\n***************************\n Engine: MEMORY\n Support: YES\n Comment: Hash based, stored in memory, useful for temporary\ntables\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 9. row\n***************************\n Engine: PERFORMANCE_SCHEMA\n Support: YES\n Comment: Performance Schema\nTransactions: NO\n XA: NO\n Savepoints: NO\n*************************** 10. row\n***************************\n Engine: Aria\n Support: YES\n Comment: Crash-safe tables with MyISAM heritage\nTransactions: NO\n XA: NO\n Savepoints: NO\n10 rows in set (0.00 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-engines/','','https://mariadb.com/kb/en/show-engines/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (374,26,'SHOW ERRORS','Syntax\n------ \nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW ERRORS [LIMIT row_count OFFSET offset]\nSHOW COUNT(*) ERRORS\n \nDescription\n----------- \nThis statement is similar to SHOW WARNINGS, except that\ninstead of\ndisplaying errors, warnings, and notes, it displays only\nerrors.\n \nThe LIMIT clause has the same syntax as for the\nSELECT statement.\n \nThe SHOW COUNT(*) ERRORS statement displays the number of\nerrors. You can also retrieve this number from the\nerror_count variable.\n \nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n \nThe value of error_count might be greater than the number of\nmessages displayed by SHOW WARNINGS if the max_error_count\nsystem variable is set so low that not all messages are\nstored.\n \nFor a list of MariaDB error codes, see MariaDB Error Codes.\n \nExamples\n-------- \nSELECT f();\nERROR 1305 (42000): FUNCTION f does not exist\n \nSHOW COUNT(*) ERRORS;\n \n+-----------------------+\n| @@session.error_count |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSHOW ERRORS;\n \n+-------+------+---------------------------+\n| Level | Code | Message |\n+-------+------+---------------------------+\n| Error | 1305 | FUNCTION f does not exist |\n+-------+------+---------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-errors/','','https://mariadb.com/kb/en/show-errors/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (375,26,'SHOW EVENTS','Syntax\n------ \nSHOW EVENTS [{FROM | IN} schema_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nShows information about Event Manager events (created with\nCREATE EVENT). Requires the EVENT privilege. Without any\narguments, SHOW EVENTS lists all of the events in the\ncurrent schema:\n \nSELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora | myschema |\n+----------------+----------+\n \nSHOW EVENTS\\G\n*************************** 1. row\n***************************\n Db: myschema\n Name: e_daily\n Definer: jon@ghidora\n Time zone: SYSTEM\n Type: RECURRING\n Execute at: NULL\n Interval value: 10\n Interval field: SECOND\n Starts: 2006-02-09 10:41:23\n Ends: NULL\n Status: ENABLED\n Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \nTo see the event action, use SHOW CREATE EVENT instead, or\nlook at the information_schema.EVENTS table.\n \nTo see events for a specific schema, use the FROM clause.\nFor example, to see events for the test schema, use the\nfollowing statement:\n \nSHOW EVENTS FROM test;\n \nThe LIKE clause, if present, indicates which event names to\nmatch. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in Extended Show.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-events/','','https://mariadb.com/kb/en/show-events/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (376,26,'SHOW EXPLAIN','The SHOW EXPLAIN command is a new feature in MariaDB 10.0.0.\n \nCommand description\n \nThe SHOW EXPLAIN command allows one to get an EXPLAIN (that\nis, a\ndescription of a query plan) of a query running in a certain\nthread.\n \nThe syntax is:\n \nSHOW EXPLAIN FOR ;\n \nwhich will produce an EXPLAIN output for the query that\nthread number thread_id is running. The thread id can be\nobtained with SHOW PROCESSLIST.\n \nSHOW EXPLAIN FOR 1;\n \n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| 1 | SIMPLE | tbl | index | NULL | a | 5 | NULL | 1000107 |\nUsing index |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n1 row in set, 1 warning (0.00 sec)\n \nThe output is always accompanied with a warning which shows\nthe query the\ntarget thread is running (this shows what the EXPLAIN is\nfor):\n \nSHOW WARNINGS;\n \n+-------+------+------------------------+\n| Level | Code | Message |\n+-------+------+------------------------+\n| Note | 1003 | select sum(a) from tbl |\n+-------+------+------------------------+\n1 row in set (0.00 sec)\n \nPossible errors\n \nThe output can be only produced if the target thread is\ncurrently running a\nquery, which has a ready query plan. If this is not the\ncase, the output will\nbe:\n \nSHOW EXPLAIN FOR 2;\n \nERROR 1932 (HY000): Target is not running an EXPLAINable\ncommand\n \nYou will get this error when:\nthe target thread is not running a command for which one can\nrun EXPLAIN\nthe target thread is running a command for which one can run\nEXPLAIN, but\nthere is no query plan yet (for example, tables are open and\nlocks are\n acquired before the query plan is produced)\n \n\nDifferences between SHOW EXPLAIN and EXPLAIN outputs\n \nBackground\n \nIn MySQL, EXPLAIN execution takes a slightly different route\nfrom the way\nthe real query (typically the SELECT) is optimized. This is\nunfortunate,\nand has caused a number of bugs in EXPLAIN. (For example,\nsee\nMDEV-326, MDEV-410, and\nlp:1013343.\nlp:992942 is not directly\nabout EXPLAIN, but it also would not have existed if MySQL\ndidn\'t try to delete\nparts of a query plan in the middle of the query) \n \nSHOW EXPLAIN examines a running SELECT, and hence its output\nmay be\nslightly different from what EXPLAIN SELECT would produce.\nWe did our best\nto make sure that either the difference is negligible, or\nSHOW EXPLAIN\'s\noutput is closer to reality than EXPLAIN\'s output.\n \nList of recorded differences\n \nSHOW EXPLAIN may have Extra=\'no matching row in const\ntable\', where EXPLAIN would produce Extra=\'Impossible\nWHERE ...\'\nFor queries with subqueries, SHOW EXPLAIN may print\nselect_type==PRIMARY where regular EXPLAIN used to print\nselect_type==SIMPLE, or vice versa.\n \nRequired permissions\n \nRunning SHOW EXPLAIN requires the same permissions as\nrunning SHOW PROCESSLIST would.\n \n\n\nURL: https://mariadb.com/kb/en/show-explain/','','https://mariadb.com/kb/en/show-explain/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (377,26,'SHOW FUNCTION CODE','Syntax\n------ \nSHOW FUNCTION CODE func_name\n \nDescription\n----------- \nSHOW FUNCTION CODE shows a representation of the internal\nimplementation of the stored function.\n \nIt is similar to SHOW PROCEDURE CODE but for stored\nfunctions.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-function-code/','','https://mariadb.com/kb/en/show-function-code/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (378,26,'SHOW FUNCTION STATUS','Syntax\n------ \nSHOW FUNCTION STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThis statement is similar to \nSHOW PROCEDURE STATUS but for\nstored functions.\n \nThe LIKE clause, if present on its own, indicates which\nfunction names to match. \n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nThe information_schema.ROUTINES table contains more detailed\ninformation.\n \nExamples\n-------- \nShowing all stored functions:\n \nSHOW FUNCTION STATUS\\G\n*************************** 1. row\n***************************\n Db: test\n Name: VatCents\n Type: FUNCTION\n Definer: root@localhost\n Modified: 2013-06-01 12:40:31\n Created: 2013-06-01 12:40:31\n Security_type: DEFINER\n Comment: \ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nStored functions whose name starts with \'V\': \n \nSHOW FUNCTION STATUS LIKE \'V%\' \\G\n*************************** 1. row\n***************************\n Db: test\n Name: VatCents\n Type: FUNCTION\n Definer: root@localhost\n Modified: 2013-06-01 12:40:31\n Created: 2013-06-01 12:40:31\n Security_type: DEFINER\n Comment: \ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nStored functions with a security type of \'DEFINER\':\n \nSHOW FUNCTION STATUS WHERE Security_type LIKE \'DEFINER\'\n\\G\n*************************** 1. row\n***************************\n Db: test\n Name: VatCents\n Type: FUNCTION\n Definer: root@localhost\n Modified: 2013-06-01 12:40:31\n Created: 2013-06-01 12:40:31\n Security_type: DEFINER\n Comment: \ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-function-status/','','https://mariadb.com/kb/en/show-function-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (379,26,'SHOW GRANTS','Users\n \nSyntax\n------ \nSHOW GRANTS [FOR user]\n \nDescription\n----------- \nThis statement lists the GRANT statement or\nstatements that must be issued to duplicate the privileges\nthat are granted to\na MariaDB user account. The account is named using the same\nformat as for the\nGRANT statement; for example,\n\'jeffrey\'@\'localhost\'. If you specify only the user name\npart\nof the account name, a host name part of \'%\' is used. For\nadditional information about specifying account names, see\nGRANT.\n \nSHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH\nGRANT OPTION |\n+---------------------------------------------------------------------+\n \nTo list the privileges granted to the account that you are\nusing to\nconnect to the server, you can use any of the following\nstatements:\n \nSHOW GRANTS;\n \nSHOW GRANTS FOR CURRENT_USER;\n \nSHOW GRANTS FOR CURRENT_USER();\n \nIf SHOW GRANTS FOR CURRENT_USER (or any\nof the equivalent syntaxes) is used in DEFINER context (such\nas within a stored procedure that is defined with \n SQL SECURITY DEFINER), the grants displayed are those of\nthe\ndefiner and not the invoker.\n \nNote that the DELETE HISTORY privilege, introduced in\nMariaDB 10.3.4, is displayed as DELETE VERSIONING ROWS when\nrunning SHOW GRANTS (MDEV-17655).\n \nRoles\n \nRoles were introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nSHOW GRANTS [FOR role]\n \nDescription\n----------- \nFrom MariaDB 10.0.5, SHOW GRANTS can also be used to view\nthe privileges granted to a role.\n \nExample\n \nSHOW GRANTS FOR journalist;\n+------------------------------------------+\n| Grants for journalist |\n+------------------------------------------+\n| GRANT USAGE ON *.* TO \'journalist\' |\n| GRANT DELETE ON `test`.* TO \'journalist\' |\n+------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-grants/','','https://mariadb.com/kb/en/show-grants/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (380,26,'SHOW INDEX','Syntax\n------ \nSHOW {INDEX | INDEXES | KEYS} \n FROM tbl_name [FROM db_name]\n [WHERE expr]\n \nDescription\n----------- \nSHOW INDEX returns table index information. The format\nresembles that of the SQLStatistics call in ODBC.\n \nYou can use db_name.tbl_name as an alternative to the\n tbl_name FROM db_name syntax. These two statements are\n equivalent:\n \nSHOW INDEX FROM mytable FROM mydb;\nSHOW INDEX FROM mydb.mytable;\n \nSHOW KEYS and SHOW INDEXES are synonyms for SHOW INDEX.\n \nYou can also list a table\'s indexes with the following\ncommand: \n \nmysqlshow -k db_name tbl_name\n \nSee mysqlshow for more details.\n \nThe information_schema.STATISTICS table stores similar\ninformation.\n \nThe following fields are returned by SHOW INDEX.\n \nField | Description | \n \nTable | Table name | \n \nNon_unique | 1 if the index permits duplicate values, 0 if\nvalues must be unique. | \n \nKey_name | Index name. The primary key is always named\nPRIMARY. | \n \nSeq_in_index | The column\'s sequence in the index,\nbeginning with 1. | \n \nColumn_name | Column name. | \n \nCollation | Either A, if the column is sorted in ascending\norder in the index, or NULL if it\'s not sorted. | \n \nCardinality | Estimated number of unique values in the\nindex. The cardinality statistics are calculated at various\ntimes, and can help the optimizer make improved decisions. |\n\n \nSub_part | NULL if the entire column is included in the\nindex, or the number of included characters if not. | \n \nPacked | NULL if the index is not packed, otherwise how the\nindex is packed. | \n \nNull | NULL if NULL values are permitted in the column, an\nempty string if NULL\'s are not permitted. | \n \nIndex_type | The index type, which can be BTREE, FULLTEXT,\nHASH or RTREE. See Storage Engine Index Types. | \n \nComment | Other information, such as whether the index is\ndisabled. | \n \nIndex_comment | Contents of the COMMENT attribute when the\nindex was created. | \n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nExamples\n-------- \nCREATE TABLE IF NOT EXISTS `employees_example` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `first_name` varchar(30) NOT NULL,\n `last_name` varchar(40) NOT NULL,\n `position` varchar(25) NOT NULL,\n `home_address` varchar(50) NOT NULL,\n `home_phone` varchar(12) NOT NULL,\n `employee_code` varchar(25) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `employee_code` (`employee_code`),\n KEY `first_name` (`first_name`,`last_name`)\n) ENGINE=Aria;\n \nINSERT INTO `employees_example` (`first_name`, `last_name`,\n`position`, `home_address`, `home_phone`, `employee_code`)\n VALUES\n (\'Mustapha\', \'Mond\', \'Chief Executive Officer\', \'692\nPromiscuous Plaza\', \'326-555-3492\', \'MM1\'),\n (\'Henry\', \'Foster\', \'Store Manager\', \'314 Savage\nCircle\', \'326-555-3847\', \'HF1\'),\n (\'Bernard\', \'Marx\', \'Cashier\', \'1240 Ambient\nAvenue\', \'326-555-8456\', \'BM1\'),\n (\'Lenina\', \'Crowne\', \'Cashier\', \'281 Bumblepuppy\nBoulevard\', \'328-555-2349\', \'LC1\'),\n (\'Fanny\', \'Crowne\', \'Restocker\', \'1023 Bokanovsky\nLane\', \'326-555-6329\', \'FC1\'),\n (\'Helmholtz\', \'Watson\', \'Janitor\', \'944 Soma\nCourt\', \'329-555-2478\', \'HW1\');\n \nSHOW INDEXES FROM employees_example;\n \n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| Table | Non_unique | Key_name | Seq_in_index | Column_name\n| Collation | Cardinality | Sub_part | Packed | Null |\nIndex_type | Comment | Index_comment |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| employees_example | 0 | PRIMARY | 1 | id | A | 7 | NULL |\nNULL | | BTREE | | |\n| employees_example | 0 | employee_code | 1 | employee_code\n| A | 7 | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 1 | first_name | A |\nNULL | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 2 | last_name | A |\nNULL | NULL | NULL | | BTREE | | |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-index/','','https://mariadb.com/kb/en/show-index/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (381,26,'SHOW LOCALES','SHOW LOCALES was introduced as part of the Information\nSchema plugin extension in MariaDB 10.1.1.\n \nSHOW LOCALES is used to return locales information as part\nof the Locales plugin. While the information_schema.LOCALES\ntable has 8 columns, the SHOW LOCALES statement will only\ndisplay 4 of them:\n \nExample\n \nSHOW LOCALES;\n+-----+-------+-------------------------------------+------------------------+\n| Id | Name | Description | Error_Message_Language |\n+-----+-------+-------------------------------------+------------------------+\n| 0 | en_US | English - United States | english |\n| 1 | en_GB | English - United Kingdom | english |\n| 2 | ja_JP | Japanese - Japan | japanese |\n| 3 | sv_SE | Swedish - Sweden | swedish |\n...\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-locales/','','https://mariadb.com/kb/en/show-locales/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (382,26,'SHOW MASTER STATUS','Syntax\n------ \nSHOW MASTER STATUS\n \nDescription\n----------- \nProvides status information about the binary log files of\nthe master.\n \nThis statement requires the SUPER or the REPLICATION_CLIENT\nprivilege.\n \nTo see information about the current GTIDs in the binary\nlog, use the\ngtid_binlog_pos variable.\n \nExample\n \nSHOW MASTER STATUS;\n+--------------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+--------------------+----------+--------------+------------------+\n| mariadb-bin.000016 | 475 | | |\n+--------------------+----------+--------------+------------------+\nSELECT @@global.gtid_binlog_pos;\n+--------------------------+\n| @@global.gtid_binlog_pos |\n+--------------------------+\n| 0-1-2 |\n+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-master-status/','','https://mariadb.com/kb/en/show-master-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (383,26,'SHOW OPEN TABLES','Syntax\n------ \nSHOW OPEN TABLES [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \n SHOW OPEN TABLES lists the non-TEMPORARY\ntables that are currently open in the table cache. See\nhttp://dev.mysql.com/doc/refman/5.1/en/table-cache.html.\n \nThe FROM and LIKE clauses may be used.\n \nThe FROM\nclause, if present, restricts the tables shown to those\npresent in the\ndb_name database. \n \nThe LIKE clause, if\npresent on its own, indicates which table names to match.\nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nThe following information is returned:\n \nColumn | Description | \n \nDatabase | Database name. | \n \nName | Table name. | \n \nIn_use | Number of table instances being used. | \n \nName_locked | 1 if the table is name-locked, e.g. if it is\nbeing dropped or renamed, otherwise 0. | \n \nBefore MariaDB 5.5, each use of, for example, LOCK TABLE ...\nWRITE would increment In_use for that table. With the\nimplementation of the metadata locking improvements in\nMariaDB 5.5, LOCK TABLE... WRITE acquires a strong MDL lock,\nand concurrent connections will wait on this MDL lock, so\nany subsequent LOCK TABLE... WRITE will not increment\nIn_use.\n \nExample\n \nSHOW OPEN TABLES;\n \n+----------+---------------------------+--------+-------------+\n| Database | Table | In_use | Name_locked |\n+----------+---------------------------+--------+-------------+\n...\n| test | xjson | 0 | 0 |\n| test | jauthor | 0 | 0 |\n| test | locks | 1 | 0 |\n...\n+----------+---------------------------+--------+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-open-tables/','','https://mariadb.com/kb/en/show-open-tables/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (384,26,'SHOW PACKAGE BODY STATUS','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW PACKAGE BODY STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe SHOW PACKAGE BODY STATUS statement returns\ncharacteristics of stored package bodies (implementations),\nsuch as the database, name, type, creator, creation and\nmodification dates, and character set information. A similar\nstatement, SHOW PACKAGE STATUS, displays information about\nstored package specifications.\n \nThe LIKE clause, if present, indicates which package names\nto match. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nThe ROUTINES table in the INFORMATION_SCHEMA database\ncontains more detailed information.\n \nExamples\n-------- \nSHOW PACKAGE BODY STATUS LIKE \'pkg1\'\\G\n*************************** 1. row\n***************************\n Db: test\n Name: pkg1\n Type: PACKAGE BODY\n Definer: root@localhost\n Modified: 2018-02-27 14:44:14\n Created: 2018-02-27 14:44:14\n Security_type: DEFINER\n Comment: This is my first package body\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-package-body-status/','','https://mariadb.com/kb/en/show-package-body-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (385,26,'SHOW PACKAGE STATUS','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nSHOW PACKAGE STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThe SHOW PACKAGE STATUS statement returns characteristics of\nstored package specifications, such as the database, name,\ntype, creator, creation and modification dates, and\ncharacter set information. A similar statement, SHOW PACKAGE\nBODY STATUS, displays information about stored package\nbodies (i.e. implementations).\n \nThe LIKE clause, if present, indicates which package names\nto match. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nThe ROUTINES table in the INFORMATION_SCHEMA database\ncontains more detailed information.\n \nExamples\n-------- \nSHOW PACKAGE STATUS LIKE \'pkg1\'\\G\n*************************** 1. row\n***************************\n Db: test\n Name: pkg1\n Type: PACKAGE\n Definer: root@localhost\n Modified: 2018-02-27 14:38:15\n Created: 2018-02-27 14:38:15\n Security_type: DEFINER\n Comment: This is my first package\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-package-status/','','https://mariadb.com/kb/en/show-package-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (386,26,'SHOW PLUGINS','Syntax\n------ \nSHOW PLUGINS;\n \nDescription\n----------- \n SHOW PLUGINS displays information about installed plugins.\nThe Library column indicates the plugin library - if it is\nNULL, the plugin is built-in and cannot be uninstalled.\n \nThe PLUGINS table in the information_schema database\ncontains more detailed information.\n \nFor specific information about storage engines (a particular\ntype of plugin), see the information_schema.ENGINES table\nand the SHOW ENGINES statement.\n \nExamples\n-------- \nSHOW PLUGINS;\n+----------------------------+----------+--------------------+-------------+---------+\n| Name | Status | Type | Library | License |\n+----------------------------+----------+--------------------+-------------+---------+\n| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| mysql_native_password | ACTIVE | AUTHENTICATION | NULL |\nGPL |\n| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL\n|\n| MRG_MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| FEDERATED | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL\n|\n| Aria | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |\n...\n| INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL |\nGPL |\n| INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA |\nNULL | GPL |\n| SPHINX | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| FEEDBACK | DISABLED | INFORMATION SCHEMA | NULL | GPL |\n| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |\n| pam | ACTIVE | AUTHENTICATION | auth_pam.so | GPL |\n+----------------------------+----------+--------------------+-------------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/show-plugins/','','https://mariadb.com/kb/en/show-plugins/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (387,26,'SHOW PLUGINS SONAME','MariaDB 10.0.2\n \nSHOW PLUGINS SONAME was introduced in MariaDB 10.0.2\n \nSyntax\n------ \nSHOW PLUGINS SONAME { library | LIKE \'pattern\' | WHERE\nexpr };\n \nDescription\n----------- \nSHOW PLUGINS SONAME displays information about compiled-in\nand all server plugins in the plugin_dir directory,\nincluding plugins that haven\'t been installed.\n \nExamples\n-------- \nSHOW PLUGINS SONAME \'ha_example.so\';\n+----------+---------------+----------------+---------------+---------+\n| Name | Status | Type | Library | License |\n+----------+---------------+----------------+---------------+---------+\n| EXAMPLE | NOT INSTALLED | STORAGE ENGINE | ha_example.so |\nGPL |\n| UNUSABLE | NOT INSTALLED | DAEMON | ha_example.so | GPL |\n+----------+---------------+----------------+---------------+---------+\n \nThere is also a corresponding information_schema table,\ncalled ALL_PLUGINS, which contains more complete\ninformation.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-plugins-soname/','','https://mariadb.com/kb/en/show-plugins-soname/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (388,26,'SHOW PRIVILEGES','Syntax\n------ \nSHOW PRIVILEGES\n \nDescription\n----------- \n SHOW PRIVILEGES shows the list of system privileges that\nthe MariaDB server supports. The exact list of privileges\ndepends on the version of your server.\n \nNote that the Delete history privilege displays as Delete\nversioning rows (MDEV-20382).\n \nExamples\n-------- \nSHOW PRIVILEGES;\n+-------------------------+---------------------------------------+-------------------------------------------------------+\n| Privilege | Context | Comment |\n+-------------------------+---------------------------------------+-------------------------------------------------------+\n| Alter | Tables | To alter the table |\n| Alter routine | Functions,Procedures | To alter or drop\nstored functions/procedures |\n| Create | Databases,Tables,Indexes | To create new\ndatabases and tables |\n| Create routine | Databases | To use CREATE\nFUNCTION/PROCEDURE |\n| Create temporary tables | Databases | To use CREATE\nTEMPORARY TABLE |\n| Create view | Tables | To create new views |\n| Create user | Server Admin | To create new users |\n| Delete | Tables | To delete existing rows |\n| Delete versioning rows | Tables | To delete versioning\ntable historical rows |\n| Drop | Databases,Tables | To drop databases, tables, and\nviews |\n| Event | Server Admin | To create, alter, drop and execute\nevents |\n| Execute | Functions,Procedures | To execute stored\nroutines |\n| File | File access on server | To read and write files on\nthe server |\n| Grant option | Databases,Tables,Functions,Procedures | To\ngive to other users those privileges you possess |\n| Index | Tables | To create or drop indexes |\n| Insert | Tables | To insert data into tables |\n| Lock tables | Databases | To use LOCK TABLES (together\nwith SELECT privilege) |\n| Process | Server Admin | To view the plain text of\ncurrently executing queries |\n| Proxy | Server Admin | To make proxy user possible |\n| References | Databases,Tables | To have references on\ntables |\n| Reload | Server Admin | To reload or refresh tables, logs\nand privileges |\n| Replication client | Server Admin | To ask where the slave\nor master servers are |\n| Replication slave | Server Admin | To read binary log\nevents from the master |\n| Select | Tables | To retrieve rows from table |\n| Show databases | Server Admin | To see all databases with\nSHOW DATABASES |\n| Show view | Tables | To see views with SHOW CREATE VIEW |\n| Shutdown | Server Admin | To shut down the server |\n| Super | Server Admin | To use KILL thread, SET GLOBAL,\nCHANGE MASTER, etc. |\n| Trigger | Tables | To use triggers |\n| Create tablespace | Server Admin | To create/alter/drop\ntablespaces |\n| Update | Tables | To update existing rows |\n| Usage | Server Admin | No privileges - allow connect only\n|\n+-------------------------+---------------------------------------+-------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-privileges/','','https://mariadb.com/kb/en/show-privileges/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (389,26,'SHOW PROCEDURE CODE','Syntax\n------ \nSHOW PROCEDURE CODE proc_name\n \nDescription\n----------- \nThis statement is a MariaDB extension that is available only\nfor servers that\nhave been built with debugging support. It displays a\nrepresentation of the\ninternal implementation of the named stored procedure. A\nsimilar statement,\n SHOW FUNCTION CODE, displays\ninformation about stored functions.\n \nBoth statements require that you be the owner of the routine\nor have\n SELECT access to the mysql.proc table.\n \nIf the named routine is available, each statement produces a\nresult\nset. Each row in the result set corresponds to one\n\"instruction\" in\nthe routine. The first column is Pos, which is an ordinal\nnumber\nbeginning with 0. The second column is Instruction, which\ncontains an\nSQL statement (usually changed from the original source), or\na\ndirective which has meaning only to the stored-routine\nhandler.\n \nExamples\n-------- \nDELIMITER //\n \nCREATE PROCEDURE p1 ()\n BEGIN\n DECLARE fanta INT DEFAULT 55;\n DROP TABLE t2;\n LOOP\n INSERT INTO t3 VALUES (fanta);\n END LOOP;\n END//\nQuery OK, 0 rows affected (0.00 sec)\n \nSHOW PROCEDURE CODE p1//\n+-----+----------------------------------------+\n| Pos | Instruction |\n+-----+----------------------------------------+\n| 0 | set fanta@0 55 |\n| 1 | stmt 9 \"DROP TABLE t2\" |\n| 2 | stmt 5 \"INSERT INTO t3 VALUES (fanta)\" |\n| 3 | jump 2 |\n+-----+----------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-procedure-code/','','https://mariadb.com/kb/en/show-procedure-code/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (390,26,'SHOW PROCEDURE STATUS','Syntax\n------ \nSHOW PROCEDURE STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nThis statement is a MariaDB extension. It returns\ncharacteristics of a stored\nprocedure, such as the database, name, type, creator,\ncreation and modification\ndates, and character set information. A similar statement, \n SHOW FUNCTION STATUS, displays\ninformation about stored functions.\n \nThe LIKE clause, if present, indicates which procedure or\nfunction names to match. The WHERE and LIKE clauses can be\ngiven to select rows using more general conditions, as\ndiscussed in Extended SHOW.\n \nThe ROUTINES table in the INFORMATION_SCHEMA database\ncontains more detailed information.\n \nExamples\n-------- \nSHOW PROCEDURE STATUS LIKE \'p1\'\\G\n*************************** 1. row\n***************************\n Db: test\n Name: p1\n Type: PROCEDURE\n Definer: root@localhost\n Modified: 2010-08-23 13:23:03\n Created: 2010-08-23 13:23:03\n Security_type: DEFINER\n Comment: \ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n Database Collation: latin1_swedish_ci\n \n\n\nURL: https://mariadb.com/kb/en/show-procedure-status/','','https://mariadb.com/kb/en/show-procedure-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (391,26,'SHOW PROCESSLIST','Syntax\n------ \nSHOW [FULL] PROCESSLIST\n \nDescription\n----------- \n SHOW PROCESSLIST shows you which threads are running. You\ncan also get this information from the\ninformation_schema.PROCESSLIST table or the mysqladmin\nprocesslist command. If you have the \nPROCESS privilege, you can see all threads.\nOtherwise, you can see only your own threads (that is,\nthreads associated with\nthe MariaDB account that you are using). If you do not use\nthe\nFULL keyword, only the first 100 characters of each\nstatement are shown in the Info field.\n \nThe columns shown in SHOW PROCESSLIST\n are:\n \nName | Description | Introduced | \n \nID | The client\'s process ID. | | \n \nUSER | The username associated with the process. | | \n \nHOST | The host the client is connected to. | | \n \nDB | The default database of the process (NULL if no\ndefault). | | \n \nCOMMAND | The command type. See Thread Command Values. | | \n \nTIME | The amount of time, in seconds, the process has been\nin its current state. For a slave SQL thread before MariaDB\n10.1, this is the time in seconds between the last\nreplicated event\'s timestamp and the slave machine\'s real\ntime. | | \n \nSTATE | See Thread States. | | \n \nINFO | The statement being executed. | | \n \nPROGRESS | The total progress of the process (0-100%) (see\nProgress Reporting). | MariaDB 5.3 | \n \nSee TIME_MS column in information_schema.PROCESSLIST for\ndifferences in the TIME column between MariaDB and MySQL.\n \nThe information_schema.PROCESSLIST table contains the\nfollowing additional columns:\n \nName | Description | Introduced | \n \nTIME_MS | The amount of time, in milliseconds, the process\nhas been in its current state. | MariaDB 5.1 | \n \nSTAGE | The stage the process is currently in. |\nMariaDB 5.3 | \n \nMAX_STAGE | The maximum number of stages. | MariaDB 5.3 | \n \nPROGRESS | The progress of the process within the current\nstage (0-100%). | MariaDB 5.3 | \n \nMEMORY_USED | The amount of memory used by the process. |\nMariaDB 10.0.1 | \n \nEXAMINED_ROWS | The number of rows the process has examined.\n| MariaDB 10.0.1 | \n \nQUERY_ID | Query ID. | MariaDB 10.0.5 | \n \nNote that the PROGRESS field from the information schema,\nand the PROGRESS field from SHOW PROCESSLIST display\ndifferent results. SHOW PROCESSLIST shows the total\nprogress, while the information schema shows the progress\nfor the current stage only.\n \nThreads can be killed using their thread_id, or, since\nMariaDB 10.0.5, their query_id, with the KILL statement.\n \nSince queries on this table are locking, if the\nperformance_schema is enabled, you may want to query the\nTHREADS table instead.\n \nExamples\n-------- \nFrom MariaDB 5.1.x\n \nSHOW FULL PROCESSLIST;\n+---------+-------+-----------+------+---------+------+-------+-----------------------+\n| Id | User | Host | db | Command | Time | State | Info |\n+---------+-------+-----------+------+---------+------+-------+-----------------------+\n| 1988880 | dbart | localhost | NULL | Query | 0 | NULL |\nSHOW FULL PROCESSLIST |\n+---------+-------+-----------+------+---------+------+-------+-----------------------+\n \nSELECT * FROM information_schema.processlist;\n+---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+\n| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |\nTIME_MS |\n+---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+\n| 1988880 | dbart | localhost | NULL | Query | 0 | executing\n| SELECT * FROM information_schema.processlist | 0.444 |\n+---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+\n \nFrom MariaDB 5.5.x\n \nSHOW FULL PROCESSLIST;\n+-----+------+-----------+------+---------+------+-------+-----------------------+----------+\n| Id | User | Host | db | Command | Time | State | Info |\nProgress |\n+-----+------+-----------+------+---------+------+-------+-----------------------+----------+\n| 126 | root | localhost | NULL | Query | 0 | NULL | SHOW\nFULL PROCESSLIST | 0.000 |\n+-----+------+-----------+------+---------+------+-------+-----------------------+----------+\n \nSELECT * FROM information_schema.processlist;\n+-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+\n| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |\nTIME_MS | STAGE | MAX_STAGE | PROGRESS |\n+-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+\n| 126 | root | localhost | NULL | Query | 0 | executing |\nSELECT * FROM information_schema.processlist | 344.718 | 0 |\n0 | 0.000 |\n+-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+\n \nFrom MariaDB 10.0.x\n \nSHOW PROCESSLIST;\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n| Id | User | Host | db | Command | Time | State | Info |\nProgress |\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n| 2 | event_scheduler | localhost | NULL | Daemon | 2693 |\nWaiting on empty queue | NULL | 0.000 |\n| 4 | root | localhost | NULL | Query | 0 | Table lock |\nSHOW PROCESSLIST | 0.000 |\n+----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-processlist/','','https://mariadb.com/kb/en/show-processlist/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (392,26,'SHOW PROFILE','Syntax\n------ \nSHOW PROFILE [type [, type] ... ]\n [FOR QUERY n]\n [LIMIT row_count [OFFSET offset]]\n \ntype:\n ALL\n | BLOCK IO\n | CONTEXT SWITCHES\n | CPU\n | IPC\n | MEMORY\n | PAGE FAULTS\n | SOURCE\n | SWAPS\n \nDescription\n----------- \nThe SHOW PROFILE and \nSHOW PROFILES statements display profiling\ninformation that indicates resource usage for statements\nexecuted during the\ncourse of the current session.\n \nProfiling is controlled by the profiling session variable,\nwhich has a default value of 0 (OFF). Profiling is enabled\nby setting profiling to 1 or ON:\n \nSET profiling = 1;\n \nSHOW PROFILES displays a list of the most recent statements\nsent to the master. The size of the list is controlled by\nthe\nprofiling_history_size session variable, which has a default\nvalue of 15. The maximum value is 100. Setting the value to\n0 has the practical effect of disabling profiling.\n \nAll statements are profiled except SHOW PROFILES and \nSHOW PROFILE, so you will find neither of those statements\nin the profile list. Malformed statements are profiled. For\nexample, \n SHOW PROFILING is an illegal statement, and a syntax error\noccurs if you try to execute it, but it will show up in the\nprofiling list.\n \n SHOW PROFILE displays detailed information about a single\nstatement. Without the FOR QUERY n clause, the output\npertains to the most recently executed statement. If \n FOR QUERY n is included,\n SHOW PROFILE displays information for statement n. The\nvalues of n correspond to\nthe Query_ID values displayed by SHOW PROFILES.\n \nThe LIMIT row_count clause may be given to limit the\noutput to row_count rows. If LIMIT is given, \n OFFSET offset may be added to begin the output offset\nrows into the full set of rows.\n \nBy default, SHOW PROFILE displays Status and Duration\ncolumns. The Status values are like the State values\ndisplayed by \nSHOW PROCESSLIST,\nalthough there might be some minor differences in\ninterpretation for\nthe two statements for some status values (see\nhttp://dev.mysql.com/doc/refman/5.6/en/thread-information.html).\n \nOptional type values may be specified to display specific\nadditional\ntypes of information:\nALL displays all information\nBLOCK IO displays counts for block input and output\noperations\nCONTEXT SWITCHES displays counts for voluntary and\ninvoluntary context switches\nCPU displays user and system CPU usage times\nIPC displays counts for messages sent and received\nMEMORY is not currently implemented\nPAGE FAULTS displays counts for major and minor page faults\nSOURCE displays the names of functions from the source code,\ntogether with the name and line number of the file in which\nthe function occurs\nSWAPS displays swap counts\n \nProfiling is enabled per session. When a session ends, its\nprofiling information is lost.\n \nThe information_schema.PROFILING table contains similar\ninformation.\n \nExamples\n-------- \nSELECT @@profiling;\n+-------------+\n| @@profiling |\n+-------------+\n| 0 |\n+-------------+\n \nSET profiling = 1;\n \nUSE test;\n \nDROP TABLE IF EXISTS t1;\n \nCREATE TABLE T1 (id INT);\n \nSHOW PROFILES;\n+----------+------------+--------------------------+\n| Query_ID | Duration | Query |\n+----------+------------+--------------------------+\n| 1 | 0.00009200 | SELECT DATABASE() |\n| 2 | 0.00023800 | show databases |\n| 3 | 0.00018900 | show tables |\n| 4 | 0.00014700 | DROP TABLE IF EXISTS t1 |\n| 5 | 0.24476900 | CREATE TABLE T1 (id INT) |\n+----------+------------+--------------------------+\n \nSHOW PROFILE;\n+----------------------+----------+\n| Status | Duration |\n+----------------------+----------+\n| starting | 0.000042 |\n| checking permissions | 0.000044 |\n| creating table | 0.244645 |\n| After create | 0.000013 |\n| query end | 0.000003 |\n| freeing items | 0.000016 |\n| logging slow query | 0.000003 |\n| cleaning up | 0.000003 |\n+----------------------+----------+\n \nSHOW PROFILE FOR QUERY 4;\n+--------------------+----------+\n| Status | Duration |\n+--------------------+----------+\n| starting | 0.000126 |\n| query end | 0.000004 |\n| freeing items | 0.000012 |\n| logging slow query | 0.000003 |\n| cleaning up | 0.000002 |\n+--------------------+----------+\n \nSHOW PROFILE CPU FOR QUERY 5;\n+----------------------+----------+----------+------------+\n| Status | Duration | CPU_user | CPU_system |\n+----------------------+----------+----------+------------+\n| starting | 0.000042 | 0.000000 | 0.000000 |\n| checking permissions | 0.000044 | 0.000000 | 0.000000 |\n| creating table | 0.244645 | 0.000000 | 0.000000 |\n| After create | 0.000013 | 0.000000 | 0.000000 |\n| query end | 0.000003 | 0.000000 | 0.000000 |\n| freeing items | 0.000016 | 0.000000 | 0.000000 |\n| logging slow query | 0.000003 | 0.000000 | 0.000000 |\n| cleaning up | 0.000003 | 0.000000 | 0.000000 |\n+----------------------+----------+----------+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-profile/','','https://mariadb.com/kb/en/show-profile/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (393,26,'SHOW PROFILES','Syntax\n------ \nSHOW PROFILES\n \nDescription\n----------- \nThe SHOW PROFILES statement displays profiling information\nthat indicates resource usage for statements executed during\nthe course of the\ncurrent session. It is used together with \nSHOW PROFILE.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-profiles/','','https://mariadb.com/kb/en/show-profiles/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (394,26,'SHOW QUERY_RESPONSE_TIME','SHOW QUERY_RESPONSE_TIME was introduced in MariaDB 10.1.1.\n \nStarting with MariaDB 10.1.1, which introduced the\nInformation Schema plugin extension, it is possible to use\nSHOW QUERY_RESPONSE_TIME as an alternative for retrieving\ninformation from the QUERY_RESPONSE_TIME plugin.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-query_response_time/','','https://mariadb.com/kb/en/show-query_response_time/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (395,26,'SHOW RELAYLOG EVENTS','Syntax\n------ \nSHOW RELAYLOG [\'connection_name\'] EVENTS\n [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n \nDescription\n----------- \nOn replication slaves this command shows the events in the\nrelay log. If \'log_name\' is not specified, the first relay\nlog is shown.\n \nSyntax for the LIMIT clause is the same as for SELECT ...\nLIMIT.\n \nUsing the LIMIT clause is highly recommended because the\nSHOW RELAYLOG EVENTS command returns the complete contents\nof the relay log, which can be quite large.\n \nThis command does not return events related to setting user\nand system variables. If you need those, use mysqlbinlog.\n \nOn the replication master, this command does nothing.\n \nconnection_name\n \nconnection_name was added as part of multi-source\nreplication added in MariaDB 10.0.1\n \nIf there is only one nameless master, or the default master\n(as specified by the default_master_connection system\nvariable) is intended, connection_name can be omitted. If\nprovided, the SHOW RELAYLOG statement will apply to the\nspecified master. connection_name is case-insensitive.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-relaylog-events/','','https://mariadb.com/kb/en/show-relaylog-events/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (396,26,'SHOW SLAVE HOSTS','Syntax\n------ \nSHOW SLAVE HOSTS\n \nDescription\n----------- \nThis command is run on the master and displays a list of\nreplication slaves that are currently registered with it.\nOnly slaves started with the --report-host=host_name option\nare visible in this list.\n \nThe list is displayed on any server (not just the master\nserver). The output\nlooks like this:\n \nSHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id | Host | Port | Master_id |\n+------------+-----------+------+-----------+\n| 192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena | 3306 | 192168011 |\n+------------+-----------+------+-----------+\nServer_id: The unique server ID of the slave server, as\nconfigured in the server\'s option file, or on the command\nline with --server-id=value.\nHost: The host name of the slave server, as configured in\nthe server\'s option file, or on the command line with\n--report-host=host_name. Note that this can differ from the\nmachine name as configured in the operating system.\nPort: The port the slave server is listening on.\nMaster_id: The unique server ID of the master server that\nthe slave server is replicating from.\n \nSome MariaDB and MySQL versions report another variable,\nrpl_recovery_rank. This\nvariable was never used, and was eventually removed in\nMariaDB 10.1.2 and MySQL 5.6.\n \n\n\nURL: https://mariadb.com/kb/en/show-slave-hosts/','','https://mariadb.com/kb/en/show-slave-hosts/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (397,26,'SHOW SLAVE STATUS','Syntax\n------ \nSHOW SLAVE [\"connection_name\"] STATUS\n \nor\n \nSHOW ALL SLAVES STATUS\n \nDescription\n----------- \nThis statement is to be run on a slave and provides status\ninformation on essential parameters of the replication slave\nthreads.\n \nThis statement requires the SUPER or the REPLICATION_CLIENT\nprivilege.\n \nMulti-source\n \nMariaDB 10.0 introduced the FULL and \"connection_name\"\noptions to\nallow you to connect to many masters at the same time.\n \nALL SLAVES gives you a list of all connections to the\nmaster.\n \nThe rows will be sorted according to Connection_name.\n \nIf you specify a connection_name, you only get the\ninformation about that\nconnection. If connection_name is not used, then the name\nset by default_master_connection is used. If the connection\nname doesn\'t exist you will get an error:\nThere is no master connection for \'xxx\'.\n \nColumn descriptions\n \nName | Description | Added | \n \nConnection_name | Name of the master connection. Returned\nwith SHOW ALL SLAVES STATUS only. | MariaDB 10.0 | \n \nSlave_SQL_State | State of SQL thread. Returned with SHOW\nALL SLAVES STATUS only. See Slave SQL Thread States. |\nMariaDB 10.0 | \n \nSlave_IO_State | State of I/O thread. See Slave I/O Thread\nStates. | MariaDB 10.0 | \n \nMaster_host | Master host that the slave is connected to. | \n| \n \nMaster_user | Account user name being used to connect to the\nmaster. | | \n \nMaster_port | The port being used to connect to the master.\n| | \n \nConnect_Retry | Time in seconds between retries to connect.\nThe default is 60. The CHANGE MASTER TO statement can set\nthis. The master-retry-count option determines the maximum\nnumber of reconnection attempts. | | \n \nMaster_Log_File | Name of the master binary log file that\nthe I/O thread is currently reading from. | | \n \nRead_Master_Log_Pos | Position up to which the I/O thread\nhas read in the current master binary log file. | | \n \nRelay_Log_File | Name of the relay log file that the SQL\nthread is currently processing. | | \n \nRelay_Log_Pos | Position up to which the SQL thread has\nfinished processing in the current relay log file. | | \n \nRelay_Master_Log_File | Name of the master binary log file\nthat contains the most recent event executed by the SQL\nthread. | | \n \nSlave_IO_Running | Whether the slave I/O thread is running\nand connected (Yes), running but not connected to a master\n(Connecting) or not running (No). | | \n \nSlave_SQL_Running | Whether or not the SQL thread is\nrunning. | | \n \nReplicate_Do_DB | Databases specified for replicating with\nthe replicate_do_db option. | | \n \nReplicate_Ignore_DB | Databases specified for ignoring with\nthe replicate_ignore_db option. | | \n \nReplicate_Do_Table | Tables specified for replicating with\nthe replicate_do_table option. | | \n \nReplicate_Ignore_Table | Tables specified for ignoring with\nthe replicate_ignore_table option. | | \n \nReplicate_Wild_Do_Table | Tables specified for replicating\nwith the replicate_wild_do_table option. | | \n \nReplicate_Wild_Ignore_Table | Tables specified for ignoring\nwith the replicate_wild_ignore_table option. | | \n \nLast_Errno | Alias for Last_SQL_Errno (see below) | | \n \nLast Error | Alias for Last_SQL_Error (see below) | | \n \nSkip_Counter | Number of events that a slave skips from the\nmaster, as recorded in the sql_slave_skip_counter system\nvariable. | | \n \nExec_Master_Log_Pos | Position up to which the SQL thread\nhas processed in the current master binary log file. Can be\nused to start a new slave from a current slave with the\nCHANGE MASTER TO ... MASTER_LOG_POS option. | | \n \nRelay_Log_Space | Total size of all relay log files\ncombined. | | \n \nUntil_Condition | | | \n \nUntil_Log_File | The MASTER_LOG_FILE value of the START\nSLAVE UNTIL condition. | | \n \nUntil_Log_Pos | The MASTER_LOG_POS value of the START SLAVE\nUNTIL condition. | | \n \nMaster_SSL_Allowed | Whether an SSL connection is permitted\n(Yes), not permitted (No) or permitted but without the slave\nhaving SSL support enabled (Ignored) | | \n \nMaster_SSL_CA_File | The MASTER_SSL_CA option of the CHANGE\nMASTER TO statement. | | \n \nMaster_SSL_CA_Path | The MASTER_SSL_CAPATH option of the\nCHANGE MASTER TO statement. | | \n \nMaster_SSL_Cert | The MASTER_SSL_CERT option of the CHANGE\nMASTER TO statement. | | \n \nMaster_SSL_Cipher | The MASTER_SSL_CIPHER option of the\nCHANGE MASTER TO statement. | | \n \nMaster_SSL_Key | The MASTER_SSL_KEY option of the CHANGE\nMASTER TO statement. | | \n \nSeconds_Behind_Master | Difference between the timestamp\nlogged on the master for the event that the slave is\ncurrently processing, and the current timestamp on the\nslave. Zero if the slave is not currently processing an\nevent. From MariaDB 10.0.23 and MariaDB 10.1.9, with\nparallel replication, seconds_behind_master is updated only\nafter transactions commit. | | \n \nMaster_SSL_Verify_Server_Cert | The\nMASTER_SSL_VERIFY_SERVER_CERT option of the CHANGE MASTER TO\nstatement. | | \n \nLast_IO_Errno | Error code of the most recent error that\ncaused the I/O thread to stop (also recorded in the slave\'s\nerror log). 0 means no error. RESET SLAVE or RESET MASTER\nwill reset this value. | | \n \nLast_IO_Error | Error message of the most recent error that\ncaused the I/O thread to stop (also recorded in the slave\'s\nerror log). An empty string means no error. RESET SLAVE or\nRESET MASTER will reset this value. | | \n \nLast_SQL_Errno | Error code of the most recent error that\ncaused the SQL thread to stop (also recorded in the slave\'s\nerror log). 0 means no error. RESET SLAVE or RESET MASTER\nwill reset this value. | | \n \nLast_SQL_Error | Error message of the most recent error that\ncaused the SQL thread to stop (also recorded in the slave\'s\nerror log). An empty string means no error. RESET SLAVE or\nRESET MASTER will reset this value. | | \n \nReplicate_Ignore_Server_Ids | List of server_ids that are\ncurrently being ignored for replication purposes, or an\nempty string for none, as specified in the IGNORE_SERVER_IDS\noption of the CHANGE MASTER TO statement. | | \n \nMaster_Server_Id | The master\'s server_id value. | | \n \nMaster_SSL_Crl | The MASTER_SSL_CRL option of the CHANGE\nMASTER TO statement. | MariaDB 10.0 | \n \nMaster_SSL_Crlpath | The MASTER_SSL_CRLPATH option of the\nCHANGE MASTER TO statement. | MariaDB 10.0 | \n \nUsing_Gtid | Whether or not global transaction ID\'s are\nbeing used for replication (can be No, Slave_Pos, or\nCurrent_Pos). | MariaDB 10.0.2 | \n \nGtid_IO_Pos | Current global transaction ID value. | MariaDB\n10.0.2 | \n \nRetried_transactions | Number of retried transactions for\nthis connection. Returned with SHOW ALL SLAVES STATUS only.\n| MariaDB 10.0 | \n \nMax_relay_log_size | Max relay log size for this connection.\nReturned with SHOW ALL SLAVES STATUS only. | MariaDB 10.0 | \n \nExecuted_log_entries | How many log entries the slave has\nexecuted. Returned with SHOW ALL SLAVES STATUS only. |\nMariaDB 10.0 | \n \nSlave_received_heartbeats | How many heartbeats we have got\nfrom the master. Returned with SHOW ALL SLAVES STATUS only.\n| MariaDB 10.0 | \n \nSlave_heartbeat_period | How often to request a heartbeat\npacket from the master (in seconds). Returned with SHOW ALL\nSLAVES STATUS only. | MariaDB 10.0 | \n \nGtid_Slave_Pos | GTID of the last event group replicated on\na slave server, for each replication domain, as stored in\nthe gtid_slave_pos system variable. Returned with SHOW ALL\nSLAVES STATUS only. | MariaDB 10.0 | \n \nSQL_Delay | Value specified by MASTER_DELAY in CHANGE MASTER\n(or 0 if none). | MariaDB 10.2.3 | \n \nSQL_Remaining_Delay | When the slave is delaying the\nexecution of an event due to MASTER_DELAY, this is the\nnumber of seconds of delay remaining before the event will\nbe applied. Otherwise, the value is NULL. | MariaDB 10.2.3 |\n\n \nSlave_SQL_Running_State | The state of the SQL driver\nthreads, same as in SHOW PROCESSLIST. When the slave is\ndelaying the execution of an event due to MASTER_DELAY, this\nfield displays: \"Waiting until MASTER_DELAY seconds after\nmaster executed event\". | MariaDB 10.2.3 | \n \nSlave_DDL_Groups | This status variable counts the\noccurrence of DDL statements. This is a slave-side counter\nfor optimistic parallel replication. | MariaDB 10.3.7 | \n \nSlave_Non_Transactional_Groups | This status variable counts\nthe occurrence of non-transactional event groups. This is a\nslave-side counter for optimistic parallel replication. |\nMariaDB 10.3.7 | \n \nSlave_Transactional_Groups | This status variable counts the\noccurrence of transactional event groups. This is a\nslave-side counter for optimistic parallel replication. |\nMariaDB 10.3.7 | \n \nExamples\n-------- \nIf you issue this statement using the mysql client,\nyou can use a \\G statement terminator rather than a\nsemicolon to\nobtain a more readable vertical layout.\n \nSHOW SLAVE STATUS\\G\n*************************** 1. row\n***************************\n Slave_IO_State: Waiting for master to send event\n Master_Host: db01.example.com\n Master_User: replicant\n Master_Port: 3306\n Connect_Retry: 60\n Master_Log_File: mariadb-bin.000010\n Read_Master_Log_Pos: 548\n Relay_Log_File: relay-bin.000004\n Relay_Log_Pos: 837\n Relay_Master_Log_File: mariadb-bin.000010\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB: \n Replicate_Ignore_DB: \n Replicate_Do_Table: \n Replicate_Ignore_Table: \n Replicate_Wild_Do_Table: \n Replicate_Wild_Ignore_Table: \n Last_Errno: 0\n Last_Error: \n Skip_Counter: 0\n Exec_Master_Log_Pos: 548\n Relay_Log_Space: 1497\n Until_Condition: None\n Until_Log_File: \n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File: \n Master_SSL_CA_Path: \n Master_SSL_Cert: \n Master_SSL_Cipher: \n Master_SSL_Key: \n Seconds_Behind_Master: 0\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error: \n Last_SQL_Errno: 0\n Last_SQL_Error: \n Replicate_Ignore_Server_Ids: \n Master_Server_Id: 101\n Master_SSL_Crl: \n Master_SSL_Crlpath: \n Using_Gtid: No\n Gtid_IO_Pos: \n \nMariaDB [(none)]> SHOW ALL SLAVES STATUS\\G\n*************************** 1. row\n***************************\n Connection_name: \n Slave_SQL_State: Slave has read all relay log; waiting for\nthe slave I/O thread to update it\n Slave_IO_State: Waiting for master to send event\n Master_Host: db01.example.com\n Master_User: replicant\n Master_Port: 3306\n Connect_Retry: 60\n Master_Log_File: mariadb-bin.000010\n Read_Master_Log_Pos: 3608\n Relay_Log_File: relay-bin.000004\n Relay_Log_Pos: 3897\n Relay_Master_Log_File: mariadb-bin.000010\n Slave_IO_Running: Yes\n Slave_SQL_Running: Yes\n Replicate_Do_DB: \n Replicate_Ignore_DB: \n Replicate_Do_Table: \n Replicate_Ignore_Table: \n Replicate_Wild_Do_Table: \n Replicate_Wild_Ignore_Table: \n Last_Errno: 0\n Last_Error: \n Skip_Counter: 0\n Exec_Master_Log_Pos: 3608\n Relay_Log_Space: 4557\n Until_Condition: None\n Until_Log_File: \n Until_Log_Pos: 0\n Master_SSL_Allowed: No\n Master_SSL_CA_File: \n Master_SSL_CA_Path: \n Master_SSL_Cert: \n Master_SSL_Cipher: \n Master_SSL_Key: \n Seconds_Behind_Master: 0\nMaster_SSL_Verify_Server_Cert: No\n Last_IO_Errno: 0\n Last_IO_Error: \n Last_SQL_Errno: 0\n Last_SQL_Error: \n Replicate_Ignore_Server_Ids: \n Master_Server_Id: 101\n Master_SSL_Crl: \n Master_SSL_Crlpath: \n Using_Gtid: No\n Gtid_IO_Pos:\n Retried_transactions: 0\n Max_relay_log_size: 104857600\n Executed_log_entries: 40\n Slave_received_heartbeats: 11\n Slave_heartbeat_period: 1800.000\n Gtid_Slave_Pos: 0-101-2320\n \nYou can also access some of the variables directly from\nstatus variables:\n \nSET @@default_master_connection=\"test\" ;\nshow status like \"%slave%\"\n \nVariable_name Value\nCom_show_slave_hosts 0\nCom_show_slave_status 0\nCom_start_all_slaves 0\nCom_start_slave 0\nCom_stop_all_slaves 0\nCom_stop_slave 0\nRpl_semi_sync_slave_status OFF\nSlave_connections 0\nSlave_heartbeat_period 1800.000\nSlave_open_temp_tables 0\nSlave_received_heartbeats 0\nSlave_retried_transactions 0\nSlave_running OFF\nSlaves_connected 0\nSlaves_running 1\n \n\n\nURL: https://mariadb.com/kb/en/show-slave-status/','','https://mariadb.com/kb/en/show-slave-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (398,26,'SHOW STATUS','Syntax\n------ \nSHOW [GLOBAL | SESSION] STATUS\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW STATUS provides server status information. This\ninformation also can be obtained using the mysqladmin\nextended-status command, or by querying the Information\nSchema GLOBAL_STATUS and SESSION_STATUS tables.\nThe LIKE clause, if present, indicates which variable names\nto match. The WHERE clause can be given to select rows using\nmore general conditions.\n \nWith the GLOBAL modifier, SHOW STATUS\ndisplays the status values for all connections to MariaDB.\nWith\nSESSION, it displays the status values\nfor the current connection. If no modifier is present, the\ndefault is\n SESSION. LOCAL is a synonym for\n SESSION. If you see a lot of 0 values, the reason is\nprobably that you have used SHOW STATUS with a new\nconnection instead of SHOW GLOBAL STATUS.\n \nSome status variables have only a global value. For these,\nyou get the\nsame value for both GLOBAL and SESSION.\n \nSee Server Status Variables for a full list, scope and\ndescription of the variables that can be viewed with SHOW\nSTATUS.\n \nThe LIKE clause, if present on its own, indicates which\nvariable name to match.\n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nExamples\n-------- \nFull output from MariaDB 10.1.17:\n \nSHOW GLOBAL STATUS;\n \n+--------------------------------------------------------------+----------------------------------------+\n| Variable_name | Value |\n+--------------------------------------------------------------+----------------------------------------+\n| Aborted_clients | 0 |\n| Aborted_connects | 0 |\n| Access_denied_errors | 0 |\n| Acl_column_grants | 0 |\n| Acl_database_grants | 2 |\n| Acl_function_grants | 0 |\n| Acl_procedure_grants | 0 |\n| Acl_proxy_users | 2 |\n| Acl_role_grants | 0 |\n| Acl_roles | 0 |\n| Acl_table_grants | 0 |\n| Acl_users | 6 |\n| Aria_pagecache_blocks_not_flushed | 0 |\n| Aria_pagecache_blocks_unused | 15706 |\n| Aria_pagecache_blocks_used | 0 |\n| Aria_pagecache_read_requests | 0 |\n| Aria_pagecache_reads | 0 |\n| Aria_pagecache_write_requests | 0 |\n| Aria_pagecache_writes | 0 |\n| Aria_transaction_log_syncs | 0 |\n| Binlog_commits | 0 |\n| Binlog_group_commits | 0 |\n| Binlog_group_commit_trigger_count | 0 |\n| Binlog_group_commit_trigger_lock_wait | 0 |\n| Binlog_group_commit_trigger_timeout | 0 |\n| Binlog_snapshot_file | |\n| Binlog_snapshot_position | 0 |\n| Binlog_bytes_written | 0 |\n| Binlog_cache_disk_use | 0 |\n| Binlog_cache_use | 0 |\n| Binlog_stmt_cache_disk_use | 0 |\n| Binlog_stmt_cache_use | 0 |\n| Busy_time | 0.000000 |\n| Bytes_received | 432 |\n| Bytes_sent | 15183 |\n| Com_admin_commands | 1 |\n| Com_alter_db | 0 |\n| Com_alter_db_upgrade | 0 |\n| Com_alter_event | 0 |\n| Com_alter_function | 0 |\n| Com_alter_procedure | 0 |\n| Com_alter_server | 0 |\n| Com_alter_table | 0 |\n| Com_alter_tablespace | 0 |\n| Com_analyze | 0 |\n| Com_assign_to_keycache | 0 |\n| Com_begin | 0 |\n| Com_binlog | 0 |\n| Com_call_procedure | 0 |\n| Com_change_db | 0 |\n| Com_change_master | 0 |\n| Com_check | 0 |\n| Com_checksum | 0 |\n| Com_commit | 0 |\n| Com_compound_sql | 0 |\n| Com_create_db | 0 |\n| Com_create_event | 0 |\n| Com_create_function | 0 |\n| Com_create_index | 0 |\n| Com_create_procedure | 0 |\n| Com_create_role | 0 |\n| Com_create_server | 0 |\n| Com_create_table | 0 |\n| Com_create_temporary_table | 0 |\n| Com_create_trigger | 0 |\n| Com_create_udf | 0 |\n| Com_create_user | 0 |\n| Com_create_view | 0 |\n| Com_dealloc_sql | 0 |\n| Com_delete | 0 |\n| Com_delete_multi | 0 |\n| Com_do | 0 |\n| Com_drop_db | 0 |\n| Com_drop_event | 0 |\n| Com_drop_function | 0 |\n| Com_drop_index | 0 |\n| Com_drop_procedure | 0 |\n| Com_drop_role | 0 |\n| Com_drop_server | 0 |\n| Com_drop_table | 0 |\n| Com_drop_temporary_table | 0 |\n| Com_drop_trigger | 0 |\n| Com_drop_user | 0 |\n| Com_drop_view | 0 |\n| Com_empty_query | 0 |\n| Com_execute_sql | 0 |\n| Com_flush | 0 |\n| Com_get_diagnostics | 0 |\n| Com_grant | 0 |\n| Com_grant_role | 0 |\n| Com_ha_close | 0 |\n| Com_ha_open | 0 |\n| Com_ha_read | 0 |\n| Com_help | 0 |\n| Com_insert | 0 |\n| Com_insert_select | 0 |\n| Com_install_plugin | 0 |\n| Com_kill | 0 |\n| Com_load | 0 |\n| Com_lock_tables | 0 |\n| Com_optimize | 0 |\n| Com_preload_keys | 0 |\n| Com_prepare_sql | 0 |\n| Com_purge | 0 |\n| Com_purge_before_date | 0 |\n| Com_release_savepoint | 0 |\n| Com_rename_table | 0 |\n| Com_rename_user | 0 |\n| Com_repair | 0 |\n| Com_replace | 0 |\n| Com_replace_select | 0 |\n| Com_reset | 0 |\n| Com_resignal | 0 |\n| Com_revoke | 0 |\n| Com_revoke_all | 0 |\n| Com_revoke_role | 0 |\n| Com_rollback | 0 |\n| Com_rollback_to_savepoint | 0 |\n| Com_savepoint | 0 |\n| Com_select | 1 |\n| Com_set_option | 0 |\n| Com_show_authors | 0 |\n| Com_show_binlog_events | 0 |\n| Com_show_binlogs | 0 |\n| Com_show_charsets | 0 |\n| Com_show_collations | 0 |\n| Com_show_contributors | 0 |\n| Com_show_create_db | 0 |\n| Com_show_create_event | 0 |\n| Com_show_create_func | 0 |\n| Com_show_create_proc | 0 |\n| Com_show_create_table | 0 |\n| Com_show_create_trigger | 0 |\n| Com_show_databases | 0 |\n| Com_show_engine_logs | 0 |\n| Com_show_engine_mutex | 0 |\n| Com_show_engine_status | 0 |\n| Com_show_errors | 0 |\n| Com_show_events | 0 |\n| Com_show_explain | 0 |\n| Com_show_fields | 0 |\n| Com_show_function_status | 0 |\n| Com_show_generic | 0 |\n| Com_show_grants | 0 |\n| Com_show_keys | 0 |\n| Com_show_master_status | 0 |\n| Com_show_open_tables | 0 |\n| Com_show_plugins | 0 |\n| Com_show_privileges | 0 |\n| Com_show_procedure_status | 0 |\n| Com_show_processlist | 0 |\n| Com_show_profile | 0 |\n| Com_show_profiles | 0 |\n| Com_show_relaylog_events | 0 |\n| Com_show_slave_hosts | 0 |\n| Com_show_slave_status | 0 |\n| Com_show_status | 2 |\n| Com_show_storage_engines | 0 |\n| Com_show_table_status | 0 |\n| Com_show_tables | 0 |\n| Com_show_triggers | 0 |\n| Com_show_variables | 0 |\n| Com_show_warnings | 0 |\n| Com_shutdown | 0 |\n| Com_signal | 0 |\n| Com_start_all_slaves | 0 |\n| Com_start_slave | 0 |\n| Com_stmt_close | 0 |\n| Com_stmt_execute | 0 |\n| Com_stmt_fetch | 0 |\n| Com_stmt_prepare | 0 |\n| Com_stmt_reprepare | 0 |\n| Com_stmt_reset | 0 |\n| Com_stmt_send_long_data | 0 |\n| Com_stop_all_slaves | 0 |\n| Com_stop_slave | 0 |\n| Com_truncate | 0 |\n| Com_uninstall_plugin | 0 |\n| Com_unlock_tables | 0 |\n| Com_update | 0 |\n| Com_update_multi | 0 |\n| Com_xa_commit | 0 |\n| Com_xa_end | 0 |\n| Com_xa_prepare | 0 |\n| Com_xa_recover | 0 |\n| Com_xa_rollback | 0 |\n| Com_xa_start | 0 |\n| Compression | OFF |\n| Connection_errors_accept | 0 |\n| Connection_errors_internal | 0 |\n| Connection_errors_max_connections | 0 |\n| Connection_errors_peer_address | 0 |\n| Connection_errors_select | 0 |\n| Connection_errors_tcpwrap | 0 |\n| Connections | 4 |\n| Cpu_time | 0.000000 |\n| Created_tmp_disk_tables | 0 |\n| Created_tmp_files | 6 |\n| Created_tmp_tables | 2 |\n| Delayed_errors | 0 |\n| Delayed_insert_threads | 0 |\n| Delayed_writes | 0 |\n| Delete_scan | 0 |\n| Empty_queries | 0 |\n| Executed_events | 0 |\n| Executed_triggers | 0 |\n| Feature_delay_key_write | 0 |\n| Feature_dynamic_columns | 0 |\n| Feature_fulltext | 0 |\n| Feature_gis | 0 |\n| Feature_locale | 0 |\n| Feature_subquery | 0 |\n| Feature_timezone | 0 |\n| Feature_trigger | 0 |\n| Feature_xml | 0 |\n| Flush_commands | 1 |\n| Handler_commit | 1 |\n| Handler_delete | 0 |\n| Handler_discover | 0 |\n| Handler_external_lock | 0 |\n| Handler_icp_attempts | 0 |\n| Handler_icp_match | 0 |\n| Handler_mrr_init | 0 |\n| Handler_mrr_key_refills | 0 |\n| Handler_mrr_rowid_refills | 0 |\n| Handler_prepare | 0 |\n| Handler_read_first | 3 |\n| Handler_read_key | 0 |\n| Handler_read_last | 0 |\n| Handler_read_next | 0 |\n| Handler_read_prev | 0 |\n| Handler_read_retry | 0 |\n| Handler_read_rnd | 0 |\n| Handler_read_rnd_deleted | 0 |\n| Handler_read_rnd_next | 537 |\n| Handler_rollback | 0 |\n| Handler_savepoint | 0 |\n| Handler_savepoint_rollback | 0 |\n| Handler_tmp_update | 0 |\n| Handler_tmp_write | 516 |\n| Handler_update | 0 |\n| Handler_write | 0 |\n| Innodb_available_undo_logs | 128 |\n| Innodb_background_log_sync | 222 |\n| Innodb_buffer_pool_bytes_data | 2523136 |\n| Innodb_buffer_pool_bytes_dirty | 0 |\n| Innodb_buffer_pool_dump_status | Dumping buffer pool(s)\nnot yet started |\n| Innodb_buffer_pool_load_status | Loading buffer pool(s)\nnot yet started |\n| Innodb_buffer_pool_pages_data | 154 |\n| Innodb_buffer_pool_pages_dirty | 0 |\n| Innodb_buffer_pool_pages_flushed | 1 |\n| Innodb_buffer_pool_pages_free | 8037 |\n| Innodb_buffer_pool_pages_lru_flushed | 0 |\n| Innodb_buffer_pool_pages_made_not_young | 0 |\n| Innodb_buffer_pool_pages_made_young | 0 |\n| Innodb_buffer_pool_pages_misc | 0 |\n| Innodb_buffer_pool_pages_old | 0 |\n| Innodb_buffer_pool_pages_total | 8191 |\n| Innodb_buffer_pool_read_ahead | 0 |\n| Innodb_buffer_pool_read_ahead_evicted | 0 |\n| Innodb_buffer_pool_read_ahead_rnd | 0 |\n| Innodb_buffer_pool_read_requests | 558 |\n| Innodb_buffer_pool_reads | 155 |\n| Innodb_buffer_pool_wait_free | 0 |\n| Innodb_buffer_pool_write_requests | 1 |\n| Innodb_checkpoint_age | 0 |\n| Innodb_checkpoint_max_age | 80826164 |\n| Innodb_data_fsyncs | 5 |\n| Innodb_data_pending_fsyncs | 0 |\n| Innodb_data_pending_reads | 0 |\n| Innodb_data_pending_writes | 0 |\n| Innodb_data_read | 2609664 |\n| Innodb_data_reads | 172 |\n| Innodb_data_writes | 5 |\n| Innodb_data_written | 34304 |\n| Innodb_dblwr_pages_written | 1 |\n| Innodb_dblwr_writes | 1 |\n| Innodb_deadlocks | 0 |\n| Innodb_have_atomic_builtins | ON |\n| Innodb_history_list_length | 0 |\n| Innodb_ibuf_discarded_delete_marks | 0 |\n| Innodb_ibuf_discarded_deletes | 0 |\n| Innodb_ibuf_discarded_inserts | 0 |\n| Innodb_ibuf_free_list | 0 |\n| Innodb_ibuf_merged_delete_marks | 0 |\n| Innodb_ibuf_merged_deletes | 0 |\n| Innodb_ibuf_merged_inserts | 0 |\n| Innodb_ibuf_merges | 0 |\n| Innodb_ibuf_segment_size | 2 |\n| Innodb_ibuf_size | 1 |\n| Innodb_log_waits | 0 |\n| Innodb_log_write_requests | 0 |\n| Innodb_log_writes | 1 |\n| Innodb_lsn_current | 1616829 |\n| Innodb_lsn_flushed | 1616829 |\n| Innodb_lsn_last_checkpoint | 1616829 |\n| Innodb_master_thread_active_loops | 0 |\n| Innodb_master_thread_idle_loops | 222 |\n| Innodb_max_trx_id | 2308 |\n| Innodb_mem_adaptive_hash | 2217568 |\n| Innodb_mem_dictionary | 630703 |\n| Innodb_mem_total | 140771328 |\n| Innodb_mutex_os_waits | 1 |\n| Innodb_mutex_spin_rounds | 30 |\n| Innodb_mutex_spin_waits | 1 |\n| Innodb_oldest_view_low_limit_trx_id | 0 |\n| Innodb_os_log_fsyncs | 3 |\n| Innodb_os_log_pending_fsyncs | 0 |\n| Innodb_os_log_pending_writes | 0 |\n| Innodb_os_log_written | 512 |\n| Innodb_page_size | 16384 |\n| Innodb_pages_created | 0 |\n| Innodb_pages_read | 154 |\n| Innodb_pages_written | 1 |\n| Innodb_purge_trx_id | 0 |\n| Innodb_purge_undo_no | 0 |\n| Innodb_read_views_memory | 88 |\n| Innodb_row_lock_current_waits | 0 |\n| Innodb_row_lock_time | 0 |\n| Innodb_row_lock_time_avg | 0 |\n| Innodb_row_lock_time_max | 0 |\n| Innodb_row_lock_waits | 0 |\n| Innodb_rows_deleted | 0 |\n| Innodb_rows_inserted | 0 |\n| Innodb_rows_read | 0 |\n| Innodb_rows_updated | 0 |\n| Innodb_system_rows_deleted | 0 |\n| Innodb_system_rows_inserted | 0 |\n| Innodb_system_rows_read | 0 |\n| Innodb_system_rows_updated | 0 |\n| Innodb_s_lock_os_waits | 2 |\n| Innodb_s_lock_spin_rounds | 60 |\n| Innodb_s_lock_spin_waits | 2 |\n| Innodb_truncated_status_writes | 0 |\n| Innodb_x_lock_os_waits | 0 |\n| Innodb_x_lock_spin_rounds | 0 |\n| Innodb_x_lock_spin_waits | 0 |\n| Innodb_page_compression_saved | 0 |\n| Innodb_page_compression_trim_sect512 | 0 |\n| Innodb_page_compression_trim_sect1024 | 0 |\n| Innodb_page_compression_trim_sect2048 | 0 |\n| Innodb_page_compression_trim_sect4096 | 0 |\n| Innodb_page_compression_trim_sect8192 | 0 |\n| Innodb_page_compression_trim_sect16384 | 0 |\n| Innodb_page_compression_trim_sect32768 | 0 |\n| Innodb_num_index_pages_written | 0 |\n| Innodb_num_non_index_pages_written | 5 |\n| Innodb_num_pages_page_compressed | 0 |\n| Innodb_num_page_compressed_trim_op | 0 |\n| Innodb_num_page_compressed_trim_op_saved | 0 |\n| Innodb_num_pages_page_decompressed | 0 |\n| Innodb_num_pages_page_compression_error | 0 |\n| Innodb_num_pages_encrypted | 0 |\n| Innodb_num_pages_decrypted | 0 |\n| Innodb_have_lz4 | OFF |\n| Innodb_have_lzo | OFF |\n| Innodb_have_lzma | OFF |\n| Innodb_have_bzip2 | OFF |\n| Innodb_have_snappy | OFF |\n| Innodb_defragment_compression_failures | 0 |\n| Innodb_defragment_failures | 0 |\n| Innodb_defragment_count | 0 |\n| Innodb_onlineddl_rowlog_rows | 0 |\n| Innodb_onlineddl_rowlog_pct_used | 0 |\n| Innodb_onlineddl_pct_progress | 0 |\n| Innodb_secondary_index_triggered_cluster_reads | 0 |\n| Innodb_secondary_index_triggered_cluster_reads_avoided | 0\n|\n| Innodb_encryption_rotation_pages_read_from_cache | 0 |\n| Innodb_encryption_rotation_pages_read_from_disk | 0 |\n| Innodb_encryption_rotation_pages_modified | 0 |\n| Innodb_encryption_rotation_pages_flushed | 0 |\n| Innodb_encryption_rotation_estimated_iops | 0 |\n| Innodb_scrub_background_page_reorganizations | 0 |\n| Innodb_scrub_background_page_splits | 0 |\n| Innodb_scrub_background_page_split_failures_underflow | 0\n|\n|\nInnodb_scrub_background_page_split_failures_out_of_filespace\n| 0 |\n| Innodb_scrub_background_page_split_failures_missing_index\n| 0 |\n| Innodb_scrub_background_page_split_failures_unknown | 0 |\n| Key_blocks_not_flushed | 0 |\n| Key_blocks_unused | 107163 |\n| Key_blocks_used | 0 |\n| Key_blocks_warm | 0 |\n| Key_read_requests | 0 |\n| Key_reads | 0 |\n| Key_write_requests | 0 |\n| Key_writes | 0 |\n| Last_query_cost | 0.000000 |\n| Master_gtid_wait_count | 0 |\n| Master_gtid_wait_time | 0 |\n| Master_gtid_wait_timeouts | 0 |\n| Max_statement_time_exceeded | 0 |\n| Max_used_connections | 1 |\n| Memory_used | 273614696 |\n| Not_flushed_delayed_rows | 0 |\n| Open_files | 25 |\n| Open_streams | 0 |\n| Open_table_definitions | 18 |\n| Open_tables | 11 |\n| Opened_files | 77 |\n| Opened_plugin_libraries | 0 |\n| Opened_table_definitions | 18 |\n| Opened_tables | 18 |\n| Opened_views | 0 |\n| Performance_schema_accounts_lost | 0 |\n| Performance_schema_cond_classes_lost | 0 |\n| Performance_schema_cond_instances_lost | 0 |\n| Performance_schema_digest_lost | 0 |\n| Performance_schema_file_classes_lost | 0 |\n| Performance_schema_file_handles_lost | 0 |\n| Performance_schema_file_instances_lost | 0 |\n| Performance_schema_hosts_lost | 0 |\n| Performance_schema_locker_lost | 0 |\n| Performance_schema_mutex_classes_lost | 0 |\n| Performance_schema_mutex_instances_lost | 0 |\n| Performance_schema_rwlock_classes_lost | 0 |\n| Performance_schema_rwlock_instances_lost | 0 |\n| Performance_schema_session_connect_attrs_lost | 0 |\n| Performance_schema_socket_classes_lost | 0 |\n| Performance_schema_socket_instances_lost | 0 |\n| Performance_schema_stage_classes_lost | 0 |\n| Performance_schema_statement_classes_lost | 0 |\n| Performance_schema_table_handles_lost | 0 |\n| Performance_schema_table_instances_lost | 0 |\n| Performance_schema_thread_classes_lost | 0 |\n| Performance_schema_thread_instances_lost | 0 |\n| Performance_schema_users_lost | 0 |\n| Prepared_stmt_count | 0 |\n| Qcache_free_blocks | 1 |\n| Qcache_free_memory | 1031336 |\n| Qcache_hits | 0 |\n| Qcache_inserts | 0 |\n| Qcache_lowmem_prunes | 0 |\n| Qcache_not_cached | 0 |\n| Qcache_queries_in_cache | 0 |\n| Qcache_total_blocks | 1 |\n| Queries | 4 |\n| Questions | 4 |\n| Rows_read | 10 |\n| Rows_sent | 517 |\n| Rows_tmp_read | 516 |\n| Rpl_status | AUTH_MASTER |\n| Select_full_join | 0 |\n| Select_full_range_join | 0 |\n| Select_range | 0 |\n| Select_range_check | 0 |\n| Select_scan | 2 |\n| Slave_connections | 0 |\n| Slave_heartbeat_period | 0.000 |\n| Slave_open_temp_tables | 0 |\n| Slave_received_heartbeats | 0 |\n| Slave_retried_transactions | 0 |\n| Slave_running | OFF |\n| Slave_skipped_errors | 0 |\n| Slaves_connected | 0 |\n| Slaves_running | 0 |\n| Slow_launch_threads | 0 |\n| Slow_queries | 0 |\n| Sort_merge_passes | 0 |\n| Sort_priority_queue_sorts | 0 |\n| Sort_range | 0 |\n| Sort_rows | 0 |\n| Sort_scan | 0 |\n| Ssl_accept_renegotiates | 0 |\n| Ssl_accepts | 0 |\n| Ssl_callback_cache_hits | 0 |\n| Ssl_cipher | |\n| Ssl_cipher_list | |\n| Ssl_client_connects | 0 |\n| Ssl_connect_renegotiates | 0 |\n| Ssl_ctx_verify_depth | 0 |\n| Ssl_ctx_verify_mode | 0 |\n| Ssl_default_timeout | 0 |\n| Ssl_finished_accepts | 0 |\n| Ssl_finished_connects | 0 |\n| Ssl_server_not_after | |\n| Ssl_server_not_before | |\n| Ssl_session_cache_hits | 0 |\n| Ssl_session_cache_misses | 0 |\n| Ssl_session_cache_mode | NONE |\n| Ssl_session_cache_overflows | 0 |\n| Ssl_session_cache_size | 0 |\n| Ssl_session_cache_timeouts | 0 |\n| Ssl_sessions_reused | 0 |\n| Ssl_used_session_cache_entries | 0 |\n| Ssl_verify_depth | 0 |\n| Ssl_verify_mode | 0 |\n| Ssl_version | |\n| Subquery_cache_hit | 0 |\n| Subquery_cache_miss | 0 |\n| Syncs | 2 |\n| Table_locks_immediate | 21 |\n| Table_locks_waited | 0 |\n| Tc_log_max_pages_used | 0 |\n| Tc_log_page_size | 4096 |\n| Tc_log_page_waits | 0 |\n| Threadpool_idle_threads | 0 |\n| Threadpool_threads | 0 |\n| Threads_cached | 0 |\n| Threads_connected | 1 |\n| Threads_created | 2 |\n| Threads_running | 1 |\n| Update_scan | 0 |\n| Uptime | 223 |\n| Uptime_since_flush_status | 223 |\n| wsrep_cluster_conf_id | 18446744073709551615 |\n| wsrep_cluster_size | 0 |\n| wsrep_cluster_state_uuid | |\n| wsrep_cluster_status | Disconnected |\n| wsrep_connected | OFF |\n| wsrep_local_bf_aborts | 0 |\n| wsrep_local_index | 18446744073709551615 |\n| wsrep_provider_name | |\n| wsrep_provider_vendor | |\n| wsrep_provider_version | |\n| wsrep_ready | OFF |\n| wsrep_thread_count | 0 |\n+--------------------------------------------------------------+----------------------------------------+\n516 rows in set (0.00 sec)\n \nExample of filtered output:\n \nSHOW STATUS LIKE \'Key%\';\n \n+------------------------+--------+\n| Variable_name | Value |\n+------------------------+--------+\n| Key_blocks_not_flushed | 0 |\n| Key_blocks_unused | 107163 |\n| Key_blocks_used | 0 |\n| Key_blocks_warm | 0 |\n| Key_read_requests | 0 |\n| Key_reads | 0 |\n| Key_write_requests | 0 |\n| Key_writes | 0 |\n+------------------------+--------+\n8 rows in set (0.00 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-status/','','https://mariadb.com/kb/en/show-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (399,26,'SHOW TABLE STATUS','Syntax\n------ \nSHOW TABLE STATUS [{FROM | IN} db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \n SHOW TABLE STATUS works like \n SHOW TABLES, but provides more extensive information about\neach non-TEMPORARY table.\n \nThe LIKE clause, if present on its own, indicates which\ntable names to\nmatch. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nThe following information is returned:\n \nColumn | Description | \n \nName | Table name. | \n \nEngine | Table storage engine. | \n \nVersion | Version number from the table\'s .frm file. | \n \nRow_format | Row format (see InnoDB, Aria and MyISAM row\nformats). | \n \nRows | Number of rows in the table. Some engines, such as\nXtraDB and InnoDB may store an estimate. | \n \nAvg_row_length | Average row length in the table. | \n \nData_length | For InnoDB/XtraDB, the index size, in pages,\nmultiplied by the page size. For Aria and MyISAM, length of\nthe data file, in bytes. For MEMORY, the approximate\nallocated memory. | \n \nMax_data_length | Maximum length of the data file, ie the\ntotal number of bytes that could be stored in the table. Not\nused in XtraDB and InnoDB. | \n \nIndex_length | Length of the index file. | \n \nData_free | Bytes allocated but unused. For InnoDB tables in\na shared tablespace, the free space of the shared tablespace\nwith small safety margin. An estimate in the case of\npartitioned tables - see the PARTITIONS table. | \n \nAuto_increment | Next AUTO_INCREMENT value. | \n \nCreate_time | Time the table was created. | \n \nUpdate_time | Time the table was last updated. On Windows,\nthe timestamp is not updated on update, so MyISAM values\nwill be inaccurate. In InnoDB, if shared tablespaces are\nused, will be NULL, while buffering can also delay the\nupdate, so the value will differ from the actual time of the\nlast UPDATE, INSERT or DELETE. | \n \nCheck_time | Time the table was last checked. Not kept by\nall storage engines, in which case will be NULL. | \n \nCollation | Character set and collation. | \n \nChecksum | Live checksum value, if any. | \n \nCreate_options | Extra CREATE TABLE options. | \n \nComment | Table comment provided when MariaDB created the\ntable. | \n \nSimilar information can be found in the\ninformation_schema.TABLES table as well as by using\nmysqlshow:\n \nmysqlshow --status db_name\n \nExample\n \nshow table status\\G\n*************************** 1. row\n***************************\n Name: bus_routes\n Engine: InnoDB\n Version: 10\n Row_format: Dynamic\n Rows: 5\n Avg_row_length: 3276\n Data_length: 16384\nMax_data_length: 0\n Index_length: 0\n Data_free: 0\n Auto_increment: NULL\n Create_time: 2017-05-24 11:17:46\n Update_time: NULL\n Check_time: NULL\n Collation: latin1_swedish_ci\n Checksum: NULL\n Create_options: \n Comment:\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-table-status/','','https://mariadb.com/kb/en/show-table-status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (400,26,'SHOW TABLES','Syntax\n------ \nSHOW [FULL] TABLES [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW TABLES lists the non-TEMPORARY tables, sequences and\nviews in a given database. \n \nThe LIKE clause, if present on its own, indicates which\ntable names to match. The WHERE and LIKE clauses can be\ngiven to select rows using more general conditions, as\ndiscussed in Extended SHOW. For example, when searching for\ntables in the test database, the column name for use in the\nWHERE and LIKE clauses will be Tables_in_test\n \nThe FULL modifier is supported such that SHOW FULL TABLES\ndisplays a second output column. Values for the second\ncolumn. Table_type, are BASE TABLE for a table, VIEW for a\nview and SEQUENCE for a sequence.\n \nYou can also get this information using:\n \nmysqlshow db_name\n \nSee mysqlshow for more details.\n \nIf you have no privileges for a base table or view, it does\nnot show up in the output from SHOW TABLES or mysqlshow\ndb_name.\n \nThe information_schema.TABLES table, as well as the SHOW\nTABLE STATUS statement, provide extended information about\ntables.\n \nExamples\n-------- \nSHOW TABLES;\n+----------------------+\n| Tables_in_test |\n+----------------------+\n| animal_count |\n| animals |\n| are_the_mooses_loose |\n| aria_test2 |\n| t1 |\n| view1 |\n+----------------------+\n \nShowing the tables beginning with a only.\n \nSHOW TABLES WHERE Tables_in_test LIKE \'a%\';\n+----------------------+\n| Tables_in_test |\n+----------------------+\n| animal_count |\n| animals |\n| are_the_mooses_loose |\n| aria_test2 |\n+----------------------+\n \nShowing tables and table types:\n \nSHOW FULL TABLES;\n+----------------+------------+\n| Tables_in_test | Table_type |\n+----------------+------------+\n| s1 | SEQUENCE |\n| student | BASE TABLE |\n| v1 | VIEW |\n+----------------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/show-tables/','','https://mariadb.com/kb/en/show-tables/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (401,26,'SHOW TABLE_STATISTICS','MariaDB 5.2 introduced the User Statistics feature.\n \nSyntax\n------ \nSHOW TABLE_STATISTICS\n \nDescription\n----------- \nThe SHOW TABLE_STATISTICS statement was introduced in\nMariaDB 5.2 as part of the User Statistics feature. It was\nremoved as a separate statement in MariaDB 10.1.1, but\neffectively replaced by the generic SHOW\ninformation_schema_table statement. The\ninformation_schema.TABLE_STATISTICS table shows statistics\non table usage\n \nThe userstat system variable must be set to 1 to activate\nthis feature. See the User Statistics and\ninformation_schema.TABLE_STATISTICS articles for more\ninformation.\n \nExample\n \nFrom MariaDB 10.0\n \nSHOW TABLE_STATISTICS\\G\n*************************** 1. row\n***************************\n Table_schema: mysql\n Table_name: proxies_priv\n Rows_read: 2\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n*************************** 2. row\n***************************\n Table_schema: test\n Table_name: employees_example\n Rows_read: 7\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n*************************** 3. row\n***************************\n Table_schema: mysql\n Table_name: user\n Rows_read: 16\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n*************************** 4. row\n***************************\n Table_schema: mysql\n Table_name: db\n Rows_read: 2\n Rows_changed: 0\nRows_changed_x_#indexes: 0\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-table-statistics/','','https://mariadb.com/kb/en/show-table-statistics/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (402,26,'SHOW TRIGGERS','Syntax\n------ \nSHOW TRIGGERS [FROM db_name]\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \n SHOW TRIGGERS lists the triggers currently defined for\ntables in a database (the default database unless a FROM\nclause is given). This statement requires the\nTRIGGER privilege (prior to MySQL\n5.1.22, it required the SUPER privilege). \n \nThe LIKE clause, if present on its own, indicates which\ntable names to\nmatch and causes the statement to display triggers for those\ntables. The WHERE and LIKE clauses can be given to select\nrows using more general conditions, as discussed in Extended\nSHOW.\n \nSimilar information is stored in the\ninformation_schema.TRIGGERS table.\n \nIf there are multiple triggers for the same action, then the\ntriggers are shown in action order.\n \nExamples\n-------- \nFor the trigger defined at Trigger Overview:\n \nSHOW triggers Like \'animals\' \\G\n*************************** 1. row\n***************************\n Trigger: the_mooses_are_loose\n Event: INSERT\n Table: animals\n Statement: BEGIN\n IF NEW.name = \'Moose\' THEN\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+100;\n ELSE \n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n END IF;\nEND\n Timing: AFTER\n Created: 2016-09-29 13:53:34.35\n sql_mode: \n Definer: root@localhost\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nListing all triggers associated with a certain table:\n \nSHOW TRIGGERS FROM test WHERE `Table` = \'user\' \\G\n*************************** 1. row\n***************************\n Trigger: user_ai\n Event: INSERT\n Table: user\n Statement: BEGIN END\n Timing: AFTER\n Created: 2016-09-29 13:53:34.35\n sql_mode: \n Definer: root@%\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\n \nSHOW triggers WHERE Event Like \'Insert\' \\G\n*************************** 1. row\n***************************\n Trigger: the_mooses_are_loose\n Event: INSERT\n Table: animals\n Statement: BEGIN\n IF NEW.name = \'Moose\' THEN\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+100;\n ELSE \n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n END IF;\nEND\n Timing: AFTER\n Created: 2016-09-29 13:53:34.35\n sql_mode: \n Definer: root@localhost\ncharacter_set_client: utf8\ncollation_connection: utf8_general_ci\n Database Collation: latin1_swedish_ci\ncharacter_set_client is the session value of the\ncharacter_set_client system variable when the trigger was\ncreated. \ncollation_connection is the session value of the\ncollation_connection system variable when the trigger was\n created. \nDatabase Collation is the collation of the database \n with which the trigger is associated.\n \nThese columns were added in MariaDB/MySQL 5.1.21.\n \nOld triggers created before MySQL 5.7 and MariaDB 10.2.3 has\nNULL in the Created column.\n \n\n\nURL: https://mariadb.com/kb/en/show-triggers/','','https://mariadb.com/kb/en/show-triggers/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (403,26,'SHOW USER_STATISTICS','MariaDB 5.2 introduced the User Statistics feature.\n \nSyntax\n------ \nSHOW USER_STATISTICS\n \nDescription\n----------- \nThe SHOW USER_STATISTICS statement was introduced in MariaDB\n5.2 as part of the User Statistics feature. It was removed\nas a separate statement in MariaDB 10.1.1, but effectively\nreplaced by the generic SHOW information_schema_table\nstatement. The information_schema.USER_STATISTICS table\nholds statistics about user activity. You can use this table\nto find out such things as which user is causing the most\nload and which users are being abusive. You can also use\nthis table to measure how close to capacity the server may\nbe.\n \nThe userstat system variable must be set to 1 to activate\nthis feature. See the User Statistics and\ninformation_schema.USER_STATISTICS table for more\ninformation.\n \nExample\n \nFrom MariaDB 10.0:\n \nSHOW USER_STATISTICS\\G\n*************************** 1. row\n***************************\n User: root\n Total_connections: 1\nConcurrent_connections: 0\n Connected_time: 3297\n Busy_time: 0.14113400000000006\n Cpu_time: 0.017637000000000003\n Bytes_received: 969\n Bytes_sent: 22355\n Binlog_bytes_written: 0\n Rows_read: 10\n Rows_sent: 67\n Rows_deleted: 0\n Rows_inserted: 0\n Rows_updated: 0\n Select_commands: 7\n Update_commands: 0\n Other_commands: 0\n Commit_transactions: 1\n Rollback_transactions: 0\n Denied_connections: 0\n Lost_connections: 0\n Access_denied: 0\n Empty_queries: 7\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-user-statistics/','','https://mariadb.com/kb/en/show-user-statistics/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (404,26,'SHOW VARIABLES','Syntax\n------ \nSHOW [GLOBAL | SESSION] VARIABLES\n [LIKE \'pattern\' | WHERE expr]\n \nDescription\n----------- \nSHOW VARIABLES shows the values of MariaDB system variables.\nThis\ninformation also can be obtained using the mysqladmin\nvariables\ncommand. The LIKE clause, if present, indicates which\nvariable names\nto match. The WHERE clause can be given to select rows using\nmore\ngeneral conditions.\n \nWith the GLOBAL modifier, SHOW VARIABLES displays the values\nthat are\nused for new connections to MariaDB. With SESSION, it\ndisplays the\nvalues that are in effect for the current connection. If no\nmodifier\nis present, the default is SESSION. LOCAL is a synonym for\nSESSION.\nWith a LIKE clause, the statement displays only rows for\nthose\nvariables with names that match the pattern. To obtain the\nrow for a\nspecific variable, use a LIKE clause as shown:\n \nSHOW VARIABLES LIKE \'maria_group_commit\';\n \nSHOW SESSION VARIABLES LIKE \'maria_group_commit\';\n \nTo get a list of variables whose name match a pattern, use\nthe \"%\"\nwildcard character in a LIKE clause:\n \nSHOW VARIABLES LIKE \'%maria%\';\n \nSHOW GLOBAL VARIABLES LIKE \'%maria%\';\n \nWildcard characters can be used in any position within the\npattern to\nbe matched. Strictly speaking, because \"_\" is a wildcard\nthat matches\nany single character, you should escape it as \"\\_\" to\nmatch it\nliterally. In practice, this is rarely necessary.\n \nThe WHERE and LIKE clauses can be given to select rows using\nmore general conditions, as discussed in Extended SHOW.\n \nSee SET for information on setting server system variables.\n \nSee Server System Variables for a list of all the variables\nthat can be set.\n \nYou can also see the server variables by querying the\nInformation Schema GLOBAL_VARIABLES and SESSION_VARIABLES\ntables.\n \nExamples\n-------- \nSHOW VARIABLES LIKE \'aria%\';\n \n+------------------------------------------+---------------------+\n| Variable_name | Value |\n+------------------------------------------+---------------------+\n| aria_block_size | 8192 |\n| aria_checkpoint_interval | 30 |\n| aria_checkpoint_log_activity | 1048576 |\n| aria_force_start_after_recovery_failures | 0 |\n| aria_group_commit | none |\n| aria_group_commit_interval | 0 |\n| aria_log_file_size | 1073741824 |\n| aria_log_purge_type | immediate |\n| aria_max_sort_file_size | 9223372036853727232 |\n| aria_page_checksum | ON |\n| aria_pagecache_age_threshold | 300 |\n| aria_pagecache_buffer_size | 134217728 |\n| aria_pagecache_division_limit | 100 |\n| aria_recover | NORMAL |\n| aria_repair_threads | 1 |\n| aria_sort_buffer_size | 134217728 |\n| aria_stats_method | nulls_unequal |\n| aria_sync_log_dir | NEWFILE |\n| aria_used_for_temp_tables | ON |\n+------------------------------------------+---------------------+\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE\n VARIABLE_NAME LIKE \'max_error_count\' OR\n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 64 | 64 |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSET GLOBAL max_error_count=128;\n \nSELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM\n INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE\n VARIABLE_NAME LIKE \'max_error_count\' OR\n VARIABLE_NAME LIKE \'innodb_sync_spin_loops\';\n \n+---------------------------+---------------+--------------+\n| VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |\n+---------------------------+---------------+--------------+\n| MAX_ERROR_COUNT | 64 | 128 |\n| INNODB_SYNC_SPIN_LOOPS | NULL | 30 |\n+---------------------------+---------------+--------------+\n \nSET GLOBAL max_error_count=128;\n \nSHOW VARIABLES LIKE \'max_error_count\';\n \n+-----------------+-------+\n| Variable_name | Value |\n+-----------------+-------+\n| max_error_count | 64 |\n+-----------------+-------+\n \nSHOW GLOBAL VARIABLES LIKE \'max_error_count\';\n \n+-----------------+-------+\n| Variable_name | Value |\n+-----------------+-------+\n| max_error_count | 128 |\n+-----------------+-------+\n \nBecause the following variable only has a global scope, the\nglobal value is returned even when specifying SESSION (in\nthis case by default):\n \nSHOW VARIABLES LIKE \'innodb_sync_spin_loops\';\n \n+------------------------+-------+\n| Variable_name | Value |\n+------------------------+-------+\n| innodb_sync_spin_loops | 30 |\n+------------------------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-variables/','','https://mariadb.com/kb/en/show-variables/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (405,26,'SHOW WARNINGS','Syntax\n------ \nSHOW WARNINGS [LIMIT [offset,] row_count]\nSHOW ERRORS [LIMIT row_count OFFSET offset]\nSHOW COUNT(*) WARNINGS\n \nDescription\n----------- \n SHOW WARNINGS shows the error, warning, and note messages\nthat resulted from the last statement that generated\nmessages in the\ncurrent session. It shows nothing if the last statement used\na table\nand generated no messages. (That is, a statement that uses a\ntable but\ngenerates no messages clears the message list.) Statements\nthat do not\nuse tables and do not generate messages have no effect on\nthe message\nlist.\n \nA note is different to a warning in that it only appears if\nthe sql_notes variable is set to 1 (the default), and is not\nconverted to an error if strict mode is enabled.\n \nA related statement, SHOW ERRORS, shows only the errors.\n \nThe SHOW COUNT(*) WARNINGS statement displays the total\nnumber of errors, warnings, and notes. You can also retrieve\nthis number from\nthe warning_count variable:\n \nSHOW COUNT(*) WARNINGS;\nSELECT @@warning_count;\n \nThe value of warning_count might be greater than the number\nof messages displayed by SHOW WARNINGS if the\nmax_error_count system variable is set so low that not all\nmessages are stored.\n \nThe LIMIT clause has the same syntax as for the\n SELECT statement.\n \nSHOW WARNINGS can be used after EXPLAIN EXTENDED to see how\na query is internally rewritten by MariaDB.\n \nIf the sql_notes server variable is set to 1, Notes are\nincluded in the output of SHOW WARNINGS; if it is set to 0,\nthis statement will not show (or count) Notes.\n \nThe results of SHOW WARNINGS and SHOW COUNT(*) WARNINGS are\ndirectly sent to the client. If you need to access those\ninformation in a stored program, you can use the GET\nDIAGNOSTICS statement instead.\n \nFor a list of MariaDB error codes, see MariaDB Error Codes.\n \nThe mysql client also has a number of options related to\nwarnings. The \\W command will show warnings after every\nstatement, while \\w will disable this. Starting the client\nwith the --show-warnings option will show warnings after\nevery statement.\n \nMariaDB 10.3.1 implements a stored routine error stack\ntrace. SHOW WARNINGS can also be used to show more\ninformation. See the example below.\n \nExamples\n-------- \nSELECT 1/0;\n+------+\n| 1/0 |\n+------+\n| NULL |\n+------+\n \nSHOW COUNT(*) WARNINGS;\n+-------------------------+\n| @@session.warning_count |\n+-------------------------+\n| 1 |\n+-------------------------+\n \nSHOW WARNINGS;\n+---------+------+---------------+\n| Level | Code | Message |\n+---------+------+---------------+\n| Warning | 1365 | Division by 0 |\n+---------+------+---------------+\n \nStack Trace\n \nFrom MariaDB 10.3.1, displaying a stack trace:\n \nDELIMITER $$\nCREATE OR REPLACE PROCEDURE p1()\n BEGIN\n DECLARE c CURSOR FOR SELECT * FROM not_existing;\n OPEN c;\n CLOSE c;\n END;\n$$\nCREATE OR REPLACE PROCEDURE p2()\n BEGIN\n CALL p1;\n END;\n$$\nDELIMITER ;\nCALL p2;\nERROR 1146 (42S02): Table \'test.not_existing\' doesn\'t\nexist\n \nSHOW WARNINGS;\n+-------+------+-----------------------------------------+\n| Level | Code | Message |\n+-------+------+-----------------------------------------+\n| Error | 1146 | Table \'test.not_existing\' doesn\'t exist\n|\n| Note | 4091 | At line 6 in test.p1 |\n| Note | 4091 | At line 4 in test.p2 |\n+-------+------+-----------------------------------------+\n \nSHOW WARNINGS displays a stack trace, showing where the\nerror actually happened:\nLine 4 in test.p1 is the OPEN command which actually raised\nthe error\nLine 3 in test.p2 is the CALL statement, calling p1 from p2.\n \n\n\nURL: https://mariadb.com/kb/en/show-warnings/','','https://mariadb.com/kb/en/show-warnings/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (406,26,'SHOW WSREP_MEMBERSHIP','MariaDB 10.1.2\n \nSHOW WSREP_MEMBERSHIP was introduced with the WSREP_INFO\nplugin in MariaDB 10.1.2.\n \nSyntax\n------ \nSHOW WSREP_MEMBERSHIP\n \nDescription\n----------- \nThe SHOW WSREP_MEMBERSHIP statement returns Galera node\ncluster membership information. It returns the same\ninformation as found in the\ninformation_schema.WSREP_MEMBERSHIP table. Only users with\nthe SUPER privilege can access this information.\n \nExamples\n-------- \nSHOW WSREP_MEMBERSHIP;\n+-------+--------------------------------------+----------+-----------------+\n| Index | Uuid | Name | Address |\n+-------+--------------------------------------+----------+-----------------+\n| 0 | 19058073-8940-11e4-8570-16af7bf8fced | my_node1 |\n10.0.2.15:16001 |\n| 1 | 19f2b0e0-8942-11e4-9cb8-b39e8ee0b5dd | my_node3 |\n10.0.2.15:16003 |\n| 2 | d85e62db-8941-11e4-b1ef-4bc9980e476d | my_node2 |\n10.0.2.15:16002 |\n+-------+--------------------------------------+----------+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-wsrep_membership/','','https://mariadb.com/kb/en/show-wsrep_membership/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (407,26,'SHOW WSREP_STATUS','MariaDB 10.1.2\n \nSHOW WSREP_STATUS was introduced with the WSREP_INFO plugin\nin MariaDB 10.1.2.\n \nSyntax\n------ \nSHOW WSREP_STATUS\n \nDescription\n----------- \nThe SHOW WSREP_STATUS statement returns Galera node and\ncluster status information. It returns the same information\nas found in the information_schema.WSREP_STATUS table. Only\nusers with the SUPER privilege can access this information.\n \nExamples\n-------- \nSHOW WSREP_STATUS;\n+------------+-------------+----------------+--------------+\n| Node_Index | Node_Status | Cluster_Status | Cluster_Size |\n+------------+-------------+----------------+--------------+\n| 0 | Synced | Primary | 3 |\n+------------+-------------+----------------+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/show-wsrep_status/','','https://mariadb.com/kb/en/show-wsrep_status/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (408,27,'CALL','Syntax\n------ \nCALL sp_name([parameter[,...]])\nCALL sp_name[()]\n \nDescription\n----------- \nThe CALL statement invokes a stored procedure that was\ndefined previously with CREATE PROCEDURE. \n \nStored procedure names can be specified as\ndatabase_name.procedure_name. Procedure names and database\nnames can be quoted with backticks (). This is necessary if\nthey are reserved words, or contain special characters. See\nidentifier qualifiers for details.\n \nBefore MySQL 5.1.13, stored procedures that take no\narguments required parentheses. In current releases of\nMariaDB, CALL p() and CALL p are equivalent.\n \nIf parentheses are used, any number of spaces, tab\ncharacters and new line characters is allowed between the\nprocedure\'s name and the open parenthesis.\n \nCALL can pass back values to its caller using parameters\nthat are declared as OUT or INOUT\nparameters. If no value is assigned to an OUT parameter,\nNULL is assigned (and its former value is lost). To pass\nsuch values from another stored program you can use\nuser-defined variables, local variables or routine\'s\nparameters; in other contexts, you can only use user-defined\nvariables. \n \nCALL can also be executed as a prepared statement.\nPlaceholders can be used for IN parameters in all versions\nof MariaDB; for OUT and INOUT parameters, placeholders can\nbe used since MariaDB 5.5.\n \nWhen the procedure returns, a client program can also obtain\nthe\nnumber of rows affected for the final statement executed\nwithin the routine: At\nthe SQL level, call the ROW_COUNT() function; from the C\nAPI, call the mysql_affected_rows() function.\n \nIf the CLIENT_MULTI_RESULTS API flag is set, CALL can return\nany number of resultsets and the called stored procedure can\nexecute prepared statements. If it is not set, at most one\nresultset can be returned and prepared statements cannot be\nused within procedures.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/call/','','https://mariadb.com/kb/en/call/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (409,27,'Concurrent Inserts','The MyISAM storage engine supports concurrent inserts. This\nfeature allows SELECT statements to be executed during\nINSERT operations, reducing contention.\n \nWhether concurrent inserts can be used or not depends on the\nvalue of the concurrent_insert server system variable:\nNEVER (0) disables concurrent inserts.\nAUTO (1) allows concurrent inserts only when the target\ntable has no free blocks (no data in the middle of the table\nhas been deleted after the last OPTIMIZE TABLE). This is the\ndefault.\nALWAYS (2) always enables concurrent inserts.\n \nIf the binary log is used, CREATE TABLE ... SELECT and\nINSERT ... SELECT statements cannot use concurrent inserts.\nThese statements acquire a read lock on the table, so\nconcurrent inserts will need to wait. This way the log can\nbe safely used to restore data.\n \nConcurrent inserts is not used by slaves with the row based\nreplication (see binary log formats).\n \nIf an INSERT statement contain the HIGH_PRIORITY clause,\nconcurrent inserts cannot be used. INSERT ... DELAYED is\nusually unneeded if concurrent inserts are enabled.\n \nLOAD DATA INFILE uses concurrent inserts if the CONCURRENT\nkeyword is specified and concurrent_insert is not NEVER.\nThis makes the statement slower (even if no other sessions\naccess the table) but reduces contention.\n \nLOCK TABLES allows non-conflicting concurrent inserts if a\nREAD LOCAL lock is used. Concurrent inserts are not allowed\nif the LOCAL keyword is omitted.\n \nNotes\n \nThe decision to enable concurrent insert for a table is done\nwhen the table is opened. If you change the value of\nconcurrent_insert it will only affect new opened tables. If\nyou want it to work for also for tables in use or cached,\nyou should do FLUSH TABLES after setting the variable.\n \n\n\nURL: https://mariadb.com/kb/en/concurrent-inserts/','','https://mariadb.com/kb/en/concurrent-inserts/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (410,27,'DELETE','Syntax\n------ \nSingle-table syntax:\n \nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] \n FROM tbl_name [PARTITION (partition_list)]\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n [RETURNING select_expr \n [, select_expr ...]]\n \nMultiple-table syntax:\n \nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n tbl_name[.*] [, tbl_name[.*]] ...\n FROM table_references\n [WHERE where_condition]\n \nOr:\n \nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n FROM tbl_name[.*] [, tbl_name[.*]] ...\n USING table_references\n [WHERE where_condition]\n \nTrimming history:\n \nDELETE HISTORY\n FROM tbl_name [PARTITION (partition_list)]\n [BEFORE SYSTEM_TIME [TIMESTAMP|TRANSACTION] expression]\n \nDescription\n----------- \nOption | Description | \n \nLOW_PRIORITY | Wait until all SELECT\'s are done before\nstarting the statement. Used with storage engines that uses\ntable locking (MyISAM, Aria etc). See HIGH_PRIORITY and\nLOW_PRIORITY clauses for details. | \n \nQUICK | Signal the storage engine that it should expect that\na lot of rows are deleted. The storage engine engine can do\nthings to speed up the DELETE like ignoring merging of data\nblocks until all rows are deleted from the block (instead of\nwhen a block is half full). This speeds up things at the\nexpanse of lost space in data blocks. At least MyISAM and\nAria support this feature. | \n \nIGNORE | Don\'t stop the query even if a not-critical error\noccurs (like data overflow). See How IGNORE works for a full\ndescription. | \n \nFor the single-table syntax, the DELETE statement deletes\nrows\nfrom tbl_name and returns a count of the number of deleted\nrows. This count can\nbe obtained by calling the ROW_COUNT() function. The\nWHERE clause, if given, specifies the conditions that\nidentify\nwhich rows to delete. With no WHERE clause, all rows are\ndeleted. If the ORDER BY clause is specified, the rows are\ndeleted in the order that is specified. The LIMIT clause\nplaces a limit on the number of rows that can be deleted.\n \nFor the multiple-table syntax, DELETE deletes from each\ntbl_name the rows that satisfy the conditions. In this case,\nORDER BY and LIMIT> cannot be used. A DELETE can also\nreference tables which are located in different databases;\nsee Identifier Qualifiers for the syntax.\n \nwhere_condition is an expression that evaluates to true for\neach row to be deleted. It is specified as described in\nSELECT.\n \nCurrently, you cannot delete from a table and select from\nthe same\ntable in a subquery.\n \nYou need the DELETE privilege on a table to delete rows from\nit. You need only the SELECT privilege for any columns that\nare only read, such as those named in the WHERE clause. See\nGRANT.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nAs stated, a DELETE statement with no WHERE\nclause deletes all rows. A faster way to do this, when you\ndo not need to know\nthe number of deleted rows, is to use TRUNCATE TABLE.\nHowever,\nwithin a transaction or if you have a lock on the table, \nTRUNCATE TABLE cannot be used whereas DELETE\ncan. See TRUNCATE TABLE, and\nLOCK.\n \nFrom MariaDB 10.0.5, it is possible to return a resultset of\nthe deleted rows for a single table to the client by using\nthe syntax DELETE ... RETURNING select_expr [, select_expr2\n...]]\n \nAny of SQL expression that can be calculated from a single\nrow fields is allowed. Subqueries are allowed. The AS\nkeyword is allowed, so it is possible to use aliases.\n \nThe use of aggregate functions is not allowed. RETURNING\ncannot be used in multi-table DELETEs.\n \nSame Source and Target Table\n \nUntil MariaDB 10.3.1, deleting from a table with the same\nsource and target was not possible. From MariaDB 10.3.1,\nthis is now possible. For example:\n \nDELETE FROM t1 WHERE c1 IN (SELECT b.c1 FROM t1 b WHERE\nb.c2=0);\n \nOne can use DELETE HISTORY to delete historical information\nfrom System-versioned tables.\n \nExamples\n-------- \nHow to use the ORDER BY and LIMIT clauses:\n \nDELETE FROM page_hit ORDER BY timestamp LIMIT 1000000;\n \nHow to use the RETURNING clause:\n \nDELETE FROM t RETURNING f1;\n \n+------+\n| f1 |\n+------+\n| 5 |\n| 50 |\n| 500 |\n+------+ \n \nThe following statement joins two tables: one is only used\nto satisfy a WHERE condition, but no row is deleted from it;\nrows from the other table are deleted, instead.\n \nDELETE post FROM blog INNER JOIN post WHERE blog.id =\npost.blog_id;\n \nDeleting from the Same Source and Target\n \nCREATE TABLE t1 (c1 INT, c2 INT);\nDELETE FROM t1 WHERE c1 IN (SELECT b.c1 FROM t1 b WHERE\nb.c2=0);\n \nUntil MariaDB 10.3.1, this returned:\n \nERROR 1093 (HY000): Table \'t1\' is specified twice, both as\na target for \'DELETE\' \n and as a separate source for\n \nFrom MariaDB 10.3.1:\n \nQuery OK, 0 rows affected (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/delete/','','https://mariadb.com/kb/en/delete/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (411,27,'DO','Syntax\n------ \nDO expr [, expr] ...\n \nDescription\n----------- \n DO executes the expressions but does not return any\nresults. In most respects, DO is shorthand for\n SELECT expr, ..., but has the advantage that it is slightly\nfaster when you do not care about the result.\n \n DO is useful primarily with functions that have side\n effects, such as RELEASE_LOCK().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/do/','','https://mariadb.com/kb/en/do/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (412,27,'DUAL','Description\n----------- \nYou are allowed to specify DUAL as a dummy table name in\nsituations where no tables are referenced, such as the\nfollowing SELECT statement:\n \nSELECT 1 + 1 FROM DUAL;\n \n+-------+\n| 1 + 1 |\n+-------+\n| 2 |\n+-------+\n \n DUAL is purely for the convenience of people who require\n that all SELECT statements should have\n FROM and possibly other clauses. MariaDB ignores the\n clauses. MariaDB does not require FROM DUAL if no tables\n are referenced.\n \nFROM DUAL could be used when you only SELECT computed\nvalues, but require a WHERE clause, perhaps to test that a\nscript correctly handles empty resultsets:\n \nSELECT 1 FROM DUAL WHERE FALSE;\n \nEmpty set (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/dual/','','https://mariadb.com/kb/en/dual/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (413,27,'EXCEPT','EXCEPT was introduced in MariaDB 10.3.0.\n \nThe result of EXCEPT is all records of the left SELECT\nresult set except records which are in right SELECT result\nset, i.e. it is subtraction of two result sets.\n \nSyntax\n------ \nSELECT ...\n(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...\n[(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...]\n[ORDER BY [column [, column ...]]]\n[LIMIT {[offset,] row_count | row_count OFFSET offset}]\n \nPlease note:\nALL is not supported by EXCEPT (and it is difficult to make\nsense of ALL with EXCEPT).\nBrackets for explicit operation precedence are not\nsupported; use a subquery in the FROM clause as a\nworkaround).\n \nDescription\n----------- \nMariaDB has supported EXCEPT and INTERSECT in addition to\nUNION since MariaDB 10.3.\n \nAll behavior for naming columns, ORDER BY and LIMIT is the\nsame as for UNION.\n \nEXCEPT implicitly supposes a DISTINCT operation.\n \nThe result of EXCEPT is all records of the left SELECT\nresult except records which are in right SELECT result set,\ni.e. it is subtraction of two result sets.\n \nEXCEPT and UNION have the same operation precedence.\n \n\nParentheses\n \nFrom MariaDB 10.4.0, parentheses can be used to specify\nprecedence. Before this, a syntax error would be returned.\n \nExamples\n-------- \nShow customers which are not employees:\n \n(SELECT e_name AS name, email FROM customers)\nEXCEPT\n(SELECT c_name AS name, email FROM employees);\n \nDifference between UNION, EXCEPT and INTERSECT:\n \nCREATE TABLE seqs (i INT);\nINSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n| 6 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 3 |\n+------+\n \nParentheses for specifying precedence, from MariaDB 10.4.0\n \nCREATE OR REPLACE TABLE t1 (a INT);\nCREATE OR REPLACE TABLE t2 (b INT);\nCREATE OR REPLACE TABLE t3 (c INT);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\nINSERT INTO t2 VALUES (5),(6);\nINSERT INTO t3 VALUES (1),(6);\n \n((SELECT a FROM t1) UNION (SELECT b FROM t2)) EXCEPT (SELECT\nc FROM t3);\n+------+\n| a |\n+------+\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n+------+\n \n(SELECT a FROM t1) UNION ((SELECT b FROM t2) EXCEPT (SELECT\nc FROM t3));\n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/except/','','https://mariadb.com/kb/en/except/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (414,27,'FOR UPDATE','The FOR UPDATE clause of SELECT applies only when autocommit\nis set to 0 or the SELECT is enclosed in a transaction. A\nlock is acquired on the rows, and other transactions are\nprevented from writing the rows, acquire locks, and from\nreading them (unless their isolation level is READ\nUNCOMMITTED).\n \nIf autocommit is set to 1, the LOCK IN SHARE MODE and FOR\nUPDATE clauses have no effect.\n \nIf the isolation level is set to SERIALIZABLE, all plain\nSELECT statements are converted to SELECT ... LOCK IN SHARE\nMODE.\n \nExample\n \nSELECT * FROM trans WHERE period=2001 FOR UPDATE;\n \n\n\nURL: https://mariadb.com/kb/en/for-update/','','https://mariadb.com/kb/en/for-update/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (415,27,'GROUP BY','Use the GROUP BY clause in a SELECT statement to group rows\ntogether that have the same value in one or more column, or\nthe same computed value using expressions with any\nfunctions and operators except\ngrouping functions. When you\nuse a GROUP BY clause, you will get a single result row for\neach group of rows\nthat have the same value for the expression given in GROUP\nBY.\n \nWhen grouping rows, grouping values are compared as if by\nthe = operator.\nFor string values, the = operator ignores trailing\nwhitespace and may normalize\ncharacters and ignore case, depending on the collation in\nuse.\n \nYou can use any of the grouping functions in your select\nexpression. Their values will\nbe calculated based on all the rows that have been grouped\ntogether for each result\nrow. If you select a non-grouped column or a value computed\nfrom a non-grouped\ncolumn, it is undefined which row the returned value is\ntaken from. This is not permitted if the ONLY_FULL_GROUP_BY\nSQL_MODE is used.\n \nYou can use multiple expressions in the GROUP BY clause,\nseparated by commas.\nRows are grouped together if they match on each of the\nexpressions.\n \nYou can also use a single integer as the grouping\nexpression. If you use an integer n,\nthe results will be grouped by the nth column in the select\nexpression.\n \nThe WHERE clause is applied before the GROUP BY clause. It\nfilters non-aggregated\nrows before the rows are grouped together. To filter grouped\nrows based on aggregate values,\nuse the HAVING clause. The HAVING clause takes any\nexpression and evaluates it as\na boolean, just like the WHERE clause. You can use grouping\nfunctions in the HAVING\nclause. As with the select expression, if you reference\nnon-grouped columns in the HAVING\nclause, the behavior is undefined.\n \nBy default, if a GROUP BY clause is present, the rows in the\noutput will be sorted by the expressions used in the GROUP\nBY. You can also specify ASC or DESC (ascending, descending)\nafter those expressions, like in ORDER BY. The default is\nASC.\n \nIf you want the rows to be sorted by another field, you can\nadd an explicit ORDER BY. If you don\'t want the result to\nbe ordered, you can add ORDER BY NULL.\n \nWITH ROLLUP\n \nThe WITH ROLLUP modifer adds extra rows to the resultset\nthat represent super-aggregate summaries. For a full\ndescription with examples, see SELECT WITH ROLLUP.\n \nGROUP BY Examples\n \nConsider the following table that records how many times\neach user has played and won a game:\n \nCREATE TABLE plays (name VARCHAR(16), plays INT, wins INT);\nINSERT INTO plays VALUES \n (\"John\", 20, 5), \n (\"Robert\", 22, 8), \n (\"Wanda\", 32, 8), \n (\"Susan\", 17, 3);\n \nGet a list of win counts along with a count:\n \nSELECT wins, COUNT(*) FROM plays GROUP BY wins;\n \n+------+----------+\n| wins | COUNT(*) |\n+------+----------+\n| 3 | 1 |\n| 5 | 1 |\n| 8 | 2 |\n+------+----------+\n3 rows in set (0.00 sec)\n \nThe GROUP BY expression can be a computed value, and can\nrefer back to an identifer\nspecified with AS. Get a list of win averages along with a\ncount:\n \nSELECT (wins / plays) AS winavg, COUNT(*) FROM plays GROUP\nBY winavg;\n \n+--------+----------+\n| winavg | COUNT(*) |\n+--------+----------+\n| 0.1765 | 1 |\n| 0.2500 | 2 |\n| 0.3636 | 1 |\n+--------+----------+\n3 rows in set (0.00 sec)\n \nYou can use any grouping function\nin the select expression. For each win average as above, get\na list of the average play\ncount taken to get that average:\n \nSELECT (wins / plays) AS winavg, AVG(plays) FROM plays \n GROUP BY winavg;\n \n+--------+------------+\n| winavg | AVG(plays) |\n+--------+------------+\n| 0.1765 | 17.0000 |\n| 0.2500 | 26.0000 |\n| 0.3636 | 22.0000 |\n+--------+------------+\n3 rows in set (0.00 sec)\n \nYou can filter on aggregate information using the HAVING\nclause. The HAVING\nclause is applied after GROUP BY and allows you to filter on\naggregate data that is\nnot available to the WHERE clause. Restrict the above\nexample to results that involve\nan average number of plays over 20:\n \nSELECT (wins / plays) AS winavg, AVG(plays) FROM plays \n GROUP BY winavg HAVING AVG(plays) > 20;\n \n+--------+------------+\n| winavg | AVG(plays) |\n+--------+------------+\n| 0.2500 | 26.0000 |\n| 0.3636 | 22.0000 |\n+--------+------------+\n2 rows in set (0.00 sec)\n \nSee Also\n \nSELECT\nJoins and Subqueries\nLIMIT\nORDER BY\nCommon Table Expressions\nSELECT WITH ROLLUP\nSELECT INTO OUTFILE\nSELECT INTO DUMPFILE\nFOR UPDATE\nLOCK IN SHARE MODE\nOptimizer Hints\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/group-by/','','https://mariadb.com/kb/en/group-by/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (416,27,'HANDLER Commands','Syntax\n------ \nHANDLER tbl_name OPEN [ [AS] alias]\nHANDLER tbl_name READ index_name { = | >= | = | \n\nURL: https://mariadb.com/kb/en/handler-commands/','','https://mariadb.com/kb/en/handler-commands/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (417,27,'HIGH_PRIORITY and LOW_PRIORITY','The XtraDB/InnoDB storage engine uses row-level locking to\nensure data integrity. However some storage engines (such as\nMEMORY, MyISAM, Aria and MERGE) lock the whole table to\nprevent conflicts. These storage engines use two separate\nqueues to remember pending statements; one is for SELECTs\nand the other one is for write statements (INSERT, DELETE,\nUPDATE). By default, the latter has a higher priority.\n \nTo give write operations a lower priority, the\nlow_priority_updates server system variable can be set to\nON. The option is available on both the global and session\nlevels, and it can be set at startup or via the SET\nstatement.\n \nWhen too many table locks have been set by write statements,\nsome pending SELECTs are executed. The maximum number of\nwrite locks that can be acquired before this happens is\ndetermined by the max_write_lock_count server system\nvariable, which is dynamic.\n \nIf write statements have a higher priority (default), the\npriority of individual write statements (INSERT, REPLACE,\nUPDATE, DELETE) can be changed via the LOW_PRIORITY\nattribute, and the priority of a SELECT statement can be\nraised via the HIGH_PRIORITY attribute. Also, LOCK TABLES\nsupports a LOW_PRIORITY attribute for WRITE locks.\n \nIf read statements have a higher priority, the priority of\nan INSERT can be changed via the HIGH_PRIORITY attribute.\nHowever, the priority of other write statements cannot be\nraised individually.\n \nThe use of LOW_PRIORITY or HIGH_PRIORITY for an INSERT\nprevents Concurrent Inserts from being used.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/high_priority-and-low_priority/','','https://mariadb.com/kb/en/high_priority-and-low_priority/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (418,27,'IGNORE','The IGNORE option tells the server to ignore some common\nerrors.\n \nIGNORE can be used with the following statements:\nDELETE\nINSERT (see also INSERT IGNORE)\nLOAD DATA INFILE\nUPDATE\nALTER TABLE\nCREATE TABLE ... SELECT\nINSERT ... SELECT\n \nThe logic used:\nVariables out of ranges are replaced with the\nmaximum/minimum value.\n \nSQL_MODEs STRICT_TRANS_TABLES, STRICT_ALL_TABLES,\nNO_ZERO_IN_DATE, NO_ZERO_DATE are ignored.\n \nInserting NULL in a NOT NULL field will insert 0 ( in a\nnumerical\n field), 0000-00-00 ( in a date field) or an empty string (\nin a character\n field).\n \nRows that cause a duplicate key error or break a foreign key\nconstraint are\n not inserted, updated, or deleted.\n \nThe following errors are ignored:\n \nError number | Symbolic error name | Description | \n \n1022 | ER_DUP_KEY | Can\'t write; duplicate key in table\n\'%s\' | \n \n1048 | ER_BAD_NULL_ERROR | Column \'%s\' cannot be null | \n \n1062 | ER_DUP_ENTRY | Duplicate entry \'%s\' for key %d | \n \n1242 | ER_SUBQUERY_NO_1_ROW | Subquery returns more than 1\nrow | \n \n1264 | ER_WARN_DATA_OUT_OF_RANGE | Out of range value for\ncolumn \'%s\' at row %ld | \n \n1265 | WARN_DATA_TRUNCATED | Data truncated for column\n\'%s\' at row %ld | \n \n1292 | ER_TRUNCATED_WRONG_VALUE | Truncated incorrect %s\nvalue: \'%s\' | \n \n1366 | ER_TRUNCATED_WRONG_VALUE_FOR_FIELD | Incorrect\ninteger value | \n \n1369 | ER_VIEW_CHECK_FAILED | CHECK OPTION failed \'%s.%s\'\n| \n \n1451 | ER_ROW_IS_REFERENCED_2 | Cannot delete or update a\nparent row | \n \n1452 | ER_NO_REFERENCED_ROW_2 | Cannot add or update a child\nrow: a foreign key constraint fails (%s) | \n \n1526 | ER_NO_PARTITION_FOR_GIVEN_VALUE | Table has no\npartition for value %s | \n \n1586 | ER_DUP_ENTRY_WITH_KEY_NAME | Duplicate entry \'%s\'\nfor key \'%s\' | \n \n1591 | ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT | Table has no\npartition for some existing values | \n \n1748 | ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET | Found a\nrow not matching the given partition set | \n \nIgnored errors normally generate a warning.\n \nA property of the IGNORE clause consists in causing\ntransactional engines and non-transactional engines (like\nXtraDB and Aria) to behave the same way. For example,\nnormally a multi-row insert which tries to violate a UNIQUE\ncontraint is completely rolled back on XtraDB/InnoDB, but\nmight be partially executed on Aria. With the IGNORE clause,\nthe statement will be partially executed in both engines.\n \nStarting from MariaDB 5.5.28 duplicate key errors also\ngenerate warnings. The OLD_MODE server variable can be used\nto prevent this.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ignore/','','https://mariadb.com/kb/en/ignore/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (419,27,'INSERT','Syntax\n------ \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)]\n SET col={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nThe INSERT statement is used to insert new rows into an\nexisting table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based\non explicitly specified values. The INSERT ... SELECT form\ninserts rows selected from another table or tables. INSERT\n... SELECT is discussed further in the INSERT ... SELECT\narticle.\n \nThe table name can be specified in the form db_name.tbl_name\nor, if a default database is selected, in the form tbl_name\n(see Identifier Qualifiers). This allows to use INSERT ...\nSELECT to copy rows between different databases.\n \nThe PARTITION clause was introduced in MariaDB 10.0. It can\nbe used in both the INSERT and the SELECT part. See\nPartition Pruning and Selection for details.\n \nThe columns list is optional. It specifies which values are\nexplicitly inserted, and in which order. If this clause is\nnot specified, all values must be explicitly specified, in\nthe same order they are listed in the table definition.\n \nThe list of value follow the VALUES or VALUE keyword (which\nare interchangeable, regardless how much values you want to\ninsert), and is wrapped by parenthesis. The values must be\nlisted in the same order as the columns list. It is possible\nto specify more than one list to insert more than one rows\nwith a single statement. If many rows are inserted, this is\na speed optimization.\n \nFor one-row statements, the SET clause may be more simple,\nbecause you don\'t need to remember the columns order. All\nvalues are specified in the form col = expr.\n \nValues can also be specified in the form of a SQL expression\nor subquery. However, the subquery cannot access the same\ntable that is named in the INTO clause.\n \nIf you use the LOW_PRIORITY keyword, execution of the INSERT\nis delayed until no other clients are reading from the\ntable. If you use the HIGH_PRIORITY keyword, the statement\nhas the same priority as SELECTs. This affects only storage\nengines that use only table-level locking (MyISAM, MEMORY,\nMERGE). However, if one of these keywords is specified,\nconcurrent inserts cannot be used. See HIGH_PRIORITY and\nLOW_PRIORITY clauses for details.\n \nINSERT DELAYED\n \nFor more details on the DELAYED option, see INSERT DELAYED.\n \nHIGH PRIORITY and LOW PRIORITY\n \nSee HIGH_PRIORITY and LOW_PRIORITY.\n \nDefaults and Duplicate Values\n \nSee INSERT - Default & Duplicate Values for details..\n \nINSERT IGNORE\n \nSee INSERT IGNORE.\n \nINSERT ON DUPLICATE KEY UPDATE\n \nSee INSERT ON DUPLICATE KEY UPDATE.\n \nExamples\n-------- \nSpecifying the column names:\n \nINSERT INTO person (first_name, last_name) VALUES (\'John\',\n\'Doe\');\n \nInserting more than 1 row at a time:\n \nINSERT INTO tbl_name VALUES (1, \"row 1\"), (2, \"row 2\");\n \nUsing the SET clause:\n \nINSERT INTO person SET first_name = \'John\', last_name =\n\'Doe\';\n \nSELECTing from another table:\n \nINSERT INTO contractor SELECT * FROM person WHERE status =\n\'c\';\n \nSee INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE for\nfurther examples.\n \n\n\nURL: https://mariadb.com/kb/en/insert/','','https://mariadb.com/kb/en/insert/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (420,27,'INSERT - Default &amp; Duplicate Values','Default Values\n \nIf the SQL_MODE contains STRICT_TRANS_TABLES and you are\ninserting into a transactional table (like InnoDB), or if\nthe SQL_MODE contains STRICT_ALL_TABLES, all NOT NULL\ncolumns which does not have a DEFAULT value (and is not\nAUTO_INCREMENT) must be explicitly referenced in INSERT\nstatements. If not, an error like this is produced:\n \nERROR 1364 (HY000): Field \'col\' doesn\'t have a default\nvalue\n \nIn all other cases, if a NOT NULL column without a DEFAULT\nvalue is not referenced, an empty value will be inserted\n(for example, 0 for INTEGER columns and \'\' for CHAR\ncolumns). See NULL Values in MariaDB:Inserting for examples.\n \nIf a NOT NULL column having a DEFAULT value is not\nreferenced, NULL will be inserted.\n \nIf a NULL column having a DEFAULT value is not referenced,\nits default value will be inserted. It is also possible to\nexplicitly assign the default value using the DEFAULT\nkeyword or the DEFAULT() function.\n \nIf the DEFAULT keyword is used but the column does not have\na DEFAULT value, an error like this is produced:\n \nERROR 1364 (HY000): Field \'col\' doesn\'t have a default\nvalue\n \nDuplicate Values\n \nBy default, if you try to insert a duplicate row and there\nis a UNIQUE index, INSERT stops and an error like this is\nproduced:\n \nERROR 1062 (23000): Duplicate entry \'dup_value\' for key\n\'col\'\n \nTo handle duplicates you can use the IGNORE clause, INSERT\nON DUPLICATE KEY UPDATE or the REPLACE statement. Note that\nthe IGNORE and DELAYED options are ignored when you use ON\nDUPLICATE KEY UPDATE.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/insert-default-duplicate-values/','','https://mariadb.com/kb/en/insert-default-duplicate-values/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (421,27,'INSERT DELAYED','Syntax\n------ \nINSERT DELAYED ...\n \nDescription\n----------- \nThe DELAYED option for the INSERT\nstatement is a MariaDB/MySQL extension to standard SQL that\nis very useful if you have\nclients that cannot or need not wait for the INSERT to\ncomplete. This is a common situation when you use MariaDB\nfor logging and you\nalso periodically run SELECT and UPDATE\nstatements that take a long time to complete.\n \nWhen a client uses INSERT DELAYED, it gets an okay from the\nserver at once, and the row is queued to be inserted when\nthe table is not in\nuse by any other thread.\n \nAnother major benefit of using INSERT DELAYED is that\ninserts from many clients are bundled together and written\nin one block. This\nis much faster than performing many separate inserts.\n \nNote that INSERT DELAYED is slower than a normal\n INSERT if the table is not otherwise in use. There is also\nthe additional overhead for the server to handle a separate\nthread for each\ntable for which there are delayed rows. This means that you\nshould use\nINSERT DELAYED only when you are really sure that you need\nit.\n \nThe queued rows are held only in memory until they are\ninserted into the table.\nThis means that if you terminate mysqld forcibly (for\nexample, with kill -9) or\nif mysqld dies unexpectedly, any queued rows that have not\nbeen written to disk\nare lost.\n \nThe number of concurrent INSERT DELAYED threads is limited\nby the max_delayed_threads server system variables. If it is\nset to 0, INSERT DELAYED is disabled. The session value can\nbe equal to the global value, or 0 to disable this statement\nfor the current session. If this limit has been reached, the\nDELAYED clause will be silently ignore for subsequent\nstatements (no error will be produced).\n \nThere are some constraints on the use of DELAYED:\nINSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE,\n and BLACKHOLE tables. If you execute INSERT DELAYED with\nanother storage engine, you will get an error like this:\nERROR 1616 (HY000): DELAYED option not supported for table\n\'tab_name\'\nFor MyISAM tables, if there are no free blocks in the middle\nof the data\n file, concurrent SELECT and INSERT statements are\nsupported. Under these\n circumstances, you very seldom need to use INSERT DELAYED\n with MyISAM.\nINSERT DELAYED should be used only for\n INSERT statements that specify value lists. The server\n ignores DELAYED for INSERT ... SELECT\n or INSERT ... ON DUPLICATE KEY UPDATE statements.\nBecause the INSERT DELAYED statement returns immediately,\n before the rows are inserted, you cannot use\n LAST_INSERT_ID() to get the\n AUTO_INCREMENT value that the statement might generate.\nDELAYED rows are not visible to SELECT\n statements until they actually have been inserted.\nAfter INSERT DELAYED, ROW_COUNT() returns the number of the\nrows you tried to insert, not the number of the successful\nwrites.\nDELAYED is ignored on slave replication servers, so that \n INSERT DELAYED is treated as a normal\n INSERT on slaves. This is because\n DELAYED could cause the slave to have different data than\n the master. INSERT DELAYED statements are not safe for\nreplication.\nPending INSERT DELAYED statements are lost if a table is\n write locked and ALTER TABLE is used to modify the table\nstructure.\nINSERT DELAYED is not supported for views. If you try, you\nwill get an error like this: ERROR 1347 (HY000):\n\'view_name\' is not BASE TABLE\nINSERT DELAYED is not supported for partitioned tables.\nINSERT DELAYED is not supported within stored programs.\n \n\n\nURL: https://mariadb.com/kb/en/insert-delayed/','','https://mariadb.com/kb/en/insert-delayed/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (422,27,'INSERT IGNORE','Ignoring Errors\n \nNormally INSERT stops and rolls back when it encounters an\nerror.\n \nBy using the IGNORE keyword all errors are converted to\nwarnings, which will not stop inserts of additional rows.\n \nThe IGNORE and DELAYED options are ignored when you use ON\nDUPLICATE KEY UPDATE.\n \nIncompatibilities\n \nMariaDB until 5.5.28\nMySQL and MariaDB before 5.5.28 didn\'t give warnings for\nduplicate key errors when using IGNORE.\nYou can get the old behaviour if you set OLD_MODE to\nNO_DUP_KEY_WARNINGS_WITH_IGNORE\n \nExamples\n-------- \nCREATE TABLE t1 (x INT UNIQUE);\n \nINSERT INTO t1 VALUES(1),(2);\n \nINSERT INTO t1 VALUES(2),(3);\nERROR 1062 (23000): Duplicate entry \'2\' for key \'x\'\nSELECT * FROM t1;\n \n+------+\n| x |\n+------+\n| 1 |\n| 2 |\n+------+\n2 rows in set (0.00 sec)\n \nINSERT IGNORE INTO t1 VALUES(2),(3);\nQuery OK, 1 row affected, 1 warning (0.04 sec)\n \nSHOW WARNINGS;\n \n+---------+------+---------------------------------+\n| Level | Code | Message |\n+---------+------+---------------------------------+\n| Warning | 1062 | Duplicate entry \'2\' for key \'x\' |\n+---------+------+---------------------------------+\n \nSELECT * FROM t1;\n \n+------+\n| x |\n+------+\n| 1 |\n| 2 |\n| 3 |\n+------+\n \nSee INSERT ON DUPLICATE KEY UPDATE for further examples\nusing that syntax.\n \n\n\nURL: https://mariadb.com/kb/en/insert-ignore/','','https://mariadb.com/kb/en/insert-ignore/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (423,27,'INSERT ON DUPLICATE KEY UPDATE','Syntax\n------ \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)]\n SET col={expr | DEFAULT}, ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nOr:\n \nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE\n col=expr\n [, col=expr] ... ]\n \nDescription\n----------- \nINSERT ... ON DUPLICATE KEY UPDATE is a MariaDB/MySQL\nextension to the INSERT statement that, if it finds a\nduplicate unique or primary key, will instead perform an\nUPDATE.\n \nThe row/s affected value is reported as 1 if a row is\ninserted, and 2 if a row is updated, unless the API\'s\nCLIENT_FOUND_ROWS flag is set.\n \nIf more than one unique index is matched, only the first is\nupdated. It is not recommended to use this statement on\ntables with more than one unique index.\n \nIf the table has an AUTO_INCREMENT primary key and the\nstatement inserts or updates a row, the LAST_INSERT_ID()\nfunction returns its AUTO_INCREMENT value.\n \nThe VALUES() function can only be used in a ON DUPLICATE KEY\nUPDATE clause and has no meaning in any other context. It\nreturns the column values from the INSERT portion of the\nstatement. This function is particularly useful for\nmulti-rows inserts.\n \nThe IGNORE and DELAYED options are ignored when you use ON\nDUPLICATE KEY UPDATE.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nThis statement activates INSERT and UPDATE triggers. See\nTrigger Overview for details.\n \nSee also a similar statement, REPLACE.\n \nExamples\n-------- \nCREATE TABLE ins_duplicate (id INT PRIMARY KEY, animal\nVARCHAR(30));\nINSERT INTO ins_duplicate VALUES (1,\'Aardvark\'),\n(2,\'Cheetah\'), (3,\'Zebra\');\n \nIf there is no existing key, the statement runs as a regular\nINSERT:\n \nINSERT INTO ins_duplicate VALUES (4,\'Gorilla\') ON\nDUPLICATE KEY UPDATE animal=\'Gorilla\';\nQuery OK, 1 row affected (0.07 sec)\n \nSELECT * FROM ins_duplicate;\n+----+----------+\n| id | animal |\n+----+----------+\n| 1 | Aardvark |\n| 2 | Cheetah |\n| 3 | Zebra |\n| 4 | Gorilla |\n+----+----------+\n \nA regular INSERT with a primary key value of 1 will fail,\ndue to the existing key:\n \nINSERT INTO ins_duplicate VALUES (1,\'Antelope\');\nERROR 1062 (23000): Duplicate entry \'1\' for key\n\'PRIMARY\'\n \nHowever, we can use an INSERT ON DUPLICATE KEY UPDATE\ninstead:\n \nINSERT INTO ins_duplicate VALUES (1,\'Antelope\') ON\nDUPLICATE KEY UPDATE animal=\'Antelope\';\nQuery OK, 2 rows affected (0.09 sec)\n \nNote that there are two rows reported as affected, but this\nrefers only to the UPDATE.\n \nSELECT * FROM ins_duplicate;\n+----+----------+\n| id | animal |\n+----+----------+\n| 1 | Antelope |\n| 2 | Cheetah |\n| 3 | Zebra |\n| 4 | Gorilla |\n+----+----------+\n \nAdding a second unique column:\n \nALTER TABLE ins_duplicate ADD id2 INT;\nUPDATE ins_duplicate SET id2=id+10;\nALTER TABLE ins_duplicate ADD UNIQUE KEY(id2);\n \nWhere two rows match the unique keys match, only the first\nis updated. This can be unsafe and is not recommended unless\nyou are certain what you are doing. Note that the warning\nshown below appears in MariaDB 5.5 and before, but has been\nremoved in MariaDB 10.0, as MariaDB now assumes that the\nkeys are checked in order, as shown in SHOW CREATE TABLE.\n \nINSERT INTO ins_duplicate VALUES (2,\'Lion\',13) ON\nDUPLICATE KEY UPDATE animal=\'Lion\';\nQuery OK, 2 rows affected, 1 warning (0.06 sec)\n \nSHOW WARNINGS;\n+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Note | 1592 | Unsafe statement written to the binary log\nusing statement format since BINLOG_FORMAT = STATEMENT.\nINSERT... ON DUPLICATE KEY UPDATE on a table with more than\none UNIQUE KEY is unsafe |\n+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n \nSELECT * FROM ins_duplicate;\n+----+----------+------+\n| id | animal | id2 |\n+----+----------+------+\n| 1 | Antelope | 11 |\n| 2 | Lion | 12 |\n| 3 | Zebra | 13 |\n| 4 | Gorilla | 14 |\n+----+----------+------+\n \nAlthough the third row with an id of 3 has an id2 of 13,\nwhich also matched, it was not updated.\n \nChanging id to an auto_increment field. If a new row is\nadded, the auto_increment is moved forward. If the row is\nupdated, it remains the same.\n \nALTER TABLE `ins_duplicate` CHANGE `id` `id` INT( 11 ) NOT\nNULL AUTO_INCREMENT;\nALTER TABLE ins_duplicate DROP id2;\nSELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE\nTABLE_NAME=\'ins_duplicate\';\n+----------------+\n| Auto_increment |\n+----------------+\n| 5 |\n+----------------+\n \nINSERT INTO ins_duplicate VALUES (2,\'Leopard\') ON\nDUPLICATE KEY UPDATE animal=\'Leopard\';\nQuery OK, 2 rows affected (0.00 sec)\n \nSELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE\nTABLE_NAME=\'ins_duplicate\';\n+----------------+\n| Auto_increment |\n+----------------+\n| 5 |\n+----------------+\n \nINSERT INTO ins_duplicate VALUES (5,\'Wild Dog\') ON\nDUPLICATE KEY UPDATE animal=\'Wild Dog\';\nQuery OK, 1 row affected (0.09 sec)\n \nSELECT * FROM ins_duplicate;\n+----+----------+\n| id | animal |\n+----+----------+\n| 1 | Antelope |\n| 2 | Leopard |\n| 3 | Zebra |\n| 4 | Gorilla |\n| 5 | Wild Dog |\n+----+----------+\n \nSELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE\nTABLE_NAME=\'ins_duplicate\';\n+----------------+\n| Auto_increment |\n+----------------+\n| 6 |\n+----------------+\n \nRefering to column values from the INSERT portion of the\nstatement: \n \nINSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)\n ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);\n \nSee the VALUES() function for more.\n \n\n\nURL:\nhttps://mariadb.com/kb/en/insert-on-duplicate-key-update/','','https://mariadb.com/kb/en/insert-on-duplicate-key-update/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (424,27,'INSERT SELECT','Syntax\n------ \nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n [INTO] tbl_name [(col_name,...)]\n SELECT ...\n [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]\n \nDescription\n----------- \nWith INSERT ... SELECT, you can quickly insert many rows\ninto a table from one or more other tables. For example:\n \nINSERT INTO tbl_temp2 (fld_id)\n SELECT tbl_temp1.fld_order_id\n FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;\n \ntbl_name can also be specified in the form db_name.tbl_name\n(see Identifier Qualifiers). This allows to copy rows\nbetween different databases.\n \nIf the new table has a primary key or UNIQUE indexes, you\ncan use IGNORE to handle duplicate key errors during the\nquery. The newer values will not be inserted if an identical\nvalue already exists.\n \nREPLACE can be used instead of INSERT to prevent duplicates\non UNIQUE indexes by deleting old values. In that case, ON\nDUPLICATE KEY UPDATE cannot be used.\n \nINSERT ... SELECT works for tables which already exist. To\ncreate a table for a given resultset, you can use CREATE\nTABLE ... SELECT.\n \n\n\nURL: https://mariadb.com/kb/en/insert-select/','','https://mariadb.com/kb/en/insert-select/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (425,27,'INTERSECT','INTERSECT was introduced in MariaDB 10.3.0.\n \nThe result of an intersect is the intersection of right and\nleft SELECT results, i.e. only records that are present in\nboth result sets will be included in the result of the\noperation.\n \nSyntax\n------ \nSELECT ...\n(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...\n[(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...]\n[ORDER BY [column [, column ...]]]\n[LIMIT {[offset,] row_count | row_count OFFSET offset}]\n \nPlease note:\nALL is not supported by INTERSECT (and it is difficult to\nmake sense of ALL with INTERSECT).\nBrackets for explicit operation precedence are not\nsupported; use a subquery in the FROM clause as a\nworkaround).\n \nDescription\n----------- \nMariaDB has supported INTERSECT (as well as EXCEPT) in\naddition to UNION since MariaDB 10.3.\n \nAll behavior for naming columns, ORDER BY and LIMIT is the\nsame as for UNION.\n \nINTERSECT implicitly supposes a DISTINCT operation.\n \nThe result of an intersect is the intersection of right and\nleft SELECT results, i.e. only records that are present in\nboth result sets will be included in the result of the\noperation.\n \nINTERSECT has higher precedence than UNION and EXCEPT. If\npossible it will be executed linearly but if not it will be\ntranslated to a subquery in the FROM clause:\n \n(select a,b from t1)\nunion\n(select c,d from t2)\nintersect\n(select e,f from t3)\nunion\n(select 4,4);\n \nwill be translated to:\n \n(select a,b from t1)\nunion\nselect c,d from\n ((select c,d from t2)\n intersect\n (select e,f from t3)) dummy_subselect\nunion\n(select 4,4)\n \n\n \nParentheses\n \nFrom MariaDB 10.4.0, parentheses can be used to specify\nprecedence. Before this, a syntax error would be returned.\n \nExamples\n-------- \nShow customers which are employees:\n \n(SELECT e_name AS name, email FROM employees)\nINTERSECT\n(SELECT c_name AS name, email FROM customers);\n \nDifference between UNION, EXCEPT and INTERSECT:\n \nCREATE TABLE seqs (i INT);\nINSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n| 6 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 3 |\n+------+\n \nParentheses for specifying precedence, from MariaDB 10.4.0\n \nCREATE OR REPLACE TABLE t1 (a INT);\nCREATE OR REPLACE TABLE t2 (b INT);\nCREATE OR REPLACE TABLE t3 (c INT);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\nINSERT INTO t2 VALUES (5),(6);\nINSERT INTO t3 VALUES (1),(6);\n \n((SELECT a FROM t1) UNION (SELECT b FROM t2)) INTERSECT\n(SELECT c FROM t3);\n+------+\n| a |\n+------+\n| 1 |\n| 6 |\n+------+\n \n(SELECT a FROM t1) UNION ((SELECT b FROM t2) INTERSECT\n(SELECT c FROM t3));\n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 6 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/intersect/','','https://mariadb.com/kb/en/intersect/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (426,27,'JOIN Syntax','Description\n----------- \nMariaDB supports the following JOIN syntaxes for\nthe table_references part of SELECT statements and\nmultiple-table DELETE and UPDATE statements:\n \ntable_references:\n table_reference [, table_reference] ...\n \ntable_reference:\n table_factor\n | join_table\n \ntable_factor:\n tbl_name [PARTITION (partition_list)]\n [query_system_time_period_specification] [[AS] alias]\n[index_hint_list]\n | table_subquery [query_system_time_period_specification]\n[AS] alias\n | ( table_references )\n | { ON table_reference LEFT OUTER JOIN table_reference\n ON conditional_expr }\n \njoin_table:\n table_reference [INNER | CROSS] JOIN table_factor\n[join_condition]\n | table_reference STRAIGHT_JOIN table_factor\n | table_reference STRAIGHT_JOIN table_factor ON\nconditional_expr\n | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference\njoin_condition\n | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN\ntable_factor\n \njoin_condition:\n ON conditional_expr\n | USING (column_list)\n \nquery_system_time_period_specification:\n FOR SYSTEM_TIME AS OF point_in_time\n | FOR SYSTEM_TIME BETWEEN point_in_time AND point_in_time\n | FOR SYSTEM_TIME FROM point_in_time TO point_in_time\n | FOR SYSTEM_TIME ALL\n \npoint_in_time:\n [TIMESTAMP] expression\n | TRANSACTION expression\n \nindex_hint_list:\n index_hint [, index_hint] ...\n \nindex_hint:\n USE {INDEX|KEY}\n [{FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n | IGNORE {INDEX|KEY}\n [{FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n | FORCE {INDEX|KEY}\n [{FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n \nindex_list:\n index_name [, index_name] ...\n \nA table reference is also known as a join expression.\n \nEach table can also be specified as db_name.tabl_name. This\nallows to write queries which involve multiple databases.\nSee Identifier Qualifiers for syntax details.\n \nThe syntax of table_factor is extended in comparison with\nthe\nSQL Standard. The latter accepts only table_reference, not a\nlist of them inside a pair of parentheses.\n \nThis is a conservative extension if we consider each comma\nin a list of\ntable_reference items as equivalent to an inner join. For\nexample:\n \nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n \nis equivalent to:\n \nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n \nIn MariaDB, CROSS JOIN is a syntactic equivalent to\nINNER JOIN (they can replace each other). In standard SQL,\nthey are not equivalent. INNER JOIN is used with an\nON clause, CROSS JOIN is used otherwise.\n \nIn general, parentheses can be ignored in join expressions\ncontaining only\ninner join operations. MariaDB also supports nested joins\n(see\nhttp://dev.mysql.com/doc/refman/5.1/en/nested-join-optimization.html).\n \nSee System-versioned tables for more information\nabout FOR SYSTEM_TIME syntax.\n \nIndex hints can be specified to affect how the MariaDB\noptimizer makes\nuse of indexes. For more information, see How to force query\nplans.\n \nExamples\n-------- \nSELECT left_tbl.*\n FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id =\nright_tbl.id\n WHERE right_tbl.id IS NULL;\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/join-syntax/','','https://mariadb.com/kb/en/join-syntax/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (427,27,'LIMIT','Description\n----------- \nUse the LIMIT clause to restrict the number of returned\nrows. When you use a single\ninteger n with LIMIT, the first n rows will be returned. Use\nthe ORDER BY\nclause to control which rows come first. You can also select\na number of rows after an offset\nusing either of the following:\n \nLIMIT offset, row_count\nLIMIT row_count OFFSET offset\n \nWhen you provide an offset m with a limit n, the first m\nrows will be ignored, and the\nfollowing n rows will be returned.\n \nExecuting an UPDATE with the LIMIT clause is not safe for\nreplication.\n \nSince MariaDB 10.0.11, LIMIT 0 has been an exception to this\nrule (see MDEV-6170).\n \nBeginning in MariaDB 5.5.21, there is a LIMIT ROWS EXAMINED\noptimization which provides the\nmeans to terminate the execution of SELECT statements which\nexamine too\nmany rows, and thus use too many resources. See LIMIT ROWS\nEXAMINED.\n \nMulti-Table Updates\n \nUntil MariaDB 10.3.1, it was not possible to use LIMIT (or\nORDER BY) in a multi-table UPDATE statement. This\nrestriction was lifted in MariaDB 10.3.2.\n \nGROUP_CONCAT\n \nStarting from MariaDB 10.3.3, it is possible to use LIMIT\nwith GROUP_CONCAT().\n \nExamples\n-------- \nCREATE TABLE members (name VARCHAR(20));\nINSERT INTO members\nVALUES(\'Jagdish\'),(\'Kenny\'),(\'Rokurou\'),(\'Immaculada\');\n \nSELECT * FROM members;\n \n+------------+\n| name |\n+------------+\n| Jagdish |\n| Kenny |\n| Rokurou |\n| Immaculada |\n+------------+\n \nSelect the first two names (no ordering specified):\n \nSELECT * FROM members LIMIT 2;\n \n+---------+\n| name |\n+---------+\n| Jagdish |\n| Kenny |\n+---------+\n \nAll the names in alphabetical order:\n \nSELECT * FROM members ORDER BY name;\n \n+------------+\n| name |\n+------------+\n| Immaculada |\n| Jagdish |\n| Kenny |\n| Rokurou |\n+------------+\n \nThe first two names, ordered alphabetically:\n \nSELECT * FROM members ORDER BY name LIMIT 2;\n \n+------------+\n| name |\n+------------+\n| Immaculada |\n| Jagdish |\n+------------+\n \nThe third name, ordered alphabetically (the first name would\nbe offset zero, so the third is offset two):\n \nSELECT * FROM members ORDER BY name LIMIT 2,1;\n \n+-------+\n| name |\n+-------+\n| Kenny |\n+-------+\n \nFrom MariaDB 10.3.2, LIMIT can be used in a multi-table\nupdate:\n \nCREATE TABLE warehouse (product_id INT, qty INT);\nINSERT INTO warehouse VALUES\n(1,100),(2,100),(3,100),(4,100);\n \nCREATE TABLE store (product_id INT, qty INT);\nINSERT INTO store VALUES (1,5),(2,5),(3,5),(4,5);\n \nUPDATE warehouse,store SET warehouse.qty = warehouse.qty-2,\nstore.qty = store.qty+2 \n WHERE (warehouse.product_id = store.product_id AND\nstore.product_id >= 1) \n ORDER BY store.product_id DESC LIMIT 2;\n \nSELECT * FROM warehouse;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 100 |\n| 2 | 100 |\n| 3 | 98 |\n| 4 | 98 |\n+------------+------+\n \nSELECT * FROM store;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 5 |\n| 2 | 5 |\n| 3 | 7 |\n| 4 | 7 |\n+------------+------+\n \nFrom MariaDB 10.3.3, LIMIT can be used with GROUP_CONCAT,\nso, for example, given the following table:\n \nCREATE TABLE d (dd DATE, cc INT);\n \nINSERT INTO d VALUES (\'2017-01-01\',1);\nINSERT INTO d VALUES (\'2017-01-02\',2);\nINSERT INTO d VALUES (\'2017-01-04\',3);\n \nthe following query:\n \nSELECT SUBSTRING_INDEX(GROUP_CONCAT(CONCAT_WS(\":\",dd,cc)\nORDER BY cc DESC),\",\",1) FROM d;\n \n+----------------------------------------------------------------------------+\n| SUBSTRING_INDEX(GROUP_CONCAT(CONCAT_WS(\":\",dd,cc) ORDER\nBY cc DESC),\",\",1) |\n+----------------------------------------------------------------------------+\n| 2017-01-04:3 |\n+----------------------------------------------------------------------------+\n \ncan be more simply rewritten as:\n \nSELECT GROUP_CONCAT(CONCAT_WS(\":\",dd,cc) ORDER BY cc DESC\nLIMIT 1) FROM d;\n \n+-------------------------------------------------------------+\n| GROUP_CONCAT(CONCAT_WS(\":\",dd,cc) ORDER BY cc DESC LIMIT\n1) |\n+-------------------------------------------------------------+\n| 2017-01-04:3 |\n+-------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/limit/','','https://mariadb.com/kb/en/limit/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (428,27,'LOAD DATA INFILE','Syntax\n------ \nLOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE\n\'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE tbl_name\n [CHARACTER SET charset_name]\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n [IGNORE number LINES]\n [(col_name_or_user_var,...)]\n [SET col_name = expr,...]\n \nDescription\n----------- \nReads rows from a text file into the designated table on the\ndatabase at a very high speed. The file name must be given\nas a literal string. \n \nFiles are written to disk using the SELECT INTO OUTFILE\nstatement. You can then read the files back into a table\nusing the LOAD DATA INFILE statement. The FIELDS and LINES\nclauses are the same in both statements. These clauses are\noptional, but if both are specified then the FIELDS clause\nmust precede LINES.\n \nIn releases after MariaDB 5.5, LOAD DATA INFILE is unsafe\nfor statement-based replication.\n \nExecuting this statement activates INSERT triggers.\n \nREPLACE and IGNORE\n \nIn cases where you load data from a file into a table that\nalready contains data and has a Primary Key, you may\nencounter issues where the statement attempts to insert a\nrow with a Primary Key that already exists. When this\nhappens, the statement fails with Error 1064, protecting the\ndata already on the table. In cases where you want MariaDB\nto overwrite duplicates, use the REPLACE keyword.\n \nThe REPLACE keyword works like the REPLACE statement. Here,\nthe statement attempts to load the data from the file. If\nthe row does not exist, it adds it to the table. If the row\ncontains an existing Primary Key, it replaces the table\ndata. That is, in the event of a conflict, it assumes the\nfile contains the desired row. \n \nThis operation can cause a degradation in load speed by a\nfactor of 20 or more if the part that has already been\nloaded is larger than the capacity of the InnoDB Buffer\nPool. This happens because it causes a lot of turnaround in\nthe Buffer Pool.\n \nUse the IGNORE keyword when you want to skip any rows that\ncontain a conflicting Primary Key. Here, the statement\nattempts to load the data from the file. If the row does not\nexist, it adds it to the table. If the row contains an\nexisting Primary Key, it ignores the addition request and\nmoves on to the next. That is, in the event of a conflict,\nit assumes the table contains the desired row.\n \nLOCAL\n \nWhen you issue this statement, the Server attempts to read\nfiles from the host file system. Using the LOCAL keyword,\nthe statement instead attempts to read files from the\nclient. This allows you to insert files from the client\'s\nlocal file system into the database.\n \nIn the event that you don\'t want the server to permit this\noperation, (such as for security reasons), you can disable\nsupport using local_infile. When this system variable is set\nto 0, MariaDB rejects LOAD DATA LOCAL INFILE statements,\nfailing with an error message.\n \nCharacter-sets\n \nWhen the statement opens the file, it attempts to read the\ncontents using the default character-set, as defined by the\ncharacter_set_database system variable. \n \nIn the cases where the file was written using a\ncharacter-set other than the default, you can specify the\ncharacter-set to use with the CHARACTER SET clause in the\nstatement. It ignores character-sets specified by the SET\nNAMES statement and by the character_set_client system\nvariable. Setting the CHARACTER SET clause to a value of\nbinary indicates \"no conversion.\"\n \nThe statement interprets all fields in the file as having\nthe same character-set, regardless of the column data type.\nTo properly interpret file contents, you must ensure that it\nwas written with the correct character-set. If you write a\ndata file with mysqldump -T or with the SELECT INTO OUTFILE\nstatement with the mysql client, be sure to use the\n--default-character-set option, so that the output is\nwritten with the desired character-set.\n \nWhen using mixed character sets, use the CHARACTER SET\nclause in both SELECT INTO OUTFILE and LOAD DATA INFILE to\nensure that MariaDB correctly interprets the escape\nsequences.\n \nThe character_set_filesystem system variable controls the\ninterpretation of the filename.\n \nIt is currently not possible to load data files that use the\nucs2 character set.\n \nPriority and Concurrency\n \nIn loading data from a file, there\'s a risk that the\nstatement will attempt insertions concurrent with reads from\nanother client, which can result in the read serving a\nresult-set that contains only part of the update from the\nLOAD DATA INFILE statement.\n \nUsing the LOW_PRIORITY keyword, MariaDB delays insertions\nuntil no other clients are reading from the table.\nAlternatively, you can use the CONCURRENT keyword to perform\nconcurrent insertion.\n \nThe LOW_PRIORITY and CONCURRENT keywords are mutually\nexclusive. They cannot be used in the same statement.\n \nProgress Reporting\n \nSince MariaDB 5.3, the LOAD DATA INFILE statement supports\nprogress reporting. You may find this useful when dealing\nwith long-running operations. Using another client you can\nissue a SHOW PROCESSLIST query to check the progress of the\ndata load.\n \nUsing mysqlimport\n \nMariaDB ships with a separate utility for loading data from\nfiles: mysqlimport. It operates by sending LOAD DATA INFILE\nstatements to the server.\n \nUsing mysqlimport you can compress the file using the\n--compress option, to get better performance over slow\nnetworks, providing both the client and server support the\ncompressed protocol. Use the --local option to load from the\nlocal file system.\n \nIndexing\n \nIn cases where the storage engine supports ALTER TABLE...\nDISABLE KEYS statements, the LOAD DATA INFILE statement\nautomatically disables indexes during the execution.\n \n\n\nURL: https://mariadb.com/kb/en/load-data-infile/','','https://mariadb.com/kb/en/load-data-infile/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (429,27,'LOAD XML','Syntax\n------ \nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE\n\'file_name\'\n [REPLACE | IGNORE]\n INTO TABLE [db_name.]tbl_name\n [CHARACTER SET charset_name]\n [ROWS IDENTIFIED BY \'\']\n [IGNORE number {LINES | ROWS}]\n [(column_or_user_var,...)]\n [SET col_name = expr,...]\n \nDescription\n----------- \nThe LOAD XML statement reads data from an XML file into a\ntable. The\nfile_name must be given as a literal string. The tagname in\nthe\noptional ROWS IDENTIFIED BY clause must also be given as a\nliteral\nstring, and must be surrounded by angle brackets (< and >).\n \nLOAD XML acts as the complement of running the mysql client\nin XML\noutput mode (that is, starting the client with the --xml\noption). To\nwrite data from a table to an XML file, use a command such\nas the\nfollowing one from the system shell:\n \nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n \nTo read the file back into a table, use LOAD XML INFILE. By\ndefault,\nthe element is considered to be the equivalent of a\ndatabase\ntable row; this can be changed using the ROWS IDENTIFIED BY\nclause.\n \nThis statement supports three different XML formats:\nColumn names as attributes and column values as attribute\nvalues:\n \nColumn names as tags and column values as the content of\nthese tags:\n \n value1\n value2\n \nColumn names are the name attributes of tags, and values\nare\n the contents of these tags:\n \n value1\n value2\n \n This is the format used by other tools, such as mysqldump.\n \nAll 3 formats can be used in the same XML file; the import\nroutine\nautomatically detects the format for each row and interprets\nit\ncorrectly. Tags are matched based on the tag or attribute\nname and the\ncolumn name.\n \nThe following clauses work essentially the same way for LOAD\nXML as\nthey do for LOAD DATA:\nLOW_PRIORITY or CONCURRENT\nLOCAL\nREPLACE or IGNORE\nCHARACTER SET\n(column_or_user_var,...)\nSET\n \nSee LOAD DATA for more information about these clauses.\n \nThe IGNORE number LINES or IGNORE number ROWS clause causes\nthe first\nnumber rows in the XML file to be skipped. It is analogous\nto the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n \nIf the LOW_PRIORITY keyword is used, insertions are delayed\nuntil no other clients are reading from the table. The\nCONCURRENT keyword allowes the use of concurrent inserts.\nThese clauses cannot be specified together.\n \nThis statement activates INSERT triggers.\n \n\n\nURL: https://mariadb.com/kb/en/load-xml/','','https://mariadb.com/kb/en/load-xml/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (430,27,'LOCK IN SHARE MODE','When LOCK IN SHARE MODE is specified in a SELECT statement,\nMariaDB will wait until all transactions that have modified\nthe rows are committed. Then, a write lock is acquired. All\ntransactions can read the rows, but if they want to modify\nthem, they have to wait until your transaction is committed.\n \nInnoDB/XtraDB supports row-level locking. selected rows can\nbe locked using LOCK IN SHARE MODE or FOR UPDATE. In both\ncases, a lock is acquired on the rows read by the query, and\nit will be released when the current transaction is\ncommitted.\n \nIf autocommit is set to 1, the LOCK IN SHARE MODE and FOR\nUPDATE clauses have no effect.\n \n\n\nURL: https://mariadb.com/kb/en/lock-in-share-mode/','','https://mariadb.com/kb/en/lock-in-share-mode/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (431,27,'Non-Recursive Common Table Expressions Overview','Common Table Expressions (CTEs) are a standard SQL feature,\nand are essentially temporary named result sets. There are\ntwo kinds of CTEs: Non-Recursive, which this article covers;\nand Recursive.\n \nCommon table expressions were introduced in MariaDB 10.2.1.\n \nNon-Recursive CTEs\n \nThe WITH keyword signifies a CTE. It is given a name,\nfollowed by a body (the main query) as follows:\n \nCTEs are similar to derived tables. For example\n \nWITH engineers AS \n ( SELECT * FROM employees\n WHERE dept = \'Engineering\' )\n \nSELECT * FROM engineers\nWHERE ...\n \nSELECT * FROM\n ( SELECT * FROM employees\n WHERE dept = \'Engineering\' ) AS engineers\nWHERE\n...\n \nA non-recursive CTE is basically a query-local VIEW. There\nare several advantages and caveats to them. The syntax is\nmore readable than nested FROM (SELECT ...).\nA CTE can refer to another and it can be referenced from\nmultiple places.\n \nA CTE referencing Another CTE\n \nUsing this format makes for a more readable SQL than a\nnested FROM(SELECT ...) clause. Below is an example of this:\n \nWITH engineers AS (\nSELECT * FROM employees\nWHERE dept IN(\'Development\',\'Support\') ),\neu_engineers AS ( SELECT * FROM engineers WHERE country\nIN(\'NL\',...) )\nSELECT\n...\nFROM eu_engineers;\n \nMultiple Uses of a CTE\n \nThis can be an \'anti-self join\', for example:\n \nWITH engineers AS (\nSELECT * FROM employees\nWHERE dept IN(\'Development\',\'Support\') )\n \nSELECT * FROM engineers E1\nWHERE NOT EXISTS\n (SELECT 1 FROM engineers E2\n WHERE E2.country=E1.country\n AND E2.name E1.name );\n \nOr, for year-over-year comparisons, for example:\n \nWITH sales_product_year AS (\nSELECT product, YEAR(ship_date) AS year,\nSUM(price) AS total_amt\nFROM item_sales\nGROUP BY product, year )\n \nSELECT *\nFROM sales_product_year CUR,\nsales_product_year PREV,\nWHERE CUR.product=PREV.product \nAND CUR.year=PREV.year + 1 \nAND CUR.total_amt > PREV.total_amt\n \nAnother use is to compare individuals against their group.\nBelow is an example of how this might be executed:\n \nWITH sales_product_year AS (\nSELECT product,\nYEAR(ship_date) AS year,\nSUM(price) AS total_amt\nFROM item_sales\nGROUP BY product, year\n)\n \nSELECT * \nFROM sales_product_year S1\nWHERE\ntotal_amt > \n (SELECT 0.1 * SUM(total_amt)\n FROM sales_product_year S2\n WHERE S2.year = S1.year)\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/non-recursive-common-table-expressions-overview/','','https://mariadb.com/kb/en/non-recursive-common-table-expressions-overview/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (432,27,'ORDER BY','Description\n----------- \nUse the ORDER BY clause to order a resultset, such as that\nare returned from a SELECT\nstatement. You can specify just a column or use any\nexpression with functions. If you are\nusing the GROUP BY clause, you can use grouping functions in\nORDER BY.\nOrdering is done after grouping.\n \nYou can use multiple ordering expressions, separated by\ncommas. Rows will be sorted by\nthe first expression, then by the second expression if they\nhave the same value for the\nfirst, and so on.\n \nYou can use the keywords ASC and DESC after each ordering\nexpression to\nforce that ordering to be ascending or descending,\nrespectively. Ordering is ascending\nby default.\n \nYou can also use a single integer as the ordering\nexpression. If you use an integer n,\nthe results will be ordered by the nth column in the select\nexpression.\n \nWhen string values are compared, they are compared as if by\nthe STRCMP\nfunction. STRCMP ignores trailing whitespace and may\nnormalize\ncharacters and ignore case, depending on the collation in\nuse.\n \nStarting from MariaDB 5.5.35 duplicated entries in the ORDER\nBY clause are removed. MySQL 5.6 also removes duplicated\nfields.\n \nORDER BY can also be used to order the activities of a\nDELETE or UPDATE statement (usually with the LIMIT clause). \n \nUntil MariaDB 10.3.1, it was not possible to use ORDER BY\n(or LIMIT) in a multi-table UPDATE statement. This\nrestriction was lifted in MariaDB 10.3.2.\n \nExamples\n-------- \nCREATE TABLE seq (i INT, x VARCHAR(1));\nINSERT INTO seq VALUES (1,\'a\'), (2,\'b\'), (3,\'b\'),\n(4,\'f\'), (5,\'e\');\n \nSELECT * FROM seq ORDER BY i;\n \n+------+------+\n| i | x |\n+------+------+\n| 1 | a |\n| 2 | b |\n| 3 | b |\n| 4 | f |\n| 5 | e |\n+------+------+\n \nSELECT * FROM seq ORDER BY i DESC;\n \n+------+------+\n| i | x |\n+------+------+\n| 5 | e |\n| 4 | f |\n| 3 | b |\n| 2 | b |\n| 1 | a |\n+------+------+\n \nSELECT * FROM seq ORDER BY x,i;\n \n+------+------+\n| i | x |\n+------+------+\n| 1 | a |\n| 2 | b |\n| 3 | b |\n| 5 | e |\n| 4 | f |\n+------+------+\n \nORDER BY in an UPDATE statement, in conjunction with LIMIT:\n \nUPDATE seq SET x=\'z\' WHERE x=\'b\' ORDER BY i DESC LIMIT\n1;\n \nSELECT * FROM seq;\n \n+------+------+\n| i | x |\n+------+------+\n| 1 | a |\n| 2 | b |\n| 3 | z |\n| 4 | f |\n| 5 | e |\n+------+------+\n \nFrom MariaDB 10.3.2, ORDER BY can be used in a multi-table\nupdate:\n \nCREATE TABLE warehouse (product_id INT, qty INT);\nINSERT INTO warehouse VALUES\n(1,100),(2,100),(3,100),(4,100);\n \nCREATE TABLE store (product_id INT, qty INT);\nINSERT INTO store VALUES (1,5),(2,5),(3,5),(4,5);\n \nUPDATE warehouse,store SET warehouse.qty = warehouse.qty-2,\nstore.qty = store.qty+2 \n WHERE (warehouse.product_id = store.product_id AND\nstore.product_id >= 1) \n ORDER BY store.product_id DESC LIMIT 2;\n \nSELECT * FROM warehouse;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 100 |\n| 2 | 100 |\n| 3 | 98 |\n| 4 | 98 |\n+------------+------+\n \nSELECT * FROM store;\n \n+------------+------+\n| product_id | qty |\n+------------+------+\n| 1 | 5 |\n| 2 | 5 |\n| 3 | 7 |\n| 4 | 7 |\n+------------+------+\n \n\n\nURL: https://mariadb.com/kb/en/order-by/','','https://mariadb.com/kb/en/order-by/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (433,27,'PROCEDURE','The PROCEDURE clause of SELECT passes the whole result set\nto a Procedure which will process it. These Procedures are\nnot Stored Procedures, and can only be written in the C\nlanguage, so it is necessary to recompile the server.\n \nCurrently, the only available procedure is ANALYSE, which\nexamines the resultset and suggests the optimal datatypes\nfor each column. It is defined in the sql/sql_analyse.cc\nfile, and can be used as an example to create more\nProcedures.\n \nThis clause cannot be used in a view\'s definition.\n \n\n\nURL: https://mariadb.com/kb/en/procedure/','','https://mariadb.com/kb/en/procedure/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (434,27,'Recursive Common Table Expressions Overview','Recursive Common Table Expressions have been supported since\nMariaDB 10.2.2.\n \nCommon Table Expressions (CTEs) are a standard SQL feature,\nand are essentially temporary named result sets. CTEs first\nappeared in the SQL standard in 1999, and the first\nimplementations began appearing in 2007.\n \nThere are two kinds of CTEs:\nNon-recursive\nRecursive, which this article covers.\n \nSQL is generally poor at recursive structures.\n \nCTEs permit a query to reference itself. A recursive CTE\nwill repeatedly execute subsets of the data until it obtains\nthe complete result set. This makes it particularly useful\nfor handing hierarchical or tree-structured data.\n \nSyntax example\n \nWITH RECURSIVE signifies a recursive CTE. It is given a\nname, followed by a body (the main query) as follows:\n \n\nComputation\n \nGiven the following structure:\n \nFirst execute the anchor part of the query:\n \nNext, execute the recursive part of the query:\n \n\n \n\nSummary so far\n \nwith recursive R as (\n select anchor_data\n union [all]\n select recursive_part\n from R, ...\n)\nselect ...\nCompute anchor_data\nCompute recursive_part to get the new data\nif (new data is non-empty) goto 2;\n \nCAST to avoid truncating data\n \nAs currently implemented by MariaDB and by the SQL Standard,\ndata may be truncated if not correctly cast. It is necessary\nto CAST the column to the correct width if the CTE\'s\nrecursive part produces wider values for a column than the\nCTE\'s nonrecursive part. Some other DBMS give an error in\nthis situation, and MariaDB\'s behavior may change in future\n- see MDEV-12325. See the examples below.\n \nExamples\n-------- \nTransitive closure - determining bus destinations\n \nSample data:\n \nCREATE TABLE bus_routes (origin varchar(50), dst\nvarchar(50));\nINSERT INTO bus_routes VALUES \n (\'New York\', \'Boston\'), \n (\'Boston\', \'New York\'), \n (\'New York\', \'Washington\'), \n (\'Washington\', \'Boston\'), \n (\'Washington\', \'Raleigh\');\n \nNow, we want to return the bus destinations with New York as\nthe origin:\n \nWITH RECURSIVE bus_dst as ( \n SELECT origin as dst FROM bus_routes WHERE origin=\'New\nYork\' \n UNION\n SELECT bus_routes.dst FROM bus_routes, bus_dst WHERE\nbus_dst.dst= bus_routes.origin \n) \nSELECT * FROM bus_dst;\n \n+------------+\n| dst |\n+------------+\n| New York |\n| Boston |\n| Washington |\n| Raleigh |\n+------------+\n \nThe above example is computed as follows:\n \nFirst, the anchor data is calculated:\nStarting from New York\nBoston and Washington are added\n \nNext, the recursive part:\nStarting from Boston and then Washington\nRaleigh is added\nUNION excludes nodes that are already present.\n \nComputing paths - determining bus routes\n \nThis time, we are trying to get bus routes such as “New\nYork -> Washington -> Raleighâ€.\n \nUsing the same sample data as the previous example:\n \nWITH RECURSIVE paths (cur_path, cur_dest) AS (\n SELECT origin, origin FROM bus_routes WHERE origin=\'New\nYork\' \n UNION\n SELECT CONCAT(paths.cur_path, \',\', bus_routes.dst),\nbus_routes.dst \n FROM paths, bus_routes \n WHERE paths.cur_dest = bus_routes.origin AND \n LOCATE(bus_routes.dst, paths.cur_path)=0 \n) \nSELECT * FROM paths;\n \n+-----------------------------+------------+\n| cur_path | cur_dest |\n+-----------------------------+------------+\n| New York | New York |\n| New York,Boston | Boston |\n| New York,Washington | Washington |\n| New York,Washington,Boston | Boston |\n| New York,Washington,Raleigh | Raleigh |\n+-----------------------------+------------+\n \nCAST to avoid data truncation\n \nIn the following example, data is truncated because the\nresults are not specifically cast to a wide enough type:\n \nWITH RECURSIVE tbl AS (\n SELECT NULL AS col\n UNION\n SELECT \"THIS NEVER SHOWS UP\" AS col FROM tbl\n)\n+------+\n| col |\n+------+\n| NULL |\n| |\n+------+\n \nExplicitly use CAST to overcome this:\n \nWITH RECURSIVE tbl AS (\n SELECT CAST(NULL AS CHAR(50)) AS col\n UNION SELECT \"THIS NEVER SHOWS UP\" AS col FROM tbl\n) \nSELECT * FROM tbl;\n \n+---------------------+\n| col |\n+---------------------+\n| NULL |\n| THIS NEVER SHOWS UP |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/recursive-common-table-expressions-overview/','','https://mariadb.com/kb/en/recursive-common-table-expressions-overview/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (435,27,'REPLACE','Syntax\n------ \nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n \nOr:\n \nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [PARTITION (partition_list)]\n SET col={expr | DEFAULT}, ...\n \nOr:\n \nREPLACE [LOW_PRIORITY | DELAYED]\n [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]\n SELECT ...\n \nDescription\n----------- \n REPLACE works exactly like\n INSERT, except that if an old row in the table\n has the same value as a new row for a PRIMARY KEY or a\n UNIQUE index, the old row is deleted before the new row is\n inserted. If the table has more than one UNIQUE keys, it is\npossible that the new row conflicts with more than one row.\nIn this case, all conflicting rows will be deleted.\n \nThe table name can be specified in the form db_name.tbl_name\nor, if a default database is selected, in the form tbl_name\n(see Identifier Qualifiers). This allows to use REPLACE ...\nSELECT to copy rows between different databases.\n \nBasically it works like this:\n \nBEGIN;\nSELECT 1 FROM t1 WHERE key=# FOR UPDATE;\nIF found-row\n DELETE FROM t1 WHERE key=# ;\n INSERT INTO t1 VALUES (...);\nENDIF\nEND;\n \nThe above can be replaced with:\n \nREPLACE INTO t1 VALUES (...)\n \n REPLACE is a MariaDB/MySQL extension to the SQL standard.\nIt\n either inserts, or deletes and inserts. For other\nMariaDB/MySQL extensions to\n standard SQL --- that also handle duplicate values --- see\nIGNORE and INSERT ON DUPLICATE KEY UPDATE.\n \nNote that unless the table has a PRIMARY KEY or\n UNIQUE index, using a REPLACE statement\nmakes no sense. It becomes equivalent to INSERT, because\nthere is no index to be used to determine whether a new row\nduplicates another.\n \nValues for all columns are taken from the values specified\nin the\n REPLACE statement. Any missing columns are set to their\ndefault values, just as happens for INSERT. You cannot refer\nto values from the current row and use them in the new row.\nIf you use an\nassignment such as \'SET col = col + 1\', the\nreference to the column name on the right hand side is\ntreated as\n DEFAULT(col), so the assignment is equivalent to\n \'SET col = DEFAULT(col) + 1\'.\n \nTo use REPLACE, you must have both the\n INSERT and DELETE privileges\nfor the table.\n \nThere are some gotchas you should be aware of, before using\nREPLACE:\nIf there is an AUTO_INCREMENT field, a new value will be\ngenerated.\nIf there are foreign keys, ON DELETE action will be\nactivated by REPLACE.\nTriggers on DELETE and INSERT will be activated by REPLACE.\n \nTo avoid some of these behaviors, you can use INSERT ... ON\nDUPLICATE KEY UPDATE.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nThis statement activates INSERT and DELETE triggers. See\nTrigger Overview for details.\n \n\n\nURL: https://mariadb.com/kb/en/replace/','','https://mariadb.com/kb/en/replace/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (436,27,'SELECT','Syntax\n------ \nSELECT\n [ALL | DISTINCT | DISTINCTROW]\n [HIGH_PRIORITY]\n [STRAIGHT_JOIN]\n [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]\n [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]\n select_expr [, select_expr ...]\n [ FROM table_references\n [WHERE where_condition]\n [GROUP BY {col_name | expr | position} [ASC | DESC], ...\n[WITH ROLLUP]]\n [HAVING where_condition]\n [ORDER BY {col_name | expr | position} [ASC | DESC], ...]\n [LIMIT {[offset,] row_count | row_count OFFSET offset}]\n procedure|[PROCEDURE procedure_name(argument_list)]\n [INTO OUTFILE \'file_name\' [CHARACTER SET charset_name]\n[export_options]\n \nINTO DUMPFILE \'file_name\' | INTO var_name [, var_name] ] |\n\n \n [[FOR UPDATE | LOCK IN SHARE MODE] [WAIT n | NOWAIT] ] ]\n \nexport_options:\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n \nDescription\n----------- \nSELECT is used to retrieve rows selected from one or more\ntables, and can include UNION statements and subqueries.\nEach select_expr expression indicates a column or data that\nyou want to retrieve. You\nmust have at least one select expression. See Select\nExpressions below.\n \nThe FROM clause indicates the table or tables from which to\nretrieve rows.\nUse either a single table name or a JOIN expression. See\nJOIN\nfor details. If no table is involved, FROM DUAL can be\nspecified.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\nEach table can also be specified as db_name.tabl_name. Each\ncolumn can also be specified as tbl_name.col_name or even\ndb_name.tbl_name.col_name. This allows to write queries\nwhich involve multiple databases. See Identifier Qualifiers\nfor syntax details.\n \nThe WHERE clause, if given, indicates the condition or\n conditions that rows must satisfy to be selected.\n where_condition is an expression that evaluates to true for\n each row to be selected. The statement selects all rows if\nthere is no WHERE\n clause.\nIn the WHERE clause, you can use any of the functions and\n operators that MariaDB supports, except for aggregate\n(summary) functions. See Functions and Operators and\nFunctions and Modifiers for use with GROUP BY (aggregate).\n \nUse the ORDER BY clause to order the results.\n \nUse the LIMIT clause allows you to restrict the results to\nonly\na certain number of rows, optionally with an offset.\n \nUse the GROUP BY and HAVING clauses to group\nrows together when they have columns or computed values in\ncommon.\n \nSELECT can also be used to retrieve rows computed without\nreference to\nany table.\n \nSelect Expressions\n \nA SELECT statement must contain one or more select\nexpressions, separated\nby commas. Each select expression can be one of the\nfollowing:\nThe name of a column.\nAny expression using functions and operators.\n* to select all columns from all tables in the FROM clause.\ntbl_name.* to select all columns from just the table\ntbl_name.\n \nWhen specifying a column, you can either use just the column\nname or qualify the column\nname with the name of the table using tbl_name.col_name. The\nqualified form is\nuseful if you are joining multiple tables in the FROM\nclause. If you do not qualify the\ncolumn names when selecting from multiple tables, MariaDB\nwill try to find the column in\neach table. It is an error if that column name exists in\nmultiple tables.\n \nYou can quote column names using backticks. If you are\nqualifying column names\nwith table names, quote each part separately as\n`tbl_name`.`col_name`.\n \nIf you use any grouping functions\nin any of the select expressions, all rows in your results\nwill be implicitly grouped, as if\nyou had used GROUP BY NULL.\n \nDISTINCT\n \nA query may produce some identical rows. By default, all\nrows are retrieved, even when their values are the same. To\nexplicitly specify that you want to retrieve identical rows,\nuse the ALL option. If you want duplicates to be removed\nfrom the resultset, use the DISTINCT option. DISTINCTROW is\na synonym for DISTINCT. See also COUNT DISTINCT and SELECT\nUNIQUE in Oracle mode.\n \nINTO\n \nThe INTO clause is used to specify that the query results\nshould be written to a file or variable.\nSELECT INTO OUTFILE - formatting and writing the result to\nan external file.\nSELECT INTO DUMPFILE - binary-safe writing of the\nunformatted results to an external file.\nSELECT INTO Variable - selecting and setting variables.\n \nThe reverse of SELECT INTO OUTFILE is LOAD DATA.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nPROCEDURE\n \nPasses the whole result set to a C Procedure. See PROCEDURE\nand PROCEDURE ANALYSE (the only built-in procedure not\nrequiring the server to be recompiled).\n \n\nmax_statement_time clause\n \nBy using max_statement_time in conjunction with SET\nSTATEMENT, it is possible to limit the execution time of\nindividual queries. For example:\n \nSET STATEMENT max_statement_time=100 FOR \n SELECT field1 FROM table_name ORDER BY field1;\n \n\n\nURL: https://mariadb.com/kb/en/select/','','https://mariadb.com/kb/en/select/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (437,27,'SELECT INTO DUMPFILE','Syntax\n------ \nSELECT ... INTO DUMPFILE \'file_path\'\n \nDescription\n----------- \nSELECT ... INTO DUMPFILE is a SELECT clause which writes the\nresultset into a single unformatted row, without any\nseparators, in a file. The results will not be returned to\nthe client.\n \nfile_path can be an absolute path, or a relative path\nstarting from the data directory. It can only be specified\nas a string literal, not as a variable. However, the\nstatement can be dynamically composed and executed as a\nprepared statement to work around this limitation.\n \nThis statement is binary-safe and so is particularly useful\nfor writing BLOB values to file. It can be used, for\nexample, to copy an image or an audio document from the\ndatabase to a file. SELECT ... INTO FILE can be used to save\na text file.\n \nThe file must not exist. It cannot be overwritten. A user\nneeds the FILE privilege to run this statement. Also,\nMariaDB needs permission to write files in the specified\nlocation. If the secure_file_priv system variable is set to\na non-empty directory name, the file can only be written to\nthat directory.\n \nSince MariaDB 5.1, the character_set_filesystem system\nvariable has controlled interpretation of file names that\nare given as literal strings.\n \nExample\n \nSELECT _utf8\'Hello world!\' INTO DUMPFILE \'/tmp/world\';\n \nSELECT LOAD_FILE(\'/tmp/world\') AS world;\n \n+--------------+\n| world |\n+--------------+\n| Hello world! |\n+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/select-into-dumpfile/','','https://mariadb.com/kb/en/select-into-dumpfile/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (438,27,'SELECT INTO OUTFILE','Syntax\n------ \nSELECT ... INTO OUTFILE \'file_name\'\n [CHARACTER SET charset_name]\n [export_options]\n \nexport_options:\n [{FIELDS | COLUMNS}\n [TERMINATED BY \'string\']\n [[OPTIONALLY] ENCLOSED BY \'char\']\n [ESCAPED BY \'char\']\n ]\n [LINES\n [STARTING BY \'string\']\n [TERMINATED BY \'string\']\n ]\n \nDescription\n----------- \nSELECT INTO OUTFILE writes the resulting rows to a file, and\nallows the use of column and row terminators to specify a\nparticular output format. The default is to terminate fields\nwith tabs (\\t) and lines with newlines (\\n).\n \nThe file must not exist. It cannot be overwritten. A user\nneeds the FILE privilege to run this statement. Also,\nMariaDB needs permission to write files in the specified\nlocation. If the secure_file_priv system variable is set to\na non-empty directory name, the file can only be written to\nthat directory.\n \nThe LOAD DATA INFILE statement complements SELECT INTO\nOUTFILE.\n \nCharacter-sets\n \nThe CHARACTER SET clause specifies the character set in\nwhich the results are to be written. Without the clause, no\nconversion takes place (the binary character set). In this\ncase, if there are multiple character sets, the output will\ncontain these too, and may not easily be able to be\nreloaded.\n \nIn cases where you have two servers using different\ncharacter-sets, using SELECT INTO OUTFILE to transfer data\nfrom one to the other can have unexpected results. To ensure\nthat MariaDB correctly interprets the escape sequences, use\nthe CHARACTER SET clause on both the SELECT INTO OUTFILE\nstatement and the subsequent LOAD DATA INFILE statement.\n \nExample\n \nThe following example produces a file in the CSV format:\n \nSELECT customer_id, firstname, surname INTO OUTFILE\n\'/exportdata/customers.txt\'\n FIELDS TERMINATED BY \',\' OPTIONALLY ENCLOSED BY \'\"\'\n LINES TERMINATED BY \'\\n\'\n FROM customers;\n \n\n\nURL: https://mariadb.com/kb/en/select-into-outfile/','','https://mariadb.com/kb/en/select-into-outfile/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (439,27,'SELECT WITH ROLLUP','Syntax\n------ \nSee SELECT for the full syntax.\n \nDescription\n----------- \nThe WITH ROLLUP modifier adds extra rows to the resultset\nthat represent super-aggregate summaries. The\nsuper-aggregated column is represented by a NULL value.\nMultiple aggregates over different columns will be added if\nthere are multiple GROUP BY columns.\n \nThe LIMIT clause can be used at the same time, and is\napplied after the WITH ROLLUP rows have been added.\n \nWITH ROLLUP cannot be used with ORDER BY. Some sorting is\nstill possible by using ASC or DESC clauses with the GROUP\nBY column, although the super-aggregate rows will always be\nadded last.\n \nExamples\n-------- \nThese examples use the following sample table\n \nCREATE TABLE booksales ( \n country VARCHAR(35), genre\nENUM(\'fiction\',\'non-fiction\'), year YEAR, sales INT);\n \nINSERT INTO booksales VALUES\n (\'Senegal\',\'fiction\',2014,12234),\n(\'Senegal\',\'fiction\',2015,15647),\n (\'Senegal\',\'non-fiction\',2014,64980),\n(\'Senegal\',\'non-fiction\',2015,78901),\n (\'Paraguay\',\'fiction\',2014,87970),\n(\'Paraguay\',\'fiction\',2015,76940),\n (\'Paraguay\',\'non-fiction\',2014,8760),\n(\'Paraguay\',\'non-fiction\',2015,9030);\n \nThe addition of the WITH ROLLUP modifier in this example\nadds an extra row that aggregates both years:\n \nSELECT year, SUM(sales) FROM booksales GROUP BY year;\n \n+------+------------+\n| year | SUM(sales) |\n+------+------------+\n| 2014 | 173944 |\n| 2015 | 180518 |\n+------+------------+\n2 rows in set (0.08 sec)\n \nSELECT year, SUM(sales) FROM booksales GROUP BY year WITH\nROLLUP;\n \n+------+------------+\n| year | SUM(sales) |\n+------+------------+\n| 2014 | 173944 |\n| 2015 | 180518 |\n| NULL | 354462 |\n+------+------------+\n \nIn the following example, each time the genre, the year or\nthe country change, another super-aggregate row is added:\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year, genre;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2015 | fiction | 76940 |\n| Paraguay | 2015 | non-fiction | 9030 |\n| Senegal | 2014 | fiction | 12234 |\n| Senegal | 2014 | non-fiction | 64980 |\n| Senegal | 2015 | fiction | 15647 |\n| Senegal | 2015 | non-fiction | 78901 |\n+----------+------+-------------+------------+\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year, genre WITH ROLLUP;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2014 | NULL | 96730 |\n| Paraguay | 2015 | fiction | 76940 |\n| Paraguay | 2015 | non-fiction | 9030 |\n| Paraguay | 2015 | NULL | 85970 |\n| Paraguay | NULL | NULL | 182700 |\n| Senegal | 2014 | fiction | 12234 |\n| Senegal | 2014 | non-fiction | 64980 |\n| Senegal | 2014 | NULL | 77214 |\n| Senegal | 2015 | fiction | 15647 |\n| Senegal | 2015 | non-fiction | 78901 |\n| Senegal | 2015 | NULL | 94548 |\n| Senegal | NULL | NULL | 171762 |\n| NULL | NULL | NULL | 354462 |\n+----------+------+-------------+------------+\n \nThe LIMIT clause, applied after WITH ROLLUP:\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year, genre WITH ROLLUP\nLIMIT 4;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2014 | NULL | 96730 |\n| Paraguay | 2015 | fiction | 76940 |\n+----------+------+-------------+------------+\n \nSorting by year descending:\n \nSELECT country, year, genre, SUM(sales) \n FROM booksales GROUP BY country, year DESC, genre WITH\nROLLUP;\n \n+----------+------+-------------+------------+\n| country | year | genre | SUM(sales) |\n+----------+------+-------------+------------+\n| Paraguay | 2015 | fiction | 76940 |\n| Paraguay | 2015 | non-fiction | 9030 |\n| Paraguay | 2015 | NULL | 85970 |\n| Paraguay | 2014 | fiction | 87970 |\n| Paraguay | 2014 | non-fiction | 8760 |\n| Paraguay | 2014 | NULL | 96730 |\n| Paraguay | NULL | NULL | 182700 |\n| Senegal | 2015 | fiction | 15647 |\n| Senegal | 2015 | non-fiction | 78901 |\n| Senegal | 2015 | NULL | 94548 |\n| Senegal | 2014 | fiction | 12234 |\n| Senegal | 2014 | non-fiction | 64980 |\n| Senegal | 2014 | NULL | 77214 |\n| Senegal | NULL | NULL | 171762 |\n| NULL | NULL | NULL | 354462 |\n+----------+------+-------------+------------+\n \n\n\nURL: https://mariadb.com/kb/en/select-with-rollup/','','https://mariadb.com/kb/en/select-with-rollup/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (440,27,'UNION','UNION is used to combine the results from multiple SELECT\nstatements into a single result set.\n \nSyntax\n------ \nSELECT ...\nUNION [ALL | DISTINCT] SELECT ...\n[UNION [ALL | DISTINCT] SELECT ...]\n[ORDER BY [column [, column ...]]]\n[LIMIT {[offset,] row_count | row_count OFFSET offset}]\n \nDescription\n----------- \nUNION is used to combine the results from multiple SELECT\nstatements into a single result set.\n \nThe column names from the first SELECT statement are used as\nthe column names for the results returned. Selected columns\nlisted in corresponding positions of each SELECT statement\nshould have the same data type. (For example, the first\ncolumn selected by the first statement should have the same\ntype as the first column selected by the other statements.)\n \nIf they don\'t, the type and length of the columns in the\nresult take into account the values returned by all of the\nSELECTs, so there is no need for explicit casting. Note that\ncurrently this is not the case for recursive CTEs - see\nMDEV-12325.\n \nTable names can be specified as db_name.tbl_name. This\npermits writing UNIONs which involve multiple databases. See\nIdentifier Qualifiers for syntax details.\n \nUNION queries cannot be used with aggregate functions.\n \nALL/DISTINCT\n \nThe ALL keyword causes duplicate rows to be preserved. The\nDISTINCT keyword (the default if the keyword is omitted)\ncauses duplicate rows to be removed by the results.\n \nUNION ALL and UNION DISTINCT can both be present in a query.\nIn this case, UNION DISTINCT will override any UNION ALLs to\nits left.\n \nUntil MariaDB 10.1.1, all UNION ALL statements required the\nserver to create a temporary table. Since MariaDB 10.1.1,\nthe server can in most cases execute UNION ALL without\ncreating a temporary table, improving performance (see\nMDEV-334).\n \nORDER BY and LIMIT\n \nIndividual SELECTs can contain their own ORDER BY and LIMIT\nclauses. In this case, the individual queries need to be\nwrapped between parentheses. However, this does not affect\nthe order of the UNION, so they only are useful to limit the\nrecord read by one SELECT.\n \nThe UNION can have global ORDER BY and LIMIT clauses, which\naffect the whole resultset. If the columns retrieved by\nindividual SELECT statements have an alias (AS), the ORDER\nBY must use that alias, not the real column names.\n \nHIGH_PRIORITY\n \nSpecifying a query as HIGH_PRIORITY will not work inside a\nUNION. If applied to the first SELECT, it will be ignored.\nApplying to a later SELECT results in a syntax error:\n \nERROR 1234 (42000): Incorrect usage/placement of\n\'HIGH_PRIORITY\'\n \nSELECT ... INTO ...\n \nIndividual SELECTs cannot be written INTO DUMPFILE or INTO\nOUTFILE. If the last SELECT statement specifies INTO\nDUMPFILE or INTO OUTFILE, the entire result of the UNION\nwill be written. Placing the clause after any other SELECT\nwill result in a syntax error.\n \nIf the result is a single row, SELECT ... INTO @var_name can\nalso be used.\n \n\nParentheses\n \nFrom MariaDB 10.4.0, parentheses can be used to specify\nprecedence. Before this, a syntax error would be returned.\n \nExamples\n-------- \nUNION between tables having different column names:\n \n(SELECT e_name AS name, email FROM employees)\nUNION\n(SELECT c_name AS name, email FROM customers);\n \nSpecifying the UNION\'s global order and limiting total\nrows:\n \n(SELECT name, email FROM employees)\nUNION\n(SELECT name, email FROM customers)\nORDER BY name LIMIT 10;\n \nAdding a constant row:\n \n(SELECT \'John Doe\' AS name, \'john.doe@example.net\' AS\nemail)\nUNION\n(SELECT name, email FROM customers);\n \nDiffering types:\n \nSELECT CAST(\'x\' AS CHAR(1)) UNION SELECT REPEAT(\'y\',4);\n+----------------------+\n| CAST(\'x\' AS CHAR(1)) |\n+----------------------+\n| x |\n| yyyy |\n+----------------------+\n \nReturning the results in order of each individual SELECT by\nuse of a sort column:\n \n(SELECT 1 AS sort_column, e_name AS name, email FROM\nemployees)\nUNION\n(SELECT 2, c_name AS name, email FROM customers) ORDER BY\nsort_column;\n \nDifference between UNION, EXCEPT and INTERSECT:\n \nCREATE TABLE seqs (i INT);\nINSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 5 |\n| 6 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 1 |\n| 2 |\n+------+\n \nSELECT i FROM seqs WHERE i =3;\n \n+------+\n| i |\n+------+\n| 3 |\n+------+\n \nParentheses for specifying precedence, from MariaDB 10.4.0\n \nCREATE OR REPLACE TABLE t1 (a INT);\nCREATE OR REPLACE TABLE t2 (b INT);\nCREATE OR REPLACE TABLE t3 (c INT);\n \nINSERT INTO t1 VALUES (1),(2),(3),(4);\nINSERT INTO t2 VALUES (5),(6);\nINSERT INTO t3 VALUES (1),(6);\n \n((SELECT a FROM t1) UNION (SELECT b FROM t2)) INTERSECT\n(SELECT c FROM t3);\n+------+\n| a |\n+------+\n| 1 |\n| 6 |\n+------+\n \n(SELECT a FROM t1) UNION ((SELECT b FROM t2) INTERSECT\n(SELECT c FROM t3));\n+------+\n| a |\n+------+\n| 1 |\n| 2 |\n| 3 |\n| 4 |\n| 6 |\n+------+\n \n\n\nURL: https://mariadb.com/kb/en/union/','','https://mariadb.com/kb/en/union/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (441,27,'UPDATE','Syntax\n------ \nSingle-table syntax:\n \nUPDATE [LOW_PRIORITY] [IGNORE] table_reference \n [PARTITION (partition_list)]\n SET col1={expr1|DEFAULT} [,col2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n [ORDER BY ...]\n [LIMIT row_count]\n \nMultiple-table syntax:\n \nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n SET col1={expr1|DEFAULT} [, col2={expr2|DEFAULT}] ...\n [WHERE where_condition]\n \nDescription\n----------- \nFor the single-table syntax, the UPDATE statement updates\ncolumns of existing rows in the named table with new values.\nThe\nSET clause indicates which columns to modify and the values\nthey should be given. Each value can be given as an\nexpression, or the keyword\nDEFAULT to set a column explicitly to its default value. The\nWHERE clause, if given, specifies the conditions that\nidentify\nwhich rows to update. With no WHERE clause, all rows are\nupdated. If the ORDER BY clause is specified, the rows are\nupdated in the order that is specified. The LIMIT clause\nplaces a limit on the number of rows that can be updated.\n \nThe PARTITION clause was introduced in MariaDB 10.0. See\nPartition Pruning and Selection for details.\n \nUntil MariaDB 10.3.2, for the multiple-table syntax, UPDATE\nupdates rows in each\ntable named in table_references that satisfy the conditions.\nIn this case,\nORDER BY and LIMIT cannot be used. This restriction was\nlifted in MariaDB 10.3.2 and both clauses can be used with\nmultiple-table updates. An UPDATE can also reference tables\nwhich are located in different databases; see Identifier\nQualifiers for the syntax.\n \nwhere_condition is an expression that evaluates to true for\neach row to be updated.\n \ntable_references and where_condition are as\nspecified as described in SELECT.\n \nAssignments are evaluated in left-to-right order, unless the\nSIMULTANEOUS_ASSIGNMENT sql_mode (available from MariaDB\n10.3.5) is set, in which case the UPDATE statement evaluates\nall assignments simultaneously. \n \nYou need the UPDATE privilege only for columns referenced in\nan UPDATE that are actually updated. You need only the\nSELECT privilege for any columns that are read but\nnot modified. See GRANT.\n \nThe UPDATE statement supports the following modifiers:\nIf you use the LOW_PRIORITY keyword, execution of\n the UPDATE is delayed until no other clients are reading\nfrom\n the table. This affects only storage engines that use only\ntable-level\n locking (MyISAM, MEMORY, MERGE). See HIGH_PRIORITY and\nLOW_PRIORITY clauses for details.\nIf you use the IGNORE keyword, the update statement does \n not abort even if errors occur during the update. Rows for\nwhich\n duplicate-key conflicts occur are not updated. Rows for\nwhich columns are\n updated to values that would cause data conversion errors\nare updated to the\n closest valid values instead.\n \nUPDATE Statements With the Same Source and Target\n \nFrom MariaDB 10.3.2, UPDATE statements may have the same\nsource and target.\n \nFor example, given the following table:\n \nDROP TABLE t1;\n \nCREATE TABLE t1 (c1 INT, c2 INT);\nINSERT INTO t1 VALUES (10,10), (20,20);\n \nUntil MariaDB 10.3.1, the following UPDATE statement would\nnot work:\n \nUPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);\nERROR 1093 (HY000): Table \'t1\' is specified twice, \n both as a target for \'UPDATE\' and as a separate source\nfor data\n \nFrom MariaDB 10.3.2, the statement executes successfully:\n \nUPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);\n \nSELECT * FROM t1;\n \n+------+------+\n| c1 | c2 |\n+------+------+\n| 10 | 10 |\n| 21 | 20 |\n+------+------+\n \nExample\n \nSingle-table syntax:\n \nUPDATE table_name SET column1 = value1, column2 = value2\nWHERE id=100;\n \nMultiple-table syntax:\n \nUPDATE tab1, tab2 SET tab1.column1 = value1, tab1.column2 =\nvalue2 WHERE tab1.id = tab2.id;\n \n\n\nURL: https://mariadb.com/kb/en/update/','','https://mariadb.com/kb/en/update/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (442,27,'WITH','The WITH keyword signifies a Common Table Expression (CTE).\nIt allows you to refer to a subquery expression many times\nin a query, as if having a temporary table that only exists\nfor the duration of a query.\n \nThere are two kinds of CTEs:\nNon-Recursive\nRecursive\n \nCommon Table Expression WITH was introduced in MariaDB\n10.2.1.\n \nRecursive WITH has been supported since MariaDB 10.2.2.\n \nSyntax\n------ \nWITH [RECURSIVE] table_reference as (SELECT ...)\n SELECT ...\n \nYou can use table_reference as any normal table in the\nexternal SELECT part. You can also use WITH in sub queries.\nWITH can also be used with EXPLAIN and SELECT.\n \nBelow is an example with the WITH at the top level:\n \nWITH t AS (SELECT a FROM t1 WHERE b >= \'c\') \n SELECT * FROM t2, t WHERE t2.c = t.a;\n \nThe example below uses WITH in a subquery:\n \nSELECT t1.a, t1.b FROM t1, t2\n WHERE t1.a > t2.c \n AND t2.c IN(WITH t AS (SELECT * FROM t1 WHERE t1.a \n\nURL: https://mariadb.com/kb/en/with/','','https://mariadb.com/kb/en/with/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (443,28,'DESCRIBE','Syntax\n------ \n{DESCRIBE | DESC} tbl_name [col_name | wild]\n \nDescription\n----------- \nDESCRIBE provides information about the columns in a table.\nIt is a shortcut for SHOW COLUMNS FROM.\nThese statements also display information for views.\n \ncol_name can be a column name, or a string containing the\nSQL \"%\" and \"_\" wildcard characters to\nobtain output only for the columns with names matching the\nstring. There is no\nneed to enclose the string within quotes unless it contains\nspaces or other\nspecial characters.\n \nDESCRIBE city;\n \n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | YES | | NULL | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | YES | | NULL | |\n+------------+----------+------+-----+---------+----------------+\n \nThe description for SHOW COLUMNS provides\nmore information about the output columns.\n \n\n\nURL: https://mariadb.com/kb/en/describe/','','https://mariadb.com/kb/en/describe/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (444,28,'ANALYZE Statement','The ANALYZE statement was introduced in MariaDB 10.1.0.\n \nDescription\n----------- \nThe ANALYZE statement is similar to the EXPLAIN statement.\nANALYZE statement will invoke the optimizer, execute the\nstatement, and then produce EXPLAIN output instead of the\nresult set. The EXPLAIN output will be annotated with\nstatistics from statement execution.\n \nThis lets one check how close the optimizer\'s estimates\nabout the query plan are to the reality. ANALYZE produces an\noverview, while the\nANALYZE FORMAT=JSON command provides a more detailed view of\nthe query plan and the query execution.\n \nThe syntax is \n \nANALYZE explainable_statement;\n \nwhere the statement is any statement for which one can run\nEXPLAIN.\n \nCommand Output\n \nConsider an example:\n \nANALYZE SELECT * FROM tbl1 \nWHERE key1 \n BETWEEN 10 AND 200 AND \n col1 LIKE \'foo%\'\\G\n \n*************************** 1. row\n***************************\n id: 1\n select_type: SIMPLE\n table: tbl1\n type: range\npossible_keys: key1\n key: key1\n key_len: 5\n ref: NULL\n rows: 181\n r_rows: 181\n filtered: 100.00\n r_filtered: 10.50\n Extra: Using index condition; Using where\n \nCompared to EXPLAIN, ANALYZE produces two extra columns:\nr_rows is an observation-based counterpart of the rows\ncolumn. It shows how many rows were actually read from the\ntable. \nr_filtered is an observation-based counterpart of the\nfiltered column. It shows which fraction of rows was left\nafter applying the WHERE condition.\n \nInterpreting the Output\n \nJoins\n \nLet\'s consider a more complicated example.\n \nANALYZE SELECT *\nFROM orders, customer \nWHERE\n customer.c_custkey=orders.o_custkey AND\n customer.c_acctbal 200*1000\n \n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | r_rows | filtered | r_filtered |\nExtra |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| 1 | SIMPLE | customer | ALL | PRIMARY,... | NULL | NULL |\nNULL | 149095 | 150000 | 18.08 | 9.13 | Using where |\n| 1 | SIMPLE | orders | ref | i_o_custkey | i_o_custkey | 5\n| customer.c_custkey | 7 | 10 | 100.00 | 30.03 | Using where\n|\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n \nHere, one can see that\nFor table customer, customer.rows=149095,\ncustomer.r_rows=150000. The estimate for number of rows we\nwill read was fairly precise\ncustomer.filtered=18.08, customer.r_filtered=9.13. The\noptimizer somewhat overestimated the number of records that\nwill match selectivity of condition attached to `customer`\ntable (in general, when you have a full scan and r_filtered\nis less than 15%, it\'s time to consider adding an\nappropriate index).\nFor table orders, orders.rows=7, orders.r_rows=10. This\nmeans that on average, there are 7 orders for a given\nc_custkey, but in our case there were 10, which is close to\nthe expectation (when this number is consistently far from\nthe expectation, it may be time to run ANALYZE TABLE, or\neven edit the table statistics manually to get better query\nplans).\norders.filtered=100, orders.r_filtered=30.03. The optimizer\ndidn\'t have any way to estimate which fraction of records\nwill be left after it checks the condition that is attached\nto table orders (it\'s orders.o_totalprice > 200*1000). So,\nit used 100%. In reality, it is 30%. 30% is typically not\nselective enough to warrant adding new indexes. For joins\nwith many tables, it might be worth to collect and use\ncolumn statistics for columns in question, this may help the\noptimizer to pick a better query plan.\n \nMeaning of NULL in r_rows and r_filtered\n \nLet\'s modify the previous example slightly\n \nANALYZE SELECT * \nFROM orders, customer \nWHERE\n customer.c_custkey=orders.o_custkey AND\n customer.c_acctbal 200*1000;\n \n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | r_rows | filtered | r_filtered |\nExtra |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n| 1 | SIMPLE | customer | ALL | PRIMARY,... | NULL | NULL |\nNULL | 149095 | 150000 | 18.08 | 0.00 | Using where |\n| 1 | SIMPLE | orders | ref | i_o_custkey | i_o_custkey | 5\n| customer.c_custkey | 7 | NULL | 100.00 | NULL | Using\nwhere |\n+----+-------------+----------+------+---------------+-------------+---------+--------------------+--------+--------+----------+------------+-------------+\n \nHere, one can see that orders.r_rows=NULL and\norders.r_filtered=NULL. This means that table orders was not\nscanned even once. \nIndeed, we can also see customer.r_filtered=0.00. This shows\nthat a part of WHERE attached to table `customer` was never\nsatisfied (or, satisfied in less than 0.01% of cases).\n \nANALYZE FORMAT=JSON\n \nANALYZE FORMAT=JSON produces JSON output. It produces much\nmore information than tabular ANALYZE.\n \nNotes\n \nANALYZE UPDATE or ANALYZE DELETE will actually make\nupdates/deletes (ANALYZE SELECT will perform the select\noperation and then discard the resultset).\nPostgreSQL has a similar command, EXPLAIN ANALYZE.\nThe EXPLAIN in the slow query log feature allows MariaDB to\nhave ANALYZE output of slow queries printed into the slow\nquery log (see MDEV-6388).\n \n\n\nURL: https://mariadb.com/kb/en/analyze-statement/','','https://mariadb.com/kb/en/analyze-statement/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (445,28,'EXPLAIN','Syntax\n------ \nEXPLAIN tbl_name\n \nOr\n \nEXPLAIN [EXTENDED | PARTITIONS] \n {SELECT select_options | UPDATE update_options | DELETE\ndelete_options}\n \nDescription\n----------- \nThe EXPLAIN statement can be used either as a synonym for\nDESCRIBE or as a way to obtain information about how MariaDB\nexecutes a SELECT (as well as UPDATE and DELETE since\nMariaDB 10.0.5) statement:\n\'EXPLAIN tbl_name\' is synonymous with \n \'DESCRIBE tbl_name\' or \n \'SHOW COLUMNS FROM tbl_name\'.\nWhen you precede a SELECT statement (or, since MariaDB\n10.0.5, an UPDATE or a DELETE as well) with the keyword \n EXPLAIN, MariaDB displays information from the optimizer\n about the query execution plan. That is, MariaDB explains\nhow it would\n process the SELECT, UPDATE or DELETE, including information\nabout how tables\n are joined and in which order. EXPLAIN EXTENDED can be\n used to provide additional information.\nEXPLAIN PARTITIONS has been available since MySQL 5.1.5. It\nis useful only when examining queries involving partitioned\ntables. For details, see Partition pruning and selection.\nANALYZE statement, which performs the query as well as\nproducing EXPLAIN output, and provides actual as well as\nestimated statistics, has been available from MariaDB\n10.1.0.\nSince MariaDB 10.0.5, it has been possible to have EXPLAIN\noutput printed in the slow query log. See EXPLAIN in the\nSlow Query Log for details.\n \nSince MariaDB 10.0, SHOW EXPLAIN shows the output of a\nrunning statement. In some cases, its output can be closer\nto reality than EXPLAIN.\n \nSince MariaDB 10.1, the ANALYZE statement runs a statement\nand returns information about its execution plan. It also\nshows additional columns, to check how much the optimizer\'s\nestimation about filtering and found rows are close to\nreality.\n \nThere is an online EXPLAIN Analyzer that you can use to\nshare EXPLAIN and EXPLAIN EXTENDED output with others.\n \nEXPLAIN can acquire metadata locks in the same way that\nSELECT does, as it needs to know table metadata and,\nsometimes, data as well.\n \nThe columns in EXPLAIN ... SELECT\n \nColumn name | Description | \n \nid | Sequence number that shows in which order tables are\njoined. | \n \nselect_type | What kind of SELECT the table comes from. | \n \ntable | Alias name of table. Materialized temporary tables\nfor sub queries are named | \n \ntype | How rows are found from the table (join type). | \n \npossible_keys | keys in table that could be used to find\nrows in the table | \n \nkey | The name of the key that is used to retrieve rows.\nNULL is no key was used. | \n \nkey_len | How many bytes of the key that was used (shows if\nwe are using only parts of the multi-column key). | \n \nref | The reference that is used to as the key value. | \n \nrows | An estimate of how many rows we will find in the\ntable for each key lookup. | \n \nExtra | Extra information about this join. | \n \nHere are descriptions of the values for some of the more\ncomplex columns in EXPLAIN ... SELECT:\n \n\"select_type\" column\n \nThe select_type column can have the following values:\n \nValue | Description | \n \nDEPENDENT SUBQUERY | The SUBQUERY is DEPENDENT. | \n \nDEPENDENT UNION | The UNION is DEPENDENT. | \n \nDERIVED | The SELECT is DERIVED from the PRIMARY. | \n \nMATERIALIZED | The SUBQUERY is MATERIALIZED. | \n \nPRIMARY | The SELECT is a PRIMARY one. | \n \nSIMPLE | The SELECT is a SIMPLE one. | \n \nSUBQUERY | The SELECT is a SUBQUERY of the PRIMARY. | \n \nUNCACHEABLE SUBQUERY | The SUBQUERY is UNCACHEABLE. | \n \nUNCACHEABLE UNION | The UNION is UNCACHEABLE. | \n \nUNION | The SELECT is a UNION of the PRIMARY. | \n \nUNION RESULT | The result of the UNION. | \n \n\"Type\" column\n \nThis column contains information on how the table is\naccessed.\n \nValue | Description | \n \nALL | A full table scan is done for the table (all rows are\nread). This is bad if the table is large and the table is\njoined against a previous table! This happens when the\noptimizer could not find any usable index to access rows. | \n \nconst | There is only one possibly matching row in the\ntable. The row is read before the optimization phase and all\ncolumns in the table are treated as constants. | \n \neq_ref | A unique index is used to find the rows. This is\nthe best possible plan to find the row. | \n \nfulltext | A fulltext index is used to access the rows. | \n \nindex_merge | A \'range\' access is done for for several\nindex and the found rows are merged. The key column shows\nwhich keys are used. | \n \nindex_subquery | This is similar as ref, but used for sub\nqueries that are transformed to key lookups. | \n \nindex | A full scan over the used index. Better than ALL but\nstill bad if index is large and the table is joined against\na previous table. | \n \nrange | The table will be accessed with a key over one or\nmore value ranges. | \n \nref_or_null | Like \'ref\' but in addition another search\nfor the \'null\' value is done if the first value was not\nfound. This happens usually with sub queries. | \n \nref | A non unique index or prefix of an unique index is\nused to find the rows. Good if the prefix doesn\'t match\nmany rows. | \n \nsystem | The table has 0 or 1 rows. | \n \nunique_subquery | This is similar as eq_ref, but used for\nsub queries that are transformed to key lookups | \n \n\"Extra\" column\n \nThis column consists of one or more of the following values,\nseparated by \';\'\n \n Note that some of these values are detected after the\noptimization phase.\n \nThe optimization phase can do the following changes to the\nWHERE clause:\nAdd the expressions from the ON and USING clauses to the\nWHERE\n clause.\nConstant propagation: If there is column=constant, replace\nall column\n instances with this constant.\nReplace all columns from \'const\' tables with their values.\nRemove the used key columns from the WHERE (as this will be\ntested as\n part of the key lookup).\nRemove impossible constant sub expressions.\n For example WHERE \'(a=1 and a=2) OR b=1\' becomes \'b=1\'.\nReplace columns with other columns that has identical\nvalues:\n Example: WHERE a=b and a=c may be treated\n as \'WHERE a=b and a=c and b=c\'.\nAdd extra conditions to detect impossible row conditions\nearlier. This\n happens mainly with OUTER JOIN where we in some cases add\ndetection\n of NULL values in the WHERE (Part of \'Not exists\'\noptimization).\n This can cause an unexpected \'Using where\' in the Extra\ncolumn.\nFor each table level we remove expressions that have already\nbeen tested when\n we read the previous row. Example: When joining tables t1\nwith t2\n using the following WHERE \'t1.a=1 and t1.a=t2.b\', we\ndon\'t have to\n test \'t1.a=1\' when checking rows in t2 as we already know\nthat this\n expression is true. \n \nValue | Description | \n \nconst row not found | The table was a system table (a table\nwith should exactly one row), but no row was found. | \n \nDistinct | If distinct optimization (remove duplicates) was\nused. This is marked only for the last table in the SELECT.\n| \n \nFull scan on NULL key | The table is a part of the sub query\nand if the value that is used to match the sub query will be\nNULL, we will do a full table scan. | \n \nImpossible HAVING | The used HAVING clause is always false\nso the SELECT will return no rows. | \n \nImpossible WHERE noticed after reading const tables. | The\nused WHERE clause is always false so the SELECT will return\nno rows. This case was detected after we had read all\n\'const\' tables and used the column values as constant in\nthe WHERE clause. For example: WHERE const_column=5 and\nconst_column had a value of 4. | \n \nImpossible WHERE | The used WHERE clause is always false so\nthe SELECT will return no rows. For example: WHERE 1=2 | \n \nNo matching min/max row | During early optimization of\nMIN()/MAX() values it was detected that no row could match\nthe WHERE clause. The MIN()/MAX() function will return NULL.\n| \n \nno matching row in const table | The table was a const table\n(a table with only one possible matching row), but no row\nwas found. | \n \nNo tables used | The SELECT was a sub query that did not use\nany tables. For example a there was no FROM clause or a FROM\nDUAL clause. | \n \nNot exists | Stop searching after more row if we find one\nsingle matching row. This optimization is used with LEFT\nJOIN where one is explicitly searching for rows that\ndoesn\'t exists in the LEFT JOIN TABLE. Example: SELECT *\nFROM t1 LEFT JOIN t2 on (...) WHERE t2.not_null_column IS\nNULL. As t2.not_null_column can only be NULL if there was no\nmatching row for on condition, we can stop searching if we\nfind a single matching row. | \n \nOpen_frm_only | For information_schema tables. Only the frm\n(table definition file was opened) was opened for each\nmatching row. | \n \nOpen_full_table | For information_schema tables. A full\ntable open for each matching row is done to retrieve the\nrequested information. (Slow) | \n \nOpen_trigger_only | For information_schema tables. Only the\ntrigger file definition was opened for each matching row. | \n \nRange checked for each record (index map: ...) | This only\nhappens when there was no good default index to use but\nthere may some index that could be used when we can treat\nall columns from previous table as constants. For each row\ncombination the optimizer will decide which index to use (if\nany) to fetch a row from this table. This is not fast, but\nfaster than a full table scan that is the only other choice.\nThe index map is a bitmask that shows which index are\nconsidered for each row condition. | \n \nScanned 0/1/all databases | For information_schema tables.\nShows how many times we had to do a directory scan. | \n \nSelect tables optimized away | All tables in the join was\noptimized away. This happens when we are only using\nCOUNT(*), MIN() and MAX() functions in the SELECT and we\nwhere able to replace all of these with constants. | \n \nSkip_open_table | For information_schema tables. The queried\ntable didn\'t need to be opened. | \n \nunique row not found | The table was detected to be a const\ntable (a table with only one possible matching row) during\nthe early optimization phase, but no row was found. | \n \nUsing filesort | Filesort is needed to resolve the query.\nThis means an extra phase where we first collect all columns\nto sort, sort them with a disk based merge sort and then use\nthe sorted set to retrieve the rows in sorted order. If the\ncolumn set is small, we store all the columns in the sort\nfile to not have to go to the database to retrieve them\nagain. | \n \nUsing index | Only the index is used to retrieve the needed\ninformation from the table. There is no need to perform an\nextra seek to retrieve the actual record. | \n \nUsing index condition | Like \'Using where\' but the where\ncondition is pushed down to the table engine for internal\noptimization at the index level. | \n \nUsing index condition(BKA) | Like \'Using index condition\'\nbut in addition we use batch key access to retrieve rows. | \n \nUsing index for group-by | The index is being used to\nresolve a GROUP BY or DISTINCT query. The rows are not read.\nThis is very efficient if the table has a lot of identical\nindex entries as duplicates are quickly jumped over. | \n \nUsing intersect(...) | For index_merge joins. Shows which\nindex are part of the intersect. | \n \nUsing join buffer | We store previous row combinations in a\nrow buffer to be able to match each row against all of the\nrows combinations in the join buffer at one go. | \n \nUsing sort_union(...) | For index_merge joins. Shows which\nindex are part of the union. | \n \nUsing temporary | A temporary table is created to hold the\nresult. This typically happens if you are using GROUP BY,\nDISTINCT or ORDER BY. | \n \nUsing where | A WHERE expression (in additional to the\npossible key lookup) is used to check if the row should be\naccepted. If you don\'t have \'Using where\' together with a\njoin type of ALL, you are probably doing something wrong! | \n \nUsing where with pushed condition | Like \'Using where\' but\nthe where condition is pushed down to the table engine for\ninternal optimization at the row level. | \n \nUsing buffer | The UPDATE statement will first buffer the\nrows, and then run the updates, rather than do updates on\nthe fly. See Using Buffer UPDATE Algorithm for a detailed\nexplanation. | \n \nEXPLAIN EXTENDED\n \nThe EXTENDED keyword adds another column, filtered, to the\noutput. This is a percentage estimate of the table rows that\nwill be filtered by the condition.\n \nAn EXPLAIN EXTENDED will always throw a warning, as it adds\nextra Message information to a subsequent SHOW WARNINGS\nstatement. This includes what the SELECT query would look\nlike after optimizing and rewriting rules are applied and\nhow the optimizer qualifies columns and tables.\n \nExamples\n-------- \nAs synonym for DESCRIBE or SHOW COLUMNS FROM:\n \nDESCRIBE city;\n \n+------------+----------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+------------+----------+------+-----+---------+----------------+\n| Id | int(11) | NO | PRI | NULL | auto_increment |\n| Name | char(35) | YES | | NULL | |\n| Country | char(3) | NO | UNI | | |\n| District | char(20) | YES | MUL | | |\n| Population | int(11) | YES | | NULL | |\n+------------+----------+------+-----+---------+----------------+\n \nA simple set of examples to see how EXPLAIN can identify\npoor index usage:\n \nCREATE TABLE IF NOT EXISTS `employees_example` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `first_name` varchar(30) NOT NULL,\n `last_name` varchar(40) NOT NULL,\n `position` varchar(25) NOT NULL,\n `home_address` varchar(50) NOT NULL,\n `home_phone` varchar(12) NOT NULL,\n `employee_code` varchar(25) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `employee_code` (`employee_code`),\n KEY `first_name` (`first_name`,`last_name`)\n) ENGINE=Aria;\n \nINSERT INTO `employees_example` (`first_name`, `last_name`,\n`position`, `home_address`, `home_phone`, `employee_code`)\n VALUES\n (\'Mustapha\', \'Mond\', \'Chief Executive Officer\', \'692\nPromiscuous Plaza\', \'326-555-3492\', \'MM1\'),\n (\'Henry\', \'Foster\', \'Store Manager\', \'314 Savage\nCircle\', \'326-555-3847\', \'HF1\'),\n (\'Bernard\', \'Marx\', \'Cashier\', \'1240 Ambient\nAvenue\', \'326-555-8456\', \'BM1\'),\n (\'Lenina\', \'Crowne\', \'Cashier\', \'281 Bumblepuppy\nBoulevard\', \'328-555-2349\', \'LC1\'),\n (\'Fanny\', \'Crowne\', \'Restocker\', \'1023 Bokanovsky\nLane\', \'326-555-6329\', \'FC1\'),\n (\'Helmholtz\', \'Watson\', \'Janitor\', \'944 Soma\nCourt\', \'329-555-2478\', \'HW1\');\n \nSHOW INDEXES FROM employees_example;\n \n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| Table | Non_unique | Key_name | Seq_in_index | Column_name\n| Collation | Cardinality | Sub_part | Packed | Null |\nIndex_type | Comment | Index_comment |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n| employees_example | 0 | PRIMARY | 1 | id | A | 7 | NULL |\nNULL | | BTREE | | |\n| employees_example | 0 | employee_code | 1 | employee_code\n| A | 7 | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 1 | first_name | A |\nNULL | NULL | NULL | | BTREE | | |\n| employees_example | 1 | first_name | 2 | last_name | A |\nNULL | NULL | NULL | | BTREE | | |\n+-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+\n \nSELECT on a primary key:\n \nEXPLAIN SELECT * FROM employees_example WHERE id=1;\n \n+------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+\n| 1 | SIMPLE | employees_example | const | PRIMARY | PRIMARY\n| 4 | const | 1 | |\n+------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+\n \nThe type is const, which means that only one possible result\ncould be returned. \nNow, returning the same record but searching by their phone\nnumber:\n \nEXPLAIN SELECT * FROM employees_example WHERE\nhome_phone=\'326-555-3492\';\n \n+------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+\n| 1 | SIMPLE | employees_example | ALL | NULL | NULL | NULL\n| NULL | 6 | Using where |\n+------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+\n \nHere, the type is All, which means no index could be used.\nLooking at the rows count, a full table scan (all six rows)\nhad to be performed in order to retrieve the record. If\nit\'s a requirement to search by phone number, an index will\nhave to be created.\n \nSHOW EXPLAIN example:\n \nSHOW EXPLAIN FOR 1;\n \n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| id | select_type | table | type | possible_keys | key |\nkey_len | ref | rows | Extra |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n| 1 | SIMPLE | tbl | index | NULL | a | 5 | NULL | 1000107 |\nUsing index |\n+------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+\n1 row in set, 1 warning (0.00 sec)\n \nExample of ref_or_null optimization\n \nSELECT * FROM table_name\n WHERE key_column=expr OR key_column IS NULL;\n \nref_or_null is something that often happens when you use\nsubqueries with NOT IN as then one has to do an extra check\nfor NULL values if the first value didn\'t have a matching\nrow. \n \n\n\nURL: https://mariadb.com/kb/en/explain/','','https://mariadb.com/kb/en/explain/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (446,28,'EXPLAIN ANALYZE','The syntax for the EXPLAIN ANALYZE feature was changed to\nANALYZE statement, available since MariaDB 10.1.0. See\nANALYZE statement. \n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/explain-analyze/','','https://mariadb.com/kb/en/explain-analyze/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (447,28,'ANALYZE FORMAT=JSON','ANALYZE FORMAT=JSON is a mix of the EXPLAIN FORMAT=JSON and\nANALYZE statement features. ANALYZE FORMAT=JSON $statement\nwill execute $statement, and then print the output of\nEXPLAIN FORMAT=JSON, amended with the data from query\nexecution.\n \nBasic Execution Data\n \nYou can get the following also from tabular ANALYZE\nstatement form:\nr_rows is provided for any node that reads rows. It shows\nhow many rows were read, on average \nr_filtered is provided whenever there is a condition that is\nchecked. It shows the percentage of rows left after checking\nthe condition.\n \nAdvanced Execution Data\n \nThe most important data that is not available in tabula\nANALYZE statement are:\nr_loops field. This shows how many times the node was\nexecuted. Most query plan elements have this field.\nr_total_time_ms field. It shows how much time in total was\nspent executing this node. If the node has subnodes, their\nexecution time is included.\nr_buffer_size field. Query plan nodes that make use of\nbuffers report the size of buffer that was was used.\n \nData About Individual Query Plan Nodes\n \nfilesort node reports whether sorting was done with LIMIT n\nparameter, and how many rows were in the sort result. \nblock-nl-join node has r_loops field, which allows to tell\nwhether Using join buffer was efficient \nrange-checked-for-each-record reports counters that show the\nresult of the check. \nexpression-cache is used for subqueries, and it reports how\nmany times the cache was used, and what cache hit ratio was.\nunion_result node has r_rows so one can see how many rows\nwere produced after UNION operation\nand so forth\n \nUse Cases\n \nSee Examples of ANALYZE FORMAT=JSON.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/analyze-format-json/','','https://mariadb.com/kb/en/analyze-format-json/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (448,28,'ANALYZE FORMAT=JSON Examples','Example #1\n \nCustomers who have ordered more than 1M goods.\n \nANALYZE FORMAT=JSON\nSELECT CONT(*)\nFROM customer\nWHERE\n (SELECT SUM(o_totalprice) FROM orders WHERE\no_custkey=c_custkey) > 1000*1000;\n \nThe query takes 40 seconds over cold cache\n \nEXPLAIN: {\n \"query_block\": {\n \"select_id\": 1,\n \"r_loops\": 1,\n \"r_total_time_ms\": 39872,\n \"table\": {\n \"table_name\": \"customer\",\n \"access_type\": \"index\",\n \"key\": \"i_c_nationkey\",\n \"key_length\": \"5\",\n \"used_key_parts\": [\"c_nationkey\"],\n \"r_loops\": 1,\n \"rows\": 150303,\n \"r_rows\": 150000,\n \"r_total_time_ms\": 270.3,\n \"filtered\": 100,\n \"r_filtered\": 60.691,\n \"attached_condition\": \"((subquery#2) > ((1000 *\n1000)))\",\n \"using_index\": true\n },\n \"subqueries\": [\n {\n \"query_block\": {\n \"select_id\": 2,\n \"r_loops\": 150000,\n \"r_total_time_ms\": 39531,\n \"table\": {\n \"table_name\": \"orders\",\n \"access_type\": \"ref\",\n \"possible_keys\": [\"i_o_custkey\"],\n \"key\": \"i_o_custkey\",\n \"key_length\": \"5\",\n \"used_key_parts\": [\"o_custkey\"],\n \"ref\": [\"dbt3sf1.customer.c_custkey\"],\n \"r_loops\": 150000,\n \"rows\": 7,\n \"r_rows\": 10,\n \"r_total_time_ms\": 39208,\n \"filtered\": 100,\n \"r_filtered\": 100\n }\n }\n }\n ]\n }\n}\nANALYZE shows that 39.2 seconds were spent in the subquery,\nwhich was executed 150K times (for every row of outer\ntable).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/analyze-formatjson-examples/','','https://mariadb.com/kb/en/analyze-formatjson-examples/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (449,28,'EXPLAIN FORMAT=JSON','Starting from version 10.1.2, MariaDB supports the EXPLAIN\nFORMAT=JSON syntax.\n \nSynopsis\n \nEXPLAIN FORMAT=JSON is a variant of EXPLAIN command that\nproduces output in JSON form. The output always has one row\nwhich has only one column titled \"JSON\". The contents are\na JSON representation of the query plan, formatted for\nreadability:\n \nEXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE col1=1\\G\n \n*************************** 1. row\n***************************\nEXPLAIN: {\n \"query_block\": {\n \"select_id\": 1,\n \"table\": {\n \"table_name\": \"t1\",\n \"access_type\": \"ALL\",\n \"rows\": 1000,\n \"filtered\": 100,\n \"attached_condition\": \"(t1.col1 = 1)\"\n }\n }\n}\n \nOutput is different from MySQL\n \nThe output of MariaDB\'s EXPLAIN FORMAT=JSON is different\nfrom EXPLAIN FORMAT=JSON in MySQL.The reasons for that are:\nMySQL\'s output has deficiencies. Some are listed here:\nEXPLAIN FORMAT=JSON in MySQL)\nThe output of MySQL\'s EXPLAIN FORMAT=JSON is not defined.\nEven MySQL Workbench has trouble parsing it (see this blog\npost).\nMariaDB has query optimizations that MySQL does not have.\nErgo, MariaDB generates query plans that MySQL does not\ngenerate.\n \nA (as yet incomplete) list of how MariaDB\'s output is\ndifferent from MySQL can be found here: EXPLAIN FORMAT=JSON\ndifferences from MySQL. \n \nOutput format\n \nTODO: MariaDB\'s output format description.\n \n\n\nURL: https://mariadb.com/kb/en/explain-format-json/','','https://mariadb.com/kb/en/explain-format-json/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (450,30,'CONTAINS','Syntax\n------ \nContains(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether a geometry g1 completely\ncontains geometry g2. CONTAINS() is based on the original\nMySQL implementation and uses object bounding rectangles,\nwhile ST_CONTAINS() uses object shapes. \n \nThis tests the opposite relationship to Within().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/contains/','','https://mariadb.com/kb/en/contains/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (451,30,'CROSSES','Syntax\n------ \nCrosses(g1,g2)\n \nDescription\n----------- \nReturns 1 if g1 spatially crosses g2. Returns NULL if g1 is\na Polygon or a MultiPolygon, or if g2 is a\nPoint or a MultiPoint. Otherwise, returns 0.\n \nThe term spatially crosses denotes a spatial relation\nbetween two\ngiven geometries that has the following properties:\nThe two geometries intersect\nTheir intersection results in a geometry that has a\ndimension that is one\n less than the maximum dimension of the two given geometries\nTheir intersection is not equal to either of the two given\ngeometries\n \nCROSSES() is based on the original MySQL implementation, and\nuses object bounding rectangles, while ST_CROSSES() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/crosses/','','https://mariadb.com/kb/en/crosses/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (452,30,'DISJOINT','Syntax\n------ \nDisjoint(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 is spatially disjoint\nfrom\n(does not intersect) g2.\n \nDISJOINT() tests the opposite relationship to INTERSECTS().\n \nDISJOINT() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_DISJOINT() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/disjoint/','','https://mariadb.com/kb/en/disjoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (453,30,'EQUALS','Syntax\n------ \nEquals(g1,g2)\n \nFrom MariaDB 10.2.3:\n \nMBREQUALS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 is spatially equal to\ng2.\n \nEQUALS() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_EQUALS() uses\nobject shapes.\n \nFrom MariaDB 10.2.3, MBREQUALS is a synonym for Equals.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/equals/','','https://mariadb.com/kb/en/equals/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (454,30,'INTERSECTS','Syntax\n------ \nINTERSECTS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\nintersects geometry g2.\n \nINTERSECTS() is based on the original MySQL implementation\nand uses object bounding rectangles, while ST_INTERSECTS()\nuses object shapes.\n \nINTERSECTS() tests the opposite relationship to DISJOINT().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/intersects/','','https://mariadb.com/kb/en/intersects/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (455,30,'OVERLAPS','Syntax\n------ \nOVERLAPS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 spatially overlaps g2.\nThe term spatially overlaps is used if two geometries\nintersect and their\nintersection results in a geometry of the same dimension but\nnot equal to\neither of the given geometries.\n \nOVERLAPS() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_OVERLAPS() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/overlaps/','','https://mariadb.com/kb/en/overlaps/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (456,30,'ST_CONTAINS','Syntax\n------ \nST_CONTAINS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether a geometry g1 completely\ncontains geometry g2.\n \nST_CONTAINS() uses object shapes, while CONTAINS(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nST_CONTAINS tests the opposite relationship to ST_WITHIN().\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60,\n125 100, 175 150))\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POINT(174 149)\');\n \nSELECT ST_CONTAINS(@g1,@g2);\n+----------------------+\n| ST_CONTAINS(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSET @g2 = ST_GEOMFROMTEXT(\'POINT(175 151)\');\n \nSELECT ST_CONTAINS(@g1,@g2);\n+----------------------+\n| ST_CONTAINS(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-contains/','','https://mariadb.com/kb/en/st-contains/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (457,30,'ST_CROSSES','Syntax\n------ \nST_CROSSES(g1,g2)\n \nDescription\n----------- \nReturns 1 if geometry g1 spatially crosses geometry g2.\nReturns NULL if g1 is a Polygon or a MultiPolygon, or if g2\nis a\nPoint or a MultiPoint. Otherwise, returns 0.\n \nThe term spatially crosses denotes a spatial relation\nbetween two\ngiven geometries that has the following properties:\nThe two geometries intersect\nTheir intersection results in a geometry that has a\ndimension that is one\n less than the maximum dimension of the two given geometries\nTheir intersection is not equal to either of the two given\ngeometries\n \nST_CROSSES() uses object shapes, while CROSSES(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(174 149, 176 151)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60,\n125 100, 175 150))\');\n \nSELECT ST_CROSSES(@g1,@g2);\n+---------------------+\n| ST_CROSSES(@g1,@g2) |\n+---------------------+\n| 1 |\n+---------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(176 149, 176 151)\');\n \nSELECT ST_CROSSES(@g1,@g2);\n+---------------------+\n| ST_CROSSES(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-crosses/','','https://mariadb.com/kb/en/st-crosses/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (458,30,'ST_DIFFERENCE','Syntax\n------ \nST_DIFFERENCE(g1,g2)\n \nDescription\n----------- \nReturns a geometry representing the point set difference of\nthe given geometry values.\n \nExample\n \nSET @g1 = POINT(10,10), @g2 = POINT(20,20);\n \nSELECT ST_AsText(ST_Difference(@g1, @g2));\n+------------------------------------+\n| ST_AsText(ST_Difference(@g1, @g2)) |\n+------------------------------------+\n| POINT(10 10) |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_difference/','','https://mariadb.com/kb/en/st_difference/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (459,30,'ST_DISJOINT','Syntax\n------ \nST_DISJOINT(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 is spatially\ndisjoint from\n(does not intersect with) geometry g2.\n \nST_DISJOINT() uses object shapes, while DISJOINT(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nST_DISJOINT() tests the opposite relationship to\nST_INTERSECTS().\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(0 0)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 0, 0 2)\');\n \nSELECT ST_DISJOINT(@g1,@g2);\n+----------------------+\n| ST_DISJOINT(@g1,@g2) |\n+----------------------+\n| 1 |\n+----------------------+\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(0 0, 0 2)\');\n \nSELECT ST_DISJOINT(@g1,@g2);\n+----------------------+\n| ST_DISJOINT(@g1,@g2) |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_disjoint/','','https://mariadb.com/kb/en/st_disjoint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (460,30,'ST_DISTANCE','ST_DISTANCE() was introduced in MariaDB 5.3.3.\n \nSyntax\n------ \nST_DISTANCE(g1,g2)\n \nDescription\n----------- \nReturns the distance between two geometries, or null if not\ngiven valid inputs.\n \nExample\n \nSELECT ST_Distance(POINT(1,2),POINT(2,2));\n+------------------------------------+\n| ST_Distance(POINT(1,2),POINT(2,2)) |\n+------------------------------------+\n| 1 |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_distance/','','https://mariadb.com/kb/en/st_distance/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (461,30,'ST_EQUALS','Syntax\n------ \nST_EQUALS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 is spatially\nequal to geometry g2.\n \nST_EQUALS() uses object shapes, while EQUALS(), based on the\noriginal MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'LINESTRING(174 149, 176 151)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(176 151, 174 149)\');\n \nSELECT ST_EQUALS(@g1,@g2);\n+--------------------+\n| ST_EQUALS(@g1,@g2) |\n+--------------------+\n| 1 |\n+--------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(0 2)\');\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 0)\');\n \nSELECT ST_EQUALS(@g1,@g2);\n+--------------------+\n| ST_EQUALS(@g1,@g2) |\n+--------------------+\n| 0 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-equals/','','https://mariadb.com/kb/en/st-equals/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (462,30,'ST_INTERSECTS','Syntax\n------ \nST_INTERSECTS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\nintersects geometry g2.\n \nST_INTERSECTS() uses object shapes, while INTERSECTS(),\nbased on the original MySQL implementation, uses object\nbounding rectangles.\n \nST_INTERSECTS() tests the opposite relationship to\nST_DISJOINT().\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(0 0)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(0 0, 0 2)\');\n \nSELECT ST_INTERSECTS(@g1,@g2);\n+------------------------+\n| ST_INTERSECTS(@g1,@g2) |\n+------------------------+\n| 1 |\n+------------------------+\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 0, 0 2)\');\n \nSELECT ST_INTERSECTS(@g1,@g2);\n+------------------------+\n| ST_INTERSECTS(@g1,@g2) |\n+------------------------+\n| 0 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-intersects/','','https://mariadb.com/kb/en/st-intersects/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (463,30,'ST_LENGTH','Syntax\n------ \nST_LENGTH(ls)\n \nDescription\n----------- \nReturns as a double-precision number the length of the\nLineString value ls in its associated spatial reference.\n \nExamples\n-------- \nSET @ls = \'LineString(1 1,2 2,3 3)\';\n \nSELECT ST_LENGTH(ST_GeomFromText(@ls));\n+---------------------------------+\n| ST_LENGTH(ST_GeomFromText(@ls)) |\n+---------------------------------+\n| 2.82842712474619 |\n+---------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_length/','','https://mariadb.com/kb/en/st_length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (464,30,'ST_OVERLAPS','Syntax\n------ \nST_OVERLAPS(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\noverlaps geometry g2.\n \nThe term spatially overlaps is used if two geometries\nintersect and their\nintersection results in a geometry of the same dimension but\nnot equal to\neither of the given geometries.\n \nST_OVERLAPS() uses object shapes, while OVERLAPS(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-overlaps/','','https://mariadb.com/kb/en/st-overlaps/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (465,30,'ST_TOUCHES','Syntax\n------ \nST_TOUCHES(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 spatially\ntouches geometry g2. Two geometries spatially touch if the\ninteriors of the geometries do not intersect,\nbut the boundary of one of the geometries intersects either\nthe boundary or the\ninterior of the other.\n \nST_TOUCHES() uses object shapes, while TOUCHES(), based on\nthe original MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 0)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'LINESTRING(2 0, 0 2)\');\n \nSELECT ST_TOUCHES(@g1,@g2);\n+---------------------+\n| ST_TOUCHES(@g1,@g2) |\n+---------------------+\n| 1 |\n+---------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(2 1)\');\n \nSELECT ST_TOUCHES(@g1,@g2);\n+---------------------+\n| ST_TOUCHES(@g1,@g2) |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-touches/','','https://mariadb.com/kb/en/st-touches/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (466,30,'ST_WITHIN','Syntax\n------ \nST_WITHIN(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether geometry g1 is spatially\nwithin geometry g2.\n \nThis tests the opposite relationship as ST_CONTAINS().\n \nST_WITHIN() uses object shapes, while WITHIN(), based on the\noriginal MySQL implementation, uses object bounding\nrectangles.\n \nExamples\n-------- \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(174 149)\');\n \nSET @g2 = ST_GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60,\n125 100, 175 150))\');\n \nSELECT ST_WITHIN(@g1,@g2);\n+--------------------+\n| ST_WITHIN(@g1,@g2) |\n+--------------------+\n| 1 |\n+--------------------+\n \nSET @g1 = ST_GEOMFROMTEXT(\'POINT(176 151)\');\n \nSELECT ST_WITHIN(@g1,@g2);\n+--------------------+\n| ST_WITHIN(@g1,@g2) |\n+--------------------+\n| 0 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st-within/','','https://mariadb.com/kb/en/st-within/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (467,30,'TOUCHES','Syntax\n------ \nTouches(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 spatially touches g2.\nTwo\ngeometries spatially touch if the interiors of the\ngeometries do not intersect,\nbut the boundary of one of the geometries intersects either\nthe boundary or the\ninterior of the other.\n \nTOUCHES() is based on the original MySQL implementation and\nuses object bounding rectangles, while ST_TOUCHES() uses\nobject shapes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/touches/','','https://mariadb.com/kb/en/touches/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (468,30,'WITHIN','Syntax\n------ \nWithin(g1,g2)\n \nDescription\n----------- \nReturns 1 or 0 to indicate whether g1 is spatially within\ng2.\nThis tests the opposite relationship as Contains().\n \nWITHIN() is based on the original MySQL implementation, and\nuses object bounding rectangles, while ST_WITHIN() uses\nobject shapes.\n \nExamples\n-------- \nSET @g1 = GEOMFROMTEXT(\'POINT(174 149)\');\nSET @g2 = GEOMFROMTEXT(\'POINT(176 151)\');\nSET @g3 = GEOMFROMTEXT(\'POLYGON((175 150, 20 40, 50 60, 125\n100, 175 150))\');\n \nSELECT within(@g1,@g3);\n+-----------------+\n| within(@g1,@g3) |\n+-----------------+\n| 1 |\n+-----------------+\n \nSELECT within(@g2,@g3);\n+-----------------+\n| within(@g2,@g3) |\n+-----------------+\n| 0 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/within/','','https://mariadb.com/kb/en/within/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (469,31,'ADDDATE','Syntax\n------ \nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n \nDescription\n----------- \nWhen invoked with the INTERVAL form of the second argument,\nADDDATE()\nis a synonym for DATE_ADD(). The related function\nSUBDATE() is a synonym for DATE_SUB(). For\ninformation on the INTERVAL unit argument, see the\ndiscussion for\nDATE_ADD().\n \nWhen invoked with the days form of the second argument,\nMariaDB treats it as an\ninteger number of days to be added to expr.\n \nExamples\n-------- \nSELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n+-----------------------------------------+\n| DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY) |\n+-----------------------------------------+\n| 2008-02-02 |\n+-----------------------------------------+\n \nSELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n+----------------------------------------+\n| ADDDATE(\'2008-01-02\', INTERVAL 31 DAY) |\n+----------------------------------------+\n| 2008-02-02 |\n+----------------------------------------+\n \nSELECT ADDDATE(\'2008-01-02\', 31);\n+---------------------------+\n| ADDDATE(\'2008-01-02\', 31) |\n+---------------------------+\n| 2008-02-02 |\n+---------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, ADDDATE(d, 10) from t1;\n \n+---------------------+---------------------+\n| d | ADDDATE(d, 10) |\n+---------------------+---------------------+\n| 2007-01-30 21:31:07 | 2007-02-09 21:31:07 |\n| 1983-10-15 06:42:51 | 1983-10-25 06:42:51 |\n| 2011-04-21 12:34:56 | 2011-05-01 12:34:56 |\n| 2011-10-30 06:31:41 | 2011-11-09 06:31:41 |\n| 2011-01-30 14:03:25 | 2011-02-09 14:03:25 |\n| 2004-10-07 11:19:34 | 2004-10-17 11:19:34 |\n+---------------------+---------------------+\n \nSELECT d, ADDDATE(d, INTERVAL 10 HOUR) from t1;\n \n+---------------------+------------------------------+\n| d | ADDDATE(d, INTERVAL 10 HOUR) |\n+---------------------+------------------------------+\n| 2007-01-30 21:31:07 | 2007-01-31 07:31:07 |\n| 1983-10-15 06:42:51 | 1983-10-15 16:42:51 |\n| 2011-04-21 12:34:56 | 2011-04-21 22:34:56 |\n| 2011-10-30 06:31:41 | 2011-10-30 16:31:41 |\n| 2011-01-30 14:03:25 | 2011-01-31 00:03:25 |\n| 2004-10-07 11:19:34 | 2004-10-07 21:19:34 |\n+---------------------+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/adddate/','','https://mariadb.com/kb/en/adddate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (470,31,'ADDTIME','Syntax\n------ \nADDTIME(expr1,expr2)\n \nDescription\n----------- \nADDTIME() adds expr2 to expr1 and returns the result. expr1\nis a time\nor datetime expression, and expr2 is a time expression.\n \nExamples\n-------- \nSELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1\n1:1:1.000002\');\n+---------------------------------------------------------+\n| ADDTIME(\'2007-12-31 23:59:59.999999\', \'1\n1:1:1.000002\') |\n+---------------------------------------------------------+\n| 2008-01-02 01:01:01.000001 |\n+---------------------------------------------------------+\n \nSELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n+-----------------------------------------------+\n| ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\') |\n+-----------------------------------------------+\n| 03:00:01.999997 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/addtime/','','https://mariadb.com/kb/en/addtime/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (471,31,'CONVERT_TZ','Syntax\n------ \nCONVERT_TZ(dt,from_tz,to_tz)\n \nDescription\n----------- \nCONVERT_TZ() converts a datetime value dt from the time zone\ngiven by from_tz to the time zone given by to_tz and returns\nthe resulting value.\n \nIn order to use named time zones, such as GMT, MET or\nAfrica/Johannesburg, the time_zone tables must be loaded\n(see mysql_tzinfo_to_sql).\n \nNo conversion will take place if the value falls outside of\nthe supported TIMESTAMP range (\'1970-01-01 00:00:01\' to\n\'2038-01-19 05:14:07\' UTC) when converted from from_tz to\nUTC.\n \nThis function returns NULL if the arguments are invalid (or\nnamed time zones have not been loaded).\n \nSee time zones for more information.\n \nExamples\n-------- \nSELECT CONVERT_TZ(\'2016-01-01\n12:00:00\',\'+00:00\',\'+10:00\');\n+-----------------------------------------------------+\n| CONVERT_TZ(\'2016-01-01 12:00:00\',\'+00:00\',\'+10:00\')\n|\n+-----------------------------------------------------+\n| 2016-01-01 22:00:00 |\n+-----------------------------------------------------+\n \nUsing named time zones (with the time zone tables loaded):\n \nSELECT CONVERT_TZ(\'2016-01-01\n12:00:00\',\'GMT\',\'Africa/Johannesburg\');\n+---------------------------------------------------------------+\n| CONVERT_TZ(\'2016-01-01\n12:00:00\',\'GMT\',\'Africa/Johannesburg\') |\n+---------------------------------------------------------------+\n| 2016-01-01 14:00:00 |\n+---------------------------------------------------------------+\n \nThe value is out of the TIMESTAMP range, so no conversion\ntakes place:\n \nSELECT CONVERT_TZ(\'1969-12-31\n22:00:00\',\'+00:00\',\'+10:00\');\n+-----------------------------------------------------+\n| CONVERT_TZ(\'1969-12-31 22:00:00\',\'+00:00\',\'+10:00\')\n|\n+-----------------------------------------------------+\n| 1969-12-31 22:00:00 |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/convert_tz/','','https://mariadb.com/kb/en/convert_tz/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (472,31,'CURDATE','Syntax\n------ \nCURDATE()\n \nDescription\n----------- \nReturns the current date as a value in \'YYYY-MM-DD\' or\nYYYYMMDD\nformat, depending on whether the function is used in a\nstring or\nnumeric context.\n \nExamples\n-------- \nSELECT CURDATE();\n+------------+\n| CURDATE() |\n+------------+\n| 2019-03-05 |\n+------------+\n \nIn a numeric context (note this is not performing date\ncalculations):\n \nSELECT CURDATE() +0;\n \n+--------------+\n| CURDATE() +0 |\n+--------------+\n| 20190305 |\n+--------------+\n \nData calculation:\n \nSELECT CURDATE() - INTERVAL 5 DAY;\n \n+----------------------------+\n| CURDATE() - INTERVAL 5 DAY |\n+----------------------------+\n| 2019-02-28 |\n+----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/curdate/','','https://mariadb.com/kb/en/curdate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (473,31,'CURRENT_DATE','Syntax\n------ \nCURRENT_DATE, CURRENT_DATE()\n \nDescription\n----------- \nCURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/current_date/','','https://mariadb.com/kb/en/current_date/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (474,31,'CURRENT_TIME','Syntax\n------ \nCURRENT_TIME\nCURRENT_TIME([precision])\n \nDescription\n----------- \nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n \n\n\nURL: https://mariadb.com/kb/en/current_time/','','https://mariadb.com/kb/en/current_time/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (475,31,'CURRENT_TIMESTAMP','Syntax\n------ \nCURRENT_TIMESTAMP\nCURRENT_TIMESTAMP([precision])\n \nDescription\n----------- \nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for\nNOW().\n \n\n\nURL: https://mariadb.com/kb/en/current_timestamp/','','https://mariadb.com/kb/en/current_timestamp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (476,31,'CURTIME','Syntax\n------ \nCURTIME([precision])\n \nDescription\n----------- \nReturns the current time as a value in \'HH:MM:SS\' or\nHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed\nin the current time zone.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nExamples\n-------- \nSELECT CURTIME();\n+-----------+\n| CURTIME() |\n+-----------+\n| 12:45:39 |\n+-----------+\n \nSELECT CURTIME() + 0;\n \n+---------------+\n| CURTIME() + 0 |\n+---------------+\n| 124545.000000 |\n+---------------+\n \nWith precision:\n \nSELECT CURTIME(2);\n+-------------+\n| CURTIME(2) |\n+-------------+\n| 09:49:08.09 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/curtime/','','https://mariadb.com/kb/en/curtime/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (477,31,'DATE FUNCTION','Syntax\n------ \nDATE(expr)\n \nDescription\n----------- \nExtracts the date part of the date or datetime expression\nexpr.\n \nExamples\n-------- \nSELECT DATE(\'2013-07-18 12:21:32\');\n+-----------------------------+\n| DATE(\'2013-07-18 12:21:32\') |\n+-----------------------------+\n| 2013-07-18 |\n+-----------------------------+\n \nError Handling\n \nUntil MariaDB 5.5.32, some versions of MariaDB returned\n0000-00-00 when passed an invalid date. From 5.5.32, NULL is\nreturned.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date-function/','','https://mariadb.com/kb/en/date-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (478,31,'DATEDIFF','Syntax\n------ \nDATEDIFF(expr1,expr2)\n \nDescription\n----------- \nDATEDIFF() returns (expr1 – expr2) expressed\nas a value in days from one date to the other. expr1 and\nexpr2 are date\nor date-and-time expressions. Only the date parts of the\nvalues are used in the\ncalculation.\n \nExamples\n-------- \nSELECT DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\');\n+----------------------------------------------+\n| DATEDIFF(\'2007-12-31 23:59:59\',\'2007-12-30\') |\n+----------------------------------------------+\n| 1 |\n+----------------------------------------------+\n \nSELECT DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\');\n+----------------------------------------------+\n| DATEDIFF(\'2010-11-30 23:59:59\',\'2010-12-31\') |\n+----------------------------------------------+\n| -31 |\n+----------------------------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT NOW();\n+---------------------+\n| NOW() |\n+---------------------+\n| 2011-05-23 10:56:05 |\n+---------------------+\n \nSELECT d, DATEDIFF(NOW(),d) FROM t1;\n \n+---------------------+-------------------+\n| d | DATEDIFF(NOW(),d) |\n+---------------------+-------------------+\n| 2007-01-30 21:31:07 | 1574 |\n| 1983-10-15 06:42:51 | 10082 |\n| 2011-04-21 12:34:56 | 32 |\n| 2011-10-30 06:31:41 | -160 |\n| 2011-01-30 14:03:25 | 113 |\n| 2004-10-07 11:19:34 | 2419 |\n+---------------------+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/datediff/','','https://mariadb.com/kb/en/datediff/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (479,31,'DATE_ADD','Syntax\n------ \nDATE_ADD(date,INTERVAL expr unit)\n \nDescription\n----------- \nPerforms date arithmetic. The date argument specifies the\nstarting date or datetime value. expr is an expression\nspecifying the\ninterval value to be added or subtracted from the starting\ndate. expr is a\nstring; it may start with a \"-\" for negative intervals.\nunit is a\nkeyword indicating the units in which the expression should\nbe interpreted. See Date and Time Units for a complete list\nof permitted units. \n \nSee also DATE_SUB().\n \nExamples\n-------- \nSELECT \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND;\n \n+-------------------------------------------+\n| \'2008-12-31 23:59:59\' + INTERVAL 1 SECOND |\n+-------------------------------------------+\n| 2009-01-01 00:00:00 |\n+-------------------------------------------+\n \nSELECT INTERVAL 1 DAY + \'2008-12-31\';\n \n+-------------------------------+\n| INTERVAL 1 DAY + \'2008-12-31\' |\n+-------------------------------+\n| 2009-01-01 |\n+-------------------------------+\n \nSELECT \'2005-01-01\' - INTERVAL 1 SECOND;\n \n+----------------------------------+\n| \'2005-01-01\' - INTERVAL 1 SECOND |\n+----------------------------------+\n| 2004-12-31 23:59:59 |\n+----------------------------------+\n \nSELECT DATE_ADD(\'2000-12-31 23:59:59\', INTERVAL 1 SECOND);\n+----------------------------------------------------+\n| DATE_ADD(\'2000-12-31 23:59:59\', INTERVAL 1 SECOND) |\n+----------------------------------------------------+\n| 2001-01-01 00:00:00 |\n+----------------------------------------------------+\n \nSELECT DATE_ADD(\'2010-12-31 23:59:59\', INTERVAL 1 DAY);\n+-------------------------------------------------+\n| DATE_ADD(\'2010-12-31 23:59:59\', INTERVAL 1 DAY) |\n+-------------------------------------------------+\n| 2011-01-01 23:59:59 |\n+-------------------------------------------------+\n \nSELECT DATE_ADD(\'2100-12-31 23:59:59\', INTERVAL \'1:1\'\nMINUTE_SECOND);\n+---------------------------------------------------------------+\n| DATE_ADD(\'2100-12-31 23:59:59\', INTERVAL \'1:1\'\nMINUTE_SECOND) |\n+---------------------------------------------------------------+\n| 2101-01-01 00:01:00 |\n+---------------------------------------------------------------+\n \nSELECT DATE_ADD(\'1900-01-01 00:00:00\', INTERVAL \'-1 10\'\nDAY_HOUR);\n+------------------------------------------------------------+\n| DATE_ADD(\'1900-01-01 00:00:00\', INTERVAL \'-1 10\'\nDAY_HOUR) |\n+------------------------------------------------------------+\n| 1899-12-30 14:00:00 |\n+------------------------------------------------------------+\n \nSELECT DATE_ADD(\'1992-12-31 23:59:59.000002\', INTERVAL\n\'1.999999\' SECOND_MICROSECOND);\n+--------------------------------------------------------------------------------+\n| DATE_ADD(\'1992-12-31 23:59:59.000002\', INTERVAL\n\'1.999999\' SECOND_MICROSECOND) |\n+--------------------------------------------------------------------------------+\n| 1993-01-01 00:00:01.000001 |\n+--------------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date_add/','','https://mariadb.com/kb/en/date_add/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (480,31,'DATE_FORMAT','Syntax\n------ \nDATE_FORMAT(date, format[, locale])\n \nDescription\n----------- \nFormats the date value according to the format string. \n \nThe language used for the names is controlled by the value\nof the lc_time_names system variable. See server locale for\nmore on the supported locales.\n \nThe options that can be used by DATE_FORMAT(), as well as\nits inverse STR_TO_DATE() and the FROM_UNIXTIME() function,\nare:\n \nOption | Description | \n \n%a | Short weekday name in current locale (Variable\nlc_time_names). | \n \n%b | Short form month name in current locale. For locale\nen_US this is one of:\nJan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov or Dec. | \n \n%c | Month with 1 or 2 digits. | \n \n%D | Day with English suffix \'th\', \'nd\', \'st\' or\n\'rd\'\'. (1st, 2nd, 3rd...). | \n \n%d | Day with 2 digits. | \n \n%e | Day with 1 or 2 digits. | \n \n%f | Sub seconds 6 digits. | \n \n%H | Hour with 2 digits between 00-23. | \n \n%h | Hour with 2 digits between 01-12. | \n \n%I | Hour with 2 digits between 01-12. | \n \n%i | Minute with 2 digits. | \n \n%j | Day of the year (001-366) | \n \n%k | Hour with 1 digits between 0-23. | \n \n%l | Hour with 1 digits between 1-12. | \n \n%M | Full month name in current locale (Variable\nlc_time_names). | \n \n%m | Month with 2 digits. | \n \n%p | AM/PM according to current locale (Variable\nlc_time_names). | \n \n%r | Time in 12 hour format, followed by AM/PM. Short for\n\'%I:%i:%S %p\'. | \n \n%S | Seconds with 2 digits. | \n \n%s | Seconds with 2 digits. | \n \n%T | Time in 24 hour format. Short for \'%H:%i:%S\'. | \n \n%U | Week number (00-53), when first day of the week is\nSunday. | \n \n%u | Week number (00-53), when first day of the week is\nMonday. | \n \n%V | Week number (01-53), when first day of the week is\nSunday. Used with %X. | \n \n%v | Week number (01-53), when first day of the week is\nMonday. Used with %x. | \n \n%W | Full weekday name in current locale (Variable\nlc_time_names). | \n \n%w | Day of the week. 0 = Sunday, 6 = Saturday. | \n \n%X | Year with 4 digits when first day of the week is\nSunday. Used with %V. | \n \n%x | Year with 4 digits when first day of the week is\nMonday. Used with %v. | \n \n%Y | Year with 4 digits. | \n \n%y | Year with 2 digits. | \n \n%# | For str_to_date(), skip all numbers. | \n \n%. | For str_to_date(), skip all punctation characters. | \n \n%@ | For str_to_date(), skip all alpha characters. | \n \n%% | A literal % character. | \n \nTo get a date in one of the standard formats, GET_FORMAT()\ncan be used.\n \nExamples\n-------- \nSELECT DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\');\n+------------------------------------------------+\n| DATE_FORMAT(\'2009-10-04 22:23:00\', \'%W %M %Y\') |\n+------------------------------------------------+\n| Sunday October 2009 |\n+------------------------------------------------+\n \nSELECT DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\');\n+------------------------------------------------+\n| DATE_FORMAT(\'2007-10-04 22:23:00\', \'%H:%i:%s\') |\n+------------------------------------------------+\n| 22:23:00 |\n+------------------------------------------------+\n \nSELECT DATE_FORMAT(\'1900-10-04 22:23:00\', \'%D %y %a %d %m\n%b %j\');\n+------------------------------------------------------------+\n| DATE_FORMAT(\'1900-10-04 22:23:00\', \'%D %y %a %d %m %b\n%j\') |\n+------------------------------------------------------------+\n| 4th 00 Thu 04 10 Oct 277 |\n+------------------------------------------------------------+\n \nSELECT DATE_FORMAT(\'1997-10-04 22:23:00\', \'%H %k %I %r %T\n%S %w\');\n+------------------------------------------------------------+\n| DATE_FORMAT(\'1997-10-04 22:23:00\', \'%H %k %I %r %T %S\n%w\') |\n+------------------------------------------------------------+\n| 22 22 10 10:23:00 PM 22:23:00 00 6 |\n+------------------------------------------------------------+\n \nSELECT DATE_FORMAT(\'1999-01-01\', \'%X %V\');\n+------------------------------------+\n| DATE_FORMAT(\'1999-01-01\', \'%X %V\') |\n+------------------------------------+\n| 1998 52 |\n+------------------------------------+\n \nSELECT DATE_FORMAT(\'2006-06-00\', \'%d\');\n+---------------------------------+\n| DATE_FORMAT(\'2006-06-00\', \'%d\') |\n+---------------------------------+\n| 00 |\n+---------------------------------+\n \nOptionally, the locale can be explicitly specified as the\nthird DATE_FORMAT() argument. Doing so makes the function\nindependent from the session settings, and the three\nargument version of DATE_FORMAT() can be used in virtual\nindexed and persistent generated-columns:\n \nSELECT DATE_FORMAT(\'2006-01-01\', \'%W\', \'el_GR\');\n+------------------------------------------+\n| DATE_FORMAT(\'2006-01-01\', \'%W\', \'el_GR\') |\n+------------------------------------------+\n| ΚυÏιακή |\n+------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/date_format/','','https://mariadb.com/kb/en/date_format/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (481,31,'DATE_SUB','Syntax\n------ \nDATE_SUB(date,INTERVAL expr unit)\n \nDescription\n----------- \nPerforms date arithmetic. The date argument specifies the\nstarting date or datetime value. expr is an expression\nspecifying the\ninterval value to be added or subtracted from the starting\ndate. expr is a\nstring; it may start with a \"-\" for negative intervals.\nunit is a\nkeyword indicating the units in which the expression should\nbe interpreted. See Date and Time Units for a complete list\nof permitted units. \n \nSee also DATE_ADD().\n \nExamples\n-------- \nSELECT DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY);\n+-----------------------------------------+\n| DATE_SUB(\'1998-01-02\', INTERVAL 31 DAY) |\n+-----------------------------------------+\n| 1997-12-02 |\n+-----------------------------------------+\n \nSELECT DATE_SUB(\'2005-01-01 00:00:00\', INTERVAL \'1\n1:1:1\' DAY_SECOND);\n+----------------------------------------------------------------+\n| DATE_SUB(\'2005-01-01 00:00:00\', INTERVAL \'1 1:1:1\'\nDAY_SECOND) |\n+----------------------------------------------------------------+\n| 2004-12-30 22:58:59 |\n+----------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/date_sub/','','https://mariadb.com/kb/en/date_sub/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (482,31,'DAY','Syntax\n------ \nDAY(date)\n \nDescription\n----------- \nDAY() is a synonym for DAYOFMONTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/day/','','https://mariadb.com/kb/en/day/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (483,31,'DAYNAME','Syntax\n------ \nDAYNAME(date)\n \nDescription\n----------- \nReturns the name of the weekday for date. The language used\nfor the name is controlled by the value\nof the lc_time_names system variable. See server locale for\nmore on the supported locales.\n \nExamples\n-------- \nSELECT DAYNAME(\'2007-02-03\');\n+-----------------------+\n| DAYNAME(\'2007-02-03\') |\n+-----------------------+\n| Saturday |\n+-----------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, DAYNAME(d) FROM t1;\n \n+---------------------+------------+\n| d | DAYNAME(d) |\n+---------------------+------------+\n| 2007-01-30 21:31:07 | Tuesday |\n| 1983-10-15 06:42:51 | Saturday |\n| 2011-04-21 12:34:56 | Thursday |\n| 2011-10-30 06:31:41 | Sunday |\n| 2011-01-30 14:03:25 | Sunday |\n| 2004-10-07 11:19:34 | Thursday |\n+---------------------+------------+\n \nChanging the locale:\n \nSET lc_time_names = \'fr_CA\';\n \nSELECT DAYNAME(\'2013-04-01\');\n+-----------------------+\n| DAYNAME(\'2013-04-01\') |\n+-----------------------+\n| lundi |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayname/','','https://mariadb.com/kb/en/dayname/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (484,31,'DAYOFMONTH','Syntax\n------ \nDAYOFMONTH(date)\n \nDescription\n----------- \nReturns the day of the month for date, in the range 1 to 31,\nor 0\nfor dates such as \'0000-00-00\' or \'2008-00-00\' which\nhave a zero day\npart.\n \nDAY() is a synonym.\n \nExamples\n-------- \nSELECT DAYOFMONTH(\'2007-02-03\');\n+--------------------------+\n| DAYOFMONTH(\'2007-02-03\') |\n+--------------------------+\n| 3 |\n+--------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d FROM t1 where DAYOFMONTH(d) = 30;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayofmonth/','','https://mariadb.com/kb/en/dayofmonth/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (485,31,'DAYOFWEEK','Syntax\n------ \nDAYOFWEEK(date)\n \nDescription\n----------- \nReturns the day of the week index for the date (1 = Sunday,\n2 = Monday, ..., 7 =\nSaturday). These index values correspond to the ODBC\nstandard.\n \nThis contrasts with WEEKDAY() which follows a different\nindex numbering\n(0 = Monday, 1 = Tuesday, ... 6 = Sunday).\n \nExamples\n-------- \nSELECT DAYOFWEEK(\'2007-02-03\');\n+-------------------------+\n| DAYOFWEEK(\'2007-02-03\') |\n+-------------------------+\n| 7 |\n+-------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, DAYNAME(d), DAYOFWEEK(d), WEEKDAY(d) from t1;\n \n+---------------------+------------+--------------+------------+\n| d | DAYNAME(d) | DAYOFWEEK(d) | WEEKDAY(d) |\n+---------------------+------------+--------------+------------+\n| 2007-01-30 21:31:07 | Tuesday | 3 | 1 |\n| 1983-10-15 06:42:51 | Saturday | 7 | 5 |\n| 2011-04-21 12:34:56 | Thursday | 5 | 3 |\n| 2011-10-30 06:31:41 | Sunday | 1 | 6 |\n| 2011-01-30 14:03:25 | Sunday | 1 | 6 |\n| 2004-10-07 11:19:34 | Thursday | 5 | 3 |\n+---------------------+------------+--------------+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayofweek/','','https://mariadb.com/kb/en/dayofweek/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (486,31,'DAYOFYEAR','Syntax\n------ \nDAYOFYEAR(date)\n \nDescription\n----------- \nReturns the day of the year for date, in the range 1 to 366.\n \nExamples\n-------- \nSELECT DAYOFYEAR(\'2018-02-16\');\n+-------------------------+\n| DAYOFYEAR(\'2018-02-16\') |\n+-------------------------+\n| 47 |\n+-------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dayofyear/','','https://mariadb.com/kb/en/dayofyear/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (487,31,'EXTRACT','Syntax\n------ \nEXTRACT(unit FROM date)\n \nDescription\n----------- \nThe EXTRACT() function extracts the required unit from the\ndate. See Date and Time Units for a complete list of\npermitted units.\n \nIn MariaDB 10.0.7 and MariaDB 5.5.35, EXTRACT (HOUR FROM\n...) was changed to return a value from 0 to 23, adhering to\nthe SQL standard. Until MariaDB 10.0.6 and MariaDB 5.5.34,\nand in all versions of MySQL at least as of MySQL 5.7, it\ncould return a value > 23. HOUR() is not a standard\nfunction, so continues to adhere to the old behaviour\ninherited from MySQL.\n \nExamples\n-------- \nSELECT EXTRACT(YEAR FROM \'2009-07-02\');\n+---------------------------------+\n| EXTRACT(YEAR FROM \'2009-07-02\') |\n+---------------------------------+\n| 2009 |\n+---------------------------------+\n \nSELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n+------------------------------------------------+\n| EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\') |\n+------------------------------------------------+\n| 200907 |\n+------------------------------------------------+\n \nSELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n+------------------------------------------------+\n| EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\') |\n+------------------------------------------------+\n| 20102 |\n+------------------------------------------------+\n \nSELECT EXTRACT(MICROSECOND FROM \'2003-01-02\n10:30:00.000123\');\n+--------------------------------------------------------+\n| EXTRACT(MICROSECOND FROM \'2003-01-02 10:30:00.000123\') |\n+--------------------------------------------------------+\n| 123 |\n+--------------------------------------------------------+\n \nFrom MariaDB 10.0.7 and MariaDB 5.5.35, EXTRACT (HOUR\nFROM...) returns a value from 0 to 23, as per the SQL\nstandard. HOUR is not a standard function, so continues to\nadhere to the old behaviour inherited from MySQL.\n \nSELECT EXTRACT(HOUR FROM \'26:30:00\'), HOUR(\'26:30:00\');\n+-------------------------------+------------------+\n| EXTRACT(HOUR FROM \'26:30:00\') | HOUR(\'26:30:00\') |\n+-------------------------------+------------------+\n| 2 | 26 |\n+-------------------------------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/extract/','','https://mariadb.com/kb/en/extract/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (488,31,'FROM_DAYS','Syntax\n------ \nFROM_DAYS(N)\n \nDescription\n----------- \nGiven a day number N, returns a DATE value. The day count is\nbased on the number of days from the start of the standard\ncalendar (0000-00-00). \n \nThe function is not designed for use with dates before the\nadvent of the Gregorian calendar in October 1582. Results\nwill not be reliable since it doesn\'t account for the lost\ndays when the calendar changed from the Julian calendar.\n \nThis is the converse of the TO_DAYS() function.\n \nExamples\n-------- \nSELECT FROM_DAYS(730669);\n+-------------------+\n| FROM_DAYS(730669) |\n+-------------------+\n| 2000-07-03 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/from_days/','','https://mariadb.com/kb/en/from_days/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (489,31,'FROM_UNIXTIME','Syntax\n------ \nFROM_UNIXTIME(unix_timestamp),\nFROM_UNIXTIME(unix_timestamp,format)\n \nDescription\n----------- \nReturns a representation of the unix_timestamp argument as a\nvalue in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format,\ndepending on\nwhether the function is used in a string or numeric context.\nThe value\nis expressed in the current time zone. unix_timestamp is an\ninternal\ntimestamp value such as is produced by the UNIX_TIMESTAMP()\nfunction.\n \nIf format is given, the result is formatted according to the\nformat\nstring, which is used the same way as listed in the entry\nfor the\nDATE_FORMAT() function.\n \nTimestamps in MariaDB have a maximum value of 2147483647,\nequivalent to 2038-01-19 05:14:07. This is due to the\nunderlying 32-bit limitation. Using the function on a\ntimestamp beyond this will result in NULL being returned.\nUse DATETIME as a storage type if you require dates beyond\nthis.\n \nThe options that can be used by FROM_UNIXTIME(), as well as\nDATE_FORMAT() and STR_TO_DATE(), are:\n \nOption | Description | \n \n%a | Short weekday name in current locale (Variable\nlc_time_names). | \n \n%b | Short form month name in current locale. For locale\nen_US this is one of:\nJan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov or Dec. | \n \n%c | Month with 1 or 2 digits. | \n \n%D | Day with English suffix \'th\', \'nd\', \'st\' or\n\'rd\'\'. (1st, 2nd, 3rd...). | \n \n%d | Day with 2 digits. | \n \n%e | Day with 1 or 2 digits. | \n \n%f | Sub seconds 6 digits. | \n \n%H | Hour with 2 digits between 00-23. | \n \n%h | Hour with 2 digits between 01-12. | \n \n%I | Hour with 2 digits between 01-12. | \n \n%i | Minute with 2 digits. | \n \n%j | Day of the year (001-366) | \n \n%k | Hour with 1 digits between 0-23. | \n \n%l | Hour with 1 digits between 1-12. | \n \n%M | Full month name in current locale (Variable\nlc_time_names). | \n \n%m | Month with 2 digits. | \n \n%p | AM/PM according to current locale (Variable\nlc_time_names). | \n \n%r | Time in 12 hour format, followed by AM/PM. Short for\n\'%I:%i:%S %p\'. | \n \n%S | Seconds with 2 digits. | \n \n%s | Seconds with 2 digits. | \n \n%T | Time in 24 hour format. Short for \'%H:%i:%S\'. | \n \n%U | Week number (00-53), when first day of the week is\nSunday. | \n \n%u | Week number (00-53), when first day of the week is\nMonday. | \n \n%V | Week number (01-53), when first day of the week is\nSunday. Used with %X. | \n \n%v | Week number (01-53), when first day of the week is\nMonday. Used with %x. | \n \n%W | Full weekday name in current locale (Variable\nlc_time_names). | \n \n%w | Day of the week. 0 = Sunday, 1 = Saturday. | \n \n%X | Year with 4 digits when first day of the week is\nSunday. Used with %V. | \n \n%x | Year with 4 digits when first day of the week is\nSunday. Used with %v. | \n \n%Y | Year with 4 digits. | \n \n%y | Year with 2 digits. | \n \n%# | For str_to_date(), skip all numbers. | \n \n%. | For str_to_date(), skip all punctation characters. | \n \n%@ | For str_to_date(), skip all alpha characters. | \n \n%% | A literal % character. | \n \nPerformance Considerations\n \nIf your session time zone is set to SYSTEM (the default),\nFROM_UNIXTIME() will call the OS function to convert the\ndata using the system time zone. At least on Linux, the\ncorresponding function (localtime_r) uses a global mutex\ninside glibc that can cause contention under high concurrent\nload.\n \nSet your time zone to a named time zone to avoid this issue.\nSee mysql time zone tables for details on how to do this.\n \nExamples\n-------- \nSELECT FROM_UNIXTIME(1196440219);\n+---------------------------+\n| FROM_UNIXTIME(1196440219) |\n+---------------------------+\n| 2007-11-30 11:30:19 |\n+---------------------------+\n \nSELECT FROM_UNIXTIME(1196440219) + 0;\n \n+-------------------------------+\n| FROM_UNIXTIME(1196440219) + 0 |\n+-------------------------------+\n| 20071130113019.000000 |\n+-------------------------------+\n \nSELECT FROM_UNIXTIME(UNIX_TIMESTAMP(), \'%Y %D %M %h:%i:%s\n%x\');\n+---------------------------------------------------------+\n| FROM_UNIXTIME(UNIX_TIMESTAMP(), \'%Y %D %M %h:%i:%s %x\')\n|\n+---------------------------------------------------------+\n| 2010 27th March 01:03:47 2010 |\n+---------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/from_unixtime/','','https://mariadb.com/kb/en/from_unixtime/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (490,31,'GET_FORMAT','Syntax\n------ \nGET_FORMAT({DATE|DATETIME|TIME},\n{\'EUR\'|\'USA\'|\'JIS\'|\'ISO\'|\'INTERNAL\'})\n \nDescription\n----------- \nReturns a format string. This function is useful in\ncombination with\nthe DATE_FORMAT() and the STR_TO_DATE() functions.\n \nPossible result formats are:\n \nFunction Call | Result Format | \n \nGET_FORMAT(DATE,\'EUR\') | \'%d.%m.%Y\' | \n \nGET_FORMAT(DATE,\'USA\') | \'%m.%d.%Y\' | \n \nGET_FORMAT(DATE,\'JIS\') | \'%Y-%m-%d\' | \n \nGET_FORMAT(DATE,\'ISO\') | \'%Y-%m-%d\' | \n \nGET_FORMAT(DATE,\'INTERNAL\') | \'%Y%m%d\' | \n \nGET_FORMAT(DATETIME,\'EUR\') | \'%Y-%m-%d %H.%i.%s\' | \n \nGET_FORMAT(DATETIME,\'USA\') | \'%Y-%m-%d %H.%i.%s\' | \n \nGET_FORMAT(DATETIME,\'JIS\') | \'%Y-%m-%d %H:%i:%s\' | \n \nGET_FORMAT(DATETIME,\'ISO\') | \'%Y-%m-%d %H:%i:%s\' | \n \nGET_FORMAT(DATETIME,\'INTERNAL\') | \'%Y%m%d%H%i%s\' | \n \nGET_FORMAT(TIME,\'EUR\') | \'%H.%i.%s\' | \n \nGET_FORMAT(TIME,\'USA\') | \'%h:%i:%s %p\' | \n \nGET_FORMAT(TIME,\'JIS\') | \'%H:%i:%s\' | \n \nGET_FORMAT(TIME,\'ISO\') | \'%H:%i:%s\' | \n \nGET_FORMAT(TIME,\'INTERNAL\') | \'%H%i%s\' | \n \nExamples\n-------- \nObtaining the string matching to the standard European date\nformat:\n \nSELECT GET_FORMAT(DATE, \'EUR\');\n+-------------------------+\n| GET_FORMAT(DATE, \'EUR\') |\n+-------------------------+\n| %d.%m.%Y |\n+-------------------------+\n \nUsing the same string to format a date:\n \nSELECT DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\'));\n+--------------------------------------------------+\n| DATE_FORMAT(\'2003-10-03\',GET_FORMAT(DATE,\'EUR\')) |\n+--------------------------------------------------+\n| 03.10.2003 |\n+--------------------------------------------------+\n \nSELECT STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\'));\n+--------------------------------------------------+\n| STR_TO_DATE(\'10.31.2003\',GET_FORMAT(DATE,\'USA\')) |\n+--------------------------------------------------+\n| 2003-10-31 |\n+--------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/get_format/','','https://mariadb.com/kb/en/get_format/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (491,31,'HOUR','Syntax\n------ \nHOUR(time)\n \nDescription\n----------- \nReturns the hour for time. The range of the return value is\n0 to 23\nfor time-of-day values. However, the range of TIME values\nactually is\nmuch larger, so HOUR can return values greater than 23.\n \nThe return value is always positive, even if a negative TIME\nvalue is provided.\n \nExamples\n-------- \nSELECT HOUR(\'10:05:03\');\n+------------------+\n| HOUR(\'10:05:03\') |\n+------------------+\n| 10 |\n+------------------+\n \nSELECT HOUR(\'272:59:59\');\n+-------------------+\n| HOUR(\'272:59:59\') |\n+-------------------+\n| 272 |\n+-------------------+\n \nDifference between EXTRACT (HOUR FROM ...) (>= MariaDB\n10.0.7 and MariaDB 5.5.35) and HOUR:\n \nSELECT EXTRACT(HOUR FROM \'26:30:00\'), HOUR(\'26:30:00\');\n+-------------------------------+------------------+\n| EXTRACT(HOUR FROM \'26:30:00\') | HOUR(\'26:30:00\') |\n+-------------------------------+------------------+\n| 2 | 26 |\n+-------------------------------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/hour/','','https://mariadb.com/kb/en/hour/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (492,31,'LAST_DAY','Syntax\n------ \nLAST_DAY(date)\n \nDescription\n----------- \nTakes a date or datetime value and returns the corresponding\nvalue for\nthe last day of the month. Returns NULL if the argument is\ninvalid.\n \nExamples\n-------- \nSELECT LAST_DAY(\'2003-02-05\');\n+------------------------+\n| LAST_DAY(\'2003-02-05\') |\n+------------------------+\n| 2003-02-28 |\n+------------------------+\n \nSELECT LAST_DAY(\'2004-02-05\');\n+------------------------+\n| LAST_DAY(\'2004-02-05\') |\n+------------------------+\n| 2004-02-29 |\n+------------------------+\n \nSELECT LAST_DAY(\'2004-01-01 01:01:01\');\n+---------------------------------+\n| LAST_DAY(\'2004-01-01 01:01:01\') |\n+---------------------------------+\n| 2004-01-31 |\n+---------------------------------+\n \nSELECT LAST_DAY(\'2003-03-32\');\n+------------------------+\n| LAST_DAY(\'2003-03-32\') |\n+------------------------+\n| NULL |\n+------------------------+\n1 row in set, 1 warning (0.00 sec)\n \nWarning (Code 1292): Incorrect datetime value:\n\'2003-03-32\'\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/last_day/','','https://mariadb.com/kb/en/last_day/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (493,31,'LOCALTIME','Syntax\n------ \nLOCALTIME\nLOCALTIME([precision])\n \nDescription\n----------- \nLOCALTIME and LOCALTIME() are synonyms for NOW().\n \n\n\nURL: https://mariadb.com/kb/en/localtime/','','https://mariadb.com/kb/en/localtime/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (494,31,'LOCALTIMESTAMP','Syntax\n------ \nLOCALTIMESTAMP\nLOCALTIMESTAMP([precision])\n \nDescription\n----------- \nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n \n\n\nURL: https://mariadb.com/kb/en/localtimestamp/','','https://mariadb.com/kb/en/localtimestamp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (495,31,'MAKEDATE','Syntax\n------ \nMAKEDATE(year,dayofyear)\n \nDescription\n----------- \nReturns a date, given year and day-of-year values. dayofyear\nmust be\ngreater than 0 or the result is NULL.\n \nExamples\n-------- \nSELECT MAKEDATE(2011,31), MAKEDATE(2011,32);\n+-------------------+-------------------+\n| MAKEDATE(2011,31) | MAKEDATE(2011,32) |\n+-------------------+-------------------+\n| 2011-01-31 | 2011-02-01 |\n+-------------------+-------------------+\n \nSELECT MAKEDATE(2011,365), MAKEDATE(2014,365);\n+--------------------+--------------------+\n| MAKEDATE(2011,365) | MAKEDATE(2014,365) |\n+--------------------+--------------------+\n| 2011-12-31 | 2014-12-31 |\n+--------------------+--------------------+\n \nSELECT MAKEDATE(2011,0);\n+------------------+\n| MAKEDATE(2011,0) |\n+------------------+\n| NULL |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/makedate/','','https://mariadb.com/kb/en/makedate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (496,31,'MAKETIME','Syntax\n------ \nMAKETIME(hour,minute,second)\n \nDescription\n----------- \nReturns a time value calculated from the hour, minute, and\nsecond arguments.\n \nIf minute or second are out of the range 0 to 60, NULL is\nreturned. The hour can be in the range -838 to 838, outside\nof which the value is truncated with a warning.\n \nExamples\n-------- \nSELECT MAKETIME(13,57,33);\n+--------------------+\n| MAKETIME(13,57,33) |\n+--------------------+\n| 13:57:33 |\n+--------------------+\n \nSELECT MAKETIME(-13,57,33);\n+---------------------+\n| MAKETIME(-13,57,33) |\n+---------------------+\n| -13:57:33 |\n+---------------------+\n \nSELECT MAKETIME(13,67,33);\n+--------------------+\n| MAKETIME(13,67,33) |\n+--------------------+\n| NULL |\n+--------------------+\n \nSELECT MAKETIME(-1000,57,33);\n+-----------------------+\n| MAKETIME(-1000,57,33) |\n+-----------------------+\n| -838:59:59 |\n+-----------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+-----------------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------------+\n| Warning | 1292 | Truncated incorrect time value:\n\'-1000:57:33\' |\n+---------+------+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/maketime/','','https://mariadb.com/kb/en/maketime/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (497,31,'MICROSECOND','Syntax\n------ \nMICROSECOND(expr)\n \nDescription\n----------- \nReturns the microseconds from the time or datetime\nexpression expr as a number in the range from 0 to 999999.\n \nIf expr is a time with no microseconds, zero is returned,\nwhile if expr is a date with no time, zero with a warning is\nreturned.\n \nExamples\n-------- \nSELECT MICROSECOND(\'12:00:00.123456\');\n+--------------------------------+\n| MICROSECOND(\'12:00:00.123456\') |\n+--------------------------------+\n| 123456 |\n+--------------------------------+\n \nSELECT MICROSECOND(\'2009-12-31 23:59:59.000010\');\n+-------------------------------------------+\n| MICROSECOND(\'2009-12-31 23:59:59.000010\') |\n+-------------------------------------------+\n| 10 |\n+-------------------------------------------+\n \nSELECT MICROSECOND(\'2013-08-07 12:13:14\');\n+------------------------------------+\n| MICROSECOND(\'2013-08-07 12:13:14\') |\n+------------------------------------+\n| 0 |\n+------------------------------------+\n \nSELECT MICROSECOND(\'2013-08-07\');\n+---------------------------+\n| MICROSECOND(\'2013-08-07\') |\n+---------------------------+\n| 0 |\n+---------------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+----------------------------------------------+\n| Level | Code | Message |\n+---------+------+----------------------------------------------+\n| Warning | 1292 | Truncated incorrect time value:\n\'2013-08-07\' |\n+---------+------+----------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/microsecond/','','https://mariadb.com/kb/en/microsecond/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (498,31,'MINUTE','Syntax\n------ \nMINUTE(time)\n \nDescription\n----------- \nReturns the minute for time, in the range 0 to 59. \n \nExamples\n-------- \nSELECT MINUTE(\'2013-08-03 11:04:03\');\n+-------------------------------+\n| MINUTE(\'2013-08-03 11:04:03\') |\n+-------------------------------+\n| 4 |\n+-------------------------------+\n \n SELECT MINUTE (\'23:12:50\');\n+---------------------+\n| MINUTE (\'23:12:50\') |\n+---------------------+\n| 12 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/minute/','','https://mariadb.com/kb/en/minute/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (499,31,'MONTH','Syntax\n------ \nMONTH(date)\n \nDescription\n----------- \nReturns the month for date in the range 1 to 12 for January\nto\nDecember, or 0 for dates such as \'0000-00-00\' or\n\'2008-00-00\' that\nhave a zero month part.\n \nExamples\n-------- \nSELECT MONTH(\'2019-01-03\');\n+---------------------+\n| MONTH(\'2019-01-03\') |\n+---------------------+\n| 1 |\n+---------------------+\n \nSELECT MONTH(\'2019-00-03\');\n+---------------------+\n| MONTH(\'2019-00-03\') |\n+---------------------+\n| 0 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/month/','','https://mariadb.com/kb/en/month/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (500,31,'MONTHNAME','Syntax\n------ \nMONTHNAME(date)\n \nDescription\n----------- \nReturns the full name of the month for date. The language\nused for the name is controlled by the value of the\nlc_time_names system variable. See server locale for more on\nthe supported locales.\n \nExamples\n-------- \nSELECT MONTHNAME(\'2019-02-03\');\n+-------------------------+\n| MONTHNAME(\'2019-02-03\') |\n+-------------------------+\n| February |\n+-------------------------+\n \nChanging the locale:\n \nSET lc_time_names = \'fr_CA\';\n \nSELECT MONTHNAME(\'2019-05-21\');\n+-------------------------+\n| MONTHNAME(\'2019-05-21\') |\n+-------------------------+\n| mai |\n+-------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/monthname/','','https://mariadb.com/kb/en/monthname/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (501,31,'NOW','Syntax\n------ \nNOW([precision])\nCURRENT_TIMESTAMP\nCURRENT_TIMESTAMP([precision])\nLOCALTIME, LOCALTIME([precision])\nLOCALTIMESTAMP\nLOCALTIMESTAMP([precision])\n \nDescription\n----------- \nReturns the current date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is\nused in a string or numeric context. The value is expressed\nin the\ncurrent time zone.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nNOW() (or its synonyms) can be used as the default value for\nTIMESTAMP columns as well as, since MariaDB 10.0.1, DATETIME\ncolumns. Before MariaDB 10.0.1, it was only possible for a\nsingle TIMESTAMP column per table to contain the\nCURRENT_TIMESTAMP as its default.\n \nWhen displayed in the INFORMATION_SCHEMA.COLUMNS table, a\ndefault CURRENT TIMESTAMP is displayed as CURRENT_TIMESTAMP\nup until MariaDB 10.2.2, and as current_timestamp() from\nMariaDB 10.2.3, due to to MariaDB 10.2 accepting expressions\nin the DEFAULT clause.\n \nExamples\n-------- \nSELECT NOW();\n+---------------------+\n| NOW() |\n+---------------------+\n| 2010-03-27 13:13:25 |\n+---------------------+\n \nSELECT NOW() + 0;\n \n+-----------------------+\n| NOW() + 0 |\n+-----------------------+\n| 20100327131329.000000 |\n+-----------------------+\n \nWith precision:\n \nSELECT CURRENT_TIMESTAMP(2);\n+------------------------+\n| CURRENT_TIMESTAMP(2) |\n+------------------------+\n| 2018-07-10 09:47:26.24 |\n+------------------------+\n \nUsed as a default TIMESTAMP:\n \nCREATE TABLE t (createdTS TIMESTAMP NOT NULL DEFAULT\nCURRENT_TIMESTAMP);\n \nFrom MariaDB 10.2.2:\n \nSELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE\nTABLE_SCHEMA=\'test\'\n AND COLUMN_NAME LIKE \'%ts%\'\\G\n*************************** 1. row\n***************************\n TABLE_CATALOG: def\n TABLE_SCHEMA: test\n TABLE_NAME: t\n COLUMN_NAME: ts\n ORDINAL_POSITION: 1\n COLUMN_DEFAULT: current_timestamp()\n...\n \n\n\nURL: https://mariadb.com/kb/en/now/','','https://mariadb.com/kb/en/now/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (502,31,'PERIOD_ADD','Syntax\n------ \nPERIOD_ADD(P,N)\n \nDescription\n----------- \nAdds N months to period P. P is in the format YYMM or\nYYYYMM, and is not a date value. If P contains a two-digit\nyear, values from 00 to 69 are converted to from 2000 to\n2069, while values from 70 are converted to 1970 upwards.\n \nReturns a value in the format YYYYMM.\n \nExamples\n-------- \nSELECT PERIOD_ADD(200801,2);\n+----------------------+\n| PERIOD_ADD(200801,2) |\n+----------------------+\n| 200803 |\n+----------------------+\n \nSELECT PERIOD_ADD(6910,2);\n+--------------------+\n| PERIOD_ADD(6910,2) |\n+--------------------+\n| 206912 |\n+--------------------+\n \nSELECT PERIOD_ADD(7010,2);\n+--------------------+\n| PERIOD_ADD(7010,2) |\n+--------------------+\n| 197012 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/period_add/','','https://mariadb.com/kb/en/period_add/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (503,31,'PERIOD_DIFF','Syntax\n------ \nPERIOD_DIFF(P1,P2)\n \nDescription\n----------- \nReturns the number of months between periods P1 and P2. P1\nand P2 \ncan be in the format YYMM or YYYYMM, and are not date\nvalues.\n \nIf P1 or P2 contains a two-digit year, values from 00 to 69\nare converted to from 2000 to 2069, while values from 70 are\nconverted to 1970 upwards.\n \nExamples\n-------- \nSELECT PERIOD_DIFF(200802,200703);\n+----------------------------+\n| PERIOD_DIFF(200802,200703) |\n+----------------------------+\n| 11 |\n+----------------------------+\n \nSELECT PERIOD_DIFF(6902,6803);\n+------------------------+\n| PERIOD_DIFF(6902,6803) |\n+------------------------+\n| 11 |\n+------------------------+\n \nSELECT PERIOD_DIFF(7002,6803);\n+------------------------+\n| PERIOD_DIFF(7002,6803) |\n+------------------------+\n| -1177 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/period_diff/','','https://mariadb.com/kb/en/period_diff/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (504,31,'QUARTER','Syntax\n------ \nQUARTER(date)\n \nDescription\n----------- \nReturns the quarter of the year for date, in the range 1 to\n4. Returns 0 if month contains a zero value, or NULL if the\ngiven value is not otherwise a valid date (zero values are\naccepted).\n \nExamples\n-------- \nSELECT QUARTER(\'2008-04-01\');\n+-----------------------+\n| QUARTER(\'2008-04-01\') |\n+-----------------------+\n| 2 |\n+-----------------------+\n \nSELECT QUARTER(\'2019-00-01\');\n+-----------------------+\n| QUARTER(\'2019-00-01\') |\n+-----------------------+\n| 0 |\n+-----------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/quarter/','','https://mariadb.com/kb/en/quarter/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (505,31,'SECOND','Syntax\n------ \nSECOND(time)\n \nDescription\n----------- \nReturns the second for a given time (which can include\nmicroseconds), in the range 0 to 59, or NULL if not given a\nvalid time value.\n \nExamples\n-------- \nSELECT SECOND(\'10:05:03\');\n+--------------------+\n| SECOND(\'10:05:03\') |\n+--------------------+\n| 3 |\n+--------------------+\n \nSELECT SECOND(\'10:05:01.999999\');\n+---------------------------+\n| SECOND(\'10:05:01.999999\') |\n+---------------------------+\n| 1 |\n+---------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/second/','','https://mariadb.com/kb/en/second/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (506,31,'SEC_TO_TIME','Syntax\n------ \nSEC_TO_TIME(seconds)\n \nDescription\n----------- \nReturns the seconds argument, converted to hours, minutes,\nand\nseconds, as a TIME value. The range of the result is\nconstrained to\nthat of the TIME data type. A warning occurs if the argument\ncorresponds to a value outside that range.\n \nThe time will be returned in the format hh:mm:ss, or hhmmss\nif used in a numeric calculation.\n \nExamples\n-------- \nSELECT SEC_TO_TIME(12414);\n+--------------------+\n| SEC_TO_TIME(12414) |\n+--------------------+\n| 03:26:54 |\n+--------------------+\n \nSELECT SEC_TO_TIME(12414)+0;\n \n+----------------------+\n| SEC_TO_TIME(12414)+0 |\n+----------------------+\n| 32654 |\n+----------------------+\n \nSELECT SEC_TO_TIME(9999999);\n+----------------------+\n| SEC_TO_TIME(9999999) |\n+----------------------+\n| 838:59:59 |\n+----------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+-------------------------------------------+\n| Level | Code | Message |\n+---------+------+-------------------------------------------+\n| Warning | 1292 | Truncated incorrect time value:\n\'9999999\' |\n+---------+------+-------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sec_to_time/','','https://mariadb.com/kb/en/sec_to_time/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (507,31,'STR_TO_DATE','Syntax\n------ \nSTR_TO_DATE(str,format)\n \nDescription\n----------- \nThis is the inverse of the DATE_FORMAT() function. It takes\na string str and a format string format. STR_TO_DATE()\nreturns a\nDATETIME value if the format string contains both date and\ntime parts, or a\nDATE or TIME value if the string contains only date or time\nparts.\n \nThe date, time, or datetime values contained in str should\nbe given in the format indicated by format. If str contains\nan illegal date, time, or datetime value, STR_TO_DATE()\nreturns NULL. An illegal value also produces a warning.\n \nThe options that can be used by STR_TO_DATE(), as well as\nits inverse DATE_FORMAT() and the FROM_UNIXTIME() function,\nare:\n \nOption | Description | \n \n%a | Short weekday name in current locale (Variable\nlc_time_names). | \n \n%b | Short form month name in current locale. For locale\nen_US this is one of:\nJan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov or Dec. | \n \n%c | Month with 1 or 2 digits. | \n \n%D | Day with English suffix \'th\', \'nd\', \'st\' or\n\'rd\'\'. (1st, 2nd, 3rd...). | \n \n%d | Day with 2 digits. | \n \n%e | Day with 1 or 2 digits. | \n \n%f | Sub seconds 6 digits. | \n \n%H | Hour with 2 digits between 00-23. | \n \n%h | Hour with 2 digits between 01-12. | \n \n%I | Hour with 2 digits between 01-12. | \n \n%i | Minute with 2 digits. | \n \n%j | Day of the year (001-366) | \n \n%k | Hour with 1 digits between 0-23. | \n \n%l | Hour with 1 digits between 1-12. | \n \n%M | Full month name in current locale (Variable\nlc_time_names). | \n \n%m | Month with 2 digits. | \n \n%p | AM/PM according to current locale (Variable\nlc_time_names). | \n \n%r | Time in 12 hour format, followed by AM/PM. Short for\n\'%I:%i:%S %p\'. | \n \n%S | Seconds with 2 digits. | \n \n%s | Seconds with 2 digits. | \n \n%T | Time in 24 hour format. Short for \'%H:%i:%S\'. | \n \n%U | Week number (00-53), when first day of the week is\nSunday. | \n \n%u | Week number (00-53), when first day of the week is\nMonday. | \n \n%V | Week number (01-53), when first day of the week is\nSunday. Used with %X. | \n \n%v | Week number (01-53), when first day of the week is\nMonday. Used with %x. | \n \n%W | Full weekday name in current locale (Variable\nlc_time_names). | \n \n%w | Day of the week. 0 = Sunday, 6 = Saturday. | \n \n%X | Year with 4 digits when first day of the week is\nSunday. Used with %V. | \n \n%x | Year with 4 digits when first day of the week is\nMonday. Used with %v. | \n \n%Y | Year with 4 digits. | \n \n%y | Year with 2 digits. | \n \n%# | For str_to_date(), skip all numbers. | \n \n%. | For str_to_date(), skip all punctation characters. | \n \n%@ | For str_to_date(), skip all alpha characters. | \n \n%% | A literal % character. | \n \nExamples\n-------- \nSELECT STR_TO_DATE(\'Wednesday, June 2, 2014\', \'%W, %M %e,\n%Y\');\n+---------------------------------------------------------+\n| STR_TO_DATE(\'Wednesday, June 2, 2014\', \'%W, %M %e,\n%Y\') |\n+---------------------------------------------------------+\n| 2014-06-02 |\n+---------------------------------------------------------+\n \nSELECT STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W,\n%M %e, %Y\');\n+--------------------------------------------------------------+\n| STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W, %M %e,\n%Y\') |\n+--------------------------------------------------------------+\n| NULL |\n+--------------------------------------------------------------+\n1 row in set, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+---------+------+-----------------------------------------------------------------------------------+\n| Level | Code | Message |\n+---------+------+-----------------------------------------------------------------------------------+\n| Warning | 1411 | Incorrect datetime value:\n\'Wednesday23423, June 2, 2014\' for function str_to_date |\n+---------+------+-----------------------------------------------------------------------------------+\n \nSELECT STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W%#,\n%M %e, %Y\');\n+----------------------------------------------------------------+\n| STR_TO_DATE(\'Wednesday23423, June 2, 2014\', \'%W%#, %M\n%e, %Y\') |\n+----------------------------------------------------------------+\n| 2014-06-02 |\n+----------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/str_to_date/','','https://mariadb.com/kb/en/str_to_date/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (508,31,'SUBDATE','Syntax\n------ \nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n \nDescription\n----------- \nWhen invoked with the INTERVAL form of the second argument,\nSUBDATE()\nis a synonym for DATE_SUB(). See Date and Time Units for a\ncomplete list of permitted units. \n \nThe second form allows the use of an integer value for days.\nIn such\ncases, it is interpreted as the number of days to be\nsubtracted from\nthe date or datetime expression expr.\n \nExamples\n-------- \nSELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n+-----------------------------------------+\n| DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY) |\n+-----------------------------------------+\n| 2007-12-02 |\n+-----------------------------------------+\n \nSELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n+----------------------------------------+\n| SUBDATE(\'2008-01-02\', INTERVAL 31 DAY) |\n+----------------------------------------+\n| 2007-12-02 |\n+----------------------------------------+\n \nSELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n+------------------------------------+\n| SUBDATE(\'2008-01-02 12:00:00\', 31) |\n+------------------------------------+\n| 2007-12-02 12:00:00 |\n+------------------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, SUBDATE(d, 10) from t1;\n \n+---------------------+---------------------+\n| d | SUBDATE(d, 10) |\n+---------------------+---------------------+\n| 2007-01-30 21:31:07 | 2007-01-20 21:31:07 |\n| 1983-10-15 06:42:51 | 1983-10-05 06:42:51 |\n| 2011-04-21 12:34:56 | 2011-04-11 12:34:56 |\n| 2011-10-30 06:31:41 | 2011-10-20 06:31:41 |\n| 2011-01-30 14:03:25 | 2011-01-20 14:03:25 |\n| 2004-10-07 11:19:34 | 2004-09-27 11:19:34 |\n+---------------------+---------------------+\n \nSELECT d, SUBDATE(d, INTERVAL 10 MINUTE) from t1;\n \n+---------------------+--------------------------------+\n| d | SUBDATE(d, INTERVAL 10 MINUTE) |\n+---------------------+--------------------------------+\n| 2007-01-30 21:31:07 | 2007-01-30 21:21:07 |\n| 1983-10-15 06:42:51 | 1983-10-15 06:32:51 |\n| 2011-04-21 12:34:56 | 2011-04-21 12:24:56 |\n| 2011-10-30 06:31:41 | 2011-10-30 06:21:41 |\n| 2011-01-30 14:03:25 | 2011-01-30 13:53:25 |\n| 2004-10-07 11:19:34 | 2004-10-07 11:09:34 |\n+---------------------+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/subdate/','','https://mariadb.com/kb/en/subdate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (509,31,'SUBTIME','Syntax\n------ \nSUBTIME(expr1,expr2)\n \nDescription\n----------- \nSUBTIME() returns expr1 - expr2 expressed as a value in the\nsame\nformat as expr1. expr1 is a time or datetime expression, and\nexpr2 is\na time expression.\n \nExamples\n-------- \nSELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1\n1:1:1.000002\');\n+--------------------------------------------------------+\n| SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\')\n|\n+--------------------------------------------------------+\n| 2007-12-30 22:58:58.999997 |\n+--------------------------------------------------------+\n \nSELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n+-----------------------------------------------+\n| SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\') |\n+-----------------------------------------------+\n| -00:59:59.999999 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/subtime/','','https://mariadb.com/kb/en/subtime/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (510,31,'SYSDATE','Syntax\n------ \nSYSDATE([precision])\n \nDescription\n----------- \nReturns the current date and time as a value in \'YYYY-MM-DD\nHH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the\nfunction is\nused in a string or numeric context.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nSYSDATE() returns the time at which it executes. This\ndiffers from the\nbehavior for NOW(), which returns a constant time that\nindicates the\ntime at which the statement began to execute. (Within a\nstored routine\nor trigger, NOW() returns the time at which the routine or\ntriggering\nstatement began to execute.)\n \nIn addition, changing the timestamp system variable with a\nSET timestamp statement affects the value returned by\nNOW() but not by SYSDATE(). This means that timestamp\nsettings in the\nbinary log have no effect on invocations of SYSDATE().\n \nBecause SYSDATE() can return different values even within\nthe same\nstatement, and is not affected by SET TIMESTAMP, it is\nnon-deterministic and therefore unsafe for replication if\nstatement-based binary logging is used. If that is a\nproblem, you can\nuse row-based logging, or start the server with the mysqld\noption --sysdate-is-now to cause SYSDATE() to be an alias\nfor NOW(). The non-deterministic nature of SYSDATE() also\nmeans that indexes cannot be used for evaluating expressions\nthat refer to it, and that statements using the SYSDATE()\nfunction are unsafe for statement-based replication.\n \nExamples\n-------- \nDifference between NOW() and SYSDATE():\n \nSELECT NOW(), SLEEP(2), NOW();\n+---------------------+----------+---------------------+\n| NOW() | SLEEP(2) | NOW() |\n+---------------------+----------+---------------------+\n| 2010-03-27 13:23:40 | 0 | 2010-03-27 13:23:40 |\n+---------------------+----------+---------------------+\n \nSELECT SYSDATE(), SLEEP(2), SYSDATE();\n+---------------------+----------+---------------------+\n| SYSDATE() | SLEEP(2) | SYSDATE() |\n+---------------------+----------+---------------------+\n| 2010-03-27 13:23:52 | 0 | 2010-03-27 13:23:54 |\n+---------------------+----------+---------------------+\n \nWith precision:\n \nSELECT SYSDATE(4);\n+--------------------------+\n| SYSDATE(4) |\n+--------------------------+\n| 2018-07-10 10:17:13.1689 |\n+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/sysdate/','','https://mariadb.com/kb/en/sysdate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (511,31,'TIME Function','Syntax\n------ \nTIME(expr)\n \nDescription\n----------- \nExtracts the time part of the time or datetime expression\nexpr and\nreturns it as a string.\n \nExamples\n-------- \nSELECT TIME(\'2003-12-31 01:02:03\');\n+-----------------------------+\n| TIME(\'2003-12-31 01:02:03\') |\n+-----------------------------+\n| 01:02:03 |\n+-----------------------------+\n \nSELECT TIME(\'2003-12-31 01:02:03.000123\');\n+------------------------------------+\n| TIME(\'2003-12-31 01:02:03.000123\') |\n+------------------------------------+\n| 01:02:03.000123 |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/time-function/','','https://mariadb.com/kb/en/time-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (512,31,'TIMEDIFF','Syntax\n------ \nTIMEDIFF(expr1,expr2)\n \nDescription\n----------- \nTIMEDIFF() returns expr1 - expr2 expressed as a time value.\nexpr1 and\nexpr2 are time or date-and-time expressions, but both must\nbe of the\nsame type.\n \nExamples\n-------- \nSELECT TIMEDIFF(\'2000:01:01 00:00:00\', \'2000:01:01\n00:00:00.000001\');\n+---------------------------------------------------------------+\n| TIMEDIFF(\'2000:01:01 00:00:00\', \'2000:01:01\n00:00:00.000001\') |\n+---------------------------------------------------------------+\n| -00:00:00.000001 |\n+---------------------------------------------------------------+\n \nSELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\', \'2008-12-30\n01:01:01.000002\');\n+----------------------------------------------------------------------+\n| TIMEDIFF(\'2008-12-31 23:59:59.000001\', \'2008-12-30\n01:01:01.000002\') |\n+----------------------------------------------------------------------+\n| 46:58:57.999999 |\n+----------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timediff/','','https://mariadb.com/kb/en/timediff/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (513,31,'TIMESTAMP FUNCTION','Syntax\n------ \nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n \nDescription\n----------- \nWith a single argument, this function returns the date or\ndatetime\nexpression expr as a datetime value. With two arguments, it\nadds the\ntime expression expr2 to the date or datetime expression\nexpr1 and\nreturns the result as a datetime value.\n \nExamples\n-------- \nSELECT TIMESTAMP(\'2003-12-31\');\n+-------------------------+\n| TIMESTAMP(\'2003-12-31\') |\n+-------------------------+\n| 2003-12-31 00:00:00 |\n+-------------------------+\n \nSELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'6:30:00\');\n+--------------------------------------------+\n| TIMESTAMP(\'2003-12-31 12:00:00\',\'6:30:00\') |\n+--------------------------------------------+\n| 2003-12-31 18:30:00 |\n+--------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timestamp-function/','','https://mariadb.com/kb/en/timestamp-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (514,31,'TIMESTAMPADD','Syntax\n------ \nTIMESTAMPADD(unit,interval,datetime_expr)\n \nDescription\n----------- \nAdds the integer expression interval to the date or datetime\nexpression datetime_expr. The unit for interval is given by\nthe unit\nargument, which should be one of the following values:\nMICROSECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH,\nQUARTER, or YEAR.\n \nThe unit value may be specified using one of keywords as\nshown, or\nwith a prefix of SQL_TSI_. For example, DAY and SQL_TSI_DAY\nboth are\nlegal.\n \nBefore MariaDB 5.5, FRAC_SECOND was permitted as a synonym\nfor MICROSECOND.\n \nExamples\n-------- \nSELECT TIMESTAMPADD(MINUTE,1,\'2003-01-02\');\n+-------------------------------------+\n| TIMESTAMPADD(MINUTE,1,\'2003-01-02\') |\n+-------------------------------------+\n| 2003-01-02 00:01:00 |\n+-------------------------------------+\n \nSELECT TIMESTAMPADD(WEEK,1,\'2003-01-02\');\n+-----------------------------------+\n| TIMESTAMPADD(WEEK,1,\'2003-01-02\') |\n+-----------------------------------+\n| 2003-01-09 |\n+-----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timestampadd/','','https://mariadb.com/kb/en/timestampadd/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (515,31,'TIMESTAMPDIFF','Syntax\n------ \nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n \nDescription\n----------- \nReturns datetime_expr2 - datetime_expr1, where\ndatetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One\nexpression may be\na date and the other a datetime; a date value is treated as\na datetime\nhaving the time part \'00:00:00\' where necessary. The unit\nfor the\nresult (an integer) is given by the unit argument. The legal\nvalues\nfor unit are the same as those listed in the description of\nthe\nTIMESTAMPADD() function, i.e MICROSECOND, SECOND, MINUTE,\nHOUR, DAY, WEEK, MONTH, QUARTER, or YEAR.\n \nTIMESTAMPDIFF can also be used to calculate age.\n \nExamples\n-------- \nSELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n+------------------------------------------------+\n| TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\') |\n+------------------------------------------------+\n| 3 |\n+------------------------------------------------+\n \nSELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n+-----------------------------------------------+\n| TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\') |\n+-----------------------------------------------+\n| -1 |\n+-----------------------------------------------+\n \nSELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01\n12:05:55\');\n+----------------------------------------------------------+\n| TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01\n12:05:55\') |\n+----------------------------------------------------------+\n| 128885 |\n+----------------------------------------------------------+\n \nCalculating age:\n \nSELECT CURDATE();\n+------------+\n| CURDATE() |\n+------------+\n| 2019-05-27 |\n+------------+\n \nSELECT TIMESTAMPDIFF(YEAR, \'1971-06-06\', CURDATE()) AS\nage;\n \n+------+\n| age |\n+------+\n| 47 |\n+------+\n \nSELECT TIMESTAMPDIFF(YEAR, \'1971-05-06\', CURDATE()) AS\nage;\n \n+------+\n| age |\n+------+\n| 48 |\n+------+\n \nAge as of 2014-08-02:\n \nSELECT name, date_of_birth,\nTIMESTAMPDIFF(YEAR,date_of_birth,\'2014-08-02\') AS age \n FROM student_details;\n \n+---------+---------------+------+\n| name | date_of_birth | age |\n+---------+---------------+------+\n| Chun | 1993-12-31 | 20 |\n| Esben | 1946-01-01 | 68 |\n| Kaolin | 1996-07-16 | 18 |\n| Tatiana | 1988-04-13 | 26 |\n+---------+---------------+------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/timestampdiff/','','https://mariadb.com/kb/en/timestampdiff/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (516,31,'TIME_FORMAT','Syntax\n------ \nTIME_FORMAT(time,format)\n \nDescription\n----------- \nThis is used like the DATE_FORMAT() function, but the format\nstring\nmay contain format specifiers only for hours, minutes, and\nseconds.\nOther specifiers produce a NULL value or 0.\n \nExamples\n-------- \nSELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n+--------------------------------------------+\n| TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\') |\n+--------------------------------------------+\n| 100 100 04 04 4 |\n+--------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/time_format/','','https://mariadb.com/kb/en/time_format/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (517,31,'TIME_TO_SEC','Syntax\n------ \nTIME_TO_SEC(time)\n \nDescription\n----------- \nReturns the time argument, converted to seconds.\n \nThe value returned by TIME_TO_SEC is of type DOUBLE. Before\nMariaDB 5.3 (and MySQL 5.6), the type was INT. See\nMicroseconds in MariaDB.\n \nExamples\n-------- \nSELECT TIME_TO_SEC(\'22:23:00\');\n+-------------------------+\n| TIME_TO_SEC(\'22:23:00\') |\n+-------------------------+\n| 80580 |\n+-------------------------+\n \nSELECT TIME_TO_SEC(\'00:39:38\');\n+-------------------------+\n| TIME_TO_SEC(\'00:39:38\') |\n+-------------------------+\n| 2378 |\n+-------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/time_to_sec/','','https://mariadb.com/kb/en/time_to_sec/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (518,31,'TO_DAYS','Syntax\n------ \nTO_DAYS(date)\n \nDescription\n----------- \nGiven a date date, returns the number of days since the\nstart of the current calendar (0000-00-00).\n \nThe function is not designed for use with dates before the\nadvent of the Gregorian calendar in October 1582. Results\nwill not be reliable since it doesn\'t account for the lost\ndays when the calendar changed from the Julian calendar.\n \nThis is the converse of the FROM_DAYS() function.\n \nExamples\n-------- \nSELECT TO_DAYS(\'2007-10-07\');\n+-----------------------+\n| TO_DAYS(\'2007-10-07\') |\n+-----------------------+\n| 733321 |\n+-----------------------+\n \nSELECT TO_DAYS(\'0000-01-01\');\n+-----------------------+\n| TO_DAYS(\'0000-01-01\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nSELECT TO_DAYS(950501);\n+-----------------+\n| TO_DAYS(950501) |\n+-----------------+\n| 728779 |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/to_days/','','https://mariadb.com/kb/en/to_days/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (519,31,'TO_SECONDS','Syntax\n------ \nTO_SECONDS(expr)\n \nDescription\n----------- \nReturns the number of seconds from year 0 till expr, or NULL\nif expr is not a valid date or datetime.\n \nExamples\n-------- \nSELECT TO_SECONDS(\'2013-06-13\');\n+--------------------------+\n| TO_SECONDS(\'2013-06-13\') |\n+--------------------------+\n| 63538300800 |\n+--------------------------+\n \nSELECT TO_SECONDS(\'2013-06-13 21:45:13\');\n+-----------------------------------+\n| TO_SECONDS(\'2013-06-13 21:45:13\') |\n+-----------------------------------+\n| 63538379113 |\n+-----------------------------------+\n \nSELECT TO_SECONDS(NOW());\n+-------------------+\n| TO_SECONDS(NOW()) |\n+-------------------+\n| 63543530875 |\n+-------------------+\n \nSELECT TO_SECONDS(20130513);\n+----------------------+\n| TO_SECONDS(20130513) |\n+----------------------+\n| 63535622400 |\n+----------------------+\n1 row in set (0.00 sec)\n \nSELECT TO_SECONDS(130513);\n+--------------------+\n| TO_SECONDS(130513) |\n+--------------------+\n| 63535622400 |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/to_seconds/','','https://mariadb.com/kb/en/to_seconds/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (520,31,'UNIX_TIMESTAMP','Syntax\n------ \nUNIX_TIMESTAMP()\nUNIX_TIMESTAMP(date)\n \nDescription\n----------- \nIf called with no argument, returns a Unix timestamp\n(seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If\nUNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the\nargument as seconds\nsince \'1970-01-01 00:00:00\' UTC. date may be a DATE\nstring, a\nDATETIME string, a TIMESTAMP, or a number in\nthe format YYMMDD or YYYYMMDD. The server interprets date as\na value in the\ncurrent time zone and converts it to an internal value in\nUTC. Clients can set\ntheir time zone as described in time zones.\n \nThe inverse function of UNIX_TIMESTAMP() is FROM_UNIXTIME()\n \nUNIX_TIMESTAMP() supports microseconds.\n \nTimestamps in MariaDB have a maximum value of 2147483647,\nequivalent to 2038-01-19 05:14:07. This is due to the\nunderlying 32-bit limitation. Using the function on a date\nbeyond this will result in NULL being returned. Use DATETIME\nas a storage type if you require dates beyond this.\n \nError Handling\n \nReturns NULL for wrong arguments to UNIX_TIMESTAMP(). In\nMySQL and MariaDB before 5.3 wrong arguments to\nUNIX_TIMESTAMP() returned 0. \n \nCompatibility\n \nAs you can see in the examples above,\nUNIX_TIMESTAMP(constant-date-string) returns a timestamp\nwith 6 decimals while MariaDB 5.2 and before returns it\nwithout decimals. This can cause a problem if you are using\nUNIX_TIMESTAMP() as a partitioning function. You can fix\nthis by using FLOOR(UNIX_TIMESTAMP(..)) or changing the date\nstring to a date number, like 20080101000000. \n \nExamples\n-------- \nSELECT UNIX_TIMESTAMP();\n+------------------+\n| UNIX_TIMESTAMP() |\n+------------------+\n| 1269711082 |\n+------------------+\n \nSELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n+---------------------------------------+\n| UNIX_TIMESTAMP(\'2007-11-30 10:30:19\') |\n+---------------------------------------+\n| 1196436619.000000 |\n+---------------------------------------+\n \nSELECT UNIX_TIMESTAMP(\"2007-11-30 10:30:19.123456\");\n+----------------------------------------------+\n| unix_timestamp(\"2007-11-30 10:30:19.123456\") |\n+----------------------------------------------+\n| 1196411419.123456 |\n+----------------------------------------------+\n \nSELECT FROM_UNIXTIME(UNIX_TIMESTAMP(\'2007-11-30\n10:30:19\'));\n+------------------------------------------------------+\n| FROM_UNIXTIME(UNIX_TIMESTAMP(\'2007-11-30 10:30:19\')) |\n+------------------------------------------------------+\n| 2007-11-30 10:30:19.000000 |\n+------------------------------------------------------+\n \nSELECT FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(\'2007-11-30\n10:30:19\')));\n+-------------------------------------------------------------+\n| FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(\'2007-11-30\n10:30:19\'))) |\n+-------------------------------------------------------------+\n| 2007-11-30 10:30:19 |\n+-------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/unix_timestamp/','','https://mariadb.com/kb/en/unix_timestamp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (521,31,'UTC_DATE','Syntax\n------ \nUTC_DATE, UTC_DATE()\n \nDescription\n----------- \nReturns the current UTC date as a value in \'YYYY-MM-DD\' or\nYYYYMMDD\nformat, depending on whether the function is used in a\nstring or numeric context. \n \nExamples\n-------- \nSELECT UTC_DATE(), UTC_DATE() + 0;\n \n+------------+----------------+\n| UTC_DATE() | UTC_DATE() + 0 |\n+------------+----------------+\n| 2010-03-27 | 20100327 |\n+------------+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/utc_date/','','https://mariadb.com/kb/en/utc_date/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (522,31,'UTC_TIME','Syntax\n------ \nUTC_TIME\nUTC_TIME([precision])\n \nDescription\n----------- \nReturns the current UTC time as a value in \'HH:MM:SS\' or\nHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. \n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nExamples\n-------- \nSELECT UTC_TIME(), UTC_TIME() + 0;\n \n+------------+----------------+\n| UTC_TIME() | UTC_TIME() + 0 |\n+------------+----------------+\n| 17:32:34 | 173234.000000 |\n+------------+----------------+\n \nWith precision:\n \nSELECT UTC_TIME(5);\n+----------------+\n| UTC_TIME(5) |\n+----------------+\n| 07:52:50.78369 |\n+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/utc_time/','','https://mariadb.com/kb/en/utc_time/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (523,31,'UTC_TIMESTAMP','Syntax\n------ \nUTC_TIMESTAMP\nUTC_TIMESTAMP([precision])\n \nDescription\n----------- \nReturns the current UTC date and time as a value in\n\'YYYY-MM-DD\nHH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the\nfunction is used in a string or numeric context.\n \nThe optional precision determines the microsecond precision.\nSee Microseconds in MariaDB.\n \nExamples\n-------- \nSELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;\n \n+---------------------+-----------------------+\n| UTC_TIMESTAMP() | UTC_TIMESTAMP() + 0 |\n+---------------------+-----------------------+\n| 2010-03-27 17:33:16 | 20100327173316.000000 |\n+---------------------+-----------------------+\n \nWith precision:\n \nSELECT UTC_TIMESTAMP(4);\n+--------------------------+\n| UTC_TIMESTAMP(4) |\n+--------------------------+\n| 2018-07-10 07:51:09.1019 |\n+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/utc_timestamp/','','https://mariadb.com/kb/en/utc_timestamp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (524,31,'WEEK','Syntax\n------ \nWEEK(date[,mode])\n \nDescription\n----------- \nThis function returns the week number for date. The\ntwo-argument form of\nWEEK() allows you to specify whether the week starts on\nSunday or Monday\nand whether the return value should be in the range from 0\nto 53 or from 1 to\n53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used.\n \nModes\n \nMode | 1st day of week | Range | Week 1 is the 1st week with\n| \n \n0 | Sunday | 0-53 | a Sunday in this year | \n \n1 | Monday | 0-53 | more than 3 days this year | \n \n2 | Sunday | 1-53 | a Sunday in this year | \n \n3 | Monday | 1-53 | more than 3 days this year | \n \n4 | Sunday | 0-53 | more than 3 days this year | \n \n5 | Monday | 0-53 | a Monday in this year | \n \n6 | Sunday | 1-53 | more than 3 days this year | \n \n7 | Monday | 1-53 | a Monday in this year | \n \nExamples\n-------- \nSELECT WEEK(\'2008-02-20\');\n+--------------------+\n| WEEK(\'2008-02-20\') |\n+--------------------+\n| 7 |\n+--------------------+\n \nSELECT WEEK(\'2008-02-20\',0);\n+----------------------+\n| WEEK(\'2008-02-20\',0) |\n+----------------------+\n| 7 |\n+----------------------+\n \nSELECT WEEK(\'2008-02-20\',1);\n+----------------------+\n| WEEK(\'2008-02-20\',1) |\n+----------------------+\n| 8 |\n+----------------------+\n \nSELECT WEEK(\'2008-12-31\',0);\n+----------------------+\n| WEEK(\'2008-12-31\',0) |\n+----------------------+\n| 52 |\n+----------------------+\n \nSELECT WEEK(\'2008-12-31\',1);\n+----------------------+\n| WEEK(\'2008-12-31\',1) |\n+----------------------+\n| 53 |\n+----------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d, WEEK(d,0), WEEK(d,1) from t1;\n \n+---------------------+-----------+-----------+\n| d | WEEK(d,0) | WEEK(d,1) |\n+---------------------+-----------+-----------+\n| 2007-01-30 21:31:07 | 4 | 5 |\n| 1983-10-15 06:42:51 | 41 | 41 |\n| 2011-04-21 12:34:56 | 16 | 16 |\n| 2011-10-30 06:31:41 | 44 | 43 |\n| 2011-01-30 14:03:25 | 5 | 4 |\n| 2004-10-07 11:19:34 | 40 | 41 |\n+---------------------+-----------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/week/','','https://mariadb.com/kb/en/week/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (525,31,'WEEKDAY','Syntax\n------ \nWEEKDAY(date)\n \nDescription\n----------- \nReturns the weekday index for date \n(0 = Monday, 1 = Tuesday, ... 6 = Sunday).\n \nThis contrasts with DAYOFWEEK() which follows the ODBC\nstandard\n(1 = Sunday, 2 = Monday, ..., 7 = Saturday).\n \nExamples\n-------- \nSELECT WEEKDAY(\'2008-02-03 22:23:00\');\n+--------------------------------+\n| WEEKDAY(\'2008-02-03 22:23:00\') |\n+--------------------------------+\n| 6 |\n+--------------------------------+\n \nSELECT WEEKDAY(\'2007-11-06\');\n+-----------------------+\n| WEEKDAY(\'2007-11-06\') |\n+-----------------------+\n| 1 |\n+-----------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT d FROM t1 where WEEKDAY(d) = 6;\n \n+---------------------+\n| d |\n+---------------------+\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/weekday/','','https://mariadb.com/kb/en/weekday/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (526,31,'WEEKOFYEAR','Syntax\n------ \nWEEKOFYEAR(date)\n \nDescription\n----------- \nReturns the calendar week of the date as a number in the\nrange from 1\nto 53. WEEKOFYEAR() is a compatibility function that is\nequivalent to\nWEEK(date,3).\n \nExamples\n-------- \nSELECT WEEKOFYEAR(\'2008-02-20\');\n+--------------------------+\n| WEEKOFYEAR(\'2008-02-20\') |\n+--------------------------+\n| 8 |\n+--------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \n select * from t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 1983-10-15 06:42:51 |\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n| 2004-10-07 11:19:34 |\n+---------------------+\n \nSELECT d, WEEKOFYEAR(d), WEEK(d,3) from t1;\n \n+---------------------+---------------+-----------+\n| d | WEEKOFYEAR(d) | WEEK(d,3) |\n+---------------------+---------------+-----------+\n| 2007-01-30 21:31:07 | 5 | 5 |\n| 1983-10-15 06:42:51 | 41 | 41 |\n| 2011-04-21 12:34:56 | 16 | 16 |\n| 2011-10-30 06:31:41 | 43 | 43 |\n| 2011-01-30 14:03:25 | 4 | 4 |\n| 2004-10-07 11:19:34 | 41 | 41 |\n+---------------------+---------------+-----------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/weekofyear/','','https://mariadb.com/kb/en/weekofyear/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (527,31,'YEAR','Syntax\n------ \nYEAR(date)\n \nDescription\n----------- \nReturns the year for the given date, in the range 1000 to\n9999, or 0 for the\n\"zero\" date.\n \nExamples\n-------- \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT * FROM t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 1983-10-15 06:42:51 |\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n| 2004-10-07 11:19:34 |\n+---------------------+\n \nSELECT * FROM t1 WHERE YEAR(d) = 2011;\n \n+---------------------+\n| d |\n+---------------------+\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n+---------------------+\n \nSELECT YEAR(\'1987-01-01\');\n+--------------------+\n| YEAR(\'1987-01-01\') |\n+--------------------+\n| 1987 |\n+--------------------+\n \n\n\nURL: https://mariadb.com/kb/en/year/','','https://mariadb.com/kb/en/year/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (528,31,'YEARWEEK','Syntax\n------ \nYEARWEEK(date), YEARWEEK(date,mode)\n \nDescription\n----------- \nReturns year and week for a date. The mode argument works\nexactly like the mode\nargument to WEEK(). The year in the result may be different\nfrom the\nyear in the date argument for the first and the last week of\nthe year.\n \nExamples\n-------- \nSELECT YEARWEEK(\'1987-01-01\');\n+------------------------+\n| YEARWEEK(\'1987-01-01\') |\n+------------------------+\n| 198652 |\n+------------------------+\n \nCREATE TABLE t1 (d DATETIME);\nINSERT INTO t1 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\n \nSELECT * FROM t1;\n \n+---------------------+\n| d |\n+---------------------+\n| 2007-01-30 21:31:07 |\n| 1983-10-15 06:42:51 |\n| 2011-04-21 12:34:56 |\n| 2011-10-30 06:31:41 |\n| 2011-01-30 14:03:25 |\n| 2004-10-07 11:19:34 |\n+---------------------+\n6 rows in set (0.02 sec)\n \nSELECT YEARWEEK(d) FROM t1 WHERE YEAR(d) = 2011;\n \n+-------------+\n| YEARWEEK(d) |\n+-------------+\n| 201116 |\n| 201144 |\n| 201105 |\n+-------------+\n3 rows in set (0.03 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/yearweek/','','https://mariadb.com/kb/en/yearweek/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (529,32,'Well-Known Binary (WKB) Format','WKB stands for Well-Known Binary, a format for representing\ngeographical and geometrical data.\n \nWKB uses 1-byte unsigned integers, 4-byte unsigned integers,\nand 8-byte double-precision numbers.\nThe first byte indicates the byte order. 00 for big endian,\nor 01 for little endian.\nThe next 4 bytes indicate the geometry type. Values from 1\nto 7 indicate whether the type is Point, LineString,\nPolygon, MultiPoint, MultiLineString, MultiPolygon, or\nGeometryCollection respectively. \nThe 8-byte floats represent the co-ordinates.\n \nTake the following example, a sequence of 21 bytes each\nrepresented by two hex digits:\n \n000000000140000000000000004010000000000000\nIt\'s big endian\n000000000140000000000000004010000000000000\n \nIt\'s a POINT\n000000000140000000000000004010000000000000\n \nThe X co-ordinate is 2.0\n000000000140000000000000004010000000000000\n \nThe Y-co-ordinate is 4.0\n000000000140000000000000004010000000000000\n \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/well-known-binary-wkb-format/','','https://mariadb.com/kb/en/well-known-binary-wkb-format/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (530,32,'AsBinary','A synonym for ST_AsBinary().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-asbinary/','','https://mariadb.com/kb/en/wkb-asbinary/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (531,32,'AsWKB','A synonym for ST_AsBinary().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/aswkb/','','https://mariadb.com/kb/en/aswkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (532,32,'MLineFromWKB','Syntax\n------ \nMLineFromWKB(wkb[,srid])\nMultiLineStringFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a MULTILINESTRING value using its WKB\nrepresentation and SRID.\n \nMLineFromWKB() and MultiLineStringFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(MLineFromText(\'MULTILINESTRING((10\n48,10 21,10 0),(16 0,16 23,16 48))\'));\n \nSELECT ST_AsText(MLineFromWKB(@g));\n+--------------------------------------------------------+\n| ST_AsText(MLineFromWKB(@g)) |\n+--------------------------------------------------------+\n| MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) |\n+--------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mlinefromwkb/','','https://mariadb.com/kb/en/mlinefromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (533,32,'MPointFromWKB','Syntax\n------ \nMPointFromWKB(wkb[,srid])\nMultiPointFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOINT value using its WKB representation\nand SRID.\n \nMPointFromWKB() and MultiPointFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(MPointFromText(\'MultiPoint( 1 1, 2 2,\n5 3, 7 2, 9 3, 8 4, 6 6, 6 9, 4 9, 1 5 )\'));\n \nSELECT ST_AsText(MPointFromWKB(@g));\n+-----------------------------------------------------+\n| ST_AsText(MPointFromWKB(@g)) |\n+-----------------------------------------------------+\n| MULTIPOINT(1 1,2 2,5 3,7 2,9 3,8 4,6 6,6 9,4 9,1 5) |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpointfromwkb/','','https://mariadb.com/kb/en/mpointfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (534,32,'MPolyFromWKB','Syntax\n------ \nMPolyFromWKB(wkb[,srid])\nMultiPolygonFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a MULTIPOLYGON value using its WKB representation\nand SRID.\n \nMPolyFromWKB() and MultiPolygonFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(MPointFromText(\'MULTIPOLYGON(((28\n26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52\n18)),((59 18,67 18,67 13,59 13,59 18)))\'));\n \nSELECT ST_AsText(MPolyFromWKB(@g));\n+---------------------------------------------------------------------------------------------------------------+\n| ST_AsText(MPolyFromWKB(@g)) |\n+---------------------------------------------------------------------------------------------------------------+\n| MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66\n23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) |\n+---------------------------------------------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mpolyfromwkb/','','https://mariadb.com/kb/en/mpolyfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (535,32,'GeomCollFromWKB','A synonym for ST_GeomCollFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-geomcollfromwkb/','','https://mariadb.com/kb/en/wkb-geomcollfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (536,32,'GeometryCollectionFromWKB','A synonym for ST_GeomCollFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometrycollectionfromwkb/','','https://mariadb.com/kb/en/geometrycollectionfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (537,32,'GeometryFromWKB','A synonym for ST_GeomFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometryfromwkb/','','https://mariadb.com/kb/en/geometryfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (538,32,'GeomFromWKB','A synonym for ST_GeomFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-geomfromwkb/','','https://mariadb.com/kb/en/wkb-geomfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (539,32,'LineFromWKB','A synonym for ST_LineFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-linefromwkb/','','https://mariadb.com/kb/en/wkb-linefromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (540,32,'LineStringFromWKB','A synonym for ST_LineFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/linestringfromwkb/','','https://mariadb.com/kb/en/linestringfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (541,32,'MultiLineStringFromWKB','A synonym for MLineFromWKB().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multilinestringfromwkb/','','https://mariadb.com/kb/en/multilinestringfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (542,32,'MultiPointFromWKB','A synonym for MPointFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipointfromwkb/','','https://mariadb.com/kb/en/multipointfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (543,32,'MultiPolygonFromWKB','Synonym for MPolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/multipolygonfromwkb/','','https://mariadb.com/kb/en/multipolygonfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (544,32,'PointFromWKB','A synonym for ST_PointFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-pointfromwkb/','','https://mariadb.com/kb/en/wkb-pointfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (545,32,'PolyFromWKB','A synonym for ST_PolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/wkb-polyfromwkb/','','https://mariadb.com/kb/en/wkb-polyfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (546,32,'PolygonFromWKB','A synonym for ST_PolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/polygonfromwkb/','','https://mariadb.com/kb/en/polygonfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (547,32,'ST_AsBinary','Syntax\n------ \nST_AsBinary(g)\nAsBinary(g)\nST_AsWKB(g)\nAsWKB(g)\n \nDescription\n----------- \nConverts a value in internal geometry format to its WKB\nrepresentation and returns the binary result.\n \nST_AsBinary(), AsBinary(), ST_AsWKB() and AsWKB() are\nsynonyms,\n \nExamples\n-------- \nSET @poly = ST_GeomFromText(\'POLYGON((0 0,0 1,1 1,1 0,0\n0))\');\nSELECT ST_AsBinary(@poly);\n \nSELECT ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly)));\n+--------------------------------------------+\n| ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly))) |\n+--------------------------------------------+\n| POLYGON((0 0,0 1,1 1,1 0,0 0)) |\n+--------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_asbinary/','','https://mariadb.com/kb/en/st_asbinary/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (548,32,'ST_AsWKB','A synonym for ST_AsBinary().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_aswkb/','','https://mariadb.com/kb/en/st_aswkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (549,32,'ST_GeomCollFromWKB','Syntax\n------ \nST_GeomCollFromWKB(wkb[,srid])\nST_GeometryCollectionFromWKB(wkb[,srid])\nGeomCollFromWKB(wkb[,srid])\nGeometryCollectionFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a GEOMETRYCOLLECTION value using its WKB\nrepresentation and SRID.\n \nST_GeomCollFromWKB(), ST_GeometryCollectionFromWKB(),\nGeomCollFromWKB() and GeometryCollectionFromWKB() are\nsynonyms.\n \nExamples\n-------- \nSET @g =\nST_AsBinary(ST_GeomFromText(\'GEOMETRYCOLLECTION(POLYGON((5\n5,10 5,10 10,5 5)),POINT(10 10))\'));\n \nSELECT ST_AsText(ST_GeomCollFromWKB(@g));\n+----------------------------------------------------------------+\n| ST_AsText(ST_GeomCollFromWKB(@g)) |\n+----------------------------------------------------------------+\n| GEOMETRYCOLLECTION(POLYGON((5 5,10 5,10 10,5 5)),POINT(10\n10)) |\n+----------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomcollfromwkb/','','https://mariadb.com/kb/en/st_geomcollfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (550,32,'ST_GeometryCollectionFromWKB','A synonym for ST_GeomCollFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometrycollectionfromwkb/','','https://mariadb.com/kb/en/st_geometrycollectionfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (551,32,'ST_GeometryFromWKB','A synonym for ST_GeomFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometryfromwkb/','','https://mariadb.com/kb/en/st_geometryfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (552,32,'ST_GeomFromWKB','Syntax\n------ \nST_GeomFromWKB(wkb[,srid])\nST_GeometryFromWKB(wkb[,srid])\nGeomFromWKB(wkb[,srid])\nGeometryFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a geometry value of any type using its WKB\nrepresentation and SRID.\n \nST_GeomFromWKB(), ST_GeometryFromWKB(), GeomFromWKB() and\nGeometryFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_LineFromText(\'LINESTRING(0 4, 4\n6)\'));\n \nSELECT ST_AsText(ST_GeomFromWKB(@g));\n+-------------------------------+\n| ST_AsText(ST_GeomFromWKB(@g)) |\n+-------------------------------+\n| LINESTRING(0 4,4 6) |\n+-------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geomfromwkb/','','https://mariadb.com/kb/en/st_geomfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (553,32,'ST_LineFromWKB','Syntax\n------ \nST_LineFromWKB(wkb[,srid])\nLineFromWKB(wkb[,srid])\nST_LineStringFromWKB(wkb[,srid])\nLineStringFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a LINESTRING value using its WKB representation\nand SRID.\n \nST_LineFromWKB(), LineFromWKB(), ST_LineStringFromWKB(), and\nLineStringFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_LineFromText(\'LineString(0 4,4\n6)\'));\n \nSELECT ST_AsText(ST_LineFromWKB(@g)) AS l;\n \n+---------------------+\n| l |\n+---------------------+\n| LINESTRING(0 4,4 6) |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linefromwkb/','','https://mariadb.com/kb/en/st_linefromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (554,32,'ST_LineStringFromWKB','A synonym for ST_LineFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_linestringfromwkb/','','https://mariadb.com/kb/en/st_linestringfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (555,32,'ST_PointFromWKB','Syntax\n------ \nST_PointFromWKB(wkb[,srid])\nPointFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a POINT value using its WKB representation and\nSRID.\n \nST_PointFromWKB() and PointFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_PointFromText(\'POINT(0 4)\'));\n \nSELECT ST_AsText(ST_PointFromWKB(@g)) AS p;\n \n+------------+\n| p |\n+------------+\n| POINT(0 4) |\n+------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_pointfromwkb/','','https://mariadb.com/kb/en/st_pointfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (556,32,'ST_PolyFromWKB','Syntax\n------ \nST_PolyFromWKB(wkb[,srid])\nST_PolygonFromWKB(wkb[,srid])\nPolyFromWKB(wkb[,srid])\nPolygonFromWKB(wkb[,srid])\n \nDescription\n----------- \nConstructs a POLYGON value using its WKB representation and\nSRID.\n \nST_PolyFromWKB(), ST_PolygonFromWKB(), PolyFromWKB() and\nPolygonFromWKB() are synonyms.\n \nExamples\n-------- \nSET @g = ST_AsBinary(ST_PolyFromText(\'POLYGON((1 1,1 5,4\n9,6 9,9 3,7 2,1 1))\'));\n \nSELECT ST_AsText(ST_PolyFromWKB(@g)) AS p;\n \n+----------------------------------------+\n| p |\n+----------------------------------------+\n| POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1)) |\n+----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polyfromwkb/','','https://mariadb.com/kb/en/st_polyfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (557,32,'ST_PolygonFromWKB','A synonym for ST_PolyFromWKB.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_polygonfromwkb/','','https://mariadb.com/kb/en/st_polygonfromwkb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (558,36,'BOUNDARY','A synonym for ST_BOUNDARY.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-boundary/','','https://mariadb.com/kb/en/geometry-properties-boundary/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (559,36,'DIMENSION','A synonym for ST_DIMENSION.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/dimension/','','https://mariadb.com/kb/en/dimension/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (560,36,'ENVELOPE','A synonym for ST_ENVELOPE.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-envelope/','','https://mariadb.com/kb/en/geometry-properties-envelope/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (561,36,'GeometryN','A synonym for ST_GeometryN.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/geometry-properties-geometryn/','','https://mariadb.com/kb/en/geometry-properties-geometryn/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (562,36,'GeometryType','A synonym for ST_GeometryType.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/geometry-properties-geometrytype/','','https://mariadb.com/kb/en/geometry-properties-geometrytype/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (563,36,'IsClosed','A synonym for ST_IsClosed.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/isclosed/','','https://mariadb.com/kb/en/isclosed/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (564,36,'IsEmpty','A synonym for ST_IsEmpty.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-isempty/','','https://mariadb.com/kb/en/geometry-properties-isempty/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (565,36,'IsRing','A synonym for ST_IsRing.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/isring/','','https://mariadb.com/kb/en/isring/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (566,36,'IsSimple','A synonym for ST_IsSImple.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-issimple/','','https://mariadb.com/kb/en/geometry-properties-issimple/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (567,36,'NumGeometries','A synonym for ST_NumGeometries.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/geometry-properties-numgeometries/','','https://mariadb.com/kb/en/geometry-properties-numgeometries/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (568,36,'SRID','A synonym for ST_SRID.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/geometry-properties-srid/','','https://mariadb.com/kb/en/geometry-properties-srid/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (569,36,'ST_BOUNDARY','The ST_BOUNDARY function was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_BOUNDARY(g)\nBOUNDARY(g)\n \nDescription\n----------- \nReturns a geometry that is the closure of the combinatorial\nboundary of the geometry value g.\n \nBOUNDARY() is a synonym.\n \nExamples\n-------- \nSELECT ST_AsText(ST_Boundary(ST_GeomFromText(\'LINESTRING(3\n3,0 0, -3 3)\')));\n+----------------------------------------------------------------------+\n| ST_AsText(ST_Boundary(ST_GeomFromText(\'LINESTRING(3 3,0\n0, -3 3)\'))) |\n+----------------------------------------------------------------------+\n| MULTIPOINT(3 3,-3 3) |\n+----------------------------------------------------------------------+\n \nSELECT ST_AsText(ST_Boundary(ST_GeomFromText(\'POLYGON((3\n3,0 0, -3 3, 3 3))\')));\n+--------------------------------------------------------------------------+\n| ST_AsText(ST_Boundary(ST_GeomFromText(\'POLYGON((3 3,0 0,\n-3 3, 3 3))\'))) |\n+--------------------------------------------------------------------------+\n| LINESTRING(3 3,0 0,-3 3,3 3) |\n+--------------------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_boundary/','','https://mariadb.com/kb/en/st_boundary/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (570,36,'ST_DIMENSION','Syntax\n------ \nST_Dimension(g)\nDimension(g)\n \nDescription\n----------- \nReturns the inherent dimension of the geometry value g. The\nresult can\nbe\n \nDimension | Definition | \n \n -1 | empty geometry | \n \n 0 | geometry with no length or area | \n \n 1 | geometry with no area but nonzero length | \n \n 2 | geometry with nonzero area | \n \nST_Dimension() and Dimension() are synonyms.\n \nExamples\n-------- \nSELECT Dimension(GeomFromText(\'LineString(1 1,2 2)\'));\n+------------------------------------------------+\n| Dimension(GeomFromText(\'LineString(1 1,2 2)\')) |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_dimension/','','https://mariadb.com/kb/en/st_dimension/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (571,36,'ST_ENVELOPE','Syntax\n------ \nST_ENVELOPE(g)\nENVELOPE(g)\n \nDescription\n----------- \nReturns the Minimum Bounding Rectangle (MBR) for the\ngeometry value g. The result is returned as a Polygon value.\n \nThe polygon is defined by the corner points of the bounding\nbox:\n \nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX\nMINY))\n \nST_ENVELOPE() and ENVELOPE() are synonyms.\n \nExamples\n-------- \nSELECT AsText(ST_ENVELOPE(GeomFromText(\'LineString(1 1,4\n4)\')));\n+----------------------------------------------------------+\n| AsText(ST_ENVELOPE(GeomFromText(\'LineString(1 1,4 4)\')))\n|\n+----------------------------------------------------------+\n| POLYGON((1 1,4 1,4 4,1 4,1 1)) |\n+----------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_envelope/','','https://mariadb.com/kb/en/st_envelope/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (572,36,'ST_GEOMETRYN','Syntax\n------ \nST_GeometryN(gc,N)\nGeometryN(gc,N)\n \nDescription\n----------- \nReturns the N-th geometry in the GeometryCollection gc.\nGeometries are numbered beginning with 1.\n \nST_GeometryN() and GeometryN() are synonyms.\n \nExample\n \nSET @gc = \'GeometryCollection(Point(1 1),LineString(12 14,\n9 11))\';\n \nSELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1) |\n+----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometryn/','','https://mariadb.com/kb/en/st_geometryn/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (573,36,'ST_GEOMETRYTYPE','Syntax\n------ \nST_GeometryType(g)\nGeometryType(g)\n \nDescription\n----------- \nReturns as a string the name of the geometry type of which\nthe\ngeometry instance g is a member. The name corresponds to one\nof the\ninstantiable Geometry subclasses.\n \nST_GeometryType() and GeometryType() are synonyms.\n \nExamples\n-------- \nSELECT GeometryType(GeomFromText(\'POINT(1 1)\'));\n+------------------------------------------+\n| GeometryType(GeomFromText(\'POINT(1 1)\')) |\n+------------------------------------------+\n| POINT |\n+------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_geometrytype/','','https://mariadb.com/kb/en/st_geometrytype/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (574,36,'ST_ISCLOSED','Syntax\n------ \nST_IsClosed(g)\nIsClosed(g)\n \nDescription\n----------- \nReturns 1 if a given LINESTRING\'s start and end points are\nthe same, or 0 if they are not the same. Before MariaDB\n10.1.5, returns NULL if not given a LINESTRING. After\nMariaDB 10.1.5, returns -1.\n \nST_IsClosed() and IsClosed() are synonyms.\n \nExamples\n-------- \nSET @ls = \'LineString(0 0, 0 4, 4 4, 0 0)\';\n \nSELECT ST_ISCLOSED(GEOMFROMTEXT(@ls));\n+--------------------------------+\n| ST_ISCLOSED(GEOMFROMTEXT(@ls)) |\n+--------------------------------+\n| 1 |\n+--------------------------------+\n \nSET @ls = \'LineString(0 0, 0 4, 4 4, 0 1)\';\n \nSELECT ST_ISCLOSED(GEOMFROMTEXT(@ls));\n+--------------------------------+\n| ST_ISCLOSED(GEOMFROMTEXT(@ls)) |\n+--------------------------------+\n| 0 |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_isclosed/','','https://mariadb.com/kb/en/st_isclosed/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (575,36,'ST_ISEMPTY','Syntax\n------ \nST_IsEmpty(g)\nIsEmpty(g)\n \nDescription\n----------- \nIsEmpty is a function defined by the OpenGIS specification,\nbut is not fully implemented by MariaDB or MySQL. \n \nSince MariaDB and MySQL do not support GIS EMPTY values such\nas POINT EMPTY, as implemented it simply returns 1 if the\ngeometry value g is invalid, 0 if it is valid, and NULL if\nthe argument is NULL.\n \nST_IsEmpty() and IsEmpty() are synonyms.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_isempty/','','https://mariadb.com/kb/en/st_isempty/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (576,36,'ST_IsRing','The ST_IsRing function was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_IsRing(g)\nIsRing(g)\n \nDescription\n----------- \nReturns true if a given LINESTRING is a ring, that is, both\nST_IsClosed and ST_IsSimple. A simple curve does not pass\nthrough the same point more than once. However, see\nMDEV-7510.\n \nSt_IsRing() and IsRing() are synonyms.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_isring/','','https://mariadb.com/kb/en/st_isring/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (577,36,'ST_IsSimple','Syntax\n------ \nST_IsSimple(g)\nIsSimple(g)\n \nDescription\n----------- \nReturns true if the given Geometry has no anomalous\ngeometric points, false if it does, or NULL if given a NULL\nvalue.\n \nST_IsSimple() and IsSimple() are synonyms.\n \nExamples\n-------- \nA POINT is always simple.\n \nSET @g = \'Point(1 2)\';\n \nSELECT ST_ISSIMPLE(GEOMFROMTEXT(@g));\n+-------------------------------+\n| ST_ISSIMPLE(GEOMFROMTEXT(@g)) |\n+-------------------------------+\n| 1 |\n+-------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_issimple/','','https://mariadb.com/kb/en/st_issimple/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (578,36,'ST_NUMGEOMETRIES','Syntax\n------ \nST_NumGeometries(gc)\nNumGeometries(gc)\n \nDescription\n----------- \nReturns the number of geometries in the GeometryCollection\ngc.\n \nST_NumGeometries() and NumGeometries() are synonyms.\n \nExample\n \nSET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3\n3))\';\n \nSELECT NUMGEOMETRIES(GeomFromText(@gc));\n+----------------------------------+\n| NUMGEOMETRIES(GeomFromText(@gc)) |\n+----------------------------------+\n| 2 |\n+----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_numgeometries/','','https://mariadb.com/kb/en/st_numgeometries/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (579,36,'ST_RELATE','The ST_RELATE() function was introduced in MariaDB 10.1.2\n \nSyntax\n------ \nST_Relate(g1, g2, i)\n \nDescription\n----------- \nReturns true if Geometry g1 is spatially related to\nGeometryg2 by testing for intersections between the\ninterior, boundary and exterior of the two geometries as\nspecified by the values in intersection matrix pattern i.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_relate/','','https://mariadb.com/kb/en/st_relate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (580,36,'ST_SRID','Syntax\n------ \nST_SRID(g)\nSRID(g)\n \nDescription\n----------- \nReturns an integer indicating the Spatial Reference System\nID for the\ngeometry value g.\n \nIn MariaDB, the SRID value is just an integer associated\nwith the\ngeometry value. All calculations are done assuming Euclidean\n(planar)\ngeometry.\n \nST_SRID() and SRID() are synonyms.\n \nExamples\n-------- \nSELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n| 101 |\n+-----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/st_srid/','','https://mariadb.com/kb/en/st_srid/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (581,37,'ASCII','Syntax\n------ \nASCII(str)\n \nDescription\n----------- \nReturns the numeric ASCII value of the leftmost character of\nthe string argument. Returns 0 if the given string is empty\nand NULL if it is NULL.\n \nASCII() works for 8-bit characters.\n \nExamples\n-------- \nSELECT ASCII(9);\n+----------+\n| ASCII(9) |\n+----------+\n| 57 |\n+----------+\n \nSELECT ASCII(\'9\');\n+------------+\n| ASCII(\'9\') |\n+------------+\n| 57 |\n+------------+\n \nSELECT ASCII(\'abc\');\n+--------------+\n| ASCII(\'abc\') |\n+--------------+\n| 97 |\n+--------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ascii/','','https://mariadb.com/kb/en/ascii/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (582,37,'BIN','Syntax\n------ \nBIN(N)\n \nDescription\n----------- \nReturns a string representation of the binary value of the\ngiven longlong (that is, BIGINT) number. This is equivalent\nto CONV(N,10,2). The argument should be positive. If it is a\nFLOAT, it will be truncated. Returns NULL if the argument is\nNULL.\n \nExamples\n-------- \nSELECT BIN(12);\n+---------+\n| BIN(12) |\n+---------+\n| 1100 |\n+---------+\n \n\n\nURL: https://mariadb.com/kb/en/bin/','','https://mariadb.com/kb/en/bin/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (583,37,'BINARY Operator','Syntax\n------ \nBINARY\n \nDescription\n----------- \nThe BINARY operator casts the string following it to a\nbinary string. This is an easy way to force a column\ncomparison to be done byte by byte rather than character by\ncharacter. This causes the comparison to be case sensitive\neven if the column isn\'t defined as BINARY or BLOB. \n \nBINARY also causes trailing spaces to be significant.\n \nExamples\n-------- \nSELECT \'a\' = \'A\';\n \n+-----------+\n| \'a\' = \'A\' |\n+-----------+\n| 1 |\n+-----------+\n \nSELECT BINARY \'a\' = \'A\';\n \n+------------------+\n| BINARY \'a\' = \'A\' |\n+------------------+\n| 0 |\n+------------------+\n \nSELECT \'a\' = \'a \';\n \n+------------+\n| \'a\' = \'a \' |\n+------------+\n| 1 |\n+------------+\n \nSELECT BINARY \'a\' = \'a \';\n \n+-------------------+\n| BINARY \'a\' = \'a \' |\n+-------------------+\n| 0 |\n+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/binary-operator/','','https://mariadb.com/kb/en/binary-operator/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (584,37,'BIT_LENGTH','Syntax\n------ \nBIT_LENGTH(str)\n \nDescription\n----------- \nReturns the length of the given string argument in bits. If\nthe argument is not a string, it will be converted to\nstring. If the argument is NULL, it returns NULL.\n \nExamples\n-------- \nSELECT BIT_LENGTH(\'text\');\n+--------------------+\n| BIT_LENGTH(\'text\') |\n+--------------------+\n| 32 |\n+--------------------+\n \nSELECT BIT_LENGTH(\'\');\n+----------------+\n| BIT_LENGTH(\'\') |\n+----------------+\n| 0 |\n+----------------+\n \nCompatibility\n \nPostgreSQL and Sybase support BIT_LENGTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/bit_length/','','https://mariadb.com/kb/en/bit_length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (585,37,'CAST','Syntax\n------ \nCAST(expr AS type)\n \nDescription\n----------- \nThe CAST() function takes a value of one type and produces a\nvalue of another type, similar to the CONVERT() function.\nFor more information, see the description of CONVERT(). \n \nThe main difference between the CAST() and CONVERT() is that\nCONVERT(expr,type) is ODBC syntax while CAST(expr as type)\nand CONVERT(... USING ...) are SQL92 syntax.\n \nIn MariaDB 10.4 and later, you can use the CAST() function\nwith the INTERVAL keyword.\n \nUntil MariaDB 5.5.31, X\'HHHH\', the standard SQL syntax for\nbinary string literals, erroneously worked in the same way\nas 0xHHHH. In 5.5.31 it was intentionally changed to behave\nas a string in all contexts (and never as a number).\n \nThis introduces an incompatibility with previous versions of\nMariaDB, and all versions of MySQL (see the example below). \n \nExamples\n-------- \nSimple casts:\n \nSELECT CAST(\"abc\" AS BINARY);\nSELECT CAST(\"1\" AS UNSIGNED INTEGER);\nSELECT CAST(123 AS CHAR CHARACTER SET utf8)\n \nNote that when one casts to CHAR without specifying the\ncharacter set, the collation_connection character set\ncollation will be used. When used with CHAR CHARACTER SET,\nthe default collation for that character set will be used.\n \nSELECT COLLATION(CAST(123 AS CHAR));\n+------------------------------+\n| COLLATION(CAST(123 AS CHAR)) |\n+------------------------------+\n| latin1_swedish_ci |\n+------------------------------+\n \nSELECT COLLATION(CAST(123 AS CHAR CHARACTER SET utf8));\n+-------------------------------------------------+\n| COLLATION(CAST(123 AS CHAR CHARACTER SET utf8)) |\n+-------------------------------------------------+\n| utf8_general_ci |\n+-------------------------------------------------+\n \nIf you also want to change the collation, you have to use\nthe COLLATE operator:\n \nSELECT COLLATION(CAST(123 AS CHAR CHARACTER SET utf8) \n COLLATE utf8_unicode_ci);\n+-------------------------------------------------------------------------+\n| COLLATION(CAST(123 AS CHAR CHARACTER SET utf8) COLLATE\nutf8_unicode_ci) |\n+-------------------------------------------------------------------------+\n| utf8_unicode_ci |\n+-------------------------------------------------------------------------+\n \nUsing CAST() to order an ENUM field as a CHAR rather than\nthe internal numerical value:\n \nCREATE TABLE enum_list (enum_field enum(\'c\',\'a\',\'b\'));\n \nINSERT INTO enum_list (enum_field) \nVALUES(\'c\'),(\'a\'),(\'c\'),(\'b\');\n \nSELECT * FROM enum_list \nORDER BY enum_field;\n \n+------------+\n| enum_field |\n+------------+\n| c |\n| c |\n| a |\n| b |\n+------------+\n \nSELECT * FROM enum_list \nORDER BY CAST(enum_field AS CHAR);\n+------------+\n| enum_field |\n+------------+\n| a |\n| b |\n| c |\n| c |\n+------------+\n \nFrom MariaDB 5.5.31, the following will trigger warnings,\nsince x\'aa\' and \'X\'aa\' no longer behave as a number.\nPreviously, and in all versions of MySQL, no warnings are\ntriggered since they did erroneously behave as a number:\n \nSELECT CAST(0xAA AS UNSIGNED), CAST(x\'aa\' AS UNSIGNED),\nCAST(X\'aa\' AS UNSIGNED);\n+------------------------+-------------------------+-------------------------+\n| CAST(0xAA AS UNSIGNED) | CAST(x\'aa\' AS UNSIGNED) |\nCAST(X\'aa\' AS UNSIGNED) |\n+------------------------+-------------------------+-------------------------+\n| 170 | 0 | 0 |\n+------------------------+-------------------------+-------------------------+\n1 row in set, 2 warnings (0.00 sec)\n \nWarning (Code 1292): Truncated incorrect INTEGER value:\n\'\\xAA\'\nWarning (Code 1292): Truncated incorrect INTEGER value:\n\'\\xAA\'\n \nCasting to intervals:\n \nSELECT CAST(2019-01-04 INTERVAL AS DAY_SECOND(2)) AS\n\"Cast\";\n \n+-------------+\n| Cast |\n+-------------+\n| 00:20:17.00 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/cast/','','https://mariadb.com/kb/en/cast/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (586,37,'CHAR Function','Syntax\n------ \nCHAR(N,... [USING charset_name])\n \nDescription\n----------- \nCHAR() interprets each argument as an INT and returns a\nstring consisting of the characters given by the code values\nof those integers. NULL values are skipped. By default,\nCHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n \nSELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary | utf8 |\n+---------------------+--------------------------------+\n \nIf USING is given and the result string is illegal for the\ngiven character set, a warning is issued. Also, if strict\nSQL mode is enabled, the result from CHAR() becomes NULL.\n \nExamples\n-------- \nSELECT CHAR(77,97,114,\'105\',97,\'68\',66);\n+----------------------------------+\n| CHAR(77,97,114,\'105\',97,\'68\',66) |\n+----------------------------------+\n| MariaDB |\n+----------------------------------+\n \nSELECT CHAR(77,77.3,\'77.3\');\n+----------------------+\n| CHAR(77,77.3,\'77.3\') |\n+----------------------+\n| MMM |\n+----------------------+\n1 row in set, 1 warning (0.00 sec)\n \nWarning (Code 1292): Truncated incorrect INTEGER value:\n\'77.3\'\n \n\n\nURL: https://mariadb.com/kb/en/char-function/','','https://mariadb.com/kb/en/char-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (587,37,'CHARACTER_LENGTH','Syntax\n------ \nCHARACTER_LENGTH(str)\n \nDescription\n----------- \nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/character_length/','','https://mariadb.com/kb/en/character_length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (588,37,'CHAR_LENGTH','Syntax\n------ \nCHAR_LENGTH(str)\n \nDescription\n----------- \nReturns the length of the given string argument, measured in\ncharacters. A multi-byte character counts as a single\ncharacter. This means that for a string containing five\ntwo-byte characters, LENGTH() (or OCTET_LENGTH() in Oracle\nmode) returns 10, whereas CHAR_LENGTH() returns 5. If the\nargument is NULL, it returns NULL. \n \nIf the argument is not a string value, it is converted into\na string.\n \nIt is synonymous with the CHARACTER_LENGTH() function.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nExamples\n-------- \nSELECT CHAR_LENGTH(\'MariaDB\');\n+------------------------+\n| CHAR_LENGTH(\'MariaDB\') |\n+------------------------+\n| 7 |\n+------------------------+\n \nSELECT CHAR_LENGTH(\'Ï€\');\n+-------------------+\n| CHAR_LENGTH(\'Ï€\') |\n+-------------------+\n| 1 |\n+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/char_length/','','https://mariadb.com/kb/en/char_length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (589,37,'CHR','The CHR() function was introduced in MariaDB 10.3.1 to\nprovide Oracle compatibility\n \nSyntax\n------ \nCHR(N)\n \nDescription\n----------- \nCHR() interprets each argument N as an integer and returns a\nVARCHAR(1) string consisting of the character given by the\ncode values of the integer. The character set and collation\nof the string are set according to the values of the\ncharacter_set_database and collation_database system\nvariables.\n \nCHR() is similar to the CHAR() function, but only accepts a\nsingle argument.\n \nCHR() is available in all sql_modes.\n \nExamples\n-------- \nSELECT CHR(67);\n+---------+\n| CHR(67) |\n+---------+\n| C |\n+---------+\n \nSELECT CHR(\'67\');\n+-----------+\n| CHR(\'67\') |\n+-----------+\n| C |\n+-----------+\n \nSELECT CHR(\'C\');\n+----------+\n| CHR(\'C\') |\n+----------+\n| |\n+----------+\n1 row in set, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+---------+------+----------------------------------------+\n| Level | Code | Message |\n+---------+------+----------------------------------------+\n| Warning | 1292 | Truncated incorrect INTEGER value: \'C\'\n|\n+---------+------+----------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/chr/','','https://mariadb.com/kb/en/chr/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (590,37,'CONCAT','Syntax\n------ \nCONCAT(str1,str2,...)\n \nDescription\n----------- \nReturns the string that results from concatenating the\narguments. May have one or more arguments. If all arguments\nare non-binary strings, the result is a non-binary string.\nIf the arguments include any binary strings, the result is a\nbinary string. A numeric argument is converted to its\nequivalent binary string form; if you want to avoid that,\nyou can use an explicit type cast, as in this example:\n \nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n \nCONCAT() returns NULL if any argument is NULL.\n \nA NULL parameter hides all information contained in other\nparameters from the result. Sometimes this is not desirable;\nto avoid this, you can:\nUse the CONCAT_WS() function with an empty separator,\nbecause that function is NULL-safe.\nUse IFNULL() to turn NULLs into empty strings.\n \nOracle Mode\n \nIn Oracle mode from MariaDB 10.3, CONCAT ignores NULL.\n \nExamples\n-------- \nSELECT CONCAT(\'Ma\', \'ria\', \'DB\');\n+---------------------------+\n| CONCAT(\'Ma\', \'ria\', \'DB\') |\n+---------------------------+\n| MariaDB |\n+---------------------------+\n \nSELECT CONCAT(\'Ma\', \'ria\', NULL, \'DB\');\n+---------------------------------+\n| CONCAT(\'Ma\', \'ria\', NULL, \'DB\') |\n+---------------------------------+\n| NULL |\n+---------------------------------+\n \nSELECT CONCAT(42.0);\n+--------------+\n| CONCAT(42.0) |\n+--------------+\n| 42.0 |\n+--------------+\n \nUsing IFNULL() to handle NULLs:\n \nSELECT CONCAT(\'The value of @v is: \', IFNULL(@v, \'\'));\n+------------------------------------------------+\n| CONCAT(\'The value of @v is: \', IFNULL(@v, \'\')) |\n+------------------------------------------------+\n| The value of @v is: |\n+------------------------------------------------+\n \nIn Oracle mode, from MariaDB 10.3:\n \nSELECT CONCAT(\'Ma\', \'ria\', NULL, \'DB\');\n+---------------------------------+\n| CONCAT(\'Ma\', \'ria\', NULL, \'DB\') |\n+---------------------------------+\n| MariaDB |\n+---------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/concat/','','https://mariadb.com/kb/en/concat/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (591,37,'CONCAT_WS','Syntax\n------ \nCONCAT_WS(separator,str1,str2,...)\n \nDescription\n----------- \nCONCAT_WS() stands for Concatenate With Separator and is a\nspecial form of CONCAT(). The first argument is the\nseparator for the rest of the arguments. The separator is\nadded between the strings to be concatenated. The separator\ncan be a string, as can the rest of the arguments.\n \nIf the separator is NULL, the result is NULL; all other NULL\nvalues are skipped. This makes CONCAT_WS() suitable when you\nwant to concatenate some values and avoid losing all\ninformation if one of them is NULL.\n \nExamples\n-------- \nSELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last\nName\');\n+-------------------------------------------------------+\n| CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last\nName\') |\n+-------------------------------------------------------+\n| First name,Second name,Last Name |\n+-------------------------------------------------------+\n \nSELECT CONCAT_WS(\'-\',\'Floor\',NULL,\'Room\');\n+------------------------------------+\n| CONCAT_WS(\'-\',\'Floor\',NULL,\'Room\') |\n+------------------------------------+\n| Floor-Room |\n+------------------------------------+\n \nIn some cases, remember to include a space in the separator\nstring:\n \nSET @a = \'gnu\', @b = \'penguin\', @c = \'sea lion\';\n \nQuery OK, 0 rows affected (0.00 sec)\n \nSELECT CONCAT_WS(\', \', @a, @b, @c);\n+-----------------------------+\n| CONCAT_WS(\', \', @a, @b, @c) |\n+-----------------------------+\n| gnu, penguin, sea lion |\n+-----------------------------+\n \nUsing CONCAT_WS() to handle NULLs:\n \nSET @a = \'a\', @b = NULL, @c = \'c\';\n \nSELECT CONCAT_WS(\'\', @a, @b, @c);\n+---------------------------+\n| CONCAT_WS(\'\', @a, @b, @c) |\n+---------------------------+\n| ac |\n+---------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/concat_ws/','','https://mariadb.com/kb/en/concat_ws/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (592,37,'CONVERT','Syntax\n------ \nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n \nDescription\n----------- \nThe CONVERT() and CAST() functions take a value of one type\nand produce a value of another type.\n \nThe type can be one of the following values:\nBINARY\nCHAR\nDATE\nDATETIME \nDECIMAL[(M[,D])]\nDOUBLE \nFLOAT — From MariaDB 10.4.5\nINTEGER \nShort for SIGNED INTEGER\n \nSIGNED [INTEGER]\nTIME \nUNSIGNED [INTEGER]\n \nNote that in MariaDB, INT and INTEGER are the same thing.\n \nBINARY produces a string with the BINARY data type. If the\noptional length is given, BINARY(N) causes the cast to use\nno more than N bytes of the argument. Values shorter than\nthe given number in bytes are padded with 0x00 bytes to make\nthem equal the length value.\n \nCHAR(N) causes the cast to use no more than the number of\ncharacters given in the argument.\n \nThe main difference between the CAST() and CONVERT() is that\nCONVERT(expr,type) is ODBC syntax while CAST(expr as type)\nand CONVERT(... USING ...) are SQL92 syntax.\n \nCONVERT() with USING is used to convert data between\ndifferent character sets. In MariaDB, transcoding names are\nthe same as the\ncorresponding character set names. For example, this\nstatement\nconverts the string \'abc\' in the default character set to\nthe\ncorresponding string in the utf8 character set:\n \nSELECT CONVERT(\'abc\' USING utf8);\n \nExamples\n-------- \nSELECT enum_col FROM tbl_name \nORDER BY CAST(enum_col AS CHAR);\n \nConverting a BINARY to string to permit the LOWER function\nto work:\n \nSET @x = \'AardVark\';\n \nSET @x = BINARY \'AardVark\';\n \nSELECT LOWER(@x), LOWER(CONVERT (@x USING latin1));\n+-----------+----------------------------------+\n| LOWER(@x) | LOWER(CONVERT (@x USING latin1)) |\n+-----------+----------------------------------+\n| AardVark | aardvark |\n+-----------+----------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/convert/','','https://mariadb.com/kb/en/convert/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (593,37,'ELT','Syntax\n------ \nELT(N, str1[, str2, str3,...])\n \nDescription\n----------- \nTakes a numeric argument and a series of string arguments.\nReturns the string that corresponds to the given numeric\nposition. For instance, it returns str1 if N is 1, str2 if N\nis 2, and so on. If the numeric argument is a FLOAT, MariaDB\nrounds it to the nearest INTEGER. If the numeric argument is\nless than 1, greater than the total number of arguments, or\nnot a number, ELT() returns NULL. It must have at least two\narguments.\n \nIt is complementary to the FIELD() function.\n \nExamples\n-------- \nSELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n+------------------------------------+\n| ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\') |\n+------------------------------------+\n| ej |\n+------------------------------------+\n \nSELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n+------------------------------------+\n| ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\') |\n+------------------------------------+\n| foo |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/elt/','','https://mariadb.com/kb/en/elt/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (594,37,'EXPORT_SET','Syntax\n------ \nEXPORT_SET(bits, on, off[, separator[, number_of_bits]])\n \nDescription\n----------- \nTakes a minimum of three arguments. Returns a string where\neach bit in the given bits argument is returned, with the\nstring values given for on and off. \n \nBits are examined from right to left, (from low-order to\nhigh-order bits). Strings are added to the result from left\nto right, separated by a separator string (defaults as\n\',\'). You can optionally limit the number of bits the\nEXPORT_SET() function examines using the number_of_bits\noption. \n \nIf any of the arguments are set as NULL, the function\nreturns NULL.\n \nExamples\n-------- \nSELECT EXPORT_SET(5,\'Y\',\'N\',\',\',4);\n+-----------------------------+\n| EXPORT_SET(5,\'Y\',\'N\',\',\',4) |\n+-----------------------------+\n| Y,N,Y,N |\n+-----------------------------+\n \nSELECT EXPORT_SET(6,\'1\',\'0\',\',\',10);\n+------------------------------+\n| EXPORT_SET(6,\'1\',\'0\',\',\',10) |\n+------------------------------+\n| 0,1,1,0,0,0,0,0,0,0 |\n+------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/export_set/','','https://mariadb.com/kb/en/export_set/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (595,37,'EXTRACTVALUE','Syntax\n------ \nEXTRACTVALUE(xml_frag, xpath_expr)\n \nDescription\n----------- \nThe EXTRACTVALUE() function takes two string arguments: a\nfragment of XML markup and an XPath expression, (also known\nas a locator). It returns the text (That is, CDDATA), of the\nfirst text node which is a child of the element or elements\nmatching the XPath expression. \n \nIn cases where a valid XPath expression does not match any\ntext nodes in a valid XML fragment, (including the implicit\n/text() expression), the EXTRACTVALUE() function returns an\nempty string.\n \nInvalid Arguments\n \nWhen either the XML fragment or the XPath expression is\nNULL, the EXTRACTVALUE() function returns NULL. When the XML\nfragment is invalid, it raises a warning Code 1525:\n \nWarning (Code 1525): Incorrect XML value: \'parse error at\nline 1 pos 11: unexpected END-OF-INPUT\'\n \nWhen the XPath value is invalid, it generates an Error 1105:\n \nERROR 1105 (HY000): XPATH syntax error: \')\'\n \nExplicit text() Expressions\n \nThis function is the equivalent of performing a match using\nthe XPath expression after appending /text(). In other\nwords:\n \nSELECT\n EXTRACTVALUE(\'example\', \'/cases/case\') AS \'Base\nExample\',\n EXTRACTVALUE(\'example\', \'/cases/case/text()\') AS\n\'text() Example\';\n \n+--------------+----------------+\n| Base Example | text() Example |\n+--------------+----------------+\n| example | example |\n+--------------+----------------+\n \nCount Matches\n \nWhen EXTRACTVALUE() returns multiple matches, it returns the\ncontent of the first child text node of each matching\nelement, in the matched order, as a single, space-delimited\nstring.\n \nBy design, the EXTRACTVALUE() function makes no distinction\nbetween a match on an empty element and no match at all. If\nyou need to determine whether no matching element was found\nin the XML fragment or if an element was found that\ncontained no child text nodes, use the XPath count()\nfunction. \n \nFor instance, when looking for a value that exists, but\ncontains no child text nodes, you would get a count of the\nnumber of matching instances:\n \nSELECT\n EXTRACTVALUE(\'\', \'/cases/case\') AS \'Empty Example\',\n EXTRACTVALUE(\'\', \'/cases/case/count()\') AS \'count()\nExample\';\n \n+---------------+-----------------+\n| Empty Example | count() Example |\n+---------------+-----------------+\n| | 1 |\n+---------------+-----------------+\n \nAlternatively, when looking for a value that doesn\'t exist,\ncount() returns 0.\n \nSELECT\n EXTRACTVALUE(\'\', \'/cases/person\') AS \'No Match\nExample\',\n EXTRACTVALUE(\'\', \'/cases/person/count()\') AS \'count()\nExample\';\n \n+------------------+-----------------+\n| No Match Example | count() Example |\n+------------------+-----------------+\n| | 0|\n+------------------+-----------------+\n \nMatches\n \nImportant: The EXTRACTVALUE() function only returns CDDATA.\nIt does not return tags that the element might contain or\nthe text that these child elements contain.\n \nSELECT EXTRACTVALUE(\'Personx@example.com\', \'/cases\') AS\nCase;\n \n+--------+\n| Case |\n+--------+\n| Person |\n+--------+\n \nNote, in the above example, while the XPath expression\nmatches to the parent instance, it does not return the\ncontained tag or its content.\n \nExamples\n-------- \nSELECT\n ExtractValue(\'cccddd\', \'/a\') AS val1,\n ExtractValue(\'cccddd\', \'/a/b\') AS val2,\n ExtractValue(\'cccddd\', \'//b\') AS val3,\n ExtractValue(\'cccddd\', \'/b\') AS val4,\n ExtractValue(\'cccdddeee\', \'//b\') AS val5;\n \n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5 |\n+------+------+------+------+---------+\n| ccc | ddd | ddd | | ddd eee |\n+------+------+------+------+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/extractvalue/','','https://mariadb.com/kb/en/extractvalue/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (596,37,'FIELD','Syntax\n------ \nFIELD(pattern, str1[,str2,...])\n \nDescription\n----------- \nReturns the index position of the string or number matching\nthe given pattern. Returns 0 in the event that none of the\narguments match the pattern. Raises an Error 1582 if not\ngiven at least two arguments.\n \nWhen all arguments given to the FIELD() function are\nstrings, they are treated as case-insensitive. When all the\narguments are numbers, they are treated as numbers.\nOtherwise, they are treated as doubles. \n \nIf the given pattern occurs more than once, the FIELD()\nfunction only returns the index of the first instance. If\nthe given pattern is NULL, the function returns 0, as a NULL\npattern always fails to match.\n \nThis function is complementary to the ELT() function.\n \nExamples\n-------- \nSELECT FIELD(\'ej\', \'Hej\', \'ej\', \'Heja\', \'hej\',\n\'foo\') \n AS \'Field Results\';\n \n+---------------+\n| Field Results | \n+---------------+\n| 2 |\n+---------------+\n \nSELECT FIELD(\'fo\', \'Hej\', \'ej\', \'Heja\', \'hej\',\n\'foo\')\n AS \'Field Results\';\n \n+---------------+\n| Field Results | \n+---------------+\n| 0 |\n+---------------+\n \nSELECT FIELD(1, 2, 3, 4, 5, 1) AS \'Field Results\';\n \n+---------------+\n| Field Results |\n+---------------+\n| 5 |\n+---------------+\n \nSELECT FIELD(NULL, 2, 3) AS \'Field Results\';\n \n+---------------+\n| Field Results |\n+---------------+\n| 0 |\n+---------------+\n \nSELECT FIELD(\'fail\') AS \'Field Results\';\n \nError 1582 (42000): Incorrect parameter count in call\nto native function \'field\'\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/field/','','https://mariadb.com/kb/en/field/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (597,37,'FIND_IN_SET','Syntax\n------ \nFIND_IN_SET(pattern, strlist)\n \nDescription\n----------- \nReturns the index position where the given pattern occurs in\na string list. The first argument is the pattern you want to\nsearch for. The second argument is a string containing\ncomma-separated variables. If the second argument is of the\nSET data-type, the function is optimized to use bit\narithmetic.\n \nIf the pattern does not occur in the string list or if the\nstring list is an empty string, the function returns 0. If\neither argument is NULL, the function returns NULL. The\nfunction does not return the correct result if the pattern\ncontains a comma (\",\") character.\n \nExamples\n-------- \nSELECT FIND_IN_SET(\'b\',\'a,b,c,d\') AS \"Found Results\";\n \n+---------------+\n| Found Results |\n+---------------+\n| 2 |\n+---------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/find_in_set/','','https://mariadb.com/kb/en/find_in_set/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (598,37,'FORMAT','Syntax\n------ \nFORMAT(num, decimal_position[, locale])\n \nDescription\n----------- \nFormats the given number for display as a string, adding\nseparators to appropriate position and rounding the results\nto the given decimal position. For instance, it would format\n15233.345 to 15,233.35.\n \nIf the given decimal position is 0, it rounds to return no\ndecimal point or fractional part. You can optionally specify\na locale value to format numbers to the pattern appropriate\nfor the given region.\n \nExamples\n-------- \nSELECT FORMAT(1234567890.09876543210, 4) AS \'Format\';\n \n+--------------------+\n| Format |\n+--------------------+\n| 1,234,567,890.0988 |\n+--------------------+\n \nSELECT FORMAT(1234567.89, 4) AS \'Format\';\n \n+----------------+\n| Format |\n+----------------+\n| 1,234,567.8900 |\n+----------------+\n \nSELECT FORMAT(1234567.89, 0) AS \'Format\';\n \n+-----------+\n| Format |\n+-----------+\n| 1,234,568 |\n+-----------+\n \nSELECT FORMAT(123456789,2,\'rm_CH\') AS \'Format\';\n \n+----------------+\n| Format |\n+----------------+\n| 123\'456\'789,00 |\n+----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/format/','','https://mariadb.com/kb/en/format/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (599,37,'FROM_BASE64','The FROM_BASE64() function was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nFROM_BASE64(str)\n \nDescription\n----------- \nDecodes the given base-64 encode string, returning the\nresult as a binary string. Returns NULL if the given string\nis NULL or if it\'s invalid.\n \nIt is the reverse of the TO_BASE64 function.\n \nThere are numerous methods to base-64 encode a string.\nMariaDB uses the following:\nIt encodes alphabet value 64 as \'+\'.\nIt encodes alphabet value 63 as \'/\'.\nIt codes output in groups of four printable characters. Each\nthree byte of data encoded uses four characters. If the\nfinal group is incomplete, it pads the difference with the\n\'=\' character.\nIt divides long output, adding a new line very 76\ncharacters.\nIn decoding, it recognizes and ignores newlines, carriage\nreturns, tabs and space whitespace characters.\n \nSELECT TO_BASE64(\'Maria\') AS \'Input\';\n \n+-----------+\n| Input |\n+-----------+\n| TWFyaWE= |\n+-----------+\n \nSELECT FROM_BASE64(\'TWFyaWE=\') AS \'Output\';\n \n+--------+\n| Output |\n+--------+\n| Maria |\n+--------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/from_base64/','','https://mariadb.com/kb/en/from_base64/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (600,37,'HEX','Syntax\n------ \nHEX(N_or_S)\n \nDescription\n----------- \nIf N_or_S is a number, returns a string representation of\nthe hexadecimal\nvalue of N, where N is a longlong (BIGINT) number. This is\nequivalent to CONV(N,10,16).\n \nIf N_or_S is a string, returns a hexadecimal string\nrepresentation of\nN_or_S where each byte of each character in N_or_S is\nconverted to two hexadecimal\ndigits. If N_or_S is NULL, returns NULL. The inverse of this\noperation is performed by the UNHEX()\nfunction.\n \nExamples\n-------- \nSELECT HEX(255);\n+----------+\n| HEX(255) |\n+----------+\n| FF |\n+----------+\n \nSELECT 0x4D617269614442;\n \n+------------------+\n| 0x4D617269614442 |\n+------------------+\n| MariaDB |\n+------------------+\n \nSELECT HEX(\'MariaDB\');\n+----------------+\n| HEX(\'MariaDB\') |\n+----------------+\n| 4D617269614442 |\n+----------------+\n \n\n\nURL: https://mariadb.com/kb/en/hex/','','https://mariadb.com/kb/en/hex/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (601,37,'INSERT Function','Syntax\n------ \nINSERT(str,pos,len,newstr)\n \nDescription\n----------- \nReturns the string str, with the substring beginning at\nposition pos\nand len characters long replaced by the string newstr.\nReturns the\noriginal string if pos is not within the length of the\nstring.\nReplaces the rest of the string from position pos if len is\nnot within\nthe length of the rest of the string. Returns NULL if any\nargument is\nNULL.\n \nExamples\n-------- \nSELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n+-----------------------------------+\n| INSERT(\'Quadratic\', 3, 4, \'What\') |\n+-----------------------------------+\n| QuWhattic |\n+-----------------------------------+\n \nSELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n+------------------------------------+\n| INSERT(\'Quadratic\', -1, 4, \'What\') |\n+------------------------------------+\n| Quadratic |\n+------------------------------------+\n \nSELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n+-------------------------------------+\n| INSERT(\'Quadratic\', 3, 100, \'What\') |\n+-------------------------------------+\n| QuWhat |\n+-------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/insert-function/','','https://mariadb.com/kb/en/insert-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (602,37,'INSTR','Syntax\n------ \nINSTR(str,substr)\n \nDescription\n----------- \nReturns the position of the first occurrence of substring\nsubstr in\nstring str. This is the same as the two-argument form of\nLOCATE(),\nexcept that the order of the arguments is reversed.\n \nINSTR() performs a case-insensitive search.\n \nIf any argument is NULL, returns NULL.\n \nExamples\n-------- \nSELECT INSTR(\'foobarbar\', \'bar\');\n+---------------------------+\n| INSTR(\'foobarbar\', \'bar\') |\n+---------------------------+\n| 4 |\n+---------------------------+\n \nSELECT INSTR(\'My\', \'Maria\');\n+----------------------+\n| INSTR(\'My\', \'Maria\') |\n+----------------------+\n| 0 |\n+----------------------+\n \n\n\nURL: https://mariadb.com/kb/en/instr/','','https://mariadb.com/kb/en/instr/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (603,37,'LCASE','Syntax\n------ \nLCASE(str)\n \nDescription\n----------- \nLCASE() is a synonym for LOWER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lcase/','','https://mariadb.com/kb/en/lcase/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (604,37,'LEFT','Syntax\n------ \nLEFT(str,len)\n \nDescription\n----------- \nReturns the leftmost len characters from the string str, or\nNULL if\nany argument is NULL.\n \nExamples\n-------- \nSELECT LEFT(\'MariaDB\', 5);\n+--------------------+\n| LEFT(\'MariaDB\', 5) |\n+--------------------+\n| Maria |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/left/','','https://mariadb.com/kb/en/left/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (605,37,'LENGTH','Syntax\n------ \nLENGTH(str)\n \nDescription\n----------- \nReturns the length of the string str, measured in bytes. A\nmulti-byte\ncharacter counts as multiple bytes. This means that for a\nstring\ncontaining five two-byte characters, LENGTH() returns 10,\nwhereas\nCHAR_LENGTH() returns 5. \n \nIf str is not a string value, it is converted into a string.\nIf str is NULL, the function returns NULL.\n \nUntil MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or\nbigint(10), in all cases. From MariaDB 10.3.1, returns\nMYSQL_TYPE_LONG, or int(10), when the result would fit\nwithin 32-bits.\n \nOracle Mode\n \nWhen running Oracle mode from MariaDB 10.3, LENGTH() is a\nsynonym for CHAR_LENGTH().\n \nExamples\n-------- \nSELECT LENGTH(\'MariaDB\');\n+-------------------+\n| LENGTH(\'MariaDB\') |\n+-------------------+\n| 7 |\n+-------------------+\n \nSELECT LENGTH(\'Ï€\');\n+--------------+\n| LENGTH(\'Ï€\') |\n+--------------+\n| 2 |\n+--------------+\n \nIn Oracle mode from MariaDB 10.3:\n \nSELECT LENGTH(\'Ï€\');\n+--------------+\n| LENGTH(\'Ï€\') |\n+--------------+\n| 1 |\n+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/length/','','https://mariadb.com/kb/en/length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (606,37,'LENGTHB','Introduced in MariaDB 10.3.1 as part of the Oracle\ncompatibility enhancements.\n \nSyntax\n------ \nLENGTHB(str)\n \nDescription\n----------- \nLENGTHB() is a synonym for LENGTH().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lengthb/','','https://mariadb.com/kb/en/lengthb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (607,37,'LIKE','Syntax\n------ \nexpr LIKE pat [ESCAPE \'escape_char\']\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n \nDescription\n----------- \nTests whether expr matches the pattern pat. Returns either 1\n(TRUE) or 0 (FALSE).\nBoth expr and pat may be any valid expression and are\nevaluated to strings.\nPatterns may use the following wildcard characters:\n% matches any number of characters, including zero.\n_ matches any single character.\n \nUse NOT LIKE to test if a string does not match a pattern.\nThis is equivalent to using\nthe NOT operator on the entire LIKE expression.\n \nIf either the expression or the pattern is NULL, the result\nis NULL.\n \nLIKE performs case-insensitive substring matches if the\ncollation for the\nexpression and pattern is case-insensitive. For\ncase-sensitive matches, declare either argument\nto use a binary collation using COLLATE, or coerce either of\nthem to a BINARY\nstring using CAST. Use SHOW COLLATION to get a list of\navailable collations. Collations ending in _bin are\ncase-sensitive.\n \nNumeric arguments are coerced to binary strings.\n \nThe _ wildcard matches a single character, not byte. It will\nonly match a multi-byte character\nif it is valid in the expression\'s character set. For\nexample, _ will match _utf8\"€\", but it\nwill not match _latin1\"€\" because the Euro sign is not a\nvalid latin1 character. If necessary,\nuse CONVERT to use the expression in a different character\nset.\n \nIf you need to match the characters _ or %, you must escape\nthem. By default,\nyou can prefix the wildcard characters the backslash\ncharacter \\ to escape them.\nThe backslash is used both to encode special characters like\nnewlines when a string is\nparsed as well as to escape wildcards in a pattern after\nparsing. Thus, to match an\nactual backslash, you sometimes need to double-escape it as\n\"\\\\\\\\\".\n \nTo avoid difficulties with the backslash character, you can\nchange the wildcard escape\ncharacter using ESCAPE in a LIKE expression. The argument to\nESCAPE\nmust be a single-character string.\n \nExamples\n-------- \nSelect the days that begin with \"T\":\n \nCREATE TABLE t1 (d VARCHAR(16));\nINSERT INTO t1 VALUES (\"Monday\"), (\"Tuesday\"),\n(\"Wednesday\"), (\"Thursday\"), (\"Friday\"),\n(\"Saturday\"), (\"Sunday\");\nSELECT * FROM t1 WHERE d LIKE \"T%\";\n \nSELECT * FROM t1 WHERE d LIKE \"T%\";\n+----------+\n| d |\n+----------+\n| Tuesday |\n| Thursday |\n+----------+\n \nSelect the days that contain the substring \"es\":\n \nSELECT * FROM t1 WHERE d LIKE \"%es%\";\n \nSELECT * FROM t1 WHERE d LIKE \"%es%\";\n+-----------+\n| d |\n+-----------+\n| Tuesday |\n| Wednesday |\n+-----------+\n \nSelect the six-character day names:\n \nSELECT * FROM t1 WHERE d like \"___day\";\n \nSELECT * FROM t1 WHERE d like \"___day\";\n+---------+\n| d |\n+---------+\n| Monday |\n| Friday |\n| Sunday |\n+---------+\n \nWith the default collations, LIKE is case-insensitive:\n \nSELECT * FROM t1 where d like \"t%\";\n \nSELECT * FROM t1 where d like \"t%\";\n+----------+\n| d |\n+----------+\n| Tuesday |\n| Thursday |\n+----------+\n \nUse COLLATE to specify a binary collation, forcing\ncase-sensitive matches:\n \nSELECT * FROM t1 WHERE d like \"t%\" COLLATE latin1_bin;\n \nSELECT * FROM t1 WHERE d like \"t%\" COLLATE latin1_bin;\nEmpty set (0.00 sec)\n \nYou can include functions and operators in the expression to\nmatch. Select dates\nbased on their day name:\n \nCREATE TABLE t2 (d DATETIME);\nINSERT INTO t2 VALUES\n (\"2007-01-30 21:31:07\"),\n (\"1983-10-15 06:42:51\"),\n (\"2011-04-21 12:34:56\"),\n (\"2011-10-30 06:31:41\"),\n (\"2011-01-30 14:03:25\"),\n (\"2004-10-07 11:19:34\");\nSELECT * FROM t2 WHERE DAYNAME(d) LIKE \"T%\";\n \nSELECT * FROM t2 WHERE DAYNAME(d) LIKE \"T%\";\n+------------------+\n| d |\n+------------------+\n| 2007-01-30 21:31 |\n| 2011-04-21 12:34 |\n| 2004-10-07 11:19 |\n+------------------+\n3 rows in set, 7 warnings (0.00 sec)\n \nOptimizing LIKE\n \nMariaDB can use indexes for LIKE on string columns in the\ncase where the LIKE doesn\'t start with % or _.\nStarting from MariaDB 10.0, one can set the\noptimizer_use_condition_selectivity variable to 5. If this\nis done, then the optimizer will read\noptimizer_selectivity_sampling_limit rows to calculate the\nselectivity of the LIKE expression before starting to\ncalculate the query plan. This can help speed up some LIKE\nqueries by providing the optimizer with more information\nabout your data.\n \n\n\nURL: https://mariadb.com/kb/en/like/','','https://mariadb.com/kb/en/like/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (608,37,'LOAD_FILE','Syntax\n------ \nLOAD_FILE(file_name)\n \nDescription\n----------- \nReads the file and returns the file contents as a string. To\nuse this function, the file must be located on the server\nhost, you must specify the full path name to the file, and\nyou must have the FILE privilege. The file must be readable\nby all and it must be less than the size, in bytes, of the\nmax_allowed_packet system variable. If the secure_file_priv\nsystem variable is set to a non-empty directory name, the\nfile to be loaded must be located in that directory.\n \nIf the file does not exist or cannot be read because one of\nthe preceding conditions is not satisfied, the function\nreturns NULL.\n \nSince MariaDB 5.1, the character_set_filesystem system\nvariable has controlled interpretation of file names that\nare given as literal strings.\n \nStatements using the LOAD_FILE() function are not safe for\nstatement based replication. This is because the slave will\nexecute the LOAD_FILE() command itself. If the file doesn\'t\nexist on the slave, the function will return NULL.\n \nExamples\n-------- \nUPDATE t SET blob_col=LOAD_FILE(\'/tmp/picture\') WHERE\nid=1;\n \n\n\nURL: https://mariadb.com/kb/en/load_file/','','https://mariadb.com/kb/en/load_file/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (609,37,'LOCATE','Syntax\n------ \nLOCATE(substr,str), LOCATE(substr,str,pos)\n \nDescription\n----------- \nThe first syntax returns the position of the first\noccurrence of\nsubstring substr in string str. The second syntax returns\nthe position\nof the first occurrence of substring substr in string str,\nstarting at\nposition pos. Returns 0 if substr is not in str.\n \nLOCATE() performs a case-insensitive search.\n \nIf any argument is NULL, returns NULL.\n \nINSTR() is a synonym of LOCATE() without the third argument.\n \nExamples\n-------- \nSELECT LOCATE(\'bar\', \'foobarbar\');\n+----------------------------+\n| LOCATE(\'bar\', \'foobarbar\') |\n+----------------------------+\n| 4 |\n+----------------------------+\n \nSELECT LOCATE(\'My\', \'Maria\');\n+-----------------------+\n| LOCATE(\'My\', \'Maria\') |\n+-----------------------+\n| 0 |\n+-----------------------+\n \nSELECT LOCATE(\'bar\', \'foobarbar\', 5);\n+-------------------------------+\n| LOCATE(\'bar\', \'foobarbar\', 5) |\n+-------------------------------+\n| 7 |\n+-------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/locate/','','https://mariadb.com/kb/en/locate/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (610,37,'LOWER','Syntax\n------ \nLOWER(str)\n \nDescription\n----------- \nReturns the string str with all characters changed to\nlowercase\naccording to the current character set mapping. The default\nis latin1\n(cp1252 West European).\n \nExamples\n-------- \n SELECT LOWER(\'QUADRATICALLY\');\n+------------------------+\n| LOWER(\'QUADRATICALLY\') |\n+------------------------+\n| quadratically |\n+------------------------+\n \nLOWER() (and UPPER()) are ineffective when applied to binary\nstrings (BINARY, VARBINARY, BLOB). \nTo perform lettercase conversion, CONVERT the string to a\nnon-binary string:\n \nSET @str = BINARY \'North Carolina\';\n \nSELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+----------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+----------------+-----------------------------------+\n| North Carolina | north carolina |\n+----------------+-----------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lower/','','https://mariadb.com/kb/en/lower/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (611,37,'LPAD','Syntax\n------ \nLPAD(str, len [,padstr])\n \nDescription\n----------- \nReturns the string str, left-padded with the string padstr\nto a length\nof len characters. If str is longer than len, the return\nvalue is\nshortened to len characters. If padstr is omitted, the LPAD\nfunction pads spaces.\n \nPrior to MariaDB 10.3.1, the padstr parameter was mandatory.\n \nReturns NULL if given a NULL argument. If the result is\nempty (zero length), returns either an empty string or, from\nMariaDB 10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using LPAD_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT LPAD(\'hello\',10,\'.\');\n+----------------------+\n| LPAD(\'hello\',10,\'.\') |\n+----------------------+\n| .....hello |\n+----------------------+\n \nSELECT LPAD(\'hello\',2,\'.\');\n+---------------------+\n| LPAD(\'hello\',2,\'.\') |\n+---------------------+\n| he |\n+---------------------+\n \nFrom MariaDB 10.3.1, with the pad string defaulting to\nspace.\n \nSELECT LPAD(\'hello\',10);\n+------------------+\n| LPAD(\'hello\',10) |\n+------------------+\n| hello |\n+------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT LPAD(\'\',0),LPAD_ORACLE(\'\',0);\n+------------+-------------------+\n| LPAD(\'\',0) | LPAD_ORACLE(\'\',0) |\n+------------+-------------------+\n| | NULL |\n+------------+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/lpad/','','https://mariadb.com/kb/en/lpad/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (612,37,'LTRIM','Syntax\n------ \nLTRIM(str)\n \nDescription\n----------- \nReturns the string str with leading space characters\nremoved.\n \nReturns NULL if given a NULL argument. If the result is\nempty, returns either an empty string, or, from MariaDB\n10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using LTRIM_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT QUOTE(LTRIM(\' MariaDB \'));\n+-------------------------------+\n| QUOTE(LTRIM(\' MariaDB \')) |\n+-------------------------------+\n| \'MariaDB \' |\n+-------------------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT LTRIM(\'\'),LTRIM_ORACLE(\'\');\n+-----------+------------------+\n| LTRIM(\'\') | LTRIM_ORACLE(\'\') |\n+-----------+------------------+\n| | NULL |\n+-----------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/ltrim/','','https://mariadb.com/kb/en/ltrim/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (613,37,'MAKE_SET','Syntax\n------ \nMAKE_SET(bits,str1,str2,...)\n \nDescription\n----------- \nReturns a set value (a string containing substrings\nseparated by \",\"\ncharacters) consisting of the strings that have the\ncorresponding bit\nin bits set. str1 corresponds to bit 0, str2 to bit 1, and\nso on. NULL\nvalues in str1, str2, ... are not appended to the result.\n \nExamples\n-------- \nSELECT MAKE_SET(1,\'a\',\'b\',\'c\');\n+-------------------------+\n| MAKE_SET(1,\'a\',\'b\',\'c\') |\n+-------------------------+\n| a |\n+-------------------------+\n \nSELECT MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\');\n+----------------------------------------+\n| MAKE_SET(1 | 4,\'hello\',\'nice\',\'world\') |\n+----------------------------------------+\n| hello,world |\n+----------------------------------------+\n \nSELECT MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\');\n+---------------------------------------------+\n| MAKE_SET(1 | 4,\'hello\',\'nice\',NULL,\'world\') |\n+---------------------------------------------+\n| hello |\n+---------------------------------------------+\n \nSELECT QUOTE(MAKE_SET(0,\'a\',\'b\',\'c\'));\n+--------------------------------+\n| QUOTE(MAKE_SET(0,\'a\',\'b\',\'c\')) |\n+--------------------------------+\n| \'\' |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/make_set/','','https://mariadb.com/kb/en/make_set/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (614,37,'MATCH AGAINST','Syntax\n------ \nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n \nDescription\n----------- \nA special construct used to perform a fulltext search on a\nfulltext index.\n \nSee Fulltext Index Overview for a full description, and\nFull-text Indexes for more articles on the topic.\n \nExamples\n-------- \nCREATE TABLE ft_myisam(copy TEXT,FULLTEXT(copy))\nENGINE=MyISAM;\n \nINSERT INTO ft_myisam(copy) VALUES (\'Once upon a time\'),\n(\'There was a wicked witch\'), \n (\'Who ate everybody up\');\n \nSELECT * FROM ft_myisam WHERE MATCH(copy)\nAGAINST(\'wicked\');\n+--------------------------+\n| copy |\n+--------------------------+\n| There was a wicked witch |\n+--------------------------+\n \nSELECT id, body, MATCH (title,body) AGAINST\n (\'Security implications of running MySQL as root\'\n IN NATURAL LANGUAGE MODE) AS score\n FROM articles WHERE MATCH (title,body) AGAINST\n (\'Security implications of running MySQL as root\'\n IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body | score |\n+----+-------------------------------------+-----------------+\n| 4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014\n|\n| 6 | When configured properly, MySQL ... | 1.3114095926285\n|\n+----+-------------------------------------+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/match-against/','','https://mariadb.com/kb/en/match-against/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (615,37,'MID','Syntax\n------ \nMID(str,pos,len)\n \nDescription\n----------- \nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n \nExamples\n-------- \nSELECT MID(\'abcd\',4,1);\n+-----------------+\n| MID(\'abcd\',4,1) |\n+-----------------+\n| d |\n+-----------------+\n \nSELECT MID(\'abcd\',2,2);\n+-----------------+\n| MID(\'abcd\',2,2) |\n+-----------------+\n| bc |\n+-----------------+\n \nA negative starting position:\n \nSELECT MID(\'abcd\',-2,4);\n+------------------+\n| MID(\'abcd\',-2,4) |\n+------------------+\n| cd |\n+------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/mid/','','https://mariadb.com/kb/en/mid/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (616,37,'NOT LIKE','Syntax\n------ \nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n \nDescription\n----------- \nThis is the same as NOT (expr LIKE pat [ESCAPE\n\'escape_char\']).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-like/','','https://mariadb.com/kb/en/not-like/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (617,37,'NOT REGEXP','Syntax\n------ \nexpr NOT REGEXP pat, expr NOT RLIKE pat\n \nDescription\n----------- \nThis is the same as NOT (expr REGEXP pat).\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/not-regexp/','','https://mariadb.com/kb/en/not-regexp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (618,37,'OCTET_LENGTH','Syntax\n------ \nOCTET_LENGTH(str)\n \nDescription\n----------- \nOCTET_LENGTH() is normally a synonym for LENGTH(). When\nrunning Oracle mode from MariaDB 10.3, they are not\nsynonyms, but OCTET_LENGTH() behaves as LENGTH() would when\nnot in Oracle mode.\n \n\n\nURL: https://mariadb.com/kb/en/octet_length/','','https://mariadb.com/kb/en/octet_length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (619,37,'ORD','Syntax\n------ \nORD(str)\n \nDescription\n----------- \nIf the leftmost character of the string str is a multi-byte\ncharacter,\nreturns the code for that character, calculated from the\nnumeric\nvalues of its constituent bytes using this formula:\n \n (1st byte code)\n+ (2nd byte code x 256)\n+ (3rd byte code x 256 x 256) ...\n \nIf the leftmost character is not a multi-byte character,\nORD() returns\nthe same value as the ASCII() function.\n \nExamples\n-------- \nSELECT ORD(\'2\');\n+----------+\n| ORD(\'2\') |\n+----------+\n| 50 |\n+----------+\n \n\n\nURL: https://mariadb.com/kb/en/ord/','','https://mariadb.com/kb/en/ord/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (620,37,'POSITION','Syntax\n------ \nPOSITION(substr IN str)\n \nDescription\n----------- \nPOSITION(substr IN str) is a synonym for LOCATE(substr,str).\n \nIt\'s part of ODBC 3.0.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/position/','','https://mariadb.com/kb/en/position/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (621,37,'QUOTE','Syntax\n------ \nQUOTE(str)\n \nDescription\n----------- \nQuotes a string to produce a result that can be used as a\nproperly escaped data\nvalue in an SQL statement. The string is returned enclosed\nby single quotes and\nwith each instance of single quote (\"\'\"), backslash\n(\"\\\"),\nASCII NUL, and Control-Z preceded by a backslash. If the\nargument\nis NULL, the return value is the word \"NULL\" without\nenclosing single\nquotes.\n \nExamples\n-------- \nSELECT QUOTE(\"Don\'t!\");\n+-----------------+\n| QUOTE(\"Don\'t!\") |\n+-----------------+\n| \'Don\\\'t!\' |\n+-----------------+\n \nSELECT QUOTE(NULL); \n+-------------+\n| QUOTE(NULL) |\n+-------------+\n| NULL |\n+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/quote/','','https://mariadb.com/kb/en/quote/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (622,37,'REGEXP_INSTR','REGEXP_INSTR was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREGEXP_INSTR(subject, pattern)\n \nReturns the position of the first occurrence of the regular\nexpression pattern in the string subject, or 0 if pattern\nwas not found.\n \nThe positions start with 1 and are measured in characters\n(i.e. not in bytes), which is important for multi-byte\ncharacter sets. You can cast a multi-byte character set to\nBINARY to get offsets in bytes.\n \nThe function follows the case sensitivity rules of the\neffective collation. Matching is performed case\ninsensitively for case insensitive collations, and case\nsensitively for case sensitive collations and for binary\ndata.\n \nThe collation case sensitivity can be overwritten using the\n(?i) and (?-i) PCRE flags.\n \nMariaDB 10.0.5 switched to the PCRE regular expression\nlibrary for enhanced regular expression performance, and\nREGEXP_INSTR was introduced as part of this enhancement.\n \nExamples\n-------- \nSELECT REGEXP_INSTR(\'abc\',\'b\');\n-> 2\n \nSELECT REGEXP_INSTR(\'abc\',\'x\');\n-> 0\n \nSELECT REGEXP_INSTR(\'BJÖRN\',\'N\');\n-> 5\n \nCasting a multi-byte character set as BINARY to get offsets\nin bytes:\n \nSELECT REGEXP_INSTR(BINARY \'BJÖRN\',\'N\') AS\ncast_utf8_to_binary;\n-> 6\n \nCase sensitivity:\n \nSELECT REGEXP_INSTR(\'ABC\',\'b\');\n-> 2\n \nSELECT REGEXP_INSTR(\'ABC\' COLLATE utf8_bin,\'b\');\n-> 0\n \nSELECT REGEXP_INSTR(BINARY\'ABC\',\'b\');\n-> 0\n \nSELECT REGEXP_INSTR(\'ABC\',\'(?-i)b\');\n-> 0\n \nSELECT REGEXP_INSTR(\'ABC\' COLLATE utf8_bin,\'(?i)b\');\n-> 2\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/regexp_instr/','','https://mariadb.com/kb/en/regexp_instr/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (623,37,'REGEXP_REPLACE','REGEXP_REPLACE was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREGEXP_REPLACE(subject, pattern, replace)\n \nDescription\n----------- \nREGEXP_REPLACE returns the string subject with all\noccurrences of the regular expression pattern replaced by\nthe string replace. If no occurrences are found, then\nsubject is returned as is.\n \nThe replace string can have backreferences to the\nsubexpressions in the form \\N, where N is a number from 1\nto 9.\n \nThe function follows the case sensitivity rules of the\neffective collation. Matching is performed case\ninsensitively for case insensitive collations, and case\nsensitively for case sensitive collations and for binary\ndata.\n \nThe collation case sensitivity can be overwritten using the\n(?i) and (?-i) PCRE flags.\n \nMariaDB 10.0.5 switched to the PCRE regular expression\nlibrary for enhanced regular expression performance, and\nREGEXP_REPLACE was introduced as part of this enhancement.\n \nMariaDB 10.0.11 introduced the default_regex_flags variable\nto address the remaining compatibilities between PCRE and\nthe old regex library. \n \nExamples\n-------- \nSELECT REGEXP_REPLACE(\'ab12cd\',\'[0-9]\',\'\') AS\nremove_digits;\n-> abcd\n \nSELECT REGEXP_REPLACE(\'titlebody\', \'\',\' \')\nAS strip_html;\n-> title body\n \nBackreferences to the subexpressions in the form \\N, where\nN is a number from 1 to 9:\n \nSELECT REGEXP_REPLACE(\'James Bond\',\'^(.*)\n(.*)$\',\'\\\\2, \\\\1\') AS reorder_name;\n-> Bond, James\n \nCase insensitive and case sensitive matches:\n \nSELECT REGEXP_REPLACE(\'ABC\',\'b\',\'-\') AS\ncase_insensitive;\n-> A-C\n \nSELECT REGEXP_REPLACE(\'ABC\' COLLATE utf8_bin,\'b\',\'-\')\nAS case_sensitive;\n-> ABC\n \nSELECT REGEXP_REPLACE(BINARY \'ABC\',\'b\',\'-\') AS\nbinary_data;\n-> ABC\n \nOverwriting the collation case sensitivity using the (?i)\nand (?-i) PCRE flags.\n \nSELECT REGEXP_REPLACE(\'ABC\',\'(?-i)b\',\'-\') AS\nforce_case_sensitive;\n-> ABC\n \nSELECT REGEXP_REPLACE(BINARY \'ABC\',\'(?i)b\',\'-\') AS\nforce_case_insensitive;\n-> A-C\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/regexp_replace/','','https://mariadb.com/kb/en/regexp_replace/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (624,37,'REGEXP_SUBSTR','REGEXP_SUBSTR was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nREGEXP_SUBSTR(subject,pattern)\n \nDescription\n----------- \nReturns the part of the string subject that matches the\nregular expression pattern, or an empty string if pattern\nwas not found.\n \nThe function follows the case sensitivity rules of the\neffective collation. Matching is performed case\ninsensitively for case insensitive collations, and case\nsensitively for case sensitive collations and for binary\ndata.\n \nThe collation case sensitivity can be overwritten using the\n(?i) and (?-i) PCRE flags.\n \nMariaDB 10.0.5 switched to the PCRE regular expression\nlibrary for enhanced regular expression performance, and\nREGEXP_SUBSTR was introduced as part of this enhancement.\n \nMariaDB 10.0.11 introduced the default_regex_flags variable\nto address the remaining compatibilities between PCRE and\nthe old regex library. \n \nExamples\n-------- \nSELECT REGEXP_SUBSTR(\'ab12cd\',\'[0-9]+\');\n-> 12\n \nSELECT REGEXP_SUBSTR(\n \'See https://mariadb.org/en/foundation/ for details\',\n \'https?://[^/]*\');\n-> https://mariadb.org\n \nSELECT REGEXP_SUBSTR(\'ABC\',\'b\');\n-> B\n \nSELECT REGEXP_SUBSTR(\'ABC\' COLLATE utf8_bin,\'b\');\n->\n \nSELECT REGEXP_SUBSTR(BINARY\'ABC\',\'b\');\n->\n \nSELECT REGEXP_SUBSTR(\'ABC\',\'(?i)b\');\n-> B\n \nSELECT REGEXP_SUBSTR(\'ABC\' COLLATE utf8_bin,\'(?+i)b\');\n-> B\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/regexp_substr/','','https://mariadb.com/kb/en/regexp_substr/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (625,37,'REPEAT Function','Syntax\n------ \nREPEAT(str,count)\n \nDescription\n----------- \nReturns a string consisting of the string str repeated count\ntimes. If\ncount is less than 1, returns an empty string. Returns NULL\nif str or\ncount are NULL.\n \nExamples\n-------- \nSELECT QUOTE(REPEAT(\'MariaDB \',4));\n+------------------------------------+\n| QUOTE(REPEAT(\'MariaDB \',4)) |\n+------------------------------------+\n| \'MariaDB MariaDB MariaDB MariaDB \' |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/repeat-function/','','https://mariadb.com/kb/en/repeat-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (626,37,'REPLACE Function','Syntax\n------ \nREPLACE(str,from_str,to_str)\n \nDescription\n----------- \nReturns the string str with all occurrences of the string\nfrom_str\nreplaced by the string to_str. REPLACE() performs a\ncase-sensitive\nmatch when searching for from_str.\n \nExamples\n-------- \nSELECT REPLACE(\'www.mariadb.org\', \'w\', \'Ww\');\n+---------------------------------------+\n| REPLACE(\'www.mariadb.org\', \'w\', \'Ww\') |\n+---------------------------------------+\n| WwWwWw.mariadb.org |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/replace-function/','','https://mariadb.com/kb/en/replace-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (627,37,'REVERSE','Syntax\n------ \nREVERSE(str)\n \nDescription\n----------- \nReturns the string str with the order of the characters\nreversed.\n \nExamples\n-------- \nSELECT REVERSE(\'desserts\');\n+---------------------+\n| REVERSE(\'desserts\') |\n+---------------------+\n| stressed |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/reverse/','','https://mariadb.com/kb/en/reverse/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (628,37,'RIGHT','Syntax\n------ \nRIGHT(str,len)\n \nDescription\n----------- \nReturns the rightmost len characters from the string str, or\nNULL if\nany argument is NULL.\n \nExamples\n-------- \nSELECT RIGHT(\'MariaDB\', 2);\n+---------------------+\n| RIGHT(\'MariaDB\', 2) |\n+---------------------+\n| DB |\n+---------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/right/','','https://mariadb.com/kb/en/right/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (629,37,'RPAD','Syntax\n------ \nRPAD(str, len [, padstr])\n \nDescription\n----------- \nReturns the string str, right-padded with the string padstr\nto a\nlength of len characters. If str is longer than len, the\nreturn value\nis shortened to len characters. If padstr is omitted, the\nRPAD function pads spaces.\n \nPrior to MariaDB 10.3.1, the padstr parameter was mandatory.\n \nReturns NULL if given a NULL argument. If the result is\nempty (a length of zero), returns either an empty string,\nor, from MariaDB 10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using RPAD_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT RPAD(\'hello\',10,\'.\');\n+----------------------+\n| RPAD(\'hello\',10,\'.\') |\n+----------------------+\n| hello..... |\n+----------------------+\n \nSELECT RPAD(\'hello\',2,\'.\');\n+---------------------+\n| RPAD(\'hello\',2,\'.\') |\n+---------------------+\n| he |\n+---------------------+\n \nFrom MariaDB 10.3.1, with the pad string defaulting to\nspace.\n \nSELECT RPAD(\'hello\',30);\n+--------------------------------+\n| RPAD(\'hello\',30) |\n+--------------------------------+\n| hello |\n+--------------------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT RPAD(\'\',0),RPAD_ORACLE(\'\',0);\n+------------+-------------------+\n| RPAD(\'\',0) | RPAD_ORACLE(\'\',0) |\n+------------+-------------------+\n| | NULL |\n+------------+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/rpad/','','https://mariadb.com/kb/en/rpad/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (630,37,'RTRIM','Syntax\n------ \nRTRIM(str)\n \nDescription\n----------- \nReturns the string str with trailing space characters\nremoved.\n \nReturns NULL if given a NULL argument. If the result is\nempty, returns either an empty string, or, from MariaDB\n10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using RTRIM_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT QUOTE(RTRIM(\'MariaDB \'));\n+-----------------------------+\n| QUOTE(RTRIM(\'MariaDB \')) |\n+-----------------------------+\n| \'MariaDB\' |\n+-----------------------------+\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT RTRIM(\'\'),RTRIM_ORACLE(\'\');\n+-----------+------------------+\n| RTRIM(\'\') | RTRIM_ORACLE(\'\') |\n+-----------+------------------+\n| | NULL |\n+-----------+------------------+\n \n\n\nURL: https://mariadb.com/kb/en/rtrim/','','https://mariadb.com/kb/en/rtrim/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (631,37,'SOUNDEX','Syntax\n------ \nSOUNDEX(str)\n \nDescription\n----------- \nReturns a soundex string from str. Two strings that sound\nalmost the\nsame should have identical soundex strings. A standard\nsoundex string is four\ncharacters long, but the SOUNDEX() function returns an\narbitrarily long\nstring. You can use SUBSTRING() on the result to get a\nstandard soundex\nstring. All non-alphabetic characters in str are ignored.\nAll\ninternational alphabetic characters outside the A-Z range\nare treated as\nvowels.\n \nImportant: When using SOUNDEX(), you should be aware of the\nfollowing limitations:\nThis function, as currently implemented, is intended to work\nwell with\n strings that are in the English language only. Strings in\nother languages may\n not produce reliable results.\n \nExamples\n-------- \nSOUNDEX(\'Hello\');\n+------------------+\n| SOUNDEX(\'Hello\') |\n+------------------+\n| H400 |\n+------------------+\n \nSELECT SOUNDEX(\'MariaDB\');\n+--------------------+\n| SOUNDEX(\'MariaDB\') |\n+--------------------+\n| M631 |\n+--------------------+\n \nSELECT SOUNDEX(\'Knowledgebase\');\n+--------------------------+\n| SOUNDEX(\'Knowledgebase\') |\n+--------------------------+\n| K543212 |\n+--------------------------+\n \nSELECT givenname, surname FROM users WHERE\nSOUNDEX(givenname) = SOUNDEX(\"robert\");\n+-----------+---------+\n| givenname | surname |\n+-----------+---------+\n| Roberto | Castro |\n+-----------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/soundex/','','https://mariadb.com/kb/en/soundex/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (632,37,'SOUNDS LIKE','Syntax\n------ \nexpr1 SOUNDS LIKE expr2\n \nDescription\n----------- \nThis is the same as SOUNDEX(expr1) = SOUNDEX(expr2).\n \nExample\n \nSELECT givenname, surname FROM users WHERE givenname SOUNDS\nLIKE \"robert\";\n \n+-----------+---------+\n| givenname | surname |\n+-----------+---------+\n| Roberto | Castro |\n+-----------+---------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/sounds-like/','','https://mariadb.com/kb/en/sounds-like/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (633,37,'SPACE','Syntax\n------ \nSPACE(N)\n \nDescription\n----------- \nReturns a string consisting of N space characters. If N is\nNULL, returns NULL.\n \nExamples\n-------- \nSELECT QUOTE(SPACE(6));\n+-----------------+\n| QUOTE(SPACE(6)) |\n+-----------------+\n| \' \' |\n+-----------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/space/','','https://mariadb.com/kb/en/space/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (634,37,'STRCMP','Syntax\n------ \nSTRCMP(expr1,expr2)\n \nDescription\n----------- \nSTRCMP() returns 0 if the strings are the same, -1 if the\nfirst\nargument is smaller than the second according to the current\nsort order,\nand 1 otherwise.\n \nExamples\n-------- \nSELECT STRCMP(\'text\', \'text2\');\n+-------------------------+\n| STRCMP(\'text\', \'text2\') |\n+-------------------------+\n| -1 |\n+-------------------------+\n \nSELECT STRCMP(\'text2\', \'text\');\n+-------------------------+\n| STRCMP(\'text2\', \'text\') |\n+-------------------------+\n| 1 |\n+-------------------------+\n \nSELECT STRCMP(\'text\', \'text\');\n+------------------------+\n| STRCMP(\'text\', \'text\') |\n+------------------------+\n| 0 |\n+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/strcmp/','','https://mariadb.com/kb/en/strcmp/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (635,37,'SUBSTR','Description\n----------- \nSUBSTR() is a synonym for SUBSTRING().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/substr/','','https://mariadb.com/kb/en/substr/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (636,37,'SUBSTRING','Syntax\n------ \nSUBSTRING(str,pos), \nSUBSTRING(str FROM pos), \nSUBSTRING(str,pos,len),\nSUBSTRING(str FROM pos FOR len)\n \nSUBSTR(str,pos), \nSUBSTR(str FROM pos), \nSUBSTR(str,pos,len),\nSUBSTR(str FROM pos FOR len)\n \nDescription\n----------- \nThe forms without a len argument return a substring from\nstring str starting at position pos.\n \nThe forms with a len argument return a substring len\ncharacters long from string str, starting at position pos.\n \nThe forms that use FROM are standard SQL syntax.\n \nIt is also possible to use a negative value for pos. In this\ncase, the beginning of the substring is pos characters from\nthe end of the string, rather than the beginning. A negative\nvalue may be used for pos in any of the forms of this\nfunction.\n \nBy default, the position of the first character in the\nstring from which the substring is to be extracted is\nreckoned as 1. For Oracle-compatibility, from MariaDB\n10.3.3, when sql_mode is set to \'oracle\', position zero is\ntreated as position 1 (although the first character is still\nreckoned as 1).\n \nIf any argument is NULL, returns NULL.\n \nExamples\n-------- \nSELECT SUBSTRING(\'Knowledgebase\',5);\n+------------------------------+\n| SUBSTRING(\'Knowledgebase\',5) |\n+------------------------------+\n| ledgebase |\n+------------------------------+\n \nSELECT SUBSTRING(\'MariaDB\' FROM 6);\n+-----------------------------+\n| SUBSTRING(\'MariaDB\' FROM 6) |\n+-----------------------------+\n| DB |\n+-----------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\',3,7);\n+--------------------------------+\n| SUBSTRING(\'Knowledgebase\',3,7) |\n+--------------------------------+\n| owledge |\n+--------------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\', -4);\n+--------------------------------+\n| SUBSTRING(\'Knowledgebase\', -4) |\n+--------------------------------+\n| base |\n+--------------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\', -8, 4);\n+-----------------------------------+\n| SUBSTRING(\'Knowledgebase\', -8, 4) |\n+-----------------------------------+\n| edge |\n+-----------------------------------+\n \nSELECT SUBSTRING(\'Knowledgebase\' FROM -8 FOR 4);\n+------------------------------------------+\n| SUBSTRING(\'Knowledgebase\' FROM -8 FOR 4) |\n+------------------------------------------+\n| edge |\n+------------------------------------------+\n \nOracle mode from MariaDB 10.3.3:\n \nSELECT SUBSTR(\'abc\',0,3);\n+-------------------+\n| SUBSTR(\'abc\',0,3) |\n+-------------------+\n| |\n+-------------------+\n \nSELECT SUBSTR(\'abc\',1,2);\n+-------------------+\n| SUBSTR(\'abc\',1,2) |\n+-------------------+\n| ab |\n+-------------------+\n \nSET sql_mode=\'oracle\';\n \nSELECT SUBSTR(\'abc\',0,3);\n+-------------------+\n| SUBSTR(\'abc\',0,3) |\n+-------------------+\n| abc |\n+-------------------+\n \nSELECT SUBSTR(\'abc\',1,2);\n+-------------------+\n| SUBSTR(\'abc\',1,2) |\n+-------------------+\n| ab |\n+-------------------+\n \n\n\nURL: https://mariadb.com/kb/en/substring/','','https://mariadb.com/kb/en/substring/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (637,37,'SUBSTRING_INDEX','Syntax\n------ \nSUBSTRING_INDEX(str,delim,count)\n \nDescription\n----------- \nReturns the substring from string str before count\noccurrences of the\ndelimiter delim. If count is positive, everything to the\nleft\nof the final delimiter (counting from the left) is returned.\nIf count\nis negative, everything to the right of the final delimiter\n(counting from the\nright) is returned. SUBSTRING_INDEX() performs a\ncase-sensitive match when\nsearching for delim.\n \nIf any argument is NULL, returns NULL.\n \nExamples\n-------- \nSELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2);\n+--------------------------------------------+\n| SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', 2) |\n+--------------------------------------------+\n| www.mariadb |\n+--------------------------------------------+\n \nSELECT SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2);\n+---------------------------------------------+\n| SUBSTRING_INDEX(\'www.mariadb.org\', \'.\', -2) |\n+---------------------------------------------+\n| mariadb.org |\n+---------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/substring_index/','','https://mariadb.com/kb/en/substring_index/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (638,37,'TO_BASE64','The TO_BASE64() function was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nTO_BASE64(str)\n \nDescription\n----------- \nConverts the string argument str to its base-64 encoded\nform, returning the result as a character string in the\nconnection character set and collation.\n \nThe argument str will be converted to string first if it is\nnot a string. A NULL argument will return a NULL result.\n \nThe reverse function, FROM_BASE64(), decodes an encoded\nbase-64 string.\n \nThere are a numerous different methods to base-64 encode a\nstring. The following are used by MariaDB and MySQL:\nAlphabet value 64 is encoded as \'+\'.\nAlphabet value 63 is encoded as \'/\'.\nEncoding output is made up of groups of four printable\ncharacters, with each three bytes of data encoded using four\ncharacters. If the final group is not complete, it is padded\nwith \'=\' characters to make up a length of four.\nTo divide long output, a newline is added after every 76\ncharacters.\nDecoding will recognize and ignore newlines, carriage\nreturns, tabs, and spaces. \n \nExamples\n-------- \nSELECT TO_BASE64(\'Maria\');\n+--------------------+\n| TO_BASE64(\'Maria\') |\n+--------------------+\n| TWFyaWE= |\n+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/to_base64/','','https://mariadb.com/kb/en/to_base64/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (639,37,'TRIM','Syntax\n------ \nTRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str),\nTRIM([remstr FROM] str)\n \nDescription\n----------- \nReturns the string str with all remstr prefixes or suffixes\nremoved. If none of the specifiers BOTH, LEADING, or\nTRAILING is given, BOTH is assumed. remstr is optional and,\nif not specified, spaces are removed.\n \nReturns NULL if given a NULL argument. If the result is\nempty, returns either an empty string, or, from MariaDB\n10.3.6 with SQL_MODE=Oracle, NULL.\n \nThe Oracle mode version of the function can be accessed\noutside of Oracle mode by using TRIM_ORACLE as the function\nname.\n \nExamples\n-------- \nSELECT TRIM(\' bar \')\\G\n*************************** 1. row\n***************************\nTRIM(\' bar \'): bar\n \nSELECT TRIM(LEADING \'x\' FROM \'xxxbarxxx\')\\G\n*************************** 1. row\n***************************\nTRIM(LEADING \'x\' FROM \'xxxbarxxx\'): barxxx\n \nSELECT TRIM(BOTH \'x\' FROM \'xxxbarxxx\')\\G\n*************************** 1. row\n***************************\nTRIM(BOTH \'x\' FROM \'xxxbarxxx\'): bar\n \nSELECT TRIM(TRAILING \'xyz\' FROM \'barxxyz\')\\G\n*************************** 1. row\n***************************\nTRIM(TRAILING \'xyz\' FROM \'barxxyz\'): barx\n \nOracle mode version from MariaDB 10.3.6:\n \nSELECT TRIM(\'\'),TRIM_ORACLE(\'\');\n+----------+-----------------+\n| TRIM(\'\') | TRIM_ORACLE(\'\') |\n+----------+-----------------+\n| | NULL |\n+----------+-----------------+\n \n\n\nURL: https://mariadb.com/kb/en/trim/','','https://mariadb.com/kb/en/trim/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (640,37,'UCASE','Syntax\n------ \nUCASE(str)\n \nDescription\n----------- \nUCASE() is a synonym for UPPER().\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ucase/','','https://mariadb.com/kb/en/ucase/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (641,37,'UNHEX','Syntax\n------ \nUNHEX(str)\n \nDescription\n----------- \nPerforms the inverse operation of HEX(str). That is, it\ninterprets\neach pair of hexadecimal digits in the argument as a number\nand\nconverts it to the character represented by the number. The\nresulting\ncharacters are returned as a binary string.\n \nIf str is NULL, UNHEX() returns NULL.\n \nExamples\n-------- \nSELECT HEX(\'MariaDB\');\n+----------------+\n| HEX(\'MariaDB\') |\n+----------------+\n| 4D617269614442 |\n+----------------+\n \nSELECT UNHEX(\'4D617269614442\');\n+-------------------------+\n| UNHEX(\'4D617269614442\') |\n+-------------------------+\n| MariaDB |\n+-------------------------+\n \nSELECT 0x4D617269614442;\n \n+------------------+\n| 0x4D617269614442 |\n+------------------+\n| MariaDB |\n+------------------+\n \nSELECT UNHEX(HEX(\'string\'));\n+----------------------+\n| UNHEX(HEX(\'string\')) |\n+----------------------+\n| string |\n+----------------------+\n \nSELECT HEX(UNHEX(\'1267\'));\n+--------------------+\n| HEX(UNHEX(\'1267\')) |\n+--------------------+\n| 1267 |\n+--------------------+\n \n\n\nURL: https://mariadb.com/kb/en/unhex/','','https://mariadb.com/kb/en/unhex/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (642,37,'UPDATEXML','Syntax\n------ \nUpdateXML(xml_target, xpath_expr, new_xml)\n \nDescription\n----------- \nThis function replaces a single portion of a given fragment\nof XML markup\nxml_target with a new XML fragment new_xml, and then returns\nthe\nchanged XML. The portion of xml_target that is replaced\nmatches an XPath\nexpression xpath_expr supplied by the user. If no expression\nmatching\nxpath_expr is found, or if multiple matches are found, the\nfunction returns\nthe original xml_target XML fragment. All three arguments\nshould be\nstrings.\n \nExamples\n-------- \nSELECT\n UpdateXML(\'ccc\', \'/a\', \'fff\') AS val1,\n UpdateXML(\'ccc\', \'/b\', \'fff\') AS val2,\n UpdateXML(\'ccc\', \'//b\', \'fff\') AS val3,\n UpdateXML(\'ccc\', \'/a/d\', \'fff\') AS val4,\n UpdateXML(\'ccc\', \'/a/d\', \'fff\') AS val5\n \\G\n*************************** 1. row\n***************************\nval1: fff\nval2: ccc\nval3: fff\nval4: cccfff\nval5: ccc\n1 row in set (0.00 sec)\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/updatexml/','','https://mariadb.com/kb/en/updatexml/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (643,37,'UPPER','Syntax\n------ \nUPPER(str)\n \nDescription\n----------- \nReturns the string str with all characters changed to\nuppercase\naccording to the current character set mapping. The default\nis latin1\n(cp1252 West European).\n \nSELECT UPPER(surname), givenname FROM users ORDER BY\nsurname;\n \n+----------------+------------+\n| UPPER(surname) | givenname |\n+----------------+------------+\n| ABEL | Jacinto |\n| CASTRO | Robert |\n| COSTA | Phestos |\n| MOSCHELLA | Hippolytos |\n+----------------+------------+\n \nUPPER() is ineffective when applied to binary strings\n(BINARY,\nVARBINARY, BLOB). The description of \nLOWER() shows how to\nperform lettercase conversion of binary strings.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/upper/','','https://mariadb.com/kb/en/upper/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (644,37,'WEIGHT_STRING','The WEIGHT_STRING function was introduced in MariaDB 10.0.5.\n \nSyntax\n------ \nWEIGHT_STRING(str [AS {CHAR|BINARY}(N)] [LEVEL levels]\n[flags])\n levels: N [ASC|DESC|REVERSE] [, N [ASC|DESC|REVERSE]] ... \n \nDescription\n----------- \nReturns a binary string representing the string\'s sorting\nand comparison value. A string with a lower result means\nthat for sorting purposes the string appears before a string\nwith a higher result.\n \nWEIGHT_STRING() is particularly useful when adding new\ncollations, for testing purposes.\n \nIf str is a non-binary string (CHAR, VARCHAR or TEXT),\nWEIGHT_STRING returns the string\'s collation weight. If str\nis a binary string (BINARY, VARBINARY or BLOB), the return\nvalue is simply the input value, since the weight for each\nbyte in a binary string is the byte value.\n \nWEIGHT_STRING() returns NULL if given a NULL input. \n \nThe optional AS clause permits casting the input string to a\nbinary or non-binary string, as well as to a particular\nlength.\n \nAS BINARY(N) measures the length in bytes rather than\ncharacters, and right pads with 0x00 bytes to the desired\nlength. \n \nAS CHAR(N) measures the length in characters, and right pads\nwith spaces to the desired length.\n \nN has a minimum value of 1, and if it is less than the\nlength of the input string, the string is truncated without\nwarning.\n \nThe optional LEVEL clause specifies that the return value\nshould contain weights for specific collation levels. The\nlevels specifier can either be a single integer, a\ncomma-separated list of integers, or a range of integers\nseparated by a dash (whitespace is ignored). Integers can\nrange from 1 to a maximum of 6, dependent on the collation,\nand need to be listed in ascending order.\n \nIf the LEVEL clause is no provided, a default of 1 to the\nmaximum for the collation is assumed.\n \nIf the LEVEL is specified without using a range, an optional\nmodifier is permitted.\n \nASC, the default, returns the weights without any\nmodification.\n \nDESC returns bitwise-inverted weights.\n \nREVERSE returns the weights in reverse order.\n \nExamples\n-------- \nThe examples below use the HEX() function to represent\nnon-printable results in hexadecimal format.\n \nSELECT HEX(WEIGHT_STRING(\'x\'));\n+-------------------------+\n| HEX(WEIGHT_STRING(\'x\')) |\n+-------------------------+\n| 0058 |\n+-------------------------+\n \nSELECT HEX(WEIGHT_STRING(\'x\' AS BINARY(4)));\n+--------------------------------------+\n| HEX(WEIGHT_STRING(\'x\' AS BINARY(4))) |\n+--------------------------------------+\n| 78000000 |\n+--------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(\'x\' AS CHAR(4)));\n+------------------------------------+\n| HEX(WEIGHT_STRING(\'x\' AS CHAR(4))) |\n+------------------------------------+\n| 0058002000200020 |\n+------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1));\n+--------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1)) |\n+--------------------------------------+\n| AA22EE |\n+--------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 DESC));\n+-------------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 DESC)) |\n+-------------------------------------------+\n| 55DD11 |\n+-------------------------------------------+\n \nSELECT HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 REVERSE));\n+----------------------------------------------+\n| HEX(WEIGHT_STRING(0xaa22ee LEVEL 1 REVERSE)) |\n+----------------------------------------------+\n| EE22AA |\n+----------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/weight_string/','','https://mariadb.com/kb/en/weight_string/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (645,39,'ALTER DATABASE','Modifies a database, changing its overall characteristics.\n \nSyntax\n------ \nALTER {DATABASE | SCHEMA} [db_name]\n alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n UPGRADE DATA DIRECTORY NAME\n \nalter_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n \nDescription\n----------- \nALTER DATABASE enables you to change the overall\ncharacteristics of a\ndatabase. These characteristics are stored in the db.opt\nfile in the\ndatabase directory. To use ALTER DATABASE, you need the\nALTER\nprivilege on the database. ALTER SCHEMA is a synonym for\nALTER\nDATABASE.\n \nThe CHARACTER SET clause changes the default database\ncharacter set.\nThe COLLATE clause changes the default database collation.\nSee Character Sets and Collations for more.\n \nYou can see what character sets and collations are available\nusing,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION\nstatements.\n \nChanging the default character set/collation of a database\ndoes not change the character set/collation of any stored\nprocedures or stored functions that were previously created,\nand relied on the defaults. These need to be dropped and\nrecreated in order to apply the character set/collation\nchanges.\n \nThe database name can be omitted from the first syntax, in\nwhich case\nthe statement applies to the default database.\n \nThe syntax that includes the UPGRADE DATA DIRECTORY NAME\nclause was\nadded in MySQL 5.1.23. It updates the name of the directory\nassociated\nwith the database to use the encoding implemented in MySQL\n5.1 for\nmapping database names to database directory names (see\nIdentifier to File Name Mapping). This\nclause is for use under these conditions:\nIt is intended when upgrading MySQL to 5.1 or later from\nolder versions.\nIt is intended to update a database directory name to the\ncurrent encoding format if the name contains special\ncharacters that need encoding.\nThe statement is used by mysqlcheck (as invoked by\nmysql_upgrade).\n \nFor example,if a database in MySQL 5.0 has a name of a-b-c,\nthe name\ncontains instance of the `-\' character. In 5.0, the\ndatabase directory\nis also named a-b-c, which is not necessarily safe for all\nfile\nsystems. In MySQL 5.1 and up, the same database name is\nencoded as\na@002db@002dc to produce a file system-neutral directory\nname.\n \nWhen a MySQL installation is upgraded to MySQL 5.1 or later\nfrom an\nolder version,the server displays a name such as a-b-c\n(which is in\nthe old format) as #mysql50#a-b-c, and you must refer to the\nname\nusing the #mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME\nin this\ncase to explicitly tell the server to re-encode the database\ndirectory\nname to the current encoding format:\n \nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n \nAfter executing this statement, you can refer to the\ndatabase as a-b-c\nwithout the special #mysql50# prefix.\n \nExamples\n-------- \nALTER DATABASE test CHARACTER SET = \'utf8\' COLLATE =\n\'utf8_bin\';\n \n\n\nURL: https://mariadb.com/kb/en/alter-database/','','https://mariadb.com/kb/en/alter-database/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (646,39,'ALTER EVENT','Modifies one or more characteristics of an existing event.\n \nSyntax\n------ \nALTER\n [DEFINER = { user | CURRENT_USER }]\n EVENT event_name\n [ON SCHEDULE schedule]\n [ON COMPLETION [NOT] PRESERVE]\n [RENAME TO new_event_name]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n [DO sql_statement]\n \nDescription\n----------- \nThe ALTER EVENT statement is used to change one or more of\nthe\ncharacteristics of an existing event without the need to\ndrop and recreate it.\nThe syntax for each of the DEFINER, ON SCHEDULE, ON\nCOMPLETION,\nCOMMENT, ENABLE / DISABLE, and DO clauses is exactly the\nsame as when used with CREATE EVENT.\n \nThis statement requires the EVENT privilege.\nWhen a user executes a successful ALTER EVENT statement,\nthat user becomes\nthe definer for the affected event.\n \n(In MySQL 5.1.11 and earlier, an event could be altered only\nby its definer, or\nby a user having the SUPER privilege.)\n \nALTER EVENT works only with an existing event:\n \nALTER EVENT no_such_event ON SCHEDULE EVERY \'2:3\'\nDAY_HOUR;\nERROR 1539 (HY000): Unknown event \'no_such_event\'\n \nExamples\n-------- \nALTER EVENT myevent \n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 2 HOUR \n DO \n UPDATE myschema.mytable SET mycol = mycol + 1;\n \n\n\nURL: https://mariadb.com/kb/en/alter-event/','','https://mariadb.com/kb/en/alter-event/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (647,39,'ALTER FUNCTION','Syntax\n------ \nALTER FUNCTION func_name [characteristic ...]\n \ncharacteristic:\n { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nDescription\n----------- \nThis statement can be used to change the characteristics of\na stored\nfunction. More than one change may be specified in an ALTER\nFUNCTION\nstatement. However, you cannot change the parameters or body\nof a\nstored function using this statement; to make such changes,\nyou must\ndrop and re-create the function using DROP FUNCTION and\nCREATE FUNCTION.\n \nYou must have the ALTER ROUTINE privilege for the function.\n(That\nprivilege is granted automatically to the function creator.)\nIf binary\nlogging is enabled, the ALTER FUNCTION statement might also\nrequire\nthe SUPER privilege, as described in Binary Logging of\nStored Routines.\n \nExample\n \nALTER FUNCTION hello SQL SECURITY INVOKER;\n \n\n\nURL: https://mariadb.com/kb/en/alter-function/','','https://mariadb.com/kb/en/alter-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (648,39,'ALTER LOGFILE GROUP','Syntax\n------ \nALTER LOGFILE GROUP logfile_group\n ADD UNDOFILE \'file_name\'\n [INITIAL_SIZE [=] size]\n [WAIT]\n ENGINE [=] engine_name\n \nThe ALTER LOGFILE GROUP statement is not supported by\nMariaDB. It was originally inherited from MySQL NDB Cluster.\nSee MDEV-19295 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/alter-logfile-group/','','https://mariadb.com/kb/en/alter-logfile-group/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (649,39,'ALTER PROCEDURE','Syntax\n------ \nALTER PROCEDURE proc_name [characteristic ...]\n \ncharacteristic:\n { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nDescription\n----------- \nThis statement can be used to change the characteristics of\na stored\nprocedure. More than one change may be specified in an ALTER\nPROCEDURE\nstatement. However, you cannot change the parameters or body\nof a\nstored procedure using this statement. To make such changes,\nyou must\ndrop and re-create the procedure using either CREATE OR\nREPLACE PROCEDURE (since MariaDB 10.1.3) or DROP PROCEDURE\nand CREATE PROCEDURE (MariaDB 10.1.2 and before).\n \nYou must have the ALTER ROUTINE privilege for the procedure.\nBy default, that privilege is granted automatically to the\nprocedure creator. See Stored Routine Privileges.\n \nExample\n \nALTER PROCEDURE simpleproc SQL SECURITY INVOKER;\n \n\n\nURL: https://mariadb.com/kb/en/alter-procedure/','','https://mariadb.com/kb/en/alter-procedure/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (650,39,'ALTER SEQUENCE','ALTER SEQUENCE was introduced in MariaDB 10.3.\n \nSyntax\n------ \nALTER SEQUENCE [IF EXISTS] sequence_name\n[ INCREMENT [ BY | = ] increment ]\n[ MINVALUE [=] minvalue | NO MINVALUE | NOMINVALUE ]\n[ MAXVALUE [=] maxvalue | NO MAXVALUE | NOMAXVALUE ]\n[ START [ WITH | = ] start ] [ CACHE [=] cache ] [ [ NO ]\nCYCLE ]\n[ RESTART [[WITH | =] restart]\n \nALTER SEQUENCE allows one to change any values for a\nSEQUENCE created with CREATE SEQUENCE.\n \nThe options for ALTER SEQUENCE can be given in any order.\n \nDescription\n----------- \nALTER SEQUENCE changes the parameters of an existing\nsequence generator. Any parameters not specifically set in\nthe ALTER SEQUENCE command retain their prior settings.\n \nALTER SEQUENCE requires the ALTER privilege.\n \nArguments to ALTER SEQUENCE\n \nThe following options may be used:\n \nOption | Default value | Description | \n \nINCREMENT | 1 | Increment to use for values. May be\nnegative. | \n \nMINVALUE | 1 if INCREMENT > 0 and -9223372036854775807 if\nINCREMENT < 0 | Minimum value for the sequence. | \n \nMAXVALUE | 9223372036854775806 if INCREMENT > 0 and -1 if\nINCREMENT < 0 | Max value for sequence. | \n \nSTART | MINVALUE if INCREMENT > 0 and MAX_VALUE if\nINCREMENT< 0 | First value that the sequence will generate.\n| \n \nCACHE | 1000 | Number of values that should be cached. 0 if\nno CACHE. The underlying table will be updated first time a\nnew sequence number is generated and each time the cache\nruns out. | \n \nCYCLE | 0 (= NO CYCLE) | 1 if the sequence should start\nagain from MINVALUE# after it has run out of values. | \n \nRESTART | START if restart value not is given |  If RESTART\noption is used, NEXT VALUE will return the restart value. | \n \nThe optional clause RESTART [ WITH restart ] sets the next\nvalue for the sequence. This is equivalent to calling the\nSETVAL() function with the is_used argument as 0. The\nspecified value will be returned by the next call of\nnextval. Using RESTART with no restart value is\nequivalent to supplying the start value that was recorded by\nCREATE SEQUENCE or last set by ALTER SEQUENCE START WITH.\n \nALTER SEQUENCE will not allow you to change the sequence so\nthat it\'s inconsistent. For example:\n \nCREATE SEQUENCE s1;\nALTER SEQUENCE s1 MINVALUE 10;\nERROR 4061 (HY000): Sequence \'test.t1\' values are\nconflicting\n \nALTER SEQUENCE s1 MINVALUE 10 RESTART 10;\nERROR 4061 (HY000): Sequence \'test.t1\' values are\nconflicting\n \nALTER SEQUENCE s1 MINVALUE 10 START 10 RESTART 10;\n \nINSERT\n \nTo allow SEQUENCE objects to be backed up by old tools, like\nmysqldump, one can use SELECT to read the current state of a\nSEQUENCE object and use an INSERT to update the SEQUENCE\nobject. INSERT is only allowed if all fields are specified:\n \nCREATE SEQUENCE s1;\nINSERT INTO s1 VALUES(1000,10,2000,1005,1,1000,0,0);\nSELECT * FROM s1;\n \n+------------+-----------+-----------+-------+-----------+-------+-------+-------+\n| next_value | min_value | max_value | start | increment |\ncache | cycle | round |\n+------------+-----------+-----------+-------+-----------+-------+-------+-------+\n| 1000 | 10 | 2000 | 1005 | 1 | 1000 | 0 | 0 |\n+------------+-----------+-----------+-------+-----------+-------+-------+-------+\n \nSHOW CREATE SEQUENCE s1;\n+-------+--------------------------------------------------------------------------------------------------------------+\n| Table | Create Table |\n+-------+--------------------------------------------------------------------------------------------------------------+\n| s1 | CREATE SEQUENCE `s1` start with 1005 minvalue 10\nmaxvalue 2000 increment by 1 cache 1000 nocycle ENGINE=Aria\n|\n+-------+--------------------------------------------------------------------------------------------------------------+\n \nNotes\n \nALTER SEQUENCE will instantly affect all future SEQUENCE\noperations. This is in contrast to some other databases\nwhere the changes requested by ALTER SEQUENCE will not be\nseen until the sequence cache has run out.\n \nALTER SEQUENCE will take a full table lock of the sequence\nobject during\nits (brief) operation. This ensures that ALTER SEQUENCE is\nreplicated\ncorrectly. If you only want to set the next sequence value\nto a\nhigher value than current, then you should use SETVAL()\ninstead, as this is not blocking.\n \nIf you want to change storage engine, sequence comment or\nrename the sequence, you can use ALTER TABLE for this.\n \n\n\nURL: https://mariadb.com/kb/en/alter-sequence/','','https://mariadb.com/kb/en/alter-sequence/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (651,39,'ALTER SERVER','Syntax\n------ \nALTER SERVER server_name\n OPTIONS (option [, option] ...)\n \nDescription\n----------- \nAlters the server information for server_name, adjusting the\nspecified\noptions as per the CREATE SERVER command. The corresponding\nfields in the mysql.servers table are updated accordingly.\nThis statement requires the SUPER privilege.\n \nExamples\n-------- \nALTER SERVER s OPTIONS (USER \'sally\');\n \n\n\nURL: https://mariadb.com/kb/en/alter-server/','','https://mariadb.com/kb/en/alter-server/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (652,39,'ALTER TABLE','Syntax\n------ \nALTER [ONLINE] [IGNORE] TABLE tbl_name\n [WAIT n | NOWAIT]\n alter_specification [, alter_specification] ...\n \nalter_specification:\n table_option ...\n | ADD [COLUMN] [IF NOT EXISTS] col_name column_definition\n [FIRST | AFTER col_name ]\n | ADD [COLUMN] [IF NOT EXISTS] (col_name\ncolumn_definition,...)\n | ADD {INDEX|KEY} [IF NOT EXISTS] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]] PRIMARY KEY\n [index_type] (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name,...) [index_option] ...\n | ADD FULLTEXT [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD SPATIAL [INDEX|KEY] [index_name]\n (index_col_name,...) [index_option] ...\n | ADD [CONSTRAINT [symbol]]\n FOREIGN KEY [IF NOT EXISTS] [index_name]\n(index_col_name,...)\n reference_definition\n | ADD PERIOD FOR SYSTEM_TIME (start_column_name,\nend_column_name)\n | ALTER [COLUMN] col_name SET DEFAULT literal\n| (expression)\n | ALTER [COLUMN] col_name DROP DEFAULT\n | CHANGE [COLUMN] [IF EXISTS] old_col_name new_col_name\ncolumn_definition\n [FIRST|AFTER col_name]\n | MODIFY [COLUMN] [IF EXISTS] col_name column_definition\n [FIRST | AFTER col_name]\n | DROP [COLUMN] [IF EXISTS] col_name [RESTRICT|CASCADE]\n | DROP PRIMARY KEY\n | DROP {INDEX|KEY} [IF EXISTS] index_name\n | DROP FOREIGN KEY [IF EXISTS] fk_symbol\n | DROP CONSTRAINT [IF EXISTS] constraint_name\n | DISABLE KEYS\n | ENABLE KEYS\n | RENAME [TO] new_tbl_name\n | ORDER BY col_name [, col_name] ...\n | CONVERT TO CHARACTER SET charset_name [COLLATE\ncollation_name]\n | [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n | DISCARD TABLESPACE\n | IMPORT TABLESPACE\n | ALGORITHM [=] {DEFAULT|INPLACE|COPY|NOCOPY|INSTANT}\n | LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}\n | FORCE\n | partition_options\n | ADD PARTITION (partition_definition)\n | DROP PARTITION partition_names\n | COALESCE PARTITION number\n | REORGANIZE PARTITION [partition_names INTO\n(partition_definitions)]\n | ANALYZE PARTITION partition_names\n | CHECK PARTITION partition_names\n | OPTIMIZE PARTITION partition_names\n | REBUILD PARTITION partition_names\n | REPAIR PARTITION partition_names\n | EXCHANGE PARTITION partition_name WITH TABLE tbl_name\n | REMOVE PARTITIONING\n | ADD SYSTEM VERSIONING\n | DROP SYSTEM VERSIONING\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n | CLUSTERING={YES| NO}\n \ntable_options:\n table_option [[,] table_option] ...\nIn MariaDB 10.0.2 and later, IF EXISTS and IF NOT EXISTS\nclauses have been added for the following:\n \nADD COLUMN [IF NOT EXISTS]\nADD INDEX [IF NOT EXISTS]\nADD FOREIGN KEY [IF NOT EXISTS]\nADD PARTITION [IF NOT EXISTS]\nCREATE INDEX [IF NOT EXISTS]\n \nDROP COLUMN [IF EXISTS]\nDROP INDEX [IF EXISTS]\nDROP FOREIGN KEY [IF EXISTS]\nDROP PARTITION [IF EXISTS]\nCHANGE COLUMN [IF EXISTS]\nMODIFY COLUMN [IF EXISTS]\nDROP INDEX [IF EXISTS]\nWhen IF EXISTS and IF NOT EXISTS are used in clauses,\nqueries will not\nreport errors when the condition is triggered for that\nclause. A warning with\nthe same message text will be issued and the ALTER will move\non to the next\nclause in the statement (or end if finished).\n \nThis was done in MDEV-318.\n \nDescription\n----------- \nALTER TABLE enables you to change the structure of an\nexisting table.\nFor example, you can add or delete columns, create or\ndestroy indexes,\nchange the type of existing columns, or rename columns or\nthe table\nitself. You can also change the comment for the table and\nthe storage engine of the\ntable.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nWhen adding a UNIQUE index on a column (or a set of columns)\nwhich have duplicated values, an error will be produced and\nthe statement will be stopped. To suppress the error and\nforce the creation of UNIQUE indexes, discarding duplicates,\nthe IGNORE option can be specified. This can be useful if a\ncolumn (or a set of columns) should be UNIQUE but it\ncontains duplicate values; however, this technique provides\nno control on which rows are preserved and which are\ndeleted. Also, note that IGNORE is accepted but ignored in\nALTER TABLE ... EXCHANGE PARTITION statements.\n \nThis statement can also be used to rename a table. For\ndetails see RENAME TABLE.\n \nWhen an index is created, the storage engine may use a\nconfigurable buffer in the process. Incrementing the buffer\nspeeds up the index creation. Aria and MyISAM allocate a\nbuffer whose size is defined by aria_sort_buffer_size or\nmyisam_sort_buffer_size, also used for REPAIR TABLE.\nInnoDB/XtraDB allocates three buffers whose size is defined\nby innodb_sort_buffer_size.\n \nPrivileges\n \nExecuting the ALTER TABLE statement generally requires at\nleast the ALTER privilege for the table or the database..\n \nIf you are renaming a table, then it also requires the DROP,\nCREATE and INSERT privileges for the table or the database\nas well.\n \nOnline DDL\n \nIn MariaDB 10.0 and later, online DDL is supported with the\nALGORITHM and LOCK clauses.\n \nSee InnoDB Online DDL Overview for more information on\nonline DDL with InnoDB.\n \nALTER ONLINE TABLE\n \nALTER ONLINE TABLE has also worked for partitioned tables\nsince MariaDB 10.0.11.\n \nOnline ALTER TABLE is available by executing the following:\n \nALTER ONLINE TABLE ...;\n \nThis statement has the following semantics:\n \nIn MariaDB 10.0.12 and later, this statement is equivalent\nto the following:\n \nALTER TABLE ... LOCK=NONE;\n \nSee the LOCK alter specification for more information.\n \nIn MariaDB 10.0.11, this statement is equivalent to the\nfollowing:\n \nALTER TABLE ... ALGORITHM=INPLACE;\n \nSee the ALGORITHM alter specification for more information.\n \nMariaDB until 10.0.10\n \nIn MariaDB 10.0.10 and before, this statement ensures that\nthe ALTER TABLE statement does not make a copy of the table.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nColumn Definitions\n \nSee CREATE TABLE: Column Definitions for information about\ncolumn definitions.\n \nIndex Definitions\n \nSee CREATE TABLE: Index Definitions for information about\nindex definitions.\n \nThe CREATE INDEX and DROP INDEX statements can also be used\nto add or remove an index.\n \nCharacter Sets and Collations\n \nCONVERT TO CHARACTER SET charset_name [COLLATE\ncollation_name]\n[DEFAULT] CHARACTER SET [=] charset_name\n[DEFAULT] COLLATE [=] collation_name\nSee Setting Character Sets and Collations for details on\nsetting the character sets and collations.\n \nAlter Specifications\n \nTable Options\n \nSee CREATE TABLE: Table Options for information about table\noptions.\n \nADD COLUMN\n \n... ADD COLUMN [IF NOT EXISTS] (col_name\ncolumn_definition,...)\nAdds a column to the table. The syntax is the same as in\nCREATE TABLE.\nIf you are using IF NOT_EXISTS the column will not be added\nif it was not there already. This is very useful when doing\nscripts to modify tables.\n \nThe FIRST and AFTER clauses affect the physical order of\ncolumns in the datafile. Use FIRST to add a column in the\nfirst (leftmost) position, or AFTER followed by a column\nname to add the new column in any other position. Note that,\nnowadays, the physical position of a column is usually\nirrelevant.\n \nSee also Instant ADD COLUMN for InnoDB.\n \nDROP COLUMN\n \n... DROP COLUMN [IF EXISTS] col_name [CASCADE|RESTRICT]\nDrops the column from the table.\nIf you are using IF EXISTS you will not get an error if the\ncolumn didn\'t exist.\nIf the column is part of any index, the column will be\ndropped from them, except if you add a new column with\nidentical name at the same time. The index will be dropped\nif all columns from the index were dropped.\nIf the column was used in a view or trigger, you will get an\nerror next time the view or trigger is accessed.\n \nDropping a column that is part of a multi-column UNIQUE\nconstraint is not permitted. For example:\n \nCREATE TABLE a (\n a int,\n b int,\n primary key (a,b)\n);\n \nALTER TABLE x DROP COLUMN a;\n[42000][1072] Key column \'A\' doesn\'t exist in table\n \nThe reason is that dropping column a would result in the new\nconstraint that all values in column b be unique. In order\nto drop the column, an explicit DROP PRIMARY KEY and ADD\nPRIMARY KEY would be required. Up until MariaDB 10.2.7, the\ncolumn was dropped and the additional constraint applied,\nresulting in the following structure:\n \nALTER TABLE x DROP COLUMN a;\nQuery OK, 0 rows affected (0.46 sec)\n \nDESC x;\n+-------+---------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-------+\n| b | int(11) | NO | PRI | NULL | |\n+-------+---------+------+-----+---------+-------+\n \nMariaDB 10.4.0 supports instant DROP COLUMN. DROP COLUMN of\nan indexed column would imply DROP INDEX (and in the case of\na non-UNIQUE multi-column index, possibly ADD INDEX). These\nwill not be allowed with ALGORITHM=INSTANT, but unlike\nbefore, they can be allowed with ALGORITHM=NOCOPY\n \nRESTRICT and CASCADE are allowed to make porting from other\ndatabase systems easier. In MariaDB, they do nothing.\n \nMODIFY COLUMN\n \nAllows you to modify the type of a column. The column will\nbe at the same place as the original column and all indexes\non the column will be kept. Note that when modifying column,\nyou should specify all attributes for the new column.\n \nCREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, PRIMARY\nKEY((a));\nALTER TABLE t1 MODIFY a BIGINT UNSIGNED AUTO_INCREMENT;\n \nCHANGE COLUMN\n \nWorks like MODIFY COLUMN except that you can also change the\nname of the column. The column will be at the same place as\nthe original column and all index on the column will be\nkept.\n \nCREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, PRIMARY\nKEY(a));\nALTER TABLE t1 CHANGE a b BIGINT UNSIGNED AUTO_INCREMENT;\n \nALTER COLUMN\n \nThis lets you change column options.\n \nCREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, b\nvarchar(50), PRIMARY KEY(a));\nALTER TABLE t1 ALTER b SET DEFAULT \'hello\';\n \nADD PRIMARY KEY\n \nAdd a primary key.\n \nFor PRIMARY KEY indexes, you can specify a name for the\nindex, but it is silently ignored, and the name of the index\nis always PRIMARY.\n \nSee Getting Started with Indexes: Primary Key for more\ninformation.\n \nDROP PRIMARY KEY\n \nDrop a primary key.\n \nFor PRIMARY KEY indexes, you can specify a name for the\nindex, but it is silently ignored, and the name of the index\nis always PRIMARY.\n \nSee Getting Started with Indexes: Primary Key for more\ninformation.\n \nADD FOREIGN KEY\n \nAdd a foreign key.\n \nFor FOREIGN KEY indexes, a reference definition must be\nprovided.\n \nFor FOREIGN KEY indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nFirst, you have to specify the name of the target (parent)\ntable and a column or a column list which must be indexed\nand whose values must match to the foreign key\'s values.\nThe MATCH clause is accepted to improve the compatibility\nwith other DBMS\'s, but has no meaning in MariaDB. The ON\nDELETE and ON UPDATE clauses specify what must be done when\na DELETE (or a REPLACE) statements attempts to delete a\nreferenced row from the parent table, and when an UPDATE\nstatement attempts to modify the referenced foreign key\ncolumns in a parent table row, respectively. The following\noptions are allowed:\nRESTRICT: The delete/update operation is not performed. The\nstatement terminates with a 1451 error (SQLSTATE \'2300\').\nNO ACTION: Synonym for RESTRICT.\nCASCADE: The delete/update operation is performed in both\ntables.\nSET NULL: The update or delete goes ahead in the parent\ntable, and the corresponding foreign key fields in the child\ntable are set to NULL. (They must not be defined as NOT NULL\nfor this to succeed).\n \nMariaDB until 5.3\nSET DEFAULT: This option is currently implemented only for\nthe PBXT storage engine, which is disabled by default and no\nlonger maintained. It sets the child table\'s foreign key\nfields to their DEFAULT values when the referenced parent\ntable key entries are updated or deleted.\n \nIf either clause is omitted, the default behavior for the\nomitted clause is RESTRICT.\n \nSee Foreign Keys for more information.\n \nDROP FOREIGN KEY\n \nDrop a foreign key.\n \nSee Foreign Keys for more information.\n \nADD INDEX\n \nAdd a plain index.\n \nPlain indexes are regular indexes that are not unique, and\nare not acting as a primary key or a foreign key. They are\nalso not the \"specialized\" FULLTEXT or SPATIAL indexes.\n \nSee Getting Started with Indexes: Plain Indexes for more\ninformation.\n \nDROP INDEX\n \nDrop a plain index.\n \nPlain indexes are regular indexes that are not unique, and\nare not acting as a primary key or a foreign key. They are\nalso not the \"specialized\" FULLTEXT or SPATIAL indexes.\n \nSee Getting Started with Indexes: Plain Indexes for more\ninformation.\n \nADD UNIQUE INDEX\n \nAdd a unique index.\n \nThe UNIQUE keyword means that the index will not accept\nduplicated values, except for NULLs. An error will raise if\nyou try to insert duplicate values in a UNIQUE index.\n \nFor UNIQUE indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nSee Getting Started with Indexes: Unique Index for more\ninformation.\n \nDROP UNIQUE INDEX\n \nDrop a unique index.\n \nThe UNIQUE keyword means that the index will not accept\nduplicated values, except for NULLs. An error will raise if\nyou try to insert duplicate values in a UNIQUE index.\n \nFor UNIQUE indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nSee Getting Started with Indexes: Unique Index for more\ninformation.\n \nADD FULLTEXT INDEX\n \nAdd a FULLTEXT index.\n \nSee Full-Text Indexes for more information.\n \nDROP FULLTEXT INDEX\n \nDrop a FULLTEXT index.\n \nSee Full-Text Indexes for more information.\n \nADD SPATIAL INDEX\n \nAdd a SPATIAL index.\n \nSee SPATIAL INDEX for more information.\n \nDROP SPATIAL INDEX\n \nDrop a SPATIAL index.\n \nSee SPATIAL INDEX for more information.\n \nENABLE/ DISABLE KEYS\n \nDISABLE KEYS will disable all non unique keys for the table\nfor storage engines that support this (at least MyISAM and\nAria). This can be used to speed up inserts into empty\ntables.\n \nENABLE KEYS will enable all disabled keys.\n \nRENAME TO\n \nRenames the table. See also RENAME TABLE.\n \nADD CONSTRAINT\n \nModifies the table adding a constraint on a particular\ncolumn or columns.\n \nMariaDB 10.2.1 introduced new ways to define a constraint.\n \nNote: Before MariaDB 10.2.1, constraint expressions were\naccepted in syntax, but ignored.\n \nALTER TABLE table_name \nADD CONSTRAINT [constraint_name] CHECK(expression);\nBefore a row is inserted or updated, all constraints are\nevaluated in the order they are defined. If any constraint\nfails, then the row will not be updated. One can use most\ndeterministic functions in a constraint, including UDF\'s.\n \nCREATE TABLE account_ledger (\n id INT PRIMARY KEY AUTO_INCREMENT,\n transaction_name VARCHAR(100),\n credit_account VARCHAR(100),\n credit_amount INT,\n debit_account VARCHAR(100),\n debit_amount INT);\n \nALTER TABLE account_ledger \nADD CONSTRAINT is_balanced \n CHECK((debit_amount + credit_amount) = 0);\n \nThe constraint_name is optional. If you don\'t provide one\nin the ALTER TABLE statement, MariaDB auto-generates a name\nfor you. This is done so that you can remove it later using\nDROP CONSTRAINT clause.\n \nYou can disable all constraint expression checks by setting\nthe variable check_constraint_checks to OFF. You may find\nthis useful when loading a table that violates some\nconstraints that you want to later find and fix in SQL.\n \nTo view constraints on a table, query\ninformation_schema.TABLE_CONSTRAINTS:\n \nSELECT CONSTRAINT_NAME, TABLE_NAME, CONSTRAINT_TYPE \nFROM information_schema.TABLE_CONSTRAINTS\nWHERE TABLE_NAME = \'account_ledger\';\n \n+-----------------+----------------+-----------------+\n| CONSTRAINT_NAME | TABLE_NAME | CONSTRAINT_TYPE |\n+-----------------+----------------+-----------------+\n| is_balanced | account_ledger | CHECK |\n+-----------------+----------------+-----------------+\n \nDROP CONSTRAINT\n \nDROP CONSTRAINT for UNIQUE and FOREIGN KEY constraints was\nintroduced in MariaDB 10.2.22 and MariaDB 10.3.13.\n \nDROP CONSTRAINT for CHECK constraints was introduced in\nMariaDB 10.2.1\n \nModifies the table, removing the given constraint.\n \nALTER TABLE table_name\nDROP CONSTRAINT constraint_name;\n \nWhen you add a constraint to a table, whether through a\nCREATE TABLE or ALTER TABLE...ADD CONSTRAINT statement, you\ncan either set a constraint_name yourself, or allow MariaDB\nto auto-generate one for you. To view constraints on a\ntable, query information_schema.TABLE_CONSTRAINTS. For\ninstance,\n \nCREATE TABLE t (\n a INT,\n b INT,\n c INT,\n CONSTRAINT CHECK(a > b),\n CONSTRAINT check_equals CHECK(a = c)); \n \nSELECT CONSTRAINT_NAME, TABLE_NAME, CONSTRAINT_TYPE \nFROM information_schema.TABLE_CONSTRAINTS\nWHERE TABLE_NAME = \'t\';\n \n+-----------------+----------------+-----------------+\n| CONSTRAINT_NAME | TABLE_NAME | CONSTRAINT_TYPE |\n+-----------------+----------------+-----------------+\n| check_equals | t | CHECK |\n| CONSTRAINT_1 | t | CHECK |\n+-----------------+----------------+-----------------+\n \nTo remove a constraint from the table, issue an ALTER\nTABLE...DROP CONSTRAINT statement. For example,\n \nALTER TABLE t DROP CONSTRAINT is_unique;\n \nADD SYSTEM VERSIONING\n \nSystem-versioned tables was added in MariaDB 10.3.4.\n \nAdd system versioning.\n \nDROP SYSTEM VERSIONING\n \nSystem-versioned tables was added in MariaDB 10.3.4.\n \nDrop system versioning.\n \nADD PERIOD FOR SYSTEM_TIME\n \nSystem-versioned tables was added in MariaDB 10.3.4.\n \nFORCE\n \nALTER TABLE ... FORCE can force MariaDB to re-build the\ntable.\n \nIn MariaDB 5.5 and before, this could only be done by\nsetting the ENGINE table option to its old value. For\nexample, for an InnoDB table, one could execute the\nfollowing:\n \nALTER TABLE tab_name ENGINE = InnoDB;\n \nIn MariaDB 10.0 and later, the FORCE option can be used\ninstead. For example, :\n \nALTER TABLE tab_name FORCE;\n \nWith InnoDB, the table rebuild will only reclaim unused\nspace (i.e. the space previously used for deleted rows) if\nthe innodb_file_per_table system variable is set to ON. If\nthe system variable is OFF, then the space will not be\nreclaimed, but it will be-re-used for new data that\'s later\nadded.\n \nEXCHANGE PARTITION\n \nALTER TABLE ... EXCHANGE PARTITION was introduced in MariaDB\n10.0.4\n \nThis is used to exchange the tablespace files between a\npartition and another table.\n \nSee copying InnoDB\'s transportable tablespaces for more\ninformation.\n \nDISCARD TABLESPACE\n \nThis is used to discard an InnoDB table\'s tablespace.\n \nSee copying I','','https://mariadb.com/kb/en/alter-table/');
+update help_topic set description = CONCAT(description, 'nnoDB\'s transportable tablespaces for more\ninformation.\n \nIMPORT TABLESPACE\n \nThis is used to import an InnoDB table\'s tablespace. The\ntablespace should have been copied from its original server\nafter executing FLUSH TABLES FOR EXPORT.\n \nSee copying InnoDB\'s transportable tablespaces for more\ninformation.\n \nALTER TABLE ... IMPORT only applies to InnoDB tables. Most\nother popular storage engines, such as Aria and MyISAM, will\nrecognize their data files as soon as they\'ve been placed\nin the proper directory under the datadir, and no special\nDDL is required to import them.\n \nALGORITHM\n \nIn MariaDB 5.5 and before, ALTER TABLE operations required\nmaking a temporary copy of the table, which can be slow for\nlarge tables.\n \nIn MariaDB 10.0 and later, the ALTER TABLE statement\nsupports the ALGORITHM clause. This clause is one of the\nclauses that is used to implement online DDL. ALTER TABLE\nsupports several different algorithms. An algorithm can be\nexplicitly chosen for an ALTER TABLE operation by setting\nthe ALGORITHM clause. The supported values are:\nALGORITHM=DEFAULT - This implies the default behavior for\nthe specific statement, such as if no ALGORITHM clause is\nspecified.\nALGORITHM=COPY\nALGORITHM=INPLACE\nALGORITHM=NOCOPY - This was added in MariaDB 10.3.7.\nALGORITHM=INSTANT - This was added in MariaDB 10.3.7.\n \nSee InnoDB Online DDL Overview: ALGORITHM for information on\nhow the ALGORITHM clause affects InnoDB.\n \nALGORITHM=DEFAULT\n \nThe default behavior, which occurs if ALGORITHM=DEFAULT is\nspecified, or if ALGORITHM is not specified at all, usually\nonly makes a copy if the operation doesn\'t support being\ndone in-place at all. In this case, the most efficient\navailable algorithm will usually be used.\n \nHowever, in MariaDB 10.3.6 and before, if the value of the\nold_alter_table system variable is set to ON, then the\ndefault behavior is to perform ALTER TABLE operations by\nmaking a copy of the table using the old algorithm.\n \nIn MariaDB 10.3.7 and later, the old_alter_table system\nvariable is deprecated. Instead, the alter_algorithm system\nvariable defines the default algorithm for ALTER TABLE\noperations.\n \nALGORITHM=COPY\n \nALGORITHM=COPY was introduced in MariaDB 10.0 as the name\nfor the original ALTER TABLE algorithm.\n \nWhen ALGORITHM=COPY is set, MariaDB essentially does the\nfollowing operations:\n \n-- Create a temporary table with the new definition\nCREATE TEMPORARY TABLE tmp_tab (\n...\n);\n \n-- Copy the data from the original table\nINSERT INTO tmp_tab\n SELECT * FROM original_tab;\n \n-- Drop the original table\nDROP TABLE original_tab;\n \n-- Rename the temporary table, so that it replaces the\noriginal one\nRENAME TABLE tmp_tab TO original_tab;\n \nThis algorithm is very inefficient, but it is generic, so it\nworks for all storage engines.\n \nIf ALGORITHM=COPY is specified, then the copy algorithm will\nbe used even if it is not necessary. This can result in a\nlengthy table copy. If multiple ALTER TABLE operations are\nrequired that each require the table to be rebuilt, then it\nis best to specify all operations in a single ALTER TABLE\nstatement, so that the table is only rebuilt once.\n \nALGORITHM=INPLACE\n \nALGORITHM=INPLACE was introduced in MariaDB 10.0.\n \nALGORITHM=COPY can be incredibly slow, because the whole\ntable has to be copied and rebuilt. ALGORITHM=INPLACE was\nintroduced as a way to avoid this by performing operations\nin-place and avoiding the table copy and rebuild, when\npossible.\n \nWhen ALGORITHM=INPLACE is set, the underlying storage engine\nuses optimizations to perform the operation while avoiding\nthe table copy and rebuild. However, INPLACE is a bit of a\nmisnomer, since some operations may still require the table\nto be rebuilt for some storage engines. Regardless, several\noperations can be performed without a full copy of the table\nfor some storage engines.\n \nA more accurate name would have been ALGORITHM=ENGINE, where\nENGINE refers to an \"engine-specific\" algorithm.\n \nIf an ALTER TABLE operation supports ALGORITHM=INPLACE, then\nit can be performed using optimizations by the underlying\nstorage engine, but it may rebuilt.\n \nSee InnoDB Online DDL Operations with ALGORITHM=INPLACE for\nmore.\n \nALGORITHM=NOCOPY\n \nALGORITHM=NOCOPY was introduced in MariaDB 10.3.7.\n \nALGORITHM=INPLACE can sometimes be surprisingly slow in\ninstances where it has to rebuild the clustered index,\nbecause when the clustered index has to be rebuilt, the\nwhole table has to be rebuilt. ALGORITHM=NOCOPY was\nintroduced as a way to avoid this. \n \nIf an ALTER TABLE operation supports ALGORITHM=NOCOPY, then\nit can be performed without rebuilding the clustered index.\n \nIf ALGORITHM=NOCOPY is specified for an ALTER TABLE\noperation that does not support ALGORITHM=NOCOPY, then an\nerror will be raised. In this case, raising an error is\npreferable, if the alternative is for the operation to\nrebuild the clustered index, and perform unexpectedly\nslowly.\n \nSee InnoDB Online DDL Operations with ALGORITHM=NOCOPY for\nmore.\n \nALGORITHM=INSTANT\n \nALGORITHM=INSTANT was introduced in MariaDB 10.3.7.\n \nALGORITHM=INPLACE can sometimes be surprisingly slow in\ninstances where it has to modify data files.\nALGORITHM=INSTANT was introduced as a way to avoid this.\n \nIf an ALTER TABLE operation supports ALGORITHM=INSTANT, then\nit can be performed without modifying any data files.\n \nIf ALGORITHM=INSTANT is specified for an ALTER TABLE\noperation that does not support ALGORITHM=INSTANT, then an\nerror will be raised. In this case, raising an error is\npreferable, if the alternative is for the operation to\nmodify data files, and perform unexpectedly slowly.\n \nSee InnoDB Online DDL Operations with ALGORITHM=INSTANT for\nmore.\n \nLOCK\n \nIn MariaDB 10.0 and later, the ALTER TABLE statement\nsupports the LOCK clause. This clause is one of the clauses\nthat is used to implement online DDL. ALTER TABLE supports\nseveral different locking strategies. A locking strategy can\nbe explicitly chosen for an ALTER TABLE operation by setting\nthe LOCK clause. The supported values are:\nDEFAULT: Acquire the least restrictive lock on the table\nthat is supported for the specific operation. Permit the\nmaximum amount of concurrency that is supported for the\nspecific operation.\nNONE: Acquire no lock on the table. Permit all concurrent\nDML. If this locking strategy is not permitted for an\noperation, then an error is raised.\nSHARED: Acquire a read lock on the table. Permit read-only\nconcurrent DML. If this locking strategy is not permitted\nfor an operation, then an error is raised.\nEXCLUSIVE: Acquire a write lock on the table. Do not permit\nconcurrent DML.\n \nDifferent storage engines support different locking\nstrategies for different operations. If a specific locking\nstrategy is chosen for an ALTER TABLE operation, and that\ntable\'s storage engine does not support that locking\nstrategy for that specific operation, then an error will be\nraised.\n \nIf the LOCK clause is not explicitly set, then the operation\nuses LOCK=DEFAULT.\n \nALTER ONLINE TABLE is equivalent to LOCK=NONE. Therefore,\nthe ALTER ONLINE TABLE statement can be used to ensure that\nyour ALTER TABLE operation allows all concurrent DML.\n \nSee InnoDB Online DDL Overview: LOCK for information on how\nthe LOCK clause affects InnoDB.\n \nProgress Reporting\n \nMariaDB provides progress reporting for ALTER TABLE\nstatement for clients\nthat support the new progress reporting protocol. For\nexample, if you were using the mysql client, then the\nprogress report might look like this::\n \nALTER TABLE test ENGINE=Aria;\nStage: 1 of 2 \'copy to tmp table\' 46% of stage\n \nThe progress report is also shown in the output of the SHOW\nPROCESSLIST statement and in the contents of the\ninformation_schema.PROCESSLIST table.\n \nSee Progress Reporting for more information.\n \nAborting ALTER TABLE Operations\n \nIf an ALTER TABLE operation is being performed and the\nconnection is killed, the changes will be rolled back in a\ncontrolled manner. The rollback can be a slow operation as\nthe time it takes is relative to how far the operation has\nprogressed.\n \nAborting ALTER TABLE ... ALGORITHM=COPY was made faster by\nremoving excessive undo logging (MDEV-11415). This\nsignificantly shortens the time it takes to abort a running\nALTER TABLE operation.\n \nExamples\n-------- \nAdding a new column:\n \nALTER TABLE t1 ADD x INT;\n \nDropping a column:\n \nALTER TABLE t1 DROP x;\n \nModifying the type of a column:\n \nALTER TABLE t1 MODIFY x bigint unsigned;\n \nChanging the name and type of a column:\n \nALTER TABLE t1 CHANGE a b bigint unsigned auto_increment;\n \nCombining multiple clauses in a single ALTER TABLE\nstatement, separated by commas:\n \nALTER TABLE t1 DROP x, ADD x2 INT, CHANGE y y2 INT;\n \nChanging the storage engine:\n \nALTER TABLE t1 ENGINE = InnoDB;\n \nRebuilding the table (the previous example will also rebuild\nthe table if it was already InnoDB):\n \nALTER TABLE t1 FORCE;\n \n\n\nURL: https://mariadb.com/kb/en/alter-table/') WHERE help_topic_id = 652;
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (653,39,'ALTER TABLESPACE','The ALTER TABLESPACE statement is not supported by MariaDB.\nIt was originally inherited from MySQL NDB Cluster. In MySQL\n5.7 and later, the statement is also supported for InnoDB.\nHowever, MariaDB has chosen not to include that specific\nfeature. See MDEV-19294 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/alter-tablespace/','','https://mariadb.com/kb/en/alter-tablespace/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (654,39,'ALTER VIEW','Syntax\n------ \nALTER\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n \nDescription\n----------- \nThis statement changes the definition of a view, which must\nexist. The\nsyntax is similar to that for CREATE VIEW and the effect is\nthe same\nas for CREATE OR REPLACE VIEW if the view exists. This\nstatement\nrequires the CREATE VIEW and DROP privileges for the view,\nand some\nprivilege for each column referred to in the SELECT\nstatement. As of\nMariaDB 5.1.23, ALTER VIEW is allowed only to the definer or\nusers with\nthe SUPER privilege.\n \nExample\n \nALTER VIEW v AS SELECT a, a*3 AS a2 FROM t;\n \n\n\nURL: https://mariadb.com/kb/en/alter-view/','','https://mariadb.com/kb/en/alter-view/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (655,39,'CONSTRAINT','MariaDB supports the implementation of constraints at the\ntable-level using either CREATE TABLE or ALTER TABLE\nstatements. A table constraint restricts the data you can\nadd to the table. If you attempt to insert invalid data on a\ncolumn, MariaDB throws an error. \n \nSyntax\n------ \n[CONSTRAINT [symbol]] constraint_expression\n \nconstraint_expression:\n | PRIMARY KEY [index_type] (index_col_name, ...)\n[index_option] ...\n | FOREIGN KEY [index_name] (index_col_name, ...) \n REFERENCES tbl_name (index_col_name, ...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n | UNIQUE [INDEX|KEY] [index_name]\n [index_type] (index_col_name, ...) [index_option] ...\n | CHECK (check_constraints)\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_option:\n | KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n | CLUSTERING={YES|NO}\n \nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT\n \nDescription\n----------- \nConstraints provide restrictions on the data you can add to\na table. This allows you to enforce data integrity from\nMariaDB, rather than through application logic. When a\nstatement violates a constraint, MariaDB throws an error.\n \nThere are four types of table constraints:\n \nConstraint | Description | \n \nPRIMARY KEY | Sets the column for referencing rows. Values\nmust be unique and not null. | \n \nFOREIGN KEY | Sets the column to reference the primary key\non another table. | \n \nUNIQUE | Requires values in column or columns only occur\nonce in the table. | \n \nCHECK | Checks whether the data meets the given condition. |\n\n \nFOREIGN KEY Constraints\n \nInnoDB supports foreign key constraints. The syntax for a\nforeign key\nconstraint definition in InnoDB looks like this:\n \n[CONSTRAINT [symbol]] FOREIGN KEY\n [index_name] (index_col_name, ...)\n REFERENCES tbl_name (index_col_name,...)\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n \nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\n \nCHECK Constraints\n \nFrom MariaDB 10.2.1, constraints are enforced. Before\nMariaDB 10.2.1 constraint expressions were accepted in the\nsyntax but ignored.\n \nIn MariaDB 10.2.1 you can define constraints in 2 different\nways:\nCHECK(expression) given as part of a column definition.\nCONSTRAINT [constraint_name] CHECK (expression)\n \nBefore a row is inserted or updated, all constraints are\nevaluated in the order they are defined. If any constraint\nexpression returns false, then the row will not be inserted\nor updated.\nOne can use most deterministic functions in a constraint,\nincluding UDFs.\n \nCREATE TABLE t1 (a INT CHECK (a>2), b INT CHECK (b>2),\nCONSTRAINT a_greater CHECK (a>b));\n \nIf you use the second format and you don\'t give a name to\nthe constraint, then the constraint will get an\nautomatically generated name. This is done so that you can\nlater delete the constraint with ALTER TABLE DROP\nconstraint_name.\n \nOne can disable all constraint expression checks by setting\nthe check_constraint_checks variable to OFF. This is useful\nfor example when loading a table that violates some\nconstraints that you want to later find and fix in SQL.\n \nReplication\n \nIn row-based replication, only the master checks\nconstraints, and failed statements will not be replicated.\nIn statement-based replication, the slaves will also check\nconstraints. Constraints should therefore be identical, as\nwell as deterministic, in a replication environment.\n \nAuto_increment\n \nFrom MariaDB 10.2.6, auto_increment columns are no longer\npermitted in check constraints. Previously they were\npermitted, but would not work correctly. See MDEV-11117.\n \nExamples\n-------- \nCREATE TABLE product (category INT NOT NULL, id INT NOT\nNULL,\n price DECIMAL,\n PRIMARY KEY(category, id)) ENGINE=INNODB;\n \nCREATE TABLE customer (id INT NOT NULL,\n PRIMARY KEY (id)) ENGINE=INNODB;\n \nCREATE TABLE product_order (no INT NOT NULL AUTO_INCREMENT,\n product_category INT NOT NULL,\n product_id INT NOT NULL,\n customer_id INT NOT NULL,\n PRIMARY KEY(no),\n INDEX (product_category, product_id),\n FOREIGN KEY (product_category, product_id)\n REFERENCES product(category, id)\n ON UPDATE CASCADE ON DELETE RESTRICT,\n INDEX (customer_id),\n FOREIGN KEY (customer_id)\n REFERENCES customer(id)) ENGINE=INNODB;\n \nThe following examples will work from MariaDB 10.2.1\nonwards.\n \nNumeric constraints and comparisons:\n \nCREATE TABLE t1 (a INT CHECK (a>2), b INT CHECK (b>2),\nCONSTRAINT a_greater CHECK (a>b));\n \nINSERT INTO t1(a) VALUES (1);\nERROR 4022 (23000): CONSTRAINT `a` failed for `test`.`t1`\n \nINSERT INTO t1(a,b) VALUES (3,4);\nERROR 4022 (23000): CONSTRAINT `a_greater` failed for\n`test`.`t1`\n \nINSERT INTO t1(a,b) VALUES (4,3);\nQuery OK, 1 row affected (0.04 sec)\n \nDropping a constraint:\n \nALTER TABLE t1 DROP CONSTRAINT a_greater;\n \nAdding a constraint:\n \nALTER TABLE t1 ADD CONSTRAINT a_greater CHECK (a>b);\n \nDate comparisons and character length:\n \nCREATE TABLE t2 (name VARCHAR(30) CHECK\n(CHAR_LENGTH(name)>2), start_date DATE, \n end_date DATE CHECK (start_date IS NULL OR end_date IS NULL\nOR start_date2)), start_date DATE, \n end_date DATE CHECK (start_date IS NULL OR end_date IS NULL\nOR start_date2 is very different to CHAR_LENGTH(name>2) as\nthe latter mistakenly performs a numeric comparison on the\nname field, leading to unexpected results.\n \n\n\nURL: https://mariadb.com/kb/en/constraint/','','https://mariadb.com/kb/en/constraint/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (656,39,'CREATE DATABASE','Syntax\n------ \nCREATE [OR REPLACE] {DATABASE | SCHEMA} [IF NOT EXISTS]\ndb_name\n [create_specification] ...\n \ncreate_specification:\n [DEFAULT] CHARACTER SET [=] charset_name\n | [DEFAULT] COLLATE [=] collation_name\n \nDescription\n----------- \nCREATE DATABASE creates a database with the given name. To\nuse this statement, you need the CREATE privilege for the\ndatabase. CREATE SCHEMA is a synonym for CREATE DATABASE.\n \nFor valid identifiers to use as database names, see\nIdentifier Names.\n \nOR REPLACE\n \nThe OR REPLACE clause was added in MariaDB 10.1.3\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP DATABASE IF EXISTS db_name;\n \nCREATE DATABASE db_name ...;\n \nIF NOT EXISTS\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified database\nalready exists.\n \nExamples\n-------- \nCREATE DATABASE db1;\n \nQuery OK, 1 row affected (0.18 sec)\n \nCREATE DATABASE db1;\n \nERROR 1007 (HY000): Can\'t create database \'db1\'; database\nexists\n \nCREATE OR REPLACE DATABASE db1;\nQuery OK, 2 rows affected (0.00 sec)\n \nCREATE DATABASE IF NOT EXISTS db1;\nQuery OK, 1 row affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n+-------+------+----------------------------------------------+\n| Level | Code | Message |\n+-------+------+----------------------------------------------+\n| Note | 1007 | Can\'t create database \'db1\';\n database exists |\n+-------+------+----------------------------------------------+\n \nSetting the character sets and collation. See Setting\nCharacter Sets and Collations for more details.\n \nCREATE DATABASE czech_slovak_names \n CHARACTER SET = \'keybcs2\'\n COLLATE = \'keybcs2_bin\';\n \n\n\nURL: https://mariadb.com/kb/en/create-database/','','https://mariadb.com/kb/en/create-database/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (657,39,'CREATE EVENT','Syntax\n------ \nCREATE [OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n EVENT \n [IF NOT EXISTS]\n event_name \n ON SCHEDULE schedule\n [ON COMPLETION [NOT] PRESERVE]\n [ENABLE | DISABLE | DISABLE ON SLAVE]\n [COMMENT \'comment\']\n DO sql_statement;\n \nschedule:\n AT timestamp [+ INTERVAL interval] ...\n | EVERY interval \n [STARTS timestamp [+ INTERVAL interval] ...] \n [ENDS timestamp [+ INTERVAL interval] ...]\n \ninterval:\n quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n \nDescription\n----------- \nThis statement creates and schedules a new event. It\nrequires the\nEVENT privilege for the schema in which the event is to be\ncreated.\n \nThe minimum requirements for a valid CREATE EVENT statement\nare as\nfollows:\nThe keywords CREATE EVENT plus an event name, which uniquely\nidentifies\n the event in the current schema. (Prior to MySQL 5.1.12,\nthe event name\n needed to be unique only among events created by the same\nuser on a given\n database.)\nAn ON SCHEDULE clause, which determines when and how often\nthe event\n executes.\nA DO clause, which contains the SQL statement to be executed\nby an\n event.\n \nHere is an example of a minimal CREATE EVENT statement:\n \nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nThe previous statement creates an event named myevent. This\nevent executes once\n— one hour following its creation\n— by running an SQL statement that increments the\nvalue of the myschema.mytable table\'s mycol column by 1.\n \nThe event_name must be a valid MariaDB identifier with a\nmaximum length\nof 64 characters. It may be delimited using back ticks, and\nmay be\nqualified with the name of a database schema. An event is\nassociated\nwith both a MariaDB user (the definer) and a schema, and its\nname must\nbe unique among names of events within that schema. In\ngeneral, the\nrules governing event names are the same as those for names\nof stored\nroutines. See Identifier Names.\n \nIf no schema is indicated as part of event_name, the default\n(current)\nschema is assumed.\n \nFor valid identifiers to use as event names, see Identifier\nNames.\n \nOR REPLACE\n \nThe OR REPLACE clause was included in MariaDB 10.1.4. If\nused and the event already exists, instead of an error being\nreturned, the existing event will be dropped and replaced by\nthe newly defined event.\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the event already exists.\nCannot be used together with OR REPLACE.\n \nON SCHEDULE\n \nThe ON SCHEDULE clause can be used to specify when the event\nmust be triggered.\n \nAT\n \nIf you want to execute the event only once (one time event),\nyou can use the AT keyword, followed by a timestamp. If you\nuse CURRENT_TIMESTAMP, the event acts as soon as it is\ncreated. As a convenience, you can add one or more intervals\nto that timestamp. You can also specify a timestamp in the\npast, so that the event is stored but not triggered, until\nyou modify it via ALTER EVENT.\n \nThe following example shows how to create an event that will\nbe triggered tomorrow at a certain time:\n \nCREATE EVENT example\nON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY + INTERVAL\n3 HOUR\nDO something;\n \nYou can also specify that an event must be triggered at a\nregular interval (recurring event). In such cases, use the\nEVERY clause followed by the interval.\n \nIf an event is recurring, you can specify when the first\nexecution must happen via the STARTS clause and a maximum\ntime for the last execution via the ENDS clause. STARTS and\nENDS clauses are followed by a timestamp and, optionally,\none or more intervals. The ENDS clause can specify a\ntimestamp in the past, so that the event is stored but not\nexecuted until you modify it via ALTER EVENT.\n \nIn the following example, next month a recurring event will\nbe triggered hourly for a week:\n \nCREATE EVENT example\nON SCHEDULE EVERY 1 HOUR\nSTARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH\nENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK\nDO some_task;\n \nIntervals consist of a quantity and a time unit. The time\nunits are the same used for other staments and time\nfunctions, except that you can\'t use microseconds for\nevents. For simple time units, like HOUR or MINUTE, the\nquantity is an integer number, for example \'10 MINUTE\'.\nFor composite time units, like HOUR_MINUTE or HOUR_SECOND,\nthe quantity must be a string with all involved simple\nvalues and their separators, for example \'2:30\' or\n\'2:30:30\'.\n \nON COMPLETION [NOT] PRESERVE\n \nThe ON COMPLETION clause can be used to specify if the event\nmust be deleted after its last execution (that is, after its\nAT or ENDS timestamp is past). By default, events are\ndropped when they are expired. To explicitly state that this\nis the desired behaviour, you can use ON COMPLETION NOT\nPRESERVE. Instead, if you want the event to be preserved,\nyou can use ON COMPLETION PRESERVE.\n \nIn you specify ON COMPLETION NOT PRESERVE, and you specify a\ntimestamp in the past for AT or ENDS clause, the event will\nbe immediatly dropped. In such cases, you will get a Note\n1558: \"Event execution time is in the past and ON\nCOMPLETION NOT PRESERVE is set. The event was dropped\nimmediately after creation\".\n \nENABLE/DISABLE/DISABLE ON SLAVE\n \nEvents are ENABLEd by default. If you want to stop MariaDB\nfrom executing\nan event, you may specify DISABLE. When it is ready to be\nactivated, you\nmay enable it using ALTER EVENT. Another option is\nDISABLE ON SLAVE, which indicates that an event was created\non a master and has been replicated to the slave, which is\nprevented from executing the event. If DISABLE ON SLAVE is\nspecifically set, the event will not be executed.\n \nCOMMENT\n \nThe COMMENT clause may be used to set a comment for the\nevent. Maximum\nlength for comments is 64 characters. The comment is a\nstring, so it must be\nquoted. To see events comments, you can query the\nINFORMATION_SCHEMA.EVENTS table (the column is named\nEVENT_COMMENT).\n \nExamples\n-------- \nMinimal CREATE EVENT statement:\n \nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nAn event that will be triggered tomorrow at a certain time:\n \nCREATE EVENT example\nON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY + INTERVAL\n3 HOUR\nDO something;\n \nNext month a recurring event will be triggered hourly for a\nweek:\n \nCREATE EVENT example\nON SCHEDULE EVERY 1 HOUR\nSTARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH\nENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK\nDO some_task;\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nERROR 1537 (HY000): Event \'myevent\' already exists\n \nCREATE OR REPLACE EVENT myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;;\nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE EVENT IF NOT EXISTS myevent\n ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n DO\n UPDATE myschema.mytable SET mycol = mycol + 1;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \n SHOW WARNINGS;\n \n+-------+------+--------------------------------+\n| Level | Code | Message |\n+-------+------+--------------------------------+\n| Note | 1537 | Event \'myevent\' already exists |\n+-------+------+--------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-event/','','https://mariadb.com/kb/en/create-event/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (658,39,'CREATE FUNCTION','Syntax\n------ \nCREATE [OR REPLACE]\n [DEFINER = {user | CURRENT_USER | role | CURRENT_ROLE }]\n [AGGREGATE] FUNCTION [IF NOT EXISTS] func_name\n([func_parameter[,...]])\n RETURNS type\n [characteristic ...]\n RETURN func_body\n \nfunc_parameter:\n param_name type\n \ntype:\n Any valid MariaDB data type\n \ncharacteristic:\n LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nfunc_body:\n Valid SQL procedure statement\n \nDescription\n----------- \nUse the CREATE FUNCTION statement to create a new stored\nfunction. You must have\nthe CREATE ROUTINE database privilege to use CREATE\nFUNCTION.\nA function takes any number of arguments and returns a value\nfrom the function body. The\nfunction body can be any valid SQL expression as you would\nuse, for example, in any select\nexpression. If you have the appropriate privileges, you can\ncall the function exactly as you\nwould any built-in function. See Security below for details\non privileges.\n \nYou can also use a variant of the CREATE FUNCTION statement\nto install a user-defined\nfunction (UDF) defined by a plugin. See CREATE FUNCTION\n(UDF)\nfor details.\n \nYou can use a SELECT statement for the function body by\nenclosing it in\nparentheses, exactly as you would to use a subselect for any\nother expression. The SELECT\nstatement must return a single value. If more than one\ncolumn is returned when the function is called,\nerror 1241 results. If more than one row is returned when\nthe function is called, error 1242\nresults. Use a LIMIT clause to ensure only one row is\nreturned.\n \nYou can also replace the RETURN clause with a BEGIN...END\ncompound\nstatement. The compound statement must contain a RETURN\nstatement. When the function is\ncalled, the RETURN statement immediately returns its result,\nand any statements after RETURN\nare effectively ignored.\n \nBy default, a function is associated with the default\ndatabase. To associate the function explicitly\nwith a given database, specify the fully-qualified name as\ndb_name.func_name\nwhen you create it. If the function name is the same as the\nname of a built-in function, you must\nuse the fully qualified name when you call it.\n \nThe parameter list enclosed within parentheses must always\nbe present.\nIf there are no parameters, an empty parameter list of ()\nshould be\nused. Parameter names are not case sensitive.\n \nEach parameter can be declared to use any valid data type,\nexcept that\nthe COLLATE attribute cannot be used.\n \nFor valid identifiers to use as function names, see\nIdentifier Names.\n \nAGGREGATE\n \nFrom MariaDB 10.3.3, it is possible to create stored\naggregate functions as well. See Stored Aggregate Functions\nfor details.\n \nRETURNS\n \nThe RETURNS clause specifies the return type of the\nfunction. NULL values are permitted with all return types.\n \nWhat happens if the RETURN clause returns a value of a\ndifferent type? It depends on the SQL_MODE in effect at the\nmoment of the function creation.\n \nIf the SQL_MODE is strict (STRICT_ALL_TABLES or\nSTRICT_TRANS_TABLES flags are specified), a 1366 error will\nbe produced.\n \nOtherwise, the value is coerced to the proper type. For\nexample, if a function\nspecifies an ENUM or SET value in the RETURNS clause, but\nthe RETURN\nclause returns an integer, the value returned from the\nfunction is the string for the corresponding ENUM\nmember of set of SET members.\n \nMariaDB stores the SQL_MODE system variable setting that is\nin effect at the\ntime a routine is created, and always executes the routine\nwith this setting in\nforce, regardless of the server SQL mode in effect when the\nroutine is invoked.\n \nLANGUAGE SQL\n \nLANGUAGE SQL is a standard SQL clause, and it can be used in\nMariaDB for portability. However that clause has no meaning,\nbecause SQL is the only supported language for stored\nfunctions.\n \nA function is deterministic if it can produce only one\nresult for a given list of parameters. If the result may be\naffected by stored data, server variables, random numbers or\nany value that is not explicitly passed, then the function\nis not deterministic. Also, a function is non-deterministic\nif it uses non-deterministic functions like NOW() or\nCURRENT_TIMESTAMP(). The optimizer may choose a faster\nexecution plan if it known that the function is\ndeterministic. In such cases, you should declare the routine\nusing the DETERMINISTIC keyword. If you want to explicitly\nstate that the function is not deterministic (which is the\ndefault) you can use the NOT DETERMINISTIC keywords.\n \nIf you declare a non-deterministic function as\nDETERMINISTIC, you may get incorrect results. If you declare\na deterministic function as NOT DETERMINISTIC, in some cases\nthe queries will be slower.\n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP FUNCTION IF EXISTS function_name;\n \nCREATE FUNCTION function_name ...;\n \nwith the exception that any existing privileges for the\nfunction are not dropped.\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the function already exists.\nCannot be used together with OR REPLACE.\n \n[NOT] DETERMINISTIC\n \nThe [NOT] DETERMINISTIC clause also affects binary logging,\nbecause the STATEMENT format can not be used to store or\nreplicate non-deterministic statements.\n \nCONTAINS SQL, NO SQL, READS SQL DATA, and MODIFIES SQL DATA\nare informative clauses that tell the server what the\nfunction does. MariaDB does not check in any way whether the\nspecified clause is correct. If none of these clauses are\nspecified, CONTAINS SQL is used by default.\n \nMODIFIES SQL DATA\n \nMODIFIES SQL DATA means that the function contains\nstatements that may modify data stored in databases. This\nhappens if the function contains statements like DELETE,\nUPDATE, INSERT, REPLACE or DDL.\n \nREADS SQL DATA\n \nREADS SQL DATA means that the function reads data stored in\ndatabases, but does not modify any data. This happens if\nSELECT statements are used, but there no write operations\nare executed.\n \nCONTAINS SQL\n \nCONTAINS SQL means that the function contains at least one\nSQL statement, but it does not read or write any data stored\nin a database. Examples include SET or DO.\n \nNO SQL\n \nNO SQL means nothing, because MariaDB does not currently\nsupport any language other than SQL.\n \nOracle Mode\n \nFrom MariaDB 10.3, a subset of Oracle\'s PL/SQL language has\nbeen supported in addition to the traditional SQL/PSM-based\nMariaDB syntax. See Oracle mode from MariaDB 10.3 for\ndetails on changes when running Oracle mode.\n \nSecurity\n \nYou must have the EXECUTE privilege on a function to call\nit.\nMariaDB automatically grants the EXECUTE and ALTER ROUTINE\nprivileges to the\naccount that called CREATE FUNCTION, even if the DEFINER\nclause was used.\n \nEach function has an account associated as the definer. By\ndefault, the definer is the account\nthat created the function. Use the DEFINER clause to specify\na different account as the\ndefiner. You must have the SUPER privilege to use the\nDEFINER\nclause. See Account Names for details on specifying\naccounts.\n \nThe SQL SECURITY clause specifies what privileges are used\nwhen a function is called.\nIf SQL SECURITY is INVOKER, the function body will be\nevaluated using the privileges\nof the user calling the function. If SQL SECURITY is\nDEFINER, the function body is\nalways evaluated using the privileges of the definer\naccount. DEFINER is the default.\n \nThis allows you to create functions that grant limited\naccess to certain data. For example, say\nyou have a table that stores some employee information, and\nthat you\'ve granted SELECT\nprivileges only on certain columns to the user account\nroger.\n \nCREATE TABLE employees (name TINYTEXT, dept TINYTEXT, salary\nINT);\nGRANT SELECT (name, dept) ON employees TO roger;\n \nTo allow the user the get the maximum salary for a\ndepartment, define a function and grant\nthe EXECUTE privilege:\n \nCREATE FUNCTION max_salary (dept TINYTEXT) RETURNS INT\nRETURN\n (SELECT MAX(salary) FROM employees WHERE employees.dept =\ndept);\nGRANT EXECUTE ON FUNCTION max_salary TO roger;\n \nSince SQL SECURITY defaults to DEFINER, whenever the user\nroger calls\nthis function, the subselect will execute with your\nprivileges. As long as you have privileges to\nselect the salary of each employee, the caller of the\nfunction will be able to get the maximum\nsalary for each department without being able to see\nindividual salaries.\n \nCharacter sets and collations\n \nFunction return types can be declared to use any valid\ncharacter set and collation. If used, the COLLATE attribute\nneeds to be preceded by a CHARACTER SET attribute.\n \nIf the character set and collation are not specifically set\nin the statement, the database defaults at the time of\ncreation will be used. If the database defaults change at a\nlater stage, the stored function character set/collation\nwill not be changed at the same time; the stored function\nneeds to be dropped and recreated to ensure the same\ncharacter set/collation as the database is used.\n \nExamples\n-------- \nThe following example function takes a parameter, performs\nan operation using\nan SQL function, and returns the result.\n \nCREATE FUNCTION hello (s CHAR(20))\n RETURNS CHAR(50) DETERMINISTIC\n RETURN CONCAT(\'Hello, \',s,\'!\');\n \nSELECT hello(\'world\');\n+----------------+\n| hello(\'world\') |\n+----------------+\n| Hello, world! |\n+----------------+\n \nYou can use a compound statement in a function to manipulate\ndata with statements\nlike INSERT and UPDATE. The following example creates a\ncounter function\nthat uses a temporary table to store the current value.\nBecause the compound statement\ncontains statements terminated with semicolons, you have to\nfirst change the statement\ndelimiter with the DELIMITER statement to allow the\nsemicolon to be used in the\nfunction body. See Delimiters in the mysql client for more.\n \nCREATE TEMPORARY TABLE counter (c INT);\nINSERT INTO counter VALUES (0);\nDELIMITER //\nCREATE FUNCTION counter () RETURNS INT\n BEGIN\n UPDATE counter SET c = c + 1;\n \n RETURN (SELECT c FROM counter LIMIT 1);\n END //\nDELIMITER ;\n \nCharacter set and collation:\n \nCREATE FUNCTION hello2 (s CHAR(20))\n RETURNS CHAR(50) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\' DETERMINISTIC\n RETURN CONCAT(\'Hello, \',s,\'!\');\n \n\n\nURL: https://mariadb.com/kb/en/create-function/','','https://mariadb.com/kb/en/create-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (659,39,'CREATE INDEX','Syntax\n------ \nCREATE [OR REPLACE] [UNIQUE|FULLTEXT|SPATIAL] INDEX \n [IF NOT EXISTS] index_name\n [index_type]\n ON tbl_name (index_col_name,...)\n [WAIT n | NOWAIT]\n [index_option]\n [algorithm_option | lock_option] ...\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n \nalgorithm_option:\n ALGORITHM [=] {DEFAULT|INPLACE|COPY|NOCOPY|INSTANT}\n \nlock_option:\n LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}\n \nDescription\n----------- \nCREATE INDEX is mapped to an ALTER TABLE statement to create\nindexes.\nSee ALTER TABLE. CREATE INDEX cannot be used to create a\nPRIMARY KEY; use ALTER TABLE instead.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nAnother shortcut, DROP INDEX, allows the removal of an\nindex.\n \nFor valid identifiers to use as index names, see Identifier\nNames.\n \nNote that KEY_BLOCK_SIZE is currently ignored in CREATE\nINDEX, although it is included in the output of SHOW CREATE\nTABLE.\n \nPrivileges\n \nExecuting the CREATE INDEX statement requires the INDEX\nprivilege for the table or the database.\n \nOnline DDL\n \nIn MariaDB 10.0 and later, online DDL is supported with the\nALGORITHM and LOCK clauses.\n \nSee InnoDB Online DDL Overview for more information on\nonline DDL with InnoDB.\n \nCREATE OR REPLACE INDEX ...\n \nThe OR REPLACE clause was added in MariaDB 10.1.4.\n \nIf the OR REPLACE clause is used and if the index already\nexists, then instead of returning an error, the server will\ndrop the existing index and replace it with the newly\ndefined index.\n \nCREATE INDEX IF NOT EXISTS ...\n \nIf the IF NOT EXISTS clause is used, then the index will\nonly be created if an index with the same name does not\nalready exist. If the index already exists, then a warning\nwill be triggered by default.\n \nIndex Definitions\n \nSee CREATE TABLE: Index Definitions for information about\nindex definitions.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nALGORITHM\n \nSee ALTER TABLE: ALGORITHM for more information.\n \nLOCK\n \nSee ALTER TABLE: LOCK for more information.\n \nProgress Reporting\n \nMariaDB provides progress reporting for CREATE INDEX\nstatement for clients\nthat support the new progress reporting protocol. For\nexample, if you were using the mysql client, then the\nprogress report might look like this::\n \nCREATE INDEX ON tab (num);;\nStage: 1 of 2 \'copy to tmp table\' 46% of stage\n \nThe progress report is also shown in the output of the SHOW\nPROCESSLIST statement and in the contents of the\ninformation_schema.PROCESSLIST table.\n \nSee Progress Reporting for more information.\n \nExamples\n-------- \nCreating a unique index:\n \nCREATE UNIQUE INDEX HomePhone ON Employees(Home_Phone);\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE INDEX xi ON xx5 (x);\nQuery OK, 0 rows affected (0.03 sec)\n \nCREATE INDEX xi ON xx5 (x);\nERROR 1061 (42000): Duplicate key name \'xi\'\n \nCREATE OR REPLACE INDEX xi ON xx5 (x);\nQuery OK, 0 rows affected (0.03 sec)\n \nCREATE INDEX IF NOT EXISTS xi ON xx5 (x);\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------+\n| Note | 1061 | Duplicate key name \'xi\' |\n+-------+------+-------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-index/','','https://mariadb.com/kb/en/create-index/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (660,39,'CREATE PACKAGE','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nCREATE\n [ OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n PACKAGE [ IF NOT EXISTS ]\n [ db_name . ] package_name\n [ package_characteristic ... ]\n{ AS | IS }\n [ package_specification_element ... ]\nEND [ package_name ]\n \npackage_characteristic:\n COMMENT \'string\'\n | SQL SECURITY { DEFINER | INVOKER }\n \npackage_specification_element:\n FUNCTION_SYM package_specification_function ;\n | PROCEDURE_SYM package_specification_procedure ;\n \npackage_specification_function:\n func_name [ ( func_param [, func_param]... ) ]\n RETURNS func_return_type\n [ package_routine_characteristic... ]\n \npackage_specification_procedure:\n proc_name [ ( proc_param [, proc_param]... ) ]\n [ package_routine_characteristic... ]\n \nfunc_return_type:\n type\n \nfunc_param:\n param_name type\n \nproc_param:\n param_name { IN | OUT | INOUT | IN OUT } type\n \ntype:\n Any valid MariaDB explicit or anchored data type\n \npackage_routine_characteristic:\n COMMENT \'string\'\n | LANGUAGE SQL\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n \nDescription\n----------- \nThe CREATE PACKAGE statement can be used when Oracle\nSQL_MODE is set.\n \nThe CREATE PACKAGE creates the specification for a stored\npackage (a collection of logically related stored objects).\nA stored package specification declares public routines\n(procedures and functions) of the package, but does not\nimplement these routines.\n \nA package whose specification was created by the CREATE\nPACKAGE statement, should later be implemented using the\nCREATE PACKAGE BODY statement.\n \nExamples\n-------- \nSET sql_mode=ORACLE;\nDELIMITER $$\nCREATE OR REPLACE PACKAGE employee_tools AS\n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n PROCEDURE raiseSalaryStd(eid INT);\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND;\n$$\nDELIMITER ;\n \n\n\nURL: https://mariadb.com/kb/en/create-package/','','https://mariadb.com/kb/en/create-package/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (661,39,'CREATE PACKAGE BODY','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nCREATE [ OR REPLACE ]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n PACKAGE BODY\n [ IF NOT EXISTS ]\n [ db_name . ] package_name\n [ package_characteristic... ]\n{ AS | IS }\n package_implementation_declare_section\n package_implementation_executable_section\nEND [ package_name]\n \npackage_implementation_declare_section:\n package_implementation_item_declaration\n [ package_implementation_item_declaration... ]\n [ package_implementation_routine_definition... ]\n | package_implementation_routine_definition\n [ package_implementation_routine_definition...]\n \npackage_implementation_item_declaration:\n variable_declaration ;\n \nvariable_declaration:\n variable_name[,...] type [:= expr ]\n \npackage_implementation_routine_definition:\n FUNCTION package_specification_function\n [ package_implementation_function_body ] ;\n | PROCEDURE package_specification_procedure\n [ package_implementation_procedure_body ] ;\n \npackage_implementation_function_body:\n { AS | IS } package_routine_body [func_name]\n \npackage_implementation_procedure_body:\n { AS | IS } package_routine_body [proc_name]\n \npackage_routine_body:\n [ package_routine_declarations ]\n BEGIN\n statements [ EXCEPTION exception_handlers ]\n END\n \npackage_routine_declarations:\n package_routine_declaration \';\'\n[package_routine_declaration \';\']...\n \npackage_routine_declaration:\n variable_declaration\n | condition_name CONDITION FOR condition_value\n | user_exception_name EXCEPTION\n | CURSOR_SYM cursor_name\n [ ( cursor_formal_parameters ) ]\n IS select_statement\n ;\n \npackage_implementation_executable_section:\n END\n | BEGIN\n statement ; [statement ; ]...\n [EXCEPTION exception_handlers]\n END\n \nexception_handlers:\n exception_handler [exception_handler...]\n \nexception_handler:\n WHEN_SYM condition_value [, condition_value]...\n THEN_SYM statement ; [statement ;]...\n \ncondition_value:\n condition_name\n | user_exception_name\n | SQLWARNING\n | SQLEXCEPTION\n | NOT FOUND\n | OTHERS_SYM\n | SQLSTATE [VALUE] sqlstate_value\n | mariadb_error_code\n \n\nDescription\n----------- \nThe CREATE PACKAGE BODY statement can be used when Oracle\nSQL_MODE is set.\n \nThe CREATE PACKAGE BODY statement creates the package body\nfor a stored package. The package specification must be\npreviously created using the CREATE PACKAGE statement.\n \nA package body provides implementations of the package\npublic routines and can optionally have:\npackage-wide private variables\npackage private routines\nforward declarations for private routines\nan executable initialization section\n \nExamples\n-------- \nSET sql_mode=ORACLE;\nDELIMITER $$\nCREATE OR REPLACE PACKAGE employee_tools AS\n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n PROCEDURE raiseSalaryStd(eid INT);\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND;\n$$\nCREATE PACKAGE BODY employee_tools AS\n -- package body variables\n stdRaiseAmount DECIMAL(10,2):=500;\n \n -- private routines\n PROCEDURE log (eid INT, ecmnt TEXT) AS\n BEGIN\n INSERT INTO employee_log (id, cmnt) VALUES (eid, ecmnt);\n END;\n \n -- public routines\n PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2)) AS\n eid INT;\n BEGIN\n INSERT INTO employee (name, salary) VALUES (ename,\nesalary);\n eid:= last_insert_id();\n log(eid, \'hire \' || ename);\n END;\n \n FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2) AS\n nSalary DECIMAL(10,2);\n BEGIN\n SELECT salary INTO nSalary FROM employee WHERE id=eid;\n log(eid, \'getSalary id=\' || eid || \' salary=\' ||\nnSalary);\n RETURN nSalary;\n END;\n \n PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2)) AS\n BEGIN\n UPDATE employee SET salary=salary+amount WHERE id=eid;\n log(eid, \'raiseSalary id=\' || eid || \' amount=\' ||\namount);\n END;\n \n PROCEDURE raiseSalaryStd(eid INT) AS\n BEGIN\n raiseSalary(eid, stdRaiseAmount);\n log(eid, \'raiseSalaryStd id=\' || eid);\n END;\n \nBEGIN\n -- This code is executed when the current session\n -- accesses any of the package routines for the first time\n log(0, \'Session \' || connection_id() || \' \' ||\ncurrent_user || \' started\');\nEND;\n$$\n \nDELIMITER ;\n \n\n\nURL: https://mariadb.com/kb/en/create-package-body/','','https://mariadb.com/kb/en/create-package-body/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (662,39,'CREATE PROCEDURE','Syntax\n------ \nCREATE\n [OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n PROCEDURE sp_name ([proc_parameter[,...]])\n [characteristic ...] routine_body\n \nproc_parameter:\n [ IN | OUT | INOUT ] param_name type\n \ntype:\n Any valid MariaDB data type\n \ncharacteristic:\n LANGUAGE SQL\n | [NOT] DETERMINISTIC\n | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL\nDATA }\n | SQL SECURITY { DEFINER | INVOKER }\n | COMMENT \'string\'\n \nroutine_body:\n Valid SQL procedure statement\n \nDescription\n----------- \nCreates a stored procedure. By default, a routine is\nassociated with the default database. To associate the\nroutine\nexplicitly with a given database, specify the name as\ndb_name.sp_name\nwhen you create it.\n \nWhen the routine is invoked, an implicit USE db_name is\nperformed (and\nundone when the routine terminates). The causes the routine\nto have\nthe given default database while it executes. USE statements\nwithin\nstored routines are disallowed.\n \nWhen a stored procedure has been created, you invoke it by\nusing the CALL statement (see CALL).\n \nTo execute the CREATE PROCEDURE statement, it is\nnecessary to have the CREATE ROUTINE privilege. By default,\nMariaDB\nautomatically grants the ALTER ROUTINE and EXECUTE\nprivileges to the\nroutine creator. See also Stored Routine Privileges.\n \nThe DEFINER and SQL SECURITY clauses specify the security\ncontext to\nbe used when checking access privileges at routine execution\ntime, as\ndescribed later.\n \nIf the routine name is the same as the name of a built-in\nSQL\nfunction, you must use a space between the name and the\nfollowing\nparenthesis when defining the routine, or a syntax error\noccurs. This\nis also true when you invoke the routine later. For this\nreason, we\nsuggest that it is better to avoid re-using the names of\nexisting SQL\nfunctions for your own stored routines.\n \nThe IGNORE_SPACE SQL mode applies to built-in functions, not\nto stored\nroutines. It is always allowable to have spaces after a\nroutine name,\nregardless of whether IGNORE_SPACE is enabled.\n \nThe parameter list enclosed within parentheses must always\nbe present.\nIf there are no parameters, an empty parameter list of ()\nshould be\nused. Parameter names are not case sensitive.\n \nEach parameter can be declared to use any valid data type,\nexcept that\nthe COLLATE attribute cannot be used.\n \nFor valid identifiers to use as procedure names, see\nIdentifier Names.\n \nIN/OUT/INOUT\n \nEach parameter is an IN parameter by default. To specify\notherwise for\na parameter, use the keyword OUT or INOUT before the\nparameter name.\n \nAn IN parameter passes a value into a procedure. The\nprocedure might\nmodify the value, but the modification is not visible to the\ncaller\nwhen the procedure returns. An OUT parameter passes a value\nfrom the\nprocedure back to the caller. Its initial value is NULL\nwithin the\nprocedure, and its value is visible to the caller when the\nprocedure\nreturns. An INOUT parameter is initialized by the caller,\ncan be\nmodified by the procedure, and any change made by the\nprocedure is\nvisible to the caller when the procedure returns.\n \nFor each OUT or INOUT parameter, pass a user-defined\nvariable in the\nCALL statement that invokes the procedure so that you can\nobtain its\nvalue when the procedure returns. If you are calling the\nprocedure\nfrom within another stored procedure or function, you can\nalso pass a\nroutine parameter or local routine variable as an IN or\nINOUT\nparameter.\n \nDETERMINISTIC/NOT DETERMINISTIC\n \nDETERMINISTIC and NOT DETERMINISTIC apply only to functions.\nSpecifying DETERMINISTC or NON-DETERMINISTIC in procedures\nhas no effect. The default value is NOT DETERMINISTIC.\nFunctions are DETERMINISTIC when they always return the same\nvalue for the same input. For example, a truncate or\nsubstring function. Any function involving data, therefore,\nis always NOT DETERMINISTIC.\n \nCONTAINS SQL/NO SQL/READS SQL DATA/MODIFIES SQL DATA\n \nCONTAINS SQL, NO SQL, READS SQL DATA, and MODIFIES SQL DATA\nare informative clauses that tell the server what the\nfunction does. MariaDB does not check in any way whether the\nspecified clause is correct. If none of these clauses are\nspecified, CONTAINS SQL is used by default.\n \nMODIFIES SQL DATA means that the function contains\nstatements that may modify data stored in databases. This\nhappens if the function contains statements like DELETE,\nUPDATE, INSERT, REPLACE or DDL.\n \nREADS SQL DATA means that the function reads data stored in\ndatabases, but does not modify any data. This happens if\nSELECT statements are used, but there no write operations\nare executed.\n \nCONTAINS SQL means that the function contains at least one\nSQL statement, but it does not read or write any data stored\nin a database. Examples include SET or DO.\n \nNO SQL means nothing, because MariaDB does not currently\nsupport any language other than SQL.\n \nThe routine_body consists of a valid SQL procedure\nstatement. This can\nbe a simple statement such as SELECT or INSERT, or it can be\na\ncompound statement written using BEGIN and END. Compound\nstatements\ncan contain declarations, loops, and other control structure\nstatements. See Programmatic and Compound Statements for\nsyntax details.\n \nMariaDB allows routines to contain DDL statements, such as\nCREATE and\nDROP. MariaDB also allows stored procedures (but not stored\nfunctions)\nto contain SQL transaction statements such as COMMIT.\n \nFor additional information about statements that are not\nallowed in\nstored routines, see Stored Routine Limitations.\n \nInvoking stored procedure from within programs\n \nFor information about invoking stored procedures from within\nprograms written in a language that has a MariaDB/MySQL\ninterface, see CALL.\n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP PROCEDURE IF EXISTS name;\n \nCREATE PROCEDURE name ...;\n \nwith the exception that any existing privileges for the\nprocedure are not dropped.\n \nsql_mode\n \nMariaDB stores the sql_mode system variable setting that is\nin effect at the time a routine is created, and always\nexecutes the routine with this setting in force, regardless\nof the server SQL mode in effect when the routine is\ninvoked.\n \nCharacter Sets and Collations\n \nProcedure parameters can be declared with any character\nset/collation. If the character set and collation are not\nspecifically set, the database defaults at the time of\ncreation will be used. If the database defaults change at a\nlater stage, the stored procedure character set/collation\nwill not be changed at the same time; the stored procedure\nneeds to be dropped and recreated to ensure the same\ncharacter set/collation as the database is used.\n \nOracle Mode\n \nFrom MariaDB 10.3, a subset of Oracle\'s PL/SQL language has\nbeen supported in addition to the traditional SQL/PSM-based\nMariaDB syntax. See Oracle mode from MariaDB 10.3 for\ndetails on changes when running Oracle mode.\n \nExamples\n-------- \nThe following example shows a simple stored procedure that\nuses an OUT\nparameter. It uses the DELIMITER command to set a new\ndelimiter for the duration of the process — see Delimiters\nin the mysql client.\n \nDELIMITER //\n \nCREATE PROCEDURE simpleproc (OUT param1 INT)\n BEGIN\n SELECT COUNT(*) INTO param1 FROM t;\n END;\n//\n \nDELIMITER ;\n \nCALL simpleproc(@a);\n \nSELECT @a;\n+------+\n| @a |\n+------+\n| 1 |\n+------+\n \nCharacter set and collation:\n \nDELIMITER //\n \nCREATE PROCEDURE simpleproc2 (\n OUT param1 CHAR(10) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\'\n)\n BEGIN\n SELECT CONCAT(\'a\'),f1 INTO param1 FROM t;\n END;\n//\n \nDELIMITER ;\n \nCREATE OR REPLACE:\n \nDELIMITER //\n \nCREATE PROCEDURE simpleproc2 (\n OUT param1 CHAR(10) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\'\n)\n BEGIN\n SELECT CONCAT(\'a\'),f1 INTO param1 FROM t;\n \n END;\n \n//\nERROR 1304 (42000): PROCEDURE simpleproc2 already exists\n \nDELIMITER ;\n \nDELIMITER //\n \nCREATE OR REPLACE PROCEDURE simpleproc2 (\n OUT param1 CHAR(10) CHARACTER SET \'utf8\' COLLATE\n\'utf8_bin\'\n)\n BEGIN\n SELECT CONCAT(\'a\'),f1 INTO param1 FROM t;\n \n END;\n \n//\nERROR 1304 (42000): PROCEDURE simpleproc2 already exists\n \nDELIMITER ;\n \nQuery OK, 0 rows affected (0.03 sec)\n \n\n\nURL: https://mariadb.com/kb/en/create-procedure/','','https://mariadb.com/kb/en/create-procedure/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (663,39,'CREATE SEQUENCE','CREATE SEQUENCE was introduced in MariaDB 10.3.\n \nSyntax\n------ \nCREATE [OR REPLACE] [TEMPORARY] SEQUENCE [IF NOT EXISTS]\nsequence_name\n[ INCREMENT [ BY | = ] increment ]\n[ MINVALUE [=] minvalue | NO MINVALUE | NOMINVALUE ]\n[ MAXVALUE [=] maxvalue | NO MAXVALUE | NOMAXVALUE ]\n[ START [ WITH | = ] start ] \n[ CACHE [=] cache | NOCACHE ] [ CYCLE | NOCYCLE] \n[table_options]\n \nThe options for CREATE SEQUENCE can be given in any order,\noptionally followed by table_options.\n \ntable_options can be any of the normal table options in\nCREATE TABLE but the most usable ones are ENGINE=... and\nCOMMENT=.\n \nNOMAXVALUE and NOMINVALUE are there to allow one to create\nSEQUENCEs using the Oracle syntax.\n \nDescription\n----------- \nCREATE SEQUENCE will create a sequence that generates new\nvalues when called with NEXT VALUE FOR sequence_name. It\'s\nan alternative to AUTO INCREMENT when one wants to have more\ncontrol of how the numbers are generated. As the SEQUENCE\ncaches values (up to CACHE) it can in some cases be much\nfaster than AUTO INCREMENT. Another benefit is that one can\naccess the last value generated by all used sequences, which\nsolves one of the limitations with LAST_INSERT_ID().\n \nCREATE SEQUENCE requires the CREATE privilege.\n \nDROP SEQUENCE can be used to drop a sequence, and ALTER\nSEQUENCE to change it.\n \nArguments to Create\n \nThe following options may be used:\n \nOption | Default value |  Description | \n \nINCREMENT |  1 | Increment to use for values. May be\nnegative. Setting an increment of 0 causes the sequence to\nuse the value of the auto_increment_increment system\nvariable at the time of creation, which is always a positive\nnumber. (see MDEV-16035). | \n \nMINVALUE | 1 if INCREMENT > 0 and -9223372036854775807 if\nINCREMENT < 0 | Minimum value for the sequence | \n \nMAXVALUE | 9223372036854775806 if INCREMENT > 0 and -1 if\nINCREMENT < 0 | Max value for sequence | \n \nSTART | MINVALUE if INCREMENT > 0 and MAX_VALUE if\nINCREMENT< 0 | First value that the sequence will generate |\n\n \nCACHE | 1000 |  Number of values that should be cached. 0\nif no CACHE. The underlying table will be updated first time\na new sequence number is generated and each time the cache\nruns out. | \n \nIf CYCLE is used then the sequence should start again from\nMINVALUE after it has run out of values. Default value is\nNOCYCLE.\n \nConstraints on Create Arguments\n \nTo be able to create a legal sequence, the following must\nhold:\nMAXVALUE >= start\nMAXVALUE > MINVALUE\nSTART >= MINVALUE\nMAXVALUE = -9223372036854775807 (LONGLONG_MIN+1)\n \nNote that sequences can\'t generate the maximum/minimum 64\nbit number because of the constraint of\nMINVALUE and MAXVALUE. \n \nExamples\n-------- \nCREATE SEQUENCE s START WITH 100 INCREMENT BY 10;\n \nCREATE SEQUENCE s2 START WITH -100 INCREMENT BY -10;\n \nThe following statement fails, as the increment conflicts\nwith the defaults\n \nCREATE SEQUENCE s3 START WITH -100 INCREMENT BY 10;\n \nERROR 4082 (HY000): Sequence \'test.s3\' values are\nconflicting\n \nThe sequence can be created by specifying workable minimum\nand maximum values:\n \nCREATE SEQUENCE s3 START WITH -100 INCREMENT BY 10\nMINVALUE=-100 MAXVALUE=1000;\n \n\n\nURL: https://mariadb.com/kb/en/create-sequence/','','https://mariadb.com/kb/en/create-sequence/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (664,39,'CREATE SERVER','Syntax\n------ \nCREATE [OR REPLACE] SERVER [IF NOT EXISTS] server_name\n FOREIGN DATA WRAPPER wrapper_name\n OPTIONS (option [, option] ...)\n \noption:\n { HOST character-literal\n | DATABASE character-literal\n | USER character-literal\n | PASSWORD character-literal\n | SOCKET character-literal\n | OWNER character-literal\n | PORT numeric-literal }\n \nDescription\n----------- \nThis statement creates the definition of a server for use\nwith the Spider,\nFEDERATED or FederatedX storage\nengine. The CREATE SERVER statement creates a new row within\nthe\nservers table within the mysql database. This statement\nrequires the SUPER privilege.\n \nThe server_name should be a unique reference to the server.\nServer definitions\nare global within the scope of the server, it is not\npossible to qualify the\nserver definition to a specific database. server_name has a\nmaximum length of\n64 characters (names longer than 64 characters are silently\ntruncated), and is\ncase insensitive. You may specify the name as a quoted\nstring.\n \nThe wrapper_name should be mysql, and may be quoted with\nsingle quotes.\nOther values for wrapper_name are not currently supported.\n \nFor each option you must specify either a character literal\nor numeric literal.\nCharacter literals are UTF-8, support a maximum length of 64\ncharacters and\ndefault to a blank (empty) string. String literals are\nsilently truncated to 64\ncharacters. Numeric literals must be a number between 0 and\n9999, default value\nis 0.\n \nNote: The OWNER option is currently not applied, and has no\neffect on\nthe ownership or operation of the server connection that is\ncreated.\n \nThe CREATE SERVER statement creates an entry in the\nmysql.servers table that can later be used with the\nCREATE TABLE statement when creating a Spider, FederatedX or\nFEDERATED table. The options that you specify will\nbe used to populate the columns in the mysql.servers table.\nThe table columns\nare Server_name, Host, Db, Username, Password, Port and\nSocket.\n \n DROP SERVER removes a previously created server definition.\n\n \nCREATE SERVER is not written to the binary log, irrespective\nof\nthe binary log format being used.\n \nFor valid identifiers to use as server names, see Identifier\nNames.\n \nOR REPLACE\n \nIf the optional OR REPLACE clause is used, it acts as a\nshortcut for:\n \nDROP SERVER IF EXISTS name;\n \nCREATE SERVER server_name ...;\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the server already exists.\nCannot be used together with OR REPLACE.\n \nExamples\n-------- \nCREATE SERVER s\nFOREIGN DATA WRAPPER mysql\nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE SERVER s \nFOREIGN DATA WRAPPER mysql \nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\nERROR 1476 (HY000): The foreign server, s, you are trying to\ncreate already exists\n \nCREATE OR REPLACE SERVER s \nFOREIGN DATA WRAPPER mysql \nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\nQuery OK, 0 rows affected (0.00 sec)\n \nCREATE SERVER IF NOT EXISTS s \nFOREIGN DATA WRAPPER mysql \nOPTIONS (USER \'Remote\', HOST \'192.168.1.106\', DATABASE\n\'test\');\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+----------------------------------------------------------------+\n| Level | Code | Message |\n+-------+------+----------------------------------------------------------------+\n| Note | 1476 | The foreign server, s, you are trying to\ncreate already exists |\n+-------+------+----------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-server/','','https://mariadb.com/kb/en/create-server/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (665,39,'CREATE TABLE','Syntax\n------ \nCREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]\ntbl_name\n (create_definition,...) [table_options ]...\n[partition_options]\nCREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]\ntbl_name\n [(create_definition,...)] [table_options ]...\n[partition_options]\n select_statement\nCREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]\ntbl_name\n { LIKE old_table_name | (LIKE old_table_name) }\n \nselect_statement:\n [IGNORE | REPLACE] [AS] SELECT ... (Some legal select\nstatement)\n \nDescription\n----------- \nUse the CREATE TABLE statement to create a table with the\ngiven name.\n \nIn its most basic form, the CREATE TABLE statement provides\na table name\nfollowed by a list of columns, indexes, and constraints. By\ndefault, the table\nis created in the default database. Specify a database with\ndb_name.tbl_name.\nIf you quote the table name, you must quote the database\nname and table name\nseparately as `db_name`.`tbl_name`. This is particularly\nuseful for CREATE TABLE ... SELECT, because it allows to\ncreate a table into a database, which contains data from\nother databases. See Identifier Qualifiers.\n \nIf a table with the same name exists, error 1050 results.\nUse IF NOT EXISTS\nto suppress this error and issue a note instead. Use SHOW\nWARNINGS\nto see notes.\n \nThe CREATE TABLE statement automatically commits the current\ntransaction,\nexcept when using the TEMPORARY keyword.\n \nFor valid identifiers to use as table names, see Identifier\nNames.\n \nNote: if the default_storage_engine is set to ColumnStore\nthen it needs setting on all UMs. Otherwise when the tables\nusing the default engine are replicated across UMs they will\nuse the wrong engine. You should therefore not use this\noption as a session variable with ColumnStore.\n \nMicrosecond precision can be between 0-6. If no precision is\nspecified it is assumed to be 0, for backward compatibility\nreasons.\n \nPrivileges\n \nExecuting the CREATE TABLE statement requires the CREATE\nprivilege for the table or the database.\n \nCREATE OR REPLACE TABLE ...\n \nThe OR REPLACE clause was added in MariaDB 10.0.8.\n \nIf the OR REPLACE clause is used and if the table already\nexists, then instead of returning an error, the server will\ndrop the existing table and replace it with the newly\ndefined table.\n \nThis syntax was originally added to make replication more\nrobust if it has to rollback and repeat statements such as\nCREATE ... SELECT on slaves.\n \nCREATE OR REPLACE TABLE table_name (a int);\n \nis basically the same as:\n \nDROP TABLE IF EXISTS table_name;\nCREATE TABLE table_name (a int);\n \nwith the following exceptions:\nIf table_name was locked with LOCK TABLES it will continue\nto be locked after the statement.\nTemporary tables are only dropped if the TEMPORARY keyword\nwas used. (With DROP TABLE, temporary tables are preferred\nto be dropped before normal tables).\n \nThings to be Aware of With CREATE OR REPLACE\n \nThe table is dropped first (if it existed), after that the\nCREATE is done. Because of this, if the CREATE fails, then\nthe table will not exist anymore after the statement. If the\ntable was used with LOCK TABLES it will be unlocked.\nOne can\'t use OR REPLACE together with IF EXISTS.\nSlaves in replication will by default use CREATE OR REPLACE\nwhen replicating CREATE statements that don\'\'t use IF\nEXISTS. This can be changed by setting the variable\nslave-ddl-exec-mode to STRICT.\n \nCREATE TABLE IF NOT EXISTS ...\n \nIf the IF NOT EXISTS clause is used, then the index will\nonly be created if an index with the same name does not\nalready exist. If the index already exists, then a warning\nwill be triggered by default.\n \nCREATE TEMPORARY TABLE ...\n \nUse the TEMPORARY keyword to create a temporary table that\nis only available to your current session. Temporary tables\nare dropped when the your session ends. Temporary table\nnames are specific to your session. They will not conflict\nwith other temporary tables from other session even if they\nshare the same name. They will shadow names of non-temporary\ntables or views, if they are identical. A temporary table\ncan have the same name as a non-temporary table which is\nlocated in the same database. In that case, their name will\nreference the temporary table when used in SQL statements.\nYou must have the CREATE TEMPORARY TABLES privilege on the\ndatabase to create temporary tables. If no storage engine is\nspecified, the default_tmp_storage_engine setting will\ndetermine the engine.\n \nCREATE TABLE ... LIKE\n \nUse the LIKE clause instead of a full table definition to\ncreate a table with the same definition as another table,\nincluding columns, indexes, and table options. Foreign key\ndefinitions, as well as any DATA DIRECTORY or INDEX\nDIRECTORY table options specified on the original table,\nwill not be created.\n \nCREATE TABLE ... SELECT\n \nYou can create a table containing data from other tables\nusing the CREATE ... SELECT statement. Columns will be\ncreated in the table for each field returned by the SELECT\nquery.\n \nYou can also define some columns normally and add other\ncolumns from a SELECT. You can also create columns in the\nnormal way and assign them some values using the query, this\nis done to force a certain type or other field\ncharacteristics. The columns that are not named in the query\nwill be placed before the others. For example:\n \nCREATE TABLE test (a INT NOT NULL, b CHAR(10)) ENGINE=MyISAM\n SELECT 5 AS b, c, d FROM another_table;\n \nRemember that the query just returns data. If you want to\nuse the same indexes, or the same columns attributes ([NOT]\nNULL, DEFAULT, AUTO_INCREMENT) in the new table, you need to\nspecify them manually. Types and sizes are not automatically\npreserved if no data returned by the SELECT requires the\nfull size, and VARCHAR could be converted into CHAR. The\nCAST() function can be used to forcee the new table to use\ncertain types.\n \nAliases (AS) are taken into account, and they should always\nbe used when you SELECT an expression (function,\narithmetical operation, etc).\n \nIf an error occurs during the query, the table will not be\ncreated at all.\n \nIf the new table has a primary key or UNIQUE indexes, you\ncan use the IGNORE or REPLACE keywords to handle duplicate\nkey errors during the query. IGNORE means that the newer\nvalues must not be inserted an identical value exists in the\nindex. REPLACE means that older values must be overwritten.\n \nIf the columns in the new table are more than the rows\nreturned by the query, the columns populated by the query\nwill be placed after other columns. Note that if the strict\nSQL_MODE is on, and the columns that are not names in the\nquery do not have a DEFAULT value, an error will raise and\nno rows will be copied.\n \nConcurrent inserts are not used during the execution of a\nCREATE ... SELECT.\n \nIf the table already exists, an error similar to the\nfollowing will be returned:\n \nERROR 1050 (42S01): Table \'t\' already exists\n \nIf the IF NOT EXISTS clause is used and the table exists, a\nnote will be produced instead of an error.\n \nTo insert rows from a query into an existing table, INSERT\n... SELECT can be used.\n \nColumn Definitions\n \ncreate_definition:\n { col_name column_definition | index_definition |\nperiod_definition | CHECK (expr) }\n \ncolumn_definition:\n data_type\n [NOT NULL | NULL] [DEFAULT default_value | (expression)]\n [AUTO_INCREMENT] [ZEROFILL] [UNIQUE [KEY] | [PRIMARY] KEY]\n [INVISIBLE] [{WITH|WITHOUT} SYSTEM VERSIONING]\n [COMMENT \'string\']\n [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]\n [reference_definition]\n | data_type [GENERATED ALWAYS] \n AS { { ROW {START|END} } | { (expression) [VIRTUAL |\nPERSISTENT | STORED] } }\n [UNIQUE [KEY]] [COMMENT \'string\']\n \nconstraint_definition:\n CONSTRAINT [constraint_name] CHECK (expression)\nNote: MariaDB accepts the REFERENCES clause in ALTER TABLE\nand CREATE TABLE column definitions, but that syntax does\nnothing. MariaDB simply parses it without returning any\nerror or warning, for compatibility with other DBMS\'s.\nBefore MariaDB 10.2.1 this was also true for CHECK\nconstraints. Only the syntax for indexes described below\ncreates foreign keys.\n \nEach definition either creates a column in the table or\nspecifies and index or\nconstraint on one or more columns. See Indexes below for\ndetails\non creating indexes.\n \nCreate a column by specifying a column name and a data type,\noptionally\nfollowed by column options. See Data Types for a full list\nof data types allowed in MariaDB.\n \nNULL and NOT NULL\n \nUse the NULL or NOT NULL options to specify that values in\nthe column\nmay or may not be NULL, respectively. By default, values may\nbe NULL. See also NULL Values in MariaDB.\n \nDEFAULT Column Option\n \nThe DEFAULT clause was enhanced in MariaDB 10.2.1. Some\nenhancements include\nBLOB and TEXT columns now support DEFAULT.\nThe DEFAULT clause can now be used with an expression or\nfunction.\n \nSpecify a default value using the DEFAULT clause. If you\ndon\'t specify DEFAULT then the following rules apply:\nIf the column is not defined with NOT NULL, AUTO_INCREMENT\nor TIMESTAMP, an explicit DEFAULT NULL will be added.\nNote that in MySQL and in MariaDB before 10.1.6, you may get\nan explicit DEFAULT for primary key parts, if not specified\nwith NOT NULL.\n \nThe default value will be used if you INSERT a row without\nspecifying a value for that column, or if you specify\nDEFAULT for that column.\nBefore MariaDB 10.2.1 you couldn\'t usually provide an\nexpression or function to evaluate at\ninsertion time. You had to provide a constant default value\ninstead. The one\nexception is that you may use CURRENT_TIMESTAMP as\nthe default value for a TIMESTAMP column to use the current\ntimestamp at insertion time.\n \nCURRENT_TIMESTAMP may also be used as\nthe default value for a DATETIME\n \nFrom MariaDB 10.2.1 you can use most functions in DEFAULT.\nExpressions should have parentheses around them. If you use\na non deterministic function in DEFAULT then all inserts to\nthe table will be replicated in row mode. You can even refer\nto earlier columns in the DEFAULT expression:\n \nCREATE TABLE t1 (a int DEFAULT (1+1), b int DEFAULT (a+1));\nCREATE TABLE t2 (a bigint primary key DEFAULT UUID_SHORT());\n \nThe DEFAULT clause cannot contain any stored functions or\nsubqueries, and a column used in the clause must already\nhave been defined earlier in the statement.\n \nSince MariaDB 10.2.1, it is possible to assign BLOB or TEXT\ncolumns a DEFAULT value. In earlier versions, assigning a\ndefault to these columns was not possible.\n \nStarting from 10.3.3 you can also use DEFAULT (NEXT VALUE\nFOR sequence)\n \nAUTO_INCREMENT Column Option\n \nUse AUTO_INCREMENT to create a column whose value can\ncan be set automatically from a simple counter. You can only\nuse AUTO_INCREMENT\non a column with an integer type. The column must be a key,\nand there can only be\none AUTO_INCREMENT column in a table. If you insert a row\nwithout specifying\na value for that column (or if you specify 0, NULL, or\nDEFAULT\nas the value), the actual value will be taken from the\ncounter, with each insertion\nincrementing the counter by one. You can still insert a\nvalue explicitly. If you\ninsert a value that is greater than the current counter\nvalue, the counter is\nset based on the new value. An AUTO_INCREMENT column is\nimplicitly NOT NULL.\nUse LAST_INSERT_ID to get the AUTO_INCREMENT value\nmost recently used by an INSERT statement.\n \nZEROFILL Column Option\n \nIf the ZEROFILL column option is specified for a column\nusing a numeric data type, then the column will be set to\nUNSIGNED and the spaces used by default to pad the field are\nreplaced with zeros. ZEROFILL is ignored in expressions or\nas part of a UNION. ZEROFILL is a non-standard MySQL and\nMariaDB enhancement.\n \nPRIMARY KEY Column Option\n \nUse PRIMARY KEY (or just KEY) to make a column a primary\nkey. A primary key is a special type of a unique key. There\ncan be at most one primary key per table, and it is\nimplicitly NOT NULL.\n \nSpecifying a column as a unique key creates a unique index\non that column. See the Index Definitions section below for\nmore information.\n \nUNIQUE KEY Column Option\n \nUse UNIQUE KEY (or just UNIQUE) to specify that all values\nin the column\nmust be distinct from each other. Unless the column is NOT\nNULL, there may be\nmultiple rows with NULL in the column. \n \nSpecifying a column as a unique key creates a unique index\non that column. See the Index Definitions section below for\nmore information.\n \nCOMMENT Column Option\n \nYou can provide a comment for each column using the COMMENT\nclause. The maximum length is 1024 characters (it was 255\ncharacters before MariaDB 5.5). Use\nthe SHOW FULL COLUMNS statement to see column comments.\n \nGenerated Columns\n \nA generated column is a column in a table that cannot\nexplicitly be set to a specific value in a DML query.\nInstead, its value is automatically generated based on an\nexpression. This expression might generate the value based\non the values of other columns in the table, or it might\ngenerate the value by calling built-in functions or\nuser-defined functions (UDFs).\n \nThere are two types of generated columns:\nPERSISTENT or STORED: This type\'s value is actually stored\nin the table.\nVIRTUAL: This type\'s value is not stored at all. Instead,\nthe value is generated dynamically when the table is\nqueried. This type is the default.\n \nGenerated columns are also sometimes called computed columns\nor virtual columns.\n \nFor a complete description about generated columns and their\nlimitations, see Generated (Virtual and Persistent/Stored)\nColumns.\n \nCOLUMN_FORMAT\n \nCOLUMN_FORMAT is only used by MySQL Cluster, and is silently\nignored in MariaDB.\n \nCOMPRESSED\n \nCertain columns may be compressed. See Storage-Engine\nIndependent Column Compression.\n \nINVISIBLE\n \nColumns may be made invisible, and hidden in certain\ncontexts. See Invisible Columns.\n \nWITH SYSTEM VERSIONING Column Option\n \nColumns may be explicitly marked as included from system\nversioning. See System-versioned tables for details.\n \nWITHOUT SYSTEM VERSIONING Column Option\n \nColumns may be explicitly marked as excluded from system\nversioning. See System-versioned tables for details.\n \nIndex Definitions\n \nindex_definition:\n {INDEX|KEY} [index_name] [index_type] (index_col_name,...)\n[index_option] ...\n | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name]\n(index_col_name,...) [index_option] ...\n | [CONSTRAINT [symbol]] PRIMARY KEY [index_type]\n(index_col_name,...) [index_option] ...\n | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY] [index_name]\n[index_type] (index_col_name,...) [index_option] ...\n | [CONSTRAINT [symbol]] FOREIGN KEY [index_name]\n(index_col_name,...) reference_definition\n \nindex_col_name:\n col_name [(length)] [ASC | DESC]\n \nindex_type:\n USING {BTREE | HASH | RTREE}\n \nindex_option:\n KEY_BLOCK_SIZE [=] value\n | index_type\n | WITH PARSER parser_name\n | COMMENT \'string\'\n | CLUSTERING={YES| NO}\n \nreference_definition:\n REFERENCES tbl_name (index_col_name,...)\n [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]\n [ON DELETE reference_option]\n [ON UPDATE reference_option]\n \nreference_option:\n RESTRICT | CASCADE | SET NULL | NO ACTION\nINDEX and KEY are synonyms. \n \nIndex names are optional, if not specified an automatic name\nwill be assigned. Index name are needed to drop indexes and\nappear in error messages when a constraint is violated.\n \nIndex Categories\n \nPlain Indexes\n \nPlain indexes are regular indexes that are not unique, and\nare not acting as a primary key or a foreign key. They are\nalso not the \"specialized\" FULLTEXT or SPATIAL indexes.\n \nSee Getting Started with Indexes: Plain Indexes for more\ninformation.\n \nPRIMARY KEY\n \nFor PRIMARY KEY indexes, you can specify a name for the\nindex, but it is silently ignored, and the name of the index\nis always PRIMARY.\n \nSee Getting Started with Indexes: Primary Key for more\ninformation.\n \nUNIQUE\n \nThe UNIQUE keyword means that the index will not accept\nduplicated values, except for NULLs. An error will raise if\nyou try to insert duplicate values in a UNIQUE index.\n \nFor UNIQUE indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nSee Getting Started with Indexes: Unique Index for more\ninformation.\n \nFOREIGN KEY\n \nFor FOREIGN KEY indexes, a reference definition must be\nprovided.\n \nFor FOREIGN KEY indexes, you can specify a name for the\nconstraint, using the CONSTRAINT keyword. That name will be\nused in error messages.\n \nFirst, you have to specify the name of the target (parent)\ntable and a column or a column list which must be indexed\nand whose values must match to the foreign key\'s values.\nThe MATCH clause is accepted to improve the compatibility\nwith other DBMS\'s, but has no meaning in MariaDB. The ON\nDELETE and ON UPDATE clauses specify what must be done when\na DELETE (or a REPLACE) statements attempts to delete a\nreferenced row from the parent table, and when an UPDATE\nstatement attempts to modify the referenced foreign key\ncolumns in a parent table row, respectively. The following\noptions are allowed:\nRESTRICT: The delete/update operation is not performed. The\nstatement terminates with a 1451 error (SQLSTATE \'2300\').\nNO ACTION: Synonym for RESTRICT.\nCASCADE: The delete/update operation is performed in both\ntables.\nSET NULL: The update or delete goes ahead in the parent\ntable, and the corresponding foreign key fields in the child\ntable are set to NULL. (They must not be defined as NOT NULL\nfor this to succeed).\nSET DEFAULT: This option is currently implemented only for\nthe PBXT storage engine, which is disabled by default and no\nlonger maintained. It sets the child table\'s foreign key\nfields to their DEFAULT values when the referenced parent\ntable key entries are updated or deleted.\n \nIf either clause is omitted, the default behavior for the\nomitted clause is RESTRICT.\n \nSee Foreign Keys for more information.\n \nFULLTEXT\n \nUse the FULLTEXT keyword to create full-text indexes.\n \nSee Full-Text Indexes for more information.\n \nSPATIAL\n \nUse the SPATIAL keyword to create geometric indexes.\n \nSee SPATIAL INDEX for more information.\n \nIndex Options\n \nKEY_BLOCK_SIZE Index Option\n \nThe KEY_BLOCK_SIZE index option is similar to the\nKEY_BLOCK_SIZE table option.\n \nWith the InnoDB storage engine, if you specify a non-zero\nvalue for the KEY_BLOCK_SIZE table option for the whole\ntable, then the table will implicitly be created with the\nROW_FORMAT table option set to COMPRESSED. However, this\ndoes not happen if you just set the KEY_BLOCK_SIZE index\noption for one or more indexes in the table. The InnoDB\nstorage engine ignores the KEY_BLOCK_SIZE index option.\nHowever, the SHOW CREATE TABLE statement may still report it\nfor the index.\n \nFor information about the KEY_BLOCK_SIZE index option, see\nthe KEY_BLOCK_SIZE table option below.\n \nIndex Types\n \nEach storage engine supports some or all index types. See\nStorage Engine Index Types for details on permitted index\ntypes for each storage engine.\n \nDifferent index types are optimized for different kind of\noperations:\nBTREE is the default type','','https://mariadb.com/kb/en/create-table/');
+update help_topic set description = CONCAT(description, ', and normally is the best choice.\nIt is supported by all storage engines. It can be used to\ncompare a column\'s value with a value using the =, >, >=,\n0) ,b int check (b> 0), constraint abc check (a>b));\n \nIf you use the second format and you don\'t give a name to\nthe constraint, then the constraint will get a auto\ngenerated name. This is done so that you can later delete\nthe constraint with ALTER TABLE DROP constraint_name.\n \nOne can disable all constraint expression checks by setting\nthe variable check_constraint_checks to OFF. This is useful\nfor example when loading a table that violates some\nconstraints that you want to later find and fix in SQL.\n \nSee CONSTRAINT for more information.\n \nTable Options\n \nFor each individual table you create (or alter), you can set\nsome table options. The general syntax for setting options\nis:\n \n = , [ = ...]\n \nThe equal sign is optional.\n \nSome options are supported by the server and can be used for\nall tables, no matter what storage engine they use; other\noptions can be specified for all storage engines, but have a\nmeaning only for some engines. Also, engines can extend\nCREATE TABLE with new options.\n \nIf the IGNORE_BAD_TABLE_OPTIONS SQL_MODE is enabled, wrong\ntable options generate a warning; otherwise, they generate\nan error.\n \ntable_option: \n [STORAGE] ENGINE [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DEFAULT] CHARACTER SET [=] charset_name\n | CHECKSUM [=] {0 | 1}\n | [DEFAULT] COLLATE [=] collation_name\n | COMMENT [=] \'string\'\n | CONNECTION [=] \'connect_string\'\n | DATA DIRECTORY [=] \'absolute path to directory\'\n | DELAY_KEY_WRITE [=] {0 | 1}\n | ENCRYPTED [=] {YES | NO}\n | ENCRYPTION_KEY_ID [=] value\n | IETF_QUOTES [=] {YES | NO}\n | INDEX DIRECTORY [=] \'absolute path to directory\'\n | INSERT_METHOD [=] { NO | FIRST | LAST }\n | KEY_BLOCK_SIZE [=] value\n | MAX_ROWS [=] value\n | MIN_ROWS [=] value\n | PACK_KEYS [=] {0 | 1 | DEFAULT}\n | PAGE_CHECKSUM [=] {0 | 1}\n | PAGE_COMPRESSED [=] {0 | 1}\n | PAGE_COMPRESSION_LEVEL [=] {0 .. 9}\n | PASSWORD [=] \'string\'\n | ROW_FORMAT [=]\n{DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT|PAGE}\n | SEQUENCE [=] {0|1}\n | STATS_AUTO_RECALC [=] {DEFAULT|0|1}\n | STATS_PERSISTENT [=] {DEFAULT|0|1}\n | STATS_SAMPLE_PAGES [=] {DEFAULT|value}\n | TABLESPACE tablespace_name\n | TRANSACTIONAL [=] {0 | 1}\n | UNION [=] (tbl_name[,tbl_name]...)\n | WITH SYSTEM VERSIONING\n \n[STORAGE] ENGINE\n \n[STORAGE] ENGINE specifies a storage engine for the table.\nIf this option is not used, the default storage engine is\nused instead. That is, the storage_engine session option\nvalue if it is set, or the value specified for the\n--default-storage-engine mysqld startup options, or InnoDB.\nIf the specified storage engine is not installed and active,\nthe default value will be used, unless the\nNO_ENGINE_SUBSTITUTION SQL MODE is set (default since\nMariaDB 10.0). This is only true for CREATE TABLE, not for\nALTER TABLE. For a list of storage engines that are present\nin your server, issue a SHOW ENGINES.\n \nAUTO_INCREMENT\n \nAUTO_INCREMENT specifies the initial value for the\nAUTO_INCREMENT primary key. This works for MyISAM, Aria,\nInnoDB/XtraDB, MEMORY, and ARCHIVE tables. You can change\nthis option with ALTER TABLE, but in that case the new value\nmust be higher than the highest value which is present in\nthe AUTO_INCREMENT column. If the storage engine does not\nsupport this option, you can insert (and then delete) a row\nhaving the wanted value - 1 in the AUTO_INCREMENT column.\n \nAVG_ROW_LENGTH\n \nAVG_ROW_LENGTH is the average rows size. It only applies to\ntables using MyISAM and Aria storage engines that have the\nROW_FORMAT table option set to FIXED format.\n \nMyISAM uses MAX_ROWS and AVG_ROW_LENGTH to decide the\nmaximum size of a table (default: 256TB, or the maximum file\nsize allowed by the system).\n \n[DEFAULT] CHARACTER SET/CHARSET\n \n[DEFAULT] CHARACTER SET (or [DEFAULT] CHARSET) is used to\nset a default character set for the table. This is the\ncharacter set used for all columns where an explicit\ncharacter set is not specified. If this option is omitted or\nDEFAULT is specified, database\'s default character set will\nbe used. See Setting Character Sets and Collations for\ndetails on setting the character sets.\n \nCHECKSUM/TABLE_CHECKSUM\n \nCHECKSUM (or TABLE_CHECKSUM) can be set to 1 to maintain a\nlive checksum for all table\'s rows. This makes write\noperations slower, but CHECKSUM TABLE will be very fast.\nThis option is only supported for MyISAM and Aria tables.\n \n[DEFAULT] COLLATE\n \n[DEFAULT] COLLATE is used to set a default collation for the\ntable. This is the collation used for all columns where an\nexplicit character set is not specified. If this option is\nomitted or DEFAULT is specified, database\'s default option\nwill be used. See Setting Character Sets and Collations for\ndetails on setting the collations\n \nCOMMENT\n \nCOMMENT is a comment for the table. Maximum length is 2048\ncharacters (before mariaDB 5.5 it was 60 characters). Also\nused to define table parameters when creating a Spider\ntable.\n \nCONNECTION\n \nCONNECTION is used to specify a server name or a connection\nstring for a Spider, CONNECT, Federated or FederatedX table.\n \nDATA DIRECTORY/INDEX DIRECTORY\n \nDATA DIRECTORY and INDEX DIRECTORY were only supported for\nMyISAM and Aria, before MariaDB 5.5. Since 5.5, DATA\nDIRECTORY has also been supported by InnoDB if the\ninnodb_file_per_table server system variable is enabled, but\nonly in CREATE TABLE, not in ALTER TABLE. So, carefully\nchoose a path for InnoDB tables at creation time, because it\ncannot be changed without dropping and re-creating the\ntable. These options specify the paths for data files and\nindex files, respectively. If these options are omitted, the\ndatabase\'s directory will be used to store data files and\nindex files. Note that these table options do not work for\npartitioned tables (use the partition options instead), or\nif the server has been invoked with the\n--skip-symbolic-links startup option. To avoid the\noverwriting of old files with the same name that could be\npresent in the directories, you can use the\n--keep_files_on_create option (an error will be issued if\nfiles already exist). These options are ignored if the\nNO_DIR_IN_CREATE SQL_MODE is enabled (useful for replication\nslaves). Also note that symbolic links cannot be used for\nInnoDB tables.\n \nDATA DIRECTORY works by creating symlinks from where the\ntable would normally have been (inside the datadir) to where\nthe option specifies. For security reasons, to avoid\nbypassing the privilege system, the server does not permit\nsymlinks inside the datadir. Therefore, DATA DIRECTORY\ncannot be used to specify a location inside the datadir. An\nattempt to do so will result in an error 1210 (HY000)\nIncorrect arguments to DATA DIRECTORY.\n \nDELAY_KEY_WRITE\n \nDELAY_KEY_WRITE is supported by MyISAM and Aria, and can be\nset to 1 to speed up write operations. In that case, when\ndata are modified, the indexes are not updated until the\ntable is closed. Writing the changes to the index file\naltogether can be much faster. However, note that this\noption is applied only if the delay_key_write server\nvariable is set to \'ON\'. If it is \'OFF\' the delayed\nindex writes are always disabled, and if it is \'ALL\' the\ndelayed index writes are always used, disregarding the value\nof DELAY_KEY_WRITE.\n \nENCRYPTED\n \nThe ENCRYPTED table option was added in MariaDB 10.1.4\n \nThe ENCRYPTED table option can be used to manually set the\nencryption status of an InnoDB table. See InnoDB / XtraDB\nEncryption for more information.\n \nAria does not currently support the ENCRYPTED table option.\nSee MDEV-18049 about that.\n \nSee Data-at-Rest Encryption for more information.\n \nENCRYPTION_KEY_ID\n \nThe ENCRYPTION_KEY_ID table option was added in MariaDB\n10.1.4\n \nThe ENCRYPTION_KEY_ID table option can be used to manually\nset the encryption key of an InnoDB table. See InnoDB /\nXtraDB Encryption for more information.\n \nAria does not currently support the ENCRYPTION_KEY_ID table\noption. See MDEV-18049 about that.\n \nSee Data-at-Rest Encryption for more information.\n \nIETF_QUOTES\n \nThe IETF_QUOTES option was added in MariaDB 10.1.8\n \nFor the CSV storage engine, the IETF_QUOTES option, when set\nto YES, enables IETF-compatible parsing of embedded quote\nand comma characters. Enabling this option for a table\nimproves compatibility with other tools that use CSV, but is\nnot compatible with MySQL CSV tables, or MariaDB CSV tables\ncreated without this option. Disabled by default.\n \nINSERT_METHOD\n \nINSERT_METHOD is only used with MERGE tables. This option\ndetermines in which underlying table the new rows should be\ninserted. If you set it to \'NO\' (which is the default) no\nnew rows can be added to the table (but you will still be\nable to perform INSERTs directly against the underlying\ntables). FIRST means that the rows are inserted into the\nfirst table, and LAST means that thet are inserted into the\nlast table.\n \nKEY_BLOCK_SIZE\n \nKEY_BLOCK_SIZE is used to determine the size of key blocks,\nin bytes or kilobytes. However, this value is just a hint,\nand the storage engine could modify or ignore it. If\nKEY_BLOCK_SIZE is set to 0, the storage engine\'s default\nvalue will be used.\n \nWith the InnoDB storage engine, if you specify a non-zero\nvalue for the KEY_BLOCK_SIZE table option for the whole\ntable, then the table will implicitly be created with the\nROW_FORMAT table option set to COMPRESSED.\n \nMIN_ROWS/MAX_ROWS\n \nMIN_ROWS and MAX_ROWS let the storage engine know how many\nrows you are planning to store as a minimum and as a\nmaximum. These values will not be used as real limits, but\nthey help the storage engine to optimize the table. MIN_ROWS\nis only used by MEMORY storage engine to decide the minimum\nmemory that is always allocated. MAX_ROWS is used to decide\nthe minimum size for indexes.\n \nPACK_KEYS\n \nPACK_KEYS can be used to determine whether the indexes will\nbe compressed. Set it to 1 to compress all keys. With a\nvalue of 0, compression will not be used. With the DEFAULT\nvalue, only long strings will be compressed. Uncompressed\nkeys are faster.\n \nPAGE_CHECKSUM\n \nPAGE_CHECKSUM is only applicable to Aria tables, and\ndetermines whether indexes and data should use page\nchecksums for extra safety. \n \nPAGE_COMPRESSED\n \nPAGE_COMPRESSED is used to enable InnoDB page compression\nfor InnoDB tables.\n \nPAGE_COMPRESSION_LEVEL\n \nPAGE_COMPRESSION_LEVEL is used to set the compression level\nfor InnoDB page compression for InnoDB tables. The table\nmust also have the PAGE_COMPRESSED table option set to 1.\n \nValid values for PAGE_COMPRESSION_LEVEL are 1 (the best\nspeed) through 9 (the best compression), .\n \nPASSWORD\n \nPASSWORD is unused.\n \nRAID_TYPE\n \nRAID_TYPE is an obsolete option, as the raid support has\nbeen disabled since MySQL 5.0.\n \nROW_FORMAT\n \nThe ROW_FORMAT table option specifies the row format for the\ndata file. Possible values are engine-dependent.\n \nSupported MyISAM Row Formats\n \nFor MyISAM, the supported row formats are: \nFIXED\nDYNAMIC\nCOMPRESSED\n \nThe COMPRESSED row format can only be set by the myisampack\ncommand line tool.\n \nSee MyISAM Storage Formats for more information.\n \nSupported Aria Row Formats\n \nFor Aria, the supported row formats are:\nPAGE\nFIXED\nDYNAMIC.\n \nSee Aria Storage Formats for more information.\n \nSupported InnoDB Row Formats\n \nFor InnoDB/XtraDB, the supported row formats are:\nCOMPACT\nREDUNDANT\nCOMPRESSED\nDYNAMIC.\n \nIf the ROW_FORMAT table option is set to FIXED for an InnoDB\ntable, then the server will either return an error or a\nwarning depending on the value of the innodb_strict_mode\nsystem variable. If the innodb_strict_mode system variable\nis set to OFF, then a warning is issued, and MariaDB will\ncreate the table using the default row format for the\nspecific MariaDB server version. If the innodb_strict_mode\nsystem variable is set to ON, then an error will be raised.\n \nSee XtraDB/InnoDB Storage Formats for more information.\n \nOther Storage Engines and ROW_FORMAT\n \nOther storage engines do not support the ROW_FORMAT table\noption.\n \nSEQUENCE\n \nIf the table is a sequence, then it will have the SEQUENCE\nset to 1.\n \nSTATS_AUTO_RECALC\n \nSTATS_AUTO_RECALC is available only in MariaDB 10.0+. It\nindicates whether to automatically recalculate persistent\nstatistics (see STATS_PERSISTENT, below) for an InnoDB\ntable.\nIf set to 1, statistics will be recalculated when more than\n10% of the data has changed. When set to 0, stats will be\nrecalculated only when an ANALYZE TABLE is run. If set to\nDEFAULT, or left out, the value set by the\ninnodb_stats_auto_recalc system variable applies. See InnoDB\nPersistent Statistics.\n \nSTATS_PERSISTENT\n \nSTATS_PERSISTENT is available only in MariaDB 10.0+. It\nindicates whether the InnoDB statistics created by ANALYZE\nTABLE will remain on disk or not. It can be set to 1 (on\ndisk), 0 (not on disk, the pre-MariaDB 10 behavior), or\nDEFAULT (the same as leaving out the option), in which case\nthe value set by the innodb_stats_persistent system variable\nwill apply. Persistent statistics stored on disk allow the\nstatistics to survive server restarts, and provide better\nquery plan stability. See InnoDB Persistent Statistics.\n \nSTATS_SAMPLE_PAGES\n \nSTATS_SAMPLE_PAGES is available only in MariaDB 10.0+. It\nindicates how many pages are used to sample index\nstatistics. If 0 or DEFAULT, the default value, the\ninnodb_stats_sample_pages value is used. See InnoDB\nPersistent Statistics.\n \nTRANSACTIONAL\n \nTRANSACTIONAL is only applicable for Aria tables. In future\nAria tables created with this option will be fully\ntransactional, but currently this provides a form of crash\nprotection. See Aria Storage Engine for more details.\n \nUNION\n \nUNION must be specified when you create a MERGE table. This\noption contains a comma-separated list of MyISAM tables\nwhich are accessed by the new table. The list is enclosed\nbetween parenthesis. Example: UNION = (t1,t2)\n \nWITH SYSTEM VERSIONING\n \nWITH SYSTEM VERSIONING is used for creating System-versioned\ntables.\n \nPartitions\n \npartition_options:\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list)\n | RANGE(expr)\n | LIST(expr)\n | SYSTEM_TIME [INTERVAL time_quantity time_unit] [LIMIT\nnum] }\n [PARTITIONS num]\n [SUBPARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY(column_list) }\n [SUBPARTITIONS num]\n ]\n [(partition_definition [, partition_definition] ...)]\n \npartition_definition:\n PARTITION partition_name\n [VALUES {LESS THAN {(expr) | MAXVALUE} | IN (value_list)}]\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\n [(subpartition_definition [, subpartition_definition] ...)]\n \nsubpartition_definition:\n SUBPARTITION logical_name\n [[STORAGE] ENGINE [=] engine_name]\n [COMMENT [=] \'comment_text\' ]\n [DATA DIRECTORY [=] \'data_dir\']\n [INDEX DIRECTORY [=] \'index_dir\']\n [MAX_ROWS [=] max_number_of_rows]\n [MIN_ROWS [=] min_number_of_rows]\n [TABLESPACE [=] tablespace_name]\n [NODEGROUP [=] node_group_id]\nIf the PARTITION BY clause is used, the table will be\npartitioned. A partition method must be explicitly indicated\nfor partitions and subpartitions. Partition methods are:\n[LINEAR] HASH creates a hash key which will be used to read\nand write rows. The partition function can be any valid SQL\nexpression which returns an INTEGER number. Thus, it is\npossible to use the HASH method on an integer column, or on\nfunctions which accept integer columns as an argument.\nHowever, VALUES LESS THAN and VALUES IN clauses can not be\nused with HASH. An example:\n \nCREATE TABLE t1 (a INT, b CHAR(5), c DATETIME)\n PARTITION BY HASH ( YEAR(c) );\n \n [LINEAR] HASH can be used for subpartitions, too.\n[LINEAR] KEY is similar to HASH, but the index has an even\ndistribution of data. Also, the expression can only be a\ncolumn or a list of columns. VALUES LESS THAN and VALUES IN\nclauses can not be used with KEY.\nRANGE partitions the rows using on a range of values, using\nthe VALUES LESS THAN operator. VALUES IN is not allowed with\nRANGE. The partition function can be any valid SQL\nexpression which returns a single value.\nLIST assignes partitions based on a table\'s column with a\nrestricted set of possible values. It is similar to RANGE,\nbut VALUES IN must be used for at least 1 columns, and\nVALUES LESS THAN is disallowed.\nSYSTEM_TIME partitioning is used for System-versioned tables\nto store historical data separately from current data.\n \nOnly HASH and KEY can be used for subpartitions, and they\ncan be [LINEAR].\n \nIt is possible to define up to 1024 partitions and\nsubpartitions.\n \nThe number of defined partitions can be optionally specified\nas PARTITION count. This can be done to avoid specifying all\npartitions individually. But you can also declare each\nindividual partition and, additionally, specify a PARTITIONS\ncount clause; in the case, the number of PARTITIONs must\nequal count.\n \nAlso see Partitioning Types Overview.\n \nSequences\n \nCREATE TABLE can also be used to create a SEQUENCE. See\nCREATE SEQUENCE and Sequence Overview.\n \nExamples\n-------- \ncreate table if not exists test (\na bigint auto_increment primary key,\nname varchar(128) charset utf8,\nkey name (name(32))\n) engine=InnoDB default charset latin1;\n \nThis example shows a couple of things:\nUsage of IF NOT EXISTS; If the table already existed, it\nwill not be created. There will not be any error for the\nclient, just a warning.\nHow to create a PRIMARY KEY that is automatically generated.\nHow to specify a table-specific character set and another\nfor a column.\nHow to create an index (name) that is only partly indexed\n(to save space).\n \nThe following clauses will work from MariaDB 10.2.1 only.\n \nCREATE TABLE t1(\n a int DEFAULT (1+1),\n b int DEFAULT (a+1),\n expires DATETIME DEFAULT(NOW() + INTERVAL 1 YEAR),\n x BLOB DEFAULT USER()\n);\n \n\n\nURL: https://mariadb.com/kb/en/create-table/') WHERE help_topic_id = 665;
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (666,39,'CREATE TABLESPACE','The CREATE TABLESPACE statement is not supported by MariaDB.\nIt was originally inherited from MySQL NDB Cluster. In MySQL\n5.7 and later, the statement is also supported for InnoDB.\nHowever, MariaDB has chosen not to include that specific\nfeature. See MDEV-19294 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/create-tablespace/','','https://mariadb.com/kb/en/create-tablespace/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (667,39,'CREATE TRIGGER','Syntax\n------ \nCREATE [OR REPLACE]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n TRIGGER [IF NOT EXISTS] trigger_name trigger_time\ntrigger_event\n ON tbl_name FOR EACH ROW\n [{ FOLLOWS | PRECEDES } other_trigger_name ]\n trigger_stmt\n \nDescription\n----------- \nThis statement creates a new trigger. A trigger is a named\ndatabase\nobject that is associated with a table, and that activates\nwhen a\nparticular event occurs for the table. The trigger becomes\nassociated\nwith the table named tbl_name, which must refer to a\npermanent table.\nYou cannot associate a trigger with a TEMPORARY table or a\nview.\n \nCREATE TRIGGER requires the TRIGGER privilege for the table\nassociated\nwith the trigger. (Before MySQL 5.1.6, this statement\nrequires the\nSUPER privilege.)\n \nYou can have multiple triggers for the same trigger_time and\ntrigger_event.\n \nFor valid identifiers to use as trigger names, see\nIdentifier Names.\n \nOR REPLACE\n \nIf used and the trigger already exists, instead of an error\nbeing returned, the existing trigger will be dropped and\nreplaced by the newly defined trigger.\n \nDEFINER\n \nThe DEFINER clause determines the security context to be\nused when\nchecking access privileges at trigger activation time.\n \nIF NOT EXISTS\n \nIf the IF NOT EXISTS clause is used, the trigger will only\nbe created if a trigger of the same name does not exist. If\nthe trigger already exists, by default a warning will be\nreturned.\n \ntrigger_time\n \ntrigger_time is the trigger action time. It can be BEFORE or\nAFTER to\nindicate that the trigger activates before or after each row\nto be\nmodified.\n \ntrigger_event\n \ntrigger_event indicates the kind of statement that activates\nthe\ntrigger. The trigger_event can be one of the following:\nINSERT: The trigger is activated whenever a new row is\ninserted into the table; for example, through INSERT, LOAD\nDATA, and REPLACE statements.\nUPDATE: The trigger is activated whenever a row is modified;\nfor example, through UPDATE statements.\nDELETE: The trigger is activated whenever a row is deleted\nfrom the table; for example, through DELETE and REPLACE\nstatements. However, DROP TABLE and TRUNCATE statements on\nthe table do not activate this trigger, because they do not\nuse DELETE. Dropping a partition does not activate DELETE\ntriggers, either.\n \nFOLLOWS/PRECEDES other_trigger_name\n \nThe FOLLOWS other_trigger_name and PRECEDES\nother_trigger_name options were added in MariaDB 10.2.3 as\npart of supporting multiple triggers per action time.\nThis is the same syntax used by MySQL 5.7, although MySQL\n5.7 does not have multi-trigger support.\n \nFOLLOWS adds the new trigger after another trigger while\nPRECEDES adds the new trigger before another trigger. If\nneither option is used, the new trigger is added last for\nthe given action and time.\n \nFOLLOWS and PRECEDES are not stored in the trigger\ndefinition. However the trigger order is guaranteed to not\nchange over time. mysqldump and other backup methods will\nnot change trigger order.\nYou can verify the trigger order from the ACTION_ORDER\ncolumn in INFORMATION_SCHEMA.TRIGGERS table.\n \nSELECT trigger_name, action_order FROM\ninformation_schema.triggers \n WHERE event_object_table=\'t1\';\n \nExamples\n-------- \nCREATE DEFINER=`root`@`localhost` TRIGGER increment_animal\n AFTER INSERT ON animals FOR EACH ROW \n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nOR REPLACE and IF NOT EXISTS\n \nCREATE DEFINER=`root`@`localhost` TRIGGER increment_animal\n AFTER INSERT ON animals FOR EACH ROW\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nERROR 1359 (HY000): Trigger already exists\n \nCREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER\nincrement_animal\n AFTER INSERT ON animals FOR EACH ROW\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nQuery OK, 0 rows affected (0.12 sec)\n \nCREATE DEFINER=`root`@`localhost` TRIGGER IF NOT EXISTS\nincrement_animal\n AFTER INSERT ON animals FOR EACH ROW\n UPDATE animal_count SET animal_count.animals =\nanimal_count.animals+1;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------+\n| Level | Code | Message |\n+-------+------+------------------------+\n| Note | 1359 | Trigger already exists |\n+-------+------+------------------------+\n1 row in set (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/create-trigger/','','https://mariadb.com/kb/en/create-trigger/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (668,39,'CREATE VIEW','Syntax\n------ \nCREATE\n [OR REPLACE]\n [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n [SQL SECURITY { DEFINER | INVOKER }]\n VIEW [IF NOT EXISTS] view_name [(column_list)]\n AS select_statement\n [WITH [CASCADED | LOCAL] CHECK OPTION]\n \nDescription\n----------- \nThe CREATE VIEW statement creates a new view, or replaces an\nexisting\none if the OR REPLACE clause is given. If the view does not\nexist, CREATE OR\nREPLACE VIEW is the same as CREATE VIEW. If the view does\nexist, CREATE OR\nREPLACE VIEW is the same as ALTER VIEW.\n \nThe select_statement is a SELECT statement that provides the\ndefinition of\nthe view. (When you select from the view, you select in\neffect using the SELECT\nstatement.) select_statement can select from base tables or\nother views.\n \nThe view definition is \"frozen\" at creation time, so\nchanges to the underlying\ntables afterwards do not affect the view definition. For\nexample, if a view is\ndefined as SELECT * on a table, new columns added to the\ntable later do not\nbecome part of the view. A SHOW CREATE VIEW shows that\nsuch queries are rewritten and column names are included in\nthe view\ndefinition.\n \nThe view definition must be a query that does not return\nerrors at view\ncreation times. However, the base tables used by the views\nmight be altered\nlater and the query may not be valid anymore. In this case,\nquerying the view\nwill result in an error. CHECK TABLE helps in finding this\nkind\nof problems.\n \nThe ALGORITHM clause affects how MariaDB processes the\nview. The DEFINER and SQL SECURITY clauses specify the\nsecurity context to be\nused when checking access privileges at view invocation\ntime. The WITH CHECK\nOPTION clause can be given to constrain inserts or updates\nto rows in tables\nreferenced by the view. These clauses are described later in\nthis section.\n \nThe CREATE VIEW statement requires the CREATE VIEW privilege\nfor the\nview, and some privilege for each column selected by the\nSELECT\nstatement. For columns used elsewhere in the SELECT\nstatement you must\nhave the SELECT privilege. If the OR REPLACE clause is\npresent, you\nmust also have the DROP privilege for the view.\n \nA view belongs to a database. By default, a new view is\ncreated in the\ndefault database. To create the view explicitly in a given\ndatabase,\nspecify the name as db_name.view_name when you create it.\n \nCREATE VIEW test.v AS SELECT * FROM t;\n \nBase tables and views share the same namespace within a\ndatabase, so a\ndatabase cannot contain a base table and a view that have\nthe same\nname.\n \nViews must have unique column names with no duplicates, just\nlike base\ntables. By default, the names of the columns retrieved by\nthe SELECT\nstatement are used for the view column names. To define\nexplicit names\nfor the view columns, the optional column_list clause can be\ngiven as\na list of comma-separated identifiers. The number of names\nin\ncolumn_list must be the same as the number of columns\nretrieved by the\nSELECT statement.\n \nMySQL until 5.1.28\n \nPrior to MySQL 5.1.29, When you modify an existing view, the\ncurrent view definition is backed up and saved. It is stored\nin that\ntable\'s database directory, in a subdirectory named arc.\nThe backup\nfile for a view v is named v.frm-00001. If you alter the\nview again,\nthe next backup is named v.frm-00002. The three latest view\nbackup\ndefinitions are stored. Backed up view definitions are not\npreserved\nby mysqldump, or any other such programs, but you can retain\nthem\nusing a file copy operation. However, they are not needed\nfor anything\nbut to provide you with a backup of your previous view\ndefinition. It\nis safe to remove these backup definitions, but only while\nmysqld is\nnot running. If you delete the arc subdirectory or its files\nwhile\nmysqld is running, you will receive an error the next time\nyou try to\nalter the view: \n \nMariaDB [test]> ALTER VIEW v AS SELECT * FROM t; \nERROR 6 (HY000): Error on delete of\n\'.\\test\\arc/v.frm-0004\' (Errcode: 2)\n \nColumns retrieved by the SELECT statement can be simple\nreferences to\ntable columns. They can also be expressions that use\nfunctions,\nconstant values, operators, and so forth.\n \nUnqualified table or view names in the SELECT statement are\ninterpreted with respect to the default database. A view can\nrefer to\ntables or views in other databases by qualifying the table\nor view\nname with the proper database name.\n \nA view can be created from many kinds of SELECT statements.\nIt can\nrefer to base tables or other views. It can use joins,\nUNION, and\nsubqueries. The SELECT need not even refer to any tables.\nThe\nfollowing example defines a view that selects two columns\nfrom another\ntable, as well as an expression calculated from those\ncolumns:\n \nCREATE TABLE t (qty INT, price INT);\n \nINSERT INTO t VALUES(3, 50);\n \nCREATE VIEW v AS SELECT qty, price, qty*price AS value FROM\nt;\n \nSELECT * FROM v;\n+------+-------+-------+\n| qty | price | value |\n+------+-------+-------+\n| 3 | 50 | 150 |\n+------+-------+-------+\n \nA view definition is subject to the following restrictions:\nThe SELECT statement cannot contain a subquery in the FROM\nclause.\nThe SELECT statement cannot refer to system or user\nvariables.\nWithin a stored program, the definition cannot refer to\nprogram parameters or local variables.\nThe SELECT statement cannot refer to prepared statement\nparameters.\nAny table or view referred to in the definition must exist.\nHowever, after a view has been created, it is possible to\ndrop a table or view that the definition refers to. In this\ncase, use of the view results in an error. To check a view\ndefinition for problems of this kind, use the CHECK TABLE\nstatement.\nThe definition cannot refer to a TEMPORARY table, and you\ncannot create a TEMPORARY view.\nAny tables named in the view definition must exist at\ndefinition time.\nYou cannot associate a trigger with a view.\nFor valid identifiers to use as view names, see Identifier\nNames.\n \nORDER BY is allowed in a view definition, but it is ignored\nif you\nselect from a view using a statement that has its own ORDER\nBY.\n \nFor other options or clauses in the definition, they are\nadded to the\noptions or clauses of the statement that references the\nview, but the\neffect is undefined. For example, if a view definition\nincludes a\nLIMIT clause, and you select from the view using a statement\nthat has\nits own LIMIT clause, it is undefined which limit applies.\nThis same\nprinciple applies to options such as ALL, DISTINCT, or\nSQL_SMALL_RESULT that follow the SELECT keyword, and to\nclauses such\nas INTO, FOR UPDATE, and LOCK IN SHARE MODE.\n \nThe PROCEDURE clause cannot be used in a view definition,\nand it cannot be used if a view is referenced in the FROM\nclause.\n \nIf you create a view and then change the query processing\nenvironment\nby changing system variables, that may affect the results\nthat you get\nfrom the view:\n \nCREATE VIEW v (mycol) AS SELECT \'abc\';\n \nSET sql_mode = \'\';\n \nSELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| mycol | \n+-------+\n \nSET sql_mode = \'ANSI_QUOTES\';\n \nSELECT \"mycol\" FROM v;\n+-------+\n| mycol |\n+-------+\n| abc | \n+-------+\n \nThe DEFINER and SQL SECURITY clauses determine which MariaDB\naccount to\nuse when checking access privileges for the view when a\nstatement is\nexecuted that references the view. They were added in MySQL\n5.1.2.\nThe legal SQL SECURITY characteristic values are DEFINER and\nINVOKER.\nThese indicate that the required privileges must be held by\nthe user\nwho defined or invoked the view, respectively. The default\nSQL\nSECURITY value is DEFINER.\n \nIf a user value is given for the DEFINER clause, it should\nbe a MariaDB\naccount in \'user_name\'@\'host_name\' format (the same\nformat used in the\nGRANT statement). The user_name and host_name values both\nare\nrequired. The definer can also be given as CURRENT_USER or\nCURRENT_USER(). The default DEFINER value is the user who\nexecutes the\nCREATE VIEW statement. This is the same as specifying\nDEFINER =\nCURRENT_USER explicitly.\n \nIf you specify the DEFINER clause, these rules determine the\nlegal\nDEFINER user values:\nIf you do not have the SUPER privilege, the only legal user\nvalue is your own account, either specified literally or by\nusing CURRENT_USER. You cannot set the definer to some other\naccount.\nIf you have the SUPER privilege, you can specify any\nsyntactically legal account name. If the account does not\nactually exist, a warning is generated.\nIf the SQL SECURITY value is DEFINER but the definer account\ndoes not exist when the view is referenced, an error occurs.\n \nWithin a view definition, CURRENT_USER returns the view\'s\nDEFINER\nvalue by default. Before MySQL 5.1.12, and for views\ndefined with the SQL SECURITY INVOKER characteristic,\nCURRENT_USER\nreturns the account for the view\'s invoker. For information\nabout user\nauditing within views, see\nhttp://dev.mysql.com/doc/refman/5.1/en/account-activity-auditing.html.\n \nWithin a stored routine that is defined with the SQL\nSECURITY DEFINER\ncharacteristic, CURRENT_USER returns the routine\'s DEFINER\nvalue. This\nalso affects a view defined within such a program, if the\nview\ndefinition contains a DEFINER value of CURRENT_USER.\n \nView privileges are checked like this:\nAt view definition time, the view creator must have the\nprivileges needed to use the top-level objects accessed by\nthe view. For example, if the view definition refers to\ntable columns, the creator must have privileges for the\ncolumns, as described previously. If the definition refers\nto a stored function, only the privileges needed to invoke\nthe function can be checked. The privileges required when\nthe function runs can be checked only as it executes: For\ndifferent invocations of the function, different execution\npaths within the function might be taken.\nWhen a view is referenced, privileges for objects accessed\nby the view are checked against the privileges held by the\nview creator or invoker, depending on whether the SQL\nSECURITY characteristic is DEFINER or INVOKER, respectively.\nIf reference to a view causes execution of a stored\nfunction, privilege checking for statements executed within\nthe function depend on whether the function is defined with\na SQL SECURITY characteristic of DEFINER or INVOKER. If the\nsecurity characteristic is DEFINER, the function runs with\nthe privileges of its creator. If the characteristic is\nINVOKER, the function runs with the privileges determined by\nthe view\'s SQL SECURITY characteristic.\n \nMySQL until 5.1.1\n \nPrior to MySQL 5.1.2 (before the DEFINER and SQL SECURITY\nclauses were\nimplemented), privileges required for objects used in a view\nare\nchecked at view creation time.\n \nExample: A view might depend on a stored function, and that\nfunction\nmight invoke other stored routines. For example, the\nfollowing view\ninvokes a stored function f():\n \nCREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);\n \nSuppose that f() contains a statement such as this:\n \nIF name IS NULL then\n CALL p1();\nELSE\n CALL p2();\nEND IF;\n \nThe privileges required for executing statements within f()\nneed to be\nchecked when f() executes. This might mean that privileges\nare needed\nfor p1() or p2(), depending on the execution path within\nf(). Those\nprivileges must be checked at runtime, and the user who must\npossess\nthe privileges is determined by the SQL SECURITY values of\nthe view v\nand the function f().\n \nThe DEFINER and SQL SECURITY clauses for views are\nextensions to\nstandard SQL. In standard SQL, views are handled using the\nrules for\nSQL SECURITY INVOKER.\n \nIf you invoke a view that was created before MySQL 5.1.2, it\nis\ntreated as though it was created with a SQL SECURITY DEFINER\nclause\nand with a DEFINER value that is the same as your account.\nHowever,\nbecause the actual definer is unknown, MySQL issues a\nwarning. To make\nthe warning go away, it is sufficient to re-create the view\nso that\nthe view definition includes a DEFINER clause.\n \nThe optional ALGORITHM clause is an extension to standard\nSQL. It\naffects how MariaDB processes the view. ALGORITHM takes\nthree values:\nMERGE, TEMPTABLE, or UNDEFINED. The default algorithm is\nUNDEFINED if\nno ALGORITHM clause is present. See View Algorithms for more\ninformation.\n \nSome views are updatable. That is, you can use them in\nstatements such\nas UPDATE, DELETE, or INSERT to update the contents of the\nunderlying\ntable. For a view to be updatable, there must be a\none-to-one\nrelationship between the rows in the view and the rows in\nthe\nunderlying table. There are also certain other constructs\nthat make a\nview non-updatable. See Inserting and Updating with Views.\n \nWITH CHECK OPTION\n \nThe WITH CHECK OPTION clause can be given for an updatable\nview to\nprevent inserts or updates to rows except those for which\nthe WHERE\nclause in the select_statement is true.\n \nIn a WITH CHECK OPTION clause for an updatable view, the\nLOCAL and\nCASCADED keywords determine the scope of check testing when\nthe view\nis defined in terms of another view. The LOCAL keyword\nrestricts the\nCHECK OPTION only to the view being defined. CASCADED causes\nthe\nchecks for underlying views to be evaluated as well. When\nneither\nkeyword is given, the default is CASCADED.\n \nFor more information about updatable views and the WITH\nCHECK OPTION\nclause, see\nInserting and Updating with Views.\n \nIF NOT EXISTS\n \nThe IF NOT EXISTS clause was added in MariaDB 10.1.3\n \nWhen the IF NOT EXISTS clause is used, MariaDB will return a\nwarning instead of an error if the specified view already\nexists. Cannot be used together with the OR REPLACE clause.\n \nExamples\n-------- \nCREATE TABLE t (a INT, b INT) ENGINE = InnoDB;\n \nINSERT INTO t VALUES (1,1), (2,2), (3,3);\n \nCREATE VIEW v AS SELECT a, a*2 AS a2 FROM t;\n \nSELECT * FROM v;\n \n+------+------+\n| a | a2 |\n+------+------+\n| 1 | 2 |\n| 2 | 4 |\n| 3 | 6 |\n+------+------+\n \nOR REPLACE and IF NOT EXISTS:\n \nCREATE VIEW v AS SELECT a, a*2 AS a2 FROM t;\n \nERROR 1050 (42S01): Table \'v\' already exists\n \nCREATE OR REPLACE VIEW v AS SELECT a, a*2 AS a2 FROM t;\n \nQuery OK, 0 rows affected (0.04 sec)\n \nCREATE VIEW IF NOT EXISTS v AS SELECT a, a*2 AS a2 FROM t;\n \nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n \n+-------+------+--------------------------+\n| Level | Code | Message |\n+-------+------+--------------------------+\n| Note | 1050 | Table \'v\' already exists |\n+-------+------+--------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/create-view/','','https://mariadb.com/kb/en/create-view/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (669,39,'DROP DATABASE','Syntax\n------ \nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n \nDescription\n----------- \nDROP DATABASE drops all tables in the database and deletes\nthe database. Be very careful with this statement! To use\nDROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is\na synonym for DROP DATABASE.\n \nImportant: When a database is dropped, user privileges on\nthe database are not automatically dropped. See GRANT.\n \nIF EXISTS\n \nUse IF EXISTS to prevent an error from occurring for\ndatabases that do not exist. A NOTE is generated for each\nnon-existent database when using IF EXISTS. See SHOW\nWARNINGS.\n \nExamples\n-------- \nDROP DATABASE bufg;\n \nQuery OK, 0 rows affected (0.39 sec)\n \nDROP DATABASE bufg;\n \nERROR 1008 (HY000): Can\'t drop database \'bufg\'; database\ndoesn\'t exist\n \n \\W\nShow warnings enabled.\n \nDROP DATABASE IF EXISTS bufg;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\nNote (Code 1008): Can\'t drop database \'bufg\'; database\ndoesn\'t exist\n \n\n\nURL: https://mariadb.com/kb/en/drop-database/','','https://mariadb.com/kb/en/drop-database/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (670,39,'DROP EVENT','Syntax\n------ \nDROP EVENT [IF EXISTS] event_name\n \nDescription\n----------- \nThis statement drops the event named event_name. The event\nimmediately\nceases being active, and is deleted completely from the\nserver.\n \nIf the event does not exist, the error\nERROR 1517 (HY000): Unknown event \'event_name\'\nresults. You can override this and cause the\nstatement to generate a NOTE for non-existent events instead\nby using\nIF EXISTS. See SHOW WARNINGS.\n \nThis statement requires the EVENT privilege. In MySQL 5.1.11\nand earlier, an event could be dropped only\nby its definer, or by a user having the SUPER privilege.\n \nExamples\n-------- \nDROP EVENT myevent3;\n \nUsing the IF EXISTS clause:\n \nDROP EVENT IF EXISTS myevent3;\n \nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-------------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------------+\n| Note | 1305 | Event myevent3 does not exist |\n+-------+------+-------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-event/','','https://mariadb.com/kb/en/drop-event/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (671,39,'DROP FUNCTION','Syntax\n------ \nDROP FUNCTION [IF EXISTS] f_name\n \nDescription\n----------- \nThe DROP FUNCTION statement is used to drop a stored\nfunction or a user-defined function (UDF). That is, the\nspecified routine is removed from the server, along with all\nprivileges specific to the function. You must have the ALTER\nROUTINE privilege for the routine in order to drop it. If\nthe automatic_sp_privileges server system variable is set,\nboth the ALTER ROUTINE and EXECUTE privileges are granted\nautomatically to the routine creator - see Stored Routine\nPrivileges.\n \nIF EXISTS\n \nThe IF EXISTS clause is a MySQL/MariaDB extension. It\nprevents an error from occurring if the function does not\nexist. A\nNOTE is produced that can be viewed with SHOW WARNINGS.\n \nFor dropping a user-defined functions (UDF), see DROP\nFUNCTION UDF.\n \nExamples\n-------- \nDROP FUNCTION hello;\n \nQuery OK, 0 rows affected (0.042 sec)\n \nDROP FUNCTION hello;\n \nERROR 1305 (42000): FUNCTION test.hello does not exist\n \nDROP FUNCTION IF EXISTS hello;\n \nQuery OK, 0 rows affected, 1 warning (0.000 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------+\n| Note | 1305 | FUNCTION test.hello does not exist |\n+-------+------+------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-function/','','https://mariadb.com/kb/en/drop-function/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (672,39,'DROP INDEX','Syntax\n------ \nDROP INDEX [IF EXISTS] index_name ON tbl_name \n [WAIT n |NOWAIT]\n [algorithm_option | lock_option] ...\n \nalgorithm_option:\n ALGORITHM [=] {DEFAULT|INPLACE|COPY|NOCOPY|INSTANT}\n \nlock_option:\n LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}\n \nDescription\n----------- \nDROP INDEX drops the index named index_name from the table\ntbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop\nthe\nindex.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nSee ALTER TABLE.\n \nAnother shortcut, CREATE INDEX, allows the creation of an\nindex.\n \nTo remove the primary key, `PRIMARY` must be specified as\nindex_name. Note that the quotes are necessary, because\nPRIMARY is a keyword.\n \nPrivileges\n \nExecuting the DROP INDEX statement requires the INDEX\nprivilege for the table or the database.\n \nOnline DDL\n \nIn MariaDB 10.0 and later, online DDL is supported with the\nALGORITHM and LOCK clauses.\n \nSee InnoDB Online DDL Overview for more information on\nonline DDL with InnoDB.\n \nDROP INDEX IF EXISTS ...\n \nThe IF EXISTS clause was added in MariaDB 10.1.4.\n \nIf the IF EXISTS clause is used, then MariaDB will return a\nwarning instead of an error if the index does not exist.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nALGORITHM\n \nSee ALTER TABLE: ALGORITHM for more information.\n \nLOCK\n \nSee ALTER TABLE: LOCK for more information.\n \nProgress Reporting\n \nMariaDB provides progress reporting for DROP INDEX statement\nfor clients\nthat support the new progress reporting protocol. For\nexample, if you were using the mysql client, then the\nprogress report might look like this::\n \n\n\nURL: https://mariadb.com/kb/en/drop-index/','','https://mariadb.com/kb/en/drop-index/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (673,39,'DROP PACKAGE','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nDROP PACKAGE [IF EXISTS] [ db_name . ] package_name\n \nDescription\n----------- \nThe DROP PACKAGE statement can be used when Oracle SQL_MODE\nis set.\n \nThe DROP PACKAGE statement drops a stored package entirely:\nDrops the package specification (earlier created using the\nCREATE PACKAGE statement).\nDrops the package implementation, if the implementation was\nalready created using the CREATE PACKAGE BODY statement.\n \n\n\nURL: https://mariadb.com/kb/en/drop-package/','','https://mariadb.com/kb/en/drop-package/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (674,39,'DROP PACKAGE BODY','Oracle-style packages were introduced in MariaDB 10.3.5.\n \nSyntax\n------ \nDROP PACKAGE BODY [IF EXISTS] [ db_name . ] package_name\n \nDescription\n----------- \nThe DROP PACKAGE BODY statement can be used when Oracle\nSQL_MODE is set.\n \nThe DROP PACKAGE BODY statement drops the package body (i.e\nthe implementation), previously created using the CREATE\nPACKAGE BODY statement.\n \nNote, DROP PACKAGE BODY drops only the package\nimplementation, but does not drop the package specification.\nUse DROP PACKAGE to drop the package entirely (i.e. both\nimplementation and specification).\n \n\n\nURL: https://mariadb.com/kb/en/drop-package-body/','','https://mariadb.com/kb/en/drop-package-body/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (675,39,'DROP PROCEDURE','Syntax\n------ \nDROP PROCEDURE [IF EXISTS] sp_name\n \nDescription\n----------- \nThis statement is used to drop a stored procedure. That is,\nthe\nspecified routine is removed from the server along with all\nprivileges specific to the procedure. You must have the\nALTER ROUTINE privilege for the routine. If the\nautomatic_sp_privileges server system variable is set, that\nprivilege and EXECUTE are granted automatically to the\nroutine creator - see Stored Routine Privileges.\n \nThe IF EXISTS clause is a MySQL/MariaDB extension. It\nprevents an error from occurring if the procedure or\nfunction does not exist. A\nNOTE is produced that can be viewed with SHOW WARNINGS.\n \nWhile this statement takes effect immediately, threads which\nare executing a procedure can continue execution.\n \nExamples\n-------- \nDROP PROCEDURE simpleproc;\n \nIF EXISTS:\n \nDROP PROCEDURE simpleproc;\n \nERROR 1305 (42000): PROCEDURE test.simpleproc does not exist\n \nDROP PROCEDURE IF EXISTS simpleproc;\n \nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------------------------+\n| Level | Code | Message |\n+-------+------+------------------------------------------+\n| Note | 1305 | PROCEDURE test.simpleproc does not exist |\n+-------+------+------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-procedure/','','https://mariadb.com/kb/en/drop-procedure/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (676,39,'DROP SEQUENCE','DROP SEQUENCE was introduced in MariaDB 10.3.\n \nSyntax\n------ \nDROP [TEMPORARY] SEQUENCE [IF EXISTS] [/*COMMENT TO SAVE*/]\n sequence_name [, sequence_name] ...\n \nDescription\n----------- \nDROP SEQUENCE removes one or more sequences created with\nCREATE SEQUENCE. You must have the DROP privilege for each\nsequence. MariaDB returns an error indicating by name which\nnon-existing tables it was unable to drop, but it also drops\nall of the tables in the list that do exist.\n \nImportant: When a table is dropped, user privileges on the\ntable are not automatically dropped. See GRANT.\n \nIf another connection is using the sequence, a metadata lock\nis active, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nFor each referenced sequence, DROP SEQUENCE drops a\ntemporary sequence with that name, if it exists. If it does\nnot exist, and the TEMPORARY keyword is not used, it drops a\nnon-temporary sequence with the same name, if it exists. The\nTEMPORARY keyword ensures that a non-temporary sequence will\nnot accidentally be dropped.\n \nUse IF EXISTS to prevent an error from occurring for\nsequences that do not exist. A NOTE is generated for each\nnon-existent sequence when using IF EXISTS. See SHOW\nWARNINGS.\n \nDROP SEQUENCE requires the DROP privilege.\n \nNotes\n \nDROP SEQUENCE only removes sequences, not tables. However,\nDROP TABLE can remove both sequences and tables.\n \n\n\nURL: https://mariadb.com/kb/en/drop-sequence/','','https://mariadb.com/kb/en/drop-sequence/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (677,39,'DROP SERVER','Syntax\n------ \nDROP SERVER [ IF EXISTS ] server_name\n \nDescription\n----------- \nDrops the server definition for the server named\nserver_name. The\ncorresponding row within the mysql.servers table will be\ndeleted. This\nstatement requires the SUPER privilege. \n \nDropping a server for a table does not affect any\nFederatedX, FEDERATED or Spider tables that used this\nconnection information when they were created. \n \nIF EXISTS\n \nIf the IF EXISTS clause is used, MariaDB will not return an\nerror if the server does not exist. Unlike all other\nstatements, DROP SERVER IF EXISTS does not issue a note if\nthe server does not exist. See MDEV-9400.\n \nExamples\n-------- \nDROP SERVER s;\n \nIF EXISTS:\n \nDROP SERVER s;\n \nERROR 1477 (HY000): The foreign server name you are trying\nto reference \n does not exist. Data source error: s\n \nDROP SERVER IF EXISTS s;\n \nQuery OK, 0 rows affected (0.00 sec)\n \n\n\nURL: https://mariadb.com/kb/en/drop-server/','','https://mariadb.com/kb/en/drop-server/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (678,39,'DROP TABLE','Syntax\n------ \nDROP [TEMPORARY] TABLE [IF EXISTS] [/*COMMENT TO SAVE*/]\n tbl_name [, tbl_name] ...\n [WAIT n|NOWAIT]\n [RESTRICT | CASCADE]\n \nDescription\n----------- \nDROP TABLE removes one or more tables. You must have the\nDROP privilege\nfor each table. All table data and the table definition are\nremoved, as well as triggers associated to the table, so be\ncareful with this statement! If any of the tables named in\nthe argument list do\nnot exist, MariaDB returns an error indicating by name which\nnon-existing tables\nit was unable to drop, but it also drops all of the tables\nin the list that do\nexist.\n \nImportant: When a table is dropped, user privileges on the\ntable are not\nautomatically dropped. See GRANT.\n \nIf another connection is using the table, a metadata lock is\nactive, and this statement will wait until the lock is\nreleased. This is also true for non-transactional tables.\n \nNote that for a partitioned table, DROP TABLE permanently\nremoves the table\ndefinition, all of its partitions, and all of the data which\nwas stored in\nthose partitions. It also removes the partitioning\ndefinition (.par) file\nassociated with the dropped table.\n \nFor each referenced table, DROP TABLE drops a temporary\ntable with that name, if it exists. If it does not exist,\nand the TEMPORARY keyword is not used, it drops a\nnon-temporary table with the same name, if it exists. The\nTEMPORARY keyword ensures that a non-temporary table will\nnot accidentally be dropped.\n \nUse IF EXISTS to prevent an error from occurring for tables\nthat do not\nexist. A NOTE is generated for each non-existent table when\nusing\nIF EXISTS. See SHOW WARNINGS.\n \nIf a foreign key references this table, the table cannot be\ndropped. In this case, it is necessary to drop the foreign\nkey first.\n \nRESTRICT and CASCADE are allowed to make porting from other\ndatabase systems easier. In MariaDB, they do nothing.\n \nSince MariaDB 5.5.27, the comment before the tablenames\n(that /*COMMENT TO SAVE*/) is stored in the binary log. That\nfeature can be used by replication tools to send their\ninternal messages.\n \nIt is possible to specify table names as db_name.tab_name.\nThis is useful to delete tables from multiple databases with\none statement. See Identifier Qualifiers for details.\n \nThe DROP privilege is required to use DROP TABLE on\nnon-temporary tables. For temporary tables, no privilege is\nrequired, because such tables are only visible for the\ncurrent session.\n \nNote: DROP TABLE automatically commits the current active\ntransaction,\nunless you use the TEMPORARY keyword.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nDROP TABLE in replication\n \nDROP TABLE has the following characteristics in replication:\nDROP TABLE IF EXISTS are always logged.\nDROP TABLE without IF EXISTS for tables that don\'t exist\nare not written to the binary log.\nDropping of TEMPORARY tables are prefixed in the log with\nTEMPORARY. These drops are only logged when running\nstatement or mixed mode replication.\nOne DROP TABLE statement can be logged with up to 3\ndifferent DROP statements:\nDROP TEMPORARY TABLE\nlist_of_non_transactional_temporary_tables\nDROP TEMPORARY TABLE list_of_transactional_temporary_tables\nDROP TABLE list_of_normal_tables\n \nStarting from MariaDB 10.0.8, DROP TABLE on the master is\ntreated on the slave as DROP TABLE IF EXISTS. You can change\nthat by setting slave-ddl-exec-mode to STRICT.\n \nDropping an Internal #sql-... Table\n \nIf the mysqld process is killed during an ALTER TABLE you\nmay find a table named #sql-... in your data directory. In\nMariaDB 10.3, InnoDB tables with this prefix will de deleted\nautomatically during startup.\nIn MariaDB 10.4 we will ensure that these temporary tables\nwill always be deleted automatically.\n \nIf you want to delete one of these tables explicitly you can\ndo so by using the following syntax:\n \nDROP TABLE `#mysql50##sql-...`;\n \nWhen running an ALTER TABLE…ALGORITHM=INPLACE that\nrebuilds the table, InnoDB will create an internal #sql-ib\ntable. For these tables, the .frm file will be called\nsomething else. In order to drop such a table after a server\ncrash, you must rename the #sql*.frm file to match the\n#sql-ib*.ibd file.\n \nDropping All Tables in a Database\n \nThe best way to drop all tables in a database is by\nexecuting DROP DATABASE, which will drop the database\nitself, and all tables in it.\n \nHowever, if you want to drop all tables in the database, but\nyou also want to keep the database itself and any other\nnon-table objects in it, then you would need to execute DROP\nTABLE to drop each individual table. You can construct these\nDROP TABLE commands by querying the TABLES table in the\ninformation_schema database. For example:\n \nSELECT CONCAT(\'DROP TABLE IF EXISTS `\', TABLE_SCHEMA,\n\'`.`\', TABLE_NAME, \'`;\')\nFROM information_schema.TABLES\nWHERE TABLE_SCHEMA = \'mydb\';\n \nExamples\n-------- \nDROP TABLE Employees, Customers;\n \nNotes\n \nBeware that DROP TABLE can drop both tables and sequences.\nThis is mainly done to allow old tools like mysqldump to\nwork with sequences.\n \n\n\nURL: https://mariadb.com/kb/en/drop-table/','','https://mariadb.com/kb/en/drop-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (679,39,'DROP TABLESPACE','The DROP TABLESPACE statement is not supported by MariaDB.\nIt was originally inherited from MySQL NDB Cluster. In MySQL\n5.7 and later, the statement is also supported for InnoDB.\nHowever, MariaDB has chosen not to include that specific\nfeature. See MDEV-19294 for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/drop-tablespace/','','https://mariadb.com/kb/en/drop-tablespace/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (680,39,'DROP TRIGGER','Syntax\n------ \nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n \nDescription\n----------- \nThis statement drops a trigger. The schema (database) name\nis optional. If the\nschema is omitted, the trigger is dropped from the default\nschema.\nIts use requires the TRIGGER privilege for the table\nassociated with the trigger.\n \nUse IF EXISTS to prevent an error from occurring for a\ntrigger that does not exist. A NOTE is generated for a\nnon-existent trigger\nwhen using IF EXISTS. See SHOW WARNINGS.\n \nNote: Triggers for a table are also dropped if you drop the\ntable.\n \nExamples\n-------- \nDROP TRIGGER test.example_trigger;\n \nUsing the IF EXISTS clause:\n \nDROP TRIGGER IF EXISTS test.example_trigger;\n \nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n \n+-------+------+------------------------+\n| Level | Code | Message |\n+-------+------+------------------------+\n| Note | 1360 | Trigger does not exist |\n+-------+------+------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-trigger/','','https://mariadb.com/kb/en/drop-trigger/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (681,39,'DROP VIEW','Syntax\n------ \nDROP VIEW [IF EXISTS]\n view_name [, view_name] ...\n [RESTRICT | CASCADE]\n \nDescription\n----------- \nDROP VIEW removes one or more views. You must have the DROP\nprivilege for\neach view. If any of the views named in the argument list do\nnot exist, MariaDB\nreturns an error indicating by name which non-existing views\nit was unable to\ndrop, but it also drops all of the views in the list that do\nexist.\n \nThe IF EXISTS clause prevents an error from occurring for\nviews that don\'t\nexist. When this clause is given, a NOTE is generated for\neach non-existent\nview. See SHOW WARNINGS.\n \nRESTRICT and CASCADE, if given, are parsed and ignored.\n \nIt is possible to specify view names as db_name.view_name.\nThis is useful to delete views from multiple databases with\none statement. See Identifier Qualifiers for details.\n \nThe DROP privilege is required to use DROP TABLE on\nnon-temporary tables. For temporary tables, no privilege is\nrequired, because such tables are only visible for the\ncurrent session.\n \nIf a view references another view, it will be possible to\ndrop the referenced view. However, the other view will\nreference a view which does not exist any more. Thus,\nquerying it will produce an error similar to the following:\n \nERROR 1356 (HY000): View \'db_name.view_name\' references\ninvalid table(s) or \ncolumn(s) or function(s) or definer/invoker of view lack\nrights to use them\n \nThis problem is reported in the output of CHECK TABLE.\n \nNote that it is not necessary to use DROP VIEW to replace an\nexisting view, because CREATE VIEW has an OR REPLACE clause.\n \nExamples\n-------- \nDROP VIEW v,v2;\n \nGiven views v and v2, but no view v3\n \nDROP VIEW v,v2,v3;\nERROR 1051 (42S02): Unknown table \'v3\'\n \nDROP VIEW IF EXISTS v,v2,v3;\nQuery OK, 0 rows affected, 1 warning (0.01 sec)\n \nSHOW WARNINGS;\n+-------+------+-------------------------+\n| Level | Code | Message |\n+-------+------+-------------------------+\n| Note | 1051 | Unknown table \'test.v3\' |\n+-------+------+-------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/drop-view/','','https://mariadb.com/kb/en/drop-view/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (682,39,'Invisible Columns','Invisible columns (sometimes also called hidden columns)\nfirst appeared in MariaDB 10.3.3.\n \nColumns can be given an INVISIBLE attribute in a CREATE\nTABLE or ALTER TABLE statement. These columns will then not\nbe listed in the results of a SELECT * statement, nor do\nthey need to be assigned a value in an INSERT statement,\nunless INSERT explicitly mentions them by name.\n \nSince SELECT * does not return the invisible columns, new\ntables or views created in this manner will have no trace of\nthe invisible columns. If specifically referenced in the\nSELECT statement, the columns will be brought into the\nview/new table, but the INVISIBLE attribute will not.\n \nInvisible columns can be declared as NOT NULL, but then\nrequire a DEFAULT value.\n \nIt is not possible for all columns in a table to be\ninvisible.\n \nExamples\n-------- \nCREATE TABLE t (x INT, y INT INVISIBLE, z INT INVISIBLE NOT\nNULL);\nERROR 4106 (HY000): Invisible column `z` must have a default\nvalue\n \nCREATE TABLE t (x INT, y INT INVISIBLE, z INT INVISIBLE NOT\nNULL DEFAULT 4);\n \nINSERT INTO t VALUES (1),(2);\n \nINSERT INTO t (x,y) VALUES (3,33);\n \nSELECT * FROM t;\n \n+------+\n| x |\n+------+\n| 1 |\n| 2 |\n| 3 |\n+------+\n \nSELECT x,y,z FROM t;\n \n+------+------+---+\n| x | y | z |\n+------+------+---+\n| 1 | NULL | 4 |\n| 2 | NULL | 4 |\n| 3 | 33 | 4 |\n+------+------+---+\n \nDESC t;\n \n+-------+---------+------+-----+---------+-----------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-----------+\n| x | int(11) | YES | | NULL | |\n| y | int(11) | YES | | NULL | INVISIBLE |\n| z | int(11) | NO | | 4 | INVISIBLE |\n+-------+---------+------+-----+---------+-----------+\n \nALTER TABLE t MODIFY x INT INVISIBLE, MODIFY y INT, MODIFY z\nINT NOT NULL DEFAULT 4;\n \nDESC t;\n \n+-------+---------+------+-----+---------+-----------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-----------+\n| x | int(11) | YES | | NULL | INVISIBLE |\n| y | int(11) | YES | | NULL | |\n| z | int(11) | NO | | 4 | |\n+-------+---------+------+-----+---------+-----------+\n \nCreating a view from a table with hidden columns:\n \nCREATE VIEW v1 AS SELECT * FROM t;\n \nDESC v1;\n \n+-------+---------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-------+\n| x | int(11) | YES | | NULL | |\n+-------+---------+------+-----+---------+-------+\n \nCREATE VIEW v2 AS SELECT x,y,z FROM t;\n \nDESC v2;\n \n+-------+---------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------+------+-----+---------+-------+\n| x | int(11) | YES | | NULL | |\n| y | int(11) | YES | | NULL | |\n| z | int(11) | NO | | 4 | |\n+-------+---------+------+-----+---------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/invisible-columns/','','https://mariadb.com/kb/en/invisible-columns/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (683,39,'MERGE','Description\n----------- \nThe MERGE storage engine, also known as the MRG_MyISAM\nengine, is a\ncollection of identical MyISAM tables that can be used as\none.\n\"Identical\" means that all tables have identical column\nand index\ninformation. You cannot merge MyISAM tables in which the\ncolumns are\nlisted in a different order, do not have exactly the same\ncolumns, or\nhave the indexes in different order. However, any or all of\nthe MyISAM\ntables can be compressed with myisampack. Columns names and\nindexes names can be different, as long as data types and\nNULL/NOT NULL clauses are the same. Differences in\ntable options such as AVG_ROW_LENGTH, MAX_ROWS, or PACK_KEYS\ndo not\nmatter.\n \nEach index in a MERGE table must match an index in\nunderlying MyISAM tables, but the opposite is not true.\nAlso, a MERGE table cannot have a PRIMARY KEY or UNIQUE\nindexes, because it cannot enforce uniqueness over all\nunderlying tables.\n \nThe following options are meaningful for MERGE tables:\nUNION. This option specifies the list of the underlying\nMyISAM tables. The list is enclosed between parentheses and\nseparated with commas.\nINSERT_METHOD. This options specifies whether, and how,\nINSERTs are allowed for the table. Allowed values are: NO\n(INSERTs are not allowed), FIRST (new rows will be written\ninto the first table specified in the UNION list), LAST (new\nrows will be written into the last table specified in the\nUNION list). The default value is NO.\n \nIf you define a MERGE table with a definition which is\ndifferent from the underlying MyISAM tables, or one of the\nunderlying tables is not MyISAM, the CREATE TABLE statement\nwill not return any error. But any statement which involves\nthe table will produce an error like the following:\n \nERROR 1168 (HY000): Unable to open underlying table which is\ndifferently defined \n or of non-MyISAM type or doesn\'t exist\n \nA CHECK TABLE will show more information about the problem.\n \nThe error is also produced if the table is properly define,\nbut an underlying table\'s definition changes at some point\nin time.\n \nIf you try to insert a new row into a MERGE table with\nINSERT_METHOD=NO, you will get an error like the following:\n \nERROR 1036 (HY000): Table \'tbl_name\' is read only\n \nIt is possible to build a MERGE table on MyISAM tables which\nhave one or more virtual columns. MERGE itself does not\nsupport virtual columns, thus such columns will be seen as\nregular columns. The data types and sizes will still need to\nbe identical, and they cannot be NOT NULL.\n \nExamples\n-------- \nCREATE TABLE t1 (\n a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n message CHAR(20)) ENGINE=MyISAM;\n \nCREATE TABLE t2 (\n a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n message CHAR(20)) ENGINE=MyISAM;\n \nINSERT INTO t1 (message) VALUES\n(\'Testing\'),(\'table\'),(\'t1\');\n \nINSERT INTO t2 (message) VALUES\n(\'Testing\'),(\'table\'),(\'t2\');\n \nCREATE TABLE total (\n a INT NOT NULL AUTO_INCREMENT,\n message CHAR(20), INDEX(a))\n ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;\n \nSELECT * FROM total;\n \n+---+---------+\n| a | message |\n+---+---------+\n| 1 | Testing |\n| 2 | table |\n| 3 | t1 |\n| 1 | Testing |\n| 2 | table |\n| 3 | t2 |\n+---+---------+\n \nIn the following example, we\'ll create three MyISAM tables,\nand then a MERGE table on them. However, one of them uses a\ndifferent data type for the column b, so a SELECT will\nproduce an error:\n \nCREATE TABLE t1 (\n a INT,\n b INT\n) ENGINE = MyISAM;\n \nCREATE TABLE t2 (\n a INT,\n b INT\n) ENGINE = MyISAM;\n \nCREATE TABLE t3 (\n a INT,\n b TINYINT\n) ENGINE = MyISAM;\n \nCREATE TABLE t_mrg (\n a INT,\n b INT\n) ENGINE = MERGE,UNION=(t1,t2,t3);\n \nSELECT * FROM t_mrg;\n \nERROR 1168 (HY000): Unable to open underlying table which is\ndifferently defined\n or of non-MyISAM type or doesn\'t exist\n \nTo find out what\'s wrong, we\'ll use a CHECK TABLE:\n \nCHECK TABLE t_mrg;\n \n+------------+-------+----------+-----------------------------------------------------------------------------------------------------+\n| Table | Op | Msg_type | Msg_text |\n+------------+-------+----------+-----------------------------------------------------------------------------------------------------+\n| test.t_mrg | check | Error | Table \'test.t3\' is\ndifferently defined or of non-MyISAM type or doesn\'t exist\n|\n| test.t_mrg | check | Error | Unable to open underlying\ntable which is differently defined or of non-MyISAM type or\ndoesn\'t exist |\n| test.t_mrg | check | error | Corrupt |\n+------------+-------+----------+-----------------------------------------------------------------------------------------------------+\n \nNow, we know that the problem is in t3\'s definition.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/merge/','','https://mariadb.com/kb/en/merge/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (684,39,'RENAME TABLE','Syntax\n------ \nRENAME TABLE tbl_name \n [WAIT n | NOWAIT]\n TO new_tbl_name\n [, tbl_name2 TO new_tbl_name2] ...\n \nDescription\n----------- \nThis statement renames one or more tables or views, but not\nthe privileges associated to them.\n \nThe rename operation is done atomically, which means that no\nother session can\naccess any of the tables while the rename is running. For\nexample, if you have\nan existing table old_table, you can create another table\nnew_table that has the same structure but is empty, and then\nreplace the existing table with the empty one as follows\n(assuming that\nbackup_table does not already exist):\n \nCREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO\nold_table;\n \ntbl_name can optionally be specified as db_name.tbl_name.\nSee Identifier Qualifiers. This allows to use RENAME to move\na table from a database to another (as long as they are on\nthe same filesystem):\n \nRENAME TABLE db1.t TO db2.t;\n \nNote that moving a table to another database is not possible\nif it has some triggers. Trying to do so produces the\nfollowing error:\n \nERROR 1435 (HY000): Trigger in wrong schema\n \nAlso, views cannot be moved to another database:\n \nERROR 1450 (HY000): Changing schema from \'old_db\' to\n\'new_db\' is not allowed.\n \nIf a RENAME TABLE renames more than one table and one\nrenaming fails, all renames executed by the same statement\nare rolled back.\n \nRenames are always executed in the specified order. Knowing\nthis, it is also possible to swap two tables\' names:\n \nRENAME TABLE t1 TO tmp_table,\n t2 TO t1,\n tmp_table TO t2;\n \nPrivileges\n \nExecuting the RENAME TABLE statement requires the DROP,\nCREATE and INSERT privileges for the table or the database.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/rename-table/','','https://mariadb.com/kb/en/rename-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (685,39,'Silent Column Changes','When a CREATE TABLE or ALTER TABLE command is issued,\nMariaDB will silently change a column specification in the\nfollowing cases:\nPRIMARY KEY columns are always NOT NULL.\nAny trailing spaces from SET and ENUM values are discarded.\nTIMESTAMP columns are always NOT NULL, and display sizes are\ndiscarded\nA row-size limit of 65535 bytes applies\nIf strict SQL mode is not enabled, a VARCHAR column longer\nthan 65535 become TEXT, and a VARBINARY columns longer than\n65535 becomes a BLOB. If strict mode is enabled the silent\nchanges will not be made, and an error will occur.\nIf a USING clause specifies an index that\'s not permitted\nby the storage engine, the engine will instead use another\navailable index type that can be applied without affecting\nresults.\nIf the CHARACTER SET binary attribute is specified, the\ncolumn is created as the matching binary data type. A TEXT\nbecomes a BLOB, CHAR a BINARY and VARCHAR a VARBINARY. ENUMs\nand SETs are created as defined.\n \nTo ease imports from other RDBMS\'s, MariaDB will also\nsilently map the following data types:\n \nOther Vendor Type | MariaDB Type | \n \nBOOL | TINYINT | \n \nBOOLEAN | TINYINT | \n \nCHARACTER VARYING(M) | VARCHAR(M) | \n \nFIXED | DECIMAL | \n \nFLOAT4 | FLOAT | \n \nFLOAT8 | DOUBLE | \n \nINT1 | TINYINT | \n \nINT2 | SMALLINT | \n \nINT3 | MEDIUMINT | \n \nINT4 | INT | \n \nINT8 | BIGINT | \n \nLONG VARBINARY | MEDIUMBLOB | \n \nLONG VARCHAR | MEDIUMTEXT | \n \nLONG | MEDIUMTEXT | \n \nMIDDLEINT | MEDIUMINT | \n \nNUMERIC | DECIMAL | \n \nCurrently, all MySQL types are supported in MariaDB.\n \nFor type mapping between Cassandra and MariaDB, see\nCassandra storage engine.\n \nExample\n \nSilent changes in action:\n \nCREATE TABLE SilenceIsGolden\n (\n f1 TEXT CHARACTER SET binary,\n f2 VARCHAR(15) CHARACTER SET binary,\n f3 CHAR CHARACTER SET binary,\n f4 ENUM(\'x\',\'y\',\'z\') CHARACTER SET binary,\n f5 VARCHAR (65536),\n f6 VARBINARY (65536),\n f7 INT1\n );\nQuery OK, 0 rows affected, 2 warnings (0.31 sec)\n \nSHOW WARNINGS;\n \n+-------+------+-----------------------------------------------+\n| Level | Code | Message |\n+-------+------+-----------------------------------------------+\n| Note | 1246 | Converting column \'f5\' from VARCHAR to\nTEXT |\n| Note | 1246 | Converting column \'f6\' from VARBINARY to\nBLOB |\n+-------+------+-----------------------------------------------+\n \nDESCRIBE SilenceIsGolden;\n \n+-------+-------------------+------+-----+---------+-------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+-------------------+------+-----+---------+-------+\n| f1 | blob | YES | | NULL | |\n| f2 | varbinary(15) | YES | | NULL | |\n| f3 | binary(1) | YES | | NULL | |\n| f4 | enum(\'x\',\'y\',\'z\') | YES | | NULL | |\n| f5 | mediumtext | YES | | NULL | |\n| f6 | mediumblob | YES | | NULL | |\n| f7 | tinyint(4) | YES | | NULL | |\n+-------+-------------------+------+-----+---------+-------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/silent-column-changes/','','https://mariadb.com/kb/en/silent-column-changes/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (686,39,'TRUNCATE TABLE','Syntax\n------ \nTRUNCATE [TABLE] tbl_name\n [WAIT n | NOWAIT]\n \nDescription\n----------- \nTRUNCATE TABLE empties a table completely. It requires the\nDROP privilege. See GRANT.\n \ntbl_name can also be specified in the form db_name.tbl_name\n(see Identifier Qualifiers).\n \nLogically, TRUNCATE TABLE is equivalent to a DELETE\nstatement that deletes all rows, but there are practical\ndifferences under some circumstances.\n \nTRUNCATE TABLE will fail for an InnoDB table if any FOREIGN\nKEY constraints from other tables reference the table,\nreturning the error:\n \nERROR 1701 (42000): Cannot truncate a table referenced in a\nforeign key constraint\n \nForeign Key constraints between columns in the same table\nare permitted.\n \nFor an InnoDB table, if there are no FOREIGN KEY\nconstraints, InnoDB performs fast truncation by dropping the\noriginal table and creating an empty one with the same\ndefinition, which is much faster than deleting rows one by\none. The AUTO_INCREMENT counter is reset by TRUNCATE TABLE,\nregardless of whether there is a FOREIGN KEY constraint.\n \nThe count of rows affected by TRUNCATE TABLE is accurate\nonly\nwhen it is mapped to a DELETE statement.\n \nFor other storage engines, TRUNCATE TABLE differs from\nDELETE in the following ways:\nTruncate operations drop and re-create the table, which is\nmuch\n faster than deleting rows one by one, particularly for\nlarge tables.\nTruncate operations cause an implicit commit.\nTruncation operations cannot be performed if the session\nholds an\n active table lock.\nTruncation operations do not return a meaningful value for\nthe number\n of deleted rows. The usual result is \"0 rows affected,\"\nwhich should\n be interpreted as \"no information.\"\nAs long as the table format file tbl_name.frm is valid, the\n table can be re-created as an empty table\n with TRUNCATE TABLE, even if the data or index files have\nbecome\n corrupted.\nThe table handler does not remember the last\n used AUTO_INCREMENT value, but starts counting\n from the beginning. This is true even for MyISAM and\nInnoDB, which normally\n do not reuse sequence values.\nWhen used with partitioned tables, TRUNCATE TABLE preserves\n the partitioning; that is, the data and index files are\ndropped and\n re-created, while the partition definitions (.par) file is\n unaffected.\nSince truncation of a table does not make any use of DELETE,\n the TRUNCATE statement does not invoke ON DELETE triggers.\nTRUNCATE TABLE will only reset the values in the Performance\nSchema summary tables to zero or null, and will not remove\nthe rows.\n \nFor the purposes of binary logging and replication, TRUNCATE\nTABLE is treated as DROP TABLE followed by CREATE TABLE (DDL\nrather than DML).\n \nTRUNCATE TABLE does not work on views. Currently, TRUNCATE\nTABLE drops all historical records from a system-versioned\ntable.\n \nWAIT/NOWAIT\n \nSet the lock wait timeout. See WAIT and NOWAIT.\n \nOracle-mode\n \nOracle-mode from MariaDB 10.3 permits the optional keywords\nREUSE STORAGE or DROP STORAGE to be used.\n \nTRUNCATE [TABLE] tbl_name [{DROP | REUSE} STORAGE]\n \nThese have no effect on the operation.\n \nPerformance\n \nTRUNCATE TABLE is faster than DELETE, because it drops and\nre-creates a table.\n \nWith XtraDB/InnoDB, TRUNCATE TABLE is slower if\ninnodb_file_per_table=ON is set (the default since MariaDB\n5.5). This is because TRUNCATE TABLE unlinks the underlying\ntablespace file, which can be an expensive operation. See\nMDEV-8069 for more details.\n \nThe performance issues with innodb_file_per_table=ON can be\nexacerbated in cases where the InnoDB buffer pool is very\nlarge and innodb_adaptive_hash_index=ON is set. In that\ncase, using DROP TABLE followed by CREATE TABLE instead of\nTRUNCATE TABLE may perform better. Setting\ninnodb_adaptive_hash_index=OFF can also help. In MariaDB\n10.2.19 and later, this performance can also be improved by\nsetting innodb_safe_truncate=OFF. See MDEV-9459 for more\ndetails.\n \nSetting innodb_adaptive_hash_index=OFF can also improve\nTRUNCATE TABLE performance in general. See MDEV-16796 for\nmore details.\n \n\n\nURL: https://mariadb.com/kb/en/truncate-table/','','https://mariadb.com/kb/en/truncate-table/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (687,39,'Generated (Virtual and Persistent/Stored) Columns','Syntax\n------ \n [GENERATED ALWAYS] AS ( )\n[VIRTUAL | PERSISTENT | STORED] [UNIQUE] [UNIQUE KEY]\n[COMMENT ]\n \nMariaDB\'s generated columns syntax is designed to be\nsimilar to the syntax for Microsoft SQL Server\'s computed\ncolumns and Oracle Database\'s virtual columns. In MariaDB\n10.2 and later, the syntax is also compatible with the\nsyntax for MySQL\'s generated columns.\n \nDescription\n----------- \nA generated column is a column in a table that cannot\nexplicitly be set to a specific value in a DML query.\nInstead, its value is automatically generated based on an\nexpression. This expression might generate the value based\non the values of other columns in the table, or it might\ngenerate the value by calling built-in functions or\nuser-defined functions (UDFs).\n \nThere are two types of generated columns:\nPERSISTENT or STORED: This type\'s value is actually stored\nin the table.\nVIRTUAL: This type\'s value is not stored at all. Instead,\nthe value is generated dynamically when the table is\nqueried. This type is the default.\n \nGenerated columns are also sometimes called computed columns\nor virtual columns.\n \nSupported Features\n \nStorage Engine Support\n \nGenerated columns can only be used with storage engines\nwhich support them. If you try to use a storage engine that\ndoes not support them, then you will see an error similar to\nthe following:\n \nERROR 1910 (HY000): TokuDB storage engine does not support\ncomputed columns\nInnoDB, Aria, MyISAM and CONNECT support generated columns.\n \nA column in a MERGE table can be built on a PERSISTENT\ngenerated column.\nHowever, a column in a MERGE table can not be defined as a\nVIRTUAL and PERSISTENT generated column.\n \n\nData Type Support\n \nAll data types are supported when defining generated\ncolumns.\n \nUsing the ZEROFILL column option is supported when defining\ngenerated columns.\n \nIn MariaDB 10.2.6 and later, the following statements apply\nto data types for generated columns:\nUsing the AUTO_INCREMENT column option is not supported when\ndefining generated columns. Previously, it was supported,\nbut this support was removed, because it would not work\ncorrectly. See MDEV-11117.\n \nIndex Support\n \nUsing a generated column as a table\'s primary key is not\nsupported. See MDEV-5590 for more information. If you try to\nuse one as a primary key, then you will see an error similar\nto the following:\n \nERROR 1903 (HY000): Primary key cannot be defined upon a\ncomputed column\nUsing PERSISTENT generated columns as part of a foreign key\nis supported.\n \nReferencing PERSISTENT generated columns as part of a\nforeign key is also supported.\nHowever, using the ON UPDATE CASCADE, ON UPDATE SET NULL, or\nON DELETE SET NULL clauses is not supported. If you try to\nuse an unsupported clause, then you will see an error\nsimilar to the following:\n \nERROR 1905 (HY000): Cannot define foreign key with ON UPDATE\nSET NULL clause on a computed column\n \nIn MariaDB 10.2.3 and later, the following statements apply\nto indexes for generated columns:\nDefining indexes on both VIRTUAL and PERSISTENT generated\ncolumns is supported.\nIf an index is defined on a generated column, then the\noptimizer considers using it in the same way as indexes\nbased on \"real\" columns.\n \n\nMariaDB until 10.2.2\n \nIn MariaDB 10.2.2 and before, the following statements apply\nto indexes for generated columns:\nDefining indexes on VIRTUAL generated columns is not\nsupported.\n \nDefining indexes on PERSISTENT generated columns is\nsupported.\nIf an index is defined on a generated column, then the\noptimizer considers using it in the same way as indexes\nbased on \"real\" columns.\n \n\nStatement Support\n \nGenerated columns are used in DML queries just as if they\nwere \"real\" columns.\nHowever, VIRTUAL and PERSISTENT generated columns differ in\nhow their data is stored.\nValues for PERSISTENT generated columns are generated\nwhenever a DML queries inserts or updates the row with the\nspecial DEFAULT value. This generates the columns value, and\nit is stored in the table like the other \"real\" columns.\nThis value can be read by other DML queries just like the\nother \"real\" columns.\nValues for VIRTUAL generated columns are not stored in the\ntable. Instead, the value is generated dynamically whenever\nthe column is queried. If other columns in a row are\nqueried, but the VIRTUAL generated column is not one of the\nqueried columns, then the column\'s value is not generated.\n \nThe SELECT statement supports generated columns.\n \nGenerated columns can be referenced in the INSERT, UPDATE,\nand DELETE statements.\nHowever, VIRTUAL or PERSISTENT generated columns cannot be\nexplicitly set to any other values than NULL or DEFAULT. If\na generated column is explicitly set to any other value,\nthen the outcome depends on whether strict mode is enabled\nin SQL_MODE. If it is not enabled, then a warning will be\nraised and the default generated value will be used instead.\nIf it is enabled, then an error will be raised instead.\n \nThe CREATE TABLE statement has limited support for generated\ncolumns.\nIt supports defining generated columns in a new table.\nIt supports using generated columns to partition tables.\nIt does not support using the versioning clauses with\ngenerated columns.\n \nThe ALTER TABLE statement has limited support for generated\ncolumns.\nIt supports the MODIFY and CHANGE clauses for PERSISTENT\ngenerated columns.\nIt does not support the MODIFY clause for VIRTUAL generated\ncolumns if ALGORITHM is not set to COPY. See MDEV-15476 for\nmore information.\nIt does not support the CHANGE clause for VIRTUAL generated\ncolumns if ALGORITHM is not set to COPY. See MDEV-17035 for\nmore information.\nIt does not support altering a table if ALGORITHM is not set\nto COPY if the table has a VIRTUAL generated column that is\nindexed. See MDEV-14046 for more information.\nIt does not support adding a VIRTUAL generated column with\nthe ADD clause if the same statement is also adding other\ncolumns if ALGORITHM is not set to COPY. See MDEV-17468 for\nmore information.\nIt also does not support altering an existing column into a\nVIRTUAL generated column.\nIt supports using generated columns to partition tables.\nIt does not support using the versioning clauses with\ngenerated columns.\n \nThe SHOW CREATE TABLE statement supports generated columns.\n \nThe DESCRIBE statement can be used to check whether a table\nhas generated columns.\nYou can tell which columns are generated by looking for the\nones where the Extra column is set to either VIRTUAL or\nPERSISTENT. For example:\n \nDESCRIBE table1;\n \n+-------+-------------+------+-----+---------+------------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+-------------+------+-----+---------+------------+\n| a | int(11) | NO | | NULL | |\n| b | varchar(32) | YES | | NULL | |\n| c | int(11) | YES | | NULL | VIRTUAL |\n| d | varchar(5) | YES | | NULL | PERSISTENT |\n+-------+-------------+------+-----+---------+------------+\nGenerated columns can be properly referenced in the NEW and\nOLD rows in triggers.\n \nStored procedures support generated columns.\n \nThe HANDLER statement supports generated columns.\n \nExpression Support\n \nMost legal, deterministic expressions which can be\ncalculated are supported in expressions for generated\ncolumns.\n \nMost built-in functions are supported in expressions for\ngenerated columns.\nHowever, some built-in functions can\'t be supported for\ntechnical reasons. For example, If you try to use an\nunsupported function in an expression, then you will see an\nerror similar to the following:\n \nERROR 1901 (HY000): Function or expression \'dayname()\'\ncannot be used in the GENERATED ALWAYS AS clause of `v`\nSubqueries are not supported in expressions for generated\ncolumns because the underlying data can change.\n \nUsing anything that depends on data outside the row is not\nsupported in expressions for generated columns.\n \nStored functions are not supported in expressions for\ngenerated columns. See MDEV-17587 for more information.\n \nIn MariaDB 10.2.1 and later, the following statements apply\nto expressions for generated columns:\nNon-deterministic built-in functions are supported in\nexpressions for PERSISTENT generated columns.\nIf a non-deterministic function is used for a PERSISTENT\ngenerated column, then any changes made to this table should\nbe logged to the binary log in the row-based logging format\nwhen the binlog_format system variable is set to MIXED.\nHowever, this does not always happen. Therefore, it is\nrecommended to set the binlog_format system variable to ROW.\nSee MDEV-10436 for more information.\n \nNon-deterministic built-in functions are not supported in\nexpressions for VIRTUAL generated columns.\n \nUser-defined functions (UDFs) are supported in expressions\nfor generated columns.\nHowever, MariaDB can\'t check whether a UDF is\ndeterministic, so it is up to the user to be sure that they\ndo not use non-deterministic UDFs with VIRTUAL generated\ncolumns.\n \nDefining a generated column based on other generated columns\ndefined before it in the table definition is supported. For\nexample:\n \nCREATE TABLE t1 (a int as (1), b int as (a));\nHowever, defining a generated column based on other\ngenerated columns defined after in the table definition is\nnot supported in expressions for generation columns because\ngenerated columns are calculated in the order they are\ndefined.\n \nUsing an expression that exceeds 255 characters in length is\nsupported in expressions for generated columns. The new\nlimit for the entire table definition, including all\nexpressions for generated columns, is 65,535 bytes.\n \nUsing constant expressions is supported in expressions for\ngenerated columns. For example:\n \nCREATE TABLE t1 (a int as (1));\n \nMariaDB until 10.2.0\n \nIn MariaDB 10.2.0 and before, the following statements apply\nto expressions for generated columns:\nNon-deterministic built-in functions are not supported in\nexpressions for generated columns.\n \nUser-defined functions (UDFs) are not supported in\nexpressions for generated columns.\n \nDefining a generated column based on other generated columns\ndefined in the table is not supported. Otherwise, it would\ngenerate errors like this:\n \nERROR 1900 (HY000): A computed column cannot be based on a\ncomputed column\nUsing an expression that exceeds 255 characters in length is\nnot supported in expressions for generated columns.\n \nUsing constant expressions is not supported in expressions\nfor generated columns. Otherwise, it would generate errors\nlike this:\n \nERROR 1908 (HY000): Constant expression in computed column\nfunction is not allowed\n \nMySQL Compatibility Support\n \nIn MariaDB 10.2.1 and later, the following statements apply\nto MySQL compatibility for generated columns:\nThe STORED keyword is supported as an alias for the\nPERSISTENT keyword.\n \nTables created with MySQL 5.7 or later that contain MySQL\'s\ngenerated columns can be imported into MariaDB without a\ndump and restore.\n \nMariaDB until 10.2.0\n \nIn MariaDB 10.2.0 and before, the following statements apply\nto MySQL compatibility for generated columns:\nThe STORED keyword is not supported as an alias for the\nPERSISTENT keyword.\n \nTables created with MySQL 5.7 or later that contain MySQL\'s\ngenerated columns can not be imported into MariaDB without a\ndump and restore.\n \nImplementation Differences\n \nGenerated columns are subject to various constraints in\nother DBMSs that are not present in MariaDB\'s\nimplementation. Generated columns may also be called\ncomputed columns or virtual columns in different\nimplementations. The various details for a specific\nimplementation can be found in the documentation for each\nspecific DBMS.\n \nImplementation Differences Compared to Microsoft SQL Server\n \nMariaDB\'s generated columns implementation does not enforce\nthe following\nrestrictions that are present in Microsoft SQL Server\'s\ncomputed columns implementation:\nMariaDB allows server variables in generated column\nexpressions, including those that change dynamically, such\nas warning_count.\nMariaDB allows the CONVERT_TZ() function to be called with a\nnamed time zone as an argument, even though time zone names\nand time offsets are configurable.\nMariaDB allows the CAST() function to be used with\nnon-unicode character sets, even though character sets are\nconfigurable and differ between binaries/versions.\nMariaDB allows FLOAT expressions to be used in generated\ncolumns. Microsoft SQL Server considers these expressions to\nbe \"imprecise\" due to potential cross-platform differences\nin floating-point implementations and precision.\nMicrosoft SQL Server requires the ARITHABORT mode to be set,\nso that division by zero returns an error, and not a NULL.\nMicrosoft SQL Server requires QUOTED_IDENTIFIER to be set in\nSQL_MODE. In MariaDB, if data is inserted without\nANSI_QUOTES set in SQL_MODE, then it will be processed and\nstored differently in a generated column that contains\nquoted identifiers.\nIn MariaDB 10.2.0 and before, it does not allow user-defined\nfunctions (UDFs) to be used in expressions for generated\ncolumns.\n \nMicrosoft SQL Server enforces the above restrictions by\ndoing one of the following things:\nRefusing to create computed columns.\nRefusing to allow updates to a table containing them.\nRefusing to use an index over such a column if it can not be\nguaranteed that the expression is fully deterministic.\n \nIn MariaDB, as long as the SQL_MODE, language, and other\nsettings that were in effect during the CREATE TABLE remain\nunchanged, the generated column expression will always be\nevaluated the same. If any of these things change, then\nplease be aware that the generated column expression might\nnot be\nevaluated the same way as it previously was.\n \nIn MariaDB 5.2, you will get a warning if you try to update\na virtual column. In MariaDB 5.3 and later, this warning\nwill be converted to an error if strict mode is enabled in\nSQL_MODE.\n \nDevelopment History\n \nGenerated columns was originally developed by Andrey Zhakov.\nIt was then modified by Sanja Byelkin and Igor Babaev at\nMonty Program for inclusion in MariaDB. Monty did the work\non MariaDB 10.2 to lift a some of the old limitations.\n \nExamples\n-------- \nHere is an example table that uses both VIRTUAL and\nPERSISTENT virtual columns:\n \nUSE TEST;\n \nCREATE TABLE table1 (\n a INT NOT NULL,\n b VARCHAR(32),\n c INT AS (a mod 10) VIRTUAL,\n d VARCHAR(5) AS (left(b,5)) PERSISTENT);\n \nIf you describe the table, you can easily see which columns\nare virtual by\nlooking in the \"Extra\" column:\n \nDESCRIBE table1;\n \n+-------+-------------+------+-----+---------+------------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+-------------+------+-----+---------+------------+\n| a | int(11) | NO | | NULL | |\n| b | varchar(32) | YES | | NULL | |\n| c | int(11) | YES | | NULL | VIRTUAL |\n| d | varchar(5) | YES | | NULL | PERSISTENT |\n+-------+-------------+------+-----+---------+------------+\n \nTo find out what function(s) generate the value of the\nvirtual column you can use SHOW CREATE TABLE:\n \nSHOW CREATE TABLE table1;\n \n| table1 | CREATE TABLE `table1` (\n `a` int(11) NOT NULL,\n `b` varchar(32) DEFAULT NULL,\n `c` int(11) AS (a mod 10) VIRTUAL,\n `d` varchar(5) AS (left(b,5)) PERSISTENT\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 |\n \nIf you try to insert non-default values into a virtual\ncolumn, you will receive\na warning and what you tried to insert will be ignored and\nthe derived value\ninserted instead:\n \nWARNINGS;\nShow warnings enabled.\n \nINSERT INTO table1 VALUES (1, \'some\ntext\',default,default);\nQuery OK, 1 row affected (0.00 sec)\n \nINSERT INTO table1 VALUES (2, \'more text\',5,default);\nQuery OK, 1 row affected, 1 warning (0.00 sec)\n \nWarning (Code 1645): The value specified for computed column\n\'c\' in table \'table1\' has been ignored.\n \nINSERT INTO table1 VALUES (123, \'even more\ntext\',default,\'something\');\nQuery OK, 1 row affected, 2 warnings (0.00 sec)\n \nWarning (Code 1645): The value specified for computed column\n\'d\' in table \'table1\' has been ignored.\nWarning (Code 1265): Data truncated for column \'d\' at row\n1\n \nSELECT * FROM table1;\n+-----+----------------+------+-------+\n| a | b | c | d |\n+-----+----------------+------+-------+\n| 1 | some text | 1 | some |\n| 2 | more text | 2 | more |\n| 123 | even more text | 3 | even |\n+-----+----------------+------+-------+\n3 rows in set (0.00 sec)\n \nIf the ZEROFILL clause is specified, it should be placed\ndirectly after the type definition, before the AS ():\n \nCREATE TABLE table2 (a INT, b INT ZEROFILL AS (a*2)\nVIRTUAL);\nINSERT INTO table2 (a) VALUES (1);\n \nSELECT * FROM table2;\n \n+------+------------+\n| a | b |\n+------+------------+\n| 1 | 0000000002 |\n+------+------------+\n1 row in set (0.00 sec)\n \nYou can also use virtual columns to implement a \"poor\nman\'s partial index\". See example at the end of Unique\nIndex.\n \n\n\nURL: https://mariadb.com/kb/en/generated-columns/','','https://mariadb.com/kb/en/generated-columns/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (688,40,'LASTVAL','LASTVAL is a synonym for PREVIOUS VALUE for sequence_name.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/lastval/','','https://mariadb.com/kb/en/lastval/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (689,40,'NEXT VALUE for sequence_name','SEQUENCEs were introduced in MariaDB 10.3\n \nSyntax\n------ \nNEXT VALUE FOR sequence\n \nor\n \nNEXTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.nextval\n \nNEXT VALUE FOR is ANSI SQL syntax while NEXTVAL() is\nPostgreSQL syntax.\n \nDescription\n----------- \nGenerate next value for a SEQUENCE.\nYou can greatly speed up NEXT VALUE by creating the sequence\nwith the CACHE option. If not, every NEXT VALUE usage will\ncause changes in the stored SEQUENCE table.\nWhen using NEXT VALUE the value will be reserved at once and\nwill not be reused, except if the SEQUENCE was created with\nCYCLE. This means that when you are using SEQUENCEs you have\nto expect gaps in the generated sequence numbers.\nIf one updates the SEQUENCE with SETVAL() or ALTER SEQUENCE\n... RESTART, NEXT VALUE FOR will notice this and start from\nthe next requested value.\nFLUSH TABLES will close the sequence and the next sequence\nnumber generated will be according to what\'s stored in the\nSEQUENCE object. In effect, this will discard the cached\nvalues.\nNEXT VALUE requires the INSERT privilege.\n \nYou can also use NEXT VALUE FOR sequence for column DEFAULT.\n \n\n\nURL: https://mariadb.com/kb/en/next-value-for-sequence_name/','','https://mariadb.com/kb/en/next-value-for-sequence_name/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (690,40,'NEXTVAL','NEXTVAL is a synonym for NEXT VALUE for sequence_name.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/nextval/','','https://mariadb.com/kb/en/nextval/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (691,40,'PREVIOUS VALUE FOR sequence_name','SEQUENCEs were introduced in MariaDB 10.3.\n \nSyntax\n------ \nPREVIOUS VALUE FOR sequence_name\n \nor\n \nLASTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.currval\n \nPREVIOUS VALUE FOR is IBM DB2 syntax while LASTVAL() is\nPostgreSQL syntax.\n \nDescription\n----------- \nGet last value in the current connection generated from a\nsequence.\nIf the sequence has not yet been used by the connection,\nPREVIOUS VALUE FOR returns NULL\nIf a SEQUENCE has been dropped and re-created then it\'s\ntreated as a new SEQUENCE and PREVIOUS VALUE FOR will return\nNULL.\nFLUSH TABLES has no effect on PREVIOUS VALUE FOR.\nPrevious values for all used sequences are stored per\nconnection until connection ends.\n \nPREVIOUS VALUE FOR requires the SELECT privilege.\n \nExample\n \nSELECT PREVIOUS VALUE FOR s;\n \n+----------------------+\n| PREVIOUS VALUE FOR s |\n+----------------------+\n| 100 |\n+----------------------+\n \n\n\nURL:\nhttps://mariadb.com/kb/en/previous-value-for-sequence_name/','','https://mariadb.com/kb/en/previous-value-for-sequence_name/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (692,40,'Sequence Overview','Sequences were introduced in MariaDB 10.3.\n \nIntroduction\n \nA sequence is an object that generates a sequence of numeric\nvalues, as specified by the CREATE SEQUENCE statement. \n \nCREATE SEQUENCE will create a sequence that generates new\nvalues when called with NEXT VALUE FOR sequence_name. It\'s\nan alternative to AUTO INCREMENT when one wants to have more\ncontrol of how the numbers are generated. As the SEQUENCE\ncaches values (up to the CACHE value in the CREATE SEQUENCE\nstatement, by default 1000) it can in some cases be much\nfaster than AUTO INCREMENT. Another benefit is that one can\naccess the last value generated by all used sequences, which\nsolves one of the limitations with LAST_INSERT_ID().\n \nCreating a Sequence\n \nThe CREATE SEQUENCE statement is used to create a sequence.\nHere is an example of a sequence starting at 100,\nincrementing by 10 each time:\n \nCREATE SEQUENCE s START WITH 100 INCREMENT BY 10;\n \nThe CREATE SEQUENCE statement, along with defaults, can be\nviewd with the SHOW CREATE SEQUENCE STATEMENT, for example:\n \nSHOW CREATE SEQUENCE s\\G\n*************************** 1. row\n***************************\n Table: s\nCreate Table: CREATE SEQUENCE `s` start with 100 minvalue 1\nmaxvalue 9223372036854775806 \n increment by 10 cache 1000 nocycle ENGINE=InnoDB\n \nUsing Sequence Objects\n \nTo get the next value from a sequence, use\n \nNEXT VALUE FOR sequence_name\n \nor\n \nNEXTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.nextval\n \nFor retrieving the last value used by the current connection\nfrom a sequence\nuse:\n \nPREVIOUS VALUE FOR sequence_name\n \nor\n \nLASTVAL(sequence_name)\n \nor in Oracle mode (SQL_MODE=ORACLE)\n \nsequence_name.currval\n \nFor example:\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 100 |\n+------------+\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 110 |\n+------------+\n \nSELECT LASTVAL(s);\n+------------+\n| LASTVAL(s) |\n+------------+\n| 110 |\n+------------+\n \nUsing Sequences in DEFAULT\n \nStarting from 10.3.3 you can use Sequences in DEFAULT:\n \ncreate sequence s1;\n \ncreate table t1 (a int primary key default (next value for\ns1), b int);\ninsert into t1 (b) values (1),(2);\nselect * from t1;\n \n+---+------+\n| a | b |\n+---+------+\n| 1 | 1 |\n| 2 | 2 |\n+---+------+\n \nChanging a Sequence\n \nThe ALTER SEQUENCE statement is used for changing sequences.\nFor example, to restart the sequence at another value:\n \nALTER SEQUENCE s RESTART 50;\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 50 |\n+------------+\n \nThe SETVAL function can also be used to set the next value\nto be returned for a SEQUENCE, for example:\n \nSELECT SETVAL(s, 100);\n+----------------+\n| SETVAL(s, 100) |\n+----------------+\n| 100 |\n+----------------+\n \nSETVAL can only be used to increase the sequence value.\nAttempting to set a lower value will fail, returning NULL:\n \nSELECT SETVAL(s, 50);\n+---------------+\n| SETVAL(s, 50) |\n+---------------+\n| NULL |\n+---------------+\n \nDropping a Sequence\n \nThe DROP SEQUENCE statement is used to drop a sequence, for\nexample:\n \nDROP SEQUENCE s;\n \nReplication\n \nIf one wants to use Sequences in a master-master setup or\nwith Galera one\nshould use INCREMENT=0. This will tell the Sequence to use\nauto_increment_increment and auto_increment_offset to\ngenerate unique values for each server.\n \nStandards Compliance\n \nMariaDB 10.3 supports both ANSI SQL and Oracle syntax for\nsequences.\n \nHowever as SEQUENCE is implemented as a special kind of\ntable, it uses the same namespace as tables. The benefits\nare that sequences show up in SHOW TABLES, and one can also\ncreate a sequence with CREATE TABLE and drop it with DROP\nTABLE. One can SELECT from it as from any other table. This\nensures that all old tools that work with tables should work\nwith sequences.\n \nSince sequence objects act as regular tables in many\ncontexts, they will be affected by LOCK TABLES. This is not\nthe case in other DBMS, such as Oracle, where LOCK TABLE\ndoes not affect sequences.\n \nNotes\n \nOne of the goals with the Sequence implementation is that\nall old\ntools, such as mysqldump, should work unchanged, while still\nkeeping the\nnormal usage of sequence standard compatibly.\n \nTo make this possible, sequence is currently implemented as\na table with a few exclusive properties.\n \nThe special properties for sequence tables are:\nA sequence table has always one row.\nWhen one creates a sequence, either with CREATE TABLE or\nCREATE SEQUENCE, one row will be inserted.\nIf one tries to insert into a sequence table, the single row\nwill be updated. This allows mysqldump to work but also\ngives the additional benefit that one can change all\nproperties of a sequence with a single insert. New\napplications should of course also use ALTER SEQUENCE.\nUPDATE or DELETE can\'t be performed on Sequence objects.\nDoing a select on the sequence shows the current state of\nthe sequence, except the values that are reserved in the\ncache. The next_value column shows the next value not\nreserved by the cache.\nFLUSH TABLES will close the sequence and the next sequence\nnumber generated will be according to what\'s stored in the\nSequence object. In effect, this will discard the cached\nvalues.\nA number of normal table operations work on Sequence tables.\nSee next section.\n \nTable Operations that Work with Sequences\n \nSHOW CREATE TABLE sequence_name. This shows the table\nstructure that is behind the SEQUENCE including the field\nnames that can be used with SELECT or even CREATE TABLE.\nCREATE TABLE sequence-structure ... SEQUENCE=1\nALTER TABLE sequence RENAME TO sequence2\nRENAME TABLE sequence_name TO new_sequence_name\nDROP TABLE sequence_name. This is allowed mainly to get old\ntools like mysqldump to work with sequence tables.\nSHOW TABLES\n \nImplementation\n \nInternally, sequence tables are created as a normal table\nwithout\nrollback (the InnoDB, Aria and MySAM engines support this),\nwrapped by a\nsequence engine object. This allowed us to create sequences\nwith\nalmost no performance impact for normal tables. (The cost is\none \'if\'\nper insert if the binary log is enabled).\n \nUnderlying Table Structure\n \nThe following example shows the table structure of sequences\nand how it\ncan be used as a table.\n(Output of results are slightly edited to make them easier\nto read)\n \ncreate sequence t1;\nshow create sequence t1\\G\n***** 1. row *****\n CREATE SEQUENCE `t1` start with 1 minvalue 1 maxvalue\n9223372036854775806\n increment by 1 cache 1000 nocycle ENGINE=InnoDB\n \nshow create table t1\\G\n***** 1. row *****\nCreate Table: CREATE TABLE `t1` (\n `next_not_cached_value` bigint(21) NOT NULL,\n `minimum_value` bigint(21) NOT NULL,\n `maximum_value` bigint(21) NOT NULL,\n `start_value` bigint(21) NOT NULL COMMENT \'start value\nwhen sequences is created or value if RESTART is used\',\n `increment` bigint(21) NOT NULL COMMENT \'increment\nvalue\',\n `cache_size` bigint(21) unsigned NOT NULL,\n `cycle_option` tinyint(1) unsigned NOT NULL COMMENT \'0 if\nno cycles are allowed, 1 if the sequence should begin a new\ncycle when maximum_value is passed\',\n `cycle_count` bigint(21) NOT NULL COMMENT \'How many cycles\nhave been done\'\n) ENGINE=InnoDB SEQUENCE=1\n \nselect * from t1\\G\nnext_not_cached_value: 1\n minimum_value: 1\n maximum_value: 9223372036854775806\n start_value: 1\n increment: 1\n cache_size: 1000\n cycle_option: 0\n cycle_count: 0\nThe cycle_count column is incremented every time the\nsequence wraps around.\n \nCredits\n \nThanks to Jianwe Zhao from Aliyun for his work on SEQUENCE\nin AliSQL, which gave ideas and inspiration for this work.\nThanks to Peter Gulutzan,who helped test and gave useful\ncomments about the implementation.\n \n\n\nURL: https://mariadb.com/kb/en/sequence-overview/','','https://mariadb.com/kb/en/sequence-overview/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (693,40,'SETVAL()','SEQUENCEs were introduced in MariaDB 10.3.\n \nSyntax\n------ \nSETVAL(sequence_name, next_value, [is_used, [round]])\n \nDescription\n----------- \nSet the next value to be returned for a SEQUENCE.\n \nThis function is compatible with PostgreSQL syntax, extended\nwith the round argument.\n \nIf the is_used argument is not given or is 1 or true, then\nthe next used value will\none after the given value. If is_used is 0 or false then the\nnext generated value\nwill be the given value.\n \nIf round is used then it will set the round value (or the\ninternal cycle count, starting at zero) for the sequence.\nIf round is not used, it\'s assumed to be 0.\n \nnext_value must be an integer literal.\n \nFor SEQUENCE tables defined with CYCLE (see CREATE SEQUENCE)\none should use both next_value and round to define the next\nvalue. In this case the\ncurrent sequence value is defined to be round, next_value.\n \nThe result returned by SETVAL() is next_value or NULL if the\ngiven next_value and round is smaller than the current\nvalue.\n \nSETVAL() will not set the SEQUENCE value to a something that\nis less than\nits current value. This is needed to ensure that SETVAL()\nis replication safe. If you want to set the SEQUENCE to a\nsmaller number\nuse ALTER SEQUENCE.\n \nIf CYCLE is used, first round and then next_value are\ncompared\nto see if the value is bigger than the current value.\n \nInternally, in the MariaDB server, SETVAL() is used to\ninform\nslaves that a SEQUENCE has changed value. The slave may get\nSETVAL() statements out of order, but this is ok as only the\nbiggest one will have an effect.\n \nSETVAL requires the INSERT privilege.\n \nExamples\n-------- \nSELECT setval(foo, 42); -- Next nextval will return 43\nSELECT setval(foo, 42, true); -- Same as above\nSELECT setval(foo, 42, false); -- Next nextval will return\n42\n \nSETVAL setting higher and lower values on a sequence with an\nincrement of 10:\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 50 |\n+------------+\n \nSELECT SETVAL(s, 100);\n+----------------+\n| SETVAL(s, 100) |\n+----------------+\n| 100 |\n+----------------+\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 110 |\n+------------+\n \nSELECT SETVAL(s, 50);\n+---------------+\n| SETVAL(s, 50) |\n+---------------+\n| NULL |\n+---------------+\n \nSELECT NEXTVAL(s);\n+------------+\n| NEXTVAL(s) |\n+------------+\n| 120 |\n+------------+\n \nExample demonstrating round:\n \nCREATE OR REPLACE SEQUENCE s1\n START WITH 1\n MINVALUE 1\n MAXVALUE 99\n INCREMENT BY 1 \n CACHE 20 \n CYCLE;\n \nSELECT SETVAL(s1, 99, 1, 0);\n+----------------------+\n| SETVAL(s1, 99, 1, 0) |\n+----------------------+\n| 99 |\n+----------------------+\n \nSELECT NEXTVAL(s1);\n+-------------+\n| NEXTVAL(s1) |\n+-------------+\n| 1 |\n+-------------+\n \nThe following statement returns NULL, as the given\nnext_value and round is smaller than the current value.\n \nSELECT SETVAL(s1, 99, 1, 0);\n+----------------------+\n| SETVAL(s1, 99, 1, 0) |\n+----------------------+\n| NULL |\n+----------------------+\n \nSELECT NEXTVAL(s1);\n+-------------+\n| NEXTVAL(s1) |\n+-------------+\n| 2 |\n+-------------+\n \nIncreasing the round from zero to 1 will allow next_value to\nbe returned.\n \nSELECT SETVAL(s1, 99, 1, 1);\n+----------------------+\n| SETVAL(s1, 99, 1, 1) |\n+----------------------+\n| 99 |\n+----------------------+\n \nSELECT NEXTVAL(s1);\n+-------------+\n| NEXTVAL(s1) |\n+-------------+\n| 1 |\n+-------------+\n \n\n\nURL: https://mariadb.com/kb/en/setval/','','https://mariadb.com/kb/en/setval/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (694,41,'Differences between JSON_QUERY and JSON_VALUE','JSON functions were added in MariaDB 10.2.3.\n \nThe primary difference between the two functions is that\nJSON_QUERY returns an object or an array, while JSON_VALUE\nreturns a scalar. \n \nTake the following JSON document as an example\n \nSET @json=\'{ \"x\": [0,1], \"y\": \"[0,1]\", \"z\":\n\"Monty\" }\';\n \nNote that data member \"x\" is an array, and data members\n\"y\" and \"z\" are strings. The following examples\ndemonstrate the differences between the two functions.\n \nSELECT JSON_QUERY(@json,\'$\'), JSON_VALUE(@json,\'$\');\n+--------------------------------------------+-----------------------+\n| JSON_QUERY(@json,\'$\') | JSON_VALUE(@json,\'$\') |\n+--------------------------------------------+-----------------------+\n| { \"x\": [0,1], \"y\": \"[0,1]\", \"z\": \"Monty\" } |\nNULL |\n+--------------------------------------------+-----------------------+\n \nSELECT JSON_QUERY(@json,\'$.x\'), JSON_VALUE(@json,\'$.x\');\n+-------------------------+-------------------------+\n| JSON_QUERY(@json,\'$.x\') | JSON_VALUE(@json,\'$.x\') |\n+-------------------------+-------------------------+\n| [0,1] | NULL |\n+-------------------------+-------------------------+\n \nSELECT JSON_QUERY(@json,\'$.y\'), JSON_VALUE(@json,\'$.y\');\n+-------------------------+-------------------------+\n| JSON_QUERY(@json,\'$.y\') | JSON_VALUE(@json,\'$.y\') |\n+-------------------------+-------------------------+\n| NULL | [0,1] |\n+-------------------------+-------------------------+\n \nSELECT JSON_QUERY(@json,\'$.z\'), JSON_VALUE(@json,\'$.z\');\n+-------------------------+-------------------------+\n| JSON_QUERY(@json,\'$.z\') | JSON_VALUE(@json,\'$.z\') |\n+-------------------------+-------------------------+\n| NULL | Monty |\n+-------------------------+-------------------------+\n \nSELECT JSON_QUERY(@json,\'$.x[0]\'),\nJSON_VALUE(@json,\'$.x[0]\');\n+----------------------------+----------------------------+\n| JSON_QUERY(@json,\'$.x[0]\') |\nJSON_VALUE(@json,\'$.x[0]\') |\n+----------------------------+----------------------------+\n| NULL | 0 |\n+----------------------------+----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/differences-between-json_query-and-json_value/','','https://mariadb.com/kb/en/differences-between-json_query-and-json_value/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (695,41,'JSON_ARRAY','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_ARRAY([value[, value2] ...])\n \nDescription\n----------- \nReturns a JSON array containing the listed values. The list\ncan be empty.\n \nExample\n \nSELECT Json_Array(56, 3.1416, \'My name is \"Foo\"\', NULL);\n+--------------------------------------------------+\n| Json_Array(56, 3.1416, \'My name is \"Foo\"\', NULL) |\n+--------------------------------------------------+\n| [56, 3.1416, \"My name is \\\"Foo\\\"\", null] |\n+--------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_array/','','https://mariadb.com/kb/en/json_array/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (696,41,'JSON_ARRAY_APPEND','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_ARRAY_APPEND(json_doc, path, value[, path, value] ...)\n \nDescription\n----------- \nAppends values to the end of the specified arrays within a\nJSON document, returning the result, or NULL if any of the\narguments are NULL.\n \nEvaluation is performed from left to right, with the\nresulting document from the previous pair becoming the new\nvalue against which the next pair is evaluated.\n \nIf the json_doc is not a valid JSON document, or if any of\nthe paths are not valid, or contain a * or ** wildcard, an\nerror is returned.\n \nExamples\n-------- \nSET @json = \'[1, 2, [3, 4]]\';\n \nSELECT JSON_ARRAY_APPEND(@json, \'$[0]\', 5)\n+-------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$[0]\', 5) |\n+-------------------------------------+\n| [[1, 5], 2, [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_APPEND(@json, \'$[1]\', 6);\n+-------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$[1]\', 6) |\n+-------------------------------------+\n| [1, [2, 6], [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_APPEND(@json, \'$[1]\', 6, \'$[2]\', 7);\n+------------------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$[1]\', 6, \'$[2]\', 7) |\n+------------------------------------------------+\n| [1, [2, 6], [3, 4, 7]] |\n+------------------------------------------------+\n \nSELECT JSON_ARRAY_APPEND(@json, \'$\', 5);\n+----------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$\', 5) |\n+----------------------------------+\n| [1, 2, [3, 4], 5] |\n+----------------------------------+\n \nSET @json = \'{\"A\": 1, \"B\": [2], \"C\": [3, 4]}\';\n \nSELECT JSON_ARRAY_APPEND(@json, \'$.B\', 5);\n+------------------------------------+\n| JSON_ARRAY_APPEND(@json, \'$.B\', 5) |\n+------------------------------------+\n| {\"A\": 1, \"B\": [2, 5], \"C\": [3, 4]} |\n+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_array_append/','','https://mariadb.com/kb/en/json_array_append/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (697,41,'JSON_ARRAY_INSERT','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_ARRAY_INSERT(json_doc, path, value[, path, value] ...)\n \nDescription\n----------- \nInserts a value into a JSON document, returning the modified\ndocument, or NULL if any of the arguments are NULL.\n \nEvaluation is performed from left to right, with the\nresulting document from the previous pair becoming the new\nvalue against which the next pair is evaluated.\n \nIf the json_doc is not a valid JSON document, or if any of\nthe paths are not valid, or contain a * or ** wildcard, an\nerror is returned.\n \nExamples\n-------- \nSET @json = \'[1, 2, [3, 4]]\';\n \nSELECT JSON_ARRAY_INSERT(@json, \'$[0]\', 5);\n+-------------------------------------+\n| JSON_ARRAY_INSERT(@json, \'$[0]\', 5) |\n+-------------------------------------+\n| [5, 1, 2, [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_INSERT(@json, \'$[1]\', 6);\n+-------------------------------------+\n| JSON_ARRAY_INSERT(@json, \'$[1]\', 6) |\n+-------------------------------------+\n| [1, 6, 2, [3, 4]] |\n+-------------------------------------+\n \nSELECT JSON_ARRAY_INSERT(@json, \'$[1]\', 6, \'$[2]\', 7);\n+------------------------------------------------+\n| JSON_ARRAY_INSERT(@json, \'$[1]\', 6, \'$[2]\', 7) |\n+------------------------------------------------+\n| [1, 6, 7, 2, [3, 4]] |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_array_insert/','','https://mariadb.com/kb/en/json_array_insert/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (698,41,'JSON_COMPACT','This function was added in MariaDB 10.2.4.\n \nSyntax\n------ \nJSON_COMPACT(json_doc)\n \nDescription\n----------- \nRemoves all unnecessary spaces so the json document is as\nshort as possible.\n \nExample\n \nSET @j = \'{ \"A\": 1, \"B\": [2, 3]}\';\n \nSELECT JSON_COMPACT(@j), @j;\n+-------------------+------------------------+\n| JSON_COMPACT(@j) | @j |\n+-------------------+------------------------+\n| {\"A\":1,\"B\":[2,3]} | { \"A\": 1, \"B\": [2, 3]} |\n+-------------------+------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_compact/','','https://mariadb.com/kb/en/json_compact/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (699,41,'JSON_CONTAINS','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_CONTAINS(json_doc, val[, path])\n \nDescription\n----------- \nReturns whether or not the specified value is found in the\ngiven JSON document or, optionally, at the specified path\nwithin the document. Returns 1 if it does, 0 if not and NULL\nif any of the arguments are null. An error occurs if the\ndocument or path is not valid, or contains the * or **\nwildcards.\n \nExamples\n-------- \nSET @json = \'{\"A\": 0, \"B\": {\"C\": 1}, \"D\": 2}\';\n \nSELECT JSON_CONTAINS(@json, \'2\', \'$.A\');\n+----------------------------------+\n| JSON_CONTAINS(@json, \'2\', \'$.A\') |\n+----------------------------------+\n| 0 |\n+----------------------------------+\n \nSELECT JSON_CONTAINS(@json, \'2\', \'$.D\');\n+----------------------------------+\n| JSON_CONTAINS(@json, \'2\', \'$.D\') |\n+----------------------------------+\n| 1 |\n+----------------------------------+\n \nSELECT JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.A\');\n+-----------------------------------------+\n| JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.A\') |\n+-----------------------------------------+\n| 0 |\n+-----------------------------------------+\n \nSELECT JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.B\');\n+-----------------------------------------+\n| JSON_CONTAINS(@json, \'{\"C\": 1}\', \'$.B\') |\n+-----------------------------------------+\n| 1 |\n+-----------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_contains/','','https://mariadb.com/kb/en/json_contains/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (700,41,'JSON_CONTAINS_PATH','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_CONTAINS_PATH(json_doc, return_arg, path[, path] ...)\n \nDescription\n----------- \nIndicates whether the given JSON document contains data at\nthe specified path or paths. Returns 1 if it does, 0 if not\nand NULL if any of the arguments are null.\n \nThe return_arg can be one or all:\none - Returns 1 if at least one path exists within the JSON\ndocument. \nall - Returns 1 only if all paths exist within the JSON\ndocument.\n \nExamples\n-------- \nSET @json = \'{\"A\": 1, \"B\": [2], \"C\": [3, 4]}\';\n \nSELECT JSON_CONTAINS_PATH(@json, \'one\', \'$.A\', \'$.D\');\n+------------------------------------------------+\n| JSON_CONTAINS_PATH(@json, \'one\', \'$.A\', \'$.D\') |\n+------------------------------------------------+\n| 1 |\n+------------------------------------------------+\n1 row in set (0.00 sec)\n \nSELECT JSON_CONTAINS_PATH(@json, \'all\', \'$.A\', \'$.D\');\n+------------------------------------------------+\n| JSON_CONTAINS_PATH(@json, \'all\', \'$.A\', \'$.D\') |\n+------------------------------------------------+\n| 0 |\n+------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_contains_path/','','https://mariadb.com/kb/en/json_contains_path/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (701,41,'JSON_DEPTH','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_DEPTH(json_doc)\n \nDescription\n----------- \nReturns the maximum depth of the given JSON document, or\nNULL if the argument is null. An error will occur if the\nargument is an invalid JSON document.\nScalar values or empty arrays or objects have a depth of 1.\nArrays or objects that are not empty but contain only\nelements or member values of depth 1 will have a depth of 2.\nIn other cases, the depth will be greater than 2.\n \nExamples\n-------- \nSELECT JSON_DEPTH(\'[]\'), JSON_DEPTH(\'true\'),\nJSON_DEPTH(\'{}\');\n+------------------+--------------------+------------------+\n| JSON_DEPTH(\'[]\') | JSON_DEPTH(\'true\') |\nJSON_DEPTH(\'{}\') |\n+------------------+--------------------+------------------+\n| 1 | 1 | 1 |\n+------------------+--------------------+------------------+\n \nSELECT JSON_DEPTH(\'[1, 2, 3]\'), JSON_DEPTH(\'[[], {},\n[]]\');\n+-------------------------+----------------------------+\n| JSON_DEPTH(\'[1, 2, 3]\') | JSON_DEPTH(\'[[], {}, []]\') |\n+-------------------------+----------------------------+\n| 2 | 2 |\n+-------------------------+----------------------------+\n \nSELECT JSON_DEPTH(\'[1, 2, [3, 4, 5, 6], 7]\');\n+---------------------------------------+\n| JSON_DEPTH(\'[1, 2, [3, 4, 5, 6], 7]\') |\n+---------------------------------------+\n| 3 |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_depth/','','https://mariadb.com/kb/en/json_depth/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (702,41,'JSON_DETAILED','This function was added in MariaDB 10.2.4.\n \nSyntax\n------ \nJSON_DETAILED(json_doc[, tab_size])\n \nDescription\n----------- \nRepresents JSON in the most understandable way emphasizing\nnested structures.\n \nExample\n \nSET @j = \'{ \"A\":1,\"B\":[2,3]}\';\n \nSELECT @j;\n+--------------------+\n| @j |\n+--------------------+\n| { \"A\":1,\"B\":[2,3]} |\n+--------------------+\n \nSELECT JSON_DETAILED(@j);\n+------------------------------------------------------------+\n| JSON_DETAILED(@j) |\n+------------------------------------------------------------+\n| {\n \"A\": 1,\n \"B\": \n [\n 2,\n 3\n ]\n} |\n+------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_detailed/','','https://mariadb.com/kb/en/json_detailed/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (703,41,'JSON_EXISTS','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nDescription\n----------- \nDetermines whether a specified JSON value exists in the\ngiven data. Returns 1 if found, 0 if not, or NULL if any of\nthe inputs were NULL.\n \nExamples\n-------- \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key2\");\n+------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key2\") |\n+------------------------------------------------------------+\n| 1 |\n+------------------------------------------------------------+\n \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key3\");\n+------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key3\") |\n+------------------------------------------------------------+\n| 0 |\n+------------------------------------------------------------+\n \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key2[1]\");\n+---------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key2[1]\") |\n+---------------------------------------------------------------+\n| 1 |\n+---------------------------------------------------------------+\n \nSELECT JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2,\n3]}\', \"$.key2[10]\");\n+----------------------------------------------------------------+\n| JSON_EXISTS(\'{\"key1\":\"xxxx\", \"key2\":[1, 2, 3]}\',\n\"$.key2[10]\") |\n+----------------------------------------------------------------+\n| 0 |\n+----------------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_exists/','','https://mariadb.com/kb/en/json_exists/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (704,41,'JSON_EXTRACT','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_EXTRACT(json_doc, path[, path] ...)\n \nDescription\n----------- \nExtracts data from a JSON document. The extracted data is\nselected from the parts matching the path arguments. Returns\nall matched values; either as a single matched value, or, if\nthe arguments could return multiple values, a result\nautowrapped as an array in the matching order.\n \nReturns NULL if no paths match or if any of the arguments\nare NULL. \n \nAn error will occur if any path argument is not a valid\npath, or if the json_doc argument is not a valid JSON\ndocument.\n \nExamples\n-------- \nSET @json = \'[1, 2, [3, 4]]\';\n \nSELECT JSON_EXTRACT(@json, \'$[1]\');\n+-----------------------------+\n| JSON_EXTRACT(@json, \'$[1]\') |\n+-----------------------------+\n| 2 |\n+-----------------------------+\n \nSELECT JSON_EXTRACT(@json, \'$[2]\');\n+-----------------------------+\n| JSON_EXTRACT(@json, \'$[2]\') |\n+-----------------------------+\n| [3, 4] |\n+-----------------------------+\n \nSELECT JSON_EXTRACT(@json, \'$[2][1]\');\n+--------------------------------+\n| JSON_EXTRACT(@json, \'$[2][1]\') |\n+--------------------------------+\n| 4 |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_extract/','','https://mariadb.com/kb/en/json_extract/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (705,41,'JSON_INSERT','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_INSERT(json_doc, path, val[, path, val] ...)\n \nDescription\n----------- \nInserts data into a JSON document, returning the resulting\ndocument or NULL if any argument is null. \n \nAn error will occur if the JSON document is not invalid, or\nif any of the paths are invalid or contain a * or **\nwildcard.\n \nJSON_INSERT can only insert data while JSON_REPLACE can only\nupdate. JSON_SET can update or insert data. \n \nExamples\n-------- \nSET @json = \'{ \"A\": 0, \"B\": [1, 2]}\';\n \nSELECT JSON_INSERT(@json, \'$.C\', \'[3, 4]\');\n+--------------------------------------+\n| JSON_INSERT(@json, \'$.C\', \'[3, 4]\') |\n+--------------------------------------+\n| { \"A\": 0, \"B\": [1, 2], \"C\":\"[3, 4]\"} |\n+--------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_insert/','','https://mariadb.com/kb/en/json_insert/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (706,41,'JSON_KEYS','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_KEYS(json_doc[, path])\n \nDescription\n----------- \nReturns the keys as a JSON array from the top-level value of\na JSON object or, if the optional path argument is provided,\nthe top-level keys from the path. \n \nExcludes keys from nested sub-objects in the top level\nvalue. The resulting array will be empty if the selected\nobject is empty.\n \nReturns NULL if any of the arguments are null, a given path\ndoes not locate an object, or if the json_doc argument is\nnot an object.\n \nAn error will occur if JSON document is invalid, the path is\ninvalid or if the path contains a * or ** wildcard.\n \nExamples\n-------- \nSELECT JSON_KEYS(\'{\"A\": 1, \"B\": {\"C\": 2}}\');\n+--------------------------------------+\n| JSON_KEYS(\'{\"A\": 1, \"B\": {\"C\": 2}}\') |\n+--------------------------------------+\n| [\"A\", \"B\"] |\n+--------------------------------------+\n \nSELECT JSON_KEYS(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\":\n3}}\', \'$.C\');\n+-----------------------------------------------------+\n| JSON_KEYS(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\": 3}}\',\n\'$.C\') |\n+-----------------------------------------------------+\n| [\"D\"] |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_keys/','','https://mariadb.com/kb/en/json_keys/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (707,41,'JSON_LENGTH','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_LENGTH(json_doc[, path])\n \nDescription\n----------- \nReturns the length of a JSON document, or, if the optional\npath argument is given, the length of the value within the\ndocument specified by the path. \n \nReturns NULL if any of the arguments argument are null or\nthe path argument does not identify a value in the document.\n\n \nAn error will occur if the JSON document is invalid, the\npath is invalid or if the path contains a * or ** wildcard.\n \nLength will be determined as follow:\nA scalar\'s length is always 1.\nIf an array, the number of elements in the array.\nIf an object, the number of members in the object.\n \nThe length of nested arrays or objects are not counted.\n \nExamples\n-------- \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_length/','','https://mariadb.com/kb/en/json_length/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (708,41,'JSON_LOOSE','This function was added in MariaDB 10.2.4.\n \nSyntax\n------ \nJSON_LOOSE(json_doc)\n \nDescription\n----------- \nAdds spaces to a JSON document to make it look more\nreadable.\n \nExample\n \nSET @j = \'{ \"A\":1,\"B\":[2,3]}\';\n \nSELECT JSON_LOOSE(@j), @j;\n+-----------------------+--------------------+\n| JSON_LOOSE(@j) | @j |\n+-----------------------+--------------------+\n| {\"A\": 1, \"B\": [2, 3]} | { \"A\":1,\"B\":[2,3]} |\n+-----------------------+--------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_loose/','','https://mariadb.com/kb/en/json_loose/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (709,41,'JSON_MERGE','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_MERGE(json_doc, json_doc[, json_doc] ...)\n \nDescription\n----------- \nMerges the given JSON documents.\n \nReturns the merged result,or NULL if any argument is NULL.\n \nAn error occurs if any of the arguments are not valid JSON\ndocuments.\n \nJSON_MERGE has been deprecated since MariaDB 10.2.25,\nMariaDB 10.3.16 and MariaDB 10.4.5. JSON_MERGE_PATCH is an\nRFC 7396-compliant replacement, and JSON_MERGE_PRESERVE is a\nsynonym.\n \nExample\n \nSET @json1 = \'[1, 2]\';\n \nSET @json2 = \'[3, 4]\';\n \nSELECT JSON_MERGE(@json1,@json2);\n+---------------------------+\n| JSON_MERGE(@json1,@json2) |\n+---------------------------+\n| [1, 2, 3, 4] |\n+---------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/json_merge/','','https://mariadb.com/kb/en/json_merge/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (710,41,'JSON_MERGE_PATCH','JSON_MERGE_PATCH was introduced in MariaDB 10.2.25, MariaDB\n10.3.16 and MariaDB 10.4.5.\n \nSyntax\n------ \nJSON_MERGE_PATCH(json_doc, json_doc[, json_doc] ...)\n \nDescription\n----------- \nMerges the given JSON documents, returning the merged\nresult, or NULL if any argument is NULL.\n \nJSON_MERGE_PATCH is an RFC 7396-compliant replacement for\nJSON_MERGE, which has been deprecated.\n \nExample\n \nSET @json1 = \'[1, 2]\';\n \nSET @json2 = \'[2, 3]\';\n \nSELECT\nJSON_MERGE_PATCH(@json1,@json2),JSON_MERGE_PRESERVE(@json1,@json2);\n+---------------------------------+------------------------------------+\n| JSON_MERGE_PATCH(@json1,@json2) |\nJSON_MERGE_PRESERVE(@json1,@json2) |\n+---------------------------------+------------------------------------+\n| [2, 3] | [1, 2, 2, 3] |\n+---------------------------------+------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_merge_patch/','','https://mariadb.com/kb/en/json_merge_patch/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (711,41,'JSON_MERGE_PRESERVE','JSON_MERGE_PRESERVE was introduced in MariaDB 10.2.25,\nMariaDB 10.3.16 and MariaDB 10.4.5.\n \nSyntax\n------ \nJSON_MERGE_PRESERVE(json_doc, json_doc[, json_doc] ...)\n \nDescription\n----------- \nMerges the given JSON documents, returning the merged\nresult, or NULL if any argument is NULL.\n \nJSON_MERGE_PRESERVE was introduced in MariaDB 10.2.25,\nMariaDB 10.3.16 and MariaDB 10.4.5 as a synonym for\nJSON_MERGE, which has been deprecated.\n \nExample\n \nSET @json1 = \'[1, 2]\';\n \nSET @json2 = \'[2, 3]\';\n \nSELECT\nJSON_MERGE_PATCH(@json1,@json2),JSON_MERGE_PRESERVE(@json1,@json2);\n+---------------------------------+------------------------------------+\n| JSON_MERGE_PATCH(@json1,@json2) |\nJSON_MERGE_PRESERVE(@json1,@json2) |\n+---------------------------------+------------------------------------+\n| [2, 3] | [1, 2, 2, 3] |\n+---------------------------------+------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/json_merge_preserve/','','https://mariadb.com/kb/en/json_merge_preserve/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (712,41,'JSON_OBJECT','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_OBJECT([key, value[, key, value] ...])\n \nDescription\n----------- \nReturns a JSON object containing the given key/value pairs.\nThe key/value list can be empty.\n \nAn error will occur if there are an odd number of arguments,\nor any key name is NULL.\n \nExample\n \nSELECT JSON_OBJECT(\"id\", 1, \"name\", \"Monty\");\n+---------------------------------------+\n| JSON_OBJECT(\"id\", 1, \"name\", \"Monty\") |\n+---------------------------------------+\n| {\"id\": 1, \"name\": \"Monty\"} |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_object/','','https://mariadb.com/kb/en/json_object/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (713,41,'JSON_QUERY','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_QUERY(json_doc, path)\n \nDescription\n----------- \nGiven a JSON document, returns an object or array specified\nby the path. Returns NULL if not given a valid JSON\ndocument, or if there is no match.\n \nExamples\n-------- \nselect json_query(\'{\"key1\":{\"a\":1, \"b\":[1,2]}}\',\n\'$.key1\');\n+-----------------------------------------------------+\n| json_query(\'{\"key1\":{\"a\":1, \"b\":[1,2]}}\',\n\'$.key1\') |\n+-----------------------------------------------------+\n| {\"a\":1, \"b\":[1,2]} |\n+-----------------------------------------------------+\n \nselect json_query(\'{\"key1\":123, \"key1\": [1,2,3]}\',\n\'$.key1\');\n+-------------------------------------------------------+\n| json_query(\'{\"key1\":123, \"key1\": [1,2,3]}\',\n\'$.key1\') |\n+-------------------------------------------------------+\n| [1,2,3] |\n+-------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_query/','','https://mariadb.com/kb/en/json_query/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (714,41,'JSON_QUOTE','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_QUOTE(json_value)\n \nDescription\n----------- \nQuotes a string as a JSON value, usually for producing valid\nJSON string literals for inclusion in JSON documents. Wraps\nthe string with double quote characters and escapes interior\nquotes and other special characters, returning a utf8mb4\nstring. \n \nReturns NULL if the argument is NULL.\n \nExamples\n-------- \nSELECT JSON_QUOTE(\'A\'), JSON_QUOTE(\"B\"),\nJSON_QUOTE(\'\"C\"\');\n+-----------------+-----------------+-------------------+\n| JSON_QUOTE(\'A\') | JSON_QUOTE(\"B\") |\nJSON_QUOTE(\'\"C\"\') |\n+-----------------+-----------------+-------------------+\n| \"A\" | \"B\" | \"\\\"C\\\"\" |\n+-----------------+-----------------+-------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_quote/','','https://mariadb.com/kb/en/json_quote/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (715,41,'JSON_REMOVE','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_REMOVE(json_doc, path[, path] ...)\n \nDescription\n----------- \nRemoves data from a JSON document returning the result, or\nNULL if any of the arguments are null. If the element does\nnot exist in the document, no changes are made.\n \nAn error will occur if JSON document is invalid, the path is\ninvalid or if the path contains a * or ** wildcard.\n \nPath arguments are evaluated from left to right, with the\nresult from the earlier evaluation being used as the value\nfor the next.\n \nExamples\n-------- \nSELECT JSON_REMOVE(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\":\n3}}\', \'$.C\');\n+-------------------------------------------------------+\n| JSON_REMOVE(\'{\"A\": 1, \"B\": 2, \"C\": {\"D\": 3}}\',\n\'$.C\') |\n+-------------------------------------------------------+\n| {\"A\": 1, \"B\": 2} |\n+-------------------------------------------------------+\n \nSELECT JSON_REMOVE(\'[\"A\", \"B\", [\"C\", \"D\"],\n\"E\"]\', \'$[1]\');\n+----------------------------------------------------+\n| JSON_REMOVE(\'[\"A\", \"B\", [\"C\", \"D\"], \"E\"]\',\n\'$[1]\') |\n+----------------------------------------------------+\n| [\"A\", [\"C\", \"D\"], \"E\"] |\n+----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_remove/','','https://mariadb.com/kb/en/json_remove/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (716,41,'JSON_REPLACE','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_REPLACE(json_doc, path, val[, path, val] ...)\n \nDescription\n----------- \nReplaces existing values in a JSON document, returning the\nresult, or NULL if any of the arguments are NULL. \n \nAn error will occur if the JSON document is invalid, the\npath is invalid or if the path contains a * or ** wildcard.\n \nPaths and values are evaluated from left to right, with the\nresult from the earlier evaluation being used as the value\nfor the next.\n \nJSON_REPLACE can only update data, while JSON_INSERT can\nonly insert. JSON_SET can update or insert data. \n \nExamples\n-------- \nSELECT JSON_REPLACE(\'{ \"A\": 1, \"B\": [2, 3]}\',\n\'$.B[1]\', 4);\n+-----------------------------------------------------+\n| JSON_REPLACE(\'{ \"A\": 1, \"B\": [2, 3]}\', \'$.B[1]\',\n4) |\n+-----------------------------------------------------+\n| { \"A\": 1, \"B\": [2, 4]} |\n+-----------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_replace/','','https://mariadb.com/kb/en/json_replace/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (717,41,'JSON_SEARCH','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_SEARCH(json_doc, return_arg, search_str[, escape_char[,\npath] ...])\n \nDescription\n----------- \nReturns the path to the given string within a JSON document,\nor NULL if any of json_doc, search_str or a path argument is\nNULL; if the search string is not found, or if no path\nexists within the document. \n \nA warning will occur if the JSON document is not valid, any\nof the path arguments are not valid, if return_arg is\nneither one nor all, or if the escape character is not a\nconstant. NULL will be returned.\n \nreturn_arg can be one of two values:\n\'one: Terminates after finding the first match, so will\nreturn one path string. If there is more than one match, it\nis undefined which is considered first.\nall: Returns all matching path strings, without duplicates.\nMultiple strings are autowrapped as an array. The order is\nundefined.\n \nExamples\n-------- \nSET @json = \'[\"A\", [{\"B\": \"1\"}], {\"C\":\"AB\"},\n{\"D\":\"BC\"}]\';\n \nSELECT JSON_SEARCH(@json, \'one\', \'AB\');\n+---------------------------------+\n| JSON_SEARCH(@json, \'one\', \'AB\') |\n+---------------------------------+\n| \"$[2].C\" |\n+---------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_search/','','https://mariadb.com/kb/en/json_search/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (718,41,'JSON_SET','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_SET(json_doc, path, val[, path, val] ...)\n \nDescription\n----------- \nUpdates or inserts data into a JSON document, returning the\nresult, or NULL if any of the arguments are NULL or the\noptional path fails to find an object.\n \nAn error will occur if the JSON document is invalid, the\npath is invalid or if the path contains a * or wildcard.\n \nJSON_SET can update or insert data, while JSON_REPLACE can\nonly update, and JSON_INSERT only insert. \n \nExamples\n-------- \n\n \n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_set/','','https://mariadb.com/kb/en/json_set/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (719,41,'JSON_TYPE','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_TYPE(json_val)\n \nDescription\n----------- \nReturns the type of a JSON value, or NULL if the argument is\nnull.\n \nAn error will occur if the argument is an invalid JSON\nvalue.\n \nThe following is a complete list of the possible return\ntypes:\n \nReturn type | Value | \n \nARRAY | JSON array | \n \nBIT | MariaDB BIT scalar | \n \nBLOB | MariaDB binary types (BINARY, VARBINARY or BLOB) | \n \nBOOLEAN | JSON true/false literals | \n \nDATE | MariaDB DATE scalar | \n \nDATETIME | MariaDB DATETIME or TIMESTAMP scalar | \n \nDECIMAL | MariaDB DECIMAL or NUMERIC scalar | \n \nDOUBLE | MariaDB DOUBLE FLOAT scalar | \n \nINTEGER | MariaDB integer types (TINYINT, SMALLINT,\nMEDIUMINT, INT or BIGINT) | \n \nNULL | JSON null literal or NULL argument | \n \nOBJECT | JSON object | \n \nOPAQUE | Any valid JSON value that is not one of the other\ntypes. | \n \nSTRING | MariaDB character types (CHAR, VARCHAR, TEXT, ENUM\nor SET) | \n \nTIME | MariaDB TIME scalar | \n \nExamples\n-------- \nSELECT JSON_TYPE(\'{\"A\": 1, \"B\": 2, \"C\": 3}\');\n+---------------------------------------+\n| JSON_TYPE(\'{\"A\": 1, \"B\": 2, \"C\": 3}\') |\n+---------------------------------------+\n| OBJECT |\n+---------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_type/','','https://mariadb.com/kb/en/json_type/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (720,41,'JSON_UNQUOTE','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_UNQUOTE(val)\n \nDescription\n----------- \nUnquotes a JSON value, returning a string, or NULL if the\nargument is null. \n \nAn error will occur if the given value begins and ends with\ndouble quotes and is an invalid JSON string literal.\n \nCertain character sequences have special meanings within a\nstring. Usually, a backspace is ignored, but the escape\nsequences in the table below are recognised by MariaDB,\nunless the SQL Mode is set to NO_BACKSLASH_ESCAPES SQL.\n \nEscape sequence | Character | \n \n\\\" | Double quote (\") | \n \n\\b | Backspace | \n \n\\f | Formfeed | \n \n\\n | Newline (linefeed) | \n \n\\r | Carriage return | \n \n\\t | Tab | \n \n\\\\ | Backslash (\\) | \n \n\\uXXXX | UTF-8 bytes for Unicode value XXXX | \n \nExamples\n-------- \nSELECT JSON_UNQUOTE(\'\"Monty\"\');\n+-------------------------+\n| JSON_UNQUOTE(\'\"Monty\"\') |\n+-------------------------+\n| Monty |\n+-------------------------+\n \nWith the default SQL Mode:\n \nSELECT JSON_UNQUOTE(\'Si\\bng\\ting\');\n+-----------------------------+\n| JSON_UNQUOTE(\'Si\\bng\\ting\') |\n+-----------------------------+\n| Sng ing |\n+-----------------------------+\n \nSetting NO_BACKSLASH_ESCAPES:\n \nSET @@sql_mode = \'NO_BACKSLASH_ESCAPES\';\n \nSELECT JSON_UNQUOTE(\'Si\\bng\\ting\');\n+-----------------------------+\n| JSON_UNQUOTE(\'Si\\bng\\ting\') |\n+-----------------------------+\n| Si\\bng\\ting |\n+-----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_unquote/','','https://mariadb.com/kb/en/json_unquote/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (721,41,'JSON_VALID','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_VALID(value)\n \nDescription\n----------- \nIndicates whether the given value is a valid JSON document\nor not. Returns 1 if valid, 0 if not, and NULL if the\nargument is NULL.\n \nFrom MariaDB 10.4.3, the JSON_VALID function is\nautomatically used as a CHECK constraint for the JSON data\ntype alias in order to ensure that a valid json document is\ninserted. \n \nExamples\n-------- \nSELECT JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\"}\');\n+------------------------------------------+\n| JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\"}\') |\n+------------------------------------------+\n| 1 |\n+------------------------------------------+\n \nSELECT JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\",\n\"oddfield\"}\');\n+------------------------------------------------------+\n| JSON_VALID(\'{\"id\": 1, \"name\": \"Monty\",\n\"oddfield\"}\') |\n+------------------------------------------------------+\n| 0 |\n+------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_valid/','','https://mariadb.com/kb/en/json_valid/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (722,41,'JSON_VALUE','JSON functions were added in MariaDB 10.2.3.\n \nSyntax\n------ \nJSON_VALUE(json_doc, path)\n \nDescription\n----------- \nGiven a JSON document, returns the scalar specified by the\npath. Returns NULL if not given a valid JSON document, or if\nthere is no match.\n \nExamples\n-------- \nselect json_value(\'{\"key1\":123}\', \'$.key1\');\n+--------------------------------------+\n| json_value(\'{\"key1\":123}\', \'$.key1\') |\n+--------------------------------------+\n| 123 |\n+--------------------------------------+\n \nselect json_value(\'{\"key1\": [1,2,3], \"key1\":123}\',\n\'$.key1\');\n+-------------------------------------------------------+\n| json_value(\'{\"key1\": [1,2,3], \"key1\":123}\',\n\'$.key1\') |\n+-------------------------------------------------------+\n| 123 |\n+-------------------------------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/json_value/','','https://mariadb.com/kb/en/json_value/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (723,42,'Window Functions Overview','Window functions were introduced in MariaDB 10.2.\n \nIntroduction\n \nWindow functions allow calculations to be performed across a\nset of rows related to the current row.\n \nSyntax\n------ \nfunction (expression) OVER (\n [ PARTITION BY expression_list ]\n [ ORDER BY order_list [ frame_clause ] ] ) \n \nfunction:\n A valid window function\n \nexpression_list:\n expression | column_name [, expr_list ]\n \norder_list:\n expression | column_name [ ASC | DESC ] \n [, ... ]\n \nframe_clause:\n {ROWS | RANGE} {frame_border | BETWEEN frame_border AND\nframe_border}\n \nframe_border:\n | UNBOUNDED PRECEDING\n | UNBOUNDED FOLLOWING\n | CURRENT ROW\n | expr PRECEDING\n | expr FOLLOWING\n \nDescription\n----------- \nIn some ways, window functions are similar to aggregate\nfunctions in that they perform calculations across a set of\nrows. However, unlike aggregate functions, the output is not\ngrouped into a single row. \n \nNon-aggregate window functions include \nCUME_DIST\nDENSE_RANK\nFIRST_VALUE\nLAG\nLAST_VALUE\nLEAD\nMEDIAN\nNTH_VALUE\nNTILE\nPERCENT_RANK\nPERCENTILE_CONT\nPERCENTILE_DISC\nRANK, ROW_NUMBER\n \nAggregate functions that can also be used as window\nfunctions include \nAVG\nBIT_AND\nBIT_OR\nBIT_XOR\nCOUNT\nMAX\nMIN\nSTD\nSTDDEV\nSTDDEV_POP\nSTDDEV_SAMP\nSUM\nVAR_POP\nVAR_SAMP\nVARIANCE\n \nWindow function queries are characterised by the OVER\nkeyword, following which the set of rows used for the\ncalculation is specified. By default, the set of rows used\nfor the calculation (the \"window) is the entire dataset,\nwhich can be ordered with the ORDER BY clause. The PARTITION\nBY clause is used to reduce the window to a particular group\nwithin the dataset.\n \nFor example, given the following data:\n \nCREATE TABLE student (name CHAR(10), test CHAR(10), score\nTINYINT); \n \nINSERT INTO student VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87), (\'Tatiana\', \'Tuning\', 83);\n \nthe following two queries return the average partitioned by\ntest and by name respectively:\n \nSELECT name, test, score, AVG(score) OVER (PARTITION BY\ntest) \n AS average_by_test FROM student;\n \n+---------+--------+-------+-----------------+\n| name | test | score | average_by_test |\n+---------+--------+-------+-----------------+\n| Chun | SQL | 75 | 65.2500 |\n| Chun | Tuning | 73 | 68.7500 |\n| Esben | SQL | 43 | 65.2500 |\n| Esben | Tuning | 31 | 68.7500 |\n| Kaolin | SQL | 56 | 65.2500 |\n| Kaolin | Tuning | 88 | 68.7500 |\n| Tatiana | SQL | 87 | 65.2500 |\n| Tatiana | Tuning | 83 | 68.7500 |\n+---------+--------+-------+-----------------+\n \nSELECT name, test, score, AVG(score) OVER (PARTITION BY\nname) \n AS average_by_name FROM student;\n \n+---------+--------+-------+-----------------+\n| name | test | score | average_by_name |\n+---------+--------+-------+-----------------+\n| Chun | SQL | 75 | 74.0000 |\n| Chun | Tuning | 73 | 74.0000 |\n| Esben | SQL | 43 | 37.0000 |\n| Esben | Tuning | 31 | 37.0000 |\n| Kaolin | SQL | 56 | 72.0000 |\n| Kaolin | Tuning | 88 | 72.0000 |\n| Tatiana | SQL | 87 | 85.0000 |\n| Tatiana | Tuning | 83 | 85.0000 |\n+---------+--------+-------+-----------------+\n \nIt is also possible to specify which rows to include for the\nwindow function (for example, the current row and all\npreceding rows). See Window Frames for more details.\n \nScope\n \nWindow functions were introduced in SQL:2003, and their\ndefinition was expanded in subsequent versions of the\nstandard. The last expansion was in the latest version of\nthe standard, SQL:2011. \n \nMost database products support a subset of the standard,\nthey implement some functions defined as late as in\nSQL:2011, and at the same time leave some parts of SQL:2008\nunimplemented.\n \nMariaDB:\nSupports ROWS and RANGE-type frames\nAll kinds of frame bounds are supported, including RANGE\nPRECEDING|FOLLOWING n frame bounds (unlike PostgreSQL or MS\nSQL Server)\nDoes not yet support DATE[TIME] datatype and arithmetic for\nRANGE-type frames (MDEV-9727)\n \nDoes not support GROUPS-type frames (it seems that no\npopular database supports it, either)\n \nDoes not support frame exclusion (no other database seems to\nsupport it, either) (MDEV-9724)\nDoes not support explicit NULLS FIRST or NULLS LAST.\nDoes not support nested navigation in window functions (this\nis VALUE_OF(expr AT row_marker [, default_value) syntax)\n \nThe following window functions are supported:\n\"Streamable\" window functions: ROW_NUMBER, RANK,\nDENSE_RANK, \nWindow functions that can be streamed once the number of\nrows in partition is known: PERCENT_RANK, CUME_DIST, NTILE\n \nAggregate functions that are currently supported as window\nfunctions are: COUNT, SUM, AVG, BIT_OR, BIT_AND, BIT_XOR.\nAggregate functions with the DISTINCT specifier (e.g. COUNT(\nDISTINCT x)) are not supported as window functions.\n \nLinks\n \nMDEV-6115 is the main jira task for window functions\ndevelopment. Other tasks are are attached as sub-tasks\nbb-10.2-mdev9543 is the feature tree for window functions.\nDevelopment is ongoing, and this tree has the newest\nchanges.\nTestcases are in mysql-test/t/win*.test\n \nExamples\n-------- \nGiven the following sample data:\n \nCREATE TABLE users (\n email VARCHAR(30), \n first_name VARCHAR(30), \n last_name VARCHAR(30), \n account_type VARCHAR(30)\n);\n \nINSERT INTO users VALUES \n (\'admin@boss.org\', \'Admin\', \'Boss\', \'admin\'), \n (\'bob.carlsen@foo.bar\', \'Bob\', \'Carlsen\',\n\'regular\'),\n (\'eddie.stevens@data.org\', \'Eddie\', \'Stevens\',\n\'regular\'),\n (\'john.smith@xyz.org\', \'John\', \'Smith\', \'regular\'),\n\n (\'root@boss.org\', \'Root\', \'Chief\', \'admin\')\n \nFirst, let\'s order the records by email alphabetically,\ngiving each an ascending rnum value starting with 1. This\nwill make use of the ROW_NUMBER window function:\n \nSELECT row_number() OVER (ORDER BY email) AS rnum,\n email, first_name, last_name, account_type\nFROM users ORDER BY email;\n \n+------+------------------------+------------+-----------+--------------+\n| rnum | email | first_name | last_name | account_type |\n+------+------------------------+------------+-----------+--------------+\n| 1 | admin@boss.org | Admin | Boss | admin |\n| 2 | bob.carlsen@foo.bar | Bob | Carlsen | regular |\n| 3 | eddie.stevens@data.org | Eddie | Stevens | regular |\n| 4 | john.smith@xyz.org | John | Smith | regular |\n| 5 | root@boss.org | Root | Chief | admin |\n+------+------------------------+------------+-----------+--------------\n \nWe can generate separate sequences based on account type,\nusing the PARTITION BY clause:\n \nSELECT row_number() OVER (PARTITION BY account_type ORDER BY\nemail) AS rnum, \n email, first_name, last_name, account_type \nFROM users ORDER BY account_type,email;\n \n+------+------------------------+------------+-----------+--------------+\n| rnum | email | first_name | last_name | account_type |\n+------+------------------------+------------+-----------+--------------+\n| 1 | admin@boss.org | Admin | Boss | admin |\n| 2 | root@boss.org | Root | Chief | admin |\n| 1 | bob.carlsen@foo.bar | Bob | Carlsen | regular |\n| 2 | eddie.stevens@data.org | Eddie | Stevens | regular |\n| 3 | john.smith@xyz.org | John | Smith | regular |\n+------+------------------------+------------+-----------+--------------+\n \nGiven the following structure and data, we want to find the\ntop 5 salaries from each department. \n \nCREATE TABLE employee_salaries (dept VARCHAR(20), name\nVARCHAR(20), salary INT(11));\n \nINSERT INTO employee_salaries VALUES\n(\'Engineering\', \'Dharma\', 3500),\n(\'Engineering\', \'Bình\', 3000),\n(\'Engineering\', \'Adalynn\', 2800),\n(\'Engineering\', \'Samuel\', 2500),\n(\'Engineering\', \'Cveta\', 2200),\n(\'Engineering\', \'Ebele\', 1800),\n(\'Sales\', \'Carbry\', 500),\n(\'Sales\', \'Clytemnestra\', 400),\n(\'Sales\', \'Juraj\', 300),\n(\'Sales\', \'Kalpana\', 300),\n(\'Sales\', \'Svantepolk\', 250),\n(\'Sales\', \'Angelo\', 200);\n \nWe could do this without using window functions, as follows:\n \nselect dept, name, salary\nfrom employee_salaries as t1\nwhere (select count(t2.salary)\n from employee_salaries as t2\n where t1.name != t2.name and\n t1.dept = t2.dept and\n t2.salary > t1.salary) \n\nURL:\nhttps://mariadb.com/kb/en/library/window-functions-overview/','','https://mariadb.com/kb/en/library/window-functions-overview/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (724,42,'Aggregate Functions as Window Functions','Window functions were first introduced in MariaDB 10.2.0.\n \nIt is possible to use aggregate functions as window\nfunctions. An aggregate function used as a window function\nmust have the OVER clause. For example, here\'s COUNT() used\nas a window function:\n \nselect COUNT(*) over (order by column) from table;\n \nMariaDB currently allows these aggregate functions to be\nused as window functions: \nAVG\nBIT_AND\nBIT_OR\nBIT_XOR\nCOUNT\nMAX\nMIN\nSTD\nSTDDEV\nSTDDEV_POP\nSTDDEV_SAMP\nSUM\nVAR_POP\nVAR_SAMP\nVARIANCE\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/library/aggregate-functions-as-window-functions/','','https://mariadb.com/kb/en/library/aggregate-functions-as-window-functions/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (725,42,'Window Frames','Window functions were first introduced in MariaDB 10.2.0.\n \nSyntax\n------ \nframe_clause:\n {ROWS | RANGE} {frame_border | BETWEEN frame_border AND\nframe_border}\n \nframe_border:\n | UNBOUNDED PRECEDING\n | UNBOUNDED FOLLOWING\n | CURRENT ROW\n | expr PRECEDING\n | expr FOLLOWING\n \nDescription\n----------- \nA basic overview of window functions is described in Window\nFunctions Overview. Window frames expand this functionality\nby allowing the function to include a specified a number of\nrows around the current row.\n \nThese include:\nAll rows before the current row (UNBOUNDED PRECEDING), for\nexample RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\nAll rows after the current row (UNBOUNDED FOLLOWING), for\nexample RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING\nA set number of rows before the current row (expr PRECEDING)\nfor example RANGE BETWEEN 6 PRECEDING AND CURRENT ROW\nA set number of rows after the current row (expr PRECEDING\nAND expr FOLLOWING) for example RANGE BETWEEN CURRENT ROW\nAND 2 FOLLOWING\nA specified number of rows both before and after the current\nrow, for example RANGE BETWEEN 6 PRECEDING AND 3 FOLLOWING \n \nThe following functions operate on window frames:\nAVG\nBIT_AND\nBIT_OR\nBIT_XOR\nCOUNT\nLEAD\nMAX\nMIN\nNTILE\nSTD\nSTDDEV\nSTDDEV_POP\nSTDDEV_SAMP\nSUM\nVAR_POP\nVAR_SAMP\nVARIANCE\n \nWindow frames are determined by the frame_clause in the\nwindow function request. \n \nTake the following example:\n \nCREATE TABLE `student_test` (\n name char(10),\n test char(10),\n score tinyint(4)\n);\n \nINSERT INTO student_test VALUES \n (\'Chun\', \'SQL\', 75), (\'Chun\', \'Tuning\', 73), \n (\'Esben\', \'SQL\', 43), (\'Esben\', \'Tuning\', 31), \n (\'Kaolin\', \'SQL\', 56), (\'Kaolin\', \'Tuning\', 88), \n (\'Tatiana\', \'SQL\', 87);\n \nSELECT name, test, score, SUM(score) \n OVER () AS total_score \n FROM student_test;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Chun | SQL | 75 | 453 |\n| Chun | Tuning | 73 | 453 |\n| Esben | SQL | 43 | 453 |\n| Esben | Tuning | 31 | 453 |\n| Kaolin | SQL | 56 | 453 |\n| Kaolin | Tuning | 88 | 453 |\n| Tatiana | SQL | 87 | 453 |\n+---------+--------+-------+-------------+\n \nBy not specifying an OVER condition, the SUM function is run\nover the entire dataset. However, if we specify an ORDER BY\ncondition based on score (and order the entire result in the\nsame way for clarity), the following result is returned:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 31 |\n| Esben | SQL | 43 | 74 |\n| Kaolin | SQL | 56 | 130 |\n| Chun | Tuning | 73 | 203 |\n| Chun | SQL | 75 | 278 |\n| Tatiana | SQL | 87 | 365 |\n| Kaolin | Tuning | 88 | 453 |\n+---------+--------+-------+-------------+\n \nThe total_score column represents a running total of the\ncurrent row, and all previous rows. The window frame in this\nexample expands as the function proceeds.\n \nThe above query makes use of the default to define the\nwindow frame. It could be written explicitly as follows:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score RANGE BETWEEN UNBOUNDED PRECEDING AND\nCURRENT ROW) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 31 |\n| Esben | SQL | 43 | 74 |\n| Kaolin | SQL | 56 | 130 |\n| Chun | Tuning | 73 | 203 |\n| Chun | SQL | 75 | 278 |\n| Tatiana | SQL | 87 | 365 |\n| Kaolin | Tuning | 88 | 453 |\n+---------+--------+-------+-------------+\n \nLet\'s look at some alternatives:\n \nFirstly, applying the window function to the current row and\nall following rows can be done with the use of UNBOUNDED\nFOLLOWING:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score RANGE BETWEEN CURRENT ROW AND\nUNBOUNDED FOLLOWING) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 453 |\n| Esben | SQL | 43 | 422 |\n| Kaolin | SQL | 56 | 379 |\n| Chun | Tuning | 73 | 323 |\n| Chun | SQL | 75 | 250 |\n| Tatiana | SQL | 87 | 175 |\n| Kaolin | Tuning | 88 | 88 |\n+---------+--------+-------+-------------+\n \nIt\'s possible to specify a number of rows, rather than the\nentire unbounded following or preceding set. The following\nexample takes the current row, as well as the previous row:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score ROWS BETWEEN 1 PRECEDING AND CURRENT\nROW) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 31 |\n| Esben | SQL | 43 | 74 |\n| Kaolin | SQL | 56 | 99 |\n| Chun | Tuning | 73 | 129 |\n| Chun | SQL | 75 | 148 |\n| Tatiana | SQL | 87 | 162 |\n| Kaolin | Tuning | 88 | 175 |\n+---------+--------+-------+-------------+\n \nThe current row and the following row:\n \nSELECT name, test, score, SUM(score) \n OVER (ORDER BY score ROWS BETWEEN 1 PRECEDING AND 1\nFOLLOWING) AS total_score \n FROM student_test ORDER BY score;\n \n+---------+--------+-------+-------------+\n| name | test | score | total_score |\n+---------+--------+-------+-------------+\n| Esben | Tuning | 31 | 74 |\n| Esben | SQL | 43 | 130 |\n| Kaolin | SQL | 56 | 172 |\n| Chun | Tuning | 73 | 204 |\n| Chun | SQL | 75 | 235 |\n| Tatiana | SQL | 87 | 250 |\n| Kaolin | Tuning | 88 | 175 |\n+---------+--------+-------+-------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/library/window-frames/','','https://mariadb.com/kb/en/library/window-frames/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (726,42,'CUME_DIST','The CUME_DIST() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nCUME_DIST() OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nCUME_DIST() is a window function that returns the cumulative\ndistribution of a given row. The following formula is used\nto calculate the value:\n \n(number of rows \n\nURL: https://mariadb.com/kb/en/cume_dist/','','https://mariadb.com/kb/en/cume_dist/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (727,42,'DENSE_RANK','The DENSE_RANK() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nDENSE_RANK() OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nDENSE_RANK() is a window function that displays the number\nof a given row, starting at one and following the ORDER BY\nsequence of the window function, with identical values\nreceiving the same result. Unlike the RANK() function, there\nare no skipped values if the preceding results are\nidentical. It is also similar to the ROW_NUMBER() function\nexcept that in that function, identical values will receive\na different row number for each result.\n \nExamples\n-------- \nThe distinction between DENSE_RANK(), RANK() and\nROW_NUMBER():\n \nCREATE TABLE student(course VARCHAR(10), mark int, name\nvarchar(10));\n \nINSERT INTO student VALUES \n (\'Maths\', 60, \'Thulile\'),\n (\'Maths\', 60, \'Pritha\'),\n (\'Maths\', 70, \'Voitto\'),\n (\'Maths\', 55, \'Chun\'),\n (\'Biology\', 60, \'Bilal\'),\n (\'Biology\', 70, \'Roger\');\n \nSELECT \n RANK() OVER (PARTITION BY course ORDER BY mark DESC) AS\nrank, \n DENSE_RANK() OVER (PARTITION BY course ORDER BY mark DESC)\nAS dense_rank, \n ROW_NUMBER() OVER (PARTITION BY course ORDER BY mark DESC)\nAS row_num, \n course, mark, name \nFROM student ORDER BY course, mark DESC;\n \n+------+------------+---------+---------+------+---------+\n| rank | dense_rank | row_num | course | mark | name |\n+------+------------+---------+---------+------+---------+\n| 1 | 1 | 1 | Biology | 70 | Roger |\n| 2 | 2 | 2 | Biology | 60 | Bilal |\n| 1 | 1 | 1 | Maths | 70 | Voitto |\n| 2 | 2 | 2 | Maths | 60 | Thulile |\n| 2 | 2 | 3 | Maths | 60 | Pritha |\n| 4 | 3 | 4 | Maths | 55 | Chun |\n+------+------------+---------+---------+------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/dense_rank/','','https://mariadb.com/kb/en/dense_rank/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (728,42,'FIRST_VALUE','The FIRST_VALUE() function was first introduced with other\nwindow functions in MariaDB 10.2.\n \nSyntax\n------ \nFIRST_VALUE(expr) OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nFIRST_VALUE returns the first result from an ordered set, or\nNULL if no such result exists.\n \nExamples\n-------- \nCREATE TABLE t1 (\n pk int primary key,\n a int,\n b int,\n c char(10),\n d decimal(10, 3),\n e real\n);\n \nINSERT INTO t1 VALUES\n( 1, 0, 1, \'one\', 0.1, 0.001),\n( 2, 0, 2, \'two\', 0.2, 0.002),\n( 3, 0, 3, \'three\', 0.3, 0.003),\n( 4, 1, 2, \'three\', 0.4, 0.004),\n( 5, 1, 1, \'two\', 0.5, 0.005),\n( 6, 1, 1, \'one\', 0.6, 0.006),\n( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n( 8, 2, 1, \'n_two\', NULL, 0.008),\n( 9, 2, 2, NULL, 0.7, 0.009),\n(10, 2, 0, \'n_four\', 0.8, 0.010),\n(11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, FIRST_VALUE(pk) OVER (ORDER BY pk) AS first_asc,\n LAST_VALUE(pk) OVER (ORDER BY pk) AS last_asc,\n FIRST_VALUE(pk) OVER (ORDER BY pk DESC) AS first_desc,\n LAST_VALUE(pk) OVER (ORDER BY pk DESC) AS last_desc\nFROM t1\nORDER BY pk DESC;\n \n+----+-----------+----------+------------+-----------+\n| pk | first_asc | last_asc | first_desc | last_desc |\n+----+-----------+----------+------------+-----------+\n| 11 | 1 | 11 | 11 | 11 |\n| 10 | 1 | 10 | 11 | 10 |\n| 9 | 1 | 9 | 11 | 9 |\n| 8 | 1 | 8 | 11 | 8 |\n| 7 | 1 | 7 | 11 | 7 |\n| 6 | 1 | 6 | 11 | 6 |\n| 5 | 1 | 5 | 11 | 5 |\n| 4 | 1 | 4 | 11 | 4 |\n| 3 | 1 | 3 | 11 | 3 |\n| 2 | 1 | 2 | 11 | 2 |\n| 1 | 1 | 1 | 11 | 1 |\n+----+-----------+----------+------------+-----------+\n \nCREATE OR REPLACE TABLE t1 (i int);\nINSERT INTO t1 VALUES\n(1),(2),(3),(4),(5),(6),(7),(8),(9),(10);\n \nSELECT i,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW\nand 1 FOLLOWING) AS f_1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW and\n1 FOLLOWING) AS l_1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING\nAND 1 FOLLOWING) AS f_1p1f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND\n1 FOLLOWING) AS f_1p1f,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING\nAND 1 PRECEDING) AS f_2p1p,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING AND\n1 PRECEDING) AS f_2p1p,\n FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING\nAND 2 FOLLOWING) AS f_1f2f,\n LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING AND\n2 FOLLOWING) AS f_1f2f\nFROM t1;\n \n+------+------+------+--------+--------+--------+--------+--------+--------+\n| i | f_1f | l_1f | f_1p1f | f_1p1f | f_2p1p | f_2p1p |\nf_1f2f | f_1f2f |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n| 1 | 1 | 2 | 1 | 2 | NULL | NULL | 2 | 3 |\n| 2 | 2 | 3 | 1 | 3 | 1 | 1 | 3 | 4 |\n| 3 | 3 | 4 | 2 | 4 | 1 | 2 | 4 | 5 |\n| 4 | 4 | 5 | 3 | 5 | 2 | 3 | 5 | 6 |\n| 5 | 5 | 6 | 4 | 6 | 3 | 4 | 6 | 7 |\n| 6 | 6 | 7 | 5 | 7 | 4 | 5 | 7 | 8 |\n| 7 | 7 | 8 | 6 | 8 | 5 | 6 | 8 | 9 |\n| 8 | 8 | 9 | 7 | 9 | 6 | 7 | 9 | 10 |\n| 9 | 9 | 10 | 8 | 10 | 7 | 8 | 10 | 10 |\n| 10 | 10 | 10 | 9 | 10 | 8 | 9 | NULL | NULL |\n+------+------+------+--------+--------+--------+--------+--------+--------+\n \n\n\nURL: https://mariadb.com/kb/en/first_value/','','https://mariadb.com/kb/en/first_value/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (729,42,'LAG','The LAG() function was first introduced with other window\nfunctions in MariaDB 10.2.\n \nSyntax\n------ \nLAG (expr[, offset]) OVER ( \n [ PARTITION BY partition_expression ] \n < ORDER BY order_list >\n)\n \nDescription\n----------- \nThe LAG function accesses data from a previous row according\nto the ORDER BY clause without the need for a self-join. The\nspecific row is determined by the offset (default 1), which\nspecifies the number of rows behind the current row to use.\nAn offset of 0 is the current row.\n \nExamples\n-------- \nCREATE TABLE t1 (pk int primary key, a int, b int, c\nchar(10), d decimal(10, 3), e real);\n \nINSERT INTO t1 VALUES\n ( 1, 0, 1, \'one\', 0.1, 0.001),\n ( 2, 0, 2, \'two\', 0.2, 0.002),\n ( 3, 0, 3, \'three\', 0.3, 0.003),\n ( 4, 1, 2, \'three\', 0.4, 0.004),\n ( 5, 1, 1, \'two\', 0.5, 0.005),\n ( 6, 1, 1, \'one\', 0.6, 0.006),\n ( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n ( 8, 2, 1, \'n_two\', NULL, 0.008),\n ( 9, 2, 2, NULL, 0.7, 0.009),\n (10, 2, 0, \'n_four\', 0.8, 0.010),\n (11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, LAG(pk) OVER (ORDER BY pk) AS l,\n LAG(pk,1) OVER (ORDER BY pk) AS l1,\n LAG(pk,2) OVER (ORDER BY pk) AS l2,\n LAG(pk,0) OVER (ORDER BY pk) AS l0,\n LAG(pk,-1) OVER (ORDER BY pk) AS lm1,\n LAG(pk,-2) OVER (ORDER BY pk) AS lm2 \nFROM t1;\n \n+----+------+------+------+------+------+------+\n| pk | l | l1 | l2 | l0 | lm1 | lm2 |\n+----+------+------+------+------+------+------+\n| 1 | NULL | NULL | NULL | 1 | 2 | 3 |\n| 2 | 1 | 1 | NULL | 2 | 3 | 4 |\n| 3 | 2 | 2 | 1 | 3 | 4 | 5 |\n| 4 | 3 | 3 | 2 | 4 | 5 | 6 |\n| 5 | 4 | 4 | 3 | 5 | 6 | 7 |\n| 6 | 5 | 5 | 4 | 6 | 7 | 8 |\n| 7 | 6 | 6 | 5 | 7 | 8 | 9 |\n| 8 | 7 | 7 | 6 | 8 | 9 | 10 |\n| 9 | 8 | 8 | 7 | 9 | 10 | 11 |\n| 10 | 9 | 9 | 8 | 10 | 11 | NULL |\n| 11 | 10 | 10 | 9 | 11 | NULL | NULL |\n+----+------+------+------+------+------+------+\n \n\n\nURL: https://mariadb.com/kb/en/lag/','','https://mariadb.com/kb/en/lag/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (730,42,'LEAD','The LEAD() function was first introduced with other window\nfunctions in MariaDB 10.2.\n \nSyntax\n------ \nLEAD (expr[, offset]) OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nThe LEAD function accesses data from a following row in the\nsame result set without the need for a self-join. The\nspecific row is determined by the offset (default 1), which\nspecifies the number of rows ahead the current row to use.\nAn offset of 0 is the current row.\n \nExample\n \nCREATE TABLE t1 (pk int primary key, a int, b int, c\nchar(10), d decimal(10, 3), e real);\n \nINSERT INTO t1 VALUES\n ( 1, 0, 1, \'one\', 0.1, 0.001),\n ( 2, 0, 2, \'two\', 0.2, 0.002),\n ( 3, 0, 3, \'three\', 0.3, 0.003),\n ( 4, 1, 2, \'three\', 0.4, 0.004),\n ( 5, 1, 1, \'two\', 0.5, 0.005),\n ( 6, 1, 1, \'one\', 0.6, 0.006),\n ( 7, 2, NULL, \'n_one\', 0.5, 0.007),\n ( 8, 2, 1, \'n_two\', NULL, 0.008),\n ( 9, 2, 2, NULL, 0.7, 0.009),\n (10, 2, 0, \'n_four\', 0.8, 0.010),\n (11, 2, 10, NULL, 0.9, NULL);\n \nSELECT pk, LEAD(pk) OVER (ORDER BY pk) AS l,\n LEAD(pk,1) OVER (ORDER BY pk) AS l1,\n LEAD(pk,2) OVER (ORDER BY pk) AS l2,\n LEAD(pk,0) OVER (ORDER BY pk) AS l0,\n LEAD(pk,-1) OVER (ORDER BY pk) AS lm1,\n LEAD(pk,-2) OVER (ORDER BY pk) AS lm2 \nFROM t1;\n \n+----+------+------+------+------+------+------+\n| pk | l | l1 | l2 | l0 | lm1 | lm2 |\n+----+------+------+------+------+------+------+\n| 1 | 2 | 2 | 3 | 1 | NULL | NULL |\n| 2 | 3 | 3 | 4 | 2 | 1 | NULL |\n| 3 | 4 | 4 | 5 | 3 | 2 | 1 |\n| 4 | 5 | 5 | 6 | 4 | 3 | 2 |\n| 5 | 6 | 6 | 7 | 5 | 4 | 3 |\n| 6 | 7 | 7 | 8 | 6 | 5 | 4 |\n| 7 | 8 | 8 | 9 | 7 | 6 | 5 |\n| 8 | 9 | 9 | 10 | 8 | 7 | 6 |\n| 9 | 10 | 10 | 11 | 9 | 8 | 7 |\n| 10 | 11 | 11 | NULL | 10 | 9 | 8 |\n| 11 | NULL | NULL | NULL | 11 | 10 | 9 |\n+----+------+------+------+------+------+------+\n \n\n\nURL: https://mariadb.com/kb/en/lead/','','https://mariadb.com/kb/en/lead/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (731,42,'Median Window Function','The MEDIAN() window function was first introduced with in\nMariaDB 10.3.3.\n \nSyntax\n------ \nMEDIAN(median expression) OVER (\n [ PARTITION BY partition_expression ] \n)\n \nDescription\n----------- \nMEDIAN() is a window function that returns the median value\nof a range of values.\n \nIt is a specific case of PERCENTILE_CONT, with an argument\nof 0.5 and the ORDER BY column the one in MEDIAN\'s\nargument. \n \nMEDIAN() OVER ( [ PARTITION BY partition_expression] )\n \nIs equivalent to:\n \nPERCENTILE_CONT(0.5) WITHIN \n GROUP (ORDER BY ) OVER ( [ PARTITION BY\npartition_expression ])\n \nExamples\n-------- \nCREATE TABLE book_rating (name CHAR(30), star_rating\nTINYINT);\n \nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n5);\nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n3);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 1);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 2);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 5);\n \nSELECT name, median(star_rating) OVER (PARTITION BY name)\nFROM book_rating;\n \n+-----------------------+----------------------------------------------+\n| name | median(star_rating) OVER (PARTITION BY name) |\n+-----------------------+----------------------------------------------+\n| Lord of the Ladybirds | 4.0000000000 |\n| Lord of the Ladybirds | 4.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n+-----------------------+----------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/median/','','https://mariadb.com/kb/en/median/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (732,42,'NTH_VALUE','The NTH_VALUE() function was first introduced with other\nwindow functions in MariaDB 10.2.\n \nSyntax\n------ \nNTH_VALUE (expr[, num_row]) OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nThe NTH_VALUE function returns the value evaluated at row\nnumber num_row of the window frame, starting from 1, or NULL\nif the row does not exist.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/nth_value/','','https://mariadb.com/kb/en/nth_value/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (733,42,'NTILE','The NTILE() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nNTILE (expr) OVER ( \n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nNTILE() is a window function that returns an integer\nindicating which group a given row falls into. The number of\ngroups is specified in the argument (expr), starting at one.\nOrdered rows in the partition are divided into the specified\nnumber of groups with as equal a size as possible. \n \nExamples\n-------- \ncreate table t1 (\n pk int primary key,\n a int,\n b int\n );\n \ninsert into t1 values\n (11 , 0, 10),\n (12 , 0, 10),\n (13 , 1, 10),\n (14 , 1, 10),\n (18 , 2, 10),\n (15 , 2, 20),\n (16 , 2, 20),\n (17 , 2, 20),\n (19 , 4, 20),\n (20 , 4, 20);\n \nselect pk, a, b,\n ntile(1) over (order by pk)\n from t1;\n \n+----+------+------+-----------------------------+\n| pk | a | b | ntile(1) over (order by pk) |\n+----+------+------+-----------------------------+\n| 11 | 0 | 10 | 1 |\n| 12 | 0 | 10 | 1 |\n| 13 | 1 | 10 | 1 |\n| 14 | 1 | 10 | 1 |\n| 15 | 2 | 20 | 1 |\n| 16 | 2 | 20 | 1 |\n| 17 | 2 | 20 | 1 |\n| 18 | 2 | 10 | 1 |\n| 19 | 4 | 20 | 1 |\n| 20 | 4 | 20 | 1 |\n+----+------+------+-----------------------------+\n \nselect pk, a, b,\n ntile(4) over (order by pk)\n from t1;\n \n+----+------+------+-----------------------------+\n| pk | a | b | ntile(4) over (order by pk) |\n+----+------+------+-----------------------------+\n| 11 | 0 | 10 | 1 |\n| 12 | 0 | 10 | 1 |\n| 13 | 1 | 10 | 1 |\n| 14 | 1 | 10 | 2 |\n| 15 | 2 | 20 | 2 |\n| 16 | 2 | 20 | 2 |\n| 17 | 2 | 20 | 3 |\n| 18 | 2 | 10 | 3 |\n| 19 | 4 | 20 | 4 |\n| 20 | 4 | 20 | 4 |\n+----+------+------+-----------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/ntile/','','https://mariadb.com/kb/en/ntile/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (734,42,'PERCENT_RANK','The PERCENT_RANK() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nPERCENT_RANK() OVER (\n [ PARTITION BY partition_expression ] \n [ ORDER BY order_list ]\n)\n \nDescription\n----------- \nPERCENT_RANK() is a window function that returns the\nrelative percent rank of a given row. The following formula\nis used to calculate the percent rank:\n \n(rank - 1) / (number of rows in the window or partition - 1)\n \nExamples\n-------- \ncreate table t1 (\n pk int primary key,\n a int,\n b int\n);\n \ninsert into t1 values\n( 1 , 0, 10),\n( 2 , 0, 10),\n( 3 , 1, 10),\n( 4 , 1, 10),\n( 8 , 2, 10),\n( 5 , 2, 20),\n( 6 , 2, 20),\n( 7 , 2, 20),\n( 9 , 4, 20),\n(10 , 4, 20);\n \nselect pk, a, b,\n rank() over (order by a) as rank,\n percent_rank() over (order by a) as pct_rank,\n cume_dist() over (order by a) as cume_dist\nfrom t1;\n \n+----+------+------+------+--------------+--------------+\n| pk | a | b | rank | pct_rank | cume_dist |\n+----+------+------+------+--------------+--------------+\n| 1 | 0 | 10 | 1 | 0.0000000000 | 0.2000000000 |\n| 2 | 0 | 10 | 1 | 0.0000000000 | 0.2000000000 |\n| 3 | 1 | 10 | 3 | 0.2222222222 | 0.4000000000 |\n| 4 | 1 | 10 | 3 | 0.2222222222 | 0.4000000000 |\n| 5 | 2 | 20 | 5 | 0.4444444444 | 0.8000000000 |\n| 6 | 2 | 20 | 5 | 0.4444444444 | 0.8000000000 |\n| 7 | 2 | 20 | 5 | 0.4444444444 | 0.8000000000 |\n| 8 | 2 | 10 | 5 | 0.4444444444 | 0.8000000000 |\n| 9 | 4 | 20 | 9 | 0.8888888889 | 1.0000000000 |\n| 10 | 4 | 20 | 9 | 0.8888888889 | 1.0000000000 |\n+----+------+------+------+--------------+--------------+\n \nselect pk, a, b,\n percent_rank() over (order by pk) as pct_rank,\n cume_dist() over (order by pk) as cume_dist\nfrom t1 order by pk;\n \n+----+------+------+--------------+--------------+\n| pk | a | b | pct_rank | cume_dist |\n+----+------+------+--------------+--------------+\n| 1 | 0 | 10 | 0.0000000000 | 0.1000000000 |\n| 2 | 0 | 10 | 0.1111111111 | 0.2000000000 |\n| 3 | 1 | 10 | 0.2222222222 | 0.3000000000 |\n| 4 | 1 | 10 | 0.3333333333 | 0.4000000000 |\n| 5 | 2 | 20 | 0.4444444444 | 0.5000000000 |\n| 6 | 2 | 20 | 0.5555555556 | 0.6000000000 |\n| 7 | 2 | 20 | 0.6666666667 | 0.7000000000 |\n| 8 | 2 | 10 | 0.7777777778 | 0.8000000000 |\n| 9 | 4 | 20 | 0.8888888889 | 0.9000000000 |\n| 10 | 4 | 20 | 1.0000000000 | 1.0000000000 |\n+----+------+------+--------------+--------------+\n \nselect pk, a, b,\n percent_rank() over (partition by a order by a) as\npct_rank,\n cume_dist() over (partition by a order by a) as cume_dist\nfrom t1;\n \n+----+------+------+--------------+--------------+\n| pk | a | b | pct_rank | cume_dist |\n+----+------+------+--------------+--------------+\n| 1 | 0 | 10 | 0.0000000000 | 1.0000000000 |\n| 2 | 0 | 10 | 0.0000000000 | 1.0000000000 |\n| 3 | 1 | 10 | 0.0000000000 | 1.0000000000 |\n| 4 | 1 | 10 | 0.0000000000 | 1.0000000000 |\n| 5 | 2 | 20 | 0.0000000000 | 1.0000000000 |\n| 6 | 2 | 20 | 0.0000000000 | 1.0000000000 |\n| 7 | 2 | 20 | 0.0000000000 | 1.0000000000 |\n| 8 | 2 | 10 | 0.0000000000 | 1.0000000000 |\n| 9 | 4 | 20 | 0.0000000000 | 1.0000000000 |\n| 10 | 4 | 20 | 0.0000000000 | 1.0000000000 |\n+----+------+------+--------------+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/percent_rank/','','https://mariadb.com/kb/en/percent_rank/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (735,42,'PERCENTILE_CONT','The PERCENTILE_CONT() window function was first introduced\nwith in MariaDB 10.3.3.\n \nSyntax\n------ \nDescription\n----------- \nPERCENTILE_CONT() (standing for continuous percentile) is a\nwindow function which returns a value which corresponds to\nthe given fraction in the sort order. If required, it will\ninterpolate between adjacent input items.\n \nEssentially, the following process is followed to find the\nvalue to return:\nGet the number of rows in the partition, denoted by N\nRN = p*(N-1), where p denotes the argument to the\nPERCENTILE_CONT function\ncalculate the FRN(floor row number) and CRN(column row\nnumber for the group( FRN= floor(RN) and CRN = ceil(RN))\nlook up rows FRN and CRN\nIf (CRN = FRN = RN) then the result is (value of expression\nfrom row at RN)\nOtherwise the result is\n(CRN - RN) * (value of expression for row at FRN) +\n(RN - FRN) * (value of expression for row at CRN)\n \nThe MEDIAN function is a specific case of PERCENTILE_CONT,\nequivalent to PERCENTILE_CONT(0.5).\n \nExamples\n-------- \nCREATE TABLE book_rating (name CHAR(30), star_rating\nTINYINT);\n \nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n5);\nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n3);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 1);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 2);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 5);\n \nSELECT name, PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 4.0000000000 |\n| Lord of the Ladybirds | 4.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n| Lady of the Flies | 2.0000000000 |\n+-----------------------+--------------+\n \nSELECT name, PERCENTILE_CONT(1) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 5.0000000000 |\n| Lord of the Ladybirds | 5.0000000000 |\n| Lady of the Flies | 5.0000000000 |\n| Lady of the Flies | 5.0000000000 |\n| Lady of the Flies | 5.0000000000 |\n+-----------------------+--------------+\n \nSELECT name, PERCENTILE_CONT(0) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 3.0000000000 |\n| Lord of the Ladybirds | 3.0000000000 |\n| Lady of the Flies | 1.0000000000 |\n| Lady of the Flies | 1.0000000000 |\n| Lady of the Flies | 1.0000000000 |\n+-----------------------+--------------+\n \nSELECT name, PERCENTILE_CONT(0.6) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc \n FROM book_rating;\n \n+-----------------------+--------------+\n| name | pc |\n+-----------------------+--------------+\n| Lord of the Ladybirds | 4.2000000000 |\n| Lord of the Ladybirds | 4.2000000000 |\n| Lady of the Flies | 2.6000000000 |\n| Lady of the Flies | 2.6000000000 |\n| Lady of the Flies | 2.6000000000 |\n+-----------------------+--------------+\n \n\n\nURL: https://mariadb.com/kb/en/percentile_cont/','','https://mariadb.com/kb/en/percentile_cont/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (736,42,'PERCENTILE_DISC','The PERCENTILE_DISC() window function was first introduced\nwith in MariaDB 10.3.3.\n \nSyntax\n------ \n\nDescription\n----------- \nPERCENTILE_DISC() (standing for discrete percentile) is a\nwindow function which returns the first value in the set\nwhose ordered position is the same or more than the\nspecified fraction.\n \nEssentially, the following process is followed to find the\nvalue to return:\nGet the number of rows in the partition.\nWalk through the partition, in order, until finding the the\nfirst row with CUME_DIST() > function_argument.\n \nExamples\n-------- \nCREATE TABLE book_rating (name CHAR(30), star_rating\nTINYINT);\n \nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n5);\nINSERT INTO book_rating VALUES (\'Lord of the Ladybirds\',\n3);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 1);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 2);\nINSERT INTO book_rating VALUES (\'Lady of the Flies\', 5);\n \nSELECT name, PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY\nstar_rating)\n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 3 |\n| Lord of the Ladybirds | 3 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n+-----------------------+------+\n5 rows in set (0.000 sec)\n \nSELECT name, PERCENTILE_DISC(0) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 3 |\n| Lord of the Ladybirds | 3 |\n| Lady of the Flies | 1 |\n| Lady of the Flies | 1 |\n| Lady of the Flies | 1 |\n+-----------------------+------+\n5 rows in set (0.000 sec)\n \nSELECT name, PERCENTILE_DISC(1) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 5 |\n| Lord of the Ladybirds | 5 |\n| Lady of the Flies | 5 |\n| Lady of the Flies | 5 |\n| Lady of the Flies | 5 |\n+-----------------------+------+\n5 rows in set (0.000 sec)\n \nSELECT name, PERCENTILE_DISC(0.6) WITHIN GROUP (ORDER BY\nstar_rating) \n OVER (PARTITION BY name) AS pc FROM book_rating;\n \n+-----------------------+------+\n| name | pc |\n+-----------------------+------+\n| Lord of the Ladybirds | 5 |\n| Lord of the Ladybirds | 5 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n| Lady of the Flies | 2 |\n+-----------------------+------\n \n\n\nURL: https://mariadb.com/kb/en/percentile_disc/','','https://mariadb.com/kb/en/percentile_disc/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (737,42,'RANK','The RANK() function was first introduced with window\nfunctions in MariaDB 10.2.0.\n \nSyntax\n------ \nRANK() OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nRANK() is a window function that displays the number of a\ngiven row, starting at one and following the ORDER BY\nsequence of the window function, with identical values\nreceiving the same result. It is similar to the ROW_NUMBER()\nfunction except that in that function, identical values will\nreceive a different row number for each result.\n \nExamples\n-------- \nThe distinction between DENSE_RANK(), RANK() and\nROW_NUMBER():\n \nCREATE TABLE student(course VARCHAR(10), mark int, name\nvarchar(10));\n \nINSERT INTO student VALUES \n (\'Maths\', 60, \'Thulile\'),\n (\'Maths\', 60, \'Pritha\'),\n (\'Maths\', 70, \'Voitto\'),\n (\'Maths\', 55, \'Chun\'),\n (\'Biology\', 60, \'Bilal\'),\n (\'Biology\', 70, \'Roger\');\n \nSELECT \n RANK() OVER (PARTITION BY course ORDER BY mark DESC) AS\nrank, \n DENSE_RANK() OVER (PARTITION BY course ORDER BY mark DESC)\nAS dense_rank, \n ROW_NUMBER() OVER (PARTITION BY course ORDER BY mark DESC)\nAS row_num, \n course, mark, name \nFROM student ORDER BY course, mark DESC;\n \n+------+------------+---------+---------+------+---------+\n| rank | dense_rank | row_num | course | mark | name |\n+------+------------+---------+---------+------+---------+\n| 1 | 1 | 1 | Biology | 70 | Roger |\n| 2 | 2 | 2 | Biology | 60 | Bilal |\n| 1 | 1 | 1 | Maths | 70 | Voitto |\n| 2 | 2 | 2 | Maths | 60 | Thulile |\n| 2 | 2 | 3 | Maths | 60 | Pritha |\n| 4 | 3 | 4 | Maths | 55 | Chun |\n+------+------------+---------+---------+------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/rank/','','https://mariadb.com/kb/en/rank/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (738,42,'ROW_NUMBER','ROW_NUMBER() was first introduced with window functions in\nMariaDB 10.2.0.\n \nSyntax\n------ \nROW_NUMBER() OVER (\n [ PARTITION BY partition_expression ]\n [ ORDER BY order_list ]\n) \n \nDescription\n----------- \nROW_NUMBER() is a window function that displays the number\nof a given row, starting at one and following the ORDER BY\nsequence of the window function, with identical values\nreceiving different row numbers. It is similar to the RANK()\nand DENSE_RANK() functions except that in that function,\nidentical values will receive the same rank for each result.\n \nExamples\n-------- \nThe distinction between DENSE_RANK(), RANK() and\nROW_NUMBER():\n \nCREATE TABLE student(course VARCHAR(10), mark int, name\nvarchar(10));\n \nINSERT INTO student VALUES \n (\'Maths\', 60, \'Thulile\'),\n (\'Maths\', 60, \'Pritha\'),\n (\'Maths\', 70, \'Voitto\'),\n (\'Maths\', 55, \'Chun\'),\n (\'Biology\', 60, \'Bilal\'),\n (\'Biology\', 70, \'Roger\');\n \nSELECT \n RANK() OVER (PARTITION BY course ORDER BY mark DESC) AS\nrank, \n DENSE_RANK() OVER (PARTITION BY course ORDER BY mark DESC)\nAS dense_rank, \n ROW_NUMBER() OVER (PARTITION BY course ORDER BY mark DESC)\nAS row_num, \n course, mark, name \nFROM student ORDER BY course, mark DESC;\n \n+------+------------+---------+---------+------+---------+\n| rank | dense_rank | row_num | course | mark | name |\n+------+------------+---------+---------+------+---------+\n| 1 | 1 | 1 | Biology | 70 | Roger |\n| 2 | 2 | 2 | Biology | 60 | Bilal |\n| 1 | 1 | 1 | Maths | 70 | Voitto |\n| 2 | 2 | 2 | Maths | 60 | Thulile |\n| 2 | 2 | 3 | Maths | 60 | Pritha |\n| 4 | 3 | 4 | Maths | 55 | Chun |\n+------+------------+---------+---------+------+---------+\n \n\n\nURL: https://mariadb.com/kb/en/row_number/','','https://mariadb.com/kb/en/row_number/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (739,43,'SPIDER_BG_DIRECT_SQL','Syntax\n------ \nSPIDER_BG_DIRECT_SQL(\'sql\', \'tmp_table_list\',\n\'parameters\')\n \nDescription\n----------- \nExecutes the given SQL statement in the background on the\nremote server, as defined in the parameters listing. If the\nquery returns a result-set, it sttores the results in the\ngiven temporary table. When the given SQL statement executes\nsuccessfully, this function returns the number of called\nUDF\'s. It returns 0 when the given SQL statement fails.\n \nThis function is a UDF installed with the Spider storage\nengine.\n \nExamples\n-------- \nSELECT SPIDER_BG_DIRECT_SQL(\'SELECT * FROM example_table\',\n\'\', \n \'srv \"node1\", port \"8607\"\') AS \"Direct Query\";\n+--------------+\n| Direct Query | \n+--------------+\n| 1 |\n+--------------+\n \nParameters\n \nerror_rw_mode\n \nDescription: Returns empty results on network error.\n0 : Return error on getting network error.\n1: Return 0 records on getting network error.\n \nDefault Table Value: 0\nDSN Parameter Name: erwm\n \n\n\nURL: https://mariadb.com/kb/en/spider_bg_direct_sql/','','https://mariadb.com/kb/en/spider_bg_direct_sql/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (740,43,'SPIDER_COPY_TABLES','Syntax\n------ \nSPIDER_COPY_TABLES(spider_table_name, \n source_link_id, destination_link_id_list [,parameters])\n \nDescription\n----------- \nA UDF installed with the Spider Storage Engine, this\nfunction copies table data from source_link_id to\ndestination_link_id_list. The service does not need to be\nstopped in order to copy.\n \nIf the Spider table is partitioned, the name must be of the\nformat table_name#P#partition_name. The partition name can\nbe viewed in the mysql.spider_tables table, for example:\n \nSELECT table_name FROM mysql.spider_tables;\n+-------------+\n| table_name |\n+-------------+\n| spt_a#P#pt1 |\n| spt_a#P#pt2 |\n| spt_a#P#pt3 |\n+-------------+\n \nReturns 1 if the data was copied successfully, or 0 if\ncopying the data failed.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/spider_copy_tables/','','https://mariadb.com/kb/en/spider_copy_tables/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (741,43,'SPIDER_DIRECT_SQL','Syntax\n------ \nSPIDER_DIRECT_SQL(\'sql\', \'tmp_table_list\',\n\'parameters\')\n \nDescription\n----------- \nA UDF installed with the Spider Storage Engine, this\nfunction is used to execute the SQL string sql on the remote\nserver, as defined in parameters. If any resultsets are\nreturned, they are stored in the tmp_table_list.\n \nThe function returns 1 if the SQL executes successfully, or\n0 if it fails.\n \nExamples\n-------- \nSELECT SPIDER_DIRECT_SQL(\'SELECT * FROM s\', \'\', \'srv\n\"node1\", port \"8607\"\');\n+----------------------------------------------------------------------+\n| SPIDER_DIRECT_SQL(\'SELECT * FROM s\', \'\', \'srv\n\"node1\", port \"8607\"\') |\n+----------------------------------------------------------------------+\n| 1 |\n+----------------------------------------------------------------------+\n \n\n\nURL: https://mariadb.com/kb/en/spider_direct_sql/','','https://mariadb.com/kb/en/spider_direct_sql/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (742,43,'SPIDER_FLUSH_TABLE_MON_CACHE','Syntax\n------ \nSPIDER_FLUSH_TABLE_MON_CACHE()\n \nDescription\n----------- \nA UDF installed with the Spider Storage Engine, this\nfunction is used for refreshing monitoring server\ninformation. It returns a value of 1.\n \nExamples\n-------- \nSELECT SPIDER_FLUSH_TABLE_MON_CACHE();\n+--------------------------------+\n| SPIDER_FLUSH_TABLE_MON_CACHE() |\n+--------------------------------+\n| 1 |\n+--------------------------------+\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/spider_flush_table_mon_cache/','','https://mariadb.com/kb/en/spider_flush_table_mon_cache/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (743,44,'COLUMN_ADD','The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_ADD(dyncol_blob, column_nr, value [as type],\n[column_nr, value [as type]]...);\nCOLUMN_ADD(dyncol_blob, column_name, value [as type],\n[column_name, value [as type]]...);\n \nDescription\n----------- \nAdds or updates dynamic columns.\ndyncol_blob must be either a valid dynamic columns blob (for\nexample, COLUMN_CREATE returns such blob), or an empty\nstring.\ncolumn_name specifies the name of the column to be added. If\ndyncol_blob already has a column with this name, it will be\noverwritten.\nvalue specifies the new value for the column. Passing a NULL\nvalue will cause the column to be deleted.\nas type is optional. See #datatypes section for a discussion\nabout types.\n \nThe return value is a dynamic column blob after the\nmodifications.\n \nExamples\n-------- \n-- MariaDB 5.3+:\nUPDATE tbl SET dyncol_blob=COLUMN_ADD(dyncol_blob, 1\n/*column id*/, \"value\") WHERE id=1;\n \n-- MariaDB 10.0.1+:\nUPDATE t1 SET dyncol_blob=COLUMN_ADD(dyncol_blob,\n\"column_name\", \"value\") WHERE id=1;\n \nNote: COLUMN_ADD() is a regular function (just like\nCONCAT()), hence, in order to update the value in the table\nyou have to use the UPDATE ... SET\ndynamic_col=COLUMN_ADD(dynamic_col,\n....) pattern.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_add/','','https://mariadb.com/kb/en/column_add/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (744,44,'COLUMN_CHECK','The COLUMN_CHECK function was added in MariaDB 10.0.1.\n \nSyntax\n------ \nCOLUMN_CHECK(dyncol_blob);\n \nDescription\n----------- \nCheck if dyncol_blob is a valid packed dynamic columns blob.\nReturn value of 1 means the blob is valid, return value of 0\nmeans it is not.\n \nRationale:\nNormally, one works with valid dynamic column blobs.\nFunctions like COLUMN_CREATE, COLUMN_ADD, COLUMN_DELETE\nalways return valid dynamic column blobs. However, if a\ndynamic column blob is accidentally truncated, or transcoded\nfrom one character set to another, it will be corrupted.\nThis function can be used to check if a value in a blob\nfield is a valid dynamic column blob.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_check/','','https://mariadb.com/kb/en/column_check/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (745,44,'COLUMN_CREATE','The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_CREATE(column_nr, value [as type], [column_nr, value\n[as type]]...);\nCOLUMN_CREATE(column_name, value [as type], [column_name,\nvalue [as type]]...);\n \nDescription\n----------- \nReturns a dynamic columns blob that stores the specified\ncolumns with values.\n \nThe return value is suitable for \nstoring in a table\nfurther modification with other dynamic columns functions\n \nThe as type part allows one to specify the value type. In\nmost cases,\nthis is redundant because MariaDB will be able to deduce the\ntype of the\nvalue. Explicit type specification may be needed when the\ntype of the value is\nnot apparent. For example, a literal \'2012-12-01\' has a\nCHAR type by\ndefault, one will need to specify \'2012-12-01\' AS DATE to\nhave it stored as\na date. See Dynamic Columns:Datatypes for further details.\n \nExamples\n-------- \n-- MariaDB 5.3+:\nINSERT INTO tbl SET dyncol_blob=COLUMN_CREATE(1 /*column\nid*/, \"value\");\n-- MariaDB 10.0.1+:\nINSERT INTO tbl SET\ndyncol_blob=COLUMN_CREATE(\"column_name\", \"value\");\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_create/','','https://mariadb.com/kb/en/column_create/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (746,44,'COLUMN_DELETE','The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_DELETE(dyncol_blob, column_nr, column_nr...);\nCOLUMN_DELETE(dyncol_blob, column_name, column_name...);\n \nDescription\n----------- \nDeletes a dynamic column with the specified name. Multiple\nnames can be given. The return value is a dynamic column\nblob after the modification.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_delete/','','https://mariadb.com/kb/en/column_delete/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (747,44,'COLUMN_EXISTS','The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_EXISTS(dyncol_blob, column_nr);\nCOLUMN_EXISTS(dyncol_blob, column_name);\n \nDescription\n----------- \nChecks if a column with name column_name exists in\ndyncol_blob. If yes, return 1, otherwise return 0. See\ndynamic columns for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_exists/','','https://mariadb.com/kb/en/column_exists/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (748,44,'COLUMN_GET','The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_GET(dyncol_blob, column_nr as type);\nCOLUMN_GET(dyncol_blob, column_name as type);\n \nDescription\n----------- \nGets the value of a dynamic column by its name. If no column\nwith the given name exists, NULL will be returned.\n \ncolumn_name as type requires that one specify the datatype\nof the dynamic column they are reading. \n \nThis may seem counter-intuitive: why would one need to\nspecify which datatype they\'re retrieving? Can\'t the\ndynamic columns system figure the datatype from the data\nbeing stored?\n \nThe answer is: SQL is a statically-typed language. The SQL\ninterpreter needs to know the datatypes of all expressions\nbefore the query is run (for example, when one is using\nprepared statements and runs \"select COLUMN_GET(...)\", the\nprepared statement API requires the server to inform the\nclient about the datatype of the column being read before\nthe query is executed and the server can see what datatype\nthe column actually has).\n \nA note about lengths\n \nIf you\'re running queries like:\n \nSELECT COLUMN_GET(blob, \'colname\' as CHAR) ...\n \nwithout specifying a maximum length (i.e. using #as CHAR#,\nnot as CHAR(n)), MariaDB will report the maximum length of\nthe resultset column to be 53,6870,911 for MariaDB\n5.3-10.0.0 and 16,777,216 for MariaDB 10.0.1+. This may\ncause excessive memory usage in some client libraries,\nbecause they try to pre-allocate a buffer of maximum\nresultset width. To avoid this problem, use CHAR(n) whenever\nyou\'re using COLUMN_GET in the select list.\n \nSee Dynamic Columns:Datatypes for more information about\ndatatypes.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_get/','','https://mariadb.com/kb/en/column_get/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (749,44,'COLUMN_JSON','COLUMN_JSON was introduced in MariaDB 10.0.1\n \nSyntax\n------ \nCOLUMN_JSON(dyncol_blob)\n \nDescription\n----------- \nReturns a JSON representation of data in dyncol_blob. Can\nalso be used to display nested columns. See dynamic columns\nfor more information.\n \nExample\n \nselect item_name, COLUMN_JSON(dynamic_cols) from assets;\n+-----------------+----------------------------------------+\n| item_name | COLUMN_JSON(dynamic_cols) |\n+-----------------+----------------------------------------+\n| MariaDB T-shirt | {\"size\":\"XL\",\"color\":\"blue\"} |\n| Thinkpad Laptop | {\"color\":\"black\",\"warranty\":\"3\nyears\"} |\n+-----------------+----------------------------------------+\n \nLimitation: COLUMN_JSON will decode nested dynamic columns\nat a nesting level of not more than 10 levels deep. Dynamic\ncolumns that are nested deeper than 10 levels will be shown\nas BINARY string, without encoding.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_json/','','https://mariadb.com/kb/en/column_json/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (750,44,'COLUMN_LIST','The Dynamic columns feature was introduced in MariaDB 5.3.\n \nSyntax\n------ \nCOLUMN_LIST(dyncol_blob);\n \nDescription\n----------- \nSince MariaDB 10.0.1, this function returns a\ncomma-separated list of column names. The names are quoted\nwith backticks.\n \nBefore MariaDB 10.0.1, it returned a comma-separated list of\ncolumn numbers, not names.\n \nSee dynamic columns for more information.\n \n\n \n \n \n \n \n \n \n\nURL: https://mariadb.com/kb/en/column_list/','','https://mariadb.com/kb/en/column_list/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (751,46,'Instant ADD COLUMN for InnoDB','Instant ALTER TABLE ... ADD COLUMN for InnoDB was introduced\nin MariaDB 10.3.2. The INSTANT option for the ALGORITHM\nclause was introduced in MariaDB 10.3.7.\n \nNormally, adding a column to a table requires the full table\nto be rebuilt. The complexity of the operation is\nproportional to the size of the table, or O(n·m) where n is\nthe number of rows in the table and m is the number of\nindexes. \n \nIn MariaDB 10.0 and later, the ALTER TABLE statement\nsupports online DDL for storage engines that have\nimplemented the relevant online DDL algorithms and locking\nstrategies.\n \nThe InnoDB storage engine has implemented online DDL for\nmany operations. These online DDL optimizations allow\nconcurrent DML to the table in many cases, even if the table\nneeds to be rebuilt.\n \nSee InnoDB Online DDL Overview for more information about\nonline DDL with InnoDB.\n \nAllowing concurrent DML during the operation does not solve\nall problems. When a column was added to a table with the\nolder in-place optimization, the resulting table rebuild\ncould still significantly increase the I/O and memory\nconsumption and cause replication lag.\n \nIn contrast, with the new instant ALTER TABLE ... ADD\nCOLUMN, all that is needed is an O(log n) operation to\ninsert a special hidden record into the table, and an update\nof the data dictionary. For a large table, instead of taking\nseveral hours, the operation would be completed in the blink\nof an eye. The ALTER TABLE ... ADD COLUMN operation is only\nslightly more expensive than a regular INSERT, due to\nlocking constraints.\n \nIn the past, some developers may have implemented a kind of\n\"instant add column\" in the application by encoding\nmultiple columns in a single TEXT or BLOB column. MariaDB\nDynamic Columns was an early example of that. A more recent\nexample is JSON and related string manipulation functions.\n \nAdding real columns has the following advantages over\nencoding columns into a single \"expandable\" column:\nEfficient storage in a native binary format\nData type safety\nIndexes can be built natively\nConstraints are available: UNIQUE, CHECK, FOREIGN KEY\nDEFAULT values can be specified\nTriggers can be written more easily\n \nWith instant ALTER TABLE ... ADD COLUMN, you can enjoy all\nthe benefits of structured storage without the drawback of\nhaving to rebuild the table.\n \nInstant ALTER TABLE ... ADD COLUMN is available for both old\nand new InnoDB tables. Basically you can just upgrade from\nMySQL 5.x or MariaDB and start adding columns instantly.\n \nColumns instantly added to a table exist in a separate data\nstructure from the main table definition, similar to how\nInnoDB separates BLOB columns. If the table ever becomes\nempty, (such as from TRUNCATE or DELETE statements), InnoDB\nincorporates the instantly added columns into the main table\ndefinition. See InnoDB Online DDL Operations with\nALGORITHM=INSTANT: Non-canonical Storage Format Caused by\nSome Operations for more information.\n \nThe operation is also crash safe. If the server is killed\nwhile executing an instant ALTER TABLE ... ADD COLUMN, when\nthe table is restored InnoDB integrates the new column,\nflattening the table definition.\n \nLimitations\n \nIn MariaDB 10.3, instant ALTER TABLE ... ADD COLUMN only\napplies when the added columns appear last in the table. The\nplace specifier LAST is the default. If AFTER col is\nspecified, then col must be the last column, or the\noperation will require the table to be rebuilt. In MariaDB\n10.4, this restriction has been lifted.\n \nIf the table contains a hidden FTS_DOC_ID column due to a\nFULLTEXT INDEX, then instant ALTER TABLE ... ADD COLUMN will\nnot be possible.\n \nInnoDB data files after instant ALTER TABLE ... ADD COLUMN\ncannot be imported to older versions of MariaDB or MySQL\nwithout first being rebuilt.\n \nAfter using Instant ALTER TABLE ... ADD COLUMN, any\ntable-rebuilding operation such as ALTER TABLE … FORCE\nwill incorporate instantaneously added columns into the main\ntable body.\n \nInstant ALTER TABLE ... ADD COLUMN is not available for\nROW_FORMAT=COMPRESSED.\n \nIn MariaDB 10.3, ALTER TABLE … DROP COLUMN requires the\ntable to be rebuilt. In MariaDB 10.4, this restriction has\nbeen lifted.\n \nExample\n \nCREATE TABLE t(id INT PRIMARY KEY, u INT UNSIGNED NOT NULL\nUNIQUE)\nENGINE=InnoDB;\n \nINSERT INTO t(id,u) VALUES(1,1),(2,2),(3,3);\n \nALTER TABLE t ADD COLUMN\n(d DATETIME DEFAULT current_timestamp(),\n p POINT NOT NULL DEFAULT ST_GeomFromText(\'POINT(0 0)\'),\n t TEXT CHARSET utf8 DEFAULT \'The quick brown fox jumps\nover the lazy dog\');\n \nUPDATE t SET t=NULL WHERE id=3;\n \nSELECT id,u,d,ST_AsText(p),t FROM t;\n \nSELECT variable_value FROM information_schema.global_status\nWHERE variable_name = \'innodb_instant_alter_column\';\n \nThe above example illustrates that when the added columns\nare declared NOT NULL, a DEFAULT value must be available,\neither implied by the data type or set explicitly by the\nuser. The expression need not be constant, but it must not\nrefer to the columns of the table, such as DEFAULT u+1 (a\nMariaDB extension). The DEFAULT current_timestamp() would be\nevaluated at the time of the ALTER TABLE and apply to each\nrow, like it does for non-instant ALTER TABLE. If a\nsubsequent ALTER TABLE changes the DEFAULT value for\nsubsequent INSERT, the values of the columns in existing\nrecords will naturally be unaffected.\n \nThe design was brainstormed in April by engineers from\nMariaDB Corporation, Alibaba and Tencent. A prototype was\ndeveloped by Vin Chen (陈ç¦è£) from the Tencent Game DBA\nTeam.\n \n\n \n \n \n \n \n \n \n\nURL:\nhttps://mariadb.com/kb/en/instant-add-column-for-innodb/','','https://mariadb.com/kb/en/instant-add-column-for-innodb/');
+insert into help_topic (help_topic_id,help_category_id,name,description,example,url) values (752,48,'Full-Text Index Overview','MariaDB has support for full-text indexing and searching:\nA full-text index in MariaDB is an index of type FULLTEXT,\nand it allows more options when searching for portions of\ntext from a field.\nFull-text indexes can be used only with MyISAM and Aria\ntables, from MariaDB 10.0.5 with InnoDB tables and from\nMariaDB 10.0.15 with Mroonga tables, and can be created only\nfor CHAR, VARCHAR, or TEXT columns.\nPartitioned tables cannot contain fulltext indexes, even if\nthe storage engine supports them.\nA FULLTEXT index definition can be given in the CREATE TABLE\nstatement when a\n table is created, or added later using ALTER TABLE or\nCREATE INDEX.\nFor large data sets, it is much faster to load your data\ninto a table that\n has no FULLTEXT index and then create the index after that,\nthan to load data\n into a table that has an existing FULLTEXT index.\n \nFull-text searching is performed using MATCH() ... AGAINST\nsyntax.\nMATCH() takes a comma-separated list that names the columns\nto be\nsearched. AGAINST takes a string to search for, and an\noptional\nmodifier that indicates what type of search to perform. The\nsearch\nstring must be a literal string, not a variable or a column\nname.\n \nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n \nExcluded Results\n \nPartial words are excluded.\nWords less than 4 characters in length (3 or less) will not\nbe stored in the fulltext index. This value can be adjusted\nby changing the ft_min_word_length system variable (or, for\nInnoDB, innodb_ft_min_token_size).\nWords longer than 84 characters in length will also not be\nstored in the fulltext index. This values can be adjusted by\nchanging the ft_max_word_length system variable (or, for\nInnoDB, innodb_ft_max_token_size).\nStopwords are a list of common words such as \"once\" or\n\"then\" that do not reflect in the search results unless IN\nBOOLEAN MODE is used. The stopword list for MyISAM/Aria\ntables and InnoDB tables can differ. See stopwords for\ndetails and a full list, as well as for details on how to\nchange the default list.\nFor MyISAM/Aria fulltext indexes only, if a word appears in\nmore than half the rows, it is also excluded from the\nresults of a fulltext search.\nFor InnoDB indexes, only committed rows appear -\nmodifications from the current transaction do not apply.\n \nRelevance\n \nMariaDB calculates a relevance for each result, based on a\nnumber of factors, including the number of words in the\nindex, the number of unique words in a row, the total number\nof words in both the index and the result, and the weight of\nthe word. In English, \'cool\' will be weighted less than\n\'dandy\', at least at present! The relevance can be\nreturned as part of a query simply by using the MATCH\nfunction in the field list.\n \nTypes of Full-Text search\n \nIN NATURAL LANGUAGE MODE\n \nIN NATURAL LANGUAGE MODE is the default type of full-text\nsearch, and the keywords can be omitted. There are no\nspecial operators, and searches consist of one or more\ncomma-separated keywords.\n \nSearches are returned in descending order of relevance.\n \nIN BOOLEAN MODE\n \nBoolean search permits the use of a number of special\noperators:\n \nOperator | Description | \n \n+ | The word is mandatory in all rows returned. | \n \n- | The word cannot appear in any row returned. | \n \n< | The word that follows has a lower relevance than other\nwords, although rows containing it will still match | \n \n> | The word that follows has a higher relevance than other\nwords. | \n \n() | Used to group words into subexpressions. | \n \n~ | The word following contributes negatively to the\nrelevance of the row (which is different to the \'-\'\noperator, which specifically excludes the word, or the \'\n\nURL: https://mariadb.com/kb/en/full-text-index-overview/','','https://mariadb.com/kb/en/full-text-index-overview/');
+insert into help_keyword (help_keyword_id,name) values (1,'account');
+insert into help_keyword (help_keyword_id,name) values (2,'aggregate');
+insert into help_keyword (help_keyword_id,name) values (3,'add');
+insert into help_keyword (help_keyword_id,name) values (4,'after');
+insert into help_keyword (help_keyword_id,name) values (5,'alter');
+insert into help_keyword (help_keyword_id,name) values (6,'completion');
+insert into help_keyword (help_keyword_id,name) values (7,'schedule');
+insert into help_keyword (help_keyword_id,name) values (8,'server');
+insert into help_keyword (help_keyword_id,name) values (9,'columns');
+insert into help_keyword (help_keyword_id,name) values (10,'drop');
+insert into help_keyword (help_keyword_id,name) values (11,'analyze');
+insert into help_keyword (help_keyword_id,name) values (12,'json');
+insert into help_keyword (help_keyword_id,name) values (13,'value');
+insert into help_keyword (help_keyword_id,name) values (14,'master_ssl_ca');
+insert into help_keyword (help_keyword_id,name) values (15,'master_ssl_verify_cert');
+insert into help_keyword (help_keyword_id,name) values (16,'nchar');
+insert into help_keyword (help_keyword_id,name) values (17,'action');
+insert into help_keyword (help_keyword_id,name) values (18,'create');
+insert into help_keyword (help_keyword_id,name) values (19,'at');
+insert into help_keyword (help_keyword_id,name) values (20,'starts');
+insert into help_keyword (help_keyword_id,name) values (21,'returns');
+insert into help_keyword (help_keyword_id,name) values (22,'host');
+insert into help_keyword (help_keyword_id,name) values (23,'row_format');
+insert into help_keyword (help_keyword_id,name) values (24,'deallocate prepare');
+insert into help_keyword (help_keyword_id,name) values (25,'drop prepare');
+insert into help_keyword (help_keyword_id,name) values (26,'against');
+insert into help_keyword (help_keyword_id,name) values (27,'fulltext');
+insert into help_keyword (help_keyword_id,name) values (28,'escape');
+insert into help_keyword (help_keyword_id,name) values (29,'mode');
+insert into help_keyword (help_keyword_id,name) values (30,'repeat');
+insert into help_keyword (help_keyword_id,name) values (31,'sql_big_result');
+insert into help_keyword (help_keyword_id,name) values (32,'isolation');
+insert into help_keyword (help_keyword_id,name) values (33,'read committed');
+insert into help_keyword (help_keyword_id,name) values (34,'read uncommitted');
+insert into help_keyword (help_keyword_id,name) values (35,'repeatable read');
+insert into help_keyword (help_keyword_id,name) values (36,'serializable');
+insert into help_keyword (help_keyword_id,name) values (37,'work');
+insert into help_relation (help_topic_id,help_keyword_id) values (95,14);
+insert into help_relation (help_topic_id,help_keyword_id) values (95,15);
+insert into help_relation (help_topic_id,help_keyword_id) values (97,24);
+insert into help_relation (help_topic_id,help_keyword_id) values (97,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (97,25);
+insert into help_relation (help_topic_id,help_keyword_id) values (108,32);
+insert into help_relation (help_topic_id,help_keyword_id) values (108,33);
+insert into help_relation (help_topic_id,help_keyword_id) values (108,34);
+insert into help_relation (help_topic_id,help_keyword_id) values (108,35);
+insert into help_relation (help_topic_id,help_keyword_id) values (108,36);
+insert into help_relation (help_topic_id,help_keyword_id) values (110,37);
+insert into help_relation (help_topic_id,help_keyword_id) values (116,1);
+insert into help_relation (help_topic_id,help_keyword_id) values (118,1);
+insert into help_relation (help_topic_id,help_keyword_id) values (118,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (119,1);
+insert into help_relation (help_topic_id,help_keyword_id) values (119,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (120,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (127,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (183,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (184,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (185,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (186,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (187,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (188,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (189,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (190,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (191,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (192,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (193,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (194,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (196,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (197,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (199,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (251,11);
+insert into help_relation (help_topic_id,help_keyword_id) values (258,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (258,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (258,21);
+insert into help_relation (help_topic_id,help_keyword_id) values (259,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (264,13);
+insert into help_relation (help_topic_id,help_keyword_id) values (271,16);
+insert into help_relation (help_topic_id,help_keyword_id) values (280,12);
+insert into help_relation (help_topic_id,help_keyword_id) values (316,30);
+insert into help_relation (help_topic_id,help_keyword_id) values (317,13);
+insert into help_relation (help_topic_id,help_keyword_id) values (320,13);
+insert into help_relation (help_topic_id,help_keyword_id) values (357,9);
+insert into help_relation (help_topic_id,help_keyword_id) values (419,13);
+insert into help_relation (help_topic_id,help_keyword_id) values (435,13);
+insert into help_relation (help_topic_id,help_keyword_id) values (436,29);
+insert into help_relation (help_topic_id,help_keyword_id) values (436,31);
+insert into help_relation (help_topic_id,help_keyword_id) values (444,11);
+insert into help_relation (help_topic_id,help_keyword_id) values (446,11);
+insert into help_relation (help_topic_id,help_keyword_id) values (447,11);
+insert into help_relation (help_topic_id,help_keyword_id) values (447,12);
+insert into help_relation (help_topic_id,help_keyword_id) values (448,12);
+insert into help_relation (help_topic_id,help_keyword_id) values (449,12);
+insert into help_relation (help_topic_id,help_keyword_id) values (607,28);
+insert into help_relation (help_topic_id,help_keyword_id) values (614,26);
+insert into help_relation (help_topic_id,help_keyword_id) values (614,29);
+insert into help_relation (help_topic_id,help_keyword_id) values (625,30);
+insert into help_relation (help_topic_id,help_keyword_id) values (645,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (646,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (646,6);
+insert into help_relation (help_topic_id,help_keyword_id) values (646,7);
+insert into help_relation (help_topic_id,help_keyword_id) values (647,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (648,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (649,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (650,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (651,8);
+insert into help_relation (help_topic_id,help_keyword_id) values (652,3);
+insert into help_relation (help_topic_id,help_keyword_id) values (652,4);
+insert into help_relation (help_topic_id,help_keyword_id) values (652,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (652,9);
+insert into help_relation (help_topic_id,help_keyword_id) values (652,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (653,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (654,5);
+insert into help_relation (help_topic_id,help_keyword_id) values (655,17);
+insert into help_relation (help_topic_id,help_keyword_id) values (656,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (657,19);
+insert into help_relation (help_topic_id,help_keyword_id) values (657,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (657,6);
+insert into help_relation (help_topic_id,help_keyword_id) values (657,7);
+insert into help_relation (help_topic_id,help_keyword_id) values (657,20);
+insert into help_relation (help_topic_id,help_keyword_id) values (658,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (659,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (660,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (661,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (662,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (663,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (664,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (664,22);
+insert into help_relation (help_topic_id,help_keyword_id) values (665,17);
+insert into help_relation (help_topic_id,help_keyword_id) values (665,9);
+insert into help_relation (help_topic_id,help_keyword_id) values (665,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (665,23);
+insert into help_relation (help_topic_id,help_keyword_id) values (666,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (667,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (668,18);
+insert into help_relation (help_topic_id,help_keyword_id) values (669,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (670,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (671,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (672,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (673,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (674,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (675,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (676,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (677,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (678,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (680,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (681,10);
+insert into help_relation (help_topic_id,help_keyword_id) values (724,2);
+insert into help_relation (help_topic_id,help_keyword_id) values (751,3);
+insert into help_relation (help_topic_id,help_keyword_id) values (752,26);
+insert into help_relation (help_topic_id,help_keyword_id) values (752,27);
+insert into help_relation (help_topic_id,help_keyword_id) values (753,27);
+unlock tables;
diff --git a/scripts/maria_add_gis_sp.sql.in b/scripts/maria_add_gis_sp.sql.in
index 412b83e3d78..682cf52de22 100644
--- a/scripts/maria_add_gis_sp.sql.in
+++ b/scripts/maria_add_gis_sp.sql.in
@@ -23,12 +23,12 @@ SET sql_mode='';
DROP PROCEDURE IF EXISTS AddGeometryColumn;
DROP PROCEDURE IF EXISTS DropGeometryColumn;
-CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
+CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@
-CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
+CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@
diff --git a/scripts/mysql_config.pl.in b/scripts/mysql_config.pl.in
index fec9bc648f5..e161d4a1bee 100644
--- a/scripts/mysql_config.pl.in
+++ b/scripts/mysql_config.pl.in
@@ -201,7 +201,7 @@ $flags->{libs} =
$flags->{libs_r} =
[@ldflags,@lib_r_opts,'@ZLIB_DEPS@','@LIBS@','@openssl_libs@'];
$flags->{embedded_libs} =
- [@ldflags,@lib_e_opts,'@LIBDL@','@ZLIB_DEPS@','@LIBS@','@WRAPLIBS@','@openssl_libs@'];
+ [@ldflags,@lib_e_opts,'@CMAKE_DL_LIBS@','@ZLIB_DEPS@','@LIBS@','@WRAPLIBS@','@openssl_libs@'];
$flags->{include} = ["-I$pkgincludedir"];
$flags->{cflags} = [@{$flags->{include}},split(" ",'@CFLAGS@')];
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 4c6376142cc..7e6e256db70 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -38,8 +38,8 @@ force=0
in_rpm=0
ip_only=0
cross_bootstrap=0
-auth_root_authentication_method=normal
-auth_root_socket_user='root'
+auth_root_authentication_method=socket
+auth_root_socket_user=""
skip_test_db=0
dirname0=`dirname $0 2>/dev/null`
@@ -50,17 +50,17 @@ usage()
cat <<EOF
Usage: $0 [OPTIONS]
--auth-root-authentication-method=normal|socket
- Chooses the authentication method for the created initial
- root user. The default is 'normal' to creates a root user
- that can login without password, which can be insecure.
- The alternative 'socket' allows only the system root user
- to login as MariaDB root; this requires the unix socket
- authentication plugin.
+ Chooses the authentication method for the created
+ initial root user. The historical behavior is 'normal'
+ to creates a root user that can login without password,
+ which can be insecure. The default behavior 'socket'
+ sets an invalid root password but allows the system root
+ user to login as MariaDB root without a password.
--auth-root-socket-user=user
Used with --auth-root-authentication-method=socket. It
- specifies the name of the MariaDB root account, as well
- as of the system account allowed to access it. Defaults
- to 'root'.
+ specifies the name of the second MariaDB root account,
+ as well as of the system account allowed to access it.
+ Defaults to the value of --user.
--basedir=path The path to the MariaDB installation directory.
--builddir=path If using --srcdir with out-of-directory builds, you
will need to set this to the location of the build
@@ -300,6 +300,11 @@ then
elif test -n "$dirname0" -a -x "$dirname0/@bindir@/my_print_defaults"
then
print_defaults="$dirname0/@bindir@/my_print_defaults"
+elif test -x "./extra/my_print_defaults"
+then
+ srcdir="."
+ builddir="."
+ print_defaults="./extra/my_print_defaults"
else
print_defaults="@bindir@/my_print_defaults"
fi
@@ -312,7 +317,8 @@ fi
# Now we can get arguments from the groups [mysqld] and [mysql_install_db]
# in the my.cfg file, then re-run to merge with command line arguments.
-parse_arguments `"$print_defaults" $defaults $defaults_group_suffix --mysqld mysql_install_db`
+parse_arguments `"$print_defaults" $defaults $defaults_group_suffix --mysqld mysql_install_db mariadb-install-db`
+
parse_arguments PICK-ARGS-FROM-ARGV "$@"
rel_mysqld="$dirname0/@INSTALL_SBINDIR@/mysqld"
@@ -328,6 +334,7 @@ then
srcpkgdatadir="$srcdir/scripts"
buildpkgdatadir="$builddir/scripts"
plugindir="$builddir/plugin/auth_socket"
+ pamtooldir="$builddir/plugin/auth_pam"
elif test -n "$basedir"
then
bindir="$basedir/bin" # only used in the help text
@@ -356,7 +363,8 @@ then
cannot_find_file fill_help_tables.sql @pkgdata_locations@
exit 1
fi
- plugindir=`find_in_dirs --dir auth_socket.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin`
+ plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin $basedir/lib/*/mariadb19/plugin`
+ pamtooldir=$plugindir
# relative from where the script was run for a relocatable install
elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mysqld"
then
@@ -367,6 +375,7 @@ then
srcpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
buildpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
plugindir="$basedir/@INSTALL_PLUGINDIR@"
+ pamtooldir=$plugindir
else
basedir="@prefix@"
bindir="@bindir@"
@@ -375,6 +384,7 @@ else
srcpkgdatadir="@pkgdatadir@"
buildpkgdatadir="@pkgdatadir@"
plugindir="@pkgplugindir@"
+ pamtooldir="@pkgplugindir@"
fi
# Set up paths to SQL scripts required for bootstrap
@@ -480,6 +490,25 @@ done
if test -n "$user"
then
+ if test -z "$srcdir" -a "$in_rpm" -eq 0
+ then
+ chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \
+ chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"
+ if test $? -ne 0
+ then
+ echo "Couldn't set an owner to '$pamtooldir/auth_pam_tool_dir/auth_pam_tool'."
+ echo "It must be root, the PAM authentication plugin doesn't work otherwise.."
+ echo
+ fi
+ chown $user "$pamtooldir/auth_pam_tool_dir" && \
+ chmod 0700 "$pamtooldir/auth_pam_tool_dir"
+ if test $? -ne 0
+ then
+ echo "Cannot change ownership of the '$pamtooldir/auth_pam_tool_dir' directory"
+ echo "to the '$user' user. Check that you have the necessary permissions and try again."
+ echo
+ fi
+ fi
args="$args --user=$user"
fi
@@ -489,6 +518,13 @@ fi
# args="$args --group=$group"
#fi
+if test -f "$ldata/mysql/user.frm"
+then
+ echo "mysql.user table already exists!"
+ echo "Run mysql_upgrade, not mysql_install_db"
+ exit 0
+fi
+
# When doing a "cross bootstrap" install, no reference to the current
# host should be added to the system tables. So we filter out any
# lines which contain the current host name.
@@ -510,6 +546,11 @@ mysqld_install_cmd_line()
--net_buffer_length=16K
}
+# Use $auth_root_socket_user if explicitly specified.
+# Otherwise use the owner of datadir - ${user:-$USER}
+# Use 'root' as a fallback
+auth_root_socket_user=${auth_root_socket_user:-${user:-${USER:-root}}}
+
cat_sql()
{
echo "create database if not exists mysql;"
@@ -517,11 +558,9 @@ cat_sql()
case "$auth_root_authentication_method" in
normal)
- echo "SET @skip_auth_root_nopasswd=NULL;"
echo "SET @auth_root_socket=NULL;"
;;
socket)
- echo "SET @skip_auth_root_nopasswd=1;"
echo "SET @auth_root_socket='$auth_root_socket_user';"
;;
esac
@@ -597,6 +636,16 @@ then
echo "which will also give you the option of removing the test"
echo "databases and anonymous user created by default. This is"
echo "strongly recommended for production servers."
+ else
+ echo
+ echo
+ echo "Two all-privilege accounts were created."
+ echo "One is root@localhost, it has no password, but you need to"
+ echo "be system 'root' user to connect. Use, for example, sudo mysql"
+ echo "The second is $auth_root_socket_user@localhost, it has no password either, but"
+ echo "you need to be the system '$auth_root_socket_user' user to connect."
+ echo "After connecting you can set the password, if you would need to be"
+ echo "able to connect as any of these users with a password and without sudo"
fi
echo
diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in
deleted file mode 100644
index e4353e57b35..00000000000
--- a/scripts/mysql_secure_installation.pl.in
+++ /dev/null
@@ -1,390 +0,0 @@
-#!@PERL_PATH@
-# -*- cperl -*-
-#
-# Copyright (c) 2007, 2017, Oracle and/or its affiliates.
-#
-# 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
-
-use Fcntl;
-use File::Spec;
-use if $^O eq 'MSWin32', 'Term::ReadKey' => qw/ReadMode/;
-use strict;
-
-my $config = ".my.cnf.$$";
-my $command = ".mysql.$$";
-my $hadpass = 0;
-my $mysql; # How to call the mysql client
-my $rootpass = "";
-
-
-$SIG{QUIT} = $SIG{INT} = $SIG{TERM} = $SIG{ABRT} = $SIG{HUP} = sub {
- print "\nAborting!\n\n";
- echo_on();
- cleanup();
- exit 1;
-};
-
-
-END {
- # Remove temporary files, even if exiting via die(), etc.
- cleanup();
-}
-
-
-sub read_without_echo {
- my ($prompt) = @_;
- print $prompt;
- echo_off();
- my $answer = <STDIN>;
- echo_on();
- print "\n";
- chomp($answer);
- return $answer;
-}
-
-sub echo_on {
- if ($^O eq 'MSWin32') {
- ReadMode('normal');
- } else {
- system("stty echo");
- }
-}
-
-sub echo_off {
- if ($^O eq 'MSWin32') {
- ReadMode('noecho');
- } else {
- system("stty -echo");
- }
-}
-
-sub write_file {
- my $file = shift;
- -f $file or die "ERROR: file is missing \"$file\": $!";
- open(FILE, ">$file") or die "ERROR: can't write to file \"$file\": $!";
- foreach my $line ( @_ ) {
- print FILE $line, "\n"; # Add EOL char
- }
- close FILE;
-}
-
-sub prepare {
- # Locate the mysql client; look in current directory first, then
- # in path
- our $SAVEERR; # Suppress Perl warning message
- open SAVEERR, ">& STDERR";
- close STDERR;
- for my $m (File::Spec->catfile('bin', 'mysql'), 'mysql') {
- # mysql --version should always work
- qx($m --no-defaults --version);
- next unless $? == 0;
-
- $mysql = $m;
- last;
- }
- open STDERR, ">& SAVEERR";
-
- die "Can't find a 'mysql' client in PATH or ./bin\n"
- unless $mysql;
-
- # Create safe files to avoid leaking info to other users
- foreach my $file ( $config, $command ) {
- next if -f $file; # Already exists
- local *FILE;
- sysopen(FILE, $file, O_CREAT, 0600)
- or die "ERROR: can't create $file: $!";
- close FILE;
- }
-}
-
-# Simple escape mechanism (\-escape any ' and \), suitable for two contexts:
-# - single-quoted SQL strings
-# - single-quoted option values on the right hand side of = in my.cnf
-#
-# These two contexts don't handle escapes identically. SQL strings allow
-# quoting any character (\C => C, for any C), but my.cnf parsing allows
-# quoting only \, ' or ". For example, password='a\b' quotes a 3-character
-# string in my.cnf, but a 2-character string in SQL.
-#
-# This simple escape works correctly in both places.
-sub basic_single_escape {
- my ($str) = @_;
- # Inside a character class, \ is not special; this escapes both \ and '
- $str =~ s/([\'])/\\$1/g;
- return $str;
-}
-
-sub do_query {
- my $query = shift;
- write_file($command, $query);
- my $rv = system("$mysql --defaults-file=$config < $command");
- # system() returns -1 if exec fails (e.g., command not found, etc.); die
- # in this case because nothing is going to work
- die "Failed to execute mysql client '$mysql'\n" if $rv == -1;
- # Return true if query executed OK, or false if there was some problem
- # (for example, SQL error or wrong password)
- return ($rv == 0 ? 1 : undef);
-}
-
-sub make_config {
- my $password = shift;
-
- my $esc_pass = basic_single_escape($rootpass);
- write_file($config,
- "# mysql_secure_installation config file",
- "[mysql]",
- "user=root",
- "password='$esc_pass'");
-}
-
-sub get_root_password {
- my $attempts = 3;
- for (;;) {
- my $password = read_without_echo("Enter current password for root (enter for none): ");
- if ( $password ) {
- $hadpass = 1;
- } else {
- $hadpass = 0;
- }
- $rootpass = $password;
- make_config($rootpass);
- last if do_query("");
-
- die "Unable to connect to the server as root user, giving up.\n"
- if --$attempts == 0;
- }
- print "OK, successfully used password, moving on...\n\n";
-}
-
-sub set_root_password {
- my $password1;
- for (;;) {
- $password1 = read_without_echo("New password: ");
-
- if ( !$password1 ) {
- print "Sorry, you can't use an empty password here.\n\n";
- next;
- }
-
- my $password2 = read_without_echo("Re-enter new password: ");
-
- if ( $password1 ne $password2 ) {
- print "Sorry, passwords do not match.\n\n";
- next;
- }
-
- last;
- }
-
- my $esc_pass = basic_single_escape($password1);
- do_query("UPDATE mysql.user SET Password=PASSWORD('$esc_pass') WHERE User='root';")
- or die "Password update failed!\n";
-
- print "Password updated successfully!\n";
- print "Reloading privilege tables..\n";
- reload_privilege_tables()
- or die "Can not continue.\n";
-
- print "\n";
- $rootpass = $password1;
- make_config($rootpass);
-}
-
-sub remove_anonymous_users {
- do_query("DELETE FROM mysql.user WHERE User='';")
- or die print " ... Failed!\n";
- print " ... Success!\n";
-}
-
-sub remove_remote_root {
- if (do_query("DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');")) {
- print " ... Success!\n";
- } else {
- print " ... Failed!\n";
- }
-}
-
-sub remove_test_database {
- print " - Dropping test database...\n";
- if (do_query("DROP DATABASE IF EXISTS test;")) {
- print " ... Success!\n";
- } else {
- print " ... Failed! Not critical, keep moving...\n";
- }
-
- print " - Removing privileges on test database...\n";
- if (do_query("DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'")) {
- print " ... Success!\n";
- } else {
- print " ... Failed! Not critical, keep moving...\n";
- }
-}
-
-sub reload_privilege_tables {
- if (do_query("FLUSH PRIVILEGES;")) {
- print " ... Success!\n";
- return 1;
- } else {
- print " ... Failed!\n";
- return undef;
- }
-}
-
-sub cleanup {
- print "Cleaning up...\n";
-
- foreach my $file ($config, $command) {
- unlink $file or warn "Warning: Could not unlink $file: $!\n";
- }
-}
-
-
-# The actual script starts here
-
-prepare();
-
-print <<HERE;
-
-
-
-NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
- SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
-
-In order to log into MySQL to secure it, we'll need the current
-password for the root user. If you've just installed MySQL, and
-you haven't set the root password yet, the password will be blank,
-so you should just press enter here.
-
-HERE
-
-get_root_password();
-
-
-#
-# Set the root password
-#
-
-print "Setting the root password ensures that nobody can log into the MySQL\n";
-print "root user without the proper authorisation.\n\n";
-
-if ( $hadpass == 0 ) {
- print "Set root password? [Y/n] ";
-} else {
- print "You already have a root password set, so you can safely answer 'n'.\n\n";
- print "Change the root password? [Y/n] ";
-}
-
-my $reply = <STDIN>;
-if ( $reply =~ /n/i ) {
- print " ... skipping.\n";
-} else {
- set_root_password();
-}
-print "\n";
-
-
-#
-# Remove anonymous users
-#
-
-print <<HERE;
-By default, a MySQL installation has an anonymous user, allowing anyone
-to log into MySQL without having to have a user account created for
-them. This is intended only for testing, and to make the installation
-go a bit smoother. You should remove them before moving into a
-production environment.
-
-HERE
-
-print "Remove anonymous users? [Y/n] ";
-$reply = <STDIN>;
-if ( $reply =~ /n/i ) {
- print " ... skipping.\n";
-} else {
- remove_anonymous_users();
-}
-print "\n";
-
-
-#
-# Disallow remote root login
-#
-
-print <<HERE;
-Normally, root should only be allowed to connect from 'localhost'. This
-ensures that someone cannot guess at the root password from the network.
-
-HERE
-
-print "Disallow root login remotely? [Y/n] ";
-$reply = <STDIN>;
-if ( $reply =~ /n/i ) {
- print " ... skipping.\n";
-} else {
- remove_remote_root();
-}
-print "\n";
-
-
-#
-# Remove test database
-#
-
-print <<HERE;
-By default, MySQL comes with a database named 'test' that anyone can
-access. This is also intended only for testing, and should be removed
-before moving into a production environment.
-
-HERE
-
-print "Remove test database and access to it? [Y/n] ";
-$reply = <STDIN>;
-if ( $reply =~ /n/i ) {
- print " ... skipping.\n";
-} else {
- remove_test_database();
-}
-print "\n";
-
-
-#
-# Reload privilege tables
-#
-
-print <<HERE;
-Reloading the privilege tables will ensure that all changes made so far
-will take effect immediately.
-
-HERE
-
-print "Reload privilege tables now? [Y/n] ";
-$reply = <STDIN>;
-if ( $reply =~ /n/i ) {
- print " ... skipping.\n";
-} else {
- reload_privilege_tables();
-}
-print "\n";
-
-print <<HERE;
-
-
-
-All done! If you've completed all of the above steps, your MySQL
-installation should now be secure.
-
-Thanks for using MySQL!
-
-
-HERE
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh
index a87dd93bc4c..b2a9edf4953 100644
--- a/scripts/mysql_secure_installation.sh
+++ b/scripts/mysql_secure_installation.sh
@@ -17,6 +17,7 @@
config=".my.cnf.$$"
command=".mysql.$$"
+output=".my.output.$$"
trap "interrupt" 1 2 3 6 15
@@ -216,7 +217,7 @@ prepare() {
do_query() {
echo "$1" >$command
#sed 's,^,> ,' < $command # Debugging
- $mysql_command --defaults-file=$config $defaults_extra_file $no_defaults $args <$command
+ $mysql_command --defaults-file=$config $defaults_extra_file $no_defaults $args <$command >$output
return $?
}
@@ -268,15 +269,18 @@ get_root_password() {
echo
stty echo
if [ "x$password" = "x" ]; then
- hadpass=0
+ emptypass=1
else
- hadpass=1
+ emptypass=0
fi
rootpass=$password
make_config
- do_query ""
+ do_query "show create user root@localhost"
status=$?
done
+ if grep -q unix_socket $output; then
+ emptypass=0
+ fi
echo "OK, successfully used password, moving on..."
echo
}
@@ -304,7 +308,7 @@ set_root_password() {
fi
esc_pass=`basic_single_escape "$password1"`
- do_query "UPDATE mysql.user SET Password=PASSWORD('$esc_pass') WHERE User='root';"
+ do_query "UPDATE mysql.global_priv SET priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', PASSWORD('$esc_pass')) WHERE User='root';"
if [ $? -eq 0 ]; then
echo "Password updated successfully!"
echo "Reloading privilege tables.."
@@ -324,7 +328,7 @@ set_root_password() {
}
remove_anonymous_users() {
- do_query "DELETE FROM mysql.user WHERE User='';"
+ do_query "DELETE FROM mysql.global_priv WHERE User='';"
if [ $? -eq 0 ]; then
echo " ... Success!"
else
@@ -336,7 +340,7 @@ remove_anonymous_users() {
}
remove_remote_root() {
- do_query "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
+ do_query "DELETE FROM mysql.global_priv WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
if [ $? -eq 0 ]; then
echo " ... Success!"
else
@@ -386,7 +390,7 @@ interrupt() {
cleanup() {
echo "Cleaning up..."
- rm -f $config $command
+ rm -f $config $command $output
}
# Remove the files before exiting.
@@ -405,9 +409,8 @@ echo "NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB"
echo " SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!"
echo
echo "In order to log into MariaDB to secure it, we'll need the current"
-echo "password for the root user. If you've just installed MariaDB, and"
-echo "you haven't set the root password yet, the password will be blank,"
-echo "so you should just press enter here."
+echo "password for the root user. If you've just installed MariaDB, and"
+echo "haven't set the root password yet, you should just press enter here."
echo
get_root_password
@@ -417,15 +420,47 @@ get_root_password
# Set the root password
#
-echo "Setting the root password ensures that nobody can log into the MariaDB"
-echo "root user without the proper authorisation."
+echo "Setting the root password or using the unix_socket ensures that nobody"
+echo "can log into the MariaDB root user without the proper authorisation."
+echo
+
+while true ; do
+ if [ $emptypass -eq 1 ]; then
+ echo $echo_n "Enable unix_socket authentication? [Y/n] $echo_c"
+ else
+ echo "You already have your root account protected, so you can safely answer 'n'."
+ echo
+ echo $echo_n "Switch to unix_socket authentication [Y/n] $echo_c"
+ fi
+ read reply
+ validate_reply $reply && break
+done
+
+if [ "$reply" = "n" ]; then
+ echo " ... skipping."
+else
+ emptypass=0
+ do_query "UPDATE mysql.global_priv SET priv=json_set(priv, '$.password_last_changed', UNIX_TIMESTAMP(), '$.plugin', 'mysql_native_password', '$.authentication_string', 'invalid', '$.auth_or', json_array(json_object(), json_object('plugin', 'unix_socket'))) WHERE User='root';"
+ if [ $? -eq 0 ]; then
+ echo "Enabled successfully!"
+ echo "Reloading privilege tables.."
+ reload_privilege_tables
+ if [ $? -eq 1 ]; then
+ clean_and_exit
+ fi
+ echo
+ else
+ echo "Failed!"
+ clean_and_exit
+ fi
+fi
echo
while true ; do
- if [ $hadpass -eq 0 ]; then
+ if [ $emptypass -eq 1 ]; then
echo $echo_n "Set root password? [Y/n] $echo_c"
else
- echo "You already have a root password set, so you can safely answer 'n'."
+ echo "You already have your root account protected, so you can safely answer 'n'."
echo
echo $echo_n "Change the root password? [Y/n] $echo_c"
fi
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index df8fdf26257..26639f613de 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -1,6 +1,6 @@
-- Copyright (c) 2007, 2018, Oracle and/or its affiliates.
--- Copyright (c) 2008, 2014, Monty Program Ab & SkySQL Ab
---
+-- Copyright (c) 2008, 2019, 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.
@@ -21,70 +21,135 @@
set sql_mode='';
set @orig_storage_engine=@@storage_engine;
-set storage_engine=myisam;
+set storage_engine=Aria;
set system_versioning_alter_history=keep;
set @have_innodb= (select count(engine) from information_schema.engines where engine='INNODB' and support != 'NO');
-SET @innodb_or_myisam=IF(@have_innodb <> 0, 'InnoDB', 'MyISAM');
+SET @innodb_or_aria=IF(@have_innodb <> 0, 'InnoDB', 'Aria');
-CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY /*Host */(Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY /*Host */(Host,Db,User), KEY User (User) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
-- Remember for later if db table already existed
set @had_db_table= @@warning_count != 0;
-CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY /*Host*/ (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
-
-CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) DEFAULT 0 NOT NULL, plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL, authentication_string TEXT NOT NULL, password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, default_role char(80) binary DEFAULT '' NOT NULL, max_statement_time decimal(12,6) DEFAULT 0 NOT NULL, PRIMARY KEY /*Host*/ (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE IF NOT EXISTS global_priv (Host char(60) binary DEFAULT '', User char(80) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+
+set @exists_user_view= EXISTS (SELECT * FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user');
+
+set @exists_user_view_by_root= EXISTS (SELECT * FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost');
+
+set @need_sys_user_creation= (( NOT @exists_user_view) OR @exists_user_view_by_root);
+
+CREATE TEMPORARY TABLE tmp_user_sys LIKE global_priv;
+INSERT INTO tmp_user_sys (Host,User,Priv) VALUES ('localhost','mariadb.sys','{"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":true,"password_last_changed":0}');
+INSERT IGNORE INTO global_priv SELECT * FROM tmp_user_sys WHERE 0 <> @need_sys_user_creation;
+DROP TABLE tmp_user_sys;
+
+
+CREATE DEFINER='mariadb.sys'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
+ Host,
+ User,
+ IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password,
+ IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
+ IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
+ IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
+ IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
+ IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
+ IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
+ IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
+ IF(IFNULL(JSON_VALUE(Priv, '$.password_last_changed'), 1) = 0, 'Y', 'N') AS password_expired,
+ ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
+ IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
+ CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
+ FROM global_priv;
-- Remember for later if user table already existed
set @had_user_table= @@warning_count != 0;
-CREATE TABLE IF NOT EXISTS roles_mapping ( Host char(60) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Role char(80) binary DEFAULT '' NOT NULL, Admin_option enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, UNIQUE (Host, User, Role)) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Granted roles';
+CREATE TABLE IF NOT EXISTS roles_mapping ( Host char(60) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Role char(80) binary DEFAULT '' NOT NULL, Admin_option enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, UNIQUE (Host, User, Role)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Granted roles';
+
+CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
-CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+CREATE TABLE IF NOT EXISTS plugin ( name varchar(64) DEFAULT '' NOT NULL, dl varchar(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_general_ci comment='MySQL plugins';
-CREATE TABLE IF NOT EXISTS plugin ( name varchar(64) DEFAULT '' NOT NULL, dl varchar(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci comment='MySQL plugins';
+CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host varchar(2048) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(80) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) engine=Aria transactional=1 CHARACTER SET utf8 comment='MySQL Foreign Servers table';
-CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host varchar(2048) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(80) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
+CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
-CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TEMPORARY TABLE tmp_user_sys LIKE tables_priv;
+INSERT INTO tmp_user_sys (Host,Db,User,Table_name,Grantor,Timestamp,Table_priv) VALUES ('localhost','mysql','mariadb.sys','global_priv','root@localhost','0','Select,Delete');
+INSERT IGNORE INTO tables_priv SELECT * FROM tmp_user_sys WHERE 0 <> @need_sys_user_creation;
+DROP TABLE tmp_user_sys;
-CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
-CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url text not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url text not null, primary key (help_topic_id), unique index (name) ) engine=Aria transactional=0 CHARACTER SET utf8 comment='help topics';
-CREATE TABLE IF NOT EXISTS help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url text not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+CREATE TABLE IF NOT EXISTS help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url text not null, primary key (help_category_id), unique index (name) ) engine=Aria transactional=0 CHARACTER SET utf8 comment='help categories';
-CREATE TABLE IF NOT EXISTS help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+CREATE TABLE IF NOT EXISTS help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=Aria transactional=0 CHARACTER SET utf8 comment='keyword-topic relation';
-CREATE TABLE IF NOT EXISTS help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+CREATE TABLE IF NOT EXISTS help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=Aria transactional=0 CHARACTER SET utf8 comment='help keywords';
-CREATE TABLE IF NOT EXISTS time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY /*Name*/ (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+CREATE TABLE IF NOT EXISTS time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY /*Name*/ (Name) ) engine=Aria transactional=1 CHARACTER SET utf8 comment='Time zone names';
-CREATE TABLE IF NOT EXISTS time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY /*TzId*/ (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+CREATE TABLE IF NOT EXISTS time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY /*TzId*/ (Time_zone_id) ) engine=Aria transactional=1 CHARACTER SET utf8 comment='Time zones';
-CREATE TABLE IF NOT EXISTS time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY /*TzIdTranTime*/ (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+CREATE TABLE IF NOT EXISTS time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY /*TzIdTranTime*/ (Time_zone_id, Transition_time) ) engine=Aria transactional=1 CHARACTER SET utf8 comment='Time zone transitions';
-CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY /*TzIdTrTId*/ (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY /*TzIdTrTId*/ (Time_zone_id, Transition_type_id) ) engine=Aria transactional=1 CHARACTER SET utf8 comment='Time zone transition types';
-CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY /*TranTime*/ (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY /*TranTime*/ (Transition_time) ) engine=Aria transactional=1 CHARACTER SET utf8 comment='Leap seconds information for time zones';
-CREATE TABLE IF NOT EXISTS proc (db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA') DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns longblob NOT NULL, body longblob NOT NULL, definer char(141) collate utf8_bin DEFAULT '' NOT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'IGNORE_BAD_TABLE_OPTIONS', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE', 'NO_ENGINE_SUBSTITUTION', 'PAD_CHAR_TO_FULL_LENGTH', 'EMPTY_STRING_IS_NULL', 'SIMULTANEOUS_ASSIGNMENT') DEFAULT '' NOT NULL, comment text collate utf8_bin NOT NULL, character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, aggregate enum('NONE', 'GROUP') DEFAULT 'NONE' NOT NULL, PRIMARY KEY (db,name,type)) engine=MyISAM character set utf8 comment='Stored Procedures';
+CREATE TABLE IF NOT EXISTS proc (db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA') DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns longblob NOT NULL, body longblob NOT NULL, definer char(141) collate utf8_bin DEFAULT '' NOT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'IGNORE_BAD_TABLE_OPTIONS', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE', 'NO_ENGINE_SUBSTITUTION', 'PAD_CHAR_TO_FULL_LENGTH', 'EMPTY_STRING_IS_NULL', 'SIMULTANEOUS_ASSIGNMENT', 'TIME_ROUND_FRACTIONAL') DEFAULT '' NOT NULL, comment text collate utf8_bin NOT NULL, character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, aggregate enum('NONE', 'GROUP') DEFAULT 'NONE' NOT NULL, PRIMARY KEY (db,name,type)) engine=Aria transactional=1 character set utf8 comment='Stored Procedures';
-CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Routine_name char(64) COLLATE utf8_general_ci DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
+CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Routine_name char(64) COLLATE utf8_general_ci DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
-- Create general_log if CSV is enabled.
@@ -103,7 +168,7 @@ PREPARE stmt FROM @str;
EXECUTE stmt;
DROP PREPARE stmt;
-CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT NULL, definer char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED', on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', originator INTEGER UNSIGNED NOT NULL, time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, PRIMARY KEY (db, name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
+CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT NULL, definer char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modified TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED', on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', originator INTEGER UNSIGNED NOT NULL, time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', character_set_client char(32) collate utf8_bin, collation_connection char(32) collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, PRIMARY KEY (db, name) ) engine=Aria transactional=1 DEFAULT CHARSET=utf8 COMMENT 'Events';
SET @create_innodb_table_stats="CREATE TABLE IF NOT EXISTS innodb_table_stats (
database_name VARCHAR(64) NOT NULL,
@@ -170,7 +235,7 @@ SET @cmd="CREATE TABLE IF NOT EXISTS slave_relay_log_info (
Id INTEGER UNSIGNED NOT NULL COMMENT 'Internal Id that uniquely identifies this record.',
PRIMARY KEY(Id)) DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT 'Relay Log Information'";
-SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_myisam);
+SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_aria);
-- Don't create the table; MariaDB will have another implementation
#PREPARE stmt FROM @str;
#EXECUTE stmt;
@@ -202,7 +267,7 @@ SET @cmd= "CREATE TABLE IF NOT EXISTS slave_master_info (
Enabled_auto_position BOOLEAN NOT NULL COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',
PRIMARY KEY(Host, Port)) DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT 'Master Information'";
-SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_myisam);
+SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_aria);
-- Don't create the table; MariaDB will have another implementation
#PREPARE stmt FROM @str;
#EXECUTE stmt;
@@ -223,26 +288,33 @@ SET @cmd= "CREATE TABLE IF NOT EXISTS slave_worker_info (
Checkpoint_group_bitmap BLOB NOT NULL,
PRIMARY KEY(Id)) DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT 'Worker Information'";
-SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_myisam);
+SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_aria);
-- Don't create the table; MariaDB will have another implementation
#PREPARE stmt FROM @str;
#EXECUTE stmt;
#DROP PREPARE stmt;
-CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Proxied_host char(60) binary DEFAULT '' NOT NULL, Proxied_user char(80) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY /*Host*/ (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges';
+CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Proxied_host char(60) binary DEFAULT '' NOT NULL, Proxied_user char(80) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY /*Host*/ (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges';
-- Remember for later if proxies_priv table already existed
set @had_proxies_priv_table= @@warning_count != 0;
+-- The following needs to be done both for new installations
+-- and for upgrades
+CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv;
+INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now());
+INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0;
+DROP TABLE tmp_proxies_priv;
+
--
-- Tables unique for MariaDB
--
-CREATE TABLE IF NOT EXISTS table_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, cardinality bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (db_name,table_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Tables';
+CREATE TABLE IF NOT EXISTS table_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, cardinality bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (db_name,table_name) ) engine=Aria transactional=0 CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Tables';
-CREATE TABLE IF NOT EXISTS column_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, column_name varchar(64) NOT NULL, min_value varbinary(255) DEFAULT NULL, max_value varbinary(255) DEFAULT NULL, nulls_ratio decimal(12,4) DEFAULT NULL, avg_length decimal(12,4) DEFAULT NULL, avg_frequency decimal(12,4) DEFAULT NULL, hist_size tinyint unsigned, hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'), histogram varbinary(255), PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns';
+CREATE TABLE IF NOT EXISTS column_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, column_name varchar(64) NOT NULL, min_value varbinary(255) DEFAULT NULL, max_value varbinary(255) DEFAULT NULL, nulls_ratio decimal(12,4) DEFAULT NULL, avg_length decimal(12,4) DEFAULT NULL, avg_frequency decimal(12,4) DEFAULT NULL, hist_size tinyint unsigned, hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'), histogram varbinary(255), PRIMARY KEY (db_name,table_name,column_name) ) engine=Aria transactional=0 CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns';
-CREATE TABLE IF NOT EXISTS index_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, index_name varchar(64) NOT NULL, prefix_arity int(11) unsigned NOT NULL, avg_frequency decimal(12,4) DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes';
+CREATE TABLE IF NOT EXISTS index_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, index_name varchar(64) NOT NULL, prefix_arity int(11) unsigned NOT NULL, avg_frequency decimal(12,4) DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) engine=Aria transactional=0 CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes';
-- Note: This definition must be kept in sync with the one used in
-- build_gtid_pos_create_query() in sql/slave.cc
@@ -253,7 +325,7 @@ SET @cmd= "CREATE TABLE IF NOT EXISTS gtid_slave_pos (
seq_no BIGINT UNSIGNED NOT NULL,
PRIMARY KEY (domain_id, sub_id)) CHARSET=latin1
COMMENT='Replication slave GTID position'";
-SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_myisam);
+SET @str=CONCAT(@cmd, ' ENGINE=', @innodb_or_aria);
PREPARE stmt FROM @str;
EXECUTE stmt;
DROP PREPARE stmt;
@@ -262,6 +334,7 @@ set storage_engine=@orig_storage_engine;
--
-- Drop some tables not used anymore in MariaDB
----
+--
drop table if exists mysql.ndb_binlog_index;
+drop table if exists mysql.host;
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
index 3a6c29b7674..ab3dd704d2e 100644
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -25,28 +25,31 @@
-- add escape character in front of wildcard character to convert "_" or "%" to
-- a plain character
SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname;
+SELECT '{"access":18446744073709551615}' INTO @all_privileges;
+SELECT '{"access":18446744073709551615,"plugin":"mysql_native_password","authentication_string":"invalid","auth_or":[{},{"plugin":"unix_socket"}]}' into @all_with_auth;
--- Fill "user" table with default users allowing root access
--- from local machine if "user" table didn't exist before
-CREATE TEMPORARY TABLE tmp_user_nopasswd LIKE user;
-CREATE TEMPORARY TABLE tmp_user_socket LIKE user;
+
+-- Fill "global_priv" table with default users allowing root access
+-- from local machine if "global_priv" table didn't exist before
+CREATE TEMPORARY TABLE tmp_user_nopasswd LIKE global_priv;
+CREATE TEMPORARY TABLE tmp_user_socket LIKE global_priv;
-- Classic passwordless root account.
-INSERT INTO tmp_user_nopasswd VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N', 'N','', 0);
-REPLACE INTO tmp_user_nopasswd SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0 FROM dual WHERE @current_hostname != 'localhost';
-REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0);
-REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0);
+INSERT INTO tmp_user_nopasswd VALUES ('localhost','root',@all_privileges);
+REPLACE INTO tmp_user_nopasswd SELECT @current_hostname,'root',@all_privileges FROM dual WHERE @current_hostname != 'localhost';
+REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root',@all_privileges);
+REPLACE INTO tmp_user_nopasswd VALUES ('::1','root',@all_privileges);
-- More secure root account using unix socket auth.
-INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),'','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'unix_socket','','N', 'N','', 0);
+INSERT INTO tmp_user_socket VALUES ('localhost', 'root',@all_with_auth);
+REPLACE INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),@all_with_auth);
IF @auth_root_socket is not null THEN
IF not exists(select 1 from information_schema.plugins where plugin_name='unix_socket') THEN
INSTALL SONAME 'auth_socket'; END IF; END IF;
-INSERT INTO user SELECT * FROM tmp_user_nopasswd WHERE @had_user_table=0 AND @skip_auth_root_nopasswd IS NULL;
-INSERT INTO user SELECT * FROM tmp_user_socket WHERE @had_user_table=0 AND @auth_root_socket IS NOT NULL;
+INSERT INTO global_priv SELECT * FROM tmp_user_nopasswd WHERE @had_user_table=0 AND @auth_root_socket IS NULL;
+INSERT INTO global_priv SELECT * FROM tmp_user_socket WHERE @had_user_table=0 AND @auth_root_socket IS NOT NULL;
DROP TABLE tmp_user_nopasswd, tmp_user_socket;
CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv;
-INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now());
-REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE @current_hostname != 'localhost';
+INSERT INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE @current_hostname != 'localhost';
INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0;
DROP TABLE tmp_proxies_priv;
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index 79866d149bb..ecdbff61c56 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -1,5 +1,5 @@
-- Copyright (C) 2003, 2013 Oracle and/or its affiliates.
--- Copyright (C) 2010, 2018 MariaDB Corporation
+-- Copyright (C) 2010, 2022, 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
@@ -25,24 +25,22 @@
# adding a 'SHOW WARNINGS' after the statement.
set sql_mode='';
-set storage_engine=MyISAM;
+set storage_engine=Aria;
set enforce_storage_engine=NULL;
set alter_algorithm=DEFAULT;
+set @have_innodb= (select count(engine) from information_schema.engines where engine='INNODB' and support != 'NO');
+
ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
# Detect whether or not we had the Grant_priv column
SET @hadGrantPriv:=0;
-SELECT @hadGrantPriv:=1 FROM user WHERE Grant_priv LIKE '%';
+SELECT @hadGrantPriv:=1 FROM user WHERE Grant_priv IS NOT NULL;
ALTER TABLE user add Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
add References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
add Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
add Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE host add Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- add References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- add Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- add Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
ALTER TABLE db add Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
add References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
add Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
@@ -51,8 +49,6 @@ ALTER TABLE db add Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N'
# Fix privileges for old tables
UPDATE user SET Grant_priv=File_priv,References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Create_priv WHERE @hadGrantPriv = 0;
UPDATE db SET References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Create_priv WHERE @hadGrantPriv = 0;
-UPDATE host SET References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Create_priv WHERE @hadGrantPriv = 0;
-
#
# The second alter changes ssl_type to new 4.0.2 format
# Adding columns needed by GRANT .. REQUIRE (openssl)
@@ -76,7 +72,7 @@ ALTER TABLE tables_priv
MODIFY User char(80) binary NOT NULL default '',
MODIFY Table_name char(64) NOT NULL default '',
MODIFY Grantor char(141) COLLATE utf8_bin NOT NULL default '',
- ENGINE=MyISAM,
+ ENGINE=Aria,
CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE tables_priv
@@ -104,7 +100,7 @@ ALTER TABLE columns_priv
MODIFY User char(80) binary NOT NULL default '',
MODIFY Table_name char(64) NOT NULL default '',
MODIFY Column_name char(64) NOT NULL default '',
- ENGINE=MyISAM,
+ ENGINE=Aria,
CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin,
COMMENT='Column privileges';
@@ -124,7 +120,7 @@ ALTER TABLE func add type enum ('function','aggregate') COLLATE utf8_general_ci
# Detect whether we had Show_db_priv
SET @hadShowDbPriv:=0;
-SELECT @hadShowDbPriv:=1 FROM user WHERE Show_db_priv LIKE '%';
+SELECT @hadShowDbPriv:=1 FROM user WHERE Show_db_priv IS NOT NULL;
ALTER TABLE user
ADD Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_priv,
@@ -156,15 +152,11 @@ ADD max_connections int(11) unsigned NOT NULL DEFAULT 0 AFTER max_updates;
ALTER TABLE db
ADD Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
ADD Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE host
-ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,
-ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL;
alter table user change max_questions max_questions int(11) unsigned DEFAULT 0 NOT NULL;
alter table db comment='Database privileges';
-alter table host comment='Host privileges; Merged with database privileges';
alter table user comment='Users and global privileges';
alter table func comment='User defined functions';
@@ -173,13 +165,21 @@ alter table func comment='User defined functions';
ALTER TABLE user
MODIFY Host char(60) NOT NULL default '',
MODIFY User char(80) binary NOT NULL default '',
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+ ENGINE=Aria, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
# In MySQL 5.7.6 the Password column is removed. Recreate it to preserve the number
# of columns MariaDB expects in the user table.
ALTER TABLE user
ADD Password char(41) character set latin1 collate latin1_bin NOT NULL default '' AFTER User;
+# In MySQL the Unix socket authentication plugin has a different name. Thus the
+# references to it need to be renamed in the user table. Thanks to the WHERE
+# clauses this applies only to MySQL->MariaDB upgrades and nothing else.
+UPDATE user
+ SET plugin='unix_socket' WHERE plugin='auth_socket';
+DELETE FROM plugin
+ WHERE name='auth_socket';
+
ALTER TABLE user
MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '',
MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
@@ -209,7 +209,7 @@ ALTER TABLE db
MODIFY Host char(60) NOT NULL default '',
MODIFY Db char(64) NOT NULL default '',
MODIFY User char(80) binary NOT NULL default '',
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+ ENGINE=Aria, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE db
MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
@@ -224,26 +224,9 @@ ALTER TABLE db
MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE host
- MODIFY Host char(60) NOT NULL default '',
- MODIFY Db char(64) NOT NULL default '',
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE host
- MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
ALTER TABLE func
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+ ENGINE=Aria, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE func
MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
@@ -293,7 +276,7 @@ ALTER TABLE plugin
# Detect whether we had Create_view_priv
#
SET @hadCreateViewPriv:=0;
-SELECT @hadCreateViewPriv:=1 FROM user WHERE Create_view_priv LIKE '%';
+SELECT @hadCreateViewPriv:=1 FROM user WHERE Create_view_priv IS NOT NULL;
#
# Create VIEWs privileges (v5.0)
@@ -301,8 +284,6 @@ SELECT @hadCreateViewPriv:=1 FROM user WHERE Create_view_priv LIKE '%';
ALTER TABLE db ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
ALTER TABLE db MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
-ALTER TABLE host ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
-ALTER TABLE host MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
ALTER TABLE user ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_client_priv;
ALTER TABLE user MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_client_priv;
@@ -313,9 +294,6 @@ ALTER TABLE user MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci D
ALTER TABLE db ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
ALTER TABLE db MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-ALTER TABLE host ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-ALTER TABLE host MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-
ALTER TABLE user ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
ALTER TABLE user MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
@@ -328,7 +306,7 @@ UPDATE user SET Create_view_priv=Create_priv, Show_view_priv=Create_priv where u
#
#
SET @hadCreateRoutinePriv:=0;
-SELECT @hadCreateRoutinePriv:=1 FROM user WHERE Create_routine_priv LIKE '%';
+SELECT @hadCreateRoutinePriv:=1 FROM user WHERE Create_routine_priv IS NOT NULL;
#
# Create PROCEDUREs privileges (v5.0)
@@ -336,9 +314,6 @@ SELECT @hadCreateRoutinePriv:=1 FROM user WHERE Create_routine_priv LIKE '%';
ALTER TABLE db ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
ALTER TABLE db MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-ALTER TABLE host ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-ALTER TABLE host MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
-
ALTER TABLE user ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
ALTER TABLE user MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
@@ -348,24 +323,17 @@ ALTER TABLE user MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_c
ALTER TABLE db ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
ALTER TABLE db MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-ALTER TABLE host ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-ALTER TABLE host MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
-
ALTER TABLE user ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
ALTER TABLE user MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
ALTER TABLE db ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
ALTER TABLE db MODIFY Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-ALTER TABLE host ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-ALTER TABLE host MODIFY Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
-
#
# Assign create/alter routine privileges to people who have create privileges
#
UPDATE user SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv where user<>"" AND @hadCreateRoutinePriv = 0;
UPDATE db SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Execute_priv=Select_priv where user<>"" AND @hadCreateRoutinePriv = 0;
-UPDATE host SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Execute_priv=Select_priv where @hadCreateRoutinePriv = 0;
#
# Add max_user_connections resource limit
@@ -380,7 +348,7 @@ ALTER TABLE user MODIFY max_user_connections int(11) DEFAULT '0' NOT NULL AFTER
#
SET @hadCreateUserPriv:=0;
-SELECT @hadCreateUserPriv:=1 FROM user WHERE Create_user_priv LIKE '%';
+SELECT @hadCreateUserPriv:=1 FROM user WHERE Create_user_priv IS NOT NULL;
ALTER TABLE user ADD Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
ALTER TABLE user MODIFY Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
@@ -393,7 +361,7 @@ UPDATE user LEFT JOIN db USING (Host,User) SET Create_user_priv='Y'
#
ALTER TABLE procs_priv
- ENGINE=MyISAM,
+ ENGINE=Aria,
CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE procs_priv
@@ -460,7 +428,8 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL,
'NO_ENGINE_SUBSTITUTION',
'PAD_CHAR_TO_FULL_LENGTH',
'EMPTY_STRING_IS_NULL',
- 'SIMULTANEOUS_ASSIGNMENT'
+ 'SIMULTANEOUS_ASSIGNMENT',
+ 'TIME_ROUND_FRACTIONAL'
) DEFAULT '' NOT NULL,
DEFAULT CHARACTER SET utf8;
@@ -541,11 +510,16 @@ ALTER TABLE proc MODIFY comment
ALTER TABLE proc ADD aggregate enum('NONE', 'GROUP') DEFAULT 'NONE' NOT NULL
AFTER body_utf8;
+# Update definer of Add/DropGeometryColumn procedures to 'mariadb.sys'
+# To consider the scenarios in MDEV-23102, only update the definer when it's 'root'
+UPDATE proc SET Definer = 'mariadb.sys@localhost' WHERE Definer = 'root@localhost' AND Name = 'AddGeometryColumn';
+UPDATE proc SET Definer = 'mariadb.sys@localhost' WHERE Definer = 'root@localhost' AND Name = 'DropGeometryColumn';
+
#
# EVENT privilege
#
SET @hadEventPriv := 0;
-SELECT @hadEventPriv :=1 FROM user WHERE Event_priv LIKE '%';
+SELECT @hadEventPriv :=1 FROM user WHERE Event_priv IS NOT NULL;
ALTER TABLE user ADD Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
ALTER TABLE user MODIFY Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NOT NULL AFTER Create_user_priv;
@@ -596,7 +570,8 @@ ALTER TABLE event MODIFY sql_mode
'NO_ENGINE_SUBSTITUTION',
'PAD_CHAR_TO_FULL_LENGTH',
'EMPTY_STRING_IS_NULL',
- 'SIMULTANEOUS_ASSIGNMENT'
+ 'SIMULTANEOUS_ASSIGNMENT',
+ 'TIME_ROUND_FRACTIONAL'
) DEFAULT '' NOT NULL AFTER on_completion;
ALTER TABLE event MODIFY name char(64) CHARACTER SET utf8 NOT NULL default '';
@@ -638,14 +613,11 @@ set global event_scheduler=original;
#
SET @hadTriggerPriv := 0;
-SELECT @hadTriggerPriv :=1 FROM user WHERE Trigger_priv LIKE '%';
+SELECT @hadTriggerPriv :=1 FROM user WHERE Trigger_priv IS NOT NULL;
ALTER TABLE user ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Event_priv;
ALTER TABLE user MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Event_priv;
-ALTER TABLE host ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-ALTER TABLE host MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-
ALTER TABLE db ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
ALTER TABLE db MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
@@ -656,7 +628,7 @@ UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
#
SET @hadCreateTablespacePriv := 0;
-SELECT @hadCreateTablespacePriv :=1 FROM user WHERE Create_tablespace_priv LIKE '%';
+SELECT @hadCreateTablespacePriv :=1 FROM user WHERE Create_tablespace_priv IS NOT NULL;
ALTER TABLE user ADD Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Trigger_priv;
ALTER TABLE user MODIFY Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Trigger_priv;
@@ -671,7 +643,7 @@ ALTER TABLE user change Truncate_versioning_priv Delete_history_priv enum('N','Y
ALTER TABLE db change Truncate_versioning_priv Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
SET @had_user_delete_history_priv := 0;
-SELECT @had_user_delete_history_priv :=1 FROM user WHERE Delete_history_priv LIKE '%';
+SELECT @had_user_delete_history_priv :=1 FROM user WHERE Delete_history_priv IS NOT NULL;
ALTER TABLE user add Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Create_tablespace_priv;
ALTER TABLE user modify Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N';
@@ -685,7 +657,10 @@ ALTER TABLE user ADD plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL AF
ALTER TABLE user CHANGE auth_string authentication_string TEXT NOT NULL;
ALTER TABLE user ADD password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER authentication_string;
-ALTER TABLE user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER password_expired;
+ALTER TABLE user ADD password_last_changed timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL after password_expired;
+ALTER TABLE user ADD password_lifetime smallint unsigned DEFAULT NULL after password_last_changed;
+ALTER TABLE user ADD account_locked enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL after password_lifetime;
+ALTER TABLE user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER account_locked;
ALTER TABLE user ADD default_role char(80) binary DEFAULT '' NOT NULL AFTER is_role;
ALTER TABLE user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL AFTER default_role;
@@ -708,63 +683,35 @@ ALTER TABLE user MODIFY plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL
MODIFY IF EXISTS password_lifetime smallint unsigned DEFAULT NULL AFTER password_last_changed,
MODIFY IF EXISTS account_locked enum('N', 'Y') CHARACTER SET utf8 DEFAULT 'N' NOT NULL after password_lifetime;
--- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from
--- older versions
-
-CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv;
-INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now());
-INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0;
-DROP TABLE tmp_proxies_priv;
-
-- Checking for any duplicate hostname and username combination are exists.
-- If exits we will throw error.
-DROP PROCEDURE IF EXISTS mysql.count_duplicate_host_names;
DELIMITER //
-CREATE PROCEDURE mysql.count_duplicate_host_names()
-BEGIN
+BEGIN NOT ATOMIC
SET @duplicate_hosts=(SELECT count(*) FROM mysql.user GROUP BY user, lower(host) HAVING count(*) > 1 LIMIT 1);
IF @duplicate_hosts > 1 THEN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Multiple accounts exist for @user_name, @host_name that differ only in Host lettercase; remove all except one of them';
END IF;
END //
DELIMITER ;
-CALL mysql.count_duplicate_host_names();
-- Get warnings (if any)
SHOW WARNINGS;
-DROP PROCEDURE mysql.count_duplicate_host_names;
# Convering the host name to lower case for existing users
UPDATE user SET host=LOWER( host ) WHERE LOWER( host ) <> host;
-# fix bad data when upgrading from unfixed InnoDB (MDEV-13360)
-set @str="delete from innodb_index_stats where length(table_name) > 64";
-set @str=if(@have_innodb <> 0, @str, "set @dummy = 0");
-prepare stmt from @str;
-execute stmt;
-set @str=replace(@str, "innodb_index_stats", "innodb_table_stats");
-prepare stmt from @str;
-execute stmt;
-
-# update table_name and timestamp fields in the innodb stat tables
-set @str="alter table mysql.innodb_index_stats modify last_update timestamp not null default current_timestamp on update current_timestamp, modify table_name varchar(199)";
-set @str=if(@have_innodb <> 0, @str, "set @dummy = 0");
-prepare stmt from @str;
-execute stmt;
-
-set @str="alter table mysql.innodb_table_stats modify last_update timestamp not null default current_timestamp on update current_timestamp, modify table_name varchar(199)";
-set @str=if(@have_innodb <> 0, @str, "set @dummy = 0");
-prepare stmt from @str;
-execute stmt;
-
-set @str=replace(@str, "innodb_index_stats", "innodb_table_stats");
-prepare stmt from @str;
-execute stmt;
-
-SET @innodb_index_stats_fk= (select count(*) from information_schema.referential_constraints where constraint_schema='mysql' and table_name = 'innodb_index_stats' and referenced_table_name = 'innodb_table_stats' and constraint_name = 'innodb_index_stats_ibfk_1');
-SET @str=IF(@innodb_index_stats_fk > 0 and @have_innodb > 0, "ALTER TABLE mysql.innodb_index_stats DROP FOREIGN KEY `innodb_index_stats_ibfk_1`", "SET @dummy = 0");
-PREPARE stmt FROM @str;
-EXECUTE stmt;
-DROP PREPARE stmt;
+DELIMITER //
+if @have_innodb then
+ # fix bad data when upgrading from unfixed InnoDB (MDEV-13360)
+ delete from innodb_index_stats where length(table_name) > 64;
+ delete from innodb_table_stats where length(table_name) > 64;
+
+ # update table_name and timestamp fields in the innodb stat tables
+ alter table innodb_index_stats modify last_update timestamp not null default current_timestamp on update current_timestamp, modify table_name varchar(199);
+ alter table innodb_table_stats modify last_update timestamp not null default current_timestamp on update current_timestamp, modify table_name varchar(199);
+
+ alter table innodb_index_stats drop foreign key if exists innodb_index_stats_ibfk_1;
+end if //
+DELIMITER ;
# MDEV-4332 longer user names
alter table user modify User char(80) binary not null default '';
@@ -803,3 +750,94 @@ alter table column_stats modify min_value varbinary(255) DEFAULT NULL, modify ma
# and if semisync plugins aren't there, delete them from mysql.plugin.
DELETE FROM mysql.plugin WHERE name="rpl_semi_sync_master" AND NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME="rpl_semi_sync_master");
DELETE FROM mysql.plugin WHERE name="rpl_semi_sync_slave" AND NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME="rpl_semi_sync_slave");
+
+--
+-- Ensure that all tables are of type Aria and transactional
+--
+
+ALTER TABLE user ENGINE=Aria transactional=1;
+ALTER TABLE db ENGINE=Aria transactional=1;
+ALTER TABLE func ENGINE=Aria transactional=1;
+ALTER TABLE procs_priv ENGINE=Aria transactional=1;
+ALTER TABLE tables_priv ENGINE=Aria transactional=1;
+ALTER TABLE columns_priv ENGINE=Aria transactional=1;
+ALTER TABLE roles_mapping ENGINE=Aria transactional=1;
+ALTER TABLE plugin ENGINE=Aria transactional=1;
+ALTER TABLE servers ENGINE=Aria transactional=1;
+ALTER TABLE time_zone_name ENGINE=Aria transactional=1;
+ALTER TABLE time_zone ENGINE=Aria transactional=1;
+ALTER TABLE time_zone_transition ENGINE=Aria transactional=1;
+ALTER TABLE time_zone_transition_type ENGINE=Aria transactional=1;
+ALTER TABLE time_zone_leap_second ENGINE=Aria transactional=1;
+ALTER TABLE proc ENGINE=Aria transactional=1;
+ALTER TABLE event ENGINE=Aria transactional=1;
+ALTER TABLE proxies_priv ENGINE=Aria transactional=1;
+
+-- The following tables doesn't have to be transactional
+ALTER TABLE help_topic ENGINE=Aria transactional=0;
+ALTER TABLE help_category ENGINE=Aria transactional=0;
+ALTER TABLE help_relation ENGINE=Aria transactional=0;
+ALTER TABLE help_keyword ENGINE=Aria transactional=0;
+ALTER TABLE table_stats ENGINE=Aria transactional=0;
+ALTER TABLE column_stats ENGINE=Aria transactional=0;
+ALTER TABLE index_stats ENGINE=Aria transactional=0;
+
+DELIMITER //
+IF 'BASE TABLE' = (select table_type from information_schema.tables where table_schema=database() and table_name='user') THEN
+ CREATE TABLE IF NOT EXISTS global_priv (Host char(60) binary DEFAULT '', User char(80) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY Host (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'
+ SELECT Host, User, JSON_COMPACT(JSON_OBJECT('access',
+ 1*('Y'=Select_priv)+
+ 2*('Y'=Insert_priv)+
+ 4*('Y'=Update_priv)+
+ 8*('Y'=Delete_priv)+
+ 16*('Y'=Create_priv)+
+ 32*('Y'=Drop_priv)+
+ 64*('Y'=Reload_priv)+
+ 128*('Y'=Shutdown_priv)+
+ 256*('Y'=Process_priv)+
+ 512*('Y'=File_priv)+
+ 1024*('Y'=Grant_priv)+
+ 2048*('Y'=References_priv)+
+ 4096*('Y'=Index_priv)+
+ 8192*('Y'=Alter_priv)+
+ 16384*('Y'=Show_db_priv)+
+ 32768*('Y'=Super_priv)+
+ 65536*('Y'=Create_tmp_table_priv)+
+ 131072*('Y'=Lock_tables_priv)+
+ 262144*('Y'=Execute_priv)+
+ 524288*('Y'=Repl_slave_priv)+
+ 1048576*('Y'=Repl_client_priv)+
+ 2097152*('Y'=Create_view_priv)+
+ 4194304*('Y'=Show_view_priv)+
+ 8388608*('Y'=Create_routine_priv)+
+ 16777216*('Y'=Alter_routine_priv)+
+ 33554432*('Y'=Create_user_priv)+
+ 67108864*('Y'=Event_priv)+
+ 134217728*('Y'=Trigger_priv)+
+ 268435456*('Y'=Create_tablespace_priv)+
+ 536870912*('Y'=Delete_history_priv),
+ 'ssl_type', ssl_type-1,
+ 'ssl_cipher', ssl_cipher,
+ 'x509_issuer', x509_issuer,
+ 'x509_subject', x509_subject,
+ 'max_questions', max_questions,
+ 'max_updates', max_updates,
+ 'max_connections', max_connections,
+ 'max_user_connections', max_user_connections,
+ 'max_statement_time', max_statement_time,
+ 'plugin', if(plugin>'',plugin,if(length(password)=16,'mysql_old_password','mysql_native_password')),
+ 'authentication_string', if(plugin>'' and authentication_string>'',authentication_string,password),
+ 'password_last_changed', if(password_expired='Y', 0, if(password_last_changed, UNIX_TIMESTAMP(password_last_changed), UNIX_TIMESTAMP())),
+ 'password_lifetime', ifnull(password_lifetime, -1),
+ 'account_locked', 'Y'=account_locked,
+ 'default_role', default_role,
+ 'is_role', 'Y'=is_role)) as Priv
+ FROM user;
+ DROP TABLE user;
+END IF//
+
+IF 1 = (SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and (DEFINER = 'root@localhost' or (DEFINER = 'mariadb.sys@localhost' and VIEW_DEFINITION LIKE "%'N' AS `password_expired`%"))) THEN
+ DROP VIEW IF EXISTS mysql.user;
+END IF//
+
+DELIMITER ;
diff --git a/scripts/mysql_test_db.sql b/scripts/mysql_test_db.sql
index c1bb3661ec3..9f8a0cf604c 100644
--- a/scripts/mysql_test_db.sql
+++ b/scripts/mysql_test_db.sql
@@ -24,8 +24,8 @@ INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
DROP TABLE tmp_db;
-- Anonymous user with no privileges.
-CREATE TEMPORARY TABLE tmp_user_anonymous LIKE user;
+CREATE TEMPORARY TABLE tmp_user_anonymous LIKE global_priv;
INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost','');
INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
-INSERT INTO user SELECT * FROM tmp_user_anonymous WHERE @had_user_table=0;
+INSERT INTO global_priv SELECT * FROM tmp_user_anonymous WHERE @had_user_table=0;
DROP TABLE tmp_user_anonymous;
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index f92a31851ff..f37d83d93f4 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -276,7 +276,16 @@ wsrep_recover_position() {
wsrep_start_position_opt="--wsrep_start_position=$start_pos"
fi
- [ $ret -eq 0 ] && rm $wr_logfile
+ if [ $ret -eq 0 ] ; then
+ local wr_logfile_permanent="$DATADIR/wsrep_recovery.ok"
+ else
+ local wr_logfile_permanent="$DATADIR/wsrep_recovery.fail"
+ fi
+ touch $wr_logfile_permanent
+ [ "$euid" = "0" ] && chown $user $wr_logfile_permanent
+ chmod 600 $wr_logfile_permanent
+ cat "$wr_logfile" >> $wr_logfile_permanent
+ rm -f "$wr_logfile"
return $ret
}
@@ -566,8 +575,8 @@ append_arg_to_args () {
args=
-# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
-# and then merge with the command line arguments
+# Get first arguments from the my.cnf file, groups [mysqld] and [server]
+# (and related) and then merge with the command line arguments
SET_USER=2
parse_arguments `$print_defaults $defaults --loose-verbose --mysqld`
@@ -579,7 +588,7 @@ fi
# If arguments come from [mysqld_safe] section of my.cnf
# we complain about unrecognized options
unrecognized_handling=complain
-parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe`
+parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe mariadbd-safe`
# We only need to pass arguments through to the server if we don't
# handle them here. So, we collect unrecognized options (passed on
diff --git a/sql-common/client.c b/sql-common/client.c
index 4a7a5439f48..89de45cfcfc 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -127,10 +127,6 @@ char *mysql_unix_port= 0;
const char *unknown_sqlstate= "HY000";
const char *not_error_sqlstate= "00000";
const char *cant_connect_sqlstate= "08001";
-#ifdef HAVE_SMEM
-char *shared_memory_base_name= 0;
-const char *def_shared_memory_base_name= default_shared_memory_base_name;
-#endif
static void mysql_close_free_options(MYSQL *mysql);
static void mysql_close_free(MYSQL *mysql);
@@ -326,248 +322,6 @@ HANDLE create_named_pipe(MYSQL *mysql, uint connect_timeout, char **arg_host,
#endif
-/*
- Create new shared memory connection, return handler of connection
-
- SYNOPSIS
- create_shared_memory()
- mysql Pointer of mysql structure
- net Pointer of net structure
- connect_timeout Timeout of connection
-*/
-
-#ifdef HAVE_SMEM
-HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
-{
- ulong smem_buffer_length = shared_memory_buffer_length + 4;
- /*
- event_connect_request is event object for start connection actions
- event_connect_answer is event object for confirm, that server put data
- handle_connect_file_map is file-mapping object, use for create shared
- memory
- handle_connect_map is pointer on shared memory
- handle_map is pointer on shared memory for client
- event_server_wrote,
- event_server_read,
- event_client_wrote,
- event_client_read are events for transfer data between server and client
- handle_file_map is file-mapping object, use for create shared memory
- */
- HANDLE event_connect_request = NULL;
- HANDLE event_connect_answer = NULL;
- HANDLE handle_connect_file_map = NULL;
- char *handle_connect_map = NULL;
-
- char *handle_map = NULL;
- HANDLE event_server_wrote = NULL;
- HANDLE event_server_read = NULL;
- HANDLE event_client_wrote = NULL;
- HANDLE event_client_read = NULL;
- HANDLE event_conn_closed = NULL;
- HANDLE handle_file_map = NULL;
- ulong connect_number;
- char connect_number_char[22], *p;
- char *tmp= NULL;
- char *suffix_pos;
- DWORD error_allow = 0;
- DWORD error_code = 0;
- DWORD event_access_rights= SYNCHRONIZE | EVENT_MODIFY_STATE;
- char *shared_memory_base_name = mysql->options.shared_memory_base_name;
- static const char *name_prefixes[] = {"","Global\\"};
- const char *prefix;
- uint i;
-
- /*
- If this is NULL, somebody freed the MYSQL* options. mysql_close()
- is a good candidate. We don't just silently (re)set it to
- def_shared_memory_base_name as that would create really confusing/buggy
- behavior if the user passed in a different name on the command-line or
- in a my.cnf.
- */
- DBUG_ASSERT(shared_memory_base_name != NULL);
-
- /*
- get enough space base-name + '_' + longest suffix we might ever send
- */
- if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L, MYF(MY_FAE))))
- goto err;
-
- /*
- The name of event and file-mapping events create agree next rule:
- shared_memory_base_name+unique_part
- Where:
- shared_memory_base_name is unique value for each server
- unique_part is uniquel value for each object (events and file-mapping)
- */
- for (i = 0; i< array_elements(name_prefixes); i++)
- {
- prefix= name_prefixes[i];
- suffix_pos = strxmov(tmp, prefix , shared_memory_base_name, "_", NullS);
- strmov(suffix_pos, "CONNECT_REQUEST");
- event_connect_request= OpenEvent(event_access_rights, FALSE, tmp);
- if (event_connect_request)
- {
- break;
- }
- }
- if (!event_connect_request)
- {
- error_allow = CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR;
- goto err;
- }
- strmov(suffix_pos, "CONNECT_ANSWER");
- if (!(event_connect_answer= OpenEvent(event_access_rights,FALSE,tmp)))
- {
- error_allow = CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR;
- goto err;
- }
- strmov(suffix_pos, "CONNECT_DATA");
- if (!(handle_connect_file_map= OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)))
- {
- error_allow = CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR;
- goto err;
- }
- if (!(handle_connect_map= MapViewOfFile(handle_connect_file_map,
- FILE_MAP_WRITE,0,0,sizeof(DWORD))))
- {
- error_allow = CR_SHARED_MEMORY_CONNECT_MAP_ERROR;
- goto err;
- }
-
- /* Send to server request of connection */
- if (!SetEvent(event_connect_request))
- {
- error_allow = CR_SHARED_MEMORY_CONNECT_SET_ERROR;
- goto err;
- }
-
- /* Wait of answer from server */
- if (WaitForSingleObject(event_connect_answer,connect_timeout*1000) !=
- WAIT_OBJECT_0)
- {
- error_allow = CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR;
- goto err;
- }
-
- /* Get number of connection */
- connect_number = uint4korr(handle_connect_map);/*WAX2*/
- p= int10_to_str(connect_number, connect_number_char, 10);
-
- /*
- The name of event and file-mapping events create agree next rule:
- shared_memory_base_name+unique_part+number_of_connection
-
- Where:
- shared_memory_base_name is uniquel value for each server
- unique_part is uniquel value for each object (events and file-mapping)
- number_of_connection is number of connection between server and client
- */
- suffix_pos = strxmov(tmp, prefix , shared_memory_base_name, "_", connect_number_char,
- "_", NullS);
- strmov(suffix_pos, "DATA");
- if ((handle_file_map = OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)) == NULL)
- {
- error_allow = CR_SHARED_MEMORY_FILE_MAP_ERROR;
- goto err2;
- }
- if ((handle_map = MapViewOfFile(handle_file_map,FILE_MAP_WRITE,0,0,
- smem_buffer_length)) == NULL)
- {
- error_allow = CR_SHARED_MEMORY_MAP_ERROR;
- goto err2;
- }
-
- strmov(suffix_pos, "SERVER_WROTE");
- if ((event_server_wrote = OpenEvent(event_access_rights,FALSE,tmp)) == NULL)
- {
- error_allow = CR_SHARED_MEMORY_EVENT_ERROR;
- goto err2;
- }
-
- strmov(suffix_pos, "SERVER_READ");
- if ((event_server_read = OpenEvent(event_access_rights,FALSE,tmp)) == NULL)
- {
- error_allow = CR_SHARED_MEMORY_EVENT_ERROR;
- goto err2;
- }
-
- strmov(suffix_pos, "CLIENT_WROTE");
- if ((event_client_wrote = OpenEvent(event_access_rights,FALSE,tmp)) == NULL)
- {
- error_allow = CR_SHARED_MEMORY_EVENT_ERROR;
- goto err2;
- }
-
- strmov(suffix_pos, "CLIENT_READ");
- if ((event_client_read = OpenEvent(event_access_rights,FALSE,tmp)) == NULL)
- {
- error_allow = CR_SHARED_MEMORY_EVENT_ERROR;
- goto err2;
- }
-
- strmov(suffix_pos, "CONNECTION_CLOSED");
- if ((event_conn_closed = OpenEvent(event_access_rights,FALSE,tmp)) == NULL)
- {
- error_allow = CR_SHARED_MEMORY_EVENT_ERROR;
- goto err2;
- }
- /*
- Set event that server should send data
- */
- SetEvent(event_server_read);
-
-err2:
- if (error_allow == 0)
- {
- net->vio= vio_new_win32shared_memory(handle_file_map,handle_map,
- event_server_wrote,
- event_server_read,event_client_wrote,
- event_client_read,event_conn_closed);
- }
- else
- {
- error_code = GetLastError();
- if (event_server_read)
- CloseHandle(event_server_read);
- if (event_server_wrote)
- CloseHandle(event_server_wrote);
- if (event_client_read)
- CloseHandle(event_client_read);
- if (event_client_wrote)
- CloseHandle(event_client_wrote);
- if (event_conn_closed)
- CloseHandle(event_conn_closed);
- if (handle_map)
- UnmapViewOfFile(handle_map);
- if (handle_file_map)
- CloseHandle(handle_file_map);
- }
-err:
- my_free(tmp);
- if (error_allow)
- error_code = GetLastError();
- if (event_connect_request)
- CloseHandle(event_connect_request);
- if (event_connect_answer)
- CloseHandle(event_connect_answer);
- if (handle_connect_map)
- UnmapViewOfFile(handle_connect_map);
- if (handle_connect_file_map)
- CloseHandle(handle_connect_file_map);
- if (error_allow)
- {
- if (error_allow == CR_SHARED_MEMORY_EVENT_ERROR)
- set_mysql_extended_error(mysql, error_allow, unknown_sqlstate,
- ER(error_allow), suffix_pos, error_code);
- else
- set_mysql_extended_error(mysql, error_allow, unknown_sqlstate,
- ER(error_allow), error_code);
- return(INVALID_HANDLE_VALUE);
- }
- return(handle_map);
-}
-#endif
-
/**
Read a packet from server. Give error message if socket was down
or packet is an error message
@@ -989,7 +743,7 @@ static const char *default_options[]=
"ssl-key" ,"ssl-cert" ,"ssl-ca" ,"ssl-capath",
"character-sets-dir", "default-character-set", "interactive-timeout",
"connect-timeout", "local-infile", "disable-local-infile",
- "ssl-cipher", "max-allowed-packet", "protocol", "shared-memory-base-name",
+ "ssl-cipher", "max-allowed-packet", "protocol",
"multi-results", "multi-statements", "multi-queries", "secure-auth",
"report-data-truncation", "plugin-dir", "default-auth",
"bind-address", "ssl-crl", "ssl-crlpath",
@@ -1002,7 +756,7 @@ enum option_id {
OPT_ssl_key, OPT_ssl_cert, OPT_ssl_ca, OPT_ssl_capath,
OPT_character_sets_dir, OPT_default_character_set, OPT_interactive_timeout,
OPT_connect_timeout, OPT_local_infile, OPT_disable_local_infile,
- OPT_ssl_cipher, OPT_max_allowed_packet, OPT_protocol, OPT_shared_memory_base_name,
+ OPT_ssl_cipher, OPT_max_allowed_packet, OPT_protocol,
OPT_multi_results, OPT_multi_statements, OPT_multi_queries, OPT_secure_auth,
OPT_report_data_truncation, OPT_plugin_dir, OPT_default_auth,
OPT_bind_address, OPT_ssl_crl, OPT_ssl_crlpath,
@@ -1243,13 +997,6 @@ void mysql_read_default_options(struct st_mysql_options *options,
options->protocol= UINT_MAX32;
}
break;
- case OPT_shared_memory_base_name:
-#ifdef HAVE_SMEM
- if (options->shared_memory_base_name != def_shared_memory_base_name)
- my_free(options->shared_memory_base_name);
- options->shared_memory_base_name=my_strdup(opt_arg,MYF(MY_WME));
-#endif
- break;
case OPT_multi_results:
options->client_flag|= CLIENT_MULTI_RESULTS;
break;
@@ -1656,10 +1403,6 @@ mysql_init(MYSQL *mysql)
? WAIT_FOR_QUERY : ALWAYS_ACCEPT;
#endif
-#ifdef HAVE_SMEM
- mysql->options.shared_memory_base_name= (char*) def_shared_memory_base_name;
-#endif
-
mysql->options.methods_to_use= MYSQL_OPT_GUESS_CONNECTION;
mysql->options.report_data_truncation= TRUE; /* default */
@@ -1849,9 +1592,15 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
#ifdef HAVE_X509_check_host
ret_validation=
- (X509_check_host(server_cert, server_hostname,
- strlen(server_hostname), 0, 0) != 1) &&
- (X509_check_ip_asc(server_cert, server_hostname, 0) != 1);
+ X509_check_host(server_cert, server_hostname,
+ strlen(server_hostname), 0, 0) != 1;
+#ifndef HAVE_WOLFSSL
+ if (ret_validation)
+ {
+ ret_validation=
+ X509_check_ip_asc(server_cert, server_hostname, 0) != 1;
+ }
+#endif
#else
subject= X509_get_subject_name(server_cert);
cn_loc= X509_NAME_get_index_by_NID(subject, NID_commonName, -1);
@@ -2626,12 +2375,6 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info)
info->protocol= MYSQL_VIO_PIPE;
info->handle= vio->hPipe;
return;
- case VIO_TYPE_SHARED_MEMORY:
- info->protocol= MYSQL_VIO_MEMORY;
-#ifdef HAVE_SMEM
- info->handle= vio->handle_file_map; /* or what ? */
-#endif
- return;
#endif
default: DBUG_ASSERT(0);
}
@@ -2710,6 +2453,8 @@ int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
mpvio.db= db;
mpvio.plugin= auth_plugin;
+ DBUG_EXECUTE_IF("client_delay_run_plugin_auth", my_sleep(400000););
+
res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
DBUG_PRINT ("info", ("authenticate_user returned %s",
res == CR_OK ? "CR_OK" :
@@ -2966,42 +2711,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
/*
Part 0: Grab a socket and connect it to the server
*/
-#if defined(HAVE_SMEM)
- if ((!mysql->options.protocol ||
- mysql->options.protocol == MYSQL_PROTOCOL_MEMORY) &&
- (!host || !strcmp(host,LOCAL_HOST)) &&
- mysql->options.shared_memory_base_name)
- {
- DBUG_PRINT("info", ("Using shared memory"));
- if ((create_shared_memory(mysql,net, mysql->options.connect_timeout)) ==
- INVALID_HANDLE_VALUE)
- {
- DBUG_PRINT("error",
- ("host: '%s' socket: '%s' shared memory: %s have_tcpip: %d",
- host ? host : "<null>",
- unix_socket ? unix_socket : "<null>",
- mysql->options.shared_memory_base_name,
- (int) have_tcpip));
- if (mysql->options.protocol == MYSQL_PROTOCOL_MEMORY)
- goto error;
- /*
- Try also with PIPE or TCP/IP. Clear the error from
- create_shared_memory().
- */
-
- net_clear_error(net);
- }
- else
- {
- mysql->options.protocol=MYSQL_PROTOCOL_MEMORY;
- unix_socket = 0;
- host=mysql->options.shared_memory_base_name;
- my_snprintf(host_info=buff, sizeof(buff)-1,
- ER(CR_SHARED_MEMORY_CONNECTION), host);
- }
- }
-#endif /* HAVE_SMEM */
#if defined(HAVE_SYS_UN_H)
if (!net->vio &&
(!mysql->options.protocol ||
@@ -3617,10 +3327,6 @@ static void mysql_close_free_options(MYSQL *mysql)
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
mysql_ssl_free(mysql);
#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
-#ifdef HAVE_SMEM
- if (mysql->options.shared_memory_base_name != def_shared_memory_base_name)
- my_free(mysql->options.shared_memory_base_name);
-#endif /* HAVE_SMEM */
if (mysql->options.extension)
{
struct mysql_async_context *ctxt= mysql->options.extension->async_context;
@@ -4119,13 +3825,6 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
case MYSQL_OPT_PROTOCOL:
mysql->options.protocol= *(uint*) arg;
break;
- case MYSQL_SHARED_MEMORY_BASE_NAME:
-#ifdef HAVE_SMEM
- if (mysql->options.shared_memory_base_name != def_shared_memory_base_name)
- my_free(mysql->options.shared_memory_base_name);
- mysql->options.shared_memory_base_name=my_strdup(arg,MYF(MY_WME));
-#endif
- break;
case MYSQL_OPT_USE_REMOTE_CONNECTION:
case MYSQL_OPT_USE_EMBEDDED_CONNECTION:
case MYSQL_OPT_GUESS_CONNECTION:
@@ -4263,8 +3962,8 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
}
}
break;
+ case MYSQL_SHARED_MEMORY_BASE_NAME:
default:
- break;
DBUG_RETURN(1);
}
DBUG_RETURN(0);
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 3a1f176485f..5c14b8071a3 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -58,6 +58,19 @@ uint calc_days_in_year(uint year)
366 : 365);
}
+
+#ifdef DBUG_ASSERT_EXISTS
+
+
+static const ulonglong C_KNOWN_FLAGS= C_TIME_NO_ZERO_IN_DATE |
+ C_TIME_NO_ZERO_DATE |
+ C_TIME_INVALID_DATES;
+
+#define C_FLAGS_OK(flags) (((flags) & ~C_KNOWN_FLAGS) == 0)
+
+#endif
+
+
/**
@brief Check datetime value for validity according to flags.
@@ -82,13 +95,14 @@ uint calc_days_in_year(uint year)
my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
ulonglong flags, int *was_cut)
{
+ DBUG_ASSERT(C_FLAGS_OK(flags));
if (ltime->time_type == MYSQL_TIMESTAMP_TIME)
return FALSE;
if (not_zero_date)
{
- if (((flags & TIME_NO_ZERO_IN_DATE) &&
+ if (((flags & C_TIME_NO_ZERO_IN_DATE) &&
(ltime->month == 0 || ltime->day == 0)) || ltime->neg ||
- (!(flags & TIME_INVALID_DATES) &&
+ (!(flags & C_TIME_INVALID_DATES) &&
ltime->month && ltime->day > days_in_month[ltime->month-1] &&
(ltime->month != 2 || calc_days_in_year(ltime->year) != 366 ||
ltime->day != 29)))
@@ -97,12 +111,13 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
return TRUE;
}
}
- else if (flags & TIME_NO_ZERO_DATE)
+ else if (flags & C_TIME_NO_ZERO_DATE)
{
/*
We don't set *was_cut here to signal that the problem was a zero date
and not an invalid date
*/
+ *was_cut|= MYSQL_TIME_WARN_ZERO_DATE;
return TRUE;
}
return FALSE;
@@ -145,7 +160,8 @@ static int get_punct(const char **str, const char *end)
return 1;
}
-static int get_date_time_separator(uint *number_of_fields, ulonglong flags,
+static int get_date_time_separator(uint *number_of_fields,
+ my_bool punct_is_date_time_separator,
const char **str, const char *end)
{
const char *s= *str;
@@ -164,11 +180,11 @@ static int get_date_time_separator(uint *number_of_fields, ulonglong flags,
but
cast("11:11:11.12.12.12" as time) should give 11:11:11.12
that is, a punctuation character can be accepted as a date/time separator
- only if TIME_DATETIME_ONLY (see str_to_time) is not set.
+ only if "punct_is_date_time_separator" is set.
*/
if (my_ispunct(&my_charset_latin1, *s))
{
- if (flags & TIME_DATETIME_ONLY)
+ if (!punct_is_date_time_separator)
{
/* see above, returning 1 is not enough, we need hard abort here */
*number_of_fields= 0;
@@ -241,25 +257,220 @@ static void get_microseconds(ulong *val, MYSQL_TIME_STATUS *status,
*val= (ulong) (tmp * log_10_int[6 - (*str - start)]);
else
*val= tmp;
+ if (str[0] < end && my_isdigit(&my_charset_latin1, str[0][0]))
+ {
+ /*
+ We don't need the exact nanoseconds value.
+ Knowing the first digit is enough for rounding.
+ */
+ status->nanoseconds= 100 * (uint)(str[0][0] - '0');
+ }
if (skip_digits(str, end))
status->warnings|= MYSQL_TIME_NOTE_TRUNCATED;
}
+static int check_time_range_internal(MYSQL_TIME *ltime,
+ ulong max_hour, ulong err_hour,
+ uint dec, int *warning);
+
+int check_time_range(MYSQL_TIME *ltime, uint dec, int *warning)
+{
+ return check_time_range_internal(ltime, TIME_MAX_HOUR, UINT_MAX32,
+ dec, warning);
+}
+
+
+static my_bool
+set_neg(my_bool neg, MYSQL_TIME_STATUS *st, MYSQL_TIME *ltime)
+{
+ if ((ltime->neg= neg) && ltime->time_type != MYSQL_TIMESTAMP_TIME)
+ {
+ st->warnings|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+ /* Remove trailing spaces and garbage */
+static my_bool get_suffix(const char *str, size_t length, size_t *new_length)
+{
+ /*
+ QQ: perhaps 'T' should be considered as a date/time delimiter only
+ if it's followed by a digit. Learn ISO 8601 details.
+ */
+ my_bool garbage= FALSE;
+ for ( ; length > 0 ; length--)
+ {
+ char ch= str[length - 1];
+ if (my_isdigit(&my_charset_latin1, ch) ||
+ my_ispunct(&my_charset_latin1, ch))
+ break;
+ if (my_isspace(&my_charset_latin1, ch))
+ continue;
+ if (ch == 'T')
+ {
+ /* 'T' has a meaning only after a digit. Otherwise it's a garbage */
+ if (length >= 2 && my_isdigit(&my_charset_latin1, str[length - 2]))
+ break;
+ }
+ garbage= TRUE;
+ }
+ *new_length= length;
+ return garbage;
+}
+
+
+static size_t get_prefix(const char *str, size_t length, const char **endptr)
+{
+ const char *str0= str, *end= str + length;
+ for (; str < end && my_isspace(&my_charset_latin1, *str) ; str++)
+ { }
+ *endptr= str;
+ return str - str0;
+}
+
+
+static size_t get_sign(my_bool *neg, const char *str, size_t length,
+ const char **endptr)
+{
+ const char *str0= str;
+ if (length)
+ {
+ if ((*neg= (*str == '-')) || (*str == '+'))
+ str++;
+ }
+ else
+ *neg= FALSE;
+ *endptr= str;
+ return str - str0;
+}
+
+
+static my_bool find_body(my_bool *neg, const char *str, size_t length,
+ MYSQL_TIME *to, int *warn,
+ const char **new_str, size_t *new_length)
+{
+ size_t sign_length;
+ *warn= 0;
+ length-= get_prefix(str, length, &str);
+ sign_length= get_sign(neg, str, length, &str);
+ length-= sign_length;
+ /* There can be a space after a sign again: '- 10:20:30' or '- 1 10:20:30' */
+ length-= get_prefix(str, length, &str);
+ if (get_suffix(str, length, &length))
+ *warn|= MYSQL_TIME_WARN_TRUNCATED;
+ *new_str= str;
+ *new_length= length;
+ if (!length || !my_isdigit(&my_charset_latin1, *str))
+ {
+ *warn|= MYSQL_TIME_WARN_EDOM;
+ set_zero_time(to, MYSQL_TIMESTAMP_ERROR);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+typedef struct
+{
+ uint count_punct;
+ uint count_colon;
+ uint count_iso_date_time_separator;
+} MYSQL_TIME_USED_CHAR_STATISTICS;
+
+
+static void
+mysql_time_used_char_statistics_init(MYSQL_TIME_USED_CHAR_STATISTICS *to,
+ const char *str, const char *end)
+{
+ const char *s;
+ bzero((void *) to, sizeof(MYSQL_TIME_USED_CHAR_STATISTICS));
+ for (s= str; s < end; s++)
+ {
+ if (my_ispunct(&my_charset_latin1, *s))
+ to->count_punct++;
+ if (*s == ':')
+ to->count_colon++;
+ if (*s == 'T')
+ to->count_iso_date_time_separator++;
+ }
+}
+
+
+static my_bool
+is_datetime_body_candidate(const char *str, size_t length,
+ my_bool allow_dates_delimited,
+ my_bool allow_dates_numeric)
+{
+ static uint min_date_length= 5; /* '1-1-1' -> '0001-01-01' */
+ uint pos, count_punct= 0;
+ uint date_time_separator_length= MY_TEST(!allow_dates_delimited);
+ if (length >= 12)
+ return TRUE;
+ /*
+ The shortest possible DATE is '1-1-1', which is 5 characters.
+ To make a full datetime it should be at least followed by a space or a 'T'.
+ To make a date it should be just not less that 5 characters.
+ */
+ if (length < min_date_length + date_time_separator_length &&
+ !allow_dates_numeric)
+ return FALSE;
+ for (pos= 0; pos < length; pos++)
+ {
+ if (str[pos] == 'T') /* Date/time separator */
+ return TRUE;
+ if (str[pos] == ' ')
+ {
+ /*
+ We found a space. If can be a DATE/TIME separator:
+ TIME('1-1-1 1:1:1.0) -> '0001-01-01 01:01:01.0'
+
+ But it can be also a DAY/TIME separator:
+ TIME('1 11') -> 35:00:00 = 1 day 11 hours
+ TIME('1 111') -> 135:00:00 = 1 day 111 hours
+ TIME('11 11') -> 275:00:00 = 11 days 11 hours
+ TIME('111 11') -> 838:59:59 = 111 days 11 hours with overflow
+ TIME('1111 11') -> 838:59:59 = 1111 days 11 hours with overflow
+ */
+ return count_punct > 0; /* Can be a DATE if already had separators*/
+ }
+ if (my_ispunct(&my_charset_latin1, str[pos]))
+ {
+ if (allow_dates_delimited && str[pos] != ':')
+ return TRUE;
+ count_punct++;
+ }
+ }
+ return allow_dates_numeric && count_punct == 0;
+}
+
+
+static my_bool
+str_to_DDhhmmssff_internal(my_bool neg, const char *str, size_t length,
+ MYSQL_TIME *l_time,
+ ulong max_hour, ulong err_hour,
+ MYSQL_TIME_STATUS *status,
+ const char **endptr);
+
+
/*
Convert a timestamp string to a MYSQL_TIME value.
SYNOPSIS
- str_to_datetime()
+ str_to_datetime_or_date_body()
str String to parse
length Length of string
l_time Date is stored here
flags Bitmap of following items
- TIME_FUZZY_DATE
TIME_DATETIME_ONLY Set if we only allow full datetimes.
TIME_NO_ZERO_IN_DATE Don't allow partial dates
TIME_NO_ZERO_DATE Don't allow 0000-00-00 date
TIME_INVALID_DATES Allow 2000-02-31
+ punct_is_date_time_separator
+ Allow punctuation as a date/time separator,
+ or return a hard error.
status Conversion status
@@ -292,32 +503,22 @@ static void get_microseconds(ulong *val, MYSQL_TIME_STATUS *status,
#define MAX_DATE_PARTS 8
-my_bool
-str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time,
- ulonglong flags, MYSQL_TIME_STATUS *status)
+static my_bool
+str_to_datetime_or_date_body(const char *str, size_t length, MYSQL_TIME *l_time,
+ ulonglong flags,
+ my_bool punct_is_date_time_separator,
+ MYSQL_TIME_STATUS *status,
+ uint *number_of_fields,
+ const char **endptr)
{
const char *end=str+length, *pos;
- uint number_of_fields= 0, digits, year_length, not_zero_date;
- DBUG_ENTER("str_to_datetime");
+ uint digits, year_length, not_zero_date;
+ int warn= 0;
+ DBUG_ENTER("str_to_datetime_or_date_body");
+ DBUG_ASSERT(C_FLAGS_OK(flags));
bzero(l_time, sizeof(*l_time));
-
- if (flags & TIME_TIME_ONLY)
- {
- my_bool ret= str_to_time(str, length, l_time, flags, status);
- DBUG_RETURN(ret);
- }
-
- my_time_status_init(status);
-
- /* Skip space at start */
- for (; str != end && my_isspace(&my_charset_latin1, *str) ; str++)
- ;
- if (str == end || ! my_isdigit(&my_charset_latin1, *str))
- {
- status->warnings= MYSQL_TIME_WARN_TRUNCATED;
- l_time->time_type= MYSQL_TIMESTAMP_NONE;
- DBUG_RETURN(1);
- }
+ *number_of_fields= 0;
+ *endptr= str;
/*
Calculate number of digits in first part.
@@ -345,49 +546,53 @@ str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time,
(only numbers like [YY]YYMMDD[T][hhmmss[.uuuuuu]])
*/
year_length= (digits == 4 || digits == 8 || digits >= 14) ? 4 : 2;
- if (get_digits(&l_time->year, &number_of_fields, &str, end, year_length)
- || get_digits(&l_time->month, &number_of_fields, &str, end, 2)
- || get_digits(&l_time->day, &number_of_fields, &str, end, 2)
+ if (get_digits(&l_time->year, number_of_fields, &str, end, year_length)
+ || get_digits(&l_time->month, number_of_fields, &str, end, 2)
+ || get_digits(&l_time->day, number_of_fields, &str, end, 2)
|| get_maybe_T(&str, end)
- || get_digits(&l_time->hour, &number_of_fields, &str, end, 2)
- || get_digits(&l_time->minute, &number_of_fields, &str, end, 2)
- || get_digits(&l_time->second, &number_of_fields, &str, end, 2))
- status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
+ || get_digits(&l_time->hour, number_of_fields, &str, end, 2)
+ || get_digits(&l_time->minute, number_of_fields, &str, end, 2)
+ || get_digits(&l_time->second, number_of_fields, &str, end, 2))
+ warn|= MYSQL_TIME_WARN_TRUNCATED;
}
else
{
const char *start= str;
- if (get_number(&l_time->year, &number_of_fields, &str, end))
- status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
+ if (get_number(&l_time->year, number_of_fields, &str, end))
+ warn|= MYSQL_TIME_WARN_TRUNCATED;
year_length= (uint)(str - start);
- if (!status->warnings &&
+ if (!warn &&
(get_punct(&str, end)
- || get_number(&l_time->month, &number_of_fields, &str, end)
+ || get_number(&l_time->month, number_of_fields, &str, end)
|| get_punct(&str, end)
- || get_number(&l_time->day, &number_of_fields, &str, end)
- || get_date_time_separator(&number_of_fields, flags, &str, end)
- || get_number(&l_time->hour, &number_of_fields, &str, end)
+ || get_number(&l_time->day, number_of_fields, &str, end)
+ || get_date_time_separator(number_of_fields,
+ punct_is_date_time_separator, &str, end)
+ || get_number(&l_time->hour, number_of_fields, &str, end)
|| get_punct(&str, end)
- || get_number(&l_time->minute, &number_of_fields, &str, end)
+ || get_number(&l_time->minute, number_of_fields, &str, end)
|| get_punct(&str, end)
- || get_number(&l_time->second, &number_of_fields, &str, end)))
- status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
+ || get_number(&l_time->second, number_of_fields, &str, end)))
+ warn|= MYSQL_TIME_WARN_TRUNCATED;
}
+ status->warnings|= warn;
+ *endptr= str;
/* we're ok if date part is correct. even if the rest is truncated */
- if (number_of_fields < 3)
+ if (*number_of_fields < 3)
{
l_time->time_type= MYSQL_TIMESTAMP_NONE;
status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
DBUG_RETURN(TRUE);
}
- if (!status->warnings && str < end && *str == '.')
+ if (!warn && str < end && *str == '.')
{
str++;
get_microseconds(&l_time->second_part, status,
- &number_of_fields, &str, end);
+ number_of_fields, &str, end);
+ *endptr= str;
}
not_zero_date = l_time->year || l_time->month || l_time->day ||
@@ -407,23 +612,16 @@ str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time,
if (check_date(l_time, not_zero_date, flags, &status->warnings))
goto err;
- l_time->time_type= (number_of_fields <= 3 ?
+ l_time->time_type= (*number_of_fields <= 3 ?
MYSQL_TIMESTAMP_DATE : MYSQL_TIMESTAMP_DATETIME);
- for (; str != end ; str++)
- {
- if (!my_isspace(&my_charset_latin1,*str))
- {
- status->warnings= MYSQL_TIME_WARN_TRUNCATED;
- break;
- }
- }
+ if (str != end)
+ status->warnings= MYSQL_TIME_WARN_TRUNCATED;
DBUG_RETURN(FALSE);
err:
- bzero((char*) l_time, sizeof(*l_time));
- l_time->time_type= MYSQL_TIMESTAMP_ERROR;
+ set_zero_time(l_time, MYSQL_TIMESTAMP_ERROR);
DBUG_RETURN(TRUE);
}
@@ -432,7 +630,7 @@ err:
Convert a time string to a MYSQL_TIME struct.
SYNOPSIS
- str_to_time()
+ str_to_datetime_or_date_or_time_body()
str A string in full TIMESTAMP format or
[-] DAYS [H]H:MM:SS, [H]H:MM:SS, [M]M:SS, [H]HMMSS,
[M]MSS or [S]S
@@ -457,45 +655,280 @@ err:
TRUE on error
*/
-my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time,
- ulonglong fuzzydate, MYSQL_TIME_STATUS *status)
+static my_bool
+str_to_datetime_or_date_or_time_body(const char *str, size_t length,
+ MYSQL_TIME *l_time,
+ ulonglong fuzzydate,
+ MYSQL_TIME_STATUS *status,
+ ulong time_max_hour,
+ ulong time_err_hour,
+ my_bool allow_dates_delimited,
+ my_bool allow_dates_numeric)
{
- ulong date[5];
- ulonglong value;
- const char *end=str+length, *end_of_days;
- my_bool found_days,found_hours, neg= 0;
- uint UNINIT_VAR(state);
-
- my_time_status_init(status);
- for (; str != end && my_isspace(&my_charset_latin1,*str) ; str++)
- length--;
- if (str != end && *str == '-')
- {
- neg=1;
- str++;
- length--;
- }
- if (str == end)
- {
- status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
- goto err;
- }
+ const char *endptr;
+ DBUG_ASSERT(C_FLAGS_OK(fuzzydate));
/* Check first if this is a full TIMESTAMP */
- if (length >= 12)
+ if (is_datetime_body_candidate(str, length,
+ allow_dates_delimited,
+ allow_dates_numeric))
{ /* Probably full timestamp */
- (void) str_to_datetime(str, length, l_time,
- (fuzzydate & ~TIME_TIME_ONLY) | TIME_DATETIME_ONLY,
- status);
- if (l_time->time_type >= MYSQL_TIMESTAMP_ERROR)
- return l_time->time_type == MYSQL_TIMESTAMP_ERROR;
+ int warn_copy= status->warnings; /* could already be set by find_body() */
+ uint number_of_fields;
+ (void) str_to_datetime_or_date_body(str, length, l_time, fuzzydate,
+ FALSE, status,
+ &number_of_fields, &endptr);
+ DBUG_ASSERT(endptr >= str);
+ DBUG_ASSERT(endptr <= str + length);
+ switch (l_time->time_type) {
+ case MYSQL_TIMESTAMP_DATETIME:
+ return FALSE;
+ case MYSQL_TIMESTAMP_DATE:
+ {
+ /*
+ Successfully parsed as DATE, but it can also be a TIME:
+ '24:02:03' - continue and parse as TIME
+ '24:02:03 garbage /////' - continue and parse as TIME
+ '24:02:03T' - return DATE
+ '24-02-03' - return DATE
+ '24/02/03' - return DATE
+ '11111' - return DATE
+ */
+ MYSQL_TIME_USED_CHAR_STATISTICS used_chars;
+ mysql_time_used_char_statistics_init(&used_chars, str, endptr);
+ if (used_chars.count_iso_date_time_separator || !used_chars.count_colon)
+ return FALSE;
+ }
+ break;
+ case MYSQL_TIMESTAMP_ERROR:
+ {
+ MYSQL_TIME_USED_CHAR_STATISTICS used_chars;
+ /*
+ Check if it parsed as DATETIME but then failed as out of range:
+ '2011-02-32 8:46:06.23434' - return error
+ */
+ if (number_of_fields > 3)
+ return TRUE;
+ /*
+ Check if it parsed as DATE but then failed as out of range:
+ '100000:02:03' - continue and parse as TIME
+ '100000:02:03T' - return error
+ '100000/02/03' - return error
+ '100000-02-03' - return error
+ */
+ mysql_time_used_char_statistics_init(&used_chars, str, endptr);
+ if (used_chars.count_iso_date_time_separator || !used_chars.count_colon)
+ return TRUE;
+ }
+ break;
+ case MYSQL_TIMESTAMP_NONE:
+ {
+ if (allow_dates_numeric && endptr >= str + length)
+ {
+ /*
+ For backward compatibility this parses as DATE and fails:
+ EXTRACT(DAY FROM '1111') -- return error
+ EXTRACT(DAY FROM '1') -- return error
+ */
+ MYSQL_TIME_USED_CHAR_STATISTICS used_chars;
+ mysql_time_used_char_statistics_init(&used_chars, str, endptr);
+ if (!used_chars.count_iso_date_time_separator &&
+ !used_chars.count_colon &&
+ !used_chars.count_punct)
+ return TRUE;
+ }
+ /*
+ - '256 10:30:30' - continue and parse as TIME
+ - '4294967296:59:59.123456456' - continue and parse as TIME
+ */
+ }
+ break;
+ case MYSQL_TIMESTAMP_TIME:
+ DBUG_ASSERT(0);
+ break;
+ }
+ my_time_status_init(status);
+ status->warnings= warn_copy;
+ }
+
+ if (!str_to_DDhhmmssff_internal(FALSE, str, length, l_time,
+ time_max_hour, time_err_hour,
+ status, &endptr))
+ return FALSE;
+
+ set_zero_time(l_time, MYSQL_TIMESTAMP_ERROR);
+ return TRUE;
+}
+
+
+/*
+ Convert a string with INTERVAL DAY TO SECOND to MYSQL_TIME.
+ Input format: [-][DD ]hh:mm:ss.ffffff
+
+ If the input string appears to be a DATETIME, error is returned.
+*/
+my_bool str_to_DDhhmmssff(const char *str, size_t length, MYSQL_TIME *ltime,
+ ulong max_hour, MYSQL_TIME_STATUS *status)
+{
+ my_bool neg;
+ const char *endptr;
+
+ my_time_status_init(status);
+ if (find_body(&neg, str, length, ltime, &status->warnings, &str, &length))
+ return TRUE;
+
+ /* Reject anything that might be parsed as a full TIMESTAMP */
+ if (is_datetime_body_candidate(str, length, FALSE, FALSE))
+ {
+ uint number_of_fields;
+ (void) str_to_datetime_or_date_body(str, length, ltime, 0, FALSE,
+ status, &number_of_fields, &endptr);
+ if (ltime->time_type > MYSQL_TIMESTAMP_ERROR)
+ {
+ status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
+ ltime->time_type= MYSQL_TIMESTAMP_NONE;
+ return TRUE;
+ }
my_time_status_init(status);
}
+ /*
+ Scan DDhhmmssff then reject anything that can remind date/datetime.
+ For example, in case of '2001-01-01', str_to_DDhhmmssff_internal()
+ will scan only '2001'.
+ */
+ if (str_to_DDhhmmssff_internal(neg, str, length, ltime, max_hour,
+ UINT_MAX32, status, &endptr) ||
+ (endptr < str + length && endptr[0] == '-'))
+ return TRUE;
+ return FALSE;
+}
+
+
+my_bool
+str_to_datetime_or_date_or_time(const char *str, size_t length,
+ MYSQL_TIME *to, ulonglong mode,
+ MYSQL_TIME_STATUS *status,
+ ulong time_max_hour,
+ ulong time_err_hour)
+{
+ my_bool neg;
+ DBUG_ASSERT(C_FLAGS_OK(mode));
+ my_time_status_init(status);
+ return
+ find_body(&neg, str, length, to, &status->warnings, &str, &length) ||
+ str_to_datetime_or_date_or_time_body(str, length, to, mode, status,
+ time_max_hour, time_err_hour,
+ FALSE, FALSE) ||
+ set_neg(neg, status, to);
+}
+
+
+my_bool
+str_to_datetime_or_date_or_interval_hhmmssff(const char *str, size_t length,
+ MYSQL_TIME *to, ulonglong mode,
+ MYSQL_TIME_STATUS *status,
+ ulong time_max_hour,
+ ulong time_err_hour)
+{
+ my_bool neg;
+ DBUG_ASSERT(C_FLAGS_OK(mode));
+ my_time_status_init(status);
+ return
+ find_body(&neg, str, length, to, &status->warnings, &str, &length) ||
+ str_to_datetime_or_date_or_time_body(str, length, to, mode, status,
+ time_max_hour, time_err_hour,
+ TRUE, FALSE) ||
+ set_neg(neg, status, to);
+}
+
+
+my_bool
+str_to_datetime_or_date_or_interval_day(const char *str, size_t length,
+ MYSQL_TIME *to, ulonglong mode,
+ MYSQL_TIME_STATUS *status,
+ ulong time_max_hour,
+ ulong time_err_hour)
+{
+ my_bool neg;
+ DBUG_ASSERT(C_FLAGS_OK(mode));
+ my_time_status_init(status);
+ /*
+ For backward compatibility we allow to parse non-delimited
+ values as DATE rather than as TIME:
+ EXTRACT(DAY FROM '11111')
+ */
+ return
+ find_body(&neg, str, length, to, &status->warnings, &str, &length) ||
+ str_to_datetime_or_date_or_time_body(str, length, to, mode, status,
+ time_max_hour, time_err_hour,
+ TRUE, TRUE) ||
+ set_neg(neg, status, to);
+}
+
+
+my_bool
+str_to_datetime_or_date(const char *str, size_t length, MYSQL_TIME *l_time,
+ ulonglong flags, MYSQL_TIME_STATUS *status)
+{
+ my_bool neg;
+ uint number_of_fields;
+ const char *endptr;
+ DBUG_ASSERT(C_FLAGS_OK(flags));
+ my_time_status_init(status);
+ return
+ find_body(&neg, str, length, l_time, &status->warnings, &str, &length) ||
+ str_to_datetime_or_date_body(str, length, l_time, flags, TRUE,
+ status, &number_of_fields, &endptr) ||
+ set_neg(neg, status, l_time);
+}
+
+
+
+/**
+ Convert a string to INTERVAL DAY TO SECOND.
+ Input format: [DD ]hh:mm:ss.ffffff
+
+ Datetime or date formats are not understood.
+
+ Optional leading spaces and signs must be scanned by the caller.
+ "str" should point to the first digit.
+
+ @param neg - set the value to be negative
+ @param str - the input string
+ @param length - length of "str"
+ @param[OUT] l_time - write the result here
+ @param max_hour - if the result hour value appears to be greater than
+ max_hour, then cut to result to 'max_hour:59:59.999999'
+ @param err_hour - if the hour appears to be greater than err_hour,
+ return an error (without cut)
+ @param status
+ @param endptr
+*/
+static my_bool
+str_to_DDhhmmssff_internal(my_bool neg, const char *str, size_t length,
+ MYSQL_TIME *l_time,
+ ulong max_hour, ulong err_hour,
+ MYSQL_TIME_STATUS *status, const char **endptr)
+{
+ ulong date[5];
+ ulonglong value;
+ const char *end=str + length, *end_of_days;
+ my_bool found_days, found_hours;
+ uint UNINIT_VAR(state);
+
+ *endptr= str;
l_time->neg= neg;
- /* Not a timestamp. Try to get this as a DAYS_TO_SECOND string */
+ /* Not a timestamp. Try to get this as a DAYS TO SECOND string */
for (value=0; str != end && my_isdigit(&my_charset_latin1,*str) ; str++)
+ {
value=value*10L + (long) (*str - '0');
+ if (value >= 42949672955959ULL) /* i.e. UINT_MAX32 : 59 : 59 */
+ {
+ status->warnings|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ goto err;
+ }
+ }
/* Skip all space after 'days' */
end_of_days= str;
@@ -514,6 +947,11 @@ my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time,
my_isdigit(&my_charset_latin1, str[1]))
{
date[0]= 0; /* Assume we found hours */
+ if (value >= UINT_MAX32)
+ {
+ status->warnings|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ goto err;
+ }
date[1]= (ulong) value;
state=2;
found_hours=1;
@@ -523,6 +961,7 @@ my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time,
{
/* String given as one number; assume HHMMSS format */
date[0]= 0;
+ DBUG_ASSERT(value <= ((ulonglong) UINT_MAX32) * 10000ULL);
date[1]= (ulong) (value/10000);
date[2]= (ulong) (value/100 % 100);
date[3]= (ulong) (value % 100);
@@ -557,7 +996,7 @@ my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time,
fractional:
/* Get fractional second part */
- if (!status->warnings && str < end && *str == '.')
+ if (str < end && *str == '.')
{
uint number_of_fields= 0;
str++;
@@ -605,6 +1044,11 @@ fractional:
goto err;
}
+ if ((ulonglong) date[0] * 24 + date[1] > (ulonglong) UINT_MAX32)
+ {
+ status->warnings|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ goto err;
+ }
l_time->year= 0; /* For protocol::store_time */
l_time->month= 0;
l_time->day= 0;
@@ -614,27 +1058,20 @@ fractional:
l_time->second_part= date[4];
l_time->time_type= MYSQL_TIMESTAMP_TIME;
+ *endptr= str;
+
/* Check if the value is valid and fits into MYSQL_TIME range */
- if (check_time_range(l_time, 6, &status->warnings))
+ if (check_time_range_internal(l_time, max_hour, err_hour,
+ 6, &status->warnings))
return TRUE;
/* Check if there is garbage at end of the MYSQL_TIME specification */
if (str != end)
- {
- do
- {
- if (!my_isspace(&my_charset_latin1,*str))
- {
- status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
- break;
- }
- } while (++str != end);
- }
+ status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
return FALSE;
err:
- bzero((char*) l_time, sizeof(*l_time));
- l_time->time_type= MYSQL_TIMESTAMP_ERROR;
+ *endptr= str;
return TRUE;
}
@@ -643,8 +1080,11 @@ err:
Check 'time' value to lie in the MYSQL_TIME range
SYNOPSIS:
- check_time_range()
+ check_time_range_internal()
time pointer to MYSQL_TIME value
+ ulong max_hour - maximum allowed hour value. if the hour is greater,
+ cut the time value to 'max_hour:59:59.999999'
+ ulong err_hour - if hour is greater than this value, return an error
uint dec
warning set MYSQL_TIME_WARN_OUT_OF_RANGE flag if the value is out of range
@@ -658,13 +1098,16 @@ err:
1 time value is invalid
*/
-int check_time_range(struct st_mysql_time *my_time, uint dec, int *warning)
+int check_time_range_internal(struct st_mysql_time *my_time,
+ ulong max_hour, ulong err_hour,
+ uint dec, int *warning)
{
- longlong hour;
+ ulonglong hour;
static ulong max_sec_part[TIME_SECOND_PART_DIGITS+1]= {000000, 900000, 990000,
999000, 999900, 999990, 999999};
- if (my_time->minute >= 60 || my_time->second >= 60)
+ if (my_time->minute >= 60 || my_time->second >= 60 ||
+ my_time->hour > err_hour)
{
*warning|= MYSQL_TIME_WARN_TRUNCATED;
return 1;
@@ -675,14 +1118,14 @@ int check_time_range(struct st_mysql_time *my_time, uint dec, int *warning)
if (dec == AUTO_SEC_PART_DIGITS)
dec= TIME_SECOND_PART_DIGITS;
- if (hour <= TIME_MAX_HOUR &&
- (hour != TIME_MAX_HOUR || my_time->minute != TIME_MAX_MINUTE ||
+ if (hour <= max_hour &&
+ (hour != max_hour || my_time->minute != TIME_MAX_MINUTE ||
my_time->second != TIME_MAX_SECOND ||
my_time->second_part <= max_sec_part[dec]))
return 0;
my_time->day= 0;
- my_time->hour= TIME_MAX_HOUR;
+ my_time->hour= max_hour;
my_time->minute= TIME_MAX_MINUTE;
my_time->second= TIME_MAX_SECOND;
my_time->second_part= max_sec_part[dec];
@@ -1031,6 +1474,46 @@ static char* fmt_number(uint val, char *out, uint digits)
}
+static int my_mmssff_to_str(const MYSQL_TIME *ltime, char *to, uint fsp)
+{
+ char *pos= to;
+ if (fsp == AUTO_SEC_PART_DIGITS)
+ fsp= ltime->second_part ? TIME_SECOND_PART_DIGITS : 0;
+ DBUG_ASSERT(fsp <= TIME_SECOND_PART_DIGITS);
+ pos= fmt_number(ltime->minute, pos, 2);
+ *pos++= ':';
+ pos= fmt_number(ltime->second, pos, 2);
+ if (fsp)
+ {
+ *pos++= '.';
+ pos= fmt_number((uint)sec_part_shift(ltime->second_part, fsp), pos, fsp);
+ }
+ return (int) (pos - to);
+}
+
+
+int my_interval_DDhhmmssff_to_str(const MYSQL_TIME *ltime, char *to, uint fsp)
+{
+ uint hour= ltime->day * 24 + ltime->hour;
+ char *pos= to;
+ DBUG_ASSERT(!ltime->year);
+ DBUG_ASSERT(!ltime->month);
+
+ if(ltime->neg)
+ *pos++= '-';
+ if (hour >= 24)
+ {
+ pos= longlong10_to_str((longlong) hour / 24, pos, 10);
+ *pos++= ' ';
+ }
+ pos= fmt_number(hour % 24, pos, 2);
+ *pos++= ':';
+ pos+= my_mmssff_to_str(ltime, pos, fsp);
+ *pos= 0;
+ return (int) (pos-to);
+}
+
+
/*
Functions to convert time/date/datetime value to a string,
using default format.
@@ -1048,11 +1531,6 @@ int my_time_to_str(const MYSQL_TIME *l_time, char *to, uint digits)
uint hour= day * 24 + l_time->hour;
char*pos= to;
- if (digits == AUTO_SEC_PART_DIGITS)
- digits= l_time->second_part ? TIME_SECOND_PART_DIGITS : 0;
-
- DBUG_ASSERT(digits <= TIME_SECOND_PART_DIGITS);
-
if(l_time->neg)
*pos++= '-';
@@ -1063,17 +1541,7 @@ int my_time_to_str(const MYSQL_TIME *l_time, char *to, uint digits)
pos= fmt_number(hour, pos, 2);
*pos++= ':';
- pos= fmt_number(l_time->minute, pos, 2);
- *pos++= ':';
- pos= fmt_number(l_time->second, pos, 2);
-
- if (digits)
- {
- *pos++= '.';
- pos= fmt_number((uint)sec_part_shift(l_time->second_part, digits),
- pos, digits);
- }
-
+ pos+= my_mmssff_to_str(l_time, pos, digits);
*pos= 0;
return (int) (pos-to);
}
@@ -1095,12 +1563,6 @@ int my_date_to_str(const MYSQL_TIME *l_time, char *to)
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to, uint digits)
{
char *pos= to;
-
- if (digits == AUTO_SEC_PART_DIGITS)
- digits= l_time->second_part ? TIME_SECOND_PART_DIGITS : 0;
-
- DBUG_ASSERT(digits <= TIME_SECOND_PART_DIGITS);
-
pos= fmt_number(l_time->year, pos, 4);
*pos++='-';
pos= fmt_number(l_time->month, pos, 2);
@@ -1109,17 +1571,7 @@ int my_datetime_to_str(const MYSQL_TIME *l_time, char *to, uint digits)
*pos++=' ';
pos= fmt_number(l_time->hour, pos, 2);
*pos++= ':';
- pos= fmt_number(l_time->minute, pos, 2);
- *pos++= ':';
- pos= fmt_number(l_time->second, pos, 2);
-
- if (digits)
- {
- *pos++='.';
- pos= fmt_number((uint) sec_part_shift(l_time->second_part, digits), pos,
- digits);
- }
-
+ pos+= my_mmssff_to_str(l_time, pos, digits);
*pos= 0;
return (int)(pos - to);
}
@@ -1185,7 +1637,7 @@ int my_timeval_to_str(const struct timeval *tm, char *to, uint dec)
representation and form value of DATETIME type as side-effect.
SYNOPSIS
- number_to_datetime()
+ number_to_datetime_or_date()
nr - datetime value as number
time_res - pointer for structure for broken-down representation
flags - flags to use in validating date, as in str_to_datetime()
@@ -1206,10 +1658,12 @@ int my_timeval_to_str(const struct timeval *tm, char *to, uint dec)
Datetime value in YYYYMMDDHHMMSS format.
*/
-longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
- ulonglong flags, int *was_cut)
+longlong number_to_datetime_or_date(longlong nr, ulong sec_part,
+ MYSQL_TIME *time_res,
+ ulonglong flags, int *was_cut)
{
long part1,part2;
+ DBUG_ASSERT(C_FLAGS_OK(flags));
*was_cut= 0;
time_res->time_type=MYSQL_TIMESTAMP_DATE;
@@ -1274,13 +1728,17 @@ longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
!check_date(time_res, nr || sec_part, flags, was_cut))
{
if (time_res->time_type == MYSQL_TIMESTAMP_DATE && sec_part != 0)
- *was_cut= MYSQL_TIME_NOTE_TRUNCATED;
+ {
+ /* Date format, but with fractional digits, e.g. 20010203.5 */
+ *was_cut= MYSQL_TIME_NOTE_TRUNCATED;
+ time_res->second_part= 0;
+ }
return nr;
}
/* Don't want to have was_cut get set if NO_ZERO_DATE was violated. */
- if (nr || !(flags & TIME_NO_ZERO_DATE))
- *was_cut= 1;
+ if (nr || !(flags & C_TIME_NO_ZERO_DATE))
+ *was_cut= MYSQL_TIME_WARN_TRUNCATED;
return -1;
err:
@@ -1289,7 +1747,7 @@ longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
enum enum_mysql_timestamp_type save= time_res->time_type;
bzero((char*) time_res, sizeof(*time_res));
time_res->time_type= save; /* Restore range */
- *was_cut= 1; /* Found invalid date */
+ *was_cut= MYSQL_TIME_WARN_TRUNCATED; /* Found invalid date */
}
return -1;
}
@@ -1310,22 +1768,20 @@ longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
0 time value is valid, but was possibly truncated
-1 time value is invalid
*/
-int number_to_time(my_bool neg, ulonglong nr, ulong sec_part,
- MYSQL_TIME *ltime, int *was_cut)
+int number_to_time_only(my_bool neg, ulonglong nr, ulong sec_part,
+ ulong max_hour, MYSQL_TIME *ltime, int *was_cut)
{
- if (nr > 9999999 && nr < 99991231235959ULL && neg == 0)
- return number_to_datetime(nr, sec_part, ltime,
- TIME_INVALID_DATES, was_cut) < 0 ? -1 : 0;
-
+ static const ulonglong TIME_MAX_mmss= TIME_MAX_MINUTE*100 + TIME_MAX_SECOND;
+ ulonglong time_max_value= max_hour * 10000ULL + TIME_MAX_mmss;
*was_cut= 0;
ltime->year= ltime->month= ltime->day= 0;
ltime->time_type= MYSQL_TIMESTAMP_TIME;
ltime->neg= neg;
- if (nr > TIME_MAX_VALUE)
+ if (nr > time_max_value)
{
- nr= TIME_MAX_VALUE;
+ nr= time_max_value;
sec_part= TIME_MAX_SECOND_PART;
*was_cut= MYSQL_TIME_WARN_OUT_OF_RANGE;
}
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 58964fc0f80..e42f1a164df 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -16,23 +16,30 @@
IF(WITH_WSREP AND NOT EMBEDDED_LIBRARY)
- SET(WSREP_INCLUDES ${CMAKE_SOURCE_DIR}/wsrep)
SET(WSREP_SOURCES
+ wsrep_client_service.cc
+ wsrep_high_priority_service.cc
+ wsrep_server_service.cc
+ wsrep_storage_service.cc
+ wsrep_server_state.cc
+ wsrep_utils.cc
+ wsrep_xid.cc
wsrep_check_opts.cc
- wsrep_hton.cc
- wsrep_mysqld.cc
+ wsrep_mysqld.cc
wsrep_notify.cc
wsrep_sst.cc
- wsrep_utils.cc
wsrep_var.cc
wsrep_binlog.cc
wsrep_applier.cc
wsrep_thd.cc
- wsrep_xid.cc
+ wsrep_schema.cc
+ wsrep_plugin.cc
+ service_wsrep.cc
)
- SET(WSREP_LIB wsrep)
+ MYSQL_ADD_PLUGIN(wsrep ${WSREP_SOURCES} MANDATORY NOT_EMBEDDED EXPORT_SYMBOLS LINK_LIBRARIES wsrep-lib wsrep_api_v26)
ELSE()
- SET(WSREP_SOURCES wsrep_dummy.cc)
+ ADD_LIBRARY(wsrep STATIC wsrep_dummy.cc)
+ ADD_DEPENDENCIES(wsrep GenError)
ENDIF()
INCLUDE_DIRECTORIES(
@@ -42,7 +49,6 @@ ${PCRE_INCLUDES}
${ZLIB_INCLUDE_DIR}
${SSL_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/sql
-${WSREP_INCLUDES}
)
@@ -96,7 +102,7 @@ SET (SQL_SOURCE
sql_partition.cc sql_plugin.cc sql_prepare.cc sql_rename.cc
debug_sync.cc
sql_repl.cc sql_select.cc sql_show.cc sql_state.c
- group_by_handler.cc
+ group_by_handler.cc derived_handler.cc select_handler.cc
sql_statistics.cc sql_string.cc lex_string.h
sql_table.cc sql_test.cc sql_trigger.cc sql_udf.cc sql_union.cc
sql_update.cc sql_view.cc strfunc.cc table.cc thr_malloc.cc
@@ -121,41 +127,47 @@ SET (SQL_SOURCE
opt_index_cond_pushdown.cc opt_subselect.cc
opt_table_elimination.cc sql_expression_cache.cc
gcalc_slicescan.cc gcalc_tools.cc
- threadpool_common.cc ../sql-common/mysql_async.c
+ ../sql-common/mysql_async.c
my_apc.cc mf_iocache_encr.cc item_jsonfunc.cc
my_json_writer.cc
rpl_gtid.cc rpl_parallel.cc
semisync.cc semisync_master.cc semisync_slave.cc
semisync_master_ack_receiver.cc
sql_schema.cc
- sql_type.cc sql_mode.cc
+ sql_type.cc sql_mode.cc sql_type_json.cc
item_windowfunc.cc sql_window.cc
sql_cte.cc
item_vers.cc
sql_sequence.cc sql_sequence.h ha_sequence.h
sql_tvc.cc sql_tvc.h
opt_split.cc
- ${WSREP_SOURCES}
+ rowid_filter.cc rowid_filter.h
+ opt_trace.cc
table_cache.cc encryption.cc temporary_tables.cc
- proxy_protocol.cc
- ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc
+ proxy_protocol.cc backup.cc xa.cc
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
+ ${GEN_SOURCES}
${MYSYS_LIBWRAP_SOURCE}
)
-IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
- CMAKE_SYSTEM_NAME MATCHES "Windows" OR
- CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
- HAVE_KQUEUE)
+IF ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR
+ CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
+ WIN32 OR
+ HAVE_KQUEUE)
+ AND (NOT DISABLE_THREADPOOL))
ADD_DEFINITIONS(-DHAVE_POOL_OF_THREADS)
IF(WIN32)
SET(SQL_SOURCE ${SQL_SOURCE} threadpool_win.cc)
ENDIF()
SET(SQL_SOURCE ${SQL_SOURCE} threadpool_generic.cc)
+ SET(SQL_SOURCE ${SQL_SOURCE} threadpool_common.cc)
+ENDIF()
+IF(WIN32)
+ SET(SQL_SOURCE ${SQL_SOURCE} handle_connections_win.cc)
ENDIF()
MYSQL_ADD_PLUGIN(partition ha_partition.cc STORAGE_ENGINE DEFAULT STATIC_ONLY
@@ -165,13 +177,19 @@ RECOMPILE_FOR_EMBEDDED)
ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
DTRACE_INSTRUMENT(sql)
-TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
+TARGET_LINK_LIBRARIES(sql
mysys mysys_ssl dbug strings vio pcre
${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}
- ${WSREP_LIB}
${SSL_LIBRARIES}
${LIBSYSTEMD})
+FOREACH(se aria partition perfschema sql_sequence wsrep)
+ # These engines are used directly in sql sources.
+ IF(TARGET ${se})
+ TARGET_LINK_LIBRARIES(sql ${se})
+ ENDIF()
+ENDFOREACH()
+
IF(WIN32)
SET(MYSQLD_SOURCE main.cc nt_servc.cc message.rc)
TARGET_LINK_LIBRARIES(sql psapi)
@@ -255,6 +273,9 @@ IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS)
SET_TARGET_PROPERTIES(mysqld_import_lib PROPERTIES IMPORTED_LOCATION ${MYSQLD_LIB})
ENDIF()
+ADD_LIBRARY(sql_builtins STATIC ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc)
+TARGET_LINK_LIBRARIES(sql_builtins ${MYSQLD_STATIC_PLUGIN_LIBS})
+
MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)
IF(APPLE)
@@ -282,7 +303,8 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
ENDIF()
ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS)
-TARGET_LINK_LIBRARIES(mysqld LINK_PRIVATE sql)
+TARGET_LINK_LIBRARIES(mysqld LINK_PRIVATE sql sql_builtins)
+
# Provide plugins with minimal set of libraries
SET(INTERFACE_LIBS ${LIBRT})
@@ -395,10 +417,6 @@ ADD_CUSTOM_TARGET(distclean
IF(INSTALL_LAYOUT STREQUAL "STANDALONE")
-# Copy db.opt into data/test/
-SET(DBOPT_FILE ${CMAKE_SOURCE_DIR}/support-files/db.opt )
-INSTALL(FILES ${DBOPT_FILE} DESTINATION data/test COMPONENT DataFiles)
-
# Install initial database on windows
IF(WIN32 AND TARGET mysqld AND NOT CMAKE_CROSSCOMPILING)
@@ -425,12 +443,6 @@ IF(WIN32 AND TARGET mysqld AND NOT CMAKE_CROSSCOMPILING)
ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/initdb.dep
)
- INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data DESTINATION .
- COMPONENT DataFiles
- PATTERN "initdb.dep" EXCLUDE
- PATTERN "bootstrap.sql" EXCLUDE
- PATTERN "aria*" EXCLUDE
- )
ELSE()
# Not windows or cross compiling, just install an empty directory
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql COMPONENT DataFiles)
diff --git a/sql/MSG00001.bin b/sql/MSG00001.bin
index 89f547694f5..5c1cd0badeb 100644
--- a/sql/MSG00001.bin
+++ b/sql/MSG00001.bin
Binary files differ
diff --git a/sql/backup.cc b/sql/backup.cc
new file mode 100644
index 00000000000..d3f2e453a85
--- /dev/null
+++ b/sql/backup.cc
@@ -0,0 +1,429 @@
+/* Copyright (c) 2018, 2020, 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-1301 USA */
+
+/*
+ Implementation of BACKUP STAGE, an interface for external backup tools.
+
+ TODO:
+ - At backup_start() we call ha_prepare_for_backup() for all active
+ storage engines. If someone tries to load a new storage engine
+ that requires prepare_for_backup() for it to work, that storage
+ engines has to be blocked from loading until backup finishes.
+ As we currently don't have any loadable storage engine that
+ requires this and we have not implemented that part.
+ This can easily be done by adding a
+ PLUGIN_CANT_BE_LOADED_WHILE_BACKUP_IS_RUNNING flag to
+ maria_declare_plugin and check this before calling
+ plugin_initialize()
+*/
+
+#include "mariadb.h"
+#include "sql_class.h"
+#include "sql_base.h" // flush_tables
+#include "sql_insert.h" // kill_delayed_threads
+#include "sql_handler.h" // mysql_ha_cleanup_no_free
+#include <my_sys.h>
+#ifdef WITH_WSREP
+#include "wsrep_server_state.h"
+#endif /* WITH_WSREP */
+
+static const char *stage_names[]=
+{"START", "FLUSH", "BLOCK_DDL", "BLOCK_COMMIT", "END", 0};
+
+TYPELIB backup_stage_names=
+{ array_elements(stage_names)-1, "", stage_names, 0 };
+
+static MDL_ticket *backup_flush_ticket;
+
+static bool backup_start(THD *thd);
+static bool backup_flush(THD *thd);
+static bool backup_block_ddl(THD *thd);
+static bool backup_block_commit(THD *thd);
+
+/**
+ Run next stage of backup
+*/
+
+void backup_init()
+{
+ backup_flush_ticket= 0;
+}
+
+bool run_backup_stage(THD *thd, backup_stages stage)
+{
+ backup_stages next_stage;
+ DBUG_ENTER("run_backup_stage");
+
+ if (thd->current_backup_stage == BACKUP_FINISHED)
+ {
+ if (stage != BACKUP_START)
+ {
+ my_error(ER_BACKUP_NOT_RUNNING, MYF(0));
+ DBUG_RETURN(1);
+ }
+ next_stage= BACKUP_START;
+ }
+ else
+ {
+ if ((uint) thd->current_backup_stage >= (uint) stage)
+ {
+ my_error(ER_BACKUP_WRONG_STAGE, MYF(0), stage_names[stage],
+ stage_names[thd->current_backup_stage]);
+ DBUG_RETURN(1);
+ }
+ if (stage == BACKUP_END)
+ {
+ /*
+ If end is given, jump directly to stage end. This is to allow one
+ to abort backup quickly.
+ */
+ next_stage= stage;
+ }
+ else
+ {
+ /* Go trough all not used stages until we reach 'stage' */
+ next_stage= (backup_stages) ((uint) thd->current_backup_stage + 1);
+ }
+ }
+
+ do
+ {
+ bool res= false;
+ backup_stages previous_stage= thd->current_backup_stage;
+ thd->current_backup_stage= next_stage;
+ switch (next_stage) {
+ case BACKUP_START:
+ if (!(res= backup_start(thd)))
+ break;
+ /* Reset backup stage to start for next backup try */
+ previous_stage= BACKUP_FINISHED;
+ break;
+ case BACKUP_FLUSH:
+ res= backup_flush(thd);
+ break;
+ case BACKUP_WAIT_FOR_FLUSH:
+ res= backup_block_ddl(thd);
+ break;
+ case BACKUP_LOCK_COMMIT:
+ res= backup_block_commit(thd);
+ break;
+ case BACKUP_END:
+ res= backup_end(thd);
+ break;
+ case BACKUP_FINISHED:
+ DBUG_ASSERT(0);
+ }
+ if (res)
+ {
+ thd->current_backup_stage= previous_stage;
+ my_error(ER_BACKUP_STAGE_FAILED, MYF(0), stage_names[(uint) stage]);
+ DBUG_RETURN(1);
+ }
+ next_stage= (backup_stages) ((uint) next_stage + 1);
+ } while ((uint) next_stage <= (uint) stage);
+
+ DBUG_RETURN(0);
+}
+
+
+/**
+ Start the backup
+
+ - Wait for previous backup to stop running
+ - Start service to log changed tables (TODO)
+ - Block purge of redo files (Required at least for Aria)
+ - An handler can optionally do a checkpoint of all tables,
+ to speed up the recovery stage of the backup.
+*/
+
+static bool backup_start(THD *thd)
+{
+ MDL_request mdl_request;
+ DBUG_ENTER("backup_start");
+
+ thd->current_backup_stage= BACKUP_FINISHED; // For next test
+ if (thd->has_read_only_protection())
+ DBUG_RETURN(1);
+ thd->current_backup_stage= BACKUP_START;
+
+ if (thd->locked_tables_mode)
+ {
+ my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
+ DBUG_RETURN(1);
+ }
+
+ mdl_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_START, MDL_EXPLICIT);
+ if (thd->mdl_context.acquire_lock(&mdl_request,
+ thd->variables.lock_wait_timeout))
+ DBUG_RETURN(1);
+
+ backup_flush_ticket= mdl_request.ticket;
+
+ ha_prepare_for_backup();
+ DBUG_RETURN(0);
+}
+
+/**
+ backup_flush()
+
+ - FLUSH all changes for not active non transactional tables, except
+ for statistics and log tables. Close the tables, to ensure they
+ are marked as closed after backup.
+
+ - BLOCK all NEW write locks for all non transactional tables
+ (except statistics and log tables). Already granted locks are
+ not affected (Running statements with non transaction tables will
+ continue running).
+
+ - The following DDL's doesn't have to be blocked as they can't set
+ the table in a non consistent state:
+ CREATE, RENAME, DROP
+*/
+
+static bool backup_flush(THD *thd)
+{
+ DBUG_ENTER("backup_flush");
+ /*
+ Lock all non transactional normal tables to be used in new DML's
+ */
+ if (thd->mdl_context.upgrade_shared_lock(backup_flush_ticket,
+ MDL_BACKUP_FLUSH,
+ thd->variables.lock_wait_timeout))
+ DBUG_RETURN(1);
+
+ /*
+ Free unused tables and table shares so that mariabackup knows what
+ is safe to copy
+ */
+ tc_purge(false);
+ tdc_purge(true);
+
+ DBUG_RETURN(0);
+}
+
+/**
+ backup_block_ddl()
+
+ - Kill all insert delay handlers, to ensure that all non transactional
+ tables are closed (can be improved in the future).
+
+ - Close handlers as other threads may wait for these, which can cause deadlocks.
+
+ - Wait for all statements using write locked non-transactional tables to end.
+
+ - Mark all not used active non transactional tables (except
+ statistics and log tables) to be closed with
+ handler->extra(HA_EXTRA_FLUSH)
+
+ - Block TRUNCATE TABLE, CREATE TABLE, DROP TABLE and RENAME
+ TABLE. Block also start of a new ALTER TABLE and the final rename
+ phase of ALTER TABLE. Running ALTER TABLES are not blocked. Both normal
+ and inline ALTER TABLE'S should be blocked when copying is completed but
+ before final renaming of the tables / new table is activated.
+ This will probably require a callback from the InnoDB code.
+*/
+
+static bool backup_block_ddl(THD *thd)
+{
+ DBUG_ENTER("backup_block_ddl");
+
+ kill_delayed_threads();
+ mysql_ha_cleanup_no_free(thd);
+
+ /* Wait until all non trans statements has ended */
+ if (thd->mdl_context.upgrade_shared_lock(backup_flush_ticket,
+ MDL_BACKUP_WAIT_FLUSH,
+ thd->variables.lock_wait_timeout))
+ DBUG_RETURN(1);
+
+ /*
+ Remove not used tables from the table share. Flush all changes to
+ non transaction tables and mark those that are not in use in write
+ operations as closed. From backup purposes it's not critical if
+ flush_tables() returns an error. It's ok to continue with next
+ backup stage even if we got an error.
+ */
+ (void) flush_tables(thd, FLUSH_NON_TRANS_TABLES);
+ thd->clear_error();
+
+#ifdef WITH_WSREP
+ /*
+ We desync the node for BACKUP STAGE because applier threads
+ bypass backup MDL locks (see MDL_lock::can_grant_lock)
+ */
+ if (WSREP_NNULL(thd))
+ {
+ Wsrep_server_state &server_state= Wsrep_server_state::instance();
+ if (server_state.desync_and_pause().is_undefined()) {
+ DBUG_RETURN(1);
+ }
+ thd->wsrep_desynced_backup_stage= true;
+ }
+#endif /* WITH_WSREP */
+
+ /*
+ block new DDL's, in addition to all previous blocks
+ We didn't do this lock above, as we wanted DDL's to be executed while
+ we wait for non transactional tables (which may take a while).
+ */
+ if (thd->mdl_context.upgrade_shared_lock(backup_flush_ticket,
+ MDL_BACKUP_WAIT_DDL,
+ thd->variables.lock_wait_timeout))
+ {
+ /*
+ Could be a timeout. Downgrade lock to what is was before this function
+ was called so that this function can be called again
+ */
+ backup_flush_ticket->downgrade_lock(MDL_BACKUP_FLUSH);
+ DBUG_RETURN(1);
+ }
+ DBUG_RETURN(0);
+}
+
+/**
+ backup_block_commit()
+
+ Block commits, writes to log and statistics tables and binary log
+*/
+
+static bool backup_block_commit(THD *thd)
+{
+ DBUG_ENTER("backup_block_commit");
+ if (thd->mdl_context.upgrade_shared_lock(backup_flush_ticket,
+ MDL_BACKUP_WAIT_COMMIT,
+ thd->variables.lock_wait_timeout))
+ DBUG_RETURN(1);
+
+ /* We can ignore errors from flush_tables () */
+ (void) flush_tables(thd, FLUSH_SYS_TABLES);
+
+ if (mysql_bin_log.is_open())
+ {
+ mysql_mutex_lock(mysql_bin_log.get_log_lock());
+ mysql_file_sync(mysql_bin_log.get_log_file()->file,
+ MYF(MY_WME|MY_SYNC_FILESIZE));
+ mysql_mutex_unlock(mysql_bin_log.get_log_lock());
+ }
+ thd->clear_error();
+
+ DBUG_RETURN(0);
+}
+
+/**
+ backup_end()
+
+ Safe to run, even if backup has not been run by this thread.
+ This is for example the case when a THD ends.
+*/
+
+bool backup_end(THD *thd)
+{
+ DBUG_ENTER("backup_end");
+
+ if (thd->current_backup_stage != BACKUP_FINISHED)
+ {
+ ha_end_backup();
+ thd->current_backup_stage= BACKUP_FINISHED;
+ thd->mdl_context.release_lock(backup_flush_ticket);
+#ifdef WITH_WSREP
+ if (WSREP_NNULL(thd) && thd->wsrep_desynced_backup_stage)
+ {
+ Wsrep_server_state &server_state= Wsrep_server_state::instance();
+ server_state.resume_and_resync();
+ thd->wsrep_desynced_backup_stage= false;
+ }
+#endif /* WITH_WSREP */
+ }
+ DBUG_RETURN(0);
+}
+
+
+/**
+ backup_set_alter_copy_lock()
+
+ @param thd
+ @param table From table that is part of ALTER TABLE. This is only used
+ for the assert to ensure we use this function correctly.
+
+ Downgrades the MDL_BACKUP_DDL lock to MDL_BACKUP_ALTER_COPY to allow
+ copy of altered table to proceed under MDL_BACKUP_WAIT_DDL
+
+ Note that in some case when using non transactional tables,
+ the lock may be of type MDL_BACKUP_DML.
+*/
+
+void backup_set_alter_copy_lock(THD *thd, TABLE *table)
+{
+ MDL_ticket *ticket= thd->mdl_backup_ticket;
+
+ /* Ticket maybe NULL in case of LOCK TABLES or for temporary tables*/
+ DBUG_ASSERT(ticket || thd->locked_tables_mode ||
+ table->s->tmp_table != NO_TMP_TABLE);
+ if (ticket)
+ ticket->downgrade_lock(MDL_BACKUP_ALTER_COPY);
+}
+
+/**
+ backup_reset_alter_copy_lock
+
+ Upgrade the lock of the original ALTER table MDL_BACKUP_DDL
+ Can fail if MDL lock was killed
+*/
+
+bool backup_reset_alter_copy_lock(THD *thd)
+{
+ bool res= 0;
+ MDL_ticket *ticket= thd->mdl_backup_ticket;
+
+ /* Ticket maybe NULL in case of LOCK TABLES or for temporary tables*/
+ if (ticket)
+ res= thd->mdl_context.upgrade_shared_lock(ticket, MDL_BACKUP_DDL,
+ thd->variables.lock_wait_timeout);
+ return res;
+}
+
+
+/*****************************************************************************
+ Backup locks
+ These functions are used by maria_backup to ensure that there are no active
+ ddl's on the object the backup is going to copy
+*****************************************************************************/
+
+
+bool backup_lock(THD *thd, TABLE_LIST *table)
+{
+ /* We should leave the previous table unlocked in case of errors */
+ backup_unlock(thd);
+ if (thd->locked_tables_mode)
+ {
+ my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
+ return 1;
+ }
+ table->mdl_request.duration= MDL_EXPLICIT;
+ if (thd->mdl_context.acquire_lock(&table->mdl_request,
+ thd->variables.lock_wait_timeout))
+ return 1;
+ thd->mdl_backup_lock= table->mdl_request.ticket;
+ return 0;
+}
+
+
+/* Release old backup lock if it exists */
+
+void backup_unlock(THD *thd)
+{
+ if (thd->mdl_backup_lock)
+ thd->mdl_context.release_lock(thd->mdl_backup_lock);
+ thd->mdl_backup_lock= 0;
+}
diff --git a/sql/backup.h b/sql/backup.h
new file mode 100644
index 00000000000..8d8a28b6082
--- /dev/null
+++ b/sql/backup.h
@@ -0,0 +1,34 @@
+#ifndef BACKUP_INCLUDED
+#define BACKUP_INCLUDED
+/* Copyright (c) 2018, 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-1301 USA */
+
+enum backup_stages
+{
+ BACKUP_START, BACKUP_FLUSH, BACKUP_WAIT_FOR_FLUSH, BACKUP_LOCK_COMMIT,
+ BACKUP_END, BACKUP_FINISHED
+};
+
+extern TYPELIB backup_stage_names;
+
+void backup_init();
+bool run_backup_stage(THD *thd, backup_stages stage);
+bool backup_end(THD *thd);
+void backup_set_alter_copy_lock(THD *thd, TABLE *altered_table);
+bool backup_reset_alter_copy_lock(THD *thd);
+
+bool backup_lock(THD *thd, TABLE_LIST *table);
+void backup_unlock(THD *thd);
+#endif /* BACKUP_INCLUDED */
diff --git a/sql/compat56.cc b/sql/compat56.cc
index 58cf5287cee..3d8574419d3 100644
--- a/sql/compat56.cc
+++ b/sql/compat56.cc
@@ -20,6 +20,19 @@
#include "myisampack.h"
#include "my_time.h"
+
+static const int my_max_usec_value[7]
+{
+ 0,
+ 900000,
+ 990000,
+ 999000,
+ 999900,
+ 999990,
+ 999999
+};
+
+
/*** MySQL56 TIME low-level memory and disk representation routines ***/
/*
@@ -397,19 +410,21 @@ void my_timestamp_from_binary(struct timeval *tm, const uchar *ptr, uint dec)
case 0:
default:
tm->tv_usec= 0;
- break;
+ return;
case 1:
case 2:
tm->tv_usec= ((int) ptr[4]) * 10000;
break;
case 3:
case 4:
- tm->tv_usec= mi_sint2korr(ptr + 4) * 100;
+ tm->tv_usec= (uint) mi_uint2korr(ptr + 4) * 100;
break;
case 5:
case 6:
- tm->tv_usec= mi_sint3korr(ptr + 4);
+ tm->tv_usec= (uint) mi_uint3korr(ptr + 4);
}
+ // The binary data my be corrupt. Cut fractional seconds to the valid range.
+ set_if_smaller(tm->tv_usec, my_max_usec_value[dec]);
}
diff --git a/sql/compat56.h b/sql/compat56.h
index 7f72c26c03a..65cd36dacfd 100644
--- a/sql/compat56.h
+++ b/sql/compat56.h
@@ -19,10 +19,19 @@
/** MySQL56 routines and macros **/
+
+/*
+ Buffer size for a native TIMESTAMP representation, for use with NativBuffer.
+ 4 bytes for seconds
+ 3 bytes for microseconds
+ 1 byte for the trailing '\0' (class Native reserves extra 1 byte for '\0')
+*/
+#define STRING_BUFFER_TIMESTAMP_BINARY_SIZE 8 /* 4 + 3 + 1 */
+
#define MY_PACKED_TIME_GET_INT_PART(x) ((x) >> 24)
#define MY_PACKED_TIME_GET_FRAC_PART(x) ((x) % (1LL << 24))
-#define MY_PACKED_TIME_MAKE(i, f) ((((longlong) (i)) << 24) + (f))
-#define MY_PACKED_TIME_MAKE_INT(i) ((((longlong) (i)) << 24))
+#define MY_PACKED_TIME_MAKE(i, f) ((((ulonglong) (i)) << 24) + (f))
+#define MY_PACKED_TIME_MAKE_INT(i) ((((ulonglong) (i)) << 24))
longlong TIME_to_longlong_datetime_packed(const MYSQL_TIME *);
longlong TIME_to_longlong_time_packed(const MYSQL_TIME *);
diff --git a/sql/datadict.cc b/sql/datadict.cc
index 882f0b7232e..da8376d8b1a 100644
--- a/sql/datadict.cc
+++ b/sql/datadict.cc
@@ -181,39 +181,24 @@ err:
@param thd Thread context.
@param db Name of the database to which the table belongs to.
@param name Table name.
- @param path For temporary tables only - path to table files.
- Otherwise NULL (the path is calculated from db and table names).
@retval FALSE Success.
@retval TRUE Error.
*/
-bool dd_recreate_table(THD *thd, const char *db, const char *table_name,
- const char *path)
+bool dd_recreate_table(THD *thd, const char *db, const char *table_name)
{
- bool error= TRUE;
HA_CREATE_INFO create_info;
char path_buf[FN_REFLEN + 1];
DBUG_ENTER("dd_recreate_table");
+ /* There should be a exclusive metadata lock on the table. */
+ DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name,
+ MDL_EXCLUSIVE));
create_info.init();
-
- if (path)
- create_info.options|= HA_LEX_CREATE_TMP_TABLE;
- else
- {
- build_table_filename(path_buf, sizeof(path_buf) - 1,
- db, table_name, "", 0);
- path= path_buf;
-
- /* There should be a exclusive metadata lock on the table. */
- DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name,
- MDL_EXCLUSIVE));
- }
-
+ build_table_filename(path_buf, sizeof(path_buf) - 1,
+ db, table_name, "", 0);
/* Attempt to reconstruct the table. */
- error= ha_create_table(thd, path, db, table_name, &create_info, NULL);
-
- DBUG_RETURN(error);
+ DBUG_RETURN(ha_create_table(thd, path_buf, db, table_name, &create_info, 0));
}
diff --git a/sql/datadict.h b/sql/datadict.h
index 648b176d2ac..cbdf788deb6 100644
--- a/sql/datadict.h
+++ b/sql/datadict.h
@@ -47,7 +47,6 @@ static inline bool dd_frm_is_view(THD *thd, char *path)
return dd_frm_type(thd, path, NULL, &not_used2) == TABLE_TYPE_VIEW;
}
-bool dd_recreate_table(THD *thd, const char *db, const char *table_name,
- const char *path = NULL);
+bool dd_recreate_table(THD *thd, const char *db, const char *table_name);
#endif // DATADICT_INCLUDED
diff --git a/sql/derived_handler.cc b/sql/derived_handler.cc
new file mode 100644
index 00000000000..f48b95cbf76
--- /dev/null
+++ b/sql/derived_handler.cc
@@ -0,0 +1,125 @@
+/*
+ Copyright (c) 2018, 2019 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+#include "mariadb.h"
+#include "sql_priv.h"
+#include "sql_select.h"
+#include "derived_handler.h"
+
+
+/**
+ The methods of the Pushdown_derived class.
+
+ The objects of this class are used for pushdown of the derived tables
+ into engines. The main method of the class is Pushdown_derived::execute()
+ that initiates execution of the query specifying a derived by a foreign
+ engine, receives the rows of the result set and put them in a temporary
+ table on the server side.
+
+ The method uses only the functions of the derived_handle interface to do
+ this. The constructor of the class gets this interface as a parameter.
+
+ Currently a derived tables pushed into an engine is always materialized.
+ It could be changed if the cases when the tables is used as driving table.
+*/
+
+
+Pushdown_derived::Pushdown_derived(TABLE_LIST *tbl, derived_handler *h)
+ : derived(tbl), handler(h)
+{
+ is_analyze= handler->thd->lex->analyze_stmt;
+}
+
+
+Pushdown_derived::~Pushdown_derived()
+{
+ delete handler;
+}
+
+
+int Pushdown_derived::execute()
+{
+ int err;
+ THD *thd= handler->thd;
+ TABLE *table= handler->table;
+ TMP_TABLE_PARAM *tmp_table_param= handler->tmp_table_param;
+
+ DBUG_ENTER("Pushdown_query::execute");
+
+ if ((err= handler->init_scan()))
+ goto error;
+
+ if (is_analyze)
+ {
+ handler->end_scan();
+ DBUG_RETURN(0);
+ }
+
+ while (!(err= handler->next_row()))
+ {
+ if (unlikely(thd->check_killed()))
+ {
+ handler->end_scan();
+ DBUG_RETURN(-1);
+ }
+
+ if ((err= table->file->ha_write_tmp_row(table->record[0])))
+ {
+ bool is_duplicate;
+ if (likely(!table->file->is_fatal_error(err, HA_CHECK_DUP)))
+ continue; // Distinct elimination
+
+ if (create_internal_tmp_table_from_heap(thd, table,
+ tmp_table_param->start_recinfo,
+ &tmp_table_param->recinfo,
+ err, 1, &is_duplicate))
+ DBUG_RETURN(1);
+ if (is_duplicate)
+ continue;
+ }
+ }
+
+ if (err != 0 && err != HA_ERR_END_OF_FILE)
+ goto error;
+
+ if ((err= handler->end_scan()))
+ goto error_2;
+
+ DBUG_RETURN(0);
+
+error:
+ handler->end_scan();
+error_2:
+ handler->print_error(err, MYF(0));
+ DBUG_RETURN(-1); // Error not sent to client
+}
+
+
+void derived_handler::print_error(int error, myf errflag)
+{
+ my_error(ER_GET_ERRNO, MYF(0), error, hton_name(ht)->str);
+}
+
+
+void derived_handler::set_derived(TABLE_LIST *tbl)
+{
+ derived= tbl;
+ table= tbl->table;
+ unit= tbl->derived;
+ select= unit->first_select();
+ tmp_table_param= ((select_unit *)(unit->result))->get_tmp_table_param();
+}
+
diff --git a/sql/derived_handler.h b/sql/derived_handler.h
new file mode 100644
index 00000000000..171165bbe6f
--- /dev/null
+++ b/sql/derived_handler.h
@@ -0,0 +1,85 @@
+/*
+ Copyright (c) 2016, 2017 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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-1301 USA */
+
+#ifndef DERIVED_HANDLER_INCLUDED
+#define DERIVED_HANDLER_INCLUDED
+
+#include "mariadb.h"
+#include "sql_priv.h"
+
+class TMP_TABLE_PARAM;
+
+typedef class st_select_lex_unit SELECT_LEX_UNIT;
+
+/**
+ @class derived_handler
+
+ This interface class is to be used for execution of queries that specify
+ derived table by foreign engines
+*/
+
+class derived_handler
+{
+public:
+ THD *thd;
+ handlerton *ht;
+
+ TABLE_LIST *derived;
+
+ /*
+ Temporary table where all results should be stored in record[0]
+ The table has a field for every item from the select list of
+ the specification of derived.
+ */
+ TABLE *table;
+
+ /* The parameters if the temporary table used at its creation */
+ TMP_TABLE_PARAM *tmp_table_param;
+
+ SELECT_LEX_UNIT *unit; // Specifies the derived table
+
+ SELECT_LEX *select; // The first select of the specification
+
+ derived_handler(THD *thd_arg, handlerton *ht_arg)
+ : thd(thd_arg), ht(ht_arg), derived(0),table(0), tmp_table_param(0),
+ unit(0), select(0) {}
+ virtual ~derived_handler() {}
+
+ /*
+ Functions to scan data. All these returns 0 if ok, error code in case
+ of error
+ */
+
+ /* Initialize the process of producing rows of the derived table */
+ virtual int init_scan()= 0;
+
+ /*
+ Put the next produced row of the derived in table->record[0] and return 0.
+ Return HA_ERR_END_OF_FILE if there are no more rows, return other error
+ number in case of fatal error.
+ */
+ virtual int next_row()= 0;
+
+ /* End prodicing rows */
+ virtual int end_scan()=0;
+
+ /* Report errors */
+ virtual void print_error(int error, myf errflag);
+
+ void set_derived(TABLE_LIST *tbl);
+};
+
+#endif /* DERIVED_HANDLER_INCLUDED */
diff --git a/sql/encryption.cc b/sql/encryption.cc
index 493d72ae346..13239b91910 100644
--- a/sql/encryption.cc
+++ b/sql/encryption.cc
@@ -18,6 +18,7 @@
#include "log.h"
#include "sql_plugin.h"
#include <my_crypt.h>
+#include <violite.h>
/* there can be only one encryption plugin enabled */
static plugin_ref encryption_manager= 0;
@@ -63,6 +64,8 @@ int initialize_encryption_plugin(st_plugin_int *plugin)
if (encryption_manager)
return 1;
+ vio_check_ssl_init();
+
if (plugin->plugin->init && plugin->plugin->init(plugin))
{
sql_print_error("Plugin '%s' init function returned error.",
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index b5788eecc8d..f47e390c883 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -32,7 +32,10 @@
#include "event_db_repository.h"
#include "sp_head.h"
#include "sql_show.h" // append_definer, append_identifier
-
+#include "wsrep_mysqld.h"
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h"
+#endif /* WITH_WSREP */
/**
@addtogroup Event_Scheduler
@{
@@ -480,14 +483,24 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table)
uint not_used;
if (!starts_null)
{
- table->field[ET_FIELD_STARTS]->get_date(&time, TIME_NO_ZERO_DATE);
+ /*
+ The expected data type for these columns in mysql.events:
+ starts, ends, execute_at, last_executed
+ is DATETIME. No nanosecond truncation should normally be needed,
+ unless the DBA changes them, e.g. to VARCHAR, DECIMAL, etc.
+ For this unexpected case let's use the default round mode,
+ according to the current session settings.
+ */
+ table->field[ET_FIELD_STARTS]->get_date(&time, TIME_NO_ZERO_DATE |
+ thd->temporal_round_mode());
starts= my_tz_OFFSET0->TIME_to_gmt_sec(&time,&not_used);
}
ends_null= table->field[ET_FIELD_ENDS]->is_null();
if (!ends_null)
{
- table->field[ET_FIELD_ENDS]->get_date(&time, TIME_NO_ZERO_DATE);
+ table->field[ET_FIELD_ENDS]->get_date(&time, TIME_NO_ZERO_DATE |
+ thd->temporal_round_mode());
ends= my_tz_OFFSET0->TIME_to_gmt_sec(&time,&not_used);
}
@@ -503,8 +516,8 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table)
DBUG_ASSERT(!(starts_null && ends_null && !expression && execute_at_null));
if (!expression && !execute_at_null)
{
- if (table->field[ET_FIELD_EXECUTE_AT]->get_date(&time,
- TIME_NO_ZERO_DATE))
+ if (table->field[ET_FIELD_EXECUTE_AT]->get_date(&time, TIME_NO_ZERO_DATE |
+ thd->temporal_round_mode()))
DBUG_RETURN(TRUE);
execute_at= my_tz_OFFSET0->TIME_to_gmt_sec(&time,&not_used);
}
@@ -536,8 +549,8 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table)
if (!table->field[ET_FIELD_LAST_EXECUTED]->is_null())
{
- table->field[ET_FIELD_LAST_EXECUTED]->get_date(&time,
- TIME_NO_ZERO_DATE);
+ table->field[ET_FIELD_LAST_EXECUTED]->get_date(&time, TIME_NO_ZERO_DATE |
+ thd->temporal_round_mode());
last_executed= my_tz_OFFSET0->TIME_to_gmt_sec(&time,&not_used);
}
@@ -655,7 +668,7 @@ my_time_t
add_interval(MYSQL_TIME *ltime, const Time_zone *time_zone,
interval_type scale, INTERVAL interval)
{
- if (date_add_interval(ltime, scale, interval))
+ if (date_add_interval(current_thd, ltime, scale, interval))
return 0;
uint not_used;
@@ -759,8 +772,8 @@ bool get_next_time(const Time_zone *time_zone, my_time_t *next,
if (seconds)
{
- longlong seconds_diff;
- long microsec_diff;
+ ulonglong seconds_diff;
+ ulong microsec_diff;
bool negative= calc_time_diff(&local_now, &local_start, 1,
&seconds_diff, &microsec_diff);
if (!negative)
@@ -1344,6 +1357,10 @@ Event_job_data::execute(THD *thd, bool drop)
thd->reset_for_next_command();
+#ifdef WITH_WSREP
+ wsrep_open(thd);
+ wsrep_before_command(thd);
+#endif /* WITH_WSREP */
/*
MySQL parser currently assumes that current database is either
present in THD or all names in all statements are fully specified.
@@ -1518,6 +1535,10 @@ end:
if (save_sctx)
event_sctx.restore_security_context(thd, save_sctx);
#endif
+#ifdef WITH_WSREP
+ wsrep_after_command_ignore_result(thd);
+ wsrep_close(thd);
+#endif /* WITH_WSREP */
thd->lex->unit.cleanup();
thd->end_statement();
thd->cleanup_after_query();
diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h
index 33e9b457411..eb4f8590512 100644
--- a/sql/event_data_objects.h
+++ b/sql/event_data_objects.h
@@ -33,11 +33,7 @@ struct TABLE;
class Event_queue_element_for_exec
{
public:
- Event_queue_element_for_exec()
- {
- dbname.str= NULL; dbname.length= 0;
- name.str= NULL; name.length= 0;
- };
+ Event_queue_element_for_exec() : dbname{nullptr, 0}, name{nullptr, 0} {}
~Event_queue_element_for_exec();
bool
diff --git a/sql/event_parse_data.cc b/sql/event_parse_data.cc
index 1ec2ab877fe..d2a168e538e 100644
--- a/sql/event_parse_data.cc
+++ b/sql/event_parse_data.cc
@@ -216,7 +216,13 @@ Event_parse_data::init_execute_at(THD *thd)
(starts_null && ends_null)));
DBUG_ASSERT(starts_null && ends_null);
- if (item_execute_at->get_date(&ltime, TIME_NO_ZERO_DATE))
+ /*
+ The expected data type is DATETIME. No nanoseconds truncation should
+ normally be needed. Using the default rounding mode.
+ See more comments in event_data_object.cc.
+ */
+ if (item_execute_at->get_date(thd, &ltime, TIME_NO_ZERO_DATE |
+ thd->temporal_round_mode()))
goto wrong_value;
ltime_utc= TIME_to_timestamp(thd,&ltime,&not_used);
@@ -275,7 +281,7 @@ Event_parse_data::init_interval(THD *thd)
if (item_expression->fix_fields(thd, &item_expression))
goto wrong_value;
- if (get_interval_value(item_expression, interval, &interval_tmp))
+ if (get_interval_value(thd, item_expression, interval, &interval_tmp))
goto wrong_value;
expression= 0;
@@ -378,7 +384,8 @@ Event_parse_data::init_starts(THD *thd)
if (item_starts->fix_fields(thd, &item_starts))
goto wrong_value;
- if (item_starts->get_date(&ltime, TIME_NO_ZERO_DATE))
+ if (item_starts->get_date(thd, &ltime, TIME_NO_ZERO_DATE |
+ thd->temporal_round_mode()))
goto wrong_value;
ltime_utc= TIME_to_timestamp(thd, &ltime, &not_used);
@@ -433,7 +440,8 @@ Event_parse_data::init_ends(THD *thd)
goto error_bad_params;
DBUG_PRINT("info", ("convert to TIME"));
- if (item_ends->get_date(&ltime, TIME_NO_ZERO_DATE))
+ if (item_ends->get_date(thd, &ltime, TIME_NO_ZERO_DATE |
+ thd->temporal_round_mode()))
goto error_bad_params;
ltime_utc= TIME_to_timestamp(thd, &ltime, &not_used);
@@ -472,7 +480,7 @@ Event_parse_data::report_bad_value(const char *item_name, Item *bad_item)
{
char buff[120];
String str(buff,(uint32) sizeof(buff), system_charset_info);
- String *str2= bad_item->fixed? bad_item->val_str(&str):NULL;
+ String *str2= bad_item->is_fixed() ? bad_item->val_str(&str) : NULL;
my_error(ER_WRONG_VALUE, MYF(0), item_name, str2? str2->c_ptr_safe():"NULL");
}
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc
index f35485f9acf..d343af206e2 100644
--- a/sql/event_scheduler.cc
+++ b/sql/event_scheduler.cc
@@ -151,7 +151,7 @@ deinit_event_thread(THD *thd)
{
thd->proc_info= "Clearing";
DBUG_PRINT("exit", ("Event thread finishing"));
- unlink_not_visible_thd(thd);
+ server_threads.erase(thd);
delete thd;
}
@@ -186,7 +186,7 @@ pre_init_event_thread(THD* thd)
thd->net.read_timeout= slave_net_timeout;
thd->variables.option_bits|= OPTION_AUTO_IS_NULL;
thd->client_capabilities|= CLIENT_MULTI_RESULTS;
- add_to_active_threads(thd);
+ server_threads.insert(thd);
/*
Guarantees that we will see the thread in SHOW PROCESSLIST though its
@@ -681,20 +681,20 @@ end:
Event_scheduler::workers_count()
*/
+static my_bool workers_count_callback(THD *thd, uint32_t *count)
+{
+ if (thd->system_thread == SYSTEM_THREAD_EVENT_WORKER)
+ ++*count;
+ return 0;
+}
+
+
uint
Event_scheduler::workers_count()
{
- THD *tmp;
- uint count= 0;
-
+ uint32_t count= 0;
DBUG_ENTER("Event_scheduler::workers_count");
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
- if (tmp->system_thread == SYSTEM_THREAD_EVENT_WORKER)
- ++count;
- mysql_mutex_unlock(&LOCK_thread_count);
- DBUG_PRINT("exit", ("%d", count));
+ server_threads.iterate(workers_count_callback, &count);
DBUG_RETURN(count);
}
diff --git a/sql/events.cc b/sql/events.cc
index 7c7c5c0c2ac..9022594e6d2 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -34,6 +34,7 @@
#include "sp_head.h" // for Stored_program_creation_ctx
#include "set_var.h"
#include "lock.h" // lock_object_name
+#include "wsrep_mysqld.h"
/**
@addtogroup Event_Scheduler
@@ -336,7 +337,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data)
if (check_access(thd, EVENT_ACL, parse_data->dbname.str, NULL, NULL, 0, 0))
DBUG_RETURN(TRUE);
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
if (lock_object_name(thd, MDL_key::EVENT,
parse_data->dbname.str, parse_data->name.str))
@@ -401,7 +402,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data)
my_message_sql(ER_STARTUP,
"Event Error: An error occurred while creating query "
"string, before writing it into binary log.",
- MYF(ME_NOREFRESH));
+ MYF(ME_ERROR_LOG));
ret= true;
}
else
@@ -425,10 +426,10 @@ Events::create_event(THD *thd, Event_parse_data *parse_data)
}
DBUG_RETURN(ret);
-
-WSREP_ERROR_LABEL:
- DBUG_RETURN(TRUE);
-
+#ifdef WITH_WSREP
+wsrep_error_label:
+ DBUG_RETURN(true);
+#endif
}
@@ -556,9 +557,10 @@ Events::update_event(THD *thd, Event_parse_data *parse_data,
thd->restore_stmt_binlog_format(save_binlog_format);
DBUG_RETURN(ret);
-
-WSREP_ERROR_LABEL:
- DBUG_RETURN(TRUE);
+#ifdef WITH_WSREP
+wsrep_error_label:
+ DBUG_RETURN(true);
+#endif
}
@@ -623,9 +625,10 @@ Events::drop_event(THD *thd, const LEX_CSTRING *dbname,
thd->restore_stmt_binlog_format(save_binlog_format);
DBUG_RETURN(ret);
-
-WSREP_ERROR_LABEL:
- DBUG_RETURN(TRUE);
+#ifdef WITH_WSREP
+wsrep_error_label:
+ DBUG_RETURN(true);
+#endif
}
@@ -656,8 +659,17 @@ Events::drop_schema_events(THD *thd, const char *db)
*/
if (event_queue)
event_queue->drop_schema_events(thd, &db_lex);
- db_repository->drop_schema_events(thd, &db_lex);
-
+ if (db_repository)
+ db_repository->drop_schema_events(thd, &db_lex);
+ else
+ {
+ if ((db_repository= new Event_db_repository))
+ {
+ db_repository->drop_schema_events(thd, &db_lex);
+ delete db_repository;
+ db_repository= 0;
+ }
+ }
DBUG_VOID_RETURN;
}
@@ -830,12 +842,13 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
*/
if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS)
{
- DBUG_ASSERT(thd->lex->select_lex.db.str);
- if (!is_infoschema_db(&thd->lex->select_lex.db) && // There is no events in I_S
- check_access(thd, EVENT_ACL, thd->lex->select_lex.db.str,
+ DBUG_ASSERT(thd->lex->first_select_lex()->db.str);
+ if (!is_infoschema_db(&thd->lex->first_select_lex()->db) && // There is no events in I_S
+ check_access(thd, EVENT_ACL, thd->lex->first_select_lex()->db.str,
NULL, NULL, 0, 0))
DBUG_RETURN(1);
- db= normalize_db_name(thd->lex->select_lex.db.str, db_tmp, sizeof(db_tmp));
+ db= normalize_db_name(thd->lex->first_select_lex()->db.str,
+ db_tmp, sizeof(db_tmp));
}
ret= db_repository->fill_schema_events(thd, tables, db);
@@ -930,7 +943,7 @@ Events::init(THD *thd, bool opt_noacl_or_bootstrap)
my_message(ER_STARTUP,
"Event Scheduler: An error occurred when initializing "
"system tables. Disabling the Event Scheduler.",
- MYF(ME_NOREFRESH));
+ MYF(ME_ERROR_LOG));
/* Disable the scheduler since the system tables are not up to date */
opt_event_scheduler= EVENTS_OFF;
goto end;
@@ -952,7 +965,7 @@ Events::init(THD *thd, bool opt_noacl_or_bootstrap)
{
my_message_sql(ER_STARTUP,
"Event Scheduler: Error while loading from mysql.event table.",
- MYF(ME_NOREFRESH));
+ MYF(ME_ERROR_LOG));
res= TRUE; /* fatal error: request unireg_abort */
goto end;
}
@@ -1169,7 +1182,7 @@ Events::load_events_from_db(THD *thd)
{
my_message_sql(ER_STARTUP,
"Event Scheduler: Failed to open table mysql.event",
- MYF(ME_NOREFRESH));
+ MYF(ME_ERROR_LOG));
DBUG_RETURN(TRUE);
}
@@ -1195,7 +1208,7 @@ Events::load_events_from_db(THD *thd)
"Event Scheduler: "
"Error while loading events from mysql.event. "
"The table probably contains bad data or is corrupted",
- MYF(ME_NOREFRESH));
+ MYF(ME_ERROR_LOG));
delete et;
goto end;
}
@@ -1274,9 +1287,9 @@ Events::load_events_from_db(THD *thd)
}
my_printf_error(ER_STARTUP,
"Event Scheduler: Loaded %d event%s",
- MYF(ME_NOREFRESH |
+ MYF(ME_ERROR_LOG |
(global_system_variables.log_warnings) ?
- ME_JUST_INFO: 0),
+ ME_NOTE: 0),
count, (count == 1) ? "" : "s");
ret= FALSE;
diff --git a/sql/field.cc b/sql/field.cc
index f430e6209d5..148eaa71c00 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -33,11 +33,6 @@
#include "rpl_rli.h" // Pull in Relay_log_info
#include "slave.h" // Pull in rpl_master_has_bug()
#include "strfunc.h" // find_type2, find_set
-#include "sql_time.h" // str_to_datetime_with_warn,
- // str_to_time_with_warn,
- // TIME_to_timestamp,
- // make_time, make_date,
- // make_truncated_value_warning
#include "tztime.h" // struct Time_zone
#include "filesort.h" // change_double_for_sort
#include "log_event.h" // class Table_map_log_event
@@ -63,20 +58,30 @@ const char field_separator=',';
((ulong) ((1LL << MY_MIN(arg, 4) * 8) - 1))
// Column marked for read or the field set to read out of record[0]
-#define ASSERT_COLUMN_MARKED_FOR_READ \
- DBUG_ASSERT(!table || \
- (!table->read_set || \
- bitmap_is_set(table->read_set, field_index) || \
- (!(ptr >= table->record[0] && \
- ptr < table->record[0] + table->s->reclength))))
-
-#define ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED \
- DBUG_ASSERT(!table || \
- (!table->write_set || \
- bitmap_is_set(table->write_set, field_index) || \
- (!(ptr >= table->record[0] && \
- ptr < table->record[0] + table->s->reclength))) || \
- (table->vcol_set && bitmap_is_set(table->vcol_set, field_index)))
+inline bool Field::marked_for_read() const
+{
+ return !table ||
+ (!table->read_set ||
+ bitmap_is_set(table->read_set, field_index) ||
+ (!(ptr >= table->record[0] &&
+ ptr < table->record[0] + table->s->reclength)));
+}
+
+/*
+ The name of this function is a bit misleading as in 10.4 we don't
+ have to test anymore if the field is computed. Instead we mark
+ changed fields with DBUG_FIX_WRITE_SET() in table.cc
+*/
+
+inline bool Field::marked_for_write_or_computed() const
+{
+ return (!table ||
+ (!table->write_set ||
+ bitmap_is_set(table->write_set, field_index) ||
+ (!(ptr >= table->record[0] &&
+ ptr < table->record[0] + table->s->reclength))));
+}
+
#define FLAGSTR(S,F) ((S) & (F) ? #F " " : "")
@@ -93,15 +98,14 @@ const int FIELDTYPE_LAST= 254;
const int FIELDTYPE_NUM= FIELDTYPE_TEAR_FROM + (FIELDTYPE_LAST -
FIELDTYPE_TEAR_TO);
-static inline int field_type2index (enum_field_types field_type)
+static inline int merge_type2index(enum_field_types merge_type)
{
- DBUG_ASSERT(real_type_to_type(field_type) < FIELDTYPE_TEAR_FROM ||
- real_type_to_type(field_type) > FIELDTYPE_TEAR_TO);
- DBUG_ASSERT(field_type <= FIELDTYPE_LAST);
- field_type= real_type_to_type(field_type);
- if (field_type < FIELDTYPE_TEAR_FROM)
- return field_type;
- return FIELDTYPE_TEAR_FROM + (field_type - FIELDTYPE_TEAR_TO) - 1;
+ DBUG_ASSERT(merge_type < FIELDTYPE_TEAR_FROM ||
+ merge_type > FIELDTYPE_TEAR_TO);
+ DBUG_ASSERT(merge_type <= FIELDTYPE_LAST);
+ if (merge_type < FIELDTYPE_TEAR_FROM)
+ return merge_type;
+ return FIELDTYPE_TEAR_FROM + (merge_type - FIELDTYPE_TEAR_TO) - 1;
}
@@ -926,31 +930,37 @@ static enum_field_types field_types_merge_rules [FIELDTYPE_NUM][FIELDTYPE_NUM]=
}
};
-/**
- Return type of which can carry value of both given types in UNION result.
-
- @param a type for merging
- @param b type for merging
-
- @return
- type of field
-*/
-
-enum_field_types Field::field_type_merge(enum_field_types a,
- enum_field_types b)
-{
- return field_types_merge_rules[field_type2index(a)]
- [field_type2index(b)];
-}
const Type_handler *
Type_handler::aggregate_for_result_traditional(const Type_handler *a,
const Type_handler *b)
{
- enum_field_types ta= a->real_field_type();
- enum_field_types tb= b->real_field_type();
- return
- Type_handler::get_handler_by_real_type(Field::field_type_merge(ta, tb));
+ if (a == b)
+ {
+ /*
+ If two traditional handlers are equal, quickly return "a".
+ Some handlers (e.g. Type_handler_bool) pretend to be traditional,
+ but in fact they are not traditional in full extent, they are
+ only sub-types for now (and don't have a corresponding Field_xxx yet).
+ Here we preserve such handlers during aggregation.
+ As a result, COALESCE(true,true) preserves the "boolean" data type.
+
+ Need to do this conversion for deprecated data types,
+ similar to what field_type_merge_rules[][] does.
+ */
+ switch (a->field_type()) {
+ case MYSQL_TYPE_DECIMAL: return &type_handler_newdecimal;
+ case MYSQL_TYPE_DATE: return &type_handler_newdate;
+ case MYSQL_TYPE_VAR_STRING: return &type_handler_varchar;
+ default: break;
+ }
+ return a;
+ }
+ enum_field_types ta= a->traditional_merge_field_type();
+ enum_field_types tb= b->traditional_merge_field_type();
+ enum_field_types res= field_types_merge_rules[merge_type2index(ta)]
+ [merge_type2index(tb)];
+ return Type_handler::get_handler_by_real_type(res);
}
@@ -1381,7 +1391,7 @@ void Field::error_generated_column_function_is_not_allowed(THD *thd,
QT_ITEM_IDENT_SKIP_DB_NAMES |
QT_ITEM_IDENT_SKIP_TABLE_NAMES));
my_error(ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED,
- MYF(error ? 0 : ME_JUST_WARNING),
+ MYF(error ? 0 : ME_WARNING),
tmp.c_ptr_safe(), vcol_info->get_vcol_type_name(),
const_cast<const char*>(field_name.str));
}
@@ -1397,8 +1407,10 @@ bool Field::check_vcol_sql_mode_dependency(THD *thd, vcol_init_mode mode) const
DBUG_ASSERT(vcol_info);
if ((flags & PART_KEY_FLAG) != 0 || stored_in_db())
{
+ Sql_mode_dependency valdep= vcol_info->expr->value_depends_on_sql_mode();
+ sql_mode_t cnvdep= conversion_depends_on_sql_mode(thd, vcol_info->expr);
Sql_mode_dependency dep=
- vcol_info->expr->value_depends_on_sql_mode() &
+ (valdep | Sql_mode_dependency(0, cnvdep)) &
Sql_mode_dependency(~0, ~can_handle_sql_mode_dependency_on_store());
if (dep)
{
@@ -1412,6 +1424,14 @@ bool Field::check_vcol_sql_mode_dependency(THD *thd, vcol_init_mode mode) const
}
+bool Field::make_empty_rec_store_default_value(THD *thd, Item *item)
+{
+ DBUG_ASSERT(!(flags & BLOB_FLAG));
+ int res= item->save_in_field(this, true);
+ return res != 0 && res != 3;
+}
+
+
/**
Numeric fields base class constructor.
*/
@@ -1733,7 +1753,7 @@ int Field::warn_if_overflow(int op_result)
String *Field::val_int_as_str(String *val_buffer, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
CHARSET_INFO *cs= &my_charset_bin;
uint length;
longlong value= val_int();
@@ -1872,11 +1892,9 @@ int Field::store(const char *to, size_t length, CHARSET_INFO *cs,
}
-int Field::store_timestamp(my_time_t ts, ulong sec_part)
+int Field::store_timestamp_dec(const timeval &ts, uint dec)
{
- MYSQL_TIME ltime;
- get_thd()->timestamp_to_TIME(&ltime, ts, sec_part, 0);
- return store_time_dec(&ltime, decimals());
+ return store_time_dec(Datetime(get_thd(), ts).get_mysql_time(), dec);
}
/**
@@ -1976,14 +1994,6 @@ Field::unpack(uchar* to, const uchar *from, const uchar *from_end,
}
-my_decimal *Field::val_decimal(my_decimal *decimal)
-{
- /* This never have to be called */
- DBUG_ASSERT(0);
- return 0;
-}
-
-
void Field_num::add_zerofill_and_unsigned(String &res) const
{
if (unsigned_flag)
@@ -2019,7 +2029,7 @@ void Field::make_send_field(Send_field *field)
}
field->col_name= field_name;
field->length=field_length;
- field->type=type();
+ field->set_handler(type_handler());
field->flags=table->maybe_null ? (flags & ~NOT_NULL_FLAG) : flags;
field->decimals= 0;
}
@@ -2085,7 +2095,7 @@ longlong Field::convert_decimal2longlong(const my_decimal *val,
int Field_int::store_decimal(const my_decimal *val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int err= 0;
longlong i= convert_decimal2longlong(val, unsigned_flag, &err);
return MY_TEST(err | store(i, unsigned_flag));
@@ -2108,26 +2118,25 @@ int Field_int::store_decimal(const my_decimal *val)
my_decimal* Field_int::val_decimal(my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
longlong nr= val_int();
int2my_decimal(E_DEC_FATAL_ERROR, nr, unsigned_flag, decimal_value);
return decimal_value;
}
-bool Field_int::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Field_int::get_date(MYSQL_TIME *ltime,date_mode_t fuzzydate)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
- longlong nr= val_int();
- bool neg= !(flags & UNSIGNED_FLAG) && nr < 0;
- return int_to_datetime_with_warn(neg, neg ? -nr : nr, ltime, fuzzydate,
- table->s, field_name.str);
+ DBUG_ASSERT(marked_for_read());
+ Longlong_hybrid nr(val_int(), (flags & UNSIGNED_FLAG));
+ return int_to_datetime_with_warn(get_thd(), nr, ltime,
+ fuzzydate, table->s, field_name.str);
}
-bool Field_vers_trx_id::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate, ulonglong trx_id)
+bool Field_vers_trx_id::get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate, ulonglong trx_id)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
DBUG_ASSERT(ltime);
if (!table || !table->s)
return true;
@@ -2253,7 +2262,7 @@ void Field_num::make_send_field(Send_field *field)
int Field_str::store_decimal(const my_decimal *d)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
double val;
/* TODO: use decimal2string? */
int err= warn_if_overflow(my_decimal2double(E_DEC_FATAL_ERROR &
@@ -2264,7 +2273,7 @@ int Field_str::store_decimal(const my_decimal *d)
my_decimal *Field_str::val_decimal(my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
longlong nr= val_int();
int2my_decimal(E_DEC_FATAL_ERROR, nr, 0, decimal_value);
return decimal_value;
@@ -2305,17 +2314,42 @@ uint Field::fill_cache_field(CACHE_FIELD *copy)
}
-bool Field::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Field::get_date(MYSQL_TIME *to, date_mode_t mode)
{
- char buff[40];
- String tmp(buff,sizeof(buff),&my_charset_bin),*res;
- if (!(res=val_str(&tmp)) ||
- str_to_datetime_with_warn(res->charset(), res->ptr(), res->length(),
- ltime, fuzzydate))
- return 1;
- return 0;
+ StringBuffer<40> tmp;
+ Temporal::Warn_push warn(get_thd(), nullptr, nullptr, nullptr, to, mode);
+ Temporal_hybrid *t= new(to) Temporal_hybrid(get_thd(), &warn,
+ val_str(&tmp), mode);
+ return !t->is_valid_temporal();
+}
+
+
+longlong Field::val_datetime_packed(THD *thd)
+{
+ MYSQL_TIME ltime, tmp;
+ if (get_date(&ltime, Datetime::Options_cmp(thd)))
+ return 0;
+ if (ltime.time_type != MYSQL_TIMESTAMP_TIME)
+ return pack_time(&ltime);
+ if (time_to_datetime_with_warn(thd, &ltime, &tmp, TIME_CONV_NONE))
+ return 0;
+ return pack_time(&tmp);
}
+
+longlong Field::val_time_packed(THD *thd)
+{
+ MYSQL_TIME ltime;
+ Time::Options_cmp opt(thd);
+ if (get_date(&ltime, opt))
+ return 0;
+ if (ltime.time_type == MYSQL_TIMESTAMP_TIME)
+ return pack_time(&ltime);
+ // Conversion from DATETIME or DATE to TIME is needed
+ return Time(thd, &ltime, opt).to_packed();
+}
+
+
/**
This is called when storing a date in a string.
@@ -2325,7 +2359,7 @@ bool Field::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
int Field::store_time_dec(const MYSQL_TIME *ltime, uint dec)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
char buff[MAX_DATE_STRING_REP_LENGTH];
uint length= (uint) my_TIME_to_str(ltime, buff, dec);
/* Avoid conversion when field character set is ASCII compatible */
@@ -2383,6 +2417,36 @@ Field *Field::new_key_field(MEM_ROOT *root, TABLE *new_table,
}
+/**
+ Create field for temporary table from given field.
+
+ @param thd Thread handler
+ @param table Temporary table
+ @param maybe_null_arg If the result field should be NULL-able,
+ even if the original field is NOT NULL, e.g. for:
+ - OUTER JOIN fields
+ - WITH ROLLUP fields
+ - arguments of aggregate functions, e.g. SUM(column1)
+ @retval NULL, on error
+ @retval pointer to the new field created, on success.
+*/
+
+Field *Field::create_tmp_field(MEM_ROOT *mem_root, TABLE *new_table,
+ bool maybe_null_arg)
+{
+ Field *new_field;
+
+ if ((new_field= make_new_field(mem_root, new_table, new_table == table)))
+ {
+ new_field->init_for_tmp_table(this, new_table);
+ new_field->flags|= flags & NO_DEFAULT_VALUE_FLAG;
+ if (maybe_null_arg)
+ new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join
+ }
+ return new_field;
+}
+
+
/* This is used to generate a field in TABLE from TABLE_SHARE */
Field *Field::clone(MEM_ROOT *root, TABLE *new_table)
@@ -2447,6 +2511,15 @@ void Field_null::sql_type(String &res) const
}
+bool Field_null::is_equal(const Column_definition &new_field) const
+{
+ DBUG_ASSERT(!compression_method());
+ return new_field.type_handler() == type_handler() &&
+ new_field.charset == field_charset &&
+ new_field.length == max_display_length();
+}
+
+
/****************************************************************************
Field_row, e.g. for ROW-type SP variables
****************************************************************************/
@@ -2545,7 +2618,7 @@ void Field_decimal::overflow(bool negative)
int Field_decimal::store(const char *from_arg, size_t len, CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
char buff[STRING_BUFFER_USUAL_SIZE];
String tmp(buff,sizeof(buff), &my_charset_bin);
const uchar *from= (uchar*) from_arg;
@@ -2911,7 +2984,7 @@ int Field_decimal::store(const char *from_arg, size_t len, CHARSET_INFO *cs)
int Field_decimal::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
if (unsigned_flag && nr < 0)
{
overflow(1);
@@ -2949,7 +3022,7 @@ int Field_decimal::store(double nr)
int Field_decimal::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
char buff[22];
uint length, int_part;
char fyllchar;
@@ -2985,7 +3058,7 @@ int Field_decimal::store(longlong nr, bool unsigned_val)
double Field_decimal::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int not_used;
char *end_not_used;
return my_strntod(&my_charset_bin, (char*) ptr, field_length, &end_not_used,
@@ -2994,7 +3067,7 @@ double Field_decimal::val_real(void)
longlong Field_decimal::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int not_used;
if (unsigned_flag)
return my_strntoull(&my_charset_bin, (char*) ptr, field_length, 10, NULL,
@@ -3007,7 +3080,7 @@ longlong Field_decimal::val_int(void)
String *Field_decimal::val_str(String *val_buffer __attribute__((unused)),
String *val_ptr)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
uchar *str;
size_t tmp_length;
@@ -3116,15 +3189,6 @@ Field *Field_decimal::make_new_field(MEM_ROOT *root, TABLE *new_table,
}
-void Field_new_decimal::set_and_validate_prec(uint32 len_arg,
- uint8 dec_arg, bool unsigned_arg)
-{
- precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg);
- set_if_smaller(precision, DECIMAL_MAX_PRECISION);
- bin_size= my_decimal_get_binary_size(precision, dec);
-}
-
-
/****************************************************************************
** Field_new_decimal
****************************************************************************/
@@ -3146,7 +3210,10 @@ Field_new_decimal::Field_new_decimal(uchar *ptr_arg,
unireg_check_arg, field_name_arg,
MY_MIN(dec_arg, DECIMAL_MAX_SCALE), zero_arg, unsigned_arg)
{
- set_and_validate_prec(len_arg, dec_arg, unsigned_arg);
+ precision= get_decimal_precision(len_arg, dec_arg, unsigned_arg);
+ DBUG_ASSERT(precision <= DECIMAL_MAX_PRECISION);
+ DBUG_ASSERT(dec <= DECIMAL_MAX_SCALE);
+ bin_size= my_decimal_get_binary_size(precision, dec);
}
@@ -3188,7 +3255,7 @@ void Field_new_decimal::set_value_on_overflow(my_decimal *decimal_value,
Otherwise sets maximal number that can be stored in the field.
@param decimal_value my_decimal
- @param [OUT] native_error the error returned by my_decimal2binary().
+ @param [OUT] native_error the error returned by my_decimal::to_binary().
@retval
0 ok
@@ -3199,7 +3266,7 @@ void Field_new_decimal::set_value_on_overflow(my_decimal *decimal_value,
bool Field_new_decimal::store_value(const my_decimal *decimal_value,
int *native_error)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
DBUG_ENTER("Field_new_decimal::store_value");
#ifndef DBUG_OFF
@@ -3226,8 +3293,8 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value,
}
#endif
- *native_error= my_decimal2binary(E_DEC_FATAL_ERROR & ~E_DEC_OVERFLOW,
- decimal_value, ptr, precision, dec);
+ *native_error= decimal_value->to_binary(ptr, precision, dec,
+ E_DEC_FATAL_ERROR & ~E_DEC_OVERFLOW);
if (unlikely(*native_error == E_DEC_OVERFLOW))
{
@@ -3235,7 +3302,7 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value,
DBUG_PRINT("info", ("overflow"));
set_warning(ER_WARN_DATA_OUT_OF_RANGE, 1);
set_value_on_overflow(&buff, decimal_value->sign());
- my_decimal2binary(E_DEC_FATAL_ERROR, &buff, ptr, precision, dec);
+ buff.to_binary(ptr, precision, dec);
error= 1;
}
DBUG_EXECUTE("info", print_decimal_buff(decimal_value, (uchar *) ptr,
@@ -3257,7 +3324,7 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value)
int Field_new_decimal::store(const char *from, size_t length,
CHARSET_INFO *charset_arg)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
my_decimal decimal_value;
THD *thd= get_thd();
DBUG_ENTER("Field_new_decimal::store(char*)");
@@ -3341,7 +3408,7 @@ int Field_new_decimal::store(const char *from, size_t length,
int Field_new_decimal::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
my_decimal decimal_value;
int err;
THD *thd= get_thd();
@@ -3366,7 +3433,7 @@ int Field_new_decimal::store(double nr)
int Field_new_decimal::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
my_decimal decimal_value;
int err;
@@ -3388,7 +3455,7 @@ int Field_new_decimal::store(longlong nr, bool unsigned_val)
int Field_new_decimal::store_decimal(const my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
return store_value(decimal_value);
}
@@ -3400,40 +3467,9 @@ int Field_new_decimal::store_time_dec(const MYSQL_TIME *ltime, uint dec_arg)
}
-double Field_new_decimal::val_real(void)
-{
- ASSERT_COLUMN_MARKED_FOR_READ;
- double dbl;
- my_decimal decimal_value;
- my_decimal2double(E_DEC_FATAL_ERROR, val_decimal(&decimal_value), &dbl);
- return dbl;
-}
-
-
-longlong Field_new_decimal::val_int(void)
-{
- ASSERT_COLUMN_MARKED_FOR_READ;
- longlong i;
- my_decimal decimal_value;
- my_decimal2int(E_DEC_FATAL_ERROR, val_decimal(&decimal_value),
- unsigned_flag, &i);
- return i;
-}
-
-
-ulonglong Field_new_decimal::val_uint(void)
-{
- ASSERT_COLUMN_MARKED_FOR_READ;
- longlong i;
- my_decimal decimal_value;
- my_decimal2int(E_DEC_FATAL_ERROR, val_decimal(&decimal_value), true, &i);
- return i;
-}
-
-
my_decimal* Field_new_decimal::val_decimal(my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
DBUG_ENTER("Field_new_decimal::val_decimal");
binary2my_decimal(E_DEC_FATAL_ERROR, ptr, decimal_value,
precision, dec);
@@ -3443,28 +3479,6 @@ my_decimal* Field_new_decimal::val_decimal(my_decimal *decimal_value)
}
-String *Field_new_decimal::val_str(String *val_buffer,
- String *val_ptr __attribute__((unused)))
-{
- ASSERT_COLUMN_MARKED_FOR_READ;
- my_decimal decimal_value;
- uint fixed_precision= zerofill ? precision : 0;
- my_decimal2string(E_DEC_FATAL_ERROR, val_decimal(&decimal_value),
- fixed_precision, dec, '0', val_buffer);
- val_buffer->set_charset(&my_charset_numeric);
- return val_buffer;
-}
-
-
-bool Field_new_decimal::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
-{
- my_decimal value;
- return decimal_to_datetime_with_warn(val_decimal(&value),
- ltime, fuzzydate, table->s,
- field_name.str);
-}
-
-
int Field_new_decimal::cmp(const uchar *a,const uchar*b)
{
return memcmp(a, b, bin_size);
@@ -3540,15 +3554,15 @@ bool Field_new_decimal::compatible_field_size(uint field_metadata,
}
-uint Field_new_decimal::is_equal(Create_field *new_field)
+bool Field_new_decimal::is_equal(const Column_definition &new_field) const
{
- return ((new_field->type_handler() == type_handler()) &&
- ((new_field->flags & UNSIGNED_FLAG) ==
+ return ((new_field.type_handler() == type_handler()) &&
+ ((new_field.flags & UNSIGNED_FLAG) ==
(uint) (flags & UNSIGNED_FLAG)) &&
- ((new_field->flags & AUTO_INCREMENT_FLAG) ==
+ ((new_field.flags & AUTO_INCREMENT_FLAG) <=
(uint) (flags & AUTO_INCREMENT_FLAG)) &&
- (new_field->length == max_display_length()) &&
- (new_field->decimals == dec));
+ (new_field.length == max_display_length()) &&
+ (new_field.decimals == dec));
}
@@ -3618,8 +3632,8 @@ Item *Field_new_decimal::get_equal_const_item(THD *thd, const Context &ctx,
if (const_item->field_type() != MYSQL_TYPE_NEWDECIMAL ||
const_item->decimal_scale() != decimals())
{
- my_decimal *val, val_buffer, val_buffer2;
- if (!(val= const_item->val_decimal(&val_buffer)))
+ VDec val(const_item);
+ if (val.is_null())
{
DBUG_ASSERT(0);
return const_item;
@@ -3629,9 +3643,9 @@ Item *Field_new_decimal::get_equal_const_item(THD *thd, const Context &ctx,
See comments about truncation in the same place in
Field_time::get_equal_const_item().
*/
- my_decimal_round(E_DEC_FATAL_ERROR, val, decimals(), true, &val_buffer2);
- return new (thd->mem_root) Item_decimal(thd, field_name.str,
- &val_buffer2,
+ my_decimal tmp;
+ val.round_to(&tmp, decimals(), TRUNCATE);
+ return new (thd->mem_root) Item_decimal(thd, field_name.str, &tmp,
decimals(), field_length);
}
break;
@@ -3657,7 +3671,7 @@ int Field_int::store_time_dec(const MYSQL_TIME *ltime, uint dec_arg)
int Field_tiny::store(const char *from,size_t len,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error;
longlong rnd;
@@ -3669,7 +3683,7 @@ int Field_tiny::store(const char *from,size_t len,CHARSET_INFO *cs)
int Field_tiny::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
nr=rint(nr);
if (unsigned_flag)
@@ -3712,7 +3726,7 @@ int Field_tiny::store(double nr)
int Field_tiny::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
if (unsigned_flag)
@@ -3757,7 +3771,7 @@ int Field_tiny::store(longlong nr, bool unsigned_val)
double Field_tiny::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int tmp= unsigned_flag ? (int) ptr[0] :
(int) ((signed char*) ptr)[0];
return (double) tmp;
@@ -3766,7 +3780,7 @@ double Field_tiny::val_real(void)
longlong Field_tiny::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int tmp= unsigned_flag ? (int) ptr[0] :
(int) ((signed char*) ptr)[0];
return (longlong) tmp;
@@ -3776,7 +3790,7 @@ longlong Field_tiny::val_int(void)
String *Field_tiny::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
long nr= unsigned_flag ? (long) ptr[0] : (long) ((signed char*) ptr)[0];
return val_str_from_long(val_buffer, 5, -10, nr);
}
@@ -3817,7 +3831,7 @@ void Field_tiny::sql_type(String &res) const
int Field_short::store(const char *from,size_t len,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int store_tmp;
int error;
longlong rnd;
@@ -3831,7 +3845,7 @@ int Field_short::store(const char *from,size_t len,CHARSET_INFO *cs)
int Field_short::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
int16 res;
nr=rint(nr);
@@ -3876,7 +3890,7 @@ int Field_short::store(double nr)
int Field_short::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
int16 res;
@@ -3924,7 +3938,7 @@ int Field_short::store(longlong nr, bool unsigned_val)
double Field_short::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
short j;
j=sint2korr(ptr);
return unsigned_flag ? (double) (unsigned short) j : (double) j;
@@ -3932,7 +3946,7 @@ double Field_short::val_real(void)
longlong Field_short::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
short j;
j=sint2korr(ptr);
return unsigned_flag ? (longlong) (unsigned short) j : (longlong) j;
@@ -3942,7 +3956,7 @@ longlong Field_short::val_int(void)
String *Field_short::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
short j= sint2korr(ptr);
long nr= unsigned_flag ? (long) (unsigned short) j : (long) j;
return val_str_from_long(val_buffer, 7, -10, nr);
@@ -3991,7 +4005,7 @@ void Field_short::sql_type(String &res) const
int Field_medium::store(const char *from,size_t len,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int store_tmp;
int error;
longlong rnd;
@@ -4005,7 +4019,7 @@ int Field_medium::store(const char *from,size_t len,CHARSET_INFO *cs)
int Field_medium::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
nr=rint(nr);
if (unsigned_flag)
@@ -4051,7 +4065,7 @@ int Field_medium::store(double nr)
int Field_medium::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
if (unsigned_flag)
@@ -4100,7 +4114,7 @@ int Field_medium::store(longlong nr, bool unsigned_val)
double Field_medium::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
long j= unsigned_flag ? (long) uint3korr(ptr) : sint3korr(ptr);
return (double) j;
}
@@ -4108,7 +4122,7 @@ double Field_medium::val_real(void)
longlong Field_medium::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
long j= unsigned_flag ? (long) uint3korr(ptr) : sint3korr(ptr);
return (longlong) j;
}
@@ -4117,7 +4131,7 @@ longlong Field_medium::val_int(void)
String *Field_medium::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
long nr= unsigned_flag ? (long) uint3korr(ptr) : sint3korr(ptr);
return val_str_from_long(val_buffer, 10, -10, nr);
}
@@ -4143,7 +4157,7 @@ String *Field_int::val_str_from_long(String *val_buffer,
bool Field_medium::send_binary(Protocol *protocol)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return protocol->store_long(Field_medium::val_int());
}
@@ -4189,7 +4203,7 @@ void Field_medium::sql_type(String &res) const
int Field_long::store(const char *from,size_t len,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
long store_tmp;
int error;
longlong rnd;
@@ -4203,7 +4217,7 @@ int Field_long::store(const char *from,size_t len,CHARSET_INFO *cs)
int Field_long::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
int32 res;
nr=rint(nr);
@@ -4248,7 +4262,7 @@ int Field_long::store(double nr)
int Field_long::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
int32 res;
@@ -4294,7 +4308,7 @@ int Field_long::store(longlong nr, bool unsigned_val)
double Field_long::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int32 j;
j=sint4korr(ptr);
return unsigned_flag ? (double) (uint32) j : (double) j;
@@ -4302,7 +4316,7 @@ double Field_long::val_real(void)
longlong Field_long::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int32 j;
/* See the comment in Field_long::store(long long) */
DBUG_ASSERT(!table || table->in_use == current_thd);
@@ -4314,7 +4328,7 @@ longlong Field_long::val_int(void)
String *Field_long::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
long nr= unsigned_flag ? (long) uint4korr(ptr) : sint4korr(ptr);
return val_str_from_long(val_buffer, 12, unsigned_flag ? 10 : -10, nr);
}
@@ -4322,7 +4336,7 @@ String *Field_long::val_str(String *val_buffer,
bool Field_long::send_binary(Protocol *protocol)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return protocol->store_long(Field_long::val_int());
}
@@ -4362,7 +4376,7 @@ void Field_long::sql_type(String &res) const
int Field_longlong::store(const char *from,size_t len,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
char *end;
ulonglong tmp;
@@ -4385,7 +4399,7 @@ int Field_longlong::store(const char *from,size_t len,CHARSET_INFO *cs)
int Field_longlong::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
Converter_double_to_longlong conv(nr, unsigned_flag);
if (unlikely(conv.error()))
@@ -4398,7 +4412,7 @@ int Field_longlong::store(double nr)
int Field_longlong::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
if (unlikely(nr < 0)) // Only possible error
@@ -4422,7 +4436,7 @@ int Field_longlong::store(longlong nr, bool unsigned_val)
double Field_longlong::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
longlong j;
j=sint8korr(ptr);
/* The following is open coded to avoid a bug in gcc 3.3 */
@@ -4437,7 +4451,7 @@ double Field_longlong::val_real(void)
longlong Field_longlong::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
longlong j;
j=sint8korr(ptr);
return j;
@@ -4467,7 +4481,7 @@ String *Field_longlong::val_str(String *val_buffer,
bool Field_longlong::send_binary(Protocol *protocol)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return protocol->store_longlong(Field_longlong::val_int(), unsigned_flag);
}
@@ -4509,14 +4523,14 @@ void Field_longlong::sql_type(String &res) const
void Field_longlong::set_max()
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
set_notnull();
int8store(ptr, unsigned_flag ? ULONGLONG_MAX : LONGLONG_MAX);
}
bool Field_longlong::is_max()
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
if (unsigned_flag)
{
ulonglong j;
@@ -4546,7 +4560,7 @@ int Field_float::store(const char *from,size_t len,CHARSET_INFO *cs)
int Field_float::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= truncate_double(&nr, field_length,
not_fixed ? NOT_FIXED_DEC : dec,
unsigned_flag, FLT_MAX);
@@ -4575,7 +4589,7 @@ int Field_float::store(longlong nr, bool unsigned_val)
double Field_float::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
float j;
float4get(j,ptr);
return ((double) j);
@@ -4592,7 +4606,7 @@ longlong Field_float::val_int(void)
String *Field_float::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
if (Float(ptr).to_string(val_buffer, dec))
@@ -4655,7 +4669,7 @@ void Field_float::sort_string(uchar *to,uint length __attribute__((unused)))
bool Field_float::send_binary(Protocol *protocol)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return protocol->store((float) Field_float::val_real(), dec, (String*) 0);
}
@@ -4706,7 +4720,7 @@ int Field_double::store(const char *from,size_t len,CHARSET_INFO *cs)
int Field_double::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= truncate_double(&nr, field_length,
not_fixed ? NOT_FIXED_DEC : dec,
unsigned_flag, DBL_MAX);
@@ -4853,13 +4867,6 @@ Converter_double_to_longlong::push_warning(THD *thd,
}
-int Field_real::store_decimal(const my_decimal *dm)
-{
- double dbl;
- my_decimal2double(E_DEC_FATAL_ERROR, dm, &dbl);
- return store(dbl);
-}
-
int Field_real::store_time_dec(const MYSQL_TIME *ltime, uint dec_arg)
{
return store(TIME_to_double(ltime));
@@ -4868,7 +4875,7 @@ int Field_real::store_time_dec(const MYSQL_TIME *ltime, uint dec_arg)
double Field_double::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
double j;
float8get(j,ptr);
return j;
@@ -4886,17 +4893,17 @@ longlong Field_double::val_int_from_real(bool want_unsigned_result)
my_decimal *Field_real::val_decimal(my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
double2my_decimal(E_DEC_FATAL_ERROR, val_real(), decimal_value);
return decimal_value;
}
-bool Field_real::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Field_real::get_date(MYSQL_TIME *ltime,date_mode_t fuzzydate)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
double nr= val_real();
- return double_to_datetime_with_warn(nr, ltime, fuzzydate,
+ return double_to_datetime_with_warn(get_thd(), nr, ltime, fuzzydate,
table->s, field_name.str);
}
@@ -4924,7 +4931,7 @@ Item *Field_real::get_equal_const_item(THD *thd, const Context &ctx,
String *Field_double::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
double nr;
float8get(nr,ptr);
@@ -5072,151 +5079,192 @@ Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg,
}
+sql_mode_t
+Field_timestamp::conversion_depends_on_sql_mode(THD *thd, Item *expr) const
+{
+ return expr->datetime_precision(thd) > decimals() ?
+ MODE_TIME_ROUND_FRACTIONAL : 0;
+}
+
+
int Field_timestamp::save_in_field(Field *to)
{
ulong sec_part;
my_time_t ts= get_timestamp(&sec_part);
- return to->store_timestamp(ts, sec_part);
+ return to->store_timestamp_dec(Timeval(ts, sec_part), decimals());
}
my_time_t Field_timestamp::get_timestamp(const uchar *pos,
ulong *sec_part) const
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
*sec_part= 0;
return sint4korr(pos);
}
-int Field_timestamp::store_TIME_with_warning(THD *thd, MYSQL_TIME *l_time,
- const ErrConv *str,
- int was_cut,
- bool have_smth_to_conv)
+bool Field_timestamp::val_native(Native *to)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
- uint error = 0;
- my_time_t timestamp;
+ DBUG_ASSERT(marked_for_read());
+ my_time_t sec= (my_time_t) sint4korr(ptr);
+ return Timestamp_or_zero_datetime(Timestamp(sec, 0), sec == 0).
+ to_native(to, 0);
+}
- if (MYSQL_TIME_WARN_HAVE_WARNINGS(was_cut) || !have_smth_to_conv)
- {
- error= 1;
- set_datetime_warning(WARN_DATA_TRUNCATED,
- str, MYSQL_TIMESTAMP_DATETIME, 1);
- }
- else if (MYSQL_TIME_WARN_HAVE_NOTES(was_cut))
+
+int Field_timestamp::store_TIME_with_warning(THD *thd, const Datetime *dt,
+ const ErrConv *str, int was_cut)
+{
+ DBUG_ASSERT(marked_for_write_or_computed());
+ static const Timestamp zero(0, 0);
+
+ // Handle totally bad values
+ if (!dt->is_valid_datetime())
{
- error= 3;
- set_datetime_warning(Sql_condition::WARN_LEVEL_NOTE, WARN_DATA_TRUNCATED,
- str, MYSQL_TIMESTAMP_DATETIME, 1);
+ set_datetime_warning(WARN_DATA_TRUNCATED, str, "datetime", 1);
+ store_TIMESTAMP(zero);
+ return 1;
}
- /* Only convert a correct date (not a zero date) */
- if (have_smth_to_conv && l_time->month)
+
+ // Handle values that do not need DATETIME to TIMESTAMP conversion
+ if (!dt->get_mysql_time()->month)
{
- uint conversion_error;
- timestamp= TIME_to_timestamp(thd, l_time, &conversion_error);
- if (timestamp == 0 && l_time->second_part == 0)
- conversion_error= ER_WARN_DATA_OUT_OF_RANGE;
- if (unlikely(conversion_error))
- {
- set_datetime_warning(conversion_error,
- str, MYSQL_TIMESTAMP_DATETIME, !error);
- error= 1;
- }
+ /*
+ Zero date is allowed by the current sql_mode. Store zero timestamp.
+ Return success or a warning about non-fatal truncation, e.g.:
+ INSERT INTO t1 (ts) VALUES ('0000-00-00 00:00:00 some tail');
+ */
+ store_TIMESTAMP(zero);
+ return store_TIME_return_code_with_warnings(was_cut, str, "datetime");
}
- else
+
+ // Convert DATETIME to TIMESTAMP
+ uint conversion_error;
+ const MYSQL_TIME *l_time= dt->get_mysql_time();
+ my_time_t timestamp= TIME_to_timestamp(thd, l_time, &conversion_error);
+ if (timestamp == 0 && l_time->second_part == 0)
{
- timestamp= 0;
- l_time->second_part= 0;
+ set_datetime_warning(ER_WARN_DATA_OUT_OF_RANGE, str, "datetime", 1);
+ store_TIMESTAMP(zero);
+ return 1; // date was fine but pointed to a DST gap
}
- store_TIME(timestamp, l_time->second_part);
- return error;
-}
+ // Store the value
+ DBUG_ASSERT(!dt->fraction_remainder(decimals()));
+ store_TIMESTAMP(Timestamp(timestamp, l_time->second_part));
-static bool
-copy_or_convert_to_datetime(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to)
-{
- if (from->time_type == MYSQL_TIMESTAMP_TIME)
- return time_to_datetime(thd, from, to);
- *to= *from;
- return false;
+ // Calculate return value and send warnings if needed
+ if (unlikely(conversion_error)) // e.g. DATETIME in the DST gap
+ {
+ set_datetime_warning(conversion_error, str, "datetime", 1);
+ return 1;
+ }
+ return store_TIME_return_code_with_warnings(was_cut, str, "datetime");
}
-sql_mode_t Field_timestamp::sql_mode_for_timestamp(THD *thd) const
+date_conv_mode_t Timestamp::sql_mode_for_timestamp(THD *thd)
{
// We don't want to store invalid or fuzzy datetime values in TIMESTAMP
- return (thd->variables.sql_mode & MODE_NO_ZERO_DATE) | MODE_NO_ZERO_IN_DATE;
+ return date_conv_mode_t((thd->variables.sql_mode & MODE_NO_ZERO_DATE) |
+ MODE_NO_ZERO_IN_DATE);
}
int Field_timestamp::store_time_dec(const MYSQL_TIME *ltime, uint dec)
{
- int unused;
+ int warn;
ErrConvTime str(ltime);
THD *thd= get_thd();
- MYSQL_TIME l_time;
- bool valid= !copy_or_convert_to_datetime(thd, ltime, &l_time) &&
- !check_date(&l_time, pack_time(&l_time) != 0,
- sql_mode_for_timestamp(thd), &unused);
- return store_TIME_with_warning(thd, &l_time, &str, false, valid);
+ Datetime dt(thd, &warn, ltime, Timestamp::DatetimeOptions(thd), decimals());
+ return store_TIME_with_warning(thd, &dt, &str, warn);
}
int Field_timestamp::store(const char *from,size_t len,CHARSET_INFO *cs)
{
- MYSQL_TIME l_time;
- MYSQL_TIME_STATUS status;
- bool have_smth_to_conv;
ErrConvString str(from, len, cs);
THD *thd= get_thd();
-
- have_smth_to_conv= !str_to_datetime(cs, from, len, &l_time,
- sql_mode_for_timestamp(thd), &status);
- return store_TIME_with_warning(thd, &l_time, &str,
- status.warnings, have_smth_to_conv);
+ MYSQL_TIME_STATUS st;
+ Datetime dt(thd, &st, from, len, cs, Timestamp::DatetimeOptions(thd), decimals());
+ return store_TIME_with_warning(thd, &dt, &str, st.warnings);
}
int Field_timestamp::store(double nr)
{
- MYSQL_TIME l_time;
int error;
ErrConvDouble str(nr);
THD *thd= get_thd();
-
- longlong tmp= double_to_datetime(nr, &l_time, sql_mode_for_timestamp(thd),
- &error);
- return store_TIME_with_warning(thd, &l_time, &str, error, tmp != -1);
+ Datetime dt(thd, &error, nr, Timestamp::DatetimeOptions(thd), decimals());
+ return store_TIME_with_warning(thd, &dt, &str, error);
}
int Field_timestamp::store(longlong nr, bool unsigned_val)
{
- MYSQL_TIME l_time;
int error;
- ErrConvInteger str(nr, unsigned_val);
+ Longlong_hybrid tmp(nr, unsigned_val);
+ ErrConvInteger str(tmp);
THD *thd= get_thd();
+ Datetime dt(&error, tmp, Timestamp::DatetimeOptions(thd));
+ return store_TIME_with_warning(thd, &dt, &str, error);
+}
- longlong tmp= number_to_datetime(nr, 0, &l_time, sql_mode_for_timestamp(thd),
- &error);
- return store_TIME_with_warning(thd, &l_time, &str, error, tmp != -1);
+
+int Field_timestamp::store_timestamp_dec(const timeval &ts, uint dec)
+{
+ int warn= 0;
+ time_round_mode_t mode= Datetime::default_round_mode(get_thd());
+ store_TIMESTAMP(Timestamp(ts).round(decimals(), mode, &warn));
+ if (warn)
+ {
+ /*
+ We're here if rounding would overflow outside of the supported TIMESTAMP
+ range, so truncation happened instead:
+ CREATE TABLE t1 (a TIMESTAMP(6));
+ INSERT INTO t1 VALUES ('maximum-possible-timestamp.999999');
+ ALTER TABLE t1 MODIFY a TIMESTAMP(5);
+ SELECT * FROM t1; --> 'maximum-possible-timestamp.99999' (5 digits)
+ Raise a warning, like DATETIME does for '9999-12-31 23:59:59.999999'.
+ */
+ set_warning(Sql_condition::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+ }
+ if (ts.tv_sec == 0 && ts.tv_usec == 0 &&
+ get_thd()->variables.sql_mode & (ulonglong) TIME_NO_ZERO_DATE)
+ return zero_time_stored_return_code_with_warning();
+ return 0;
}
-int Field_timestamp::store_timestamp(my_time_t ts, ulong sec_part)
+int Field_timestamp::zero_time_stored_return_code_with_warning()
{
- store_TIME(ts, sec_part);
- if (ts == 0 && sec_part == 0 &&
- get_thd()->variables.sql_mode & TIME_NO_ZERO_DATE)
+ if (get_thd()->variables.sql_mode & (ulonglong) TIME_NO_ZERO_DATE)
{
ErrConvString s(
STRING_WITH_LEN("0000-00-00 00:00:00.000000") - (decimals() ? 6 - decimals() : 7),
system_charset_info);
- set_datetime_warning(WARN_DATA_TRUNCATED, &s, MYSQL_TIMESTAMP_DATETIME, 1);
+ set_datetime_warning(WARN_DATA_TRUNCATED, &s, "datetime", 1);
return 1;
}
return 0;
+
+}
+
+
+int Field_timestamp::store_native(const Native &value)
+{
+ if (!value.length()) // Zero datetime
+ {
+ reset();
+ return zero_time_stored_return_code_with_warning();
+ }
+ /*
+ The exact second precision is not important here.
+ Field_timestamp*::store_timestamp_dec() do not use the "dec" parameter.
+ Passing TIME_SECOND_PART_DIGITS is OK.
+ */
+ return store_timestamp_dec(Timestamp(value).tv(), TIME_SECOND_PART_DIGITS);
}
@@ -5229,7 +5277,7 @@ double Field_timestamp::val_real(void)
longlong Field_timestamp::val_int(void)
{
MYSQL_TIME ltime;
- if (get_date(&ltime, TIME_NO_ZERO_DATE))
+ if (get_date(&ltime, Datetime::Options(TIME_NO_ZERO_DATE, get_thd())))
return 0;
return ltime.year * 10000000000LL + ltime.month * 100000000LL +
@@ -5249,7 +5297,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr)
to= (char*) val_buffer->ptr();
val_buffer->length(field_length);
- if (get_date(&ltime, TIME_NO_ZERO_DATE))
+ if (get_date(&ltime, Datetime::Options(TIME_NO_ZERO_DATE, get_thd())))
{ /* Zero time is "000000" */
val_ptr->set(zero_timestamp, field_length, &my_charset_numeric);
return val_ptr;
@@ -5317,11 +5365,11 @@ Field_timestamp::validate_value_in_record(THD *thd, const uchar *record) const
DBUG_ASSERT(!is_null_in_record(record));
ulong sec_part;
return !get_timestamp(ptr_in_record(record), &sec_part) && !sec_part &&
- (sql_mode_for_dates(thd) & TIME_NO_ZERO_DATE) != 0;
+ bool(sql_mode_for_dates(thd) & TIME_NO_ZERO_DATE) != false;
}
-bool Field_timestamp::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Field_timestamp::get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
ulong sec_part;
my_time_t ts= get_timestamp(&sec_part);
@@ -5332,7 +5380,7 @@ bool Field_timestamp::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
bool Field_timestamp::send_binary(Protocol *protocol)
{
MYSQL_TIME ltime;
- Field_timestamp::get_date(&ltime, 0);
+ Field_timestamp::get_date(&ltime, date_mode_t(0));
return protocol->store(&ltime, 0);
}
@@ -5371,7 +5419,7 @@ void Field_timestamp::sql_type(String &res) const
int Field_timestamp::set_time()
{
set_notnull();
- store_TIME(get_thd()->query_start(), 0);
+ store_TIMESTAMP(Timestamp(get_thd()->query_start(), 0));
return 0;
}
@@ -5462,24 +5510,36 @@ static longlong read_lowendian(const uchar *from, uint bytes)
}
}
-void Field_timestamp_hires::store_TIME(my_time_t timestamp, ulong sec_part)
+void Field_timestamp_hires::store_TIMEVAL(const timeval &tv)
{
- mi_int4store(ptr, timestamp);
- store_bigendian(sec_part_shift(sec_part, dec), ptr+4, sec_part_bytes(dec));
+ mi_int4store(ptr, tv.tv_sec);
+ store_bigendian(sec_part_shift(tv.tv_usec, dec), ptr+4, sec_part_bytes(dec));
}
my_time_t Field_timestamp_hires::get_timestamp(const uchar *pos,
ulong *sec_part) const
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
*sec_part= (long)sec_part_unshift(read_bigendian(pos+4, sec_part_bytes(dec)), dec);
return mi_uint4korr(pos);
}
+
+bool Field_timestamp_hires::val_native(Native *to)
+{
+ DBUG_ASSERT(marked_for_read());
+ struct timeval tm;
+ tm.tv_sec= mi_uint4korr(ptr);
+ tm.tv_usec= (ulong) sec_part_unshift(read_bigendian(ptr+4, sec_part_bytes(dec)), dec);
+ return Timestamp_or_zero_datetime(Timestamp(tm), tm.tv_sec == 0).
+ to_native(to, dec);
+}
+
+
double Field_timestamp_with_dec::val_real(void)
{
MYSQL_TIME ltime;
- if (get_date(&ltime, TIME_NO_ZERO_DATE))
+ if (get_date(&ltime, Datetime::Options(TIME_NO_ZERO_DATE, get_thd())))
return 0;
return ltime.year * 1e10 + ltime.month * 1e8 +
@@ -5490,29 +5550,17 @@ double Field_timestamp_with_dec::val_real(void)
my_decimal *Field_timestamp_with_dec::val_decimal(my_decimal *d)
{
MYSQL_TIME ltime;
- get_date(&ltime, 0);
+ get_date(&ltime, date_mode_t(0));
return TIME_to_my_decimal(&ltime, d);
}
int Field_timestamp::store_decimal(const my_decimal *d)
{
- ulonglong nr;
- ulong sec_part;
int error;
- MYSQL_TIME ltime;
- longlong tmp;
THD *thd= get_thd();
ErrConvDecimal str(d);
-
- if (my_decimal2seconds(d, &nr, &sec_part))
- {
- tmp= -1;
- error= 2;
- }
- else
- tmp= number_to_datetime(nr, sec_part, &ltime, sql_mode_for_timestamp(thd),
- &error);
- return store_TIME_with_warning(thd, &ltime, &str, error, tmp != -1);
+ Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals());
+ return store_TIME_with_warning(thd, &dt, &str, error);
}
int Field_timestamp_with_dec::set_time()
@@ -5520,14 +5568,15 @@ int Field_timestamp_with_dec::set_time()
THD *thd= get_thd();
set_notnull();
// Avoid writing microseconds into binlog for FSP=0
- store_TIME(thd->query_start(), decimals() ? thd->query_start_sec_part() : 0);
+ ulong msec= decimals() ? thd->query_start_sec_part() : 0;
+ store_TIMESTAMP(Timestamp(thd->query_start(), msec).trunc(decimals()));
return 0;
}
bool Field_timestamp_with_dec::send_binary(Protocol *protocol)
{
MYSQL_TIME ltime;
- Field_timestamp::get_date(&ltime, 0);
+ Field_timestamp::get_date(&ltime, date_mode_t(0));
return protocol->store(&ltime, dec);
}
@@ -5556,19 +5605,15 @@ void Field_timestamp_with_dec::make_send_field(Send_field *field)
** MySQL-5.6 compatible TIMESTAMP(N)
**************************************************************/
-void Field_timestampf::store_TIME(my_time_t timestamp, ulong sec_part)
+void Field_timestampf::store_TIMEVAL(const timeval &tm)
{
- struct timeval tm;
- tm.tv_sec= timestamp;
- tm.tv_usec= sec_part;
- my_timeval_trunc(&tm, dec);
my_timestamp_to_binary(&tm, ptr, dec);
}
void Field_timestampf::set_max()
{
DBUG_ENTER("Field_timestampf::set_max");
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
DBUG_ASSERT(dec == TIME_SECOND_PART_DIGITS);
set_notnull();
@@ -5581,7 +5626,7 @@ void Field_timestampf::set_max()
bool Field_timestampf::is_max()
{
DBUG_ENTER("Field_timestampf::is_max");
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
DBUG_RETURN(mi_sint4korr(ptr) == TIMESTAMP_MAX_VALUE &&
mi_sint3korr(ptr + 4) == TIME_MAX_SECOND_PART);
@@ -5597,6 +5642,19 @@ my_time_t Field_timestampf::get_timestamp(const uchar *pos,
}
+bool Field_timestampf::val_native(Native *to)
+{
+ DBUG_ASSERT(marked_for_read());
+ // Check if it's '0000-00-00 00:00:00' rather than a real timestamp
+ if (ptr[0] == 0 && ptr[1] == 0 && ptr[2] == 0 && ptr[3] == 0)
+ {
+ to->length(0);
+ return false;
+ }
+ return Field::val_native(to);
+}
+
+
/*************************************************************/
sql_mode_t Field_temporal::can_handle_sql_mode_dependency_on_store() const
{
@@ -5604,16 +5662,16 @@ sql_mode_t Field_temporal::can_handle_sql_mode_dependency_on_store() const
}
-uint Field_temporal::is_equal(Create_field *new_field)
+bool Field_temporal::is_equal(const Column_definition &new_field) const
{
- return new_field->type_handler() == type_handler() &&
- new_field->length == max_display_length();
+ return new_field.type_handler() == type_handler() &&
+ new_field.length == max_display_length();
}
void Field_temporal::set_warnings(Sql_condition::enum_warning_level trunc_level,
const ErrConv *str, int was_cut,
- timestamp_type ts_type)
+ const char *typestr)
{
/*
error code logic:
@@ -5626,9 +5684,9 @@ void Field_temporal::set_warnings(Sql_condition::enum_warning_level trunc_level,
a DATE field and non-zero time part is thrown away.
*/
if (was_cut & MYSQL_TIME_WARN_TRUNCATED)
- set_datetime_warning(trunc_level, WARN_DATA_TRUNCATED, str, ts_type, 1);
+ set_datetime_warning(trunc_level, WARN_DATA_TRUNCATED, str, typestr, 1);
if (was_cut & MYSQL_TIME_WARN_OUT_OF_RANGE)
- set_datetime_warning(ER_WARN_DATA_OUT_OF_RANGE, str, ts_type, 1);
+ set_datetime_warning(ER_WARN_DATA_OUT_OF_RANGE, str, typestr, 1);
}
@@ -5642,107 +5700,68 @@ void Field_temporal::set_warnings(Sql_condition::enum_warning_level trunc_level,
3 Datetime value that was cut (warning level NOTE)
This is used by opt_range.cc:get_mm_leaf().
*/
-int Field_temporal_with_date::store_TIME_with_warning(MYSQL_TIME *ltime,
- const ErrConv *str,
- int was_cut,
- int have_smth_to_conv)
+int Field_datetime::store_TIME_with_warning(const Datetime *dt,
+ const ErrConv *str,
+ int was_cut)
{
- Sql_condition::enum_warning_level trunc_level= Sql_condition::WARN_LEVEL_WARN;
- int ret= 2;
-
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
-
- if (was_cut == 0 && have_smth_to_conv == 0) // special case: zero date
- {
- was_cut= MYSQL_TIME_WARN_OUT_OF_RANGE;
- }
- else if (!have_smth_to_conv)
- {
- bzero(ltime, sizeof(*ltime));
- was_cut= MYSQL_TIME_WARN_TRUNCATED;
- ret= 1;
- }
- else if (!MYSQL_TIME_WARN_HAVE_WARNINGS(was_cut) &&
- (MYSQL_TIME_WARN_HAVE_NOTES(was_cut) ||
- (type_handler()->mysql_timestamp_type() == MYSQL_TIMESTAMP_DATE &&
- (ltime->hour || ltime->minute || ltime->second || ltime->second_part))))
- {
- trunc_level= Sql_condition::WARN_LEVEL_NOTE;
- was_cut|= MYSQL_TIME_WARN_TRUNCATED;
- ret= 3;
- }
- set_warnings(trunc_level, str, was_cut,
- type_handler()->mysql_timestamp_type());
- store_TIME(ltime);
- return was_cut ? ret : 0;
+ DBUG_ASSERT(marked_for_write_or_computed());
+ // Handle totally bad values
+ if (!dt->is_valid_datetime())
+ return store_invalid_with_warning(str, was_cut, "datetime");
+ // Store the value
+ DBUG_ASSERT(!dt->fraction_remainder(decimals()));
+ store_datetime(*dt);
+ // Caclulate return value and send warnings if needed
+ return store_TIME_return_code_with_warnings(was_cut, str, "datetime");
}
-int Field_temporal_with_date::store(const char *from, size_t len, CHARSET_INFO *cs)
+int Field_datetime::store(const char *from, size_t len, CHARSET_INFO *cs)
{
- MYSQL_TIME ltime;
- MYSQL_TIME_STATUS status;
- THD *thd= get_thd();
+ MYSQL_TIME_STATUS st;
ErrConvString str(from, len, cs);
- bool func_res= !str_to_datetime(cs, from, len, &ltime,
- sql_mode_for_dates(thd),
- &status);
- return store_TIME_with_warning(&ltime, &str, status.warnings, func_res);
+ THD *thd= get_thd();
+ Datetime dt(thd, &st, from, len, cs, Datetime::Options(thd), decimals());
+ return store_TIME_with_warning(&dt, &str, st.warnings);
}
-
-int Field_temporal_with_date::store(double nr)
+int Field_datetime::store(double nr)
{
- int error= 0;
- MYSQL_TIME ltime;
- THD *thd= get_thd();
+ int error;
ErrConvDouble str(nr);
-
- longlong tmp= double_to_datetime(nr, &ltime,
- (uint) sql_mode_for_dates(thd), &error);
- return store_TIME_with_warning(&ltime, &str, error, tmp != -1);
+ THD *thd= get_thd();
+ Datetime dt(thd, &error, nr, Datetime::Options(thd), decimals());
+ return store_TIME_with_warning(&dt, &str, error);
}
-int Field_temporal_with_date::store(longlong nr, bool unsigned_val)
+int Field_datetime::store(longlong nr, bool unsigned_val)
{
int error;
- MYSQL_TIME ltime;
- longlong tmp;
+ Longlong_hybrid tmp(nr, unsigned_val);
+ ErrConvInteger str(tmp);
THD *thd= get_thd();
- ErrConvInteger str(nr, unsigned_val);
-
- tmp= number_to_datetime(nr, 0, &ltime, sql_mode_for_dates(thd), &error);
-
- return store_TIME_with_warning(&ltime, &str, error, tmp != -1);
+ Datetime dt(&error, tmp, Datetime::Options(thd));
+ return store_TIME_with_warning(&dt, &str, error);
}
-
-int Field_temporal_with_date::store_time_dec(const MYSQL_TIME *ltime, uint dec)
+int Field_datetime::store_time_dec(const MYSQL_TIME *ltime, uint dec)
{
- int error= 0, have_smth_to_conv= 1;
+ int error;
ErrConvTime str(ltime);
- MYSQL_TIME l_time;
+ THD *thd= get_thd();
+ Datetime dt(thd, &error, ltime, Datetime::Options(thd), decimals());
+ return store_TIME_with_warning(&dt, &str, error);
+}
- if (copy_or_convert_to_datetime(get_thd(), ltime, &l_time))
- {
- /*
- Set have_smth_to_conv and error in a way to have
- store_TIME_with_warning do bzero().
- */
- have_smth_to_conv= false;
- error= MYSQL_TIME_WARN_OUT_OF_RANGE;
- }
- else
- {
- /*
- We don't perform range checking here since values stored in TIME
- structure always fit into DATETIME range.
- */
- have_smth_to_conv= !check_date(&l_time, pack_time(&l_time) != 0,
- sql_mode_for_dates(get_thd()), &error);
- }
- return store_TIME_with_warning(&l_time, &str, error, have_smth_to_conv);
+
+int Field_datetime::store_decimal(const my_decimal *d)
+{
+ int error;
+ ErrConvDecimal str(d);
+ THD *thd= get_thd();
+ Datetime tm(thd, &error, d, Datetime::Options(thd), decimals());
+ return store_TIME_with_warning(&tm, &str, error);
}
@@ -5752,14 +5771,14 @@ Field_temporal_with_date::validate_value_in_record(THD *thd,
{
DBUG_ASSERT(!is_null_in_record(record));
MYSQL_TIME ltime;
- return get_TIME(&ltime, ptr_in_record(record), sql_mode_for_dates(thd));
+ return get_TIME(&ltime, ptr_in_record(record), Datetime::Options(thd));
}
my_decimal *Field_temporal::val_decimal(my_decimal *d)
{
MYSQL_TIME ltime;
- if (get_date(&ltime, 0))
+ if (get_date(&ltime, date_mode_t(0)))
{
bzero(&ltime, sizeof(ltime));
ltime.time_type= type_handler()->mysql_timestamp_type();
@@ -5792,26 +5811,27 @@ Item *Field_temporal::get_equal_const_item_datetime(THD *thd,
const_item->field_type() != MYSQL_TYPE_TIMESTAMP) ||
const_item->decimals != decimals())
{
- Datetime dt(thd, const_item, 0);
+ Datetime::Options opt(TIME_CONV_NONE, thd);
+ Datetime dt(thd, const_item, opt, decimals());
if (!dt.is_valid_datetime())
return NULL;
/*
See comments about truncation in the same place in
Field_time::get_equal_const_item().
*/
- return new (thd->mem_root) Item_datetime_literal(thd,
- dt.get_mysql_time(),
- decimals());
+ return new (thd->mem_root) Item_datetime_literal(thd, &dt, decimals());
}
break;
case ANY_SUBST:
if (!is_temporal_type_with_date(const_item->field_type()))
{
- Datetime dt(thd, const_item, TIME_FUZZY_DATES | TIME_INVALID_DATES);
+ Datetime dt= type_handler()->field_type() == MYSQL_TYPE_TIMESTAMP ?
+ Datetime(thd, const_item, Timestamp::DatetimeOptions(thd)) :
+ Datetime(thd, const_item, Datetime::Options_cmp(thd));
if (!dt.is_valid_datetime())
return NULL;
return new (thd->mem_root)
- Item_datetime_literal_for_invalid_dates(thd, dt.get_mysql_time(),
+ Item_datetime_literal_for_invalid_dates(thd, &dt,
dt.get_mysql_time()->
second_part ?
TIME_SECOND_PART_DIGITS : 0);
@@ -5828,36 +5848,26 @@ Item *Field_temporal::get_equal_const_item_datetime(THD *thd,
** In number context: HHMMSS
** Stored as a 3 byte unsigned int
****************************************************************************/
-int Field_time::store_TIME_with_warning(MYSQL_TIME *ltime,
- const ErrConv *str,
- int was_cut,
- int have_smth_to_conv)
+sql_mode_t
+Field_time::conversion_depends_on_sql_mode(THD *thd, Item *expr) const
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ return expr->time_precision(thd) > decimals() ?
+ MODE_TIME_ROUND_FRACTIONAL : 0;
+}
- if (!have_smth_to_conv)
- {
- bzero(ltime, sizeof(*ltime));
- store_TIME(ltime);
- set_warnings(Sql_condition::WARN_LEVEL_WARN, str, MYSQL_TIME_WARN_TRUNCATED);
- return 1;
- }
- if (ltime->year != 0 || ltime->month != 0)
- {
- ltime->year= ltime->month= ltime->day= 0;
- was_cut|= MYSQL_TIME_NOTE_TRUNCATED;
- }
- my_time_trunc(ltime, decimals());
- store_TIME(ltime);
- if (!MYSQL_TIME_WARN_HAVE_WARNINGS(was_cut) &&
- MYSQL_TIME_WARN_HAVE_NOTES(was_cut))
- {
- set_warnings(Sql_condition::WARN_LEVEL_NOTE, str,
- was_cut | MYSQL_TIME_WARN_TRUNCATED);
- return 3;
- }
- set_warnings(Sql_condition::WARN_LEVEL_WARN, str, was_cut);
- return was_cut ? 2 : 0;
+
+int Field_time::store_TIME_with_warning(const Time *t,
+ const ErrConv *str, int warn)
+{
+ DBUG_ASSERT(marked_for_write_or_computed());
+ // Handle totally bad values
+ if (!t->is_valid_time())
+ return store_invalid_with_warning(str, warn, "time");
+ // Store the value
+ DBUG_ASSERT(!t->fraction_remainder(decimals()));
+ store_TIME(*t);
+ // Calculate return value and send warnings if needed
+ return store_TIME_return_code_with_warnings(warn, str, "time");
}
@@ -5874,88 +5884,56 @@ void Field_time::store_TIME(const MYSQL_TIME *ltime)
int Field_time::store(const char *from,size_t len,CHARSET_INFO *cs)
{
- MYSQL_TIME ltime;
- MYSQL_TIME_STATUS status;
ErrConvString str(from, len, cs);
- bool have_smth_to_conv=
- !str_to_time(cs, from, len, &ltime, sql_mode_for_dates(get_thd()),
- &status);
-
- return store_TIME_with_warning(&ltime, &str,
- status.warnings, have_smth_to_conv);
-}
-
-
-/**
- subtract a given number of days from DATETIME, return TIME
-
- optimized version of calc_time_diff()
-
- @note it might generate TIME values outside of the valid TIME range!
-*/
-static void calc_datetime_days_diff(MYSQL_TIME *ltime, long days)
-{
- long daydiff= calc_daynr(ltime->year, ltime->month, ltime->day) - days;
- ltime->year= ltime->month= 0;
- if (daydiff >=0 )
- {
- ltime->day= daydiff;
- ltime->time_type= MYSQL_TIMESTAMP_TIME;
- }
- else
- {
- longlong timediff= ((((daydiff * 24LL +
- ltime->hour) * 60LL +
- ltime->minute) * 60LL +
- ltime->second) * 1000000LL +
- ltime->second_part);
- unpack_time(timediff, ltime, MYSQL_TIMESTAMP_TIME);
- }
+ MYSQL_TIME_STATUS st;
+ THD *thd= get_thd();
+ /*
+ Unlike number-to-time conversion, we need to additionally pass
+ MODE_NO_ZERO_DATE here (if it presents in the current sql_mode):
+ SET sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE';
+ INSERT INTO t1 VALUES ('0000-00-00 00:00:00'); -- error
+ INSERT INTO t1 VALUES (0); -- ok
+ In the first INSERT we have a zero date.
+ In the second INSERT we don't have a zero date (it is just a zero time).
+ */
+ Time::Options opt(sql_mode_for_dates(thd), thd);
+ Time tm(thd, &st, from, len, cs, opt, decimals());
+ return store_TIME_with_warning(&tm, &str, st.warnings);
}
int Field_time::store_time_dec(const MYSQL_TIME *ltime, uint dec)
{
- MYSQL_TIME l_time= *ltime;
ErrConvTime str(ltime);
- int was_cut= 0;
-
- if (curdays && l_time.time_type != MYSQL_TIMESTAMP_TIME)
- calc_datetime_days_diff(&l_time, curdays);
-
- int have_smth_to_conv= !check_time_range(&l_time, decimals(), &was_cut);
- return store_TIME_with_warning(&l_time, &str, was_cut, have_smth_to_conv);
+ int warn;
+ Time tm(&warn, ltime, curdays, Time::Options(get_thd()), decimals());
+ return store_TIME_with_warning(&tm, &str, warn);
}
int Field_time::store(double nr)
{
- MYSQL_TIME ltime;
ErrConvDouble str(nr);
int was_cut;
- bool neg= nr < 0;
- if (neg)
- nr= -nr;
- int have_smth_to_conv= !number_to_time(neg, (ulonglong) nr,
- (ulong)((nr - floor(nr)) * TIME_SECOND_PART_FACTOR),
- &ltime, &was_cut);
-
- return store_TIME_with_warning(&ltime, &str, was_cut, have_smth_to_conv);
+ Time tm(get_thd(), &was_cut, nr, Time::Options(get_thd()), decimals());
+ return store_TIME_with_warning(&tm, &str, was_cut);
}
int Field_time::store(longlong nr, bool unsigned_val)
{
- MYSQL_TIME ltime;
- ErrConvInteger str(nr, unsigned_val);
+ Longlong_hybrid tmp(nr, unsigned_val);
+ ErrConvInteger str(tmp);
int was_cut;
- if (nr < 0 && unsigned_val)
- nr= 99991231235959LL + 1;
- int have_smth_to_conv= !number_to_time(nr < 0,
- (ulonglong) (nr < 0 ? -nr : nr),
- 0, &ltime, &was_cut);
-
- return store_TIME_with_warning(&ltime, &str, was_cut, have_smth_to_conv);
+ THD *thd= get_thd();
+ /*
+ Need fractional digit truncation if nr overflows to '838:59:59.999999'.
+ The constructor used below will always truncate (never round).
+ We don't need to care to overwrite the default session rounding mode
+ from HALF_UP to TRUNCATE.
+ */
+ Time tm(thd, &was_cut, tmp, Time::Options(thd), decimals());
+ return store_TIME_with_warning(&tm, &str, was_cut);
}
@@ -5983,14 +5961,14 @@ Field *Field_time::new_key_field(MEM_ROOT *root, TABLE *new_table,
double Field_time::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
uint32 j= (uint32) uint3korr(ptr);
return (double) j;
}
longlong Field_time::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return (longlong) sint3korr(ptr);
}
@@ -6004,9 +5982,9 @@ longlong Field_time::val_int(void)
String *Field_time::val_str(String *str,
String *unused __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
MYSQL_TIME ltime;
- get_date(&ltime, TIME_TIME_ONLY);
+ get_date(&ltime, Datetime::Options(TIME_TIME_ONLY, get_thd()));
str->alloc(field_length + 1);
str->length(my_time_to_str(&ltime, const_cast<char*>(str->ptr()), decimals()));
str->set_charset(&my_charset_numeric);
@@ -6014,9 +5992,10 @@ String *Field_time::val_str(String *str,
}
-bool Field_time::check_zero_in_date_with_warn(ulonglong fuzzydate)
+bool Field_time::check_zero_in_date_with_warn(date_mode_t fuzzydate)
{
- if (!(fuzzydate & TIME_TIME_ONLY) && (fuzzydate & TIME_NO_ZERO_IN_DATE))
+ date_conv_mode_t tmp= date_conv_mode_t(fuzzydate);
+ if (!(tmp & TIME_TIME_ONLY) && (tmp & TIME_NO_ZERO_IN_DATE))
{
THD *thd= get_thd();
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
@@ -6036,7 +6015,7 @@ bool Field_time::check_zero_in_date_with_warn(ulonglong fuzzydate)
DATE_FORMAT(time, "%l.%i %p")
*/
-bool Field_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Field_time::get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if (check_zero_in_date_with_warn(fuzzydate))
return true;
@@ -6058,10 +6037,28 @@ bool Field_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
}
+int Field_time::store_native(const Native &value)
+{
+ Time t(value);
+ DBUG_ASSERT(t.is_valid_time());
+ store_TIME(t);
+ return 0;
+}
+
+
+bool Field_time::val_native(Native *to)
+{
+ MYSQL_TIME ltime;
+ get_date(&ltime, date_mode_t(0));
+ int warn;
+ return Time(&warn, &ltime, 0).to_native(to, decimals());
+}
+
+
bool Field_time::send_binary(Protocol *protocol)
{
MYSQL_TIME ltime;
- get_date(&ltime, TIME_TIME_ONLY);
+ get_date(&ltime, Time::Options(TIME_TIME_ONLY, get_thd()));
return protocol->store_time(&ltime, decimals());
}
@@ -6110,16 +6107,10 @@ void Field_time_hires::store_TIME(const MYSQL_TIME *ltime)
int Field_time::store_decimal(const my_decimal *d)
{
- ulonglong nr;
- ulong sec_part;
ErrConvDecimal str(d);
- MYSQL_TIME ltime;
int was_cut;
- bool neg= my_decimal2seconds(d, &nr, &sec_part);
-
- int have_smth_to_conv= !number_to_time(neg, nr, sec_part, &ltime, &was_cut);
-
- return store_TIME_with_warning(&ltime, &str, was_cut, have_smth_to_conv);
+ Time tm(get_thd(), &was_cut, d, Time::Options(get_thd()), decimals());
+ return store_TIME_with_warning(&tm, &str, was_cut);
}
@@ -6159,14 +6150,27 @@ bool Field_time::can_be_substituted_to_equal_item(const Context &ctx,
Item *Field_time::get_equal_const_item(THD *thd, const Context &ctx,
Item *const_item)
{
+ /*
+ Old mode conversion from DATETIME with non-zero YYYYMMDD part
+ to TIME works very inconsistently. Possible variants:
+ - truncate the YYYYMMDD part
+ - add (MM*33+DD)*24 to hours
+ - add (MM*31+DD)*24 to hours
+ Let's disallow propagation of DATETIME with non-zero YYYYMMDD
+ as an equal constant for a TIME field.
+ */
+ Time::datetime_to_time_mode_t mode=
+ (thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST) ?
+ Time::DATETIME_TO_TIME_YYYYMMDD_00000000_ONLY :
+ Time::DATETIME_TO_TIME_MINUS_CURRENT_DATE;
+
switch (ctx.subst_constraint()) {
case ANY_SUBST:
if (const_item->field_type() != MYSQL_TYPE_TIME)
{
- MYSQL_TIME ltime;
// Get the value of const_item with conversion from DATETIME to TIME
- ulonglong fuzzydate= Time::comparison_flags_for_get_date();
- if (const_item->get_time_with_conversion(thd, &ltime, fuzzydate))
+ Time tm(get_thd(), const_item, Time::Options_cmp(thd, mode));
+ if (!tm.is_valid_time())
return NULL;
/*
Replace a DATE/DATETIME constant to a TIME constant:
@@ -6178,8 +6182,9 @@ Item *Field_time::get_equal_const_item(THD *thd, const Context &ctx,
(assuming CURRENT_DATE is '2015-08-30'
*/
- return new (thd->mem_root) Item_time_literal(thd, &ltime,
- ltime.second_part ?
+ return new (thd->mem_root) Item_time_literal(thd, &tm,
+ tm.get_mysql_time()->
+ second_part ?
TIME_SECOND_PART_DIGITS :
0);
}
@@ -6188,9 +6193,6 @@ Item *Field_time::get_equal_const_item(THD *thd, const Context &ctx,
if (const_item->field_type() != MYSQL_TYPE_TIME ||
const_item->decimals != decimals())
{
- MYSQL_TIME ltime;
- if (const_item->get_time_with_conversion(thd, &ltime, TIME_TIME_ONLY))
- return NULL;
/*
Note, the value returned in "ltime" can have more fractional
digits that decimals(). The Item_time_literal constructor will
@@ -6205,7 +6207,11 @@ Item *Field_time::get_equal_const_item(THD *thd, const Context &ctx,
The optimized WHERE will return with "Impossible WHERE", without
having to do the full table scan.
*/
- return new (thd->mem_root) Item_time_literal(thd, &ltime, decimals());
+ Time tm(thd, const_item, Time::Options(TIME_TIME_ONLY, thd, mode),
+ decimals());
+ if (!tm.is_valid_time())
+ return NULL;
+ return new (thd->mem_root) Item_time_literal(thd, &tm, decimals());
}
break;
}
@@ -6215,22 +6221,22 @@ Item *Field_time::get_equal_const_item(THD *thd, const Context &ctx,
longlong Field_time_with_dec::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
MYSQL_TIME ltime;
- get_date(&ltime, TIME_TIME_ONLY);
+ get_date(&ltime, Time::Options(TIME_TIME_ONLY, get_thd()));
longlong val= TIME_to_ulonglong_time(&ltime);
return ltime.neg ? -val : val;
}
double Field_time_with_dec::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
MYSQL_TIME ltime;
- get_date(&ltime, TIME_TIME_ONLY);
+ get_date(&ltime, Time::Options(TIME_TIME_ONLY, get_thd()));
return TIME_to_double(&ltime);
}
-bool Field_time_hires::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Field_time_hires::get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if (check_zero_in_date_with_warn(fuzzydate))
return true;
@@ -6282,7 +6288,7 @@ void Field_timef::store_TIME(const MYSQL_TIME *ltime)
my_time_packed_to_binary(tmp, ptr, dec);
}
-bool Field_timef::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Field_timef::get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if (check_zero_in_date_with_warn(fuzzydate))
return true;
@@ -6291,6 +6297,33 @@ bool Field_timef::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
return false;
}
+
+longlong Field_timef::val_time_packed(THD *thd)
+{
+ DBUG_ASSERT(marked_for_read());
+ longlong tmp= my_time_packed_from_binary(ptr, dec);
+ MYSQL_TIME ltime;
+ TIME_from_longlong_time_packed(&ltime, tmp);
+ return pack_time(&ltime);
+}
+
+
+int Field_timef::store_native(const Native &value)
+{
+ DBUG_ASSERT(value.length() == my_time_binary_length(dec));
+ DBUG_ASSERT(Time(value).is_valid_time());
+ memcpy(ptr, value.ptr(), value.length());
+ return 0;
+}
+
+
+bool Field_timef::val_native(Native *to)
+{
+ uint32 binlen= my_time_binary_length(dec);
+ return to->copy((const char*) ptr, binlen);
+}
+
+
/****************************************************************************
** year type
** Save in a byte the year 0, 1901->2155
@@ -6299,7 +6332,7 @@ bool Field_timef::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
int Field_year::store(const char *from, size_t len,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
THD *thd= get_thd();
char *end;
int error;
@@ -6355,7 +6388,7 @@ int Field_year::store(double nr)
int Field_year::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
if (nr < 0 || (nr >= 100 && nr <= 1900) || nr > 2155)
{
*ptr= 0;
@@ -6380,13 +6413,14 @@ int Field_year::store_time_dec(const MYSQL_TIME *ltime, uint dec_arg)
if (Field_year::store(ltime->year, 0))
return 1;
- set_datetime_warning(WARN_DATA_TRUNCATED, &str, ltime->time_type, 1);
+ const char *typestr= Temporal::type_name_by_timestamp_type(ltime->time_type);
+ set_datetime_warning(WARN_DATA_TRUNCATED, &str, typestr, 1);
return 0;
}
bool Field_year::send_binary(Protocol *protocol)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
ulonglong tmp= Field_year::val_int();
return protocol->store_short(tmp);
}
@@ -6400,7 +6434,7 @@ double Field_year::val_real(void)
longlong Field_year::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
DBUG_ASSERT(field_length == 2 || field_length == 4);
int tmp= (int) ptr[0];
if (field_length != 4)
@@ -6424,12 +6458,13 @@ String *Field_year::val_str(String *val_buffer,
}
-bool Field_year::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Field_year::get_date(MYSQL_TIME *ltime,date_mode_t fuzzydate)
{
int tmp= (int) ptr[0];
if (tmp || field_length != 4)
tmp+= 1900;
- return int_to_datetime_with_warn(false, tmp * 10000,
+ return int_to_datetime_with_warn(get_thd(),
+ Longlong_hybrid(tmp * 10000, true),
ltime, fuzzydate, table->s, field_name.str);
}
@@ -6442,6 +6477,71 @@ void Field_year::sql_type(String &res) const
}
+/*****************************************************************************/
+
+int Field_date_common::store_TIME_with_warning(const Datetime *dt,
+ const ErrConv *str,
+ int was_cut)
+{
+ DBUG_ASSERT(marked_for_write_or_computed());
+ // Handle totally bad values
+ if (!dt->is_valid_datetime())
+ return store_invalid_with_warning(str, was_cut, "date");
+ // Store the value
+ if (!dt->hhmmssff_is_zero())
+ was_cut|= MYSQL_TIME_NOTE_TRUNCATED;
+ store_datetime(*dt);
+ // Caclulate return value and send warnings if needed
+ return store_TIME_return_code_with_warnings(was_cut, str, "date");
+}
+
+int Field_date_common::store(const char *from, size_t len, CHARSET_INFO *cs)
+{
+ MYSQL_TIME_STATUS st;
+ ErrConvString str(from, len, cs);
+ THD *thd= get_thd();
+ Datetime dt(thd, &st, from, len, cs, Date::Options(thd), 0);
+ return store_TIME_with_warning(&dt, &str, st.warnings);
+}
+
+int Field_date_common::store(double nr)
+{
+ int error;
+ ErrConvDouble str(nr);
+ THD *thd= get_thd();
+ Datetime dt(thd, &error, nr, Date::Options(thd), 0);
+ return store_TIME_with_warning(&dt, &str, error);
+}
+
+int Field_date_common::store(longlong nr, bool unsigned_val)
+{
+ int error;
+ Longlong_hybrid tmp(nr, unsigned_val);
+ ErrConvInteger str(tmp);
+ THD *thd= get_thd();
+ Datetime dt(&error, tmp, Date::Options(thd));
+ return store_TIME_with_warning(&dt, &str, error);
+}
+
+int Field_date_common::store_time_dec(const MYSQL_TIME *ltime, uint dec)
+{
+ int error;
+ ErrConvTime str(ltime);
+ THD *thd= get_thd();
+ Datetime dt(thd, &error, ltime, Date::Options(thd), 0);
+ return store_TIME_with_warning(&dt, &str, error);
+}
+
+int Field_date_common::store_decimal(const my_decimal *d)
+{
+ int error;
+ ErrConvDecimal str(d);
+ THD *thd= get_thd();
+ Datetime tm(thd, &error, d, Date::Options(thd), 0);
+ return store_TIME_with_warning(&tm, &str, error);
+}
+
+
/****************************************************************************
** date type
** In string context: YYYY-MM-DD
@@ -6449,7 +6549,7 @@ void Field_year::sql_type(String &res) const
** Stored as a 4 byte unsigned int
****************************************************************************/
-void Field_date::store_TIME(MYSQL_TIME *ltime)
+void Field_date::store_TIME(const MYSQL_TIME *ltime)
{
uint tmp= ltime->year*10000L + ltime->month*100+ltime->day;
int4store(ptr,tmp);
@@ -6468,7 +6568,7 @@ bool Field_date::send_binary(Protocol *protocol)
double Field_date::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int32 j;
j=sint4korr(ptr);
return (double) (uint32) j;
@@ -6477,7 +6577,7 @@ double Field_date::val_real(void)
longlong Field_date::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int32 j;
j=sint4korr(ptr);
return (longlong) (uint32) j;
@@ -6485,9 +6585,9 @@ longlong Field_date::val_int(void)
bool Field_date::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int32 tmp= sint4korr(pos);
ltime->year= (int) ((uint32) tmp/10000L % 10000);
ltime->month= (int) ((uint32) tmp/100 % 100);
@@ -6502,7 +6602,7 @@ String *Field_date::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
MYSQL_TIME ltime;
- get_TIME(&ltime, ptr, 0);
+ get_TIME(&ltime, ptr, date_mode_t(0));
val_buffer->alloc(MAX_DATE_STRING_REP_LENGTH);
uint length= (uint) my_date_to_str(&ltime,
const_cast<char*>(val_buffer->ptr()));
@@ -6542,7 +6642,7 @@ void Field_date::sql_type(String &res) const
** In number context: YYYYMMDD
****************************************************************************/
-void Field_newdate::store_TIME(MYSQL_TIME *ltime)
+void Field_newdate::store_TIME(const MYSQL_TIME *ltime)
{
uint tmp= ltime->year*16*32 + ltime->month*32+ltime->day;
int3store(ptr,tmp);
@@ -6552,21 +6652,21 @@ void Field_newdate::store_TIME(MYSQL_TIME *ltime)
bool Field_newdate::send_binary(Protocol *protocol)
{
MYSQL_TIME tm;
- Field_newdate::get_date(&tm,0);
+ Field_newdate::get_date(&tm, date_mode_t(0));
return protocol->store_date(&tm);
}
double Field_newdate::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return (double) Field_newdate::val_int();
}
longlong Field_newdate::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
ulong j= uint3korr(ptr);
j= (j % 32L)+(j / 32L % 16L)*100L + (j/(16L*32L))*10000L;
return (longlong) j;
@@ -6576,7 +6676,7 @@ longlong Field_newdate::val_int(void)
String *Field_newdate::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
val_buffer->alloc(field_length);
val_buffer->length(field_length);
uint32 tmp=(uint32) uint3korr(ptr);
@@ -6604,9 +6704,9 @@ String *Field_newdate::val_str(String *val_buffer,
bool Field_newdate::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
uint32 tmp=(uint32) uint3korr(pos);
ltime->day= tmp & 31;
ltime->month= (tmp >> 5) & 15;
@@ -6617,6 +6717,14 @@ bool Field_newdate::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
}
+longlong Field_newdate::val_datetime_packed(THD *thd)
+{
+ MYSQL_TIME ltime;
+ Field_newdate::get_date(&ltime, date_mode_t(0));
+ return pack_time(&ltime);
+}
+
+
int Field_newdate::cmp(const uchar *a_ptr, const uchar *b_ptr)
{
uint32 a,b;
@@ -6647,8 +6755,14 @@ Item *Field_newdate::get_equal_const_item(THD *thd, const Context &ctx,
case ANY_SUBST:
if (!is_temporal_type_with_date(const_item->field_type()))
{
- // Get the value of const_item with conversion from TIME to DATETIME
- Datetime dt(thd, const_item, TIME_FUZZY_DATES | TIME_INVALID_DATES);
+ /*
+ DATE is compared to DATETIME-alike non-temporal values
+ (such as VARCHAR, DECIMAL) as DATETIME, e.g.:
+ WHERE date_column=20010101235959.0000009
+ So here we convert the constant to DATETIME normally.
+ In case if TIME_ROUND_FRACTIONAL is enabled, nanoseconds will round.
+ */
+ Datetime dt(thd, const_item, Datetime::Options_cmp(thd));
if (!dt.is_valid_datetime())
return NULL;
/*
@@ -6664,21 +6778,28 @@ Item *Field_newdate::get_equal_const_item(THD *thd, const Context &ctx,
*/
if (!dt.hhmmssff_is_zero())
return new (thd->mem_root)
- Item_datetime_literal_for_invalid_dates(thd, dt.get_mysql_time(),
+ Item_datetime_literal_for_invalid_dates(thd, &dt,
dt.get_mysql_time()->
second_part ?
TIME_SECOND_PART_DIGITS : 0);
- return new (thd->mem_root)
- Item_date_literal_for_invalid_dates(thd, Date(&dt).get_mysql_time());
+ Date d(&dt);
+ return new (thd->mem_root) Item_date_literal_for_invalid_dates(thd, &d);
}
break;
case IDENTITY_SUBST:
if (const_item->field_type() != MYSQL_TYPE_DATE)
{
- Date d(thd, const_item, 0);
- if (!d.is_valid_date())
+ /*
+ DATE is compared to non-temporal as DATETIME.
+ We need to convert to DATETIME first, taking into account the
+ current session rounding mode (even though this is IDENTITY_SUBSTS!),
+ then convert the result to DATE.
+ */
+ Datetime dt(thd, const_item, Datetime::Options(TIME_CONV_NONE, thd));
+ if (!dt.is_valid_datetime())
return NULL;
- return new (thd->mem_root) Item_date_literal(thd, d.get_mysql_time());
+ Date d(&dt);
+ return new (thd->mem_root) Item_date_literal(thd, &d);
}
break;
}
@@ -6693,16 +6814,25 @@ Item *Field_newdate::get_equal_const_item(THD *thd, const Context &ctx,
** Stored as a 8 byte unsigned int. Should sometimes be change to a 6 byte int.
****************************************************************************/
-void Field_datetime::store_TIME(MYSQL_TIME *ltime)
+void Field_datetime::store_TIME(const MYSQL_TIME *ltime)
{
ulonglong tmp= TIME_to_ulonglong_datetime(ltime);
int8store(ptr,tmp);
}
+
+sql_mode_t
+Field_datetime::conversion_depends_on_sql_mode(THD *thd, Item *expr) const
+{
+ return expr->datetime_precision(thd) > decimals() ?
+ MODE_TIME_ROUND_FRACTIONAL : 0;
+}
+
+
bool Field_datetime::send_binary(Protocol *protocol)
{
MYSQL_TIME tm;
- Field_datetime::get_date(&tm, 0);
+ Field_datetime::get_date(&tm, date_mode_t(0));
return protocol->store(&tm, 0);
}
@@ -6714,7 +6844,7 @@ double Field_datetime::val_real(void)
longlong Field_datetime::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
longlong j;
j=sint8korr(ptr);
return j;
@@ -6727,7 +6857,7 @@ String *Field_datetime::val_str(String *val_buffer,
val_buffer->alloc(field_length);
val_buffer->length(field_length);
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
ulonglong tmp;
long part1,part2;
char *pos;
@@ -6768,9 +6898,9 @@ String *Field_datetime::val_str(String *val_buffer,
}
bool Field_datetime::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
longlong tmp= sint8korr(pos);
uint32 part1,part2;
part1=(uint32) (tmp/1000000LL);
@@ -6827,48 +6957,28 @@ void Field_datetime::sql_type(String &res) const
int Field_datetime::set_time()
{
THD *thd= table->in_use;
- MYSQL_TIME now_time;
- thd->variables.time_zone->gmt_sec_to_TIME(&now_time, thd->query_start());
- now_time.second_part= thd->query_start_sec_part();
set_notnull();
- store_TIME(&now_time);
- thd->time_zone_used= 1;
+ // Here we always truncate (not round), no matter what sql_mode is
+ if (decimals())
+ store_datetime(Datetime(thd, Timeval(thd->query_start(),
+ thd->query_start_sec_part())
+ ).trunc(decimals()));
+ else
+ store_datetime(Datetime(thd, Timeval(thd->query_start(), 0)));
return 0;
}
-void Field_datetime_hires::store_TIME(MYSQL_TIME *ltime)
+void Field_datetime_hires::store_TIME(const MYSQL_TIME *ltime)
{
ulonglong packed= sec_part_shift(pack_time(ltime), dec);
store_bigendian(packed, ptr, Field_datetime_hires::pack_length());
}
-int Field_temporal_with_date::store_decimal(const my_decimal *d)
-{
- ulonglong nr;
- ulong sec_part;
- int error;
- MYSQL_TIME ltime;
- longlong tmp;
- THD *thd= get_thd();
- ErrConvDecimal str(d);
-
- if (my_decimal2seconds(d, &nr, &sec_part))
- {
- tmp= -1;
- error= 2;
- }
- else
- tmp= number_to_datetime(nr, sec_part, &ltime, sql_mode_for_dates(thd),
- &error);
-
- return store_TIME_with_warning(&ltime, &str, error, tmp != -1);
-}
-
bool Field_datetime_with_dec::send_binary(Protocol *protocol)
{
MYSQL_TIME ltime;
- get_date(&ltime, 0);
+ get_date(&ltime, date_mode_t(0));
return protocol->store(&ltime, dec);
}
@@ -6876,14 +6986,14 @@ bool Field_datetime_with_dec::send_binary(Protocol *protocol)
double Field_datetime_with_dec::val_real(void)
{
MYSQL_TIME ltime;
- get_date(&ltime, 0);
+ get_date(&ltime, date_mode_t(0));
return TIME_to_double(&ltime);
}
longlong Field_datetime_with_dec::val_int(void)
{
MYSQL_TIME ltime;
- get_date(&ltime, 0);
+ get_date(&ltime, date_mode_t(0));
return TIME_to_ulonglong_datetime(&ltime);
}
@@ -6892,7 +7002,7 @@ String *Field_datetime_with_dec::val_str(String *str,
String *unused __attribute__((unused)))
{
MYSQL_TIME ltime;
- get_date(&ltime, 0);
+ get_date(&ltime, date_mode_t(0));
str->alloc(field_length+1);
str->length(field_length);
my_datetime_to_str(&ltime, (char*) str->ptr(), dec);
@@ -6902,9 +7012,9 @@ String *Field_datetime_with_dec::val_str(String *str,
bool Field_datetime_hires::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
ulonglong packed= read_bigendian(pos, Field_datetime_hires::pack_length());
unpack_time(sec_part_unshift(packed, dec), ltime, MYSQL_TIMESTAMP_DATETIME);
return validate_MMDD(packed, ltime->month, ltime->day, fuzzydate);
@@ -6935,22 +7045,31 @@ int Field_datetimef::reset()
return 0;
}
-void Field_datetimef::store_TIME(MYSQL_TIME *ltime)
+void Field_datetimef::store_TIME(const MYSQL_TIME *ltime)
{
- my_time_trunc(ltime, decimals());
longlong tmp= TIME_to_longlong_datetime_packed(ltime);
my_datetime_packed_to_binary(tmp, ptr, dec);
}
bool Field_datetimef::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
longlong tmp= my_datetime_packed_from_binary(pos, dec);
TIME_from_longlong_datetime_packed(ltime, tmp);
return validate_MMDD(tmp, ltime->month, ltime->day, fuzzydate);
}
+longlong Field_datetimef::val_datetime_packed(THD *thd)
+{
+ DBUG_ASSERT(marked_for_read());
+ longlong tmp= my_datetime_packed_from_binary(ptr, dec);
+ MYSQL_TIME ltime;
+ TIME_from_longlong_datetime_packed(&ltime, tmp);
+ return pack_time(&ltime);
+}
+
+
/****************************************************************************
** string type
** A string may be varchar or binary
@@ -6995,6 +7114,7 @@ Field_longstr::check_string_copy_error(const String_copier *copier,
/* Ignore errors from internal expressions */
if (get_thd()->count_cuted_fields > CHECK_FIELD_EXPRESSION)
{
+ DBUG_ASSERT(sizeof(tmp) >= convert_to_printable_required_length(6));
convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
set_warning_truncated_wrong_value("string", tmp);
}
@@ -7053,7 +7173,7 @@ Field_longstr::report_if_important_data(const char *pstr, const char *end,
int Field_string::store(const char *from, size_t length,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
uint copy_length;
int rc;
@@ -7099,7 +7219,7 @@ int Field_str::store(longlong nr, bool unsigned_val)
int Field_str::store(double nr)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
char buff[DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE];
uint local_char_length= MY_MIN(sizeof(buff),
field_length / field_charset->mbmaxlen);
@@ -7120,25 +7240,20 @@ int Field_str::store(double nr)
return store(buff, (uint)length, &my_charset_numeric);
}
-uint Field::is_equal(Create_field *new_field)
-{
- return new_field->type_handler() == type_handler();
-}
-
-
-uint Field_str::is_equal(Create_field *new_field)
+bool Field_string::is_equal(const Column_definition &new_field) const
{
- return new_field->type_handler() == type_handler() &&
- new_field->charset == field_charset &&
- new_field->length == max_display_length();
+ DBUG_ASSERT(!compression_method());
+ return new_field.type_handler() == type_handler() &&
+ new_field.char_length == char_length() &&
+ new_field.charset == field_charset &&
+ new_field.length == max_display_length();
}
int Field_longstr::store_decimal(const my_decimal *d)
{
- char buff[DECIMAL_MAX_STR_LENGTH+1];
- String str(buff, sizeof(buff), &my_charset_numeric);
- my_decimal2string(E_DEC_FATAL_ERROR, d, 0, 0, 0, &str);
+ StringBuffer<DECIMAL_MAX_STR_LENGTH+1> str;
+ d->to_string(&str);
return store(str.ptr(), str.length(), str.charset());
}
@@ -7222,7 +7337,7 @@ Field_string::Warn_filter_string::Warn_filter_string(const THD *thd,
double Field_string::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
return Converter_strntod_with_warn(get_thd(),
Warn_filter_string(thd, this),
@@ -7234,7 +7349,7 @@ double Field_string::val_real(void)
longlong Field_string::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
return Converter_strntoll_with_warn(thd, Warn_filter_string(thd, this),
Field_string::charset(),
@@ -7258,7 +7373,7 @@ sql_mode_t Field_string::can_handle_sql_mode_dependency_on_store() const
String *Field_string::val_str(String *val_buffer __attribute__((unused)),
String *val_ptr)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
/* See the comment for Field_long::store(long long) */
DBUG_ASSERT(!table || table->in_use == current_thd);
size_t length;
@@ -7276,7 +7391,7 @@ String *Field_string::val_str(String *val_buffer __attribute__((unused)),
my_decimal *Field_string::val_decimal(my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
Converter_str2my_decimal_with_warn(thd,
Warn_filter_string(thd, this),
@@ -7324,23 +7439,10 @@ Field_string::compatible_field_size(uint field_metadata,
int Field_string::cmp(const uchar *a_ptr, const uchar *b_ptr)
{
- size_t a_len, b_len;
-
- if (field_charset->mbmaxlen != 1)
- {
- size_t char_len= field_length/field_charset->mbmaxlen;
- a_len= my_charpos(field_charset, a_ptr, a_ptr + field_length, char_len);
- b_len= my_charpos(field_charset, b_ptr, b_ptr + field_length, char_len);
- }
- else
- a_len= b_len= field_length;
- /*
- We have to remove end space to be able to compare multi-byte-characters
- like in latin_de 'ae' and 0xe4
- */
- return field_charset->coll->strnncollsp(field_charset,
- a_ptr, a_len,
- b_ptr, b_len);
+ return field_charset->coll->strnncollsp_nchars(field_charset,
+ a_ptr, field_length,
+ b_ptr, field_length,
+ Field_string::char_length());
}
@@ -7367,11 +7469,12 @@ void Field_string::sql_type(String &res) const
size_t length;
length= cs->cset->snprintf(cs,(char*) res.ptr(),
- res.alloced_length(), "%s(%d)",
+ res.alloced_length(), "%s(%d)%s",
(type() == MYSQL_TYPE_VAR_STRING ?
(has_charset() ? "varchar" : "varbinary") :
(has_charset() ? "char" : "binary")),
- (int) field_length / charset()->mbmaxlen);
+ (int) field_length / charset()->mbmaxlen,
+ type() == MYSQL_TYPE_VAR_STRING ? "/*old*/" : "");
res.length(length);
if ((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)) &&
has_charset() && (charset()->state & MY_CS_BINSORT))
@@ -7641,7 +7744,7 @@ bool Field_varstring::memcpy_field_possible(const Field *from) const
int Field_varstring::store(const char *from,size_t length,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
uint copy_length;
int rc;
@@ -7658,7 +7761,7 @@ int Field_varstring::store(const char *from,size_t length,CHARSET_INFO *cs)
double Field_varstring::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
return Converter_strntod_with_warn(thd, Warn_filter(thd),
Field_varstring::charset(),
@@ -7669,7 +7772,7 @@ double Field_varstring::val_real(void)
longlong Field_varstring::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
return Converter_strntoll_with_warn(thd, Warn_filter(thd),
Field_varstring::charset(),
@@ -7681,7 +7784,7 @@ longlong Field_varstring::val_int(void)
String *Field_varstring::val_str(String *val_buffer __attribute__((unused)),
String *val_ptr)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
val_ptr->set((const char*) get_data(), get_length(), field_charset);
return val_ptr;
}
@@ -7689,7 +7792,7 @@ String *Field_varstring::val_str(String *val_buffer __attribute__((unused)),
my_decimal *Field_varstring::val_decimal(my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
Converter_str2my_decimal_with_warn(thd, Warn_filter(thd),
E_DEC_FATAL_ERROR & ~E_DEC_BAD_NUM,
@@ -7738,19 +7841,6 @@ int Field_varstring::cmp(const uchar *a_ptr, const uchar *b_ptr)
}
-static int cmp_str_prefix(const uchar *ua, size_t alen, const uchar *ub,
- size_t blen, size_t prefix, CHARSET_INFO *cs)
-{
- const char *a= (char*)ua, *b= (char*)ub;
- MY_STRCOPY_STATUS status;
- prefix/= cs->mbmaxlen;
- alen= cs->cset->well_formed_char_length(cs, a, a + alen, prefix, &status);
- blen= cs->cset->well_formed_char_length(cs, b, b + blen, prefix, &status);
- return cs->coll->strnncollsp(cs, ua, alen, ub, blen);
-}
-
-
-
int Field_varstring::cmp_prefix(const uchar *a_ptr, const uchar *b_ptr,
size_t prefix_len)
{
@@ -7770,8 +7860,12 @@ int Field_varstring::cmp_prefix(const uchar *a_ptr, const uchar *b_ptr,
a_length= uint2korr(a_ptr);
b_length= uint2korr(b_ptr);
}
- return cmp_str_prefix(a_ptr+length_bytes, a_length, b_ptr+length_bytes,
- b_length, prefix_len, field_charset);
+ return field_charset->coll->strnncollsp_nchars(field_charset,
+ a_ptr + length_bytes,
+ a_length,
+ b_ptr + length_bytes,
+ b_length,
+ prefix_len / field_charset->mbmaxlen);
}
@@ -8076,20 +8170,13 @@ Field *Field_varstring::new_key_field(MEM_ROOT *root, TABLE *new_table,
return res;
}
-uint Field_varstring::is_equal(Create_field *new_field)
+bool Field_varstring::is_equal(const Column_definition &new_field) const
{
- if (new_field->type_handler() == type_handler() &&
- new_field->charset == field_charset &&
- !new_field->compression_method() == !compression_method())
- {
- if (new_field->length == field_length)
- return IS_EQUAL_YES;
- if (new_field->length > field_length &&
- ((new_field->length <= 255 && field_length <= 255) ||
- (new_field->length > 255 && field_length > 255)))
- return IS_EQUAL_PACK_LENGTH; // VARCHAR, longer variable length
- }
- return IS_EQUAL_NO;
+ return new_field.type_handler() == type_handler() &&
+ new_field.length == field_length &&
+ new_field.char_length == char_length() &&
+ !new_field.compression_method() == !compression_method() &&
+ new_field.charset == field_charset;
}
@@ -8245,7 +8332,7 @@ String *Field_longstr::uncompress(String *val_buffer, String *val_ptr,
int Field_varstring_compressed::store(const char *from, size_t length,
CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
uint compressed_length;
int rc= compress((char*) get_data(), field_length, from, (uint) length,
Field_varstring_compressed::max_display_length(),
@@ -8258,14 +8345,14 @@ int Field_varstring_compressed::store(const char *from, size_t length,
String *Field_varstring_compressed::val_str(String *val_buffer, String *val_ptr)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return uncompress(val_buffer, val_ptr, get_data(), get_length());
}
double Field_varstring_compressed::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
String buf;
val_str(&buf, &buf);
@@ -8276,7 +8363,7 @@ double Field_varstring_compressed::val_real(void)
longlong Field_varstring_compressed::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
String buf;
val_str(&buf, &buf);
@@ -8371,7 +8458,7 @@ int Field_blob::copy_value(Field_blob *from)
int Field_blob::store(const char *from,size_t length,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
size_t copy_length, new_length;
uint copy_len;
char *tmp;
@@ -8468,7 +8555,7 @@ oom_error:
double Field_blob::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
char *blob;
memcpy(&blob, ptr+packlength, sizeof(char*));
if (!blob)
@@ -8482,7 +8569,7 @@ double Field_blob::val_real(void)
longlong Field_blob::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
char *blob;
memcpy(&blob, ptr+packlength, sizeof(char*));
if (!blob)
@@ -8497,7 +8584,7 @@ longlong Field_blob::val_int(void)
String *Field_blob::val_str(String *val_buffer __attribute__((unused)),
String *val_ptr)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
char *blob;
memcpy(&blob, ptr+packlength, sizeof(char*));
if (!blob)
@@ -8510,7 +8597,7 @@ String *Field_blob::val_str(String *val_buffer __attribute__((unused)),
my_decimal *Field_blob::val_decimal(my_decimal *decimal_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
const char *blob;
size_t length;
memcpy(&blob, ptr+packlength, sizeof(const uchar*));
@@ -8556,7 +8643,10 @@ int Field_blob::cmp_prefix(const uchar *a_ptr, const uchar *b_ptr,
memcpy(&blob1, a_ptr+packlength, sizeof(char*));
memcpy(&blob2, b_ptr+packlength, sizeof(char*));
size_t a_len= get_length(a_ptr), b_len= get_length(b_ptr);
- return cmp_str_prefix(blob1, a_len, blob2, b_len, prefix_len, field_charset);
+ return field_charset->coll->strnncollsp_nchars(field_charset,
+ blob1, a_len,
+ blob2, b_len,
+ prefix_len / field_charset->mbmaxlen);
}
@@ -8864,19 +8954,45 @@ uint Field_blob::max_packed_col_length(uint max_length)
again an already compressed field just because compression method changes.
*/
-uint Field_blob::is_equal(Create_field *new_field)
+bool Field_blob::is_equal(const Column_definition &new_field) const
+{
+ return new_field.type_handler() == type_handler() &&
+ !new_field.compression_method() == !compression_method() &&
+ new_field.pack_length == pack_length() &&
+ new_field.charset == field_charset;
+}
+
+
+void Field_blob::make_send_field(Send_field *field)
{
- return new_field->type_handler() == type_handler() &&
- new_field->charset == field_charset &&
- new_field->pack_length == pack_length() &&
- !new_field->compression_method() == !compression_method();
+ /*
+ Historically all BLOB variant Fields are displayed as MYSQL_TYPE_BLOB
+ in the result set metadata. Note, Item can work differently and
+ display the exact BLOB type, such as
+ MYSQL_TYPE_{TINY_BLOB|BLOB|MEDIUM_BLOB|LONG_BLOB}.
+ QQ: this should be made consistent eventually.
+ */
+ Field_longstr::make_send_field(field);
+ field->set_handler(&type_handler_blob);
+}
+
+
+bool Field_blob::make_empty_rec_store_default_value(THD *thd, Item *item)
+{
+ DBUG_ASSERT(flags & BLOB_FLAG);
+ int res= item->save_in_field(this, true);
+ DBUG_ASSERT(res != 3); // Field_blob never returns 3
+ if (res)
+ return true; // E.g. truncation happened
+ reset(); // Clear the pointer to a String, it should not be written to frm
+ return false;
}
int Field_blob_compressed::store(const char *from, size_t length,
CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
uint compressed_length;
uint max_length= max_data_length();
uint to_length= (uint) MY_MIN(max_length,
@@ -8903,14 +9019,14 @@ oom:
String *Field_blob_compressed::val_str(String *val_buffer, String *val_ptr)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return uncompress(val_buffer, val_ptr, get_ptr(), get_length());
}
double Field_blob_compressed::val_real(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
String buf;
val_str(&buf, &buf);
@@ -8921,7 +9037,7 @@ double Field_blob_compressed::val_real(void)
longlong Field_blob_compressed::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
THD *thd= get_thd();
String buf;
val_str(&buf, &buf);
@@ -9160,16 +9276,16 @@ Field::geometry_type Field_geom::geometry_type_merge(geometry_type a,
}
-uint Field_geom::is_equal(Create_field *new_field)
+bool Field_geom::is_equal(const Column_definition &new_field) const
{
- return new_field->type_handler() == type_handler() &&
+ return new_field.type_handler() == type_handler() &&
/*
- Allow ALTER..INPLACE to supertype (GEOMETRY),
e.g. POINT to GEOMETRY or POLYGON to GEOMETRY.
- Allow ALTER..INPLACE to the same geometry type: POINT -> POINT
*/
- (new_field->geom_type == geom_type ||
- new_field->geom_type == GEOM_GEOMETRY);
+ (new_field.geom_type == geom_type ||
+ new_field.geom_type == GEOM_GEOMETRY);
}
@@ -9241,7 +9357,7 @@ void Field_enum::store_type(ulonglong value)
int Field_enum::store(const char *from,size_t length,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int err= 0;
char buff[STRING_BUFFER_USUAL_SIZE];
String tmpstr(buff,sizeof(buff), &my_charset_bin);
@@ -9293,7 +9409,7 @@ int Field_enum::store(double nr)
int Field_enum::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
if ((ulonglong) nr > typelib->count || nr == 0)
{
@@ -9317,7 +9433,7 @@ double Field_enum::val_real(void)
longlong Field_enum::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
return read_lowendian(ptr, packlength);
}
@@ -9424,7 +9540,7 @@ Field *Field_enum::make_new_field(MEM_ROOT *root, TABLE *new_table,
int Field_set::store(const char *from,size_t length,CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
bool got_warning= 0;
int err= 0;
char *not_used;
@@ -9464,7 +9580,7 @@ int Field_set::store(const char *from,size_t length,CHARSET_INFO *cs)
int Field_set::store(longlong nr, bool unsigned_val)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
ulonglong max_nr;
@@ -9605,22 +9721,22 @@ bool Field_enum::eq_def(const Field *field) const
alteration purposes. Fields are equal if they retain the same
pack length and if new members are added to the end of the list.
- @return IS_EQUAL_YES if fields are compatible.
- IS_EQUAL_NO otherwise.
+ @return true if fields are compatible.
+ false otherwise.
*/
-uint Field_enum::is_equal(Create_field *new_field)
+bool Field_enum::is_equal(const Column_definition &new_field) const
{
- TYPELIB *values= new_field->interval;
+ TYPELIB *values= new_field.interval;
/*
The fields are compatible if they have the same flags,
type, charset and have the same underlying length.
*/
- if (new_field->type_handler() != type_handler() ||
- new_field->charset != field_charset ||
- new_field->pack_length != pack_length())
- return IS_EQUAL_NO;
+ if (new_field.type_handler() != type_handler() ||
+ new_field.charset != field_charset ||
+ new_field.pack_length != pack_length())
+ return false;
/*
Changing the definition of an ENUM or SET column by adding a new
@@ -9628,13 +9744,13 @@ uint Field_enum::is_equal(Create_field *new_field)
values only alters table metadata and not table data.
*/
if (typelib->count > values->count)
- return IS_EQUAL_NO;
+ return false;
/* Check whether there are modification before the end. */
- if (! compare_type_names(field_charset, typelib, new_field->interval))
- return IS_EQUAL_NO;
+ if (! compare_type_names(field_charset, typelib, new_field.interval))
+ return false;
- return IS_EQUAL_YES;
+ return true;
}
@@ -9680,14 +9796,35 @@ bool Field_num::eq_def(const Field *field) const
and retain the same pack length.
*/
-uint Field_num::is_equal(Create_field *new_field)
+bool Field_num::is_equal(const Column_definition &new_field) const
{
- return ((new_field->type_handler() == type_handler()) &&
- ((new_field->flags & UNSIGNED_FLAG) ==
- (uint) (flags & UNSIGNED_FLAG)) &&
- ((new_field->flags & AUTO_INCREMENT_FLAG) ==
- (uint) (flags & AUTO_INCREMENT_FLAG)) &&
- (new_field->pack_length == pack_length()));
+ if (((new_field.flags & UNSIGNED_FLAG) != (flags & UNSIGNED_FLAG)) ||
+ ((new_field.flags & AUTO_INCREMENT_FLAG) > (flags & AUTO_INCREMENT_FLAG)))
+ return false;
+
+ const Type_handler *th= type_handler(), *new_th = new_field.type_handler();
+
+ if (th == new_th && new_field.pack_length == pack_length())
+ return true;
+ /* FIXME: Test and consider returning true for the following:
+ TINYINT UNSIGNED to BIT(8)
+ SMALLINT UNSIGNED to BIT(16)
+ MEDIUMINT UNSIGNED to BIT(24)
+ INT UNSIGNED to BIT(32)
+ BIGINT UNSIGNED to BIT(64)
+
+ BIT(1..7) to TINYINT, or BIT(1..8) to TINYINT UNSIGNED
+ BIT(9..15) to SMALLINT, or BIT(9..16) to SMALLINT UNSIGNED
+ BIT(17..23) to MEDIUMINT, or BIT(17..24) to MEDIUMINT UNSIGNED
+ BIT(25..31) to INT, or BIT(25..32) to INT UNSIGNED
+ BIT(57..63) to BIGINT, or BIT(57..64) to BIGINT UNSIGNED
+
+ Note: InnoDB stores integers in big-endian format, and BIT appears
+ to use big-endian format. For storage engines that use little-endian
+ format for integers, we can only return true for the TINYINT
+ conversion. */
+
+ return false;
}
@@ -9826,16 +9963,16 @@ Field *Field_bit::new_key_field(MEM_ROOT *root, TABLE *new_table,
}
-uint Field_bit::is_equal(Create_field *new_field)
+bool Field_bit::is_equal(const Column_definition &new_field) const
{
- return new_field->type_handler() == type_handler() &&
- new_field->length == max_display_length();
+ return new_field.type_handler() == type_handler() &&
+ new_field.length == max_display_length();
}
int Field_bit::store(const char *from, size_t length, CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int delta;
for (; length && !*from; from++, length--) // skip left 0's
@@ -9912,7 +10049,7 @@ double Field_bit::val_real(void)
longlong Field_bit::val_int(void)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
ulonglong bits= 0;
if (bit_len)
{
@@ -9937,7 +10074,7 @@ longlong Field_bit::val_int(void)
String *Field_bit::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
char buff[sizeof(longlong)];
uint length= MY_MIN(pack_length(), sizeof(longlong));
ulonglong bits= val_int();
@@ -9953,7 +10090,7 @@ String *Field_bit::val_str(String *val_buffer,
my_decimal *Field_bit::val_decimal(my_decimal *deciaml_value)
{
- ASSERT_COLUMN_MARKED_FOR_READ;
+ DBUG_ASSERT(marked_for_read());
int2my_decimal(E_DEC_FATAL_ERROR, val_int(), 1, deciaml_value);
return deciaml_value;
}
@@ -10004,7 +10141,7 @@ int Field_bit::key_cmp(const uchar *str, uint)
}
-int Field_bit::cmp_offset(uint row_offset)
+int Field_bit::cmp_offset(my_ptrdiff_t row_offset)
{
if (bit_len)
{
@@ -10270,7 +10407,7 @@ Field_bit_as_char::Field_bit_as_char(uchar *ptr_arg, uint32 len_arg,
int Field_bit_as_char::store(const char *from, size_t length, CHARSET_INFO *cs)
{
- ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
+ DBUG_ASSERT(marked_for_write_or_computed());
int delta;
uchar bits= (uchar) (field_length & 7);
@@ -10634,6 +10771,13 @@ bool Column_definition::fix_attributes_temporal_with_time(uint int_part_length)
}
+bool Column_definition::validate_check_constraint(THD *thd)
+{
+ return check_constraint &&
+ check_expression(check_constraint, &field_name, VCOL_CHECK_FIELD);
+}
+
+
bool Column_definition::check(THD *thd)
{
DBUG_ENTER("Column_definition::check");
@@ -10642,15 +10786,14 @@ bool Column_definition::check(THD *thd)
if (vcol_info)
{
DBUG_ASSERT(vcol_info->expr);
- vcol_info->set_field_type(real_field_type());
+ vcol_info->set_handler(type_handler());
if (check_expression(vcol_info, &field_name, vcol_info->stored_in_db
? VCOL_GENERATED_STORED : VCOL_GENERATED_VIRTUAL))
DBUG_RETURN(TRUE);
}
- if (check_constraint &&
- check_expression(check_constraint, &field_name, VCOL_CHECK_FIELD))
- DBUG_RETURN(1);
+ if (type_handler()->Column_definition_validate_check_constraint(thd, this))
+ DBUG_RETURN(TRUE);
if (default_value)
{
@@ -10774,322 +10917,90 @@ uint pack_length_to_packflag(uint type)
}
-Field *make_field(TABLE_SHARE *share,
- MEM_ROOT *mem_root,
- uchar *ptr, uint32 field_length,
- uchar *null_pos, uchar null_bit,
- uint pack_flag,
- const Type_handler *handler,
- CHARSET_INFO *field_charset,
- Field::geometry_type geom_type, uint srid,
- Field::utype unireg_check,
- TYPELIB *interval,
- const LEX_CSTRING *field_name,
- uint32 flags)
+uint Column_definition_attributes::pack_flag_to_pack_length() const
{
- uchar *UNINIT_VAR(bit_ptr);
- uchar UNINIT_VAR(bit_offset);
+ uint type= f_packtype(pack_flag); // 0..15
+ DBUG_ASSERT(type < 16);
+ switch (type) {
+ case MYSQL_TYPE_TINY: return 1;
+ case MYSQL_TYPE_SHORT: return 2;
+ case MYSQL_TYPE_LONG: return 4;
+ case MYSQL_TYPE_LONGLONG: return 8;
+ case MYSQL_TYPE_INT24: return 3;
+ }
+ return 0; // This should not happen
+}
+
+Field *Column_definition_attributes::make_field(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const Record_addr *rec,
+ const Type_handler *handler,
+ const LEX_CSTRING *field_name,
+ uint32 flags)
+ const
+{
+ DBUG_ASSERT(length <= UINT_MAX32);
DBUG_PRINT("debug", ("field_type: %s, field_length: %u, interval: %p, pack_flag: %s%s%s%s%s",
- handler->name().ptr(), field_length, interval,
+ handler->name().ptr(), (uint) length, interval,
FLAGSTR(pack_flag, FIELDFLAG_BINARY),
FLAGSTR(pack_flag, FIELDFLAG_INTERVAL),
FLAGSTR(pack_flag, FIELDFLAG_NUMBER),
FLAGSTR(pack_flag, FIELDFLAG_PACK),
FLAGSTR(pack_flag, FIELDFLAG_BLOB)));
- if (handler == &type_handler_row)
- {
- DBUG_ASSERT(field_length == 0);
- DBUG_ASSERT(f_maybe_null(pack_flag));
- return new (mem_root) Field_row(ptr, field_name);
- }
-
- if (handler->real_field_type() == MYSQL_TYPE_BIT && !f_bit_as_char(pack_flag))
- {
- bit_ptr= null_pos;
- bit_offset= null_bit;
- if (f_maybe_null(pack_flag)) // if null field
- {
- bit_ptr+= (null_bit == 7); // shift bit_ptr and bit_offset
- bit_offset= (bit_offset + 1) & 7;
- }
- }
-
- if (!f_maybe_null(pack_flag))
- {
- null_pos=0;
- null_bit=0;
- }
- else
- {
- null_bit= ((uchar) 1) << null_bit;
- }
-
-
- if (f_is_alpha(pack_flag))
- {
- if (!f_is_packed(pack_flag))
- {
- enum_field_types field_type= handler->real_field_type();
- if (field_type == MYSQL_TYPE_STRING ||
- field_type == MYSQL_TYPE_DECIMAL || // 3.23 or 4.0 string
- field_type == MYSQL_TYPE_VAR_STRING)
- return new (mem_root)
- Field_string(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- field_charset);
- if (field_type == MYSQL_TYPE_VARCHAR)
- {
- if (unireg_check == Field::TMYSQL_COMPRESSED)
- return new (mem_root)
- Field_varstring_compressed(
- ptr, field_length,
- HA_VARCHAR_PACKLENGTH(field_length),
- null_pos, null_bit,
- unireg_check, field_name,
- share, field_charset, zlib_compression_method);
-
- return new (mem_root)
- Field_varstring(ptr,field_length,
- HA_VARCHAR_PACKLENGTH(field_length),
- null_pos,null_bit,
- unireg_check, field_name,
- share,
- field_charset);
- }
- return 0; // Error
- }
-
- // MYSQL_TYPE_VAR_STRING is handled above
- DBUG_ASSERT(f_packtype(pack_flag) != MYSQL_TYPE_VAR_STRING);
- const Type_handler *tmp;
- tmp= Type_handler::get_handler_by_real_type((enum_field_types)
- f_packtype(pack_flag));
- uint pack_length= tmp->calc_pack_length(field_length);
-
-#ifdef HAVE_SPATIAL
- if (f_is_geom(pack_flag))
- {
- status_var_increment(current_thd->status_var.feature_gis);
- return new (mem_root)
- Field_geom(ptr,null_pos,null_bit,
- unireg_check, field_name, share,
- pack_length, geom_type, srid);
- }
-#endif
- if (f_is_blob(pack_flag))
- {
- if (unireg_check == Field::TMYSQL_COMPRESSED)
- return new (mem_root)
- Field_blob_compressed(ptr, null_pos, null_bit,
- unireg_check, field_name, share,
- pack_length, field_charset, zlib_compression_method);
-
- return new (mem_root)
- Field_blob(ptr,null_pos,null_bit,
- unireg_check, field_name, share,
- pack_length, field_charset);
- }
- if (interval)
- {
- if (f_is_enum(pack_flag))
- return new (mem_root)
- Field_enum(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- pack_length, interval, field_charset);
- else
- return new (mem_root)
- Field_set(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- pack_length, interval, field_charset);
- }
- }
-
- switch (handler->real_field_type()) {
- case MYSQL_TYPE_DECIMAL:
- return new (mem_root)
- Field_decimal(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- f_decimals(pack_flag),
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- case MYSQL_TYPE_NEWDECIMAL:
- return new (mem_root)
- Field_new_decimal(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- f_decimals(pack_flag),
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- case MYSQL_TYPE_FLOAT:
- {
- int decimals= f_decimals(pack_flag);
- if (decimals == FLOATING_POINT_DECIMALS)
- decimals= NOT_FIXED_DEC;
- return new (mem_root)
- Field_float(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- decimals,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag)== 0);
- }
- case MYSQL_TYPE_DOUBLE:
- {
- int decimals= f_decimals(pack_flag);
- if (decimals == FLOATING_POINT_DECIMALS)
- decimals= NOT_FIXED_DEC;
- return new (mem_root)
- Field_double(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- decimals,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag)== 0);
- }
- case MYSQL_TYPE_TINY:
- return new (mem_root)
- Field_tiny(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- case MYSQL_TYPE_SHORT:
- return new (mem_root)
- Field_short(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- case MYSQL_TYPE_INT24:
- return new (mem_root)
- Field_medium(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- case MYSQL_TYPE_LONG:
- return new (mem_root)
- Field_long(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- case MYSQL_TYPE_LONGLONG:
- if (flags & (VERS_ROW_START|VERS_ROW_END))
- {
- return new (mem_root)
- Field_vers_trx_id(ptr, field_length, null_pos, null_bit,
- unireg_check, field_name,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- }
- else
- {
- return new (mem_root)
- Field_longlong(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name,
- f_is_zerofill(pack_flag) != 0,
- f_is_dec(pack_flag) == 0);
- }
- case MYSQL_TYPE_TIMESTAMP:
- {
- uint dec= field_length > MAX_DATETIME_WIDTH ?
- field_length - MAX_DATETIME_WIDTH - 1: 0;
- return new_Field_timestamp(mem_root, ptr, null_pos, null_bit, unireg_check,
- field_name, share, dec);
- }
- case MYSQL_TYPE_TIMESTAMP2:
- {
- uint dec= field_length > MAX_DATETIME_WIDTH ?
- field_length - MAX_DATETIME_WIDTH - 1: 0;
- return new (mem_root)
- Field_timestampf(ptr, null_pos, null_bit, unireg_check,
- field_name, share, dec);
- }
- case MYSQL_TYPE_YEAR:
- return new (mem_root)
- Field_year(ptr,field_length,null_pos,null_bit,
- unireg_check, field_name);
- case MYSQL_TYPE_DATE:
- return new (mem_root)
- Field_date(ptr,null_pos,null_bit,
- unireg_check, field_name);
- case MYSQL_TYPE_NEWDATE:
- return new (mem_root)
- Field_newdate(ptr,null_pos,null_bit,
- unireg_check, field_name);
- case MYSQL_TYPE_TIME:
- {
- uint dec= field_length > MIN_TIME_WIDTH ?
- field_length - MIN_TIME_WIDTH - 1: 0;
- return new_Field_time(mem_root, ptr, null_pos, null_bit, unireg_check,
- field_name, dec);
- }
- case MYSQL_TYPE_TIME2:
- {
- uint dec= field_length > MIN_TIME_WIDTH ?
- field_length - MIN_TIME_WIDTH - 1: 0;
- return new (mem_root)
- Field_timef(ptr, null_pos, null_bit, unireg_check,
- field_name, dec);
- }
- case MYSQL_TYPE_DATETIME:
- {
- uint dec= field_length > MAX_DATETIME_WIDTH ?
- field_length - MAX_DATETIME_WIDTH - 1: 0;
- return new_Field_datetime(mem_root, ptr, null_pos, null_bit, unireg_check,
- field_name, dec);
- }
- case MYSQL_TYPE_DATETIME2:
- {
- uint dec= field_length > MAX_DATETIME_WIDTH ?
- field_length - MAX_DATETIME_WIDTH - 1: 0;
- return new (mem_root)
- Field_datetimef(ptr, null_pos, null_bit, unireg_check,
- field_name, dec);
- }
- case MYSQL_TYPE_NULL:
- return new (mem_root)
- Field_null(ptr, field_length, unireg_check, field_name,
- field_charset);
- case MYSQL_TYPE_BIT:
- return (f_bit_as_char(pack_flag) ?
- new (mem_root)
- Field_bit_as_char(ptr, field_length, null_pos, null_bit,
- unireg_check, field_name) :
- new (mem_root)
- Field_bit(ptr, field_length, null_pos, null_bit, bit_ptr,
- bit_offset, unireg_check, field_name));
-
- default: // Impossible (Wrong version)
- break;
- }
- return 0;
+ Record_addr addr(rec->ptr(), f_maybe_null(pack_flag) ? rec->null() :
+ Bit_addr());
+ /*
+ Special code for the BIT-alike data types
+ who store data bits together with NULL-bits.
+ */
+ Bit_addr bit(rec->null());
+ if (f_maybe_null(pack_flag))
+ bit.inc();
+ return handler->make_table_field_from_def(share, mem_root, field_name,
+ addr, bit, this, flags);
}
+
bool Field_vers_trx_id::test_if_equality_guarantees_uniqueness(const Item* item) const
{
- return item->type() == Item::DATE_ITEM;
+ return item->is_of_type(Item::CONST_ITEM, TIME_RESULT);
}
+Column_definition_attributes::Column_definition_attributes(const Field *field)
+ :length(field->character_octet_length() / field->charset()->mbmaxlen),
+ unireg_check(field->unireg_check),
+ interval(NULL),
+ charset(field->charset()), // May be NULL ptr
+ srid(0),
+ geom_type(Field::GEOM_GEOMETRY),
+ pack_flag(0)
+{}
+
+
/** Create a field suitable for create of table. */
Column_definition::Column_definition(THD *thd, Field *old_field,
Field *orig_field)
+ :Column_definition_attributes(old_field)
{
on_update= NULL;
field_name= old_field->field_name;
- length= old_field->field_length;
flags= old_field->flags;
- unireg_check=old_field->unireg_check;
pack_length=old_field->pack_length();
key_length= old_field->key_length();
set_handler(old_field->type_handler());
- charset= old_field->charset(); // May be NULL ptr
comment= old_field->comment;
decimals= old_field->decimals();
vcol_info= old_field->vcol_info;
option_list= old_field->option_list;
- pack_flag= 0;
compression_method_ptr= 0;
versioning= VERSIONING_NOT_SET;
invisible= old_field->invisible;
+ interval_list.empty(); // prepare_interval_field() needs this
+ char_length= (uint) length;
if (orig_field)
{
@@ -11107,66 +11018,9 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
check_constraint= 0;
}
- switch (real_field_type()) {
- case MYSQL_TYPE_TINY_BLOB:
- case MYSQL_TYPE_BLOB:
- case MYSQL_TYPE_MEDIUM_BLOB:
- case MYSQL_TYPE_LONG_BLOB:
- length/= charset->mbmaxlen;
- key_length/= charset->mbmaxlen;
- break;
- case MYSQL_TYPE_STRING:
- /* Change CHAR -> VARCHAR if dynamic record length */
- if (old_field->type() == MYSQL_TYPE_VAR_STRING)
- set_handler(&type_handler_varchar);
- /* fall through */
-
- case MYSQL_TYPE_ENUM:
- case MYSQL_TYPE_SET:
- case MYSQL_TYPE_VARCHAR:
- case MYSQL_TYPE_VAR_STRING:
- /* This is corrected in create_length_to_internal_length */
- length= (length+charset->mbmaxlen-1) / charset->mbmaxlen -
- MY_TEST(old_field->compression_method());
- break;
-#ifdef HAVE_SPATIAL
- case MYSQL_TYPE_GEOMETRY:
- geom_type= ((Field_geom*)old_field)->geom_type;
- srid= ((Field_geom*)old_field)->srid;
- break;
-#endif
- case MYSQL_TYPE_YEAR:
- if (length != 4)
- {
- char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
- my_snprintf(buff, sizeof(buff), "YEAR(%llu)", length);
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
- ER_WARN_DEPRECATED_SYNTAX,
- ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
- buff, "YEAR(4)");
- }
- break;
- case MYSQL_TYPE_FLOAT:
- case MYSQL_TYPE_DOUBLE:
- /*
- Floating points are stored with FLOATING_POINT_DECIMALS but internally
- in MariaDB used with NOT_FIXED_DEC, which is >= FLOATING_POINT_DECIMALS.
- */
- if (decimals >= FLOATING_POINT_DECIMALS)
- decimals= NOT_FIXED_DEC;
- break;
- default:
- break;
- }
-
- if (flags & (ENUM_FLAG | SET_FLAG))
- interval= ((Field_enum*) old_field)->typelib;
- else
- interval=0;
-
- interval_list.empty(); // prepare_interval_field() needs this
+ type_handler()->Column_definition_reuse_fix_attributes(thd, this, old_field);
- char_length= (uint)length;
+ type_handler()->Column_definition_implicit_upgrade(this);
/*
Copy the default (constant/function) from the column object orig_field, if
@@ -11209,16 +11063,26 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
CREATE TABLE t1 (a INT) AS SELECT a FROM t2;
See Type_handler::Column_definition_redefine_stage1()
for data type specific code.
+
+ @param this - The field definition corresponding to the expression
+ in the "AS SELECT.." part.
+
+ @param dup_field - The field definition from the "CREATE TABLE (...)" part.
+ It has already underwent prepare_stage1(), so
+ must be fully initialized:
+ -- dup_field->charset is set and BINARY
+ sorting style is applied, see find_bin_collation().
+
+ @param file - The table handler
*/
void
Column_definition::redefine_stage1_common(const Column_definition *dup_field,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
{
set_handler(dup_field->type_handler());
default_value= dup_field->default_value;
- charset= dup_field->charset ? dup_field->charset :
- schema->default_table_charset;
+ DBUG_ASSERT(dup_field->charset); // Set by prepare_stage1()
+ charset= dup_field->charset;
length= dup_field->char_length;
pack_length= dup_field->pack_length;
key_length= dup_field->key_length;
@@ -11229,6 +11093,9 @@ Column_definition::redefine_stage1_common(const Column_definition *dup_field,
vcol_info= dup_field->vcol_info;
invisible= dup_field->invisible;
check_constraint= dup_field->check_constraint;
+ comment= dup_field->comment;
+ option_list= dup_field->option_list;
+ versioning= dup_field->versioning;
}
@@ -11249,11 +11116,11 @@ Column_definition::redefine_stage1_common(const Column_definition *dup_field,
uint32 Field_blob::char_length() const
{
- return Field_blob::octet_length();
+ return Field_blob::character_octet_length();
}
-uint32 Field_blob::octet_length() const
+uint32 Field_blob::character_octet_length() const
{
switch (packlength)
{
@@ -11350,6 +11217,13 @@ Column_definition::set_compressed_deprecated_column_attribute(THD *thd,
}
+Send_field::Send_field(THD *thd, Item *item)
+{
+ item->make_send_field(thd, this);
+ normalize();
+}
+
+
/**
maximum possible display length for blob.
@@ -11443,14 +11317,25 @@ Field::set_warning(Sql_condition::enum_warning_level level, uint code,
void Field::set_datetime_warning(Sql_condition::enum_warning_level level,
uint code, const ErrConv *str,
- timestamp_type ts_type, int cuted_increment)
+ const char *typestr, int cuted_increment)
const
{
THD *thd= get_thd();
if (thd->really_abort_on_warning() && level >= Sql_condition::WARN_LEVEL_WARN)
- make_truncated_value_warning(thd, level, str, ts_type,
- table->s->db.str, table->s->table_name.str,
- field_name.str);
+ {
+ /*
+ field_name.str can be NULL when field is not in the select list:
+ SET SESSION SQL_MODE= 'STRICT_ALL_TABLES,NO_ZERO_DATE';
+ CREATE OR REPLACE TABLE t2 SELECT 1 AS f FROM t1 GROUP BY FROM_DAYS(d);
+ Can't call push_warning_truncated_value_for_field() directly here,
+ as it expect a non-NULL name.
+ */
+ thd->push_warning_wrong_or_truncated_value(level, false, typestr,
+ str->ptr(),
+ table->s->db.str,
+ table->s->table_name.str,
+ field_name.str);
+ }
else
set_warning(level, code, cuted_increment);
}
@@ -11611,3 +11496,115 @@ bool Field::val_str_nopad(MEM_ROOT *mem_root, LEX_CSTRING *to)
thd->variables.sql_mode= sql_mode_backup;
return rc;
}
+
+
+void Field::print_key_value(String *out, uint32 length)
+{
+ if (charset() == &my_charset_bin)
+ print_key_value_binary(out, ptr, length);
+ else
+ val_str(out);
+}
+
+
+void Field_string::print_key_value(String *out, uint32 length)
+{
+ if (charset() == &my_charset_bin)
+ {
+ size_t len= field_charset->cset->lengthsp(field_charset, (const char*) ptr, length);
+ print_key_value_binary(out, ptr, static_cast<uint32>(len));
+ }
+ else
+ {
+ THD *thd= get_thd();
+ sql_mode_t sql_mode_backup= thd->variables.sql_mode;
+ thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
+ val_str(out,out);
+ thd->variables.sql_mode= sql_mode_backup;
+ }
+}
+
+
+void Field_varstring::print_key_value(String *out, uint32 length)
+{
+ if (charset() == &my_charset_bin)
+ print_key_value_binary(out, get_data(), get_length());
+ else
+ val_str(out,out);
+}
+
+
+void Field_blob::print_key_value(String *out, uint32 length)
+{
+ if (charset() == &my_charset_bin)
+ {
+ uchar *blob;
+ memcpy(&blob, ptr+packlength, sizeof(uchar*));
+ print_key_value_binary(out, blob, get_length());
+ }
+ else
+ val_str(out, out);
+}
+
+
+/*
+ @brief Print value of the key part
+
+ @param
+ out Output string
+ key value of the key
+ length Length of field in bytes,
+ excluding NULL flag and length bytes
+*/
+
+
+void
+Field::print_key_part_value(String *out, const uchar* key, uint32 length)
+{
+ StringBuffer<128> tmp(system_charset_info);
+ uint null_byte= 0;
+ if (real_maybe_null())
+ {
+ /*
+ Byte 0 of key is the null-byte. If set, key is NULL.
+ Otherwise, print the key value starting immediately after the
+ null-byte
+ */
+ if (*key)
+ {
+ out->append(STRING_WITH_LEN("NULL"));
+ return;
+ }
+ null_byte++; // Skip null byte
+ }
+
+ set_key_image(key + null_byte, length);
+ print_key_value(&tmp, length);
+ if (charset() == &my_charset_bin)
+ out->append(tmp.ptr(), tmp.length(), tmp.charset());
+ else
+ tmp.print(out, system_charset_info);
+}
+
+
+void Field::print_key_value_binary(String *out, const uchar* key, uint32 length)
+{
+ out->append_semi_hex((const char*)key, length, charset());
+}
+
+
+Virtual_column_info* Virtual_column_info::clone(THD *thd)
+{
+ Virtual_column_info* dst= new (thd->mem_root) Virtual_column_info(*this);
+ if (!dst)
+ return NULL;
+ if (expr)
+ {
+ dst->expr= expr->build_clone(thd);
+ if (!dst->expr)
+ return NULL;
+ }
+ if (!thd->make_lex_string(&dst->name, name.str, name.length))
+ return NULL;
+ return dst;
+};
diff --git a/sql/field.h b/sql/field.h
index 4ef4483a15a..7534a506edc 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -48,6 +48,9 @@ class Item_equal;
class Virtual_tmp_table;
class Qualified_column_ident;
class Table_ident;
+class SEL_ARG;
+class RANGE_OPT_PARAM;
+struct KEY_PART;
enum enum_check_fields
{
@@ -461,42 +464,18 @@ inline bool is_temporal_type_with_date(enum_field_types type)
case MYSQL_TYPE_DATETIME2:
case MYSQL_TYPE_TIMESTAMP2:
DBUG_ASSERT(0); // field->real_type() should not get to here.
- /* fall through */
+ return false;
default:
return false;
}
}
-/**
- Convert temporal real types as returned by field->real_type()
- to field type as returned by field->type().
-
- @param real_type Real type.
- @retval Field type.
-*/
-inline enum_field_types real_type_to_type(enum_field_types real_type)
-{
- switch (real_type)
- {
- case MYSQL_TYPE_TIME2:
- return MYSQL_TYPE_TIME;
- case MYSQL_TYPE_DATETIME2:
- return MYSQL_TYPE_DATETIME;
- case MYSQL_TYPE_TIMESTAMP2:
- return MYSQL_TYPE_TIMESTAMP;
- case MYSQL_TYPE_NEWDATE:
- return MYSQL_TYPE_DATE;
- /* Note: NEWDECIMAL is a type, not only a real_type */
- default: return real_type;
- }
-}
-
-
enum enum_vcol_info_type
{
VCOL_GENERATED_VIRTUAL, VCOL_GENERATED_STORED,
VCOL_DEFAULT, VCOL_CHECK_FIELD, VCOL_CHECK_TABLE,
+ VCOL_USING_HASH,
/* Additional types should be added here */
/* Following is the highest value last */
VCOL_TYPE_NONE = 127 // Since the 0 value is already in use
@@ -514,6 +493,8 @@ static inline const char *vcol_type_name(enum_vcol_info_type type)
case VCOL_CHECK_FIELD:
case VCOL_CHECK_TABLE:
return "CHECK";
+ case VCOL_USING_HASH:
+ return "USING HASH";
case VCOL_TYPE_NONE:
return "UNTYPED";
}
@@ -546,7 +527,8 @@ static inline const char *vcol_type_name(enum_vcol_info_type type)
- whether the field is used in a partitioning expression
*/
-class Virtual_column_info: public Sql_alloc
+class Virtual_column_info: public Sql_alloc,
+ private Type_handler_hybrid_field_type
{
private:
enum_vcol_info_type vcol_type; /* Virtual column expression type */
@@ -554,7 +536,6 @@ private:
The following data is only updated by the parser and read
when a Create_field object is created/initialized.
*/
- enum_field_types field_type; /* Real field type*/
/* Flag indicating that the field used in a partitioning expression */
bool in_partitioning_expr;
@@ -564,20 +545,21 @@ public:
bool utf8; /* Already in utf8 */
bool automatic_name;
Item *expr;
- LEX_CSTRING name; /* Name of constraint */
+ Lex_ident name; /* Name of constraint */
/* see VCOL_* (VCOL_FIELD_REF, ...) */
uint flags;
Virtual_column_info()
- : vcol_type((enum_vcol_info_type)VCOL_TYPE_NONE),
- field_type((enum enum_field_types)MYSQL_TYPE_VIRTUAL),
+ :Type_handler_hybrid_field_type(&type_handler_null),
+ vcol_type((enum_vcol_info_type)VCOL_TYPE_NONE),
in_partitioning_expr(FALSE), stored_in_db(FALSE),
utf8(TRUE), automatic_name(FALSE), expr(NULL), flags(0)
{
name.str= NULL;
name.length= 0;
};
- ~Virtual_column_info() {}
+ Virtual_column_info* clone(THD *thd);
+ ~Virtual_column_info() {};
enum_vcol_info_type get_vcol_type() const
{
return vcol_type;
@@ -591,14 +573,11 @@ public:
DBUG_ASSERT(vcol_type != VCOL_TYPE_NONE);
return vcol_type_name(vcol_type);
}
- enum_field_types get_real_type() const
- {
- return field_type;
- }
- void set_field_type(enum_field_types fld_type)
+ void set_handler(const Type_handler *handler)
{
/* Calling this function can only be done once. */
- field_type= fld_type;
+ DBUG_ASSERT(type_handler() == &type_handler_null);
+ Type_handler_hybrid_field_type::set_handler(handler);
}
bool is_stored() const
{
@@ -644,7 +623,9 @@ protected:
static void do_field_int(Copy_field *copy);
static void do_field_real(Copy_field *copy);
static void do_field_string(Copy_field *copy);
- static void do_field_temporal(Copy_field *copy);
+ static void do_field_date(Copy_field *copy);
+ static void do_field_temporal(Copy_field *copy, date_mode_t fuzzydate);
+ static void do_field_datetime(Copy_field *copy);
static void do_field_timestamp(Copy_field *copy);
static void do_field_decimal(Copy_field *copy);
public:
@@ -659,6 +640,9 @@ public:
static void operator delete(void *ptr, MEM_ROOT *mem_root)
{ DBUG_ASSERT(0); }
+ bool marked_for_read() const;
+ bool marked_for_write_or_computed() const;
+
/**
Used by System Versioning.
*/
@@ -807,13 +791,32 @@ public:
@retval false - conversion is needed
*/
virtual bool memcpy_field_possible(const Field *from) const= 0;
+ virtual bool make_empty_rec_store_default_value(THD *thd, Item *item);
+ virtual void make_empty_rec_reset(THD *thd)
+ {
+ reset();
+ }
virtual int store(const char *to, size_t length,CHARSET_INFO *cs)=0;
virtual int store_hex_hybrid(const char *str, size_t length);
virtual int store(double nr)=0;
virtual int store(longlong nr, bool unsigned_val)=0;
virtual int store_decimal(const my_decimal *d)=0;
virtual int store_time_dec(const MYSQL_TIME *ltime, uint dec);
- virtual int store_timestamp(my_time_t timestamp, ulong sec_part);
+ virtual int store_timestamp_dec(const timeval &ts, uint dec);
+ int store_timestamp(my_time_t timestamp, ulong sec_part)
+ {
+ return store_timestamp_dec(Timeval(timestamp, sec_part),
+ TIME_SECOND_PART_DIGITS);
+ }
+ /**
+ Store a value represented in native format
+ */
+ virtual int store_native(const Native &value)
+ {
+ DBUG_ASSERT(0);
+ reset();
+ return 0;
+ }
int store_time(const MYSQL_TIME *ltime)
{ return store_time_dec(ltime, TIME_SECOND_PART_DIGITS); }
int store(const char *to, size_t length, CHARSET_INFO *cs,
@@ -858,7 +861,7 @@ public:
return nr < 0 ? 0 : (ulonglong) nr;
}
virtual bool val_bool(void)= 0;
- virtual my_decimal *val_decimal(my_decimal *);
+ virtual my_decimal *val_decimal(my_decimal *)=0;
inline String *val_str(String *str) { return val_str(str, str); }
/*
val_str(buf1, buf2) gets two buffers and should use them as follows:
@@ -873,6 +876,11 @@ public:
This trickery is used to decrease a number of malloc calls.
*/
virtual String *val_str(String*,String *)=0;
+ virtual bool val_native(Native *to)
+ {
+ DBUG_ASSERT(!is_null());
+ return to->copy((const char *) ptr, pack_length());
+ }
String *val_int_as_str(String *val_buffer, bool unsigned_flag);
/*
Return the field value as a LEX_CSTRING, without padding to full length
@@ -895,6 +903,10 @@ public:
to be quoted when used in constructing an SQL query.
*/
virtual bool str_needs_quotes() { return FALSE; }
+ const Type_handler *type_handler_for_comparison() const
+ {
+ return type_handler()->type_handler_for_comparison();
+ }
Item_result result_type () const
{
return type_handler()->result_type();
@@ -903,7 +915,6 @@ public:
{
return type_handler()->cmp_type();
}
- static enum_field_types field_type_merge(enum_field_types, enum_field_types);
virtual bool eq(Field *field)
{
return (ptr == field->ptr && null_ptr == field->null_ptr &&
@@ -1099,7 +1110,7 @@ public:
{ return cmp(a, b); }
virtual int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0U)
{ return memcmp(a,b,pack_length()); }
- virtual int cmp_offset(uint row_offset)
+ virtual int cmp_offset(my_ptrdiff_t row_offset)
{ return cmp(ptr,ptr+row_offset); }
virtual int cmp_binary_offset(uint row_offset)
{ return cmp_binary(ptr, ptr+row_offset); };
@@ -1231,6 +1242,11 @@ public:
{
return 0;
}
+ virtual sql_mode_t conversion_depends_on_sql_mode(THD *thd,
+ Item *expr) const
+ {
+ return (sql_mode_t) 0;
+ }
virtual sql_mode_t can_handle_sql_mode_dependency_on_store() const
{
return 0;
@@ -1282,6 +1298,12 @@ public:
virtual Field *new_key_field(MEM_ROOT *root, TABLE *new_table,
uchar *new_ptr, uint32 length,
uchar *new_null_ptr, uint new_null_bit);
+ Field *create_tmp_field(MEM_ROOT *root, TABLE *new_table,
+ bool maybe_null_arg);
+ Field *create_tmp_field(MEM_ROOT *root, TABLE *new_table)
+ {
+ return create_tmp_field(root, new_table, maybe_null());
+ }
Field *clone(MEM_ROOT *mem_root, TABLE *new_table);
Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff);
inline void move_field(uchar *ptr_arg,uchar *null_ptr_arg,uchar null_bit_arg)
@@ -1384,14 +1406,15 @@ public:
virtual uint max_packed_col_length(uint max_length)
{ return max_length;}
- uint offset(uchar *record) const
+ uint offset(const uchar *record) const
{
return (uint) (ptr - record);
}
void copy_from_tmp(int offset);
uint fill_cache_field(struct st_cache_field *copy);
- virtual bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_time(MYSQL_TIME *ltime) { return get_date(ltime, TIME_TIME_ONLY); }
+ virtual bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ virtual longlong val_datetime_packed(THD *thd);
+ virtual longlong val_time_packed(THD *thd);
virtual TYPELIB *get_typelib() const { return NULL; }
virtual CHARSET_INFO *charset(void) const { return &my_charset_bin; }
virtual CHARSET_INFO *charset_for_protocol(void) const
@@ -1404,6 +1427,9 @@ public:
virtual int set_time() { return 1; }
bool set_warning(Sql_condition::enum_warning_level, unsigned int code,
int cuted_increment, ulong current_row=0) const;
+ virtual void print_key_value(String *out, uint32 length);
+ void print_key_part_value(String *out, const uchar *key, uint32 length);
+ void print_key_value_binary(String *out, const uchar* key, uint32 length);
protected:
bool set_warning(unsigned int code, int cuted_increment) const
{
@@ -1414,13 +1440,13 @@ protected:
return set_warning(Sql_condition::WARN_LEVEL_NOTE, code, cuted_increment);
}
void set_datetime_warning(Sql_condition::enum_warning_level, uint code,
- const ErrConv *str, timestamp_type ts_type,
+ const ErrConv *str, const char *typestr,
int cuted_increment) const;
void set_datetime_warning(uint code,
- const ErrConv *str, timestamp_type ts_type,
+ const ErrConv *str, const char *typestr,
int cuted_increment) const
{
- set_datetime_warning(Sql_condition::WARN_LEVEL_WARN, code, str, ts_type,
+ set_datetime_warning(Sql_condition::WARN_LEVEL_WARN, code, str, typestr,
cuted_increment);
}
void set_warning_truncated_wrong_value(const char *type, const char *value);
@@ -1430,6 +1456,59 @@ protected:
}
int warn_if_overflow(int op_result);
Copy_func *get_identical_copy_func() const;
+ bool can_optimize_scalar_range(const RANGE_OPT_PARAM *param,
+ const KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op,
+ const Item *value) const;
+ uchar *make_key_image(MEM_ROOT *mem_root, const KEY_PART *key_part);
+ SEL_ARG *get_mm_leaf_int(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value,
+ bool unsigned_field);
+ /*
+ Make a leaf tree for the cases when the value was stored
+ to the field exactly, without any truncation, rounding or adjustments.
+ For example, if we stored an INT value into an INT column,
+ and value->save_in_field_no_warnings() returned 0,
+ we know that the value was stored exactly.
+ */
+ SEL_ARG *stored_field_make_mm_leaf_exact(RANGE_OPT_PARAM *param,
+ KEY_PART *key_part,
+ scalar_comparison_op op,
+ Item *value);
+ /*
+ Make a leaf tree for the cases when we don't know if
+ the value was stored to the field without any data loss,
+ or was modified to a smaller or a greater value.
+ Used for the data types whose methods Field::store*()
+ silently adjust the value. This is the most typical case.
+ */
+ SEL_ARG *stored_field_make_mm_leaf(RANGE_OPT_PARAM *param,
+ KEY_PART *key_part,
+ scalar_comparison_op op, Item *value);
+ /*
+ Make a leaf tree when an INT value was stored into a field of INT type,
+ and some truncation happened. Tries to adjust the range search condition
+ when possible, e.g. "tinytint < 300" -> "tinyint <= 127".
+ Can also return SEL_ARG_IMPOSSIBLE(), and NULL (not sargable).
+ */
+ SEL_ARG *stored_field_make_mm_leaf_bounded_int(RANGE_OPT_PARAM *param,
+ KEY_PART *key_part,
+ scalar_comparison_op op,
+ Item *value,
+ bool unsigned_field);
+ /*
+ Make a leaf tree when some truncation happened during
+ value->save_in_field_no_warning(this), and we cannot yet adjust the range
+ search condition for the current combination of the field and the value
+ data types.
+ Returns SEL_ARG_IMPOSSIBLE() for "=" and "<=>".
+ Returns NULL (not sargable) for other comparison operations.
+ */
+ SEL_ARG *stored_field_make_mm_leaf_truncated(RANGE_OPT_PARAM *prm,
+ scalar_comparison_op,
+ Item *value);
public:
void set_table_name(String *alias)
{
@@ -1440,6 +1519,19 @@ public:
orig_table= table= table_arg;
set_table_name(&table_arg->alias);
}
+ virtual void init_for_tmp_table(Field *org_field, TABLE *new_table)
+ {
+ init(new_table);
+ orig_table= org_field->orig_table;
+ vcol_info= 0;
+ cond_selectivity= 1.0;
+ next_equal_field= NULL;
+ option_list= NULL;
+ option_struct= NULL;
+ if (org_field->type() == MYSQL_TYPE_VAR_STRING ||
+ org_field->type() == MYSQL_TYPE_VARCHAR)
+ new_table->s->db_create_options|= HA_OPTION_PACK_RECORD;
+ }
void init_for_make_new_field(TABLE *new_table_arg, TABLE *orig_table_arg)
{
init(new_table_arg);
@@ -1456,23 +1548,35 @@ public:
/* maximum possible display length */
virtual uint32 max_display_length() const= 0;
/**
- Whether a field being created is compatible with a existing one.
-
- Used by the ALTER TABLE code to evaluate whether the new definition
- of a table is compatible with the old definition so that it can
- determine if data needs to be copied over (table data change).
+ Whether a field being created has the samle type.
+ Used by the ALTER TABLE
*/
- virtual uint is_equal(Create_field *new_field);
+ virtual bool is_equal(const Column_definition &new_field) const= 0;
+ // Used as double dispatch pattern: calls virtual method of handler
+ virtual bool
+ can_be_converted_by_engine(const Column_definition &new_type) const
+ {
+ return false;
+ }
/* convert decimal to longlong with overflow check */
longlong convert_decimal2longlong(const my_decimal *val, bool unsigned_flag,
int *err);
+ /*
+ Maximum number of bytes in character representation.
+ - For string types it is equal to the field capacity, in bytes.
+ - For non-string types it represents the longest possible string length
+ after conversion to string.
+ */
+ virtual uint32 character_octet_length() const
+ {
+ return field_length;
+ }
/* The max. number of characters */
virtual uint32 char_length() const
{
return field_length / charset()->mbmaxlen;
}
-
- virtual geometry_type get_geometry_type()
+ virtual geometry_type get_geometry_type() const
{
/* shouldn't get here. */
DBUG_ASSERT(0);
@@ -1600,6 +1704,10 @@ public:
const Item *item,
bool is_eq_func) const;
+ virtual SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value)= 0;
+
bool can_optimize_outer_join_table_elimination(const Item_bool_func *cond,
const Item *item) const
{
@@ -1743,7 +1851,7 @@ public:
{
return to->store(val_int(), MY_TEST(flags & UNSIGNED_FLAG));
}
- uint is_equal(Create_field *new_field);
+ bool is_equal(const Column_definition &new_field) const;
uint row_pack_length() const { return pack_length(); }
uint32 pack_length_from_metadata(uint field_metadata) {
uint32 length= pack_length();
@@ -1755,6 +1863,9 @@ public:
{
return pos_in_interval_val_real(min, max);
}
+ SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value);
};
@@ -1792,6 +1903,7 @@ public:
enum Derivation derivation(void) const { return field_derivation; }
bool binary() const { return field_charset == &my_charset_bin; }
uint32 max_display_length() const { return field_length; }
+ uint32 character_octet_length() const { return field_length; }
uint32 char_length() const { return field_length / field_charset->mbmaxlen; }
Information_schema_character_attributes
information_schema_character_attributes() const
@@ -1803,14 +1915,16 @@ public:
my_decimal *val_decimal(my_decimal *);
bool val_bool() { return val_real() != 0e0; }
virtual bool str_needs_quotes() { return TRUE; }
- uint is_equal(Create_field *new_field);
bool eq_cmp_as_binary() { return MY_TEST(flags & BINARY_FLAG); }
- virtual uint length_size() { return 0; }
+ virtual uint length_size() const { return 0; }
double pos_in_interval(Field *min, Field *max)
{
return pos_in_interval_val_str(min, max, length_size());
}
bool test_if_equality_guarantees_uniqueness(const Item *const_item) const;
+ SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value);
};
/* base class for Field_string, Field_varstring and Field_blob */
@@ -1926,9 +2040,9 @@ public:
decimals() == from->decimals() &&
field_length >= from->field_length;
}
- int store_decimal(const my_decimal *);
+ int store_decimal(const my_decimal *dec) { return store(dec->to_double()); }
int store_time_dec(const MYSQL_TIME *ltime, uint dec);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
my_decimal *val_decimal(my_decimal *);
bool val_bool() { return val_real() != 0e0; }
uint32 max_display_length() const { return field_length; }
@@ -1984,8 +2098,6 @@ public:
class Field_new_decimal :public Field_num {
private:
int save_field_metadata(uchar *first_byte);
- void set_and_validate_prec(uint32 len_arg,
- uint8 dec_arg, bool unsigned_arg);
public:
/* The maximum number of decimal digits can be stored */
uint precision;
@@ -2011,8 +2123,8 @@ public:
}
int save_in_field(Field *to)
{
- my_decimal buff;
- return to->store_decimal(val_decimal(&buff));
+ my_decimal tmp(ptr, precision, dec);
+ return to->store_decimal(&tmp);
}
bool memcpy_field_possible(const Field *from) const
{
@@ -2031,17 +2143,34 @@ public:
int store(longlong nr, bool unsigned_val);
int store_time_dec(const MYSQL_TIME *ltime, uint dec);
int store_decimal(const my_decimal *);
- double val_real(void);
- longlong val_int(void);
- ulonglong val_uint(void);
+ double val_real(void)
+ {
+ return my_decimal(ptr, precision, dec).to_double();
+ }
+ longlong val_int(void)
+ {
+ return my_decimal(ptr, precision, dec).to_longlong(unsigned_flag);
+ }
+ ulonglong val_uint(void)
+ {
+ return (ulonglong) my_decimal(ptr, precision, dec).to_longlong(true);
+ }
my_decimal *val_decimal(my_decimal *);
- String *val_str(String*, String *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ String *val_str(String *val_buffer, String *val_ptr __attribute__((unused)))
+ {
+ uint fixed_precision= zerofill ? precision : 0;
+ return my_decimal(ptr, precision, dec).
+ to_string(val_buffer, fixed_precision, dec, '0');
+ }
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ {
+ my_decimal nr(ptr, precision, dec);
+ return decimal_to_datetime_with_warn(get_thd(), &nr, ltime,
+ fuzzydate, table->s, field_name.str);
+ }
bool val_bool()
{
- my_decimal decimal_value;
- my_decimal *val= val_decimal(&decimal_value);
- return val ? !my_decimal_is_zero(val) : 0;
+ return my_decimal(ptr, precision, dec).to_bool();
}
int cmp(const uchar *, const uchar *);
void sort_string(uchar *buff, uint length);
@@ -2059,7 +2188,7 @@ public:
uint row_pack_length() const { return pack_length(); }
bool compatible_field_size(uint field_metadata, Relay_log_info *rli,
uint16 mflags, int *order_var);
- uint is_equal(Create_field *new_field);
+ bool is_equal(const Column_definition &new_field) const;
virtual const uchar *unpack(uchar* to, const uchar *from, const uchar *from_end, uint param_data);
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item);
};
@@ -2092,7 +2221,7 @@ public:
return nr < 0 && !unsigned_flag ? 0 : (ulonglong) nr;
}
int store_time_dec(const MYSQL_TIME *ltime, uint dec);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
virtual const Type_limits_int *type_limits_int() const= 0;
uint32 max_display_length() const
{
@@ -2122,6 +2251,12 @@ public:
uint32 prec= type_limits_int()->precision();
return Information_schema_numeric_attributes(prec, 0);
}
+ SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value)
+ {
+ return get_mm_leaf_int(param, key_part, cond, op, value, unsigned_flag);
+ }
};
@@ -2389,8 +2524,8 @@ public:
{}
const Type_handler *type_handler() const { return &type_handler_vers_trx_id; }
uint size_of() const { return sizeof(*this); }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate, ulonglong trx_id);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate, ulonglong trx_id);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
return get_date(ltime, fuzzydate, (ulonglong) val_int());
}
@@ -2497,6 +2632,11 @@ public:
if (dec_arg >= FLOATING_POINT_DECIMALS)
dec_arg= NOT_FIXED_DEC;
}
+ void init_for_tmp_table(Field *org_field, TABLE *new_table)
+ {
+ Field::init_for_tmp_table(org_field, new_table);
+ not_fixed= true;
+ }
const Type_handler *type_handler() const { return &type_handler_double; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_DOUBLE; }
int store(const char *to,size_t length,CHARSET_INFO *charset);
@@ -2558,6 +2698,7 @@ public:
my_decimal *val_decimal(my_decimal *) { return 0; }
String *val_str(String *value,String *value2)
{ value2->length(0); return value2;}
+ bool is_equal(const Column_definition &new_field) const;
int cmp(const uchar *a, const uchar *b) { return 0;}
void sort_string(uchar *buff, uint length) {}
uint32 pack_length() const { return 0; }
@@ -2582,6 +2723,35 @@ class Field_temporal: public Field {
protected:
Item *get_equal_const_item_datetime(THD *thd, const Context &ctx,
Item *const_item);
+ void set_warnings(Sql_condition::enum_warning_level trunc_level,
+ const ErrConv *str, int was_cut, const char *typestr);
+ int store_TIME_return_code_with_warnings(int warn, const ErrConv *str,
+ const char *typestr)
+ {
+ if (!MYSQL_TIME_WARN_HAVE_WARNINGS(warn) &&
+ MYSQL_TIME_WARN_HAVE_NOTES(warn))
+ {
+ set_warnings(Sql_condition::WARN_LEVEL_NOTE, str,
+ warn | MYSQL_TIME_WARN_TRUNCATED, typestr);
+ return 3;
+ }
+ set_warnings(Sql_condition::WARN_LEVEL_WARN, str, warn, typestr);
+ return warn ? 2 : 0;
+ }
+ int store_invalid_with_warning(const ErrConv *str, int was_cut,
+ const char *typestr)
+ {
+ DBUG_ASSERT(was_cut);
+ reset();
+ Sql_condition::enum_warning_level level= Sql_condition::WARN_LEVEL_WARN;
+ if (was_cut & MYSQL_TIME_WARN_ZERO_DATE)
+ {
+ set_warnings(level, str, MYSQL_TIME_WARN_OUT_OF_RANGE, typestr);
+ return 2;
+ }
+ set_warnings(level, str, MYSQL_TIME_WARN_TRUNCATED, typestr);
+ return 1;
+ }
public:
Field_temporal(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg,
@@ -2598,7 +2768,8 @@ public:
int save_in_field(Field *to)
{
MYSQL_TIME ltime;
- if (get_date(&ltime, 0))
+ // For temporal types no truncation needed. Rounding mode is not important.
+ if (get_date(&ltime, TIME_CONV_NONE | TIME_FRAC_NONE))
return to->reset();
return to->store_time_dec(&ltime, decimals());
}
@@ -2611,14 +2782,12 @@ public:
CHARSET_INFO *sort_charset(void) const { return &my_charset_bin; }
bool binary() const { return true; }
bool val_bool() { return val_real() != 0e0; }
- uint is_equal(Create_field *new_field);
+ bool is_equal(const Column_definition &new_field) const;
bool eq_def(const Field *field) const
{
return (Field::eq_def(field) && decimals() == field->decimals());
}
my_decimal *val_decimal(my_decimal*);
- void set_warnings(Sql_condition::enum_warning_level trunc_level,
- const ErrConv *str, int was_cut, timestamp_type ts_type);
double pos_in_interval(Field *min, Field *max)
{
return pos_in_interval_val_real(min, max);
@@ -2633,6 +2802,9 @@ public:
{
return true;
}
+ SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value);
};
@@ -2645,18 +2817,20 @@ public:
*/
class Field_temporal_with_date: public Field_temporal {
protected:
- int store_TIME_with_warning(MYSQL_TIME *ltime, const ErrConv *str,
- int was_cut, int have_smth_to_conv);
- virtual void store_TIME(MYSQL_TIME *ltime) = 0;
+ virtual void store_TIME(const MYSQL_TIME *ltime) = 0;
+ void store_datetime(const Datetime &dt)
+ {
+ return store_TIME(dt.get_mysql_time());
+ }
virtual bool get_TIME(MYSQL_TIME *ltime, const uchar *pos,
- ulonglong fuzzydate) const = 0;
+ date_mode_t fuzzydate) const = 0;
bool validate_MMDD(bool not_zero_date, uint month, uint day,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
if (!not_zero_date)
- return fuzzydate & TIME_NO_ZERO_DATE;
+ return bool(fuzzydate & TIME_NO_ZERO_DATE);
if (!month || !day)
- return fuzzydate & TIME_NO_ZERO_IN_DATE;
+ return bool(fuzzydate & TIME_NO_ZERO_IN_DATE);
return false;
}
public:
@@ -2667,20 +2841,23 @@ public:
:Field_temporal(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg)
{}
- int store(const char *to, size_t length, CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- int store_time_dec(const MYSQL_TIME *ltime, uint dec);
- int store_decimal(const my_decimal *);
bool validate_value_in_record(THD *thd, const uchar *record) const;
};
class Field_timestamp :public Field_temporal {
protected:
- sql_mode_t sql_mode_for_timestamp(THD *thd) const;
- int store_TIME_with_warning(THD *, MYSQL_TIME *, const ErrConv *,
- int warnings, bool have_smth_to_conv);
+ int store_TIME_with_warning(THD *, const Datetime *,
+ const ErrConv *, int warn);
+ virtual void store_TIMEVAL(const timeval &tv)
+ {
+ int4store(ptr, tv.tv_sec);
+ }
+ void store_TIMESTAMP(const Timestamp &ts)
+ {
+ store_TIMEVAL(ts.tv());
+ }
+ int zero_time_stored_return_code_with_warning();
public:
Field_timestamp(uchar *ptr_arg, uint32 len_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
@@ -2690,12 +2867,13 @@ public:
const Type_handler *type_handler() const { return &type_handler_timestamp; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
Copy_func *get_copy_func(const Field *from) const;
+ sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const;
int store(const char *to,size_t length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
int store_time_dec(const MYSQL_TIME *ltime, uint dec);
int store_decimal(const my_decimal *);
- int store_timestamp(my_time_t timestamp, ulong sec_part);
+ int store_timestamp_dec(const timeval &ts, uint dec);
int save_in_field(Field *to);
double val_real(void);
longlong val_int(void);
@@ -2713,11 +2891,19 @@ public:
{
return get_timestamp(ptr, sec_part);
}
- virtual void store_TIME(my_time_t timestamp, ulong sec_part)
+ /*
+ This method is used by storage/perfschema and
+ Item_func_now_local::save_in_field().
+ */
+ void store_TIME(my_time_t ts, ulong sec_part)
{
- int4store(ptr,timestamp);
+ int warn;
+ time_round_mode_t mode= Datetime::default_round_mode(get_thd());
+ store_TIMESTAMP(Timestamp(ts, sec_part).round(decimals(), mode, &warn));
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ int store_native(const Native &value);
+ bool val_native(Native *to);
uchar *pack(uchar *to, const uchar *from,
uint max_length __attribute__((unused)))
{
@@ -2785,6 +2971,7 @@ class Field_timestamp_hires :public Field_timestamp_with_dec {
{
return Type_handler_timestamp::sec_part_bytes(dec);
}
+ void store_TIMEVAL(const timeval &tv);
public:
Field_timestamp_hires(uchar *ptr_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
@@ -2796,8 +2983,8 @@ public:
{
DBUG_ASSERT(dec);
}
+ bool val_native(Native *to);
my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const;
- void store_TIME(my_time_t timestamp, ulong sec_part);
int cmp(const uchar *,const uchar *);
uint32 pack_length() const { return 4 + sec_part_bytes(dec); }
uint size_of() const { return sizeof(*this); }
@@ -2813,6 +3000,7 @@ class Field_timestampf :public Field_timestamp_with_dec {
*metadata_ptr= (uchar) decimals();
return 1;
}
+ void store_TIMEVAL(const timeval &tv);
public:
Field_timestampf(uchar *ptr_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
@@ -2841,12 +3029,12 @@ public:
}
void set_max();
bool is_max();
- void store_TIME(my_time_t timestamp, ulong sec_part);
my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const;
my_time_t get_timestamp(ulong *sec_part) const
{
return get_timestamp(ptr, sec_part);
}
+ bool val_native(Native *to);
uint size_of() const { return sizeof(*this); }
};
@@ -2859,7 +3047,10 @@ public:
:Field_tiny(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, 1, 1)
{}
- const Type_handler *type_handler() const { return &type_handler_year; }
+ const Type_handler *type_handler() const
+ {
+ return field_length == 2 ? &type_handler_year2 : &type_handler_year;
+ }
Copy_func *get_copy_func(const Field *from) const
{
if (eq_def(from))
@@ -2873,7 +3064,7 @@ public:
return do_field_string;
}
case TIME_RESULT:
- return do_field_temporal;
+ return do_field_date;
case DECIMAL_RESULT:
return do_field_decimal;
case REAL_RESULT:
@@ -2894,7 +3085,7 @@ public:
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool send_binary(Protocol *protocol);
Information_schema_numeric_attributes
information_schema_numeric_attributes() const
@@ -2906,18 +3097,44 @@ public:
};
-class Field_date :public Field_temporal_with_date {
- void store_TIME(MYSQL_TIME *ltime);
- bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, ulonglong fuzzydate) const;
+class Field_date_common: public Field_temporal_with_date
+{
+protected:
+ int store_TIME_with_warning(const Datetime *ltime, const ErrConv *str,
+ int was_cut);
+public:
+ Field_date_common(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
+ enum utype unireg_check_arg,
+ const LEX_CSTRING *field_name_arg)
+ :Field_temporal_with_date(ptr_arg, MAX_DATE_WIDTH,
+ null_ptr_arg, null_bit_arg,
+ unireg_check_arg, field_name_arg)
+ {}
+ Copy_func *get_copy_func(const Field *from) const;
+ SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value);
+ int store(const char *to, size_t length, CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int store_time_dec(const MYSQL_TIME *ltime, uint dec);
+ int store_decimal(const my_decimal *);
+};
+
+
+class Field_date :public Field_date_common
+{
+ void store_TIME(const MYSQL_TIME *ltime);
+ bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate) const;
public:
Field_date(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg)
- :Field_temporal_with_date(ptr_arg, MAX_DATE_WIDTH, null_ptr_arg, null_bit_arg,
- unireg_check_arg, field_name_arg) {}
+ :Field_date_common(ptr_arg, null_ptr_arg, null_bit_arg,
+ unireg_check_arg, field_name_arg) {}
const Type_handler *type_handler() const { return &type_handler_date; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
int reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{ return Field_date::get_TIME(ltime, ptr, fuzzydate); }
double val_real(void);
longlong val_int(void);
@@ -2941,14 +3158,15 @@ public:
};
-class Field_newdate :public Field_temporal_with_date {
- void store_TIME(MYSQL_TIME *ltime);
- bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, ulonglong fuzzydate) const;
+class Field_newdate :public Field_date_common
+{
+ void store_TIME(const MYSQL_TIME *ltime);
+ bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate) const;
public:
Field_newdate(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg)
- :Field_temporal_with_date(ptr_arg, MAX_DATE_WIDTH, null_ptr_arg, null_bit_arg,
- unireg_check_arg, field_name_arg)
+ :Field_date_common(ptr_arg, null_ptr_arg, null_bit_arg,
+ unireg_check_arg, field_name_arg)
{}
const Type_handler *type_handler() const { return &type_handler_newdate; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; }
@@ -2961,8 +3179,9 @@ public:
void sort_string(uchar *buff,uint length);
uint32 pack_length() const { return 3; }
void sql_type(String &str) const;
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{ return Field_newdate::get_TIME(ltime, ptr, fuzzydate); }
+ longlong val_datetime_packed(THD *thd);
uint size_of() const { return sizeof(*this); }
Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item);
};
@@ -2977,14 +3196,12 @@ class Field_time :public Field_temporal {
long curdays;
protected:
virtual void store_TIME(const MYSQL_TIME *ltime);
- int store_TIME_with_warning(MYSQL_TIME *ltime, const ErrConv *str,
- int was_cut, int have_smth_to_conv);
- void set_warnings(Sql_condition::enum_warning_level level,
- const ErrConv *str, int was_cut)
+ void store_TIME(const Time &t)
{
- Field_temporal::set_warnings(level, str, was_cut, MYSQL_TIMESTAMP_TIME);
+ return store_TIME(t.get_mysql_time());
}
- bool check_zero_in_date_with_warn(ulonglong fuzzydate);
+ int store_TIME_with_warning(const Time *ltime, const ErrConv *str, int warn);
+ bool check_zero_in_date_with_warn(date_mode_t fuzzydate);
static void do_field_time(Copy_field *copy);
public:
Field_time(uchar *ptr_arg, uint length_arg, uchar *null_ptr_arg,
@@ -3010,6 +3227,9 @@ public:
return real_type() == from->real_type() &&
decimals() == from->decimals();
}
+ sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const;
+ int store_native(const Native &value);
+ bool val_native(Native *to);
int store_time_dec(const MYSQL_TIME *ltime, uint dec);
int store(const char *to,size_t length,CHARSET_INFO *charset);
int store(double nr);
@@ -3018,7 +3238,7 @@ public:
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool send_binary(Protocol *protocol);
int cmp(const uchar *,const uchar *);
void sort_string(uchar *buff,uint length);
@@ -3079,7 +3299,7 @@ public:
((TIME_MAX_VALUE_SECONDS+1LL)*TIME_SECOND_PART_FACTOR), dec);
}
int reset(void);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
int cmp(const uchar *,const uchar *);
void sort_string(uchar *buff,uint length);
uint32 pack_length() const { return Type_handler_time::hires_bytes(dec); }
@@ -3130,14 +3350,20 @@ public:
return memcmp(a_ptr, b_ptr, pack_length());
}
int reset();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ longlong val_time_packed(THD *thd);
+ int store_native(const Native &value);
+ bool val_native(Native *to);
uint size_of() const { return sizeof(*this); }
};
class Field_datetime :public Field_temporal_with_date {
- void store_TIME(MYSQL_TIME *ltime);
- bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, ulonglong fuzzydate) const;
+ void store_TIME(const MYSQL_TIME *ltime);
+ bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate) const;
+protected:
+ int store_TIME_with_warning(const Datetime *ltime, const ErrConv *str,
+ int was_cut);
public:
Field_datetime(uchar *ptr_arg, uint length_arg, uchar *null_ptr_arg,
uchar null_bit_arg, enum utype unireg_check_arg,
@@ -3151,6 +3377,12 @@ public:
}
const Type_handler *type_handler() const { return &type_handler_datetime; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; }
+ sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const;
+ int store(const char *to, size_t length, CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int store_time_dec(const MYSQL_TIME *ltime, uint dec);
+ int store_decimal(const my_decimal *);
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -3159,7 +3391,7 @@ public:
void sort_string(uchar *buff,uint length);
uint32 pack_length() const { return 8; }
void sql_type(String &str) const;
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{ return Field_datetime::get_TIME(ltime, ptr, fuzzydate); }
int set_time();
uchar *pack(uchar* to, const uchar *from,
@@ -3222,8 +3454,8 @@ public:
DATETIME(1..6)
*/
class Field_datetime_hires :public Field_datetime_with_dec {
- void store_TIME(MYSQL_TIME *ltime);
- bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, ulonglong fuzzydate) const;
+ void store_TIME(const MYSQL_TIME *ltime);
+ bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate) const;
public:
Field_datetime_hires(uchar *ptr_arg, uchar *null_ptr_arg,
uchar null_bit_arg, enum utype unireg_check_arg,
@@ -3235,7 +3467,7 @@ public:
}
int cmp(const uchar *,const uchar *);
uint32 pack_length() const { return Type_handler_datetime::hires_bytes(dec); }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{ return Field_datetime_hires::get_TIME(ltime, ptr, fuzzydate); }
uint size_of() const { return sizeof(*this); }
};
@@ -3245,8 +3477,8 @@ public:
DATETIME(0..6) - MySQL56 version
*/
class Field_datetimef :public Field_datetime_with_dec {
- void store_TIME(MYSQL_TIME *ltime);
- bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, ulonglong fuzzydate) const;
+ void store_TIME(const MYSQL_TIME *ltime);
+ bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, date_mode_t fuzzydate) const;
int save_field_metadata(uchar *metadata_ptr)
{
*metadata_ptr= (uchar) decimals();
@@ -3277,8 +3509,9 @@ public:
return memcmp(a_ptr, b_ptr, pack_length());
}
int reset();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate)
{ return Field_datetimef::get_TIME(ltime, ptr, fuzzydate); }
+ longlong val_datetime_packed(THD *thd);
uint size_of() const { return sizeof(*this); }
};
@@ -3387,6 +3620,11 @@ public:
void sort_string(uchar *buff,uint length);
void sql_type(String &str) const;
void sql_rpl_type(String*) const;
+ bool is_equal(const Column_definition &new_field) const;
+ bool can_be_converted_by_engine(const Column_definition &new_type) const
+ {
+ return table->file->can_convert_string(this, new_type);
+ }
virtual uchar *pack(uchar *to, const uchar *from,
uint max_length);
virtual const uchar *unpack(uchar* to, const uchar *from,
@@ -3413,6 +3651,7 @@ public:
virtual uint get_key_image(uchar *buff,uint length, imagetype type);
sql_mode_t value_depends_on_sql_mode() const;
sql_mode_t can_handle_sql_mode_dependency_on_store() const;
+ void print_key_value(String *out, uint32 length);
private:
int save_field_metadata(uchar *first_byte);
};
@@ -3511,9 +3750,14 @@ public:
Field *new_key_field(MEM_ROOT *root, TABLE *new_table,
uchar *new_ptr, uint32 length,
uchar *new_null_ptr, uint new_null_bit);
- uint is_equal(Create_field *new_field);
+ bool is_equal(const Column_definition &new_field) const;
+ bool can_be_converted_by_engine(const Column_definition &new_type) const
+ {
+ return table->file->can_convert_varstring(this, new_type);
+ }
void hash(ulong *nr, ulong *nr2);
- uint length_size() { return length_bytes; }
+ uint length_size() const { return length_bytes; }
+ void print_key_value(String *out, uint32 length);
private:
int save_field_metadata(uchar *first_byte);
};
@@ -3549,6 +3793,7 @@ private:
str.append(STRING_WITH_LEN(" /*!100301 COMPRESSED*/"));
}
uint32 max_display_length() const { return field_length - 1; }
+ uint32 character_octet_length() const { return field_length - 1; }
uint32 char_length() const
{
return (field_length - 1) / field_charset->mbmaxlen;
@@ -3681,10 +3926,11 @@ public:
Information_schema_character_attributes
information_schema_character_attributes() const
{
- uint32 octets= Field_blob::octet_length();
+ uint32 octets= Field_blob::character_octet_length();
uint32 chars= octets / field_charset->mbminlen;
return Information_schema_character_attributes(octets, chars);
}
+ void make_send_field(Send_field *);
Copy_func *get_copy_func(const Field *from) const
{
/*
@@ -3713,6 +3959,7 @@ public:
!compression_method() == !from->compression_method() &&
!table->copy_blobs;
}
+ bool make_empty_rec_store_default_value(THD *thd, Item *item);
int store(const char *to, size_t length, CHARSET_INFO *charset);
using Field_str::store;
double val_real(void);
@@ -3879,8 +4126,13 @@ public:
{ return charset() == &my_charset_bin ? FALSE : TRUE; }
uint32 max_display_length() const;
uint32 char_length() const;
- uint32 octet_length() const;
- uint is_equal(Create_field *new_field);
+ uint32 character_octet_length() const;
+ bool is_equal(const Column_definition &new_field) const;
+ bool can_be_converted_by_engine(const Column_definition &new_type) const
+ {
+ return table->file->can_convert_blob(this, new_type);
+ }
+ void print_key_value(String *out, uint32 length);
friend void TABLE::remember_blob_values(String *blob_storage);
friend void TABLE::restore_blob_values(String *blob_storage);
@@ -3971,11 +4223,35 @@ public:
{
return Information_schema_character_attributes();
}
+ void make_send_field(Send_field *to)
+ {
+ Field_longstr::make_send_field(to);
+ }
bool can_optimize_range(const Item_bool_func *cond,
const Item *item,
bool is_eq_func) const;
void sql_type(String &str) const;
- uint is_equal(Create_field *new_field);
+ Copy_func *get_copy_func(const Field *from) const
+ {
+ if (type_handler() == from->type_handler() &&
+ (geom_type == GEOM_GEOMETRY ||
+ geom_type == static_cast<const Field_geom*>(from)->geom_type))
+ return get_identical_copy_func();
+ return do_conv_blob;
+ }
+ bool memcpy_field_possible(const Field *from) const
+ {
+ return type_handler() == from->type_handler() &&
+ (geom_type == GEOM_GEOMETRY ||
+ geom_type == static_cast<const Field_geom*>(from)->geom_type) &&
+ !table->copy_blobs;
+ }
+ bool is_equal(const Column_definition &new_field) const;
+ bool can_be_converted_by_engine(const Column_definition &new_type) const
+ {
+ return table->file->can_convert_geom(this, new_type);
+ }
+
int store(const char *to, size_t length, CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
@@ -3998,9 +4274,13 @@ public:
bool load_data_set_null(THD *thd);
bool load_data_set_no_data(THD *thd, bool fixed_format);
- geometry_type get_geometry_type() { return geom_type; };
+ geometry_type get_geometry_type() const { return geom_type; };
static geometry_type geometry_type_merge(geometry_type, geometry_type);
uint get_srid() { return srid; }
+ void print_key_value(String *out, uint32 length)
+ {
+ out->append(STRING_WITH_LEN("unprintable_geometry_value"));
+ }
};
uint gis_field_options_image(uchar *buff, List<Create_field> &create_fields);
@@ -4061,6 +4341,16 @@ public:
return save_in_field_str(to);
}
bool memcpy_field_possible(const Field *from) const { return false; }
+ void make_empty_rec_reset(THD *thd)
+ {
+ if (flags & NOT_NULL_FLAG)
+ {
+ set_notnull();
+ store((longlong) 1, true);
+ }
+ else
+ reset();
+ }
int store(const char *to,size_t length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
@@ -4114,7 +4404,7 @@ public:
}
private:
int save_field_metadata(uchar *first_byte);
- uint is_equal(Create_field *new_field);
+ bool is_equal(const Column_definition &new_field) const;
};
@@ -4133,6 +4423,11 @@ public:
{
flags=(flags & ~ENUM_FLAG) | SET_FLAG;
}
+ void make_empty_rec_reset(THD *thd)
+ {
+ Field::make_empty_rec_reset(thd);
+ }
+
int store_field(Field *from) { return from->save_in_field(this); }
int store(const char *to,size_t length,CHARSET_INFO *charset);
int store(double nr) { return Field_set::store((longlong) nr, FALSE); }
@@ -4221,7 +4516,7 @@ public:
int key_cmp(const uchar *a, const uchar *b)
{ return cmp_binary((uchar *) a, (uchar *) b); }
int key_cmp(const uchar *str, uint length);
- int cmp_offset(uint row_offset);
+ int cmp_offset(my_ptrdiff_t row_offset);
bool update_min(Field *min_val, bool force_update)
{
longlong val= val_int();
@@ -4288,14 +4583,31 @@ public:
bit_ptr == ((Field_bit *)field)->bit_ptr &&
bit_ofs == ((Field_bit *)field)->bit_ofs);
}
- uint is_equal(Create_field *new_field);
+ bool is_equal(const Column_definition &new_field) const;
void move_field_offset(my_ptrdiff_t ptr_diff)
{
Field::move_field_offset(ptr_diff);
- bit_ptr= ADD_TO_PTR(bit_ptr, ptr_diff, uchar*);
+
+ /*
+ clang does not like when things are added to a null pointer, even if
+ it is never referenced.
+ */
+ if (bit_ptr)
+ bit_ptr= ADD_TO_PTR(bit_ptr, ptr_diff, uchar*);
}
void hash(ulong *nr, ulong *nr2);
+ SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value)
+ {
+ return get_mm_leaf_int(param, key_part, cond, op, value, true);
+ }
+ void print_key_value(String *out, uint32 length)
+ {
+ val_int_as_str(out, 1);
+ }
+
private:
virtual size_t do_last_null_byte() const;
int save_field_metadata(uchar *first_byte);
@@ -4340,21 +4652,58 @@ public:
extern const LEX_CSTRING null_clex_str;
-Field *make_field(TABLE_SHARE *share, MEM_ROOT *mem_root,
- uchar *ptr, uint32 field_length,
- uchar *null_pos, uchar null_bit,
- uint pack_flag, const Type_handler *handler,
- CHARSET_INFO *cs,
- Field::geometry_type geom_type, uint srid,
- Field::utype unireg_check,
- TYPELIB *interval, const LEX_CSTRING *field_name,
- uint32 flags);
+class Column_definition_attributes
+{
+public:
+ /*
+ At various stages in execution this can be length of field in bytes or
+ max number of characters.
+ */
+ ulonglong length;
+ Field::utype unireg_check;
+ TYPELIB *interval; // Which interval to use
+ CHARSET_INFO *charset;
+ uint32 srid;
+ Field::geometry_type geom_type;
+ uint pack_flag;
+ Column_definition_attributes()
+ :length(0),
+ unireg_check(Field::NONE),
+ interval(NULL),
+ charset(&my_charset_bin),
+ srid(0),
+ geom_type(Field::GEOM_GEOMETRY),
+ pack_flag(0)
+ { }
+ Column_definition_attributes(const Field *field);
+ Field *make_field(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const Record_addr *rec,
+ const Type_handler *handler,
+ const LEX_CSTRING *field_name,
+ uint32 flags) const;
+ uint temporal_dec(uint intlen) const
+ {
+ return (uint) (length > intlen ? length - intlen - 1 : 0);
+ }
+ uint pack_flag_to_pack_length() const;
+ void frm_pack_basic(uchar *buff) const;
+ void frm_pack_charset(uchar *buff) const;
+ void frm_unpack_basic(const uchar *buff);
+ bool frm_unpack_charset(TABLE_SHARE *share, const uchar *buff);
+ CHARSET_INFO *explicit_or_derived_charset(const Column_derived_attributes
+ *derived_attr) const
+ {
+ return charset ? charset : derived_attr->charset();
+ }
+};
+
/*
Create field class for CREATE TABLE
*/
class Column_definition: public Sql_alloc,
- public Type_handler_hybrid_field_type
+ public Type_handler_hybrid_field_type,
+ public Column_definition_attributes
{
/**
Create "interval" from "interval_list".
@@ -4409,11 +4758,6 @@ public:
WITHOUT_VERSIONING
};
Item *on_update; // ON UPDATE NOW()
- /*
- At various stages in execution this can be length of field in bytes or
- max number of characters.
- */
- ulonglong length;
field_visibility_t invisible;
/*
The value of `length' as set by parser: is the number of characters
@@ -4421,15 +4765,9 @@ public:
*/
uint32 char_length;
uint decimals, flags, pack_length, key_length;
- Field::utype unireg_check;
- TYPELIB *interval; // Which interval to use
List<String> interval_list;
- CHARSET_INFO *charset;
- uint32 srid;
- Field::geometry_type geom_type;
engine_option_value *option_list;
- uint pack_flag;
/*
This is additinal data provided for any computed(virtual) field.
@@ -4443,18 +4781,17 @@ public:
enum_column_versioning versioning;
+ Table_period_info *period;
+
Column_definition()
:Type_handler_hybrid_field_type(&type_handler_null),
compression_method_ptr(0),
comment(null_clex_str),
- on_update(NULL), length(0), invisible(VISIBLE), char_length(0),
- decimals(0),
- flags(0), pack_length(0), key_length(0), unireg_check(Field::NONE),
- interval(0), charset(&my_charset_bin),
- srid(0), geom_type(Field::GEOM_GEOMETRY),
- option_list(NULL), pack_flag(0),
+ on_update(NULL), invisible(VISIBLE), char_length(0), decimals(0),
+ flags(0), pack_length(0), key_length(0),
+ option_list(NULL),
vcol_info(0), default_value(0), check_constraint(0),
- versioning(VERSIONING_NOT_SET)
+ versioning(VERSIONING_NOT_SET), period(NULL)
{
interval_list.empty();
}
@@ -4492,6 +4829,15 @@ public:
void create_length_to_internal_length_bit();
void create_length_to_internal_length_newdecimal();
+ /*
+ Prepare the "charset" member for string data types,
+ such as CHAR, VARCHAR, TEXT, ENUM, SET:
+ - derive the charset if not specified explicitly
+ - find a _bin collation if the BINARY comparison style was specified, e.g.:
+ CREATE TABLE t1 (a VARCHAR(10) BINARY) CHARSET utf8;
+ */
+ bool prepare_charset_for_string(const Column_derived_attributes *dattr);
+
/**
Prepare a SET/ENUM field.
Create "interval" from "interval_list" if needed, and adjust "length".
@@ -4527,7 +4873,13 @@ public:
bool sp_prepare_create_field(THD *thd, MEM_ROOT *mem_root);
bool prepare_stage1(THD *thd, MEM_ROOT *mem_root,
- handler *file, ulonglong table_flags);
+ handler *file, ulonglong table_flags,
+ const Column_derived_attributes *derived_attr);
+ void prepare_stage1_simple(CHARSET_INFO *cs)
+ {
+ charset= cs;
+ create_length_to_internal_length_simple();
+ }
bool prepare_stage1_typelib(THD *thd, MEM_ROOT *mem_root,
handler *file, ulonglong table_flags);
bool prepare_stage1_string(THD *thd, MEM_ROOT *mem_root,
@@ -4535,15 +4887,19 @@ public:
bool prepare_stage1_bit(THD *thd, MEM_ROOT *mem_root,
handler *file, ulonglong table_flags);
+ bool bulk_alter(const Column_derived_attributes *derived_attr,
+ const Column_bulk_alter_attributes *bulk_attr)
+ {
+ return type_handler()->Column_definition_bulk_alter(this,
+ derived_attr,
+ bulk_attr);
+ }
void redefine_stage1_common(const Column_definition *dup_field,
- const handler *file,
- const Schema_specification_st *schema);
- bool redefine_stage1(const Column_definition *dup_field, const handler *file,
- const Schema_specification_st *schema)
+ const handler *file);
+ bool redefine_stage1(const Column_definition *dup_field, const handler *file)
{
const Type_handler *handler= dup_field->type_handler();
- return handler->Column_definition_redefine_stage1(this, dup_field,
- file, schema);
+ return handler->Column_definition_redefine_stage1(this, dup_field, file);
}
bool prepare_stage2(handler *handler, ulonglong table_flags);
bool prepare_stage2_blob(handler *handler,
@@ -4561,6 +4917,7 @@ public:
bool fix_attributes_bit();
bool check(THD *thd);
+ bool validate_check_constraint(THD *thd);
bool stored_in_db() const { return !vcol_info || vcol_info->stored_in_db; }
@@ -4582,20 +4939,18 @@ public:
}
Field *make_field(TABLE_SHARE *share, MEM_ROOT *mem_root,
- uchar *ptr, uchar *null_pos, uchar null_bit,
+ const Record_addr *addr,
const LEX_CSTRING *field_name_arg) const
{
- return ::make_field(share, mem_root, ptr,
- (uint32)length, null_pos, null_bit,
- pack_flag, type_handler(), charset,
- geom_type, srid, unireg_check, interval,
- field_name_arg, flags);
+ return Column_definition_attributes::make_field(share, mem_root, addr,
+ type_handler(),
+ field_name_arg, flags);
}
Field *make_field(TABLE_SHARE *share, MEM_ROOT *mem_root,
const LEX_CSTRING *field_name_arg) const
{
- return make_field(share, mem_root, (uchar *) 0, (uchar *) "", 0,
- field_name_arg);
+ Record_addr addr(true);
+ return make_field(share, mem_root, &addr, field_name_arg);
}
/* Return true if default is an expression that must be saved explicitely */
bool has_default_expression();
@@ -4667,6 +5022,14 @@ public:
}
return 0;
}
+ static Row_definition_list *make(MEM_ROOT *mem_root, Spvar_definition *var)
+ {
+ Row_definition_list *list;
+ if (!(list= new (mem_root) Row_definition_list()))
+ return NULL;
+ return list->push_back(var, mem_root) ? NULL : list;
+ }
+ bool append_uniq(MEM_ROOT *thd, Spvar_definition *var);
bool adjust_formal_params_to_actual_params(THD *thd, List<Item> *args);
bool adjust_formal_params_to_actual_params(THD *thd,
Item **args, uint arg_count);
@@ -4811,7 +5174,7 @@ public:
/** structure with parsed options (for comparing fields in ALTER TABLE) */
ha_field_option_struct *option_struct;
uint offset;
- uint8 interval_id; // For rea_create_table
+ uint8 interval_id;
bool create_if_not_exists; // Used in ALTER TABLE IF NOT EXISTS
Create_field():
@@ -4847,15 +5210,86 @@ public:
A class for sending info to the client
*/
-class Send_field :public Sql_alloc {
- public:
+class Send_field :public Sql_alloc,
+ public Type_handler_hybrid_field_type
+{
+public:
const char *db_name;
const char *table_name,*org_table_name;
LEX_CSTRING col_name, org_col_name;
ulong length;
uint flags, decimals;
- enum_field_types type;
Send_field() {}
+ Send_field(Field *field)
+ {
+ field->make_send_field(this);
+ DBUG_ASSERT(table_name != 0);
+ normalize();
+ }
+ Send_field(THD *thd, Item *item);
+ Send_field(Field *field,
+ const char *db_name_arg,
+ const char *table_name_arg)
+ :Type_handler_hybrid_field_type(field->type_handler()),
+ db_name(db_name_arg),
+ table_name(table_name_arg),
+ org_table_name(table_name_arg),
+ col_name(field->field_name),
+ org_col_name(field->field_name),
+ length(field->field_length),
+ flags(field->table->maybe_null ?
+ (field->flags & ~NOT_NULL_FLAG) : field->flags),
+ decimals(field->decimals())
+ {
+ normalize();
+ }
+
+private:
+ void normalize()
+ {
+ /* limit number of decimals for float and double */
+ if (type_handler()->field_type() == MYSQL_TYPE_FLOAT ||
+ type_handler()->field_type() == MYSQL_TYPE_DOUBLE)
+ set_if_smaller(decimals, FLOATING_POINT_DECIMALS);
+ }
+public:
+ // This should move to Type_handler eventually
+ uint32 max_char_length(CHARSET_INFO *cs) const
+ {
+ return type_handler()->field_type() >= MYSQL_TYPE_TINY_BLOB &&
+ type_handler()->field_type() <= MYSQL_TYPE_BLOB ?
+ length / cs->mbminlen :
+ length / cs->mbmaxlen;
+ }
+ uint32 max_octet_length(CHARSET_INFO *from, CHARSET_INFO *to) const
+ {
+ /*
+ For TEXT/BLOB columns, field_length describes the maximum data
+ length in bytes. There is no limit to the number of characters
+ that a TEXT column can store, as long as the data fits into
+ the designated space.
+ For the rest of textual columns, field_length is evaluated as
+ char_count * mbmaxlen, where character count is taken from the
+ definition of the column. In other words, the maximum number
+ of characters here is limited by the column definition.
+
+ When one has a LONG TEXT column with a single-byte
+ character set, and the connection character set is multi-byte, the
+ client may get fields longer than UINT_MAX32, due to
+ <character set column> -> <character set connection> conversion.
+ In that case column max length would not fit into the 4 bytes
+ reserved for it in the protocol. So we cut it here to UINT_MAX32.
+ */
+ return char_to_byte_length_safe(max_char_length(from), to->mbmaxlen);
+ }
+
+ // This should move to Type_handler eventually
+ bool is_sane() const
+ {
+ return (decimals <= FLOATING_POINT_DECIMALS ||
+ (type_handler()->field_type() != MYSQL_TYPE_FLOAT &&
+ type_handler()->field_type() != MYSQL_TYPE_DOUBLE));
+ }
};
@@ -4930,7 +5364,7 @@ bool check_expression(Virtual_column_info *vcol, LEX_CSTRING *name,
#define FIELDFLAG_DEC_SHIFT 8
#define FIELDFLAG_MAX_DEC 63U
-#define MTYP_TYPENR(type) (type & 127U) /* Remove bits from type */
+#define MTYP_TYPENR(type) ((type) & 127U) // Remove bits from type
#define f_is_dec(x) ((x) & FIELDFLAG_DECIMAL)
#define f_is_num(x) ((x) & FIELDFLAG_NUMBER)
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 88fdb1387a3..7ec93e032e6 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -413,8 +413,8 @@ void Field::do_field_real(Copy_field *copy)
void Field::do_field_decimal(Copy_field *copy)
{
- my_decimal value;
- copy->to_field->store_decimal(copy->from_field->val_decimal(&value));
+ my_decimal value(copy->from_field);
+ copy->to_field->store_decimal(&value);
}
@@ -425,24 +425,32 @@ void Field::do_field_timestamp(Copy_field *copy)
}
-void Field::do_field_temporal(Copy_field *copy)
+void Field::do_field_temporal(Copy_field *copy, date_mode_t fuzzydate)
{
MYSQL_TIME ltime;
// TODO: we now need to check result
- if (copy->from_field->get_date(&ltime, 0))
+ if (copy->from_field->get_date(&ltime, fuzzydate))
copy->to_field->reset();
else
copy->to_field->store_time_dec(&ltime, copy->from_field->decimals());
}
+void Field::do_field_datetime(Copy_field *copy)
+{
+ return do_field_temporal(copy, Datetime::Options(TIME_CONV_NONE, current_thd));
+}
+
+
+void Field::do_field_date(Copy_field *copy)
+{
+ return do_field_temporal(copy, Date::Options(TIME_CONV_NONE));
+}
+
+
void Field_time::do_field_time(Copy_field *copy)
{
- MYSQL_TIME ltime;
- if (copy->from_field->get_date(&ltime, TIME_TIME_ONLY))
- copy->to_field->reset();
- else
- copy->to_field->store_time_dec(&ltime, copy->from_field->decimals());
+ return do_field_temporal(copy, Time::Options(current_thd));
}
@@ -720,13 +728,20 @@ void Copy_field::set(Field *to,Field *from,bool save)
Field::Copy_func *Field_timestamp::get_copy_func(const Field *from) const
{
Field::Copy_func *copy= Field_temporal::get_copy_func(from);
- if (copy == do_field_temporal && from->type() == MYSQL_TYPE_TIMESTAMP)
+ if (copy == do_field_datetime && from->type() == MYSQL_TYPE_TIMESTAMP)
return do_field_timestamp;
else
return copy;
}
+Field::Copy_func *Field_date_common::get_copy_func(const Field *from) const
+{
+ Field::Copy_func *copy= Field_temporal::get_copy_func(from);
+ return copy == do_field_datetime ? do_field_date : copy;
+}
+
+
Field::Copy_func *Field_temporal::get_copy_func(const Field *from) const
{
/* If types are not 100 % identical then convert trough get_date() */
@@ -739,7 +754,7 @@ Field::Copy_func *Field_temporal::get_copy_func(const Field *from) const
if (!eq_def(from) ||
(table->in_use->variables.sql_mode &
(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE)))
- return do_field_temporal;
+ return do_field_datetime;
return get_identical_copy_func();
}
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 98d5bbcb14c..ee19dfcb386 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -55,9 +55,7 @@ static bool save_index(Sort_param *param, uint count,
static uint suffix_length(ulong string_length);
static uint sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
bool *multi_byte_charset);
-static SORT_ADDON_FIELD *get_addon_fields(ulong max_length_for_sort_data,
- Field **ptabfield,
- uint sortlength,
+static SORT_ADDON_FIELD *get_addon_fields(TABLE *table, uint sortlength,
LEX_STRING *addon_buf);
static void unpack_addon_fields(struct st_sort_addon_field *addon_field,
uchar *buff, uchar *buff_end);
@@ -66,7 +64,6 @@ static bool check_if_pq_applicable(Sort_param *param, SORT_INFO *info,
ha_rows records, size_t memory_available);
void Sort_param::init_for_filesort(uint sortlen, TABLE *table,
- ulong max_length_for_sort_data,
ha_rows maxrows, bool sort_positions)
{
DBUG_ASSERT(addon_field == 0 && addon_buf.length == 0);
@@ -80,8 +77,7 @@ void Sort_param::init_for_filesort(uint sortlen, TABLE *table,
Get the descriptors of all fields whose values are appended
to sorted fields and get its total length in addon_buf.length
*/
- addon_field= get_addon_fields(max_length_for_sort_data,
- table->field, sort_length, &addon_buf);
+ addon_field= get_addon_fields(table, sort_length, &addon_buf);
}
if (addon_field)
{
@@ -185,9 +181,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
param.init_for_filesort(sortlength(thd, filesort->sortorder, s_length,
&multi_byte_charset),
- table,
- thd->variables.max_length_for_sort_data,
- max_rows, filesort->sort_positions);
+ table, max_rows, filesort->sort_positions);
sort->addon_buf= param.addon_buf;
sort->addon_field= param.addon_field;
@@ -254,7 +248,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
}
if (memory_available < min_sort_memory)
{
- my_error(ER_OUT_OF_SORTMEMORY,MYF(ME_ERROR + ME_FATALERROR));
+ my_error(ER_OUT_OF_SORTMEMORY,MYF(ME_ERROR_LOG + ME_FATAL));
goto err;
}
tracker->report_sort_buffer_size(sort->sort_buffer_size());
@@ -723,7 +717,7 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
uchar *ref_pos, *next_pos, ref_buff[MAX_REFLENGTH];
TABLE *sort_form;
handler *file;
- MY_BITMAP *save_read_set, *save_write_set, *save_vcol_set;
+ MY_BITMAP *save_read_set, *save_write_set;
Item *sort_cond;
ha_rows retval;
DBUG_ENTER("find_all_keys");
@@ -758,13 +752,11 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
/* Remember original bitmaps */
save_read_set= sort_form->read_set;
save_write_set= sort_form->write_set;
- save_vcol_set= sort_form->vcol_set;
/* Set up temporary column read map for columns used by sort */
DBUG_ASSERT(save_read_set != &sort_form->tmp_set);
bitmap_clear_all(&sort_form->tmp_set);
- sort_form->column_bitmaps_set(&sort_form->tmp_set, &sort_form->tmp_set,
- &sort_form->tmp_set);
+ sort_form->column_bitmaps_set(&sort_form->tmp_set, &sort_form->tmp_set);
register_used_fields(param);
if (quick_select)
select->quick->add_used_key_part_to_set();
@@ -822,16 +814,12 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
*/
MY_BITMAP *tmp_read_set= sort_form->read_set;
MY_BITMAP *tmp_write_set= sort_form->write_set;
- MY_BITMAP *tmp_vcol_set= sort_form->vcol_set;
if (select->cond->with_subquery())
- sort_form->column_bitmaps_set(save_read_set, save_write_set,
- save_vcol_set);
+ sort_form->column_bitmaps_set(save_read_set, save_write_set);
write_record= (select->skip_record(thd) > 0);
if (select->cond->with_subquery())
- sort_form->column_bitmaps_set(tmp_read_set,
- tmp_write_set,
- tmp_vcol_set);
+ sort_form->column_bitmaps_set(tmp_read_set, tmp_write_set);
}
else
write_record= true;
@@ -877,7 +865,7 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
}
/* Signal we should use original column read and write maps */
- sort_form->column_bitmaps_set(save_read_set, save_write_set, save_vcol_set);
+ sort_form->column_bitmaps_set(save_read_set, save_write_set);
if (unlikely(thd->is_error()))
DBUG_RETURN(HA_POS_ERROR);
@@ -885,8 +873,8 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
DBUG_PRINT("test",("error: %d indexpos: %d",error,indexpos));
if (unlikely(error != HA_ERR_END_OF_FILE))
{
- file->print_error(error,MYF(ME_ERROR | ME_WAITTANG)); // purecov: inspected
- DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */
+ file->print_error(error,MYF(ME_ERROR_LOG));
+ DBUG_RETURN(HA_POS_ERROR);
}
if (indexpos && idx &&
write_keys(param, fs_info, idx, buffpek_pointers, tempfile))
@@ -898,7 +886,7 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
DBUG_RETURN(retval);
err:
- sort_form->column_bitmaps_set(save_read_set, save_write_set, save_vcol_set);
+ sort_form->column_bitmaps_set(save_read_set, save_write_set);
DBUG_RETURN(HA_POS_ERROR);
} /* find_all_keys */
@@ -1076,7 +1064,10 @@ Type_handler_temporal_result::make_sort_key(uchar *to, Item *item,
Sort_param *param) const
{
MYSQL_TIME buf;
- if (item->get_date_result(&buf, TIME_INVALID_DATES))
+ // This is a temporal type. No nanoseconds. Rounding mode is not important.
+ DBUG_ASSERT(item->cmp_type() == TIME_RESULT);
+ static const Temporal::Options opt(TIME_INVALID_DATES, TIME_FRAC_NONE);
+ if (item->get_date_result(current_thd, &buf, opt))
{
DBUG_ASSERT(item->maybe_null);
DBUG_ASSERT(item->null_value);
@@ -1090,6 +1081,39 @@ Type_handler_temporal_result::make_sort_key(uchar *to, Item *item,
void
+Type_handler_timestamp_common::make_sort_key(uchar *to, Item *item,
+ const SORT_FIELD_ATTR *sort_field,
+ Sort_param *param) const
+{
+ THD *thd= current_thd;
+ uint binlen= my_timestamp_binary_length(item->decimals);
+ Timestamp_or_zero_datetime_native_null native(thd, item);
+ if (native.is_null() || native.is_zero_datetime())
+ {
+ // NULL or '0000-00-00 00:00:00'
+ bzero(to, item->maybe_null ? binlen + 1 : binlen);
+ }
+ else
+ {
+ if (item->maybe_null)
+ *to++= 1;
+ if (native.length() != binlen)
+ {
+ /*
+ Some items can return native representation with a different
+ number of fractional digits, e.g.: GREATEST(ts_3, ts_4) can
+ return a value with 3 fractional digits, although its fractional
+ precision is 4. Re-pack with a proper precision now.
+ */
+ Timestamp(native).to_native(&native, item->datetime_precision(thd));
+ }
+ DBUG_ASSERT(native.length() == binlen);
+ memcpy((char *) to, native.ptr(), binlen);
+ }
+}
+
+
+void
Type_handler::make_sort_key_longlong(uchar *to,
bool maybe_null,
bool null_value,
@@ -1135,9 +1159,8 @@ Type_handler_decimal_result::make_sort_key(uchar *to, Item *item,
}
*to++= 1;
}
- my_decimal2binary(E_DEC_FATAL_ERROR, dec_val, to,
- item->max_length - (item->decimals ? 1 : 0),
- item->decimals);
+ dec_val->to_binary(to, item->max_length - (item->decimals ? 1 : 0),
+ item->decimals);
}
@@ -1897,6 +1920,15 @@ Type_handler_temporal_result::sortlength(THD *thd,
void
+Type_handler_timestamp_common::sortlength(THD *thd,
+ const Type_std_attributes *item,
+ SORT_FIELD_ATTR *sortorder) const
+{
+ sortorder->length= my_timestamp_binary_length(item->decimals);
+}
+
+
+void
Type_handler_int_result::sortlength(THD *thd,
const Type_std_attributes *item,
SORT_FIELD_ATTR *sortorder) const
@@ -1983,6 +2015,30 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
return length;
}
+bool filesort_use_addons(TABLE *table, uint sortlength,
+ uint *length, uint *fields, uint *null_fields)
+{
+ Field **pfield, *field;
+ *length= *fields= *null_fields= 0;
+
+ for (pfield= table->field; (field= *pfield) ; pfield++)
+ {
+ if (!bitmap_is_set(table->read_set, field->field_index))
+ continue;
+ if (field->flags & BLOB_FLAG)
+ return false;
+ (*length)+= field->max_packed_col_length(field->pack_length());
+ if (field->maybe_null())
+ (*null_fields)++;
+ (*fields)++;
+ }
+ if (!*fields)
+ return false;
+ (*length)+= (*null_fields+7)/8;
+
+ return *length + sortlength <
+ table->in_use->variables.max_length_for_sort_data;
+}
/**
Get descriptors of fields appended to sorted fields and
@@ -1990,7 +2046,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
The function first finds out what fields are used in the result set.
Then it calculates the length of the buffer to store the values of
- these fields together with the value of sort values.
+ these fields together with the value of sort values.
If the calculated length is not greater than max_length_for_sort_data
the function allocates memory for an array of descriptors containing
layouts for the values of the non-sorted fields in the buffer and
@@ -2012,16 +2068,13 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
*/
static SORT_ADDON_FIELD *
-get_addon_fields(ulong max_length_for_sort_data,
- Field **ptabfield, uint sortlength, LEX_STRING *addon_buf)
+get_addon_fields(TABLE *table, uint sortlength, LEX_STRING *addon_buf)
{
Field **pfield;
Field *field;
SORT_ADDON_FIELD *addonf;
- uint length= 0;
- uint fields= 0;
- uint null_fields= 0;
- MY_BITMAP *read_set= (*ptabfield)->table->read_set;
+ uint length, fields, null_fields;
+ MY_BITMAP *read_set= table->read_set;
DBUG_ENTER("get_addon_fields");
/*
@@ -2030,40 +2083,28 @@ get_addon_fields(ulong max_length_for_sort_data,
Note for future refinement:
This this a too strong condition.
Actually we need only the fields referred in the
- result set. And for some of them it makes sense to use
+ result set. And for some of them it makes sense to use
the values directly from sorted fields.
But beware the case when item->cmp_type() != item->result_type()
*/
addon_buf->str= 0;
addon_buf->length= 0;
- for (pfield= ptabfield; (field= *pfield) ; pfield++)
- {
- if (!bitmap_is_set(read_set, field->field_index))
- continue;
- if (field->flags & BLOB_FLAG)
- DBUG_RETURN(0);
- length+= field->max_packed_col_length(field->pack_length());
- if (field->maybe_null())
- null_fields++;
- fields++;
- }
- if (!fields)
- DBUG_RETURN(0);
- length+= (null_fields+7)/8;
+ // see remove_const() for HA_SLOW_RND_POS explanation
+ if (table->file->ha_table_flags() & HA_SLOW_RND_POS)
+ sortlength= 0;
- if (length+sortlength > max_length_for_sort_data ||
- !my_multi_malloc(MYF(MY_WME | MY_THREAD_SPECIFIC),
- &addonf, sizeof(SORT_ADDON_FIELD) * (fields+1),
- &addon_buf->str, length,
- NullS))
+ if (!filesort_use_addons(table, sortlength, &length, &fields, &null_fields) ||
+ !my_multi_malloc(MYF(MY_WME | MY_THREAD_SPECIFIC), &addonf,
+ sizeof(SORT_ADDON_FIELD) * (fields+1),
+ &addon_buf->str, length, NullS))
DBUG_RETURN(0);
addon_buf->length= length;
length= (null_fields+7)/8;
null_fields= 0;
- for (pfield= ptabfield; (field= *pfield) ; pfield++)
+ for (pfield= table->field; (field= *pfield) ; pfield++)
{
if (!bitmap_is_set(read_set, field->field_index))
continue;
@@ -2085,7 +2126,7 @@ get_addon_fields(ulong max_length_for_sort_data,
addonf++;
}
addonf->field= 0; // Put end marker
-
+
DBUG_PRINT("info",("addon_length: %d",length));
DBUG_RETURN(addonf-fields);
}
diff --git a/sql/filesort.h b/sql/filesort.h
index 6926d92c4eb..5f79a5095cc 100644
--- a/sql/filesort.h
+++ b/sql/filesort.h
@@ -161,6 +161,9 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
Filesort_tracker* tracker, JOIN *join=NULL,
table_map first_table_bit=0);
+bool filesort_use_addons(TABLE *table, uint sortlength,
+ uint *length, uint *fields, uint *null_fields);
+
void change_double_for_sort(double nr,uchar *to);
#endif /* FILESORT_INCLUDED */
diff --git a/sql/gcalc_tools.cc b/sql/gcalc_tools.cc
index 307f063fb43..25c80a7a796 100644
--- a/sql/gcalc_tools.cc
+++ b/sql/gcalc_tools.cc
@@ -132,7 +132,7 @@ int Gcalc_function::count_internal(const char *cur_func, uint set_type,
int mask= (c_op & op_not) ? 1:0;
uint n_ops= c_op & ~(op_any | op_not | v_mask);
uint n_shape= c_op & ~(op_any | op_not | v_mask); /* same as n_ops */
- value v_state= (value) (c_op & v_mask);
+ op_type v_state= (op_type) (c_op & v_mask);
int result= 0;
const char *sav_cur_func= cur_func;
diff --git a/sql/gcalc_tools.h b/sql/gcalc_tools.h
index 77da791f0b9..bb1f473e180 100644
--- a/sql/gcalc_tools.h
+++ b/sql/gcalc_tools.h
@@ -52,17 +52,15 @@ private:
int count_internal(const char *cur_func, uint set_type,
const char **end);
public:
- enum value
- {
- v_empty= 0x0000000,
- v_find_t= 0x1000000,
- v_find_f= 0x2000000,
- v_t_found= 0x3000000,
- v_f_found= 0x4000000,
- v_mask= 0x7000000
- };
enum op_type
{
+ v_empty= 0x00000000,
+ v_find_t= 0x01000000,
+ v_find_f= 0x02000000,
+ v_t_found= 0x03000000,
+ v_f_found= 0x04000000,
+ v_mask= 0x07000000,
+
op_not= 0x80000000,
op_shape= 0x00000000,
op_union= 0x10000000,
@@ -184,7 +182,11 @@ class Gcalc_result_receiver
double first_x, first_y, prev_x, prev_y;
double shape_area;
public:
- Gcalc_result_receiver() : collection_result(FALSE), n_shapes(0), n_holes(0)
+Gcalc_result_receiver() :
+ n_points(0),
+ common_shapetype(Gcalc_function::shape_point),
+ collection_result(FALSE), n_shapes(0), n_holes(0),
+ cur_shape(Gcalc_function::shape_point), shape_pos(0)
{}
int start_shape(Gcalc_function::shape_type shape);
int add_point(double x, double y);
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 0a8cf3b9532..0069bbf66c3 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1387,7 +1387,7 @@ bool print_admin_msg(THD* thd, uint len,
protocol->store(msgbuf, msg_length, system_charset_info);
if (protocol->write())
{
- sql_print_error("Failed on my_net_write, writing to stderr instead: %s\n",
+ sql_print_error("Failed on my_net_write, writing to stderr instead: %s",
msgbuf);
goto err;
}
@@ -2831,6 +2831,8 @@ bool ha_partition::create_handler_file(const char *name)
}
}
(void) mysql_file_close(file, MYF(0));
+ if (result)
+ mysql_file_delete(key_file_partition, file_name, MYF(MY_WME));
}
else
result= TRUE;
@@ -3728,11 +3730,13 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
err_handler:
DEBUG_SYNC(ha_thd(), "partition_open_error");
- file= &m_file[m_tot_parts - 1];
- while (file-- != m_file)
+ DBUG_ASSERT(m_tot_parts > 0);
+ for (uint i= m_tot_parts - 1; ; --i)
{
- if (bitmap_is_set(&m_opened_partitions, (uint)(file - m_file)))
- (*file)->ha_close();
+ if (bitmap_is_set(&m_opened_partitions, i))
+ m_file[i]->ha_close();
+ if (!i)
+ break;
}
err_alloc:
free_partition_bitmaps();
@@ -4333,7 +4337,7 @@ void ha_partition::try_semi_consistent_read(bool yes)
determining which partition the row should be written to.
*/
-int ha_partition::write_row(uchar * buf)
+int ha_partition::write_row(const uchar * buf)
{
uint32 part_id;
int error;
@@ -4887,6 +4891,42 @@ ha_rows ha_partition::guess_bulk_insert_rows()
}
+void ha_partition::sum_copy_info(handler *file)
+{
+ copy_info.records+= file->copy_info.records;
+ copy_info.touched+= file->copy_info.touched;
+ copy_info.copied+= file->copy_info.copied;
+ copy_info.deleted+= file->copy_info.deleted;
+ copy_info.updated+= file->copy_info.updated;
+}
+
+
+void ha_partition::sum_copy_infos()
+{
+ handler **file_array;
+ bzero(&copy_info, sizeof(copy_info));
+ file_array= m_file;
+ do
+ {
+ if (bitmap_is_set(&(m_opened_partitions), (uint)(file_array - m_file)))
+ sum_copy_info(*file_array);
+ } while (*(++file_array));
+}
+
+void ha_partition::reset_copy_info()
+{
+ handler **file_array;
+ bzero(&copy_info, sizeof(copy_info));
+ file_array= m_file;
+ do
+ {
+ if (bitmap_is_set(&(m_opened_partitions), (uint)(file_array - m_file)))
+ bzero(&(*file_array)->copy_info, sizeof(copy_info));
+ } while (*(++file_array));
+}
+
+
+
/*
Finish a large batch of insert rows
@@ -4918,6 +4958,7 @@ int ha_partition::end_bulk_insert()
int tmp;
if ((tmp= m_file[i]->ha_end_bulk_insert()))
error= tmp;
+ sum_copy_info(m_file[i]);
}
bitmap_clear_all(&m_bulk_insert_started);
DBUG_RETURN(error);
@@ -5379,7 +5420,7 @@ bool ha_partition::init_record_priority_queue()
/* Initialize priority queue, initialized to reading forward. */
int (*cmp_func)(void *, uchar *, uchar *);
void *cmp_arg= (void*) this;
- if (!m_using_extended_keys && !(table_flags() & HA_CMP_REF_IS_EXPENSIVE))
+ if (!m_using_extended_keys && !(table_flags() & HA_SLOW_CMP_REF))
cmp_func= cmp_key_rowid_part_id;
else
cmp_func= cmp_key_part_id;
@@ -5876,12 +5917,6 @@ int ha_partition::index_read_idx_map(uchar *buf, uint index,
get_partition_set(table, buf, index, &m_start_key, &m_part_spec);
- /*
- We have either found exactly 1 partition
- (in which case start_part == end_part)
- or no matching partitions (start_part > end_part)
- */
- DBUG_ASSERT(m_part_spec.start_part >= m_part_spec.end_part);
/* The start part is must be marked as used. */
DBUG_ASSERT(m_part_spec.start_part > m_part_spec.end_part ||
bitmap_is_set(&(m_part_info->read_partitions),
@@ -6385,19 +6420,22 @@ ha_rows ha_partition::multi_range_read_info_const(uint keyno,
uint ret_mrr_mode= 0;
range_seq_t seq_it;
part_id_range save_part_spec;
+ Cost_estimate part_cost;
DBUG_ENTER("ha_partition::multi_range_read_info_const");
DBUG_PRINT("enter", ("partition this: %p", this));
m_mrr_new_full_buffer_size= 0;
save_part_spec= m_part_spec;
+ cost->reset();
+
seq_it= seq->init(seq_init_param, n_ranges, *mrr_mode);
if (unlikely((error= multi_range_key_create_key(seq, seq_it))))
{
if (likely(error == HA_ERR_END_OF_FILE)) // No keys in range
{
rows= 0;
- goto calc_cost;
+ goto end;
}
/*
This error means that we can't do multi_range_read for the moment
@@ -6426,18 +6464,20 @@ ha_rows ha_partition::multi_range_read_info_const(uint keyno,
ha_rows tmp_rows;
uint tmp_mrr_mode;
m_mrr_buffer_size[i]= 0;
+ part_cost.reset();
tmp_mrr_mode= *mrr_mode;
tmp_rows= (*file)->
multi_range_read_info_const(keyno, &m_part_seq_if,
&m_partition_part_key_multi_range_hld[i],
m_part_mrr_range_length[i],
&m_mrr_buffer_size[i],
- &tmp_mrr_mode, cost);
+ &tmp_mrr_mode, &part_cost);
if (tmp_rows == HA_POS_ERROR)
{
m_part_spec= save_part_spec;
DBUG_RETURN(HA_POS_ERROR);
}
+ cost->add(&part_cost);
rows+= tmp_rows;
ret_mrr_mode|= tmp_mrr_mode;
m_mrr_new_full_buffer_size+= m_mrr_buffer_size[i];
@@ -6445,15 +6485,8 @@ ha_rows ha_partition::multi_range_read_info_const(uint keyno,
} while (*(++file));
*mrr_mode= ret_mrr_mode;
-calc_cost:
+end:
m_part_spec= save_part_spec;
- cost->reset();
- cost->avg_io_cost= 1;
- if ((*mrr_mode & HA_MRR_INDEX_ONLY) && rows > 2)
- cost->io_count= keyread_time(keyno, n_ranges, (uint) rows);
- else
- cost->io_count= read_time(keyno, n_ranges, rows);
- cost->cpu_cost= (double) rows / TIME_FOR_COMPARE + 0.01;
DBUG_RETURN(rows);
}
@@ -6467,9 +6500,12 @@ ha_rows ha_partition::multi_range_read_info(uint keyno, uint n_ranges,
uint i;
handler **file;
ha_rows rows= 0;
+ Cost_estimate part_cost;
DBUG_ENTER("ha_partition::multi_range_read_info");
DBUG_PRINT("enter", ("partition this: %p", this));
+ cost->reset();
+
m_mrr_new_full_buffer_size= 0;
file= m_file;
do
@@ -6477,22 +6513,20 @@ ha_rows ha_partition::multi_range_read_info(uint keyno, uint n_ranges,
i= (uint)(file - m_file);
if (bitmap_is_set(&(m_part_info->read_partitions), (i)))
{
+ ha_rows tmp_rows;
m_mrr_buffer_size[i]= 0;
- if ((rows= (*file)->multi_range_read_info(keyno, n_ranges, keys,
- key_parts,
- &m_mrr_buffer_size[i],
- mrr_mode, cost)))
+ part_cost.reset();
+ if ((tmp_rows= (*file)->multi_range_read_info(keyno, n_ranges, keys,
+ key_parts,
+ &m_mrr_buffer_size[i],
+ mrr_mode, &part_cost)))
DBUG_RETURN(rows);
+ cost->add(&part_cost);
+ rows+= tmp_rows;
m_mrr_new_full_buffer_size+= m_mrr_buffer_size[i];
}
} while (*(++file));
- cost->reset();
- cost->avg_io_cost= 1;
- if (*mrr_mode & HA_MRR_INDEX_ONLY)
- cost->io_count= keyread_time(keyno, n_ranges, (uint) rows);
- else
- cost->io_count= read_time(keyno, n_ranges, rows);
DBUG_RETURN(0);
}
@@ -6509,6 +6543,7 @@ int ha_partition::multi_range_read_init(RANGE_SEQ_IF *seq,
DBUG_ENTER("ha_partition::multi_range_read_init");
DBUG_PRINT("enter", ("partition this: %p", this));
+ eq_range= 0;
m_seq_if= seq;
m_seq= seq->init(seq_init_param, n_ranges, mrr_mode);
if (unlikely((error= multi_range_key_create_key(seq, m_seq))))
@@ -6979,7 +7014,7 @@ FT_INFO *ha_partition::ft_init_ext(uint flags, uint inx, String *key)
sizeof(FT_INFO *) * m_tot_parts,
NullS)))
{
- my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
+ my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
DBUG_RETURN(NULL);
}
ft_target->part_ft_info= tmp_ft_info;
@@ -8409,6 +8444,7 @@ int ha_partition::info(uint flag)
stats.delete_length= 0;
stats.check_time= 0;
stats.checksum= 0;
+ stats.checksum_null= TRUE;
for (i= bitmap_get_first_set(&m_part_info->read_partitions);
i < m_tot_parts;
i= bitmap_get_next_set(&m_part_info->read_partitions, i))
@@ -8423,7 +8459,11 @@ int ha_partition::info(uint flag)
stats.delete_length+= file->stats.delete_length;
if (file->stats.check_time > stats.check_time)
stats.check_time= file->stats.check_time;
- stats.checksum+= file->stats.checksum;
+ if (!file->stats.checksum_null)
+ {
+ stats.checksum+= file->stats.checksum;
+ stats.checksum_null= FALSE;
+ }
}
if (stats.records && stats.records < 2 &&
!(m_file[0]->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT))
@@ -8586,6 +8626,7 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info,
stat_info->update_time= file->stats.update_time;
stat_info->check_time= file->stats.check_time;
stat_info->check_sum= file->stats.checksum;
+ stat_info->check_sum_null= file->stats.checksum_null;
}
@@ -9179,7 +9220,6 @@ int ha_partition::extra(enum ha_extra_function operation)
case HA_EXTRA_STARTING_ORDERED_INDEX_SCAN:
case HA_EXTRA_BEGIN_ALTER_COPY:
case HA_EXTRA_END_ALTER_COPY:
- case HA_EXTRA_FAKE_START_STMT:
DBUG_RETURN(loop_partitions(extra_cb, &operation));
default:
{
@@ -9552,6 +9592,43 @@ double ha_partition::scan_time()
/**
+ @brief
+ Caculate time to scan the given index (index only scan)
+
+ @param inx Index number to scan
+
+ @return time for scanning index inx
+*/
+
+double ha_partition::key_scan_time(uint inx)
+{
+ double scan_time= 0;
+ uint i;
+ DBUG_ENTER("ha_partition::key_scan_time");
+ for (i= bitmap_get_first_set(&m_part_info->read_partitions);
+ i < m_tot_parts;
+ i= bitmap_get_next_set(&m_part_info->read_partitions, i))
+ scan_time+= m_file[i]->key_scan_time(inx);
+ DBUG_RETURN(scan_time);
+}
+
+
+double ha_partition::keyread_time(uint inx, uint ranges, ha_rows rows)
+{
+ double read_time= 0;
+ uint i;
+ DBUG_ENTER("ha_partition::keyread_time");
+ if (!ranges)
+ DBUG_RETURN(handler::keyread_time(inx, ranges, rows));
+ for (i= bitmap_get_first_set(&m_part_info->read_partitions);
+ i < m_tot_parts;
+ i= bitmap_get_next_set(&m_part_info->read_partitions, i))
+ read_time+= m_file[i]->keyread_time(inx, ranges, rows);
+ DBUG_RETURN(read_time);
+}
+
+
+/**
Find number of records in a range.
@param inx Index number
@param min_key Start of range
@@ -9988,7 +10065,7 @@ void ha_partition::print_error(int error, myf errflag)
append_row_to_str(str);
/* Log this error, so the DBA can notice it and fix it! */
- sql_print_error("Table '%-192s' corrupted: row in wrong partition: %s\n"
+ sql_print_error("Table '%-192s' corrupted: row in wrong partition: %s"
"Please REPAIR the table!",
table->s->table_name.str,
str.c_ptr_safe());
@@ -10359,7 +10436,16 @@ bool ha_partition::commit_inplace_alter_table(TABLE *altered_table,
Loop over all other partitions as to follow the protocol!
*/
uint i;
- DBUG_ASSERT(0);
+ /*
+ InnoDB does not set ha_alter_info->group_commit_ctx to NULL in the
+ case if autoincrement attribute is necessary to reset for all
+ partitions for INNOBASE_INPLACE_IGNORE handler flags. It does not
+ affect durability, because it is solely about updating the InnoDB data
+ dictionary caches (one InnoDB dict_table_t per partition or
+ sub-partition).
+ */
+ DBUG_ASSERT(table->found_next_number_field
+ && !altered_table->found_next_number_field);
for (i= 1; i < m_tot_parts; i++)
{
ha_alter_info->handler_ctx= part_inplace_ctx->handler_ctx_array[i];
@@ -10782,6 +10868,64 @@ void ha_partition::init_table_handle_for_HANDLER()
}
+/**
+ Calculate the checksum of the table (all partitions)
+*/
+
+int ha_partition::pre_calculate_checksum()
+{
+ int error;
+ DBUG_ENTER("ha_partition::pre_calculate_checksum");
+ m_pre_calling= TRUE;
+ if ((table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM)))
+ {
+ handler **file= m_file;
+ do
+ {
+ if ((error= (*file)->pre_calculate_checksum()))
+ {
+ DBUG_RETURN(error);
+ }
+ } while (*(++file));
+ }
+ DBUG_RETURN(0);
+}
+
+
+int ha_partition::calculate_checksum()
+{
+ int error;
+ stats.checksum= 0;
+ stats.checksum_null= TRUE;
+
+ DBUG_ENTER("ha_partition::calculate_checksum");
+ if (!m_pre_calling)
+ {
+ if ((error= pre_calculate_checksum()))
+ {
+ m_pre_calling= FALSE;
+ DBUG_RETURN(error);
+ }
+ }
+ m_pre_calling= FALSE;
+
+ handler **file= m_file;
+ do
+ {
+ if ((error= (*file)->calculate_checksum()))
+ {
+ DBUG_RETURN(error);
+ }
+ if (!(*file)->stats.checksum_null)
+ {
+ stats.checksum+= (*file)->stats.checksum;
+ stats.checksum_null= FALSE;
+ }
+ } while (*(++file));
+ DBUG_RETURN(0);
+}
+
+
/****************************************************************************
MODULE enable/disable indexes
****************************************************************************/
@@ -10901,8 +11045,6 @@ int ha_partition::check_misplaced_rows(uint read_part_id, bool do_repair)
{
/* Only need to read the partitioning fields. */
bitmap_union(table->read_set, &m_part_info->full_part_field_set);
- if (table->vcol_set)
- bitmap_union(table->vcol_set, &m_part_info->full_part_field_set);
}
if ((result= m_file[read_part_id]->ha_rnd_init(1)))
@@ -11263,6 +11405,7 @@ bool ha_partition::start_bulk_update()
do
{
+ bzero(&(*file)->copy_info, sizeof((*file)->copy_info));
if ((*file)->start_bulk_update())
DBUG_RETURN(TRUE);
} while (*(++file));
@@ -11320,6 +11463,7 @@ int ha_partition::end_bulk_update()
if ((tmp= (*file)->end_bulk_update()))
error= tmp;
} while (*(++file));
+ sum_copy_infos();
DBUG_RETURN(error);
}
@@ -11415,6 +11559,7 @@ int ha_partition::end_bulk_delete()
if ((tmp= (*file)->end_bulk_delete()))
error= tmp;
} while (*(++file));
+ sum_copy_infos();
DBUG_RETURN(error);
}
@@ -11531,11 +11676,13 @@ int ha_partition::pre_direct_update_rows_init(List<Item> *update_fields)
0 Success
*/
-int ha_partition::direct_update_rows(ha_rows *update_rows_result)
+int ha_partition::direct_update_rows(ha_rows *update_rows_result,
+ ha_rows *found_rows_result)
{
int error;
bool rnd_seq= FALSE;
ha_rows update_rows= 0;
+ ha_rows found_rows= 0;
uint32 i;
DBUG_ENTER("ha_partition::direct_update_rows");
@@ -11547,6 +11694,7 @@ int ha_partition::direct_update_rows(ha_rows *update_rows_result)
}
*update_rows_result= 0;
+ *found_rows_result= 0;
for (i= m_part_spec.start_part; i <= m_part_spec.end_part; i++)
{
handler *file= m_file[i];
@@ -11562,7 +11710,8 @@ int ha_partition::direct_update_rows(ha_rows *update_rows_result)
}
if (unlikely((error= (m_pre_calling ?
(file)->pre_direct_update_rows() :
- (file)->ha_direct_update_rows(&update_rows)))))
+ (file)->ha_direct_update_rows(&update_rows,
+ &found_rows)))))
{
if (rnd_seq)
{
@@ -11574,6 +11723,7 @@ int ha_partition::direct_update_rows(ha_rows *update_rows_result)
DBUG_RETURN(error);
}
*update_rows_result+= update_rows;
+ *found_rows_result+= found_rows;
}
if (rnd_seq)
{
@@ -11609,7 +11759,7 @@ int ha_partition::pre_direct_update_rows()
DBUG_ENTER("ha_partition::pre_direct_update_rows");
save_m_pre_calling= m_pre_calling;
m_pre_calling= TRUE;
- error= direct_update_rows(&not_used);
+ error= direct_update_rows(&not_used, &not_used);
m_pre_calling= save_m_pre_calling;
DBUG_RETURN(error);
}
@@ -11855,6 +12005,40 @@ void ha_partition::clear_top_table_fields()
DBUG_VOID_RETURN;
}
+bool
+ha_partition::can_convert_string(const Field_string* field,
+ const Column_definition& new_type) const
+{
+ for (uint index= 0; index < m_tot_parts; index++)
+ {
+ if (!m_file[index]->can_convert_string(field, new_type))
+ return false;
+ }
+ return true;
+}
+
+bool
+ha_partition::can_convert_varstring(const Field_varstring* field,
+ const Column_definition& new_type) const{
+ for (uint index= 0; index < m_tot_parts; index++)
+ {
+ if (!m_file[index]->can_convert_varstring(field, new_type))
+ return false;
+ }
+ return true;
+}
+
+bool
+ha_partition::can_convert_blob(const Field_blob* field,
+ const Column_definition& new_type) const
+{
+ for (uint index= 0; index < m_tot_parts; index++)
+ {
+ if (!m_file[index]->can_convert_blob(field, new_type))
+ return false;
+ }
+ return true;
+}
struct st_mysql_storage_engine partition_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index 5d1ca70d3a9..507db9efddf 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -438,6 +438,9 @@ private:
MY_BITMAP m_locked_partitions;
/** Stores shared auto_increment etc. */
Partition_share *part_share;
+ void sum_copy_info(handler *file);
+ void sum_copy_infos();
+ void reset_copy_info() override;
/** Temporary storage for new partitions Handler_shares during ALTER */
List<Parts_share_refs> m_new_partitions_share_refs;
/** Sorted array of partition ids in descending order of number of rows. */
@@ -470,16 +473,16 @@ public:
return NO_CURRENT_PART_ID;
}
Partition_share *get_part_share() { return part_share; }
- handler *clone(const char *name, MEM_ROOT *mem_root);
- virtual void set_part_info(partition_info *part_info)
+ handler *clone(const char *name, MEM_ROOT *mem_root) override;
+ virtual void set_part_info(partition_info *part_info) override
{
m_part_info= part_info;
m_is_sub_partitioned= part_info->is_sub_partitioned();
}
- virtual void return_record_by_parent();
+ void return_record_by_parent() override;
- virtual bool vers_can_native(THD *thd)
+ bool vers_can_native(THD *thd) override
{
if (thd->lex->part_info)
{
@@ -534,30 +537,29 @@ public:
object needed in opening the object in openfrm
-------------------------------------------------------------------------
*/
- virtual int delete_table(const char *from);
- virtual int rename_table(const char *from, const char *to);
- virtual int create(const char *name, TABLE *form,
- HA_CREATE_INFO *create_info);
- virtual int create_partitioning_metadata(const char *name,
- const char *old_name, int action_flag);
- virtual void update_create_info(HA_CREATE_INFO *create_info);
- virtual int change_partitions(HA_CREATE_INFO *create_info,
- const char *path,
- ulonglong * const copied,
- ulonglong * const deleted,
- const uchar *pack_frm_data,
- size_t pack_frm_len);
- virtual int drop_partitions(const char *path);
- virtual int rename_partitions(const char *path);
- bool get_no_parts(const char *name, uint *num_parts)
+ int delete_table(const char *from) override;
+ int rename_table(const char *from, const char *to) override;
+ int create(const char *name, TABLE *form,
+ HA_CREATE_INFO *create_info) override;
+ int create_partitioning_metadata(const char *name,
+ const char *old_name, int action_flag)
+ override;
+ void update_create_info(HA_CREATE_INFO *create_info) override;
+ int change_partitions(HA_CREATE_INFO *create_info, const char *path,
+ ulonglong * const copied, ulonglong * const deleted,
+ const uchar *pack_frm_data, size_t pack_frm_len)
+ override;
+ int drop_partitions(const char *path) override;
+ int rename_partitions(const char *path) override;
+ bool get_no_parts(const char *, uint *num_parts) override
{
DBUG_ENTER("ha_partition::get_no_parts");
*num_parts= m_tot_parts;
DBUG_RETURN(0);
}
- virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share);
- virtual bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
- uint table_changes);
+ void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share) override;
+ bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
+ uint table_changes) override;
void update_part_create_info(HA_CREATE_INFO *create_info, uint part_id)
{
m_file[part_id]->update_create_info(create_info);
@@ -597,7 +599,7 @@ private:
bool is_subpart);
bool populate_partition_name_hash();
Partition_share *get_share();
- bool set_ha_share_ref(Handler_share **ha_share);
+ bool set_ha_share_ref(Handler_share **ha_share) override;
void fix_data_dir(char* path);
bool init_partition_bitmaps();
void free_partition_bitmaps();
@@ -617,8 +619,8 @@ public:
being used for normal queries (not before meta-data changes always.
If the object was opened it will also be closed before being deleted.
*/
- virtual int open(const char *name, int mode, uint test_if_locked);
- virtual int close(void);
+ int open(const char *name, int mode, uint test_if_locked) override;
+ int close() override;
/*
-------------------------------------------------------------------------
@@ -633,31 +635,31 @@ public:
and these go directly to the handlers supporting transactions
-------------------------------------------------------------------------
*/
- virtual THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to,
- enum thr_lock_type lock_type);
- virtual int external_lock(THD * thd, int lock_type);
- LEX_CSTRING *engine_name() { return hton_name(partition_ht()); }
+ THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to,
+ enum thr_lock_type lock_type) override;
+ int external_lock(THD * thd, int lock_type) override;
+ LEX_CSTRING *engine_name() override { return hton_name(partition_ht()); }
/*
When table is locked a statement is started by calling start_stmt
instead of external_lock
*/
- virtual int start_stmt(THD * thd, thr_lock_type lock_type);
+ int start_stmt(THD * thd, thr_lock_type lock_type) override;
/*
Lock count is number of locked underlying handlers (I assume)
*/
- virtual uint lock_count(void) const;
+ uint lock_count() const override;
/*
Call to unlock rows not to be updated in transaction
*/
- virtual void unlock_row();
+ void unlock_row() override;
/*
Check if semi consistent read
*/
- virtual bool was_semi_consistent_read();
+ bool was_semi_consistent_read() override;
/*
Call to hint about semi consistent read
*/
- virtual void try_semi_consistent_read(bool);
+ void try_semi_consistent_read(bool) override;
/*
NOTE: due to performance and resource issues with many partitions,
@@ -691,28 +693,28 @@ public:
start_bulk_insert and end_bulk_insert is called before and after a
number of calls to write_row.
*/
- virtual int write_row(uchar * buf);
- virtual bool start_bulk_update();
- virtual int exec_bulk_update(ha_rows *dup_key_found);
- virtual int end_bulk_update();
- virtual int bulk_update_row(const uchar *old_data, const uchar *new_data,
- ha_rows *dup_key_found);
- virtual int update_row(const uchar * old_data, const uchar * new_data);
- virtual int direct_update_rows_init(List<Item> *update_fields);
- virtual int pre_direct_update_rows_init(List<Item> *update_fields);
- virtual int direct_update_rows(ha_rows *update_rows);
- virtual int pre_direct_update_rows();
- virtual bool start_bulk_delete();
- virtual int end_bulk_delete();
- virtual int delete_row(const uchar * buf);
- virtual int direct_delete_rows_init();
- virtual int pre_direct_delete_rows_init();
- virtual int direct_delete_rows(ha_rows *delete_rows);
- virtual int pre_direct_delete_rows();
- virtual int delete_all_rows(void);
- virtual int truncate();
- virtual void start_bulk_insert(ha_rows rows, uint flags);
- virtual int end_bulk_insert();
+ int write_row(const uchar * buf) override;
+ bool start_bulk_update() override;
+ int exec_bulk_update(ha_rows *dup_key_found) override;
+ int end_bulk_update() override;
+ int bulk_update_row(const uchar *old_data, const uchar *new_data,
+ ha_rows *dup_key_found) override;
+ int update_row(const uchar * old_data, const uchar * new_data) override;
+ int direct_update_rows_init(List<Item> *update_fields) override;
+ int pre_direct_update_rows_init(List<Item> *update_fields) override;
+ int direct_update_rows(ha_rows *update_rows, ha_rows *found_rows) override;
+ int pre_direct_update_rows() override;
+ bool start_bulk_delete() override;
+ int end_bulk_delete() override;
+ int delete_row(const uchar * buf) override;
+ int direct_delete_rows_init() override;
+ int pre_direct_delete_rows_init() override;
+ int direct_delete_rows(ha_rows *delete_rows) override;
+ int pre_direct_delete_rows() override;
+ int delete_all_rows() override;
+ int truncate() override;
+ void start_bulk_insert(ha_rows rows, uint flags) override;
+ int end_bulk_insert() override;
private:
ha_rows guess_bulk_insert_rows();
void start_part_bulk_insert(THD *thd, uint part_id);
@@ -728,7 +730,7 @@ public:
*/
int truncate_partition(Alter_info *, bool *binlog_stmt);
- virtual bool is_fatal_error(int error, uint flags)
+ bool is_fatal_error(int error, uint flags) override
{
if (!handler::is_fatal_error(error, flags) ||
error == HA_ERR_NO_PARTITION_FOUND ||
@@ -763,12 +765,12 @@ public:
position it to the start of the table, no need to deallocate
and allocate it again
*/
- virtual int rnd_init(bool scan);
- virtual int rnd_end();
- virtual int rnd_next(uchar * buf);
- virtual int rnd_pos(uchar * buf, uchar * pos);
- virtual int rnd_pos_by_record(uchar *record);
- virtual void position(const uchar * record);
+ int rnd_init(bool scan) override;
+ int rnd_end() override;
+ int rnd_next(uchar * buf) override;
+ int rnd_pos(uchar * buf, uchar * pos) override;
+ int rnd_pos_by_record(uchar *record) override;
+ void position(const uchar * record) override;
/*
-------------------------------------------------------------------------
@@ -802,11 +804,11 @@ public:
index_init initializes an index before using it and index_end does
any end processing needed.
*/
- virtual int index_read_map(uchar * buf, const uchar * key,
- key_part_map keypart_map,
- enum ha_rkey_function find_flag);
- virtual int index_init(uint idx, bool sorted);
- virtual int index_end();
+ int index_read_map(uchar * buf, const uchar * key,
+ key_part_map keypart_map,
+ enum ha_rkey_function find_flag) override;
+ int index_init(uint idx, bool sorted) override;
+ int index_end() override;
/**
@breif
@@ -814,36 +816,36 @@ public:
row if available. If the key value is null, begin at first key of the
index.
*/
- virtual int index_read_idx_map(uchar *buf, uint index, const uchar *key,
- key_part_map keypart_map,
- enum ha_rkey_function find_flag);
+ int index_read_idx_map(uchar *buf, uint index, const uchar *key,
+ key_part_map keypart_map,
+ enum ha_rkey_function find_flag) override;
/*
These methods are used to jump to next or previous entry in the index
scan. There are also methods to jump to first and last entry.
*/
- virtual int index_next(uchar * buf);
- virtual int index_prev(uchar * buf);
- virtual int index_first(uchar * buf);
- virtual int index_last(uchar * buf);
- virtual int index_next_same(uchar * buf, const uchar * key, uint keylen);
+ int index_next(uchar * buf) override;
+ int index_prev(uchar * buf) override;
+ int index_first(uchar * buf) override;
+ int index_last(uchar * buf) override;
+ int index_next_same(uchar * buf, const uchar * key, uint keylen) override;
int index_read_last_map(uchar *buf,
const uchar *key,
- key_part_map keypart_map);
+ key_part_map keypart_map) override;
/*
read_first_row is virtual method but is only implemented by
handler.cc, no storage engine has implemented it so neither
will the partition handler.
- virtual int read_first_row(uchar *buf, uint primary_key);
+ int read_first_row(uchar *buf, uint primary_key) override;
*/
- virtual int read_range_first(const key_range * start_key,
- const key_range * end_key,
- bool eq_range, bool sorted);
- virtual int read_range_next();
+ int read_range_first(const key_range * start_key,
+ const key_range * end_key,
+ bool eq_range, bool sorted) override;
+ int read_range_next() override;
HANDLER_BUFFER *m_mrr_buffer;
@@ -905,20 +907,20 @@ public:
RANGE_SEQ_IF *seq,
range_seq_t seq_it
);
- virtual ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
- void *seq_init_param,
- uint n_ranges, uint *bufsz,
- uint *mrr_mode,
- Cost_estimate *cost);
- virtual ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys,
- uint key_parts, uint *bufsz,
- uint *mrr_mode, Cost_estimate *cost);
- virtual int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
- uint n_ranges, uint mrr_mode,
- HANDLER_BUFFER *buf);
- virtual int multi_range_read_next(range_id_t *range_info);
- virtual int multi_range_read_explain_info(uint mrr_mode, char *str,
- size_t size);
+ ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
+ void *seq_init_param,
+ uint n_ranges, uint *bufsz,
+ uint *mrr_mode,
+ Cost_estimate *cost) override;
+ ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys,
+ uint key_parts, uint *bufsz,
+ uint *mrr_mode, Cost_estimate *cost) override;
+ int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
+ uint n_ranges, uint mrr_mode,
+ HANDLER_BUFFER *buf) override;
+ int multi_range_read_next(range_id_t *range_info) override;
+ int multi_range_read_explain_info(uint mrr_mode, char *str, size_t size)
+ override;
uint last_part() { return m_last_part; }
private:
@@ -947,21 +949,20 @@ public:
purposes.
-------------------------------------------------------------------------
*/
- virtual int info(uint);
- void get_dynamic_partition_info(PARTITION_STATS *stat_info,
- uint part_id);
- void set_partitions_to_open(List<String> *partition_names);
- int change_partitions_to_open(List<String> *partition_names);
+ int info(uint) override;
+ void get_dynamic_partition_info(PARTITION_STATS *stat_info, uint part_id)
+ override;
+ void set_partitions_to_open(List<String> *partition_names) override;
+ int change_partitions_to_open(List<String> *partition_names) override;
int open_read_partitions(char *name_buff, size_t name_buff_size);
- virtual int extra(enum ha_extra_function operation);
- virtual int extra_opt(enum ha_extra_function operation, ulong arg);
- virtual int reset(void);
- virtual uint count_query_cache_dependant_tables(uint8 *tables_type);
- virtual my_bool
- register_query_cache_dependant_tables(THD *thd,
- Query_cache *cache,
- Query_cache_block_table **block,
- uint *n);
+ int extra(enum ha_extra_function operation) override;
+ int extra_opt(enum ha_extra_function operation, ulong arg) override;
+ int reset() override;
+ uint count_query_cache_dependant_tables(uint8 *tables_type) override;
+ my_bool register_query_cache_dependant_tables(THD *thd,
+ Query_cache *cache,
+ Query_cache_block_table **block,
+ uint *n) override;
private:
typedef int handler_callback(handler *, void *);
@@ -1016,36 +1017,40 @@ public:
index-only scanning when performing an ORDER BY query.
Only called from one place in sql_select.cc
*/
- virtual const key_map *keys_to_use_for_scanning();
+ const key_map *keys_to_use_for_scanning() override;
/*
Called in test_quick_select to determine if indexes should be used.
*/
- virtual double scan_time();
+ double scan_time() override;
+
+ double key_scan_time(uint inx) override;
+
+ double keyread_time(uint inx, uint ranges, ha_rows rows) override;
/*
The next method will never be called if you do not implement indexes.
*/
- virtual double read_time(uint index, uint ranges, ha_rows rows);
+ double read_time(uint index, uint ranges, ha_rows rows) override;
/*
For the given range how many records are estimated to be in this range.
Used by optimiser to calculate cost of using a particular index.
*/
- virtual ha_rows records_in_range(uint inx, key_range * min_key,
- key_range * max_key);
+ ha_rows records_in_range(uint inx, key_range * min_key, key_range * max_key)
+ override;
/*
Upper bound of number records returned in scan is sum of all
underlying handlers.
*/
- virtual ha_rows estimate_rows_upper_bound();
+ ha_rows estimate_rows_upper_bound() override;
/*
table_cache_type is implemented by the underlying handler but all
underlying handlers must have the same implementation for it to work.
*/
- virtual uint8 table_cache_type();
- virtual ha_rows records();
+ uint8 table_cache_type() override;
+ ha_rows records() override;
/* Calculate hash value for PARTITION BY KEY tables. */
static uint32 calculate_key_hash_value(Field **field_array);
@@ -1063,19 +1068,19 @@ public:
Here we must ensure that all handlers use the same index type
for each index created.
*/
- virtual const char *index_type(uint inx);
+ const char *index_type(uint inx) override;
/* The name of the table type that will be used for display purposes */
- virtual const char *table_type() const;
+ const char *table_type() const;
/* The name of the row type used for the underlying tables. */
- virtual enum row_type get_row_type() const;
+ enum row_type get_row_type() const override;
/*
Handler specific error messages
*/
- virtual void print_error(int error, myf errflag);
- virtual bool get_error_message(int error, String * buf);
+ void print_error(int error, myf errflag) override;
+ bool get_error_message(int error, String * buf) override;
/*
-------------------------------------------------------------------------
MODULE handler characteristics
@@ -1147,10 +1152,6 @@ public:
with hidden primary key)
(No handler has this limitation currently)
- HA_WANTS_PRIMARY_KEY:
- Can't define a table without primary key except sequences
- (Only InnoDB has this when using innodb_force_primary_key == ON)
-
HA_STATS_RECORDS_IS_EXACT:
Does the counter of records after the info call specify an exact
value or not. If it does this flag is set.
@@ -1229,7 +1230,7 @@ public:
HA_CAN_INSERT_DELAYED, HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is disabled
until further investigated.
*/
- virtual Table_flags table_flags() const;
+ Table_flags table_flags() const override;
/*
This is a bitmap of flags that says how the storage engine
@@ -1287,7 +1288,7 @@ public:
must be updated in the row.
(InnoDB, MyISAM)
*/
- virtual ulong index_flags(uint inx, uint part, bool all_parts) const
+ ulong index_flags(uint inx, uint part, bool all_parts) const override
{
/*
The following code is not safe if you are using different
@@ -1300,7 +1301,8 @@ public:
wrapper function for handlerton alter_table_flags, since
the ha_partition_hton cannot know all its capabilities
*/
- virtual alter_table_operations alter_table_flags(alter_table_operations flags);
+ alter_table_operations alter_table_flags(alter_table_operations flags)
+ override;
/*
unireg.cc will call the following to make sure that the storage engine
can handle the data it is about to send.
@@ -1308,19 +1310,18 @@ public:
The maximum supported values is the minimum of all handlers in the table
*/
uint min_of_the_max_uint(uint (handler::*operator_func)(void) const) const;
- virtual uint max_supported_record_length() const;
- virtual uint max_supported_keys() const;
- virtual uint max_supported_key_parts() const;
- virtual uint max_supported_key_length() const;
- virtual uint max_supported_key_part_length() const;
- virtual uint min_record_length(uint options) const;
+ uint max_supported_record_length() const override;
+ uint max_supported_keys() const override;
+ uint max_supported_key_parts() const override;
+ uint max_supported_key_length() const override;
+ uint max_supported_key_part_length() const override;
+ uint min_record_length(uint options) const override;
/*
Primary key is clustered can only be true if all underlying handlers have
this feature.
*/
- virtual bool primary_key_is_clustered()
- { return m_pkey_is_clustered; }
+ bool primary_key_is_clustered() override { return m_pkey_is_clustered; }
/*
-------------------------------------------------------------------------
@@ -1338,7 +1339,7 @@ public:
to check whether the rest of the reference part is also the same.
-------------------------------------------------------------------------
*/
- virtual int cmp_ref(const uchar * ref1, const uchar * ref2);
+ int cmp_ref(const uchar * ref1, const uchar * ref2) override;
/*
-------------------------------------------------------------------------
MODULE auto increment
@@ -1352,15 +1353,15 @@ public:
auto_increment_column_changed
-------------------------------------------------------------------------
*/
- virtual bool need_info_for_auto_inc();
- virtual bool can_use_for_auto_inc_init();
- virtual void get_auto_increment(ulonglong offset, ulonglong increment,
- ulonglong nb_desired_values,
- ulonglong *first_value,
- ulonglong *nb_reserved_values);
- virtual void release_auto_increment();
+ bool need_info_for_auto_inc() override;
+ bool can_use_for_auto_inc_init() override;
+ void get_auto_increment(ulonglong offset, ulonglong increment,
+ ulonglong nb_desired_values,
+ ulonglong *first_value,
+ ulonglong *nb_reserved_values) override;
+ void release_auto_increment() override;
private:
- virtual int reset_auto_increment(ulonglong value);
+ int reset_auto_increment(ulonglong value) override;
int update_next_auto_inc_val();
virtual void lock_auto_increment()
{
@@ -1424,7 +1425,7 @@ public:
This method is a special InnoDB method called before a HANDLER query.
-------------------------------------------------------------------------
*/
- virtual void init_table_handle_for_HANDLER();
+ void init_table_handle_for_HANDLER() override;
/*
The remainder of this file defines the handler methods not implemented
@@ -1452,20 +1453,20 @@ public:
List<FOREIGN_KEY_INFO> *f_key_list)
virtual uint referenced_by_foreign_key()
*/
- virtual bool can_switch_engines();
+ bool can_switch_engines() override;
/*
-------------------------------------------------------------------------
MODULE fulltext index
-------------------------------------------------------------------------
*/
void ft_close_search(FT_INFO *handler);
- virtual int ft_init();
- virtual int pre_ft_init();
- virtual void ft_end();
- virtual int pre_ft_end();
- virtual FT_INFO *ft_init_ext(uint flags, uint inx, String *key);
- virtual int ft_read(uchar *buf);
- virtual int pre_ft_read(bool use_parallel);
+ int ft_init() override;
+ int pre_ft_init() override;
+ void ft_end() override;
+ int pre_ft_end() override;
+ FT_INFO *ft_init_ext(uint flags, uint inx, String *key) override;
+ int ft_read(uchar *buf) override;
+ int pre_ft_read(bool use_parallel) override;
/*
-------------------------------------------------------------------------
@@ -1473,7 +1474,7 @@ public:
-------------------------------------------------------------------------
The following method is only used by MyISAM when used as
temporary tables in a join.
- virtual int restart_rnd_next(uchar *buf, uchar *pos);
+ int restart_rnd_next(uchar *buf, uchar *pos) override;
*/
/*
@@ -1484,17 +1485,19 @@ public:
They are used for in-place alter table:
-------------------------------------------------------------------------
*/
- virtual enum_alter_inplace_result
+ enum_alter_inplace_result
check_if_supported_inplace_alter(TABLE *altered_table,
- Alter_inplace_info *ha_alter_info);
- virtual bool prepare_inplace_alter_table(TABLE *altered_table,
- Alter_inplace_info *ha_alter_info);
- virtual bool inplace_alter_table(TABLE *altered_table,
- Alter_inplace_info *ha_alter_info);
- virtual bool commit_inplace_alter_table(TABLE *altered_table,
- Alter_inplace_info *ha_alter_info,
- bool commit);
- virtual void notify_table_changed();
+ Alter_inplace_info *ha_alter_info)
+ override;
+ bool prepare_inplace_alter_table(TABLE *altered_table,
+ Alter_inplace_info *ha_alter_info)
+ override;
+ bool inplace_alter_table(TABLE *altered_table,
+ Alter_inplace_info *ha_alter_info) override;
+ bool commit_inplace_alter_table(TABLE *altered_table,
+ Alter_inplace_info *ha_alter_info,
+ bool commit) override;
+ void notify_table_changed() override;
/*
-------------------------------------------------------------------------
@@ -1518,24 +1521,24 @@ public:
all partitions.
-------------------------------------------------------------------------
*/
- virtual int optimize(THD* thd, HA_CHECK_OPT *check_opt);
- virtual int analyze(THD* thd, HA_CHECK_OPT *check_opt);
- virtual int check(THD* thd, HA_CHECK_OPT *check_opt);
- virtual int repair(THD* thd, HA_CHECK_OPT *check_opt);
- virtual bool check_and_repair(THD *thd);
- virtual bool auto_repair(int error) const;
- virtual bool is_crashed() const;
- virtual int check_for_upgrade(HA_CHECK_OPT *check_opt);
+ int optimize(THD* thd, HA_CHECK_OPT *check_opt) override;
+ int analyze(THD* thd, HA_CHECK_OPT *check_opt) override;
+ int check(THD* thd, HA_CHECK_OPT *check_opt) override;
+ int repair(THD* thd, HA_CHECK_OPT *check_opt) override;
+ bool check_and_repair(THD *thd) override;
+ bool auto_repair(int error) const override;
+ bool is_crashed() const override;
+ int check_for_upgrade(HA_CHECK_OPT *check_opt) override;
/*
-------------------------------------------------------------------------
MODULE condition pushdown
-------------------------------------------------------------------------
*/
- virtual const COND *cond_push(const COND *cond);
- virtual void cond_pop();
- virtual void clear_top_table_fields();
- virtual int info_push(uint info_type, void *info);
+ const COND *cond_push(const COND *cond) override;
+ void cond_pop() override;
+ void clear_top_table_fields() override;
+ int info_push(uint info_type, void *info) override;
private:
int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags);
@@ -1549,10 +1552,13 @@ public:
void append_row_to_str(String &str);
public:
+ int pre_calculate_checksum() override;
+ int calculate_checksum() override;
+
/* Enabled keycache for performance reasons, WL#4571 */
- virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt);
- virtual int preload_keys(THD* thd, HA_CHECK_OPT* check_opt);
- virtual TABLE_LIST *get_next_global_for_child();
+ int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt) override;
+ int preload_keys(THD* thd, HA_CHECK_OPT* check_opt) override;
+ TABLE_LIST *get_next_global_for_child() override;
/*
-------------------------------------------------------------------------
@@ -1561,9 +1567,9 @@ public:
Enable/Disable Indexes are only supported by HEAP and MyISAM.
-------------------------------------------------------------------------
*/
- virtual int disable_indexes(uint mode);
- virtual int enable_indexes(uint mode);
- virtual int indexes_are_disabled(void);
+ int disable_indexes(uint mode) override;
+ int enable_indexes(uint mode) override;
+ int indexes_are_disabled() override;
/*
-------------------------------------------------------------------------
@@ -1591,7 +1597,7 @@ public:
this can also be done before partition will support a mix of engines,
but preferably together with other incompatible API changes.
*/
- virtual handlerton *partition_ht() const
+ handlerton *partition_ht() const override
{
handlerton *h= m_file[0]->ht;
for (uint i=1; i < m_tot_parts; i++)
@@ -1618,5 +1624,16 @@ public:
friend int cmp_key_rowid_part_id(void *ptr, uchar *ref1, uchar *ref2);
friend int cmp_key_part_id(void *key_p, uchar *ref1, uchar *ref2);
+ bool can_convert_string(
+ const Field_string* field,
+ const Column_definition& new_field) const override;
+
+ bool can_convert_varstring(
+ const Field_varstring* field,
+ const Column_definition& new_field) const override;
+
+ bool can_convert_blob(
+ const Field_blob* field,
+ const Column_definition& new_field) const override;
};
#endif /* HA_PARTITION_INCLUDED */
diff --git a/sql/ha_sequence.cc b/sql/ha_sequence.cc
index a0959f692cf..1331fea74d1 100644
--- a/sql/ha_sequence.cc
+++ b/sql/ha_sequence.cc
@@ -30,6 +30,10 @@
#include "sql_base.h"
#include "log_event.h"
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h" /* wsrep_start_transaction() */
+#endif
+
/*
Table flags we should inherit and disable from the original engine.
We add HA_STATS_RECORDS_IS_EXACT as ha_sequence::info() will ensure
@@ -194,11 +198,12 @@ int ha_sequence::create(const char *name, TABLE *form,
the sequence with 'buf' as the sequence object is already up to date.
*/
-int ha_sequence::write_row(uchar *buf)
+int ha_sequence::write_row(const uchar *buf)
{
int error;
sequence_definition tmp_seq;
bool sequence_locked;
+ THD *thd= table->in_use;
DBUG_ENTER("ha_sequence::write_row");
DBUG_ASSERT(table->record[0] == buf);
@@ -235,8 +240,6 @@ int ha_sequence::write_row(uchar *buf)
on master and slaves
- Check that the new row is an accurate SEQUENCE object
*/
-
- THD *thd= table->in_use;
if (table->s->tmp_table == NO_TMP_TABLE &&
thd->mdl_context.upgrade_shared_lock(table->mdl_ticket,
MDL_EXCLUSIVE,
@@ -255,6 +258,16 @@ int ha_sequence::write_row(uchar *buf)
sequence->write_lock(table);
}
+#ifdef WITH_WSREP
+ /* We need to start Galera transaction for select NEXT VALUE FOR
+ sequence if it is not yet started. Note that ALTER is handled
+ as TOI. */
+ if (WSREP_ON && WSREP(thd) &&
+ !thd->wsrep_trx().active() &&
+ wsrep_thd_is_local(thd))
+ wsrep_start_transaction(thd, thd->wsrep_next_trx_id());
+#endif
+
if (likely(!(error= file->update_first_row(buf))))
{
Log_func *log_func= Write_rows_log_event::binlog_row_logging_function;
@@ -421,6 +434,9 @@ static int sequence_initialize(void *p)
HTON_HIDDEN |
HTON_TEMPORARY_NOT_SUPPORTED |
HTON_ALTER_NOT_SUPPORTED |
+#ifdef WITH_WSREP
+ HTON_WSREP_REPLICATION |
+#endif
HTON_NO_PARTITION);
DBUG_RETURN(0);
}
diff --git a/sql/ha_sequence.h b/sql/ha_sequence.h
index fd9da05b591..4360e9faa3d 100644
--- a/sql/ha_sequence.h
+++ b/sql/ha_sequence.h
@@ -71,7 +71,7 @@ public:
int create(const char *name, TABLE *form,
HA_CREATE_INFO *create_info);
handler *clone(const char *name, MEM_ROOT *mem_root);
- int write_row(uchar *buf);
+ int write_row(const uchar *buf);
Table_flags table_flags() const;
/* One can't update or delete from sequence engine */
int update_row(const uchar *old_data, const uchar *new_data)
diff --git a/sql/handle_connections_win.cc b/sql/handle_connections_win.cc
new file mode 100644
index 00000000000..50fd9090e0a
--- /dev/null
+++ b/sql/handle_connections_win.cc
@@ -0,0 +1,613 @@
+/* Copyright (c) 2018 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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+/* Accepting connections on Windows */
+
+#include <my_global.h>
+#include <sql_class.h>
+#include <sql_connect.h>
+#include <mysqld.h>
+#include <mswsock.h>
+#include <mysql/psi/mysql_socket.h>
+#include <sddl.h>
+
+#include <handle_connections_win.h>
+
+/* From mysqld.cc */
+extern HANDLE hEventShutdown;
+extern MYSQL_SOCKET base_ip_sock, extra_ip_sock;
+#ifdef HAVE_POOL_OF_THREADS
+extern PTP_CALLBACK_ENVIRON get_threadpool_win_callback_environ();
+extern void tp_win_callback_prolog();
+#else
+#define get_threadpool_win_callback_environ() 0
+#define tp_win_callback_prolog() do{}while(0)
+#endif
+static SECURITY_ATTRIBUTES pipe_security;
+
+/**
+ Abstract base class for accepting new connection,
+ asynchronously (i.e the accept() operation can be posted,
+ and result is retrieved later) , and creating a new connection.
+*/
+
+struct Listener
+{
+ /** Windows handle of the Listener.
+ Subclasses would use SOCKET or named pipe handle
+ */
+ HANDLE m_handle;
+ /** Required for all async IO*/
+ OVERLAPPED m_overlapped;
+
+ /** Create new listener
+ @param handle - @see m_handle
+ @param wait_handle - usually, event handle or INVALID_HANDLE_VALUE
+ @see wait_handle
+ */
+ Listener(HANDLE handle, HANDLE wait_handle):
+ m_handle(handle), m_overlapped()
+ {
+ m_overlapped.hEvent= wait_handle;
+ }
+
+ /**
+ if not NULL, this handle can be be used in WaitForSingle/MultipleObject(s).
+ This handle will be closed when object is destroyed.
+
+ If NULL, the completion notification happens in threadpool.
+ */
+ HANDLE wait_handle()
+ {
+ return m_overlapped.hEvent;
+ }
+
+ /* Start waiting for new client connection. */
+ virtual void begin_accept()= 0;
+
+ /**
+ Completion callback,called whenever IO posted by begin_accept is finisjed
+ Listener needs to create a new THD then (or, call scheduler so it creates one)
+
+ @param success - whether IO completed successfull
+ */
+ virtual void completion_callback(bool success)= 0;
+
+ /**
+ Completion callback for Listener, that uses events for waiting
+ to IO. Not suitable for threadpool etc. Retrieves the status of
+ completed IO from the OVERLAPPED structure
+ */
+ void completion_callback()
+ {
+ DBUG_ASSERT(wait_handle() && (wait_handle() != INVALID_HANDLE_VALUE));
+ DWORD bytes;
+ return completion_callback(
+ GetOverlappedResult(wait_handle(), &m_overlapped, &bytes, FALSE));
+ }
+
+ /** Cancel an in-progress IO. Useful for threadpool-bound IO */
+ void cancel()
+ {
+ CancelIoEx(m_handle, &m_overlapped);
+ }
+
+ /* Destructor. Closes wait handle, if it was passed in constructor */
+ virtual ~Listener()
+ {
+ if (m_overlapped.hEvent)
+ CloseHandle(m_overlapped.hEvent);
+ };
+};
+
+/* Winsock extension finctions. */
+static LPFN_ACCEPTEX my_AcceptEx;
+static LPFN_GETACCEPTEXSOCKADDRS my_GetAcceptExSockaddrs;
+
+/**
+ Listener that handles socket connections.
+ Can be threadpool-bound (i.e the completion is executed in threadpool thread),
+ or use events for waits.
+
+ Threadpool-bound listener should be used with theradpool scheduler, for better
+ performance.
+*/
+struct Socket_Listener: public Listener
+{
+ /** Client socket passed to AcceptEx() call.*/
+ SOCKET m_client_socket;
+
+ /** Buffer for sockaddrs passed to AcceptEx()/GetAcceptExSockaddrs() */
+ char m_buffer[2 * sizeof(sockaddr_storage) + 32];
+
+ /* Threadpool IO struct.*/
+ PTP_IO m_tp_io;
+
+ /**
+ Callback for Windows threadpool's StartThreadpoolIo() function.
+ */
+ static void CALLBACK tp_accept_completion_callback(
+ PTP_CALLBACK_INSTANCE, PVOID context, PVOID , ULONG io_result,
+ ULONG_PTR, PTP_IO io)
+ {
+ tp_win_callback_prolog();
+ Listener *listener= (Listener *)context;
+
+ if (io_result == ERROR_OPERATION_ABORTED)
+ {
+ /* ERROR_OPERATION_ABORTED caused by CancelIoEx()*/
+ CloseThreadpoolIo(io);
+ delete listener;
+ return;
+ }
+ listener->completion_callback(io_result == 0);
+ }
+
+ /**
+ Constructor
+ @param listen_socket - listening socket
+ @PTP_CALLBACK_ENVIRON callback_environ - threadpool environment, or NULL
+ if threadpool is not used for completion callbacks.
+ */
+ Socket_Listener(MYSQL_SOCKET listen_socket, PTP_CALLBACK_ENVIRON callback_environ) :
+ Listener((HANDLE)listen_socket.fd,0),
+ m_client_socket(INVALID_SOCKET)
+ {
+ if (callback_environ)
+ {
+ /* Accept executed in threadpool. */
+ m_tp_io= CreateThreadpoolIo(m_handle,
+ tp_accept_completion_callback, this, callback_environ);
+ }
+ else
+ {
+ /* Completion signaled via event. */
+ m_tp_io= 0;
+ m_overlapped.hEvent= CreateEvent(0, FALSE , FALSE, 0);
+ }
+ }
+
+ /*
+ Use AcceptEx to asynchronously wait for new connection;
+ */
+ void begin_accept()
+ {
+retry :
+ m_client_socket= socket(server_socket_ai_family, SOCK_STREAM, IPPROTO_TCP);
+ if (m_client_socket == INVALID_SOCKET)
+ {
+ sql_perror("socket() call failed.");
+ unireg_abort(1);
+ }
+
+ DWORD bytes_received;
+ if (m_tp_io)
+ StartThreadpoolIo(m_tp_io);
+
+ BOOL ret= my_AcceptEx(
+ (SOCKET)m_handle,
+ m_client_socket,
+ m_buffer,
+ 0,
+ sizeof(sockaddr_storage) + 16,
+ sizeof(sockaddr_storage) + 16,
+ &bytes_received,
+ &m_overlapped);
+
+ DWORD last_error= ret? 0: WSAGetLastError();
+ if (last_error == WSAECONNRESET || last_error == ERROR_NETNAME_DELETED)
+ {
+ if (m_tp_io)
+ CancelThreadpoolIo(m_tp_io);
+ closesocket(m_client_socket);
+ goto retry;
+ }
+
+ if (ret || last_error == ERROR_IO_PENDING || abort_loop)
+ return;
+
+ sql_print_error("my_AcceptEx failed, last error %u", last_error);
+ abort();
+ }
+
+ /* Create new socket connection.*/
+ void completion_callback(bool success)
+ {
+ if (!success)
+ {
+ /* my_AcceptEx() returned error */
+ closesocket(m_client_socket);
+ begin_accept();
+ return;
+ }
+
+ MYSQL_SOCKET s_client{m_client_socket};
+ MYSQL_SOCKET s_listen{(SOCKET)m_handle};
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ /* Parse socket addresses buffer filled by AcceptEx(),
+ only needed for PSI instrumentation. */
+ sockaddr *local_addr, *remote_addr;
+ int local_addr_len, remote_addr_len;
+
+ my_GetAcceptExSockaddrs(m_buffer,
+ 0, sizeof(sockaddr_storage) + 16, sizeof(sockaddr_storage) + 16,
+ &local_addr, &local_addr_len, &remote_addr, &remote_addr_len);
+
+ s_client.m_psi= PSI_SOCKET_CALL(init_socket)
+ (key_socket_client_connection, (const my_socket*)&s_listen.fd, remote_addr, remote_addr_len);
+#endif
+
+ /* Start accepting new connection. After this point, do not use
+ any member data, they could be used by a different (threadpool) thread. */
+ begin_accept();
+
+ /* Some chores post-AcceptEx() that we need to create a normal socket.*/
+ if (setsockopt(s_client.fd, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
+ (char *)&s_listen.fd, sizeof(s_listen.fd)))
+ {
+ if (!abort_loop)
+ {
+ sql_perror("setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.");
+ abort();
+ }
+ }
+
+ /* Create a new connection.*/
+ handle_accepted_socket(s_client, s_listen);
+ }
+
+ ~Socket_Listener()
+ {
+ if (m_client_socket != INVALID_SOCKET)
+ closesocket(m_client_socket);
+ }
+
+ /*
+ Retrieve the pointer to the Winsock extension functions
+ AcceptEx and GetAcceptExSockaddrs.
+ */
+ static void init_winsock_extensions()
+ {
+ SOCKET s= mysql_socket_getfd(base_ip_sock);
+ if (s == INVALID_SOCKET)
+ s= mysql_socket_getfd(extra_ip_sock);
+ if (s == INVALID_SOCKET)
+ {
+ /* --skip-networking was used*/
+ return;
+ }
+ GUID guid_AcceptEx= WSAID_ACCEPTEX;
+ GUID guid_GetAcceptExSockaddrs= WSAID_GETACCEPTEXSOCKADDRS;
+
+ GUID *guids[]= { &guid_AcceptEx, &guid_GetAcceptExSockaddrs };
+ void *funcs[]= { &my_AcceptEx, &my_GetAcceptExSockaddrs };
+ DWORD bytes;
+ for (int i= 0; i < array_elements(guids); i++)
+ {
+ if (WSAIoctl(s,
+ SIO_GET_EXTENSION_FUNCTION_POINTER,
+ guids[i], sizeof(GUID),
+ funcs[i], sizeof(void *),
+ &bytes, 0, 0) == -1)
+ {
+ sql_print_error("WSAIoctl(SIO_GET_EXTENSION_FUNCTION_POINTER) failed");
+ unireg_abort(1);
+ }
+ }
+ }
+};
+
+/*
+ Create a security descriptor for pipe.
+ - Use low integrity level, so that it is possible to connect
+ from any process.
+ - Give current user read/write access to pipe.
+ - Give Everyone read/write access to pipe minus FILE_CREATE_PIPE_INSTANCE
+*/
+static void init_pipe_security_descriptor()
+{
+#define SDDL_FMT "S:(ML;; NW;;; LW) D:(A;; 0x%08x;;; WD)(A;; FRFW;;; %s)"
+#define EVERYONE_PIPE_ACCESS_MASK \
+ (FILE_READ_DATA | FILE_READ_EA | FILE_READ_ATTRIBUTES | READ_CONTROL | \
+ SYNCHRONIZE | FILE_WRITE_DATA | FILE_WRITE_EA | FILE_WRITE_ATTRIBUTES)
+
+#ifndef SECURITY_MAX_SID_STRING_CHARACTERS
+/* Old SDK does not have this constant */
+#define SECURITY_MAX_SID_STRING_CHARACTERS 187
+#endif
+
+ /*
+ Figure out SID of the user that runs the server, then create SDDL string
+ for pipe permissions, and convert it to the security descriptor.
+ */
+ char sddl_string[sizeof(SDDL_FMT) + 8 + SECURITY_MAX_SID_STRING_CHARACTERS];
+ struct
+ {
+ TOKEN_USER token_user;
+ BYTE buffer[SECURITY_MAX_SID_SIZE];
+ } token_buffer;
+ HANDLE token;
+ DWORD tmp;
+
+ if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token))
+ goto fail;
+
+ if (!GetTokenInformation(token, TokenUser, &token_buffer,
+ (DWORD) sizeof(token_buffer), &tmp))
+ goto fail;
+
+ CloseHandle(token);
+
+ char *current_user_string_sid;
+ if (!ConvertSidToStringSid(token_buffer.token_user.User.Sid,
+ &current_user_string_sid))
+ goto fail;
+
+ snprintf(sddl_string, sizeof(sddl_string), SDDL_FMT,
+ EVERYONE_PIPE_ACCESS_MASK, current_user_string_sid);
+ LocalFree(current_user_string_sid);
+
+ if (ConvertStringSecurityDescriptorToSecurityDescriptor(sddl_string,
+ SDDL_REVISION_1, &pipe_security.lpSecurityDescriptor, 0))
+ return;
+
+fail:
+ sql_perror("Can't start server : Initialize security descriptor");
+ unireg_abort(1);
+}
+
+/**
+ Pipe Listener.
+ Only event notification mode is implemented, no threadpool
+*/
+struct Pipe_Listener : public Listener
+{
+ PTP_CALLBACK_ENVIRON m_tp_env;
+ Pipe_Listener():
+ Listener(INVALID_HANDLE_VALUE, CreateEvent(0, FALSE, FALSE, 0)),
+ m_tp_env(get_threadpool_win_callback_environ())
+ {
+ }
+
+ /*
+ Creates local named pipe instance \\.\pipe\$socket for named pipe connection.
+ */
+ static HANDLE create_named_pipe()
+ {
+ static bool first_instance= true;
+ static char pipe_name[512];
+ DWORD open_mode= PIPE_ACCESS_DUPLEX |
+ FILE_FLAG_OVERLAPPED;
+
+ if (first_instance)
+ {
+ snprintf(pipe_name, sizeof(pipe_name), "\\\\.\\pipe\\%s", mysqld_unix_port);
+ open_mode |= FILE_FLAG_FIRST_PIPE_INSTANCE;
+ init_pipe_security_descriptor();
+ pipe_security.nLength= sizeof(SECURITY_ATTRIBUTES);
+ pipe_security.bInheritHandle= FALSE;
+ }
+ HANDLE pipe_handle= CreateNamedPipe(pipe_name,
+ open_mode,
+ PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
+ PIPE_UNLIMITED_INSTANCES,
+ (int)global_system_variables.net_buffer_length,
+ (int)global_system_variables.net_buffer_length,
+ NMPWAIT_USE_DEFAULT_WAIT,
+ &pipe_security);
+ if (pipe_handle == INVALID_HANDLE_VALUE)
+ {
+ sql_perror("Create named pipe failed");
+ sql_print_error("Aborting");
+ exit(1);
+ }
+ first_instance= false;
+ return pipe_handle;
+ }
+
+ static void create_pipe_connection(HANDLE pipe)
+ {
+ CONNECT *connect;
+ if (!(connect= new CONNECT) || !(connect->vio= vio_new_win32pipe(pipe)))
+ {
+ CloseHandle(pipe);
+ delete connect;
+ statistic_increment(aborted_connects, &LOCK_status);
+ statistic_increment(connection_errors_internal, &LOCK_status);
+ return;
+ }
+ connect->host= my_localhost;
+ create_new_thread(connect);
+ }
+
+ /* Threadpool callback.*/
+ static void CALLBACK tp_create_pipe_connection(
+ PTP_CALLBACK_INSTANCE,void *Context)
+ {
+ tp_win_callback_prolog();
+ create_pipe_connection(Context);
+ }
+
+ void begin_accept()
+ {
+ m_handle= create_named_pipe();
+ BOOL connected= ConnectNamedPipe(m_handle, &m_overlapped);
+ if (connected)
+ {
+ /* Overlapped ConnectNamedPipe should return zero. */
+ sql_perror("Overlapped ConnectNamedPipe() already connected.");
+ abort();
+ }
+ DWORD last_error= GetLastError();
+ switch (last_error)
+ {
+ case ERROR_PIPE_CONNECTED:
+ /* Client is already connected, so signal an event.*/
+ {
+ /*
+ Cleanup overlapped (so that subsequent GetOverlappedResult()
+ does not show results of previous IO
+ */
+ HANDLE e= m_overlapped.hEvent;
+ memset(&m_overlapped, 0, sizeof(m_overlapped));
+ m_overlapped.hEvent = e;
+ }
+ if (!SetEvent(m_overlapped.hEvent))
+ {
+ sql_perror("SetEvent() failed for connected pipe.");
+ abort();
+ }
+ break;
+ case ERROR_IO_PENDING:
+ break;
+ default:
+ sql_perror("ConnectNamedPipe() failed.");
+ abort();
+ break;
+ }
+ }
+
+ void completion_callback(bool success)
+ {
+ if (!success)
+ {
+#ifdef DBUG_OFF
+ sql_print_warning("ConnectNamedPipe completed with %u", GetLastError());
+#endif
+ CloseHandle(m_handle);
+ m_handle= INVALID_HANDLE_VALUE;
+ begin_accept();
+ return;
+ }
+ HANDLE pipe= m_handle;
+ begin_accept();
+ // If threadpool is on, create connection in threadpool thread
+ if (!m_tp_env || !TrySubmitThreadpoolCallback(tp_create_pipe_connection, pipe, m_tp_env))
+ create_pipe_connection(pipe);
+ }
+
+ ~Pipe_Listener()
+ {
+ if (m_handle != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(m_handle);
+ }
+ }
+
+ static void cleanup()
+ {
+ LocalFree(pipe_security.lpSecurityDescriptor);
+ }
+};
+
+/**
+ Accept new client connections on Windows.
+
+ Since we deal with pipe and sockets, they cannot be put into a select/loop.
+ But we can use asynchronous IO, and WaitForMultipleObject() loop.
+
+ In addition, for slightly better performance, if we're using threadpool,
+ socket connections are accepted directly in the threadpool.
+
+ The mode of operation is therefore
+
+ 1. There is WaitForMultipleObject() loop that waits for shutdown notification
+ (hEventShutdown),and possibly pipes and sockets(e.g if threadpool is not used)
+ This loop ends when shutdown notification is detected.
+
+ 2. If threadpool is used, new socket connections are accepted there.
+*/
+
+
+#define MAX_WAIT_HANDLES 32
+#define NUM_PIPE_LISTENERS 24
+#define SHUTDOWN_IDX 0
+#define LISTENER_START_IDX 1
+
+void handle_connections_win()
+{
+ Listener* all_listeners[MAX_WAIT_HANDLES]= {};
+ HANDLE wait_events[MAX_WAIT_HANDLES]= {};
+ int n_listeners= 0;
+ int n_waits= 0;
+
+ Socket_Listener::init_winsock_extensions();
+
+ /* Listen for TCP connections on "extra-port" (no threadpool).*/
+ if (extra_ip_sock.fd != INVALID_SOCKET)
+ all_listeners[n_listeners++]= new Socket_Listener(extra_ip_sock, 0);
+
+ /* Listen for named pipe connections */
+ if (mysqld_unix_port[0] && !opt_bootstrap && opt_enable_named_pipe)
+ {
+ /*
+ Use several listeners for pipe, to reduce ERROR_PIPE_BUSY on client side.
+ */
+ for (int i= 0; i < NUM_PIPE_LISTENERS; i++)
+ all_listeners[n_listeners++]= new Pipe_Listener();
+ }
+
+ if (base_ip_sock.fd != INVALID_SOCKET)
+ {
+ /* Wait for TCP connections.*/
+ SetFileCompletionNotificationModes((HANDLE)base_ip_sock.fd, FILE_SKIP_SET_EVENT_ON_HANDLE);
+ all_listeners[n_listeners++]= new Socket_Listener(base_ip_sock, get_threadpool_win_callback_environ());
+ }
+
+ if (!n_listeners && !opt_bootstrap)
+ {
+ sql_print_error("Either TCP connections or named pipe connections must be enabled.");
+ unireg_abort(1);
+ }
+
+ wait_events[SHUTDOWN_IDX]= hEventShutdown;
+ n_waits = 1;
+
+ for (int i= 0; i < n_listeners; i++)
+ {
+ HANDLE wait_handle= all_listeners[i]->wait_handle();
+ if(wait_handle)
+ {
+ DBUG_ASSERT((i == 0) || (all_listeners[i-1]->wait_handle() != 0));
+ wait_events[n_waits++]= wait_handle;
+ }
+ all_listeners[i]->begin_accept();
+ }
+
+ for (;;)
+ {
+ DWORD idx = WaitForMultipleObjects(n_waits ,wait_events, FALSE, INFINITE);
+ DBUG_ASSERT((int)idx >= 0 && (int)idx < n_waits);
+
+ if (idx == SHUTDOWN_IDX)
+ break;
+
+ all_listeners[idx - LISTENER_START_IDX]->completion_callback();
+ }
+
+ /* Cleanup */
+ for (int i= 0; i < n_listeners; i++)
+ {
+ Listener *listener= all_listeners[i];
+ if (listener->wait_handle())
+ delete listener;
+ else
+ // Threadpool-bound listener will be deleted in threadpool
+ // Do not call destructor, because callback maybe running.
+ listener->cancel();
+ }
+ Pipe_Listener::cleanup();
+}
diff --git a/sql/handle_connections_win.h b/sql/handle_connections_win.h
new file mode 100644
index 00000000000..a81f4346fb2
--- /dev/null
+++ b/sql/handle_connections_win.h
@@ -0,0 +1,20 @@
+/* Copyright (c) 2018 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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+/**
+ Handles incoming socket and pipe connections, on Windows.
+ Creates new (THD) connections..
+*/
+extern void handle_connections_win();
diff --git a/sql/handler.cc b/sql/handler.cc
index 66a932cc70e..e6e665f0e12 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -43,6 +43,7 @@
#include "debug_sync.h" // DEBUG_SYNC
#include "sql_audit.h"
#include "ha_sequence.h"
+#include "rowid_filter.h"
#ifdef WITH_PARTITION_STORAGE_ENGINE
#include "ha_partition.h"
@@ -54,8 +55,12 @@
#include "semisync_master.h"
#include "wsrep_mysqld.h"
-#include "wsrep.h"
+#ifdef WITH_WSREP
+#include "wsrep_binlog.h"
#include "wsrep_xid.h"
+#include "wsrep_thd.h"
+#include "wsrep_trans_observer.h" /* wsrep transaction hooks */
+#endif /* WITH_WSREP */
/*
While we have legacy_db_type, we have this array to
@@ -128,6 +133,23 @@ static plugin_ref ha_default_tmp_plugin(THD *thd)
return ha_default_plugin(thd);
}
+#if defined(WITH_ARIA_STORAGE_ENGINE) && MYSQL_VERSION_ID < 100500
+void ha_maria_implicit_commit(THD *thd, bool new_trn)
+{
+ if (ha_maria::has_active_transaction(thd))
+ {
+ int error;
+ MDL_request mdl_request;
+ mdl_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_COMMIT, MDL_EXPLICIT);
+ error= thd->mdl_context.acquire_lock(&mdl_request,
+ thd->variables.lock_wait_timeout);
+ ha_maria::implicit_commit(thd, new_trn);
+ if (!error)
+ thd->mdl_context.release_lock(mdl_request.ticket);
+ }
+}
+#endif
+
/** @brief
Return the default storage engine handlerton for thread
@@ -277,6 +299,9 @@ handlerton *ha_checktype(THD *thd, handlerton *hton, bool no_substitute)
if (no_substitute)
return NULL;
+#ifdef WITH_WSREP
+ (void)wsrep_after_rollback(thd, false);
+#endif /* WITH_WSREP */
return ha_default_handlerton(thd);
} /* ha_checktype */
@@ -322,7 +347,7 @@ handler *get_ha_partition(partition_info *part_info)
}
else
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR),
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
static_cast<int>(sizeof(ha_partition)));
}
DBUG_RETURN(((handler*) partition));
@@ -432,9 +457,9 @@ static int ha_finish_errors(void)
return 0;
}
-static volatile int32 need_full_discover_for_existence= 0;
-static volatile int32 engines_with_discover_file_names= 0;
-static volatile int32 engines_with_discover= 0;
+static Atomic_counter<int32> need_full_discover_for_existence(0);
+static Atomic_counter<int32> engines_with_discover_file_names(0);
+static Atomic_counter<int32> engines_with_discover(0);
static int full_discover_for_existence(handlerton *, const char *, const char *)
{ return 0; }
@@ -456,13 +481,13 @@ static int hton_ext_based_table_discovery(handlerton *hton, LEX_CSTRING *db,
static void update_discovery_counters(handlerton *hton, int val)
{
if (hton->discover_table_existence == full_discover_for_existence)
- my_atomic_add32(&need_full_discover_for_existence, val);
+ need_full_discover_for_existence+= val;
if (hton->discover_table_names && hton->tablefile_extensions[0])
- my_atomic_add32(&engines_with_discover_file_names, val);
+ engines_with_discover_file_names+= val;
if (hton->discover_table)
- my_atomic_add32(&engines_with_discover, val);
+ engines_with_discover+= val;
}
int ha_finalize_handlerton(st_plugin_int *plugin)
@@ -709,7 +734,7 @@ int ha_init()
binary log (which is considered a transaction-capable storage engine in
counting total_ha)
*/
- opt_using_transactions= total_ha>(ulong)opt_bin_log;
+ opt_using_transactions= total_ha > (ulong) opt_bin_log;
savepoint_alloc_size+= sizeof(SAVEPOINT);
DBUG_RETURN(error);
}
@@ -719,7 +744,6 @@ int ha_end()
int error= 0;
DBUG_ENTER("ha_end");
-
/*
This should be eventually based on the graceful shutdown flag.
So if flag is equal to HA_PANIC_CLOSE, the deallocate
@@ -835,6 +859,7 @@ static my_bool kill_handlerton(THD *thd, plugin_ref plugin,
{
handlerton *hton= plugin_hton(plugin);
+ mysql_mutex_assert_owner(&thd->LOCK_thd_kill);
if (hton->state == SHOW_OPTION_YES && hton->kill_query &&
thd_get_ha_data(thd, hton))
hton->kill_query(hton, thd, *(enum thd_kill_levels *) level);
@@ -865,6 +890,43 @@ void ha_disable_internal_writes(bool disable)
}
+/*****************************************************************************
+ Backup functions
+******************************************************************************/
+
+static my_bool plugin_prepare_for_backup(THD *unused1, plugin_ref plugin,
+ void *not_used)
+{
+ handlerton *hton= plugin_hton(plugin);
+ if (hton->state == SHOW_OPTION_YES && hton->prepare_for_backup)
+ hton->prepare_for_backup();
+ return FALSE;
+}
+
+void ha_prepare_for_backup()
+{
+ plugin_foreach_with_mask(0, plugin_prepare_for_backup,
+ MYSQL_STORAGE_ENGINE_PLUGIN,
+ PLUGIN_IS_DELETED|PLUGIN_IS_READY, 0);
+}
+
+static my_bool plugin_end_backup(THD *unused1, plugin_ref plugin,
+ void *not_used)
+{
+ handlerton *hton= plugin_hton(plugin);
+ if (hton->state == SHOW_OPTION_YES && hton->end_backup)
+ hton->end_backup();
+ return FALSE;
+}
+
+void ha_end_backup()
+{
+ plugin_foreach_with_mask(0, plugin_end_backup,
+ MYSQL_STORAGE_ENGINE_PLUGIN,
+ PLUGIN_IS_DELETED|PLUGIN_IS_READY, 0);
+}
+
+
/* ========================================================================
======================= TRANSACTIONS ===================================*/
@@ -1197,25 +1259,40 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
ha_info->register_ha(trans, ht_arg);
trans->no_2pc|=(ht_arg->prepare==0);
- if (thd->transaction.xid_state.xid.is_null())
- thd->transaction.xid_state.xid.set(thd->query_id);
+
+ /* Set implicit xid even if there's explicit XA, it will be ignored anyway. */
+ if (thd->transaction.implicit_xid.is_null())
+ thd->transaction.implicit_xid.set(thd->query_id);
+
DBUG_VOID_RETURN;
}
static int prepare_or_error(handlerton *ht, THD *thd, bool all)
{
+#ifdef WITH_WSREP
+ const bool run_wsrep_hooks= wsrep_run_commit_hook(thd, all);
+ if (run_wsrep_hooks && ht->flags & HTON_WSREP_REPLICATION &&
+ wsrep_before_prepare(thd, all))
+ {
+ return(1);
+ }
+#endif /* WITH_WSREP */
+
int err= ht->prepare(ht, thd, all);
status_var_increment(thd->status_var.ha_prepare_count);
if (err)
{
- /* avoid sending error, if we're going to replay the transaction */
-#ifdef WITH_WSREP
- if (ht != wsrep_hton ||
- err == EMSGSIZE || thd->wsrep_conflict_state != MUST_REPLAY)
-#endif
my_error(ER_ERROR_DURING_COMMIT, MYF(0), err);
}
+#ifdef WITH_WSREP
+ if (run_wsrep_hooks && !err && ht->flags & HTON_WSREP_REPLICATION &&
+ wsrep_after_prepare(thd, all))
+ {
+ err= 1;
+ }
+#endif /* WITH_WSREP */
+
return err;
}
@@ -1356,6 +1433,9 @@ int ha_commit_trans(THD *thd, bool all)
Ha_trx_info *ha_info= trans->ha_list;
bool need_prepare_ordered, need_commit_ordered;
my_xid xid;
+#ifdef WITH_WSREP
+ const bool run_wsrep_hooks= wsrep_run_commit_hook(thd, all);
+#endif /* WITH_WSREP */
DBUG_ENTER("ha_commit_trans");
DBUG_PRINT("info",("thd: %p option_bits: %lu all: %d",
thd, (ulong) thd->variables.option_bits, all));
@@ -1399,10 +1479,6 @@ int ha_commit_trans(THD *thd, bool all)
DBUG_RETURN(2);
}
-#ifdef WITH_ARIA_STORAGE_ENGINE
- ha_maria::implicit_commit(thd, TRUE);
-#endif
-
if (!ha_info)
{
/*
@@ -1410,7 +1486,15 @@ int ha_commit_trans(THD *thd, bool all)
*/
if (is_real_trans)
thd->transaction.cleanup();
- DBUG_RETURN(0);
+#ifdef WITH_WSREP
+ if (wsrep_is_active(thd) && is_real_trans && !error)
+ {
+ wsrep_commit_empty(thd, all);
+ }
+#endif /* WITH_WSREP */
+
+ ha_maria_implicit_commit(thd, TRUE);
+ DBUG_RETURN(error);
}
DBUG_EXECUTE_IF("crash_commit_before", DBUG_SUICIDE(););
@@ -1423,7 +1507,7 @@ int ha_commit_trans(THD *thd, bool all)
/* rw_trans is TRUE when we in a transaction changing data */
bool rw_trans= is_real_trans &&
(rw_ha_count > (thd->is_current_stmt_binlog_disabled()?0U:1U));
- MDL_request mdl_request;
+ MDL_request mdl_backup;
DBUG_PRINT("info", ("is_real_trans: %d rw_trans: %d rw_ha_count: %d",
is_real_trans, rw_trans, rw_ha_count));
@@ -1437,19 +1521,25 @@ int ha_commit_trans(THD *thd, bool all)
We allow the owner of FTWRL to COMMIT; we assume that it knows
what it does.
*/
- mdl_request.init(MDL_key::COMMIT, "", "", MDL_INTENTION_EXCLUSIVE,
- MDL_EXPLICIT);
+ mdl_backup.init(MDL_key::BACKUP, "", "", MDL_BACKUP_COMMIT, MDL_EXPLICIT);
- if (!WSREP(thd) &&
- thd->mdl_context.acquire_lock(&mdl_request,
- thd->variables.lock_wait_timeout))
+ if (!WSREP(thd))
{
- ha_rollback_trans(thd, all);
- DBUG_RETURN(1);
+ if (thd->mdl_context.acquire_lock(&mdl_backup,
+ thd->variables.lock_wait_timeout))
+ {
+ ha_rollback_trans(thd, all);
+ DBUG_RETURN(1);
+ }
+ thd->backup_commit_lock= &mdl_backup;
}
-
DEBUG_SYNC(thd, "ha_commit_trans_after_acquire_commit_lock");
+
+ /* Use shortcut as we already have the MDL_BACKUP_COMMIT lock */
+ ha_maria::implicit_commit(thd, TRUE);
}
+ else
+ ha_maria_implicit_commit(thd, TRUE);
if (rw_trans &&
opt_readonly &&
@@ -1484,26 +1574,59 @@ int ha_commit_trans(THD *thd, bool all)
goto err;
}
DBUG_ASSERT(trx_start_id);
+#ifdef WITH_WSREP
+ bool saved_wsrep_on= thd->variables.wsrep_on;
+ thd->variables.wsrep_on= false;
+#endif
TR_table trt(thd, true);
if (trt.update(trx_start_id, trx_end_id))
+ {
+#ifdef WITH_WSREP
+ thd->variables.wsrep_on= saved_wsrep_on;
+#endif
+ (void) trans_rollback_stmt(thd);
goto err;
+ }
// Here, the call will not commit inside InnoDB. It is only working
// around closing thd->transaction.stmt open by TR_table::open().
if (all)
commit_one_phase_2(thd, false, &thd->transaction.stmt, false);
+#ifdef WITH_WSREP
+ thd->variables.wsrep_on= saved_wsrep_on;
+#endif
}
}
#endif
if (trans->no_2pc || (rw_ha_count <= 1))
{
+#ifdef WITH_WSREP
+ /*
+ This commit will not go through log_and_order() where wsrep commit
+ ordering is normally done. Commit ordering must be done here.
+ */
+ if (run_wsrep_hooks)
+ error= wsrep_before_commit(thd, all);
+ if (error)
+ {
+ ha_rollback_trans(thd, FALSE);
+ goto wsrep_err;
+ }
+#endif /* WITH_WSREP */
error= ha_commit_one_phase(thd, all);
+#ifdef WITH_WSREP
+ if (run_wsrep_hooks)
+ error= error || wsrep_after_commit(thd, all);
+#endif /* WITH_WSREP */
goto done;
}
need_prepare_ordered= FALSE;
need_commit_ordered= FALSE;
- xid= thd->transaction.xid_state.xid.get_my_xid();
+ DBUG_ASSERT(thd->transaction.implicit_xid.get_my_xid() ==
+ thd->transaction.implicit_xid.quick_get_my_xid());
+ xid= thd->transaction.xid_state.is_explicit_XA() ? 0 :
+ thd->transaction.implicit_xid.quick_get_my_xid();
for (Ha_trx_info *hi= ha_info; hi; hi= hi->next())
{
@@ -1529,10 +1652,14 @@ int ha_commit_trans(THD *thd, bool all)
DBUG_EXECUTE_IF("crash_commit_after_prepare", DBUG_SUICIDE(););
#ifdef WITH_WSREP
- if (!error && WSREP_ON && wsrep_is_wsrep_xid(&thd->transaction.xid_state.xid))
+ if (run_wsrep_hooks && !error)
{
- // xid was rewritten by wsrep
- xid= wsrep_xid_seqno(thd->transaction.xid_state.xid);
+ wsrep::seqno const s= wsrep_xid_seqno(thd->wsrep_xid);
+ if (!s.is_undefined())
+ {
+ // xid was rewritten by wsrep
+ xid= s.get();
+ }
}
#endif /* WITH_WSREP */
@@ -1541,18 +1668,35 @@ int ha_commit_trans(THD *thd, bool all)
error= commit_one_phase_2(thd, all, trans, is_real_trans);
goto done;
}
-
+#ifdef WITH_WSREP
+ if (run_wsrep_hooks && (error = wsrep_before_commit(thd, all)))
+ goto wsrep_err;
+#endif /* WITH_WSREP */
DEBUG_SYNC(thd, "ha_commit_trans_before_log_and_order");
cookie= tc_log->log_and_order(thd, xid, all, need_prepare_ordered,
need_commit_ordered);
if (!cookie)
+ {
+ WSREP_DEBUG("log_and_order has failed %llu %d", thd->thread_id, cookie);
goto err;
-
+ }
DEBUG_SYNC(thd, "ha_commit_trans_after_log_and_order");
DBUG_EXECUTE_IF("crash_commit_after_log", DBUG_SUICIDE(););
error= commit_one_phase_2(thd, all, trans, is_real_trans) ? 2 : 0;
-
+#ifdef WITH_WSREP
+ if (run_wsrep_hooks && (error || (error = wsrep_after_commit(thd, all))))
+ {
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ if (wsrep_must_abort(thd))
+ {
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ (void)tc_log->unlog(cookie, xid);
+ goto wsrep_err;
+ }
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ }
+#endif /* WITH_WSREP */
DBUG_EXECUTE_IF("crash_commit_before_unlog", DBUG_SUICIDE(););
if (tc_log->unlog(cookie, xid))
{
@@ -1574,6 +1718,19 @@ done:
goto end;
/* Come here if error and we need to rollback. */
+#ifdef WITH_WSREP
+wsrep_err:
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ if (run_wsrep_hooks && wsrep_must_abort(thd))
+ {
+ WSREP_DEBUG("BF abort has happened after prepare & certify");
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ ha_rollback_trans(thd, TRUE);
+ }
+ else
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+
+#endif /* WITH_WSREP */
err:
error= 1; /* Transaction was rolled back */
/*
@@ -1583,9 +1740,13 @@ err:
*/
if (!(thd->rgi_slave && thd->rgi_slave->is_parallel_exec))
ha_rollback_trans(thd, all);
-
+ else
+ {
+ WSREP_DEBUG("rollback skipped %p %d",thd->rgi_slave,
+ thd->rgi_slave->is_parallel_exec);
+ }
end:
- if (rw_trans && mdl_request.ticket)
+ if (mdl_backup.ticket)
{
/*
We do not always immediately release transactional locks
@@ -1593,14 +1754,25 @@ end:
thus we release the commit blocker lock as soon as it's
not needed.
*/
- thd->mdl_context.release_lock(mdl_request.ticket);
+ thd->mdl_context.release_lock(mdl_backup.ticket);
}
+ thd->backup_commit_lock= 0;
+#ifdef WITH_WSREP
+ if (wsrep_is_active(thd) && is_real_trans && !error &&
+ (rw_ha_count == 0 || all) &&
+ wsrep_not_committed(thd))
+ {
+ wsrep_commit_empty(thd, all);
+ }
+#endif /* WITH_WSREP */
+
DBUG_RETURN(error);
}
/**
@note
- This function does not care about global read lock. A caller should.
+ This function does not care about global read lock or backup locks,
+ the caller should.
@param[in] all Is set in case of explicit commit
(COMMIT statement), or implicit commit
@@ -1649,6 +1821,7 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans)
DBUG_ENTER("commit_one_phase_2");
if (is_real_trans)
DEBUG_SYNC(thd, "commit_one_phase_2");
+
if (ha_info)
{
for (; ha_info; ha_info= ha_info_next)
@@ -1677,6 +1850,7 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans)
#endif
}
}
+
/* Free resources and perform other cleanup even for 'empty' transactions. */
if (is_real_trans)
{
@@ -1752,6 +1926,9 @@ int ha_rollback_trans(THD *thd, bool all)
DBUG_RETURN(1);
}
+#ifdef WITH_WSREP
+ (void) wsrep_before_rollback(thd, all);
+#endif /* WITH_WSREP */
if (ha_info)
{
/* Close all cursors that can not survive ROLLBACK */
@@ -1767,9 +1944,9 @@ int ha_rollback_trans(THD *thd, bool all)
my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err);
error=1;
#ifdef WITH_WSREP
- WSREP_WARN("handlerton rollback failed, thd %llu %lld conf %d SQL %s",
- thd->thread_id, thd->query_id, thd->wsrep_conflict_state,
- thd->query());
+ WSREP_WARN("handlerton rollback failed, thd %lld %lld conf %d SQL %s",
+ thd->thread_id, thd->query_id, thd->wsrep_trx().state(),
+ thd->query());
#endif /* WITH_WSREP */
}
status_var_increment(thd->status_var.ha_rollback_count);
@@ -1780,17 +1957,26 @@ int ha_rollback_trans(THD *thd, bool all)
trans->no_2pc=0;
}
- /*
- Thanks to possibility of MDL deadlock rollback request can come even if
- transaction hasn't been started in any transactional storage engine.
- */
- if (is_real_trans && thd->transaction_rollback_request &&
- thd->transaction.xid_state.xa_state != XA_NOTR)
- thd->transaction.xid_state.rm_error= thd->get_stmt_da()->sql_errno();
-
+#ifdef WITH_WSREP
+ if (thd->is_error())
+ {
+ WSREP_DEBUG("ha_rollback_trans(%lld, %s) rolled back: %s: %s; is_real %d",
+ thd->thread_id, all?"TRUE":"FALSE", wsrep_thd_query(thd),
+ thd->get_stmt_da()->message(), is_real_trans);
+ }
+ (void) wsrep_after_rollback(thd, all);
+#endif /* WITH_WSREP */
/* Always cleanup. Even if nht==0. There may be savepoints. */
if (is_real_trans)
{
+ /*
+ Thanks to possibility of MDL deadlock rollback request can come even if
+ transaction hasn't been started in any transactional storage engine.
+ */
+ if (thd->transaction_rollback_request &&
+ thd->transaction.xid_state.is_explicit_XA())
+ thd->transaction.xid_state.set_error(thd->get_stmt_da()->sql_errno());
+
thd->has_waiter= false;
thd->transaction.cleanup();
}
@@ -1925,22 +2111,16 @@ char *xid_to_str(char *buf, const XID &xid)
}
#endif
-#ifdef WITH_WSREP
static my_xid wsrep_order_and_check_continuity(XID *list, int len)
{
+#ifdef WITH_WSREP
wsrep_sort_xid_array(list, len);
- wsrep_uuid_t uuid;
- wsrep_seqno_t seqno;
- if (wsrep_get_SE_checkpoint(uuid, seqno))
- {
- WSREP_ERROR("Could not read wsrep SE checkpoint for recovery");
- return 0;
- }
- long long cur_seqno= seqno;
+ wsrep::gtid cur_position= wsrep_get_SE_checkpoint();
+ long long cur_seqno= cur_position.seqno().get();
for (int i= 0; i < len; ++i)
{
if (!wsrep_is_wsrep_xid(list + i) ||
- wsrep_xid_seqno(*(list + i)) != cur_seqno + 1)
+ wsrep_xid_seqno(list + i) != cur_seqno + 1)
{
WSREP_WARN("Discovered discontinuity in recovered wsrep "
"transaction XIDs. Truncating the recovery list to "
@@ -1951,9 +2131,10 @@ static my_xid wsrep_order_and_check_continuity(XID *list, int len)
}
WSREP_INFO("Last wsrep seqno to be recovered %lld", cur_seqno);
return (cur_seqno < 0 ? 0 : cur_seqno);
-}
+#else
+ return 0;
#endif /* WITH_WSREP */
-
+}
/**
recover() step of xa.
@@ -1991,33 +2172,43 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
{
sql_print_information("Found %d prepared transaction(s) in %s",
got, hton_name(hton)->str);
-#ifdef WITH_WSREP
/* If wsrep_on=ON, XIDs are first ordered and then the range of
recovered XIDs is checked for continuity. All the XIDs which
are in continuous range can be safely committed if binlog
is off since they have already ordered and certified in the
- cluster. */
- my_xid wsrep_limit= 0;
+ cluster.
+
+ The discontinuity of wsrep XIDs may happen because the GTID
+ is assigned for transaction in wsrep_before_prepare(), but the
+ commit order is entered in wsrep_before_commit(). This means that
+ transactions may run prepare step out of order and may
+ result in gap in wsrep XIDs. This can be the case for example
+ if we have T1 with seqno 1 and T2 with seqno 2 and the server
+ crashes after T2 finishes prepare step but before T1 starts
+ the prepare.
+ */
+ my_xid wsrep_limit __attribute__((unused))= 0;
+
+ /* Note that we could call this for binlog also that
+ will not have WSREP(thd) but global wsrep on might
+ be true.
+ */
if (WSREP_ON)
- {
wsrep_limit= wsrep_order_and_check_continuity(info->list, got);
- }
-#endif /* WITH_WSREP */
for (int i=0; i < got; i ++)
{
- my_xid x= IF_WSREP(WSREP_ON && wsrep_is_wsrep_xid(&info->list[i]) ?
- wsrep_xid_seqno(info->list[i]) :
+ my_xid x= IF_WSREP(wsrep_is_wsrep_xid(&info->list[i]) ?
+ wsrep_xid_seqno(&info->list[i]) :
info->list[i].get_my_xid(),
info->list[i].get_my_xid());
if (!x) // not "mine" - that is generated by external TM
{
-#ifndef DBUG_OFF
- char buf[XIDDATASIZE*4+6]; // see xid_to_str
- DBUG_PRINT("info",
- ("ignore xid %s", xid_to_str(buf, info->list[i])));
-#endif
- xid_cache_insert(info->list+i, XA_PREPARED);
+ DBUG_EXECUTE("info",{
+ char buf[XIDDATASIZE*4+6];
+ _db_doprnt_("ignore xid %s", xid_to_str(buf, info->list[i]));
+ });
+ xid_cache_insert(info->list + i);
info->found_foreign_xids++;
continue;
}
@@ -2037,33 +2228,25 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
my_hash_search(info->commit_list, (uchar *)&x, sizeof(x)) != 0 :
tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT))
{
-#ifndef DBUG_OFF
- int rc=
-#endif
- hton->commit_by_xid(hton, info->list+i);
-#ifndef DBUG_OFF
+ int rc= hton->commit_by_xid(hton, info->list+i);
if (rc == 0)
{
- char buf[XIDDATASIZE*4+6]; // see xid_to_str
- DBUG_PRINT("info",
- ("commit xid %s", xid_to_str(buf, info->list[i])));
+ DBUG_EXECUTE("info",{
+ char buf[XIDDATASIZE*4+6];
+ _db_doprnt_("commit xid %s", xid_to_str(buf, info->list[i]));
+ });
}
-#endif
}
else
{
-#ifndef DBUG_OFF
- int rc=
-#endif
- hton->rollback_by_xid(hton, info->list+i);
-#ifndef DBUG_OFF
+ int rc= hton->rollback_by_xid(hton, info->list+i);
if (rc == 0)
{
- char buf[XIDDATASIZE*4+6]; // see xid_to_str
- DBUG_PRINT("info",
- ("rollback xid %s", xid_to_str(buf, info->list[i])));
+ DBUG_EXECUTE("info",{
+ char buf[XIDDATASIZE*4+6];
+ _db_doprnt_("rollback xid %s", xid_to_str(buf, info->list[i]));
+ });
}
-#endif
}
}
if (got < info->len)
@@ -2130,186 +2313,6 @@ int ha_recover(HASH *commit_list)
DBUG_RETURN(0);
}
-/**
- return the XID as it appears in the SQL function's arguments.
- So this string can be passed to XA START, XA PREPARE etc...
-
- @note
- the 'buf' has to have space for at least SQL_XIDSIZE bytes.
-*/
-
-
-/*
- 'a'..'z' 'A'..'Z', '0'..'9'
- and '-' '_' ' ' symbols don't have to be
- converted.
-*/
-
-static const char xid_needs_conv[128]=
-{
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,
- 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,
- 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,
- 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
-};
-
-uint get_sql_xid(XID *xid, char *buf)
-{
- int tot_len= xid->gtrid_length + xid->bqual_length;
- int i;
- const char *orig_buf= buf;
-
- for (i=0; i<tot_len; i++)
- {
- uchar c= ((uchar *) xid->data)[i];
- if (c >= 128 || xid_needs_conv[c])
- break;
- }
-
- if (i >= tot_len)
- {
- /* No need to convert characters to hexadecimals. */
- *buf++= '\'';
- memcpy(buf, xid->data, xid->gtrid_length);
- buf+= xid->gtrid_length;
- *buf++= '\'';
- if (xid->bqual_length > 0 || xid->formatID != 1)
- {
- *buf++= ',';
- *buf++= '\'';
- memcpy(buf, xid->data+xid->gtrid_length, xid->bqual_length);
- buf+= xid->bqual_length;
- *buf++= '\'';
- }
- }
- else
- {
- *buf++= 'X';
- *buf++= '\'';
- for (i= 0; i < xid->gtrid_length; i++)
- {
- *buf++=_dig_vec_lower[((uchar*) xid->data)[i] >> 4];
- *buf++=_dig_vec_lower[((uchar*) xid->data)[i] & 0x0f];
- }
- *buf++= '\'';
- if (xid->bqual_length > 0 || xid->formatID != 1)
- {
- *buf++= ',';
- *buf++= 'X';
- *buf++= '\'';
- for (; i < tot_len; i++)
- {
- *buf++=_dig_vec_lower[((uchar*) xid->data)[i] >> 4];
- *buf++=_dig_vec_lower[((uchar*) xid->data)[i] & 0x0f];
- }
- *buf++= '\'';
- }
- }
-
- if (xid->formatID != 1)
- {
- *buf++= ',';
- buf+= my_longlong10_to_str_8bit(&my_charset_bin, buf,
- MY_INT64_NUM_DECIMAL_DIGITS, -10, xid->formatID);
- }
-
- return (uint)(buf - orig_buf);
-}
-
-
-/**
- return the list of XID's to a client, the same way SHOW commands do.
-
- @note
- I didn't find in XA specs that an RM cannot return the same XID twice,
- so mysql_xa_recover does not filter XID's to ensure uniqueness.
- It can be easily fixed later, if necessary.
-*/
-
-static my_bool xa_recover_callback(XID_STATE *xs, Protocol *protocol,
- char *data, uint data_len, CHARSET_INFO *data_cs)
-{
- if (xs->xa_state == XA_PREPARED)
- {
- protocol->prepare_for_resend();
- protocol->store_longlong((longlong) xs->xid.formatID, FALSE);
- protocol->store_longlong((longlong) xs->xid.gtrid_length, FALSE);
- protocol->store_longlong((longlong) xs->xid.bqual_length, FALSE);
- protocol->store(data, data_len, data_cs);
- if (protocol->write())
- return TRUE;
- }
- return FALSE;
-}
-
-
-static my_bool xa_recover_callback_short(XID_STATE *xs, Protocol *protocol)
-{
- return xa_recover_callback(xs, protocol, xs->xid.data,
- xs->xid.gtrid_length + xs->xid.bqual_length, &my_charset_bin);
-}
-
-
-static my_bool xa_recover_callback_verbose(XID_STATE *xs, Protocol *protocol)
-{
- char buf[SQL_XIDSIZE];
- uint len= get_sql_xid(&xs->xid, buf);
- return xa_recover_callback(xs, protocol, buf, len,
- &my_charset_utf8_general_ci);
-}
-
-
-bool mysql_xa_recover(THD *thd)
-{
- List<Item> field_list;
- Protocol *protocol= thd->protocol;
- MEM_ROOT *mem_root= thd->mem_root;
- my_hash_walk_action action;
- DBUG_ENTER("mysql_xa_recover");
-
- field_list.push_back(new (mem_root)
- Item_int(thd, "formatID", 0,
- MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
- field_list.push_back(new (mem_root)
- Item_int(thd, "gtrid_length", 0,
- MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
- field_list.push_back(new (mem_root)
- Item_int(thd, "bqual_length", 0,
- MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
- {
- uint len;
- CHARSET_INFO *cs;
-
- if (thd->lex->verbose)
- {
- len= SQL_XIDSIZE;
- cs= &my_charset_utf8_general_ci;
- action= (my_hash_walk_action) xa_recover_callback_verbose;
- }
- else
- {
- len= XIDDATASIZE;
- cs= &my_charset_bin;
- action= (my_hash_walk_action) xa_recover_callback_short;
- }
-
- field_list.push_back(new (mem_root)
- Item_empty_string(thd, "data", len, cs), mem_root);
- }
-
- if (protocol->send_result_set_metadata(&field_list,
- Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
- DBUG_RETURN(1);
-
- if (xid_cache_iterate(thd, action, protocol))
- DBUG_RETURN(1);
- my_eof(thd);
- DBUG_RETURN(0);
-}
/*
Called by engine to notify TC that a new commit checkpoint has been reached.
@@ -2395,11 +2398,26 @@ int ha_rollback_to_savepoint(THD *thd, SAVEPOINT *sv)
{
int err;
handlerton *ht= ha_info->ht();
+#ifdef WITH_WSREP
+ if (WSREP(thd) && ht->flags & HTON_WSREP_REPLICATION)
+ {
+ WSREP_DEBUG("ha_rollback_to_savepoint: run before_rollbackha_rollback_trans hook");
+ (void) wsrep_before_rollback(thd, !thd->in_sub_stmt);
+
+ }
+#endif // WITH_WSREP
if ((err= ht->rollback(ht, thd, !thd->in_sub_stmt)))
{ // cannot happen
my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err);
error=1;
}
+#ifdef WITH_WSREP
+ if (WSREP(thd) && ht->flags & HTON_WSREP_REPLICATION)
+ {
+ WSREP_DEBUG("ha_rollback_to_savepoint: run after_rollback hook");
+ (void) wsrep_after_rollback(thd, !thd->in_sub_stmt);
+ }
+#endif // WITH_WSREP
status_var_increment(thd->status_var.ha_rollback_count);
ha_info_next= ha_info->next();
ha_info->reset(); /* keep it conveniently zero-filled */
@@ -2416,6 +2434,16 @@ int ha_rollback_to_savepoint(THD *thd, SAVEPOINT *sv)
*/
int ha_savepoint(THD *thd, SAVEPOINT *sv)
{
+#ifdef WITH_WSREP
+ /*
+ Register binlog hton for savepoint processing if wsrep binlog
+ emulation is on.
+ */
+ if (WSREP_EMULATE_BINLOG(thd) && wsrep_thd_is_local(thd))
+ {
+ wsrep_register_binlog_handler(thd, thd->in_multi_stmt_transaction_mode());
+ }
+#endif /* WITH_WSREP */
int error=0;
THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt :
&thd->transaction.all);
@@ -2642,7 +2670,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
dummy_share.table_name= *alias;
dummy_table.alias.set(alias->str, alias->length, table_alias_charset);
file->change_table_ptr(&dummy_table, &dummy_share);
- file->print_error(error, MYF(intercept ? ME_JUST_WARNING : 0));
+ file->print_error(error, MYF(intercept ? ME_WARNING : 0));
}
if (intercept)
error= 0;
@@ -2700,23 +2728,28 @@ LEX_CSTRING *handler::engine_name()
}
+/*
+ It is assumed that the value of the parameter 'ranges' can be only 0 or 1.
+ If ranges == 1 then the function returns the cost of index only scan
+ by index 'keyno' of one range containing 'rows' key entries.
+ If ranges == 0 then the function returns only the cost of copying
+ those key entries into the engine buffers.
+*/
+
double handler::keyread_time(uint index, uint ranges, ha_rows rows)
{
- /*
- It is assumed that we will read trough the whole key range and that all
- key blocks are half full (normally things are much better). It is also
- assumed that each time we read the next key from the index, the handler
- performs a random seek, thus the cost is proportional to the number of
- blocks read. This model does not take into account clustered indexes -
- engines that support that (e.g. InnoDB) may want to overwrite this method.
- The model counts in the time to read index entries from cache.
- */
+ DBUG_ASSERT(ranges == 0 || ranges == 1);
size_t len= table->key_info[index].key_length + ref_length;
if (index == table->s->primary_key && table->file->primary_key_is_clustered())
len= table->s->stored_rec_length;
- double keys_per_block= (stats.block_size/2.0/len+1);
- return (rows + keys_per_block-1)/ keys_per_block +
- len*rows/(stats.block_size+1)/TIME_FOR_COMPARE ;
+ double cost= (double)rows*len/(stats.block_size+1)*IDX_BLOCK_COPY_COST;
+ if (ranges)
+ {
+ uint keys_per_block= (uint) (stats.block_size/2.0/len+1);
+ ulonglong blocks= !rows ? 0 : (rows-1) / keys_per_block + 1;
+ cost+= blocks;
+ }
+ return cost;
}
THD *handler::ha_thd(void) const
@@ -3698,6 +3731,8 @@ void print_keydup_error(TABLE *table, KEY *key, const char *msg, myf errflag)
}
else
{
+ if (key->algorithm == HA_KEY_ALG_LONG_HASH)
+ setup_keyinfo_hash(key);
/* Table is opened and defined at this point */
key_unpack(&str,table, key);
uint max_length=MYSQL_ERRMSG_SIZE-(uint) strlen(msg);
@@ -3708,6 +3743,8 @@ void print_keydup_error(TABLE *table, KEY *key, const char *msg, myf errflag)
}
my_printf_error(ER_DUP_ENTRY, msg, errflag, str.c_ptr_safe(),
key->name.str);
+ if (key->algorithm == HA_KEY_ALG_LONG_HASH)
+ re_setup_keyinfo_hash(key);
}
}
@@ -3725,7 +3762,6 @@ void print_keydup_error(TABLE *table, KEY *key, myf errflag)
errflag);
}
-
/**
Print error that we got from handler function.
@@ -3747,7 +3783,7 @@ void handler::print_error(int error, myf errflag)
if (ha_thd()->transaction_rollback_request)
{
/* Ensure this becomes a true error */
- errflag&= ~(ME_JUST_WARNING | ME_JUST_INFO);
+ errflag&= ~(ME_WARNING | ME_NOTE);
}
int textno= -1; // impossible value
@@ -3798,6 +3834,7 @@ void handler::print_error(int error, myf errflag)
if ((int) key_nr >= 0 && key_nr < table->s->keys)
{
print_keydup_error(table, &table->key_info[key_nr], errflag);
+ table->file->errkey= -1;
DBUG_VOID_RETURN;
}
}
@@ -3882,14 +3919,14 @@ void handler::print_error(int error, myf errflag)
{
textno=ER_RECORD_FILE_FULL;
/* Write the error message to error log */
- errflag|= ME_NOREFRESH;
+ errflag|= ME_ERROR_LOG;
break;
}
case HA_ERR_INDEX_FILE_FULL:
{
textno=ER_INDEX_FILE_FULL;
/* Write the error message to error log */
- errflag|= ME_NOREFRESH;
+ errflag|= ME_ERROR_LOG;
break;
}
case HA_ERR_LOCK_WAIT_TIMEOUT:
@@ -4019,14 +4056,14 @@ void handler::print_error(int error, myf errflag)
if (unlikely(fatal_error))
{
/* Ensure this becomes a true error */
- errflag&= ~(ME_JUST_WARNING | ME_JUST_INFO);
+ errflag&= ~(ME_WARNING | ME_NOTE);
if ((debug_assert_if_crashed_table ||
global_system_variables.log_warnings > 1))
{
/*
Log error to log before we crash or if extended warnings are requested
*/
- errflag|= ME_NOREFRESH;
+ errflag|= ME_ERROR_LOG;
}
}
@@ -4198,7 +4235,8 @@ static bool update_frm_version(TABLE *table)
int4store(version, MYSQL_VERSION_ID);
- if ((result= (int)mysql_file_pwrite(file, (uchar*) version, 4, 51L, MYF_RW)))
+ if ((result= (int)mysql_file_pwrite(file, (uchar*) version, 4, 51L,
+ MYF(MY_WME+MY_NABP))))
goto err;
table->s->mysql_version= MYSQL_VERSION_ID;
@@ -4217,9 +4255,10 @@ err:
*/
uint handler::get_dup_key(int error)
{
- DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
- m_lock_type != F_UNLCK);
+ DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK);
DBUG_ENTER("handler::get_dup_key");
+ if (table->s->long_unique_table && table->file->errkey < table->s->keys)
+ DBUG_RETURN(table->file->errkey);
table->file->errkey = (uint) -1;
if (error == HA_ERR_FOUND_DUPP_KEY ||
error == HA_ERR_FOREIGN_DUPLICATE_KEY ||
@@ -4331,17 +4370,32 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
m_lock_type != F_UNLCK);
- if ((table->s->mysql_version >= MYSQL_VERSION_ID) &&
+ const ulong v= table->s->mysql_version;
+
+ if ((v >= MYSQL_VERSION_ID) &&
(check_opt->sql_flags & TT_FOR_UPGRADE))
return 0;
- if (table->s->mysql_version < MYSQL_VERSION_ID)
+ if (v < MYSQL_VERSION_ID)
{
if (unlikely((error= check_old_types())))
return error;
error= ha_check_for_upgrade(check_opt);
if (unlikely(error && (error != HA_ADMIN_NEEDS_CHECK)))
return error;
+ if (table->s->table_category == TABLE_CATEGORY_USER &&
+ (v < 100142 ||
+ (v >= 100200 && v < 100228) ||
+ (v >= 100300 && v < 100319) ||
+ (v >= 100400 && v < 100409)))
+ {
+ for (const KEY *key= table->key_info,
+ *end= table->key_info + table->s->keys; key < end; key++)
+ {
+ if (key->flags & HA_BINARY_PACK_KEY && key->flags & HA_VAR_LENGTH_KEY)
+ return HA_ADMIN_NEEDS_UPGRADE;
+ }
+ }
if (unlikely(!error && (check_opt->sql_flags & TT_FOR_UPGRADE)))
return 0;
}
@@ -4636,7 +4690,7 @@ handler::check_if_supported_inplace_alter(TABLE *altered_table,
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
alter_table_operations inplace_offline_operations=
- ALTER_COLUMN_EQUAL_PACK_LENGTH |
+ ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE |
ALTER_COLUMN_NAME |
ALTER_RENAME_COLUMN |
ALTER_CHANGE_COLUMN_DEFAULT |
@@ -4672,7 +4726,7 @@ handler::check_if_supported_inplace_alter(TABLE *altered_table,
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
uint table_changes= (ha_alter_info->handler_flags &
- ALTER_COLUMN_EQUAL_PACK_LENGTH) ?
+ ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE) ?
IS_EQUAL_PACK_LENGTH : IS_EQUAL_YES;
if (table->file->check_if_incompatible_data(create_info, table_changes)
== COMPATIBLE_DATA_YES)
@@ -4681,6 +4735,30 @@ handler::check_if_supported_inplace_alter(TABLE *altered_table,
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
}
+Alter_inplace_info::Alter_inplace_info(HA_CREATE_INFO *create_info_arg,
+ Alter_info *alter_info_arg,
+ KEY *key_info_arg, uint key_count_arg,
+ partition_info *modified_part_info_arg,
+ bool ignore_arg, bool error_non_empty)
+ : create_info(create_info_arg),
+ alter_info(alter_info_arg),
+ key_info_buffer(key_info_arg),
+ key_count(key_count_arg),
+ index_drop_count(0),
+ index_drop_buffer(nullptr),
+ index_add_count(0),
+ index_add_buffer(nullptr),
+ rename_keys(current_thd->mem_root),
+ handler_ctx(nullptr),
+ group_commit_ctx(nullptr),
+ handler_flags(0),
+ modified_part_info(modified_part_info_arg),
+ ignore(ignore_arg),
+ online(false),
+ unsupported_reason(nullptr),
+ error_if_not_empty(error_non_empty)
+ {}
+
void Alter_inplace_info::report_unsupported_error(const char *not_supported,
const char *try_instead) const
{
@@ -4945,6 +5023,7 @@ void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info,
stat_info->update_time= stats.update_time;
stat_info->check_time= stats.check_time;
stat_info->check_sum= stats.checksum;
+ stat_info->check_sum_null= stats.checksum_null;
}
@@ -5087,7 +5166,7 @@ int handler::calculate_checksum()
uchar null_mask= table->s->last_null_bit_pos
? 256 - (1 << table->s->last_null_bit_pos) : 0;
- table->use_all_columns();
+ table->use_all_stored_columns();
stats.checksum= 0;
if ((error= ha_rnd_init(1)))
@@ -5099,7 +5178,7 @@ int handler::calculate_checksum()
return HA_ERR_ABORTED_BY_USER;
ha_checksum row_crc= 0;
- error= table->file->ha_rnd_next(table->record[0]);
+ error= ha_rnd_next(table->record[0]);
if (error)
break;
@@ -5156,7 +5235,7 @@ int handler::calculate_checksum()
stats.checksum+= row_crc;
}
- table->file->ha_rnd_end();
+ ha_rnd_end();
return error == HA_ERR_END_OF_FILE ? 0 : error;
}
@@ -5226,7 +5305,7 @@ int ha_create_table(THD *thd, const char *path,
{
if (!thd->is_error())
my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, error);
- table.file->print_error(error, MYF(ME_JUST_WARNING));
+ table.file->print_error(error, MYF(ME_WARNING));
PSI_CALL_drop_table_share(temp_table, share.db.str, (uint)share.db.length,
share.table_name.str, (uint)share.table_name.length);
}
@@ -5420,7 +5499,9 @@ int ha_discover_table(THD *thd, TABLE_SHARE *share)
else
found= plugin_foreach(thd, discover_handlerton,
MYSQL_STORAGE_ENGINE_PLUGIN, share);
-
+
+ if (thd->lex->query_tables && thd->lex->query_tables->sequence && !found)
+ my_error(ER_UNKNOWN_SEQUENCES, MYF(0),share->table_name.str);
if (!found)
open_table_error(share, OPEN_FRM_OPEN_ERROR, ENOENT); // not found
@@ -5987,27 +6068,75 @@ int handler::compare_key2(key_range *range) const
/**
ICP callback - to be called by an engine to check the pushed condition
*/
-extern "C" enum icp_result handler_index_cond_check(void* h_arg)
+extern "C" check_result_t handler_index_cond_check(void* h_arg)
{
handler *h= (handler*)h_arg;
THD *thd= h->table->in_use;
- enum icp_result res;
+ check_result_t res;
DEBUG_SYNC(thd, "handler_index_cond_check");
enum thd_kill_levels abort_at= h->has_transactions() ?
THD_ABORT_SOFTLY : THD_ABORT_ASAP;
if (thd_kill_level(thd) > abort_at)
- return ICP_ABORTED_BY_USER;
+ return CHECK_ABORTED_BY_USER;
if (h->end_range && h->compare_key2(h->end_range) > 0)
- return ICP_OUT_OF_RANGE;
+ return CHECK_OUT_OF_RANGE;
h->increment_statistics(&SSV::ha_icp_attempts);
- if ((res= h->pushed_idx_cond->val_int()? ICP_MATCH : ICP_NO_MATCH) ==
- ICP_MATCH)
+ if ((res= h->pushed_idx_cond->val_int()? CHECK_POS : CHECK_NEG) ==
+ CHECK_POS)
h->increment_statistics(&SSV::ha_icp_match);
return res;
}
+
+/**
+ Rowid filter callback - to be called by an engine to check rowid / primary
+ keys of the rows whose data is to be fetched against the used rowid filter
+*/
+
+extern "C"
+check_result_t handler_rowid_filter_check(void *h_arg)
+{
+ handler *h= (handler*) h_arg;
+ TABLE *tab= h->get_table();
+
+ /*
+ Check for out-of-range and killed conditions only if we haven't done it
+ already in the pushed index condition check
+ */
+ if (!h->pushed_idx_cond)
+ {
+ THD *thd= h->table->in_use;
+ DEBUG_SYNC(thd, "handler_rowid_filter_check");
+ enum thd_kill_levels abort_at= h->has_transactions() ?
+ THD_ABORT_SOFTLY : THD_ABORT_ASAP;
+ if (thd_kill_level(thd) > abort_at)
+ return CHECK_ABORTED_BY_USER;
+
+ if (h->end_range && h->compare_key2(h->end_range) > 0)
+ return CHECK_OUT_OF_RANGE;
+ }
+
+ h->position(tab->record[0]);
+ return h->pushed_rowid_filter->check((char*)h->ref)? CHECK_POS: CHECK_NEG;
+}
+
+
+/**
+ Callback function for an engine to check whether the used rowid filter
+ has been already built
+*/
+
+extern "C" int handler_rowid_filter_is_active(void *h_arg)
+{
+ if (!h_arg)
+ return false;
+ handler *h= (handler*) h_arg;
+ return h->rowid_filter_is_active;
+}
+
+
int handler::index_read_idx_map(uchar * buf, uint index, const uchar * key,
key_part_map keypart_map,
enum ha_rkey_function find_flag)
@@ -6188,6 +6317,12 @@ bool handler::check_table_binlog_row_based(bool binlog_row)
return false;
if (unlikely((table->in_use->variables.sql_log_bin_off)))
return 0; /* Called by partitioning engine */
+#ifdef WITH_WSREP
+ if (!table->in_use->variables.sql_log_bin &&
+ wsrep_thd_is_applying(table->in_use))
+ return 0; /* wsrep patch sets sql_log_bin to silence binlogging
+ from high priority threads */
+#endif /* WITH_WSREP */
if (unlikely((!check_table_binlog_row_based_done)))
{
check_table_binlog_row_based_done= 1;
@@ -6218,12 +6353,12 @@ bool handler::check_table_binlog_row_based_internal(bool binlog_row)
Otherwise, return 'true' if binary logging is on.
*/
IF_WSREP(((WSREP_EMULATE_BINLOG(thd) &&
- (thd->wsrep_exec_mode != REPL_RECV)) ||
+ wsrep_thd_is_local(thd)) ||
((WSREP(thd) ||
(thd->variables.option_bits & OPTION_BIN_LOG)) &&
mysql_bin_log.is_open())),
- (thd->variables.option_bits & OPTION_BIN_LOG) &&
- mysql_bin_log.is_open()));
+ (thd->variables.option_bits & OPTION_BIN_LOG) &&
+ mysql_bin_log.is_open()));
}
@@ -6260,7 +6395,9 @@ static int write_locked_table_maps(THD *thd)
MYSQL_LOCK *locks[2];
locks[0]= thd->extra_lock;
locks[1]= thd->lock;
- my_bool with_annotate= thd->variables.binlog_annotate_row_events &&
+ my_bool with_annotate= IF_WSREP(!wsrep_fragments_certified_for_stmt(thd),
+ true) &&
+ thd->variables.binlog_annotate_row_events &&
thd->query() && thd->query_length();
for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
@@ -6350,23 +6487,9 @@ int binlog_log_row(TABLE* table, const uchar *before_record,
/* only InnoDB tables will be replicated through binlog emulation */
if ((WSREP_EMULATE_BINLOG(thd) &&
- table->file->partition_ht()->db_type != DB_TYPE_INNODB) ||
- (thd->wsrep_ignore_table == true))
+ !(table->file->partition_ht()->flags & HTON_WSREP_REPLICATION)) ||
+ thd->wsrep_ignore_table == true)
return 0;
-
- /* enforce wsrep_max_ws_rows */
- if (WSREP(thd) && table->s->tmp_table == NO_TMP_TABLE)
- {
- thd->wsrep_affected_rows++;
- if (wsrep_max_ws_rows &&
- thd->wsrep_exec_mode != REPL_RECV &&
- thd->wsrep_affected_rows > wsrep_max_ws_rows)
- {
- trans_rollback_stmt(thd) || trans_rollback(thd);
- my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0));
- return ER_ERROR_DURING_COMMIT;
- }
- }
#endif
if (!table->file->check_table_binlog_row_based(1))
@@ -6474,12 +6597,194 @@ int handler::ha_reset()
/* Reset information about pushed engine conditions */
cancel_pushed_idx_cond();
/* Reset information about pushed index conditions */
+ cancel_pushed_rowid_filter();
clear_top_table_fields();
DBUG_RETURN(reset());
}
+#ifdef WITH_WSREP
+static int wsrep_after_row(THD *thd)
+{
+ DBUG_ENTER("wsrep_after_row");
+ /* enforce wsrep_max_ws_rows */
+ thd->wsrep_affected_rows++;
+ if (wsrep_max_ws_rows &&
+ wsrep_thd_is_local(thd) &&
+ thd->wsrep_affected_rows > wsrep_max_ws_rows)
+ {
+ trans_rollback_stmt(thd) || trans_rollback(thd);
+ my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0));
+ DBUG_RETURN(ER_ERROR_DURING_COMMIT);
+ }
+ else if (wsrep_after_row_internal(thd))
+ {
+ DBUG_RETURN(ER_LOCK_DEADLOCK);
+ }
+ DBUG_RETURN(0);
+}
+#endif /* WITH_WSREP */
-int handler::ha_write_row(uchar *buf)
+static int check_duplicate_long_entry_key(TABLE *table, handler *h,
+ const uchar *new_rec, uint key_no)
+{
+ Field *hash_field;
+ int result, error= 0;
+ KEY *key_info= table->key_info + key_no;
+ hash_field= key_info->key_part->field;
+ uchar ptr[HA_HASH_KEY_LENGTH_WITH_NULL];
+
+ DBUG_ASSERT((key_info->flags & HA_NULL_PART_KEY &&
+ key_info->key_length == HA_HASH_KEY_LENGTH_WITH_NULL)
+ || key_info->key_length == HA_HASH_KEY_LENGTH_WITHOUT_NULL);
+
+ if (hash_field->is_real_null())
+ return 0;
+
+ key_copy(ptr, new_rec, key_info, key_info->key_length, false);
+
+ if (!table->check_unique_buf)
+ table->check_unique_buf= (uchar *)alloc_root(&table->mem_root,
+ table->s->reclength);
+
+ result= h->ha_index_init(key_no, 0);
+ if (result)
+ return result;
+ store_record(table, check_unique_buf);
+ result= h->ha_index_read_map(table->record[0],
+ ptr, HA_WHOLE_KEY, HA_READ_KEY_EXACT);
+ if (!result)
+ {
+ bool is_same;
+ Field * t_field;
+ Item_func_hash * temp= (Item_func_hash *)hash_field->vcol_info->expr;
+ Item ** arguments= temp->arguments();
+ uint arg_count= temp->argument_count();
+ do
+ {
+ my_ptrdiff_t diff= table->check_unique_buf - new_rec;
+ is_same= true;
+ for (uint j=0; is_same && j < arg_count; j++)
+ {
+ DBUG_ASSERT(arguments[j]->type() == Item::FIELD_ITEM ||
+ // this one for left(fld_name,length)
+ arguments[j]->type() == Item::FUNC_ITEM);
+ if (arguments[j]->type() == Item::FIELD_ITEM)
+ {
+ t_field= static_cast<Item_field *>(arguments[j])->field;
+ if (t_field->cmp_offset(diff))
+ is_same= false;
+ }
+ else
+ {
+ Item_func_left *fnc= static_cast<Item_func_left *>(arguments[j]);
+ DBUG_ASSERT(!my_strcasecmp(system_charset_info, "left", fnc->func_name()));
+ DBUG_ASSERT(fnc->arguments()[0]->type() == Item::FIELD_ITEM);
+ t_field= static_cast<Item_field *>(fnc->arguments()[0])->field;
+ uint length= (uint)fnc->arguments()[1]->val_int();
+ if (t_field->cmp_prefix(t_field->ptr, t_field->ptr + diff, length))
+ is_same= false;
+ }
+ }
+ }
+ while (!is_same && !(result= h->ha_index_next_same(table->record[0],
+ ptr, key_info->key_length)));
+ if (is_same)
+ error= HA_ERR_FOUND_DUPP_KEY;
+ goto exit;
+ }
+ if (result != HA_ERR_KEY_NOT_FOUND)
+ error= result;
+exit:
+ if (error == HA_ERR_FOUND_DUPP_KEY)
+ {
+ table->file->errkey= key_no;
+ if (h->ha_table_flags() & HA_DUPLICATE_POS)
+ {
+ h->position(table->record[0]);
+ memcpy(table->file->dup_ref, h->ref, h->ref_length);
+ }
+ }
+ restore_record(table, check_unique_buf);
+ h->ha_index_end();
+ return error;
+}
+
+/** @brief
+ check whether inserted records breaks the
+ unique constraint on long columns.
+ @returns 0 if no duplicate else returns error
+ */
+static int check_duplicate_long_entries(TABLE *table, handler *h,
+ const uchar *new_rec)
+{
+ table->file->errkey= -1;
+ int result;
+ for (uint i= 0; i < table->s->keys; i++)
+ {
+ if (table->key_info[i].algorithm == HA_KEY_ALG_LONG_HASH &&
+ (result= check_duplicate_long_entry_key(table, h, new_rec, i)))
+ return result;
+ }
+ return 0;
+}
+
+/** @brief
+ check whether updated records breaks the
+ unique constraint on long columns.
+ In the case of update we just need to check the specic key
+ reason for that is consider case
+ create table t1(a blob , b blob , x blob , y blob ,unique(a,b)
+ ,unique(x,y))
+ and update statement like this
+ update t1 set a=23+a; in this case if we try to scan for
+ whole keys in table then index scan on x_y will return 0
+ because data is same so in the case of update we take
+ key as a parameter in normal insert key should be -1
+ @returns 0 if no duplicate else returns error
+ */
+static int check_duplicate_long_entries_update(TABLE *table, handler *h, uchar *new_rec)
+{
+ Field *field;
+ uint key_parts;
+ int error= 0;
+ KEY *keyinfo;
+ KEY_PART_INFO *keypart;
+ /*
+ Here we are comparing whether new record and old record are same
+ with respect to fields in hash_str
+ */
+ uint reclength= (uint) (table->record[1] - table->record[0]);
+ table->clone_handler_for_update();
+ for (uint i= 0; i < table->s->keys; i++)
+ {
+ keyinfo= table->key_info + i;
+ if (keyinfo->algorithm == HA_KEY_ALG_LONG_HASH)
+ {
+ key_parts= fields_in_hash_keyinfo(keyinfo);
+ keypart= keyinfo->key_part - key_parts;
+ for (uint j= 0; j < key_parts; j++, keypart++)
+ {
+ field= keypart->field;
+ /* Compare fields if they are different then check for duplicates*/
+ if(field->cmp_binary_offset(reclength))
+ {
+ if((error= check_duplicate_long_entry_key(table, table->update_handler,
+ new_rec, i)))
+ goto exit;
+ /*
+ break because check_duplicate_long_entries_key will
+ take care of remaining fields
+ */
+ break;
+ }
+ }
+ }
+ }
+ exit:
+ return error;
+}
+
+int handler::ha_write_row(const uchar *buf)
{
int error;
Log_func *log_func= Write_rows_log_event::binlog_row_logging_function;
@@ -6492,6 +6797,25 @@ int handler::ha_write_row(uchar *buf)
mark_trx_read_write();
increment_statistics(&SSV::ha_write_count);
+ /*
+ NOTE: this != table->file is true in 3 cases:
+
+ 1. under copy_partitions() (REORGANIZE PARTITION): that does not
+ require long unique check as it does not introduce new rows or new index.
+ 2. under partition's ha_write_row() (INSERT): check_duplicate_long_entries()
+ was already done by ha_partition::ha_write_row(), no need to check it
+ again for each single partition.
+ 3. under ha_mroonga::wrapper_write_row()
+ */
+
+ if (table->s->long_unique_table && this == table->file)
+ {
+ if (this->inited == RND)
+ table->clone_handler_for_update();
+ handler *h= table->update_handler ? table->update_handler : table->file;
+ if ((error= check_duplicate_long_entries(table, h, buf)))
+ DBUG_RETURN(error);
+ }
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_WRITE_ROW, MAX_KEY, 0,
{ error= write_row(buf); })
@@ -6500,7 +6824,16 @@ int handler::ha_write_row(uchar *buf)
{
rows_changed++;
error= binlog_log_row(table, 0, buf, log_func);
+#ifdef WITH_WSREP
+ if (table_share->tmp_table == NO_TMP_TABLE &&
+ WSREP(ha_thd()) && ht->flags & HTON_WSREP_REPLICATION &&
+ !error && (error= wsrep_after_row(ha_thd())))
+ {
+ DBUG_RETURN(error);
+ }
+#endif /* WITH_WSREP */
}
+
DEBUG_SYNC_C("ha_write_row_end");
DBUG_RETURN(error);
}
@@ -6524,6 +6857,20 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data)
mark_trx_read_write();
increment_statistics(&SSV::ha_update_count);
+ /*
+ NOTE: this != table->file is true under partition's ha_update_row():
+ check_duplicate_long_entries_update() was already done by
+ ha_partition::ha_update_row(), no need to check it again for each single
+ partition. Same applies to ha_mroonga wrapper.
+ */
+
+ if (table->s->long_unique_table && this == table->file &&
+ (error= check_duplicate_long_entries_update(table, table->file,
+ (uchar *)new_data)))
+ {
+ return error;
+ }
+
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_UPDATE_ROW, active_index, 0,
{ error= update_row(old_data, new_data);})
@@ -6532,6 +6879,27 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data)
{
rows_changed++;
error= binlog_log_row(table, old_data, new_data, log_func);
+#ifdef WITH_WSREP
+ THD *thd= ha_thd();
+ bool is_wsrep= WSREP(thd);
+ /* for SR, the followin wsrep_after_row() may replicate a fragment, so we have to
+ declare potential PA unsafe before that*/
+ if (table->s->primary_key == MAX_KEY &&
+ is_wsrep && wsrep_thd_is_local(thd))
+ {
+ WSREP_DEBUG("marking trx as PA unsafe pk %d", table->s->primary_key);
+ if (thd->wsrep_cs().mark_transaction_pa_unsafe())
+ {
+ WSREP_DEBUG("session does not have active transaction, can not mark as PA unsafe");
+ }
+ }
+ if (table_share->tmp_table == NO_TMP_TABLE &&
+ is_wsrep && ht->flags & HTON_WSREP_REPLICATION &&
+ !error && (error= wsrep_after_row(thd)))
+ {
+ return error;
+ }
+#endif /* WITH_WSREP */
}
return error;
}
@@ -6540,7 +6908,7 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data)
Update first row. Only used by sequence tables
*/
-int handler::update_first_row(uchar *new_data)
+int handler::update_first_row(const uchar *new_data)
{
int error;
if (likely(!(error= ha_rnd_init(1))))
@@ -6587,6 +6955,27 @@ int handler::ha_delete_row(const uchar *buf)
{
rows_changed++;
error= binlog_log_row(table, buf, 0, log_func);
+#ifdef WITH_WSREP
+ THD *thd= ha_thd();
+ bool is_wsrep= WSREP(thd);
+ /* for SR, the followin wsrep_after_row() may replicate a fragment, so we have to
+ declare potential PA unsafe before that*/
+ if (table->s->primary_key == MAX_KEY &&
+ is_wsrep && wsrep_thd_is_local(thd))
+ {
+ WSREP_DEBUG("marking trx as PA unsafe pk %d", table->s->primary_key);
+ if (thd->wsrep_cs().mark_transaction_pa_unsafe())
+ {
+ WSREP_DEBUG("session does not have active transaction, can not mark as PA unsafe");
+ }
+ }
+ if (table_share->tmp_table == NO_TMP_TABLE &&
+ is_wsrep && ht->flags & HTON_WSREP_REPLICATION &&
+ !error && (error= wsrep_after_row(thd)))
+ {
+ return error;
+ }
+#endif /* WITH_WSREP */
}
return error;
}
@@ -6606,14 +6995,14 @@ int handler::ha_delete_row(const uchar *buf)
@retval != 0 Failure.
*/
-int handler::ha_direct_update_rows(ha_rows *update_rows)
+int handler::ha_direct_update_rows(ha_rows *update_rows, ha_rows *found_rows)
{
int error;
MYSQL_UPDATE_ROW_START(table_share->db.str, table_share->table_name.str);
mark_trx_read_write();
- error = direct_update_rows(update_rows);
+ error = direct_update_rows(update_rows, found_rows);
MYSQL_UPDATE_ROW_DONE(error);
return error;
}
@@ -6735,6 +7124,20 @@ void handler::set_lock_type(enum thr_lock_type lock)
table->reginfo.lock_type= lock;
}
+Compare_keys handler::compare_key_parts(const Field &old_field,
+ const Column_definition &new_field,
+ const KEY_PART_INFO &old_part,
+ const KEY_PART_INFO &new_part) const
+{
+ if (!old_field.is_equal(new_field))
+ return Compare_keys::NotEqual;
+
+ if (old_part.length != new_part.length)
+ return Compare_keys::NotEqual;
+
+ return Compare_keys::Equal;
+}
+
#ifdef WITH_WSREP
/**
@details
@@ -6765,7 +7168,7 @@ int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
DBUG_ENTER("ha_abort_transaction");
if (!WSREP(bf_thd) &&
!(bf_thd->variables.wsrep_OSU_method == WSREP_OSU_RSU &&
- bf_thd->wsrep_exec_mode == TOTAL_ORDER)) {
+ wsrep_thd_is_toi(bf_thd))) {
DBUG_RETURN(0);
}
@@ -6781,54 +7184,6 @@ int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
DBUG_RETURN(0);
}
-
-void ha_fake_trx_id(THD *thd)
-{
- DBUG_ENTER("ha_fake_trx_id");
-
- bool no_fake_trx_id= true;
-
- if (!WSREP(thd))
- {
- DBUG_VOID_RETURN;
- }
-
- if (thd->wsrep_ws_handle.trx_id != WSREP_UNDEFINED_TRX_ID)
- {
- WSREP_DEBUG("fake trx id skipped: %" PRIu64, thd->wsrep_ws_handle.trx_id);
- DBUG_VOID_RETURN;
- }
-
- /* Try statement transaction if standard one is not set. */
- THD_TRANS *trans= (thd->transaction.all.ha_list) ? &thd->transaction.all :
- &thd->transaction.stmt;
-
- Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
-
- for (; ha_info; ha_info= ha_info_next)
- {
- handlerton *hton= ha_info->ht();
- if (hton->fake_trx_id)
- {
- hton->fake_trx_id(hton, thd);
-
- /* Got a fake trx id. */
- no_fake_trx_id= false;
-
- /*
- We need transaction ID from just one storage engine providing
- fake_trx_id (which will most likely be the case).
- */
- break;
- }
- ha_info_next= ha_info->next();
- }
-
- if (unlikely(no_fake_trx_id))
- WSREP_WARN("Cannot get fake transaction ID from storage engine.");
-
- DBUG_VOID_RETURN;
-}
#endif /* WITH_WSREP */
@@ -6945,6 +7300,10 @@ int del_global_index_stat(THD *thd, TABLE* table, KEY* key_info)
DBUG_RETURN(res);
}
+/*****************************************************************************
+ VERSIONING functions
+******************************************************************************/
+
bool Vers_parse_info::is_start(const char *name) const
{
DBUG_ASSERT(name);
@@ -7018,8 +7377,8 @@ bool Vers_parse_info::fix_implicit(THD *thd, Alter_info *alter_info)
alter_info->flags|= ALTER_PARSER_ADD_COLUMN;
- system_time= start_end_t(default_start, default_end);
- as_row= system_time;
+ period= start_end_t(default_start, default_end);
+ as_row= period;
if (vers_create_sys_field(thd, default_start, alter_info, VERS_ROW_START) ||
vers_create_sys_field(thd, default_end, alter_info, VERS_ROW_END))
@@ -7140,7 +7499,7 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
if (DBUG_EVALUATE_IF("sysvers_force", 0, share->tmp_table))
{
- my_error(ER_VERS_TEMPORARY, MYF(0));
+ my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
return true;
}
@@ -7215,7 +7574,7 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
DBUG_ASSERT(end.str);
as_row= start_end_t(start, end);
- system_time= as_row;
+ period= as_row;
if (alter_info->create_list.elements)
{
@@ -7310,7 +7669,7 @@ Vers_parse_info::fix_create_like(Alter_info &alter_info, HA_CREATE_INFO &create_
}
as_row= start_end_t(f_start->field_name, f_end->field_name);
- system_time= as_row;
+ period= as_row;
create_info.options|= HA_VERSIONED_TABLE;
return false;
@@ -7335,14 +7694,14 @@ bool Vers_parse_info::check_conditions(const Lex_table_name &table_name,
return true;
}
- if (!system_time.start || !system_time.end)
+ if (!period.start || !period.end)
{
my_error(ER_MISSING, MYF(0), table_name.str, "PERIOD FOR SYSTEM_TIME");
return true;
}
- if (!as_row.start.streq(system_time.start) ||
- !as_row.end.streq(system_time.end))
+ if (!as_row.start.streq(period.start) ||
+ !as_row.end.streq(period.end))
{
my_error(ER_VERS_PERIOD_COLUMNS, MYF(0), as_row.start.str, as_row.end.str);
return true;
@@ -7430,3 +7789,109 @@ bool Vers_parse_info::check_sys_fields(const Lex_table_name &table_name,
return false;
}
+
+bool Table_period_info::check_field(const Create_field* f,
+ const Lex_ident& f_name) const
+{
+ bool res= false;
+ if (!f)
+ {
+ my_error(ER_BAD_FIELD_ERROR, MYF(0), f_name.str, name.str);
+ res= true;
+ }
+ else if (f->type_handler()->mysql_timestamp_type() != MYSQL_TIMESTAMP_DATE &&
+ f->type_handler()->mysql_timestamp_type() != MYSQL_TIMESTAMP_DATETIME)
+ {
+ my_error(ER_WRONG_FIELD_SPEC, MYF(0), f->field_name.str);
+ res= true;
+ }
+ else if (f->vcol_info || f->flags & VERS_SYSTEM_FIELD)
+ {
+ my_error(ER_PERIOD_FIELD_WRONG_ATTRIBUTES, MYF(0),
+ f->field_name.str, "GENERATED ALWAYS AS");
+ res= true;
+ }
+
+ return res;
+}
+
+bool Table_scope_and_contents_source_st::check_fields(
+ THD *thd, Alter_info *alter_info,
+ const Lex_table_name &table_name, const Lex_table_name &db, int select_count)
+{
+ return vers_check_system_fields(thd, alter_info,
+ table_name, db, select_count) ||
+ check_period_fields(thd, alter_info);
+}
+
+bool Table_scope_and_contents_source_st::check_period_fields(
+ THD *thd, Alter_info *alter_info)
+{
+ if (!period_info.name)
+ return false;
+
+ if (tmp_table())
+ {
+ my_error(ER_PERIOD_TEMPORARY_NOT_ALLOWED, MYF(0));
+ return true;
+ }
+
+ Table_period_info::start_end_t &period= period_info.period;
+ const Create_field *row_start= NULL;
+ const Create_field *row_end= NULL;
+ List_iterator<Create_field> it(alter_info->create_list);
+ while (const Create_field *f= it++)
+ {
+ if (period.start.streq(f->field_name)) row_start= f;
+ else if (period.end.streq(f->field_name)) row_end= f;
+
+ if (period_info.name.streq(f->field_name))
+ {
+ my_error(ER_DUP_FIELDNAME, MYF(0), f->field_name.str);
+ return true;
+ }
+ }
+
+ bool res= period_info.check_field(row_start, period.start.str)
+ || period_info.check_field(row_end, period.end.str);
+ if (res)
+ return true;
+
+ if (row_start->type_handler() != row_end->type_handler()
+ || row_start->length != row_end->length)
+ {
+ my_error(ER_PERIOD_TYPES_MISMATCH, MYF(0), period_info.name.str);
+ res= true;
+ }
+
+ return res;
+}
+
+bool
+Table_scope_and_contents_source_st::fix_create_fields(THD *thd,
+ Alter_info *alter_info,
+ const TABLE_LIST &create_table)
+{
+ return vers_fix_system_fields(thd, alter_info, create_table)
+ || fix_period_fields(thd, alter_info);
+}
+
+bool
+Table_scope_and_contents_source_st::fix_period_fields(THD *thd,
+ Alter_info *alter_info)
+{
+ if (!period_info.name)
+ return false;
+
+ Table_period_info::start_end_t &period= period_info.period;
+ List_iterator<Create_field> it(alter_info->create_list);
+ while (Create_field *f= it++)
+ {
+ if (period.start.streq(f->field_name) || period.end.streq(f->field_name))
+ {
+ f->period= &period_info;
+ f->flags|= NOT_NULL_FLAG;
+ }
+ }
+ return false;
+}
diff --git a/sql/handler.h b/sql/handler.h
index 1c971b2f831..cd999f30bc0 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -43,10 +43,17 @@
#include <keycache.h>
#include <mysql/psi/mysql_table.h>
#include "sql_sequence.h"
+#include "mem_root_array.h"
class Alter_info;
class Virtual_column_info;
class sequence_definition;
+class Rowid_filter;
+class Field_string;
+class Field_varstring;
+class Field_blob;
+class Field_geom;
+class Column_definition;
// the following is for checking tables
@@ -115,7 +122,13 @@ enum enum_alter_inplace_result {
#define HA_NO_BLOBS (1ULL << 9) /* Doesn't support blobs */
#define HA_CAN_INDEX_BLOBS (1ULL << 10)
#define HA_AUTO_PART_KEY (1ULL << 11) /* auto-increment in multi-part key */
-#define HA_REQUIRE_PRIMARY_KEY (1ULL << 12) /* .. and can't create a hidden one */
+/*
+ The engine requires every table to have a user-specified PRIMARY KEY.
+ Do not set the flag if the engine can generate a hidden primary key internally.
+ This flag is ignored if a SEQUENCE is created (which, in turn, needs
+ HA_CAN_TABLES_WITHOUT_ROLLBACK flag)
+*/
+#define HA_REQUIRE_PRIMARY_KEY (1ULL << 12)
#define HA_STATS_RECORDS_IS_EXACT (1ULL << 13) /* stats.records is exact */
/*
INSERT_DELAYED only works with handlers that uses MySQL internal table
@@ -300,10 +313,33 @@ enum enum_alter_inplace_result {
#define HA_CAN_MULTISTEP_MERGE (1LL << 53)
/* calling cmp_ref() on the engine is expensive */
-#define HA_CMP_REF_IS_EXPENSIVE (1ULL << 54)
+#define HA_SLOW_CMP_REF (1ULL << 54)
+#define HA_CMP_REF_IS_EXPENSIVE HA_SLOW_CMP_REF
+
+/**
+ Some engines are unable to provide an efficient implementation for rnd_pos().
+ Server will try to avoid it, if possible
-/* Engine wants primary keys for everything except sequences */
-#define HA_WANTS_PRIMARY_KEY (1ULL << 55)
+ TODO better to do it with cost estimates, not with an explicit flag
+*/
+#define HA_SLOW_RND_POS (1ULL << 55)
+
+/* Safe for online backup */
+#define HA_CAN_ONLINE_BACKUPS (1ULL << 56)
+
+/* Support native hash index */
+#define HA_CAN_HASH_KEYS (1ULL << 58)
+/*
+ Rowid's are not comparable. This is set if the rowid is unique to the
+ current open handler, like it is with federated where the rowid is a
+ pointer to a local result set buffer. The effect of having this set is
+ that the optimizer will not consirer the following optimizations for
+ the table:
+ ror scans or filtering
+*/
+#define HA_NON_COMPARABLE_ROWID (1ULL << 59)
+
+#define HA_LAST_TABLE_FLAG HA_NON_COMPARABLE_ROWID
/* bits in index_flags(index_number) for what you can do with index */
#define HA_READ_NEXT 1 /* TODO really use this flag */
@@ -325,6 +361,8 @@ enum enum_alter_inplace_result {
*/
#define HA_CLUSTERED_INDEX 512
+#define HA_DO_RANGE_FILTER_PUSHDOWN 1024
+
/*
bits in alter_table_flags:
*/
@@ -609,10 +647,15 @@ typedef ulonglong alter_table_operations;
#define ALTER_KEYS_ONOFF (1ULL << 9)
// Set for FORCE, ENGINE(same engine), by mysql_recreate_table()
#define ALTER_RECREATE (1ULL << 10)
+// Set for CONVERT TO
+#define ALTER_CONVERT_TO (1ULL << 11)
+// Set for DROP ... ADD some_index
+#define ALTER_RENAME_INDEX (1ULL << 12)
// Set for ADD FOREIGN KEY
#define ALTER_ADD_FOREIGN_KEY (1ULL << 21)
// Set for DROP FOREIGN KEY
#define ALTER_DROP_FOREIGN_KEY (1ULL << 22)
+#define ALTER_CHANGE_INDEX_COMMENT (1ULL << 23)
// Set for ADD [COLUMN] FIRST | AFTER
#define ALTER_COLUMN_ORDER (1ULL << 25)
#define ALTER_ADD_CHECK_CONSTRAINT (1ULL << 27)
@@ -677,13 +720,9 @@ typedef ulonglong alter_table_operations;
#define ALTER_VIRTUAL_COLUMN_TYPE (1ULL << 47)
#define ALTER_STORED_COLUMN_TYPE (1ULL << 48)
-/**
- Change column datatype in such way that new type has compatible
- packed representation with old type, so it is theoretically
- possible to perform change by only updating data dictionary
- without changing table rows.
-*/
-#define ALTER_COLUMN_EQUAL_PACK_LENGTH (1ULL << 49)
+
+// Engine can handle type change by itself in ALGORITHM=INPLACE
+#define ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE (1ULL << 49)
// Reorder column
#define ALTER_STORED_COLUMN_ORDER (1ULL << 50)
@@ -865,15 +904,6 @@ struct xid_t {
};
typedef struct xid_t XID;
-/*
- The size of XID string representation in the form
- 'gtrid', 'bqual', formatID
- see xid_t::get_sql_string() for details.
-*/
-#define SQL_XIDSIZE (XIDDATASIZE * 2 + 8 + MY_INT64_NUM_DECIMAL_DIGITS)
-/* The 'buf' has to have space for at least SQL_XIDSIZE bytes. */
-uint get_sql_xid(XID *xid, char *buf);
-
/* for recover() handlerton call */
#define MIN_XID_LIST_SIZE 128
#define MAX_XID_LIST_SIZE (1024*128)
@@ -911,6 +941,16 @@ enum tablespace_access_mode
TS_NOT_ACCESSIBLE = 2
};
+/* Statistics about batch operations like bulk_insert */
+struct ha_copy_info
+{
+ ha_rows records; /* Used to check if rest of variables can be used */
+ ha_rows touched;
+ ha_rows copied;
+ ha_rows deleted;
+ ha_rows updated;
+};
+
struct handlerton;
class st_alter_tablespace : public Sql_alloc
{
@@ -983,6 +1023,7 @@ enum enum_schema_tables
SCH_KEY_CACHES,
SCH_KEY_COLUMN_USAGE,
SCH_OPEN_TABLES,
+ SCH_OPT_TRACE,
SCH_PARAMETERS,
SCH_PARTITIONS,
SCH_PLUGINS,
@@ -1137,6 +1178,8 @@ typedef struct st_ha_create_table_option {
class handler;
class group_by_handler;
+class derived_handler;
+class select_handler;
struct Query;
typedef class st_select_lex SELECT_LEX;
typedef struct st_order ORDER;
@@ -1400,7 +1443,6 @@ struct handlerton
THD *victim_thd, my_bool signal);
int (*set_checkpoint)(handlerton *hton, const XID* xid);
int (*get_checkpoint)(handlerton *hton, XID* xid);
- void (*fake_trx_id)(handlerton *hton, THD *thd);
/*
Optional clauses in the CREATE/ALTER TABLE
*/
@@ -1440,6 +1482,21 @@ struct handlerton
*/
group_by_handler *(*create_group_by)(THD *thd, Query *query);
+ /*
+ Create and return a derived_handler if the storage engine can execute
+ the derived table 'derived', otherwise return NULL.
+ In a general case 'derived' may contain tables not from the engine.
+ If the engine cannot handle or does not want to handle such pushed derived
+ the function create_group_by has to return NULL.
+ */
+ derived_handler *(*create_derived)(THD *thd, TABLE_LIST *derived);
+
+ /*
+ Create and return a select_handler if the storage engine can execute
+ the select statement 'select, otherwise return NULL
+ */
+ select_handler *(*create_select) (THD *thd, SELECT_LEX *select);
+
/*********************************************************************
Table discovery API.
It allows the server to "discover" tables that exist in the storage
@@ -1540,6 +1597,10 @@ struct handlerton
/** Disable or enable the internal writes of a storage engine */
void (*disable_internal_writes)(bool disable);
+
+ /* backup */
+ void (*prepare_for_backup)(void);
+ void (*end_backup)(void);
};
@@ -1596,6 +1657,9 @@ handlerton *ha_default_tmp_handlerton(THD *thd);
// Engine needs to access the main connect string in partitions
#define HTON_CAN_READ_CONNECT_STRING_IN_PARTITION (1 <<12)
+/* can be replicated by wsrep replication provider plugin */
+#define HTON_WSREP_REPLICATION (1 << 13)
+
/*
Table requires and close and reopen after truncate
If the handler has HTON_CAN_RECREATE, this flag is not used
@@ -1832,6 +1896,7 @@ typedef struct {
time_t check_time;
time_t update_time;
ulonglong check_sum;
+ bool check_sum_null;
} PARTITION_STATS;
#define UNDEF_NODEGROUP 65535
@@ -1875,54 +1940,66 @@ enum vers_sys_type_t
VERS_TRX_ID
};
-extern const LEX_CSTRING null_clex_str;
-
-struct Vers_parse_info
+struct Table_period_info: Sql_alloc
{
- Vers_parse_info() :
- versioned_fields(false),
- unversioned_fields(false)
- {}
+ Table_period_info() :
+ create_if_not_exists(false),
+ constr(NULL) {}
+ Table_period_info(const char *name_arg, size_t size) :
+ name(name_arg, size),
+ create_if_not_exists(false),
+ constr(NULL) {}
- void init() // Deep initialization
- {
- system_time= start_end_t(null_clex_str, null_clex_str);
- as_row= start_end_t(null_clex_str, null_clex_str);
- versioned_fields= false;
- unversioned_fields= false;
- }
+ Lex_ident name;
struct start_end_t
{
- start_end_t()
- {}
- start_end_t(LEX_CSTRING _start, LEX_CSTRING _end) :
+ start_end_t() {};
+ start_end_t(const LEX_CSTRING& _start, const LEX_CSTRING& _end) :
start(_start),
end(_end) {}
Lex_ident start;
Lex_ident end;
};
+ start_end_t period;
+ bool create_if_not_exists;
+ Virtual_column_info *constr;
- start_end_t system_time;
- start_end_t as_row;
+ bool is_set() const
+ {
+ DBUG_ASSERT(bool(period.start) == bool(period.end));
+ return period.start;
+ }
- void set_system_time(Lex_ident start, Lex_ident end)
+ void set_period(const Lex_ident& start, const Lex_ident& end)
{
- system_time.start= start;
- system_time.end= end;
+ period.start= start;
+ period.end= end;
}
+ bool check_field(const Create_field* f, const Lex_ident& f_name) const;
+};
+
+struct Vers_parse_info: public Table_period_info
+{
+ Vers_parse_info() :
+ Table_period_info(STRING_WITH_LEN("SYSTEM_TIME")),
+ versioned_fields(false),
+ unversioned_fields(false)
+ {}
+
+ Table_period_info::start_end_t as_row;
protected:
friend struct Table_scope_and_contents_source_st;
void set_start(const LEX_CSTRING field_name)
{
as_row.start= field_name;
- system_time.start= field_name;
+ period.start= field_name;
}
void set_end(const LEX_CSTRING field_name)
{
as_row.end= field_name;
- system_time.end= field_name;
+ period.end= field_name;
}
bool is_start(const char *name) const;
bool is_end(const char *name) const;
@@ -1931,7 +2008,7 @@ protected:
bool fix_implicit(THD *thd, Alter_info *alter_info);
operator bool() const
{
- return as_row.start || as_row.end || system_time.start || system_time.end;
+ return as_row.start || as_row.end || period.start || period.end;
}
bool need_check(const Alter_info *alter_info) const;
bool check_conditions(const Lex_table_name &table_name,
@@ -1972,7 +2049,7 @@ public:
struct Table_scope_and_contents_source_pod_st // For trivial members
{
- CHARSET_INFO *table_charset;
+ CHARSET_INFO *alter_table_convert_to_charset;
LEX_CUSTRING tabledef_version;
LEX_CSTRING connect_string;
LEX_CSTRING comment;
@@ -2052,15 +2129,26 @@ struct Table_scope_and_contents_source_st:
public Table_scope_and_contents_source_pod_st
{
Vers_parse_info vers_info;
+ Table_period_info period_info;
void init()
{
Table_scope_and_contents_source_pod_st::init();
- vers_info.init();
+ vers_info= {};
+ period_info= {};
}
- bool vers_fix_system_fields(THD *thd, Alter_info *alter_info,
+ bool fix_create_fields(THD *thd, Alter_info *alter_info,
const TABLE_LIST &create_table);
+ bool fix_period_fields(THD *thd, Alter_info *alter_info);
+ bool check_fields(THD *thd, Alter_info *alter_info,
+ const Lex_table_name &table_name,
+ const Lex_table_name &db,
+ int select_count= 0);
+ bool check_period_fields(THD *thd, Alter_info *alter_info);
+
+ bool vers_fix_system_fields(THD *thd, Alter_info *alter_info,
+ const TABLE_LIST &create_table);
bool vers_check_system_fields(THD *thd, Alter_info *alter_info,
const Lex_table_name &table_name,
@@ -2106,7 +2194,7 @@ struct HA_CREATE_INFO: public Table_scope_and_contents_source_st,
DBUG_ASSERT(cs);
if (check_conflicting_charset_declarations(cs))
return true;
- table_charset= default_table_charset= cs;
+ alter_table_convert_to_charset= default_table_charset= cs;
used_fields|= (HA_CREATE_USED_CHARSET | HA_CREATE_USED_DEFAULT_CHARSET);
return false;
}
@@ -2252,6 +2340,29 @@ public:
uint *index_add_buffer;
/**
+ Old and new index names. Used for index rename.
+ */
+ struct Rename_key_pair
+ {
+ Rename_key_pair(const KEY *old_key, const KEY *new_key)
+ : old_key(old_key), new_key(new_key)
+ {
+ }
+ const KEY *old_key;
+ const KEY *new_key;
+ };
+ /**
+ Vector of key pairs from DROP/ADD index which can be renamed.
+ */
+ typedef Mem_root_array<Rename_key_pair, true> Rename_keys_vector;
+
+ /**
+ A list of indexes which should be renamed.
+ Index definitions stays the same.
+ */
+ Rename_keys_vector rename_keys;
+
+ /**
Context information to allow handlers to keep context between in-place
alter API calls.
@@ -2314,28 +2425,14 @@ public:
/** true when InnoDB should abort the alter when table is not empty */
bool error_if_not_empty;
+ /** True when DDL should avoid downgrading the MDL */
+ bool mdl_exclusive_after_prepare= false;
+
Alter_inplace_info(HA_CREATE_INFO *create_info_arg,
Alter_info *alter_info_arg,
KEY *key_info_arg, uint key_count_arg,
partition_info *modified_part_info_arg,
- bool ignore_arg, bool error_non_empty)
- : create_info(create_info_arg),
- alter_info(alter_info_arg),
- key_info_buffer(key_info_arg),
- key_count(key_count_arg),
- index_drop_count(0),
- index_drop_buffer(NULL),
- index_add_count(0),
- index_add_buffer(NULL),
- handler_ctx(NULL),
- group_commit_ctx(NULL),
- handler_flags(0),
- modified_part_info(modified_part_info_arg),
- ignore(ignore_arg),
- online(false),
- unsupported_reason(NULL),
- error_if_not_empty(error_non_empty)
- {}
+ bool ignore_arg, bool error_non_empty);
~Alter_inplace_info()
{
@@ -2530,16 +2627,19 @@ typedef bool (*SKIP_INDEX_TUPLE_FUNC) (range_seq_t seq, range_id_t range_info);
class Cost_estimate
{
public:
- double io_count; /* number of I/O */
- double avg_io_cost; /* cost of an average I/O oper. */
- double cpu_cost; /* cost of operations in CPU */
- double import_cost; /* cost of remote operations */
- double mem_cost; /* cost of used memory */
+ double io_count; /* number of I/O to fetch records */
+ double avg_io_cost; /* cost of an average I/O oper. to fetch records */
+ double idx_io_count; /* number of I/O to read keys */
+ double idx_avg_io_cost; /* cost of an average I/O oper. to fetch records */
+ double cpu_cost; /* total cost of operations in CPU */
+ double idx_cpu_cost; /* cost of operations in CPU for index */
+ double import_cost; /* cost of remote operations */
+ double mem_cost; /* cost of used memory */
- enum { IO_COEFF=1 };
- enum { CPU_COEFF=1 };
- enum { MEM_COEFF=1 };
- enum { IMPORT_COEFF=1 };
+ static const int IO_COEFF=1;
+ static const int CPU_COEFF=1;
+ static const int MEM_COEFF=1;
+ static const int IMPORT_COEFF=1;
Cost_estimate()
{
@@ -2548,10 +2648,18 @@ public:
double total_cost()
{
- return IO_COEFF*io_count*avg_io_cost + CPU_COEFF * cpu_cost +
+ return IO_COEFF*io_count*avg_io_cost +
+ IO_COEFF*idx_io_count*idx_avg_io_cost +
+ CPU_COEFF*cpu_cost +
MEM_COEFF*mem_cost + IMPORT_COEFF*import_cost;
}
+ double index_only_cost()
+ {
+ return IO_COEFF*idx_io_count*idx_avg_io_cost +
+ CPU_COEFF*idx_cpu_cost;
+ }
+
/**
Whether or not all costs in the object are zero
@@ -2559,30 +2667,48 @@ public:
*/
bool is_zero() const
{
- return io_count == 0.0 && cpu_cost == 0.0 &&
+ return io_count == 0.0 && idx_io_count && cpu_cost == 0.0 &&
import_cost == 0.0 && mem_cost == 0.0;
}
void reset()
{
avg_io_cost= 1.0;
- io_count= cpu_cost= mem_cost= import_cost= 0.0;
+ idx_avg_io_cost= 1.0;
+ io_count= idx_io_count= cpu_cost= idx_cpu_cost= mem_cost= import_cost= 0.0;
}
void multiply(double m)
{
io_count *= m;
cpu_cost *= m;
+ idx_io_count *= m;
+ idx_cpu_cost *= m;
import_cost *= m;
/* Don't multiply mem_cost */
}
void add(const Cost_estimate* cost)
{
- double io_count_sum= io_count + cost->io_count;
- add_io(cost->io_count, cost->avg_io_cost);
- io_count= io_count_sum;
+ if (cost->io_count)
+ {
+ double io_count_sum= io_count + cost->io_count;
+ avg_io_cost= (io_count * avg_io_cost +
+ cost->io_count * cost->avg_io_cost)
+ /io_count_sum;
+ io_count= io_count_sum;
+ }
+ if (cost->idx_io_count)
+ {
+ double idx_io_count_sum= idx_io_count + cost->idx_io_count;
+ idx_avg_io_cost= (idx_io_count * idx_avg_io_cost +
+ cost->idx_io_count * cost->idx_avg_io_cost)
+ /idx_io_count_sum;
+ idx_io_count= idx_io_count_sum;
+ }
cpu_cost += cost->cpu_cost;
+ idx_cpu_cost += cost->idx_cpu_cost;
+ import_cost += cost->import_cost;
}
void add_io(double add_io_cnt, double add_avg_cost)
@@ -2743,6 +2869,7 @@ public:
time_t update_time;
uint block_size; /* index block size */
ha_checksum checksum;
+ bool checksum_null;
/*
number of buffer bytes that native mrr implementation needs,
@@ -2753,12 +2880,15 @@ public:
data_file_length(0), max_data_file_length(0),
index_file_length(0), max_index_file_length(0), delete_length(0),
auto_increment_value(0), records(0), deleted(0), mean_rec_length(0),
- create_time(0), check_time(0), update_time(0), block_size(0),
- mrr_length_per_rec(0)
+ create_time(0), check_time(0), update_time(0), block_size(8192),
+ checksum(0), checksum_null(FALSE), mrr_length_per_rec(0)
{}
};
-extern "C" enum icp_result handler_index_cond_check(void* h_arg);
+extern "C" check_result_t handler_index_cond_check(void* h_arg);
+
+extern "C" check_result_t handler_rowid_filter_check(void* h_arg);
+extern "C" int handler_rowid_filter_is_active(void* h_arg);
uint calculate_key_len(TABLE *, uint, const uchar *, key_part_map);
/*
@@ -2781,6 +2911,13 @@ public:
virtual ~Handler_share() {}
};
+enum class Compare_keys : uint32_t
+{
+ Equal,
+ EqualButKeyPartLength,
+ EqualButComment,
+ NotEqual
+};
/**
The handler class is the interface for dynamically loadable
@@ -2916,16 +3053,26 @@ public:
ulonglong rows_changed;
/* One bigger than needed to avoid to test if key == MAX_KEY */
ulonglong index_rows_read[MAX_KEY+1];
+ ha_copy_info copy_info;
private:
/* ANALYZE time tracker, if present */
Exec_time_tracker *tracker;
public:
void set_time_tracker(Exec_time_tracker *tracker_arg) { tracker=tracker_arg;}
+ Exec_time_tracker *get_time_tracker() { return tracker; }
Item *pushed_idx_cond;
uint pushed_idx_cond_keyno; /* The index which the above condition is for */
+ /* Rowid filter pushed into the engine */
+ Rowid_filter *pushed_rowid_filter;
+ /* true when the pushed rowid filter has been already filled */
+ bool rowid_filter_is_active;
+ /* Used for disabling/enabling pushed_rowid_filter */
+ Rowid_filter *save_pushed_rowid_filter;
+ bool save_rowid_filter_is_active;
+
Discrete_interval auto_inc_interval_for_cur_row;
/**
Number of reserved auto-increment intervals. Serves as a heuristic
@@ -2981,7 +3128,7 @@ public:
check_table_binlog_row_based_done(0),
check_table_binlog_row_based_result(0),
row_already_logged(0),
- in_range_check_pushed_down(FALSE),
+ in_range_check_pushed_down(FALSE), errkey(-1),
key_used_on_scan(MAX_KEY),
active_index(MAX_KEY), keyread(MAX_KEY),
ref_length(sizeof(my_off_t)),
@@ -2990,6 +3137,10 @@ public:
tracker(NULL),
pushed_idx_cond(NULL),
pushed_idx_cond_keyno(MAX_KEY),
+ pushed_rowid_filter(NULL),
+ rowid_filter_is_active(0),
+ save_pushed_rowid_filter(NULL),
+ save_rowid_filter_is_active(false),
auto_inc_intervals_count(0),
m_psi(NULL), set_top_table_fields(FALSE), top_table(0),
top_table_field(0), top_table_fields(0),
@@ -3011,7 +3162,7 @@ public:
{
cached_table_flags= table_flags();
}
- /* ha_ methods: pubilc wrappers for private virtual API */
+ /* ha_ methods: public wrappers for private virtual API */
int ha_open(TABLE *table, const char *name, int mode, uint test_if_locked,
MEM_ROOT *mem_root= 0, List<String> *partitions_to_open=NULL);
@@ -3078,7 +3229,11 @@ public:
/**
The cached_table_flags is set at ha_open and ha_external_lock
*/
- Table_flags ha_table_flags() const { return cached_table_flags; }
+ Table_flags ha_table_flags() const
+ {
+ DBUG_ASSERT(cached_table_flags < (HA_LAST_TABLE_FLAG << 1));
+ return cached_table_flags;
+ }
/**
These functions represent the public interface to *users* of the
handler class, hence they are *not* virtual. For the inheritance
@@ -3086,7 +3241,7 @@ public:
and delete_row() below.
*/
int ha_external_lock(THD *thd, int lock_type);
- int ha_write_row(uchar * buf);
+ int ha_write_row(const uchar * buf);
int ha_update_row(const uchar * old_data, const uchar * new_data);
int ha_delete_row(const uchar * buf);
void ha_release_auto_increment();
@@ -3115,6 +3270,7 @@ public:
{
DBUG_ENTER("handler::ha_start_bulk_insert");
estimation_rows_to_insert= rows;
+ bzero(&copy_info,sizeof(copy_info));
start_bulk_insert(rows, flags);
DBUG_VOID_RETURN;
}
@@ -3180,6 +3336,13 @@ public:
{
rows_read= rows_changed= rows_tmp_read= 0;
bzero(index_rows_read, sizeof(index_rows_read));
+ bzero(&copy_info, sizeof(copy_info));
+ }
+ virtual void reset_copy_info() {}
+ void ha_reset_copy_info()
+ {
+ bzero(&copy_info, sizeof(copy_info));
+ reset_copy_info();
}
virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
{
@@ -3190,6 +3353,11 @@ public:
virtual double scan_time()
{ return ulonglong2double(stats.data_file_length) / IO_SIZE + 2; }
+ virtual double key_scan_time(uint index)
+ {
+ return keyread_time(index, 1, records());
+ }
+
/**
The cost of reading a set of ranges from the table using an index
to access it.
@@ -3217,7 +3385,7 @@ public:
/*
True if changes to the table is persistent (no rollback)
- This is manly used to decide how to log changes to the table in
+ This is mainly used to decide how to log changes to the table in
the binary log.
*/
bool has_transactions()
@@ -3757,6 +3925,7 @@ public:
virtual uint max_supported_key_part_length() const { return 255; }
virtual uint min_record_length(uint options) const { return 1; }
+ virtual int pre_calculate_checksum() { return 0; }
virtual int calculate_checksum();
virtual bool is_crashed() const { return 0; }
virtual bool auto_repair(int error) const { return 0; }
@@ -4008,6 +4177,35 @@ public:
in_range_check_pushed_down= false;
}
+ virtual void cancel_pushed_rowid_filter()
+ {
+ pushed_rowid_filter= NULL;
+ rowid_filter_is_active= false;
+ }
+
+ virtual void disable_pushed_rowid_filter()
+ {
+ DBUG_ASSERT(pushed_rowid_filter != NULL &&
+ save_pushed_rowid_filter == NULL);
+ save_pushed_rowid_filter= pushed_rowid_filter;
+ if (rowid_filter_is_active)
+ save_rowid_filter_is_active= rowid_filter_is_active;
+ pushed_rowid_filter= NULL;
+ rowid_filter_is_active= false;
+ }
+
+ virtual void enable_pushed_rowid_filter()
+ {
+ DBUG_ASSERT(save_pushed_rowid_filter != NULL &&
+ pushed_rowid_filter == NULL);
+ pushed_rowid_filter= save_pushed_rowid_filter;
+ if (save_rowid_filter_is_active)
+ rowid_filter_is_active= true;
+ save_pushed_rowid_filter= NULL;
+ }
+
+ virtual bool rowid_filter_push(Rowid_filter *rowid_filter) { return true; }
+
/* Needed for partition / spider */
virtual TABLE_LIST *get_next_global_for_child() { return NULL; }
@@ -4371,7 +4569,7 @@ private:
*/
virtual int rnd_init(bool scan)= 0;
virtual int rnd_end() { return 0; }
- virtual int write_row(uchar *buf __attribute__((unused)))
+ virtual int write_row(const uchar *buf __attribute__((unused)))
{
return HA_ERR_WRONG_COMMAND;
}
@@ -4394,7 +4592,7 @@ private:
Optimized function for updating the first row. Only used by sequence
tables
*/
- virtual int update_first_row(uchar *new_data);
+ virtual int update_first_row(const uchar *new_data);
virtual int delete_row(const uchar *buf __attribute__((unused)))
{
@@ -4403,7 +4601,7 @@ private:
/* Perform initialization for a direct update request */
public:
- int ha_direct_update_rows(ha_rows *update_rows);
+ int ha_direct_update_rows(ha_rows *update_rows, ha_rows *found_rows);
virtual int direct_update_rows_init(List<Item> *update_fields)
{
return HA_ERR_WRONG_COMMAND;
@@ -4413,7 +4611,8 @@ private:
{
return HA_ERR_WRONG_COMMAND;
}
- virtual int direct_update_rows(ha_rows *update_rows __attribute__((unused)))
+ virtual int direct_update_rows(ha_rows *update_rows __attribute__((unused)),
+ ha_rows *found_rows __attribute__((unused)))
{
return HA_ERR_WRONG_COMMAND;
}
@@ -4616,7 +4815,8 @@ public:
virtual void set_lock_type(enum thr_lock_type lock);
- friend enum icp_result handler_index_cond_check(void* h_arg);
+ friend check_result_t handler_index_cond_check(void* h_arg);
+ friend check_result_t handler_rowid_filter_check(void *h_arg);
/**
Find unique record by index or unique constrain
@@ -4637,6 +4837,42 @@ public:
{ DBUG_ASSERT(ht); return partition_ht()->flags & HTON_NATIVE_SYS_VERSIONING; }
virtual void update_partition(uint part_id)
{}
+
+ virtual bool is_clustering_key(uint index) { return false; }
+
+ /**
+ Some engines can perform column type conversion with ALGORITHM=INPLACE.
+ These functions check for such possibility.
+ Implementation could be based on Field_xxx::is_equal()
+ */
+ virtual bool can_convert_string(const Field_string *field,
+ const Column_definition &new_type) const
+ {
+ return false;
+ }
+ virtual bool can_convert_varstring(const Field_varstring *field,
+ const Column_definition &new_type) const
+ {
+ return false;
+ }
+ virtual bool can_convert_blob(const Field_blob *field,
+ const Column_definition &new_type) const
+ {
+ return false;
+ }
+ virtual bool can_convert_geom(const Field_geom *field,
+ const Column_definition &new_type) const
+ {
+ return false;
+ }
+
+ /* Used for ALTER TABLE.
+ Some engines can handle some differences in indexes by themself. */
+ virtual Compare_keys compare_key_parts(const Field &old_field,
+ const Column_definition &new_field,
+ const KEY_PART_INFO &old_part,
+ const KEY_PART_INFO &new_part) const;
+
protected:
Handler_share *get_ha_share_ptr();
void set_ha_share_ptr(Handler_share *arg_ha_share);
@@ -4715,6 +4951,8 @@ int ha_create_table(THD *thd, const char *path,
HA_CREATE_INFO *create_info, LEX_CUSTRING *frm);
int ha_delete_table(THD *thd, handlerton *db_type, const char *path,
const LEX_CSTRING *db, const LEX_CSTRING *alias, bool generate_warning);
+void ha_prepare_for_backup();
+void ha_end_backup();
void ha_disable_internal_writes(bool disable);
@@ -4784,9 +5022,6 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv);
int ha_release_savepoint(THD *thd, SAVEPOINT *sv);
#ifdef WITH_WSREP
int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal);
-void ha_fake_trx_id(THD *thd);
-#else
-inline void ha_fake_trx_id(THD *thd) { }
#endif
/* these are called by storage engines */
@@ -4802,7 +5037,6 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht);
const char *get_canonical_filename(handler *file, const char *path,
char *tmp_path);
-bool mysql_xa_recover(THD *thd);
void commit_checkpoint_notify_ha(handlerton *hton, void *cookie);
inline const LEX_CSTRING *table_case_name(HA_CREATE_INFO *info, const LEX_CSTRING *name)
@@ -4844,4 +5078,10 @@ int del_global_table_stat(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *t
@note This does not need to be multi-byte safe or anything */
char *xid_to_str(char *buf, const XID &xid);
#endif // !DBUG_OFF
+
+#if defined(WITH_ARIA_STORAGE_ENGINE) && MYSQL_VERSION_ID < 100500
+extern void ha_maria_implicit_commit(THD *thd, bool new_trans);
+#else
+#define ha_maria_implicit_commit(A, B) while(0)
+#endif
#endif /* HANDLER_INCLUDED */
diff --git a/sql/init.cc b/sql/init.cc
index 84465151fb1..4735178707f 100644
--- a/sql/init.cc
+++ b/sql/init.cc
@@ -24,7 +24,7 @@
#include "mariadb.h"
#include "sql_priv.h"
#include "init.h"
-#include "mysqld.h" // abort_loop, ...
+#include "mysqld.h"
#include "my_time.h" // my_init_time
#include "unireg.h" // SPECIAL_SAME_DB_NAME
#include <m_ctype.h>
@@ -34,8 +34,6 @@ void unireg_init(ulong options)
DBUG_ENTER("unireg_init");
error_handler_hook = my_message_stderr;
- abort_loop=0;
-
my_disable_async_io=1; /* aioread is only in shared library */
wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
diff --git a/sql/init.h b/sql/init.h
index c7c158082b9..b9d5053fc4d 100644
--- a/sql/init.h
+++ b/sql/init.h
@@ -17,6 +17,5 @@
#define INIT_INCLUDED
void unireg_init(ulong options);
-ATTRIBUTE_NORETURN void unireg_end(void);
#endif /* INIT_INCLUDED */
diff --git a/sql/innodb_priv.h b/sql/innodb_priv.h
index aaae75689e3..bec63a839c8 100644
--- a/sql/innodb_priv.h
+++ b/sql/innodb_priv.h
@@ -19,15 +19,13 @@
/** @file Declaring server-internal functions that are used by InnoDB. */
#include <sql_priv.h>
+#include <strfunc.h> /* strconvert */
class THD;
int get_quote_char_for_identifier(THD *thd, const char *name, size_t length);
bool schema_table_store_record(THD *thd, TABLE *table);
void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);
-uint strconvert(CHARSET_INFO *from_cs, const char *from, size_t from_length,
- CHARSET_INFO *to_cs, char *to, size_t to_length,
- uint *errors);
void sql_print_error(const char *format, ...);
diff --git a/sql/item.cc b/sql/item.cc
index 6681d5e375d..f3eb7bcd741 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -124,60 +124,31 @@ void Item::push_note_converted_to_positive_complement(THD *thd)
}
-longlong Item::val_datetime_packed_result()
+longlong Item::val_datetime_packed_result(THD *thd)
{
MYSQL_TIME ltime, tmp;
- if (get_date_result(&ltime, TIME_FUZZY_DATES | TIME_INVALID_DATES))
+ if (get_date_result(thd, &ltime, Datetime::Options_cmp(thd)))
return 0;
if (ltime.time_type != MYSQL_TIMESTAMP_TIME)
return pack_time(&ltime);
- if ((null_value= time_to_datetime_with_warn(current_thd, &ltime, &tmp, 0)))
+ if ((null_value= time_to_datetime_with_warn(thd, &ltime, &tmp,
+ TIME_CONV_NONE)))
return 0;
return pack_time(&tmp);
}
-/**
- Get date/time/datetime.
- If DATETIME or DATE result is returned, it's converted to TIME.
-*/
-bool Item::get_time_with_conversion(THD *thd, MYSQL_TIME *ltime,
- ulonglong fuzzydate)
+longlong Item::val_time_packed_result(THD *thd)
{
- if (get_date(ltime, fuzzydate))
- return true;
- if (ltime->time_type != MYSQL_TIMESTAMP_TIME)
- {
- MYSQL_TIME ltime2;
- if ((thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST) &&
- (ltime->year || ltime->day || ltime->month))
- {
- /*
- Old mode conversion from DATETIME with non-zero YYYYMMDD part
- to TIME works very inconsistently. Possible variants:
- - truncate the YYYYMMDD part
- - add (MM*33+DD)*24 to hours
- - add (MM*31+DD)*24 to hours
- Let's return TRUE here, to disallow equal field propagation.
- Note, If we start to use this method in more pieces of the code other
- than equal field propagation, we should probably return
- TRUE only if some flag in fuzzydate is set.
- */
- return true;
- }
- if (datetime_to_time_with_warn(thd, ltime, &ltime2, TIME_SECOND_PART_DIGITS))
- {
- /*
- If the time difference between CURRENT_DATE and ltime
- did not fit into the supported TIME range, then we set the
- difference to the maximum possible value in the supported TIME range
- */
- DBUG_ASSERT(0);
- return (null_value= true);
- }
- *ltime= ltime2;
- }
- return false;
+ MYSQL_TIME ltime;
+ if (get_date_result(thd, &ltime, Time::Options_cmp(thd)))
+ return 0;
+ if (ltime.time_type == MYSQL_TIMESTAMP_TIME)
+ return pack_time(&ltime);
+ int warn= 0;
+ Time tmp(&warn, &ltime, 0);
+ DBUG_ASSERT(tmp.is_valid_time());
+ return tmp.to_packed();
}
@@ -262,36 +233,6 @@ String *Item::val_string_from_int(String *str)
}
-String *Item::val_string_from_decimal(String *str)
-{
- my_decimal dec_buf, *dec= val_decimal(&dec_buf);
- if (null_value)
- return 0;
- my_decimal_round(E_DEC_FATAL_ERROR, dec, decimals, FALSE, &dec_buf);
- my_decimal2string(E_DEC_FATAL_ERROR, &dec_buf, 0, 0, 0, str);
- return str;
-}
-
-
-/*
- All val_xxx_from_date() must call this method, to expose consistent behaviour
- regarding SQL_MODE when converting DATE/DATETIME to other data types.
-*/
-bool Item::get_temporal_with_sql_mode(MYSQL_TIME *ltime)
-{
- return get_date(ltime, field_type() == MYSQL_TYPE_TIME
- ? TIME_TIME_ONLY
- : sql_mode_for_dates(current_thd));
-}
-
-
-bool Item::is_null_from_temporal()
-{
- MYSQL_TIME ltime;
- return get_temporal_with_sql_mode(&ltime);
-}
-
-
longlong Item::val_int_from_str(int *error)
{
char buff[MAX_FIELD_WIDTH];
@@ -333,12 +274,37 @@ longlong Item::val_int_unsigned_typecast_from_str()
}
-longlong Item::val_int_unsigned_typecast_from_int()
+longlong Item::val_int_signed_typecast_from_real()
{
- longlong value= val_int();
- if (!null_value && unsigned_flag == 0 && value < 0)
- push_note_converted_to_positive_complement(current_thd);
- return value;
+ double nr= val_real();
+ if (null_value)
+ return 0;
+ Converter_double_to_longlong conv(nr, false);
+ if (conv.error())
+ {
+ THD *thd= current_thd;
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_DATA_OVERFLOW, ER_THD(thd, ER_DATA_OVERFLOW),
+ ErrConvDouble(nr).ptr(), "SIGNED BIGINT");
+ }
+ return conv.result();
+}
+
+
+longlong Item::val_int_unsigned_typecast_from_real()
+{
+ double nr= val_real();
+ if (null_value)
+ return 0;
+ Converter_double_to_longlong conv(nr, true);
+ if (conv.error())
+ {
+ THD *thd= current_thd;
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_DATA_OVERFLOW, ER_THD(thd, ER_DATA_OVERFLOW),
+ ErrConvDouble(nr).ptr(), "UNSIGNED BIGINT");
+ }
+ return conv.result();
}
@@ -351,18 +317,12 @@ longlong Item::val_int_signed_typecast_from_int()
}
-String *Item::val_string_from_date(String *str)
+longlong Item::val_int_unsigned_typecast_from_int()
{
- MYSQL_TIME ltime;
- if (get_temporal_with_sql_mode(&ltime) ||
- str->alloc(MAX_DATE_STRING_REP_LENGTH))
- {
- null_value= 1;
- return (String *) 0;
- }
- str->length(my_TIME_to_str(&ltime, const_cast<char*>(str->ptr()), decimals));
- str->set_charset(&my_charset_numeric);
- return str;
+ longlong value= val_int();
+ if (!null_value && unsigned_flag == 0 && value < 0)
+ push_note_converted_to_positive_complement(current_thd);
+ return value;
}
@@ -397,93 +357,10 @@ my_decimal *Item::val_decimal_from_string(my_decimal *decimal_value)
}
-my_decimal *Item::val_decimal_from_date(my_decimal *decimal_value)
-{
- DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_temporal_with_sql_mode(&ltime))
- {
- my_decimal_set_zero(decimal_value);
- null_value= 1; // set NULL, stop processing
- return 0;
- }
- return date2my_decimal(&ltime, decimal_value);
-}
-
-
-my_decimal *Item::val_decimal_from_time(my_decimal *decimal_value)
-{
- DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_time(&ltime))
- {
- my_decimal_set_zero(decimal_value);
- return 0;
- }
- return date2my_decimal(&ltime, decimal_value);
-}
-
-
-longlong Item::val_int_from_date()
-{
- DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_temporal_with_sql_mode(&ltime))
- return 0;
- longlong v= TIME_to_ulonglong(&ltime);
- return ltime.neg ? -v : v;
-}
-
-
-double Item::val_real_from_date()
-{
- DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_temporal_with_sql_mode(&ltime))
- return 0;
- return TIME_to_double(&ltime);
-}
-
-
-double Item::val_real_from_decimal()
-{
- /* Note that fix_fields may not be called for Item_avg_field items */
- double result;
- my_decimal value_buff, *dec_val= val_decimal(&value_buff);
- if (null_value)
- return 0.0;
- my_decimal2double(E_DEC_FATAL_ERROR, dec_val, &result);
- return result;
-}
-
-
-longlong Item::val_int_from_decimal()
-{
- /* Note that fix_fields may not be called for Item_avg_field items */
- longlong result;
- my_decimal value, *dec_val= val_decimal(&value);
- if (null_value)
- return 0;
- my_decimal2int(E_DEC_FATAL_ERROR, dec_val, unsigned_flag, &result);
- return result;
-}
-
-
-longlong Item::val_int_unsigned_typecast_from_decimal()
-{
- longlong result;
- my_decimal tmp, *dec= val_decimal(&tmp);
- if (null_value)
- return 0;
- my_decimal2int(E_DEC_FATAL_ERROR, dec, 1, &result);
- return result;
-}
-
-
int Item::save_time_in_field(Field *field, bool no_conversions)
{
MYSQL_TIME ltime;
- if (get_time(&ltime))
+ if (get_time(field->table->in_use, &ltime))
return set_field_to_null_with_conversions(field, no_conversions);
field->set_notnull();
return field->store_time_dec(&ltime, decimals);
@@ -493,7 +370,8 @@ int Item::save_time_in_field(Field *field, bool no_conversions)
int Item::save_date_in_field(Field *field, bool no_conversions)
{
MYSQL_TIME ltime;
- if (get_date(&ltime, sql_mode_for_dates(field->table->in_use)))
+ THD *thd= field->table->in_use;
+ if (get_date(thd, &ltime, Datetime::Options(thd)))
return set_field_to_null_with_conversions(field, no_conversions);
field->set_notnull();
return field->store_time_dec(&ltime, decimals);
@@ -533,11 +411,11 @@ int Item::save_str_value_in_field(Field *field, String *result)
Item::Item(THD *thd):
is_expensive_cache(-1), rsize(0), name(null_clex_str), orig_name(0),
- fixed(0), is_autogenerated_name(TRUE)
+ is_autogenerated_name(TRUE)
{
DBUG_ASSERT(thd);
marker= 0;
- maybe_null=null_value=with_sum_func=with_window_func=with_field=0;
+ maybe_null= null_value= with_window_func= with_field= false;
in_rollup= 0;
with_param= 0;
@@ -590,11 +468,9 @@ Item::Item(THD *thd, Item *item):
maybe_null(item->maybe_null),
in_rollup(item->in_rollup),
null_value(item->null_value),
- with_sum_func(item->with_sum_func),
with_param(item->with_param),
with_window_func(item->with_window_func),
with_field(item->with_field),
- fixed(item->fixed),
is_autogenerated_name(item->is_autogenerated_name)
{
next= thd->free_list; // Put in free list
@@ -664,7 +540,6 @@ void Item::cleanup()
{
DBUG_ENTER("Item::cleanup");
DBUG_PRINT("enter", ("this: %p", this));
- fixed= 0;
marker= 0;
join_tab_idx= MAX_TABLES;
if (orig_name)
@@ -684,7 +559,7 @@ void Item::cleanup()
bool Item::cleanup_processor(void *arg)
{
- if (fixed)
+ if (is_fixed())
cleanup();
return FALSE;
}
@@ -776,7 +651,8 @@ Item_ident::Item_ident(THD *thd, TABLE_LIST *view_arg,
:Item_result_field(thd), orig_db_name(NullS),
orig_table_name(view_arg->table_name.str),
orig_field_name(*field_name_arg),
- context(&view_arg->view->select_lex.context),
+ /* TODO: suspicious use of first_select_lex */
+ context(&view_arg->view->first_select_lex()->context),
db_name(NullS), table_name(view_arg->alias.str),
field_name(*field_name_arg),
alias_name_used(FALSE), cached_field_index(NO_CACHED_FIELD_INDEX),
@@ -969,12 +845,15 @@ bool Item_field::register_field_in_read_map(void *arg)
{
TABLE *table= (TABLE *) arg;
int res= 0;
+ if (table && table != field->table)
+ return res;
+
if (field->vcol_info &&
- !bitmap_fast_test_and_set(field->table->vcol_set, field->field_index))
+ !bitmap_fast_test_and_set(field->table->read_set, field->field_index))
{
res= field->vcol_info->expr->walk(&Item::register_field_in_read_map,1,arg);
}
- if (field->table == table || !table)
+ else
bitmap_set_bit(field->table->read_set, field->field_index);
return res;
}
@@ -1201,7 +1080,7 @@ bool Item::check_type_scalar(const char *opname) const
This hack in Item_outer_ref should probably be refactored eventually.
Discuss with Sanja.
*/
- DBUG_ASSERT(fixed || type() == REF_ITEM);
+ DBUG_ASSERT(is_fixed() || type() == REF_ITEM);
const Type_handler *handler= type_handler();
if (handler->is_scalar_type())
return false;
@@ -1406,7 +1285,6 @@ Item *Item_cache::safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
unlikely(!(cache= new (thd->mem_root) Item_cache_str(thd, conv))))
return NULL; // Safe conversion is not possible, or OEM
cache->setup(thd, conv);
- cache->fixed= false; // Make Item::fix_fields() happy
return cache;
}
@@ -1457,7 +1335,7 @@ Item *Item::const_charset_converter(THD *thd, CHARSET_INFO *tocs,
const char *func_name)
{
DBUG_ASSERT(const_item());
- DBUG_ASSERT(fixed);
+ DBUG_ASSERT(is_fixed());
StringBuffer<64>tmp;
String *s= val_str(&tmp);
MEM_ROOT *mem_root= thd->mem_root;
@@ -1525,116 +1403,37 @@ Item *Item_param::safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
As a extra convenience the time structure is reset on error or NULL values!
*/
-bool Item::get_date_from_int(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item::get_date_from_int(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- longlong value= val_int();
- bool neg= !unsigned_flag && value < 0;
- if (null_value || int_to_datetime_with_warn(neg, neg ? -value : value,
- ltime, fuzzydate,
- field_table_or_null(),
- field_name_or_null()))
- return null_value|= make_zero_date(ltime, fuzzydate);
- return null_value= false;
-}
-
-
-bool Item::get_date_from_year(MYSQL_TIME *ltime, ulonglong fuzzydate)
-{
- longlong value= val_int();
- DBUG_ASSERT(unsigned_flag || value >= 0);
- if (max_length == 2)
- {
- if (value < 70)
- value+= 2000;
- else if (value <= 1900)
- value+= 1900;
- }
- value*= 10000; /* make it YYYYMMHH */
- if (null_value || int_to_datetime_with_warn(false, value,
- ltime, fuzzydate,
- field_table_or_null(),
- field_name_or_null()))
- return null_value|= make_zero_date(ltime, fuzzydate);
- return null_value= false;
-}
-
-
-bool Item::get_date_from_real(MYSQL_TIME *ltime, ulonglong fuzzydate)
-{
- double value= val_real();
- if (null_value || double_to_datetime_with_warn(value, ltime, fuzzydate,
+ Longlong_hybrid value(val_int(), unsigned_flag);
+ return null_value || int_to_datetime_with_warn(thd, value,
+ ltime, fuzzydate,
field_table_or_null(),
- field_name_or_null()))
- return null_value|= make_zero_date(ltime, fuzzydate);
- return null_value= false;
+ field_name_or_null());
}
-bool Item::get_date_from_decimal(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item::get_date_from_real(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- my_decimal value, *res;
- if (!(res= val_decimal(&value)) ||
- decimal_to_datetime_with_warn(res, ltime, fuzzydate,
- field_table_or_null(),
- field_name_or_null()))
- return null_value|= make_zero_date(ltime, fuzzydate);
- return null_value= false;
-}
-
-
-bool Item::get_date_from_string(MYSQL_TIME *ltime, ulonglong fuzzydate)
-{
- char buff[40];
- String tmp(buff,sizeof(buff), &my_charset_bin),*res;
- if (!(res=val_str(&tmp)) ||
- str_to_datetime_with_warn(res->charset(), res->ptr(), res->length(),
- ltime, fuzzydate))
- return null_value|= make_zero_date(ltime, fuzzydate);
- return null_value= false;
+ double value= val_real();
+ return null_value || double_to_datetime_with_warn(thd, value,
+ ltime, fuzzydate,
+ field_table_or_null(),
+ field_name_or_null());
}
-bool Item::make_zero_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item::get_date_from_string(THD *thd, MYSQL_TIME *to, date_mode_t mode)
{
- /*
- if the item was not null and conversion failed, we return a zero date
- if allowed, otherwise - null.
- */
- bzero((char*) ltime,sizeof(*ltime));
- if (fuzzydate & TIME_TIME_ONLY)
- {
- /*
- In the following scenario:
- - The caller expected to get a TIME value
- - Item returned a not NULL string or numeric value
- - But then conversion from string or number to TIME failed
- we need to change the default time_type from MYSQL_TIMESTAMP_DATE
- (which was set in bzero) to MYSQL_TIMESTAMP_TIME and therefore
- return TIME'00:00:00' rather than DATE'0000-00-00'.
- If we don't do this, methods like Item::get_time_with_conversion()
- will erroneously subtract CURRENT_DATE from '0000-00-00 00:00:00'
- and return TIME'-838:59:59' instead of TIME'00:00:00' as a result.
- */
- ltime->time_type= MYSQL_TIMESTAMP_TIME;
- }
- return !(fuzzydate & TIME_FUZZY_DATES);
+ StringBuffer<40> tmp;
+ const TABLE_SHARE *s = field_table_or_null();
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name_or_null(), to, mode);
+ Temporal_hybrid *t= new(to) Temporal_hybrid(thd, &warn, val_str(&tmp), mode);
+ return !t->is_valid_temporal();
}
-bool Item::get_seconds(ulonglong *sec, ulong *sec_part)
-{
- if (decimals == 0)
- { // optimize for an important special case
- longlong val= val_int();
- bool neg= val < 0 && !unsigned_flag;
- *sec= neg ? -val : val;
- *sec_part= 0;
- return neg;
- }
- my_decimal tmp, *dec= val_decimal(&tmp);
- if (!dec)
- return 0;
- return my_decimal2seconds(dec, sec, sec_part);
-}
const MY_LOCALE *Item::locale_from_val_str()
{
@@ -1773,7 +1572,7 @@ Query_fragment::Query_fragment(THD *thd, sp_head *sphead,
*****************************************************************************/
Item_sp_variable::Item_sp_variable(THD *thd, const LEX_CSTRING *sp_var_name)
- :Item(thd), m_thd(0), m_name(*sp_var_name)
+ :Item_fixed_hybrid(thd), m_thd(0), m_name(*sp_var_name)
#ifndef DBUG_OFF
, m_sp(0)
#endif
@@ -1785,7 +1584,7 @@ bool Item_sp_variable::fix_fields_from_item(THD *thd, Item **, const Item *it)
{
m_thd= thd; /* NOTE: this must be set before any this_xxx() */
- DBUG_ASSERT(it->fixed);
+ DBUG_ASSERT(it->is_fixed());
max_length= it->max_length;
decimals= it->decimals;
@@ -1856,6 +1655,12 @@ String *Item_sp_variable::val_str(String *sp)
}
+bool Item_sp_variable::val_native(THD *thd, Native *to)
+{
+ return val_native_from_item(thd, this_item(), to);
+}
+
+
my_decimal *Item_sp_variable::val_decimal(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed);
@@ -1866,11 +1671,11 @@ my_decimal *Item_sp_variable::val_decimal(my_decimal *decimal_value)
}
-bool Item_sp_variable::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_sp_variable::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed);
Item *it= this_item();
- bool val= it->get_date(ltime, fuzzydate);
+ bool val= it->get_date(thd, ltime, fuzzydate);
null_value= it->null_value;
return val;
}
@@ -1906,10 +1711,10 @@ Item_splocal::Item_splocal(THD *thd,
Rewritable_query_parameter(pos_in_q, len_in_q),
Type_handler_hybrid_field_type(handler),
m_rcontext_handler(rh),
- m_var_idx(sp_var_idx)
+ m_var_idx(sp_var_idx),
+ m_type(handler == &type_handler_row ? ROW_ITEM : CONST_ITEM)
{
maybe_null= TRUE;
- m_type= sp_map_item_type(handler);
}
@@ -2247,14 +2052,19 @@ my_decimal *Item_name_const::val_decimal(my_decimal *decimal_value)
return val;
}
-bool Item_name_const::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_name_const::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed);
- bool rc= value_item->get_date(ltime, fuzzydate);
+ bool rc= value_item->get_date(thd, ltime, fuzzydate);
null_value= value_item->null_value;
return rc;
}
+bool Item_name_const::val_native(THD *thd, Native *to)
+{
+ return val_native_from_item(thd, value_item, to);
+}
+
bool Item_name_const::is_null()
{
return value_item->is_null();
@@ -2262,58 +2072,30 @@ bool Item_name_const::is_null()
Item_name_const::Item_name_const(THD *thd, Item *name_arg, Item *val):
- Item(thd), value_item(val), name_item(name_arg)
+ Item_fixed_hybrid(thd), value_item(val), name_item(name_arg)
{
StringBuffer<128> name_buffer;
String *name_str;
Item::maybe_null= TRUE;
- valid_args= true;
- if (!name_item->basic_const_item() ||
- !(name_str= name_item->val_str(&name_buffer))) // Can't have a NULL name
- goto err;
- set_name(thd, name_str->ptr(), name_str->length(), name_str->charset());
-
- if (value_item->basic_const_item())
- return; // ok
-
- if (value_item->type() == FUNC_ITEM)
- {
- Item_func *value_func= (Item_func *) value_item;
- if (value_func->functype() != Item_func::COLLATE_FUNC &&
- value_func->functype() != Item_func::NEG_FUNC)
- goto err;
-
- if (value_func->key_item()->basic_const_item())
- return; // ok
- }
-
-err:
- valid_args= false;
- my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST");
+ if (name_item->basic_const_item() &&
+ (name_str= name_item->val_str(&name_buffer))) // Can't have a NULL name
+ set_name(thd, name_str->ptr(), name_str->length(), name_str->charset());
}
Item::Type Item_name_const::type() const
{
/*
- As
- 1. one can try to create the Item_name_const passing non-constant
- arguments, although it's incorrect and
- 2. the type() method can be called before the fix_fields() to get
- type information for a further type cast, e.g.
- if (item->type() == FIELD_ITEM)
- ((Item_field *) item)->...
- we return NULL_ITEM in the case to avoid wrong casting.
-
- valid_args guarantees value_item->basic_const_item(); if type is
- FUNC_ITEM, then we have a fudged item_func_neg() on our hands
- and return the underlying type.
+
+ We are guarenteed that value_item->basic_const_item(), if not
+ an error is thrown that WRONG ARGUMENTS are supplied to
+ NAME_CONST function.
+ If type is FUNC_ITEM, then we have a fudged item_func_neg()
+ on our hands and return the underlying type.
For Item_func_set_collation()
e.g. NAME_CONST('name', 'value' COLLATE collation) we return its
'value' argument type.
*/
- if (!valid_args)
- return NULL_ITEM;
Item::Type value_type= value_item->type();
if (value_type == FUNC_ITEM)
{
@@ -2333,10 +2115,8 @@ Item::Type Item_name_const::type() const
bool Item_name_const::fix_fields(THD *thd, Item **ref)
{
- if ((!value_item->fixed &&
- value_item->fix_fields(thd, &value_item)) ||
- (!name_item->fixed &&
- name_item->fix_fields(thd, &name_item)) ||
+ if (value_item->fix_fields_if_needed(thd, &value_item) ||
+ name_item->fix_fields_if_needed(thd, &name_item) ||
!value_item->const_item() ||
!name_item->const_item())
{
@@ -2447,7 +2227,7 @@ void Item::split_sum_func2(THD *thd, Ref_ptr_array ref_pointer_array,
else
{
/* Not a SUM() function */
- if (unlikely((!with_sum_func && !(split_flags & SPLIT_SUM_SELECT))))
+ if (unlikely((!with_sum_func() && !(split_flags & SPLIT_SUM_SELECT))))
{
/*
This is not a SUM function and there are no SUM functions inside.
@@ -2455,7 +2235,7 @@ void Item::split_sum_func2(THD *thd, Ref_ptr_array ref_pointer_array,
*/
return;
}
- if (likely(with_sum_func ||
+ if (likely(with_sum_func() ||
(type() == FUNC_ITEM &&
(((Item_func *) this)->functype() ==
Item_func::ISNOTNULLTEST_FUNC ||
@@ -2808,7 +2588,7 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
thd->change_item_tree(arg, conv);
- if (conv->fix_fields(thd, arg))
+ if (conv->fix_fields_if_needed(thd, arg))
{
res= TRUE;
break; // we cannot return here, we need to restore "arena".
@@ -2873,9 +2653,7 @@ Item_sp::Item_sp(THD *thd, Name_resolution_context *context_arg,
dummy_table= (TABLE*) thd->calloc(sizeof(TABLE) + sizeof(TABLE_SHARE) +
sizeof(Query_arena));
dummy_table->s= (TABLE_SHARE*) (dummy_table + 1);
- /* TODO(cvicentiu) Move this sp_query_arena in the class as a direct member.
- Currently it can not be done due to header include dependencies. */
- sp_query_arena= (Query_arena *) (dummy_table->s + 1);
+ sp_query_arena= new(dummy_table->s + 1) Query_arena();
memset(&sp_mem_root, 0, sizeof(sp_mem_root));
}
@@ -2886,7 +2664,7 @@ Item_sp::Item_sp(THD *thd, Item_sp *item):
dummy_table= (TABLE*) thd->calloc(sizeof(TABLE)+ sizeof(TABLE_SHARE) +
sizeof(Query_arena));
dummy_table->s= (TABLE_SHARE*) (dummy_table+1);
- sp_query_arena= (Query_arena *) (dummy_table->s + 1);
+ sp_query_arena= new(dummy_table->s + 1) Query_arena();
memset(&sp_mem_root, 0, sizeof(sp_mem_root));
}
@@ -2975,7 +2753,7 @@ bool Item_sp::execute(THD *thd, bool *null_value, Item **args, uint arg_count)
if (unlikely(execute_impl(thd, args, arg_count)))
{
*null_value= 1;
- context->process_error(thd);
+ process_error(thd);
if (thd->killed)
thd->send_kill_message();
return true;
@@ -3008,7 +2786,7 @@ Item_sp::execute_impl(THD *thd, Item **args, uint arg_count)
DBUG_ENTER("Item_sp::execute_impl");
- if (context->security_ctx)
+ if (context && context->security_ctx)
{
/* Set view definer security context */
thd->security_ctx= context->security_ctx;
@@ -3167,18 +2945,6 @@ Item* Item_ref::build_clone(THD *thd)
}
-void Item_ident_for_show::make_send_field(THD *thd, Send_field *tmp_field)
-{
- tmp_field->table_name= tmp_field->org_table_name= table_name;
- tmp_field->db_name= db_name;
- tmp_field->col_name= tmp_field->org_col_name= field->field_name;
- tmp_field->length=field->field_length;
- tmp_field->type=field->type();
- tmp_field->flags= field->table->maybe_null ?
- (field->flags & ~NOT_NULL_FLAG) : field->flags;
- tmp_field->decimals= field->decimals();
-}
-
/**********************************************/
Item_field::Item_field(THD *thd, Field *f)
@@ -3187,7 +2953,10 @@ Item_field::Item_field(THD *thd, Field *f)
have_privileges(0), any_privileges(0)
{
set_field(f);
-
+ /*
+ field_name and table_name should not point to garbage
+ if this item is to be reused
+ */
orig_table_name= table_name;
orig_field_name= field_name;
with_field= 1;
@@ -3504,7 +3273,7 @@ String *Item_field::str_result(String *str)
return result_field->val_str(str,&str_value);
}
-bool Item_field::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Item_field::get_date(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate)
{
if ((null_value=field->is_null()) || field->get_date(ltime,fuzzydate))
{
@@ -3514,7 +3283,7 @@ bool Item_field::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
return 0;
}
-bool Item_field::get_date_result(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_field::get_date_result(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if ((null_value= result_field->is_null()) ||
result_field->get_date(ltime, fuzzydate))
@@ -3526,6 +3295,36 @@ bool Item_field::get_date_result(MYSQL_TIME *ltime, ulonglong fuzzydate)
}
+bool Item_field::val_native(THD *thd, Native *to)
+{
+ return val_native_from_field(field, to);
+}
+
+
+bool Item_field::val_native_result(THD *thd, Native *to)
+{
+ return val_native_from_field(result_field, to);
+}
+
+
+longlong Item_field::val_datetime_packed(THD *thd)
+{
+ DBUG_ASSERT(fixed == 1);
+ if ((null_value= field->is_null()))
+ return 0;
+ return field->val_datetime_packed(thd);
+}
+
+
+longlong Item_field::val_time_packed(THD *thd)
+{
+ DBUG_ASSERT(fixed == 1);
+ if ((null_value= field->is_null()))
+ return 0;
+ return field->val_time_packed(thd);
+}
+
+
void Item_field::save_result(Field *to)
{
save_field_in_field(result_field, &null_value, to, TRUE);
@@ -3724,6 +3523,60 @@ longlong Item_field::val_int_endpoint(bool left_endp, bool *incl_endp)
return null_value? LONGLONG_MIN : res;
}
+
+bool Item_basic_value::eq(const Item *item, bool binary_cmp) const
+{
+ const Item_const *c0, *c1;
+ const Type_handler *h0, *h1;
+ /*
+ - Test get_item_const() for NULL filters out Item_param
+ bound in a way that needs a data type conversion
+ (e.g. non-integer value in a LIMIT clause).
+ Item_param::get_item_const() return NULL in such cases.
+ - Test for type_handler_for_comparison() equality makes sure
+ that values of different data type groups do not get detected
+ as equal (e.g. numbers vs strings, time vs datetime).
+ - Test for cast_to_int_type_handler() equality distinguishes
+ values with dual properties. For example, VARCHAR 'abc' and hex
+ hybrid 0x616263 are equal in string context, but they are not equal
+ if the hybrid appears in integer context (it behaves as integer then).
+ Here we have no full information about the context, so treat them
+ as not equal.
+ QQ: We could pass Value_source::Context here instead of
+ "bool binary_cmp", to make substitution more delicate.
+ See Field::get_equal_const_item().
+ */
+ bool res= (c0= get_item_const()) &&
+ (c1= item->get_item_const()) &&
+ (h0= type_handler())->type_handler_for_comparison() ==
+ (h1= item->type_handler())->type_handler_for_comparison() &&
+ h0->cast_to_int_type_handler()->type_handler_for_comparison() ==
+ h1->cast_to_int_type_handler()->type_handler_for_comparison();
+ if (res)
+ {
+ switch (c0->const_is_null() + c1->const_is_null()) {
+ case 2: // Two NULLs
+ res= true;
+ break;
+ case 1: // NULL and non-NULL
+ res= false;
+ break;
+ case 0: // Two non-NULLs
+ res= h0->Item_const_eq(c0, c1, binary_cmp);
+ }
+ }
+ DBUG_EXECUTE_IF("Item_basic_value",
+ push_warning_printf(current_thd,
+ Sql_condition::WARN_LEVEL_NOTE,
+ ER_UNKNOWN_ERROR, "%seq=%d a=%s b=%s",
+ binary_cmp ? "bin_" : "", (int) res,
+ DbugStringItemTypeValue(current_thd, this).c_ptr(),
+ DbugStringItemTypeValue(current_thd, item).c_ptr()
+ ););
+ return res;
+}
+
+
/**
Create an item from a string we KNOW points to a valid longlong
end \\0 terminated number string.
@@ -3743,7 +3596,6 @@ Item_int::Item_int(THD *thd, const char *str_arg, size_t length):
the field name.
*/
name.length= !str_arg[max_length] ? max_length : strlen(str_arg);
- fixed= 1;
}
@@ -3755,8 +3607,6 @@ my_decimal *Item_int::val_decimal(my_decimal *decimal_value)
String *Item_int::val_str(String *str)
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
str->set_int(value, unsigned_flag, collation.collation);
return str;
}
@@ -3793,8 +3643,6 @@ Item_uint::Item_uint(THD *thd, const char *str_arg, longlong i, uint length):
String *Item_uint::val_str(String *str)
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
str->set((ulonglong) value, collation.collation);
return str;
}
@@ -3816,7 +3664,6 @@ Item_decimal::Item_decimal(THD *thd, const char *str_arg, size_t length,
name.str= str_arg;
name.length= safe_strlen(str_arg);
decimals= (uint8) decimal_value.frac;
- fixed= 1;
max_length= my_decimal_precision_to_length_no_truncation(decimal_value.intg +
decimals,
decimals,
@@ -3828,7 +3675,6 @@ Item_decimal::Item_decimal(THD *thd, longlong val, bool unsig):
{
int2my_decimal(E_DEC_FATAL_ERROR, val, unsig, &decimal_value);
decimals= (uint8) decimal_value.frac;
- fixed= 1;
max_length= my_decimal_precision_to_length_no_truncation(decimal_value.intg +
decimals,
decimals,
@@ -3841,7 +3687,6 @@ Item_decimal::Item_decimal(THD *thd, double val, int precision, int scale):
{
double2my_decimal(E_DEC_FATAL_ERROR, val, &decimal_value);
decimals= (uint8) decimal_value.frac;
- fixed= 1;
max_length= my_decimal_precision_to_length_no_truncation(decimal_value.intg +
decimals,
decimals,
@@ -3858,16 +3703,14 @@ Item_decimal::Item_decimal(THD *thd, const char *str, const my_decimal *val_arg,
name.length= safe_strlen(str);
decimals= (uint8) decimal_par;
max_length= length;
- fixed= 1;
}
-Item_decimal::Item_decimal(THD *thd, my_decimal *value_par):
+Item_decimal::Item_decimal(THD *thd, const my_decimal *value_par):
Item_num(thd)
{
my_decimal2decimal(value_par, &decimal_value);
decimals= (uint8) decimal_value.frac;
- fixed= 1;
max_length= my_decimal_precision_to_length_no_truncation(decimal_value.intg +
decimals,
decimals,
@@ -3876,63 +3719,15 @@ Item_decimal::Item_decimal(THD *thd, my_decimal *value_par):
Item_decimal::Item_decimal(THD *thd, const uchar *bin, int precision, int scale):
- Item_num(thd)
+ Item_num(thd),
+ decimal_value(bin, precision, scale)
{
- binary2my_decimal(E_DEC_FATAL_ERROR, bin,
- &decimal_value, precision, scale);
decimals= (uint8) decimal_value.frac;
- fixed= 1;
max_length= my_decimal_precision_to_length_no_truncation(precision, decimals,
unsigned_flag);
}
-longlong Item_decimal::val_int()
-{
- longlong result;
- my_decimal2int(E_DEC_FATAL_ERROR, &decimal_value, unsigned_flag, &result);
- return result;
-}
-
-double Item_decimal::val_real()
-{
- double result;
- my_decimal2double(E_DEC_FATAL_ERROR, &decimal_value, &result);
- return result;
-}
-
-String *Item_decimal::val_str(String *result)
-{
- result->set_charset(&my_charset_numeric);
- my_decimal2string(E_DEC_FATAL_ERROR, &decimal_value, 0, 0, 0, result);
- return result;
-}
-
-void Item_decimal::print(String *str, enum_query_type query_type)
-{
- my_decimal2string(E_DEC_FATAL_ERROR, &decimal_value, 0, 0, 0, &str_value);
- str->append(str_value);
-}
-
-
-bool Item_decimal::eq(const Item *item, bool binary_cmp) const
-{
- if (type() == item->type() && item->basic_const_item())
- {
- /*
- We need to cast off const to call val_decimal(). This should
- be OK for a basic constant. Additionally, we can pass 0 as
- a true decimal constant will return its internal decimal
- storage and ignore the argument.
- */
- Item *arg= (Item*) item;
- my_decimal *value= arg->val_decimal(0);
- return !my_decimal_cmp(&decimal_value, value);
- }
- return 0;
-}
-
-
void Item_decimal::set_decimal_value(my_decimal *value_par)
{
my_decimal2decimal(value_par, &decimal_value);
@@ -3954,8 +3749,6 @@ Item *Item_decimal::clone_item(THD *thd)
String *Item_float::val_str(String *str)
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
str->set_real(value, decimals, &my_charset_numeric);
return str;
}
@@ -3963,8 +3756,6 @@ String *Item_float::val_str(String *str)
my_decimal *Item_float::val_decimal(my_decimal *decimal_value)
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
double2my_decimal(E_DEC_FATAL_ERROR, value, decimal_value);
return (decimal_value);
}
@@ -4065,7 +3856,6 @@ void Item_string::print(String *str, enum_query_type query_type)
double Item_string::val_real()
{
- DBUG_ASSERT(fixed == 1);
return double_from_string_with_check(&str_value);
}
@@ -4076,7 +3866,6 @@ double Item_string::val_real()
*/
longlong Item_string::val_int()
{
- DBUG_ASSERT(fixed == 1);
return longlong_from_string_with_check(&str_value);
}
@@ -4089,23 +3878,17 @@ my_decimal *Item_string::val_decimal(my_decimal *decimal_value)
double Item_null::val_real()
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
null_value=1;
return 0.0;
}
longlong Item_null::val_int()
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
null_value=1;
return 0;
}
/* ARGSUSED */
String *Item_null::val_str(String *str)
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
null_value=1;
return 0;
}
@@ -4116,25 +3899,23 @@ my_decimal *Item_null::val_decimal(my_decimal *decimal_value)
}
-longlong Item_null::val_datetime_packed()
+longlong Item_null::val_datetime_packed(THD *)
{
null_value= true;
return 0;
}
-longlong Item_null::val_time_packed()
+longlong Item_null::val_time_packed(THD *)
{
null_value= true;
return 0;
}
-bool Item_null::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_null::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
- make_zero_date(ltime, fuzzydate);
+ set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
return (null_value= true);
}
@@ -4183,8 +3964,6 @@ Item_param::Item_param(THD *thd, const LEX_CSTRING *name_arg,
*/
Type_handler_hybrid_field_type(&type_handler_null),
state(NO_VALUE),
- /* Don't pretend to be a literal unless value for this item is set. */
- item_type(PARAM_ITEM),
m_empty_string_is_null(false),
indicator(STMT_INDICATOR_NONE),
m_out_param_info(NULL),
@@ -4243,7 +4022,6 @@ void Item_param::sync_clones()
c->Type_geometry_attributes::operator=(*this);
c->state= state;
- c->item_type= item_type;
c->m_empty_string_is_null= m_empty_string_is_null;
c->value.PValue_simple::operator=(value);
@@ -4278,7 +4056,6 @@ void Item_param::set_null()
max_length= 0;
decimals= 0;
state= NULL_VALUE;
- fix_type(Item::NULL_ITEM);
DBUG_VOID_RETURN;
}
@@ -4293,7 +4070,6 @@ void Item_param::set_int(longlong i, uint32 max_length_arg)
decimals= 0;
maybe_null= 0;
null_value= 0;
- fix_type(Item::INT_ITEM);
DBUG_VOID_RETURN;
}
@@ -4308,7 +4084,6 @@ void Item_param::set_double(double d)
decimals= NOT_FIXED_DEC;
maybe_null= 0;
null_value= 0;
- fix_type(Item::REAL_ITEM);
DBUG_VOID_RETURN;
}
@@ -4341,7 +4116,6 @@ void Item_param::set_decimal(const char *str, ulong length)
decimals, unsigned_flag);
maybe_null= 0;
null_value= 0;
- fix_type(Item::DECIMAL_ITEM);
DBUG_VOID_RETURN;
}
@@ -4359,7 +4133,6 @@ void Item_param::set_decimal(const my_decimal *dv, bool unsigned_arg)
decimals, unsigned_flag);
maybe_null= 0;
null_value= 0;
- fix_type(Item::DECIMAL_ITEM);
}
@@ -4371,7 +4144,6 @@ void Item_param::fix_temporal(uint32 max_length_arg, uint decimals_arg)
decimals= decimals_arg;
maybe_null= 0;
null_value= 0;
- fix_type(Item::DATE_ITEM);
}
@@ -4456,7 +4228,6 @@ bool Item_param::set_str(const char *str, ulong length,
null_value= 0;
/* max_length and decimals are set after charset conversion */
/* sic: str may be not null-terminated, don't add DBUG_PRINT here */
- fix_type(Item::STRING_ITEM);
DBUG_RETURN(FALSE);
}
@@ -4490,7 +4261,6 @@ bool Item_param::set_longdata(const char *str, ulong length)
state= LONG_DATA_VALUE;
maybe_null= 0;
null_value= 0;
- fix_type(Item::STRING_ITEM);
DBUG_RETURN(FALSE);
}
@@ -4554,7 +4324,7 @@ bool Item_param::set_from_item(THD *thd, Item *item)
}
}
struct st_value tmp;
- if (!item->save_in_value(&tmp))
+ if (!item->save_in_value(thd, &tmp))
{
const Type_handler *h= item->type_handler();
set_handler(h);
@@ -4592,16 +4362,6 @@ void Item_param::reset()
state= NO_VALUE;
maybe_null= 1;
null_value= 0;
- fixed= false;
- /*
- Don't reset item_type to PARAM_ITEM: it's only needed to guard
- us from item optimizations at prepare stage, when item doesn't yet
- contain a literal of some kind.
- In all other cases when this object is accessed its value is
- set (this assumption is guarded by 'state' and
- DBUG_ASSERTS(state != NO_VALUE) in all Item_param::get_*
- methods).
- */
DBUG_VOID_RETURN;
}
@@ -4684,7 +4444,7 @@ void Item_param::invalid_default_param() const
}
-bool Item_param::get_date(MYSQL_TIME *res, ulonglong fuzzydate)
+bool Item_param::get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate)
{
/*
LIMIT clause parameter should not call get_date()
@@ -4698,7 +4458,7 @@ bool Item_param::get_date(MYSQL_TIME *res, ulonglong fuzzydate)
*res= value.time;
return 0;
}
- return type_handler()->Item_get_date(this, res, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, res, fuzzydate);
}
@@ -4712,11 +4472,7 @@ double Item_param::PValue::val_real(const Type_std_attributes *attr) const
? (double) (ulonglong) integer
: (double) integer;
case DECIMAL_RESULT:
- {
- double result;
- my_decimal2double(E_DEC_FATAL_ERROR, &m_decimal, &result);
- return result;
- }
+ return m_decimal.to_double();
case STRING_RESULT:
return double_from_string_with_check(&m_string);
case TIME_RESULT:
@@ -4741,11 +4497,7 @@ longlong Item_param::PValue::val_int(const Type_std_attributes *attr) const
case INT_RESULT:
return integer;
case DECIMAL_RESULT:
- {
- longlong i;
- my_decimal2int(E_DEC_FATAL_ERROR, &m_decimal, attr->unsigned_flag, &i);
- return i;
- }
+ return m_decimal.to_longlong(attr->unsigned_flag);
case STRING_RESULT:
return longlong_from_string_with_check(&m_string);
case TIME_RESULT:
@@ -4795,7 +4547,7 @@ String *Item_param::PValue::val_str(String *str,
str->set_int(integer, attr->unsigned_flag, &my_charset_bin);
return str;
case DECIMAL_RESULT:
- if (my_decimal2string(E_DEC_FATAL_ERROR, &m_decimal, 0, 0, 0, str) <= 1)
+ if (m_decimal.to_string_native(str, 0, 0, 0) <= 1)
return str;
return NULL;
case TIME_RESULT:
@@ -4836,8 +4588,7 @@ const String *Item_param::value_query_val_str(THD *thd, String *str) const
str->set_real(value.real, NOT_FIXED_DEC, &my_charset_bin);
return str;
case DECIMAL_RESULT:
- if (my_decimal2string(E_DEC_FATAL_ERROR, &value.m_decimal,
- 0, 0, 0, str) > 1)
+ if (value.m_decimal.to_string_native(str, 0, 0, 0) > 1)
return &my_null_string;
return str;
case TIME_RESULT:
@@ -4942,11 +4693,20 @@ bool Item_param::convert_str_value(THD *thd)
bool Item_param::basic_const_item() const
{
- DBUG_ASSERT(fixed || state == NO_VALUE);
- if (state == NO_VALUE ||
- (state == SHORT_DATA_VALUE && type_handler()->cmp_type() == TIME_RESULT))
- return FALSE;
- return TRUE;
+ switch (state) {
+ case LONG_DATA_VALUE:
+ case NULL_VALUE:
+ return true;
+ case SHORT_DATA_VALUE:
+ return type_handler()->cmp_type() != TIME_RESULT;
+ case DEFAULT_VALUE:
+ case IGNORE_VALUE:
+ invalid_default_param();
+ return false;
+ case NO_VALUE:
+ break;
+ }
+ return false;
}
@@ -5007,48 +4767,6 @@ Item_param::clone_item(THD *thd)
}
-bool Item_param::value_eq(const Item *item, bool binary_cmp) const
-{
- switch (value.type_handler()->cmp_type()) {
- case INT_RESULT:
- return int_eq(value.integer, item);
- case REAL_RESULT:
- return real_eq(value.real, item);
- case STRING_RESULT:
- return str_eq(&value.m_string, item, binary_cmp);
- case DECIMAL_RESULT:
- case TIME_RESULT:
- case ROW_RESULT:
- break;
- }
- return false;
-}
-
-
-bool
-Item_param::eq(const Item *item, bool binary_cmp) const
-{
- if (!basic_const_item())
- return FALSE;
-
- // There's no "default". See comments in Item_param::save_in_field().
- switch (state) {
- case IGNORE_VALUE:
- case DEFAULT_VALUE:
- invalid_default_param();
- return false;
- case NULL_VALUE:
- return null_eq(item);
- case SHORT_DATA_VALUE:
- case LONG_DATA_VALUE:
- return value_eq(item, binary_cmp);
- case NO_VALUE:
- return false;
- }
- DBUG_ASSERT(0); // Garbage
- return FALSE;
-}
-
/* End of Item_param related */
void Item_param::print(String *str, enum_query_type query_type)
@@ -5102,12 +4820,10 @@ Item_param::set_param_type_and_swap_value(Item_param *src)
{
Type_std_attributes::set(src);
set_handler(src->type_handler());
- item_type= src->item_type;
maybe_null= src->maybe_null;
null_value= src->null_value;
state= src->state;
- fixed= src->fixed;
value.swap(src->value);
}
@@ -5117,7 +4833,6 @@ void Item_param::set_default()
{
m_is_settable_routine_parameter= false;
state= DEFAULT_VALUE;
- fixed= true;
/*
When Item_param is set to DEFAULT_VALUE:
- its val_str() and val_decimal() return NULL
@@ -5133,7 +4848,6 @@ void Item_param::set_ignore()
{
m_is_settable_routine_parameter= false;
state= IGNORE_VALUE;
- fixed= true;
null_value= true;
}
@@ -5162,7 +4876,7 @@ Item_param::set_value(THD *thd, sp_rcontext *ctx, Item **it)
correctly fetches the value from the client-server protocol,
using set_param_func().
*/
- if (arg->save_in_value(&tmp) ||
+ if (arg->save_in_value(thd, &tmp) ||
set_value(thd, arg, &tmp, arg->type_handler()))
{
set_null();
@@ -5187,7 +4901,7 @@ void
Item_param::set_out_param_info(Send_field *info)
{
m_out_param_info= info;
- set_handler_by_field_type(m_out_param_info->type);
+ set_handler(m_out_param_info->type_handler());
}
@@ -5228,16 +4942,7 @@ void Item_param::make_send_field(THD *thd, Send_field *field)
OUT-parameter info to fill out the names.
*/
- field->db_name= m_out_param_info->db_name;
- field->table_name= m_out_param_info->table_name;
- field->org_table_name= m_out_param_info->org_table_name;
- field->col_name= m_out_param_info->col_name;
- field->org_col_name= m_out_param_info->org_col_name;
-
- field->length= m_out_param_info->length;
- field->flags= m_out_param_info->flags;
- field->decimals= m_out_param_info->decimals;
- field->type= m_out_param_info->type;
+ *field= *m_out_param_info;
}
bool Item_param::append_for_log(THD *thd, String *str)
@@ -5308,17 +5013,6 @@ my_decimal *Item_copy_string::val_decimal(my_decimal *decimal_value)
Functions to convert item to field (for send_result_set_metadata)
*/
-/* ARGSUSED */
-bool Item::fix_fields(THD *thd, Item **ref)
-{
-
- // We do not check fields which are fixed during construction
- DBUG_ASSERT(fixed == 0 || basic_const_item());
- fixed= 1;
- return FALSE;
-}
-
-
void Item_ref_null_helper::save_val(Field *to)
{
DBUG_ASSERT(fixed == 1);
@@ -5372,9 +5066,15 @@ String* Item_ref_null_helper::val_str(String* s)
}
-bool Item_ref_null_helper::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_ref_null_helper::val_native(THD *thd, Native *to)
+{
+ return (owner->was_null|= val_native_from_item(thd, *ref, to));
+}
+
+
+bool Item_ref_null_helper::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return (owner->was_null|= null_value= (*ref)->get_date_result(ltime, fuzzydate));
+ return (owner->was_null|= null_value= (*ref)->get_date_result(thd, ltime, fuzzydate));
}
@@ -5676,7 +5376,7 @@ resolve_ref_in_select_and_group(THD *thd, Item_ident *ref, SELECT_LEX *select)
ref->alias_name_used= TRUE;
/* If this is a non-aggregated field inside HAVING, search in GROUP BY. */
- if (select->having_fix_field && !ref->with_sum_func && group_list)
+ if (select->having_fix_field && !ref->with_sum_func() && group_list)
{
group_by_ref= find_field_in_group_list(ref, group_list);
@@ -5718,7 +5418,7 @@ resolve_ref_in_select_and_group(THD *thd, Item_ident *ref, SELECT_LEX *select)
ref->name.str, "forward reference in item list");
return NULL;
}
- DBUG_ASSERT((*select_ref)->fixed);
+ DBUG_ASSERT((*select_ref)->is_fixed());
return &select->ref_pointer_array[counter];
}
if (group_by_ref)
@@ -5841,8 +5541,9 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
Name_resolution_context *outer_context= 0;
SELECT_LEX *select= 0;
/* Currently derived tables cannot be correlated */
- if (current_sel->master_unit()->first_select()->linkage !=
- DERIVED_TABLE_TYPE)
+ if ((current_sel->master_unit()->first_select()->get_linkage() !=
+ DERIVED_TABLE_TYPE) &&
+ current_sel->master_unit()->outer_select())
outer_context= context->outer_context;
/*
@@ -5997,7 +5698,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
return -1; /* Some error occurred (e.g. ambiguous names). */
if (ref != not_found_item)
{
- DBUG_ASSERT(*ref && (*ref)->fixed);
+ DBUG_ASSERT(*ref && (*ref)->is_fixed());
prev_subselect_item->used_tables_and_const_cache_join(*ref);
break;
}
@@ -6039,7 +5740,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
Item_ref *rf;
/* Should have been checked in resolve_ref_in_select_and_group(). */
- DBUG_ASSERT(*ref && (*ref)->fixed);
+ DBUG_ASSERT(*ref && (*ref)->is_fixed());
/*
Here, a subset of actions performed by Item_ref::set_properties
is not enough. So we pass ptr to NULL into Item_[direct]_ref
@@ -6616,23 +6317,25 @@ Item *Item_field::replace_equal_field(THD *thd, uchar *arg)
comparison context, and it's safe to replace it to the constant from
item_equal.
*/
- DBUG_ASSERT(type_handler()->type_handler_for_comparison()->cmp_type() ==
+ DBUG_ASSERT(type_handler_for_comparison()->cmp_type() ==
item_equal->compare_type_handler()->cmp_type());
return const_item2;
}
- Item_field *subst=
- (Item_field *)(item_equal->get_first(param->context_tab, this));
+ Item_ident *subst=
+ (Item_ident *) (item_equal->get_first(param->context_tab, this));
if (subst)
- subst= (Item_field *) (subst->real_item());
- if (subst && !field->eq(subst->field))
- return subst;
+ {
+ Item_field *subst2= (Item_field *) (subst->real_item());
+ if (subst2 && !field->eq(subst2->field))
+ return subst2;
+ }
}
return this;
}
void Item::init_make_send_field(Send_field *tmp_field,
- enum enum_field_types field_type_arg)
+ const Type_handler *h)
{
tmp_field->db_name= "";
tmp_field->org_table_name= "";
@@ -6642,7 +6345,7 @@ void Item::init_make_send_field(Send_field *tmp_field,
tmp_field->flags= (maybe_null ? 0 : NOT_NULL_FLAG) |
(my_binary_compare(charset_for_protocol()) ?
BINARY_FLAG : 0);
- tmp_field->type= field_type_arg;
+ tmp_field->set_handler(h);
tmp_field->length=max_length;
tmp_field->decimals=decimals;
if (unsigned_flag)
@@ -6651,13 +6354,13 @@ void Item::init_make_send_field(Send_field *tmp_field,
void Item::make_send_field(THD *thd, Send_field *tmp_field)
{
- init_make_send_field(tmp_field, field_type());
+ init_make_send_field(tmp_field, type_handler());
}
void Item_empty_string::make_send_field(THD *thd, Send_field *tmp_field)
{
- init_make_send_field(tmp_field, string_type_handler()->field_type());
+ init_make_send_field(tmp_field, string_type_handler());
}
@@ -6988,12 +6691,11 @@ int Item::save_real_in_field(Field *field, bool no_conversions)
int Item::save_decimal_in_field(Field *field, bool no_conversions)
{
- my_decimal decimal_value;
- my_decimal *value= val_decimal(&decimal_value);
- if (null_value)
+ VDec value(this);
+ if (value.is_null())
return set_field_to_null_with_conversions(field, no_conversions);
field->set_notnull();
- return field->store_decimal(value);
+ return field->store_decimal(value.ptr());
}
@@ -7060,14 +6762,18 @@ Item_string::make_string_literal_concat(THD *thd, const LEX_CSTRING *str)
*/
Item *Item_string::make_odbc_literal(THD *thd, const LEX_CSTRING *typestr)
{
- enum_field_types type= odbc_temporal_literal_type(typestr);
- Item *res= type == MYSQL_TYPE_STRING ? this :
- create_temporal_literal(thd, val_str(NULL), type, false);
+ Item_literal *res;
+ const Type_handler *h;
+ if (collation.repertoire == MY_REPERTOIRE_ASCII &&
+ str_value.length() < MAX_DATE_STRING_REP_LENGTH * 4 &&
+ (h= Type_handler::odbc_literal_type_handler(typestr)) &&
+ (res= h->create_literal_item(thd, val_str(NULL), false)))
+ return res;
/*
- create_temporal_literal() returns NULL if failed to parse the string,
+ h->create_literal_item() returns NULL if failed to parse the string,
or the string format did not match the type, e.g.: {d'2001-01-01 10:10:10'}
*/
- return res ? res : this;
+ return this;
}
@@ -7270,7 +6976,6 @@ Item_float::Item_float(THD *thd, const char *str_arg, size_t length):
name.length= strlen(str_arg);
decimals=(uint8) nr_of_decimals(str_arg, str_arg+length);
max_length=(uint32)length;
- fixed= 1;
}
@@ -7326,7 +7031,6 @@ void Item_hex_constant::hex_string_init(THD *thd, const char *str, size_t str_le
}
*ptr=0; // Keep purify happy
collation.set(&my_charset_bin, DERIVATION_COERCIBLE);
- fixed= 1;
unsigned_flag= 1;
}
@@ -7405,24 +7109,14 @@ Item_bin_string::Item_bin_string(THD *thd, const char *str, size_t str_length):
ptr[0]= 0;
collation.set(&my_charset_bin, DERIVATION_COERCIBLE);
- fixed= 1;
}
-bool Item_temporal_literal::eq(const Item *item, bool binary_cmp) const
-{
- return
- item->basic_const_item() && type() == item->type() &&
- field_type() == ((Item_temporal_literal *) item)->field_type() &&
- !my_time_compare(&cached_time,
- &((Item_temporal_literal *) item)->cached_time);
-}
-
void Item_date_literal::print(String *str, enum_query_type query_type)
{
str->append("DATE'");
char buf[MAX_DATE_STRING_REP_LENGTH];
- my_date_to_str(&cached_time, buf);
+ my_date_to_str(cached_time.get_mysql_time(), buf);
str->append(buf);
str->append('\'');
}
@@ -7434,12 +7128,11 @@ Item *Item_date_literal::clone_item(THD *thd)
}
-bool Item_date_literal::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_date_literal::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- DBUG_ASSERT(fixed);
- fuzzy_date |= sql_mode_for_dates(current_thd);
- *ltime= cached_time;
- return (null_value= check_date_with_warn(ltime, fuzzy_date,
+ fuzzydate |= sql_mode_for_dates(thd);
+ cached_time.copy_to_mysql_time(ltime);
+ return (null_value= check_date_with_warn(thd, ltime, fuzzydate,
MYSQL_TIMESTAMP_ERROR));
}
@@ -7448,7 +7141,7 @@ void Item_datetime_literal::print(String *str, enum_query_type query_type)
{
str->append("TIMESTAMP'");
char buf[MAX_DATE_STRING_REP_LENGTH];
- my_datetime_to_str(&cached_time, buf, decimals);
+ my_datetime_to_str(cached_time.get_mysql_time(), buf, decimals);
str->append(buf);
str->append('\'');
}
@@ -7460,12 +7153,11 @@ Item *Item_datetime_literal::clone_item(THD *thd)
}
-bool Item_datetime_literal::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_datetime_literal::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- DBUG_ASSERT(fixed);
- fuzzy_date |= sql_mode_for_dates(current_thd);
- *ltime= cached_time;
- return (null_value= check_date_with_warn(ltime, fuzzy_date,
+ fuzzydate |= sql_mode_for_dates(thd);
+ cached_time.copy_to_mysql_time(ltime);
+ return (null_value= check_date_with_warn(thd, ltime, fuzzydate,
MYSQL_TIMESTAMP_ERROR));
}
@@ -7474,7 +7166,7 @@ void Item_time_literal::print(String *str, enum_query_type query_type)
{
str->append("TIME'");
char buf[MAX_DATE_STRING_REP_LENGTH];
- my_time_to_str(&cached_time, buf, decimals);
+ my_time_to_str(cached_time.get_mysql_time(), buf, decimals);
str->append(buf);
str->append('\'');
}
@@ -7486,13 +7178,12 @@ Item *Item_time_literal::clone_item(THD *thd)
}
-bool Item_time_literal::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_time_literal::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- DBUG_ASSERT(fixed);
- *ltime= cached_time;
- if (fuzzy_date & TIME_TIME_ONLY)
+ cached_time.copy_to_mysql_time(ltime);
+ if (fuzzydate & TIME_TIME_ONLY)
return (null_value= false);
- return (null_value= check_date_with_warn(ltime, fuzzy_date,
+ return (null_value= check_date_with_warn(thd, ltime, fuzzydate,
MYSQL_TIMESTAMP_ERROR));
}
@@ -7608,7 +7299,7 @@ void Item_field::update_null_value()
no_errors= thd->no_errors;
thd->no_errors= 1;
- Item::update_null_value();
+ type_handler()->Item_update_null_value(this);
thd->no_errors= no_errors;
}
@@ -7659,6 +7350,198 @@ Item *Item_field::update_value_transformer(THD *thd, uchar *select_arg)
}
+/**
+ @brief
+ Prepare AND/OR formula for extraction of a pushable condition
+
+ @param checker the checker callback function to be applied to the nodes
+ of the tree of the object
+ @param arg parameter to be passed to the checker
+
+ @details
+ This method recursively traverses this AND/OR condition and for each
+ subformula of the condition it checks whether it can be usable for the
+ extraction of a pushable condition. The criteria of pushability of
+ a subformula is checked by the callback function 'checker' with one
+ parameter arg. The subformulas that are not usable are marked with
+ the flag NO_EXTRACTION_FL.
+ @note
+ This method is called before any call of build_pushable_cond.
+ The flag NO_EXTRACTION_FL set in a subformula allows to avoid building
+ clones for the subformulas that are not used in the pushable condition.
+ @note
+ This method is called for pushdown conditions into materialized
+ derived tables/views optimization.
+ Item::pushable_cond_checker_for_derived() is passed as the actual callback
+ function.
+ Also it is called for pushdown conditions in materialized IN subqueries.
+ Item::pushable_cond_checker_for_subquery is passed as the actual
+ callback function.
+*/
+
+void Item::check_pushable_cond(Pushdown_checker checker, uchar *arg)
+{
+ clear_extraction_flag();
+ if (type() == Item::COND_ITEM)
+ {
+ bool and_cond= ((Item_cond*) this)->functype() == Item_func::COND_AND_FUNC;
+ List_iterator<Item> li(*((Item_cond*) this)->argument_list());
+ uint count= 0;
+ Item *item;
+ while ((item=li++))
+ {
+ item->check_pushable_cond(checker, arg);
+ if (item->get_extraction_flag() != NO_EXTRACTION_FL)
+ count++;
+ else if (!and_cond)
+ break;
+ }
+ if ((and_cond && count == 0) || item)
+ {
+ set_extraction_flag(NO_EXTRACTION_FL);
+ if (and_cond)
+ li.rewind();
+ while ((item= li++))
+ item->clear_extraction_flag();
+ }
+ }
+ else if (!((this->*checker) (arg)))
+ set_extraction_flag(NO_EXTRACTION_FL);
+}
+
+
+/**
+ @brief
+ Build condition extractable from this condition for pushdown
+
+ @param thd the thread handle
+ @param checker the checker callback function to be applied to the nodes
+ of the tree of the object to check if multiple equality
+ elements can be used to create equalities
+ @param arg parameter to be passed to the checker
+
+ @details
+ This method finds out what condition that can be pushed down can be
+ extracted from this condition. If such condition C exists the
+ method builds the item for it. The method uses the flag NO_EXTRACTION_FL
+ set by the preliminary call of the method check_pushable_cond() to figure
+ out whether a subformula is pushable or not.
+ In the case when this item is a multiple equality a checker method is
+ called to find the equal fields to build a new equality that can be
+ pushed down.
+ @note
+ The built condition C is always implied by the condition cond
+ (cond => C). The method tries to build the most restrictive such
+ condition (i.e. for any other condition C' such that cond => C'
+ we have C => C').
+ @note
+ The build item is not ready for usage: substitution for the field items
+ has to be done and it has to be re-fixed.
+ @note
+ This method is called for pushdown conditions into materialized
+ derived tables/views optimization.
+ Item::pushable_equality_checker_for_derived() is passed as the actual
+ callback function.
+ Also it is called for pushdown conditions into materialized IN subqueries.
+ Item::pushable_equality_checker_for_subquery() is passed as the actual
+ callback function.
+
+ @retval
+ the built condition pushable into if such a condition exists
+ NULL if there is no such a condition
+*/
+
+Item *Item::build_pushable_cond(THD *thd,
+ Pushdown_checker checker,
+ uchar *arg)
+{
+ bool is_multiple_equality= type() == Item::FUNC_ITEM &&
+ ((Item_func*) this)->functype() == Item_func::MULT_EQUAL_FUNC;
+
+ if (get_extraction_flag() == NO_EXTRACTION_FL)
+ return 0;
+
+ if (type() == Item::COND_ITEM)
+ {
+ bool cond_and= false;
+ Item_cond *new_cond;
+ if (((Item_cond*) this)->functype() == Item_func::COND_AND_FUNC)
+ {
+ cond_and= true;
+ new_cond= new (thd->mem_root) Item_cond_and(thd);
+ }
+ else
+ new_cond= new (thd->mem_root) Item_cond_or(thd);
+ if (!new_cond)
+ return 0;
+ List_iterator<Item> li(*((Item_cond*) this)->argument_list());
+ Item *item;
+ bool is_fix_needed= false;
+
+ while ((item=li++))
+ {
+ if (item->get_extraction_flag() == NO_EXTRACTION_FL)
+ {
+ if (!cond_and)
+ return 0;
+ continue;
+ }
+ Item *fix= item->build_pushable_cond(thd, checker, arg);
+ if (!fix && !cond_and)
+ return 0;
+ if (!fix)
+ continue;
+
+ if (fix->type() == Item::COND_ITEM &&
+ ((Item_cond*) fix)->functype() == Item_func::COND_AND_FUNC)
+ is_fix_needed= true;
+
+ if (new_cond->argument_list()->push_back(fix, thd->mem_root))
+ return 0;
+ }
+ if (is_fix_needed && new_cond->fix_fields(thd, 0))
+ return 0;
+
+ switch (new_cond->argument_list()->elements)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return new_cond->argument_list()->head();
+ default:
+ return new_cond;
+ }
+ }
+ else if (is_multiple_equality)
+ {
+ List<Item> equalities;
+ Item *new_cond= NULL;
+ if (((Item_equal *)this)->create_pushable_equalities(thd, &equalities,
+ checker, arg, true) ||
+ (equalities.elements == 0))
+ return 0;
+
+ switch (equalities.elements)
+ {
+ case 0:
+ return 0;
+ case 1:
+ new_cond= equalities.head();
+ break;
+ default:
+ new_cond= new (thd->mem_root) Item_cond_and(thd, equalities);
+ break;
+ }
+ if (new_cond && new_cond->fix_fields(thd, &new_cond))
+ return 0;
+ return new_cond;
+ }
+ else if (get_extraction_flag() != NO_EXTRACTION_FL)
+ return build_clone(thd);
+ return 0;
+}
+
+
static
Item *get_field_item_for_having(THD *thd, Item *item, st_select_lex *sel)
{
@@ -7792,50 +7675,15 @@ Item *Item_direct_view_ref::derived_field_transformer_for_where(THD *thd,
return (*ref);
}
-static
-Grouping_tmp_field *find_matching_grouping_field(Item *item,
- st_select_lex *sel)
-{
- DBUG_ASSERT(item->type() == Item::FIELD_ITEM ||
- (item->type() == Item::REF_ITEM &&
- ((Item_ref *) item)->ref_type() == Item_ref::VIEW_REF));
- List_iterator<Grouping_tmp_field> li(sel->grouping_tmp_fields);
- Grouping_tmp_field *gr_field;
- Item_field *field_item= (Item_field *) (item->real_item());
- while ((gr_field= li++))
- {
- if (field_item->field == gr_field->tmp_field)
- return gr_field;
- }
- Item_equal *item_equal= item->get_item_equal();
- if (item_equal)
- {
- Item_equal_fields_iterator it(*item_equal);
- Item *equal_item;
- while ((equal_item= it++))
- {
- field_item= (Item_field *) (equal_item->real_item());
- li.rewind();
- while ((gr_field= li++))
- {
- if (field_item->field == gr_field->tmp_field)
- return gr_field;
- }
- }
- }
- return NULL;
-}
-
-Item *Item_field::derived_grouping_field_transformer_for_where(THD *thd,
- uchar *arg)
+Item *Item_field::grouping_field_transformer_for_where(THD *thd, uchar *arg)
{
st_select_lex *sel= (st_select_lex *)arg;
- Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
+ Field_pair *gr_field= find_matching_field_pair(this, sel->grouping_tmp_fields);
if (gr_field)
{
Item *producing_clone=
- gr_field->producing_item->build_clone(thd);
+ gr_field->corresponding_item->build_clone(thd);
if (producing_clone)
producing_clone->marker|= SUBSTITUTION_FL;
return producing_clone;
@@ -7845,8 +7693,8 @@ Item *Item_field::derived_grouping_field_transformer_for_where(THD *thd,
Item *
-Item_direct_view_ref::derived_grouping_field_transformer_for_where(THD *thd,
- uchar *arg)
+Item_direct_view_ref::grouping_field_transformer_for_where(THD *thd,
+ uchar *arg)
{
if ((*ref)->marker & SUBSTITUTION_FL)
{
@@ -7856,8 +7704,9 @@ Item_direct_view_ref::derived_grouping_field_transformer_for_where(THD *thd,
if (!item_equal)
return this;
st_select_lex *sel= (st_select_lex *)arg;
- Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
- return gr_field->producing_item->build_clone(thd);
+ Field_pair *gr_field= find_matching_field_pair(this,
+ sel->grouping_tmp_fields);
+ return gr_field->corresponding_item->build_clone(thd);
}
void Item_field::print(String *str, enum_query_type query_type)
@@ -7893,7 +7742,7 @@ Item_ref::Item_ref(THD *thd, Name_resolution_context *context_arg,
/*
This constructor used to create some internals references over fixed items
*/
- if ((set_properties_only= (ref && *ref && (*ref)->fixed)))
+ if ((set_properties_only= (ref && *ref && (*ref)->is_fixed())))
set_properties();
}
@@ -7942,7 +7791,7 @@ Item_ref::Item_ref(THD *thd, TABLE_LIST *view_arg, Item **item,
/*
This constructor is used to create some internal references over fixed items
*/
- if ((set_properties_only= (ref && *ref && (*ref)->fixed)))
+ if ((set_properties_only= (ref && *ref && (*ref)->is_fixed())))
set_properties();
}
@@ -8024,8 +7873,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
else if (!ref || ref == not_found_item)
{
DBUG_ASSERT(reference_trough_name != 0);
- if (!(ref= resolve_ref_in_select_and_group(thd, this,
- context->select_lex)))
+ if (!(ref= resolve_ref_in_select_and_group(thd, this, context->select_lex)))
goto error; /* Some error occurred (e.g. ambiguous names). */
if (ref == not_found_item) /* This reference was not resolved. */
@@ -8038,8 +7886,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
if (unlikely(!outer_context))
{
/* The current reference cannot be resolved in this query. */
- my_error(ER_BAD_FIELD_ERROR,MYF(0),
- this->full_name(), thd->where);
+ my_error(ER_BAD_FIELD_ERROR,MYF(0), full_name(), thd->where);
goto error;
}
@@ -8068,7 +7915,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
goto error; /* Some error occurred (e.g. ambiguous names). */
if (ref != not_found_item)
{
- DBUG_ASSERT(*ref && (*ref)->fixed);
+ DBUG_ASSERT(*ref && (*ref)->is_fixed());
prev_subselect_item->used_tables_and_const_cache_join(*ref);
break;
}
@@ -8192,7 +8039,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
goto error;
}
/* Should be checked in resolve_ref_in_select_and_group(). */
- DBUG_ASSERT(*ref && (*ref)->fixed);
+ DBUG_ASSERT(*ref && (*ref)->is_fixed());
mark_as_dependent(thd, last_checked_context->select_lex,
context->select_lex, this, this, false);
/*
@@ -8218,13 +8065,13 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
*/
if (!((*ref)->type() == REF_ITEM &&
((Item_ref *)(*ref))->ref_type() == OUTER_REF) &&
- (((*ref)->with_sum_func && name.str &&
- !(current_sel->linkage != GLOBAL_OPTIONS_TYPE &&
+ (((*ref)->with_sum_func() && name.str &&
+ !(current_sel->get_linkage() != GLOBAL_OPTIONS_TYPE &&
current_sel->having_fix_field)) ||
- !(*ref)->fixed))
+ !(*ref)->is_fixed()))
{
my_error(ER_ILLEGAL_REFERENCE, MYF(0),
- name.str, ((*ref)->with_sum_func?
+ name.str, ((*ref)->with_sum_func() ?
"reference to group function":
"forward reference in item list"));
goto error;
@@ -8250,7 +8097,7 @@ void Item_ref::set_properties()
We have to remember if we refer to a sum function, to ensure that
split_sum_func() doesn't try to change the reference.
*/
- with_sum_func= (*ref)->with_sum_func;
+ copy_with_sum_func(*ref);
with_param= (*ref)->with_param;
with_window_func= (*ref)->with_window_func;
with_field= (*ref)->with_field;
@@ -8436,6 +8283,14 @@ String *Item_ref::str_result(String* str)
}
+bool Item_ref::val_native_result(THD *thd, Native *to)
+{
+ return result_field ?
+ val_native_from_field(result_field, to) :
+ val_native(thd, to);
+}
+
+
my_decimal *Item_ref::val_decimal_result(my_decimal *decimal_value)
{
if (result_field)
@@ -8524,25 +8379,31 @@ bool Item_ref::is_null()
}
-bool Item_ref::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Item_ref::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return (null_value=(*ref)->get_date_result(ltime,fuzzydate));
+ return (null_value=(*ref)->get_date_result(thd, ltime, fuzzydate));
}
-longlong Item_ref::val_datetime_packed()
+bool Item_ref::val_native(THD *thd, Native *to)
+{
+ return val_native_from_item(thd, *ref, to);
+}
+
+
+longlong Item_ref::val_datetime_packed(THD *thd)
{
DBUG_ASSERT(fixed);
- longlong tmp= (*ref)->val_datetime_packed_result();
+ longlong tmp= (*ref)->val_datetime_packed_result(thd);
null_value= (*ref)->null_value;
return tmp;
}
-longlong Item_ref::val_time_packed()
+longlong Item_ref::val_time_packed(THD *thd)
{
DBUG_ASSERT(fixed);
- longlong tmp= (*ref)->val_time_packed_result();
+ longlong tmp= (*ref)->val_time_packed_result(thd);
null_value= (*ref)->null_value;
return tmp;
}
@@ -8679,23 +8540,29 @@ bool Item_direct_ref::is_null()
}
-bool Item_direct_ref::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Item_direct_ref::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+{
+ return (null_value=(*ref)->get_date(thd, ltime, fuzzydate));
+}
+
+
+bool Item_direct_ref::val_native(THD *thd, Native *to)
{
- return (null_value=(*ref)->get_date(ltime,fuzzydate));
+ return val_native_from_item(thd, *ref, to);
}
-longlong Item_direct_ref::val_time_packed()
+longlong Item_direct_ref::val_time_packed(THD *thd)
{
- longlong tmp = (*ref)->val_time_packed();
+ longlong tmp = (*ref)->val_time_packed(thd);
null_value= (*ref)->null_value;
return tmp;
}
-longlong Item_direct_ref::val_datetime_packed()
+longlong Item_direct_ref::val_datetime_packed(THD *thd)
{
- longlong tmp = (*ref)->val_datetime_packed();
+ longlong tmp = (*ref)->val_datetime_packed(thd);
null_value= (*ref)->null_value;
return tmp;
}
@@ -8709,10 +8576,10 @@ Item_cache_wrapper::~Item_cache_wrapper()
Item_cache_wrapper::Item_cache_wrapper(THD *thd, Item *item_arg):
Item_result_field(thd), orig_item(item_arg), expr_cache(NULL), expr_value(NULL)
{
- DBUG_ASSERT(orig_item->fixed);
+ DBUG_ASSERT(orig_item->is_fixed());
Type_std_attributes::set(orig_item);
maybe_null= orig_item->maybe_null;
- with_sum_func= orig_item->with_sum_func;
+ copy_with_sum_func(orig_item);
with_param= orig_item->with_param;
with_field= orig_item->with_field;
name= item_arg->name;
@@ -8772,7 +8639,7 @@ void Item_cache_wrapper::print(String *str, enum_query_type query_type)
bool Item_cache_wrapper::fix_fields(THD *thd __attribute__((unused)),
Item **it __attribute__((unused)))
{
- DBUG_ASSERT(orig_item->fixed);
+ DBUG_ASSERT(orig_item->is_fixed());
DBUG_ASSERT(fixed);
return FALSE;
}
@@ -8991,6 +8858,28 @@ String *Item_cache_wrapper::val_str(String* str)
/**
+ Get the native value of the possibly cached item
+*/
+
+bool Item_cache_wrapper::val_native(THD *thd, Native* to)
+{
+ Item *cached_value;
+ DBUG_ENTER("Item_cache_wrapper::val_native");
+ if (!expr_cache)
+ DBUG_RETURN(val_native_from_item(thd, orig_item, to));
+
+ if ((cached_value= check_cache()))
+ DBUG_RETURN(val_native_from_item(thd, cached_value, to));
+
+ cache();
+ if ((null_value= expr_value->null_value))
+ DBUG_RETURN(true);
+ DBUG_RETURN(expr_value->val_native(thd, to));
+}
+
+
+
+/**
Get the decimal value of the possibly cached item
*/
@@ -9075,18 +8964,18 @@ bool Item_cache_wrapper::is_null()
Get the date value of the possibly cached item
*/
-bool Item_cache_wrapper::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_cache_wrapper::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
Item *cached_value;
DBUG_ENTER("Item_cache_wrapper::get_date");
if (!expr_cache)
- DBUG_RETURN((null_value= orig_item->get_date(ltime, fuzzydate)));
+ DBUG_RETURN((null_value= orig_item->get_date(thd, ltime, fuzzydate)));
if ((cached_value= check_cache()))
- DBUG_RETURN((null_value= cached_value->get_date(ltime, fuzzydate)));
+ DBUG_RETURN((null_value= cached_value->get_date(thd, ltime, fuzzydate)));
cache();
- DBUG_RETURN((null_value= expr_value->get_date(ltime, fuzzydate)));
+ DBUG_RETURN((null_value= expr_value->get_date(thd, ltime, fuzzydate)));
}
@@ -9102,7 +8991,7 @@ int Item_cache_wrapper::save_in_field(Field *to, bool no_conversions)
Item* Item_cache_wrapper::get_tmp_table_item(THD *thd)
{
- if (!orig_item->with_sum_func && !orig_item->const_item())
+ if (!orig_item->with_sum_func() && !orig_item->const_item())
return new (thd->mem_root) Item_temptable_field(thd, result_field);
return copy_or_same(thd);
}
@@ -9132,7 +9021,7 @@ bool Item_direct_view_ref::fix_fields(THD *thd, Item **reference)
/* view fild reference must be defined */
DBUG_ASSERT(*ref);
/* (*ref)->check_cols() will be made in Item_direct_ref::fix_fields */
- if ((*ref)->fixed)
+ if ((*ref)->is_fixed())
{
Item *ref_item= (*ref)->real_item();
if (ref_item->type() == Item::FIELD_ITEM)
@@ -9328,6 +9217,19 @@ Item *Item_direct_view_ref::propagate_equal_fields(THD *thd,
}
+Item *Item_ref::propagate_equal_fields(THD *thd, const Context &ctx,
+ COND_EQUAL *cond)
+{
+ Item *field_item= real_item();
+ if (field_item->type() != FIELD_ITEM)
+ return this;
+ Item *item= field_item->propagate_equal_fields(thd, ctx, cond);
+ if (item != field_item)
+ return item;
+ return this;
+}
+
+
/**
Replace an Item_direct_view_ref for an equal Item_field evaluated earlier
(if any).
@@ -9370,6 +9272,20 @@ Item *Item_direct_view_ref::replace_equal_field(THD *thd, uchar *arg)
}
+bool Item_field::excl_dep_on_table(table_map tab_map)
+{
+ return used_tables() == tab_map ||
+ (item_equal && (item_equal->used_tables() & tab_map));
+}
+
+
+bool
+Item_field::excl_dep_on_grouping_fields(st_select_lex *sel)
+{
+ return find_matching_field_pair(this, sel->grouping_tmp_fields) != NULL;
+}
+
+
bool Item_direct_view_ref::excl_dep_on_table(table_map tab_map)
{
table_map used= used_tables();
@@ -9385,17 +9301,34 @@ bool Item_direct_view_ref::excl_dep_on_table(table_map tab_map)
return (*ref)->excl_dep_on_table(tab_map);
}
+
bool Item_direct_view_ref::excl_dep_on_grouping_fields(st_select_lex *sel)
{
if (item_equal)
{
DBUG_ASSERT(real_item()->type() == Item::FIELD_ITEM);
- return find_matching_grouping_field(this, sel) != NULL;
+ return (find_matching_field_pair(this, sel->grouping_tmp_fields) != NULL);
}
return (*ref)->excl_dep_on_grouping_fields(sel);
}
+bool Item_args::excl_dep_on_grouping_fields(st_select_lex *sel)
+{
+ for (uint i= 0; i < arg_count; i++)
+ {
+ if (args[i]->type() == Item::FUNC_ITEM &&
+ ((Item_func *)args[i])->functype() == Item_func::UDF_FUNC)
+ return false;
+ if (args[i]->const_item())
+ continue;
+ if (!args[i]->excl_dep_on_grouping_fields(sel))
+ return false;
+ }
+ return true;
+}
+
+
double Item_direct_view_ref::val_result()
{
double tmp=(*ref)->val_result();
@@ -9544,6 +9477,12 @@ void Item_default_value::calculate()
DEBUG_SYNC(field->table->in_use, "after_Item_default_value_calculate");
}
+bool Item_default_value::val_native(THD *thd, Native *to)
+{
+ calculate();
+ return Item_field::val_native(thd, to);
+}
+
String *Item_default_value::val_str(String *str)
{
calculate();
@@ -9568,10 +9507,10 @@ my_decimal *Item_default_value::val_decimal(my_decimal *decimal_value)
return Item_field::val_decimal(decimal_value);
}
-bool Item_default_value::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Item_default_value::get_date(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate)
{
calculate();
- return Item_field::get_date(ltime, fuzzydate);
+ return Item_field::get_date(thd, ltime, fuzzydate);
}
bool Item_default_value::send(Protocol *protocol, st_value *buffer)
@@ -9586,6 +9525,12 @@ int Item_default_value::save_in_field(Field *field_arg, bool no_conversions)
return Item_field::save_in_field(field_arg, no_conversions);
}
+void Item_default_value::save_in_result_field(bool no_conversions)
+{
+ calculate();
+ Item_field::save_in_result_field(no_conversions);
+}
+
double Item_default_value::val_result()
{
calculate();
@@ -9622,10 +9567,17 @@ my_decimal *Item_default_value::val_decimal_result(my_decimal *decimal_value)
return Item_field::val_decimal_result(decimal_value);
}
-bool Item_default_value::get_date_result(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Item_default_value::get_date_result(THD *thd, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate)
{
calculate();
- return Item_field::get_date_result(ltime, fuzzydate);
+ return Item_field::get_date_result(thd, ltime, fuzzydate);
+}
+
+bool Item_default_value::val_native_result(THD *thd, Native *to)
+{
+ calculate();
+ return Item_field::val_native_result(thd, to);
}
@@ -9638,6 +9590,23 @@ table_map Item_default_value::used_tables() const
return field->default_value->expr->used_tables();
}
+bool Item_default_value::register_field_in_read_map(void *arg)
+{
+ TABLE *table= (TABLE *) arg;
+ int res= 0;
+ if (!table || (table && table == field->table))
+ {
+ if (field->default_value && field->default_value->expr)
+ res= field->default_value->expr->walk(&Item::register_field_in_read_map,1,arg);
+ }
+ else if (result_field && table == result_field->table)
+ {
+ bitmap_set_bit(table->read_set, result_field->field_index);
+ }
+
+ return res;
+}
+
/**
This method like the walk method traverses the item tree, but at the
same time it can replace some nodes in the tree.
@@ -9676,7 +9645,7 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items)
{
DBUG_ASSERT(fixed == 0);
/* We should only check that arg is in first table */
- if (!arg->fixed)
+ if (!arg->is_fixed())
{
bool res;
TABLE_LIST *orig_next_table= context->last_name_resolution_table;
@@ -9888,7 +9857,7 @@ void Item_trigger_field::cleanup()
Since special nature of Item_trigger_field we should not do most of
things from Item_field::cleanup() or Item_ident::cleanup() here.
*/
- Item::cleanup();
+ Item_fixed_hybrid::cleanup();
}
@@ -9947,73 +9916,14 @@ void resolve_const_item(THD *thd, Item **ref, Item *comp_item)
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
{
- Item_result res_type=item_cmp_type(field->result_type(),
- item->result_type());
- /*
- We have to check field->cmp_type() instead of res_type,
- as result_type() - and thus res_type - can never be TIME_RESULT (yet).
- */
- if (field->cmp_type() == TIME_RESULT)
- {
- MYSQL_TIME field_time, item_time, item_time2, *item_time_cmp= &item_time;
- if (field->type() == MYSQL_TYPE_TIME)
- {
- field->get_time(&field_time);
- item->get_time(&item_time);
- }
- else
- {
- field->get_date(&field_time, TIME_INVALID_DATES);
- item->get_date(&item_time, TIME_INVALID_DATES);
- if (item_time.time_type == MYSQL_TIMESTAMP_TIME)
- if (time_to_datetime(thd, &item_time, item_time_cmp= &item_time2))
- return 1;
- }
- return my_time_compare(&field_time, item_time_cmp);
- }
- if (res_type == STRING_RESULT)
- {
- char item_buff[MAX_FIELD_WIDTH];
- char field_buff[MAX_FIELD_WIDTH];
-
- String item_tmp(item_buff,sizeof(item_buff),&my_charset_bin);
- String field_tmp(field_buff,sizeof(field_buff),&my_charset_bin);
- String *item_result= item->val_str(&item_tmp);
- /*
- Some implementations of Item::val_str(String*) actually modify
- the field Item::null_value, hence we can't check it earlier.
- */
- if (item->null_value)
- return 0;
- String *field_result= field->val_str(&field_tmp);
- return sortcmp(field_result, item_result, field->charset());
- }
- if (res_type == INT_RESULT)
- return 0; // Both are of type int
- if (res_type == DECIMAL_RESULT)
+ Type_handler_hybrid_field_type cmp(field->type_handler_for_comparison());
+ if (cmp.aggregate_for_comparison(item->type_handler_for_comparison()))
{
- my_decimal item_buf, *item_val,
- field_buf, *field_val;
- item_val= item->val_decimal(&item_buf);
- if (item->null_value)
- return 0;
- field_val= field->val_decimal(&field_buf);
- return my_decimal_cmp(field_val, item_val);
- }
- /*
- The patch for Bug#13463415 started using this function for comparing
- BIGINTs. That uncovered a bug in Visual Studio 32bit optimized mode.
- Prefixing the auto variables with volatile fixes the problem....
- */
- volatile double result= item->val_real();
- if (item->null_value)
+ // At fix_fields() time we checked that "field" and "item" are comparable
+ DBUG_ASSERT(0);
return 0;
- volatile double field_result= field->val_real();
- if (field_result < result)
- return -1;
- else if (field_result > result)
- return 1;
- return 0;
+ }
+ return cmp.type_handler()->stored_field_cmp_to_item(thd, field, item);
}
@@ -10076,7 +9986,6 @@ bool Item_cache_int::cache_value()
String *Item_cache_int::val_str(String *str)
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return NULL;
str->set_int(value, unsigned_flag, default_charset());
@@ -10086,7 +9995,6 @@ String *Item_cache_int::val_str(String *str)
my_decimal *Item_cache_int::val_decimal(my_decimal *decimal_val)
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return NULL;
int2my_decimal(E_DEC_FATAL_ERROR, value, unsigned_flag, decimal_val);
@@ -10095,7 +10003,6 @@ my_decimal *Item_cache_int::val_decimal(my_decimal *decimal_val)
double Item_cache_int::val_real()
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return 0.0;
return (double) value;
@@ -10103,7 +10010,6 @@ double Item_cache_int::val_real()
longlong Item_cache_int::val_int()
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return 0;
return value;
@@ -10143,88 +10049,12 @@ Item_cache_temporal::Item_cache_temporal(THD *thd, const Type_handler *handler)
}
-longlong Item_cache_temporal::val_datetime_packed()
-{
- DBUG_ASSERT(fixed == 1);
- if (Item_cache_temporal::field_type() == MYSQL_TYPE_TIME)
- return Item::val_datetime_packed(); // TIME-to-DATETIME conversion needed
- if ((!value_cached && !cache_value()) || null_value)
- {
- null_value= TRUE;
- return 0;
- }
- return value;
-}
-
-
-longlong Item_cache_temporal::val_time_packed()
-{
- DBUG_ASSERT(fixed == 1);
- if (Item_cache_temporal::field_type() != MYSQL_TYPE_TIME)
- return Item::val_time_packed(); // DATETIME-to-TIME conversion needed
- if ((!value_cached && !cache_value()) || null_value)
- {
- null_value= TRUE;
- return 0;
- }
- return value;
-}
-
-
-String *Item_cache_temporal::val_str(String *str)
-{
- DBUG_ASSERT(fixed == 1);
- if (!has_value())
- {
- null_value= true;
- return NULL;
- }
- return val_string_from_date(str);
-}
-
-
-my_decimal *Item_cache_temporal::val_decimal(my_decimal *decimal_value)
-{
- DBUG_ASSERT(fixed == 1);
- if ((!value_cached && !cache_value()) || null_value)
- {
- null_value= true;
- return NULL;
- }
- return val_decimal_from_date(decimal_value);
-}
-
-
-longlong Item_cache_temporal::val_int()
-{
- DBUG_ASSERT(fixed == 1);
- if ((!value_cached && !cache_value()) || null_value)
- {
- null_value= true;
- return 0;
- }
- return val_int_from_date();
-}
-
-
-double Item_cache_temporal::val_real()
-{
- DBUG_ASSERT(fixed == 1);
- if ((!value_cached && !cache_value()) || null_value)
- {
- null_value= true;
- return 0;
- }
- return val_real_from_date();
-}
-
-
bool Item_cache_temporal::cache_value()
{
if (!example)
return false;
value_cached= true;
- value= example->val_datetime_packed_result();
+ value= example->val_datetime_packed_result(current_thd);
null_value_inside= null_value= example->null_value;
return true;
}
@@ -10235,16 +10065,14 @@ bool Item_cache_time::cache_value()
if (!example)
return false;
value_cached= true;
- value= example->val_time_packed_result();
+ value= example->val_time_packed_result(current_thd);
null_value_inside= null_value= example->null_value;
return true;
}
-bool Item_cache_temporal::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_cache_temporal::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- ErrConvInteger str(value);
-
if (!has_value())
{
bzero((char*) ltime,sizeof(*ltime));
@@ -10259,7 +10087,8 @@ bool Item_cache_temporal::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
int Item_cache_temporal::save_in_field(Field *field, bool no_conversions)
{
MYSQL_TIME ltime;
- if (get_date(&ltime, 0))
+ // This is a temporal type. No nanoseconds, so round mode is not important.
+ if (get_date(field->get_thd(), &ltime, TIME_CONV_NONE | TIME_FRAC_NONE))
return set_field_to_null_with_conversions(field, no_conversions);
field->set_notnull();
int error= field->store_time_dec(&ltime, decimals);
@@ -10301,25 +10130,78 @@ Item *Item_cache_temporal::convert_to_basic_const_item(THD *thd)
Item *Item_cache_datetime::make_literal(THD *thd)
{
- MYSQL_TIME ltime;
- unpack_time(val_datetime_packed(), &ltime, MYSQL_TIMESTAMP_DATETIME);
- return new (thd->mem_root) Item_datetime_literal(thd, &ltime, decimals);
+ Datetime dt(thd, this, TIME_CONV_NONE | TIME_FRAC_NONE);
+ return new (thd->mem_root) Item_datetime_literal(thd, &dt, decimals);
}
Item *Item_cache_date::make_literal(THD *thd)
{
- MYSQL_TIME ltime;
- unpack_time(val_datetime_packed(), &ltime, MYSQL_TIMESTAMP_DATE);
- return new (thd->mem_root) Item_date_literal(thd, &ltime);
+ Date d(thd, this, TIME_CONV_NONE | TIME_FRAC_NONE);
+ return new (thd->mem_root) Item_date_literal(thd, &d);
}
Item *Item_cache_time::make_literal(THD *thd)
{
- MYSQL_TIME ltime;
- unpack_time(val_time_packed(), &ltime, MYSQL_TIMESTAMP_TIME);
- return new (thd->mem_root) Item_time_literal(thd, &ltime, decimals);
+ Time t(thd, this);
+ return new (thd->mem_root) Item_time_literal(thd, &t, decimals);
+}
+
+
+int Item_cache_timestamp::save_in_field(Field *field, bool no_conversions)
+{
+ if (!has_value())
+ return set_field_to_null_with_conversions(field, no_conversions);
+ return m_native.save_in_field(field, decimals);
+}
+
+
+bool Item_cache_timestamp::val_native(THD *thd, Native *to)
+{
+ if (!has_value())
+ {
+ null_value= true;
+ return true;
+ }
+ return null_value= to->copy(m_native);
}
+
+Datetime Item_cache_timestamp::to_datetime(THD *thd)
+{
+ DBUG_ASSERT(is_fixed() == 1);
+ if (!has_value())
+ {
+ null_value= true;
+ return Datetime();
+ }
+ return m_native.to_datetime(thd);
+}
+
+
+bool Item_cache_timestamp::get_date(THD *thd, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate)
+{
+ if (!has_value())
+ {
+ set_zero_time(ltime, MYSQL_TIMESTAMP_DATETIME);
+ return true;
+ }
+ Timestamp_or_zero_datetime tm(m_native);
+ return (null_value= tm.to_TIME(thd, ltime, fuzzydate));
+}
+
+
+bool Item_cache_timestamp::cache_value()
+{
+ if (!example)
+ return false;
+ value_cached= true;
+ null_value= example->val_native_with_conversion_result(current_thd, &m_native,
+ type_handler());
+ return true;
+}
+
+
bool Item_cache_real::cache_value()
{
if (!example)
@@ -10333,7 +10215,6 @@ bool Item_cache_real::cache_value()
double Item_cache_real::val_real()
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return 0.0;
return value;
@@ -10341,7 +10222,6 @@ double Item_cache_real::val_real()
longlong Item_cache_real::val_int()
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return 0;
return Converter_double_to_longlong(value, unsigned_flag).result();
@@ -10350,7 +10230,6 @@ longlong Item_cache_real::val_int()
String* Item_cache_double::val_str(String *str)
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return NULL;
str->set_real(value, decimals, default_charset());
@@ -10360,7 +10239,6 @@ String* Item_cache_double::val_str(String *str)
String* Item_cache_float::val_str(String *str)
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return NULL;
Float(value).to_string(str, decimals);
@@ -10370,7 +10248,6 @@ String* Item_cache_float::val_str(String *str)
my_decimal *Item_cache_real::val_decimal(my_decimal *decimal_val)
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return NULL;
double2my_decimal(E_DEC_FATAL_ERROR, value, decimal_val);
@@ -10406,38 +10283,22 @@ bool Item_cache_decimal::cache_value()
double Item_cache_decimal::val_real()
{
- DBUG_ASSERT(fixed);
- double res;
- if (!has_value())
- return 0.0;
- my_decimal2double(E_DEC_FATAL_ERROR, &decimal_value, &res);
- return res;
+ return !has_value() ? 0.0 : decimal_value.to_double();
}
longlong Item_cache_decimal::val_int()
{
- DBUG_ASSERT(fixed);
- longlong res;
- if (!has_value())
- return 0;
- my_decimal2int(E_DEC_FATAL_ERROR, &decimal_value, unsigned_flag, &res);
- return res;
+ return !has_value() ? 0 : decimal_value.to_longlong(unsigned_flag);
}
String* Item_cache_decimal::val_str(String *str)
{
- DBUG_ASSERT(fixed);
- if (!has_value())
- return NULL;
- my_decimal_round(E_DEC_FATAL_ERROR, &decimal_value, decimals, FALSE,
- &decimal_value);
- my_decimal2string(E_DEC_FATAL_ERROR, &decimal_value, 0, 0, 0, str);
- return str;
+ return !has_value() ? NULL :
+ decimal_value.to_string_round(str, decimals, &decimal_value);
}
my_decimal *Item_cache_decimal::val_decimal(my_decimal *val)
{
- DBUG_ASSERT(fixed);
if (!has_value())
return NULL;
return &decimal_value;
@@ -10454,9 +10315,8 @@ Item *Item_cache_decimal::convert_to_basic_const_item(THD *thd)
new_item= (Item*) new (thd->mem_root) Item_null(thd);
else
{
- my_decimal decimal_value;
- my_decimal *result= val_decimal(&decimal_value);
- new_item= (Item*) new (thd->mem_root) Item_decimal(thd, result);
+ VDec tmp(this);
+ new_item= (Item*) new (thd->mem_root) Item_decimal(thd, tmp.ptr());
}
return new_item;
}
@@ -10494,7 +10354,6 @@ bool Item_cache_str::cache_value()
double Item_cache_str::val_real()
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return 0.0;
return value ? double_from_string_with_check(value) : 0.0;
@@ -10503,7 +10362,6 @@ double Item_cache_str::val_real()
longlong Item_cache_str::val_int()
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return 0;
return value ? longlong_from_string_with_check(value) : 0;
@@ -10512,7 +10370,6 @@ longlong Item_cache_str::val_int()
String* Item_cache_str::val_str(String *str)
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return 0;
return value;
@@ -10521,7 +10378,6 @@ String* Item_cache_str::val_str(String *str)
my_decimal *Item_cache_str::val_decimal(my_decimal *decimal_val)
{
- DBUG_ASSERT(fixed == 1);
if (!has_value())
return NULL;
return value ? decimal_from_string_with_check(decimal_val, value) : 0;
@@ -10714,7 +10570,7 @@ String *Item_type_holder::val_str(String*)
return 0;
}
-bool Item_type_holder::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_type_holder::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(0); // should never be called
return true;
@@ -10723,7 +10579,7 @@ bool Item_type_holder::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
void Item_result_field::cleanup()
{
DBUG_ENTER("Item_result_field::cleanup()");
- Item::cleanup();
+ Item_fixed_hybrid::cleanup();
result_field= 0;
DBUG_VOID_RETURN;
}
@@ -10899,17 +10755,6 @@ const char *dbug_print(SELECT_LEX_UNIT *x) { return dbug_print_unit(x); }
#endif /*DBUG_OFF*/
-bool Item_field::excl_dep_on_table(table_map tab_map)
-{
- return used_tables() == tab_map ||
- (item_equal && (item_equal->used_tables() & tab_map));
-}
-
-bool
-Item_field::excl_dep_on_grouping_fields(st_select_lex *sel)
-{
- return find_matching_grouping_field(this, sel) != NULL;
-}
void Item::register_in(THD *thd)
@@ -10917,3 +10762,15 @@ void Item::register_in(THD *thd)
next= thd->free_list;
thd->free_list= this;
}
+
+
+bool Item::cleanup_excluding_immutables_processor (void *arg)
+{
+ if (!(get_extraction_flag() == IMMUTABLE_FL))
+ return cleanup_processor(arg);
+ else
+ {
+ clear_extraction_flag();
+ return false;
+ }
+}
diff --git a/sql/item.h b/sql/item.h
index b16456372d4..52febaa3031 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -2,7 +2,7 @@
#define SQL_ITEM_INCLUDED
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
- Copyright (c) 2009, 2020, MariaDB Corporation.
+ Copyright (c) 2009, 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
@@ -100,7 +100,10 @@ class sp_head;
class Protocol;
struct TABLE_LIST;
void item_init(void); /* Init item functions */
+class Item_basic_value;
+class Item_result_field;
class Item_field;
+class Item_ref;
class Item_param;
class user_var_entry;
class JOIN;
@@ -108,6 +111,7 @@ struct KEY_FIELD;
struct SARGABLE_PARAM;
class RANGE_OPT_PARAM;
class SEL_TREE;
+class With_sum_func_cache;
enum precedence {
LOWEST_PRECEDENCE,
@@ -146,8 +150,11 @@ bool mark_unsupported_function(const char *w1, const char *w2,
#define NO_EXTRACTION_FL (1 << 6)
#define FULL_EXTRACTION_FL (1 << 7)
-#define SUBSTITUTION_FL (1 << 8)
-#define EXTRACTION_MASK (NO_EXTRACTION_FL | FULL_EXTRACTION_FL)
+#define DELETION_FL (1 << 8)
+#define IMMUTABLE_FL (1 << 9)
+#define SUBSTITUTION_FL (1 << 10)
+#define EXTRACTION_MASK \
+ (NO_EXTRACTION_FL | FULL_EXTRACTION_FL | DELETION_FL | IMMUTABLE_FL)
extern const char *item_empty_name;
@@ -596,6 +603,7 @@ typedef bool (Item::*Item_processor) (void *arg);
typedef bool (Item::*Item_analyzer) (uchar **argp);
typedef Item* (Item::*Item_transformer) (THD *thd, uchar *arg);
typedef void (*Cond_traverser) (const Item *item, void *arg);
+typedef bool (Item::*Pushdown_checker) (uchar *arg);
struct st_cond_statistic;
@@ -628,6 +636,87 @@ public:
String_copier_for_item(THD *thd): m_thd(thd) { }
};
+
+/**
+ A helper class describing what kind of Item created a temporary field.
+ - If m_field is set, then the temporary field was created from Field
+ (e.g. when the Item was Item_field, or Item_ref pointing to Item_field)
+ - If m_default_field is set, then there is a usable DEFAULT value.
+ (e.g. when the Item is Item_field)
+ - If m_item_result_field is set, then the temporary field was created
+ from certain sub-types of Item_result_field (e.g. Item_func)
+ See create_tmp_field() in sql_select.cc for details.
+*/
+
+class Tmp_field_src
+{
+ Field *m_field;
+ Field *m_default_field;
+ Item_result_field *m_item_result_field;
+public:
+ Tmp_field_src()
+ :m_field(0),
+ m_default_field(0),
+ m_item_result_field(0)
+ { }
+ Field *field() const { return m_field; }
+ Field *default_field() const { return m_default_field; }
+ Item_result_field *item_result_field() const { return m_item_result_field; }
+ void set_field(Field *field) { m_field= field; }
+ void set_default_field(Field *field) { m_default_field= field; }
+ void set_item_result_field(Item_result_field *item)
+ { m_item_result_field= item; }
+};
+
+
+/**
+ Parameters for create_tmp_field_ex().
+ See create_tmp_field() in sql_select.cc for details.
+*/
+
+class Tmp_field_param
+{
+ bool m_group;
+ bool m_modify_item;
+ bool m_table_cant_handle_bit_fields;
+ bool m_make_copy_field;
+public:
+ Tmp_field_param(bool group,
+ bool modify_item,
+ bool table_cant_handle_bit_fields,
+ bool make_copy_field)
+ :m_group(group),
+ m_modify_item(modify_item),
+ m_table_cant_handle_bit_fields(table_cant_handle_bit_fields),
+ m_make_copy_field(make_copy_field)
+ { }
+ bool group() const { return m_group; }
+ bool modify_item() const { return m_modify_item; }
+ bool table_cant_handle_bit_fields() const
+ { return m_table_cant_handle_bit_fields; }
+ bool make_copy_field() const { return m_make_copy_field; }
+ void set_modify_item(bool to) { m_modify_item= to; }
+};
+
+
+class Item_const
+{
+public:
+ virtual ~Item_const() {}
+ virtual const Type_all_attributes *get_type_all_attributes_from_const() const= 0;
+ virtual bool const_is_null() const { return false; }
+ virtual const longlong *const_ptr_longlong() const { return NULL; }
+ virtual const double *const_ptr_double() const { return NULL; }
+ virtual const my_decimal *const_ptr_my_decimal() const { return NULL; }
+ virtual const MYSQL_TIME *const_ptr_mysql_time() const { return NULL; }
+ virtual const String *const_ptr_string() const { return NULL; }
+};
+
+
+/****************************************************************************/
+
+#define STOP_PTR ((void *) 1)
+
class Item: public Value_source,
public Type_all_attributes
{
@@ -651,17 +740,27 @@ public:
static void operator delete(void *ptr, MEM_ROOT *mem_root) {}
enum Type {FIELD_ITEM= 0, FUNC_ITEM, SUM_FUNC_ITEM,
- WINDOW_FUNC_ITEM, STRING_ITEM,
- INT_ITEM, REAL_ITEM, NULL_ITEM, VARBIN_ITEM,
- COPY_STR_ITEM, FIELD_AVG_ITEM, DEFAULT_VALUE_ITEM,
- CONTEXTUALLY_TYPED_VALUE_ITEM,
- PROC_ITEM,COND_ITEM, REF_ITEM, FIELD_STD_ITEM,
- FIELD_VARIANCE_ITEM, INSERT_VALUE_ITEM,
+ WINDOW_FUNC_ITEM,
+ /*
+ NOT NULL literal-alike constants, which do not change their
+ value during an SQL statement execution, but can optionally
+ change their value between statements:
+ - Item_literal - real NOT NULL constants
+ - Item_param - can change between statements
+ - Item_splocal - can change between statements
+ - Item_user_var_as_out_param - hack
+ Note, Item_user_var_as_out_param actually abuses the type code.
+ It should be moved out of the Item tree eventually.
+ */
+ CONST_ITEM,
+ NULL_ITEM, // Item_null or Item_param bound to NULL
+ COPY_STR_ITEM, FIELD_AVG_ITEM, DEFAULT_VALUE_ITEM,
+ CONTEXTUALLY_TYPED_VALUE_ITEM,
+ PROC_ITEM,COND_ITEM, REF_ITEM, FIELD_STD_ITEM,
+ FIELD_VARIANCE_ITEM, INSERT_VALUE_ITEM,
SUBSELECT_ITEM, ROW_ITEM, CACHE_ITEM, TYPE_HOLDER,
- PARAM_ITEM, TRIGGER_FIELD_ITEM, DECIMAL_ITEM,
- XPATH_NODESET, XPATH_NODESET_CMP,
- VIEW_FIXER_ITEM, EXPR_CACHE_ITEM,
- DATE_ITEM};
+ PARAM_ITEM, TRIGGER_FIELD_ITEM,
+ EXPR_CACHE_ITEM};
enum cond_result { COND_UNDEF,COND_OK,COND_TRUE,COND_FALSE };
@@ -703,11 +802,34 @@ protected:
*/
Field *tmp_table_field_from_field_type(TABLE *table)
{
+ DBUG_ASSERT(is_fixed());
const Type_handler *h= type_handler()->type_handler_for_tmp_table(this);
return h->make_and_init_table_field(&name, Record_addr(maybe_null),
*this, table);
}
+ /**
+ Create a temporary field for a simple Item, which does not
+ need any special action after the field creation:
+ - is not an Item_field descendant (and not a reference to Item_field)
+ - is not an Item_result_field descendant
+ - does not need to copy any DEFAULT value to the result Field
+ - does not need to set Field::is_created_from_null_item for the result
+ See create_tmp_field_ex() for details on parameters and return values.
+ */
+ Field *create_tmp_field_ex_simple(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ DBUG_ASSERT(!param->make_copy_field());
+ DBUG_ASSERT(!is_result_field());
+ DBUG_ASSERT(type() != NULL_ITEM);
+ return tmp_table_field_from_field_type(table);
+ }
Field *create_tmp_field_int(TABLE *table, uint convert_int_length);
+ Field *tmp_table_field_from_field_type_maybe_null(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param,
+ bool is_explicit_null);
void raise_error_not_evaluable();
void push_note_converted_to_negative_complement(THD *thd);
@@ -716,21 +838,21 @@ protected:
/* Helper methods, to get an Item value from another Item */
double val_real_from_item(Item *item)
{
- DBUG_ASSERT(fixed == 1);
+ DBUG_ASSERT(is_fixed());
double value= item->val_real();
null_value= item->null_value;
return value;
}
longlong val_int_from_item(Item *item)
{
- DBUG_ASSERT(fixed == 1);
+ DBUG_ASSERT(is_fixed());
longlong value= item->val_int();
null_value= item->null_value;
return value;
}
String *val_str_from_item(Item *item, String *str)
{
- DBUG_ASSERT(fixed == 1);
+ DBUG_ASSERT(is_fixed());
String *res= item->val_str(str);
if (res)
res->set_charset(collation.collation);
@@ -738,33 +860,48 @@ protected:
res= NULL;
return res;
}
+ bool val_native_from_item(THD *thd, Item *item, Native *to)
+ {
+ DBUG_ASSERT(is_fixed());
+ null_value= item->val_native(thd, to);
+ DBUG_ASSERT(null_value == item->null_value);
+ return null_value;
+ }
+ bool val_native_from_field(Field *field, Native *to)
+ {
+ if ((null_value= field->is_null()))
+ return true;
+ return (null_value= field->val_native(to));
+ }
+ bool val_native_with_conversion_from_item(THD *thd, Item *item, Native *to,
+ const Type_handler *handler)
+ {
+ DBUG_ASSERT(is_fixed());
+ return null_value= item->val_native_with_conversion(thd, to, handler);
+ }
my_decimal *val_decimal_from_item(Item *item, my_decimal *decimal_value)
{
- DBUG_ASSERT(fixed == 1);
+ DBUG_ASSERT(is_fixed());
my_decimal *value= item->val_decimal(decimal_value);
if ((null_value= item->null_value))
value= NULL;
return value;
}
- bool get_date_from_item(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date_from_item(THD *thd, Item *item,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- bool rc= item->get_date(ltime, fuzzydate);
+ bool rc= item->get_date(thd, ltime, fuzzydate);
null_value= MY_TEST(rc || item->null_value);
return rc;
}
- /*
- This method is used if the item was not null but conversion to
- TIME/DATE/DATETIME failed. We return a zero date if allowed,
- otherwise - null.
- */
- bool make_zero_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
-
public:
+
/*
Cache val_str() into the own buffer, e.g. to evaluate constant
expressions with subqueries in the ORDER/GROUP clauses.
*/
String *val_str() { return val_str(&str_value); }
+ virtual Item_func *get_item_func() { return NULL; }
const MY_LOCALE *locale_from_val_str();
@@ -784,14 +921,12 @@ public:
bool in_rollup; /* If used in GROUP BY list
of a query with ROLLUP */
bool null_value; /* if item is null */
- bool with_sum_func; /* True if item contains a sum func */
bool with_param; /* True if contains an SP parameter */
bool with_window_func; /* True if item contains a window func */
/**
True if any item except Item_sum contains a field. Set during parsing.
*/
bool with_field;
- bool fixed; /* If item fixed with fix_fields */
bool is_autogenerated_name; /* indicate was name of this Item
autogenerated or set by user */
// alloc & destruct is done as start of select on THD::mem_root
@@ -815,7 +950,7 @@ public:
void set_name(THD *thd, const char *str, size_t length, CHARSET_INFO *cs);
void set_name_no_truncate(THD *thd, const char *str, uint length,
CHARSET_INFO *cs);
- void init_make_send_field(Send_field *tmp_field,enum enum_field_types type);
+ void init_make_send_field(Send_field *tmp_field, const Type_handler *h);
void share_name_with(const Item *item)
{
name= item->name;
@@ -826,7 +961,7 @@ public:
bool fix_fields_if_needed(THD *thd, Item **ref)
{
- return fixed ? false : fix_fields(thd, ref);
+ return is_fixed() ? false : fix_fields(thd, ref);
}
bool fix_fields_if_needed_for_scalar(THD *thd, Item **ref)
{
@@ -840,7 +975,27 @@ public:
{
return fix_fields_if_needed_for_scalar(thd, ref);
}
- virtual bool fix_fields(THD *, Item **);
+ /*
+ By default we assume that an Item is fixed by the contstructor.
+ */
+ virtual bool fix_fields(THD *, Item **)
+ {
+ /*
+ This should not normally be called, because usually before
+ fix_fields() we check is_fixed() to be false.
+ But historically we allow fix_fields() to be called for Items
+ who return basic_const_item()==true.
+ */
+ DBUG_ASSERT(is_fixed());
+ DBUG_ASSERT(basic_const_item());
+ return false;
+ }
+ virtual bool is_fixed() const { return true; }
+ virtual void unfix_fields()
+ {
+ DBUG_ASSERT(0);
+ }
+
/*
Fix after some tables has been pulled out. Basically re-calculate all
attributes that are dependent on the tables.
@@ -860,11 +1015,14 @@ public:
but rather uses intermediate type conversion items. Then the method is
supposed to be applied recursively.
*/
- virtual inline void quick_fix_field() { fixed= 1; }
+ virtual void quick_fix_field()
+ {
+ DBUG_ASSERT(0);
+ }
- bool save_in_value(struct st_value *value)
+ bool save_in_value(THD *thd, struct st_value *value)
{
- return type_handler()->Item_save_in_value(this, value);
+ return type_handler()->Item_save_in_value(thd, this, value);
}
/* Function returns 1 on overflow and -1 on fatal errors */
@@ -889,6 +1047,21 @@ public:
return type_handler()->field_type();
}
virtual const Type_handler *type_handler() const= 0;
+ /**
+ Detects if an Item has a fixed data type which is known
+ even before fix_fields().
+ Currently it's important only to find Items with a fixed boolean
+ data type. More item types can be marked in the future as having
+ a fixed data type (e.g. all literals, all fixed type functions, etc).
+
+ @retval NULL if the Item type is not known before fix_fields()
+ @retval the pointer to the data type handler, if the data type
+ is known before fix_fields().
+ */
+ virtual const Type_handler *fixed_type_handler() const
+ {
+ return NULL;
+ }
const Type_handler *type_handler_for_comparison() const
{
return type_handler()->type_handler_for_comparison();
@@ -897,13 +1070,9 @@ public:
{
return type_handler();
}
- virtual const Type_handler *cast_to_int_type_handler() const
- {
- return type_handler();
- }
- virtual const Type_handler *type_handler_for_system_time() const
+ const Type_handler *cast_to_int_type_handler() const
{
- return real_type_handler();
+ return real_type_handler()->cast_to_int_type_handler();
}
/* result_type() of an item specifies how the value should be returned */
Item_result result_type() const
@@ -959,6 +1128,10 @@ public:
return type_handler()->Item_get_cache(thd, this);
}
virtual enum Type type() const =0;
+ bool is_of_type(Type t, Item_result cmp) const
+ {
+ return type() == t && cmp_type() == cmp;
+ }
/*
real_type() is the type of base item. This is same as type() for
most items, except Item_ref() and Item_cache_wrapper() where it
@@ -1023,6 +1196,12 @@ public:
If value is not null null_value flag will be reset to FALSE.
*/
virtual double val_real()=0;
+ Double_null to_double_null()
+ {
+ // val_real() must be caleed on a separate line. See to_longlong_null()
+ double nr= val_real();
+ return Double_null(nr, null_value);
+ }
/*
Return integer representation of item.
@@ -1038,6 +1217,20 @@ public:
{
return Longlong_hybrid(val_int(), unsigned_flag);
}
+ Longlong_null to_longlong_null()
+ {
+ longlong nr= val_int();
+ /*
+ C++ does not guarantee the order of parameter evaluation,
+ so to make sure "null_value" is passed to the constructor
+ after the val_int() call, val_int() is caled on a separate line.
+ */
+ return Longlong_null(nr, null_value);
+ }
+ Longlong_hybrid_null to_longlong_hybrid_null()
+ {
+ return Longlong_hybrid_null(to_longlong_null(), unsigned_flag);
+ }
/**
Get a value for CAST(x AS SIGNED).
Too large positive unsigned integer values are converted
@@ -1059,15 +1252,16 @@ public:
{
return cast_to_int_type_handler()->Item_val_int_unsigned_typecast(this);
}
- longlong val_int_unsigned_typecast_from_decimal();
longlong val_int_unsigned_typecast_from_int();
longlong val_int_unsigned_typecast_from_str();
+ longlong val_int_unsigned_typecast_from_real();
/**
Get a value for CAST(x AS UNSIGNED).
Huge positive unsigned values are converted to negative complements.
*/
longlong val_int_signed_typecast_from_int();
+ longlong val_int_signed_typecast_from_real();
/*
This is just a shortcut to avoid the cast. You should still use
@@ -1106,6 +1300,58 @@ public:
*/
virtual String *val_str(String *str)=0;
+
+ bool val_native_with_conversion(THD *thd, Native *to, const Type_handler *th)
+ {
+ return th->Item_val_native_with_conversion(thd, this, to);
+ }
+ bool val_native_with_conversion_result(THD *thd, Native *to,
+ const Type_handler *th)
+ {
+ return th->Item_val_native_with_conversion_result(thd, this, to);
+ }
+
+ virtual bool val_native(THD *thd, Native *to)
+ {
+ /*
+ The default implementation for the Items that do not need native format:
+ - Item_basic_value (default implementation)
+ - Item_copy
+ - Item_exists_subselect
+ - Item_sum_field
+ - Item_sum_or_func (default implementation)
+ - Item_proc
+ - Item_type_holder (as val_xxx() are never called for it);
+
+ These hybrid Item types override val_native():
+ - Item_field
+ - Item_param
+ - Item_sp_variable
+ - Item_ref
+ - Item_cache_wrapper
+ - Item_direct_ref
+ - Item_direct_view_ref
+ - Item_ref_null_helper
+ - Item_name_const
+ - Item_time_literal
+ - Item_sum_or_func
+ Note, these hybrid type Item_sum_or_func descendants
+ override the default implementation:
+ * Item_sum_hybrid
+ * Item_func_hybrid_field_type
+ * Item_func_min_max
+ * Item_func_sp
+ * Item_func_last_value
+ * Item_func_rollup_const
+ */
+ DBUG_ASSERT(0);
+ return null_value= true;
+ }
+ virtual bool val_native_result(THD *thd, Native *to)
+ {
+ return val_native(thd, to);
+ }
+
/*
Returns string representation of this item in ASCII format.
@@ -1218,7 +1464,7 @@ public:
{
return type_handler()->Item_val_bool(this);
}
- virtual String *val_nodeset(String*) { return 0; }
+ virtual String *val_raw(String*) { return 0; }
bool eval_const_cond()
{
@@ -1240,23 +1486,15 @@ public:
/* Helper functions, see item_sum.cc */
String *val_string_from_real(String *str);
String *val_string_from_int(String *str);
- String *val_string_from_decimal(String *str);
- String *val_string_from_date(String *str);
my_decimal *val_decimal_from_real(my_decimal *decimal_value);
my_decimal *val_decimal_from_int(my_decimal *decimal_value);
my_decimal *val_decimal_from_string(my_decimal *decimal_value);
- my_decimal *val_decimal_from_date(my_decimal *decimal_value);
- my_decimal *val_decimal_from_time(my_decimal *decimal_value);
- longlong val_int_from_decimal();
- longlong val_int_from_date();
longlong val_int_from_real()
{
- DBUG_ASSERT(fixed == 1);
+ DBUG_ASSERT(is_fixed());
return Converter_double_to_longlong_with_warn(val_real(), false).result();
}
longlong val_int_from_str(int *error);
- double val_real_from_decimal();
- double val_real_from_date();
/*
Returns true if this item can be calculated during
@@ -1284,11 +1522,6 @@ public:
return Sql_mode_dependency();
}
- // Get TIME, DATE or DATETIME using proper sql_mode flags for the field type
- bool get_temporal_with_sql_mode(MYSQL_TIME *ltime);
- // Check NULL value for a TIME, DATE or DATETIME expression
- bool is_null_from_temporal();
-
int save_time_in_field(Field *field, bool no_conversions);
int save_date_in_field(Field *field, bool no_conversions);
int save_str_in_field(Field *field, bool no_conversions);
@@ -1348,13 +1581,21 @@ public:
a constant expression. Used in the optimizer to propagate basic constants.
*/
virtual bool basic_const_item() const { return 0; }
- /*
+ /**
Determines if the expression is allowed as
a virtual column assignment source:
INSERT INTO t1 (vcol) VALUES (10) -> error
INSERT INTO t1 (vcol) VALUES (NULL) -> ok
*/
virtual bool vcol_assignment_allowed_value() const { return false; }
+ /**
+ Test if "this" is an ORDER position (rather than an expression).
+ Notes:
+ - can be called before fix_fields().
+ - local SP variables (even of integer types) are always expressions, not
+ positions. (And they can't be used before fix_fields is called for them).
+ */
+ virtual bool is_order_clause_position() const { return false; }
/*
Determines if the Item is an evaluable expression, that is
it can return a value, so we can call methods val_xxx(), get_date(), etc.
@@ -1375,6 +1616,7 @@ public:
}
/* cloning of constant items (0 if it is not const) */
virtual Item *clone_item(THD *thd) { return 0; }
+ /* deep copy item */
virtual Item* build_clone(THD *thd) { return get_copy(thd); }
virtual cond_result eq_cmp_result() const { return COND_OK; }
inline uint float_length(uint decimals_par) const
@@ -1420,14 +1662,14 @@ public:
/**
TIME or DATETIME precision of the item: 0..6
*/
- uint time_precision()
+ uint time_precision(THD *thd)
{
- return const_item() ? type_handler()->Item_time_precision(this) :
+ return const_item() ? type_handler()->Item_time_precision(thd, this) :
MY_MIN(decimals, TIME_SECOND_PART_DIGITS);
}
- uint datetime_precision()
+ uint datetime_precision(THD *thd)
{
- return const_item() ? type_handler()->Item_datetime_precision(this) :
+ return const_item() ? type_handler()->Item_datetime_precision(thd, this) :
MY_MIN(decimals, TIME_SECOND_PART_DIGITS);
}
virtual longlong val_int_min() const
@@ -1537,78 +1779,28 @@ public:
void split_sum_func2(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &fields,
Item **ref, uint flags);
- virtual bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)= 0;
- bool get_date_from_int(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_from_year(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_from_real(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_from_decimal(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_from_string(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_time(MYSQL_TIME *ltime)
- { return get_date(ltime, Time::flags_for_get_date()); }
- /*
- Get time with automatic DATE/DATETIME to TIME conversion,
- by subtracting CURRENT_DATE.
-
- Performce a reverse operation to CAST(time AS DATETIME)
- Suppose:
- - we have a set of items (typically with the native MYSQL_TYPE_TIME type)
- whose item->get_date() return TIME1 value, and
- - CAST(AS DATETIME) for the same Items return DATETIME1,
- after applying time-to-datetime conversion to TIME1.
-
- then all items (typically of the native MYSQL_TYPE_{DATE|DATETIME} types)
- whose get_date() return DATETIME1 must also return TIME1 from
- get_time_with_conversion()
-
- @param thd - the thread, its variables.old_mode is checked
- to decide if use simple YYYYMMDD truncation (old mode),
- or perform full DATETIME-to-TIME conversion with
- CURRENT_DATE subtraction.
- @param[out] ltime - store the result here
- @param fuzzydate - flags to be used for the get_date() call.
- Normally, should include TIME_TIME_ONLY, to let
- the called low-level routines, e.g. str_to_date(),
- know that we prefer TIME rather that DATE/DATETIME
- and do less conversion outside of the low-level
- routines.
-
- @returns true - on error, e.g. get_date() returned NULL value,
- or get_date() returned DATETIME/DATE with non-zero
- YYYYMMDD part.
- @returns false - on success
- */
- bool get_time_with_conversion(THD *thd, MYSQL_TIME *ltime,
- ulonglong fuzzydate);
+ virtual bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)= 0;
+ bool get_date_from_int(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool get_date_from_real(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool get_date_from_string(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool get_time(THD *thd, MYSQL_TIME *ltime)
+ { return get_date(thd, ltime, Time::Options(thd)); }
// Get a DATE or DATETIME value in numeric packed format for comparison
- virtual longlong val_datetime_packed()
+ virtual longlong val_datetime_packed(THD *thd)
{
- ulonglong fuzzydate= TIME_FUZZY_DATES | TIME_INVALID_DATES;
- Datetime dt(current_thd, this, fuzzydate);
- return dt.is_valid_datetime() ? pack_time(dt.get_mysql_time()) : 0;
+ return Datetime(thd, this, Datetime::Options_cmp(thd)).to_packed();
}
// Get a TIME value in numeric packed format for comparison
- virtual longlong val_time_packed()
- {
- Time tm(this, Time::comparison_flags_for_get_date());
- return tm.is_valid_time() ? pack_time(tm.get_mysql_time()) : 0;
- }
- longlong val_datetime_packed_result();
- longlong val_time_packed_result()
+ virtual longlong val_time_packed(THD *thd)
{
- MYSQL_TIME ltime;
- ulonglong fuzzydate= Time::comparison_flags_for_get_date();
- return get_date_result(&ltime, fuzzydate) ? 0 : pack_time(&ltime);
+ return Time(thd, this, Time::Options_cmp(thd)).to_packed();
}
+ longlong val_datetime_packed_result(THD *thd);
+ longlong val_time_packed_result(THD *thd);
+
+ virtual bool get_date_result(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date(thd, ltime,fuzzydate); }
- // Get a temporal value in packed DATE/DATETIME or TIME format
- longlong val_temporal_packed(enum_field_types f_type)
- {
- return f_type == MYSQL_TYPE_TIME ? val_time_packed() :
- val_datetime_packed();
- }
- bool get_seconds(ulonglong *sec, ulong *sec_part);
- virtual bool get_date_result(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date(ltime,fuzzydate); }
/*
The method allows to determine nullness of a complex expression
without fully evaluating it, instead of calling val/result*() then
@@ -1623,35 +1815,7 @@ public:
*/
virtual void update_null_value ()
{
- switch (cmp_type()) {
- case INT_RESULT:
- (void) val_int();
- break;
- case REAL_RESULT:
- (void) val_real();
- break;
- case DECIMAL_RESULT:
- {
- my_decimal tmp;
- (void) val_decimal(&tmp);
- }
- break;
- case TIME_RESULT:
- {
- MYSQL_TIME ltime;
- (void) get_temporal_with_sql_mode(&ltime);
- }
- break;
- case STRING_RESULT:
- {
- StringBuffer<MAX_FIELD_WIDTH> tmp;
- (void) val_str(&tmp);
- }
- break;
- case ROW_RESULT:
- DBUG_ASSERT(0);
- null_value= true;
- }
+ return type_handler()->Item_update_null_value(this);
}
/*
@@ -1669,10 +1833,9 @@ public:
set field of temporary table for Item which can be switched on temporary
table during query processing (grouping and so on)
*/
- virtual void set_result_field(Field *field) {}
virtual bool is_result_field() { return 0; }
- virtual bool is_bool_type() { return false; }
virtual bool is_json_type() { return false; }
+ virtual bool is_bool_literal() const { return false; }
/* This is to handle printing of default values */
virtual bool need_parentheses_in_default() { return false; }
virtual void save_in_result_field(bool no_conversions) {}
@@ -1737,8 +1900,11 @@ public:
/*========= Item processors, to be used with Item::walk() ========*/
virtual bool remove_dependence_processor(void *arg) { return 0; }
virtual bool cleanup_processor(void *arg);
- virtual bool cleanup_excluding_fields_processor(void *arg) { return cleanup_processor(arg); }
- virtual bool cleanup_excluding_const_fields_processor(void *arg) { return cleanup_processor(arg); }
+ virtual bool cleanup_excluding_fields_processor (void *arg)
+ { return cleanup_processor(arg); }
+ bool cleanup_excluding_immutables_processor (void *arg);
+ virtual bool cleanup_excluding_const_fields_processor (void *arg)
+ { return cleanup_processor(arg); }
virtual bool collect_item_field_processor(void *arg) { return 0; }
virtual bool collect_outer_ref_processor(void *arg) {return 0; }
virtual bool check_inner_refs_processor(void *arg) { return 0; }
@@ -1772,6 +1938,12 @@ public:
return 0;
}
+ virtual bool set_extraction_flag_processor(void *arg)
+ {
+ set_extraction_flag(*(int*)arg);
+ return 0;
+ }
+
/**
Check db/table_name if they defined in item and match arg values
@@ -1787,12 +1959,22 @@ public:
Not to be used for AND/OR formulas.
*/
virtual bool excl_dep_on_table(table_map tab_map) { return false; }
- /*
+ /*
TRUE if the expression depends only on grouping fields of sel
- or can be converted to such an exression using equalities.
+ or can be converted to such an expression using equalities.
+ It also checks if the expression doesn't contain stored procedures,
+ subqueries or randomly generated elements.
Not to be used for AND/OR formulas.
*/
- virtual bool excl_dep_on_grouping_fields(st_select_lex *sel) { return false; }
+ virtual bool excl_dep_on_grouping_fields(st_select_lex *sel)
+ { return false; }
+ /*
+ TRUE if the expression depends only on fields from the left part of
+ IN subquery or can be converted to such an expression using equalities.
+ Not to be used for AND/OR formulas.
+ */
+ virtual bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
+ { return false; }
virtual bool switch_to_nullable_fields_processor(void *arg) { return 0; }
virtual bool find_function_processor (void *arg) { return 0; }
@@ -1850,6 +2032,12 @@ public:
virtual bool check_partition_func_processor(void *arg) { return 1;}
virtual bool post_fix_fields_part_expr_processor(void *arg) { return 0; }
virtual bool rename_fields_processor(void *arg) { return 0; }
+ /*
+ TRUE if the function is knowingly TRUE or FALSE.
+ Not to be used for AND/OR formulas.
+ */
+ virtual bool is_simplified_cond_processor(void *arg) { return false; }
+
/** Processor used to check acceptability of an item in the defining
expression for a virtual column
@@ -1883,8 +2071,18 @@ public:
virtual bool check_valid_arguments_processor(void *arg) { return 0; }
virtual bool update_vcol_processor(void *arg) { return 0; }
virtual bool set_fields_as_dependent_processor(void *arg) { return 0; }
+ /*
+ Find if some of the key parts of table keys (the reference on table is
+ passed as an argument) participate in the expression.
+ If there is some, sets a bit for this key in the proper key map.
+ */
+ virtual bool check_index_dependence(void *arg) { return 0; }
/*============== End of Item processor list ======================*/
+ /*
+ Does not guarantee deep copy (depends on copy ctor).
+ See build_clone() for deep copy.
+ */
virtual Item *get_copy(THD *thd)=0;
bool cache_const_expr_analyzer(uchar **arg);
@@ -1961,11 +2159,17 @@ public:
return Type_handler::type_handler_long_or_longlong(max_char_length());
}
- virtual Field *create_tmp_field(bool group, TABLE *table)
- {
- return tmp_table_field_from_field_type(table);
- }
-
+ /**
+ Create field for temporary table.
+ @param table Temporary table
+ @param [OUT] src Who created the fields
+ @param param Create parameters
+ @retval NULL (on error)
+ @retval a pointer to a newly create Field (on success)
+ */
+ virtual Field *create_tmp_field_ex(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)= 0;
virtual Item_field *field_for_view_update() { return 0; }
virtual Item *neg_transformer(THD *thd) { return NULL; }
@@ -1977,11 +2181,19 @@ public:
{ return this; }
virtual Item *derived_field_transformer_for_where(THD *thd, uchar *arg)
{ return this; }
- virtual Item *derived_grouping_field_transformer_for_where(THD *thd,
- uchar *arg)
+ virtual Item *grouping_field_transformer_for_where(THD *thd, uchar *arg)
+ { return this; }
+ /* Now is not used. */
+ virtual Item *in_subq_field_transformer_for_where(THD *thd, uchar *arg)
+ { return this; }
+ virtual Item *in_subq_field_transformer_for_having(THD *thd, uchar *arg)
{ return this; }
virtual Item *in_predicate_to_in_subs_transformer(THD *thd, uchar *arg)
{ return this; }
+ virtual Item *field_transformer_for_having_pushdown(THD *thd, uchar *arg)
+ { return this; }
+ virtual Item *multiple_equality_transformer(THD *thd, uchar *arg)
+ { return this; }
virtual bool expr_cache_is_needed(THD *) { return FALSE; }
virtual Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
bool needs_charset_converter(uint32 length, CHARSET_INFO *tocs) const
@@ -2032,6 +2244,7 @@ public:
delete this;
}
+ virtual const Item_const *get_item_const() const { return NULL; }
virtual Item_splocal *get_item_splocal() { return 0; }
virtual Rewritable_query_parameter *get_rewritable_query_parameter()
{ return 0; }
@@ -2105,14 +2318,17 @@ public:
/*
Return TRUE if the item points to a column of an outer-joined table.
*/
- virtual bool is_outer_field() const { DBUG_ASSERT(fixed); return FALSE; }
+ virtual bool is_outer_field() const { DBUG_ASSERT(is_fixed()); return FALSE; }
/**
Checks if this item or any of its descendents contains a subquery.
This is a replacement of the former Item::has_subquery() and
Item::with_subselect.
*/
- virtual bool with_subquery() const { DBUG_ASSERT(fixed); return false; }
+ virtual bool with_subquery() const { DBUG_ASSERT(is_fixed()); return false; }
+
+ virtual bool with_sum_func() const { return false; }
+ virtual With_sum_func_cache* get_with_sum_func_cache() { return NULL; }
Item* set_expr_cache(THD *thd);
@@ -2159,6 +2375,11 @@ public:
*/
virtual void under_not(Item_func_not * upper
__attribute__((unused))) {};
+ /*
+ If Item_field is wrapped in Item_direct_wrep remove this Item_direct_ref
+ wrapper.
+ */
+ virtual Item *remove_item_direct_ref() { return this; }
void register_in(THD *thd);
@@ -2176,6 +2397,29 @@ public:
{
marker &= ~EXTRACTION_MASK;
}
+ void check_pushable_cond(Pushdown_checker excl_dep_func, uchar *arg);
+ bool pushable_cond_checker_for_derived(uchar *arg)
+ {
+ return excl_dep_on_table(*((table_map *)arg));
+ }
+ bool pushable_cond_checker_for_subquery(uchar *arg)
+ {
+ return excl_dep_on_in_subq_left_part((Item_in_subselect *)arg);
+ }
+ Item *build_pushable_cond(THD *thd,
+ Pushdown_checker checker,
+ uchar *arg);
+ /*
+ Checks if this item depends only on the arg table
+ */
+ bool pushable_equality_checker_for_derived(uchar *arg)
+ {
+ return (used_tables() == *((table_map *)arg));
+ }
+ /*
+ Checks if this item consists in the left part of arg IN subquery predicate
+ */
+ bool pushable_equality_checker_for_subquery(uchar *arg);
};
MEM_ROOT *get_thd_memroot(THD *thd);
@@ -2190,6 +2434,69 @@ inline Item* get_item_copy (THD *thd, T* item)
}
+#ifndef DBUG_OFF
+/**
+ A helper class to print the data type and the value for an Item
+ in debug builds.
+*/
+class DbugStringItemTypeValue: public StringBuffer<128>
+{
+public:
+ DbugStringItemTypeValue(THD *thd, const Item *item)
+ {
+ append('(');
+ append(item->type_handler()->name().ptr());
+ append(')');
+ const_cast<Item*>(item)->print(this, QT_EXPLAIN);
+ /* Append end \0 to allow usage of c_ptr() */
+ append('\0');
+ str_length--;
+ }
+};
+#endif
+
+class With_sum_func_cache
+{
+protected:
+ bool m_with_sum_func; // True if the owner item contains a sum func
+public:
+ With_sum_func_cache()
+ :m_with_sum_func(false)
+ { }
+ With_sum_func_cache(const Item *a)
+ :m_with_sum_func(a->with_sum_func())
+ { }
+ With_sum_func_cache(const Item *a, const Item *b)
+ :m_with_sum_func(a->with_sum_func() || b->with_sum_func())
+ { }
+ With_sum_func_cache(const Item *a, const Item *b, const Item *c)
+ :m_with_sum_func(a->with_sum_func() || b->with_sum_func() ||
+ c->with_sum_func())
+ { }
+ With_sum_func_cache(const Item *a, const Item *b, const Item *c,
+ const Item *d)
+ :m_with_sum_func(a->with_sum_func() || b->with_sum_func() ||
+ c->with_sum_func() || d->with_sum_func())
+ { }
+ With_sum_func_cache(const Item *a, const Item *b, const Item *c,
+ const Item *d, const Item *e)
+ :m_with_sum_func(a->with_sum_func() || b->with_sum_func() ||
+ c->with_sum_func() || d->with_sum_func() ||
+ e->with_sum_func())
+ { }
+ void set_with_sum_func() { m_with_sum_func= true; }
+ void reset_with_sum_func() { m_with_sum_func= false; }
+ void copy_with_sum_func(const Item *item)
+ {
+ m_with_sum_func= item->with_sum_func();
+ }
+ void join_with_sum_func(const Item *item)
+ {
+ m_with_sum_func|= item->with_sum_func();
+ }
+};
+
+
/*
This class is a replacement for the former member Item::with_subselect.
Determines if the descendant Item is a subselect or some of
@@ -2293,22 +2600,23 @@ protected:
}
return true;
}
- bool excl_dep_on_grouping_fields(st_select_lex *sel)
+ bool excl_dep_on_grouping_fields(st_select_lex *sel);
+ bool eq(const Item_args *other, bool binary_cmp) const
{
- for (uint i= 0; i < arg_count; i++)
+ for (uint i= 0; i < arg_count ; i++)
{
- if (args[i]->const_item())
- continue;
- if (!args[i]->excl_dep_on_grouping_fields(sel))
+ if (!args[i]->eq(other->args[i], binary_cmp))
return false;
}
return true;
}
- bool eq(const Item_args *other, bool binary_cmp) const
+ bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
{
- for (uint i= 0; i < arg_count ; i++)
+ for (uint i= 0; i < arg_count; i++)
{
- if (!args[i]->eq(other->args[i], binary_cmp))
+ if (args[i]->const_item())
+ continue;
+ if (!args[i]->excl_dep_on_in_subq_left_part(subq_pred))
return false;
}
return true;
@@ -2364,6 +2672,30 @@ public:
{
args[arg_count++]= item;
}
+ /**
+ Extract row elements from the given position.
+ For example, for this input: (1,2),(3,4),(5,6)
+ pos=0 will extract (1,3,5)
+ pos=1 will extract (2,4,6)
+ @param thd - current thread, to allocate memory on its mem_root
+ @param rows - an array of compatible ROW-type items
+ @param pos - the element position to extract
+ */
+ bool alloc_and_extract_row_elements(THD *thd, const Item_args *rows, uint pos)
+ {
+ DBUG_ASSERT(rows->argument_count() > 0);
+ DBUG_ASSERT(rows->arguments()[0]->cols() > pos);
+ if (alloc_arguments(thd, rows->argument_count()))
+ return true;
+ for (uint i= 0; i < rows->argument_count(); i++)
+ {
+ DBUG_ASSERT(rows->arguments()[0]->cols() == rows->arguments()[i]->cols());
+ Item *arg= rows->arguments()[i]->element_index(pos);
+ add_argument(arg);
+ }
+ DBUG_ASSERT(argument_count() == rows->argument_count());
+ return false;
+ }
inline Item **arguments() const { return args; }
inline uint argument_count() const { return arg_count; }
inline void remove_arguments() { arg_count=0; }
@@ -2399,27 +2731,39 @@ public:
class Item_string;
-/**
- A common class for Item_basic_constant and Item_param
-*/
-class Item_basic_value :public Item
+class Item_fixed_hybrid: public Item
{
- bool is_basic_value(const Item *item, Type type_arg) const
- {
- return item->basic_const_item() && item->type() == type_arg;
- }
- bool is_basic_value(Type type_arg) const
+public:
+ bool fixed; // If item was fixed with fix_fields
+public:
+ Item_fixed_hybrid(THD *thd): Item(thd), fixed(false)
+ { }
+ Item_fixed_hybrid(THD *thd, Item_fixed_hybrid *item)
+ :Item(thd, item), fixed(item->fixed)
+ { }
+ bool fix_fields(THD *thd, Item **ref)
{
- return basic_const_item() && type() == type_arg;
+ DBUG_ASSERT(!fixed);
+ fixed= true;
+ return false;
}
- bool str_eq(const String *value,
- const String *other, CHARSET_INFO *cs, bool binary_cmp) const
+ void cleanup()
{
- return binary_cmp ?
- value->bin_eq(other) :
- collation.collation == cs && value->eq(other, collation.collation);
+ Item::cleanup();
+ fixed= false;
}
+ void quick_fix_field() { fixed= true; }
+ void unfix_fields() { fixed= false; }
+ bool is_fixed() const { return fixed; }
+};
+
+/**
+ A common class for Item_basic_constant and Item_param
+*/
+class Item_basic_value :public Item,
+ public Item_const
+{
protected:
// Value metadata, e.g. to make string processing easier
class Metadata: private MY_STRING_METADATA
@@ -2456,66 +2800,40 @@ protected:
fix_charset_and_length(str.charset(), dv, Metadata(&str));
}
Item_basic_value(THD *thd): Item(thd) {}
- /*
- In the xxx_eq() methods below we need to cast off "const" to
- call val_xxx(). This is OK for Item_basic_constant and Item_param.
- */
- bool null_eq(const Item *item) const
- {
- DBUG_ASSERT(is_basic_value(NULL_ITEM));
- return item->type() == NULL_ITEM;
- }
- bool str_eq(const String *value, const Item *item, bool binary_cmp) const
- {
- DBUG_ASSERT(is_basic_value(STRING_ITEM));
- return is_basic_value(item, STRING_ITEM) &&
- str_eq(value, ((Item_basic_value*)item)->val_str(NULL),
- item->collation.collation, binary_cmp);
- }
- bool real_eq(double value, const Item *item) const
- {
- DBUG_ASSERT(is_basic_value(REAL_ITEM));
- return is_basic_value(item, REAL_ITEM) &&
- value == ((Item_basic_value*)item)->val_real();
- }
- bool int_eq(longlong value, const Item *item) const
+public:
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
{
- DBUG_ASSERT(is_basic_value(INT_ITEM));
- return is_basic_value(item, INT_ITEM) &&
- value == ((Item_basic_value*)item)->val_int() &&
- (value >= 0 || item->unsigned_flag == unsigned_flag);
+
+ /*
+ create_tmp_field_ex() for this type of Items is called for:
+ - CREATE TABLE ... SELECT
+ - In ORDER BY: SELECT max(a) FROM t1 GROUP BY a ORDER BY 'const';
+ - In CURSORS:
+ DECLARE c CURSOR FOR SELECT 'test';
+ OPEN c;
+ */
+ return tmp_table_field_from_field_type_maybe_null(table, src, param,
+ type() == Item::NULL_ITEM);
}
+ bool eq(const Item *item, bool binary_cmp) const;
+ const Type_all_attributes *get_type_all_attributes_from_const() const
+ { return this; }
};
class Item_basic_constant :public Item_basic_value
{
- table_map used_table_map;
public:
- Item_basic_constant(THD *thd): Item_basic_value(thd), used_table_map(0) {};
- void set_used_tables(table_map map) { used_table_map= map; }
- table_map used_tables() const { return used_table_map; }
- bool check_vcol_func_processor(void *arg) { return FALSE;}
+ Item_basic_constant(THD *thd): Item_basic_value(thd) {};
+ bool check_vcol_func_processor(void *arg) { return false; }
+ const Item_const *get_item_const() const { return this; }
virtual Item_basic_constant *make_string_literal_concat(THD *thd,
const LEX_CSTRING *)
{
DBUG_ASSERT(0);
return this;
}
- /* to prevent drop fixed flag (no need parent cleanup call) */
- void cleanup()
- {
- /*
- Restore the original field name as it might not have been allocated
- in the statement memory. If the name is auto generated, it must be
- done again between subsequent executions of a prepared statement.
- */
- if (orig_name)
- {
- name.str= orig_name;
- name.length= strlen(orig_name);
- }
- }
};
@@ -2526,7 +2844,7 @@ public:
- CASE expression (Item_case_expr);
*****************************************************************************/
-class Item_sp_variable :public Item
+class Item_sp_variable :public Item_fixed_hybrid
{
protected:
/*
@@ -2558,7 +2876,8 @@ public:
longlong val_int();
String *val_str(String *sp);
my_decimal *val_decimal(my_decimal *decimal_value);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool val_native(THD *thd, Native *to);
bool is_null();
public:
@@ -2566,6 +2885,11 @@ public:
inline bool const_item() const;
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ return create_tmp_field_ex_simple(table, src, param);
+ }
inline int save_in_field(Field *field, bool no_conversions);
inline bool send(Protocol *protocol, st_value *buffer);
bool check_vcol_func_processor(void *arg)
@@ -2669,6 +2993,20 @@ public:
*/
Field *create_field_for_create_select(TABLE *table)
{ return create_table_field_from_handler(table); }
+
+ bool is_valid_limit_clause_variable_with_error() const
+ {
+ /*
+ In case if the variable has an anchored data type, e.g.:
+ DECLARE a TYPE OF t1.a;
+ type_handler() is set to &type_handler_null and this
+ function detects such variable as not valid in LIMIT.
+ */
+ if (type_handler()->is_limit_clause_valid_type())
+ return true;
+ my_error(ER_WRONG_SPVAR_TYPE_IN_LIMIT, MYF(0));
+ return false;
+ }
};
@@ -2815,11 +3153,10 @@ inline enum Item::Type Item_case_expr::type() const
extract a common base with class Item_ref, too.
*/
-class Item_name_const : public Item
+class Item_name_const : public Item_fixed_hybrid
{
Item *value_item;
Item *name_item;
- bool valid_args;
public:
Item_name_const(THD *thd, Item *name_arg, Item *val);
@@ -2830,7 +3167,8 @@ public:
longlong val_int();
String *val_str(String *sp);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool val_native(THD *thd, Native *to);
bool is_null();
virtual void print(String *str, enum_query_type query_type);
@@ -2844,6 +3182,17 @@ public:
return TRUE;
}
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ /*
+ We can get to here when using a CURSOR for a query with NAME_CONST():
+ DECLARE c CURSOR FOR SELECT NAME_CONST('x','y') FROM t1;
+ OPEN c;
+ */
+ return tmp_table_field_from_field_type_maybe_null(table, src, param,
+ type() == Item::NULL_ITEM);
+ }
int save_in_field(Field *field, bool no_conversions)
{
return value_item->save_in_field(field, no_conversions);
@@ -2861,15 +3210,27 @@ public:
{ return get_item_copy<Item_name_const>(thd, this); }
};
-class Item_num: public Item_basic_constant
+
+class Item_literal: public Item_basic_constant
+{
+public:
+ Item_literal(THD *thd): Item_basic_constant(thd)
+ { }
+ enum Type type() const { return CONST_ITEM; }
+ bool check_partition_func_processor(void *int_arg) { return false;}
+ bool const_item() const { return true; }
+ bool basic_const_item() const { return true; }
+};
+
+
+class Item_num: public Item_literal
{
public:
- Item_num(THD *thd): Item_basic_constant(thd) { collation.set_numeric(); }
+ Item_num(THD *thd): Item_literal(thd) { collation.set_numeric(); }
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
- bool check_partition_func_processor(void *int_arg) { return FALSE;}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
};
@@ -2878,24 +3239,26 @@ public:
class st_select_lex;
-class Item_result_field :public Item /* Item with result field */
+class Item_result_field :public Item_fixed_hybrid /* Item with result field */
{
public:
Field *result_field; /* Save result here */
- Item_result_field(THD *thd): Item(thd), result_field(0) {}
+ Item_result_field(THD *thd): Item_fixed_hybrid(thd), result_field(0) {}
// Constructor used for Item_sum/Item_cond_and/or (see Item comment)
Item_result_field(THD *thd, Item_result_field *item):
- Item(thd, item), result_field(item->result_field)
+ Item_fixed_hybrid(thd, item), result_field(item->result_field)
{}
~Item_result_field() {} /* Required with gcc 2.95 */
Field *get_tmp_table_field() { return result_field; }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param);
+ void get_tmp_field_src(Tmp_field_src *src, const Tmp_field_param *param);
/*
This implementation of used_tables() used by Item_avg_field and
Item_variance_field which work when only temporary table left, so theu
return table map of the temporary table.
*/
table_map used_tables() const { return 1; }
- void set_result_field(Field *field) { result_field= field; }
bool is_result_field() { return true; }
void save_in_result_field(bool no_conversions)
{
@@ -2978,39 +3341,6 @@ public:
};
-class Item_ident_for_show :public Item
-{
-public:
- Field *field;
- const char *db_name;
- const char *table_name;
-
- Item_ident_for_show(THD *thd, Field *par_field, const char *db_arg,
- const char *table_name_arg):
- Item(thd), field(par_field), db_name(db_arg), table_name(table_name_arg)
- {
- Type_std_attributes::set(par_field->type_std_attributes());
- }
- enum Type type() const { return FIELD_ITEM; }
- double val_real() { return field->val_real(); }
- longlong val_int() { return field->val_int(); }
- String *val_str(String *str) { return field->val_str(str); }
- my_decimal *val_decimal(my_decimal *dec) { return field->val_decimal(dec); }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- {
- return field->get_date(ltime, fuzzydate);
- }
- void make_send_field(THD *thd, Send_field *tmp_field);
- const Type_handler *type_handler() const
- {
- const Type_handler *handler= field->type_handler();
- return handler->type_handler_for_item_field();
- }
- Item* get_copy(THD *thd)
- { return get_item_copy<Item_ident_for_show>(thd, this); }
-};
-
-
class Item_field :public Item_ident,
public Load_data_outvar
{
@@ -3054,6 +3384,8 @@ public:
void save_result(Field *to);
double val_result();
longlong val_int_result();
+ bool val_native(THD *thd, Native *to);
+ bool val_native_result(THD *thd, Native *to);
String *str_result(String* tmp);
my_decimal *val_decimal_result(my_decimal *);
bool val_bool_result();
@@ -3097,16 +3429,17 @@ public:
const Type_handler *handler= field->type_handler();
return handler->type_handler_for_item_field();
}
- const Type_handler *cast_to_int_type_handler() const
- {
- return field->type_handler()->cast_to_int_type_handler();
- }
const Type_handler *real_type_handler() const
{
if (field->is_created_from_null_item)
return &type_handler_null;
return field->type_handler();
}
+ Field *create_tmp_field_from_item_field(TABLE *new_table,
+ Item_ref *orig_item,
+ const Tmp_field_param *param);
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param);
TYPELIB *get_typelib() const { return field->get_typelib(); }
enum_monotonicity_info get_monotonicity_info() const
{
@@ -3117,8 +3450,10 @@ public:
return Sql_mode_dependency(0, field->value_depends_on_sql_mode());
}
longlong val_int_endpoint(bool left_endp, bool *incl_endp);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_result(MYSQL_TIME *ltime,ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool get_date_result(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate);
+ longlong val_datetime_packed(THD *thd);
+ longlong val_time_packed(THD *thd);
bool is_null() { return field->is_null(); }
void update_null_value();
void update_table_bitmaps()
@@ -3128,13 +3463,7 @@ public:
TABLE *tab= field->table;
tab->covering_keys.intersect(field->part_of_key);
if (tab->read_set)
- bitmap_fast_test_and_set(tab->read_set, field->field_index);
- /*
- Do not mark a self-referecing virtual column.
- Such virtual columns are reported as invalid.
- */
- if (field->vcol_info && tab->vcol_set)
- tab->mark_virtual_col(field);
+ tab->mark_column_with_deps(field);
}
}
void update_used_tables()
@@ -3229,10 +3558,13 @@ public:
virtual Item *update_value_transformer(THD *thd, uchar *select_arg);
Item *derived_field_transformer_for_having(THD *thd, uchar *arg);
Item *derived_field_transformer_for_where(THD *thd, uchar *arg);
- Item *derived_grouping_field_transformer_for_where(THD *thd, uchar *arg);
+ Item *grouping_field_transformer_for_where(THD *thd, uchar *arg);
+ Item *in_subq_field_transformer_for_where(THD *thd, uchar *arg);
+ Item *in_subq_field_transformer_for_having(THD *thd, uchar *arg);
virtual void print(String *str, enum_query_type query_type);
bool excl_dep_on_table(table_map tab_map);
bool excl_dep_on_grouping_fields(st_select_lex *sel);
+ bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred);
bool cleanup_excluding_fields_processor(void *arg)
{ return field ? 0 : cleanup_processor(arg); }
bool cleanup_excluding_const_fields_processor(void *arg)
@@ -3250,6 +3582,7 @@ public:
DBUG_ASSERT(field_type() == MYSQL_TYPE_GEOMETRY);
return field->get_geometry_type();
}
+ bool check_index_dependence(void *arg);
friend class Item_default_value;
friend class Item_insert_value;
friend class st_select_lex_unit;
@@ -3337,25 +3670,24 @@ public:
max_length= 0;
name.str= name_par ? name_par : "NULL";
name.length= strlen(name.str);
- fixed= 1;
collation.set(cs, DERIVATION_IGNORABLE, MY_REPERTOIRE_ASCII);
}
enum Type type() const { return NULL_ITEM; }
bool vcol_assignment_allowed_value() const { return true; }
- bool eq(const Item *item, bool binary_cmp) const { return null_eq(item); }
double val_real();
longlong val_int();
String *val_str(String *str);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
- longlong val_datetime_packed();
- longlong val_time_packed();
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ longlong val_datetime_packed(THD *);
+ longlong val_time_packed(THD *);
int save_in_field(Field *field, bool no_conversions);
int save_safe_in_field(Field *field);
bool send(Protocol *protocol, st_value *buffer);
const Type_handler *type_handler() const { return &type_handler_null; }
bool basic_const_item() const { return 1; }
Item *clone_item(THD *thd);
+ bool const_is_null() const { return true; }
bool is_null() { return 1; }
virtual inline void print(String *str, enum_query_type query_type)
@@ -3377,9 +3709,17 @@ public:
Field *result_field;
Item_null_result(THD *thd): Item_null(thd), result_field(0) {}
bool is_result_field() { return result_field != 0; }
- enum_field_types field_type() const
+ const Type_handler *type_handler() const
+ {
+ if (result_field)
+ return result_field->type_handler();
+ return &type_handler_null;
+ }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
{
- return result_field->type();
+ DBUG_ASSERT(0);
+ return NULL;
}
void save_in_result_field(bool no_conversions)
{
@@ -3448,8 +3788,8 @@ class Item_param :public Item_basic_value,
All Item_param::set_xxx() make sure to do so.
In the state with an assigned value:
- Item_param::basic_const_item() returns true
- - Item::type() returns NULL_ITEM, INT_ITEM, REAL_ITEM, DECIMAL_ITEM,
- DATE_ITEM, STRING_ITEM, depending on the value assigned.
+ - Item::type() returns NULL_ITEM or CONST_ITEM,
+ depending on the value assigned.
So in this state Item_param behaves in many cases like a literal.
When Item_param::cleanup() is called:
@@ -3472,14 +3812,6 @@ class Item_param :public Item_basic_value,
DEFAULT_VALUE, IGNORE_VALUE
} state;
- enum Type item_type;
-
- void fix_type(Type type)
- {
- item_type= type;
- fixed= true;
- }
-
void fix_temporal(uint32 max_length_arg, uint decimals_arg);
struct CONVERSION_INFO
@@ -3578,7 +3910,6 @@ class Item_param :public Item_basic_value,
PValue value;
const String *value_query_val_str(THD *thd, String* str) const;
- bool value_eq(const Item *item, bool binary_cmp) const;
Item *value_clone_item(THD *thd);
bool is_evaluable_expression() const;
bool can_return_value() const;
@@ -3618,9 +3949,58 @@ public:
enum Type type() const
{
- return item_type;
+ // Don't pretend to be a constant unless value for this item is set.
+ switch (state) {
+ case NO_VALUE: return PARAM_ITEM;
+ case NULL_VALUE: return NULL_ITEM;
+ case SHORT_DATA_VALUE: return CONST_ITEM;
+ case LONG_DATA_VALUE: return CONST_ITEM;
+ case DEFAULT_VALUE: return PARAM_ITEM;
+ case IGNORE_VALUE: return PARAM_ITEM;
+ }
+ DBUG_ASSERT(0);
+ return PARAM_ITEM;
+ }
+
+ bool is_order_clause_position() const
+ {
+ return state == SHORT_DATA_VALUE &&
+ type_handler()->is_order_clause_position_type();
}
+ const Item_const *get_item_const() const
+ {
+ switch (state) {
+ case SHORT_DATA_VALUE:
+ case LONG_DATA_VALUE:
+ case NULL_VALUE:
+ return this;
+ case IGNORE_VALUE:
+ case DEFAULT_VALUE:
+ case NO_VALUE:
+ break;
+ }
+ return NULL;
+ }
+
+ bool const_is_null() const { return state == NULL_VALUE; }
+ bool can_return_const_value(Item_result type) const
+ {
+ return can_return_value() &&
+ value.type_handler()->cmp_type() == type &&
+ type_handler()->cmp_type() == type;
+ }
+ const longlong *const_ptr_longlong() const
+ { return can_return_const_value(INT_RESULT) ? &value.integer : NULL; }
+ const double *const_ptr_double() const
+ { return can_return_const_value(REAL_RESULT) ? &value.real : NULL; }
+ const my_decimal *const_ptr_my_decimal() const
+ { return can_return_const_value(DECIMAL_RESULT) ? &value.m_decimal : NULL; }
+ const MYSQL_TIME *const_ptr_mysql_time() const
+ { return can_return_const_value(TIME_RESULT) ? &value.time : NULL; }
+ const String *const_ptr_string() const
+ { return can_return_const_value(STRING_RESULT) ? &value.m_string : NULL; }
+
double val_real()
{
return can_return_value() ? value.val_real(this) : 0e0;
@@ -3637,7 +4017,12 @@ public:
{
return can_return_value() ? value.val_str(str, this) : NULL;
}
- bool get_date(MYSQL_TIME *tm, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *tm, date_mode_t fuzzydate);
+ bool val_native(THD *thd, Native *to)
+ {
+ return Item_param::type_handler()->Item_param_val_native(thd, this, to);
+ }
+
int save_in_field(Field *field, bool no_conversions);
void set_default();
@@ -3714,8 +4099,14 @@ public:
so no one will use parameters value in fix_fields still
parameter is constant during execution.
*/
+ bool const_item() const
+ {
+ return state != NO_VALUE;
+ }
virtual table_map used_tables() const
- { return state != NO_VALUE ? (table_map)0 : PARAM_TABLE_BIT; }
+ {
+ return state != NO_VALUE ? (table_map)0 : PARAM_TABLE_BIT;
+ }
virtual void print(String *str, enum_query_type query_type);
bool is_null()
{ DBUG_ASSERT(state != NO_VALUE); return state == NULL_VALUE; }
@@ -3745,12 +4136,6 @@ public:
*/
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
Item *clone_item(THD *thd);
- /*
- Implement by-value equality evaluation if parameter value
- is set and is a basic constant (integer, real or string).
- Otherwise return FALSE.
- */
- bool eq(const Item *item, bool binary_cmp) const;
void set_param_type_and_swap_value(Item_param *from);
Rewritable_query_parameter *get_rewritable_query_parameter()
@@ -3798,50 +4183,44 @@ public:
longlong value;
Item_int(THD *thd, int32 i,size_t length= MY_INT32_NUM_DECIMAL_DIGITS):
Item_num(thd), value((longlong) i)
- { max_length=(uint32)length; fixed= 1; }
+ { max_length=(uint32)length; }
Item_int(THD *thd, longlong i,size_t length= MY_INT64_NUM_DECIMAL_DIGITS):
Item_num(thd), value(i)
- { max_length=(uint32)length; fixed= 1; }
+ { max_length=(uint32)length; }
Item_int(THD *thd, ulonglong i, size_t length= MY_INT64_NUM_DECIMAL_DIGITS):
Item_num(thd), value((longlong)i)
- { max_length=(uint32)length; fixed= 1; unsigned_flag= 1; }
+ { max_length=(uint32)length; unsigned_flag= 1; }
Item_int(THD *thd, const char *str_arg,longlong i,size_t length):
Item_num(thd), value(i)
{
max_length=(uint32)length;
name.str= str_arg; name.length= safe_strlen(name.str);
- fixed= 1;
}
Item_int(THD *thd, const char *str_arg,longlong i,size_t length, bool flag):
Item_num(thd), value(i)
{
max_length=(uint32)length;
name.str= str_arg; name.length= safe_strlen(name.str);
- fixed= 1;
unsigned_flag= flag;
}
Item_int(THD *thd, const char *str_arg, size_t length=64);
- enum Type type() const { return INT_ITEM; }
const Type_handler *type_handler() const
{ return type_handler_long_or_longlong(); }
- Field *create_tmp_field(bool group, TABLE *table)
- { return tmp_table_field_from_field_type(table); }
Field *create_field_for_create_select(TABLE *table)
{ return tmp_table_field_from_field_type(table); }
- longlong val_int() { DBUG_ASSERT(fixed == 1); return value; }
- longlong val_int_min() const { DBUG_ASSERT(fixed == 1); return value; }
- double val_real() { DBUG_ASSERT(fixed == 1); return (double) value; }
+ const longlong *const_ptr_longlong() const { return &value; }
+ longlong val_int() { return value; }
+ longlong val_int_min() const { return value; }
+ double val_real() { return (double) value; }
my_decimal *val_decimal(my_decimal *);
String *val_str(String*);
int save_in_field(Field *field, bool no_conversions);
- bool basic_const_item() const { return 1; }
+ bool is_order_clause_position() const { return true; }
Item *clone_item(THD *thd);
virtual void print(String *str, enum_query_type query_type);
Item *neg(THD *thd);
uint decimal_precision() const
{ return (uint) (max_length - MY_TEST(value < 0)); }
- bool eq(const Item *item, bool binary_cmp) const
- { return int_eq(value, item); }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_int>(thd, this); }
};
@@ -3857,8 +4236,20 @@ class Item_bool :public Item_int
public:
Item_bool(THD *thd, const char *str_arg, longlong i):
Item_int(thd, str_arg, i, 1) {}
- bool is_bool_type() { return true; }
+ Item_bool(THD *thd, bool i) :Item_int(thd, (longlong) i, 1) { }
+ bool is_bool_literal() const { return true; }
Item *neg_transformer(THD *thd);
+ const Type_handler *type_handler() const
+ { return &type_handler_bool; }
+ const Type_handler *fixed_type_handler() const
+ { return &type_handler_bool; }
+ void quick_fix_field()
+ {
+ /*
+ We can get here when Item_bool is created instead of a constant
+ predicate at various condition optimization stages in sql_select.
+ */
+ }
};
@@ -3868,8 +4259,7 @@ public:
Item_uint(THD *thd, const char *str_arg, size_t length);
Item_uint(THD *thd, ulonglong i): Item_int(thd, i, 10) {}
Item_uint(THD *thd, const char *str_arg, longlong i, uint length);
- double val_real()
- { DBUG_ASSERT(fixed == 1); return ulonglong2double((ulonglong)value); }
+ double val_real() { return ulonglong2double((ulonglong)value); }
String *val_str(String*);
Item *clone_item(THD *thd);
virtual void print(String *str, enum_query_type query_type);
@@ -3890,7 +4280,7 @@ public:
longlong val_int();
double val_real() { return (double)val_int(); }
void set(longlong packed, enum_mysql_timestamp_type ts_type);
- bool get_date(MYSQL_TIME *to, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t fuzzydate)
{
*to= ltime;
return false;
@@ -3908,24 +4298,26 @@ public:
CHARSET_INFO *charset);
Item_decimal(THD *thd, const char *str, const my_decimal *val_arg,
uint decimal_par, uint length);
- Item_decimal(THD *thd, my_decimal *value_par);
+ Item_decimal(THD *thd, const my_decimal *value_par);
Item_decimal(THD *thd, longlong val, bool unsig);
Item_decimal(THD *thd, double val, int precision, int scale);
Item_decimal(THD *thd, const uchar *bin, int precision, int scale);
- enum Type type() const { return DECIMAL_ITEM; }
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
- longlong val_int();
- double val_real();
- String *val_str(String*);
+ longlong val_int() { return decimal_value.to_longlong(unsigned_flag); }
+ double val_real() { return decimal_value.to_double(); }
+ String *val_str(String *to) { return decimal_value.to_string(to); }
my_decimal *val_decimal(my_decimal *val) { return &decimal_value; }
+ const my_decimal *const_ptr_my_decimal() const { return &decimal_value; }
int save_in_field(Field *field, bool no_conversions);
- bool basic_const_item() const { return 1; }
Item *clone_item(THD *thd);
- virtual void print(String *str, enum_query_type query_type);
+ virtual void print(String *str, enum_query_type query_type)
+ {
+ decimal_value.to_string(&str_value);
+ str->append(str_value);
+ }
Item *neg(THD *thd);
uint decimal_precision() const { return decimal_value.precision(); }
- bool eq(const Item *, bool binary_cmp) const;
void set_decimal_value(my_decimal *value_par);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_decimal>(thd, this); }
@@ -3945,21 +4337,18 @@ public:
name.length= safe_strlen(str);
decimals=(uint8) decimal_par;
max_length= length;
- fixed= 1;
}
Item_float(THD *thd, double value_par, uint decimal_par):
Item_num(thd), presentation(0), value(value_par)
{
decimals= (uint8) decimal_par;
- fixed= 1;
}
int save_in_field(Field *field, bool no_conversions);
- enum Type type() const { return REAL_ITEM; }
const Type_handler *type_handler() const { return &type_handler_double; }
- double val_real() { DBUG_ASSERT(fixed == 1); return value; }
+ const double *const_ptr_double() const { return &value; }
+ double val_real() { return value; }
longlong val_int()
{
- DBUG_ASSERT(fixed == 1);
if (value <= (double) LONGLONG_MIN)
{
return LONGLONG_MIN;
@@ -3972,12 +4361,9 @@ public:
}
String *val_str(String*);
my_decimal *val_decimal(my_decimal *);
- bool basic_const_item() const { return 1; }
Item *clone_item(THD *thd);
Item *neg(THD *thd);
virtual void print(String *str, enum_query_type query_type);
- bool eq(const Item *item, bool binary_cmp) const
- { return real_eq(value, item); }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_float>(thd, this); }
};
@@ -4004,14 +4390,12 @@ public:
};
-class Item_string :public Item_basic_constant
+class Item_string :public Item_literal
{
protected:
void fix_from_value(Derivation dv, const Metadata metadata)
{
fix_charset_and_length(str_value.charset(), dv, metadata);
- // it is constant => can be used without fix_fields (and frequently used)
- fixed= 1;
}
void fix_and_set_name_from_value(THD *thd, Derivation dv,
const Metadata metadata)
@@ -4022,41 +4406,41 @@ protected:
protected:
/* Just create an item and do not fill string representation */
Item_string(THD *thd, CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE):
- Item_basic_constant(thd)
+ Item_literal(thd)
{
collation.set(cs, dv);
max_length= 0;
set_name(thd, NULL, 0, system_charset_info);
decimals= NOT_FIXED_DEC;
- fixed= 1;
}
public:
- Item_string(THD *thd, CHARSET_INFO *csi, const char *str_arg, uint length_arg):
- Item_basic_constant(thd)
+ Item_string(THD *thd, CHARSET_INFO *csi, const char *str_arg, uint length_arg)
+ :Item_literal(thd)
{
collation.set(csi, DERIVATION_COERCIBLE);
set_name(thd, NULL, 0, system_charset_info);
decimals= NOT_FIXED_DEC;
- fixed= 1;
str_value.copy(str_arg, length_arg, csi);
max_length= str_value.numchars() * csi->mbmaxlen;
}
// Constructors with the item name set from its value
Item_string(THD *thd, const char *str, uint length, CHARSET_INFO *cs,
- Derivation dv, uint repertoire): Item_basic_constant(thd)
+ Derivation dv, uint repertoire)
+ :Item_literal(thd)
{
str_value.set_or_copy_aligned(str, length, cs);
fix_and_set_name_from_value(thd, dv, Metadata(&str_value, repertoire));
}
Item_string(THD *thd, const char *str, size_t length,
- CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE):
- Item_basic_constant(thd)
+ CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE)
+ :Item_literal(thd)
{
str_value.set_or_copy_aligned(str, length, cs);
fix_and_set_name_from_value(thd, dv, Metadata(&str_value));
}
Item_string(THD *thd, const String *str, CHARSET_INFO *tocs, uint *conv_errors,
- Derivation dv, uint repertoire): Item_basic_constant(thd)
+ Derivation dv, uint repertoire)
+ :Item_literal(thd)
{
if (str_value.copy(str, tocs, conv_errors))
str_value.set("", 0, tocs); // EOM ?
@@ -4065,16 +4449,16 @@ public:
}
// Constructors with an externally provided item name
Item_string(THD *thd, const char *name_par, const char *str, size_t length,
- CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE):
- Item_basic_constant(thd)
+ CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE)
+ :Item_literal(thd)
{
str_value.set_or_copy_aligned(str, length, cs);
fix_from_value(dv, Metadata(&str_value));
set_name(thd, name_par,safe_strlen(name_par), system_charset_info);
}
Item_string(THD *thd, const char *name_par, const char *str, size_t length,
- CHARSET_INFO *cs, Derivation dv, uint repertoire):
- Item_basic_constant(thd)
+ CHARSET_INFO *cs, Derivation dv, uint repertoire)
+ :Item_literal(thd)
{
str_value.set_or_copy_aligned(str, length, cs);
fix_from_value(dv, Metadata(&str_value, repertoire));
@@ -4084,26 +4468,23 @@ public:
{
str_value.print(to);
}
- enum Type type() const { return STRING_ITEM; }
double val_real();
longlong val_int();
+ const String *const_ptr_string() const
+ {
+ return &str_value;
+ }
String *val_str(String*)
{
- DBUG_ASSERT(fixed == 1);
return (String*) &str_value;
}
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return get_date_from_string(ltime, fuzzydate);
+ return get_date_from_string(thd, ltime, fuzzydate);
}
int save_in_field(Field *field, bool no_conversions);
const Type_handler *type_handler() const { return &type_handler_varchar; }
- bool basic_const_item() const { return 1; }
- bool eq(const Item *item, bool binary_cmp) const
- {
- return str_eq(&str_value, item, binary_cmp);
- }
Item *clone_item(THD *thd);
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
{
@@ -4115,7 +4496,6 @@ public:
max_length= str_value.numchars() * collation.collation->mbmaxlen;
}
virtual void print(String *str, enum_query_type query_type);
- bool check_partition_func_processor(void *int_arg) {return FALSE;}
/**
Return TRUE if character-set-introducer was explicitly specified in the
@@ -4144,34 +4524,6 @@ public:
String *check_well_formed_result(bool send_error)
{ return Item::check_well_formed_result(&str_value, send_error); }
- enum_field_types odbc_temporal_literal_type(const LEX_CSTRING *type_str) const
- {
- /*
- If string is a reasonably short pure ASCII string literal,
- try to parse known ODBC style date, time or timestamp literals,
- e.g:
- SELECT {d'2001-01-01'};
- SELECT {t'10:20:30'};
- SELECT {ts'2001-01-01 10:20:30'};
- */
- if (collation.repertoire == MY_REPERTOIRE_ASCII &&
- str_value.length() < MAX_DATE_STRING_REP_LENGTH * 4)
- {
- if (type_str->length == 1)
- {
- if (type_str->str[0] == 'd') /* {d'2001-01-01'} */
- return MYSQL_TYPE_DATE;
- else if (type_str->str[0] == 't') /* {t'10:20:30'} */
- return MYSQL_TYPE_TIME;
- }
- else if (type_str->length == 2) /* {ts'2001-01-01 10:20:30'} */
- {
- if (type_str->str[0] == 't' && type_str->str[1] == 's')
- return MYSQL_TYPE_DATETIME;
- }
- }
- return MYSQL_TYPE_STRING; // Not a temporal literal
- }
Item_basic_constant *make_string_literal_concat(THD *thd,
const LEX_CSTRING *);
Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr);
@@ -4358,38 +4710,30 @@ public:
/**
Item_hex_constant -- a common class for hex literals: X'HHHH' and 0xHHHH
*/
-class Item_hex_constant: public Item_basic_constant
+class Item_hex_constant: public Item_literal
{
private:
void hex_string_init(THD *thd, const char *str, size_t str_length);
public:
- Item_hex_constant(THD *thd): Item_basic_constant(thd)
+ Item_hex_constant(THD *thd): Item_literal(thd)
{
hex_string_init(thd, "", 0);
}
Item_hex_constant(THD *thd, const char *str, size_t str_length):
- Item_basic_constant(thd)
+ Item_literal(thd)
{
hex_string_init(thd, str, str_length);
}
- enum Type type() const { return VARBIN_ITEM; }
const Type_handler *type_handler() const { return &type_handler_varchar; }
virtual Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
{
return const_charset_converter(thd, tocs, true);
}
- bool check_partition_func_processor(void *int_arg) {return FALSE;}
- bool basic_const_item() const { return 1; }
- bool eq(const Item *item, bool binary_cmp) const
- {
- return item->basic_const_item() && item->type() == type() &&
- item->cast_to_int_type_handler() == cast_to_int_type_handler() &&
- str_value.bin_eq(&((Item_hex_constant*)item)->str_value);
- }
- String *val_str(String*) { DBUG_ASSERT(fixed == 1); return &str_value; }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ const String *const_ptr_string() const { return &str_value; }
+ String *val_str(String*) { return &str_value; }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
};
@@ -4405,22 +4749,18 @@ public:
Item_hex_hybrid(THD *thd): Item_hex_constant(thd) {}
Item_hex_hybrid(THD *thd, const char *str, size_t str_length):
Item_hex_constant(thd, str, str_length) {}
+ const Type_handler *type_handler() const { return &type_handler_hex_hybrid; }
uint decimal_precision() const;
double val_real()
{
- DBUG_ASSERT(fixed == 1);
return (double) (ulonglong) Item_hex_hybrid::val_int();
}
longlong val_int()
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
return longlong_from_hex_hybrid(str_value.ptr(), str_value.length());
}
my_decimal *val_decimal(my_decimal *decimal_value)
{
- // following assert is redundant, because fixed=1 assigned in constructor
- DBUG_ASSERT(fixed == 1);
longlong value= Item_hex_hybrid::val_int();
int2my_decimal(E_DEC_FATAL_ERROR, value, TRUE, decimal_value);
return decimal_value;
@@ -4430,14 +4770,6 @@ public:
field->set_notnull();
return field->store_hex_hybrid(str_value.ptr(), str_value.length());
}
- const Type_handler *cast_to_int_type_handler() const
- {
- return &type_handler_longlong;
- }
- const Type_handler *type_handler_for_system_time() const
- {
- return &type_handler_longlong;
- }
void print(String *str, enum_query_type query_type);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_hex_hybrid>(thd, this); }
@@ -4461,12 +4793,10 @@ public:
Item_hex_constant(thd, str, str_length) {}
longlong val_int()
{
- DBUG_ASSERT(fixed == 1);
return longlong_from_string_with_check(&str_value);
}
double val_real()
{
- DBUG_ASSERT(fixed == 1);
return double_from_string_with_check(&str_value);
}
my_decimal *val_decimal(my_decimal *decimal_value)
@@ -4492,47 +4822,70 @@ public:
};
-class Item_temporal_literal :public Item_basic_constant
+class Item_timestamp_literal: public Item_literal
{
-protected:
- MYSQL_TIME cached_time;
+ Timestamp_or_zero_datetime m_value;
public:
- /**
- Constructor for Item_date_literal.
- @param ltime DATE value.
- */
- Item_temporal_literal(THD *thd, const MYSQL_TIME *ltime)
- :Item_basic_constant(thd)
+ Item_timestamp_literal(THD *thd)
+ :Item_literal(thd)
+ { }
+ const Type_handler *type_handler() const { return &type_handler_timestamp2; }
+ int save_in_field(Field *field, bool no_conversions)
+ {
+ Timestamp_or_zero_datetime_native native(m_value, decimals);
+ return native.save_in_field(field, decimals);
+ }
+ longlong val_int()
+ {
+ return m_value.to_datetime(current_thd).to_longlong();
+ }
+ double val_real()
+ {
+ return m_value.to_datetime(current_thd).to_double();
+ }
+ String *val_str(String *to)
+ {
+ return m_value.to_datetime(current_thd).to_string(to, decimals);
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return m_value.to_datetime(current_thd).to_decimal(to);
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ {
+ bool res= m_value.to_TIME(thd, ltime, fuzzydate);
+ DBUG_ASSERT(!res);
+ return res;
+ }
+ bool val_native(THD *thd, Native *to)
+ {
+ return m_value.to_native(to, decimals);
+ }
+ void set_value(const Timestamp_or_zero_datetime &value)
+ {
+ m_value= value;
+ }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_timestamp_literal>(thd, this); }
+};
+
+
+class Item_temporal_literal :public Item_literal
+{
+public:
+ Item_temporal_literal(THD *thd)
+ :Item_literal(thd)
{
collation.set(&my_charset_numeric, DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
decimals= 0;
- cached_time= *ltime;
}
- Item_temporal_literal(THD *thd, const MYSQL_TIME *ltime, uint dec_arg):
- Item_basic_constant(thd)
+ Item_temporal_literal(THD *thd, uint dec_arg):
+ Item_literal(thd)
{
collation.set(&my_charset_numeric, DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
decimals= dec_arg;
- cached_time= *ltime;
}
- bool basic_const_item() const { return true; }
- bool const_item() const { return true; }
- enum Type type() const { return DATE_ITEM; }
- bool eq(const Item *item, bool binary_cmp) const;
- bool check_partition_func_processor(void *int_arg) {return FALSE;}
-
- bool is_null()
- { return is_null_from_temporal(); }
- bool get_date_with_sql_mode(MYSQL_TIME *to);
- String *val_str(String *str)
- { return val_string_from_date(str); }
- longlong val_int()
- { return val_int_from_date(); }
- double val_real()
- { return val_real_from_date(); }
- my_decimal *val_decimal(my_decimal *decimal_value)
- { return val_decimal_from_date(decimal_value); }
int save_in_field(Field *field, bool no_conversions)
{ return save_date_in_field(field, no_conversions); }
};
@@ -4543,25 +4896,63 @@ public:
*/
class Item_date_literal: public Item_temporal_literal
{
+protected:
+ Date cached_time;
+ bool update_null()
+ {
+ return maybe_null &&
+ (null_value= cached_time.check_date_with_warn(current_thd));
+ }
public:
- Item_date_literal(THD *thd, const MYSQL_TIME *ltime)
- :Item_temporal_literal(thd, ltime)
+ Item_date_literal(THD *thd, const Date *ltime)
+ :Item_temporal_literal(thd),
+ cached_time(*ltime)
{
+ DBUG_ASSERT(cached_time.is_valid_date());
max_length= MAX_DATE_WIDTH;
- fixed= 1;
/*
If date has zero month or day, it can return NULL in case of
NO_ZERO_DATE or NO_ZERO_IN_DATE.
- We can't just check the current sql_mode here in constructor,
+ If date is `February 30`, it can return NULL in case if
+ no ALLOW_INVALID_DATES is set.
+ We can't set null_value using the current sql_mode here in constructor,
because sql_mode can change in case of prepared statements
between PREPARE and EXECUTE.
+ Here we only set maybe_null to true if the value has such anomalies.
+ Later (during execution time), if maybe_null is true, then the value
+ will be checked per row, according to the execution time sql_mode.
+ The check_date() below call should cover all cases mentioned.
*/
- maybe_null= !ltime->month || !ltime->day;
+ maybe_null= cached_time.check_date(TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE);
}
const Type_handler *type_handler() const { return &type_handler_newdate; }
void print(String *str, enum_query_type query_type);
+ const MYSQL_TIME *const_ptr_mysql_time() const
+ {
+ return cached_time.get_mysql_time();
+ }
Item *clone_item(THD *thd);
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ longlong val_int()
+ {
+ return update_null() ? 0 : cached_time.to_longlong();
+ }
+ double val_real()
+ {
+ return update_null() ? 0 : cached_time.to_double();
+ }
+ String *val_str(String *to)
+ {
+ return update_null() ? 0 : cached_time.to_string(to);
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return update_null() ? 0 : cached_time.to_decimal(to);
+ }
+ longlong val_datetime_packed(THD *thd)
+ {
+ return update_null() ? 0 : cached_time.valid_date_to_packed();
+ }
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_date_literal>(thd, this); }
};
@@ -4572,17 +4963,36 @@ public:
*/
class Item_time_literal: public Item_temporal_literal
{
+protected:
+ Time cached_time;
public:
- Item_time_literal(THD *thd, const MYSQL_TIME *ltime, uint dec_arg):
- Item_temporal_literal(thd, ltime, dec_arg)
+ Item_time_literal(THD *thd, const Time *ltime, uint dec_arg):
+ Item_temporal_literal(thd, dec_arg),
+ cached_time(*ltime)
{
+ DBUG_ASSERT(cached_time.is_valid_time());
max_length= MIN_TIME_WIDTH + (decimals ? decimals + 1 : 0);
- fixed= 1;
}
const Type_handler *type_handler() const { return &type_handler_time2; }
void print(String *str, enum_query_type query_type);
+ const MYSQL_TIME *const_ptr_mysql_time() const
+ {
+ return cached_time.get_mysql_time();
+ }
Item *clone_item(THD *thd);
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ longlong val_int() { return cached_time.to_longlong(); }
+ double val_real() { return cached_time.to_double(); }
+ String *val_str(String *to) { return cached_time.to_string(to, decimals); }
+ my_decimal *val_decimal(my_decimal *to) { return cached_time.to_decimal(to); }
+ longlong val_time_packed(THD *thd)
+ {
+ return cached_time.valid_time_to_packed();
+ }
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
+ bool val_native(THD *thd, Native *to)
+ {
+ return Time(thd, this).to_native(to, decimals);
+ }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_time_literal>(thd, this); }
};
@@ -4593,19 +5003,51 @@ public:
*/
class Item_datetime_literal: public Item_temporal_literal
{
+protected:
+ Datetime cached_time;
+ bool update_null()
+ {
+ return maybe_null &&
+ (null_value= cached_time.check_date_with_warn(current_thd));
+ }
public:
- Item_datetime_literal(THD *thd, const MYSQL_TIME *ltime, uint dec_arg):
- Item_temporal_literal(thd, ltime, dec_arg)
+ Item_datetime_literal(THD *thd, const Datetime *ltime, uint dec_arg):
+ Item_temporal_literal(thd, dec_arg),
+ cached_time(*ltime)
{
+ DBUG_ASSERT(cached_time.is_valid_datetime());
max_length= MAX_DATETIME_WIDTH + (decimals ? decimals + 1 : 0);
- fixed= 1;
// See the comment on maybe_null in Item_date_literal
- maybe_null= !ltime->month || !ltime->day;
+ maybe_null= cached_time.check_date(TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE);
}
const Type_handler *type_handler() const { return &type_handler_datetime2; }
void print(String *str, enum_query_type query_type);
+ const MYSQL_TIME *const_ptr_mysql_time() const
+ {
+ return cached_time.get_mysql_time();
+ }
Item *clone_item(THD *thd);
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ longlong val_int()
+ {
+ return update_null() ? 0 : cached_time.to_longlong();
+ }
+ double val_real()
+ {
+ return update_null() ? 0 : cached_time.to_double();
+ }
+ String *val_str(String *to)
+ {
+ return update_null() ? NULL : cached_time.to_string(to, decimals);
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return update_null() ? NULL : cached_time.to_decimal(to);
+ }
+ longlong val_datetime_packed(THD *thd)
+ {
+ return update_null() ? 0 : cached_time.valid_datetime_to_packed();
+ }
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_datetime_literal>(thd, this); }
};
@@ -4640,11 +5082,14 @@ class Item_date_literal_for_invalid_dates: public Item_date_literal
in sql_mode=TRADITIONAL.
*/
public:
- Item_date_literal_for_invalid_dates(THD *thd, const MYSQL_TIME *ltime)
- :Item_date_literal(thd, ltime) { }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+ Item_date_literal_for_invalid_dates(THD *thd, const Date *ltime)
+ :Item_date_literal(thd, ltime)
{
- *ltime= cached_time;
+ maybe_null= false;
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ {
+ cached_time.copy_to_mysql_time(ltime);
return (null_value= false);
}
};
@@ -4658,11 +5103,14 @@ class Item_datetime_literal_for_invalid_dates: public Item_datetime_literal
{
public:
Item_datetime_literal_for_invalid_dates(THD *thd,
- const MYSQL_TIME *ltime, uint dec_arg)
- :Item_datetime_literal(thd, ltime, dec_arg) { }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+ const Datetime *ltime, uint dec_arg)
+ :Item_datetime_literal(thd, ltime, dec_arg)
+ {
+ maybe_null= false;
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- *ltime= cached_time;
+ cached_time.copy_to_mysql_time(ltime);
return (null_value= false);
}
};
@@ -4859,8 +5307,10 @@ struct st_sp_security_context;
class Item_sp
{
-public:
+protected:
+ // Can be NULL in some non-SELECT queries
Name_resolution_context *context;
+public:
sp_name *m_name;
sp_head *m_sp;
TABLE *dummy_table;
@@ -4882,9 +5332,15 @@ public:
bool execute_impl(THD *thd, Item **args, uint arg_count);
bool init_result_field(THD *thd, uint max_length, uint maybe_null,
bool *null_value, LEX_CSTRING *name);
+ void process_error(THD *thd)
+ {
+ if (context)
+ context->process_error(thd);
+ }
};
-class Item_ref :public Item_ident
+class Item_ref :public Item_ident,
+ protected With_sum_func_cache
{
protected:
void set_properties();
@@ -4920,7 +5376,8 @@ public:
/* Constructor need to process subselect with temporary tables (see Item) */
Item_ref(THD *thd, Item_ref *item)
- :Item_ident(thd, item), set_properties_only(0), ref(item->ref) {}
+ :Item_ident(thd, item), With_sum_func_cache(*item),
+ set_properties_only(0), ref(item->ref) {}
enum Type type() const { return REF_ITEM; }
enum Type real_type() const { return ref ? (*ref)->type() :
REF_ITEM; }
@@ -4936,13 +5393,15 @@ public:
my_decimal *val_decimal(my_decimal *);
bool val_bool();
String *val_str(String* tmp);
+ bool val_native(THD *thd, Native *to);
bool is_null();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
- longlong val_datetime_packed();
- longlong val_time_packed();
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ longlong val_datetime_packed(THD *);
+ longlong val_time_packed(THD *);
double val_result();
longlong val_int_result();
String *str_result(String* tmp);
+ bool val_native_result(THD *thd, Native *to);
my_decimal *val_decimal_result(my_decimal *);
bool val_bool_result();
bool is_null_result();
@@ -4960,6 +5419,9 @@ public:
Field *get_tmp_table_field()
{ return result_field ? result_field : (*ref)->get_tmp_table_field(); }
Item *get_tmp_table_item(THD *thd);
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param);
+ Item* propagate_equal_fields(THD *, const Context &, COND_EQUAL *);
table_map used_tables() const;
void update_used_tables();
COND *build_equal_items(THD *thd, COND_EQUAL *inherited,
@@ -5094,6 +5556,8 @@ public:
}
bool excl_dep_on_grouping_fields(st_select_lex *sel)
{ return (*ref)->excl_dep_on_grouping_fields(sel); }
+ bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
+ { return (*ref)->excl_dep_on_in_subq_left_part(subq_pred); }
bool cleanup_excluding_fields_processor(void *arg)
{
Item *item= real_item();
@@ -5110,6 +5574,15 @@ public:
return 0;
return cleanup_processor(arg);
}
+ bool with_sum_func() const { return m_with_sum_func; }
+ With_sum_func_cache* get_with_sum_func_cache() { return this; }
+ Item *field_transformer_for_having_pushdown(THD *thd, uchar *arg)
+ { return (*ref)->field_transformer_for_having_pushdown(thd, arg); }
+ Item *remove_item_direct_ref()
+ {
+ *ref= (*ref)->remove_item_direct_ref();
+ return this;
+ }
};
@@ -5149,13 +5622,16 @@ public:
my_decimal *val_decimal(my_decimal *);
bool val_bool();
String *val_str(String* tmp);
+ bool val_native(THD *thd, Native *to);
bool is_null();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
- longlong val_datetime_packed();
- longlong val_time_packed();
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ longlong val_datetime_packed(THD *);
+ longlong val_time_packed(THD *);
virtual Ref_Type ref_type() { return DIRECT_REF; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_direct_ref>(thd, this); }
+ Item *remove_item_direct_ref()
+ { return (*ref)->remove_item_direct_ref(); }
};
@@ -5200,7 +5676,8 @@ class Expression_cache_tracker;
*/
class Item_cache_wrapper :public Item_result_field,
- public With_subquery_cache
+ public With_subquery_cache,
+ protected With_sum_func_cache
{
private:
/* Pointer on the cached expression */
@@ -5228,6 +5705,8 @@ public:
enum Type type() const { return EXPR_CACHE_ITEM; }
enum Type real_type() const { return orig_item->type(); }
bool with_subquery() const { DBUG_ASSERT(fixed); return m_with_subquery; }
+ bool with_sum_func() const { return m_with_sum_func; }
+ With_sum_func_cache* get_with_sum_func_cache() { return this; }
bool set_cache(THD *thd);
Expression_cache_tracker* init_tracker(MEM_ROOT *mem_root);
@@ -5242,10 +5721,11 @@ public:
double val_real();
longlong val_int();
String *val_str(String* tmp);
+ bool val_native(THD *thd, Native *to);
my_decimal *val_decimal(my_decimal *);
bool val_bool();
bool is_null();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool send(Protocol *protocol, st_value *buffer);
void save_org_in_field(Field *field,
fast_field_copier data __attribute__ ((__unused__)))
@@ -5407,10 +5887,12 @@ public:
}
bool excl_dep_on_table(table_map tab_map);
bool excl_dep_on_grouping_fields(st_select_lex *sel);
+ bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred);
Item *derived_field_transformer_for_having(THD *thd, uchar *arg);
Item *derived_field_transformer_for_where(THD *thd, uchar *arg);
- Item *derived_grouping_field_transformer_for_where(THD *thd,
- uchar *arg);
+ Item *grouping_field_transformer_for_where(THD *thd, uchar *arg);
+ Item *in_subq_field_transformer_for_where(THD *thd, uchar *arg);
+ Item *in_subq_field_transformer_for_having(THD *thd, uchar *arg);
void save_val(Field *to)
{
@@ -5440,6 +5922,12 @@ public:
else
return Item_direct_ref::val_str(tmp);
}
+ bool val_native(THD *thd, Native *to)
+ {
+ if (check_null_ref())
+ return true;
+ return Item_direct_ref::val_native(thd, to);
+ }
my_decimal *val_decimal(my_decimal *tmp)
{
if (check_null_ref())
@@ -5461,28 +5949,28 @@ public:
else
return Item_direct_ref::is_null();
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if (check_null_ref())
{
bzero((char*) ltime,sizeof(*ltime));
return 1;
}
- return Item_direct_ref::get_date(ltime, fuzzydate);
+ return Item_direct_ref::get_date(thd, ltime, fuzzydate);
}
- longlong val_time_packed()
+ longlong val_time_packed(THD *thd)
{
if (check_null_ref())
return 0;
else
- return Item_direct_ref::val_time_packed();
+ return Item_direct_ref::val_time_packed(thd);
}
- longlong val_datetime_packed()
+ longlong val_datetime_packed(THD *thd)
{
if (check_null_ref())
return 0;
else
- return Item_direct_ref::val_datetime_packed();
+ return Item_direct_ref::val_datetime_packed(thd);
}
bool send(Protocol *protocol, st_value *buffer);
void save_org_in_field(Field *field,
@@ -5518,6 +6006,9 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_direct_view_ref>(thd, this); }
+ Item *field_transformer_for_having_pushdown(THD *thd, uchar *arg)
+ { return this; }
+ Item *remove_item_direct_ref() { return this; }
};
@@ -5607,7 +6098,8 @@ public:
String* val_str(String* s);
my_decimal *val_decimal(my_decimal *);
bool val_bool();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool val_native(THD *thd, Native *to);
virtual void print(String *str, enum_query_type query_type);
table_map used_tables() const;
Item *get_copy(THD *thd)
@@ -5699,12 +6191,12 @@ protected:
*/
Item_copy(THD *thd, Item *i): Item(thd)
{
+ DBUG_ASSERT(i->is_fixed());
item= i;
null_value=maybe_null=item->maybe_null;
Type_std_attributes::set(item);
name= item->name;
set_handler(item->type_handler());
- fixed= item->fixed;
}
public:
@@ -5725,6 +6217,12 @@ public:
const Type_handler *type_handler() const
{ return Type_handler_hybrid_field_type::type_handler(); }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ DBUG_ASSERT(0);
+ return NULL;
+ }
void make_send_field(THD *thd, Send_field *field)
{ item->make_send_field(thd, field); }
table_map used_tables() const { return (table_map) 1L; }
@@ -5766,8 +6264,8 @@ public:
my_decimal *val_decimal(my_decimal *);
double val_real();
longlong val_int();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_string(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_string(thd, ltime, fuzzydate); }
void copy();
int save_in_field(Field *field, bool no_conversions);
Item *get_copy(THD *thd)
@@ -5775,6 +6273,76 @@ public:
};
+/**
+ We need a separate class Item_copy_timestamp because
+ TIMESTAMP->string->TIMESTAMP conversion is not round trip safe
+ near the DST change, e.g. '2010-10-31 02:25:26' can mean:
+ - my_time_t(1288477526) - summer time in Moscow
+ - my_time_t(1288481126) - winter time in Moscow, one hour later
+*/
+class Item_copy_timestamp: public Item_copy
+{
+ Timestamp_or_zero_datetime m_value;
+ bool sane() const { return !null_value || m_value.is_zero_datetime(); }
+public:
+ Item_copy_timestamp(THD *thd, Item *arg): Item_copy(thd, arg) { }
+ const Type_handler *type_handler() const { return &type_handler_timestamp2; }
+ void copy()
+ {
+ Timestamp_or_zero_datetime_native_null tmp(current_thd, item, false);
+ null_value= tmp.is_null();
+ m_value= tmp.is_null() ? Timestamp_or_zero_datetime() :
+ Timestamp_or_zero_datetime(tmp);
+ }
+ int save_in_field(Field *field, bool no_conversions)
+ {
+ DBUG_ASSERT(sane());
+ if (null_value)
+ return set_field_to_null(field);
+ Timestamp_or_zero_datetime_native native(m_value, decimals);
+ return native.save_in_field(field, decimals);
+ }
+ longlong val_int()
+ {
+ DBUG_ASSERT(sane());
+ return null_value ? 0 :
+ m_value.to_datetime(current_thd).to_longlong();
+ }
+ double val_real()
+ {
+ DBUG_ASSERT(sane());
+ return null_value ? 0e0 :
+ m_value.to_datetime(current_thd).to_double();
+ }
+ String *val_str(String *to)
+ {
+ DBUG_ASSERT(sane());
+ return null_value ? NULL :
+ m_value.to_datetime(current_thd).to_string(to, decimals);
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ DBUG_ASSERT(sane());
+ return null_value ? NULL :
+ m_value.to_datetime(current_thd).to_decimal(to);
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ {
+ DBUG_ASSERT(sane());
+ bool res= m_value.to_TIME(thd, ltime, fuzzydate);
+ DBUG_ASSERT(!res);
+ return null_value || res;
+ }
+ bool val_native(THD *thd, Native *to)
+ {
+ DBUG_ASSERT(sane());
+ return null_value || m_value.to_native(to, decimals);
+ }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_copy_timestamp>(thd, this); }
+};
+
+
/*
Cached_item_XXX objects are not exactly caches. They do the following:
@@ -5903,7 +6471,13 @@ public:
double val_real();
longlong val_int();
my_decimal *val_decimal(my_decimal *decimal_value);
- bool get_date(MYSQL_TIME *ltime,ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate);
+ bool val_native(THD *thd, Native *to);
+ bool val_native_result(THD *thd, Native *to);
+ longlong val_datetime_packed(THD *thd)
+ { return Item::val_datetime_packed(thd); }
+ longlong val_time_packed(THD *thd)
+ { return Item::val_time_packed(thd); }
/* Result variants */
double val_result();
@@ -5912,10 +6486,11 @@ public:
my_decimal *val_decimal_result(my_decimal *val);
bool val_bool_result();
bool is_null_result();
- bool get_date_result(MYSQL_TIME *ltime,ulonglong fuzzydate);
+ bool get_date_result(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool send(Protocol *protocol, st_value *buffer);
int save_in_field(Field *field_arg, bool no_conversions);
+ void save_in_result_field(bool no_conversions);
bool save_in_param(THD *thd, Item_param *param)
{
// It should not be possible to have "EXECUTE .. USING DEFAULT(a)"
@@ -5935,6 +6510,7 @@ public:
bool update_vcol_processor(void *arg) { return 0; }
bool check_field_expression_processor(void *arg);
bool check_func_default_processor(void *arg) { return true; }
+ bool register_field_in_read_map(void *arg);
bool walk(Item_processor processor, bool walk_subquery, void *args)
{
@@ -5943,6 +6519,8 @@ public:
}
Item *transform(THD *thd, Item_transformer transformer, uchar *args);
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param);
};
@@ -5958,10 +6536,11 @@ public:
return false;
}
bool is_evaluable_expression() const { return false; }
- bool fix_fields(THD *thd, Item **items)
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
{
- fixed= true;
- return false;
+ DBUG_ASSERT(0);
+ return NULL;
}
String *val_str(String *str)
{
@@ -5987,7 +6566,7 @@ public:
null_value= true;
return 0;
}
- bool get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(0); // never should be called
return null_value= true;
@@ -6061,6 +6640,7 @@ public:
param->set_ignore();
return false;
}
+
Item *get_copy(THD *thd)
{ return get_item_copy<Item_ignore_specification>(thd, this); }
};
@@ -6207,7 +6787,7 @@ public:
for any value.
*/
-class Item_cache: public Item_basic_constant,
+class Item_cache: public Item_fixed_hybrid,
public Type_handler_hybrid_field_type
{
protected:
@@ -6226,6 +6806,8 @@ protected:
cache_value() will set this flag to TRUE.
*/
bool value_cached;
+
+ table_map used_table_map;
public:
/*
This is set if at least one of the values of a sub query is NULL
@@ -6236,27 +6818,29 @@ public:
bool null_value_inside;
Item_cache(THD *thd):
- Item_basic_constant(thd),
+ Item_fixed_hybrid(thd),
Type_handler_hybrid_field_type(&type_handler_string),
example(0), cached_field(0),
- value_cached(0)
+ value_cached(0),
+ used_table_map(0)
{
- fixed= 1;
maybe_null= 1;
null_value= 1;
null_value_inside= true;
+ fixed= 1;
}
protected:
Item_cache(THD *thd, const Type_handler *handler):
- Item_basic_constant(thd),
+ Item_fixed_hybrid(thd),
Type_handler_hybrid_field_type(handler),
example(0), cached_field(0),
- value_cached(0)
+ value_cached(0),
+ used_table_map(0)
{
- fixed= 1;
maybe_null= 1;
null_value= 1;
null_value_inside= true;
+ fixed= 1;
}
public:
@@ -6269,10 +6853,18 @@ public:
cached_field= ((Item_field *)item)->field;
return 0;
};
+
+ void set_used_tables(table_map map) { used_table_map= map; }
+ table_map used_tables() const { return used_table_map; }
enum Type type() const { return CACHE_ITEM; }
const Type_handler *type_handler() const
{ return Type_handler_hybrid_field_type::type_handler(); }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ return create_tmp_field_ex_simple(table, src, param);
+ }
virtual void keep_array() {}
virtual void print(String *str, enum_query_type query_type);
@@ -6303,15 +6895,14 @@ public:
bool fix_fields(THD *thd, Item **ref)
{
fixed= 1;
- if (example && !example->fixed)
+ if (example && !example->is_fixed())
return example->fix_fields(thd, ref);
return 0;
}
void cleanup()
{
clear();
- Item_basic_constant::cleanup();
- fixed= 0;
+ Item_fixed_hybrid::cleanup();
}
/**
Check if saved item has a non-NULL value.
@@ -6346,6 +6937,8 @@ public:
virtual void set_null();
bool walk(Item_processor processor, bool walk_subquery, void *arg)
{
+ if (arg == STOP_PTR)
+ return FALSE;
if (example && example->walk(processor, walk_subquery, arg))
return TRUE;
return (this->*processor)(arg);
@@ -6363,7 +6956,11 @@ public:
{ return convert_to_basic_const_item(thd); }
Item *derived_field_transformer_for_where(THD *thd, uchar *arg)
{ return convert_to_basic_const_item(thd); }
- Item *derived_grouping_field_transformer_for_where(THD *thd, uchar *arg)
+ Item *grouping_field_transformer_for_where(THD *thd, uchar *arg)
+ { return convert_to_basic_const_item(thd); }
+ Item *in_subq_field_transformer_for_where(THD *thd, uchar *arg)
+ { return convert_to_basic_const_item(thd); }
+ Item *in_subq_field_transformer_for_having(THD *thd, uchar *arg)
{ return convert_to_basic_const_item(thd); }
};
@@ -6382,8 +6979,8 @@ public:
longlong val_int();
String* val_str(String *str);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_int(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_int(thd, ltime, fuzzydate); }
bool cache_value();
int save_in_field(Field *field, bool no_conversions);
Item *convert_to_basic_const_item(THD *thd);
@@ -6395,9 +6992,12 @@ public:
class Item_cache_year: public Item_cache_int
{
public:
- Item_cache_year(THD *thd): Item_cache_int(thd, &type_handler_year) { }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_year(ltime, fuzzydate); }
+ Item_cache_year(THD *thd, const Type_handler *handler)
+ :Item_cache_int(thd, handler) { }
+ bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
+ {
+ return type_handler_year.Item_get_date_with_warn(thd, this, to, mode);
+ }
};
@@ -6406,14 +7006,8 @@ class Item_cache_temporal: public Item_cache_int
protected:
Item_cache_temporal(THD *thd, const Type_handler *handler);
public:
- String* val_str(String *str);
- my_decimal *val_decimal(my_decimal *);
- longlong val_int();
- longlong val_datetime_packed();
- longlong val_time_packed();
- double val_real();
bool cache_value();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
int save_in_field(Field *field, bool no_conversions);
bool setup(THD *thd, Item *item)
{
@@ -6443,6 +7037,35 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_cache_time>(thd, this); }
Item *make_literal(THD *);
+ longlong val_datetime_packed(THD *thd)
+ {
+ Datetime::Options_cmp opt(thd);
+ return has_value() ? Datetime(thd, this, opt).to_packed() : 0;
+ }
+ longlong val_time_packed(THD *thd)
+ {
+ return has_value() ? value : 0;
+ }
+ longlong val_int()
+ {
+ return has_value() ? Time(this).to_longlong() : 0;
+ }
+ double val_real()
+ {
+ return has_value() ? Time(this).to_double() : 0;
+ }
+ String *val_str(String *to)
+ {
+ return has_value() ? Time(this).to_string(to, decimals) : NULL;
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return has_value() ? Time(this).to_decimal(to) : NULL;
+ }
+ bool val_native(THD *thd, Native *to)
+ {
+ return has_value() ? Time(thd, this).to_native(to, decimals) : true;
+ }
};
@@ -6454,6 +7077,30 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_cache_datetime>(thd, this); }
Item *make_literal(THD *);
+ longlong val_datetime_packed(THD *thd)
+ {
+ return has_value() ? value : 0;
+ }
+ longlong val_time_packed(THD *thd)
+ {
+ return Time(thd, this, Time::Options_cmp(thd)).to_packed();
+ }
+ longlong val_int()
+ {
+ return has_value() ? Datetime(this).to_longlong() : 0;
+ }
+ double val_real()
+ {
+ return has_value() ? Datetime(this).to_double() : 0;
+ }
+ String *val_str(String *to)
+ {
+ return has_value() ? Datetime(this).to_string(to, decimals) : NULL;
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return has_value() ? Datetime(this).to_decimal(to) : NULL;
+ }
};
@@ -6465,6 +7112,65 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_cache_date>(thd, this); }
Item *make_literal(THD *);
+ longlong val_datetime_packed(THD *thd)
+ {
+ return has_value() ? value : 0;
+ }
+ longlong val_time_packed(THD *thd)
+ {
+ return Time(thd, this, Time::Options_cmp(thd)).to_packed();
+ }
+ longlong val_int() { return has_value() ? Date(this).to_longlong() : 0; }
+ double val_real() { return has_value() ? Date(this).to_double() : 0; }
+ String *val_str(String *to)
+ {
+ return has_value() ? Date(this).to_string(to) : NULL;
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return has_value() ? Date(this).to_decimal(to) : NULL;
+ }
+};
+
+
+class Item_cache_timestamp: public Item_cache
+{
+ Timestamp_or_zero_datetime_native m_native;
+ Datetime to_datetime(THD *thd);
+public:
+ Item_cache_timestamp(THD *thd)
+ :Item_cache(thd, &type_handler_timestamp2) { }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_cache_timestamp>(thd, this); }
+ bool cache_value();
+ String* val_str(String *to)
+ {
+ return to_datetime(current_thd).to_string(to, decimals);
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return to_datetime(current_thd).to_decimal(to);
+ }
+ longlong val_int()
+ {
+ return to_datetime(current_thd).to_longlong();
+ }
+ double val_real()
+ {
+ return to_datetime(current_thd).to_double();
+ }
+ longlong val_datetime_packed(THD *thd)
+ {
+ return to_datetime(current_thd).to_packed();
+ }
+ longlong val_time_packed(THD *thd)
+ {
+ DBUG_ASSERT(0);
+ return 0;
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ int save_in_field(Field *field, bool no_conversions);
+ bool val_native(THD *thd, Native *to);
};
@@ -6480,8 +7186,8 @@ public:
double val_real();
longlong val_int();
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_real(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_real(thd, ltime, fuzzydate); }
bool cache_value();
Item *convert_to_basic_const_item(THD *thd);
};
@@ -6522,8 +7228,11 @@ public:
longlong val_int();
String* val_str(String *str);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_decimal(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
+ {
+ return decimal_to_datetime_with_warn(thd, VDec(this).ptr(), to, mode,
+ NULL, NULL);
+ }
bool cache_value();
Item *convert_to_basic_const_item(THD *thd);
Item *get_copy(THD *thd)
@@ -6550,8 +7259,8 @@ public:
longlong val_int();
String* val_str(String *);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_string(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_string(thd, ltime, fuzzydate); }
CHARSET_INFO *charset() const { return value->charset(); };
int save_in_field(Field *field, bool no_conversions);
bool cache_value();
@@ -6632,7 +7341,7 @@ public:
illegal_method_call((const char*)"val_decimal");
return 0;
};
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
illegal_method_call((const char*)"val_decimal");
return true;
@@ -6681,7 +7390,7 @@ public:
Type_handler_hybrid_field_type(item->real_type_handler()),
enum_set_typelib(0)
{
- DBUG_ASSERT(item->fixed);
+ DBUG_ASSERT(item->is_fixed());
maybe_null= item->maybe_null;
}
Item_type_holder(THD *thd,
@@ -6732,8 +7441,9 @@ public:
longlong val_int();
my_decimal *val_decimal(my_decimal *);
String *val_str(String*);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
- Field *create_tmp_field(bool group, TABLE *table)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
{
return Item_type_holder::real_type_handler()->
make_and_init_table_field(&name, Record_addr(maybe_null),
@@ -6877,7 +7587,7 @@ bool fix_escape_item(THD *thd, Item *escape_item, String *tmp_str,
inline bool Virtual_column_info::is_equal(const Virtual_column_info* vcol) const
{
- return field_type == vcol->get_real_type()
+ return type_handler() == vcol->type_handler()
&& stored_in_db == vcol->is_stored()
&& expr->eq(vcol->expr, true);
}
@@ -6887,4 +7597,39 @@ inline void Virtual_column_info::print(String* str)
expr->print_for_table_def(str);
}
+inline bool TABLE::mark_column_with_deps(Field *field)
+{
+ bool res;
+ if (!(res= bitmap_fast_test_and_set(read_set, field->field_index)))
+ {
+ if (field->vcol_info)
+ mark_virtual_column_deps(field);
+ }
+ return res;
+}
+
+inline bool TABLE::mark_virtual_column_with_deps(Field *field)
+{
+ bool res;
+ DBUG_ASSERT(field->vcol_info);
+ if (!(res= bitmap_fast_test_and_set(read_set, field->field_index)))
+ mark_virtual_column_deps(field);
+ return res;
+}
+
+inline void TABLE::mark_virtual_column_deps(Field *field)
+{
+ DBUG_ASSERT(field->vcol_info);
+ DBUG_ASSERT(field->vcol_info->expr);
+ field->vcol_info->expr->walk(&Item::register_field_in_read_map, 1, 0);
+}
+
+inline void TABLE::use_all_stored_columns()
+{
+ bitmap_set_all(read_set);
+ if (Field **vf= vfield)
+ for (; *vf; vf++)
+ bitmap_clear_bit(read_set, (*vf)->field_index);
+}
+
#endif /* SQL_ITEM_INCLUDED */
diff --git a/sql/item_buff.cc b/sql/item_buff.cc
index a64e092a434..05cef6871be 100644
--- a/sql/item_buff.cc
+++ b/sql/item_buff.cc
@@ -47,9 +47,9 @@ Cached_item *new_Cached_item(THD *thd, Item *item, bool pass_through_ref)
}
switch (item->result_type()) {
case STRING_RESULT:
- return new Cached_item_str(thd, (Item_field *) item);
+ return new Cached_item_str(thd, item);
case INT_RESULT:
- return new Cached_item_int((Item_field *) item);
+ return new Cached_item_int(item);
case REAL_RESULT:
return new Cached_item_real(item);
case DECIMAL_RESULT:
@@ -225,16 +225,15 @@ Cached_item_decimal::Cached_item_decimal(Item *it)
bool Cached_item_decimal::cmp()
{
- my_decimal tmp;
- my_decimal *ptmp= item->val_decimal(&tmp);
- if (null_value != item->null_value ||
- (!item->null_value && my_decimal_cmp(&value, ptmp)))
+ VDec tmp(item);
+ if (null_value != tmp.is_null() ||
+ (!tmp.is_null() && tmp.cmp(&value)))
{
- null_value= item->null_value;
+ null_value= tmp.is_null();
/* Save only not null values */
if (!null_value)
{
- my_decimal2decimal(ptmp, &value);
+ my_decimal2decimal(tmp.ptr(), &value);
return TRUE;
}
return FALSE;
@@ -245,17 +244,9 @@ bool Cached_item_decimal::cmp()
int Cached_item_decimal::cmp_read_only()
{
- my_decimal tmp;
- my_decimal *ptmp= item->val_decimal(&tmp);
+ VDec tmp(item);
if (null_value)
- {
- if (item->null_value)
- return 0;
- else
- return -1;
- }
- if (item->null_value)
- return 1;
- return my_decimal_cmp(&value, ptmp);
+ return tmp.is_null() ? 0 : -1;
+ return tmp.is_null() ? 1 : value.cmp(tmp.ptr());
}
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index fe6b8feb4de..c7b83fae70d 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2019, MariaDB
+ Copyright (c) 2009, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,32 +31,8 @@
#include <m_ctype.h>
#include "sql_select.h"
#include "sql_parse.h" // check_stack_overrun
-#include "sql_time.h" // make_truncated_value_warning
#include "sql_base.h" // dynamic_column_error_message
-/**
- find an temporal type (item) that others will be converted to
- for the purpose of comparison.
-
- this is the type that will be used in warnings like
- "Incorrect <<TYPE>> value".
-*/
-static Item *find_date_time_item(Item **args, uint nargs, uint col)
-{
- Item *date_arg= 0, **arg, **arg_end;
- for (arg= args, arg_end= args + nargs; arg != arg_end ; arg++)
- {
- Item *item= arg[0]->element_index(col);
- if (item->cmp_type() != TIME_RESULT)
- continue;
- if (item->field_type() == MYSQL_TYPE_DATETIME)
- return item;
- if (!date_arg)
- date_arg= item;
- }
- return date_arg;
-}
-
/*
Compare row signature of two expressions
@@ -351,7 +327,7 @@ static bool convert_const_to_int(THD *thd, Item_field *field_item,
at all.
*/
if ((*item)->const_item() && !(*item)->is_expensive() &&
- !(*item)->with_sum_func)
+ !(*item)->with_sum_func())
{
TABLE *table= field->table;
Sql_mode_save sql_mode(thd);
@@ -614,6 +590,18 @@ bool Arg_comparator::set_cmp_func_datetime()
}
+bool Arg_comparator::set_cmp_func_native()
+{
+ THD *thd= current_thd;
+ m_compare_collation= &my_charset_numeric;
+ func= is_owner_equal_func() ? &Arg_comparator::compare_e_native :
+ &Arg_comparator::compare_native;
+ a= cache_converted_constant(thd, a, &a_cache, compare_type_handler());
+ b= cache_converted_constant(thd, b, &b_cache, compare_type_handler());
+ return false;
+}
+
+
bool Arg_comparator::set_cmp_func_int()
{
THD *thd= current_thd;
@@ -730,10 +718,11 @@ Item** Arg_comparator::cache_converted_constant(THD *thd_arg, Item **value,
int Arg_comparator::compare_time()
{
- longlong val1= (*a)->val_time_packed();
+ THD *thd= current_thd;
+ longlong val1= (*a)->val_time_packed(thd);
if (!(*a)->null_value)
{
- longlong val2= (*b)->val_time_packed();
+ longlong val2= (*b)->val_time_packed(thd);
if (!(*b)->null_value)
return compare_not_null_values(val1, val2);
}
@@ -745,8 +734,9 @@ int Arg_comparator::compare_time()
int Arg_comparator::compare_e_time()
{
- longlong val1= (*a)->val_time_packed();
- longlong val2= (*b)->val_time_packed();
+ THD *thd= current_thd;
+ longlong val1= (*a)->val_time_packed(thd);
+ longlong val2= (*b)->val_time_packed(thd);
if ((*a)->null_value || (*b)->null_value)
return MY_TEST((*a)->null_value && (*b)->null_value);
return MY_TEST(val1 == val2);
@@ -756,10 +746,11 @@ int Arg_comparator::compare_e_time()
int Arg_comparator::compare_datetime()
{
- longlong val1= (*a)->val_datetime_packed();
+ THD *thd= current_thd;
+ longlong val1= (*a)->val_datetime_packed(thd);
if (!(*a)->null_value)
{
- longlong val2= (*b)->val_datetime_packed();
+ longlong val2= (*b)->val_datetime_packed(thd);
if (!(*b)->null_value)
return compare_not_null_values(val1, val2);
}
@@ -771,8 +762,9 @@ int Arg_comparator::compare_datetime()
int Arg_comparator::compare_e_datetime()
{
- longlong val1= (*a)->val_datetime_packed();
- longlong val2= (*b)->val_datetime_packed();
+ THD *thd= current_thd;
+ longlong val1= (*a)->val_datetime_packed(thd);
+ longlong val2= (*b)->val_datetime_packed(thd);
if ((*a)->null_value || (*b)->null_value)
return MY_TEST((*a)->null_value && (*b)->null_value);
return MY_TEST(val1 == val2);
@@ -815,6 +807,39 @@ int Arg_comparator::compare_e_string()
}
+int Arg_comparator::compare_native()
+{
+ THD *thd= current_thd;
+ if (!(*a)->val_native_with_conversion(thd, &m_native1,
+ compare_type_handler()))
+ {
+ if (!(*b)->val_native_with_conversion(thd, &m_native2,
+ compare_type_handler()))
+ {
+ if (set_null)
+ owner->null_value= 0;
+ return compare_type_handler()->cmp_native(m_native1, m_native2);
+ }
+ }
+ if (set_null)
+ owner->null_value= 1;
+ return -1;
+}
+
+
+int Arg_comparator::compare_e_native()
+{
+ THD *thd= current_thd;
+ bool res1= (*a)->val_native_with_conversion(thd, &m_native1,
+ compare_type_handler());
+ bool res2= (*b)->val_native_with_conversion(thd, &m_native2,
+ compare_type_handler());
+ if (res1 || res2)
+ return MY_TEST(res1 == res2);
+ return MY_TEST(compare_type_handler()->cmp_native(m_native1, m_native2) == 0);
+}
+
+
int Arg_comparator::compare_real()
{
/*
@@ -843,21 +868,17 @@ int Arg_comparator::compare_real()
int Arg_comparator::compare_decimal()
{
- my_decimal decimal1;
- my_decimal *val1= (*a)->val_decimal(&decimal1);
- DBUG_ASSERT((val1 == NULL) == (*a)->null_value);
- if (!(*a)->null_value)
+ VDec val1(*a);
+ if (!val1.is_null())
{
- my_decimal decimal2;
- my_decimal *val2= (*b)->val_decimal(&decimal2);
- DBUG_ASSERT((val2 == NULL) == (*b)->null_value);
- if (!(*b)->null_value)
+ VDec val2(*b);
+ if (!val2.is_null())
{
if (set_null)
owner->null_value= 0;
- my_decimal_round_if_needed(E_DEC_FATAL_ERROR, val1, (*a)->decimals, 0);
- my_decimal_round_if_needed(E_DEC_FATAL_ERROR, val2, (*b)->decimals, 0);
- return my_decimal_cmp(val1, val2);
+ val1.round_self_if_needed((*a)->decimals, HALF_UP);
+ val2.round_self_if_needed((*b)->decimals, HALF_UP);
+ return val1.cmp(val2);
}
}
if (set_null)
@@ -876,14 +897,12 @@ int Arg_comparator::compare_e_real()
int Arg_comparator::compare_e_decimal()
{
- my_decimal decimal1, decimal2;
- my_decimal *val1= (*a)->val_decimal(&decimal1);
- my_decimal *val2= (*b)->val_decimal(&decimal2);
- if ((*a)->null_value || (*b)->null_value)
- return MY_TEST((*a)->null_value && (*b)->null_value);
- my_decimal_round_if_needed(E_DEC_FATAL_ERROR, val1, (*a)->decimals, 0);
- my_decimal_round_if_needed(E_DEC_FATAL_ERROR, val2, (*b)->decimals, 0);
- return my_decimal_cmp(val1, val2) == 0;
+ VDec val1(*a), val2(*b);
+ if (val1.is_null() || val2.is_null())
+ return MY_TEST(val1.is_null() && val2.is_null());
+ val1.round_self_if_needed((*a)->decimals, HALF_UP);
+ val2.round_self_if_needed((*b)->decimals, HALF_UP);
+ return MY_TEST(val1.cmp(val2) == 0);
}
@@ -1227,8 +1246,13 @@ bool Item_in_optimizer::eval_not_null_tables(void *opt_arg)
void Item_in_optimizer::print(String *str, enum_query_type query_type)
{
- restore_first_argument();
- Item_func::print(str, query_type);
+ if (query_type & QT_PARSABLE)
+ args[1]->print(str, query_type);
+ else
+ {
+ restore_first_argument();
+ Item_func::print(str, query_type);
+ }
}
@@ -1244,8 +1268,7 @@ void Item_in_optimizer::print(String *str, enum_query_type query_type)
void Item_in_optimizer::restore_first_argument()
{
- if (args[1]->type() == Item::SUBSELECT_ITEM &&
- ((Item_subselect *)args[1])->is_in_predicate())
+ if (!invisible_mode())
{
args[0]= ((Item_in_subselect *)args[1])->left_expr;
}
@@ -1262,8 +1285,7 @@ bool Item_in_optimizer::fix_left(THD *thd)
it is args[0].
*/
Item **ref0= args;
- if (args[1]->type() == Item::SUBSELECT_ITEM &&
- ((Item_subselect *)args[1])->is_in_predicate())
+ if (!invisible_mode())
{
/*
left_expr->fix_fields() may cause left_expr to be substituted for
@@ -1325,7 +1347,7 @@ bool Item_in_optimizer::fix_left(THD *thd)
used_tables_cache= args[0]->used_tables();
}
eval_not_null_tables(NULL);
- with_sum_func= args[0]->with_sum_func;
+ copy_with_sum_func(args[0]);
with_param= args[0]->with_param || args[1]->with_param;
with_field= args[0]->with_field;
if ((const_item_cache= args[0]->const_item()))
@@ -1333,11 +1355,11 @@ bool Item_in_optimizer::fix_left(THD *thd)
cache->store(args[0]);
cache->cache_value();
}
- if (args[1]->fixed)
+ if (args[1]->is_fixed())
{
/* to avoid overriding is called to update left expression */
used_tables_and_const_cache_join(args[1]);
- with_sum_func= with_sum_func || args[1]->with_sum_func;
+ join_with_sum_func(args[1]);
}
DBUG_RETURN(0);
}
@@ -1373,7 +1395,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, Item **ref)
if (args[1]->maybe_null)
maybe_null=1;
m_with_subquery= true;
- with_sum_func= with_sum_func || args[1]->with_sum_func;
+ join_with_sum_func(args[1]);
with_window_func= args[0]->with_window_func;
// The subquery cannot have window functions aggregated in this select
DBUG_ASSERT(!args[1]->with_window_func);
@@ -1928,7 +1950,7 @@ bool Item_func_interval::fix_length_and_dec()
max_length= 2;
used_tables_and_const_cache_join(row);
not_null_tables_cache= row->not_null_tables();
- with_sum_func= with_sum_func || row->with_sum_func;
+ join_with_sum_func(row);
with_param= with_param || row->with_param;
with_field= with_field || row->with_field;
return FALSE;
@@ -2007,11 +2029,11 @@ longlong Item_func_interval::val_int()
((el->result_type() == DECIMAL_RESULT) ||
(el->result_type() == INT_RESULT)))
{
- my_decimal e_dec_buf, *e_dec= el->val_decimal(&e_dec_buf);
+ VDec e_dec(el);
/* Skip NULL ranges. */
- if (el->null_value)
+ if (e_dec.is_null())
continue;
- if (my_decimal_cmp(e_dec, dec) > 0)
+ if (e_dec.cmp(dec) > 0)
return i - 1;
}
else
@@ -2157,22 +2179,49 @@ bool Item_func_between::fix_length_and_dec_temporal(THD *thd)
}
-longlong Item_func_between::val_int_cmp_temporal()
+longlong Item_func_between::val_int_cmp_datetime()
{
- enum_field_types f_type= m_comparator.type_handler()->field_type();
- longlong value= args[0]->val_temporal_packed(f_type), a, b;
+ THD *thd= current_thd;
+ longlong value= args[0]->val_datetime_packed(thd), a, b;
if ((null_value= args[0]->null_value))
return 0;
- a= args[1]->val_temporal_packed(f_type);
- b= args[2]->val_temporal_packed(f_type);
- if (!args[1]->null_value && !args[2]->null_value)
- return (longlong) ((value >= a && value <= b) != negated);
- if (args[1]->null_value && args[2]->null_value)
+ a= args[1]->val_datetime_packed(thd);
+ b= args[2]->val_datetime_packed(thd);
+ return val_int_cmp_int_finalize(value, a, b);
+}
+
+
+longlong Item_func_between::val_int_cmp_time()
+{
+ THD *thd= current_thd;
+ longlong value= args[0]->val_time_packed(thd), a, b;
+ if ((null_value= args[0]->null_value))
+ return 0;
+ a= args[1]->val_time_packed(thd);
+ b= args[2]->val_time_packed(thd);
+ return val_int_cmp_int_finalize(value, a, b);
+}
+
+
+longlong Item_func_between::val_int_cmp_native()
+{
+ THD *thd= current_thd;
+ const Type_handler *h= m_comparator.type_handler();
+ NativeBuffer<STRING_BUFFER_USUAL_SIZE> value, a, b;
+ if (val_native_with_conversion_from_item(thd, args[0], &value, h))
+ return 0;
+ bool ra= args[1]->val_native_with_conversion(thd, &a, h);
+ bool rb= args[2]->val_native_with_conversion(thd, &b, h);
+ if (!ra && !rb)
+ return (longlong)
+ ((h->cmp_native(value, a) >= 0 &&
+ h->cmp_native(value, b) <= 0) != negated);
+ if (ra && rb)
null_value= true;
- else if (args[1]->null_value)
- null_value= value <= b; // not null if false range.
+ else if (ra)
+ null_value= h->cmp_native(value, b) <= 0;
else
- null_value= value >= a;
+ null_value= h->cmp_native(value, a) >= 0;
return (longlong) (!null_value && negated);
}
@@ -2224,23 +2273,37 @@ longlong Item_func_between::val_int_cmp_int()
}
-longlong Item_func_between::val_int_cmp_decimal()
+bool Item_func_between::val_int_cmp_int_finalize(longlong value,
+ longlong a,
+ longlong b)
{
- my_decimal dec_buf, *dec= args[0]->val_decimal(&dec_buf),
- a_buf, *a_dec, b_buf, *b_dec;
- if ((null_value=args[0]->null_value))
- return 0; /* purecov: inspected */
- a_dec= args[1]->val_decimal(&a_buf);
- b_dec= args[2]->val_decimal(&b_buf);
if (!args[1]->null_value && !args[2]->null_value)
- return (longlong) ((my_decimal_cmp(dec, a_dec) >= 0 &&
- my_decimal_cmp(dec, b_dec) <= 0) != negated);
+ return (longlong) ((value >= a && value <= b) != negated);
if (args[1]->null_value && args[2]->null_value)
null_value= true;
else if (args[1]->null_value)
- null_value= (my_decimal_cmp(dec, b_dec) <= 0);
+ null_value= value <= b; // not null if false range.
+ else
+ null_value= value >= a;
+ return (longlong) (!null_value && negated);
+}
+
+
+longlong Item_func_between::val_int_cmp_decimal()
+{
+ VDec dec(args[0]);
+ if ((null_value= dec.is_null()))
+ return 0; /* purecov: inspected */
+ VDec a_dec(args[1]), b_dec(args[2]);
+ if (!a_dec.is_null() && !b_dec.is_null())
+ return (longlong) ((dec.cmp(a_dec) >= 0 &&
+ dec.cmp(b_dec) <= 0) != negated);
+ if (a_dec.is_null() && b_dec.is_null())
+ null_value= true;
+ else if (a_dec.is_null())
+ null_value= (dec.cmp(b_dec) <= 0);
else
- null_value= (my_decimal_cmp(dec, a_dec) >= 0);
+ null_value= (dec.cmp(a_dec) >= 0);
return (longlong) (!null_value && negated);
}
@@ -2348,12 +2411,22 @@ Item_func_ifnull::str_op(String *str)
}
-bool Item_func_ifnull::date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_func_ifnull::native_op(THD *thd, Native *to)
+{
+ DBUG_ASSERT(fixed == 1);
+ if (!val_native_with_conversion_from_item(thd, args[0], to, type_handler()))
+ return false;
+ return val_native_with_conversion_from_item(thd, args[1], to, type_handler());
+}
+
+
+bool Item_func_ifnull::date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
for (uint i= 0; i < 2; i++)
{
- Datetime dt(current_thd, args[i], fuzzydate & ~TIME_FUZZY_DATES);
+ Datetime_truncation_not_needed dt(thd, args[i],
+ fuzzydate & ~TIME_FUZZY_DATES);
if (!(dt.copy_to_mysql_time(ltime, mysql_timestamp_type())))
return (null_value= false);
}
@@ -2361,12 +2434,12 @@ bool Item_func_ifnull::date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
}
-bool Item_func_ifnull::time_op(MYSQL_TIME *ltime)
+bool Item_func_ifnull::time_op(THD *thd, MYSQL_TIME *ltime)
{
DBUG_ASSERT(fixed == 1);
for (uint i= 0; i < 2; i++)
{
- if (!Time(args[i]).copy_to_mysql_time(ltime))
+ if (!Time(thd, args[i]).copy_to_mysql_time(ltime))
return (null_value= false);
}
return (null_value= true);
@@ -2848,24 +2921,34 @@ Item_func_nullif::decimal_op(my_decimal * decimal_value)
bool
-Item_func_nullif::date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
+Item_func_nullif::date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
if (!compare())
return (null_value= true);
- Datetime dt(current_thd, args[2], fuzzydate);
+ Datetime_truncation_not_needed dt(thd, args[2], fuzzydate);
return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type()));
}
bool
-Item_func_nullif::time_op(MYSQL_TIME *ltime)
+Item_func_nullif::time_op(THD *thd, MYSQL_TIME *ltime)
{
DBUG_ASSERT(fixed == 1);
if (!compare())
return (null_value= true);
- return (null_value= Time(args[2]).copy_to_mysql_time(ltime));
+ return (null_value= Time(thd, args[2]).copy_to_mysql_time(ltime));
+
+}
+
+bool
+Item_func_nullif::native_op(THD *thd, Native *to)
+{
+ DBUG_ASSERT(fixed == 1);
+ if (!compare())
+ return (null_value= true);
+ return val_native_with_conversion_from_item(thd, args[2], to, type_handler());
}
@@ -2946,7 +3029,7 @@ Item *Item_func_case_simple::find_item()
Item *Item_func_decode_oracle::find_item()
{
uint idx;
- if (!Predicant_to_list_comparator::cmp_nulls_equal(this, &idx))
+ if (!Predicant_to_list_comparator::cmp_nulls_equal(current_thd, this, &idx))
return args[idx + when_count()];
Item **pos= Item_func_decode_oracle::else_expr_addr();
return pos ? pos[0] : 0;
@@ -3022,24 +3105,34 @@ my_decimal *Item_func_case::decimal_op(my_decimal *decimal_value)
}
-bool Item_func_case::date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_func_case::date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
Item *item= find_item();
if (!item)
return (null_value= true);
- Datetime dt(current_thd, item, fuzzydate);
+ Datetime_truncation_not_needed dt(thd, item, fuzzydate);
return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type()));
}
-bool Item_func_case::time_op(MYSQL_TIME *ltime)
+bool Item_func_case::time_op(THD *thd, MYSQL_TIME *ltime)
+{
+ DBUG_ASSERT(fixed == 1);
+ Item *item= find_item();
+ if (!item)
+ return (null_value= true);
+ return (null_value= Time(thd, item).copy_to_mysql_time(ltime));
+}
+
+
+bool Item_func_case::native_op(THD *thd, Native *to)
{
DBUG_ASSERT(fixed == 1);
Item *item= find_item();
if (!item)
return (null_value= true);
- return (null_value= Time(item).copy_to_mysql_time(ltime));
+ return val_native_with_conversion_from_item(thd, item, to, type_handler());
}
@@ -3376,12 +3469,13 @@ double Item_func_coalesce::real_op()
}
-bool Item_func_coalesce::date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_func_coalesce::date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
for (uint i= 0; i < arg_count; i++)
{
- Datetime dt(current_thd, args[i], fuzzydate & ~TIME_FUZZY_DATES);
+ Datetime_truncation_not_needed dt(thd, args[i],
+ fuzzydate & ~TIME_FUZZY_DATES);
if (!dt.copy_to_mysql_time(ltime, mysql_timestamp_type()))
return (null_value= false);
}
@@ -3389,18 +3483,30 @@ bool Item_func_coalesce::date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
}
-bool Item_func_coalesce::time_op(MYSQL_TIME *ltime)
+bool Item_func_coalesce::time_op(THD *thd, MYSQL_TIME *ltime)
{
DBUG_ASSERT(fixed == 1);
for (uint i= 0; i < arg_count; i++)
{
- if (!Time(args[i]).copy_to_mysql_time(ltime))
+ if (!Time(thd, args[i]).copy_to_mysql_time(ltime))
return (null_value= false);
}
return (null_value= true);
}
+bool Item_func_coalesce::native_op(THD *thd, Native *to)
+{
+ DBUG_ASSERT(fixed == 1);
+ for (uint i= 0; i < arg_count; i++)
+ {
+ if (!val_native_with_conversion_from_item(thd, args[i], to, type_handler()))
+ return false;
+ }
+ return (null_value= true);
+}
+
+
my_decimal *Item_func_coalesce::decimal_op(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
@@ -3678,11 +3784,58 @@ Item *in_longlong::create_item(THD *thd)
}
+static int cmp_timestamp(void *cmp_arg,
+ Timestamp_or_zero_datetime *a,
+ Timestamp_or_zero_datetime *b)
+{
+ return a->cmp(*b);
+}
+
+
+in_timestamp::in_timestamp(THD *thd, uint elements)
+ :in_vector(thd, elements, sizeof(Value), (qsort2_cmp) cmp_timestamp, 0)
+{}
+
+
+void in_timestamp::set(uint pos, Item *item)
+{
+ Timestamp_or_zero_datetime *buff= &((Timestamp_or_zero_datetime *) base)[pos];
+ Timestamp_or_zero_datetime_native_null native(current_thd, item, true);
+ if (native.is_null())
+ *buff= Timestamp_or_zero_datetime();
+ else
+ *buff= Timestamp_or_zero_datetime(native);
+}
+
+
+uchar *in_timestamp::get_value(Item *item)
+{
+ Timestamp_or_zero_datetime_native_null native(current_thd, item, true);
+ if (native.is_null())
+ return 0;
+ tmp= Timestamp_or_zero_datetime(native);
+ return (uchar*) &tmp;
+}
+
+
+Item *in_timestamp::create_item(THD *thd)
+{
+ return new (thd->mem_root) Item_timestamp_literal(thd);
+}
+
+
+void in_timestamp::value_to_item(uint pos, Item *item)
+{
+ const Timestamp_or_zero_datetime &buff= (((Timestamp_or_zero_datetime*) base)[pos]);
+ static_cast<Item_timestamp_literal*>(item)->set_value(buff);
+}
+
+
void in_datetime::set(uint pos,Item *item)
{
struct packed_longlong *buff= &((packed_longlong*) base)[pos];
- buff->val= item->val_datetime_packed();
+ buff->val= item->val_datetime_packed(current_thd);
buff->unsigned_flag= 1L;
}
@@ -3690,13 +3843,22 @@ void in_time::set(uint pos,Item *item)
{
struct packed_longlong *buff= &((packed_longlong*) base)[pos];
- buff->val= item->val_time_packed();
+ buff->val= item->val_time_packed(current_thd);
buff->unsigned_flag= 1L;
}
-uchar *in_temporal::get_value_internal(Item *item, enum_field_types f_type)
+uchar *in_datetime::get_value(Item *item)
{
- tmp.val= item->val_temporal_packed(f_type);
+ tmp.val= item->val_datetime_packed(current_thd);
+ if (item->null_value)
+ return 0;
+ tmp.unsigned_flag= 1L;
+ return (uchar*) &tmp;
+}
+
+uchar *in_time::get_value(Item *item)
+{
+ tmp.val= item->val_time_packed(current_thd);
if (item->null_value)
return 0;
tmp.unsigned_flag= 1L;
@@ -3908,39 +4070,15 @@ bool cmp_item_row::alloc_comparators(THD *thd, uint cols)
void cmp_item_row::store_value(Item *item)
{
DBUG_ENTER("cmp_item_row::store_value");
- THD *thd= current_thd;
- if (!alloc_comparators(thd, item->cols()))
+ DBUG_ASSERT(comparators);
+ DBUG_ASSERT(n == item->cols());
+ item->bring_value();
+ item->null_value= 0;
+ for (uint i=0; i < n; i++)
{
- item->bring_value();
- item->null_value= 0;
- for (uint i=0; i < n; i++)
- {
- if (!comparators[i])
- {
- /**
- Comparators for the row elements that have temporal data types
- are installed at initialization time by prepare_comparators().
- Here we install comparators for the other data types.
- There is a bug in the below code. See MDEV-11511.
- When performing:
- (predicant0,predicant1) IN ((value00,value01),(value10,value11))
- It uses only the data type and the collation of the predicant
- elements only. It should be fixed to aggregate the data type and
- the collation for all elements at the N-th positions of the
- predicate and all values:
- - predicate0, value00, value01
- - predicate1, value10, value11
- */
- Item *elem= item->element_index(i);
- const Type_handler *handler= elem->type_handler();
- DBUG_ASSERT(elem->cmp_type() != TIME_RESULT);
- if (!(comparators[i]=
- handler->make_cmp_item(thd, elem->collation.collation)))
- break; // new failed
- }
- comparators[i]->store_value(item->element_index(i));
- item->null_value|= item->element_index(i)->null_value;
- }
+ DBUG_ASSERT(comparators[i]);
+ comparators[i]->store_value(item->element_index(i));
+ item->null_value|= item->element_index(i)->null_value;
}
DBUG_VOID_RETURN;
}
@@ -4033,9 +4171,8 @@ int cmp_item_decimal::cmp_not_null(const Value *val)
int cmp_item_decimal::cmp(Item *arg)
{
- my_decimal tmp_buf, *tmp= arg->val_decimal(&tmp_buf);
- return (m_null_value || arg->null_value) ?
- UNKNOWN : (my_decimal_cmp(&value, tmp) != 0);
+ VDec tmp(arg);
+ return m_null_value || tmp.is_null() ? UNKNOWN : (tmp.cmp(&value) != 0);
}
@@ -4052,14 +4189,6 @@ cmp_item* cmp_item_decimal::make_same()
}
-void cmp_item_temporal::store_value_internal(Item *item,
- enum_field_types f_type)
-{
- value= item->val_temporal_packed(f_type);
- m_null_value= item->null_value;
-}
-
-
int cmp_item_datetime::cmp_not_null(const Value *val)
{
DBUG_ASSERT(!val->is_null());
@@ -4070,7 +4199,7 @@ int cmp_item_datetime::cmp_not_null(const Value *val)
int cmp_item_datetime::cmp(Item *arg)
{
- const bool rc= value != arg->val_datetime_packed();
+ const bool rc= value != arg->val_datetime_packed(current_thd);
return (m_null_value || arg->null_value) ? UNKNOWN : rc;
}
@@ -4085,7 +4214,7 @@ int cmp_item_time::cmp_not_null(const Value *val)
int cmp_item_time::cmp(Item *arg)
{
- const bool rc= value != arg->val_time_packed();
+ const bool rc= value != arg->val_time_packed(current_thd);
return (m_null_value || arg->null_value) ? UNKNOWN : rc;
}
@@ -4109,6 +4238,49 @@ cmp_item *cmp_item_time::make_same()
}
+void cmp_item_timestamp::store_value(Item *item)
+{
+ item->val_native_with_conversion(current_thd, &m_native,
+ &type_handler_timestamp2);
+ m_null_value= item->null_value;
+}
+
+
+int cmp_item_timestamp::cmp_not_null(const Value *val)
+{
+ /*
+ This method will be implemented when we add this syntax:
+ SELECT TIMESTAMP WITH LOCAL TIME ZONE '2001-01-01 10:20:30'
+ For now TIMESTAMP is compared to non-TIMESTAMP using DATETIME.
+ */
+ DBUG_ASSERT(0);
+ return 0;
+}
+
+
+int cmp_item_timestamp::cmp(Item *arg)
+{
+ THD *thd= current_thd;
+ Timestamp_or_zero_datetime_native_null tmp(thd, arg, true);
+ return m_null_value || tmp.is_null() ? UNKNOWN :
+ type_handler_timestamp2.cmp_native(m_native, tmp) != 0;
+}
+
+
+int cmp_item_timestamp::compare(cmp_item *arg)
+{
+ cmp_item_timestamp *tmp= static_cast<cmp_item_timestamp*>(arg);
+ return type_handler_timestamp2.cmp_native(m_native, tmp->m_native);
+}
+
+
+cmp_item* cmp_item_timestamp::make_same()
+{
+ return new cmp_item_timestamp();
+}
+
+
+
bool Item_func_in::count_sargable_conds(void *arg)
{
((SELECT_LEX*) arg)->cond_count++;
@@ -4329,25 +4501,84 @@ bool Item_func_in::value_list_convert_const_to_int(THD *thd)
}
-/**
- Historically this code installs comparators at initialization time
- for temporal ROW elements only. All other comparators are installed later,
- during the first store_value(). This causes the bug MDEV-11511.
- See also comments in cmp_item_row::store_value().
-*/
-bool cmp_item_row::prepare_comparators(THD *thd, Item **args, uint arg_count)
+bool cmp_item_row::
+ aggregate_row_elements_for_comparison(THD *thd,
+ Type_handler_hybrid_field_type *cmp,
+ Item_args *tmp,
+ const char *funcname,
+ uint col,
+ uint level)
{
+ DBUG_EXECUTE_IF("cmp_item",
+ {
+ for (uint i= 0 ; i < tmp->argument_count(); i++)
+ {
+ Item *arg= tmp->arguments()[i];
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_UNKNOWN_ERROR, "DBUG: %s[%d,%d] handler=%s",
+ String_space(level).c_ptr(), col, i,
+ arg->type_handler()->name().ptr());
+ }
+ }
+ );
+ bool err= cmp->aggregate_for_comparison(funcname, tmp->arguments(),
+ tmp->argument_count(), true);
+ DBUG_EXECUTE_IF("cmp_item",
+ {
+ if (!err)
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_UNKNOWN_ERROR, "DBUG: %s=> handler=%s",
+ String_space(level).c_ptr(),
+ cmp->type_handler()->name().ptr());
+ }
+ );
+ return err;
+}
+
+
+bool cmp_item_row::prepare_comparators(THD *thd, const char *funcname,
+ const Item_args *args, uint level)
+{
+ DBUG_EXECUTE_IF("cmp_item",
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_UNKNOWN_ERROR, "DBUG: %sROW(%d args) level=%d",
+ String_space(level).c_ptr(),
+ args->argument_count(), level););
+ DBUG_ASSERT(args->argument_count() > 0);
+ if (alloc_comparators(thd, args->arguments()[0]->cols()))
+ return true;
+ DBUG_ASSERT(n == args->arguments()[0]->cols());
for (uint col= 0; col < n; col++)
{
- Item *date_arg= find_date_time_item(args, arg_count, col);
- if (date_arg)
+ Item_args tmp;
+ Type_handler_hybrid_field_type cmp;
+
+ if (tmp.alloc_and_extract_row_elements(thd, args, col) ||
+ aggregate_row_elements_for_comparison(thd, &cmp, &tmp,
+ funcname, col, level + 1))
+ return true;
+
+ /*
+ There is a legacy bug (MDEV-11511) in the code below,
+ which should be fixed eventually.
+ When performing:
+ (predicant0,predicant1) IN ((value00,value01),(value10,value11))
+ It uses only the data type and the collation of the predicant
+ elements only. It should be fixed to take into account the data type and
+ the collation for all elements at the N-th positions of the
+ predicate and all values:
+ - predicate0, value00, value01
+ - predicate1, value10, value11
+ */
+ Item *item0= args->arguments()[0]->element_index(col);
+ CHARSET_INFO *collation= item0->collation.collation;
+ if (!(comparators[col]= cmp.type_handler()->make_cmp_item(thd, collation)))
+ return true;
+ if (cmp.type_handler() == &type_handler_row)
{
- // TODO: do like the scalar comparators do
- const Type_handler *h= date_arg->type_handler();
- comparators[col]= h->field_type() == MYSQL_TYPE_TIME ?
- (cmp_item *) new (thd->mem_root) cmp_item_time() :
- (cmp_item *) new (thd->mem_root) cmp_item_datetime();
- if (!comparators[col])
+ // Prepare comparators for ROW elements recursively
+ cmp_item_row *row= static_cast<cmp_item_row*>(comparators[col]);
+ if (row->prepare_comparators(thd, funcname, &tmp, level + 1))
return true;
}
}
@@ -4357,19 +4588,10 @@ bool cmp_item_row::prepare_comparators(THD *thd, Item **args, uint arg_count)
bool Item_func_in::fix_for_row_comparison_using_bisection(THD *thd)
{
- uint cols= args[0]->cols();
if (unlikely(!(array= new (thd->mem_root) in_row(thd, arg_count-1, 0))))
return true;
cmp_item_row *cmp= &((in_row*)array)->tmp;
- if (cmp->alloc_comparators(thd, cols) ||
- cmp->prepare_comparators(thd, args, arg_count))
- return true;
- /*
- Only DATETIME items comparators were initialized.
- Call store_value() to setup others.
- */
- cmp->store_value(args[0]);
- if (unlikely(thd->is_fatal_error)) // OOM
+ if (cmp->prepare_comparators(thd, func_name(), this, 0))
return true;
fix_in_vector();
return false;
@@ -4408,8 +4630,7 @@ bool Item_func_in::fix_for_row_comparison_using_cmp_items(THD *thd)
DBUG_ASSERT(get_comparator_type_handler(0) == &type_handler_row);
DBUG_ASSERT(get_comparator_cmp_item(0));
cmp_item_row *cmp_row= (cmp_item_row*) get_comparator_cmp_item(0);
- return cmp_row->alloc_comparators(thd, args[0]->cols()) ||
- cmp_row->prepare_comparators(thd, args, arg_count);
+ return cmp_row->prepare_comparators(thd, func_name(), this, 0);
}
@@ -4681,7 +4902,7 @@ Item_cond::fix_fields(THD *thd, Item **ref)
const_item_cache= FALSE;
}
- with_sum_func|= item->with_sum_func;
+ join_with_sum_func(item);
with_param|= item->with_param;
with_field|= item->with_field;
m_with_subquery|= item->with_subquery();
@@ -5041,6 +5262,8 @@ bool Item_cond::excl_dep_on_table(table_map tab_map)
bool Item_cond::excl_dep_on_grouping_fields(st_select_lex *sel)
{
+ if (has_rand_bit())
+ return false;
List_iterator_fast<Item> li(list);
Item *item;
while ((item= li++))
@@ -5451,13 +5674,17 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
if (!res2)
return FALSE; // Null argument
- const size_t len = res2->length();
- const char* first = res2->ptr();
- const char* last = first + len - 1;
+ const size_t len= res2->length();
+
/*
len must be > 2 ('%pattern%')
heuristic: only do TurboBM for pattern_len > 2
*/
+ if (len <= 2)
+ return FALSE;
+
+ const char* first= res2->ptr();
+ const char* last= first + len - 1;
if (len > MIN_TURBOBM_PATTERN_LEN + 2 &&
*first == wild_many &&
@@ -6392,76 +6619,53 @@ void Item_equal::add_const(THD *thd, Item *c)
equal_items.push_front(c, thd->mem_root);
return;
}
- Item *const_item= get_const();
- switch (Item_equal::compare_type_handler()->cmp_type()) {
- case TIME_RESULT:
- {
- enum_field_types f_type= context_field->field_type();
- longlong value0= c->val_temporal_packed(f_type);
- longlong value1= const_item->val_temporal_packed(f_type);
- cond_false= c->null_value || const_item->null_value || value0 != value1;
- break;
- }
- case STRING_RESULT:
- {
- String *str1, *str2;
- /*
- Suppose we have an expression (with a string type field) like this:
- WHERE field=const1 AND field=const2 ...
-
- For all pairs field=constXXX we know that:
-
- - Item_func_eq::fix_length_and_dec() performed collation and character
- set aggregation and added character set converters when needed.
- Note, the case like:
- WHERE field=const1 COLLATE latin1_bin AND field=const2
- is not handled here, because the field would be replaced to
- Item_func_set_collation, which cannot get into Item_equal.
- So all constXXX that are handled by Item_equal
- already have compatible character sets with "field".
-
- - Also, Field_str::test_if_equality_guarantees_uniqueness() guarantees
- that the comparison collation of all equalities handled by Item_equal
- match the the collation of the field.
-
- Therefore, at Item_equal::add_const() time all constants constXXX
- should be directly comparable to each other without an additional
- character set conversion.
- It's safe to do val_str() for "const_item" and "c" and compare
- them according to the collation of the *field*.
-
- So in a script like this:
- CREATE TABLE t1 (a VARCHAR(10) COLLATE xxx);
- INSERT INTO t1 VALUES ('a'),('A');
- SELECT * FROM t1 WHERE a='a' AND a='A';
- Item_equal::add_const() effectively rewrites the condition to:
- SELECT * FROM t1 WHERE a='a' AND 'a' COLLATE xxx='A';
- and then to:
- SELECT * FROM t1 WHERE a='a'; // if the two constants were equal
- // e.g. in case of latin1_swedish_ci
- or to:
- SELECT * FROM t1 WHERE FALSE; // if the two constants were not equal
- // e.g. in case of latin1_bin
-
- Note, both "const_item" and "c" can return NULL, e.g.:
- SELECT * FROM t1 WHERE a=NULL AND a='const';
- SELECT * FROM t1 WHERE a='const' AND a=NULL;
- SELECT * FROM t1 WHERE a='const' AND a=(SELECT MAX(a) FROM t2)
- */
- cond_false= !(str1= const_item->val_str(&cmp_value1)) ||
- !(str2= c->val_str(&cmp_value2)) ||
- !str1->eq(str2, compare_collation());
- break;
- }
- default:
- {
- Item_func_eq *func= new (thd->mem_root) Item_func_eq(thd, c, const_item);
- if (func->set_cmp_func())
- return;
- func->quick_fix_field();
- cond_false= !func->val_int();
- }
- }
+
+ /*
+ Suppose we have an expression (with a string type field) like this:
+ WHERE field=const1 AND field=const2 ...
+
+ For all pairs field=constXXX we know that:
+
+ - Item_func_eq::fix_length_and_dec() performed collation and character
+ set aggregation and added character set converters when needed.
+ Note, the case like:
+ WHERE field=const1 COLLATE latin1_bin AND field=const2
+ is not handled here, because the field would be replaced to
+ Item_func_set_collation, which cannot get into Item_equal.
+ So all constXXX that are handled by Item_equal
+ already have compatible character sets with "field".
+
+ - Also, Field_str::test_if_equality_guarantees_uniqueness() guarantees
+ that the comparison collation of all equalities handled by Item_equal
+ match the the collation of the field.
+
+ Therefore, at Item_equal::add_const() time all constants constXXX
+ should be directly comparable to each other without an additional
+ character set conversion.
+ It's safe to do val_str() for "const_item" and "c" and compare
+ them according to the collation of the *field*.
+
+ So in a script like this:
+ CREATE TABLE t1 (a VARCHAR(10) COLLATE xxx);
+ INSERT INTO t1 VALUES ('a'),('A');
+ SELECT * FROM t1 WHERE a='a' AND a='A';
+ Item_equal::add_const() effectively rewrites the condition to:
+ SELECT * FROM t1 WHERE a='a' AND 'a' COLLATE xxx='A';
+ and then to:
+ SELECT * FROM t1 WHERE a='a'; // if the two constants were equal
+ // e.g. in case of latin1_swedish_ci
+ or to:
+ SELECT * FROM t1 WHERE FALSE; // if the two constants were not equal
+ // e.g. in case of latin1_bin
+
+ Note, both "const_item" and "c" can return NULL, e.g.:
+ SELECT * FROM t1 WHERE a=NULL AND a='const';
+ SELECT * FROM t1 WHERE a='const' AND a=NULL;
+ SELECT * FROM t1 WHERE a='const' AND a=(SELECT MAX(a) FROM t2)
+ */
+
+ cond_false= !Item_equal::compare_type_handler()->Item_eq_value(thd, this, c,
+ get_const());
if (with_const && equal_items.elements == 1)
cond_true= TRUE;
if (cond_false || cond_true)
@@ -6766,7 +6970,7 @@ bool Item_equal::fix_fields(THD *thd, Item **ref)
used_tables_cache|= item->used_tables();
tmp_table_map= item->not_null_tables();
not_null_tables_cache|= tmp_table_map;
- DBUG_ASSERT(!item->with_sum_func && !item->with_subquery());
+ DBUG_ASSERT(!item->with_sum_func() && !item->with_subquery());
if (item->maybe_null)
maybe_null= 1;
if (!item->get_item_equal())
@@ -7216,3 +7420,196 @@ Item_bool_rowready_func2* Le_creator::create_swap(THD *thd, Item *a, Item *b) co
{
return new(thd->mem_root) Item_func_ge(thd, b, a);
}
+
+
+bool
+Item_equal::excl_dep_on_grouping_fields(st_select_lex *sel)
+{
+ Item_equal_fields_iterator it(*this);
+ Item *item;
+
+ while ((item=it++))
+ {
+ if (item->excl_dep_on_grouping_fields(sel))
+ {
+ set_extraction_flag(FULL_EXTRACTION_FL);
+ return true;
+ }
+ }
+ return false;
+}
+
+
+/**
+ @brief
+ Transform multiple equality into list of equalities
+
+ @param thd the thread handle
+ @param equalities the list where created equalities are stored
+ @param checker the checker callback function to be applied to the nodes
+ of the tree of the object to check if multiple equality
+ elements can be used to create equalities
+ @param arg parameter to be passed to the checker
+ @param clone_const true <=> clone the constant member if there is any
+
+ @details
+ How the method works on examples:
+
+ Example 1:
+ It takes MULT_EQ(x,a,b) and tries to create from its elements a set of
+ equalities {(x=a),(x=b)}.
+
+ Example 2:
+ It takes MULT_EQ(1,a,b) and tries to create from its elements a set of
+ equalities {(a=1),(a=b)}.
+
+ How it is done:
+
+ 1. If there is a constant member c the first non-constant member x for
+ which the function checker returns true is taken and an item for
+ the equality x=c is created. When constructing the equality item
+ the left part of the equality is always taken as a clone of x while
+ the right part is taken as a clone of c only if clone_const == true.
+
+ 2. After this all equalities of the form x=a (where x designates the first
+ non-constant member for which checker returns true and a is some other
+ such member of the multiplle equality) are created. When constructing
+ an equality item both its parts are taken as clones of x and a.
+
+ Suppose in the examples above that for 'x', 'a', and 'b' the function
+ checker returns true.
+
+ Example 1:
+ the equality (x=a) is built
+ the equality (x=b) is built
+
+ Example 2:
+ the equality (a=1) is built
+ the equality (a=b) is built
+
+ 3. As a result we get a set of equalities built with the elements of
+ this multiple equality. They are saved in the equality list.
+
+ Example 1:
+ {(x=a),(x=b)}
+
+ Example 2:
+ {(a=1),(a=b)}
+
+ @note
+ This method is called for condition pushdown into materialized
+ derived table/view, and IN subquery, and pushdown from HAVING into WHERE.
+ When it is called for pushdown from HAVING the empty checker is passed.
+ This is because in this case the elements of the multiple equality don't
+ need to be checked if they can be used to build equalities: either all
+ equalities can be pushed or none of them can be pushed.
+ When the function is called for pushdown from HAVING the value of the
+ parameter clone_const is always false. In other cases it's always true.
+
+ @retval true if an error occurs
+ @retval false otherwise
+*/
+
+bool Item_equal::create_pushable_equalities(THD *thd,
+ List<Item> *equalities,
+ Pushdown_checker checker,
+ uchar *arg,
+ bool clone_const)
+{
+ Item *item;
+ Item *left_item= NULL;
+ Item *right_item = get_const();
+ Item_equal_fields_iterator it(*this);
+
+ while ((item=it++))
+ {
+ left_item= item;
+ if (checker && !((item->*checker) (arg)))
+ continue;
+ break;
+ }
+
+ if (!left_item)
+ return false;
+
+ if (right_item)
+ {
+ Item_func_eq *eq= 0;
+ Item *left_item_clone= left_item->build_clone(thd);
+ Item *right_item_clone= !clone_const ?
+ right_item : right_item->build_clone(thd);
+ if (!left_item_clone || !right_item_clone)
+ return true;
+ eq= new (thd->mem_root) Item_func_eq(thd,
+ left_item_clone,
+ right_item_clone);
+ if (!eq || equalities->push_back(eq, thd->mem_root))
+ return true;
+ if (!clone_const)
+ {
+ /*
+ Also set IMMUTABLE_FL for any sub-items of the right_item.
+ This is needed to prevent Item::cleanup_excluding_immutables_processor
+ from peforming cleanup of the sub-items and so creating an item tree
+ where a fixed item has non-fixed items inside it.
+ */
+ int new_flag= IMMUTABLE_FL;
+ right_item->walk(&Item::set_extraction_flag_processor, false,
+ (void*)&new_flag);
+ }
+ }
+
+ while ((item=it++))
+ {
+ if (checker && !((item->*checker) (arg)))
+ continue;
+ Item_func_eq *eq= 0;
+ Item *left_item_clone= left_item->build_clone(thd);
+ Item *right_item_clone= item->build_clone(thd);
+ if (!(left_item_clone && right_item_clone))
+ return true;
+ left_item_clone->set_item_equal(NULL);
+ right_item_clone->set_item_equal(NULL);
+ eq= new (thd->mem_root) Item_func_eq(thd,
+ right_item_clone,
+ left_item_clone);
+ if (!eq || equalities->push_back(eq, thd->mem_root))
+ return true;
+ }
+ return false;
+}
+
+
+/**
+ Transform multiple equality into the AND condition of equalities.
+
+ Example:
+ MULT_EQ(x,a,b)
+ =>
+ (x=a) AND (x=b)
+
+ Equalities are built in Item_equal::create_pushable_equalities() method
+ using elements of this multiple equality. The result of this method is
+ saved in an equality list.
+ This method returns the condition where the elements of the equality list
+ are anded.
+*/
+
+Item *Item_equal::multiple_equality_transformer(THD *thd, uchar *arg)
+{
+ List<Item> equalities;
+ if (create_pushable_equalities(thd, &equalities, 0, 0, false))
+ return 0;
+
+ switch (equalities.elements)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return equalities.head();
+ break;
+ default:
+ return new (thd->mem_root) Item_cond_and(thd, equalities);
+ break;
+ }
+}
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index f3d3be44b62..8e2856039fc 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -68,6 +68,7 @@ class Arg_comparator: public Sql_alloc
if (val1 == val2) return 0;
return 1;
}
+ NativeBuffer<STRING_BUFFER_USUAL_SIZE> m_native1, m_native2;
public:
/* Allow owner function to use string buffers. */
String value1, value2;
@@ -89,6 +90,7 @@ public:
bool set_cmp_func_string();
bool set_cmp_func_time();
bool set_cmp_func_datetime();
+ bool set_cmp_func_native();
bool set_cmp_func_int();
bool set_cmp_func_real();
bool set_cmp_func_decimal();
@@ -121,6 +123,8 @@ public:
int compare_e_datetime();
int compare_time();
int compare_e_time();
+ int compare_native();
+ int compare_e_native();
int compare_json_str_basic(Item *j, Item *s);
int compare_json_str();
int compare_str_json();
@@ -128,6 +132,9 @@ public:
int compare_e_json_str();
int compare_e_str_json();
+ void min_max_update_field_native(THD *thd, Field *field, Item *item,
+ int cmp_sign);
+
Item** cache_converted_constant(THD *thd, Item **value, Item **cache,
const Type_handler *type);
inline bool is_owner_equal_func()
@@ -152,7 +159,8 @@ public:
class SEL_ARG;
struct KEY_PART;
-class Item_bool_func :public Item_int_func
+class Item_bool_func :public Item_int_func,
+ public Type_cmp_attributes
{
protected:
/*
@@ -215,9 +223,9 @@ public:
Item_bool_func(THD *thd, Item *a, Item *b, Item *c): Item_int_func(thd, a, b, c) {}
Item_bool_func(THD *thd, List<Item> &list): Item_int_func(thd, list) { }
Item_bool_func(THD *thd, Item_bool_func *item) :Item_int_func(thd, item) {}
- const Type_handler *type_handler() const { return &type_handler_long; }
- bool is_bool_type() { return true; }
- virtual CHARSET_INFO *compare_collation() const { return NULL; }
+ const Type_handler *type_handler() const { return &type_handler_bool; }
+ const Type_handler *fixed_type_handler() const { return &type_handler_bool; }
+ CHARSET_INFO *compare_collation() const { return NULL; }
bool fix_length_and_dec() { decimals=0; max_length=1; return FALSE; }
uint decimal_precision() const { return 1; }
bool need_parentheses_in_default() { return true; }
@@ -824,11 +832,7 @@ class Item_func_ne :public Item_bool_rowready_func2
{
protected:
SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param,
- Field *field, Item *value)
- {
- DBUG_ENTER("Item_func_ne::get_func_mm_tree");
- DBUG_RETURN(get_ne_mm_tree(param, field, value, value));
- }
+ Field *field, Item *value);
public:
Item_func_ne(THD *thd, Item *a, Item *b):
Item_bool_rowready_func2(thd, a, b) {}
@@ -894,6 +898,7 @@ class Item_func_between :public Item_func_opt_neg
protected:
SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param,
Field *field, Item *value);
+ bool val_int_cmp_int_finalize(longlong value, longlong a, longlong b);
public:
String value0,value1,value2;
Item_func_between(THD *thd, Item *a, Item *b, Item *c):
@@ -934,7 +939,9 @@ public:
{ return get_item_copy<Item_func_between>(thd, this); }
longlong val_int_cmp_string();
- longlong val_int_cmp_temporal();
+ longlong val_int_cmp_datetime();
+ longlong val_int_cmp_time();
+ longlong val_int_cmp_native();
longlong val_int_cmp_int();
longlong val_int_cmp_real();
longlong val_int_cmp_decimal();
@@ -957,7 +964,7 @@ public:
{
if (agg_arg_charsets_for_comparison(cmp_collation, args, 2))
return TRUE;
- fix_char_length(2);
+ fix_char_length(2); // returns "1" or "0" or "-1"
return FALSE;
}
Item *get_copy(THD *thd)
@@ -1011,8 +1018,9 @@ public:
longlong int_op();
String *str_op(String *);
my_decimal *decimal_op(my_decimal *);
- bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool time_op(MYSQL_TIME *ltime);
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool time_op(THD *thd, MYSQL_TIME *ltime);
+ bool native_op(THD *thd, Native *to);
bool fix_length_and_dec()
{
if (aggregate_for_result(func_name(), args, arg_count, true))
@@ -1090,8 +1098,9 @@ public:
longlong int_op();
String *str_op(String *str);
my_decimal *decimal_op(my_decimal *);
- bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool time_op(MYSQL_TIME *ltime);
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool time_op(THD *thd, MYSQL_TIME *ltime);
+ bool native_op(THD *thd, Native *to);
bool fix_length_and_dec()
{
if (Item_func_case_abbreviation2::fix_length_and_dec2(args))
@@ -1125,12 +1134,12 @@ public:
:Item_func_case_abbreviation2(thd, a, b, c)
{ }
- bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- Datetime dt(current_thd, find_item(), fuzzydate);
+ Datetime_truncation_not_needed dt(thd, find_item(), fuzzydate);
return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type()));
}
- bool time_op(MYSQL_TIME *ltime)
+ bool time_op(THD *thd, MYSQL_TIME *ltime)
{
return (null_value= Time(find_item()).copy_to_mysql_time(ltime));
}
@@ -1150,6 +1159,11 @@ public:
{
return val_str_from_item(find_item(), str);
}
+ bool native_op(THD *thd, Native *to)
+ {
+ return val_native_with_conversion_from_item(thd, find_item(), to,
+ type_handler());
+ }
};
@@ -1243,12 +1257,13 @@ public:
Item_func_hybrid_field_type::cleanup();
arg_count= 2; // See the comment to the constructor
}
- bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool time_op(MYSQL_TIME *ltime);
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool time_op(THD *thd, MYSQL_TIME *ltime);
double real_op();
longlong int_op();
String *str_op(String *str);
my_decimal *decimal_op(my_decimal *);
+ bool native_op(THD *thd, Native *to);
bool fix_length_and_dec();
bool walk(Item_processor processor, bool walk_subquery, void *arg);
const char *func_name() const { return "nullif"; }
@@ -1285,7 +1300,11 @@ public:
{ reset_first_arg_if_needed(); return this; }
Item *derived_field_transformer_for_where(THD *thd, uchar *arg)
{ reset_first_arg_if_needed(); return this; }
- Item *derived_grouping_field_transformer_for_where(THD *thd, uchar *arg)
+ Item *grouping_field_transformer_for_where(THD *thd, uchar *arg)
+ { reset_first_arg_if_needed(); return this; }
+ Item *in_subq_field_transformer_for_where(THD *thd, uchar *arg)
+ { reset_first_arg_if_needed(); return this; }
+ Item *in_subq_field_transformer_for_having(THD *thd, uchar *arg)
{ reset_first_arg_if_needed(); return this; }
};
@@ -1408,13 +1427,24 @@ public:
};
+class in_timestamp :public in_vector
+{
+ Timestamp_or_zero_datetime tmp;
+public:
+ in_timestamp(THD *thd, uint elements);
+ void set(uint pos,Item *item);
+ uchar *get_value(Item *item);
+ Item* create_item(THD *thd);
+ void value_to_item(uint pos, Item *item);
+ const Type_handler *type_handler() const { return &type_handler_timestamp2; }
+};
+
+
/*
Class to represent a vector of constant DATE/DATETIME values.
*/
class in_temporal :public in_longlong
{
-protected:
- uchar *get_value_internal(Item *item, enum_field_types f_type);
public:
/* Cache for the left item. */
@@ -1427,8 +1457,6 @@ public:
Item_datetime *dt= static_cast<Item_datetime*>(item);
dt->set(val->val, type_handler()->mysql_timestamp_type());
}
- uchar *get_value(Item *item)
- { return get_value_internal(item, type_handler()->field_type()); }
friend int cmp_longlong(void *cmp_arg, packed_longlong *a,packed_longlong *b);
};
@@ -1440,6 +1468,7 @@ public:
:in_temporal(thd, elements)
{}
void set(uint pos,Item *item);
+ uchar *get_value(Item *item);
const Type_handler *type_handler() const { return &type_handler_datetime2; }
};
@@ -1451,6 +1480,7 @@ public:
:in_temporal(thd, elements)
{}
void set(uint pos,Item *item);
+ uchar *get_value(Item *item);
const Type_handler *type_handler() const { return &type_handler_time2; }
};
@@ -1625,7 +1655,6 @@ class cmp_item_temporal: public cmp_item_scalar
{
protected:
longlong value;
- void store_value_internal(Item *item, enum_field_types type);
public:
cmp_item_temporal() {}
int compare(cmp_item *ci);
@@ -1640,7 +1669,8 @@ public:
{ }
void store_value(Item *item)
{
- store_value_internal(item, MYSQL_TYPE_DATETIME);
+ value= item->val_datetime_packed(current_thd);
+ m_null_value= item->null_value;
}
int cmp_not_null(const Value *val);
int cmp(Item *arg);
@@ -1656,13 +1686,28 @@ public:
{ }
void store_value(Item *item)
{
- store_value_internal(item, MYSQL_TYPE_TIME);
+ value= item->val_time_packed(current_thd);
+ m_null_value= item->null_value;
}
int cmp_not_null(const Value *val);
int cmp(Item *arg);
cmp_item *make_same();
};
+
+class cmp_item_timestamp: public cmp_item_scalar
+{
+ Timestamp_or_zero_datetime_native m_native;
+public:
+ cmp_item_timestamp() :cmp_item_scalar() { }
+ void store_value(Item *item);
+ int cmp_not_null(const Value *val);
+ int cmp(Item *arg);
+ int compare(cmp_item *ci);
+ cmp_item *make_same();
+};
+
+
class cmp_item_real : public cmp_item_scalar
{
double value;
@@ -1894,7 +1939,7 @@ class Predicant_to_list_comparator
return UNKNOWN;
return in_item->cmp(args->arguments()[m_comparators[i].m_arg_index]);
}
- int cmp_args_nulls_equal(Item_args *args, uint i)
+ int cmp_args_nulls_equal(THD *thd, Item_args *args, uint i)
{
Predicant_to_value_comparator *cmp=
&m_comparators[m_comparators[i].m_handler_index];
@@ -1905,7 +1950,7 @@ class Predicant_to_list_comparator
ValueBuffer<MAX_FIELD_WIDTH> val;
if (m_comparators[i].m_handler_index == i)
in_item->store_value(predicant);
- m_comparators[i].m_handler->Item_save_in_value(arg, &val);
+ m_comparators[i].m_handler->Item_save_in_value(thd, arg, &val);
if (predicant->null_value && val.is_null())
return FALSE; // Two nulls are equal
if (predicant->null_value || val.is_null())
@@ -2086,12 +2131,12 @@ public:
/*
Same as above, but treats two NULLs as equal, e.g. as in DECODE_ORACLE().
*/
- bool cmp_nulls_equal(Item_args *args, uint *idx)
+ bool cmp_nulls_equal(THD *thd, Item_args *args, uint *idx)
{
for (uint i= 0 ; i < m_comparator_count ; i++)
{
DBUG_ASSERT(m_comparators[i].m_handler != NULL);
- if (cmp_args_nulls_equal(args, i) == FALSE)
+ if (cmp_args_nulls_equal(thd, args, i) == FALSE)
{
*idx= m_comparators[i].m_arg_index;
return false; // Found a matching value
@@ -2129,8 +2174,9 @@ public:
longlong int_op();
String *str_op(String *);
my_decimal *decimal_op(my_decimal *);
- bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool time_op(MYSQL_TIME *ltime);
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool time_op(THD *thd, MYSQL_TIME *ltime);
+ bool native_op(THD *thd, Native *to);
bool fix_fields(THD *thd, Item **ref);
table_map not_null_tables() const { return 0; }
const char *func_name() const { return "case"; }
@@ -2428,12 +2474,19 @@ class cmp_item_row :public cmp_item
{
cmp_item **comparators;
uint n;
+ bool alloc_comparators(THD *thd, uint n);
+ bool aggregate_row_elements_for_comparison(THD *thd,
+ Type_handler_hybrid_field_type *cmp,
+ Item_args *tmp,
+ const char *funcname,
+ uint col,
+ uint level);
public:
cmp_item_row(): comparators(0), n(0) {}
~cmp_item_row();
void store_value(Item *item);
- bool alloc_comparators(THD *thd, uint n);
- bool prepare_comparators(THD *, Item **args, uint arg_count);
+ bool prepare_comparators(THD *, const char *funcname,
+ const Item_args *args, uint level);
int cmp(Item *arg);
int cmp_not_null(const Value *val)
{
@@ -2514,9 +2567,8 @@ public:
{
Field *field=((Item_field*) args[0]->real_item())->field;
- if (((field->type() == MYSQL_TYPE_DATE) ||
- (field->type() == MYSQL_TYPE_DATETIME)) &&
- (field->flags & NOT_NULL_FLAG))
+ if ((field->flags & NOT_NULL_FLAG) &&
+ field->type_handler()->cond_notnull_field_isnull_to_field_eq_zero())
return true;
}
return false;
@@ -2637,6 +2689,9 @@ public:
Item_bool_func2(thd, a, b), canDoTurboBM(FALSE), pattern(0), pattern_len(0),
bmGs(0), bmBc(0), escape_item(escape_arg),
escape_used_in_parsing(escape_used), use_sampling(0), negated(0) {}
+
+ bool get_negated() const { return negated; } // Used by ColumnStore
+
Sql_mode_dependency value_depends_on_sql_mode() const;
longlong val_int();
enum Functype functype() const { return LIKE_FUNC; }
@@ -3100,7 +3155,6 @@ class Item_equal: public Item_bool_func
const Type_handler *m_compare_handler;
CHARSET_INFO *m_compare_collation;
- String cmp_value1, cmp_value2;
public:
COND_EQUAL *upper_levels; /* multiple equalities of upper and levels */
@@ -3158,8 +3212,16 @@ public:
{
return used_tables() & tab_map;
}
+ bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred);
+ bool excl_dep_on_grouping_fields(st_select_lex *sel);
+ bool create_pushable_equalities(THD *thd, List<Item> *equalities,
+ Pushdown_checker checker, uchar *arg,
+ bool clone_const);
+ /* Return the number of elements in this multiple equality */
+ uint elements_count() { return equal_items.elements; }
friend class Item_equal_fields_iterator;
bool count_sargable_conds(void *arg);
+ Item *multiple_equality_transformer(THD *thd, uchar *arg);
friend class Item_equal_iterator<List_iterator_fast,Item>;
friend class Item_equal_iterator<List_iterator,Item>;
friend Item *eliminate_item_equal(THD *thd, COND *cond,
@@ -3195,6 +3257,10 @@ public:
else
current_level= cond_equal.current_level;
}
+ bool is_empty()
+ {
+ return (current_level.elements == 0);
+ }
};
@@ -3309,11 +3375,8 @@ public:
inline bool is_cond_and(Item *item)
{
- if (item->type() != Item::COND_ITEM)
- return FALSE;
-
- Item_cond *cond_item= (Item_cond*) item;
- return (cond_item->functype() == Item_func::COND_AND_FUNC);
+ Item_func *func_item= item->get_item_func();
+ return func_item && func_item->functype() == Item_func::COND_AND_FUNC;
}
class Item_cond_or :public Item_cond
@@ -3414,11 +3477,8 @@ public:
inline bool is_cond_or(Item *item)
{
- if (item->type() != Item::COND_ITEM)
- return FALSE;
-
- Item_cond *cond_item= (Item_cond*) item;
- return (cond_item->functype() == Item_func::COND_OR_FUNC);
+ Item_func *func_item= item->get_item_func();
+ return func_item && func_item->functype() == Item_func::COND_OR_FUNC;
}
Item *and_expressions(Item *a, Item *b, Item **org_item);
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 52e0312f89b..a5b882e2b91 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
- Copyright (c) 2008, 2021, MariaDB Corporation.
+ Copyright (c) 2008, 2022, 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
@@ -3275,6 +3275,46 @@ protected:
};
#endif
+#ifdef WITH_WSREP
+class Create_func_wsrep_last_written_gtid : public Create_func_arg0
+{
+public:
+ virtual Item *create_builder(THD *thd);
+
+ static Create_func_wsrep_last_written_gtid s_singleton;
+
+protected:
+ Create_func_wsrep_last_written_gtid() {}
+ virtual ~Create_func_wsrep_last_written_gtid() {}
+};
+
+
+class Create_func_wsrep_last_seen_gtid : public Create_func_arg0
+{
+public:
+ virtual Item *create_builder(THD *thd);
+
+ static Create_func_wsrep_last_seen_gtid s_singleton;
+
+protected:
+ Create_func_wsrep_last_seen_gtid() {}
+ virtual ~Create_func_wsrep_last_seen_gtid() {}
+};
+
+
+class Create_func_wsrep_sync_wait_upto : public Create_native_func
+{
+public:
+ Item *create_native(THD *thd, const LEX_CSTRING *name, List<Item> *item_list)
+ override;
+
+ static Create_func_wsrep_sync_wait_upto s_singleton;
+
+protected:
+ Create_func_wsrep_sync_wait_upto() {}
+ virtual ~Create_func_wsrep_sync_wait_upto() {}
+};
+#endif /* WITH_WSREP */
#ifdef HAVE_SPATIAL
class Create_func_x : public Create_func_arg1
@@ -3574,12 +3614,11 @@ Create_sp_func::create_with_db(THD *thd,
sph->add_used_routine(lex, thd, qname);
if (pkgname.m_name.length)
sp_handler_package_body.add_used_routine(lex, thd, &pkgname);
+ Name_resolution_context *ctx= lex->current_context();
if (arg_count > 0)
- func= new (thd->mem_root) Item_func_sp(thd, lex->current_context(),
- qname, sph, *item_list);
+ func= new (thd->mem_root) Item_func_sp(thd, ctx, qname, sph, *item_list);
else
- func= new (thd->mem_root) Item_func_sp(thd, lex->current_context(),
- qname, sph);
+ func= new (thd->mem_root) Item_func_sp(thd, ctx, qname, sph);
lex->safe_to_cache_query= 0;
return func;
@@ -3729,7 +3768,7 @@ Create_func_addtime Create_func_addtime::s_singleton;
Item*
Create_func_addtime::create_2_arg(THD *thd, Item *arg1, Item *arg2)
{
- return new (thd->mem_root) Item_func_add_time(thd, arg1, arg2, 0, 0);
+ return new (thd->mem_root) Item_func_add_time(thd, arg1, arg2, false);
}
@@ -6240,7 +6279,26 @@ Create_func_name_const Create_func_name_const::s_singleton;
Item*
Create_func_name_const::create_2_arg(THD *thd, Item *arg1, Item *arg2)
{
- return new (thd->mem_root) Item_name_const(thd, arg1, arg2);
+ if (!arg1->basic_const_item())
+ goto err;
+
+ if (arg2->basic_const_item())
+ return new (thd->mem_root) Item_name_const(thd, arg1, arg2);
+
+ if (arg2->type() == Item::FUNC_ITEM)
+ {
+ Item_func *value_func= (Item_func *) arg2;
+ if (value_func->functype() != Item_func::COLLATE_FUNC &&
+ value_func->functype() != Item_func::NEG_FUNC)
+ goto err;
+
+ if (!value_func->key_item()->basic_const_item())
+ goto err;
+ return new (thd->mem_root) Item_name_const(thd, arg1, arg2);
+ }
+err:
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST");
+ return NULL;
}
@@ -6794,7 +6852,7 @@ Create_func_subtime Create_func_subtime::s_singleton;
Item*
Create_func_subtime::create_2_arg(THD *thd, Item *arg1, Item *arg2)
{
- return new (thd->mem_root) Item_func_add_time(thd, arg1, arg2, 0, 1);
+ return new (thd->mem_root) Item_func_add_time(thd, arg1, arg2, true);
}
@@ -7023,6 +7081,63 @@ Create_func_within::create_2_arg(THD *thd, Item *arg1, Item *arg2)
}
#endif
+#ifdef WITH_WSREP
+Create_func_wsrep_last_written_gtid
+Create_func_wsrep_last_written_gtid::s_singleton;
+
+Item*
+Create_func_wsrep_last_written_gtid::create_builder(THD *thd)
+{
+ thd->lex->safe_to_cache_query= 0;
+ return new (thd->mem_root) Item_func_wsrep_last_written_gtid(thd);
+}
+
+
+Create_func_wsrep_last_seen_gtid
+Create_func_wsrep_last_seen_gtid::s_singleton;
+
+Item*
+Create_func_wsrep_last_seen_gtid::create_builder(THD *thd)
+{
+ thd->lex->safe_to_cache_query= 0;
+ return new (thd->mem_root) Item_func_wsrep_last_seen_gtid(thd);
+}
+
+
+Create_func_wsrep_sync_wait_upto
+Create_func_wsrep_sync_wait_upto::s_singleton;
+
+Item*
+Create_func_wsrep_sync_wait_upto::create_native(THD *thd,
+ const LEX_CSTRING *name,
+ List<Item> *item_list)
+{
+ Item *func= NULL;
+ int arg_count= 0;
+ Item *param_1, *param_2;
+
+ if (item_list != NULL)
+ arg_count= item_list->elements;
+
+ switch (arg_count)
+ {
+ case 1:
+ param_1= item_list->pop();
+ func= new (thd->mem_root) Item_func_wsrep_sync_wait_upto(thd, param_1);
+ break;
+ case 2:
+ param_1= item_list->pop();
+ param_2= item_list->pop();
+ func= new (thd->mem_root) Item_func_wsrep_sync_wait_upto(thd, param_1, param_2);
+ break;
+ default:
+ my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name->str);
+ break;
+ }
+ thd->lex->safe_to_cache_query= 0;
+ return func;
+}
+#endif /* WITH_WSREP */
#ifdef HAVE_SPATIAL
Create_func_x Create_func_x::s_singleton;
@@ -7467,6 +7582,11 @@ Native_func_registry func_array[] =
{ { STRING_WITH_LEN("WEEKDAY") }, BUILDER(Create_func_weekday)},
{ { STRING_WITH_LEN("WEEKOFYEAR") }, BUILDER(Create_func_weekofyear)},
{ { STRING_WITH_LEN("WITHIN") }, GEOM_BUILDER(Create_func_within)},
+#ifdef WITH_WSREP
+ { { STRING_WITH_LEN("WSREP_LAST_WRITTEN_GTID") }, BUILDER(Create_func_wsrep_last_written_gtid)},
+ { { STRING_WITH_LEN("WSREP_LAST_SEEN_GTID") }, BUILDER(Create_func_wsrep_last_seen_gtid)},
+ { { STRING_WITH_LEN("WSREP_SYNC_WAIT_UPTO_GTID") }, BUILDER(Create_func_wsrep_sync_wait_upto)},
+#endif /* WITH_WSREP */
{ { STRING_WITH_LEN("X") }, GEOM_BUILDER(Create_func_x)},
{ { STRING_WITH_LEN("Y") }, GEOM_BUILDER(Create_func_y)},
{ { STRING_WITH_LEN("YEARWEEK") }, BUILDER(Create_func_year_week)},
@@ -7588,84 +7708,6 @@ find_qualified_function_builder(THD *thd)
}
-static bool
-have_important_literal_warnings(const MYSQL_TIME_STATUS *status)
-{
- return (status->warnings & ~MYSQL_TIME_NOTE_TRUNCATED) != 0;
-}
-
-
-/**
- Builder for datetime literals:
- TIME'00:00:00', DATE'2001-01-01', TIMESTAMP'2001-01-01 00:00:00'.
- @param thd The current thread
- @param str Character literal
- @param length Length of str
- @param type Type of literal (TIME, DATE or DATETIME)
- @param send_error Whether to generate an error on failure
-*/
-
-Item *create_temporal_literal(THD *thd,
- const char *str, size_t length,
- CHARSET_INFO *cs,
- enum_field_types type,
- bool send_error)
-{
- MYSQL_TIME_STATUS status;
- MYSQL_TIME ltime;
- Item *item= NULL;
- sql_mode_t flags= sql_mode_for_dates(thd);
-
- switch(type)
- {
- case MYSQL_TYPE_DATE:
- case MYSQL_TYPE_NEWDATE:
- if (!str_to_datetime(cs, str, length, &ltime, flags, &status) &&
- ltime.time_type == MYSQL_TIMESTAMP_DATE && !status.warnings)
- item= new (thd->mem_root) Item_date_literal(thd, &ltime);
- break;
- case MYSQL_TYPE_DATETIME:
- if (!str_to_datetime(cs, str, length, &ltime, flags, &status) &&
- ltime.time_type == MYSQL_TIMESTAMP_DATETIME &&
- !have_important_literal_warnings(&status))
- item= new (thd->mem_root) Item_datetime_literal(thd, &ltime,
- status.precision);
- break;
- case MYSQL_TYPE_TIME:
- if (!str_to_time(cs, str, length, &ltime, 0, &status) &&
- ltime.time_type == MYSQL_TIMESTAMP_TIME &&
- !have_important_literal_warnings(&status))
- item= new (thd->mem_root) Item_time_literal(thd, &ltime,
- status.precision);
- break;
- default:
- DBUG_ASSERT(0);
- }
-
- if (likely(item))
- {
- if (status.warnings) // e.g. a note on nanosecond truncation
- {
- ErrConvString err(str, length, cs);
- make_truncated_value_warning(thd,
- Sql_condition::time_warn_level(status.warnings),
- &err, ltime.time_type, NULL, NULL, NULL);
- }
- return item;
- }
-
- if (send_error)
- {
- const char *typestr=
- (type == MYSQL_TYPE_DATE) ? "DATE" :
- (type == MYSQL_TYPE_TIME) ? "TIME" : "DATETIME";
- ErrConvString err(str, length, thd->variables.character_set_client);
- my_error(ER_WRONG_VALUE, MYF(0), typestr, err.ptr());
- }
- return NULL;
-}
-
-
static List<Item> *create_func_dyncol_prepare(THD *thd,
DYNCALL_CREATE_DEF **dfs,
List<DYNCALL_CREATE_DEF> &list)
diff --git a/sql/item_create.h b/sql/item_create.h
index 894e9777b8d..5f1103bb60f 100644
--- a/sql/item_create.h
+++ b/sql/item_create.h
@@ -194,21 +194,6 @@ protected:
#endif
-Item *create_temporal_literal(THD *thd,
- const char *str, size_t length,
- CHARSET_INFO *cs,
- enum_field_types type,
- bool send_error);
-inline
-Item *create_temporal_literal(THD *thd, const String *str,
- enum_field_types type,
- bool send_error)
-{
- return create_temporal_literal(thd,
- str->ptr(), str->length(), str->charset(),
- type, send_error);
-}
-
struct Native_func_registry
{
LEX_CSTRING name;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 2c79ca531d3..dddb93271c0 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -55,6 +55,9 @@
#include "debug_sync.h"
#include "sql_base.h"
#include "sql_cte.h"
+#ifdef WITH_WSREP
+#include "mysql/service_wsrep.h"
+#endif /* WITH_WSREP */
#ifdef NO_EMBEDDED_ACCESS_CHECKS
#define sp_restore_security_context(A,B) while (0) {}
@@ -134,7 +137,7 @@ void Item_func::sync_with_sum_func_and_with_field(List<Item> &list)
Item *item;
while ((item= li++))
{
- with_sum_func|= item->with_sum_func;
+ join_with_sum_func(item);
with_window_func|= item->with_window_func;
with_field|= item->with_field;
with_param|= item->with_param;
@@ -356,7 +359,7 @@ Item_func::fix_fields(THD *thd, Item **ref)
if (item->maybe_null)
maybe_null=1;
- with_sum_func= with_sum_func || item->with_sum_func;
+ join_with_sum_func(item);
with_param= with_param || item->with_param;
with_window_func= with_window_func || item->with_window_func;
with_field= with_field || item->with_field;
@@ -381,7 +384,7 @@ Item_func::quick_fix_field()
{
for (arg=args, arg_end=args+arg_count; arg != arg_end ; arg++)
{
- if (!(*arg)->fixed)
+ if (!(*arg)->is_fixed())
(*arg)->quick_fix_field();
}
}
@@ -732,7 +735,7 @@ void Item_func::signal_divide_by_null()
Item *Item_func::get_tmp_table_item(THD *thd)
{
- if (!with_sum_func && !const_item())
+ if (!Item_func::with_sum_func() && !const_item())
return new (thd->mem_root) Item_temptable_field(thd, result_field);
return copy_or_same(thd);
}
@@ -804,51 +807,6 @@ bool Item_func_plus::fix_length_and_dec(void)
}
-String *Item_func_hybrid_field_type::val_str_from_decimal_op(String *str)
-{
- my_decimal decimal_value, *val;
- if (!(val= decimal_op_with_null_check(&decimal_value)))
- return 0; // null is set
- DBUG_ASSERT(!null_value);
- my_decimal_round(E_DEC_FATAL_ERROR, val, decimals, FALSE, val);
- str->set_charset(collation.collation);
- my_decimal2string(E_DEC_FATAL_ERROR, val, 0, 0, 0, str);
- return str;
-}
-
-double Item_func_hybrid_field_type::val_real_from_decimal_op()
-{
- my_decimal decimal_value, *val;
- if (!(val= decimal_op_with_null_check(&decimal_value)))
- return 0.0; // null is set
- double result;
- my_decimal2double(E_DEC_FATAL_ERROR, val, &result);
- return result;
-}
-
-longlong Item_func_hybrid_field_type::val_int_from_decimal_op()
-{
- my_decimal decimal_value, *val;
- if (!(val= decimal_op_with_null_check(&decimal_value)))
- return 0; // null is set
- longlong result;
- my_decimal2int(E_DEC_FATAL_ERROR, val, unsigned_flag, &result);
- return result;
-}
-
-bool Item_func_hybrid_field_type::get_date_from_decimal_op(MYSQL_TIME *ltime,
- ulonglong fuzzydate)
-{
- my_decimal value, *res;
- if (!(res= decimal_op_with_null_check(&value)) ||
- decimal_to_datetime_with_warn(res, ltime, fuzzydate,
- field_table_or_null(),
- field_name_or_null()))
- return make_zero_mysql_time(ltime, fuzzydate);
- return (null_value= 0);
-}
-
-
String *Item_func_hybrid_field_type::val_str_from_int_op(String *str)
{
longlong nr= int_op();
@@ -874,19 +832,6 @@ Item_func_hybrid_field_type::val_decimal_from_int_op(my_decimal *dec)
return dec;
}
-bool Item_func_hybrid_field_type::get_date_from_int_op(MYSQL_TIME *ltime,
- ulonglong fuzzydate)
-{
- longlong value= int_op();
- bool neg= !unsigned_flag && value < 0;
- if (null_value || int_to_datetime_with_warn(neg, neg ? -value : value,
- ltime, fuzzydate,
- field_table_or_null(),
- field_name_or_null()))
- return make_zero_mysql_time(ltime, fuzzydate);
- return (null_value= 0);
-}
-
String *Item_func_hybrid_field_type::val_str_from_real_op(String *str)
{
@@ -912,22 +857,11 @@ Item_func_hybrid_field_type::val_decimal_from_real_op(my_decimal *dec)
return dec;
}
-bool Item_func_hybrid_field_type::get_date_from_real_op(MYSQL_TIME *ltime,
- ulonglong fuzzydate)
-{
- double value= real_op();
- if (null_value || double_to_datetime_with_warn(value, ltime, fuzzydate,
- field_table_or_null(),
- field_name_or_null()))
- return make_zero_mysql_time(ltime, fuzzydate);
- return (null_value= 0);
-}
-
String *Item_func_hybrid_field_type::val_str_from_date_op(String *str)
{
MYSQL_TIME ltime;
- if (date_op_with_null_check(&ltime) ||
+ if (date_op_with_null_check(current_thd, &ltime) ||
(null_value= str->alloc(MAX_DATE_STRING_REP_LENGTH)))
return (String *) 0;
str->length(my_TIME_to_str(&ltime, const_cast<char*>(str->ptr()), decimals));
@@ -939,7 +873,7 @@ String *Item_func_hybrid_field_type::val_str_from_date_op(String *str)
double Item_func_hybrid_field_type::val_real_from_date_op()
{
MYSQL_TIME ltime;
- if (date_op_with_null_check(&ltime))
+ if (date_op_with_null_check(current_thd, &ltime))
return 0;
return TIME_to_double(&ltime);
}
@@ -947,7 +881,7 @@ double Item_func_hybrid_field_type::val_real_from_date_op()
longlong Item_func_hybrid_field_type::val_int_from_date_op()
{
MYSQL_TIME ltime;
- if (date_op_with_null_check(&ltime))
+ if (date_op_with_null_check(current_thd, &ltime))
return 0;
return TIME_to_ulonglong(&ltime);
}
@@ -956,7 +890,7 @@ my_decimal *
Item_func_hybrid_field_type::val_decimal_from_date_op(my_decimal *dec)
{
MYSQL_TIME ltime;
- if (date_op_with_null_check(&ltime))
+ if (date_op_with_null_check(current_thd, &ltime))
{
my_decimal_set_zero(dec);
return 0;
@@ -968,7 +902,7 @@ Item_func_hybrid_field_type::val_decimal_from_date_op(my_decimal *dec)
String *Item_func_hybrid_field_type::val_str_from_time_op(String *str)
{
MYSQL_TIME ltime;
- if (time_op_with_null_check(&ltime) ||
+ if (time_op_with_null_check(current_thd, &ltime) ||
(null_value= my_TIME_to_str(&ltime, str, decimals)))
return NULL;
return str;
@@ -977,20 +911,22 @@ String *Item_func_hybrid_field_type::val_str_from_time_op(String *str)
double Item_func_hybrid_field_type::val_real_from_time_op()
{
MYSQL_TIME ltime;
- return time_op_with_null_check(&ltime) ? 0 : TIME_to_double(&ltime);
+ return time_op_with_null_check(current_thd, &ltime) ? 0 :
+ TIME_to_double(&ltime);
}
longlong Item_func_hybrid_field_type::val_int_from_time_op()
{
MYSQL_TIME ltime;
- return time_op_with_null_check(&ltime) ? 0 : TIME_to_ulonglong(&ltime);
+ return time_op_with_null_check(current_thd, &ltime) ? 0 :
+ TIME_to_ulonglong(&ltime);
}
my_decimal *
Item_func_hybrid_field_type::val_decimal_from_time_op(my_decimal *dec)
{
MYSQL_TIME ltime;
- if (time_op_with_null_check(&ltime))
+ if (time_op_with_null_check(current_thd, &ltime))
{
my_decimal_set_zero(dec);
return 0;
@@ -1018,18 +954,6 @@ Item_func_hybrid_field_type::val_decimal_from_str_op(my_decimal *decimal_value)
return res ? decimal_from_string_with_check(decimal_value, res) : 0;
}
-bool Item_func_hybrid_field_type::get_date_from_str_op(MYSQL_TIME *ltime,
- ulonglong fuzzydate)
-{
- StringBuffer<40> tmp;
- String *res;
- if (!(res= str_op_with_null_check(&tmp)) ||
- str_to_datetime_with_warn(res->charset(), res->ptr(), res->length(),
- ltime, fuzzydate))
- return make_zero_mysql_time(ltime, fuzzydate);
- return (null_value= 0);
-}
-
void Item_func_signed::print(String *str, enum_query_type query_type)
{
@@ -1049,47 +973,15 @@ void Item_func_unsigned::print(String *str, enum_query_type query_type)
}
-String *Item_decimal_typecast::val_str(String *str)
-{
- my_decimal tmp_buf, *tmp= val_decimal(&tmp_buf);
- if (null_value)
- return NULL;
- my_decimal2string(E_DEC_FATAL_ERROR, tmp, 0, 0, 0, str);
- return str;
-}
-
-
-double Item_decimal_typecast::val_real()
-{
- my_decimal tmp_buf, *tmp= val_decimal(&tmp_buf);
- double res;
- if (null_value)
- return 0.0;
- my_decimal2double(E_DEC_FATAL_ERROR, tmp, &res);
- return res;
-}
-
-
-longlong Item_decimal_typecast::val_int()
-{
- my_decimal tmp_buf, *tmp= val_decimal(&tmp_buf);
- longlong res;
- if (null_value)
- return 0;
- my_decimal2int(E_DEC_FATAL_ERROR, tmp, unsigned_flag, &res);
- return res;
-}
-
-
my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec)
{
- my_decimal tmp_buf, *tmp= args[0]->val_decimal(&tmp_buf);
+ VDec tmp(args[0]);
bool sign;
uint precision;
- if ((null_value= args[0]->null_value))
+ if ((null_value= tmp.is_null()))
return NULL;
- my_decimal_round(E_DEC_FATAL_ERROR, tmp, decimals, FALSE, dec);
+ tmp.round_to(dec, decimals, HALF_UP);
sign= dec->sign();
if (unsigned_flag)
{
@@ -1206,17 +1098,20 @@ double Item_func_plus::real_op()
return check_float_overflow(value);
}
+#if defined(__powerpc64__) && GCC_VERSION >= 6003 && GCC_VERSION <= 10002
+#pragma GCC push_options
+#pragma GCC optimize ("no-expensive-optimizations")
+#endif
longlong Item_func_plus::int_op()
{
longlong val0= args[0]->val_int();
longlong val1= args[1]->val_int();
- longlong res= val0 + val1;
bool res_unsigned= FALSE;
+ longlong res;
if ((null_value= args[0]->null_value || args[1]->null_value))
return 0;
-
/*
First check whether the result can be represented as a
(bool unsigned_flag, longlong value) pair, then check if it is compatible
@@ -1257,16 +1152,29 @@ longlong Item_func_plus::int_op()
{
if (val0 >=0 && val1 >= 0)
res_unsigned= TRUE;
- else if (val0 < 0 && val1 < 0 && res >= 0)
+ else if (val0 < 0 && val1 < 0 && val0 < (LONGLONG_MIN - val1))
goto err;
}
}
+
+#ifndef WITH_UBSAN
+ res= val0 + val1;
+#else
+ if (res_unsigned)
+ res= (longlong) ((ulonglong) val0 + (ulonglong) val1);
+ else
+ res= val0+val1;
+#endif /* WITH_UBSAN */
+
return check_integer_overflow(res, res_unsigned);
err:
return raise_integer_overflow();
}
+#if defined(__powerpc64__) && GCC_VERSION >= 6003 && GCC_VERSION <= 10002
+#pragma GCC pop_options
+#endif
/**
Calculate plus of two decimals.
@@ -1281,17 +1189,13 @@ err:
my_decimal *Item_func_plus::decimal_op(my_decimal *decimal_value)
{
- my_decimal value1, *val1;
- my_decimal value2, *val2;
- val1= args[0]->val_decimal(&value1);
- if ((null_value= args[0]->null_value))
- return 0;
- val2= args[1]->val_decimal(&value2);
- if (!(null_value= (args[1]->null_value ||
+ VDec2_lazy val(args[0], args[1]);
+ if (!(null_value= (val.has_null() ||
check_decimal_overflow(my_decimal_add(E_DEC_FATAL_ERROR &
~E_DEC_OVERFLOW,
decimal_value,
- val1, val2)) > 3)))
+ val.m_a.ptr(),
+ val.m_b.ptr())) > 3)))
return decimal_value;
return 0;
}
@@ -1363,12 +1267,17 @@ double Item_func_minus::real_op()
}
+#if defined(__powerpc64__) && GCC_VERSION >= 6003 && GCC_VERSION <= 10002
+#pragma GCC push_options
+#pragma GCC optimize ("no-expensive-optimizations")
+#endif
+
longlong Item_func_minus::int_op()
{
longlong val0= args[0]->val_int();
longlong val1= args[1]->val_int();
- longlong res= val0 - val1;
bool res_unsigned= FALSE;
+ longlong res;
if ((null_value= args[0]->null_value || args[1]->null_value))
return 0;
@@ -1383,12 +1292,8 @@ longlong Item_func_minus::int_op()
if (args[1]->unsigned_flag)
{
if ((ulonglong) val0 < (ulonglong) val1)
- {
- if (res >= 0)
- goto err;
- }
- else
- res_unsigned= TRUE;
+ goto err;
+ res_unsigned= TRUE;
}
else
{
@@ -1409,23 +1314,35 @@ longlong Item_func_minus::int_op()
{
if (args[1]->unsigned_flag)
{
- if ((ulonglong) (val0 - LONGLONG_MIN) < (ulonglong) val1)
+ if (((ulonglong) val0 - (ulonglong) LONGLONG_MIN) < (ulonglong) val1)
goto err;
}
else
{
if (val0 > 0 && val1 < 0)
res_unsigned= TRUE;
- else if (val0 < 0 && val1 > 0 && res >= 0)
+ else if (val0 < 0 && val1 > 0 && val0 < (LONGLONG_MIN + val1))
goto err;
}
}
+#ifndef WITH_UBSAN
+ res= val0 - val1;
+#else
+ if (res_unsigned)
+ res= (longlong) ((ulonglong) val0 - (ulonglong) val1);
+ else
+ res= val0 - val1;
+#endif /* WITH_UBSAN */
+
return check_integer_overflow(res, res_unsigned);
err:
return raise_integer_overflow();
}
+#if defined(__powerpc64__) && GCC_VERSION >= 6003 && GCC_VERSION <= 10002
+#pragma GCC pop_options
+#endif
/**
See Item_func_plus::decimal_op for comments.
@@ -1433,18 +1350,13 @@ err:
my_decimal *Item_func_minus::decimal_op(my_decimal *decimal_value)
{
- my_decimal value1, *val1;
- my_decimal value2, *val2=
-
- val1= args[0]->val_decimal(&value1);
- if ((null_value= args[0]->null_value))
- return 0;
- val2= args[1]->val_decimal(&value2);
- if (!(null_value= (args[1]->null_value ||
- (check_decimal_overflow(my_decimal_sub(E_DEC_FATAL_ERROR &
- ~E_DEC_OVERFLOW,
- decimal_value, val1,
- val2)) > 3))))
+ VDec2_lazy val(args[0], args[1]);
+ if (!(null_value= (val.has_null() ||
+ check_decimal_overflow(my_decimal_sub(E_DEC_FATAL_ERROR &
+ ~E_DEC_OVERFLOW,
+ decimal_value,
+ val.m_a.ptr(),
+ val.m_b.ptr())) > 3)))
return decimal_value;
return 0;
}
@@ -1543,17 +1455,13 @@ err:
my_decimal *Item_func_mul::decimal_op(my_decimal *decimal_value)
{
- my_decimal value1, *val1;
- my_decimal value2, *val2;
- val1= args[0]->val_decimal(&value1);
- if ((null_value= args[0]->null_value))
- return 0;
- val2= args[1]->val_decimal(&value2);
- if (!(null_value= (args[1]->null_value ||
- (check_decimal_overflow(my_decimal_mul(E_DEC_FATAL_ERROR &
- ~E_DEC_OVERFLOW,
- decimal_value, val1,
- val2)) > 3))))
+ VDec2_lazy val(args[0], args[1]);
+ if (!(null_value= (val.has_null() ||
+ check_decimal_overflow(my_decimal_mul(E_DEC_FATAL_ERROR &
+ ~E_DEC_OVERFLOW,
+ decimal_value,
+ val.m_a.ptr(),
+ val.m_b.ptr())) > 3)))
return decimal_value;
return 0;
}
@@ -1604,21 +1512,15 @@ double Item_func_div::real_op()
my_decimal *Item_func_div::decimal_op(my_decimal *decimal_value)
{
- my_decimal value1, *val1;
- my_decimal value2, *val2;
int err;
-
- val1= args[0]->val_decimal(&value1);
- if ((null_value= args[0]->null_value))
- return 0;
- val2= args[1]->val_decimal(&value2);
- if ((null_value= args[1]->null_value))
+ VDec2_lazy val(args[0], args[1]);
+ if ((null_value= val.has_null()))
return 0;
if ((err= check_decimal_overflow(my_decimal_div(E_DEC_FATAL_ERROR &
~E_DEC_OVERFLOW &
~E_DEC_DIV_ZERO,
decimal_value,
- val1, val2,
+ val.m_a.ptr(), val.m_b.ptr(),
prec_increment))) > 3)
{
if (err == E_DEC_DIV_ZERO)
@@ -1708,20 +1610,14 @@ longlong Item_func_int_div::val_int()
if (args[0]->result_type() != INT_RESULT ||
args[1]->result_type() != INT_RESULT)
{
- my_decimal tmp;
- my_decimal *val0p= args[0]->val_decimal(&tmp);
- if ((null_value= args[0]->null_value))
+ VDec2_lazy val(args[0], args[1]);
+ if ((null_value= val.has_null()))
return 0;
- my_decimal val0= *val0p;
-
- my_decimal *val1p= args[1]->val_decimal(&tmp);
- if ((null_value= args[1]->null_value))
- return 0;
- my_decimal val1= *val1p;
int err;
+ my_decimal tmp;
if ((err= my_decimal_div(E_DEC_FATAL_ERROR & ~E_DEC_DIV_ZERO, &tmp,
- &val0, &val1, 0)) > 3)
+ val.m_a.ptr(), val.m_b.ptr(), 0)) > 3)
{
if (err == E_DEC_DIV_ZERO)
signal_divide_by_null();
@@ -1729,8 +1625,7 @@ longlong Item_func_int_div::val_int()
}
my_decimal truncated;
- const bool do_truncate= true;
- if (my_decimal_round(E_DEC_FATAL_ERROR, &tmp, 0, do_truncate, &truncated))
+ if (tmp.round_to(&truncated, 0, TRUNCATE))
DBUG_ASSERT(false);
longlong res;
@@ -1815,17 +1710,11 @@ double Item_func_mod::real_op()
my_decimal *Item_func_mod::decimal_op(my_decimal *decimal_value)
{
- my_decimal value1, *val1;
- my_decimal value2, *val2;
-
- val1= args[0]->val_decimal(&value1);
- if ((null_value= args[0]->null_value))
- return 0;
- val2= args[1]->val_decimal(&value2);
- if ((null_value= args[1]->null_value))
+ VDec2_lazy val(args[0], args[1]);
+ if ((null_value= val.has_null()))
return 0;
switch (my_decimal_mod(E_DEC_FATAL_ERROR & ~E_DEC_DIV_ZERO, decimal_value,
- val1, val2)) {
+ val.m_a.ptr(), val.m_b.ptr())) {
case E_DEC_TRUNCATED:
case E_DEC_OK:
return decimal_value;
@@ -1865,6 +1754,46 @@ bool Item_func_mod::fix_length_and_dec()
DBUG_RETURN(FALSE);
}
+static void calc_hash_for_unique(ulong &nr1, ulong &nr2, String *str)
+{
+ CHARSET_INFO *cs;
+ uchar l[4];
+ int4store(l, str->length());
+ cs= str->charset();
+ cs->coll->hash_sort(cs, l, sizeof(l), &nr1, &nr2);
+ cs= str->charset();
+ cs->coll->hash_sort(cs, (uchar *)str->ptr(), str->length(), &nr1, &nr2);
+}
+
+longlong Item_func_hash::val_int()
+{
+ DBUG_EXECUTE_IF("same_long_unique_hash", return 9;);
+ unsigned_flag= true;
+ ulong nr1= 1,nr2= 4;
+ String * str;
+ for(uint i= 0;i<arg_count;i++)
+ {
+ str = args[i]->val_str();
+ if(args[i]->null_value)
+ {
+ null_value= 1;
+ return 0;
+ }
+ calc_hash_for_unique(nr1, nr2, str);
+ }
+ null_value= 0;
+ return (longlong)nr1;
+}
+
+
+bool Item_func_hash::fix_length_and_dec()
+{
+ decimals= 0;
+ max_length= 8;
+ return false;
+}
+
+
double Item_func_neg::real_op()
{
@@ -1898,10 +1827,10 @@ longlong Item_func_neg::int_op()
my_decimal *Item_func_neg::decimal_op(my_decimal *decimal_value)
{
- my_decimal val, *value= args[0]->val_decimal(&val);
- if (!(null_value= args[0]->null_value))
+ VDec value(args[0]);
+ if (!(null_value= value.is_null()))
{
- my_decimal2decimal(value, decimal_value);
+ my_decimal2decimal(value.ptr(), decimal_value);
my_decimal_neg(decimal_value);
return decimal_value;
}
@@ -1925,7 +1854,7 @@ void Item_func_neg::fix_length_and_dec_int()
longlong val= args[0]->val_int();
if ((ulonglong) val >= (ulonglong) LONGLONG_MIN &&
((ulonglong) val != (ulonglong) LONGLONG_MIN ||
- args[0]->type() != INT_ITEM))
+ !args[0]->is_of_type(CONST_ITEM, INT_RESULT)))
{
/*
Ensure that result is converted to DECIMAL, as longlong can't hold
@@ -1996,10 +1925,10 @@ longlong Item_func_abs::int_op()
my_decimal *Item_func_abs::decimal_op(my_decimal *decimal_value)
{
- my_decimal val, *value= args[0]->val_decimal(&val);
- if (!(null_value= args[0]->null_value))
+ VDec value(args[0]);
+ if (!(null_value= value.is_null()))
{
- my_decimal2decimal(value, decimal_value);
+ my_decimal2decimal(value.ptr(), decimal_value);
if (decimal_value->sign())
my_decimal_neg(decimal_value);
return decimal_value;
@@ -2233,31 +2162,29 @@ double Item_func_cot::val_real()
longlong Item_func_shift_left::val_int()
{
DBUG_ASSERT(fixed == 1);
- uint shift;
- ulonglong res= ((ulonglong) args[0]->val_int() <<
- (shift=(uint) args[1]->val_int()));
+ uint shift= (uint) args[1]->val_int();
+ ulonglong value= args[0]->val_int();
if (args[0]->null_value || args[1]->null_value)
{
null_value=1;
return 0;
}
null_value=0;
- return (shift < sizeof(longlong)*8 ? (longlong) res : 0);
+ return (shift < sizeof(longlong)*8 ? (value << shift) : 0);
}
longlong Item_func_shift_right::val_int()
{
DBUG_ASSERT(fixed == 1);
- uint shift;
- ulonglong res= (ulonglong) args[0]->val_int() >>
- (shift=(uint) args[1]->val_int());
+ uint shift= (uint) args[1]->val_int();
+ ulonglong value= args[0]->val_int();
if (args[0]->null_value || args[1]->null_value)
{
null_value=1;
return 0;
}
null_value=0;
- return (shift < sizeof(longlong)*8 ? (longlong) res : 0);
+ return (shift < sizeof(longlong)*8 ? (value >> shift) : 0);
}
@@ -2275,35 +2202,64 @@ longlong Item_func_bit_neg::val_int()
void Item_func_int_val::fix_length_and_dec_int_or_decimal()
{
+ DBUG_ASSERT(args[0]->cmp_type() == DECIMAL_RESULT);
+ DBUG_ASSERT(args[0]->max_length <= DECIMAL_MAX_STR_LENGTH);
/*
- The INT branch of this code should be revised.
- It creates too large data types, e.g.
- CREATE OR REPLACE TABLE t2 AS SELECT FLOOR(9999999.999) AS fa;
- results in a BININT(10) column, while INT(7) should probably be enough.
+ FLOOR() for negative numbers can increase length: floor(-9.9) -> -10
+ CEILING() for positive numbers can increase length: ceil(9.9) -> 10
*/
- ulonglong tmp_max_length= (ulonglong ) args[0]->max_length -
- (args[0]->decimals ? args[0]->decimals + 1 : 0) + 2;
- max_length= tmp_max_length > (ulonglong) UINT_MAX32 ?
- (uint32) UINT_MAX32 : (uint32) tmp_max_length;
- uint tmp= float_length(decimals);
- set_if_smaller(max_length,tmp);
- decimals= 0;
+ decimal_round_mode mode= round_mode();
+ uint length_increase= args[0]->decimals > 0 &&
+ (mode == CEILING ||
+ (mode == FLOOR && !args[0]->unsigned_flag)) ? 1 : 0;
+ uint precision= args[0]->decimal_int_part() + length_increase;
+ set_if_bigger(precision, 1);
/*
- -2 because in most high position can't be used any digit for longlong
- and one position for increasing value during operation
+ The BIGINT data type can store:
+ UNSIGNED BIGINT: 0..18446744073709551615 - up to 19 digits
+ SIGNED BIGINT: -9223372036854775808..9223372036854775807 - up to 18 digits
+
+ The INT data type can store:
+ UNSIGNED INT: 0..4294967295 - up to 9 digits
+ SIGNED INT: -2147483648..2147483647 - up to 9 digits
*/
- if (args[0]->max_length - args[0]->decimals >= DECIMAL_LONGLONG_DIGITS - 2)
+ if (precision > 18)
{
+ unsigned_flag= args[0]->unsigned_flag;
fix_char_length(
- my_decimal_precision_to_length_no_truncation(
- args[0]->decimal_int_part(), 0, false));
+ my_decimal_precision_to_length_no_truncation(precision, 0,
+ unsigned_flag));
set_handler(&type_handler_newdecimal);
}
else
{
- unsigned_flag= args[0]->unsigned_flag;
- set_handler(type_handler_long_or_longlong());
+ uint sign_length= (unsigned_flag= args[0]->unsigned_flag) ? 0 : 1;
+ fix_char_length(precision + sign_length);
+ if (precision > 9)
+ {
+#if MYSQL_VERSION_ID > 100500
+#error Remove the '#else' branch and the conditional compilation
+ if (unsigned_flag)
+ set_handler(&type_handler_ulonglong);
+ else
+ set_handler(&type_handler_slonglong);
+#else
+ set_handler(&type_handler_longlong);
+#endif
+ }
+ else
+ {
+#if MYSQL_VERSION_ID > 100500
+#error Remove the '#else' branch and the conditional compilation
+ if (unsigned_flag)
+ set_handler(&type_handler_ulong);
+ else
+ set_handler(&type_handler_slong);
+#else
+ set_handler(&type_handler_long);
+#endif
+ }
}
}
@@ -2320,35 +2276,29 @@ bool Item_func_int_val::fix_length_and_dec()
{
DBUG_ENTER("Item_func_int_val::fix_length_and_dec");
DBUG_PRINT("info", ("name %s", func_name()));
- if (args[0]->cast_to_int_type_handler()->
- Item_func_int_val_fix_length_and_dec(this))
+ /*
+ We don't want to translate ENUM/SET to CHAR here.
+ So let's call real_type_handler(), not type_handler().
+ */
+ if (args[0]->real_type_handler()->Item_func_int_val_fix_length_and_dec(this))
DBUG_RETURN(TRUE);
- DBUG_PRINT("info", ("Type: %s", type_handler()->name().ptr()));
+ DBUG_PRINT("info", ("Type: %s", real_type_handler()->name().ptr()));
DBUG_RETURN(FALSE);
}
longlong Item_func_ceiling::int_op()
{
- longlong result;
switch (args[0]->result_type()) {
+ case STRING_RESULT: // hex hybrid
case INT_RESULT:
- result= args[0]->val_int();
- null_value= args[0]->null_value;
- break;
+ return val_int_from_item(args[0]);
case DECIMAL_RESULT:
- {
- my_decimal dec_buf, *dec;
- if ((dec= Item_func_ceiling::decimal_op(&dec_buf)))
- my_decimal2int(E_DEC_FATAL_ERROR, dec, unsigned_flag, &result);
- else
- result= 0;
+ return VDec_op(this).to_longlong(unsigned_flag);
+ default:
break;
}
- default:
- result= (longlong)Item_func_ceiling::real_op();
- };
- return result;
+ return (longlong) Item_func_ceiling::real_op();
}
@@ -2366,36 +2316,52 @@ double Item_func_ceiling::real_op()
my_decimal *Item_func_ceiling::decimal_op(my_decimal *decimal_value)
{
- my_decimal val, *value= args[0]->val_decimal(&val);
- if (!(null_value= (args[0]->null_value ||
- my_decimal_ceiling(E_DEC_FATAL_ERROR, value,
- decimal_value) > 1)))
+ VDec value(args[0]);
+ if (!(null_value= (value.is_null() ||
+ value.round_to(decimal_value, 0, CEILING) > 1)))
return decimal_value;
return 0;
}
+bool Item_func_ceiling::date_op(THD *thd, MYSQL_TIME *to, date_mode_t fuzzydate)
+{
+ Datetime::Options opt(thd, TIME_FRAC_TRUNCATE);
+ Datetime *tm= new (to) Datetime(thd, args[0], opt);
+ tm->ceiling(thd);
+ null_value= !tm->is_valid_datetime();
+ DBUG_ASSERT(maybe_null || !null_value);
+ return null_value;
+}
+
+
+bool Item_func_ceiling::time_op(THD *thd, MYSQL_TIME *to)
+{
+ static const Time::Options_for_round opt;
+ Time *tm= new (to) Time(thd, args[0], opt);
+ tm->ceiling();
+ null_value= !tm->is_valid_time();
+ DBUG_ASSERT(maybe_null || !null_value);
+ return null_value;
+}
+
+
longlong Item_func_floor::int_op()
{
- longlong result;
switch (args[0]->result_type()) {
+ case STRING_RESULT: // hex hybrid
case INT_RESULT:
- result= args[0]->val_int();
- null_value= args[0]->null_value;
- break;
+ return val_int_from_item(args[0]);
case DECIMAL_RESULT:
{
my_decimal dec_buf, *dec;
- if ((dec= Item_func_floor::decimal_op(&dec_buf)))
- my_decimal2int(E_DEC_FATAL_ERROR, dec, unsigned_flag, &result);
- else
- result= 0;
- break;
+ return (!(dec= Item_func_floor::decimal_op(&dec_buf))) ? 0 :
+ dec->to_longlong(unsigned_flag);
}
default:
- result= (longlong)Item_func_floor::real_op();
- };
- return result;
+ break;
+ }
+ return (longlong) Item_func_floor::real_op();
}
@@ -2413,15 +2379,36 @@ double Item_func_floor::real_op()
my_decimal *Item_func_floor::decimal_op(my_decimal *decimal_value)
{
- my_decimal val, *value= args[0]->val_decimal(&val);
- if (!(null_value= (args[0]->null_value ||
- my_decimal_floor(E_DEC_FATAL_ERROR, value,
- decimal_value) > 1)))
+ VDec value(args[0]);
+ if (!(null_value= (value.is_null() ||
+ value.round_to(decimal_value, 0, FLOOR) > 1)))
return decimal_value;
return 0;
}
+bool Item_func_floor::date_op(THD *thd, MYSQL_TIME *to, date_mode_t fuzzydate)
+{
+ // DATETIME is not negative, so FLOOR means just truncation
+ Datetime::Options opt(thd, TIME_FRAC_TRUNCATE);
+ Datetime *tm= new (to) Datetime(thd, args[0], opt, 0);
+ null_value= !tm->is_valid_datetime();
+ DBUG_ASSERT(maybe_null || !null_value);
+ return null_value;
+}
+
+
+bool Item_func_floor::time_op(THD *thd, MYSQL_TIME *to)
+{
+ static const Time::Options_for_round opt;
+ Time *tm= new (to) Time(thd, args[0], opt);
+ tm->floor();
+ null_value= !tm->is_valid_time();
+ DBUG_ASSERT(maybe_null || !null_value);
+ return null_value;
+}
+
+
void Item_func_round::fix_length_and_dec_decimal(uint decimals_to_set)
{
int decimals_delta= args[0]->decimals - decimals_to_set;
@@ -2481,29 +2468,109 @@ void Item_func_round::fix_arg_double()
}
-void Item_func_round::fix_arg_int()
+void Item_func_round::fix_arg_temporal(const Type_handler *h,
+ uint int_part_length)
{
- if (args[1]->const_item())
+ set_handler(h);
+ if (args[1]->const_item() && !args[1]->is_expensive())
{
+ Longlong_hybrid_null dec= args[1]->to_longlong_hybrid_null();
+ fix_attributes_temporal(int_part_length,
+ dec.is_null() ? args[0]->decimals :
+ dec.to_uint(TIME_SECOND_PART_DIGITS));
+ }
+ else
+ fix_attributes_temporal(int_part_length, args[0]->decimals);
+}
+
+
+void Item_func_round::fix_arg_time()
+{
+ fix_arg_temporal(&type_handler_time2, MIN_TIME_WIDTH);
+}
+
+
+void Item_func_round::fix_arg_datetime()
+{
+ /*
+ Day increment operations are not supported for '0000-00-00',
+ see get_date_from_daynr() for details. Therefore, expressions like
+ ROUND('0000-00-00 23:59:59.999999')
+ return NULL.
+ */
+ if (!truncate)
+ maybe_null= true;
+ fix_arg_temporal(&type_handler_datetime2, MAX_DATETIME_WIDTH);
+}
+
+
+bool Item_func_round::test_if_length_can_increase()
+{
+ if (truncate)
+ return false;
+ if (args[1]->const_item() && !args[1]->is_expensive())
+ {
+ // Length can increase in some cases: e.g. ROUND(9,-1) -> 10.
Longlong_hybrid val1= args[1]->to_longlong_hybrid();
- if (args[1]->null_value)
- fix_length_and_dec_double(NOT_FIXED_DEC);
- else if ((!val1.to_uint(DECIMAL_MAX_SCALE) && truncate) ||
- args[0]->decimal_precision() < DECIMAL_LONGLONG_DIGITS)
- {
- // Length can increase in some cases: ROUND(9,-1) -> 10
- int length_can_increase= MY_TEST(!truncate && val1.neg());
- max_length= args[0]->max_length + length_can_increase;
- // Here we can keep INT_RESULT
- unsigned_flag= args[0]->unsigned_flag;
- decimals= 0;
- set_handler(type_handler_long_or_longlong());
- }
+ return !args[1]->null_value && val1.neg();
+ }
+ return true; // ROUND(x,n), where n is not a constant.
+}
+
+
+/**
+ Calculate data type and attributes for INT-alike input.
+
+ @param [IN] preferred - The preferred data type handler for simple cases
+ such as ROUND(x) and TRUNCATE(x,0), when the input
+ is short enough to fit into an integer type
+ (without extending to DECIMAL).
+ - If `preferred` is not NULL, then the code tries
+ to preserve the given data type handler and
+ the data type attributes `preferred_attrs`.
+ - If `preferred` is NULL, then the code fully
+ calculates attributes using
+ args[0]->decimal_precision() and chooses between
+ INT and BIGINT, depending on attributes.
+ @param [IN] preferred_attrs - The preferred data type attributes for
+ simple cases.
+*/
+void Item_func_round::fix_arg_int(const Type_handler *preferred,
+ const Type_std_attributes *preferred_attrs,
+ bool use_decimal_on_length_increase)
+{
+ DBUG_ASSERT(args[0]->decimals == 0);
+
+ Type_std_attributes::set(preferred_attrs);
+ if (!test_if_length_can_increase())
+ {
+ // Preserve the exact data type and attributes
+ set_handler(preferred);
+ }
+ else
+ {
+ max_length++;
+ if (use_decimal_on_length_increase)
+ set_handler(&type_handler_newdecimal);
else
- fix_length_and_dec_decimal(val1.to_uint(DECIMAL_MAX_SCALE));
+ set_handler(type_handler_long_or_longlong());
}
+}
+
+
+void Item_func_round::fix_arg_hex_hybrid()
+{
+ DBUG_ASSERT(args[0]->decimals == 0);
+ DBUG_ASSERT(args[0]->decimal_precision() < DECIMAL_LONGLONG_DIGITS);
+ DBUG_ASSERT(args[0]->unsigned_flag); // no needs to add sign length
+ bool length_can_increase= test_if_length_can_increase();
+ max_length= args[0]->decimal_precision() + MY_TEST(length_can_increase);
+ unsigned_flag= true;
+ decimals= 0;
+ if (length_can_increase && args[0]->max_length >= 8)
+ set_handler(&type_handler_newdecimal);
else
- fix_length_and_dec_double(args[0]->decimals);
+ set_handler(type_handler_long_or_longlong());
}
@@ -2605,21 +2672,49 @@ longlong Item_func_round::int_op()
my_decimal *Item_func_round::decimal_op(my_decimal *decimal_value)
{
- my_decimal val, *value= args[0]->val_decimal(&val);
+ VDec value(args[0]);
longlong dec= args[1]->val_int();
if (dec >= 0 || args[1]->unsigned_flag)
dec= MY_MIN((ulonglong) dec, decimals);
else if (dec < INT_MIN)
dec= INT_MIN;
- if (!(null_value= (args[0]->null_value || args[1]->null_value ||
- my_decimal_round(E_DEC_FATAL_ERROR, value, (int) dec,
- truncate, decimal_value) > 1)))
+ if (!(null_value= (value.is_null() || args[1]->null_value ||
+ value.round_to(decimal_value, (uint) dec,
+ truncate ? TRUNCATE : HALF_UP) > 1)))
return decimal_value;
return 0;
}
+bool Item_func_round::time_op(THD *thd, MYSQL_TIME *to)
+{
+ DBUG_ASSERT(args[0]->type_handler()->mysql_timestamp_type() ==
+ MYSQL_TIMESTAMP_TIME);
+ Time::Options_for_round opt(truncate ? TIME_FRAC_TRUNCATE : TIME_FRAC_ROUND);
+ Longlong_hybrid_null dec= args[1]->to_longlong_hybrid_null();
+ Time *tm= new (to) Time(thd, args[0], opt,
+ dec.to_uint(TIME_SECOND_PART_DIGITS));
+ null_value= !tm->is_valid_time() || dec.is_null();
+ DBUG_ASSERT(maybe_null || !null_value);
+ return null_value;
+}
+
+
+bool Item_func_round::date_op(THD *thd, MYSQL_TIME *to, date_mode_t fuzzydate)
+{
+ DBUG_ASSERT(args[0]->type_handler()->mysql_timestamp_type() ==
+ MYSQL_TIMESTAMP_DATETIME);
+ Datetime::Options opt(thd, truncate ? TIME_FRAC_TRUNCATE : TIME_FRAC_ROUND);
+ Longlong_hybrid_null dec= args[1]->to_longlong_hybrid_null();
+ Datetime *tm= new (to) Datetime(thd, args[0], opt,
+ dec.to_uint(TIME_SECOND_PART_DIGITS));
+ null_value= !tm->is_valid_datetime() || dec.is_null();
+ DBUG_ASSERT(maybe_null || !null_value);
+ return null_value;
+}
+
+
void Item_func_rand::seed_random(Item *arg)
{
/*
@@ -2633,7 +2728,7 @@ void Item_func_rand::seed_random(Item *arg)
THD *thd= current_thd;
if (WSREP(thd))
{
- if (thd->wsrep_exec_mode==REPL_RECV)
+ if (wsrep_thd_is_applying(thd))
tmp= thd->wsrep_rand;
else
thd->wsrep_rand= tmp;
@@ -2753,14 +2848,15 @@ bool Item_func_min_max::fix_attributes(Item **items, uint nitems)
0 Otherwise
*/
-bool Item_func_min_max::get_date_native(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_min_max::get_date_native(THD *thd, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate)
{
longlong UNINIT_VAR(min_max);
DBUG_ASSERT(fixed == 1);
for (uint i=0; i < arg_count ; i++)
{
- longlong res= args[i]->val_datetime_packed();
+ longlong res= args[i]->val_datetime_packed(thd);
/* Check if we need to stop (because of error or KILL) and stop the loop */
if (unlikely(args[i]->null_value))
@@ -2771,8 +2867,8 @@ bool Item_func_min_max::get_date_native(MYSQL_TIME *ltime, ulonglong fuzzy_date)
}
unpack_time(min_max, ltime, mysql_timestamp_type());
- if (!(fuzzy_date & TIME_TIME_ONLY) &&
- unlikely((null_value= check_date_with_warn(ltime, fuzzy_date,
+ if (!(fuzzydate & TIME_TIME_ONLY) &&
+ unlikely((null_value= check_date_with_warn(thd, ltime, fuzzydate,
MYSQL_TIMESTAMP_ERROR))))
return true;
@@ -2780,17 +2876,17 @@ bool Item_func_min_max::get_date_native(MYSQL_TIME *ltime, ulonglong fuzzy_date)
}
-bool Item_func_min_max::get_time_native(MYSQL_TIME *ltime)
+bool Item_func_min_max::get_time_native(THD *thd, MYSQL_TIME *ltime)
{
DBUG_ASSERT(fixed == 1);
- Time value(args[0]);
+ Time value(thd, args[0], Time::Options(thd), decimals);
if (!value.is_valid_time())
return (null_value= true);
for (uint i= 1; i < arg_count ; i++)
{
- Time tmp(args[i]);
+ Time tmp(thd, args[i], Time::Options(thd), decimals);
if (!tmp.is_valid_time())
return (null_value= true);
@@ -2904,6 +3000,28 @@ my_decimal *Item_func_min_max::val_decimal_native(my_decimal *dec)
}
+bool Item_func_min_max::val_native(THD *thd, Native *native)
+{
+ DBUG_ASSERT(fixed == 1);
+ const Type_handler *handler= Item_hybrid_func::type_handler();
+ NativeBuffer<STRING_BUFFER_USUAL_SIZE> cur;
+ for (uint i= 0; i < arg_count; i++)
+ {
+ if (val_native_with_conversion_from_item(thd, args[i],
+ i == 0 ? native : &cur,
+ handler))
+ return true;
+ if (i > 0)
+ {
+ int cmp= handler->cmp_native(*native, cur);
+ if ((cmp_sign < 0 ? cmp : -cmp) < 0 && native->copy(cur))
+ return null_value= true;
+ }
+ }
+ return null_value= false;
+}
+
+
longlong Item_func_bit_length::val_int()
{
DBUG_ASSERT(fixed == 1);
@@ -2966,10 +3084,11 @@ longlong Item_func_locate::val_int()
if (arg_count == 3)
{
- start0= start= args[2]->val_int() - 1;
+ start0= start= args[2]->val_int();
- if ((start < 0) || (start > a->length()))
+ if ((start <= 0) || (start > a->length()))
return 0;
+ start0--; start--;
/* start is now sufficiently valid to pass to charpos function */
start= a->charpos((int) start);
@@ -3035,14 +3154,14 @@ longlong Item_func_field::val_int()
}
else if (cmp_type == DECIMAL_RESULT)
{
- my_decimal dec_arg_buf, *dec_arg,
- dec_buf, *dec= args[0]->val_decimal(&dec_buf);
- if (args[0]->null_value)
+ VDec dec(args[0]);
+ if (dec.is_null())
return 0;
+ my_decimal dec_arg_buf;
for (uint i=1; i < arg_count; i++)
{
- dec_arg= args[i]->val_decimal(&dec_arg_buf);
- if (!args[i]->null_value && !my_decimal_cmp(dec_arg, dec))
+ my_decimal *dec_arg= args[i]->val_decimal(&dec_arg_buf);
+ if (!args[i]->null_value && !dec.cmp(dec_arg))
return (longlong) (i);
}
}
@@ -3134,7 +3253,7 @@ bool Item_func_find_in_set::fix_length_and_dec()
find->length(), 0);
enum_bit=0;
if (enum_value)
- enum_bit=1LL << (enum_value-1);
+ enum_bit= 1ULL << (enum_value-1);
}
}
}
@@ -3296,6 +3415,7 @@ udf_handler::fix_fields(THD *thd, Item_func_or_sum *func,
}
uint i;
Item **arg,**arg_end;
+ With_sum_func_cache *with_sum_func_cache= func->get_with_sum_func_cache();
for (i=0, arg=arguments, arg_end=arguments+arg_count;
arg != arg_end ;
arg++,i++)
@@ -3319,7 +3439,8 @@ udf_handler::fix_fields(THD *thd, Item_func_or_sum *func,
func->collation.set(&my_charset_bin);
if (item->maybe_null)
func->maybe_null=1;
- func->with_sum_func= func->with_sum_func || item->with_sum_func;
+ if (with_sum_func_cache)
+ with_sum_func_cache->join_with_sum_func(item);
func->with_window_func= func->with_window_func ||
item->with_window_func;
func->with_field= func->with_field || item->with_field;
@@ -3622,32 +3743,6 @@ String *Item_func_udf_int::val_str(String *str)
}
-longlong Item_func_udf_decimal::val_int()
-{
- my_bool tmp_null_value;
- longlong result;
- my_decimal dec_buf, *dec= udf.val_decimal(&tmp_null_value, &dec_buf);
- null_value= tmp_null_value;
- if (null_value)
- return 0;
- my_decimal2int(E_DEC_FATAL_ERROR, dec, unsigned_flag, &result);
- return result;
-}
-
-
-double Item_func_udf_decimal::val_real()
-{
- my_bool tmp_null_value;
- double result;
- my_decimal dec_buf, *dec= udf.val_decimal(&tmp_null_value, &dec_buf);
- null_value= tmp_null_value;
- if (null_value)
- return 0.0;
- my_decimal2double(E_DEC_FATAL_ERROR, dec, &result);
- return result;
-}
-
-
my_decimal *Item_func_udf_decimal::val_decimal(my_decimal *dec_buf)
{
my_decimal *res;
@@ -3663,21 +3758,6 @@ my_decimal *Item_func_udf_decimal::val_decimal(my_decimal *dec_buf)
}
-String *Item_func_udf_decimal::val_str(String *str)
-{
- my_bool tmp_null_value;
- my_decimal dec_buf, *dec= udf.val_decimal(&tmp_null_value, &dec_buf);
- null_value= tmp_null_value;
- if (null_value)
- return 0;
- if (str->length() < DECIMAL_MAX_STR_LENGTH)
- str->length(DECIMAL_MAX_STR_LENGTH);
- my_decimal_round(E_DEC_FATAL_ERROR, dec, decimals, FALSE, &dec_buf);
- my_decimal2string(E_DEC_FATAL_ERROR, &dec_buf, 0, 0, '0', str);
- return str;
-}
-
-
/* Default max_length is max argument length */
bool Item_func_udf_str::fix_length_and_dec()
@@ -3744,7 +3824,7 @@ longlong Item_master_pos_wait::val_int()
connection_name.length= con->length();
if (check_master_connection_name(&connection_name))
{
- my_error(ER_WRONG_ARGUMENTS, MYF(ME_JUST_WARNING),
+ my_error(ER_WRONG_ARGUMENTS, MYF(ME_WARNING),
"MASTER_CONNECTION_NAME");
goto err;
}
@@ -4457,7 +4537,7 @@ user_var_entry *get_variable(HASH *hash, LEX_CSTRING *name,
if (!my_hash_inited(hash))
return 0;
if (!(entry = (user_var_entry*) my_malloc(size,
- MYF(MY_WME | ME_FATALERROR |
+ MYF(MY_WME | ME_FATAL |
MY_THREAD_SPECIFIC))))
return 0;
entry->name.str=(char*) entry+ ALIGN_SIZE(sizeof(user_var_entry))+
@@ -4712,7 +4792,7 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, size_t length,
entry->value=0;
entry->value= (char*) my_realloc(entry->value, length,
MYF(MY_ALLOW_ZERO_PTR | MY_WME |
- ME_FATALERROR |
+ ME_FATAL |
MY_THREAD_SPECIFIC));
if (!entry->value)
return 1;
@@ -4778,11 +4858,7 @@ double user_var_entry::val_real(bool *null_value)
case INT_RESULT:
return (double) *(longlong*) value;
case DECIMAL_RESULT:
- {
- double result;
- my_decimal2double(E_DEC_FATAL_ERROR, (my_decimal *)value, &result);
- return result;
- }
+ return ((my_decimal *)value)->to_double();
case STRING_RESULT:
return my_atof(value); // This is null terminated
case ROW_RESULT:
@@ -4807,11 +4883,7 @@ longlong user_var_entry::val_int(bool *null_value) const
case INT_RESULT:
return *(longlong*) value;
case DECIMAL_RESULT:
- {
- longlong result;
- my_decimal2int(E_DEC_FATAL_ERROR, (my_decimal *)value, 0, &result);
- return result;
- }
+ return ((my_decimal *)value)->to_longlong(false);
case STRING_RESULT:
{
int error;
@@ -5548,10 +5620,9 @@ bool Item_func_get_user_var::set_value(THD *thd,
bool Item_user_var_as_out_param::fix_fields(THD *thd, Item **ref)
{
- DBUG_ASSERT(fixed == 0);
+ DBUG_ASSERT(!is_fixed());
DBUG_ASSERT(thd->lex->exchange);
- if (Item::fix_fields(thd, ref) ||
- !(entry= get_variable(&thd->user_vars, &org_name, 1)))
+ if (!(entry= get_variable(&thd->user_vars, &org_name, 1)))
return TRUE;
entry->type= STRING_RESULT;
/*
@@ -5609,7 +5680,8 @@ my_decimal* Item_user_var_as_out_param::val_decimal(my_decimal *decimal_buffer)
}
-bool Item_user_var_as_out_param::get_date(MYSQL_TIME *ltime, ulonglong fuzzy)
+bool Item_user_var_as_out_param::get_date(THD *thd, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate)
{
DBUG_ASSERT(0);
return true;
@@ -5648,7 +5720,7 @@ void Item_func_get_system_var::update_null_value()
THD *thd= current_thd;
int save_no_errors= thd->no_errors;
thd->no_errors= TRUE;
- Item::update_null_value();
+ type_handler()->Item_update_null_value(this);
thd->no_errors= save_no_errors;
}
@@ -6496,7 +6568,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
(thd->lex->sql_command == SQLCOM_CREATE_VIEW))
{
Security_context *save_security_ctx= thd->security_ctx;
- if (context->security_ctx)
+ if (context && context->security_ctx)
thd->security_ctx= context->security_ctx;
/*
@@ -6511,7 +6583,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
if (res)
{
- context->process_error(thd);
+ process_error(thd);
DBUG_RETURN(res);
}
}
@@ -6528,7 +6600,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
if (!(m_sp= sp))
{
my_missing_function_error(m_name->m_name, ErrConvDQName(m_name).ptr());
- context->process_error(thd);
+ process_error(thd);
DBUG_RETURN(TRUE);
}
@@ -6684,6 +6756,14 @@ String *Item_func_last_value::val_str(String *str)
return tmp;
}
+
+bool Item_func_last_value::val_native(THD *thd, Native *to)
+{
+ evaluate_sideeffects();
+ return val_native_from_item(thd, last_value, to);
+}
+
+
longlong Item_func_last_value::val_int()
{
longlong tmp;
@@ -6712,10 +6792,10 @@ my_decimal *Item_func_last_value::val_decimal(my_decimal *decimal_value)
}
-bool Item_func_last_value::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_func_last_value::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
evaluate_sideeffects();
- bool tmp= last_value->get_date(ltime, fuzzydate);
+ bool tmp= last_value->get_date(thd, ltime, fuzzydate);
null_value= last_value->null_value;
return tmp;
}
diff --git a/sql/item_func.h b/sql/item_func.h
index 7268b56eb97..81c2828d555 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -35,12 +35,11 @@ extern "C" /* Bug in BSDI include file */
#include <cmath>
-class Item_func :public Item_func_or_sum
+class Item_func :public Item_func_or_sum,
+ protected With_sum_func_cache
{
void sync_with_sum_func_and_with_field(List<Item> &list);
protected:
- String *val_str_from_val_str_ascii(String *str, String *str2);
-
virtual bool check_arguments() const
{
return check_argument_types_scalar(0, arg_count);
@@ -56,6 +55,7 @@ protected:
bool check_argument_types_can_return_text(uint start, uint end) const;
bool check_argument_types_can_return_date(uint start, uint end) const;
bool check_argument_types_can_return_time(uint start, uint end) const;
+ void print_cast_temporal(String *str, enum_query_type query_type);
public:
table_map not_null_tables_cache;
@@ -80,49 +80,56 @@ public:
CASE_SEARCHED_FUNC, // Used by ColumnStore/Spider
CASE_SIMPLE_FUNC // Used by ColumnStore/spider
};
+ static scalar_comparison_op functype_to_scalar_comparison_op(Functype type)
+ {
+ switch (type) {
+ case EQ_FUNC: return SCALAR_CMP_EQ;
+ case EQUAL_FUNC: return SCALAR_CMP_EQUAL;
+ case LT_FUNC: return SCALAR_CMP_LT;
+ case LE_FUNC: return SCALAR_CMP_LE;
+ case GE_FUNC: return SCALAR_CMP_GE;
+ case GT_FUNC: return SCALAR_CMP_GT;
+ default: break;
+ }
+ DBUG_ASSERT(0);
+ return SCALAR_CMP_EQ;
+ }
enum Type type() const { return FUNC_ITEM; }
virtual enum Functype functype() const { return UNKNOWN_FUNC; }
Item_func(THD *thd): Item_func_or_sum(thd)
{
- with_sum_func= 0;
with_field= 0;
with_param= 0;
}
- Item_func(THD *thd, Item *a): Item_func_or_sum(thd, a)
+ Item_func(THD *thd, Item *a)
+ :Item_func_or_sum(thd, a), With_sum_func_cache(a)
{
- with_sum_func= a->with_sum_func;
with_param= a->with_param;
with_field= a->with_field;
}
- Item_func(THD *thd, Item *a, Item *b):
- Item_func_or_sum(thd, a, b)
+ Item_func(THD *thd, Item *a, Item *b)
+ :Item_func_or_sum(thd, a, b), With_sum_func_cache(a, b)
{
- with_sum_func= a->with_sum_func || b->with_sum_func;
with_param= a->with_param || b->with_param;
with_field= a->with_field || b->with_field;
}
- Item_func(THD *thd, Item *a, Item *b, Item *c):
- Item_func_or_sum(thd, a, b, c)
+ Item_func(THD *thd, Item *a, Item *b, Item *c)
+ :Item_func_or_sum(thd, a, b, c), With_sum_func_cache(a, b, c)
{
- with_sum_func= a->with_sum_func || b->with_sum_func || c->with_sum_func;
with_field= a->with_field || b->with_field || c->with_field;
with_param= a->with_param || b->with_param || c->with_param;
}
- Item_func(THD *thd, Item *a, Item *b, Item *c, Item *d):
- Item_func_or_sum(thd, a, b, c, d)
+ Item_func(THD *thd, Item *a, Item *b, Item *c, Item *d)
+ :Item_func_or_sum(thd, a, b, c, d), With_sum_func_cache(a, b, c, d)
{
- with_sum_func= a->with_sum_func || b->with_sum_func ||
- c->with_sum_func || d->with_sum_func;
with_field= a->with_field || b->with_field ||
c->with_field || d->with_field;
with_param= a->with_param || b->with_param ||
c->with_param || d->with_param;
}
- Item_func(THD *thd, Item *a, Item *b, Item *c, Item *d, Item* e):
- Item_func_or_sum(thd, a, b, c, d, e)
+ Item_func(THD *thd, Item *a, Item *b, Item *c, Item *d, Item* e)
+ :Item_func_or_sum(thd, a, b, c, d, e), With_sum_func_cache(a, b, c, d, e)
{
- with_sum_func= a->with_sum_func || b->with_sum_func ||
- c->with_sum_func || d->with_sum_func || e->with_sum_func;
with_field= a->with_field || b->with_field ||
c->with_field || d->with_field || e->with_field;
with_param= a->with_param || b->with_param ||
@@ -134,11 +141,10 @@ public:
set_arguments(thd, list);
}
// Constructor used for Item_cond_and/or (see Item comment)
- Item_func(THD *thd, Item_func *item):
- Item_func_or_sum(thd, item),
+ Item_func(THD *thd, Item_func *item)
+ :Item_func_or_sum(thd, item), With_sum_func_cache(item),
not_null_tables_cache(item->not_null_tables_cache)
- {
- }
+ { }
bool fix_fields(THD *, Item **ref);
void cleanup()
{
@@ -174,16 +180,12 @@ public:
virtual void print(String *str, enum_query_type query_type);
void print_op(String *str, enum_query_type query_type);
void print_args(String *str, uint from, enum_query_type query_type);
- inline bool get_arg0_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
- {
- DBUG_ASSERT(!(fuzzy_date & TIME_TIME_ONLY));
- Datetime dt(current_thd, args[0], fuzzy_date);
- return (null_value= dt.copy_to_mysql_time(ltime));
- }
bool is_null() {
update_null_value();
return null_value;
}
+ String *val_str_from_val_str_ascii(String *str, String *str2);
+
void signal_divide_by_null();
friend class udf_handler;
Field *create_field_for_create_select(TABLE *table)
@@ -325,6 +327,11 @@ public:
return this;
}
+ bool has_rand_bit()
+ {
+ return used_tables() & RAND_TABLE_BIT;
+ }
+
bool excl_dep_on_table(table_map tab_map)
{
if (used_tables() & OUTER_REF_TABLE_BIT)
@@ -335,9 +342,16 @@ public:
bool excl_dep_on_grouping_fields(st_select_lex *sel)
{
+ if (has_rand_bit() || with_subquery())
+ return false;
return Item_args::excl_dep_on_grouping_fields(sel);
}
+ bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
+ {
+ return Item_args::excl_dep_on_in_subq_left_part(subq_pred);
+ }
+
/*
We assume the result of any function that has a TIMESTAMP argument to be
timezone-dependent, since a TIMESTAMP value in both numeric and string
@@ -380,6 +394,12 @@ public:
- or replaced to an Item_int_with_ref
*/
bool setup_args_and_comparator(THD *thd, Arg_comparator *cmp);
+
+ bool with_sum_func() const { return m_with_sum_func; }
+ With_sum_func_cache* get_with_sum_func_cache() { return this; }
+ Item_func *get_item_func() { return this; }
+ bool is_simplified_cond_processor(void *arg)
+ { return const_item() && !val_int(); }
};
@@ -400,8 +420,8 @@ public:
DBUG_ASSERT(fixed == 1);
return Converter_double_to_longlong(val_real(), unsigned_flag).result();
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_real(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_real(thd, ltime, fuzzydate); }
const Type_handler *type_handler() const { return &type_handler_double; }
bool fix_length_and_dec()
{
@@ -438,6 +458,230 @@ public:
{
Type_geometry_attributes::set_geometry_type(type);
}
+ void fix_length_and_dec_long_or_longlong(uint char_length, bool unsigned_arg)
+ {
+ collation.set_numeric();
+ unsigned_flag= unsigned_arg;
+ max_length= char_length;
+#if MARIADB_VERSION_ID < 100500
+ set_handler(Type_handler::type_handler_long_or_longlong(char_length));
+#else
+ set_handler(Type_handler::type_handler_long_or_longlong(char_length,
+ unsigned_arg));
+#endif
+ }
+ void fix_length_and_dec_ulong_or_ulonglong_by_nbits(uint nbits)
+ {
+ uint digits= Type_handler_bit::Bit_decimal_notation_int_digits_by_nbits(nbits);
+ collation.set_numeric();
+ unsigned_flag= true;
+ max_length= digits;
+ if (nbits > 32)
+ set_handler(&type_handler_longlong);
+ else
+ set_handler(&type_handler_long);
+ }
+};
+
+
+class Item_handled_func: public Item_func
+{
+public:
+ class Handler
+ {
+ public:
+ virtual ~Handler() { }
+ virtual String *val_str(Item_handled_func *, String *) const= 0;
+ virtual String *val_str_ascii(Item_handled_func *, String *) const= 0;
+ virtual double val_real(Item_handled_func *) const= 0;
+ virtual longlong val_int(Item_handled_func *) const= 0;
+ virtual my_decimal *val_decimal(Item_handled_func *, my_decimal *) const= 0;
+ virtual bool get_date(THD *thd, Item_handled_func *, MYSQL_TIME *, date_mode_t fuzzydate) const= 0;
+ virtual bool val_native(THD *thd, Item_handled_func *, Native *to) const
+ {
+ DBUG_ASSERT(0);
+ to->length(0);
+ return true;
+ }
+ virtual const Type_handler *return_type_handler() const= 0;
+ virtual bool fix_length_and_dec(Item_handled_func *) const= 0;
+ };
+
+ /**
+ Abstract class for functions returning TIME, DATE, DATETIME or string values,
+ whose data type depends on parameters and is set at fix_fields time.
+ */
+ class Handler_temporal: public Handler
+ {
+ public:
+ String *val_str(Item_handled_func *item, String *to) const
+ {
+ StringBuffer<MAX_FIELD_WIDTH> ascii_buf;
+ return item->val_str_from_val_str_ascii(to, &ascii_buf);
+ }
+ };
+
+ /**
+ Abstract class for functions returning strings,
+ which are generated from get_date() results,
+ when get_date() can return different MYSQL_TIMESTAMP_XXX per row.
+ */
+ class Handler_temporal_string: public Handler_temporal
+ {
+ public:
+ const Type_handler *return_type_handler() const
+ {
+ return &type_handler_string;
+ }
+ double val_real(Item_handled_func *item) const
+ {
+ return Temporal_hybrid(item).to_double();
+ }
+ longlong val_int(Item_handled_func *item) const
+ {
+ return Temporal_hybrid(item).to_longlong();
+ }
+ my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
+ {
+ return Temporal_hybrid(item).to_decimal(to);
+ }
+ String *val_str_ascii(Item_handled_func *item, String *to) const
+ {
+ return Temporal_hybrid(item).to_string(to, item->decimals);
+ }
+ };
+
+
+ class Handler_date: public Handler_temporal
+ {
+ public:
+ const Type_handler *return_type_handler() const
+ {
+ return &type_handler_newdate;
+ }
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ item->fix_attributes_date();
+ return false;
+ }
+ double val_real(Item_handled_func *item) const
+ {
+ return Date(item).to_double();
+ }
+ longlong val_int(Item_handled_func *item) const
+ {
+ return Date(item).to_longlong();
+ }
+ my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
+ {
+ return Date(item).to_decimal(to);
+ }
+ String *val_str_ascii(Item_handled_func *item, String *to) const
+ {
+ return Date(item).to_string(to);
+ }
+ };
+
+
+ class Handler_time: public Handler_temporal
+ {
+ public:
+ const Type_handler *return_type_handler() const
+ {
+ return &type_handler_time2;
+ }
+ double val_real(Item_handled_func *item) const
+ {
+ return Time(item).to_double();
+ }
+ longlong val_int(Item_handled_func *item) const
+ {
+ return Time(item).to_longlong();
+ }
+ my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
+ {
+ return Time(item).to_decimal(to);
+ }
+ String *val_str_ascii(Item_handled_func *item, String *to) const
+ {
+ return Time(item).to_string(to, item->decimals);
+ }
+ bool val_native(THD *thd, Item_handled_func *item, Native *to) const
+ {
+ return Time(thd, item).to_native(to, item->decimals);
+ }
+ };
+
+
+ class Handler_datetime: public Handler_temporal
+ {
+ public:
+ const Type_handler *return_type_handler() const
+ {
+ return &type_handler_datetime2;
+ }
+ double val_real(Item_handled_func *item) const
+ {
+ return Datetime(item).to_double();
+ }
+ longlong val_int(Item_handled_func *item) const
+ {
+ return Datetime(item).to_longlong();
+ }
+ my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
+ {
+ return Datetime(item).to_decimal(to);
+ }
+ String *val_str_ascii(Item_handled_func *item, String *to) const
+ {
+ return Datetime(item).to_string(to, item->decimals);
+ }
+ };
+
+
+protected:
+ const Handler *m_func_handler;
+public:
+ Item_handled_func(THD *thd, Item *a)
+ :Item_func(thd, a), m_func_handler(NULL) { }
+ Item_handled_func(THD *thd, Item *a, Item *b)
+ :Item_func(thd, a, b), m_func_handler(NULL) { }
+ void set_func_handler(const Handler *handler)
+ {
+ m_func_handler= handler;
+ }
+ const Type_handler *type_handler() const
+ {
+ return m_func_handler->return_type_handler();
+ }
+ String *val_str(String *to)
+ {
+ return m_func_handler->val_str(this, to);
+ }
+ String *val_str_ascii(String *to)
+ {
+ return m_func_handler->val_str_ascii(this, to);
+ }
+ double val_real()
+ {
+ return m_func_handler->val_real(this);
+ }
+ longlong val_int()
+ {
+ return m_func_handler->val_int(this);
+ }
+ my_decimal *val_decimal(my_decimal *to)
+ {
+ return m_func_handler->val_decimal(this, to);
+ }
+ bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t fuzzydate)
+ {
+ return m_func_handler->get_date(thd, this, to, fuzzydate);
+ }
+ bool val_native(THD *thd, Native *to)
+ {
+ return m_func_handler->val_native(thd, this, to);
+ }
};
@@ -463,15 +707,15 @@ class Item_func_hybrid_field_type: public Item_hybrid_func
Helper methods to make sure that the result of
decimal_op(), str_op() and date_op() is properly synched with null_value.
*/
- bool date_op_with_null_check(MYSQL_TIME *ltime)
+ bool date_op_with_null_check(THD *thd, MYSQL_TIME *ltime)
{
- bool rc= date_op(ltime, 0);
+ bool rc= date_op(thd, ltime, date_mode_t(0));
DBUG_ASSERT(!rc ^ null_value);
return rc;
}
- bool time_op_with_null_check(MYSQL_TIME *ltime)
+ bool time_op_with_null_check(THD *thd, MYSQL_TIME *ltime)
{
- bool rc= time_op(ltime);
+ bool rc= time_op(thd, ltime);
DBUG_ASSERT(!rc ^ null_value);
DBUG_ASSERT(rc || ltime->time_type == MYSQL_TIMESTAMP_TIME);
return rc;
@@ -482,17 +726,6 @@ class Item_func_hybrid_field_type: public Item_hybrid_func
DBUG_ASSERT((res != NULL) ^ null_value);
return res;
}
- my_decimal *decimal_op_with_null_check(my_decimal *decimal_buffer)
- {
- my_decimal *res= decimal_op(decimal_buffer);
- DBUG_ASSERT((res != NULL) ^ null_value);
- return res;
- }
- bool make_zero_mysql_time(MYSQL_TIME *ltime, ulonglong fuzzydate)
- {
- bzero(ltime, sizeof(*ltime));
- return null_value|= !(fuzzydate & TIME_FUZZY_DATES);
- }
public:
// Value methods that involve no conversion
@@ -500,10 +733,6 @@ public:
{
return str_op_with_null_check(&str_value);
}
- my_decimal *val_decimal_from_decimal_op(my_decimal *dec)
- {
- return decimal_op_with_null_check(dec);
- }
longlong val_int_from_int_op()
{
return int_op();
@@ -514,7 +743,6 @@ public:
}
// Value methods that involve conversion
- String *val_str_from_decimal_op(String *str);
String *val_str_from_real_op(String *str);
String *val_str_from_int_op(String *str);
String *val_str_from_date_op(String *str);
@@ -528,21 +756,14 @@ public:
longlong val_int_from_str_op();
longlong val_int_from_real_op();
- longlong val_int_from_decimal_op();
longlong val_int_from_date_op();
longlong val_int_from_time_op();
double val_real_from_str_op();
- double val_real_from_decimal_op();
double val_real_from_date_op();
double val_real_from_time_op();
double val_real_from_int_op();
- bool get_date_from_str_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_from_real_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_from_decimal_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
- bool get_date_from_int_op(MYSQL_TIME *ltime, ulonglong fuzzydate);
-
public:
Item_func_hybrid_field_type(THD *thd):
Item_hybrid_func(thd)
@@ -586,11 +807,17 @@ public:
DBUG_ASSERT(null_value == (res == NULL));
return res;
}
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date)
+ bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
{
DBUG_ASSERT(fixed);
return Item_func_hybrid_field_type::type_handler()->
- Item_func_hybrid_field_type_get_date(this, res, fuzzy_date);
+ Item_func_hybrid_field_type_get_date_with_warn(thd, this, to, mode);
+ }
+
+ bool val_native(THD *thd, Native *to)
+ {
+ DBUG_ASSERT(fixed);
+ return native_op(thd, to);
}
/**
@@ -600,6 +827,20 @@ public:
@return The result of the operation.
*/
virtual longlong int_op()= 0;
+ Longlong_null to_longlong_null_op()
+ {
+ longlong nr= int_op();
+ /*
+ C++ does not guarantee the order of parameter evaluation,
+ so to make sure "null_value" is passed to the constructor
+ after the int_op() call, int_op() is caled on a separate line.
+ */
+ return Longlong_null(nr, null_value);
+ }
+ Longlong_hybrid_null to_longlong_hybrid_null_op()
+ {
+ return Longlong_hybrid_null(to_longlong_null_op(), unsigned_flag);
+ }
/**
@brief Performs the operation that this functions implements when the
@@ -608,6 +849,12 @@ public:
@return The result of the operation.
*/
virtual double real_op()= 0;
+ Double_null to_double_null_op()
+ {
+ // val_real() must be caleed on a separate line. See to_longlong_null()
+ double nr= real_op();
+ return Double_null(nr, null_value);
+ }
/**
@brief Performs the operation that this functions implements when the
@@ -634,15 +881,16 @@ public:
field type is DATETIME or DATE.
@return The result of the operation.
*/
- virtual bool date_op(MYSQL_TIME *res, ulonglong fuzzy_date)= 0;
+ virtual bool date_op(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate)= 0;
/**
@brief Performs the operation that this functions implements when
field type is TIME.
@return The result of the operation.
*/
- virtual bool time_op(MYSQL_TIME *res)= 0;
+ virtual bool time_op(THD *thd, MYSQL_TIME *res)= 0;
+ virtual bool native_op(THD *thd, Native *native)= 0;
};
@@ -700,12 +948,17 @@ public:
Item_func_hybrid_field_type(thd, list)
{ }
String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
- bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(0);
return true;
}
- bool time_op(MYSQL_TIME *ltime)
+ bool time_op(THD *thd, MYSQL_TIME *ltime)
+ {
+ DBUG_ASSERT(0);
+ return true;
+ }
+ bool native_op(THD *thd, Native *to)
{
DBUG_ASSERT(0);
return true;
@@ -791,8 +1044,8 @@ public:
{ collation.set_numeric(); }
double val_real();
String *val_str(String*str);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_int(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_int(thd, ltime, fuzzydate); }
const Type_handler *type_handler() const= 0;
bool fix_length_and_dec() { return FALSE; }
};
@@ -812,6 +1065,19 @@ public:
};
+class Item_func_hash: public Item_int_func
+{
+public:
+ Item_func_hash(THD *thd, List<Item> &item): Item_int_func(thd, item)
+ {}
+ longlong val_int();
+ bool fix_length_and_dec();
+ const Type_handler *type_handler() const { return &type_handler_long; }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_func_hash>(thd, this); }
+ const char *func_name() const { return "<hash>"; }
+};
+
class Item_longlong_func: public Item_int_func
{
public:
@@ -982,12 +1248,15 @@ public:
fix_char_length(my_decimal_precision_to_length_no_truncation(len, dec,
unsigned_flag));
}
- String *val_str(String *str);
- double val_real();
- longlong val_int();
+ String *val_str(String *str) { return VDec(this).to_string(str); }
+ double val_real() { return VDec(this).to_double(); }
+ longlong val_int() { return VDec(this).to_longlong(unsigned_flag); }
my_decimal *val_decimal(my_decimal*);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_decimal(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
+ {
+ return decimal_to_datetime_with_warn(thd, VDec(this).ptr(), to, mode,
+ NULL, NULL);
+ }
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
void fix_length_and_dec_generic() {}
bool fix_length_and_dec()
@@ -1434,13 +1703,33 @@ public:
};
-class Item_func_int_val :public Item_func_num1
+class Item_func_int_val :public Item_func_hybrid_field_type
{
public:
- Item_func_int_val(THD *thd, Item *a): Item_func_num1(thd, a) {}
+ Item_func_int_val(THD *thd, Item *a): Item_func_hybrid_field_type(thd, a) {}
+ bool check_partition_func_processor(void *int_arg) { return FALSE; }
+ bool check_vcol_func_processor(void *arg) { return FALSE; }
+ virtual decimal_round_mode round_mode() const= 0;
void fix_length_and_dec_double();
void fix_length_and_dec_int_or_decimal();
+ void fix_length_and_dec_time()
+ {
+ fix_attributes_time(0);
+ set_handler(&type_handler_time2);
+ }
+ void fix_length_and_dec_datetime()
+ {
+ fix_attributes_datetime(0);
+ set_handler(&type_handler_datetime2);
+ maybe_null= true; // E.g. CEILING(TIMESTAMP'0000-01-01 23:59:59.9')
+ }
bool fix_length_and_dec();
+ String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
+ bool native_op(THD *thd, Native *to)
+ {
+ DBUG_ASSERT(0);
+ return true;
+ }
};
@@ -1449,9 +1738,12 @@ class Item_func_ceiling :public Item_func_int_val
public:
Item_func_ceiling(THD *thd, Item *a): Item_func_int_val(thd, a) {}
const char *func_name() const { return "ceiling"; }
+ decimal_round_mode round_mode() const { return CEILING; }
longlong int_op();
double real_op();
my_decimal *decimal_op(my_decimal *);
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool time_op(THD *thd, MYSQL_TIME *ltime);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_ceiling>(thd, this); }
};
@@ -1462,33 +1754,59 @@ class Item_func_floor :public Item_func_int_val
public:
Item_func_floor(THD *thd, Item *a): Item_func_int_val(thd, a) {}
const char *func_name() const { return "floor"; }
+ decimal_round_mode round_mode() const { return FLOOR; }
longlong int_op();
double real_op();
my_decimal *decimal_op(my_decimal *);
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool time_op(THD *thd, MYSQL_TIME *ltime);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_floor>(thd, this); }
};
/* This handles round and truncate */
-class Item_func_round :public Item_func_numhybrid
+class Item_func_round :public Item_func_hybrid_field_type
{
bool truncate;
void fix_length_and_dec_decimal(uint decimals_to_set);
void fix_length_and_dec_double(uint decimals_to_set);
+ bool test_if_length_can_increase();
public:
Item_func_round(THD *thd, Item *a, Item *b, bool trunc_arg)
- :Item_func_numhybrid(thd, a, b), truncate(trunc_arg) {}
+ :Item_func_hybrid_field_type(thd, a, b), truncate(trunc_arg) {}
const char *func_name() const { return truncate ? "truncate" : "round"; }
double real_op();
longlong int_op();
my_decimal *decimal_op(my_decimal *);
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool time_op(THD *thd, MYSQL_TIME *ltime);
+ bool native_op(THD *thd, Native *to)
+ {
+ DBUG_ASSERT(0);
+ return true;
+ }
+ String *str_op(String *str)
+ {
+ DBUG_ASSERT(0);
+ return NULL;
+ }
void fix_arg_decimal();
- void fix_arg_int();
+ void fix_arg_int(const Type_handler *preferred,
+ const Type_std_attributes *preferred_attributes,
+ bool use_decimal_on_length_increase);
+ void fix_arg_hex_hybrid();
void fix_arg_double();
+ void fix_arg_time();
+ void fix_arg_datetime();
+ void fix_arg_temporal(const Type_handler *h, uint int_part_length);
bool fix_length_and_dec()
{
- return args[0]->type_handler()->Item_func_round_fix_length_and_dec(this);
+ /*
+ We don't want to translate ENUM/SET to CHAR here.
+ So let's real_type_handler(), not type_handler().
+ */
+ return args[0]->real_type_handler()->Item_func_round_fix_length_and_dec(this);
}
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_round>(thd, this); }
@@ -1585,8 +1903,8 @@ public:
double val_real_native();
longlong val_int_native();
my_decimal *val_decimal_native(my_decimal *);
- bool get_date_native(MYSQL_TIME *res, ulonglong fuzzydate);
- bool get_time_native(MYSQL_TIME *res);
+ bool get_date_native(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
+ bool get_time_native(THD *thd, MYSQL_TIME *res);
double val_real()
{
@@ -1612,12 +1930,13 @@ public:
return Item_func_min_max::type_handler()->
Item_func_min_max_val_decimal(this, dec);
}
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date)
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed);
return Item_func_min_max::type_handler()->
- Item_func_min_max_get_date(this, res, fuzzy_date);
+ Item_func_min_max_get_date(thd, this, res, fuzzydate);
}
+ bool val_native(THD *thd, Native *to);
void aggregate_attributes_real(Item **items, uint nitems)
{
/*
@@ -1681,10 +2000,12 @@ public:
double val_real() { return val_real_from_item(args[0]); }
longlong val_int() { return val_int_from_item(args[0]); }
String *val_str(String *str) { return val_str_from_item(args[0], str); }
+ bool val_native(THD *thd, Native *to)
+ { return val_native_from_item(thd, args[0], to); }
my_decimal *val_decimal(my_decimal *dec)
{ return val_decimal_from_item(args[0], dec); }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_item(args[0], ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_item(thd, args[0], ltime, fuzzydate); }
const char *func_name() const { return "rollup_const"; }
bool const_item() const { return 0; }
const Type_handler *type_handler() const { return args[0]->type_handler(); }
@@ -2051,6 +2372,18 @@ protected:
udf_handler udf;
bool is_expensive_processor(void *arg) { return TRUE; }
+ class VDec_udf: public Dec_ptr_and_buffer
+ {
+ public:
+ VDec_udf(Item_udf_func *func, udf_handler *udf)
+ {
+ my_bool tmp_null_value;
+ m_ptr= udf->val_decimal(&tmp_null_value, &m_buffer);
+ DBUG_ASSERT(is_null() == (tmp_null_value != 0));
+ func->null_value= is_null();
+ }
+ };
+
public:
Item_udf_func(THD *thd, udf_func *udf_arg):
Item_func(thd), udf(udf_arg) {}
@@ -2128,10 +2461,12 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
+ bool excl_dep_on_grouping_fields(st_select_lex *sel)
+ { return false; }
};
@@ -2191,10 +2526,19 @@ public:
Item_udf_func(thd, udf_arg) {}
Item_func_udf_decimal(THD *thd, udf_func *udf_arg, List<Item> &list):
Item_udf_func(thd, udf_arg, list) {}
- longlong val_int();
- double val_real();
+ longlong val_int()
+ {
+ return VDec_udf(this, &udf).to_longlong(unsigned_flag);
+ }
+ double val_real()
+ {
+ return VDec_udf(this, &udf).to_double();
+ }
my_decimal *val_decimal(my_decimal *);
- String *val_str(String *str);
+ String *val_str(String *str)
+ {
+ return VDec_udf(this, &udf).to_string_round(str, decimals);
+ }
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
bool fix_length_and_dec() { fix_num_length_and_dec(); return FALSE; }
Item *get_copy(THD *thd)
@@ -2425,13 +2769,15 @@ public:
Item_func_user_var(THD *thd, Item_func_user_var *item)
:Item_hybrid_func(thd, item),
m_var_entry(item->m_var_entry), name(item->name) { }
- Field *create_tmp_field(bool group, TABLE *table)
- { return create_table_field_from_handler(table); }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param);
Field *create_field_for_create_select(TABLE *table)
{ return create_table_field_from_handler(table); }
bool check_vcol_func_processor(void *arg);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return type_handler()->Item_get_date(this, ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ {
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
+ }
};
@@ -2559,14 +2905,14 @@ public:
in List<Item> and desire to place this code somewhere near other functions
working with user variables.
*/
-class Item_user_var_as_out_param :public Item,
+class Item_user_var_as_out_param :public Item_fixed_hybrid,
public Load_data_outvar
{
LEX_CSTRING org_name;
user_var_entry *entry;
public:
Item_user_var_as_out_param(THD *thd, const LEX_CSTRING *a)
- :Item(thd)
+ :Item_fixed_hybrid(thd)
{
DBUG_ASSERT(a->length < UINT_MAX32);
org_name= *a;
@@ -2601,12 +2947,18 @@ public:
{
return 0;
}
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ DBUG_ASSERT(0);
+ return NULL;
+ }
/* We should return something different from FIELD_ITEM here */
- enum Type type() const { return STRING_ITEM;}
+ enum Type type() const { return CONST_ITEM;}
double val_real();
longlong val_int();
String *val_str(String *str);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
my_decimal *val_decimal(my_decimal *decimal_buffer);
/* fix_fields() binds variable name with its entry structure */
bool fix_fields(THD *thd, Item **ref);
@@ -2653,9 +3005,9 @@ public:
String* val_str(String*);
my_decimal *val_decimal(my_decimal *dec_buf)
{ return val_decimal_from_real(dec_buf); }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
/* TODO: fix to support views */
const char *func_name() const { return "get_system_var"; }
@@ -2914,6 +3266,8 @@ public:
const Type_handler *type_handler() const;
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param);
Field *create_field_for_create_select(TABLE *table)
{
return result_type() != STRING_RESULT ?
@@ -2943,7 +3297,7 @@ public:
return sp_result_field->val_decimal(dec_buf);
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if (execute())
return true;
@@ -2969,6 +3323,13 @@ public:
return str;
}
+ bool val_native(THD *thd, Native *to)
+ {
+ if (execute())
+ return true;
+ return null_value= sp_result_field->val_native(to);
+ }
+
void update_null_value()
{
execute();
@@ -3003,6 +3364,8 @@ public:
not_null_tables_cache= 0;
return 0;
}
+ bool excl_dep_on_grouping_fields(st_select_lex *sel)
+ { return false; }
};
@@ -3097,7 +3460,8 @@ public:
longlong val_int();
String *val_str(String *);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ bool val_native(THD *thd, Native *);
bool fix_length_and_dec();
const char *func_name() const { return "last_value"; }
const Type_handler *type_handler() const { return last_value->type_handler(); }
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index f2cc2e61b96..ef7ccf1dad6 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -918,7 +918,7 @@ String *Item_func_point::val_str(String *str)
if ((null_value= (args[0]->null_value ||
args[1]->null_value ||
- str->realloc(4/*SRID*/ + 1 + 4 + SIZEOF_STORED_DOUBLE * 2))))
+ str->alloc(4/*SRID*/ + 1 + 4 + SIZEOF_STORED_DOUBLE * 2))))
return 0;
str->set_charset(&my_charset_bin);
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 75545b8e4f3..245a8353d35 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -512,7 +512,7 @@ public:
return TRUE;
for (unsigned int i= 0; i < arg_count; ++i)
{
- if (args[i]->fixed && args[i]->field_type() != MYSQL_TYPE_GEOMETRY)
+ if (args[i]->is_fixed() && args[i]->field_type() != MYSQL_TYPE_GEOMETRY)
{
String str;
args[i]->print(&str, QT_NO_DATA_EXPANSION);
diff --git a/sql/item_inetfunc.cc b/sql/item_inetfunc.cc
index 52c3e0635af..a2abbce6619 100644
--- a/sql/item_inetfunc.cc
+++ b/sql/item_inetfunc.cc
@@ -21,9 +21,18 @@
///////////////////////////////////////////////////////////////////////////
-static const int IN_ADDR_SIZE= sizeof (in_addr);
-static const int IN6_ADDR_SIZE= sizeof (in6_addr);
-static const int IN6_ADDR_NUM_WORDS= IN6_ADDR_SIZE / 2;
+static const size_t IN_ADDR_SIZE= 4;
+static const size_t IN_ADDR_MAX_CHAR_LENGTH= 15;
+
+static const size_t IN6_ADDR_SIZE= 16;
+static const size_t IN6_ADDR_NUM_WORDS= IN6_ADDR_SIZE / 2;
+
+/**
+ Non-abbreviated syntax is 8 groups, up to 4 digits each,
+ plus 7 delimiters between the groups.
+ Abbreviated syntax is even shorter.
+*/
+static const uint IN6_ADDR_MAX_CHAR_LENGTH= 8 * 4 + 7;
static const char HEX_DIGITS[]= "0123456789abcdef";
@@ -89,7 +98,6 @@ err:
return 0;
}
-///////////////////////////////////////////////////////////////////////////
String* Item_func_inet_ntoa::val_str(String* str)
{
@@ -139,109 +147,264 @@ String* Item_func_inet_ntoa::val_str(String* str)
///////////////////////////////////////////////////////////////////////////
-/**
- Check the function argument, handle errors properly.
-
- @return The function value.
-*/
-longlong Item_func_inet_bool_base::val_int()
+class Inet4
{
- DBUG_ASSERT(fixed);
-
- // String argument expected
- if (unlikely(args[0]->result_type() != STRING_RESULT))
- return 0;
-
- String buffer;
- String *arg_str= args[0]->val_str(&buffer);
-
- if (unlikely(!arg_str)) // Out-of memory happened. error has been reported.
- return 0; // Or: the underlying field is NULL
+ char m_buffer[IN_ADDR_SIZE];
+protected:
+ bool ascii_to_ipv4(const char *str, size_t length);
+ bool character_string_to_ipv4(const char *str, size_t str_length,
+ CHARSET_INFO *cs)
+ {
+ if (cs->state & MY_CS_NONASCII)
+ {
+ char tmp[IN_ADDR_MAX_CHAR_LENGTH];
+ String_copier copier;
+ uint length= copier.well_formed_copy(&my_charset_latin1, tmp, sizeof(tmp),
+ cs, str, str_length);
+ return ascii_to_ipv4(tmp, length);
+ }
+ return ascii_to_ipv4(str, str_length);
+ }
+ bool binary_to_ipv4(const char *str, size_t length)
+ {
+ if (length != sizeof(m_buffer))
+ return true;
+ memcpy(m_buffer, str, length);
+ return false;
+ }
+ // Non-initializing constructor
+ Inet4() { }
+public:
+ void to_binary(char *dst, size_t dstsize) const
+ {
+ DBUG_ASSERT(dstsize >= sizeof(m_buffer));
+ memcpy(dst, m_buffer, sizeof(m_buffer));
+ }
+ bool to_binary(String *to) const
+ {
+ return to->copy(m_buffer, sizeof(m_buffer), &my_charset_bin);
+ }
+ size_t to_string(char *dst, size_t dstsize) const;
+ bool to_string(String *to) const
+ {
+ to->set_charset(&my_charset_latin1);
+ if (to->alloc(INET_ADDRSTRLEN))
+ return true;
+ to->length((uint32) to_string((char*) to->ptr(), INET_ADDRSTRLEN));
+ return false;
+ }
+};
- return calc_value(arg_str) ? 1 : 0;
-}
-///////////////////////////////////////////////////////////////////////////
+class Inet4_null: public Inet4, public Null_flag
+{
+public:
+ // Initialize from a text representation
+ Inet4_null(const char *str, size_t length, CHARSET_INFO *cs)
+ :Null_flag(character_string_to_ipv4(str, length, cs))
+ { }
+ Inet4_null(const String &str)
+ :Inet4_null(str.ptr(), str.length(), str.charset())
+ { }
+ // Initialize from a binary representation
+ Inet4_null(const char *str, size_t length)
+ :Null_flag(binary_to_ipv4(str, length))
+ { }
+ Inet4_null(const Binary_string &str)
+ :Inet4_null(str.ptr(), str.length())
+ { }
+public:
+ const Inet4& to_inet4() const
+ {
+ DBUG_ASSERT(!is_null());
+ return *this;
+ }
+ void to_binary(char *dst, size_t dstsize) const
+ {
+ to_inet4().to_binary(dst, dstsize);
+ }
+ bool to_binary(String *to) const
+ {
+ return to_inet4().to_binary(to);
+ }
+ size_t to_string(char *dst, size_t dstsize) const
+ {
+ return to_inet4().to_string(dst, dstsize);
+ }
+ bool to_string(String *to) const
+ {
+ return to_inet4().to_string(to);
+ }
+};
-/**
- Check the function argument, handle errors properly.
- @param [out] buffer Buffer for string operations.
+class Inet6
+{
+ char m_buffer[IN6_ADDR_SIZE];
+protected:
+ bool make_from_item(Item *item);
+ bool ascii_to_ipv6(const char *str, size_t str_length);
+ bool character_string_to_ipv6(const char *str, size_t str_length,
+ CHARSET_INFO *cs)
+ {
+ if (cs->state & MY_CS_NONASCII)
+ {
+ char tmp[IN6_ADDR_MAX_CHAR_LENGTH];
+ String_copier copier;
+ uint length= copier.well_formed_copy(&my_charset_latin1, tmp, sizeof(tmp),
+ cs, str, str_length);
+ return ascii_to_ipv6(tmp, length);
+ }
+ return ascii_to_ipv6(str, str_length);
+ }
+ bool binary_to_ipv6(const char *str, size_t length)
+ {
+ if (length != sizeof(m_buffer))
+ return true;
+ memcpy(m_buffer, str, length);
+ return false;
+ }
+ // Non-initializing constructor
+ Inet6() { }
+public:
+ bool to_binary(String *to) const
+ {
+ return to->copy(m_buffer, sizeof(m_buffer), &my_charset_bin);
+ }
+ size_t to_string(char *dst, size_t dstsize) const;
+ bool to_string(String *to) const
+ {
+ to->set_charset(&my_charset_latin1);
+ if (to->alloc(INET6_ADDRSTRLEN))
+ return true;
+ to->length((uint32) to_string((char*) to->ptr(), INET6_ADDRSTRLEN));
+ return false;
+ }
+ bool is_v4compat() const
+ {
+ static_assert(sizeof(in6_addr) == IN6_ADDR_SIZE, "unexpected in6_addr size");
+ return IN6_IS_ADDR_V4COMPAT((struct in6_addr *) m_buffer);
+ }
+ bool is_v4mapped() const
+ {
+ static_assert(sizeof(in6_addr) == IN6_ADDR_SIZE, "unexpected in6_addr size");
+ return IN6_IS_ADDR_V4MAPPED((struct in6_addr *) m_buffer);
+ }
+};
- @return The function value.
-*/
-String *Item_func_inet_str_base::val_str_ascii(String *buffer)
+class Inet6_null: public Inet6, public Null_flag
{
- DBUG_ASSERT(fixed);
-
- // String argument expected
- if (unlikely(args[0]->result_type() != STRING_RESULT))
+public:
+ // Initialize from a text representation
+ Inet6_null(const char *str, size_t length, CHARSET_INFO *cs)
+ :Null_flag(character_string_to_ipv6(str, length, cs))
+ { }
+ Inet6_null(const String &str)
+ :Inet6_null(str.ptr(), str.length(), str.charset())
+ { }
+ // Initialize from a binary representation
+ Inet6_null(const char *str, size_t length)
+ :Null_flag(binary_to_ipv6(str, length))
+ { }
+ Inet6_null(const Binary_string &str)
+ :Inet6_null(str.ptr(), str.length())
+ { }
+ // Initialize from an Item
+ Inet6_null(Item *item)
+ :Null_flag(make_from_item(item))
+ { }
+public:
+ const Inet6& to_inet6() const
{
- null_value= true;
- return NULL;
+ DBUG_ASSERT(!is_null());
+ return *this;
}
-
- StringBuffer<STRING_BUFFER_USUAL_SIZE> tmp;
- String *arg_str= args[0]->val_str(&tmp);
- if (unlikely(!arg_str))
+ bool to_binary(String *to) const
{
- // Out-of memory happened. error has been reported.
- // Or: the underlying field is NULL
- null_value= true;
- return NULL;
+ DBUG_ASSERT(!is_null());
+ return to_inet6().to_binary(to);
+ }
+ size_t to_string(char *dst, size_t dstsize) const
+ {
+ return to_inet6().to_string(dst, dstsize);
}
+ bool to_string(String *to) const
+ {
+ return to_inet6().to_string(to);
+ }
+ bool is_v4compat() const
+ {
+ return to_inet6().is_v4compat();
+ }
+ bool is_v4mapped() const
+ {
+ return to_inet6().is_v4mapped();
+ }
+};
- null_value= !calc_value(arg_str, buffer);
- return unlikely(null_value) ? NULL : buffer;
-}
+bool Inet6::make_from_item(Item *item)
+{
+ String tmp(m_buffer, sizeof(m_buffer), &my_charset_bin);
+ String *str= item->val_str(&tmp);
+ /*
+ Charset could be tested in item->collation.collation before the val_str()
+ call, but traditionally Inet6 functions still call item->val_str()
+ for non-binary arguments and therefore execute side effects.
+ */
+ if (!str || str->length() != sizeof(m_buffer) ||
+ str->charset() != &my_charset_bin)
+ return true;
+ if (str->ptr() != m_buffer)
+ memcpy(m_buffer, str->ptr(), sizeof(m_buffer));
+ return false;
+};
-///////////////////////////////////////////////////////////////////////////
/**
Tries to convert given string to binary IPv4-address representation.
This is a portable alternative to inet_pton(AF_INET).
@param str String to convert.
- @param str_len String length.
- @param[out] ipv4_address Buffer to store IPv4-address.
+ @param str_length String length.
@return Completion status.
- @retval false Given string does not represent an IPv4-address.
- @retval true The string has been converted successfully.
+ @retval true - error, the given string does not represent an IPv4-address.
+ @retval false - ok, the string has been converted successfully.
@note The problem with inet_pton() is that it treats leading zeros in
IPv4-part differently on different platforms.
*/
-static bool str_to_ipv4(const char *str, size_t str_length, in_addr *ipv4_address)
+bool Inet4::ascii_to_ipv4(const char *str, size_t str_length)
{
if (str_length < 7)
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): "
"invalid IPv4 address: too short.",
(int) str_length, str));
- return false;
+ return true;
}
- if (str_length > 15)
+ if (str_length > IN_ADDR_MAX_CHAR_LENGTH)
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): "
"invalid IPv4 address: too long.",
(int) str_length, str));
- return false;
+ return true;
}
- unsigned char *ipv4_bytes= (unsigned char *) ipv4_address;
+ unsigned char *ipv4_bytes= (unsigned char *) &m_buffer;
+ const char *str_end= str + str_length;
const char *p= str;
int byte_value= 0;
int chars_in_group= 0;
int dot_count= 0;
char c= 0;
- while (((p - str) < (int)str_length) && *p)
+ while (p < str_end && *p)
{
c= *p++;
@@ -251,30 +414,30 @@ static bool str_to_ipv4(const char *str, size_t str_length, in_addr *ipv4_addres
if (chars_in_group > 3)
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): invalid IPv4 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): invalid IPv4 address: "
"too many characters in a group.",
(int) str_length, str));
- return false;
+ return true;
}
byte_value= byte_value * 10 + (c - '0');
if (byte_value > 255)
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): invalid IPv4 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): invalid IPv4 address: "
"invalid byte value.",
(int) str_length, str));
- return false;
+ return true;
}
}
else if (c == '.')
{
if (chars_in_group == 0)
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): invalid IPv4 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): invalid IPv4 address: "
"too few characters in a group.",
(int) str_length, str));
- return false;
+ return true;
}
ipv4_bytes[dot_count]= (unsigned char) byte_value;
@@ -285,79 +448,77 @@ static bool str_to_ipv4(const char *str, size_t str_length, in_addr *ipv4_addres
if (dot_count > 3)
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): invalid IPv4 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): invalid IPv4 address: "
"too many dots.", (int) str_length, str));
- return false;
+ return true;
}
}
else
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): invalid IPv4 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): invalid IPv4 address: "
"invalid character at pos %d.",
(int) str_length, str, (int) (p - str)));
- return false;
+ return true;
}
}
if (c == '.')
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): invalid IPv4 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): invalid IPv4 address: "
"ending at '.'.", (int) str_length, str));
- return false;
+ return true;
}
if (dot_count != 3)
{
- DBUG_PRINT("error", ("str_to_ipv4(%.*s): invalid IPv4 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv4(%.*s): invalid IPv4 address: "
"too few groups.",
(int) str_length, str));
- return false;
+ return true;
}
ipv4_bytes[3]= (unsigned char) byte_value;
- DBUG_PRINT("info", ("str_to_ipv4(%.*s): valid IPv4 address: %d.%d.%d.%d",
+ DBUG_PRINT("info", ("ascii_to_ipv4(%.*s): valid IPv4 address: %d.%d.%d.%d",
(int) str_length, str,
ipv4_bytes[0], ipv4_bytes[1],
ipv4_bytes[2], ipv4_bytes[3]));
- return true;
+ return false;
}
-///////////////////////////////////////////////////////////////////////////
/**
Tries to convert given string to binary IPv6-address representation.
This is a portable alternative to inet_pton(AF_INET6).
@param str String to convert.
- @param str_len String length.
- @param[out] ipv6_address Buffer to store IPv6-address.
+ @param str_length String length.
@return Completion status.
- @retval false Given string does not represent an IPv6-address.
- @retval true The string has been converted successfully.
+ @retval true - error, the given string does not represent an IPv6-address.
+ @retval false - ok, the string has been converted successfully.
@note The problem with inet_pton() is that it treats leading zeros in
IPv4-part differently on different platforms.
*/
-static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
+bool Inet6::ascii_to_ipv6(const char *str, size_t str_length)
{
if (str_length < 2)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: too short.",
- str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: too short.",
+ (int) str_length, str));
+ return true;
}
- if (str_length > 8 * 4 + 7)
+ if (str_length > IN6_ADDR_MAX_CHAR_LENGTH)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: too long.",
- str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: too long.",
+ (int) str_length, str));
+ return true;
}
- memset(ipv6_address, 0, IN6_ADDR_SIZE);
+ memset(m_buffer, 0, sizeof(m_buffer));
const char *p= str;
@@ -367,21 +528,21 @@ static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
if (*p != ':')
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "can not start with ':x'.", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "can not start with ':x'.", (int) str_length, str));
+ return true;
}
}
- char *ipv6_bytes= (char *) ipv6_address;
- char *ipv6_bytes_end= ipv6_bytes + IN6_ADDR_SIZE;
- char *dst= ipv6_bytes;
+ const char *str_end= str + str_length;
+ char *ipv6_bytes_end= m_buffer + sizeof(m_buffer);
+ char *dst= m_buffer;
char *gap_ptr= NULL;
const char *group_start_ptr= p;
int chars_in_group= 0;
int group_value= 0;
- while (((p - str) < str_length) && *p)
+ while (p < str_end && *p)
{
char c= *p++;
@@ -393,27 +554,27 @@ static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
{
if (gap_ptr)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "too many gaps(::).", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "too many gaps(::).", (int) str_length, str));
+ return true;
}
gap_ptr= dst;
continue;
}
- if (!*p || ((p - str) >= str_length))
+ if (!*p || p >= str_end)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "ending at ':'.", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "ending at ':'.", (int) str_length, str));
+ return true;
}
if (dst + 2 > ipv6_bytes_end)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "too many groups (1).", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "too many groups (1).", (int) str_length, str));
+ return true;
}
dst[0]= (unsigned char) (group_value >> 8) & 0xff;
@@ -427,20 +588,21 @@ static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
{
if (dst + IN_ADDR_SIZE > ipv6_bytes_end)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "unexpected IPv4-part.", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "unexpected IPv4-part.", (int) str_length, str));
+ return true;
}
- if (!str_to_ipv4(group_start_ptr,
- str + str_length - group_start_ptr,
- (in_addr *) dst))
+ Inet4_null tmp(group_start_ptr, (size_t) (str_end - group_start_ptr),
+ &my_charset_latin1);
+ if (tmp.is_null())
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "invalid IPv4-part.", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "invalid IPv4-part.", (int) str_length, str));
+ return true;
}
+ tmp.to_binary(dst, IN_ADDR_SIZE);
dst += IN_ADDR_SIZE;
chars_in_group= 0;
@@ -452,18 +614,18 @@ static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
if (!hdp)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
"invalid character at pos %d.",
- str_length, str, (int) (p - str)));
- return false;
+ (int) str_length, str, (int) (p - str)));
+ return true;
}
if (chars_in_group >= 4)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
"too many digits in group.",
- str_length, str));
- return false;
+ (int) str_length, str));
+ return true;
}
group_value <<= 4;
@@ -479,9 +641,9 @@ static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
{
if (dst + 2 > ipv6_bytes_end)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "too many groups (2).", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "too many groups (2).", (int) str_length, str));
+ return true;
}
dst[0]= (unsigned char) (group_value >> 8) & 0xff;
@@ -493,9 +655,9 @@ static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
{
if (dst == ipv6_bytes_end)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "no room for a gap (::).", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "no room for a gap (::).", (int) str_length, str));
+ return true;
}
int bytes_to_move= (int)(dst - gap_ptr);
@@ -511,50 +673,49 @@ static bool str_to_ipv6(const char *str, int str_length, in6_addr *ipv6_address)
if (dst < ipv6_bytes_end)
{
- DBUG_PRINT("error", ("str_to_ipv6(%.*s): invalid IPv6 address: "
- "too few groups.", str_length, str));
- return false;
+ DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
+ "too few groups.", (int) str_length, str));
+ return true;
}
- return true;
+ return false;
}
-///////////////////////////////////////////////////////////////////////////
/**
Converts IPv4-binary-address to a string. This function is a portable
alternative to inet_ntop(AF_INET).
@param[in] ipv4 IPv4-address data (byte array)
- @param[out] str A buffer to store string representation of IPv4-address.
- It must be at least of INET_ADDRSTRLEN.
+ @param[out] dst A buffer to store string representation of IPv4-address.
+ @param[in] dstsize Number of bytes avaiable in "dst"
@note The problem with inet_ntop() is that it is available starting from
Windows Vista, but the minimum supported version is Windows 2000.
*/
-static void ipv4_to_str(const in_addr *ipv4, char *str)
+size_t Inet4::to_string(char *dst, size_t dstsize) const
{
- const unsigned char *ipv4_bytes= (const unsigned char *) ipv4;
-
- sprintf(str, "%d.%d.%d.%d",
- ipv4_bytes[0], ipv4_bytes[1], ipv4_bytes[2], ipv4_bytes[3]);
+ return (size_t) my_snprintf(dst, dstsize, "%d.%d.%d.%d",
+ (uchar) m_buffer[0], (uchar) m_buffer[1],
+ (uchar) m_buffer[2], (uchar) m_buffer[3]);
}
-///////////////////////////////////////////////////////////////////////////
+
/**
Converts IPv6-binary-address to a string. This function is a portable
alternative to inet_ntop(AF_INET6).
@param[in] ipv6 IPv6-address data (byte array)
- @param[out] str A buffer to store string representation of IPv6-address.
+ @param[out] dst A buffer to store string representation of IPv6-address.
It must be at least of INET6_ADDRSTRLEN.
+ @param[in] dstsize Number of bytes available dst.
@note The problem with inet_ntop() is that it is available starting from
Windows Vista, but out the minimum supported version is Windows 2000.
*/
-static void ipv6_to_str(const in6_addr *ipv6, char *str)
+size_t Inet6::to_string(char *dst, size_t dstsize) const
{
struct Region
{
@@ -562,6 +723,8 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
int length;
};
+ const char *ipv6= m_buffer;
+ char *dstend= dst + dstsize;
const unsigned char *ipv6_bytes= (const unsigned char *) ipv6;
// 1. Translate IPv6-address bytes to words.
@@ -570,7 +733,8 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
uint16 ipv6_words[IN6_ADDR_NUM_WORDS];
- for (int i= 0; i < IN6_ADDR_NUM_WORDS; ++i)
+ DBUG_ASSERT(dstsize > 0); // Need a space at least for the trailing '\0'
+ for (size_t i= 0; i < IN6_ADDR_NUM_WORDS; ++i)
ipv6_words[i]= (ipv6_bytes[2 * i] << 8) + ipv6_bytes[2 * i + 1];
// 2. Find "the gap" -- longest sequence of zeros in IPv6-address.
@@ -580,7 +744,7 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
{
Region rg= { -1, -1 };
- for (int i = 0; i < IN6_ADDR_NUM_WORDS; ++i)
+ for (size_t i= 0; i < IN6_ADDR_NUM_WORDS; ++i)
{
if (ipv6_words[i] != 0)
{
@@ -601,7 +765,7 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
}
else
{
- rg.pos= i;
+ rg.pos= (int) i;
rg.length= 1;
}
}
@@ -616,10 +780,14 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
// 3. Convert binary data to string.
- char *p= str;
+ char *p= dst;
- for (int i = 0; i < IN6_ADDR_NUM_WORDS; ++i)
+ for (int i= 0; i < (int) IN6_ADDR_NUM_WORDS; ++i)
{
+ DBUG_ASSERT(dstend >= p);
+ size_t dstsize_available= dstend - p;
+ if (dstsize_available < 5)
+ break;
if (i == gap.pos)
{
// We're at the gap position. We should put trailing ':' and jump to
@@ -646,10 +814,11 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
{
// The data represents either IPv4-compatible or IPv4-mapped address.
// The IPv6-part (zeros or zeros + ffff) has been already put into
- // the string (str). Now it's time to dump IPv4-part.
+ // the string (dst). Now it's time to dump IPv4-part.
- ipv4_to_str((const in_addr *) (ipv6_bytes + 12), p);
- return;
+ return (size_t) (p - dst) +
+ Inet4_null((const char *) (ipv6_bytes + 12), 4).
+ to_string(p, dstsize_available);
}
else
{
@@ -660,7 +829,7 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
p += sprintf(p, "%x", ipv6_words[i]);
- if (i != IN6_ADDR_NUM_WORDS - 1)
+ if (i + 1 != IN6_ADDR_NUM_WORDS)
{
*p= ':';
++p;
@@ -669,6 +838,7 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
}
*p= 0;
+ return (size_t) (p - dst);
}
///////////////////////////////////////////////////////////////////////////
@@ -676,161 +846,122 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str)
/**
Converts IP-address-string to IP-address-data.
- @param arg IP-address-string.
- @param [out] buffer Buffer to store IP-address-data.
+ ipv4-string -> varbinary(4)
+ ipv6-string -> varbinary(16)
@return Completion status.
- @retval false Given string does not represent an IP-address.
- @retval true The string has been converted successfully.
+ @retval NULL Given string does not represent an IP-address.
+ @retval !NULL The string has been converted successfully.
*/
-bool Item_func_inet6_aton::calc_value(const String *arg, String *buffer)
+String *Item_func_inet6_aton::val_str(String *buffer)
{
- // ipv4-string -> varbinary(4)
- // ipv6-string -> varbinary(16)
+ DBUG_ASSERT(fixed);
- in_addr ipv4_address;
- in6_addr ipv6_address;
+ Ascii_ptr_and_buffer<STRING_BUFFER_USUAL_SIZE> tmp(args[0]);
+ if ((null_value= tmp.is_null()))
+ return NULL;
- if (str_to_ipv4(arg->ptr(), arg->length(), &ipv4_address))
+ Inet4_null ipv4(*tmp.string());
+ if (!ipv4.is_null())
{
- buffer->length(0);
- buffer->append((char *) &ipv4_address, sizeof (in_addr), &my_charset_bin);
-
- return true;
+ ipv4.to_binary(buffer);
+ return buffer;
}
- if (str_to_ipv6(arg->ptr(), arg->length(), &ipv6_address))
+ Inet6_null ipv6(*tmp.string());
+ if (!ipv6.is_null())
{
- buffer->length(0);
- buffer->append((char *) &ipv6_address, sizeof (in6_addr), &my_charset_bin);
-
- return true;
+ ipv6.to_binary(buffer);
+ return buffer;
}
- return false;
+ null_value= true;
+ return NULL;
}
-///////////////////////////////////////////////////////////////////////////
/**
Converts IP-address-data to IP-address-string.
-
- @param arg IP-address-data.
- @param [out] buffer Buffer to store IP-address-string.
-
- @return Completion status.
- @retval false The argument does not correspond to IP-address.
- @retval true The string has been converted successfully.
*/
-bool Item_func_inet6_ntoa::calc_value(const String *arg, String *buffer)
+String *Item_func_inet6_ntoa::val_str_ascii(String *buffer)
{
- if (arg->charset() != &my_charset_bin)
- return false;
+ DBUG_ASSERT(fixed);
- if ((int) arg->length() == IN_ADDR_SIZE)
+ // Binary string argument expected
+ if (unlikely(args[0]->result_type() != STRING_RESULT ||
+ args[0]->collation.collation != &my_charset_bin))
{
- char str[INET_ADDRSTRLEN];
-
- ipv4_to_str((const in_addr *) arg->ptr(), str);
-
- buffer->length(0);
- buffer->append(str, (uint32) strlen(str), &my_charset_latin1);
-
- return true;
+ null_value= true;
+ return NULL;
}
- else if ((int) arg->length() == IN6_ADDR_SIZE)
- {
- char str[INET6_ADDRSTRLEN];
- ipv6_to_str((const in6_addr *) arg->ptr(), str);
+ String_ptr_and_buffer<STRING_BUFFER_USUAL_SIZE> tmp(args[0]);
+ if ((null_value= tmp.is_null()))
+ return NULL;
- buffer->length(0);
- buffer->append(str, (uint32) strlen(str), &my_charset_latin1);
+ Inet4_null ipv4(static_cast<const Binary_string&>(*tmp.string()));
+ if (!ipv4.is_null())
+ {
+ ipv4.to_string(buffer);
+ return buffer;
+ }
- return true;
+ Inet6_null ipv6(static_cast<const Binary_string&>(*tmp.string()));
+ if (!ipv6.is_null())
+ {
+ ipv6.to_string(buffer);
+ return buffer;
}
- DBUG_PRINT("info",
- ("INET6_NTOA(): varbinary(4) or varbinary(16) expected."));
- return false;
+ DBUG_PRINT("info", ("INET6_NTOA(): varbinary(4) or varbinary(16) expected."));
+ null_value= true;
+ return NULL;
}
-///////////////////////////////////////////////////////////////////////////
/**
Checks if the passed string represents an IPv4-address.
-
- @param arg The string to check.
-
- @return Check status.
- @retval false The passed string does not represent an IPv4-address.
- @retval true The passed string represents an IPv4-address.
*/
-bool Item_func_is_ipv4::calc_value(const String *arg)
+longlong Item_func_is_ipv4::val_int()
{
- in_addr ipv4_address;
-
- return str_to_ipv4(arg->ptr(), arg->length(), &ipv4_address);
+ DBUG_ASSERT(fixed);
+ String_ptr_and_buffer<STRING_BUFFER_USUAL_SIZE> tmp(args[0]);
+ return !tmp.is_null() && !Inet4_null(*tmp.string()).is_null();
}
-///////////////////////////////////////////////////////////////////////////
/**
Checks if the passed string represents an IPv6-address.
-
- @param arg The string to check.
-
- @return Check status.
- @retval false The passed string does not represent an IPv6-address.
- @retval true The passed string represents an IPv6-address.
*/
-bool Item_func_is_ipv6::calc_value(const String *arg)
+longlong Item_func_is_ipv6::val_int()
{
- in6_addr ipv6_address;
-
- return str_to_ipv6(arg->ptr(), arg->length(), &ipv6_address);
+ DBUG_ASSERT(fixed);
+ String_ptr_and_buffer<STRING_BUFFER_USUAL_SIZE> tmp(args[0]);
+ return !tmp.is_null() && !Inet6_null(*tmp.string()).is_null();
}
-///////////////////////////////////////////////////////////////////////////
/**
Checks if the passed IPv6-address is an IPv4-compat IPv6-address.
-
- @param arg The IPv6-address to check.
-
- @return Check status.
- @retval false The passed IPv6-address is not an IPv4-compatible IPv6-address.
- @retval true The passed IPv6-address is an IPv4-compatible IPv6-address.
*/
-bool Item_func_is_ipv4_compat::calc_value(const String *arg)
+longlong Item_func_is_ipv4_compat::val_int()
{
- if ((int) arg->length() != IN6_ADDR_SIZE || arg->charset() != &my_charset_bin)
- return false;
-
- return IN6_IS_ADDR_V4COMPAT((struct in6_addr *) arg->ptr());
+ Inet6_null ip6(args[0]);
+ return !ip6.is_null() && ip6.is_v4compat();
}
-///////////////////////////////////////////////////////////////////////////
/**
Checks if the passed IPv6-address is an IPv4-mapped IPv6-address.
-
- @param arg The IPv6-address to check.
-
- @return Check status.
- @retval false The passed IPv6-address is not an IPv4-mapped IPv6-address.
- @retval true The passed IPv6-address is an IPv4-mapped IPv6-address.
*/
-bool Item_func_is_ipv4_mapped::calc_value(const String *arg)
+longlong Item_func_is_ipv4_mapped::val_int()
{
- if ((int) arg->length() != IN6_ADDR_SIZE || arg->charset() != &my_charset_bin)
- return false;
-
- return IN6_IS_ADDR_V4MAPPED((struct in6_addr *) arg->ptr());
+ Inet6_null ip6(args[0]);
+ return !ip6.is_null() && ip6.is_v4mapped();
}
diff --git a/sql/item_inetfunc.h b/sql/item_inetfunc.h
index 9ab46e88053..8cfb4cd278c 100644
--- a/sql/item_inetfunc.h
+++ b/sql/item_inetfunc.h
@@ -81,33 +81,7 @@ public:
{
null_value= false;
}
-
-public:
- virtual longlong val_int();
bool need_parentheses_in_default() { return false; }
-
-protected:
- virtual bool calc_value(const String *arg) = 0;
-};
-
-
-/*************************************************************************
- Item_func_inet_str_base implements common code for INET6/IP-related
- functions returning string value.
-*************************************************************************/
-
-class Item_func_inet_str_base : public Item_str_ascii_func
-{
-public:
- inline Item_func_inet_str_base(THD *thd, Item *arg):
- Item_str_ascii_func(thd, arg)
- { }
-
-public:
- virtual String *val_str_ascii(String *buffer);
-
-protected:
- virtual bool calc_value(const String *arg, String *buffer) = 0;
};
@@ -115,11 +89,11 @@ protected:
Item_func_inet6_aton implements INET6_ATON() SQL-function.
*************************************************************************/
-class Item_func_inet6_aton : public Item_func_inet_str_base
+class Item_func_inet6_aton : public Item_str_func
{
public:
inline Item_func_inet6_aton(THD *thd, Item *ip_addr):
- Item_func_inet_str_base(thd, ip_addr)
+ Item_str_func(thd, ip_addr)
{ }
public:
@@ -136,8 +110,7 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_inet6_aton>(thd, this); }
-protected:
- virtual bool calc_value(const String *arg, String *buffer);
+ String *val_str(String *to);
};
@@ -145,11 +118,11 @@ protected:
Item_func_inet6_ntoa implements INET6_NTOA() SQL-function.
*************************************************************************/
-class Item_func_inet6_ntoa : public Item_func_inet_str_base
+class Item_func_inet6_ntoa : public Item_str_ascii_func
{
public:
inline Item_func_inet6_ntoa(THD *thd, Item *ip_addr):
- Item_func_inet_str_base(thd, ip_addr)
+ Item_str_ascii_func(thd, ip_addr)
{ }
public:
@@ -168,11 +141,9 @@ public:
maybe_null= 1;
return FALSE;
}
+ String *val_str_ascii(String *to);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_inet6_ntoa>(thd, this); }
-
-protected:
- virtual bool calc_value(const String *arg, String *buffer);
};
@@ -193,8 +164,7 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv4>(thd, this); }
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
@@ -209,14 +179,12 @@ public:
Item_func_inet_bool_base(thd, ip_addr)
{ }
-public:
virtual const char *func_name() const
{ return "is_ipv6"; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv6>(thd, this); }
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
@@ -230,15 +198,11 @@ public:
inline Item_func_is_ipv4_compat(THD *thd, Item *ip_addr):
Item_func_inet_bool_base(thd, ip_addr)
{ }
-
-public:
virtual const char *func_name() const
{ return "is_ipv4_compat"; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, this); }
-
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
@@ -252,15 +216,11 @@ public:
inline Item_func_is_ipv4_mapped(THD *thd, Item *ip_addr):
Item_func_inet_bool_base(thd, ip_addr)
{ }
-
-public:
virtual const char *func_name() const
{ return "is_ipv4_mapped"; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, this); }
-
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
#endif // ITEM_INETFUNC_INCLUDED
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc
index abbff8c3e92..7e37fc7d096 100644
--- a/sql/item_jsonfunc.cc
+++ b/sql/item_jsonfunc.cc
@@ -498,17 +498,11 @@ static int path_setup_nwc(json_path_t *p, CHARSET_INFO *i_cs,
longlong Item_func_json_valid::val_int()
{
String *js= args[0]->val_json(&tmp_value);
- json_engine_t je;
if ((null_value= args[0]->null_value))
return 0;
- json_scan_start(&je, js->charset(), (const uchar *) js->ptr(),
- (const uchar *) js->ptr()+js->length());
-
- while (json_scan_next(&je) == 0) {}
-
- return je.s.error == 0;
+ return json_valid(js->ptr(), js->length(), js->charset());
}
@@ -754,8 +748,6 @@ String *Item_func_json_unquote::read_json(json_engine_t *je)
json_scan_start(je, js->charset(),(const uchar *) js->ptr(),
(const uchar *) js->ptr() + js->length());
- je->value_type= (enum json_value_types) -1; /* To report errors right. */
-
if (json_read_value(je))
goto error;
@@ -1117,6 +1109,7 @@ my_decimal *Item_func_json_extract::val_decimal(my_decimal *to)
case JSON_VALUE_OBJECT:
case JSON_VALUE_ARRAY:
case JSON_VALUE_FALSE:
+ case JSON_VALUE_UNINITALIZED:
case JSON_VALUE_NULL:
int2my_decimal(E_DEC_FATAL_ERROR, 0, false/*unsigned_flag*/, to);
return to;
@@ -1596,7 +1589,7 @@ null_return:
static int append_json_value(String *str, Item *item, String *tmp_val)
{
- if (item->is_bool_type())
+ if (item->type_handler()->is_bool_type())
{
longlong v_int= item->val_int();
const char *t_f;
@@ -2422,7 +2415,7 @@ static int do_merge_patch(String *str, json_engine_t *je1, json_engine_t *je2,
json_string_t key_name;
size_t sav_len;
bool mrg_empty;
-
+
*empty_result= FALSE;
json_string_set_cs(&key_name, je1->s.cs);
diff --git a/sql/item_row.cc b/sql/item_row.cc
index 04868842f11..a363f9b5576 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -61,7 +61,7 @@ bool Item_row::fix_fields(THD *thd, Item **ref)
}
}
maybe_null|= item->maybe_null;
- with_sum_func= with_sum_func || item->with_sum_func;
+ join_with_sum_func(item);
with_window_func = with_window_func || item->with_window_func;
with_field= with_field || item->with_field;
m_with_subquery|= item->with_subquery();
@@ -92,7 +92,7 @@ void Item_row::cleanup()
{
DBUG_ENTER("Item_row::cleanup");
- Item::cleanup();
+ Item_fixed_hybrid::cleanup();
/* Reset to the original values */
used_tables_and_const_cache_init();
with_null= 0;
diff --git a/sql/item_row.h b/sql/item_row.h
index 0d6a6db2e0e..ea5a0f21d8b 100644
--- a/sql/item_row.h
+++ b/sql/item_row.h
@@ -33,10 +33,11 @@
Item which stores (x,y,...) and ROW(x,y,...).
Note that this can be recursive: ((x,y),(z,t)) is a ROW of ROWs.
*/
-class Item_row: public Item,
+class Item_row: public Item_fixed_hybrid,
private Item_args,
private Used_tables_and_const_cache,
- private With_subquery_cache
+ private With_subquery_cache,
+ private With_sum_func_cache
{
table_map not_null_tables_cache;
/**
@@ -45,17 +46,25 @@ class Item_row: public Item,
*/
bool with_null;
public:
- Item_row(THD *thd, List<Item> &list):
- Item(thd), Item_args(thd, list), not_null_tables_cache(0), with_null(0)
+ Item_row(THD *thd, List<Item> &list)
+ :Item_fixed_hybrid(thd), Item_args(thd, list),
+ not_null_tables_cache(0), with_null(0)
{ }
- Item_row(THD *thd, Item_row *row):
- Item(thd), Item_args(thd, static_cast<Item_args*>(row)), Used_tables_and_const_cache(),
+ Item_row(THD *thd, Item_row *row)
+ :Item_fixed_hybrid(thd), Item_args(thd, static_cast<Item_args*>(row)),
+ Used_tables_and_const_cache(),
+ With_sum_func_cache(*row),
not_null_tables_cache(0), with_null(0)
{ }
bool with_subquery() const { DBUG_ASSERT(fixed); return m_with_subquery; }
enum Type type() const { return ROW_ITEM; };
const Type_handler *type_handler() const { return &type_handler_row; }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ return NULL; // Check with Vicentiu why it's called for Item_row
+ }
void illegal_method_call(const char *);
bool is_null() { return null_value; }
void make_send_field(THD *thd, Send_field *)
@@ -82,7 +91,7 @@ public:
illegal_method_call((const char*)"val_decimal");
return 0;
};
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
illegal_method_call((const char*)"get_date");
return true;
@@ -92,6 +101,8 @@ public:
void cleanup();
void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &fields, uint flags);
+ bool with_sum_func() const { return m_with_sum_func; }
+ With_sum_func_cache* get_with_sum_func_cache() { return this; }
table_map used_tables() const { return used_tables_cache; };
bool const_item() const { return const_item_cache; };
void update_used_tables()
@@ -134,6 +145,11 @@ public:
return Item_args::excl_dep_on_grouping_fields(sel);
}
+ bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
+ {
+ return Item_args::excl_dep_on_in_subq_left_part(subq_pred);
+ }
+
bool check_vcol_func_processor(void *arg) {return FALSE; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_row>(thd, this); }
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index e9263fb6954..5562e6d3e62 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -276,7 +276,7 @@ String *Item_func_sha2::val_str_ascii(String *str)
Since we're subverting the usual String methods, we must make sure that
the destination has space for the bytes we're about to write.
*/
- str->realloc((uint) digest_length*2 + 1); /* Each byte as two nybbles */
+ str->alloc((uint) digest_length*2 + 1); /* Each byte as two nybbles */
/* Convert the large number to a string-hex representation. */
array_to_hex((char *) str->ptr(), digest_buf, (uint)digest_length);
@@ -739,7 +739,7 @@ String *Item_func_des_encrypt::val_str(String *str)
if ((null_value= args[0]->null_value))
return 0; // ENCRYPT(NULL) == NULL
if ((res_length=res->length()) == 0)
- return make_empty_result();
+ return make_empty_result(str);
if (arg_count == 1)
{
/* Protect against someone doing FLUSH DES_KEY_FILE */
@@ -785,7 +785,7 @@ String *Item_func_des_encrypt::val_str(String *str)
tail= 8 - (res_length % 8); // 1..8 marking extra length
res_length+=tail;
- if (tmp_arg.realloc(res_length))
+ if (tmp_arg.alloc(res_length))
goto error;
tmp_arg.length(0);
tmp_arg.append(res->ptr(), res->length());
@@ -793,7 +793,6 @@ String *Item_func_des_encrypt::val_str(String *str)
if (tmp_arg.append(append_str, tail) || str->alloc(res_length+1))
goto error;
tmp_arg[res_length-1]=tail; // save extra length
- str->realloc(res_length+1);
str->length(res_length+1);
str->set_charset(&my_charset_bin);
(*str)[0]=(char) (128 | key_number);
@@ -943,7 +942,7 @@ String *Item_func_concat_ws::val_str(String *str)
}
if (i == arg_count)
- return make_empty_result();
+ return make_empty_result(str);
for (i++; i < arg_count ; i++)
{
@@ -1040,7 +1039,7 @@ String *Item_func_concat_ws::val_str(String *str)
{
uint new_len = MY_MAX(tmp_value.alloced_length() * 2, concat_len);
- if (tmp_value.realloc(new_len))
+ if (tmp_value.alloc(new_len))
goto null;
}
}
@@ -1094,9 +1093,8 @@ String *Item_func_reverse::val_str(String *str)
return 0;
/* An empty string is a special case as the string pointer may be null */
if (!res->length())
- return make_empty_result();
- if (str->alloced_length() < res->length() &&
- str->realloc(res->length()))
+ return make_empty_result(str);
+ if (str->alloc(res->length()))
{
null_value= 1;
return 0;
@@ -1518,17 +1516,18 @@ String *Item_func_insert::val_str(String *str)
null_value=0;
res=args[0]->val_str(str);
res2=args[3]->val_str(&tmp_value);
- start= args[1]->val_int() - 1;
+ start= args[1]->val_int();
length= args[2]->val_int();
if (args[0]->null_value || args[1]->null_value || args[2]->null_value ||
args[3]->null_value)
goto null; /* purecov: inspected */
- if ((start < 0) || (start > res->length()))
+ if ((start <= 0) || (start > res->length()))
return res; // Wrong param; skip insert
if ((length < 0) || (length > res->length()))
length= res->length();
+ start--;
/*
There is one exception not handled (intentionally) by the character set
@@ -1645,7 +1644,7 @@ String *Item_func_left::val_str(String *str)
/* if "unsigned_flag" is set, we have a *huge* positive number. */
if ((length <= 0) && (!args[1]->unsigned_flag))
- return make_empty_result();
+ return make_empty_result(str);
if ((res->length() <= (ulonglong) length) ||
(res->length() <= (char_pos= res->charpos((int) length))))
return res;
@@ -1689,7 +1688,7 @@ String *Item_func_right::val_str(String *str)
/* if "unsigned_flag" is set, we have a *huge* positive number. */
if ((length <= 0) && (!args[1]->unsigned_flag))
- return make_empty_result(); /* purecov: inspected */
+ return make_empty_result(str); /* purecov: inspected */
if (res->length() <= (ulonglong) length)
return res; /* purecov: inspected */
@@ -1731,7 +1730,7 @@ String *Item_func_substr::val_str(String *str)
/* Negative or zero length, will return empty string. */
if ((arg_count == 3) && (length <= 0) &&
(length == 0 || !args[2]->unsigned_flag))
- return make_empty_result();
+ return make_empty_result(str);
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
@@ -1742,12 +1741,12 @@ String *Item_func_substr::val_str(String *str)
/* Assumes that the maximum length of a String is < INT_MAX32. */
if ((!args[1]->unsigned_flag && (start < INT_MIN32 || start > INT_MAX32)) ||
(args[1]->unsigned_flag && ((ulonglong) start > INT_MAX32)))
- return make_empty_result();
+ return make_empty_result(str);
start= ((start < 0) ? res->numchars() + start : start - 1);
start= res->charpos((int) start);
if ((start < 0) || ((uint) start + 1 > res->length()))
- return make_empty_result();
+ return make_empty_result(str);
length= res->charpos((int) length, (uint32) start);
tmp_length= res->length() - start;
@@ -1817,7 +1816,7 @@ String *Item_func_substr_index::val_str(String *str)
null_value=0;
uint delimiter_length= delimiter->length();
if (!res->length() || !delimiter_length || !count)
- return make_empty_result(); // Wrong parameters
+ return make_empty_result(str); // Wrong parameters
res->set_charset(collation.collation);
@@ -2227,7 +2226,7 @@ String *Item_func_password::val_str_ascii(String *str)
switch (alg){
case NEW:
if (args[0]->null_value || res->length() == 0)
- return make_empty_result();
+ return make_empty_result(str);
my_make_scrambled_password(tmp_value, res->ptr(), res->length());
str->set(tmp_value, SCRAMBLED_PASSWORD_CHAR_LENGTH, &my_charset_latin1);
break;
@@ -2235,7 +2234,7 @@ String *Item_func_password::val_str_ascii(String *str)
if ((null_value=args[0]->null_value))
return 0;
if (res->length() == 0)
- return make_empty_result();
+ return make_empty_result(str);
my_make_scrambled_password_323(tmp_value, res->ptr(), res->length());
str->set(tmp_value, SCRAMBLED_PASSWORD_CHAR_LENGTH_323, &my_charset_latin1);
break;
@@ -2282,7 +2281,7 @@ String *Item_func_encrypt::val_str(String *str)
if ((null_value=args[0]->null_value))
return 0;
if (res->length() == 0)
- return make_empty_result();
+ return make_empty_result(str);
if (arg_count == 1)
{ // generate random salt
time_t timestamp=current_thd->query_start();
@@ -2577,7 +2576,7 @@ String *Item_func_soundex::val_str(String *str)
for ( ; ; ) /* Skip pre-space */
{
if ((rc= cs->cset->mb_wc(cs, &wc, (uchar*) from, (uchar*) end)) <= 0)
- return make_empty_result(); /* EOL or invalid byte sequence */
+ return make_empty_result(str); /* EOL or invalid byte sequence */
if (rc == 1 && cs->ctype)
{
@@ -2602,7 +2601,7 @@ String *Item_func_soundex::val_str(String *str)
{
/* Extra safety - should not really happen */
DBUG_ASSERT(false);
- return make_empty_result();
+ return make_empty_result(str);
}
to+= rc;
break;
@@ -2667,15 +2666,45 @@ String *Item_func_soundex::val_str(String *str)
This should be 'internationalized' sometimes.
*/
-const int FORMAT_MAX_DECIMALS= 30;
+/*
+ The maximum supported decimal scale:
+ 38 - starting from 10.2.1
+ 30 - before 10.2.1
+*/
+const int FORMAT_MAX_DECIMALS= 38;
bool Item_func_format::fix_length_and_dec()
{
- uint32 char_length= args[0]->max_char_length();
- uint32 max_sep_count= (char_length / 3) + (decimals ? 1 : 0) + /*sign*/1;
+ uint32 char_length= args[0]->type_handler()->Item_decimal_notation_int_digits(args[0]);
+ uint dec= FORMAT_MAX_DECIMALS;
+ /*
+ Format can require one more integer digit if rounding happens:
+ FORMAT(9.9,0) -> '10'
+ Set need_extra_digit_for_rounding to true by default
+ if args[0] has some decimals: if args[1] is not
+ a constant, then format can potentially reduce
+ the number of decimals and round to the next integer.
+ */
+ bool need_extra_digit_for_rounding= args[0]->decimals > 0;
+ if (args[1]->const_item() && !args[1]->is_expensive())
+ {
+ Longlong_hybrid tmp= args[1]->to_longlong_hybrid();
+ if (!args[1]->null_value)
+ {
+ dec= tmp.to_uint(FORMAT_MAX_DECIMALS);
+ need_extra_digit_for_rounding= (dec < args[0]->decimals);
+ }
+ }
+ /*
+ In case of a data type with zero integer digits, e.g. DECIMAL(4,4),
+ we'll print at least one integer digit.
+ */
+ if (need_extra_digit_for_rounding || !char_length)
+ char_length++;
+ uint32 max_sep_count= (char_length / 3) + (dec ? 1 : 0) + /*sign*/1;
collation.set(default_charset());
- fix_char_length(char_length + max_sep_count + decimals);
+ fix_char_length(char_length + max_sep_count + dec);
if (arg_count == 3)
locale= args[2]->basic_const_item() ? args[2]->locale_from_val_str() : NULL;
else
@@ -2716,12 +2745,10 @@ String *Item_func_format::val_str_ascii(String *str)
if (args[0]->result_type() == DECIMAL_RESULT ||
args[0]->result_type() == INT_RESULT)
{
- my_decimal dec_val, rnd_dec, *res;
- res= args[0]->val_decimal(&dec_val);
- if ((null_value=args[0]->null_value))
+ VDec res(args[0]);
+ if ((null_value= res.is_null()))
return 0; /* purecov: inspected */
- my_decimal_round(E_DEC_FATAL_ERROR, res, dec, false, &rnd_dec);
- my_decimal2string(E_DEC_FATAL_ERROR, &rnd_dec, 0, 0, 0, str);
+ res.to_string_round(str, dec);
str_length= str->length();
}
else
@@ -2730,7 +2757,7 @@ String *Item_func_format::val_str_ascii(String *str)
if ((null_value=args[0]->null_value))
return 0; /* purecov: inspected */
nr= my_double_round(nr, (longlong) dec, FALSE, FALSE);
- str->set_real(nr, dec, &my_charset_numeric);
+ str->set_fcvt(nr, dec);
if (!std::isfinite(nr))
return str;
str_length=str->length();
@@ -2876,7 +2903,7 @@ String *Item_func_make_set::val_str(String *str)
ulonglong bits;
bool first_found=0;
Item **ptr=args+1;
- String *result= make_empty_result();
+ String *result= make_empty_result(str);
bits=args[0]->val_int();
if ((null_value=args[0]->null_value))
@@ -2900,7 +2927,7 @@ String *Item_func_make_set::val_str(String *str)
else
{
if (tmp_str.copy(*res)) // Don't use 'str'
- return make_empty_result();
+ return make_empty_result(str);
result= &tmp_str;
}
}
@@ -2910,11 +2937,11 @@ String *Item_func_make_set::val_str(String *str)
{ // Copy data to tmp_str
if (tmp_str.alloc(result->length()+res->length()+1) ||
tmp_str.copy(*result))
- return make_empty_result();
+ return make_empty_result(str);
result= &tmp_str;
}
if (tmp_str.append(STRING_WITH_LEN(","), &my_charset_bin) || tmp_str.append(*res))
- return make_empty_result();
+ return make_empty_result(str);
}
}
}
@@ -3055,7 +3082,7 @@ String *Item_func_repeat::val_str(String *str)
null_value= 0;
if (count <= 0 && (count == 0 || !args[1]->unsigned_flag))
- return make_empty_result();
+ return make_empty_result(str);
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Bounds check on count: If this is triggered, we will error. */
@@ -3120,7 +3147,7 @@ String *Item_func_space::val_str(String *str)
null_value= 0;
if (count <= 0 && (count == 0 || !args[0]->unsigned_flag))
- return make_empty_result();
+ return make_empty_result(str);
/*
Assumes that the maximum length of a String is < INT_MAX32.
Bounds check on count: If this is triggered, we will error.
@@ -3286,7 +3313,7 @@ String *Item_func_rpad::val_str(String *str)
null_value=0;
if (count == 0)
- return make_empty_result();
+ return make_empty_result(str);
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
@@ -3378,7 +3405,7 @@ String *Item_func_lpad::val_str(String *str)
null_value=0;
if (count == 0)
- return make_empty_result();
+ return make_empty_result(str);
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
@@ -3726,7 +3753,7 @@ String *Item_func_hex::val_str_ascii_from_val_real(String *str)
dec= ~(longlong) 0;
else
dec= (ulonglong) (val + (val > 0 ? 0.5 : -0.5));
- return str->set_hex(dec) ? make_empty_result() : str;
+ return str->set_hex(dec) ? make_empty_result(str) : str;
}
@@ -3737,7 +3764,7 @@ String *Item_func_hex::val_str_ascii_from_val_str(String *str)
DBUG_ASSERT(res != str);
if ((null_value= (res == NULL)))
return NULL;
- return str->set_hex(res->ptr(), res->length()) ? make_empty_result() : str;
+ return str->set_hex(res->ptr(), res->length()) ? make_empty_result(str) : str;
}
@@ -3746,7 +3773,7 @@ String *Item_func_hex::val_str_ascii_from_val_int(String *str)
ulonglong dec= (ulonglong) args[0]->val_int();
if ((null_value= args[0]->null_value))
return 0;
- return str->set_hex(dec) ? make_empty_result() : str;
+ return str->set_hex(dec) ? make_empty_result(str) : str;
}
@@ -3780,13 +3807,12 @@ String *Item_func_unhex::val_str(String *str)
}
for (end=res->ptr()+res->length(); from < end ; from+=2, to++)
{
- int hex_char;
- *to= (hex_char= hexchar_to_int(from[0])) << 4;
- if ((null_value= (hex_char == -1)))
- return 0;
- *to|= hex_char= hexchar_to_int(from[1]);
- if ((null_value= (hex_char == -1)))
+ int hex_char1, hex_char2;
+ hex_char1= hexchar_to_int(from[0]);
+ hex_char2= hexchar_to_int(from[1]);
+ if ((null_value= (hex_char1 == -1 || hex_char2 == -1)))
return 0;
+ *to= (char) ((hex_char1 << 4) | hex_char2);
}
return str;
}
@@ -4247,7 +4273,7 @@ String *Item_func_compress::val_str(String *str)
// Check new_size overflow: new_size <= res->length()
if (((uint32) (new_size+5) <= res->length()) ||
- str->realloc((uint32) new_size + 4 + 1))
+ str->alloc((uint32) new_size + 4 + 1))
{
null_value= 1;
return 0;
@@ -4320,7 +4346,7 @@ String *Item_func_uncompress::val_str(String *str)
max_allowed_packet));
goto err;
}
- if (str->realloc((uint32)new_size))
+ if (str->alloc((uint32)new_size))
goto err;
if ((err= uncompress((Byte*)str->ptr(), &new_size,
@@ -4349,7 +4375,7 @@ String *Item_func_uuid::val_str(String *str)
DBUG_ASSERT(fixed == 1);
uchar guid[MY_UUID_SIZE];
- str->realloc(MY_UUID_STRING_LENGTH+1);
+ str->alloc(MY_UUID_STRING_LENGTH+1);
str->length(MY_UUID_STRING_LENGTH);
str->set_charset(system_charset_info);
my_uuid(guid);
@@ -4615,11 +4641,11 @@ bool Item_func_dyncol_create::prepare_arguments(THD *thd, bool force_names_arg)
break;
case DYN_COL_DATETIME:
case DYN_COL_DATE:
- args[valpos]->get_date(&vals[i].x.time_value,
- sql_mode_for_dates(thd));
+ args[valpos]->get_date(thd, &vals[i].x.time_value,
+ Datetime::Options(thd));
break;
case DYN_COL_TIME:
- args[valpos]->get_time(&vals[i].x.time_value);
+ args[valpos]->get_time(thd, &vals[i].x.time_value);
break;
default:
DBUG_ASSERT(0);
@@ -5185,7 +5211,7 @@ null:
}
-bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_dyncol_get::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DYNAMIC_COLUMN_VALUE val;
char buff[STRING_BUFFER_USUAL_SIZE];
@@ -5206,10 +5232,8 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
if (signed_value || val.x.ulong_value <= LONGLONG_MAX)
{
longlong llval = (longlong)val.x.ulong_value;
- bool neg = llval < 0;
- if (int_to_datetime_with_warn(neg, (ulonglong)(neg ? -llval :
- llval),
- ltime, fuzzy_date, 0, 0 /* TODO */))
+ if (int_to_datetime_with_warn(thd, Longlong_hybrid(llval, !signed_value),
+ ltime, fuzzydate, 0, 0 /* TODO */))
goto null;
return 0;
}
@@ -5217,20 +5241,20 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
val.x.double_value= static_cast<double>(ULONGLONG_MAX);
/* fall through */
case DYN_COL_DOUBLE:
- if (double_to_datetime_with_warn(val.x.double_value, ltime, fuzzy_date,
+ if (double_to_datetime_with_warn(thd, val.x.double_value, ltime, fuzzydate,
0, 0 /* TODO */))
goto null;
return 0;
case DYN_COL_DECIMAL:
- if (decimal_to_datetime_with_warn((my_decimal*)&val.x.decimal.value, ltime,
- fuzzy_date, 0, 0 /* TODO */))
+ if (decimal_to_datetime_with_warn(thd, (my_decimal*)&val.x.decimal.value,
+ ltime, fuzzydate, 0, 0 /* TODO */))
goto null;
return 0;
case DYN_COL_STRING:
- if (str_to_datetime_with_warn(&my_charset_numeric,
+ if (str_to_datetime_with_warn(thd, &my_charset_numeric,
val.x.string.value.str,
val.x.string.value.length,
- ltime, fuzzy_date))
+ ltime, fuzzydate))
goto null;
return 0;
case DYN_COL_DATETIME:
@@ -5338,3 +5362,106 @@ String *Item_temptable_rowid::val_str(String *str)
str_value.set((char*)(table->file->ref), max_length, &my_charset_bin);
return &str_value;
}
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#include "wsrep_server_state.h"
+
+String *Item_func_wsrep_last_written_gtid::val_str_ascii(String *str)
+{
+ wsrep::gtid gtid= current_thd->wsrep_cs().last_written_gtid();
+ if (gtid_str.alloc(wsrep::gtid_c_str_len()))
+ {
+ my_error(ER_OUTOFMEMORY, wsrep::gtid_c_str_len());
+ null_value= true;
+ return NULL;
+ }
+
+ ssize_t gtid_len= gtid_print_to_c_str(gtid, (char*) gtid_str.ptr(),
+ wsrep::gtid_c_str_len());
+ if (gtid_len < 0)
+ {
+ my_error(ER_ERROR_WHEN_EXECUTING_COMMAND, MYF(0), func_name(),
+ "wsrep_gtid_print failed");
+ null_value= true;
+ return NULL;
+ }
+ gtid_str.length(gtid_len);
+ return &gtid_str;
+}
+
+String *Item_func_wsrep_last_seen_gtid::val_str_ascii(String *str)
+{
+ wsrep::gtid gtid= wsrep::gtid::undefined();
+ if (Wsrep_server_state::instance().is_provider_loaded())
+ {
+ /* TODO: Should call Wsrep_server_state.instance().last_committed_gtid()
+ instead. */
+ gtid= Wsrep_server_state::instance().provider().last_committed_gtid();
+ }
+ if (gtid_str.alloc(wsrep::gtid_c_str_len()))
+ {
+ my_error(ER_OUTOFMEMORY, wsrep::gtid_c_str_len());
+ null_value= true;
+ return NULL;
+ }
+ ssize_t gtid_len= wsrep::gtid_print_to_c_str(gtid, (char*) gtid_str.ptr(),
+ wsrep::gtid_c_str_len());
+ if (gtid_len < 0)
+ {
+ my_error(ER_ERROR_WHEN_EXECUTING_COMMAND, MYF(0), func_name(),
+ "wsrep_gtid_print failed");
+ null_value= true;
+ return NULL;
+ }
+ gtid_str.length(gtid_len);
+ return &gtid_str;
+}
+
+longlong Item_func_wsrep_sync_wait_upto::val_int()
+{
+ int timeout= -1;
+ String* gtid_str= args[0]->val_str(&value);
+ if (gtid_str == NULL)
+ {
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), func_name());
+ return 0LL;
+ }
+
+ if (arg_count == 2)
+ {
+ timeout= args[1]->val_int();
+ }
+
+ wsrep_gtid_t gtid;
+ int gtid_len= wsrep_gtid_scan(gtid_str->ptr(), gtid_str->length(), &gtid);
+ if (gtid_len < 0)
+ {
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), func_name());
+ return 0LL;
+ }
+
+ if (gtid.seqno == WSREP_SEQNO_UNDEFINED &&
+ wsrep_uuid_compare(&gtid.uuid, &WSREP_UUID_UNDEFINED) == 0)
+ {
+ return 1LL;
+ }
+
+ enum wsrep::provider::status status=
+ wsrep_sync_wait_upto(current_thd, &gtid, timeout);
+
+ if (status)
+ {
+ int err;
+ switch (status) {
+ case wsrep::provider::error_transaction_missing:
+ err= ER_WRONG_ARGUMENTS;
+ break;
+ default:
+ err= ER_LOCK_WAIT_TIMEOUT;
+ }
+ my_error(err, MYF(0), func_name());
+ return 0LL;
+ }
+ return 1LL;
+}
+#endif /* WITH_WSREP */
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index cd50da3dd3a..82b30369734 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -35,16 +35,21 @@ protected:
character set. No memory is allocated.
@retval A pointer to the str_value member.
*/
- virtual String *make_empty_result()
+ virtual String *make_empty_result(String *str)
{
/*
Reset string length to an empty string. We don't use str_value.set() as
we don't want to free and potentially have to reallocate the buffer
for each call.
*/
- str_value.length(0);
- str_value.set_charset(collation.collation);
- return &str_value;
+ if (!str->is_alloced())
+ str->set("", 0, collation.collation); /* Avoid null ptrs */
+ else
+ {
+ str->length(0); /* Reuse allocated area */
+ str->set_charset(collation.collation);
+ }
+ return str;
}
public:
Item_str_func(THD *thd): Item_func(thd) { decimals=NOT_FIXED_DEC; }
@@ -62,16 +67,11 @@ public:
longlong val_int();
double val_real();
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_string(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_string(thd, ltime, fuzzydate); }
const Type_handler *type_handler() const { return string_type_handler(); }
void left_right_max_length();
bool fix_fields(THD *thd, Item **ref);
- void update_null_value()
- {
- StringBuffer<MAX_FIELD_WIDTH> tmp;
- (void) val_str(&tmp);
- }
};
@@ -503,7 +503,7 @@ class Item_func_substr_oracle :public Item_func_substr
protected:
longlong get_position()
{ longlong pos= args[1]->val_int(); return pos == 0 ? 1 : pos; }
- String *make_empty_result()
+ String *make_empty_result(String *str)
{ null_value= 1; return NULL; }
public:
Item_func_substr_oracle(THD *thd, Item *a, Item *b):
@@ -544,7 +544,7 @@ protected:
String *trimmed_value(String *res, uint32 offset, uint32 length)
{
if (length == 0)
- return make_empty_result();
+ return make_empty_result(&tmp_value);
tmp_value.set(*res, offset, length);
/*
@@ -577,7 +577,7 @@ public:
class Item_func_trim_oracle :public Item_func_trim
{
protected:
- String *make_empty_result()
+ String *make_empty_result(String *str)
{ null_value= 1; return NULL; }
const char *func_name_ext() const { return "_oracle"; }
public:
@@ -616,7 +616,7 @@ public:
class Item_func_ltrim_oracle :public Item_func_ltrim
{
protected:
- String *make_empty_result()
+ String *make_empty_result(String *str)
{ null_value= 1; return NULL; }
const char *func_name_ext() const { return "_oracle"; }
public:
@@ -651,7 +651,7 @@ public:
class Item_func_rtrim_oracle :public Item_func_rtrim
{
protected:
- String *make_empty_result()
+ String *make_empty_result(String *str)
{ null_value= 1; return NULL; }
const char *func_name_ext() const { return "_oracle"; }
public:
@@ -1146,7 +1146,7 @@ public:
class Item_func_rpad_oracle :public Item_func_rpad
{
- String *make_empty_result()
+ String *make_empty_result(String *str)
{ null_value= 1; return NULL; }
public:
Item_func_rpad_oracle(THD *thd, Item *arg1, Item *arg2, Item *arg3):
@@ -1181,7 +1181,7 @@ public:
class Item_func_lpad_oracle :public Item_func_lpad
{
- String *make_empty_result()
+ String *make_empty_result(String *str)
{ null_value= 1; return NULL; }
public:
Item_func_lpad_oracle(THD *thd, Item *arg1, Item *arg2, Item *arg3):
@@ -1210,7 +1210,7 @@ public:
bool fix_length_and_dec()
{
collation.set(default_charset());
- max_length=64;
+ fix_char_length(64);
maybe_null= 1;
return FALSE;
}
@@ -1485,11 +1485,11 @@ public:
return NULL;
return res;
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if (args[0]->result_type() == STRING_RESULT)
- return Item_str_func::get_date(ltime, fuzzydate);
- bool res= args[0]->get_date(ltime, fuzzydate);
+ return Item_str_func::get_date(thd, ltime, fuzzydate);
+ bool res= args[0]->get_date(thd, ltime, fuzzydate);
if ((null_value= args[0]->null_value))
return 1;
return res;
@@ -1784,7 +1784,7 @@ public:
double val_real();
my_decimal *val_decimal(my_decimal *);
bool get_dyn_value(THD *thd, DYNAMIC_COLUMN_VALUE *val, String *tmp);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
void print(String *str, enum_query_type query_type);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_dyncol_get>(thd, this); }
@@ -1824,5 +1824,56 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_temptable_rowid>(thd, this); }
};
+#ifdef WITH_WSREP
+
+#include "wsrep_api.h"
+
+class Item_func_wsrep_last_written_gtid: public Item_str_ascii_func
+{
+ String gtid_str;
+public:
+ Item_func_wsrep_last_written_gtid(THD *thd): Item_str_ascii_func(thd) {}
+ const char *func_name() const { return "wsrep_last_written_gtid"; }
+ String *val_str_ascii(String *);
+ bool fix_length_and_dec()
+ {
+ max_length= WSREP_GTID_STR_LEN;
+ maybe_null= true;
+ return FALSE;
+ }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_func_wsrep_last_written_gtid>(thd, this); }
+};
+
+class Item_func_wsrep_last_seen_gtid: public Item_str_ascii_func
+{
+ String gtid_str;
+public:
+ Item_func_wsrep_last_seen_gtid(THD *thd): Item_str_ascii_func(thd) {}
+ const char *func_name() const { return "wsrep_last_seen_gtid"; }
+ String *val_str_ascii(String *);
+ bool fix_length_and_dec()
+ {
+ max_length= WSREP_GTID_STR_LEN;
+ maybe_null= true;
+ return FALSE;
+ }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_func_wsrep_last_seen_gtid>(thd, this); }
+};
+
+class Item_func_wsrep_sync_wait_upto: public Item_int_func
+{
+ String value;
+public:
+ Item_func_wsrep_sync_wait_upto(THD *thd, Item *a): Item_int_func(thd, a) {}
+ Item_func_wsrep_sync_wait_upto(THD *thd, Item *a, Item* b): Item_int_func(thd, a, b) {}
+ const Type_handler *type_handler() const { return &type_handler_string; }
+ const char *func_name() const { return "wsrep_sync_wait_upto_gtid"; }
+ longlong val_int();
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_func_wsrep_sync_wait_upto>(thd, this); }
+};
+#endif /* WITH_WSREP */
#endif /* ITEM_STRFUNC_INCLUDED */
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index ee36ee2fae9..7a9b874c53b 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -54,7 +54,8 @@ Item_subselect::Item_subselect(THD *thd_arg):
value_assigned(0), own_engine(0), thd(0), old_engine(0),
have_to_be_excluded(0),
inside_first_fix_fields(0), done_first_fix_fields(FALSE),
- expr_cache(0), forced_const(FALSE), substitution(0), engine(0), eliminated(FALSE),
+ expr_cache(0), forced_const(FALSE), expensive_fl(FALSE),
+ substitution(0), engine(0), eliminated(FALSE),
changed(0), is_correlated(FALSE), with_recursive_reference(0)
{
DBUG_ENTER("Item_subselect::Item_subselect");
@@ -85,6 +86,9 @@ void Item_subselect::init(st_select_lex *select_lex,
DBUG_ENTER("Item_subselect::init");
DBUG_PRINT("enter", ("select_lex: %p this: %p",
select_lex, this));
+
+ select_lex->parent_lex->relink_hack(select_lex);
+
unit= select_lex->master_unit();
if (unit->item)
@@ -118,18 +122,12 @@ void Item_subselect::init(st_select_lex *select_lex,
parsing_place= (outer_select->in_sum_expr ?
NO_MATTER :
outer_select->parsing_place);
- if (unit->is_unit_op() && unit->first_select()->next_select())
+ if (unit->is_unit_op() &&
+ (unit->first_select()->next_select() || unit->fake_select_lex))
engine= new subselect_union_engine(unit, result, this);
else
engine= new subselect_single_select_engine(select_lex, result, this);
}
- {
- SELECT_LEX *upper= unit->outer_select();
- if (upper->parsing_place == IN_HAVING)
- upper->subquery_in_having= 1;
- /* The subquery is an expression cache candidate */
- upper->expr_cache_may_be_used[upper->parsing_place]= TRUE;
- }
DBUG_PRINT("info", ("engine: %p", engine));
DBUG_VOID_RETURN;
}
@@ -220,7 +218,8 @@ Item_subselect::~Item_subselect()
if (own_engine)
delete engine;
else
- engine->cleanup();
+ if (engine) // can be empty in case of EOM
+ engine->cleanup();
engine= NULL;
DBUG_VOID_RETURN;
}
@@ -244,6 +243,14 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
DBUG_ASSERT(unit->thd == thd);
+ {
+ SELECT_LEX *upper= unit->outer_select();
+ if (upper->parsing_place == IN_HAVING)
+ upper->subquery_in_having= 1;
+ /* The subquery is an expression cache candidate */
+ upper->expr_cache_may_be_used[upper->parsing_place]= TRUE;
+ }
+
status_var_increment(thd_param->status_var.feature_subquery);
DBUG_ASSERT(fixed == 0);
@@ -607,6 +614,9 @@ bool Item_subselect::is_expensive()
double examined_rows= 0;
bool all_are_simple= true;
+ if (!expensive_fl && is_evaluated())
+ return false;
+
/* check extremely simple select */
if (!unit->first_select()->next_select()) // no union
{
@@ -617,7 +627,7 @@ bool Item_subselect::is_expensive()
SELECT_LEX *sl= unit->first_select();
JOIN *join = sl->join;
if (join && !join->tables_list && !sl->first_inner_unit())
- return false;
+ return (expensive_fl= false);
}
@@ -627,14 +637,14 @@ bool Item_subselect::is_expensive()
/* not optimized subquery */
if (!cur_join)
- return true;
+ return (expensive_fl= true);
/*
If the subquery is not optimised or in the process of optimization
it supposed to be expensive
*/
if (cur_join->optimization_state != JOIN::OPTIMIZATION_DONE)
- return true;
+ return (expensive_fl= true);
if (!cur_join->tables_list && !sl->first_inner_unit())
continue;
@@ -656,7 +666,7 @@ bool Item_subselect::is_expensive()
considered optimized if it has a join plan.
*/
if (!cur_join->join_tab)
- return true;
+ return (expensive_fl= true);
if (sl->first_inner_unit())
{
@@ -664,15 +674,15 @@ bool Item_subselect::is_expensive()
Subqueries that contain subqueries are considered expensive.
@todo: accumulate the cost of subqueries.
*/
- return true;
+ return (expensive_fl= true);
}
examined_rows+= cur_join->get_examined_rows();
}
// here we are sure that subquery is optimized so thd is set
- return !all_are_simple &&
- (examined_rows > thd->variables.expensive_subquery_limit);
+ return (expensive_fl= !all_are_simple &&
+ (examined_rows > thd->variables.expensive_subquery_limit));
}
@@ -1004,7 +1014,7 @@ bool Item_subselect::const_item() const
Item *Item_subselect::get_tmp_table_item(THD *thd_arg)
{
- if (!with_sum_func && !const_item())
+ if (!Item_subselect::with_sum_func() && !const_item())
return new (thd->mem_root) Item_temptable_field(thd_arg, result_field);
return copy_or_same(thd_arg);
}
@@ -1144,7 +1154,7 @@ void Item_maxmin_subselect::no_rows_in_result()
*/
if (parsing_place != SELECT_LIST || const_item())
return;
- value= (new (thd->mem_root) Item_null(thd))->get_cache(thd);
+ value= get_cache(thd);
null_value= 0;
was_values= 0;
make_const();
@@ -1162,7 +1172,7 @@ void Item_singlerow_subselect::no_rows_in_result()
*/
if (parsing_place != SELECT_LIST || const_item())
return;
- value= (new (thd->mem_root) Item_null(thd))->get_cache(thd);
+ value= get_cache(thd);
reset();
make_const();
}
@@ -1207,7 +1217,7 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
if (!select_lex->master_unit()->is_unit_op() &&
!select_lex->table_list.elements &&
select_lex->item_list.elements == 1 &&
- !select_lex->item_list.head()->with_sum_func &&
+ !select_lex->item_list.head()->with_sum_func() &&
/*
We can't change name of Item_field or Item_ref, because it will
prevent its correct resolving, but we should save name of
@@ -1449,6 +1459,24 @@ String *Item_singlerow_subselect::val_str(String *str)
}
+bool Item_singlerow_subselect::val_native(THD *thd, Native *to)
+{
+ DBUG_ASSERT(fixed == 1);
+ if (forced_const)
+ return value->val_native(thd, to);
+ if (!exec() && !value->null_value)
+ {
+ null_value= false;
+ return value->val_native(thd, to);
+ }
+ else
+ {
+ reset();
+ return true;
+ }
+}
+
+
my_decimal *Item_singlerow_subselect::val_decimal(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
@@ -1495,19 +1523,19 @@ bool Item_singlerow_subselect::val_bool()
}
-bool Item_singlerow_subselect::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
+bool Item_singlerow_subselect::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
if (forced_const)
{
- bool val= value->get_date(ltime, fuzzydate);
+ bool val= value->get_date(thd, ltime, fuzzydate);
null_value= value->null_value;
return val;
}
if (!exec() && !value->null_value)
{
null_value= FALSE;
- return value->get_date(ltime, fuzzydate);
+ return value->get_date(thd, ltime, fuzzydate);
}
else
{
@@ -1524,6 +1552,8 @@ Item_exists_subselect::Item_exists_subselect(THD *thd,
emb_on_expr_nest(NULL), optimizer(0), exists_transformed(0)
{
DBUG_ENTER("Item_exists_subselect::Item_exists_subselect");
+
+
init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this));
max_columns= UINT_MAX;
null_value= FALSE; //can't be NULL
@@ -1567,6 +1597,7 @@ Item_in_subselect::Item_in_subselect(THD *thd, Item * left_exp,
{
DBUG_ENTER("Item_in_subselect::Item_in_subselect");
DBUG_PRINT("info", ("in_strategy: %u", (uint)in_strategy));
+
left_expr_orig= left_expr= left_exp;
/* prepare to possible disassembling the item in convert_subq_to_sj() */
if (left_exp->type() == Item::ROW_ITEM)
@@ -2162,7 +2193,7 @@ bool Item_in_subselect::fix_having(Item *having, SELECT_LEX *select_lex)
{
bool fix_res= 0;
DBUG_ASSERT(thd);
- if (!having->fixed)
+ if (!having->is_fixed())
{
select_lex->having_fix_field= 1;
fix_res= having->fix_fields(thd, 0);
@@ -2499,9 +2530,9 @@ Item_in_subselect::create_row_in_to_exists_cond(JOIN * join,
Item *item_having_part2= 0;
for (uint i= 0; i < cols_num; i++)
{
- DBUG_ASSERT((left_expr->fixed &&
+ DBUG_ASSERT((left_expr->is_fixed() &&
- select_lex->ref_pointer_array[i]->fixed) ||
+ select_lex->ref_pointer_array[i]->is_fixed()) ||
(select_lex->ref_pointer_array[i]->type() == REF_ITEM &&
((Item_ref*)(select_lex->ref_pointer_array[i]))->ref_type() ==
Item_ref::OUTER_REF));
@@ -2570,8 +2601,8 @@ Item_in_subselect::create_row_in_to_exists_cond(JOIN * join,
for (uint i= 0; i < cols_num; i++)
{
Item *item, *item_isnull;
- DBUG_ASSERT((left_expr->fixed &&
- select_lex->ref_pointer_array[i]->fixed) ||
+ DBUG_ASSERT((left_expr->is_fixed() &&
+ select_lex->ref_pointer_array[i]->is_fixed()) ||
(select_lex->ref_pointer_array[i]->type() == REF_ITEM &&
((Item_ref*)(select_lex->ref_pointer_array[i]))->ref_type() ==
Item_ref::OUTER_REF));
@@ -3012,7 +3043,6 @@ bool Item_exists_subselect::exists2in_processor(void *opt_arg)
!upper_not->is_top_level_item())) ||
first_select->is_part_of_union() ||
first_select->group_list.elements ||
- first_select->order_list.elements ||
join->having ||
first_select->with_sum_func ||
!first_select->leaf_tables.elements||
@@ -3020,8 +3050,31 @@ bool Item_exists_subselect::exists2in_processor(void *opt_arg)
with_recursive_reference)
DBUG_RETURN(FALSE);
- DBUG_ASSERT(first_select->order_list.elements == 0 &&
- first_select->group_list.elements == 0 &&
+ /*
+ EXISTS-to-IN coversion and ORDER BY ... LIMIT clause:
+
+ - "[ORDER BY ...] LIMIT n" clause with a non-zero n does not affect
+ the result of the EXISTS(...) predicate, and so we can discard
+ it during the conversion.
+ - "[ORDER BY ...] LIMIT m, n" can turn a non-empty resultset into empty
+ one, so it affects tthe EXISTS(...) result and cannot be discarded.
+
+ Disallow exists-to-in conversion if
+ (1). three is a LIMIT which is not a basic constant
+ (1a) or is a "LIMIT 0" (see MDEV-19429)
+ (2). there is an OFFSET clause
+ */
+ if ((first_select->select_limit && // (1)
+ (!first_select->select_limit->basic_const_item() || // (1)
+ first_select->select_limit->val_uint() == 0)) || // (1a)
+ first_select->offset_limit) // (2)
+ {
+ DBUG_RETURN(FALSE);
+ }
+
+ /* Disallow the conversion if offset + limit exists */
+
+ DBUG_ASSERT(first_select->group_list.elements == 0 &&
first_select->having == NULL);
if (find_inner_outer_equalities(&join->conds, eqs))
@@ -3052,9 +3105,6 @@ bool Item_exists_subselect::exists2in_processor(void *opt_arg)
if ((uint)eqs.elements() > (first_select->item_list.elements +
first_select->select_n_reserved))
goto out;
- /* It is simple query */
- DBUG_ASSERT(first_select->join->all_fields.elements ==
- first_select->item_list.elements);
arena= thd->activate_stmt_arena_if_needed(&backup);
@@ -3310,21 +3360,6 @@ Item_in_subselect::select_in_like_transformer(JOIN *join)
DBUG_ENTER("Item_in_subselect::select_in_like_transformer");
DBUG_ASSERT(thd == join->thd);
-
- /*
- IN/SOME/ALL/ANY subqueries aren't support LIMIT clause. Without it
- ORDER BY clause becomes meaningless thus we drop it here.
- */
- for (SELECT_LEX *sl= current->master_unit()->first_select();
- sl; sl= sl->next_select())
- {
- if (sl->join)
- {
- sl->join->order= 0;
- sl->join->skip_sort_order= 1;
- }
- }
-
thd->where= "IN/ALL/ANY subquery";
/*
@@ -3388,7 +3423,8 @@ out:
void Item_in_subselect::print(String *str, enum_query_type query_type)
{
- if (test_strategy(SUBS_IN_TO_EXISTS))
+ if (test_strategy(SUBS_IN_TO_EXISTS) &&
+ !(query_type & QT_PARSABLE))
str->append(STRING_WITH_LEN("<exists>"));
else
{
@@ -3615,7 +3651,8 @@ Item_allany_subselect::select_transformer(JOIN *join)
void Item_allany_subselect::print(String *str, enum_query_type query_type)
{
- if (test_strategy(SUBS_IN_TO_EXISTS))
+ if (test_strategy(SUBS_IN_TO_EXISTS) &&
+ !(query_type & QT_PARSABLE))
str->append(STRING_WITH_LEN("<exists>"));
else
{
@@ -4010,6 +4047,8 @@ int subselect_single_select_engine::exec()
tab->save_read_record= tab->read_record.read_record_func;
tab->read_record.read_record_func= rr_sequential;
tab->read_first_record= read_first_record_seq;
+ if (tab->rowid_filter)
+ tab->table->file->disable_pushed_rowid_filter();
tab->read_record.thd= join->thd;
tab->read_record.ref_length= tab->table->file->ref_length;
tab->read_record.unlock_row= rr_unlock_row;
@@ -4030,6 +4069,8 @@ int subselect_single_select_engine::exec()
tab->read_record.ref_length= 0;
tab->read_first_record= tab->save_read_first_record;
tab->read_record.read_record_func= tab->save_read_record;
+ if (tab->rowid_filter)
+ tab->table->file->enable_pushed_rowid_filter();
}
executed= 1;
if (!(uncacheable() & ~UNCACHEABLE_EXPLAIN) &&
@@ -5927,7 +5968,7 @@ int
Ordered_key::cmp_keys_by_row_data(ha_rows a, ha_rows b)
{
uchar *rowid_a, *rowid_b;
- int __attribute__((unused)) error;
+ int error;
int cmp_res;
/* The length in bytes of the rowids (positions) of tmp_table. */
uint rowid_length= tbl->file->ref_length;
@@ -5941,14 +5982,14 @@ Ordered_key::cmp_keys_by_row_data(ha_rows a, ha_rows b)
if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a))))
{
/* purecov: begin inspected */
- tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
+ tbl->file->print_error(error, MYF(ME_FATAL)); // Sets fatal_error
return 0;
/* purecov: end */
}
if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b))))
{
/* purecov: begin inspected */
- tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
+ tbl->file->print_error(error, MYF(ME_FATAL)); // Sets fatal_error
return 0;
/* purecov: end */
}
@@ -6028,13 +6069,13 @@ int Ordered_key::cmp_key_with_search_key(rownum_t row_num)
/* The length in bytes of the rowids (positions) of tmp_table. */
uint rowid_length= tbl->file->ref_length;
uchar *cur_rowid= row_num_to_rowid + row_num * rowid_length;
- int __attribute__((unused)) error;
+ int error;
int cmp_res;
if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid))))
{
/* purecov: begin inspected */
- tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
+ tbl->file->print_error(error, MYF(ME_FATAL)); // Sets fatal_error
return 0;
/* purecov: end */
}
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 16c683b27e0..4816785fa13 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -33,6 +33,7 @@ class subselect_hash_sj_engine;
class Item_bool_func2;
class Comp_creator;
class With_element;
+class Field_pair;
typedef class st_select_lex SELECT_LEX;
@@ -46,7 +47,8 @@ class Cached_item;
/* base class for subselects */
class Item_subselect :public Item_result_field,
- protected Used_tables_and_const_cache
+ protected Used_tables_and_const_cache,
+ protected With_sum_func_cache
{
/*
Set to TRUE if the value is assigned for the subselect
@@ -75,6 +77,8 @@ protected:
to substitute 'this' with a constant item.
*/
bool forced_const;
+ /* Set to the result of the last call of is_expensive() */
+ bool expensive_fl;
#ifndef DBUG_OFF
/* Count the number of times this subquery predicate has been executed. */
uint exec_counter;
@@ -191,6 +195,8 @@ public:
}
bool fix_fields(THD *thd, Item **ref);
bool with_subquery() const { DBUG_ASSERT(fixed); return true; }
+ bool with_sum_func() const { return m_with_sum_func; }
+ With_sum_func_cache* get_with_sum_func_cache() { return this; }
bool mark_as_dependent(THD *thd, st_select_lex *select, Item *item);
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
void recalc_used_tables(st_select_lex *new_parent, bool after_pullout);
@@ -312,9 +318,10 @@ public:
double val_real();
longlong val_int ();
String *val_str (String *);
+ bool val_native(THD *thd, Native *);
my_decimal *val_decimal(my_decimal *);
bool val_bool();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
const Type_handler *type_handler() const;
bool fix_length_and_dec();
@@ -405,14 +412,14 @@ public:
}
void no_rows_in_result();
- const Type_handler *type_handler() const { return &type_handler_longlong; }
+ const Type_handler *type_handler() const { return &type_handler_bool; }
longlong val_int();
double val_real();
String *val_str(String*);
my_decimal *val_decimal(my_decimal *);
bool val_bool();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
- { return get_date_from_int(ltime, fuzzydate); }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ { return get_date_from_int(thd, ltime, fuzzydate); }
bool fix_fields(THD *thd, Item **ref);
bool fix_length_and_dec();
void print(String *str, enum_query_type query_type);
@@ -580,6 +587,8 @@ public:
*/
bool is_registered_semijoin;
+ List<Field_pair> corresponding_fields;
+
/*
Used to determine how this subselect item is represented in the item tree,
in case there is a need to locate it there and replace with something else.
@@ -637,7 +646,6 @@ public:
double val_real();
String *val_str(String*);
my_decimal *val_decimal(my_decimal *);
- void update_null_value () { (void) val_bool(); }
bool val_bool();
bool test_limit(st_select_lex_unit *unit);
void print(String *str, enum_query_type query_type);
@@ -757,6 +765,8 @@ public:
return 0;
};
+ bool pushdown_cond_for_in_subquery(THD *thd, Item *cond);
+
friend class Item_ref_null_helper;
friend class Item_is_not_null_test;
friend class Item_in_optimizer;
@@ -868,7 +878,6 @@ protected:
bool set_row(List<Item> &item_list, Item_cache **row);
};
-
class subselect_single_select_engine: public subselect_engine
{
bool prepared; /* simple subselect is prepared */
@@ -902,9 +911,10 @@ public:
friend class subselect_hash_sj_engine;
friend class Item_in_subselect;
- friend bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
- Item **join_where);
-
+ friend bool execute_degenerate_jtbm_semi_join(THD *thd,
+ TABLE_LIST *tbl,
+ Item_in_subselect *subq_pred,
+ List<Item> &eq_list);
};
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 72e01a1e0e4..f80b89bc828 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -406,7 +406,7 @@ bool Item_sum::register_sum_func(THD *thd, Item **ref)
for (sl= thd->lex->current_select;
sl && sl != aggr_sel && sl->master_unit()->item;
sl= sl->master_unit()->outer_select() )
- sl->master_unit()->item->with_sum_func= 1;
+ sl->master_unit()->item->get_with_sum_func_cache()->set_with_sum_func();
}
thd->lex->current_select->mark_as_dependent(thd, aggr_sel, NULL);
@@ -487,7 +487,6 @@ void Item_sum::mark_as_sum_func()
cur_select->n_sum_items++;
cur_select->with_sum_func= 1;
const_item_cache= false;
- with_sum_func= 1;
with_field= 0;
window_func_sum_expr_flag= false;
}
@@ -893,7 +892,7 @@ bool Aggregator_distinct::setup(THD *thd)
item_sum->null_value= item_sum->maybe_null= 1;
item_sum->quick_group= 0;
- DBUG_ASSERT(item_sum->get_arg(0)->fixed);
+ DBUG_ASSERT(item_sum->get_arg(0)->is_fixed());
arg= item_sum->get_arg(0);
if (arg->const_item())
@@ -1290,9 +1289,11 @@ Field *Item_sum_min_max::create_tmp_field(bool group, TABLE *table)
if (args[0]->type() == Item::FIELD_ITEM)
{
Field *field= ((Item_field*) args[0])->field;
- if ((field= create_tmp_field_from_field(table->in_use, field, &name,
- table, NULL)))
- field->flags&= ~NOT_NULL_FLAG;
+ if ((field= field->create_tmp_field(table->in_use->mem_root, table, true)))
+ {
+ DBUG_ASSERT((field->flags & NOT_NULL_FLAG) == 0);
+ field->field_name= name;
+ }
DBUG_RETURN(field);
}
DBUG_RETURN(tmp_table_field_from_field_type(table));
@@ -1340,7 +1341,7 @@ Item_sum_sp::fix_fields(THD *thd, Item **ref)
if (!m_sp)
{
my_missing_function_error(m_name->m_name, ErrConvDQName(m_name).ptr());
- context->process_error(thd);
+ process_error(thd);
return TRUE;
}
@@ -1697,12 +1698,7 @@ longlong Item_sum_sum::val_int()
if (aggr)
aggr->endup();
if (result_type() == DECIMAL_RESULT)
- {
- longlong result;
- my_decimal2int(E_DEC_FATAL_ERROR, dec_buffs + curr_dec_buff, unsigned_flag,
- &result);
- return result;
- }
+ return dec_buffs[curr_dec_buff].to_longlong(unsigned_flag);
return val_int_from_real();
}
@@ -1713,7 +1709,7 @@ double Item_sum_sum::val_real()
if (aggr)
aggr->endup();
if (result_type() == DECIMAL_RESULT)
- my_decimal2double(E_DEC_FATAL_ERROR, dec_buffs + curr_dec_buff, &sum);
+ sum= dec_buffs[curr_dec_buff].to_double();
return sum;
}
@@ -1723,7 +1719,7 @@ String *Item_sum_sum::val_str(String *str)
if (aggr)
aggr->endup();
if (result_type() == DECIMAL_RESULT)
- return val_string_from_decimal(str);
+ return VDec(this).to_string_round(str, decimals);
return val_string_from_real(str);
}
@@ -2089,7 +2085,7 @@ String *Item_sum_avg::val_str(String *str)
if (aggr)
aggr->endup();
if (result_type() == DECIMAL_RESULT)
- return val_string_from_decimal(str);
+ return VDec(this).to_string_round(str, decimals);
return val_string_from_real(str);
}
@@ -2149,46 +2145,42 @@ Item *Item_sum_std::result_item(THD *thd, Field *field)
variance. The difference between the two classes is that the first is used
for a mundane SELECT, while the latter is used in a GROUPing SELECT.
*/
-static void variance_fp_recurrence_next(double *m, double *s, ulonglong *count, double nr)
+void Stddev::recurrence_next(double nr)
{
- *count += 1;
-
- if (*count == 1)
+ if (!m_count++)
{
- *m= nr;
- *s= 0;
+ DBUG_ASSERT(m_m == 0);
+ DBUG_ASSERT(m_s == 0);
+ m_m= nr;
}
else
{
- double m_kminusone= *m;
+ double m_kminusone= m_m;
volatile double diff= nr - m_kminusone;
- *m= m_kminusone + diff / (double) *count;
- *s= *s + diff * (nr - *m);
+ m_m= m_kminusone + diff / (double) m_count;
+ m_s= m_s + diff * (nr - m_m);
}
}
-static double variance_fp_recurrence_result(double s, ulonglong count, bool is_sample_variance)
+double Stddev::result(bool is_sample_variance)
{
- if (count == 1)
+ if (m_count == 1)
return 0.0;
if (is_sample_variance)
- return s / (count - 1);
+ return m_s / (m_count - 1);
/* else, is a population variance */
- return s / count;
+ return m_s / m_count;
}
Item_sum_variance::Item_sum_variance(THD *thd, Item_sum_variance *item):
Item_sum_double(thd, item),
- count(item->count), sample(item->sample),
+ m_stddev(item->m_stddev), sample(item->sample),
prec_increment(item->prec_increment)
-{
- recurrence_m= item->recurrence_m;
- recurrence_s= item->recurrence_s;
-}
+{ }
void Item_sum_variance::fix_length_and_dec_double()
@@ -2251,8 +2243,7 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table)
The easiest way is to do this is to store both value in a string
and unpack on access.
*/
- field= new Field_string(sizeof(double)*2 + sizeof(longlong), 0,
- &name, &my_charset_bin);
+ field= new Field_string(Stddev::binary_size(), 0, &name, &my_charset_bin);
}
else
field= new Field_double(max_length, maybe_null, &name, decimals,
@@ -2267,7 +2258,7 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table)
void Item_sum_variance::clear()
{
- count= 0;
+ m_stddev= Stddev();
}
bool Item_sum_variance::add()
@@ -2279,7 +2270,7 @@ bool Item_sum_variance::add()
double nr= args[0]->val_real();
if (!args[0]->null_value)
- variance_fp_recurrence_next(&recurrence_m, &recurrence_s, &count, nr);
+ m_stddev.recurrence_next(nr);
return 0;
}
@@ -2297,14 +2288,14 @@ double Item_sum_variance::val_real()
below which a 'count' number of items is called NULL.
*/
DBUG_ASSERT((sample == 0) || (sample == 1));
- if (count <= sample)
+ if (m_stddev.count() <= sample)
{
null_value=1;
return 0.0;
}
null_value=0;
- return variance_fp_recurrence_result(recurrence_s, count, sample);
+ return m_stddev.result(sample);
}
@@ -2316,24 +2307,32 @@ void Item_sum_variance::reset_field()
nr= args[0]->val_real(); /* sets null_value as side-effect */
if (args[0]->null_value)
- bzero(res,sizeof(double)*2+sizeof(longlong));
+ bzero(res,Stddev::binary_size());
else
- {
- /* Serialize format is (double)m, (double)s, (longlong)count */
- ulonglong tmp_count;
- double tmp_s;
- float8store(res, nr); /* recurrence variable m */
- tmp_s= 0.0;
- float8store(res + sizeof(double), tmp_s);
- tmp_count= 1;
- int8store(res + sizeof(double)*2, tmp_count);
- }
+ Stddev(nr).to_binary(res);
+}
+
+
+Stddev::Stddev(const uchar *ptr)
+{
+ float8get(m_m, ptr);
+ float8get(m_s, ptr + sizeof(double));
+ m_count= sint8korr(ptr + sizeof(double) * 2);
+}
+
+
+void Stddev::to_binary(uchar *ptr) const
+{
+ /* Serialize format is (double)m, (double)s, (longlong)count */
+ float8store(ptr, m_m);
+ float8store(ptr + sizeof(double), m_s);
+ ptr+= sizeof(double)*2;
+ int8store(ptr, m_count);
}
void Item_sum_variance::update_field()
{
- ulonglong field_count;
uchar *res=result_field->ptr;
double nr= args[0]->val_real(); /* sets null_value as side-effect */
@@ -2342,17 +2341,9 @@ void Item_sum_variance::update_field()
return;
/* Serialize format is (double)m, (double)s, (longlong)count */
- double field_recurrence_m, field_recurrence_s;
- float8get(field_recurrence_m, res);
- float8get(field_recurrence_s, res + sizeof(double));
- field_count=sint8korr(res+sizeof(double)*2);
-
- variance_fp_recurrence_next(&field_recurrence_m, &field_recurrence_s, &field_count, nr);
-
- float8store(res, field_recurrence_m);
- float8store(res + sizeof(double), field_recurrence_s);
- res+= sizeof(double)*2;
- int8store(res,field_count);
+ Stddev field_stddev(res);
+ field_stddev.recurrence_next(nr);
+ field_stddev.to_binary(res);
}
@@ -2373,12 +2364,12 @@ void Item_sum_min_max::clear()
bool
-Item_sum_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+Item_sum_min_max::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
if (null_value)
return true;
- bool retval= value->get_date(ltime, fuzzydate);
+ bool retval= value->get_date(thd, ltime, fuzzydate);
if ((null_value= value->null_value))
DBUG_ASSERT(retval == true);
return retval;
@@ -2447,6 +2438,15 @@ Item_sum_min_max::val_str(String *str)
}
+bool Item_sum_min_max::val_native(THD *thd, Native *to)
+{
+ DBUG_ASSERT(fixed == 1);
+ if (null_value)
+ return true;
+ return val_native_from_item(thd, value, to);
+}
+
+
void Item_sum_min_max::cleanup()
{
DBUG_ENTER("Item_sum_min_max::cleanup");
@@ -2637,9 +2637,9 @@ bool Item_sum_bit::add_as_window(ulonglong value)
void Item_sum_or::set_bits_from_counters()
{
ulonglong value= 0;
- for (int i= 0; i < NUM_BIT_COUNTERS; i++)
+ for (uint i= 0; i < NUM_BIT_COUNTERS; i++)
{
- value|= bit_counters[i] > 0 ? (1 << i) : 0;
+ value|= bit_counters[i] > 0 ? (1ULL << i) : 0ULL;
}
bits= value | reset_bits;
}
@@ -2723,25 +2723,6 @@ bool Item_sum_and::add()
** reset result of a Item_sum with is saved in a tmp_table
*************************************************************************/
-void Item_sum_num::reset_field()
-{
- double nr= args[0]->val_real();
- uchar *res=result_field->ptr;
-
- if (maybe_null)
- {
- if (args[0]->null_value)
- {
- nr=0.0;
- result_field->set_null();
- }
- else
- result_field->set_notnull();
- }
- float8store(res,nr);
-}
-
-
void Item_sum_min_max::reset_field()
{
Item *UNINIT_VAR(tmp_item), *arg0;
@@ -2812,11 +2793,11 @@ void Item_sum_min_max::reset_field()
}
case DECIMAL_RESULT:
{
- my_decimal value_buff, *arg_dec= arg0->val_decimal(&value_buff);
+ VDec arg_dec(arg0);
if (maybe_null)
{
- if (arg0->null_value)
+ if (arg_dec.is_null())
result_field->set_null();
else
result_field->set_notnull();
@@ -2825,9 +2806,7 @@ void Item_sum_min_max::reset_field()
We must store zero in the field as we will use the field value in
add()
*/
- if (!arg_dec) // Null
- arg_dec= &decimal_zero;
- result_field->store_decimal(arg_dec);
+ result_field->store_decimal(arg_dec.ptr_or(&decimal_zero));
break;
}
case ROW_RESULT:
@@ -2850,15 +2829,10 @@ void Item_sum_sum::reset_field()
DBUG_ASSERT (aggr->Aggrtype() != Aggregator::DISTINCT_AGGREGATOR);
if (result_type() == DECIMAL_RESULT)
{
- my_decimal value, *arg_val;
if (unlikely(direct_added))
- arg_val= &direct_sum_decimal;
+ result_field->store_decimal(&direct_sum_decimal);
else
- {
- if (!(arg_val= args[0]->val_decimal(&value)))
- arg_val= &decimal_zero; // Null
- }
- result_field->store_decimal(arg_val);
+ result_field->store_decimal(VDec(args[0]).ptr_or(&decimal_zero));
}
else
{
@@ -2911,15 +2885,9 @@ void Item_sum_avg::reset_field()
if (result_type() == DECIMAL_RESULT)
{
longlong tmp;
- my_decimal value, *arg_dec= args[0]->val_decimal(&value);
- if (args[0]->null_value)
- {
- arg_dec= &decimal_zero;
- tmp= 0;
- }
- else
- tmp= 1;
- my_decimal2binary(E_DEC_FATAL_ERROR, arg_dec, res, f_precision, f_scale);
+ VDec value(args[0]);
+ tmp= value.is_null() ? 0 : 1;
+ value.to_binary(res, f_precision, f_scale);
res+= dec_bin_size;
int8store(res, tmp);
}
@@ -2986,9 +2954,8 @@ void Item_sum_sum::update_field()
{
if (!result_field->is_null())
{
- my_decimal field_value;
- my_decimal *field_val= result_field->val_decimal(&field_value);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_buffs, arg_val, field_val);
+ my_decimal field_value(result_field);
+ my_decimal_add(E_DEC_FATAL_ERROR, dec_buffs, arg_val, &field_value);
result_field->store_decimal(dec_buffs);
}
else
@@ -3055,15 +3022,14 @@ void Item_sum_avg::update_field()
if (result_type() == DECIMAL_RESULT)
{
- my_decimal value, *arg_val= args[0]->val_decimal(&value);
- if (!args[0]->null_value)
+ VDec tmp(args[0]);
+ if (!tmp.is_null())
{
binary2my_decimal(E_DEC_FATAL_ERROR, res,
dec_buffs + 1, f_precision, f_scale);
field_count= sint8korr(res + dec_bin_size);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_buffs, arg_val, dec_buffs + 1);
- my_decimal2binary(E_DEC_FATAL_ERROR, dec_buffs,
- res, f_precision, f_scale);
+ my_decimal_add(E_DEC_FATAL_ERROR, dec_buffs, tmp.ptr(), dec_buffs + 1);
+ dec_buffs->to_binary(res, f_precision, f_scale);
res+= dec_bin_size;
field_count++;
int8store(res, field_count);
@@ -3107,18 +3073,32 @@ void Item_sum_min_max::update_field()
tmp_item= args[0];
args[0]= direct_item;
}
- switch (result_type()) {
- case STRING_RESULT:
- min_max_update_str_field();
- break;
- case INT_RESULT:
- min_max_update_int_field();
- break;
- case DECIMAL_RESULT:
- min_max_update_decimal_field();
- break;
- default:
- min_max_update_real_field();
+ if (Item_sum_min_max::type_handler()->is_val_native_ready())
+ {
+ /*
+ TODO-10.5: change Item_sum_min_max to use val_native() for all data types
+ - make all type handlers val_native() ready
+ - use min_max_update_native_field() for all data types
+ - remove Item_sum_min_max::min_max_update_{str|real|int|decimal}_field()
+ */
+ min_max_update_native_field();
+ }
+ else
+ {
+ switch (Item_sum_min_max::type_handler()->cmp_type()) {
+ case STRING_RESULT:
+ case TIME_RESULT:
+ min_max_update_str_field();
+ break;
+ case INT_RESULT:
+ min_max_update_int_field();
+ break;
+ case DECIMAL_RESULT:
+ min_max_update_decimal_field();
+ break;
+ default:
+ min_max_update_real_field();
+ }
}
if (unlikely(direct_added))
{
@@ -3129,6 +3109,40 @@ void Item_sum_min_max::update_field()
}
+void Arg_comparator::min_max_update_field_native(THD *thd,
+ Field *field,
+ Item *item,
+ int cmp_sign)
+{
+ DBUG_ENTER("Arg_comparator::min_max_update_field_native");
+ if (!item->val_native(current_thd, &m_native2))
+ {
+ if (field->is_null())
+ field->store_native(m_native2); // The first non-null value
+ else
+ {
+ field->val_native(&m_native1);
+ if ((cmp_sign * m_compare_handler->cmp_native(m_native2, m_native1)) < 0)
+ field->store_native(m_native2);
+ }
+ field->set_notnull();
+ }
+ DBUG_VOID_RETURN;
+}
+
+
+void
+Item_sum_min_max::min_max_update_native_field()
+{
+ DBUG_ENTER("Item_sum_min_max::min_max_update_native_field");
+ DBUG_ASSERT(cmp);
+ DBUG_ASSERT(type_handler_for_comparison() == cmp->compare_type_handler());
+ THD *thd= current_thd;
+ cmp->min_max_update_field_native(thd, result_field, args[0], cmp_sign);
+ DBUG_VOID_RETURN;
+}
+
+
void
Item_sum_min_max::min_max_update_str_field()
{
@@ -3261,9 +3275,7 @@ my_decimal *Item_avg_field_decimal::val_decimal(my_decimal *dec_buf)
if ((null_value= !count))
return 0;
- my_decimal dec_count, dec_field;
- binary2my_decimal(E_DEC_FATAL_ERROR,
- field->ptr, &dec_field, f_precision, f_scale);
+ my_decimal dec_count, dec_field(field->ptr, f_precision, f_scale);
int2my_decimal(E_DEC_FATAL_ERROR, count, 0, &dec_count);
my_decimal_div(E_DEC_FATAL_ERROR, dec_buf,
&dec_field, &dec_count, prec_increment);
@@ -3284,15 +3296,11 @@ double Item_std_field::val_real()
double Item_variance_field::val_real()
{
// fix_fields() never calls for this Item
- double recurrence_s;
- ulonglong count;
- float8get(recurrence_s, (field->ptr + sizeof(double)));
- count=sint8korr(field->ptr+sizeof(double)*2);
-
- if ((null_value= (count <= sample)))
+ Stddev tmp(field->ptr);
+ if ((null_value= (tmp.count() <= sample)))
return 0.0;
- return variance_fp_recurrence_result(recurrence_s, count, sample);
+ return tmp.result(sample);
}
@@ -3321,6 +3329,25 @@ bool Item_udf_sum::add()
DBUG_RETURN(0);
}
+
+bool Item_udf_sum::supports_removal() const
+{
+ DBUG_ENTER("Item_udf_sum::supports_remove");
+ DBUG_PRINT("info", ("support: %d", udf.supports_removal()));
+ DBUG_RETURN(udf.supports_removal());
+}
+
+
+void Item_udf_sum::remove()
+{
+ my_bool tmp_null_value;
+ DBUG_ENTER("Item_udf_sum::remove");
+ udf.remove(&tmp_null_value);
+ null_value= tmp_null_value;
+ DBUG_VOID_RETURN;
+}
+
+
void Item_udf_sum::cleanup()
{
/*
@@ -3377,24 +3404,6 @@ my_decimal *Item_sum_udf_float::val_decimal(my_decimal *dec)
}
-String *Item_sum_udf_decimal::val_str(String *str)
-{
- return val_string_from_decimal(str);
-}
-
-
-double Item_sum_udf_decimal::val_real()
-{
- return val_real_from_decimal();
-}
-
-
-longlong Item_sum_udf_decimal::val_int()
-{
- return val_int_from_decimal();
-}
-
-
my_decimal *Item_sum_udf_decimal::val_decimal(my_decimal *dec_buf)
{
my_decimal *res;
@@ -3731,7 +3740,7 @@ Item_func_group_concat(THD *thd, Name_resolution_context *context_arg,
arg_count_field(select_list->elements),
row_count(0),
distinct(distinct_arg),
- warning_for_row(FALSE),
+ warning_for_row(FALSE), always_null(FALSE),
force_copy_fields(0), row_limit(NULL),
offset_limit(NULL), limit_clause(limit_clause),
copy_offset_limit(0), copy_row_limit(0), original(0)
@@ -4156,6 +4165,7 @@ bool Item_func_group_concat::setup(THD *thd)
if (!ref_pointer_array)
DBUG_RETURN(TRUE);
memcpy(ref_pointer_array, args, arg_count * sizeof(Item*));
+ DBUG_ASSERT(context);
if (setup_order(thd, Ref_ptr_array(ref_pointer_array, n_elems),
context->table_list, list, all_fields, *order))
DBUG_RETURN(TRUE);
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 48565ece5a8..f715c80ffaf 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -384,7 +384,9 @@ protected:
Item **orig_args, *tmp_orig_args[2];
static size_t ram_limitation(THD *thd);
-
+public:
+ // Methods used by ColumnStore
+ Item **get_orig_args() const { return orig_args; }
public:
void mark_as_sum_func();
@@ -511,7 +513,12 @@ public:
}
virtual void make_unique() { force_copy_fields= TRUE; }
Item *get_tmp_table_item(THD *thd);
- Field *create_tmp_field(bool group, TABLE *table);
+ virtual Field *create_tmp_field(bool group, TABLE *table);
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ return create_tmp_field(param->group(), table);
+ }
virtual bool collect_outer_ref_processor(void *param);
bool init_sum_func_check(THD *thd);
bool check_sum_func(THD *thd, Item **ref);
@@ -578,6 +585,8 @@ public:
void mark_as_window_func_sum_expr() { window_func_sum_expr_flag= true; }
bool is_window_func_sum_expr() { return window_func_sum_expr_flag; }
virtual void setup_caches(THD *thd) {};
+
+ bool with_sum_func() const { return true; }
virtual void set_partition_row_count(ulonglong count) { DBUG_ASSERT(0); }
};
@@ -725,7 +734,6 @@ public:
Item_sum_num(THD *thd, Item_sum_num *item):
Item_sum(thd, item) {}
bool fix_fields(THD *, Item **);
- void reset_field();
};
@@ -748,9 +756,9 @@ public:
{
return val_decimal_from_real(to);
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return get_date_from_real(ltime, fuzzydate);
+ return get_date_from_real(thd, ltime, fuzzydate);
}
const Type_handler *type_handler() const { return &type_handler_double; }
};
@@ -766,9 +774,9 @@ public:
double val_real() { DBUG_ASSERT(fixed == 1); return (double) val_int(); }
String *val_str(String*str);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return get_date_from_int(ltime, fuzzydate);
+ return get_date_from_int(thd, ltime, fuzzydate);
}
const Type_handler *type_handler() const { return &type_handler_longlong; }
bool fix_length_and_dec()
@@ -811,9 +819,9 @@ public:
longlong val_int();
String *val_str(String*str);
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
const Type_handler *type_handler() const
{ return Type_handler_hybrid_field_type::type_handler(); }
@@ -985,18 +993,38 @@ But, this falls prey to catastrophic cancellation. Instead, use the recurrence
*/
+class Stddev
+{
+ double m_m;
+ double m_s;
+ ulonglong m_count;
+public:
+ Stddev() :m_m(0), m_s(0), m_count(0) { }
+ Stddev(double nr) :m_m(nr), m_s(0.0), m_count(1) { }
+ Stddev(const uchar *);
+ void to_binary(uchar *) const;
+ void recurrence_next(double nr);
+ double result(bool is_simple_variance);
+ ulonglong count() const { return m_count; }
+ static uint32 binary_size()
+ {
+ return (uint32) (sizeof(double) * 2 + sizeof(ulonglong));
+ };
+};
+
+
+
class Item_sum_variance : public Item_sum_double
{
+ Stddev m_stddev;
bool fix_length_and_dec();
public:
- double recurrence_m, recurrence_s; /* Used in recurrence relation. */
- ulonglong count;
uint sample;
uint prec_increment;
Item_sum_variance(THD *thd, Item *item_par, uint sample_arg):
- Item_sum_double(thd, item_par), count(0),
+ Item_sum_double(thd, item_par),
sample(sample_arg)
{}
Item_sum_variance(THD *thd, Item_sum_variance *item);
@@ -1016,7 +1044,7 @@ public:
Field *create_tmp_field(bool group, TABLE *table);
void cleanup()
{
- count= 0;
+ m_stddev= Stddev();
Item_sum_double::cleanup();
}
Item *get_copy(THD *thd)
@@ -1102,9 +1130,10 @@ public:
double val_real();
longlong val_int();
my_decimal *val_decimal(my_decimal *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
void reset_field();
String *val_str(String *);
+ bool val_native(THD *thd, Native *);
const Type_handler *real_type_handler() const
{
return get_arg(0)->real_type_handler();
@@ -1115,6 +1144,7 @@ public:
void min_max_update_real_field();
void min_max_update_int_field();
void min_max_update_decimal_field();
+ void min_max_update_native_field();
void cleanup();
bool any_value() { return was_values; }
void no_rows_in_result();
@@ -1396,7 +1426,7 @@ public:
void update_field(){DBUG_ASSERT(0);}
void clear();
void cleanup();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
return execute() || sp_result_field->get_date(ltime, fuzzydate);
}
@@ -1424,17 +1454,21 @@ public:
decimals= item->decimals;
max_length= item->max_length;
unsigned_flag= item->unsigned_flag;
- fixed= true;
}
table_map used_tables() const { return (table_map) 1L; }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ return create_tmp_field_ex_simple(table, src, param);
+ }
void save_in_result_field(bool no_conversions) { DBUG_ASSERT(0); }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(name.str, arg, VCOL_IMPOSSIBLE);
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
};
@@ -1479,9 +1513,18 @@ public:
dec_bin_size(item->dec_bin_size)
{ }
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
- double val_real() { return val_real_from_decimal(); }
- longlong val_int() { return val_int_from_decimal(); }
- String *val_str(String *str) { return val_string_from_decimal(str); }
+ double val_real()
+ {
+ return VDec(this).to_double();
+ }
+ longlong val_int()
+ {
+ return VDec(this).to_longlong(unsigned_flag);
+ }
+ String *val_str(String *str)
+ {
+ return VDec(this).to_string_round(str, decimals);
+ }
my_decimal *val_decimal(my_decimal *);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_avg_field_decimal>(thd, this); }
@@ -1581,13 +1624,15 @@ public:
void clear();
bool add();
+ bool supports_removal() const;
+ void remove();
void reset_field() {};
void update_field() {};
void cleanup();
virtual void print(String *str, enum_query_type query_type);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
};
@@ -1685,9 +1730,18 @@ public:
Item_udf_sum(thd, udf_arg, list) {}
Item_sum_udf_decimal(THD *thd, Item_sum_udf_decimal *item)
:Item_udf_sum(thd, item) {}
- String *val_str(String *);
- double val_real();
- longlong val_int();
+ String *val_str(String *str)
+ {
+ return VDec(this).to_string_round(str, decimals);
+ }
+ double val_real()
+ {
+ return VDec(this).to_double();
+ }
+ longlong val_int()
+ {
+ return VDec(this).to_longlong(unsigned_flag);
+ }
my_decimal *val_decimal(my_decimal *);
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
bool fix_length_and_dec() { fix_num_length_and_dec(); return FALSE; }
@@ -1711,6 +1765,7 @@ class Item_sum_udf_float :public Item_sum_double
double val_real() { DBUG_ASSERT(fixed == 1); return 0.0; }
void clear() {}
bool add() { return 0; }
+ void reset_field() { DBUG_ASSERT(0); };
void update_field() {}
};
@@ -1729,6 +1784,7 @@ public:
double val_real() { DBUG_ASSERT(fixed == 1); return 0; }
void clear() {}
bool add() { return 0; }
+ void reset_field() { DBUG_ASSERT(0); };
void update_field() {}
};
@@ -1747,6 +1803,7 @@ class Item_sum_udf_decimal :public Item_sum_double
my_decimal *val_decimal(my_decimal *) { DBUG_ASSERT(fixed == 1); return 0; }
void clear() {}
bool add() { return 0; }
+ void reset_field() { DBUG_ASSERT(0); };
void update_field() {}
};
@@ -1768,6 +1825,7 @@ public:
enum Sumfunctype sum_func () const { return UDF_SUM_FUNC; }
void clear() {}
bool add() { return 0; }
+ void reset_field() { DBUG_ASSERT(0); };
void update_field() {}
};
@@ -1842,6 +1900,14 @@ class Item_func_group_concat : public Item_sum
bool repack_tree(THD *thd);
public:
+ // Methods used by ColumnStore
+ bool get_distinct() const { return distinct; }
+ uint get_count_field() const { return arg_count_field; }
+ uint get_order_field() const { return arg_count_order; }
+ const String* get_separator() const { return separator; }
+ ORDER** get_order() const { return order; }
+
+public:
Item_func_group_concat(THD *thd, Name_resolution_context *context_arg,
bool is_distinct, List<Item> *is_select,
const SQL_I_List<ORDER> &is_order, String *is_separator,
@@ -1890,9 +1956,9 @@ public:
{
return val_decimal_from_string(decimal_value);
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return get_date_from_string(ltime, fuzzydate);
+ return get_date_from_string(thd, ltime, fuzzydate);
}
String* val_str(String* str);
Item *copy_or_same(THD* thd);
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index c36b42c206a..7ef138b7f9a 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 2009, 2016, MariaDB
+ Copyright (c) 2009, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -59,6 +59,29 @@
/** Day number for Dec 31st, 9999. */
#define MAX_DAY_NUMBER 3652424L
+
+Func_handler_date_add_interval_datetime_arg0_time
+ func_handler_date_add_interval_datetime_arg0_time;
+
+Func_handler_date_add_interval_datetime func_handler_date_add_interval_datetime;
+Func_handler_date_add_interval_date func_handler_date_add_interval_date;
+Func_handler_date_add_interval_time func_handler_date_add_interval_time;
+Func_handler_date_add_interval_string func_handler_date_add_interval_string;
+
+Func_handler_add_time_datetime func_handler_add_time_datetime_add(1);
+Func_handler_add_time_datetime func_handler_add_time_datetime_sub(-1);
+Func_handler_add_time_time func_handler_add_time_time_add(1);
+Func_handler_add_time_time func_handler_add_time_time_sub(-1);
+Func_handler_add_time_string func_handler_add_time_string_add(1);
+Func_handler_add_time_string func_handler_add_time_string_sub(-1);
+
+Func_handler_str_to_date_datetime_sec func_handler_str_to_date_datetime_sec;
+Func_handler_str_to_date_datetime_usec func_handler_str_to_date_datetime_usec;
+Func_handler_str_to_date_date func_handler_str_to_date_date;
+Func_handler_str_to_date_time_sec func_handler_str_to_date_time_sec;
+Func_handler_str_to_date_time_usec func_handler_str_to_date_time_usec;
+
+
/*
Date formats corresponding to compound %r and %T conversion specifiers
@@ -103,12 +126,12 @@ static DATE_TIME_FORMAT time_24hrs_format= {{0}, '\0', 0,
1 error
*/
-static bool extract_date_time(DATE_TIME_FORMAT *format,
+static bool extract_date_time(THD *thd, DATE_TIME_FORMAT *format,
const char *val, uint length, MYSQL_TIME *l_time,
timestamp_type cached_timestamp_type,
const char **sub_pattern_end,
const char *date_time_type,
- ulonglong fuzzy_date)
+ date_conv_mode_t fuzzydate)
{
int weekday= 0, yearday= 0, daypart= 0;
int week_number= -1;
@@ -303,17 +326,17 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
We can't just set error here, as we don't want to generate two
warnings in case of errors
*/
- if (extract_date_time(&time_ampm_format, val,
+ if (extract_date_time(thd, &time_ampm_format, val,
(uint)(val_end - val), l_time,
- cached_timestamp_type, &val, "time", fuzzy_date))
+ cached_timestamp_type, &val, "time", fuzzydate))
DBUG_RETURN(1);
break;
/* Time in 24-hour notation */
case 'T':
- if (extract_date_time(&time_24hrs_format, val,
+ if (extract_date_time(thd, &time_24hrs_format, val,
(uint)(val_end - val), l_time,
- cached_timestamp_type, &val, "time", fuzzy_date))
+ cached_timestamp_type, &val, "time", fuzzydate))
DBUG_RETURN(1);
break;
@@ -419,7 +442,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
goto err;
int was_cut;
- if (check_date(l_time, fuzzy_date | TIME_INVALID_DATES, &was_cut))
+ if (check_date(l_time, fuzzydate | TIME_INVALID_DATES, &was_cut))
goto err;
if (val != val_end)
@@ -428,10 +451,10 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
{
if (!my_isspace(&my_charset_latin1,*val))
{
- make_truncated_value_warning(current_thd,
- Sql_condition::WARN_LEVEL_WARN,
- val_begin, length,
- cached_timestamp_type, NULL, NULL, NULL);
+ ErrConvString err(val_begin, length, &my_charset_bin);
+ make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ &err, cached_timestamp_type,
+ nullptr, nullptr, nullptr);
break;
}
} while (++val != val_end);
@@ -440,7 +463,6 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
err:
{
- THD *thd= current_thd;
char buff[128];
strmake(buff, val_begin, MY_MIN(length, sizeof(buff)-1));
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
@@ -711,7 +733,10 @@ static bool make_date_time(const LEX_CSTRING &format, MYSQL_TIME *l_time,
For example, '1.1' -> '1.100000'
*/
-static bool get_interval_info(const char *str, size_t length,CHARSET_INFO *cs, size_t count, ulonglong *values,
+#define MAX_DIGITS_IN_TIME_SPEC 20
+
+static bool get_interval_info(const char *str, size_t length,CHARSET_INFO *cs,
+ size_t count, ulonglong *values,
bool transform_msec)
{
const char *end=str+length;
@@ -723,11 +748,21 @@ static bool get_interval_info(const char *str, size_t length,CHARSET_INFO *cs, s
for (i=0 ; i < count ; i++)
{
- longlong value;
+ ulonglong value;
const char *start= str;
- for (value= 0; str != end && my_isdigit(cs, *str); str++)
+ const char *local_end= end;
+
+ /*
+ We limit things to 19 digits to not get an overflow. This is ok as
+ this function is meant to read up to microseconds
+ */
+ if ((local_end-str) > MAX_DIGITS_IN_TIME_SPEC)
+ local_end= str+ MAX_DIGITS_IN_TIME_SPEC;
+
+ for (value= 0; str != local_end && my_isdigit(cs, *str) ; str++)
value= value*10 + *str - '0';
- if ((field_length= (size_t)(str - start)) >= 20)
+
+ if ((field_length= (size_t)(str - start)) >= MAX_DIGITS_IN_TIME_SPEC)
return true;
values[i]= value;
while (str != end && !my_isdigit(cs,*str))
@@ -787,10 +822,9 @@ longlong Item_func_period_diff::val_int()
longlong Item_func_to_days::val_int()
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_arg0_date(&ltime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
- return 0;
- return (longlong) calc_daynr(ltime.year,ltime.month,ltime.day);
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd));
+ return (null_value= !d.is_valid_datetime()) ? 0 : d.daynr();
}
@@ -798,42 +832,31 @@ longlong Item_func_to_seconds::val_int_endpoint(bool left_endp,
bool *incl_endp)
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- longlong seconds;
- longlong days;
- int dummy; /* unused */
- if (get_arg0_date(&ltime, TIME_FUZZY_DATES))
+ // val_int_endpoint() is called only if args[0] is a temporal Item_field
+ Datetime_from_temporal dt(current_thd, args[0], TIME_FUZZY_DATES);
+ if ((null_value= !dt.is_valid_datetime()))
{
/* got NULL, leave the incl_endp intact */
return LONGLONG_MIN;
}
- seconds= ltime.hour * 3600L + ltime.minute * 60 + ltime.second;
- seconds= ltime.neg ? -seconds : seconds;
- days= (longlong) calc_daynr(ltime.year, ltime.month, ltime.day);
- seconds+= days * 24L * 3600L;
/* Set to NULL if invalid date, but keep the value */
- null_value= check_date(&ltime,
- (ltime.year || ltime.month || ltime.day),
- (TIME_NO_ZERO_IN_DATE | TIME_NO_ZERO_DATE),
- &dummy);
+ null_value= dt.check_date(TIME_NO_ZEROS);
/*
Even if the evaluation return NULL, seconds is useful for pruning
*/
- return seconds;
+ return dt.to_seconds();
}
longlong Item_func_to_seconds::val_int()
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- longlong seconds;
- longlong days;
- if (get_arg0_date(&ltime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
- return 0;
- seconds= ltime.hour * 3600L + ltime.minute * 60 + ltime.second;
- seconds=ltime.neg ? -seconds : seconds;
- days= (longlong) calc_daynr(ltime.year, ltime.month, ltime.day);
- return seconds + days * 24L * 3600L;
+ THD *thd= current_thd;
+ /*
+ Unlike val_int_endpoint(), we cannot use Datetime_from_temporal here.
+ The argument can be of a non-temporal data type.
+ */
+ Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd));
+ return (null_value= !dt.is_valid_datetime()) ? 0 : dt.to_seconds();
}
/*
@@ -877,19 +900,17 @@ enum_monotonicity_info Item_func_to_seconds::get_monotonicity_info() const
longlong Item_func_to_days::val_int_endpoint(bool left_endp, bool *incl_endp)
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
+ // val_int_endpoint() is only called if args[0] is a temporal Item_field
+ Datetime_from_temporal dt(current_thd, args[0], TIME_CONV_NONE);
longlong res;
- int dummy; /* unused */
- if (get_arg0_date(&ltime, 0))
+ if ((null_value= !dt.is_valid_datetime()))
{
/* got NULL, leave the incl_endp intact */
return LONGLONG_MIN;
}
- res=(longlong) calc_daynr(ltime.year,ltime.month,ltime.day);
+ res= (longlong) dt.daynr();
/* Set to NULL if invalid date, but keep the value */
- null_value= check_date(&ltime,
- (TIME_NO_ZERO_IN_DATE | TIME_NO_ZERO_DATE),
- &dummy);
+ null_value= dt.check_date(TIME_NO_ZEROS);
if (null_value)
{
/*
@@ -918,8 +939,8 @@ longlong Item_func_to_days::val_int_endpoint(bool left_endp, bool *incl_endp)
col < '2007-09-15 12:34:56' -> TO_DAYS(col) <= TO_DAYS('2007-09-15')
*/
- if ((!left_endp && !(ltime.hour || ltime.minute || ltime.second ||
- ltime.second_part)) ||
+ const MYSQL_TIME &ltime= dt.get_mysql_time()[0];
+ if ((!left_endp && dt.hhmmssff_is_zero()) ||
(left_endp && ltime.hour == 23 && ltime.minute == 59 &&
ltime.second == 59))
/* do nothing */
@@ -933,25 +954,25 @@ longlong Item_func_to_days::val_int_endpoint(bool left_endp, bool *incl_endp)
longlong Item_func_dayofyear::val_int()
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_arg0_date(&ltime, TIME_NO_ZERO_IN_DATE | TIME_NO_ZERO_DATE))
- return 0;
- return (longlong) calc_daynr(ltime.year,ltime.month,ltime.day) -
- calc_daynr(ltime.year,1,1) + 1;
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd));
+ return (null_value= !d.is_valid_datetime()) ? 0 : d.dayofyear();
}
longlong Item_func_dayofmonth::val_int()
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- return get_arg0_date(&ltime, 0) ? 0 : (longlong) ltime.day;
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd));
+ return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->day;
}
longlong Item_func_month::val_int()
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- return get_arg0_date(&ltime, 0) ? 0 : (longlong) ltime.month;
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd));
+ return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->month;
}
@@ -973,12 +994,12 @@ String* Item_func_monthname::val_str(String* str)
DBUG_ASSERT(fixed == 1);
const char *month_name;
uint err;
- MYSQL_TIME ltime;
-
- if ((null_value= (get_arg0_date(&ltime, 0) || !ltime.month)))
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd));
+ if ((null_value= (!d.is_valid_datetime() || !d.get_mysql_time()->month)))
return (String *) 0;
- month_name= locale->month_names->type_names[ltime.month - 1];
+ month_name= locale->month_names->type_names[d.get_mysql_time()->month - 1];
str->copy(month_name, (uint) strlen(month_name), &my_charset_utf8_bin,
collation.collation, &err);
return str;
@@ -992,23 +1013,24 @@ String* Item_func_monthname::val_str(String* str)
longlong Item_func_quarter::val_int()
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_arg0_date(&ltime, 0))
- return 0;
- return (longlong) ((ltime.month+2)/3);
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd));
+ return (null_value= !d.is_valid_datetime()) ? 0 : d.quarter();
}
longlong Item_func_hour::val_int()
{
DBUG_ASSERT(fixed == 1);
- Time tm(args[0], Time::Options_for_cast());
+ THD *thd= current_thd;
+ Time tm(thd, args[0], Time::Options_for_cast(thd));
return (null_value= !tm.is_valid_time()) ? 0 : tm.get_mysql_time()->hour;
}
longlong Item_func_minute::val_int()
{
DBUG_ASSERT(fixed == 1);
- Time tm(args[0], Time::Options_for_cast());
+ THD *thd= current_thd;
+ Time tm(thd, args[0], Time::Options_for_cast(thd));
return (null_value= !tm.is_valid_time()) ? 0 : tm.get_mysql_time()->minute;
}
@@ -1018,7 +1040,8 @@ longlong Item_func_minute::val_int()
longlong Item_func_second::val_int()
{
DBUG_ASSERT(fixed == 1);
- Time tm(args[0], Time::Options_for_cast());
+ THD *thd= current_thd;
+ Time tm(thd, args[0], Time::Options_for_cast(thd));
return (null_value= !tm.is_valid_time()) ? 0 : tm.get_mysql_time()->second;
}
@@ -1065,36 +1088,34 @@ uint week_mode(uint mode)
longlong Item_func_week::val_int()
{
DBUG_ASSERT(fixed == 1);
- uint year, week_format;
- MYSQL_TIME ltime;
- if (get_arg0_date(&ltime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
+ uint week_format;
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd));
+ if ((null_value= !d.is_valid_datetime()))
return 0;
if (arg_count > 1)
week_format= (uint)args[1]->val_int();
else
- week_format= current_thd->variables.default_week_format;
- return (longlong) calc_week(&ltime, week_mode(week_format), &year);
+ week_format= thd->variables.default_week_format;
+ return d.week(week_mode(week_format));
}
longlong Item_func_yearweek::val_int()
{
DBUG_ASSERT(fixed == 1);
- uint year,week;
- MYSQL_TIME ltime;
- if (get_arg0_date(&ltime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
- return 0;
- week= calc_week(&ltime,
- (week_mode((uint) args[1]->val_int()) | WEEK_YEAR),
- &year);
- return week+year*100;
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd));
+ return (null_value= !d.is_valid_datetime()) ? 0 :
+ d.yearweek((week_mode((uint) args[1]->val_int()) | WEEK_YEAR));
}
longlong Item_func_weekday::val_int()
{
DBUG_ASSERT(fixed == 1);
- Datetime dt(current_thd, args[0], TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE);
+ THD *thd= current_thd;
+ Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd));
if ((null_value= !dt.is_valid_datetime()))
return 0;
return dt.weekday(odbc_type) + MY_TEST(odbc_type);
@@ -1118,11 +1139,12 @@ String* Item_func_dayname::val_str(String* str)
DBUG_ASSERT(fixed == 1);
const char *day_name;
uint err;
- Datetime dt(current_thd, args[0], TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE);
+ THD *thd= current_thd;
+ Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd));
if ((null_value= !dt.is_valid_datetime()))
return (String*) 0;
-
+
day_name= locale->day_names->type_names[dt.weekday(false)];
str->copy(day_name, (uint) strlen(day_name), &my_charset_utf8_bin,
collation.collation, &err);
@@ -1133,8 +1155,9 @@ String* Item_func_dayname::val_str(String* str)
longlong Item_func_year::val_int()
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- return get_arg0_date(&ltime, 0) ? 0 : (longlong) ltime.year;
+ THD *thd= current_thd;
+ Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd));
+ return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->year;
}
@@ -1165,8 +1188,9 @@ enum_monotonicity_info Item_func_year::get_monotonicity_info() const
longlong Item_func_year::val_int_endpoint(bool left_endp, bool *incl_endp)
{
DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
- if (get_arg0_date(&ltime, 0))
+ // val_int_endpoint() is cally only if args[0] is a temporal Item_field
+ Datetime_from_temporal dt(current_thd, args[0], TIME_CONV_NONE);
+ if ((null_value= !dt.is_valid_datetime()))
{
/* got NULL, leave the incl_endp intact */
return LONGLONG_MIN;
@@ -1183,8 +1207,9 @@ longlong Item_func_year::val_int_endpoint(bool left_endp, bool *incl_endp)
col < '2007-09-15 23:00:00' -> YEAR(col) <= 2007
*/
+ const MYSQL_TIME &ltime= dt.get_mysql_time()[0];
if (!left_endp && ltime.day == 1 && ltime.month == 1 &&
- !(ltime.hour || ltime.minute || ltime.second || ltime.second_part))
+ dt.hhmmssff_is_zero())
; /* do nothing */
else
*incl_endp= TRUE;
@@ -1208,14 +1233,13 @@ bool Item_func_unix_timestamp::get_timestamp_value(my_time_t *seconds,
}
}
- MYSQL_TIME ltime;
- if (get_arg0_date(&ltime, TIME_NO_ZERO_IN_DATE))
- return 1;
-
- uint error_code;
- *seconds= TIME_to_timestamp(current_thd, &ltime, &error_code);
- *second_part= ltime.second_part;
- return (null_value= (error_code == ER_WARN_DATA_OUT_OF_RANGE));
+ Timestamp_or_zero_datetime_native_null native(current_thd, args[0], true);
+ if ((null_value= native.is_null() || native.is_zero_datetime()))
+ return true;
+ Timestamp tm(native);
+ *seconds= tm.tv().tv_sec;
+ *second_part= tm.tv().tv_usec;
+ return false;
}
@@ -1272,7 +1296,8 @@ longlong Item_func_unix_timestamp::val_int_endpoint(bool left_endp, bool *incl_e
longlong Item_func_time_to_sec::int_op()
{
DBUG_ASSERT(fixed == 1);
- Time tm(args[0], Time::Options_for_cast());
+ THD *thd= current_thd;
+ Time tm(thd, args[0], Time::Options_for_cast(thd));
return ((null_value= !tm.is_valid_time())) ? 0 : tm.to_seconds();
}
@@ -1280,7 +1305,8 @@ longlong Item_func_time_to_sec::int_op()
my_decimal *Item_func_time_to_sec::decimal_op(my_decimal* buf)
{
DBUG_ASSERT(fixed == 1);
- Time tm(args[0], Time::Options_for_cast());
+ THD *thd= current_thd;
+ Time tm(thd, args[0], Time::Options_for_cast(thd));
if ((null_value= !tm.is_valid_time()))
return 0;
const MYSQL_TIME *ltime= tm.get_mysql_time();
@@ -1295,7 +1321,8 @@ my_decimal *Item_func_time_to_sec::decimal_op(my_decimal* buf)
To make code easy, allow interval objects without separators.
*/
-bool get_interval_value(Item *args,interval_type int_type, INTERVAL *interval)
+bool get_interval_value(THD *thd, Item *args,
+ interval_type int_type, INTERVAL *interval)
{
ulonglong array[5];
longlong UNINIT_VAR(value);
@@ -1308,25 +1335,19 @@ bool get_interval_value(Item *args,interval_type int_type, INTERVAL *interval)
bzero((char*) interval,sizeof(*interval));
if (int_type == INTERVAL_SECOND && args->decimals)
{
- my_decimal decimal_value, *val;
- ulonglong second;
- ulong second_part;
- if (!(val= args->val_decimal(&decimal_value)))
+ VDec val(args);
+ if (val.is_null())
return true;
- interval->neg= my_decimal2seconds(val, &second, &second_part);
- if (second == LONGLONG_MAX)
+ Sec6 d(val.ptr());
+ interval->neg= d.neg();
+ if (d.sec() >= LONGLONG_MAX)
{
- THD *thd= current_thd;
- ErrConvDecimal err(val);
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
- ER_TRUNCATED_WRONG_VALUE,
- ER_THD(thd, ER_TRUNCATED_WRONG_VALUE), "DECIMAL",
- err.ptr());
+ ErrConvDecimal err(val.ptr());
+ thd->push_warning_truncated_wrong_value("seconds", err.ptr());
return true;
}
-
- interval->second= second;
- interval->second_part= second_part;
+ interval->second= d.sec();
+ interval->second_part= d.usec();
return false;
}
else if ((int) int_type <= INTERVAL_MICROSECOND)
@@ -1472,90 +1493,11 @@ bool get_interval_value(Item *args,interval_type int_type, INTERVAL *interval)
}
-String *Item_temporal_func::val_str(String *str)
-{
- DBUG_ASSERT(fixed == 1);
- return val_string_from_date(str);
-}
-
-
-bool Item_temporal_hybrid_func::fix_temporal_type(MYSQL_TIME *ltime)
-{
- if (ltime->time_type < 0) /* MYSQL_TIMESTAMP_NONE, MYSQL_TIMESTAMP_ERROR */
- return false;
-
- if (ltime->time_type != MYSQL_TIMESTAMP_TIME)
- goto date_or_datetime_value;
-
- /* Convert TIME to DATE or DATETIME */
- switch (field_type())
- {
- case MYSQL_TYPE_DATE:
- case MYSQL_TYPE_DATETIME:
- case MYSQL_TYPE_TIMESTAMP:
- {
- MYSQL_TIME tmp;
- if (time_to_datetime_with_warn(current_thd, ltime, &tmp, 0))
- return (null_value= true);
- *ltime= tmp;
- if (field_type() == MYSQL_TYPE_DATE)
- datetime_to_date(ltime);
- return false;
- }
- case MYSQL_TYPE_TIME:
- case MYSQL_TYPE_STRING: /* DATE_ADD, ADDTIME can return VARCHAR */
- return false;
- default:
- DBUG_ASSERT(0);
- return (null_value= true);
- }
-
-date_or_datetime_value:
- /* Convert DATE or DATETIME to TIME, DATE, or DATETIME */
- switch (field_type())
- {
- case MYSQL_TYPE_TIME:
- datetime_to_time(ltime);
- return false;
- case MYSQL_TYPE_DATETIME:
- case MYSQL_TYPE_TIMESTAMP:
- date_to_datetime(ltime);
- return false;
- case MYSQL_TYPE_DATE:
- datetime_to_date(ltime);
- return false;
- case MYSQL_TYPE_STRING: /* DATE_ADD, ADDTIME can return VARCHAR */
- return false;
- default:
- DBUG_ASSERT(0);
- return (null_value= true);
- }
- return false;
-}
-
-
-String *Item_temporal_hybrid_func::val_str_ascii(String *str)
-{
- DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
-
- if (get_date(&ltime, 0) || fix_temporal_type(&ltime) ||
- (null_value= my_TIME_to_str(&ltime, str, decimals)))
- return (String *) 0;
-
- /* Check that the returned timestamp type matches to the function type */
- DBUG_ASSERT(field_type() == MYSQL_TYPE_STRING ||
- ltime.time_type == MYSQL_TIMESTAMP_NONE ||
- ltime.time_type == mysql_timestamp_type());
- return str;
-}
-
-
-bool Item_func_from_days::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_from_days::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
longlong value=args[0]->val_int();
if ((null_value= (args[0]->null_value ||
- ((fuzzy_date & TIME_NO_ZERO_DATE) && value == 0))))
+ ((fuzzydate & TIME_NO_ZERO_DATE) && value == 0))))
return true;
bzero(ltime, sizeof(MYSQL_TIME));
if (get_date_from_daynr((long) value, &ltime->year, &ltime->month,
@@ -1592,10 +1534,9 @@ void Item_func_curdate_utc::store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)
}
-bool Item_func_curdate::get_date(MYSQL_TIME *res,
- ulonglong fuzzy_date __attribute__((unused)))
+bool Item_func_curdate::get_date(THD *thd, MYSQL_TIME *res,
+ date_mode_t fuzzydate __attribute__((unused)))
{
- THD *thd= current_thd;
query_id_t query_id= thd->query_id;
/* Cache value for this query */
if (last_query_id != query_id)
@@ -1622,10 +1563,9 @@ bool Item_func_curtime::fix_fields(THD *thd, Item **items)
return Item_timefunc::fix_fields(thd, items);
}
-bool Item_func_curtime::get_date(MYSQL_TIME *res,
- ulonglong fuzzy_date __attribute__((unused)))
+bool Item_func_curtime::get_date(THD *thd, MYSQL_TIME *res,
+ date_mode_t fuzzydate __attribute__((unused)))
{
- THD *thd= current_thd;
query_id_t query_id= thd->query_id;
/* Cache value for this query */
if (last_query_id != query_id)
@@ -1654,7 +1594,7 @@ static void set_sec_part(ulong sec_part, MYSQL_TIME *ltime, Item *item)
{
ltime->second_part= sec_part;
if (item->decimals < TIME_SECOND_PART_DIGITS)
- my_time_trunc(ltime, item->decimals);
+ my_datetime_trunc(ltime, item->decimals);
}
}
@@ -1696,7 +1636,7 @@ bool Item_func_now::fix_fields(THD *thd, Item **items)
func_name(), TIME_SECOND_PART_DIGITS);
return 1;
}
- return Item_temporal_func::fix_fields(thd, items);
+ return Item_datetimefunc::fix_fields(thd, items);
}
void Item_func_now::print(String *str, enum_query_type query_type)
@@ -1715,15 +1655,14 @@ int Item_func_now_local::save_in_field(Field *field, bool no_conversions)
{
THD *thd= field->get_thd();
my_time_t ts= thd->query_start();
- uint dec= MY_MIN(decimals, field->decimals());
- ulong sec_part= dec ? thd->query_start_sec_part() : 0;
- sec_part-= my_time_fraction_remainder(sec_part, dec);
+ ulong sec_part= decimals ? thd->query_start_sec_part() : 0;
+ sec_part-= my_time_fraction_remainder(sec_part, decimals);
field->set_notnull();
((Field_timestamp*)field)->store_TIME(ts, sec_part);
return 0;
}
else
- return Item_temporal_func::save_in_field(field, no_conversions);
+ return Item_datetimefunc::save_in_field(field, no_conversions);
}
@@ -1754,10 +1693,9 @@ void Item_func_now_utc::store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)
}
-bool Item_func_now::get_date(MYSQL_TIME *res,
- ulonglong fuzzy_date __attribute__((unused)))
+bool Item_func_now::get_date(THD *thd, MYSQL_TIME *res,
+ date_mode_t fuzzydate __attribute__((unused)))
{
- THD *thd= current_thd;
query_id_t query_id= thd->query_id;
/* Cache value for this query */
if (last_query_id != query_id)
@@ -1783,62 +1721,23 @@ void Item_func_sysdate_local::store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)
}
-bool Item_func_sysdate_local::get_date(MYSQL_TIME *res,
- ulonglong fuzzy_date __attribute__((unused)))
+bool Item_func_sysdate_local::get_date(THD *thd, MYSQL_TIME *res,
+ date_mode_t fuzzydate __attribute__((unused)))
{
- store_now_in_TIME(current_thd, res);
+ store_now_in_TIME(thd, res);
return 0;
}
-bool Item_func_sec_to_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_sec_to_time::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
- bool sign;
- ulonglong sec;
- ulong sec_part;
-
- bzero((char *)ltime, sizeof(*ltime));
- ltime->time_type= MYSQL_TIMESTAMP_TIME;
-
- sign= args[0]->get_seconds(&sec, &sec_part);
-
- if ((null_value= args[0]->null_value))
- return 1;
-
- ltime->neg= sign;
- if (sec > TIME_MAX_VALUE_SECONDS)
- goto overflow;
-
- DBUG_ASSERT(sec_part <= TIME_MAX_SECOND_PART);
-
- ltime->hour= (uint) (sec/3600);
- ltime->minute= (uint) (sec % 3600) /60;
- ltime->second= (uint) sec % 60;
- ltime->second_part= sec_part;
-
- return 0;
-
-overflow:
- /* use check_time_range() to set ltime to the max value depending on dec */
- int unused;
- char buf[100];
- String tmp(buf, sizeof(buf), &my_charset_bin), *err= args[0]->val_str(&tmp);
-
- ltime->hour= TIME_MAX_HOUR+1;
- check_time_range(ltime, decimals, &unused);
- if (!err)
- {
- ErrConvInteger err2(sec, unsigned_flag);
- make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
- &err2, MYSQL_TIMESTAMP_TIME, NULL, NULL, NULL);
- }
- else
- {
- ErrConvString err2(err);
- make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
- &err2, MYSQL_TIMESTAMP_TIME, NULL, NULL, NULL);
- }
- return 0;
+ VSec9 sec(thd, args[0], "seconds", LONGLONG_MAX);
+ if ((null_value= sec.is_null()))
+ return true;
+ sec.round(decimals, thd->temporal_round_mode());
+ if (sec.sec_to_time(ltime, decimals) && !sec.truncated())
+ sec.make_truncated_warning(thd, "seconds");
+ return false;
}
bool Item_func_date_format::fix_length_and_dec()
@@ -1994,8 +1893,10 @@ String *Item_func_date_format::val_str(String *str)
uint size;
const MY_LOCALE *lc= 0;
DBUG_ASSERT(fixed == 1);
-
- if ((null_value= args[0]->get_date(&l_time, is_time_format ? TIME_TIME_ONLY : 0)))
+ date_conv_mode_t mode= is_time_format ? TIME_TIME_ONLY : TIME_CONV_NONE;
+ THD *thd= current_thd;
+ if ((null_value= args[0]->get_date(thd, &l_time,
+ Temporal::Options(mode, thd))))
return 0;
if (!(format= args[1]->val_str(&format_buffer)) || !format->length())
@@ -2041,35 +1942,34 @@ bool Item_func_from_unixtime::fix_length_and_dec()
}
-bool Item_func_from_unixtime::get_date(MYSQL_TIME *ltime,
- ulonglong fuzzy_date __attribute__((unused)))
+bool Item_func_from_unixtime::get_date(THD *thd, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate __attribute__((unused)))
{
- bool sign;
- ulonglong sec;
- ulong sec_part;
-
bzero((char *)ltime, sizeof(*ltime));
ltime->time_type= MYSQL_TIMESTAMP_TIME;
- sign= args[0]->get_seconds(&sec, &sec_part);
+ VSec9 sec(thd, args[0], "unixtime", TIMESTAMP_MAX_VALUE);
+ DBUG_ASSERT(sec.is_null() || sec.sec() <= TIMESTAMP_MAX_VALUE);
- if (args[0]->null_value || sign || sec > TIMESTAMP_MAX_VALUE)
+ if (sec.is_null() || sec.truncated() || sec.neg())
return (null_value= 1);
- tz->gmt_sec_to_TIME(ltime, (my_time_t)sec);
+ sec.round(MY_MIN(decimals, TIME_SECOND_PART_DIGITS), thd->temporal_round_mode());
+ if (sec.sec() > TIMESTAMP_MAX_VALUE)
+ return (null_value= true); // Went out of range after rounding
- ltime->second_part= sec_part;
+ tz->gmt_sec_to_TIME(ltime, (my_time_t) sec.sec());
+ ltime->second_part= sec.usec();
return (null_value= 0);
}
-bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime,
- ulonglong fuzzy_date __attribute__((unused)))
+bool Item_func_convert_tz::get_date(THD *thd, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate __attribute__((unused)))
{
my_time_t my_time_tmp;
String str;
- THD *thd= current_thd;
if (!from_tz_cached)
{
@@ -2083,9 +1983,13 @@ bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime,
to_tz_cached= args[2]->const_item();
}
- if (from_tz==0 || to_tz==0 ||
- get_arg0_date(ltime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
- return (null_value= 1);
+ if ((null_value= (from_tz == 0 || to_tz == 0)))
+ return true;
+
+ Datetime::Options opt(TIME_NO_ZEROS, thd);
+ Datetime *dt= new(ltime) Datetime(thd, args[0], opt);
+ if ((null_value= !dt->is_valid_datetime()))
+ return true;
{
uint not_used;
@@ -2105,7 +2009,7 @@ bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime,
void Item_func_convert_tz::cleanup()
{
from_tz_cached= to_tz_cached= 0;
- Item_temporal_func::cleanup();
+ Item_datetimefunc::cleanup();
}
@@ -2136,89 +2040,52 @@ bool Item_date_add_interval::fix_length_and_dec()
MYSQL_TIME or DATETIME argument)
*/
arg0_field_type= args[0]->field_type();
- uint interval_dec= 0;
- if (int_type == INTERVAL_MICROSECOND ||
- (int_type >= INTERVAL_DAY_MICROSECOND &&
- int_type <= INTERVAL_SECOND_MICROSECOND))
- interval_dec= TIME_SECOND_PART_DIGITS;
- else if (int_type == INTERVAL_SECOND && args[1]->decimals > 0)
- interval_dec= MY_MIN(args[1]->decimals, TIME_SECOND_PART_DIGITS);
if (arg0_field_type == MYSQL_TYPE_DATETIME ||
arg0_field_type == MYSQL_TYPE_TIMESTAMP)
{
- uint dec= MY_MAX(args[0]->datetime_precision(), interval_dec);
- set_handler(&type_handler_datetime);
- fix_attributes_datetime(dec);
+ set_func_handler(&func_handler_date_add_interval_datetime);
}
else if (arg0_field_type == MYSQL_TYPE_DATE)
{
if (int_type <= INTERVAL_DAY || int_type == INTERVAL_YEAR_MONTH)
- {
- set_handler(&type_handler_newdate);
- fix_attributes_date();
- }
+ set_func_handler(&func_handler_date_add_interval_date);
else
- {
- set_handler(&type_handler_datetime2);
- fix_attributes_datetime(interval_dec);
- }
+ set_func_handler(&func_handler_date_add_interval_datetime);
}
else if (arg0_field_type == MYSQL_TYPE_TIME)
{
- uint dec= MY_MAX(args[0]->time_precision(), interval_dec);
if (int_type >= INTERVAL_DAY && int_type != INTERVAL_YEAR_MONTH)
- {
- set_handler(&type_handler_time2);
- fix_attributes_time(dec);
- }
+ set_func_handler(&func_handler_date_add_interval_time);
else
- {
- set_handler(&type_handler_datetime2);
- fix_attributes_datetime(dec);
- }
+ set_func_handler(&func_handler_date_add_interval_datetime_arg0_time);
}
else
{
- uint dec= MY_MAX(args[0]->datetime_precision(), interval_dec);
- set_handler(&type_handler_string);
- collation.set(default_charset(), DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII);
- fix_char_length_temporal_not_fixed_dec(MAX_DATETIME_WIDTH, dec);
+ set_func_handler(&func_handler_date_add_interval_string);
}
maybe_null= true;
- return FALSE;
+ return m_func_handler->fix_length_and_dec(this);
}
-bool Item_date_add_interval::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Func_handler_date_add_interval_datetime_arg0_time::
+ get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
{
- INTERVAL interval;
-
- if (args[0]->get_date(ltime,
- field_type() == MYSQL_TYPE_TIME ?
- TIME_TIME_ONLY : 0) ||
- get_interval_value(args[1], int_type, &interval))
- return (null_value=1);
-
- if (ltime->time_type != MYSQL_TIMESTAMP_TIME &&
- check_date_with_warn(ltime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE,
- MYSQL_TIMESTAMP_ERROR))
- return (null_value=1);
-
- if (date_sub_interval)
- interval.neg = !interval.neg;
-
- if (date_add_interval(ltime, int_type, interval))
- return (null_value=1);
- return (null_value= 0);
+ // time_expr + INTERVAL {YEAR|QUARTER|MONTH|WEEK|YEAR_MONTH}
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_DATETIME_FUNCTION_OVERFLOW,
+ ER_THD(thd, ER_DATETIME_FUNCTION_OVERFLOW), "time");
+ return (item->null_value= true);
}
bool Item_date_add_interval::eq(const Item *item, bool binary_cmp) const
{
- Item_date_add_interval *other= (Item_date_add_interval*) item;
if (!Item_func::eq(item, binary_cmp))
return 0;
+ Item_date_add_interval *other= (Item_date_add_interval*) item;
return ((int_type == other->int_type) &&
(date_sub_interval == other->date_sub_interval));
}
@@ -2260,16 +2127,18 @@ void Item_extract::print(String *str, enum_query_type query_type)
bool Item_extract::fix_length_and_dec()
{
maybe_null=1; // If wrong date
+ uint32 daylen= args[0]->cmp_type() == TIME_RESULT ? 2 :
+ TIME_MAX_INTERVAL_DAY_CHAR_LENGTH;
switch (int_type) {
case INTERVAL_YEAR: set_date_length(4); break; // YYYY
case INTERVAL_YEAR_MONTH: set_date_length(6); break; // YYYYMM
case INTERVAL_QUARTER: set_date_length(2); break; // 1..4
case INTERVAL_MONTH: set_date_length(2); break; // MM
case INTERVAL_WEEK: set_date_length(2); break; // 0..52
- case INTERVAL_DAY: set_date_length(2); break; // DD
- case INTERVAL_DAY_HOUR: set_time_length(4); break; // DDhh
- case INTERVAL_DAY_MINUTE: set_time_length(6); break; // DDhhmm
- case INTERVAL_DAY_SECOND: set_time_length(8); break; // DDhhmmss
+ case INTERVAL_DAY: set_day_length(daylen); break; // DD
+ case INTERVAL_DAY_HOUR: set_day_length(daylen+2); break; // DDhh
+ case INTERVAL_DAY_MINUTE: set_day_length(daylen+4); break; // DDhhmm
+ case INTERVAL_DAY_SECOND: set_day_length(daylen+6); break; // DDhhmmss
case INTERVAL_HOUR: set_time_length(2); break; // hh
case INTERVAL_HOUR_MINUTE: set_time_length(4); break; // hhmm
case INTERVAL_HOUR_SECOND: set_time_length(6); break; // hhmmss
@@ -2277,7 +2146,7 @@ bool Item_extract::fix_length_and_dec()
case INTERVAL_MINUTE_SECOND: set_time_length(4); break; // mmss
case INTERVAL_SECOND: set_time_length(2); break; // ss
case INTERVAL_MICROSECOND: set_time_length(6); break; // ffffff
- case INTERVAL_DAY_MICROSECOND: set_time_length(14); break; // DDhhmmssffffff
+ case INTERVAL_DAY_MICROSECOND: set_time_length(daylen+12); break; // DDhhmmssffffff
case INTERVAL_HOUR_MICROSECOND: set_time_length(12); break; // hhmmssffffff
case INTERVAL_MINUTE_MICROSECOND: set_time_length(10); break; // mmssffffff
case INTERVAL_SECOND_MICROSECOND: set_time_length(8); break; // ssffffff
@@ -2287,69 +2156,46 @@ bool Item_extract::fix_length_and_dec()
}
-longlong Item_extract::val_int()
+uint Extract_source::week(THD *thd) const
{
- DBUG_ASSERT(fixed == 1);
- MYSQL_TIME ltime;
+ DBUG_ASSERT(is_valid_extract_source());
uint year;
- ulong week_format;
- long neg;
- int is_time_flag = date_value ? 0 : TIME_TIME_ONLY;
-
- // Not using get_arg0_date to avoid automatic TIME to DATETIME conversion
- if ((null_value= args[0]->get_date(&ltime, is_time_flag)))
- return 0;
-
- neg= ltime.neg ? -1 : 1;
+ ulong week_format= current_thd->variables.default_week_format;
+ return calc_week(this, week_mode(week_format), &year);
+}
- DBUG_ASSERT(ltime.time_type != MYSQL_TIMESTAMP_TIME || ltime.day == 0);
- if (ltime.time_type == MYSQL_TIMESTAMP_TIME)
- time_to_daytime_interval(&ltime);
+longlong Item_extract::val_int()
+{
+ DBUG_ASSERT(fixed == 1);
+ THD *thd= current_thd;
+ Extract_source dt(thd, args[0], m_date_mode);
+ if ((null_value= !dt.is_valid_extract_source()))
+ return 0;
switch (int_type) {
- case INTERVAL_YEAR: return ltime.year;
- case INTERVAL_YEAR_MONTH: return ltime.year*100L+ltime.month;
- case INTERVAL_QUARTER: return (ltime.month+2)/3;
- case INTERVAL_MONTH: return ltime.month;
- case INTERVAL_WEEK:
- {
- week_format= current_thd->variables.default_week_format;
- return calc_week(&ltime, week_mode(week_format), &year);
- }
- case INTERVAL_DAY: return ltime.day;
- case INTERVAL_DAY_HOUR: return (long) (ltime.day*100L+ltime.hour)*neg;
- case INTERVAL_DAY_MINUTE: return (long) (ltime.day*10000L+
- ltime.hour*100L+
- ltime.minute)*neg;
- case INTERVAL_DAY_SECOND: return ((longlong) ltime.day*1000000L+
- (longlong) (ltime.hour*10000L+
- ltime.minute*100+
- ltime.second))*neg;
- case INTERVAL_HOUR: return (long) ltime.hour*neg;
- case INTERVAL_HOUR_MINUTE: return (long) (ltime.hour*100+ltime.minute)*neg;
- case INTERVAL_HOUR_SECOND: return (long) (ltime.hour*10000+ltime.minute*100+
- ltime.second)*neg;
- case INTERVAL_MINUTE: return (long) ltime.minute*neg;
- case INTERVAL_MINUTE_SECOND: return (long) (ltime.minute*100+ltime.second)*neg;
- case INTERVAL_SECOND: return (long) ltime.second*neg;
- case INTERVAL_MICROSECOND: return (long) ltime.second_part*neg;
- case INTERVAL_DAY_MICROSECOND: return (((longlong)ltime.day*1000000L +
- (longlong)ltime.hour*10000L +
- ltime.minute*100 +
- ltime.second)*1000000L +
- ltime.second_part)*neg;
- case INTERVAL_HOUR_MICROSECOND: return (((longlong)ltime.hour*10000L +
- ltime.minute*100 +
- ltime.second)*1000000L +
- ltime.second_part)*neg;
- case INTERVAL_MINUTE_MICROSECOND: return (((longlong)(ltime.minute*100+
- ltime.second))*1000000L+
- ltime.second_part)*neg;
- case INTERVAL_SECOND_MICROSECOND: return ((longlong)ltime.second*1000000L+
- ltime.second_part)*neg;
+ case INTERVAL_YEAR: return dt.year();
+ case INTERVAL_YEAR_MONTH: return dt.year_month();
+ case INTERVAL_QUARTER: return dt.quarter();
+ case INTERVAL_MONTH: return dt.month();
+ case INTERVAL_WEEK: return dt.week(thd);
+ case INTERVAL_DAY: return dt.day();
+ case INTERVAL_DAY_HOUR: return dt.day_hour();
+ case INTERVAL_DAY_MINUTE: return dt.day_minute();
+ case INTERVAL_DAY_SECOND: return dt.day_second();
+ case INTERVAL_HOUR: return dt.hour();
+ case INTERVAL_HOUR_MINUTE: return dt.hour_minute();
+ case INTERVAL_HOUR_SECOND: return dt.hour_second();
+ case INTERVAL_MINUTE: return dt.minute();
+ case INTERVAL_MINUTE_SECOND: return dt.minute_second();
+ case INTERVAL_SECOND: return dt.second();
+ case INTERVAL_MICROSECOND: return dt.microsecond();
+ case INTERVAL_DAY_MICROSECOND: return dt.day_microsecond();
+ case INTERVAL_HOUR_MICROSECOND: return dt.hour_microsecond();
+ case INTERVAL_MINUTE_MICROSECOND: return dt.minute_microsecond();
+ case INTERVAL_SECOND_MICROSECOND: return dt.second_microsecond();
case INTERVAL_LAST: DBUG_ASSERT(0); break; /* purecov: deadcode */
}
- return 0; // Impossible
+ return 0; // Impossible
}
bool Item_extract::eq(const Item *item, bool binary_cmp) const
@@ -2388,13 +2234,14 @@ bool Item_char_typecast::eq(const Item *item, bool binary_cmp) const
return 1;
}
-void Item_temporal_typecast::print(String *str, enum_query_type query_type)
+void Item_func::print_cast_temporal(String *str, enum_query_type query_type)
{
char buf[32];
str->append(STRING_WITH_LEN("cast("));
args[0]->print(str, query_type);
str->append(STRING_WITH_LEN(" as "));
- str->append(cast_type());
+ const Name name= type_handler()->name();
+ str->append(name.ptr(), name.length());
if (decimals && decimals != NOT_FIXED_DEC)
{
str->append('(');
@@ -2607,45 +2454,47 @@ void Item_char_typecast::fix_length_and_dec_internal(CHARSET_INFO *from_cs)
}
-bool Item_time_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_time_typecast::get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
{
- Time tm(args[0], Time::Options_for_cast());
- if ((null_value= !tm.is_valid_time()))
- return true;
- tm.copy_to_mysql_time(ltime);
- if (decimals < TIME_SECOND_PART_DIGITS)
- my_time_trunc(ltime, decimals);
- return (fuzzy_date & TIME_TIME_ONLY) ? 0 :
- (null_value= check_date_with_warn(ltime, fuzzy_date,
- MYSQL_TIMESTAMP_ERROR));
+ Time *tm= new(to) Time(thd, args[0], Time::Options_for_cast(mode, thd),
+ MY_MIN(decimals, TIME_SECOND_PART_DIGITS));
+ return (null_value= !tm->is_valid_time());
}
-bool Item_date_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+Sql_mode_dependency Item_time_typecast::value_depends_on_sql_mode() const
{
- fuzzy_date |= sql_mode_for_dates(current_thd);
- if (get_arg0_date(ltime, fuzzy_date & ~TIME_TIME_ONLY))
- return 1;
+ return Item_timefunc::value_depends_on_sql_mode() |
+ Sql_mode_dependency(decimals < args[0]->decimals ?
+ MODE_TIME_ROUND_FRACTIONAL : 0, 0);
+}
- if (make_date_with_warn(ltime, fuzzy_date, MYSQL_TIMESTAMP_DATE))
- return (null_value= 1);
- return 0;
+bool Item_date_typecast::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+{
+ date_mode_t tmp= (fuzzydate | sql_mode_for_dates(thd)) & ~TIME_TIME_ONLY;
+ // Force truncation
+ Date *d= new(ltime) Date(thd, args[0], Date::Options(date_conv_mode_t(tmp)));
+ return (null_value= !d->is_valid_date());
}
-bool Item_datetime_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_datetime_typecast::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- fuzzy_date |= sql_mode_for_dates(current_thd);
- if (get_arg0_date(ltime, fuzzy_date & ~TIME_TIME_ONLY))
- return 1;
+ date_mode_t tmp= (fuzzydate | sql_mode_for_dates(thd)) & ~TIME_TIME_ONLY;
+ // Force rounding if the current sql_mode says so
+ Datetime::Options opt(date_conv_mode_t(tmp), thd);
+ Datetime *dt= new(ltime) Datetime(thd, args[0], opt,
+ MY_MIN(decimals, TIME_SECOND_PART_DIGITS));
+ return (null_value= !dt->is_valid_datetime());
+}
- if (decimals < TIME_SECOND_PART_DIGITS)
- my_time_trunc(ltime, decimals);
- DBUG_ASSERT(ltime->time_type != MYSQL_TIMESTAMP_TIME);
- ltime->time_type= MYSQL_TIMESTAMP_DATETIME;
- return 0;
+Sql_mode_dependency Item_datetime_typecast::value_depends_on_sql_mode() const
+{
+ return Item_datetimefunc::value_depends_on_sql_mode() |
+ Sql_mode_dependency(decimals < args[0]->decimals ?
+ MODE_TIME_ROUND_FRACTIONAL : 0, 0);
}
@@ -2660,20 +2509,17 @@ bool Item_datetime_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
0099-12-31
*/
-bool Item_func_makedate::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_makedate::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
- long daynr= (long) args[1]->val_int();
- long year= (long) args[0]->val_int();
- long days;
+ long year, days, daynr= (long) args[1]->val_int();
- if (args[0]->null_value || args[1]->null_value ||
- year < 0 || year > 9999 || daynr <= 0)
+ VYear vyear(args[0]);
+ if (vyear.is_null() || args[1]->null_value || vyear.truncated() || daynr <= 0)
goto err;
- if (year < 100)
+ if ((year= (long) vyear.year()) < 100)
year= year_2000_handling(year);
-
days= calc_daynr(year,1,1) + daynr - 1;
if (get_date_from_daynr(days, &ltime->year, &ltime->month, &ltime->day))
goto err;
@@ -2712,101 +2558,24 @@ bool Item_func_add_time::fix_length_and_dec()
arg0_field_type= args[0]->field_type();
if (arg0_field_type == MYSQL_TYPE_DATE ||
arg0_field_type == MYSQL_TYPE_DATETIME ||
- arg0_field_type == MYSQL_TYPE_TIMESTAMP ||
- is_date)
+ arg0_field_type == MYSQL_TYPE_TIMESTAMP)
{
- uint dec= MY_MAX(args[0]->datetime_precision(), args[1]->time_precision());
- set_handler(&type_handler_datetime2);
- fix_attributes_datetime(dec);
+ set_func_handler(sign > 0 ? &func_handler_add_time_datetime_add :
+ &func_handler_add_time_datetime_sub);
}
else if (arg0_field_type == MYSQL_TYPE_TIME)
{
- uint dec= MY_MAX(args[0]->time_precision(), args[1]->time_precision());
- set_handler(&type_handler_time2);
- fix_attributes_time(dec);
+ set_func_handler(sign > 0 ? &func_handler_add_time_time_add :
+ &func_handler_add_time_time_sub);
}
else
{
- uint dec= MY_MAX(args[0]->decimals, args[1]->decimals);
- set_handler(&type_handler_string);
- collation.set(default_charset(), DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII);
- fix_char_length_temporal_not_fixed_dec(MAX_DATETIME_WIDTH, dec);
+ set_func_handler(sign > 0 ? &func_handler_add_time_string_add :
+ &func_handler_add_time_string_sub);
}
- maybe_null= true;
- return FALSE;
-}
-
-/**
- ADDTIME(t,a) and SUBTIME(t,a) are time functions that calculate a
- time/datetime value
-
- t: time_or_datetime_expression
- a: time_expression
-
- Result: Time value or datetime value
-*/
-
-bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
-{
- DBUG_ASSERT(fixed == 1);
- MYSQL_TIME l_time1, l_time2;
- bool is_time= 0;
- long days, microseconds;
- longlong seconds;
- int l_sign= sign;
-
- if (Item_func_add_time::field_type() == MYSQL_TYPE_DATETIME)
- {
- // TIMESTAMP function OR the first argument is DATE/DATETIME/TIMESTAMP
- if (get_arg0_date(&l_time1, 0) ||
- args[1]->get_time(&l_time2) ||
- l_time1.time_type == MYSQL_TIMESTAMP_TIME ||
- l_time2.time_type != MYSQL_TIMESTAMP_TIME)
- return (null_value= 1);
- }
- else
- {
- // ADDTIME function AND the first argument is TIME
- if (args[0]->get_time(&l_time1) ||
- args[1]->get_time(&l_time2) ||
- l_time2.time_type != MYSQL_TIMESTAMP_TIME)
- return (null_value= 1);
- is_time= (l_time1.time_type == MYSQL_TIMESTAMP_TIME);
- }
- if (l_time1.neg != l_time2.neg)
- l_sign= -l_sign;
-
- bzero(ltime, sizeof(*ltime));
-
- ltime->neg= calc_time_diff(&l_time1, &l_time2, -l_sign,
- &seconds, &microseconds);
-
- /*
- If first argument was negative and diff between arguments
- is non-zero we need to swap sign to get proper result.
- */
- if (l_time1.neg && (seconds || microseconds))
- ltime->neg= 1-ltime->neg; // Swap sign of result
-
- if (!is_time && ltime->neg)
- return (null_value= 1);
-
- days= (long) (seconds / SECONDS_IN_24H);
-
- calc_time_from_sec(ltime, (long)(seconds % SECONDS_IN_24H), microseconds);
- ltime->time_type= is_time ? MYSQL_TIMESTAMP_TIME : MYSQL_TIMESTAMP_DATETIME;
-
- if (!is_time)
- {
- if (get_date_from_daynr(days,&ltime->year,&ltime->month,&ltime->day) ||
- !ltime->day)
- return (null_value= 1);
- return (null_value= 0);
- }
-
- ltime->hour+= days*24;
- return (null_value= adjust_time_range_with_warn(ltime, decimals));
+ maybe_null= true;
+ return m_func_handler->fix_length_and_dec(this);
}
@@ -2818,62 +2587,54 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
Result: Time value
*/
-bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_timediff::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
int l_sign= 1;
MYSQL_TIME l_time1,l_time2,l_time3;
/* the following may be true in, for example, date_add(timediff(...), ... */
- if (fuzzy_date & TIME_NO_ZERO_IN_DATE)
+ if (fuzzydate & TIME_NO_ZERO_IN_DATE)
return (null_value= 1);
- if (args[0]->get_time(&l_time1) ||
- args[1]->get_time(&l_time2) ||
+ if (args[0]->get_time(thd, &l_time1) ||
+ args[1]->get_time(thd, &l_time2) ||
l_time1.time_type != l_time2.time_type)
return (null_value= 1);
if (l_time1.neg != l_time2.neg)
l_sign= -l_sign;
- if (calc_time_diff(&l_time1, &l_time2, l_sign, &l_time3, fuzzy_date))
+ if (calc_time_diff(&l_time1, &l_time2, l_sign, &l_time3, fuzzydate))
return (null_value= 1);
*ltime= l_time3;
- return (null_value= adjust_time_range_with_warn(ltime, decimals));
+ return (null_value= adjust_time_range_with_warn(thd, ltime, decimals));
}
+
/**
MAKETIME(h,m,s) is a time function that calculates a time value
from the total number of hours, minutes, and seconds.
Result: Time value
*/
-bool Item_func_maketime::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_maketime::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(fixed == 1);
Longlong_hybrid hour(args[0]->val_int(), args[0]->unsigned_flag);
longlong minute= args[1]->val_int();
- ulonglong second;
- ulong microsecond;
- bool neg= args[2]->get_seconds(&second, &microsecond);
+ VSec9 sec(thd, args[2], "seconds", 59);
- if (args[0]->null_value || args[1]->null_value || args[2]->null_value ||
- minute < 0 || minute > 59 || neg || second > 59)
+ DBUG_ASSERT(sec.is_null() || sec.sec() <= 59);
+ if (args[0]->null_value || args[1]->null_value || sec.is_null() ||
+ minute < 0 || minute > 59 || sec.neg() || sec.truncated())
return (null_value= 1);
- bzero(ltime, sizeof(*ltime));
- ltime->time_type= MYSQL_TIMESTAMP_TIME;
- ltime->neg= hour.neg();
-
- if (hour.abs() <= TIME_MAX_HOUR)
- {
- ltime->hour= (uint) hour.abs();
- ltime->minute= (uint) minute;
- ltime->second= (uint) second;
- ltime->second_part= microsecond;
- }
- else
+ int warn;
+ new(ltime) Time(&warn, hour.neg(), hour.abs(), (uint) minute,
+ sec.to_const_sec9(), thd->temporal_round_mode(), decimals);
+ if (warn)
{
// use check_time_range() to set ltime to the max value depending on dec
int unused;
@@ -2881,10 +2642,10 @@ bool Item_func_maketime::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
check_time_range(ltime, decimals, &unused);
char buf[28];
char *ptr= longlong10_to_str(hour.value(), buf, hour.is_unsigned() ? 10 : -10);
- int len = (int)(ptr - buf) + sprintf(ptr, ":%02u:%02u", (uint)minute, (uint)second);
- make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
- buf, len, MYSQL_TIMESTAMP_TIME,
- NULL, NULL, NULL);
+ int len = (int)(ptr - buf) + sprintf(ptr, ":%02u:%02u",
+ (uint) minute, (uint) sec.sec());
+ ErrConvString err(buf, len, &my_charset_bin);
+ thd->push_warning_truncated_wrong_value("time", err.ptr());
}
return (null_value= 0);
@@ -2902,7 +2663,8 @@ bool Item_func_maketime::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
longlong Item_func_microsecond::val_int()
{
DBUG_ASSERT(fixed == 1);
- Time tm(args[0], Time::Options_for_cast());
+ THD *thd= current_thd;
+ Time tm(thd, args[0], Time::Options_for_cast(thd));
return ((null_value= !tm.is_valid_time())) ?
0 : tm.get_mysql_time()->second_part;
}
@@ -2911,17 +2673,17 @@ longlong Item_func_microsecond::val_int()
longlong Item_func_timestamp_diff::val_int()
{
MYSQL_TIME ltime1, ltime2;
- longlong seconds;
- long microseconds;
+ ulonglong seconds;
+ ulong microseconds;
long months= 0;
int neg= 1;
THD *thd= current_thd;
- ulonglong fuzzydate= TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE;
+ Datetime::Options opt(TIME_NO_ZEROS, thd);
null_value= 0;
- if (Datetime(thd, args[0], fuzzydate).copy_to_mysql_time(&ltime1) ||
- Datetime(thd, args[1], fuzzydate).copy_to_mysql_time(&ltime2))
+ if (Datetime(thd, args[0], opt).copy_to_mysql_time(&ltime1) ||
+ Datetime(thd, args[1], opt).copy_to_mysql_time(&ltime2))
goto null_date;
if (calc_time_diff(&ltime2,&ltime1, 1,
@@ -2991,21 +2753,21 @@ longlong Item_func_timestamp_diff::val_int()
case INTERVAL_MONTH:
return months*neg;
case INTERVAL_WEEK:
- return seconds / SECONDS_IN_24H / 7L * neg;
+ return ((longlong) (seconds / SECONDS_IN_24H / 7L)) * neg;
case INTERVAL_DAY:
- return seconds / SECONDS_IN_24H * neg;
+ return ((longlong) (seconds / SECONDS_IN_24H)) * neg;
case INTERVAL_HOUR:
- return seconds/3600L*neg;
+ return ((longlong) (seconds / 3600L)) * neg;
case INTERVAL_MINUTE:
- return seconds/60L*neg;
+ return ((longlong) (seconds / 60L)) * neg;
case INTERVAL_SECOND:
- return seconds*neg;
+ return ((longlong) seconds) * neg;
case INTERVAL_MICROSECOND:
/*
In MySQL difference between any two valid datetime values
in microseconds fits into longlong.
*/
- return (seconds*1000000L+microseconds)*neg;
+ return ((longlong) ((ulonglong) seconds * 1000000L + microseconds)) * neg;
default:
break;
}
@@ -3135,15 +2897,10 @@ void Item_func_get_format::print(String *str, enum_query_type query_type)
specifiers supported by extract_date_time() function.
@return
- One of date_time_format_types values:
- - DATE_TIME_MICROSECOND
- - DATE_TIME
- - DATE_ONLY
- - TIME_MICROSECOND
- - TIME_ONLY
+ A function handler corresponding the given format
*/
-static date_time_format_types
+static const Item_handled_func::Handler *
get_date_time_result_type(const char *format, uint length)
{
const char *time_part_frms= "HISThiklrs";
@@ -3170,21 +2927,21 @@ get_date_time_result_type(const char *format, uint length)
frac_second_used implies time_part_used, and thus we already
have all types of date-time components and can end our search.
*/
- return DATE_TIME_MICROSECOND;
+ return &func_handler_str_to_date_datetime_usec;
}
}
}
/* We don't have all three types of date-time components */
if (frac_second_used)
- return TIME_MICROSECOND;
+ return &func_handler_str_to_date_time_usec;
if (time_part_used)
{
if (date_part_used)
- return DATE_TIME;
- return TIME_ONLY;
+ return &func_handler_str_to_date_datetime_sec;
+ return &func_handler_str_to_date_time_sec;
}
- return DATE_ONLY;
+ return &func_handler_str_to_date_date;
}
@@ -3204,56 +2961,27 @@ bool Item_func_str_to_date::fix_length_and_dec()
internal_charset= &my_charset_utf8mb4_general_ci;
maybe_null= true;
- set_handler(&type_handler_datetime2);
- fix_attributes_datetime(TIME_SECOND_PART_DIGITS);
+ set_func_handler(&func_handler_str_to_date_datetime_usec);
if ((const_item= args[1]->const_item()))
{
- char format_buff[64];
- String format_str(format_buff, sizeof(format_buff), &my_charset_bin);
+ StringBuffer<64> format_str;
String *format= args[1]->val_str(&format_str, &format_converter,
internal_charset);
- decimals= 0;
if (!args[1]->null_value)
- {
- date_time_format_types cached_format_type=
- get_date_time_result_type(format->ptr(), format->length());
- switch (cached_format_type) {
- case DATE_ONLY:
- set_handler(&type_handler_newdate);
- fix_attributes_date();
- break;
- case TIME_MICROSECOND:
- set_handler(&type_handler_time2);
- fix_attributes_time(TIME_SECOND_PART_DIGITS);
- break;
- case TIME_ONLY:
- set_handler(&type_handler_time2);
- fix_attributes_time(0);
- break;
- case DATE_TIME_MICROSECOND:
- set_handler(&type_handler_datetime2);
- fix_attributes_datetime(TIME_SECOND_PART_DIGITS);
- break;
- case DATE_TIME:
- set_handler(&type_handler_datetime2);
- fix_attributes_datetime(0);
- break;
- }
- }
+ set_func_handler(get_date_time_result_type(format->ptr(), format->length()));
}
- cached_timestamp_type= mysql_timestamp_type();
- return FALSE;
+ return m_func_handler->fix_length_and_dec(this);
}
-bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_str_to_date::get_date_common(THD *thd, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate,
+ timestamp_type tstype)
{
DATE_TIME_FORMAT date_time_format;
- char val_buff[64], format_buff[64];
- String val_string(val_buff, sizeof(val_buff), &my_charset_bin), *val;
- String format_str(format_buff, sizeof(format_buff), &my_charset_bin),
- *format;
+ StringBuffer<64> val_string, format_str;
+ String *val, *format;
val= args[0]->val_str(&val_string, &subject_converter, internal_charset);
format= args[1]->val_str(&format_str, &format_converter, internal_charset);
@@ -3262,29 +2990,22 @@ bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
date_time_format.format.str= (char*) format->ptr();
date_time_format.format.length= format->length();
- if (extract_date_time(&date_time_format, val->ptr(), val->length(),
- ltime, cached_timestamp_type, 0, "datetime",
- fuzzy_date | sql_mode_for_dates(current_thd)))
+ if (extract_date_time(thd, &date_time_format, val->ptr(), val->length(),
+ ltime, tstype, 0, "datetime",
+ date_conv_mode_t(fuzzydate) |
+ sql_mode_for_dates(thd)))
return (null_value=1);
- if (cached_timestamp_type == MYSQL_TIMESTAMP_TIME && ltime->day)
- {
- /*
- Day part for time type can be nonzero value and so
- we should add hours from day part to hour part to
- keep valid time value.
- */
- ltime->hour+= ltime->day*24;
- ltime->day= 0;
- }
return (null_value= 0);
}
-bool Item_func_last_day::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
+bool Item_func_last_day::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- if (get_arg0_date(ltime, fuzzy_date & ~TIME_TIME_ONLY) ||
- (ltime->month == 0))
- return (null_value=1);
+ Datetime::Options opt(date_conv_mode_t(fuzzydate & ~TIME_TIME_ONLY),
+ time_round_mode_t(fuzzydate));
+ Datetime *d= new(ltime) Datetime(thd, args[0], opt);
+ if ((null_value= (!d->is_valid_datetime() || ltime->month == 0)))
+ return true;
uint month_idx= ltime->month-1;
ltime->day= days_in_month[month_idx];
if ( month_idx == 1 && calc_days_in_year(ltime->year) == 366)
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 518b573173f..9ee561f6abb 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -25,13 +25,9 @@
class MY_LOCALE;
-enum date_time_format_types
-{
- TIME_ONLY= 0, TIME_MICROSECOND, DATE_ONLY, DATE_TIME, DATE_TIME_MICROSECOND
-};
-
-bool get_interval_value(Item *args,interval_type int_type, INTERVAL *interval);
+bool get_interval_value(THD *thd, Item *args,
+ interval_type int_type, INTERVAL *interval);
class Item_long_func_date_field: public Item_long_func
@@ -437,9 +433,9 @@ public:
{
return (odbc_type ? "dayofweek" : "weekday");
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
bool fix_length_and_dec()
{
@@ -499,7 +495,7 @@ public:
}
double real_op() { DBUG_ASSERT(0); return 0; }
String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
- bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(0);
return true;
@@ -535,7 +531,8 @@ public:
}
bool fix_length_and_dec()
{
- fix_length_and_dec_generic(arg_count ? args[0]->datetime_precision() : 0);
+ fix_length_and_dec_generic(arg_count ?
+ args[0]->datetime_precision(current_thd) : 0);
return FALSE;
}
longlong int_op();
@@ -559,7 +556,7 @@ public:
}
bool fix_length_and_dec()
{
- fix_length_and_dec_generic(args[0]->time_precision());
+ fix_length_and_dec_generic(args[0]->time_precision(current_thd));
return FALSE;
}
longlong int_op();
@@ -569,66 +566,17 @@ public:
};
-class Item_temporal_func: public Item_func
+class Item_datefunc :public Item_func
{
public:
- Item_temporal_func(THD *thd): Item_func(thd) {}
- Item_temporal_func(THD *thd, Item *a): Item_func(thd, a) {}
- Item_temporal_func(THD *thd, Item *a, Item *b): Item_func(thd, a, b) {}
- Item_temporal_func(THD *thd, Item *a, Item *b, Item *c): Item_func(thd, a, b, c) {}
- String *val_str(String *str);
- longlong val_int() { return val_int_from_date(); }
- double val_real() { return val_real_from_date(); }
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date) { DBUG_ASSERT(0); return 1; }
- my_decimal *val_decimal(my_decimal *decimal_value)
- { return val_decimal_from_date(decimal_value); }
-};
-
-
-/**
- Abstract class for functions returning TIME, DATE, DATETIME or string values,
- whose data type depends on parameters and is set at fix_fields time.
-*/
-class Item_temporal_hybrid_func: public Item_hybrid_func
-{
-protected:
- String ascii_buf; // Conversion buffer
-public:
- Item_temporal_hybrid_func(THD *thd, Item *a, Item *b):
- Item_hybrid_func(thd, a, b) {}
-
- longlong val_int() { return val_int_from_date(); }
- double val_real() { return val_real_from_date(); }
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date)= 0;
- my_decimal *val_decimal(my_decimal *decimal_value)
- { return val_decimal_from_date(decimal_value); }
-
- /**
- Fix the returned timestamp to match field_type(),
- which is important for val_str().
- */
- bool fix_temporal_type(MYSQL_TIME *ltime);
- /**
- Return string value in ASCII character set.
- */
- String *val_str_ascii(String *str);
- /**
- Return string value in @@character_set_connection.
- */
- String *val_str(String *str)
- {
- return val_str_from_val_str_ascii(str, &ascii_buf);
- }
-};
-
-
-class Item_datefunc :public Item_temporal_func
-{
-public:
- Item_datefunc(THD *thd): Item_temporal_func(thd) { }
- Item_datefunc(THD *thd, Item *a): Item_temporal_func(thd, a) { }
- Item_datefunc(THD *thd, Item *a, Item *b): Item_temporal_func(thd, a, b) { }
+ Item_datefunc(THD *thd): Item_func(thd) { }
+ Item_datefunc(THD *thd, Item *a): Item_func(thd, a) { }
+ Item_datefunc(THD *thd, Item *a, Item *b): Item_func(thd, a, b) { }
const Type_handler *type_handler() const { return &type_handler_newdate; }
+ longlong val_int() { return Date(this).to_longlong(); }
+ double val_real() { return Date(this).to_double(); }
+ String *val_str(String *to) { return Date(this).to_string(to); }
+ my_decimal *val_decimal(my_decimal *to) { return Date(this).to_decimal(to); }
bool fix_length_and_dec()
{
fix_attributes_date();
@@ -638,26 +586,38 @@ public:
};
-class Item_timefunc :public Item_temporal_func
+class Item_timefunc :public Item_func
{
public:
- Item_timefunc(THD *thd): Item_temporal_func(thd) {}
- Item_timefunc(THD *thd, Item *a): Item_temporal_func(thd, a) {}
- Item_timefunc(THD *thd, Item *a, Item *b): Item_temporal_func(thd, a, b) {}
- Item_timefunc(THD *thd, Item *a, Item *b, Item *c):
- Item_temporal_func(thd, a, b ,c) {}
+ Item_timefunc(THD *thd): Item_func(thd) {}
+ Item_timefunc(THD *thd, Item *a): Item_func(thd, a) {}
+ Item_timefunc(THD *thd, Item *a, Item *b): Item_func(thd, a, b) {}
+ Item_timefunc(THD *thd, Item *a, Item *b, Item *c): Item_func(thd, a, b ,c) {}
const Type_handler *type_handler() const { return &type_handler_time2; }
+ longlong val_int() { return Time(this).to_longlong(); }
+ double val_real() { return Time(this).to_double(); }
+ String *val_str(String *to) { return Time(this).to_string(to, decimals); }
+ my_decimal *val_decimal(my_decimal *to) { return Time(this).to_decimal(to); }
+ bool val_native(THD *thd, Native *to)
+ {
+ return Time(thd, this).to_native(to, decimals);
+ }
};
-class Item_datetimefunc :public Item_temporal_func
+class Item_datetimefunc :public Item_func
{
public:
- Item_datetimefunc(THD *thd): Item_temporal_func(thd) {}
- Item_datetimefunc(THD *thd, Item *a): Item_temporal_func(thd, a) {}
+ Item_datetimefunc(THD *thd): Item_func(thd) {}
+ Item_datetimefunc(THD *thd, Item *a): Item_func(thd, a) {}
+ Item_datetimefunc(THD *thd, Item *a, Item *b): Item_func(thd, a, b) {}
Item_datetimefunc(THD *thd, Item *a, Item *b, Item *c):
- Item_temporal_func(thd, a, b ,c) {}
+ Item_func(thd, a, b ,c) {}
const Type_handler *type_handler() const { return &type_handler_datetime2; }
+ longlong val_int() { return Datetime(this).to_longlong(); }
+ double val_real() { return Datetime(this).to_double(); }
+ String *val_str(String *to) { return Datetime(this).to_string(to, decimals); }
+ my_decimal *val_decimal(my_decimal *to) { return Datetime(this).to_decimal(to); }
};
@@ -672,7 +632,7 @@ public:
{ decimals= dec; }
bool fix_fields(THD *, Item **);
bool fix_length_and_dec() { fix_attributes_time(decimals); return FALSE; }
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
/*
Abstract method that defines which time zone is used for conversion.
Converts time current time in my_time_t representation to broken-down
@@ -717,7 +677,7 @@ class Item_func_curdate :public Item_datefunc
MYSQL_TIME ltime;
public:
Item_func_curdate(THD *thd): Item_datefunc(thd), last_query_id(0) {}
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0;
bool check_vcol_func_processor(void *arg)
{
@@ -760,7 +720,7 @@ public:
bool fix_fields(THD *, Item **);
bool fix_length_and_dec()
{ fix_attributes_datetime(decimals); return FALSE;}
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0;
bool check_vcol_func_processor(void *arg)
{
@@ -815,7 +775,7 @@ public:
bool const_item() const { return 0; }
const char *func_name() const { return "sysdate"; }
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
table_map used_tables() const { return RAND_TABLE_BIT; }
bool check_vcol_func_processor(void *arg)
{
@@ -835,7 +795,7 @@ class Item_func_from_days :public Item_datefunc
public:
Item_func_from_days(THD *thd, Item *a): Item_datefunc(thd, a) {}
const char *func_name() const { return "from_days"; }
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
bool check_valid_arguments_processor(void *int_arg)
@@ -900,7 +860,7 @@ class Item_func_from_unixtime :public Item_datetimefunc
Item_func_from_unixtime(THD *thd, Item *a): Item_datetimefunc(thd, a) {}
const char *func_name() const { return "from_unixtime"; }
bool fix_length_and_dec();
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
@@ -945,11 +905,11 @@ class Item_func_convert_tz :public Item_datetimefunc
const char *func_name() const { return "convert_tz"; }
bool fix_length_and_dec()
{
- fix_attributes_datetime(args[0]->datetime_precision());
+ fix_attributes_datetime(args[0]->datetime_precision(current_thd));
maybe_null= true;
return FALSE;
}
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
void cleanup();
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_convert_tz>(thd, this); }
@@ -962,7 +922,7 @@ class Item_func_sec_to_time :public Item_timefunc
{ return args[0]->check_type_can_return_decimal(func_name()); }
public:
Item_func_sec_to_time(THD *thd, Item *item): Item_timefunc(thd, item) {}
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
bool fix_length_and_dec()
{
fix_attributes_time(args[0]->decimals);
@@ -975,18 +935,17 @@ public:
};
-class Item_date_add_interval :public Item_temporal_hybrid_func
+class Item_date_add_interval :public Item_handled_func
{
public:
const interval_type int_type; // keep it public
const bool date_sub_interval; // keep it public
Item_date_add_interval(THD *thd, Item *a, Item *b, interval_type type_arg,
bool neg_arg):
- Item_temporal_hybrid_func(thd, a, b),int_type(type_arg),
+ Item_handled_func(thd, a, b), int_type(type_arg),
date_sub_interval(neg_arg) {}
const char *func_name() const { return "date_add_interval"; }
bool fix_length_and_dec();
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
bool eq(const Item *item, bool binary_cmp) const;
void print(String *str, enum_query_type query_type);
enum precedence precedence() const { return INTERVAL_PRECEDENCE; }
@@ -996,9 +955,17 @@ public:
};
-class Item_extract :public Item_int_func
+class Item_extract :public Item_int_func,
+ public Type_handler_hybrid_field_type
{
- bool date_value;
+ date_mode_t m_date_mode;
+ const Type_handler_int_result *handler_by_length(uint32 length,
+ uint32 threashold)
+ {
+ if (length >= threashold)
+ return &type_handler_longlong;
+ return &type_handler_long;
+ }
void set_date_length(uint32 length)
{
/*
@@ -1007,48 +974,34 @@ class Item_extract :public Item_int_func
because all around the code we assume that max_length is sign inclusive.
Another options is to set unsigned_flag to "true".
*/
- max_length= length; //QQ: see above
- date_value= true;
+ set_handler(handler_by_length(max_length= length, 10)); // QQ: see above
+ m_date_mode= date_mode_t(0);
+ }
+ void set_day_length(uint32 length)
+ {
+ /*
+ Units starting with DAY can be negative:
+ EXTRACT(DAY FROM '-24:00:00') -> -1
+ */
+ set_handler(handler_by_length(max_length= length + 1/*sign*/, 11));
+ m_date_mode= Temporal::Options(TIME_INTERVAL_DAY, current_thd);
}
void set_time_length(uint32 length)
{
- max_length= length + 1/*sign*/;
- date_value= false;
+ set_handler(handler_by_length(max_length= length + 1/*sign*/, 11));
+ m_date_mode= Temporal::Options(TIME_INTERVAL_hhmmssff, current_thd);
}
public:
const interval_type int_type; // keep it public
Item_extract(THD *thd, interval_type type_arg, Item *a):
- Item_int_func(thd, a), int_type(type_arg) {}
+ Item_int_func(thd, a),
+ Type_handler_hybrid_field_type(&type_handler_longlong),
+ m_date_mode(date_mode_t(0)),
+ int_type(type_arg)
+ { }
const Type_handler *type_handler() const
{
- switch (int_type) {
- case INTERVAL_YEAR:
- case INTERVAL_YEAR_MONTH:
- case INTERVAL_QUARTER:
- case INTERVAL_MONTH:
- case INTERVAL_WEEK:
- case INTERVAL_DAY:
- case INTERVAL_DAY_HOUR:
- case INTERVAL_DAY_MINUTE:
- case INTERVAL_DAY_SECOND:
- case INTERVAL_HOUR:
- case INTERVAL_HOUR_MINUTE:
- case INTERVAL_HOUR_SECOND:
- case INTERVAL_MINUTE:
- case INTERVAL_MINUTE_SECOND:
- case INTERVAL_SECOND:
- case INTERVAL_MICROSECOND:
- case INTERVAL_SECOND_MICROSECOND:
- return &type_handler_long;
- case INTERVAL_DAY_MICROSECOND:
- case INTERVAL_HOUR_MICROSECOND:
- case INTERVAL_MINUTE_MICROSECOND:
- return &type_handler_longlong;
- case INTERVAL_LAST:
- break;
- }
- DBUG_ASSERT(0);
- return &type_handler_longlong;
+ return Type_handler_hybrid_field_type::type_handler();
}
longlong val_int();
enum Functype functype() const { return EXTRACT_FUNC; }
@@ -1118,6 +1071,9 @@ class Item_char_typecast :public Item_str_func
void check_truncation_with_warn(String *src, size_t dstlen);
void fix_length_and_dec_internal(CHARSET_INFO *fromcs);
public:
+ // Methods used by ColumnStore
+ uint get_cast_length() const { return cast_length; }
+public:
Item_char_typecast(THD *thd, Item *a, uint length_arg, CHARSET_INFO *cs_arg):
Item_str_func(thd, a), cast_length(length_arg), cast_cs(cs_arg),
m_suppress_warning_to_error_escalation(false) {}
@@ -1144,22 +1100,34 @@ public:
};
-class Item_temporal_typecast: public Item_temporal_func
+class Item_interval_DDhhmmssff_typecast :public Item_char_typecast
{
+ uint m_fsp;
public:
- Item_temporal_typecast(THD *thd, Item *a): Item_temporal_func(thd, a) {}
- virtual const char *cast_type() const = 0;
- void print(String *str, enum_query_type query_type);
+ Item_interval_DDhhmmssff_typecast(THD *thd, Item *a, uint fsp)
+ :Item_char_typecast(thd, a,Interval_DDhhmmssff::max_char_length(fsp),
+ &my_charset_latin1),
+ m_fsp(fsp)
+ { }
+ String *val_str(String *to)
+ {
+ Interval_DDhhmmssff it(current_thd, args[0], m_fsp);
+ null_value= !it.is_valid_interval_DDhhmmssff();
+ return it.to_string(to, m_fsp);
+ }
};
-class Item_date_typecast :public Item_temporal_typecast
+
+class Item_date_typecast :public Item_datefunc
{
public:
- Item_date_typecast(THD *thd, Item *a): Item_temporal_typecast(thd, a) {}
+ Item_date_typecast(THD *thd, Item *a): Item_datefunc(thd, a) {}
const char *func_name() const { return "cast_as_date"; }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
- const char *cast_type() const { return "date"; }
- const Type_handler *type_handler() const { return &type_handler_newdate; }
+ void print(String *str, enum_query_type query_type)
+ {
+ print_cast_temporal(str, query_type);
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool fix_length_and_dec()
{
return args[0]->type_handler()->Item_date_typecast_fix_length_and_dec(this);
@@ -1169,39 +1137,45 @@ public:
};
-class Item_time_typecast :public Item_temporal_typecast
+class Item_time_typecast :public Item_timefunc
{
public:
Item_time_typecast(THD *thd, Item *a, uint dec_arg):
- Item_temporal_typecast(thd, a) { decimals= dec_arg; }
+ Item_timefunc(thd, a) { decimals= dec_arg; }
const char *func_name() const { return "cast_as_time"; }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
- const char *cast_type() const { return "time"; }
- const Type_handler *type_handler() const { return &type_handler_time2; }
+ void print(String *str, enum_query_type query_type)
+ {
+ print_cast_temporal(str, query_type);
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool fix_length_and_dec()
{
return args[0]->type_handler()->
Item_time_typecast_fix_length_and_dec(this);
}
+ Sql_mode_dependency value_depends_on_sql_mode() const;
Item *get_copy(THD *thd)
{ return get_item_copy<Item_time_typecast>(thd, this); }
};
-class Item_datetime_typecast :public Item_temporal_typecast
+class Item_datetime_typecast :public Item_datetimefunc
{
public:
Item_datetime_typecast(THD *thd, Item *a, uint dec_arg):
- Item_temporal_typecast(thd, a) { decimals= dec_arg; }
+ Item_datetimefunc(thd, a) { decimals= dec_arg; }
const char *func_name() const { return "cast_as_datetime"; }
- const char *cast_type() const { return "datetime"; }
- const Type_handler *type_handler() const { return &type_handler_datetime2; }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ void print(String *str, enum_query_type query_type)
+ {
+ print_cast_temporal(str, query_type);
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool fix_length_and_dec()
{
return args[0]->type_handler()->
Item_datetime_typecast_fix_length_and_dec(this);
}
+ Sql_mode_dependency value_depends_on_sql_mode() const;
Item *get_copy(THD *thd)
{ return get_item_copy<Item_datetime_typecast>(thd, this); }
};
@@ -1215,31 +1189,76 @@ public:
Item_func_makedate(THD *thd, Item *a, Item *b):
Item_datefunc(thd, a, b) {}
const char *func_name() const { return "makedate"; }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_makedate>(thd, this); }
};
-class Item_func_add_time :public Item_temporal_hybrid_func
+class Item_func_timestamp :public Item_datetimefunc
{
- const bool is_date;
- int sign;
-
+ bool check_arguments() const
+ {
+ return args[0]->check_type_can_return_date(func_name()) ||
+ args[1]->check_type_can_return_time(func_name());
+ }
public:
- Item_func_add_time(THD *thd, Item *a, Item *b, bool type_arg, bool neg_arg):
- Item_temporal_hybrid_func(thd, a, b), is_date(type_arg)
- { sign= neg_arg ? -1 : 1; }
- bool fix_length_and_dec();
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
- const char *func_name() const
+ Item_func_timestamp(THD *thd, Item *a, Item *b)
+ :Item_datetimefunc(thd, a, b)
+ { }
+ const char *func_name() const { return "timestamp"; }
+ bool fix_length_and_dec()
{
- return is_date ? "timestamp" : sign > 0 ? "addtime" : "subtime";
+ THD *thd= current_thd;
+ uint dec0= args[0]->datetime_precision(thd);
+ uint dec1= Interval_DDhhmmssff::fsp(thd, args[1]);
+ fix_attributes_datetime(MY_MAX(dec0, dec1));
+ maybe_null= true;
+ return false;
+ }
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ {
+ Datetime dt(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd));
+ if (!dt.is_valid_datetime())
+ return null_value= true;
+ Interval_DDhhmmssff it(thd, args[1]);
+ if (!it.is_valid_interval_DDhhmmssff())
+ return null_value= true;
+ return (null_value= Sec6_add(dt.get_mysql_time(), it.get_mysql_time(), 1).
+ to_datetime(ltime));
}
Item *get_copy(THD *thd)
+ { return get_item_copy<Item_func_timestamp>(thd, this); }
+};
+
+
+/**
+ ADDTIME(t,a) and SUBTIME(t,a) are time functions that calculate a
+ time/datetime value
+
+ t: time_or_datetime_expression
+ a: time_expression
+
+ Result: Time value or datetime value
+*/
+
+class Item_func_add_time :public Item_handled_func
+{
+ int sign;
+public:
+ // Methods used by ColumnStore
+ int get_sign() const { return sign; }
+public:
+ Item_func_add_time(THD *thd, Item *a, Item *b, bool neg_arg)
+ :Item_handled_func(thd, a, b), sign(neg_arg ? -1 : 1)
+ { }
+ bool fix_length_and_dec();
+ const char *func_name() const { return sign > 0 ? "addtime" : "subtime"; }
+ Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_add_time>(thd, this); }
};
+
class Item_func_timediff :public Item_timefunc
{
bool check_arguments() const
@@ -1249,12 +1268,14 @@ public:
const char *func_name() const { return "timediff"; }
bool fix_length_and_dec()
{
- uint dec= MY_MAX(args[0]->time_precision(), args[1]->time_precision());
+ THD *thd= current_thd;
+ uint dec= MY_MAX(args[0]->time_precision(thd),
+ args[1]->time_precision(thd));
fix_attributes_time(dec);
maybe_null= true;
return FALSE;
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_timediff>(thd, this); }
};
@@ -1277,7 +1298,7 @@ public:
return FALSE;
}
const char *func_name() const { return "maketime"; }
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_maketime>(thd, this); }
};
@@ -1313,6 +1334,9 @@ class Item_func_timestamp_diff :public Item_longlong_func
{ return check_argument_types_can_return_date(0, arg_count); }
const interval_type int_type;
public:
+ // Methods used by ColumnStore
+ interval_type get_int_type() const { return int_type; };
+public:
Item_func_timestamp_diff(THD *thd, Item *a, Item *b, interval_type type_arg):
Item_longlong_func(thd, a, b), int_type(type_arg) {}
const char *func_name() const { return "timestampdiff"; }
@@ -1356,19 +1380,19 @@ public:
};
-class Item_func_str_to_date :public Item_temporal_hybrid_func
+class Item_func_str_to_date :public Item_handled_func
{
- timestamp_type cached_timestamp_type;
bool const_item;
String subject_converter;
String format_converter;
CHARSET_INFO *internal_charset;
public:
Item_func_str_to_date(THD *thd, Item *a, Item *b):
- Item_temporal_hybrid_func(thd, a, b), const_item(false),
+ Item_handled_func(thd, a, b), const_item(false),
internal_charset(NULL)
{}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ bool get_date_common(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate,
+ timestamp_type);
const char *func_name() const { return "str_to_date"; }
bool fix_length_and_dec();
Item *get_copy(THD *thd)
@@ -1383,9 +1407,365 @@ class Item_func_last_day :public Item_datefunc
public:
Item_func_last_day(THD *thd, Item *a): Item_datefunc(thd, a) {}
const char *func_name() const { return "last_day"; }
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_last_day>(thd, this); }
};
+
+/*****************************************************************************/
+
+class Func_handler_date_add_interval
+{
+protected:
+ static uint interval_dec(const Item *item, interval_type int_type)
+ {
+ if (int_type == INTERVAL_MICROSECOND ||
+ (int_type >= INTERVAL_DAY_MICROSECOND &&
+ int_type <= INTERVAL_SECOND_MICROSECOND))
+ return TIME_SECOND_PART_DIGITS;
+ if (int_type == INTERVAL_SECOND && item->decimals > 0)
+ return MY_MIN(item->decimals, TIME_SECOND_PART_DIGITS);
+ return 0;
+ }
+ interval_type int_type(const Item_handled_func *item) const
+ {
+ return static_cast<const Item_date_add_interval*>(item)->int_type;
+ }
+ bool sub(const Item_handled_func *item) const
+ {
+ return static_cast<const Item_date_add_interval*>(item)->date_sub_interval;
+ }
+ bool add(THD *thd, Item *item, interval_type type, bool sub, MYSQL_TIME *to) const
+ {
+ INTERVAL interval;
+ if (get_interval_value(thd, item, type, &interval))
+ return true;
+ if (sub)
+ interval.neg = !interval.neg;
+ return date_add_interval(thd, to, type, interval);
+ }
+};
+
+
+class Func_handler_date_add_interval_datetime:
+ public Item_handled_func::Handler_datetime,
+ public Func_handler_date_add_interval
+{
+public:
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ uint dec= MY_MAX(item->arguments()[0]->datetime_precision(current_thd),
+ interval_dec(item->arguments()[1], int_type(item)));
+ item->fix_attributes_datetime(dec);
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ Datetime::Options opt(TIME_CONV_NONE, thd);
+ Datetime dt(thd, item->arguments()[0], opt);
+ if (!dt.is_valid_datetime() ||
+ dt.check_date_with_warn(thd, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
+ return (item->null_value= true);
+ dt.copy_to_mysql_time(to);
+ return (item->null_value= add(thd, item->arguments()[1],
+ int_type(item), sub(item), to));
+ }
+};
+
+
+class Func_handler_date_add_interval_datetime_arg0_time:
+ public Func_handler_date_add_interval_datetime
+{
+public:
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const;
+};
+
+
+class Func_handler_date_add_interval_date:
+ public Item_handled_func::Handler_date,
+ public Func_handler_date_add_interval
+{
+public:
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ /*
+ The first argument is known to be of the DATE data type (not DATETIME).
+ We don't need rounding here.
+ */
+ Date d(thd, item->arguments()[0], TIME_CONV_NONE);
+ if (!d.is_valid_date() ||
+ d.check_date_with_warn(thd, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
+ return (item->null_value= true);
+ d.copy_to_mysql_time(to);
+ return (item->null_value= add(thd, item->arguments()[1],
+ int_type(item), sub(item), to));
+ }
+};
+
+
+class Func_handler_date_add_interval_time:
+ public Item_handled_func::Handler_time,
+ public Func_handler_date_add_interval
+{
+public:
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ uint dec= MY_MAX(item->arguments()[0]->time_precision(current_thd),
+ interval_dec(item->arguments()[1], int_type(item)));
+ item->fix_attributes_time(dec);
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ Time t(thd, item->arguments()[0]);
+ if (!t.is_valid_time())
+ return (item->null_value= true);
+ t.copy_to_mysql_time(to);
+ return (item->null_value= add(thd, item->arguments()[1],
+ int_type(item), sub(item), to));
+ }
+};
+
+
+class Func_handler_date_add_interval_string:
+ public Item_handled_func::Handler_temporal_string,
+ public Func_handler_date_add_interval
+{
+public:
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ uint dec= MY_MAX(item->arguments()[0]->datetime_precision(current_thd),
+ interval_dec(item->arguments()[1], int_type(item)));
+ item->collation.set(item->default_charset(),
+ DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII);
+ item->fix_char_length_temporal_not_fixed_dec(MAX_DATETIME_WIDTH, dec);
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ if (item->arguments()[0]->
+ get_date(thd, to, Datetime::Options(TIME_CONV_NONE, thd)) ||
+ (to->time_type != MYSQL_TIMESTAMP_TIME &&
+ check_date_with_warn(thd, to, TIME_NO_ZEROS, MYSQL_TIMESTAMP_ERROR)))
+ return (item->null_value= true);
+ return (item->null_value= add(thd, item->arguments()[1],
+ int_type(item), sub(item), to));
+ }
+};
+
+
+class Func_handler_sign
+{
+protected:
+ int m_sign;
+ Func_handler_sign(int sign) :m_sign(sign) { }
+};
+
+
+class Func_handler_add_time_datetime:
+ public Item_handled_func::Handler_datetime,
+ public Func_handler_sign
+{
+public:
+ Func_handler_add_time_datetime(int sign)
+ :Func_handler_sign(sign)
+ { }
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ THD *thd= current_thd;
+ uint dec0= item->arguments()[0]->datetime_precision(thd);
+ uint dec1= Interval_DDhhmmssff::fsp(thd, item->arguments()[1]);
+ item->fix_attributes_datetime(MY_MAX(dec0, dec1));
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ DBUG_ASSERT(item->is_fixed());
+ Datetime::Options opt(TIME_CONV_NONE, thd);
+ Datetime dt(thd, item->arguments()[0], opt);
+ if (!dt.is_valid_datetime())
+ return item->null_value= true;
+ Interval_DDhhmmssff it(thd, item->arguments()[1]);
+ if (!it.is_valid_interval_DDhhmmssff())
+ return item->null_value= true;
+ return (item->null_value= (Sec6_add(dt.get_mysql_time(),
+ it.get_mysql_time(), m_sign).
+ to_datetime(to)));
+ }
+};
+
+
+class Func_handler_add_time_time:
+ public Item_handled_func::Handler_time,
+ public Func_handler_sign
+{
+public:
+ Func_handler_add_time_time(int sign)
+ :Func_handler_sign(sign)
+ { }
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ THD *thd= current_thd;
+ uint dec0= item->arguments()[0]->time_precision(thd);
+ uint dec1= Interval_DDhhmmssff::fsp(thd, item->arguments()[1]);
+ item->fix_attributes_time(MY_MAX(dec0, dec1));
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ DBUG_ASSERT(item->is_fixed());
+ Time t(thd, item->arguments()[0]);
+ if (!t.is_valid_time())
+ return item->null_value= true;
+ Interval_DDhhmmssff i(thd, item->arguments()[1]);
+ if (!i.is_valid_interval_DDhhmmssff())
+ return item->null_value= true;
+ return (item->null_value= (Sec6_add(t.get_mysql_time(),
+ i.get_mysql_time(), m_sign).
+ to_time(thd, to, item->decimals)));
+ }
+};
+
+
+class Func_handler_add_time_string:
+ public Item_handled_func::Handler_temporal_string,
+ public Func_handler_sign
+{
+public:
+ Func_handler_add_time_string(int sign)
+ :Func_handler_sign(sign)
+ { }
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ uint dec0= item->arguments()[0]->decimals;
+ uint dec1= Interval_DDhhmmssff::fsp(current_thd, item->arguments()[1]);
+ uint dec= MY_MAX(dec0, dec1);
+ item->collation.set(item->default_charset(),
+ DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII);
+ item->fix_char_length_temporal_not_fixed_dec(MAX_DATETIME_WIDTH, dec);
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ DBUG_ASSERT(item->is_fixed());
+ // Detect a proper timestamp type based on the argument values
+ Temporal_hybrid l_time1(thd, item->arguments()[0],
+ Temporal::Options(TIME_TIME_ONLY, thd));
+ if (!l_time1.is_valid_temporal())
+ return (item->null_value= true);
+ Interval_DDhhmmssff l_time2(thd, item->arguments()[1]);
+ if (!l_time2.is_valid_interval_DDhhmmssff())
+ return (item->null_value= true);
+ Sec6_add add(l_time1.get_mysql_time(), l_time2.get_mysql_time(), m_sign);
+ return (item->null_value= (l_time1.get_mysql_time()->time_type ==
+ MYSQL_TIMESTAMP_TIME ?
+ add.to_time(thd, to, item->decimals) :
+ add.to_datetime(to)));
+ }
+};
+
+
+class Func_handler_str_to_date_datetime_sec:
+ public Item_handled_func::Handler_datetime
+{
+public:
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ item->fix_attributes_datetime(0);
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ return static_cast<Item_func_str_to_date*>(item)->
+ get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_DATETIME);
+ }
+};
+
+
+class Func_handler_str_to_date_datetime_usec:
+ public Item_handled_func::Handler_datetime
+{
+public:
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ item->fix_attributes_datetime(TIME_SECOND_PART_DIGITS);
+ return false;
+ }
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ return static_cast<Item_func_str_to_date*>(item)->
+ get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_DATETIME);
+ }
+};
+
+
+class Func_handler_str_to_date_date: public Item_handled_func::Handler_date
+{
+public:
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ return static_cast<Item_func_str_to_date*>(item)->
+ get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_DATE);
+ }
+};
+
+
+class Func_handler_str_to_date_time: public Item_handled_func::Handler_time
+{
+public:
+ bool get_date(THD *thd, Item_handled_func *item,
+ MYSQL_TIME *to, date_mode_t fuzzy) const
+ {
+ if (static_cast<Item_func_str_to_date*>(item)->
+ get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_TIME))
+ return true;
+ if (to->day)
+ {
+ /*
+ Day part for time type can be nonzero value and so
+ we should add hours from day part to hour part to
+ keep valid time value.
+ */
+ to->hour+= to->day * 24;
+ to->day= 0;
+ }
+ return false;
+ }
+};
+
+
+class Func_handler_str_to_date_time_sec: public Func_handler_str_to_date_time
+{
+public:
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ item->fix_attributes_time(0);
+ return false;
+ }
+};
+
+
+class Func_handler_str_to_date_time_usec: public Func_handler_str_to_date_time
+{
+public:
+ bool fix_length_and_dec(Item_handled_func *item) const
+ {
+ item->fix_attributes_time(TIME_SECOND_PART_DIGITS);
+ return false;
+ }
+};
+
+
#endif /* ITEM_TIMEFUNC_INCLUDED */
diff --git a/sql/item_vers.cc b/sql/item_vers.cc
index 6103c53fd51..9a594533628 100644
--- a/sql/item_vers.cc
+++ b/sql/item_vers.cc
@@ -53,9 +53,8 @@ Item_func_trt_ts::Item_func_trt_ts(THD *thd, Item* a, TR_table::field_id_t _trt_
bool
-Item_func_trt_ts::get_date(MYSQL_TIME *res, ulonglong fuzzy_date)
+Item_func_trt_ts::get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate)
{
- THD *thd= current_thd; // can it differ from constructor's?
DBUG_ASSERT(thd);
DBUG_ASSERT(args[0]);
if (args[0]->result_type() != INT_RESULT)
@@ -80,7 +79,7 @@ Item_func_trt_ts::get_date(MYSQL_TIME *res, ulonglong fuzzy_date)
if (null_value)
return true;
- return trt[trt_field]->get_date(res, fuzzy_date);
+ return trt[trt_field]->get_date(res, fuzzydate);
}
@@ -156,7 +155,9 @@ Item_func_trt_id::val_int()
else
{
MYSQL_TIME commit_ts;
- if (args[0]->get_date(&commit_ts, 0))
+ THD *thd= current_thd;
+ Datetime::Options opt(TIME_CONV_NONE, thd);
+ if (args[0]->get_date(thd, &commit_ts, opt))
{
null_value= true;
return 0;
diff --git a/sql/item_vers.h b/sql/item_vers.h
index 2be3f683913..0799d04a0bc 100644
--- a/sql/item_vers.h
+++ b/sql/item_vers.h
@@ -65,7 +65,7 @@ public:
}
return "trt_commit_ts";
}
- bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_trt_ts>(thd, this); }
bool fix_length_and_dec()
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index ccb571a9436..11fc18b1817 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -122,7 +122,6 @@ Item_window_func::fix_fields(THD *thd, Item **ref)
const_item_cache= false;
with_window_func= true;
- with_sum_func= false;
if (fix_length_and_dec())
return TRUE;
@@ -447,12 +446,20 @@ Item_sum_hybrid_simple::val_str(String *str)
return retval;
}
-bool Item_sum_hybrid_simple::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+bool Item_sum_hybrid_simple::val_native(THD *thd, Native *to)
{
DBUG_ASSERT(fixed == 1);
if (null_value)
return true;
- bool retval= value->get_date(ltime, fuzzydate);
+ return val_native_from_item(thd, value, to);
+}
+
+bool Item_sum_hybrid_simple::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+{
+ DBUG_ASSERT(fixed == 1);
+ if (null_value)
+ return true;
+ bool retval= value->get_date(thd, ltime, fuzzydate);
if ((null_value= value->null_value))
DBUG_ASSERT(retval == true);
return retval;
@@ -521,11 +528,11 @@ void Item_sum_hybrid_simple::reset_field()
}
case DECIMAL_RESULT:
{
- my_decimal value_buff, *arg_dec= args[0]->val_decimal(&value_buff);
+ VDec arg_dec(args[0]);
if (maybe_null)
{
- if (args[0]->null_value)
+ if (arg_dec.is_null())
result_field->set_null();
else
result_field->set_notnull();
@@ -534,9 +541,7 @@ void Item_sum_hybrid_simple::reset_field()
We must store zero in the field as we will use the field value in
add()
*/
- if (!arg_dec) // Null
- arg_dec= &decimal_zero;
- result_field->store_decimal(arg_dec);
+ result_field->store_decimal(arg_dec.ptr_or(&decimal_zero));
break;
}
case ROW_RESULT:
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index 81bfa8d7cd0..c038cb8d15f 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -129,6 +129,7 @@ public:
return false;
}
+ void reset_field() { DBUG_ASSERT(0); }
void update_field() {}
enum Sumfunctype sum_func() const
@@ -192,11 +193,8 @@ public:
return cur_rank;
}
+ void reset_field() { DBUG_ASSERT(0); }
void update_field() {}
- /*
- void reset_field();
- TODO: ^^ what does this do ? It is not called ever?
- */
enum Sumfunctype sum_func () const
{
@@ -259,6 +257,7 @@ class Item_sum_dense_rank: public Item_sum_int
first_add= true;
}
bool add();
+ void reset_field() { DBUG_ASSERT(0); }
void update_field() {}
longlong val_int()
{
@@ -314,7 +313,10 @@ class Item_sum_hybrid_simple : public Item_sum_hybrid
my_decimal *val_decimal(my_decimal *);
void reset_field();
String *val_str(String *);
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
+ bool val_native(THD *thd, Native *to);
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
+ const Type_handler *type_handler() const
+ { return Type_handler_hybrid_field_type::type_handler(); }
void update_field();
Field *create_tmp_field(bool group, TABLE *table);
void clear()
@@ -540,6 +542,8 @@ class Item_sum_percent_rank: public Item_sum_double,
void setup_window_func(THD *thd, Window_spec *window_spec);
+ void reset_field() { DBUG_ASSERT(0); }
+
void set_partition_row_count(ulonglong count)
{
Partition_row_count::set_partition_row_count(count);
@@ -624,6 +628,8 @@ class Item_sum_cume_dist: public Item_sum_double,
return FALSE;
}
+ void reset_field() { DBUG_ASSERT(0); }
+
void set_partition_row_count(ulonglong count)
{
Partition_row_count::set_partition_row_count(count);
@@ -695,6 +701,8 @@ class Item_sum_ntile : public Item_sum_int,
void update_field() {}
+ void reset_field() { DBUG_ASSERT(0); }
+
void set_partition_row_count(ulonglong count)
{
Partition_row_count::set_partition_row_count(count);
@@ -763,7 +771,7 @@ public:
return value->val_str(str);
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
if (get_row_count() == 0 || get_arg(0)->is_null())
{
@@ -771,7 +779,7 @@ public:
return 0;
}
null_value= false;
- return value->get_date(ltime, fuzzydate);
+ return value->get_date(thd, ltime, fuzzydate);
}
bool add()
@@ -845,6 +853,8 @@ public:
return FALSE;
}
+ void reset_field() { DBUG_ASSERT(0); }
+
void set_partition_row_count(ulonglong count)
{
Partition_row_count::set_partition_row_count(count);
@@ -979,6 +989,8 @@ public:
return FALSE;
}
+ void reset_field() { DBUG_ASSERT(0); }
+
void set_partition_row_count(ulonglong count)
{
Partition_row_count::set_partition_row_count(count);
@@ -1263,6 +1275,15 @@ public:
return res;
}
+ bool val_native(THD *thd, Native *to)
+ {
+ if (force_return_blank)
+ return null_value= true;
+ if (read_value_from_result_field)
+ return val_native_from_field(result_field, to);
+ return val_native_from_item(thd, window_func(), to);
+ }
+
my_decimal* val_decimal(my_decimal* dec)
{
my_decimal *res;
@@ -1286,7 +1307,7 @@ public:
return res;
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
bool res;
if (force_return_blank)
@@ -1303,7 +1324,7 @@ public:
}
else
{
- res= window_func()->get_date(ltime, fuzzydate);
+ res= window_func()->get_date(thd, ltime, fuzzydate);
null_value= window_func()->null_value;
}
return res;
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index 885ef1c397d..28bddb75df2 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -29,10 +29,8 @@
/*
TODO: future development directions:
- 1. add real constants for XPATH_NODESET_CMP and XPATH_NODESET
- into enum Type in item.h.
- 2. add nodeset_to_nodeset_comparator
- 3. add lacking functions:
+ 1. add nodeset_to_nodeset_comparator
+ 2. add lacking functions:
- name()
- lang()
- string()
@@ -44,7 +42,7 @@
- substring-after()
- normalize-space()
- substring-before()
- 4. add lacking axis:
+ 3. add lacking axis:
- following-sibling
- following,
- preceding-sibling
@@ -151,6 +149,9 @@ public:
};
+static Type_handler_long_blob type_handler_xpath_nodeset;
+
+
/*
Common features of the functions returning a node set.
*/
@@ -181,16 +182,29 @@ public:
void prepare(String *nodeset)
{
prepare_nodes();
- String *res= args[0]->val_nodeset(&tmp_value);
+ String *res= args[0]->val_raw(&tmp_value);
fltbeg= (MY_XPATH_FLT*) res->ptr();
fltend= (MY_XPATH_FLT*) (res->ptr() + res->length());
nodeset->length(0);
}
- enum Type type() const { return XPATH_NODESET; }
+ const Type_handler *type_handler() const
+ {
+ return &type_handler_xpath_nodeset;
+ }
+ const Type_handler *fixed_type_handler() const
+ {
+ return &type_handler_xpath_nodeset;
+ }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ DBUG_ASSERT(0);
+ return NULL;
+ }
String *val_str(String *str)
{
prepare_nodes();
- String *res= val_nodeset(&tmp2_value);
+ String *res= val_raw(&tmp2_value);
fltbeg= (MY_XPATH_FLT*) res->ptr();
fltend= (MY_XPATH_FLT*) (res->ptr() + res->length());
String active;
@@ -247,7 +261,7 @@ public:
Item_nodeset_func_rootelement(THD *thd, String *pxml):
Item_nodeset_func(thd, pxml) {}
const char *func_name() const { return "xpath_rootelement"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_rootelement>(thd, this); }
};
@@ -260,7 +274,7 @@ public:
Item_nodeset_func_union(THD *thd, Item *a, Item *b, String *pxml):
Item_nodeset_func(thd, a, b, pxml) {}
const char *func_name() const { return "xpath_union"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_union>(thd, this); }
};
@@ -294,7 +308,7 @@ public:
String *pxml):
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_selfbyname"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_selfbyname>(thd, this); }
};
@@ -308,7 +322,7 @@ public:
String *pxml):
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_childbyname"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_childbyname>(thd, this); }
};
@@ -324,7 +338,7 @@ public:
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml),
need_self(need_self_arg) {}
const char *func_name() const { return "xpath_descendantbyname"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_descendantbyname>(thd, this); }
};
@@ -340,7 +354,7 @@ public:
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml),
need_self(need_self_arg) {}
const char *func_name() const { return "xpath_ancestorbyname"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, this); }
};
@@ -354,7 +368,7 @@ public:
String *pxml):
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_parentbyname"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_parentbyname>(thd, this); }
};
@@ -368,7 +382,7 @@ public:
uint l_arg, String *pxml):
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_attributebyname"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_attributebyname>(thd, this); }
};
@@ -385,7 +399,7 @@ public:
Item_nodeset_func_predicate(THD *thd, Item *a, Item *b, String *pxml):
Item_nodeset_func(thd, a, b, pxml) {}
const char *func_name() const { return "xpath_predicate"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_predicate>(thd, this); }
};
@@ -398,7 +412,7 @@ public:
Item_nodeset_func_elementbyindex(THD *thd, Item *a, Item *b, String *pxml):
Item_nodeset_func(thd, a, b, pxml) { }
const char *func_name() const { return "xpath_elementbyindex"; }
- String *val_nodeset(String *nodeset);
+ String *val_raw(String *nodeset);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_nodeset_func_elementbyindex>(thd, this); }
};
@@ -420,9 +434,9 @@ public:
const char *func_name() const { return "xpath_cast_bool"; }
longlong val_int()
{
- if (args[0]->type() == XPATH_NODESET)
+ if (args[0]->fixed_type_handler() == &type_handler_xpath_nodeset)
{
- String *flt= args[0]->val_nodeset(&tmp_value);
+ String *flt= args[0]->val_raw(&tmp_value);
return flt->length() == sizeof(MY_XPATH_FLT) ? 1 : 0;
}
return args[0]->val_real() ? 1 : 0;
@@ -455,7 +469,7 @@ public:
String *string_cache;
Item_nodeset_context_cache(THD *thd, String *str_arg, String *pxml):
Item_nodeset_func(thd, pxml), string_cache(str_arg) { }
- String *val_nodeset(String *res)
+ String *val_raw(String *res)
{ return string_cache; }
bool fix_length_and_dec() { max_length= MAX_BLOB_WIDTH;; return FALSE; }
Item *get_copy(THD *thd)
@@ -474,7 +488,7 @@ public:
bool fix_length_and_dec() { max_length=10; return FALSE; }
longlong val_int()
{
- String *flt= args[0]->val_nodeset(&tmp_value);
+ String *flt= args[0]->val_raw(&tmp_value);
if (flt->length() == sizeof(MY_XPATH_FLT))
return ((MY_XPATH_FLT*)flt->ptr())->pos + 1;
return 0;
@@ -496,7 +510,7 @@ public:
longlong val_int()
{
uint predicate_supplied_context_size;
- String *res= args[0]->val_nodeset(&tmp_value);
+ String *res= args[0]->val_raw(&tmp_value);
if (res->length() == sizeof(MY_XPATH_FLT) &&
(predicate_supplied_context_size= ((MY_XPATH_FLT*)res->ptr())->size))
return predicate_supplied_context_size;
@@ -519,7 +533,7 @@ public:
double val_real()
{
double sum= 0;
- String *res= args[0]->val_nodeset(&tmp_value);
+ String *res= args[0]->val_raw(&tmp_value);
MY_XPATH_FLT *fltbeg= (MY_XPATH_FLT*) res->ptr();
MY_XPATH_FLT *fltend= (MY_XPATH_FLT*) (res->ptr() + res->length());
uint numnodes= pxml->length() / sizeof(MY_XML_NODE);
@@ -587,19 +601,23 @@ public:
Item_nodeset_to_const_comparator(THD *thd, Item *nodeset, Item *cmpfunc,
String *p):
Item_bool_func(thd, nodeset, cmpfunc), pxml(p) {}
- enum Type type() const { return XPATH_NODESET_CMP; };
const char *func_name() const { return "xpath_nodeset_to_const_comparator"; }
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
-
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ DBUG_ASSERT(0);
+ return NULL;
+ }
longlong val_int()
{
Item_func *comp= (Item_func*)args[1];
Item_string_xml_non_const *fake=
(Item_string_xml_non_const*)(comp->arguments()[0]);
- String *res= args[0]->val_nodeset(&tmp_nodeset);
+ String *res= args[0]->val_raw(&tmp_nodeset);
MY_XPATH_FLT *fltbeg= (MY_XPATH_FLT*) res->ptr();
MY_XPATH_FLT *fltend= (MY_XPATH_FLT*) (res->ptr() + res->length());
MY_XML_NODE *nodebeg= (MY_XML_NODE*) pxml->ptr();
@@ -630,7 +648,7 @@ public:
};
-String *Item_nodeset_func_rootelement::val_nodeset(String *nodeset)
+String *Item_nodeset_func_rootelement::val_raw(String *nodeset)
{
nodeset->length(0);
((XPathFilter*)nodeset)->append_element(0, 0);
@@ -638,11 +656,11 @@ String *Item_nodeset_func_rootelement::val_nodeset(String *nodeset)
}
-String * Item_nodeset_func_union::val_nodeset(String *nodeset)
+String * Item_nodeset_func_union::val_raw(String *nodeset)
{
uint num_nodes= pxml->length() / sizeof(MY_XML_NODE);
- String set0, *s0= args[0]->val_nodeset(&set0);
- String set1, *s1= args[1]->val_nodeset(&set1);
+ String set0, *s0= args[0]->val_raw(&set0);
+ String set1, *s1= args[1]->val_raw(&set1);
String both_str;
both_str.alloc(num_nodes);
char *both= (char*) both_str.ptr();
@@ -669,7 +687,7 @@ String * Item_nodeset_func_union::val_nodeset(String *nodeset)
}
-String *Item_nodeset_func_selfbyname::val_nodeset(String *nodeset)
+String *Item_nodeset_func_selfbyname::val_raw(String *nodeset)
{
prepare(nodeset);
for (MY_XPATH_FLT *flt= fltbeg; flt < fltend; flt++)
@@ -683,7 +701,7 @@ String *Item_nodeset_func_selfbyname::val_nodeset(String *nodeset)
}
-String *Item_nodeset_func_childbyname::val_nodeset(String *nodeset)
+String *Item_nodeset_func_childbyname::val_raw(String *nodeset)
{
prepare(nodeset);
for (MY_XPATH_FLT *flt= fltbeg; flt < fltend; flt++)
@@ -704,7 +722,7 @@ String *Item_nodeset_func_childbyname::val_nodeset(String *nodeset)
}
-String *Item_nodeset_func_descendantbyname::val_nodeset(String *nodeset)
+String *Item_nodeset_func_descendantbyname::val_raw(String *nodeset)
{
prepare(nodeset);
for (MY_XPATH_FLT *flt= fltbeg; flt < fltend; flt++)
@@ -726,7 +744,7 @@ String *Item_nodeset_func_descendantbyname::val_nodeset(String *nodeset)
}
-String *Item_nodeset_func_ancestorbyname::val_nodeset(String *nodeset)
+String *Item_nodeset_func_ancestorbyname::val_raw(String *nodeset)
{
char *active;
String active_str;
@@ -768,7 +786,7 @@ String *Item_nodeset_func_ancestorbyname::val_nodeset(String *nodeset)
}
-String *Item_nodeset_func_parentbyname::val_nodeset(String *nodeset)
+String *Item_nodeset_func_parentbyname::val_raw(String *nodeset)
{
char *active;
String active_str;
@@ -791,7 +809,7 @@ String *Item_nodeset_func_parentbyname::val_nodeset(String *nodeset)
}
-String *Item_nodeset_func_attributebyname::val_nodeset(String *nodeset)
+String *Item_nodeset_func_attributebyname::val_raw(String *nodeset)
{
prepare(nodeset);
for (MY_XPATH_FLT *flt= fltbeg; flt < fltend; flt++)
@@ -812,7 +830,7 @@ String *Item_nodeset_func_attributebyname::val_nodeset(String *nodeset)
}
-String *Item_nodeset_func_predicate::val_nodeset(String *str)
+String *Item_nodeset_func_predicate::val_raw(String *str)
{
Item_nodeset_func *nodeset_func= (Item_nodeset_func*) args[0];
uint pos= 0, size;
@@ -831,7 +849,7 @@ String *Item_nodeset_func_predicate::val_nodeset(String *str)
}
-String *Item_nodeset_func_elementbyindex::val_nodeset(String *nodeset)
+String *Item_nodeset_func_elementbyindex::val_raw(String *nodeset)
{
Item_nodeset_func *nodeset_func= (Item_nodeset_func*) args[0];
prepare(nodeset);
@@ -844,7 +862,9 @@ String *Item_nodeset_func_elementbyindex::val_nodeset(String *nodeset)
flt->pos,
size);
int index= (int) (args[1]->val_int()) - 1;
- if (index >= 0 && (flt->pos == (uint) index || args[1]->is_bool_type()))
+ if (index >= 0 &&
+ (flt->pos == (uint) index ||
+ (args[1]->type_handler()->is_bool_type())))
((XPathFilter*)nodeset)->append_element(flt->num, pos++);
}
return nodeset;
@@ -857,7 +877,7 @@ String *Item_nodeset_func_elementbyindex::val_nodeset(String *nodeset)
*/
static Item* nodeset2bool(MY_XPATH *xpath, Item *item)
{
- if (item->type() == Item::XPATH_NODESET)
+ if (item->fixed_type_handler() == &type_handler_xpath_nodeset)
return new (xpath->thd->mem_root)
Item_xpath_cast_bool(xpath->thd, item, xpath->pxml);
return item;
@@ -987,13 +1007,13 @@ static Item *create_comparator(MY_XPATH *xpath,
int oper, MY_XPATH_LEX *context,
Item *a, Item *b)
{
- if (a->type() != Item::XPATH_NODESET &&
- b->type() != Item::XPATH_NODESET)
+ if (a->fixed_type_handler() != &type_handler_xpath_nodeset &&
+ b->fixed_type_handler() != &type_handler_xpath_nodeset)
{
return eq_func(xpath->thd, oper, a, b); // two scalar arguments
}
- else if (a->type() == Item::XPATH_NODESET &&
- b->type() == Item::XPATH_NODESET)
+ else if (a->fixed_type_handler() == &type_handler_xpath_nodeset &&
+ b->fixed_type_handler() == &type_handler_xpath_nodeset)
{
uint len= (uint)(xpath->query.end - context->beg);
if (len <= 32)
@@ -1023,7 +1043,7 @@ static Item *create_comparator(MY_XPATH *xpath,
Item_string_xml_non_const(thd, "", 0, xpath->cs));
Item_nodeset_func *nodeset;
Item *scalar, *comp;
- if (a->type() == Item::XPATH_NODESET)
+ if (a->fixed_type_handler() == &type_handler_xpath_nodeset)
{
nodeset= (Item_nodeset_func*) a;
scalar= b;
@@ -1057,7 +1077,7 @@ static Item* nametestfunc(MY_XPATH *xpath,
MEM_ROOT *mem_root= thd->mem_root;
DBUG_ASSERT(arg != 0);
- DBUG_ASSERT(arg->type() == Item::XPATH_NODESET);
+ DBUG_ASSERT(arg->fixed_type_handler() == &type_handler_xpath_nodeset);
DBUG_ASSERT(beg != 0);
DBUG_ASSERT(len > 0);
@@ -1310,7 +1330,7 @@ static Item *create_func_substr(MY_XPATH *xpath, Item **args, uint nargs)
static Item *create_func_count(MY_XPATH *xpath, Item **args, uint nargs)
{
- if (args[0]->type() != Item::XPATH_NODESET)
+ if (args[0]->fixed_type_handler() != &type_handler_xpath_nodeset)
return 0;
return new (xpath->thd->mem_root) Item_func_xpath_count(xpath->thd, args[0], xpath->pxml);
}
@@ -1318,7 +1338,7 @@ static Item *create_func_count(MY_XPATH *xpath, Item **args, uint nargs)
static Item *create_func_sum(MY_XPATH *xpath, Item **args, uint nargs)
{
- if (args[0]->type() != Item::XPATH_NODESET)
+ if (args[0]->fixed_type_handler() != &type_handler_xpath_nodeset)
return 0;
return new (xpath->thd->mem_root)
Item_func_xpath_sum(xpath->thd, args[0], xpath->pxml);
@@ -1797,7 +1817,8 @@ my_xpath_parse_AxisSpecifier_NodeTest_opt_Predicate_list(MY_XPATH *xpath)
xpath->item= nodeset2bool(xpath, xpath->item);
- if (xpath->item->is_bool_type())
+ const Type_handler *fh;
+ if ((fh= xpath->item->fixed_type_handler()) && fh->is_bool_type())
{
xpath->context= new (xpath->thd->mem_root)
Item_nodeset_func_predicate(xpath->thd, prev_context,
@@ -2051,11 +2072,11 @@ static int my_xpath_parse_UnionExpr(MY_XPATH *xpath)
while (my_xpath_parse_term(xpath, MY_XPATH_LEX_VLINE))
{
Item *prev= xpath->item;
- if (prev->type() != Item::XPATH_NODESET)
+ if (prev->fixed_type_handler() != &type_handler_xpath_nodeset)
return 0;
if (!my_xpath_parse_PathExpr(xpath)
- || xpath->item->type() != Item::XPATH_NODESET)
+ || xpath->item->fixed_type_handler() != &type_handler_xpath_nodeset)
{
xpath->error= 1;
return 0;
@@ -2093,7 +2114,7 @@ my_xpath_parse_FilterExpr_opt_slashes_RelativeLocationPath(MY_XPATH *xpath)
if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH))
return 1;
- if (xpath->item->type() != Item::XPATH_NODESET)
+ if (xpath->item->fixed_type_handler() != &type_handler_xpath_nodeset)
{
xpath->lasttok= xpath->prevtok;
xpath->error= 1;
@@ -3065,7 +3086,7 @@ String *Item_func_xml_update::val_str(String *str)
null_value= 0;
if (!nodeset_func || get_xml(&xml) ||
!(rep= args[2]->val_str(&tmp_value3)) ||
- !(nodeset= nodeset_func->val_nodeset(&tmp_value2)))
+ !(nodeset= nodeset_func->val_raw(&tmp_value2)))
{
null_value= 1;
return 0;
diff --git a/sql/lex.h b/sql/lex.h
index 823e95bb863..e35e109a3bf 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -55,6 +55,7 @@ SYMBOL symbols[] = {
{ ">>", SYM(SHIFT_RIGHT)},
{ "<=>", SYM(EQUAL_SYM)},
{ "ACCESSIBLE", SYM(ACCESSIBLE_SYM)},
+ { "ACCOUNT", SYM(ACCOUNT_SYM)},
{ "ACTION", SYM(ACTION)},
{ "ADD", SYM(ADD)},
{ "ADMIN", SYM(ADMIN_SYM)},
@@ -230,6 +231,7 @@ SYMBOL symbols[] = {
{ "EXISTS", SYM(EXISTS)},
{ "EXIT", SYM(EXIT_MARIADB_SYM)},
{ "EXPANSION", SYM(EXPANSION_SYM)},
+ { "EXPIRE", SYM(EXPIRE_SYM)},
{ "EXPORT", SYM(EXPORT_SYM)},
{ "EXPLAIN", SYM(DESCRIBE)},
{ "EXTENDED", SYM(EXTENDED_SYM)},
@@ -418,6 +420,7 @@ SYMBOL symbols[] = {
{ "NATIONAL", SYM(NATIONAL_SYM)},
{ "NATURAL", SYM(NATURAL)},
{ "NCHAR", SYM(NCHAR_SYM)},
+ { "NEVER", SYM(NEVER_SYM)},
{ "NEW", SYM(NEW_SYM)},
{ "NEXT", SYM(NEXT_SYM)},
{ "NEXTVAL", SYM(NEXTVAL_SYM)},
@@ -476,6 +479,7 @@ SYMBOL symbols[] = {
{ "POINT", SYM(POINT_SYM)},
{ "POLYGON", SYM(POLYGON)},
{ "PORT", SYM(PORT_SYM)},
+ { "PORTION", SYM(PORTION_SYM)},
{ "PRECEDES", SYM(PRECEDES_SYM)},
{ "PRECEDING", SYM(PRECEDING_SYM)},
{ "PRECISION", SYM(PRECISION)},
@@ -589,6 +593,7 @@ SYMBOL symbols[] = {
{ "SONAME", SYM(SONAME_SYM)},
{ "SOUNDS", SYM(SOUNDS_SYM)},
{ "SOURCE", SYM(SOURCE_SYM)},
+ { "STAGE", SYM(STAGE_SYM)},
{ "STORED", SYM(STORED_SYM)},
{ "SPATIAL", SYM(SPATIAL_SYM)},
{ "SPECIFIC", SYM(SPECIFIC_SYM)},
diff --git a/sql/lex_string.h b/sql/lex_string.h
index ddda73b2200..b638e7111f8 100644
--- a/sql/lex_string.h
+++ b/sql/lex_string.h
@@ -37,6 +37,10 @@ static inline bool cmp(const LEX_CSTRING *a, const LEX_CSTRING *b)
return a->length != b->length ||
(a->length && memcmp(a->str, b->str, a->length));
}
+static inline bool cmp(const LEX_CSTRING a, const LEX_CSTRING b)
+{
+ return a.length != b.length || (a.length && memcmp(a.str, b.str, a.length));
+}
/*
Compare if two LEX_CSTRING are equal. Assumption is that
diff --git a/sql/lock.cc b/sql/lock.cc
index 4d055f58242..6483519e4e0 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -1,5 +1,6 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -77,8 +78,12 @@
#include "sql_base.h" // close_tables_for_reopen
#include "sql_parse.h" // is_log_table_write_query
#include "sql_acl.h" // SUPER_ACL
+#include "sql_handler.h"
#include <hash.h>
+#ifdef WITH_WSREP
#include "wsrep_mysqld.h"
+#include "wsrep_server_state.h"
+#endif
/**
@defgroup Locking Locking
@@ -858,10 +863,9 @@ bool lock_schema_name(THD *thd, const char *db)
return TRUE;
}
- if (thd->global_read_lock.can_acquire_protection())
+ if (thd->has_read_only_protection())
return TRUE;
- global_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
- MDL_STATEMENT);
+ global_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_DDL, MDL_STATEMENT);
mdl_request.init(MDL_key::SCHEMA, db, "", MDL_EXCLUSIVE, MDL_TRANSACTION);
mdl_requests.push_front(&mdl_request);
@@ -917,10 +921,9 @@ bool lock_object_name(THD *thd, MDL_key::enum_mdl_namespace mdl_type,
DBUG_ASSERT(name);
DEBUG_SYNC(thd, "before_wait_locked_pname");
- if (thd->global_read_lock.can_acquire_protection())
+ if (thd->has_read_only_protection())
return TRUE;
- global_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
- MDL_STATEMENT);
+ global_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_DDL, MDL_STATEMENT);
schema_request.init(MDL_key::SCHEMA, db, "", MDL_INTENTION_EXCLUSIVE,
MDL_TRANSACTION);
mdl_request.init(mdl_type, db, name, MDL_EXCLUSIVE, MDL_TRANSACTION);
@@ -951,10 +954,10 @@ bool lock_object_name(THD *thd, MDL_key::enum_mdl_namespace mdl_type,
semi-automatic. We assume that any statement which should be blocked
by global read lock will either open and acquires write-lock on tables
or acquires metadata locks on objects it is going to modify. For any
- such statement global IX metadata lock is automatically acquired for
- its duration (in case of LOCK TABLES until end of LOCK TABLES mode).
- And lock_global_read_lock() simply acquires global S metadata lock
- and thus prohibits execution of statements which modify data (unless
+ such statement MDL_BACKUP_STMT metadata lock is automatically acquired
+ for its duration (in case of LOCK TABLES until end of LOCK TABLES mode).
+ And lock_global_read_lock() simply acquires MDL_BACKUP_FTWRL1 metadata
+ lock and thus prohibits execution of statements which modify data (unless
they modify only temporary tables). If deadlock happens it is detected
by MDL subsystem and resolved in the standard fashion (by backing-off
metadata locks acquired so far and restarting open tables process
@@ -995,11 +998,23 @@ bool lock_object_name(THD *thd, MDL_key::enum_mdl_namespace mdl_type,
/**
Take global read lock, wait if there is protection against lock.
- If the global read lock is already taken by this thread, then nothing is done.
+ If the global read lock is already taken by this thread, then nothing is
+ done.
+
+ Concurrent thread can acquire protection against global read lock either
+ before or after it got table metadata lock. This may lead to a deadlock if
+ there is pending global read lock request. E.g.
+ t1 does DML, holds SHARED table lock, waiting for t3 (GRL protection)
+ t2 does DDL, holds GRL protection, waiting for t1 (EXCLUSIVE)
+ t3 does FTWRL, has pending GRL, waiting for t2 (GRL)
+
+ Since this is very seldom deadlock and FTWRL connection must not hold any
+ other locks, FTWRL connection is made deadlock victim and attempt to acquire
+ GRL retried.
See also "Handling of global read locks" above.
- @param thd Reference to thread.
+ @param thd Reference to thread.
@retval False Success, global read lock set, commits are NOT blocked.
@retval True Failure, thread was killed.
@@ -1011,17 +1026,43 @@ bool Global_read_lock::lock_global_read_lock(THD *thd)
if (!m_state)
{
+ MDL_deadlock_and_lock_abort_error_handler mdl_deadlock_handler;
MDL_request mdl_request;
+ bool result;
- DBUG_ASSERT(! thd->mdl_context.is_lock_owner(MDL_key::GLOBAL, "", "",
- MDL_SHARED));
- mdl_request.init(MDL_key::GLOBAL, "", "", MDL_SHARED, MDL_EXPLICIT);
-
- if (thd->mdl_context.acquire_lock(&mdl_request,
- thd->variables.lock_wait_timeout))
+ if (thd->current_backup_stage != BACKUP_FINISHED)
+ {
+ my_error(ER_BACKUP_LOCK_IS_ACTIVE, MYF(0));
DBUG_RETURN(1);
+ }
+
+ /*
+ Release HANDLER OPEN by the current THD as they may cause deadlocks
+ if another thread is trying to simultaneous drop the table
+ */
+ mysql_ha_cleanup_no_free(thd);
+ DEBUG_SYNC(thd, "ftwrl_before_lock");
+
+ DBUG_ASSERT(! thd->mdl_context.is_lock_owner(MDL_key::BACKUP, "", "",
+ MDL_BACKUP_FTWRL1));
+ DBUG_ASSERT(! thd->mdl_context.is_lock_owner(MDL_key::BACKUP, "", "",
+ MDL_BACKUP_FTWRL2));
+ mdl_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_FTWRL1,
+ MDL_EXPLICIT);
+
+ do
+ {
+ mdl_deadlock_handler.init();
+ thd->push_internal_handler(&mdl_deadlock_handler);
+ result= thd->mdl_context.acquire_lock(&mdl_request,
+ thd->variables.lock_wait_timeout);
+ thd->pop_internal_handler();
+ } while (mdl_deadlock_handler.need_reopen());
- m_mdl_global_shared_lock= mdl_request.ticket;
+ if (result)
+ DBUG_RETURN(true);
+
+ m_mdl_global_read_lock= mdl_request.ticket;
m_state= GRL_ACQUIRED;
}
/*
@@ -1050,7 +1091,7 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
{
DBUG_ENTER("unlock_global_read_lock");
- DBUG_ASSERT(m_mdl_global_shared_lock && m_state);
+ DBUG_ASSERT(m_mdl_global_read_lock && m_state);
if (thd->global_disable_checkpoint)
{
@@ -1061,31 +1102,30 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
}
}
- if (m_mdl_blocks_commits_lock)
- {
- thd->mdl_context.release_lock(m_mdl_blocks_commits_lock);
- m_mdl_blocks_commits_lock= NULL;
+ thd->mdl_context.release_lock(m_mdl_global_read_lock);
+
#ifdef WITH_WSREP
- if (WSREP(thd) || wsrep_node_is_donor())
+ if (m_state == GRL_ACQUIRED_AND_BLOCKS_COMMIT &&
+ wsrep_locked_seqno != WSREP_SEQNO_UNDEFINED)
+ {
+ Wsrep_server_state& server_state= Wsrep_server_state::instance();
+ if (server_state.state() == Wsrep_server_state::s_donor ||
+ (WSREP_NNULL(thd) &&
+ server_state.state() != Wsrep_server_state::s_synced))
{
+ server_state.resume();
+ wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
+ }
+ else if (WSREP_NNULL(thd) &&
+ server_state.state() == Wsrep_server_state::s_synced)
+ {
+ server_state.resume_and_resync();
wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
- wsrep->resume(wsrep);
- /* resync here only if we did implicit desync earlier */
- if (!wsrep_desync && wsrep_node_is_synced())
- {
- int ret = wsrep->resync(wsrep);
- if (ret != WSREP_OK)
- {
- WSREP_WARN("resync failed %d for FTWRL: db: %s, query: %s",
- ret, thd->get_db(), thd->query());
- DBUG_VOID_RETURN;
- }
- }
}
-#endif /* WITH_WSREP */
}
- thd->mdl_context.release_lock(m_mdl_global_shared_lock);
- m_mdl_global_shared_lock= NULL;
+#endif /* WITH_WSREP */
+
+ m_mdl_global_read_lock= NULL;
m_state= GRL_NONE;
DBUG_VOID_RETURN;
@@ -1109,7 +1149,6 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
bool Global_read_lock::make_global_read_lock_block_commit(THD *thd)
{
- MDL_request mdl_request;
DBUG_ENTER("make_global_read_lock_block_commit");
/*
If we didn't succeed lock_global_read_lock(), or if we already succeeded
@@ -1119,77 +1158,40 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd)
if (m_state != GRL_ACQUIRED)
DBUG_RETURN(0);
-#ifdef WITH_WSREP
- if (WSREP(thd) && m_mdl_blocks_commits_lock)
- {
- WSREP_DEBUG("GRL was in block commit mode when entering "
- "make_global_read_lock_block_commit");
- DBUG_RETURN(FALSE);
- }
-#endif /* WITH_WSREP */
-
- mdl_request.init(MDL_key::COMMIT, "", "", MDL_SHARED, MDL_EXPLICIT);
-
- if (thd->mdl_context.acquire_lock(&mdl_request,
- thd->variables.lock_wait_timeout))
+ if (thd->mdl_context.upgrade_shared_lock(m_mdl_global_read_lock,
+ MDL_BACKUP_FTWRL2,
+ thd->variables.lock_wait_timeout))
DBUG_RETURN(TRUE);
- m_mdl_blocks_commits_lock= mdl_request.ticket;
m_state= GRL_ACQUIRED_AND_BLOCKS_COMMIT;
#ifdef WITH_WSREP
- /* Native threads should bail out before wsrep oprations to follow.
- Donor servicing thread is an exception, it should pause provider but not desync,
- as it is already desynced in donor state
+ /* Native threads should bail out before wsrep operations to follow.
+ Donor servicing thread is an exception, it should pause provider
+ but not desync, as it is already desynced in donor state.
+ Desync should be called only when we are in synced state.
*/
- if (!WSREP(thd) && !wsrep_node_is_donor())
+ Wsrep_server_state& server_state= Wsrep_server_state::instance();
+ wsrep::seqno paused_seqno;
+ if (server_state.state() == Wsrep_server_state::s_donor ||
+ (WSREP_NNULL(thd) &&
+ server_state.state() != Wsrep_server_state::s_synced))
{
- DBUG_RETURN(FALSE);
+ paused_seqno= server_state.pause();
}
-
- /* if already desynced or donor, avoid double desyncing
- if not in PC and synced, desyncing is not possible either
- */
- if (wsrep_desync || !wsrep_node_is_synced())
+ else if (WSREP_NNULL(thd) &&
+ server_state.state() == Wsrep_server_state::s_synced)
{
- WSREP_DEBUG("desync set upfont, skipping implicit desync for FTWRL: %d",
- wsrep_desync);
+ paused_seqno= server_state.desync_and_pause();
}
else
{
- int rcode;
- WSREP_DEBUG("running implicit desync for node");
- rcode = wsrep->desync(wsrep);
- if (rcode != WSREP_OK)
- {
- WSREP_WARN("FTWRL desync failed %d for schema: %s, query: %s",
- rcode, thd->get_db(), thd->query());
- my_message(ER_LOCK_DEADLOCK, "wsrep desync failed for FTWRL", MYF(0));
- DBUG_RETURN(TRUE);
- }
- }
-
- long long ret = wsrep->pause(wsrep);
- if (ret >= 0)
- {
- wsrep_locked_seqno= ret;
+ DBUG_RETURN(FALSE);
}
- else if (ret != -ENOSYS) /* -ENOSYS - no provider */
+ WSREP_INFO("Server paused at: %lld", paused_seqno.get());
+ if (paused_seqno.get() >= 0)
{
- long long ret = wsrep->pause(wsrep);
- if (ret >= 0)
- {
- wsrep_locked_seqno= ret;
- }
- else if (ret != -ENOSYS) /* -ENOSYS - no provider */
- {
- WSREP_ERROR("Failed to pause provider: %lld (%s)", -ret, strerror(-ret));
-
- DBUG_ASSERT(m_mdl_blocks_commits_lock == NULL);
- wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
- my_error(ER_LOCK_DEADLOCK, MYF(0));
- DBUG_RETURN(TRUE);
- }
+ wsrep_locked_seqno= paused_seqno.get();
}
#endif /* WITH_WSREP */
DBUG_RETURN(FALSE);
@@ -1204,10 +1206,8 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd)
void Global_read_lock::set_explicit_lock_duration(THD *thd)
{
- if (m_mdl_global_shared_lock)
- thd->mdl_context.set_lock_duration(m_mdl_global_shared_lock, MDL_EXPLICIT);
- if (m_mdl_blocks_commits_lock)
- thd->mdl_context.set_lock_duration(m_mdl_blocks_commits_lock, MDL_EXPLICIT);
+ if (m_mdl_global_read_lock)
+ thd->mdl_context.set_lock_duration(m_mdl_global_read_lock, MDL_EXPLICIT);
}
/**
diff --git a/sql/log.cc b/sql/log.cc
index 7ca9b38dc6e..1ddb3c412ff 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -55,10 +55,14 @@
#include "sql_show.h"
#include "my_pthread.h"
#include "semisync_master.h"
-#include "wsrep_mysqld.h"
#include "sp_rcontext.h"
#include "sp_head.h"
+#include "wsrep_mysqld.h"
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h"
+#endif /* WITH_WSREP */
+
/* max size of the log message */
#define MAX_LOG_BUFFER_SIZE 1024
#define MAX_TIME_SIZE 32
@@ -852,10 +856,10 @@ bool Log_to_csv_event_handler::
Open_tables_backup open_tables_backup;
CHARSET_INFO *client_cs= thd->variables.character_set_client;
bool save_time_zone_used;
- long query_time= (long) MY_MIN(query_utime/1000000, TIME_MAX_VALUE_SECONDS);
- long lock_time= (long) MY_MIN(lock_utime/1000000, TIME_MAX_VALUE_SECONDS);
- long query_time_micro= (long) (query_utime % 1000000);
- long lock_time_micro= (long) (lock_utime % 1000000);
+ ulong query_time= (ulong) MY_MIN(query_utime/1000000, TIME_MAX_VALUE_SECONDS);
+ ulong lock_time= (ulong) MY_MIN(lock_utime/1000000, TIME_MAX_VALUE_SECONDS);
+ ulong query_time_micro= (ulong) (query_utime % 1000000);
+ ulong lock_time_micro= (ulong) (lock_utime % 1000000);
DBUG_ENTER("Log_to_csv_event_handler::log_slow");
@@ -1148,6 +1152,10 @@ bool LOGGER::error_log_print(enum loglevel level, const char *format,
{
bool error= FALSE;
Log_event_handler **current_handler;
+ THD *thd= current_thd;
+
+ if (likely(thd))
+ thd->error_printed_to_log= 1;
/* currently we don't need locking here as there is no error_log table */
for (current_handler= error_log_handler_list ; *current_handler ;)
@@ -1680,7 +1688,7 @@ static int binlog_close_connection(handlerton *hton, THD *thd)
(binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
#ifdef WITH_WSREP
if (WSREP(thd) && cache_mngr && !cache_mngr->trx_cache.empty()) {
- IO_CACHE* cache= get_trans_log(thd);
+ IO_CACHE* cache= cache_mngr->get_binlog_cache_log(true);
uchar *buf;
size_t len=0;
wsrep_write_cache_buf(cache, &buf, &len);
@@ -2005,7 +2013,13 @@ static int binlog_commit(handlerton *hton, THD *thd, bool all)
thd->backup_stage(&org_stage);
THD_STAGE_INFO(thd, stage_binlog_write);
+#ifdef WITH_WSREP
+ // DON'T clear stmt cache in case we are in transaction
+ if (!cache_mngr->stmt_cache.empty() &&
+ (!wsrep_on(thd) || ending_trans(thd, all)))
+#else
if (!cache_mngr->stmt_cache.empty())
+#endif
{
error= binlog_commit_flush_stmt_cache(thd, all, cache_mngr);
}
@@ -2166,18 +2180,30 @@ void MYSQL_BIN_LOG::set_write_error(THD *thd, bool is_transactional)
{
if (is_transactional)
{
- my_message(ER_TRANS_CACHE_FULL, ER_THD(thd, ER_TRANS_CACHE_FULL), MYF(MY_WME));
+ my_message(ER_TRANS_CACHE_FULL, ER_THD(thd, ER_TRANS_CACHE_FULL), MYF(0));
}
else
{
- my_message(ER_STMT_CACHE_FULL, ER_THD(thd, ER_STMT_CACHE_FULL), MYF(MY_WME));
+ my_message(ER_STMT_CACHE_FULL, ER_THD(thd, ER_STMT_CACHE_FULL), MYF(0));
}
}
else
{
- my_error(ER_ERROR_ON_WRITE, MYF(MY_WME), name, errno);
+ my_error(ER_ERROR_ON_WRITE, MYF(0), name, errno);
}
-
+#ifdef WITH_WSREP
+ /* If wsrep transaction is active and binlog emulation is on,
+ binlog write error may leave transaction without any registered
+ htons. This makes wsrep rollback hooks to be skipped and the
+ transaction will remain alive in wsrep world after rollback.
+ Register binlog hton here to ensure that rollback happens in full. */
+ if (WSREP_EMULATE_BINLOG(thd))
+ {
+ if (is_transactional)
+ trans_register_ha(thd, TRUE, binlog_hton);
+ trans_register_ha(thd, FALSE, binlog_hton);
+ }
+#endif /* WITH_WSREP */
DBUG_VOID_RETURN;
}
@@ -2270,8 +2296,17 @@ static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv)
non-transactional table. Otherwise, truncate the binlog cache starting
from the SAVEPOINT command.
*/
+#ifdef WITH_WSREP
+ /* for streaming replication, we must replicate savepoint rollback so that
+ slaves can maintain SR transactions
+ */
+ if (unlikely(thd->wsrep_trx().is_streaming() ||
+ (trans_has_updated_non_trans_table(thd)) ||
+ (thd->variables.option_bits & OPTION_KEEP_LOG)))
+#else
if (unlikely(trans_has_updated_non_trans_table(thd) ||
(thd->variables.option_bits & OPTION_KEEP_LOG)))
+#endif /* WITH_WSREP */
{
char buf[1024];
String log_query(buf, sizeof(buf), &my_charset_bin);
@@ -2397,7 +2432,7 @@ static void setup_windows_event_source()
// Create the event source registry key
dwError= RegCreateKey(HKEY_LOCAL_MACHINE,
- "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\MySQL",
+ "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\MariaDB",
&hRegKey);
/* Name of the PE module that contains the message resource */
@@ -2429,11 +2464,19 @@ static void setup_windows_event_source()
exceeds FN_REFLEN; (ii) if the number of extensions is exhausted;
or (iii) some other error happened while examining the filesystem.
+ @param name Base name of file
+ @param min_log_number_to_use minimum log number to choose. Set by
+ CHANGE MASTER .. TO
+ @param last_used_log_number If 0, find log number based on files.
+ If not 0, then use *last_used_log_number +1
+ Will be update to new generated number
@return
+ 0 ok
nonzero if not possible to get unique filename.
*/
-static int find_uniq_filename(char *name, ulong next_log_number)
+static int find_uniq_filename(char *name, ulong min_log_number_to_use,
+ ulong *last_used_log_number)
{
uint i;
char buff[FN_REFLEN], ext_buf[FN_REFLEN];
@@ -2452,24 +2495,34 @@ static int find_uniq_filename(char *name, ulong next_log_number)
*end='.';
length= (size_t) (end - start + 1);
- if ((DBUG_EVALUATE_IF("error_unique_log_filename", 1,
- unlikely(!(dir_info= my_dir(buff,
- MYF(MY_DONT_SORT)))))))
- { // This shouldn't happen
- strmov(end,".1"); // use name+1
- DBUG_RETURN(1);
- }
- file_info= dir_info->dir_entry;
- max_found= next_log_number ? next_log_number-1 : 0;
- for (i= dir_info->number_of_files ; i-- ; file_info++)
+ /* The following matches the code for my_dir () below */
+ DBUG_EXECUTE_IF("error_unique_log_filename",
+ {
+ strmov(end,".1");
+ DBUG_RETURN(1);
+ });
+
+ if (*last_used_log_number)
+ max_found= *last_used_log_number;
+ else
{
- if (strncmp(file_info->name, start, length) == 0 &&
- test_if_number(file_info->name+length, &number,0))
+ if (unlikely(!(dir_info= my_dir(buff, MYF(MY_DONT_SORT)))))
+ { // This shouldn't happen
+ strmov(end,".1"); // use name+1
+ DBUG_RETURN(1);
+ }
+ file_info= dir_info->dir_entry;
+ max_found= min_log_number_to_use ? min_log_number_to_use-1 : 0;
+ for (i= dir_info->number_of_files ; i-- ; file_info++)
{
- set_if_bigger(max_found, number);
+ if (strncmp(file_info->name, start, length) == 0 &&
+ test_if_number(file_info->name+length, &number,0))
+ {
+ set_if_bigger(max_found, number);
+ }
}
+ my_dirend(dir_info);
}
- my_dirend(dir_info);
/* check if reached the maximum possible extension number */
if (max_found >= MAX_LOG_UNIQUE_FN_EXT)
@@ -2508,6 +2561,7 @@ index files.", name, ext_buf, (strlen(ext_buf) + (end - name)));
error= 1;
goto end;
}
+ *last_used_log_number= next;
/* print warning if reaching the end of available extensions. */
if ((next > (MAX_LOG_UNIQUE_FN_EXT - LOG_WARN_UNIQUE_FN_EXT_LEFT)))
@@ -2626,7 +2680,7 @@ bool MYSQL_LOG::open(
#endif
if ((file= mysql_file_open(log_file_key, log_file_name, open_flags,
- MYF(MY_WME | ME_WAITTANG))) < 0)
+ MYF(MY_WME))) < 0)
goto err;
if (is_fifo)
@@ -2759,19 +2813,24 @@ int MYSQL_LOG::generate_new_name(char *new_name, const char *log_name,
ulong next_log_number)
{
fn_format(new_name, log_name, mysql_data_home, "", 4);
- if (log_type == LOG_BIN)
+ return 0;
+}
+
+int MYSQL_BIN_LOG::generate_new_name(char *new_name, const char *log_name,
+ ulong next_log_number)
+{
+ fn_format(new_name, log_name, mysql_data_home, "", 4);
+ if (!fn_ext(log_name)[0])
{
- if (!fn_ext(log_name)[0])
+ if (DBUG_EVALUATE_IF("binlog_inject_new_name_error", TRUE, FALSE) ||
+ unlikely(find_uniq_filename(new_name, next_log_number,
+ &last_used_log_number)))
{
- if (DBUG_EVALUATE_IF("binlog_inject_new_name_error", TRUE, FALSE) ||
- unlikely(find_uniq_filename(new_name, next_log_number)))
- {
- THD *thd= current_thd;
- if (unlikely(thd))
- my_error(ER_NO_UNIQUE_LOGFILE, MYF(ME_FATALERROR), log_name);
- sql_print_error(ER_DEFAULT(ER_NO_UNIQUE_LOGFILE), log_name);
- return 1;
- }
+ THD *thd= current_thd;
+ if (unlikely(thd))
+ my_error(ER_NO_UNIQUE_LOGFILE, MYF(ME_FATAL), log_name);
+ sql_print_error(ER_DEFAULT(ER_NO_UNIQUE_LOGFILE), log_name);
+ return 1;
}
}
return 0;
@@ -3171,7 +3230,8 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
MYSQL_BIN_LOG::MYSQL_BIN_LOG(uint *sync_period)
:reset_master_pending(0), mark_xid_done_waiting(0),
- bytes_written(0), file_id(1), open_count(1),
+ bytes_written(0), last_used_log_number(0),
+ file_id(1), open_count(1),
group_commit_queue(0), group_commit_queue_busy(FALSE),
num_commits(0), num_group_commits(0),
group_commit_trigger_count(0), group_commit_trigger_timeout(0),
@@ -3182,7 +3242,7 @@ MYSQL_BIN_LOG::MYSQL_BIN_LOG(uint *sync_period)
checksum_alg_reset(BINLOG_CHECKSUM_ALG_UNDEF),
relay_log_checksum_alg(BINLOG_CHECKSUM_ALG_UNDEF),
description_event_for_exec(0), description_event_for_queue(0),
- current_binlog_id(0)
+ current_binlog_id(0), reset_master_count(0)
{
/*
We don't want to initialize locks here as such initialization depends on
@@ -4148,6 +4208,8 @@ bool MYSQL_BIN_LOG::reset_logs(THD *thd, bool create_new_log,
name=0; // Protect against free
close(LOG_CLOSE_TO_BE_OPENED);
+ last_used_log_number= 0; // Reset log number cache
+
/*
First delete all old log files and then update the index file.
As we first delete the log files and do not use sort of logging,
@@ -4275,6 +4337,7 @@ err:
}
mysql_cond_broadcast(&COND_xid_list);
reset_master_pending--;
+ reset_master_count++;
mysql_mutex_unlock(&LOCK_xid_list);
}
@@ -4429,9 +4492,7 @@ int MYSQL_BIN_LOG::purge_first_log(Relay_log_info* rli, bool included)
0, 0, &log_space_reclaimed);
mysql_mutex_lock(&rli->log_space_lock);
- my_atomic_add64_explicit((volatile int64*)(&rli->log_space_total),
- (-(int64)log_space_reclaimed),
- MY_MEMORY_ORDER_RELAXED);
+ rli->log_space_total-= log_space_reclaimed;
mysql_cond_broadcast(&rli->log_space_cond);
mysql_mutex_unlock(&rli->log_space_lock);
@@ -4603,7 +4664,7 @@ int MYSQL_BIN_LOG::open_purge_index_file(bool destroy)
if (!my_b_inited(&purge_index_file))
{
if ((file= my_open(purge_index_file_name, O_RDWR | O_CREAT | O_BINARY,
- MYF(MY_WME | ME_WAITTANG))) < 0 ||
+ MYF(MY_WME))) < 0 ||
init_io_cache(&purge_index_file, file, IO_SIZE,
(destroy ? WRITE_CACHE : READ_CACHE),
0, 0, MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)))
@@ -5085,7 +5146,11 @@ bool MYSQL_BIN_LOG::is_active(const char *log_file_name_arg)
int MYSQL_BIN_LOG::new_file()
{
- return new_file_impl(1);
+ int res;
+ mysql_mutex_lock(&LOCK_log);
+ res= new_file_impl();
+ mysql_mutex_unlock(&LOCK_log);
+ return res;
}
/*
@@ -5094,7 +5159,7 @@ int MYSQL_BIN_LOG::new_file()
*/
int MYSQL_BIN_LOG::new_file_without_locking()
{
- return new_file_impl(0);
+ return new_file_impl();
}
@@ -5110,7 +5175,7 @@ int MYSQL_BIN_LOG::new_file_without_locking()
The new file name is stored last in the index file
*/
-int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
+int MYSQL_BIN_LOG::new_file_impl()
{
int error= 0, close_on_error= FALSE;
char new_name[FN_REFLEN], *new_name_ptr, *old_name, *file_to_open;
@@ -5119,14 +5184,12 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
File UNINIT_VAR(old_file);
DBUG_ENTER("MYSQL_BIN_LOG::new_file_impl");
- if (need_lock)
- mysql_mutex_lock(&LOCK_log);
+ DBUG_ASSERT(log_type == LOG_BIN);
mysql_mutex_assert_owner(&LOCK_log);
if (!is_open())
{
DBUG_PRINT("info",("log is closed"));
- mysql_mutex_unlock(&LOCK_log);
DBUG_RETURN(error);
}
@@ -5145,7 +5208,7 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
#ifdef ENABLE_AND_FIX_HANG
close_on_error= TRUE;
#endif
- goto end;
+ goto end2;
}
new_name_ptr=new_name;
@@ -5172,7 +5235,7 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
close_on_error= TRUE;
my_printf_error(ER_ERROR_ON_WRITE,
ER_THD_OR_DEFAULT(current_thd, ER_CANT_OPEN_FILE),
- MYF(ME_FATALERROR), name, errno);
+ MYF(ME_FATAL), name, errno);
goto end;
}
bytes_written += r.data_written;
@@ -5241,14 +5304,21 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
/* handle reopening errors */
if (unlikely(error))
{
- my_error(ER_CANT_OPEN_FILE, MYF(ME_FATALERROR), file_to_open, error);
+ my_error(ER_CANT_OPEN_FILE, MYF(ME_FATAL), file_to_open, error);
close_on_error= TRUE;
}
my_free(old_name);
end:
+ /* In case of errors, reuse the last generated log file name */
+ if (unlikely(error))
+ {
+ DBUG_ASSERT(last_used_log_number > 0);
+ last_used_log_number--;
+ }
+end2:
if (delay_close)
{
clear_inuse_flag_when_closing(old_file);
@@ -5274,8 +5344,6 @@ end:
}
mysql_mutex_unlock(&LOCK_index);
- if (need_lock)
- mysql_mutex_unlock(&LOCK_log);
DBUG_RETURN(error);
}
@@ -5635,7 +5703,18 @@ THD::binlog_start_trans_and_stmt()
this->binlog_set_stmt_begin();
bool mstmt_mode= in_multi_stmt_transaction_mode();
#ifdef WITH_WSREP
- /* Write Gtid
+ /*
+ With wsrep binlog emulation we can skip the rest because the
+ binlog cache will not be written into binlog. Note however that
+ because of this the hton callbacks will not get called to clean
+ up the cache, so this must be done explicitly when the transaction
+ terminates.
+ */
+ if (WSREP_EMULATE_BINLOG_NNULL(this))
+ {
+ DBUG_VOID_RETURN;
+ }
+ /* Write Gtid
Get domain id only when gtid mode is set
If this event is replicate through a master then ,
we will forward the same gtid another nodes
@@ -5658,6 +5737,8 @@ THD::binlog_start_trans_and_stmt()
this->variables.gtid_domain_id,
true, LOG_EVENT_SUPPRESS_USE_F,
true, 0);
+ // Replicated events in writeset doesn't have checksum
+ gtid_event.checksum_alg= BINLOG_CHECKSUM_ALG_OFF;
gtid_event.server_id= this->variables.server_id;
writer.write(&gtid_event);
}
@@ -5749,7 +5830,7 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional,
/* Pre-conditions */
DBUG_ASSERT(is_current_stmt_binlog_format_row());
- DBUG_ASSERT(WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open());
+ DBUG_ASSERT(WSREP_EMULATE_BINLOG_NNULL(this) || mysql_bin_log.is_open());
DBUG_ASSERT(table->s->table_map_id != ULONG_MAX);
Table_map_log_event
@@ -5965,7 +6046,9 @@ MYSQL_BIN_LOG::write_gtid_event(THD *thd, bool standalone,
DBUG_PRINT("enter", ("standalone: %d", standalone));
#ifdef WITH_WSREP
- if (WSREP(thd) && thd->wsrep_trx_meta.gtid.seqno != -1 && wsrep_gtid_mode && !thd->variables.gtid_seq_no)
+ if (WSREP(thd) &&
+ (wsrep_thd_trx_seqno(thd) > 0) &&
+ wsrep_gtid_mode && !thd->variables.gtid_seq_no)
{
domain_id= wsrep_gtid_domain_id;
} else {
@@ -6068,7 +6151,7 @@ MYSQL_BIN_LOG::write_state_to_file()
goto end;
err:
- sql_print_error("Error writing binlog state to file '%s'.\n", buf);
+ sql_print_error("Error writing binlog state to file '%s'.", buf);
if (log_inited)
end_io_cache(&cache);
end:
@@ -6128,7 +6211,7 @@ MYSQL_BIN_LOG::read_state_from_file()
goto end;
err:
- sql_print_error("Error reading binlog GTID state from file '%s'.\n", buf);
+ sql_print_error("Error reading binlog GTID state from file '%s'.", buf);
end:
if (log_inited)
end_io_cache(&cache);
@@ -6282,7 +6365,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
*/
/* applier and replayer can skip writing binlog events */
if ((WSREP_EMULATE_BINLOG(thd) &&
- IF_WSREP(thd->wsrep_exec_mode != REPL_RECV, 0)) || is_open())
+ IF_WSREP(thd->wsrep_cs().mode() == wsrep::client_state::m_local, 0)) || is_open())
{
my_off_t UNINIT_VAR(my_org_b_tell);
#ifdef HAVE_REPLICATION
@@ -6313,11 +6396,26 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
if (direct)
{
+ /* We come here only for incident events */
int res;
uint64 commit_id= 0;
+ MDL_request mdl_request;
DBUG_PRINT("info", ("direct is set"));
+ DBUG_ASSERT(!thd->backup_commit_lock);
+
+ mdl_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_COMMIT, MDL_EXPLICIT);
+ if (thd->mdl_context.acquire_lock(&mdl_request,
+ thd->variables.lock_wait_timeout))
+ DBUG_RETURN(1);
+ thd->backup_commit_lock= &mdl_request;
+
if ((res= thd->wait_for_prior_commit()))
+ {
+ if (mdl_request.ticket)
+ thd->mdl_context.release_lock(mdl_request.ticket);
+ thd->backup_commit_lock= 0;
DBUG_RETURN(res);
+ }
file= &log_file;
my_org_b_tell= my_b_tell(file);
mysql_mutex_lock(&LOCK_log);
@@ -6332,7 +6430,11 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
commit_name.length);
commit_id= entry->val_int(&null_value);
});
- if (write_gtid_event(thd, true, using_trans, commit_id))
+ res= write_gtid_event(thd, true, using_trans, commit_id);
+ if (mdl_request.ticket)
+ thd->mdl_context.release_lock(mdl_request.ticket);
+ thd->backup_commit_lock= 0;
+ if (res)
goto err;
}
else
@@ -6472,25 +6574,8 @@ err:
it's list before dump-thread tries to send it
*/
update_binlog_end_pos(offset);
- /*
- If a transaction with the LOAD DATA statement is divided
- into logical mini-transactions (of the 10K rows) and binlog
- is rotated, then the last portion of data may be lost due to
- wsrep handler re-registration at the boundary of the split.
- Since splitting of the LOAD DATA into mini-transactions is
- logical, we should not allow these mini-transactions to fall
- into separate binlogs. Therefore, it is necessary to prohibit
- the rotation of binlog in the middle of processing LOAD DATA:
- */
-#ifdef WITH_WSREP
- if (!thd->wsrep_split_flag)
- {
-#endif /* WITH_WSREP */
if (unlikely((error= rotate(false, &check_purge))))
check_purge= false;
-#ifdef WITH_WSREP
- }
-#endif /* WITH_WSREP */
}
}
}
@@ -7233,25 +7318,8 @@ bool MYSQL_BIN_LOG::write_incident(THD *thd)
likely(!(error= flush_and_sync(0))))
{
update_binlog_end_pos();
- /*
- If a transaction with the LOAD DATA statement is divided
- into logical mini-transactions (of the 10K rows) and binlog
- is rotated, then the last portion of data may be lost due to
- wsrep handler re-registration at the boundary of the split.
- Since splitting of the LOAD DATA into mini-transactions is
- logical, we should not allow these mini-transactions to fall
- into separate binlogs. Therefore, it is necessary to prohibit
- the rotation of binlog in the middle of processing LOAD DATA:
- */
-#ifdef WITH_WSREP
- if (!thd->wsrep_split_flag)
- {
-#endif /* WITH_WSREP */
if (unlikely((error= rotate(false, &check_purge))))
check_purge= false;
-#ifdef WITH_WSREP
- }
-#endif /* WITH_WSREP */
}
offset= my_b_tell(&log_file);
@@ -7318,7 +7386,7 @@ MYSQL_BIN_LOG::write_binlog_checkpoint_event_already_locked(const char *name_arg
ability to do crash recovery - crash recovery will just have to scan a
bit more of the binlog than strictly necessary.
*/
- sql_print_error("Failed to write binlog checkpoint event to binary log\n");
+ sql_print_error("Failed to write binlog checkpoint event to binary log");
}
offset= my_b_tell(&log_file);
@@ -7448,6 +7516,8 @@ MYSQL_BIN_LOG::write_transaction_to_binlog(THD *thd,
new transaction directly to participate in the group commit.
@retval < 0 Error
+ @retval -2 WSREP error with commit ordering
+ @retval -3 WSREP return code to mark the leader
@retval > 0 If queued as the first entry in the queue (meaning this
is the leader)
@retval 0 Otherwise (queued as participant, leader handles the commit)
@@ -7459,7 +7529,11 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
group_commit_entry *entry, *orig_queue, *last;
wait_for_commit *cur;
wait_for_commit *wfc;
+ bool backup_lock_released= 0;
+ int result= 0;
+ THD *thd= orig_entry->thd;
DBUG_ENTER("MYSQL_BIN_LOG::queue_for_group_commit");
+ DBUG_ASSERT(thd == current_thd);
/*
Check if we need to wait for another transaction to commit before us.
@@ -7471,8 +7545,10 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
*/
wfc= orig_entry->thd->wait_for_commit_ptr;
orig_entry->queued_by_other= false;
- if (wfc && wfc->waitee)
+ if (wfc && wfc->waitee.load(std::memory_order_acquire))
{
+ wait_for_commit *loc_waitee;
+
mysql_mutex_lock(&wfc->LOCK_wait_commit);
/*
Do an extra check here, this time safely under lock.
@@ -7484,10 +7560,25 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
before setting the flag, so there is no risk that we can queue ahead of
it.
*/
- if (wfc->waitee && !wfc->waitee->commit_started)
+ if ((loc_waitee= wfc->waitee.load(std::memory_order_relaxed)) &&
+ !loc_waitee->commit_started)
{
PSI_stage_info old_stage;
- wait_for_commit *loc_waitee;
+
+ /*
+ Release MDL_BACKUP_COMMIT LOCK while waiting for other threads to
+ commit.
+ This is needed to avoid deadlock between the other threads (which not
+ yet have the MDL_BACKUP_COMMIT_LOCK) and any threads using
+ BACKUP LOCK BLOCK_COMMIT.
+ */
+ if (thd->backup_commit_lock && thd->backup_commit_lock->ticket &&
+ !backup_lock_released)
+ {
+ backup_lock_released= 1;
+ thd->mdl_context.release_lock(thd->backup_commit_lock->ticket);
+ thd->backup_commit_lock->ticket= 0;
+ }
/*
By setting wfc->opaque_pointer to our own entry, we mark that we are
@@ -7509,7 +7600,8 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
&wfc->LOCK_wait_commit,
&stage_waiting_for_prior_transaction_to_commit,
&old_stage);
- while ((loc_waitee= wfc->waitee) && !orig_entry->thd->check_killed(1))
+ while ((loc_waitee= wfc->waitee.load(std::memory_order_relaxed)) &&
+ !orig_entry->thd->check_killed(1))
mysql_cond_wait(&wfc->COND_wait_commit, &wfc->LOCK_wait_commit);
wfc->opaque_pointer= NULL;
DBUG_PRINT("info", ("After waiting for prior commit, queued_by_other=%d",
@@ -7527,14 +7619,18 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
do
{
mysql_cond_wait(&wfc->COND_wait_commit, &wfc->LOCK_wait_commit);
- } while (wfc->waitee);
+ } while (wfc->waitee.load(std::memory_order_relaxed));
}
else
{
/* We were killed, so remove us from the list of waitee. */
wfc->remove_from_list(&loc_waitee->subsequent_commits_list);
mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit);
- wfc->waitee= NULL;
+ /*
+ This is the thread clearing its own status, it is no longer on
+ the list of waiters. So no memory barriers are needed here.
+ */
+ wfc->waitee.store(NULL, std::memory_order_relaxed);
orig_entry->thd->EXIT_COND(&old_stage);
/* Interrupted by kill. */
@@ -7544,7 +7640,8 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
wfc->wakeup_error= ER_QUERY_INTERRUPTED;
my_message(wfc->wakeup_error,
ER_THD(orig_entry->thd, wfc->wakeup_error), MYF(0));
- DBUG_RETURN(-1);
+ result= -1;
+ goto end;
}
}
orig_entry->thd->EXIT_COND(&old_stage);
@@ -7558,12 +7655,13 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
then there is nothing else to do.
*/
if (orig_entry->queued_by_other)
- DBUG_RETURN(0);
+ goto end;
if (wfc && wfc->wakeup_error)
{
my_error(ER_PRIOR_COMMIT_FAILED, MYF(0));
- DBUG_RETURN(-1);
+ result= -1;
+ goto end;
}
/* Now enqueue ourselves in the group commit queue. */
@@ -7717,6 +7815,24 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
cur= entry->thd->wait_for_commit_ptr;
}
+ result= orig_queue == NULL;
+
+#ifdef WITH_WSREP
+ if (wsrep_is_active(entry->thd) &&
+ wsrep_run_commit_hook(entry->thd, entry->all))
+ {
+ /* Release commit order here */
+ if (wsrep_ordered_commit(entry->thd, entry->all, wsrep_apply_error()))
+ result= -2;
+
+ /* return -3, if this is leader */
+ if (orig_queue == NULL)
+ result= -3;
+ }
+ else
+ DBUG_ASSERT(result != -2 && result != -3);
+#endif /* WITH_WSREP */
+
if (opt_binlog_commit_wait_count > 0 && orig_queue != NULL)
mysql_cond_signal(&COND_prepare_ordered);
mysql_mutex_unlock(&LOCK_prepare_ordered);
@@ -7724,13 +7840,44 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
DBUG_PRINT("info", ("Queued for group commit as %s",
(orig_queue == NULL) ? "leader" : "participant"));
- DBUG_RETURN(orig_queue == NULL);
+
+end:
+ if (backup_lock_released)
+ thd->mdl_context.acquire_lock(thd->backup_commit_lock,
+ thd->variables.lock_wait_timeout);
+ DBUG_RETURN(result);
}
bool
MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
{
int is_leader= queue_for_group_commit(entry);
+#ifdef WITH_WSREP
+ /* commit order was released in queue_for_group_commit() call,
+ here we check if wsrep_commit_ordered() failed or if we are leader */
+ switch (is_leader)
+ {
+ case -2: /* wsrep_ordered_commit() has failed */
+ DBUG_ASSERT(wsrep_is_active(entry->thd));
+ DBUG_ASSERT(wsrep_run_commit_hook(entry->thd, entry->all));
+ entry->thd->wakeup_subsequent_commits(1);
+ return true;
+ case -3: /* this is leader, wait for prior commit to
+ complete. This establishes total order for group leaders
+ */
+ DBUG_ASSERT(wsrep_is_active(entry->thd));
+ DBUG_ASSERT(wsrep_run_commit_hook(entry->thd, entry->all));
+ if (entry->thd->wait_for_prior_commit())
+ return true;
+
+ /* retain the correct is_leader value */
+ is_leader= 1;
+ break;
+
+ default: /* native MariaDB cases */
+ break;
+ }
+#endif /* WITH_WSREP */
/*
The first in the queue handles group commit for all; the others just wait
@@ -7813,10 +7960,10 @@ MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
switch (entry->error)
{
case ER_ERROR_ON_WRITE:
- my_error(ER_ERROR_ON_WRITE, MYF(ME_NOREFRESH), name, entry->commit_errno);
+ my_error(ER_ERROR_ON_WRITE, MYF(ME_ERROR_LOG), name, entry->commit_errno);
break;
case ER_ERROR_ON_READ:
- my_error(ER_ERROR_ON_READ, MYF(ME_NOREFRESH),
+ my_error(ER_ERROR_ON_READ, MYF(ME_ERROR_LOG),
entry->error_cache->file_name, entry->commit_errno);
break;
default:
@@ -7827,7 +7974,7 @@ MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
*/
my_printf_error(entry->error,
"Error writing transaction to binary log: %d",
- MYF(ME_NOREFRESH), entry->error);
+ MYF(ME_ERROR_LOG), entry->error);
}
/*
@@ -8036,20 +8183,6 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
mark_xids_active(binlog_id, xid_count);
}
- /*
- If a transaction with the LOAD DATA statement is divided
- into logical mini-transactions (of the 10K rows) and binlog
- is rotated, then the last portion of data may be lost due to
- wsrep handler re-registration at the boundary of the split.
- Since splitting of the LOAD DATA into mini-transactions is
- logical, we should not allow these mini-transactions to fall
- into separate binlogs. Therefore, it is necessary to prohibit
- the rotation of binlog in the middle of processing LOAD DATA:
- */
-#ifdef WITH_WSREP
- if (!leader->thd->wsrep_split_flag)
- {
-#endif /* WITH_WSREP */
if (rotate(false, &check_purge))
{
/*
@@ -8066,12 +8199,9 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
when the transaction has been safely committed in the engine.
*/
leader->cache_mngr->delayed_error= true;
- my_error(ER_ERROR_ON_WRITE, MYF(ME_NOREFRESH), name, errno);
+ my_error(ER_ERROR_ON_WRITE, MYF(ME_ERROR_LOG), name, errno);
check_purge= false;
}
-#ifdef WITH_WSREP
- }
-#endif /* WITH_WSREP */
/* In case of binlog rotate, update the correct current binlog offset. */
commit_offset= my_b_write_tell(&log_file);
}
@@ -8725,18 +8855,35 @@ bool flush_error_log()
}
#ifdef _WIN32
+struct eventlog_source
+{
+ HANDLE handle;
+ eventlog_source()
+ {
+ setup_windows_event_source();
+ handle = RegisterEventSource(NULL, "MariaDB");
+ }
+
+ ~eventlog_source()
+ {
+ if (handle)
+ DeregisterEventSource(handle);
+ }
+};
+
+static eventlog_source eventlog;
+
static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
size_t length, size_t buffLen)
{
- HANDLE event;
+ HANDLE event= eventlog.handle;
char *buffptr= buff;
DBUG_ENTER("print_buffer_to_nt_eventlog");
/* Add ending CR/LF's to string, overwrite last chars if necessary */
strmov(buffptr+MY_MIN(length, buffLen-5), "\r\n\r\n");
- setup_windows_event_source();
- if ((event= RegisterEventSource(NULL,"MySQL")))
+ if (event)
{
switch (level) {
case ERROR_LEVEL:
@@ -8752,7 +8899,6 @@ static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
0, (LPCSTR*) &buffptr, NULL);
break;
}
- DeregisterEventSource(event);
}
DBUG_VOID_RETURN;
@@ -10553,7 +10699,7 @@ set_binlog_snapshot_file(const char *src)
Copy out current values of status variables, for SHOW STATUS or
information_schema.global_status.
- This is called only under LOCK_show_status, so we can fill in a static array.
+ This is called only under LOCK_all_status_vars, so we can fill in a static array.
*/
void
TC_LOG_BINLOG::set_status_variables(THD *thd)
@@ -10678,58 +10824,101 @@ maria_declare_plugin(binlog)
maria_declare_plugin_end;
#ifdef WITH_WSREP
-IO_CACHE * get_trans_log(THD * thd)
+#include "wsrep_mysqld.h"
+
+IO_CACHE *wsrep_get_cache(THD * thd, bool is_transactional)
{
DBUG_ASSERT(binlog_hton->slot != HA_SLOT_UNDEF);
binlog_cache_mngr *cache_mngr = (binlog_cache_mngr*)
thd_get_ha_data(thd, binlog_hton);
if (cache_mngr)
- return cache_mngr->get_binlog_cache_log(true);
+ return cache_mngr->get_binlog_cache_log(is_transactional);
WSREP_DEBUG("binlog cache not initialized, conn: %llu",
thd->thread_id);
return NULL;
}
-
-bool wsrep_trans_cache_is_empty(THD *thd)
-{
- binlog_cache_mngr *const cache_mngr=
- (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
- return (!cache_mngr || cache_mngr->trx_cache.empty());
-}
-
-
-void thd_binlog_trx_reset(THD * thd)
+void wsrep_thd_binlog_trx_reset(THD * thd)
{
+ DBUG_ENTER("wsrep_thd_binlog_trx_reset");
+ WSREP_DEBUG("wsrep_thd_binlog_reset");
/*
todo: fix autocommit select to not call the caller
*/
- if (thd_get_ha_data(thd, binlog_hton) != NULL)
+ binlog_cache_mngr *const cache_mngr=
+ (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
+ if (cache_mngr)
{
- binlog_cache_mngr *const cache_mngr=
- (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
- if (cache_mngr)
+ cache_mngr->reset(false, true);
+ if (!cache_mngr->stmt_cache.empty())
{
- cache_mngr->reset(false, true);
- if (!cache_mngr->stmt_cache.empty())
- {
- WSREP_DEBUG("pending events in stmt cache, sql: %s", thd->query());
- cache_mngr->stmt_cache.reset();
- }
+ WSREP_DEBUG("pending events in stmt cache, sql: %s", thd->query());
+ cache_mngr->stmt_cache.reset();
}
}
thd->clear_binlog_table_maps();
+ DBUG_VOID_RETURN;
}
-
-void thd_binlog_rollback_stmt(THD * thd)
+void wsrep_thd_binlog_stmt_rollback(THD * thd)
{
- WSREP_DEBUG("thd_binlog_rollback_stmt connection: %llu",
- thd->thread_id);
+ DBUG_ENTER("wsrep_thd_binlog_stmt_rollback");
+ WSREP_DEBUG("wsrep_thd_binlog_stmt_rollback");
binlog_cache_mngr *const cache_mngr=
(binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
if (cache_mngr)
- cache_mngr->trx_cache.set_prev_position(MY_OFF_T_UNDEF);
+ {
+ thd->binlog_remove_pending_rows_event(TRUE, TRUE);
+ cache_mngr->stmt_cache.reset();
+ }
+ DBUG_VOID_RETURN;
+}
+
+void wsrep_register_binlog_handler(THD *thd, bool trx)
+{
+ DBUG_ENTER("register_binlog_handler");
+ /*
+ If this is the first call to this function while processing a statement,
+ the transactional cache does not have a savepoint defined. So, in what
+ follows:
+ . an implicit savepoint is defined;
+ . callbacks are registered;
+ . binary log is set as read/write.
+
+ The savepoint allows for truncating the trx-cache transactional changes
+ fail. Callbacks are necessary to flush caches upon committing or rolling
+ back a statement or a transaction. However, notifications do not happen
+ if the binary log is set as read/write.
+ */
+ binlog_cache_mngr *cache_mngr=
+ (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
+ /* cache_mngr may be missing e.g. in mtr test ev51914.test */
+ if (cache_mngr)
+ {
+ /*
+ Set an implicit savepoint in order to be able to truncate a trx-cache.
+ */
+ if (cache_mngr->trx_cache.get_prev_position() == MY_OFF_T_UNDEF)
+ {
+ my_off_t pos= 0;
+ binlog_trans_log_savepos(thd, &pos);
+ cache_mngr->trx_cache.set_prev_position(pos);
+ }
+
+ /*
+ Set callbacks in order to be able to call commmit or rollback.
+ */
+ if (trx)
+ trans_register_ha(thd, TRUE, binlog_hton);
+ trans_register_ha(thd, FALSE, binlog_hton);
+
+ /*
+ Set the binary log as read/write otherwise callbacks are not called.
+ */
+ thd->ha_data[binlog_hton->slot].ha_info[0].set_trx_read_write();
+ }
+ DBUG_VOID_RETURN;
}
+
#endif /* WITH_WSREP */
diff --git a/sql/log.h b/sql/log.h
index 59d4bf8c130..ed4bcd9479c 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -18,8 +18,6 @@
#define LOG_H
#include "handler.h" /* my_xid */
-#include "wsrep.h"
-#include "wsrep_mysqld.h"
#include "rpl_constants.h"
class Relay_log_info;
@@ -249,10 +247,6 @@ extern TC_LOG_DUMMY tc_log_dummy;
class Relay_log_info;
-#ifdef HAVE_PSI_INTERFACE
-extern PSI_mutex_key key_LOG_INFO_lock;
-#endif
-
/*
Note that we destroy the lock mutex in the desctructor here.
This means that object instances cannot be destroyed/go out of scope,
@@ -264,19 +258,11 @@ typedef struct st_log_info
my_off_t index_file_offset, index_file_start_offset;
my_off_t pos;
bool fatal; // if the purge happens to give us a negative offset
- mysql_mutex_t lock;
st_log_info() : index_file_offset(0), index_file_start_offset(0),
pos(0), fatal(0)
{
DBUG_ENTER("LOG_INFO");
log_file_name[0] = '\0';
- mysql_mutex_init(key_LOG_INFO_lock, &lock, MY_MUTEX_INIT_FAST);
- DBUG_VOID_RETURN;
- }
- ~st_log_info()
- {
- DBUG_ENTER("~LOG_INFO");
- mysql_mutex_destroy(&lock);
DBUG_VOID_RETURN;
}
} LOG_INFO;
@@ -307,6 +293,7 @@ class MYSQL_LOG
{
public:
MYSQL_LOG();
+ virtual ~MYSQL_LOG() {}
void init_pthread_objects();
void cleanup();
bool open(
@@ -329,8 +316,8 @@ public:
const char *generate_name(const char *log_name,
const char *suffix,
bool strip_ext, char *buff);
- int generate_new_name(char *new_name, const char *log_name,
- ulong next_log_number);
+ virtual int generate_new_name(char *new_name, const char *log_name,
+ ulong next_log_number);
protected:
/* LOCK_log is inited by init_pthread_objects() */
mysql_mutex_t LOCK_log;
@@ -517,6 +504,11 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
GLOBAL MAX_BINLOG_SIZE|MAX_RELAY_LOG_SIZE) from sys_vars.cc
*/
ulong max_size;
+ /*
+ Number generated by last call of find_uniq_filename(). Corresponds
+ closely with current_binlog_id
+ */
+ ulong last_used_log_number;
// current file sequence number for load data infile binary logging
uint file_id;
uint open_count; // For replication
@@ -563,7 +555,7 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
LOCK_log.
*/
int new_file_without_locking();
- int new_file_impl(bool need_lock);
+ int new_file_impl();
void do_checkpoint_request(ulong binlog_id);
void purge();
int write_transaction_or_stmt(group_commit_entry *entry, uint64 commit_id);
@@ -679,6 +671,11 @@ public:
my_off_t last_commit_pos_offset;
ulong current_binlog_id;
+ /*
+ Tracks the number of times that the master has been reset
+ */
+ Atomic_counter<uint64> reset_master_count;
+
MYSQL_BIN_LOG(uint *sync_period);
/*
note that there's no destructor ~MYSQL_BIN_LOG() !
@@ -707,6 +704,8 @@ public:
int open(const char *opt_name);
void close();
+ virtual int generate_new_name(char *new_name, const char *log_name,
+ ulong next_log_number);
int log_and_order(THD *thd, my_xid xid, bool all,
bool need_prepare_ordered, bool need_commit_ordered);
int unlog(ulong cookie, my_xid xid);
@@ -725,15 +724,13 @@ public:
{
bytes_written = 0;
}
- void harvest_bytes_written(ulonglong* counter)
+ void harvest_bytes_written(Atomic_counter<uint64> *counter)
{
#ifndef DBUG_OFF
char buf1[22],buf2[22];
#endif
DBUG_ENTER("harvest_bytes_written");
-
- my_atomic_add64_explicit((volatile int64*)(counter), bytes_written,
- MY_MEMORY_ORDER_RELAXED);
+ (*counter)+=bytes_written;
DBUG_PRINT("info",("counter: %s bytes_written: %s", llstr(*counter,buf1),
llstr(bytes_written,buf2)));
bytes_written=0;
@@ -888,6 +885,7 @@ public:
inline mysql_mutex_t* get_log_lock() { return &LOCK_log; }
inline mysql_cond_t* get_bin_log_cond() { return &COND_bin_log_updated; }
inline IO_CACHE* get_log_file() { return &log_file; }
+ inline uint64 get_reset_master_count() { return reset_master_count; }
inline void lock_index() { mysql_mutex_lock(&LOCK_index);}
inline void unlock_index() { mysql_mutex_unlock(&LOCK_index);}
@@ -1239,6 +1237,11 @@ static inline TC_LOG *get_tc_log_implementation()
return &tc_log_mmap;
}
+#ifdef WITH_WSREP
+IO_CACHE* wsrep_get_cache(THD *, bool);
+void wsrep_thd_binlog_trx_reset(THD * thd);
+void wsrep_thd_binlog_stmt_rollback(THD * thd);
+#endif /* WITH_WSREP */
class Gtid_list_log_event;
const char *
diff --git a/sql/log_event.cc b/sql/log_event.cc
index a5a31d57ed2..1d32760c084 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -43,8 +43,10 @@
#include <mysql/psi/mysql_statement.h>
#include <strfunc.h>
#include "compat56.h"
-#include "wsrep_mysqld.h"
#include "sql_insert.h"
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif /* WITH_WSREP */
#else
#include "mysqld_error.h"
#endif /* MYSQL_CLIENT */
@@ -54,7 +56,6 @@
#include "rpl_constants.h"
#include "sql_digest.h"
#include "zlib.h"
-#include "my_atomic.h"
#define my_b_write_string(A, B) my_b_write((A), (uchar*)(B), (uint) (sizeof(B) - 1))
@@ -102,16 +103,11 @@ TYPELIB binlog_checksum_typelib=
TODO: correct the constant when it has been determined
(which main tree to push and when)
*/
-const uchar checksum_version_split_mysql[3]= {5, 6, 1};
-const ulong checksum_version_product_mysql=
- (checksum_version_split_mysql[0] * 256 +
- checksum_version_split_mysql[1]) * 256 +
- checksum_version_split_mysql[2];
-const uchar checksum_version_split_mariadb[3]= {5, 3, 0};
-const ulong checksum_version_product_mariadb=
- (checksum_version_split_mariadb[0] * 256 +
- checksum_version_split_mariadb[1]) * 256 +
- checksum_version_split_mariadb[2];
+const Version checksum_version_split_mysql(5, 6, 1);
+const Version checksum_version_split_mariadb(5, 3, 0);
+
+// First MySQL version with fraction seconds
+const Version fsp_version_split_mysql(5, 6, 0);
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
static int rows_event_stmt_cleanup(rpl_group_info *rgi, THD* thd);
@@ -1640,8 +1636,11 @@ int Log_event_writer::encrypt_and_write(const uchar *pos, size_t len)
return 1;
uint dstlen;
- if (encryption_ctx_update(ctx, pos, (uint)len, dst, &dstlen))
+ if (len == 0)
+ dstlen= 0;
+ else if (encryption_ctx_update(ctx, pos, (uint)len, dst, &dstlen))
goto err;
+
if (maybe_write_event_len(dst, dstlen))
return 1;
pos= dst;
@@ -1859,8 +1858,16 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet,
{
uchar iv[BINLOG_IV_LENGTH];
fdle->crypto_data.set_iv(iv, (uint32) (my_b_tell(file) - data_len));
-
- char *newpkt= (char*)my_malloc(data_len + ev_offset + 1, MYF(MY_WME));
+ size_t sz= data_len + ev_offset + 1;
+#ifdef HAVE_WOLFSSL
+ /*
+ Workaround for MDEV-19582.
+ WolfSSL reads memory out of bounds with decryption/NOPAD)
+ We allocate a little more memory therefore.
+ */
+ sz += MY_AES_BLOCK_SIZE;
+#endif
+ char *newpkt= (char*)my_malloc(sz, MYF(MY_WME));
if (!newpkt)
DBUG_RETURN(LOG_READ_MEM);
memcpy(newpkt, packet->ptr(), ev_offset);
@@ -2762,9 +2769,7 @@ log_event_print_value(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info,
goto return_null;
uint bin_size= my_decimal_get_binary_size(precision, decimals);
- my_decimal dec;
- binary2my_decimal(E_DEC_FATAL_ERROR, (uchar*) ptr, &dec,
- precision, decimals);
+ my_decimal dec((const uchar *) ptr, precision, decimals);
int length= DECIMAL_MAX_STR_LENGTH;
char buff[DECIMAL_MAX_STR_LENGTH + 1];
decimal2string(&dec, buff, &length, 0, 0, 0);
@@ -4337,9 +4342,14 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, size_t que
/*
If Query_log_event will contain non trans keyword (not BEGIN, COMMIT,
SAVEPOINT or ROLLBACK) we disable PA for this transaction.
+ Note that here WSREP(thd) might not be true e.g. when wsrep_shcema
+ is created we create tables with thd->variables.wsrep_on=false
+ to avoid replicating wsrep_schema tables to other nodes.
*/
if (WSREP_ON && !is_trans_keyword())
+ {
thd->wsrep_PA_safe= false;
+ }
#endif /* WITH_WSREP */
memset(&user, 0, sizeof(user));
@@ -4421,41 +4431,44 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, size_t que
bool trx_cache= FALSE;
cache_type= Log_event::EVENT_INVALID_CACHE;
- switch (lex->sql_command)
+ if (!direct)
{
- case SQLCOM_DROP_TABLE:
- case SQLCOM_DROP_SEQUENCE:
- use_cache= (lex->tmp_table() && thd->in_multi_stmt_transaction_mode());
- break;
+ switch (lex->sql_command)
+ {
+ case SQLCOM_DROP_TABLE:
+ case SQLCOM_DROP_SEQUENCE:
+ use_cache= (lex->tmp_table() && thd->in_multi_stmt_transaction_mode());
+ break;
- case SQLCOM_CREATE_TABLE:
- case SQLCOM_CREATE_SEQUENCE:
- /*
- If we are using CREATE ... SELECT or if we are a slave
- executing BEGIN...COMMIT (generated by CREATE...SELECT) we
- have to use the transactional cache to ensure we don't
- calculate any checksum for the CREATE part.
- */
- trx_cache= (lex->select_lex.item_list.elements &&
- thd->is_current_stmt_binlog_format_row()) ||
- (thd->variables.option_bits & OPTION_GTID_BEGIN);
- use_cache= (lex->tmp_table() &&
- thd->in_multi_stmt_transaction_mode()) || trx_cache;
- break;
- case SQLCOM_SET_OPTION:
- if (lex->autocommit)
- use_cache= trx_cache= FALSE;
- else
- use_cache= TRUE;
- break;
- case SQLCOM_RELEASE_SAVEPOINT:
- case SQLCOM_ROLLBACK_TO_SAVEPOINT:
- case SQLCOM_SAVEPOINT:
- use_cache= trx_cache= TRUE;
- break;
- default:
- use_cache= sqlcom_can_generate_row_events(thd);
- break;
+ case SQLCOM_CREATE_TABLE:
+ case SQLCOM_CREATE_SEQUENCE:
+ /*
+ If we are using CREATE ... SELECT or if we are a slave
+ executing BEGIN...COMMIT (generated by CREATE...SELECT) we
+ have to use the transactional cache to ensure we don't
+ calculate any checksum for the CREATE part.
+ */
+ trx_cache= (lex->first_select_lex()->item_list.elements &&
+ thd->is_current_stmt_binlog_format_row()) ||
+ (thd->variables.option_bits & OPTION_GTID_BEGIN);
+ use_cache= (lex->tmp_table() &&
+ thd->in_multi_stmt_transaction_mode()) || trx_cache;
+ break;
+ case SQLCOM_SET_OPTION:
+ if (lex->autocommit)
+ use_cache= trx_cache= FALSE;
+ else
+ use_cache= TRUE;
+ break;
+ case SQLCOM_RELEASE_SAVEPOINT:
+ case SQLCOM_ROLLBACK_TO_SAVEPOINT:
+ case SQLCOM_SAVEPOINT:
+ use_cache= trx_cache= TRUE;
+ break;
+ default:
+ use_cache= sqlcom_can_generate_row_events(thd);
+ break;
+ }
}
if (!use_cache || direct)
@@ -4802,6 +4815,30 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
}
}
+#if !defined(MYSQL_CLIENT)
+ if (description_event->server_version_split.kind ==
+ Format_description_log_event::master_version_split::KIND_MYSQL)
+ {
+ // Handle MariaDB/MySQL incompatible sql_mode bits
+ sql_mode_t mysql_sql_mode= sql_mode;
+ sql_mode&= MODE_MASK_MYSQL_COMPATIBLE; // Unset MySQL specific bits
+
+ /*
+ sql_mode flags related to fraction second rounding/truncation
+ have opposite meaning in MySQL vs MariaDB.
+ MySQL:
+ - rounds fractional seconds by default
+ - truncates if TIME_TRUNCATE_FRACTIONAL is set
+ MariaDB:
+ - truncates fractional seconds by default
+ - rounds if TIME_ROUND_FRACTIONAL is set
+ */
+ if (description_event->server_version_split >= fsp_version_split_mysql &&
+ !(mysql_sql_mode & MODE_MYSQL80_TIME_TRUNCATE_FRACTIONAL))
+ sql_mode|= MODE_TIME_ROUND_FRACTIONAL;
+ }
+#endif
+
/**
Layout for the data buffer is as follows
+--------+-----------+------+------+---------+----+-------+
@@ -5636,7 +5673,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
gtid= rgi->current_gtid;
if (unlikely(rpl_global_gtid_slave_state->record_gtid(thd, &gtid,
sub_id,
- rgi, false,
+ true, false,
&hton)))
{
int errcode= thd->get_stmt_da()->sql_errno();
@@ -5823,6 +5860,14 @@ compare_errors:
"unexpected success or fatal error"),
thd->get_db(), query_arg);
thd->is_slave_error= 1;
+#ifdef WITH_WSREP
+ if (wsrep_thd_is_toi(thd) && wsrep_must_ignore_error(thd))
+ {
+ thd->clear_error(1);
+ thd->killed= NOT_KILLED;
+ thd->wsrep_has_ignored_error= true;
+ }
+#endif /* WITH_WSREP */
}
/*
@@ -6619,26 +6664,24 @@ bool Format_description_log_event::start_decryption(Start_encryption_log_event*
return crypto_data.init(sele->crypto_scheme, sele->key_version);
}
-static inline void
-do_server_version_split(char* version,
- Format_description_log_event::master_version_split *split_versions)
+
+Version::Version(const char *version, const char **endptr)
{
- char *p= version, *r;
+ const char *p= version;
ulong number;
for (uint i= 0; i<=2; i++)
{
+ char *r;
number= strtoul(p, &r, 10);
/*
It is an invalid version if any version number greater than 255 or
first number is not followed by '.'.
*/
if (number < 256 && (*r == '.' || i != 0))
- split_versions->ver[i]= (uchar) number;
+ m_ver[i]= (uchar) number;
else
{
- split_versions->ver[0]= 0;
- split_versions->ver[1]= 0;
- split_versions->ver[2]= 0;
+ *this= Version();
break;
}
@@ -6646,12 +6689,19 @@ do_server_version_split(char* version,
if (*r == '.')
p++; // skip the dot
}
+ endptr[0]= p;
+}
+
+
+Format_description_log_event::
+ master_version_split::master_version_split(const char *version)
+{
+ const char *p;
+ static_cast<Version*>(this)[0]= Version(version, &p);
if (strstr(p, "MariaDB") != 0 || strstr(p, "-maria-") != 0)
- split_versions->kind=
- Format_description_log_event::master_version_split::KIND_MARIADB;
+ kind= KIND_MARIADB;
else
- split_versions->kind=
- Format_description_log_event::master_version_split::KIND_MYSQL;
+ kind= KIND_MYSQL;
}
@@ -6665,20 +6715,14 @@ do_server_version_split(char* version,
*/
void Format_description_log_event::calc_server_version_split()
{
- do_server_version_split(server_version, &server_version_split);
+ server_version_split= master_version_split(server_version);
DBUG_PRINT("info",("Format_description_log_event::server_version_split:"
" '%s' %d %d %d", server_version,
- server_version_split.ver[0],
- server_version_split.ver[1], server_version_split.ver[2]));
+ server_version_split[0],
+ server_version_split[1], server_version_split[2]));
}
-static inline ulong
-version_product(const Format_description_log_event::master_version_split* version_split)
-{
- return ((version_split->ver[0] * 256 + version_split->ver[1]) * 256
- + version_split->ver[2]);
-}
/**
@return TRUE is the event's version is earlier than one that introduced
@@ -6688,9 +6732,9 @@ bool
Format_description_log_event::is_version_before_checksum(const master_version_split
*version_split)
{
- return version_product(version_split) <
+ return *version_split <
(version_split->kind == master_version_split::KIND_MARIADB ?
- checksum_version_product_mariadb : checksum_version_product_mysql);
+ checksum_version_split_mariadb : checksum_version_split_mysql);
}
/**
@@ -6706,7 +6750,6 @@ enum enum_binlog_checksum_alg get_checksum_alg(const char* buf, ulong len)
{
enum enum_binlog_checksum_alg ret;
char version[ST_SERVER_VER_LEN];
- Format_description_log_event::master_version_split version_split;
DBUG_ENTER("get_checksum_alg");
DBUG_ASSERT(buf[EVENT_TYPE_OFFSET] == FORMAT_DESCRIPTION_EVENT);
@@ -6716,7 +6759,7 @@ enum enum_binlog_checksum_alg get_checksum_alg(const char* buf, ulong len)
ST_SERVER_VER_LEN);
version[ST_SERVER_VER_LEN - 1]= 0;
- do_server_version_split(version, &version_split);
+ Format_description_log_event::master_version_split version_split(version);
ret= Format_description_log_event::is_version_before_checksum(&version_split)
? BINLOG_CHECKSUM_ALG_UNDEF
: (enum_binlog_checksum_alg)buf[len - BINLOG_CHECKSUM_LEN - BINLOG_CHECKSUM_ALG_DESC_LEN];
@@ -7467,8 +7510,9 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi,
ex.skip_lines = skip_lines;
List<Item> field_list;
- thd->lex->select_lex.context.resolve_in_table_list_only(&tables);
- set_fields(tables.db.str, field_list, &thd->lex->select_lex.context);
+ thd->lex->first_select_lex()->context.resolve_in_table_list_only(&tables);
+ set_fields(tables.db.str,
+ field_list, &thd->lex->first_select_lex()->context);
thd->variables.pseudo_thread_id= thread_id;
if (net)
{
@@ -8109,16 +8153,13 @@ Gtid_log_event::do_apply_event(rpl_group_info *rgi)
switch (flags2 & (FL_DDL | FL_TRANSACTIONAL))
{
case FL_TRANSACTIONAL:
- my_atomic_add64_explicit((volatile int64 *)&mi->total_trans_groups, 1,
- MY_MEMORY_ORDER_RELAXED);
+ mi->total_trans_groups++;
break;
case FL_DDL:
- my_atomic_add64_explicit((volatile int64 *)&mi->total_ddl_groups, 1,
- MY_MEMORY_ORDER_RELAXED);
+ mi->total_ddl_groups++;
break;
default:
- my_atomic_add64_explicit((volatile int64 *)&mi->total_non_trans_groups, 1,
- MY_MEMORY_ORDER_RELAXED);
+ mi->total_non_trans_groups++;
}
if (flags2 & FL_STANDALONE)
@@ -8451,7 +8492,7 @@ Gtid_list_log_event::do_apply_event(rpl_group_info *rgi)
{
if ((ret= rpl_global_gtid_slave_state->record_gtid(thd, &list[i],
sub_id_list[i],
- NULL, false, &hton)))
+ false, false, &hton)))
return ret;
rpl_global_gtid_slave_state->update_state_hash(sub_id_list[i], &list[i],
hton, NULL);
@@ -8957,6 +8998,18 @@ err:
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
+static bool wsrep_must_replay(THD *thd)
+{
+#ifdef WITH_WSREP
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ bool res= WSREP(thd) && thd->wsrep_trx().state() == wsrep::transaction::s_must_replay;
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ return res;
+#else
+ return false;
+#endif
+}
+
int Xid_log_event::do_apply_event(rpl_group_info *rgi)
{
bool res;
@@ -8988,7 +9041,7 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi)
rgi->gtid_pending= false;
gtid= rgi->current_gtid;
- err= rpl_global_gtid_slave_state->record_gtid(thd, &gtid, sub_id, rgi,
+ err= rpl_global_gtid_slave_state->record_gtid(thd, &gtid, sub_id, true,
false, &hton);
if (unlikely(err))
{
@@ -9021,17 +9074,8 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi)
res= trans_commit(thd); /* Automatically rolls back on error. */
thd->release_transactional_locks();
-#ifdef WITH_WSREP
- if (WSREP(thd)) mysql_mutex_lock(&thd->LOCK_thd_data);
- if ((!res || (WSREP(thd) && thd->wsrep_conflict_state == MUST_REPLAY)) && sub_id)
-#else
- if (likely(!res) && sub_id)
-#endif /* WITH_WSREP */
+ if (sub_id && (!res || wsrep_must_replay(thd)))
rpl_global_gtid_slave_state->update_state_hash(sub_id, &gtid, hton, rgi);
-#ifdef WITH_WSREP
- if (WSREP(thd)) mysql_mutex_unlock(&thd->LOCK_thd_data);
-#endif /* WITH_WSREP */
-
/*
Increment the global status commit count variable
*/
@@ -9134,11 +9178,8 @@ void User_var_log_event::pack_info(Protocol* protocol)
String buf(buf_mem, sizeof(buf_mem), system_charset_info);
char buf2[DECIMAL_MAX_STR_LENGTH+1];
String str(buf2, sizeof(buf2), &my_charset_bin);
- my_decimal dec;
buf.length(0);
- binary2my_decimal(E_DEC_FATAL_ERROR, (uchar*) (val+2), &dec, val[0],
- val[1]);
- my_decimal2string(E_DEC_FATAL_ERROR, &dec, 0, 0, 0, &str);
+ my_decimal((const uchar *) (val + 2), val[0], val[1]).to_string(&str);
if (user_var_append_name_part(protocol->thd, &buf, name, name_len) ||
buf.append(buf2))
return;
@@ -11381,13 +11422,13 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
{
WSREP_WARN("BF applier failed to open_and_lock_tables: %u, fatal: %d "
"wsrep = (exec_mode: %d conflict_state: %d seqno: %lld)",
- thd->get_stmt_da()->sql_errno(),
- thd->is_fatal_error,
- thd->wsrep_exec_mode,
- thd->wsrep_conflict_state,
- (long long)wsrep_thd_trx_seqno(thd));
+ thd->get_stmt_da()->sql_errno(),
+ thd->is_fatal_error,
+ thd->wsrep_cs().mode(),
+ thd->wsrep_trx().state(),
+ (long long) wsrep_thd_trx_seqno(thd));
}
-#endif
+#endif /* WITH_WSREP */
if (thd->is_error() &&
!is_parallel_retry_error(rgi, error= thd->get_stmt_da()->sql_errno()))
{
@@ -11523,10 +11564,10 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
#ifdef HAVE_QUERY_CACHE
#ifdef WITH_WSREP
/*
- Moved invalidation right before the call to rows_event_stmt_cleanup(),
- to avoid query cache being polluted with stale entries.
+ Moved invalidation right before the call to rows_event_stmt_cleanup(),
+ to avoid query cache being polluted with stale entries,
*/
- if (! (WSREP(thd) && (thd->wsrep_exec_mode == REPL_RECV)))
+ if (! (WSREP(thd) && wsrep_thd_is_applying(thd)))
{
#endif /* WITH_WSREP */
query_cache.invalidate_locked_for_write(thd, rgi->tables_to_lock);
@@ -11639,6 +11680,13 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
bool ignored_error= (idempotent_error == 0 ?
ignored_error_code(actual_error) : 0);
+#ifdef WITH_WSREP
+ if (WSREP(thd) && wsrep_ignored_error_code(this, actual_error))
+ {
+ idempotent_error= true;
+ thd->wsrep_has_ignored_error= true;
+ }
+#endif /* WITH_WSREP */
if (idempotent_error || ignored_error)
{
if (global_system_variables.log_warnings)
@@ -11725,7 +11773,7 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
restore_empty_query_table_list(thd->lex);
#if defined(WITH_WSREP) && defined(HAVE_QUERY_CACHE)
- if (WSREP(thd) && thd->wsrep_exec_mode == REPL_RECV)
+ if (WSREP(thd) && wsrep_thd_is_applying(thd))
query_cache.invalidate_locked_for_write(thd, rgi->tables_to_lock);
#endif /* WITH_WSREP && HAVE_QUERY_CACHE */
diff --git a/sql/log_event.h b/sql/log_event.h
index 57282fe58ce..5719bb99a68 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -2747,6 +2747,38 @@ protected:
};
+class Version
+{
+protected:
+ uchar m_ver[3];
+ int cmp(const Version &other) const
+ {
+ return memcmp(m_ver, other.m_ver, 3);
+ }
+public:
+ Version()
+ {
+ m_ver[0]= m_ver[1]= m_ver[2]= '\0';
+ }
+ Version(uchar v0, uchar v1, uchar v2)
+ {
+ m_ver[0]= v0;
+ m_ver[1]= v1;
+ m_ver[2]= v2;
+ }
+ Version(const char *version, const char **endptr);
+ const uchar& operator [] (size_t i) const
+ {
+ DBUG_ASSERT(i < 3);
+ return m_ver[i];
+ }
+ bool operator<(const Version &other) const { return cmp(other) < 0; }
+ bool operator>(const Version &other) const { return cmp(other) > 0; }
+ bool operator<=(const Version &other) const { return cmp(other) <= 0; }
+ bool operator>=(const Version &other) const { return cmp(other) >= 0; }
+};
+
+
/**
@class Format_description_log_event
@@ -2773,10 +2805,17 @@ public:
by the checksum alg description byte
*/
uint8 *post_header_len;
- struct master_version_split {
+ class master_version_split: public Version {
+ public:
enum {KIND_MYSQL, KIND_MARIADB};
int kind;
- uchar ver[3];
+ master_version_split() :kind(KIND_MARIADB) { }
+ master_version_split(const char *version);
+ bool version_is_valid() const
+ {
+ /* It is invalid only when all version numbers are 0 */
+ return !(m_ver[0] == 0 && m_ver[1] == 0 && m_ver[2] == 0);
+ }
};
master_version_split server_version_split;
const uint8 *event_type_permutation;
@@ -2800,17 +2839,9 @@ public:
(post_header_len != NULL));
}
- bool version_is_valid() const
- {
- /* It is invalid only when all version numbers are 0 */
- return !(server_version_split.ver[0] == 0 &&
- server_version_split.ver[1] == 0 &&
- server_version_split.ver[2] == 0);
- }
-
bool is_valid() const
{
- return header_is_valid() && version_is_valid();
+ return header_is_valid() && server_version_split.version_is_valid();
}
int get_data_size()
diff --git a/sql/mdl.cc b/sql/mdl.cc
index a53a1f08c2c..0a0f877d0e0 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -24,9 +24,9 @@
#include <mysql/plugin.h>
#include <mysql/service_thd_wait.h>
#include <mysql/psi/mysql_stage.h>
+#ifdef WITH_WSREP
#include "wsrep_mysqld.h"
-#include "wsrep_thd.h"
-
+#endif
#ifdef HAVE_PSI_INTERFACE
static PSI_mutex_key key_MDL_wait_LOCK_wait_status;
@@ -80,7 +80,7 @@ static void init_mdl_psi_keys(void)
PSI_stage_info MDL_key::m_namespace_to_wait_state_name[NAMESPACE_END]=
{
- {0, "Waiting for global read lock", 0},
+ {0, "Waiting for backup lock", 0},
{0, "Waiting for schema metadata lock", 0},
{0, "Waiting for table metadata lock", 0},
{0, "Waiting for stored function metadata lock", 0},
@@ -88,10 +88,44 @@ PSI_stage_info MDL_key::m_namespace_to_wait_state_name[NAMESPACE_END]=
{0, "Waiting for stored package body metadata lock", 0},
{0, "Waiting for trigger metadata lock", 0},
{0, "Waiting for event metadata lock", 0},
- {0, "Waiting for commit lock", 0},
{0, "User lock", 0} /* Be compatible with old status. */
};
+
+static const LEX_STRING lock_types[]=
+{
+ { C_STRING_WITH_LEN("MDL_INTENTION_EXCLUSIVE") },
+ { C_STRING_WITH_LEN("MDL_SHARED") },
+ { C_STRING_WITH_LEN("MDL_SHARED_HIGH_PRIO") },
+ { C_STRING_WITH_LEN("MDL_SHARED_READ") },
+ { C_STRING_WITH_LEN("MDL_SHARED_WRITE") },
+ { C_STRING_WITH_LEN("MDL_SHARED_UPGRADABLE") },
+ { C_STRING_WITH_LEN("MDL_SHARED_READ_ONLY") },
+ { C_STRING_WITH_LEN("MDL_SHARED_NO_WRITE") },
+ { C_STRING_WITH_LEN("MDL_SHARED_NO_READ_WRITE") },
+ { C_STRING_WITH_LEN("MDL_EXCLUSIVE") },
+};
+
+
+static const LEX_STRING backup_lock_types[]=
+{
+ { C_STRING_WITH_LEN("MDL_BACKUP_START") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_FLUSH") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_WAIT_FLUSH") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_WAIT_DDL") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_WAIT_COMMIT") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_FTWRL1") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_FTWRL2") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_DML") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_TRANS_DML") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_SYS_DML") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_DDL") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_BLOCK_DDL") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_ALTER_COPY") },
+ { C_STRING_WITH_LEN("MDL_BACKUP_COMMIT") }
+};
+
+
#ifdef HAVE_PSI_INTERFACE
void MDL_key::init_psi_keys()
{
@@ -128,11 +162,9 @@ public:
LF_PINS *get_pins() { return lf_hash_get_pins(&m_locks); }
private:
LF_HASH m_locks; /**< All acquired locks in the server. */
- /** Pre-allocated MDL_lock object for GLOBAL namespace. */
- MDL_lock *m_global_lock;
- /** Pre-allocated MDL_lock object for COMMIT namespace. */
- MDL_lock *m_commit_lock;
- friend int mdl_iterate(int (*)(MDL_ticket *, void *), void *);
+ /** Pre-allocated MDL_lock object for BACKUP namespace. */
+ MDL_lock *m_backup_lock;
+ friend int mdl_iterate(mdl_iterator_callback, void *);
};
@@ -195,6 +227,42 @@ private:
static const uint MAX_SEARCH_DEPTH= 32;
};
+#ifndef DBUG_OFF
+
+/*
+ Print a list of all locks to DBUG trace to help with debugging
+*/
+
+const char *dbug_print_mdl(MDL_ticket *mdl_ticket)
+{
+ thread_local char buffer[256];
+ MDL_key *mdl_key= mdl_ticket->get_key();
+ my_snprintf(buffer, sizeof(buffer) - 1, "%.*s/%.*s (%s)",
+ (int) mdl_key->db_name_length(), mdl_key->db_name(),
+ (int) mdl_key->name_length(), mdl_key->name(),
+ mdl_ticket->get_type_name()->str);
+ return buffer;
+}
+
+
+static int mdl_dbug_print_lock(MDL_ticket *mdl_ticket, void *arg, bool granted)
+{
+ String *tmp= (String*) arg;
+ char buffer[256];
+ size_t length= my_snprintf(buffer, sizeof(buffer) - 1,
+ "\n %s (%s)", dbug_print_mdl(mdl_ticket),
+ granted ? "granted" : "waiting");
+ tmp->append(buffer, length);
+ return 0;
+}
+
+const char *mdl_dbug_print_locks()
+{
+ thread_local String tmp;
+ mdl_iterate(mdl_dbug_print_lock, (void*) &tmp);
+ return tmp.c_ptr();
+}
+#endif /* DBUG_OFF */
/**
Enter a node of a wait-for graph. After
@@ -279,8 +347,6 @@ Deadlock_detection_visitor::opt_change_victim_to(MDL_context *new_victim)
and compatibility matrices.
*/
-#define MDL_BIT(A) static_cast<MDL_lock::bitmap_t>(1U << A)
-
/**
The lock context. Created internally for an acquired lock.
For a given name, there exists only one MDL_lock instance,
@@ -295,7 +361,7 @@ Deadlock_detection_visitor::opt_change_victim_to(MDL_context *new_victim)
class MDL_lock
{
public:
- typedef unsigned short bitmap_t;
+ typedef mdl_bitmap_t bitmap_t;
class Ticket_list
{
@@ -328,9 +394,10 @@ public:
/**
Helper struct which defines how different types of locks are handled
- for a specific MDL_lock. In practice we use only two strategies: "scoped"
- lock strategy for locks in GLOBAL, COMMIT and SCHEMA namespaces and
- "object" lock strategy for all other namespaces.
+ for a specific MDL_lock. In practice we use only three strategies:
+ "backup" lock strategy for locks in BACKUP namespace, "scoped" lock
+ strategy for locks in SCHEMA namespace and "object" lock strategy for
+ all other namespaces.
*/
struct MDL_lock_strategy
{
@@ -394,9 +461,10 @@ public:
{ return m_waiting_incompatible; }
virtual bool needs_notification(const MDL_ticket *ticket) const
{
- return ticket->get_type() == MDL_SHARED_NO_WRITE ||
- ticket->get_type() == MDL_SHARED_NO_READ_WRITE ||
- ticket->get_type() == MDL_EXCLUSIVE;
+ return (MDL_BIT(ticket->get_type()) &
+ (MDL_BIT(MDL_SHARED_NO_WRITE) |
+ MDL_BIT(MDL_SHARED_NO_READ_WRITE) |
+ MDL_BIT(MDL_EXCLUSIVE)));
}
/**
@@ -427,6 +495,43 @@ public:
static const bitmap_t m_waiting_incompatible[MDL_TYPE_END];
};
+
+ struct MDL_backup_lock: public MDL_lock_strategy
+ {
+ MDL_backup_lock() {}
+ virtual const bitmap_t *incompatible_granted_types_bitmap() const
+ { return m_granted_incompatible; }
+ virtual const bitmap_t *incompatible_waiting_types_bitmap() const
+ { return m_waiting_incompatible; }
+ virtual bool needs_notification(const MDL_ticket *ticket) const
+ {
+ return (MDL_BIT(ticket->get_type()) & MDL_BIT(MDL_BACKUP_FTWRL1));
+ }
+
+ /**
+ Insert delayed threads may hold DML or TRANS_DML lock.
+ We need to kill such threads in order to get lock for FTWRL statements.
+ We do this by calling code outside of MDL.
+ */
+ virtual bool conflicting_locks(const MDL_ticket *ticket) const
+ {
+ return (MDL_BIT(ticket->get_type()) &
+ (MDL_BIT(MDL_BACKUP_DML) |
+ MDL_BIT(MDL_BACKUP_TRANS_DML)));
+ }
+
+ /*
+ In backup namespace DML/DDL may starve because of concurrent FTWRL or
+ BACKUP statements. This scenario is partically useless in real world,
+ so we just return 0 here.
+ */
+ virtual bitmap_t hog_lock_types_bitmap() const
+ { return 0; }
+ private:
+ static const bitmap_t m_granted_incompatible[MDL_BACKUP_END];
+ static const bitmap_t m_waiting_incompatible[MDL_BACKUP_END];
+ };
+
public:
/** The key of the object (data) being protected. */
MDL_key key;
@@ -538,10 +643,9 @@ public:
MDL_lock(const MDL_key *key_arg)
: key(key_arg),
m_hog_lock_count(0),
- m_strategy(&m_scoped_lock_strategy)
+ m_strategy(&m_backup_lock_strategy)
{
- DBUG_ASSERT(key_arg->mdl_namespace() == MDL_key::GLOBAL ||
- key_arg->mdl_namespace() == MDL_key::COMMIT);
+ DBUG_ASSERT(key_arg->mdl_namespace() == MDL_key::BACKUP);
mysql_prlock_init(key_MDL_lock_rwlock, &m_rwlock);
}
@@ -557,8 +661,7 @@ public:
static void lf_hash_initializer(LF_HASH *hash __attribute__((unused)),
MDL_lock *lock, MDL_key *key_arg)
{
- DBUG_ASSERT(key_arg->mdl_namespace() != MDL_key::GLOBAL &&
- key_arg->mdl_namespace() != MDL_key::COMMIT);
+ DBUG_ASSERT(key_arg->mdl_namespace() != MDL_key::BACKUP);
new (&lock->key) MDL_key(key_arg);
if (key_arg->mdl_namespace() == MDL_key::SCHEMA)
lock->m_strategy= &m_scoped_lock_strategy;
@@ -568,11 +671,13 @@ public:
const MDL_lock_strategy *m_strategy;
private:
+ static const MDL_backup_lock m_backup_lock_strategy;
static const MDL_scoped_lock m_scoped_lock_strategy;
static const MDL_object_lock m_object_lock_strategy;
};
+const MDL_lock::MDL_backup_lock MDL_lock::m_backup_lock_strategy;
const MDL_lock::MDL_scoped_lock MDL_lock::m_scoped_lock_strategy;
const MDL_lock::MDL_object_lock MDL_lock::m_object_lock_strategy;
@@ -636,7 +741,7 @@ void mdl_destroy()
struct mdl_iterate_arg
{
- int (*callback)(MDL_ticket *ticket, void *arg);
+ mdl_iterator_callback callback;
void *argument;
};
@@ -649,16 +754,19 @@ static my_bool mdl_iterate_lock(MDL_lock *lock, mdl_iterate_arg *arg)
must be empty for such locks anyway.
*/
mysql_prlock_rdlock(&lock->m_rwlock);
- MDL_lock::Ticket_iterator ticket_it(lock->m_granted);
+ MDL_lock::Ticket_iterator granted_it(lock->m_granted);
+ MDL_lock::Ticket_iterator waiting_it(lock->m_waiting);
MDL_ticket *ticket;
- while ((ticket= ticket_it++) && !(res= arg->callback(ticket, arg->argument)))
+ while ((ticket= granted_it++) && !(res= arg->callback(ticket, arg->argument, true)))
+ /* no-op */;
+ while ((ticket= waiting_it++) && !(res= arg->callback(ticket, arg->argument, false)))
/* no-op */;
mysql_prlock_unlock(&lock->m_rwlock);
return MY_TEST(res);
}
-int mdl_iterate(int (*callback)(MDL_ticket *ticket, void *arg), void *arg)
+int mdl_iterate(mdl_iterator_callback callback, void *arg)
{
DBUG_ENTER("mdl_iterate");
mdl_iterate_arg argument= { callback, arg };
@@ -667,8 +775,7 @@ int mdl_iterate(int (*callback)(MDL_ticket *ticket, void *arg), void *arg)
if (pins)
{
- res= mdl_iterate_lock(mdl_locks.m_global_lock, &argument) ||
- mdl_iterate_lock(mdl_locks.m_commit_lock, &argument) ||
+ res= mdl_iterate_lock(mdl_locks.m_backup_lock, &argument) ||
lf_hash_iterate(&mdl_locks.m_locks, pins,
(my_hash_walk_action) mdl_iterate_lock, &argument);
lf_hash_put_pins(pins);
@@ -680,7 +787,7 @@ int mdl_iterate(int (*callback)(MDL_ticket *ticket, void *arg), void *arg)
my_hash_value_type mdl_hash_function(CHARSET_INFO *cs,
const uchar *key, size_t length)
{
- MDL_key *mdl_key= (MDL_key*) (key - my_offsetof(MDL_key, m_ptr));
+ MDL_key *mdl_key= (MDL_key*) (key - offsetof(MDL_key, m_ptr));
return mdl_key->hash_value();
}
@@ -689,11 +796,9 @@ my_hash_value_type mdl_hash_function(CHARSET_INFO *cs,
void MDL_map::init()
{
- MDL_key global_lock_key(MDL_key::GLOBAL, "", "");
- MDL_key commit_lock_key(MDL_key::COMMIT, "", "");
+ MDL_key backup_lock_key(MDL_key::BACKUP, "", "");
- m_global_lock= new (std::nothrow) MDL_lock(&global_lock_key);
- m_commit_lock= new (std::nothrow) MDL_lock(&commit_lock_key);
+ m_backup_lock= new (std::nothrow) MDL_lock(&backup_lock_key);
lf_hash_init(&m_locks, sizeof(MDL_lock), LF_HASH_UNIQUE, 0, 0,
mdl_locks_key, &my_charset_bin);
@@ -711,10 +816,9 @@ void MDL_map::init()
void MDL_map::destroy()
{
- delete m_global_lock;
- delete m_commit_lock;
+ delete m_backup_lock;
- DBUG_ASSERT(!my_atomic_load32(&m_locks.count));
+ DBUG_ASSERT(!lf_hash_size(&m_locks));
lf_hash_destroy(&m_locks);
}
@@ -732,26 +836,18 @@ MDL_lock* MDL_map::find_or_insert(LF_PINS *pins, const MDL_key *mdl_key)
{
MDL_lock *lock;
- if (mdl_key->mdl_namespace() == MDL_key::GLOBAL ||
- mdl_key->mdl_namespace() == MDL_key::COMMIT)
+ if (mdl_key->mdl_namespace() == MDL_key::BACKUP)
{
/*
- Avoid locking any m_mutex when lock for GLOBAL or COMMIT namespace is
- requested. Return pointer to pre-allocated MDL_lock instance instead.
- Such an optimization allows to save one mutex lock/unlock for any
- statement changing data.
+ Return pointer to pre-allocated MDL_lock instance. Such an optimization
+ allows to save one hash lookup for any statement changing data.
- It works since these namespaces contain only one element so keys
+ It works since this namespace contains only one element so keys
for them look like '<namespace-id>\0\0'.
*/
DBUG_ASSERT(mdl_key->length() == 3);
-
- lock= (mdl_key->mdl_namespace() == MDL_key::GLOBAL) ? m_global_lock :
- m_commit_lock;
-
- mysql_prlock_wrlock(&lock->m_rwlock);
-
- return lock;
+ mysql_prlock_wrlock(&m_backup_lock->m_rwlock);
+ return m_backup_lock;
}
retry:
@@ -780,22 +876,18 @@ retry:
unsigned long
MDL_map::get_lock_owner(LF_PINS *pins, const MDL_key *mdl_key)
{
- MDL_lock *lock;
unsigned long res= 0;
- if (mdl_key->mdl_namespace() == MDL_key::GLOBAL ||
- mdl_key->mdl_namespace() == MDL_key::COMMIT)
+ if (mdl_key->mdl_namespace() == MDL_key::BACKUP)
{
- lock= (mdl_key->mdl_namespace() == MDL_key::GLOBAL) ? m_global_lock :
- m_commit_lock;
- mysql_prlock_rdlock(&lock->m_rwlock);
- res= lock->get_lock_owner();
- mysql_prlock_unlock(&lock->m_rwlock);
+ mysql_prlock_rdlock(&m_backup_lock->m_rwlock);
+ res= m_backup_lock->get_lock_owner();
+ mysql_prlock_unlock(&m_backup_lock->m_rwlock);
}
else
{
- lock= (MDL_lock*) lf_hash_search(&m_locks, pins, mdl_key->ptr(),
- mdl_key->length());
+ MDL_lock *lock= (MDL_lock*) lf_hash_search(&m_locks, pins, mdl_key->ptr(),
+ mdl_key->length());
if (lock)
{
/*
@@ -820,13 +912,9 @@ MDL_map::get_lock_owner(LF_PINS *pins, const MDL_key *mdl_key)
void MDL_map::remove(LF_PINS *pins, MDL_lock *lock)
{
- if (lock->key.mdl_namespace() == MDL_key::GLOBAL ||
- lock->key.mdl_namespace() == MDL_key::COMMIT)
+ if (lock->key.mdl_namespace() == MDL_key::BACKUP)
{
- /*
- Never destroy pre-allocated MDL_lock objects for GLOBAL and
- COMMIT namespaces.
- */
+ /* Never destroy pre-allocated MDL_lock object in BACKUP namespace. */
mysql_prlock_unlock(&lock->m_rwlock);
return;
}
@@ -975,9 +1063,14 @@ void MDL_ticket::destroy(MDL_ticket *ticket)
uint MDL_ticket::get_deadlock_weight() const
{
- return (m_lock->key.mdl_namespace() == MDL_key::GLOBAL ||
- m_type >= MDL_SHARED_UPGRADABLE ?
- DEADLOCK_WEIGHT_DDL : DEADLOCK_WEIGHT_DML);
+ if (m_lock->key.mdl_namespace() == MDL_key::BACKUP)
+ {
+ if (m_type == MDL_BACKUP_FTWRL1)
+ return DEADLOCK_WEIGHT_FTWRL1;
+ return DEADLOCK_WEIGHT_DDL;
+ }
+ return m_type >= MDL_SHARED_UPGRADABLE ?
+ DEADLOCK_WEIGHT_DDL : DEADLOCK_WEIGHT_DML;
}
@@ -1161,13 +1254,12 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket)
wsrep_thd_is_BF(ticket->get_ctx()->get_thd(), false))
{
Ticket_iterator itw(ticket->get_lock()->m_waiting);
- Ticket_iterator itg(ticket->get_lock()->m_granted);
-
- DBUG_ASSERT(WSREP_ON);
- MDL_ticket *waiting, *granted;
+ MDL_ticket *waiting;
MDL_ticket *prev=NULL;
bool added= false;
+ DBUG_ASSERT(WSREP(ticket->get_ctx()->get_thd()));
+
while ((waiting= itw++) && !added)
{
if (!wsrep_thd_is_BF(waiting->get_ctx()->get_thd(), true))
@@ -1183,20 +1275,8 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket)
}
/* Otherwise, insert the ticket at the back of the waiting list. */
- if (!added) m_list.push_back(ticket);
-
- while ((granted= itg++))
- {
- if (granted->get_ctx() != ticket->get_ctx() &&
- granted->is_incompatible_when_granted(ticket->get_type()))
- {
- if (!wsrep_grant_mdl_exception(ticket->get_ctx(), granted,
- &ticket->get_lock()->key))
- {
- WSREP_DEBUG("MDL victim killed at add_ticket");
- }
- }
- }
+ if (!added)
+ m_list.push_back(ticket);
}
else
#endif /* WITH_WSREP */
@@ -1368,17 +1448,23 @@ void MDL_lock::reschedule_waiters()
/**
Compatibility (or rather "incompatibility") matrices for scoped metadata
- lock. Arrays of bitmaps which elements specify which granted/waiting locks
+ lock.
+ Scoped locks are database (or schema) locks.
+ Arrays of bitmaps which elements specify which granted/waiting locks
are incompatible with type of lock being requested.
The first array specifies if particular type of request can be satisfied
if there is granted scoped lock of certain type.
+ (*) Since intention shared scoped locks (IS) are compatible with all other
+ type of locks, they don't need to be implemented and there is no code
+ for them.
+
| Type of active |
Request | scoped lock |
type | IS(*) IX S X |
---------+------------------+
- IS | + + + + |
+ IS(*) | + + + + |
IX | + + - - |
S | + - + - |
X | + - - - |
@@ -1391,7 +1477,7 @@ void MDL_lock::reschedule_waiters()
Request | scoped lock |
type | IS(*) IX S X |
---------+-----------------+
- IS | + + + + |
+ IS(*) | + + + + |
IX | + + - - |
S | + + + - |
X | + + + + |
@@ -1399,9 +1485,6 @@ void MDL_lock::reschedule_waiters()
Here: "+" -- means that request can be satisfied
"-" -- means that request can't be satisfied and should wait
- (*) Since intention shared scoped locks are compatible with all other
- type of locks we don't even have any accounting for them.
-
Note that relation between scoped locks and objects locks requested
by statement is not straightforward and is therefore fully defined
by SQL-layer.
@@ -1440,41 +1523,41 @@ MDL_lock::MDL_scoped_lock::m_waiting_incompatible[MDL_TYPE_END]=
The first array specifies if particular type of request can be satisfied
if there is granted lock of certain type.
- Request | Granted requests for lock |
- type | S SH SR SW SU SRO SNW SNRW X |
- ----------+---------------------------------------+
- S | + + + + + + + + - |
- SH | + + + + + + + + - |
- SR | + + + + + + + - - |
- SW | + + + + + - - - - |
- SU | + + + + - + - - - |
- SRO | + + + - + + + - - |
- SNW | + + + - - + - - - |
- SNRW | + + - - - - - - - |
- X | - - - - - - - - - |
- SU -> X | - - - - 0 - 0 0 0 |
- SNW -> X | - - - 0 0 - 0 0 0 |
- SNRW -> X | - - 0 0 0 0 0 0 0 |
+ Request | Granted requests for lock |
+ type | S SH SR SW SU SRO SNW SNRW X |
+ ----------+------------------------------------+
+ S | + + + + + + + + - |
+ SH | + + + + + + + + - |
+ SR | + + + + + + + - - |
+ SW | + + + + + - - - - |
+ SU | + + + + - + - - - |
+ SRO | + + + - + + + - - |
+ SNW | + + + - - + - - - |
+ SNRW | + + - - - - - - - |
+ X | - - - - - - - - - |
+ SU -> X | - - - - 0 - 0 0 0 |
+ SNW -> X | - - - 0 0 - 0 0 0 |
+ SNRW -> X | - - 0 0 0 0 0 0 0 |
The second array specifies if particular type of request can be satisfied
if there is waiting request for the same lock of certain type. In other
words it specifies what is the priority of different lock types.
- Request | Pending requests for lock |
- type | S SH SR SW SU SRO SNW SNRW X |
- ----------+--------------------------------------+
- S | + + + + + + + + - |
- SH | + + + + + + + + + |
- SR | + + + + + + + - - |
- SW | + + + + + + - - - |
- SU | + + + + + + + + - |
- SRO | + + + - + + + - - |
- SNW | + + + + + + + + - |
- SNRW | + + + + + + + + - |
- X | + + + + + + + + + |
- SU -> X | + + + + + + + + + |
- SNW -> X | + + + + + + + + + |
- SNRW -> X | + + + + + + + + + |
+ Request | Pending requests for lock |
+ type | S SH SR SW SU SRO SNW SNRW X |
+ ----------+-----------------------------------+
+ S | + + + + + + + + - |
+ SH | + + + + + + + + + |
+ SR | + + + + + + + - - |
+ SW | + + + + + + - - - |
+ SU | + + + + + + + + - |
+ SRO | + + + - + + + - - |
+ SNW | + + + + + + + + - |
+ SNRW | + + + + + + + + - |
+ X | + + + + + + + + + |
+ SU -> X | + + + + + + + + + |
+ SNW -> X | + + + + + + + + + |
+ SNRW -> X | + + + + + + + + + |
Here: "+" -- means that request can be satisfied
"-" -- means that request can't be satisfied and should wait
@@ -1535,9 +1618,126 @@ MDL_lock::MDL_object_lock::m_waiting_incompatible[MDL_TYPE_END]=
/**
+ Compatibility (or rather "incompatibility") matrices for backup metadata
+ lock. Arrays of bitmaps which elements specify which granted/waiting locks
+ are incompatible with type of lock being requested.
+
+ The first array specifies if particular type of request can be satisfied
+ if there is granted backup lock of certain type.
+
+ Request | Type of active backup lock |
+ type | S0 S1 S2 S3 S4 F1 F2 D TD SD DD BL AC C |
+ ----------+---------------------------------------------------------+
+ S0 | - - - - - + + + + + + + + + |
+ S1 | - + + + + + + + + + + + + + |
+ S2 | - + + + + + + - + + + + + + |
+ S3 | - + + + + + + - + + - + + + |
+ S4 | - + + + + + + - + - - + + - |
+ FTWRL1 | + + + + + + + - - - - + - + |
+ FTWRL2 | + + + + + + + - - - - + - - |
+ D | + - - - - - - + + + + + + + |
+ TD | + + + + + - - + + + + + + + |
+ SD | + + + + - - - + + + + + + + |
+ DDL | + + + - - - - + + + + - + + |
+ BLOCK_DDL | + + + + + + + + + + - + + + |
+ ALTER_COP | + + + + + - - + + + + + + + |
+ COMMIT | + + + + - + - + + + + + + + |
+
+ The second array specifies if particular type of request can be satisfied
+ if there is already waiting request for the backup lock of certain type.
+ I.e. it specifies what is the priority of different lock types.
+
+ Request | Pending backup lock |
+ type | S0 S1 S2 S3 S4 F1 F2 D TD SD DD BL AC C |
+ ----------+---------------------------------------------------------+
+ S0 | + - - - - + + + + + + + + + |
+ S1 | + + + + + + + + + + + + + + |
+ S2 | + + + + + + + + + + + + + + |
+ S3 | + + + + + + + + + + + + + + |
+ S4 | + + + + + + + + + + + + + + |
+ FTWRL1 | + + + + + + + + + + + + + + |
+ FTWRL2 | + + + + + + + + + + + + + + |
+ D | + - - - - - - + + + + + + + |
+ TD | + + + + + - - + + + + + + + |
+ SD | + + + + - - - + + + + + + + |
+ DDL | + + + - - - - + + + + - + + |
+ BLOCK_DDL | + + + + + + + + + + + + + + |
+ ALTER_COP | + + + + + - - + + + + + + + |
+ COMMIT | + + + + - + - + + + + + + + |
+
+ Here: "+" -- means that request can be satisfied
+ "-" -- means that request can't be satisfied and should wait
+*/
+
+/*
+ NOTE: If you add a new MDL_BACKUP_XXX level lock, you have to also add it
+ to MDL_BACKUP_START in the two arrays below!
+*/
+
+const MDL_lock::bitmap_t
+MDL_lock::MDL_backup_lock::m_granted_incompatible[MDL_BACKUP_END]=
+{
+ /* MDL_BACKUP_START */
+ MDL_BIT(MDL_BACKUP_START) | MDL_BIT(MDL_BACKUP_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_DDL) | MDL_BIT(MDL_BACKUP_WAIT_COMMIT),
+ MDL_BIT(MDL_BACKUP_START),
+ MDL_BIT(MDL_BACKUP_START) | MDL_BIT(MDL_BACKUP_DML),
+ MDL_BIT(MDL_BACKUP_START) | MDL_BIT(MDL_BACKUP_DML) | MDL_BIT(MDL_BACKUP_DDL),
+ MDL_BIT(MDL_BACKUP_START) | MDL_BIT(MDL_BACKUP_DML) | MDL_BIT(MDL_BACKUP_SYS_DML) | MDL_BIT(MDL_BACKUP_DDL) | MDL_BIT(MDL_BACKUP_COMMIT),
+
+ /* MDL_BACKUP_FTWRL1 */
+ MDL_BIT(MDL_BACKUP_DML) | MDL_BIT(MDL_BACKUP_TRANS_DML) | MDL_BIT(MDL_BACKUP_SYS_DML) | MDL_BIT(MDL_BACKUP_DDL) | MDL_BIT(MDL_BACKUP_ALTER_COPY),
+ MDL_BIT(MDL_BACKUP_DML) | MDL_BIT(MDL_BACKUP_TRANS_DML) | MDL_BIT(MDL_BACKUP_SYS_DML) | MDL_BIT(MDL_BACKUP_DDL) | MDL_BIT(MDL_BACKUP_ALTER_COPY) | MDL_BIT(MDL_BACKUP_COMMIT),
+ /* MDL_BACKUP_DML */
+ MDL_BIT(MDL_BACKUP_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_DDL) | MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ /* MDL_BACKUP_DDL */
+ MDL_BIT(MDL_BACKUP_WAIT_DDL) | MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2) | MDL_BIT(MDL_BACKUP_BLOCK_DDL),
+ /* MDL_BACKUP_BLOCK_DDL */
+ MDL_BIT(MDL_BACKUP_DDL),
+ MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ /* MDL_BACKUP_COMMIT */
+ MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL2)
+};
+
+
+const MDL_lock::bitmap_t
+MDL_lock::MDL_backup_lock::m_waiting_incompatible[MDL_BACKUP_END]=
+{
+ /* MDL_BACKUP_START */
+ MDL_BIT(MDL_BACKUP_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_DDL) | MDL_BIT(MDL_BACKUP_WAIT_COMMIT),
+ 0,
+ 0,
+ 0,
+ 0,
+ /* MDL_BACKUP_FTWRL1 */
+ 0,
+ 0,
+
+ /* MDL_BACKUP_DML */
+ MDL_BIT(MDL_BACKUP_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_FLUSH) | MDL_BIT(MDL_BACKUP_WAIT_DDL) | MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ /* MDL_BACKUP_DDL */
+ MDL_BIT(MDL_BACKUP_WAIT_DDL) | MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2) | MDL_BIT(MDL_BACKUP_BLOCK_DDL),
+ /* MDL_BACKUP_BLOCK_DDL */
+ 0,
+ MDL_BIT(MDL_BACKUP_FTWRL1) | MDL_BIT(MDL_BACKUP_FTWRL2),
+ /* MDL_BACKUP_COMMIT */
+ MDL_BIT(MDL_BACKUP_WAIT_COMMIT) | MDL_BIT(MDL_BACKUP_FTWRL2)
+};
+
+
+/**
Check if request for the metadata lock can be satisfied given its
current state.
+ New lock request can be satisfied iff:
+ - There are no incompatible types of satisfied requests
+ in other contexts
+ - There are no waiting requests which have higher priority
+ than this request when priority was not ignored.
+
@param type_arg The requested lock type.
@param requestor_ctx The MDL context of the requestor.
@param ignore_lock_priority Ignore lock priority.
@@ -1555,78 +1755,72 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg,
MDL_context *requestor_ctx,
bool ignore_lock_priority) const
{
- bool can_grant= FALSE;
bitmap_t waiting_incompat_map= incompatible_waiting_types_bitmap()[type_arg];
bitmap_t granted_incompat_map= incompatible_granted_types_bitmap()[type_arg];
- bool wsrep_can_grant= TRUE;
+#ifdef WITH_WSREP
/*
- New lock request can be satisfied iff:
- - There are no incompatible types of satisfied requests
- in other contexts
- - There are no waiting requests which have higher priority
- than this request when priority was not ignored.
+ Approve lock request in BACKUP namespace for BF threads.
+ We should get rid of this code and forbid FTWRL/BACKUP statements
+ when wsrep is active.
*/
- if (ignore_lock_priority || !(m_waiting.bitmap() & waiting_incompat_map))
+ if ((wsrep_thd_is_toi(requestor_ctx->get_thd()) ||
+ wsrep_thd_is_applying(requestor_ctx->get_thd())) &&
+ key.mdl_namespace() == MDL_key::BACKUP)
{
- if (! (m_granted.bitmap() & granted_incompat_map))
- can_grant= TRUE;
- else
+ bool waiting_incompatible= m_waiting.bitmap() & waiting_incompat_map;
+ bool granted_incompatible= m_granted.bitmap() & granted_incompat_map;
+ if (waiting_incompatible || granted_incompatible)
{
- Ticket_iterator it(m_granted);
- MDL_ticket *ticket;
+ WSREP_DEBUG("global lock granted for BF%s: %lu %s",
+ waiting_incompatible ? " (waiting queue)" : "",
+ thd_get_thread_id(requestor_ctx->get_thd()),
+ wsrep_thd_query(requestor_ctx->get_thd()));
+ }
+ return true;
+ }
+#endif /* WITH_WSREP */
+
+ if (!ignore_lock_priority && (m_waiting.bitmap() & waiting_incompat_map))
+ return false;
+
+ if (m_granted.bitmap() & granted_incompat_map)
+ {
+ Ticket_iterator it(m_granted);
+ bool can_grant= true;
- /* Check that the incompatible lock belongs to some other context. */
- while ((ticket= it++))
+ /* Check that the incompatible lock belongs to some other context. */
+ while (auto ticket= it++)
+ {
+ if (ticket->get_ctx() != requestor_ctx &&
+ ticket->is_incompatible_when_granted(type_arg))
{
- if (ticket->get_ctx() != requestor_ctx &&
- ticket->is_incompatible_when_granted(type_arg))
- {
+ can_grant= false;
#ifdef WITH_WSREP
- if (WSREP_ON && wsrep_thd_is_BF(requestor_ctx->get_thd(),false) &&
- key.mdl_namespace() == MDL_key::GLOBAL)
- {
- WSREP_DEBUG("global lock granted for BF: %lu %s",
- thd_get_thread_id(requestor_ctx->get_thd()),
- wsrep_thd_query(requestor_ctx->get_thd()));
- can_grant = true;
- }
- else if (!wsrep_grant_mdl_exception(requestor_ctx, ticket, &key))
+ /*
+ non WSREP threads must report conflict immediately
+ note: RSU processing wsrep threads, have wsrep_on==OFF
+ */
+ if (WSREP(requestor_ctx->get_thd()) ||
+ requestor_ctx->get_thd()->wsrep_cs().mode() ==
+ wsrep::client_state::m_rsu)
+ {
+ wsrep_handle_mdl_conflict(requestor_ctx, ticket, &key);
+ if (wsrep_log_conflicts)
{
- wsrep_can_grant= FALSE;
- if (wsrep_log_conflicts)
- {
- MDL_lock * lock = ticket->get_lock();
- WSREP_INFO(
- "MDL conflict db=%s table=%s ticket=%d solved by %s",
- lock->key.db_name(), lock->key.name(), ticket->get_type(),
- "abort" );
- }
+ auto key= ticket->get_key();
+ WSREP_INFO("MDL conflict db=%s table=%s ticket=%d solved by abort",
+ key->db_name(), key->name(), ticket->get_type());
}
- else
- can_grant= TRUE;
- /* Continue loop */
-#else
- break;
-#endif /* WITH_WSREP */
+ continue;
}
+#endif /* WITH_WSREP */
+ break;
}
- if ((ticket == NULL) && wsrep_can_grant)
- can_grant= TRUE; /* Incompatible locks are our own. */
- }
- }
- else
- {
- if (WSREP_ON && wsrep_thd_is_BF(requestor_ctx->get_thd(), false) &&
- key.mdl_namespace() == MDL_key::GLOBAL)
- {
- WSREP_DEBUG("global lock granted for BF (waiting queue): %lu %s",
- thd_get_thread_id(requestor_ctx->get_thd()),
- wsrep_thd_query(requestor_ctx->get_thd()));
- can_grant = true;
}
+ return can_grant;
}
- return can_grant;
+ return true;
}
@@ -1739,6 +1933,27 @@ bool MDL_ticket::is_incompatible_when_waiting(enum_mdl_type type) const
}
+static const LEX_STRING
+*get_mdl_lock_name(MDL_key::enum_mdl_namespace mdl_namespace,
+ enum_mdl_type type)
+{
+ return mdl_namespace == MDL_key::BACKUP ?
+ &backup_lock_types[type] :
+ &lock_types[type];
+}
+
+
+const LEX_STRING *MDL_ticket::get_type_name() const
+{
+ return get_mdl_lock_name(get_key()->mdl_namespace(), m_type);
+}
+
+const LEX_STRING *MDL_ticket::get_type_name(enum_mdl_type type) const
+{
+ return get_mdl_lock_name(get_key()->mdl_namespace(), type);
+}
+
+
/**
Check whether the context already holds a compatible lock ticket
on an object.
@@ -1772,8 +1987,10 @@ MDL_context::find_ticket(MDL_request *mdl_request,
if (mdl_request->key.is_equal(&ticket->m_lock->key) &&
ticket->has_stronger_or_equal_type(mdl_request->type))
{
- DBUG_PRINT("info", ("Adding mdl lock %d to %d",
- mdl_request->type, ticket->m_type));
+ DBUG_PRINT("info", ("Adding mdl lock %s to %s",
+ get_mdl_lock_name(mdl_request->key.mdl_namespace(),
+ mdl_request->type)->str,
+ ticket->get_type_name()->str));
*result_duration= duration;
return ticket;
}
@@ -1859,11 +2076,8 @@ MDL_context::try_acquire_lock_impl(MDL_request *mdl_request,
MDL_ticket *ticket;
enum_mdl_duration found_duration;
- DBUG_ASSERT(mdl_request->type != MDL_EXCLUSIVE ||
- is_lock_owner(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE));
- DBUG_ASSERT(mdl_request->ticket == NULL);
-
/* Don't take chances in production. */
+ DBUG_ASSERT(mdl_request->ticket == NULL);
mdl_request->ticket= NULL;
/*
@@ -2064,10 +2278,19 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
MDL_ticket *ticket;
MDL_wait::enum_wait_status wait_status;
DBUG_ENTER("MDL_context::acquire_lock");
- DBUG_PRINT("enter", ("lock_type: %d", mdl_request->type));
+#ifndef DBUG_OFF
+ const char *mdl_lock_name= get_mdl_lock_name(
+ mdl_request->key.mdl_namespace(), mdl_request->type)->str;
+#endif
+ DBUG_PRINT("enter", ("lock_type: %s timeout: %f",
+ mdl_lock_name,
+ lock_wait_timeout));
if (try_acquire_lock_impl(mdl_request, &ticket))
+ {
+ DBUG_PRINT("mdl", ("OOM: %s", mdl_lock_name));
DBUG_RETURN(TRUE);
+ }
if (mdl_request->ticket)
{
@@ -2077,9 +2300,14 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
accordingly, so we can simply return success.
*/
DBUG_PRINT("info", ("Got lock without waiting"));
+ DBUG_PRINT("mdl", ("Seized: %s", dbug_print_mdl(mdl_request->ticket)));
DBUG_RETURN(FALSE);
}
+#ifndef DBUG_OFF
+ const char *ticket_msg= dbug_print_mdl(ticket);
+#endif
+
/*
Our attempt to acquire lock without waiting has failed.
As a result of this attempt we got MDL_ticket with m_lock
@@ -2090,6 +2318,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
if (lock_wait_timeout == 0)
{
+ DBUG_PRINT("mdl", ("Nowait: %s", ticket_msg));
mysql_prlock_unlock(&lock->m_rwlock);
MDL_ticket::destroy(ticket);
my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0));
@@ -2128,6 +2357,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
mysql_prlock_unlock(&lock->m_rwlock);
+ DBUG_PRINT("mdl", ("Waiting: %s", ticket_msg));
will_wait_for(ticket);
/* There is a shared or exclusive lock on the object. */
@@ -2180,12 +2410,16 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
switch (wait_status)
{
case MDL_wait::VICTIM:
+ DBUG_PRINT("mdl", ("Deadlock: %s", ticket_msg));
+ DBUG_PRINT("mdl_locks", ("Existing locks:%s", mdl_dbug_print_locks()));
my_error(ER_LOCK_DEADLOCK, MYF(0));
break;
case MDL_wait::TIMEOUT:
+ DBUG_PRINT("mdl", ("Timeout: %s", ticket_msg));
my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0));
break;
case MDL_wait::KILLED:
+ DBUG_PRINT("mdl", ("Killed: %s", ticket_msg));
get_thd()->send_kill_message();
break;
default:
@@ -2207,6 +2441,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
mdl_request->ticket= ticket;
+ DBUG_PRINT("mdl", ("Acquired: %s", ticket_msg));
DBUG_RETURN(FALSE);
}
@@ -2319,15 +2554,23 @@ MDL_context::upgrade_shared_lock(MDL_ticket *mdl_ticket,
MDL_savepoint mdl_svp= mdl_savepoint();
bool is_new_ticket;
DBUG_ENTER("MDL_context::upgrade_shared_lock");
- DBUG_PRINT("enter",("new_type: %d lock_wait_timeout: %f", new_type,
+ DBUG_PRINT("enter",("old_type: %s new_type: %s lock_wait_timeout: %f",
+ mdl_ticket->get_type_name()->str,
+ mdl_ticket->get_type_name(new_type)->str,
lock_wait_timeout));
DEBUG_SYNC(get_thd(), "mdl_upgrade_lock");
/*
Do nothing if already upgraded. Used when we FLUSH TABLE under
LOCK TABLES and a table is listed twice in LOCK TABLES list.
+
+ In BACKUP namespace upgrade must always happen. Even though
+ MDL_BACKUP_START is not stronger than MDL_BACKUP_FLUSH from
+ has_stronger_or_equal_type(), the latter effectively blocks
+ new MDL_BACKUP_DML while the former doesn't.
*/
- if (mdl_ticket->has_stronger_or_equal_type(new_type))
+ if (mdl_ticket->has_stronger_or_equal_type(new_type) &&
+ mdl_ticket->get_key()->mdl_namespace() != MDL_key::BACKUP)
DBUG_RETURN(FALSE);
mdl_xlock_request.init(&mdl_ticket->m_lock->key, new_type,
@@ -2595,6 +2838,7 @@ void MDL_context::find_deadlock()
context was waiting is concurrently satisfied.
*/
(void) victim->m_wait.set_status(MDL_wait::VICTIM);
+ victim->inc_deadlock_overweight();
victim->unlock_deadlock_victim();
if (victim == this)
@@ -2626,6 +2870,7 @@ void MDL_context::release_lock(enum_mdl_duration duration, MDL_ticket *ticket)
lock->key.db_name(), lock->key.name()));
DBUG_ASSERT(this == ticket->get_ctx());
+ DBUG_PRINT("mdl", ("Released: %s", dbug_print_mdl(ticket)));
lock->remove_ticket(m_pins, &MDL_lock::m_granted, ticket);
@@ -2728,9 +2973,13 @@ void MDL_ticket::downgrade_lock(enum_mdl_type type)
if (m_type == type || !has_stronger_or_equal_type(type))
return;
- /* Only allow downgrade from EXCLUSIVE and SHARED_NO_WRITE. */
- DBUG_ASSERT(m_type == MDL_EXCLUSIVE ||
- m_type == MDL_SHARED_NO_WRITE);
+ /* Only allow downgrade in some specific known cases */
+ DBUG_ASSERT((get_key()->mdl_namespace() != MDL_key::BACKUP &&
+ (m_type == MDL_EXCLUSIVE ||
+ m_type == MDL_SHARED_NO_WRITE)) ||
+ (get_key()->mdl_namespace() == MDL_key::BACKUP &&
+ (m_type == MDL_BACKUP_DDL ||
+ m_type == MDL_BACKUP_WAIT_FLUSH)));
mysql_prlock_wrlock(&m_lock->m_rwlock);
/*
@@ -2842,18 +3091,17 @@ void MDL_context::rollback_to_savepoint(const MDL_savepoint &mdl_savepoint)
implementation of COMMIT (implicit or explicit) and ROLLBACK.
*/
-void MDL_context::release_transactional_locks()
+void MDL_context::release_transactional_locks(THD *thd)
{
DBUG_ENTER("MDL_context::release_transactional_locks");
/* Fail if there are active transactions */
- DBUG_ASSERT(!(current_thd->server_status &
+ DBUG_ASSERT(!(thd->server_status &
(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY)));
release_locks_stored_before(MDL_STATEMENT, NULL);
release_locks_stored_before(MDL_TRANSACTION, NULL);
DBUG_VOID_RETURN;
}
-
void MDL_context::release_statement_locks()
{
DBUG_ENTER("MDL_context::release_transactional_locks");
@@ -3019,30 +3267,11 @@ bool MDL_context::has_explicit_locks()
#ifdef WITH_WSREP
static
-const char *wsrep_get_mdl_type_name(enum_mdl_type type)
-{
- switch (type)
- {
- case MDL_INTENTION_EXCLUSIVE : return "intention exclusive";
- case MDL_SHARED : return "shared";
- case MDL_SHARED_HIGH_PRIO : return "shared high prio";
- case MDL_SHARED_READ : return "shared read";
- case MDL_SHARED_WRITE : return "shared write";
- case MDL_SHARED_UPGRADABLE : return "shared upgradable";
- case MDL_SHARED_NO_WRITE : return "shared no write";
- case MDL_SHARED_NO_READ_WRITE : return "shared no read write";
- case MDL_EXCLUSIVE : return "exclusive";
- default: break;
- }
- return "UNKNOWN";
-}
-
-static
const char *wsrep_get_mdl_namespace_name(MDL_key::enum_mdl_namespace ns)
{
switch (ns)
{
- case MDL_key::GLOBAL : return "GLOBAL";
+ case MDL_key::BACKUP : return "BACKUP";
case MDL_key::SCHEMA : return "SCHEMA";
case MDL_key::TABLE : return "TABLE";
case MDL_key::FUNCTION : return "FUNCTION";
@@ -3050,7 +3279,6 @@ const char *wsrep_get_mdl_namespace_name(MDL_key::enum_mdl_namespace ns)
case MDL_key::PACKAGE_BODY: return "PACKAGE BODY";
case MDL_key::TRIGGER : return "TRIGGER";
case MDL_key::EVENT : return "EVENT";
- case MDL_key::COMMIT : return "COMMIT";
case MDL_key::USER_LOCK : return "USER_LOCK";
default: break;
}
@@ -3063,7 +3291,7 @@ void MDL_ticket::wsrep_report(bool debug)
const PSI_stage_info *psi_stage= m_lock->key.get_wait_state_name();
WSREP_DEBUG("MDL ticket: type: %s space: %s db: %s name: %s (%s)",
- wsrep_get_mdl_type_name(get_type()),
+ get_type_name()->str,
wsrep_get_mdl_namespace_name(m_lock->key.mdl_namespace()),
m_lock->key.db_name(),
m_lock->key.name(),
diff --git a/sql/mdl.h b/sql/mdl.h
index 93da280dda6..55d6ddf845b 100644
--- a/sql/mdl.h
+++ b/sql/mdl.h
@@ -28,6 +28,10 @@ class MDL_lock;
class MDL_ticket;
bool ok_for_lower_case_names(const char *name);
+typedef unsigned short mdl_bitmap_t;
+#define MDL_BIT(A) static_cast<mdl_bitmap_t>(1U << A)
+
+
/**
@def ENTER_COND(C, M, S, O)
Start a wait on a condition.
@@ -112,19 +116,27 @@ public:
@sa Comments for MDL_object_lock::can_grant_lock() and
MDL_scoped_lock::can_grant_lock() for details.
+
+ Scoped locks are database (or schema) locks.
+ The object locks are for tables, triggers etc.
*/
enum enum_mdl_type {
+ /* This means that the MDL_request is not initialized */
+ MDL_NOT_INITIALIZED= -1,
/*
- An intention exclusive metadata lock. Used only for scoped locks.
+ An intention exclusive metadata lock (IX). Used only for scoped locks.
Owner of this type of lock can acquire upgradable exclusive locks on
individual objects.
Compatible with other IX locks, but is incompatible with scoped S and
X locks.
+ IX lock is taken in SCHEMA namespace when we intend to modify
+ object metadata. Object may refer table, stored procedure, trigger,
+ view/etc.
*/
MDL_INTENTION_EXCLUSIVE= 0,
/*
- A shared metadata lock.
+ A shared metadata lock (S).
To be used in cases when we are interested in object metadata only
and there is no intention to access object data (e.g. for stored
routines or during preparing prepared statements).
@@ -144,6 +156,9 @@ enum enum_mdl_type {
use SNRW locks for them. It also does not arise when S locks are used
during PREPARE calls as table-level locks are not acquired in this
case.
+ This lock is taken for global read lock, when caching a stored
+ procedure in memory for the duration of the transaction and for
+ tables used by prepared statements.
*/
MDL_SHARED,
/*
@@ -164,8 +179,8 @@ enum enum_mdl_type {
*/
MDL_SHARED_HIGH_PRIO,
/*
- A shared metadata lock for cases when there is an intention to read data
- from table.
+ A shared metadata lock (SR) for cases when there is an intention to read
+ data from table.
A connection holding this kind of lock can read table metadata and read
table data (after acquiring appropriate table and row-level locks).
This means that one can only acquire TL_READ, TL_READ_NO_INSERT, and
@@ -175,7 +190,7 @@ enum enum_mdl_type {
*/
MDL_SHARED_READ,
/*
- A shared metadata lock for cases when there is an intention to modify
+ A shared metadata lock (SW) for cases when there is an intention to modify
(and not just read) data in the table.
A connection holding SW lock can read table metadata and modify or read
table data (after acquiring appropriate table and row-level locks).
@@ -185,8 +200,8 @@ enum enum_mdl_type {
*/
MDL_SHARED_WRITE,
/*
- An upgradable shared metadata lock for cases when there is an intention
- to modify (and not just read) data in the table.
+ An upgradable shared metadata lock for cases when there is an
+ intention to modify (and not just read) data in the table.
Can be upgraded to MDL_SHARED_NO_WRITE and MDL_EXCLUSIVE.
A connection holding SU lock can read table metadata and modify or read
table data (after acquiring appropriate table and row-level locks).
@@ -226,7 +241,7 @@ enum enum_mdl_type {
*/
MDL_SHARED_NO_READ_WRITE,
/*
- An exclusive metadata lock.
+ An exclusive metadata lock (X).
A connection holding this lock can modify both table's metadata and data.
No other type of metadata lock can be granted while this lock is held.
To be used for CREATE/DROP/RENAME TABLE statements and for execution of
@@ -234,7 +249,75 @@ enum enum_mdl_type {
*/
MDL_EXCLUSIVE,
/* This should be the last !!! */
- MDL_TYPE_END};
+ MDL_TYPE_END
+};
+
+
+/** Backup locks */
+
+/**
+ Block concurrent backup
+*/
+#define MDL_BACKUP_START enum_mdl_type(0)
+/**
+ Block new write requests to non transactional tables
+*/
+#define MDL_BACKUP_FLUSH enum_mdl_type(1)
+/**
+ In addition to previous locks, blocks running requests to non trans tables
+ Used to wait until all DML usage of on trans tables are finished
+*/
+#define MDL_BACKUP_WAIT_FLUSH enum_mdl_type(2)
+/**
+ In addition to previous locks, blocks new DDL's from starting
+*/
+#define MDL_BACKUP_WAIT_DDL enum_mdl_type(3)
+/**
+ In addition to previous locks, blocks commits
+*/
+#define MDL_BACKUP_WAIT_COMMIT enum_mdl_type(4)
+
+/**
+ Blocks (or is blocked by) statements that intend to modify data. Acquired
+ before commit lock by FLUSH TABLES WITH READ LOCK.
+*/
+#define MDL_BACKUP_FTWRL1 enum_mdl_type(5)
+
+/**
+ Blocks (or is blocked by) commits. Acquired after global read lock by
+ FLUSH TABLES WITH READ LOCK.
+*/
+#define MDL_BACKUP_FTWRL2 enum_mdl_type(6)
+
+#define MDL_BACKUP_DML enum_mdl_type(7)
+#define MDL_BACKUP_TRANS_DML enum_mdl_type(8)
+#define MDL_BACKUP_SYS_DML enum_mdl_type(9)
+
+/**
+ Must be acquired by DDL statements that intend to modify data.
+ Currently it's also used for LOCK TABLES.
+*/
+#define MDL_BACKUP_DDL enum_mdl_type(10)
+
+/**
+ Blocks new DDL's. Used by backup code to enable DDL logging
+*/
+#define MDL_BACKUP_BLOCK_DDL enum_mdl_type(11)
+
+/*
+ Statement is modifying data, but will not block MDL_BACKUP_DDL or earlier
+ BACKUP stages.
+ ALTER TABLE is started with MDL_BACKUP_DDL, but changed to
+ MDL_BACKUP_ALTER_COPY while alter table is copying or modifing data.
+*/
+
+#define MDL_BACKUP_ALTER_COPY enum_mdl_type(12)
+
+/**
+ Must be acquired during commit.
+*/
+#define MDL_BACKUP_COMMIT enum_mdl_type(13)
+#define MDL_BACKUP_END enum_mdl_type(14)
/** Duration of metadata lock. */
@@ -282,10 +365,13 @@ public:
/**
Object namespaces.
Sic: when adding a new member to this enum make sure to
- update m_namespace_to_wait_state_name array in mdl.cc!
+ update m_namespace_to_wait_state_name array in mdl.cc and
+ metadata_lock_info_lock_name in metadata_lock_info.cc!
Different types of objects exist in different namespaces
+ - SCHEMA is for databases (to protect against DROP DATABASE)
- TABLE is for tables and views.
+ - BACKUP is for locking DML, DDL and COMMIT's during BACKUP STAGES
- FUNCTION is for stored functions.
- PROCEDURE is for stored procedures.
- TRIGGER is for triggers.
@@ -294,7 +380,7 @@ public:
it's necessary to have a separate namespace for them since
MDL_key is also used outside of the MDL subsystem.
*/
- enum enum_mdl_namespace { GLOBAL=0,
+ enum enum_mdl_namespace { BACKUP=0,
SCHEMA,
TABLE,
FUNCTION,
@@ -302,7 +388,6 @@ public:
PACKAGE_BODY,
TRIGGER,
EVENT,
- COMMIT,
USER_LOCK, /* user level locks. */
/* This should be the last ! */
NAMESPACE_END };
@@ -509,12 +594,13 @@ public:
*/
MDL_request& operator=(const MDL_request &)
{
+ type= MDL_NOT_INITIALIZED;
ticket= NULL;
/* Do nothing, in particular, don't try to copy the key. */
return *this;
}
/* Another piece of ugliness for TABLE_LIST constructor */
- MDL_request() {}
+ MDL_request(): type(MDL_NOT_INITIALIZED), ticket(NULL) {}
MDL_request(const MDL_request *rhs)
:type(rhs->type),
@@ -562,7 +648,8 @@ public:
enum enum_deadlock_weight
{
- DEADLOCK_WEIGHT_DML= 0,
+ DEADLOCK_WEIGHT_FTWRL1= 0,
+ DEADLOCK_WEIGHT_DML= 1,
DEADLOCK_WEIGHT_DDL= 100
};
/* A helper used to determine which lock request should be aborted. */
@@ -620,6 +707,8 @@ public:
m_type == MDL_EXCLUSIVE;
}
enum_mdl_type get_type() const { return m_type; }
+ const LEX_STRING *get_type_name() const;
+ const LEX_STRING *get_type_name(enum_mdl_type type) const;
MDL_lock *get_lock() const { return m_lock; }
MDL_key *get_key() const;
void downgrade_lock(enum_mdl_type type);
@@ -812,7 +901,7 @@ public:
void set_lock_duration(MDL_ticket *mdl_ticket, enum_mdl_duration duration);
void release_statement_locks();
- void release_transactional_locks();
+ void release_transactional_locks(THD *thd);
void release_explicit_locks();
void rollback_to_savepoint(const MDL_savepoint &mdl_savepoint);
@@ -820,7 +909,8 @@ public:
/** @pre Only valid if we started waiting for lock. */
inline uint get_deadlock_weight() const
- { return m_waiting_for->get_deadlock_weight(); }
+ { return m_waiting_for->get_deadlock_weight() + m_deadlock_overweight; }
+ void inc_deadlock_overweight() { m_deadlock_overweight++; }
/**
Post signal to the context (and wake it up if necessary).
@@ -938,6 +1028,7 @@ private:
*/
MDL_wait_for_subgraph *m_waiting_for;
LF_PINS *m_pins;
+ uint m_deadlock_overweight= 0;
private:
MDL_ticket *find_ticket(MDL_request *mdl_req,
enum_mdl_duration *duration);
@@ -1011,6 +1102,8 @@ extern "C" int thd_is_connected(MYSQL_THD thd);
*/
extern "C" ulong max_write_lock_count;
+typedef int (*mdl_iterator_callback)(MDL_ticket *ticket, void *arg,
+ bool granted);
extern MYSQL_PLUGIN_IMPORT
-int mdl_iterate(int (*callback)(MDL_ticket *ticket, void *arg), void *arg);
-#endif
+int mdl_iterate(mdl_iterator_callback callback, void *arg);
+#endif /* MDL_H */
diff --git a/sql/mem_root_array.h b/sql/mem_root_array.h
index 1230f41247c..3d03a5a5db2 100644
--- a/sql/mem_root_array.h
+++ b/sql/mem_root_array.h
@@ -87,9 +87,11 @@ public:
// Returns a pointer to the first element in the array.
Element_type *begin() { return &m_array[0]; }
+ const Element_type *begin() const { return &m_array[0]; }
// Returns a pointer to the past-the-end element in the array.
Element_type *end() { return &m_array[size()]; }
+ const Element_type *end() const { return &m_array[size()]; }
// Erases all of the elements.
void clear()
@@ -226,6 +228,7 @@ public:
size_t element_size() const { return sizeof(Element_type); }
bool empty() const { return size() == 0; }
size_t size() const { return m_size; }
+ const MEM_ROOT *mem_root() const { return m_root; }
private:
MEM_ROOT *const m_root;
diff --git a/sql/message.h b/sql/message.h
index 934503751d6..a6491736877 100644
--- a/sql/message.h
+++ b/sql/message.h
@@ -1,21 +1,3 @@
-#ifndef MESSAGE_INCLUDED
-#define MESSAGE_INCLUDED
-/* Copyright (c) 2008, 2009 Sun Microsystems, Inc.
- Use is subject to license terms.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
-
/*
To change or add messages mysqld writes to the Windows error log, run
mc.exe message.mc
@@ -24,10 +6,8 @@
mc.exe can be installed with Windows SDK, some Visual Studio distributions
do not include it.
*/
-
-
//
-// Values are 32 bit values layed out as follows:
+// Values are 32 bit values laid out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
@@ -67,11 +47,8 @@
//
// MessageText:
//
-// %1For more information, see Help and Support Center at http://www.mysql.com.
-//
-//
+// %1
+//
//
#define MSG_DEFAULT 0xC0000064L
-#endif /* MESSAGE_INCLUDED */
-
diff --git a/sql/message.mc b/sql/message.mc
index 8d68d599365..c009b048d05 100644
--- a/sql/message.mc
+++ b/sql/message.mc
@@ -11,6 +11,5 @@ Severity = Error
Facility = Application
SymbolicName = MSG_DEFAULT
Language = English
-%1For more information, see Help and Support Center at http://www.mysql.com.
-
+%1
diff --git a/sql/message.rc b/sql/message.rc
index 0885a897e6f..0abcb0fa2c5 100644
--- a/sql/message.rc
+++ b/sql/message.rc
@@ -1,2 +1,2 @@
LANGUAGE 0x9,0x1
-1 11 MSG00001.bin
+1 11 "MSG00001.bin"
diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc
index 5e0afd6edb2..601268ec2f6 100644
--- a/sql/multi_range_read.cc
+++ b/sql/multi_range_read.cc
@@ -19,6 +19,7 @@
#include "sql_select.h"
#include "key.h"
#include "sql_statistics.h"
+#include "rowid_filter.h"
/****************************************************************************
* Default MRR implementation (MRR to non-MRR converter)
@@ -62,14 +63,22 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
{
KEY_MULTI_RANGE range;
range_seq_t seq_it;
- ha_rows rows, total_rows= 0;
+ ha_rows total_rows= 0;
uint n_ranges=0;
+ uint n_eq_ranges= 0;
+ ulonglong total_touched_blocks= 0;
+ ha_rows max_rows= stats.records;
THD *thd= table->in_use;
uint limit= thd->variables.eq_range_index_dive_limit;
-
bool use_statistics_for_eq_range= eq_ranges_exceeds_limit(seq,
seq_init_param,
limit);
+ uint len= table->key_info[keyno].key_length + table->file->ref_length;
+ if (keyno == table->s->primary_key && table->file->primary_key_is_clustered())
+ len= table->s->stored_rec_length;
+ /* Assume block is 75 % full */
+ uint avg_block_records= ((uint) (table->file->stats.block_size*3/4))/len + 1;
+ DBUG_ENTER("multi_range_read_info_const");
/* Default MRR implementation doesn't need buffer */
*bufsz= 0;
@@ -77,10 +86,14 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
seq_it= seq->init(seq_init_param, n_ranges, *flags);
while (!seq->next(seq_it, &range))
{
+ ha_rows rows;
+
if (unlikely(thd->killed != 0))
- return HA_POS_ERROR;
+ DBUG_RETURN(HA_POS_ERROR);
n_ranges++;
+ if (range.range_flag & EQ_RANGE)
+ n_eq_ranges++;
key_range *min_endp, *max_endp;
if (range.range_flag & GEOM_FLAG)
{
@@ -95,17 +108,22 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
max_endp= range.end_key.length? &range.end_key : NULL;
}
int keyparts_used= my_count_bits(range.start_key.keypart_map);
- if ((range.range_flag & UNIQUE_RANGE) && !(range.range_flag & NULL_RANGE))
- rows= 1; /* there can be at most one row */
- else if (use_statistics_for_eq_range &&
- !(range.range_flag & NULL_RANGE) &&
- (range.range_flag & EQ_RANGE) &&
- table->key_info[keyno].actual_rec_per_key(keyparts_used - 1) > 0.5)
- rows=
- (ha_rows) table->key_info[keyno].actual_rec_per_key(keyparts_used - 1);
+ if (use_statistics_for_eq_range &&
+ !(range.range_flag & NULL_RANGE) &&
+ (range.range_flag & EQ_RANGE) &&
+ table->key_info[keyno].actual_rec_per_key(keyparts_used - 1) > 0.5)
+ {
+ if ((range.range_flag & UNIQUE_RANGE) && !(range.range_flag & NULL_RANGE))
+ rows= 1; /* there can be at most one row */
+ else
+ rows=
+ (ha_rows) table->key_info[keyno].actual_rec_per_key(keyparts_used-1);
+ }
else
{
- if (HA_POS_ERROR == (rows= this->records_in_range(keyno, min_endp,
+ if ((range.range_flag & UNIQUE_RANGE) && !(range.range_flag & NULL_RANGE))
+ rows= 1; /* there can be at most one row */
+ else if (HA_POS_ERROR == (rows= this->records_in_range(keyno, min_endp,
max_endp)))
{
/* Can't scan one range => can't do MRR scan at all */
@@ -114,21 +132,45 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
}
}
total_rows += rows;
+ total_touched_blocks+= (rows / avg_block_records +1);
}
if (total_rows != HA_POS_ERROR)
{
+ set_if_smaller(total_rows, max_rows);
/* The following calculation is the same as in multi_range_read_info(): */
*flags |= HA_MRR_USE_DEFAULT_IMPL;
cost->reset();
cost->avg_io_cost= 1; /* assume random seeks */
- if ((*flags & HA_MRR_INDEX_ONLY) && total_rows > 2)
- cost->io_count= keyread_time(keyno, n_ranges, (uint)total_rows);
+ cost->idx_avg_io_cost= 1;
+ if (!((keyno == table->s->primary_key && primary_key_is_clustered()) ||
+ is_clustering_key(keyno)))
+ {
+ cost->idx_io_count= total_touched_blocks +
+ keyread_time(keyno, 0, total_rows);
+ cost->cpu_cost= cost->idx_cpu_cost=
+ (double) total_rows / TIME_FOR_COMPARE_IDX +
+ (2 * n_ranges - n_eq_ranges) * IDX_LOOKUP_COST;
+ if (!(*flags & HA_MRR_INDEX_ONLY))
+ {
+ cost->io_count= read_time(keyno, 0, total_rows);
+ cost->cpu_cost+= (double) total_rows / TIME_FOR_COMPARE;
+ }
+ }
else
- cost->io_count= read_time(keyno, n_ranges, total_rows);
- cost->cpu_cost= (double) total_rows / TIME_FOR_COMPARE + 0.01;
+ {
+ cost->io_count= read_time(keyno, n_ranges, (uint) total_rows);
+ cost->cpu_cost= (double) total_rows / TIME_FOR_COMPARE + 0.01;
+ }
}
- return total_rows;
+ DBUG_PRINT("statistics",
+ ("key: %s rows: %llu total_cost: %.3f io_blocks: %llu "
+ "idx_io_count: %.3f cpu_cost: %.3f io_count: %.3f",
+ table->s->keynames.type_names[keyno],
+ (ulonglong) total_rows, cost->total_cost(),
+ (ulonglong) total_touched_blocks,
+ cost->idx_io_count, cost->cpu_cost, cost->io_count));
+ DBUG_RETURN(total_rows);
}
@@ -183,10 +225,22 @@ ha_rows handler::multi_range_read_info(uint keyno, uint n_ranges, uint n_rows,
cost->avg_io_cost= 1; /* assume random seeks */
/* Produce the same cost as non-MRR code does */
- if (*flags & HA_MRR_INDEX_ONLY)
- cost->io_count= keyread_time(keyno, n_ranges, n_rows);
+ if (!(keyno == table->s->primary_key && primary_key_is_clustered()))
+ {
+ cost->idx_io_count= n_ranges + keyread_time(keyno, 0, n_rows);
+ cost->cpu_cost= cost->idx_cpu_cost=
+ (double) n_rows / TIME_FOR_COMPARE_IDX + n_ranges * IDX_LOOKUP_COST;
+ if (!(*flags & HA_MRR_INDEX_ONLY))
+ {
+ cost->io_count= read_time(keyno, 0, n_rows);
+ cost->cpu_cost+= (double) n_rows / TIME_FOR_COMPARE;
+ }
+ }
else
- cost->io_count= read_time(keyno, n_ranges, n_rows);
+ {
+ cost->io_count= read_time(keyno, n_ranges, (uint)n_rows);
+ cost->cpu_cost= (double) n_rows / TIME_FOR_COMPARE + 0.01;
+ }
return 0;
}
@@ -587,7 +641,8 @@ static int rowid_cmp_reverse(void *file, uchar *a, uchar *b)
int Mrr_ordered_rndpos_reader::init(handler *h_arg,
Mrr_index_reader *index_reader_arg,
uint mode,
- Lifo_buffer *buf)
+ Lifo_buffer *buf,
+ Rowid_filter *filter)
{
file= h_arg;
index_reader= index_reader_arg;
@@ -595,6 +650,8 @@ int Mrr_ordered_rndpos_reader::init(handler *h_arg,
is_mrr_assoc= !MY_TEST(mode & HA_MRR_NO_ASSOCIATION);
index_reader_exhausted= FALSE;
index_reader_needs_refill= TRUE;
+ rowid_filter= filter;
+
return 0;
}
@@ -687,6 +744,13 @@ int Mrr_ordered_rndpos_reader::refill_from_index_reader()
index_reader->position();
+ /*
+ If the built rowid filter cannot be used at the engine level, use it here.
+ */
+ if (rowid_filter && !file->pushed_rowid_filter &&
+ !rowid_filter->check((char *)index_rowid))
+ continue;
+
/* Put rowid, or {rowid, range_id} pair into the buffer */
rowid_buffer->write_ptr1= index_rowid;
rowid_buffer->write_ptr2= (uchar*)&range_info;
@@ -822,7 +886,8 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
void *seq_init_param, uint n_ranges, uint mode,
HANDLER_BUFFER *buf)
{
- THD *thd= h_arg->get_table()->in_use;
+ TABLE *table= h_arg->get_table();
+ THD *thd= table->in_use;
int res;
Key_parameters keypar;
uint UNINIT_VAR(key_buff_elem_size); /* set/used when do_sort_keys==TRUE */
@@ -877,6 +942,21 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
if (!(keyno == table->s->primary_key && h_idx->primary_key_is_clustered()))
{
strategy= disk_strategy= &reader_factory.ordered_rndpos_reader;
+ if (h_arg->pushed_rowid_filter)
+ {
+ /*
+ Currently usage of a rowid filter within InnoDB engine is not supported
+ if the table is accessed by the primary key.
+ With optimizer switches ''mrr' and 'mrr_sort_keys' are both enabled
+ any access by a secondary index is converted to the rndpos access. In
+ InnoDB the rndpos access is always uses the primary key.
+ Do not use pushed rowid filter if the table is accessed actually by the
+ primary key. Use the rowid filter outside the engine code (see
+ Mrr_ordered_rndpos_reader::refill_from_index_reader).
+ */
+ rowid_filter= h_arg->pushed_rowid_filter;
+ h_arg->cancel_pushed_rowid_filter();
+ }
}
full_buf= buf->buffer;
@@ -956,14 +1036,18 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
goto use_default_impl;
}
+ // setup_two_handlers() will call dsmrr_close() will clears the filter.
+ // Save its value and restore afterwards.
+ Rowid_filter *tmp = rowid_filter;
if ((res= setup_two_handlers()))
goto error;
+ rowid_filter= tmp;
if ((res= index_strategy->init(secondary_file, seq_funcs, seq_init_param,
n_ranges, mode, &keypar, key_buffer,
&buf_manager)) ||
(res= disk_strategy->init(primary_file, index_strategy, mode,
- &rowid_buffer)))
+ &rowid_buffer, rowid_filter)))
{
goto error;
}
@@ -1145,6 +1229,7 @@ void DsMrr_impl::close_second_handler()
void DsMrr_impl::dsmrr_close()
{
DBUG_ENTER("DsMrr_impl::dsmrr_close");
+ rowid_filter= NULL;
close_second_handler();
strategy= NULL;
DBUG_VOID_RETURN;
diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h
index 0473fef04ae..37a00e3086f 100644
--- a/sql/multi_range_read.h
+++ b/sql/multi_range_read.h
@@ -364,7 +364,7 @@ class Mrr_ordered_rndpos_reader : public Mrr_reader
{
public:
int init(handler *file, Mrr_index_reader *index_reader, uint mode,
- Lifo_buffer *buf);
+ Lifo_buffer *buf, Rowid_filter *filter);
int get_next(range_id_t *range_info);
int refill_buffer(bool initial);
private:
@@ -399,6 +399,9 @@ private:
/* Buffer to store (rowid, range_id) pairs */
Lifo_buffer *rowid_buffer;
+ /* Rowid filter to be checked against (if any) */
+ Rowid_filter *rowid_filter;
+
int refill_from_index_reader();
};
@@ -554,7 +557,8 @@ public:
typedef void (handler::*range_check_toggle_func_t)(bool on);
DsMrr_impl()
- : secondary_file(NULL) {};
+ : secondary_file(NULL),
+ rowid_filter(NULL) {};
void init(handler *h_arg, TABLE *table_arg)
{
@@ -591,7 +595,13 @@ private:
to run both index scan and rnd_pos() scan at the same time)
*/
handler *secondary_file;
-
+
+ /*
+ The rowid filter that DS-MRR has "unpushed" from the storage engine.
+ If it's present, DS-MRR will use it.
+ */
+ Rowid_filter *rowid_filter;
+
uint keyno; /* index we're running the scan on */
/* TRUE <=> need range association, buffers hold {rowid, range_id} pairs */
bool is_mrr_assoc;
diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc
index 8acb46b9ef2..edf3e82de40 100644
--- a/sql/my_decimal.cc
+++ b/sql/my_decimal.cc
@@ -20,6 +20,7 @@
#ifndef MYSQL_CLIENT
#include "sql_class.h" // THD
+#include "field.h"
#endif
#define DIG_BASE 1000000000
@@ -95,9 +96,8 @@ int decimal_operation_results(int result, const char *value, const char *type)
@retval E_DEC_OOM
*/
-int my_decimal2string(uint mask, const my_decimal *d,
- uint fixed_prec, uint fixed_dec,
- char filler, String *str)
+int my_decimal::to_string_native(String *str, uint fixed_prec, uint fixed_dec,
+ char filler, uint mask) const
{
/*
Calculate the size of the string: For DECIMAL(a,b), fixed_prec==a
@@ -113,11 +113,11 @@ int my_decimal2string(uint mask, const my_decimal *d,
*/
int length= (fixed_prec
? (fixed_prec + ((fixed_prec == fixed_dec) ? 1 : 0) + 1)
- : my_decimal_string_length(d));
+ : my_decimal_string_length(this));
int result;
if (str->alloc(length))
return check_result(mask, E_DEC_OOM);
- result= decimal2string((decimal_t*) d, (char*) str->ptr(),
+ result= decimal2string(this, (char*) str->ptr(),
&length, (int)fixed_prec, fixed_dec,
filler);
str->length(length);
@@ -156,8 +156,8 @@ str_set_decimal(uint mask, const my_decimal *val,
{
if (!(cs->state & MY_CS_NONASCII))
{
- /* For ASCII-compatible character sets we can use my_decimal2string */
- my_decimal2string(mask, val, fixed_prec, fixed_dec, filler, str);
+ // For ASCII-compatible character sets we can use to_string_native()
+ val->to_string_native(str, fixed_prec, fixed_dec, filler, mask);
str->set_charset(cs);
return FALSE;
}
@@ -165,14 +165,13 @@ str_set_decimal(uint mask, const my_decimal *val,
{
/*
For ASCII-incompatible character sets (like UCS2) we
- call my_decimal2string() on a temporary buffer first,
+ call my_string_native() on a temporary buffer first,
and then convert the result to the target character
with help of str->copy().
*/
uint errors;
- char buf[DECIMAL_MAX_STR_LENGTH];
- String tmp(buf, sizeof(buf), &my_charset_latin1);
- my_decimal2string(mask, val, fixed_prec, fixed_dec, filler, &tmp);
+ StringBuffer<DECIMAL_MAX_STR_LENGTH> tmp;
+ val->to_string_native(&tmp, fixed_prec, fixed_dec, filler, mask);
return str->copy(tmp.ptr(), tmp.length(), &my_charset_latin1, cs, &errors);
}
}
@@ -182,7 +181,7 @@ str_set_decimal(uint mask, const my_decimal *val,
Convert from decimal to binary representation
SYNOPSIS
- my_decimal2binary()
+ to_binary()
mask error processing mask
d number for conversion
bin pointer to buffer where to write result
@@ -199,12 +198,11 @@ str_set_decimal(uint mask, const my_decimal *val,
E_DEC_OVERFLOW
*/
-int my_decimal2binary(uint mask, const my_decimal *d, uchar *bin, int prec,
- int scale)
+int my_decimal::to_binary(uchar *bin, int prec, int scale, uint mask) const
{
int err1= E_DEC_OK, err2;
my_decimal rounded;
- my_decimal2decimal(d, &rounded);
+ my_decimal2decimal(this, &rounded);
rounded.frac= decimal_actual_fraction(&rounded);
if (scale < rounded.frac)
{
@@ -270,7 +268,8 @@ int str2my_decimal(uint mask, const char *from, size_t length,
integer part cannot be larger that 1e18 (otherwise it's an overflow).
fractional part is microseconds.
*/
-bool my_decimal2seconds(const my_decimal *d, ulonglong *sec, ulong *microsec)
+bool my_decimal2seconds(const my_decimal *d, ulonglong *sec,
+ ulong *microsec, ulong *nanosec)
{
int pos;
@@ -288,6 +287,7 @@ bool my_decimal2seconds(const my_decimal *d, ulonglong *sec, ulong *microsec)
}
*microsec= d->frac ? static_cast<longlong>(d->buf[pos+1]) / (DIG_BASE/1000000) : 0;
+ *nanosec= d->frac ? static_cast<longlong>(d->buf[pos+1]) % (DIG_BASE/1000000) : 0;
if (pos > 1)
{
@@ -368,6 +368,26 @@ int my_decimal2int(uint mask, const decimal_t *d, bool unsigned_flag,
}
+longlong my_decimal::to_longlong(bool unsigned_flag) const
+{
+ longlong result;
+ my_decimal2int(E_DEC_FATAL_ERROR, this, unsigned_flag, &result);
+ return result;
+}
+
+
+my_decimal::my_decimal(Field *field)
+{
+ init();
+ DBUG_ASSERT(!field->is_null());
+#ifdef DBUG_ASSERT_EXISTS
+ my_decimal *dec=
+#endif
+ field->val_decimal(this);
+ DBUG_ASSERT(dec == this);
+}
+
+
#ifndef DBUG_OFF
/* routines for debugging print */
diff --git a/sql/my_decimal.h b/sql/my_decimal.h
index c6c6f4b55e3..9b1aebb98b5 100644
--- a/sql/my_decimal.h
+++ b/sql/my_decimal.h
@@ -29,6 +29,8 @@
#ifndef my_decimal_h
#define my_decimal_h
+#include "sql_basic_types.h"
+
#if defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
#include "sql_string.h" /* String */
#endif
@@ -39,6 +41,7 @@ C_MODE_START
C_MODE_END
class String;
+class Field;
typedef struct st_mysql_time MYSQL_TIME;
/**
@@ -63,6 +66,25 @@ inline int my_decimal_int_part(uint precision, uint decimals)
}
+#ifndef MYSQL_CLIENT
+int decimal_operation_results(int result, const char *value, const char *type);
+#else
+inline int decimal_operation_results(int result, const char *value,
+ const char *type)
+{
+ return result;
+}
+#endif /*MYSQL_CLIENT*/
+
+
+inline int check_result(uint mask, int result)
+{
+ if (result & mask)
+ decimal_operation_results(result, "", "DECIMAL");
+ return result;
+}
+
+
/**
my_decimal class limits 'decimal_t' type to what we need in MySQL.
@@ -125,6 +147,12 @@ public:
{
init();
}
+ my_decimal(const uchar *bin, int prec, int scale)
+ {
+ init();
+ check_result(E_DEC_FATAL_ERROR, bin2decimal(bin, this, prec, scale));
+ }
+ my_decimal(Field *field);
~my_decimal()
{
sanity_check();
@@ -141,7 +169,57 @@ public:
bool sign() const { return decimal_t::sign; }
void sign(bool s) { decimal_t::sign= s; }
uint precision() const { return intg + frac; }
+ void set_zero()
+ {
+ /*
+ We need the up-cast here, since my_decimal has sign() member functions,
+ which conflicts with decimal_t::sign
+ (and decimal_make_zero is a macro, rather than a funcion).
+ */
+ decimal_make_zero(static_cast<decimal_t*>(this));
+ }
+ int cmp(const my_decimal *other) const
+ {
+ return decimal_cmp(this, other);
+ }
+#ifndef MYSQL_CLIENT
+ bool to_bool() const
+ {
+ return !decimal_is_zero(this);
+ }
+ double to_double() const
+ {
+ double res;
+ decimal2double(this, &res);
+ return res;
+ }
+ longlong to_longlong(bool unsigned_flag) const;
+ // Convert to string returning decimal2string() error code
+ int to_string_native(String *to, uint prec, uint dec, char filler,
+ uint mask= E_DEC_FATAL_ERROR) const;
+ // Convert to string returning the String pointer
+ String *to_string(String *to, uint prec, uint dec, char filler) const
+ {
+ return to_string_native(to, prec, dec, filler) ? NULL : to;
+ }
+ String *to_string(String *to) const
+ {
+ return to_string(to, 0, 0, 0);
+ }
+ String *to_string_round(String *to, int scale, my_decimal *round_buff) const
+ {
+ (void) round_to(round_buff, scale, HALF_UP); // QQ: check result?
+ return round_buff->to_string(to);
+ }
+ int round_to(my_decimal *to, int scale, decimal_round_mode mode,
+ int mask= E_DEC_FATAL_ERROR) const
+ {
+ return check_result(mask, decimal_round(this, to, scale, mode));
+ }
+ int to_binary(uchar *bin, int prec, int scale,
+ uint mask= E_DEC_FATAL_ERROR) const;
+#endif
/** Swap two my_decimal values */
void swap(my_decimal &rhs)
{
@@ -164,16 +242,6 @@ bool str_set_decimal(uint mask, const my_decimal *val, uint fixed_prec,
extern my_decimal decimal_zero;
-#ifndef MYSQL_CLIENT
-int decimal_operation_results(int result, const char *value, const char *type);
-#else
-inline int decimal_operation_results(int result, const char *value,
- const char *type)
-{
- return result;
-}
-#endif /*MYSQL_CLIENT*/
-
inline
void max_my_decimal(my_decimal *to, int precision, int frac)
{
@@ -187,13 +255,6 @@ inline void max_internal_decimal(my_decimal *to)
max_my_decimal(to, DECIMAL_MAX_PRECISION, 0);
}
-inline int check_result(uint mask, int result)
-{
- if (result & mask)
- decimal_operation_results(result, "", "DECIMAL");
- return result;
-}
-
inline int check_result_and_overflow(uint mask, int result, my_decimal *val)
{
if (check_result(mask, result) & E_DEC_OVERFLOW)
@@ -271,10 +332,6 @@ void my_decimal2decimal(const my_decimal *from, my_decimal *to)
}
-int my_decimal2binary(uint mask, const my_decimal *d, uchar *bin, int prec,
- int scale);
-
-
inline
int binary2my_decimal(uint mask, const uchar *bin, my_decimal *d, int prec,
int scale)
@@ -286,12 +343,7 @@ int binary2my_decimal(uint mask, const uchar *bin, my_decimal *d, int prec,
inline
int my_decimal_set_zero(my_decimal *d)
{
- /*
- We need the up-cast here, since my_decimal has sign() member functions,
- which conflicts with decimal_t::sign
- (and decimal_make_zero is a macro, rather than a funcion).
- */
- decimal_make_zero(static_cast<decimal_t*>(d));
+ d->set_zero();
return 0;
}
@@ -303,53 +355,15 @@ bool my_decimal_is_zero(const my_decimal *decimal_value)
}
-inline
-int my_decimal_round_if_needed(uint mask, my_decimal *dec, int scale,
- bool truncate)
-{
- if (scale >= dec->frac)
- return E_DEC_OK;
- return check_result(mask, decimal_round(dec, dec, scale,
- (truncate ? TRUNCATE : HALF_UP)));
-}
-
-
-inline
-int my_decimal_round(uint mask, const my_decimal *from, int scale,
- bool truncate, my_decimal *to)
-{
- return check_result(mask, decimal_round(from, to, scale,
- (truncate ? TRUNCATE : HALF_UP)));
-}
-
-
-inline
-int my_decimal_floor(uint mask, const my_decimal *from, my_decimal *to)
-{
- return check_result(mask, decimal_round(from, to, 0, FLOOR));
-}
-
-
-inline
-int my_decimal_ceiling(uint mask, const my_decimal *from, my_decimal *to)
-{
- return check_result(mask, decimal_round(from, to, 0, CEILING));
-}
-
-
inline bool str_set_decimal(const my_decimal *val, String *str,
CHARSET_INFO *cs)
{
return str_set_decimal(E_DEC_FATAL_ERROR, val, 0, 0, 0, str, cs);
}
-#ifndef MYSQL_CLIENT
-class String;
-int my_decimal2string(uint mask, const my_decimal *d, uint fixed_prec,
- uint fixed_dec, char filler, String *str);
-#endif
-bool my_decimal2seconds(const my_decimal *d, ulonglong *sec, ulong *microsec);
+bool my_decimal2seconds(const my_decimal *d, ulonglong *sec,
+ ulong *microsec, ulong *nanosec);
my_decimal *seconds2my_decimal(bool sign, ulonglong sec, ulong microsec,
my_decimal *d);
diff --git a/sql/my_json_writer.cc b/sql/my_json_writer.cc
index 656023d4033..8e35b25b822 100644
--- a/sql/my_json_writer.cc
+++ b/sql/my_json_writer.cc
@@ -16,9 +16,16 @@
#include "mariadb.h"
#include "sql_priv.h"
#include "sql_string.h"
-
#include "my_json_writer.h"
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+bool Json_writer::named_item_expected() const
+{
+ return named_items_expectation.size()
+ && named_items_expectation.back();
+}
+#endif
+
void Json_writer::append_indent()
{
if (!document_start)
@@ -27,9 +34,21 @@ void Json_writer::append_indent()
output.append(' ');
}
-void Json_writer::start_object()
+inline void Json_writer::on_start_object()
{
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ if(!fmt_helper.is_making_writer_calls())
+ {
+ VALIDITY_ASSERT(got_name == named_item_expected());
+ named_items_expectation.push_back(true);
+ }
+#endif
fmt_helper.on_start_object();
+}
+
+void Json_writer::start_object()
+{
+ on_start_object();
if (!element_started)
start_element();
@@ -39,10 +58,22 @@ void Json_writer::start_object()
first_child=true;
element_started= false;
document_start= false;
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ got_name= false;
+#endif
}
void Json_writer::start_array()
{
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ if(!fmt_helper.is_making_writer_calls())
+ {
+ VALIDITY_ASSERT(got_name == named_item_expected());
+ named_items_expectation.push_back(false);
+ got_name= false;
+ }
+#endif
+
if (fmt_helper.on_start_array())
return;
@@ -59,15 +90,27 @@ void Json_writer::start_array()
void Json_writer::end_object()
{
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ VALIDITY_ASSERT(named_item_expected());
+ named_items_expectation.pop_back();
+ VALIDITY_ASSERT(!got_name);
+ got_name= false;
+#endif
indent_level-=INDENT_SIZE;
if (!first_child)
append_indent();
+ first_child= false;
output.append("}");
}
void Json_writer::end_array()
{
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ VALIDITY_ASSERT(!named_item_expected());
+ named_items_expectation.pop_back();
+ got_name= false;
+#endif
if (fmt_helper.on_end_array())
return;
indent_level-=INDENT_SIZE;
@@ -79,16 +122,26 @@ void Json_writer::end_array()
Json_writer& Json_writer::add_member(const char *name)
{
- if (fmt_helper.on_add_member(name))
- return *this; // handled
+ size_t len= strlen(name);
+ return add_member(name, len);
+}
- // assert that we are in an object
- DBUG_ASSERT(!element_started);
- start_element();
+Json_writer& Json_writer::add_member(const char *name, size_t len)
+{
+ if (!fmt_helper.on_add_member(name, len))
+ {
+ // assert that we are in an object
+ DBUG_ASSERT(!element_started);
+ start_element();
- output.append('"');
- output.append(name);
- output.append("\": ");
+ output.append('"');
+ output.append(name, len);
+ output.append("\": ", 3);
+ }
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ if (!fmt_helper.is_making_writer_calls())
+ got_name= true;
+#endif
return *this;
}
@@ -141,28 +194,31 @@ void Json_writer::add_ull(ulonglong val)
void Json_writer::add_size(longlong val)
{
char buf[64];
+ size_t len;
if (val < 1024)
- my_snprintf(buf, sizeof(buf), "%lld", val);
+ len= my_snprintf(buf, sizeof(buf), "%lld", val);
else if (val < 1024*1024*16)
{
/* Values less than 16MB are specified in KB for precision */
- size_t len= my_snprintf(buf, sizeof(buf), "%lld", val/1024);
+ len= my_snprintf(buf, sizeof(buf), "%lld", val/1024);
strcpy(buf + len, "Kb");
+ len+= 2;
}
else
{
- size_t len= my_snprintf(buf, sizeof(buf), "%lld", val/(1024*1024));
+ len= my_snprintf(buf, sizeof(buf), "%lld", val/(1024*1024));
strcpy(buf + len, "Mb");
+ len+= 2;
}
- add_str(buf);
+ add_str(buf, len);
}
void Json_writer::add_double(double val)
{
char buf[64];
- my_snprintf(buf, sizeof(buf), "%lg", val);
- add_unquoted_str(buf);
+ size_t len= my_snprintf(buf, sizeof(buf), "%lg", val);
+ add_unquoted_str(buf, len);
}
@@ -174,45 +230,82 @@ void Json_writer::add_bool(bool val)
void Json_writer::add_null()
{
- add_unquoted_str("null");
+ add_unquoted_str("null", (size_t) 4);
}
void Json_writer::add_unquoted_str(const char* str)
{
- if (fmt_helper.on_add_str(str))
+ size_t len= strlen(str);
+ add_unquoted_str(str, len);
+}
+
+void Json_writer::add_unquoted_str(const char* str, size_t len)
+{
+ VALIDITY_ASSERT(fmt_helper.is_making_writer_calls() ||
+ got_name == named_item_expected());
+ if (on_add_str(str, len))
return;
if (!element_started)
start_element();
- output.append(str);
+ output.append(str, len);
element_started= false;
}
+inline bool Json_writer::on_add_str(const char *str, size_t num_bytes)
+{
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ got_name= false;
+#endif
+ bool helped= fmt_helper.on_add_str(str, num_bytes);
+ return helped;
+}
void Json_writer::add_str(const char *str)
{
- if (fmt_helper.on_add_str(str))
+ size_t len= strlen(str);
+ add_str(str, len);
+}
+
+/*
+ This function is used to add only num_bytes of str to the output string
+*/
+
+void Json_writer::add_str(const char* str, size_t num_bytes)
+{
+ VALIDITY_ASSERT(fmt_helper.is_making_writer_calls() ||
+ got_name == named_item_expected());
+ if (on_add_str(str, num_bytes))
return;
if (!element_started)
start_element();
output.append('"');
- output.append(str);
+ output.append(str, num_bytes);
output.append('"');
element_started= false;
}
-
void Json_writer::add_str(const String &str)
{
- add_str(str.ptr());
+ add_str(str.ptr(), str.length());
}
+Json_writer_temp_disable::Json_writer_temp_disable(THD *thd_arg)
+{
+ thd= thd_arg;
+ thd->opt_trace.disable_tracing_if_required();
+}
+Json_writer_temp_disable::~Json_writer_temp_disable()
+{
+ thd->opt_trace.enable_tracing_if_required();
+}
-bool Single_line_formatting_helper::on_add_member(const char *name)
+bool Single_line_formatting_helper::on_add_member(const char *name,
+ size_t len)
{
DBUG_ASSERT(state== INACTIVE || state == DISABLED);
if (state != DISABLED)
@@ -221,7 +314,6 @@ bool Single_line_formatting_helper::on_add_member(const char *name)
buf_ptr= buffer;
//append member name to the array
- size_t len= strlen(name);
if (len < MAX_LINE_LEN)
{
memcpy(buf_ptr, name, len);
@@ -274,12 +366,11 @@ void Single_line_formatting_helper::on_start_object()
}
-bool Single_line_formatting_helper::on_add_str(const char *str)
+bool Single_line_formatting_helper::on_add_str(const char *str,
+ size_t len)
{
if (state == IN_ARRAY)
{
- size_t len= strlen(str);
-
// New length will be:
// "$string",
// quote + quote + comma + space = 4
@@ -355,9 +446,11 @@ void Single_line_formatting_helper::disable_and_flush()
while (ptr < buf_ptr)
{
char *str= ptr;
+ size_t len= strlen(str);
+
if (nr == 0)
{
- owner->add_member(str);
+ owner->add_member(str, len);
if (start_array)
owner->start_array();
}
@@ -365,13 +458,11 @@ void Single_line_formatting_helper::disable_and_flush()
{
//if (nr == 1)
// owner->start_array();
- owner->add_str(str);
+ owner->add_str(str, len);
}
nr++;
- while (*ptr!=0)
- ptr++;
- ptr++;
+ ptr+= len+1;
}
buf_ptr= buffer;
state= INACTIVE;
diff --git a/sql/my_json_writer.h b/sql/my_json_writer.h
index 4c7ca46ef7c..4b69ba70675 100644
--- a/sql/my_json_writer.h
+++ b/sql/my_json_writer.h
@@ -13,7 +13,33 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+#ifndef JSON_WRITER_INCLUDED
+#define JSON_WRITER_INCLUDED
+#include "my_base.h"
+
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+#include <set>
+#include <stack>
+#include <string>
+#include <vector>
+#endif
+
+#ifdef JSON_WRITER_UNIT_TEST
+#include "sql_string.h"
+// Also, mock objects are defined in my_json_writer-t.cc
+#define VALIDITY_ASSERT(x) if (!(x)) this->invalid_json= true;
+#else
+#include "sql_select.h"
+#define VALIDITY_ASSERT(x) DBUG_ASSERT(x)
+#endif
+
+#include <type_traits>
+
+class Opt_trace_stmt;
+class Opt_trace_context;
class Json_writer;
+struct TABLE_LIST;
+
/*
Single_line_formatting_helper is used by Json_writer to do better formatting
@@ -78,34 +104,141 @@ public:
void init(Json_writer *owner_arg) { owner= owner_arg; }
- bool on_add_member(const char *name);
+ bool on_add_member(const char *name, size_t len);
bool on_start_array();
bool on_end_array();
void on_start_object();
// on_end_object() is not needed.
-
- bool on_add_str(const char *str);
+ bool on_add_str(const char *str, size_t num_bytes);
+
+ /*
+ Returns true if the helper is flushing its buffer and is probably
+ making calls back to its Json_writer. (The Json_writer uses this
+ function to avoid re-doing the processing that it has already done
+ before making a call to fmt_helper)
+ */
+ bool is_making_writer_calls() const { return state == DISABLED; }
+
+private:
void flush_on_one_line();
void disable_and_flush();
};
/*
+ Something that looks like class String, but has an internal limit of
+ how many bytes one can append to it.
+
+ Bytes that were truncated due to the size limitation are counted.
+*/
+
+class String_with_limit
+{
+public:
+
+ String_with_limit() : size_limit(SIZE_T_MAX), truncated_len(0)
+ {
+ str.length(0);
+ }
+
+ size_t get_truncated_bytes() const { return truncated_len; }
+ size_t get_size_limit() { return size_limit; }
+
+ void set_size_limit(size_t limit_arg)
+ {
+ // Setting size limit to be shorter than length will not have the desired
+ // effect
+ DBUG_ASSERT(str.length() < size_limit);
+ size_limit= limit_arg;
+ }
+
+ void append(const char *s, size_t size)
+ {
+ if (str.length() + size <= size_limit)
+ {
+ // Whole string can be added, just do it
+ str.append(s, size);
+ }
+ else
+ {
+ // We cannot add the whole string
+ if (str.length() < size_limit)
+ {
+ // But we can still add something
+ size_t bytes_to_add = size_limit - str.length();
+ str.append(s, bytes_to_add);
+ truncated_len += size - bytes_to_add;
+ }
+ else
+ truncated_len += size;
+ }
+ }
+
+ void append(const char *s)
+ {
+ append(s, strlen(s));
+ }
+
+ void append(char c)
+ {
+ if (str.length() + 1 > size_limit)
+ truncated_len++;
+ else
+ str.append(c);
+ }
+
+ const String *get_string() { return &str; }
+ size_t length() { return str.length(); }
+private:
+ String str;
+
+ // str must not get longer than this many bytes.
+ size_t size_limit;
+
+ // How many bytes were truncated from the string
+ size_t truncated_len;
+};
+
+/*
A class to write well-formed JSON documents. The documents are also formatted
for human readability.
*/
class Json_writer
{
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ /*
+ In debug mode, Json_writer will fail and assertion if one attempts to
+ produce an invalid JSON document (e.g. JSON array having named elements).
+ */
+ std::vector<bool> named_items_expectation;
+
+ bool named_item_expected() const;
+
+ bool got_name;
+
+#ifdef JSON_WRITER_UNIT_TEST
+public:
+ // When compiled for unit test, creating invalid JSON will set this to true
+ // instead of an assertion.
+ bool invalid_json= false;
+#endif
+#endif
+
public:
/* Add a member. We must be in an object. */
Json_writer& add_member(const char *name);
+ Json_writer& add_member(const char *name, size_t len);
/* Add atomic values */
void add_str(const char* val);
+ void add_str(const char* val, size_t num_bytes);
void add_str(const String &str);
+ void add_str(Item *item);
+ void add_table_name(const JOIN_TAB *tab);
+ void add_table_name(const TABLE* table);
void add_ll(longlong val);
void add_ull(ulonglong val);
@@ -116,6 +249,11 @@ public:
private:
void add_unquoted_str(const char* val);
+ void add_unquoted_str(const char* val, size_t len);
+
+ bool on_add_str(const char *str, size_t num_bytes);
+ void on_start_object();
+
public:
/* Start a child object */
void start_object();
@@ -124,7 +262,18 @@ public:
void end_object();
void end_array();
+ /*
+ One can set a limit of how large a JSON document should be.
+ Writes beyond that size will be counted, but will not be collected.
+ */
+ void set_size_limit(size_t mem_size) { output.set_size_limit(mem_size); }
+
+ size_t get_truncated_bytes() { return output.get_truncated_bytes(); }
+
Json_writer() :
+#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST)
+ got_name(false),
+#endif
indent_level(0), document_start(true), element_started(false),
first_child(true)
{
@@ -147,13 +296,429 @@ private:
void start_element();
void start_sub_element();
- //const char *new_member_name;
public:
- String output;
+ String_with_limit output;
+};
+
+/* A class to add values to Json_writer_object and Json_writer_array */
+class Json_value_helper
+{
+ Json_writer* writer;
+
+public:
+ void init(Json_writer *my_writer) { writer= my_writer; }
+ void add_str(const char* val)
+ {
+ writer->add_str(val);
+ }
+ void add_str(const char* val, size_t length)
+ {
+ writer->add_str(val, length);
+ }
+ void add_str(const String &str)
+ {
+ writer->add_str(str.ptr(), str.length());
+ }
+ void add_str(const LEX_CSTRING &str)
+ {
+ writer->add_str(str.str, str.length);
+ }
+ void add_str(Item *item)
+ {
+ writer->add_str(item);
+ }
+
+ void add_ll(longlong val)
+ {
+ writer->add_ll(val);
+ }
+ void add_size(longlong val)
+ {
+ writer->add_size(val);
+ }
+ void add_double(double val)
+ {
+ writer->add_double(val);
+ }
+ void add_bool(bool val)
+ {
+ writer->add_bool(val);
+ }
+ void add_null()
+ {
+ writer->add_null();
+ }
+ void add_table_name(const JOIN_TAB *tab)
+ {
+ writer->add_table_name(tab);
+ }
+ void add_table_name(const TABLE* table)
+ {
+ writer->add_table_name(table);
+ }
+};
+
+/* A common base for Json_writer_object and Json_writer_array */
+class Json_writer_struct
+{
+ Json_writer_struct(const Json_writer_struct&)= delete;
+ Json_writer_struct& operator=(const Json_writer_struct&)= delete;
+
+protected:
+ Json_writer* my_writer;
+ Json_value_helper context;
+ /*
+ Tells when a json_writer_struct has been closed or not
+ */
+ bool closed;
+
+ explicit Json_writer_struct(Json_writer *writer)
+ : my_writer(writer)
+ {
+ context.init(my_writer);
+ closed= false;
+ }
+ explicit Json_writer_struct(THD *thd)
+ : Json_writer_struct(thd->opt_trace.get_current_json())
+ {
+ }
+
+public:
+
+ virtual ~Json_writer_struct()
+ {
+ }
+
+ bool trace_started() const
+ {
+ return my_writer != 0;
+ }
};
/*
+ RAII-based class to start/end writing a JSON object into the JSON document
+
+ There is "ignore mode": one can initialize Json_writer_object with a NULL
+ Json_writer argument, and then all its calls will do nothing. This is used
+ by optimizer trace which can be enabled or disabled.
+*/
+
+class Json_writer_object : public Json_writer_struct
+{
+private:
+ void add_member(const char *name)
+ {
+ my_writer->add_member(name);
+ }
+public:
+ explicit Json_writer_object(Json_writer* writer, const char *str= nullptr)
+ : Json_writer_struct(writer)
+ {
+ if (unlikely(my_writer))
+ {
+ if (str)
+ my_writer->add_member(str);
+ my_writer->start_object();
+ }
+ }
+
+ explicit Json_writer_object(THD* thd, const char *str= nullptr)
+ : Json_writer_object(thd->opt_trace.get_current_json(), str)
+ {
+ }
+
+ ~Json_writer_object()
+ {
+ if (my_writer && !closed)
+ my_writer->end_object();
+ closed= TRUE;
+ }
+
+ Json_writer_object& add(const char *name, bool value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ context.add_bool(value);
+ }
+ return *this;
+ }
+
+ Json_writer_object& add(const char *name, ulonglong value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ my_writer->add_ull(value);
+ }
+ return *this;
+ }
+
+ template<class IntT,
+ typename= typename ::std::enable_if<std::is_integral<IntT>::value>::type
+ >
+ Json_writer_object& add(const char *name, IntT value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ context.add_ll(value);
+ }
+ return *this;
+ }
+
+ Json_writer_object& add(const char *name, double value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ context.add_double(value);
+ }
+ return *this;
+ }
+
+ Json_writer_object& add(const char *name, const char *value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ context.add_str(value);
+ }
+ return *this;
+ }
+ Json_writer_object& add(const char *name, const char *value, size_t num_bytes)
+ {
+ add_member(name);
+ context.add_str(value, num_bytes);
+ return *this;
+ }
+ Json_writer_object& add(const char *name, const LEX_CSTRING &value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ context.add_str(value.str, value.length);
+ }
+ return *this;
+ }
+ Json_writer_object& add(const char *name, Item *value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ context.add_str(value);
+ }
+ return *this;
+ }
+ Json_writer_object& add_null(const char*name)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member(name);
+ context.add_null();
+ }
+ return *this;
+ }
+ Json_writer_object& add_table_name(const JOIN_TAB *tab)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member("table");
+ context.add_table_name(tab);
+ }
+ return *this;
+ }
+ Json_writer_object& add_table_name(const TABLE *table)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member("table");
+ context.add_table_name(table);
+ }
+ return *this;
+ }
+ Json_writer_object& add_select_number(uint select_number)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ {
+ add_member("select_id");
+ if (unlikely(select_number >= INT_MAX))
+ context.add_str("fake");
+ else
+ context.add_ll(static_cast<longlong>(select_number));
+ }
+ return *this;
+ }
+ void end()
+ {
+ DBUG_ASSERT(!closed);
+ if (unlikely(my_writer))
+ my_writer->end_object();
+ closed= TRUE;
+ }
+};
+
+
+/*
+ RAII-based class to start/end writing a JSON array into the JSON document
+
+ There is "ignore mode": one can initialize Json_writer_array with a NULL
+ Json_writer argument, and then all its calls will do nothing. This is used
+ by optimizer trace which can be enabled or disabled.
+*/
+
+class Json_writer_array : public Json_writer_struct
+{
+public:
+ explicit Json_writer_array(Json_writer *writer, const char *str= nullptr)
+ : Json_writer_struct(writer)
+ {
+ if (unlikely(my_writer))
+ {
+ if (str)
+ my_writer->add_member(str);
+ my_writer->start_array();
+ }
+ }
+
+ explicit Json_writer_array(THD *thd, const char *str= nullptr)
+ : Json_writer_array(thd->opt_trace.get_current_json(), str)
+ {
+ }
+
+ ~Json_writer_array()
+ {
+ if (unlikely(my_writer && !closed))
+ {
+ my_writer->end_array();
+ closed= TRUE;
+ }
+ }
+
+ void end()
+ {
+ DBUG_ASSERT(!closed);
+ if (unlikely(my_writer))
+ my_writer->end_array();
+ closed= TRUE;
+ }
+
+ Json_writer_array& add(bool value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_bool(value);
+ return *this;
+ }
+ Json_writer_array& add(ulonglong value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_ll(static_cast<longlong>(value));
+ return *this;
+ }
+ Json_writer_array& add(longlong value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_ll(value);
+ return *this;
+ }
+ Json_writer_array& add(double value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_double(value);
+ return *this;
+ }
+ #ifndef _WIN64
+ Json_writer_array& add(size_t value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_ll(static_cast<longlong>(value));
+ return *this;
+ }
+ #endif
+ Json_writer_array& add(const char *value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_str(value);
+ return *this;
+ }
+ Json_writer_array& add(const char *value, size_t num_bytes)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_str(value, num_bytes);
+ return *this;
+ }
+ Json_writer_array& add(const LEX_CSTRING &value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_str(value.str, value.length);
+ return *this;
+ }
+ Json_writer_array& add(Item *value)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_str(value);
+ return *this;
+ }
+ Json_writer_array& add_null()
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_null();
+ return *this;
+ }
+ Json_writer_array& add_table_name(const JOIN_TAB *tab)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_table_name(tab);
+ return *this;
+ }
+ Json_writer_array& add_table_name(const TABLE *table)
+ {
+ DBUG_ASSERT(!closed);
+ if (my_writer)
+ context.add_table_name(table);
+ return *this;
+ }
+};
+
+/*
+ RAII-based class to disable writing into the JSON document
+ The tracing is disabled as soon as the object is created.
+ The destuctor is called as soon as we exit the scope of the object
+ and the tracing is enabled back.
+*/
+
+class Json_writer_temp_disable
+{
+public:
+ Json_writer_temp_disable(THD *thd_arg);
+ ~Json_writer_temp_disable();
+ THD *thd;
+};
+
+/*
RAII-based helper class to detect incorrect use of Json_writer.
The idea is that a function typically must leave Json_writer at the same
@@ -193,4 +758,4 @@ public:
#endif
};
-
+#endif
diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc
index 9639051e93c..47ce6171357 100644
--- a/sql/mysql_install_db.cc
+++ b/sql/mysql_install_db.cc
@@ -39,7 +39,8 @@ struct IUnknown;
extern "C" const char* mysql_bootstrap_sql[];
-char default_os_user[]= "NT AUTHORITY\\NetworkService";
+static char default_os_user[]= "NT AUTHORITY\\NetworkService";
+static char default_datadir[MAX_PATH];
static int create_db_instance();
static uint opt_silent;
static char datadir_buffer[FN_REFLEN];
@@ -169,8 +170,27 @@ int main(int argc, char **argv)
exit(error);
if (!opt_datadir)
{
- my_print_help(my_long_options);
- die("parameter --datadir=# is mandatory");
+ /*
+ Figure out default data directory. It "data" directory, next to "bin" directory, where
+ mysql_install_db.exe resides.
+ */
+ strcpy(default_datadir, self_name);
+ p = strrchr(default_datadir, FN_LIBCHAR);
+ if (p)
+ {
+ *p= 0;
+ p= strrchr(default_datadir, FN_LIBCHAR);
+ if (p)
+ *p= 0;
+ }
+ if (!p)
+ {
+ die("--datadir option not provided, and default datadir not found");
+ my_print_help(my_long_options);
+ }
+ strcat_s(default_datadir, "\\data");
+ opt_datadir= default_datadir;
+ printf("Default data directory is %s\n",opt_datadir);
}
/* Print some help on errors */
@@ -198,7 +218,7 @@ int main(int argc, char **argv)
die("database creation failed");
}
- printf("Creation of the database was successful");
+ printf("Creation of the database was successful\n");
return 0;
}
@@ -343,17 +363,20 @@ static int create_myini()
static const char update_root_passwd_part1[]=
- "UPDATE mysql.user SET Password = PASSWORD(";
+ "UPDATE mysql.global_priv SET priv=json_set(priv,"
+ "'$.password_last_changed', UNIX_TIMESTAMP(),"
+ "'$.plugin','mysql_native_password',"
+ "'$.authentication_string',PASSWORD(";
static const char update_root_passwd_part2[]=
- ") where User='root';\n";
-static const char remove_default_user_cmd[]=
+ ")) where User='root';\n";
+static const char remove_default_user_cmd[]=
"DELETE FROM mysql.user where User='';\n";
static const char allow_remote_root_access_cmd[]=
- "CREATE TEMPORARY TABLE tmp_user LIKE user;\n"
- "INSERT INTO tmp_user SELECT * from user where user='root' "
+ "CREATE TEMPORARY TABLE tmp_user LIKE global_priv;\n"
+ "INSERT INTO tmp_user SELECT * from global_priv where user='root' "
" AND host='localhost';\n"
"UPDATE tmp_user SET host='%';\n"
- "INSERT INTO user SELECT * FROM tmp_user;\n"
+ "INSERT INTO global_priv SELECT * FROM tmp_user;\n"
"DROP TABLE tmp_user;\n";
static const char end_of_script[]="-- end.";
diff --git a/sql/mysql_upgrade_service.cc b/sql/mysql_upgrade_service.cc
index 7eaff85a80e..4a6720e618d 100644
--- a/sql/mysql_upgrade_service.cc
+++ b/sql/mysql_upgrade_service.cc
@@ -480,7 +480,7 @@ int main(int argc, char **argv)
do_start_stop_server?",this can take some time":"(skipped)");
char socket_param[FN_REFLEN];
- sprintf_s(socket_param, "--socket=mysql_upgrade_service_%d",
+ sprintf_s(socket_param, "--socket=mysql_upgrade_service_%u",
GetCurrentProcessId());
DWORD start_duration_ms = 0;
@@ -497,7 +497,7 @@ int main(int argc, char **argv)
die("Cannot start mysqld.exe process, last error =%u", GetLastError());
}
char pipe_name[64];
- snprintf(pipe_name, sizeof(pipe_name), "\\\\.\\pipe\\mysql_upgrade_service_%u",
+ snprintf(pipe_name, sizeof(pipe_name), "\\\\.\\pipe\\mysql_upgrade_service_%lu",
GetCurrentProcessId());
for (;;)
{
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6e68876537f..4d22dde9f62 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2008, 2020, MariaDB
+ Copyright (c) 2008, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -54,6 +54,7 @@
#include <m_ctype.h>
#include <my_dir.h>
#include <my_bit.h>
+#include "my_cpu.h"
#include "slave.h"
#include "rpl_mi.h"
#include "sql_repl.h"
@@ -72,8 +73,11 @@
#include "debug_sync.h"
#include "wsrep_mysqld.h"
#include "wsrep_var.h"
+#ifdef WITH_WSREP
#include "wsrep_thd.h"
#include "wsrep_sst.h"
+#include "wsrep_server_state.h"
+#endif /* WITH_WSREP */
#include "proxy_protocol.h"
#include "sql_callback.h"
@@ -117,13 +121,17 @@
#include <poll.h>
#endif
+#ifdef _WIN32
+#include <handle_connections_win.h>
+#endif
+
#include <my_service_manager.h>
#define mysqld_charset &my_charset_latin1
/* We have HAVE_valgrind below as this speeds up the shutdown of MySQL */
-#if defined(SIGNALS_DONT_BREAK_READ) || defined(HAVE_valgrind) && defined(__linux__)
+#if defined(HAVE_valgrind) && defined(__linux__)
#define HAVE_CLOSE_SERVER_SOCK 1
#endif
@@ -311,23 +319,6 @@ MY_TIMER_INFO sys_timer_info;
/* static variables */
#ifdef HAVE_PSI_INTERFACE
-#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
-static PSI_thread_key key_thread_handle_con_namedpipes;
-static PSI_cond_key key_COND_handler_count;
-#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */
-
-#if defined(HAVE_SMEM) && !defined(EMBEDDED_LIBRARY)
-static PSI_thread_key key_thread_handle_con_sharedmem;
-#endif /* HAVE_SMEM && !EMBEDDED_LIBRARY */
-
-#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
-static PSI_thread_key key_thread_handle_con_sockets;
-#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */
-
-#ifdef __WIN__
-static PSI_thread_key key_thread_handle_shutdown;
-#endif /* __WIN__ */
-
#ifdef HAVE_OPENSSL10
static PSI_rwlock_key key_rwlock_openssl;
#endif
@@ -348,7 +339,6 @@ PSI_statement_info stmt_info_rpl;
static bool lower_case_table_names_used= 0;
static bool max_long_data_size_used= false;
static bool volatile select_thread_in_use, signal_thread_in_use;
-static volatile bool ready_to_exit;
static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0;
static my_bool opt_short_log_format= 0, opt_silent_startup= 0;
@@ -362,6 +352,7 @@ static char *character_set_filesystem_name;
static char *lc_messages;
static char *lc_time_names_name;
char *my_bind_addr_str;
+int server_socket_ai_family;
static char *default_collation_name;
char *default_storage_engine, *default_tmp_storage_engine;
char *enforced_storage_engine=NULL;
@@ -395,25 +386,10 @@ bool opt_endinfo, using_udf_functions;
my_bool locked_in_memory;
bool opt_using_transactions;
bool volatile abort_loop;
-bool volatile shutdown_in_progress;
uint volatile global_disable_checkpoint;
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
ulong slow_start_timeout;
#endif
-/*
- True if the bootstrap thread is running. Protected by LOCK_start_thread.
- Used in bootstrap() function to determine if the bootstrap thread
- has completed. Note, that we can't use 'thread_count' instead,
- since in 5.1, in presence of the Event Scheduler, there may be
- event threads running in parallel, so it's impossible to know
- what value of 'thread_count' is a sign of completion of the
- bootstrap thread.
-
- At the same time, we can't start the event scheduler after
- bootstrap either, since we want to be able to process event-related
- SQL commands in the init file and in --bootstrap mode.
-*/
-bool volatile in_bootstrap= FALSE;
/**
@brief 'grant_option' is used to indicate if privileges needs
to be checked, in which case the lock, LOCK_grant, is used
@@ -481,8 +457,9 @@ ulong delay_key_write_options;
uint protocol_version;
uint lower_case_table_names;
ulong tc_heuristic_recover= 0;
-int32 thread_count, service_thread_count;
-int32 slave_open_temp_tables;
+Atomic_counter<uint32_t> THD_count::count, CONNECT::count;
+bool shutdown_wait_for_slaves;
+Atomic_counter<uint32_t> slave_open_temp_tables;
ulong thread_created;
ulong back_log, connect_timeout, concurrency, server_id;
ulong what_to_log;
@@ -506,8 +483,8 @@ ulonglong test_flags;
ulonglong query_cache_size=0;
ulong query_cache_limit=0;
ulong executed_events=0;
-query_id_t global_query_id;
-ulong aborted_threads, aborted_connects;
+Atomic_counter<query_id_t> global_query_id;
+ulong aborted_threads, aborted_connects, aborted_connects_preauth;
ulong delayed_insert_timeout, delayed_insert_limit, delayed_queue_size;
ulong delayed_insert_threads, delayed_insert_writes, delayed_rows_in_use;
ulong delayed_insert_errors,flush_time;
@@ -515,6 +492,7 @@ ulong specialflag=0;
ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
ulong max_connections, max_connect_errors;
+uint max_password_errors;
ulong extra_max_connections;
uint max_digest_length= 0;
ulong slave_retried_transactions;
@@ -526,6 +504,8 @@ ulong feature_files_opened_with_delayed_keys= 0, feature_check_constraint= 0;
ulonglong denied_connections;
my_decimal decimal_zero;
long opt_secure_timestamp;
+uint default_password_lifetime;
+my_bool disconnect_on_expired_password;
/*
Maximum length of parameter value which can be set through
@@ -556,7 +536,6 @@ ulong slow_launch_threads = 0;
uint sync_binlog_period= 0, sync_relaylog_period= 0,
sync_relayloginfo_period= 0, sync_masterinfo_period= 0;
ulong expire_logs_days = 0;
-ulong rpl_recovery_rank=0;
/**
Soft upper limit for number of sp_head objects that can be stored
in the sp_cache for one connection.
@@ -570,6 +549,7 @@ ulong opt_binlog_commit_wait_count= 0;
ulong opt_binlog_commit_wait_usec= 0;
ulong opt_slave_parallel_max_queued= 131072;
my_bool opt_gtid_ignore_duplicates= FALSE;
+uint opt_gtid_cleanup_batch_size= 64;
const double log_10[] = {
1e000, 1e001, 1e002, 1e003, 1e004, 1e005, 1e006, 1e007, 1e008, 1e009,
@@ -661,29 +641,11 @@ Lt_creator lt_creator;
Ge_creator ge_creator;
Le_creator le_creator;
-MYSQL_FILE *bootstrap_file;
-int bootstrap_error;
-
-I_List<THD> threads;
+THD_list server_threads;
Rpl_filter* cur_rpl_filter;
Rpl_filter* global_rpl_filter;
Rpl_filter* binlog_filter;
-THD *first_global_thread()
-{
- if (threads.is_empty())
- return NULL;
- return threads.head();
-}
-
-THD *next_global_thread(THD *thd)
-{
- if (threads.is_last(thd))
- return NULL;
- struct ilink *next= thd->next;
- return static_cast<THD*>(next);
-}
-
struct system_variables global_system_variables;
/**
Following is just for options parsing, used with a difference against
@@ -713,29 +675,19 @@ SHOW_COMP_OPTION have_crypt, have_compress;
SHOW_COMP_OPTION have_profiling;
SHOW_COMP_OPTION have_openssl;
+#ifndef EMBEDDED_LIBRARY
+static std::atomic<char*> shutdown_user;
+#endif //EMBEDDED_LIBRARY
+
/* Thread specific variables */
pthread_key(THD*, THR_THD);
/*
- LOCK_thread_count protects the following variables:
- thread_count Number of threads with THD that servers queries.
- threads Linked list of active THD's.
- The effect of this is that one can't unlink and
- delete a THD as long as one has locked
- LOCK_thread_count.
- ready_to_exit
- delayed_insert_threads
-*/
-mysql_mutex_t LOCK_thread_count;
-
-/*
LOCK_start_thread is used to syncronize thread start and stop with
other threads.
It also protects these variables:
- handler_count
- in_bootstrap
select_thread_in_use
slave_init_thread_running
check_temp_dir() call
@@ -744,13 +696,12 @@ mysql_mutex_t LOCK_start_thread;
mysql_mutex_t LOCK_thread_cache;
mysql_mutex_t
- LOCK_status, LOCK_show_status, LOCK_error_log, LOCK_short_uuid_generator,
+ LOCK_status, LOCK_error_log, LOCK_short_uuid_generator,
LOCK_delayed_insert, LOCK_delayed_status, LOCK_delayed_create,
LOCK_crypt,
LOCK_global_system_variables,
- LOCK_user_conn, LOCK_slave_list,
+ LOCK_user_conn,
LOCK_connection_count, LOCK_error_messages;
-
mysql_mutex_t LOCK_stats, LOCK_global_user_client_stats,
LOCK_global_table_stats, LOCK_global_index_stats;
@@ -772,8 +723,10 @@ mysql_mutex_t LOCK_prepared_stmt_count;
mysql_mutex_t LOCK_des_key_file;
#endif
mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
+mysql_rwlock_t LOCK_ssl_refresh;
+mysql_rwlock_t LOCK_all_status_vars;
mysql_prlock_t LOCK_system_variables_hash;
-mysql_cond_t COND_thread_count, COND_start_thread;
+mysql_cond_t COND_start_thread;
pthread_t signal_thread;
pthread_attr_t connection_attrib;
mysql_mutex_t LOCK_server_started;
@@ -793,7 +746,6 @@ char *opt_binlog_index_name=0;
/* Static variables */
-static volatile sig_atomic_t kill_in_progress;
my_bool opt_stack_trace;
my_bool opt_expect_abort= 0, opt_bootstrap= 0;
static my_bool opt_myisam_log;
@@ -913,7 +865,7 @@ PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list,
key_LOCK_manager,
key_LOCK_prepared_stmt_count,
key_LOCK_rpl_status, key_LOCK_server_started,
- key_LOCK_status, key_LOCK_show_status,
+ key_LOCK_status,
key_LOCK_system_variables_hash, key_LOCK_thd_data, key_LOCK_thd_kill,
key_LOCK_user_conn, key_LOCK_uuid_short_generator, key_LOG_LOCK_log,
key_master_info_data_lock, key_master_info_run_lock,
@@ -922,9 +874,9 @@ PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list,
key_rpl_group_info_sleep_lock,
key_relay_log_info_log_space_lock, key_relay_log_info_run_lock,
key_structure_guard_mutex, key_TABLE_SHARE_LOCK_ha_data,
- key_LOCK_error_messages, key_LOG_INFO_lock,
+ key_LOCK_error_messages,
key_LOCK_start_thread,
- key_LOCK_thread_count, key_LOCK_thread_cache,
+ key_LOCK_thread_cache,
key_PARTITION_LOCK_auto_inc;
PSI_mutex_key key_RELAYLOG_LOCK_index;
PSI_mutex_key key_LOCK_relaylog_end_pos;
@@ -985,7 +937,6 @@ static PSI_mutex_info all_server_mutexes[]=
{ &key_LOCK_rpl_status, "LOCK_rpl_status", PSI_FLAG_GLOBAL},
{ &key_LOCK_server_started, "LOCK_server_started", PSI_FLAG_GLOBAL},
{ &key_LOCK_status, "LOCK_status", PSI_FLAG_GLOBAL},
- { &key_LOCK_show_status, "LOCK_show_status", PSI_FLAG_GLOBAL},
{ &key_LOCK_system_variables_hash, "LOCK_system_variables_hash", PSI_FLAG_GLOBAL},
{ &key_LOCK_stats, "LOCK_stats", PSI_FLAG_GLOBAL},
{ &key_LOCK_global_user_client_stats, "LOCK_global_user_client_stats", PSI_FLAG_GLOBAL},
@@ -1016,8 +967,6 @@ static PSI_mutex_info all_server_mutexes[]=
{ &key_LOCK_prepare_ordered, "LOCK_prepare_ordered", PSI_FLAG_GLOBAL},
{ &key_LOCK_after_binlog_sync, "LOCK_after_binlog_sync", PSI_FLAG_GLOBAL},
{ &key_LOCK_commit_ordered, "LOCK_commit_ordered", PSI_FLAG_GLOBAL},
- { &key_LOG_INFO_lock, "LOG_INFO::lock", 0},
- { &key_LOCK_thread_count, "LOCK_thread_count", PSI_FLAG_GLOBAL},
{ &key_LOCK_thread_cache, "LOCK_thread_cache", PSI_FLAG_GLOBAL},
{ &key_PARTITION_LOCK_auto_inc, "HA_DATA_PARTITION::LOCK_auto_inc", 0},
{ &key_LOCK_slave_state, "LOCK_slave_state", 0},
@@ -1035,7 +984,10 @@ PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave,
key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock,
key_LOCK_SEQUENCE,
- key_rwlock_LOCK_vers_stats, key_rwlock_LOCK_stat_serial;
+ key_rwlock_LOCK_vers_stats, key_rwlock_LOCK_stat_serial,
+ key_rwlock_LOCK_ssl_refresh,
+ key_rwlock_THD_list,
+ key_rwlock_LOCK_all_status_vars;
static PSI_rwlock_info all_server_rwlocks[]=
{
@@ -1050,7 +1002,10 @@ static PSI_rwlock_info all_server_rwlocks[]=
{ &key_rwlock_LOCK_system_variables_hash, "LOCK_system_variables_hash", PSI_FLAG_GLOBAL},
{ &key_rwlock_query_cache_query_lock, "Query_cache_query::lock", 0},
{ &key_rwlock_LOCK_vers_stats, "Vers_field_stats::lock", 0},
- { &key_rwlock_LOCK_stat_serial, "TABLE_SHARE::LOCK_stat_serial", 0}
+ { &key_rwlock_LOCK_stat_serial, "TABLE_SHARE::LOCK_stat_serial", 0},
+ { &key_rwlock_LOCK_ssl_refresh, "LOCK_ssl_refresh", PSI_FLAG_GLOBAL },
+ { &key_rwlock_THD_list, "THD_list::lock", PSI_FLAG_GLOBAL },
+ { &key_rwlock_LOCK_all_status_vars, "LOCK_all_status_vars", PSI_FLAG_GLOBAL }
};
#ifdef HAVE_MMAP
@@ -1071,7 +1026,7 @@ PSI_cond_key key_BINLOG_COND_xid_list,
key_relay_log_info_start_cond, key_relay_log_info_stop_cond,
key_rpl_group_info_sleep_cond,
key_TABLE_SHARE_cond, key_user_level_lock_cond,
- key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache,
+ key_COND_thread_cache, key_COND_flush_thread_cache,
key_COND_start_thread, key_COND_binlog_send,
key_BINLOG_COND_queue_busy;
PSI_cond_key key_RELAYLOG_COND_relay_log_updated,
@@ -1088,9 +1043,6 @@ PSI_cond_key key_COND_ack_receiver;
static PSI_cond_info all_server_conds[]=
{
-#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
- { &key_COND_handler_count, "COND_handler_count", PSI_FLAG_GLOBAL},
-#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */
#ifdef HAVE_MMAP
{ &key_PAGE_cond, "PAGE::cond", 0},
{ &key_COND_active, "TC_LOG_MMAP::COND_active", 0},
@@ -1124,7 +1076,6 @@ static PSI_cond_info all_server_conds[]=
{ &key_rpl_group_info_sleep_cond, "Rpl_group_info::sleep_cond", 0},
{ &key_TABLE_SHARE_cond, "TABLE_SHARE::cond", 0},
{ &key_user_level_lock_cond, "User_level_lock::cond", 0},
- { &key_COND_thread_count, "COND_thread_count", PSI_FLAG_GLOBAL},
{ &key_COND_thread_cache, "COND_thread_cache", PSI_FLAG_GLOBAL},
{ &key_COND_flush_thread_cache, "COND_flush_thread_cache", PSI_FLAG_GLOBAL},
{ &key_COND_rpl_thread, "COND_rpl_thread", 0},
@@ -1142,7 +1093,7 @@ static PSI_cond_info all_server_conds[]=
{ &key_TABLE_SHARE_COND_rotation, "TABLE_SHARE::COND_rotation", 0}
};
-PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
+PSI_thread_key key_thread_delayed_insert,
key_thread_handle_manager, key_thread_main,
key_thread_one_connection, key_thread_signal_hand,
key_thread_slave_background, key_rpl_parallel_thread;
@@ -1150,23 +1101,6 @@ PSI_thread_key key_thread_ack_receiver;
static PSI_thread_info all_server_threads[]=
{
-#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
- { &key_thread_handle_con_namedpipes, "con_named_pipes", PSI_FLAG_GLOBAL},
-#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */
-
-#if defined(HAVE_SMEM) && !defined(EMBEDDED_LIBRARY)
- { &key_thread_handle_con_sharedmem, "con_shared_mem", PSI_FLAG_GLOBAL},
-#endif /* HAVE_SMEM && !EMBEDDED_LIBRARY */
-
-#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
- { &key_thread_handle_con_sockets, "con_sockets", PSI_FLAG_GLOBAL},
-#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */
-
-#ifdef __WIN__
- { &key_thread_handle_shutdown, "shutdown", PSI_FLAG_GLOBAL},
-#endif /* __WIN__ */
-
- { &key_thread_bootstrap, "bootstrap", PSI_FLAG_GLOBAL},
{ &key_thread_delayed_insert, "delayed_insert", 0},
{ &key_thread_handle_manager, "manager", PSI_FLAG_GLOBAL},
{ &key_thread_main, "main", PSI_FLAG_GLOBAL},
@@ -1317,10 +1251,10 @@ void Buffered_log::print()
switch(m_level)
{
case ERROR_LEVEL:
- sql_print_error("Buffered error: %s\n", m_message.c_ptr_safe());
+ sql_print_error("Buffered error: %s", m_message.c_ptr_safe());
break;
case WARNING_LEVEL:
- sql_print_warning("Buffered warning: %s\n", m_message.c_ptr_safe());
+ sql_print_warning("Buffered warning: %s", m_message.c_ptr_safe());
break;
case INFORMATION_LEVEL:
/*
@@ -1406,10 +1340,10 @@ void Buffered_logs::print()
/** Logs reported before a logger is available. */
static Buffered_logs buffered_logs;
-static MYSQL_SOCKET unix_sock, base_ip_sock, extra_ip_sock;
struct my_rnd_struct sql_rand; ///< used by sql_class.cc:THD::THD()
#ifndef EMBEDDED_LIBRARY
+MYSQL_SOCKET unix_sock, base_ip_sock, extra_ip_sock;
C_MODE_START
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
/**
@@ -1467,27 +1401,18 @@ static pthread_t select_thread;
#undef getpid
#include <process.h>
-static mysql_cond_t COND_handler_count;
-static uint handler_count;
static bool start_mode=0, use_opt_args;
static int opt_argc;
static char **opt_argv;
#if !defined(EMBEDDED_LIBRARY)
-static HANDLE hEventShutdown;
+HANDLE hEventShutdown;
static char shutdown_event_name[40];
#include "nt_servc.h"
static NTService Service; ///< Service object for WinNT
#endif /* EMBEDDED_LIBRARY */
#endif /* __WIN__ */
-#ifdef _WIN32
-#include <sddl.h> /* ConvertStringSecurityDescriptorToSecurityDescriptor */
-static char pipe_name[512];
-static SECURITY_ATTRIBUTES saPipeSecurity;
-static HANDLE hPipe = INVALID_HANDLE_VALUE;
-#endif
-
#ifndef EMBEDDED_LIBRARY
bool mysqld_embedded=0;
#else
@@ -1508,17 +1433,13 @@ int deny_severity = LOG_WARNING;
ulong query_cache_min_res_unit= QUERY_CACHE_MIN_RESULT_DATA_SIZE;
Query_cache query_cache;
#endif
-#ifdef HAVE_SMEM
-const char *shared_memory_base_name= default_shared_memory_base_name;
-my_bool opt_enable_shared_memory;
-HANDLE smem_event_connect_request= 0;
-#endif
+
my_bool opt_use_ssl = 0;
char *opt_ssl_ca= NULL, *opt_ssl_capath= NULL, *opt_ssl_cert= NULL,
*opt_ssl_cipher= NULL, *opt_ssl_key= NULL, *opt_ssl_crl= NULL,
- *opt_ssl_crlpath= NULL;
-
+ *opt_ssl_crlpath= NULL, *opt_tls_version= NULL;
+ulonglong tls_version= 0;
static scheduler_functions thread_scheduler_struct, extra_thread_scheduler_struct;
scheduler_functions *thread_scheduler= &thread_scheduler_struct,
@@ -1526,7 +1447,7 @@ scheduler_functions *thread_scheduler= &thread_scheduler_struct,
#ifdef HAVE_OPENSSL
#include <openssl/crypto.h>
-#ifdef HAVE_OPENSSL10
+#if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL)
typedef struct CRYPTO_dynlock_value
{
mysql_rwlock_t lock;
@@ -1564,19 +1485,11 @@ extern "C" my_bool mysqld_get_one_option(int, const struct my_option *, char *);
static int init_thread_environment();
static char *get_relative_path(const char *path);
static int fix_paths(void);
+#ifndef _WIN32
void handle_connections_sockets();
-#ifdef _WIN32
-pthread_handler_t handle_connections_sockets_thread(void *arg);
#endif
-pthread_handler_t kill_server_thread(void *arg);
-static void bootstrap(MYSQL_FILE *file);
+
static bool read_init_file(char *file_name);
-#ifdef _WIN32
-pthread_handler_t handle_connections_namedpipes(void *arg);
-#endif
-#ifdef HAVE_SMEM
-pthread_handler_t handle_connections_shared_memory(void *arg);
-#endif
pthread_handler_t handle_slave(void *arg);
static void clean_up(bool print_message);
static int test_if_case_insensitive(const char *dir_name);
@@ -1600,19 +1513,110 @@ static void end_ssl();
** Code to end mysqld
****************************************************************************/
-static void close_connections(void)
+/* common callee of two shutdown phases */
+static void kill_thread(THD *thd)
+{
+ mysql_mutex_lock(&thd->LOCK_thd_kill);
+ thd->abort_current_cond_wait(true);
+ mysql_mutex_unlock(&thd->LOCK_thd_kill);
+}
+
+
+/**
+ First shutdown everything but slave threads and binlog dump connections
+*/
+static my_bool kill_thread_phase_1(THD *thd, int *n_threads_awaiting_ack)
+{
+ DBUG_PRINT("quit", ("Informing thread %ld that it's time to die",
+ (ulong) thd->thread_id));
+
+ if (thd->slave_thread || thd->is_binlog_dump_thread() ||
+ (shutdown_wait_for_slaves &&
+ repl_semisync_master.is_thd_awaiting_semisync_ack(thd) &&
+ ++(*n_threads_awaiting_ack)))
+ return 0;
+
+ if (DBUG_EVALUATE_IF("only_kill_system_threads", !thd->system_thread, 0))
+ return 0;
+
+ thd->set_killed(KILL_SERVER_HARD);
+ MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (thd));
+ kill_thread(thd);
+ return 0;
+}
+
+
+/**
+ Last shutdown binlog dump connections
+*/
+static my_bool kill_thread_phase_2(THD *thd, void *)
+{
+ if (shutdown_wait_for_slaves && thd->is_binlog_dump_thread())
+ {
+ thd->set_killed(KILL_SERVER);
+ }
+ else
+ {
+ thd->set_killed(KILL_SERVER_HARD);
+ MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (thd));
+ }
+ kill_thread(thd);
+ return 0;
+}
+
+
+/* associated with the kill thread phase 1 */
+static my_bool warn_threads_active_after_phase_1(THD *thd, void *)
+{
+ if (!thd->is_binlog_dump_thread() && thd->vio_ok())
+ sql_print_warning("%s: Thread %llu (user : '%s') did not exit\n", my_progname,
+ (ulonglong) thd->thread_id,
+ (thd->main_security_ctx.user ?
+ thd->main_security_ctx.user : ""));
+ return 0;
+}
+
+
+/* associated with the kill thread phase 2 */
+static my_bool warn_threads_active_after_phase_2(THD *thd, void *)
+{
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ // dump thread may not have yet (or already) current_linfo set
+ sql_print_warning("Dump thread %llu last sent to server %lu "
+ "binlog file:pos %s:%llu",
+ thd->thread_id, thd->variables.server_id,
+ thd->current_linfo ?
+ my_basename(thd->current_linfo->log_file_name) : "NULL",
+ thd->current_linfo ? thd->current_linfo->pos : 0);
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+
+ return 0;
+}
+
+
+/**
+ Kills main thread.
+
+ @note this function is responsible for setting abort_loop and breaking
+ poll() in main thread. Shutdown as such is supposed to be performed by main
+ thread itself.
+*/
+
+static void break_connect_loop()
{
#ifdef EXTRA_DEBUG
int count=0;
#endif
- DBUG_ENTER("close_connections");
- /* Clear thread cache */
- kill_cached_threads++;
- flush_thread_cache();
+ abort_loop= 1;
- /* kill connection thread */
-#if !defined(__WIN__)
+#if defined(__WIN__)
+ if (!SetEvent(hEventShutdown))
+ DBUG_PRINT("error", ("Got error: %ld from SetEvent", GetLastError()));
+#else
+ /* Avoid waiting for ourselves when thread-handling=no-threads. */
+ if (pthread_equal(pthread_self(), select_thread))
+ return;
DBUG_PRINT("quit", ("waiting for select thread: %lu",
(ulong)select_thread));
@@ -1633,7 +1637,7 @@ static void close_connections(void)
error= mysql_cond_timedwait(&COND_start_thread, &LOCK_start_thread,
&abstime);
if (error != EINTR)
- break;
+ break;
}
#ifdef EXTRA_DEBUG
if (error != 0 && error != ETIMEDOUT && !count++)
@@ -1643,8 +1647,59 @@ static void close_connections(void)
}
mysql_mutex_unlock(&LOCK_start_thread);
#endif /* __WIN__ */
+}
+/**
+ A wrapper around kill_main_thrad().
+
+ Sets shutdown user. This function may be called by multiple threads
+ concurrently, thus it performs safe update of shutdown_user
+ (first thread wins).
+*/
+
+void kill_mysql(THD *thd)
+{
+ char user_host_buff[MAX_USER_HOST_SIZE + 1];
+ char *user, *expected_shutdown_user= 0;
+
+ make_user_name(thd, user_host_buff);
+
+ if ((user= my_strdup(user_host_buff, MYF(0))) &&
+ !shutdown_user.compare_exchange_strong(expected_shutdown_user,
+ user,
+ std::memory_order_relaxed,
+ std::memory_order_relaxed))
+ {
+ my_free(user);
+ }
+
+ DBUG_EXECUTE_IF("mysql_admin_shutdown_wait_for_slaves",
+ thd->lex->is_shutdown_wait_for_slaves= true;);
+ DBUG_EXECUTE_IF("simulate_delay_at_shutdown",
+ {
+ DBUG_ASSERT(binlog_dump_thread_count == 3);
+ const char act[]=
+ "now "
+ "SIGNAL greetings_from_kill_mysql";
+ DBUG_ASSERT(!debug_sync_set_action(thd,
+ STRING_WITH_LEN(act)));
+ };);
+
+ if (thd->lex->is_shutdown_wait_for_slaves)
+ shutdown_wait_for_slaves= true;
+ break_connect_loop();
+}
+
+
+static void close_connections(void)
+{
+ DBUG_ENTER("close_connections");
+
+ /* Clear thread cache */
+ kill_cached_threads++;
+ flush_thread_cache();
+
/* Abort listening to new connections */
DBUG_PRINT("quit",("Closing sockets"));
if (!opt_disable_networking )
@@ -1660,30 +1715,7 @@ static void close_connections(void)
extra_ip_sock= MYSQL_INVALID_SOCKET;
}
}
-#ifdef _WIN32
- if (hPipe != INVALID_HANDLE_VALUE && opt_enable_named_pipe)
- {
- HANDLE temp;
- DBUG_PRINT("quit", ("Closing named pipes") );
-
- /* Create connection to the handle named pipe handler to break the loop */
- if ((temp = CreateFile(pipe_name,
- GENERIC_READ | GENERIC_WRITE,
- 0,
- NULL,
- OPEN_EXISTING,
- 0,
- NULL )) != INVALID_HANDLE_VALUE)
- {
- WaitNamedPipe(pipe_name, 1000);
- DWORD dwMode = PIPE_READMODE_BYTE | PIPE_WAIT;
- SetNamedPipeHandleState(temp, &dwMode, NULL, NULL);
- CancelIo(temp);
- DisconnectNamedPipe(temp);
- CloseHandle(temp);
- }
- }
-#endif
+
#ifdef HAVE_SYS_UN_H
if (mysql_socket_getfd(unix_sock) != INVALID_SOCKET)
{
@@ -1694,61 +1726,37 @@ static void close_connections(void)
#endif
end_thr_alarm(0); // Abort old alarms.
+ while (CONNECT::count)
+ my_sleep(100);
+
/*
First signal all threads that it's time to die
This will give the threads some time to gracefully abort their
statements and inform their clients that the server is about to die.
*/
+ DBUG_EXECUTE_IF("mysqld_delay_kill_threads_phase_1", my_sleep(200000););
+ int n_threads_awaiting_ack= 0;
+ server_threads.iterate(kill_thread_phase_1, &n_threads_awaiting_ack);
- THD *tmp;
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
+ /*
+ If we are waiting on any ACKs, delay killing the thread until either an ACK
+ is received or the timeout is hit.
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
+ Allow at max the number of sessions to await a timeout; however, if all
+ ACKs have been received in less iterations, then quit early
+ */
+ if (shutdown_wait_for_slaves && repl_semisync_master.get_master_enabled())
{
- DBUG_PRINT("quit",("Informing thread %ld that it's time to die",
- (ulong) tmp->thread_id));
- /* We skip slave threads on this first loop through. */
- if (tmp->slave_thread)
- continue;
+ int waiting_threads= repl_semisync_master.sync_get_master_wait_sessions();
+ if (waiting_threads)
+ sql_print_information("Delaying shutdown to await semi-sync ACK");
- /* cannot use 'continue' inside DBUG_EXECUTE_IF()... */
- if (DBUG_EVALUATE_IF("only_kill_system_threads", !tmp->system_thread, 0))
- continue;
-
-#ifdef WITH_WSREP
- /* skip wsrep system threads as well */
- if (WSREP(tmp) && (tmp->wsrep_exec_mode==REPL_RECV || tmp->wsrep_applier))
- continue;
-#endif
- tmp->set_killed(KILL_SERVER_HARD);
- MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (tmp));
- mysql_mutex_lock(&tmp->LOCK_thd_kill);
- if (tmp->mysys_var)
- {
- tmp->mysys_var->abort=1;
- mysql_mutex_lock(&tmp->mysys_var->mutex);
- if (tmp->mysys_var->current_cond)
- {
- uint i;
- for (i=0; i < 2; i++)
- {
- int ret= mysql_mutex_trylock(tmp->mysys_var->current_mutex);
- mysql_cond_broadcast(tmp->mysys_var->current_cond);
- if (!ret)
- {
- /* Thread has surely got the signal, unlock and abort */
- mysql_mutex_unlock(tmp->mysys_var->current_mutex);
- break;
- }
- sleep(1);
- }
- }
- mysql_mutex_unlock(&tmp->mysys_var->mutex);
- }
- mysql_mutex_unlock(&tmp->LOCK_thd_kill);
+ while (waiting_threads-- > 0)
+ repl_semisync_master.await_slave_reply();
}
- mysql_mutex_unlock(&LOCK_thread_count); // For unlink from list
+
+ DBUG_EXECUTE_IF("delay_shutdown_phase_2_after_semisync_wait",
+ my_sleep(500000););
Events::deinit();
slave_prepare_for_shutdown();
@@ -1769,85 +1777,46 @@ static void close_connections(void)
much smaller than even 2 seconds, this is only a safety fallback against
stuck threads so server shutdown is not held up forever.
*/
- DBUG_PRINT("info", ("thread_count: %d", thread_count));
+ DBUG_PRINT("info", ("THD_count: %u", THD_count::value()));
- for (int i= 0; *(volatile int32*) &thread_count && i < 1000; i++)
+ for (int i= 0; (THD_count::value() - binlog_dump_thread_count -
+ n_threads_awaiting_ack) &&
+ i < 1000;
+ i++)
my_sleep(20000);
- /*
- Force remaining threads to die by closing the connection to the client
- This will ensure that threads that are waiting for a command from the
- client on a blocking read call are aborted.
- */
-
- for (;;)
- {
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
- if (!(tmp=threads.get()))
- {
- mysql_mutex_unlock(&LOCK_thread_count);
- break;
- }
-#ifndef __bsdi__ // Bug in BSDI kernel
- if (tmp->vio_ok())
- {
- if (global_system_variables.log_warnings)
- sql_print_warning(ER_DEFAULT(ER_FORCING_CLOSE),my_progname,
- (ulong) tmp->thread_id,
- (tmp->main_security_ctx.user ?
- tmp->main_security_ctx.user : ""));
- /*
- close_connection() might need a valid current_thd
- for memory allocation tracking.
- */
- THD* save_thd= current_thd;
- set_current_thd(tmp);
- close_connection(tmp);
- set_current_thd(save_thd);
- }
-#endif
+ if (global_system_variables.log_warnings)
+ server_threads.iterate(warn_threads_active_after_phase_1);
#ifdef WITH_WSREP
- /*
- * WSREP_TODO:
- * this code block may turn out redundant. wsrep->disconnect()
- * should terminate slave threads gracefully, and we don't need
- * to signal them here.
- * The code here makes sure mysqld will not hang during shutdown
- * even if wsrep provider has problems in shutting down.
- */
- if (WSREP(tmp) && tmp->wsrep_exec_mode==REPL_RECV)
- {
- sql_print_information("closing wsrep system thread");
- tmp->set_killed(KILL_CONNECTION);
- MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (tmp));
- if (tmp->mysys_var)
- {
- tmp->mysys_var->abort=1;
- mysql_mutex_lock(&tmp->mysys_var->mutex);
- if (tmp->mysys_var->current_cond)
- {
- mysql_mutex_lock(tmp->mysys_var->current_mutex);
- mysql_cond_broadcast(tmp->mysys_var->current_cond);
- mysql_mutex_unlock(tmp->mysys_var->current_mutex);
- }
- mysql_mutex_unlock(&tmp->mysys_var->mutex);
- }
- }
-#endif
- DBUG_PRINT("quit",("Unlocking LOCK_thread_count"));
- mysql_mutex_unlock(&LOCK_thread_count);
+ if (wsrep_inited == 1)
+ {
+ wsrep_deinit(true);
}
- end_slave();
+ wsrep_sst_auth_free();
+#endif
/* All threads has now been aborted */
- DBUG_PRINT("quit",("Waiting for threads to die (count=%u)",thread_count));
- mysql_mutex_lock(&LOCK_thread_count);
- while (thread_count || service_thread_count)
+ DBUG_PRINT("quit", ("Waiting for threads to die (count=%u)",
+ THD_count::value() - binlog_dump_thread_count -
+ n_threads_awaiting_ack));
+
+ while (THD_count::value() - binlog_dump_thread_count -
+ n_threads_awaiting_ack)
+ my_sleep(1000);
+
+ /* Kill phase 2 */
+ server_threads.iterate(kill_thread_phase_2);
+ for (uint64 i= 0; THD_count::value(); i++)
{
- mysql_cond_wait(&COND_thread_count, &LOCK_thread_count);
- DBUG_PRINT("quit",("One thread died (count=%u)",thread_count));
+ /*
+ This time the warnings are emitted within the loop to provide a
+ dynamic view on the shutdown status through the errorlog.
+ */
+ if (global_system_variables.log_warnings > 2 && i % 60000 == 0)
+ server_threads.iterate(warn_threads_active_after_phase_2);
+ my_sleep(1000);
}
- mysql_mutex_unlock(&LOCK_thread_count);
+ /* End of kill phase 2 */
DBUG_PRINT("quit",("close_connections thread"));
DBUG_VOID_RETURN;
@@ -1889,190 +1858,6 @@ static void close_server_sock()
#endif /*EMBEDDED_LIBRARY*/
-/**
- Set shutdown user
-
- @note this function may be called by multiple threads concurrently, thus
- it performs safe update of shutdown_user (first thread wins).
-*/
-
-static volatile char *shutdown_user;
-static void set_shutdown_user(THD *thd)
-{
- char user_host_buff[MAX_USER_HOST_SIZE + 1];
- char *user, *expected_shutdown_user= 0;
-
- make_user_name(thd, user_host_buff);
-
- if ((user= my_strdup(user_host_buff, MYF(0))) &&
- !my_atomic_casptr((void **) &shutdown_user,
- (void **) &expected_shutdown_user, user))
- my_free(user);
-}
-
-
-void kill_mysql(THD *thd)
-{
- DBUG_ENTER("kill_mysql");
-
- if (thd)
- set_shutdown_user(thd);
-
-#if defined(SIGNALS_DONT_BREAK_READ) && !defined(EMBEDDED_LIBRARY)
- abort_loop=1; // Break connection loops
- close_server_sock(); // Force accept to wake up
-#endif
-
-#if defined(__WIN__)
-#if !defined(EMBEDDED_LIBRARY)
- {
- if (!SetEvent(hEventShutdown))
- {
- DBUG_PRINT("error",("Got error: %ld from SetEvent",GetLastError()));
- }
- /*
- or:
- HANDLE hEvent=OpenEvent(0, FALSE, "MySqlShutdown");
- SetEvent(hEventShutdown);
- CloseHandle(hEvent);
- */
- }
-#endif
-#elif defined(HAVE_PTHREAD_KILL)
- if (pthread_kill(signal_thread, MYSQL_KILL_SIGNAL))
- {
- DBUG_PRINT("error",("Got error %d from pthread_kill",errno)); /* purecov: inspected */
- }
-#elif !defined(SIGNALS_DONT_BREAK_READ)
- kill(current_pid, MYSQL_KILL_SIGNAL);
-#endif
- DBUG_PRINT("quit",("After pthread_kill"));
- shutdown_in_progress=1; // Safety if kill didn't work
-#ifdef SIGNALS_DONT_BREAK_READ
- if (!kill_in_progress)
- {
- pthread_t tmp;
- int error;
- abort_loop=1;
- if (unlikely((error= mysql_thread_create(0, /* Not instrumented */
- &tmp, &connection_attrib,
- kill_server_thread, (void*) 0))))
- sql_print_error("Can't create thread to kill server (errno= %d).",
- error);
- }
-#endif
- DBUG_VOID_RETURN;
-}
-
-/**
- Force server down. Kill all connections and threads and exit.
-
- @param sig_ptr Signal number that caused kill_server to be called.
-
- @note
- A signal number of 0 mean that the function was not called
- from a signal handler and there is thus no signal to block
- or stop, we just want to kill the server.
-*/
-
-#if !defined(__WIN__)
-static void *kill_server(void *sig_ptr)
-#define RETURN_FROM_KILL_SERVER return 0
-#else
-static void __cdecl kill_server(int sig_ptr)
-#define RETURN_FROM_KILL_SERVER return
-#endif
-{
- DBUG_ENTER("kill_server");
-#ifndef EMBEDDED_LIBRARY
- int sig=(int) (long) sig_ptr; // This is passed a int
- // if there is a signal during the kill in progress, ignore the other
- if (kill_in_progress) // Safety
- {
- DBUG_LEAVE;
- RETURN_FROM_KILL_SERVER;
- }
- kill_in_progress=TRUE;
- abort_loop=1; // This should be set
- if (sig != 0) // 0 is not a valid signal number
- my_sigset(sig, SIG_IGN); /* purify inspected */
- if (sig == MYSQL_KILL_SIGNAL || sig == 0)
- {
- char *user= (char *) my_atomic_loadptr((void**) &shutdown_user);
- sql_print_information(ER_DEFAULT(ER_NORMAL_SHUTDOWN), my_progname,
- user ? user : "unknown");
- if (user)
- my_free(user);
- }
- else
- sql_print_error(ER_DEFAULT(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */
-
-#ifdef HAVE_SMEM
- /*
- Send event to smem_event_connect_request for aborting
- */
- if (opt_enable_shared_memory)
- {
- if (!SetEvent(smem_event_connect_request))
- {
- DBUG_PRINT("error",
- ("Got error: %ld from SetEvent of smem_event_connect_request",
- GetLastError()));
- }
- }
-#endif
-
- /* Stop wsrep threads in case they are running. */
- if (wsrep_running_threads > 0)
- {
- wsrep_stop_replication(NULL);
- }
-
- close_connections();
-
-#ifdef WITH_WSREP
- if (wsrep_inited == 1)
- wsrep_deinit(true);
- wsrep_sst_auth_free();
-#endif /* WITH_WSREP */
-
- if (sig != MYSQL_KILL_SIGNAL &&
- sig != 0)
- unireg_abort(1); /* purecov: inspected */
- else
- unireg_end();
-
- /* purecov: begin deadcode */
- DBUG_LEAVE; // Must match DBUG_ENTER()
- my_thread_end();
- pthread_exit(0);
- /* purecov: end */
-
- RETURN_FROM_KILL_SERVER; // Avoid compiler warnings
-
-#else /* EMBEDDED_LIBRARY*/
-
- DBUG_LEAVE;
- RETURN_FROM_KILL_SERVER;
-
-#endif /* EMBEDDED_LIBRARY */
-}
-
-
-#if defined(USE_ONE_SIGNAL_HAND)
-pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
-{
- my_thread_init(); // Initialize new thread
- kill_server(0);
- /* purecov: begin deadcode */
- my_thread_end();
- pthread_exit(0);
- return 0;
- /* purecov: end */
-}
-#endif
-
-
extern "C" sig_handler print_signal_warning(int sig)
{
if (global_system_variables.log_warnings)
@@ -2088,42 +1873,6 @@ extern "C" sig_handler print_signal_warning(int sig)
}
#ifndef EMBEDDED_LIBRARY
-
-static void init_error_log_mutex()
-{
- mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, MY_MUTEX_INIT_FAST);
-}
-
-
-static void clean_up_error_log_mutex()
-{
- mysql_mutex_destroy(&LOCK_error_log);
-}
-
-
-/**
- cleanup all memory and end program nicely.
-
- If SIGNALS_DONT_BREAK_READ is defined, this function is called
- by the main thread. To get MySQL to shut down nicely in this case
- (Mac OS X) we have to call exit() instead if pthread_exit().
-
- @note
- This function never returns.
-*/
-void unireg_end(void)
-{
- clean_up(1);
- my_thread_end();
- sd_notify(0, "STATUS=MariaDB server is down");
-#if defined(SIGNALS_DONT_BREAK_READ)
- exit(0);
-#else
- pthread_exit(0); // Exit is in main thread
-#endif
-}
-
-
extern "C" void unireg_abort(int exit_code)
{
DBUG_ENTER("unireg_abort");
@@ -2131,31 +1880,36 @@ extern "C" void unireg_abort(int exit_code)
if (opt_help)
usage();
if (exit_code)
- sql_print_error("Aborting\n");
+ sql_print_error("Aborting");
/* Don't write more notes to the log to not hide error message */
disable_log_notes= 1;
#ifdef WITH_WSREP
- /* Check if wsrep class is used. If yes, then cleanup wsrep */
- if (wsrep)
+ // Note that we do not have thd here, thus can't use
+ // WSREP(thd)
+
+ if (WSREP_ON &&
+ Wsrep_server_state::is_inited() &&
+ Wsrep_server_state::instance().state() != wsrep::server_state::s_disconnected)
{
/*
This is an abort situation, we cannot expect to gracefully close all
wsrep threads here, we can only diconnect from service
*/
wsrep_close_client_connections(FALSE);
- shutdown_in_progress= 1;
- wsrep->disconnect(wsrep);
+ Wsrep_server_state::instance().disconnect();
WSREP_INFO("Service disconnected.");
wsrep_close_threads(NULL); /* this won't close all threads */
sleep(1); /* so give some time to exit for those which can */
WSREP_INFO("Some threads may fail to exit.");
+ }
- /* In bootstrap mode we deinitialize wsrep here. */
- if (opt_bootstrap && wsrep_inited)
- wsrep_deinit(true);
- wsrep_sst_auth_free();
+ if (WSREP_ON && wsrep_inited)
+ {
+ wsrep_deinit(true);
+ wsrep_deinit_server();
}
+ wsrep_sst_auth_free();
#endif // WITH_WSREP
clean_up(!opt_abort && (exit_code || !opt_bootstrap)); /* purecov: inspected */
@@ -2182,9 +1936,12 @@ static void mysqld_exit(int exit_code)
rpl_deinit_gtid_waiting();
rpl_deinit_gtid_slave_state();
wait_for_signal_thread_to_end();
+#ifdef WITH_WSREP
+ wsrep_deinit_server();
+ wsrep_sst_auth_free();
+#endif /* WITH_WSREP */
mysql_audit_finalize();
clean_up_mutexes();
- clean_up_error_log_mutex();
my_end((opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0));
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
shutdown_performance_schema(); // we do it as late as possible
@@ -2205,7 +1962,7 @@ static void mysqld_exit(int exit_code)
#endif /* !EMBEDDED_LIBRARY */
-void clean_up(bool print_message)
+static void clean_up(bool print_message)
{
DBUG_PRINT("exit",("clean_up"));
if (cleanup_done++)
@@ -2272,9 +2029,6 @@ void clean_up(bool print_message)
free_global_index_stats();
delete_dynamic(&all_options); // This should be empty
free_all_rpl_filters();
-#ifdef HAVE_REPLICATION
- end_slave_list();
-#endif
wsrep_thr_deinit();
my_uuid_end();
delete type_handler_data;
@@ -2304,16 +2058,6 @@ void clean_up(bool print_message)
sys_var_end();
free_charsets();
- /*
- Signal mysqld_main() that it can exit
- do the broadcast inside the lock to ensure that my_end() is not called
- during broadcast()
- */
- mysql_mutex_lock(&LOCK_thread_count);
- ready_to_exit=1;
- mysql_cond_broadcast(&COND_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
-
my_free(const_cast<char*>(log_bin_basename));
my_free(const_cast<char*>(log_bin_index));
#ifndef EMBEDDED_LIBRARY
@@ -2356,12 +2100,12 @@ static void wait_for_signal_thread_to_end()
static void clean_up_mutexes()
{
DBUG_ENTER("clean_up_mutexes");
+ server_threads.destroy();
mysql_rwlock_destroy(&LOCK_grant);
- mysql_mutex_destroy(&LOCK_thread_count);
mysql_mutex_destroy(&LOCK_thread_cache);
mysql_mutex_destroy(&LOCK_start_thread);
mysql_mutex_destroy(&LOCK_status);
- mysql_mutex_destroy(&LOCK_show_status);
+ mysql_rwlock_destroy(&LOCK_all_status_vars);
mysql_mutex_destroy(&LOCK_delayed_insert);
mysql_mutex_destroy(&LOCK_delayed_status);
mysql_mutex_destroy(&LOCK_delayed_create);
@@ -2375,7 +2119,7 @@ static void clean_up_mutexes()
mysql_mutex_destroy(&LOCK_global_index_stats);
#ifdef HAVE_OPENSSL
mysql_mutex_destroy(&LOCK_des_key_file);
-#ifdef HAVE_OPENSSL10
+#if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL)
for (int i= 0; i < CRYPTO_num_locks(); ++i)
mysql_rwlock_destroy(&openssl_stdlocks[i].lock);
OPENSSL_free(openssl_stdlocks);
@@ -2385,6 +2129,7 @@ static void clean_up_mutexes()
mysql_mutex_destroy(&LOCK_rpl_status);
#endif /* HAVE_REPLICATION */
mysql_mutex_destroy(&LOCK_active_mi);
+ mysql_rwlock_destroy(&LOCK_ssl_refresh);
mysql_rwlock_destroy(&LOCK_sys_init_connect);
mysql_rwlock_destroy(&LOCK_sys_init_slave);
mysql_mutex_destroy(&LOCK_global_system_variables);
@@ -2392,7 +2137,6 @@ static void clean_up_mutexes()
mysql_mutex_destroy(&LOCK_short_uuid_generator);
mysql_mutex_destroy(&LOCK_prepared_stmt_count);
mysql_mutex_destroy(&LOCK_error_messages);
- mysql_cond_destroy(&COND_thread_count);
mysql_cond_destroy(&COND_thread_cache);
mysql_cond_destroy(&COND_start_thread);
mysql_cond_destroy(&COND_flush_thread_cache);
@@ -2402,6 +2146,9 @@ static void clean_up_mutexes()
mysql_cond_destroy(&COND_prepare_ordered);
mysql_mutex_destroy(&LOCK_after_binlog_sync);
mysql_mutex_destroy(&LOCK_commit_ordered);
+#ifndef EMBEDDED_LIBRARY
+ mysql_mutex_destroy(&LOCK_error_log);
+#endif
DBUG_VOID_RETURN;
}
@@ -2411,9 +2158,6 @@ static void clean_up_mutexes()
****************************************************************************/
#ifdef EMBEDDED_LIBRARY
-static void set_ports()
-{
-}
void close_connection(THD *thd, uint sql_errno)
{
}
@@ -2612,6 +2356,7 @@ static MYSQL_SOCKET activate_tcp_port(uint port)
}
else
{
+ server_socket_ai_family= a->ai_family;
sql_print_information("Server socket created on IP: '%s'.",
(const char *) ip_addr);
break;
@@ -2706,67 +2451,6 @@ static MYSQL_SOCKET activate_tcp_port(uint port)
DBUG_RETURN(ip_sock);
}
-#ifdef _WIN32
-/*
- Create a security descriptor for pipe.
- - Use low integrity level, so that it is possible to connect
- from any process.
- - Give current user read/write access to pipe.
- - Give Everyone read/write access to pipe minus FILE_CREATE_PIPE_INSTANCE
-*/
-static void init_pipe_security_descriptor()
-{
-#define SDDL_FMT "S:(ML;; NW;;; LW) D:(A;; 0x%08x;;; WD)(A;; FRFW;;; %s)"
-#define EVERYONE_PIPE_ACCESS_MASK \
- (FILE_READ_DATA | FILE_READ_EA | FILE_READ_ATTRIBUTES | READ_CONTROL | \
- SYNCHRONIZE | FILE_WRITE_DATA | FILE_WRITE_EA | FILE_WRITE_ATTRIBUTES)
-
-#ifndef SECURITY_MAX_SID_STRING_CHARACTERS
-/* Old SDK does not have this constant */
-#define SECURITY_MAX_SID_STRING_CHARACTERS 187
-#endif
-
- /*
- Figure out SID of the user that runs the server, then create SDDL string
- for pipe permissions, and convert it to the security descriptor.
- */
- char sddl_string[sizeof(SDDL_FMT) + 8 + SECURITY_MAX_SID_STRING_CHARACTERS];
- struct
- {
- TOKEN_USER token_user;
- BYTE buffer[SECURITY_MAX_SID_SIZE];
- } token_buffer;
- HANDLE token;
- DWORD tmp;
-
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token))
- goto fail;
-
- if (!GetTokenInformation(token, TokenUser, &token_buffer,
- (DWORD) sizeof(token_buffer), &tmp))
- goto fail;
-
- CloseHandle(token);
-
- char *current_user_string_sid;
- if (!ConvertSidToStringSid(token_buffer.token_user.User.Sid,
- &current_user_string_sid))
- goto fail;
-
- snprintf(sddl_string, sizeof(sddl_string), SDDL_FMT,
- EVERYONE_PIPE_ACCESS_MASK, current_user_string_sid);
- LocalFree(current_user_string_sid);
-
- if (ConvertStringSecurityDescriptorToSecurityDescriptor(sddl_string,
- SDDL_REVISION_1, &saPipeSecurity.lpSecurityDescriptor, 0))
- return;
-
-fail:
- sql_perror("Can't start server : Initialize security descriptor");
- unireg_abort(1);
-}
-#endif
-
static void network_init(void)
{
#ifdef HAVE_SYS_UN_H
@@ -2799,41 +2483,16 @@ static void network_init(void)
extra_ip_sock= activate_tcp_port(mysqld_extra_port);
}
-#ifdef _WIN32
- /* create named pipe */
- if (mysqld_unix_port[0] && !opt_bootstrap &&
- opt_enable_named_pipe)
- {
-
- strxnmov(pipe_name, sizeof(pipe_name)-1, "\\\\.\\pipe\\",
- mysqld_unix_port, NullS);
- init_pipe_security_descriptor();
- saPipeSecurity.nLength = sizeof(SECURITY_ATTRIBUTES);
- saPipeSecurity.bInheritHandle = FALSE;
- if ((hPipe= CreateNamedPipe(pipe_name,
- PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED | FILE_FLAG_FIRST_PIPE_INSTANCE,
- PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
- PIPE_UNLIMITED_INSTANCES,
- (int) global_system_variables.net_buffer_length,
- (int) global_system_variables.net_buffer_length,
- NMPWAIT_USE_DEFAULT_WAIT,
- &saPipeSecurity)) == INVALID_HANDLE_VALUE)
- {
- sql_perror("Create named pipe failed");
- unireg_abort(1);
- }
- }
-#endif
-
#if defined(HAVE_SYS_UN_H)
/*
** Create the UNIX socket
*/
if (mysqld_unix_port[0] && !opt_bootstrap)
{
+ size_t port_len;
DBUG_PRINT("general",("UNIX Socket is %s",mysqld_unix_port));
- if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
+ if ((port_len= strlen(mysqld_unix_port)) > sizeof(UNIXaddr.sun_path) - 1)
{
sql_print_error("The socket file path is too long (> %u): %s",
(uint) sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
@@ -2851,14 +2510,26 @@ static void network_init(void)
bzero((char*) &UNIXaddr, sizeof(UNIXaddr));
UNIXaddr.sun_family = AF_UNIX;
strmov(UNIXaddr.sun_path, mysqld_unix_port);
- (void) unlink(mysqld_unix_port);
+#if defined(__linux__)
+ /* Abstract socket */
+ if (mysqld_unix_port[0] == '@')
+ {
+ UNIXaddr.sun_path[0]= '\0';
+ port_len+= offsetof(struct sockaddr_un, sun_path);
+ }
+ else
+#endif
+ {
+ (void) unlink(mysqld_unix_port);
+ port_len= sizeof(UNIXaddr);
+ }
arg= 1;
(void) mysql_socket_setsockopt(unix_sock,SOL_SOCKET,SO_REUSEADDR,
(char*)&arg, sizeof(arg));
umask(0);
if (mysql_socket_bind(unix_sock,
reinterpret_cast<struct sockaddr *>(&UNIXaddr),
- sizeof(UNIXaddr)) < 0)
+ port_len) < 0)
{
sql_perror("Can't start server : Bind on unix socket"); /* purecov: tested */
sql_print_error("Do you already have another mysqld server running on socket: %s ?",mysqld_unix_port);
@@ -2893,13 +2564,19 @@ static void network_init(void)
void close_connection(THD *thd, uint sql_errno)
{
+ int lvl= (thd->main_security_ctx.user ? 3 : 1);
DBUG_ENTER("close_connection");
if (sql_errno)
+ {
net_send_error(thd, sql_errno, ER_DEFAULT(sql_errno), NULL);
-
- thd->print_aborted_warning(3, sql_errno ? ER_DEFAULT(sql_errno)
- : "CLOSE_CONNECTION");
+ thd->print_aborted_warning(lvl, ER_DEFAULT(sql_errno));
+ }
+ else
+ thd->print_aborted_warning(lvl, (thd->main_security_ctx.user ?
+ "This connection closed normally" :
+ "This connection closed normally without"
+ " authentication"));
thd->disconnect();
@@ -2912,7 +2589,6 @@ void close_connection(THD *thd, uint sql_errno)
mysql_audit_notify_connection_disconnect(thd, sql_errno);
DBUG_VOID_RETURN;
}
-#endif /* EMBEDDED_LIBRARY */
/** Called when mysqld is aborted with ^C */
@@ -2920,11 +2596,12 @@ void close_connection(THD *thd, uint sql_errno)
extern "C" sig_handler end_mysqld_signal(int sig __attribute__((unused)))
{
DBUG_ENTER("end_mysqld_signal");
- /* Don't call kill_mysql() if signal thread is not running */
+ /* Don't kill if signal thread is not running */
if (signal_thread_in_use)
- kill_mysql(); // Take down mysqld nicely
+ break_connect_loop(); // Take down mysqld nicely
DBUG_VOID_RETURN; /* purecov: deadcode */
}
+#endif /* EMBEDDED_LIBRARY */
/*
Decrease number of connections
@@ -2942,30 +2619,6 @@ void dec_connection_count(scheduler_functions *scheduler)
/*
- Send a signal to unblock close_conneciton() if there is no more
- threads running with a THD attached
-
- It's safe to check for thread_count and service_thread_count outside
- of a mutex as we are only interested to see if they where decremented
- to 0 by a previous unlink_thd() call.
-
- We should only signal COND_thread_count if both variables are 0,
- false positives are ok.
-*/
-
-void signal_thd_deleted()
-{
- if (!thread_count && !service_thread_count)
- {
- /* Signal close_connections() that all THD's are freed */
- mysql_mutex_lock(&LOCK_thread_count);
- mysql_cond_broadcast(&COND_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
- }
-}
-
-
-/*
Unlink thd from global list of available connections
SYNOPSIS
@@ -2980,14 +2633,16 @@ void unlink_thd(THD *thd)
thd->cleanup();
thd->add_status_to_global();
- unlink_not_visible_thd(thd);
+ server_threads.erase(thd);
+#ifdef WITH_WSREP
/*
Do not decrement when its wsrep system thread. wsrep_applier is set for
applier as well as rollbacker threads.
*/
- if (IF_WSREP(!thd->wsrep_applier, 1))
- dec_connection_count(thd->scheduler);
+ if (!thd->wsrep_applier)
+#endif /* WITH_WSREP */
+ dec_connection_count(thd->scheduler);
thd->free_connection();
@@ -3089,7 +2744,7 @@ static bool cache_thread(THD *thd)
thd->thr_create_utime= microsecond_interval_timer();
thd->start_utime= thd->thr_create_utime;
- add_to_active_threads(thd);
+ server_threads.insert(thd);
DBUG_RETURN(1);
}
}
@@ -3191,7 +2846,7 @@ static BOOL WINAPI console_event_handler( DWORD type )
*/
#ifndef EMBEDDED_LIBRARY
if(hEventShutdown)
- kill_mysql();
+ break_connect_loop();
else
#endif
sql_print_warning("CTRL-C ignored during startup");
@@ -3529,6 +3184,18 @@ static void start_signal_handler(void)
}
+#if defined(USE_ONE_SIGNAL_HAND)
+pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
+{
+ my_thread_init(); // Initialize new thread
+ break_connect_loop();
+ my_thread_end();
+ pthread_exit(0);
+ return 0;
+}
+#endif
+
+
/** This threads handles all signals and alarms. */
/* ARGSUSED */
pthread_handler_t signal_hand(void *arg __attribute__((unused)))
@@ -3582,14 +3249,10 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
(void) pthread_sigmask(SIG_BLOCK,&set,NULL);
for (;;)
{
- int error; // Used when debugging
- if (shutdown_in_progress && !abort_loop)
- {
- sig= SIGTERM;
- error=0;
- }
- else
- while ((error=my_sigwait(&set,&sig)) == EINTR) ;
+ int error;
+ int origin;
+
+ while ((error= my_sigwait(&set, &sig, &origin)) == EINTR) /* no-op */;
if (cleanup_done)
{
DBUG_PRINT("quit",("signal_handler: calling my_thread_end()"));
@@ -3612,7 +3275,6 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
DBUG_PRINT("info",("Got signal: %d abort_loop: %d",sig,abort_loop));
if (!abort_loop)
{
- abort_loop=1; // mark abort for threads
/* Delete the instrumentation for the signal thread */
PSI_CALL_delete_current_thread();
#ifdef USE_ONE_SIGNAL_HAND
@@ -3624,12 +3286,19 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
sql_print_error("Can't create thread to kill server (errno= %d)",
error);
#else
- kill_server((void*) sig); // MIT THREAD has a alarm thread
+ my_sigset(sig, SIG_IGN);
+ break_connect_loop(); // MIT THREAD has a alarm thread
#endif
}
break;
case SIGHUP:
+#if defined(SI_KERNEL)
+ if (!abort_loop && origin != SI_KERNEL)
+#elif defined(SI_USER)
+ if (!abort_loop && origin <= SI_USER)
+#else
if (!abort_loop)
+#endif
{
int not_used;
mysql_print_status(); // Print some debug info
@@ -3638,19 +3307,14 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
REFRESH_GRANT |
REFRESH_THREADS | REFRESH_HOSTS),
(TABLE_LIST*) 0, &not_used); // Flush logs
- }
- /* reenable logs after the options were reloaded */
- if (log_output_options & LOG_NONE)
- {
- logger.set_handlers(global_system_variables.sql_log_slow ?
- LOG_TABLE : LOG_NONE,
- opt_log ? LOG_TABLE : LOG_NONE);
- }
- else
- {
- logger.set_handlers(global_system_variables.sql_log_slow ?
- log_output_options : LOG_NONE,
- opt_log ? log_output_options : LOG_NONE);
+
+ /* reenable logs after the options were reloaded */
+ ulonglong fixed_log_output_options=
+ log_output_options & LOG_NONE ? LOG_TABLE : log_output_options;
+
+ logger.set_handlers(global_system_variables.sql_log_slow
+ ? fixed_log_output_options : LOG_NONE,
+ opt_log ? fixed_log_output_options : LOG_NONE);
}
break;
#ifdef USE_ONE_SIGNAL_HAND
@@ -3684,7 +3348,7 @@ extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
void my_message_sql(uint error, const char *str, myf MyFlags)
{
- THD *thd= current_thd;
+ THD *thd= MyFlags & ME_ERROR_LOG_ONLY ? NULL : current_thd;
Sql_condition::enum_warning_level level;
sql_print_message_func func;
DBUG_ENTER("my_message_sql");
@@ -3693,13 +3357,15 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
DBUG_ASSERT(str != NULL);
DBUG_ASSERT(error != 0);
+ DBUG_ASSERT((MyFlags & ~(ME_BELL | ME_ERROR_LOG | ME_ERROR_LOG_ONLY |
+ ME_NOTE | ME_WARNING | ME_FATAL)) == 0);
- if (MyFlags & ME_JUST_INFO)
+ if (MyFlags & ME_NOTE)
{
level= Sql_condition::WARN_LEVEL_NOTE;
func= sql_print_information;
}
- else if (MyFlags & ME_JUST_WARNING)
+ else if (MyFlags & ME_WARNING)
{
level= Sql_condition::WARN_LEVEL_WARN;
func= sql_print_warning;
@@ -3712,7 +3378,7 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
if (likely(thd))
{
- if (unlikely(MyFlags & ME_FATALERROR))
+ if (unlikely(MyFlags & ME_FATAL))
thd->is_fatal_error= 1;
(void) thd->raise_condition(error, NULL, level, str);
}
@@ -3722,7 +3388,7 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
/* When simulating OOM, skip writing to error log to avoid mtr errors */
DBUG_EXECUTE_IF("simulate_out_of_memory", DBUG_VOID_RETURN;);
- if (unlikely(!thd) || thd->log_all_errors || (MyFlags & ME_NOREFRESH))
+ if (unlikely(!thd) || thd->log_all_errors || (MyFlags & ME_ERROR_LOG))
(*func)("%s: %s", my_progname_short, str); /* purecov: inspected */
DBUG_VOID_RETURN;
}
@@ -3736,23 +3402,6 @@ void *my_str_malloc_mysqld(size_t size)
}
-#ifdef __WIN__
-
-pthread_handler_t handle_shutdown(void *arg)
-{
- MSG msg;
- my_thread_init();
-
- /* this call should create the message queue for this thread */
- PeekMessage(&msg, NULL, 1, 65534,PM_NOREMOVE);
-#if !defined(EMBEDDED_LIBRARY)
- if (WaitForSingleObject(hEventShutdown,INFINITE)==WAIT_OBJECT_0)
-#endif /* EMBEDDED_LIBRARY */
- kill_server(MYSQL_KILL_SIGNAL);
- return 0;
-}
-#endif
-
#include <mysqld_default_groups.h>
#if defined(__WIN__) && !defined(EMBEDDED_LIBRARY)
@@ -3860,6 +3509,8 @@ SHOW_VAR com_status_vars[]= {
{"alter_user", STMT_STATUS(SQLCOM_ALTER_USER)},
{"analyze", STMT_STATUS(SQLCOM_ANALYZE)},
{"assign_to_keycache", STMT_STATUS(SQLCOM_ASSIGN_TO_KEYCACHE)},
+ {"backup", STMT_STATUS(SQLCOM_BACKUP)},
+ {"backup_lock", STMT_STATUS(SQLCOM_BACKUP_LOCK)},
{"begin", STMT_STATUS(SQLCOM_BEGIN)},
{"binlog", STMT_STATUS(SQLCOM_BINLOG_BASE64_EVENT)},
{"call_procedure", STMT_STATUS(SQLCOM_CALL)},
@@ -4160,8 +3811,27 @@ static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific)
else
update_global_memory_status(size);
}
+
+int json_escape_string(const char *str,const char *str_end,
+ char *json, char *json_end)
+{
+ return json_escape(system_charset_info,
+ (const uchar *) str, (const uchar *) str_end,
+ &my_charset_utf8mb4_bin,
+ (uchar *) json, (uchar *) json_end);
+}
+
+
+int json_unescape_json(const char *json_str, const char *json_end,
+ char *res, char *res_end)
+{
+ return json_unescape(&my_charset_utf8mb4_bin,
+ (const uchar *) json_str, (const uchar *) json_end,
+ system_charset_info, (uchar *) res, (uchar *) res_end);
}
+} /*extern "C"*/
+
/**
Create a replication file name or base for file names.
@@ -4858,11 +4528,10 @@ static int init_common_variables()
static int init_thread_environment()
{
DBUG_ENTER("init_thread_environment");
- mysql_mutex_init(key_LOCK_thread_count, &LOCK_thread_count, MY_MUTEX_INIT_FAST);
+ server_threads.init();
mysql_mutex_init(key_LOCK_thread_cache, &LOCK_thread_cache, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_start_thread, &LOCK_start_thread, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_status, &LOCK_status, MY_MUTEX_INIT_FAST);
- mysql_mutex_init(key_LOCK_show_status, &LOCK_show_status, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_LOCK_delayed_insert,
&LOCK_delayed_insert, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_delayed_status,
@@ -4875,7 +4544,6 @@ static int init_thread_environment()
mysql_mutex_init(key_LOCK_global_system_variables,
&LOCK_global_system_variables, MY_MUTEX_INIT_FAST);
mysql_mutex_record_order(&LOCK_active_mi, &LOCK_global_system_variables);
- mysql_mutex_record_order(&LOCK_status, &LOCK_thread_count);
mysql_prlock_init(key_rwlock_LOCK_system_variables_hash,
&LOCK_system_variables_hash);
mysql_mutex_init(key_LOCK_prepared_stmt_count,
@@ -4906,7 +4574,7 @@ static int init_thread_environment()
#ifdef HAVE_OPENSSL
mysql_mutex_init(key_LOCK_des_key_file,
&LOCK_des_key_file, MY_MUTEX_INIT_FAST);
-#ifdef HAVE_OPENSSL10
+#if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL)
openssl_stdlocks= (openssl_lock_t*) OPENSSL_malloc(CRYPTO_num_locks() *
sizeof(openssl_lock_t));
for (int i= 0; i < CRYPTO_num_locks(); ++i)
@@ -4919,8 +4587,9 @@ static int init_thread_environment()
#endif /* HAVE_OPENSSL */
mysql_rwlock_init(key_rwlock_LOCK_sys_init_connect, &LOCK_sys_init_connect);
mysql_rwlock_init(key_rwlock_LOCK_sys_init_slave, &LOCK_sys_init_slave);
+ mysql_rwlock_init(key_rwlock_LOCK_ssl_refresh, &LOCK_ssl_refresh);
mysql_rwlock_init(key_rwlock_LOCK_grant, &LOCK_grant);
- mysql_cond_init(key_COND_thread_count, &COND_thread_count, NULL);
+ mysql_rwlock_init(key_rwlock_LOCK_all_status_vars, &LOCK_all_status_vars);
mysql_cond_init(key_COND_thread_cache, &COND_thread_cache, NULL);
mysql_cond_init(key_COND_start_thread, &COND_start_thread, NULL);
mysql_cond_init(key_COND_flush_thread_cache, &COND_flush_thread_cache, NULL);
@@ -4950,7 +4619,7 @@ static int init_thread_environment()
}
-#ifdef HAVE_OPENSSL10
+#if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL)
static openssl_lock_t *openssl_dynlock_create(const char *file, int line)
{
openssl_lock_t *lock= new openssl_lock_t;
@@ -5012,6 +4681,60 @@ static void openssl_lock(int mode, openssl_lock_t *lock, const char *file,
}
#endif /* HAVE_OPENSSL10 */
+
+struct SSL_ACCEPTOR_STATS
+{
+ long accept;
+ long accept_good;
+ long cache_size;
+ long verify_mode;
+ long verify_depth;
+ long zero;
+ const char *session_cache_mode;
+
+ SSL_ACCEPTOR_STATS():
+ accept(),accept_good(),cache_size(),verify_mode(),verify_depth(),zero(),
+ session_cache_mode("NONE")
+ {
+ }
+
+ void init()
+ {
+ DBUG_ASSERT(ssl_acceptor_fd !=0 && ssl_acceptor_fd->ssl_context != 0);
+ SSL_CTX *ctx= ssl_acceptor_fd->ssl_context;
+ accept= 0;
+ accept_good= 0;
+ verify_mode= SSL_CTX_get_verify_mode(ctx);
+ verify_depth= SSL_CTX_get_verify_depth(ctx);
+ cache_size= SSL_CTX_sess_get_cache_size(ctx);
+ switch (SSL_CTX_get_session_cache_mode(ctx))
+ {
+ case SSL_SESS_CACHE_OFF:
+ session_cache_mode= "OFF"; break;
+ case SSL_SESS_CACHE_CLIENT:
+ session_cache_mode= "CLIENT"; break;
+ case SSL_SESS_CACHE_SERVER:
+ session_cache_mode= "SERVER"; break;
+ case SSL_SESS_CACHE_BOTH:
+ session_cache_mode= "BOTH"; break;
+ case SSL_SESS_CACHE_NO_AUTO_CLEAR:
+ session_cache_mode= "NO_AUTO_CLEAR"; break;
+ case SSL_SESS_CACHE_NO_INTERNAL_LOOKUP:
+ session_cache_mode= "NO_INTERNAL_LOOKUP"; break;
+ default:
+ session_cache_mode= "Unknown"; break;
+ }
+ }
+};
+
+static SSL_ACCEPTOR_STATS ssl_acceptor_stats;
+void ssl_acceptor_stats_update(int sslaccept_ret)
+{
+ statistic_increment(ssl_acceptor_stats.accept, &LOCK_status);
+ if (!sslaccept_ret)
+ statistic_increment(ssl_acceptor_stats.accept_good,&LOCK_status);
+}
+
static void init_ssl()
{
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
@@ -5023,7 +4746,8 @@ static void init_ssl()
ssl_acceptor_fd= new_VioSSLAcceptorFd(opt_ssl_key, opt_ssl_cert,
opt_ssl_ca, opt_ssl_capath,
opt_ssl_cipher, &error,
- opt_ssl_crl, opt_ssl_crlpath);
+ opt_ssl_crl, opt_ssl_crlpath,
+ tls_version);
DBUG_PRINT("info",("ssl_acceptor_fd: %p", ssl_acceptor_fd));
if (!ssl_acceptor_fd)
{
@@ -5032,11 +4756,18 @@ static void init_ssl()
opt_use_ssl = 0;
have_ssl= SHOW_OPTION_DISABLED;
}
+ else
+ ssl_acceptor_stats.init();
+
if (global_system_variables.log_warnings > 0)
{
ulong err;
while ((err= ERR_get_error()))
- sql_print_warning("SSL error: %s", ERR_error_string(err, NULL));
+ {
+ char buf[256];
+ ERR_error_string_n(err, buf, sizeof(buf));
+ sql_print_warning("SSL error: %s",buf);
+ }
}
else
ERR_remove_state(0);
@@ -5050,6 +4781,33 @@ static void init_ssl()
#endif /* HAVE_OPENSSL && ! EMBEDDED_LIBRARY */
}
+/* Reinitialize SSL (FLUSH SSL) */
+int reinit_ssl()
+{
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+ if (!opt_use_ssl)
+ return 0;
+
+ enum enum_ssl_init_error error = SSL_INITERR_NOERROR;
+ st_VioSSLFd *new_fd = new_VioSSLAcceptorFd(opt_ssl_key, opt_ssl_cert,
+ opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher, &error, opt_ssl_crl,
+ opt_ssl_crlpath, tls_version);
+
+ if (!new_fd)
+ {
+ my_printf_error(ER_UNKNOWN_ERROR, "Failed to refresh SSL, error: %s", MYF(0),
+ sslGetErrString(error));
+ ERR_clear_error();
+ return 1;
+ }
+ mysql_rwlock_wrlock(&LOCK_ssl_refresh);
+ free_vio_ssl_acceptor_fd(ssl_acceptor_fd);
+ ssl_acceptor_fd= new_fd;
+ ssl_acceptor_stats.init();
+ mysql_rwlock_unlock(&LOCK_ssl_refresh);
+#endif
+ return 0;
+}
static void end_ssl()
{
@@ -5126,7 +4884,6 @@ static int init_default_storage_engine_impl(const char *opt_name,
return 0;
}
-
static int
init_gtid_pos_auto_engines(void)
{
@@ -5153,7 +4910,6 @@ init_gtid_pos_auto_engines(void)
return 0;
}
-
static int init_server_components()
{
DBUG_ENTER("init_server_components");
@@ -5181,6 +4937,7 @@ static int init_server_components()
my_rnd_init(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
setup_fpu();
init_thr_lock();
+ backup_init();
#ifndef EMBEDDED_LIBRARY
if (init_thr_timer(thread_scheduler->max_threads + extra_max_connections))
@@ -5191,9 +4948,6 @@ static int init_server_components()
#endif
my_uuid_init((ulong) (my_rnd(&sql_rand))*12345,12345);
-#ifdef HAVE_REPLICATION
- init_slave_list();
-#endif
wt_init();
/* Setup logs */
@@ -5378,7 +5132,10 @@ static int init_server_components()
wsrep_thr_init();
#endif
- if (WSREP_ON && !wsrep_recovery && !opt_abort) /* WSREP BEFORE SE */
+#ifdef WITH_WSREP
+ if (wsrep_init_server()) unireg_abort(1);
+
+ if (WSREP_ON && !wsrep_recovery && !opt_abort)
{
if (opt_bootstrap) // bootsrap option given - disable wsrep functionality
{
@@ -5411,6 +5168,7 @@ static int init_server_components()
}
}
}
+#endif /* WITH_WSREP */
if (!opt_help && opt_bin_log)
{
@@ -5648,6 +5406,9 @@ static int init_server_components()
unireg_abort(1);
}
+#ifndef EMBEDDED_LIBRARY
+ start_handle_manager();
+#endif
if (opt_bin_log)
{
int error;
@@ -5715,100 +5476,17 @@ static int init_server_components()
#ifndef EMBEDDED_LIBRARY
-
-static void create_shutdown_thread()
+#ifdef _WIN32
+static void create_shutdown_event()
{
-#ifdef __WIN__
hEventShutdown=CreateEvent(0, FALSE, FALSE, shutdown_event_name);
- pthread_t hThread;
- int error;
- if (unlikely((error= mysql_thread_create(key_thread_handle_shutdown,
- &hThread, &connection_attrib,
- handle_shutdown, 0))))
- sql_print_warning("Can't create thread to handle shutdown requests"
- " (errno= %d)", error);
-
// On "Stop Service" we have to do regular shutdown
Service.SetShutdownEvent(hEventShutdown);
-#endif /* __WIN__ */
}
-
-#endif /* EMBEDDED_LIBRARY */
-
-#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY)
-static void handle_connections_methods()
-{
- pthread_t hThread;
- int error;
- DBUG_ENTER("handle_connections_methods");
- if (hPipe == INVALID_HANDLE_VALUE &&
- (!have_tcpip || opt_disable_networking) &&
- !opt_enable_shared_memory)
- {
- sql_print_error("TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS");
- unireg_abort(1); // Will not return
- }
-
- mysql_mutex_lock(&LOCK_start_thread);
- mysql_cond_init(key_COND_handler_count, &COND_handler_count, NULL);
- handler_count=0;
- if (hPipe != INVALID_HANDLE_VALUE)
- {
- handler_count++;
- if ((error= mysql_thread_create(key_thread_handle_con_namedpipes,
- &hThread, &connection_attrib,
- handle_connections_namedpipes, 0)))
- {
- sql_print_warning("Can't create thread to handle named pipes"
- " (errno= %d)", error);
- handler_count--;
- }
- }
- if (have_tcpip && !opt_disable_networking)
- {
- handler_count++;
- if ((error= mysql_thread_create(key_thread_handle_con_sockets,
- &hThread, &connection_attrib,
- handle_connections_sockets_thread, 0)))
- {
- sql_print_warning("Can't create thread to handle TCP/IP",
- " (errno= %d)", error);
- handler_count--;
- }
- }
-#ifdef HAVE_SMEM
- if (opt_enable_shared_memory)
- {
- handler_count++;
- if ((error= mysql_thread_create(key_thread_handle_con_sharedmem,
- &hThread, &connection_attrib,
- handle_connections_shared_memory, 0)))
- {
- sql_print_warning("Can't create thread to handle shared memory",
- " (errno= %d)", error);
- handler_count--;
- }
- }
+#else /*_WIN32*/
+#define create_shutdown_event()
#endif
-
- while (handler_count > 0)
- mysql_cond_wait(&COND_handler_count, &LOCK_start_thread);
- mysql_mutex_unlock(&LOCK_start_thread);
- DBUG_VOID_RETURN;
-}
-
-void decrement_handler_count()
-{
- mysql_mutex_lock(&LOCK_start_thread);
- if (--handler_count == 0)
- mysql_cond_signal(&COND_handler_count);
- mysql_mutex_unlock(&LOCK_start_thread);
- my_thread_end();
-}
-#else
-#define decrement_handler_count()
-#endif /* defined(_WIN32) || defined(HAVE_SMEM) */
-
+#endif /* EMBEDDED_LIBRARY */
#ifndef EMBEDDED_LIBRARY
@@ -5988,7 +5666,7 @@ int mysqld_main(int argc, char **argv)
}
#endif /* HAVE_PSI_INTERFACE */
- init_error_log_mutex();
+ mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, MY_MUTEX_INIT_FAST);
/* Initialize audit interface globals. Audit plugins are inited later. */
mysql_audit_initialize();
@@ -6076,8 +5754,8 @@ int mysqld_main(int argc, char **argv)
}
#ifdef WITH_WSREP
- if (WSREP_ON && wsrep_check_opts())
- global_system_variables.wsrep_on= 0;
+ wsrep_set_wsrep_on();
+ if (WSREP_ON && wsrep_check_opts()) unireg_abort(1);
#endif
/*
@@ -6094,17 +5772,11 @@ int mysqld_main(int argc, char **argv)
init_ssl();
network_init();
-#ifdef __WIN__
+#ifdef _WIN32
if (!opt_console)
{
FreeConsole(); // Remove window
}
-
- if (fileno(stdin) >= 0)
- {
- /* Disable CRLF translation (MDEV-9409). */
- _setmode(fileno(stdin), O_BINARY);
- }
#endif
#ifdef WITH_WSREP
@@ -6128,18 +5800,7 @@ int mysqld_main(int argc, char **argv)
if (mysql_rm_tmp_tables() || acl_init(opt_noacl) ||
my_tz_init((THD *)0, default_tz_name, opt_bootstrap))
- {
- abort_loop=1;
- select_thread_in_use=0;
-
- (void) pthread_kill(signal_thread, MYSQL_KILL_SIGNAL);
-
- delete_pid_file(MYF(MY_WME));
-
- if (mysql_socket_getfd(unix_sock) != INVALID_SOCKET)
- unlink(mysqld_unix_port);
- exit(1);
- }
+ unireg_abort(1);
if (!opt_noacl)
(void) grant_init();
@@ -6178,36 +5839,27 @@ int mysqld_main(int argc, char **argv)
}
else
{
- wsrep_SE_initialized();
-
- if (wsrep_before_SE())
- {
- /*! in case of no SST wsrep waits in view handler callback */
- wsrep_SE_init_grab();
- wsrep_SE_init_done();
- /*! in case of SST wsrep waits for wsrep->sst_received */
- if (wsrep_sst_continue())
- {
- WSREP_ERROR("Failed to signal the wsrep provider to continue.");
- }
- }
- else
+ wsrep_init_globals();
+ if (!wsrep_before_SE())
{
wsrep_init_startup (false);
}
- WSREP_DEBUG("Startup creating %ld applier threads running %lu",
- wsrep_slave_threads - 1, wsrep_running_applier_threads);
- wsrep_create_appliers(wsrep_slave_threads - 1);
+ if (wsrep_cluster_address_exists())
+ {
+ WSREP_DEBUG("Startup creating %ld applier threads running %lu",
+ wsrep_slave_threads - 1, wsrep_running_applier_threads);
+ wsrep_create_appliers(wsrep_slave_threads - 1);
+ }
}
}
if (opt_bootstrap)
{
select_thread_in_use= 0; // Allow 'kill' to work
- bootstrap(mysql_stdin);
- if (!kill_in_progress)
- unireg_abort(bootstrap_error ? 1 : 0);
+ int bootstrap_error= bootstrap(mysql_stdin);
+ if (!abort_loop)
+ unireg_abort(bootstrap_error);
else
{
sleep(2); // Wait for kill
@@ -6215,8 +5867,7 @@ int mysqld_main(int argc, char **argv)
}
}
- create_shutdown_thread();
- start_handle_manager();
+ create_shutdown_event();
/* Copy default global rpl_filter to global_rpl_filter */
copy_filter_setting(global_rpl_filter, get_or_create_rpl_filter("", 0));
@@ -6276,7 +5927,7 @@ int mysqld_main(int argc, char **argv)
/* Signal threads waiting for server to be started */
mysql_mutex_lock(&LOCK_server_started);
mysqld_server_started= 1;
- mysql_cond_signal(&COND_server_started);
+ mysql_cond_broadcast(&COND_server_started);
mysql_mutex_unlock(&LOCK_server_started);
MYSQL_SET_STAGE(0 ,__FILE__, __LINE__);
@@ -6284,22 +5935,40 @@ int mysqld_main(int argc, char **argv)
/* Memory used when everything is setup */
start_memory_used= global_status_var.global_memory_used;
-#if defined(_WIN32) || defined(HAVE_SMEM)
- handle_connections_methods();
+#ifdef _WIN32
+ handle_connections_win();
#else
handle_connections_sockets();
-#endif /* _WIN32 || HAVE_SMEM */
-
- /* (void) pthread_attr_destroy(&connection_attrib); */
-
- DBUG_PRINT("quit",("Exiting main thread"));
-#ifndef __WIN__
mysql_mutex_lock(&LOCK_start_thread);
- select_thread_in_use=0; // For close_connections
+ select_thread_in_use=0;
mysql_cond_broadcast(&COND_start_thread);
mysql_mutex_unlock(&LOCK_start_thread);
-#endif /* __WIN__ */
+#endif /* _WIN32 */
+
+ /* Shutdown requested */
+ char *user= shutdown_user.load(std::memory_order_relaxed);
+ sql_print_information(ER_DEFAULT(ER_NORMAL_SHUTDOWN), my_progname,
+ user ? user : "unknown");
+ if (user)
+ my_free(user);
+
+#ifdef WITH_WSREP
+ /* Stop wsrep threads in case they are running. */
+ if (wsrep_running_threads > 0)
+ {
+ wsrep_shutdown_replication();
+ }
+#endif
+
+ close_connections();
+
+ clean_up(1);
+ sd_notify(0, "STATUS=MariaDB server is down");
+
+ /* (void) pthread_attr_destroy(&connection_attrib); */
+
+ DBUG_PRINT("quit",("Exiting main thread"));
/*
Disable the main thread instrumentation,
@@ -6307,12 +5976,6 @@ int mysqld_main(int argc, char **argv)
*/
PSI_CALL_delete_current_thread();
- /* Wait until cleanup is done */
- mysql_mutex_lock(&LOCK_thread_count);
- while (!ready_to_exit)
- mysql_cond_wait(&COND_thread_count, &LOCK_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
-
#if defined(__WIN__) && !defined(EMBEDDED_LIBRARY)
if (start_mode)
Service.Stop();
@@ -6323,7 +5986,7 @@ int mysqld_main(int argc, char **argv)
CloseHandle(hEventShutdown);
}
#endif
-#if (defined(HAVE_OPENSSL) && !defined(HAVE_YASSL)) && !defined(EMBEDDED_LIBRARY)
+#if (defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY))
ERR_remove_state(0);
#endif
mysqld_exit(0);
@@ -6545,54 +6208,6 @@ int mysqld_main(int argc, char **argv)
#endif
-/**
- Execute all commands from a file. Used by the mysql_install_db script to
- create MySQL privilege tables without having to start a full MySQL server
- and by read_init_file() if mysqld was started with the option --init-file.
-*/
-
-static void bootstrap(MYSQL_FILE *file)
-{
- DBUG_ENTER("bootstrap");
-
- THD *thd= new THD(next_thread_id());
-#ifdef WITH_WSREP
- thd->variables.wsrep_on= 0;
-#endif
- thd->bootstrap=1;
- my_net_init(&thd->net,(st_vio*) 0, thd, MYF(0));
- thd->max_client_packet_length= thd->net.max_packet;
- thd->security_ctx->master_access= ~(ulong)0;
- in_bootstrap= TRUE;
-
- bootstrap_file=file;
-#ifndef EMBEDDED_LIBRARY // TODO: Enable this
- int error;
- if ((error= mysql_thread_create(key_thread_bootstrap,
- &thd->real_id, &connection_attrib,
- handle_bootstrap,
- (void*) thd)))
- {
- sql_print_warning("Can't create thread to handle bootstrap (errno= %d)",
- error);
- bootstrap_error=-1;
- delete thd;
- DBUG_VOID_RETURN;
- }
- /* Wait for thread to die */
- mysql_mutex_lock(&LOCK_thread_count);
- while (in_bootstrap)
- mysql_cond_wait(&COND_thread_count, &LOCK_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
-#else
- thd->mysql= 0;
- do_handle_bootstrap(thd);
-#endif
-
- DBUG_VOID_RETURN;
-}
-
-
static bool read_init_file(char *file_name)
{
MYSQL_FILE *file;
@@ -6697,7 +6312,7 @@ void create_thread_to_handle_connection(CONNECT *connect)
@param[in,out] thd Thread handle of future thread.
*/
-static void create_new_thread(CONNECT *connect)
+void create_new_thread(CONNECT *connect)
{
DBUG_ENTER("create_new_thread");
@@ -6742,29 +6357,101 @@ static void create_new_thread(CONNECT *connect)
#endif /* EMBEDDED_LIBRARY */
-#ifdef SIGNALS_DONT_BREAK_READ
-inline void kill_broken_server()
+ /* Handle new connections and spawn new process to handle them */
+
+#ifndef EMBEDDED_LIBRARY
+
+void handle_accepted_socket(MYSQL_SOCKET new_sock, MYSQL_SOCKET sock)
{
- /* hack to get around signals ignored in syscalls for problem OS's */
- if (mysql_socket_getfd(unix_sock) == INVALID_SOCKET ||
- (!opt_disable_networking &&
- mysql_socket_getfd(base_ip_sock) == INVALID_SOCKET))
+ CONNECT *connect;
+ bool is_unix_sock;
+
+#ifdef FD_CLOEXEC
+ (void) fcntl(mysql_socket_getfd(new_sock), F_SETFD, FD_CLOEXEC);
+#endif
+
+#ifdef HAVE_LIBWRAP
{
- select_thread_in_use = 0;
- /* The following call will never return */
- DBUG_PRINT("general", ("killing server because socket is closed"));
- kill_server((void*) MYSQL_KILL_SIGNAL);
+ if (mysql_socket_getfd(sock) == mysql_socket_getfd(base_ip_sock) ||
+ mysql_socket_getfd(sock) == mysql_socket_getfd(extra_ip_sock))
+ {
+ struct request_info req;
+ signal(SIGCHLD, SIG_DFL);
+ request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE,
+ mysql_socket_getfd(new_sock), NULL);
+ my_fromhost(&req);
+ if (!my_hosts_access(&req))
+ {
+ /*
+ This may be stupid but refuse() includes an exit(0)
+ which we surely don't want...
+ clean_exit() - same stupid thing ...
+ */
+ syslog(deny_severity, "refused connect from %s",
+ my_eval_client(&req));
+
+ /*
+ C++ sucks (the gibberish in front just translates the supplied
+ sink function pointer in the req structure from a void (*sink)();
+ to a void(*sink)(int) if you omit the cast, the C++ compiler
+ will cry...
+ */
+ if (req.sink)
+ ((void(*)(int))req.sink)(req.fd);
+
+ (void)mysql_socket_shutdown(new_sock, SHUT_RDWR);
+ (void)mysql_socket_close(new_sock);
+ /*
+ The connection was refused by TCP wrappers.
+ There are no details (by client IP) available to update the
+ host_cache.
+ */
+ statistic_increment(connection_errors_tcpwrap, &LOCK_status);
+ return;
+ }
+ }
}
-}
-#define MAYBE_BROKEN_SYSCALL kill_broken_server();
-#else
-#define MAYBE_BROKEN_SYSCALL
-#endif
+#endif /* HAVE_LIBWRAP */
- /* Handle new connections and spawn new process to handle them */
+ DBUG_PRINT("info", ("Creating CONNECT for new connection"));
-#ifndef EMBEDDED_LIBRARY
+ if ((connect= new CONNECT()))
+ {
+ is_unix_sock= (mysql_socket_getfd(sock) ==
+ mysql_socket_getfd(unix_sock));
+
+ if (!(connect->vio=
+ mysql_socket_vio_new(new_sock,
+ is_unix_sock ? VIO_TYPE_SOCKET :
+ VIO_TYPE_TCPIP,
+ is_unix_sock ? VIO_LOCALHOST : 0)))
+ {
+ delete connect;
+ connect= 0; // Error handling below
+ }
+ }
+ if (!connect)
+ {
+ /* Connect failure */
+ (void)mysql_socket_close(new_sock);
+ statistic_increment(aborted_connects, &LOCK_status);
+ statistic_increment(connection_errors_internal, &LOCK_status);
+ return;
+ }
+
+ if (is_unix_sock)
+ connect->host= my_localhost;
+
+ if (mysql_socket_getfd(sock) == mysql_socket_getfd(extra_ip_sock))
+ {
+ connect->extra_port= 1;
+ connect->scheduler= extra_thread_scheduler;
+ }
+ create_new_thread(connect);
+}
+
+#ifndef _WIN32
void handle_connections_sockets()
{
MYSQL_SOCKET sock= mysql_socket_invalid();
@@ -6812,7 +6499,6 @@ void handle_connections_sockets()
"STATUS=Taking your SQL requests now...\n");
DBUG_PRINT("general",("Waiting for connections."));
- MAYBE_BROKEN_SYSCALL;
while (!abort_loop)
{
#ifdef HAVE_POLL
@@ -6835,15 +6521,11 @@ void handle_connections_sockets()
if (!select_errors++ && !abort_loop) /* purecov: inspected */
sql_print_error("mysqld: Got error %d from select",socket_errno); /* purecov: inspected */
}
- MAYBE_BROKEN_SYSCALL
continue;
}
if (abort_loop)
- {
- MAYBE_BROKEN_SYSCALL;
break;
- }
/* Is this a new connection request ? */
#ifdef HAVE_POLL
@@ -6894,7 +6576,6 @@ void handle_connections_sockets()
if (mysql_socket_getfd(new_sock) != INVALID_SOCKET ||
(socket_errno != SOCKET_EINTR && socket_errno != SOCKET_EAGAIN))
break;
- MAYBE_BROKEN_SYSCALL;
#if !defined(NO_FCNTL_NONBLOCK)
if (!(test_flags & TEST_BLOCKING))
{
@@ -6906,10 +6587,7 @@ void handle_connections_sockets()
}
#endif
}
-#if !defined(NO_FCNTL_NONBLOCK)
- if (!(test_flags & TEST_BLOCKING))
- fcntl(mysql_socket_getfd(sock), F_SETFL, flags);
-#endif
+
if (mysql_socket_getfd(new_sock) == INVALID_SOCKET)
{
/*
@@ -6920,444 +6598,22 @@ void handle_connections_sockets()
statistic_increment(connection_errors_accept, &LOCK_status);
if ((error_count++ & 255) == 0) // This can happen often
sql_perror("Error in accept");
- MAYBE_BROKEN_SYSCALL;
if (socket_errno == SOCKET_ENFILE || socket_errno == SOCKET_EMFILE)
sleep(1); // Give other threads some time
continue;
}
-#ifdef FD_CLOEXEC
- (void) fcntl(mysql_socket_getfd(new_sock), F_SETFD, FD_CLOEXEC);
+#if !defined(NO_FCNTL_NONBLOCK)
+ if (!(test_flags & TEST_BLOCKING))
+ fcntl(mysql_socket_getfd(sock), F_SETFL, flags);
#endif
-
-#ifdef HAVE_LIBWRAP
- {
- if (mysql_socket_getfd(sock) == mysql_socket_getfd(base_ip_sock) ||
- mysql_socket_getfd(sock) == mysql_socket_getfd(extra_ip_sock))
- {
- struct request_info req;
- signal(SIGCHLD, SIG_DFL);
- request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE,
- mysql_socket_getfd(new_sock), NULL);
- my_fromhost(&req);
- if (!my_hosts_access(&req))
- {
- /*
- This may be stupid but refuse() includes an exit(0)
- which we surely don't want...
- clean_exit() - same stupid thing ...
- */
- syslog(deny_severity, "refused connect from %s",
- my_eval_client(&req));
-
- /*
- C++ sucks (the gibberish in front just translates the supplied
- sink function pointer in the req structure from a void (*sink)();
- to a void(*sink)(int) if you omit the cast, the C++ compiler
- will cry...
- */
- if (req.sink)
- ((void (*)(int))req.sink)(req.fd);
-
- (void) mysql_socket_shutdown(new_sock, SHUT_RDWR);
- (void) mysql_socket_close(new_sock);
- /*
- The connection was refused by TCP wrappers.
- There are no details (by client IP) available to update the
- host_cache.
- */
- statistic_increment(connection_errors_tcpwrap, &LOCK_status);
- continue;
- }
- }
- }
-#endif /* HAVE_LIBWRAP */
-
- DBUG_PRINT("info", ("Creating CONNECT for new connection"));
-
- if (CONNECT *connect= new CONNECT())
- {
- const bool is_unix_sock= (mysql_socket_getfd(sock) ==
- mysql_socket_getfd(unix_sock));
-
- if ((connect->vio=
- mysql_socket_vio_new(new_sock,
- is_unix_sock ? VIO_TYPE_SOCKET :
- VIO_TYPE_TCPIP,
- is_unix_sock ? VIO_LOCALHOST: 0)))
- {
- if (is_unix_sock)
- connect->host= my_localhost;
-
- if (mysql_socket_getfd(sock) == mysql_socket_getfd(extra_ip_sock))
- {
- connect->extra_port= 1;
- connect->scheduler= extra_thread_scheduler;
- }
- create_new_thread(connect);
- continue;
- }
-
- delete connect;
- }
-
- /* Connect failure */
- (void) mysql_socket_shutdown(new_sock, SHUT_RDWR);
- (void) mysql_socket_close(new_sock);
- statistic_increment(aborted_connects,&LOCK_status);
- statistic_increment(connection_errors_internal, &LOCK_status);
+ handle_accepted_socket(new_sock, sock);
}
sd_notify(0, "STOPPING=1\n"
"STATUS=Shutdown in progress\n");
DBUG_VOID_RETURN;
}
-
-#ifdef _WIN32
-pthread_handler_t handle_connections_sockets_thread(void *arg)
-{
- my_thread_init();
- handle_connections_sockets();
- decrement_handler_count();
- return 0;
-}
-
-pthread_handler_t handle_connections_namedpipes(void *arg)
-{
- HANDLE hConnectedPipe;
- OVERLAPPED connectOverlapped= {0};
- my_thread_init();
- DBUG_ENTER("handle_connections_namedpipes");
- connectOverlapped.hEvent= CreateEvent(NULL, TRUE, FALSE, NULL);
- if (!connectOverlapped.hEvent)
- {
- sql_print_error("Can't create event, last error=%u", GetLastError());
- unireg_abort(1);
- }
- DBUG_PRINT("general",("Waiting for named pipe connections."));
- while (!abort_loop)
- {
- /* wait for named pipe connection */
- BOOL fConnected= ConnectNamedPipe(hPipe, &connectOverlapped);
- if (!fConnected && (GetLastError() == ERROR_IO_PENDING))
- {
- /*
- ERROR_IO_PENDING says async IO has started but not yet finished.
- GetOverlappedResult will wait for completion.
- */
- DWORD bytes;
- fConnected= GetOverlappedResult(hPipe, &connectOverlapped,&bytes, TRUE);
- }
- if (abort_loop)
- break;
- if (!fConnected)
- fConnected = GetLastError() == ERROR_PIPE_CONNECTED;
- if (!fConnected)
- {
- CloseHandle(hPipe);
- if ((hPipe= CreateNamedPipe(pipe_name,
- PIPE_ACCESS_DUPLEX |
- FILE_FLAG_OVERLAPPED,
- PIPE_TYPE_BYTE |
- PIPE_READMODE_BYTE |
- PIPE_WAIT,
- PIPE_UNLIMITED_INSTANCES,
- (int) global_system_variables.
- net_buffer_length,
- (int) global_system_variables.
- net_buffer_length,
- NMPWAIT_USE_DEFAULT_WAIT,
- &saPipeSecurity)) ==
- INVALID_HANDLE_VALUE)
- {
- sql_perror("Can't create new named pipe!");
- break; // Abort
- }
- }
- hConnectedPipe = hPipe;
- /* create new pipe for new connection */
- if ((hPipe = CreateNamedPipe(pipe_name,
- PIPE_ACCESS_DUPLEX |
- FILE_FLAG_OVERLAPPED,
- PIPE_TYPE_BYTE |
- PIPE_READMODE_BYTE |
- PIPE_WAIT,
- PIPE_UNLIMITED_INSTANCES,
- (int) global_system_variables.net_buffer_length,
- (int) global_system_variables.net_buffer_length,
- NMPWAIT_USE_DEFAULT_WAIT,
- &saPipeSecurity)) ==
- INVALID_HANDLE_VALUE)
- {
- sql_perror("Can't create new named pipe!");
- hPipe=hConnectedPipe;
- continue; // We have to try again
- }
- CONNECT *connect;
- if (!(connect= new CONNECT) ||
- !(connect->vio= vio_new_win32pipe(hConnectedPipe)))
- {
- DisconnectNamedPipe(hConnectedPipe);
- CloseHandle(hConnectedPipe);
- delete connect;
- statistic_increment(aborted_connects,&LOCK_status);
- statistic_increment(connection_errors_internal, &LOCK_status);
- continue;
- }
- connect->host= my_localhost;
- create_new_thread(connect);
- }
- LocalFree(saPipeSecurity.lpSecurityDescriptor);
- CloseHandle(connectOverlapped.hEvent);
- DBUG_LEAVE;
- decrement_handler_count();
- return 0;
-}
-#endif /* _WIN32 */
-
-
-#ifdef HAVE_SMEM
-
-/**
- Thread of shared memory's service.
-
- @param arg Arguments of thread
-*/
-pthread_handler_t handle_connections_shared_memory(void *arg)
-{
- /* file-mapping object, use for create shared memory */
- HANDLE handle_connect_file_map= 0;
- char *handle_connect_map= 0; // pointer on shared memory
- HANDLE event_connect_answer= 0;
- ulong smem_buffer_length= shared_memory_buffer_length + 4;
- ulong connect_number= 1;
- char *tmp= NULL;
- char *suffix_pos;
- char connect_number_char[22], *p;
- const char *errmsg= 0;
- SECURITY_ATTRIBUTES *sa_event= 0, *sa_mapping= 0;
- my_thread_init();
- DBUG_ENTER("handle_connections_shared_memorys");
- DBUG_PRINT("general",("Waiting for allocated shared memory."));
-
- /*
- get enough space base-name + '_' + longest suffix we might ever send
- */
- if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L,
- MYF(MY_FAE))))
- goto error;
-
- if (my_security_attr_create(&sa_event, &errmsg,
- GENERIC_ALL, SYNCHRONIZE | EVENT_MODIFY_STATE))
- goto error;
-
- if (my_security_attr_create(&sa_mapping, &errmsg,
- GENERIC_ALL, FILE_MAP_READ | FILE_MAP_WRITE))
- goto error;
-
- /*
- The name of event and file-mapping events create agree next rule:
- shared_memory_base_name+unique_part
- Where:
- shared_memory_base_name is unique value for each server
- unique_part is unique value for each object (events and file-mapping)
- */
- suffix_pos= strxmov(tmp,shared_memory_base_name,"_",NullS);
- strmov(suffix_pos, "CONNECT_REQUEST");
- if ((smem_event_connect_request= CreateEvent(sa_event,
- FALSE, FALSE, tmp)) == 0)
- {
- errmsg= "Could not create request event";
- goto error;
- }
- strmov(suffix_pos, "CONNECT_ANSWER");
- if ((event_connect_answer= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0)
- {
- errmsg="Could not create answer event";
- goto error;
- }
- strmov(suffix_pos, "CONNECT_DATA");
- if ((handle_connect_file_map=
- CreateFileMapping(INVALID_HANDLE_VALUE, sa_mapping,
- PAGE_READWRITE, 0, sizeof(connect_number), tmp)) == 0)
- {
- errmsg= "Could not create file mapping";
- goto error;
- }
- if ((handle_connect_map= (char *)MapViewOfFile(handle_connect_file_map,
- FILE_MAP_WRITE,0,0,
- sizeof(DWORD))) == 0)
- {
- errmsg= "Could not create shared memory service";
- goto error;
- }
-
- while (!abort_loop)
- {
- /* Wait a request from client */
- WaitForSingleObject(smem_event_connect_request,INFINITE);
-
- /*
- it can be after shutdown command
- */
- if (abort_loop)
- goto error;
-
- HANDLE handle_client_file_map= 0;
- char *handle_client_map= 0;
- HANDLE event_client_wrote= 0;
- HANDLE event_client_read= 0; // for transfer data server <-> client
- HANDLE event_server_wrote= 0;
- HANDLE event_server_read= 0;
- HANDLE event_conn_closed= 0;
- CONNECT *connect= 0;
-
- p= int10_to_str(connect_number, connect_number_char, 10);
- /*
- The name of event and file-mapping events create agree next rule:
- shared_memory_base_name+unique_part+number_of_connection
- Where:
- shared_memory_base_name is uniquel value for each server
- unique_part is unique value for each object (events and file-mapping)
- number_of_connection is connection-number between server and client
- */
- suffix_pos= strxmov(tmp,shared_memory_base_name,"_",connect_number_char,
- "_",NullS);
- strmov(suffix_pos, "DATA");
- if ((handle_client_file_map=
- CreateFileMapping(INVALID_HANDLE_VALUE, sa_mapping,
- PAGE_READWRITE, 0, smem_buffer_length, tmp)) == 0)
- {
- errmsg= "Could not create file mapping";
- goto errorconn;
- }
- if ((handle_client_map= (char*)MapViewOfFile(handle_client_file_map,
- FILE_MAP_WRITE,0,0,
- smem_buffer_length)) == 0)
- {
- errmsg= "Could not create memory map";
- goto errorconn;
- }
- strmov(suffix_pos, "CLIENT_WROTE");
- if ((event_client_wrote= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0)
- {
- errmsg= "Could not create client write event";
- goto errorconn;
- }
- strmov(suffix_pos, "CLIENT_READ");
- if ((event_client_read= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0)
- {
- errmsg= "Could not create client read event";
- goto errorconn;
- }
- strmov(suffix_pos, "SERVER_READ");
- if ((event_server_read= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0)
- {
- errmsg= "Could not create server read event";
- goto errorconn;
- }
- strmov(suffix_pos, "SERVER_WROTE");
- if ((event_server_wrote= CreateEvent(sa_event,
- FALSE, FALSE, tmp)) == 0)
- {
- errmsg= "Could not create server write event";
- goto errorconn;
- }
- strmov(suffix_pos, "CONNECTION_CLOSED");
- if ((event_conn_closed= CreateEvent(sa_event,
- TRUE, FALSE, tmp)) == 0)
- {
- errmsg= "Could not create closed connection event";
- goto errorconn;
- }
- if (abort_loop)
- goto errorconn;
-
- if (!(connect= new CONNECT))
- {
- errmsg= "Could not create CONNECT object";
- goto errorconn;
- }
-
- /* Send number of connection to client */
- int4store(handle_connect_map, connect_number);
- if (!SetEvent(event_connect_answer))
- {
- errmsg= "Could not send answer event";
- goto errorconn;
- }
- /* Set event that client should receive data */
- if (!SetEvent(event_client_read))
- {
- errmsg= "Could not set client to read mode";
- goto errorconn;
- }
- if (!(connect->vio= vio_new_win32shared_memory(handle_client_file_map,
- handle_client_map,
- event_client_wrote,
- event_client_read,
- event_server_wrote,
- event_server_read,
- event_conn_closed)))
- {
- errmsg= "Could not create VIO object";
- goto errorconn;
- }
- connect->host= my_localhost; /* Host is unknown */
- create_new_thread(connect);
- connect_number++;
- continue;
-
-errorconn:
- /* Could not form connection; Free used handlers/memort and retry */
- if (errmsg)
- {
- char buff[180];
- strxmov(buff, "Can't create shared memory connection: ", errmsg, ".",
- NullS);
- sql_perror(buff);
- }
- if (handle_client_file_map)
- CloseHandle(handle_client_file_map);
- if (handle_client_map)
- UnmapViewOfFile(handle_client_map);
- if (event_server_wrote)
- CloseHandle(event_server_wrote);
- if (event_server_read)
- CloseHandle(event_server_read);
- if (event_client_wrote)
- CloseHandle(event_client_wrote);
- if (event_client_read)
- CloseHandle(event_client_read);
- if (event_conn_closed)
- CloseHandle(event_conn_closed);
-
- delete connect;
- statistic_increment(aborted_connects,&LOCK_status);
- statistic_increment(connection_errors_internal, &LOCK_status);
- }
-
- /* End shared memory handling */
-error:
- if (tmp)
- my_free(tmp);
-
- if (errmsg)
- {
- char buff[180];
- strxmov(buff, "Can't create shared memory service: ", errmsg, ".", NullS);
- sql_perror(buff);
- }
- my_security_attr_free(sa_event);
- my_security_attr_free(sa_mapping);
- if (handle_connect_map) UnmapViewOfFile(handle_connect_map);
- if (handle_connect_file_map) CloseHandle(handle_connect_file_map);
- if (event_connect_answer) CloseHandle(event_connect_answer);
- if (smem_event_connect_request) CloseHandle(smem_event_connect_request);
- DBUG_LEAVE;
- decrement_handler_count();
- return 0;
-}
-#endif /* HAVE_SMEM */
+#endif /* _WIN32*/
#endif /* EMBEDDED_LIBRARY */
@@ -7887,20 +7143,17 @@ struct my_option my_long_options[]=
MYSQL_COMPATIBILITY_OPTION("binlog-order-commits"),
MYSQL_TO_BE_IMPLEMENTED_OPTION("log-throttle-queries-not-using-indexes"),
MYSQL_TO_BE_IMPLEMENTED_OPTION("end-markers-in-json"),
- MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace"), // OPTIMIZER_TRACE
MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-features"), // OPTIMIZER_TRACE
MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-offset"), // OPTIMIZER_TRACE
MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-limit"), // OPTIMIZER_TRACE
- MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-max-mem-size"), // OPTIMIZER_TRACE
MYSQL_COMPATIBILITY_OPTION("server-id-bits"),
MYSQL_TO_BE_IMPLEMENTED_OPTION("slave-rows-search-algorithms"), // HAVE_REPLICATION
MYSQL_TO_BE_IMPLEMENTED_OPTION("slave-allow-batching"), // HAVE_REPLICATION
MYSQL_COMPATIBILITY_OPTION("slave-checkpoint-period"), // HAVE_REPLICATION
MYSQL_COMPATIBILITY_OPTION("slave-checkpoint-group"), // HAVE_REPLICATION
MYSQL_SUGGEST_ANALOG_OPTION("slave-pending-jobs-size-max", "--slave-parallel-max-queued"), // HAVE_REPLICATION
- MYSQL_TO_BE_IMPLEMENTED_OPTION("disconnect-on-expired-password"),
- MYSQL_TO_BE_IMPLEMENTED_OPTION("sha256-password-private-key-path"), // HAVE_OPENSSL && !HAVE_YASSL
- MYSQL_TO_BE_IMPLEMENTED_OPTION("sha256-password-public-key-path"), // HAVE_OPENSSL && !HAVE_YASSL
+ MYSQL_TO_BE_IMPLEMENTED_OPTION("sha256-password-private-key-path"), // HAVE_OPENSSL
+ MYSQL_TO_BE_IMPLEMENTED_OPTION("sha256-password-public-key-path"), // HAVE_OPENSSL
/* The following options exist in 5.5 and 5.6 but not in 10.0 */
MYSQL_SUGGEST_ANALOG_OPTION("abort-slave-event-count", "--debug-abort-slave-event-count"),
@@ -7986,22 +7239,6 @@ static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff,
}
-/* How many slaves are connected to this master */
-
-static int show_slaves_connected(THD *thd, SHOW_VAR *var, char *buff)
-{
-
- var->type= SHOW_LONGLONG;
- var->value= buff;
- mysql_mutex_lock(&LOCK_slave_list);
-
- *((longlong *)buff)= slave_list.records;
-
- mysql_mutex_unlock(&LOCK_slave_list);
- return 0;
-}
-
-
/* How many masters this slave is connected to */
@@ -8099,187 +7336,6 @@ static int show_flush_commands(THD *thd, SHOW_VAR *var, char *buff,
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
-/* Functions relying on CTX */
-static int show_ssl_ctx_sess_accept(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_accept(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_accept_good(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_accept_good(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_connect_good(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_connect_good(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_accept_renegotiate(THD *thd, SHOW_VAR *var,
- char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_accept_renegotiate(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_connect_renegotiate(THD *thd, SHOW_VAR *var,
- char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_connect_renegotiate(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_cb_hits(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_cb_hits(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_hits(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_hits(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_cache_full(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_cache_full(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_misses(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_misses(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_timeouts(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_timeouts(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_number(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_number(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_connect(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_connect(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_sess_get_cache_size(THD *thd, SHOW_VAR *var,
- char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_sess_get_cache_size(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_get_verify_mode(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- *((long *)buff)= (!ssl_acceptor_fd ? 0 :
- SSL_CTX_get_verify_depth(ssl_acceptor_fd->ssl_context));
- return 0;
-}
-
-static int show_ssl_ctx_get_session_cache_mode(THD *thd, SHOW_VAR *var,
- char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_CHAR;
- if (!ssl_acceptor_fd)
- var->value= const_cast<char*>("NONE");
- else
- switch (SSL_CTX_get_session_cache_mode(ssl_acceptor_fd->ssl_context))
- {
- case SSL_SESS_CACHE_OFF:
- var->value= const_cast<char*>("OFF"); break;
- case SSL_SESS_CACHE_CLIENT:
- var->value= const_cast<char*>("CLIENT"); break;
- case SSL_SESS_CACHE_SERVER:
- var->value= const_cast<char*>("SERVER"); break;
- case SSL_SESS_CACHE_BOTH:
- var->value= const_cast<char*>("BOTH"); break;
- case SSL_SESS_CACHE_NO_AUTO_CLEAR:
- var->value= const_cast<char*>("NO_AUTO_CLEAR"); break;
- case SSL_SESS_CACHE_NO_INTERNAL_LOOKUP:
- var->value= const_cast<char*>("NO_INTERNAL_LOOKUP"); break;
- default:
- var->value= const_cast<char*>("Unknown"); break;
- }
- return 0;
-}
/*
Functions relying on SSL
@@ -8300,18 +7356,6 @@ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff,
return 0;
}
-static int show_ssl_session_reused(THD *thd, SHOW_VAR *var, char *buff,
- enum enum_var_type scope)
-{
- var->type= SHOW_LONG;
- var->value= buff;
- if( thd->vio_ok() && thd->net.vio->ssl_arg )
- *((long *)buff)= (long)SSL_session_reused((SSL*) thd->net.vio->ssl_arg);
- else
- *((long *)buff)= 0;
- return 0;
-}
-
static int show_ssl_get_default_timeout(THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope)
{
@@ -8329,10 +7373,14 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff,
{
var->type= SHOW_LONG;
var->value= buff;
+#ifndef HAVE_WOLFSSL
if( thd->net.vio && thd->net.vio->ssl_arg )
*((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg);
else
*((long *)buff)= 0;
+#else
+ *((long *)buff)= 0;
+#endif
return 0;
}
@@ -8345,6 +7393,7 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff,
*((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg);
else
*((long *)buff)= 0;
+
return 0;
}
@@ -8404,15 +7453,6 @@ DEF_SHOW_FUNC(net_wait_num, SHOW_LONGLONG)
DEF_SHOW_FUNC(avg_net_wait_time, SHOW_LONG)
DEF_SHOW_FUNC(avg_trx_wait_time, SHOW_LONG)
-#ifdef HAVE_YASSL
-
-static char *
-my_asn1_time_to_string(const ASN1_TIME *time, char *buf, size_t len)
-{
- return yaSSL_ASN1_TIME_to_string(time, buf, len);
-}
-
-#else /* openssl */
static char *
my_asn1_time_to_string(const ASN1_TIME *time, char *buf, size_t len)
@@ -8440,8 +7480,6 @@ end:
return res;
}
-#endif
-
/**
Handler function for the 'ssl_get_server_not_before' variable
@@ -8617,6 +7655,16 @@ int show_threadpool_idle_threads(THD *thd, SHOW_VAR *var, char *buff,
*(int *)buff= tp_get_idle_thread_count();
return 0;
}
+
+
+static int show_threadpool_threads(THD *thd, SHOW_VAR *var, char *buff,
+ enum enum_var_type scope)
+{
+ var->type= SHOW_INT;
+ var->value= buff;
+ *(reinterpret_cast<int*>(buff))= tp_get_thread_count();
+ return 0;
+}
#endif
/*
@@ -8626,6 +7674,7 @@ int show_threadpool_idle_threads(THD *thd, SHOW_VAR *var, char *buff,
SHOW_VAR status_vars[]= {
{"Aborted_clients", (char*) &aborted_threads, SHOW_LONG},
{"Aborted_connects", (char*) &aborted_connects, SHOW_LONG},
+ {"Aborted_connects_preauth", (char*) &aborted_connects_preauth, SHOW_LONG},
{"Acl", (char*) acl_statistics, SHOW_ARRAY},
{"Access_denied_errors", (char*) offsetof(STATUS_VAR, access_denied_errors), SHOW_LONG_STATUS},
{"Binlog_bytes_written", (char*) offsetof(STATUS_VAR, binlog_bytes_written), SHOW_LONGLONG_STATUS},
@@ -8672,6 +7721,7 @@ SHOW_VAR status_vars[]= {
{"Feature_locale", (char*) offsetof(STATUS_VAR, feature_locale), SHOW_LONG_STATUS},
{"Feature_subquery", (char*) offsetof(STATUS_VAR, feature_subquery), SHOW_LONG_STATUS},
{"Feature_system_versioning", (char*) offsetof(STATUS_VAR, feature_system_versioning), SHOW_LONG_STATUS},
+ {"Feature_application_time_periods", (char*) offsetof(STATUS_VAR, feature_application_time_periods), SHOW_LONG_STATUS},
{"Feature_timezone", (char*) offsetof(STATUS_VAR, feature_timezone), SHOW_LONG_STATUS},
{"Feature_trigger", (char*) offsetof(STATUS_VAR, feature_trigger), SHOW_LONG_STATUS},
{"Feature_window_functions", (char*) offsetof(STATUS_VAR, feature_window_functions), SHOW_LONG_STATUS},
@@ -8767,9 +7817,9 @@ SHOW_VAR status_vars[]= {
{"Select_range", (char*) offsetof(STATUS_VAR, select_range_count_), SHOW_LONG_STATUS},
{"Select_range_check", (char*) offsetof(STATUS_VAR, select_range_check_count_), SHOW_LONG_STATUS},
{"Select_scan", (char*) offsetof(STATUS_VAR, select_scan_count_), SHOW_LONG_STATUS},
- {"Slave_open_temp_tables", (char*) &slave_open_temp_tables, SHOW_INT},
+ {"Slave_open_temp_tables", (char*) &slave_open_temp_tables, SHOW_ATOMIC_COUNTER_UINT32_T},
#ifdef HAVE_REPLICATION
- {"Slaves_connected", (char*) &show_slaves_connected, SHOW_SIMPLE_FUNC },
+ {"Slaves_connected", (char*) &binlog_dump_thread_count, SHOW_ATOMIC_COUNTER_UINT32_T},
{"Slaves_running", (char*) &show_slaves_running, SHOW_SIMPLE_FUNC },
{"Slave_connections", (char*) offsetof(STATUS_VAR, com_register_slave), SHOW_LONG_STATUS},
{"Slave_heartbeat_period", (char*) &show_heartbeat_period, SHOW_SIMPLE_FUNC},
@@ -8787,28 +7837,28 @@ SHOW_VAR status_vars[]= {
{"Sort_scan", (char*) offsetof(STATUS_VAR, filesort_scan_count_), SHOW_LONG_STATUS},
#ifdef HAVE_OPENSSL
#ifndef EMBEDDED_LIBRARY
- {"Ssl_accept_renegotiates", (char*) &show_ssl_ctx_sess_accept_renegotiate, SHOW_SIMPLE_FUNC},
- {"Ssl_accepts", (char*) &show_ssl_ctx_sess_accept, SHOW_SIMPLE_FUNC},
- {"Ssl_callback_cache_hits", (char*) &show_ssl_ctx_sess_cb_hits, SHOW_SIMPLE_FUNC},
+ {"Ssl_accept_renegotiates", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_accepts", (char*) &ssl_acceptor_stats.accept, SHOW_LONG},
+ {"Ssl_callback_cache_hits", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
{"Ssl_cipher", (char*) &show_ssl_get_cipher, SHOW_SIMPLE_FUNC},
{"Ssl_cipher_list", (char*) &show_ssl_get_cipher_list, SHOW_SIMPLE_FUNC},
- {"Ssl_client_connects", (char*) &show_ssl_ctx_sess_connect, SHOW_SIMPLE_FUNC},
- {"Ssl_connect_renegotiates", (char*) &show_ssl_ctx_sess_connect_renegotiate, SHOW_SIMPLE_FUNC},
- {"Ssl_ctx_verify_depth", (char*) &show_ssl_ctx_get_verify_depth, SHOW_SIMPLE_FUNC},
- {"Ssl_ctx_verify_mode", (char*) &show_ssl_ctx_get_verify_mode, SHOW_SIMPLE_FUNC},
+ {"Ssl_client_connects", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_connect_renegotiates", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_ctx_verify_depth", (char*) &ssl_acceptor_stats.verify_depth, SHOW_LONG},
+ {"Ssl_ctx_verify_mode", (char*) &ssl_acceptor_stats.verify_mode, SHOW_LONG},
{"Ssl_default_timeout", (char*) &show_ssl_get_default_timeout, SHOW_SIMPLE_FUNC},
- {"Ssl_finished_accepts", (char*) &show_ssl_ctx_sess_accept_good, SHOW_SIMPLE_FUNC},
- {"Ssl_finished_connects", (char*) &show_ssl_ctx_sess_connect_good, SHOW_SIMPLE_FUNC},
+ {"Ssl_finished_accepts", (char*) &ssl_acceptor_stats.accept_good, SHOW_LONG},
+ {"Ssl_finished_connects", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
{"Ssl_server_not_after", (char*) &show_ssl_get_server_not_after, SHOW_SIMPLE_FUNC},
{"Ssl_server_not_before", (char*) &show_ssl_get_server_not_before, SHOW_SIMPLE_FUNC},
- {"Ssl_session_cache_hits", (char*) &show_ssl_ctx_sess_hits, SHOW_SIMPLE_FUNC},
- {"Ssl_session_cache_misses", (char*) &show_ssl_ctx_sess_misses, SHOW_SIMPLE_FUNC},
- {"Ssl_session_cache_mode", (char*) &show_ssl_ctx_get_session_cache_mode, SHOW_SIMPLE_FUNC},
- {"Ssl_session_cache_overflows", (char*) &show_ssl_ctx_sess_cache_full, SHOW_SIMPLE_FUNC},
- {"Ssl_session_cache_size", (char*) &show_ssl_ctx_sess_get_cache_size, SHOW_SIMPLE_FUNC},
- {"Ssl_session_cache_timeouts", (char*) &show_ssl_ctx_sess_timeouts, SHOW_SIMPLE_FUNC},
- {"Ssl_sessions_reused", (char*) &show_ssl_session_reused, SHOW_SIMPLE_FUNC},
- {"Ssl_used_session_cache_entries",(char*) &show_ssl_ctx_sess_number, SHOW_SIMPLE_FUNC},
+ {"Ssl_session_cache_hits", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_session_cache_misses", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_session_cache_mode", (char*) &ssl_acceptor_stats.session_cache_mode, SHOW_CHAR_PTR},
+ {"Ssl_session_cache_overflows", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_session_cache_size", (char*) &ssl_acceptor_stats.cache_size, SHOW_LONG},
+ {"Ssl_session_cache_timeouts", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_sessions_reused", (char*) &ssl_acceptor_stats.zero, SHOW_LONG},
+ {"Ssl_used_session_cache_entries",(char*) &ssl_acceptor_stats.zero, SHOW_LONG},
{"Ssl_verify_depth", (char*) &show_ssl_get_verify_depth, SHOW_SIMPLE_FUNC},
{"Ssl_verify_mode", (char*) &show_ssl_get_verify_mode, SHOW_SIMPLE_FUNC},
{"Ssl_version", (char*) &show_ssl_get_version, SHOW_SIMPLE_FUNC},
@@ -8823,7 +7873,7 @@ SHOW_VAR status_vars[]= {
{"Subquery_cache_miss", (char*) &subquery_cache_miss, SHOW_LONG},
{"Table_locks_immediate", (char*) &locks_immediate, SHOW_LONG},
{"Table_locks_waited", (char*) &locks_waited, SHOW_LONG},
- {"Table_open_cache_active_instances", (char*) &tc_active_instances, SHOW_UINT},
+ {"Table_open_cache_active_instances", (char*) &show_tc_active_instances, SHOW_SIMPLE_FUNC},
{"Table_open_cache_hits", (char*) offsetof(STATUS_VAR, table_open_cache_hits), SHOW_LONGLONG_STATUS},
{"Table_open_cache_misses", (char*) offsetof(STATUS_VAR, table_open_cache_misses), SHOW_LONGLONG_STATUS},
{"Table_open_cache_overflows", (char*) offsetof(STATUS_VAR, table_open_cache_overflows), SHOW_LONGLONG_STATUS},
@@ -8834,7 +7884,7 @@ SHOW_VAR status_vars[]= {
#endif
#ifdef HAVE_POOL_OF_THREADS
{"Threadpool_idle_threads", (char *) &show_threadpool_idle_threads, SHOW_SIMPLE_FUNC},
- {"Threadpool_threads", (char *) &tp_stats.num_worker_threads, SHOW_INT},
+ {"Threadpool_threads", (char *) &show_threadpool_threads, SHOW_SIMPLE_FUNC},
#endif
{"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_NOFLUSH},
{"Threads_connected", (char*) &connection_count, SHOW_INT},
@@ -8849,6 +7899,22 @@ SHOW_VAR status_vars[]= {
{"Uptime_since_flush_status",(char*) &show_flushstatustime, SHOW_SIMPLE_FUNC},
#endif
#ifdef WITH_WSREP
+ {"wsrep_connected", (char*) &wsrep_connected, SHOW_BOOL},
+ {"wsrep_ready", (char*) &wsrep_show_ready, SHOW_FUNC},
+ {"wsrep_cluster_state_uuid",(char*) &wsrep_cluster_state_uuid,SHOW_CHAR_PTR},
+ {"wsrep_cluster_conf_id", (char*) &wsrep_cluster_conf_id, SHOW_LONGLONG},
+ {"wsrep_cluster_status", (char*) &wsrep_cluster_status, SHOW_CHAR_PTR},
+ {"wsrep_cluster_size", (char*) &wsrep_cluster_size, SHOW_LONG_NOFLUSH},
+ {"wsrep_local_index", (char*) &wsrep_local_index, SHOW_LONG_NOFLUSH},
+ {"wsrep_local_bf_aborts", (char*) &wsrep_show_bf_aborts, SHOW_FUNC},
+ {"wsrep_provider_name", (char*) &wsrep_provider_name, SHOW_CHAR_PTR},
+ {"wsrep_provider_version", (char*) &wsrep_provider_version, SHOW_CHAR_PTR},
+ {"wsrep_provider_vendor", (char*) &wsrep_provider_vendor, SHOW_CHAR_PTR},
+ {"wsrep_provider_capabilities", (char*) &wsrep_provider_capabilities, SHOW_CHAR_PTR},
+ {"wsrep_thread_count", (char*) &wsrep_running_threads, SHOW_LONG_NOFLUSH},
+ {"wsrep_applier_thread_count", (char*) &wsrep_running_applier_threads, SHOW_LONG_NOFLUSH},
+ {"wsrep_rollbacker_thread_count", (char *) &wsrep_running_rollbacker_threads, SHOW_LONG_NOFLUSH},
+ {"wsrep_cluster_capabilities", (char*) &wsrep_cluster_capabilities, SHOW_CHAR_PTR},
{"wsrep", (char*) &wsrep_show_status, SHOW_FUNC},
#endif
{NullS, NullS, SHOW_LONG}
@@ -9013,18 +8079,16 @@ static int mysql_init_variables(void)
opt_bootstrap= opt_myisam_log= 0;
disable_log_notes= 0;
mqh_used= 0;
- kill_in_progress= 0;
cleanup_done= 0;
- test_flags= select_errors= dropping_tables= ha_open_options=0;
- thread_count= kill_cached_threads= wake_thread= 0;
- service_thread_count= 0;
+ select_errors= dropping_tables= ha_open_options=0;
+ THD_count::count= CONNECT::count= kill_cached_threads= wake_thread= 0;
slave_open_temp_tables= 0;
cached_thread_count= 0;
opt_endinfo= using_udf_functions= 0;
opt_using_transactions= 0;
abort_loop= select_thread_in_use= signal_thread_in_use= 0;
- ready_to_exit= shutdown_in_progress= grant_option= 0;
- aborted_threads= aborted_connects= 0;
+ grant_option= 0;
+ aborted_threads= aborted_connects= aborted_connects_preauth= 0;
subquery_cache_miss= subquery_cache_hit= 0;
delayed_insert_threads= delayed_insert_writes= delayed_rows_in_use= 0;
delayed_insert_errors= thread_created= 0;
@@ -9053,7 +8117,9 @@ static int mysql_init_variables(void)
character_set_filesystem= &my_charset_bin;
opt_specialflag= SPECIAL_ENGLISH;
+#ifndef EMBEDDED_LIBRARY
unix_sock= base_ip_sock= extra_ip_sock= MYSQL_INVALID_SOCKET;
+#endif
mysql_home_ptr= mysql_home;
log_error_file_ptr= log_error_file;
protocol_version= PROTOCOL_VERSION;
@@ -9063,7 +8129,6 @@ static int mysql_init_variables(void)
global_query_id= 1;
global_thread_id= 0;
strnmov(server_version, MYSQL_SERVER_VERSION, sizeof(server_version)-1);
- threads.empty();
thread_cache.empty();
key_caches.empty();
if (!(dflt_key_cache= get_or_create_key_cache(default_key_cache_base.str,
@@ -9115,7 +8180,7 @@ static int mysql_init_variables(void)
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
have_ssl=SHOW_OPTION_YES;
-#if defined(HAVE_YASSL)
+#if defined(HAVE_WOLFSSL)
have_openssl= SHOW_OPTION_NO;
#else
have_openssl= SHOW_OPTION_YES;
@@ -9167,9 +8232,6 @@ static int mysql_init_variables(void)
ssl_acceptor_fd= 0;
#endif /* ! EMBEDDED_LIBRARY */
#endif /* HAVE_OPENSSL */
-#ifdef HAVE_SMEM
- shared_memory_base_name= default_shared_memory_base_name;
-#endif
#if defined(__WIN__)
/* Allow Win32 users to move MySQL anywhere */
@@ -9379,7 +8441,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
if (!(p= strstr(argument, "->")))
{
- sql_print_error("Bad syntax in replicate-rewrite-db - missing '->'!\n");
+ sql_print_error("Bad syntax in replicate-rewrite-db - missing '->'!");
return 1;
}
val= p--;
@@ -9388,7 +8450,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
/* Db name can be one char also */
if (p == argument && my_isspace(mysqld_charset, *p))
{
- sql_print_error("Bad syntax in replicate-rewrite-db - empty FROM db!\n");
+ sql_print_error("Bad syntax in replicate-rewrite-db - empty FROM db!");
return 1;
}
*val= 0;
@@ -9397,7 +8459,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
val++;
if (!*val)
{
- sql_print_error("Bad syntax in replicate-rewrite-db - empty TO db!\n");
+ sql_print_error("Bad syntax in replicate-rewrite-db - empty TO db!");
return 1;
}
@@ -9426,7 +8488,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
{
if (cur_rpl_filter->add_do_table(argument))
{
- sql_print_error("Could not add do table rule '%s'!\n", argument);
+ sql_print_error("Could not add do table rule '%s'!", argument);
return 1;
}
break;
@@ -9435,7 +8497,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
{
if (cur_rpl_filter->add_wild_do_table(argument))
{
- sql_print_error("Could not add do table rule '%s'!\n", argument);
+ sql_print_error("Could not add do table rule '%s'!", argument);
return 1;
}
break;
@@ -9444,7 +8506,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
{
if (cur_rpl_filter->add_wild_ignore_table(argument))
{
- sql_print_error("Could not add ignore table rule '%s'!\n", argument);
+ sql_print_error("Could not add ignore table rule '%s'!", argument);
return 1;
}
break;
@@ -9453,7 +8515,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
{
if (cur_rpl_filter->add_ignore_table(argument))
{
- sql_print_error("Could not add ignore table rule '%s'!\n", argument);
+ sql_print_error("Could not add ignore table rule '%s'!", argument);
return 1;
}
break;
@@ -9816,7 +8878,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
strlen(ft_boolean_syntax),
system_charset_info))
{
- sql_print_error("Invalid ft-boolean-syntax string: %s\n",
+ sql_print_error("Invalid ft-boolean-syntax string: %s",
ft_boolean_syntax);
return 1;
}
@@ -9917,10 +8979,10 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
errors.
*/
if (global_system_variables.log_warnings >= 10)
- my_global_flags= MY_WME | ME_JUST_INFO;
+ my_global_flags= MY_WME | ME_NOTE;
/* Log all errors not handled by thd->handle_error() to my_message_sql() */
if (global_system_variables.log_warnings >= 11)
- my_global_flags|= ME_NOREFRESH;
+ my_global_flags|= ME_ERROR_LOG;
if (my_assert_on_error)
debug_assert_if_crashed_table= 1;
@@ -10016,10 +9078,12 @@ void set_server_version(char *buf, size_t size)
{
bool is_log= opt_log || global_system_variables.sql_log_slow || opt_bin_log;
bool is_debug= IF_DBUG(!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"), 0);
+ bool is_valgrind= IF_VALGRIND(!strstr(MYSQL_SERVER_SUFFIX_STR, "-valgrind"), 0);
strxnmov(buf, size - 1,
MYSQL_SERVER_VERSION,
MYSQL_SERVER_SUFFIX_STR,
IF_EMBEDDED("-embedded", ""),
+ is_valgrind ? "-valgrind" : "",
is_debug ? "-debug" : "",
is_log ? "-log" : "",
NullS);
@@ -10317,7 +9381,9 @@ void refresh_status(THD *thd)
reset_status_vars();
#ifdef WITH_WSREP
if (WSREP_ON)
- wsrep->stats_reset(wsrep);
+ {
+ Wsrep_server_state::instance().provider().reset_status();
+ }
#endif /* WITH_WSREP */
/* Reset the counters of all key caches (default and named). */
@@ -10777,6 +9843,14 @@ static my_thread_id thread_id_max= UINT_MAX32;
@param[out] low - lower bound for the range
@param[out] high - upper bound for the range
*/
+
+static my_bool recalculate_callback(THD *thd, std::vector<my_thread_id> *ids)
+{
+ ids->push_back(thd->thread_id);
+ return 0;
+}
+
+
static void recalculate_thread_id_range(my_thread_id *low, my_thread_id *high)
{
std::vector<my_thread_id> ids;
@@ -10784,15 +9858,7 @@ static void recalculate_thread_id_range(my_thread_id *low, my_thread_id *high)
// Add sentinels
ids.push_back(0);
ids.push_back(UINT_MAX32);
-
- mysql_mutex_lock(&LOCK_thread_count);
-
- I_List_iterator<THD> it(threads);
- THD *thd;
- while ((thd=it++))
- ids.push_back(thd->thread_id);
-
- mysql_mutex_unlock(&LOCK_thread_count);
+ server_threads.iterate(recalculate_callback, &ids);
std::sort(ids.begin(), ids.end());
my_thread_id max_gap= 0;
diff --git a/sql/mysqld.h b/sql/mysqld.h
index d40e1d170d0..8e33d6488e4 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -23,8 +23,9 @@
#include "sql_bitmap.h" /* Bitmap */
#include "my_decimal.h" /* my_decimal */
#include "mysql_com.h" /* SERVER_VERSION_LENGTH */
-#include "my_atomic.h"
+#include "my_counter.h"
#include "mysql/psi/mysql_file.h" /* MYSQL_FILE */
+#include "mysql/psi/mysql_socket.h" /* MYSQL_SOCKET */
#include "sql_list.h" /* I_List */
#include "sql_cmd.h"
#include <my_rnd.h>
@@ -40,15 +41,7 @@ struct scheduler_functions;
typedef struct st_mysql_show_var SHOW_VAR;
-#if MAX_INDEXES <= 64
-typedef Bitmap<64> key_map; /* Used for finding keys */
-#elif MAX_INDEXES > 128
-#error "MAX_INDEXES values greater than 128 is not supported."
-#else
-typedef Bitmap<((MAX_INDEXES+7)/8*8)> key_map; /* Used for finding keys */
-#endif
-
- /* Bits from testflag */
+/* Bits from testflag */
#define TEST_PRINT_CACHED_TABLES 1U
#define TEST_NO_KEY_GROUP 2U
#define TEST_MIT_THREAD 4U
@@ -81,11 +74,10 @@ enum enum_slave_parallel_mode {
};
/* Function prototypes */
-void kill_mysql(THD *thd= 0);
+void kill_mysql(THD *thd);
void close_connection(THD *thd, uint sql_errno= 0);
void handle_connection_in_main_thread(CONNECT *thd);
void create_thread_to_handle_connection(CONNECT *connect);
-void signal_thd_deleted();
void unlink_thd(THD *thd);
bool one_thread_per_connection_end(THD *thd, bool put_in_cache);
void flush_thread_cache();
@@ -93,6 +85,11 @@ void refresh_status(THD *thd);
bool is_secure_file_path(char *path);
void dec_connection_count(scheduler_functions *scheduler);
extern void init_net_server_extension(THD *thd);
+extern void handle_accepted_socket(MYSQL_SOCKET new_sock, MYSQL_SOCKET sock);
+extern void create_new_thread(CONNECT *connect);
+
+extern void ssl_acceptor_stats_update(int sslaccept_ret);
+extern int reinit_ssl();
extern "C" MYSQL_PLUGIN_IMPORT CHARSET_INFO *system_charset_info;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *files_charset_info ;
@@ -122,7 +119,6 @@ extern bool opt_ignore_builtin_innodb;
extern my_bool opt_character_set_client_handshake;
extern my_bool debug_assert_on_not_freed_memory;
extern bool volatile abort_loop;
-extern bool volatile in_bootstrap;
extern uint connection_count;
extern my_bool opt_safe_user_create;
extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap;
@@ -153,6 +149,7 @@ extern ulong opt_replicate_events_marked_for_skip;
extern char *default_tz_name;
extern Time_zone *default_tz;
extern char *my_bind_addr_str;
+extern int server_socket_ai_family;
extern char *default_storage_engine, *default_tmp_storage_engine;
extern char *enforced_storage_engine;
extern char *gtid_pos_auto_engines;
@@ -220,12 +217,12 @@ extern ulonglong thd_startup_options;
extern my_thread_id global_thread_id;
extern ulong binlog_cache_use, binlog_cache_disk_use;
extern ulong binlog_stmt_cache_use, binlog_stmt_cache_disk_use;
-extern ulong aborted_threads,aborted_connects;
+extern ulong aborted_threads, aborted_connects, aborted_connects_preauth;
extern ulong delayed_insert_timeout;
extern ulong delayed_insert_limit, delayed_queue_size;
extern ulong delayed_insert_threads, delayed_insert_writes;
extern ulong delayed_rows_in_use,delayed_insert_errors;
-extern int32 slave_open_temp_tables;
+extern Atomic_counter<uint32_t> slave_open_temp_tables;
extern ulonglong query_cache_size;
extern ulong query_cache_limit;
extern ulong query_cache_min_res_unit;
@@ -233,6 +230,7 @@ extern ulong slow_launch_threads, slow_launch_time;
extern MYSQL_PLUGIN_IMPORT ulong max_connections;
extern uint max_digest_length;
extern ulong max_connect_errors, connect_timeout;
+extern uint max_password_errors;
extern my_bool slave_allow_batching;
extern my_bool allow_slave_start;
extern LEX_CSTRING reason_slave_blocked;
@@ -249,7 +247,7 @@ extern ulonglong max_binlog_cache_size, max_binlog_stmt_cache_size;
extern ulong max_binlog_size;
extern ulong slave_max_allowed_packet;
extern ulong opt_binlog_rows_event_max_size;
-extern ulong rpl_recovery_rank, thread_cache_size;
+extern ulong thread_cache_size;
extern ulong stored_program_cache_size;
extern ulong opt_slave_parallel_threads;
extern ulong opt_slave_domain_parallel_threads;
@@ -258,6 +256,7 @@ extern ulong opt_slave_parallel_mode;
extern ulong opt_binlog_commit_wait_count;
extern ulong opt_binlog_commit_wait_usec;
extern my_bool opt_gtid_ignore_duplicates;
+extern uint opt_gtid_cleanup_batch_size;
extern ulong back_log;
extern ulong executed_events;
extern char language[FN_REFLEN];
@@ -287,11 +286,8 @@ extern int mysqld_server_started, mysqld_server_initialized;
extern "C" MYSQL_PLUGIN_IMPORT int orig_argc;
extern "C" MYSQL_PLUGIN_IMPORT char **orig_argv;
extern pthread_attr_t connection_attrib;
-extern MYSQL_FILE *bootstrap_file;
extern my_bool old_mode;
extern LEX_STRING opt_init_connect, opt_init_slave;
-extern int bootstrap_error;
-extern I_List<THD> threads;
extern char err_shared_dir[];
extern ulong connection_errors_select;
extern ulong connection_errors_accept;
@@ -305,6 +301,8 @@ extern my_bool encrypt_tmp_disk_tables, encrypt_tmp_files;
extern ulong encryption_algorithm;
extern const char *encryption_algorithm_names[];
extern long opt_secure_timestamp;
+extern uint default_password_lifetime;
+extern my_bool disconnect_on_expired_password;
enum secure_timestamp { SECTIME_NO, SECTIME_SUPER, SECTIME_REPL, SECTIME_YES };
@@ -328,7 +326,7 @@ extern PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list,
key_LOCK_logger, key_LOCK_manager,
key_LOCK_prepared_stmt_count,
key_LOCK_rpl_status, key_LOCK_server_started,
- key_LOCK_status, key_LOCK_show_status,
+ key_LOCK_status,
key_LOCK_thd_data, key_LOCK_thd_kill,
key_LOCK_user_conn, key_LOG_LOCK_log,
key_master_info_data_lock, key_master_info_run_lock,
@@ -338,7 +336,8 @@ extern PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list,
key_rpl_group_info_sleep_lock,
key_structure_guard_mutex, key_TABLE_SHARE_LOCK_ha_data,
key_LOCK_start_thread,
- key_LOCK_error_messages, key_LOCK_thread_count, key_PARTITION_LOCK_auto_inc;
+ key_LOCK_error_messages,
+ key_PARTITION_LOCK_auto_inc;
extern PSI_mutex_key key_RELAYLOG_LOCK_index;
extern PSI_mutex_key key_LOCK_relaylog_end_pos;
extern PSI_mutex_key key_LOCK_slave_state, key_LOCK_binlog_state,
@@ -354,7 +353,8 @@ extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave,
key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock,
key_LOCK_SEQUENCE,
- key_rwlock_LOCK_vers_stats, key_rwlock_LOCK_stat_serial;
+ key_rwlock_LOCK_vers_stats, key_rwlock_LOCK_stat_serial,
+ key_rwlock_THD_list;
#ifdef HAVE_MMAP
extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool;
@@ -374,7 +374,7 @@ extern PSI_cond_key key_BINLOG_COND_xid_list, key_BINLOG_update_cond,
key_rpl_group_info_sleep_cond,
key_TABLE_SHARE_cond, key_user_level_lock_cond,
key_COND_start_thread,
- key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache;
+ key_COND_thread_cache, key_COND_flush_thread_cache;
extern PSI_cond_key key_RELAYLOG_COND_relay_log_updated,
key_RELAYLOG_COND_bin_log_updated, key_COND_wakeup_ready,
key_COND_wait_commit;
@@ -386,7 +386,7 @@ extern PSI_cond_key key_COND_rpl_thread, key_COND_rpl_thread_queue,
extern PSI_cond_key key_COND_wait_gtid, key_COND_gtid_ignore_duplicates;
extern PSI_cond_key key_TABLE_SHARE_COND_rotation;
-extern PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
+extern PSI_thread_key key_thread_delayed_insert,
key_thread_handle_manager, key_thread_kill_server, key_thread_main,
key_thread_one_connection, key_thread_signal_hand,
key_thread_slave_background, key_rpl_parallel_thread;
@@ -612,13 +612,13 @@ extern MYSQL_PLUGIN_IMPORT key_map key_map_full; /* Should be threaded
Server mutex locks and condition variables.
*/
extern mysql_mutex_t
- LOCK_item_func_sleep, LOCK_status, LOCK_show_status,
+ LOCK_item_func_sleep, LOCK_status,
LOCK_error_log, LOCK_delayed_insert, LOCK_short_uuid_generator,
LOCK_delayed_status, LOCK_delayed_create, LOCK_crypt, LOCK_timezone,
- LOCK_slave_list, LOCK_active_mi, LOCK_manager, LOCK_user_conn,
- LOCK_prepared_stmt_count, LOCK_error_messages, LOCK_connection_count;
-extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_thread_count,
- LOCK_global_system_variables;
+ LOCK_active_mi, LOCK_manager, LOCK_user_conn,
+ LOCK_prepared_stmt_count, LOCK_error_messages, LOCK_connection_count ;
+extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_global_system_variables;
+extern mysql_rwlock_t LOCK_all_status_vars;
extern mysql_mutex_t LOCK_start_thread;
#ifdef HAVE_OPENSSL
extern char* des_key_file;
@@ -627,13 +627,14 @@ extern mysql_mutex_t LOCK_des_key_file;
extern mysql_mutex_t LOCK_server_started;
extern mysql_cond_t COND_server_started;
extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
+extern mysql_rwlock_t LOCK_ssl_refresh;
extern mysql_prlock_t LOCK_system_variables_hash;
-extern mysql_cond_t COND_thread_count, COND_start_thread;
+extern mysql_cond_t COND_start_thread;
extern mysql_cond_t COND_manager;
-extern int32 thread_count, service_thread_count;
extern char *opt_ssl_ca, *opt_ssl_capath, *opt_ssl_cert, *opt_ssl_cipher,
*opt_ssl_key, *opt_ssl_crl, *opt_ssl_crlpath;
+extern ulonglong tls_version;
extern MYSQL_PLUGIN_IMPORT pthread_key(THD*, THR_THD);
@@ -696,6 +697,7 @@ enum options_mysqld
OPT_WSREP_SYNC_WAIT,
#endif /* WITH_WSREP */
OPT_MYSQL_COMPATIBILITY,
+ OPT_TLS_VERSION,
OPT_MYSQL_TO_BE_IMPLEMENTED,
OPT_which_is_always_the_last
};
@@ -733,6 +735,8 @@ enum enum_query_type
/// SHOW CREATE {VIEW|PROCEDURE|FUNCTION} and other cases where the
/// original representation is required, should set this flag.
QT_ITEM_ORIGINAL_FUNC_NULLIF= (1 << 7),
+ /// good for parsing
+ QT_PARSABLE= (1 << 8),
/// This value means focus on readability, not on ability to parse back, etc.
QT_EXPLAIN= QT_TO_SYSTEM_CHARSET |
@@ -756,19 +760,17 @@ enum enum_query_type
/* query_id */
-extern query_id_t global_query_id;
-
-ATTRIBUTE_NORETURN void unireg_end(void);
+extern Atomic_counter<query_id_t> global_query_id;
/* increment query_id and return it. */
inline __attribute__((warn_unused_result)) query_id_t next_query_id()
{
- return my_atomic_add64_explicit(&global_query_id, 1, MY_MEMORY_ORDER_RELAXED);
+ return global_query_id++;
}
inline query_id_t get_query_id()
{
- return my_atomic_load64_explicit(&global_query_id, MY_MEMORY_ORDER_RELAXED);
+ return global_query_id;
}
/* increment global_thread_id and return it. */
diff --git a/sql/opt_index_cond_pushdown.cc b/sql/opt_index_cond_pushdown.cc
index af6a75cdef2..f8d11da1d5e 100644
--- a/sql/opt_index_cond_pushdown.cc
+++ b/sql/opt_index_cond_pushdown.cc
@@ -264,6 +264,10 @@ static Item *make_cond_for_index(THD *thd, Item *cond, TABLE *table, uint keyno,
static Item *make_cond_remainder(THD *thd, Item *cond, TABLE *table, uint keyno,
bool other_tbls_ok, bool exclude_index)
{
+ if (exclude_index &&
+ uses_index_fields_only(cond, table, keyno, other_tbls_ok))
+ return 0;
+
if (cond->type() == Item::COND_ITEM)
{
table_map tbl_map= 0;
@@ -272,7 +276,7 @@ static Item *make_cond_remainder(THD *thd, Item *cond, TABLE *table, uint keyno,
/* Create new top level AND item */
Item_cond_and *new_cond= new (thd->mem_root) Item_cond_and(thd);
if (!new_cond)
- return (COND*) 0;
+ return (COND*) 0;
List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
Item *item;
while ((item=li++))
@@ -318,14 +322,7 @@ static Item *make_cond_remainder(THD *thd, Item *cond, TABLE *table, uint keyno,
return new_cond;
}
}
- else
- {
- if (exclude_index &&
- uses_index_fields_only(cond, table, keyno, other_tbls_ok))
- return 0;
- else
- return cond;
- }
+ return cond;
}
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 54c0c5bba96..a2bbe1447e9 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -119,6 +119,7 @@
#include "sql_select.h"
#include "sql_statistics.h"
#include "uniques.h"
+#include "my_json_writer.h"
#ifndef EXTRA_DEBUG
#define test_rb_tree(A,B) {}
@@ -314,7 +315,7 @@ public:
*/
key_map possible_keys;
longlong baseflag;
- uint max_key_part, range_count;
+ uint max_key_parts, range_count;
bool quick; // Don't calulate possible keys
@@ -327,8 +328,6 @@ public:
uint *imerge_cost_buff; /* buffer for index_merge cost estimates */
uint imerge_cost_buff_size; /* size of the buffer */
- /* TRUE if last checked tree->key can be used for ROR-scan */
- bool is_ror_scan;
/* Number of ranges in the last checked tree->key */
uint n_ranges;
uint8 first_null_comp; /* first null component if any, 0 - otherwise */
@@ -350,7 +349,7 @@ static bool is_key_scan_ror(PARAM *param, uint keynr, uint8 nparts);
static ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
SEL_ARG *tree, bool update_tbl_stats,
uint *mrr_flags, uint *bufsize,
- Cost_estimate *cost);
+ Cost_estimate *cost, bool *is_ror_scan);
QUICK_RANGE_SELECT *get_quick_select(PARAM *param,uint index,
SEL_ARG *key_tree, uint mrr_flags,
@@ -372,7 +371,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
double read_time);
static
TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
- double read_time);
+ double read_time, bool named_trace= false);
static
TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge,
TRP_INDEX_MERGE *imerge_trp,
@@ -429,6 +428,28 @@ static int and_range_trees(RANGE_OPT_PARAM *param,
SEL_TREE *result);
static bool remove_nonrange_trees(RANGE_OPT_PARAM *param, SEL_TREE *tree);
+static void print_key_value(String *out, const KEY_PART_INFO *key_part,
+ const uchar* key, uint length);
+static void print_keyparts_name(String *out, const KEY_PART_INFO *key_part,
+ uint n_keypart, key_part_map keypart_map);
+
+static void trace_ranges(Json_writer_array *range_trace,
+ PARAM *param, uint idx,
+ SEL_ARG *keypart,
+ const KEY_PART_INFO *key_parts);
+
+static
+void print_range(String *out, const KEY_PART_INFO *key_part,
+ KEY_MULTI_RANGE *range, uint n_key_parts);
+
+static
+void print_range_for_non_indexed_field(String *out, Field *field,
+ KEY_MULTI_RANGE *range);
+
+static void print_min_range_operator(String *out, const ha_rkey_function flag);
+static void print_max_range_operator(String *out, const ha_rkey_function flag);
+
+static bool is_field_an_unique_index(RANGE_OPT_PARAM *param, Field *field);
/*
SEL_IMERGE is a list of possible ways to do index merge, i.e. it is
@@ -662,7 +683,7 @@ int SEL_IMERGE::or_sel_tree_with_checks(RANGE_OPT_PARAM *param,
{
bool was_ored= FALSE;
*is_last_check_pass= is_first_check_pass;
- SEL_TREE** or_tree = trees;
+ SEL_TREE** or_tree= trees;
for (uint i= 0; i < n_trees; i++, or_tree++)
{
SEL_TREE *result= 0;
@@ -859,7 +880,7 @@ SEL_IMERGE::SEL_IMERGE(SEL_IMERGE *arg, uint cnt,
trees_next= trees + (cnt ? cnt : arg->trees_next-arg->trees);
trees_end= trees + elements;
- for (SEL_TREE **tree = trees, **arg_tree= arg->trees; tree < trees_next;
+ for (SEL_TREE **tree= trees, **arg_tree= arg->trees; tree < trees_next;
tree++, arg_tree++)
{
if (!(*tree= new SEL_TREE(*arg_tree, TRUE, param)))
@@ -1477,7 +1498,6 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler,
{
handler *save_file= file, *org_file;
THD *thd= head->in_use;
- MY_BITMAP * const save_vcol_set= head->vcol_set;
MY_BITMAP * const save_read_set= head->read_set;
MY_BITMAP * const save_write_set= head->write_set;
DBUG_ENTER("QUICK_RANGE_SELECT::init_ror_merged_scan");
@@ -1535,14 +1555,14 @@ end:
org_file= head->file;
head->file= file;
- head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap, &column_bitmap);
+ head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap);
head->prepare_for_keyread(index, &column_bitmap);
head->prepare_for_position();
head->file= org_file;
/* Restore head->read_set (and write_set) to what they had before the call */
- head->column_bitmaps_set(save_read_set, save_write_set, save_vcol_set);
+ head->column_bitmaps_set(save_read_set, save_write_set);
if (reset())
{
@@ -1557,7 +1577,7 @@ end:
DBUG_RETURN(0);
failure:
- head->column_bitmaps_set(save_read_set, save_write_set, save_vcol_set);
+ head->column_bitmaps_set(save_read_set, save_write_set);
delete file;
file= save_file;
free_file= false;
@@ -1895,6 +1915,118 @@ SEL_ARG::SEL_ARG(Field *field_,uint8 part_,
left=right= &null_element;
}
+
+/*
+ A number of helper classes:
+ SEL_ARG_LE, SEL_ARG_LT, SEL_ARG_GT, SEL_ARG_GE,
+ to share the code between:
+ Field::stored_field_make_mm_leaf()
+ Field::stored_field_make_mm_leaf_exact()
+*/
+class SEL_ARG_LE: public SEL_ARG
+{
+public:
+ SEL_ARG_LE(const uchar *key, Field *field)
+ :SEL_ARG(field, key, key)
+ {
+ if (!field->real_maybe_null())
+ min_flag= NO_MIN_RANGE; // From start
+ else
+ {
+ min_value= is_null_string;
+ min_flag= NEAR_MIN; // > NULL
+ }
+ }
+};
+
+
+class SEL_ARG_LT: public SEL_ARG_LE
+{
+public:
+ /*
+ Use this constructor if value->save_in_field() went precisely,
+ without any data rounding or truncation.
+ */
+ SEL_ARG_LT(const uchar *key, Field *field)
+ :SEL_ARG_LE(key, field)
+ { max_flag= NEAR_MAX; }
+ /*
+ Use this constructor if value->save_in_field() returned success,
+ but we don't know if rounding or truncation happened
+ (as some Field::store() do not report minor data changes).
+ */
+ SEL_ARG_LT(THD *thd, const uchar *key, Field *field, Item *value)
+ :SEL_ARG_LE(key, field)
+ {
+ if (stored_field_cmp_to_item(thd, field, value) == 0)
+ max_flag= NEAR_MAX;
+ }
+};
+
+
+class SEL_ARG_GT: public SEL_ARG
+{
+public:
+ /*
+ Use this constructor if value->save_in_field() went precisely,
+ without any data rounding or truncation.
+ */
+ SEL_ARG_GT(const uchar *key, const KEY_PART *key_part, Field *field)
+ :SEL_ARG(field, key, key)
+ {
+ // Don't use open ranges for partial key_segments
+ if (!(key_part->flag & HA_PART_KEY_SEG))
+ min_flag= NEAR_MIN;
+ max_flag= NO_MAX_RANGE;
+ }
+ /*
+ Use this constructor if value->save_in_field() returned success,
+ but we don't know if rounding or truncation happened
+ (as some Field::store() do not report minor data changes).
+ */
+ SEL_ARG_GT(THD *thd, const uchar *key,
+ const KEY_PART *key_part, Field *field, Item *value)
+ :SEL_ARG(field, key, key)
+ {
+ // Don't use open ranges for partial key_segments
+ if ((!(key_part->flag & HA_PART_KEY_SEG)) &&
+ (stored_field_cmp_to_item(thd, field, value) <= 0))
+ min_flag= NEAR_MIN;
+ max_flag= NO_MAX_RANGE;
+ }
+};
+
+
+class SEL_ARG_GE: public SEL_ARG
+{
+public:
+ /*
+ Use this constructor if value->save_in_field() went precisely,
+ without any data rounding or truncation.
+ */
+ SEL_ARG_GE(const uchar *key, Field *field)
+ :SEL_ARG(field, key, key)
+ {
+ max_flag= NO_MAX_RANGE;
+ }
+ /*
+ Use this constructor if value->save_in_field() returned success,
+ but we don't know if rounding or truncation happened
+ (as some Field::store() do not report minor data changes).
+ */
+ SEL_ARG_GE(THD *thd, const uchar *key,
+ const KEY_PART *key_part, Field *field, Item *value)
+ :SEL_ARG(field, key, key)
+ {
+ // Don't use open ranges for partial key_segments
+ if ((!(key_part->flag & HA_PART_KEY_SEG)) &&
+ (stored_field_cmp_to_item(thd, field, value) < 0))
+ min_flag= NEAR_MIN;
+ max_flag= NO_MAX_RANGE;
+ }
+};
+
+
SEL_ARG *SEL_ARG::clone(RANGE_OPT_PARAM *param, SEL_ARG *new_parent,
SEL_ARG **next_arg)
{
@@ -2081,6 +2213,14 @@ public:
static void operator delete(void *ptr,size_t size) { TRASH_FREE(ptr, size); }
static void operator delete(void *ptr, MEM_ROOT *mem_root) { /* Never called */ }
virtual ~TABLE_READ_PLAN() {} /* Remove gcc warning */
+ /**
+ Add basic info for this TABLE_READ_PLAN to the optimizer trace.
+
+ @param param Parameters for range analysis of this table
+ @param trace_object The optimizer trace object the info is appended to
+ */
+ virtual void trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const= 0;
};
@@ -2122,8 +2262,32 @@ public:
}
DBUG_RETURN(quick);
}
+ void trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const;
};
+void TRP_RANGE::trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const
+{
+ DBUG_ASSERT(trace_object->trace_started());
+ DBUG_ASSERT(param->using_real_indexes);
+ const uint keynr_in_table= param->real_keynr[key_idx];
+
+ const KEY &cur_key= param->table->key_info[keynr_in_table];
+ const KEY_PART_INFO *key_part= cur_key.key_part;
+
+ trace_object->add("type", "range_scan")
+ .add("index", cur_key.name)
+ .add("rows", records);
+
+ Json_writer_array trace_range(param->thd, "ranges");
+
+ // TRP_RANGE should not be created if there are no range intervals
+ DBUG_ASSERT(key);
+
+ trace_ranges(&trace_range, param, key_idx, key, key_part);
+}
+
/* Plan for QUICK_ROR_INTERSECT_SELECT scan. */
@@ -2141,9 +2305,12 @@ public:
struct st_ror_scan_info *cpk_scan; /* Clustered PK scan, if there is one */
bool is_covering; /* TRUE if no row retrieval phase is necessary */
double index_scan_costs; /* SUM(cost(index_scan)) */
+ void trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const;
};
+
/*
Plan for QUICK_ROR_UNION_SELECT scan.
QUICK_ROR_UNION_SELECT always retrieves full rows, so retrieve_full_rows
@@ -2159,8 +2326,23 @@ public:
MEM_ROOT *parent_alloc);
TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */
TABLE_READ_PLAN **last_ror; /* end of the above array */
+ void trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const;
};
+void TRP_ROR_UNION::trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const
+{
+ THD *thd= param->thd;
+ DBUG_ASSERT(trace_object->trace_started());
+ trace_object->add("type", "index_roworder_union");
+ Json_writer_array smth_trace(thd, "union_of");
+ for (TABLE_READ_PLAN **current= first_ror; current != last_ror; current++)
+ {
+ Json_writer_object trp_info(thd);
+ (*current)->trace_basic_info(param, &trp_info);
+ }
+}
/*
Plan for QUICK_INDEX_INTERSECT_SELECT scan.
@@ -2178,9 +2360,26 @@ public:
TRP_RANGE **range_scans; /* array of ptrs to plans of intersected scans */
TRP_RANGE **range_scans_end; /* end of the array */
/* keys whose scans are to be filtered by cpk conditions */
- key_map filtered_scans;
+ key_map filtered_scans;
+ void trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const;
+
};
+void TRP_INDEX_INTERSECT::trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const
+{
+ THD *thd= param->thd;
+ DBUG_ASSERT(trace_object->trace_started());
+ trace_object->add("type", "index_sort_intersect");
+ Json_writer_array smth_trace(thd, "index_sort_intersect_of");
+ for (TRP_RANGE **current= range_scans; current != range_scans_end;
+ current++)
+ {
+ Json_writer_object trp_info(thd);
+ (*current)->trace_basic_info(param, &trp_info);
+ }
+}
/*
Plan for QUICK_INDEX_MERGE_SELECT scan.
@@ -2197,8 +2396,23 @@ public:
MEM_ROOT *parent_alloc);
TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */
TRP_RANGE **range_scans_end; /* end of the array */
+ void trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const;
};
+void TRP_INDEX_MERGE::trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const
+{
+ THD *thd= param->thd;
+ DBUG_ASSERT(trace_object->trace_started());
+ trace_object->add("type", "index_merge");
+ Json_writer_array smth_trace(thd, "index_merge_of");
+ for (TRP_RANGE **current= range_scans; current != range_scans_end; current++)
+ {
+ Json_writer_object trp_info(thd);
+ (*current)->trace_basic_info(param, &trp_info);
+ }
+}
/*
Plan for a QUICK_GROUP_MIN_MAX_SELECT scan.
@@ -2250,9 +2464,51 @@ public:
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
MEM_ROOT *parent_alloc);
void use_index_scan() { is_index_scan= TRUE; }
+ void trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const;
};
+void TRP_GROUP_MIN_MAX::trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const
+{
+ THD *thd= param->thd;
+ DBUG_ASSERT(trace_object->trace_started());
+
+ trace_object->add("type", "index_group").add("index", index_info->name);
+
+ if (min_max_arg_part)
+ trace_object->add("min_max_arg", min_max_arg_part->field->field_name);
+ else
+ trace_object->add_null("min_max_arg");
+
+ trace_object->add("min_aggregate", have_min)
+ .add("max_aggregate", have_max)
+ .add("distinct_aggregate", have_agg_distinct)
+ .add("rows", records)
+ .add("cost", read_cost);
+
+ const KEY_PART_INFO *key_part= index_info->key_part;
+ {
+ Json_writer_array trace_keyparts(thd, "key_parts_used_for_access");
+ for (uint partno= 0; partno < used_key_parts; partno++)
+ {
+ const KEY_PART_INFO *cur_key_part= key_part + partno;
+ trace_keyparts.add(cur_key_part->field->field_name);
+ }
+ }
+
+ Json_writer_array trace_range(thd, "ranges");
+
+ // can have group quick without ranges
+ if (index_tree)
+ {
+ trace_ranges(&trace_range, param, param_idx,
+ index_tree, key_part);
+ }
+}
+
+
typedef struct st_index_scan_info
{
uint idx; /* # of used key in param->keys */
@@ -2340,6 +2596,9 @@ static int fill_used_fields_bitmap(PARAM *param)
limit Query limit
force_quick_range Prefer to use range (instead of full table scan) even
if it is more expensive.
+ remove_false_parts_of_where Remove parts of OR-clauses for which range
+ analysis produced SEL_TREE(IMPOSSIBLE)
+ only_single_index_range_scan Evaluate only single index range scans
NOTES
Updates the following in the select parameter:
@@ -2398,7 +2657,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
table_map prev_tables,
ha_rows limit, bool force_quick_range,
bool ordered_output,
- bool remove_false_parts_of_where)
+ bool remove_false_parts_of_where,
+ bool only_single_index_range_scan)
{
uint idx;
double scan_time;
@@ -2411,12 +2671,15 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
quick=0;
needed_reg.clear_all();
quick_keys.clear_all();
+ head->with_impossible_ranges.clear_all();
DBUG_ASSERT(!head->is_filled_at_execution());
if (keys_to_use.is_clear_all() || head->is_filled_at_execution())
DBUG_RETURN(0);
records= head->stat_records();
if (!records)
records++; /* purecov: inspected */
+ if (head->file->ha_table_flags() & HA_NON_COMPARABLE_ROWID)
+ only_single_index_range_scan= 1;
if (head->force_index || force_quick_range)
scan_time= read_time= DBL_MAX;
@@ -2432,6 +2695,15 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
DBUG_PRINT("info",("Time to scan table: %g", read_time));
+ Json_writer_object table_records(thd);
+ table_records.add_table_name(head);
+
+ Json_writer_object trace_range(thd, "range_analysis");
+ {
+ Json_writer_object table_rec(thd, "table_scan");
+ table_rec.add("rows", records).add("cost", read_time);
+ }
+
keys_to_use.intersect(head->keys_in_use_for_query);
if (!keys_to_use.is_clear_all())
{
@@ -2460,7 +2732,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
param.imerge_cost_buff_size= 0;
param.using_real_indexes= TRUE;
param.remove_jump_scans= TRUE;
- param.is_ror_scan= 0;
+ param.max_key_parts= 0;
param.remove_false_where_parts= remove_false_parts_of_where;
param.force_default_mrr= ordered_output;
param.possible_keys.clear_all();
@@ -2487,19 +2759,33 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
*/
key_info= head->key_info;
uint max_key_len= 0;
+
+ Json_writer_array trace_idx(thd, "potential_range_indexes");
+
for (idx=0 ; idx < head->s->keys ; idx++, key_info++)
{
+ Json_writer_object trace_idx_details(thd);
+ trace_idx_details.add("index", key_info->name);
KEY_PART_INFO *key_part_info;
uint n_key_parts= head->actual_n_key_parts(key_info);
if (!keys_to_use.is_set(idx))
- continue;
+ {
+ trace_idx_details.add("usable", false)
+ .add("cause", "not applicable");
+ continue;
+ }
if (key_info->flags & HA_FULLTEXT)
- continue; // ToDo: ft-keys in non-ft ranges, if possible SerG
+ {
+ trace_idx_details.add("usable", false).add("cause", "fulltext");
+ continue; // ToDo: ft-keys in non-ft ranges, if possible SerG
+ }
+ trace_idx_details.add("usable", true);
param.key[param.keys]=key_parts;
key_part_info= key_info->key_part;
uint cur_key_len= 0;
+ Json_writer_array trace_keypart(thd, "key_parts");
for (uint part= 0 ; part < n_key_parts ;
part++, key_parts++, key_part_info++)
{
@@ -2514,11 +2800,14 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
(key_info->flags & HA_SPATIAL) ? Field::itMBR : Field::itRAW;
/* Only HA_PART_KEY_SEG is used */
key_parts->flag= (uint8) key_part_info->key_part_flag;
+ trace_keypart.add(key_parts->field->field_name);
}
param.real_keynr[param.keys++]=idx;
if (cur_key_len > max_key_len)
max_key_len= cur_key_len;
}
+ trace_idx.end();
+
param.key_parts_end=key_parts;
param.alloced_sel_args= 0;
@@ -2536,26 +2825,42 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
if (!force_quick_range && !head->covering_keys.is_clear_all())
{
int key_for_use= find_shortest_key(head, &head->covering_keys);
- double key_read_time= head->file->keyread_time(key_for_use, 1, records) +
- (double) records / TIME_FOR_COMPARE;
+ double key_read_time= head->file->key_scan_time(key_for_use) +
+ (double) records / TIME_FOR_COMPARE_IDX;
DBUG_PRINT("info", ("'all'+'using index' scan will be using key %d, "
"read time %g", key_for_use, key_read_time));
+
+ Json_writer_object trace_cov(thd, "best_covering_index_scan");
+ bool chosen= FALSE;
if (key_read_time < read_time)
+ {
read_time= key_read_time;
+ chosen= TRUE;
+ }
+ trace_cov.add("index", head->key_info[key_for_use].name)
+ .add("cost", key_read_time).add("chosen", chosen);
+ if (!chosen)
+ trace_cov.add("cause", "cost");
}
TABLE_READ_PLAN *best_trp= NULL;
- TRP_GROUP_MIN_MAX *group_trp;
+ TRP_GROUP_MIN_MAX *group_trp= NULL;
double best_read_time= read_time;
if (cond)
{
- if ((tree= cond->get_mm_tree(&param, &cond)))
+ {
+ Json_writer_array trace_range_summary(thd,
+ "setup_range_conditions");
+ tree= cond->get_mm_tree(&param, &cond);
+ }
+ if (tree)
{
if (tree->type == SEL_TREE::IMPOSSIBLE)
{
records=0L; /* Return -1 from this function. */
read_time= (double) HA_POS_ERROR;
+ trace_range.add("impossible_range", true);
goto free_mem;
}
/*
@@ -2563,7 +2868,10 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
can construct a group-min-max quick select
*/
if (tree->type != SEL_TREE::KEY && tree->type != SEL_TREE::KEY_SMALLER)
+ {
+ trace_range.add("range_scan_possible", false);
tree= NULL;
+ }
}
else if (thd->is_error())
{
@@ -2579,13 +2887,20 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
Notice that it can be constructed no matter if there is a range tree.
*/
DBUG_EXECUTE_IF("force_group_by", force_group_by = true; );
- group_trp= get_best_group_min_max(&param, tree, best_read_time);
+ if (!only_single_index_range_scan)
+ group_trp= get_best_group_min_max(&param, tree, best_read_time);
if (group_trp)
{
param.table->quick_condition_rows= MY_MIN(group_trp->records,
head->stat_records());
+ Json_writer_object grp_summary(thd, "best_group_range_summary");
+
+ if (unlikely(thd->trace_started()))
+ group_trp->trace_basic_info(&param, &grp_summary);
+
if (group_trp->read_cost < best_read_time || force_group_by)
{
+ grp_summary.add("chosen", true);
best_trp= group_trp;
best_read_time= best_trp->read_cost;
if (force_group_by)
@@ -2593,6 +2908,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
goto force_plan;
}
}
+ else
+ grp_summary.add("chosen", false).add("cause", "cost");
}
if (tree)
@@ -2601,16 +2918,17 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
It is possible to use a range-based quick select (but it might be
slower than 'all' table scan).
*/
- TRP_RANGE *range_trp;
TRP_ROR_INTERSECT *rori_trp;
TRP_INDEX_INTERSECT *intersect_trp;
bool can_build_covering= FALSE;
-
+ Json_writer_object trace_range(thd, "analyzing_range_alternatives");
+
remove_nonrange_trees(&param, tree);
/* Get best 'range' plan and prepare data for making other plans */
- if ((range_trp= get_key_scans_params(&param, tree, FALSE, TRUE,
- best_read_time)))
+ if (auto range_trp= get_key_scans_params(&param, tree,
+ only_single_index_range_scan,
+ true, best_read_time))
{
best_trp= range_trp;
best_read_time= best_trp->read_cost;
@@ -2622,7 +2940,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
table deletes.
*/
if ((thd->lex->sql_command != SQLCOM_DELETE) &&
- optimizer_flag(thd, OPTIMIZER_SWITCH_INDEX_MERGE))
+ optimizer_flag(thd, OPTIMIZER_SWITCH_INDEX_MERGE) &&
+ !only_single_index_range_scan)
{
/*
Get best non-covering ROR-intersection plan and prepare data for
@@ -2650,7 +2969,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
*/
if (param.table->covering_keys.is_clear_all() &&
optimizer_flag(thd, OPTIMIZER_SWITCH_INDEX_MERGE) &&
- optimizer_flag(thd, OPTIMIZER_SWITCH_INDEX_MERGE_SORT_INTERSECT))
+ optimizer_flag(thd, OPTIMIZER_SWITCH_INDEX_MERGE_SORT_INTERSECT) &&
+ !only_single_index_range_scan)
{
if ((intersect_trp= get_best_index_intersect(&param, tree,
best_read_time)))
@@ -2663,7 +2983,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
}
if (optimizer_flag(thd, OPTIMIZER_SWITCH_INDEX_MERGE) &&
- head->stat_records() != 0)
+ head->stat_records() != 0 && !only_single_index_range_scan)
{
/* Try creating index_merge/ROR-union scan. */
SEL_IMERGE *imerge;
@@ -2672,6 +2992,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
DBUG_PRINT("info",("No range reads possible,"
" trying to construct index_merge"));
List_iterator_fast<SEL_IMERGE> it(tree->merges);
+ Json_writer_array trace_idx_merge(thd, "analyzing_index_merge_union");
while ((imerge= it++))
{
new_conj_trp= get_best_disjunct_quick(&param, imerge, best_read_time);
@@ -2707,6 +3028,19 @@ force_plan:
possible_keys= param.possible_keys;
free_mem:
+ if (unlikely(quick && best_trp && thd->trace_started()))
+ {
+ Json_writer_object trace_range_summary(thd,
+ "chosen_range_access_summary");
+ {
+ Json_writer_object trace_range_plan(thd, "range_access_plan");
+ best_trp->trace_basic_info(&param, &trace_range_plan);
+ }
+ trace_range_summary.add("rows_for_plan", quick->records)
+ .add("cost_for_plan", quick->read_time)
+ .add("chosen", true);
+ }
+
free_root(&alloc,MYF(0)); // Return memory & allocator
thd->mem_root= param.old_root;
thd->no_errors=0;
@@ -2851,6 +3185,7 @@ static
double records_in_column_ranges(PARAM *param, uint idx,
SEL_ARG *tree)
{
+ THD *thd= param->thd;
SEL_ARG_RANGE_SEQ seq;
KEY_MULTI_RANGE range;
range_seq_t seq_it;
@@ -2873,16 +3208,36 @@ double records_in_column_ranges(PARAM *param, uint idx,
seq.real_keyno= MAX_KEY;
seq.param= param;
seq.start= tree;
+ seq.is_ror_scan= FALSE;
seq_it= seq_if.init((void *) &seq, 0, flags);
+ Json_writer_array range_trace(thd, "ranges");
+
while (!seq_if.next(seq_it, &range))
{
key_range *min_endp, *max_endp;
min_endp= range.start_key.length? &range.start_key : NULL;
max_endp= range.end_key.length? &range.end_key : NULL;
- rows= get_column_range_cardinality(field, min_endp, max_endp,
- range.range_flag);
+ int range_flag= range.range_flag;
+
+ if (!range.start_key.length)
+ range_flag |= NO_MIN_RANGE;
+ if (!range.end_key.length)
+ range_flag |= NO_MAX_RANGE;
+ if (range.start_key.flag == HA_READ_AFTER_KEY)
+ range_flag |= NEAR_MIN;
+ if (range.start_key.flag == HA_READ_BEFORE_KEY)
+ range_flag |= NEAR_MAX;
+
+ if (unlikely(thd->trace_started()))
+ {
+ StringBuffer<128> range_info(system_charset_info);
+ print_range_for_non_indexed_field(&range_info, field, &range);
+ range_trace.add(range_info.c_ptr_safe(), range_info.length());
+ }
+
+ rows= get_column_range_cardinality(field, min_endp, max_endp, range_flag);
if (DBL_MAX == rows)
{
total_rows= DBL_MAX;
@@ -2895,6 +3250,25 @@ double records_in_column_ranges(PARAM *param, uint idx,
/*
+ Compare quick select ranges according to number of found rows
+ If there is equal amounts of rows, use the long key part.
+ The idea is that if we have keys (a),(a,b) and (a,b,c) and we have
+ a query like WHERE a=1 and b=1 and c=1,
+ it is better to use key (a,b,c) than (a) as it will ensure we don't also
+ use histograms for columns b and c
+*/
+
+static
+int cmp_quick_ranges(TABLE *table, uint *a, uint *b)
+{
+ int tmp= CMP_NUM(table->quick_rows[*a], table->quick_rows[*b]);
+ if (tmp)
+ return tmp;
+ return -CMP_NUM(table->quick_key_parts[*a], table->quick_key_parts[*b]);
+}
+
+
+/*
Calculate the selectivity of the condition imposed on the rows of a table
SYNOPSIS
@@ -2930,10 +3304,10 @@ double records_in_column_ranges(PARAM *param, uint idx,
bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
{
- uint keynr;
- uint max_quick_key_parts= 0;
+ uint keynr, range_index, ranges;
MY_BITMAP *used_fields= &table->cond_set;
- double table_records= (double)table->stat_records();
+ double table_records= (double)table->stat_records();
+ uint optimal_key_order[MAX_KEY];
DBUG_ENTER("calculate_cond_selectivity_for_table");
table->cond_selectivity= 1.0;
@@ -2969,23 +3343,24 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
estimate sources.
*/
- for (keynr= 0; keynr < table->s->keys; keynr++)
- {
- if (table->quick_keys.is_set(keynr))
- set_if_bigger(max_quick_key_parts, table->quick_key_parts[keynr]);
- }
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_array selectivity_for_indexes(thd, "selectivity_for_indexes");
- /*
- Walk through all indexes, indexes where range access uses more keyparts
- go first.
+ /*
+ Walk through all quick ranges in the order of least found rows.
*/
- for (uint quick_key_parts= max_quick_key_parts;
- quick_key_parts; quick_key_parts--)
+ for (ranges= keynr= 0 ; keynr < table->s->keys; keynr++)
+ if (table->quick_keys.is_set(keynr))
+ optimal_key_order[ranges++]= keynr;
+
+ my_qsort2(optimal_key_order, ranges,
+ sizeof(optimal_key_order[0]),
+ (qsort2_cmp) cmp_quick_ranges, table);
+
+ for (range_index= 0 ; range_index < ranges ; range_index++)
{
- for (keynr= 0; keynr < table->s->keys; keynr++)
+ uint keynr= optimal_key_order[range_index];
{
- if (table->quick_keys.is_set(keynr) &&
- table->quick_key_parts[keynr] == quick_key_parts)
{
uint i;
uint used_key_parts= table->quick_key_parts[keynr];
@@ -3018,6 +3393,10 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
not yet been accounted for.
*/
table->cond_selectivity*= quick_cond_selectivity;
+ Json_writer_object selectivity_for_index(thd);
+ selectivity_for_index.add("index_name", key_info->name)
+ .add("selectivity_from_index",
+ quick_cond_selectivity);
if (i != used_key_parts)
{
/*
@@ -3037,7 +3416,9 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
*/
selectivity_mult= ((double)(i+1)) / i;
}
- table->cond_selectivity*= selectivity_mult;
+ table->cond_selectivity*= selectivity_mult;
+ selectivity_for_index.add("selectivity_multiplier",
+ selectivity_mult);
}
/*
We need to set selectivity for fields supported by indexes.
@@ -3058,12 +3439,14 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
}
}
}
+ selectivity_for_indexes.end();
/*
Second step: calculate the selectivity of the range conditions not
supported by any index and selectivity of the range condition
over the fields whose selectivity has not been set yet.
*/
+ Json_writer_array selectivity_for_columns(thd, "selectivity_for_columns");
if (thd->variables.optimizer_use_condition_selectivity > 2 &&
!bitmap_is_clear_all(used_fields) &&
@@ -3081,7 +3464,6 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
param.mem_root= &alloc;
param.old_root= thd->mem_root;
param.table= table;
- param.is_ror_scan= FALSE;
param.remove_false_where_parts= true;
if (create_key_parts_for_pseudo_indexes(&param, used_fields))
@@ -3092,6 +3474,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
param.using_real_indexes= FALSE;
param.real_keynr[0]= 0;
param.alloced_sel_args= 0;
+ param.max_key_parts= 0;
thd->no_errors=1;
@@ -3123,17 +3506,25 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
SEL_ARG *key= tree->keys[idx];
if (key)
{
+ Json_writer_object selectivity_for_column(thd);
+ selectivity_for_column.add("column_name", key->field->field_name);
if (key->type == SEL_ARG::IMPOSSIBLE)
- {
+ {
rows= 0;
table->reginfo.impossible_range= 1;
+ selectivity_for_column.add("selectivity_from_histogram", rows);
+ selectivity_for_column.add("cause", "impossible range");
goto free_alloc;
}
else
{
rows= records_in_column_ranges(&param, idx, key);
if (rows != DBL_MAX)
+ {
key->field->cond_selectivity= rows/table_records;
+ selectivity_for_column.add("selectivity_from_histogram",
+ key->field->cond_selectivity);
+ }
}
}
}
@@ -3155,6 +3546,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
free_root(&alloc, MYF(0));
}
+ selectivity_for_columns.end();
if (quick && (quick->get_type() == QUICK_SELECT_I::QS_TYPE_ROR_UNION ||
quick->get_type() == QUICK_SELECT_I::QS_TYPE_INDEX_MERGE))
@@ -3229,7 +3621,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
table->cond_selectivity_sampling_explain= &dt->list;
}
}
-
+ trace_wrapper.add("cond_selectivity", table->cond_selectivity);
DBUG_RETURN(FALSE);
}
@@ -4560,7 +4952,8 @@ double get_sweep_read_cost(const PARAM *param, ha_rows records)
{
double result;
DBUG_ENTER("get_sweep_read_cost");
- if (param->table->file->primary_key_is_clustered())
+ if (param->table->file->primary_key_is_clustered() ||
+ param->table->file->stats.block_size == 0 /* HEAP */)
{
/*
We are using the primary key to find the rows.
@@ -4590,7 +4983,7 @@ double get_sweep_read_cost(const PARAM *param, ha_rows records)
if (max_cost != DBL_MAX && (busy_blocks+index_reads_cost) >= n_blocks)
return 1;
*/
- JOIN *join= param->thd->lex->select_lex.join;
+ JOIN *join= param->thd->lex->first_select_lex()->join;
if (!join || join->table_count == 1)
{
/* No join, assume reading is done in one 'sweep' */
@@ -4678,7 +5071,7 @@ double get_sweep_read_cost(const PARAM *param, ha_rows records)
static
TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
- double read_time)
+ double read_time, bool named_trace)
{
SEL_TREE **ptree;
TRP_INDEX_MERGE *imerge_trp= NULL;
@@ -4699,6 +5092,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
ha_rows roru_total_records;
double roru_intersect_part= 1.0;
size_t n_child_scans;
+ double limit_read_time= read_time;
+ THD *thd= param->thd;
DBUG_ENTER("get_best_disjunct_quick");
DBUG_PRINT("info", ("Full table scan cost: %g", read_time));
@@ -4725,6 +5120,9 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
n_child_scans)))
DBUG_RETURN(NULL);
+ const char* trace_best_disjunct_obj_name= named_trace ? "best_disjunct_quick" : nullptr;
+ Json_writer_object trace_best_disjunct(thd, trace_best_disjunct_obj_name);
+ Json_writer_array to_merge(thd, "indexes_to_merge");
/*
Collect best 'range' scan for each of disjuncts, and, while doing so,
analyze possibility of ROR scans. Also calculate some values needed by
@@ -4736,6 +5134,7 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
{
DBUG_EXECUTE("info", print_sel_tree(param, *ptree, &(*ptree)->keys_map,
"tree in SEL_IMERGE"););
+ Json_writer_object trace_idx(thd);
if (!(*cur_child= get_key_scans_params(param, *ptree, TRUE, FALSE,
read_time)))
{
@@ -4748,8 +5147,11 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
imerge_too_expensive= TRUE;
}
if (imerge_too_expensive)
+ {
+ trace_idx.add("chosen", false).add("cause", "cost");
continue;
-
+ }
+ const uint keynr_in_table= param->real_keynr[(*cur_child)->key_idx];
imerge_cost += (*cur_child)->read_cost;
all_scans_ror_able &= ((*ptree)->n_ror_scans > 0);
all_scans_rors &= (*cur_child)->is_ror;
@@ -4762,9 +5164,16 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
}
else
non_cpk_scan_records += (*cur_child)->records;
+ trace_idx.add("index_to_merge",
+ param->table->key_info[keynr_in_table].name)
+ .add("cumulated_cost", imerge_cost);
}
+ to_merge.end();
+
DBUG_PRINT("info", ("index_merge scans cost %g", imerge_cost));
+ trace_best_disjunct.add("cost_of_reading_ranges", imerge_cost);
+
if (imerge_too_expensive || (imerge_cost > read_time) ||
((non_cpk_scan_records+cpk_scan_records >=
param->table->stat_records()) &&
@@ -4776,6 +5185,7 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
*/
DBUG_PRINT("info", ("Sum of index_merge scans is more expensive than "
"full table scan, bailing out"));
+ trace_best_disjunct.add("chosen", false).add("cause", "cost");
DBUG_RETURN(NULL);
}
@@ -4788,6 +5198,9 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
optimizer_flag(param->thd, OPTIMIZER_SWITCH_INDEX_MERGE_UNION))
{
roru_read_plans= (TABLE_READ_PLAN**)range_scans;
+ trace_best_disjunct.add("use_roworder_union", true)
+ .add("cause",
+ "always cheaper than non roworder retrieval");
goto skip_to_ror_scan;
}
@@ -4797,16 +5210,26 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
Add one ROWID comparison for each row retrieved on non-CPK scan. (it
is done in QUICK_RANGE_SELECT::row_in_ranges)
*/
- imerge_cost += non_cpk_scan_records / TIME_FOR_COMPARE_ROWID;
+ double rid_comp_cost= static_cast<double>(non_cpk_scan_records) /
+ TIME_FOR_COMPARE_ROWID;
+ imerge_cost+= rid_comp_cost;
+ trace_best_disjunct.add("cost_of_mapping_rowid_in_non_clustered_pk_scan",
+ rid_comp_cost);
}
/* Calculate cost(rowid_to_row_scan) */
- imerge_cost += get_sweep_read_cost(param, non_cpk_scan_records);
+ {
+ double sweep_cost= get_sweep_read_cost(param, non_cpk_scan_records);
+ imerge_cost+= sweep_cost;
+ trace_best_disjunct.add("cost_sort_rowid_and_read_disk", sweep_cost);
+ }
DBUG_PRINT("info",("index_merge cost with rowid-to-row scan: %g",
imerge_cost));
if (imerge_cost > read_time ||
!optimizer_flag(param->thd, OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION))
{
+ trace_best_disjunct.add("use_roworder_index_merge", true);
+ trace_best_disjunct.add("cause", "cost");
goto build_ror_index_merge;
}
@@ -4823,12 +5246,18 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
param->imerge_cost_buff_size= unique_calc_buff_size;
}
- imerge_cost +=
- Unique::get_use_cost(param->imerge_cost_buff, (uint)non_cpk_scan_records,
- param->table->file->ref_length,
- (size_t)param->thd->variables.sortbuff_size,
- TIME_FOR_COMPARE_ROWID,
- FALSE, NULL);
+ {
+ const double dup_removal_cost= Unique::get_use_cost(
+ param->imerge_cost_buff, (uint)non_cpk_scan_records,
+ param->table->file->ref_length,
+ (size_t)param->thd->variables.sortbuff_size,
+ TIME_FOR_COMPARE_ROWID,
+ FALSE, NULL);
+ imerge_cost+= dup_removal_cost;
+ trace_best_disjunct.add("cost_duplicate_removal", dup_removal_cost)
+ .add("total_cost", imerge_cost);
+ }
+
DBUG_PRINT("info",("index_merge total cost: %g (wanted: less then %g)",
imerge_cost, read_time));
if (imerge_cost < read_time)
@@ -4846,7 +5275,7 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
if (imerge_trp)
{
TABLE_READ_PLAN *trp= merge_same_index_scans(param, imerge, imerge_trp,
- read_time);
+ limit_read_time);
if (trp != imerge_trp)
DBUG_RETURN(trp);
}
@@ -4871,11 +5300,16 @@ skip_to_ror_scan:
roru_total_records= 0;
cur_roru_plan= roru_read_plans;
+ Json_writer_array trace_analyze_ror(thd, "analyzing_roworder_scans");
+
/* Find 'best' ROR scan for each of trees in disjunction */
for (ptree= imerge->trees, cur_child= range_scans;
ptree != imerge->trees_next;
ptree++, cur_child++, cur_roru_plan++)
{
+ Json_writer_object trp_info(thd);
+ if (unlikely(thd->trace_started()))
+ (*cur_child)->trace_basic_info(param, &trp_info);
/*
Assume the best ROR scan is the one that has cheapest full-row-retrieval
scan cost.
@@ -4911,7 +5345,7 @@ skip_to_ror_scan:
roru_intersect_part *= (*cur_roru_plan)->records /
param->table->stat_records();
}
-
+ trace_analyze_ror.end();
/*
rows to retrieve=
SUM(rows_in_scan_i) - table_rows * PROD(rows_in_scan_i / table_rows).
@@ -4937,11 +5371,14 @@ skip_to_ror_scan:
DBUG_PRINT("info", ("ROR-union: cost %g, %zu members",
roru_total_cost, n_child_scans));
+ trace_best_disjunct.add("index_roworder_union_cost", roru_total_cost)
+ .add("members", n_child_scans);
TRP_ROR_UNION* roru;
if (roru_total_cost < read_time)
{
if ((roru= new (param->mem_root) TRP_ROR_UNION))
{
+ trace_best_disjunct.add("chosen", true);
roru->first_ror= roru_read_plans;
roru->last_ror= roru_read_plans + n_child_scans;
roru->read_cost= roru_total_cost;
@@ -4949,7 +5386,9 @@ skip_to_ror_scan:
DBUG_RETURN(roru);
}
}
- DBUG_RETURN(imerge_trp);
+ else
+ trace_best_disjunct.add("chosen", false);
+ DBUG_RETURN(imerge_trp);
}
@@ -5040,7 +5479,7 @@ TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge,
DBUG_ASSERT(imerge->trees_next>imerge->trees);
if (imerge->trees_next-imerge->trees > 1)
- trp= get_best_disjunct_quick(param, imerge, read_time);
+ trp= get_best_disjunct_quick(param, imerge, read_time, true);
else
{
/*
@@ -5140,7 +5579,6 @@ typedef struct st_partial_index_intersect_info
intersect_fields= NULL;
records_sent_to_unique= records= length= in_memory= use_cpk_filter= 0;
cost= index_read_cost= in_memory_cost= 0.0;
- filtered_scans.init();
filtered_scans.clear_all();
}
} PARTIAL_INDEX_INTERSECT_INFO;
@@ -5223,6 +5661,17 @@ ha_rows get_table_cardinality_for_index_intersect(TABLE *table)
}
}
+static
+void print_keyparts(THD *thd, KEY *key, uint key_parts)
+{
+ DBUG_ASSERT(thd->trace_started());
+
+ KEY_PART_INFO *part= key->key_part;
+ Json_writer_array keyparts(thd, "keyparts");
+ for(uint i= 0; i < key_parts; i++, part++)
+ keyparts.add(part->field->field_name);
+}
+
static
ha_rows records_in_index_intersect_extension(PARTIAL_INDEX_INTERSECT_INFO *curr,
@@ -5275,8 +5724,9 @@ bool prepare_search_best_index_intersect(PARAM *param,
INDEX_SCAN_INFO *cpk_scan= NULL;
TABLE *table= param->table;
uint n_index_scans= (uint)(tree->index_scans_end - tree->index_scans);
+ THD *thd= param->thd;
- if (!n_index_scans)
+ if (n_index_scans <= 1)
return 1;
init->init();
@@ -5292,9 +5742,6 @@ bool prepare_search_best_index_intersect(PARAM *param,
common->table_cardinality=
get_table_cardinality_for_index_intersect(table);
- if (n_index_scans <= 1)
- return TRUE;
-
if (table->file->primary_key_is_clustered())
{
INDEX_SCAN_INFO **index_scan_end;
@@ -5319,23 +5766,38 @@ bool prepare_search_best_index_intersect(PARAM *param,
bzero(common->search_scans, sizeof(INDEX_SCAN_INFO *) * i);
INDEX_SCAN_INFO **selected_index_scans= common->search_scans;
-
+ Json_writer_array potential_idx_scans(thd, "potential_index_scans");
for (i=0, index_scan= tree->index_scans; i < n_index_scans; i++, index_scan++)
{
+ Json_writer_object idx_scan(thd);
uint used_key_parts= (*index_scan)->used_key_parts;
KEY *key_info= (*index_scan)->key_info;
+ idx_scan.add("index", key_info->name);
if (*index_scan == cpk_scan)
+ {
+ idx_scan.add("chosen", "false")
+ .add("cause", "clustered index used for filtering");
continue;
+ }
if (cpk_scan && cpk_scan->used_key_parts >= used_key_parts &&
same_index_prefix(cpk_scan->key_info, key_info, used_key_parts))
+ {
+ idx_scan.add("chosen", "false")
+ .add("cause", "clustered index used for filtering");
continue;
+ }
+
+ cost= table->quick_index_only_costs[(*index_scan)->keynr];
+
+ idx_scan.add("cost", cost);
- cost= table->file->keyread_time((*index_scan)->keynr,
- (*index_scan)->range_count,
- (*index_scan)->records);
if (cost >= cutoff_cost)
+ {
+ idx_scan.add("chosen", false);
+ idx_scan.add("cause", "cost");
continue;
+ }
for (scan_ptr= selected_index_scans; *scan_ptr ; scan_ptr++)
{
@@ -5352,10 +5814,20 @@ bool prepare_search_best_index_intersect(PARAM *param,
}
if (!*scan_ptr || cost < (*scan_ptr)->index_read_cost)
{
+ idx_scan.add("chosen", true);
+ if (!*scan_ptr)
+ idx_scan.add("cause", "first occurence of index prefix");
+ else
+ idx_scan.add("cause", "better cost for same idx prefix");
*scan_ptr= *index_scan;
(*scan_ptr)->index_read_cost= cost;
}
- }
+ else
+ {
+ idx_scan.add("chosen", false).add("cause", "cost");
+ }
+ }
+ potential_idx_scans.end();
ha_rows records_in_scans= 0;
@@ -5365,6 +5837,7 @@ bool prepare_search_best_index_intersect(PARAM *param,
return TRUE;
records_in_scans+= (*scan_ptr)->records;
}
+
n_search_scans= i;
if (cpk_scan && create_fields_bitmap(param, &cpk_scan->used_fields))
@@ -5394,6 +5867,7 @@ bool prepare_search_best_index_intersect(PARAM *param,
my_qsort(selected_index_scans, n_search_scans, sizeof(INDEX_SCAN_INFO *),
(qsort_cmp) cmp_intersect_index_scan);
+ Json_writer_array selected_idx_scans(thd, "selected_index_scans");
if (cpk_scan)
{
PARTIAL_INDEX_INTERSECT_INFO curr;
@@ -5406,16 +5880,36 @@ bool prepare_search_best_index_intersect(PARAM *param,
curr.length= 1;
for (scan_ptr=selected_index_scans; *scan_ptr; scan_ptr++)
{
+ KEY *key_info= (*scan_ptr)->key_info;
ha_rows scan_records= (*scan_ptr)->records;
ha_rows records= records_in_index_intersect_extension(&curr, *scan_ptr);
(*scan_ptr)->filtered_out= records >= scan_records ?
- 0 : scan_records-records;
+ 0 : scan_records-records;
+ if (thd->trace_started())
+ {
+ Json_writer_object selected_idx(thd);
+ selected_idx.add("index", key_info->name);
+ print_keyparts(thd, key_info, (*scan_ptr)->used_key_parts);
+ selected_idx.add("records", (*scan_ptr)->records)
+ .add("filtered_records", (*scan_ptr)->filtered_out);
+ }
}
}
else
{
for (scan_ptr=selected_index_scans; *scan_ptr; scan_ptr++)
+ {
+ KEY *key_info= (*scan_ptr)->key_info;
(*scan_ptr)->filtered_out= 0;
+ if (thd->trace_started())
+ {
+ Json_writer_object selected_idx(thd);
+ selected_idx.add("index", key_info->name);
+ print_keyparts(thd, key_info, (*scan_ptr)->used_key_parts);
+ selected_idx.add("records", (*scan_ptr)->records)
+ .add("filtered_records", (*scan_ptr)->filtered_out);
+ }
+ }
}
return FALSE;
@@ -5872,10 +6366,12 @@ TRP_INDEX_INTERSECT *get_best_index_intersect(PARAM *param, SEL_TREE *tree,
PARTIAL_INDEX_INTERSECT_INFO init;
TRP_INDEX_INTERSECT *intersect_trp= NULL;
TABLE *table= param->table;
-
+ THD *thd= param->thd;
DBUG_ENTER("get_best_index_intersect");
+ Json_writer_object trace_idx_interect(thd, "analyzing_sort_intersect");
+
if (prepare_search_best_index_intersect(param, tree, &common, &init,
read_time))
DBUG_RETURN(NULL);
@@ -5937,11 +6433,15 @@ TRP_INDEX_INTERSECT *get_best_index_intersect(PARAM *param, SEL_TREE *tree,
if ((intersect_trp= new (param->mem_root)TRP_INDEX_INTERSECT))
{
+
intersect_trp->read_cost= common.best_cost;
intersect_trp->records= common.best_records;
intersect_trp->range_scans= range_scans;
intersect_trp->range_scans_end= cur_range;
intersect_trp->filtered_scans= common.filtered_scans;
+ trace_idx_interect.add("rows", intersect_trp->records)
+ .add("cost", intersect_trp->read_cost)
+ .add("chosen",true);
}
DBUG_RETURN(intersect_trp);
}
@@ -5951,6 +6451,37 @@ typedef struct st_ror_scan_info : INDEX_SCAN_INFO
{
} ROR_SCAN_INFO;
+void TRP_ROR_INTERSECT::trace_basic_info(PARAM *param,
+ Json_writer_object *trace_object) const
+{
+ THD *thd= param->thd;
+ DBUG_ASSERT(trace_object->trace_started());
+
+ trace_object->add("type", "index_roworder_intersect");
+ trace_object->add("rows", records);
+ trace_object->add("cost", read_cost);
+ trace_object->add("covering", is_covering);
+ trace_object->add("clustered_pk_scan", cpk_scan != NULL);
+
+ Json_writer_array smth_trace(thd, "intersect_of");
+ for (ROR_SCAN_INFO **cur_scan= first_scan; cur_scan != last_scan;
+ cur_scan++)
+ {
+ const KEY &cur_key= param->table->key_info[(*cur_scan)->keynr];
+ const KEY_PART_INFO *key_part= cur_key.key_part;
+
+ Json_writer_object trace_isect_idx(thd);
+ trace_isect_idx.add("type", "range_scan");
+ trace_isect_idx.add("index", cur_key.name);
+ trace_isect_idx.add("rows", (*cur_scan)->records);
+
+ Json_writer_array trace_range(thd, "ranges");
+
+ trace_ranges(&trace_range, param, (*cur_scan)->idx,
+ (*cur_scan)->sel_arg, key_part);
+ }
+}
+
/*
Create ROR_SCAN_INFO* structure with a single ROR scan on index idx using
@@ -6336,7 +6867,9 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info,
*/
static bool ror_intersect_add(ROR_INTERSECT_INFO *info,
- ROR_SCAN_INFO* ror_scan, bool is_cpk_scan)
+ ROR_SCAN_INFO* ror_scan,
+ Json_writer_object *trace_costs,
+ bool is_cpk_scan)
{
double selectivity_mult= 1.0;
@@ -6363,13 +6896,16 @@ static bool ror_intersect_add(ROR_INTERSECT_INFO *info,
each record of every scan. Assuming 1/TIME_FOR_COMPARE_ROWID
per check this gives us:
*/
- info->index_scan_costs += rows2double(info->index_records) /
+ const double idx_cost= rows2double(info->index_records) /
TIME_FOR_COMPARE_ROWID;
+ info->index_scan_costs+= idx_cost;
+ trace_costs->add("index_scan_cost", idx_cost);
}
else
{
info->index_records += info->param->quick_rows[ror_scan->keynr];
info->index_scan_costs += ror_scan->index_read_cost;
+ trace_costs->add("index_scan_cost", ror_scan->index_read_cost);
bitmap_union(&info->covered_fields, &ror_scan->covered_fields);
if (!info->is_covering && bitmap_is_subset(&info->param->needed_fields,
&info->covered_fields))
@@ -6380,13 +6916,19 @@ static bool ror_intersect_add(ROR_INTERSECT_INFO *info,
}
info->total_cost= info->index_scan_costs;
+ trace_costs->add("cumulated_index_scan_cost", info->index_scan_costs);
DBUG_PRINT("info", ("info->total_cost: %g", info->total_cost));
if (!info->is_covering)
{
- info->total_cost +=
- get_sweep_read_cost(info->param, double2rows(info->out_rows));
+ double sweep_cost= get_sweep_read_cost(info->param,
+ double2rows(info->out_rows));
+ info->total_cost+= sweep_cost;
+ trace_costs->add("disk_sweep_cost", sweep_cost);
DBUG_PRINT("info", ("info->total_cost= %g", info->total_cost));
}
+ else
+ trace_costs->add("disk_sweep_cost", 0);
+
DBUG_PRINT("info", ("New out_rows: %g", info->out_rows));
DBUG_PRINT("info", ("New cost: %g, %scovering", info->total_cost,
info->is_covering?"" : "non-"));
@@ -6466,10 +7008,16 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
uint idx;
double min_cost= DBL_MAX;
DBUG_ENTER("get_best_ror_intersect");
+ THD *thd= param->thd;
+ Json_writer_object trace_ror(thd, "analyzing_roworder_intersect");
if ((tree->n_ror_scans < 2) || !param->table->stat_records() ||
!optimizer_flag(param->thd, OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT))
- DBUG_RETURN(NULL);
+ {
+ if (tree->n_ror_scans < 2)
+ trace_ror.add("cause", "too few roworder scans");
+ DBUG_RETURN(NULL);
+ }
/*
Step1: Collect ROR-able SEL_ARGs and create ROR_SCAN_INFO for each of
@@ -6544,15 +7092,27 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
ROR_SCAN_INFO **intersect_scans_best;
cur_ror_scan= tree->ror_scans;
intersect_scans_best= intersect_scans;
+ Json_writer_array trace_isect_idx(thd, "intersecting_indexes");
while (cur_ror_scan != tree->ror_scans_end && !intersect->is_covering)
{
+ Json_writer_object trace_idx(thd);
+ trace_idx.add("index",
+ param->table->key_info[(*cur_ror_scan)->keynr].name);
+
/* S= S + first(R); R= R - first(R); */
- if (!ror_intersect_add(intersect, *cur_ror_scan, FALSE))
+ if (!ror_intersect_add(intersect, *cur_ror_scan, &trace_idx, FALSE))
{
+ trace_idx.add("usable", false)
+ .add("cause", "does not reduce cost of intersect");
cur_ror_scan++;
continue;
}
+ trace_idx.add("cumulative_total_cost", intersect->total_cost)
+ .add("usable", true)
+ .add("matching_rows_now", intersect->out_rows)
+ .add("intersect_covering_with_this_index", intersect->is_covering);
+
*(intersect_scans_end++)= *(cur_ror_scan++);
if (intersect->total_cost < min_cost)
@@ -6561,12 +7121,21 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
ror_intersect_cpy(intersect_best, intersect);
intersect_scans_best= intersect_scans_end;
min_cost = intersect->total_cost;
+ trace_idx.add("chosen", true);
+ }
+ else
+ {
+ trace_idx.add("chosen", false)
+ .add("cause", "does not reduce cost");
}
}
+ trace_isect_idx.end();
if (intersect_scans_best == intersect_scans)
{
DBUG_PRINT("info", ("None of scans increase selectivity"));
+ trace_ror.add("chosen", false)
+ .add("cause","does not increase selectivity");
DBUG_RETURN(NULL);
}
@@ -6584,16 +7153,31 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
Check if we should add a CPK scan. If the obtained ROR-intersection is
covering, it doesn't make sense to add CPK scan.
*/
+ Json_writer_object trace_cpk(thd, "clustered_pk");
if (cpk_scan && !intersect->is_covering)
{
- if (ror_intersect_add(intersect, cpk_scan, TRUE) &&
+ if (ror_intersect_add(intersect, cpk_scan, &trace_cpk, TRUE) &&
(intersect->total_cost < min_cost))
+ {
+ trace_cpk.add("clustered_pk_scan_added_to_intersect", true)
+ .add("cumulated_cost", intersect->total_cost);
intersect_best= intersect; //just set pointer here
+ }
else
+ {
+ trace_cpk.add("clustered_pk_added_to_intersect", false)
+ .add("cause", "cost");
cpk_scan= 0; // Don't use cpk_scan
+ }
}
else
+ {
+ trace_cpk.add("clustered_pk_added_to_intersect", false)
+ .add("cause", cpk_scan ? "roworder is covering"
+ : "no clustered pk index");
cpk_scan= 0; // Don't use cpk_scan
+ }
+ trace_cpk.end();
/* Ok, return ROR-intersect plan if we have found one */
TRP_ROR_INTERSECT *trp= NULL;
@@ -6620,6 +7204,17 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
DBUG_PRINT("info", ("Returning non-covering ROR-intersect plan:"
"cost %g, records %lu",
trp->read_cost, (ulong) trp->records));
+ trace_ror.add("rows", trp->records)
+ .add("cost", trp->read_cost)
+ .add("covering", trp->is_covering)
+ .add("chosen", true);
+ }
+ else
+ {
+ trace_ror.add("chosen", false)
+ .add("cause", (read_time > min_cost)
+ ? "too few indexes to merge"
+ : "cost");
}
DBUG_RETURN(trp);
}
@@ -6809,6 +7404,7 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
UNINIT_VAR(best_buf_size); /* protected by key_to_read */
TRP_RANGE* read_plan= NULL;
DBUG_ENTER("get_key_scans_params");
+ THD *thd= param->thd;
/*
Note that there may be trees that have type SEL_TREE::KEY but contain no
key reads at all, e.g. tree for expression "key1 is not null" where key1
@@ -6816,6 +7412,8 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
*/
DBUG_EXECUTE("info", print_sel_tree(param, tree, &tree->keys_map,
"tree scans"););
+ Json_writer_array range_scan_alt(thd, "range_scan_alternatives");
+
tree->ror_scans_map.clear_all();
tree->n_ror_scans= 0;
tree->index_scans= 0;
@@ -6825,7 +7423,8 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
(INDEX_SCAN_INFO **) alloc_root(param->mem_root,
sizeof(INDEX_SCAN_INFO *) * param->keys);
}
- tree->index_scans_end= tree->index_scans;
+ tree->index_scans_end= tree->index_scans;
+
for (idx= 0; idx < param->keys; idx++)
{
SEL_ARG *key= tree->keys[idx];
@@ -6835,6 +7434,7 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
Cost_estimate cost;
double found_read_time;
uint mrr_flags, buf_size;
+ bool is_ror_scan= FALSE;
INDEX_SCAN_INFO *index_scan;
uint keynr= param->real_keynr[idx];
if (key->type == SEL_ARG::MAYBE_KEY ||
@@ -6844,11 +7444,14 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
bool read_index_only= index_read_must_be_used ? TRUE :
(bool) param->table->covering_keys.is_set(keynr);
+ Json_writer_object trace_idx(thd);
+ trace_idx.add("index", param->table->key_info[keynr].name);
+
found_records= check_quick_select(param, idx, read_index_only, key,
for_range_access, &mrr_flags,
- &buf_size, &cost);
+ &buf_size, &cost, &is_ror_scan);
- if (!for_range_access && !param->is_ror_scan &&
+ if (!for_range_access && !is_ror_scan &&
!optimizer_flag(param->thd,OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION))
{
/* The scan is not a ROR-scan, just skip it */
@@ -6859,16 +7462,31 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
(index_scan= (INDEX_SCAN_INFO *)alloc_root(param->mem_root,
sizeof(INDEX_SCAN_INFO))))
{
+ Json_writer_array trace_range(thd, "ranges");
+
+ const KEY &cur_key= param->table->key_info[keynr];
+ const KEY_PART_INFO *key_part= cur_key.key_part;
+
index_scan->idx= idx;
index_scan->keynr= keynr;
index_scan->key_info= &param->table->key_info[keynr];
- index_scan->used_key_parts= param->max_key_part+1;
+ index_scan->used_key_parts= param->max_key_parts;
index_scan->range_count= param->range_count;
index_scan->records= found_records;
index_scan->sel_arg= key;
*tree->index_scans_end++= index_scan;
- }
- if ((found_records != HA_POS_ERROR) && param->is_ror_scan)
+
+ if (unlikely(thd->trace_started()))
+ trace_ranges(&trace_range, param, idx, key, key_part);
+ trace_range.end();
+
+ trace_idx.add("rowid_ordered", is_ror_scan)
+ .add("using_mrr", !(mrr_flags & HA_MRR_USE_DEFAULT_IMPL))
+ .add("index_only", read_index_only)
+ .add("rows", found_records)
+ .add("cost", cost.total_cost());
+ }
+ if ((found_records != HA_POS_ERROR) && is_ror_scan)
{
tree->n_ror_scans++;
tree->ror_scans_map.set_bit(idx);
@@ -6882,6 +7500,20 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
best_idx= idx;
best_mrr_flags= mrr_flags;
best_buf_size= buf_size;
+ trace_idx.add("chosen", true);
+ }
+ else
+ {
+ trace_idx.add("chosen", false);
+ if (found_records == HA_POS_ERROR)
+ {
+ if (key->type == SEL_ARG::Type::MAYBE_KEY)
+ trace_idx.add("cause", "depends on unread values");
+ else
+ trace_idx.add("cause", "unknown");
+ }
+ else
+ trace_idx.add("cause", "cost");
}
}
}
@@ -6986,10 +7618,11 @@ QUICK_SELECT_I *TRP_ROR_INTERSECT::make_quick(PARAM *param,
"creating ROR-intersect",
first_scan, last_scan););
alloc= parent_alloc? parent_alloc: &quick_intrsect->alloc;
- for (; first_scan != last_scan;++first_scan)
+ for (ROR_SCAN_INFO **curr_scan= first_scan; curr_scan != last_scan;
+ ++curr_scan)
{
- if (!(quick= get_quick_select(param, (*first_scan)->idx,
- (*first_scan)->sel_arg,
+ if (!(quick= get_quick_select(param, (*curr_scan)->idx,
+ (*curr_scan)->sel_arg,
HA_MRR_USE_DEFAULT_IMPL | HA_MRR_SORTED,
0, alloc)) ||
quick_intrsect->push_quick_back(alloc, quick))
@@ -7077,6 +7710,21 @@ SEL_TREE *Item_bool_func::get_ne_mm_tree(RANGE_OPT_PARAM *param,
}
+SEL_TREE *Item_func_ne::get_func_mm_tree(RANGE_OPT_PARAM *param,
+ Field *field, Item *value)
+{
+ DBUG_ENTER("Item_func_ne::get_func_mm_tree");
+ /*
+ If this condition is a "col1<>...", where there is a UNIQUE KEY(col1),
+ do not construct a SEL_TREE from it. A condition that excludes just one
+ row in the table is not selective (unless there are only a few rows)
+ */
+ if (is_field_an_unique_index(param, field))
+ DBUG_RETURN(NULL);
+ DBUG_RETURN(get_ne_mm_tree(param, field, value, value));
+}
+
+
SEL_TREE *Item_func_between::get_func_mm_tree(RANGE_OPT_PARAM *param,
Field *field, Item *value)
{
@@ -7175,28 +7823,16 @@ SEL_TREE *Item_func_in::get_func_mm_tree(RANGE_OPT_PARAM *param,
DBUG_RETURN(0);
/*
- If this is "unique_key NOT IN (...)", do not consider it sargable (for
- any index, not just the unique one). The logic is as follows:
+ if this is a "col1 NOT IN (...)", and there is a UNIQUE KEY(col1), do
+ not constuct a SEL_TREE from it. The rationale is as follows:
- if there are only a few constants, this condition is not selective
(unless the table is also very small in which case we won't gain
anything)
- - If there are a lot of constants, the overhead of building and
+ - if there are a lot of constants, the overhead of building and
processing enormous range list is not worth it.
*/
- if (param->using_real_indexes)
- {
- key_map::Iterator it(field->key_start);
- uint key_no;
- while ((key_no= it++) != key_map::Iterator::BITMAP_END)
- {
- KEY *key_info= &field->table->key_info[key_no];
- if (key_info->user_defined_key_parts == 1 &&
- (key_info->flags & HA_NOSAME))
- {
- DBUG_RETURN(0);
- }
- }
- }
+ if (is_field_an_unique_index(param, field))
+ DBUG_RETURN(0);
/* Get a SEL_TREE for "(-inf|NULL) < X < c_0" interval. */
uint i=0;
@@ -7914,6 +8550,38 @@ SEL_TREE *Item_equal::get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr)
}
+/*
+ @brief
+ Check if there is an one-segment unique key that matches the field exactly
+
+ @detail
+ In the future we could also add "almost unique" indexes where any value is
+ present only in a few rows (but necessarily exactly one row)
+*/
+static bool is_field_an_unique_index(RANGE_OPT_PARAM *param, Field *field)
+{
+ DBUG_ENTER("is_field_an_unique_index");
+
+ // The check for using_real_indexes is there because of the heuristics
+ // this function is used for.
+ if (param->using_real_indexes)
+ {
+ key_map::Iterator it(field->key_start);
+ uint key_no;
+ while ((key_no= it++) != key_map::Iterator::BITMAP_END)
+ {
+ KEY *key_info= &field->table->key_info[key_no];
+ if (key_info->user_defined_key_parts == 1 &&
+ (key_info->flags & HA_NOSAME))
+ {
+ DBUG_RETURN(true);
+ }
+ }
+ }
+ DBUG_RETURN(false);
+}
+
+
SEL_TREE *
Item_bool_func::get_mm_parts(RANGE_OPT_PARAM *param, Field *field,
Item_func::Functype type, Item *value)
@@ -8110,52 +8778,112 @@ Item_func_like::get_mm_leaf(RANGE_OPT_PARAM *param,
SEL_ARG *
Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param,
Field *field, KEY_PART *key_part,
- Item_func::Functype type, Item *value)
+ Item_func::Functype functype, Item *value)
{
- uint maybe_null=(uint) field->real_maybe_null();
- SEL_ARG *tree= 0;
- MEM_ROOT *alloc= param->mem_root;
- uchar *str;
- int err;
DBUG_ENTER("Item_bool_func::get_mm_leaf");
-
DBUG_ASSERT(value); // IS NULL and IS NOT NULL are handled separately
-
if (key_part->image_type != Field::itRAW)
DBUG_RETURN(0); // e.g. SPATIAL index
+ DBUG_RETURN(field->get_mm_leaf(param, key_part, this,
+ functype_to_scalar_comparison_op(functype),
+ value));
+}
- if (param->using_real_indexes &&
- !field->optimize_range(param->real_keynr[key_part->key],
- key_part->part) &&
- type != EQ_FUNC &&
- type != EQUAL_FUNC)
- goto end; // Can't optimize this
- if (!field->can_optimize_range(this, value,
- type == EQUAL_FUNC || type == EQ_FUNC))
- goto end;
+bool Field::can_optimize_scalar_range(const RANGE_OPT_PARAM *param,
+ const KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op,
+ const Item *value) const
+{
+ bool is_eq_func= op == SCALAR_CMP_EQ || op == SCALAR_CMP_EQUAL;
+ if ((param->using_real_indexes &&
+ !optimize_range(param->real_keynr[key_part->key],
+ key_part->part) && !is_eq_func) ||
+ !can_optimize_range(cond, value, is_eq_func))
+ return false;
+ return true;
+}
+
+
+uchar *Field::make_key_image(MEM_ROOT *mem_root, const KEY_PART *key_part)
+{
+ DBUG_ENTER("Field::make_key_image");
+ uint maybe_null= (uint) real_maybe_null();
+ uchar *str;
+ if (!(str= (uchar*) alloc_root(mem_root, key_part->store_length + 1)))
+ DBUG_RETURN(0);
+ if (maybe_null)
+ *str= (uchar) is_real_null(); // Set to 1 if null
+ get_key_image(str + maybe_null, key_part->length, key_part->image_type);
+ DBUG_RETURN(str);
+}
- err= value->save_in_field_no_warnings(field, 1);
+
+SEL_ARG *Field::stored_field_make_mm_leaf_truncated(RANGE_OPT_PARAM *param,
+ scalar_comparison_op op,
+ Item *value)
+{
+ DBUG_ENTER("Field::stored_field_make_mm_leaf_truncated");
+ if ((op == SCALAR_CMP_EQ || op == SCALAR_CMP_EQUAL) &&
+ value->result_type() == item_cmp_type(result_type(),
+ value->result_type()))
+ DBUG_RETURN(new (param->mem_root) SEL_ARG_IMPOSSIBLE(this));
+ /*
+ TODO: We should return trees of the type SEL_ARG::IMPOSSIBLE
+ for the cases like int_field > 999999999999999999999999 as well.
+ */
+ DBUG_RETURN(0);
+}
+
+
+SEL_ARG *Field_num::get_mm_leaf(RANGE_OPT_PARAM *prm, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value)
+{
+ DBUG_ENTER("Field_num::get_mm_leaf");
+ if (!can_optimize_scalar_range(prm, key_part, cond, op, value))
+ DBUG_RETURN(0);
+ int err= value->save_in_field_no_warnings(this, 1);
+ if ((op != SCALAR_CMP_EQUAL && is_real_null()) || err < 0)
+ DBUG_RETURN(&null_element);
+ if (err > 0 && cmp_type() != value->result_type())
+ DBUG_RETURN(stored_field_make_mm_leaf_truncated(prm, op, value));
+ DBUG_RETURN(stored_field_make_mm_leaf(prm, key_part, op, value));
+}
+
+
+SEL_ARG *Field_temporal::get_mm_leaf(RANGE_OPT_PARAM *prm, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value)
+{
+ DBUG_ENTER("Field_temporal::get_mm_leaf");
+ if (!can_optimize_scalar_range(prm, key_part, cond, op, value))
+ DBUG_RETURN(0);
+ int err= value->save_in_field_no_warnings(this, 1);
+ if ((op != SCALAR_CMP_EQUAL && is_real_null()) || err < 0)
+ DBUG_RETURN(&null_element);
if (err > 0)
- {
- if (field->type_handler() == &type_handler_enum ||
- field->type_handler() == &type_handler_set)
- {
- if (type == EQ_FUNC || type == EQUAL_FUNC)
- tree= new (alloc) SEL_ARG_IMPOSSIBLE(field);
- goto end;
- }
+ DBUG_RETURN(stored_field_make_mm_leaf_truncated(prm, op, value));
+ DBUG_RETURN(stored_field_make_mm_leaf(prm, key_part, op, value));
+}
- if (err == 2 && field->cmp_type() == STRING_RESULT)
- {
- if (type == EQ_FUNC || type == EQUAL_FUNC)
- tree= new (alloc) SEL_ARG_IMPOSSIBLE(field);
- else
- tree= NULL; /* Cannot infer anything */
- goto end;
- }
- if (err == 3 && field->type() == FIELD_TYPE_DATE)
+SEL_ARG *Field_date_common::get_mm_leaf(RANGE_OPT_PARAM *prm,
+ KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op,
+ Item *value)
+{
+ DBUG_ENTER("Field_date_common::get_mm_leaf");
+ if (!can_optimize_scalar_range(prm, key_part, cond, op, value))
+ DBUG_RETURN(0);
+ int err= value->save_in_field_no_warnings(this, 1);
+ if ((op != SCALAR_CMP_EQUAL && is_real_null()) || err < 0)
+ DBUG_RETURN(&null_element);
+ if (err > 0)
+ {
+ if (err == 3)
{
/*
We were saving DATETIME into a DATE column, the conversion went ok
@@ -8175,76 +8903,86 @@ Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param,
be done together with other types at the end of this function
(grep for stored_field_cmp_to_item)
*/
- if (type == EQ_FUNC || type == EQUAL_FUNC)
- {
- tree= new (alloc) SEL_ARG_IMPOSSIBLE(field);
- goto end;
- }
- // Continue with processing non-equality ranges
- }
- else if (field->cmp_type() != value->result_type())
- {
- if ((type == EQ_FUNC || type == EQUAL_FUNC) &&
- value->result_type() == item_cmp_type(field->result_type(),
- value->result_type()))
- {
- tree= new (alloc) SEL_ARG_IMPOSSIBLE(field);
- goto end;
- }
- else
- {
- /*
- TODO: We should return trees of the type SEL_ARG::IMPOSSIBLE
- for the cases like int_field > 999999999999999999999999 as well.
- */
- tree= 0;
- goto end;
- }
- }
-
- /*
- guaranteed at this point: err > 0; field and const of same type
- If an integer got bounded (e.g. to within 0..255 / -128..127)
- for < or >, set flags as for <= or >= (no NEAR_MAX / NEAR_MIN)
- */
- else if (err == 1 && field->result_type() == INT_RESULT)
- {
- if (type == LT_FUNC && (value->val_int() > 0))
- type= LE_FUNC;
- else if (type == GT_FUNC &&
- (field->type() != FIELD_TYPE_BIT) &&
- !((Field_num*)field)->unsigned_flag &&
- !((Item_int*)value)->unsigned_flag &&
- (value->val_int() < 0))
- type= GE_FUNC;
+ if (op == SCALAR_CMP_EQ || op == SCALAR_CMP_EQUAL)
+ DBUG_RETURN(new (prm->mem_root) SEL_ARG_IMPOSSIBLE(this));
+ DBUG_RETURN(stored_field_make_mm_leaf(prm, key_part, op, value));
}
+ DBUG_RETURN(stored_field_make_mm_leaf_truncated(prm, op, value));
}
- else if (err < 0)
+ DBUG_RETURN(stored_field_make_mm_leaf(prm, key_part, op, value));
+}
+
+
+SEL_ARG *Field_str::get_mm_leaf(RANGE_OPT_PARAM *prm, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value)
+{
+ DBUG_ENTER("Field_str::get_mm_leaf");
+ if (!can_optimize_scalar_range(prm, key_part, cond, op, value))
+ DBUG_RETURN(0);
+ int err= value->save_in_field_no_warnings(this, 1);
+ if ((op != SCALAR_CMP_EQUAL && is_real_null()) || err < 0)
+ DBUG_RETURN(&null_element);
+ if (err > 0)
{
- /* This happens when we try to insert a NULL field in a not null column */
- tree= &null_element; // cmp with NULL is never TRUE
- goto end;
+ if (op == SCALAR_CMP_EQ || op == SCALAR_CMP_EQUAL)
+ DBUG_RETURN(new (prm->mem_root) SEL_ARG_IMPOSSIBLE(this));
+ DBUG_RETURN(NULL); /* Cannot infer anything */
}
+ DBUG_RETURN(stored_field_make_mm_leaf(prm, key_part, op, value));
+}
- /*
- Any sargable predicate except "<=>" involving NULL as a constant is always
- FALSE
- */
- if (type != EQUAL_FUNC && field->is_real_null())
+
+SEL_ARG *Field::get_mm_leaf_int(RANGE_OPT_PARAM *prm, KEY_PART *key_part,
+ const Item_bool_func *cond,
+ scalar_comparison_op op, Item *value,
+ bool unsigned_field)
+{
+ DBUG_ENTER("Field::get_mm_leaf_int");
+ if (!can_optimize_scalar_range(prm, key_part, cond, op, value))
+ DBUG_RETURN(0);
+ int err= value->save_in_field_no_warnings(this, 1);
+ if ((op != SCALAR_CMP_EQUAL && is_real_null()) || err < 0)
+ DBUG_RETURN(&null_element);
+ if (err > 0)
{
- tree= &null_element;
- goto end;
+ if (value->result_type() != INT_RESULT)
+ DBUG_RETURN(stored_field_make_mm_leaf_truncated(prm, op, value));
+ else
+ DBUG_RETURN(stored_field_make_mm_leaf_bounded_int(prm, key_part,
+ op, value,
+ unsigned_field));
}
-
- str= (uchar*) alloc_root(alloc, key_part->store_length+1);
- if (!str)
- goto end;
- if (maybe_null)
- *str= (uchar) field->is_real_null(); // Set to 1 if null
- field->get_key_image(str+maybe_null, key_part->length,
- key_part->image_type);
- if (!(tree= new (alloc) SEL_ARG(field, str, str)))
- goto end; // out of memory
+ if (value->result_type() != INT_RESULT)
+ DBUG_RETURN(stored_field_make_mm_leaf(prm, key_part, op, value));
+ DBUG_RETURN(stored_field_make_mm_leaf_exact(prm, key_part, op, value));
+}
+
+
+/*
+ This method is called when:
+ - value->save_in_field_no_warnings() returned err > 0
+ - and both field and "value" are of integer data types
+ If an integer got bounded (e.g. to within 0..255 / -128..127)
+ for < or >, set flags as for <= or >= (no NEAR_MAX / NEAR_MIN)
+*/
+
+SEL_ARG *Field::stored_field_make_mm_leaf_bounded_int(RANGE_OPT_PARAM *param,
+ KEY_PART *key_part,
+ scalar_comparison_op op,
+ Item *value,
+ bool unsigned_field)
+{
+ DBUG_ENTER("Field::stored_field_make_mm_leaf_bounded_int");
+ if (op == SCALAR_CMP_EQ || op == SCALAR_CMP_EQUAL) // e.g. tinyint = 200
+ DBUG_RETURN(new (param->mem_root) SEL_ARG_IMPOSSIBLE(this));
+ longlong item_val= value->val_int();
+
+ if (op == SCALAR_CMP_LT && item_val > 0)
+ op= SCALAR_CMP_LE; // e.g. rewrite (tinyint < 200) to (tinyint <= 127)
+ else if (op == SCALAR_CMP_GT && !unsigned_field &&
+ !value->unsigned_flag && item_val < 0)
+ op= SCALAR_CMP_GE; // e.g. rewrite (tinyint > -200) to (tinyint >= -128)
/*
Check if we are comparing an UNSIGNED integer with a negative constant.
@@ -8257,66 +8995,74 @@ Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param,
negative integers (which otherwise fails because at query execution time
negative integers are cast to unsigned if compared with unsigned).
*/
- if (field->result_type() == INT_RESULT &&
- value->result_type() == INT_RESULT &&
- ((field->type() == FIELD_TYPE_BIT ||
- ((Field_num *) field)->unsigned_flag) &&
- !((Item_int*) value)->unsigned_flag))
+ if (unsigned_field && !value->unsigned_flag && item_val < 0)
{
- longlong item_val= value->val_int();
- if (item_val < 0)
- {
- if (type == LT_FUNC || type == LE_FUNC)
- {
- tree->type= SEL_ARG::IMPOSSIBLE;
- goto end;
- }
- if (type == GT_FUNC || type == GE_FUNC)
- {
- tree= 0;
- goto end;
- }
- }
+ if (op == SCALAR_CMP_LT || op == SCALAR_CMP_LE) // e.g. uint < -1
+ DBUG_RETURN(new (param->mem_root) SEL_ARG_IMPOSSIBLE(this));
+ if (op == SCALAR_CMP_GT || op == SCALAR_CMP_GE) // e.g. uint > -1
+ DBUG_RETURN(0);
}
+ DBUG_RETURN(stored_field_make_mm_leaf_exact(param, key_part, op, value));
+}
- switch (type) {
- case LT_FUNC:
- if (stored_field_cmp_to_item(param->thd, field, value) == 0)
- tree->max_flag=NEAR_MAX;
- /* fall through */
- case LE_FUNC:
- if (!maybe_null)
- tree->min_flag=NO_MIN_RANGE; /* From start */
- else
- { // > NULL
- tree->min_value=is_null_string;
- tree->min_flag=NEAR_MIN;
- }
- break;
- case GT_FUNC:
- /* Don't use open ranges for partial key_segments */
- if ((!(key_part->flag & HA_PART_KEY_SEG)) &&
- (stored_field_cmp_to_item(param->thd, field, value) <= 0))
- tree->min_flag=NEAR_MIN;
- tree->max_flag= NO_MAX_RANGE;
- break;
- case GE_FUNC:
- /* Don't use open ranges for partial key_segments */
- if ((!(key_part->flag & HA_PART_KEY_SEG)) &&
- (stored_field_cmp_to_item(param->thd, field, value) < 0))
- tree->min_flag= NEAR_MIN;
- tree->max_flag=NO_MAX_RANGE;
- break;
- case EQ_FUNC:
- case EQUAL_FUNC:
- break;
- default:
- DBUG_ASSERT(0);
+
+SEL_ARG *Field::stored_field_make_mm_leaf(RANGE_OPT_PARAM *param,
+ KEY_PART *key_part,
+ scalar_comparison_op op,
+ Item *value)
+{
+ DBUG_ENTER("Field::stored_field_make_mm_leaf");
+ THD *thd= param->thd;
+ MEM_ROOT *mem_root= param->mem_root;
+ uchar *str;
+ if (!(str= make_key_image(param->mem_root, key_part)))
+ DBUG_RETURN(0);
+
+ switch (op) {
+ case SCALAR_CMP_LE:
+ DBUG_RETURN(new (mem_root) SEL_ARG_LE(str, this));
+ case SCALAR_CMP_LT:
+ DBUG_RETURN(new (mem_root) SEL_ARG_LT(thd, str, this, value));
+ case SCALAR_CMP_GT:
+ DBUG_RETURN(new (mem_root) SEL_ARG_GT(thd, str, key_part, this, value));
+ case SCALAR_CMP_GE:
+ DBUG_RETURN(new (mem_root) SEL_ARG_GE(thd, str, key_part, this, value));
+ case SCALAR_CMP_EQ:
+ case SCALAR_CMP_EQUAL:
+ DBUG_RETURN(new (mem_root) SEL_ARG(this, str, str));
break;
}
+ DBUG_ASSERT(0);
+ DBUG_RETURN(NULL);
+}
-end:
- DBUG_RETURN(tree);
+
+SEL_ARG *Field::stored_field_make_mm_leaf_exact(RANGE_OPT_PARAM *param,
+ KEY_PART *key_part,
+ scalar_comparison_op op,
+ Item *value)
+{
+ DBUG_ENTER("Field::stored_field_make_mm_leaf_exact");
+ uchar *str;
+ if (!(str= make_key_image(param->mem_root, key_part)))
+ DBUG_RETURN(0);
+
+ switch (op) {
+ case SCALAR_CMP_LE:
+ DBUG_RETURN(new (param->mem_root) SEL_ARG_LE(str, this));
+ case SCALAR_CMP_LT:
+ DBUG_RETURN(new (param->mem_root) SEL_ARG_LT(str, this));
+ case SCALAR_CMP_GT:
+ DBUG_RETURN(new (param->mem_root) SEL_ARG_GT(str, key_part, this));
+ case SCALAR_CMP_GE:
+ DBUG_RETURN(new (param->mem_root) SEL_ARG_GE(str, this));
+ case SCALAR_CMP_EQ:
+ case SCALAR_CMP_EQUAL:
+ DBUG_RETURN(new (param->mem_root) SEL_ARG(this, str, str));
+ break;
+ }
+ DBUG_ASSERT(0);
+ DBUG_RETURN(NULL);
}
@@ -8435,6 +9181,11 @@ int and_range_trees(RANGE_OPT_PARAM *param, SEL_TREE *tree1, SEL_TREE *tree2,
if (key && key->type == SEL_ARG::IMPOSSIBLE)
{
result->type= SEL_TREE::IMPOSSIBLE;
+ if (param->using_real_indexes)
+ {
+ param->table->with_impossible_ranges.set_bit(param->
+ real_keynr[key_no]);
+ }
DBUG_RETURN(1);
}
result_keys.set_bit(key_no);
@@ -10433,7 +11184,8 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
static
ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
SEL_ARG *tree, bool update_tbl_stats,
- uint *mrr_flags, uint *bufsize, Cost_estimate *cost)
+ uint *mrr_flags, uint *bufsize, Cost_estimate *cost,
+ bool *is_ror_scan)
{
SEL_ARG_RANGE_SEQ seq;
RANGE_SEQ_IF seq_if = {NULL, sel_arg_range_seq_init, sel_arg_range_seq_next, 0, 0};
@@ -10442,7 +11194,6 @@ ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
uint keynr= param->real_keynr[idx];
DBUG_ENTER("check_quick_select");
- param->is_ror_scan= FALSE;
/* Handle cases when we don't have a valid non-empty list of range */
if (!tree)
DBUG_RETURN(HA_POS_ERROR);
@@ -10457,11 +11208,11 @@ ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
seq.start= tree;
param->range_count=0;
- param->max_key_part=0;
+ param->max_key_parts=0;
- param->is_ror_scan= TRUE;
+ seq.is_ror_scan= TRUE;
if (file->index_flags(keynr, 0, TRUE) & HA_KEY_SCAN_NOT_ROR)
- param->is_ror_scan= FALSE;
+ seq.is_ror_scan= FALSE;
*mrr_flags= param->force_default_mrr? HA_MRR_USE_DEFAULT_IMPL: 0;
/*
@@ -10470,9 +11221,13 @@ ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
*mrr_flags|= HA_MRR_NO_ASSOCIATION | HA_MRR_SORTED;
bool pk_is_clustered= file->primary_key_is_clustered();
+ // TODO: param->max_key_parts holds 0 now, and not the #keyparts used.
+ // Passing wrong second argument to index_flags() makes no difference for
+ // most storage engines but might be an issue for MyRocks with certain
+ // datatypes.
if (index_only &&
- (file->index_flags(keynr, param->max_key_part, 1) & HA_KEYREAD_ONLY) &&
- !(file->index_flags(keynr, param->max_key_part, 1) & HA_CLUSTERED_INDEX))
+ (file->index_flags(keynr, param->max_key_parts, 1) & HA_KEYREAD_ONLY) &&
+ !(file->index_flags(keynr, param->max_key_parts, 1) & HA_CLUSTERED_INDEX))
*mrr_flags |= HA_MRR_INDEX_ONLY;
if (param->thd->lex->sql_command != SQLCOM_SELECT)
@@ -10503,12 +11258,16 @@ ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
if (update_tbl_stats)
{
param->table->quick_keys.set_bit(keynr);
- param->table->quick_key_parts[keynr]= param->max_key_part+1;
+ param->table->quick_key_parts[keynr]= param->max_key_parts;
param->table->quick_n_ranges[keynr]= param->range_count;
param->table->quick_condition_rows=
MY_MIN(param->table->quick_condition_rows, rows);
param->table->quick_rows[keynr]= rows;
param->table->quick_costs[keynr]= cost->total_cost();
+ if (keynr == param->table->s->primary_key && pk_is_clustered)
+ param->table->quick_index_only_costs[keynr]= 0;
+ else
+ param->table->quick_index_only_costs[keynr]= cost->index_only_cost();
}
}
/* Figure out if the key scan is ROR (returns rows in ROWID order) or not */
@@ -10520,12 +11279,12 @@ ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
TODO: Don't have this logic here, make table engines return
appropriate flags instead.
*/
- param->is_ror_scan= FALSE;
+ seq.is_ror_scan= FALSE;
}
else if (param->table->s->primary_key == keynr && pk_is_clustered)
{
/* Clustered PK scan is always a ROR scan (TODO: same as above) */
- param->is_ror_scan= TRUE;
+ seq.is_ror_scan= TRUE;
}
else if (param->range_count > 1)
{
@@ -10535,8 +11294,9 @@ ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
(1,3)" returns ROR order for all records with x=1, then ROR
order for records with x=3
*/
- param->is_ror_scan= FALSE;
+ seq.is_ror_scan= FALSE;
}
+ *is_ror_scan= seq.is_ror_scan;
DBUG_PRINT("exit", ("Records: %lu", (ulong) rows));
DBUG_RETURN(rows); //psergey-merge:todo: maintain first_null_comp.
@@ -10588,6 +11348,9 @@ static bool is_key_scan_ror(PARAM *param, uint keynr, uint8 nparts)
table_key->user_defined_key_parts);
uint pk_number;
+ if (param->table->file->ha_table_flags() & HA_NON_COMPARABLE_ROWID)
+ return false;
+
for (KEY_PART_INFO *kp= table_key->key_part; kp < key_part; kp++)
{
uint16 fieldnr= param->table->key_info[keynr].
@@ -11477,7 +12240,6 @@ int QUICK_RANGE_SELECT::reset()
HANDLER_BUFFER empty_buf;
MY_BITMAP * const save_read_set= head->read_set;
MY_BITMAP * const save_write_set= head->write_set;
- MY_BITMAP * const save_vcol_set= head->vcol_set;
DBUG_ENTER("QUICK_RANGE_SELECT::reset");
last_range= NULL;
cur_range= (QUICK_RANGE**) ranges.buffer;
@@ -11491,8 +12253,7 @@ int QUICK_RANGE_SELECT::reset()
}
if (in_ror_merged_scan)
- head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap,
- &column_bitmap);
+ head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap);
if (file->inited == handler::NONE)
{
@@ -11538,8 +12299,7 @@ int QUICK_RANGE_SELECT::reset()
err:
/* Restore bitmaps set on entry */
if (in_ror_merged_scan)
- head->column_bitmaps_set_no_signal(save_read_set, save_write_set,
- save_vcol_set);
+ head->column_bitmaps_set_no_signal(save_read_set, save_write_set);
DBUG_RETURN(error);
}
@@ -11570,16 +12330,13 @@ int QUICK_RANGE_SELECT::get_next()
MY_BITMAP * const save_read_set= head->read_set;
MY_BITMAP * const save_write_set= head->write_set;
- MY_BITMAP * const save_vcol_set= head->vcol_set;
/*
We don't need to signal the bitmap change as the bitmap is always the
same for this head->file
*/
- head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap,
- &column_bitmap);
+ head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap);
result= file->multi_range_read_next(&dummy);
- head->column_bitmaps_set_no_signal(save_read_set, save_write_set,
- save_vcol_set);
+ head->column_bitmaps_set_no_signal(save_read_set, save_write_set);
DBUG_RETURN(result);
}
@@ -12515,16 +13272,27 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
DBUG_ENTER("get_best_group_min_max");
+ Json_writer_object trace_group(thd, "group_index_range");
+ const char* cause= NULL;
+
/* Perform few 'cheap' tests whether this access method is applicable. */
- if (!join)
- DBUG_RETURN(NULL); /* This is not a select statement. */
- if ((join->table_count != 1) || /* The query must reference one table. */
- (join->select_lex->olap == ROLLUP_TYPE)) /* Check (B3) for ROLLUP */
+ if (!join) /* This is not a select statement. */
+ cause= "no join";
+ else if (join->table_count != 1) /* The query must reference one table. */
+ cause= "not single_table";
+ else if (join->select_lex->olap == ROLLUP_TYPE) /* Check (B3) for ROLLUP */
+ cause= "rollup";
+ else if (table->s->keys == 0) /* There are no indexes to use. */
+ cause= "no index";
+ else if (join->conds && join->conds->used_tables()
+ & OUTER_REF_TABLE_BIT) /* Cannot execute with correlated conditions. */
+ cause= "correlated conditions";
+
+ if (cause)
+ {
+ trace_group.add("chosen", false).add("cause", cause);
DBUG_RETURN(NULL);
- if (table->s->keys == 0) /* There are no indexes to use. */
- DBUG_RETURN(NULL);
- if (join->conds && join->conds->used_tables() & OUTER_REF_TABLE_BIT)
- DBUG_RETURN(NULL); /* Cannot execute with correlated conditions. */
+ }
/* Check (SA1,SA4) and store the only MIN/MAX argument - the C attribute.*/
List_iterator<Item> select_items_it(join->fields_list);
@@ -12533,7 +13301,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
if ((!join->group_list) && /* Neither GROUP BY nor a DISTINCT query. */
(!join->select_distinct) &&
!is_agg_distinct)
+ {
+ trace_group.add("chosen", false).add("cause","no group by or distinct");
DBUG_RETURN(NULL);
+ }
/* Analyze the query in more detail. */
if (join->sum_funcs[0])
@@ -12552,7 +13323,11 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
min_max_item->sum_func() == Item_sum::AVG_DISTINCT_FUNC))
continue;
else
+ {
+ trace_group.add("chosen", false)
+ .add("cause", "not applicable aggregate function");
DBUG_RETURN(NULL);
+ }
/* The argument of MIN/MAX. */
Item *expr= min_max_item->get_arg(0)->real_item();
@@ -12561,26 +13336,41 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
if (! min_max_arg_item)
min_max_arg_item= (Item_field*) expr;
else if (! min_max_arg_item->eq(expr, 1))
+ {
+ trace_group.add("chosen", false)
+ .add("cause", "arguments different in min max function");
DBUG_RETURN(NULL);
+ }
}
else
+ {
+ trace_group.add("chosen", false)
+ .add("cause", "no field item in min max function");
DBUG_RETURN(NULL);
+ }
}
}
/* Check (SA7). */
if (is_agg_distinct && (have_max || have_min))
{
+ trace_group.add("chosen", false)
+ .add("cause", "have both agg distinct and min max");
DBUG_RETURN(NULL);
}
/* Check (SA5). */
if (join->select_distinct)
{
+ trace_group.add("distinct_query", true);
while ((item= select_items_it++))
{
if (item->real_item()->type() != Item::FIELD_ITEM)
+ {
+ trace_group.add("chosen", false)
+ .add("cause", "distinct field is expression");
DBUG_RETURN(NULL);
+ }
}
}
@@ -12589,7 +13379,11 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
for (tmp_group= join->group_list; tmp_group; tmp_group= tmp_group->next)
{
if ((*tmp_group->item)->real_item()->type() != Item::FIELD_ITEM)
+ {
+ trace_group.add("chosen", false)
+ .add("cause", "group field is expression");
DBUG_RETURN(NULL);
+ }
elements_in_group++;
}
@@ -12611,10 +13405,16 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
ha_rows cur_quick_prefix_records= 0;
// We go through allowed indexes
+ Json_writer_array trace_indexes(thd, "potential_group_range_indexes");
+
for (uint cur_param_idx= 0; cur_param_idx < param->keys ; ++cur_param_idx)
{
const uint cur_index= param->real_keynr[cur_param_idx];
KEY *const cur_index_info= &table->key_info[cur_index];
+
+ Json_writer_object trace_idx(thd);
+ trace_idx.add("index", cur_index_info->name);
+
KEY_PART_INFO *cur_part;
KEY_PART_INFO *end_part; /* Last part for loops. */
/* Last index part. */
@@ -12639,7 +13439,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
*/
if (!table->covering_keys.is_set(cur_index) ||
!table->keys_in_use_for_group_by.is_set(cur_index))
- continue;
+ {
+ cause= "not covering";
+ goto next_index;
+ }
/*
This function is called on the precondition that the index is covering.
@@ -12647,7 +13450,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
these are duplicates. The GROUP BY list cannot be a prefix of the index.
*/
if (elements_in_group > table->actual_n_key_parts(cur_index_info))
- continue;
+ {
+ cause= "group key parts greater than index key parts";
+ goto next_index;
+ }
/*
Unless extended keys can be used for cur_index:
@@ -12673,10 +13479,15 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
*/
if (bitmap_is_set(table->read_set, cur_field->field_index) &&
!cur_field->part_of_key_not_clustered.is_set(cur_index))
+ {
+ cause= "not covering";
goto next_index; // Field was not part of key
+ }
}
}
+ trace_idx.add("covering", true);
+
max_key_part= 0;
used_key_parts_map.clear_all();
@@ -12707,7 +13518,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
used_key_parts_map.set_bit(max_key_part);
}
else
+ {
+ cause= "group attribute not prefix in index";
goto next_index;
+ }
}
}
/*
@@ -12736,7 +13550,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
/* not doing loose index scan for derived tables */
if (!item_field->field)
+ {
+ cause= "derived table";
goto next_index;
+ }
/* Find the order of the key part in the index. */
key_part_nr= get_field_keypart(cur_index_info, item_field->field);
@@ -12748,7 +13565,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
continue;
if (key_part_nr < 1 ||
(!is_agg_distinct && key_part_nr > join->fields_list.elements))
+ {
+ cause= "select attribute not prefix in index";
goto next_index;
+ }
cur_part= cur_index_info->key_part + key_part_nr - 1;
cur_group_prefix_len+= cur_part->store_length;
used_key_parts_map.set_bit(key_part_nr);
@@ -12773,7 +13593,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
{
key_part_nr= get_field_keypart(cur_index_info, min_max_arg_item->field);
if (key_part_nr <= cur_group_key_parts)
+ {
+ cause= "aggregate column not suffix in idx";
goto next_index;
+ }
min_max_arg_part= cur_index_info->key_part + key_part_nr - 1;
}
@@ -12784,6 +13607,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
if (cur_index_info->flags & HA_NOSAME &&
cur_group_key_parts == cur_index_info->user_defined_key_parts)
{
+ cause= "using unique index";
goto next_index;
}
@@ -12823,7 +13647,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
last_part, thd, cur_key_infix,
&cur_key_infix_len,
&first_non_infix_part))
+ {
+ cause= "nonconst equality gap attribute";
goto next_index;
+ }
}
else if (min_max_arg_part &&
(min_max_arg_part - first_non_group_part > 0))
@@ -12832,6 +13659,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
There is a gap but no range tree, thus no predicates at all for the
non-group keyparts.
*/
+ cause= "no nongroup keypart predicate";
goto next_index;
}
else if (first_non_group_part && join->conds)
@@ -12855,7 +13683,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
/* Check if cur_part is referenced in the WHERE clause. */
if (join->conds->walk(&Item::find_item_in_field_list_processor, 0,
key_part_range))
+ {
+ cause= "keypart reference from where clause";
goto next_index;
+ }
}
}
@@ -12870,7 +13701,10 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
for (; cur_part != last_part; cur_part++)
{
if (bitmap_is_set(table->read_set, cur_part->field->field_index))
+ {
+ cause= "keypart after infix in query";
goto next_index;
+ }
}
}
@@ -12887,6 +13721,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
index_range_tree, &cur_range) ||
(cur_range && cur_range->type != SEL_ARG::KEY_RANGE))
{
+ cause= "minmax keypart in disjunctive query";
goto next_index;
}
}
@@ -12904,11 +13739,20 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
Cost_estimate dummy_cost;
uint mrr_flags= HA_MRR_USE_DEFAULT_IMPL;
uint mrr_bufsize=0;
+ bool is_ror_scan= FALSE;
cur_quick_prefix_records= check_quick_select(param, cur_param_idx,
FALSE /*don't care*/,
cur_index_tree, TRUE,
&mrr_flags, &mrr_bufsize,
- &dummy_cost);
+ &dummy_cost, &is_ror_scan);
+ if (unlikely(cur_index_tree && thd->trace_started()))
+ {
+ Json_writer_array trace_range(thd, "ranges");
+
+ const KEY_PART_INFO *key_part= cur_index_info->key_part;
+ trace_ranges(&trace_range, param, cur_param_idx,
+ cur_index_tree, key_part);
+ }
}
cost_group_min_max(table, cur_index_info, cur_used_key_parts,
cur_group_key_parts, tree, cur_index_tree,
@@ -12919,6 +13763,8 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
Do not compare doubles directly because they may have different
representations (64 vs. 80 bits).
*/
+ trace_idx.add("rows", cur_records).add("cost", cur_read_cost);
+
if (cur_read_cost < best_read_cost - (DBL_EPSILON * cur_read_cost))
{
index_info= cur_index_info;
@@ -12936,8 +13782,16 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
used_key_parts= cur_used_key_parts;
}
- next_index:;
+ next_index:
+ if (cause)
+ {
+ trace_idx.add("usable", false).add("cause", cause);
+ cause= NULL;
+ }
}
+
+ trace_indexes.end();
+
if (!index_info) /* No usable index found. */
DBUG_RETURN(NULL);
@@ -12948,14 +13802,22 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
(index_info->flags & HA_SPATIAL) ?
Field::itMBR : Field::itRAW,
&has_min_max_fld, &has_other_fld))
+ {
+ trace_group.add("usable", false)
+ .add("cause", "unsupported predicate on agg attribute");
DBUG_RETURN(NULL);
+ }
/*
Check (SA6) if clustered key is used
*/
if (is_agg_distinct && index == table->s->primary_key &&
table->file->primary_key_is_clustered())
+ {
+ trace_group.add("usable", false)
+ .add("cause", "index is clustered");
DBUG_RETURN(NULL);
+ }
/* The query passes all tests, so construct a new TRP object. */
read_plan= new (param->mem_root)
@@ -12976,6 +13838,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
read_plan->records= best_records;
if (read_time < best_read_cost && is_agg_distinct)
{
+ trace_group.add("index_scan", true);
read_plan->read_cost= 0;
read_plan->use_index_scan();
}
@@ -13169,7 +14032,8 @@ check_group_min_max_predicates(Item *cond, Item_field *min_max_arg_item,
if (args[0] && args[1]) // this is a binary function or BETWEEN
{
- DBUG_ASSERT(pred->is_bool_type());
+ DBUG_ASSERT(pred->fixed_type_handler());
+ DBUG_ASSERT(pred->fixed_type_handler()->is_bool_type());
Item_bool_func *bool_func= (Item_bool_func*) pred;
Field *field= min_max_arg_item->field;
if (!args[2]) // this is a binary function
@@ -13583,7 +14447,7 @@ void cost_group_min_max(TABLE* table, KEY *index_info, uint used_key_parts,
1/double(2*TIME_FOR_COMPARE);
const double cpu_cost= num_groups *
- (tree_traversal_cost + 1/double(TIME_FOR_COMPARE));
+ (tree_traversal_cost + 1/double(TIME_FOR_COMPARE_IDX));
*read_cost= io_cost + cpu_cost;
*records= num_groups;
@@ -15039,7 +15903,6 @@ static void print_quick(QUICK_SELECT_I *quick, const key_map *needed_reg)
DBUG_VOID_RETURN;
}
-
void QUICK_RANGE_SELECT::dbug_dump(int indent, bool verbose)
{
/* purecov: begin inspected */
@@ -15167,3 +16030,221 @@ void QUICK_GROUP_MIN_MAX_SELECT::dbug_dump(int indent, bool verbose)
}
#endif /* !DBUG_OFF */
+
+
+/*
+ @brief Print the comparison operator for the min range
+*/
+
+static void print_min_range_operator(String *out, const ha_rkey_function flag)
+{
+ if (flag == HA_READ_AFTER_KEY)
+ out->append(STRING_WITH_LEN(" < "));
+ else if (flag == HA_READ_KEY_EXACT || flag == HA_READ_KEY_OR_NEXT)
+ out->append(STRING_WITH_LEN(" <= "));
+ else
+ out->append(STRING_WITH_LEN(" ? "));
+}
+
+
+/*
+ @brief Print the comparison operator for the max range
+*/
+
+static void print_max_range_operator(String *out, const ha_rkey_function flag)
+{
+ if (flag == HA_READ_BEFORE_KEY)
+ out->append(STRING_WITH_LEN(" < "));
+ else if (flag == HA_READ_AFTER_KEY)
+ out->append(STRING_WITH_LEN(" <= "));
+ else
+ out->append(STRING_WITH_LEN(" ? "));
+}
+
+
+static
+void print_range(String *out, const KEY_PART_INFO *key_part,
+ KEY_MULTI_RANGE *range, uint n_key_parts)
+{
+ uint flag= range->range_flag;
+ String key_name;
+ key_name.set_charset(system_charset_info);
+ key_part_map keypart_map= range->start_key.keypart_map |
+ range->end_key.keypart_map;
+
+ if (flag & GEOM_FLAG)
+ {
+ /*
+ The flags of GEOM ranges do not work the same way as for other
+ range types, so printing "col < some_geom" doesn't make sense.
+ Just print the column name, not operator.
+ */
+ print_keyparts_name(out, key_part, n_key_parts, keypart_map);
+ out->append(STRING_WITH_LEN(" "));
+ print_key_value(out, key_part, range->start_key.key,
+ range->start_key.length);
+ return;
+ }
+
+ if (range->start_key.length)
+ {
+ print_key_value(out, key_part, range->start_key.key,
+ range->start_key.length);
+ print_min_range_operator(out, range->start_key.flag);
+ }
+
+ print_keyparts_name(out, key_part, n_key_parts, keypart_map);
+
+ if (range->end_key.length)
+ {
+ print_max_range_operator(out, range->end_key.flag);
+ print_key_value(out, key_part, range->end_key.key,
+ range->end_key.length);
+ }
+}
+
+
+/*
+ @brief Print range created for non-indexed columns
+
+ @param
+ out output string
+ field field for which the range is printed
+ range range for the field
+*/
+
+static
+void print_range_for_non_indexed_field(String *out, Field *field,
+ KEY_MULTI_RANGE *range)
+{
+ TABLE *table= field->table;
+ MY_BITMAP *old_sets[2];
+ dbug_tmp_use_all_columns(table, old_sets, &table->read_set, &table->write_set);
+
+ if (range->start_key.length)
+ {
+ field->print_key_part_value(out, range->start_key.key, field->key_length());
+ print_min_range_operator(out, range->start_key.flag);
+ }
+
+ out->append(field->field_name);
+
+ if (range->end_key.length)
+ {
+ print_max_range_operator(out, range->end_key.flag);
+ field->print_key_part_value(out, range->end_key.key, field->key_length());
+ }
+ dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
+}
+
+
+
+/*
+
+ Add ranges to the trace
+ For ex:
+ lets say we have an index a_b(a,b)
+ query: select * from t1 where a=2 and b=4 ;
+ so we create a range:
+ (2,4) <= (a,b) <= (2,4)
+ this is added to the trace
+*/
+
+static void trace_ranges(Json_writer_array *range_trace,
+ PARAM *param, uint idx,
+ SEL_ARG *keypart,
+ const KEY_PART_INFO *key_parts)
+{
+ SEL_ARG_RANGE_SEQ seq;
+ KEY_MULTI_RANGE range;
+ range_seq_t seq_it;
+ uint flags= 0;
+ RANGE_SEQ_IF seq_if = {NULL, sel_arg_range_seq_init,
+ sel_arg_range_seq_next, 0, 0};
+ KEY *keyinfo= param->table->key_info + param->real_keynr[idx];
+ uint n_key_parts= param->table->actual_n_key_parts(keyinfo);
+ DBUG_ASSERT(range_trace->trace_started());
+ seq.keyno= idx;
+ seq.real_keyno= param->real_keynr[idx];
+ seq.param= param;
+ seq.start= keypart;
+ /*
+ is_ror_scan is set to FALSE here, because we are only interested
+ in iterating over all the ranges and printing them.
+ */
+ seq.is_ror_scan= FALSE;
+ const KEY_PART_INFO *cur_key_part= key_parts + keypart->part;
+ seq_it= seq_if.init((void *) &seq, 0, flags);
+
+ while (!seq_if.next(seq_it, &range))
+ {
+ StringBuffer<128> range_info(system_charset_info);
+ print_range(&range_info, cur_key_part, &range, n_key_parts);
+ range_trace->add(range_info.c_ptr_safe(), range_info.length());
+ }
+}
+
+/**
+ Print a key to a string
+
+ @param[out] out String the key is appended to
+ @param[in] key_part Index components description
+ @param[in] key Key tuple
+ @param[in] used_length length of the key tuple
+*/
+
+static void print_key_value(String *out, const KEY_PART_INFO *key_part,
+ const uchar* key, uint used_length)
+{
+ out->append(STRING_WITH_LEN("("));
+ Field *field= key_part->field;
+ StringBuffer<128> tmp(system_charset_info);
+ TABLE *table= field->table;
+ uint store_length;
+ MY_BITMAP *old_sets[2];
+ dbug_tmp_use_all_columns(table, old_sets, &table->read_set, &table->write_set);
+ const uchar *key_end= key+used_length;
+
+ for (; key < key_end; key+=store_length, key_part++)
+ {
+ field= key_part->field;
+ store_length= key_part->store_length;
+
+ field->print_key_part_value(out, key, key_part->length);
+
+ if (key + store_length < key_end)
+ out->append(STRING_WITH_LEN(","));
+ }
+ dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
+ out->append(STRING_WITH_LEN(")"));
+}
+
+/**
+ Print key parts involed in a range
+ @param[out] out String the key is appended to
+ @param[in] key_part Index components description
+ @param[in] n_keypart Number of keyparts in index
+ @param[in] keypart_map map for keyparts involved in the range
+*/
+
+void print_keyparts_name(String *out, const KEY_PART_INFO *key_part,
+ uint n_keypart, key_part_map keypart_map)
+{
+ uint i;
+ out->append(STRING_WITH_LEN("("));
+ bool first_keypart= TRUE;
+ for (i=0; i < n_keypart; key_part++, i++)
+ {
+ if (keypart_map & (1 << i))
+ {
+ if (first_keypart)
+ first_keypart= FALSE;
+ else
+ out->append(STRING_WITH_LEN(","));
+ out->append(key_part->field->field_name);
+ }
+ else
+ break;
+ }
+ out->append(STRING_WITH_LEN(")"));
+}
diff --git a/sql/opt_range.h b/sql/opt_range.h
index 84b1cd08ba8..11d9f80865a 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -458,6 +458,9 @@ public:
SEL_ARG *key_tree= first();
uint res= key_tree->store_min(key[key_tree->part].store_length,
range_key, *range_key_flag);
+ // add flags only if a key_part is written to the buffer
+ if (!res)
+ return 0;
*range_key_flag|= key_tree->min_flag;
if (key_tree->next_key_part &&
key_tree->next_key_part->type == SEL_ARG::KEY_RANGE &&
@@ -480,7 +483,9 @@ public:
SEL_ARG *key_tree= last();
uint res=key_tree->store_max(key[key_tree->part].store_length,
range_key, *range_key_flag);
- (*range_key_flag)|= key_tree->max_flag;
+ if (!res)
+ return 0;
+ *range_key_flag|= key_tree->max_flag;
if (key_tree->next_key_part &&
key_tree->next_key_part->type == SEL_ARG::KEY_RANGE &&
key_tree->part != last_part &&
@@ -566,7 +571,7 @@ public:
FALSE Otherwise
*/
- bool is_singlepoint()
+ bool is_singlepoint() const
{
/*
Check for NEAR_MIN ("strictly less") and NO_MIN_RANGE (-inf < field)
@@ -1646,7 +1651,8 @@ class SQL_SELECT :public Sql_alloc {
{
key_map tmp;
tmp.set_all();
- return test_quick_select(thd, tmp, 0, limit, force_quick_range, FALSE, FALSE) < 0;
+ return test_quick_select(thd, tmp, 0, limit, force_quick_range,
+ FALSE, FALSE, FALSE) < 0;
}
/*
RETURN
@@ -1663,7 +1669,8 @@ class SQL_SELECT :public Sql_alloc {
}
int test_quick_select(THD *thd, key_map keys, table_map prev_tables,
ha_rows limit, bool force_quick_range,
- bool ordered_output, bool remove_false_parts_of_where);
+ bool ordered_output, bool remove_false_parts_of_where,
+ bool only_single_index_range_scan);
};
diff --git a/sql/opt_range_mrr.cc b/sql/opt_range_mrr.cc
index 85c1eec3ff3..20413f5df63 100644
--- a/sql/opt_range_mrr.cc
+++ b/sql/opt_range_mrr.cc
@@ -53,6 +53,11 @@ typedef struct st_sel_arg_range_seq
int i; /* Index of last used element in the above array */
bool at_start; /* TRUE <=> The traversal has just started */
+ /*
+ Iteration functions will set this to FALSE
+ if ranges being traversed do not allow to construct a ROR-scan"
+ */
+ bool is_ror_scan;
} SEL_ARG_RANGE_SEQ;
@@ -74,7 +79,7 @@ range_seq_t sel_arg_range_seq_init(void *init_param, uint n_ranges, uint flags)
SEL_ARG_RANGE_SEQ *seq= (SEL_ARG_RANGE_SEQ*)init_param;
seq->param->range_count=0;
seq->at_start= TRUE;
- seq->param->max_key_part= 0;
+ seq->param->max_key_parts= 0;
seq->stack[0].key_tree= NULL;
seq->stack[0].min_key= seq->param->min_key;
seq->stack[0].min_key_flag= 0;
@@ -166,7 +171,7 @@ bool sel_arg_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
seq->i--;
step_down_to(seq, key_tree->next);
key_tree= key_tree->next;
- seq->param->is_ror_scan= FALSE;
+ seq->is_ror_scan= FALSE;
goto walk_right_n_up;
}
@@ -208,7 +213,7 @@ walk_right_n_up:
!memcmp(cur[-1].min_key, cur[-1].max_key, len) &&
!key_tree->min_flag && !key_tree->max_flag))
{
- seq->param->is_ror_scan= FALSE;
+ seq->is_ror_scan= FALSE;
if (!key_tree->min_flag)
cur->min_key_parts +=
key_tree->next_key_part->store_min_key(seq->param->key[seq->keyno],
@@ -243,6 +248,7 @@ walk_up_n_right:
uint min_key_length= (uint)(cur->min_key - seq->param->min_key);
range->ptr= (char*)(intptr)(key_tree->part);
+ uint max_key_parts;
if (cur->min_key_flag & GEOM_FLAG)
{
range->range_flag= cur->min_key_flag;
@@ -252,10 +258,11 @@ walk_up_n_right:
range->start_key.length= min_key_length;
range->start_key.keypart_map= make_prev_keypart_map(cur->min_key_parts);
range->start_key.flag= (ha_rkey_function) (cur->min_key_flag ^ GEOM_FLAG);
+ max_key_parts= cur->min_key_parts;
}
else
{
- range->range_flag= cur->min_key_flag | cur->max_key_flag;
+ max_key_parts= MY_MAX(cur->min_key_parts, cur->max_key_parts);
range->start_key.key= seq->param->min_key;
range->start_key.length= (uint)(cur->min_key - seq->param->min_key);
@@ -291,6 +298,7 @@ walk_up_n_right:
!memcmp(seq->param->min_key, seq->param->max_key, // (2)
range->start_key.length);
+ range->range_flag= 0;
if (is_eq_range_pred)
{
range->range_flag = EQ_RANGE;
@@ -313,7 +321,7 @@ walk_up_n_right:
range->range_flag |= UNIQUE_RANGE | (cur->min_key_flag & NULL_RANGE);
}
- if (seq->param->is_ror_scan)
+ if (seq->is_ror_scan)
{
/*
If we get here, the condition on the key was converted to form
@@ -328,11 +336,11 @@ walk_up_n_right:
(range->start_key.length == range->end_key.length) &&
!memcmp(range->start_key.key, range->end_key.key, range->start_key.length) &&
is_key_scan_ror(seq->param, seq->real_keyno, key_tree->part + 1)))
- seq->param->is_ror_scan= FALSE;
+ seq->is_ror_scan= FALSE;
}
}
seq->param->range_count++;
- seq->param->max_key_part=MY_MAX(seq->param->max_key_part,key_tree->part);
+ seq->param->max_key_parts= MY_MAX(seq->param->max_key_parts, max_key_parts);
return 0;
}
diff --git a/sql/opt_split.cc b/sql/opt_split.cc
index 875b2e14a4b..a356335855c 100644
--- a/sql/opt_split.cc
+++ b/sql/opt_split.cc
@@ -204,7 +204,7 @@ struct SplM_field_info
struct SplM_plan_info
{
/* The cached splitting execution plan P */
- struct st_position *best_positions;
+ POSITION *best_positions;
/* The cost of the above plan */
double cost;
/* Selectivity of splitting used in P */
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 6b085117132..1c03b0bb4a3 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -34,6 +34,7 @@
#include "opt_subselect.h"
#include "sql_test.h"
#include <my_bit.h>
+#include "opt_trace.h"
/*
This file contains optimizations for semi-join subqueries.
@@ -438,7 +439,7 @@ Currently, solution #2 is implemented.
LEX_CSTRING weedout_key= {STRING_WITH_LEN("weedout_key")};
static
-bool subquery_types_allow_materialization(Item_in_subselect *in_subs);
+bool subquery_types_allow_materialization(THD *thd, Item_in_subselect *in_subs);
static bool replace_where_subcondition(JOIN *, Item **, Item *, Item *, bool);
static int subq_sj_candidate_cmp(Item_in_subselect* el1, Item_in_subselect* el2,
void *arg);
@@ -515,8 +516,9 @@ bool is_materialization_applicable(THD *thd, Item_in_subselect *in_subs,
if (optimizer_flag(thd, OPTIMIZER_SWITCH_MATERIALIZATION) && // 0
!child_select->is_part_of_union() && // 1
parent_unit->first_select()->leaf_tables.elements && // 2
+ child_select->outer_select() &&
child_select->outer_select()->table_list.first && // 2A
- subquery_types_allow_materialization(in_subs) &&
+ subquery_types_allow_materialization(thd, in_subs) &&
(in_subs->is_top_level_item() || //3
optimizer_flag(thd,
OPTIMIZER_SWITCH_PARTIAL_MATCH_ROWID_MERGE) || //3
@@ -587,7 +589,8 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
{
Item_in_subselect *in_subs= NULL;
Item_allany_subselect *allany_subs= NULL;
- switch (subselect->substype()) {
+ Item_subselect::subs_type substype= subselect->substype();
+ switch (substype) {
case Item_subselect::IN_SUBS:
in_subs= (Item_in_subselect *)subselect;
break;
@@ -599,6 +602,26 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
break;
}
+ /*
+ Try removing "ORDER BY" or even "ORDER BY ... LIMIT" from certain kinds
+ of subqueries. The removal might enable further transformations.
+ */
+ if (substype == Item_subselect::IN_SUBS ||
+ substype == Item_subselect::EXISTS_SUBS ||
+ substype == Item_subselect::ANY_SUBS ||
+ substype == Item_subselect::ALL_SUBS)
+ {
+ // (1) - ORDER BY without LIMIT can be removed from IN/EXISTS subqueries
+ // (2) - for EXISTS, can also remove "ORDER BY ... LIMIT n",
+ // but cannot remove "ORDER BY ... LIMIT n OFFSET m"
+ if (!select_lex->select_limit || // (1)
+ (substype == Item_subselect::EXISTS_SUBS && // (2)
+ !select_lex->offset_limit)) // (2)
+ {
+ select_lex->join->order= 0;
+ select_lex->join->skip_sort_order= 1;
+ }
+ }
/* Resolve expressions and perform semantic analysis for IN query */
if (in_subs != NULL)
@@ -677,7 +700,7 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
{
DBUG_PRINT("info", ("Subquery is semi-join conversion candidate"));
- (void)subquery_types_allow_materialization(in_subs);
+ (void)subquery_types_allow_materialization(thd, in_subs);
in_subs->is_flattenable_semijoin= TRUE;
@@ -692,6 +715,19 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
thd->restore_active_arena(arena, &backup);
in_subs->is_registered_semijoin= TRUE;
}
+
+ /*
+ Print the transformation into trace. Do it when we've just set
+ is_registered_semijoin=TRUE above, and also do it when we've already
+ had it set.
+ */
+ if (in_subs->is_registered_semijoin)
+ {
+ OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform,
+ select_lex->select_number,
+ "IN (SELECT)", "semijoin");
+ trace_transform.add("chosen", true);
+ }
}
else
{
@@ -817,18 +853,23 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
*/
static
-bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
+bool subquery_types_allow_materialization(THD* thd, Item_in_subselect *in_subs)
{
DBUG_ENTER("subquery_types_allow_materialization");
- DBUG_ASSERT(in_subs->left_expr->fixed);
+ DBUG_ASSERT(in_subs->left_expr->is_fixed());
List_iterator<Item> it(in_subs->unit->first_select()->item_list);
uint elements= in_subs->unit->first_select()->item_list.elements;
+ const char* cause= NULL;
in_subs->types_allow_materialization= FALSE; // Assign default values
in_subs->sjm_scan_allowed= FALSE;
+ OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform,
+ in_subs->get_select_lex()->select_number,
+ "IN (SELECT)", "materialization");
+
/*
The checks here must be kept in sync with the one in
Item_func_in::in_predicate_to_in_subs_transformer().
@@ -844,13 +885,16 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
all_are_fields &= (outer->real_item()->type() == Item::FIELD_ITEM &&
inner->real_item()->type() == Item::FIELD_ITEM);
total_key_length += inner->max_length;
-
if (!inner->
type_handler()->
subquery_type_allows_materialization(inner,
outer,
converted_from_in_predicate))
+ {
+ trace_transform.add("possible", false);
+ trace_transform.add("cause", "types mismatch");
DBUG_RETURN(FALSE);
+ }
}
/*
@@ -860,14 +904,23 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
Make sure that the length of the key for the temp_table is atleast
greater than 0.
*/
- if (!total_key_length || total_key_length > tmp_table_max_key_length() ||
- elements > tmp_table_max_key_parts())
- DBUG_RETURN(FALSE);
-
- in_subs->types_allow_materialization= TRUE;
- in_subs->sjm_scan_allowed= all_are_fields;
- DBUG_PRINT("info",("subquery_types_allow_materialization: ok, allowed"));
- DBUG_RETURN(TRUE);
+ if (!total_key_length)
+ cause= "zero length key for materialized table";
+ else if (total_key_length > tmp_table_max_key_length())
+ cause= "length of key greater than allowed key length for materialized tables";
+ else if (elements > tmp_table_max_key_parts())
+ cause= "#keyparts greater than allowed key parts for materialized tables";
+ else
+ {
+ in_subs->types_allow_materialization= TRUE;
+ in_subs->sjm_scan_allowed= all_are_fields;
+ trace_transform.add("sjm_scan_allowed", all_are_fields)
+ .add("possible", true);
+ DBUG_PRINT("info",("subquery_types_allow_materialization: ok, allowed"));
+ DBUG_RETURN(TRUE);
+ }
+ trace_transform.add("possible", false).add("cause", cause);
+ DBUG_RETURN(FALSE);
}
@@ -907,7 +960,7 @@ bool make_in_exists_conversion(THD *thd, JOIN *join, Item_in_subselect *item)
/*
We're going to finalize IN->EXISTS conversion.
Normally, IN->EXISTS conversion takes place inside the
- Item_subselect::fix_fields() call, where item_subselect->fixed==FALSE (as
+ Item_subselect::fix_fields() call, where item_subselect->is_fixed()==FALSE (as
fix_fields() haven't finished yet) and item_subselect->changed==FALSE (as
the conversion haven't been finalized)
@@ -934,7 +987,7 @@ bool make_in_exists_conversion(THD *thd, JOIN *join, Item_in_subselect *item)
item->fixed= 1;
Item *substitute= item->substitution;
- bool do_fix_fields= !item->substitution->fixed;
+ bool do_fix_fields= !item->substitution->is_fixed();
/*
The Item_subselect has already been wrapped with Item_in_optimizer, so we
should search for item->optimizer, not 'item'.
@@ -1217,15 +1270,31 @@ bool convert_join_subqueries_to_semijoins(JOIN *join)
/* Stop processing if we've reached a subquery that's attached to the ON clause */
if (in_subq->do_not_convert_to_sj)
+ {
+ OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform,
+ in_subq->get_select_lex()->select_number,
+ "IN (SELECT)", "semijoin");
+ trace_transform.add("converted_to_semi_join", false)
+ .add("cause", "subquery attached to the ON clause");
break;
+ }
if (in_subq->is_flattenable_semijoin)
{
+ OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform,
+ in_subq->get_select_lex()->select_number,
+ "IN (SELECT)", "semijoin");
if (join->table_count +
in_subq->unit->first_select()->join->table_count >= MAX_TABLES)
+ {
+ trace_transform.add("converted_to_semi_join", false);
+ trace_transform.add("cause",
+ "table in parent join now exceeds MAX_TABLES");
break;
+ }
if (convert_subq_to_sj(join, in_subq))
goto restore_arena_and_fail;
+ trace_transform.add("converted_to_semi_join", true);
}
else
{
@@ -1270,7 +1339,7 @@ bool convert_join_subqueries_to_semijoins(JOIN *join)
in_subq->fixed= 1;
Item *substitute= in_subq->substitution;
- bool do_fix_fields= !in_subq->substitution->fixed;
+ bool do_fix_fields= !in_subq->substitution->is_fixed();
Item **tree= (in_subq->emb_on_expr_nest == NO_JOIN_NEST)?
&join->conds : &(in_subq->emb_on_expr_nest->on_expr);
Item *replace_me= in_subq->original_item();
@@ -1808,7 +1877,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
subq_lex->ref_pointer_array[i]);
if (!item_eq)
goto restore_tl_and_exit;
- DBUG_ASSERT(subq_pred->left_expr->element_index(i)->fixed);
+ DBUG_ASSERT(subq_pred->left_expr->element_index(i)->is_fixed());
if (subq_pred->left_expr_orig->element_index(i) !=
subq_pred->left_expr->element_index(i))
thd->change_item_tree(item_eq->arguments(),
@@ -2139,12 +2208,15 @@ int pull_out_semijoin_tables(JOIN *join)
TABLE_LIST *sj_nest;
DBUG_ENTER("pull_out_semijoin_tables");
List_iterator<TABLE_LIST> sj_list_it(join->select_lex->sj_nests);
-
+
/* Try pulling out of the each of the semi-joins */
while ((sj_nest= sj_list_it++))
{
List_iterator<TABLE_LIST> child_li(sj_nest->nested_join->join_list);
TABLE_LIST *tbl;
+ Json_writer_object trace_wrapper(join->thd);
+ Json_writer_object trace(join->thd, "semijoin_table_pullout");
+ Json_writer_array trace_arr(join->thd, "pulled_out_tables");
/*
Don't do table pull-out for nested joins (if we get nested joins here, it
@@ -2243,7 +2315,8 @@ int pull_out_semijoin_tables(JOIN *join)
pulled_a_table= TRUE;
pulled_tables |= tbl->table->map;
DBUG_PRINT("info", ("Table %s pulled out (reason: func dep)",
- tbl->table->alias.c_ptr()));
+ tbl->table->alias.c_ptr_safe()));
+ trace_arr.add(tbl->table->alias.c_ptr_safe());
/*
Pulling a table out of uncorrelated subquery in general makes
makes it correlated. See the NOTE to this funtion.
@@ -2349,8 +2422,15 @@ int pull_out_semijoin_tables(JOIN *join)
bool optimize_semijoin_nests(JOIN *join, table_map all_table_map)
{
DBUG_ENTER("optimize_semijoin_nests");
+ THD *thd= join->thd;
List_iterator<TABLE_LIST> sj_list_it(join->select_lex->sj_nests);
TABLE_LIST *sj_nest;
+ if (!join->select_lex->sj_nests.elements)
+ DBUG_RETURN(FALSE);
+ Json_writer_object wrapper(thd);
+ Json_writer_object trace_semijoin_nest(thd,
+ "execution_plan_for_potential_materialization");
+ Json_writer_array trace_steps_array(thd, "steps");
while ((sj_nest= sj_list_it++))
{
/* semi-join nests with only constant tables are not valid */
@@ -2721,14 +2801,6 @@ void optimize_semi_joins(JOIN *join, table_map remaining_tables, uint idx,
{
POSITION *pos= join->positions + idx;
const JOIN_TAB *new_join_tab= pos->table;
- Semi_join_strategy_picker *pickers[]=
- {
- &pos->firstmatch_picker,
- &pos->loosescan_picker,
- &pos->sjmat_picker,
- &pos->dups_weedout_picker,
- NULL,
- };
#ifdef HAVE_valgrind
new (&pos->firstmatch_picker) Firstmatch_picker;
@@ -2737,18 +2809,30 @@ void optimize_semi_joins(JOIN *join, table_map remaining_tables, uint idx,
new (&pos->dups_weedout_picker) Duplicate_weedout_picker;
#endif
- if (join->emb_sjm_nest)
+ if (join->emb_sjm_nest || //(1)
+ !join->select_lex->have_merged_subqueries) //(2)
{
/*
- We're performing optimization inside SJ-Materialization nest:
+ (1): We're performing optimization inside SJ-Materialization nest:
- there are no other semi-joins inside semi-join nests
- attempts to build semi-join strategies here will confuse
the optimizer, so bail out.
+ (2): Don't waste time on semi-join optimizations if we don't have any
+ semi-joins
*/
pos->sj_strategy= SJ_OPT_NONE;
return;
}
+ Semi_join_strategy_picker *pickers[]=
+ {
+ &pos->firstmatch_picker,
+ &pos->loosescan_picker,
+ &pos->sjmat_picker,
+ &pos->dups_weedout_picker,
+ NULL,
+ };
+ Json_writer_array trace_steps(join->thd, "semijoin_strategy_choice");
/*
Update join->cur_sj_inner_tables (Used by FirstMatch in this function and
LooseScan detector in best_access_path)
@@ -2847,6 +2931,7 @@ void optimize_semi_joins(JOIN *join, table_map remaining_tables, uint idx,
*current_read_time= read_time;
*current_record_count= rec_count;
dups_producing_tables &= ~handled_fanout;
+
//TODO: update bitmap of semi-joins that were handled together with
// others.
if (is_multiple_semi_joins(join, join->positions, idx,
@@ -2874,6 +2959,33 @@ void optimize_semi_joins(JOIN *join, table_map remaining_tables, uint idx,
}
}
}
+
+ if (unlikely(join->thd->trace_started() && pos->sj_strategy != SJ_OPT_NONE))
+ {
+ Json_writer_object tr(join->thd);
+ const char *sname;
+ switch (pos->sj_strategy) {
+ case SJ_OPT_MATERIALIZE:
+ sname= "SJ-Materialization";
+ break;
+ case SJ_OPT_MATERIALIZE_SCAN:
+ sname= "SJ-Materialization-Scan";
+ break;
+ case SJ_OPT_FIRST_MATCH:
+ sname= "FirstMatch";
+ break;
+ case SJ_OPT_DUPS_WEEDOUT:
+ sname= "DuplicateWeedout";
+ break;
+ case SJ_OPT_LOOSE_SCAN:
+ sname= "LooseScan";
+ break;
+ default:
+ DBUG_ASSERT(0);
+ sname="Invalid";
+ }
+ tr.add("chosen_strategy", sname);
+ }
}
update_sj_state(join, new_join_tab, idx, remaining_tables);
@@ -2910,7 +3022,7 @@ void update_sj_state(JOIN *join, const JOIN_TAB *new_tab,
}
-void Sj_materialization_picker::set_from_prev(struct st_position *prev)
+void Sj_materialization_picker::set_from_prev(POSITION *prev)
{
if (prev->sjmat_picker.is_used)
set_empty();
@@ -2935,6 +3047,7 @@ bool Sj_materialization_picker::check_qep(JOIN *join,
{
bool sjm_scan;
SJ_MATERIALIZATION_INFO *mat_info;
+ THD *thd= join->thd;
if ((mat_info= at_sjmat_pos(join, remaining_tables,
new_join_tab, idx, &sjm_scan)))
{
@@ -2971,6 +3084,9 @@ bool Sj_materialization_picker::check_qep(JOIN *join,
Cost_estimate prefix_cost;
signed int first_tab= (int)idx - mat_info->tables;
double prefix_rec_count;
+ Json_writer_object trace(join->thd);
+ trace.add("strategy", "SJ-Materialization");
+
if (first_tab < (int)join->const_tables)
{
prefix_cost.reset();
@@ -2999,6 +3115,11 @@ bool Sj_materialization_picker::check_qep(JOIN *join,
*record_count= prefix_rec_count;
*handled_fanout= new_join_tab->emb_sj_nest->sj_inner_tables;
*strategy= SJ_OPT_MATERIALIZE;
+ if (unlikely(trace.trace_started()))
+ {
+ trace.add("records", *record_count);
+ trace.add("read_time", *read_time);
+ }
return TRUE;
}
}
@@ -3007,6 +3128,8 @@ bool Sj_materialization_picker::check_qep(JOIN *join,
if (sjm_scan_need_tables && /* Have SJM-Scan prefix */
!(sjm_scan_need_tables & remaining_tables))
{
+ Json_writer_object trace(join->thd);
+ trace.add("strategy", "SJ-Materialization-Scan");
TABLE_LIST *mat_nest=
join->positions[sjm_scan_last_inner].table->emb_sj_nest;
SJ_MATERIALIZATION_INFO *mat_info= mat_nest->sj_mat_info;
@@ -3042,6 +3165,7 @@ bool Sj_materialization_picker::check_qep(JOIN *join,
POSITION curpos, dummy;
/* Need to re-run best-access-path as we prefix_rec_count has changed */
bool disable_jbuf= (join->thd->variables.join_cache_level == 0);
+ Json_writer_temp_disable trace_semijoin_mat_scan(thd);
for (i= first_tab + mat_info->tables; i <= idx; i++)
{
best_access_path(join, join->positions[i].table, rem_tables,
@@ -3073,13 +3197,18 @@ bool Sj_materialization_picker::check_qep(JOIN *join,
*/
*record_count= prefix_rec_count;
*handled_fanout= mat_nest->sj_inner_tables;
+ if (unlikely(trace.trace_started()))
+ {
+ trace.add("records", *record_count);
+ trace.add("read_time", *read_time);
+ }
return TRUE;
}
return FALSE;
}
-void LooseScan_picker::set_from_prev(struct st_position *prev)
+void LooseScan_picker::set_from_prev(POSITION *prev)
{
if (prev->loosescan_picker.is_used)
set_empty();
@@ -3100,7 +3229,7 @@ bool LooseScan_picker::check_qep(JOIN *join,
double *read_time,
table_map *handled_fanout,
sj_strategy_enum *strategy,
- struct st_position *loose_scan_pos)
+ POSITION *loose_scan_pos)
{
POSITION *first= join->positions + first_loosescan_table;
/*
@@ -3136,6 +3265,8 @@ bool LooseScan_picker::check_qep(JOIN *join,
!(remaining_tables & loosescan_need_tables) &&
(new_join_tab->table->map & loosescan_need_tables))
{
+ Json_writer_object trace(join->thd);
+ trace.add("strategy", "LooseScan");
/*
Ok we have LooseScan plan and also have all LooseScan sj-nest's
inner tables and outer correlated tables into the prefix.
@@ -3166,12 +3297,17 @@ bool LooseScan_picker::check_qep(JOIN *join,
*/
*strategy= SJ_OPT_LOOSE_SCAN;
*handled_fanout= first->table->emb_sj_nest->sj_inner_tables;
+ if (unlikely(trace.trace_started()))
+ {
+ trace.add("records", *record_count);
+ trace.add("read_time", *read_time);
+ }
return TRUE;
}
return FALSE;
}
-void Firstmatch_picker::set_from_prev(struct st_position *prev)
+void Firstmatch_picker::set_from_prev(POSITION *prev)
{
if (prev->firstmatch_picker.is_used)
invalidate_firstmatch_prefix();
@@ -3245,6 +3381,8 @@ bool Firstmatch_picker::check_qep(JOIN *join,
if (in_firstmatch_prefix() &&
!(firstmatch_need_tables & remaining_tables))
{
+ Json_writer_object trace(join->thd);
+ trace.add("strategy", "FirstMatch");
/*
Got a complete FirstMatch range. Calculate correct costs and fanout
*/
@@ -3277,6 +3415,11 @@ bool Firstmatch_picker::check_qep(JOIN *join,
*handled_fanout= firstmatch_need_tables;
/* *record_count and *read_time were set by the above call */
*strategy= SJ_OPT_FIRST_MATCH;
+ if (unlikely(trace.trace_started()))
+ {
+ trace.add("records", *record_count);
+ trace.add("read_time", *read_time);
+ }
return TRUE;
}
}
@@ -3355,6 +3498,9 @@ bool Duplicate_weedout_picker::check_qep(JOIN *join,
double sj_inner_fanout= 1.0;
double sj_outer_fanout= 1.0;
uint temptable_rec_size;
+ Json_writer_object trace(join->thd);
+ trace.add("strategy", "DuplicateWeedout");
+
if (first_tab == join->const_tables)
{
prefix_rec_count= 1.0;
@@ -3415,6 +3561,11 @@ bool Duplicate_weedout_picker::check_qep(JOIN *join,
*record_count= prefix_rec_count * sj_outer_fanout;
*handled_fanout= dups_removed_fanout;
*strategy= SJ_OPT_DUPS_WEEDOUT;
+ if (unlikely(trace.trace_started()))
+ {
+ trace.add("records", *record_count);
+ trace.add("read_time", *read_time);
+ }
return TRUE;
}
return FALSE;
@@ -3658,12 +3809,20 @@ static void recalculate_prefix_record_count(JOIN *join, uint start, uint end)
void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
{
+ join->sjm_lookup_tables= 0;
+ join->sjm_scan_tables= 0;
+ if (!join->select_lex->sj_nests.elements)
+ return;
+
+ THD *thd= join->thd;
uint table_count=join->table_count;
uint tablenr;
table_map remaining_tables= 0;
table_map handled_tabs= 0;
- join->sjm_lookup_tables= 0;
- join->sjm_scan_tables= 0;
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_array trace_semijoin_strategies(thd,
+ "fix_semijoin_strategies_for_picked_join_order");
+
for (tablenr= table_count - 1 ; tablenr != join->const_tables - 1; tablenr--)
{
POSITION *pos= join->best_positions + tablenr;
@@ -3688,8 +3847,18 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
first= tablenr - sjm->tables + 1;
join->best_positions[first].n_sj_tables= sjm->tables;
join->best_positions[first].sj_strategy= SJ_OPT_MATERIALIZE;
+ Json_writer_object semijoin_strategy(thd);
+ semijoin_strategy.add("semi_join_strategy","SJ-Materialization");
+ Json_writer_array semijoin_plan(thd, "join_order");
for (uint i= first; i < first+ sjm->tables; i++)
+ {
+ if (unlikely(thd->trace_started()))
+ {
+ Json_writer_object trace_one_table(thd);
+ trace_one_table.add_table_name(join->best_positions[i].table);
+ }
join->sjm_lookup_tables |= join->best_positions[i].table->table->map;
+ }
}
else if (pos->sj_strategy == SJ_OPT_MATERIALIZE_SCAN)
{
@@ -3727,8 +3896,16 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
POSITION dummy;
join->cur_sj_inner_tables= 0;
+ Json_writer_object semijoin_strategy(thd);
+ semijoin_strategy.add("semi_join_strategy","SJ-Materialization-Scan");
+ Json_writer_array semijoin_plan(thd, "join_order");
for (i= first + sjm->tables; i <= tablenr; i++)
{
+ Json_writer_object trace_one_table(thd);
+ if (unlikely(thd->trace_started()))
+ {
+ trace_one_table.add_table_name(join->best_positions[i].table);
+ }
best_access_path(join, join->best_positions[i].table, rem_tables,
join->best_positions, i,
FALSE, prefix_rec_count,
@@ -3758,8 +3935,16 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
join buffering
*/
join->cur_sj_inner_tables= 0;
+ Json_writer_object semijoin_strategy(thd);
+ semijoin_strategy.add("semi_join_strategy","FirstMatch");
+ Json_writer_array semijoin_plan(thd, "join_order");
for (idx= first; idx <= tablenr; idx++)
{
+ Json_writer_object trace_one_table(thd);
+ if (unlikely(thd->trace_started()))
+ {
+ trace_one_table.add_table_name(join->best_positions[idx].table);
+ }
if (join->best_positions[idx].use_join_buffer)
{
best_access_path(join, join->best_positions[idx].table,
@@ -3789,8 +3974,16 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
join buffering
*/
join->cur_sj_inner_tables= 0;
+ Json_writer_object semijoin_strategy(thd);
+ semijoin_strategy.add("semi_join_strategy","LooseScan");
+ Json_writer_array semijoin_plan(thd, "join_order");
for (idx= first; idx <= tablenr; idx++)
{
+ Json_writer_object trace_one_table(thd);
+ if (unlikely(thd->trace_started()))
+ {
+ trace_one_table.add_table_name(join->best_positions[idx].table);
+ }
if (join->best_positions[idx].use_join_buffer || (idx == first))
{
best_access_path(join, join->best_positions[idx].table,
@@ -3825,6 +4018,8 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
if (pos->sj_strategy == SJ_OPT_DUPS_WEEDOUT)
{
+ Json_writer_object semijoin_strategy(thd);
+ semijoin_strategy.add("semi_join_strategy","DuplicateWeedout");
/*
Duplicate Weedout starting at pos->first_dupsweedout_table, ending at
this table.
@@ -4367,17 +4562,12 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd)
table->temp_pool_slot = temp_pool_slot;
table->copy_blobs= 1;
table->in_use= thd;
- table->quick_keys.init();
- table->covering_keys.init();
- table->keys_in_use_for_query.init();
table->s= share;
init_tmp_table_share(thd, share, "", 0, tmpname, tmpname);
share->blob_field= blob_field;
share->table_charset= NULL;
share->primary_key= MAX_KEY; // Indicate no primary key
- share->keys_for_keyread.init();
- share->keys_in_use.init();
/* Create the field */
{
@@ -4391,9 +4581,9 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd)
if (!field)
DBUG_RETURN(0);
field->table= table;
- field->key_start.init(0);
- field->part_of_key.init(0);
- field->part_of_sortkey.init(0);
+ field->key_start.clear_all();
+ field->part_of_key.clear_all();
+ field->part_of_sortkey.clear_all();
field->unireg_check= Field::NONE;
field->flags= (NOT_NULL_FLAG | BINARY_FLAG | NO_DEFAULT_VALUE_FLAG);
field->reset_fields();
@@ -5629,31 +5819,515 @@ int select_value_catcher::send_data(List<Item> &items)
}
-/*
- Setup JTBM join tabs for execution
+/**
+ @brief
+ Attach conditions to already optimized condition
+
+ @param thd the thread handle
+ @param cond the condition to which add new conditions
+ @param cond_eq IN/OUT the multiple equalities of cond
+ @param new_conds the list of conditions to be added
+ @param cond_value the returned value of the condition
+ if it can be evaluated
+
+ @details
+ The method creates new condition through union of cond and
+ the conditions from new_conds list.
+ The method is called after optimize_cond() for cond. The result
+ of the union should be the same as if it was done before the
+ the optimize_cond() call.
+
+ @retval otherwise the created condition
+ @retval NULL if an error occurs
+*/
+
+Item *and_new_conditions_to_optimized_cond(THD *thd, Item *cond,
+ COND_EQUAL **cond_eq,
+ List<Item> &new_conds,
+ Item::cond_result *cond_value)
+{
+ COND_EQUAL new_cond_equal;
+ Item *item;
+ Item_equal *mult_eq;
+ bool is_simplified_cond= false;
+ /* The list where parts of the new condition are stored. */
+ List_iterator<Item> li(new_conds);
+ List_iterator_fast<Item_equal> it(new_cond_equal.current_level);
+
+ /*
+ Create multiple equalities from the equalities of the list new_conds.
+ Save the created multiple equalities in new_cond_equal.
+ If multiple equality can't be created or the condition
+ from new_conds list isn't an equality leave it in new_conds
+ list.
+
+ The equality can't be converted into the multiple equality if it
+ is a knowingly false or true equality.
+ For example, (3 = 1) equality.
+ */
+ while ((item=li++))
+ {
+ if (item->type() == Item::FUNC_ITEM &&
+ ((Item_func *) item)->functype() == Item_func::EQ_FUNC &&
+ check_simple_equality(thd,
+ Item::Context(Item::ANY_SUBST,
+ ((Item_func_eq *)item)->compare_type_handler(),
+ ((Item_func_eq *)item)->compare_collation()),
+ ((Item_func *)item)->arguments()[0],
+ ((Item_func *)item)->arguments()[1],
+ &new_cond_equal))
+ li.remove();
+ }
+
+ it.rewind();
+ if (cond && cond->type() == Item::COND_ITEM &&
+ ((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
+ {
+ /*
+ Case when cond is an AND-condition.
+ Union AND-condition cond, created multiple equalities from
+ new_cond_equal and remaining conditions from new_conds.
+ */
+ COND_EQUAL *cond_equal= &((Item_cond_and *) cond)->m_cond_equal;
+ List<Item_equal> *cond_equalities= &cond_equal->current_level;
+ List<Item> *and_args= ((Item_cond_and *)cond)->argument_list();
+
+ /*
+ Disjoin multiple equalities of cond.
+ Merge these multiple equalities with the multiple equalities of
+ new_cond_equal. Save the result in new_cond_equal.
+ Check if after the merge some multiple equalities are knowingly
+ true or false.
+ */
+ and_args->disjoin((List<Item> *) cond_equalities);
+ while ((mult_eq= it++))
+ {
+ mult_eq->upper_levels= 0;
+ mult_eq->merge_into_list(thd, cond_equalities, false, false);
+ }
+ List_iterator_fast<Item_equal> ei(*cond_equalities);
+ while ((mult_eq= ei++))
+ {
+ if (mult_eq->const_item() && !mult_eq->val_int())
+ is_simplified_cond= true;
+ else
+ {
+ mult_eq->unfix_fields();
+ if (mult_eq->fix_fields(thd, NULL))
+ return NULL;
+ }
+ }
+
+ li.rewind();
+ while ((item=li++))
+ {
+ /*
+ There still can be some equalities at not top level of new_conds
+ conditions that are not transformed into multiple equalities.
+ To transform them build_item_equal() is called.
+
+ Examples of not top level equalities:
+
+ 1. (t1.a = 3) OR (t1.b > 5)
+ (t1.a = 3) - not top level equality.
+ It is inside OR condition
+
+ 2. ((t3.d = t3.c) AND (t3.c < 15)) OR (t3.d > 1)
+ (t1.d = t3.c) - not top level equality.
+ It is inside AND condition which is a part of OR condition
+ */
+ if (item->type() == Item::COND_ITEM &&
+ ((Item_cond *)item)->functype() == Item_func::COND_OR_FUNC)
+ {
+ item= item->build_equal_items(thd,
+ &((Item_cond_and *) cond)->m_cond_equal,
+ false, NULL);
+ }
+ and_args->push_back(item, thd->mem_root);
+ }
+ and_args->append((List<Item> *) cond_equalities);
+ *cond_eq= &((Item_cond_and *) cond)->m_cond_equal;
+ }
+ else
+ {
+ /*
+ Case when cond isn't an AND-condition or is NULL.
+ There can be several cases:
+
+ 1. cond is a multiple equality.
+ In this case merge cond with the multiple equalities of
+ new_cond_equal.
+ Create new condition from the created multiple equalities
+ and new_conds list conditions.
+ 2. cond is NULL
+ Create new condition from new_conds list conditions
+ and multiple equalities from new_cond_equal.
+ 3. Otherwise
+ Create new condition through union of cond, conditions from new_conds
+ list and created multiple equalities from new_cond_equal.
+ */
+ List<Item> new_conds_list;
+ /* Flag is set to true if cond is a multiple equality */
+ bool is_mult_eq= (cond && cond->type() == Item::FUNC_ITEM &&
+ ((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC);
+
+ /*
+ If cond is non-empty and is not multiple equality save it as
+ a part of a new condition.
+ */
+ if (cond && !is_mult_eq &&
+ new_conds_list.push_back(cond, thd->mem_root))
+ return NULL;
+
+ /*
+ If cond is a multiple equality merge it with new_cond_equal
+ multiple equalities.
+ */
+ if (is_mult_eq)
+ {
+ Item_equal *eq_cond= (Item_equal *)cond;
+ eq_cond->upper_levels= 0;
+ eq_cond->merge_into_list(thd, &new_cond_equal.current_level,
+ false, false);
+ }
+
+ /**
+ Fix created multiple equalities and check if they are knowingly
+ true or false.
+ */
+ List_iterator_fast<Item_equal> ei(new_cond_equal.current_level);
+ while ((mult_eq=ei++))
+ {
+ if (mult_eq->const_item() && !mult_eq->val_int())
+ is_simplified_cond= true;
+ else
+ {
+ mult_eq->unfix_fields();
+ if (mult_eq->fix_fields(thd, NULL))
+ return NULL;
+ }
+ }
+
+ /*
+ Create AND condition if new condition will have two or
+ more elements.
+ */
+ Item_cond_and *and_cond= 0;
+ COND_EQUAL *inherited= 0;
+ if (new_conds_list.elements +
+ new_conds.elements +
+ new_cond_equal.current_level.elements > 1)
+ {
+ and_cond= new (thd->mem_root) Item_cond_and(thd);
+ and_cond->m_cond_equal.copy(new_cond_equal);
+ inherited= &and_cond->m_cond_equal;
+ }
+
+ li.rewind();
+ while ((item=li++))
+ {
+ /*
+ Look for the comment in the case when cond is an
+ AND condition above the build_equal_items() call.
+ */
+ if (item->type() == Item::COND_ITEM &&
+ ((Item_cond *)item)->functype() == Item_func::COND_OR_FUNC)
+ {
+ item= item->build_equal_items(thd, inherited, false, NULL);
+ }
+ new_conds_list.push_back(item, thd->mem_root);
+ }
+ new_conds_list.append((List<Item> *)&new_cond_equal.current_level);
+
+ if (and_cond)
+ {
+ and_cond->argument_list()->append(&new_conds_list);
+ cond= (Item *)and_cond;
+ *cond_eq= &((Item_cond_and *) cond)->m_cond_equal;
+ }
+ else
+ {
+ List_iterator_fast<Item> iter(new_conds_list);
+ cond= iter++;
+ if (cond->type() == Item::FUNC_ITEM &&
+ ((Item_func *)cond)->functype() == Item_func::MULT_EQUAL_FUNC)
+ {
+ if (!(*cond_eq))
+ *cond_eq= new COND_EQUAL();
+ (*cond_eq)->copy(new_cond_equal);
+ }
+ else
+ *cond_eq= 0;
+ }
+ }
+
+ if (!cond)
+ return NULL;
+
+ if (*cond_eq)
+ {
+ /*
+ The multiple equalities are attached only to the upper level
+ of AND-condition cond.
+ Push them down to the bottom levels of cond AND-condition if needed.
+ */
+ propagate_new_equalities(thd, cond,
+ &(*cond_eq)->current_level,
+ 0,
+ &is_simplified_cond);
+ cond= cond->propagate_equal_fields(thd,
+ Item::Context_boolean(),
+ *cond_eq);
+ cond->update_used_tables();
+ }
+ /* Check if conds has knowingly true or false parts. */
+ if (cond &&
+ !is_simplified_cond &&
+ cond->walk(&Item::is_simplified_cond_processor, 0, 0))
+ is_simplified_cond= true;
+
+
+ /*
+ If it was found that there are some knowingly true or false equalities
+ remove them from cond and set cond_value to the appropriate value.
+ */
+ if (cond && is_simplified_cond)
+ cond= cond->remove_eq_conds(thd, cond_value, true);
+
+ if (cond && cond->fix_fields_if_needed(thd, NULL))
+ return NULL;
+
+ return cond;
+}
+
+
+/**
+ @brief Materialize a degenerate jtbm semi join
+
+ @param thd thread handler
+ @param tbl table list for the target jtbm semi join table
+ @param subq_pred IN subquery predicate with the degenerate jtbm semi join
+ @param eq_list IN/OUT the list where to add produced equalities
+
+ @details
+ The method materializes the degenerate jtbm semi join for the
+ subquery from the IN subquery predicate subq_pred taking table
+ as the target for materialization.
+ Any degenerate table is guaranteed to produce 0 or 1 record.
+ Examples of both cases:
+
+ select * from ot where col in (select ... from it where 2>3)
+ select * from ot where col in (select MY_MIN(it.key) from it)
+
+ in this case, there is no necessity to create a temp.table for
+ materialization.
+ We now just need to
+ 1. Check whether 1 or 0 records are produced, setup this as a
+ constant join tab.
+ 2. Create a dummy temporary table, because all of the join
+ optimization code relies on TABLE object being present.
+
+ In the case when materialization produces one row the function
+ additionally creates equalities between the expressions from the
+ left part of the IN subquery predicate and the corresponding
+ columns of the produced row. These equalities are added to the
+ list eq_list. They are supposed to be conjuncted with the condition
+ of the WHERE clause.
+
+ @retval TRUE if an error occurs
+ @retval FALSE otherwise
+*/
+
+bool execute_degenerate_jtbm_semi_join(THD *thd,
+ TABLE_LIST *tbl,
+ Item_in_subselect *subq_pred,
+ List<Item> &eq_list)
+{
+ DBUG_ENTER("execute_degenerate_jtbm_semi_join");
+ select_value_catcher *new_sink;
+
+ DBUG_ASSERT(subq_pred->engine->engine_type() ==
+ subselect_engine::SINGLE_SELECT_ENGINE);
+ subselect_single_select_engine *engine=
+ (subselect_single_select_engine*)subq_pred->engine;
+ if (!(new_sink= new (thd->mem_root) select_value_catcher(thd, subq_pred)))
+ DBUG_RETURN(TRUE);
+ if (new_sink->setup(&engine->select_lex->join->fields_list) ||
+ engine->select_lex->join->change_result(new_sink, NULL) ||
+ engine->exec())
+ {
+ DBUG_RETURN(TRUE);
+ }
+ subq_pred->is_jtbm_const_tab= TRUE;
+
+ if (new_sink->assigned)
+ {
+ /*
+ Subselect produced one row, which is saved in new_sink->row.
+ Save "left_expr[i] == row[i]" equalities into the eq_list.
+ */
+ subq_pred->jtbm_const_row_found= TRUE;
+
+ Item *eq_cond;
+ for (uint i= 0; i < subq_pred->left_expr->cols(); i++)
+ {
+ eq_cond=
+ new (thd->mem_root) Item_func_eq(thd,
+ subq_pred->left_expr->element_index(i),
+ new_sink->row[i]);
+ if (!eq_cond || eq_cond->fix_fields(thd, NULL) ||
+ eq_list.push_back(eq_cond, thd->mem_root))
+ DBUG_RETURN(TRUE);
+ }
+ }
+ else
+ {
+ /* Subselect produced no rows. Just set the flag */
+ subq_pred->jtbm_const_row_found= FALSE;
+ }
+
+ TABLE *dummy_table;
+ if (!(dummy_table= create_dummy_tmp_table(thd)))
+ DBUG_RETURN(TRUE);
+ tbl->table= dummy_table;
+ tbl->table->pos_in_table_list= tbl;
+ /*
+ Note: the table created above may be freed by:
+ 1. JOIN_TAB::cleanup(), when the parent join is a regular join.
+ 2. cleanup_empty_jtbm_semi_joins(), when the parent join is a
+ degenerate join (e.g. one with "Impossible where").
+ */
+ setup_table_map(tbl->table, tbl, tbl->jtbm_table_no);
+ DBUG_RETURN(FALSE);
+}
+
+
+/**
+ @brief
+ Execute degenerate jtbm semi joins before optimize_cond() for parent
+
+ @param join the parent join for jtbm semi joins
+ @param join_list the list of tables where jtbm semi joins are processed
+ @param eq_list IN/OUT the list where to add equalities produced after
+ materialization of single-row degenerate jtbm semi joins
+
+ @details
+ The method traverses join_list trying to find any degenerate jtbm semi
+ joins for subqueries of IN predicates. For each degenerate jtbm
+ semi join execute_degenerate_jtbm_semi_join() is called. As a result
+ of this call new equalities that substitute for single-row materialized
+ jtbm semi join are added to eq_list.
+
+ In the case when a table is nested in another table 'nested_join' the
+ method is recursively called for the join_list of the 'nested_join' trying
+ to find in the list any degenerate jtbm semi joins. Currently a jtbm semi
+ join may occur in a mergeable semi join nest.
+
+ @retval TRUE if an error occurs
+ @retval FALSE otherwise
*/
-bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
- Item **join_where)
+bool setup_degenerate_jtbm_semi_joins(JOIN *join,
+ List<TABLE_LIST> *join_list,
+ List<Item> &eq_list)
+{
+ TABLE_LIST *table;
+ NESTED_JOIN *nested_join;
+ List_iterator<TABLE_LIST> li(*join_list);
+ THD *thd= join->thd;
+ DBUG_ENTER("setup_degenerate_jtbm_semi_joins");
+
+ while ((table= li++))
+ {
+ Item_in_subselect *subq_pred;
+
+ if ((subq_pred= table->jtbm_subselect))
+ {
+ JOIN *subq_join= subq_pred->unit->first_select()->join;
+
+ if (!subq_join->tables_list || !subq_join->table_count)
+ {
+ if (execute_degenerate_jtbm_semi_join(thd,
+ table,
+ subq_pred,
+ eq_list))
+ DBUG_RETURN(TRUE);
+ join->is_orig_degenerated= true;
+ }
+ }
+ if ((nested_join= table->nested_join))
+ {
+ if (setup_degenerate_jtbm_semi_joins(join,
+ &nested_join->join_list,
+ eq_list))
+ DBUG_RETURN(TRUE);
+ }
+ }
+ DBUG_RETURN(FALSE);
+}
+
+
+/**
+ @brief
+ Optimize jtbm semi joins for materialization
+
+ @param join the parent join for jtbm semi joins
+ @param join_list the list of TABLE_LIST objects where jtbm semi join
+ can occur
+ @param eq_list IN/OUT the list where to add produced equalities
+
+ @details
+ This method is called by the optimizer after the call of
+ optimize_cond() for parent select.
+ The method traverses join_list trying to find any jtbm semi joins for
+ subqueries from IN predicates and optimizes them.
+ After the optimization some of jtbm semi joins may become degenerate.
+ For example the subquery 'SELECT MAX(b) FROM t2' from the query
+
+ SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2);
+
+ will become degenerate if there is an index on t2.b.
+ If a subquery becomes degenerate it is handled by the function
+ execute_degenerate_jtbm_semi_join().
+
+ Otherwise the method creates a temporary table in which the subquery
+ of the jtbm semi join will be materialied.
+
+ The function saves the equalities between all pairs of the expressions
+ from the left part of the IN subquery predicate and the corresponding
+ columns of the subquery from the predicate in eq_list appending them
+ to the list. The equalities of eq_list will be later conjucted with the
+ condition of the WHERE clause.
+
+ In the case when a table is nested in another table 'nested_join' the
+ method is recursively called for the join_list of the 'nested_join' trying
+ to find in the list any degenerate jtbm semi joins. Currently a jtbm semi
+ join may occur in a mergeable semi join nest.
+
+ @retval TRUE if an error occurs
+ @retval FALSE otherwise
+*/
+
+bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
+ List<Item> &eq_list)
{
TABLE_LIST *table;
NESTED_JOIN *nested_join;
List_iterator<TABLE_LIST> li(*join_list);
THD *thd= join->thd;
DBUG_ENTER("setup_jtbm_semi_joins");
-
+
while ((table= li++))
{
- Item_in_subselect *item;
+ Item_in_subselect *subq_pred;
- if ((item= table->jtbm_subselect))
+ if ((subq_pred= table->jtbm_subselect))
{
- Item_in_subselect *subq_pred= item;
double rows;
double read_time;
/*
- Perform optimization of the subquery, so that we know estmated
+ Perform optimization of the subquery, so that we know estimated
- cost of materialization process
- how many records will be in the materialized temp.table
*/
@@ -5666,102 +6340,37 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
if (!subq_join->tables_list || !subq_join->table_count)
{
- /*
- A special case; subquery's join is degenerate, and it either produces
- 0 or 1 record. Examples of both cases:
-
- select * from ot where col in (select ... from it where 2>3)
- select * from ot where col in (select MY_MIN(it.key) from it)
-
- in this case, the subquery predicate has not been setup for
- materialization. In particular, there is no materialized temp.table.
- We'll now need to
- 1. Check whether 1 or 0 records are produced, setup this as a
- constant join tab.
- 2. Create a dummy temporary table, because all of the join
- optimization code relies on TABLE object being present (here we
- follow a bad tradition started by derived tables)
- */
- DBUG_ASSERT(subq_pred->engine->engine_type() ==
- subselect_engine::SINGLE_SELECT_ENGINE);
- subselect_single_select_engine *engine=
- (subselect_single_select_engine*)subq_pred->engine;
- select_value_catcher *new_sink;
- if (!(new_sink=
- new (thd->mem_root) select_value_catcher(thd, subq_pred)))
- DBUG_RETURN(TRUE);
- if (new_sink->setup(&engine->select_lex->join->fields_list) ||
- engine->select_lex->join->change_result(new_sink, NULL) ||
- engine->exec())
- {
+ if (!join->is_orig_degenerated &&
+ execute_degenerate_jtbm_semi_join(thd, table, subq_pred,
+ eq_list))
DBUG_RETURN(TRUE);
- }
- subq_pred->is_jtbm_const_tab= TRUE;
-
- if (new_sink->assigned)
- {
- subq_pred->jtbm_const_row_found= TRUE;
- /*
- Subselect produced one row, which is saved in new_sink->row.
- Inject "left_expr[i] == row[i] equalities into parent's WHERE.
- */
- Item *eq_cond;
- for (uint i= 0; i < subq_pred->left_expr->cols(); i++)
- {
- eq_cond= new (thd->mem_root)
- Item_func_eq(thd, subq_pred->left_expr->element_index(i),
- new_sink->row[i]);
- if (!eq_cond)
- DBUG_RETURN(1);
-
- if (!((*join_where)= and_items(thd, *join_where, eq_cond)) ||
- (*join_where)->fix_fields(thd, join_where))
- DBUG_RETURN(1);
- }
- }
- else
- {
- /* Subselect produced no rows. Just set the flag, */
- subq_pred->jtbm_const_row_found= FALSE;
- }
-
- /* Set up a dummy TABLE*, optimizer code needs JOIN_TABs to have TABLE */
- TABLE *dummy_table;
- if (!(dummy_table= create_dummy_tmp_table(thd)))
- DBUG_RETURN(1);
- table->table= dummy_table;
- table->table->pos_in_table_list= table;
- /*
- Note: the table created above may be freed by:
- 1. JOIN_TAB::cleanup(), when the parent join is a regular join.
- 2. cleanup_empty_jtbm_semi_joins(), when the parent join is a
- degenerate join (e.g. one with "Impossible where").
- */
- setup_table_map(table->table, table, table->jtbm_table_no);
}
else
{
DBUG_ASSERT(subq_pred->test_set_strategy(SUBS_MATERIALIZATION));
subq_pred->is_jtbm_const_tab= FALSE;
subselect_hash_sj_engine *hash_sj_engine=
- ((subselect_hash_sj_engine*)item->engine);
+ ((subselect_hash_sj_engine*)subq_pred->engine);
table->table= hash_sj_engine->tmp_table;
table->table->pos_in_table_list= table;
setup_table_map(table->table, table, table->jtbm_table_no);
- Item *sj_conds= hash_sj_engine->semi_join_conds;
-
- (*join_where)= and_items(thd, *join_where, sj_conds);
- (*join_where)->fix_fields_if_needed(thd, join_where);
+ List_iterator<Item> li(*hash_sj_engine->semi_join_conds->argument_list());
+ Item *item;
+ while ((item=li++))
+ {
+ item->update_used_tables();
+ if (eq_list.push_back(item, thd->mem_root))
+ DBUG_RETURN(TRUE);
+ }
}
table->table->maybe_null= MY_TEST(join->mixed_implicit_grouping);
}
-
if ((nested_join= table->nested_join))
{
- if (setup_jtbm_semi_joins(join, &nested_join->join_list, join_where))
+ if (setup_jtbm_semi_joins(join, &nested_join->join_list, eq_list))
DBUG_RETURN(TRUE);
}
}
@@ -5869,8 +6478,8 @@ bool JOIN::choose_subquery_plan(table_map join_tables)
/* A strategy must be chosen earlier. */
DBUG_ASSERT(in_subs->has_strategy());
DBUG_ASSERT(in_to_exists_where || in_to_exists_having);
- DBUG_ASSERT(!in_to_exists_where || in_to_exists_where->fixed);
- DBUG_ASSERT(!in_to_exists_having || in_to_exists_having->fixed);
+ DBUG_ASSERT(!in_to_exists_where || in_to_exists_where->is_fixed());
+ DBUG_ASSERT(!in_to_exists_having || in_to_exists_having->is_fixed());
/* The original QEP of the subquery. */
Join_plan_state save_qep(table_count);
@@ -6159,3 +6768,428 @@ bool JOIN::choose_tableless_subquery_plan()
exec_const_cond= zero_result_cause ? 0 : conds;
return FALSE;
}
+
+
+bool Item::pushable_equality_checker_for_subquery(uchar *arg)
+{
+ return
+ get_corresponding_field_pair(this,
+ ((Item_in_subselect *)arg)->corresponding_fields);
+}
+
+
+/*
+ Checks if 'item' or some item equal to it is equal to the field from
+ some Field_pair of 'pair_list' and returns matching Field_pair or
+ NULL if the matching Field_pair wasn't found.
+*/
+
+Field_pair *find_matching_field_pair(Item *item, List<Field_pair> pair_list)
+{
+ Field_pair *field_pair= get_corresponding_field_pair(item, pair_list);
+ if (field_pair)
+ return field_pair;
+
+ Item_equal *item_equal= item->get_item_equal();
+ if (item_equal)
+ {
+ Item_equal_fields_iterator it(*item_equal);
+ Item *equal_item;
+ while ((equal_item= it++))
+ {
+ if (equal_item->const_item())
+ continue;
+ field_pair= get_corresponding_field_pair(equal_item, pair_list);
+ if (field_pair)
+ return field_pair;
+ }
+ }
+ return NULL;
+}
+
+
+bool Item_field::excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
+{
+ if (find_matching_field_pair(((Item *) this), subq_pred->corresponding_fields))
+ return true;
+ return false;
+}
+
+
+bool Item_direct_view_ref::excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
+{
+ if (item_equal)
+ {
+ DBUG_ASSERT(real_item()->type() == Item::FIELD_ITEM);
+ if (get_corresponding_field_pair(((Item *)this), subq_pred->corresponding_fields))
+ return true;
+ }
+ return (*ref)->excl_dep_on_in_subq_left_part(subq_pred);
+}
+
+
+bool Item_equal::excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
+{
+ Item *left_item = get_const();
+ Item_equal_fields_iterator it(*this);
+ Item *item;
+ if (!left_item)
+ {
+ while ((item=it++))
+ {
+ if (item->excl_dep_on_in_subq_left_part(subq_pred))
+ {
+ left_item= item;
+ break;
+ }
+ }
+ }
+ if (!left_item)
+ return false;
+ while ((item=it++))
+ {
+ if (item->excl_dep_on_in_subq_left_part(subq_pred))
+ return true;
+ }
+ return false;
+}
+
+
+/**
+ @brief
+ Get corresponding item from the select of the right part of IN subquery
+
+ @param thd the thread handle
+ @param item the item from the left part of subq_pred for which
+ corresponding item should be found
+ @param subq_pred the IN subquery predicate
+
+ @details
+ This method looks through the fields of the select of the right part of
+ the IN subquery predicate subq_pred trying to find the corresponding
+ item 'new_item' for item. If item has equal items it looks through
+ the fields of the select of the right part of subq_pred for each equal
+ item trying to find the corresponding item.
+ The method assumes that the given item is either a field item or
+ a reference to a field item.
+
+ @retval <item*> reference to the corresponding item
+ @retval NULL if item was not found
+*/
+
+static
+Item *get_corresponding_item(THD *thd, Item *item,
+ Item_in_subselect *subq_pred)
+{
+ DBUG_ASSERT(item->type() == Item::FIELD_ITEM ||
+ (item->type() == Item::REF_ITEM &&
+ ((Item_ref *) item)->ref_type() == Item_ref::VIEW_REF));
+
+ Field_pair *field_pair;
+ Item_equal *item_equal= item->get_item_equal();
+
+ if (item_equal)
+ {
+ Item_equal_fields_iterator it(*item_equal);
+ Item *equal_item;
+ while ((equal_item= it++))
+ {
+ field_pair=
+ get_corresponding_field_pair(equal_item, subq_pred->corresponding_fields);
+ if (field_pair)
+ return field_pair->corresponding_item;
+ }
+ }
+ else
+ {
+ field_pair=
+ get_corresponding_field_pair(item, subq_pred->corresponding_fields);
+ if (field_pair)
+ return field_pair->corresponding_item;
+ }
+ return NULL;
+}
+
+
+Item *Item_field::in_subq_field_transformer_for_where(THD *thd, uchar *arg)
+{
+ Item_in_subselect *subq_pred= (Item_in_subselect *)arg;
+ Item *producing_item= get_corresponding_item(thd, this, subq_pred);
+ if (producing_item)
+ return producing_item->build_clone(thd);
+ return this;
+}
+
+
+Item *Item_direct_view_ref::in_subq_field_transformer_for_where(THD *thd,
+ uchar *arg)
+{
+ if (item_equal)
+ {
+ Item_in_subselect *subq_pred= (Item_in_subselect *)arg;
+ Item *producing_item= get_corresponding_item(thd, this, subq_pred);
+ DBUG_ASSERT (producing_item != NULL);
+ return producing_item->build_clone(thd);
+ }
+ return this;
+}
+
+
+/**
+ @brief
+ Transforms item so it can be pushed into the IN subquery HAVING clause
+
+ @param thd the thread handle
+ @param in_item the item for which pushable item should be created
+ @param subq_pred the IN subquery predicate
+
+ @details
+ This method finds for in_item that is a field from the left part of the
+ IN subquery predicate subq_pred its corresponding item from the right part
+ of subq_pred.
+ If corresponding item is found, a shell for this item is created.
+ This shell can be pushed into the HAVING part of subq_pred select.
+
+ @retval <item*> reference to the created corresponding item shell for in_item
+ @retval NULL if mistake occurs
+*/
+
+static Item*
+get_corresponding_item_for_in_subq_having(THD *thd, Item *in_item,
+ Item_in_subselect *subq_pred)
+{
+ Item *new_item= get_corresponding_item(thd, in_item, subq_pred);
+
+ if (new_item)
+ {
+ Item_ref *ref=
+ new (thd->mem_root) Item_ref(thd,
+ &subq_pred->unit->first_select()->context,
+ NullS, NullS,
+ &new_item->name);
+ if (!ref)
+ DBUG_ASSERT(0);
+ return ref;
+ }
+ return new_item;
+}
+
+
+Item *Item_field::in_subq_field_transformer_for_having(THD *thd, uchar *arg)
+{
+ return get_corresponding_item_for_in_subq_having(thd, this,
+ (Item_in_subselect *)arg);
+}
+
+
+Item *Item_direct_view_ref::in_subq_field_transformer_for_having(THD *thd,
+ uchar *arg)
+{
+ if (!item_equal)
+ return this;
+ else
+ {
+ Item *new_item= get_corresponding_item_for_in_subq_having(thd, this,
+ (Item_in_subselect *)arg);
+ if (!new_item)
+ return this;
+ return new_item;
+ }
+}
+
+
+/**
+ @brief
+ Find fields that are used in the GROUP BY of the select
+
+ @param thd the thread handle
+ @param sel the select of the IN subquery predicate
+ @param fields fields of the left part of the IN subquery predicate
+ @param grouping_list GROUP BY clause
+
+ @details
+ This method traverses fields which are used in the GROUP BY of
+ sel and saves them with their corresponding items from fields.
+*/
+
+bool grouping_fields_in_the_in_subq_left_part(THD *thd,
+ st_select_lex *sel,
+ List<Field_pair> *fields,
+ ORDER *grouping_list)
+{
+ DBUG_ENTER("grouping_fields_in_the_in_subq_left_part");
+ sel->grouping_tmp_fields.empty();
+ List_iterator<Field_pair> it(*fields);
+ Field_pair *item;
+ while ((item= it++))
+ {
+ for (ORDER *ord= grouping_list; ord; ord= ord->next)
+ {
+ if ((*ord->item)->eq(item->corresponding_item, 0))
+ {
+ if (sel->grouping_tmp_fields.push_back(item, thd->mem_root))
+ DBUG_RETURN(TRUE);
+ }
+ }
+ }
+ DBUG_RETURN(FALSE);
+}
+
+
+/**
+ @brief
+ Extract condition that can be pushed into select of this IN subquery
+
+ @param thd the thread handle
+ @param cond current condition
+
+ @details
+ This function builds the most restrictive condition depending only on
+ the list of fields of the left part of this IN subquery predicate
+ (directly or indirectly through equality) that can be extracted from the
+ given condition cond and pushes it into this IN subquery.
+
+ Example of the transformation:
+
+ SELECT * FROM t1
+ WHERE a>3 AND b>10 AND
+ (a,b) IN (SELECT x,MAX(y) FROM t2 GROUP BY x);
+
+ =>
+
+ SELECT * FROM t1
+ WHERE a>3 AND b>10 AND
+ (a,b) IN (SELECT x,max(y)
+ FROM t2
+ WHERE x>3
+ GROUP BY x
+ HAVING MAX(y)>10);
+
+
+ In details:
+ 1. Check what pushable formula can be extracted from cond
+ 2. Build a clone PC of the formula that can be extracted
+ (the clone is built only if the extracted formula is a AND subformula
+ of cond or conjunction of such subformulas)
+ 3. If there is no HAVING clause prepare PC to be conjuncted with
+ WHERE clause of this subquery. Otherwise do 4-7.
+ 4. Check what formula PC_where can be extracted from PC to be pushed
+ into the WHERE clause of the subquery
+ 5. Build PC_where and if PC_where is a conjunct(s) of PC remove it from PC
+ getting PC_having
+ 6. Prepare PC_where to be conjuncted with the WHERE clause of
+ the IN subquery
+ 7. Prepare PC_having to be conjuncted with the HAVING clause of
+ the IN subquery
+
+ @note
+ This method is similar to pushdown_cond_for_derived()
+
+ @retval TRUE if an error occurs
+ @retval FALSE otherwise
+*/
+
+bool Item_in_subselect::pushdown_cond_for_in_subquery(THD *thd, Item *cond)
+{
+ DBUG_ENTER("Item_in_subselect::pushdown_cond_for_in_subquery");
+ Item *remaining_cond= NULL;
+
+ if (!cond)
+ DBUG_RETURN(FALSE);
+
+ st_select_lex *sel = unit->first_select();
+
+ if (is_jtbm_const_tab)
+ DBUG_RETURN(FALSE);
+
+ if (!sel->cond_pushdown_is_allowed())
+ DBUG_RETURN(FALSE);
+
+ /*
+ Create a list of Field_pair items for this IN subquery.
+ It consists of the pairs of fields from the left part of this IN subquery
+ predicate 'left_part' and the respective fields from the select of the
+ right part of the IN subquery 'sel' (the field from left_part with the
+ corresponding field from the sel projection list).
+ Attach this list to the IN subquery.
+ */
+ corresponding_fields.empty();
+ List_iterator_fast<Item> it(sel->join->fields_list);
+ Item *item;
+ for (uint i= 0; i < left_expr->cols(); i++)
+ {
+ item= it++;
+ Item *elem= left_expr->element_index(i);
+
+ if (elem->real_item()->type() != Item::FIELD_ITEM)
+ continue;
+
+ if (corresponding_fields.push_back(
+ new Field_pair(((Item_field *)(elem->real_item()))->field,
+ item)))
+ DBUG_RETURN(TRUE);
+ }
+
+ /* 1. Check what pushable formula can be extracted from cond */
+ Item *extracted_cond;
+ cond->check_pushable_cond(&Item::pushable_cond_checker_for_subquery,
+ (uchar *)this);
+ /* 2. Build a clone PC of the formula that can be extracted */
+ extracted_cond=
+ cond->build_pushable_cond(thd,
+ &Item::pushable_equality_checker_for_subquery,
+ (uchar *)this);
+ /* Nothing to push */
+ if (!extracted_cond)
+ {
+ DBUG_RETURN(FALSE);
+ }
+
+ /* Collect fields that are used in the GROUP BY of sel */
+ st_select_lex *save_curr_select= thd->lex->current_select;
+ if (sel->have_window_funcs())
+ {
+ if (sel->group_list.first || sel->join->implicit_grouping)
+ goto exit;
+ ORDER *common_partition_fields=
+ sel->find_common_window_func_partition_fields(thd);
+ if (!common_partition_fields)
+ goto exit;
+
+ if (grouping_fields_in_the_in_subq_left_part(thd, sel, &corresponding_fields,
+ common_partition_fields))
+ DBUG_RETURN(TRUE);
+ }
+ else if (grouping_fields_in_the_in_subq_left_part(thd, sel,
+ &corresponding_fields,
+ sel->group_list.first))
+ DBUG_RETURN(TRUE);
+
+ /* Do 4-6 */
+ sel->pushdown_cond_into_where_clause(thd, extracted_cond,
+ &remaining_cond,
+ &Item::in_subq_field_transformer_for_where,
+ (uchar *) this);
+ if (!remaining_cond)
+ goto exit;
+ /*
+ 7. Prepare PC_having to be conjuncted with the HAVING clause of
+ the IN subquery
+ */
+ remaining_cond=
+ remaining_cond->transform(thd,
+ &Item::in_subq_field_transformer_for_having,
+ (uchar *)this);
+ if (!remaining_cond ||
+ remaining_cond->walk(&Item::cleanup_excluding_const_fields_processor,
+ 0, 0))
+ goto exit;
+
+ mark_or_conds_to_avoid_pushdown(remaining_cond);
+
+ sel->cond_pushed_into_having= remaining_cond;
+
+exit:
+ thd->lex->current_select= save_curr_select;
+ DBUG_RETURN(FALSE);
+}
diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h
index 4744c49799a..a6b26be3bb6 100644
--- a/sql/opt_subselect.h
+++ b/sql/opt_subselect.h
@@ -26,8 +26,11 @@ int check_and_do_in_subquery_rewrites(JOIN *join);
bool convert_join_subqueries_to_semijoins(JOIN *join);
int pull_out_semijoin_tables(JOIN *join);
bool optimize_semijoin_nests(JOIN *join, table_map all_table_map);
-bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
- Item **join_where);
+bool setup_degenerate_jtbm_semi_joins(JOIN *join,
+ List<TABLE_LIST> *join_list,
+ List<Item> &eq_list);
+bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
+ List<Item> &eq_list);
void cleanup_empty_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list);
// used by Loose_scan_opt
@@ -300,6 +303,7 @@ public:
pos->loosescan_picker.loosescan_parts= best_max_loose_keypart + 1;
pos->use_join_buffer= FALSE;
pos->table= tab;
+ pos->range_rowid_filter_info= tab->range_rowid_filter_info;
pos->ref_depend_map= best_ref_depend_map;
DBUG_PRINT("info", ("Produced a LooseScan plan, key %s, %s",
tab->table->key_info[best_loose_scan_key].name.str,
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index a6c56bbea37..27360d4a10c 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -318,7 +318,7 @@ int opt_sum_query(THD *thd,
error= tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
if (unlikely(error))
{
- tl->table->file->print_error(error, MYF(ME_FATALERROR));
+ tl->table->file->print_error(error, MYF(ME_FATAL));
DBUG_RETURN(error);
}
count*= tl->table->file->stats.records;
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc
index c204ee4e066..3958797ec44 100644
--- a/sql/opt_table_elimination.cc
+++ b/sql/opt_table_elimination.cc
@@ -31,6 +31,8 @@
#include "mariadb.h"
#include "my_bit.h"
#include "sql_select.h"
+#include "opt_trace.h"
+#include "my_json_writer.h"
/*
OVERVIEW
@@ -522,7 +524,8 @@ eliminate_tables_for_list(JOIN *join,
List<TABLE_LIST> *join_list,
table_map tables_in_list,
Item *on_expr,
- table_map tables_used_elsewhere);
+ table_map tables_used_elsewhere,
+ Json_writer_array* trace_eliminate_tables);
static
bool check_func_dependency(JOIN *join,
table_map dep_tables,
@@ -541,7 +544,8 @@ static
Dep_module_expr *merge_eq_mods(Dep_module_expr *start,
Dep_module_expr *new_fields,
Dep_module_expr *end, uint and_level);
-static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl);
+static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl,
+ Json_writer_array* trace_eliminate_tables);
static
void add_module_expr(Dep_analysis_context *dac, Dep_module_expr **eq_mod,
uint and_level, Dep_value_field *field_val, Item *right,
@@ -608,6 +612,8 @@ void eliminate_tables(JOIN *join)
if (!optimizer_flag(thd, OPTIMIZER_SWITCH_TABLE_ELIMINATION))
DBUG_VOID_RETURN; /* purecov: inspected */
+ Json_writer_object trace_wrapper(thd);
+
/* Find the tables that are referred to from WHERE/HAVING */
used_tables= (join->conds? join->conds->used_tables() : 0) |
(join->having? join->having->used_tables() : 0);
@@ -617,12 +623,12 @@ void eliminate_tables(JOIN *join)
we should also take into account tables mentioned in "val".
*/
if (join->thd->lex->sql_command == SQLCOM_INSERT_SELECT &&
- join->select_lex == &thd->lex->select_lex)
+ join->select_lex == thd->lex->first_select_lex())
{
List_iterator<Item> val_it(thd->lex->value_list);
while ((item= val_it++))
{
- DBUG_ASSERT(item->fixed);
+ DBUG_ASSERT(item->is_fixed());
used_tables |= item->used_tables();
}
}
@@ -640,7 +646,7 @@ void eliminate_tables(JOIN *join)
used_tables |= (*(cur_list->item))->used_tables();
}
- if (join->select_lex == &thd->lex->select_lex)
+ if (join->select_lex == thd->lex->first_select_lex())
{
/* Multi-table UPDATE: don't eliminate tables referred from SET statement */
@@ -663,13 +669,14 @@ void eliminate_tables(JOIN *join)
}
}
}
-
+
table_map all_tables= join->all_tables_map();
+ Json_writer_array trace_eliminated_tables(thd,"eliminated_tables");
if (all_tables & ~used_tables)
{
/* There are some tables that we probably could eliminate. Try it. */
eliminate_tables_for_list(join, join->join_list, all_tables, NULL,
- used_tables);
+ used_tables, &trace_eliminated_tables);
}
DBUG_VOID_RETURN;
}
@@ -712,7 +719,8 @@ void eliminate_tables(JOIN *join)
static bool
eliminate_tables_for_list(JOIN *join, List<TABLE_LIST> *join_list,
table_map list_tables, Item *on_expr,
- table_map tables_used_elsewhere)
+ table_map tables_used_elsewhere,
+ Json_writer_array *trace_eliminate_tables)
{
TABLE_LIST *tbl;
List_iterator<TABLE_LIST> it(*join_list);
@@ -734,9 +742,10 @@ eliminate_tables_for_list(JOIN *join, List<TABLE_LIST> *join_list,
&tbl->nested_join->join_list,
tbl->nested_join->used_tables,
tbl->on_expr,
- outside_used_tables))
+ outside_used_tables,
+ trace_eliminate_tables))
{
- mark_as_eliminated(join, tbl);
+ mark_as_eliminated(join, tbl, trace_eliminate_tables);
}
else
all_eliminated= FALSE;
@@ -748,7 +757,7 @@ eliminate_tables_for_list(JOIN *join, List<TABLE_LIST> *join_list,
check_func_dependency(join, tbl->table->map, NULL, tbl,
tbl->on_expr))
{
- mark_as_eliminated(join, tbl);
+ mark_as_eliminated(join, tbl, trace_eliminate_tables);
}
else
all_eliminated= FALSE;
@@ -1788,7 +1797,8 @@ Dep_module* Dep_value_field::get_next_unbound_module(Dep_analysis_context *dac,
Mark one table or the whole join nest as eliminated.
*/
-static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl)
+static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl,
+ Json_writer_array* trace_eliminate_tables)
{
TABLE *table;
/*
@@ -1801,7 +1811,7 @@ static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl)
TABLE_LIST *child;
List_iterator<TABLE_LIST> it(tbl->nested_join->join_list);
while ((child= it++))
- mark_as_eliminated(join, child);
+ mark_as_eliminated(join, child, trace_eliminate_tables);
}
else if ((table= tbl->table))
{
@@ -1812,6 +1822,7 @@ static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl)
tab->type= JT_CONST;
tab->table->const_table= 1;
join->eliminated_tables |= table->map;
+ trace_eliminate_tables->add(table->alias.c_ptr_safe());
join->const_table_map|= table->map;
set_position(join, join->const_tables++, tab, (KEYUSE*)0);
}
diff --git a/sql/opt_trace.cc b/sql/opt_trace.cc
new file mode 100644
index 00000000000..9957e524e90
--- /dev/null
+++ b/sql/opt_trace.cc
@@ -0,0 +1,745 @@
+/* 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-1301 USA */
+
+#include "mariadb.h"
+#include "sql_array.h"
+#include "sql_string.h"
+#include "sql_class.h"
+#include "sql_show.h"
+#include "field.h"
+#include "table.h"
+#include "opt_trace.h"
+#include "sql_parse.h"
+#include "set_var.h"
+#include "my_json_writer.h"
+#include "sp_head.h"
+
+#include "rowid_filter.h"
+
+const char I_S_table_name[]= "OPTIMIZER_TRACE";
+
+/**
+ Whether a list of tables contains information_schema.OPTIMIZER_TRACE.
+ @param tbl list of tables
+
+ Can we do better than this here??
+ @note this does not catch that a stored routine or view accesses
+ the OPTIMIZER_TRACE table. So using a stored routine or view to read
+ OPTIMIZER_TRACE will overwrite OPTIMIZER_TRACE as it runs and provide
+ uninteresting info.
+*/
+bool list_has_optimizer_trace_table(const TABLE_LIST *tbl)
+{
+ for (; tbl; tbl= tbl->next_global)
+ {
+ if (tbl->schema_table &&
+ 0 == strcmp(tbl->schema_table->table_name, I_S_table_name))
+ return true;
+ }
+ return false;
+}
+
+/*
+ Returns if a query has a set command with optimizer_trace being switched on/off.
+ True: Don't trace the query(uninteresting)
+*/
+
+bool sets_var_optimizer_trace(enum enum_sql_command sql_command,
+ List<set_var_base> *set_vars)
+{
+ if (sql_command == SQLCOM_SET_OPTION)
+ {
+ List_iterator_fast<set_var_base> it(*set_vars);
+ const set_var_base *var;
+ while ((var= it++))
+ if (var->is_var_optimizer_trace()) return true;
+ }
+ return false;
+}
+
+
+ST_FIELD_INFO optimizer_trace_info[]=
+{
+ /* name, length, type, value, maybe_null, old_name, open_method */
+ {"QUERY", 65535, MYSQL_TYPE_STRING, 0, false, NULL, SKIP_OPEN_TABLE},
+ {"TRACE", 65535, MYSQL_TYPE_STRING, 0, false, NULL, SKIP_OPEN_TABLE},
+ {"MISSING_BYTES_BEYOND_MAX_MEM_SIZE", 20, MYSQL_TYPE_LONG, 0, false, NULL,
+ SKIP_OPEN_TABLE},
+ {"INSUFFICIENT_PRIVILEGES", 1, MYSQL_TYPE_TINY, 0, false, NULL,
+ SKIP_OPEN_TABLE},
+ {NULL, 0, MYSQL_TYPE_STRING, 0, true, NULL, 0}
+};
+
+/*
+ TODO: one-line needs to be implemented seperately
+*/
+const char *Opt_trace_context::flag_names[]= {"enabled", "default",
+ NullS};
+
+/*
+ Returns if a particular command will be traced or not
+*/
+
+inline bool sql_command_can_be_traced(enum enum_sql_command sql_command)
+{
+ /*
+ For first iteration we are only allowing select queries.
+ TODO: change to allow other queries.
+ */
+ return sql_command == SQLCOM_SELECT ||
+ sql_command == SQLCOM_UPDATE ||
+ sql_command == SQLCOM_DELETE ||
+ sql_command == SQLCOM_DELETE_MULTI ||
+ sql_command == SQLCOM_UPDATE_MULTI;
+}
+
+void opt_trace_print_expanded_query(THD *thd, SELECT_LEX *select_lex,
+ Json_writer_object *writer)
+
+{
+ DBUG_ASSERT(thd->trace_started());
+
+ StringBuffer<1024> str(system_charset_info);
+ ulonglong save_option_bits= thd->variables.option_bits;
+ thd->variables.option_bits &= ~OPTION_QUOTE_SHOW_CREATE;
+ select_lex->print(thd, &str,
+ enum_query_type(QT_TO_SYSTEM_CHARSET |
+ QT_SHOW_SELECT_NUMBER |
+ QT_ITEM_IDENT_SKIP_DB_NAMES |
+ QT_VIEW_INTERNAL));
+ thd->variables.option_bits= save_option_bits;
+ /*
+ The output is not very pretty lots of back-ticks, the output
+ is as the one in explain extended , lets try to improved it here.
+ */
+ writer->add("expanded_query", str.c_ptr_safe(), str.length());
+}
+
+void opt_trace_disable_if_no_security_context_access(THD *thd)
+{
+ if (likely(!(thd->variables.optimizer_trace &
+ Opt_trace_context::FLAG_ENABLED)) || // (1)
+ thd->system_thread) // (2)
+ {
+ /*
+ (1) We know that the routine's execution starts with "enabled=off".
+ If it stays so until the routine ends, we needn't do security checks on
+ the routine.
+ If it does not stay so, it means the definer sets it to "on" somewhere
+ in the routine's body. Then it is his conscious decision to generate
+ traces, thus it is still correct to skip the security check.
+
+ (2) Threads of the Events Scheduler have an unusual security context
+ (thd->m_main_security_ctx.priv_user==NULL, see comment in
+ Security_context::change_security_context()).
+ */
+ return;
+ }
+ Opt_trace_context *const trace= &thd->opt_trace;
+ if (!thd->trace_started())
+ {
+ /*
+ @@optimizer_trace has "enabled=on" but trace is not started.
+ Either Opt_trace_start ctor was not called for our statement (3), or it
+ was called but at that time, the variable had "enabled=off" (4).
+
+ There are no known cases of (3).
+
+ (4) suggests that the user managed to change the variable during
+ execution of the statement, and this statement is using
+ view/routine (note that we have not been able to provoke this, maybe
+ this is impossible). If it happens it is suspicious.
+
+ We disable I_S output. And we cannot do otherwise: we have no place to
+ store a possible "missing privilege" information (no Opt_trace_stmt, as
+ is_started() is false), so cannot do security checks, so cannot safely
+ do tracing, so have to disable I_S output. And even then, we don't know
+ when to re-enable I_S output, as we have no place to store the
+ information "re-enable tracing at the end of this statement", and we
+ don't even have a notion of statement here (statements in the optimizer
+ trace world mean an Opt_trace_stmt object, and there is none here). So
+ we must disable for the session's life.
+
+ COM_FIELD_LIST opens views, thus used to be a case of (3). To avoid
+ disabling I_S output for the session's life when this command is issued
+ (like in: "SET OPTIMIZER_TRACE='ENABLED=ON';USE somedb;" in the 'mysql'
+ command-line client), we have decided to create a Opt_trace_start for
+ this command. The command itself is not traced though
+ (SQLCOM_SHOW_FIELDS does not have CF_OPTIMIZER_TRACE).
+ */
+ return;
+ }
+ /*
+ Note that thd->main_security_ctx.master_access is probably invariant
+ accross the life of THD: GRANT/REVOKE don't affect global privileges of an
+ existing connection, per the manual.
+ */
+ if (!(thd->main_security_ctx.check_access(GLOBAL_ACLS & ~GRANT_ACL)) &&
+ (0 != strcmp(thd->main_security_ctx.priv_user,
+ thd->security_context()->priv_user) ||
+ 0 != my_strcasecmp(system_charset_info,
+ thd->main_security_ctx.priv_host,
+ thd->security_context()->priv_host)))
+ trace->missing_privilege();
+}
+
+void opt_trace_disable_if_no_stored_proc_func_access(THD *thd, sp_head *sp)
+{
+ if (likely(!(thd->variables.optimizer_trace &
+ Opt_trace_context::FLAG_ENABLED)) ||
+ thd->system_thread ||
+ !thd->trace_started())
+ return;
+
+ Opt_trace_context *const trace= &thd->opt_trace;
+ bool full_access;
+ Security_context *const backup_thd_sctx= thd->security_context();
+ thd->set_security_context(&thd->main_security_ctx);
+ const bool rc= check_show_routine_access(thd, sp, &full_access) || !full_access;
+ thd->set_security_context(backup_thd_sctx);
+ if (rc)
+ trace->missing_privilege();
+}
+
+/**
+ If tracing is on, checks additional privileges on a list of tables/views,
+ to make sure that the user has the right to do SHOW CREATE TABLE/VIEW and
+ "SELECT *". For that:
+ - this functions checks table-level SELECT
+ - which is sufficient for SHOW CREATE TABLE and "SELECT *", if a base table
+ - if a view, if the view has not been identified as such then
+ opt_trace_disable_if_no_view_access() will be later called and check SHOW
+ VIEW; other we check SHOW VIEW here; SHOW VIEW + SELECT is sufficient for
+ SHOW CREATE VIEW.
+ If a privilege is missing, notifies the trace system.
+
+ @param thd
+ @param tbl list of tables to check
+*/
+
+void opt_trace_disable_if_no_tables_access(THD *thd, TABLE_LIST *tbl)
+{
+ if (likely(!(thd->variables.optimizer_trace &
+ Opt_trace_context::FLAG_ENABLED)) ||
+ thd->system_thread ||
+ !thd->trace_started())
+ return;
+
+ Opt_trace_context *const trace= &thd->opt_trace;
+ Security_context *const backup_thd_sctx= thd->security_context();
+ thd->set_security_context(&thd->main_security_ctx);
+ const TABLE_LIST *const first_not_own_table= thd->lex->first_not_own_table();
+ for (TABLE_LIST *t= tbl; t != NULL && t != first_not_own_table;
+ t= t->next_global)
+ {
+ /*
+ Anonymous derived tables (as in
+ "SELECT ... FROM (SELECT ...)") don't have their grant.privilege set.
+ */
+ if (!t->is_anonymous_derived_table())
+ {
+ const GRANT_INFO backup_grant_info= t->grant;
+ Security_context *const backup_table_sctx= t->security_ctx;
+ t->security_ctx= NULL;
+ /*
+ (1) check_table_access() fills t->grant.privilege.
+ (2) Because SELECT privileges can be column-based,
+ check_table_access() will return 'false' as long as there is SELECT
+ privilege on one column. But we want a table-level privilege.
+ */
+
+ bool rc =
+ check_table_access(thd, SELECT_ACL, t, false, 1, true) || // (1)
+ ((t->grant.privilege & SELECT_ACL) == 0); // (2)
+ if (t->is_view())
+ {
+ /*
+ It's a view which has already been opened: we are executing a
+ prepared statement. The view has been unfolded in the global list of
+ tables. So underlying tables will be automatically checked in the
+ present function, but we need an explicit check of SHOW VIEW:
+ */
+ rc |= check_table_access(thd, SHOW_VIEW_ACL, t, false, 1, true);
+ }
+ t->security_ctx= backup_table_sctx;
+ t->grant= backup_grant_info;
+ if (rc)
+ {
+ trace->missing_privilege();
+ break;
+ }
+ }
+ }
+ thd->set_security_context(backup_thd_sctx);
+ return;
+}
+
+void opt_trace_disable_if_no_view_access(THD *thd, TABLE_LIST *view,
+ TABLE_LIST *underlying_tables)
+{
+
+ if (likely(!(thd->variables.optimizer_trace &
+ Opt_trace_context::FLAG_ENABLED)) ||
+ thd->system_thread ||
+ !thd->trace_started())
+ return;
+
+ Opt_trace_context *const trace= &thd->opt_trace;
+ Security_context *const backup_table_sctx= view->security_ctx;
+ Security_context *const backup_thd_sctx= thd->security_context();
+ const GRANT_INFO backup_grant_info= view->grant;
+
+ view->security_ctx= NULL; // no SUID context for view
+ // no SUID context for THD
+ thd->set_security_context(&thd->main_security_ctx);
+ const int rc= check_table_access(thd, SHOW_VIEW_ACL, view, false, 1, true);
+
+ view->security_ctx= backup_table_sctx;
+ thd->set_security_context(backup_thd_sctx);
+ view->grant= backup_grant_info;
+
+ if (rc)
+ {
+ trace->missing_privilege();
+ return;
+ }
+ /*
+ We needn't check SELECT privilege on this view. Some
+ opt_trace_disable_if_no_tables_access() call has or will check it.
+
+ Now we check underlying tables/views of our view:
+ */
+ opt_trace_disable_if_no_tables_access(thd, underlying_tables);
+ return;
+}
+
+
+/**
+ @class Opt_trace_stmt
+
+ The trace of one statement.
+*/
+
+Opt_trace_stmt::Opt_trace_stmt(Opt_trace_context *ctx_arg)
+{
+ ctx= ctx_arg;
+ current_json= new Json_writer();
+ missing_priv= false;
+ I_S_disabled= 0;
+}
+
+Opt_trace_stmt::~Opt_trace_stmt()
+{
+ delete current_json;
+}
+
+size_t Opt_trace_stmt::get_length()
+{
+ return current_json->output.length();
+}
+
+size_t Opt_trace_stmt::get_truncated_bytes()
+{
+ return current_json->get_truncated_bytes();
+}
+
+void Opt_trace_stmt::set_query(const char *query_ptr, size_t length,
+ const CHARSET_INFO *charset)
+{
+ query.append(query_ptr, length, charset);
+}
+
+void Opt_trace_context::missing_privilege()
+{
+ if (current_trace)
+ current_trace->missing_privilege();
+}
+
+void Opt_trace_context::set_allowed_mem_size(size_t mem_size)
+{
+ current_trace->set_allowed_mem_size(mem_size);
+}
+
+/*
+ TODO: In future when we would be saving multiple trace,
+ this function would return
+ max_mem_size - memory_occupied_by_the_saved_traces
+*/
+
+size_t Opt_trace_context::remaining_mem_size()
+{
+ return max_mem_size;
+}
+
+/*
+ Disable tracing for children if the current trace is already present.
+ Currently only one trace is stored and there is no mechanism
+ to restore traces, so disabling tracing for children is the best option.
+*/
+
+bool Opt_trace_context::disable_tracing_if_required()
+{
+ if (current_trace)
+ {
+ current_trace->disable_tracing_for_children();
+ return true;
+ }
+ return false;
+}
+
+bool Opt_trace_context::enable_tracing_if_required()
+{
+ if (current_trace)
+ {
+ current_trace->enable_tracing_for_children();
+ return true;
+ }
+ return false;
+}
+
+bool Opt_trace_context::is_enabled()
+{
+ if (current_trace)
+ return current_trace->is_enabled();
+ return false;
+}
+
+Opt_trace_context::Opt_trace_context()
+{
+ current_trace= NULL;
+ max_mem_size= 0;
+}
+Opt_trace_context::~Opt_trace_context()
+{
+ delete_traces();
+}
+
+void Opt_trace_context::set_query(const char *query, size_t length, const CHARSET_INFO *charset)
+{
+ current_trace->set_query(query, length, charset);
+}
+
+void Opt_trace_context::start(THD *thd, TABLE_LIST *tbl,
+ enum enum_sql_command sql_command,
+ const char *query,
+ size_t query_length,
+ const CHARSET_INFO *query_charset,
+ ulong max_mem_size_arg)
+{
+ /*
+ This is done currently because we don't want to have multiple
+ traces open at the same time, so as soon as a new trace is created
+ we forcefully end the previous one, if it has not ended by itself.
+ This would mostly happen with stored functions or procedures.
+
+ TODO: handle multiple traces
+ */
+ DBUG_ASSERT(!current_trace);
+ current_trace= new Opt_trace_stmt(this);
+ max_mem_size= max_mem_size_arg;
+ set_allowed_mem_size(remaining_mem_size());
+}
+
+void Opt_trace_context::end()
+{
+ if (current_trace)
+ traces.push(current_trace);
+
+ if (!traces.elements())
+ return;
+ if (traces.elements() > 1)
+ {
+ Opt_trace_stmt *prev= traces.at(0);
+ delete prev;
+ traces.del(0);
+ }
+ current_trace= NULL;
+}
+
+Opt_trace_start::Opt_trace_start(THD *thd, TABLE_LIST *tbl,
+ enum enum_sql_command sql_command,
+ List<set_var_base> *set_vars,
+ const char *query,
+ size_t query_length,
+ const CHARSET_INFO *query_charset):ctx(&thd->opt_trace)
+{
+ /*
+ if optimizer trace is enabled and the statment we have is traceable,
+ then we start the context.
+ */
+ const ulonglong var= thd->variables.optimizer_trace;
+ traceable= FALSE;
+ if (unlikely(var & Opt_trace_context::FLAG_ENABLED) &&
+ sql_command_can_be_traced(sql_command) &&
+ !list_has_optimizer_trace_table(tbl) &&
+ !sets_var_optimizer_trace(sql_command, set_vars) &&
+ !thd->system_thread &&
+ !ctx->disable_tracing_if_required())
+ {
+ ctx->start(thd, tbl, sql_command, query, query_length, query_charset,
+ thd->variables.optimizer_trace_max_mem_size);
+ ctx->set_query(query, query_length, query_charset);
+ traceable= TRUE;
+ opt_trace_disable_if_no_tables_access(thd, tbl);
+ }
+}
+
+Opt_trace_start::~Opt_trace_start()
+{
+ if (traceable)
+ {
+ ctx->end();
+ traceable= FALSE;
+ }
+ else
+ {
+ ctx->enable_tracing_if_required();
+ }
+}
+
+void Opt_trace_stmt::fill_info(Opt_trace_info* info)
+{
+ if (unlikely(info->missing_priv= get_missing_priv()))
+ {
+ info->trace_ptr= info->query_ptr= "";
+ info->trace_length= info->query_length= 0;
+ info->query_charset= &my_charset_bin;
+ info->missing_bytes= 0;
+ }
+ else
+ {
+ info->trace_ptr= current_json->output.get_string()->ptr();
+ info->trace_length= get_length();
+ info->query_ptr= query.ptr();
+ info->query_length= query.length();
+ info->query_charset= query.charset();
+ info->missing_bytes= get_truncated_bytes();
+ info->missing_priv= get_missing_priv();
+ }
+}
+
+void Opt_trace_stmt::missing_privilege()
+{
+ missing_priv= true;
+}
+
+void Opt_trace_stmt::disable_tracing_for_children()
+{
+ ++I_S_disabled;
+}
+
+void Opt_trace_stmt::enable_tracing_for_children()
+{
+ if (I_S_disabled)
+ --I_S_disabled;
+}
+
+void Opt_trace_stmt::set_allowed_mem_size(size_t mem_size)
+{
+ current_json->set_size_limit(mem_size);
+}
+
+/*
+ Prefer this when you are iterating over JOIN_TABs
+*/
+
+void Json_writer::add_table_name(const JOIN_TAB *tab)
+{
+ DBUG_ASSERT(tab->join->thd->trace_started());
+ if (tab != NULL)
+ {
+ char table_name_buffer[SAFE_NAME_LEN];
+ if (tab->table && tab->table->derived_select_number)
+ {
+ /* Derived table name generation */
+ size_t len= my_snprintf(table_name_buffer, sizeof(table_name_buffer)-1,
+ "<derived%u>",
+ tab->table->derived_select_number);
+ add_str(table_name_buffer, len);
+ }
+ else if (tab->bush_children)
+ {
+ JOIN_TAB *ctab= tab->bush_children->start;
+ size_t len= my_snprintf(table_name_buffer,
+ sizeof(table_name_buffer)-1,
+ "<subquery%d>",
+ ctab->emb_sj_nest->sj_subq_pred->get_identifier());
+ add_str(table_name_buffer, len);
+ }
+ else
+ {
+ TABLE_LIST *real_table= tab->table->pos_in_table_list;
+ add_str(real_table->alias.str, real_table->alias.length);
+ }
+ }
+ else
+ DBUG_ASSERT(0);
+}
+
+void Json_writer::add_table_name(const TABLE *table)
+{
+ add_str(table->pos_in_table_list->alias.str);
+}
+
+
+void add_table_scan_values_to_trace(THD *thd, JOIN_TAB *tab)
+{
+ DBUG_ASSERT(thd->trace_started());
+ Json_writer_object table_records(thd);
+ table_records.add_table_name(tab);
+ Json_writer_object table_rec(thd, "table_scan");
+ table_rec.add("rows", tab->found_records)
+ .add("cost", tab->read_time);
+}
+
+
+/*
+ @brief
+ Add the tables inside a partial join to the optimizer trace
+
+ @param join join handler
+ @param idx length of the partial QEP in 'join->positions'
+ @table_map map of all non-const tables of the join
+
+ @note
+ This function is used during best_access_path to print the tables
+ inside the partial join that were considered doing the cost based
+ analysis of the various join orders.
+*/
+
+void trace_plan_prefix(JOIN *join, uint idx, table_map join_tables)
+{
+ THD *const thd= join->thd;
+ DBUG_ASSERT(thd->trace_started());
+
+ Json_writer_array plan_prefix(thd, "plan_prefix");
+ for (uint i= 0; i < idx; i++)
+ {
+ TABLE_LIST *const tr= join->positions[i].table->tab_list;
+ if (!(tr->map & join_tables))
+ plan_prefix.add_table_name(join->positions[i].table);
+ }
+}
+
+
+/*
+ Print the join order of all the tables for top level select.
+
+ For example:
+
+ select * from ot1
+ where ot1.a IN (select it1.a from it1, it2 where it1.b=it2.a);
+
+ So this function would print
+ ot1, <subquery2> ----> For select #1
+*/
+
+void print_final_join_order(JOIN *join)
+{
+ DBUG_ASSERT(join->thd->trace_started());
+
+ Json_writer_object join_order(join->thd);
+ Json_writer_array best_order(join->thd, "best_join_order");
+ JOIN_TAB *j;
+ uint i;
+ for (j= join->join_tab,i=0 ; i < join->top_join_tab_count;
+ i++, j++)
+ best_order.add_table_name(j);
+}
+
+
+void print_best_access_for_table(THD *thd, POSITION *pos,
+ enum join_type type)
+{
+ DBUG_ASSERT(thd->trace_started());
+
+ Json_writer_object obj(thd, "chosen_access_method");
+ obj.add("type", type == JT_ALL ? "scan" : join_type_str[type]);
+ obj.add("records", pos->records_read);
+ obj.add("cost", pos->read_time);
+ obj.add("uses_join_buffering", pos->use_join_buffer);
+ if (pos->range_rowid_filter_info)
+ {
+ uint key_no= pos->range_rowid_filter_info->key_no;
+ obj.add("rowid_filter_key",
+ pos->table->table->key_info[key_no].name);
+ }
+}
+
+
+/*
+ Introduce enum_query_type flags parameter, maybe also allow
+ EXPLAIN also use this function.
+*/
+
+void Json_writer::add_str(Item *item)
+{
+ if (item)
+ {
+ THD *thd= current_thd;
+ StringBuffer<256> str(system_charset_info);
+
+ ulonglong save_option_bits= thd->variables.option_bits;
+ thd->variables.option_bits &= ~OPTION_QUOTE_SHOW_CREATE;
+ item->print(&str,
+ enum_query_type(QT_TO_SYSTEM_CHARSET | QT_SHOW_SELECT_NUMBER
+ | QT_ITEM_IDENT_SKIP_DB_NAMES));
+ thd->variables.option_bits= save_option_bits;
+ add_str(str.c_ptr_safe());
+ }
+ else
+ add_null();
+}
+
+void Opt_trace_context::delete_traces()
+{
+ if (traces.elements())
+ {
+ while (traces.elements())
+ {
+ Opt_trace_stmt *prev= traces.at(0);
+ delete prev;
+ traces.del(0);
+ }
+ }
+}
+
+
+int fill_optimizer_trace_info(THD *thd, TABLE_LIST *tables, Item *)
+{
+ TABLE *table= tables->table;
+ Opt_trace_info info;
+
+ /* get_values of trace, query , missing bytes and missing_priv
+
+ @todo: Need an iterator here to walk over all the traces
+ */
+ Opt_trace_context* ctx= &thd->opt_trace;
+
+ if (!thd->opt_trace.empty())
+ {
+ Opt_trace_stmt *stmt= ctx->get_top_trace();
+ stmt->fill_info(&info);
+
+ table->field[0]->store(info.query_ptr, static_cast<uint>(info.query_length),
+ info.query_charset);
+ table->field[1]->store(info.trace_ptr, static_cast<uint>(info.trace_length),
+ system_charset_info);
+ table->field[2]->store(info.missing_bytes, true);
+ table->field[3]->store(info.missing_priv, true);
+ // Store in IS
+ if (schema_table_store_record(thd, table))
+ return 1;
+ }
+ return 0;
+}
diff --git a/sql/opt_trace.h b/sql/opt_trace.h
new file mode 100644
index 00000000000..550f18c0797
--- /dev/null
+++ b/sql/opt_trace.h
@@ -0,0 +1,210 @@
+#ifndef OPT_TRACE_INCLUDED
+#define OPT_TRACE_INCLUDED
+/* 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-1301 USA */
+
+#include "opt_trace_context.h" // Opt_trace_context
+#include "sql_lex.h"
+#include "my_json_writer.h"
+#include "sql_select.h"
+class Item;
+class THD;
+struct TABLE_LIST;
+
+/*
+ User-visible information about a trace.
+*/
+
+struct Opt_trace_info
+{
+ /**
+ String containing trace.
+ If trace has been end()ed, this is 0-terminated, which is only to aid
+ debugging or unit testing; this property is not relied upon in normal
+ server usage.
+ If trace has not been ended, this is not 0-terminated. That rare case can
+ happen when a substatement reads OPTIMIZER_TRACE (at that stage, the top
+ statement is still executing so its trace is not ended yet, but may still
+ be read by the sub-statement).
+ */
+ const char *trace_ptr;
+ size_t trace_length;
+ //// String containing original query.
+ const char *query_ptr;
+ size_t query_length;
+ const CHARSET_INFO *query_charset; ///< charset of query string
+ /**
+ How many bytes this trace is missing (for traces which were truncated
+ because of @@@@optimizer-trace-max-mem-size).
+ The trace is not extended beyond trace-max-mem-size.
+ */
+ size_t missing_bytes;
+ /*
+ Whether user lacks privilege to see this trace.
+ If this is set to TRUE, then we return an empty trace
+ */
+ bool missing_priv;
+};
+
+/**
+ Instantiate this class to start tracing a THD's actions (generally at a
+ statement's start), and to set the "original" query (not transformed, as
+ sent by client) for the new trace. Destructor will end the trace.
+
+ @param thd the THD
+ @param tbl list of tables read/written by the statement.
+ @param sql_command SQL command being prepared or executed
+ @param set_vars what variables are set by this command (only used if
+ sql_command is SQLCOM_SET_OPTION)
+ @param query query
+ @param length query's length
+ @param charset charset which was used to encode this query
+*/
+
+
+class Opt_trace_start {
+ public:
+ Opt_trace_start(THD *thd_arg, TABLE_LIST *tbl,
+ enum enum_sql_command sql_command,
+ List<set_var_base> *set_vars,
+ const char *query,
+ size_t query_length,
+ const CHARSET_INFO *query_charset);
+ ~Opt_trace_start();
+
+ private:
+ Opt_trace_context *const ctx;
+ /*
+ True: the query will be traced
+ False: otherwise
+ */
+ bool traceable;
+};
+
+/**
+ Prints SELECT query to optimizer trace. It is not the original query (as in
+ @c Opt_trace_context::set_query()) but a printout of the parse tree
+ (Item-s).
+ @param thd the THD
+ @param select_lex query's parse tree
+ @param trace_object Json_writer object to which the query will be added
+*/
+void opt_trace_print_expanded_query(THD *thd, SELECT_LEX *select_lex,
+ Json_writer_object *trace_object);
+
+void add_table_scan_values_to_trace(THD *thd, JOIN_TAB *tab);
+void trace_plan_prefix(JOIN *join, uint idx, table_map join_tables);
+void print_final_join_order(JOIN *join);
+void print_best_access_for_table(THD *thd, POSITION *pos,
+ enum join_type type);
+
+/*
+ Security related (need to add a proper comment here)
+*/
+
+/**
+ If the security context is not that of the connected user, inform the trace
+ system that a privilege is missing. With one exception: see below.
+
+ @param thd
+
+ This serves to eliminate the following issue.
+ Any information readable by a SELECT may theoretically end up in
+ the trace. And a SELECT may read information from other places than tables:
+ - from views (reading their bodies)
+ - from stored routines (reading their bodies)
+ - from files (reading their content), with LOAD_FILE()
+ - from the list of connections (reading their queries...), with
+ I_S.PROCESSLIST.
+ If the connected user has EXECUTE privilege on a routine which does a
+ security context change, the routine can retrieve information internally
+ (if allowed by the SUID context's privileges), and present only a portion
+ of it to the connected user. But with tracing on, all information is
+ possibly in the trace. So the connected user receives more information than
+ the routine's definer intended to provide. Fixing this issue would require
+ adding, near many privilege checks in the server, a new
+ optimizer-trace-specific check done against the connected user's context,
+ to verify that the connected user has the right to see the retrieved
+ information.
+
+ Instead, our chosen simpler solution is that if we see a security context
+ change where SUID user is not the connected user, we disable tracing. With
+ only one safe exception: if the connected user has all global privileges
+ (because then she/he can find any information anyway). By "all global
+ privileges" we mean everything but WITH GRANT OPTION (that latter one isn't
+ related to information gathering).
+
+ Read access to I_S.OPTIMIZER_TRACE by another user than the connected user
+ is restricted: @see fill_optimizer_trace_info().
+*/
+void opt_trace_disable_if_no_security_context_access(THD *thd);
+
+void opt_trace_disable_if_no_tables_access(THD *thd, TABLE_LIST *tbl);
+
+/**
+ If tracing is on, checks additional privileges for a view, to make sure
+ that the user has the right to do SHOW CREATE VIEW. For that:
+ - this function checks SHOW VIEW
+ - SELECT is tested in opt_trace_disable_if_no_tables_access()
+ - SELECT + SHOW VIEW is sufficient for SHOW CREATE VIEW.
+ We also check underlying tables.
+ If a privilege is missing, notifies the trace system.
+ This function should be called when the view's underlying tables have not
+ yet been merged.
+
+ @param thd THD context
+ @param view view to check
+ @param underlying_tables underlying tables/views of 'view'
+ */
+
+void opt_trace_disable_if_no_view_access(THD *thd, TABLE_LIST *view,
+ TABLE_LIST *underlying_tables);
+
+/**
+ If tracing is on, checks additional privileges on a stored routine, to make
+ sure that the user has the right to do SHOW CREATE PROCEDURE/FUNCTION. For
+ that, we use the same checks as in those SHOW commands.
+ If a privilege is missing, notifies the trace system.
+
+ This function is not redundant with
+ opt_trace_disable_if_no_security_context_access().
+ Indeed, for a SQL SECURITY INVOKER routine, there is no context change, but
+ we must still verify that the invoker can do SHOW CREATE.
+
+ For triggers, see note in sp_head::execute_trigger().
+
+ @param thd
+ @param sp routine to check
+ */
+void opt_trace_disable_if_no_stored_proc_func_access(THD *thd, sp_head *sp);
+
+/**
+ Fills information_schema.OPTIMIZER_TRACE with rows (one per trace)
+ @retval 0 ok
+ @retval 1 error
+*/
+int fill_optimizer_trace_info(THD *thd, TABLE_LIST *tables, Item *);
+
+#define OPT_TRACE_TRANSFORM(thd, object_level0, object_level1, \
+ select_number, from, to) \
+ Json_writer_object object_level0(thd); \
+ Json_writer_object object_level1(thd, "transformation"); \
+ object_level1.add_select_number(select_number).add("from", from).add("to", to);
+
+#define OPT_TRACE_VIEWS_TRANSFORM(thd, object_level0, object_level1, \
+ derived, name, select_number, algorithm) \
+ Json_writer_object trace_wrapper(thd); \
+ Json_writer_object trace_derived(thd, derived); \
+ trace_derived.add("table", name).add_select_number(select_number) \
+ .add("algorithm", algorithm);
+#endif
diff --git a/sql/opt_trace_context.h b/sql/opt_trace_context.h
new file mode 100644
index 00000000000..f578a0c67ec
--- /dev/null
+++ b/sql/opt_trace_context.h
@@ -0,0 +1,135 @@
+#ifndef OPT_TRACE_CONTEXT_INCLUDED
+#define OPT_TRACE_CONTEXT_INCLUDED
+
+#include "sql_array.h"
+
+class Opt_trace_context;
+struct Opt_trace_info;
+class Json_writer;
+
+class Opt_trace_stmt {
+ public:
+ /**
+ Constructor, starts a trace for information_schema and dbug.
+ @param ctx_arg context
+ */
+ Opt_trace_stmt(Opt_trace_context *ctx_arg);
+ ~Opt_trace_stmt();
+ void set_query(const char *query_ptr, size_t length, const CHARSET_INFO *charset);
+ void open_struct(const char *key, char opening_bracket);
+ void close_struct(const char *saved_key, char closing_bracket);
+ void fill_info(Opt_trace_info* info);
+ void add(const char *key, char *opening_bracket, size_t val_length);
+ Json_writer* get_current_json() {return current_json;}
+ void missing_privilege();
+ void disable_tracing_for_children();
+ void enable_tracing_for_children();
+ bool is_enabled()
+ {
+ return I_S_disabled == 0;
+ }
+ void set_allowed_mem_size(size_t mem_size);
+ size_t get_length();
+ size_t get_truncated_bytes();
+ bool get_missing_priv() { return missing_priv; }
+
+private:
+ Opt_trace_context *ctx;
+ String query; // store the query sent by the user
+ Json_writer *current_json; // stores the trace
+ bool missing_priv; ///< whether user lacks privilege to see this trace
+ /*
+ 0 <=> this trace should be in information_schema.
+ !=0 tracing is disabled, this currently happens when we want to trace a
+ sub-statement. For now traces are only collect for the top statement
+ not for the sub-statments.
+ */
+ uint I_S_disabled;
+};
+
+
+class Opt_trace_context
+{
+public:
+ Opt_trace_context();
+ ~Opt_trace_context();
+
+ void start(THD *thd, TABLE_LIST *tbl,
+ enum enum_sql_command sql_command,
+ const char *query,
+ size_t query_length,
+ const CHARSET_INFO *query_charset,
+ ulong max_mem_size_arg);
+ void end();
+ void set_query(const char *query, size_t length, const CHARSET_INFO *charset);
+ void delete_traces();
+ void set_allowed_mem_size(size_t mem_size);
+ size_t remaining_mem_size();
+
+private:
+ Opt_trace_stmt* top_trace()
+ {
+ return *(traces.front());
+ }
+
+public:
+
+ /*
+ This returns the top trace from the list of traces. This function
+ is used when we want to see the contents of the INFORMATION_SCHEMA.OPTIMIZER_TRACE
+ table.
+ */
+
+ Opt_trace_stmt* get_top_trace()
+ {
+ if (!traces.elements())
+ return NULL;
+ return top_trace();
+ }
+
+ /*
+ This returns the current trace, to which we are still writing and has not been finished
+ */
+
+ Json_writer* get_current_json()
+ {
+ if (!is_started())
+ return NULL;
+ return current_trace->get_current_json();
+ }
+
+ bool empty()
+ {
+ return static_cast<uint>(traces.elements()) == 0;
+ }
+
+ bool is_started()
+ {
+ return current_trace && current_trace->is_enabled();
+ }
+
+ bool disable_tracing_if_required();
+
+ bool enable_tracing_if_required();
+
+ bool is_enabled();
+
+ void missing_privilege();
+
+ static const char *flag_names[];
+ enum
+ {
+ FLAG_DEFAULT = 0,
+ FLAG_ENABLED = 1 << 0
+ };
+
+private:
+ /*
+ List of traces (currently it stores only 1 trace)
+ */
+ Dynamic_array<Opt_trace_stmt*> traces;
+ Opt_trace_stmt *current_trace;
+ size_t max_mem_size;
+};
+
+#endif /* OPT_TRACE_CONTEXT_INCLUDED */
diff --git a/sql/partition_element.h b/sql/partition_element.h
index 8cc25650d31..e0a519065cc 100644
--- a/sql/partition_element.h
+++ b/sql/partition_element.h
@@ -144,6 +144,7 @@ public:
part_min_rows(part_elem->part_min_rows),
range_value(0), partition_name(NULL),
tablespace_name(part_elem->tablespace_name),
+ log_entry(NULL),
part_comment(part_elem->part_comment),
data_file_name(part_elem->data_file_name),
index_file_name(part_elem->index_file_name),
diff --git a/sql/partition_info.h b/sql/partition_info.h
index ddbb89fa605..2f8b1a7fafd 100644
--- a/sql/partition_info.h
+++ b/sql/partition_info.h
@@ -402,7 +402,7 @@ public:
vers_info->interval.start= start;
if (item->fix_fields_if_needed_for_scalar(thd, &item))
return true;
- bool error= get_interval_value(item, int_type, &vers_info->interval.step) ||
+ bool error= get_interval_value(thd, item, int_type, &vers_info->interval.step) ||
vers_info->interval.step.neg || vers_info->interval.step.second_part ||
!(vers_info->interval.step.year || vers_info->interval.step.month ||
vers_info->interval.step.day || vers_info->interval.step.hour ||
diff --git a/sql/procedure.h b/sql/procedure.h
index 80930d6b707..15fd525ec65 100644
--- a/sql/procedure.h
+++ b/sql/procedure.h
@@ -44,24 +44,30 @@ public:
this->name.length= strlen(name_par);
}
enum Type type() const { return Item::PROC_ITEM; }
+ Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
+ const Tmp_field_param *param)
+ {
+ /*
+ We can get to here when using a CURSOR for a query with PROCEDURE:
+ DECLARE c CURSOR FOR SELECT * FROM t1 PROCEDURE analyse();
+ OPEN c;
+ */
+ return create_tmp_field_ex_simple(table, src, param);
+ }
virtual void set(double nr)=0;
virtual void set(const char *str,uint length,CHARSET_INFO *cs)=0;
virtual void set(longlong nr)=0;
const Type_handler *type_handler() const=0;
void set(const char *str) { set(str,(uint) strlen(str), default_charset()); }
- void make_send_field(THD *thd, Send_field *tmp_field)
- {
- init_make_send_field(tmp_field,field_type());
- }
unsigned int size_of() { return sizeof(*this);}
bool check_vcol_func_processor(void *arg)
{
DBUG_ASSERT(0); // impossible
return mark_unsupported_function("proc", arg, VCOL_IMPOSSIBLE);
}
- bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
- return type_handler()->Item_get_date(this, ltime, fuzzydate);
+ return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
}
Item* get_copy(THD *thd) { return 0; }
};
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 405b50f4971..5ec887e13d7 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -564,8 +564,26 @@ static uchar *net_store_length_fast(uchar *packet, size_t length)
void Protocol::end_statement()
{
- /* sanity check*/
- DBUG_ASSERT_IF_WSREP(!(WSREP(thd) && thd->wsrep_conflict_state == REPLAYING));
+#ifdef WITH_WSREP
+ /*
+ Commented out: This sanity check does not hold in general.
+ Thd->LOCK_thd_data() must be unlocked before sending response
+ to client, so BF abort may sneak in here.
+ DBUG_ASSERT(!WSREP(thd) || thd->wsrep_conflict_state() == NO_CONFLICT);
+ */
+
+ /*
+ sanity check, don't send end statement while replaying
+ */
+ DBUG_ASSERT(thd->wsrep_trx().state() != wsrep::transaction::s_replaying);
+ if (WSREP(thd) && thd->wsrep_trx().state() ==
+ wsrep::transaction::s_replaying)
+ {
+ WSREP_ERROR("attempting net_end_statement while replaying");
+ return;
+ }
+#endif /* WITH_WSREP */
+
DBUG_ENTER("Protocol::end_statement");
DBUG_ASSERT(! thd->get_stmt_da()->is_sent());
bool error= FALSE;
@@ -752,7 +770,7 @@ void Protocol::init(THD *thd_arg)
packet= &thd->packet;
convert= &thd->convert_buffer;
#ifndef DBUG_OFF
- field_types= 0;
+ field_handlers= 0;
#endif
}
@@ -784,6 +802,73 @@ bool Protocol::flush()
#ifndef EMBEDDED_LIBRARY
+bool Protocol_text::store_field_metadata(const THD * thd,
+ const Send_field &field,
+ CHARSET_INFO *charset_for_protocol,
+ uint fieldnr)
+{
+ CHARSET_INFO *thd_charset= thd->variables.character_set_results;
+ char *pos;
+ CHARSET_INFO *cs= system_charset_info;
+ DBUG_ASSERT(field.is_sane());
+
+ if (thd->client_capabilities & CLIENT_PROTOCOL_41)
+ {
+ if (store(STRING_WITH_LEN("def"), cs, thd_charset) ||
+ store_str(field.db_name, cs, thd_charset) ||
+ store_str(field.table_name, cs, thd_charset) ||
+ store_str(field.org_table_name, cs, thd_charset) ||
+ store_str(field.col_name, cs, thd_charset) ||
+ store_str(field.org_col_name, cs, thd_charset) ||
+ packet->realloc(packet->length() + 12))
+ return true;
+ /* Store fixed length fields */
+ pos= (char*) packet->end();
+ *pos++= 12; // Length of packed fields
+ /* inject a NULL to test the client */
+ DBUG_EXECUTE_IF("poison_rs_fields", pos[-1]= (char) 0xfb;);
+ if (charset_for_protocol == &my_charset_bin || thd_charset == NULL)
+ {
+ /* No conversion */
+ int2store(pos, charset_for_protocol->number);
+ int4store(pos + 2, field.length);
+ }
+ else
+ {
+ /* With conversion */
+ int2store(pos, thd_charset->number);
+ uint32 field_length= field.max_octet_length(charset_for_protocol,
+ thd_charset);
+ int4store(pos + 2, field_length);
+ }
+ pos[6]= field.type_handler()->type_code_for_protocol();
+ int2store(pos + 7, field.flags);
+ pos[9]= (char) field.decimals;
+ pos[10]= 0; // For the future
+ pos[11]= 0; // For the future
+ pos+= 12;
+ }
+ else
+ {
+ if (store_str(field.table_name, cs, thd_charset) ||
+ store_str(field.col_name, cs, thd_charset) ||
+ packet->realloc(packet->length() + 10))
+ return true;
+ pos= (char*) packet->end();
+ pos[0]= 3;
+ int3store(pos + 1, field.length);
+ pos[4]= 1;
+ pos[5]= field.type_handler()->type_code_for_protocol();
+ pos[6]= 3;
+ int2store(pos + 7, field.flags);
+ pos[9]= (char) field.decimals;
+ pos+= 10;
+ }
+ packet->length((uint) (pos - packet->ptr()));
+ return false;
+}
+
+
/**
Send name and type of result to client.
@@ -806,10 +891,7 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
{
List_iterator_fast<Item> it(*list);
Item *item;
- ValueBuffer<MAX_FIELD_WIDTH> tmp;
- Protocol_text prot(thd);
- String *local_packet= prot.storage_packet();
- CHARSET_INFO *thd_charset= thd->variables.character_set_results;
+ Protocol_text prot(thd, thd->variables.net_buffer_length);
DBUG_ENTER("Protocol::send_result_set_metadata");
if (flags & SEND_NUM_ROWS)
@@ -822,119 +904,19 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
}
#ifndef DBUG_OFF
- field_types= (enum_field_types*) thd->alloc(sizeof(field_types) *
- list->elements);
- uint count= 0;
+ field_handlers= (const Type_handler**) thd->alloc(sizeof(field_handlers[0]) *
+ list->elements);
#endif
- /* We have to reallocate it here as a stored procedure may have reset it */
- (void) local_packet->alloc(thd->variables.net_buffer_length);
-
- while ((item=it++))
+ for (uint pos= 0; (item=it++); pos++)
{
- char *pos;
- CHARSET_INFO *cs= system_charset_info;
- Send_field field;
- item->make_send_field(thd, &field);
-
- /* limit number of decimals for float and double */
- if (field.type == MYSQL_TYPE_FLOAT || field.type == MYSQL_TYPE_DOUBLE)
- set_if_smaller(field.decimals, FLOATING_POINT_DECIMALS);
-
- /* Keep things compatible for old clients */
- if (field.type == MYSQL_TYPE_VARCHAR)
- field.type= MYSQL_TYPE_VAR_STRING;
-
prot.prepare_for_resend();
-
- if (thd->client_capabilities & CLIENT_PROTOCOL_41)
- {
- if (prot.store(STRING_WITH_LEN("def"), cs, thd_charset) ||
- prot.store(field.db_name, (uint) strlen(field.db_name),
- cs, thd_charset) ||
- prot.store(field.table_name, (uint) strlen(field.table_name),
- cs, thd_charset) ||
- prot.store(field.org_table_name, (uint) strlen(field.org_table_name),
- cs, thd_charset) ||
- prot.store(field.col_name.str, (uint) field.col_name.length,
- cs, thd_charset) ||
- prot.store(field.org_col_name.str, (uint) field.org_col_name.length,
- cs, thd_charset) ||
- local_packet->realloc(local_packet->length()+12))
- goto err;
- /* Store fixed length fields */
- pos= (char*) local_packet->ptr()+local_packet->length();
- *pos++= 12; // Length of packed fields
- /* inject a NULL to test the client */
- DBUG_EXECUTE_IF("poison_rs_fields", pos[-1]= (char) 0xfb;);
- if (item->charset_for_protocol() == &my_charset_bin || thd_charset == NULL)
- {
- /* No conversion */
- int2store(pos, item->charset_for_protocol()->number);
- int4store(pos+2, field.length);
- }
- else
- {
- /* With conversion */
- uint32 field_length, max_length;
- int2store(pos, thd_charset->number);
- /*
- For TEXT/BLOB columns, field_length describes the maximum data
- length in bytes. There is no limit to the number of characters
- that a TEXT column can store, as long as the data fits into
- the designated space.
- For the rest of textual columns, field_length is evaluated as
- char_count * mbmaxlen, where character count is taken from the
- definition of the column. In other words, the maximum number
- of characters here is limited by the column definition.
-
- When one has a LONG TEXT column with a single-byte
- character set, and the connection character set is multi-byte, the
- client may get fields longer than UINT_MAX32, due to
- <character set column> -> <character set connection> conversion.
- In that case column max length does not fit into the 4 bytes
- reserved for it in the protocol.
- */
- max_length= (field.type >= MYSQL_TYPE_TINY_BLOB &&
- field.type <= MYSQL_TYPE_BLOB) ?
- field.length / item->collation.collation->mbminlen :
- field.length / item->collation.collation->mbmaxlen;
- field_length= char_to_byte_length_safe(max_length,
- thd_charset->mbmaxlen);
- int4store(pos + 2, field_length);
- }
- pos[6]= field.type;
- int2store(pos+7,field.flags);
- pos[9]= (char) field.decimals;
- pos[10]= 0; // For the future
- pos[11]= 0; // For the future
- pos+= 12;
- }
- else
- {
- if (prot.store(field.table_name, (uint) strlen(field.table_name),
- cs, thd_charset) ||
- prot.store(field.col_name.str, (uint) field.col_name.length,
- cs, thd_charset) ||
- local_packet->realloc(local_packet->length()+10))
- goto err;
- pos= (char*) local_packet->ptr()+local_packet->length();
- pos[0]=3;
- int3store(pos+1,field.length);
- pos[4]=1;
- pos[5]=field.type;
- pos[6]=3;
- int2store(pos+7,field.flags);
- pos[9]= (char) field.decimals;
- pos+= 10;
- }
- local_packet->length((uint) (pos - local_packet->ptr()));
- if (flags & SEND_DEFAULTS)
- item->send(&prot, &tmp); // Send default value
+ if (prot.store_field_metadata(thd, item, pos))
+ goto err;
if (prot.write())
DBUG_RETURN(1);
#ifndef DBUG_OFF
- field_types[count++]= field.type;
+ field_handlers[pos]= item->type_handler();
#endif
}
@@ -963,6 +945,43 @@ err:
}
+bool Protocol::send_list_fields(List<Field> *list, const TABLE_LIST *table_list)
+{
+ DBUG_ENTER("Protocol::send_list_fields");
+ List_iterator_fast<Field> it(*list);
+ Field *fld;
+ Protocol_text prot(thd, thd->variables.net_buffer_length);
+
+#ifndef DBUG_OFF
+ field_handlers= (const Type_handler **) thd->alloc(sizeof(field_handlers[0]) *
+ list->elements);
+#endif
+
+ for (uint pos= 0; (fld= it++); pos++)
+ {
+ prot.prepare_for_resend();
+ if (prot.store_field_metadata_for_list_fields(thd, fld, table_list, pos))
+ goto err;
+ prot.store(fld); // Send default value
+ if (prot.write())
+ DBUG_RETURN(1);
+#ifndef DBUG_OFF
+ /*
+ Historically all BLOB variant Fields are displayed as
+ MYSQL_TYPE_BLOB in metadata.
+ See Field_blob::make_send_field() for more comments.
+ */
+ field_handlers[pos]= Send_field(fld).type_handler();
+#endif
+ }
+ DBUG_RETURN(prepare_for_send(list->elements));
+
+err:
+ my_message(ER_OUT_OF_RESOURCES, ER_THD(thd, ER_OUT_OF_RESOURCES), MYF(0));
+ DBUG_RETURN(1);
+}
+
+
bool Protocol::write()
{
DBUG_ENTER("Protocol::write");
@@ -972,6 +991,25 @@ bool Protocol::write()
#endif /* EMBEDDED_LIBRARY */
+bool Protocol_text::store_field_metadata(THD *thd, Item *item, uint pos)
+{
+ Send_field field(thd, item);
+ return store_field_metadata(thd, field, item->charset_for_protocol(), pos);
+}
+
+
+bool Protocol_text::store_field_metadata_for_list_fields(const THD *thd,
+ Field *fld,
+ const TABLE_LIST *tl,
+ uint pos)
+{
+ Send_field field= tl->view ?
+ Send_field(fld, tl->view_db.str, tl->view_name.str) :
+ Send_field(fld);
+ return store_field_metadata(thd, field, fld->charset_for_protocol(), pos);
+}
+
+
/**
Send one result set row.
@@ -1112,12 +1150,7 @@ bool Protocol_text::store(const char *from, size_t length,
CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_DECIMAL ||
- field_types[field_pos] == MYSQL_TYPE_BIT ||
- field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL ||
- (field_types[field_pos] >= MYSQL_TYPE_ENUM &&
- field_types[field_pos] <= MYSQL_TYPE_GEOMETRY));
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_STRING));
field_pos++;
#endif
return store_string_aux(from, length, fromcs, tocs);
@@ -1131,14 +1164,8 @@ bool Protocol_text::store(const char *from, size_t length,
#ifndef DBUG_OFF
DBUG_PRINT("info", ("Protocol_text::store field %u (%u): %.*s", field_pos,
field_count, (int) length, (length == 0 ? "" : from)));
- DBUG_ASSERT(field_types == 0 || field_pos < field_count);
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_DECIMAL ||
- field_types[field_pos] == MYSQL_TYPE_BIT ||
- field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL ||
- field_types[field_pos] == MYSQL_TYPE_NEWDATE ||
- (field_types[field_pos] >= MYSQL_TYPE_ENUM &&
- field_types[field_pos] <= MYSQL_TYPE_GEOMETRY));
+ DBUG_ASSERT(field_handlers == 0 || field_pos < field_count);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_STRING));
field_pos++;
#endif
return store_string_aux(from, length, fromcs, tocs);
@@ -1148,7 +1175,7 @@ bool Protocol_text::store(const char *from, size_t length,
bool Protocol_text::store_tiny(longlong from)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 || field_types[field_pos] == MYSQL_TYPE_TINY);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_TINY));
field_pos++;
#endif
char buff[22];
@@ -1160,9 +1187,7 @@ bool Protocol_text::store_tiny(longlong from)
bool Protocol_text::store_short(longlong from)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_YEAR ||
- field_types[field_pos] == MYSQL_TYPE_SHORT);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_SHORT));
field_pos++;
#endif
char buff[22];
@@ -1175,9 +1200,7 @@ bool Protocol_text::store_short(longlong from)
bool Protocol_text::store_long(longlong from)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_INT24 ||
- field_types[field_pos] == MYSQL_TYPE_LONG);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_LONG));
field_pos++;
#endif
char buff[22];
@@ -1190,8 +1213,7 @@ bool Protocol_text::store_long(longlong from)
bool Protocol_text::store_longlong(longlong from, bool unsigned_flag)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_LONGLONG);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_LONGLONG));
field_pos++;
#endif
char buff[22];
@@ -1205,13 +1227,11 @@ bool Protocol_text::store_longlong(longlong from, bool unsigned_flag)
bool Protocol_text::store_decimal(const my_decimal *d)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL);
+ DBUG_ASSERT(0); // This method is not used yet
field_pos++;
#endif
- char buff[DECIMAL_MAX_STR_LENGTH];
- String str(buff, sizeof(buff), &my_charset_bin);
- (void) my_decimal2string(E_DEC_FATAL_ERROR, d, 0, 0, 0, &str);
+ StringBuffer<DECIMAL_MAX_STR_LENGTH> str;
+ (void) d->to_string(&str);
return net_store_data((uchar*) str.ptr(), str.length());
}
@@ -1219,8 +1239,7 @@ bool Protocol_text::store_decimal(const my_decimal *d)
bool Protocol_text::store(float from, uint32 decimals, String *buffer)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_FLOAT);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_FLOAT));
field_pos++;
#endif
Float(from).to_string(buffer, decimals);
@@ -1231,8 +1250,7 @@ bool Protocol_text::store(float from, uint32 decimals, String *buffer)
bool Protocol_text::store(double from, uint32 decimals, String *buffer)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_DOUBLE);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_DOUBLE));
field_pos++;
#endif
buffer->set_real(from, decimals, thd->charset());
@@ -1270,9 +1288,7 @@ bool Protocol_text::store(Field *field)
bool Protocol_text::store(MYSQL_TIME *tm, int decimals)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_DATETIME ||
- field_types[field_pos] == MYSQL_TYPE_TIMESTAMP);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_DATETIME));
field_pos++;
#endif
char buff[MAX_DATE_STRING_REP_LENGTH];
@@ -1284,8 +1300,7 @@ bool Protocol_text::store(MYSQL_TIME *tm, int decimals)
bool Protocol_text::store_date(MYSQL_TIME *tm)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_DATE);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_DATE));
field_pos++;
#endif
char buff[MAX_DATE_STRING_REP_LENGTH];
@@ -1297,8 +1312,7 @@ bool Protocol_text::store_date(MYSQL_TIME *tm)
bool Protocol_text::store_time(MYSQL_TIME *tm, int decimals)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_TIME);
+ DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_TIME));
field_pos++;
#endif
char buff[MAX_DATE_STRING_REP_LENGTH];
@@ -1318,11 +1332,10 @@ bool Protocol_text::store_time(MYSQL_TIME *tm, int decimals)
bool Protocol_text::send_out_parameters(List<Item_param> *sp_params)
{
- DBUG_ASSERT(sp_params->elements ==
- thd->lex->prepared_stmt_params.elements);
+ DBUG_ASSERT(sp_params->elements == thd->lex->prepared_stmt.param_count());
List_iterator_fast<Item_param> item_param_it(*sp_params);
- List_iterator_fast<Item> param_it(thd->lex->prepared_stmt_params);
+ List_iterator_fast<Item> param_it(thd->lex->prepared_stmt.params());
while (true)
{
@@ -1456,13 +1469,11 @@ bool Protocol_binary::store_longlong(longlong from, bool unsigned_flag)
bool Protocol_binary::store_decimal(const my_decimal *d)
{
#ifndef DBUG_OFF
- DBUG_ASSERT(field_types == 0 ||
- field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL);
+ DBUG_ASSERT(0); // This method is not used yet
field_pos++;
#endif
- char buff[DECIMAL_MAX_STR_LENGTH];
- String str(buff, sizeof(buff), &my_charset_bin);
- (void) my_decimal2string(E_DEC_FATAL_ERROR, d, 0, 0, 0, &str);
+ StringBuffer<DECIMAL_MAX_STR_LENGTH> str;
+ (void) d->to_string(&str);
return store(str.ptr(), str.length(), str.charset());
}
@@ -1516,7 +1527,7 @@ bool Protocol_binary::store(MYSQL_TIME *tm, int decimals)
DBUG_ASSERT(decimals == AUTO_SEC_PART_DIGITS ||
(decimals >= 0 && decimals <= TIME_SECOND_PART_DIGITS));
if (decimals != AUTO_SEC_PART_DIGITS)
- my_time_trunc(tm, decimals);
+ my_datetime_trunc(tm, decimals);
int4store(pos+7, tm->second_part);
if (tm->second_part)
length=11;
diff --git a/sql/protocol.h b/sql/protocol.h
index 6d6bf4b2297..3b2c905ed9e 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -22,11 +22,14 @@
#include "sql_error.h"
#include "my_decimal.h" /* my_decimal */
+#include "sql_type.h"
class i_string;
class Field;
+class Send_field;
class THD;
class Item_param;
+struct TABLE_LIST;
typedef struct st_mysql_field MYSQL_FIELD;
typedef struct st_mysql_rows MYSQL_ROWS;
@@ -38,7 +41,12 @@ protected:
String *convert;
uint field_pos;
#ifndef DBUG_OFF
- enum enum_field_types *field_types;
+ const Type_handler **field_handlers;
+ bool valid_handler(uint pos, protocol_send_type_t type) const
+ {
+ return field_handlers == 0 ||
+ field_handlers[field_pos]->protocol_send_type() == type;
+ }
#endif
uint field_count;
#ifndef EMBEDDED_LIBRARY
@@ -75,8 +83,9 @@ public:
virtual ~Protocol() {}
void init(THD* thd_arg);
- enum { SEND_NUM_ROWS= 1, SEND_DEFAULTS= 2, SEND_EOF= 4 };
+ enum { SEND_NUM_ROWS= 1, SEND_EOF= 2 };
virtual bool send_result_set_metadata(List<Item> *list, uint flags);
+ bool send_list_fields(List<Field> *list, const TABLE_LIST *table_list);
bool send_result_set_row(List<Item> *row_items);
bool store(I_List<i_string> *str_list);
@@ -113,6 +122,15 @@ public:
virtual bool store(const char *from, size_t length, CHARSET_INFO *cs)=0;
virtual bool store(const char *from, size_t length,
CHARSET_INFO *fromcs, CHARSET_INFO *tocs)=0;
+ bool store_str(const char *s, CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
+ {
+ DBUG_ASSERT(s);
+ return store(s, (uint) strlen(s), fromcs, tocs);
+ }
+ bool store_str(const LEX_CSTRING &s, CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
+ {
+ return store(s.str, (uint) s.length, fromcs, tocs);
+ }
virtual bool store(float from, uint32 decimals, String *buffer)=0;
virtual bool store(double from, uint32 decimals, String *buffer)=0;
virtual bool store(MYSQL_TIME *time, int decimals)=0;
@@ -122,7 +140,8 @@ public:
virtual bool send_out_parameters(List<Item_param> *sp_params)=0;
#ifdef EMBEDDED_LIBRARY
- int begin_dataset();
+ bool begin_dataset();
+ bool begin_dataset(THD *thd, uint numfields);
virtual void remove_last_row() {}
#else
void remove_last_row() {}
@@ -150,7 +169,12 @@ public:
class Protocol_text :public Protocol
{
public:
- Protocol_text(THD *thd_arg) :Protocol(thd_arg) {}
+ Protocol_text(THD *thd_arg, ulong prealloc= 0)
+ :Protocol(thd_arg)
+ {
+ if (prealloc)
+ packet->alloc(prealloc);
+ }
virtual void prepare_for_resend();
virtual bool store_null();
virtual bool store_tiny(longlong from);
@@ -172,6 +196,13 @@ public:
#ifdef EMBEDDED_LIBRARY
void remove_last_row();
#endif
+ bool store_field_metadata(const THD *thd, const Send_field &field,
+ CHARSET_INFO *charset_for_protocol,
+ uint pos);
+ bool store_field_metadata(THD *thd, Item *item, uint pos);
+ bool store_field_metadata_for_list_fields(const THD *thd, Field *field,
+ const TABLE_LIST *table_list,
+ uint pos);
virtual enum enum_protocol_type type() { return PROTOCOL_TEXT; };
};
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 5b5b4931582..18fc3d9431a 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -38,13 +38,21 @@
#include "log_event.h"
#include <mysql.h>
-#define SLAVE_LIST_CHUNK 128
-#define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
+
+struct Slave_info
+{
+ uint32 server_id;
+ uint32 master_id;
+ char host[HOSTNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN+1];
+ char user[USERNAME_LENGTH+1];
+ char password[MAX_PASSWORD_LENGTH*SYSTEM_CHARSET_MBMAXLEN+1];
+ uint16 port;
+};
+Atomic_counter<uint32_t> binlog_dump_thread_count;
ulong rpl_status=RPL_NULL;
mysql_mutex_t LOCK_rpl_status;
-HASH slave_list;
const char *rpl_role_type[] = {"MASTER","SLAVE",NullS};
TYPELIB rpl_role_typelib = {array_elements(rpl_role_type)-1,"",
@@ -81,33 +89,26 @@ void change_rpl_status(ulong from_status, ulong to_status)
errmsg= msg;\
goto err; \
}\
- strmake(obj,(char*) p,len); \
+ ::strmake(obj, (char*) p, len); \
p+= len; \
}\
-void unregister_slave(THD* thd, bool only_mine, bool need_mutex)
+void THD::unregister_slave()
{
- uint32 thd_server_id= thd->variables.server_id;
- if (thd_server_id)
+ if (auto old_si= slave_info)
{
- if (need_mutex)
- mysql_mutex_lock(&LOCK_slave_list);
-
- SLAVE_INFO* old_si;
- if ((old_si = (SLAVE_INFO*)my_hash_search(&slave_list,
- (uchar*)&thd_server_id, 4)) &&
- (!only_mine || old_si->thd == thd))
- my_hash_delete(&slave_list, (uchar*)old_si);
-
- if (need_mutex)
- mysql_mutex_unlock(&LOCK_slave_list);
+ mysql_mutex_lock(&LOCK_thd_data);
+ slave_info= 0;
+ mysql_mutex_unlock(&LOCK_thd_data);
+ delete old_si;
+ binlog_dump_thread_count--;
}
}
/**
- Register slave in 'slave_list' hash table.
+ Register slave
@return
0 ok
@@ -115,19 +116,18 @@ void unregister_slave(THD* thd, bool only_mine, bool need_mutex)
1 Error. Error message sent to client
*/
-int register_slave(THD* thd, uchar* packet, size_t packet_length)
+int THD::register_slave(uchar *packet, size_t packet_length)
{
- int res;
- SLAVE_INFO *si;
+ Slave_info *si;
uchar *p= packet, *p_end= packet + packet_length;
const char *errmsg= "Wrong parameters to function register_slave";
- if (check_access(thd, REPL_SLAVE_ACL, any_db, NULL, NULL, 0, 0))
+ if (check_access(this, REPL_SLAVE_ACL, any_db, NULL, NULL, 0, 0))
+ return 1;
+ if (!(si= new Slave_info))
return 1;
- if (!(si = (SLAVE_INFO*)my_malloc(sizeof(SLAVE_INFO), MYF(MY_WME))))
- goto err2;
- thd->variables.server_id= si->server_id= uint4korr(p);
+ variables.server_id= si->server_id= uint4korr(p);
p+= 4;
get_object(p,si->host, "Failed to register slave: too long 'report-host'");
get_object(p,si->user, "Failed to register slave: too long 'report-user'");
@@ -146,77 +146,54 @@ int register_slave(THD* thd, uchar* packet, size_t packet_length)
p += 4;
if (!(si->master_id= uint4korr(p)))
si->master_id= global_system_variables.server_id;
- si->thd= thd;
- mysql_mutex_lock(&LOCK_slave_list);
- unregister_slave(thd,0,0);
- res= my_hash_insert(&slave_list, (uchar*) si);
- mysql_mutex_unlock(&LOCK_slave_list);
- return res;
+ unregister_slave();
+ mysql_mutex_lock(&LOCK_thd_data);
+ slave_info= si;
+ mysql_mutex_unlock(&LOCK_thd_data);
+ binlog_dump_thread_count++;
+ return 0;
err:
- my_free(si);
+ delete si;
my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0)); /* purecov: inspected */
-err2:
return 1;
}
-extern "C" uint32
-*slave_list_key(SLAVE_INFO* si, size_t *len,
- my_bool not_used __attribute__((unused)))
-{
- *len = 4;
- return &si->server_id;
-}
-extern "C" void slave_info_free(void *s)
+bool THD::is_binlog_dump_thread()
{
- my_free(s);
-}
-
-#ifdef HAVE_PSI_INTERFACE
-static PSI_mutex_key key_LOCK_slave_list;
+ mysql_mutex_lock(&LOCK_thd_data);
+ bool res= slave_info != NULL;
+ mysql_mutex_unlock(&LOCK_thd_data);
-static PSI_mutex_info all_slave_list_mutexes[]=
-{
- { &key_LOCK_slave_list, "LOCK_slave_list", PSI_FLAG_GLOBAL}
-};
-
-static void init_all_slave_list_mutexes(void)
-{
- const char* category= "sql";
- int count;
-
- if (PSI_server == NULL)
- return;
-
- count= array_elements(all_slave_list_mutexes);
- PSI_server->register_mutex(category, all_slave_list_mutexes, count);
+ return res;
}
-#endif /* HAVE_PSI_INTERFACE */
-void init_slave_list()
-{
-#ifdef HAVE_PSI_INTERFACE
- init_all_slave_list_mutexes();
-#endif
-
- my_hash_init(&slave_list, system_charset_info, SLAVE_LIST_CHUNK, 0, 0,
- (my_hash_get_key) slave_list_key,
- (my_hash_free_key) slave_info_free, 0);
- mysql_mutex_init(key_LOCK_slave_list, &LOCK_slave_list, MY_MUTEX_INIT_FAST);
-}
-void end_slave_list()
+static my_bool show_slave_hosts_callback(THD *thd, Protocol *protocol)
{
- /* No protection by a mutex needed as we are only called at shutdown */
- if (my_hash_inited(&slave_list))
+ my_bool res= FALSE;
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ if (auto si= thd->slave_info)
{
- my_hash_free(&slave_list);
- mysql_mutex_destroy(&LOCK_slave_list);
+ protocol->prepare_for_resend();
+ protocol->store(si->server_id);
+ protocol->store(si->host, &my_charset_bin);
+ if (opt_show_slave_auth_info)
+ {
+ protocol->store(si->user, &my_charset_bin);
+ protocol->store(si->password, &my_charset_bin);
+ }
+ protocol->store((uint32) si->port);
+ protocol->store(si->master_id);
+ res= protocol->write();
}
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ return res;
}
+
/**
Execute a SHOW SLAVE HOSTS statement.
@@ -258,28 +235,9 @@ bool show_slave_hosts(THD* thd)
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(TRUE);
- mysql_mutex_lock(&LOCK_slave_list);
+ if (server_threads.iterate(show_slave_hosts_callback, protocol))
+ DBUG_RETURN(true);
- for (uint i = 0; i < slave_list.records; ++i)
- {
- SLAVE_INFO* si = (SLAVE_INFO*) my_hash_element(&slave_list, i);
- protocol->prepare_for_resend();
- protocol->store((uint32) si->server_id);
- protocol->store(si->host, &my_charset_bin);
- if (opt_show_slave_auth_info)
- {
- protocol->store(si->user, &my_charset_bin);
- protocol->store(si->password, &my_charset_bin);
- }
- protocol->store((uint32) si->port);
- protocol->store((uint32) si->master_id);
- if (protocol->write())
- {
- mysql_mutex_unlock(&LOCK_slave_list);
- DBUG_RETURN(TRUE);
- }
- }
- mysql_mutex_unlock(&LOCK_slave_list);
my_eof(thd);
DBUG_RETURN(FALSE);
}
diff --git a/sql/repl_failsafe.h b/sql/repl_failsafe.h
index 90415532c7d..6f8bdfc5216 100644
--- a/sql/repl_failsafe.h
+++ b/sql/repl_failsafe.h
@@ -22,6 +22,7 @@
#include <my_sys.h>
#include "slave.h"
+extern Atomic_counter<uint32_t> binlog_dump_thread_count;
typedef enum {RPL_AUTH_MASTER=0,RPL_IDLE_SLAVE,RPL_ACTIVE_SLAVE,
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
@@ -36,13 +37,7 @@ extern const char* rpl_role_type[], *rpl_status_type[];
void change_rpl_status(ulong from_status, ulong to_status);
int find_recovery_captain(THD* thd, MYSQL* mysql);
-extern HASH slave_list;
-
bool show_slave_hosts(THD* thd);
-void init_slave_list();
-void end_slave_list();
-int register_slave(THD* thd, uchar* packet, size_t packet_length);
-void unregister_slave(THD* thd, bool only_mine, bool need_mutex);
#endif /* HAVE_REPLICATION */
#endif /* REPL_FAILSAFE_INCLUDED */
diff --git a/sql/rowid_filter.cc b/sql/rowid_filter.cc
new file mode 100644
index 00000000000..75f2ab71ecd
--- /dev/null
+++ b/sql/rowid_filter.cc
@@ -0,0 +1,666 @@
+/*
+ Copyright (c) 2018, 2019 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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-1301 USA */
+
+#include "mariadb.h"
+#include "table.h"
+#include "sql_class.h"
+#include "opt_range.h"
+#include "rowid_filter.h"
+#include "sql_select.h"
+#include "opt_trace.h"
+
+
+inline
+double Range_rowid_filter_cost_info::lookup_cost(
+ Rowid_filter_container_type cont_type)
+{
+ switch (cont_type) {
+ case SORTED_ARRAY_CONTAINER:
+ return log(est_elements)*0.01;
+ default:
+ DBUG_ASSERT(0);
+ return 0;
+ }
+}
+
+
+/**
+ @brief
+ The average gain in cost per row to use the range filter with this cost info
+*/
+
+inline
+double Range_rowid_filter_cost_info::avg_access_and_eval_gain_per_row(
+ Rowid_filter_container_type cont_type)
+{
+ return (1+1.0/TIME_FOR_COMPARE) * (1 - selectivity) -
+ lookup_cost(cont_type);
+}
+
+
+/**
+ @brief
+ The average adjusted gain in cost per row of using the filter
+
+ @param access_cost_factor the adjusted cost of access a row
+
+ @details
+ The current code to estimate the cost of a ref access is quite inconsistent:
+ in some cases the effect of page buffers is taken into account, for others
+ just the engine dependent read_time() is employed. That's why the average
+ cost of one random seek might differ from 1.
+ The parameter access_cost_factor can be considered as the cost of a random
+ seek that is used for the given ref access. Changing the cost of a random
+ seek we have to change the first coefficient in the linear formula by which
+ we calculate the gain of usage the given filter for a_adj. This function
+ calculates the value of a_adj.
+
+ @note
+ Currently we require that access_cost_factor should be a number between
+ 0.0 and 1.0
+*/
+
+inline
+double Range_rowid_filter_cost_info::avg_adjusted_gain_per_row(
+ double access_cost_factor)
+{
+ return a - (1 - access_cost_factor) * (1 - selectivity);
+}
+
+
+/**
+ @brief
+ Set the parameters used to choose the filter with the best adjusted gain
+
+ @note
+ This function must be called before the call of get_adjusted_gain()
+ for the given filter.
+*/
+
+inline void
+Range_rowid_filter_cost_info::set_adjusted_gain_param(double access_cost_factor)
+{
+ a_adj= avg_adjusted_gain_per_row(access_cost_factor);
+ cross_x_adj= b / a_adj;
+}
+
+
+/**
+ @brief
+ Initialize the cost info structure for a range filter
+
+ @param cont_type The type of the container of the range filter
+ @param tab The table for which the range filter is evaluated
+ @param idx The index used to create this range filter
+*/
+
+void Range_rowid_filter_cost_info::init(Rowid_filter_container_type cont_type,
+ TABLE *tab, uint idx)
+{
+ container_type= cont_type;
+ table= tab;
+ key_no= idx;
+ est_elements= (ulonglong) (table->quick_rows[key_no]);
+ b= build_cost(container_type);
+ selectivity= est_elements/((double) table->stat_records());
+ a= avg_access_and_eval_gain_per_row(container_type);
+ if (a > 0)
+ cross_x= b/a;
+ else
+ cross_x= b+1;
+ abs_independent.clear_all();
+}
+
+
+/**
+ @brief
+ Return the cost of building a range filter of a certain type
+*/
+
+double
+Range_rowid_filter_cost_info::build_cost(Rowid_filter_container_type cont_type)
+{
+ double cost= 0;
+
+ cost+= table->quick_index_only_costs[key_no];
+
+ switch (cont_type) {
+
+ case SORTED_ARRAY_CONTAINER:
+ cost+= ARRAY_WRITE_COST * est_elements; /* cost filling the container */
+ cost+= ARRAY_SORT_C * est_elements * log(est_elements); /* sorting cost */
+ break;
+ default:
+ DBUG_ASSERT(0);
+ }
+
+ return cost;
+}
+
+
+Rowid_filter_container *Range_rowid_filter_cost_info::create_container()
+{
+ THD *thd= table->in_use;
+ uint elem_sz= table->file->ref_length;
+ Rowid_filter_container *res= 0;
+
+ switch (container_type) {
+ case SORTED_ARRAY_CONTAINER:
+ res= new (thd->mem_root) Rowid_filter_sorted_array((uint) est_elements,
+ elem_sz);
+ break;
+ default:
+ DBUG_ASSERT(0);
+ }
+ return res;
+}
+
+
+static
+int compare_range_rowid_filter_cost_info_by_a(
+ Range_rowid_filter_cost_info **filter_ptr_1,
+ Range_rowid_filter_cost_info **filter_ptr_2)
+{
+ double diff= (*filter_ptr_2)->get_a() - (*filter_ptr_1)->get_a();
+ return (diff < 0 ? -1 : (diff > 0 ? 1 : 0));
+}
+
+
+/**
+ @brief
+ Prepare the array with cost info on range filters to be used by optimizer
+
+ @details
+ The function removes the array of cost info on range filters the elements
+ for those range filters that won't be ever chosen as the best filter, no
+ matter what index will be used to access the table and at what step the
+ table will be joined.
+*/
+
+void TABLE::prune_range_rowid_filters()
+{
+ /*
+ For the elements of the array with cost info on range filters
+ build a bit matrix of absolutely independent elements.
+ Two elements are absolutely independent if they such indexes that
+ there is no other index that overlaps both of them or is constraint
+ correlated with both of them. Use abs_independent key maps to store
+ the elements if this bit matrix.
+ */
+
+ Range_rowid_filter_cost_info **filter_ptr_1= range_rowid_filter_cost_info_ptr;
+ for (uint i= 0;
+ i < range_rowid_filter_cost_info_elems;
+ i++, filter_ptr_1++)
+ {
+ uint key_no= (*filter_ptr_1)->key_no;
+ Range_rowid_filter_cost_info **filter_ptr_2= filter_ptr_1 + 1;
+ for (uint j= i+1;
+ j < range_rowid_filter_cost_info_elems;
+ j++, filter_ptr_2++)
+ {
+ key_map map_1= key_info[key_no].overlapped;
+ map_1.merge(key_info[key_no].constraint_correlated);
+ key_map map_2= key_info[(*filter_ptr_2)->key_no].overlapped;
+ map_2.merge(key_info[(*filter_ptr_2)->key_no].constraint_correlated);
+ map_1.intersect(map_2);
+ if (map_1.is_clear_all())
+ {
+ (*filter_ptr_1)->abs_independent.set_bit((*filter_ptr_2)->key_no);
+ (*filter_ptr_2)->abs_independent.set_bit(key_no);
+ }
+ }
+ }
+
+ /* Sort the array range_filter_cost_info by 'a' in descending order */
+ my_qsort(range_rowid_filter_cost_info_ptr,
+ range_rowid_filter_cost_info_elems,
+ sizeof(Range_rowid_filter_cost_info *),
+ (qsort_cmp) compare_range_rowid_filter_cost_info_by_a);
+
+ /*
+ For each element check whether it is created for the filter that
+ can be ever chosen as the best one. If it's not the case remove
+ from the array. Otherwise put it in the array in such a place
+ that all already checked elements left the array are ordered by
+ cross_x.
+ */
+
+ Range_rowid_filter_cost_info **cand_filter_ptr=
+ range_rowid_filter_cost_info_ptr;
+ for (uint i= 0;
+ i < range_rowid_filter_cost_info_elems;
+ i++, cand_filter_ptr++)
+ {
+ bool is_pruned= false;
+ Range_rowid_filter_cost_info **usable_filter_ptr=
+ range_rowid_filter_cost_info_ptr;
+ key_map abs_indep;
+ abs_indep.clear_all();
+ for (uint j= 0; j < i; j++, usable_filter_ptr++)
+ {
+ if ((*cand_filter_ptr)->cross_x >= (*usable_filter_ptr)->cross_x)
+ {
+ if (abs_indep.is_set((*usable_filter_ptr)->key_no))
+ {
+ /*
+ The following is true here for the element e being checked:
+ There are at 2 elements e1 and e2 among already selected such that
+ e1.cross_x < e.cross_x and e1.a > e.a
+ and
+ e2.cross_x < e_cross_x and e2.a > e.a,
+ i.e. the range filters f1, f2 of both e1 and e2 always promise
+ better gains then the range filter of e.
+ As e1 and e2 are absolutely independent one of the range filters
+ f1, f2 will be always a better choice than f1 no matter what index
+ is chosen to access the table. Because of this the element e
+ can be safely removed from the array.
+ */
+
+ is_pruned= true;
+ break;
+ }
+ abs_indep.merge((*usable_filter_ptr)->abs_independent);
+ }
+ else
+ {
+ /*
+ Move the element being checked to the proper position to have all
+ elements that have been already checked to be sorted by cross_x
+ */
+ Range_rowid_filter_cost_info *moved= *cand_filter_ptr;
+ memmove(usable_filter_ptr+1, usable_filter_ptr,
+ sizeof(Range_rowid_filter_cost_info *) * (i-j-1));
+ *usable_filter_ptr= moved;
+ }
+ }
+ if (is_pruned)
+ {
+ /* Remove the checked element from the array */
+ memmove(cand_filter_ptr, cand_filter_ptr+1,
+ sizeof(Range_rowid_filter_cost_info *) *
+ (range_rowid_filter_cost_info_elems - 1 - i));
+ range_rowid_filter_cost_info_elems--;
+ }
+ }
+}
+
+
+/**
+ @brief
+ Return maximum number of elements that a container allowed to have
+ */
+
+static ulonglong
+get_max_range_rowid_filter_elems_for_table(
+ THD *thd, TABLE *tab,
+ Rowid_filter_container_type cont_type)
+{
+ switch (cont_type) {
+ case SORTED_ARRAY_CONTAINER :
+ return thd->variables.max_rowid_filter_size/tab->file->ref_length;
+ default :
+ DBUG_ASSERT(0);
+ return 0;
+ }
+}
+
+
+/**
+ @brief
+ Prepare info on possible range filters used by optimizer
+
+ @param table The thread handler
+
+ @details
+ The function first selects the indexes of the table that potentially
+ can be used for range filters and allocates an array of the objects
+ of the Range_rowid_filter_cost_info type to store cost info on
+ possible range filters and an array of pointers to these objects.
+ The latter is created for easy sorting of the objects with cost info
+ by different sort criteria. Then the function initializes the allocated
+ array with cost info for each possible range filter. After this
+ the function calls the method TABLE::prune_range_rowid_filters().
+ The method removes the elements of the array for the filters that
+ promise less gain then others remaining in the array in any situation
+ and optimizes the order of the elements for faster choice of the best
+ range filter.
+*/
+
+void TABLE::init_cost_info_for_usable_range_rowid_filters(THD *thd)
+{
+ uint key_no;
+ key_map usable_range_filter_keys;
+ usable_range_filter_keys.clear_all();
+ key_map::Iterator it(quick_keys);
+
+ if (file->ha_table_flags() & HA_NON_COMPARABLE_ROWID)
+ return; // Cannot create filtering
+
+ /*
+ From all indexes that can be used for range accesses select only such that
+ - range filter pushdown is supported by the engine for them (1)
+ - they are not clustered primary (2)
+ - the range filter containers for them are not too large (3)
+ */
+ while ((key_no= it++) != key_map::Iterator::BITMAP_END)
+ {
+ if (!(file->index_flags(key_no, 0, 1) & HA_DO_RANGE_FILTER_PUSHDOWN)) // !1
+ continue;
+ if (key_no == s->primary_key && file->primary_key_is_clustered()) // !2
+ continue;
+ if (quick_rows[key_no] >
+ get_max_range_rowid_filter_elems_for_table(thd, this,
+ SORTED_ARRAY_CONTAINER)) // !3
+ continue;
+ usable_range_filter_keys.set_bit(key_no);
+ }
+
+ /*
+ Allocate an array of objects to store cost info for the selected filters
+ and allocate an array of pointers to these objects
+ */
+
+ range_rowid_filter_cost_info_elems= usable_range_filter_keys.bits_set();
+ if (!range_rowid_filter_cost_info_elems)
+ return;
+
+ range_rowid_filter_cost_info_ptr=
+ (Range_rowid_filter_cost_info **)
+ thd->calloc(sizeof(Range_rowid_filter_cost_info *) *
+ range_rowid_filter_cost_info_elems);
+ range_rowid_filter_cost_info=
+ new (thd->mem_root)
+ Range_rowid_filter_cost_info[range_rowid_filter_cost_info_elems];
+ if (!range_rowid_filter_cost_info_ptr || !range_rowid_filter_cost_info)
+ {
+ range_rowid_filter_cost_info_elems= 0;
+ return;
+ }
+
+ /* Fill the allocated array with cost info on the selected range filters */
+
+ Range_rowid_filter_cost_info **curr_ptr= range_rowid_filter_cost_info_ptr;
+ Range_rowid_filter_cost_info *curr_filter_cost_info=
+ range_rowid_filter_cost_info;
+
+ key_map::Iterator li(usable_range_filter_keys);
+ while ((key_no= li++) != key_map::Iterator::BITMAP_END)
+ {
+ *curr_ptr= curr_filter_cost_info;
+ curr_filter_cost_info->init(SORTED_ARRAY_CONTAINER, this, key_no);
+ curr_ptr++;
+ curr_filter_cost_info++;
+ }
+
+ prune_range_rowid_filters();
+
+ if (unlikely(thd->trace_started()))
+ trace_range_rowid_filters(thd);
+}
+
+
+void TABLE::trace_range_rowid_filters(THD *thd) const
+{
+ if (!range_rowid_filter_cost_info_elems)
+ return;
+
+ Range_rowid_filter_cost_info **p= range_rowid_filter_cost_info_ptr;
+ Range_rowid_filter_cost_info **end= p + range_rowid_filter_cost_info_elems;
+
+ Json_writer_object js_obj(thd);
+ js_obj.add_table_name(this);
+ Json_writer_array js_arr(thd, "rowid_filters");
+
+ for (; p < end; p++)
+ (*p)->trace_info(thd);
+}
+
+
+void Range_rowid_filter_cost_info::trace_info(THD *thd)
+{
+ Json_writer_object js_obj(thd);
+ js_obj.add("key", table->key_info[key_no].name);
+ js_obj.add("build_cost", b);
+ js_obj.add("rows", est_elements);
+}
+
+/**
+ @brief
+ Choose the best range filter for the given access of the table
+
+ @param access_key_no The index by which the table is accessed
+ @param records The estimated total number of key tuples with this access
+ @param access_cost_factor the cost of a random seek to access the table
+
+ @details
+ The function looks through the array of cost info for range filters
+ and chooses the element for the range filter that promise the greatest
+ gain with the the ref or range access of the table by access_key_no.
+ As the array is sorted by cross_x in ascending order the function stops
+ the look through as soon as it reaches the first element with
+ cross_x_adj > records because the range filter for this element and the
+ range filters for all remaining elements do not promise positive gains.
+
+ @note
+ It is easy to see that if cross_x[i] > cross_x[j] then
+ cross_x_adj[i] > cross_x_adj[j]
+
+ @retval Pointer to the cost info for the range filter that promises
+ the greatest gain, NULL if there is no such range filter
+*/
+
+Range_rowid_filter_cost_info *
+TABLE::best_range_rowid_filter_for_partial_join(uint access_key_no,
+ double records,
+ double access_cost_factor)
+{
+ if (range_rowid_filter_cost_info_elems == 0 ||
+ covering_keys.is_set(access_key_no))
+ return 0;
+
+ // Disallow use of range filter if the key contains partially-covered
+ // columns.
+ for (uint i= 0; i < key_info[access_key_no].usable_key_parts; i++)
+ {
+ if (key_info[access_key_no].key_part[i].field->type() == MYSQL_TYPE_BLOB)
+ return 0;
+ }
+
+ /*
+ Currently we do not support usage of range filters if the table
+ is accessed by the clustered primary key. It does not make sense
+ if a full key is used. If the table is accessed by a partial
+ clustered primary key it would, but the current InnoDB code does not
+ allow it. Later this limitation will be lifted
+ */
+ if (access_key_no == s->primary_key && file->primary_key_is_clustered())
+ return 0;
+
+ Range_rowid_filter_cost_info *best_filter= 0;
+ double best_filter_gain= 0;
+
+ key_map no_filter_usage= key_info[access_key_no].overlapped;
+ no_filter_usage.merge(key_info[access_key_no].constraint_correlated);
+ for (uint i= 0; i < range_rowid_filter_cost_info_elems ; i++)
+ {
+ double curr_gain = 0;
+ Range_rowid_filter_cost_info *filter= range_rowid_filter_cost_info_ptr[i];
+
+ /*
+ Do not use a range filter that uses an in index correlated with
+ the index by which the table is accessed
+ */
+ if ((filter->key_no == access_key_no) ||
+ no_filter_usage.is_set(filter->key_no))
+ continue;
+
+ filter->set_adjusted_gain_param(access_cost_factor);
+
+ if (records < filter->cross_x_adj)
+ {
+ /* Does not make sense to look through the remaining filters */
+ break;
+ }
+
+ curr_gain= filter->get_adjusted_gain(records);
+ if (best_filter_gain < curr_gain)
+ {
+ best_filter_gain= curr_gain;
+ best_filter= filter;
+ }
+ }
+ return best_filter;
+}
+
+
+/**
+ @brief
+ Fill the range rowid filter performing the associated range index scan
+
+ @details
+ This function performs the range index scan associated with this
+ range filter and place into the filter the rowids / primary keys
+ read from key tuples when doing this scan.
+ @retval
+ false on success
+ true otherwise
+
+ @note
+ The function assumes that the quick select object to perform
+ the index range scan has been already created.
+
+ @note
+ Currently the same table handler is used to access the joined table
+ and to perform range index scan filling the filter.
+ In the future two different handlers will be used for this
+ purposes to facilitate a lazy building of the filter.
+*/
+
+bool Range_rowid_filter::fill()
+{
+ int rc= 0;
+ handler *file= table->file;
+ THD *thd= table->in_use;
+ QUICK_RANGE_SELECT* quick= (QUICK_RANGE_SELECT*) select->quick;
+
+ uint table_status_save= table->status;
+ Item *pushed_idx_cond_save= file->pushed_idx_cond;
+ uint pushed_idx_cond_keyno_save= file->pushed_idx_cond_keyno;
+ bool in_range_check_pushed_down_save= file->in_range_check_pushed_down;
+
+ table->status= 0;
+ file->pushed_idx_cond= 0;
+ file->pushed_idx_cond_keyno= MAX_KEY;
+ file->in_range_check_pushed_down= false;
+
+ /* We're going to just read rowids / primary keys */
+ table->prepare_for_position();
+
+ table->file->ha_start_keyread(quick->index);
+
+ if (quick->init() || quick->reset())
+ rc= 1;
+
+ while (!rc)
+ {
+ rc= quick->get_next();
+ if (thd->killed)
+ rc= 1;
+ if (!rc)
+ {
+ file->position(quick->record);
+ if (container->add(NULL, (char*) file->ref))
+ rc= 1;
+ else
+ tracker->increment_container_elements_count();
+ }
+ }
+
+ quick->range_end();
+ table->file->ha_end_keyread();
+
+ table->status= table_status_save;
+ file->pushed_idx_cond= pushed_idx_cond_save;
+ file->pushed_idx_cond_keyno= pushed_idx_cond_keyno_save;
+ file->in_range_check_pushed_down= in_range_check_pushed_down_save;
+ tracker->report_container_buff_size(table->file->ref_length);
+
+ if (rc != HA_ERR_END_OF_FILE)
+ return 1;
+ table->file->rowid_filter_is_active= true;
+ return 0;
+}
+
+
+/**
+ @brief
+ Binary search in the sorted array of a rowid filter
+
+ @param ctxt context of the search
+ @parab elem rowid / primary key to look for
+
+ @details
+ The function looks for the rowid / primary key ' elem' in this container
+ assuming that ctxt contains a pointer to the TABLE structure created
+ for the table to whose row elem refers to.
+
+ @retval
+ true elem is found in the container
+ false otherwise
+*/
+
+bool Rowid_filter_sorted_array::check(void *ctxt, char *elem)
+{
+ TABLE *table= (TABLE *) ctxt;
+ if (!is_checked)
+ {
+ refpos_container.sort(refpos_order_cmp, (void *) (table->file));
+ is_checked= true;
+ }
+ int l= 0;
+ int r= refpos_container.elements()-1;
+ while (l <= r)
+ {
+ int m= (l + r) / 2;
+ int cmp= refpos_order_cmp((void *) (table->file),
+ refpos_container.get_pos(m), elem);
+ if (cmp == 0)
+ return true;
+ if (cmp < 0)
+ l= m + 1;
+ else
+ r= m-1;
+ }
+ return false;
+}
+
+
+Range_rowid_filter::~Range_rowid_filter()
+{
+ delete container;
+ container= 0;
+ if (select)
+ {
+ if (select->quick)
+ {
+ delete select->quick;
+ select->quick= 0;
+ }
+ delete select;
+ select= 0;
+ }
+}
diff --git a/sql/rowid_filter.h b/sql/rowid_filter.h
new file mode 100644
index 00000000000..467b6884ca6
--- /dev/null
+++ b/sql/rowid_filter.h
@@ -0,0 +1,470 @@
+/*
+ Copyright (c) 2018, 2019 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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-1301 USA */
+
+#ifndef ROWID_FILTER_INCLUDED
+#define ROWID_FILTER_INCLUDED
+
+
+#include "mariadb.h"
+#include "sql_array.h"
+
+/*
+
+ What rowid / primary filters are
+ --------------------------------
+
+ Consider a join query Q of the form
+ SELECT * FROM T1, ... , Tk WHERE P.
+
+ For any of the table reference Ti(Q) from the from clause of Q different
+ rowid / primary key filters (pk-filters for short) can be built.
+ A pk-filter F built for Ti(Q) is a set of rowids / primary keys of Ti
+ F= {pk1,...,pkN} such that for any row r=r1||...||rk from the result set of Q
+ ri's rowid / primary key pk(ri) is contained in F.
+
+ When pk-filters are useful
+ --------------------------
+
+ If building a pk-filter F for Ti(Q )is not too costly and its cardinality #F
+ is much less than the cardinality of T - #T then using the pk-filter when
+ executing Q might be quite beneficial.
+
+ Let r be a random row from Ti. Let s(F) be the probability that pk(r)
+ belongs to F. Let BC(F) be the cost of building F.
+
+ Suppose that the optimizer has chosen for Q a plan with this join order
+ T1 => ... Tk and that the table Ti is accessed by a ref access using index I.
+ Let K = {k1,...,kM} be the set of all rowid/primary keys values used to access
+ rows of Ti when looking for matches in this table.to join Ti by index I.
+
+ Let's assume that two set sets K and F are uncorrelated. With this assumption
+ if before accessing data from Ti by the rowid / primary key k we first
+ check whether k is in F then we can expect saving on M*(1-s(S)) accesses of
+ data rows from Ti. If we can guarantee that test whether k is in F is
+ relatively cheap then we can gain a lot assuming that BC(F) is much less
+ then the cost of fetching M*(1-s(S)) records from Ti and following
+ evaluation of conditions pushed into Ti.
+
+ Making pk-filter test cheap
+ ---------------------------
+
+ If the search structure to test whether an element is in F can be fully
+ placed in RAM then this test is expected to be be much cheaper than a random
+ access of a record from Ti. We'll consider two search structures for
+ pk-filters: ordered array and bloom filter. Ordered array is easy to
+ implement, but it's space consuming. If a filter contains primary keys
+ then at least space for each primary key from the filter must be allocated
+ in the search structure. On a the opposite a bloom filter requires a
+ fixed number of bits and this number does not depend on the cardinality
+ of the pk-filter (10 bits per element will serve pk-filter of any size).
+
+*/
+
+/*
+
+ How and when the optimizer builds and uses range rowid filters
+ --------------------------------------------------------------
+
+ 1. In make_join_statistics()
+ for each join table s
+ after the call of get_quick_record_count()
+ the TABLE::method init_cost_info_for_usable_range_rowid_filters()
+ is called
+ The method build an array of Range_rowid_filter_cost_info elements
+ containing the cost info on possible range filters for s->table.
+ The array is optimized for further usage.
+
+ 2. For each partial join order when the optimizer considers joining
+ table s to this partial join
+ In the function best_access_path()
+ a. When evaluating a ref access r by index idx to join s
+ the optimizer estimates the effect of usage of each possible
+ range filter f and chooses one with the best gain. The gain
+ is taken into account when the cost of thr ref access r is
+ calculated. If it turns out that this is the best ref access
+ to join s then the info about the chosen filter together
+ with the info on r is remembered in the corresponding element
+ of the array of POSITION structures.
+ [We evaluate every pair (ref access, range_filter) rather then
+ every pair (best ref access, range filter) because if the index
+ ref_idx used for ref access r correlates with the index rf_idx
+ used by the filter f then the pair (r,f) is not evaluated
+ at all as we don't know how to estimate the effect of correlation
+ between ref_idx and rf_idx.]
+ b. When evaluating the best range access to join table s the
+ optimizer estimates the effect of usage of each possible
+ range filter f and chooses one with the best gain.
+ [Here we should have evaluated every pair (range access,
+ range filter) as well, but it's not done yet.]
+
+ 3. When the cheapest execution plan has been chosen and after the
+ call of JOIN::get_best_combination()
+ The method JOIN::make_range_rowid_filters() is called
+ For each range rowid filter used in the chosen execution plan
+ the method creates a quick select object to be able to perform
+ index range scan to fill the filter at the execution stage.
+ The method also creates Range_rowid_filter objects that are
+ used at the execution stage.
+
+ 4. Just before the execution stage
+ The method JOIN::init_range_rowid_filters() is called.
+ For each join table s that is to be accessed with usage of a range
+ filter the method allocates containers for the range filter and
+ it lets the engine know that the filter will be used when
+ accessing s.
+
+ 5. At the execution stage
+ In the function sub_select() just before the first access of a join
+ table s employing a range filter
+ The method JOIN_TAB::build_range_rowid_filter_if_needed() is called
+ The method fills the filter using the quick select created by
+ JOIN::make_range_rowid_filters().
+
+ 6. The accessed key tuples are checked against the filter within the engine
+ using the info pushed into it.
+
+*/
+
+struct TABLE;
+class SQL_SELECT;
+class Rowid_filter_container;
+class Range_rowid_filter_cost_info;
+
+/* Cost to write rowid into array */
+#define ARRAY_WRITE_COST 0.005
+/* Factor used to calculate cost of sorting rowids in array */
+#define ARRAY_SORT_C 0.01
+/* Cost to evaluate condition */
+#define COST_COND_EVAL 0.2
+
+typedef enum
+{
+ SORTED_ARRAY_CONTAINER,
+ BLOOM_FILTER_CONTAINER // Not used yet
+} Rowid_filter_container_type;
+
+/**
+ @class Rowid_filter_container
+
+ The interface for different types of containers to store info on the set
+ of rowids / primary keys that defines a pk-filter.
+
+ There will be two implementations of this abstract class.
+ - sorted array
+ - bloom filter
+*/
+
+class Rowid_filter_container : public Sql_alloc
+{
+public:
+
+ virtual Rowid_filter_container_type get_type() = 0;
+
+ /* Allocate memory for the container */
+ virtual bool alloc() = 0;
+
+ /*
+ @brief Add info on a rowid / primary to the container
+ @param ctxt The context info (opaque)
+ @param elem The rowid / primary key to be added to the container
+ @retval true if elem is successfully added
+ */
+ virtual bool add(void *ctxt, char *elem) = 0;
+
+ /*
+ @brief Check whether a rowid / primary key is in container
+ @param ctxt The context info (opaque)
+ @param elem The rowid / primary key to be checked against the container
+ @retval False if elem is definitely not in the container
+ */
+ virtual bool check(void *ctxt, char *elem) = 0;
+
+ virtual ~Rowid_filter_container() {}
+};
+
+
+/**
+ @class Rowid_filter
+
+ The interface for different types of pk-filters
+
+ Currently we support only range pk filters.
+*/
+
+class Rowid_filter : public Sql_alloc
+{
+protected:
+
+ /* The container to store info the set of elements in the filter */
+ Rowid_filter_container *container;
+
+ Rowid_filter_tracker *tracker;
+
+public:
+ Rowid_filter(Rowid_filter_container *container_arg)
+ : container(container_arg) {}
+
+ /*
+ Build the filter :
+ fill it with info on the set of elements placed there
+ */
+ virtual bool build() = 0;
+
+ /*
+ Check whether an element is in the filter.
+ Returns false is the elements is definitely not in the filter.
+ */
+ virtual bool check(char *elem) = 0;
+
+ virtual ~Rowid_filter() {}
+
+ Rowid_filter_container *get_container() { return container; }
+
+ void set_tracker(Rowid_filter_tracker *track_arg) { tracker= track_arg; }
+ Rowid_filter_tracker *get_tracker() { return tracker; }
+};
+
+
+/**
+ @class Rowid_filter_container
+
+ The implementation of the Rowid_interface used for pk-filters
+ that are filled when performing range index scans.
+*/
+
+class Range_rowid_filter: public Rowid_filter
+{
+ /* The table for which the rowid filter is built */
+ TABLE *table;
+ /* The select to perform the range scan to fill the filter */
+ SQL_SELECT *select;
+ /* The cost info on the filter (used for EXPLAIN/ANALYZE) */
+ Range_rowid_filter_cost_info *cost_info;
+
+public:
+ Range_rowid_filter(TABLE *tab,
+ Range_rowid_filter_cost_info *cost_arg,
+ Rowid_filter_container *container_arg,
+ SQL_SELECT *sel)
+ : Rowid_filter(container_arg), table(tab), select(sel), cost_info(cost_arg)
+ {}
+
+ ~Range_rowid_filter();
+
+ bool build() { return fill(); }
+
+ bool check(char *elem)
+ {
+ bool was_checked= container->check(table, elem);
+ tracker->increment_checked_elements_count(was_checked);
+ return was_checked;
+ }
+
+ bool fill();
+
+ SQL_SELECT *get_select() { return select; }
+};
+
+
+/**
+ @class Refpos_container_sorted_array
+
+ The wrapper class over Dynamic_array<char> to facilitate operations over
+ array of elements of the type char[N] where N is the same for all elements
+*/
+
+class Refpos_container_sorted_array : public Sql_alloc
+{
+ /*
+ Maximum number of elements in the array
+ (Now is used only at the initialization of the dynamic array)
+ */
+ uint max_elements;
+ /* Number of bytes allocated for an element */
+ uint elem_size;
+ /* The dynamic array over which the wrapper is built */
+ Dynamic_array<char> *array;
+
+public:
+
+ Refpos_container_sorted_array(uint max_elems, uint elem_sz)
+ : max_elements(max_elems), elem_size(elem_sz), array(0) {}
+
+ ~Refpos_container_sorted_array()
+ {
+ delete array;
+ array= 0;
+ }
+
+ bool alloc()
+ {
+ array= new Dynamic_array<char> (elem_size * max_elements,
+ elem_size * max_elements/sizeof(char) + 1);
+ return array == NULL;
+ }
+
+ bool add(char *elem)
+ {
+ for (uint i= 0; i < elem_size; i++)
+ {
+ if (array->append(elem[i]))
+ return true;
+ }
+ return false;
+ }
+
+ char *get_pos(uint n)
+ {
+ return array->get_pos(n * elem_size);
+ }
+
+ uint elements() { return (uint) (array->elements() / elem_size); }
+
+ void sort (int (*cmp) (void *ctxt, const void *el1, const void *el2),
+ void *cmp_arg)
+ {
+ my_qsort2(array->front(), array->elements()/elem_size,
+ elem_size, (qsort2_cmp) cmp, cmp_arg);
+ }
+};
+
+
+/**
+ @class Rowid_filter_sorted_array
+
+ The implementation of the Rowid_filter_container interface as
+ a sorted array container of rowids / primary keys
+*/
+
+class Rowid_filter_sorted_array: public Rowid_filter_container
+{
+ /* The dynamic array to store rowids / primary keys */
+ Refpos_container_sorted_array refpos_container;
+ /* Initially false, becomes true after the first call of (check() */
+ bool is_checked;
+
+public:
+ Rowid_filter_sorted_array(uint elems, uint elem_size)
+ : refpos_container(elems, elem_size), is_checked(false) {}
+
+ Rowid_filter_container_type get_type()
+ { return SORTED_ARRAY_CONTAINER; }
+
+ bool alloc() { return refpos_container.alloc(); }
+
+ bool add(void *ctxt, char *elem) { return refpos_container.add(elem); }
+
+ bool check(void *ctxt, char *elem);
+};
+
+/**
+ @class Range_rowid_filter_cost_info
+
+ An objects of this class is created for each potentially usable
+ range filter. It contains the info that allows to figure out
+ whether usage of the range filter promises some gain.
+*/
+
+class Range_rowid_filter_cost_info : public Sql_alloc
+{
+ /* The table for which the range filter is to be built (if needed) */
+ TABLE *table;
+ /* Estimated number of elements in the filter */
+ ulonglong est_elements;
+ /* The cost of building the range filter */
+ double b;
+ /*
+ a*N-b yields the gain of the filter
+ for N key tuples of the index key_no
+ */
+ double a;
+ /* The value of N where the gain is 0 */
+ double cross_x;
+ /* Used for pruning of the potential range filters */
+ key_map abs_independent;
+
+ /*
+ These two parameters are used to choose the best range filter
+ in the function TABLE::best_range_rowid_filter_for_partial_join
+ */
+ double a_adj;
+ double cross_x_adj;
+
+public:
+ /* The type of the container of the range filter */
+ Rowid_filter_container_type container_type;
+ /* The index whose range scan would be used to build the range filter */
+ uint key_no;
+ /* The selectivity of the range filter */
+ double selectivity;
+
+ Range_rowid_filter_cost_info() : table(0), key_no(0) {}
+
+ void init(Rowid_filter_container_type cont_type,
+ TABLE *tab, uint key_no);
+
+ double build_cost(Rowid_filter_container_type container_type);
+
+ inline double lookup_cost(Rowid_filter_container_type cont_type);
+
+ inline double
+ avg_access_and_eval_gain_per_row(Rowid_filter_container_type cont_type);
+
+ inline double avg_adjusted_gain_per_row(double access_cost_factor);
+
+ inline void set_adjusted_gain_param(double access_cost_factor);
+
+ /* Get the gain that usage of filter promises for r key tuples */
+ inline double get_gain(double r)
+ {
+ return r * a - b;
+ }
+
+ /* Get the adjusted gain that usage of filter promises for r key tuples */
+ inline double get_adjusted_gain(double r)
+ {
+ return r * a_adj - b;
+ }
+
+ /*
+ The gain promised by usage of the filter for r key tuples
+ due to less condition evaluations
+ */
+ inline double get_cmp_gain(double r)
+ {
+ return r * (1 - selectivity) / TIME_FOR_COMPARE;
+ }
+
+ Rowid_filter_container *create_container();
+
+ double get_a() { return a; }
+
+ void trace_info(THD *thd);
+
+ friend
+ void TABLE::prune_range_rowid_filters();
+
+ friend
+ void TABLE::init_cost_info_for_usable_range_rowid_filters(THD *thd);
+
+ friend
+ Range_rowid_filter_cost_info *
+ TABLE::best_range_rowid_filter_for_partial_join(uint access_key_no,
+ double records,
+ double access_cost_factor);
+};
+
+#endif /* ROWID_FILTER_INCLUDED */
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc
index 2574f7b058b..6f2c01383ab 100644
--- a/sql/rpl_gtid.cc
+++ b/sql/rpl_gtid.cc
@@ -80,7 +80,7 @@ rpl_slave_state::record_and_update_gtid(THD *thd, rpl_group_info *rgi)
rgi->gtid_pending= false;
if (rgi->gtid_ignore_duplicate_state!=rpl_group_info::GTID_DUPLICATE_IGNORE)
{
- if (record_gtid(thd, &rgi->current_gtid, sub_id, NULL, false, &hton))
+ if (record_gtid(thd, &rgi->current_gtid, sub_id, false, false, &hton))
DBUG_RETURN(1);
update_state_hash(sub_id, &rgi->current_gtid, hton, rgi);
}
@@ -245,7 +245,7 @@ rpl_slave_state_free_element(void *arg)
rpl_slave_state::rpl_slave_state()
- : last_sub_id(0), gtid_pos_tables(0), loaded(false)
+ : pending_gtid_count(0), last_sub_id(0), gtid_pos_tables(0), loaded(false)
{
mysql_mutex_init(key_LOCK_slave_state, &LOCK_slave_state,
MY_MUTEX_INIT_SLOW);
@@ -257,7 +257,7 @@ rpl_slave_state::rpl_slave_state()
rpl_slave_state::~rpl_slave_state()
{
- free_gtid_pos_tables((struct gtid_pos_table *)gtid_pos_tables);
+ free_gtid_pos_tables(gtid_pos_tables.load(std::memory_order_relaxed));
truncate_hash();
my_hash_free(&hash);
delete_dynamic(&gtid_sort_array);
@@ -332,14 +332,11 @@ rpl_slave_state::update(uint32 domain_id, uint32 server_id, uint64 sub_id,
}
}
rgi->gtid_ignore_duplicate_state= rpl_group_info::GTID_DUPLICATE_NULL;
-
-#ifdef HAVE_REPLICATION
- rgi->pending_gtid_deletes_clear();
-#endif
}
if (!(list_elem= (list_element *)my_malloc(sizeof(*list_elem), MYF(MY_WME))))
return 1;
+ list_elem->domain_id= domain_id;
list_elem->server_id= server_id;
list_elem->sub_id= sub_id;
list_elem->seq_no= seq_no;
@@ -349,6 +346,15 @@ rpl_slave_state::update(uint32 domain_id, uint32 server_id, uint64 sub_id,
if (last_sub_id < sub_id)
last_sub_id= sub_id;
+#ifdef HAVE_REPLICATION
+ ++pending_gtid_count;
+ if (pending_gtid_count >= opt_gtid_cleanup_batch_size)
+ {
+ pending_gtid_count = 0;
+ slave_background_gtid_pending_delete_request();
+ }
+#endif
+
return 0;
}
@@ -383,20 +389,22 @@ rpl_slave_state::get_element(uint32 domain_id)
int
-rpl_slave_state::put_back_list(uint32 domain_id, list_element *list)
+rpl_slave_state::put_back_list(list_element *list)
{
- element *e;
+ element *e= NULL;
int err= 0;
mysql_mutex_lock(&LOCK_slave_state);
- if (!(e= (element *)my_hash_search(&hash, (const uchar *)&domain_id, 0)))
- {
- err= 1;
- goto end;
- }
while (list)
{
list_element *next= list->next;
+
+ if ((!e || e->domain_id != list->domain_id) &&
+ !(e= (element *)my_hash_search(&hash, (const uchar *)&list->domain_id, 0)))
+ {
+ err= 1;
+ goto end;
+ }
e->add(list);
list= next;
}
@@ -489,21 +497,18 @@ gtid_check_rpl_slave_state_table(TABLE *table)
void
rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_CSTRING *out_tablename)
{
- struct gtid_pos_table *list, *table_entry, *default_entry;
-
/*
See comments on rpl_slave_state::gtid_pos_tables for rules around proper
access to the list.
*/
- list= (struct gtid_pos_table *)
- my_atomic_loadptr_explicit(&gtid_pos_tables, MY_MEMORY_ORDER_ACQUIRE);
+ auto list= gtid_pos_tables.load(std::memory_order_acquire);
Ha_trx_info *ha_info;
uint count = 0;
for (ha_info= thd->transaction.all.ha_list; ha_info; ha_info= ha_info->next())
{
void *trx_hton= ha_info->ht();
- table_entry= list;
+ auto table_entry= list;
if (!ha_info->is_trx_read_write() || trx_hton == binlog_hton)
continue;
@@ -557,9 +562,8 @@ rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_CSTRING *out_tablename)
already active in the transaction, or if there is no current transaction
engines available, we return the default gtid_slave_pos table.
*/
- default_entry= (struct gtid_pos_table *)
- my_atomic_loadptr_explicit(&default_gtid_pos_table, MY_MEMORY_ORDER_ACQUIRE);
- *out_tablename= default_entry->table_name;
+ *out_tablename=
+ default_gtid_pos_table.load(std::memory_order_acquire)->table_name;
/* Record in status that we failed to find a suitable gtid_pos table. */
if (count > 0)
{
@@ -573,12 +577,12 @@ rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_CSTRING *out_tablename)
/*
Write a gtid to the replication slave state table.
+ Do it as part of the transaction, to get slave crash safety, or as a separate
+ transaction if !in_transaction (eg. MyISAM or DDL).
+
gtid The global transaction id for this event group.
sub_id Value allocated within the sub_id when the event group was
read (sub_id must be consistent with commit order in master binlog).
- rgi rpl_group_info context, if we are recording the gtid transactionally
- as part of replicating a transactional event. NULL if called from
- outside of a replicated transaction.
Note that caller must later ensure that the new gtid and sub_id is inserted
into the appropriate HASH element with rpl_slave_state.add(), so that it can
@@ -586,16 +590,13 @@ rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_CSTRING *out_tablename)
*/
int
rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
- rpl_group_info *rgi, bool in_statement,
+ bool in_transaction, bool in_statement,
void **out_hton)
{
TABLE_LIST tlist;
int err= 0, not_sql_thread;
bool table_opened= false;
TABLE *table;
- list_element *delete_list= 0, *next, *cur, **next_ptr_ptr, **best_ptr_ptr;
- uint64 best_sub_id;
- element *elem;
ulonglong thd_saved_option= thd->variables.option_bits;
Query_tables_list lex_backup;
wait_for_commit* suspended_wfc;
@@ -685,7 +686,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
thd->wsrep_ignore_table= true;
#endif
- if (!rgi)
+ if (!in_transaction)
{
DBUG_PRINT("info", ("resetting OPTION_BEGIN"));
thd->variables.option_bits&=
@@ -717,168 +718,287 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
my_error(ER_OUT_OF_RESOURCES, MYF(0));
goto end;
}
+end:
- mysql_mutex_lock(&LOCK_slave_state);
- if ((elem= get_element(gtid->domain_id)) == NULL)
+#ifdef WITH_WSREP
+ thd->wsrep_ignore_table= false;
+#endif
+
+ if (table_opened)
{
- mysql_mutex_unlock(&LOCK_slave_state);
- my_error(ER_OUT_OF_RESOURCES, MYF(0));
- err= 1;
- goto end;
+ if (err || (err= ha_commit_trans(thd, FALSE)))
+ ha_rollback_trans(thd, FALSE);
+
+ close_thread_tables(thd);
+ if (in_transaction)
+ thd->mdl_context.release_statement_locks();
+ else
+ thd->release_transactional_locks();
}
+ thd->lex->restore_backup_query_tables_list(&lex_backup);
+ thd->variables.option_bits= thd_saved_option;
+ thd->resume_subsequent_commits(suspended_wfc);
+ DBUG_EXECUTE_IF("inject_record_gtid_serverid_100_sleep",
+ {
+ if (gtid->server_id == 100)
+ my_sleep(500000);
+ });
+ DBUG_RETURN(err);
+}
- /* Now pull out all GTIDs that were recorded in this engine. */
- delete_list = NULL;
- next_ptr_ptr= &elem->list;
- cur= elem->list;
- best_sub_id= 0;
- best_ptr_ptr= NULL;
- while (cur)
+
+/*
+ Return a list of all old GTIDs in any mysql.gtid_slave_pos* table that are
+ no longer needed and can be deleted from the table.
+
+ Within each domain, we need to keep around the latest GTID (the one with the
+ highest sub_id), but any others in that domain can be deleted.
+*/
+rpl_slave_state::list_element *
+rpl_slave_state::gtid_grab_pending_delete_list()
+{
+ uint32 i;
+ list_element *full_list;
+
+ mysql_mutex_lock(&LOCK_slave_state);
+ full_list= NULL;
+ for (i= 0; i < hash.records; ++i)
{
- list_element *next= cur->next;
- if (cur->hton == hton)
- {
- /* Belongs to same engine, so move it to the delete list. */
- cur->next= delete_list;
- delete_list= cur;
- if (cur->sub_id > best_sub_id)
+ element *elem= (element *)my_hash_element(&hash, i);
+ list_element *elist= elem->list;
+ list_element *last_elem, **best_ptr_ptr, *cur, *next;
+ uint64 best_sub_id;
+
+ if (!elist)
+ continue; /* Nothing here */
+
+ /* Delete any old stuff, but keep around the most recent one. */
+ cur= elist;
+ best_sub_id= cur->sub_id;
+ best_ptr_ptr= &elist;
+ last_elem= cur;
+ while ((next= cur->next)) {
+ last_elem= next;
+ if (next->sub_id > best_sub_id)
{
- best_sub_id= cur->sub_id;
- best_ptr_ptr= &delete_list;
- }
- else if (best_ptr_ptr == &delete_list)
+ best_sub_id= next->sub_id;
best_ptr_ptr= &cur->next;
- }
- else
- {
- /* Another engine, leave it in the list. */
- if (cur->sub_id > best_sub_id)
- {
- best_sub_id= cur->sub_id;
- /* Current best is not on the delete list. */
- best_ptr_ptr= NULL;
}
- *next_ptr_ptr= cur;
- next_ptr_ptr= &cur->next;
+ cur= next;
}
- cur= next;
- }
- *next_ptr_ptr= NULL;
- /*
- If the highest sub_id element is on the delete list, put it back on the
- original list, to preserve the highest sub_id element in the table for
- GTID position recovery.
- */
- if (best_ptr_ptr)
- {
+ /*
+ Append the new elements to the full list. Note the order is important;
+ we do it here so that we do not break the list if best_sub_id is the
+ last of the new elements.
+ */
+ last_elem->next= full_list;
+ /*
+ Delete the highest sub_id element from the old list, and put it back as
+ the single-element new list.
+ */
cur= *best_ptr_ptr;
*best_ptr_ptr= cur->next;
- cur->next= elem->list;
+ cur->next= NULL;
elem->list= cur;
+
+ /*
+ Collect the full list so far here. Note that elist may have moved if we
+ deleted the first element, so order is again important.
+ */
+ full_list= elist;
}
mysql_mutex_unlock(&LOCK_slave_state);
- if (!delete_list)
- goto end;
+ return full_list;
+}
- /* Now delete any already committed GTIDs. */
- bitmap_set_bit(table->read_set, table->field[0]->field_index);
- bitmap_set_bit(table->read_set, table->field[1]->field_index);
- if ((err= table->file->ha_index_init(0, 0)))
+/* Find the mysql.gtid_slave_posXXX table associated with a given hton. */
+LEX_CSTRING *
+rpl_slave_state::select_gtid_pos_table(void *hton)
+{
+ /*
+ See comments on rpl_slave_state::gtid_pos_tables for rules around proper
+ access to the list.
+ */
+ auto table_entry= gtid_pos_tables.load(std::memory_order_acquire);
+
+ while (table_entry)
{
- table->file->print_error(err, MYF(0));
- goto end;
+ if (table_entry->table_hton == hton)
+ {
+ if (likely(table_entry->state == GTID_POS_AVAILABLE))
+ return &table_entry->table_name;
+ }
+ table_entry= table_entry->next;
}
- cur = delete_list;
- while (cur)
- {
- uchar key_buffer[4+8];
- DBUG_EXECUTE_IF("gtid_slave_pos_simulate_failed_delete",
- { err= ENOENT;
- table->file->print_error(err, MYF(0));
- /* `break' does not work inside DBUG_EXECUTE_IF */
- goto dbug_break; });
+ return &default_gtid_pos_table.load(std::memory_order_acquire)->table_name;
+}
+
- next= cur->next;
+void
+rpl_slave_state::gtid_delete_pending(THD *thd,
+ rpl_slave_state::list_element **list_ptr)
+{
+ int err= 0;
+ ulonglong thd_saved_option;
+
+ if (unlikely(!loaded))
+ return;
+
+#ifdef WITH_WSREP
+ /*
+ Updates in slave state table should not be appended to galera transaction
+ writeset.
+ */
+ thd->wsrep_ignore_table= true;
+#endif
+
+ thd_saved_option= thd->variables.option_bits;
+ thd->variables.option_bits&=
+ ~(ulonglong)(OPTION_NOT_AUTOCOMMIT |OPTION_BEGIN |OPTION_BIN_LOG |
+ OPTION_GTID_BEGIN);
+
+ while (*list_ptr)
+ {
+ LEX_CSTRING *gtid_pos_table_name, *tmp_table_name;
+ Query_tables_list lex_backup;
+ TABLE_LIST tlist;
+ TABLE *table;
+ handler::Table_flags direct_pos= 0;
+ list_element *cur, **cur_ptr_ptr;
+ bool table_opened= false;
+ bool index_inited= false;
+ void *hton= (*list_ptr)->hton;
+
+ thd->reset_for_next_command();
- table->field[1]->store(cur->sub_id, true);
- /* domain_id is already set in table->record[0] from write_row() above. */
- key_copy(key_buffer, table->record[0], &table->key_info[0], 0, false);
- if (table->file->ha_index_read_map(table->record[1], key_buffer,
- HA_WHOLE_KEY, HA_READ_KEY_EXACT))
- /* We cannot find the row, assume it is already deleted. */
- ;
- else if ((err= table->file->ha_delete_row(table->record[1])))
- table->file->print_error(err, MYF(0));
/*
- In case of error, we still discard the element from the list. We do
- not want to endlessly error on the same element in case of table
- corruption or such.
+ Only the SQL thread can call select_gtid_pos_table without a mutex
+ Other threads needs to use a mutex and take into account that the
+ result may change during execution, so we have to make a copy.
*/
- cur= next;
- if (err)
+ mysql_mutex_lock(&LOCK_slave_state);
+ tmp_table_name= select_gtid_pos_table(hton);
+ gtid_pos_table_name= thd->make_clex_string(tmp_table_name->str,
+ tmp_table_name->length);
+ mysql_mutex_unlock(&LOCK_slave_state);
+ if (!gtid_pos_table_name)
+ {
+ /* Out of memory - we can try again later. */
break;
- }
-IF_DBUG(dbug_break:, )
- table->file->ha_index_end();
+ }
-end:
+ thd->lex->reset_n_backup_query_tables_list(&lex_backup);
+ tlist.init_one_table(&MYSQL_SCHEMA_NAME, gtid_pos_table_name, NULL, TL_WRITE);
+ if ((err= open_and_lock_tables(thd, &tlist, FALSE, 0)))
+ goto end;
+ table_opened= true;
+ table= tlist.table;
-#ifdef WITH_WSREP
- thd->wsrep_ignore_table= false;
-#endif
+ if ((err= gtid_check_rpl_slave_state_table(table)))
+ goto end;
- if (table_opened)
- {
- if (err || (err= ha_commit_trans(thd, FALSE)))
+ direct_pos= table->file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION;
+ bitmap_set_all(table->write_set);
+ table->rpl_write_set= table->write_set;
+
+ /* Now delete any already committed GTIDs. */
+ bitmap_set_bit(table->read_set, table->field[0]->field_index);
+ bitmap_set_bit(table->read_set, table->field[1]->field_index);
+
+ if (!direct_pos)
{
- /*
- If error, we need to put any remaining delete_list back into the HASH
- so we can do another delete attempt later.
- */
- if (delete_list)
+ if ((err= table->file->ha_index_init(0, 0)))
{
- put_back_list(gtid->domain_id, delete_list);
- delete_list = 0;
+ table->file->print_error(err, MYF(0));
+ goto end;
}
-
- ha_rollback_trans(thd, FALSE);
+ index_inited= true;
}
- close_thread_tables(thd);
- if (rgi)
+
+ cur = *list_ptr;
+ cur_ptr_ptr = list_ptr;
+ do
{
- thd->mdl_context.release_statement_locks();
+ uchar key_buffer[4+8];
+ list_element *next= cur->next;
+
+ if (cur->hton == hton)
+ {
+ int res;
+
+ table->field[0]->store((ulonglong)cur->domain_id, true);
+ table->field[1]->store(cur->sub_id, true);
+ if (direct_pos)
+ {
+ res= table->file->ha_rnd_pos_by_record(table->record[0]);
+ }
+ else
+ {
+ key_copy(key_buffer, table->record[0], &table->key_info[0], 0, false);
+ res= table->file->ha_index_read_map(table->record[0], key_buffer,
+ HA_WHOLE_KEY, HA_READ_KEY_EXACT);
+ }
+ DBUG_EXECUTE_IF("gtid_slave_pos_simulate_failed_delete",
+ { res= 1;
+ err= ENOENT;
+ sql_print_error("<DEBUG> Error deleting old GTID row");
+ });
+ if (res)
+ /* We cannot find the row, assume it is already deleted. */
+ ;
+ else if ((err= table->file->ha_delete_row(table->record[0])))
+ {
+ sql_print_error("Error deleting old GTID row: %s",
+ thd->get_stmt_da()->message());
+ /*
+ In case of error, we still discard the element from the list. We do
+ not want to endlessly error on the same element in case of table
+ corruption or such.
+ */
+ }
+ *cur_ptr_ptr= next;
+ my_free(cur);
+ }
+ else
+ {
+ /* Leave this one in the list until we get to the table for its hton. */
+ cur_ptr_ptr= &cur->next;
+ }
+ cur= next;
+ if (err)
+ break;
+ } while (cur);
+end:
+ if (table_opened)
+ {
+ DBUG_ASSERT(direct_pos || index_inited || err);
/*
- Save the list of old gtid entries we deleted. If this transaction
- fails later for some reason and is rolled back, the deletion of those
- entries will be rolled back as well, and we will need to put them back
- on the to-be-deleted list so we can re-do the deletion. Otherwise
- redundant rows in mysql.gtid_slave_pos may accumulate if transactions
- are rolled back and retried after record_gtid().
+ Index may not be initialized if there was a failure during
+ 'ha_index_init'. Hence check if index initialization is successful and
+ then invoke ha_index_end(). Ending an index which is not initialized
+ will lead to assert.
*/
-#ifdef HAVE_REPLICATION
- rgi->pending_gtid_deletes_save(gtid->domain_id, delete_list);
-#endif
- }
- else
- {
- thd->release_transactional_locks();
-#ifdef HAVE_REPLICATION
- rpl_group_info::pending_gtid_deletes_free(delete_list);
-#endif
+ if (index_inited)
+ table->file->ha_index_end();
+
+ if (err || (err= ha_commit_trans(thd, FALSE)))
+ ha_rollback_trans(thd, FALSE);
}
+ close_thread_tables(thd);
+ thd->release_transactional_locks();
+ thd->lex->restore_backup_query_tables_list(&lex_backup);
+
+ if (err)
+ break;
}
- thd->lex->restore_backup_query_tables_list(&lex_backup);
thd->variables.option_bits= thd_saved_option;
- thd->resume_subsequent_commits(suspended_wfc);
- DBUG_EXECUTE_IF("inject_record_gtid_serverid_100_sleep",
- {
- if (gtid->server_id == 100)
- my_sleep(500000);
- });
- DBUG_RETURN(err);
+
+#ifdef WITH_WSREP
+ thd->wsrep_ignore_table= false;
+#endif
}
@@ -1252,7 +1372,7 @@ rpl_slave_state::load(THD *thd, const char *state_from_master, size_t len,
if (gtid_parser_helper(&state_from_master, end, &gtid) ||
!(sub_id= next_sub_id(gtid.domain_id)) ||
- record_gtid(thd, &gtid, sub_id, NULL, in_statement, &hton) ||
+ record_gtid(thd, &gtid, sub_id, false, in_statement, &hton) ||
update(gtid.domain_id, gtid.server_id, sub_id, gtid.seq_no, hton, NULL))
return 1;
if (state_from_master == end)
@@ -1311,13 +1431,10 @@ void
rpl_slave_state::set_gtid_pos_tables_list(rpl_slave_state::gtid_pos_table *new_list,
rpl_slave_state::gtid_pos_table *default_entry)
{
- gtid_pos_table *old_list;
-
mysql_mutex_assert_owner(&LOCK_slave_state);
- old_list= (struct gtid_pos_table *)gtid_pos_tables;
- my_atomic_storeptr_explicit(&gtid_pos_tables, new_list, MY_MEMORY_ORDER_RELEASE);
- my_atomic_storeptr_explicit(&default_gtid_pos_table, default_entry,
- MY_MEMORY_ORDER_RELEASE);
+ auto old_list= gtid_pos_tables.load(std::memory_order_relaxed);
+ gtid_pos_tables.store(new_list, std::memory_order_release);
+ default_gtid_pos_table.store(default_entry, std::memory_order_release);
free_gtid_pos_tables(old_list);
}
@@ -1326,8 +1443,8 @@ void
rpl_slave_state::add_gtid_pos_table(rpl_slave_state::gtid_pos_table *entry)
{
mysql_mutex_assert_owner(&LOCK_slave_state);
- entry->next= (struct gtid_pos_table *)gtid_pos_tables;
- my_atomic_storeptr_explicit(&gtid_pos_tables, entry, MY_MEMORY_ORDER_RELEASE);
+ entry->next= gtid_pos_tables.load(std::memory_order_relaxed);
+ gtid_pos_tables.store(entry, std::memory_order_release);
}
diff --git a/sql/rpl_gtid.h b/sql/rpl_gtid.h
index fec0cccdb0a..081f7e309f4 100644
--- a/sql/rpl_gtid.h
+++ b/sql/rpl_gtid.h
@@ -119,8 +119,9 @@ struct rpl_slave_state
{
struct list_element *next;
uint64 sub_id;
- uint64 seq_no;
+ uint32 domain_id;
uint32 server_id;
+ uint64 seq_no;
/*
hton of mysql.gtid_slave_pos* table used to record this GTID.
Can be NULL if the gtid table failed to load (eg. missing
@@ -192,6 +193,8 @@ struct rpl_slave_state
/* Mapping from domain_id to its element. */
HASH hash;
+ /* GTIDs added since last purge of old mysql.gtid_slave_pos rows. */
+ uint32 pending_gtid_count;
/* Mutex protecting access to the state. */
mysql_mutex_t LOCK_slave_state;
/* Auxiliary buffer to sort gtid list. */
@@ -215,13 +218,10 @@ struct rpl_slave_state
The list can be read without lock by an SQL driver thread or worker thread
by reading the gtid_pos_tables pointer atomically with acquire semantics,
to ensure that it will see the correct next pointer of a new head element.
-
- The type is struct gtid_pos_table *, but needs to be void * to allow using
- my_atomic operations without violating C strict aliasing semantics.
*/
- void * volatile gtid_pos_tables;
+ std::atomic<gtid_pos_table*> gtid_pos_tables;
/* The default entry in gtid_pos_tables, mysql.gtid_slave_pos. */
- void * volatile default_gtid_pos_table;
+ std::atomic<gtid_pos_table*> default_gtid_pos_table;
bool loaded;
rpl_slave_state();
@@ -234,7 +234,10 @@ struct rpl_slave_state
int truncate_state_table(THD *thd);
void select_gtid_pos_table(THD *thd, LEX_CSTRING *out_tablename);
int record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
- rpl_group_info *rgi, bool in_statement, void **out_hton);
+ bool in_transaction, bool in_statement, void **out_hton);
+ list_element *gtid_grab_pending_delete_list();
+ LEX_CSTRING *select_gtid_pos_table(void *hton);
+ void gtid_delete_pending(THD *thd, rpl_slave_state::list_element **list_ptr);
uint64 next_sub_id(uint32 domain_id);
int iterate(int (*cb)(rpl_gtid *, void *), void *data,
rpl_gtid *extra_gtids, uint32 num_extra,
@@ -246,7 +249,7 @@ struct rpl_slave_state
bool is_empty();
element *get_element(uint32 domain_id);
- int put_back_list(uint32 domain_id, list_element *list);
+ int put_back_list(list_element *list);
void update_state_hash(uint64 sub_id, rpl_gtid *gtid, void *hton,
rpl_group_info *rgi);
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index 87294bcd11a..fc5b8a4b01c 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -1084,7 +1084,7 @@ bool Master_info_index::init_all_master_info()
if ((index_file_nr= my_open(index_file_name,
O_RDWR | O_CREAT | O_BINARY ,
- MYF(MY_WME | ME_NOREFRESH))) < 0 ||
+ MYF(MY_WME | ME_ERROR_LOG))) < 0 ||
my_sync(index_file_nr, MYF(MY_WME)) ||
init_io_cache(&index_file, index_file_nr,
IO_SIZE, READ_CACHE,
@@ -1300,7 +1300,7 @@ Master_info *get_master_info(const LEX_CSTRING *connection_name,
if (warning != Sql_condition::WARN_LEVEL_NOTE)
my_error(WARN_NO_MASTER_INFO,
MYF(warning == Sql_condition::WARN_LEVEL_WARN ?
- ME_JUST_WARNING : 0),
+ ME_WARNING : 0),
(int) connection_name->length, connection_name->str);
mysql_mutex_unlock(&LOCK_active_mi);
DBUG_RETURN(0);
@@ -1370,7 +1370,7 @@ Master_info_index::get_master_info(const LEX_CSTRING *connection_name,
if (!mi && warning != Sql_condition::WARN_LEVEL_NOTE)
{
my_error(WARN_NO_MASTER_INFO,
- MYF(warning == Sql_condition::WARN_LEVEL_WARN ? ME_JUST_WARNING :
+ MYF(warning == Sql_condition::WARN_LEVEL_WARN ? ME_WARNING :
0),
(int) connection_name->length,
connection_name->str);
@@ -1429,7 +1429,7 @@ bool Master_info_index::add_master_info(Master_info *mi, bool write_to_file)
We have to protect against shutdown to ensure we are not calling
my_hash_insert() while my_hash_free() is in progress
*/
- if (unlikely(shutdown_in_progress) ||
+ if (unlikely(abort_loop) ||
!my_hash_insert(&master_info_hash, (uchar*) mi))
{
if (global_system_variables.log_warnings > 1)
@@ -1572,7 +1572,7 @@ uint any_slave_sql_running(bool already_locked)
if (!already_locked)
mysql_mutex_lock(&LOCK_active_mi);
- if (unlikely(shutdown_in_progress || !master_info_index))
+ if (unlikely(abort_loop || !master_info_index))
count= 1;
else
{
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h
index d7a61639b67..b6ff69d1f64 100644
--- a/sql/rpl_mi.h
+++ b/sql/rpl_mi.h
@@ -334,13 +334,13 @@ class Master_info : public Slave_reporting_capability
/* No of DDL event group */
- volatile uint64 total_ddl_groups;
+ Atomic_counter<uint64> total_ddl_groups;
/* No of non-transactional event group*/
- volatile uint64 total_non_trans_groups;
+ Atomic_counter<uint64> total_non_trans_groups;
/* No of transactional event group*/
- volatile uint64 total_trans_groups;
+ Atomic_counter<uint64> total_trans_groups;
/* domain-id based filter */
Domain_id_filter domain_id_filter;
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 3eb25219ed3..35901cb5263 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -5,6 +5,10 @@
#include "sql_parse.h"
#include "debug_sync.h"
#include "sql_repl.h"
+#include "wsrep_mysqld.h"
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h"
+#endif
/*
Code for optional parallel execution of replicated events on the slave.
@@ -36,6 +40,13 @@ rpt_handle_event(rpl_parallel_thread::queued_event *qev,
DBUG_ASSERT(qev->typ == rpl_parallel_thread::queued_event::QUEUED_EVENT);
ev= qev->ev;
+#ifdef WITH_WSREP
+ if (wsrep_before_statement(thd))
+ {
+ WSREP_WARN("Parallel slave failed at wsrep_before_statement() hook");
+ return(1);
+ }
+#endif /* WITH_WSREP */
thd->system_thread_info.rpl_sql_info->rpl_filter = rli->mi->rpl_filter;
ev->thd= thd;
@@ -50,7 +61,14 @@ rpt_handle_event(rpl_parallel_thread::queued_event *qev,
rgi->last_master_timestamp= ev->when + (time_t)ev->exec_time;
err= apply_event_and_update_pos_for_parallel(ev, thd, rgi);
- thread_safe_increment64(&rli->executed_entries);
+ rli->executed_entries++;
+#ifdef WITH_WSREP
+ if (wsrep_after_statement(thd))
+ {
+ WSREP_WARN("Parallel slave failed at wsrep_after_statement() hook");
+ err= 1;
+ }
+#endif /* WITH_WSREP */
/* ToDo: error handling. */
return err;
}
@@ -1050,13 +1068,13 @@ handle_rpl_parallel_thread(void *arg)
my_thread_init();
thd = new THD(next_thread_id());
thd->thread_stack = (char*)&thd;
- add_to_active_threads(thd);
+ server_threads.insert(thd);
set_current_thd(thd);
pthread_detach_this_thread();
+ thd->store_globals();
thd->init_for_queries();
thd->variables.binlog_annotate_row_events= 0;
init_thr_lock();
- thd->store_globals();
thd->system_thread= SYSTEM_THREAD_SLAVE_SQL;
thd->security_ctx->skip_grants();
thd->variables.max_allowed_packet= slave_max_allowed_packet;
@@ -1087,6 +1105,14 @@ handle_rpl_parallel_thread(void *arg)
mysql_cond_signal(&rpt->COND_rpl_thread);
thd->set_command(COM_SLAVE_WORKER);
+#ifdef WITH_WSREP
+ wsrep_open(thd);
+ if (wsrep_before_command(thd))
+ {
+ WSREP_WARN("Parallel slave failed at wsrep_before_command() hook");
+ rpt->stop = true;
+ }
+#endif /* WITH_WSREP */
while (!rpt->stop)
{
uint wait_count= 0;
@@ -1457,6 +1483,11 @@ handle_rpl_parallel_thread(void *arg)
rpt->pool->release_thread(rpt);
}
}
+#ifdef WITH_WSREP
+ wsrep_after_command_before_result(thd);
+ wsrep_after_command_after_result(thd);
+ wsrep_close(thd);
+#endif /* WITH_WSREP */
rpt->thd= NULL;
mysql_mutex_unlock(&rpt->LOCK_rpl_thread);
@@ -1469,7 +1500,7 @@ handle_rpl_parallel_thread(void *arg)
thd->temporary_tables= 0;
THD_CHECK_SENTRY(thd);
- unlink_not_visible_thd(thd);
+ server_threads.erase(thd);
delete thd;
mysql_mutex_lock(&rpt->LOCK_rpl_thread);
@@ -1765,7 +1796,7 @@ rpl_parallel_thread::inuse_relaylog_refcount_update()
inuse_relaylog *ir= accumulated_ir_last;
if (ir)
{
- my_atomic_add64(&ir->dequeued_count, accumulated_ir_count);
+ ir->dequeued_count+= accumulated_ir_count;
accumulated_ir_count= 0;
accumulated_ir_last= NULL;
}
diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc
index b1fe34dc23d..7da296b47d9 100644
--- a/sql/rpl_record.cc
+++ b/sql/rpl_record.cc
@@ -329,21 +329,6 @@ unpack_row(rpl_group_info *rgi,
(int) (pack_ptr - old_pack_ptr)));
if (!pack_ptr)
{
- if (WSREP_ON)
- {
- /*
- Debug message to troubleshoot bug:
- https://mariadb.atlassian.net/browse/MDEV-4404
- Galera Node throws "Could not read field" error and drops out of cluster
- */
- WSREP_WARN("ROW event unpack field: %s metadata: 0x%x;"
- " conv_table %p conv_field %p table %s"
- " row_end: %p",
- f->field_name.str, metadata, conv_table, conv_field,
- (table_found) ? "found" : "not found", row_end
- );
- }
-
rgi->rli->report(ERROR_LEVEL, ER_SLAVE_CORRUPT_EVENT,
rgi->gtid_info(),
"Could not read field '%s' of table '%s.%s'",
@@ -496,7 +481,9 @@ int prepare_record(TABLE *const table, const uint skip, const bool check)
DBUG_RETURN(0);
}
/**
- Fills @c table->record[0] with computed values of extra persistent column which are present on slave but not on master.
+ Fills @c table->record[0] with computed values of extra persistent column
+ which are present on slave but not on master.
+
@param table Table whose record[0] buffer is prepared.
@param master_cols No of columns on master
@returns 0 on success
@@ -513,10 +500,8 @@ int fill_extra_persistent_columns(TABLE *table, int master_cols)
vfield= *vfield_ptr;
if (vfield->field_index >= master_cols && vfield->stored_in_db())
{
- /*Set bitmap for writing*/
- bitmap_set_bit(table->vcol_set, vfield->field_index);
+ bitmap_set_bit(table->write_set, vfield->field_index);
error= vfield->vcol_info->expr->save_in_field(vfield,0);
- bitmap_clear_bit(table->vcol_set, vfield->field_index);
}
}
return error;
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 176801130d7..58030db2a8c 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -458,9 +458,8 @@ static inline int add_relay_log(Relay_log_info* rli,LOG_INFO* linfo)
linfo->log_file_name);
DBUG_RETURN(1);
}
- my_atomic_add64_explicit((volatile int64*)(&rli->log_space_total),
- s.st_size, MY_MEMORY_ORDER_RELAXED);
- DBUG_PRINT("info",("log_space_total: %llu", rli->log_space_total));
+ rli->log_space_total += s.st_size;
+ DBUG_PRINT("info",("log_space_total: %llu", uint64(rli->log_space_total)));
DBUG_RETURN(0);
}
@@ -469,8 +468,7 @@ static int count_relay_log_space(Relay_log_info* rli)
{
LOG_INFO linfo;
DBUG_ENTER("count_relay_log_space");
- my_atomic_store64_explicit((volatile int64*)(&rli->log_space_total), 0,
- MY_MEMORY_ORDER_RELAXED);
+ rli->log_space_total= 0;
if (rli->relay_log.find_log_pos(&linfo, NullS, 1))
{
sql_print_error("Could not find first log while counting relay log space");
@@ -1229,8 +1227,8 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
strmake_buf(rli->group_relay_log_name, rli->relay_log.get_log_fname());
strmake_buf(rli->event_relay_log_name, rli->relay_log.get_log_fname());
rli->group_relay_log_pos= rli->event_relay_log_pos= BIN_LOG_HEADER_SIZE;
- my_atomic_store64_explicit((volatile int64*)(&rli->log_space_total), 0,
- MY_MEMORY_ORDER_RELAXED);
+ rli->log_space_total= 0;
+
if (count_relay_log_space(rli))
{
*errmsg= "Error counting relay log space";
@@ -1254,7 +1252,7 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
mysql_mutex_unlock(rli->relay_log.get_log_lock());
}
err:
- DBUG_PRINT("info",("log_space_total: %llu",rli->log_space_total));
+ DBUG_PRINT("info",("log_space_total: %llu", uint64(rli->log_space_total)));
mysql_mutex_unlock(&rli->data_lock);
DBUG_RETURN(error);
}
@@ -1494,31 +1492,27 @@ Relay_log_info::alloc_inuse_relaylog(const char *name)
uint32 gtid_count;
rpl_gtid *gtid_list;
- if (!(ir= (inuse_relaylog *)my_malloc(sizeof(*ir), MYF(MY_WME|MY_ZEROFILL))))
- {
- my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*ir));
- return 1;
- }
gtid_count= relay_log_state.count();
if (!(gtid_list= (rpl_gtid *)my_malloc(sizeof(*gtid_list)*gtid_count,
MYF(MY_WME))))
{
- my_free(ir);
my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*gtid_list)*gtid_count);
return 1;
}
+ if (!(ir= new inuse_relaylog(this, gtid_list, gtid_count, name)))
+ {
+ my_free(gtid_list);
+ my_error(ER_OUTOFMEMORY, MYF(0), (int) sizeof(*ir));
+ return 1;
+ }
if (relay_log_state.get_gtid_list(gtid_list, gtid_count))
{
my_free(gtid_list);
- my_free(ir);
+ delete ir;
DBUG_ASSERT(0 /* Should not be possible as we allocated correct length */);
my_error(ER_OUT_OF_RESOURCES, MYF(0));
return 1;
}
- ir->rli= this;
- strmake_buf(ir->name, name);
- ir->relay_log_state= gtid_list;
- ir->relay_log_state_count= gtid_count;
if (!inuse_relaylog_list)
inuse_relaylog_list= ir;
@@ -1537,7 +1531,7 @@ void
Relay_log_info::free_inuse_relaylog(inuse_relaylog *ir)
{
my_free(ir->relay_log_state);
- my_free(ir);
+ delete ir;
}
@@ -1681,7 +1675,7 @@ end:
{
*out_hton= table->s->db_type();
close_thread_tables(thd);
- thd->mdl_context.release_transactional_locks();
+ thd->mdl_context.release_transactional_locks(thd);
}
return err;
}
@@ -1879,6 +1873,7 @@ rpl_load_gtid_slave_state(THD *thd)
int err= 0;
uint32 i;
load_gtid_state_cb_data cb_data;
+ rpl_slave_state::list_element *old_gtids_list;
DBUG_ENTER("rpl_load_gtid_slave_state");
mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state);
@@ -1964,6 +1959,13 @@ rpl_load_gtid_slave_state(THD *thd)
rpl_global_gtid_slave_state->loaded= true;
mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state);
+ /* Clear out no longer needed elements now. */
+ old_gtids_list=
+ rpl_global_gtid_slave_state->gtid_grab_pending_delete_list();
+ rpl_global_gtid_slave_state->gtid_delete_pending(thd, &old_gtids_list);
+ if (old_gtids_list)
+ rpl_global_gtid_slave_state->put_back_list(old_gtids_list);
+
end:
if (array_inited)
delete_dynamic(&array);
@@ -2070,10 +2072,9 @@ find_gtid_slave_pos_tables(THD *thd)
However we can add new entries, and warn about any tables that
disappeared, but may still be visible to running SQL threads.
*/
- rpl_slave_state::gtid_pos_table *old_entry, *new_entry, **next_ptr_ptr;
-
- old_entry= (rpl_slave_state::gtid_pos_table *)
- rpl_global_gtid_slave_state->gtid_pos_tables;
+ rpl_slave_state::gtid_pos_table *new_entry, **next_ptr_ptr;
+ auto old_entry= rpl_global_gtid_slave_state->
+ gtid_pos_tables.load(std::memory_order_relaxed);
while (old_entry)
{
new_entry= cb_data.table_list;
@@ -2095,8 +2096,8 @@ find_gtid_slave_pos_tables(THD *thd)
while (new_entry)
{
/* Check if we already have a table with this storage engine. */
- old_entry= (rpl_slave_state::gtid_pos_table *)
- rpl_global_gtid_slave_state->gtid_pos_tables;
+ old_entry= rpl_global_gtid_slave_state->
+ gtid_pos_tables.load(std::memory_order_relaxed);
while (old_entry)
{
if (new_entry->table_hton == old_entry->table_hton)
@@ -2145,7 +2146,6 @@ rpl_group_info::reinit(Relay_log_info *rli)
long_find_row_note_printed= false;
did_mark_start_commit= false;
gtid_ev_flags2= 0;
- pending_gtid_delete_list= NULL;
last_master_timestamp = 0;
gtid_ignore_duplicate_state= GTID_DUPLICATE_NULL;
speculation= SPECULATE_NO;
@@ -2276,12 +2276,6 @@ void rpl_group_info::cleanup_context(THD *thd, bool error)
erroneously update the GTID position.
*/
gtid_pending= false;
-
- /*
- Rollback will have undone any deletions of old rows we might have made
- in mysql.gtid_slave_pos. Put those rows back on the list to be deleted.
- */
- pending_gtid_deletes_put_back();
}
m_table_map.clear_tables();
slave_close_thread_tables(thd);
@@ -2507,78 +2501,6 @@ rpl_group_info::unmark_start_commit()
}
-/*
- When record_gtid() has deleted any old rows from the table
- mysql.gtid_slave_pos as part of a replicated transaction, save the list of
- rows deleted here.
-
- If later the transaction fails (eg. optimistic parallel replication), the
- deletes will be undone when the transaction is rolled back. Then we can
- put back the list of rows into the rpl_global_gtid_slave_state, so that
- we can re-do the deletes and avoid accumulating old rows in the table.
-*/
-void
-rpl_group_info::pending_gtid_deletes_save(uint32 domain_id,
- rpl_slave_state::list_element *list)
-{
- /*
- We should never get to a state where we try to save a new pending list of
- gtid deletes while we still have an old one. But make sure we handle it
- anyway just in case, so we avoid leaving stray entries in the
- mysql.gtid_slave_pos table.
- */
- DBUG_ASSERT(!pending_gtid_delete_list);
- if (unlikely(pending_gtid_delete_list))
- pending_gtid_deletes_put_back();
-
- pending_gtid_delete_list= list;
- pending_gtid_delete_list_domain= domain_id;
-}
-
-
-/*
- Take the list recorded by pending_gtid_deletes_save() and put it back into
- rpl_global_gtid_slave_state. This is needed if deletion of the rows was
- rolled back due to transaction failure.
-*/
-void
-rpl_group_info::pending_gtid_deletes_put_back()
-{
- if (pending_gtid_delete_list)
- {
- rpl_global_gtid_slave_state->put_back_list(pending_gtid_delete_list_domain,
- pending_gtid_delete_list);
- pending_gtid_delete_list= NULL;
- }
-}
-
-
-/*
- Free the list recorded by pending_gtid_deletes_save(). Done when the deletes
- in the list have been permanently committed.
-*/
-void
-rpl_group_info::pending_gtid_deletes_clear()
-{
- pending_gtid_deletes_free(pending_gtid_delete_list);
- pending_gtid_delete_list= NULL;
-}
-
-
-void
-rpl_group_info::pending_gtid_deletes_free(rpl_slave_state::list_element *list)
-{
- rpl_slave_state::list_element *next;
-
- while (list)
- {
- next= list->next;
- my_free(list);
- list= next;
- }
-}
-
-
rpl_sql_thread_info::rpl_sql_thread_info(Rpl_filter *filter)
: rpl_filter(filter)
{
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index cfe581ebb7a..1391c5cde82 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -240,7 +240,8 @@ public:
threads, the SQL thread sets it to unblock the I/O thread and make it
temporarily forget about the constraint.
*/
- ulonglong log_space_limit,log_space_total;
+ ulonglong log_space_limit;
+ Atomic_counter<uint64> log_space_total;
bool ignore_log_space_limit;
/*
@@ -347,7 +348,7 @@ public:
Number of executed events for SLAVE STATUS.
Protected by slave_executed_entries_lock
*/
- int64 executed_entries;
+ Atomic_counter<uint32_t> executed_entries;
/*
If the end of the hot relay log is made of master's events ignored by the
@@ -623,10 +624,20 @@ struct inuse_relaylog {
/* Number of events in this relay log queued for worker threads. */
int64 queued_count;
/* Number of events completed by worker threads. */
- volatile int64 dequeued_count;
+ Atomic_counter<int64> dequeued_count;
/* Set when all events have been read from a relaylog. */
bool completed;
char name[FN_REFLEN];
+
+ inuse_relaylog(Relay_log_info *rli_arg, rpl_gtid *relay_log_state_arg,
+ uint32 relay_log_state_count_arg,
+ const char *name_arg):
+ next(0), rli(rli_arg), relay_log_state(relay_log_state_arg),
+ relay_log_state_count(relay_log_state_count_arg), queued_count(0),
+ dequeued_count(0), completed(false)
+ {
+ strmake_buf(name, name_arg);
+ }
};
@@ -772,11 +783,6 @@ struct rpl_group_info
/* Needs room for "Gtid D-S-N\x00". */
char gtid_info_buf[5+10+1+10+1+20+1];
- /* List of not yet committed deletions in mysql.gtid_slave_pos. */
- rpl_slave_state::list_element *pending_gtid_delete_list;
- /* Domain associated with pending_gtid_delete_list. */
- uint32 pending_gtid_delete_list_domain;
-
/*
The timestamp, from the master, of the commit event.
Used to do delayed update of rli->last_master_timestamp, for getting
@@ -918,12 +924,6 @@ struct rpl_group_info
char *gtid_info();
void unmark_start_commit();
- static void pending_gtid_deletes_free(rpl_slave_state::list_element *list);
- void pending_gtid_deletes_save(uint32 domain_id,
- rpl_slave_state::list_element *list);
- void pending_gtid_deletes_put_back();
- void pending_gtid_deletes_clear();
-
longlong get_row_stmt_start_timestamp()
{
return row_stmt_start_timestamp;
diff --git a/sql/select_handler.cc b/sql/select_handler.cc
new file mode 100644
index 00000000000..495b6d957b1
--- /dev/null
+++ b/sql/select_handler.cc
@@ -0,0 +1,173 @@
+/*
+ Copyright (c) 2018, 2019 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+#include "mariadb.h"
+#include "sql_priv.h"
+#include "sql_select.h"
+#include "select_handler.h"
+
+
+/**
+ The methods of the Pushdown_select class.
+
+ The objects of this class are used for pushdown of the select queries
+ into engines. The main method of the class is Pushdown_select::execute()
+ that initiates execution of a select query by a foreign engine, receives the
+ rows of the result set, put it in a buffer of a temporary table and send
+ them from the buffer directly into output.
+
+ The method uses the functions of the select_handle interface to do this.
+ It also employes plus some helper functions to create the needed temporary
+ table and to send rows from the temporary table into output.
+ The constructor of the class gets the select_handler interface as a parameter.
+*/
+
+
+Pushdown_select::Pushdown_select(SELECT_LEX *sel, select_handler *h)
+ : select(sel), handler(h)
+{
+ is_analyze= handler->thd->lex->analyze_stmt;
+}
+
+
+Pushdown_select::~Pushdown_select()
+{
+ if (handler->table)
+ free_tmp_table(handler->thd, handler->table);
+ delete handler;
+ select->select_h= NULL;
+}
+
+
+bool Pushdown_select::init()
+{
+ List<Item> types;
+ TMP_TABLE_PARAM tmp_table_param;
+ THD *thd= handler->thd;
+ DBUG_ENTER("Pushdown_select::init");
+ if (select->master_unit()->join_union_item_types(thd, types, 1))
+ DBUG_RETURN(true);
+ tmp_table_param.init();
+ tmp_table_param.field_count= types.elements;
+
+ handler->table= create_tmp_table(thd, &tmp_table_param, types,
+ (ORDER *) 0, false, 0,
+ TMP_TABLE_ALL_COLUMNS, 1,
+ &empty_clex_str, true, false);
+ if (!handler->table)
+ DBUG_RETURN(true);
+ if (handler->table->fill_item_list(&result_columns))
+ DBUG_RETURN(true);
+ DBUG_RETURN(false);
+}
+
+
+bool Pushdown_select::send_result_set_metadata()
+{
+ DBUG_ENTER("Pushdown_select::send_result_set_metadata");
+
+#ifdef WITH_WSREP
+ THD *thd= handler->thd;
+ if (WSREP(thd) && thd->wsrep_retry_query)
+ {
+ WSREP_DEBUG("skipping select metadata");
+ DBUG_RETURN(false);
+ }
+ #endif /* WITH_WSREP */
+ if (select->join->result->send_result_set_metadata(result_columns,
+ Protocol::SEND_NUM_ROWS |
+ Protocol::SEND_EOF))
+ DBUG_RETURN(true);
+
+ DBUG_RETURN(false);
+}
+
+
+bool Pushdown_select::send_data()
+{
+ THD *thd= handler->thd;
+ DBUG_ENTER("Pushdown_select::send_data");
+
+ if (thd->killed == ABORT_QUERY)
+ DBUG_RETURN(false);
+
+ if (select->join->result->send_data(result_columns))
+ DBUG_RETURN(true);
+
+ DBUG_RETURN(false);
+}
+
+
+bool Pushdown_select::send_eof()
+{
+ DBUG_ENTER("Pushdown_select::send_eof");
+
+ if (select->join->result->send_eof())
+ DBUG_RETURN(true);
+ DBUG_RETURN(false);
+}
+
+
+int Pushdown_select::execute()
+{
+ int err;
+ THD *thd= handler->thd;
+
+ DBUG_ENTER("Pushdown_select::execute");
+
+ if ((err= handler->init_scan()))
+ goto error;
+
+ if (is_analyze)
+ {
+ handler->end_scan();
+ DBUG_RETURN(0);
+ }
+
+ if (send_result_set_metadata())
+ DBUG_RETURN(-1);
+
+ while (!(err= handler->next_row()))
+ {
+ if (thd->check_killed() || send_data())
+ {
+ handler->end_scan();
+ DBUG_RETURN(-1);
+ }
+ }
+
+ if (err != 0 && err != HA_ERR_END_OF_FILE)
+ goto error;
+
+ if ((err= handler->end_scan()))
+ goto error_2;
+
+ if (send_eof())
+ DBUG_RETURN(-1);
+
+ DBUG_RETURN(0);
+
+error:
+ handler->end_scan();
+error_2:
+ handler->print_error(err, MYF(0));
+ DBUG_RETURN(-1); // Error not sent to client
+}
+
+void select_handler::print_error(int error, myf errflag)
+{
+ my_error(ER_GET_ERRNO, MYF(0), error, hton_name(ht)->str);
+}
diff --git a/sql/select_handler.h b/sql/select_handler.h
new file mode 100644
index 00000000000..e2ad13b7cdf
--- /dev/null
+++ b/sql/select_handler.h
@@ -0,0 +1,72 @@
+/*
+ Copyright (c) 2018, 2019 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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-1301 USA */
+
+#ifndef SELECT_HANDLER_INCLUDED
+#define SELECT_HANDLER_INCLUDED
+
+#include "mariadb.h"
+#include "sql_priv.h"
+
+/**
+ @class select_handler
+
+ This interface class is to be used for execution of select queries
+ by foreign engines
+*/
+
+class select_handler
+{
+ public:
+ THD *thd;
+ handlerton *ht;
+
+ SELECT_LEX *select; // Select to be excuted
+
+ /*
+ Temporary table where all results should be stored in record[0]
+ The table has a field for every item from the select_lex::item_list.
+ The table is actually never filled. Only its record buffer is used.
+ */
+ TABLE *table;
+
+ select_handler(THD *thd_arg, handlerton *ht_arg)
+ : thd(thd_arg), ht(ht_arg), table(0) {}
+
+ virtual ~select_handler() {}
+
+ /*
+ Functions to scan the select result set.
+ All these returns 0 if ok, error code in case of error.
+ */
+
+ /* Initialize the process of producing rows of result set */
+ virtual int init_scan() = 0;
+
+ /*
+ Put the next produced row of the result set in table->record[0]
+ and return 0. Return HA_ERR_END_OF_FILE if there are no more rows,
+ return other error number in case of fatal error.
+ */
+ virtual int next_row() = 0;
+
+ /* Finish scanning */
+ virtual int end_scan() = 0;
+
+ /* Report errors */
+ virtual void print_error(int error, myf errflag);
+};
+
+#endif /* SELECT_HANDLER_INCLUDED */
diff --git a/sql/semisync_master.cc b/sql/semisync_master.cc
index 0f868d4fc7a..581cf100792 100644
--- a/sql/semisync_master.cc
+++ b/sql/semisync_master.cc
@@ -463,6 +463,37 @@ void Repl_semi_sync_master::cleanup()
delete m_active_tranxs;
}
+int Repl_semi_sync_master::sync_get_master_wait_sessions()
+{
+ int wait_sessions;
+ lock();
+ wait_sessions= rpl_semi_sync_master_wait_sessions;
+ unlock();
+ return wait_sessions;
+}
+
+void Repl_semi_sync_master::create_timeout(struct timespec *out,
+ struct timespec *start_arg)
+{
+ struct timespec *start_ts;
+ struct timespec now_ts;
+ if (!start_arg)
+ {
+ set_timespec(now_ts, 0);
+ start_ts= &now_ts;
+ }
+ else
+ {
+ start_ts= start_arg;
+ }
+
+ long diff_secs= (long) (m_wait_timeout / TIME_THOUSAND);
+ long diff_nsecs= (long) ((m_wait_timeout % TIME_THOUSAND) * TIME_MILLION);
+ long nsecs= start_ts->tv_nsec + diff_nsecs;
+ out->tv_sec= start_ts->tv_sec + diff_secs + nsecs / TIME_BILLION;
+ out->tv_nsec= nsecs % TIME_BILLION;
+}
+
void Repl_semi_sync_master::lock()
{
mysql_mutex_lock(&LOCK_binlog);
@@ -862,13 +893,6 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
m_wait_file_name, (ulong)m_wait_file_pos));
}
- /* Calcuate the waiting period. */
- long diff_secs = (long) (m_wait_timeout / TIME_THOUSAND);
- long diff_nsecs = (long) ((m_wait_timeout % TIME_THOUSAND) * TIME_MILLION);
- long nsecs = start_ts.tv_nsec + diff_nsecs;
- abstime.tv_sec = start_ts.tv_sec + diff_secs + nsecs/TIME_BILLION;
- abstime.tv_nsec = nsecs % TIME_BILLION;
-
/* In semi-synchronous replication, we wait until the binlog-dump
* thread has received the reply on the relevant binlog segment from the
* replication slave.
@@ -879,12 +903,20 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
*/
rpl_semi_sync_master_wait_sessions++;
+ /* We keep track of when this thread is awaiting an ack to ensure it is
+ * not killed while awaiting an ACK if a shutdown is issued.
+ */
+ set_thd_awaiting_semisync_ack(thd, TRUE);
+
DBUG_PRINT("semisync", ("%s: wait %lu ms for binlog sent (%s, %lu)",
"Repl_semi_sync_master::commit_trx",
m_wait_timeout,
m_wait_file_name, (ulong)m_wait_file_pos));
+ create_timeout(&abstime, &start_ts);
wait_result = cond_timewait(&abstime);
+
+ set_thd_awaiting_semisync_ack(thd, FALSE);
rpl_semi_sync_master_wait_sessions--;
if (wait_result != 0)
@@ -1320,6 +1352,25 @@ void Repl_semi_sync_master::set_export_stats()
unlock();
}
+void Repl_semi_sync_master::await_slave_reply()
+{
+ struct timespec abstime;
+
+ DBUG_ENTER("Repl_semi_sync_master::::await_slave_reply");
+ lock();
+
+ /* Just return if there is nothing to wait for */
+ if (!rpl_semi_sync_master_wait_sessions)
+ goto end;
+
+ create_timeout(&abstime, NULL);
+ cond_timewait(&abstime);
+
+end:
+ unlock();
+ DBUG_VOID_RETURN;
+}
+
/* Get the waiting time given the wait's staring time.
*
* Return:
diff --git a/sql/semisync_master.h b/sql/semisync_master.h
index 74f6c24c8ea..16cf8a91215 100644
--- a/sql/semisync_master.h
+++ b/sql/semisync_master.h
@@ -472,6 +472,21 @@ class Repl_semi_sync_master
m_wait_timeout = wait_timeout;
}
+ int sync_get_master_wait_sessions();
+
+ /*
+ Calculates a timeout that is m_wait_timeout after start_arg and saves it
+ in out. If start_arg is NULL, the timeout is m_wait_timeout after the
+ current system time.
+ */
+ void create_timeout(struct timespec *out, struct timespec *start_arg);
+
+ /*
+ Blocks the calling thread until the ack_receiver either receives an ACK
+ or times out (from rpl_semi_sync_master_timeout)
+ */
+ void await_slave_reply();
+
/*set the ACK point, after binlog sync or after transaction commit*/
void set_wait_point(unsigned long ack_point)
{
@@ -620,6 +635,30 @@ class Repl_semi_sync_master
void check_and_switch();
+ /*
+ Determines if the given thread is currently awaiting a semisync_ack. Note
+ that the thread's value is protected by this class's LOCK_binlog, so this
+ function (indirectly) provides safe access.
+ */
+ my_bool is_thd_awaiting_semisync_ack(THD *thd)
+ {
+ lock();
+ my_bool ret= thd->is_awaiting_semisync_ack;
+ unlock();
+ return ret;
+ }
+
+ /*
+ Update the thread's value for is_awaiting_semisync_ack. LOCK_binlog (from
+ this class) should be acquired before calling this function.
+ */
+ void set_thd_awaiting_semisync_ack(THD *thd,
+ my_bool _is_awaiting_semisync_ack)
+ {
+ mysql_mutex_assert_owner(&LOCK_binlog);
+ thd->is_awaiting_semisync_ack= _is_awaiting_semisync_ack;
+ }
+
mysql_mutex_t LOCK_rpl_semi_sync_master_enabled;
};
diff --git a/sql/semisync_master_ack_receiver.cc b/sql/semisync_master_ack_receiver.cc
index cc3a56a56b2..b24d6452480 100644
--- a/sql/semisync_master_ack_receiver.cc
+++ b/sql/semisync_master_ack_receiver.cc
@@ -204,7 +204,6 @@ void Ack_receiver::run()
thd->thread_stack= (char*) &thd;
thd->store_globals();
thd->security_ctx->skip_grants();
- thread_safe_increment32(&service_thread_count);
thd->set_command(COM_DAEMON);
init_net(&net, net_buff, REPLY_MESSAGE_MAX_LENGTH);
@@ -288,8 +287,6 @@ end:
sql_print_information("Stopping ack receiver thread");
m_status= ST_DOWN;
delete thd;
- thread_safe_decrement32(&service_thread_count);
- signal_thd_deleted();
mysql_cond_broadcast(&m_cond);
mysql_mutex_unlock(&m_mutex);
DBUG_VOID_RETURN;
diff --git a/sql/semisync_slave.cc b/sql/semisync_slave.cc
index df8baf045ac..8fe3ba3657d 100644
--- a/sql/semisync_slave.cc
+++ b/sql/semisync_slave.cc
@@ -114,10 +114,12 @@ int Repl_semi_sync_slave::slave_start(Master_info *mi)
int Repl_semi_sync_slave::slave_stop(Master_info *mi)
{
- if (rpl_semi_sync_slave_status)
- rpl_semi_sync_slave_status= 0;
if (get_slave_enabled())
kill_connection(mi->mysql);
+
+ if (rpl_semi_sync_slave_status)
+ rpl_semi_sync_slave_status= 0;
+
return 0;
}
@@ -133,6 +135,8 @@ void Repl_semi_sync_slave::kill_connection(MYSQL *mysql)
char kill_buffer[30];
MYSQL *kill_mysql = NULL;
+ size_t kill_buffer_length;
+
kill_mysql = mysql_init(kill_mysql);
mysql_options(kill_mysql, MYSQL_OPT_CONNECT_TIMEOUT, &m_kill_conn_timeout);
mysql_options(kill_mysql, MYSQL_OPT_READ_TIMEOUT, &m_kill_conn_timeout);
@@ -144,13 +148,35 @@ void Repl_semi_sync_slave::kill_connection(MYSQL *mysql)
{
sql_print_information("cannot connect to master to kill slave io_thread's "
"connection");
- mysql_close(kill_mysql);
- return;
+ goto failed_graceful_kill;
}
- size_t kill_buffer_length = my_snprintf(kill_buffer, 30, "KILL %lu",
- mysql->thread_id);
- mysql_real_query(kill_mysql, kill_buffer, (ulong)kill_buffer_length);
+
+ DBUG_EXECUTE_IF("slave_delay_killing_semisync_connection", my_sleep(400000););
+
+ kill_buffer_length= my_snprintf(kill_buffer, 30, "KILL %lu",
+ mysql->thread_id);
+ if (mysql_real_query(kill_mysql, kill_buffer, (ulong)kill_buffer_length))
+ {
+ sql_print_information(
+ "Failed to gracefully kill our active semi-sync connection with "
+ "primary. Silently closing the connection.");
+ goto failed_graceful_kill;
+ }
+
+end:
mysql_close(kill_mysql);
+ return;
+
+failed_graceful_kill:
+ /*
+ If we fail to issue `KILL` on the primary to kill the active semi-sync
+ connection; we need to locally clean up our side of the connection. This
+ is because mysql_close will send COM_QUIT on the active semi-sync
+ connection, causing the primary to error.
+ */
+ net_clear(&(mysql->net), 0);
+ end_server(mysql);
+ goto end;
}
int Repl_semi_sync_slave::request_transmit(Master_info *mi)
diff --git a/sql/semisync_slave.h b/sql/semisync_slave.h
index d65262f151d..35f93476792 100644
--- a/sql/semisync_slave.h
+++ b/sql/semisync_slave.h
@@ -23,6 +23,7 @@
#include "sql_priv.h"
#include "rpl_mi.h"
#include "mysql.h"
+#include <sql_common.h>
class Master_info;
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc
new file mode 100644
index 00000000000..fd2a5c301f2
--- /dev/null
+++ b/sql/service_wsrep.cc
@@ -0,0 +1,391 @@
+/* Copyright 2018-2021 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+#include "mariadb.h"
+
+#include "mysql/service_wsrep.h"
+#include "wsrep/key.hpp"
+#include "wsrep_thd.h"
+#include "wsrep_trans_observer.h"
+#include "sql_class.h"
+#include "debug_sync.h"
+#include "log.h"
+
+extern "C" my_bool wsrep_on(const THD *thd)
+{
+ return my_bool(WSREP(thd));
+}
+
+extern "C" void wsrep_thd_LOCK(const THD *thd)
+{
+ mysql_mutex_lock(&thd->LOCK_thd_kill);
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+}
+
+extern "C" void wsrep_thd_UNLOCK(const THD *thd)
+{
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ mysql_mutex_unlock(&thd->LOCK_thd_kill);
+}
+
+extern "C" void wsrep_thd_kill_LOCK(const THD *thd)
+{
+ mysql_mutex_lock(&thd->LOCK_thd_kill);
+}
+
+extern "C" void wsrep_thd_kill_UNLOCK(const THD *thd)
+{
+ mysql_mutex_unlock(&thd->LOCK_thd_kill);
+}
+
+extern "C" const char* wsrep_thd_client_state_str(const THD *thd)
+{
+ return wsrep::to_c_string(thd->wsrep_cs().state());
+}
+
+extern "C" const char* wsrep_thd_client_mode_str(const THD *thd)
+{
+ return wsrep::to_c_string(thd->wsrep_cs().mode());
+}
+
+extern "C" const char* wsrep_thd_transaction_state_str(const THD *thd)
+{
+ return wsrep::to_c_string(thd->wsrep_cs().transaction().state());
+}
+
+
+extern "C" const char *wsrep_thd_query(const THD *thd)
+{
+ if (thd)
+ {
+ switch(thd->lex->sql_command)
+ {
+ case SQLCOM_CREATE_USER:
+ return "CREATE USER";
+ case SQLCOM_GRANT:
+ return "GRANT";
+ case SQLCOM_REVOKE:
+ return "REVOKE";
+ case SQLCOM_SET_OPTION:
+ if (thd->lex->definer)
+ return "SET PASSWORD";
+ /* fallthrough */
+ default:
+ if (thd->query())
+ return thd->query();
+ }
+ }
+ return "NULL";
+}
+
+extern "C" query_id_t wsrep_thd_transaction_id(const THD *thd)
+{
+ return thd->wsrep_cs().transaction().id().get();
+}
+
+extern "C" long long wsrep_thd_trx_seqno(const THD *thd)
+{
+ const wsrep::client_state& cs= thd->wsrep_cs();
+ if (cs.mode() == wsrep::client_state::m_toi)
+ {
+ return cs.toi_meta().seqno().get();
+ }
+ else
+ {
+ return cs.transaction().ws_meta().seqno().get();
+ }
+}
+
+extern "C" void wsrep_thd_self_abort(THD *thd)
+{
+ thd->wsrep_cs().bf_abort(wsrep::seqno(0));
+}
+
+extern "C" const char* wsrep_get_sr_table_name()
+{
+ return wsrep_sr_table_name_full;
+}
+
+extern "C" my_bool wsrep_get_debug()
+{
+ return wsrep_debug;
+}
+
+/*
+ Test if this connection is a true local (user) connection and not
+ a replication or wsrep applier thread.
+
+ Note that this is only usable for galera (as there are other kinds
+ of system threads, and only if WSREP_NNULL() is tested by the caller.
+ */
+extern "C" my_bool wsrep_thd_is_local(const THD *thd)
+{
+ /*
+ async replication IO and background threads have nothing to
+ replicate in the cluster, marking them as non-local here to
+ prevent write set population and replication
+
+ async replication SQL thread, applies client transactions from
+ mariadb master and will be replicated into cluster
+ */
+ return (
+ thd->system_thread != SYSTEM_THREAD_SLAVE_BACKGROUND &&
+ thd->system_thread != SYSTEM_THREAD_SLAVE_IO &&
+ thd->wsrep_cs().mode() == wsrep::client_state::m_local);
+}
+
+extern "C" my_bool wsrep_thd_is_applying(const THD *thd)
+{
+ return thd->wsrep_cs().mode() == wsrep::client_state::m_high_priority;
+}
+
+extern "C" my_bool wsrep_thd_is_toi(const THD *thd)
+{
+ return thd->wsrep_cs().mode() == wsrep::client_state::m_toi;
+}
+
+extern "C" my_bool wsrep_thd_is_local_toi(const THD *thd)
+{
+ return thd->wsrep_cs().mode() == wsrep::client_state::m_toi &&
+ thd->wsrep_cs().toi_mode() == wsrep::client_state::m_local;
+
+}
+
+extern "C" my_bool wsrep_thd_is_in_rsu(const THD *thd)
+{
+ return thd->wsrep_cs().mode() == wsrep::client_state::m_rsu;
+}
+
+extern "C" my_bool wsrep_thd_is_BF(const THD *thd, my_bool sync)
+{
+ my_bool status = FALSE;
+ if (thd && WSREP(thd))
+ {
+ if (sync) mysql_mutex_lock(&thd->LOCK_thd_data);
+ status = (wsrep_thd_is_applying(thd) || wsrep_thd_is_toi(thd));
+ if (sync) mysql_mutex_unlock(&thd->LOCK_thd_data);
+ }
+ return status;
+}
+
+extern "C" my_bool wsrep_thd_is_SR(const THD *thd)
+{
+ return thd && thd->wsrep_cs().transaction().is_streaming();
+}
+
+extern "C" void wsrep_handle_SR_rollback(THD *bf_thd,
+ THD *victim_thd)
+{
+ DBUG_ASSERT(victim_thd);
+ DBUG_ASSERT(wsrep_thd_is_SR(victim_thd));
+ if (!victim_thd || !wsrep_on(bf_thd)) return;
+
+ wsrep_thd_LOCK(victim_thd);
+
+ WSREP_DEBUG("handle rollback, for deadlock: thd %llu trx_id %" PRIu64 " frags %zu conf %s",
+ victim_thd->thread_id,
+ victim_thd->wsrep_trx_id(),
+ victim_thd->wsrep_sr().fragments_certified(),
+ wsrep_thd_transaction_state_str(victim_thd));
+
+ /* Note: do not store/reset globals before wsrep_bf_abort() call
+ to avoid losing BF thd context. */
+ if (!(bf_thd && bf_thd != victim_thd))
+ {
+ DEBUG_SYNC(victim_thd, "wsrep_before_SR_rollback");
+ }
+ if (bf_thd)
+ {
+ wsrep_bf_abort(bf_thd, victim_thd);
+ }
+ else
+ {
+ wsrep_thd_self_abort(victim_thd);
+ }
+
+ wsrep_thd_UNLOCK(victim_thd);
+
+ if (bf_thd)
+ {
+ wsrep_store_threadvars(bf_thd);
+ }
+}
+
+extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd,
+ my_bool signal)
+{
+ mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
+ mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
+
+ DBUG_EXECUTE_IF("sync.before_wsrep_thd_abort",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL sync.before_wsrep_thd_abort_reached "
+ "WAIT_FOR signal.before_wsrep_thd_abort";
+ DBUG_ASSERT(!debug_sync_set_action(bf_thd,
+ STRING_WITH_LEN(act)));
+ };);
+
+ my_bool ret= wsrep_bf_abort(bf_thd, victim_thd);
+ /*
+ Send awake signal if victim was BF aborted or does not
+ have wsrep on. Note that this should never interrupt RSU
+ as RSU has paused the provider.
+ */
+ mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
+ mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
+
+ if ((ret || !wsrep_on(victim_thd)) && signal)
+ {
+ if (victim_thd->wsrep_aborter && victim_thd->wsrep_aborter != bf_thd->thread_id)
+ {
+ WSREP_DEBUG("victim is killed already by %llu, skipping awake",
+ victim_thd->wsrep_aborter);
+ wsrep_thd_UNLOCK(victim_thd);
+ return false;
+ }
+
+ victim_thd->wsrep_aborter= bf_thd->thread_id;
+ victim_thd->awake_no_mutex(KILL_QUERY);
+ }
+ else
+ WSREP_DEBUG("wsrep_thd_bf_abort skipped awake for %llu", thd_get_thread_id(victim_thd));
+
+ wsrep_thd_UNLOCK(victim_thd);
+ return ret;
+}
+
+extern "C" my_bool wsrep_thd_skip_locking(const THD *thd)
+{
+ return thd && thd->wsrep_skip_locking;
+}
+
+extern "C" my_bool wsrep_thd_order_before(const THD *left, const THD *right)
+{
+ if (wsrep_thd_trx_seqno(left) < wsrep_thd_trx_seqno(right)) {
+ WSREP_DEBUG("BF conflict, order: %lld %lld\n",
+ (long long)wsrep_thd_trx_seqno(left),
+ (long long)wsrep_thd_trx_seqno(right));
+ return TRUE;
+ }
+ WSREP_DEBUG("waiting for BF, trx order: %lld %lld\n",
+ (long long)wsrep_thd_trx_seqno(left),
+ (long long)wsrep_thd_trx_seqno(right));
+ return FALSE;
+}
+
+extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_THD thd)
+{
+ const wsrep::client_state& cs(thd->wsrep_cs());
+ const enum wsrep::transaction::state tx_state(cs.transaction().state());
+ switch (tx_state)
+ {
+ case wsrep::transaction::s_must_abort:
+ return (cs.state() == wsrep::client_state::s_exec ||
+ cs.state() == wsrep::client_state::s_result);
+ case wsrep::transaction::s_aborting:
+ case wsrep::transaction::s_aborted:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static inline enum wsrep::key::type
+map_key_type(enum Wsrep_service_key_type type)
+{
+ switch (type)
+ {
+ case WSREP_SERVICE_KEY_SHARED: return wsrep::key::shared;
+ case WSREP_SERVICE_KEY_REFERENCE: return wsrep::key::reference;
+ case WSREP_SERVICE_KEY_UPDATE: return wsrep::key::update;
+ case WSREP_SERVICE_KEY_EXCLUSIVE: return wsrep::key::exclusive;
+ }
+ return wsrep::key::exclusive;
+}
+
+extern "C" int wsrep_thd_append_key(THD *thd,
+ const struct wsrep_key* key,
+ int n_keys,
+ enum Wsrep_service_key_type key_type)
+{
+ Wsrep_client_state& client_state(thd->wsrep_cs());
+ DBUG_ASSERT(client_state.transaction().active());
+ int ret= 0;
+ for (int i= 0; i < n_keys && ret == 0; ++i)
+ {
+ wsrep::key wsrep_key(map_key_type(key_type));
+ for (size_t kp= 0; kp < key[i].key_parts_num; ++kp)
+ {
+ wsrep_key.append_key_part(key[i].key_parts[kp].ptr, key[i].key_parts[kp].len);
+ }
+ ret= client_state.append_key(wsrep_key);
+ }
+ return ret;
+}
+
+extern "C" void wsrep_commit_ordered(THD *thd)
+{
+ if (wsrep_is_active(thd) &&
+ thd->wsrep_trx().state() == wsrep::transaction::s_committing &&
+ !wsrep_commit_will_write_binlog(thd))
+ {
+ DEBUG_SYNC(thd, "before_wsrep_ordered_commit");
+ thd->wsrep_cs().ordered_commit();
+ }
+}
+
+extern "C" bool wsrep_thd_set_wsrep_aborter(THD *bf_thd, THD *victim_thd)
+{
+ WSREP_DEBUG("wsrep_thd_set_wsrep_aborter called");
+ mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
+ if (victim_thd->wsrep_aborter && victim_thd->wsrep_aborter != bf_thd->thread_id)
+ {
+ return true;
+ }
+ victim_thd->wsrep_aborter = bf_thd->thread_id;
+ return false;
+}
+
+extern "C" void wsrep_report_bf_lock_wait(const THD *thd,
+ unsigned long long trx_id)
+{
+ if (thd)
+ {
+ WSREP_ERROR("Thread %s trx_id: %llu thread: %ld "
+ "seqno: %lld client_state: %s client_mode: %s transaction_mode: %s "
+ "applier: %d toi: %d local: %d "
+ "query: %s",
+ wsrep_thd_is_BF(thd, false) ? "BF" : "normal",
+ trx_id,
+ thd_get_thread_id(thd),
+ wsrep_thd_trx_seqno(thd),
+ wsrep_thd_client_state_str(thd),
+ wsrep_thd_client_mode_str(thd),
+ wsrep_thd_transaction_state_str(thd),
+ wsrep_thd_is_applying(thd),
+ wsrep_thd_is_toi(thd),
+ wsrep_thd_is_local(thd),
+ wsrep_thd_query(thd));
+ }
+}
+
+extern "C" void wsrep_thd_set_PA_unsafe(THD *thd)
+{
+ if (thd && thd->wsrep_cs().mark_transaction_pa_unsafe())
+ {
+ WSREP_DEBUG("session does not have active transaction, can not mark as PA unsafe");
+ }
+}
diff --git a/sql/session_tracker.cc b/sql/session_tracker.cc
index 3ddece6039b..2f6c5e29bf2 100644
--- a/sql/session_tracker.cc
+++ b/sql/session_tracker.cc
@@ -389,10 +389,9 @@ bool Session_sysvars_tracker::update(THD *thd, set_var *var)
size_t length= 1;
void *copy= var->save_result.string_value.str ?
my_memdup(var->save_result.string_value.str,
- length= var->save_result.string_value.length + 1,
+ (length= var->save_result.string_value.length + 1),
MYF(MY_WME | MY_THREAD_SPECIFIC)) :
my_strdup("", MYF(MY_WME | MY_THREAD_SPECIFIC));
-
if (!copy)
return true;
@@ -745,7 +744,7 @@ bool Transaction_state_tracker::store(THD *thd, String *buf)
if ((thd->variables.session_track_transaction_info == TX_TRACK_CHISTICS) &&
(tx_changed & TX_CHG_CHISTICS))
{
- bool is_xa= (thd->transaction.xid_state.xa_state != XA_NOTR);
+ bool is_xa= thd->transaction.xid_state.is_explicit_XA();
size_t start;
/* 2 length by 1 byte and code */
@@ -922,7 +921,7 @@ bool Transaction_state_tracker::store(THD *thd, String *buf)
if ((tx_curr_state & TX_EXPLICIT) && is_xa)
{
- XID *xid= &thd->transaction.xid_state.xid;
+ XID *xid= thd->transaction.xid_state.get_xid();
long glen, blen;
buf->append(STRING_WITH_LEN("XA START"));
diff --git a/sql/set_var.cc b/sql/set_var.cc
index cc44dbe401b..b97bf0677f3 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -742,7 +742,7 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list, bool free)
err:
if (free)
- free_underlaid_joins(thd, &thd->lex->select_lex);
+ free_underlaid_joins(thd, thd->lex->first_select_lex());
DBUG_RETURN(error);
}
diff --git a/sql/set_var.h b/sql/set_var.h
index 1c02cdcc6e5..56de00221d8 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -275,6 +275,10 @@ public:
virtual int update(THD *thd)=0; /* To set the value */
virtual int light_check(THD *thd) { return check(thd); } /* for PS */
virtual bool is_system() { return FALSE; }
+ /**
+ @returns whether this variable is @@@@optimizer_trace.
+ */
+ virtual bool is_var_optimizer_trace() const { return false; }
};
@@ -317,6 +321,11 @@ public:
int check(THD *thd);
int update(THD *thd);
int light_check(THD *thd);
+ virtual bool is_var_optimizer_trace() const
+ {
+ extern sys_var *Sys_optimizer_trace_ptr;
+ return var == Sys_optimizer_trace_ptr;
+ }
};
diff --git a/sql/share/CMakeLists.txt b/sql/share/CMakeLists.txt
index 55f39e5e22b..ddb813057ab 100644
--- a/sql/share/CMakeLists.txt
+++ b/sql/share/CMakeLists.txt
@@ -15,30 +15,32 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
SET (dirs
+bulgarian
+chinese
+czech
danish
-german
-slovak
dutch
-greek
-norwegian
-spanish
english
+estonian
+french
+german
+greek
+hindi
hungarian
-norwegian-ny
-swedish
italian
-polish
-ukrainian
japanese
+korean
+norwegian-ny
+norwegian
+polish
portuguese
romanian
-estonian
-korean
russian
-czech
-french
serbian
-hindi
+slovak
+spanish
+swedish
+ukrainian
)
SET(files
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index aff9874edc2..42958986745 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -1,4 +1,4 @@
-languages czech=cze latin2, danish=dan latin1, dutch=nla latin1, english=eng latin1, estonian=est latin7, french=fre latin1, german=ger latin1, greek=greek greek, hungarian=hun latin2, italian=ita latin1, japanese=jpn ujis, korean=kor euckr, norwegian-ny=norwegian-ny latin1, norwegian=nor latin1, polish=pol latin2, portuguese=por latin1, romanian=rum latin2, russian=rus koi8r, serbian=serbian cp1250, slovak=slo latin2, spanish=spa latin1, swedish=swe latin1, ukrainian=ukr koi8u, bulgarian=bgn cp1251, hindi=hindi utf8;
+languages bulgarian=bgn cp1251, chinese=chi gbk, czech=cze latin2, danish=dan latin1, dutch=nla latin1, english=eng latin1, estonian=est latin7, french=fre latin1, german=ger latin1, greek=greek greek, hindi=hindi utf8, hungarian=hun latin2, italian=ita latin1, japanese=jpn ujis, korean=kor euckr, norwegian-ny=norwegian-ny latin1, norwegian=nor latin1, polish=pol latin2, portuguese=por latin1, romanian=rum latin2, russian=rus koi8r, serbian=serbian cp1250, slovak=slo latin2, spanish=spa latin1, swedish=swe latin1, ukrainian=ukr koi8u;
default-language eng
@@ -9,9 +9,9 @@ ER_HASHCHK
ER_NISAMCHK
eng "isamchk"
ER_NO
+ chi "ä¸"
cze "NE"
dan "NEJ"
- nla "NEE"
eng "NO"
est "EI"
fre "NON"
@@ -20,6 +20,7 @@ ER_NO
hindi "नहीं"
hun "NEM"
kor "아니오"
+ nla "NEE"
nor "NEI"
norwegian-ny "NEI"
pol "NIE"
@@ -30,9 +31,9 @@ ER_NO
slo "NIE"
ukr "ÐІ"
ER_YES
+ chi "是的"
cze "ANO"
dan "JA"
- nla "JA"
eng "YES"
est "JAH"
fre "OUI"
@@ -42,6 +43,7 @@ ER_YES
hun "IGEN"
ita "SI"
kor "예"
+ nla "JA"
nor "JA"
norwegian-ny "JA"
pol "TAK"
@@ -53,9 +55,9 @@ ER_YES
spa "SI"
ukr "ТÐК"
ER_CANT_CREATE_FILE
+ chi "无法创建文件'%-.200s'(错误å·ç ï¼š%M)"
cze "Nemohu vytvořit soubor '%-.200s' (chybový kód: %M)"
dan "Kan ikke oprette filen '%-.200s' (Fejlkode: %M)"
- nla "Kan file '%-.200s' niet aanmaken (Errcode: %M)"
eng "Can't create file '%-.200s' (errno: %M)"
est "Ei suuda luua faili '%-.200s' (veakood: %M)"
fre "Ne peut créer le fichier '%-.200s' (Errcode: %M)"
@@ -66,6 +68,7 @@ ER_CANT_CREATE_FILE
ita "Impossibile creare il file '%-.200s' (errno: %M)"
jpn "ファイル '%-.200s' を作æˆã§ãã¾ã›ã‚“。(エラー番å·: %M)"
kor "í™”ì¼ '%-.200s'를 만들지 못했습니다. (ì—러번호: %M)"
+ nla "Kan file '%-.200s' niet aanmaken (Errcode: %M)"
nor "Kan ikke opprette fila '%-.200s' (Feilkode: %M)"
norwegian-ny "Kan ikkje opprette fila '%-.200s' (Feilkode: %M)"
pol "Nie można stworzyć pliku '%-.200s' (Kod błędu: %M)"
@@ -78,11 +81,10 @@ ER_CANT_CREATE_FILE
swe "Kan inte skapa filen '%-.200s' (Felkod: %M)"
ukr "Ðе можу Ñтворити файл '%-.200s' (помилка: %M)"
ER_CANT_CREATE_TABLE
+ chi "无法创建表%`s.%`s(错误å·ç ï¼š%M)"
cze "Nemohu vytvořit tabulku %`s.%`s (chybový kód: %M)"
dan "Kan ikke oprette tabellen %`s.%`s (Fejlkode: %M)"
- nla "Kan tabel %`s.%`s niet aanmaken (Errcode: %M)"
eng "Can't create table %`s.%`s (errno: %M)"
- jps "%`s.%`s テーブルãŒä½œã‚Œã¾ã›ã‚“.(errno: %M)",
est "Ei suuda luua tabelit %`s.%`s (veakood: %M)"
fre "Ne peut créer la table %`s.%`s (Errcode: %M)"
ger "Kann Tabelle %`s.%`s nicht erzeugen (Fehler: %M)"
@@ -92,6 +94,7 @@ ER_CANT_CREATE_TABLE
ita "Impossibile creare la tabella %`s.%`s (errno: %M)"
jpn "%`s.%`s テーブルãŒä½œã‚Œã¾ã›ã‚“.(errno: %M)"
kor "í…Œì´ë¸” %`s.%`s를 만들지 못했습니다. (ì—러번호: %M)"
+ nla "Kan tabel %`s.%`s niet aanmaken (Errcode: %M)"
nor "Kan ikke opprette tabellen %`s.%`s (Feilkode: %M)"
norwegian-ny "Kan ikkje opprette tabellen %`s.%`s (Feilkode: %M)"
pol "Nie można stworzyć tabeli %`s.%`s (Kod błędu: %M)"
@@ -104,9 +107,9 @@ ER_CANT_CREATE_TABLE
swe "Kan inte skapa tabellen %`s.%`s (Felkod: %M)"
ukr "Ðе можу Ñтворити таблицю %`s.%`s (помилка: %M)"
ER_CANT_CREATE_DB
+ chi "无法创建数æ®åº“'%-.192s'(错误å·ç ï¼š%M)"
cze "Nemohu vytvořit databázi '%-.192s' (chybový kód: %M)"
dan "Kan ikke oprette databasen '%-.192s' (Fejlkode: %M)"
- nla "Kan database '%-.192s' niet aanmaken (Errcode: %M)"
eng "Can't create database '%-.192s' (errno: %M)"
est "Ei suuda luua andmebaasi '%-.192s' (veakood: %M)"
fre "Ne peut créer la base '%-.192s' (Erreur %M)"
@@ -117,6 +120,7 @@ ER_CANT_CREATE_DB
ita "Impossibile creare il database '%-.192s' (errno: %M)"
jpn "データベース '%-.192s' を作æˆã§ãã¾ã›ã‚“。(エラー番å·: %M)"
kor "ë°ì´íƒ€ë² ì´ìŠ¤ '%-.192s'를 만들지 못했습니다.. (ì—러번호: %M)"
+ nla "Kan database '%-.192s' niet aanmaken (Errcode: %M)"
nor "Kan ikke opprette databasen '%-.192s' (Feilkode: %M)"
norwegian-ny "Kan ikkje opprette databasen '%-.192s' (Feilkode: %M)"
pol "Nie można stworzyć bazy danych '%-.192s' (Kod błędu: %M)"
@@ -129,9 +133,9 @@ ER_CANT_CREATE_DB
swe "Kan inte skapa databasen '%-.192s' (Felkod: %M)"
ukr "Ðе можу Ñтворити базу данних '%-.192s' (помилка: %M)"
ER_DB_CREATE_EXISTS
+ chi "无法创建数æ®åº“'%-.192s';å·²ç»å­˜åœ¨"
cze "Nemohu vytvořit databázi '%-.192s'; databáze již existuje"
dan "Kan ikke oprette databasen '%-.192s'; databasen eksisterer"
- nla "Kan database '%-.192s' niet aanmaken; database bestaat reeds"
eng "Can't create database '%-.192s'; database exists"
est "Ei suuda luua andmebaasi '%-.192s': andmebaas juba eksisteerib"
fre "Ne peut créer la base '%-.192s'; elle existe déjà"
@@ -142,6 +146,7 @@ ER_DB_CREATE_EXISTS
ita "Impossibile creare il database '%-.192s'; il database esiste"
jpn "データベース '%-.192s' を作æˆã§ãã¾ã›ã‚“。データベースã¯ã™ã§ã«å­˜åœ¨ã—ã¾ã™ã€‚"
kor "ë°ì´íƒ€ë² ì´ìŠ¤ '%-.192s'를 만들지 못했습니다.. ë°ì´íƒ€ë² ì´ìŠ¤ê°€ 존재함"
+ nla "Kan database '%-.192s' niet aanmaken; database bestaat reeds"
nor "Kan ikke opprette databasen '%-.192s'; databasen eksisterer"
norwegian-ny "Kan ikkje opprette databasen '%-.192s'; databasen eksisterer"
pol "Nie można stworzyć bazy danych '%-.192s'; baza danych już istnieje"
@@ -154,9 +159,9 @@ ER_DB_CREATE_EXISTS
swe "Databasen '%-.192s' existerar redan"
ukr "Ðе можу Ñтворити базу данних '%-.192s'. База данних Ñ–Ñнує"
ER_DB_DROP_EXISTS
+ chi "无法删除数æ®åº“'%-.192s';æ•°æ®åº“ä¸å­˜åœ¨"
cze "Nemohu zrušit databázi '%-.192s', databáze neexistuje"
dan "Kan ikke slette (droppe) '%-.192s'; databasen eksisterer ikke"
- nla "Kan database '%-.192s' niet verwijderen; database bestaat niet"
eng "Can't drop database '%-.192s'; database doesn't exist"
est "Ei suuda kustutada andmebaasi '%-.192s': andmebaasi ei eksisteeri"
fre "Ne peut effacer la base '%-.192s'; elle n'existe pas"
@@ -167,6 +172,7 @@ ER_DB_DROP_EXISTS
ita "Impossibile cancellare '%-.192s'; il database non esiste"
jpn "データベース '%-.192s' を削除ã§ãã¾ã›ã‚“。データベースã¯å­˜åœ¨ã—ã¾ã›ã‚“。"
kor "ë°ì´íƒ€ë² ì´ìŠ¤ '%-.192s'를 제거하지 못했습니다. ë°ì´íƒ€ë² ì´ìŠ¤ê°€ 존재하지 ì•ŠìŒ "
+ nla "Kan database '%-.192s' niet verwijderen; database bestaat niet"
nor "Kan ikke fjerne (drop) '%-.192s'; databasen eksisterer ikke"
norwegian-ny "Kan ikkje fjerne (drop) '%-.192s'; databasen eksisterer ikkje"
pol "Nie można usun?ć bazy danych '%-.192s'; baza danych nie istnieje"
@@ -179,9 +185,9 @@ ER_DB_DROP_EXISTS
swe "Kan inte radera databasen '%-.192s'; databasen finns inte"
ukr "Ðе можу видалити базу данних '%-.192s'. База данних не Ñ–Ñнує"
ER_DB_DROP_DELETE
+ chi "删除数æ®åº“错误(无法删除'%-.192s',错误å·ç ï¼š%M)"
cze "Chyba při rušení databáze (nemohu vymazat '%-.192s', chyba %M)"
dan "Fejl ved sletning (drop) af databasen (kan ikke slette '%-.192s', Fejlkode %M)"
- nla "Fout bij verwijderen database (kan '%-.192s' niet verwijderen, Errcode: %M)"
eng "Error dropping database (can't delete '%-.192s', errno: %M)"
est "Viga andmebaasi kustutamisel (ei suuda kustutada faili '%-.192s', veakood: %M)"
fre "Ne peut effacer la base '%-.192s' (erreur %M)"
@@ -192,6 +198,7 @@ ER_DB_DROP_DELETE
ita "Errore durante la cancellazione del database (impossibile cancellare '%-.192s', errno: %M)"
jpn "データベース削除エラー ('%-.192s' を削除ã§ãã¾ã›ã‚“。エラー番å·: %M)"
kor "ë°ì´íƒ€ë² ì´ìŠ¤ 제거 ì—러('%-.192s'를 삭제할 수 없습니다, ì—러번호: %M)"
+ nla "Fout bij verwijderen database (kan '%-.192s' niet verwijderen, Errcode: %M)"
nor "Feil ved fjerning (drop) av databasen (kan ikke slette '%-.192s', feil %M)"
norwegian-ny "Feil ved fjerning (drop) av databasen (kan ikkje slette '%-.192s', feil %M)"
pol "Bł?d podczas usuwania bazy danych (nie można usun?ć '%-.192s', bł?d %M)"
@@ -204,9 +211,9 @@ ER_DB_DROP_DELETE
swe "Fel vid radering av databasen (Kan inte radera '%-.192s'. Felkod: %M)"
ukr "Ðе можу видалити базу данних (Ðе можу видалити '%-.192s', помилка: %M)"
ER_DB_DROP_RMDIR
+ chi "删除数æ®åº“错误(无法rmdir '%-.192s',错误å·ç ï¼š%M)"
cze "Chyba při rušení databáze (nemohu vymazat adresář '%-.192s', chyba %M)"
dan "Fejl ved sletting af database (kan ikke slette folderen '%-.192s', Fejlkode %M)"
- nla "Fout bij verwijderen database (kan rmdir '%-.192s' niet uitvoeren, Errcode: %M)"
eng "Error dropping database (can't rmdir '%-.192s', errno: %M)"
est "Viga andmebaasi kustutamisel (ei suuda kustutada kataloogi '%-.192s', veakood: %M)"
fre "Erreur en effaçant la base (rmdir '%-.192s', erreur %M)"
@@ -215,8 +222,9 @@ ER_DB_DROP_RMDIR
hindi "डेटाबेस डà¥à¤°à¥‰à¤ª में तà¥à¤°à¥à¤Ÿà¤¿ हà¥à¤ˆ ('%-.192s' rmdir नहीं कर सकते, errno: %M)"
hun "Adatbazis megszuntetesi hiba ('%-.192s' nem szuntetheto meg, hibakod: %M)"
ita "Errore durante la cancellazione del database (impossibile rmdir '%-.192s', errno: %M)"
- jpn "データベース削除エラー (ディレクトリ '%-.192s' を削除ã§ãã¾ã›ã‚“。エラー番å·: %M)"
+ jpn "データベース削除エラー (ディレクトリ '%-.192s' を削除ã§ãã¾ã›ã‚“。エラー番å·: %M)"
kor "ë°ì´íƒ€ë² ì´ìŠ¤ 제거 ì—러(rmdir '%-.192s'를 í•  수 없습니다, ì—러번호: %M)"
+ nla "Fout bij verwijderen database (kan rmdir '%-.192s' niet uitvoeren, Errcode: %M)"
nor "Feil ved sletting av database (kan ikke slette katalogen '%-.192s', feil %M)"
norwegian-ny "Feil ved sletting av database (kan ikkje slette katalogen '%-.192s', feil %M)"
pol "Bł?d podczas usuwania bazy danych (nie można wykonać rmdir '%-.192s', bł?d %M)"
@@ -229,9 +237,9 @@ ER_DB_DROP_RMDIR
swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.192s'. Felkod: %M)"
ukr "Ðе можу видалити базу данних (Ðе можу видалити теку '%-.192s', помилка: %M)"
ER_CANT_DELETE_FILE
+ chi "删除'%-.192s'出错(错误å·ç ï¼š%M)"
cze "Chyba při výmazu '%-.192s' (chybový kód: %M)"
dan "Fejl ved sletning af '%-.192s' (Fejlkode: %M)"
- nla "Fout bij het verwijderen van '%-.192s' (Errcode: %M)"
eng "Error on delete of '%-.192s' (errno: %M)"
est "Viga '%-.192s' kustutamisel (veakood: %M)"
fre "Erreur en effaçant '%-.192s' (Errcode: %M)"
@@ -240,8 +248,9 @@ ER_CANT_DELETE_FILE
hindi "'%-.192s' के हटाने पर तà¥à¤°à¥à¤Ÿà¤¿ हà¥à¤ˆ (errno: %M)"
hun "Torlesi hiba: '%-.192s' (hibakod: %M)"
ita "Errore durante la cancellazione di '%-.192s' (errno: %M)"
- jpn "ファイル '%-.192s' ã®å‰Šé™¤ã‚¨ãƒ©ãƒ¼ (エラー番å·: %M)"
+ jpn "ファイル '%-.192s' ã®å‰Šé™¤ã‚¨ãƒ©ãƒ¼ (エラー番å·: %M)"
kor "'%-.192s' ì‚­ì œ 중 ì—러 (ì—러번호: %M)"
+ nla "Fout bij het verwijderen van '%-.192s' (Errcode: %M)"
nor "Feil ved sletting av '%-.192s' (Feilkode: %M)"
norwegian-ny "Feil ved sletting av '%-.192s' (Feilkode: %M)"
pol "Bł?d podczas usuwania '%-.192s' (Kod błędu: %M)"
@@ -254,9 +263,9 @@ ER_CANT_DELETE_FILE
swe "Kan inte radera filen '%-.192s' (Felkod: %M)"
ukr "Ðе можу видалити '%-.192s' (помилка: %M)"
ER_CANT_FIND_SYSTEM_REC
+ chi "无法在系统表中读å–记录"
cze "Nemohu Äíst záznam v systémové tabulce"
dan "Kan ikke læse posten i systemfolderen"
- nla "Kan record niet lezen in de systeem tabel"
eng "Can't read record in system table"
est "Ei suuda lugeda kirjet süsteemsest tabelist"
fre "Ne peut lire un enregistrement de la table 'system'"
@@ -267,6 +276,7 @@ ER_CANT_FIND_SYSTEM_REC
ita "Impossibile leggere il record dalla tabella di sistema"
jpn "システム表ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’読ã¿è¾¼ã‚ã¾ã›ã‚“。"
kor "system í…Œì´ë¸”ì—ì„œ 레코드를 ì½ì„ 수 없습니다."
+ nla "Kan record niet lezen in de systeem tabel"
nor "Kan ikke lese posten i systemkatalogen"
norwegian-ny "Kan ikkje lese posten i systemkatalogen"
pol "Nie można odczytać rekordu z tabeli systemowej"
@@ -279,9 +289,9 @@ ER_CANT_FIND_SYSTEM_REC
swe "Hittar inte posten i systemregistret"
ukr "Ðе можу зчитати Ð·Ð°Ð¿Ð¸Ñ Ð· ÑиÑтемної таблиці"
ER_CANT_GET_STAT
+ chi "无法获得'%-.200s'的状æ€ï¼ˆé”™è¯¯å·ç ï¼š%M)"
cze "Nemohu získat stav '%-.200s' (chybový kód: %M)"
dan "Kan ikke læse status af '%-.200s' (Fejlkode: %M)"
- nla "Kan de status niet krijgen van '%-.200s' (Errcode: %M)"
eng "Can't get status of '%-.200s' (errno: %M)"
est "Ei suuda lugeda '%-.200s' olekut (veakood: %M)"
fre "Ne peut obtenir le status de '%-.200s' (Errcode: %M)"
@@ -292,6 +302,7 @@ ER_CANT_GET_STAT
ita "Impossibile leggere lo stato di '%-.200s' (errno: %M)"
jpn "'%-.200s' ã®çŠ¶æ…‹ã‚’å–å¾—ã§ãã¾ã›ã‚“。(エラー番å·: %M)"
kor "'%-.200s'ì˜ ìƒíƒœë¥¼ 얻지 못했습니다. (ì—러번호: %M)"
+ nla "Kan de status niet krijgen van '%-.200s' (Errcode: %M)"
nor "Kan ikke lese statusen til '%-.200s' (Feilkode: %M)"
norwegian-ny "Kan ikkje lese statusen til '%-.200s' (Feilkode: %M)"
pol "Nie można otrzymać statusu '%-.200s' (Kod błędu: %M)"
@@ -304,9 +315,9 @@ ER_CANT_GET_STAT
swe "Kan inte läsa filinformationen (stat) från '%-.200s' (Felkod: %M)"
ukr "Ðе можу отримати ÑÑ‚Ð°Ñ‚ÑƒÑ '%-.200s' (помилка: %M)"
ER_CANT_GET_WD
+ chi "无法获å–工作目录(错误å·ç ï¼š%M)"
cze "Chyba při zjišťování pracovní adresář (chybový kód: %M)"
dan "Kan ikke læse aktive folder (Fejlkode: %M)"
- nla "Kan de werkdirectory niet krijgen (Errcode: %M)"
eng "Can't get working directory (errno: %M)"
est "Ei suuda identifitseerida jooksvat kataloogi (veakood: %M)"
fre "Ne peut obtenir le répertoire de travail (Errcode: %M)"
@@ -317,6 +328,7 @@ ER_CANT_GET_WD
ita "Impossibile leggere la directory di lavoro (errno: %M)"
jpn "作業ディレクトリをå–å¾—ã§ãã¾ã›ã‚“。(エラー番å·: %M)"
kor "수행 디렉토리를 찾지 못했습니다. (ì—러번호: %M)"
+ nla "Kan de werkdirectory niet krijgen (Errcode: %M)"
nor "Kan ikke lese aktiv katalog(Feilkode: %M)"
norwegian-ny "Kan ikkje lese aktiv katalog(Feilkode: %M)"
pol "Nie można rozpoznać aktualnego katalogu (Kod błędu: %M)"
@@ -329,9 +341,9 @@ ER_CANT_GET_WD
swe "Kan inte inte läsa aktivt bibliotek. (Felkod: %M)"
ukr "Ðе можу визначити робочу теку (помилка: %M)"
ER_CANT_LOCK
+ chi "无法é”定文件(错误å·ç ï¼š%M)"
cze "Nemohu uzamknout soubor (chybový kód: %M)"
dan "Kan ikke låse fil (Fejlkode: %M)"
- nla "Kan de file niet blokeren (Errcode: %M)"
eng "Can't lock file (errno: %M)"
est "Ei suuda lukustada faili (veakood: %M)"
fre "Ne peut verrouiller le fichier (Errcode: %M)"
@@ -342,6 +354,7 @@ ER_CANT_LOCK
ita "Impossibile il locking il file (errno: %M)"
jpn "ファイルをロックã§ãã¾ã›ã‚“。(エラー番å·: %M)"
kor "í™”ì¼ì„ 잠그지(lock) 못했습니다. (ì—러번호: %M)"
+ nla "Kan de file niet blokeren (Errcode: %M)"
nor "Kan ikke låse fila (Feilkode: %M)"
norwegian-ny "Kan ikkje låse fila (Feilkode: %M)"
pol "Nie można zablokować pliku (Kod błędu: %M)"
@@ -354,9 +367,9 @@ ER_CANT_LOCK
swe "Kan inte låsa filen. (Felkod: %M)"
ukr "Ðе можу заблокувати файл (помилка: %M)"
ER_CANT_OPEN_FILE
- cze "Nemohu otevřít soubor '%-.200s' (chybový kód: %M)"
+ chi "无法打开文件:'%-.200s'(错误å·ç ï¼š%M)"
+ cze "Nemohu otevřít soubor '%-.200s' (chybový kód: %M)"
dan "Kan ikke åbne fil: '%-.200s' (Fejlkode: %M)"
- nla "Kan de file '%-.200s' niet openen (Errcode: %M)"
eng "Can't open file: '%-.200s' (errno: %M)"
est "Ei suuda avada faili '%-.200s' (veakood: %M)"
fre "Ne peut ouvrir le fichier: '%-.200s' (Errcode: %M)"
@@ -367,6 +380,7 @@ ER_CANT_OPEN_FILE
ita "Impossibile aprire il file: '%-.200s' (errno: %M)"
jpn "ファイル '%-.200s' をオープンã§ãã¾ã›ã‚“。(エラー番å·: %M)"
kor "í™”ì¼ì„ 열지 못했습니다.: '%-.200s' (ì—러번호: %M)"
+ nla "Kan de file '%-.200s' niet openen (Errcode: %M)"
nor "Kan ikke åpne fila: '%-.200s' (Feilkode: %M)"
norwegian-ny "Kan ikkje åpne fila: '%-.200s' (Feilkode: %M)"
pol "Nie można otworzyć pliku: '%-.200s' (Kod błędu: %M)"
@@ -379,9 +393,9 @@ ER_CANT_OPEN_FILE
swe "Kan inte använda '%-.200s' (Felkod: %M)"
ukr "Ðе можу відкрити файл: '%-.200s' (помилка: %M)"
ER_FILE_NOT_FOUND
+ chi "找ä¸åˆ°æ–‡ä»¶ï¼š'%-.200s'(错误å·ç ï¼š%M)"
cze "Nemohu najít soubor '%-.200s' (chybový kód: %M)"
dan "Kan ikke finde fila: '%-.200s' (Fejlkode: %M)"
- nla "Kan de file: '%-.200s' niet vinden (Errcode: %M)"
eng "Can't find file: '%-.200s' (errno: %M)"
est "Ei suuda leida faili '%-.200s' (veakood: %M)"
fre "Ne peut trouver le fichier: '%-.200s' (Errcode: %M)"
@@ -392,6 +406,7 @@ ER_FILE_NOT_FOUND
ita "Impossibile trovare il file: '%-.200s' (errno: %M)"
jpn "ファイル '%-.200s' ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。(エラー番å·: %M)"
kor "í™”ì¼ì„ 찾지 못했습니다.: '%-.200s' (ì—러번호: %M)"
+ nla "Kan de file: '%-.200s' niet vinden (Errcode: %M)"
nor "Kan ikke finne fila: '%-.200s' (Feilkode: %M)"
norwegian-ny "Kan ikkje finne fila: '%-.200s' (Feilkode: %M)"
pol "Nie można znaleĽć pliku: '%-.200s' (Kod błędu: %M)"
@@ -404,9 +419,9 @@ ER_FILE_NOT_FOUND
swe "Hittar inte filen '%-.200s' (Felkod: %M)"
ukr "Ðе можу знайти файл: '%-.200s' (помилка: %M)"
ER_CANT_READ_DIR
+ chi "无法读å–'%-.192s'的文件夹(错误å·ç ï¼š%M)"
cze "Nemohu Äíst adresář '%-.192s' (chybový kód: %M)"
dan "Kan ikke læse folder '%-.192s' (Fejlkode: %M)"
- nla "Kan de directory niet lezen van '%-.192s' (Errcode: %M)"
eng "Can't read dir of '%-.192s' (errno: %M)"
est "Ei suuda lugeda kataloogi '%-.192s' (veakood: %M)"
fre "Ne peut lire le répertoire de '%-.192s' (Errcode: %M)"
@@ -417,6 +432,7 @@ ER_CANT_READ_DIR
ita "Impossibile leggere la directory di '%-.192s' (errno: %M)"
jpn "ディレクトリ '%-.192s' を読ã¿è¾¼ã‚ã¾ã›ã‚“。(エラー番å·: %M)"
kor "'%-.192s'디렉토리를 ì½ì§€ 못했습니다. (ì—러번호: %M)"
+ nla "Kan de directory niet lezen van '%-.192s' (Errcode: %M)"
nor "Kan ikke lese katalogen '%-.192s' (Feilkode: %M)"
norwegian-ny "Kan ikkje lese katalogen '%-.192s' (Feilkode: %M)"
pol "Nie można odczytać katalogu '%-.192s' (Kod błędu: %M)"
@@ -429,9 +445,9 @@ ER_CANT_READ_DIR
swe "Kan inte läsa från bibliotek '%-.192s' (Felkod: %M)"
ukr "Ðе можу прочитати теку '%-.192s' (помилка: %M)"
ER_CANT_SET_WD
- cze "Nemohu změnit adresář na '%-.192s' (chybový kód: %M)"
+ chi "无法将dir更改为'%-.192s'(错误å·ç ï¼š%M)"
+ cze "Nemohu změnit adresář na '%-.192s' (chybový kód: %M)"
dan "Kan ikke skifte folder til '%-.192s' (Fejlkode: %M)"
- nla "Kan de directory niet veranderen naar '%-.192s' (Errcode: %M)"
eng "Can't change dir to '%-.192s' (errno: %M)"
est "Ei suuda siseneda kataloogi '%-.192s' (veakood: %M)"
fre "Ne peut changer le répertoire pour '%-.192s' (Errcode: %M)"
@@ -442,6 +458,7 @@ ER_CANT_SET_WD
ita "Impossibile cambiare la directory in '%-.192s' (errno: %M)"
jpn "ディレクトリ '%-.192s' ã«ç§»å‹•ã§ãã¾ã›ã‚“。(エラー番å·: %M)"
kor "'%-.192s'디렉토리로 ì´ë™í•  수 없었습니다. (ì—러번호: %M)"
+ nla "Kan de directory niet veranderen naar '%-.192s' (Errcode: %M)"
nor "Kan ikke skifte katalog til '%-.192s' (Feilkode: %M)"
norwegian-ny "Kan ikkje skifte katalog til '%-.192s' (Feilkode: %M)"
pol "Nie można zmienić katalogu na '%-.192s' (Kod błędu: %M)"
@@ -454,9 +471,9 @@ ER_CANT_SET_WD
swe "Kan inte byta till '%-.192s' (Felkod: %M)"
ukr "Ðе можу перейти у теку '%-.192s' (помилка: %M)"
ER_CHECKREAD
+ chi "这个表自上次读åŽæ•°æ®æœ‰å˜åŒ–'%-.192s'"
cze "Záznam byl zmÄ›nÄ›n od posledního Ätení v tabulce '%-.192s'"
dan "Posten er ændret siden sidste læsning '%-.192s'"
- nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.192s'"
eng "Record has changed since last read in table '%-.192s'"
est "Kirje tabelis '%-.192s' on muutunud viimasest lugemisest saadik"
fre "Enregistrement modifié depuis sa dernière lecture dans la table '%-.192s'"
@@ -467,6 +484,7 @@ ER_CHECKREAD
ita "Il record e` cambiato dall'ultima lettura della tabella '%-.192s'"
jpn "表 '%-.192s' ã®æœ€å¾Œã®èª­ã¿è¾¼ã¿æ™‚点ã‹ã‚‰ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå¤‰åŒ–ã—ã¾ã—ãŸã€‚"
kor "í…Œì´ë¸” '%-.192s'ì—ì„œ 마지막으로 ì½ì€ 후 Recordê°€ 변경ë˜ì—ˆìŠµë‹ˆë‹¤."
+ nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.192s'"
nor "Posten har blitt endret siden den ble lest '%-.192s'"
norwegian-ny "Posten har vorte endra sidan den sist vart lesen '%-.192s'"
pol "Rekord został zmieniony od ostaniego odczytania z tabeli '%-.192s'"
@@ -479,9 +497,9 @@ ER_CHECKREAD
swe "Posten har förändrats sedan den lästes i register '%-.192s'"
ukr "Ð—Ð°Ð¿Ð¸Ñ Ð±ÑƒÐ»Ð¾ змінено з чаÑу оÑтаннього Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð· таблиці '%-.192s'"
ER_DISK_FULL
+ chi "ç£ç›˜å·²æ»¡(%s);等待释放一些空间...(错误å·ç ï¼š%M)"
cze "Disk je plný (%s), Äekám na uvolnÄ›ní nÄ›jakého místa ... (chybový kód: %M)"
dan "Ikke mere diskplads (%s). Venter på at få frigjort plads... (Fejlkode: %M)"
- nla "Schijf vol (%s). Aan het wachten totdat er ruimte vrij wordt gemaakt... (Errcode: %M)"
eng "Disk full (%s); waiting for someone to free some space... (errno: %M)"
est "Ketas täis (%s). Ootame kuni tekib vaba ruumi... (veakood: %M)"
fre "Disque plein (%s). J'attend que quelqu'un libère de l'espace... (Errcode: %M)"
@@ -492,6 +510,7 @@ ER_DISK_FULL
ita "Disco pieno (%s). In attesa che qualcuno liberi un po' di spazio... (errno: %M)"
jpn "ディスク領域ä¸è¶³ã§ã™(%s)。(エラー番å·: %M)"
kor "Disk full (%s). 다른 ì‚¬ëžŒì´ ì§€ìš¸ë•Œê¹Œì§€ 기다립니다... (ì—러번호: %M)"
+ nla "Schijf vol (%s). Aan het wachten totdat er ruimte vrij wordt gemaakt... (Errcode: %M)"
nor "Ikke mer diskplass (%s). Venter på å få frigjort plass... (Feilkode: %M)"
norwegian-ny "Ikkje meir diskplass (%s). Ventar på å få frigjort plass... (Feilkode: %M)"
pol "Dysk pełny (%s). Oczekiwanie na zwolnienie miejsca... (Kod błędu: %M)"
@@ -504,9 +523,9 @@ ER_DISK_FULL
swe "Disken är full (%s). Väntar tills det finns ledigt utrymme... (Felkod: %M)"
ukr "ДиÑк заповнений (%s). Вичикую, доки звільнитьÑÑ Ñ‚Ñ€Ð¾Ñ…Ð¸ міÑцÑ... (помилка: %M)"
ER_DUP_KEY 23000
+ chi "ä¸èƒ½å†™;表'%-.192s'中有é‡å¤ç´¢å¼•"
cze "Nemohu zapsat, zdvojený klÃ­Ä v tabulce '%-.192s'"
dan "Kan ikke skrive, flere ens nøgler i tabellen '%-.192s'"
- nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.192s'"
eng "Can't write; duplicate key in table '%-.192s'"
est "Ei saa kirjutada, korduv võti tabelis '%-.192s'"
fre "Ecriture impossible, doublon dans une clé de la table '%-.192s'"
@@ -517,6 +536,7 @@ ER_DUP_KEY 23000
ita "Scrittura impossibile: chiave duplicata nella tabella '%-.192s'"
jpn "書ãè¾¼ã‚ã¾ã›ã‚“。表 '%-.192s' ã«é‡è¤‡ã™ã‚‹ã‚­ãƒ¼ãŒã‚ã‚Šã¾ã™ã€‚"
kor "기ë¡í•  수 없습니다., í…Œì´ë¸” '%-.192s'ì—ì„œ 중복 키"
+ nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.192s'"
nor "Kan ikke skrive, flere like nøkler i tabellen '%-.192s'"
norwegian-ny "Kan ikkje skrive, flere like nyklar i tabellen '%-.192s'"
pol "Nie można zapisać, powtórzone klucze w tabeli '%-.192s'"
@@ -529,9 +549,9 @@ ER_DUP_KEY 23000
swe "Kan inte skriva, dubbel söknyckel i register '%-.192s'"
ukr "Ðе можу запиÑати, дублюючийÑÑ ÐºÐ»ÑŽÑ‡ в таблиці '%-.192s'"
ER_ERROR_ON_CLOSE
- cze "Chyba při zavírání '%-.192s' (chybový kód: %M)"
+ chi "'%-.192s'关闭时出错(错误å·ç ï¼š%M)"
+ cze "Chyba při zavírání '%-.192s' (chybový kód: %M)"
dan "Fejl ved lukning af '%-.192s' (Fejlkode: %M)"
- nla "Fout bij het sluiten van '%-.192s' (Errcode: %M)"
eng "Error on close of '%-.192s' (errno: %M)"
est "Viga faili '%-.192s' sulgemisel (veakood: %M)"
fre "Erreur a la fermeture de '%-.192s' (Errcode: %M)"
@@ -542,6 +562,7 @@ ER_ERROR_ON_CLOSE
ita "Errore durante la chiusura di '%-.192s' (errno: %M)"
jpn "'%-.192s' ã®ã‚¯ãƒ­ãƒ¼ã‚ºæ™‚エラー (エラー番å·: %M)"
kor "'%-.192s'닫는 중 ì—러 (ì—러번호: %M)"
+ nla "Fout bij het sluiten van '%-.192s' (Errcode: %M)"
nor "Feil ved lukking av '%-.192s' (Feilkode: %M)"
norwegian-ny "Feil ved lukking av '%-.192s' (Feilkode: %M)"
pol "Bł?d podczas zamykania '%-.192s' (Kod błędu: %M)"
@@ -554,9 +575,9 @@ ER_ERROR_ON_CLOSE
swe "Fick fel vid stängning av '%-.192s' (Felkod: %M)"
ukr "Ðе можу закрити '%-.192s' (помилка: %M)"
ER_ERROR_ON_READ
+ chi "读å–文件'%-.200s'错误(错误å·ç ï¼š%M)"
cze "Chyba pÅ™i Ätení souboru '%-.200s' (chybový kód: %M)"
dan "Fejl ved læsning af '%-.200s' (Fejlkode: %M)"
- nla "Fout bij het lezen van file '%-.200s' (Errcode: %M)"
eng "Error reading file '%-.200s' (errno: %M)"
est "Viga faili '%-.200s' lugemisel (veakood: %M)"
fre "Erreur en lecture du fichier '%-.200s' (Errcode: %M)"
@@ -567,6 +588,7 @@ ER_ERROR_ON_READ
ita "Errore durante la lettura del file '%-.200s' (errno: %M)"
jpn "ファイル '%-.200s' ã®èª­ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (エラー番å·: %M)"
kor "'%-.200s'í™”ì¼ ì½ê¸° ì—러 (ì—러번호: %M)"
+ nla "Fout bij het lezen van file '%-.200s' (Errcode: %M)"
nor "Feil ved lesing av '%-.200s' (Feilkode: %M)"
norwegian-ny "Feil ved lesing av '%-.200s' (Feilkode: %M)"
pol "Bł?d podczas odczytu pliku '%-.200s' (Kod błędu: %M)"
@@ -579,9 +601,9 @@ ER_ERROR_ON_READ
swe "Fick fel vid läsning av '%-.200s' (Felkod %M)"
ukr "Ðе можу прочитати файл '%-.200s' (помилка: %M)"
ER_ERROR_ON_RENAME
+ chi "é‡å‘½å'%-.210s'到'%-.210s'错误(错误å·ç ï¼š%M)"
cze "Chyba při přejmenování '%-.210s' na '%-.210s' (chybový kód: %M)"
dan "Fejl ved omdøbning af '%-.210s' til '%-.210s' (Fejlkode: %M)"
- nla "Fout bij het hernoemen van '%-.210s' naar '%-.210s' (Errcode: %M)"
eng "Error on rename of '%-.210s' to '%-.210s' (errno: %M)"
est "Viga faili '%-.210s' ümbernimetamisel '%-.210s'-ks (veakood: %M)"
fre "Erreur en renommant '%-.210s' en '%-.210s' (Errcode: %M)"
@@ -592,6 +614,7 @@ ER_ERROR_ON_RENAME
ita "Errore durante la rinominazione da '%-.210s' a '%-.210s' (errno: %M)"
jpn "'%-.210s' ã®åå‰ã‚’ '%-.210s' ã«å¤‰æ›´ã§ãã¾ã›ã‚“ (エラー番å·: %M)"
kor "'%-.210s'를 '%-.210s'ë¡œ ì´ë¦„ 변경중 ì—러 (ì—러번호: %M)"
+ nla "Fout bij het hernoemen van '%-.210s' naar '%-.210s' (Errcode: %M)"
nor "Feil ved omdøping av '%-.210s' til '%-.210s' (Feilkode: %M)"
norwegian-ny "Feil ved omdøyping av '%-.210s' til '%-.210s' (Feilkode: %M)"
pol "Bł?d podczas zmieniania nazwy '%-.210s' na '%-.210s' (Kod błędu: %M)"
@@ -604,9 +627,9 @@ ER_ERROR_ON_RENAME
swe "Kan inte byta namn från '%-.210s' till '%-.210s' (Felkod: %M)"
ukr "Ðе можу перейменувати '%-.210s' у '%-.210s' (помилка: %M)"
ER_ERROR_ON_WRITE
- cze "Chyba při zápisu do souboru '%-.200s' (chybový kód: %M)"
+ chi "写文件'%-.200s'错误(错误å·ç ï¼š%M)"
+ cze "Chyba při zápisu do souboru '%-.200s' (chybový kód: %M)"
dan "Fejl ved skriving av filen '%-.200s' (Fejlkode: %M)"
- nla "Fout bij het wegschrijven van file '%-.200s' (Errcode: %M)"
eng "Error writing file '%-.200s' (errno: %M)"
est "Viga faili '%-.200s' kirjutamisel (veakood: %M)"
fre "Erreur d'écriture du fichier '%-.200s' (Errcode: %M)"
@@ -617,6 +640,7 @@ ER_ERROR_ON_WRITE
ita "Errore durante la scrittura del file '%-.200s' (errno: %M)"
jpn "ファイル '%-.200s' ã®æ›¸ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼ (エラー番å·: %M)"
kor "'%-.200s'í™”ì¼ ê¸°ë¡ ì¤‘ ì—러 (ì—러번호: %M)"
+ nla "Fout bij het wegschrijven van file '%-.200s' (Errcode: %M)"
nor "Feil ved skriving av fila '%-.200s' (Feilkode: %M)"
norwegian-ny "Feil ved skriving av fila '%-.200s' (Feilkode: %M)"
pol "Bł?d podczas zapisywania pliku '%-.200s' (Kod błędu: %M)"
@@ -629,9 +653,9 @@ ER_ERROR_ON_WRITE
swe "Fick fel vid skrivning till '%-.200s' (Felkod %M)"
ukr "Ðе можу запиÑати файл '%-.200s' (помилка: %M)"
ER_FILE_USED
+ chi "'%-.192s'被é”定,ä¸èƒ½æ”¹å˜"
cze "'%-.192s' je zamÄen proti zmÄ›nám"
dan "'%-.192s' er låst mod opdateringer"
- nla "'%-.192s' is geblokeerd tegen veranderingen"
eng "'%-.192s' is locked against change"
est "'%-.192s' on lukustatud muudatuste vastu"
fre "'%-.192s' est verrouillé contre les modifications"
@@ -642,6 +666,7 @@ ER_FILE_USED
ita "'%-.192s' e` soggetto a lock contro i cambiamenti"
jpn "'%-.192s' ã¯ãƒ­ãƒƒã‚¯ã•ã‚Œã¦ã„ã¾ã™ã€‚"
kor "'%-.192s'ê°€ 변경할 수 ì—†ë„ë¡ ìž ê²¨ìžˆìŠµë‹ˆë‹¤."
+ nla "'%-.192s' is geblokeerd tegen veranderingen"
nor "'%-.192s' er låst mot oppdateringer"
norwegian-ny "'%-.192s' er låst mot oppdateringar"
pol "'%-.192s' jest zablokowany na wypadek zmian"
@@ -654,9 +679,9 @@ ER_FILE_USED
swe "'%-.192s' är låst mot användning"
ukr "'%-.192s' заблокований на внеÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½"
ER_FILSORT_ABORT
+ chi "排åºä¸­æ­¢"
cze "Třídění přerušeno"
dan "Sortering afbrudt"
- nla "Sorteren afgebroken"
eng "Sort aborted"
est "Sorteerimine katkestatud"
fre "Tri alphabétique abandonné"
@@ -667,6 +692,7 @@ ER_FILSORT_ABORT
ita "Operazione di ordinamento abbandonata"
jpn "ソート処ç†ã‚’中断ã—ã¾ã—ãŸã€‚"
kor "소트가 중단ë˜ì—ˆìŠµë‹ˆë‹¤."
+ nla "Sorteren afgebroken"
nor "Sortering avbrutt"
norwegian-ny "Sortering avbrote"
pol "Sortowanie przerwane"
@@ -679,9 +705,9 @@ ER_FILSORT_ABORT
swe "Sorteringen avbruten"
ukr "Ð¡Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿ÐµÑ€ÐµÑ€Ð²Ð°Ð½Ð¾"
ER_FORM_NOT_FOUND
+ chi "视图'%-.192s'ä¸å­˜åœ¨'%-.192s'"
cze "Pohled '%-.192s' pro '%-.192s' neexistuje"
dan "View '%-.192s' eksisterer ikke for '%-.192s'"
- nla "View '%-.192s' bestaat niet voor '%-.192s'"
eng "View '%-.192s' doesn't exist for '%-.192s'"
est "Vaade '%-.192s' ei eksisteeri '%-.192s' jaoks"
fre "La vue (View) '%-.192s' n'existe pas pour '%-.192s'"
@@ -692,6 +718,7 @@ ER_FORM_NOT_FOUND
ita "La view '%-.192s' non esiste per '%-.192s'"
jpn "ビュー '%-.192s' 㯠'%-.192s' ã«å­˜åœ¨ã—ã¾ã›ã‚“。"
kor "ë·° '%-.192s'ê°€ '%-.192s'ì—서는 존재하지 않습니다."
+ nla "View '%-.192s' bestaat niet voor '%-.192s'"
nor "View '%-.192s' eksisterer ikke for '%-.192s'"
norwegian-ny "View '%-.192s' eksisterar ikkje for '%-.192s'"
pol "Widok '%-.192s' nie istnieje dla '%-.192s'"
@@ -704,13 +731,14 @@ ER_FORM_NOT_FOUND
swe "Formulär '%-.192s' finns inte i '%-.192s'"
ukr "ВиглÑд '%-.192s' не Ñ–Ñнує Ð´Ð»Ñ '%-.192s'"
ER_GET_ERRNO
- nla "Fout %M van tabel handler %s"
+ chi "错误 %M, æ¥è‡ªå­˜å‚¨å¼•æ“Ž %s"
eng "Got error %M from storage engine %s"
fre "Reçu l'erreur %M du handler de la table %s"
ger "Fehler %M von Speicher-Engine %s"
greek "Ελήφθη μήνυμα λάθους %M από τον χειÏιστή πίνακα (table handler) %s"
hindi "%M तà¥à¤°à¥à¤Ÿà¤¿ %s सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन से"
ita "Rilevato l'errore %M dal gestore delle tabelle %s"
+ nla "Fout %M van tabel handler %s"
nor "Mottok feil %M fra tabell håndterer %s"
norwegian-ny "Mottok feil %M fra tabell handterar %s"
pol "Otrzymano bł?d %M z obsługi tabeli %s"
@@ -721,15 +749,16 @@ ER_GET_ERRNO
swe "Fick felkod %M från databashanteraren %s"
ukr "Отримано помилку %M від деÑкриптора таблиці %s"
ER_ILLEGAL_HA
+ chi "存储引擎%s %`s.%`s 表没有该选项"
eng "Storage engine %s of the table %`s.%`s doesn't have this option"
ger "Diese Option gibt es nicht in Speicher-Engine %s für %`s.%`s"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s में यह विकलà¥à¤ª उपलबà¥à¤§ नहीं है (टेबल: %`s.%`s)"
rus "Обработчик %s таблицы %`s.%`s не поддерживает Ñту возможноÑÑ‚ÑŒ"
ukr "ДеÑкриптор %s таблиці %`s.%`s не має цієї влаÑтивоÑÑ‚Ñ–"
ER_KEY_NOT_FOUND
+ chi "无法在'%-.192s'中找到记录"
cze "Nemohu najít záznam v '%-.192s'"
dan "Kan ikke finde posten i '%-.192s'"
- nla "Kan record niet vinden in '%-.192s'"
eng "Can't find record in '%-.192s'"
est "Ei suuda leida kirjet '%-.192s'-s"
fre "Ne peut trouver l'enregistrement dans '%-.192s'"
@@ -740,6 +769,7 @@ ER_KEY_NOT_FOUND
ita "Impossibile trovare il record in '%-.192s'"
jpn "'%-.192s' ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
kor "'%-.192s'ì—ì„œ 레코드를 ì°¾ì„ ìˆ˜ 없습니다."
+ nla "Kan record niet vinden in '%-.192s'"
nor "Kan ikke finne posten i '%-.192s'"
norwegian-ny "Kan ikkje finne posten i '%-.192s'"
pol "Nie można znaleĽć rekordu w '%-.192s'"
@@ -749,12 +779,12 @@ ER_KEY_NOT_FOUND
serbian "Ne mogu da pronađem slog u '%-.192s'"
slo "Nemôžem nájsť záznam v '%-.192s'"
spa "No puedo encontrar el registro en '%-.192s'"
- swe "Hittar inte posten '%-.192s'"
+ swe "Hittar inte posten '%-.192s'"
ukr "Ðе можу запиÑати у '%-.192s'"
ER_NOT_FORM_FILE
+ chi "文件中的信æ¯ä¸æ­£ç¡®ï¼š'%-.200s'"
cze "Nesprávná informace v souboru '%-.200s'"
dan "Forkert indhold i: '%-.200s'"
- nla "Verkeerde info in file: '%-.200s'"
eng "Incorrect information in file: '%-.200s'"
est "Vigane informatsioon failis '%-.200s'"
fre "Information erronnée dans le fichier: '%-.200s'"
@@ -765,6 +795,7 @@ ER_NOT_FORM_FILE
ita "Informazione errata nel file: '%-.200s'"
jpn "ファイル '%-.200s' 内ã®æƒ…å ±ãŒä¸æ­£ã§ã™ã€‚"
kor "í™”ì¼ì˜ 부정확한 ì •ë³´: '%-.200s'"
+ nla "Verkeerde info in file: '%-.200s'"
nor "Feil informasjon i filen: '%-.200s'"
norwegian-ny "Feil informasjon i fila: '%-.200s'"
pol "Niewła?ciwa informacja w pliku: '%-.200s'"
@@ -777,9 +808,9 @@ ER_NOT_FORM_FILE
swe "Felaktig fil: '%-.200s'"
ukr "Хибна Ñ–Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ñƒ файлі: '%-.200s'"
ER_NOT_KEYFILE
+ chi "表'%-.200s'的索引æŸå;试ç€ä¿®å¤"
cze "Nesprávný klÃ­Ä pro tabulku '%-.200s'; pokuste se ho opravit"
dan "Fejl i indeksfilen til tabellen '%-.200s'; prøv at reparere den"
- nla "Verkeerde zoeksleutel file voor tabel: '%-.200s'; probeer het te repareren"
eng "Index for table '%-.200s' is corrupt; try to repair it"
est "Tabeli '%-.200s' võtmefail on vigane; proovi seda parandada"
fre "Index corrompu dans la table: '%-.200s'; essayez de le réparer"
@@ -790,6 +821,7 @@ ER_NOT_KEYFILE
ita "File chiave errato per la tabella : '%-.200s'; prova a riparalo"
jpn "表 '%-.200s' ã®ç´¢å¼•ãƒ•ã‚¡ã‚¤ãƒ«(key file)ã®å†…容ãŒä¸æ­£ã§ã™ã€‚修復を試行ã—ã¦ãã ã•ã„。"
kor "'%-.200s' í…Œì´ë¸”ì˜ ë¶€ì •í™•í•œ 키 존재. 수정하시오!"
+ nla "Verkeerde zoeksleutel file voor tabel: '%-.200s'; probeer het te repareren"
nor "Tabellen '%-.200s' har feil i nøkkelfilen; forsøk å reparer den"
norwegian-ny "Tabellen '%-.200s' har feil i nykkelfila; prøv å reparere den"
pol "Niewła?ciwy plik kluczy dla tabeli: '%-.200s'; spróbuj go naprawić"
@@ -802,9 +834,9 @@ ER_NOT_KEYFILE
swe "Fatalt fel vid hantering av register '%-.200s'; kör en reparation"
ukr "Хибний файл ключей Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ–: '%-.200s'; Спробуйте його відновити"
ER_OLD_KEYFILE
+ chi "表'%-.192s'çš„è€ç´¢å¼•æ–‡ä»¶æŸå; ä¿®å¤!"
cze "Starý klíÄový soubor pro '%-.192s'; opravte ho"
dan "Gammel indeksfil for tabellen '%-.192s'; reparer den"
- nla "Oude zoeksleutel file voor tabel '%-.192s'; repareer het!"
eng "Old key file for table '%-.192s'; repair it!"
est "Tabeli '%-.192s' võtmefail on aegunud; paranda see!"
fre "Vieux fichier d'index pour la table '%-.192s'; réparez le!"
@@ -815,6 +847,7 @@ ER_OLD_KEYFILE
ita "File chiave vecchio per la tabella '%-.192s'; riparalo!"
jpn "表 '%-.192s' ã®ç´¢å¼•ãƒ•ã‚¡ã‚¤ãƒ«(key file)ã¯å¤ã„å½¢å¼ã§ã™ã€‚修復ã—ã¦ãã ã•ã„。"
kor "'%-.192s' í…Œì´ë¸”ì˜ ì´ì „ë²„ì ¼ì˜ í‚¤ 존재. 수정하시오!"
+ nla "Oude zoeksleutel file voor tabel '%-.192s'; repareer het!"
nor "Gammel nøkkelfil for tabellen '%-.192s'; reparer den!"
norwegian-ny "Gammel nykkelfil for tabellen '%-.192s'; reparer den!"
pol "Plik kluczy dla tabeli '%-.192s' jest starego typu; napraw go!"
@@ -827,9 +860,9 @@ ER_OLD_KEYFILE
swe "Gammal nyckelfil '%-.192s'; reparera registret"
ukr "Старий файл ключей Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– '%-.192s'; Відновіть його!"
ER_OPEN_AS_READONLY
+ chi "表'%-.192s'åªå¯è¯»"
cze "'%-.192s' je jen pro Ätení"
dan "'%-.192s' er skrivebeskyttet"
- nla "'%-.192s' is alleen leesbaar"
eng "Table '%-.192s' is read only"
est "Tabel '%-.192s' on ainult lugemiseks"
fre "'%-.192s' est en lecture seulement"
@@ -840,6 +873,7 @@ ER_OPEN_AS_READONLY
ita "'%-.192s' e` di sola lettura"
jpn "表 '%-.192s' ã¯èª­ã¿è¾¼ã¿å°‚用ã§ã™ã€‚"
kor "í…Œì´ë¸” '%-.192s'는 ì½ê¸°ì „ìš© 입니다."
+ nla "'%-.192s' is alleen leesbaar"
nor "'%-.192s' er skrivebeskyttet"
norwegian-ny "'%-.192s' er skrivetryggja"
pol "'%-.192s' jest tylko do odczytu"
@@ -852,9 +886,9 @@ ER_OPEN_AS_READONLY
swe "'%-.192s' är skyddad mot förändring"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' тільки Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ"
ER_OUTOFMEMORY HY001 S1001
+ chi "内存ä¸è¶³; é‡å¯åŽé‡è¯•(éœ€è¦ %d bytes)"
cze "Málo paměti. Přestartujte daemona a zkuste znovu (je potřeba %d bytů)"
dan "Ikke mere hukommelse. Genstart serveren og prøv igen (mangler %d bytes)"
- nla "Geen geheugen meer. Herstart server en probeer opnieuw (%d bytes nodig)"
eng "Out of memory; restart server and try again (needed %d bytes)"
est "Mälu sai otsa. Proovi MariaDB uuesti käivitada (puudu jäi %d baiti)"
fre "Manque de mémoire. Redémarrez le démon et ré-essayez (%d octets nécessaires)"
@@ -864,6 +898,7 @@ ER_OUTOFMEMORY HY001 S1001
ita "Memoria esaurita. Fai ripartire il demone e riprova (richiesti %d bytes)"
jpn "メモリãŒä¸è¶³ã—ã¦ã„ã¾ã™ã€‚サーãƒãƒ¼ã‚’å†èµ·å‹•ã—ã¦ã¿ã¦ãã ã•ã„。(%d ãƒã‚¤ãƒˆã®å‰²ã‚Šå½“ã¦ã«å¤±æ•—)"
kor "Out of memory. ë°ëª¬ì„ 재 실행 후 다시 시작하시오 (needed %d bytes)"
+ nla "Geen geheugen meer. Herstart server en probeer opnieuw (%d bytes nodig)"
nor "Ikke mer minne. Star på nytt tjenesten og prøv igjen (trengte %d byter)"
norwegian-ny "Ikkje meir minne. Start på nytt tenesten og prøv igjen (trengte %d bytar)"
pol "Zbyt mało pamięci. Uruchom ponownie demona i spróbuj ponownie (potrzeba %d bajtów)"
@@ -876,9 +911,9 @@ ER_OUTOFMEMORY HY001 S1001
swe "Oväntat slut på minnet, starta om programmet och försök på nytt (Behövde %d bytes)"
ukr "Брак пам'ÑÑ‚Ñ–. РеÑтартуйте Ñервер та Ñпробуйте знову (потрібно %d байтів)"
ER_OUT_OF_SORTMEMORY HY001 S1001
+ chi "排åºå†…å­˜ä¸è¶³ï¼Œå¯ä»¥è€ƒè™‘增加实例排åºç¼“å­˜é‡"
cze "Málo paměti pro třídění. Zvyšte velikost třídícího bufferu"
dan "Ikke mere sorteringshukommelse. Øg sorteringshukommelse (sort buffer size) for serveren"
- nla "Geen geheugen om te sorteren. Verhoog de server sort buffer size"
eng "Out of sort memory, consider increasing server sort buffer size"
est "Mälu sai sorteerimisel otsa. Suurenda MariaDB-i sorteerimispuhvrit"
fre "Manque de mémoire pour le tri. Augmentez-la"
@@ -888,6 +923,7 @@ ER_OUT_OF_SORTMEMORY HY001 S1001
ita "Memoria per gli ordinamenti esaurita. Incrementare il 'sort_buffer' al demone"
jpn "ソートメモリãŒä¸è¶³ã—ã¦ã„ã¾ã™ã€‚ソートãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚º(sort buffer size)ã®å¢—加を検討ã—ã¦ãã ã•ã„。"
kor "Out of sort memory. daemon sort bufferì˜ í¬ê¸°ë¥¼ ì¦ê°€ì‹œí‚¤ì„¸ìš”"
+ nla "Geen geheugen om te sorteren. Verhoog de server sort buffer size"
nor "Ikke mer sorteringsminne. Vurder å øke sorteringsminnet (sort buffer size) for tjenesten"
norwegian-ny "Ikkje meir sorteringsminne. Vurder å auke sorteringsminnet (sorteringsbuffer storleik) for tenesten"
pol "Zbyt mało pamięci dla sortowania. Zwiększ wielko?ć bufora demona dla sortowania"
@@ -900,9 +936,9 @@ ER_OUT_OF_SORTMEMORY HY001 S1001
swe "Sorteringsbufferten räcker inte till. Kontrollera startparametrarna"
ukr "Брак пам'ÑÑ‚Ñ– Ð´Ð»Ñ ÑортуваннÑ. Треба збільшити розмір буфера ÑÐ¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ Ñервера"
ER_UNEXPECTED_EOF
- cze "NeoÄekávaný konec souboru pÅ™i Ätení '%-.192s' (chybový kód: %M)"
+ chi "阅读文件'%-.192s'时出现æ„外的EOF(错误å·ç ï¼š%M)"
+ cze "NeoÄekávaný konec souboru pÅ™i Ätení '%-.192s' (chybový kód: %M)"
dan "Uventet afslutning på fil (eof) ved læsning af filen '%-.192s' (Fejlkode: %M)"
- nla "Onverwachte eof gevonden tijdens het lezen van file '%-.192s' (Errcode: %M)"
eng "Unexpected EOF found when reading file '%-.192s' (errno: %M)"
est "Ootamatu faililõpumärgend faili '%-.192s' lugemisel (veakood: %M)"
fre "Fin de fichier inattendue en lisant '%-.192s' (Errcode: %M)"
@@ -912,6 +948,7 @@ ER_UNEXPECTED_EOF
ita "Fine del file inaspettata durante la lettura del file '%-.192s' (errno: %M)"
jpn "ファイル '%-.192s' を読ã¿è¾¼ã¿ä¸­ã«äºˆæœŸã›ãšãƒ•ã‚¡ã‚¤ãƒ«ã®çµ‚端ã«é”ã—ã¾ã—ãŸã€‚(エラー番å·: %M)"
kor "'%-.192s' í™”ì¼ì„ ì½ëŠ” ë„중 ìž˜ëª»ëœ eofì„ ë°œê²¬ (ì—러번호: %M)"
+ nla "Onverwachte eof gevonden tijdens het lezen van file '%-.192s' (Errcode: %M)"
nor "Uventet slutt på fil (eof) ved lesing av filen '%-.192s' (Feilkode: %M)"
norwegian-ny "Uventa slutt på fil (eof) ved lesing av fila '%-.192s' (Feilkode: %M)"
pol "Nieoczekiwany 'eof' napotkany podczas czytania z pliku '%-.192s' (Kod błędu: %M)"
@@ -924,9 +961,9 @@ ER_UNEXPECTED_EOF
swe "Oväntat filslut vid läsning från '%-.192s' (Felkod: %M)"
ukr "Хибний кінець файлу '%-.192s' (помилка: %M)"
ER_CON_COUNT_ERROR 08004
+ chi "太多连接"
cze "Příliš mnoho spojení"
dan "For mange forbindelser (connections)"
- nla "Te veel verbindingen"
eng "Too many connections"
est "Liiga palju samaaegseid ühendusi"
fre "Trop de connexions"
@@ -937,6 +974,7 @@ ER_CON_COUNT_ERROR 08004
ita "Troppe connessioni"
jpn "接続ãŒå¤šã™ãŽã¾ã™ã€‚"
kor "너무 ë§Žì€ ì—°ê²°... max_connectionì„ ì¦ê°€ 시키시오..."
+ nla "Te veel verbindingen"
nor "For mange tilkoblinger (connections)"
norwegian-ny "For mange tilkoplingar (connections)"
pol "Zbyt wiele poł?czeń"
@@ -949,9 +987,9 @@ ER_CON_COUNT_ERROR 08004
swe "För många anslutningar"
ukr "Забагато з'єднань"
ER_OUT_OF_RESOURCES
+ chi "内存ä¸è¶³."
cze "Málo prostoru/paměti pro thread"
dan "Udgået for tråde/hukommelse"
- nla "Geen thread geheugen meer; controleer of mysqld of andere processen al het beschikbare geheugen gebruikt. Zo niet, dan moet u wellicht 'ulimit' gebruiken om mysqld toe te laten meer geheugen te benutten, of u kunt extra swap ruimte toevoegen"
eng "Out of memory."
est "Mälu sai otsa. Võimalik, et aitab swap-i lisamine või käsu 'ulimit' abil MariaDB-le rohkema mälu kasutamise lubamine"
fre "Manque de 'threads'/mémoire"
@@ -961,6 +999,7 @@ ER_OUT_OF_RESOURCES
ita "Fine dello spazio/memoria per i thread"
jpn "メモリãŒä¸è¶³ã—ã¦ã„ã¾ã™ã€‚mysqld ã‚„ãã®ä»–ã®ãƒ—ロセスãŒãƒ¡ãƒ¢ãƒªãƒ¼ã‚’使ã„切ã£ã¦ã„ãªã„ã‹ç¢ºèªã—ã¦ä¸‹ã•ã„。メモリーを使ã„切ã£ã¦ã„ãªã„å ´åˆã€'ulimit'ã®è¨­å®šç­‰ã§ mysqld ã®ãƒ¡ãƒ¢ãƒªãƒ¼ä½¿ç”¨æœ€å¤§é‡ã‚’多ãã™ã‚‹ã‹ã€ã‚¹ãƒ¯ãƒƒãƒ—領域を増やã™å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。"
# This message failed to convert from euc-kr, skipped
+ nla "Geen thread geheugen meer; controleer of mysqld of andere processen al het beschikbare geheugen gebruikt. Zo niet, dan moet u wellicht 'ulimit' gebruiken om mysqld toe te laten meer geheugen te benutten, of u kunt extra swap ruimte toevoegen"
nor "Tomt for tråd plass/minne"
norwegian-ny "Tomt for tråd plass/minne"
pol "Zbyt mało miejsca/pamięci dla w?tku"
@@ -973,9 +1012,9 @@ ER_OUT_OF_RESOURCES
swe "Fick slut på minnet."
ukr "Брак пам'ÑÑ‚Ñ–."
ER_BAD_HOST_ERROR 08S01
+ chi "ä¸èƒ½ä»Žä½ çš„地å€èŽ·å–主机å称"
cze "Nemohu zjistit jméno stroje pro Vaši adresu"
dan "Kan ikke få værtsnavn for din adresse"
- nla "Kan de hostname niet krijgen van uw adres"
eng "Can't get hostname for your address"
est "Ei suuda lahendada IP aadressi masina nimeks"
fre "Ne peut obtenir de hostname pour votre adresse"
@@ -986,6 +1025,7 @@ ER_BAD_HOST_ERROR 08S01
ita "Impossibile risalire al nome dell'host dall'indirizzo (risoluzione inversa)"
jpn "IPアドレスã‹ã‚‰ãƒ›ã‚¹ãƒˆåを解決ã§ãã¾ã›ã‚“。"
kor "ë‹¹ì‹ ì˜ ì»´í“¨í„°ì˜ í˜¸ìŠ¤íŠ¸ì´ë¦„ì„ ì–»ì„ ìˆ˜ 없습니다."
+ nla "Kan de hostname niet krijgen van uw adres"
nor "Kan ikke få tak i vertsnavn for din adresse"
norwegian-ny "Kan ikkje få tak i vertsnavn for di adresse"
pol "Nie można otrzymać nazwy hosta dla twojego adresu"
@@ -998,9 +1038,9 @@ ER_BAD_HOST_ERROR 08S01
swe "Kan inte hitta 'hostname' för din adress"
ukr "Ðе можу визначити ім'Ñ Ñ…Ð¾Ñту Ð´Ð»Ñ Ð²Ð°ÑˆÐ¾Ñ— адреÑи"
ER_HANDSHAKE_ERROR 08S01
+ chi "åæ¡æ‰‹"
cze "Chyba při ustavování spojení"
dan "Forkert håndtryk (handshake)"
- nla "Verkeerde handshake"
eng "Bad handshake"
est "Väär handshake"
fre "Mauvais 'handshake'"
@@ -1010,6 +1050,7 @@ ER_HANDSHAKE_ERROR 08S01
hun "A kapcsolatfelvetel nem sikerult (Bad handshake)"
ita "Negoziazione impossibile"
jpn "ãƒãƒ³ãƒ‰ã‚·ã‚§ã‚¤ã‚¯ã‚¨ãƒ©ãƒ¼"
+ nla "Verkeerde handshake"
nor "Feil håndtrykk (handshake)"
norwegian-ny "Feil handtrykk (handshake)"
pol "ZÅ‚y uchwyt(handshake)"
@@ -1022,20 +1063,20 @@ ER_HANDSHAKE_ERROR 08S01
swe "Fel vid initiering av kommunikationen med klienten"
ukr "Ðевірна уÑтановка зв'Ñзку"
ER_DBACCESS_DENIED_ERROR 42000
+ chi "用户'%s'@'%s'æ— æƒè®¿é—®æ•°æ®åº“'%-.192s'"
cze "Přístup pro uživatele '%s'@'%s' k databázi '%-.192s' není povolen"
dan "Adgang nægtet bruger: '%s'@'%s' til databasen '%-.192s'"
- nla "Toegang geweigerd voor gebruiker: '%s'@'%s' naar database '%-.192s'"
eng "Access denied for user '%s'@'%s' to database '%-.192s'"
- jps "ユーザー '%s'@'%s' ã® '%-.192s' データベースã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æ‹’å¦ã—ã¾ã™",
est "Ligipääs keelatud kasutajale '%s'@'%s' andmebaasile '%-.192s'"
fre "Accès refusé pour l'utilisateur: '%s'@'%s'. Base '%-.192s'"
ger "Benutzer '%s'@'%s' hat keine Zugriffsberechtigung für Datenbank '%-.192s'"
greek "Δεν επιτέÏεται η Ï€Ïόσβαση στο χÏήστη: '%s'@'%s' στη βάση δεδομένων '%-.192s'"
- hun "A(z) '%s'@'%s' felhasznalo szamara tiltott eleres az '%-.192s' adabazishoz"
hindi "यूज़र '%s'@'%s' को डेटाबेस '%-.192s' की अनà¥à¤®à¤¤à¤¿ नहीं है"
+ hun "A(z) '%s'@'%s' felhasznalo szamara tiltott eleres az '%-.192s' adabazishoz"
ita "Accesso non consentito per l'utente: '%s'@'%s' al database '%-.192s'"
jpn "ユーザー '%s'@'%s' ã® '%-.192s' データベースã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æ‹’å¦ã—ã¾ã™"
kor "'%s'@'%s' 사용ìžëŠ” '%-.192s' ë°ì´íƒ€ë² ì´ìŠ¤ì— ì ‘ê·¼ì´ ê±°ë¶€ ë˜ì—ˆìŠµë‹ˆë‹¤."
+ nla "Toegang geweigerd voor gebruiker: '%s'@'%s' naar database '%-.192s'"
nor "Tilgang nektet for bruker: '%s'@'%s' til databasen '%-.192s' nektet"
norwegian-ny "Tilgang ikkje tillate for brukar: '%s'@'%s' til databasen '%-.192s' nekta"
por "Acesso negado para o usuário '%s'@'%s' ao banco de dados '%-.192s'"
@@ -1047,11 +1088,10 @@ ER_DBACCESS_DENIED_ERROR 42000
swe "Användare '%s'@'%s' är ej berättigad att använda databasen %-.192s"
ukr "ДоÑтуп заборонено Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача: '%s'@'%s' до бази данних '%-.192s'"
ER_ACCESS_DENIED_ERROR 28000
+ chi "'%s'@'%s' 用户无æƒè®¿é—® (使用密ç : %s)"
cze "Přístup pro uživatele '%s'@'%s' (s heslem %s)"
dan "Adgang nægtet bruger: '%s'@'%s' (Bruger adgangskode: %s)"
- nla "Toegang geweigerd voor gebruiker: '%s'@'%s' (Wachtwoord gebruikt: %s)"
eng "Access denied for user '%s'@'%s' (using password: %s)"
- jps "ユーザー '%s'@'%s' ã‚’æ‹’å¦ã—ã¾ã™.uUsing password: %s)",
est "Ligipääs keelatud kasutajale '%s'@'%s' (kasutab parooli: %s)"
fre "Accès refusé pour l'utilisateur: '%s'@'%s' (mot de passe: %s)"
ger "Benutzer '%s'@'%s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)"
@@ -1061,6 +1101,7 @@ ER_ACCESS_DENIED_ERROR 28000
ita "Accesso non consentito per l'utente: '%s'@'%s' (Password: %s)"
jpn "ユーザー '%s'@'%s' ã‚’æ‹’å¦ã—ã¾ã™.uUsing password: %s)"
kor "'%s'@'%s' 사용ìžëŠ” ì ‘ê·¼ì´ ê±°ë¶€ ë˜ì—ˆìŠµë‹ˆë‹¤. (using password: %s)"
+ nla "Toegang geweigerd voor gebruiker: '%s'@'%s' (Wachtwoord gebruikt: %s)"
nor "Tilgang nektet for bruker: '%s'@'%s' (Bruker passord: %s)"
norwegian-ny "Tilgang ikke tillate for brukar: '%s'@'%s' (Brukar passord: %s)"
por "Acesso negado para o usuário '%s'@'%s' (senha usada: %s)"
@@ -1072,9 +1113,9 @@ ER_ACCESS_DENIED_ERROR 28000
swe "Användare '%s'@'%s' är ej berättigad att logga in (Använder lösen: %s)"
ukr "ДоÑтуп заборонено Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача: '%s'@'%s' (ВикориÑтано пароль: %s)"
ER_NO_DB_ERROR 3D000
+ chi "没有选择数æ®åº“"
cze "Nebyla vybrána žádná databáze"
dan "Ingen database valgt"
- nla "Geen database geselecteerd"
eng "No database selected"
est "Andmebaasi ei ole valitud"
fre "Aucune base n'a été sélectionnée"
@@ -1085,6 +1126,7 @@ ER_NO_DB_ERROR 3D000
ita "Nessun database selezionato"
jpn "データベースãŒé¸æŠžã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "ì„ íƒëœ ë°ì´íƒ€ë² ì´ìŠ¤ê°€ 없습니다."
+ nla "Geen database geselecteerd"
nor "Ingen database valgt"
norwegian-ny "Ingen database vald"
pol "Nie wybrano żadnej bazy danych"
@@ -1097,9 +1139,9 @@ ER_NO_DB_ERROR 3D000
swe "Ingen databas i användning"
ukr "Базу данних не вибрано"
ER_UNKNOWN_COM_ERROR 08S01
+ chi "未知的命令"
cze "Neznámý příkaz"
dan "Ukendt kommando"
- nla "Onbekend commando"
eng "Unknown command"
est "Tundmatu käsk"
fre "Commande inconnue"
@@ -1110,6 +1152,7 @@ ER_UNKNOWN_COM_ERROR 08S01
ita "Comando sconosciuto"
jpn "ä¸æ˜Žãªã‚³ãƒžãƒ³ãƒ‰ã§ã™ã€‚"
kor "명령어가 뭔지 모르겠어요..."
+ nla "Onbekend commando"
nor "Ukjent kommando"
norwegian-ny "Ukjent kommando"
pol "Nieznana komenda"
@@ -1122,9 +1165,9 @@ ER_UNKNOWN_COM_ERROR 08S01
swe "Okänt kommando"
ukr "Ðевідома команда"
ER_BAD_NULL_ERROR 23000
+ chi "列'%-.192s'ä¸èƒ½ä¸ºNULL"
cze "Sloupec '%-.192s' nemůže být null"
dan "Kolonne '%-.192s' kan ikke være NULL"
- nla "Kolom '%-.192s' kan niet null zijn"
eng "Column '%-.192s' cannot be null"
est "Tulp '%-.192s' ei saa omada nullväärtust"
fre "Le champ '%-.192s' ne peut être vide (null)"
@@ -1135,6 +1178,7 @@ ER_BAD_NULL_ERROR 23000
ita "La colonna '%-.192s' non puo` essere nulla"
jpn "列 '%-.192s' 㯠null ã«ã§ãã¾ã›ã‚“。"
kor "칼럼 '%-.192s'는 ë„(Null)ì´ ë˜ë©´ 안ë©ë‹ˆë‹¤. "
+ nla "Kolom '%-.192s' kan niet null zijn"
nor "Kolonne '%-.192s' kan ikke vere null"
norwegian-ny "Kolonne '%-.192s' kan ikkje vere null"
pol "Kolumna '%-.192s' nie może być null"
@@ -1147,9 +1191,9 @@ ER_BAD_NULL_ERROR 23000
swe "Kolumn '%-.192s' får inte vara NULL"
ukr "Стовбець '%-.192s' не може бути нульовим"
ER_BAD_DB_ERROR 42000
+ chi "未知数æ®åº“'%-.192s'"
cze "Neznámá databáze '%-.192s'"
dan "Ukendt database '%-.192s'"
- nla "Onbekende database '%-.192s'"
eng "Unknown database '%-.192s'"
est "Tundmatu andmebaas '%-.192s'"
fre "Base '%-.192s' inconnue"
@@ -1160,6 +1204,7 @@ ER_BAD_DB_ERROR 42000
ita "Database '%-.192s' sconosciuto"
jpn "'%-.192s' ã¯ä¸æ˜Žãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã™ã€‚"
kor "ë°ì´íƒ€ë² ì´ìŠ¤ '%-.192s'는 알수 ì—†ìŒ"
+ nla "Onbekende database '%-.192s'"
nor "Ukjent database '%-.192s'"
norwegian-ny "Ukjent database '%-.192s'"
pol "Nieznana baza danych '%-.192s'"
@@ -1172,9 +1217,9 @@ ER_BAD_DB_ERROR 42000
swe "Okänd databas: '%-.192s'"
ukr "Ðевідома база данних '%-.192s'"
ER_TABLE_EXISTS_ERROR 42S01
+ chi "表'%-.192s'å·²ç»å­˜åœ¨"
cze "Tabulka '%-.192s' již existuje"
dan "Tabellen '%-.192s' findes allerede"
- nla "Tabel '%-.192s' bestaat al"
eng "Table '%-.192s' already exists"
est "Tabel '%-.192s' juba eksisteerib"
fre "La table '%-.192s' existe déjà"
@@ -1185,6 +1230,7 @@ ER_TABLE_EXISTS_ERROR 42S01
ita "La tabella '%-.192s' esiste gia`"
jpn "表 '%-.192s' ã¯ã™ã§ã«å­˜åœ¨ã—ã¾ã™ã€‚"
kor "í…Œì´ë¸” '%-.192s'는 ì´ë¯¸ 존재함"
+ nla "Tabel '%-.192s' bestaat al"
nor "Tabellen '%-.192s' eksisterer allerede"
norwegian-ny "Tabellen '%-.192s' eksisterar allereide"
pol "Tabela '%-.192s' już istnieje"
@@ -1197,9 +1243,9 @@ ER_TABLE_EXISTS_ERROR 42S01
swe "Tabellen '%-.192s' finns redan"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' вже Ñ–Ñнує"
ER_BAD_TABLE_ERROR 42S02
+ chi "未知表'%-.100T'"
cze "Neznámá tabulka '%-.100T'"
dan "Ukendt tabel '%-.100T'"
- nla "Onbekende tabel '%-.100T'"
eng "Unknown table '%-.100T'"
est "Tundmatu tabel '%-.100T'"
fre "Table '%-.100T' inconnue"
@@ -1210,6 +1256,7 @@ ER_BAD_TABLE_ERROR 42S02
ita "Tabella '%-.100T' sconosciuta"
jpn "'%-.100T' ã¯ä¸æ˜Žãªè¡¨ã§ã™ã€‚"
kor "í…Œì´ë¸” '%-.100T'는 알수 ì—†ìŒ"
+ nla "Onbekende tabel '%-.100T'"
nor "Ukjent tabell '%-.100T'"
norwegian-ny "Ukjent tabell '%-.100T'"
pol "Nieznana tabela '%-.100T'"
@@ -1222,9 +1269,9 @@ ER_BAD_TABLE_ERROR 42S02
swe "Okänd tabell '%-.100T'"
ukr "Ðевідома Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.100T'"
ER_NON_UNIQ_ERROR 23000
+ chi "列å '%-.192s' 在 %-.192s 定义模糊"
cze "Sloupec '%-.192s' v %-.192s není zcela jasný"
dan "Felt: '%-.192s' i tabel %-.192s er ikke entydigt"
- nla "Kolom: '%-.192s' in %-.192s is niet eenduidig"
eng "Column '%-.192s' in %-.192s is ambiguous"
est "Väli '%-.192s' %-.192s-s ei ole ühene"
fre "Champ: '%-.192s' dans %-.192s est ambigu"
@@ -1235,6 +1282,7 @@ ER_NON_UNIQ_ERROR 23000
ita "Colonna: '%-.192s' di %-.192s e` ambigua"
jpn "列 '%-.192s' 㯠%-.192s 内ã§æ›–昧ã§ã™ã€‚"
kor "칼럼: '%-.192s' in '%-.192s' ì´ ëª¨í˜¸í•¨"
+ nla "Kolom: '%-.192s' in %-.192s is niet eenduidig"
nor "Felt: '%-.192s' i tabell %-.192s er ikke entydig"
norwegian-ny "Kolonne: '%-.192s' i tabell %-.192s er ikkje eintydig"
pol "Kolumna: '%-.192s' w %-.192s jest dwuznaczna"
@@ -1247,9 +1295,9 @@ ER_NON_UNIQ_ERROR 23000
swe "Kolumn '%-.192s' i %-.192s är inte unik"
ukr "Стовбець '%-.192s' у %-.192s визначений неоднозначно"
ER_SERVER_SHUTDOWN 08S01
+ chi "æœåŠ¡å™¨æ­£åœ¨å…³é—­"
cze "Probíhá ukonÄování práce serveru"
dan "Database nedlukning er i gang"
- nla "Bezig met het stoppen van de server"
eng "Server shutdown in progress"
est "Serveri seiskamine käib"
fre "Arrêt du serveur en cours"
@@ -1260,6 +1308,7 @@ ER_SERVER_SHUTDOWN 08S01
ita "Shutdown del server in corso"
jpn "サーãƒãƒ¼ã‚’シャットダウン中ã§ã™ã€‚"
kor "Server가 셧다운 중입니다."
+ nla "Bezig met het stoppen van de server"
nor "Database nedkobling er i gang"
norwegian-ny "Tenar nedkopling er i gang"
pol "Trwa kończenie działania serwera"
@@ -1272,9 +1321,9 @@ ER_SERVER_SHUTDOWN 08S01
swe "Servern går nu ned"
ukr "ЗавершуєтьÑÑ Ñ€Ð°Ð±Ð¾Ñ‚Ð° Ñервера"
ER_BAD_FIELD_ERROR 42S22 S0022
+ chi "未知列'%-.192s'在'%-.192s'"
cze "Neznámý sloupec '%-.192s' v %-.192s"
dan "Ukendt kolonne '%-.192s' i tabel %-.192s"
- nla "Onbekende kolom '%-.192s' in %-.192s"
eng "Unknown column '%-.192s' in '%-.192s'"
est "Tundmatu tulp '%-.192s' '%-.192s'-s"
fre "Champ '%-.192s' inconnu dans %-.192s"
@@ -1285,6 +1334,7 @@ ER_BAD_FIELD_ERROR 42S22 S0022
ita "Colonna sconosciuta '%-.192s' in '%-.192s'"
jpn "列 '%-.192s' 㯠'%-.192s' ã«ã¯ã‚ã‚Šã¾ã›ã‚“。"
kor "Unknown 칼럼 '%-.192s' in '%-.192s'"
+ nla "Onbekende kolom '%-.192s' in %-.192s"
nor "Ukjent kolonne '%-.192s' i tabell %-.192s"
norwegian-ny "Ukjent felt '%-.192s' i tabell %-.192s"
pol "Nieznana kolumna '%-.192s' w %-.192s"
@@ -1297,9 +1347,9 @@ ER_BAD_FIELD_ERROR 42S22 S0022
swe "Okänd kolumn '%-.192s' i %-.192s"
ukr "Ðевідомий Ñтовбець '%-.192s' у '%-.192s'"
ER_WRONG_FIELD_WITH_GROUP 42000 S1009
+ chi "'%-.192s' ä¸åœ¨ GROUP BY"
cze "Použité '%-.192s' nebylo v group by"
dan "Brugte '%-.192s' som ikke var i group by"
- nla "Opdracht gebruikt '%-.192s' dat niet in de GROUP BY voorkomt"
eng "'%-.192s' isn't in GROUP BY"
est "'%-.192s' puudub GROUP BY klauslis"
fre "'%-.192s' n'est pas dans 'group by'"
@@ -1310,6 +1360,7 @@ ER_WRONG_FIELD_WITH_GROUP 42000 S1009
ita "Usato '%-.192s' che non e` nel GROUP BY"
jpn "'%-.192s' ã¯GROUP BYå¥ã§æŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "'%-.192s'ì€ GROUP BYì†ì— ì—†ìŒ"
+ nla "Opdracht gebruikt '%-.192s' dat niet in de GROUP BY voorkomt"
nor "Brukte '%-.192s' som ikke var i group by"
norwegian-ny "Brukte '%-.192s' som ikkje var i group by"
pol "Użyto '%-.192s' bez umieszczenia w group by"
@@ -1322,9 +1373,9 @@ ER_WRONG_FIELD_WITH_GROUP 42000 S1009
swe "'%-.192s' finns inte i GROUP BY"
ukr "'%-.192s' не є у GROUP BY"
ER_WRONG_GROUP_FIELD 42000 S1009
+ chi "ä¸èƒ½åœ¨'%-.192s'上分组"
cze "Nemohu použít group na '%-.192s'"
dan "Kan ikke gruppere på '%-.192s'"
- nla "Kan '%-.192s' niet groeperen"
eng "Can't group on '%-.192s'"
est "Ei saa grupeerida '%-.192s' järgi"
fre "Ne peut regrouper '%-.192s'"
@@ -1335,6 +1386,7 @@ ER_WRONG_GROUP_FIELD 42000 S1009
ita "Impossibile raggruppare per '%-.192s'"
jpn "'%-.192s' ã§ã®ã‚°ãƒ«ãƒ¼ãƒ—化ã¯ã§ãã¾ã›ã‚“。"
kor "'%-.192s'를 그룹할 수 ì—†ìŒ"
+ nla "Kan '%-.192s' niet groeperen"
nor "Kan ikke gruppere på '%-.192s'"
norwegian-ny "Kan ikkje gruppere på '%-.192s'"
pol "Nie można grupować po '%-.192s'"
@@ -1347,9 +1399,9 @@ ER_WRONG_GROUP_FIELD 42000 S1009
swe "Kan inte använda GROUP BY med '%-.192s'"
ukr "Ðе можу групувати по '%-.192s'"
ER_WRONG_SUM_SELECT 42000 S1009
+ chi "语å¥åœ¨åŒä¸€è¯­å¥é‡Œæœ‰æ±‚和函数和列"
cze "Příkaz obsahuje zároveň funkci sum a sloupce"
dan "Udtrykket har summer (sum) funktioner og kolonner i samme udtryk"
- nla "Opdracht heeft totaliseer functies en kolommen in dezelfde opdracht"
eng "Statement has sum functions and columns in same statement"
est "Lauses on korraga nii tulbad kui summeerimisfunktsioonid"
fre "Vous demandez la fonction sum() et des champs dans la même commande"
@@ -1358,6 +1410,7 @@ ER_WRONG_SUM_SELECT 42000 S1009
ita "Il comando ha una funzione SUM e una colonna non specificata nella GROUP BY"
jpn "集計関数ã¨é€šå¸¸ã®åˆ—ãŒåŒæ™‚ã«æŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚"
kor "Statement ê°€ sumê¸°ëŠ¥ì„ ë™ìž‘중ì´ê³  ì¹¼ëŸ¼ë„ ë™ì¼í•œ statement입니다."
+ nla "Opdracht heeft totaliseer functies en kolommen in dezelfde opdracht"
nor "Uttrykket har summer (sum) funksjoner og kolonner i samme uttrykk"
norwegian-ny "Uttrykket har summer (sum) funksjoner og kolonner i same uttrykk"
pol "Zapytanie ma funkcje sumuj?ce i kolumny w tym samym zapytaniu"
@@ -1370,9 +1423,9 @@ ER_WRONG_SUM_SELECT 42000 S1009
swe "Kommandot har både sum functions och enkla funktioner"
ukr "У виразі викориÑтано підÑумовуючі функції порÑд з іменами Ñтовбців"
ER_WRONG_VALUE_COUNT 21S01
+ chi "列数与值数ä¸åŒ¹é…"
cze "PoÄet sloupců neodpovídá zadané hodnotÄ›"
dan "Kolonne tæller stemmer ikke med antallet af værdier"
- nla "Het aantal kolommen komt niet overeen met het aantal opgegeven waardes"
eng "Column count doesn't match value count"
est "Tulpade arv erineb väärtuste arvust"
ger "Die Anzahl der Spalten entspricht nicht der Anzahl der Werte"
@@ -1382,6 +1435,7 @@ ER_WRONG_VALUE_COUNT 21S01
ita "Il numero delle colonne non e` uguale al numero dei valori"
jpn "列数ãŒå€¤ã®å€‹æ•°ã¨ä¸€è‡´ã—ã¾ã›ã‚“。"
kor "ì¹¼ëŸ¼ì˜ ì¹´ìš´íŠ¸ê°€ ê°’ì˜ ì¹´ìš´íŠ¸ì™€ ì¼ì¹˜í•˜ì§€ 않습니다."
+ nla "Het aantal kolommen komt niet overeen met het aantal opgegeven waardes"
nor "Felt telling stemmer verdi telling"
norwegian-ny "Kolonne telling stemmer verdi telling"
pol "Liczba kolumn nie odpowiada liczbie warto?ci"
@@ -1394,9 +1448,9 @@ ER_WRONG_VALUE_COUNT 21S01
swe "Antalet kolumner motsvarar inte antalet värden"
ukr "КількіÑÑ‚ÑŒ Ñтовбців не Ñпівпадає з кількіÑÑ‚ÑŽ значень"
ER_TOO_LONG_IDENT 42000 S1009
+ chi "标识符'%-.100T'太长"
cze "Jméno identifikátoru '%-.100T' je příliš dlouhé"
dan "Navnet '%-.100T' er for langt"
- nla "Naam voor herkenning '%-.100T' is te lang"
eng "Identifier name '%-.100T' is too long"
est "Identifikaatori '%-.100T' nimi on liiga pikk"
fre "Le nom de l'identificateur '%-.100T' est trop long"
@@ -1407,6 +1461,7 @@ ER_TOO_LONG_IDENT 42000 S1009
ita "Il nome dell'identificatore '%-.100T' e` troppo lungo"
jpn "識別å­å '%-.100T' ã¯é•·ã™ãŽã¾ã™ã€‚"
kor "Identifier '%-.100T'는 너무 길군요."
+ nla "Naam voor herkenning '%-.100T' is te lang"
nor "Identifikator '%-.100T' er for lang"
norwegian-ny "Identifikator '%-.100T' er for lang"
pol "Nazwa identyfikatora '%-.100T' jest zbyt długa"
@@ -1419,9 +1474,9 @@ ER_TOO_LONG_IDENT 42000 S1009
swe "Kolumnnamn '%-.100T' är för långt"
ukr "Ім'Ñ Ñ–Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ñ–ÐºÐ°Ñ‚Ð¾Ñ€Ð° '%-.100T' задовге"
ER_DUP_FIELDNAME 42S21 S1009
+ chi "列åé‡å¤ '%-.192s'"
cze "Zdvojené jméno sloupce '%-.192s'"
dan "Feltnavnet '%-.192s' findes allerede"
- nla "Dubbele kolom naam '%-.192s'"
eng "Duplicate column name '%-.192s'"
est "Kattuv tulba nimi '%-.192s'"
fre "Nom du champ '%-.192s' déjà utilisé"
@@ -1432,6 +1487,7 @@ ER_DUP_FIELDNAME 42S21 S1009
ita "Nome colonna duplicato '%-.192s'"
jpn "列å '%-.192s' ã¯é‡è¤‡ã—ã¦ã¾ã™ã€‚"
kor "ì¤‘ë³µëœ ì¹¼ëŸ¼ ì´ë¦„: '%-.192s'"
+ nla "Dubbele kolom naam '%-.192s'"
nor "Feltnavnet '%-.192s' eksisterte fra før"
norwegian-ny "Feltnamnet '%-.192s' eksisterte frå før"
pol "Powtórzona nazwa kolumny '%-.192s'"
@@ -1444,9 +1500,9 @@ ER_DUP_FIELDNAME 42S21 S1009
swe "Kolumnnamn '%-.192s finns flera gånger"
ukr "Дублююче ім'Ñ ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ '%-.192s'"
ER_DUP_KEYNAME 42000 S1009
+ chi "索引åé‡å¤ '%-.192s'"
cze "Zdvojené jméno klíÄe '%-.192s'"
dan "Indeksnavnet '%-.192s' findes allerede"
- nla "Dubbele zoeksleutel naam '%-.192s'"
eng "Duplicate key name '%-.192s'"
est "Kattuv võtme nimi '%-.192s'"
fre "Nom de clef '%-.192s' déjà utilisé"
@@ -1457,6 +1513,7 @@ ER_DUP_KEYNAME 42000 S1009
ita "Nome chiave duplicato '%-.192s'"
jpn "索引å '%-.192s' ã¯é‡è¤‡ã—ã¦ã„ã¾ã™ã€‚"
kor "ì¤‘ë³µëœ í‚¤ ì´ë¦„ : '%-.192s'"
+ nla "Dubbele zoeksleutel naam '%-.192s'"
nor "Nøkkelnavnet '%-.192s' eksisterte fra før"
norwegian-ny "Nøkkelnamnet '%-.192s' eksisterte frå før"
pol "Powtórzony nazwa klucza '%-.192s'"
@@ -1471,34 +1528,35 @@ ER_DUP_KEYNAME 42000 S1009
# When using this error code, please use ER(ER_DUP_ENTRY_WITH_KEY_NAME)
# for the message string. See, for example, code in handler.cc.
ER_DUP_ENTRY 23000 S1009
- cze "Zdvojený klÃ­Ä '%-.192T' (Äíslo klíÄe %d)"
- dan "Ens værdier '%-.192T' for indeks %d"
- nla "Dubbele ingang '%-.192T' voor zoeksleutel %d"
- eng "Duplicate entry '%-.192T' for key %d"
- est "Kattuv väärtus '%-.192T' võtmele %d"
- fre "Duplicata du champ '%-.192T' pour la clef %d"
- ger "Doppelter Eintrag '%-.192T' für Schlüssel %d"
- greek "Διπλή εγγÏαφή '%-.192T' για το κλειδί %d"
+ chi "é‡å¤æ¡ç›®'%-.192T'在索引%d"
+ cze "Zdvojený klÃ­Ä '%-.192T' (Äíslo klíÄe %d)"
+ dan "Ens værdier '%-.192T' for indeks %d"
+ eng "Duplicate entry '%-.192T' for key %d"
+ est "Kattuv väärtus '%-.192T' võtmele %d"
+ fre "Duplicata du champ '%-.192T' pour la clef %d"
+ ger "Doppelter Eintrag '%-.192T' für Schlüssel %d"
+ greek "Διπλή εγγÏαφή '%-.192T' για το κλειδί %d"
hindi "सामान पà¥à¤°à¤µà¥‡à¤¶ '%-.192T' KEY %d के लिà¤"
- hun "Duplikalt bejegyzes '%-.192T' a %d kulcs szerint"
- ita "Valore duplicato '%-.192T' per la chiave %d"
- jpn "'%-.192T' ã¯ç´¢å¼• %d ã§é‡è¤‡ã—ã¦ã„ã¾ã™ã€‚"
- kor "ì¤‘ë³µëœ ìž…ë ¥ ê°’ '%-.192T': key %d"
- nor "Like verdier '%-.192T' for nøkkel %d"
- norwegian-ny "Like verdiar '%-.192T' for nykkel %d"
- pol "Powtórzone wystąpienie '%-.192T' dla klucza %d"
- por "Entrada '%-.192T' duplicada para a chave %d"
- rum "Cimpul '%-.192T' e duplicat pentru cheia %d"
- rus "ДублирующаÑÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ '%-.192T' по ключу %d"
- serbian "Dupliran unos '%-.192T' za kljuÄ '%d'"
- slo "Opakovaný kÄ¾ÃºÄ '%-.192T' (Äíslo kľúÄa %d)"
- spa "Entrada duplicada '%-.192T' para la clave %d"
- swe "Dublett '%-.192T' för nyckel %d"
- ukr "Дублюючий Ð·Ð°Ð¿Ð¸Ñ '%-.192T' Ð´Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° %d"
+ hun "Duplikalt bejegyzes '%-.192T' a %d kulcs szerint"
+ ita "Valore duplicato '%-.192T' per la chiave %d"
+ jpn "'%-.192T' ã¯ç´¢å¼• %d ã§é‡è¤‡ã—ã¦ã„ã¾ã™ã€‚"
+ kor "ì¤‘ë³µëœ ìž…ë ¥ ê°’ '%-.192T': key %d"
+ nla "Dubbele ingang '%-.192T' voor zoeksleutel %d"
+ nor "Like verdier '%-.192T' for nøkkel %d"
+ norwegian-ny "Like verdiar '%-.192T' for nykkel %d"
+ pol "Powtórzone wystąpienie '%-.192T' dla klucza %d"
+ por "Entrada '%-.192T' duplicada para a chave %d"
+ rum "Cimpul '%-.192T' e duplicat pentru cheia %d"
+ rus "ДублирующаÑÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ '%-.192T' по ключу %d"
+ serbian "Dupliran unos '%-.192T' za kljuÄ '%d'"
+ slo "Opakovaný kÄ¾ÃºÄ '%-.192T' (Äíslo kľúÄa %d)"
+ spa "Entrada duplicada '%-.192T' para la clave %d"
+ swe "Dublett '%-.192T' för nyckel %d"
+ ukr "Дублюючий Ð·Ð°Ð¿Ð¸Ñ '%-.192T' Ð´Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° %d"
ER_WRONG_FIELD_SPEC 42000 S1009
+ chi "列的说明符ä¸å¯¹ '%-.192s'"
cze "Chybná specifikace sloupce '%-.192s'"
dan "Forkert kolonnespecifikaton for felt '%-.192s'"
- nla "Verkeerde kolom specificatie voor kolom '%-.192s'"
eng "Incorrect column specifier for column '%-.192s'"
est "Vigane tulba kirjeldus tulbale '%-.192s'"
fre "Mauvais paramètre de champ pour le champ '%-.192s'"
@@ -1509,6 +1567,7 @@ ER_WRONG_FIELD_SPEC 42000 S1009
ita "Specifica errata per la colonna '%-.192s'"
jpn "列 '%-.192s' ã®å®šç¾©ãŒä¸æ­£ã§ã™ã€‚"
kor "칼럼 '%-.192s'ì˜ ë¶€ì •í™•í•œ 칼럼 ì •ì˜ìž"
+ nla "Verkeerde kolom specificatie voor kolom '%-.192s'"
nor "Feil kolonne spesifikator for felt '%-.192s'"
norwegian-ny "Feil kolonne spesifikator for kolonne '%-.192s'"
pol "Błędna specyfikacja kolumny dla kolumny '%-.192s'"
@@ -1521,9 +1580,9 @@ ER_WRONG_FIELD_SPEC 42000 S1009
swe "Felaktigt kolumntyp för kolumn '%-.192s'"
ukr "Ðевірний Ñпецифікатор ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ '%-.192s'"
ER_PARSE_ERROR 42000 s1009
+ chi "%s 附近'%-.80T'在第%d行"
cze "%s blízko '%-.80T' na řádku %d"
dan "%s nær '%-.80T' på linje %d"
- nla "%s bij '%-.80T' in regel %d"
eng "%s near '%-.80T' at line %d"
est "%s '%-.80T' ligidal real %d"
fre "%s près de '%-.80T' à la ligne %d"
@@ -1534,6 +1593,7 @@ ER_PARSE_ERROR 42000 s1009
ita "%s vicino a '%-.80T' linea %d"
jpn "%s : '%-.80T' 付近 %d 行目"
kor "'%s' ì—러 같습니다. ('%-.80T' 명령어 ë¼ì¸ %d)"
+ nla "%s bij '%-.80T' in regel %d"
nor "%s nær '%-.80T' på linje %d"
norwegian-ny "%s attmed '%-.80T' på line %d"
pol "%s obok '%-.80T' w linii %d"
@@ -1546,9 +1606,9 @@ ER_PARSE_ERROR 42000 s1009
swe "%s nära '%-.80T' på rad %d"
ukr "%s Ð±Ñ–Ð»Ñ '%-.80T' в Ñтроці %d"
ER_EMPTY_QUERY 42000
+ chi "查询为空"
cze "Výsledek dotazu je prázdný"
dan "Forespørgsel var tom"
- nla "Query was leeg"
eng "Query was empty"
est "Tühi päring"
fre "Query est vide"
@@ -1559,6 +1619,7 @@ ER_EMPTY_QUERY 42000
ita "La query e` vuota"
jpn "クエリãŒç©ºã§ã™ã€‚"
kor "쿼리결과가 없습니다."
+ nla "Query was leeg"
nor "Forespørsel var tom"
norwegian-ny "Førespurnad var tom"
pol "Zapytanie było puste"
@@ -1571,9 +1632,9 @@ ER_EMPTY_QUERY 42000
swe "Frågan var tom"
ukr "ПуÑтий запит"
ER_NONUNIQ_TABLE 42000 S1009
+ chi "表或别åä¸å”¯ä¸€:'%-.192s'"
cze "NejednoznaÄná tabulka/alias: '%-.192s'"
dan "Tabellen/aliaset: '%-.192s' er ikke unikt"
- nla "Niet unieke waarde tabel/alias: '%-.192s'"
eng "Not unique table/alias: '%-.192s'"
est "Ei ole unikaalne tabel/alias '%-.192s'"
fre "Table/alias: '%-.192s' non unique"
@@ -1584,6 +1645,7 @@ ER_NONUNIQ_TABLE 42000 S1009
ita "Tabella/alias non unico: '%-.192s'"
jpn "表åï¼åˆ¥å '%-.192s' ã¯ä¸€æ„ã§ã¯ã‚ã‚Šã¾ã›ã‚“。"
kor "Unique 하지 ì•Šì€ í…Œì´ë¸”/alias: '%-.192s'"
+ nla "Niet unieke waarde tabel/alias: '%-.192s'"
nor "Ikke unikt tabell/alias: '%-.192s'"
norwegian-ny "Ikkje unikt tabell/alias: '%-.192s'"
pol "Tabela/alias nie s? unikalne: '%-.192s'"
@@ -1596,9 +1658,9 @@ ER_NONUNIQ_TABLE 42000 S1009
swe "Icke unikt tabell/alias: '%-.192s'"
ukr "Ðеунікальна таблицÑ/пÑевдонім: '%-.192s'"
ER_INVALID_DEFAULT 42000 S1009
+ chi "'%-.192s'的默认值无效"
cze "Chybná defaultní hodnota pro '%-.192s'"
dan "Ugyldig standardværdi for '%-.192s'"
- nla "Foutieve standaard waarde voor '%-.192s'"
eng "Invalid default value for '%-.192s'"
est "Vigane vaikeväärtus '%-.192s' jaoks"
fre "Valeur par défaut invalide pour '%-.192s'"
@@ -1609,6 +1671,7 @@ ER_INVALID_DEFAULT 42000 S1009
ita "Valore di default non valido per '%-.192s'"
jpn "'%-.192s' ã¸ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒç„¡åŠ¹ã§ã™ã€‚"
kor "'%-.192s'ì˜ ìœ íš¨í•˜ì§€ 못한 ë””í´íŠ¸ ê°’ì„ ì‚¬ìš©í•˜ì…¨ìŠµë‹ˆë‹¤."
+ nla "Foutieve standaard waarde voor '%-.192s'"
nor "Ugyldig standardverdi for '%-.192s'"
norwegian-ny "Ugyldig standardverdi for '%-.192s'"
pol "Niewła?ciwa warto?ć domy?lna dla '%-.192s'"
@@ -1621,9 +1684,9 @@ ER_INVALID_DEFAULT 42000 S1009
swe "Ogiltigt DEFAULT värde för '%-.192s'"
ukr "Ðевірне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾ замовчуванню Ð´Ð»Ñ '%-.192s'"
ER_MULTIPLE_PRI_KEY 42000 S1009
+ chi "定义了多个主键"
cze "Definováno více primárních klíÄů"
dan "Flere primærnøgler specificeret"
- nla "Meerdere primaire zoeksleutels gedefinieerd"
eng "Multiple primary key defined"
est "Mitut primaarset võtit ei saa olla"
fre "Plusieurs clefs primaires définies"
@@ -1634,6 +1697,7 @@ ER_MULTIPLE_PRI_KEY 42000 S1009
ita "Definite piu` chiave primarie"
jpn "PRIMARY KEY ãŒè¤‡æ•°å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ã€‚"
kor "Multiple primary keyê°€ ì •ì˜ë˜ì–´ 있슴"
+ nla "Meerdere primaire zoeksleutels gedefinieerd"
nor "Fleire primærnøkle spesifisert"
norwegian-ny "Fleire primærnyklar spesifisert"
pol "Zdefiniowano wiele kluczy podstawowych"
@@ -1646,19 +1710,20 @@ ER_MULTIPLE_PRI_KEY 42000 S1009
swe "Flera PRIMARY KEY använda"
ukr "Первинного ключа визначено неодноразово"
ER_TOO_MANY_KEYS 42000 S1009
+ chi "定义的索引太多; 最多å…许%d 个索引"
cze "Zadáno příliÅ¡ mnoho klíÄů, je povoleno nejvíce %d klíÄů"
dan "For mange nøgler specificeret. Kun %d nøgler må bruges"
- nla "Teveel zoeksleutels gedefinieerd. Maximaal zijn %d zoeksleutels toegestaan"
eng "Too many keys specified; max %d keys allowed"
est "Liiga palju võtmeid. Maksimaalselt võib olla %d võtit"
fre "Trop de clefs sont définies. Maximum de %d clefs alloué"
ger "Zu viele Schlüssel definiert. Maximal %d Schlüssel erlaubt"
greek "ΠάÏα πολλά key οÏίσθηκαν. Το Ï€Î¿Î»Ï %d επιτÏέπονται"
- hun "Tul sok kulcs. Maximum %d kulcs engedelyezett"
hindi "बहà¥à¤¤ सारी KEYS निरà¥à¤¦à¤¿à¤·à¥à¤Ÿ हैं; अधिकतम %d KEYS की अनà¥à¤®à¤¤à¤¿ है"
+ hun "Tul sok kulcs. Maximum %d kulcs engedelyezett"
ita "Troppe chiavi. Sono ammesse max %d chiavi"
jpn "索引ã®æ•°ãŒå¤šã™ãŽã¾ã™ã€‚最大 %d 個ã¾ã§ã§ã™ã€‚"
kor "너무 ë§Žì€ í‚¤ê°€ ì •ì˜ë˜ì–´ 있습니다.. 최대 %dì˜ í‚¤ê°€ 가능함"
+ nla "Teveel zoeksleutels gedefinieerd. Maximaal zijn %d zoeksleutels toegestaan"
nor "For mange nøkler spesifisert. Maks %d nøkler tillatt"
norwegian-ny "For mange nykler spesifisert. Maks %d nyklar tillatt"
pol "Okre?lono zbyt wiele kluczy. Dostępnych jest maksymalnie %d kluczy"
@@ -1671,9 +1736,9 @@ ER_TOO_MANY_KEYS 42000 S1009
swe "För många nycklar använda. Man får ha högst %d nycklar"
ukr "Забагато ключів зазначено. Дозволено не більше %d ключів"
ER_TOO_MANY_KEY_PARTS 42000 S1009
+ chi "指定的索引部分过多; 最多å…许%d个部分"
cze "Zadáno příliÅ¡ mnoho Äást klíÄů, je povoleno nejvíce %d Äástí"
dan "For mange nøgledele specificeret. Kun %d dele må bruges"
- nla "Teveel zoeksleutel onderdelen gespecificeerd. Maximaal %d onderdelen toegestaan"
eng "Too many key parts specified; max %d parts allowed"
est "Võti koosneb liiga paljudest osadest. Maksimaalselt võib olla %d osa"
fre "Trop de parties specifiées dans la clef. Maximum de %d parties"
@@ -1684,6 +1749,7 @@ ER_TOO_MANY_KEY_PARTS 42000 S1009
ita "Troppe parti di chiave specificate. Sono ammesse max %d parti"
jpn "索引ã®ã‚­ãƒ¼åˆ—指定ãŒå¤šã™ãŽã¾ã™ã€‚最大 %d 個ã¾ã§ã§ã™ã€‚"
kor "너무 ë§Žì€ í‚¤ 부분(parts)ë“¤ì´ ì •ì˜ë˜ì–´ 있습니다.. 최대 %d ë¶€ë¶„ì´ ê°€ëŠ¥í•¨"
+ nla "Teveel zoeksleutel onderdelen gespecificeerd. Maximaal %d onderdelen toegestaan"
nor "For mange nøkkeldeler spesifisert. Maks %d deler tillatt"
norwegian-ny "For mange nykkeldelar spesifisert. Maks %d delar tillatt"
pol "Okre?lono zbyt wiele czę?ci klucza. Dostępnych jest maksymalnie %d czę?ci"
@@ -1696,9 +1762,9 @@ ER_TOO_MANY_KEY_PARTS 42000 S1009
swe "För många nyckeldelar använda. Man får ha högst %d nyckeldelar"
ukr "Забагато чаÑтин ключа зазначено. Дозволено не більше %d чаÑтин"
ER_TOO_LONG_KEY 42000 S1009
+ chi "指定索引太长; 最大索引长度是 %d字节"
cze "Zadaný klÃ­Ä byl příliÅ¡ dlouhý, nejvÄ›tší délka klíÄe je %d"
dan "Specificeret nøgle var for lang. Maksimal nøglelængde er %d"
- nla "Gespecificeerde zoeksleutel was te lang. De maximale lengte is %d"
eng "Specified key was too long; max key length is %d bytes"
est "Võti on liiga pikk. Maksimaalne võtmepikkus on %d"
fre "La clé est trop longue. Longueur maximale: %d"
@@ -1709,6 +1775,7 @@ ER_TOO_LONG_KEY 42000 S1009
ita "La chiave specificata e` troppo lunga. La max lunghezza della chiave e` %d"
jpn "索引ã®ã‚­ãƒ¼ãŒé•·ã™ãŽã¾ã™ã€‚最大 %d ãƒã‚¤ãƒˆã¾ã§ã§ã™ã€‚"
kor "ì •ì˜ëœ 키가 너무 ê¹ë‹ˆë‹¤. 최대 í‚¤ì˜ ê¸¸ì´ëŠ” %d입니다."
+ nla "Gespecificeerde zoeksleutel was te lang. De maximale lengte is %d"
nor "Spesifisert nøkkel var for lang. Maks nøkkellengde er is %d"
norwegian-ny "Spesifisert nykkel var for lang. Maks nykkellengde er %d"
pol "Zdefinowany klucz jest zbyt długi. Maksymaln? długo?ci? klucza jest %d"
@@ -1721,9 +1788,9 @@ ER_TOO_LONG_KEY 42000 S1009
swe "För lång nyckel. Högsta tillåtna nyckellängd är %d"
ukr "Зазначений ключ задовгий. Ðайбільша довжина ключа %d байтів"
ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009
+ chi "索引列'%-.192s'ä¸åœ¨è¡¨é‡Œ"
cze "KlíÄový sloupec '%-.192s' v tabulce neexistuje"
dan "Nøglefeltet '%-.192s' eksisterer ikke i tabellen"
- nla "Zoeksleutel kolom '%-.192s' bestaat niet in tabel"
eng "Key column '%-.192s' doesn't exist in table"
est "Võtme tulp '%-.192s' puudub tabelis"
fre "La clé '%-.192s' n'existe pas dans la table"
@@ -1734,6 +1801,7 @@ ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009
ita "La colonna chiave '%-.192s' non esiste nella tabella"
jpn "キー列 '%-.192s' ã¯è¡¨ã«ã‚ã‚Šã¾ã›ã‚“。"
kor "Key 칼럼 '%-.192s'는 í…Œì´ë¸”ì— ì¡´ìž¬í•˜ì§€ 않습니다."
+ nla "Zoeksleutel kolom '%-.192s' bestaat niet in tabel"
nor "Nøkkel felt '%-.192s' eksiterer ikke i tabellen"
norwegian-ny "Nykkel kolonne '%-.192s' eksiterar ikkje i tabellen"
pol "Kolumna '%-.192s' zdefiniowana w kluczu nie istnieje w tabeli"
@@ -1746,15 +1814,16 @@ ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009
swe "Nyckelkolumn '%-.192s' finns inte"
ukr "Ключовий Ñтовбець '%-.192s' не Ñ–Ñнує у таблиці"
ER_BLOB_USED_AS_KEY 42000 S1009
+ chi "索引里ä¸èƒ½å«æœ‰BLOB列%`s表%s"
eng "BLOB column %`s can't be used in key specification in the %s table"
ger "BLOB-Feld %`s kann beim %s Tabellen nicht als Schlüssel verwendet werden"
hindi "BLOB कॉलम %`s टेबल %s में KEY विनिरà¥à¤¦à¥‡à¤¶ में इसà¥à¤¤à¥‡à¤®à¤¾à¤² नहीं किया जा सकता"
rus "Столбец типа BLOB %`s не может быть иÑпользован как значение ключа в %s таблице"
ukr "BLOB Ñтовбець %`s не може бути викориÑтаний у визначенні ключа в %s таблиці"
ER_TOO_BIG_FIELDLENGTH 42000 S1009
+ chi "æ•°æ®å¤ªé•¿è¶…è¿‡åˆ—å®¹é‡ '%-.192s' (最长 = %lu); 用 BLOB 或 TEXT 替代"
cze "Příliš velká délka sloupce '%-.192s' (nejvíce %lu). Použijte BLOB"
dan "For stor feltlængde for kolonne '%-.192s' (maks = %lu). Brug BLOB i stedet"
- nla "Te grote kolomlengte voor '%-.192s' (max = %lu). Maak hiervoor gebruik van het type BLOB"
eng "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead"
est "Tulba '%-.192s' pikkus on liiga pikk (maksimaalne pikkus: %lu). Kasuta BLOB väljatüüpi"
fre "Champ '%-.192s' trop long (max = %lu). Utilisez un BLOB"
@@ -1765,6 +1834,7 @@ ER_TOO_BIG_FIELDLENGTH 42000 S1009
ita "La colonna '%-.192s' e` troppo grande (max=%lu). Utilizza un BLOB"
jpn "列 '%-.192s' ã®ã‚µã‚¤ã‚ºå®šç¾©ãŒå¤§ãã™ãŽã¾ã™ (最大 %lu ã¾ã§)。代ã‚ã‚Šã« BLOB ã¾ãŸã¯ TEXT を使用ã—ã¦ãã ã•ã„。"
kor "칼럼 '%-.192s'ì˜ ì¹¼ëŸ¼ 길ì´ê°€ 너무 ê¹ë‹ˆë‹¤ (최대 = %lu). ëŒ€ì‹ ì— BLOB를 사용하세요."
+ nla "Te grote kolomlengte voor '%-.192s' (max = %lu). Maak hiervoor gebruik van het type BLOB"
nor "For stor nøkkellengde for kolonne '%-.192s' (maks = %lu). Bruk BLOB istedenfor"
norwegian-ny "For stor nykkellengde for felt '%-.192s' (maks = %lu). Bruk BLOB istadenfor"
pol "Zbyt duża długo?ć kolumny '%-.192s' (maks. = %lu). W zamian użyj typu BLOB"
@@ -1777,9 +1847,9 @@ ER_TOO_BIG_FIELDLENGTH 42000 S1009
swe "För stor kolumnlängd angiven för '%-.192s' (max= %lu). Använd en BLOB instället"
ukr "Задовга довжина ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ '%-.192s' (max = %lu). ВикориÑтайте тип BLOB"
ER_WRONG_AUTO_KEY 42000 S1009
+ chi "表定义ä¸æ­£ç¡®ï¼›åªèƒ½æœ‰ä¸€ä¸ªè‡ªåŠ¨åˆ—,并且必须将其定义为索引"
cze "Můžete mít pouze jedno AUTO pole a to musí být definováno jako klíÄ"
dan "Der kan kun specificeres eet AUTO_INCREMENT-felt, og det skal være indekseret"
- nla "Er kan slechts 1 autofield zijn en deze moet als zoeksleutel worden gedefinieerd"
eng "Incorrect table definition; there can be only one auto column and it must be defined as a key"
est "Vigane tabelikirjeldus; Tabelis tohib olla üks auto_increment tüüpi tulp ning see peab olema defineeritud võtmena"
fre "Un seul champ automatique est permis et il doit être indexé"
@@ -1790,6 +1860,7 @@ ER_WRONG_AUTO_KEY 42000 S1009
ita "Puo` esserci solo un campo AUTO e deve essere definito come chiave"
jpn "ä¸æ­£ãªè¡¨å®šç¾©ã§ã™ã€‚AUTO_INCREMENT列ã¯ï¼‘個ã¾ã§ã§ã€ç´¢å¼•ã‚’定義ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
kor "부정확한 í…Œì´ë¸” ì •ì˜; í…Œì´ë¸”ì€ í•˜ë‚˜ì˜ auto ì¹¼ëŸ¼ì´ ì¡´ìž¬í•˜ê³  키로 ì •ì˜ë˜ì–´ì ¸ì•¼ 합니다."
+ nla "Er kan slechts 1 autofield zijn en deze moet als zoeksleutel worden gedefinieerd"
nor "Bare ett auto felt kan være definert som nøkkel"
norwegian-ny "Bare eitt auto felt kan være definert som nøkkel"
pol "W tabeli może być tylko jedno pole auto i musi ono być zdefiniowane jako klucz"
@@ -1802,12 +1873,13 @@ ER_WRONG_AUTO_KEY 42000 S1009
swe "Det får finnas endast ett AUTO_INCREMENT-fält och detta måste vara en nyckel"
ukr "Хибне Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ–; Може бути лише один автоматичний Ñтовбець, що повинен бути визначений Ñк ключ"
ER_BINLOG_CANT_DELETE_GTID_DOMAIN
- eng "Could not delete gtid domain. Reason: %s."
+ chi "无法删除gtid域. 原因: %s."
+ eng "Could not delete gtid domain. Reason: %s."
ukr "Ðе можу видалити домен gtid. Причина: %s."
ER_NORMAL_SHUTDOWN
+ chi "%s(%s):正常关闭"
cze "%s (%s): normální ukonÄení"
dan "%s (%s): Normal nedlukning"
- nla "%s (%s): Normaal afgesloten "
eng "%s (initiated by: %s): Normal shutdown"
est "%s (%s): MariaDB lõpetas"
fre "%s (%s): Arrêt normal du serveur"
@@ -1818,6 +1890,7 @@ ER_NORMAL_SHUTDOWN
ita "%s (%s): Shutdown normale"
jpn "%s (%s): 通常シャットダウン"
kor "%s (%s): ì •ìƒì ì¸ shutdown"
+ nla "%s (%s): Normaal afgesloten "
nor "%s (%s): Normal avslutning"
norwegian-ny "%s (%s): Normal nedkopling"
pol "%s (%s): Standardowe zakończenie działania"
@@ -1830,9 +1903,9 @@ ER_NORMAL_SHUTDOWN
swe "%s (%s): Normal avslutning"
ukr "%s (%s): Ðормальне завершеннÑ"
ER_GOT_SIGNAL
+ chi "%s: æ”¶åˆ°ä¿¡å· %d. 强行中止!\n"
cze "%s: pÅ™ijat signal %d, konÄím\n"
dan "%s: Fangede signal %d. Afslutter!!\n"
- nla "%s: Signaal %d. Systeem breekt af!\n"
eng "%s: Got signal %d. Aborting!\n"
est "%s: sain signaali %d. Lõpetan!\n"
fre "%s: Reçu le signal %d. Abandonne!\n"
@@ -1843,6 +1916,7 @@ ER_GOT_SIGNAL
ita "%s: Ricevuto segnale %d. Interruzione!\n"
jpn "%s: シグナル %d ã‚’å—ä¿¡ã—ã¾ã—ãŸã€‚強制終了ã—ã¾ã™ï¼\n"
kor "%s: %d 신호가 들어왔ìŒ. 중지!\n"
+ nla "%s: Signaal %d. Systeem breekt af!\n"
nor "%s: Oppdaget signal %d. Avslutter!\n"
norwegian-ny "%s: Oppdaga signal %d. Avsluttar!\n"
pol "%s: Otrzymano sygnał %d. Kończenie działania!\n"
@@ -1855,9 +1929,9 @@ ER_GOT_SIGNAL
swe "%s: Fick signal %d. Avslutar!\n"
ukr "%s: Отримано Ñигнал %d. ПерериваюÑÑŒ!\n"
ER_SHUTDOWN_COMPLETE
+ chi "%s:关闭完æˆ\n"
cze "%s: ukonÄení práce hotovo\n"
dan "%s: Server lukket\n"
- nla "%s: Afsluiten afgerond\n"
eng "%s: Shutdown complete\n"
est "%s: Lõpp\n"
fre "%s: Arrêt du serveur terminé\n"
@@ -1868,6 +1942,7 @@ ER_SHUTDOWN_COMPLETE
ita "%s: Shutdown completato\n"
jpn "%s: シャットダウン完了\n"
kor "%s: Shutdown ì´ ì™„ë£Œë¨!\n"
+ nla "%s: Afsluiten afgerond\n"
nor "%s: Avslutning komplett\n"
norwegian-ny "%s: Nedkopling komplett\n"
pol "%s: Zakończenie działania wykonane\n"
@@ -1880,9 +1955,9 @@ ER_SHUTDOWN_COMPLETE
swe "%s: Avslutning klar\n"
ukr "%s: Роботу завершено\n"
ER_FORCING_CLOSE 08S01
+ chi "%s: 强行关闭线程 %ld 用户: '%-.48s'\n"
cze "%s: násilné uzavření threadu %ld uživatele '%-.48s'\n"
dan "%s: Forceret nedlukning af tråd: %ld bruger: '%-.48s'\n"
- nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.48s'\n"
eng "%s: Forcing close of thread %ld user: '%-.48s'\n"
est "%s: Sulgen jõuga lõime %ld kasutaja: '%-.48s'\n"
fre "%s: Arrêt forcé de la tâche (thread) %ld utilisateur: '%-.48s'\n"
@@ -1893,6 +1968,7 @@ ER_FORCING_CLOSE 08S01
ita "%s: Forzata la chiusura del thread %ld utente: '%-.48s'\n"
jpn "%s: スレッド %ld を強制終了ã—ã¾ã™ (ユーザー: '%-.48s')\n"
kor "%s: thread %ldì˜ ê°•ì œ 종료 user: '%-.48s'\n"
+ nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.48s'\n"
nor "%s: Påtvinget avslutning av tråd %ld bruker: '%-.48s'\n"
norwegian-ny "%s: Påtvinga avslutning av tråd %ld brukar: '%-.48s'\n"
pol "%s: Wymuszenie zamknięcia w?tku %ld użytkownik: '%-.48s'\n"
@@ -1905,9 +1981,9 @@ ER_FORCING_CLOSE 08S01
swe "%s: Stänger av tråd %ld; användare: '%-.48s'\n"
ukr "%s: ПриÑкорюю Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ð³Ñ–Ð»ÐºÐ¸ %ld кориÑтувача: '%-.48s'\n"
ER_IPSOCK_ERROR 08S01
+ chi "无法创建IPæ’å£"
cze "Nemohu vytvořit IP socket"
dan "Kan ikke oprette IP socket"
- nla "Kan IP-socket niet openen"
eng "Can't create IP socket"
est "Ei suuda luua IP socketit"
fre "Ne peut créer la connexion IP (socket)"
@@ -1918,6 +1994,7 @@ ER_IPSOCK_ERROR 08S01
ita "Impossibile creare il socket IP"
jpn "IPソケットを作æˆã§ãã¾ã›ã‚“。"
kor "IP ì†Œì¼“ì„ ë§Œë“¤ì§€ 못했습니다."
+ nla "Kan IP-socket niet openen"
nor "Kan ikke opprette IP socket"
norwegian-ny "Kan ikkje opprette IP socket"
pol "Nie można stworzyć socket'u IP"
@@ -1930,9 +2007,9 @@ ER_IPSOCK_ERROR 08S01
swe "Kan inte skapa IP-socket"
ukr "Ðе можу Ñтворити IP роз'єм"
ER_NO_SUCH_INDEX 42S12 S1009
+ chi "表 '%-.192s' æ²¡æœ‰åƒ CREATE INDEX 中使用的索引;é‡æ–°åˆ›å»ºè¡¨"
cze "Tabulka '%-.192s' nemá index odpovídající CREATE INDEX. Vytvořte tabulku znovu"
dan "Tabellen '%-.192s' har ikke den nøgle, som blev brugt i CREATE INDEX. Genopret tabellen"
- nla "Tabel '%-.192s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw"
eng "Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table"
est "Tabelil '%-.192s' puuduvad võtmed. Loo tabel uuesti"
fre "La table '%-.192s' n'a pas d'index comme celle utilisée dans CREATE INDEX. Recréez la table"
@@ -1943,6 +2020,7 @@ ER_NO_SUCH_INDEX 42S12 S1009
ita "La tabella '%-.192s' non ha nessun indice come quello specificatato dalla CREATE INDEX. Ricrea la tabella"
jpn "表 '%-.192s' ã«ä»¥å‰CREATE INDEXã§ä½œæˆã•ã‚ŒãŸç´¢å¼•ãŒã‚ã‚Šã¾ã›ã‚“。表を作り直ã—ã¦ãã ã•ã„。"
kor "í…Œì´ë¸” '%-.192s'는 ì¸ë±ìŠ¤ë¥¼ 만들지 않았습니다. alter í…Œì´ë¸”ëª…ë ¹ì„ ì´ìš©í•˜ì—¬ í…Œì´ë¸”ì„ ìˆ˜ì •í•˜ì„¸ìš”..."
+ nla "Tabel '%-.192s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw"
nor "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Gjenopprett tabellen"
norwegian-ny "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Oprett tabellen på nytt"
pol "Tabela '%-.192s' nie ma indeksu takiego jak w CREATE INDEX. Stwórz tabelę"
@@ -1955,9 +2033,9 @@ ER_NO_SUCH_INDEX 42S12 S1009
swe "Tabellen '%-.192s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' має індекÑ, що не Ñпівпадає з вказанним у CREATE INDEX. Створіть таблицю знову"
ER_WRONG_FIELD_TERMINATORS 42000 S1009
+ chi "字段分隔符å‚æ•°ä¸åˆé¢„期;查看文档"
cze "Argument separátoru položek nebyl oÄekáván. PÅ™eÄtÄ›te si manuál"
dan "Felt adskiller er ikke som forventet, se dokumentationen"
- nla "De argumenten om velden te scheiden zijn anders dan verwacht. Raadpleeg de handleiding"
eng "Field separator argument is not what is expected; check the manual"
est "Väljade eraldaja erineb oodatust. Tutvu kasutajajuhendiga"
fre "Séparateur de champs inconnu. Vérifiez dans le manuel"
@@ -1968,6 +2046,7 @@ ER_WRONG_FIELD_TERMINATORS 42000 S1009
ita "L'argomento 'Field separator' non e` quello atteso. Controlla il manuale"
jpn "フィールド区切り文字ãŒäºˆæœŸã›ã¬ä½¿ã‚れ方をã—ã¦ã„ã¾ã™ã€‚マニュアルを確èªã—ã¦ä¸‹ã•ã„。"
kor "í•„ë“œ êµ¬ë¶„ìž ì¸ìˆ˜ë“¤ì´ 완전하지 않습니다. ë©”ë‰´ì–¼ì„ ì°¾ì•„ 보세요."
+ nla "De argumenten om velden te scheiden zijn anders dan verwacht. Raadpleeg de handleiding"
nor "Felt skiller argumentene er ikke som forventet, se dokumentasjonen"
norwegian-ny "Felt skiljer argumenta er ikkje som venta, sjå dokumentasjonen"
pol "Nie oczekiwano separatora. SprawdĽ podręcznik"
@@ -1980,9 +2059,9 @@ ER_WRONG_FIELD_TERMINATORS 42000 S1009
swe "Fältseparatorerna är vad som förväntades. Kontrollera mot manualen"
ukr "Хибний розділювач полів. Почитайте документацію"
ER_BLOBS_AND_NO_TERMINATED 42000 S1009
+ chi "您ä¸èƒ½å¯¹ BLOB 使用固定的行长度;请使用 'fields terminated by'"
cze "Není možné použít pevný rowlength s BLOBem. Použijte 'fields terminated by'"
dan "Man kan ikke bruge faste feltlængder med BLOB. Brug i stedet 'fields terminated by'"
- nla "Bij het gebruik van BLOBs is het niet mogelijk om vaste rijlengte te gebruiken. Maak s.v.p. gebruik van 'fields terminated by'"
eng "You can't use fixed rowlength with BLOBs; please use 'fields terminated by'"
est "BLOB-tüüpi väljade olemasolul ei saa kasutada fikseeritud väljapikkust. Vajalik 'fields terminated by' määrang"
fre "Vous ne pouvez utiliser des lignes de longueur fixe avec des BLOBs. Utiliser 'fields terminated by'"
@@ -1993,6 +2072,7 @@ ER_BLOBS_AND_NO_TERMINATED 42000 S1009
ita "Non possono essere usate righe a lunghezza fissa con i BLOB. Usa 'FIELDS TERMINATED BY'"
jpn "BLOBã«ã¯å›ºå®šé•·ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒä½¿ç”¨ã§ãã¾ã›ã‚“。'FIELDS TERMINATED BY'å¥ã‚’使用ã—ã¦ä¸‹ã•ã„。"
kor "BLOB로는 고정길ì´ì˜ lowlength를 사용할 수 없습니다. 'fields terminated by'를 사용하세요."
+ nla "Bij het gebruik van BLOBs is het niet mogelijk om vaste rijlengte te gebruiken. Maak s.v.p. gebruik van 'fields terminated by'"
nor "En kan ikke bruke faste feltlengder med BLOB. Vennlisgt bruk 'fields terminated by'"
norwegian-ny "Ein kan ikkje bruke faste feltlengder med BLOB. Vennlisgt bruk 'fields terminated by'"
pol "Nie można użyć stałej długo?ci wiersza z polami typu BLOB. Użyj 'fields terminated by'"
@@ -2005,9 +2085,9 @@ ER_BLOBS_AND_NO_TERMINATED 42000 S1009
swe "Man kan inte använda fast radlängd med blobs. Använd 'fields terminated by'"
ukr "Ðе можна викориÑтовувати Ñталу довжину Ñтроки з BLOB. ЗкориÑтайтеÑÑ 'fields terminated by'"
ER_TEXTFILE_NOT_READABLE
+ chi "文件'%-.128s'å¿…é¡»ä½äºŽæ•°æ®åº“目录中,或所有人都å¯ä»¥è¯»å–"
cze "Soubor '%-.128s' musí být v adresáři databáze nebo Äitelný pro vÅ¡echny"
dan "Filen '%-.128s' skal være i database-folderen, eller kunne læses af alle"
- nla "Het bestand '%-.128s' dient in de database directory voor the komen of leesbaar voor iedereen te zijn"
eng "The file '%-.128s' must be in the database directory or be readable by all"
est "Fail '%-.128s' peab asuma andmebaasi kataloogis või olema kõigile loetav"
fre "Le fichier '%-.128s' doit être dans le répertoire de la base et lisible par tous"
@@ -2018,6 +2098,7 @@ ER_TEXTFILE_NOT_READABLE
ita "Il file '%-.128s' deve essere nella directory del database e deve essere leggibile da tutti"
jpn "ファイル '%-.128s' ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚ã‚‹ã‹ã€å…¨ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰èª­ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
kor "'%-.128s' í™”ì¼ëŠ” ë°ì´íƒ€ë² ì´ìŠ¤ ë””ë ‰í† ë¦¬ì— ì¡´ìž¬í•˜ê±°ë‚˜ 모ë‘ì—게 ì½ê¸° 가능하여야 합니다."
+ nla "Het bestand '%-.128s' dient in de database directory voor the komen of leesbaar voor iedereen te zijn"
nor "Filen '%-.128s' må være i database-katalogen for å være lesbar for alle"
norwegian-ny "Filen '%-.128s' må være i database-katalogen for å være lesbar for alle"
pol "Plik '%-.128s' musi znajdować sie w katalogu bazy danych lub mieć prawa czytania przez wszystkich"
@@ -2030,9 +2111,9 @@ ER_TEXTFILE_NOT_READABLE
swe "Textfilen '%-.128s' måste finnas i databasbiblioteket eller vara läsbar för alla"
ukr "Файл '%-.128s' повинен бути у теці бази данних або мати вÑтановлене право на Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð´Ð»Ñ ÑƒÑÑ–Ñ…"
ER_FILE_EXISTS_ERROR
+ chi "文件'%-.200s'å·²ç»å­˜åœ¨"
cze "Soubor '%-.200s' již existuje"
dan "Filen '%-.200s' eksisterer allerede"
- nla "Het bestand '%-.200s' bestaat reeds"
eng "File '%-.200s' already exists"
est "Fail '%-.200s' juba eksisteerib"
fre "Le fichier '%-.200s' existe déjà"
@@ -2043,6 +2124,7 @@ ER_FILE_EXISTS_ERROR
ita "Il file '%-.200s' esiste gia`"
jpn "ファイル '%-.200s' ã¯ã™ã§ã«å­˜åœ¨ã—ã¾ã™ã€‚"
kor "'%-.200s' í™”ì¼ì€ ì´ë¯¸ 존재합니다."
+ nla "Het bestand '%-.200s' bestaat reeds"
nor "Filen '%-.200s' eksisterte allerede"
norwegian-ny "Filen '%-.200s' eksisterte allereide"
pol "Plik '%-.200s' już istnieje"
@@ -2055,9 +2137,9 @@ ER_FILE_EXISTS_ERROR
swe "Filen '%-.200s' existerar redan"
ukr "Файл '%-.200s' вже Ñ–Ñнує"
ER_LOAD_INFO
+ chi "记录:%ld删除:%ld跳过:%ld警告:%ld"
cze "Záznamů: %ld Vymazáno: %ld PÅ™eskoÄeno: %ld Varování: %ld"
dan "Poster: %ld Fjernet: %ld Sprunget over: %ld Advarsler: %ld"
- nla "Records: %ld Verwijderd: %ld Overgeslagen: %ld Waarschuwingen: %ld"
eng "Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld"
est "Kirjeid: %ld Kustutatud: %ld Vahele jäetud: %ld Hoiatusi: %ld"
fre "Enregistrements: %ld Effacés: %ld Non traités: %ld Avertissements: %ld"
@@ -2068,6 +2150,7 @@ ER_LOAD_INFO
ita "Records: %ld Cancellati: %ld Saltati: %ld Avvertimenti: %ld"
jpn "レコード数: %ld 削除: %ld スキップ: %ld 警告: %ld"
kor "레코드: %ld개 삭제: %ld개 스킵: %ld개 경고: %ld개"
+ nla "Records: %ld Verwijderd: %ld Overgeslagen: %ld Waarschuwingen: %ld"
nor "Poster: %ld Fjernet: %ld Hoppet over: %ld Advarsler: %ld"
norwegian-ny "Poster: %ld Fjerna: %ld Hoppa over: %ld Ã…tvaringar: %ld"
pol "Recordów: %ld Usuniętych: %ld Pominiętych: %ld Ostrzeżeń: %ld"
@@ -2080,9 +2163,9 @@ ER_LOAD_INFO
swe "Rader: %ld Bortagna: %ld Dubletter: %ld Varningar: %ld"
ukr "ЗапиÑів: %ld Видалено: %ld Пропущено: %ld ЗаÑтережень: %ld"
ER_ALTER_INFO
+ chi "记录: %ld é‡å¤: %ld"
cze "Záznamů: %ld Zdvojených: %ld"
dan "Poster: %ld Ens: %ld"
- nla "Records: %ld Dubbel: %ld"
eng "Records: %ld Duplicates: %ld"
est "Kirjeid: %ld Kattuvaid: %ld"
fre "Enregistrements: %ld Doublons: %ld"
@@ -2093,6 +2176,7 @@ ER_ALTER_INFO
ita "Records: %ld Duplicati: %ld"
jpn "レコード数: %ld é‡è¤‡: %ld"
kor "레코드: %ld개 중복: %ld개"
+ nla "Records: %ld Dubbel: %ld"
nor "Poster: %ld Like: %ld"
norwegian-ny "Poster: %ld Like: %ld"
pol "Rekordów: %ld Duplikatów: %ld"
@@ -2105,9 +2189,9 @@ ER_ALTER_INFO
swe "Rader: %ld Dubletter: %ld"
ukr "ЗапиÑів: %ld Дублікатів: %ld"
ER_WRONG_SUB_KEY
+ chi "å‰ç¼€ç´¢å¼•ä¸æ­£ç¡®ï¼›ä½¿ç”¨çš„索引部分ä¸æ˜¯å­—符串,使用的长度比索引部分长,或者存储引擎ä¸æ”¯æŒç‹¬ç‰¹å‰ç¼€ç´¢å¼•"
cze "Chybná podÄást klíÄe -- není to Å™etÄ›zec nebo je delší než délka Äásti klíÄe"
dan "Forkert indeksdel. Den anvendte nøgledel er ikke en streng eller længden er større end nøglelængden"
- nla "Foutief sub-gedeelte van de zoeksleutel. De gebruikte zoeksleutel is geen onderdeel van een string of of de gebruikte lengte is langer dan de zoeksleutel"
eng "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys"
est "Vigane võtme osa. Kasutatud võtmeosa ei ole string tüüpi, määratud pikkus on pikem kui võtmeosa või tabelihandler ei toeta seda tüüpi võtmeid"
fre "Mauvaise sous-clef. Ce n'est pas un 'string' ou la longueur dépasse celle définie dans la clef"
@@ -2117,6 +2201,7 @@ ER_WRONG_SUB_KEY
ita "Sotto-parte della chiave errata. La parte di chiave utilizzata non e` una stringa o la lunghezza e` maggiore della parte di chiave"
jpn "キーã®ãƒ—レフィックスãŒä¸æ­£ã§ã™ã€‚キーãŒæ–‡å­—列ã§ã¯ãªã„ã‹ã€ãƒ—レフィックス長ãŒã‚­ãƒ¼ã‚ˆã‚Šã‚‚é•·ã„ã‹ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒä¸€æ„索引ã®ãƒ—レフィックス指定をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。"
kor "부정확한 서버 파트 키. ì‚¬ìš©ëœ í‚¤ 파트가 스트ë§ì´ 아니거나 키 íŒŒíŠ¸ì˜ ê¸¸ì´ê°€ 너무 ê¹ë‹ˆë‹¤."
+ nla "Foutief sub-gedeelte van de zoeksleutel. De gebruikte zoeksleutel is geen onderdeel van een string of of de gebruikte lengte is langer dan de zoeksleutel"
nor "Feil delnøkkel. Den brukte delnøkkelen er ikke en streng eller den oppgitte lengde er lengre enn nøkkel lengden"
norwegian-ny "Feil delnykkel. Den brukte delnykkelen er ikkje ein streng eller den oppgitte lengda er lengre enn nykkellengden"
pol "Błędna podczę?ć klucza. Użyta czę?ć klucza nie jest łańcuchem lub użyta długo?ć jest większa niż czę?ć klucza"
@@ -2129,9 +2214,9 @@ ER_WRONG_SUB_KEY
swe "Felaktig delnyckel. Nyckeldelen är inte en sträng eller den angivna längden är längre än kolumnlängden"
ukr "Ðевірна чаÑтина ключа. ВикориÑтана чаÑтина ключа не Ñ” Ñтрокою, задовга або вказівник таблиці не підтримує унікальних чаÑтин ключей"
ER_CANT_REMOVE_ALL_FIELDS 42000
+ chi "您ä¸èƒ½ä½¿ç”¨ ALTER TABLE 删除所有列;改用 DROP TABLE"
cze "Není možné vymazat všechny položky s ALTER TABLE. Použijte DROP TABLE"
dan "Man kan ikke slette alle felter med ALTER TABLE. Brug DROP TABLE i stedet"
- nla "Het is niet mogelijk alle velden te verwijderen met ALTER TABLE. Gebruik a.u.b. DROP TABLE hiervoor!"
eng "You can't delete all columns with ALTER TABLE; use DROP TABLE instead"
est "ALTER TABLE kasutades ei saa kustutada kõiki tulpasid. Kustuta tabel DROP TABLE abil"
fre "Vous ne pouvez effacer tous les champs avec ALTER TABLE. Utilisez DROP TABLE"
@@ -2142,6 +2227,7 @@ ER_CANT_REMOVE_ALL_FIELDS 42000
ita "Non si possono cancellare tutti i campi con una ALTER TABLE. Utilizzare DROP TABLE"
jpn "ALTER TABLE ã§ã¯å…¨ã¦ã®åˆ—ã®å‰Šé™¤ã¯ã§ãã¾ã›ã‚“。DROP TABLE を使用ã—ã¦ãã ã•ã„。"
kor "ALTER TABLE 명령으로는 모든 ì¹¼ëŸ¼ì„ ì§€ìš¸ 수 없습니다. DROP TABLE ëª…ë ¹ì„ ì´ìš©í•˜ì„¸ìš”."
+ nla "Het is niet mogelijk alle velden te verwijderen met ALTER TABLE. Gebruik a.u.b. DROP TABLE hiervoor!"
nor "En kan ikke slette alle felt med ALTER TABLE. Bruk DROP TABLE isteden"
norwegian-ny "Ein kan ikkje slette alle felt med ALTER TABLE. Bruk DROP TABLE istadenfor"
pol "Nie można usun?ć wszystkich pól wykorzystuj?c ALTER TABLE. W zamian użyj DROP TABLE"
@@ -2154,9 +2240,9 @@ ER_CANT_REMOVE_ALL_FIELDS 42000
swe "Man kan inte radera alla fält med ALTER TABLE. Använd DROP TABLE istället"
ukr "Ðе можливо видалити вÑÑ– Ñтовбці за допомогою ALTER TABLE. Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ ÑкориÑтайтеÑÑ DROP TABLE"
ER_CANT_DROP_FIELD_OR_KEY 42000
+ chi "ä¸èƒ½ DROP %s %`-.192s; 检查它是å¦å­˜åœ¨"
cze "Nemohu zruÅ¡it (DROP %s) %`-.192s. Zkontrolujte, zda neexistují záznamy/klíÄe"
dan "Kan ikke udføre DROP %s %`-.192s. Undersøg om feltet/nøglen eksisterer"
- nla "DROP %s: Kan %`-.192s niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat"
eng "Can't DROP %s %`-.192s; check that it exists"
est "Ei suuda kustutada (DROP %s) %`-.192s. Kontrolli kas tulp/võti eksisteerib"
fre "Ne peut effacer (DROP %s) %`-.192s. Vérifiez s'il existe"
@@ -2165,6 +2251,7 @@ ER_CANT_DROP_FIELD_OR_KEY 42000
hindi "%s %`-.192s को डà¥à¤°à¥‰à¤ª नहीं कर सकते हैं; कृपया जाà¤à¤š करें कि यह मौजूद है"
hun "A DROP %s %`-.192s nem lehetseges. Ellenorizze, hogy a mezo/kulcs letezik-e"
ita "Impossibile cancellare (DROP %s) %`-.192s. Controllare che il campo chiave esista"
+ nla "DROP %s: Kan %`-.192s niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat"
nor "Kan ikke DROP %s %`-.192s. Undersøk om felt/nøkkel eksisterer"
norwegian-ny "Kan ikkje DROP %s %`-.192s. Undersøk om felt/nøkkel eksisterar"
pol "Nie można wykonać operacji DROP %s %`-.192s. SprawdĽ, czy to pole/klucz istnieje"
@@ -2177,9 +2264,9 @@ ER_CANT_DROP_FIELD_OR_KEY 42000
swe "Kan inte ta bort (DROP %s) %`-.192s. Kontrollera att begränsningen/fältet/nyckel finns"
ukr "Ðе можу DROP %s %`-.192s. Перевірте, чи він Ñ–Ñнує"
ER_INSERT_INFO
+ chi "记录: %ld é‡å¤: %ld 警告: %ld"
cze "Záznamů: %ld Zdvojených: %ld Varování: %ld"
dan "Poster: %ld Ens: %ld Advarsler: %ld"
- nla "Records: %ld Dubbel: %ld Waarschuwing: %ld"
eng "Records: %ld Duplicates: %ld Warnings: %ld"
est "Kirjeid: %ld Kattuvaid: %ld Hoiatusi: %ld"
fre "Enregistrements: %ld Doublons: %ld Avertissements: %ld"
@@ -2190,6 +2277,7 @@ ER_INSERT_INFO
ita "Records: %ld Duplicati: %ld Avvertimenti: %ld"
jpn "レコード数: %ld é‡è¤‡æ•°: %ld 警告: %ld"
kor "레코드: %ld개 중복: %ld개 경고: %ld개"
+ nla "Records: %ld Dubbel: %ld Waarschuwing: %ld"
nor "Poster: %ld Like: %ld Advarsler: %ld"
norwegian-ny "Postar: %ld Like: %ld Ã…tvaringar: %ld"
pol "Rekordów: %ld Duplikatów: %ld Ostrzeżeń: %ld"
@@ -2202,13 +2290,14 @@ ER_INSERT_INFO
swe "Rader: %ld Dubletter: %ld Varningar: %ld"
ukr "ЗапиÑів: %ld Дублікатів: %ld ЗаÑтережень: %ld"
ER_UPDATE_TABLE_USED
+ chi "表 '%-.192s' 被指定了两次, å³ä½œä¸º '%s' 的目标,åˆä½œä¸ºæ•°æ®çš„独立æº"
eng "Table '%-.192s' is specified twice, both as a target for '%s' and as a separate source for data"
swe "Table '%-.192s' är använd två gånger. Både för '%s' och för att hämta data"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' вказуєтьÑÑ Ð´Ð²Ñ–Ñ‡Ñ–, Ñк цільова Ð´Ð»Ñ '%s', так Ñ– Ñк окреме джерело даних"
ER_NO_SUCH_THREAD
+ chi "未知线程ID:%lu"
cze "Neznámá identifikace threadu: %lu"
dan "Ukendt tråd id: %lu"
- nla "Onbekend thread id: %lu"
eng "Unknown thread id: %lu"
est "Tundmatu lõim: %lu"
fre "Numéro de tâche inconnu: %lu"
@@ -2219,6 +2308,7 @@ ER_NO_SUCH_THREAD
ita "Thread id: %lu sconosciuto"
jpn "ä¸æ˜Žãªã‚¹ãƒ¬ãƒƒãƒ‰IDã§ã™: %lu"
kor "알수 없는 쓰레드 id: %lu"
+ nla "Onbekend thread id: %lu"
nor "Ukjent tråd id: %lu"
norwegian-ny "Ukjent tråd id: %lu"
pol "Nieznany identyfikator w?tku: %lu"
@@ -2231,9 +2321,9 @@ ER_NO_SUCH_THREAD
swe "Finns ingen tråd med id %lu"
ukr "Ðевідомий ідентифікатор гілки: %lu"
ER_KILL_DENIED_ERROR
+ chi "ä½ ä¸æ˜¯çº¿ç¨‹%lld的所有者"
cze "Nejste vlastníkem threadu %lld"
dan "Du er ikke ejer af tråden %lld"
- nla "U bent geen bezitter van thread %lld"
eng "You are not owner of thread %lld"
est "Ei ole lõime %lld omanik"
fre "Vous n'êtes pas propriétaire de la tâche no: %lld"
@@ -2244,6 +2334,7 @@ ER_KILL_DENIED_ERROR
ita "Utente non proprietario del thread %lld"
jpn "スレッド %lld ã®ã‚ªãƒ¼ãƒŠãƒ¼ã§ã¯ã‚ã‚Šã¾ã›ã‚“。"
kor "쓰레드(Thread) %lldì˜ ì†Œìœ ìžê°€ 아닙니다."
+ nla "U bent geen bezitter van thread %lld"
nor "Du er ikke eier av tråden %lld"
norwegian-ny "Du er ikkje eigar av tråd %lld"
pol "Nie jeste? wła?cicielem w?tku %lld"
@@ -2256,9 +2347,9 @@ ER_KILL_DENIED_ERROR
swe "Du är inte ägare till tråd %lld"
ukr "Ви не володар гілки %lld"
ER_NO_TABLES_USED
+ chi "没有使用表"
cze "Nejsou použity žádné tabulky"
dan "Ingen tabeller i brug"
- nla "Geen tabellen gebruikt"
eng "No tables used"
est "Ãœhtegi tabelit pole kasutusel"
fre "Aucune table utilisée"
@@ -2269,6 +2360,7 @@ ER_NO_TABLES_USED
ita "Nessuna tabella usata"
jpn "表ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "ì–´ë–¤ í…Œì´ë¸”ë„ ì‚¬ìš©ë˜ì§€ 않았습니다."
+ nla "Geen tabellen gebruikt"
nor "Ingen tabeller i bruk"
norwegian-ny "Ingen tabellar i bruk"
pol "Nie ma żadej użytej tabeli"
@@ -2281,9 +2373,9 @@ ER_NO_TABLES_USED
swe "Inga tabeller angivna"
ukr "Ðе викориÑтано таблиць"
ER_TOO_BIG_SET
+ chi "列 %-.192s 和SET的字符串过多"
cze "Příliš mnoho řetězců pro sloupec %-.192s a SET"
dan "For mange tekststrenge til specifikationen af SET i kolonne %-.192s"
- nla "Teveel strings voor kolom %-.192s en SET"
eng "Too many strings for column %-.192s and SET"
est "Liiga palju string tulbale %-.192s tüübile SET"
fre "Trop de chaînes dans la colonne %-.192s avec SET"
@@ -2293,6 +2385,7 @@ ER_TOO_BIG_SET
ita "Troppe stringhe per la colonna %-.192s e la SET"
jpn "SETåž‹ã®åˆ— '%-.192s' ã®ãƒ¡ãƒ³ãƒãƒ¼ã®æ•°ãŒå¤šã™ãŽã¾ã™ã€‚"
kor "칼럼 %-.192s와 SETì—ì„œ 스트ë§ì´ 너무 많습니다."
+ nla "Teveel strings voor kolom %-.192s en SET"
nor "For mange tekststrenger kolonne %-.192s og SET"
norwegian-ny "For mange tekststrengar felt %-.192s og SET"
pol "Zbyt wiele łańcuchów dla kolumny %-.192s i polecenia SET"
@@ -2305,9 +2398,9 @@ ER_TOO_BIG_SET
swe "För många alternativ till kolumn %-.192s för SET"
ukr "Забагато Ñтрок Ð´Ð»Ñ ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ %-.192s та SET"
ER_NO_UNIQUE_LOGFILE
+ chi "无法生æˆå”¯ä¸€çš„log-filename%-.200s.(1-999)\ n"
cze "Nemohu vytvoÅ™it jednoznaÄné jméno logovacího souboru %-.200s.(1-999)\n"
dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)\n"
- nla "Het is niet mogelijk een unieke naam te maken voor de logfile %-.200s.(1-999)\n"
eng "Can't generate a unique log-filename %-.200s.(1-999)\n"
est "Ei suuda luua unikaalset logifaili nime %-.200s.(1-999)\n"
fre "Ne peut générer un unique nom de journal %-.200s.(1-999)\n"
@@ -2318,6 +2411,7 @@ ER_NO_UNIQUE_LOGFILE
ita "Impossibile generare un nome del file log unico %-.200s.(1-999)\n"
jpn "一æ„ãªãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«å %-.200s.(1-999) を生æˆã§ãã¾ã›ã‚“。\n"
kor "Unique ë¡œê·¸í™”ì¼ '%-.200s'를 만들수 없습니다.(1-999)\n"
+ nla "Het is niet mogelijk een unieke naam te maken voor de logfile %-.200s.(1-999)\n"
nor "Kan ikke lage unikt loggfilnavn %-.200s.(1-999)\n"
norwegian-ny "Kan ikkje lage unikt loggfilnavn %-.200s.(1-999)\n"
pol "Nie można stworzyć unikalnej nazwy pliku z logiem %-.200s.(1-999)\n"
@@ -2330,9 +2424,9 @@ ER_NO_UNIQUE_LOGFILE
swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n"
ukr "Ðе можу згенерувати унікальне ім'Ñ log-файлу %-.200s.(1-999)\n"
ER_TABLE_NOT_LOCKED_FOR_WRITE
+ chi "表 '%-.192s' 有 READ é”,无法更新"
cze "Tabulka '%-.192s' byla zamÄena s READ a nemůže být zmÄ›nÄ›na"
dan "Tabellen '%-.192s' var låst med READ lås og kan ikke opdateres"
- nla "Tabel '%-.192s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen"
eng "Table '%-.192s' was locked with a READ lock and can't be updated"
est "Tabel '%-.192s' on lukustatud READ lukuga ning ei ole muudetav"
fre "Table '%-.192s' verrouillée lecture (READ): modification impossible"
@@ -2343,6 +2437,7 @@ ER_TABLE_NOT_LOCKED_FOR_WRITE
ita "La tabella '%-.192s' e` soggetta a lock in lettura e non puo` essere aggiornata"
jpn "表 '%-.192s' ã¯READロックã•ã‚Œã¦ã„ã¦ã€æ›´æ–°ã§ãã¾ã›ã‚“。"
kor "í…Œì´ë¸” '%-.192s'는 READ ë½ì´ 잠겨있어서 갱신할 수 없습니다."
+ nla "Tabel '%-.192s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen"
nor "Tabellen '%-.192s' var låst med READ lås og kan ikke oppdateres"
norwegian-ny "Tabellen '%-.192s' var låst med READ lås og kan ikkje oppdaterast"
pol "Tabela '%-.192s' została zablokowana przez READ i nie może zostać zaktualizowana"
@@ -2355,9 +2450,9 @@ ER_TABLE_NOT_LOCKED_FOR_WRITE
swe "Tabell '%-.192s' kan inte uppdateras emedan den är låst för läsning"
ukr "Таблицю '%-.192s' заблоковано тільки Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ, тому Ñ—Ñ— не можна оновити"
ER_TABLE_NOT_LOCKED
+ chi "表 '%-.192s' 未使用 LOCK TABLES é”定"
cze "Tabulka '%-.192s' nebyla zamÄena s LOCK TABLES"
dan "Tabellen '%-.192s' var ikke låst med LOCK TABLES"
- nla "Tabel '%-.192s' was niet gelocked met LOCK TABLES"
eng "Table '%-.192s' was not locked with LOCK TABLES"
est "Tabel '%-.192s' ei ole lukustatud käsuga LOCK TABLES"
fre "Table '%-.192s' non verrouillée: utilisez LOCK TABLES"
@@ -2368,6 +2463,7 @@ ER_TABLE_NOT_LOCKED
ita "Non e` stato impostato il lock per la tabella '%-.192s' con LOCK TABLES"
jpn "表 '%-.192s' 㯠LOCK TABLES ã§ãƒ­ãƒƒã‚¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "í…Œì´ë¸” '%-.192s'는 LOCK TABLES 명령으로 잠기지 않았습니다."
+ nla "Tabel '%-.192s' was niet gelocked met LOCK TABLES"
nor "Tabellen '%-.192s' var ikke låst med LOCK TABLES"
norwegian-ny "Tabellen '%-.192s' var ikkje låst med LOCK TABLES"
pol "Tabela '%-.192s' nie została zablokowana poleceniem LOCK TABLES"
@@ -2380,11 +2476,12 @@ ER_TABLE_NOT_LOCKED
swe "Tabell '%-.192s' är inte låst med LOCK TABLES"
ukr "Таблицю '%-.192s' не було блоковано з LOCK TABLES"
ER_UNUSED_17
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_WRONG_DB_NAME 42000
+ chi "æ•°æ®åº“å称ä¸æ­£ç¡®'%-.100T'"
cze "Nepřípustné jméno databáze '%-.100T'"
dan "Ugyldigt database navn '%-.100T'"
- nla "Databasenaam '%-.100T' is niet getoegestaan"
eng "Incorrect database name '%-.100T'"
est "Vigane andmebaasi nimi '%-.100T'"
fre "Nom de base de donnée illégal: '%-.100T'"
@@ -2395,6 +2492,7 @@ ER_WRONG_DB_NAME 42000
ita "Nome database errato '%-.100T'"
jpn "データベースå '%-.100T' ã¯ä¸æ­£ã§ã™ã€‚"
kor "'%-.100T' ë°ì´íƒ€ë² ì´ìŠ¤ì˜ ì´ë¦„ì´ ë¶€ì •í™•í•©ë‹ˆë‹¤."
+ nla "Databasenaam '%-.100T' is niet getoegestaan"
nor "Ugyldig database navn '%-.100T'"
norwegian-ny "Ugyldig database namn '%-.100T'"
pol "Niedozwolona nazwa bazy danych '%-.100T'"
@@ -2407,9 +2505,9 @@ ER_WRONG_DB_NAME 42000
swe "Felaktigt databasnamn '%-.100T'"
ukr "Ðевірне ім'Ñ Ð±Ð°Ð·Ð¸ данних '%-.100T'"
ER_WRONG_TABLE_NAME 42000
+ chi "表åä¸æ­£ç¡®'%-.100s'"
cze "Nepřípustné jméno tabulky '%-.100s'"
dan "Ugyldigt tabel navn '%-.100s'"
- nla "Niet toegestane tabelnaam '%-.100s'"
eng "Incorrect table name '%-.100s'"
est "Vigane tabeli nimi '%-.100s'"
fre "Nom de table illégal: '%-.100s'"
@@ -2420,6 +2518,7 @@ ER_WRONG_TABLE_NAME 42000
ita "Nome tabella errato '%-.100s'"
jpn "表å '%-.100s' ã¯ä¸æ­£ã§ã™ã€‚"
kor "'%-.100s' í…Œì´ë¸” ì´ë¦„ì´ ë¶€ì •í™•í•©ë‹ˆë‹¤."
+ nla "Niet toegestane tabelnaam '%-.100s'"
nor "Ugyldig tabell navn '%-.100s'"
norwegian-ny "Ugyldig tabell namn '%-.100s'"
pol "Niedozwolona nazwa tabeli '%-.100s'..."
@@ -2432,19 +2531,20 @@ ER_WRONG_TABLE_NAME 42000
swe "Felaktigt tabellnamn '%-.100s'"
ukr "Ðевірне ім'Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– '%-.100s'"
ER_TOO_BIG_SELECT 42000
+ chi "SELECT 将检查超过 MAX_JOIN_SIZE 行;检查您的 WHERE 并使用 SET SQL_BIG_SELECTS=1 或 SET MAX_JOIN_SIZE=# 如果 SELECT 没问题"
cze "Zadaný SELECT by procházel příliš mnoho záznamů a trval velmi dlouho. Zkontrolujte tvar WHERE a je-li SELECT v pořádku, použijte SET SQL_BIG_SELECTS=1"
dan "SELECT ville undersøge for mange poster og ville sandsynligvis tage meget lang tid. Undersøg WHERE delen og brug SET SQL_BIG_SELECTS=1 hvis udtrykket er korrekt"
- nla "Het SELECT-statement zou te veel records analyseren en dus veel tijd in beslagnemen. Kijk het WHERE-gedeelte van de query na en kies SET SQL_BIG_SELECTS=1 als het stament in orde is"
eng "The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay"
est "SELECT lause peab läbi vaatama suure hulga kirjeid ja võtaks tõenäoliselt liiga kaua aega. Tasub kontrollida WHERE klauslit ja vajadusel kasutada käsku SET SQL_BIG_SELECTS=1"
fre "SELECT va devoir examiner beaucoup d'enregistrements ce qui va prendre du temps. Vérifiez la clause WHERE et utilisez SET SQL_BIG_SELECTS=1 si SELECT se passe bien"
ger "Die Ausführung des SELECT würde zu viele Datensätze untersuchen und wahrscheinlich sehr lange dauern. Bitte WHERE-Klausel überprüfen und gegebenenfalls SET SQL_BIG_SELECTS=1 oder SET MAX_JOIN_SIZE=# verwenden"
greek "Το SELECT θα εξετάσει μεγάλο αÏιθμό εγγÏαφών και πιθανώς θα καθυστεÏήσει. ΠαÏακαλώ εξετάστε τις παÏαμέτÏους του WHERE και χÏησιμοποιείστε SET SQL_BIG_SELECTS=1 αν το SELECT είναι σωστό"
- hun "A SELECT tul sok rekordot fog megvizsgalni es nagyon sokaig fog tartani. Ellenorizze a WHERE-t es hasznalja a SET SQL_BIG_SELECTS=1 beallitast, ha a SELECT okay"
hindi "SELECT कमांड MAX_JOIN_SIZE पंकà¥à¤¤à¤¿à¤¯à¥‹à¤‚ से भी जà¥à¤¯à¤¾à¤¦à¤¾ की जांच करेगा; कृपया WHERE कà¥à¤²à¥‰à¥› को जाचें अथवा SET SQL_BIG_SELECTS=1 या SET MAX_JOIN_SIZE=# का इसà¥à¤¤à¥‡à¤®à¤¾à¤² करें"
+ hun "A SELECT tul sok rekordot fog megvizsgalni es nagyon sokaig fog tartani. Ellenorizze a WHERE-t es hasznalja a SET SQL_BIG_SELECTS=1 beallitast, ha a SELECT okay"
ita "La SELECT dovrebbe esaminare troppi record e usare troppo tempo. Controllare la WHERE e usa SET SQL_BIG_SELECTS=1 se e` tutto a posto"
jpn "SELECTãŒMAX_JOIN_SIZEを超ãˆã‚‹è¡Œæ•°ã‚’処ç†ã—ã¾ã—ãŸã€‚WHEREå¥ã‚’確èªã—ã€SELECTæ–‡ã«å•é¡ŒãŒãªã‘ã‚Œã°ã€ SET SQL_BIG_SELECTS=1 ã¾ãŸã¯ SET MAX_JOIN_SIZE=# を使用ã—ã¦ä¸‹ã•ã„。"
kor "SELECT 명령ì—ì„œ 너무 ë§Žì€ ë ˆì½”ë“œë¥¼ 찾기 ë•Œë¬¸ì— ë§Žì€ ì‹œê°„ì´ ì†Œìš”ë©ë‹ˆë‹¤. ë”°ë¼ì„œ WHERE ë¬¸ì„ ì ê²€í•˜ê±°ë‚˜, 만약 SELECTê°€ okë˜ë©´ SET SQL_BIG_SELECTS=1 ì˜µì…˜ì„ ì‚¬ìš©í•˜ì„¸ìš”."
+ nla "Het SELECT-statement zou te veel records analyseren en dus veel tijd in beslagnemen. Kijk het WHERE-gedeelte van de query na en kies SET SQL_BIG_SELECTS=1 als het stament in orde is"
nor "SELECT ville undersøke for mange poster og ville sannsynligvis ta veldig lang tid. Undersøk WHERE klausulen og bruk SET SQL_BIG_SELECTS=1 om SELECTen er korrekt"
norwegian-ny "SELECT ville undersøkje for mange postar og ville sannsynligvis ta veldig lang tid. Undersøk WHERE klausulen og bruk SET SQL_BIG_SELECTS=1 om SELECTen er korrekt"
pol "Operacja SELECT będzie dotyczyła zbyt wielu rekordów i prawdopodobnie zajmie bardzo dużo czasu. SprawdĽ warunek WHERE i użyj SQL_OPTION BIG_SELECTS=1 je?li operacja SELECT jest poprawna"
@@ -2457,9 +2557,9 @@ ER_TOO_BIG_SELECT 42000
swe "Den angivna frågan skulle läsa mer än MAX_JOIN_SIZE rader. Kontrollera din WHERE och använd SET SQL_BIG_SELECTS=1 eller SET MAX_JOIN_SIZE=# ifall du vill hantera stora joins"
ukr "Запиту SELECT потрібно обробити багато запиÑів, що, певне, займе дуже багато чаÑу. Перевірте ваше WHERE та викориÑтовуйте SET SQL_BIG_SELECTS=1, Ñкщо цей запит SELECT Ñ” вірним"
ER_UNKNOWN_ERROR
+ chi "未知错误"
cze "Neznámá chyba"
dan "Ukendt fejl"
- nla "Onbekende Fout"
eng "Unknown error"
est "Tundmatu viga"
fre "Erreur inconnue"
@@ -2470,6 +2570,7 @@ ER_UNKNOWN_ERROR
ita "Errore sconosciuto"
jpn "ä¸æ˜Žãªã‚¨ãƒ©ãƒ¼"
kor "알수 없는 ì—러입니다."
+ nla "Onbekende Fout"
nor "Ukjent feil"
norwegian-ny "Ukjend feil"
por "Erro desconhecido"
@@ -2481,9 +2582,9 @@ ER_UNKNOWN_ERROR
swe "Okänt fel"
ukr "Ðевідома помилка"
ER_UNKNOWN_PROCEDURE 42000
+ chi "未知存储过程 '%-.192s'"
cze "Neznámá procedura %-.192s"
dan "Ukendt procedure %-.192s"
- nla "Onbekende procedure %-.192s"
eng "Unknown procedure '%-.192s'"
est "Tundmatu protseduur '%-.192s'"
fre "Procédure %-.192s inconnue"
@@ -2494,6 +2595,7 @@ ER_UNKNOWN_PROCEDURE 42000
ita "Procedura '%-.192s' sconosciuta"
jpn "'%-.192s' ã¯ä¸æ˜Žãªãƒ—ロシージャã§ã™ã€‚"
kor "알수 없는 수행문 : '%-.192s'"
+ nla "Onbekende procedure %-.192s"
nor "Ukjent prosedyre %-.192s"
norwegian-ny "Ukjend prosedyre %-.192s"
pol "Unkown procedure %-.192s"
@@ -2506,9 +2608,9 @@ ER_UNKNOWN_PROCEDURE 42000
swe "Okänd procedur: %-.192s"
ukr "Ðевідома процедура '%-.192s'"
ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000
+ chi "存储过程 '%-.192s' 需è¦çš„å‚æ•°å’Œæ供的å‚æ•°ä¸å»åˆ"
cze "Chybný poÄet parametrů procedury %-.192s"
dan "Forkert antal parametre til proceduren %-.192s"
- nla "Foutief aantal parameters doorgegeven aan procedure %-.192s"
eng "Incorrect parameter count to procedure '%-.192s'"
est "Vale parameetrite hulk protseduurile '%-.192s'"
fre "Mauvais nombre de paramètres pour la procedure %-.192s"
@@ -2519,6 +2621,7 @@ ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000
ita "Numero di parametri errato per la procedura '%-.192s'"
jpn "プロシージャ '%-.192s' ã¸ã®ãƒ‘ラメータ数ãŒä¸æ­£ã§ã™ã€‚"
kor "'%-.192s' ìˆ˜í–‰ë¬¸ì— ëŒ€í•œ 부정확한 파ë¼ë©”í„°"
+ nla "Foutief aantal parameters doorgegeven aan procedure %-.192s"
nor "Feil parameter antall til prosedyren %-.192s"
norwegian-ny "Feil parameter tal til prosedyra %-.192s"
pol "Incorrect parameter count to procedure %-.192s"
@@ -2531,9 +2634,9 @@ ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000
swe "Felaktigt antal parametrar till procedur %-.192s"
ukr "Хибна кількіÑÑ‚ÑŒ параметрів процедури '%-.192s'"
ER_WRONG_PARAMETERS_TO_PROCEDURE
+ chi "存储过程 '%-.192s' çš„å‚æ•°ä¸å¯¹"
cze "Chybné parametry procedury %-.192s"
dan "Forkert(e) parametre til proceduren %-.192s"
- nla "Foutieve parameters voor procedure %-.192s"
eng "Incorrect parameters to procedure '%-.192s'"
est "Vigased parameetrid protseduurile '%-.192s'"
fre "Paramètre erroné pour la procedure %-.192s"
@@ -2544,6 +2647,7 @@ ER_WRONG_PARAMETERS_TO_PROCEDURE
ita "Parametri errati per la procedura '%-.192s'"
jpn "プロシージャ '%-.192s' ã¸ã®ãƒ‘ラメータãŒä¸æ­£ã§ã™ã€‚"
kor "'%-.192s' ìˆ˜í–‰ë¬¸ì— ëŒ€í•œ 부정확한 파ë¼ë©”í„°"
+ nla "Foutieve parameters voor procedure %-.192s"
nor "Feil parametre til prosedyren %-.192s"
norwegian-ny "Feil parameter til prosedyra %-.192s"
pol "Incorrect parameters to procedure %-.192s"
@@ -2556,9 +2660,9 @@ ER_WRONG_PARAMETERS_TO_PROCEDURE
swe "Felaktiga parametrar till procedur %-.192s"
ukr "Хибний параметер процедури '%-.192s'"
ER_UNKNOWN_TABLE 42S02
+ chi "未知表å '%-.192s' 在 %-.32s"
cze "Neznámá tabulka '%-.192s' v %-.32s"
dan "Ukendt tabel '%-.192s' i %-.32s"
- nla "Onbekende tabel '%-.192s' in %-.32s"
eng "Unknown table '%-.192s' in %-.32s"
est "Tundmatu tabel '%-.192s' %-.32s-s"
fre "Table inconnue '%-.192s' dans %-.32s"
@@ -2569,6 +2673,7 @@ ER_UNKNOWN_TABLE 42S02
ita "Tabella '%-.192s' sconosciuta in %-.32s"
jpn "'%-.192s' 㯠%-.32s ã§ã¯ä¸æ˜Žãªè¡¨ã§ã™ã€‚"
kor "알수 없는 í…Œì´ë¸” '%-.192s' (ë°ì´íƒ€ë² ì´ìŠ¤ %-.32s)"
+ nla "Onbekende tabel '%-.192s' in %-.32s"
nor "Ukjent tabell '%-.192s' i %-.32s"
norwegian-ny "Ukjend tabell '%-.192s' i %-.32s"
pol "Unknown table '%-.192s' in %-.32s"
@@ -2581,9 +2686,9 @@ ER_UNKNOWN_TABLE 42S02
swe "Okänd tabell '%-.192s' i '%-.32s'"
ukr "Ðевідома Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' у %-.32s"
ER_FIELD_SPECIFIED_TWICE 42000
+ chi "列 '%-.192s' 被指定了两次"
cze "Položka '%-.192s' je zadána dvakrát"
dan "Feltet '%-.192s' er anvendt to gange"
- nla "Veld '%-.192s' is dubbel gespecificeerd"
eng "Column '%-.192s' specified twice"
est "Tulp '%-.192s' on määratletud topelt"
fre "Champ '%-.192s' spécifié deux fois"
@@ -2594,6 +2699,7 @@ ER_FIELD_SPECIFIED_TWICE 42000
ita "Campo '%-.192s' specificato 2 volte"
jpn "列 '%-.192s' ã¯2回指定ã•ã‚Œã¦ã„ã¾ã™ã€‚"
kor "칼럼 '%-.192s'는 ë‘번 ì •ì˜ë˜ì–´ 있습니다."
+ nla "Veld '%-.192s' is dubbel gespecificeerd"
nor "Feltet '%-.192s' er spesifisert to ganger"
norwegian-ny "Feltet '%-.192s' er spesifisert to gangar"
pol "Field '%-.192s' specified twice"
@@ -2606,9 +2712,9 @@ ER_FIELD_SPECIFIED_TWICE 42000
swe "Fält '%-.192s' är redan använt"
ukr "Стовбець '%-.192s' зазначено двічі"
ER_INVALID_GROUP_FUNC_USE
+ chi "组函数使用无效"
cze "Nesprávné použití funkce group"
dan "Forkert brug af grupperings-funktion"
- nla "Ongeldig gebruik van GROUP-functie"
eng "Invalid use of group function"
est "Vigane grupeerimisfunktsiooni kasutus"
fre "Utilisation invalide de la clause GROUP"
@@ -2619,6 +2725,7 @@ ER_INVALID_GROUP_FUNC_USE
ita "Uso non valido di una funzione di raggruppamento"
jpn "集計関数ã®ä½¿ç”¨æ–¹æ³•ãŒä¸æ­£ã§ã™ã€‚"
kor "ìž˜ëª»ëœ ê·¸ë£¹ 함수를 사용하였습니다."
+ nla "Ongeldig gebruik van GROUP-functie"
por "Uso inválido de função de agrupamento (GROUP)"
rum "Folosire incorecta a functiei group"
rus "Ðеправильное иÑпользование групповых функций"
@@ -2628,9 +2735,9 @@ ER_INVALID_GROUP_FUNC_USE
swe "Felaktig användning av SQL grupp function"
ukr "Хибне викориÑÑ‚Ð°Ð½Ð½Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ— групуваннÑ"
ER_UNSUPPORTED_EXTENSION 42000
+ chi "表'%-.192s'使用此MariaDB版本ä¸å­˜åœ¨çš„扩展"
cze "Tabulka '%-.192s' používá rozšíření, které v této verzi MariaDB není"
dan "Tabellen '%-.192s' bruger et filtypenavn som ikke findes i denne MariaDB version"
- nla "Tabel '%-.192s' gebruikt een extensie, die niet in deze MariaDB-versie voorkomt"
eng "Table '%-.192s' uses an extension that doesn't exist in this MariaDB version"
est "Tabel '%-.192s' kasutab laiendust, mis ei eksisteeri antud MariaDB versioonis"
fre "Table '%-.192s' : utilise une extension invalide pour cette version de MariaDB"
@@ -2639,8 +2746,9 @@ ER_UNSUPPORTED_EXTENSION 42000
hindi "टेबल '%-.192s' जिस इकà¥à¤¸à¥à¤Ÿà¥‡à¤¨à¥à¤¶à¤¨ का उपयोग कर रहा है, वह इस MariaDB संसà¥à¤•à¤°à¤£ में उपलबà¥à¤§ नहीं है"
hun "A(z) '%-.192s' tabla olyan bovitest hasznal, amely nem letezik ebben a MariaDB versioban"
ita "La tabella '%-.192s' usa un'estensione che non esiste in questa versione di MariaDB"
- jpn "表 '%-.192s' ã¯ã€ã“ã®MariaDBãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã¯ç„¡ã„機能を使用ã—ã¦ã„ã¾ã™ã€‚"
+ jpn "表 '%-.192s' ã¯ã€ã“ã®MariaDBãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«ã¯ç„¡ã„機能を使用ã—ã¦ã„ã¾ã™ã€‚"
kor "í…Œì´ë¸” '%-.192s'는 í™•ìž¥ëª…ë ¹ì„ ì´ìš©í•˜ì§€ë§Œ í˜„ìž¬ì˜ MariaDB 버젼ì—서는 존재하지 않습니다."
+ nla "Tabel '%-.192s' gebruikt een extensie, die niet in deze MariaDB-versie voorkomt"
nor "Table '%-.192s' uses a extension that doesn't exist in this MariaDB version"
norwegian-ny "Table '%-.192s' uses a extension that doesn't exist in this MariaDB version"
pol "Table '%-.192s' uses a extension that doesn't exist in this MariaDB version"
@@ -2653,9 +2761,9 @@ ER_UNSUPPORTED_EXTENSION 42000
swe "Tabell '%-.192s' har en extension som inte finns i denna version av MariaDB"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' викориÑтовує розширеннÑ, що не Ñ–Ñнує у цій верÑÑ–Ñ— MariaDB"
ER_TABLE_MUST_HAVE_COLUMNS 42000
+ chi "表必须至少有1列"
cze "Tabulka musí mít alespoň jeden sloupec"
dan "En tabel skal have mindst een kolonne"
- nla "Een tabel moet minstens 1 kolom bevatten"
eng "A table must have at least 1 column"
est "Tabelis peab olema vähemalt üks tulp"
fre "Une table doit comporter au moins une colonne"
@@ -2666,6 +2774,7 @@ ER_TABLE_MUST_HAVE_COLUMNS 42000
ita "Una tabella deve avere almeno 1 colonna"
jpn "表ã«ã¯æœ€ä½Žã§ã‚‚1個ã®åˆ—ãŒå¿…è¦ã§ã™ã€‚"
kor "í•˜ë‚˜ì˜ í…Œì´ë¸”ì—서는 ì ì–´ë„ í•˜ë‚˜ì˜ ì¹¼ëŸ¼ì´ ì¡´ìž¬í•˜ì—¬ì•¼ 합니다."
+ nla "Een tabel moet minstens 1 kolom bevatten"
por "Uma tabela tem que ter pelo menos uma (1) coluna"
rum "O tabela trebuie sa aiba cel putin o coloana"
rus "Ð’ таблице должен быть как минимум один Ñтолбец"
@@ -2675,9 +2784,9 @@ ER_TABLE_MUST_HAVE_COLUMNS 42000
swe "Tabeller måste ha minst 1 kolumn"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ð¿Ð¾Ð²Ð¸Ð½Ð½Ð° мати хочаб один Ñтовбець"
ER_RECORD_FILE_FULL
+ chi "表'%-.192s'已满"
cze "Tabulka '%-.192s' je plná"
dan "Tabellen '%-.192s' er fuld"
- nla "De tabel '%-.192s' is vol"
eng "The table '%-.192s' is full"
est "Tabel '%-.192s' on täis"
fre "La table '%-.192s' est pleine"
@@ -2688,6 +2797,7 @@ ER_RECORD_FILE_FULL
ita "La tabella '%-.192s' e` piena"
jpn "表 '%-.192s' ã¯æº€æ¯ã§ã™ã€‚"
kor "í…Œì´ë¸” '%-.192s'ê°€ full났습니다. "
+ nla "De tabel '%-.192s' is vol"
por "Tabela '%-.192s' está cheia"
rum "Tabela '%-.192s' e plina"
rus "Таблица '%-.192s' переполнена"
@@ -2697,9 +2807,9 @@ ER_RECORD_FILE_FULL
swe "Tabellen '%-.192s' är full"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s' заповнена"
ER_UNKNOWN_CHARACTER_SET 42000
+ chi "未知字符集:'%-.64s'"
cze "Neznámá znaková sada: '%-.64s'"
dan "Ukendt tegnsæt: '%-.64s'"
- nla "Onbekende character set: '%-.64s'"
eng "Unknown character set: '%-.64s'"
est "Vigane kooditabel '%-.64s'"
fre "Jeu de caractères inconnu: '%-.64s'"
@@ -2710,6 +2820,7 @@ ER_UNKNOWN_CHARACTER_SET 42000
ita "Set di caratteri '%-.64s' sconosciuto"
jpn "ä¸æ˜Žãªæ–‡å­—コードセット: '%-.64s'"
kor "알수없는 언어 Set: '%-.64s'"
+ nla "Onbekende character set: '%-.64s'"
por "Conjunto de caracteres '%-.64s' desconhecido"
rum "Set de caractere invalid: '%-.64s'"
rus "ÐеизвеÑÑ‚Ð½Ð°Ñ ÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²ÐºÐ° '%-.64s'"
@@ -2719,9 +2830,9 @@ ER_UNKNOWN_CHARACTER_SET 42000
swe "Okänd teckenuppsättning: '%-.64s'"
ukr "Ðевідома кодова таблицÑ: '%-.64s'"
ER_TOO_MANY_TABLES
+ chi "表太多; MariaDB åªèƒ½åœ¨join中使用 %d 个表"
cze "Příliš mnoho tabulek, MariaDB jich může mít v joinu jen %d"
dan "For mange tabeller. MariaDB kan kun bruge %d tabeller i et join"
- nla "Teveel tabellen. MariaDB kan slechts %d tabellen in een join bevatten"
eng "Too many tables; MariaDB can only use %d tables in a join"
est "Liiga palju tabeleid. MariaDB suudab JOINiga ühendada kuni %d tabelit"
fre "Trop de tables. MariaDB ne peut utiliser que %d tables dans un JOIN"
@@ -2732,6 +2843,7 @@ ER_TOO_MANY_TABLES
ita "Troppe tabelle. MariaDB puo` usare solo %d tabelle in una join"
jpn "表ãŒå¤šã™ãŽã¾ã™ã€‚MariaDBãŒJOINã§ãる表㯠%d 個ã¾ã§ã§ã™ã€‚"
kor "너무 ë§Žì€ í…Œì´ë¸”ì´ Joinë˜ì—ˆìŠµë‹ˆë‹¤. MariaDBì—서는 JOINì‹œ %dê°œì˜ í…Œì´ë¸”만 사용할 수 있습니다."
+ nla "Teveel tabellen. MariaDB kan slechts %d tabellen in een join bevatten"
por "Tabelas demais. O MariaDB pode usar somente %d tabelas em uma junção (JOIN)"
rum "Prea multe tabele. MariaDB nu poate folosi mai mult de %d tabele intr-un join"
rus "Слишком много таблиц. MariaDB может иÑпользовать только %d таблиц в Ñоединении"
@@ -2741,9 +2853,9 @@ ER_TOO_MANY_TABLES
swe "För många tabeller. MariaDB can ha högst %d tabeller i en och samma join"
ukr "Забагато таблиць. MariaDB може викориÑтовувати лише %d таблиць у об'єднанні"
ER_TOO_MANY_FIELDS
+ chi "太多列"
cze "Příliš mnoho položek"
dan "For mange felter"
- nla "Te veel velden"
eng "Too many columns"
est "Liiga palju tulpasid"
fre "Trop de champs"
@@ -2754,6 +2866,7 @@ ER_TOO_MANY_FIELDS
ita "Troppi campi"
jpn "列ãŒå¤šã™ãŽã¾ã™ã€‚"
kor "ì¹¼ëŸ¼ì´ ë„ˆë¬´ 많습니다."
+ nla "Te veel velden"
por "Colunas demais"
rum "Prea multe coloane"
rus "Слишком много Ñтолбцов"
@@ -2763,9 +2876,9 @@ ER_TOO_MANY_FIELDS
swe "För många fält"
ukr "Забагато Ñтовбців"
ER_TOO_BIG_ROWSIZE 42000
+ chi "行尺寸太大. ä¸åŒ…括BLOB,表的最大的行大å°æ˜¯ %ld. 这包括存储开销,请查看文档。您必须将æŸäº›åˆ—更改为 TEXT 或 BLOB"
cze "Řádek je příliÅ¡ velký. Maximální velikost řádku, nepoÄítaje položky blob, je %ld. Musíte zmÄ›nit nÄ›které položky na blob"
dan "For store poster. Max post størrelse, uden BLOB's, er %ld. Du må lave nogle felter til BLOB's"
- nla "Rij-grootte is groter dan toegestaan. Maximale rij grootte, blobs niet meegeteld, is %ld. U dient sommige velden in blobs te veranderen"
eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs"
est "Liiga pikk kirje. Kirje maksimumpikkus arvestamata BLOB-tüüpi välju on %ld. Muuda mõned väljad BLOB-tüüpi väljadeks"
fre "Ligne trop grande. Le taille maximale d'une ligne, sauf les BLOBs, est %ld. Changez le type de quelques colonnes en BLOB"
@@ -2775,6 +2888,7 @@ ER_TOO_BIG_ROWSIZE 42000
ita "Riga troppo grande. La massima grandezza di una riga, non contando i BLOB, e` %ld. Devi cambiare alcuni campi in BLOB"
jpn "行サイズãŒå¤§ãã™ãŽã¾ã™ã€‚ã“ã®è¡¨ã®æœ€å¤§è¡Œã‚µã‚¤ã‚ºã¯ BLOB ã‚’å«ã¾ãšã« %ld ã§ã™ã€‚æ ¼ç´æ™‚ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ˜ãƒƒãƒ‰ã‚‚å«ã¾ã‚Œã¾ã™(マニュアルを確èªã—ã¦ãã ã•ã„)。列をTEXTã¾ãŸã¯BLOBã«å¤‰æ›´ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
kor "너무 í° row 사ì´ì¦ˆìž…니다. BLOB를 계산하지 ì•Šê³  최대 row 사ì´ì¦ˆëŠ” %ld입니다. ì¼ë¶€ì—´ì„ BLOB ë˜ëŠ” TEXTë¡œ 변경해야 합니다."
+ nla "Rij-grootte is groter dan toegestaan. Maximale rij grootte, blobs niet meegeteld, is %ld. U dient sommige velden in blobs te veranderen"
por "Tamanho de linha grande demais. O máximo tamanho de linha, não contando BLOBs, é %ld. Você tem que mudar alguns campos para BLOBs"
rum "Marimea liniei (row) prea mare. Marimea maxima a liniei, excluzind BLOB-urile este de %ld. Trebuie sa schimbati unele cimpuri in BLOB-uri"
rus "Слишком большой размер запиÑи. МакÑимальный размер Ñтроки, иÑÐºÐ»ÑŽÑ‡Ð°Ñ Ð¿Ð¾Ð»Ñ BLOB, - %ld. Возможно, вам Ñледует изменить тип некоторых полей на BLOB"
@@ -2784,9 +2898,9 @@ ER_TOO_BIG_ROWSIZE 42000
swe "För stor total radlängd. Den högst tillåtna radlängden, förutom BLOBs, är %ld. Ändra några av dina fält till BLOB"
ukr "Задовга Ñтрока. Ðайбільшою довжиною Ñтроки, не рахуючи BLOB, Ñ” %ld. Вам потрібно привеÑти деÑкі Ñтовбці до типу BLOB"
ER_STACK_OVERRUN
+ chi "线程栈溢出: 已使用了: %ld 堆栈 %ld. 使用 'mysqld --thread_stack=#' 指定更大的堆栈"
cze "PÅ™eteÄení zásobníku threadu: použito %ld z %ld. Použijte 'mysqld --thread_stack=#' k zadání vÄ›tšího zásobníku"
dan "Thread stack brugt: Brugt: %ld af en %ld stak. Brug 'mysqld --thread_stack=#' for at allokere en større stak om nødvendigt"
- nla "Thread stapel overrun: Gebruikte: %ld van een %ld stack. Gebruik 'mysqld --thread_stack=#' om een grotere stapel te definieren (indien noodzakelijk)"
eng "Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld --thread_stack=#' to specify a bigger stack if needed"
fre "Débordement de la pile des tâches (Thread stack). Utilisées: %ld pour une pile de %ld. Essayez 'mysqld --thread_stack=#' pour indiquer une plus grande valeur"
ger "Thread-Stack-Überlauf. Benutzt: %ld von %ld Stack. 'mysqld --thread_stack=#' verwenden, um bei Bedarf einen größeren Stack anzulegen"
@@ -2795,6 +2909,7 @@ ER_STACK_OVERRUN
ita "Thread stack overrun: Usati: %ld di uno stack di %ld. Usa 'mysqld --thread_stack=#' per specificare uno stack piu` grande"
jpn "スレッドスタックä¸è¶³ã§ã™(使用: %ld ; サイズ: %ld)。必è¦ã«å¿œã˜ã¦ã€ã‚ˆã‚Šå¤§ãã„値㧠'mysqld --thread_stack=#' ã®æŒ‡å®šã‚’ã—ã¦ãã ã•ã„。"
kor "쓰레드 스íƒì´ 넘쳤습니다. 사용: %ldê°œ 스íƒ: %ldê°œ. 만약 필요시 ë”í° ìŠ¤íƒì„ ì›í• ë•Œì—는 'mysqld --thread_stack=#' 를 ì •ì˜í•˜ì„¸ìš”"
+ nla "Thread stapel overrun: Gebruikte: %ld van een %ld stack. Gebruik 'mysqld --thread_stack=#' om een grotere stapel te definieren (indien noodzakelijk)"
por "Estouro da pilha do 'thread'. Usados %ld de uma pilha de %ld. Use 'mysqld --thread_stack=#' para especificar uma pilha maior, se necessário"
rum "Stack-ul thread-ului a fost depasit (prea mic): Folositi: %ld intr-un stack de %ld. Folositi 'mysqld --thread_stack=#' ca sa specifici un stack mai mare"
rus "Стек потоков переполнен: иÑпользовано: %ld из %ld Ñтека. ПрименÑйте 'mysqld --thread_stack=#' Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð±Ð¾Ð»ÑŒÑˆÐµÐ³Ð¾ размера Ñтека, еÑли необходимо"
@@ -2804,9 +2919,9 @@ ER_STACK_OVERRUN
swe "Trådstacken tog slut: Har använt %ld av %ld bytes. Använd 'mysqld --thread_stack=#' ifall du behöver en större stack"
ukr "Стек гілок переповнено: ВикориÑтано: %ld з %ld. ВикориÑтовуйте 'mysqld --thread_stack=#' аби зазначити більший Ñтек, Ñкщо необхідно"
ER_WRONG_OUTER_JOIN 42000
+ chi "在 OUTER JOIN 中å‘现交å‰ä¾èµ–;检查您的 ON æ¡ä»¶"
cze "V OUTER JOIN byl nalezen křížový odkaz. Prověřte ON podmínky"
dan "Krydsreferencer fundet i OUTER JOIN; check dine ON conditions"
- nla "Gekruiste afhankelijkheid gevonden in OUTER JOIN. Controleer uw ON-conditions"
eng "Cross dependency found in OUTER JOIN; examine your ON conditions"
est "Ristsõltuvus OUTER JOIN klauslis. Kontrolli oma ON tingimusi"
fre "Dépendance croisée dans une clause OUTER JOIN. Vérifiez la condition ON"
@@ -2815,6 +2930,7 @@ ER_WRONG_OUTER_JOIN 42000
hun "Keresztfuggoseg van az OUTER JOIN-ban. Ellenorizze az ON felteteleket"
ita "Trovata una dipendenza incrociata nella OUTER JOIN. Controlla le condizioni ON"
jpn "OUTER JOINã«ç›¸äº’ä¾å­˜ãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸã€‚ONå¥ã®æ¡ä»¶ã‚’確èªã—ã¦ä¸‹ã•ã„。"
+ nla "Gekruiste afhankelijkheid gevonden in OUTER JOIN. Controleer uw ON-conditions"
por "Dependência cruzada encontrada em junção externa (OUTER JOIN); examine as condições utilizadas nas cláusulas 'ON'"
rum "Dependinta incrucisata (cross dependency) gasita in OUTER JOIN. Examinati conditiile ON"
rus "Ð’ OUTER JOIN обнаружена перекреÑÑ‚Ð½Ð°Ñ Ð·Ð°Ð²Ð¸ÑимоÑÑ‚ÑŒ. Внимательно проанализируйте Ñвои уÑÐ»Ð¾Ð²Ð¸Ñ ON"
@@ -2824,13 +2940,14 @@ ER_WRONG_OUTER_JOIN 42000
swe "Felaktigt referens i OUTER JOIN. Kontrollera ON-uttrycket"
ukr "ПерехреÑна залежніÑÑ‚ÑŒ у OUTER JOIN. Перевірте умову ON"
ER_NULL_COLUMN_IN_INDEX 42000
+ chi "表处ç†ç¨‹åºä¸æ”¯æŒç»™å®šç´¢å¼•ä¸­çš„ NULL. 请将列 '%-.192s' 改为 NOT NULL 或使用其他处ç†ç¨‹åº"
eng "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler"
swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.192s' till NOT NULL eller använd en annan hanterare"
ukr "Вказівник таблиці не підтримує NULL у зазначенному індекÑÑ–. Будь лаÑка, зменіть Ñтовпчик '%-.192s' на NOT NULL або викориÑтайте інший вказівник таблиці."
ER_CANT_FIND_UDF
+ chi "无法加载函数'%-.192s'"
cze "Nemohu naÄíst funkci '%-.192s'"
dan "Kan ikke læse funktionen '%-.192s'"
- nla "Kan functie '%-.192s' niet laden"
eng "Can't load function '%-.192s'"
est "Ei suuda avada funktsiooni '%-.192s'"
fre "Imposible de charger la fonction '%-.192s'"
@@ -2841,6 +2958,7 @@ ER_CANT_FIND_UDF
ita "Impossibile caricare la funzione '%-.192s'"
jpn "関数 '%-.192s' をロードã§ãã¾ã›ã‚“。"
kor "'%-.192s' 함수를 로드하지 못했습니다."
+ nla "Kan functie '%-.192s' niet laden"
por "Não pode carregar a função '%-.192s'"
rum "Nu pot incarca functia '%-.192s'"
rus "Ðевозможно загрузить функцию '%-.192s'"
@@ -2850,9 +2968,9 @@ ER_CANT_FIND_UDF
swe "Kan inte ladda funktionen '%-.192s'"
ukr "Ðе можу завантажити функцію '%-.192s'"
ER_CANT_INITIALIZE_UDF
+ chi "无法åˆå§‹åŒ–函数 '%-.192s'; %-.80s"
cze "Nemohu inicializovat funkci '%-.192s'; %-.80s"
dan "Kan ikke starte funktionen '%-.192s'; %-.80s"
- nla "Kan functie '%-.192s' niet initialiseren; %-.80s"
eng "Can't initialize function '%-.192s'; %-.80s"
est "Ei suuda algväärtustada funktsiooni '%-.192s'; %-.80s"
fre "Impossible d'initialiser la fonction '%-.192s'; %-.80s"
@@ -2863,6 +2981,7 @@ ER_CANT_INITIALIZE_UDF
ita "Impossibile inizializzare la funzione '%-.192s'; %-.80s"
jpn "関数 '%-.192s' ã‚’åˆæœŸåŒ–ã§ãã¾ã›ã‚“。; %-.80s"
kor "'%-.192s' 함수를 초기화 하지 못했습니다.; %-.80s"
+ nla "Kan functie '%-.192s' niet initialiseren; %-.80s"
por "Não pode inicializar a função '%-.192s' - '%-.80s'"
rum "Nu pot initializa functia '%-.192s'; %-.80s"
rus "Ðевозможно инициализировать функцию '%-.192s'; %-.80s"
@@ -2872,9 +2991,9 @@ ER_CANT_INITIALIZE_UDF
swe "Kan inte initialisera funktionen '%-.192s'; '%-.80s'"
ukr "Ðе можу ініціалізувати функцію '%-.192s'; %-.80s"
ER_UDF_NO_PATHS
+ chi "共享库ä¸å…许使用路径"
cze "Pro sdílenou knihovnu nejsou povoleny cesty"
dan "Angivelse af sti ikke tilladt for delt bibliotek"
- nla "Geen pad toegestaan voor shared library"
eng "No paths allowed for shared library"
est "Teegi nimes ei tohi olla kataloogi"
fre "Chemin interdit pour les bibliothèques partagées"
@@ -2884,6 +3003,7 @@ ER_UDF_NO_PATHS
ita "Non sono ammessi path per le librerie condivisa"
jpn "共有ライブラリã«ã¯ãƒ‘スを指定ã§ãã¾ã›ã‚“。"
kor "공유 ë¼ì´ë²„러리를 위한 패스가 ì •ì˜ë˜ì–´ 있지 않습니다."
+ nla "Geen pad toegestaan voor shared library"
por "Não há caminhos (paths) permitidos para biblioteca compartilhada"
rum "Nici un paths nu e permis pentru o librarie shared"
rus "ÐедопуÑтимо указывать пути Ð´Ð»Ñ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡ÐµÑких библиотек"
@@ -2893,9 +3013,9 @@ ER_UDF_NO_PATHS
swe "Man får inte ange sökväg för dynamiska bibliotek"
ukr "Ðе дозволено викориÑтовувати путі Ð´Ð»Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»ÑŽÐ²Ð°Ð½Ð¸Ñ… бібліотек"
ER_UDF_EXISTS
+ chi "函数 '%-.192s' å·²ç»å­˜åœ¨"
cze "Funkce '%-.192s' již existuje"
dan "Funktionen '%-.192s' findes allerede"
- nla "Functie '%-.192s' bestaat reeds"
eng "Function '%-.192s' already exists"
est "Funktsioon '%-.192s' juba eksisteerib"
fre "La fonction '%-.192s' existe déjà"
@@ -2906,6 +3026,7 @@ ER_UDF_EXISTS
ita "La funzione '%-.192s' esiste gia`"
jpn "関数 '%-.192s' ã¯ã™ã§ã«å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ã€‚"
kor "'%-.192s' 함수는 ì´ë¯¸ 존재합니다."
+ nla "Functie '%-.192s' bestaat reeds"
por "Função '%-.192s' já existe"
rum "Functia '%-.192s' exista deja"
rus "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ '%-.192s' уже ÑущеÑтвует"
@@ -2915,9 +3036,9 @@ ER_UDF_EXISTS
swe "Funktionen '%-.192s' finns redan"
ukr "Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ '%-.192s' вже Ñ–Ñнує"
ER_CANT_OPEN_LIBRARY
+ chi "ä¸èƒ½æ‰“开共享库 '%-.192s' (错误å·ç : %d, %-.128s)"
cze "Nemohu otevřít sdílenou knihovnu '%-.192s' (errno: %d, %-.128s)"
dan "Kan ikke åbne delt bibliotek '%-.192s' (errno: %d, %-.128s)"
- nla "Kan shared library '%-.192s' niet openen (Errcode: %d, %-.128s)"
eng "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
est "Ei suuda avada jagatud teeki '%-.192s' (veakood: %d, %-.128s)"
fre "Impossible d'ouvrir la bibliothèque partagée '%-.192s' (errno: %d, %-.128s)"
@@ -2927,6 +3048,7 @@ ER_CANT_OPEN_LIBRARY
ita "Impossibile aprire la libreria condivisa '%-.192s' (errno: %d, %-.128s)"
jpn "共有ライブラリ '%-.192s' ã‚’é–‹ã事ãŒã§ãã¾ã›ã‚“。(エラー番å·: %d, %-.128s)"
kor "'%-.192s' 공유 ë¼ì´ë²„러리를 열수 없습니다.(ì—러번호: %d, %-.128s)"
+ nla "Kan shared library '%-.192s' niet openen (Errcode: %d, %-.128s)"
nor "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
norwegian-ny "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
pol "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
@@ -2939,9 +3061,9 @@ ER_CANT_OPEN_LIBRARY
swe "Kan inte öppna det dynamiska biblioteket '%-.192s' (Felkod: %d, %-.128s)"
ukr "Ðе можу відкрити розділювану бібліотеку '%-.192s' (помилка: %d, %-.128s)"
ER_CANT_FIND_DL_ENTRY
+ chi "在库中找ä¸åˆ°ç¬¦å· '%-.128s'"
cze "Nemohu najít funkci '%-.128s' v knihovně"
dan "Kan ikke finde funktionen '%-.128s' i bibliotek"
- nla "Kan functie '%-.128s' niet in library vinden"
eng "Can't find symbol '%-.128s' in library"
est "Ei leia funktsiooni '%-.128s' antud teegis"
fre "Impossible de trouver la fonction '%-.128s' dans la bibliothèque"
@@ -2951,6 +3073,7 @@ ER_CANT_FIND_DL_ENTRY
ita "Impossibile trovare la funzione '%-.128s' nella libreria"
jpn "関数 '%-.128s' ã¯å…±æœ‰ãƒ©ã‚¤ãƒ–ラリー中ã«ã‚ã‚Šã¾ã›ã‚“。"
kor "ë¼ì´ë²„러리ì—ì„œ '%-.128s' 함수를 ì°¾ì„ ìˆ˜ 없습니다."
+ nla "Kan functie '%-.128s' niet in library vinden"
por "Não pode encontrar a função '%-.128s' na biblioteca"
rum "Nu pot gasi functia '%-.128s' in libraria"
rus "Ðевозможно отыÑкать Ñимвол '%-.128s' в библиотеке"
@@ -2960,9 +3083,9 @@ ER_CANT_FIND_DL_ENTRY
swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket"
ukr "Ðе можу знайти функцію '%-.128s' у бібліотеці"
ER_FUNCTION_NOT_DEFINED
+ chi "未定义函数 '%-.192s'"
cze "Funkce '%-.192s' není definována"
dan "Funktionen '%-.192s' er ikke defineret"
- nla "Functie '%-.192s' is niet gedefinieerd"
eng "Function '%-.192s' is not defined"
est "Funktsioon '%-.192s' ei ole defineeritud"
fre "La fonction '%-.192s' n'est pas définie"
@@ -2973,6 +3096,7 @@ ER_FUNCTION_NOT_DEFINED
ita "La funzione '%-.192s' non e` definita"
jpn "関数 '%-.192s' ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "'%-.192s' 함수가 ì •ì˜ë˜ì–´ 있지 않습니다."
+ nla "Functie '%-.192s' is niet gedefinieerd"
por "Função '%-.192s' não está definida"
rum "Functia '%-.192s' nu e definita"
rus "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ '%-.192s' не определена"
@@ -2982,9 +3106,9 @@ ER_FUNCTION_NOT_DEFINED
swe "Funktionen '%-.192s' är inte definierad"
ukr "Функцію '%-.192s' не визначено"
ER_HOST_IS_BLOCKED
+ chi "主机 '%-.64s' 由于许多连接错误而被阻止;使用 'mysqladmin flush-hosts' 解除阻塞"
cze "Stroj '%-.64s' je zablokován kvůli mnoha chybám při připojování. Odblokujete použitím 'mysqladmin flush-hosts'"
dan "Værten '%-.64s' er blokeret på grund af mange fejlforespørgsler. Lås op med 'mysqladmin flush-hosts'"
- nla "Host '%-.64s' is geblokkeeerd vanwege te veel verbindings fouten. Deblokkeer met 'mysqladmin flush-hosts'"
eng "Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"
est "Masin '%-.64s' on blokeeritud hulgaliste ühendusvigade tõttu. Blokeeringu saab tühistada 'mysqladmin flush-hosts' käsuga"
fre "L'hôte '%-.64s' est bloqué à cause d'un trop grand nombre d'erreur de connexion. Débloquer le par 'mysqladmin flush-hosts'"
@@ -2995,6 +3119,7 @@ ER_HOST_IS_BLOCKED
ita "Sistema '%-.64s' bloccato a causa di troppi errori di connessione. Per sbloccarlo: 'mysqladmin flush-hosts'"
jpn "接続エラーãŒå¤šã„ãŸã‚ã€ãƒ›ã‚¹ãƒˆ '%-.64s' ã¯æ‹’å¦ã•ã‚Œã¾ã—ãŸã€‚'mysqladmin flush-hosts' ã§è§£é™¤ã§ãã¾ã™ã€‚"
kor "너무 ë§Žì€ ì—°ê²°ì˜¤ë¥˜ë¡œ ì¸í•˜ì—¬ 호스트 '%-.64s'는 블ë½ë˜ì—ˆìŠµë‹ˆë‹¤. 'mysqladmin flush-hosts'를 ì´ìš©í•˜ì—¬ 블ë½ì„ 해제하세요"
+ nla "Host '%-.64s' is geblokkeeerd vanwege te veel verbindings fouten. Deblokkeer met 'mysqladmin flush-hosts'"
por "'Host' '%-.64s' está bloqueado devido a muitos erros de conexão. Desbloqueie com 'mysqladmin flush-hosts'"
rum "Host-ul '%-.64s' e blocat din cauza multelor erori de conectie. Poti deploca folosind 'mysqladmin flush-hosts'"
rus "ХоÑÑ‚ '%-.64s' заблокирован из-за Ñлишком большого количеÑтва ошибок ÑоединениÑ. Разблокировать его можно Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ 'mysqladmin flush-hosts'"
@@ -3003,9 +3128,9 @@ ER_HOST_IS_BLOCKED
swe "Denna dator, '%-.64s', är blockerad pga många felaktig paket. Gör 'mysqladmin flush-hosts' för att ta bort alla blockeringarna"
ukr "ХоÑÑ‚ '%-.64s' заблоковано з причини великої кількоÑÑ‚Ñ– помилок з'єднаннÑ. Ð”Ð»Ñ Ñ€Ð¾Ð·Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸Ñтовуйте 'mysqladmin flush-hosts'"
ER_HOST_NOT_PRIVILEGED
+ chi "Host'%-.64s'ä¸å…许连接到此MariaDBæœåŠ¡å™¨"
cze "Stroj '%-.64s' nemá povoleno se k tomuto MariaDB serveru připojit"
dan "Værten '%-.64s' kan ikke tilkoble denne MariaDB-server"
- nla "Het is host '%-.64s' is niet toegestaan verbinding te maken met deze MariaDB server"
eng "Host '%-.64s' is not allowed to connect to this MariaDB server"
est "Masinal '%-.64s' puudub ligipääs sellele MariaDB serverile"
fre "Le hôte '%-.64s' n'est pas authorisé à se connecter à ce serveur MariaDB"
@@ -3016,6 +3141,7 @@ ER_HOST_NOT_PRIVILEGED
ita "Al sistema '%-.64s' non e` consentita la connessione a questo server MariaDB"
jpn "ホスト '%-.64s' ã‹ã‚‰ã®ã“ã® MariaDB server ã¸ã®æŽ¥ç¶šã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "'%-.64s' 호스트는 ì´ MariaDBì„œë²„ì— ì ‘ì†í•  허가를 받지 못했습니다."
+ nla "Het is host '%-.64s' is niet toegestaan verbinding te maken met deze MariaDB server"
por "'Host' '%-.64s' não tem permissão para se conectar com este servidor MariaDB"
rum "Host-ul '%-.64s' nu este permis a se conecta la aceste server MariaDB"
rus "ХоÑту '%-.64s' не разрешаетÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð°Ñ‚ÑŒÑÑ Ðº Ñтому Ñерверу MariaDB"
@@ -3024,9 +3150,9 @@ ER_HOST_NOT_PRIVILEGED
swe "Denna dator, '%-.64s', har inte privileger att använda denna MariaDB server"
ukr "ХоÑту '%-.64s' не доволено зв'ÑзуватиÑÑŒ з цим Ñервером MariaDB"
ER_PASSWORD_ANONYMOUS_USER 42000
+ chi "您正在以匿å用户身份使用 MariaDB,匿å用户ä¸èƒ½ä¿®æ”¹ç”¨æˆ·è®¾ç½®"
cze "Používáte MariaDB jako anonymní uživatel a anonymní uživatelé nemají povoleno měnit hesla"
dan "Du bruger MariaDB som anonym bruger. Anonyme brugere må ikke ændre adgangskoder"
- nla "U gebruikt MariaDB als anonieme gebruiker en deze mogen geen wachtwoorden wijzigen"
eng "You are using MariaDB as an anonymous user and anonymous users are not allowed to modify user settings"
est "Te kasutate MariaDB-i anonüümse kasutajana, kelledel pole parooli muutmise õigust"
fre "Vous utilisez un utilisateur anonyme et les utilisateurs anonymes ne sont pas autorisés à changer les mots de passe"
@@ -3037,6 +3163,7 @@ ER_PASSWORD_ANONYMOUS_USER 42000
ita "Impossibile cambiare la password usando MariaDB come utente anonimo"
jpn "MariaDB を匿åユーザーã§ä½¿ç”¨ã—ã¦ã„ã‚‹ã®ã§ã€ãƒ‘スワードã®å¤‰æ›´ã¯ã§ãã¾ã›ã‚“。"
kor "ë‹¹ì‹ ì€ MariaDBì„œë²„ì— ìµëª…ì˜ ì‚¬ìš©ìžë¡œ ì ‘ì†ì„ 하셨습니다.ìµëª…ì˜ ì‚¬ìš©ìžëŠ” 암호를 변경할 수 없습니다."
+ nla "U gebruikt MariaDB als anonieme gebruiker en deze mogen geen wachtwoorden wijzigen"
por "Você está usando o MariaDB como usuário anônimo e usuários anônimos não têm permissão para mudar senhas"
rum "Dumneavoastra folositi MariaDB ca un utilizator anonim si utilizatorii anonimi nu au voie sa schimbe setarile utilizatorilor"
rus "Ð’Ñ‹ иÑпользуете MariaDB от имени анонимного пользователÑ, а анонимным пользователÑм не разрешаетÑÑ Ð¼ÐµÐ½ÑÑ‚ÑŒ пароли"
@@ -3045,9 +3172,9 @@ ER_PASSWORD_ANONYMOUS_USER 42000
swe "Du använder MariaDB som en anonym användare och som sådan får du inte ändra ditt lösenord"
ukr "Ви викориÑтовуєте MariaDB Ñк анонімний кориÑтувач, тому вам не дозволено змінювати паролі"
ER_PASSWORD_NOT_ALLOWED 42000
+ chi "您必须具有更新 mysql æ•°æ®åº“中的表的æƒé™æ‰èƒ½æ›´æ”¹å…¶ä»–人的密ç "
cze "Na změnu hesel ostatním musíte mít právo provést update tabulek v databázi mysql"
dan "Du skal have tilladelse til at opdatere tabeller i MariaDB databasen for at ændre andres adgangskoder"
- nla "U moet tabel update priveleges hebben in de mysql database om wachtwoorden voor anderen te mogen wijzigen"
eng "You must have privileges to update tables in the mysql database to be able to change passwords for others"
est "Teiste paroolide muutmiseks on nõutav tabelite muutmisõigus 'mysql' andmebaasis"
fre "Vous devez avoir le privilège update sur les tables de la base de donnée mysql pour pouvoir changer les mots de passe des autres"
@@ -3057,6 +3184,7 @@ ER_PASSWORD_NOT_ALLOWED 42000
ita "E` necessario il privilegio di update sulle tabelle del database mysql per cambiare le password per gli altri utenti"
jpn "ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‘スワードを変更ã™ã‚‹ãŸã‚ã«ã¯ã€mysqlデータベースã®è¡¨ã‚’æ›´æ–°ã™ã‚‹æ¨©é™ãŒå¿…è¦ã§ã™ã€‚"
kor "ë‹¹ì‹ ì€ ë‹¤ë¥¸ì‚¬ìš©ìžë“¤ì˜ 암호를 변경할 수 있ë„ë¡ ë°ì´íƒ€ë² ì´ìŠ¤ ë³€ê²½ê¶Œí•œì„ ê°€ì ¸ì•¼ 합니다."
+ nla "U moet tabel update priveleges hebben in de mysql database om wachtwoorden voor anderen te mogen wijzigen"
por "Você deve ter privilégios para atualizar tabelas no banco de dados mysql para ser capaz de mudar a senha de outros"
rum "Trebuie sa aveti privilegii sa actualizati tabelele in bazele de date mysql ca sa puteti sa schimati parolele altora"
rus "Ð”Ð»Ñ Ñ‚Ð¾Ð³Ð¾ чтобы изменÑÑ‚ÑŒ пароли других пользователей, у Ð²Ð°Ñ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ быть привилегии на изменение таблиц в базе данных mysql"
@@ -3065,9 +3193,9 @@ ER_PASSWORD_NOT_ALLOWED 42000
swe "För att ändra lösenord för andra måste du ha rättigheter att uppdatera mysql-databasen"
ukr "Ви повині мати право на Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†ÑŒ у базі данних mysql, аби мати можливіÑÑ‚ÑŒ змінювати пароль іншим"
ER_PASSWORD_NO_MATCH 28000
+ chi "在用户表中找ä¸åˆ°ä»»ä½•åŒ¹é…çš„è¡Œ"
cze "V tabulce user není žádný odpovídající řádek"
dan "Kan ikke finde nogen tilsvarende poster i bruger tabellen"
- nla "Kan geen enkele passende rij vinden in de gebruikers tabel"
eng "Can't find any matching row in the user table"
est "Ei leia vastavat kirjet kasutajate tabelis"
fre "Impossible de trouver un enregistrement correspondant dans la table user"
@@ -3078,6 +3206,7 @@ ER_PASSWORD_NO_MATCH 28000
ita "Impossibile trovare la riga corrispondente nella tabella user"
jpn "ユーザーテーブルã«è©²å½“ã™ã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
kor "ì‚¬ìš©ìž í…Œì´ë¸”ì—ì„œ ì¼ì¹˜í•˜ëŠ” ê²ƒì„ ì°¾ì„ ìˆ˜ 없습니다."
+ nla "Kan geen enkele passende rij vinden in de gebruikers tabel"
por "Não pode encontrar nenhuma linha que combine na tabela usuário (user table)"
rum "Nu pot gasi nici o linie corespunzatoare in tabela utilizatorului"
rus "Ðевозможно отыÑкать подходÑщую запиÑÑŒ в таблице пользователей"
@@ -3086,9 +3215,9 @@ ER_PASSWORD_NO_MATCH 28000
swe "Hittade inte användaren i 'user'-tabellen"
ukr "Ðе можу знайти відповідних запиÑів у таблиці кориÑтувача"
ER_UPDATE_INFO
+ chi "匹é…行:%ld已更改:%ld警告:%ld"
cze "Nalezených řádků: %ld Změněno: %ld Varování: %ld"
dan "Poster fundet: %ld Ændret: %ld Advarsler: %ld"
- nla "Passende rijen: %ld Gewijzigd: %ld Waarschuwingen: %ld"
eng "Rows matched: %ld Changed: %ld Warnings: %ld"
est "Sobinud kirjeid: %ld Muudetud: %ld Hoiatusi: %ld"
fre "Enregistrements correspondants: %ld Modifiés: %ld Warnings: %ld"
@@ -3097,6 +3226,7 @@ ER_UPDATE_INFO
ita "Rows riconosciute: %ld Cambiate: %ld Warnings: %ld"
jpn "該当ã—ãŸè¡Œ: %ld 変更: %ld 警告: %ld"
kor "ì¼ì¹˜í•˜ëŠ” Rows : %ldê°œ 변경ë¨: %ldê°œ 경고: %ldê°œ"
+ nla "Passende rijen: %ld Gewijzigd: %ld Waarschuwingen: %ld"
por "Linhas que combinaram: %ld - Alteradas: %ld - Avisos: %ld"
rum "Linii identificate (matched): %ld Schimbate: %ld Atentionari (warnings): %ld"
rus "Совпало запиÑей: %ld Изменено: %ld Предупреждений: %ld"
@@ -3105,9 +3235,9 @@ ER_UPDATE_INFO
swe "Rader: %ld Uppdaterade: %ld Varningar: %ld"
ukr "ЗапиÑів відповідає: %ld Змінено: %ld ЗаÑтережень: %ld"
ER_CANT_CREATE_THREAD
+ chi "无法创建新线程 (错误å·ç  %M); 如果您没有用完剩余内存,您å¯ä»¥æŸ¥é˜…文档以了解å¯èƒ½ä¸Žæ“作系统相关的错误"
cze "Nemohu vytvoÅ™it nový thread (errno %M). Pokud je jeÅ¡tÄ› nÄ›jaká volná paměť, podívejte se do manuálu na Äást o chybách specifických pro jednotlivé operaÄní systémy"
dan "Kan ikke danne en ny tråd (fejl nr. %M). Hvis computeren ikke er løbet tør for hukommelse, kan du se i brugervejledningen for en mulig operativ-system - afhængig fejl"
- nla "Kan geen nieuwe thread aanmaken (Errcode: %M). Indien er geen tekort aan geheugen is kunt u de handleiding consulteren over een mogelijke OS afhankelijke fout"
eng "Can't create a new thread (errno %M); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"
est "Ei suuda luua uut lõime (veakood %M). Kui mälu ei ole otsas, on tõenäoliselt tegemist operatsioonisüsteemispetsiifilise veaga"
fre "Impossible de créer une nouvelle tâche (errno %M). S'il reste de la mémoire libre, consultez le manual pour trouver un éventuel bug dépendant de l'OS"
@@ -3116,6 +3246,7 @@ ER_CANT_CREATE_THREAD
ita "Impossibile creare un nuovo thread (errno %M). Se non ci sono problemi di memoria disponibile puoi consultare il manuale per controllare possibili problemi dipendenti dal SO"
jpn "æ–°è¦ã«ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作æˆã§ãã¾ã›ã‚“。(ã‚¨ãƒ©ãƒ¼ç•ªå· %M) ã‚‚ã—も使用å¯èƒ½ãƒ¡ãƒ¢ãƒªãƒ¼ã®ä¸è¶³ã§ãªã‘ã‚Œã°ã€OSä¾å­˜ã®ãƒã‚°ã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™ã€‚"
kor "새로운 쓰레드를 만들 수 없습니다.(ì—러번호 %M). 만약 여유메모리가 있다면 OS-dependent버그 ì˜ ë©”ë‰´ì–¼ ë¶€ë¶„ì„ ì°¾ì•„ë³´ì‹œì˜¤."
+ nla "Kan geen nieuwe thread aanmaken (Errcode: %M). Indien er geen tekort aan geheugen is kunt u de handleiding consulteren over een mogelijke OS afhankelijke fout"
nor "Can't create a new thread (errno %M); if you are not out of available memory you can consult the manual for any possible OS dependent bug"
norwegian-ny "Can't create a new thread (errno %M); if you are not out of available memory you can consult the manual for any possible OS dependent bug"
pol "Can't create a new thread (errno %M); if you are not out of available memory you can consult the manual for any possible OS dependent bug"
@@ -3127,9 +3258,9 @@ ER_CANT_CREATE_THREAD
swe "Kan inte skapa en ny tråd (errno %M)"
ukr "Ðе можу Ñтворити нову гілку (помилка %M). Якщо ви не викориÑтали уÑÑŽ пам'ÑÑ‚ÑŒ, то прочитайте документацію до вашої ОС - можливо це помилка ОС"
ER_WRONG_VALUE_COUNT_ON_ROW 21S01
+ chi "列计数与行%lu的值计数ä¸åŒ¹é…"
cze "PoÄet sloupců neodpovídá poÄtu hodnot na řádku %lu"
dan "Kolonne antallet stemmer ikke overens med antallet af værdier i post %lu"
- nla "Kolom aantal komt niet overeen met waarde aantal in rij %lu"
eng "Column count doesn't match value count at row %lu"
est "Tulpade hulk erineb väärtuste hulgast real %lu"
ger "Anzahl der Felder stimmt nicht mit der Anzahl der Werte in Zeile %lu überein"
@@ -3137,6 +3268,7 @@ ER_WRONG_VALUE_COUNT_ON_ROW 21S01
ita "Il numero delle colonne non corrisponde al conteggio alla riga %lu"
jpn "%lu 行目ã§ã€åˆ—ã®æ•°ãŒå€¤ã®æ•°ã¨ä¸€è‡´ã—ã¾ã›ã‚“。"
kor "Row %luì—ì„œ 칼럼 카운트와 value 카운터와 ì¼ì¹˜í•˜ì§€ 않습니다."
+ nla "Kolom aantal komt niet overeen met waarde aantal in rij %lu"
por "Contagem de colunas não confere com a contagem de valores na linha %lu"
rum "Numarul de coloane nu corespunde cu numarul de valori la linia %lu"
rus "КоличеÑтво Ñтолбцов не Ñовпадает Ñ ÐºÐ¾Ð»Ð¸Ñ‡ÐµÑтвом значений в запиÑи %lu"
@@ -3145,9 +3277,9 @@ ER_WRONG_VALUE_COUNT_ON_ROW 21S01
swe "Antalet kolumner motsvarar inte antalet värden på rad: %lu"
ukr "КількіÑÑ‚ÑŒ Ñтовбців не Ñпівпадає з кількіÑÑ‚ÑŽ значень у Ñтроці %lu"
ER_CANT_REOPEN_TABLE
+ chi "无法é‡æ–°æ‰“开表:'%-.192s'"
cze "Nemohu znovuotevřít tabulku: '%-.192s"
dan "Kan ikke genåbne tabel '%-.192s"
- nla "Kan tabel niet opnieuw openen: '%-.192s"
eng "Can't reopen table: '%-.192s'"
est "Ei suuda taasavada tabelit '%-.192s'"
fre "Impossible de réouvrir la table: '%-.192s"
@@ -3157,6 +3289,7 @@ ER_CANT_REOPEN_TABLE
ita "Impossibile riaprire la tabella: '%-.192s'"
jpn "表をå†ã‚ªãƒ¼ãƒ—ンã§ãã¾ã›ã‚“。: '%-.192s'"
kor "í…Œì´ë¸”ì„ ë‹¤ì‹œ 열수 없군요: '%-.192s"
+ nla "Kan tabel niet opnieuw openen: '%-.192s"
nor "Can't reopen table: '%-.192s"
norwegian-ny "Can't reopen table: '%-.192s"
pol "Can't reopen table: '%-.192s"
@@ -3169,9 +3302,9 @@ ER_CANT_REOPEN_TABLE
swe "Kunde inte stänga och öppna tabell '%-.192s"
ukr "Ðе можу перевідкрити таблицю: '%-.192s'"
ER_INVALID_USE_OF_NULL 22004
+ chi "无效使用 NULL 值"
cze "Neplatné užití hodnoty NULL"
dan "Forkert brug af nulværdi (NULL)"
- nla "Foutief gebruik van de NULL waarde"
eng "Invalid use of NULL value"
est "NULL väärtuse väärkasutus"
fre "Utilisation incorrecte de la valeur NULL"
@@ -3181,6 +3314,7 @@ ER_INVALID_USE_OF_NULL 22004
ita "Uso scorretto del valore NULL"
jpn "NULL 値ã®ä½¿ç”¨æ–¹æ³•ãŒä¸é©åˆ‡ã§ã™ã€‚"
kor "NULL ê°’ì„ ìž˜ëª» 사용하셨군요..."
+ nla "Foutief gebruik van de NULL waarde"
por "Uso inválido do valor NULL"
rum "Folosirea unei value NULL e invalida"
rus "Ðеправильное иÑпользование величины NULL"
@@ -3189,9 +3323,9 @@ ER_INVALID_USE_OF_NULL 22004
swe "Felaktig använding av NULL"
ukr "Хибне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL"
ER_REGEXP_ERROR 42000
+ chi "正则表达错误 '%-.64s'"
cze "Regulární výraz vrátil chybu '%-.64s'"
dan "Fik fejl '%-.64s' fra regexp"
- nla "Fout '%-.64s' ontvangen van regexp"
eng "Got error '%-.64s' from regexp"
est "regexp tagastas vea '%-.64s'"
fre "Erreur '%-.64s' provenant de regexp"
@@ -3201,6 +3335,7 @@ ER_REGEXP_ERROR 42000
ita "Errore '%-.64s' da regexp"
jpn "regexp ãŒã‚¨ãƒ©ãƒ¼ '%-.64s' ã‚’è¿”ã—ã¾ã—ãŸã€‚"
kor "regexpì—ì„œ '%-.64s'ê°€ 났습니다."
+ nla "Fout '%-.64s' ontvangen van regexp"
por "Obteve erro '%-.64s' em regexp"
rum "Eroarea '%-.64s' obtinuta din expresia regulara (regexp)"
rus "Получена ошибка '%-.64s' от регулÑрного выражениÑ"
@@ -3209,9 +3344,9 @@ ER_REGEXP_ERROR 42000
swe "Fick fel '%-.64s' från REGEXP"
ukr "Отримано помилку '%-.64s' від регулÑрного виразу"
ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000
+ chi "如果没有 GROUP BY å­å¥ï¼Œä¸èƒ½æ··åˆæ²¡æœ‰ GROUP 列的 GROUP 列 (MIN(),MAX(),COUNT(),...)"
cze "Pokud není žádná GROUP BY klauzule, není dovoleno souÄasné použití GROUP položek (MIN(),MAX(),COUNT()...) s ne GROUP položkami"
dan "Sammenblanding af GROUP kolonner (MIN(),MAX(),COUNT()...) uden GROUP kolonner er ikke tilladt, hvis der ikke er noget GROUP BY prædikat"
- nla "Het mixen van GROUP kolommen (MIN(),MAX(),COUNT()...) met no-GROUP kolommen is foutief indien er geen GROUP BY clausule is"
eng "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause"
est "GROUP tulpade (MIN(),MAX(),COUNT()...) kooskasutamine tavaliste tulpadega ilma GROUP BY klauslita ei ole lubatud"
fre "Mélanger les colonnes GROUP (MIN(),MAX(),COUNT()...) avec des colonnes normales est interdit s'il n'y a pas de clause GROUP BY"
@@ -3220,6 +3355,7 @@ ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000
ita "Il mescolare funzioni di aggregazione (MIN(),MAX(),COUNT()...) e non e` illegale se non c'e` una clausula GROUP BY"
jpn "GROUP BYå¥ãŒç„¡ã„å ´åˆã€é›†è¨ˆé–¢æ•°(MIN(),MAX(),COUNT(),...)ã¨é€šå¸¸ã®åˆ—ã‚’åŒæ™‚ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
kor "GROUP BY ì ˆ ì—†ì´ í˜¼í•©ëœ GROUP 함수 (MIN(),MAX(),COUNT(),...) 를 사용할 수 없습니다."
+ nla "Het mixen van GROUP kolommen (MIN(),MAX(),COUNT()...) met no-GROUP kolommen is foutief indien er geen GROUP BY clausule is"
por "Mistura de colunas agrupadas (com MIN(), MAX(), COUNT(), ...) com colunas não agrupadas é ilegal, se não existir uma cláusula de agrupamento (cláusula GROUP BY)"
rum "Amestecarea de coloane GROUP (MIN(),MAX(),COUNT()...) fara coloane GROUP este ilegala daca nu exista o clauza GROUP BY"
rus "Одновременное иÑпользование Ñгруппированных (GROUP) Ñтолбцов (MIN(),MAX(),COUNT(),...) Ñ Ð½ÐµÑгруппированными Ñтолбцами ÑвлÑетÑÑ Ð½ÐµÐºÐ¾Ñ€Ñ€ÐµÐºÑ‚Ð½Ñ‹Ð¼, еÑли в выражении еÑÑ‚ÑŒ GROUP BY"
@@ -3228,9 +3364,9 @@ ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000
swe "Man får ha både GROUP-kolumner (MIN(),MAX(),COUNT()...) och fält i en fråga om man inte har en GROUP BY-del"
ukr "Ð—Ð¼Ñ–ÑˆÑƒÐ²Ð°Ð½Ð½Ñ GROUP Ñтовбців (MIN(),MAX(),COUNT()...) з не GROUP ÑтовбцÑми Ñ” забороненим, Ñкщо не має GROUP BY"
ER_NONEXISTING_GRANT 42000
+ chi "用户 '%-.48s' æ¥è‡ªä¸»æœº '%-.64s'没有此类授æƒ"
cze "Neexistuje odpovídající grant pro uživatele '%-.48s' na stroji '%-.64s'"
dan "Denne tilladelse findes ikke for brugeren '%-.48s' på vært '%-.64s'"
- nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s'"
eng "There is no such grant defined for user '%-.48s' on host '%-.64s'"
est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s'"
fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s'"
@@ -3239,6 +3375,7 @@ ER_NONEXISTING_GRANT 42000
ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s'"
jpn "ユーザー '%-.48s' (ホスト '%-.64s' 上) ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "ì‚¬ìš©ìž '%-.48s' (호스트 '%-.64s')를 위하여 ì •ì˜ëœ 그런 승ì¸ì€ 없습니다."
+ nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s'"
por "Não existe tal permissão (grant) definida para o usuário '%-.48s' no 'host' '%-.64s'"
rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.48s' de pe host-ul '%-.64s'"
rus "Такие права не определены Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ '%-.48s' на хоÑте '%-.64s'"
@@ -3247,11 +3384,10 @@ ER_NONEXISTING_GRANT 42000
swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s'"
ukr "Повноважень не визначено Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача '%-.48s' з хоÑту '%-.64s'"
ER_TABLEACCESS_DENIED_ERROR 42000
+ chi "%-.100T 命令的æƒé™æ‹’ç»ç”¨æˆ· '%s'@'%s' 用在表 '%-.192s'"
cze "%-.100T příkaz nepřístupný pro uživatele: '%s'@'%s' pro tabulku '%-.192s'"
dan "%-.100T-kommandoen er ikke tilladt for brugeren '%s'@'%s' for tabellen '%-.192s'"
- nla "%-.100T commando geweigerd voor gebruiker: '%s'@'%s' voor tabel '%-.192s'"
eng "%-.100T command denied to user '%s'@'%s' for table '%-.192s'"
- jps "コマンド %-.100T 㯠ユーザー '%s'@'%s' ,テーブル '%-.192s' ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“",
est "%-.100T käsk ei ole lubatud kasutajale '%s'@'%s' tabelis '%-.192s'"
fre "La commande '%-.100T' est interdite à l'utilisateur: '%s'@'%s' sur la table '%-.192s'"
ger "%-.100T Befehl nicht erlaubt für Benutzer '%s'@'%s' auf Tabelle '%-.192s'"
@@ -3259,6 +3395,7 @@ ER_TABLEACCESS_DENIED_ERROR 42000
ita "Comando %-.100T negato per l'utente: '%s'@'%s' sulla tabella '%-.192s'"
jpn "コマンド %-.100T 㯠ユーザー '%s'@'%s' ,テーブル '%-.192s' ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“"
kor "'%-.100T' ëª…ë ¹ì€ ë‹¤ìŒ ì‚¬ìš©ìžì—게 거부ë˜ì—ˆìŠµë‹ˆë‹¤. : '%s'@'%s' for í…Œì´ë¸” '%-.192s'"
+ nla "%-.100T commando geweigerd voor gebruiker: '%s'@'%s' voor tabel '%-.192s'"
por "Comando '%-.100T' negado para o usuário '%s'@'%s' na tabela '%-.192s'"
rum "Comanda %-.100T interzisa utilizatorului: '%s'@'%s' pentru tabela '%-.192s'"
rus "Команда %-.100T запрещена пользователю '%s'@'%s' Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ‹ '%-.192s'"
@@ -3267,11 +3404,10 @@ ER_TABLEACCESS_DENIED_ERROR 42000
swe "%-.100T ej tillåtet för '%s'@'%s' för tabell '%-.192s'"
ukr "%-.100T команда заборонена кориÑтувачу: '%s'@'%s' у таблиці '%-.192s'"
ER_COLUMNACCESS_DENIED_ERROR 42000
+ chi "%-.32s 命令的æƒé™æ‹’ç»ç”¨æˆ· '%s'@'%s' 用在列 '%-.192s' 在表 '%-.192s'"
cze "%-.32s příkaz nepřístupný pro uživatele: '%s'@'%s' pro sloupec '%-.192s' v tabulce '%-.192s'"
dan "%-.32s-kommandoen er ikke tilladt for brugeren '%s'@'%s' for kolonne '%-.192s' in tabellen '%-.192s'"
- nla "%-.32s commando geweigerd voor gebruiker: '%s'@'%s' voor kolom '%-.192s' in tabel '%-.192s'"
eng "%-.32s command denied to user '%s'@'%s' for column '%-.192s' in table '%-.192s'"
- jps "コマンド %-.32s 㯠ユーザー '%s'@'%s'Â¥n カラム '%-.192s' テーブル '%-.192s' ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“",
est "%-.32s käsk ei ole lubatud kasutajale '%s'@'%s' tulbale '%-.192s' tabelis '%-.192s'"
fre "La commande '%-.32s' est interdite à l'utilisateur: '%s'@'%s' sur la colonne '%-.192s' de la table '%-.192s'"
ger "%-.32s Befehl nicht erlaubt für Benutzer '%s'@'%s' und Feld '%-.192s' in Tabelle '%-.192s'"
@@ -3279,6 +3415,7 @@ ER_COLUMNACCESS_DENIED_ERROR 42000
ita "Comando %-.32s negato per l'utente: '%s'@'%s' sulla colonna '%-.192s' della tabella '%-.192s'"
jpn "コマンド %-.32s 㯠ユーザー '%s'@'%s'\n カラム '%-.192s' テーブル '%-.192s' ã«å¯¾ã—ã¦è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“"
kor "'%-.32s' ëª…ë ¹ì€ ë‹¤ìŒ ì‚¬ìš©ìžì—게 거부ë˜ì—ˆìŠµë‹ˆë‹¤. : '%s'@'%s' for 칼럼 '%-.192s' in í…Œì´ë¸” '%-.192s'"
+ nla "%-.32s commando geweigerd voor gebruiker: '%s'@'%s' voor kolom '%-.192s' in tabel '%-.192s'"
por "Comando '%-.32s' negado para o usuário '%s'@'%s' na coluna '%-.192s', na tabela '%-.192s'"
rum "Comanda %-.32s interzisa utilizatorului: '%s'@'%s' pentru coloana '%-.192s' in tabela '%-.192s'"
rus "Команда %-.32s запрещена пользователю '%s'@'%s' Ð´Ð»Ñ Ñтолбца '%-.192s' в таблице '%-.192s'"
@@ -3287,9 +3424,9 @@ ER_COLUMNACCESS_DENIED_ERROR 42000
swe "%-.32s ej tillåtet för '%s'@'%s' för kolumn '%-.192s' i tabell '%-.192s'"
ukr "%-.32s команда заборонена кориÑтувачу: '%s'@'%s' Ð´Ð»Ñ ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ '%-.192s' у таблиці '%-.192s'"
ER_ILLEGAL_GRANT_FOR_TABLE 42000
+ chi "éžæ³•çš„ GRANT/REVOKE 命令;请查阅文档查看å¯ä»¥ä½¿ç”¨å“ªäº›æƒé™"
cze "Neplatný příkaz GRANT/REVOKE. Prosím, pÅ™eÄtÄ›te si v manuálu, jaká privilegia je možné použít"
dan "Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres"
- nla "Foutief GRANT/REVOKE commando. Raadpleeg de handleiding welke priveleges gebruikt kunnen worden"
eng "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used"
est "Vigane GRANT/REVOKE käsk. Tutvu kasutajajuhendiga"
fre "Commande GRANT/REVOKE incorrecte. Consultez le manuel"
@@ -3299,6 +3436,7 @@ ER_ILLEGAL_GRANT_FOR_TABLE 42000
ita "Comando GRANT/REVOKE illegale. Prego consultare il manuale per sapere quali privilegi possono essere usati"
jpn "ä¸æ­£ãª GRANT/REVOKE コマンドã§ã™ã€‚ã©ã®æ¨©é™ã§åˆ©ç”¨å¯èƒ½ã‹ã¯ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã‚’å‚ç…§ã—ã¦ä¸‹ã•ã„。"
kor "ìž˜ëª»ëœ GRANT/REVOKE 명령. ì–´ë–¤ 권리와 승ì¸ì´ 사용ë˜ì–´ 질 수 있는지 ë©”ë‰´ì–¼ì„ ë³´ì‹œì˜¤."
+ nla "Foutief GRANT/REVOKE commando. Raadpleeg de handleiding welke priveleges gebruikt kunnen worden"
nor "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used"
norwegian-ny "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used"
pol "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used"
@@ -3311,9 +3449,9 @@ ER_ILLEGAL_GRANT_FOR_TABLE 42000
swe "Felaktigt GRANT-privilegium använt"
ukr "Хибна GRANT/REVOKE команда; прочитайте документацію ÑтоÑовно того, Ñкі права можна викориÑтовувати"
ER_GRANT_WRONG_HOST_OR_USER 42000
+ chi "GRANT 语å¥çš„主机或用户å‚数太长"
cze "Argument příkazu GRANT uživatel nebo stroj je příliš dlouhý"
dan "Værts- eller brugernavn for langt til GRANT"
- nla "De host of gebruiker parameter voor GRANT is te lang"
eng "The host or user argument to GRANT is too long"
est "Masina või kasutaja nimi GRANT lauses on liiga pikk"
fre "L'hôte ou l'utilisateur donné en argument à GRANT est trop long"
@@ -3323,6 +3461,7 @@ ER_GRANT_WRONG_HOST_OR_USER 42000
ita "L'argomento host o utente per la GRANT e` troppo lungo"
jpn "GRANTコマンドã¸ã®ã€ãƒ›ã‚¹ãƒˆåやユーザーåãŒé•·ã™ãŽã¾ã™ã€‚"
kor "승ì¸(GRANT)ì„ ìœ„í•˜ì—¬ 사용한 사용ìžë‚˜ í˜¸ìŠ¤íŠ¸ì˜ ê°’ë“¤ì´ ë„ˆë¬´ ê¹ë‹ˆë‹¤."
+ nla "De host of gebruiker parameter voor GRANT is te lang"
por "Argumento de 'host' ou de usuário para o GRANT é longo demais"
rum "Argumentul host-ului sau utilizatorului pentru GRANT e prea lung"
rus "Слишком длинное Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ/хоÑта Ð´Ð»Ñ GRANT"
@@ -3331,9 +3470,9 @@ ER_GRANT_WRONG_HOST_OR_USER 42000
swe "Felaktigt maskinnamn eller användarnamn använt med GRANT"
ukr "Ðргумент host або user Ð´Ð»Ñ GRANT задовгий"
ER_NO_SUCH_TABLE 42S02
+ chi "表 '%-.192s.%-.192s' ä¸å­˜åœ¨"
cze "Tabulka '%-.192s.%-.192s' neexistuje"
dan "Tabellen '%-.192s.%-.192s' eksisterer ikke"
- nla "Tabel '%-.192s.%-.192s' bestaat niet"
eng "Table '%-.192s.%-.192s' doesn't exist"
est "Tabelit '%-.192s.%-.192s' ei eksisteeri"
fre "La table '%-.192s.%-.192s' n'existe pas"
@@ -3343,6 +3482,7 @@ ER_NO_SUCH_TABLE 42S02
ita "La tabella '%-.192s.%-.192s' non esiste"
jpn "表 '%-.192s.%-.192s' ã¯å­˜åœ¨ã—ã¾ã›ã‚“。"
kor "í…Œì´ë¸” '%-.192s.%-.192s' 는 존재하지 않습니다."
+ nla "Tabel '%-.192s.%-.192s' bestaat niet"
nor "Table '%-.192s.%-.192s' doesn't exist"
norwegian-ny "Table '%-.192s.%-.192s' doesn't exist"
pol "Table '%-.192s.%-.192s' doesn't exist"
@@ -3355,9 +3495,9 @@ ER_NO_SUCH_TABLE 42S02
swe "Det finns ingen tabell som heter '%-.192s.%-.192s'"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ '%-.192s.%-.192s' не Ñ–Ñнує"
ER_NONEXISTING_TABLE_GRANT 42000
+ chi "没有为用户 '%-.48s' æ¥è‡ªä¸»æœº '%-.64s' 在表 '%-.192s' 上授æƒ"
cze "Neexistuje odpovídající grant pro uživatele '%-.48s' na stroji '%-.64s' pro tabulku '%-.192s'"
dan "Denne tilladelse eksisterer ikke for brugeren '%-.48s' på vært '%-.64s' for tabellen '%-.192s'"
- nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s' op tabel '%-.192s'"
eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on table '%-.192s'"
est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s' tabelile '%-.192s'"
fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s' sur la table '%-.192s'"
@@ -3366,6 +3506,7 @@ ER_NONEXISTING_TABLE_GRANT 42000
ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s' sulla tabella '%-.192s'"
jpn "ユーザー '%-.48s' (ホスト '%-.64s' 上) ã®è¡¨ '%-.192s' ã¸ã®æ¨©é™ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。"
kor "ì‚¬ìš©ìž '%-.48s'(호스트 '%-.64s')는 í…Œì´ë¸” '%-.192s'를 사용하기 위하여 ì •ì˜ëœ 승ì¸ì€ 없습니다. "
+ nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s' op tabel '%-.192s'"
por "Não existe tal permissão (grant) definido para o usuário '%-.48s' no 'host' '%-.64s', na tabela '%-.192s'"
rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.48s' de pe host-ul '%-.64s' pentru tabela '%-.192s'"
rus "Такие права не определены Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ '%-.48s' на компьютере '%-.64s' Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ‹ '%-.192s'"
@@ -3374,9 +3515,9 @@ ER_NONEXISTING_TABLE_GRANT 42000
swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s' för tabell '%-.192s'"
ukr "Повноважень не визначено Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача '%-.48s' з хоÑту '%-.64s' Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– '%-.192s'"
ER_NOT_ALLOWED_COMMAND 42000
+ chi "本 MariaDB 版本ä¸å…许使用这个命令"
cze "Použitý příkaz není v této verzi MariaDB povolen"
dan "Den brugte kommando er ikke tilladt med denne udgave af MariaDB"
- nla "Het used commando is niet toegestaan in deze MariaDB versie"
eng "The used command is not allowed with this MariaDB version"
est "Antud käsk ei ole lubatud käesolevas MariaDB versioonis"
fre "Cette commande n'existe pas dans cette version de MariaDB"
@@ -3386,6 +3527,7 @@ ER_NOT_ALLOWED_COMMAND 42000
ita "Il comando utilizzato non e` supportato in questa versione di MariaDB"
jpn "ã“ã®MariaDBãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯åˆ©ç”¨ã§ããªã„コマンドã§ã™ã€‚"
kor "ì‚¬ìš©ëœ ëª…ë ¹ì€ í˜„ìž¬ì˜ MariaDB 버젼ì—서는 ì´ìš©ë˜ì§€ 않습니다."
+ nla "Het used commando is niet toegestaan in deze MariaDB versie"
por "Comando usado não é permitido para esta versão do MariaDB"
rum "Comanda folosita nu este permisa pentru aceasta versiune de MariaDB"
rus "Эта команда не допуÑкаетÑÑ Ð² данной верÑии MariaDB"
@@ -3394,9 +3536,9 @@ ER_NOT_ALLOWED_COMMAND 42000
swe "Du kan inte använda detta kommando med denna MariaDB version"
ukr "ВикориÑтовувана команда не дозволена у цій верÑÑ–Ñ— MariaDB"
ER_SYNTAX_ERROR 42000
+ chi "您的 SQL 语法有错误;请查看相关文档"
cze "Vaše syntaxe je nějaká divná"
dan "Der er en fejl i SQL syntaksen"
- nla "Er is iets fout in de gebruikte syntax"
eng "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use"
est "Viga SQL süntaksis"
fre "Erreur de syntaxe"
@@ -3407,6 +3549,7 @@ ER_SYNTAX_ERROR 42000
ita "Errore di sintassi nella query SQL"
jpn "SQL構文エラーã§ã™ã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¯¾å¿œã™ã‚‹ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã‚’å‚ç…§ã—ã¦æ­£ã—ã„構文を確èªã—ã¦ãã ã•ã„。"
kor "SQL êµ¬ë¬¸ì— ì˜¤ë¥˜ê°€ 있습니다."
+ nla "Er is iets fout in de gebruikte syntax"
nor "Something is wrong in your syntax"
norwegian-ny "Something is wrong in your syntax"
pol "Something is wrong in your syntax"
@@ -3419,9 +3562,9 @@ ER_SYNTAX_ERROR 42000
swe "Du har något fel i din syntax"
ukr "У Ð²Ð°Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° у ÑинтакÑиÑÑ– SQL"
ER_DELAYED_CANT_CHANGE_LOCK
+ chi "延迟æ’入线程无法获得 %-.192s 的请求é”定"
cze "Zpožděný insert threadu nebyl schopen získat požadovaný zámek pro tabulku %-.192s"
dan "Forsinket indsættelse tråden (delayed insert thread) kunne ikke opnå lås på tabellen %-.192s"
- nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.192s"
eng "Delayed insert thread couldn't get requested lock for table %-.192s"
est "INSERT DELAYED lõim ei suutnud saada soovitud lukku tabelile %-.192s"
fre "La tâche 'delayed insert' n'a pas pu obtenir le verrou démandé sur la table %-.192s"
@@ -3430,6 +3573,7 @@ ER_DELAYED_CANT_CHANGE_LOCK
ita "Il thread di inserimento ritardato non riesce ad ottenere il lock per la tabella %-.192s"
jpn "'Delayed insert'スレッドãŒè¡¨ '%-.192s' ã®ãƒ­ãƒƒã‚¯ã‚’å–å¾—ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
kor "ì§€ì—°ëœ insert 쓰레드가 í…Œì´ë¸” %-.192sì˜ ìš”êµ¬ëœ ë½í‚¹ì„ 처리할 수 없었습니다."
+ nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.192s"
por "'Thread' de inserção retardada (atrasada) pois não conseguiu obter a trava solicitada para tabela '%-.192s'"
rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.192s"
rus "Поток, обÑлуживающий отложенную вÑтавку (delayed insert), не Ñмог получить запрашиваемую блокировку на таблицу %-.192s"
@@ -3438,9 +3582,9 @@ ER_DELAYED_CANT_CHANGE_LOCK
swe "DELAYED INSERT-tråden kunde inte låsa tabell '%-.192s'"
ukr "Гілка Ð´Ð»Ñ INSERT DELAYED не може отримати Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ– %-.192s"
ER_TOO_MANY_DELAYED_THREADS
+ chi "使用中的延迟线程太多"
cze "Příliš mnoho zpožděných threadů"
dan "For mange slettede tråde (threads) i brug"
- nla "Te veel 'delayed' threads in gebruik"
eng "Too many delayed threads in use"
est "Liiga palju DELAYED lõimesid kasutusel"
fre "Trop de tâche 'delayed' en cours"
@@ -3450,6 +3594,7 @@ ER_TOO_MANY_DELAYED_THREADS
ita "Troppi threads ritardati in uso"
jpn "'Delayed insert'スレッドãŒå¤šã™ãŽã¾ã™ã€‚"
kor "너무 ë§Žì€ ì§€ì—° 쓰레드를 사용하고 있습니다."
+ nla "Te veel 'delayed' threads in gebruik"
por "Excesso de 'threads' retardadas (atrasadas) em uso"
rum "Prea multe threaduri aminate care sint in uz"
rus "Слишком много потоков, обÑлуживающих отложенную вÑтавку (delayed insert)"
@@ -3458,9 +3603,9 @@ ER_TOO_MANY_DELAYED_THREADS
swe "Det finns redan 'max_delayed_threads' trådar i använding"
ukr "Забагато затриманих гілок викориÑтовуєтьÑÑ"
ER_ABORTING_CONNECTION 08S01
+ chi "终止连线 %ld æ•°æ®åº“: '%-.192s' 用户: '%-.48s' (%-.64s)"
cze "Zrušeno spojení %ld do databáze: '%-.192s' uživatel: '%-.48s' (%-.64s)"
dan "Afbrudt forbindelse %ld til database: '%-.192s' bruger: '%-.48s' (%-.64s)"
- nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' (%-.64s)"
eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
est "Ãœhendus katkestatud %ld andmebaasile: '%-.192s' kasutajale: '%-.48s' (%-.64s)"
fre "Connection %ld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' (%-.64s)"
@@ -3469,6 +3614,7 @@ ER_ABORTING_CONNECTION 08S01
ita "Interrotta la connessione %ld al db: '%-.192s' utente: '%-.48s' (%-.64s)"
jpn "接続 %ld ãŒä¸­æ–­ã•ã‚Œã¾ã—ãŸã€‚データベース: '%-.192s' ユーザー: '%-.48s' (%-.64s)"
kor "ë°ì´íƒ€ë² ì´ìŠ¤ ì ‘ì†ì„ 위한 ì—°ê²° %ldê°€ ì¤‘ë‹¨ë¨ : '%-.192s' 사용ìž: '%-.48s' (%-.64s)"
+ nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' (%-.64s)"
nor "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
norwegian-ny "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
pol "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
@@ -3481,9 +3627,9 @@ ER_ABORTING_CONNECTION 08S01
swe "Avbröt länken för tråd %ld till db '%-.192s', användare '%-.48s' (%-.64s)"
ukr "Перервано з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %ld до бази данних: '%-.192s' кориÑтувача: '%-.48s' (%-.64s)"
ER_NET_PACKET_TOO_LARGE 08S01
+ chi "收到的数æ®åŒ…大于 'max_allowed_packet' 字节"
cze "Zjištěn příchozí packet delší než 'max_allowed_packet'"
dan "Modtog en datapakke som var større end 'max_allowed_packet'"
- nla "Groter pakket ontvangen dan 'max_allowed_packet'"
eng "Got a packet bigger than 'max_allowed_packet' bytes"
est "Saabus suurem pakett kui lubatud 'max_allowed_packet' muutujaga"
fre "Paquet plus grand que 'max_allowed_packet' reçu"
@@ -3493,6 +3639,7 @@ ER_NET_PACKET_TOO_LARGE 08S01
ita "Ricevuto un pacchetto piu` grande di 'max_allowed_packet'"
jpn "'max_allowed_packet'よりも大ããªãƒ‘ケットをå—ä¿¡ã—ã¾ã—ãŸã€‚"
kor "'max_allowed_packet'보다 ë”í° íŒ¨í‚·ì„ ë°›ì•˜ìŠµë‹ˆë‹¤."
+ nla "Groter pakket ontvangen dan 'max_allowed_packet'"
por "Obteve um pacote maior do que a taxa máxima de pacotes definida (max_allowed_packet)"
rum "Un packet mai mare decit 'max_allowed_packet' a fost primit"
rus "Полученный пакет больше, чем 'max_allowed_packet'"
@@ -3501,9 +3648,9 @@ ER_NET_PACKET_TOO_LARGE 08S01
swe "Kommunkationspaketet är större än 'max_allowed_packet'"
ukr "Отримано пакет більший ніж max_allowed_packet"
ER_NET_READ_ERROR_FROM_PIPE 08S01
+ chi "连接管é“读å–错误"
cze "ZjiÅ¡tÄ›na chyba pÅ™i Ätení z roury spojení"
dan "Fik læsefejl fra forbindelse (connection pipe)"
- nla "Kreeg leesfout van de verbindings pipe"
eng "Got a read error from the connection pipe"
est "Viga ühendustoru lugemisel"
fre "Erreur de lecture reçue du pipe de connexion"
@@ -3513,6 +3660,7 @@ ER_NET_READ_ERROR_FROM_PIPE 08S01
ita "Rilevato un errore di lettura dalla pipe di connessione"
jpn "接続パイプã®èª­ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ã§ã™ã€‚"
kor "ì—°ê²° 파ì´í”„로부터 ì—러가 ë°œìƒí•˜ì˜€ìŠµë‹ˆë‹¤."
+ nla "Kreeg leesfout van de verbindings pipe"
por "Obteve um erro de leitura no 'pipe' da conexão"
rum "Eroare la citire din cauza lui 'connection pipe'"
rus "Получена ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¾Ñ‚ потока ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ (connection pipe)"
@@ -3521,9 +3669,9 @@ ER_NET_READ_ERROR_FROM_PIPE 08S01
swe "Fick läsfel från klienten vid läsning från 'PIPE'"
ukr "Отримано помилку Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð· комунікаційного каналу"
ER_NET_FCNTL_ERROR 08S01
+ chi "fcntl()的错误"
cze "Zjištěna chyba fcntl()"
dan "Fik fejlmeddelelse fra fcntl()"
- nla "Kreeg fout van fcntl()"
eng "Got an error from fcntl()"
est "fcntl() tagastas vea"
fre "Erreur reçue de fcntl() "
@@ -3533,6 +3681,7 @@ ER_NET_FCNTL_ERROR 08S01
ita "Rilevato un errore da fcntl()"
jpn "fcntl()ãŒã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã—ãŸã€‚"
kor "fcntl() 함수로부터 ì—러가 ë°œìƒí•˜ì˜€ìŠµë‹ˆë‹¤."
+ nla "Kreeg fout van fcntl()"
por "Obteve um erro em fcntl()"
rum "Eroare obtinuta de la fcntl()"
rus "Получена ошибка от fcntl()"
@@ -3541,9 +3690,9 @@ ER_NET_FCNTL_ERROR 08S01
swe "Fick fatalt fel från 'fcntl()'"
ukr "Отримано помилкку від fcntl()"
ER_NET_PACKETS_OUT_OF_ORDER 08S01
+ chi "æ•°æ®åŒ…ä¹±åº"
cze "Příchozí packety v chybném pořadí"
dan "Modtog ikke datapakker i korrekt rækkefølge"
- nla "Pakketten in verkeerde volgorde ontvangen"
eng "Got packets out of order"
est "Paketid saabusid vales järjekorras"
fre "Paquets reçus dans le désordre"
@@ -3553,6 +3702,7 @@ ER_NET_PACKETS_OUT_OF_ORDER 08S01
ita "Ricevuti pacchetti non in ordine"
jpn "ä¸æ­£ãªé †åºã®ãƒ‘ケットをå—ä¿¡ã—ã¾ã—ãŸã€‚"
kor "순서가 맞지않는 íŒ¨í‚·ì„ ë°›ì•˜ìŠµë‹ˆë‹¤."
+ nla "Pakketten in verkeerde volgorde ontvangen"
por "Obteve pacotes fora de ordem"
rum "Packets care nu sint ordonati au fost gasiti"
rus "Пакеты получены в неверном порÑдке"
@@ -3561,9 +3711,9 @@ ER_NET_PACKETS_OUT_OF_ORDER 08S01
swe "Kommunikationspaketen kom i fel ordning"
ukr "Отримано пакети у неналежному порÑдку"
ER_NET_UNCOMPRESS_ERROR 08S01
+ chi "无法解压缩通信数æ®åŒ…"
cze "Nemohu rozkomprimovat komunikaÄní packet"
dan "Kunne ikke dekomprimere kommunikations-pakke (communication packet)"
- nla "Communicatiepakket kon niet worden gedecomprimeerd"
eng "Couldn't uncompress communication packet"
est "Viga andmepaketi lahtipakkimisel"
fre "Impossible de décompresser le paquet reçu"
@@ -3573,6 +3723,7 @@ ER_NET_UNCOMPRESS_ERROR 08S01
ita "Impossibile scompattare i pacchetti di comunicazione"
jpn "圧縮パケットã®å±•é–‹ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
kor "통신 íŒ¨í‚·ì˜ ì••ì¶•í•´ì œë¥¼ í•  수 없었습니다."
+ nla "Communicatiepakket kon niet worden gedecomprimeerd"
por "Não conseguiu descomprimir pacote de comunicação"
rum "Nu s-a putut decompresa pachetul de comunicatie (communication packet)"
rus "Ðевозможно раÑпаковать пакет, полученный через коммуникационный протокол"
@@ -3581,9 +3732,9 @@ ER_NET_UNCOMPRESS_ERROR 08S01
swe "Kunde inte packa up kommunikationspaketet"
ukr "Ðе можу декомпреÑувати комунікаційний пакет"
ER_NET_READ_ERROR 08S01
+ chi "读å–通信数æ®åŒ…出错"
cze "ZjiÅ¡tÄ›na chyba pÅ™i Ätení komunikaÄního packetu"
dan "Fik fejlmeddelelse ved læsning af kommunikations-pakker (communication packets)"
- nla "Fout bij het lezen van communicatiepakketten"
eng "Got an error reading communication packets"
est "Viga andmepaketi lugemisel"
fre "Erreur de lecture des paquets reçus"
@@ -3593,6 +3744,7 @@ ER_NET_READ_ERROR 08S01
ita "Rilevato un errore ricevendo i pacchetti di comunicazione"
jpn "パケットã®å—ä¿¡ã§ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
kor "통신 íŒ¨í‚·ì„ ì½ëŠ” 중 오류가 ë°œìƒí•˜ì˜€ìŠµë‹ˆë‹¤."
+ nla "Fout bij het lezen van communicatiepakketten"
por "Obteve um erro na leitura de pacotes de comunicação"
rum "Eroare obtinuta citind pachetele de comunicatie (communication packets)"
rus "Получена ошибка в процеÑÑе Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð° через коммуникационный протокол "
@@ -3601,9 +3753,9 @@ ER_NET_READ_ERROR 08S01
swe "Fick ett fel vid läsning från klienten"
ukr "Отримано помилку Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ ÐºÐ¾Ð¼ÑƒÐ½Ñ–ÐºÐ°Ñ†Ñ–Ð¹Ð½Ð¸Ñ… пакетів"
ER_NET_READ_INTERRUPTED 08S01
+ chi "读å–通信包超时"
cze "ZjiÅ¡tÄ›n timeout pÅ™i Ätení komunikaÄního packetu"
dan "Timeout-fejl ved læsning af kommunukations-pakker (communication packets)"
- nla "Timeout bij het lezen van communicatiepakketten"
eng "Got timeout reading communication packets"
est "Kontrollaja ületamine andmepakettide lugemisel"
fre "Timeout en lecture des paquets reçus"
@@ -3613,6 +3765,7 @@ ER_NET_READ_INTERRUPTED 08S01
ita "Rilevato un timeout ricevendo i pacchetti di comunicazione"
jpn "パケットã®å—ä¿¡ã§ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
kor "통신 íŒ¨í‚·ì„ ì½ëŠ” 중 timeoutì´ ë°œìƒí•˜ì˜€ìŠµë‹ˆë‹¤."
+ nla "Timeout bij het lezen van communicatiepakketten"
por "Obteve expiração de tempo (timeout) na leitura de pacotes de comunicação"
rum "Timeout obtinut citind pachetele de comunicatie (communication packets)"
rus "Получен таймаут Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð° через коммуникационный протокол "
@@ -3621,9 +3774,9 @@ ER_NET_READ_INTERRUPTED 08S01
swe "Fick 'timeout' vid läsning från klienten"
ukr "Отримано затримку Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ ÐºÐ¾Ð¼ÑƒÐ½Ñ–ÐºÐ°Ñ†Ñ–Ð¹Ð½Ð¸Ñ… пакетів"
ER_NET_ERROR_ON_WRITE 08S01
+ chi "写入通信包时出错"
cze "ZjiÅ¡tÄ›na chyba pÅ™i zápisu komunikaÄního packetu"
dan "Fik fejlmeddelelse ved skrivning af kommunukations-pakker (communication packets)"
- nla "Fout bij het schrijven van communicatiepakketten"
eng "Got an error writing communication packets"
est "Viga andmepaketi kirjutamisel"
fre "Erreur d'écriture des paquets envoyés"
@@ -3633,6 +3786,7 @@ ER_NET_ERROR_ON_WRITE 08S01
ita "Rilevato un errore inviando i pacchetti di comunicazione"
jpn "パケットã®é€ä¿¡ã§ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
kor "통신 íŒ¨í‚·ì„ ê¸°ë¡í•˜ëŠ” 중 오류가 ë°œìƒí•˜ì˜€ìŠµë‹ˆë‹¤."
+ nla "Fout bij het schrijven van communicatiepakketten"
por "Obteve um erro na escrita de pacotes de comunicação"
rum "Eroare in scrierea pachetelor de comunicatie (communication packets)"
rus "Получена ошибка при передаче пакета через коммуникационный протокол "
@@ -3641,9 +3795,9 @@ ER_NET_ERROR_ON_WRITE 08S01
swe "Fick ett fel vid skrivning till klienten"
ukr "Отримано помилку запиÑу комунікаційних пакетів"
ER_NET_WRITE_INTERRUPTED 08S01
+ chi "写入通信包超时"
cze "ZjiÅ¡tÄ›n timeout pÅ™i zápisu komunikaÄního packetu"
dan "Timeout-fejl ved skrivning af kommunukations-pakker (communication packets)"
- nla "Timeout bij het schrijven van communicatiepakketten"
eng "Got timeout writing communication packets"
est "Kontrollaja ületamine andmepakettide kirjutamisel"
fre "Timeout d'écriture des paquets envoyés"
@@ -3653,6 +3807,7 @@ ER_NET_WRITE_INTERRUPTED 08S01
ita "Rilevato un timeout inviando i pacchetti di comunicazione"
jpn "パケットã®é€ä¿¡ã§ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
kor "통신 íŒ¨íŒƒì„ ê¸°ë¡í•˜ëŠ” 중 timeoutì´ ë°œìƒí•˜ì˜€ìŠµë‹ˆë‹¤."
+ nla "Timeout bij het schrijven van communicatiepakketten"
por "Obteve expiração de tempo ('timeout') na escrita de pacotes de comunicação"
rum "Timeout obtinut scriind pachetele de comunicatie (communication packets)"
rus "Получен таймаут в процеÑÑе передачи пакета через коммуникационный протокол "
@@ -3661,18 +3816,19 @@ ER_NET_WRITE_INTERRUPTED 08S01
swe "Fick 'timeout' vid skrivning till klienten"
ukr "Отримано затримку запиÑу комунікаційних пакетів"
ER_TOO_LONG_STRING 42000
+ chi "结果字符串长于'max_allowed_packet'字节"
cze "Výsledný řetězec je delší než 'max_allowed_packet'"
dan "Strengen med resultater er større end 'max_allowed_packet'"
- nla "Resultaat string is langer dan 'max_allowed_packet'"
eng "Result string is longer than 'max_allowed_packet' bytes"
est "Tulemus on pikem kui lubatud 'max_allowed_packet' muutujaga"
fre "La chaîne résultat est plus grande que 'max_allowed_packet'"
ger "Ergebnis-String ist länger als 'max_allowed_packet' Bytes"
- kor "ê²°ê³¼ 문ìžì—´ì´ ì„¤ì •ëœ max_allowed_packet 값보다 í½ë‹ˆë‹¤."
hindi "रिजलà¥à¤Ÿ सà¥à¤Ÿà¥à¤°à¤¿à¤‚ग 'max_allowed_packet' से लंबा है"
hun "Ez eredmeny sztring nagyobb, mint a lehetseges maximum: 'max_allowed_packet'"
ita "La stringa di risposta e` piu` lunga di 'max_allowed_packet'"
jpn "çµæžœã®æ–‡å­—列㌠'max_allowed_packet' よりも大ãã„ã§ã™ã€‚"
+ kor "ê²°ê³¼ 문ìžì—´ì´ ì„¤ì •ëœ max_allowed_packet 값보다 í½ë‹ˆë‹¤."
+ nla "Resultaat string is langer dan 'max_allowed_packet'"
por "'String' resultante é mais longa do que 'max_allowed_packet'"
rum "Sirul rezultat este mai lung decit 'max_allowed_packet'"
rus "Ð ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð¸Ñ€ÑƒÑŽÑ‰Ð°Ñ Ñтрока больше, чем 'max_allowed_packet'"
@@ -3681,17 +3837,18 @@ ER_TOO_LONG_STRING 42000
swe "Resultatsträngen är längre än max_allowed_packet"
ukr "Строка результату довша ніж max_allowed_packet"
ER_TABLE_CANT_HANDLE_BLOB 42000
+ chi "存储引擎%sä¸æ”¯æŒblob / text列"
cze "Typ použité tabulky (%s) nepodporuje BLOB/TEXT sloupce"
dan "Denne tabeltype (%s) understøtter ikke brug af BLOB og TEXT kolonner"
- nla "Het gebruikte tabel type (%s) ondersteunt geen BLOB/TEXT kolommen"
eng "Storage engine %s doesn't support BLOB/TEXT columns"
est "Valitud tabelitüüp (%s) ei toeta BLOB/TEXT tüüpi välju"
fre "Ce type de table (%s) ne supporte pas les colonnes BLOB/TEXT"
ger "Der verwendete Tabellentyp (%s) unterstützt keine BLOB- und TEXT-Felder"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s BLOB/TEXT कॉलमà¥à¤¸ को सपोरà¥à¤Ÿ नहीं करता"
hun "A hasznalt tabla tipus (%s) nem tamogatja a BLOB/TEXT mezoket"
- kor "스토리지 엔진 (%s)는 BLOB/TEXT ì»¬ëŸ¼ì„ ì§€ì›í•˜ì§€ 않습니다."
ita "Il tipo di tabella usata (%s) non supporta colonne di tipo BLOB/TEXT"
+ kor "스토리지 엔진 (%s)는 BLOB/TEXT ì»¬ëŸ¼ì„ ì§€ì›í•˜ì§€ 않습니다."
+ nla "Het gebruikte tabel type (%s) ondersteunt geen BLOB/TEXT kolommen"
por "Tipo de tabela usado (%s) não permite colunas BLOB/TEXT"
rum "Tipul de tabela folosit (%s) nu suporta coloane de tip BLOB/TEXT"
rus "%s таблицы не поддерживают типы BLOB/TEXT"
@@ -3700,17 +3857,18 @@ ER_TABLE_CANT_HANDLE_BLOB 42000
swe "Den använda tabelltypen (%s) kan inte hantera BLOB/TEXT-kolumner"
ukr "%s таблиці не підтримують BLOB/TEXT Ñтовбці"
ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000
+ chi "存储引擎%sä¸æ”¯æŒauto_increment列"
cze "Typ použité tabulky (%s) nepodporuje AUTO_INCREMENT sloupce"
dan "Denne tabeltype understøtter (%s) ikke brug af AUTO_INCREMENT kolonner"
- nla "Het gebruikte tabel type (%s) ondersteunt geen AUTO_INCREMENT kolommen"
eng "Storage engine %s doesn't support AUTO_INCREMENT columns"
est "Valitud tabelitüüp (%s) ei toeta AUTO_INCREMENT tüüpi välju"
fre "Ce type de table (%s) ne supporte pas les colonnes AUTO_INCREMENT"
ger "Der verwendete Tabellentyp (%s) unterstützt keine AUTO_INCREMENT-Felder"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s AUTO_INCREMENT कॉलमà¥à¤¸ को सपोरà¥à¤Ÿ नहीं करता"
- kor "스토리지 엔진 (%s)는 AUTO_INCREMENT를 지ì›í•˜ì§€ 않습니다."
hun "A hasznalt tabla tipus (%s) nem tamogatja az AUTO_INCREMENT tipusu mezoket"
ita "Il tipo di tabella usata (%s) non supporta colonne di tipo AUTO_INCREMENT"
+ kor "스토리지 엔진 (%s)는 AUTO_INCREMENT를 지ì›í•˜ì§€ 않습니다."
+ nla "Het gebruikte tabel type (%s) ondersteunt geen AUTO_INCREMENT kolommen"
por "Tipo de tabela usado (%s) não permite colunas AUTO_INCREMENT"
rum "Tipul de tabela folosit (%s) nu suporta coloane de tip AUTO_INCREMENT"
rus "%s таблицы не поддерживают автоинкрементные Ñтолбцы"
@@ -3719,9 +3877,9 @@ ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000
swe "Den använda tabelltypen (%s) kan inte hantera AUTO_INCREMENT-kolumner"
ukr "%s таблиці не підтримують AUTO_INCREMENT Ñтовбці"
ER_DELAYED_INSERT_TABLE_LOCKED
+ chi "INSERT DELAYED ä¸èƒ½ç”¨åœ¨è¡¨ '%-.192s' 因为它被LOCK TABLES é”定"
cze "INSERT DELAYED není možno s tabulkou '%-.192s' použít, protože je zamÄená pomocí LOCK TABLES"
dan "INSERT DELAYED kan ikke bruges med tabellen '%-.192s', fordi tabellen er låst med LOCK TABLES"
- nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.192s', vanwege een 'lock met LOCK TABLES"
eng "INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES"
est "INSERT DELAYED ei saa kasutada tabeli '%-.192s' peal, kuna see on lukustatud LOCK TABLES käsuga"
fre "INSERT DELAYED ne peut être utilisé avec la table '%-.192s', car elle est verrouée avec LOCK TABLES"
@@ -3731,6 +3889,7 @@ ER_DELAYED_INSERT_TABLE_LOCKED
ita "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.192s', perche` soggetta a lock da 'LOCK TABLES'"
jpn "表 '%-.192s' ã¯LOCK TABLESã§ãƒ­ãƒƒã‚¯ã•ã‚Œã¦ã„ã‚‹ãŸã‚ã€INSERT DELAYEDを使用ã§ãã¾ã›ã‚“。"
kor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
+ nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.192s', vanwege een 'lock met LOCK TABLES"
nor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
norwegian-ny "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
pol "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
@@ -3743,9 +3902,9 @@ ER_DELAYED_INSERT_TABLE_LOCKED
swe "INSERT DELAYED kan inte användas med tabell '%-.192s', emedan den är låst med LOCK TABLES"
ukr "INSERT DELAYED не може бути викориÑтано з таблицею '%-.192s', тому що Ñ—Ñ— заблоковано з LOCK TABLES"
ER_WRONG_COLUMN_NAME 42000
+ chi "错误列å '%-.100s'"
cze "Nesprávné jméno sloupce '%-.100s'"
dan "Forkert kolonnenavn '%-.100s'"
- nla "Incorrecte kolom naam '%-.100s'"
eng "Incorrect column name '%-.100s'"
est "Vigane tulba nimi '%-.100s'"
fre "Nom de colonne '%-.100s' incorrect"
@@ -3754,6 +3913,7 @@ ER_WRONG_COLUMN_NAME 42000
hun "Ervenytelen mezonev: '%-.100s'"
ita "Nome colonna '%-.100s' non corretto"
jpn "列å '%-.100s' ã¯ä¸æ­£ã§ã™ã€‚"
+ nla "Incorrecte kolom naam '%-.100s'"
por "Nome de coluna '%-.100s' incorreto"
rum "Nume increct de coloana '%-.100s'"
rus "Ðеверное Ð¸Ð¼Ñ Ñтолбца '%-.100s'"
@@ -3762,15 +3922,16 @@ ER_WRONG_COLUMN_NAME 42000
swe "Felaktigt kolumnnamn '%-.100s'"
ukr "Ðевірне ім'Ñ ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ '%-.100s'"
ER_WRONG_KEY_COLUMN 42000
+ chi "存储引擎 %s ä¸èƒ½ç»™ %`s 列建索引"
eng "The storage engine %s can't index column %`s"
ger "Die Speicher-Engine %s kann die Spalte %`s nicht indizieren"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s, कॉलम %`s को इंडेकà¥à¤¸ नहीं कर सकता"
rus "Обработчик таблиц %s не может проиндекÑировать Ñтолбец %`s"
ukr "Вказівник таблиц %s не може індекÑувати Ñтовбець %`s"
ER_WRONG_MRG_TABLE
+ chi "无法打开定义ä¸åŒæˆ–éž MyISAM 类型或ä¸å­˜åœ¨çš„表"
cze "Všechny tabulky v MERGE tabulce nejsou definovány stejně"
dan "Tabellerne i MERGE er ikke defineret ens"
- nla "Niet alle tabellen in de MERGE tabel hebben identieke gedefinities"
eng "Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist"
est "Kõik tabelid MERGE tabeli määratluses ei ole identsed"
fre "Toutes les tables de la table de type MERGE n'ont pas la même définition"
@@ -3779,6 +3940,7 @@ ER_WRONG_MRG_TABLE
ita "Non tutte le tabelle nella tabella di MERGE sono definite in maniera identica"
jpn "MERGE表ã®æ§‹æˆè¡¨ãŒã‚ªãƒ¼ãƒ—ンã§ãã¾ã›ã‚“。列定義ãŒç•°ãªã‚‹ã‹ã€MyISAM表ã§ã¯ãªã„ã‹ã€å­˜åœ¨ã—ã¾ã›ã‚“。"
kor "All tables in the MERGE table are not defined identically"
+ nla "Niet alle tabellen in de MERGE tabel hebben identieke gedefinities"
nor "All tables in the MERGE table are not defined identically"
norwegian-ny "All tables in the MERGE table are not defined identically"
pol "All tables in the MERGE table are not defined identically"
@@ -3791,16 +3953,17 @@ ER_WRONG_MRG_TABLE
swe "Tabellerna i MERGE-tabellen är inte identiskt definierade"
ukr "Таблиці у MERGE TABLE мають різну Ñтруктуру"
ER_DUP_UNIQUE 23000
+ chi "因为表'%-.192s' 唯一约æŸï¼Œæ— æ³•å†™å…¥"
cze "Kvůli unique constraintu nemozu zapsat do tabulky '%-.192s'"
dan "Kan ikke skrive til tabellen '%-.192s' fordi det vil bryde CONSTRAINT regler"
- nla "Kan niet opslaan naar table '%-.192s' vanwege 'unique' beperking"
eng "Can't write, because of unique constraint, to table '%-.192s'"
est "Ei suuda kirjutada tabelisse '%-.192s', kuna see rikub ühesuse kitsendust"
fre "Écriture impossible à cause d'un index UNIQUE sur la table '%-.192s'"
ger "Schreiben in Tabelle '%-.192s' nicht möglich wegen einer Eindeutigkeitsbeschränkung (unique constraint)"
hun "A '%-.192s' nem irhato, az egyedi mezok miatt"
- jpn "一æ„性制約é•åã®ãŸã‚ã€è¡¨ '%-.192s' ã«æ›¸ãè¾¼ã‚ã¾ã›ã‚“。"
ita "Impossibile scrivere nella tabella '%-.192s' per limitazione di unicita`"
+ jpn "一æ„性制約é•åã®ãŸã‚ã€è¡¨ '%-.192s' ã«æ›¸ãè¾¼ã‚ã¾ã›ã‚“。"
+ nla "Kan niet opslaan naar table '%-.192s' vanwege 'unique' beperking"
por "Não pode gravar, devido à restrição UNIQUE, na tabela '%-.192s'"
rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.192s'"
rus "Ðевозможно запиÑать в таблицу '%-.192s' из-за ограничений уникального ключа"
@@ -3809,9 +3972,9 @@ ER_DUP_UNIQUE 23000
swe "Kan inte skriva till tabell '%-.192s'; UNIQUE-test"
ukr "Ðе можу запиÑати до таблиці '%-.192s', з причини вимог унікальноÑÑ‚Ñ–"
ER_BLOB_KEY_WITHOUT_LENGTH 42000
+ chi "BLOB/TEXT 列 '%-.192s' 在没有索引长度的索引规范中使用"
cze "BLOB sloupec '%-.192s' je použit ve specifikaci klíÄe bez délky"
dan "BLOB kolonnen '%-.192s' brugt i nøglespecifikation uden nøglelængde"
- nla "BLOB kolom '%-.192s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte"
eng "BLOB/TEXT column '%-.192s' used in key specification without a key length"
est "BLOB-tüüpi tulp '%-.192s' on kasutusel võtmes ilma pikkust määratlemata"
fre "La colonne '%-.192s' de type BLOB est utilisée dans une définition d'index sans longueur d'index"
@@ -3821,6 +3984,7 @@ ER_BLOB_KEY_WITHOUT_LENGTH 42000
ita "La colonna '%-.192s' di tipo BLOB e` usata in una chiave senza specificarne la lunghezza"
jpn "BLOB列 '%-.192s' をキーã«ä½¿ç”¨ã™ã‚‹ã«ã¯é•·ã•æŒ‡å®šãŒå¿…è¦ã§ã™ã€‚"
kor "BLOB column '%-.192s' used in key specification without a key length"
+ nla "BLOB kolom '%-.192s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte"
nor "BLOB column '%-.192s' used in key specification without a key length"
norwegian-ny "BLOB column '%-.192s' used in key specification without a key length"
pol "BLOB column '%-.192s' used in key specification without a key length"
@@ -3833,9 +3997,9 @@ ER_BLOB_KEY_WITHOUT_LENGTH 42000
swe "Du har inte angett någon nyckellängd för BLOB '%-.192s'"
ukr "Стовбець BLOB '%-.192s' викориÑтано у визначенні ключа без Ð²ÐºÐ°Ð·Ð°Ð½Ð½Ñ Ð´Ð¾Ð²Ð¶Ð¸Ð½Ð¸ ключа"
ER_PRIMARY_CANT_HAVE_NULL 42000
+ chi "PRIMARY KEY 的所有部分都ä¸èƒ½ä¸ºNULL;如果您需è¦åœ¨é”®ä¸­ä½¿ç”¨ NULL,请改用 UNIQUE"
cze "VÅ¡echny Äásti primárního klíÄe musejí být NOT NULL; pokud potÅ™ebujete NULL, použijte UNIQUE"
dan "Alle dele af en PRIMARY KEY skal være NOT NULL; Hvis du skal bruge NULL i nøglen, brug UNIQUE istedet"
- nla "Alle delen van een PRIMARY KEY moeten NOT NULL zijn; Indien u NULL in een zoeksleutel nodig heeft kunt u UNIQUE gebruiken"
eng "All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead"
est "Kõik PRIMARY KEY peavad olema määratletud NOT NULL piiranguga; vajadusel kasuta UNIQUE tüüpi võtit"
fre "Toutes les parties d'un index PRIMARY KEY doivent être NOT NULL; Si vous avez besoin d'un NULL dans l'index, utilisez un index UNIQUE"
@@ -3844,6 +4008,7 @@ ER_PRIMARY_CANT_HAVE_NULL 42000
hun "Az elsodleges kulcs teljes egeszeben csak NOT NULL tipusu lehet; Ha NULL mezot szeretne a kulcskent, hasznalja inkabb a UNIQUE-ot"
ita "Tutte le parti di una chiave primaria devono essere dichiarate NOT NULL; se necessitano valori NULL nelle chiavi utilizzare UNIQUE"
jpn "PRIMARY KEYã®åˆ—ã¯å…¨ã¦NOT NULLã§ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“。UNIQUE索引ã§ã‚ã‚Œã°NULLã‚’å«ã‚€ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚"
+ nla "Alle delen van een PRIMARY KEY moeten NOT NULL zijn; Indien u NULL in een zoeksleutel nodig heeft kunt u UNIQUE gebruiken"
por "Todas as partes de uma chave primária devem ser não-nulas. Se você precisou usar um valor nulo (NULL) em uma chave, use a cláusula UNIQUE em seu lugar"
rum "Toate partile unei chei primare (PRIMARY KEY) trebuie sa fie NOT NULL; Daca aveti nevoie de NULL in vreo cheie, folositi UNIQUE in schimb"
rus "Ð’Ñе чаÑти первичного ключа (PRIMARY KEY) должны быть определены как NOT NULL; ЕÑли вам нужна поддержка величин NULL в ключе, воÑпользуйтеÑÑŒ индекÑом UNIQUE"
@@ -3852,9 +4017,9 @@ ER_PRIMARY_CANT_HAVE_NULL 42000
swe "Alla delar av en PRIMARY KEY måste vara NOT NULL; Om du vill ha en nyckel med NULL, använd UNIQUE istället"
ukr "УÑÑ– чаÑтини PRIMARY KEY повинні бути NOT NULL; Якщо ви потребуєте NULL у ключі, ÑкориÑтайтеÑÑ UNIQUE"
ER_TOO_MANY_ROWS 42000
+ chi "结果多于一行"
cze "Výsledek obsahuje více než jeden řádek"
dan "Resultatet bestod af mere end een række"
- nla "Resultaat bevatte meer dan een rij"
eng "Result consisted of more than one row"
est "Tulemis oli rohkem kui üks kirje"
fre "Le résultat contient plus d'un enregistrement"
@@ -3863,6 +4028,7 @@ ER_TOO_MANY_ROWS 42000
hun "Az eredmeny tobb, mint egy sort tartalmaz"
ita "Il risultato consiste di piu` di una riga"
jpn "çµæžœãŒ2行以上ã§ã™ã€‚"
+ nla "Resultaat bevatte meer dan een rij"
por "O resultado consistiu em mais do que uma linha"
rum "Resultatul constista din mai multe linii"
rus "Ð’ результате возвращена более чем одна Ñтрока"
@@ -3871,9 +4037,9 @@ ER_TOO_MANY_ROWS 42000
swe "Resultet bestod av mera än en rad"
ukr "Результат знаходитьÑÑ Ñƒ більше ніж одній Ñтроці"
ER_REQUIRES_PRIMARY_KEY 42000
+ chi "此表类型需è¦ä¸»ç´¢å¼•"
cze "Tento typ tabulky vyžaduje primární klíÄ"
dan "Denne tabeltype kræver en primærnøgle"
- nla "Dit tabel type heeft een primaire zoeksleutel nodig"
eng "This table type requires a primary key"
est "Antud tabelitüüp nõuab primaarset võtit"
fre "Ce type de table nécessite une clé primaire (PRIMARY KEY)"
@@ -3882,6 +4048,7 @@ ER_REQUIRES_PRIMARY_KEY 42000
hun "Az adott tablatipushoz elsodleges kulcs hasznalata kotelezo"
ita "Questo tipo di tabella richiede una chiave primaria"
jpn "使用ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã§ã¯ã€PRIMARY KEYãŒå¿…è¦ã§ã™ã€‚"
+ nla "Dit tabel type heeft een primaire zoeksleutel nodig"
por "Este tipo de tabela requer uma chave primária"
rum "Aceast tip de tabela are nevoie de o cheie primara"
rus "Этот тип таблицы требует Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿ÐµÑ€Ð²Ð¸Ñ‡Ð½Ð¾Ð³Ð¾ ключа"
@@ -3890,9 +4057,9 @@ ER_REQUIRES_PRIMARY_KEY 42000
swe "Denna tabelltyp kräver en PRIMARY KEY"
ukr "Цей тип таблиці потребує первинного ключа"
ER_NO_RAID_COMPILED
+ chi "这个版本的 MariaDB 编译时ä¸æ”¯æŒ RAID"
cze "Tato verze MariaDB není zkompilována s podporou RAID"
dan "Denne udgave af MariaDB er ikke oversat med understøttelse af RAID"
- nla "Deze versie van MariaDB is niet gecompileerd met RAID ondersteuning"
eng "This version of MariaDB is not compiled with RAID support"
est "Antud MariaDB versioon on kompileeritud ilma RAID toeta"
fre "Cette version de MariaDB n'est pas compilée avec le support RAID"
@@ -3901,6 +4068,7 @@ ER_NO_RAID_COMPILED
hun "Ezen leforditott MariaDB verzio nem tartalmaz RAID support-ot"
ita "Questa versione di MYSQL non e` compilata con il supporto RAID"
jpn "ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®MariaDBã¯RAIDサãƒãƒ¼ãƒˆã‚’å«ã‚ã¦ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¦ã„ã¾ã›ã‚“。"
+ nla "Deze versie van MariaDB is niet gecompileerd met RAID ondersteuning"
por "Esta versão do MariaDB não foi compilada com suporte a RAID"
rum "Aceasta versiune de MariaDB, nu a fost compilata cu suport pentru RAID"
rus "Эта верÑÐ¸Ñ MariaDB Ñкомпилирована без поддержки RAID"
@@ -3909,9 +4077,9 @@ ER_NO_RAID_COMPILED
swe "Denna version av MariaDB är inte kompilerad med RAID"
ukr "Ð¦Ñ Ð²ÐµÑ€ÑÑ–Ñ MariaDB не зкомпільована з підтримкою RAID"
ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE
+ chi "您正在使用安全更新模å¼ï¼ŒåŒæ—¶æ‚¨å°è¯•æ›´æ–°æ—¶æ²¡æœ‰ä½¿ç”¨å«æœ‰ KEY 列的 WHERE 语å¥"
cze "Update tabulky bez WHERE s klíÄem není v módu bezpeÄných update dovoleno"
dan "Du bruger sikker opdaterings modus ('safe update mode') og du forsøgte at opdatere en tabel uden en WHERE klausul, der gør brug af et KEY felt"
- nla "U gebruikt 'safe update mode' en u probeerde een tabel te updaten zonder een WHERE met een KEY kolom"
eng "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column"
est "Katse muuta tabelit turvalises rezhiimis ilma WHERE klauslita"
fre "Vous êtes en mode 'safe update' et vous essayez de faire un UPDATE sans clause WHERE utilisant un index"
@@ -3919,6 +4087,7 @@ ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE
hun "On a biztonsagos update modot hasznalja, es WHERE that uses a KEY column"
ita "In modalita` 'safe update' si e` cercato di aggiornare una tabella senza clausola WHERE su una chiave"
jpn "'safe update mode'ã§ã€ç´¢å¼•ã‚’利用ã™ã‚‹WHEREå¥ã®ç„¡ã„更新処ç†ã‚’実行ã—よã†ã¨ã—ã¾ã—ãŸã€‚"
+ nla "U gebruikt 'safe update mode' en u probeerde een tabel te updaten zonder een WHERE met een KEY kolom"
por "Você está usando modo de atualização seguro e tentou atualizar uma tabela sem uma cláusula WHERE que use uma coluna chave"
rus "Ð’Ñ‹ работаете в режиме безопаÑных обновлений (safe update mode) и попробовали изменить таблицу без иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ ÐºÐ»ÑŽÑ‡ÐµÐ²Ð¾Ð³Ð¾ Ñтолбца в чаÑти WHERE"
serbian "Vi koristite safe update mod servera, a probali ste da promenite podatke bez 'WHERE' komande koja koristi kolonu kljuÄa"
@@ -3926,9 +4095,9 @@ ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE
swe "Du använder 'säker uppdateringsmod' och försökte uppdatera en tabell utan en WHERE-sats som använder sig av en nyckel"
ukr "Ви у режимі безпечного Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ‚Ð° намагаєтеÑÑŒ оновити таблицю без оператора WHERE, що викориÑтовує KEY Ñтовбець"
ER_KEY_DOES_NOT_EXITS 42000 S1009
+ chi "索引 '%-.192s' 在表 '%-.192s' 里ä¸å­˜åœ¨"
cze "KlÃ­Ä '%-.192s' v tabulce '%-.192s' neexistuje"
dan "Nøglen '%-.192s' eksisterer ikke i tabellen '%-.192s'"
- nla "Zoeksleutel '%-.192s' bestaat niet in tabel '%-.192s'"
eng "Key '%-.192s' doesn't exist in table '%-.192s'"
est "Võti '%-.192s' ei eksisteeri tabelis '%-.192s'"
fre "L'index '%-.192s' n'existe pas sur la table '%-.192s'"
@@ -3937,6 +4106,7 @@ ER_KEY_DOES_NOT_EXITS 42000 S1009
hun "A '%-.192s' kulcs nem letezik a '%-.192s' tablaban"
ita "La chiave '%-.192s' non esiste nella tabella '%-.192s'"
jpn "索引 '%-.192s' ã¯è¡¨ '%-.192s' ã«ã¯å­˜åœ¨ã—ã¾ã›ã‚“。"
+ nla "Zoeksleutel '%-.192s' bestaat niet in tabel '%-.192s'"
por "Chave '%-.192s' não existe na tabela '%-.192s'"
rus "Ключ '%-.192s' не ÑущеÑтвует в таблице '%-.192s'"
serbian "KljuÄ '%-.192s' ne postoji u tabeli '%-.192s'"
@@ -3944,9 +4114,9 @@ ER_KEY_DOES_NOT_EXITS 42000 S1009
swe "Nyckel '%-.192s' finns inte in tabell '%-.192s'"
ukr "Ключ '%-.192s' не Ñ–Ñнує в таблиці '%-.192s'"
ER_CHECK_NO_SUCH_TABLE 42000
+ chi "无法打开表"
cze "Nemohu otevřít tabulku"
dan "Kan ikke åbne tabellen"
- nla "Kan tabel niet openen"
eng "Can't open table"
est "Ei suuda avada tabelit"
fre "Impossible d'ouvrir la table"
@@ -3955,6 +4125,7 @@ ER_CHECK_NO_SUCH_TABLE 42000
hun "Nem tudom megnyitni a tablat"
ita "Impossibile aprire la tabella"
jpn "表をオープンã§ãã¾ã›ã‚“。"
+ nla "Kan tabel niet openen"
por "Não pode abrir a tabela"
rus "Ðевозможно открыть таблицу"
serbian "Ne mogu da otvorim tabelu"
@@ -3962,9 +4133,9 @@ ER_CHECK_NO_SUCH_TABLE 42000
swe "Kan inte öppna tabellen"
ukr "Ðе можу відкрити таблицю"
ER_CHECK_NOT_IMPLEMENTED 42000
+ chi "该表的存储引擎ä¸æ”¯æŒ%s"
cze "Handler tabulky nepodporuje %s"
dan "Denne tabeltype understøtter ikke %s"
- nla "De 'handler' voor de tabel ondersteund geen %s"
eng "The storage engine for the table doesn't support %s"
est "Antud tabelitüüp ei toeta %s käske"
fre "Ce type de table ne supporte pas les %s"
@@ -3975,6 +4146,7 @@ ER_CHECK_NOT_IMPLEMENTED 42000
ita "Il gestore per la tabella non supporta il %s"
jpn "ã“ã®è¡¨ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã¯ '%s' を利用ã§ãã¾ã›ã‚“。"
kor "The handler for the table doesn't support %s"
+ nla "De 'handler' voor de tabel ondersteund geen %s"
nor "The handler for the table doesn't support %s"
norwegian-ny "The handler for the table doesn't support %s"
pol "The handler for the table doesn't support %s"
@@ -3987,9 +4159,9 @@ ER_CHECK_NOT_IMPLEMENTED 42000
swe "Tabellhanteraren för denna tabell kan inte göra %s"
ukr "Вказівник таблиці не підтримуе %s"
ER_CANT_DO_THIS_DURING_AN_TRANSACTION 25000
+ chi "ä¸å…许在事务中执行此命令"
cze "Provedení tohoto příkazu není v transakci dovoleno"
dan "Du må ikke bruge denne kommando i en transaktion"
- nla "Het is u niet toegestaan dit commando uit te voeren binnen een transactie"
eng "You are not allowed to execute this command in a transaction"
est "Seda käsku ei saa kasutada transaktsiooni sees"
fre "Vous n'êtes pas autorisé à exécute cette commande dans une transaction"
@@ -3997,6 +4169,7 @@ ER_CANT_DO_THIS_DURING_AN_TRANSACTION 25000
hun "Az On szamara nem engedelyezett a parancs vegrehajtasa a tranzakcioban"
ita "Non puoi eseguire questo comando in una transazione"
jpn "ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å†…ã§å®Ÿè¡Œã§ãã¾ã›ã‚“。"
+ nla "Het is u niet toegestaan dit commando uit te voeren binnen een transactie"
por "Não lhe é permitido executar este comando em uma transação"
rus "Вам не разрешено выполнÑÑ‚ÑŒ Ñту команду в транзакции"
serbian "Nije Vam dozvoljeno da izvršite ovu komandu u transakciji"
@@ -4004,9 +4177,9 @@ ER_CANT_DO_THIS_DURING_AN_TRANSACTION 25000
swe "Du får inte utföra detta kommando i en transaktion"
ukr "Вам не дозволено виконувати цю команду в транзакції"
ER_ERROR_DURING_COMMIT
+ chi "COMMITæ—¶å‘生错误 %M "
cze "Chyba %M při COMMIT"
dan "Modtog fejl %M mens kommandoen COMMIT blev udført"
- nla "Kreeg fout %M tijdens COMMIT"
eng "Got error %M during COMMIT"
est "Viga %M käsu COMMIT täitmisel"
fre "Erreur %M lors du COMMIT"
@@ -4015,6 +4188,7 @@ ER_ERROR_DURING_COMMIT
hun "%M hiba a COMMIT vegrehajtasa soran"
ita "Rilevato l'errore %M durante il COMMIT"
jpn "COMMIT中ã«ã‚¨ãƒ©ãƒ¼ %M ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
+ nla "Kreeg fout %M tijdens COMMIT"
por "Obteve erro %M durante COMMIT"
rus "Получена ошибка %M в процеÑÑе COMMIT"
serbian "Greška %M za vreme izvršavanja komande 'COMMIT'"
@@ -4022,9 +4196,9 @@ ER_ERROR_DURING_COMMIT
swe "Fick fel %M vid COMMIT"
ukr "Отримано помилку %M під Ñ‡Ð°Ñ COMMIT"
ER_ERROR_DURING_ROLLBACK
+ chi "回滚时出错%M"
cze "Chyba %M při ROLLBACK"
dan "Modtog fejl %M mens kommandoen ROLLBACK blev udført"
- nla "Kreeg fout %M tijdens ROLLBACK"
eng "Got error %M during ROLLBACK"
est "Viga %M käsu ROLLBACK täitmisel"
fre "Erreur %M lors du ROLLBACK"
@@ -4033,6 +4207,7 @@ ER_ERROR_DURING_ROLLBACK
hun "%M hiba a ROLLBACK vegrehajtasa soran"
ita "Rilevato l'errore %M durante il ROLLBACK"
jpn "ROLLBACK中ã«ã‚¨ãƒ©ãƒ¼ %M ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
+ nla "Kreeg fout %M tijdens ROLLBACK"
por "Obteve erro %M durante ROLLBACK"
rus "Получена ошибка %M в процеÑÑе ROLLBACK"
serbian "Greška %M za vreme izvršavanja komande 'ROLLBACK'"
@@ -4040,9 +4215,9 @@ ER_ERROR_DURING_ROLLBACK
swe "Fick fel %M vid ROLLBACK"
ukr "Отримано помилку %M під Ñ‡Ð°Ñ ROLLBACK"
ER_ERROR_DURING_FLUSH_LOGS
+ chi "flush_logs时出错%M"
cze "Chyba %M při FLUSH_LOGS"
dan "Modtog fejl %M mens kommandoen FLUSH_LOGS blev udført"
- nla "Kreeg fout %M tijdens FLUSH_LOGS"
eng "Got error %M during FLUSH_LOGS"
est "Viga %M käsu FLUSH_LOGS täitmisel"
fre "Erreur %M lors du FLUSH_LOGS"
@@ -4051,6 +4226,7 @@ ER_ERROR_DURING_FLUSH_LOGS
hun "%M hiba a FLUSH_LOGS vegrehajtasa soran"
ita "Rilevato l'errore %M durante il FLUSH_LOGS"
jpn "FLUSH_LOGS中ã«ã‚¨ãƒ©ãƒ¼ %M ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
+ nla "Kreeg fout %M tijdens FLUSH_LOGS"
por "Obteve erro %M durante FLUSH_LOGS"
rus "Получена ошибка %M в процеÑÑе FLUSH_LOGS"
serbian "Greška %M za vreme izvršavanja komande 'FLUSH_LOGS'"
@@ -4058,9 +4234,9 @@ ER_ERROR_DURING_FLUSH_LOGS
swe "Fick fel %M vid FLUSH_LOGS"
ukr "Отримано помилку %M під Ñ‡Ð°Ñ FLUSH_LOGS"
ER_ERROR_DURING_CHECKPOINT
+ chi "CHECKPOINT时出错%M "
cze "Chyba %M při CHECKPOINT"
dan "Modtog fejl %M mens kommandoen CHECKPOINT blev udført"
- nla "Kreeg fout %M tijdens CHECKPOINT"
eng "Got error %M during CHECKPOINT"
est "Viga %M käsu CHECKPOINT täitmisel"
fre "Erreur %M lors du CHECKPOINT"
@@ -4069,6 +4245,7 @@ ER_ERROR_DURING_CHECKPOINT
hun "%M hiba a CHECKPOINT vegrehajtasa soran"
ita "Rilevato l'errore %M durante il CHECKPOINT"
jpn "CHECKPOINT中ã«ã‚¨ãƒ©ãƒ¼ %M ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚"
+ nla "Kreeg fout %M tijdens CHECKPOINT"
por "Obteve erro %M durante CHECKPOINT"
rus "Получена ошибка %M в процеÑÑе CHECKPOINT"
serbian "Greška %M za vreme izvršavanja komande 'CHECKPOINT'"
@@ -4076,15 +4253,16 @@ ER_ERROR_DURING_CHECKPOINT
swe "Fick fel %M vid CHECKPOINT"
ukr "Отримано помилку %M під Ñ‡Ð°Ñ CHECKPOINT"
ER_NEW_ABORTING_CONNECTION 08S01
+ chi "终止的连接 %lld 到数æ®åº“: '%-.192s' 用户: '%-.48s' 主机: '%-.64s' (%-.64s)"
cze "Spojení %lld do databáze: '%-.192s' uživatel: '%-.48s' stroj: '%-.64s' (%-.64s) bylo přerušeno"
dan "Afbrød forbindelsen %lld til databasen '%-.192s' bruger: '%-.48s' vært: '%-.64s' (%-.64s)"
- nla "Afgebroken verbinding %lld naar db: '%-.192s' gebruiker: '%-.48s' host: '%-.64s' (%-.64s)"
eng "Aborted connection %lld to db: '%-.192s' user: '%-.48s' host: '%-.64s' (%-.64s)"
est "Ãœhendus katkestatud %lld andmebaas: '%-.192s' kasutaja: '%-.48s' masin: '%-.64s' (%-.64s)"
fre "Connection %lld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' hôte: '%-.64s' (%-.64s)"
ger "Abbruch der Verbindung %lld zur Datenbank '%-.192s'. Benutzer: '%-.48s', Host: '%-.64s' (%-.64s)"
ita "Interrotta la connessione %lld al db: ''%-.192s' utente: '%-.48s' host: '%-.64s' (%-.64s)"
jpn "接続 %lld ãŒä¸­æ–­ã•ã‚Œã¾ã—ãŸã€‚データベース: '%-.192s' ユーザー: '%-.48s' ホスト: '%-.64s' (%-.64s)"
+ nla "Afgebroken verbinding %lld naar db: '%-.192s' gebruiker: '%-.48s' host: '%-.64s' (%-.64s)"
por "Conexão %lld abortada para banco de dados '%-.192s' - usuário '%-.48s' - 'host' '%-.64s' ('%-.64s')"
rus "Прервано Ñоединение %lld к базе данных '%-.192s' Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ '%-.48s' Ñ Ñ…Ð¾Ñта '%-.64s' (%-.64s)"
serbian "Prekinuta konekcija broj %lld ka bazi: '%-.192s' korisnik je bio: '%-.48s' a host: '%-.64s' (%-.64s)"
@@ -4092,8 +4270,10 @@ ER_NEW_ABORTING_CONNECTION 08S01
swe "Avbröt länken för tråd %lld till db '%-.192s', användare '%-.48s', host '%-.64s' (%-.64s)"
ukr "Перервано з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %lld до бази данних: '%-.192s' кориÑтувач: '%-.48s' хоÑÑ‚: '%-.64s' (%-.64s)"
ER_UNUSED_10
+ chi "你应当永远看ä¸åˆ°è¿™ä¸ª"
eng "You should never see it"
ER_FLUSH_MASTER_BINLOG_CLOSED
+ chi "Binlog 已关闭, ä¸èƒ½ RESET MASTER"
eng "Binlog closed, cannot RESET MASTER"
ger "Binlog geschlossen. Kann RESET MASTER nicht ausführen"
jpn "ãƒã‚¤ãƒŠãƒªãƒ­ã‚°ãŒã‚¯ãƒ­ãƒ¼ã‚ºã•ã‚Œã¦ã„ã¾ã™ã€‚RESET MASTER を実行ã§ãã¾ã›ã‚“。"
@@ -4102,9 +4282,9 @@ ER_FLUSH_MASTER_BINLOG_CLOSED
serbian "Binarni log file zatvoren, ne mogu da izvršim komandu 'RESET MASTER'"
ukr "Реплікаційний лог закрито, не можу виконати RESET MASTER"
ER_INDEX_REBUILD
+ chi "é‡å»º dumped table '%-.192s' 的索引失败"
cze "Přebudování indexu dumpnuté tabulky '%-.192s' nebylo úspěšné"
dan "Kunne ikke genopbygge indekset for den dumpede tabel '%-.192s'"
- nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.192s'"
eng "Failed rebuilding the index of dumped table '%-.192s'"
fre "La reconstruction de l'index de la table copiée '%-.192s' a échoué"
ger "Neuerstellung des Index der Dump-Tabelle '%-.192s' fehlgeschlagen"
@@ -4112,20 +4292,22 @@ ER_INDEX_REBUILD
hun "Failed rebuilding the index of dumped table '%-.192s'"
ita "Fallita la ricostruzione dell'indice della tabella copiata '%-.192s'"
jpn "ダンプ表 '%-.192s' ã®ç´¢å¼•å†æ§‹ç¯‰ã«å¤±æ•—ã—ã¾ã—ãŸã€‚"
+ nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.192s'"
por "Falhou na reconstrução do índice da tabela 'dumped' '%-.192s'"
rus "Ошибка переÑтройки индекÑа Ñохраненной таблицы '%-.192s'"
serbian "Izgradnja indeksa dump-ovane tabele '%-.192s' nije uspela"
spa "Falla reconstruyendo el indice de la tabla dumped '%-.192s'"
ukr "Ðевдале Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑа переданої таблиці '%-.192s'"
ER_MASTER
+ chi "Master错误:'%-.64s'"
cze "Chyba masteru: '%-.64s'"
dan "Fejl fra master: '%-.64s'"
- nla "Fout van master: '%-.64s'"
eng "Error from master: '%-.64s'"
fre "Erreur reçue du maître: '%-.64s'"
ger "Fehler vom Master: '%-.64s'"
ita "Errore dal master: '%-.64s"
jpn "マスターã§ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿ: '%-.64s'"
+ nla "Fout van master: '%-.64s'"
por "Erro no 'master' '%-.64s'"
rus "Ошибка от головного Ñервера: '%-.64s'"
serbian "Greška iz glavnog servera '%-.64s' u klasteru"
@@ -4133,14 +4315,15 @@ ER_MASTER
swe "Fel från master: '%-.64s'"
ukr "Помилка від головного: '%-.64s'"
ER_MASTER_NET_READ 08S01
+ chi "读master时有网络错误"
cze "Síťová chyba pÅ™i Ätení z masteru"
dan "Netværksfejl ved læsning fra master"
- nla "Net fout tijdens lezen van master"
eng "Net error reading from master"
fre "Erreur de lecture réseau reçue du maître"
ger "Netzfehler beim Lesen vom Master"
ita "Errore di rete durante la ricezione dal master"
jpn "マスターã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿å—信中ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ©ãƒ¼"
+ nla "Net fout tijdens lezen van master"
por "Erro de rede lendo do 'master'"
rus "Возникла ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð² процеÑÑе коммуникации Ñ Ð³Ð¾Ð»Ð¾Ð²Ð½Ñ‹Ð¼ Ñервером"
serbian "Greška u primanju mrežnih paketa sa glavnog servera u klasteru"
@@ -4148,14 +4331,15 @@ ER_MASTER_NET_READ 08S01
swe "Fick nätverksfel vid läsning från master"
ukr "Мережева помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð²Ñ–Ð´ головного"
ER_MASTER_NET_WRITE 08S01
+ chi "写master时有网络错误"
cze "Síťová chyba při zápisu na master"
dan "Netværksfejl ved skrivning til master"
- nla "Net fout tijdens schrijven naar master"
eng "Net error writing to master"
fre "Erreur d'écriture réseau reçue du maître"
ger "Netzfehler beim Schreiben zum Master"
ita "Errore di rete durante l'invio al master"
jpn "マスターã¸ã®ãƒ‡ãƒ¼ã‚¿é€ä¿¡ä¸­ã®ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¨ãƒ©ãƒ¼"
+ nla "Net fout tijdens schrijven naar master"
por "Erro de rede gravando no 'master'"
rus "Возникла ошибка запиÑи в процеÑÑе коммуникации Ñ Ð³Ð¾Ð»Ð¾Ð²Ð½Ñ‹Ð¼ Ñервером"
serbian "Greška u slanju mrežnih paketa na glavni server u klasteru"
@@ -4163,15 +4347,16 @@ ER_MASTER_NET_WRITE 08S01
swe "Fick nätverksfel vid skrivning till master"
ukr "Мережева помилка запиÑу до головного"
ER_FT_MATCHING_KEY_NOT_FOUND
+ chi "找ä¸åˆ°ä¸Žåˆ—列表匹é…的全文索引"
cze "Žádný sloupec nemá vytvořen fulltextový index"
dan "Kan ikke finde en FULLTEXT nøgle som svarer til kolonne listen"
- nla "Kan geen FULLTEXT index vinden passend bij de kolom lijst"
eng "Can't find FULLTEXT index matching the column list"
est "Ei suutnud leida FULLTEXT indeksit, mis kattuks kasutatud tulpadega"
fre "Impossible de trouver un index FULLTEXT correspondant à cette liste de colonnes"
ger "Kann keinen FULLTEXT-Index finden, der der Feldliste entspricht"
ita "Impossibile trovare un indice FULLTEXT che corrisponda all'elenco delle colonne"
jpn "列リストã«å¯¾å¿œã™ã‚‹å…¨æ–‡ç´¢å¼•(FULLTEXT)ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
+ nla "Kan geen FULLTEXT index vinden passend bij de kolom lijst"
por "Não pode encontrar um índice para o texto todo que combine com a lista de colunas"
rus "Ðевозможно отыÑкать полнотекÑтовый (FULLTEXT) индекÑ, ÑоответÑтвующий ÑпиÑку Ñтолбцов"
serbian "Ne mogu da pronađem 'FULLTEXT' indeks koli odgovara listi kolona"
@@ -4179,15 +4364,16 @@ ER_FT_MATCHING_KEY_NOT_FOUND
swe "Hittar inte ett FULLTEXT-index i kolumnlistan"
ukr "Ðе можу знайти FULLTEXT індекÑ, що відповідає переліку Ñтовбців"
ER_LOCK_OR_ACTIVE_TRANSACTION
+ chi "无法执行给定的命令,因为表上有é”或有活动事务"
cze "Nemohu provést zadaný příkaz, protože existují aktivní zamÄené tabulky nebo aktivní transakce"
dan "Kan ikke udføre den givne kommando fordi der findes aktive, låste tabeller eller fordi der udføres en transaktion"
- nla "Kan het gegeven commando niet uitvoeren, want u heeft actieve gelockte tabellen of een actieve transactie"
eng "Can't execute the given command because you have active locked tables or an active transaction"
est "Ei suuda täita antud käsku kuna on aktiivseid lukke või käimasolev transaktsioon"
fre "Impossible d'exécuter la commande car vous avez des tables verrouillées ou une transaction active"
ger "Kann den angegebenen Befehl wegen einer aktiven Tabellensperre oder einer aktiven Transaktion nicht ausführen"
ita "Impossibile eseguire il comando richiesto: tabelle sotto lock o transazione in atto"
jpn "ã™ã§ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªè¡¨ãƒ­ãƒƒã‚¯ã‚„トランザクションãŒã‚ã‚‹ãŸã‚ã€ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã§ãã¾ã›ã‚“。"
+ nla "Kan het gegeven commando niet uitvoeren, want u heeft actieve gelockte tabellen of een actieve transactie"
por "Não pode executar o comando dado porque você tem tabelas ativas travadas ou uma transação ativa"
rus "Ðевозможно выполнить указанную команду, поÑкольку у Ð²Ð°Ñ Ð¿Ñ€Ð¸ÑутÑтвуют активно заблокированные таблица или Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð°Ñ Ñ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ð¸Ñ"
serbian "Ne mogu da izvrÅ¡im datu komandu zbog toga Å¡to su tabele zakljuÄane ili je transakcija u toku"
@@ -4195,9 +4381,9 @@ ER_LOCK_OR_ACTIVE_TRANSACTION
swe "Kan inte utföra kommandot emedan du har en låst tabell eller an aktiv transaktion"
ukr "Ðе можу виконати подану команду тому, що Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ Ð·Ð°Ð±Ð»Ð¾ÐºÐ¾Ð²Ð°Ð½Ð° або виконуєтьÑÑ Ñ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ñ–Ñ"
ER_UNKNOWN_SYSTEM_VARIABLE
+ chi "未知系统å˜é‡ '%-.*s'"
cze "Neznámá systémová proměnná '%-.*s'"
dan "Ukendt systemvariabel '%-.*s'"
- nla "Onbekende systeem variabele '%-.*s'"
eng "Unknown system variable '%-.*s'"
est "Tundmatu süsteemne muutuja '%-.*s'"
fre "Variable système '%-.*s' inconnue"
@@ -4205,6 +4391,7 @@ ER_UNKNOWN_SYSTEM_VARIABLE
hindi "अजà¥à¤žà¤¾à¤¤ सिसà¥à¤Ÿà¤® वैरिà¤à¤¬à¤² '%-.*s'"
ita "Variabile di sistema '%-.*s' sconosciuta"
jpn "'%-.*s' ã¯ä¸æ˜Žãªã‚·ã‚¹ãƒ†ãƒ å¤‰æ•°ã§ã™ã€‚"
+ nla "Onbekende systeem variabele '%-.*s'"
por "Variável de sistema '%-.*s' desconhecida"
rus "ÐеизвеÑÑ‚Ð½Ð°Ñ ÑиÑÑ‚ÐµÐ¼Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.*s'"
serbian "Nepoznata sistemska promenljiva '%-.*s'"
@@ -4212,15 +4399,16 @@ ER_UNKNOWN_SYSTEM_VARIABLE
swe "Okänd systemvariabel: '%-.*s'"
ukr "Ðевідома ÑиÑтемна змінна '%-.*s'"
ER_CRASHED_ON_USAGE
+ chi "表'%-.192s'标记为崩溃,应该修å¤"
cze "Tabulka '%-.192s' je oznaÄena jako poruÅ¡ená a mÄ›la by být opravena"
dan "Tabellen '%-.192s' er markeret med fejl og bør repareres"
- nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en dient te worden gerepareerd"
eng "Table '%-.192s' is marked as crashed and should be repaired"
est "Tabel '%-.192s' on märgitud vigaseks ja tuleb parandada"
fre "La table '%-.192s' est marquée 'crashed' et devrait être réparée"
ger "Tabelle '%-.192s' ist als defekt markiert und sollte repariert werden"
ita "La tabella '%-.192s' e` segnalata come corrotta e deve essere riparata"
jpn "表 '%-.192s' ã¯å£Šã‚Œã¦ã„ã¾ã™ã€‚修復ãŒå¿…è¦ã§ã™ã€‚"
+ nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en dient te worden gerepareerd"
por "Tabela '%-.192s' está marcada como danificada e deve ser reparada"
rus "Таблица '%-.192s' помечена как иÑÐ¿Ð¾Ñ€Ñ‡ÐµÐ½Ð½Ð°Ñ Ð¸ должна пройти проверку и ремонт"
serbian "Tabela '%-.192s' je markirana kao oštećena i trebala bi biti popravljena"
@@ -4228,15 +4416,16 @@ ER_CRASHED_ON_USAGE
swe "Tabell '%-.192s' är trasig och bör repareras med REPAIR TABLE"
ukr "Таблицю '%-.192s' марковано Ñк зіпÑовану та Ñ—Ñ— потрібно відновити"
ER_CRASHED_ON_REPAIR
+ chi "表 '%-.192s' 被标记为崩溃,上一次的修å¤ï¼ˆè‡ªåŠ¨ï¼Ÿï¼‰å¤±è´¥"
cze "Tabulka '%-.192s' je oznaÄena jako poruÅ¡ená a poslední (automatická?) oprava se nezdaÅ™ila"
dan "Tabellen '%-.192s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede"
- nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte"
eng "Table '%-.192s' is marked as crashed and last (automatic?) repair failed"
est "Tabel '%-.192s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus"
fre "La table '%-.192s' est marquée 'crashed' et le dernier 'repair' a échoué"
ger "Tabelle '%-.192s' ist als defekt markiert und der letzte (automatische?) Reparaturversuch schlug fehl"
ita "La tabella '%-.192s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita"
jpn "表 '%-.192s' ã¯å£Šã‚Œã¦ã„ã¾ã™ã€‚修復(自動?)ã«ã‚‚失敗ã—ã¦ã„ã¾ã™ã€‚"
+ nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte"
por "Tabela '%-.192s' está marcada como danificada e a última reparação (automática?) falhou"
rus "Таблица '%-.192s' помечена как иÑÐ¿Ð¾Ñ€Ñ‡ÐµÐ½Ð½Ð°Ñ Ð¸ поÑледний (автоматичеÑкий?) ремонт не был уÑпешным"
serbian "Tabela '%-.192s' je markirana kao oštećena, a zadnja (automatska?) popravka je bila neuspela"
@@ -4244,14 +4433,15 @@ ER_CRASHED_ON_REPAIR
swe "Tabell '%-.192s' är trasig och senast (automatiska?) reparation misslyckades"
ukr "Таблицю '%-.192s' марковано Ñк зіпÑовану та оÑтаннє (автоматичне?) Ð²Ñ–Ð´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð½Ðµ вдалоÑÑ"
ER_WARNING_NOT_COMPLETE_ROLLBACK
+ chi "æŸäº›éžäº‹åŠ¡æ€§æ›´æ”¹çš„表无法回滚"
dan "Advarsel: Visse data i tabeller der ikke understøtter transaktioner kunne ikke tilbagestilles"
- nla "Waarschuwing: Roll back mislukt voor sommige buiten transacties gewijzigde tabellen"
eng "Some non-transactional changed tables couldn't be rolled back"
est "Hoiatus: mõnesid transaktsioone mittetoetavaid tabeleid ei suudetud tagasi kerida"
fre "Attention: certaines tables ne supportant pas les transactions ont été changées et elles ne pourront pas être restituées"
ger "Änderungen an einigen nicht transaktionalen Tabellen konnten nicht zurückgerollt werden"
ita "Attenzione: Alcune delle modifiche alle tabelle non transazionali non possono essere ripristinate (roll back impossibile)"
jpn "トランザクション対応ã§ã¯ãªã„表ã¸ã®å¤‰æ›´ã¯ãƒ­ãƒ¼ãƒ«ãƒãƒƒã‚¯ã•ã‚Œã¾ã›ã‚“。"
+ nla "Waarschuwing: Roll back mislukt voor sommige buiten transacties gewijzigde tabellen"
por "Aviso: Algumas tabelas não-transacionais alteradas não puderam ser reconstituídas (rolled back)"
rus "Внимание: по некоторым измененным нетранзакционным таблицам невозможно будет произвеÑти откат транзакции"
serbian "Upozorenje: Neke izmenjene tabele ne podržavaju komandu 'ROLLBACK'"
@@ -4259,26 +4449,28 @@ ER_WARNING_NOT_COMPLETE_ROLLBACK
swe "Warning: Några icke transaktionella tabeller kunde inte återställas vid ROLLBACK"
ukr "ЗаÑтереженнÑ: ДеÑкі нетранзакційні зміни таблиць не можна буде повернути"
ER_TRANS_CACHE_FULL
+ chi "多语å¥äº‹åŠ¡éœ€è¦è¶…过 'max_binlog_cache_size' 字节的存储空间;增加这个 mysqld å˜é‡åŽå†è¯•ä¸€æ¬¡"
dan "Fler-udtryks transaktion krævede mere plads en 'max_binlog_cache_size' bytes. Forhøj værdien af denne variabel og prøv igen"
- nla "Multi-statement transactie vereist meer dan 'max_binlog_cache_size' bytes opslag. Verhoog deze mysqld variabele en probeer opnieuw"
eng "Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again"
est "Mitme lausendiga transaktsioon nõudis rohkem ruumi kui lubatud 'max_binlog_cache_size' muutujaga. Suurenda muutuja väärtust ja proovi uuesti"
fre "Cette transaction à commandes multiples nécessite plus de 'max_binlog_cache_size' octets de stockage, augmentez cette variable de mysqld et réessayez"
ger "Transaktionen, die aus mehreren Befehlen bestehen, benötigten mehr als 'max_binlog_cache_size' Bytes an Speicher. Btte vergrössern Sie diese Server-Variable versuchen Sie es noch einmal"
ita "La transazione a comandi multipli (multi-statement) ha richiesto piu` di 'max_binlog_cache_size' bytes di disco: aumentare questa variabile di mysqld e riprovare"
jpn "複数ステートメントã‹ã‚‰æˆã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒ 'max_binlog_cache_size' 以上ã®å®¹é‡ã‚’å¿…è¦ã¨ã—ã¾ã—ãŸã€‚ã“ã®ã‚·ã‚¹ãƒ†ãƒ å¤‰æ•°ã‚’増加ã—ã¦ã€å†è©¦è¡Œã—ã¦ãã ã•ã„。"
+ nla "Multi-statement transactie vereist meer dan 'max_binlog_cache_size' bytes opslag. Verhoog deze mysqld variabele en probeer opnieuw"
por "Transações multi-declaradas (multi-statement transactions) requeriram mais do que o valor limite (max_binlog_cache_size) de bytes para armazenagem. Aumente o valor desta variável do mysqld e tente novamente"
rus "Транзакции, включающей большое количеÑтво команд, потребовалоÑÑŒ более чем 'max_binlog_cache_size' байт. Увеличьте Ñту переменную Ñервера mysqld и попробуйте еще раз"
spa "Multipla transición necesita mas que 'max_binlog_cache_size' bytes de almacenamiento. Aumente esta variable mysqld y tente de nuevo"
swe "Transaktionen krävde mera än 'max_binlog_cache_size' minne. Öka denna mysqld-variabel och försök på nytt"
ukr "Ð¢Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ñ–Ñ Ð· багатьма виразами вимагає більше ніж 'max_binlog_cache_size' байтів Ð´Ð»Ñ Ð·Ð±ÐµÑ€Ñ–Ð³Ð°Ð½Ð½Ñ. Збільште цю змінну mysqld та Ñпробуйте знову"
ER_SLAVE_MUST_STOP
+ chi "这个æ“作ä¸èƒ½æ‰§è¡Œï¼Œå› ä¸ºä½ æœ‰ä¸ªæ­£åœ¨è¿è¡Œçš„ slave '%2$*1$s'; å…ˆè¿è¡Œ STOP SLAVE '%2$*1$s' åŽå†è¯•"
dan "Denne handling kunne ikke udføres med kørende slave '%2$*1$s', brug først kommandoen STOP SLAVE '%2$*1$s'"
- nla "Deze operatie kan niet worden uitgevoerd met een actieve slave '%2$*1$s', doe eerst STOP SLAVE '%2$*1$s'"
eng "This operation cannot be performed as you have a running slave '%2$*1$s'; run STOP SLAVE '%2$*1$s' first"
fre "Cette opération ne peut être réalisée avec un esclave '%2$*1$s' actif, faites STOP SLAVE '%2$*1$s' d'abord"
ger "Diese Operation kann bei einem aktiven Slave '%2$*1$s' nicht durchgeführt werden. Bitte zuerst STOP SLAVE '%2$*1$s' ausführen"
ita "Questa operazione non puo' essere eseguita con un database 'slave' '%2$*1$s' che gira, lanciare prima STOP SLAVE '%2$*1$s'"
+ nla "Deze operatie kan niet worden uitgevoerd met een actieve slave '%2$*1$s', doe eerst STOP SLAVE '%2$*1$s'"
por "Esta operação não pode ser realizada com um 'slave' '%2$*1$s' em execução. Execute STOP SLAVE '%2$*1$s' primeiro"
rus "Эту операцию невозможно выполнить при работающем потоке подчиненного Ñервера %2$*1$s. Сначала выполните STOP SLAVE '%2$*1$s'"
serbian "Ova operacija ne može biti izvršena dok je aktivan podređeni '%2$*1$s' server. Zadajte prvo komandu 'STOP SLAVE '%2$*1$s'' da zaustavite podređeni server"
@@ -4286,13 +4478,14 @@ ER_SLAVE_MUST_STOP
swe "Denna operation kan inte göras under replikering; Du har en aktiv förbindelse till '%2$*1$s'. Gör STOP SLAVE '%2$*1$s' först"
ukr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ може бути виконана з запущеним підлеглим '%2$*1$s', Ñпочатку виконайте STOP SLAVE '%2$*1$s'"
ER_SLAVE_NOT_RUNNING
+ chi "这个æ“作需è¦ä¸€ä¸ªæ­£åœ¨è¿è¡Œçš„slaveï¼›é…置从机并执行 START SLAVE"
dan "Denne handling kræver en kørende slave. Konfigurer en slave og brug kommandoen START SLAVE"
- nla "Deze operatie vereist een actieve slave, configureer slave en doe dan START SLAVE"
eng "This operation requires a running slave; configure slave and do START SLAVE"
fre "Cette opération nécessite un esclave actif, configurez les esclaves et faites START SLAVE"
ger "Diese Operation benötigt einen aktiven Slave. Bitte Slave konfigurieren und mittels START SLAVE aktivieren"
ita "Questa operaione richiede un database 'slave', configurarlo ed eseguire START SLAVE"
jpn "ã“ã®å‡¦ç†ã¯ã€ç¨¼åƒä¸­ã®ã‚¹ãƒ¬ãƒ¼ãƒ–ã§ãªã‘ã‚Œã°å®Ÿè¡Œã§ãã¾ã›ã‚“。スレーブã®è¨­å®šã‚’ã—ã¦START SLAVEコマンドを実行ã—ã¦ãã ã•ã„。"
+ nla "Deze operatie vereist een actieve slave, configureer slave en doe dan START SLAVE"
por "Esta operação requer um 'slave' em execução. Configure o 'slave' e execute START SLAVE"
rus "Ð”Ð»Ñ Ñтой операции требуетÑÑ Ñ€Ð°Ð±Ð¾Ñ‚Ð°ÑŽÑ‰Ð¸Ð¹ подчиненный Ñервер. Сначала выполните START SLAVE"
serbian "Ova operacija zahteva da je aktivan podređeni server. Konfigurišite prvo podređeni server i onda izvršite komandu 'START SLAVE'"
@@ -4300,13 +4493,14 @@ ER_SLAVE_NOT_RUNNING
swe "Denna operation kan endast göras under replikering; Konfigurera slaven och gör START SLAVE"
ukr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð²Ð¸Ð¼Ð°Ð³Ð°Ñ” запущеного підлеглого, зконфігуруйте підлеглого та виконайте START SLAVE"
ER_BAD_SLAVE
+ chi "æœåŠ¡å™¨æœªé…置为从站;ä¿®å¤é…置文件或使用CHANGE MASTER TO"
dan "Denne server er ikke konfigureret som slave. Ret in config-filen eller brug kommandoen CHANGE MASTER TO"
- nla "De server is niet geconfigureerd als slave, fix in configuratie bestand of met CHANGE MASTER TO"
eng "The server is not configured as slave; fix in config file or with CHANGE MASTER TO"
fre "Le server n'est pas configuré comme un esclave, changez le fichier de configuration ou utilisez CHANGE MASTER TO"
ger "Der Server ist nicht als Slave konfiguriert. Bitte in der Konfigurationsdatei oder mittels CHANGE MASTER TO beheben"
ita "Il server non e' configurato come 'slave', correggere il file di configurazione cambiando CHANGE MASTER TO"
jpn "ã“ã®ã‚µãƒ¼ãƒãƒ¼ã¯ã‚¹ãƒ¬ãƒ¼ãƒ–ã¨ã—ã¦è¨­å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。コンフィグファイルã‹CHANGE MASTER TOコマンドã§è¨­å®šã—ã¦ä¸‹ã•ã„。"
+ nla "De server is niet geconfigureerd als slave, fix in configuratie bestand of met CHANGE MASTER TO"
por "O servidor não está configurado como 'slave'. Acerte o arquivo de configuração ou use CHANGE MASTER TO"
rus "Этот Ñервер не наÑтроен как подчиненный. ВнеÑите иÑÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð² конфигурационном файле или Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ CHANGE MASTER TO"
serbian "Server nije konfigurisan kao podređeni server, ispravite konfiguracioni file ili na njemu izvršite komandu 'CHANGE MASTER TO'"
@@ -4314,6 +4508,7 @@ ER_BAD_SLAVE
swe "Servern är inte konfigurerade som en replikationsslav. Ändra konfigurationsfilen eller gör CHANGE MASTER TO"
ukr "Сервер не зконфігуровано Ñк підлеглий, виправте це у файлі конфігурації або з CHANGE MASTER TO"
ER_MASTER_INFO
+ chi "无法åˆå§‹åŒ–'%.*s'çš„master info structure;MariaDB错误日志中å¯ä»¥æ‰¾åˆ°æ›´å¤šé”™è¯¯æ¶ˆæ¯"
eng "Could not initialize master info structure for '%.*s'; more error messages can be found in the MariaDB error log"
fre "Impossible d'initialiser les structures d'information de maître '%.*s', vous trouverez des messages d'erreur supplémentaires dans le journal des erreurs de MariaDB"
ger "Konnte Master-Info-Struktur '%.*s' nicht initialisieren. Weitere Fehlermeldungen können im MariaDB-Error-Log eingesehen werden"
@@ -4322,13 +4517,14 @@ ER_MASTER_INFO
swe "Kunde inte initialisera replikationsstrukturerna för '%.*s'. See MariaDB fel fil för mera information"
ukr "Інформаційна Ñтруктура з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð³Ð¾Ð»Ð¾Ð²Ð½Ð¾Ð³Ð¾ Ñ– підлеглого (master.info) Ð´Ð»Ñ '%.*s' не може бути ініціалізована"
ER_SLAVE_THREAD
+ chi "无法创建slave线程;检查系统资æº"
dan "Kunne ikke danne en slave-tråd; check systemressourcerne"
- nla "Kon slave thread niet aanmaken, controleer systeem resources"
eng "Could not create slave thread; check system resources"
fre "Impossible de créer une tâche esclave, vérifiez les ressources système"
ger "Konnte Slave-Thread nicht starten. Bitte System-Ressourcen überprüfen"
ita "Impossibile creare il thread 'slave', controllare le risorse di sistema"
jpn "スレーブスレッドを作æˆã§ãã¾ã›ã‚“。システムリソースを確èªã—ã¦ãã ã•ã„。"
+ nla "Kon slave thread niet aanmaken, controleer systeem resources"
por "Não conseguiu criar 'thread' de 'slave'. Verifique os recursos do sistema"
rus "Ðевозможно Ñоздать поток подчиненного Ñервера. Проверьте ÑиÑтемные реÑурÑÑ‹"
serbian "Nisam mogao da startujem thread za podređeni server, proverite sistemske resurse"
@@ -4336,8 +4532,8 @@ ER_SLAVE_THREAD
swe "Kunde inte starta en tråd för replikering"
ukr "Ðе можу Ñтворити підлеглу гілку, перевірте ÑиÑтемні реÑурÑи"
ER_TOO_MANY_USER_CONNECTIONS 42000
+ chi "用户%-.64så·²ç»æ‹¥æœ‰è¶…过“max_user_conectionsâ€çš„活连接"
dan "Brugeren %-.64s har allerede mere end 'max_user_connections' aktive forbindelser"
- nla "Gebruiker %-.64s heeft reeds meer dan 'max_user_connections' actieve verbindingen"
eng "User %-.64s already has more than 'max_user_connections' active connections"
est "Kasutajal %-.64s on juba rohkem ühendusi kui lubatud 'max_user_connections' muutujaga"
fre "L'utilisateur %-.64s possède déjà plus de 'max_user_connections' connexions actives"
@@ -4345,6 +4541,7 @@ ER_TOO_MANY_USER_CONNECTIONS 42000
hindi "यूज़र %-.64s के पहले से ही 'max_user_connections' से अधिक सकà¥à¤°à¤¿à¤¯ कनेकà¥à¤¶à¤¨à¥à¤¸ हैं"
ita "L'utente %-.64s ha gia' piu' di 'max_user_connections' connessioni attive"
jpn "ユーザー '%-.64s' ã¯ã™ã§ã« 'max_user_connections' 以上ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªæŽ¥ç¶šã‚’è¡Œã£ã¦ã„ã¾ã™ã€‚"
+ nla "Gebruiker %-.64s heeft reeds meer dan 'max_user_connections' actieve verbindingen"
por "Usuário '%-.64s' já possui mais que o valor máximo de conexões (max_user_connections) ativas"
rus "У Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ %-.64s уже больше чем 'max_user_connections' активных Ñоединений"
serbian "Korisnik %-.64s već ima više aktivnih konekcija nego što je to određeno 'max_user_connections' promenljivom"
@@ -4352,8 +4549,8 @@ ER_TOO_MANY_USER_CONNECTIONS 42000
swe "Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar"
ukr "КориÑтувач %-.64s вже має більше ніж 'max_user_connections' активних з'єднань"
ER_SET_CONSTANTS_ONLY
+ chi "您åªèƒ½åœ¨æ­¤è¯­å¥ä¸­ä½¿ç”¨å¸¸é‡è¡¨è¾¾å¼"
dan "Du må kun bruge konstantudtryk med SET"
- nla "U mag alleen constante expressies gebruiken bij SET"
eng "You may only use constant expressions in this statement"
est "Ainult konstantsed suurused on lubatud SET klauslis"
fre "Seules les expressions constantes sont autorisées avec SET"
@@ -4361,6 +4558,7 @@ ER_SET_CONSTANTS_ONLY
hindi "इस सà¥à¤Ÿà¥‡à¤Ÿà¤®à¥‡à¤‚ट में आप केवल CONSTANT EXPRESSIONS का उपयोग कर सकते हैं"
ita "Si possono usare solo espressioni costanti con SET"
jpn "SET処ç†ãŒå¤±æ•—ã—ã¾ã—ãŸã€‚"
+ nla "U mag alleen constante expressies gebruiken bij SET"
por "Você pode usar apenas expressões constantes com SET"
rus "С Ñтой командой вы можете иÑпользовать только конÑтантные выражениÑ"
serbian "Možete upotrebiti samo konstantan iskaz sa komandom 'SET'"
@@ -4368,14 +4566,15 @@ ER_SET_CONSTANTS_ONLY
swe "Man kan endast använda konstantuttryck med SET"
ukr "Можна викориÑтовувати лише вирази зі Ñталими у SET"
ER_LOCK_WAIT_TIMEOUT
+ chi "é”等待超时;å°è¯•é‡æ–°å¯åŠ¨äº‹åŠ¡"
dan "Lock wait timeout overskredet"
- nla "Lock wacht tijd overschreden"
eng "Lock wait timeout exceeded; try restarting transaction"
est "Kontrollaeg ületatud luku järel ootamisel; Proovi transaktsiooni otsast alata"
fre "Timeout sur l'obtention du verrou"
ger "Beim Warten auf eine Sperre wurde die zulässige Wartezeit überschritten. Bitte versuchen Sie, die Transaktion neu zu starten"
ita "E' scaduto il timeout per l'attesa del lock"
jpn "ロック待ã¡ãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã—ã¾ã—ãŸã€‚トランザクションをå†è©¦è¡Œã—ã¦ãã ã•ã„。"
+ nla "Lock wacht tijd overschreden"
por "Tempo de espera (timeout) de travamento excedido. Tente reiniciar a transação"
rus "Таймаут Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ¸ иÑтек; попробуйте перезапуÑтить транзакцию"
serbian "Vremenski limit za zakljuÄavanje tabele je istekao; Probajte da ponovo startujete transakciju"
@@ -4383,8 +4582,8 @@ ER_LOCK_WAIT_TIMEOUT
swe "Fick inte ett lås i tid ; Försök att starta om transaktionen"
ukr "Затримку Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¸Ñ‡ÐµÑ€Ð¿Ð°Ð½Ð¾"
ER_LOCK_TABLE_FULL
+ chi "é”的总数超过é”定表大å°"
dan "Det totale antal låse overstiger størrelsen på låse-tabellen"
- nla "Het totale aantal locks overschrijdt de lock tabel grootte"
eng "The total number of locks exceeds the lock table size"
est "Lukkude koguarv ületab lukutabeli suuruse"
fre "Le nombre total de verrou dépasse la taille de la table des verrous"
@@ -4392,6 +4591,7 @@ ER_LOCK_TABLE_FULL
hindi "लॉकà¥à¤¸ की कà¥à¤² संखà¥à¤¯à¤¾ लॉक टेबल के साइज से अधिक है"
ita "Il numero totale di lock e' maggiore della grandezza della tabella di lock"
jpn "ロックã®æ•°ãŒå¤šã™ãŽã¾ã™ã€‚"
+ nla "Het totale aantal locks overschrijdt de lock tabel grootte"
por "O número total de travamentos excede o tamanho da tabela de travamentos"
rus "Общее количеÑтво блокировок превыÑило размеры таблицы блокировок"
serbian "Broj totalnih zakljuÄavanja tabele premaÅ¡uje veliÄinu tabele zakljuÄavanja"
@@ -4399,14 +4599,15 @@ ER_LOCK_TABLE_FULL
swe "Antal lås överskrider antalet reserverade lås"
ukr "Загальна кількіÑÑ‚ÑŒ блокувань перевищила розмір блокувань Ð´Ð»Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ–"
ER_READ_ONLY_TRANSACTION 25000
+ chi "在READ UNCOMMITTED事务期间无法获å–æ›´æ–°é”定"
dan "Update lås kan ikke opnås under en READ UNCOMMITTED transaktion"
- nla "Update locks kunnen niet worden verkregen tijdens een READ UNCOMMITTED transactie"
eng "Update locks cannot be acquired during a READ UNCOMMITTED transaction"
est "Uuenduslukke ei saa kasutada READ UNCOMMITTED transaktsiooni käigus"
fre "Un verrou en update ne peut être acquit pendant une transaction READ UNCOMMITTED"
ger "Während einer READ-UNCOMMITTED-Transaktion können keine UPDATE-Sperren angefordert werden"
ita "I lock di aggiornamento non possono essere acquisiti durante una transazione 'READ UNCOMMITTED'"
jpn "読ã¿è¾¼ã¿å°‚用トランザクションã§ã™ã€‚"
+ nla "Update locks kunnen niet worden verkregen tijdens een READ UNCOMMITTED transactie"
por "Travamentos de atualização não podem ser obtidos durante uma transação de tipo READ UNCOMMITTED"
rus "Блокировки обновлений Ð½ÐµÐ»ÑŒÐ·Ñ Ð¿Ð¾Ð»ÑƒÑ‡Ð¸Ñ‚ÑŒ в процеÑÑе Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð½Ðµ принÑтой (в режиме READ UNCOMMITTED) транзакции"
serbian "ZakljuÄavanja izmena ne mogu biti realizovana sve dok traje 'READ UNCOMMITTED' transakcija"
@@ -4414,14 +4615,15 @@ ER_READ_ONLY_TRANSACTION 25000
swe "Updateringslås kan inte göras när man använder READ UNCOMMITTED"
ukr "Оновити Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ можливо на протÑзі транзакції READ UNCOMMITTED"
ER_DROP_DB_WITH_READ_LOCK
+ chi "线程æŒæœ‰å…¨å±€è¯»é”时,ä¸å…许删除数æ®åº“"
dan "DROP DATABASE er ikke tilladt mens en tråd holder på globalt read lock"
- nla "DROP DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit"
eng "DROP DATABASE not allowed while thread is holding global read lock"
est "DROP DATABASE ei ole lubatud kui lõim omab globaalset READ lukku"
fre "DROP DATABASE n'est pas autorisée pendant qu'une tâche possède un verrou global en lecture"
ger "DROP DATABASE ist nicht erlaubt, solange der Thread eine globale Lesesperre hält"
ita "DROP DATABASE non e' permesso mentre il thread ha un lock globale di lettura"
jpn "グローãƒãƒ«ãƒªãƒ¼ãƒ‰ãƒ­ãƒƒã‚¯ã‚’ä¿æŒã—ã¦ã„ã‚‹é–“ã¯ã€DROP DATABASE を実行ã§ãã¾ã›ã‚“。"
+ nla "DROP DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit"
por "DROP DATABASE não permitido enquanto uma 'thread' está mantendo um travamento global de leitura"
rus "Ðе допуÑкаетÑÑ DROP DATABASE, пока поток держит глобальную блокировку чтениÑ"
serbian "Komanda 'DROP DATABASE' nije dozvoljena dok thread globalno zakljuÄava Äitanje podataka"
@@ -4429,14 +4631,15 @@ ER_DROP_DB_WITH_READ_LOCK
swe "DROP DATABASE är inte tillåtet när man har ett globalt läslås"
ukr "DROP DATABASE не дозволено доки гілка перебуває під загальним блокуваннÑм читаннÑ"
ER_CREATE_DB_WITH_READ_LOCK
+ chi "线程æŒæœ‰å…¨å±€è¯»é”时,ä¸å…许创建数æ®åº“"
dan "CREATE DATABASE er ikke tilladt mens en tråd holder på globalt read lock"
- nla "CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit"
eng "CREATE DATABASE not allowed while thread is holding global read lock"
est "CREATE DATABASE ei ole lubatud kui lõim omab globaalset READ lukku"
fre "CREATE DATABASE n'est pas autorisée pendant qu'une tâche possède un verrou global en lecture"
ger "CREATE DATABASE ist nicht erlaubt, solange der Thread eine globale Lesesperre hält"
ita "CREATE DATABASE non e' permesso mentre il thread ha un lock globale di lettura"
jpn "グローãƒãƒ«ãƒªãƒ¼ãƒ‰ãƒ­ãƒƒã‚¯ã‚’ä¿æŒã—ã¦ã„ã‚‹é–“ã¯ã€CREATE DATABASE を実行ã§ãã¾ã›ã‚“。"
+ nla "CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit"
por "CREATE DATABASE não permitido enquanto uma 'thread' está mantendo um travamento global de leitura"
rus "Ðе допуÑкаетÑÑ CREATE DATABASE, пока поток держит глобальную блокировку чтениÑ"
serbian "Komanda 'CREATE DATABASE' nije dozvoljena dok thread globalno zakljuÄava Äitanje podataka"
@@ -4444,7 +4647,7 @@ ER_CREATE_DB_WITH_READ_LOCK
swe "CREATE DATABASE är inte tillåtet när man har ett globalt läslås"
ukr "CREATE DATABASE не дозволено доки гілка перебуває під загальним блокуваннÑм читаннÑ"
ER_WRONG_ARGUMENTS
- nla "Foutieve parameters voor %s"
+ chi "%sçš„å‚æ•°ä¸æ­£ç¡®"
eng "Incorrect arguments to %s"
est "Vigased parameetrid %s-le"
fre "Mauvais arguments à %s"
@@ -4452,6 +4655,7 @@ ER_WRONG_ARGUMENTS
hindi "%s को गलत आरà¥à¤—à¥à¤¯à¥‚मेंटà¥à¤¸"
ita "Argomenti errati a %s"
jpn "%s ã®å¼•æ•°ãŒä¸æ­£ã§ã™"
+ nla "Foutieve parameters voor %s"
por "Argumentos errados para %s"
rus "Ðеверные параметры Ð´Ð»Ñ %s"
serbian "Pogrešni argumenti prosleđeni na %s"
@@ -4459,13 +4663,14 @@ ER_WRONG_ARGUMENTS
swe "Felaktiga argument till %s"
ukr "Хибний аргумент Ð´Ð»Ñ %s"
ER_NO_PERMISSION_TO_CREATE_USER 42000
- nla "'%s'@'%s' mag geen nieuwe gebruikers creeren"
+ chi "'%s'@'%s'ä¸å…许创建新用户"
eng "'%s'@'%s' is not allowed to create new users"
est "Kasutajal '%s'@'%s' ei ole lubatud luua uusi kasutajaid"
fre "'%s'@'%s' n'est pas autorisé à créer de nouveaux utilisateurs"
ger "'%s'@'%s' ist nicht berechtigt, neue Benutzer hinzuzufügen"
hindi "'%s'@'%s' को नठयूज़रà¥à¤¸ बनाने की अनà¥à¤®à¤¤à¤¿ नहीं है"
ita "A '%s'@'%s' non e' permesso creare nuovi utenti"
+ nla "'%s'@'%s' mag geen nieuwe gebruikers creeren"
por "Não é permitido a '%s'@'%s' criar novos usuários"
rus "'%s'@'%s' не разрешаетÑÑ Ñоздавать новых пользователей"
serbian "Korisniku '%s'@'%s' nije dozvoljeno da kreira nove korisnike"
@@ -4473,13 +4678,14 @@ ER_NO_PERMISSION_TO_CREATE_USER 42000
swe "'%s'@'%s' har inte rättighet att skapa nya användare"
ukr "КориÑтувачу '%s'@'%s' не дозволено Ñтворювати нових кориÑтувачів"
ER_UNION_TABLES_IN_DIFFERENT_DIR
- nla "Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren"
+ chi "表定义ä¸æ­£ç¡®;所有åˆå¹¶è¡¨å¿…须在åŒä¸€æ•°æ®åº“中"
eng "Incorrect table definition; all MERGE tables must be in the same database"
est "Vigane tabelimääratlus; kõik MERGE tabeli liikmed peavad asuma samas andmebaasis"
fre "Définition de table incorrecte; toutes les tables MERGE doivent être dans la même base de donnée"
ger "Falsche Tabellendefinition. Alle MERGE-Tabellen müssen sich in derselben Datenbank befinden"
ita "Definizione della tabella errata; tutte le tabelle di tipo MERGE devono essere nello stesso database"
jpn "ä¸æ­£ãªè¡¨å®šç¾©ã§ã™ã€‚MERGE表ã®æ§‹æˆè¡¨ã¯ã™ã¹ã¦åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã«ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。"
+ nla "Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren"
por "Definição incorreta da tabela. Todas as tabelas contidas na junção devem estar no mesmo banco de dados"
rus "Ðеверное определение таблицы; Ð’Ñе таблицы в MERGE должны принадлежать одной и той же базе данных"
serbian "Pogrešna definicija tabele; sve 'MERGE' tabele moraju biti u istoj bazi podataka"
@@ -4487,13 +4693,14 @@ ER_UNION_TABLES_IN_DIFFERENT_DIR
swe "Felaktig tabelldefinition; alla tabeller i en MERGE-tabell måste vara i samma databas"
ukr "Хибне Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ–; вÑÑ– MERGE-таблиці повинні належити до однієї бази ланних."
ER_LOCK_DEADLOCK 40001
- nla "Deadlock gevonden tijdens lock-aanvraag poging; Probeer herstart van de transactie"
+ chi "试图é”定时å‘现僵局;å°è¯•é‡æ–°å¯åŠ¨äº‹åŠ¡"
eng "Deadlock found when trying to get lock; try restarting transaction"
est "Lukustamisel tekkis tupik (deadlock); alusta transaktsiooni otsast"
fre "Deadlock découvert en essayant d'obtenir les verrous : essayez de redémarrer la transaction"
ger "Beim Versuch, eine Sperre anzufordern, ist ein Deadlock aufgetreten. Versuchen Sie, die Transaktion neu zu starten"
ita "Trovato deadlock durante il lock; Provare a far ripartire la transazione"
jpn "ロックå–得中ã«ãƒ‡ãƒƒãƒ‰ãƒ­ãƒƒã‚¯ãŒæ¤œå‡ºã•ã‚Œã¾ã—ãŸã€‚トランザクションをå†è©¦è¡Œã—ã¦ãã ã•ã„。"
+ nla "Deadlock gevonden tijdens lock-aanvraag poging; Probeer herstart van de transactie"
por "Encontrado um travamento fatal (deadlock) quando tentava obter uma trava. Tente reiniciar a transação"
rus "Возникла Ñ‚ÑƒÐ¿Ð¸ÐºÐ¾Ð²Ð°Ñ ÑÐ¸Ñ‚ÑƒÐ°Ñ†Ð¸Ñ Ð² процеÑÑе Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ¸; Попробуйте перезапуÑтить транзакцию"
serbian "Unakrsno zakljuÄavanje pronaÄ‘eno kada sam pokuÅ¡ao da dobijem pravo na zakljuÄavanje; Probajte da restartujete transakciju"
@@ -4501,13 +4708,14 @@ ER_LOCK_DEADLOCK 40001
swe "Fick 'DEADLOCK' vid låsförsök av block/rad. Försök att starta om transaktionen"
ukr "Взаємне Ð±Ð»Ð¾ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾ під Ñ‡Ð°Ñ Ñпроби отримати блокуваннÑ; Ñпробуйте перезапуÑтити транзакцію."
ER_TABLE_CANT_HANDLE_FT
- nla "Het gebruikte tabel type (%s) ondersteund geen FULLTEXT indexen"
+ chi "存储引擎%sä¸æ”¯æŒfulltext索引"
eng "The storage engine %s doesn't support FULLTEXT indexes"
est "Antud tabelitüüp (%s) ei toeta FULLTEXT indekseid"
fre "Le type de table utilisé (%s) ne supporte pas les index FULLTEXT"
ger "Der verwendete Tabellentyp (%s) unterstützt keine FULLTEXT-Indizes"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन '%s' FULLTEXT इनà¥à¤¡à¥‡à¤•à¥à¤¸à¥‡à¤¸ को सपोरà¥à¤Ÿ नहीं करता"
ita "La tabella usata (%s) non supporta gli indici FULLTEXT"
+ nla "Het gebruikte tabel type (%s) ondersteund geen FULLTEXT indexen"
por "O tipo de tabela utilizado (%s) não suporta índices de texto completo (fulltext indexes)"
rus "ИÑпользуемый тип таблиц (%s) не поддерживает полнотекÑтовых индекÑов"
serbian "Upotrebljeni tip tabele (%s) ne podržava 'FULLTEXT' indekse"
@@ -4515,12 +4723,13 @@ ER_TABLE_CANT_HANDLE_FT
swe "Tabelltypen (%s) har inte hantering av FULLTEXT-index"
ukr "ВикориÑтаний тип таблиці (%s) не підтримує FULLTEXT індекÑів"
ER_CANNOT_ADD_FOREIGN
- nla "Kan foreign key beperking niet toevoegen vor `%s`"
+ chi "ä¸èƒ½ä¸º`%s`添加外键约æŸ"
eng "Cannot add foreign key constraint for `%s`"
fre "Impossible d'ajouter des contraintes d'index externe à `%s`"
ger "Fremdschlüssel-Beschränkung kann nicht hinzugefügt werden für `%s`"
ita "Impossibile aggiungere il vincolo di integrita' referenziale (foreign key constraint) a `%s`"
jpn "`%s` 外部キー制約を追加ã§ãã¾ã›ã‚“。"
+ nla "Kan foreign key beperking niet toevoegen vor `%s`"
por "Não pode acrescentar uma restrição de chave estrangeira para `%s`"
rus "Ðевозможно добавить Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð²Ð½ÐµÑˆÐ½ÐµÐ³Ð¾ ключа Ð´Ð»Ñ `%s`"
serbian "Ne mogu da dodam proveru spoljnog kljuÄa na `%s`"
@@ -4528,7 +4737,7 @@ ER_CANNOT_ADD_FOREIGN
swe "Kan inte lägga till 'FOREIGN KEY constraint' för `%s`'"
ukr "Ðе можу додати Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ ключа Ha `%s`"
ER_NO_REFERENCED_ROW 23000
- nla "Kan onderliggende rij niet toevoegen: foreign key beperking gefaald"
+ chi "无法添加或更新å­è¡Œï¼šå¤–键约æŸå¤±è´¥"
eng "Cannot add or update a child row: a foreign key constraint fails"
fre "Impossible d'ajouter un enregistrement fils : une constrainte externe l'empèche"
ger "Hinzufügen oder Aktualisieren eines Kind-Datensatzes schlug aufgrund einer Fremdschlüssel-Beschränkung fehl"
@@ -4536,6 +4745,7 @@ ER_NO_REFERENCED_ROW 23000
hun "Cannot add a child row: a foreign key constraint fails"
ita "Impossibile aggiungere la riga: un vincolo d'integrita' referenziale non e' soddisfatto"
jpn "親キーãŒã‚ã‚Šã¾ã›ã‚“。外部キー制約é•åã§ã™ã€‚"
+ nla "Kan onderliggende rij niet toevoegen: foreign key beperking gefaald"
norwegian-ny "Cannot add a child row: a foreign key constraint fails"
por "Não pode acrescentar uma linha filha: uma restrição de chave estrangeira falhou"
rus "Ðевозможно добавить или обновить дочернюю Ñтроку: проверка ограничений внешнего ключа не выполнÑетÑÑ"
@@ -4543,6 +4753,7 @@ ER_NO_REFERENCED_ROW 23000
swe "FOREIGN KEY-konflikt: Kan inte skriva barn"
ukr "Ðе вдаєтьÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ або оновити дочірній Ñ€Ñдок: невдала перевірка Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð¾Ð²Ð½Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ ключа"
ER_ROW_IS_REFERENCED 23000
+ chi "无法删除或更新父行:外键约æŸå¤±è´¥"
eng "Cannot delete or update a parent row: a foreign key constraint fails"
fre "Impossible de supprimer un enregistrement père : une constrainte externe l'empèche"
ger "Löschen oder Aktualisieren eines Eltern-Datensatzes schlug aufgrund einer Fremdschlüssel-Beschränkung fehl"
@@ -4556,44 +4767,48 @@ ER_ROW_IS_REFERENCED 23000
spa "No puede deletar una línea padre: falla de clave extranjera constraint"
swe "FOREIGN KEY-konflikt: Kan inte radera fader"
ER_CONNECT_TO_MASTER 08S01
- nla "Fout bij opbouwen verbinding naar master: %-.128s"
+ chi "连接master时出错:%-.128s"
eng "Error connecting to master: %-.128s"
ger "Fehler bei der Verbindung zum Master: %-.128s"
ita "Errore durante la connessione al master: %-.128s"
jpn "マスターã¸ã®æŽ¥ç¶šã‚¨ãƒ©ãƒ¼: %-.128s"
+ nla "Fout bij opbouwen verbinding naar master: %-.128s"
por "Erro conectando com o master: %-.128s"
rus "Ошибка ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ Ð³Ð¾Ð»Ð¾Ð²Ð½Ñ‹Ð¼ Ñервером: %-.128s"
spa "Error de coneccion a master: %-.128s"
swe "Fick fel vid anslutning till master: %-.128s"
ER_QUERY_ON_MASTER
- nla "Fout bij uitvoeren query op master: %-.128s"
+ chi "在Master上è¿è¡ŒæŸ¥è¯¢æ—¶å‡ºé”™ï¼š%-.128s"
eng "Error running query on master: %-.128s"
ger "Beim Ausführen einer Abfrage auf dem Master trat ein Fehler auf: %-.128s"
ita "Errore eseguendo una query sul master: %-.128s"
jpn "マスターã§ã®ã‚¯ã‚¨ãƒªå®Ÿè¡Œã‚¨ãƒ©ãƒ¼: %-.128s"
+ nla "Fout bij uitvoeren query op master: %-.128s"
por "Erro rodando consulta no master: %-.128s"
rus "Ошибка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿Ñ€Ð¾Ñа на головном Ñервере: %-.128s"
spa "Error executando el query en master: %-.128s"
swe "Fick fel vid utförande av command på mastern: %-.128s"
ER_ERROR_WHEN_EXECUTING_COMMAND
- nla "Fout tijdens uitvoeren van commando %s: %-.128s"
+ chi "执行命令%s时出错:%-.128s"
eng "Error when executing command %s: %-.128s"
est "Viga käsu %s täitmisel: %-.128s"
ger "Fehler beim Ausführen des Befehls %s: %-.128s"
ita "Errore durante l'esecuzione del comando %s: %-.128s"
jpn "%s コマンドã®å®Ÿè¡Œã‚¨ãƒ©ãƒ¼: %-.128s"
+ nla "Fout tijdens uitvoeren van commando %s: %-.128s"
por "Erro quando executando comando %s: %-.128s"
rus "Ошибка при выполнении команды %s: %-.128s"
serbian "Greška pri izvršavanju komande %s: %-.128s"
spa "Error de %s: %-.128s"
swe "Fick fel vid utförande av %s: %-.128s"
ER_WRONG_USAGE
- nla "Foutief gebruik van %s en %s"
+ chi "%så’Œ%s使用ä¸æ­£ç¡®"
eng "Incorrect usage of %s and %s"
est "Vigane %s ja %s kasutus"
ger "Falsche Verwendung von %s und %s"
ita "Uso errato di %s e %s"
jpn "%s ã® %s ã«é–¢ã™ã‚‹ä¸æ­£ãªä½¿ç”¨æ³•ã§ã™ã€‚"
+ nla "Foutief gebruik van %s en %s"
por "Uso errado de %s e %s"
rus "Ðеверное иÑпользование %s и %s"
serbian "Pogrešna upotreba %s i %s"
@@ -4601,164 +4816,180 @@ ER_WRONG_USAGE
swe "Felaktig använding av %s and %s"
ukr "Wrong usage of %s and %s"
ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 21000
- nla "De gebruikte SELECT commando's hebben een verschillend aantal kolommen"
+ chi "使用的SELECT语å¥å…·æœ‰ä¸åŒæ•°é‡çš„列"
eng "The used SELECT statements have a different number of columns"
est "Tulpade arv kasutatud SELECT lausetes ei kattu"
ger "Die verwendeten SELECT-Befehle liefern unterschiedliche Anzahlen von Feldern zurück"
ita "La SELECT utilizzata ha un numero di colonne differente"
jpn "使用ã®SELECTæ–‡ãŒè¿”ã™åˆ—æ•°ãŒé•ã„ã¾ã™ã€‚"
+ nla "De gebruikte SELECT commando's hebben een verschillend aantal kolommen"
por "Os comandos SELECT usados têm diferente número de colunas"
rus "ИÑпользованные операторы выборки (SELECT) дают разное количеÑтво Ñтолбцов"
serbian "Upotrebljene 'SELECT' komande adresiraju razliÄit broj kolona"
spa "El comando SELECT usado tiene diferente número de columnas"
swe "SELECT-kommandona har olika antal kolumner"
ER_CANT_UPDATE_WITH_READLOCK
- nla "Kan de query niet uitvoeren vanwege een conflicterende read lock"
+ chi "无法执行查询,因为您有冲çªçš„读é”"
eng "Can't execute the query because you have a conflicting read lock"
est "Ei suuda täita päringut konfliktse luku tõttu"
ger "Augrund eines READ-LOCK-Konflikts kann die Abfrage nicht ausgeführt werden"
ita "Impossibile eseguire la query perche' c'e' un conflitto con in lock di lettura"
jpn "競åˆã™ã‚‹ãƒªãƒ¼ãƒ‰ãƒ­ãƒƒã‚¯ã‚’ä¿æŒã—ã¦ã„ã‚‹ã®ã§ã€ã‚¯ã‚¨ãƒªã‚’実行ã§ãã¾ã›ã‚“。"
+ nla "Kan de query niet uitvoeren vanwege een conflicterende read lock"
por "Não posso executar a consulta porque você tem um conflito de travamento de leitura"
rus "Ðевозможно иÑполнить запроÑ, поÑкольку у Ð²Ð°Ñ ÑƒÑтановлены конфликтующие блокировки чтениÑ"
serbian "Ne mogu da izvrÅ¡im upit zbog toga Å¡to imate zakljuÄavanja Äitanja podataka u konfliktu"
spa "No puedo ejecutar el query porque usted tiene conflicto de traba de lectura"
swe "Kan inte utföra kommandot emedan du har ett READ-lås"
ER_MIXING_NOT_ALLOWED
- nla "Het combineren van transactionele en niet-transactionele tabellen is uitgeschakeld"
+ chi "事务和éžäº‹åŠ¡è¡¨çš„æ··åˆè¢«ç¦ç”¨"
eng "Mixing of transactional and non-transactional tables is disabled"
est "Transaktsioone toetavate ning mittetoetavate tabelite kooskasutamine ei ole lubatud"
ger "Die gleichzeitige Verwendung von Tabellen mit und ohne Transaktionsunterstützung ist deaktiviert"
ita "E' disabilitata la possibilita' di mischiare tabelle transazionali e non-transazionali"
jpn "トランザクション対応ã®è¡¨ã¨éžå¯¾å¿œã®è¡¨ã®åŒæ™‚使用ã¯ç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚"
+ nla "Het combineren van transactionele en niet-transactionele tabellen is uitgeschakeld"
por "Mistura de tabelas transacional e não-transacional está desabilitada"
rus "ИÑпользование транзакционных таблиц нарÑду Ñ Ð½ÐµÑ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ð¸Ð¾Ð½Ð½Ñ‹Ð¼Ð¸ запрещено"
serbian "MeÅ¡anje tabela koje podržavaju transakcije i onih koje ne podržavaju transakcije je iskljuÄeno"
spa "Mezla de transancional y no-transancional tablas está deshabilitada"
swe "Blandning av transaktionella och icke-transaktionella tabeller är inaktiverat"
ER_DUP_ARGUMENT
- nla "Optie '%s' tweemaal gebruikt in opdracht"
+ chi "选项'%s'在语å¥ä¸­ä½¿ç”¨ä¸¤æ¬¡"
eng "Option '%s' used twice in statement"
est "Määrangut '%s' on lauses kasutatud topelt"
ger "Option '%s' wird im Befehl zweimal verwendet"
ita "L'opzione '%s' e' stata usata due volte nel comando"
jpn "オプション '%s' ãŒ2度使用ã•ã‚Œã¦ã„ã¾ã™ã€‚"
+ nla "Optie '%s' tweemaal gebruikt in opdracht"
por "Opção '%s' usada duas vezes no comando"
rus "ÐžÐ¿Ñ†Ð¸Ñ '%s' дважды иÑпользована в выражении"
spa "Opción '%s' usada dos veces en el comando"
swe "Option '%s' användes två gånger"
ER_USER_LIMIT_REACHED 42000
- nla "Gebruiker '%-.64s' heeft het maximale gebruik van de '%s' faciliteit overschreden (huidige waarde: %ld)"
+ chi "用户'%-.64s'已超过'%s'资æºï¼ˆå½“å‰å€¼ï¼š%ld)"
eng "User '%-.64s' has exceeded the '%s' resource (current value: %ld)"
ger "Benutzer '%-.64s' hat die Ressourcenbeschränkung '%s' überschritten (aktueller Wert: %ld)"
ita "L'utente '%-.64s' ha ecceduto la risorsa '%s' (valore corrente: %ld)"
jpn "ユーザー '%-.64s' ã¯ãƒªã‚½ãƒ¼ã‚¹ã®ä¸Šé™ '%s' ã«é”ã—ã¾ã—ãŸã€‚(ç¾åœ¨å€¤: %ld)"
+ nla "Gebruiker '%-.64s' heeft het maximale gebruik van de '%s' faciliteit overschreden (huidige waarde: %ld)"
por "Usuário '%-.64s' tem excedido o '%s' recurso (atual valor: %ld)"
rus "Пользователь '%-.64s' превыÑил иÑпользование реÑурÑа '%s' (текущее значение: %ld)"
spa "Usuario '%-.64s' ha excedido el recurso '%s' (actual valor: %ld)"
swe "Användare '%-.64s' har överskridit '%s' (nuvarande värde: %ld)"
ER_SPECIFIC_ACCESS_DENIED_ERROR 42000
- nla "Toegang geweigerd. U moet het %-.128s privilege hebben voor deze operatie"
+ chi "æ‹’ç»è®¿é—®;您需è¦ï¼ˆè‡³å°‘一个)%-.128s特æƒç”¨äºŽæ­¤æ“作"
eng "Access denied; you need (at least one of) the %-.128s privilege(s) for this operation"
ger "Kein Zugriff. Hierfür wird die Berechtigung %-.128s benötigt"
ita "Accesso non consentito. Serve il privilegio %-.128s per questa operazione"
jpn "アクセスã¯æ‹’å¦ã•ã‚Œã¾ã—ãŸã€‚ã“ã®æ“作ã«ã¯ %-.128s 権é™ãŒ(複数ã®å ´åˆã¯ã©ã‚Œã‹1ã¤)å¿…è¦ã§ã™ã€‚"
+ nla "Toegang geweigerd. U moet het %-.128s privilege hebben voor deze operatie"
por "Acesso negado. Você precisa o privilégio %-.128s para essa operação"
rus "Ð’ доÑтупе отказано. Вам нужны привилегии %-.128s Ð´Ð»Ñ Ñтой операции"
spa "Acceso negado. Usted necesita el privilegio %-.128s para esta operación"
swe "Du har inte privlegiet '%-.128s' som behövs för denna operation"
ukr "Access denied. You need the %-.128s privilege for this operation"
ER_LOCAL_VARIABLE
- nla "Variabele '%-.64s' is SESSION en kan niet worden gebruikt met SET GLOBAL"
+ chi "å˜é‡'%-.64s'是一个SESSIONå˜é‡ï¼Œä¸èƒ½ä¸ŽSet Global一起使用"
eng "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL"
ger "Variable '%-.64s' ist eine lokale Variable und kann nicht mit SET GLOBAL verändert werden"
ita "La variabile '%-.64s' e' una variabile locale ( SESSION ) e non puo' essere cambiata usando SET GLOBAL"
jpn "変数 '%-.64s' ã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³å¤‰æ•°ã§ã™ã€‚SET GLOBALã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。"
+ nla "Variabele '%-.64s' is SESSION en kan niet worden gebruikt met SET GLOBAL"
por "Variável '%-.64s' é uma SESSION variável e não pode ser usada com SET GLOBAL"
rus "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.64s' ÑвлÑетÑÑ Ð¿Ð¾Ñ‚Ð¾ÐºÐ¾Ð²Ð¾Ð¹ (SESSION) переменной и не может быть изменена Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ SET GLOBAL"
spa "Variable '%-.64s' es una SESSION variable y no puede ser usada con SET GLOBAL"
swe "Variabel '%-.64s' är en SESSION variabel och kan inte ändrad med SET GLOBAL"
ER_GLOBAL_VARIABLE
- nla "Variabele '%-.64s' is GLOBAL en dient te worden gewijzigd met SET GLOBAL"
+ chi "å˜é‡'%-.64s'是全局å˜é‡ï¼Œåº”该用SET GLOBAL设置"
eng "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL"
ger "Variable '%-.64s' ist eine globale Variable und muss mit SET GLOBAL verändert werden"
ita "La variabile '%-.64s' e' una variabile globale ( GLOBAL ) e deve essere cambiata usando SET GLOBAL"
jpn "変数 '%-.64s' ã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«å¤‰æ•°ã§ã™ã€‚SET GLOBALを使用ã—ã¦ãã ã•ã„。"
+ nla "Variabele '%-.64s' is GLOBAL en dient te worden gewijzigd met SET GLOBAL"
por "Variável '%-.64s' é uma GLOBAL variável e deve ser configurada com SET GLOBAL"
rus "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.64s' ÑвлÑетÑÑ Ð³Ð»Ð¾Ð±Ð°Ð»ÑŒÐ½Ð¾Ð¹ (GLOBAL) переменной, и ее Ñледует изменÑÑ‚ÑŒ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ SET GLOBAL"
spa "Variable '%-.64s' es una GLOBAL variable y no puede ser configurada con SET GLOBAL"
swe "Variabel '%-.64s' är en GLOBAL variabel och bör sättas med SET GLOBAL"
ER_NO_DEFAULT 42000
- nla "Variabele '%-.64s' heeft geen standaard waarde"
+ chi "å˜é‡'%-.64s'没有默认值"
eng "Variable '%-.64s' doesn't have a default value"
ger "Variable '%-.64s' hat keinen Vorgabewert"
ita "La variabile '%-.64s' non ha un valore di default"
jpn "変数 '%-.64s' ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒã‚ã‚Šã¾ã›ã‚“。"
+ nla "Variabele '%-.64s' heeft geen standaard waarde"
por "Variável '%-.64s' não tem um valor padrão"
rus "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.64s' не имеет Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию"
spa "Variable '%-.64s' no tiene un valor patrón"
swe "Variabel '%-.64s' har inte ett DEFAULT-värde"
ER_WRONG_VALUE_FOR_VAR 42000
- nla "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.200T'"
+ chi "å˜é‡'%-.64s'无法设置为'%-.200T'的值"
eng "Variable '%-.64s' can't be set to the value of '%-.200T'"
ger "Variable '%-.64s' kann nicht auf '%-.200T' gesetzt werden"
ita "Alla variabile '%-.64s' non puo' essere assegato il valore '%-.200T'"
jpn "変数 '%-.64s' ã«å€¤ '%-.200T' を設定ã§ãã¾ã›ã‚“。"
+ nla "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.200T'"
por "Variável '%-.64s' não pode ser configurada para o valor de '%-.200T'"
rus "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.64s' не может быть уÑтановлена в значение '%-.200T'"
spa "Variable '%-.64s' no puede ser configurada para el valor de '%-.200T'"
swe "Variabel '%-.64s' kan inte sättas till '%-.200T'"
ER_WRONG_TYPE_FOR_VAR 42000
- nla "Foutief argumenttype voor variabele '%-.64s'"
+ chi "å˜é‡'%-.64s'çš„å‚数类型ä¸æ­£ç¡®"
eng "Incorrect argument type to variable '%-.64s'"
ger "Falscher Argumenttyp für Variable '%-.64s'"
ita "Tipo di valore errato per la variabile '%-.64s'"
jpn "変数 '%-.64s' ã¸ã®å€¤ã®åž‹ãŒä¸æ­£ã§ã™ã€‚"
+ nla "Foutief argumenttype voor variabele '%-.64s'"
por "Tipo errado de argumento para variável '%-.64s'"
rus "Ðеверный тип аргумента Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹ '%-.64s'"
spa "Tipo de argumento equivocado para variable '%-.64s'"
swe "Fel typ av argument till variabel '%-.64s'"
ER_VAR_CANT_BE_READ
- nla "Variabele '%-.64s' kan alleen worden gewijzigd, niet gelezen"
+ chi "å˜é‡'%-.64s'åªèƒ½è®¾ç½®ï¼Œä¸èƒ½è¯»"
eng "Variable '%-.64s' can only be set, not read"
ger "Variable '%-.64s' kann nur verändert, nicht gelesen werden"
ita "Alla variabile '%-.64s' e' di sola scrittura quindi puo' essere solo assegnato un valore, non letto"
jpn "変数 '%-.64s' ã¯æ›¸ãè¾¼ã¿å°‚用ã§ã™ã€‚読ã¿è¾¼ã¿ã¯ã§ãã¾ã›ã‚“。"
+ nla "Variabele '%-.64s' kan alleen worden gewijzigd, niet gelezen"
por "Variável '%-.64s' somente pode ser configurada, não lida"
rus "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.64s' может быть только уÑтановлена, но не Ñчитана"
spa "Variable '%-.64s' solamente puede ser configurada, no leída"
swe "Variabeln '%-.64s' kan endast sättas, inte läsas"
ER_CANT_USE_OPTION_HERE 42000
- nla "Foutieve toepassing/plaatsing van '%s'"
+ chi "'%s'的使用/放置ä¸æ­£ç¡®"
eng "Incorrect usage/placement of '%s'"
ger "Falsche Verwendung oder Platzierung von '%s'"
ita "Uso/posizione di '%s' sbagliato"
jpn "'%s' ã®ä½¿ç”¨æ³•ã¾ãŸã¯å ´æ‰€ãŒä¸æ­£ã§ã™ã€‚"
+ nla "Foutieve toepassing/plaatsing van '%s'"
por "Errado uso/colocação de '%s'"
rus "Ðеверное иÑпользование или в неверном меÑте указан '%s'"
spa "Equivocado uso/colocación de '%s'"
swe "Fel använding/placering av '%s'"
ER_NOT_SUPPORTED_YET 42000
- nla "Deze versie van MariaDB ondersteunt nog geen '%s'"
+ chi "此版本的MariaDB尚未支æŒ'%s'"
eng "This version of MariaDB doesn't yet support '%s'"
ger "Diese MariaDB-Version unterstützt '%s' nicht"
ita "Questa versione di MariaDB non supporta ancora '%s'"
jpn "ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®MariaDBã§ã¯ã€ã¾ã  '%s' を利用ã§ãã¾ã›ã‚“。"
+ nla "Deze versie van MariaDB ondersteunt nog geen '%s'"
por "Esta versão de MariaDB não suporta ainda '%s'"
rus "Эта верÑÐ¸Ñ MariaDB пока еще не поддерживает '%s'"
spa "Esta versión de MariaDB no soporta todavia '%s'"
swe "Denna version av MariaDB kan ännu inte utföra '%s'"
ER_MASTER_FATAL_ERROR_READING_BINLOG
- nla "Kreeg fatale fout %d: '%-.320s' van master tijdens lezen van data uit binaire log"
+ chi "从二进制日志读å–æ•°æ®æ—¶ï¼Œä»Žmasteré‡åˆ°è‡´å‘½é”™è¯¯%d:'%-.320s'"
eng "Got fatal error %d from master when reading data from binary log: '%-.320s'"
ger "Schwerer Fehler %d: '%-.320s vom Master beim Lesen des binären Logs"
ita "Errore fatale %d: '%-.320s' dal master leggendo i dati dal log binario"
jpn "致命的ãªã‚¨ãƒ©ãƒ¼ %d: '%-.320s' ãŒãƒžã‚¹ã‚¿ãƒ¼ã§ãƒã‚¤ãƒŠãƒªãƒ­ã‚°èª­ã¿è¾¼ã¿ä¸­ã«ç™ºç”Ÿã—ã¾ã—ãŸã€‚"
+ nla "Kreeg fatale fout %d: '%-.320s' van master tijdens lezen van data uit binaire log"
por "Obteve fatal erro %d: '%-.320s' do master quando lendo dados do binary log"
rus "Получена неиÑÐ¿Ñ€Ð°Ð²Ð¸Ð¼Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° %d: '%-.320s' от головного Ñервера в процеÑÑе выборки данных из двоичного журнала"
spa "Recibió fatal error %d: '%-.320s' del master cuando leyendo datos del binary log"
swe "Fick fatalt fel %d: '%-.320s' från master vid läsning av binärloggen"
ER_SLAVE_IGNORED_TABLE
+ chi "由于å¤åˆ¶replicate-*-table规则,Slave SQL线程忽略了查询"
eng "Slave SQL thread ignored the query because of replicate-*-table rules"
ger "Slave-SQL-Thread hat die Abfrage aufgrund von replicate-*-table-Regeln ignoriert"
jpn "replicate-*-table ルールã«å¾“ã£ã¦ã€ã‚¹ãƒ¬ãƒ¼ãƒ–SQLスレッドã¯ã‚¯ã‚¨ãƒªã‚’無視ã—ã¾ã—ãŸã€‚"
@@ -4767,14 +4998,16 @@ ER_SLAVE_IGNORED_TABLE
spa "Slave SQL thread ignorado el query debido a las reglas de replicación-*-tabla"
swe "Slav SQL tråden ignorerade frågan pga en replicate-*-table regel"
ER_INCORRECT_GLOBAL_LOCAL_VAR
+ chi "å˜é‡'%-.192s'是一个%så˜é‡"
eng "Variable '%-.192s' is a %s variable"
- serbian "Promenljiva '%-.192s' je %s promenljiva"
ger "Variable '%-.192s' ist eine %s-Variable"
jpn "変数 '%-.192s' 㯠%s 変数ã§ã™ã€‚"
nla "Variabele '%-.192s' is geen %s variabele"
+ serbian "Promenljiva '%-.192s' je %s promenljiva"
spa "Variable '%-.192s' es una %s variable"
swe "Variabel '%-.192s' är av typ %s"
ER_WRONG_FK_DEF 42000
+ chi "'%-.192s'的外键定义ä¸æ­£ç¡®ï¼š%s"
eng "Incorrect foreign key definition for '%-.192s': %s"
ger "Falsche Fremdschlüssel-Definition für '%-.192s': %s"
jpn "外部キー '%-.192s' ã®å®šç¾©ã®ä¸æ­£: %s"
@@ -4783,6 +5016,7 @@ ER_WRONG_FK_DEF 42000
spa "Equivocada definición de llave extranjera para '%-.192s': %s"
swe "Felaktig FOREIGN KEY-definition för '%-.192s': %s"
ER_KEY_REF_DO_NOT_MATCH_TABLE_REF
+ chi "索引å‚考和表å‚考ä¸åŒ¹é…"
eng "Key reference and table reference don't match"
ger "Schlüssel- und Tabellenverweis passen nicht zusammen"
jpn "外部キーã®å‚照表ã¨å®šç¾©ãŒä¸€è‡´ã—ã¾ã›ã‚“。"
@@ -4791,6 +5025,7 @@ ER_KEY_REF_DO_NOT_MATCH_TABLE_REF
spa "Referencia de llave y referencia de tabla no coinciden"
swe "Nyckelreferensen och tabellreferensen stämmer inte överens"
ER_OPERAND_COLUMNS 21000
+ chi "æ“作数应包å«%d列"
eng "Operand should contain %d column(s)"
ger "Operand sollte %d Spalte(n) enthalten"
jpn "オペランド㫠%d 個ã®åˆ—ãŒå¿…è¦ã§ã™ã€‚"
@@ -4799,6 +5034,7 @@ ER_OPERAND_COLUMNS 21000
spa "Operando debe tener %d columna(s)"
ukr "Операнд має ÑкладатиÑÑ Ð· %d Ñтовбців"
ER_SUBQUERY_NO_1_ROW 21000
+ chi "å­æŸ¥è¯¢è¿”回超过1è¡Œ"
eng "Subquery returns more than 1 row"
ger "Unterabfrage lieferte mehr als einen Datensatz zurück"
jpn "サブクエリãŒ2行以上ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚"
@@ -4809,6 +5045,7 @@ ER_SUBQUERY_NO_1_ROW 21000
swe "Subquery returnerade mer än 1 rad"
ukr "Підзапит повертає більш нiж 1 запиÑ"
ER_UNKNOWN_STMT_HANDLER
+ chi "未知prepared statement处ç†ç¨‹åº(%.*s)给予%s"
dan "Unknown prepared statement handler (%.*s) given to %s"
eng "Unknown prepared statement handler (%.*s) given to %s"
ger "Unbekannter Prepared-Statement-Handler (%.*s) für %s angegeben"
@@ -4819,6 +5056,7 @@ ER_UNKNOWN_STMT_HANDLER
swe "Okänd PREPARED STATEMENT id (%.*s) var given till %s"
ukr "Unknown prepared statement handler (%.*s) given to %s"
ER_CORRUPT_HELP_DB
+ chi "帮助数æ®åº“å·²æŸå或ä¸å­˜åœ¨"
eng "Help database is corrupt or does not exist"
ger "Die Hilfe-Datenbank ist beschädigt oder existiert nicht"
jpn "ヘルプデータベースã¯å£Šã‚Œã¦ã„ã‚‹ã‹å­˜åœ¨ã—ã¾ã›ã‚“。"
@@ -4827,6 +5065,7 @@ ER_CORRUPT_HELP_DB
spa "Base de datos Help está corrupto o no existe"
swe "Hjälpdatabasen finns inte eller är skadad"
ER_CYCLIC_REFERENCE
+ chi "亚查询的死环å‚考"
eng "Cyclic reference on subqueries"
ger "Zyklischer Verweis in Unterabfragen"
jpn "サブクエリã®å‚ç…§ãŒãƒ«ãƒ¼ãƒ—ã—ã¦ã„ã¾ã™ã€‚"
@@ -4837,6 +5076,7 @@ ER_CYCLIC_REFERENCE
swe "Cyklisk referens i subqueries"
ukr "Циклічне поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° підзапит"
ER_AUTO_CONVERT
+ chi "将列'%s'从%s转æ¢ä¸º%s"
eng "Converting column '%s' from %s to %s"
ger "Feld '%s' wird von %s nach %s umgewandelt"
jpn "列 '%s' ã‚’ %s ã‹ã‚‰ %s ã¸å¤‰æ›ã—ã¾ã™ã€‚"
@@ -4847,6 +5087,7 @@ ER_AUTO_CONVERT
swe "Konvertar kolumn '%s' från %s till %s"
ukr "ÐŸÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñтовбца '%s' з %s у %s"
ER_ILLEGAL_REFERENCE 42S22
+ chi "å‚考'%-.64s'ä¸æ”¯æŒ(%s)"
eng "Reference '%-.64s' not supported (%s)"
ger "Verweis '%-.64s' wird nicht unterstützt (%s)"
jpn "'%-.64s' ã®å‚ç…§ã¯ã§ãã¾ã›ã‚“。(%s)"
@@ -4857,6 +5098,7 @@ ER_ILLEGAL_REFERENCE 42S22
swe "Referens '%-.64s' stöds inte (%s)"
ukr "ПоÑÐ¸Ð»Ð°Ð½Ð½Ñ '%-.64s' не пiдтримуетÑÑ (%s)"
ER_DERIVED_MUST_HAVE_ALIAS 42000
+ chi "æ¯ä¸ªæ´¾ç”Ÿçš„表必须有自己的别å"
eng "Every derived table must have its own alias"
ger "Für jede abgeleitete Tabelle muss ein eigener Alias angegeben werden"
jpn "導出表ã«ã¯åˆ¥åãŒå¿…é ˆã§ã™ã€‚"
@@ -4865,6 +5107,7 @@ ER_DERIVED_MUST_HAVE_ALIAS 42000
spa "Cada tabla derivada debe tener su propio alias"
swe "Varje 'derived table' måste ha sitt eget alias"
ER_SELECT_REDUCED 01000
+ chi "SELECT %u在优化期间被å‡"
eng "Select %u was reduced during optimization"
ger "Select %u wurde während der Optimierung reduziert"
jpn "Select %u ã¯æœ€é©åŒ–ã«ã‚ˆã£ã¦æ¸›ã‚‰ã•ã‚Œã¾ã—ãŸã€‚"
@@ -4875,6 +5118,7 @@ ER_SELECT_REDUCED 01000
swe "Select %u reducerades vid optimiering"
ukr "Select %u was ÑкаÑовано при оптимiзацii"
ER_TABLENAME_NOT_ALLOWED_HERE 42000
+ chi "表'%-.192s'从其中一个SELECT中ä¸èƒ½ç”¨äºŽ%-.32s"
eng "Table '%-.192s' from one of the SELECTs cannot be used in %-.32s"
ger "Tabelle '%-.192s', die in einem der SELECT-Befehle verwendet wurde, kann nicht in %-.32s verwendet werden"
jpn "特定ã®SELECTã®ã¿ã§ä½¿ç”¨ã®è¡¨ '%-.192s' 㯠%-.32s ã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。"
@@ -4883,6 +5127,7 @@ ER_TABLENAME_NOT_ALLOWED_HERE 42000
spa "Tabla '%-.192s' de uno de los SELECT no puede ser usada en %-.32s"
swe "Tabell '%-.192s' från en SELECT kan inte användas i %-.32s"
ER_NOT_SUPPORTED_AUTH_MODE 08004
+ chi "客户端ä¸æ”¯æŒæœåŠ¡å™¨è¯·æ±‚的身份验è¯åè®®;考虑å‡çº§MariaDB客户端"
eng "Client does not support authentication protocol requested by server; consider upgrading MariaDB client"
ger "Client unterstützt das vom Server erwartete Authentifizierungsprotokoll nicht. Bitte aktualisieren Sie Ihren MariaDB-Client"
jpn "クライアントã¯ã‚µãƒ¼ãƒãƒ¼ãŒè¦æ±‚ã™ã‚‹èªè¨¼ãƒ—ロトコルã«å¯¾å¿œã§ãã¾ã›ã‚“。MariaDBクライアントã®ã‚¢ãƒƒãƒ—グレードを検討ã—ã¦ãã ã•ã„。"
@@ -4891,6 +5136,7 @@ ER_NOT_SUPPORTED_AUTH_MODE 08004
spa "Cliente no soporta protocolo de autenticación solicitado por el servidor; considere actualizar el cliente MariaDB"
swe "Klienten stöder inte autentiseringsprotokollet som begärts av servern; överväg uppgradering av klientprogrammet"
ER_SPATIAL_CANT_HAVE_NULL 42000
+ chi "SPATIAL索引的所有部分必须ä¸ä¸ºnull"
eng "All parts of a SPATIAL index must be NOT NULL"
ger "Alle Teile eines SPATIAL-Index müssen als NOT NULL deklariert sein"
jpn "空間索引ã®ã‚­ãƒ¼åˆ—㯠NOT NULL ã§ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“。"
@@ -4899,6 +5145,7 @@ ER_SPATIAL_CANT_HAVE_NULL 42000
spa "Todas las partes de una SPATIAL index deben ser NOT NULL"
swe "Alla delar av en SPATIAL index måste vara NOT NULL"
ER_COLLATION_CHARSET_MISMATCH 42000
+ chi "COLLATION'%s'无效地用于字符集'%s'"
eng "COLLATION '%s' is not valid for CHARACTER SET '%s'"
ger "COLLATION '%s' ist für CHARACTER SET '%s' ungültig"
jpn "COLLATION '%s' 㯠CHARACTER SET '%s' ã«é©ç”¨ã§ãã¾ã›ã‚“。"
@@ -4907,6 +5154,7 @@ ER_COLLATION_CHARSET_MISMATCH 42000
spa "COLLATION '%s' no es válido para CHARACTER SET '%s'"
swe "COLLATION '%s' är inte tillåtet för CHARACTER SET '%s'"
ER_SLAVE_WAS_RUNNING
+ chi "Slaveå·²ç»åœ¨è¿è¡Œ"
eng "Slave is already running"
ger "Slave läuft bereits"
jpn "スレーブã¯ã™ã§ã«ç¨¼åƒä¸­ã§ã™ã€‚"
@@ -4915,6 +5163,7 @@ ER_SLAVE_WAS_RUNNING
spa "Slave ya está funcionando"
swe "Slaven har redan startat"
ER_SLAVE_WAS_NOT_RUNNING
+ chi "slaveå·²ç»åœæ­¢äº†"
eng "Slave already has been stopped"
ger "Slave wurde bereits angehalten"
jpn "スレーブã¯ã™ã§ã«åœæ­¢ã—ã¦ã„ã¾ã™ã€‚"
@@ -4923,6 +5172,7 @@ ER_SLAVE_WAS_NOT_RUNNING
spa "Slave ya fué parado"
swe "Slaven har redan stoppat"
ER_TOO_BIG_FOR_UNCOMPRESS
+ chi "未压缩的数æ®é‡å¤ªå¤§;最大é‡ä¸º%d(å¯èƒ½æœªåŽ‹ç¼©æ•°æ®çš„长度已æŸå)"
eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)"
ger "Unkomprimierte Daten sind zu groß. Die maximale Größe beträgt %d (wahrscheinlich wurde die Länge der unkomprimierten Daten beschädigt)"
jpn "展開後ã®ãƒ‡ãƒ¼ã‚¿ãŒå¤§ãã™ãŽã¾ã™ã€‚最大サイズ㯠%d ã§ã™ã€‚(展開後データã®é•·ã•æƒ…å ±ãŒå£Šã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚‚ã‚ã‚Šã¾ã™ã€‚)"
@@ -4930,6 +5180,7 @@ ER_TOO_BIG_FOR_UNCOMPRESS
por "Tamanho muito grande dos dados des comprimidos. O máximo tamanho é %d. (provavelmente, o comprimento dos dados descomprimidos está corrupto)"
spa "Tamaño demasiado grande para datos descomprimidos. El máximo tamaño es %d. (probablemente, extensión de datos descomprimidos fué corrompida)"
ER_ZLIB_Z_MEM_ERROR
+ chi "ZLIB:内存ä¸è¶³"
eng "ZLIB: Not enough memory"
ger "ZLIB: Nicht genug Speicher"
jpn "ZLIB: メモリä¸è¶³ã§ã™ã€‚"
@@ -4937,6 +5188,7 @@ ER_ZLIB_Z_MEM_ERROR
por "ZLIB: Não suficiente memória disponível"
spa "Z_MEM_ERROR: No suficiente memoria para zlib"
ER_ZLIB_Z_BUF_ERROR
+ chi "ZLIB:输出缓冲区中没有足够的空间(å¯èƒ½æœªåŽ‹ç¼©æ•°æ®çš„长度已æŸå)"
eng "ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)"
ger "ZLIB: Im Ausgabepuffer ist nicht genug Platz vorhanden (wahrscheinlich wurde die Länge der unkomprimierten Daten beschädigt)"
jpn "ZLIB: 出力ãƒãƒƒãƒ•ã‚¡ã«å分ãªç©ºããŒã‚ã‚Šã¾ã›ã‚“。(展開後データã®é•·ã•æƒ…å ±ãŒå£Šã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚‚ã‚ã‚Šã¾ã™ã€‚)"
@@ -4944,6 +5196,7 @@ ER_ZLIB_Z_BUF_ERROR
por "ZLIB: Não suficiente espaço no buffer emissor (provavelmente, o comprimento dos dados descomprimidos está corrupto)"
spa "Z_BUF_ERROR: No suficiente espacio en el búfer de salida para zlib (probablemente, extensión de datos descomprimidos fué corrompida)"
ER_ZLIB_Z_DATA_ERROR
+ chi "ZLIB:输入数æ®å·²æŸå"
eng "ZLIB: Input data corrupted"
ger "ZLIB: Eingabedaten beschädigt"
jpn "ZLIB: 入力データãŒå£Šã‚Œã¦ã„ã¾ã™ã€‚"
@@ -4951,8 +5204,10 @@ ER_ZLIB_Z_DATA_ERROR
por "ZLIB: Dados de entrada está corrupto"
spa "ZLIB: Dato de entrada fué corrompido para zlib"
ER_CUT_VALUE_GROUP_CONCAT
+ chi "group_concat()削å‡äº†è¡Œ%u."
eng "Row %u was cut by GROUP_CONCAT()"
ER_WARN_TOO_FEW_RECORDS 01000
+ chi "è¡Œ%luä¸åŒ…å«æ‰€æœ‰åˆ—çš„æ•°æ®"
eng "Row %lu doesn't contain data for all columns"
ger "Zeile %lu enthält nicht für alle Felder Daten"
jpn "è¡Œ %lu ã¯ã™ã¹ã¦ã®åˆ—ã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã¾ã›ã‚“。"
@@ -4960,6 +5215,7 @@ ER_WARN_TOO_FEW_RECORDS 01000
por "Conta de registro é menor que a conta de coluna na linha %lu"
spa "Línea %lu no contiene datos para todas las columnas"
ER_WARN_TOO_MANY_RECORDS 01000
+ chi "è¡Œ%lu被截断;它包å«çš„æ•°æ®æ¯”输入列更多"
eng "Row %lu was truncated; it contained more data than there were input columns"
ger "Zeile %lu gekürzt, die Zeile enthielt mehr Daten, als es Eingabefelder gibt"
jpn "è¡Œ %lu ã¯ãƒ‡ãƒ¼ã‚¿ã‚’切りæ¨ã¦ã‚‰ã‚Œã¾ã—ãŸã€‚列よりも多ã„データをå«ã‚“ã§ã„ã¾ã—ãŸã€‚"
@@ -4967,20 +5223,24 @@ ER_WARN_TOO_MANY_RECORDS 01000
por "Conta de registro é maior que a conta de coluna na linha %lu"
spa "Línea %lu fué truncada; La misma contine mas datos que las que existen en las columnas de entrada"
ER_WARN_NULL_TO_NOTNULL 22004
+ chi "列设置为默认值; NULL在行'%s'中æ供给了NOT NULL列%lu"
eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %lu"
ger "Feld auf Vorgabewert gesetzt, da NULL für NOT-NULL-Feld '%s' in Zeile %lu angegeben"
jpn "列ã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒè¨­å®šã•ã‚Œã¾ã—ãŸã€‚NOT NULLã®åˆ— '%s' ã« è¡Œ %lu 㧠NULL ãŒä¸Žãˆã‚‰ã‚Œã¾ã—ãŸã€‚"
por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %lu"
spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la línea %lu"
ER_WARN_DATA_OUT_OF_RANGE 22003
+ chi "列'%s'行%lu的值超出范围"
eng "Out of range value for column '%s' at row %lu"
WARN_DATA_TRUNCATED 01000
+ chi "æ•°æ®è¢«æˆªæ–­ï¼Œåœ¨åˆ—'%s', è¡Œ%lu"
eng "Data truncated for column '%s' at row %lu"
ger "Daten abgeschnitten für Feld '%s' in Zeile %lu"
jpn "列 '%s' ã® è¡Œ %lu ã§ãƒ‡ãƒ¼ã‚¿ãŒåˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã—ãŸã€‚"
por "Dado truncado para coluna '%s' na linha %lu"
spa "Datos truncados para columna '%s' en la línea %lu"
ER_WARN_USING_OTHER_HANDLER
+ chi "使用存储引擎%s 表格'%s'"
eng "Using storage engine %s for table '%s'"
ger "Speicher-Engine %s wird für Tabelle '%s' benutzt"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s का इसà¥à¤¤à¥‡à¤®à¤¾à¤² टेबल '%s' के लिठकिया जा रहा है"
@@ -4989,51 +5249,60 @@ ER_WARN_USING_OTHER_HANDLER
spa "Usando motor de almacenamiento %s para tabla '%s'"
swe "Använder handler %s för tabell '%s'"
ER_CANT_AGGREGATE_2COLLATIONS
+ chi "éžæ³•æ··åˆcollations(%s,%s)和(%s,%s),用于æ“作'%s'"
eng "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'"
ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s) und (%s, %s) für Operation '%s'"
jpn "ç…§åˆé †åº (%s,%s) 㨠(%s,%s) ã®æ··åœ¨ã¯æ“作 '%s' ã§ã¯ä¸æ­£ã§ã™ã€‚"
por "Combinação ilegal de collations (%s,%s) e (%s,%s) para operação '%s'"
spa "Ilegal mezcla de collations (%s,%s) y (%s,%s) para operación '%s'"
ER_DROP_USER
+ chi "无法删除一个或多个请求的用户"
eng "Cannot drop one or more of the requested users"
ger "Kann einen oder mehrere der angegebenen Benutzer nicht löschen"
ER_REVOKE_GRANTS
+ chi "无法为一个或多个请求的用户撤消所有æƒé™"
eng "Can't revoke all privileges for one or more of the requested users"
ger "Kann nicht alle Berechtigungen widerrufen, die für einen oder mehrere Benutzer gewährt wurden"
jpn "指定ã•ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰æŒ‡å®šã•ã‚ŒãŸå…¨ã¦ã®æ¨©é™ã‚’剥奪ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
por "Não pode revocar todos os privilégios, grant para um ou mais dos usuários pedidos"
spa "No puede revocar todos los privilegios, derecho para uno o mas de los usuarios solicitados"
ER_CANT_AGGREGATE_3COLLATIONS
+ chi "éžæ³•æ··åˆcollations(%s,%s),(%s,%s)和(%s,%s),用于æ“作'%s'"
eng "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'"
ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s), (%s, %s), (%s, %s) für Operation '%s'"
jpn "ç…§åˆé †åº (%s,%s), (%s,%s), (%s,%s) ã®æ··åœ¨ã¯æ“作 '%s' ã§ã¯ä¸æ­£ã§ã™ã€‚"
por "Ilegal combinação de collations (%s,%s), (%s,%s), (%s,%s) para operação '%s'"
spa "Ilegal mezcla de collations (%s,%s), (%s,%s), (%s,%s) para operación '%s'"
ER_CANT_AGGREGATE_NCOLLATIONS
+ chi "éžæ³•æ··åˆcollationsæ“作'%s'"
eng "Illegal mix of collations for operation '%s'"
ger "Unerlaubte Mischung von Sortierreihenfolgen für Operation '%s'"
jpn "æ“作 '%s' ã§ã¯ä¸æ­£ãªç…§åˆé †åºã®æ··åœ¨ã§ã™ã€‚"
por "Ilegal combinação de collations para operação '%s'"
spa "Ilegal mezcla de collations para operación '%s'"
ER_VARIABLE_IS_NOT_STRUCT
+ chi "å˜é‡'%-.64s'ä¸æ˜¯å¯å˜ç»„件(ä¸èƒ½ç”¨ä½œxxxx.variable_name)"
eng "Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)"
ger "Variable '%-.64s' ist keine Variablen-Komponente (kann nicht als XXXX.variablen_name verwendet werden)"
jpn "変数 '%-.64s' ã¯æ§‹é€ å¤‰æ•°ã®æ§‹æˆè¦ç´ ã§ã¯ã‚ã‚Šã¾ã›ã‚“。(XXXX.変数å ã¨ã„ã†æŒ‡å®šã¯ã§ãã¾ã›ã‚“。)"
por "Variável '%-.64s' não é uma variável componente (Não pode ser usada como XXXX.variável_nome)"
spa "Variable '%-.64s' no es una variable componente (No puede ser usada como XXXX.variable_name)"
ER_UNKNOWN_COLLATION
+ chi "未知的collation:'%-.64s'"
eng "Unknown collation: '%-.64s'"
ger "Unbekannte Sortierreihenfolge: '%-.64s'"
jpn "ä¸æ˜Žãªç…§åˆé †åº: '%-.64s'"
por "Collation desconhecida: '%-.64s'"
spa "Collation desconocida: '%-.64s'"
ER_SLAVE_IGNORED_SSL_PARAMS
+ chi "CHANGE MASTER中的SSLå‚数被忽略,因为此MariaDB从站未在没有SSL支æŒçš„情况下编译;如果å¯åŠ¨äº†SSLçš„MariaDB从站,则å¯ä»¥ä½¿ç”¨å®ƒä»¬"
eng "SSL parameters in CHANGE MASTER are ignored because this MariaDB slave was compiled without SSL support; they can be used later if MariaDB slave with SSL is started"
ger "SSL-Parameter in CHANGE MASTER werden ignoriert, weil dieser MariaDB-Slave ohne SSL-Unterstützung kompiliert wurde. Sie können aber später verwendet werden, wenn ein MariaDB-Slave mit SSL gestartet wird"
jpn "ã“ã®MariaDBスレーブã¯SSLサãƒãƒ¼ãƒˆã‚’å«ã‚ã¦ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¦ã„ãªã„ã®ã§ã€CHANGE MASTER ã®SSLパラメータã¯ç„¡è¦–ã•ã‚Œã¾ã—ãŸã€‚今後SSLサãƒãƒ¼ãƒˆã‚’æŒã¤MariaDBスレーブを起動ã™ã‚‹éš›ã«åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚"
por "SSL parâmetros em CHANGE MASTER são ignorados porque este escravo MariaDB foi compilado sem o SSL suporte. Os mesmos podem ser usados mais tarde quando o escravo MariaDB com SSL seja iniciado."
spa "Parametros SSL en CHANGE MASTER son ignorados porque este slave MariaDB fue compilado sin soporte SSL; pueden ser usados despues cuando el slave MariaDB con SSL sea inicializado"
ER_SERVER_IS_IN_SECURE_AUTH_MODE
+ chi "æœåŠ¡å™¨åœ¨--secure-auth模å¼ä¸‹è¿è¡Œï¼Œä½†'%s'@'%s'具有旧格å¼çš„密ç ;请将密ç æ›´æ”¹ä¸ºæ–°æ ¼å¼"
eng "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format"
ger "Server läuft im Modus --secure-auth, aber '%s'@'%s' hat ein Passwort im alten Format. Bitte Passwort ins neue Format ändern"
jpn "サーãƒãƒ¼ã¯ --secure-auth モードã§ç¨¼åƒã—ã¦ã„ã¾ã™ã€‚ã—ã‹ã— '%s'@'%s' ã¯å¤ã„å½¢å¼ã®ãƒ‘スワードを使用ã—ã¦ã„ã¾ã™ã€‚æ–°ã—ã„å½¢å¼ã®ãƒ‘スワードã«å¤‰æ›´ã—ã¦ãã ã•ã„。"
@@ -5041,6 +5310,7 @@ ER_SERVER_IS_IN_SECURE_AUTH_MODE
rus "Сервер запущен в режиме --secure-auth (безопаÑной авторизации), но Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ '%s'@'%s' пароль Ñохранён в Ñтаром формате; необходимо обновить формат паролÑ"
spa "Servidor está rodando en modo --secure-auth, pero '%s'@'%s' tiene clave en el antiguo formato; por favor cambie la clave para el nuevo formato"
ER_WARN_FIELD_RESOLVED
+ chi "列或å‚考'%-.192s%s%-.192s%s%-.192s' 在SELECT #%d 中, 在SELECT #%d中得到解决"
eng "Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d"
ger "Feld oder Verweis '%-.192s%s%-.192s%s%-.192s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelöst"
jpn "フィールドã¾ãŸã¯å‚ç…§ '%-.192s%s%-.192s%s%-.192s' 㯠SELECT #%d ã§ã¯ãªãã€SELECT #%d ã§è§£æ±ºã•ã‚Œã¾ã—ãŸã€‚"
@@ -5049,24 +5319,28 @@ ER_WARN_FIELD_RESOLVED
spa "Campo o referencia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d fue resolvido en SELECT #%d"
ukr "Стовбець або поÑÐ¸Ð»Ð°Ð½Ð½Ñ '%-.192s%s%-.192s%s%-.192s' із SELECTу #%d було знайдене у SELECTÑ– #%d"
ER_BAD_SLAVE_UNTIL_COND
+ chi "START SLAVE UNTILçš„å‚数或å‚数的组åˆä¸æ­£ç¡®"
eng "Incorrect parameter or combination of parameters for START SLAVE UNTIL"
ger "Falscher Parameter oder falsche Kombination von Parametern für START SLAVE UNTIL"
jpn "START SLAVE UNTIL ã¸ã®ãƒ‘ラメータã¾ãŸã¯ãã®çµ„ã¿åˆã‚ã›ãŒä¸æ­£ã§ã™ã€‚"
por "Parâmetro ou combinação de parâmetros errado para START SLAVE UNTIL"
spa "Parametro equivocado o combinación de parametros para START SLAVE UNTIL"
ER_MISSING_SKIP_SLAVE
+ chi "START SLAVE UNTIL进行é€æ­¥å¤åˆ¶æ—¶å»ºè®®ä½¿ç”¨--skip-slave-start;å¦åˆ™ï¼Œå¦‚果有æ„外的Slaveçš„MySQLDé‡å¯ï¼Œå¯èƒ½æœ‰é—®é¢˜"
eng "It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart"
ger "Es wird empfohlen, mit --skip-slave-start zu starten, wenn mit START SLAVE UNTIL eine Schritt-für-Schritt-Replikation ausgeführt wird. Ansonsten gibt es Probleme, wenn ein Slave-Server unerwartet neu startet"
jpn "START SLAVE UNTIL ã§æ®µéšŽçš„ã«ãƒ¬ãƒ—リケーションを行ã†éš›ã«ã¯ã€--skip-slave-start オプションを使ã†ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚使ã‚ãªã„å ´åˆã€ã‚¹ãƒ¬ãƒ¼ãƒ–ã®mysqldãŒä¸æ…®ã®å†èµ·å‹•ã‚’ã™ã‚‹ã¨å•é¡ŒãŒç™ºç”Ÿã—ã¾ã™ã€‚"
por "É recomendado para rodar com --skip-slave-start quando fazendo replicação passo-por-passo com START SLAVE UNTIL, de outra forma você não está seguro em caso de inesperada reinicialição do mysqld escravo"
spa "Es recomendado rodar con --skip-slave-start cuando haciendo replicación step-by-step con START SLAVE UNTIL, a menos que usted no esté seguro en caso de inesperada reinicialización del mysqld slave"
ER_UNTIL_COND_IGNORED
+ chi "ä¸èƒ½å¯åŠ¨SQL线程所以UNTIL选项被忽略"
eng "SQL thread is not to be started so UNTIL options are ignored"
ger "SQL-Thread soll nicht gestartet werden. Daher werden UNTIL-Optionen ignoriert"
jpn "スレーブSQLスレッドãŒé–‹å§‹ã•ã‚Œãªã„ãŸã‚ã€UNTILオプションã¯ç„¡è¦–ã•ã‚Œã¾ã—ãŸã€‚"
por "Thread SQL não pode ser inicializado tal que opções UNTIL são ignoradas"
spa "SQL thread no es inicializado tal que opciones UNTIL son ignoradas"
ER_WRONG_NAME_FOR_INDEX 42000
+ chi "索引å称'%-.100s'ä¸æ­£ç¡®"
eng "Incorrect index name '%-.100s'"
ger "Falscher Indexname '%-.100s'"
jpn "索引å '%-.100s' ã¯ä¸æ­£ã§ã™ã€‚"
@@ -5074,6 +5348,7 @@ ER_WRONG_NAME_FOR_INDEX 42000
spa "Nombre de índice incorrecto '%-.100s'"
swe "Felaktigt index namn '%-.100s'"
ER_WRONG_NAME_FOR_CATALOG 42000
+ chi "目录å称'%-.100s'ä¸æ­£ç¡®"
eng "Incorrect catalog name '%-.100s'"
ger "Falscher Katalogname '%-.100s'"
jpn "カタログå '%-.100s' ã¯ä¸æ­£ã§ã™ã€‚"
@@ -5081,6 +5356,7 @@ ER_WRONG_NAME_FOR_CATALOG 42000
spa "Nombre de catalog incorrecto '%-.100s'"
swe "Felaktigt katalog namn '%-.100s'"
ER_WARN_QC_RESIZE
+ chi "设置查询缓存值%llu失败;新查询缓存值为%lu"
eng "Query cache failed to set size %llu; new query cache size is %lu"
ger "Änderung der Query-Cache-Größe auf %llu fehlgeschlagen; neue Query-Cache-Größe ist %lu"
por "Falha em Query cache para configurar tamanho %llu, novo tamanho de query cache é %lu"
@@ -5089,6 +5365,7 @@ ER_WARN_QC_RESIZE
swe "Storleken av "Query cache" kunde inte sättas till %llu, ny storlek är %lu"
ukr "Кеш запитів неÑпроможен вÑтановити розмір %llu, новий розмір кеша запитів - %lu"
ER_BAD_FT_COLUMN
+ chi "列'%-.192s'ä¸èƒ½æˆä¸ºå…¨æ–‡ç´¢å¼•çš„一部分"
eng "Column '%-.192s' cannot be part of FULLTEXT index"
ger "Feld '%-.192s' kann nicht Teil eines FULLTEXT-Index sein"
jpn "列 '%-.192s' ã¯å…¨æ–‡ç´¢å¼•ã®ã‚­ãƒ¼ã«ã¯ã§ãã¾ã›ã‚“。"
@@ -5096,6 +5373,7 @@ ER_BAD_FT_COLUMN
spa "Columna '%-.192s' no puede ser parte de FULLTEXT index"
swe "Kolumn '%-.192s' kan inte vara del av ett FULLTEXT index"
ER_UNKNOWN_KEY_CACHE
+ chi "未知索引缓存'%-.100s'"
eng "Unknown key cache '%-.100s'"
ger "Unbekannter Schlüssel-Cache '%-.100s'"
jpn "'%-.100s' ã¯ä¸æ˜Žãªã‚­ãƒ¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã§ã™ã€‚"
@@ -5103,12 +5381,14 @@ ER_UNKNOWN_KEY_CACHE
spa "Desconocida key cache '%-.100s'"
swe "Okänd nyckel cache '%-.100s'"
ER_WARN_HOSTNAME_WONT_WORK
+ chi "MariaDB以-skip-name-resolve模å¼å¯åŠ¨;想用grant,您必须é‡æ–°å¯åŠ¨ï¼Œä¸ç”¨è¿™ä¸ªé€‰é¡¹"
eng "MariaDB is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work"
ger "MariaDB wurde mit --skip-name-resolve gestartet. Diese Option darf nicht verwendet werden, damit diese Rechtevergabe möglich ist"
jpn "MariaDB㯠--skip-name-resolve モードã§èµ·å‹•ã—ã¦ã„ã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションを外ã—ã¦å†èµ·å‹•ã—ãªã‘ã‚Œã°ã€ã“ã®æ¨©é™æ“作ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。"
por "MariaDB foi inicializado em modo --skip-name-resolve. Você necesita reincializá-lo sem esta opção para este grant funcionar"
spa "MariaDB esta inicializado en modo --skip-name-resolve. Usted necesita reinicializarlo sin esta opción para este derecho funcionar"
ER_UNKNOWN_STORAGE_ENGINE 42000
+ chi "未知的存储引擎'%s'"
eng "Unknown storage engine '%s'"
ger "Unbekannte Speicher-Engine '%s'"
hindi "अजà¥à¤žà¤¾à¤¤ सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन '%s'"
@@ -5116,12 +5396,14 @@ ER_UNKNOWN_STORAGE_ENGINE 42000
por "Motor de tabela desconhecido '%s'"
spa "Desconocido motor de tabla '%s'"
ER_WARN_DEPRECATED_SYNTAX
+ chi "弃用'%s',将在将æ¥çš„版本中删除。请使用%s"
eng "'%s' is deprecated and will be removed in a future release. Please use %s instead"
ger "'%s' ist veraltet. Bitte benutzen Sie '%s'"
jpn "'%s' ã¯å°†æ¥ã®ãƒªãƒªãƒ¼ã‚¹ã§å»ƒæ­¢äºˆå®šã§ã™ã€‚代ã‚ã‚Šã« %s を使用ã—ã¦ãã ã•ã„。"
por "'%s' é desatualizado. Use '%s' em seu lugar"
spa "'%s' está desaprobado, use '%s' en su lugar"
ER_NON_UPDATABLE_TABLE
+ chi "目标表%-.100s多个%sä¸å¯æ›´æ–°"
eng "The target table %-.100s of the %s is not updatable"
ger "Die Zieltabelle %-.100s von %s ist nicht aktualisierbar"
jpn "対象表 %-.100s ã¯æ›´æ–°å¯èƒ½ã§ã¯ãªã„ã®ã§ã€%s ã‚’è¡Œãˆã¾ã›ã‚“。"
@@ -5131,6 +5413,7 @@ ER_NON_UPDATABLE_TABLE
swe "Tabell %-.100s använd med '%s' är inte uppdateringsbar"
ukr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ %-.100s у %s не може оновлюватиÑÑŒ"
ER_FEATURE_DISABLED
+ chi "'%s'功能被ç¦ç”¨;您需è¦MariaDB以'%s'构建以使其工作"
eng "The '%s' feature is disabled; you need MariaDB built with '%s' to have it working"
ger "Das Feature '%s' ist ausgeschaltet, Sie müssen MariaDB mit '%s' übersetzen, damit es verfügbar ist"
jpn "機能 '%s' ã¯ç„¡åŠ¹ã§ã™ã€‚利用ã™ã‚‹ãŸã‚ã«ã¯ '%s' ã‚’å«ã‚ã¦ãƒ“ルドã—ãŸMariaDBãŒå¿…è¦ã§ã™ã€‚"
@@ -5138,6 +5421,7 @@ ER_FEATURE_DISABLED
spa "El recurso '%s' fue deshabilitado; usted necesita construir MariaDB con '%s' para tener eso funcionando"
swe "'%s' är inte aktiverad; För att aktivera detta måste du bygga om MariaDB med '%s' definierad"
ER_OPTION_PREVENTS_STATEMENT
+ chi "MariaDBæœåŠ¡å™¨ä½¿ç”¨%s选项è¿è¡Œï¼Œå› æ­¤æ— æ³•æ‰§è¡Œæ­¤è¯­å¥"
eng "The MariaDB server is running with the %s option so it cannot execute this statement"
ger "Der MariaDB-Server läuft mit der Option %s und kann diese Anweisung deswegen nicht ausführen"
jpn "MariaDBサーãƒãƒ¼ãŒ %s オプションã§å®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹ã®ã§ã€ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯å®Ÿè¡Œã§ãã¾ã›ã‚“。"
@@ -5145,33 +5429,39 @@ ER_OPTION_PREVENTS_STATEMENT
spa "El servidor MariaDB está rodando con la opción %s tal que no puede ejecutar este comando"
swe "MariaDB är startad med %s. Pga av detta kan du inte använda detta kommando"
ER_DUPLICATED_VALUE_IN_TYPE
+ chi "列'%-.100s'有é‡å¤çš„值'%-.64s'在%s"
eng "Column '%-.100s' has duplicated value '%-.64s' in %s"
ger "Feld '%-.100s' hat doppelten Wert '%-.64s' in %s"
jpn "列 '%-.100s' ã§ã€é‡è¤‡ã™ã‚‹å€¤ '%-.64s' ㌠%s ã«æŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚"
por "Coluna '%-.100s' tem valor duplicado '%-.64s' em %s"
spa "Columna '%-.100s' tiene valor doblado '%-.64s' en %s"
ER_TRUNCATED_WRONG_VALUE 22007
+ chi "截断的ä¸æ­£ç¡®%-.32T值:'%-.128T'"
eng "Truncated incorrect %-.32T value: '%-.128T'"
ger "Falscher %-.32T-Wert gekürzt: '%-.128T'"
jpn "ä¸æ­£ãª %-.32T ã®å€¤ãŒåˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã—ãŸã€‚: '%-.128T'"
por "Truncado errado %-.32T valor: '%-.128T'"
spa "Equivocado truncado %-.32T valor: '%-.128T'"
ER_TOO_MUCH_AUTO_TIMESTAMP_COLS
+ chi "表定义ä¸æ­£ç¡®;默认或ON UPDATE中åªèƒ½æœ‰ä¸€ä¸ªå¸¦æœ‰CURRENT_TIMESTAMPçš„TIMESTAMP列"
eng "Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause"
ger "Fehlerhafte Tabellendefinition. Es kann nur eine einzige TIMESTAMP-Spalte mit CURRENT_TIMESTAMP als DEFAULT oder in einer ON-UPDATE-Klausel geben"
jpn "ä¸æ­£ãªè¡¨å®šç¾©ã§ã™ã€‚DEFAULTå¥ã¾ãŸã¯ON UPDATEå¥ã« CURRENT_TIMESTAMP ã‚’ã¨ã‚‚ãªã†TIMESTAMPåž‹ã®åˆ—ã¯1ã¤ã¾ã§ã§ã™ã€‚"
por "Incorreta definição de tabela; Pode ter somente uma coluna TIMESTAMP com CURRENT_TIMESTAMP em DEFAULT ou ON UPDATE cláusula"
spa "Incorrecta definición de tabla; Solamente debe haber una columna TIMESTAMP con CURRENT_TIMESTAMP en DEFAULT o ON UPDATE cláusula"
ER_INVALID_ON_UPDATE
+ chi "在'%-.192s'列的ON UPDATEå­å¥ä¸Šæ— æ•ˆ"
eng "Invalid ON UPDATE clause for '%-.192s' column"
ger "Ungültige ON-UPDATE-Klausel für Spalte '%-.192s'"
jpn "列 '%-.192s' ã« ON UPDATEå¥ã¯ç„¡åŠ¹ã§ã™ã€‚"
por "Inválida cláusula ON UPDATE para campo '%-.192s'"
spa "Inválido ON UPDATE cláusula para campo '%-.192s'"
ER_UNSUPPORTED_PS
+ chi "尚未在prepared statementå议中支æŒæ­¤å‘½ä»¤"
eng "This command is not supported in the prepared statement protocol yet"
ger "Dieser Befehl wird im Protokoll für vorbereitete Anweisungen noch nicht unterstützt"
ER_GET_ERRMSG
+ chi "出错%d '%-.200s'æ¥è‡ª%s"
dan "Modtog fejl %d '%-.200s' fra %s"
eng "Got error %d '%-.200s' from %s"
ger "Fehler %d '%-.200s' von %s"
@@ -5179,195 +5469,248 @@ ER_GET_ERRMSG
nor "Mottok feil %d '%-.200s' fa %s"
norwegian-ny "Mottok feil %d '%-.200s' fra %s"
ER_GET_TEMPORARY_ERRMSG
+ chi "出临时错误%d '%-.200s'æ¥è‡ª%s"
dan "Modtog temporary fejl %d '%-.200s' fra %s"
eng "Got temporary error %d '%-.200s' from %s"
- jpn "一時エラー %d '%-.200s' ㌠%s ã‹ã‚‰è¿”ã•ã‚Œã¾ã—ãŸã€‚"
ger "Temporärer Fehler %d '%-.200s' von %s"
+ jpn "一時エラー %d '%-.200s' ㌠%s ã‹ã‚‰è¿”ã•ã‚Œã¾ã—ãŸã€‚"
nor "Mottok temporary feil %d '%-.200s' fra %s"
norwegian-ny "Mottok temporary feil %d '%-.200s' fra %s"
ER_UNKNOWN_TIME_ZONE
+ chi "未知或ä¸æ­£ç¡®çš„时区:'%-.64s'"
eng "Unknown or incorrect time zone: '%-.64s'"
ger "Unbekannte oder falsche Zeitzone: '%-.64s'"
ER_WARN_INVALID_TIMESTAMP
+ chi "无效TIMESTAMP值:列'%s' 行'%lu'"
eng "Invalid TIMESTAMP value in column '%s' at row %lu"
ger "Ungültiger TIMESTAMP-Wert in Feld '%s', Zeile %lu"
ER_INVALID_CHARACTER_STRING
+ chi "无效的%s字符串:'%.64T'"
eng "Invalid %s character string: '%.64T'"
ger "Ungültiger %s-Zeichen-String: '%.64T'"
ER_WARN_ALLOWED_PACKET_OVERFLOWED
+ chi "%s()的结果大于max_allowed_packet(%ld) - 截断"
eng "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
ger "Ergebnis von %s() war größer als max_allowed_packet (%ld) Bytes und wurde deshalb gekürzt"
ER_CONFLICTING_DECLARATIONS
+ chi "矛盾语å¥ï¼š'%s%s'å’Œ'%s%s'"
eng "Conflicting declarations: '%s%s' and '%s%s'"
ger "Widersprüchliche Deklarationen: '%s%s' und '%s%s'"
ER_SP_NO_RECURSIVE_CREATE 2F003
+ chi "无法从å¦ä¸€ä¸ªå­˜å‚¨è¿‡ç¨‹ä¸­åˆ›å»º%s"
eng "Can't create a %s from within another stored routine"
ger "Kann kein %s innerhalb einer anderen gespeicherten Routine erzeugen"
ER_SP_ALREADY_EXISTS 42000
+ chi "%s%så·²ç»å­˜åœ¨"
eng "%s %s already exists"
ger "%s %s existiert bereits"
hindi "%s %s पहले से ही मौजूद है"
ER_SP_DOES_NOT_EXIST 42000
+ chi "%s%sä¸å­˜åœ¨"
eng "%s %s does not exist"
ger "%s %s existiert nicht"
hindi "%s %s मौजूद नहीं है"
ER_SP_DROP_FAILED
+ chi "未能DROP%s%s"
eng "Failed to DROP %s %s"
ger "DROP %s %s ist fehlgeschlagen"
hindi "%s %s को डà¥à¤°à¥‰à¤ª करने में असफल रहे"
ER_SP_STORE_FAILED
+ chi "无法创建%s%s"
eng "Failed to CREATE %s %s"
ger "CREATE %s %s ist fehlgeschlagen"
hindi "%s %s को बनाने में असफल रहे"
ER_SP_LILABEL_MISMATCH 42000
+ chi "%s,没有匹é…标签:%s"
eng "%s with no matching label: %s"
ger "%s ohne passende Marke: %s"
ER_SP_LABEL_REDEFINE 42000
+ chi "é‡æ–°å®šä¹‰æ ‡ç­¾%s"
eng "Redefining label %s"
ger "Neudefinition der Marke %s"
ER_SP_LABEL_MISMATCH 42000
+ chi "没有匹é…的最终标签%s"
eng "End-label %s without match"
ger "Ende-Marke %s ohne zugehörigen Anfang"
ER_SP_UNINIT_VAR 01000
+ chi "å‚考未åˆå§‹åŒ–çš„å˜é‡%s"
eng "Referring to uninitialized variable %s"
ger "Zugriff auf nichtinitialisierte Variable %s"
ER_SP_BADSELECT 0A000
+ chi "PROCEDURE%sä¸èƒ½è¿”回给定上下文中的结果集"
eng "PROCEDURE %s can't return a result set in the given context"
ger "PROCEDURE %s kann im gegebenen Kontext keine Ergebnismenge zurückgeben"
ER_SP_BADRETURN 42000
+ chi "RETURNä»…å…许在函数中"
eng "RETURN is only allowed in a FUNCTION"
ger "RETURN ist nur innerhalb einer FUNCTION erlaubt"
hindi "RETURN को केवल FUNCTION में इसà¥à¤¤à¥‡à¤®à¤¾à¤² किया जा सकता है"
ER_SP_BADSTATEMENT 0A000
+ chi "%sä¸å…许在存储过程中"
eng "%s is not allowed in stored procedures"
ger "%s ist in gespeicherten Prozeduren nicht erlaubt"
hindi "%s को STORED PROCEDURE में इसà¥à¤¤à¥‡à¤®à¤¾à¤² नहीं किया जा सकता है"
ER_UPDATE_LOG_DEPRECATED_IGNORED 42000
+ chi "更新日志被弃用并由二进制日志替æ¢;SET SQL_LOG_UPDATE已被忽略。此选项将在MariaDB 5.6中删除"
eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MariaDB 5.6"
ger "Das Update-Log ist veraltet und wurde durch das Binär-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert. Diese Option wird in MariaDB 5.6 entfernt"
ER_UPDATE_LOG_DEPRECATED_TRANSLATED 42000
+ chi "更新日志被弃用并由二进制日志替æ¢;SET SQL_LOG_UPDATE已被转æ¢ä¸ºè®¾ç½®SQL_LOG_BIN。此选项将在MariaDB 5.6中删除"
eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN. This option will be removed in MariaDB 5.6"
ger "Das Update-Log ist veraltet und wurde durch das Binär-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN übersetzt. Diese Option wird in MariaDB 5.6 entfernt"
ER_QUERY_INTERRUPTED 70100
+ chi "查询执行中断"
eng "Query execution was interrupted"
ger "Ausführung der Abfrage wurde unterbrochen"
ER_SP_WRONG_NO_OF_ARGS 42000
+ chi "%s%sçš„å‚æ•°æ•°é‡ä¸æ­£ç¡®;预期%u,得到%u"
eng "Incorrect number of arguments for %s %s; expected %u, got %u"
ger "Falsche Anzahl von Argumenten für %s %s; erwarte %u, erhalte %u"
ER_SP_COND_MISMATCH 42000
+ chi "未定义的CONDITION:%s"
eng "Undefined CONDITION: %s"
ger "Undefinierte CONDITION: %s"
ER_SP_NORETURN 42000
+ chi "FUNCTION%s中没有RETURN"
eng "No RETURN found in FUNCTION %s"
ger "Kein RETURN in FUNCTION %s gefunden"
hindi "FUNCTION %s में कोई RETURN है"
ER_SP_NORETURNEND 2F005
+ chi "FUNCTION%s结æŸä½†æ— RETURN"
eng "FUNCTION %s ended without RETURN"
ger "FUNCTION %s endete ohne RETURN"
hindi "FUNCTION %s RETURN के बिना समापà¥à¤¤ हो गया"
ER_SP_BAD_CURSOR_QUERY 42000
+ chi "Cursor语å¥å¿…须是选择"
eng "Cursor statement must be a SELECT"
ger "Cursor-Anweisung muss ein SELECT sein"
ER_SP_BAD_CURSOR_SELECT 42000
+ chi "Cursor SELECTä¸èƒ½æœ‰INTO"
eng "Cursor SELECT must not have INTO"
ger "Cursor-SELECT darf kein INTO haben"
ER_SP_CURSOR_MISMATCH 42000
+ chi "未定义的CURSOR:%s"
eng "Undefined CURSOR: %s"
ger "Undefinierter CURSOR: %s"
hindi "CURSOR %s अपरिभाषित है"
ER_SP_CURSOR_ALREADY_OPEN 24000
+ chi "Cursorå·²ç»æ‰“å¼€"
eng "Cursor is already open"
ger "Cursor ist schon geöffnet"
hindi "CURSOR पहले से ही खà¥à¤²à¤¾ है"
ER_SP_CURSOR_NOT_OPEN 24000
+ chi "Cursor未打开"
eng "Cursor is not open"
ger "Cursor ist nicht geöffnet"
ER_SP_UNDECLARED_VAR 42000
+ chi "未定义的å˜é‡ï¼š%s"
eng "Undeclared variable: %s"
ger "Nicht deklarierte Variable: %s"
ER_SP_WRONG_NO_OF_FETCH_ARGS
+ chi "FETCHå˜é‡æ•°ä¸æ­£ç¡®"
eng "Incorrect number of FETCH variables"
ger "Falsche Anzahl von FETCH-Variablen"
ER_SP_FETCH_NO_DATA 02000
+ chi "æ²¡æœ‰æ•°æ® - 零行被选择或处ç†"
eng "No data - zero rows fetched, selected, or processed"
ger "Keine Daten - null Zeilen geholt (fetch), ausgewählt oder verarbeitet"
ER_SP_DUP_PARAM 42000
+ chi "é‡å¤å‚数:%s"
eng "Duplicate parameter: %s"
ger "Doppelter Parameter: %s"
ER_SP_DUP_VAR 42000
+ chi "é‡å¤å˜é‡ï¼š%s"
eng "Duplicate variable: %s"
ger "Doppelte Variable: %s"
ER_SP_DUP_COND 42000
+ chi "é‡å¤æ¡ä»¶ï¼š%s"
eng "Duplicate condition: %s"
ger "Doppelte Bedingung: %s"
ER_SP_DUP_CURS 42000
+ chi "é‡å¤Cursor:%s"
eng "Duplicate cursor: %s"
ger "Doppelter Cursor: %s"
ER_SP_CANT_ALTER
+ chi "未能ALTER %s%s"
eng "Failed to ALTER %s %s"
ger "ALTER %s %s fehlgeschlagen"
hindi "%s %s को ALTER करने में असफल रहे"
ER_SP_SUBSELECT_NYI 0A000
+ chi "ä¸æ”¯æŒå­æŸ¥è¯¢å€¼"
eng "Subquery value not supported"
ger "Subquery-Wert wird nicht unterstützt"
ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 0A000
+ chi "在存储的函数或触å‘中ä¸å…许%s"
eng "%s is not allowed in stored function or trigger"
ger "%s ist in gespeicherten Funktionen und in Triggern nicht erlaubt"
ER_SP_VARCOND_AFTER_CURSHNDLR 42000
+ chi "å˜é‡æˆ–æ¡ä»¶å£°æ˜Žåœ¨cursor或处ç†ç¨‹åºå®šä¹‰ä¹‹åŽ"
eng "Variable or condition declaration after cursor or handler declaration"
ger "Deklaration einer Variablen oder einer Bedingung nach der Deklaration eines Cursors oder eines Handlers"
ER_SP_CURSOR_AFTER_HANDLER 42000
+ chi "处ç†ç¨‹åºå£°æ˜ŽåŽçš„cursor声明"
eng "Cursor declaration after handler declaration"
ger "Deklaration eines Cursors nach der Deklaration eines Handlers"
ER_SP_CASE_NOT_FOUND 20000
+ chi "未能在CASE语å¥æ‰¾åˆ°Case"
eng "Case not found for CASE statement"
ger "Fall für CASE-Anweisung nicht gefunden"
ER_FPARSER_TOO_BIG_FILE
+ chi "é…置文件'%-.192s'太大了"
eng "Configuration file '%-.192s' is too big"
ger "Konfigurationsdatei '%-.192s' ist zu groß"
rus "Слишком большой конфигурационный файл '%-.192s'"
ukr "Занадто великий конфігураційний файл '%-.192s'"
ER_FPARSER_BAD_HEADER
+ chi "文件'%-.192s'中的文件类型格å¼æœ‰é—®é¢˜"
eng "Malformed file type header in file '%-.192s'"
ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.192s'"
rus "Ðеверный заголовок типа файла '%-.192s'"
ukr "Ðевірний заголовок типу у файлі '%-.192s'"
ER_FPARSER_EOF_IN_COMMENT
+ chi "解æžè¯„论'%-.200s'æ—¶æ„外碰到EOF"
eng "Unexpected end of file while parsing comment '%-.200s'"
ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.200s'"
rus "Ðеожиданный конец файла в коментарии '%-.200s'"
ukr "ÐеÑподіванний кінець файлу у коментарі '%-.200s'"
ER_FPARSER_ERROR_IN_PARAMETER
+ chi "解æžå‚æ•°'%-.192s'时出错(行:'%-.192s')"
eng "Error while parsing parameter '%-.192s' (line: '%-.192s')"
ger "Fehler beim Parsen des Parameters '%-.192s' (Zeile: '%-.192s')"
rus "Ошибка при раÑпознавании параметра '%-.192s' (Ñтрока: '%-.192s')"
ukr "Помилка в роÑпізнаванні параметру '%-.192s' (Ñ€Ñдок: '%-.192s')"
ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER
+ chi "跳过未知å‚æ•°'%-.192s'æ—¶æ„外碰到EOF"
eng "Unexpected end of file while skipping unknown parameter '%-.192s'"
ger "Unerwartetes Dateiende beim Ãœberspringen des unbekannten Parameters '%-.192s'"
rus "Ðеожиданный конец файла при пропуÑке неизвеÑтного параметра '%-.192s'"
ukr "ÐеÑподіванний кінець файлу у Ñпробі проминути невідомий параметр '%-.192s'"
ER_VIEW_NO_EXPLAIN
+ chi "ANALYZE/EXPLAIN/SHOW无法进行;缺ä¹åº•å±‚表的特æƒ"
eng "ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table"
ger "ANALYZE/EXPLAIN/SHOW kann nicht verlangt werden. Rechte für zugrunde liegende Tabelle fehlen"
rus "ANALYZE/EXPLAIN/SHOW не может быть выполнено; недоÑтаточно прав на таблицы запроÑа"
ukr "ANALYZE/EXPLAIN/SHOW не може бути виконано; немає прав на таблиці запиту"
ER_FRM_UNKNOWN_TYPE
+ chi "文件'%-.192s'在其标题中有未知的'%-.64s'"
eng "File '%-.192s' has unknown type '%-.64s' in its header"
ger "Datei '%-.192s' hat unbekannten Typ '%-.64s' im Header"
rus "Файл '%-.192s' Ñодержит неизвеÑтный тип '%-.64s' в заголовке"
ukr "Файл '%-.192s' має невідомий тип '%-.64s' у заголовку"
ER_WRONG_OBJECT
+ chi "'%-.192s.%-.192s'ä¸æ˜¯'%s'ç±»"
eng "'%-.192s.%-.192s' is not of type '%s'"
ger "'%-.192s.%-.192s' ist nicht %s"
rus "'%-.192s.%-.192s' - не %s"
ukr "'%-.192s.%-.192s' не є %s"
ER_NONUPDATEABLE_COLUMN
+ chi "列'%-.192s'ä¸å¯æ›´æ–°"
eng "Column '%-.192s' is not updatable"
ger "Feld '%-.192s' ist nicht aktualisierbar"
rus "Столбец '%-.192s' не обновлÑемый"
ukr "Стовбець '%-.192s' не може бути зминений"
ER_VIEW_SELECT_DERIVED
+ chi "Viewçš„Selectçš„FROM包å«å­æŸ¥è¯¢"
eng "View's SELECT contains a subquery in the FROM clause"
ger "SELECT der View enthält eine Subquery in der FROM-Klausel"
rus "View SELECT Ñодержит Ð¿Ð¾Ð´Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð² конÑтрукции FROM"
@@ -5375,809 +5718,1046 @@ ER_VIEW_SELECT_DERIVED
# Not used any more, syntax error is returned instead
ER_VIEW_SELECT_CLAUSE
+ chi "Viewçš„Select包å«â€œ%sâ€å­å¥"
eng "View's SELECT contains a '%s' clause"
ger "SELECT der View enthält eine '%s'-Klausel"
rus "View SELECT Ñодержит конÑтрукцию '%s'"
ukr "View SELECT має конÑтрукцію '%s'"
ER_VIEW_SELECT_VARIABLE
+ chi "View的选择包å«å˜é‡æˆ–å‚æ•°"
eng "View's SELECT contains a variable or parameter"
ger "SELECT der View enthält eine Variable oder einen Parameter"
rus "View SELECT Ñодержит переменную или параметр"
ukr "View SELECT має зминну або параметер"
ER_VIEW_SELECT_TMPTABLE
+ chi "View的SELECT指的是临时表'%-.192s'"
eng "View's SELECT refers to a temporary table '%-.192s'"
ger "SELECT der View verweist auf eine temporäre Tabelle '%-.192s'"
rus "View SELECT Ñодержит ÑÑылку на временную таблицу '%-.192s'"
ukr "View SELECT викориÑтовує тимчаÑову таблицю '%-.192s'"
ER_VIEW_WRONG_LIST
+ chi "View的选择和VIEW的字段列表具有ä¸åŒçš„列计数"
eng "View's SELECT and view's field list have different column counts"
ger "SELECT- und Feldliste der Views haben unterschiedliche Anzahlen von Spalten"
rus "View SELECT и ÑпиÑок полей view имеют разное количеÑтво Ñтолбцов"
ukr "View SELECT Ñ– перелік Ñтовбців view мають різну кількіÑÑ‚ÑŒ Ñковбців"
ER_WARN_VIEW_MERGE
+ chi "Viewåˆå¹¶ç®—法目å‰ä¸èƒ½ä½¿ç”¨ï¼ˆå‡è®¾æœªå®šä¹‰çš„算法)"
eng "View merge algorithm can't be used here for now (assumed undefined algorithm)"
ger "View-Merge-Algorithmus kann hier momentan nicht verwendet werden (undefinierter Algorithmus wird angenommen)"
rus "Ðлгоритм ÑлиÑÐ½Ð¸Ñ view не может быть иÑпользован ÑÐµÐ¹Ñ‡Ð°Ñ (алгоритм будет неопеределенным)"
ukr "Ðлгоритм Ð·Ð»Ð¸Ð²Ð°Ð½Ð½Ñ view не може бути викориÑтаний зараз (алгоритм буде невизначений)"
ER_WARN_VIEW_WITHOUT_KEY
+ chi "更新的视图没有底层表的完整键"
eng "View being updated does not have complete key of underlying table in it"
ger "Die aktualisierte View enthält nicht den vollständigen Schlüssel der zugrunde liegenden Tabelle"
rus "ОбновлÑемый view не Ñодержит ключа иÑпользованных(ой) в нем таблиц(Ñ‹)"
ukr "View, що оновлюетьÑÑ, не міÑтить повного ключа таблиці(ÑŒ), що викоріÑтана в ньюому"
ER_VIEW_INVALID
+ chi "View'%-.192s.%-.192s'引用无效的表ã€åˆ—ã€å‡½æ•°ã€æˆ–者函数或View缺ä¹ä½¿ç”¨æƒ"
eng "View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them"
ER_SP_NO_DROP_SP
+ chi "无法从å¦ä¸€ä¸ªå­˜å‚¨çš„例程中删除或更改%s"
eng "Can't drop or alter a %s from within another stored routine"
ger "Kann eine %s nicht von innerhalb einer anderen gespeicherten Routine löschen oder ändern"
ER_SP_GOTO_IN_HNDLR
+ chi "在存储过程处ç†ç¨‹åºä¸­ä¸å…许GOTO"
eng "GOTO is not allowed in a stored procedure handler"
ger "GOTO ist im Handler einer gespeicherten Prozedur nicht erlaubt"
ER_TRG_ALREADY_EXISTS
+ chi "触å‘'%s'å·²ç»å­˜åœ¨"
eng "Trigger '%s' already exists"
ger "Trigger '%s' existiert bereits"
hindi "TRIGGER '%s' पहले से मौजूद है"
ER_TRG_DOES_NOT_EXIST
+ chi "触å‘ä¸å­˜åœ¨"
eng "Trigger does not exist"
ger "Trigger existiert nicht"
hindi "TRIGGER मौजूद नहीं है"
ER_TRG_ON_VIEW_OR_TEMP_TABLE
- eng "Trigger's '%-.192s' is view or temporary table"
+ chi "触å‘器的'%-.192s'是视图或临时表"
+ eng "Trigger's '%-.192s' is view, temporary table or sequence"
+ hindi "'%-.192s' à¤à¤• वà¥à¤¯à¥‚, टेमà¥à¤ªà¤°à¤°à¥€ टेबल या सीकà¥à¤µà¥‡à¤‚स है"
ger "'%-.192s' des Triggers ist View oder temporäre Tabelle"
ER_TRG_CANT_CHANGE_ROW
+ chi "æ›´æ–°%s行在%s触å‘器中ä¸å…许"
eng "Updating of %s row is not allowed in %strigger"
ger "Aktualisieren einer %s-Zeile ist in einem %s-Trigger nicht erlaubt"
ER_TRG_NO_SUCH_ROW_IN_TRG
+ chi "没有%s行,触å‘%s"
eng "There is no %s row in %s trigger"
ger "Es gibt keine %s-Zeile im %s-Trigger"
ER_NO_DEFAULT_FOR_FIELD
+ chi "字段'%-.192s'没有默认值"
eng "Field '%-.192s' doesn't have a default value"
ger "Feld '%-.192s' hat keinen Vorgabewert"
ER_DIVISION_BY_ZERO 22012
+ chi "除0错误"
eng "Division by 0"
ger "Division durch 0"
hindi "0 से विभाजन"
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 22007
+ chi "ä¸æ­£ç¡®çš„%-.32s值:'%-.128T'用于列`%.192s`%.192s`%.192s`在%luè¡Œ"
eng "Incorrect %-.32s value: '%-.128T' for column `%.192s`.`%.192s`.`%.192s` at row %lu"
ger "Falscher %-.32s-Wert: '%-.128T' für Feld '`%.192s`.`%.192s`.`%.192s` in Zeile %lu"
ER_ILLEGAL_VALUE_FOR_TYPE 22007
+ chi "在解æžæœŸé—´å‘现的éžæ³•%s '%-.192T'值"
eng "Illegal %s '%-.192T' value found during parsing"
ger "Nicht zulässiger %s-Wert '%-.192T' beim Parsen gefunden"
ER_VIEW_NONUPD_CHECK
+ chi "在ä¸å¯æ›´æ–°çš„视图%`-.192s.%`-.192s上CHECK OPTION"
eng "CHECK OPTION on non-updatable view %`-.192s.%`-.192s"
ger "CHECK OPTION auf nicht-aktualisierbarem View %`-.192s.%`-.192s"
rus "CHECK OPTION Ð´Ð»Ñ Ð½ÐµÐ¾Ð±Ð½Ð¾Ð²Ð»Ñемого VIEW %`-.192s.%`-.192s"
ukr "CHECK OPTION Ð´Ð»Ñ VIEW %`-.192s.%`-.192s що не може бути оновленним"
ER_VIEW_CHECK_FAILED 44000
+ chi "CHECK OPTION失败%`-.192s.%`-.192s"
eng "CHECK OPTION failed %`-.192s.%`-.192s"
ger "CHECK OPTION fehlgeschlagen: %`-.192s.%`-.192s"
rus "Проверка CHECK OPTION Ð´Ð»Ñ VIEW %`-.192s.%`-.192s провалилаÑÑŒ"
ukr "Перевірка CHECK OPTION Ð´Ð»Ñ VIEW %`-.192s.%`-.192s не пройшла"
ER_PROCACCESS_DENIED_ERROR 42000
+ chi "%-.32s命令被拒ç»ã€‚用户为'%s'@'%s' 例程'%-.192s'"
eng "%-.32s command denied to user '%s'@'%s' for routine '%-.192s'"
ger "Befehl %-.32s nicht zulässig für Benutzer '%s'@'%s' in Routine '%-.192s'"
ER_RELAY_LOG_FAIL
+ chi "清除旧继relay日志失败:%s"
eng "Failed purging old relay logs: %s"
ger "Bereinigen alter Relais-Logs fehlgeschlagen: %s"
ER_PASSWD_LENGTH
+ chi "密ç å“ˆå¸Œåº”该是一个%d-digitå六进制数"
eng "Password hash should be a %d-digit hexadecimal number"
ger "Passwort-Hash sollte eine Hexdaezimalzahl mit %d Stellen sein"
ER_UNKNOWN_TARGET_BINLOG
+ chi "在Binlog索引中找ä¸åˆ°ç›®æ ‡æ—¥å¿—"
eng "Target log not found in binlog index"
ger "Ziel-Log im Binlog-Index nicht gefunden"
ER_IO_ERR_LOG_INDEX_READ
+ chi "读å–日志索引文件时I/O错误"
eng "I/O error reading log index file"
ger "Fehler beim Lesen der Log-Index-Datei"
ER_BINLOG_PURGE_PROHIBITED
+ chi "æœåŠ¡å™¨é…ç½®ä¸å…许Binlog清除"
eng "Server configuration does not permit binlog purge"
ger "Server-Konfiguration erlaubt keine Binlog-Bereinigung"
ER_FSEEK_FAIL
+ chi "fseek()失败"
eng "Failed on fseek()"
ger "fseek() fehlgeschlagen"
hindi "fseek() विफल रहा"
ER_BINLOG_PURGE_FATAL_ERR
+ chi "日志清除期间的致命错误"
eng "Fatal error during log purge"
ger "Schwerwiegender Fehler bei der Log-Bereinigung"
ER_LOG_IN_USE
+ chi "日志在用,ä¸ä¼šæ¸…除"
eng "A purgeable log is in use, will not purge"
ger "Ein zu bereinigendes Log wird gerade benutzt, daher keine Bereinigung"
ER_LOG_PURGE_UNKNOWN_ERR
+ chi "日志清除期间未知错误"
eng "Unknown error during log purge"
ger "Unbekannter Fehler bei Log-Bereinigung"
ER_RELAY_LOG_INIT
+ chi "åˆå§‹åŒ–relay日志失败。ä½ç½®ï¼š%s"
eng "Failed initializing relay log position: %s"
ger "Initialisierung der Relais-Log-Position fehlgeschlagen: %s"
ER_NO_BINARY_LOGGING
+ chi "您ä¸ä½¿ç”¨äºŒè¿›åˆ¶æ—¥å¿—记录"
eng "You are not using binary logging"
ger "Sie verwenden keine Binärlogs"
ER_RESERVED_SYNTAX
+ chi "'%-.64s'语法ä¿ç•™ç”¨äºŽMariaDBæœåŠ¡å™¨å†…部"
eng "The '%-.64s' syntax is reserved for purposes internal to the MariaDB server"
ger "Die Schreibweise '%-.64s' ist für interne Zwecke des MariaDB-Servers reserviert"
ER_WSAS_FAILED
+ chi "WSAStartup失败了"
eng "WSAStartup Failed"
ger "WSAStartup fehlgeschlagen"
ER_DIFF_GROUPS_PROC
+ chi "无法处ç†å…·æœ‰ä¸åŒç»„的过程"
eng "Can't handle procedures with different groups yet"
ger "Kann Prozeduren mit unterschiedlichen Gruppen noch nicht verarbeiten"
ER_NO_GROUP_FOR_PROC
+ chi "SELECT必须具有此过程的组"
eng "Select must have a group with this procedure"
ger "SELECT muss bei dieser Prozedur ein GROUP BY haben"
ER_ORDER_WITH_PROC
+ chi "无法在次存储过程使用ORDERå­å¥"
eng "Can't use ORDER clause with this procedure"
ger "Kann bei dieser Prozedur keine ORDER-BY-Klausel verwenden"
ER_LOGGING_PROHIBIT_CHANGING_OF
+ chi "二进制日志记录和å¤åˆ¶ç¦æ­¢æ›´æ”¹å…¨å±€æœåŠ¡å™¨%s"
eng "Binary logging and replication forbid changing the global server %s"
ger "Binärlogs und Replikation verhindern Wechsel des globalen Servers %s"
ER_NO_FILE_MAPPING
+ chi "无法映射文件:%-.200s,错误å·ç ï¼š%M"
eng "Can't map file: %-.200s, errno: %M"
ger "Kann Datei nicht abbilden: %-.200s, Fehler: %M"
ER_WRONG_MAGIC
+ chi "魔法错误%-.64s"
eng "Wrong magic in %-.64s"
ger "Falsche magische Zahlen in %-.64s"
ER_PS_MANY_PARAM
+ chi "Prepared statement包å«å¤ªå¤šå ä½ç¬¦"
eng "Prepared statement contains too many placeholders"
ger "Vorbereitete Anweisung enthält zu viele Platzhalter"
ER_KEY_PART_0
+ chi "索引部分'%-.192s'长度ä¸èƒ½ä¸º0"
eng "Key part '%-.192s' length cannot be 0"
ger "Länge des Schlüsselteils '%-.192s' kann nicht 0 sein"
ER_VIEW_CHECKSUM
+ chi "查看文本checksum失败"
eng "View text checksum failed"
ger "View-Text-Prüfsumme fehlgeschlagen"
rus "Проверка контрольной Ñуммы текÑта VIEW провалилаÑÑŒ"
ukr "Перевірка контрольної Ñуми текÑту VIEW не пройшла"
ER_VIEW_MULTIUPDATE
+ chi "无法通过JOIN视图'%-.192s.%-.192s'修改多个基础表。"
eng "Can not modify more than one base table through a join view '%-.192s.%-.192s'"
ger "Kann nicht mehr als eine Basistabelle über Join-View '%-.192s.%-.192s' ändern"
rus "ÐÐµÐ»ÑŒÐ·Ñ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ больше чем одну базовую таблицу иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð¼Ð½Ð¾Ð³Ð¾Ñ‚Ð°Ð±Ð»Ð¸Ñ‡Ð½Ñ‹Ð¹ VIEW '%-.192s.%-.192s'"
ukr "Ðеможливо оновити більш ниж одну базову таблицю выкориÑтовуючи VIEW '%-.192s.%-.192s', що міÑÑ‚Ñ–Ñ‚ÑŒ декілька таблиць"
ER_VIEW_NO_INSERT_FIELD_LIST
+ chi "无法写入JOIN视图'%-.192s.%-.192s'没有字段列表"
eng "Can not insert into join view '%-.192s.%-.192s' without fields list"
ger "Kann nicht ohne Feldliste in Join-View '%-.192s.%-.192s' einfügen"
rus "ÐÐµÐ»ÑŒÐ·Ñ Ð²ÑтавлÑÑ‚ÑŒ запиÑи в многотабличный VIEW '%-.192s.%-.192s' без ÑпиÑка полей"
ukr "Ðеможливо уÑтавити Ñ€Ñдки у VIEW '%-.192s.%-.192s', що міÑтить декілька таблиць, без ÑпиÑку Ñтовбців"
ER_VIEW_DELETE_MERGE_VIEW
+ chi "无法从JOIN视图'%-.192s.%-.192s'删除"
eng "Can not delete from join view '%-.192s.%-.192s'"
ger "Kann nicht aus Join-View '%-.192s.%-.192s' löschen"
rus "ÐÐµÐ»ÑŒÐ·Ñ ÑƒÐ´Ð°Ð»ÑÑ‚ÑŒ из многотабличного VIEW '%-.192s.%-.192s'"
ukr "Ðеможливо видалити Ñ€Ñдки у VIEW '%-.192s.%-.192s', що міÑтить декілька таблиць"
ER_CANNOT_USER
+ chi "æ“作%s失败%.256s"
eng "Operation %s failed for %.256s"
ger "Operation %s schlug fehl für %.256s"
norwegian-ny "Operation %s failed for '%.256s'"
ER_XAER_NOTA XAE04
+ chi "XAER_NOTA:未知的XID"
eng "XAER_NOTA: Unknown XID"
ger "XAER_NOTA: Unbekannte XID"
ER_XAER_INVAL XAE05
+ chi "XAER_INVAL:无效的å‚数(或ä¸æ”¯æŒçš„命令)"
eng "XAER_INVAL: Invalid arguments (or unsupported command)"
ger "XAER_INVAL: Ungültige Argumente (oder nicht unterstützter Befehl)"
ER_XAER_RMFAIL XAE07
+ chi "XAER_RMFAIL:当全局事务处于%.64s状æ€æ—¶ï¼Œæ— æ³•æ‰§è¡Œè¯¥å‘½ä»¤"
eng "XAER_RMFAIL: The command cannot be executed when global transaction is in the %.64s state"
ger "XAER_RMFAIL: DEr Befehl kann nicht ausgeführt werden, wenn die globale Transaktion im Zustand %.64s ist"
rus "XAER_RMFAIL: Ñту команду Ð½ÐµÐ»ÑŒÐ·Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÑÑ‚ÑŒ когда Ð³Ð»Ð¾Ð±Ð°Ð»ÑŒÐ½Ð°Ñ Ñ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ð¸Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð² ÑоÑтоÑнии '%.64s'"
ER_XAER_OUTSIDE XAE09
+ chi "XAER_OUTSIDE:一些工作是在全局交易之外完æˆçš„"
eng "XAER_OUTSIDE: Some work is done outside global transaction"
ger "XAER_OUTSIDE: Einige Arbeiten werden außerhalb der globalen Transaktion verrichtet"
ER_XAER_RMERR XAE03
+ chi "XAER_RMERR:事务分支中å‘生致命错误 - 检查您的数æ®ä»¥èŽ·å¾—一致性"
eng "XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency"
ger "XAER_RMERR: Schwerwiegender Fehler im Transaktionszweig - prüfen Sie Ihre Daten auf Konsistenz"
ER_XA_RBROLLBACK XA100
+ chi "XA_RBROLBACK:交易分支回滚"
eng "XA_RBROLLBACK: Transaction branch was rolled back"
ger "XA_RBROLLBACK: Transaktionszweig wurde zurückgerollt"
ER_NONEXISTING_PROC_GRANT 42000
+ chi "无授æƒï¼šç”¨æˆ·'%-.48s'主机'%-.64s'ROUTINE'%-.192s'"
eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on routine '%-.192s'"
ger "Es gibt diese Berechtigung für Benutzer '%-.48s' auf Host '%-.64s' für Routine '%-.192s' nicht"
ER_PROC_AUTO_GRANT_FAIL
+ chi "无法授予EXECUTEå’ŒALTER ROUTINEæƒé™"
eng "Failed to grant EXECUTE and ALTER ROUTINE privileges"
ger "Gewährung von EXECUTE- und ALTER-ROUTINE-Rechten fehlgeschlagen"
ER_PROC_AUTO_REVOKE_FAIL
+ chi "无法撤消所有æƒé™ä»¥åˆ é™¤ä¾‹ç¨‹"
eng "Failed to revoke all privileges to dropped routine"
ger "Rücknahme aller Rechte für die gelöschte Routine fehlgeschlagen"
ER_DATA_TOO_LONG 22001
+ chi "列'%s'è¡Œ%luæ•°æ®å¤ªé•¿"
eng "Data too long for column '%s' at row %lu"
ger "Daten zu lang für Feld '%s' in Zeile %lu"
ER_SP_BAD_SQLSTATE 42000
+ chi "åSQLSTATE:'%s'"
eng "Bad SQLSTATE: '%s'"
ger "Ungültiger SQLSTATE: '%s'"
ER_STARTUP
+ chi "%s:已ç»å‡†å¤‡å¥½æŽ¥å—连接\nVersion:'%s'套接字:'%s'端å£ï¼š%d %s"
eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s"
ger "%s: bereit für Verbindungen.\nVersion: '%s' Socket: '%s' Port: %d %s"
ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR
+ chi "无法从带有固定大å°è¡Œçš„文件中加载值到å˜é‡"
eng "Can't load value from file with fixed size rows to variable"
ger "Kann Wert aus Datei mit Zeilen fester Größe nicht in Variable laden"
ER_CANT_CREATE_USER_WITH_GRANT 42000
+ chi "您ä¸å…许使用创建用户时给予GRANT"
eng "You are not allowed to create a user with GRANT"
ger "Sie dürfen keinen Benutzer mit GRANT anlegen"
ER_WRONG_VALUE_FOR_TYPE
+ chi "ä¸æ­£ç¡®çš„%-.32s值:'%-.128T' 函数:%-.32s"
eng "Incorrect %-.32s value: '%-.128T' for function %-.32s"
ger "Falscher %-.32s-Wert: '%-.128T' für Funktion %-.32s"
ER_TABLE_DEF_CHANGED
+ chi "表定义已更改,请é‡è¯•"
eng "Table definition has changed, please retry transaction"
ger "Tabellendefinition wurde geändert, bitte starten Sie die Transaktion neu"
ER_SP_DUP_HANDLER 42000
+ chi "在åŒä¸€å—中声明的处ç†ç¨‹åºé‡å¤"
eng "Duplicate handler declared in the same block"
ger "Doppelter Handler im selben Block deklariert"
ER_SP_NOT_VAR_ARG 42000
+ chi "OUT或INOUTå‚æ•°%d 例程 %sçš„ä¸æ˜¯BEFORE触å‘器里的å˜é‡æˆ–新伪å˜é‡"
eng "OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger"
ger "OUT- oder INOUT-Argument %d für Routine %s ist keine Variable"
ER_SP_NO_RETSET 0A000
+ chi "ä¸å…许从%s返回结果集"
eng "Not allowed to return a result set from a %s"
ger "Rückgabe einer Ergebnismenge aus einer %s ist nicht erlaubt"
ER_CANT_CREATE_GEOMETRY_OBJECT 22003
+ chi "无法从å‘é€åˆ°å‡ ä½•å­—段的数æ®ä¸­èŽ·å–几何对象"
eng "Cannot get geometry object from data you send to the GEOMETRY field"
ger "Kann kein Geometrieobjekt aus den Daten machen, die Sie dem GEOMETRY-Feld übergeben haben"
ER_FAILED_ROUTINE_BREAK_BINLOG
+ chi "ROUTINE失败,定义中既没有NO SQL也没有READ SQL DAT。å¯ç”¨äºŒè¿›åˆ¶æ—¥å¿—记录;如果更新éžäº‹åŠ¡æ€§è¡¨ï¼Œåˆ™äºŒè¿›åˆ¶æ—¥å¿—将会错过其更改"
eng "A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes"
ger "Eine Routine, die weder NO SQL noch READS SQL DATA in der Deklaration hat, schlug fehl und Binärlogging ist aktiv. Wenn Nicht-Transaktions-Tabellen aktualisiert wurden, enthält das Binärlog ihre Änderungen nicht"
ER_BINLOG_UNSAFE_ROUTINE
+ chi "此函数定义中没有DETERMINISTIC,NO SQL,或者READS SQL DATA,并且已å¯ç”¨äºŒè¿›åˆ¶æ—¥å¿—记录(您*å¯èƒ½*希望使用较少的安全性的log_bin_trust_function_creatorså˜é‡ï¼‰"
eng "This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)"
ger "Diese Routine hat weder DETERMINISTIC, NO SQL noch READS SQL DATA in der Deklaration und Binärlogging ist aktiv (*vielleicht* sollten Sie die weniger sichere Variable log_bin_trust_function_creators verwenden)"
ER_BINLOG_CREATE_ROUTINE_NEED_SUPER
+ chi "您没有超级特æƒå’ŒäºŒè¿›åˆ¶æ—¥å¿—记录已å¯ç”¨ï¼ˆæ‚¨*å¯èƒ½*想è¦ä½¿ç”¨è¾ƒå°‘的安全log_bin_trust_function_creatorså˜é‡ï¼‰"
eng "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)"
ger "Sie haben keine SUPER-Berechtigung und Binärlogging ist aktiv (*vielleicht* sollten Sie die weniger sichere Variable log_bin_trust_function_creators verwenden)"
ER_EXEC_STMT_WITH_OPEN_CURSOR
+ chi "您无法执行具有与之关è”的打开Cursorçš„prepared statement。é‡ç½®è¯­å¥ä»¥é‡æ–°æ‰§è¡Œå®ƒ"
eng "You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it"
ger "Sie können keine vorbereitete Anweisung ausführen, die mit einem geöffneten Cursor verknüpft ist. Setzen Sie die Anweisung zurück, um sie neu auszuführen"
ER_STMT_HAS_NO_OPEN_CURSOR
+ chi "语å¥ï¼ˆ%lu)没有开放的Cursor"
eng "The statement (%lu) has no open cursor"
ger "Die Anweisung (%lu) hat keinen geöffneten Cursor"
ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+ chi "在存储的函数或触å‘器中ä¸å…许显å¼æˆ–éšå¼æ交"
eng "Explicit or implicit commit is not allowed in stored function or trigger"
ger "Explizites oder implizites Commit ist in gespeicherten Funktionen und in Triggern nicht erlaubt"
ER_NO_DEFAULT_FOR_VIEW_FIELD
+ chi "VIEW的列'%-.192s.%-.192s'底层表没有默认值"
eng "Field of view '%-.192s.%-.192s' underlying table doesn't have a default value"
ger "Ein Feld der dem View '%-.192s.%-.192s' zugrundeliegenden Tabelle hat keinen Vorgabewert"
ER_SP_NO_RECURSION
+ chi "ä¸å…许递归存储功能和触å‘器"
eng "Recursive stored functions and triggers are not allowed"
ger "Rekursive gespeicherte Routinen und Triggers sind nicht erlaubt"
ER_TOO_BIG_SCALE 42000 S1009
+ chi "指定的大规模%llu为'%-.192s'。最大是%u"
eng "Too big scale %llu specified for '%-.192s'. Maximum is %u"
ger "Zu großer Skalierungsfaktor %llu für '%-.192s' angegeben. Maximum ist %u"
ER_TOO_BIG_PRECISION 42000 S1009
+ chi "指定的精度%llu太大 '%-.192s'。最大是%u"
eng "Too big precision %llu specified for '%-.192s'. Maximum is %u"
ger "Zu große Genauigkeit %llu für '%-.192s' angegeben. Maximum ist %u"
ER_M_BIGGER_THAN_D 42000 S1009
+ chi "对于FLOAT(M,D),DOUBLE(M,D)或DECIMAL(M,D),M必须> = D(列'%-.192s')"
eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s')"
ger "Für FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.192s')"
ER_WRONG_LOCK_OF_SYSTEM_TABLE
+ chi "您无法将系统表的写入é”定与其他表或é”定类型相结åˆ"
eng "You can't combine write-locking of system tables with other tables or lock types"
- ger "Sie können Schreibsperren auf der Systemtabelle nicht mit anderen Tabellen kombinieren"
+ ger "Sie können Schreibsperren auf der Systemtabelle nicht mit anderen Tabellen kombinieren"
ER_CONNECT_TO_FOREIGN_DATA_SOURCE
+ chi "无法连接到外数æ®æºï¼š%.64s"
eng "Unable to connect to foreign data source: %.64s"
ger "Kann nicht mit Fremddatenquelle verbinden: %.64s"
ER_QUERY_ON_FOREIGN_DATA_SOURCE
+ chi "处ç†å¯¹å¤–æ•°æ®æºä¸Šçš„查询时出现问题。数æ®æºé”™è¯¯ï¼š%-.64s"
eng "There was a problem processing the query on the foreign data source. Data source error: %-.64s"
ger "Bei der Verarbeitung der Abfrage ist in der Fremddatenquelle ein Problem aufgetreten. Datenquellenfehlermeldung: %-.64s"
ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST
+ chi "您å°è¯•å¼•ç”¨çš„外数æ®æºä¸å­˜åœ¨ã€‚æ•°æ®æºé”™è¯¯ï¼š%-.64s"
eng "The foreign data source you are trying to reference does not exist. Data source error: %-.64s"
ger "Die Fremddatenquelle, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s"
ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE
+ chi "无法创建è”åˆè¡¨ã€‚æ•°æ®æºè¿žæŽ¥å­—符串'%-.64s'ä¸æ˜¯æ­£ç¡®çš„æ ¼å¼"
eng "Can't create federated table. The data source connection string '%-.64s' is not in the correct format"
ger "Kann föderierte Tabelle nicht erzeugen. Der Datenquellen-Verbindungsstring '%-.64s' hat kein korrektes Format"
ER_FOREIGN_DATA_STRING_INVALID
+ chi "æ•°æ®æºè¿žæŽ¥å­—符串'%-.64s'ä¸æ˜¯æ­£ç¡®çš„æ ¼å¼"
eng "The data source connection string '%-.64s' is not in the correct format"
ger "Der Datenquellen-Verbindungsstring '%-.64s' hat kein korrektes Format"
ER_CANT_CREATE_FEDERATED_TABLE
+ chi "无法创建è”åˆè¡¨ã€‚外数æ®SRC错误:%-.64s"
eng "Can't create federated table. Foreign data src error: %-.64s"
ger "Kann föderierte Tabelle nicht erzeugen. Fremddatenquellenfehlermeldung: %-.64s"
ER_TRG_IN_WRONG_SCHEMA
+ chi "触å‘在错的SCHEMA"
eng "Trigger in wrong schema"
ger "Trigger im falschen Schema"
ER_STACK_OVERRUN_NEED_MORE
+ chi "线程堆栈溢出:%ld字节堆栈的%ld字节,以åŠæ‰€éœ€çš„%ld字节。使用'mysqld --thread_stack =#'指定更大的堆栈"
eng "Thread stack overrun: %ld bytes used of a %ld byte stack, and %ld bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack"
ger "Thread-Stack-Überlauf: %ld Bytes eines %ld-Byte-Stacks in Verwendung, und %ld Bytes benötigt. Verwenden Sie 'mysqld --thread_stack=#', um einen größeren Stack anzugeben"
jpn "スレッドスタックä¸è¶³ã§ã™(使用: %ld ; サイズ: %ld ; è¦æ±‚: %ld)。より大ãã„値㧠'mysqld --thread_stack=#' ã®æŒ‡å®šã‚’ã—ã¦ãã ã•ã„。"
ER_TOO_LONG_BODY 42000 S1009
+ chi "'%-.100sâ€çš„ROUTINE太长了"
eng "Routine body for '%-.100s' is too long"
ger "Routinen-Body für '%-.100s' ist zu lang"
ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
+ chi "无法删除默认索引缓存"
eng "Cannot drop default keycache"
ger "Der vorgabemäßige Schlüssel-Cache kann nicht gelöscht werden"
ER_TOO_BIG_DISPLAYWIDTH 42000 S1009
+ chi "显示宽度超过'%-.192s'的范围(max =%lu)"
eng "Display width out of range for '%-.192s' (max = %lu)"
ger "Anzeigebreite außerhalb des zulässigen Bereichs für '%-.192s' (Maximum = %lu)"
ER_XAER_DUPID XAE08
+ chi "XAER_DUPID:xid已存在"
eng "XAER_DUPID: The XID already exists"
ger "XAER_DUPID: Die XID existiert bereits"
ER_DATETIME_FUNCTION_OVERFLOW 22008
+ chi "DateTime函数:%-.32s字段溢出"
eng "Datetime function: %-.32s field overflow"
ger "Datetime-Funktion: %-.32s Feldüberlauf"
ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG
+ chi "在存储的函数/触å‘器中无法更新表'%-.192s',因为它已被调用此存储的函数/触å‘器调用的语å¥"
eng "Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger"
ger "Kann Tabelle '%-.192s' in gespeicherter Funktion oder Trigger nicht aktualisieren, weil sie bereits von der Anweisung verwendet wird, die diese gespeicherte Funktion oder den Trigger aufrief"
ER_VIEW_PREVENT_UPDATE
- eng "The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'"
- ger "Die Definition der Tabelle '%-.192s' verhindert die Operation %.192s auf Tabelle '%-.192s'"
+ chi "表'%-.192s'的定义å¯é˜²æ­¢åœ¨è¡¨'%-.192s'上的æ“作'%-.192s'"
+ eng "The definition of table '%-.192s' prevents operation %-.192s on table '%-.192s'"
+ ger "Die Definition der Tabelle '%-.192s' verhindert die Operation %-.192s auf Tabelle '%-.192s'"
ER_PS_NO_RECURSION
+ chi "prepared statement包å«ä¸€ä¸ªæœ‰å…³è¯¥è¯­å¥çš„存储例程调用。它ä¸å…许以这ç§é€’å½’æ–¹å¼æ‰§è¡Œprepared statement"
eng "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner"
ger "Die vorbereitete Anweisung enthält einen Aufruf einer gespeicherten Routine, die auf eben dieselbe Anweisung verweist. Es ist nicht erlaubt, eine vorbereitete Anweisung in solch rekursiver Weise auszuführen"
ER_SP_CANT_SET_AUTOCOMMIT
+ chi "ä¸å…许从存储的函数或触å‘器设置自动判处"
eng "Not allowed to set autocommit from a stored function or trigger"
ger "Es ist nicht erlaubt, innerhalb einer gespeicherten Funktion oder eines Triggers AUTOCOMMIT zu setzen"
ER_MALFORMED_DEFINER 0L000
+ chi "无效的定义"
eng "Invalid definer"
ER_VIEW_FRM_NO_USER
+ chi "VIEW'%-.192s'。'%-.192s'没有ç»å®šçš„ä¿¡æ¯ï¼ˆæ—§è¡¨æ ¼å¼ï¼‰ã€‚当å‰ç”¨æˆ·ç”¨ä½œå®šä¹‰ã€‚请é‡æ–°åˆ›å»ºè§†å›¾ï¼"
eng "View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!"
ger "View '%-.192s'.'%-.192s' hat keine Definierer-Information (altes Tabellenformat). Der aktuelle Benutzer wird als Definierer verwendet. Bitte erstellen Sie den View neu"
ER_VIEW_OTHER_USER
+ chi "您需è¦ä½¿ç”¨'%-.192s'@'%-.192s'的创建视图的超级特æƒ"
eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer"
ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen"
ER_NO_SUCH_USER
+ chi "指定为定义的用户('%-.64s'@'%-.64s')ä¸å­˜åœ¨"
eng "The user specified as a definer ('%-.64s'@'%-.64s') does not exist"
ger "Der als Definierer angegebene Benutzer ('%-.64s'@'%-.64s') existiert nicht"
ER_FORBID_SCHEMA_CHANGE
+ chi "ä¸å…许从'%-.192s'到'%-.192s'çš„SCHEMA更改"
eng "Changing schema from '%-.192s' to '%-.192s' is not allowed"
ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt"
ER_ROW_IS_REFERENCED_2 23000
+ chi "无法删除或更新父行:外键约æŸå¤±è´¥ï¼ˆ%.192s)"
eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)"
ger "Kann Eltern-Zeile nicht löschen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)"
ER_NO_REFERENCED_ROW_2 23000
+ chi "无法添加或更新å­è¡Œï¼šå¤–键约æŸå¤±è´¥ï¼ˆ%.192s)"
eng "Cannot add or update a child row: a foreign key constraint fails (%.192s)"
ger "Kann Kind-Zeile nicht hinzufügen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)"
ER_SP_BAD_VAR_SHADOW 42000
+ chi "å˜é‡'%-.64s'必须用`...`,或é‡å‘½å"
eng "Variable '%-.64s' must be quoted with `...`, or renamed"
ger "Variable '%-.64s' muss mit `...` geschützt oder aber umbenannt werden"
ER_TRG_NO_DEFINER
+ chi "触å‘'%-.192s'çš„ç»å¯¹å±žæ€§ã€‚'%-.192s'。触å‘器将在调用者的授æƒä¸‹æ¿€æ´»ï¼Œè¯¥æƒé™å¯èƒ½ä¸è¶³ã€‚请é‡æ–°åˆ›å»ºè§¦å‘器"
eng "No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger"
ger "Kein Definierer-Attribut für Trigger '%-.192s'.'%-.192s'. Der Trigger wird mit der Autorisierung des Aufrufers aktiviert, der möglicherweise keine zureichenden Berechtigungen hat. Bitte legen Sie den Trigger neu an"
ER_OLD_FILE_FORMAT
+ chi "'%-.192s'具有旧格å¼ï¼Œæ‚¨åº”该é‡æ–°åˆ›å»º'%s'对象"
eng "'%-.192s' has an old format, you should re-create the '%s' object(s)"
ger "'%-.192s' hat altes Format, Sie sollten die '%s'-Objekt(e) neu erzeugen"
ER_SP_RECURSION_LIMIT
+ chi "递归é™åˆ¶%d(如max_sp_recursion_depthå˜é‡è®¾ç½®ï¼‰çš„例程%.192s"
eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s"
ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde für Routine %.192s überschritten"
ER_SP_PROC_TABLE_CORRUPT
- eng "Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)"
- ger "Routine %-.192s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschädigt, oder enthält fehlerhaften Daten (interner Code: %d)"
+ chi "无法加载常规%-.192s(内部代ç %d)。有关更多详细信æ¯ï¼Œè¯·è¿è¡ŒSHOW WARNINGS"
+ eng "Failed to load routine %-.192s (internal code %d). For more details, run SHOW WARNINGS"
+ ger "Routine %-.192s (interner Code %d) konnte nicht geladen werden. Weitere Einzelheiten erhalten Sie, wenn Sie SHOW WARNINGS ausführen"
+ ukr "Ðевдала Ñпроба завантажити процедуру %-.192s (внутрішний код %d). Ð”Ð»Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð´ÐµÑ‚Ð°Ð»ÑŒÐ½Ð¾Ñ— інформації викориÑтовуйте SHOW WARNINGS"
ER_SP_WRONG_NAME 42000
+ chi "常规å称错误ä¸æ­£ç¡®'%-.192s'"
eng "Incorrect routine name '%-.192s'"
ger "Ungültiger Routinenname '%-.192s'"
ER_TABLE_NEEDS_UPGRADE
+ chi "需è¦å‡çº§ã€‚请åš\"ä¿®å¤%s%`s \"或转储/é‡æ–°åŠ è½½ä»¥ä¿®å¤ï¼"
eng "Upgrade required. Please do \"REPAIR %s %`s\" or dump/reload to fix it!"
ger "Aktualisierung erforderlich. Bitte zum Reparieren \"REPAIR %s %`s\" eingeben!"
ER_SP_NO_AGGREGATE 42000
+ chi "存储函数ä¸æ”¯æŒèšåˆ"
eng "AGGREGATE is not supported for stored functions"
ger "AGGREGATE wird bei gespeicherten Funktionen nicht unterstützt"
ER_MAX_PREPARED_STMT_COUNT_REACHED 42000
+ chi "无法创建超过max_prepared_stmt_count语å¥ï¼ˆå½“å‰å€¼ï¼š%u)"
eng "Can't create more than max_prepared_stmt_count statements (current value: %u)"
ger "Kann nicht mehr Anweisungen als max_prepared_stmt_count erzeugen (aktueller Wert: %u)"
ER_VIEW_RECURSIVE
+ chi "%`s.%`s包å«è§†å›¾é€’å½’"
eng "%`s.%`s contains view recursion"
ger "%`s.%`s enthält View-Rekursion"
ER_NON_GROUPING_FIELD_USED 42000
+ chi "éžåˆ†ç»„字段'%-.192s'用于%-.64sæ¡æ¬¾"
eng "Non-grouping field '%-.192s' is used in %-.64s clause"
ger "In der %-.192s-Klausel wird das die Nicht-Gruppierungsspalte '%-.64s' verwendet"
ER_TABLE_CANT_HANDLE_SPKEYS
+ chi "存储引擎%sä¸æ”¯æŒSPATIAL索引"
eng "The storage engine %s doesn't support SPATIAL indexes"
ger "Der verwendete Tabellentyp (%s) unterstützt keine SPATIAL-Indizes"
ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA
+ chi "无法在系统表上创建触å‘器"
eng "Triggers can not be created on system tables"
ger "Trigger können nicht auf Systemtabellen erzeugt werden"
ER_REMOVED_SPACES
+ chi "å‰é¢çš„空格从å称'%s'删除"
eng "Leading spaces are removed from name '%s'"
ger "Führende Leerzeichen werden aus dem Namen '%s' entfernt"
ER_AUTOINC_READ_FAILED
+ chi "无法从存储引擎读å–自动增é‡å€¼"
eng "Failed to read auto-increment value from storage engine"
ger "Lesen des Autoincrement-Werts von der Speicher-Engine fehlgeschlagen"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन से auto-increment का मान पà¥à¤¨à¥‡ में असफल रहे"
ER_USERNAME
+ chi "用户å"
eng "user name"
ger "Benutzername"
hindi "यूज़र का नाम"
ER_HOSTNAME
+ chi "主机å"
eng "host name"
ger "Hostname"
hindi "होसà¥à¤Ÿ का नाम"
ER_WRONG_STRING_LENGTH
+ chi "字符串'%-.70T'对于%s(应ä¸è¶…过%d)太长"
eng "String '%-.70T' is too long for %s (should be no longer than %d)"
ger "String '%-.70T' ist zu lang für %s (sollte nicht länger sein als %d)"
ER_NON_INSERTABLE_TABLE
+ chi "目标表%-.100s %sä¸å¯æ’å…¥"
eng "The target table %-.100s of the %s is not insertable-into"
ger "Die Zieltabelle %-.100s von %s ist nicht einfügbar"
jpn "対象表 %-.100s ã¯æŒ¿å…¥å¯èƒ½ã§ã¯ãªã„ã®ã§ã€%s ã‚’è¡Œãˆã¾ã›ã‚“。"
ER_ADMIN_WRONG_MRG_TABLE
- eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist"
- ger "Tabelle '%-.64s' ist unterschiedlich definiert, nicht vom Typ MyISAM oder existiert nicht"
+ chi "表'%-.64s'ä¸åŒå®šä¹‰ã€æˆ–éžmyisam类型ã€æˆ–ä¸å­˜åœ¨"
+ eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist"
+ ger "Tabelle '%-.64s' ist unterschiedlich definiert, nicht vom Typ MyISAM oder existiert nicht"
ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
- eng "Too high level of nesting for select"
- ger "Zu tief verschachtelte SELECT-Anweisungen"
+ chi "太高的嵌套SELECT"
+ eng "Too high level of nesting for select"
+ ger "Zu tief verschachtelte SELECT-Anweisungen"
ER_NAME_BECOMES_EMPTY
- eng "Name '%-.64s' has become ''"
- ger "Name '%-.64s' wurde zu ''"
+ chi "å'%-.64s'å·²æˆä¸º''"
+ eng "Name '%-.64s' has become ''"
+ ger "Name '%-.64s' wurde zu ''"
ER_AMBIGUOUS_FIELD_TERM
- eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY"
- ger "Das erste Zeichen der Zeichenkette FIELDS TERMINATED ist mehrdeutig; bitte benutzen Sie nicht optionale und nicht leere FIELDS ENCLOSED BY"
+ chi "FIELDS TERMINATED字符串的第一个字符是模棱两å¯çš„;请使用éžç©ºå­—段FIELDS ENCLOSED BY"
+ eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY"
+ ger "Das erste Zeichen der Zeichenkette FIELDS TERMINATED ist mehrdeutig; bitte benutzen Sie nicht optionale und nicht leere FIELDS ENCLOSED BY"
ER_FOREIGN_SERVER_EXISTS
- eng "The foreign server, %s, you are trying to create already exists"
- ger "Der entfernte Server %s, den Sie versuchen zu erzeugen, existiert schon"
+ chi "您正在å°è¯•åˆ›å»ºçš„外æ¥æœåŠ¡å™¨%s已存在"
+ eng "The foreign server, %s, you are trying to create already exists"
+ ger "Der entfernte Server %s, den Sie versuchen zu erzeugen, existiert schon"
ER_FOREIGN_SERVER_DOESNT_EXIST
+ chi "您å°è¯•å¼•ç”¨çš„外部æœåŠ¡å™¨å称ä¸å­˜åœ¨ã€‚æ•°æ®æºé”™è¯¯ï¼š%-.64s"
eng "The foreign server name you are trying to reference does not exist. Data source error: %-.64s"
- ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s"
+ ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s"
ER_ILLEGAL_HA_CREATE_OPTION
+ chi "表存储引擎'%-.64s'ä¸æ”¯æŒåˆ›å»ºé€‰é¡¹'%.64s'"
eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
ger "Speicher-Engine '%-.64s' der Tabelle unterstützt die Option '%.64s' nicht"
ER_PARTITION_REQUIRES_VALUES_ERROR
+ chi "语法错误:%-.64s PARTITIONING需è¦å®šä¹‰ç»™æ¯ä¸ªåˆ†åŒºVALUES %-.64s"
eng "Syntax error: %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition"
ger "Fehler in der SQL-Syntax: %-.64s-PARTITIONierung erfordert Definition von VALUES %-.64s für jede Partition"
swe "Syntaxfel: %-.64s PARTITIONering kräver definition av VALUES %-.64s för varje partition"
ER_PARTITION_WRONG_VALUES_ERROR
+ chi "åªæœ‰%-.64s PARTITIONINGå¯ä»¥ä½¿ç”¨VALUES %-.64s在分区定义中"
eng "Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition"
ger "Nur %-.64s-PARTITIONierung kann VALUES %-.64s in der Partitionsdefinition verwenden"
swe "Endast %-.64s partitionering kan använda VALUES %-.64s i definition av partitionen"
ER_PARTITION_MAXVALUE_ERROR
+ chi "MAXVALUEåªèƒ½åœ¨æœ€åŽä¸€ä¸ªåˆ†åŒºå®šä¹‰ä¸­ä½¿ç”¨"
eng "MAXVALUE can only be used in last partition definition"
ger "MAXVALUE kann nur für die Definition der letzten Partition verwendet werden"
swe "MAXVALUE kan bara användas i definitionen av den sista partitionen"
ER_PARTITION_SUBPARTITION_ERROR
+ chi "å­åˆ†åŒºåªèƒ½æ˜¯å“ˆå¸Œåˆ†åŒºå’Œåˆ†åŒºåˆ—"
eng "Subpartitions can only be hash partitions and by key"
ger "Unterpartitionen dürfen nur HASH- oder KEY-Partitionen sein"
swe "Subpartitioner kan bara vara hash och key partitioner"
ER_PARTITION_SUBPART_MIX_ERROR
+ chi "如果在一个分区上,必须在所有分区上定义å­ç»„分"
eng "Must define subpartitions on all partitions if on one partition"
ger "Wenn Sie Unterpartitionen auf einer Partition definieren, müssen Sie das für alle Partitionen tun"
swe "Subpartitioner måste definieras på alla partitioner om på en"
ER_PARTITION_WRONG_NO_PART_ERROR
+ chi "定义了错误的分区数,与以å‰çš„设置ä¸åŒ¹é…"
eng "Wrong number of partitions defined, mismatch with previous setting"
ger "Falsche Anzahl von Partitionen definiert, stimmt nicht mit vorherigen Einstellungen überein"
swe "Antal partitioner definierade och antal partitioner är inte lika"
ER_PARTITION_WRONG_NO_SUBPART_ERROR
+ chi "错误的å­ç»„分数定义,与以å‰çš„设置ä¸åŒ¹é…"
eng "Wrong number of subpartitions defined, mismatch with previous setting"
ger "Falsche Anzahl von Unterpartitionen definiert, stimmt nicht mit vorherigen Einstellungen überein"
swe "Antal subpartitioner definierade och antal subpartitioner är inte lika"
ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
+ chi "ä¸å…许(å­ï¼‰åˆ†åŒºåŠŸèƒ½ä¸­çš„常é‡ï¼Œéšæœºæˆ–时区ä¾èµ–表达å¼"
eng "Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed"
ger "Konstante oder Random-Ausdrücke in (Unter-)Partitionsfunktionen sind nicht erlaubt"
swe "Konstanta uttryck eller slumpmässiga uttryck är inte tillåtna (sub)partitioneringsfunktioner"
-ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR
- eng "Expression in RANGE/LIST VALUES must be constant"
- ger "Ausdrücke in RANGE/LIST VALUES müssen konstant sein"
- swe "Uttryck i RANGE/LIST VALUES måste vara ett konstant uttryck"
+ER_NOT_CONSTANT_EXPRESSION
+ chi "%s中的表达必须是æ’定的"
+ eng "Expression in %s must be constant"
+ ger "Ausdrücke in %s müssen konstant sein"
+ swe "Uttryck i %s måste vara ett konstant uttryck"
ER_FIELD_NOT_FOUND_PART_ERROR
+ chi "在表中找ä¸åˆ°åˆ†åŒºåŠŸèƒ½çš„字段列表中的字段"
eng "Field in list of fields for partition function not found in table"
ger "Felder in der Feldliste der Partitionierungsfunktion wurden in der Tabelle nicht gefunden"
swe "Fält i listan av fält för partitionering med key inte funnen i tabellen"
ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR
+ chi "åªå…许在索引分区中å…许字段列表"
eng "List of fields is only allowed in KEY partitions"
ger "Eine Feldliste ist nur in KEY-Partitionen erlaubt"
swe "En lista av fält är endast tillåtet för KEY partitioner"
ER_INCONSISTENT_PARTITION_INFO_ERROR
+ chi "FRM文件中的分区信æ¯ä¸ä¸Žå¯ä»¥å†™å…¥FRM文件的内容一致"
eng "The partition info in the frm file is not consistent with what can be written into the frm file"
ger "Die Partitionierungsinformationen in der frm-Datei stimmen nicht mit dem überein, was in die frm-Datei geschrieben werden kann"
swe "Partitioneringsinformationen i frm-filen är inte konsistent med vad som kan skrivas i frm-filen"
ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
+ chi "%-.192s函数返回错误的类型"
eng "The %-.192s function returns the wrong type"
ger "Die %-.192s-Funktion gibt einen falschen Typ zurück"
swe "%-.192s-funktionen returnerar felaktig typ"
ER_PARTITIONS_MUST_BE_DEFINED_ERROR
+ chi "对于%-.64s分区必须定义æ¯ä¸ªåˆ†åŒº"
eng "For %-.64s partitions each partition must be defined"
ger "Für %-.64s-Partitionen muss jede Partition definiert sein"
swe "För %-.64s partitionering så måste varje partition definieras"
ER_RANGE_NOT_INCREASING_ERROR
+ chi "æ¯ä¸ªåˆ†åŒºçš„VALUES LESS THAN的值必须严格增加"
eng "VALUES LESS THAN value must be strictly increasing for each partition"
ger "Werte in VALUES LESS THAN müssen für jede Partition strikt aufsteigend sein"
swe "Värden i VALUES LESS THAN måste vara strikt växande för varje partition"
ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR
+ chi "VALUES值必须与分区函数相åŒ"
eng "VALUES value must be of same type as partition function"
ger "VALUES-Werte müssen vom selben Typ wie die Partitionierungsfunktion sein"
swe "Värden i VALUES måste vara av samma typ som partitioneringsfunktionen"
ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR
+ chi "列表分区中相åŒå¸¸é‡çš„多个定义"
eng "Multiple definition of same constant in list partitioning"
ger "Mehrfachdefinition derselben Konstante bei Listen-Partitionierung"
swe "Multipel definition av samma konstant i list partitionering"
ER_PARTITION_ENTRY_ERROR
+ chi "分区ä¸èƒ½åœ¨æŸ¥è¯¢ä¸­ç‹¬ç«‹ä½¿ç”¨"
eng "Partitioning can not be used stand-alone in query"
ger "Partitionierung kann in einer Abfrage nicht alleinstehend benutzt werden"
swe "Partitioneringssyntax kan inte användas på egen hand i en SQL-fråga"
ER_MIX_HANDLER_ERROR
+ chi "此版本的MariaDB中ä¸å…许分区中的处ç†ç¨‹åºæ··åˆ"
eng "The mix of handlers in the partitions is not allowed in this version of MariaDB"
ger "Das Vermischen von Handlern in Partitionen ist in dieser Version von MariaDB nicht erlaubt"
swe "Denna mix av lagringsmotorer är inte tillåten i denna version av MariaDB"
ER_PARTITION_NOT_DEFINED_ERROR
+ chi "对于分区引擎,需è¦å®šä¹‰æ‰€æœ‰%-.64s"
eng "For the partitioned engine it is necessary to define all %-.64s"
ger "Für die partitionierte Engine müssen alle %-.64s definiert sein"
swe "För partitioneringsmotorn så är det nödvändigt att definiera alla %-.64s"
ER_TOO_MANY_PARTITIONS_ERROR
+ chi "定义了太多分区(包括å­ç»„分)"
eng "Too many partitions (including subpartitions) were defined"
ger "Es wurden zu vielen Partitionen (einschließlich Unterpartitionen) definiert"
swe "För många partitioner (inkluderande subpartitioner) definierades"
ER_SUBPARTITION_ERROR
+ chi "åªæœ‰åœ¨å­èŠ‚分节的HASH/KEY分区中å¯ä»¥æ··åˆRANGE/LIST分区"
eng "It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning"
ger "RANGE/LIST-Partitionierung kann bei Unterpartitionen nur zusammen mit HASH/KEY-Partitionierung verwendet werden"
swe "Det är endast möjligt att blanda RANGE/LIST partitionering med HASH/KEY partitionering för subpartitionering"
ER_CANT_CREATE_HANDLER_FILE
+ chi "无法创建特定的处ç†ç¨‹åºæ–‡ä»¶"
eng "Failed to create specific handler file"
ger "Erzeugen einer spezifischen Handler-Datei fehlgeschlagen"
swe "Misslyckades med att skapa specifik fil i lagringsmotor"
ER_BLOB_FIELD_IN_PART_FUNC_ERROR
+ chi "分区功能中ä¸å…许BLOB字段"
eng "A BLOB field is not allowed in partition function"
ger "In der Partitionierungsfunktion sind BLOB-Spalten nicht erlaubt"
swe "Ett BLOB-fält är inte tillåtet i partitioneringsfunktioner"
ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
+ chi "A%-.192s必须包å«è¡¨çš„分区功能中的所有列"
eng "A %-.192s must include all columns in the table's partitioning function"
ER_NO_PARTS_ERROR
+ chi "ä¸å…许%-.64s = 0"
eng "Number of %-.64s = 0 is not an allowed value"
ger "Eine Anzahl von %-.64s = 0 ist kein erlaubter Wert"
swe "Antal %-.64s = 0 är inte ett tillåten värde"
ER_PARTITION_MGMT_ON_NONPARTITIONED
+ chi "ä¸åˆ†åŒºè¡¨ä¸Šçš„分区管ç†æ˜¯ä¸å¯èƒ½çš„"
eng "Partition management on a not partitioned table is not possible"
ger "Partitionsverwaltung einer nicht partitionierten Tabelle ist nicht möglich"
swe "Partitioneringskommando på en opartitionerad tabell är inte möjligt"
ER_FOREIGN_KEY_ON_PARTITIONED
+ chi "ä¸æ”¯æŒå¤–é”®å­å¥å’Œåˆ†åŒºç»“åˆä½¿ç”¨"
eng "Foreign key clause is not yet supported in conjunction with partitioning"
ger "Fremdschlüssel-Beschränkungen sind im Zusammenhang mit Partitionierung nicht zulässig"
swe "Foreign key klausul är inte ännu implementerad i kombination med partitionering"
ER_DROP_PARTITION_NON_EXISTENT
+ chi "分区列表错误%-.64s"
eng "Error in list of partitions to %-.64s"
ger "Fehler in der Partitionsliste bei %-.64s"
swe "Fel i listan av partitioner att %-.64s"
ER_DROP_LAST_PARTITION
+ chi "无法删除所有分区,请使用删除表"
eng "Cannot remove all partitions, use DROP TABLE instead"
ger "Es lassen sich nicht sämtliche Partitionen löschen, benutzen Sie statt dessen DROP TABLE"
swe "Det är inte tillåtet att ta bort alla partitioner, använd DROP TABLE istället"
ER_COALESCE_ONLY_ON_HASH_PARTITION
+ chi "COALESCE分区åªèƒ½ç”¨äºŽå“ˆå¸Œ/索引分区"
eng "COALESCE PARTITION can only be used on HASH/KEY partitions"
ger "COALESCE PARTITION kann nur auf HASH- oder KEY-Partitionen benutzt werden"
swe "COALESCE PARTITION kan bara användas på HASH/KEY partitioner"
ER_REORG_HASH_ONLY_ON_SAME_NO
+ chi "REORGANIZE PARTITIONåªèƒ½ç”¨äºŽé‡æ–°ç»„织ä¸æ”¹å˜ä»–们的数字的分区"
eng "REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers"
ger "REORGANIZE PARTITION kann nur zur Reorganisation von Partitionen verwendet werden, nicht, um ihre Nummern zu ändern"
swe "REORGANIZE PARTITION kan bara användas för att omorganisera partitioner, inte för att ändra deras antal"
ER_REORG_NO_PARAM_ERROR
+ chi "没有å‚æ•°çš„REORGANIZE PARTITIONåªèƒ½ç”¨äºŽHASH PARTITION的自动分区表"
eng "REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs"
ger "REORGANIZE PARTITION ohne Parameter kann nur für auto-partitionierte Tabellen verwendet werden, die HASH-Partitionierung benutzen"
swe "REORGANIZE PARTITION utan parametrar kan bara användas på auto-partitionerade tabeller som använder HASH partitionering"
ER_ONLY_ON_RANGE_LIST_PARTITION
+ chi "%-.64s分区åªèƒ½ç”¨äºŽRANGE/LIST分区"
eng "%-.64s PARTITION can only be used on RANGE/LIST partitions"
ger "%-.64s PARTITION kann nur für RANGE- oder LIST-Partitionen verwendet werden"
swe "%-.64s PARTITION kan bara användas på RANGE/LIST-partitioner"
ER_ADD_PARTITION_SUBPART_ERROR
+ chi "å°è¯•ç”¨é”™è¯¯æ•°é‡çš„å­åˆ†åŒºæ·»åŠ åˆ†åŒº"
eng "Trying to Add partition(s) with wrong number of subpartitions"
ger "Es wurde versucht, eine oder mehrere Partitionen mit der falschen Anzahl von Unterpartitionen hinzuzufügen"
swe "ADD PARTITION med fel antal subpartitioner"
ER_ADD_PARTITION_NO_NEW_PARTITION
+ chi "必须添加至少一个分区"
eng "At least one partition must be added"
ger "Es muss zumindest eine Partition hinzugefügt werden"
swe "Åtminstone en partition måste läggas till vid ADD PARTITION"
ER_COALESCE_PARTITION_NO_PARTITION
+ chi "至少一个分区必须åˆå¹¶"
eng "At least one partition must be coalesced"
ger "Zumindest eine Partition muss mit COALESCE PARTITION zusammengefügt werden"
swe "Åtminstone en partition måste slås ihop vid COALESCE PARTITION"
ER_REORG_PARTITION_NOT_EXIST
+ chi "分区é‡ç»„é‡è¶…过而ä¸æ˜¯åˆ†åŒºé‡"
eng "More partitions to reorganize than there are partitions"
ger "Es wurde versucht, mehr Partitionen als vorhanden zu reorganisieren"
swe "Fler partitioner att reorganisera än det finns partitioner"
ER_SAME_NAME_PARTITION
+ chi "é‡å¤åˆ†åŒºå称%-.192s"
eng "Duplicate partition name %-.192s"
ger "Doppelter Partitionsname: %-.192s"
swe "Duplicerat partitionsnamn %-.192s"
ER_NO_BINLOG_ERROR
+ chi "在此命令上ä¸å…许关闭binlog"
eng "It is not allowed to shut off binlog on this command"
ger "Es es nicht erlaubt, bei diesem Befehl binlog abzuschalten"
swe "Det är inte tillåtet att stänga av binlog på detta kommando"
ER_CONSECUTIVE_REORG_PARTITIONS
+ chi "在é‡æ–°ç»„织一组分区时,它们必须按照次åº"
eng "When reorganizing a set of partitions they must be in consecutive order"
ger "Bei der Reorganisation eines Satzes von Partitionen müssen diese in geordneter Reihenfolge vorliegen"
swe "När ett antal partitioner omorganiseras måste de vara i konsekutiv ordning"
ER_REORG_OUTSIDE_RANGE
+ chi "é‡ç»„范围分区无法更改除最åŽåˆ†åŒºä¹‹å¤–的总范围,无法扩展范围"
eng "Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range"
ger "Die Reorganisation von RANGE-Partitionen kann Gesamtbereiche nicht verändern, mit Ausnahme der letzten Partition, die den Bereich erweitern kann"
swe "Reorganisering av rangepartitioner kan inte ändra den totala intervallet utom för den sista partitionen där intervallet kan utökas"
ER_PARTITION_FUNCTION_FAILURE
+ chi "此版ä¸æ”¯æŒæ­¤å¤„ç†ç¨‹åºçš„分区功能"
eng "Partition function not supported in this version for this handler"
ger "Partitionsfunktion in dieser Version dieses Handlers nicht unterstützt"
ER_PART_STATE_ERROR
+ chi "无法从CREATE/ALTER表中定义分区状æ€"
eng "Partition state cannot be defined from CREATE/ALTER TABLE"
ger "Partitionszustand kann nicht von CREATE oder ALTER TABLE aus definiert werden"
swe "Partition state kan inte definieras från CREATE/ALTER TABLE"
ER_LIMITED_PART_RANGE
+ chi "%-.64s处ç†ç¨‹åºä»…支æŒ32-bitæ•´æ•°"
eng "The %-.64s handler only supports 32 bit integers in VALUES"
ger "Der Handler %-.64s unterstützt in VALUES nur 32-Bit-Integers"
swe "%-.64s stödjer endast 32 bitar i integers i VALUES"
ER_PLUGIN_IS_NOT_LOADED
+ chi "æ’件'%-.192s'未加载"
eng "Plugin '%-.192s' is not loaded"
ger "Plugin '%-.192s' ist nicht geladen"
ER_WRONG_VALUE
+ chi "错误%-.32s值:'%-.128T'"
eng "Incorrect %-.32s value: '%-.128T'"
ger "Falscher %-.32s-Wert: '%-.128T'"
ER_NO_PARTITION_FOR_GIVEN_VALUE
+ chi "表没有%-.64s的分区"
eng "Table has no partition for value %-.64s"
ger "Tabelle hat für den Wert %-.64s keine Partition"
ER_FILEGROUP_OPTION_ONLY_ONCE
+ chi "设置%sä¸èƒ½è¶…过一次"
eng "It is not allowed to specify %s more than once"
ger "%s darf nicht mehr als einmal angegegeben werden"
ER_CREATE_FILEGROUP_FAILED
+ chi "无法创建%s"
eng "Failed to create %s"
ger "Anlegen von %s fehlgeschlagen"
hindi "%s को बनाने में असफल रहे"
ER_DROP_FILEGROUP_FAILED
+ chi "未能DROP%s"
eng "Failed to drop %s"
ger "Löschen von %s fehlgeschlagen"
hindi "%s को हटाने में असफल रहे"
ER_TABLESPACE_AUTO_EXTEND_ERROR
+ chi "处ç†ç¨‹åºä¸æ”¯æŒè¡¨ç©ºé—´çš„自动扩展å"
eng "The handler doesn't support autoextend of tablespaces"
ger "Der Handler unterstützt keine automatische Erweiterung (Autoextend) von Tablespaces"
ER_WRONG_SIZE_NUMBER
+ chi "尺寸å‚数被错误地指定,编å·æˆ–表å•10M"
eng "A size parameter was incorrectly specified, either number or on the form 10M"
ger "Ein Größen-Parameter wurde unkorrekt angegeben, muss entweder Zahl sein oder im Format 10M"
ER_SIZE_OVERFLOW_ERROR
+ chi "尺寸编å·æ˜¯æ­£ç¡®çš„,但我们ä¸å…许数字部分超过20亿"
eng "The size number was correct but we don't allow the digit part to be more than 2 billion"
ger "Die Zahl für die Größe war korrekt, aber der Zahlanteil darf nicht größer als 2 Milliarden sein"
ER_ALTER_FILEGROUP_FAILED
+ chi "未能改å˜ï¼š%s"
eng "Failed to alter: %s"
ger "Änderung von %s fehlgeschlagen"
hindi "%s को ALTER करने में असफल रहे"
ER_BINLOG_ROW_LOGGING_FAILED
+ chi "将一行写入基于行的二进制日志失败"
eng "Writing one row to the row-based binary log failed"
ger "Schreiben einer Zeilen ins zeilenbasierte Binärlog fehlgeschlagen"
ER_BINLOG_ROW_WRONG_TABLE_DEF
+ chi "表定义主机和从站ä¸åŒ¹é…:%s"
eng "Table definition on master and slave does not match: %s"
ger "Tabellendefinition auf Master und Slave stimmt nicht überein: %s"
ER_BINLOG_ROW_RBR_TO_SBR
+ chi "使用--log-slave-updates的从站必须使用基于行的二进制日志记录,以便能够å¤åˆ¶åŸºäºŽè¡Œçš„二进制日志事件"
eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
ger "Slave, die mit --log-slave-updates laufen, müssen zeilenbasiertes Loggen verwenden, um zeilenbasierte Binärlog-Ereignisse loggen zu können"
ER_EVENT_ALREADY_EXISTS
+ chi "事件'%-.192s'å·²ç»å­˜åœ¨"
eng "Event '%-.192s' already exists"
ger "Event '%-.192s' existiert bereits"
ER_EVENT_STORE_FAILED
+ chi "无法存储事件%s。错误代ç %Mæ¥è‡ªå­˜å‚¨å¼•æ“Ž"
eng "Failed to store event %s. Error code %M from storage engine"
ger "Speichern von Event %s fehlgeschlagen. Fehlercode der Speicher-Engine: %M"
ER_EVENT_DOES_NOT_EXIST
+ chi "未知事件'%-.192s'"
eng "Unknown event '%-.192s'"
ger "Unbekanntes Event '%-.192s'"
ER_EVENT_CANT_ALTER
+ chi "无法改å˜äº‹ä»¶'%-.192s'"
eng "Failed to alter event '%-.192s'"
ger "Ändern des Events '%-.192s' fehlgeschlagen"
hindi "'%-.192s' EVENT को ALTER करने में असफल रहे"
ER_EVENT_DROP_FAILED
+ chi "未能DROP%s"
eng "Failed to drop %s"
ger "Löschen von %s fehlgeschlagen"
hindi "%s को हटाने में असफल रहे"
ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
+ chi "INTERVAL为负或太大"
eng "INTERVAL is either not positive or too big"
ger "INTERVAL ist entweder nicht positiv oder zu groß"
ER_EVENT_ENDS_BEFORE_STARTS
+ chi "ENDS无效的或在STARTS之å‰"
eng "ENDS is either invalid or before STARTS"
ger "ENDS ist entweder ungültig oder liegt vor STARTS"
ER_EVENT_EXEC_TIME_IN_THE_PAST
- eng "Event execution time is in the past. Event has been disabled"
- ger "Ausführungszeit des Events liegt in der Vergangenheit. Event wurde deaktiviert"
+ chi "事件执行时间在过去。事件已被ç¦ç”¨"
+ eng "Event execution time is in the past. Event has been disabled"
+ ger "Ausführungszeit des Events liegt in der Vergangenheit. Event wurde deaktiviert"
ER_EVENT_OPEN_TABLE_FAILED
+ chi "无法打开mysql.event"
eng "Failed to open mysql.event"
ger "Öffnen von mysql.event fehlgeschlagen"
hindi "mysql.event को खोलने में असफल रहे"
ER_EVENT_NEITHER_M_EXPR_NOR_M_AT
+ chi "没有æä¾›DateTime表达å¼"
eng "No datetime expression provided"
ger "Kein DATETIME-Ausdruck angegeben"
-
ER_UNUSED_2
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_UNUSED_3
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_EVENT_CANNOT_DELETE
+ chi "无法从mysql.event删除该事件"
eng "Failed to delete the event from mysql.event"
ger "Löschen des Events aus mysql.event fehlgeschlagen"
hindi "EVENT को mysql.event से हटाने मैं असफल रहे"
ER_EVENT_COMPILE_ERROR
+ chi "在汇编事件的主体时出错"
eng "Error during compilation of event's body"
ger "Fehler beim Kompilieren des Event-Bodys"
ER_EVENT_SAME_NAME
+ chi "相åŒçš„旧活动å称"
eng "Same old and new event name"
ger "Alter und neuer Event-Name sind gleich"
ER_EVENT_DATA_TOO_LONG
+ chi "列'%s'æ•°æ®å¤ªé•¿"
eng "Data for column '%s' too long"
ger "Daten der Spalte '%s' zu lang"
ER_DROP_INDEX_FK
+ chi "无法删除索引'%-.192s':外部索引约æŸä¸­éœ€è¦å®ƒ"
eng "Cannot drop index '%-.192s': needed in a foreign key constraint"
ger "Kann Index '%-.192s' nicht löschen: wird für eine Fremdschlüsselbeschränkung benötigt"
# When using this error message, use the ER_WARN_DEPRECATED_SYNTAX error
# code.
ER_WARN_DEPRECATED_SYNTAX_WITH_VER
+ chi "语法'%s'被弃用,将在Mariadb%s中删除。请使用%s"
eng "The syntax '%s' is deprecated and will be removed in MariaDB %s. Please use %s instead"
ger "Die Syntax '%s' ist veraltet und wird in MariaDB %s entfernt. Bitte benutzen Sie statt dessen %s"
ER_CANT_WRITE_LOCK_LOG_TABLE
+ chi "您无法获得日志表的写é”。åªæœ‰è¯»è®¿é—®æ˜¯å¯èƒ½çš„"
eng "You can't write-lock a log table. Only read access is possible"
ger "Eine Log-Tabelle kann nicht schreibgesperrt werden. Es ist ohnehin nur Lesezugriff möglich"
ER_CANT_LOCK_LOG_TABLE
+ chi "您无法使用带日志表的é”"
eng "You can't use locks with log tables"
ger "Log-Tabellen können nicht gesperrt werden"
ER_UNUSED_4
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
+ chi "mysql的列计数。%s是错误的。预期%d,找到%d。使用MariaDB%d创建,现在è¿è¡Œ%d。请使用mysql_upgradeæ¥ä¿®å¤æ­¤é”™è¯¯"
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MariaDB %d, now running %d. Please use mysql_upgrade to fix this error"
ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MariaDB %d, jetzt unter %d. Bitte benutzen Sie mysql_upgrade, um den Fehler zu beheben"
ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
+ chi "当会è¯æ‰“开临时表时,无法切æ¢å‡ºåŸºäºŽè¡Œçš„二进制日志格å¼"
eng "Cannot switch out of the row-based binary log format when the session has open temporary tables"
ger "Kann nicht aus dem zeilenbasierten Binärlog-Format herauswechseln, wenn die Sitzung offene temporäre Tabellen hat"
ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT
+ chi "无法更改存储函数或触å‘器内的二进制记录格å¼"
eng "Cannot change the binary logging format inside a stored function or trigger"
ger "Das Binärlog-Format kann innerhalb einer gespeicherten Funktion oder eines Triggers nicht geändert werden"
ER_UNUSED_13
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_PARTITION_NO_TEMPORARY
+ chi "无法使用分区创建临时表"
eng "Cannot create temporary table with partitions"
ger "Anlegen temporärer Tabellen mit Partitionen nicht möglich"
hindi "असà¥à¤¥à¤¾à¤ˆ टेबल को पारà¥à¤Ÿà¤¿à¤¶à¤¨à¥à¤¸ के साथ नहीं बनाया जा सकता"
ER_PARTITION_CONST_DOMAIN_ERROR
+ chi "分区常é‡è¶…出分区功能域"
eng "Partition constant is out of partition function domain"
ger "Partitionskonstante liegt außerhalb der Partitionsfunktionsdomäne"
swe "Partitionskonstanten är utanför partitioneringsfunktionens domän"
ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+ chi "ä¸å…许此分区功能"
eng "This partition function is not allowed"
ger "Diese Partitionierungsfunktion ist nicht erlaubt"
swe "Denna partitioneringsfunktion är inte tillåten"
ER_DDL_LOG_ERROR
+ chi "DDL日志中的错误"
eng "Error in DDL log"
ger "Fehler im DDL-Log"
hindi "DDL लॉग में तà¥à¤°à¥à¤Ÿà¤¿ हà¥à¤ˆ"
ER_NULL_IN_VALUES_LESS_THAN
+ chi "VALUES LESS THANä¸å…许使用NULL"
eng "Not allowed to use NULL value in VALUES LESS THAN"
ger "In VALUES LESS THAN dürfen keine NULL-Werte verwendet werden"
swe "Det är inte tillåtet att använda NULL-värden i VALUES LESS THAN"
ER_WRONG_PARTITION_NAME
+ chi "分区å称ä¸æ­£ç¡®"
eng "Incorrect partition name"
ger "Falscher Partitionsname"
hindi "पारà¥à¤Ÿà¥€à¤¶à¤¨ का नाम गलत है"
swe "Felaktigt partitionsnamn"
ER_CANT_CHANGE_TX_CHARACTERISTICS 25001
+ chi "交易正在进行,无法更改事务特性"
eng "Transaction characteristics can't be changed while a transaction is in progress"
ER_DUP_ENTRY_AUTOINCREMENT_CASE
+ chi "ALTER TABLE表会导致AUTO_INCREMENTé‡å»ºï¼Œå¯¼è‡´é‡å¤çš„æ¡ç›®'%-.192T'用于索引'%-.192s'"
eng "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%-.192T' for key '%-.192s'"
ger "ALTER TABLE führt zur Neusequenzierung von auto_increment, wodurch der doppelte Eintrag '%-.192T' für Schlüssel '%-.192s' auftritt"
ER_EVENT_MODIFY_QUEUE_ERROR
+ chi "内部调度器错误%d"
eng "Internal scheduler error %d"
ger "Interner Scheduler-Fehler %d"
ER_EVENT_SET_VAR_ERROR
+ chi "在开始/åœæ­¢è°ƒåº¦ç¨‹åºæœŸé—´å‡ºé”™ã€‚错误代ç %M"
eng "Error during starting/stopping of the scheduler. Error code %M"
ger "Fehler während des Startens oder Anhalten des Schedulers. Fehlercode %M"
ER_PARTITION_MERGE_ERROR
+ chi "引擎ä¸èƒ½ç”¨äºŽåˆ†åŒºè¡¨"
eng "Engine cannot be used in partitioned tables"
ger "Engine kann in partitionierten Tabellen nicht verwendet werden"
swe "Engine inte användas i en partitionerad tabell"
ER_CANT_ACTIVATE_LOG
+ chi "无法激活'%-.64s'日志"
eng "Cannot activate '%-.64s' log"
ger "Kann Logdatei '%-.64s' nicht aktivieren"
ER_RBR_NOT_AVAILABLE
+ chi "æœåŠ¡å™¨ä¸æ˜¯åŸºäºŽè¡Œçš„å¤åˆ¶æž„建的"
eng "The server was not built with row-based replication"
ger "Der Server wurde nicht mit zeilenbasierter Replikation gebaut"
ER_BASE64_DECODE_ERROR
+ chi "Base64字符串的解ç å¤±è´¥"
eng "Decoding of base64 string failed"
- swe "Avkodning av base64 sträng misslyckades"
ger "Der Server hat keine zeilenbasierte Replikation"
+ swe "Avkodning av base64 sträng misslyckades"
ER_EVENT_RECURSION_FORBIDDEN
+ chi "EVENT主体存在时EVENT DDL语å¥é€’归被ç¦æ­¢"
eng "Recursion of EVENT DDL statements is forbidden when body is present"
ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil (Body) existiert"
ER_EVENTS_DB_ERROR
+ chi "无法继续,因为事件调度程åºå·²ç¦ç”¨"
eng "Cannot proceed, because event scheduler is disabled"
ger "Die Operation kann nicht fortgesetzt werden, da Event Scheduler deaktiviert ist."
ER_ONLY_INTEGERS_ALLOWED
+ chi "这里åªå…许整数作为数字"
eng "Only integers allowed as number here"
ger "An dieser Stelle sind nur Ganzzahlen zulässig"
ER_UNSUPORTED_LOG_ENGINE
+ chi "存储引擎%sä¸èƒ½ç”¨äºŽæ—¥å¿—表"
eng "Storage engine %s cannot be used for log tables"
ger "Speicher-Engine %s kann für Logtabellen nicht verwendet werden"
hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s को लॉग टेबलà¥à¤¸ के लिठइसà¥à¤¤à¥‡à¤®à¤¾à¤² नहीं किया जा सकता है"
ER_BAD_LOG_STATEMENT
+ chi "如果å¯ç”¨æ—¥å¿—记录,则无法'%s'日志表"
eng "You cannot '%s' a log table if logging is enabled"
ger "Sie können eine Logtabelle nicht '%s', wenn Loggen angeschaltet ist"
ER_CANT_RENAME_LOG_TABLE
+ chi "无法é‡å‘½å'%s'。å¯ç”¨æ—¥å¿—记录时,é‡å‘½å日志表必须é‡å‘½å两个表:日志表到存档表,å¦ä¸€ä¸ªè¡¨è¿”回'%s'"
eng "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'"
ger "Kann '%s' nicht umbenennen. Wenn Loggen angeschaltet ist, müssen zwei Tabellen umbenannt werden: die Logtabelle zu einer Archivtabelle, und eine weitere Tabelle zu '%s'"
ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 42000
+ chi "对本机函数的呼å«ä¸­çš„å‚数计数ä¸æ­£ç¡®'%-.192s'"
eng "Incorrect parameter count in the call to native function '%-.192s'"
ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.192s'"
ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000
+ chi "对本机函数'%-.192s'呼å«ä¸­çš„å‚æ•°ä¸æ­£ç¡®"
eng "Incorrect parameters in the call to native function '%-.192s'"
ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.192s'"
ER_WRONG_PARAMETERS_TO_STORED_FCT 42000
+ chi "呼å«ä¸­çš„å‚æ•°ä¸æ­£ç¡®ä¸ºå­˜å‚¨å‡½æ•°'%-.192s'"
eng "Incorrect parameters in the call to stored function '%-.192s'"
ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.192s'"
ER_NATIVE_FCT_NAME_COLLISION
+ chi "此功能'%-.192s'具有与本机函数相åŒçš„å称"
eng "This function '%-.192s' has the same name as a native function"
ger "Die Funktion '%-.192s' hat denselben Namen wie eine native Funktion"
# When using this error message, use the ER_DUP_ENTRY error code. See, for
# example, code in handler.cc.
ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009
+ chi "é‡å¤æ¡ç›®'%-.64T'é”®'%-.192s'"
cze "Zvojený klÃ­Ä '%-.64T' (Äíslo klíÄe '%-.192s')"
dan "Ens værdier '%-.64T' for indeks '%-.192s'"
- nla "Dubbele ingang '%-.64T' voor zoeksleutel '%-.192s'"
eng "Duplicate entry '%-.64T' for key '%-.192s'"
est "Kattuv väärtus '%-.64T' võtmele '%-.192s'"
fre "Duplicata du champ '%-.64T' pour la clef '%-.192s'"
@@ -6187,6 +6767,7 @@ ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009
ita "Valore duplicato '%-.64T' per la chiave '%-.192s'"
jpn "'%-.64T' ã¯ç´¢å¼• '%-.192s' ã§é‡è¤‡ã—ã¦ã„ã¾ã™ã€‚"
kor "ì¤‘ë³µëœ ìž…ë ¥ ê°’ '%-.64T': key '%-.192s'"
+ nla "Dubbele ingang '%-.64T' voor zoeksleutel '%-.192s'"
nor "Like verdier '%-.64T' for nøkkel '%-.192s'"
norwegian-ny "Like verdiar '%-.64T' for nykkel '%-.192s'"
pol "Powtórzone wystąpienie '%-.64T' dla klucza '%-.192s'"
@@ -6199,344 +6780,438 @@ ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009
swe "Dublett '%-.64T' för nyckel '%-.192s'"
ukr "Дублюючий Ð·Ð°Ð¿Ð¸Ñ '%-.64T' Ð´Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° '%-.192s'"
ER_BINLOG_PURGE_EMFILE
- eng "Too many files opened, please execute the command again"
- ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus"
+ chi "打开太多文件,请å†æ¬¡æ‰§è¡Œå‘½ä»¤"
+ eng "Too many files opened, please execute the command again"
+ ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus"
ER_EVENT_CANNOT_CREATE_IN_THE_PAST
- eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation"
- ger "Ausführungszeit des Events liegt in der Vergangenheit, und es wurde ON COMPLETION NOT PRESERVE gesetzt. Das Event wurde unmittelbar nach Erzeugung gelöscht"
+ chi "事件执行时间在过去,并ON COMPLETION NOT PRESERVE。创建åŽï¼Œäº‹ä»¶ç«‹å³ä¸¢å¼ƒ"
+ eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation"
+ ger "Ausführungszeit des Events liegt in der Vergangenheit, und es wurde ON COMPLETION NOT PRESERVE gesetzt. Das Event wurde unmittelbar nach Erzeugung gelöscht"
ER_EVENT_CANNOT_ALTER_IN_THE_PAST
- eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future"
- ger "Execution Zeitpunkt des Ereignisses in der Vergangenheit liegt, und es war NACH ABSCHLUSS Set nicht erhalten. Die Veranstaltung wurde nicht verändert. Geben Sie einen Zeitpunkt in der Zukunft"
+ chi "事件执行时间在过去,并ON COMPLETION NOT PRESERVE。事件没有改å˜ã€‚指定将æ¥çš„时间"
+ eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future"
+ ger "Execution Zeitpunkt des Ereignisses in der Vergangenheit liegt, und es war NACH ABSCHLUSS Set nicht erhalten. Die Veranstaltung wurde nicht verändert. Geben Sie einen Zeitpunkt in der Zukunft"
ER_SLAVE_INCIDENT
- eng "The incident %s occurred on the master. Message: %-.64s"
- ger "Der Vorfall %s passierte auf dem Master. Meldung: %-.64s"
+ chi "事件%så‘生在master上。消æ¯ï¼š%-.64s"
+ eng "The incident %s occurred on the master. Message: %-.64s"
+ ger "Der Vorfall %s passierte auf dem Master. Meldung: %-.64s"
ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT
- eng "Table has no partition for some existing values"
- ger "Tabelle hat für einige bestehende Werte keine Partition"
+ chi "表对æŸäº›çŽ°æœ‰å€¼æ²¡æœ‰åˆ†åŒº"
+ eng "Table has no partition for some existing values"
+ ger "Tabelle hat für einige bestehende Werte keine Partition"
ER_BINLOG_UNSAFE_STATEMENT
- eng "Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. %s"
- swe "Detta är inte säkert att logga i statement-format, för BINLOG_FORMAT = STATEMENT. %s"
- ger "Unsichere Anweisung ins Binärlog geschrieben, weil Anweisungsformat BINLOG_FORMAT = STATEMENT. %s"
+ chi "自从BINLOG_FORMAT =STATEMENT以æ¥ï¼Œä½¿ç”¨è¯­å¥æ ¼å¼å†™å…¥äºŒè¿›åˆ¶æ—¥å¿—çš„ä¸å®‰å…¨è¯­å¥ã€‚%s."
+ eng "Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. %s"
+ ger "Unsichere Anweisung ins Binärlog geschrieben, weil Anweisungsformat BINLOG_FORMAT = STATEMENT. %s"
+ swe "Detta är inte säkert att logga i statement-format, för BINLOG_FORMAT = STATEMENT. %s"
ER_SLAVE_FATAL_ERROR
- eng "Fatal error: %s"
- ger "Fataler Fehler: %s"
+ chi "致命错误:%s"
+ eng "Fatal error: %s"
+ ger "Fataler Fehler: %s"
ER_SLAVE_RELAY_LOG_READ_FAILURE
- eng "Relay log read failure: %s"
- ger "Relaylog-Lesefehler: %s"
+ chi "relay日志读å–失败:%s"
+ eng "Relay log read failure: %s"
+ ger "Relaylog-Lesefehler: %s"
ER_SLAVE_RELAY_LOG_WRITE_FAILURE
- eng "Relay log write failure: %s"
- ger "Relaylog-Schreibfehler: %s"
+ chi "relay日志写入失败:%s"
+ eng "Relay log write failure: %s"
+ ger "Relaylog-Schreibfehler: %s"
ER_SLAVE_CREATE_EVENT_FAILURE
- eng "Failed to create %s"
- ger "Erzeugen von %s fehlgeschlagen"
- hindi "%s को बनाने मैं असफल रहे"
+ chi "无法创建%s"
+ eng "Failed to create %s"
+ ger "Erzeugen von %s fehlgeschlagen"
+ hindi "%s को बनाने मैं असफल रहे"
ER_SLAVE_MASTER_COM_FAILURE
- eng "Master command %s failed: %s"
- ger "Master-Befehl %s fehlgeschlagen: %s"
+ chi "Master命令%s失败:%s"
+ eng "Master command %s failed: %s"
+ ger "Master-Befehl %s fehlgeschlagen: %s"
ER_BINLOG_LOGGING_IMPOSSIBLE
- eng "Binary logging not possible. Message: %s"
- ger "Binärlogging nicht möglich. Meldung: %s"
+ chi "二进制记录ä¸å¯èƒ½ã€‚消æ¯ï¼š%s"
+ eng "Binary logging not possible. Message: %s"
+ ger "Binärlogging nicht möglich. Meldung: %s"
ER_VIEW_NO_CREATION_CTX
- eng "View %`s.%`s has no creation context"
- ger "View %`s.%`s hat keinen Erzeugungskontext"
+ chi "View%`s.%`s没有创建上下文"
+ eng "View %`s.%`s has no creation context"
+ ger "View %`s.%`s hat keinen Erzeugungskontext"
ER_VIEW_INVALID_CREATION_CTX
- eng "Creation context of view %`s.%`s is invalid"
- ger "Erzeugungskontext des Views%`s.%`s ist ungültig"
+ chi "Creation View%`s.%`s的上下文无效"
+ eng "Creation context of view %`s.%`s is invalid"
+ ger "Erzeugungskontext des Views%`s.%`s ist ungültig"
ER_SR_INVALID_CREATION_CTX
- eng "Creation context of stored routine %`s.%`s is invalid"
- ger "Erzeugungskontext der gespeicherten Routine%`s.%`s ist ungültig"
+ chi "存储例程%`s.%`s的创建上下文无效"
+ eng "Creation context of stored routine %`s.%`s is invalid"
+ ger "Erzeugungskontext der gespeicherten Routine%`s.%`s ist ungültig"
ER_TRG_CORRUPTED_FILE
- eng "Corrupted TRG file for table %`s.%`s"
- ger "Beschädigte TRG-Datei für Tabelle %`s.%`s"
+ chi "表的trg文件æŸå了。%`s.%`s"
+ eng "Corrupted TRG file for table %`s.%`s"
+ ger "Beschädigte TRG-Datei für Tabelle %`s.%`s"
ER_TRG_NO_CREATION_CTX
- eng "Triggers for table %`s.%`s have no creation context"
- ger "Trigger für Tabelle %`s.%`s haben keinen Erzeugungskontext"
+ chi "表%`s.%`s的触å‘器没有创建上下文"
+ eng "Triggers for table %`s.%`s have no creation context"
+ ger "Trigger für Tabelle %`s.%`s haben keinen Erzeugungskontext"
ER_TRG_INVALID_CREATION_CTX
- eng "Trigger creation context of table %`s.%`s is invalid"
- ger "Trigger-Erzeugungskontext der Tabelle %`s.%`s ist ungültig"
+ chi "触å‘表%`s.%`s的创建上下文无效"
+ eng "Trigger creation context of table %`s.%`s is invalid"
+ ger "Trigger-Erzeugungskontext der Tabelle %`s.%`s ist ungültig"
ER_EVENT_INVALID_CREATION_CTX
- eng "Creation context of event %`s.%`s is invalid"
- ger "Erzeugungskontext des Events %`s.%`s ist ungültig"
+ chi "事件%`s.%`s的创建上下文无效"
+ eng "Creation context of event %`s.%`s is invalid"
+ ger "Erzeugungskontext des Events %`s.%`s ist ungültig"
ER_TRG_CANT_OPEN_TABLE
- eng "Cannot open table for trigger %`s.%`s"
- ger "Kann Tabelle für den Trigger %`s.%`s nicht öffnen"
+ chi "无法打开触å‘%`s.%`s的表"
+ eng "Cannot open table for trigger %`s.%`s"
+ ger "Kann Tabelle für den Trigger %`s.%`s nicht öffnen"
ER_CANT_CREATE_SROUTINE
- eng "Cannot create stored routine %`s. Check warnings"
- ger "Kann gespeicherte Routine %`s nicht erzeugen. Beachten Sie die Warnungen"
+ chi "无法创建存储过程%`s。检查警告"
+ eng "Cannot create stored routine %`s. Check warnings"
+ ger "Kann gespeicherte Routine %`s nicht erzeugen. Beachten Sie die Warnungen"
ER_UNUSED_11
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT
- eng "The BINLOG statement of type %s was not preceded by a format description BINLOG statement"
- ger "Der BINLOG-Anweisung vom Typ %s ging keine BINLOG-Anweisung zur Formatbeschreibung voran"
+ chi "类型%sçš„Binlog语å¥æœªåœ¨æ ¼å¼æè¿°binlog语å¥ä¹‹å‰"
+ eng "The BINLOG statement of type %s was not preceded by a format description BINLOG statement"
+ ger "Der BINLOG-Anweisung vom Typ %s ging keine BINLOG-Anweisung zur Formatbeschreibung voran"
ER_SLAVE_CORRUPT_EVENT
- eng "Corrupted replication event was detected"
- ger "Beschädigtes Replikationsereignis entdeckt"
+ chi "检测到æŸåçš„å¤åˆ¶äº‹ä»¶"
+ eng "Corrupted replication event was detected"
+ ger "Beschädigtes Replikationsereignis entdeckt"
ER_LOAD_DATA_INVALID_COLUMN
- eng "Invalid column reference (%-.64s) in LOAD DATA"
- ger "Ungültige Spaltenreferenz (%-.64s) bei LOAD DATA"
+ chi "LOAD DATA中的列引用(%-.64s)无效"
+ eng "Invalid column reference (%-.64s) in LOAD DATA"
+ ger "Ungültige Spaltenreferenz (%-.64s) bei LOAD DATA"
ER_LOG_PURGE_NO_FILE
- eng "Being purged log %s was not found"
- ger "Zu bereinigende Logdatei %s wurde nicht gefunden"
+ chi "未找到清除的log%s"
+ eng "Being purged log %s was not found"
+ ger "Zu bereinigende Logdatei %s wurde nicht gefunden"
ER_XA_RBTIMEOUT XA106
- eng "XA_RBTIMEOUT: Transaction branch was rolled back: took too long"
- ger "XA_RBTIMEOUT: Transaktionszweig wurde zurückgerollt: Zeitüberschreitung"
+ chi "XA_RBTIMEOUT:交易分支回滚:花了太久了"
+ eng "XA_RBTIMEOUT: Transaction branch was rolled back: took too long"
+ ger "XA_RBTIMEOUT: Transaktionszweig wurde zurückgerollt: Zeitüberschreitung"
ER_XA_RBDEADLOCK XA102
- eng "XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected"
- ger "XA_RBDEADLOCK: Transaktionszweig wurde zurückgerollt: Deadlock entdeckt"
+ chi "XA_RBDEADLOCK:交易分支回滚:检测到死é”"
+ eng "XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected"
+ ger "XA_RBDEADLOCK: Transaktionszweig wurde zurückgerollt: Deadlock entdeckt"
ER_NEED_REPREPARE
- eng "Prepared statement needs to be re-prepared"
- ger "Vorbereitete Anweisungen müssen noch einmal vorbereitet werden"
+ chi "prepared statement需è¦é‡æ–°å‡†å¤‡"
+ eng "Prepared statement needs to be re-prepared"
+ ger "Vorbereitete Anweisungen müssen noch einmal vorbereitet werden"
ER_DELAYED_NOT_SUPPORTED
- eng "DELAYED option not supported for table '%-.192s'"
- ger "Die DELAYED-Option wird für Tabelle '%-.192s' nicht unterstützt"
+ chi "表'%-.192s'ä¸æ”¯æŒå»¶è¿Ÿé€‰é¡¹"
+ eng "DELAYED option not supported for table '%-.192s'"
+ ger "Die DELAYED-Option wird für Tabelle '%-.192s' nicht unterstützt"
WARN_NO_MASTER_INFO
- eng "There is no master connection '%.*s'"
- ger "Die Master-Info-Struktur existiert nicht '%.*s'"
+ eng "There is no master connection '%.*s'"
+ ger "Die Master-Info-Struktur existiert nicht '%.*s'"
WARN_OPTION_IGNORED
- eng "<%-.64s> option ignored"
- ger "Option <%-.64s> ignoriert"
+ eng "<%-.64s> option ignored"
+ ger "Option <%-.64s> ignoriert"
ER_PLUGIN_DELETE_BUILTIN
- eng "Built-in plugins cannot be deleted"
- ger "Eingebaute Plugins können nicht gelöscht werden"
+ chi "内置æ’件无法删除"
+ eng "Built-in plugins cannot be deleted"
+ ger "Eingebaute Plugins können nicht gelöscht werden"
WARN_PLUGIN_BUSY
- eng "Plugin is busy and will be uninstalled on shutdown"
- ger "Plugin wird verwendet und wird erst beim Herunterfahren deinstalliert"
+ chi "æ’件很忙,将在关机时å¸è½½"
+ eng "Plugin is busy and will be uninstalled on shutdown"
+ ger "Plugin wird verwendet und wird erst beim Herunterfahren deinstalliert"
ER_VARIABLE_IS_READONLY
- eng "%s variable '%s' is read-only. Use SET %s to assign the value"
- ger "%s Variable '%s' ist nur lesbar. Benutzen Sie SET %s, um einen Wert zuzuweisen"
+ chi "%så˜é‡'%s'是åªè¯»çš„。使用set%s付值"
+ eng "%s variable '%s' is read-only. Use SET %s to assign the value"
+ ger "%s Variable '%s' ist nur lesbar. Benutzen Sie SET %s, um einen Wert zuzuweisen"
ER_WARN_ENGINE_TRANSACTION_ROLLBACK
- eng "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted"
- ger "Speicher-Engine %s unterstützt für diese Anweisung kein Rollback. Transaktion wurde zurückgerollt und muss neu gestartet werden"
+ chi "存储引擎%sä¸æ”¯æŒæ­¤è¯­å¥çš„回滚。交易回滚并必须é‡æ–°å¯åŠ¨"
+ eng "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted"
+ ger "Speicher-Engine %s unterstützt für diese Anweisung kein Rollback. Transaktion wurde zurückgerollt und muss neu gestartet werden"
ER_SLAVE_HEARTBEAT_FAILURE
- eng "Unexpected master's heartbeat data: %s"
- ger "Unerwartete Daten vom Heartbeat des Masters: %s"
+ chi "æ„外的master心跳数æ®ï¼š%s"
+ eng "Unexpected master's heartbeat data: %s"
+ ger "Unerwartete Daten vom Heartbeat des Masters: %s"
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
- eng "The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%u seconds)"
+ chi "心跳周期的请求值是负的或超过å…许的最大值(%u秒)"
+ eng "The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%u seconds)"
ER_UNUSED_14
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_CONFLICT_FN_PARSE_ERROR
- eng "Error in parsing conflict function. Message: %-.64s"
- ger "Fehler beim Parsen einer Konflikt-Funktion. Meldung: %-.64s"
+ chi "解æžå†²çªåŠŸèƒ½æ—¶å‡ºé”™ã€‚消æ¯ï¼š%-.64s"
+ eng "Error in parsing conflict function. Message: %-.64s"
+ ger "Fehler beim Parsen einer Konflikt-Funktion. Meldung: %-.64s"
ER_EXCEPTIONS_WRITE_ERROR
- eng "Write to exceptions table failed. Message: %-.128s""
- ger "Schreiben in Ausnahme-Tabelle fehlgeschlagen. Meldung: %-.128s""
+ chi "写入异常表失败。消æ¯ï¼š%-.128s"
+ eng "Write to exceptions table failed. Message: %-.128s""
+ ger "Schreiben in Ausnahme-Tabelle fehlgeschlagen. Meldung: %-.128s""
ER_TOO_LONG_TABLE_COMMENT
- eng "Comment for table '%-.64s' is too long (max = %u)"
- por "Comentário para a tabela '%-.64s' é longo demais (max = %u)"
- ger "Kommentar für Tabelle '%-.64s' ist zu lang (max = %u)"
+ chi "表格备注'%-.64s'太长(max =%u)"
+ eng "Comment for table '%-.64s' is too long (max = %u)"
+ ger "Kommentar für Tabelle '%-.64s' ist zu lang (max = %u)"
+ por "Comentário para a tabela '%-.64s' é longo demais (max = %u)"
ER_TOO_LONG_FIELD_COMMENT
- eng "Comment for field '%-.64s' is too long (max = %u)"
- por "Comentário para o campo '%-.64s' é longo demais (max = %u)"
- ger "Kommentar für Feld '%-.64s' ist zu lang (max = %u)"
+ chi "字段'%-.64s'太长(max =%u)"
+ eng "Comment for field '%-.64s' is too long (max = %u)"
+ ger "Kommentar für Feld '%-.64s' ist zu lang (max = %u)"
+ por "Comentário para o campo '%-.64s' é longo demais (max = %u)"
ER_FUNC_INEXISTENT_NAME_COLLISION 42000
- eng "FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual"
- ger "FUNCTION %s existiert nicht. Erläuterungen im Abschnitt 'Function Name Parsing and Resolution' im Referenzhandbuch"
+ chi "FUNCTION %sä¸å­˜åœ¨ã€‚在å‚考手册中查看“函数å称解æžâ€éƒ¨åˆ†"
+ eng "FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual"
+ ger "FUNCTION %s existiert nicht. Erläuterungen im Abschnitt 'Function Name Parsing and Resolution' im Referenzhandbuch"
# When updating these, please update EXPLAIN_FILENAME_MAX_EXTRA_LENGTH in
# sql_table.h with the new maximal additional length for explain_filename.
ER_DATABASE_NAME
- eng "Database"
- swe "Databas"
- ger "Datenbank"
- hindi "डेटाबेस"
+ chi "æ•°æ®åº“"
+ eng "Database"
+ ger "Datenbank"
+ hindi "डेटाबेस"
+ swe "Databas"
ER_TABLE_NAME
- eng "Table"
- swe "Tabell"
- ger "Tabelle"
- hindi "टेबल"
+ chi "表"
+ eng "Table"
+ ger "Tabelle"
+ hindi "टेबल"
+ swe "Tabell"
ER_PARTITION_NAME
- eng "Partition"
- swe "Partition"
- ger "Partition"
- hindi "पारà¥à¤Ÿà¥€à¤¶à¤¨"
+ chi "分区"
+ eng "Partition"
+ ger "Partition"
+ hindi "पारà¥à¤Ÿà¥€à¤¶à¤¨"
+ swe "Partition"
ER_SUBPARTITION_NAME
- eng "Subpartition"
- swe "Subpartition"
- ger "Unterpartition"
- hindi "सब-पारà¥à¤Ÿà¥€à¤¶à¤¨"
+ chi "下分区"
+ eng "Subpartition"
+ ger "Unterpartition"
+ hindi "सब-पारà¥à¤Ÿà¥€à¤¶à¤¨"
+ swe "Subpartition"
ER_TEMPORARY_NAME
- eng "Temporary"
- swe "Temporär"
- ger "Temporär"
- hindi "असà¥à¤¥à¤¾à¤¯à¥€"
+ chi "暂时的"
+ eng "Temporary"
+ ger "Temporär"
+ hindi "असà¥à¤¥à¤¾à¤¯à¥€"
+ swe "Temporär"
ER_RENAMED_NAME
- eng "Renamed"
- swe "Namnändrad"
- ger "Umbenannt"
+ chi "é‡å‘½å"
+ eng "Renamed"
+ ger "Umbenannt"
+ swe "Namnändrad"
ER_TOO_MANY_CONCURRENT_TRXS
- eng "Too many active concurrent transactions"
- ger "Zu viele aktive simultane Transaktionen"
+ chi "“太多并å‘交易"
+ eng "Too many active concurrent transactions"
+ ger "Zu viele aktive simultane Transaktionen"
WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
- eng "Non-ASCII separator arguments are not fully supported"
- ger "Nicht-ASCII-Trennargumente werden nicht vollständig unterstützt"
+ chi "éžASCII分隔符å‚æ•°ä¸å®Œå…¨æ”¯æŒ"
+ eng "Non-ASCII separator arguments are not fully supported"
+ ger "Nicht-ASCII-Trennargumente werden nicht vollständig unterstützt"
ER_DEBUG_SYNC_TIMEOUT
- eng "debug sync point wait timed out"
- ger "Debug Sync Point Wartezeit überschritten"
+ chi "调试åŒæ­¥ç‚¹ç­‰å¾…超时"
+ eng "debug sync point wait timed out"
+ ger "Debug Sync Point Wartezeit überschritten"
ER_DEBUG_SYNC_HIT_LIMIT
- eng "debug sync point hit limit reached"
- ger "Debug Sync Point Hit Limit erreicht"
+ chi "调试åŒæ­¥ç‚¹é™åˆ¶è¾¾åˆ°"
+ eng "debug sync point hit limit reached"
+ ger "Debug Sync Point Hit Limit erreicht"
ER_DUP_SIGNAL_SET 42000
- eng "Duplicate condition information item '%s'"
- ger "Informationselement '%s' für Duplikatbedingung"
+ chi "é‡å¤æ¡ä»¶ä¿¡æ¯é¡¹'%s'"
+ eng "Duplicate condition information item '%s'"
+ ger "Informationselement '%s' für Duplikatbedingung"
# Note that the SQLSTATE is not 01000, it is provided by SIGNAL/RESIGNAL
ER_SIGNAL_WARN 01000
- eng "Unhandled user-defined warning condition"
- ger "Unbehandelte benutzerdefinierte Warnbedingung"
+ chi "未处ç†ç”¨æˆ·å®šä¹‰çš„警告æ¡ä»¶"
+ eng "Unhandled user-defined warning condition"
+ ger "Unbehandelte benutzerdefinierte Warnbedingung"
# Note that the SQLSTATE is not 02000, it is provided by SIGNAL/RESIGNAL
ER_SIGNAL_NOT_FOUND 02000
- eng "Unhandled user-defined not found condition"
- ger "Unbehandelte benutzerdefinierte Nicht-gefunden-Bedingung"
+ chi "未找到的用户定义未找到æ¡ä»¶"
+ eng "Unhandled user-defined not found condition"
+ ger "Unbehandelte benutzerdefinierte Nicht-gefunden-Bedingung"
# Note that the SQLSTATE is not HY000, it is provided by SIGNAL/RESIGNAL
ER_SIGNAL_EXCEPTION HY000
- eng "Unhandled user-defined exception condition"
- ger "Unbehandelte benutzerdefinierte Ausnahmebedingung"
+ chi "未处ç†ç”¨æˆ·å®šä¹‰çš„异常æ¡ä»¶"
+ eng "Unhandled user-defined exception condition"
+ ger "Unbehandelte benutzerdefinierte Ausnahmebedingung"
ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 0K000
- eng "RESIGNAL when handler not active"
- ger "RESIGNAL bei nicht aktivem Handler"
+ chi "RESIGNAL处ç†ç¨‹åºä¸æ´»è·ƒ"
+ eng "RESIGNAL when handler not active"
+ ger "RESIGNAL bei nicht aktivem Handler"
ER_SIGNAL_BAD_CONDITION_TYPE
- eng "SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE"
- ger "SIGNAL/RESIGNAL kann nur mit einer Bedingung (CONDITION) benutzt werden, die bei SQLSTATE definiert wurde"
+ chi "SIGNAL/RESIGNALåªèƒ½ä½¿ç”¨SQLState定义的æ¡ä»¶"
+ eng "SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE"
+ ger "SIGNAL/RESIGNAL kann nur mit einer Bedingung (CONDITION) benutzt werden, die bei SQLSTATE definiert wurde"
WARN_COND_ITEM_TRUNCATED
- eng "Data truncated for condition item '%s'"
- ger "Daten gekürzt für Bedingungselement '%s'"
+ chi "æ•°æ®è¢«æˆªæ–­ä¸ºæ¡ä»¶é¡¹ç›®'%s'"
+ eng "Data truncated for condition item '%s'"
+ ger "Daten gekürzt für Bedingungselement '%s'"
ER_COND_ITEM_TOO_LONG
- eng "Data too long for condition item '%s'"
- ger "Daten zu lang für Bedingungselement '%s'"
+ chi "æ¡ä»¶é¡¹ç›®'%s'çš„æ•°æ®å¤ªé•¿"
+ eng "Data too long for condition item '%s'"
+ ger "Daten zu lang für Bedingungselement '%s'"
ER_UNKNOWN_LOCALE
- eng "Unknown locale: '%-.64s'"
- ger "Unbekannte Locale: '%-.64s'"
+ chi "未知区域设置:'%-.64s'"
+ eng "Unknown locale: '%-.64s'"
+ ger "Unbekannte Locale: '%-.64s'"
ER_SLAVE_IGNORE_SERVER_IDS
- eng "The requested server id %d clashes with the slave startup option --replicate-same-server-id"
- ger "Die angeforderte Server-ID %d steht im Konflikt mit der Startoption --replicate-same-server-id für den Slave"
+ chi "请求的æœåŠ¡å™¨ID%d与SLAVEå¯åŠ¨é€‰é¡¹--replicate-same-server-id冲çª"
+ eng "The requested server id %d clashes with the slave startup option --replicate-same-server-id"
+ ger "Die angeforderte Server-ID %d steht im Konflikt mit der Startoption --replicate-same-server-id für den Slave"
ER_QUERY_CACHE_DISABLED
- eng "Query cache is disabled; set query_cache_type to ON or DEMAND to enable it"
+ chi "查询缓存已ç¦ç”¨;å°†query_cache_type设置为ON或DEMANDå¯ç”¨å®ƒ"
+ eng "Query cache is disabled; set query_cache_type to ON or DEMAND to enable it"
ER_SAME_NAME_PARTITION_FIELD
- eng "Duplicate partition field name '%-.192s'"
- ger "Partitionsfeld '%-.192s' ist ein Duplikat"
+ chi "é‡å¤åˆ†åŒºå­—段å称'%-.192s'"
+ eng "Duplicate partition field name '%-.192s'"
+ ger "Partitionsfeld '%-.192s' ist ein Duplikat"
ER_PARTITION_COLUMN_LIST_ERROR
- eng "Inconsistency in usage of column lists for partitioning"
- ger "Inkonsistenz bei der Benutzung von Spaltenlisten für Partitionierung"
+ chi "分区用的列和列表使用ä¸ä¸€è‡´"
+ eng "Inconsistency in usage of column lists for partitioning"
+ ger "Inkonsistenz bei der Benutzung von Spaltenlisten für Partitionierung"
ER_WRONG_TYPE_COLUMN_VALUE_ERROR
- eng "Partition column values of incorrect type"
- ger "Partitionsspaltenwerte sind vom falschen Typ"
+ chi "ä¸æ­£ç¡®ç±»åž‹çš„分区列值"
+ eng "Partition column values of incorrect type"
+ ger "Partitionsspaltenwerte sind vom falschen Typ"
ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR
- eng "Too many fields in '%-.192s'"
- ger "Zu viele Felder in '%-.192s'"
+ chi "'%-.192s'中的太多字段"
+ eng "Too many fields in '%-.192s'"
+ ger "Zu viele Felder in '%-.192s'"
ER_MAXVALUE_IN_VALUES_IN
- eng "Cannot use MAXVALUE as value in VALUES IN"
- ger "MAXVALUE kann nicht als Wert in VALUES IN verwendet werden"
+ chi "ä¸èƒ½åœ¨VALUES IN使用MAXVALUE"
+ eng "Cannot use MAXVALUE as value in VALUES IN"
+ ger "MAXVALUE kann nicht als Wert in VALUES IN verwendet werden"
ER_TOO_MANY_VALUES_ERROR
- eng "Cannot have more than one value for this type of %-.64s partitioning"
- ger "Für den Partionierungstyp %-.64s darf es nicht mehr als einen Wert geben"
+ chi "è¿™ç§ç±»åž‹ä¸èƒ½æœ‰å¤šä¸ªå€¼%-.64s 分区"
+ eng "Cannot have more than one value for this type of %-.64s partitioning"
+ ger "Für den Partionierungstyp %-.64s darf es nicht mehr als einen Wert geben"
ER_ROW_SINGLE_PARTITION_FIELD_ERROR
- eng "Row expressions in VALUES IN only allowed for multi-field column partitioning"
- ger "Zeilenausdrücke in VALUES IN sind nur für Mehrfeld-Spaltenpartionierung erlaubt"
+ chi "ä»…å…许的多字段列分区的VALUES IN的行表达å¼"
+ eng "Row expressions in VALUES IN only allowed for multi-field column partitioning"
+ ger "Zeilenausdrücke in VALUES IN sind nur für Mehrfeld-Spaltenpartionierung erlaubt"
ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD
- eng "Field '%-.192s' is of a not allowed type for this type of partitioning"
- ger "Feld '%-.192s' ist für diese Art von Partitionierung von einem nicht zulässigen Typ"
+ chi "字段'%-.192s'类型ä¸å…许为此类型的分区类型"
+ eng "Field '%-.192s' is of a not allowed type for this type of partitioning"
+ ger "Feld '%-.192s' ist für diese Art von Partitionierung von einem nicht zulässigen Typ"
ER_PARTITION_FIELDS_TOO_LONG
- eng "The total length of the partitioning fields is too large"
- ger "Die Gesamtlänge der Partitionsfelder ist zu groß"
+ chi "分区字段的总长度太大"
+ eng "The total length of the partitioning fields is too large"
+ ger "Die Gesamtlänge der Partitionsfelder ist zu groß"
ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE
- eng "Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved"
+ chi "无法执行语å¥ï¼šç”±äºŽå¼•æ“Žä¸èƒ½æ”¯æŒè¡Œå’Œè¯­å¥ï¼Œå› æ­¤æ— æ³•å†™å…¥äºŒè¿›åˆ¶æ—¥å¿—"
+ eng "Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved"
ER_BINLOG_ROW_MODE_AND_STMT_ENGINE
- eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging"
+ chi "无法执行语å¥ï¼šç”±äºŽBINLOG_FORMAT =ROW和至少一个表使用存储引擎é™åˆ¶ä¸ºåŸºäºŽè¯­å¥çš„日志记录,因此无法写入二进制日志"
+ eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging"
ER_BINLOG_UNSAFE_AND_STMT_ENGINE
- eng "Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. %s"
+ chi "无法执行语å¥ï¼šç”±äºŽè¯­å¥ä¸å®‰å…¨ï¼Œæ— æ³•å†™å…¥äºŒè¿›åˆ¶æ—¥å¿—,存储引擎仅é™äºŽåŸºäºŽè¯­å¥çš„日志记录,而BINLOG_FORMAT = MIXED。%s."
+ eng "Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. %s"
ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE
- eng "Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging"
+ chi "无法执行语å¥ï¼šç”±äºŽè¯­å¥ä»¥è¡Œæ ¼å¼ï¼Œè‡³å°‘一个表使用基于语å¥çš„日志记录的存储引擎,因此无法写入二进制日志。"
+ eng "Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging"
ER_BINLOG_STMT_MODE_AND_ROW_ENGINE
- eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s"
+ chi "无法执行语å¥ï¼šç”±äºŽBINLOG_FORMAT = STATEMENT,并且至少一个表使用存储引擎é™åˆ¶ä¸ºåŸºäºŽè¡Œçš„日志记录,因此无法写入二进制日志。%s"
+ eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s"
ER_BINLOG_ROW_INJECTION_AND_STMT_MODE
- eng "Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT"
+ chi "无法执行语å¥ï¼šç”±äºŽè¯­å¥çš„正常格å¼å’ŒBINLOG_FORMAT = STATEMENT,因此无法写入二进制日志"
+ eng "Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT"
ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE
- eng "Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging"
-
+ chi "无法执行语å¥ï¼šç”±äºŽæ¶‰åŠå¤šä¸ªå¼•æ“Žå¹¶ä¸”至少有一个引擎是自记录的,因此无法写入二进制日志。"
+ eng "Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging"
ER_BINLOG_UNSAFE_LIMIT
- eng "The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted"
+ chi "该语å¥ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒä½¿ç”¨é™åˆ¶å­å¥ã€‚è¿™ä¸å®‰å…¨ï¼Œå› ä¸ºæ‰€åŒ…å«çš„一组行无法预测"
+ eng "The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted"
ER_BINLOG_UNSAFE_INSERT_DELAYED
- eng "The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted"
+ chi "该声明ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒä½¿ç”¨æ’入延迟。这是ä¸å®‰å…¨çš„,因为无法预测æ’入行的时间"
+ eng "The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted"
ER_BINLOG_UNSAFE_SYSTEM_TABLE
- eng "The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves"
+ chi "该声明ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒä½¿ç”¨å¸¸è§„日志,慢查询日志或performance_schema表。这是ä¸å®‰å…¨çš„,因为系统表å¯èƒ½åœ¨slave上ä¸åŒ"
+ eng "The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves"
ER_BINLOG_UNSAFE_AUTOINC_COLUMNS
- eng "Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly"
+ chi "语å¥ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒè°ƒç”¨äº†æ’å…¥AUTO_INCREMENT列的触å‘器或存储函数。æ’入的值无法正确记录"
+ eng "Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly"
ER_BINLOG_UNSAFE_UDF
- eng "Statement is unsafe because it uses a UDF which may not return the same value on the slave"
+ chi "语å¥ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒä½¿ç”¨äº†ä¸€ä¸ªå¯èƒ½åœ¨ä»Žè®¾å¤‡ä¸Šè¿”回相åŒå€¼çš„UDF"
+ eng "Statement is unsafe because it uses a UDF which may not return the same value on the slave"
ER_BINLOG_UNSAFE_SYSTEM_VARIABLE
- eng "Statement is unsafe because it uses a system variable that may have a different value on the slave"
+ chi "语å¥ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒä½¿ç”¨çš„系统å˜é‡å¯èƒ½åœ¨ä»Žç«™ä¸Šå…·æœ‰ä¸åŒçš„值"
+ eng "Statement is unsafe because it uses a system variable that may have a different value on the slave"
ER_BINLOG_UNSAFE_SYSTEM_FUNCTION
- eng "Statement is unsafe because it uses a system function that may return a different value on the slave"
+ chi "语å¥ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒä½¿ç”¨ç³»ç»Ÿå‡½æ•°å¯èƒ½åœ¨ä»Žç«™ä¸Šè¿”回ä¸åŒçš„值"
+ eng "Statement is unsafe because it uses a system function that may return a different value on the slave"
ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS
- eng "Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction"
-
+ chi "语å¥ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒåœ¨è®¿é—®åŒä¸€äº‹åŠ¡ä¸­è®¿é—®äº‹åŠ¡è¡¨åŽè®¿é—®éžäº‹åŠ¡æ€§è¡¨"
+ eng "Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction"
ER_MESSAGE_AND_STATEMENT
+ chi "%s.语å¥ï¼š%s"
eng "%s. Statement: %s"
ER_SLAVE_CONVERSION_FAILED
- eng "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.50s' to type '%-.50s'"
+ chi "列%d表'%-.192s.%-.192s'无法从'%-.50s'类型为'%-.50s'"
+ eng "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.50s' to type '%-.50s'"
ER_SLAVE_CANT_CREATE_CONVERSION
- eng "Can't create conversion table for table '%-.192s.%-.192s'"
+ chi "无法为表创建转æ¢è¡¨'%-.192s.%-.192s'"
+ eng "Can't create conversion table for table '%-.192s.%-.192s'"
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
- eng "Cannot modify @@session.binlog_format inside a transaction"
+ chi "无法在事务中修改@@session.binlog_format"
+ eng "Cannot modify @@session.binlog_format inside a transaction"
ER_PATH_LENGTH
- eng "The path specified for %.64T is too long"
- hindi "%.64T के लिठनिरà¥à¤¦à¤¿à¤·à¥à¤Ÿ पथ बहà¥à¤¤ लंबा है"
+ chi "指定%.64T的路径太长了"
+ eng "The path specified for %.64T is too long"
+ hindi "%.64T के लिठनिरà¥à¤¦à¤¿à¤·à¥à¤Ÿ पथ बहà¥à¤¤ लंबा है"
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
- eng "'%s' is deprecated and will be removed in a future release"
- ger "'%s' ist veraltet und wird in einer zukünftigen Version entfernt werden"
-
+ chi "'%s'被弃用,将在将æ¥çš„版本中删除"
+ eng "'%s' is deprecated and will be removed in a future release"
+ ger "'%s' ist veraltet und wird in einer zukünftigen Version entfernt werden"
ER_WRONG_NATIVE_TABLE_STRUCTURE
+ chi "本机表'%-.64s'。'%-.64s'具有错误的结构"
eng "Native table '%-.64s'.'%-.64s' has the wrong structure"
-
ER_WRONG_PERFSCHEMA_USAGE
+ chi "performance_schema使用无效"
eng "Invalid performance_schema usage"
hindi "performance_schema का अवैध उपयोग"
ER_WARN_I_S_SKIPPED_TABLE
- eng "Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement"
-
+ chi "表'%s'.'%s'由于并å‘DDL语å¥æ­£åœ¨ä¿®æ”¹å…¶å®šä¹‰ï¼Œå› æ­¤è·³è¿‡"
+ eng "Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement"
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT
- eng "Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction"
+ chi "无法在交易事务中修改@@session.binlog_direct_non_transactional_updates"
+ eng "Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction"
ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT
- eng "Cannot change the binlog direct flag inside a stored function or trigger"
+ chi "无法在存储的函数或触å‘器内更改Binlog Direct标志"
+ eng "Cannot change the binlog direct flag inside a stored function or trigger"
ER_SPATIAL_MUST_HAVE_GEOM_COL 42000
- eng "A SPATIAL index may only contain a geometrical type column"
- ger "Ein raumbezogener Index (SPATIAL) darf nur Spalten geometrischen Typs enthalten"
+ chi "空间索引å¯ä»¥ä»…包å«å‡ ä½•ç±»åž‹åˆ—"
+ eng "A SPATIAL index may only contain a geometrical type column"
+ ger "Ein raumbezogener Index (SPATIAL) darf nur Spalten geometrischen Typs enthalten"
ER_TOO_LONG_INDEX_COMMENT
- eng "Comment for index '%-.64s' is too long (max = %lu)"
-
+ chi "索引评论'%-.64s'太长(max =%lu)"
+ eng "Comment for index '%-.64s' is too long (max = %lu)"
ER_LOCK_ABORTED
- eng "Wait on a lock was aborted due to a pending exclusive lock"
-
+ chi "由于待处ç†çš„独家é”,等待é”被中止"
+ eng "Wait on a lock was aborted due to a pending exclusive lock"
ER_DATA_OUT_OF_RANGE 22003
- eng "%s value is out of range in '%s'"
-
+ chi "%s值超出'%s'范围"
+ eng "%s value is out of range in '%s'"
ER_WRONG_SPVAR_TYPE_IN_LIMIT
- eng "A variable of a non-integer based type in LIMIT clause"
-
+ chi "基于éžæ•´æ•°ç±»åž‹çš„基于LIMITå­å¥çš„å˜é‡"
+ eng "A variable of a non-integer based type in LIMIT clause"
ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE
- eng "Mixing self-logging and non-self-logging engines in a statement is unsafe"
-
+ chi "æ··åˆå£°æ˜Žä¸­çš„自记录和éžè‡ªåŠ¨è®°å½•å¼•æ“Žæ˜¯ä¸å®‰å…¨çš„"
+ eng "Mixing self-logging and non-self-logging engines in a statement is unsafe"
ER_BINLOG_UNSAFE_MIXED_STATEMENT
- eng "Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them"
-
+ chi "语å¥è®¿é—®éžè‡´çªå˜è¡¨ä»¥åŠäº‹åŠ¡æ€§æˆ–临时表,并写入其中任何一个"
+ eng "Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them"
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN
- eng "Cannot modify @@session.sql_log_bin inside a transaction"
-
+ chi "无法修改事务中的@@sessient.sql_log_bin"
+ eng "Cannot modify @@session.sql_log_bin inside a transaction"
ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN
- eng "Cannot change the sql_log_bin inside a stored function or trigger"
-
+ chi "无法在存储的函数或触å‘器内更改SQL_LOG_BIN"
+ eng "Cannot change the sql_log_bin inside a stored function or trigger"
ER_FAILED_READ_FROM_PAR_FILE
- eng "Failed to read from the .par file"
- hindi ".par फ़ाइल से पढ़ने में असफल रहे"
- swe "Misslyckades läsa från .par filen"
-
+ chi "无法从.par文件中读å–"
+ eng "Failed to read from the .par file"
+ hindi ".par फ़ाइल से पढ़ने में असफल रहे"
+ swe "Misslyckades läsa från .par filen"
ER_VALUES_IS_NOT_INT_TYPE_ERROR
- eng "VALUES value for partition '%-.64s' must have type INT"
- swe "Värden i VALUES för partition '%-.64s' måste ha typen INT"
-
+ chi "分区的值'%-.64s'必须具有类型INT"
+ eng "VALUES value for partition '%-.64s' must have type INT"
+ swe "Värden i VALUES för partition '%-.64s' måste ha typen INT"
ER_ACCESS_DENIED_NO_PASSWORD_ERROR 28000
+ chi "æ‹’ç»ç”¨æˆ·'%s'@'%s'"
cze "Přístup pro uživatele '%s'@'%s'"
dan "Adgang nægtet bruger: '%s'@'%s'"
- nla "Toegang geweigerd voor gebruiker: '%s'@'%s'"
eng "Access denied for user '%s'@'%s'"
est "Ligipääs keelatud kasutajale '%s'@'%s'"
fre "Accès refusé pour l'utilisateur: '%s'@'%s'"
@@ -6546,6 +7221,7 @@ ER_ACCESS_DENIED_NO_PASSWORD_ERROR 28000
hun "A(z) '%s'@'%s' felhasznalo szamara tiltott eleres"
ita "Accesso non consentito per l'utente: '%s'@'%s'"
kor "'%s'@'%s' 사용ìžëŠ” ì ‘ê·¼ì´ ê±°ë¶€ ë˜ì—ˆìŠµë‹ˆë‹¤."
+ nla "Toegang geweigerd voor gebruiker: '%s'@'%s'"
nor "Tilgang nektet for bruker: '%s'@'%s'"
norwegian-ny "Tilgang ikke tillate for brukar: '%s'@'%s'"
por "Acesso negado para o usuário '%s'@'%s'"
@@ -6558,799 +7234,1056 @@ ER_ACCESS_DENIED_NO_PASSWORD_ERROR 28000
ukr "ДоÑтуп заборонено Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача: '%s'@'%s'"
ER_SET_PASSWORD_AUTH_PLUGIN
- eng "SET PASSWORD has no significance for users authenticating via plugins"
+ chi "通过%sæ’件验è¯çš„用户忽略SET PASSWORD"
+ eng "SET PASSWORD is ignored for users authenticating via %s plugin"
ER_GRANT_PLUGIN_USER_EXISTS
+ chi "由于用户%-.*så·²ç»å­˜åœ¨ï¼ŒGRANT IDENTIFIED WITH授æƒæ˜¯éžæ³•çš„"
eng "GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists"
ER_TRUNCATE_ILLEGAL_FK 42000
- eng "Cannot truncate a table referenced in a foreign key constraint (%.192s)"
+ chi "无法截断外键约æŸä¸­å¼•ç”¨çš„表(%.192s)"
+ eng "Cannot truncate a table referenced in a foreign key constraint (%.192s)"
ER_PLUGIN_IS_PERMANENT
- eng "Plugin '%s' is force_plus_permanent and can not be unloaded"
+ chi "æ’件'%s'是force_plus_permanent,无法å¸è½½"
+ eng "Plugin '%s' is force_plus_permanent and can not be unloaded"
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN
- eng "The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled"
+ chi "心跳期的è¦æ±‚值å°äºŽ1毫秒。该值é‡ç½®ä¸º0,这æ„味ç€å¿ƒè·³å°†æœ‰æ•ˆåœ°ç¦ç”¨"
+ eng "The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled"
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX
- eng "The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout"
+ chi "心跳期的请求值超出了“slave_net_timeoutâ€ç§’的值。该期间的明智价值应å°äºŽè¶…æ—¶"
+ eng "The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout"
ER_STMT_CACHE_FULL
+ chi "需è¦å¤šè¡Œè¯­å¥è¶…过“max_binlog_stmt_cache_sizeâ€å­—节的存储;增加这个mysqldå˜é‡ï¼Œç„¶åŽé‡è¯•"
eng "Multi-row statements required more than 'max_binlog_stmt_cache_size' bytes of storage; increase this mysqld variable and try again"
ER_MULTI_UPDATE_KEY_CONFLICT
- eng "Primary key/partition key update is not allowed since the table is updated both as '%-.192s' and '%-.192s'"
-
+ chi "由于表格被更新为'%-.192s'å’Œ'%-.192s',因此ä¸å…许å…许主键/分区索引更新。"
+ eng "Primary key/partition key update is not allowed since the table is updated both as '%-.192s' and '%-.192s'"
# When translating this error message make sure to include "ALTER TABLE" in the
# message as mysqlcheck parses the error message looking for ALTER TABLE.
+
ER_TABLE_NEEDS_REBUILD
+ chi "表需é‡å»ºã€‚请åšALTER TABLE %`s FORCEâ€æˆ–转储/é‡æ–°åŠ è½½ä»¥ä¿®å¤å®ƒï¼"
eng "Table rebuild required. Please do \"ALTER TABLE %`s FORCE\" or dump/reload to fix it!"
-
WARN_OPTION_BELOW_LIMIT
- eng "The value of '%s' should be no less than the value of '%s'"
+ chi "'%s'的值应该ä¸å°äºŽ'%s'的值"
+ eng "The value of '%s' should be no less than the value of '%s'"
ER_INDEX_COLUMN_TOO_LONG
- eng "Index column size too large. The maximum column size is %lu bytes"
+ chi "索引列太大。最大列大å°ä¸º%lu字节"
+ eng "Index column size too large. The maximum column size is %lu bytes"
ER_ERROR_IN_TRIGGER_BODY
- eng "Trigger '%-.64s' has an error in its body: '%-.256s'"
+ chi "触å‘器'%-.64s'内存在错误:'%-.256s'"
+ eng "Trigger '%-.64s' has an error in its body: '%-.256s'"
ER_ERROR_IN_UNKNOWN_TRIGGER_BODY
- eng "Unknown trigger has an error in its body: '%-.256s'"
+ chi "未知触å‘器内存在错误:'%-.256s'"
+ eng "Unknown trigger has an error in its body: '%-.256s'"
ER_INDEX_CORRUPT
- eng "Index %s is corrupted"
+ chi "索引%så·²æŸå"
+ eng "Index %s is corrupted"
ER_UNDO_RECORD_TOO_BIG
- eng "Undo log record is too big"
+ chi "撤消日志记录太大"
+ eng "Undo log record is too big"
ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT
- eng "INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave"
+ chi "INSERT IGNORE...SELECTä¸å®‰å…¨ï¼Œå› ä¸ºé€‰æ‹©ç”±select检索行的顺åºç¡®å®šå“ªä¸ªï¼ˆå¦‚果有)行被忽略。无法预测此顺åºï¼Œå¹¶ä¸”在masterå’Œslaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave"
ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE
- eng "INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave"
+ chi "INSERT... SELECT... ON DUPLICATE KEY UPDATE是ä¸å®‰å…¨çš„,因为SELECT检索行的顺åºç¡®å®šå“ªä¸ªï¼ˆå¦‚果有的è¯ï¼‰æ˜¯æ›´æ–°çš„。无法预测此顺åºï¼Œå¹¶ä¸”在masterå’Œslaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave"
ER_BINLOG_UNSAFE_REPLACE_SELECT
- eng "REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave"
+ chi "REPLACE... SELECT ä¸å®‰å…¨ï¼Œå› ä¸ºé€‰æ‹©ç”±select检索行的顺åºç¡®å®šå“ªä¸ªï¼ˆå¦‚果有)行被替æ¢ã€‚无法预测此顺åºï¼Œå¹¶ä¸”在masterå’Œslaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave"
ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT
- eng "CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave"
+ chi "CREATE... IGNORE SELECT是ä¸å®‰å…¨ï¼Œå› ä¸ºé€‰æ‹©ç”±SELECT检索行的顺åºç¡®å®šå“ªä¸ªï¼ˆå¦‚果有)行被忽略。无法预测此顺åºï¼Œå¹¶ä¸”在masterå’Œslaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave"
ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT
- eng "CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave"
+ chi "CREATE... REPLACE SELECTä¸å®‰å…¨ï¼Œå› ä¸ºé€‰æ‹©ç”±SELECT检索行的顺åºç¡®å®šå“ªä¸ªï¼ˆå¦‚果有)是替æ¢å“ªä¸ªï¼ˆå¦‚果有的è¯ï¼‰ã€‚无法预测此顺åºï¼Œå¹¶ä¸”在masterå’Œslaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave"
ER_BINLOG_UNSAFE_UPDATE_IGNORE
- eng "UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave"
+ chi "UPDATE IGNOREä¸å®‰å…¨ï¼Œå› ä¸ºæ›´æ–°è¡Œçš„顺åºç¡®å®šäº†å“ªä¸ªï¼ˆå¦‚果有)行被忽略。无法预测此顺åºï¼Œå¹¶ä¸”在masterå’Œslaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave"
ER_UNUSED_15
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_UNUSED_16
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT
- eng "Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave"
+ chi "从å¦ä¸€ä¸ªè¡¨é€‰æ‹©åŽï¼Œä½¿ç”¨è‡ªåŠ¨å¢žé‡åˆ—的表格写入的语å¥æ˜¯ä¸å®‰å…¨çš„,因为检索行的顺åºç¡®å®šå°†å†™å…¥å“ªäº›ï¼ˆå¦‚果有)行。无法预测此顺åºï¼Œå¹¶ä¸”在主站和slaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave"
ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC
- eng "CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave"
+ chi "创建表...在具有自动增é‡åˆ—的表上选择...ä¸å®‰å…¨ï¼Œå› ä¸ºé€‰æ‹©çš„顺åºæ˜¯ç”±select检索行的顺åºï¼Œç¡®å®šæ’入哪个(如果有)行。无法预测此订å•ï¼Œå¹¶ä¸”在主站和slaveæ–¹é¢å¯èƒ½æœ‰æ‰€ä¸åŒ"
+ eng "CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave"
ER_BINLOG_UNSAFE_INSERT_TWO_KEYS
- eng "INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe"
+ chi "在具有多个唯一键的表上INSERT... ON DUPLICATE KEY UPDATEçš„é‡å¤ç´¢å¼•æ›´æ–°æ˜¯ä¸å®‰å…¨çš„"
+ eng "INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe"
ER_TABLE_IN_FK_CHECK
- eng "Table is being used in foreign key check"
+ chi "外键检查在用此表"
+ eng "Table is being used in foreign key check"
ER_VERS_NOT_ALLOWED
- eng "Not allowed for system-versioned table %`s.%`s"
+ chi "系统版本的表%`s.%`sä¸å…许"
+ eng "Not allowed for system-versioned table %`s.%`s"
ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST
- eng "INSERT into autoincrement field which is not the first part in the composed primary key is unsafe"
-
+ chi "æ’å…¥AutoIncrement字段,该字段ä¸æ˜¯ç»„æˆçš„主键中的第一部分是ä¸å®‰å…¨çš„"
+ eng "INSERT into autoincrement field which is not the first part in the composed primary key is unsafe"
#
# End of 5.5 error messages.
#
ER_CANNOT_LOAD_FROM_TABLE_V2
- eng "Cannot load from %s.%s. The table is probably corrupted"
- ger "Kann %s.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt"
+ chi "ä¸èƒ½ä»ŽåŠ è½½%s.%s。表å¯èƒ½æŸå了"
+ eng "Cannot load from %s.%s. The table is probably corrupted"
+ ger "Kann %s.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt"
ER_MASTER_DELAY_VALUE_OUT_OF_RANGE
- eng "The requested value %lu for the master delay exceeds the maximum %lu"
+ chi "主延迟的所需值%lu超过最大%lu"
+ eng "The requested value %lu for the master delay exceeds the maximum %lu"
ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT
- eng "Only Format_description_log_event and row events are allowed in BINLOG statements (but %s was provided)"
+ chi "在Binlog语å¥ä¸­åªå…许Format_Description_Log_Event和行事件(但是æ供了%s)"
+ eng "Only Format_description_log_event and row events are allowed in BINLOG statements (but %s was provided)"
ER_PARTITION_EXCHANGE_DIFFERENT_OPTION
- eng "Non matching attribute '%-.64s' between partition and table"
- swe "Attributet '%-.64s' är olika mellan partition och tabell"
+ chi "分区和表之间的éžåŒ¹é…属性'%-.64s'"
+ eng "Non matching attribute '%-.64s' between partition and table"
+ swe "Attributet '%-.64s' är olika mellan partition och tabell"
ER_PARTITION_EXCHANGE_PART_TABLE
- eng "Table to exchange with partition is partitioned: '%-.64s'"
- swe "Tabellen att byta ut mot partition är partitionerad: '%-.64s'"
+ chi "用分区交æ¢çš„表是分区:'%-.64s'"
+ eng "Table to exchange with partition is partitioned: '%-.64s'"
+ swe "Tabellen att byta ut mot partition är partitionerad: '%-.64s'"
ER_PARTITION_EXCHANGE_TEMP_TABLE
- eng "Table to exchange with partition is temporary: '%-.64s'"
- swe "Tabellen att byta ut mot partition är temporär: '%-.64s'"
+ chi "与分区交æ¢çš„表是临时的:'%-.64s'"
+ eng "Table to exchange with partition is temporary: '%-.64s'"
+ swe "Tabellen att byta ut mot partition är temporär: '%-.64s'"
ER_PARTITION_INSTEAD_OF_SUBPARTITION
- eng "Subpartitioned table, use subpartition instead of partition"
- swe "Subpartitionerad tabell, använd subpartition istället för partition"
+ chi "å­åˆ†åŒºè¡¨ï¼Œä½¿ç”¨å­åˆ†åŒºä»£æ›¿åˆ†åŒº"
+ eng "Subpartitioned table, use subpartition instead of partition"
+ swe "Subpartitionerad tabell, använd subpartition istället för partition"
ER_UNKNOWN_PARTITION
- eng "Unknown partition '%-.64s' in table '%-.64s'"
- swe "Okänd partition '%-.64s' i tabell '%-.64s'"
+ chi "未知分区'%-.64s'在表'%-.64s'"
+ eng "Unknown partition '%-.64s' in table '%-.64s'"
+ swe "Okänd partition '%-.64s' i tabell '%-.64s'"
ER_TABLES_DIFFERENT_METADATA
- eng "Tables have different definitions"
- swe "Tabellerna har olika definitioner"
+ chi "表有ä¸åŒçš„定义"
+ eng "Tables have different definitions"
+ swe "Tabellerna har olika definitioner"
ER_ROW_DOES_NOT_MATCH_PARTITION
- eng "Found a row that does not match the partition"
- swe "Hittade en rad som inte passar i partitionen"
+ chi "找到了与分区ä¸åŒ¹é…çš„è¡Œ"
+ eng "Found a row that does not match the partition"
+ swe "Hittade en rad som inte passar i partitionen"
ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX
- eng "Option binlog_cache_size (%lu) is greater than max_binlog_cache_size (%lu); setting binlog_cache_size equal to max_binlog_cache_size"
+ chi "选项binlog_cache_size(%lu)大于max_binlog_cache_size(%lu);设置binlog_cache_size等于max_binlog_cache_size"
+ eng "Option binlog_cache_size (%lu) is greater than max_binlog_cache_size (%lu); setting binlog_cache_size equal to max_binlog_cache_size"
ER_WARN_INDEX_NOT_APPLICABLE
- eng "Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'"
+ chi "ä¸èƒ½ä½¿ç”¨%-.64s在索引'%-.64s'上的访问,由于字段'%-.64sâ€çš„类型或排åºè§„则转æ¢"
+ eng "Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'"
ER_PARTITION_EXCHANGE_FOREIGN_KEY
- eng "Table to exchange with partition has foreign key references: '%-.64s'"
- swe "Tabellen att byta ut mot partition har foreign key referenser: '%-.64s'"
+ chi "与分区交æ¢çš„表具有外键å‚考:'%-.64s'"
+ eng "Table to exchange with partition has foreign key references: '%-.64s'"
+ swe "Tabellen att byta ut mot partition har foreign key referenser: '%-.64s'"
ER_NO_SUCH_KEY_VALUE
- eng "Key value '%-.192s' was not found in table '%-.192s.%-.192s'"
+ chi "键值'%-.192s'在表'%-.192s%-.192s'ä¸å­˜åœ¨"
+ eng "Key value '%-.192s' was not found in table '%-.192s.%-.192s'"
ER_VALUE_TOO_LONG
- eng "Too long value for '%s'"
+ chi "'%s'的价值太长了"
+ eng "Too long value for '%s'"
ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE
- eng "Replication event checksum verification failed while reading from network"
+ chi "从网络读å–时,å¤åˆ¶äº‹ä»¶æ ¡éªŒå’ŒéªŒè¯å¤±è´¥"
+ eng "Replication event checksum verification failed while reading from network"
ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE
- eng "Replication event checksum verification failed while reading from a log file"
+ chi "从日志文件读å–æ—¶å¤åˆ¶äº‹ä»¶æ ¡éªŒå’ŒéªŒè¯å¤±è´¥"
+ eng "Replication event checksum verification failed while reading from a log file"
ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX
- eng "Option binlog_stmt_cache_size (%lu) is greater than max_binlog_stmt_cache_size (%lu); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size"
+ chi "选项binlog_stmt_cache_size(%lu)大于max_binlog_stmt_cache_size(%lu);设置binlog_stmt_cache_size等于max_binlog_stmt_cache_size"
+ eng "Option binlog_stmt_cache_size (%lu) is greater than max_binlog_stmt_cache_size (%lu); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size"
ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT
- eng "Can't update table '%-.192s' while '%-.192s' is being created"
+ chi "无法更新表'%-.192s'正在创建'%-.192s'"
+ eng "Can't update table '%-.192s' while '%-.192s' is being created"
ER_PARTITION_CLAUSE_ON_NONPARTITIONED
- eng "PARTITION () clause on non partitioned table"
- swe "PARTITION () klausul för en icke partitionerad tabell"
+ chi "éžåˆ†åŒºè¡¨ä¸Šçš„PARTITION()å­å¥"
+ eng "PARTITION () clause on non partitioned table"
+ swe "PARTITION () klausul för en icke partitionerad tabell"
ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET
- eng "Found a row not matching the given partition set"
- swe "Hittade en rad som inte passar i någon given partition"
+ chi "å‘现ä¸åŒ¹é…给定分区集的行"
+ eng "Found a row not matching the given partition set"
+ swe "Hittade en rad som inte passar i någon given partition"
ER_UNUSED_5
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE
- eng "Failure while changing the type of replication repository: %s"
+ chi "更改Replication存储库类型时失败:%s"
+ eng "Failure while changing the type of replication repository: %s"
ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE
- eng "The creation of some temporary tables could not be rolled back"
+ chi "无法回滚一些临时表的创建"
+ eng "The creation of some temporary tables could not be rolled back"
ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE
- eng "Some temporary tables were dropped, but these operations could not be rolled back"
+ chi "一些临时表被删除,但这些æ“作无法回滚"
+ eng "Some temporary tables were dropped, but these operations could not be rolled back"
ER_MTS_FEATURE_IS_NOT_SUPPORTED
- eng "%s is not supported in multi-threaded slave mode. %s"
+ chi "%sä¸æ”¯æŒå¤šçº¿ç¨‹ä»Žæ¨¡å¼ã€‚%s."
+ eng "%s is not supported in multi-threaded slave mode. %s"
ER_MTS_UPDATED_DBS_GREATER_MAX
- eng "The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata"
+ chi "修改的数æ®åº“çš„æ•°é‡è¶…过了最大%d;æ•°æ®åº“å称ä¸ä¼šåŒ…å«åœ¨Replication事件元数æ®ä¸­"
+ eng "The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata"
ER_MTS_CANT_PARALLEL
- eng "Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s"
+ chi "无法以并行模å¼æ‰§è¡Œå½“å‰äº‹ä»¶ç»„。é‡åˆ°äº‹ä»¶%s,中继日志å称%s,position%s,它防止并行模å¼æ‰§è¡Œæ­¤äº‹ä»¶ç»„。原因:%s"
+ eng "Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s"
ER_MTS_INCONSISTENT_DATA
- eng "%s"
+ eng "%s"
ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING
- eng "FULLTEXT index is not supported for partitioned tables"
- swe "FULLTEXT index stöds ej för partitionerade tabeller"
+ chi "分区表ä¸æ”¯æŒFullText索引"
+ eng "FULLTEXT index is not supported for partitioned tables"
+ swe "FULLTEXT index stöds ej för partitionerade tabeller"
ER_DA_INVALID_CONDITION_NUMBER 35000
- eng "Invalid condition number"
- por "Número de condição inválido"
+ chi "无效æ¡ä»¶å·"
+ eng "Invalid condition number"
+ por "Número de condição inválido"
ER_INSECURE_PLAIN_TEXT
- eng "Sending passwords in plain text without SSL/TLS is extremely insecure"
+ chi "在没有SSL/TLS的纯文本中å‘é€å¯†ç éžå¸¸ä¸å®‰å…¨"
+ eng "Sending passwords in plain text without SSL/TLS is extremely insecure"
ER_INSECURE_CHANGE_MASTER
- eng "Storing MariaDB user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MariaDB Manual for more about this issue and possible alternatives"
+ chi "在Master.Info存储库中存储MariaDB用户å或密ç ä¿¡æ¯ä¸å®‰å…¨ï¼Œå› æ­¤ä¸å»ºè®®ä½¿ç”¨ã€‚有关此问题和å¯èƒ½çš„替代方案,请å‚阅MariaDB手册"
+ eng "Storing MariaDB user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MariaDB Manual for more about this issue and possible alternatives"
ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO 23000 S1009
+ chi "表'%.192s'的外键约æŸï¼Œè®°å½•'%-.192s'会导致表'%.192s'中的é‡å¤æ¡ç›®ï¼Œé”®'%.192s'"
eng "Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in table '%.192s', key '%.192s'"
ger "Fremdschlüssel-Beschränkung für Tabelle '%.192s', Datensatz '%-.192s' würde zu einem doppelten Eintrag in Tabelle '%.192s', Schlüssel '%.192s' führen"
swe "FOREIGN KEY constraint för tabell '%.192s', posten '%-.192s' kan inte uppdatera barntabell '%.192s' på grund av nyckel '%.192s'"
ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO 23000 S1009
+ chi "表'%.192s'的外键约æŸï¼Œè®°å½•'%-.192s'会导致å­è¡¨ä¸­çš„é‡å¤æ¡ç›®"
eng "Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in a child table"
ger "Fremdschlüssel-Beschränkung für Tabelle '%.192s', Datensatz '%-.192s' würde zu einem doppelten Eintrag in einer Kind-Tabelle führen"
swe "FOREIGN KEY constraint för tabell '%.192s', posten '%-.192s' kan inte uppdatera en barntabell på grund av UNIQUE-test"
ER_SQLTHREAD_WITH_SECURE_SLAVE
- eng "Setting authentication options is not possible when only the Slave SQL Thread is being started"
+ chi "仅在å¯åŠ¨ä»ŽSQL线程时无法设置身份验è¯é€‰é¡¹"
+ eng "Setting authentication options is not possible when only the Slave SQL Thread is being started"
ER_TABLE_HAS_NO_FT
- eng "The table does not have FULLTEXT index to support this query"
+ chi "该表没有全文索引æ¥æ”¯æŒæ­¤æŸ¥è¯¢"
+ eng "The table does not have FULLTEXT index to support this query"
ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER
- eng "The system variable %.200s cannot be set in stored functions or triggers"
+ chi "无法在存储的函数或触å‘器中设置系统å˜é‡%.200s"
+ eng "The system variable %.200s cannot be set in stored functions or triggers"
ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION
- eng "The system variable %.200s cannot be set when there is an ongoing transaction"
+ chi "æŒç»­äº¤æ˜“时,无法设置系统å˜é‡%.200s"
+ eng "The system variable %.200s cannot be set when there is an ongoing transaction"
ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST
- eng "The system variable @@SESSION.GTID_NEXT has the value %.200s, which is not listed in @@SESSION.GTID_NEXT_LIST"
+ chi "系统å˜é‡@@session.gtid_next具有值%.200s,该值未在@@session.gtid_next_list中列出"
+ eng "The system variable @@SESSION.GTID_NEXT has the value %.200s, which is not listed in @@SESSION.GTID_NEXT_LIST"
ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION_WHEN_GTID_NEXT_LIST_IS_NULL
- eng "When @@SESSION.GTID_NEXT_LIST == NULL, the system variable @@SESSION.GTID_NEXT cannot change inside a transaction"
+ chi "当@@session.gtid_next_list == null时,系统å˜é‡@@session.gtid_next无法在事务内更改"
+ eng "When @@SESSION.GTID_NEXT_LIST == NULL, the system variable @@SESSION.GTID_NEXT cannot change inside a transaction"
ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION
- eng "The statement 'SET %.200s' cannot invoke a stored function"
+ chi "语å¥'SET %.200s'无法调用存储的函数"
+ eng "The statement 'SET %.200s' cannot invoke a stored function"
ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL
- eng "The system variable @@SESSION.GTID_NEXT cannot be 'AUTOMATIC' when @@SESSION.GTID_NEXT_LIST is non-NULL"
+ chi "系统å˜é‡@@sessient.gtid_nextä¸èƒ½æ˜¯'自动'@@sessient.gtid_next_listéžnullæ—¶"
+ eng "The system variable @@SESSION.GTID_NEXT cannot be 'AUTOMATIC' when @@SESSION.GTID_NEXT_LIST is non-NULL"
ER_SKIPPING_LOGGED_TRANSACTION
- eng "Skipping transaction %.200s because it has already been executed and logged"
+ chi "跳过事务%.200s,因为它已ç»è¢«æ‰§è¡Œå’Œè®°å½•"
+ eng "Skipping transaction %.200s because it has already been executed and logged"
ER_MALFORMED_GTID_SET_SPECIFICATION
- eng "Malformed GTID set specification '%.200s'"
+ chi "畸形GTID设置规范'%.200s'"
+ eng "Malformed GTID set specification '%.200s'"
ER_MALFORMED_GTID_SET_ENCODING
- eng "Malformed GTID set encoding"
+ chi "æ ¼å¼é”™è¯¯çš„GTID集编ç "
+ eng "Malformed GTID set encoding"
ER_MALFORMED_GTID_SPECIFICATION
- eng "Malformed GTID specification '%.200s'"
+ chi "畸形GTID规范'%.200s'"
+ eng "Malformed GTID specification '%.200s'"
ER_GNO_EXHAUSTED
- eng "Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new server_uuid"
+ chi "无法生æˆå…¨å±€äº‹åŠ¡æ ‡è¯†ç¬¦ï¼šæ•´æ•°ç»„件达到了最大值。用新server_uuIdé‡æ–°å¯åŠ¨æœåŠ¡å™¨"
+ eng "Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new server_uuid"
ER_BAD_SLAVE_AUTO_POSITION
- eng "Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE and RELAY_LOG_POS cannot be set when MASTER_AUTO_POSITION is active"
+ chi "当MASTER_AUTO_POSITION处于活动状æ€æ—¶ï¼Œæ— æ³•è®¾ç½®å‚æ•°MASTER_LOG_FILE,MASTER_LOG_POS,RELAY_LOG_FILEå’ŒRELAY_LOG_POS"
+ eng "Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE and RELAY_LOG_POS cannot be set when MASTER_AUTO_POSITION is active"
ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON
- eng "CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON"
+ chi "CHANGE Master TO MASTER_AUTO_POSITION = 1åªèƒ½åœ¨GTID_MODE =ON上执行"
+ eng "CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON"
ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET
- eng "Cannot execute statements with implicit commit inside a transaction when GTID_NEXT != AUTOMATIC or GTID_NEXT_LIST != NULL"
+ chi "当GTID_Nextï¼= AUTOMATIC 或GTID_NEXT_LIST != NULL时,无法在事务中执行语å¥"
+ eng "Cannot execute statements with implicit commit inside a transaction when GTID_NEXT != AUTOMATIC or GTID_NEXT_LIST != NULL"
ER_GTID_MODE_2_OR_3_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON
- eng "GTID_MODE = ON or GTID_MODE = UPGRADE_STEP_2 requires ENFORCE_GTID_CONSISTENCY = 1"
+ chi "GTID_MODE = ON或GTID_MODE = UPGRADE_STEP_2需è¦ENFORCE_GTID_CONSISTY = 1"
+ eng "GTID_MODE = ON or GTID_MODE = UPGRADE_STEP_2 requires ENFORCE_GTID_CONSISTENCY = 1"
ER_GTID_MODE_REQUIRES_BINLOG
- eng "GTID_MODE = ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates"
+ chi "GTID_MODE = ON或UPGRADE_STEP_1或UPGRADE_STEP_2需è¦--log-binå’Œ-log-slave-updates"
+ eng "GTID_MODE = ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates"
ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF
- eng "GTID_NEXT cannot be set to UUID:NUMBER when GTID_MODE = OFF"
+ chi "GTID_NEXT无法设置为UUID:NUMBER 当GTID_MODE = OFF"
+ eng "GTID_NEXT cannot be set to UUID:NUMBER when GTID_MODE = OFF"
ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON
- eng "GTID_NEXT cannot be set to ANONYMOUS when GTID_MODE = ON"
+ chi "GTID_NEXT无法在当GTID_MODE = ON上时设置为ANONYMOUS"
+ eng "GTID_NEXT cannot be set to ANONYMOUS when GTID_MODE = ON"
ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF
- eng "GTID_NEXT_LIST cannot be set to a non-NULL value when GTID_MODE = OFF"
+ chi "GTID_NEXT_LIST无法设置为éžç©ºå€¼å½“GTID_MODE = OFF"
+ eng "GTID_NEXT_LIST cannot be set to a non-NULL value when GTID_MODE = OFF"
ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF
- eng "Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF"
+ chi "找到一个Gtid_log_event或Previous_gtids_log_event,当gtid_mode = OFF时"
+ eng "Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF"
ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE
- eng "When ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables"
+ chi "当Enforce_gtid_consistenty = 1时,对éžäº‹åŠ¡æ€§è¡¨çš„æ›´æ–°åªèƒ½åœ¨Autocomated语å¥æˆ–å•ä¸€è¯­å¥äº‹åŠ¡ä¸­å®Œæˆï¼Œè€Œä¸æ˜¯åœ¨ä¸Žäº‹åŠ¡è¡¨ä¸­çš„更新相åŒçš„语å¥ä¸­"
+ eng "When ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables"
ER_GTID_UNSAFE_CREATE_SELECT
- eng "CREATE TABLE ... SELECT is forbidden when ENFORCE_GTID_CONSISTENCY = 1"
+ chi "CREATE TABLE...SELECT在ENFORCE_GTID_CONSISTENCY = 1时被ç¦æ­¢"
+ eng "CREATE TABLE ... SELECT is forbidden when ENFORCE_GTID_CONSISTENCY = 1"
ER_GTID_UNSAFE_CREATE_DROP_TEMPORARY_TABLE_IN_TRANSACTION
- eng "When ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1"
+ chi "当ENFORCE_GTID_CONSISTENCY = 1时,语å¥CREATE TEMPORARY TABLå’ŒDROP TEMPORARY TABLE,åªèƒ½åœ¨éžäº‹åŠ¡æ€§ä¸Šä¸‹æ–‡ä¸­æ‰§è¡Œï¼Œå¹¶ä¸”è¦æ±‚autocommit = 1"
+ eng "When ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1"
ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME
- eng "The value of GTID_MODE can only change one step at a time: OFF <-> UPGRADE_STEP_1 <-> UPGRADE_STEP_2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions."
+ chi "GTID_MODE的值åªèƒ½ä¸€æ¬¡æ›´æ”¹ä¸€æ­¥ï¼šOFF<-> UPGRODE_STEP_1 <-> UPGRODE_STEP_2 <-> ON。å¦è¯·æ³¨æ„,此值必须在所有æœåŠ¡å™¨ä¸ŠåŒæ—¶ä¸Šå‡æˆ–下é™;有关说明,请å‚阅手册。“"
+ eng "The value of GTID_MODE can only change one step at a time: OFF <-> UPGRADE_STEP_1 <-> UPGRADE_STEP_2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions."
ER_MASTER_HAS_PURGED_REQUIRED_GTIDS
- eng "The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires"
+ chi "从机更改主站到Master_Auto_Position = 1,因此主站连接,但主设备已清除了slave需è¦çš„GTID的二进制日志"
+ eng "The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires"
ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID
- eng "GTID_NEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK"
+ chi "无法由拥有GTID的客户端更改GTID_NEXT。客户拥有%s。所有æƒåœ¨æ交或回滚上å‘布"
+ eng "GTID_NEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK"
ER_UNKNOWN_EXPLAIN_FORMAT
- eng "Unknown %s format name: '%s'"
- rus "ÐеизвеÑтное Ð¸Ð¼Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° команды %s: '%s'"
+ chi "未知%sæ ¼å¼å称:'%s'"
+ eng "Unknown %s format name: '%s'"
+ rus "ÐеизвеÑтное Ð¸Ð¼Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° команды %s: '%s'"
ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION 25006
- eng "Cannot execute statement in a READ ONLY transaction"
+ chi "无法在åªè¯»äº‹åŠ¡ä¸­æ‰§è¡Œè¯­å¥"
+ eng "Cannot execute statement in a READ ONLY transaction"
ER_TOO_LONG_TABLE_PARTITION_COMMENT
- eng "Comment for table partition '%-.64s' is too long (max = %lu)"
+ chi "表分区的评论'%-.64s'太长(max =%lu)"
+ eng "Comment for table partition '%-.64s' is too long (max = %lu)"
ER_SLAVE_CONFIGURATION
- eng "Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MariaDB error log"
+ chi "从站未é…置或未能正确åˆå§‹åŒ–。您必须至少set --server-id以å¯ç”¨ä¸»ç«™æˆ–从站。å¯ä»¥åœ¨MariaDB错误日志中找到其他错误消æ¯"
+ eng "Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MariaDB error log"
ER_INNODB_FT_LIMIT
- eng "InnoDB presently supports one FULLTEXT index creation at a time"
+ chi "InnoDBç›®å‰ä¸€æ¬¡æ”¯æŒä¸€ä¸ªå…¨æ–‡ç´¢å¼•åˆ›å»º"
+ eng "InnoDB presently supports one FULLTEXT index creation at a time"
ER_INNODB_NO_FT_TEMP_TABLE
- eng "Cannot create FULLTEXT index on temporary InnoDB table"
+ chi "无法在临时InnoDB表上创建FullText索引"
+ eng "Cannot create FULLTEXT index on temporary InnoDB table"
ER_INNODB_FT_WRONG_DOCID_COLUMN
- eng "Column '%-.192s' is of wrong type for an InnoDB FULLTEXT index"
+ chi "列'%-.192s'是innodb fulltext索引的错误类型"
+ eng "Column '%-.192s' is of wrong type for an InnoDB FULLTEXT index"
ER_INNODB_FT_WRONG_DOCID_INDEX
- eng "Index '%-.192s' is of wrong type for an InnoDB FULLTEXT index"
+
+ chi "InnoDB全文索引的索引'%-.192s'是错误的类型错误"
+ eng "Index '%-.192s' is of wrong type for an InnoDB FULLTEXT index"
ER_INNODB_ONLINE_LOG_TOO_BIG
- eng "Creating index '%-.192s' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again"
+ chi "创建索引'%-.192s'所需的多于'innodb_online_alter_log_max_size'字节的修改日志。请å†è¯•ä¸€æ¬¡"
+ eng "Creating index '%-.192s' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again"
ER_UNKNOWN_ALTER_ALGORITHM
- eng "Unknown ALGORITHM '%s'"
+ chi "未知算法'%s'"
+ eng "Unknown ALGORITHM '%s'"
ER_UNKNOWN_ALTER_LOCK
- eng "Unknown LOCK type '%s'"
+ chi "未知é”定类型'%s'"
+ eng "Unknown LOCK type '%s'"
ER_MTS_CHANGE_MASTER_CANT_RUN_WITH_GAPS
- eng "CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL"
+ chi "当从站因为错误åœæ­¢æˆ–以MTS模å¼ç»ˆæ­¢æ—¶ï¼Œä¸å‘¢æ‰§è¡ŒCHANGE MASTER。考虑使用RESET SLAVE或START SLAVE UNTIL"
+ eng "CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL"
ER_MTS_RECOVERY_FAILURE
- eng "Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MariaDB error log"
+ chi "从并行执行模å¼ä¸‹çš„从站错误åŽæ— æ³•æ¢å¤ã€‚å¯ä»¥åœ¨MariaDB错误日志中找到其他错误消æ¯"
+ eng "Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MariaDB error log"
ER_MTS_RESET_WORKERS
- eng "Cannot clean up worker info tables. Additional error messages can be found in the MariaDB error log"
+ chi "无法清ç†å·¥ä½œè€…ä¿¡æ¯è¡¨ã€‚å¯ä»¥åœ¨MariaDB错误日志中找到其他错误消æ¯"
+ eng "Cannot clean up worker info tables. Additional error messages can be found in the MariaDB error log"
ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
- eng "Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted"
- ger "Spaltenanzahl von %s.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt"
+ chi "列数为%s.%s是错误的。预期的%d,找到%d。表å¯èƒ½æŸå了"
+ eng "Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted"
+ ger "Spaltenanzahl von %s.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt"
ER_SLAVE_SILENT_RETRY_TRANSACTION
- eng "Slave must silently retry current transaction"
+ chi "从站必须é™é»˜åœ°é‡è¯•å½“å‰äº‹åŠ¡"
+ eng "Slave must silently retry current transaction"
ER_UNUSED_22
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_TABLE_SCHEMA_MISMATCH
- eng "Schema mismatch (%s)"
+ chi "架构ä¸åŒ¹é…(%s)"
+ eng "Schema mismatch (%s)"
ER_TABLE_IN_SYSTEM_TABLESPACE
- eng "Table %-.192s in system tablespace"
+ chi "表%-.192s在系统表空间中"
+ eng "Table %-.192s in system tablespace"
ER_IO_READ_ERROR
- eng "IO Read error: (%lu, %s) %s"
+ chi "IO读å–错误:(%lu,%s)%s"
+ eng "IO Read error: (%lu, %s) %s"
ER_IO_WRITE_ERROR
- eng "IO Write error: (%lu, %s) %s"
+ chi "IO写错错误:(%lu,%s)%s"
+ eng "IO Write error: (%lu, %s) %s"
ER_TABLESPACE_MISSING
- eng "Tablespace is missing for table '%-.192s'"
+ chi "表空间缺少表'%-.192s'"
+ eng "Tablespace is missing for table '%-.192s'"
ER_TABLESPACE_EXISTS
- eng "Tablespace for table '%-.192s' exists. Please DISCARD the tablespace before IMPORT"
+ chi "表格'%-.192s'的表空间。请在导入之å‰ä¸¢å¼ƒè¡¨ç©ºé—´"
+ eng "Tablespace for table '%-.192s' exists. Please DISCARD the tablespace before IMPORT"
ER_TABLESPACE_DISCARDED
- eng "Tablespace has been discarded for table %`s"
+ chi "表空间已被丢弃为表%`s"
+ eng "Tablespace has been discarded for table %`s"
ER_INTERNAL_ERROR
- eng "Internal error: %-.192s"
+ chi "内部错误:%-.192s"
+ eng "Internal error: %-.192s"
ER_INNODB_IMPORT_ERROR
- eng "ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %lu : '%s'"
+ chi "ALTER TABLE '%-.192s' IMPORT TABLESPACE 失败,错误%lu:'%s'"
+ eng "ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %lu : '%s'"
ER_INNODB_INDEX_CORRUPT
- eng "Index corrupt: %s"
+ chi "索引æŸå:%s"
+ eng "Index corrupt: %s"
ER_INVALID_YEAR_COLUMN_LENGTH
- eng "YEAR(%lu) column type is deprecated. Creating YEAR(4) column instead"
- rus "Тип YEAR(%lu) более не поддерживаетÑÑ, вмеÑто него будет Ñоздана колонка Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ YEAR(4)"
+ chi "已弃用YEAR(%lu)列类型。创建YEAR(4)列代替"
+ eng "YEAR(%lu) column type is deprecated. Creating YEAR(4) column instead"
+ rus "Тип YEAR(%lu) более не поддерживаетÑÑ, вмеÑто него будет Ñоздана колонка Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ YEAR(4)"
ER_NOT_VALID_PASSWORD
- eng "Your password does not satisfy the current policy requirements (%s)"
- ukr "Ваш пароль не відповідає поточним правилам (%s)"
+ eng "Your password does not satisfy the current policy requirements (%s)"
+ ukr "Ваш пароль не відповідає поточним правилам (%s)"
ER_MUST_CHANGE_PASSWORD
- eng "You must SET PASSWORD before executing this statement"
- bgn "ТрÑбва първо да Ñи Ñмените паролата ÑÑŠÑ SET PASSWORD за да можете да изпълните тази команда"
+ bgn "ТрÑбва първо да Ñи Ñмените паролата ÑÑŠÑ SET PASSWORD за да можете да изпълните тази команда"
+ chi "您必须在执行此语å¥ä¹‹å‰è®¾ç½®å¯†ç "
+ eng "You must SET PASSWORD before executing this statement"
+ rum "Trebuie sa iti schimbi parola folosind SET PASSWORD inainte de a executa aceasta comanda"
ER_FK_NO_INDEX_CHILD
- eng "Failed to add the foreign key constaint. Missing index for constraint '%s' in the foreign table '%s'"
+ chi "无法添加外键约æŸã€‚外表'%s'中的约æŸ'%s'缺少索引"
+ eng "Failed to add the foreign key constraint. Missing index for constraint '%s' in the foreign table '%s'"
ER_FK_NO_INDEX_PARENT
- eng "Failed to add the foreign key constaint. Missing index for constraint '%s' in the referenced table '%s'"
+ chi "无法添加外键约æŸã€‚引用的表'%s'中的约æŸ'%s'缺少索引"
+ eng "Failed to add the foreign key constraint. Missing index for constraint '%s' in the referenced table '%s'"
ER_FK_FAIL_ADD_SYSTEM
+ chi "无法将外键约æŸ'%s'添加到系统表"
eng "Failed to add the foreign key constraint '%s' to system tables"
ER_FK_CANNOT_OPEN_PARENT
+ chi "无法打开引用的表'%s'"
eng "Failed to open the referenced table '%s'"
ER_FK_INCORRECT_OPTION
+ chi "无法在表'%s'上添加外键约æŸã€‚外键约æŸ'%s'中的选项ä¸æ­£ç¡®"
eng "Failed to add the foreign key constraint on table '%s'. Incorrect options in FOREIGN KEY constraint '%s'"
ER_DUP_CONSTRAINT_NAME
- eng "Duplicate %s constraint name '%s'"
+ chi "é‡å¤%s约æŸå称'%s'"
+ eng "Duplicate %s constraint name '%s'"
ER_PASSWORD_FORMAT
- eng "The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function"
+ chi "密ç å“ˆå¸Œæ²¡æœ‰é¢„期的格å¼ã€‚检查密ç ï¼ˆï¼‰å‡½æ•°æ˜¯å¦ä½¿ç”¨æ­£ç¡®çš„密ç ç®—法"
+ eng "The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function"
ER_FK_COLUMN_CANNOT_DROP
+ chi "无法删除'%-.192s'列:在外部索引约æŸ'%-.192s'中需è¦"
eng "Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s'"
ger "Kann Spalte '%-.192s' nicht löschen: wird für eine Fremdschlüsselbeschränkung '%-.192s' benötigt"
ER_FK_COLUMN_CANNOT_DROP_CHILD
+ chi "无法删除列'%-.192s':在外键约æŸ'%-.192s'中需è¦ï¼Œè¡¨%-.192s"
eng "Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s' of table %-.192s"
ger "Kann Spalte '%-.192s' nicht löschen: wird für eine Fremdschlüsselbeschränkung '%-.192s' der Tabelle %-.192s benötigt"
ER_FK_COLUMN_NOT_NULL
+ chi "列'%-.192s'ä¸èƒ½æ²¡æœ‰null:在外键约æŸ'%-.192s'设置为null"
eng "Column '%-.192s' cannot be NOT NULL: needed in a foreign key constraint '%-.192s' SET NULL"
ger "Spalte '%-.192s' kann nicht NOT NULL sein: wird für eine Fremdschlüsselbeschränkung '%-.192s' SET NULL benötigt"
ER_DUP_INDEX
- eng "Duplicate index %`s. This is deprecated and will be disallowed in a future release"
+ chi "é‡å¤ç´¢å¼•%`s。这已弃用,将在未æ¥çš„版本中ä¸å…许"
+ eng "Duplicate index %`s. This is deprecated and will be disallowed in a future release"
ER_FK_COLUMN_CANNOT_CHANGE
- eng "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s'"
+ chi "无法更改列'%-.192s':用于外部键约æŸ'%-.192s'"
+ eng "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s'"
ER_FK_COLUMN_CANNOT_CHANGE_CHILD
- eng "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s' of table '%-.192s'"
+ chi "无法更改列'%-.192s':用于在外部键约æŸ'%-.192s'的表'%-.192s'"
+ eng "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s' of table '%-.192s'"
ER_FK_CANNOT_DELETE_PARENT
- eng "Cannot delete rows from table which is parent in a foreign key constraint '%-.192s' of table '%-.192s'"
+ chi "无法从表中删除æ¥è‡ªè¡¨ä¸­çš„父级的表中的行'%-.192sâ€è¡¨'%-.192s'"
+ eng "Cannot delete rows from table which is parent in a foreign key constraint '%-.192s' of table '%-.192s'"
ER_MALFORMED_PACKET
- eng "Malformed communication packet"
+ chi "畸形通信包"
+ eng "Malformed communication packet"
ER_READ_ONLY_MODE
+ chi "以åªè¯»æ¨¡å¼è¿è¡Œ"
eng "Running in read-only mode"
ER_GTID_NEXT_TYPE_UNDEFINED_GROUP
- eng "When GTID_NEXT is set to a GTID, you must explicitly set it again after a COMMIT or ROLLBACK. If you see this error message in the slave SQL thread, it means that a table in the current transaction is transactional on the master and non-transactional on the slave. In a client connection, it means that you executed SET GTID_NEXT before a transaction and forgot to set GTID_NEXT to a different identifier or to 'AUTOMATIC' after COMMIT or ROLLBACK. Current GTID_NEXT is '%s'"
+ chi "当GTID_NEXT设置为GTID时,必须在æ交或回滚åŽç«‹å³å°†å…¶å†æ¬¡è®¾ç½®ã€‚如果在从SQL线程中看到此错误消æ¯ï¼Œåˆ™è¡¨ç¤ºå½“å‰äº‹åŠ¡ä¸­çš„表是在主站和从站上的éžäº¤æ˜“的事务性。在客户端连接中,它æ„味ç€æ‚¨åœ¨äº‹åŠ¡ä¹‹å‰æ‰§è¡ŒSET GTID_NEXT并忘记将GTID_NEXT设置为ä¸åŒçš„标识符或在æ交或回滚åŽâ€œè‡ªåŠ¨â€ã€‚当å‰gtid_next是'%s'"
+ eng "When GTID_NEXT is set to a GTID, you must explicitly set it again after a COMMIT or ROLLBACK. If you see this error message in the slave SQL thread, it means that a table in the current transaction is transactional on the master and non-transactional on the slave. In a client connection, it means that you executed SET GTID_NEXT before a transaction and forgot to set GTID_NEXT to a different identifier or to 'AUTOMATIC' after COMMIT or ROLLBACK. Current GTID_NEXT is '%s'"
ER_VARIABLE_NOT_SETTABLE_IN_SP
- eng "The system variable %.200s cannot be set in stored procedures"
+ chi "无法在存储过程中设置系统å˜é‡%.200s"
+ eng "The system variable %.200s cannot be set in stored procedures"
ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF
- eng "GTID_PURGED can only be set when GTID_MODE = ON"
+ chi "åªèƒ½åœ¨GTID_MODE = ON设置GTID_PURGED"
+ eng "GTID_PURGED can only be set when GTID_MODE = ON"
ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY
- eng "GTID_PURGED can only be set when GTID_EXECUTED is empty"
+ chi "åªæœ‰åœ¨GTID_EXECUTED为空时æ‰å¯ä»¥è®¾ç½®GTID_PURGED"
+ eng "GTID_PURGED can only be set when GTID_EXECUTED is empty"
ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY
- eng "GTID_PURGED can only be set when there are no ongoing transactions (not even in other clients)"
+ chi "åªæœ‰åœ¨æ²¡æœ‰æŒç»­çš„事务时æ‰å¯ä»¥è®¾ç½®GTID_PURGED(å³ä½¿åœ¨å…¶ä»–客户端中ä¸ï¼‰"
+ eng "GTID_PURGED can only be set when there are no ongoing transactions (not even in other clients)"
ER_GTID_PURGED_WAS_CHANGED
- eng "GTID_PURGED was changed from '%s' to '%s'"
+ chi "GTID_PURGED从'%s'更改为'%s'"
+ eng "GTID_PURGED was changed from '%s' to '%s'"
ER_GTID_EXECUTED_WAS_CHANGED
- eng "GTID_EXECUTED was changed from '%s' to '%s'"
+ chi "GTID_EXECUTE从'%s'更改为'%s'"
+ eng "GTID_EXECUTED was changed from '%s' to '%s'"
ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
- eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT, and both replicated and non replicated tables are written to"
+ chi "无法执行语å¥ï¼šç”±äºŽBINLOG_FORMAT = STATEMENT,因此无法写入二进制日志,并将å¤åˆ¶å’Œéžå¤åˆ¶è¡¨å†™å…¥"
+ eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT, and both replicated and non replicated tables are written to"
ER_ALTER_OPERATION_NOT_SUPPORTED 0A000
- eng "%s is not supported for this operation. Try %s"
+ chi "æ­¤æ“作ä¸æ”¯æŒ%s。试试%s"
+ eng "%s is not supported for this operation. Try %s"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON 0A000
- eng "%s is not supported. Reason: %s. Try %s"
+ chi "ä¸æ”¯æŒ%s。原因:%s。试试%s"
+ eng "%s is not supported. Reason: %s. Try %s"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY
- eng "COPY algorithm requires a lock"
+ chi "å¤åˆ¶ç®—法需è¦é”定"
+ eng "COPY algorithm requires a lock"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION
- eng "Partition specific operations do not yet support LOCK/ALGORITHM"
+ chi "分区特定æ“作尚ä¸æ”¯æŒé”定/算法"
+ eng "Partition specific operations do not yet support LOCK/ALGORITHM"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME
- eng "Columns participating in a foreign key are renamed"
+ chi "å‚与外键的列被更å"
+ eng "Columns participating in a foreign key are renamed"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE
- eng "Cannot change column type"
+ chi "无法更改列类型"
+ eng "Cannot change column type"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK
- eng "Adding foreign keys needs foreign_key_checks=OFF"
+ chi "添加外键需è¦figner_key_checks = OFF"
+ eng "Adding foreign keys needs foreign_key_checks=OFF"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_IGNORE
- eng "Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows"
+ chi "使用忽略创建唯一索引需è¦å¤åˆ¶ç®—法删除é‡å¤è¡Œ"
+ eng "Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK
- eng "Dropping a primary key is not allowed without also adding a new primary key"
+ chi "ä¸å…许删除主键,而ä¸æ·»åŠ æ–°çš„主键"
+ eng "Dropping a primary key is not allowed without also adding a new primary key"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC
- eng "Adding an auto-increment column requires a lock"
+ chi "添加自动增é‡åˆ—需è¦é”定"
+ eng "Adding an auto-increment column requires a lock"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS
- eng "Cannot replace hidden FTS_DOC_ID with a user-visible one"
+ chi "无法使用用户å¯è§çš„替æ¢éšè—çš„FTS_DOC_ID"
+ eng "Cannot replace hidden FTS_DOC_ID with a user-visible one"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS
- eng "Cannot drop or rename FTS_DOC_ID"
+ chi "无法删除或é‡å‘½åFTS_DOC_ID"
+ eng "Cannot drop or rename FTS_DOC_ID"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS
- eng "Fulltext index creation requires a lock"
+ chi "fulltext索引创建需è¦é”定"
+ eng "Fulltext index creation requires a lock"
ER_SQL_SLAVE_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE
- eng "sql_slave_skip_counter can not be set when the server is running with GTID_MODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction"
+ chi "使用GTID_Mode = ONè¿è¡Œæ—¶ï¼Œæ— æ³•è®¾ç½®SQL_SLAVE_SKIP_COUNTER。相å,对于è¦è·³è¿‡çš„æ¯ä¸ªäº‹åŠ¡ï¼Œä½¿ç”¨ä¸Žäº‹åŠ¡ç›¸åŒçš„GTID生æˆç©ºäº‹åŠ¡"
+ eng "sql_slave_skip_counter can not be set when the server is running with GTID_MODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction"
ER_DUP_UNKNOWN_IN_INDEX 23000
- cze "Zdvojený klÃ­Ä (Äíslo klíÄe '%-.192s')"
- dan "Flere ens nøgler for indeks '%-.192s'"
- nla "Dubbele ingang voor zoeksleutel '%-.192s'"
- eng "Duplicate entry for key '%-.192s'"
- est "Kattuv väärtus võtmele '%-.192s'"
- fre "Duplicata du champ pour la clef '%-.192s'"
- ger "Doppelter Eintrag für Schlüssel '%-.192s'"
- greek "Διπλή εγγÏαφή για το κλειδί '%-.192s'"
- hun "Duplikalt bejegyzes a '%-.192s' kulcs szerint"
- ita "Valore duplicato per la chiave '%-.192s'"
- jpn "ã¯ç´¢å¼• '%-.192s' ã§é‡è¤‡ã—ã¦ã„ã¾ã™ã€‚"
- kor "ì¤‘ë³µëœ ìž…ë ¥ ê°’: key '%-.192s'"
- nor "Like verdier for nøkkel '%-.192s'"
- norwegian-ny "Like verdiar for nykkel '%-.192s'"
- pol "Powtórzone wystąpienie dla klucza '%-.192s'"
- por "Entrada duplicada para a chave '%-.192s'"
- rum "Cimpul e duplicat pentru cheia '%-.192s'"
- rus "ДублирующаÑÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ по ключу '%-.192s'"
- serbian "Dupliran unos za kljuÄ '%-.192s'"
- slo "Opakovaný kÄ¾ÃºÄ (Äíslo kľúÄa '%-.192s')"
- spa "Entrada duplicada para la clave '%-.192s'"
- swe "Dublett för nyckel '%-.192s'"
- ukr "Дублюючий Ð·Ð°Ð¿Ð¸Ñ Ð´Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° '%-.192s'"
+ chi "索引的é‡å¤æ¡ç›®'%-.192s'"
+ cze "Zdvojený klÃ­Ä (Äíslo klíÄe '%-.192s')"
+ dan "Flere ens nøgler for indeks '%-.192s'"
+ eng "Duplicate entry for key '%-.192s'"
+ est "Kattuv väärtus võtmele '%-.192s'"
+ fre "Duplicata du champ pour la clef '%-.192s'"
+ ger "Doppelter Eintrag für Schlüssel '%-.192s'"
+ greek "Διπλή εγγÏαφή για το κλειδί '%-.192s'"
+ hun "Duplikalt bejegyzes a '%-.192s' kulcs szerint"
+ ita "Valore duplicato per la chiave '%-.192s'"
+ jpn "ã¯ç´¢å¼• '%-.192s' ã§é‡è¤‡ã—ã¦ã„ã¾ã™ã€‚"
+ kor "ì¤‘ë³µëœ ìž…ë ¥ ê°’: key '%-.192s'"
+ nla "Dubbele ingang voor zoeksleutel '%-.192s'"
+ nor "Like verdier for nøkkel '%-.192s'"
+ norwegian-ny "Like verdiar for nykkel '%-.192s'"
+ pol "Powtórzone wystąpienie dla klucza '%-.192s'"
+ por "Entrada duplicada para a chave '%-.192s'"
+ rum "Cimpul e duplicat pentru cheia '%-.192s'"
+ rus "ДублирующаÑÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ по ключу '%-.192s'"
+ serbian "Dupliran unos za kljuÄ '%-.192s'"
+ slo "Opakovaný kÄ¾ÃºÄ (Äíslo kľúÄa '%-.192s')"
+ spa "Entrada duplicada para la clave '%-.192s'"
+ swe "Dublett för nyckel '%-.192s'"
+ ukr "Дублюючий Ð·Ð°Ð¿Ð¸Ñ Ð´Ð»Ñ ÐºÐ»ÑŽÑ‡Ð° '%-.192s'"
ER_IDENT_CAUSES_TOO_LONG_PATH
- eng "Long database name and identifier for object resulted in path length exceeding %d characters. Path: '%s'"
+ chi "对象的长数æ®åº“å称和标识符导致路径长度超过%d字符。路径:'%s'"
+ eng "Long database name and identifier for object resulted in path length exceeding %d characters. Path: '%s'"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL
- eng "cannot convert NULL to non-constant DEFAULT"
+ chi "无法将null转æ¢ä¸ºéžå¸¸é‡é»˜è®¤å€¼"
+ eng "cannot convert NULL to non-constant DEFAULT"
ER_MUST_CHANGE_PASSWORD_LOGIN
- eng "Your password has expired. To log in you must change it using a client that supports expired passwords"
- bgn "Паролата ви е изтекла. За да влезете Ñ‚Ñ€Ñбва да Ñ Ñмените използвайки клиент който поддрържа такива пароли"
+ bgn "Паролата ви е изтекла. За да влезете Ñ‚Ñ€Ñбва да Ñ Ñмените използвайки клиент който поддрържа такива пароли"
+ chi "您的密ç å·²è¿‡æœŸã€‚è¦ç™»å½•æ‚¨å¿…须使用支æŒè¿‡æœŸå¯†ç çš„客户端更改它"
+ eng "Your password has expired. To log in you must change it using a client that supports expired passwords"
+ rum "Parola ta a expirat. Pentru a te loga, trebuie sa o schimbi folosind un client ce suporta parole expirate"
ER_ROW_IN_WRONG_PARTITION
- eng "Found a row in wrong partition %s"
- swe "Hittade en rad i fel partition %s"
+ chi "在错误分区%s中找到了一行"
+ eng "Found a row in wrong partition %s"
+ swe "Hittade en rad i fel partition %s"
ER_MTS_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX
- eng "Cannot schedule event %s, relay-log name %s, position %s to Worker thread because its size %lu exceeds %lu of slave_pending_jobs_size_max"
+ chi "无法安排事件%s,中继日志å称%s,position%s对工作线程,因为它的大å°%lu超过了slave_pending_jobs_size_max (%lu)"
+ eng "Cannot schedule event %s, relay-log name %s, position %s to Worker thread because its size %lu exceeds %lu of slave_pending_jobs_size_max"
ER_INNODB_NO_FT_USES_PARSER
- eng "Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table"
+ chi "无法在InnoDB表上CREATE FULLTEXT INDEX WITH PARSER"
+ eng "Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table"
ER_BINLOG_LOGICAL_CORRUPTION
- eng "The binary log file '%s' is logically corrupted: %s"
+ chi "二进制日志文件'%s'逻辑æŸå:%s"
+ eng "The binary log file '%s' is logically corrupted: %s"
ER_WARN_PURGE_LOG_IN_USE
- eng "file %s was not purged because it was being read by %d thread(s), purged only %d out of %d files"
+ chi "未清除文件%s,因为它被%d线程读å–,åªæ¸…除%d文件中的%d"
+ eng "file %s was not purged because it was being read by %d thread(s), purged only %d out of %d files"
ER_WARN_PURGE_LOG_IS_ACTIVE
- eng "file %s was not purged because it is the active log file"
+ chi "文件%s未清除,因为它是活动日志文件"
+ eng "file %s was not purged because it is the active log file"
ER_AUTO_INCREMENT_CONFLICT
- eng "Auto-increment value in UPDATE conflicts with internally generated values"
-
+ chi "更新中的自动增é‡å€¼ä¸Žå†…部生æˆçš„值冲çª"
+ eng "Auto-increment value in UPDATE conflicts with internally generated values"
WARN_ON_BLOCKHOLE_IN_RBR
- eng "Row events are not logged for %s statements that modify BLACKHOLE tables in row format. Table(s): '%-.192s'"
+ chi "未记录行事件的%s语å¥ï¼Œè¯¥è¯­å¥ä»¥è¡Œæ ¼å¼ä¿®æ”¹BlackHole表。表:'%-.192s'"
+ eng "Row events are not logged for %s statements that modify BLACKHOLE tables in row format. Table(s): '%-.192s'"
ER_SLAVE_MI_INIT_REPOSITORY
- eng "Slave failed to initialize master info structure from the repository"
+ chi "从设备无法从存储库åˆå§‹åŒ–主信æ¯ç»“æž„"
+ eng "Slave failed to initialize master info structure from the repository"
ER_SLAVE_RLI_INIT_REPOSITORY
- eng "Slave failed to initialize relay log info structure from the repository"
+ chi "从站无法从存储库åˆå§‹åŒ–中继日志信æ¯ç»“æž„"
+ eng "Slave failed to initialize relay log info structure from the repository"
ER_ACCESS_DENIED_CHANGE_USER_ERROR 28000
- eng "Access denied trying to change to user '%-.48s'@'%-.64s' (using password: %s). Disconnecting"
bgn "Отказан доÑтъп при опит за ÑмÑна към потребител %-.48s'@'%-.64s' (използвана парола: %s). ЗатварÑне на връзката"
+ chi "访问拒ç»å°è¯•æ›´æ”¹ä¸ºç”¨æˆ·'%-.48s'@'%-.64s'(使用密ç ï¼š%s)。断开连接"
+ eng "Access denied trying to change to user '%-.48s'@'%-.64s' (using password: %s). Disconnecting"
ER_INNODB_READ_ONLY
- eng "InnoDB is in read only mode"
- hindi "InnoDB केवल READ-ONLY मोड में है"
+ chi "innodb是åªè¯»æ¨¡å¼"
+ eng "InnoDB is in read only mode"
+ hindi "InnoDB केवल READ-ONLY मोड में है"
ER_STOP_SLAVE_SQL_THREAD_TIMEOUT
- eng "STOP SLAVE command execution is incomplete: Slave SQL thread got the stop signal, thread is busy, SQL thread will stop once the current task is complete"
+ chi "STOP SLAVE命令执行ä¸å®Œæ•´ï¼šä»ŽSQL线程获得åœæ­¢ä¿¡å·ï¼Œçº¿ç¨‹æ­£å¿™ï¼Œä¸€æ—¦å½“å‰ä»»åŠ¡å®ŒæˆåŽï¼ŒSQL线程将åœæ­¢"
+ eng "STOP SLAVE command execution is incomplete: Slave SQL thread got the stop signal, thread is busy, SQL thread will stop once the current task is complete"
ER_STOP_SLAVE_IO_THREAD_TIMEOUT
- eng "STOP SLAVE command execution is incomplete: Slave IO thread got the stop signal, thread is busy, IO thread will stop once the current task is complete"
+ chi "STOP SLAVE命令执行ä¸å®Œæ•´ï¼šä»ŽæœºåŠ¨ç¨‹çº¿ç¨‹å¾—到åœæ­¢ä¿¡å·ï¼Œçº¿ç¨‹å¾ˆå¿™ï¼Œä¸€æ—¦å½“å‰ä»»åŠ¡å®ŒæˆåŽï¼ŒIO线程将åœæ­¢ã€‚"
+ eng "STOP SLAVE command execution is incomplete: Slave IO thread got the stop signal, thread is busy, IO thread will stop once the current task is complete"
ER_TABLE_CORRUPT
- eng "Operation cannot be performed. The table '%-.64s.%-.64s' is missing, corrupt or contains bad data"
+ chi "无法执行æ“作。表'%-.64s。%-.64s'丢失,æŸå或包å«ä¸è‰¯æ•°æ®"
+ eng "Operation cannot be performed. The table '%-.64s.%-.64s' is missing, corrupt or contains bad data"
ER_TEMP_FILE_WRITE_FAILURE
- eng "Temporary file write failure"
+ chi "临时文件写入失败"
+ eng "Temporary file write failure"
ER_INNODB_FT_AUX_NOT_HEX_ID
- eng "Upgrade index name failed, please use create index(alter table) algorithm copy to rebuild index"
-
-
+ chi "å‡çº§ç´¢å¼•å称失败,请使用创建索引(ALTER TABLE)算法å¤åˆ¶æ¥é‡å»ºç´¢å¼•"
+ eng "Upgrade index name failed, please use create index(alter table) algorithm copy to rebuild index"
#
-# MariaDB error messages section starts here
#
+# MariaDB error messages section starts here
+
# The following is here to allow us to detect if there was missing
# error messages in the errmsg.sys file
ER_LAST_MYSQL_ERROR_MESSAGE
- eng ""
+ eng ""
# MariaDB error numbers starts from 1900
start-error-number 1900
ER_UNUSED_18
- eng ""
+ eng ""
ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
- eng "Function or expression '%s' cannot be used in the %s clause of %`s"
+ chi "函数或表达å¼'%s'ä¸èƒ½ç”¨äºŽ%sçš„%`s"
+ eng "Function or expression '%s' cannot be used in the %s clause of %`s"
ER_UNUSED_19
- eng ""
+ eng ""
ER_PRIMARY_KEY_BASED_ON_GENERATED_COLUMN
- eng "Primary key cannot be defined upon a generated column"
+ chi "主键无法在生æˆçš„列上定义"
+ eng "Primary key cannot be defined upon a generated column"
ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN
- eng "Key/Index cannot be defined on a virtual generated column"
+ chi "无法在虚拟生æˆçš„列上定义键/索引"
+ eng "Key/Index cannot be defined on a virtual generated column"
ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN
- eng "Cannot define foreign key with %s clause on a generated column"
+ chi "无法在生æˆçš„列上定义%så­å¥çš„外键"
+ eng "Cannot define foreign key with %s clause on a generated column"
ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
- eng "The value specified for generated column '%s' in table '%s' has been ignored"
+ chi "忽略了表'%s'中为生æˆçš„列'%s'指定的值已被忽略"
+ eng "The value specified for generated column '%s' in table '%s' has been ignored"
ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
- eng "This is not yet supported for generated columns"
+ chi "生æˆçš„列尚未支æŒè¿™ä¸€ç‚¹"
+ eng "This is not yet supported for generated columns"
ER_UNUSED_20
- eng ""
+ eng ""
ER_UNUSED_21
- eng ""
+ eng ""
ER_UNSUPPORTED_ENGINE_FOR_GENERATED_COLUMNS
- eng "%s storage engine does not support generated columns"
- hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s COMPUTED कॉलमà¥à¤¸ को सपोरà¥à¤Ÿ नहीं करता"
+ chi "%s存储引擎ä¸æ”¯æŒç”Ÿæˆçš„列"
+ eng "%s storage engine does not support generated columns"
+ hindi "सà¥à¤Ÿà¥‹à¤°à¥‡à¤œ इंजन %s COMPUTED कॉलमà¥à¤¸ को सपोरà¥à¤Ÿ नहीं करता"
ER_UNKNOWN_OPTION
- eng "Unknown option '%-.64s'"
- hindi "अजà¥à¤žà¤¾à¤¤ विकलà¥à¤ª '%-.64s'"
+ chi "未知选项'%-.64s'"
+ eng "Unknown option '%-.64s'"
+ hindi "अजà¥à¤žà¤¾à¤¤ विकलà¥à¤ª '%-.64s'"
ER_BAD_OPTION_VALUE
- eng "Incorrect value '%-.64T' for option '%-.64s'"
- hindi "गलत मान '%-.64T' विकलà¥à¤ª '%-.64s' के लिà¤"
+ chi "值ä¸æ­£ç¡®'%-.64T'选项'%-.64s'"
+ eng "Incorrect value '%-.64T' for option '%-.64s'"
+ hindi "गलत मान '%-.64T' विकलà¥à¤ª '%-.64s' के लिà¤"
ER_UNUSED_6
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_UNUSED_7
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_UNUSED_8
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
ER_DATA_OVERFLOW 22003
+ chi "转æ¢'%-.128s'到%-.32s时溢出。值截断"
eng "Got overflow when converting '%-.128s' to %-.32s. Value truncated"
ER_DATA_TRUNCATED 22003
+ chi "转æ¢'%-.128s'到%-.32s时值截断"
eng "Truncated value '%-.128s' when converting to %-.32s"
ER_BAD_DATA 22007
+ chi "éžæ³•å€¼'%-.128s',在转æ¢%-.32sæ—¶é‡åˆ°"
eng "Encountered illegal value '%-.128s' when converting to %-.32s"
ER_DYN_COL_WRONG_FORMAT
+ chi "é‡åˆ°éžæ³•æ ¼å¼çš„动æ€åˆ—字符串"
eng "Encountered illegal format of dynamic column string"
ER_DYN_COL_IMPLEMENTATION_LIMIT
+ chi "达到动æ€åˆ—实现é™åˆ¶"
eng "Dynamic column implementation limit reached"
ER_DYN_COL_DATA 22007
+ chi "éžæ³•å€¼ç”¨ä½œåŠ¨æ€åˆ—函数的å‚æ•°"
eng "Illegal value used as argument of dynamic column function"
ER_DYN_COL_WRONG_CHARSET
+ chi "动æ€åˆ—包å«æœªçŸ¥å­—符集"
eng "Dynamic column contains unknown character set"
ER_ILLEGAL_SUBQUERY_OPTIMIZER_SWITCHES
+ chi "“in_to_existsâ€æˆ–'materialization'optimizer_switch标志中的至少一个必须是'å¼€å¯'"
eng "At least one of the 'in_to_exists' or 'materialization' optimizer_switch flags must be 'on'"
hindi "कम से कम 'in_to_exists' या 'materialization' optimizer_switch फà¥à¤²à¥ˆà¤— 'ON' होना चाहिà¤"
ER_QUERY_CACHE_IS_DISABLED
+ chi "查询缓存已ç¦ç”¨ï¼ˆè°ƒæ•´å¤§å°æˆ–类似命令正在进行中);ç¨åŽé‡å¤æ­¤å‘½ä»¤"
eng "Query cache is disabled (resize or similar command in progress); repeat this command later"
ER_QUERY_CACHE_IS_GLOBALY_DISABLED
+ chi "查询缓存全局ç¦ç”¨ï¼Œæ‚¨æ— æ³•ä¸ºæ­¤ä¼šè¯å¯ç”¨å®ƒ"
eng "Query cache is globally disabled and you can't enable it only for this session"
hindi "कà¥à¤µà¥‡à¤°à¥€ कैश गà¥à¤²à¥‹à¤¬à¤² सà¥à¤¤à¤° पर DISABLED है और आप इसे केवल सतà¥à¤° के लिठENABLE नहीं कर सकते"
ER_VIEW_ORDERBY_IGNORED
+ chi "查看'%-.192s'.'%-.192s's ORDER BYå­å¥è¢«å¿½ç•¥ï¼Œå› ä¸ºè¿˜æœ‰å…¶ä»–ORDER BYå­å¥"
eng "View '%-.192s'.'%-.192s' ORDER BY clause ignored because there is other ORDER BY clause already"
ER_CONNECTION_KILLED 70100
+ chi "连接被æ€æ­»"
eng "Connection was killed"
hindi "कनेकà¥à¤¶à¤¨ को समापà¥à¤¤ कर दिया गया है"
ER_UNUSED_12
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SKIP_REPLICATION
+ chi "无法修改事务中的@@session.skip_replication"
eng "Cannot modify @@session.skip_replication inside a transaction"
ER_STORED_FUNCTION_PREVENTS_SWITCH_SKIP_REPLICATION
+ chi "无法修改存储函数或触å‘器内的@@session.skip_replication"
eng "Cannot modify @@session.skip_replication inside a stored function or trigger"
ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT
+ chi "查询执行被中断。查询检查至少%llu行,超过é™åˆ¶è¡Œï¼ˆ%llu)。查询结果å¯èƒ½æ˜¯ä¸å®Œæ•´çš„"
eng "Query execution was interrupted. The query examined at least %llu rows, which exceeds LIMIT ROWS EXAMINED (%llu). The query result may be incomplete"
ER_NO_SUCH_TABLE_IN_ENGINE 42S02
+ chi "表'%-.192s.%-.192s'在引擎中ä¸å­˜åœ¨"
eng "Table '%-.192s.%-.192s' doesn't exist in engine"
hindi "टेबल '%-.192s.%-.192s' इंजन में मौजूद नहीं है"
swe "Det finns ingen tabell som heter '%-.192s.%-.192s' i handlern"
ER_TARGET_NOT_EXPLAINABLE
+ chi "目标未è¿è¡Œå¯è§£é‡Šçš„命令"
eng "Target is not running an EXPLAINable command"
ER_CONNECTION_ALREADY_EXISTS
+ chi "连接'%.*s'与现有连接'%.*s'冲çª"
eng "Connection '%.*s' conflicts with existing connection '%.*s'"
ER_MASTER_LOG_PREFIX
+ chi "Master'%.*s':"
eng "Master '%.*s': "
ER_CANT_START_STOP_SLAVE
+ chi "ä¸èƒ½%sSLAVE'%.*s'"
eng "Can't %s SLAVE '%.*s'"
ER_SLAVE_STARTED
+ chi "SLAVE '%.*s'开始了"
eng "SLAVE '%.*s' started"
ER_SLAVE_STOPPED
+ chi "slave'%.*s'åœæ­¢äº†"
eng "SLAVE '%.*s' stopped"
ER_SQL_DISCOVER_ERROR
+ chi "引擎%s无法å‘现表%`-.192s.%`-.192s,'%s'"
eng "Engine %s failed to discover table %`-.192s.%`-.192s with '%s'"
ER_FAILED_GTID_STATE_INIT
+ chi "åˆå§‹åŒ–å¤åˆ¶GTID状æ€å¤±è´¥"
eng "Failed initializing replication GTID state"
ER_INCORRECT_GTID_STATE
+ chi "无法解æžGTID列表"
eng "Could not parse GTID list"
ER_CANNOT_UPDATE_GTID_STATE
+ chi "无法更新Replication Slave GTID状æ€"
eng "Could not update replication slave gtid state"
ER_DUPLICATE_GTID_DOMAIN
- eng "GTID %u-%u-%llu and %u-%u-%llu conflict (duplicate domain id %u)"
+ chi "GTID %u-%u-%lluå’Œ%u-%u-%llu冲çªï¼ˆé‡å¤åŸŸID%u)"
+ eng "GTID %u-%u-%llu and %u-%u-%llu conflict (duplicate domain id %u)"
ER_GTID_OPEN_TABLE_FAILED
+ chi "未能打开%s.%s"
eng "Failed to open %s.%s"
ger "Öffnen von %s.%s fehlgeschlagen"
ER_GTID_POSITION_NOT_FOUND_IN_BINLOG
- eng "Connecting slave requested to start from GTID %u-%u-%llu, which is not in the master's binlog"
+ chi "连接从站请求从GTID%u-%u-%llu开始,这ä¸åœ¨Masterçš„Binlog中"
+ eng "Connecting slave requested to start from GTID %u-%u-%llu, which is not in the master's binlog"
ER_CANNOT_LOAD_SLAVE_GTID_STATE
- eng "Failed to load replication slave GTID position from table %s.%s"
+ chi "无法从表%s中加载Replication Slave GTIDä½ç½®ã€‚%s"
+ eng "Failed to load replication slave GTID position from table %s.%s"
ER_MASTER_GTID_POS_CONFLICTS_WITH_BINLOG
- eng "Specified GTID %u-%u-%llu conflicts with the binary log which contains a more recent GTID %u-%u-%llu. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos"
+ chi "指定的GTID%u-%u-%llu与二进制日志冲çªï¼Œå…¶ä¸­åŒ…å«æ›´æ–°çš„GTID%u-%u-%llu。如果使用master_gtid_pos = current_pos,则Binlogä½ç½®å°†è¦†ç›–@@gtid_slave_pos的新值"
+ eng "Specified GTID %u-%u-%llu conflicts with the binary log which contains a more recent GTID %u-%u-%llu. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos"
ER_MASTER_GTID_POS_MISSING_DOMAIN
- eng "Specified value for @@gtid_slave_pos contains no value for replication domain %u. This conflicts with the binary log which contains GTID %u-%u-%llu. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos"
+ chi "指定值为@@gtid_slave_posä¸åŒ…å«å¤åˆ¶åŸŸ%u的值。这与二进制日志冲çªï¼Œå…¶ä¸­åŒ…å«gtid%u-%u-%llu。如果使用master_gtid_pos = current_pos,则Binlogä½ç½®å°†è¦†ç›–@@ gtid_slave_pos的新值"
+ eng "Specified value for @@gtid_slave_pos contains no value for replication domain %u. This conflicts with the binary log which contains GTID %u-%u-%llu. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos"
ER_UNTIL_REQUIRES_USING_GTID
- eng "START SLAVE UNTIL master_gtid_pos requires that slave is using GTID"
+ chi "å¯åŠ¨ä»Žç«™ï¼Œç›´åˆ°master_gtid_posè¦æ±‚从站使用gtid"
+ eng "START SLAVE UNTIL master_gtid_pos requires that slave is using GTID"
ER_GTID_STRICT_OUT_OF_ORDER
- eng "An attempt was made to binlog GTID %u-%u-%llu which would create an out-of-order sequence number with existing GTID %u-%u-%llu, and gtid strict mode is enabled"
+ chi "å°è¯•å¯¹Binlog GTID%u-%u-%llu进行,这将创建具有现有GTID%u-%u-%llu的订å•æ— åºåºåˆ—å·ï¼Œå¹¶ä¸”å¯ç”¨äº†GTID严格模å¼"
+ eng "An attempt was made to binlog GTID %u-%u-%llu which would create an out-of-order sequence number with existing GTID %u-%u-%llu, and gtid strict mode is enabled"
ER_GTID_START_FROM_BINLOG_HOLE
- eng "The binlog on the master is missing the GTID %u-%u-%llu requested by the slave (even though a subsequent sequence number does exist), and GTID strict mode is enabled"
+ chi "主机上的Binlog缺少从站所需请求的GTID%u-%u-%llu(å³ä½¿å­˜åœ¨åŽç»­çš„åºåˆ—å·ï¼‰ï¼Œå¹¶å¯ç”¨GTID严格模å¼"
+ eng "The binlog on the master is missing the GTID %u-%u-%llu requested by the slave (even though a subsequent sequence number does exist), and GTID strict mode is enabled"
ER_SLAVE_UNEXPECTED_MASTER_SWITCH
- eng "Unexpected GTID received from master after reconnect. This normally indicates that the master server was replaced without restarting the slave threads. %s"
+ chi "é‡æ–°è¿žæŽ¥åŽï¼Œä»Žmaster收到æ„外的GTID。这通常表示在ä¸é‡æ–°å¯åŠ¨ä»Žçº¿ç¨‹çš„情况下替æ¢ä¸»æœåŠ¡å™¨ã€‚%s."
+ eng "Unexpected GTID received from master after reconnect. This normally indicates that the master server was replaced without restarting the slave threads. %s"
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_GTID_DOMAIN_ID_SEQ_NO
+ chi "无法修改@@sessient.gtid_domain_id或@@session.gtid_seq_no"
eng "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction"
ER_STORED_FUNCTION_PREVENTS_SWITCH_GTID_DOMAIN_ID_SEQ_NO
+ chi "无法修改@@sessient.gtid_domain_id或@@session.gtid_seq_no或触å‘器"
eng "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a stored function or trigger"
ER_GTID_POSITION_NOT_FOUND_IN_BINLOG2
- eng "Connecting slave requested to start from GTID %u-%u-%llu, which is not in the master's binlog. Since the master's binlog contains GTIDs with higher sequence numbers, it probably means that the slave has diverged due to executing extra erroneous transactions"
+ chi "连接从站请求从GTID%u-%u-%llu开始,这ä¸åœ¨Masterçš„Binlog中。由于Masterçš„Binlog包å«å…·æœ‰æ›´é«˜åºåˆ—å·çš„GTID,因此它å¯èƒ½æ„味ç€ç”±äºŽæ‰§è¡Œé¢å¤–错误的交易,因此slaveå·²ç»åˆ†æ­§"
+ eng "Connecting slave requested to start from GTID %u-%u-%llu, which is not in the master's binlog. Since the master's binlog contains GTIDs with higher sequence numbers, it probably means that the slave has diverged due to executing extra erroneous transactions"
ER_BINLOG_MUST_BE_EMPTY
- eng "This operation is not allowed if any GTID has been logged to the binary log. Run RESET MASTER first to erase the log"
+ chi "如果已将任何GTID记录到二进制日志,则ä¸å…许此æ“作。首先è¿è¡ŒRESET MASTER擦除日志"
+ eng "This operation is not allowed if any GTID has been logged to the binary log. Run RESET MASTER first to erase the log"
ER_NO_SUCH_QUERY
+ chi "未知查询ID:%lld"
eng "Unknown query id: %lld"
ger "Unbekannte Abfrage-ID: %lld"
hindi "अजà¥à¤žà¤¾à¤¤ कà¥à¤µà¥‡à¤°à¥€ ID: %lld"
rus "ÐеизвеÑтный номер запроÑа: %lld"
ER_BAD_BASE64_DATA
- eng "Bad base64 data as position %u"
+ chi "错误Base64æ•°æ®ä½œä¸ºä½ç½®%u"
+ eng "Bad base64 data as position %u"
ER_INVALID_ROLE OP000
- eng "Invalid role specification %`s"
- hindi "अमानà¥à¤¯ रोल विनिरà¥à¤¦à¥‡à¤¶ %`s"
- rum "Rolul %`s este invalid"
+ chi "无效的角色规范%`s"
+ eng "Invalid role specification %`s"
+ hindi "अमानà¥à¤¯ रोल विनिरà¥à¤¦à¥‡à¤¶ %`s"
+ rum "Rolul %`s este invalid"
ER_INVALID_CURRENT_USER 0L000
- eng "The current user is invalid"
+ chi "当å‰ç”¨æˆ·æ— æ•ˆ"
+ eng "The current user is invalid"
hindi "वरà¥à¤¤à¤®à¤¾à¤¨ यूज़र अमानà¥à¤¯ है"
- rum "Utilizatorul curent este invalid"
+ rum "Utilizatorul curent este invalid"
ER_CANNOT_GRANT_ROLE
- eng "Cannot grant role '%s' to: %s"
+ chi "无法将角色'%s'授予:%s"
+ eng "Cannot grant role '%s' to: %s"
hindi "रोल '%s', %s को पà¥à¤°à¤¦à¤¾à¤¨ नहीं कर सकते"
- rum "Rolul '%s' nu poate fi acordat catre: %s"
+ rum "Rolul '%s' nu poate fi acordat catre: %s"
ER_CANNOT_REVOKE_ROLE
- eng "Cannot revoke role '%s' from: %s"
+ chi "无法撤消æ¥è‡ªï¼š%s的角色'%s'"
+ eng "Cannot revoke role '%s' from: %s"
hindi "रोल '%s', %s से हटाया नहीं जा सका"
- rum "Rolul '%s' nu poate fi revocat de la: %s"
+ rum "Rolul '%s' nu poate fi revocat de la: %s"
ER_CHANGE_SLAVE_PARALLEL_THREADS_ACTIVE
- eng "Cannot change @@slave_parallel_threads while another change is in progress"
+ chi "无法更改@@slave_parallel_threads,而å¦ä¸€ä¸ªæ›´æ”¹æ­£åœ¨è¿›è¡Œä¸­"
+ eng "Cannot change @@slave_parallel_threads while another change is in progress"
ER_PRIOR_COMMIT_FAILED
- eng "Commit failed due to failure of an earlier commit on which this one depends"
+ chi "由于早期æ交的失败å–决于ä¾èµ–于哪个ä¾èµ–性,æ交失败"
+ eng "Commit failed due to failure of an earlier commit on which this one depends"
ER_IT_IS_A_VIEW 42S02
+ chi "'%-.192s'是一个VIEW"
eng "'%-.192s' is a view"
hindi "'%-.192s' à¤à¤• VIEW है"
ER_SLAVE_SKIP_NOT_IN_GTID
- eng "When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position"
+ chi "使用并行å¤åˆ¶å’Œå¸¦æœ‰å¤šä¸ªå¤åˆ¶åŸŸçš„GTID时,无法使用@@SQL_SLAVE_SKIP_COUNTER。相å,å¯ä»¥ä½¿ç”¨æ˜Žç¡®è®¾ç½®@@gtid_slave_pos以在给定的gtidä½ç½®ä¹‹åŽè·³åˆ°"
+ eng "When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position"
ER_TABLE_DEFINITION_TOO_BIG
+ chi "表%`s的定义太大了"
eng "The definition for table %`s is too big"
hindi "टेबल %`s की परिभाषा बहà¥à¤¤ बड़ी है"
ER_PLUGIN_INSTALLED
+ chi "æ’件'%-.192s'已安装"
eng "Plugin '%-.192s' already installed"
hindi "पà¥à¤²à¤—-इन '%-.192s' पहले से ही इनà¥à¤¸à¥à¤Ÿà¥‰à¤²à¥à¤¡ है"
rus "Плагин '%-.192s' уже уÑтановлен"
ER_STATEMENT_TIMEOUT 70100
+ chi "查询执行中断(超出MAX_STATEMENT_TIME)"
eng "Query execution was interrupted (max_statement_time exceeded)"
ER_SUBQUERIES_NOT_SUPPORTED 42000
+ chi "%sä¸æ”¯æŒå­æŸ¥è¯¢æˆ–存储的函数"
eng "%s does not support subqueries or stored functions"
ER_SET_STATEMENT_NOT_SUPPORTED 42000
+ chi "系统å˜é‡%.200s无法在set语å¥ä¸­è®¾ç½®ã€‚“"
eng "The system variable %.200s cannot be set in SET STATEMENT."
ER_UNUSED_9
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_USER_CREATE_EXISTS
+ chi "无法创建用户'%-.64s'@'%-.64s';它已ç»å­˜åœ¨"
eng "Can't create user '%-.64s'@'%-.64s'; it already exists"
hindi "यूज़र '%-.64s'@'%-.64s' को नहीं बना सकते; यह पहले से ही मौजूद है"
ER_USER_DROP_EXISTS
+ chi "无法删除用户'%-.64s'@'%-.64s';它ä¸å­˜åœ¨"
eng "Can't drop user '%-.64s'@'%-.64s'; it doesn't exist"
hindi "यूज़र '%-.64s'@'%-.64s' को डà¥à¤°à¥‰à¤ª नहीं कर सकते; यह मौजूद नहीं है"
ER_ROLE_CREATE_EXISTS
+ chi "无法创建角色'%-.64s';它已ç»å­˜åœ¨"
eng "Can't create role '%-.64s'; it already exists"
hindi "रोल '%-.64s' को नहीं बना सकते; यह पहले से ही मौजूद है"
ER_ROLE_DROP_EXISTS
+ chi "无法删除'%-.64s'。它ä¸å­˜åœ¨"
eng "Can't drop role '%-.64s'; it doesn't exist"
hindi "रोल '%-.64s' को डà¥à¤°à¥‰à¤ª नहीं कर सकते; यह मौजूद नहीं है"
ER_CANNOT_CONVERT_CHARACTER
+ chi "无法将'%s'字符0x转æ¢ä¸º0x%-.64s到'%s'"
eng "Cannot convert '%s' character 0x%-.64s to '%s'"
ER_INVALID_DEFAULT_VALUE_FOR_FIELD 22007
+ chi "列的默认值ä¸æ­£ç¡®'%-.128T' '%.192s'"
eng "Incorrect default value '%-.128T' for column '%.192s'"
hindi "गलत डिफ़ॉलà¥à¤Ÿ मान '%-.128T' कॉलम '%.192s' के लिà¤"
ER_KILL_QUERY_DENIED_ERROR
+ chi "ä½ ä¸æ˜¯æŸ¥è¯¢%lu的所有者"
eng "You are not owner of query %lu"
ger "Sie sind nicht Eigentümer von Abfrage %lu"
hindi "आप कà¥à¤µà¥‡à¤°à¥€ %lu के OWNER नहीं हैं"
rus "Ð’Ñ‹ не ÑвлÑетеÑÑŒ владельцем запроÑа %lu"
ER_NO_EIS_FOR_FIELD
+ chi "没有收集无关的统计信æ¯åˆ—'%s'"
eng "Engine-independent statistics are not collected for column '%s'"
hindi "Engine-independent सांखà¥à¤¯à¤¿à¤•à¥€ कॉलम '%s' के लिठà¤à¤•à¤¤à¥à¤°à¤¿à¤¤ नहीं किया जा रहा है"
ukr "Ðезалежна від типу таблиці ÑтатиÑтика не збираєтьÑÑ Ð´Ð»Ñ ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ '%s'"
ER_WARN_AGGFUNC_DEPENDENCE
+ chi "èšåˆå‡½æ•°'%-.192s)'SELECT#%d的属于选择#%d"
eng "Aggregate function '%-.192s)' of SELECT #%d belongs to SELECT #%d"
ukr "Ðгрегатна Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ '%-.192s)' з SELECTу #%d належить до SELECTу #%d"
WARN_INNODB_PARTITION_OPTION_IGNORED
+ chi "<%-.64s> innodb分区忽略的选项"
eng "<%-.64s> option ignored for InnoDB partition"
#
@@ -7362,553 +8295,798 @@ skip-to-error-number 2000
skip-to-error-number 3000
ER_FILE_CORRUPT
- eng "File %s is corrupted"
+ chi "文件%så·²æŸå"
+ eng "File %s is corrupted"
ER_ERROR_ON_MASTER
- eng "Query partially completed on the master (error on master: %d) and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;. Query:'%s'"
+ chi "查询在主设备上部分完æˆï¼ˆä¸»è®¾å¤‡ï¼š%d)并中止。你的master在这一点上有å¯èƒ½ä¸ä¸€è‡´ã€‚如果您确定您的主站是å¯ä»¥çš„,请在从站上手动è¿è¡Œæ­¤æŸ¥è¯¢ï¼Œç„¶åŽä½¿ç”¨SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE ;查询:'%s'"
+ eng "Query partially completed on the master (error on master: %d) and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;. Query:'%s'"
ER_INCONSISTENT_ERROR
- eng "Query caused different errors on master and slave. Error on master: message (format)='%s' error code=%d; Error on slave:actual message='%s', error code=%d. Default database:'%s'. Query:'%s'"
+ chi "查询在主站和从站上引起了ä¸åŒçš„错误。主站错误:消æ¯ï¼ˆæ ¼å¼ï¼‰='%s'错误代ç =%d;从站错误:实际消æ¯='%s',错误代ç =%d。默认数æ®åº“:'%s'。查询:'%s'"
+ eng "Query caused different errors on master and slave. Error on master: message (format)='%s' error code=%d; Error on slave:actual message='%s', error code=%d. Default database:'%s'. Query:'%s'"
ER_STORAGE_ENGINE_NOT_LOADED
+ chi "表'%s'的存储引擎'%s'没有加载。"
eng "Storage engine for table '%s'.'%s' is not loaded."
ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER 0Z002
- eng "GET STACKED DIAGNOSTICS when handler not active"
+ chi "处ç†ç¨‹åºæœªæ¿€æ´»æ—¶GET STACKED DIAGNOSTICS"
+ eng "GET STACKED DIAGNOSTICS when handler not active"
ER_WARN_LEGACY_SYNTAX_CONVERTED
- eng "%s is no longer supported. The statement was converted to %s."
+ chi "ä¸å†æ”¯æŒ%s。该语å¥è¢«è½¬æ¢ä¸º%s。"
+ eng "%s is no longer supported. The statement was converted to %s."
ER_BINLOG_UNSAFE_FULLTEXT_PLUGIN
- eng "Statement is unsafe because it uses a fulltext parser plugin which may not return the same value on the slave."
+ chi "语å¥ä¸å®‰å…¨ï¼Œå› ä¸ºå®ƒä½¿ç”¨å…¨æ–‡è§£æžå™¨æ’件,它å¯èƒ½ä¸ä¼šåœ¨ä»Žç«™ä¸Šè¿”回相åŒçš„值。"
+ eng "Statement is unsafe because it uses a fulltext parser plugin which may not return the same value on the slave."
ER_CANNOT_DISCARD_TEMPORARY_TABLE
- eng "Cannot DISCARD/IMPORT tablespace associated with temporary table"
+ chi "无法丢弃与临时表相关è”çš„/导入表空间"
+ eng "Cannot DISCARD/IMPORT tablespace associated with temporary table"
ER_FK_DEPTH_EXCEEDED
- eng "Foreign key cascade delete/update exceeds max depth of %d."
+ chi "外键级è”删除/更新超出了%d的最大深度。"
+ eng "Foreign key cascade delete/update exceeds max depth of %d."
ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2
+ chi "列数为%s.%s是错误的。预期的%d,找到%d。使用MariaDB%d创建,现在è¿è¡Œ%d。请使用mysql_upgradeæ¥ä¿®å¤æ­¤é”™è¯¯ã€‚"
eng "Column count of %s.%s is wrong. Expected %d, found %d. Created with MariaDB %d, now running %d. Please use mysql_upgrade to fix this error."
ger "Spaltenanzahl von %s.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MariaDB %d, jetzt unter %d. Bitte benutzen Sie mysql_upgrade, um den Fehler zu beheben"
ER_WARN_TRIGGER_DOESNT_HAVE_CREATED
- eng "Trigger %s.%s.%s does not have CREATED attribute."
+ chi "触å‘器%s.%s.%s没有CREATE属性。"
+ eng "Trigger %s.%s.%s does not have CREATED attribute."
ER_REFERENCED_TRG_DOES_NOT_EXIST_MYSQL
- eng "Referenced trigger '%s' for the given action time and event type does not exist."
+ chi "引用的触å‘器'%s'用于给定的动作时间和事件类型ä¸å­˜åœ¨ã€‚"
+ eng "Referenced trigger '%s' for the given action time and event type does not exist."
ER_EXPLAIN_NOT_SUPPORTED
+ chi "EXPLAIN FOR CONNECTION仅支æŒSELECT/UPDATE/INSERT/DELETE/REPLACE"
eng "EXPLAIN FOR CONNECTION command is supported only for SELECT/UPDATE/INSERT/DELETE/REPLACE"
ER_INVALID_FIELD_SIZE
+ chi "列'%-.192s'的大å°æ— æ•ˆã€‚"
eng "Invalid size for column '%-.192s'."
ER_MISSING_HA_CREATE_OPTION
+ chi "表存储引擎'%-.64s'所找到的必备创建选项丢失"
eng "Table storage engine '%-.64s' found required create option missing"
ER_ENGINE_OUT_OF_MEMORY
- eng "Out of memory in storage engine '%-.64s'."
+ chi "存储引擎'%-.64s'中的内存ä¸è¶³ã€‚"
+ eng "Out of memory in storage engine '%-.64s'."
ER_PASSWORD_EXPIRE_ANONYMOUS_USER
- eng "The password for anonymous user cannot be expired."
+ chi "匿å用户的密ç ä¸èƒ½è¿‡æœŸã€‚"
+ eng "The password for anonymous user cannot be expired."
ER_SLAVE_SQL_THREAD_MUST_STOP
- eng "This operation cannot be performed with a running slave sql thread; run STOP SLAVE SQL_THREAD first"
+ chi "无法使用正在è¿è¡Œçš„从SQL线程执行此æ“作;首先è¿è¡ŒSTOP SLAVE SQL_THREAD"
+ eng "This operation cannot be performed with a running slave sql thread; run STOP SLAVE SQL_THREAD first"
ER_NO_FT_MATERIALIZED_SUBQUERY
- eng "Cannot create FULLTEXT index on materialized subquery"
+ chi "无法在物化的å­æŸ¥è¯¢ä¸Šåˆ›å»ºFullText索引"
+ eng "Cannot create FULLTEXT index on materialized subquery"
ER_INNODB_UNDO_LOG_FULL
- eng "Undo Log error: %s"
+ chi "撤消日志错误:%s"
+ eng "Undo Log error: %s"
ER_INVALID_ARGUMENT_FOR_LOGARITHM 2201E
- eng "Invalid argument for logarithm"
+ chi "对数的å‚数无效"
+ eng "Invalid argument for logarithm"
ER_SLAVE_CHANNEL_IO_THREAD_MUST_STOP
- eng "This operation cannot be performed with a running slave io thread; run STOP SLAVE IO_THREAD FOR CHANNEL '%s' first."
+ chi "无法使用正在è¿è¡Œçš„slave IO线程执行此æ“作;首先è¿è¡ŒSTOP SLAVE IO_THREAD FOR CHANNEL'%s'。"
+ eng "This operation cannot be performed with a running slave io thread; run STOP SLAVE IO_THREAD FOR CHANNEL '%s' first."
ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO
- eng "This operation may not be safe when the slave has temporary tables. The tables will be kept open until the server restarts or until the tables are deleted by any replicated DROP statement. Suggest to wait until slave_open_temp_tables = 0."
+ chi "当从站具有临时表时,此æ“作å¯èƒ½ä¸å®‰å…¨ã€‚表将ä¿æŒæ‰“开,直到æœåŠ¡å™¨é‡æ–°å¯åŠ¨æˆ–通过任何å¤åˆ¶çš„DROP语å¥åˆ é™¤è¡¨ã€‚建议等到Slave_open_temp_tables = 0。"
+ eng "This operation may not be safe when the slave has temporary tables. The tables will be kept open until the server restarts or until the tables are deleted by any replicated DROP statement. Suggest to wait until slave_open_temp_tables = 0."
ER_WARN_ONLY_MASTER_LOG_FILE_NO_POS
- eng "CHANGE MASTER TO with a MASTER_LOG_FILE clause but no MASTER_LOG_POS clause may not be safe. The old position value may not be valid for the new binary log file."
+ chi "使用CHANGE MASTER TO master_log_fileå­å¥æ›´æ”¹master,但没有master_log_poså­å¥å¯èƒ½ä¸å®‰å…¨ã€‚æ—§ä½ç½®å€¼å¯èƒ½å¯¹æ–°çš„二进制日志文件无效。"
+ eng "CHANGE MASTER TO with a MASTER_LOG_FILE clause but no MASTER_LOG_POS clause may not be safe. The old position value may not be valid for the new binary log file."
ER_QUERY_TIMEOUT
- eng "Query execution was interrupted, maximum statement execution time exceeded"
+ chi "查询执行中断,超过了最大语å¥æ‰§è¡Œæ—¶é—´"
+ eng "Query execution was interrupted, maximum statement execution time exceeded"
ER_NON_RO_SELECT_DISABLE_TIMER
- eng "Select is not a read only statement, disabling timer"
+ chi "SELECTä¸æ˜¯åªè¯»è¯­å¥ï¼Œç¦ç”¨è®¡æ—¶å™¨"
+ eng "Select is not a read only statement, disabling timer"
ER_DUP_LIST_ENTRY
- eng "Duplicate entry '%-.192s'."
+ chi "é‡å¤æ¡ç›®'%-.192s'。"
+ eng "Duplicate entry '%-.192s'."
ER_SQL_MODE_NO_EFFECT
- eng "'%s' mode no longer has any effect. Use STRICT_ALL_TABLES or STRICT_TRANS_TABLES instead."
+ chi "'%s'模å¼ä¸å†æœ‰ä»»ä½•æ•ˆæžœã€‚使用STRICT_ALL_TABLES或STRICT_TRANS_TABLES。"
+ eng "'%s' mode no longer has any effect. Use STRICT_ALL_TABLES or STRICT_TRANS_TABLES instead."
ER_AGGREGATE_ORDER_FOR_UNION
- eng "Expression #%u of ORDER BY contains aggregate function and applies to a UNION"
+ chi "表达å¼ï¼ƒ%u ORDER BY包å«èšåˆå‡½æ•°å¹¶é€‚用于UNION"
+ eng "Expression #%u of ORDER BY contains aggregate function and applies to a UNION"
ER_AGGREGATE_ORDER_NON_AGG_QUERY
- eng "Expression #%u of ORDER BY contains aggregate function and applies to the result of a non-aggregated query"
+ chi "表达å¼ï¼ƒ%u通过包å«èšåˆå‡½æ•°ï¼Œå¹¶é€‚用于éžèšåˆæŸ¥è¯¢çš„结果"
+ eng "Expression #%u of ORDER BY contains aggregate function and applies to the result of a non-aggregated query"
ER_SLAVE_WORKER_STOPPED_PREVIOUS_THD_ERROR
- eng "Slave worker has stopped after at least one previous worker encountered an error when slave-preserve-commit-order was enabled. To preserve commit order, the last transaction executed by this thread has not been committed. When restarting the slave after fixing any failed threads, you should fix this worker as well."
+ chi "在å¯ç”¨äº†slaveä¿å­˜æ交次åºæ—¶è‡³å°‘有一个以å‰çš„工人é‡åˆ°é”™è¯¯åŽï¼Œslave工作者已åœæ­¢ã€‚è¦ä¿ç•™æ交次åºï¼Œæ­¤çº¿ç¨‹æ‰§è¡Œçš„最åŽä¸€é¡¹äº‹åŠ¡å°šæœªæ交。在修å¤ä»»ä½•æ•…障线程åŽé‡æ–°å¯åŠ¨ä»Žç«™æ—¶ï¼Œæ‚¨ä¹Ÿåº”该修å¤æ­¤å·¥ä½œäººã€‚"
+ eng "Slave worker has stopped after at least one previous worker encountered an error when slave-preserve-commit-order was enabled. To preserve commit order, the last transaction executed by this thread has not been committed. When restarting the slave after fixing any failed threads, you should fix this worker as well."
ER_DONT_SUPPORT_SLAVE_PRESERVE_COMMIT_ORDER
- eng "slave_preserve_commit_order is not supported %s."
+ chi "slave_preerve_commit_orderä¸æ”¯æŒ%s。"
+ eng "slave_preserve_commit_order is not supported %s."
ER_SERVER_OFFLINE_MODE
- eng "The server is currently in offline mode"
+ chi "æœåŠ¡å™¨ç›®å‰å¤„于离线模å¼"
+ eng "The server is currently in offline mode"
ER_GIS_DIFFERENT_SRIDS
- eng "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical."
+ chi "二进制几何函数%s给定两个ä¸åŒSRID的几何形状:%uå’Œ%u,应该是相åŒçš„。"
+ eng "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical."
ER_GIS_UNSUPPORTED_ARGUMENT
- eng "Calling geometry function %s with unsupported types of arguments."
+ chi "调用几何函数%s与ä¸å—支æŒç±»åž‹çš„å‚数。"
+ eng "Calling geometry function %s with unsupported types of arguments."
ER_GIS_UNKNOWN_ERROR
- eng "Unknown GIS error occurred in function %s."
+ chi "未知的GIS错误å‘生在功能%s中。"
+ eng "Unknown GIS error occurred in function %s."
ER_GIS_UNKNOWN_EXCEPTION
- eng "Unknown exception caught in GIS function %s."
+ chi "在GIS功能%s中æ•èŽ·çš„未知异常。"
+ eng "Unknown exception caught in GIS function %s."
ER_GIS_INVALID_DATA 22023
- eng "Invalid GIS data provided to function %s."
+ chi "æ供给功能%sçš„GISæ•°æ®æ— æ•ˆã€‚"
+ eng "Invalid GIS data provided to function %s."
ER_BOOST_GEOMETRY_EMPTY_INPUT_EXCEPTION
- eng "The geometry has no data in function %s."
+ chi "几何形状在功能%s中没有数æ®ã€‚"
+ eng "The geometry has no data in function %s."
ER_BOOST_GEOMETRY_CENTROID_EXCEPTION
- eng "Unable to calculate centroid because geometry is empty in function %s."
+ chi "无法计算质心,因为在功能%s中几何为空。"
+ eng "Unable to calculate centroid because geometry is empty in function %s."
ER_BOOST_GEOMETRY_OVERLAY_INVALID_INPUT_EXCEPTION
- eng "Geometry overlay calculation error: geometry data is invalid in function %s."
+ chi "几何å åŠ è®¡ç®—错误:几何数æ®åœ¨åŠŸèƒ½%s中无效。"
+ eng "Geometry overlay calculation error: geometry data is invalid in function %s."
ER_BOOST_GEOMETRY_TURN_INFO_EXCEPTION
- eng "Geometry turn info calculation error: geometry data is invalid in function %s."
+ chi "几何旋转信æ¯è®¡ç®—错误:几何数æ®åœ¨åŠŸèƒ½%s中无效。"
+ eng "Geometry turn info calculation error: geometry data is invalid in function %s."
ER_BOOST_GEOMETRY_SELF_INTERSECTION_POINT_EXCEPTION
- eng "Analysis procedures of intersection points interrupted unexpectedly in function %s."
+ chi "在功能%s中出乎æ„料地中断交å‰ç‚¹çš„分æžç¨‹åºã€‚"
+ eng "Analysis procedures of intersection points interrupted unexpectedly in function %s."
ER_BOOST_GEOMETRY_UNKNOWN_EXCEPTION
- eng "Unknown exception thrown in function %s."
+ chi "在功能%s中抛出的未知异常。"
+ eng "Unknown exception thrown in function %s."
ER_STD_BAD_ALLOC_ERROR
- eng "Memory allocation error: %-.256s in function %s."
+ chi "内存分é…错误:%-.256s。函数%s。"
+ eng "Memory allocation error: %-.256s in function %s."
ER_STD_DOMAIN_ERROR
- eng "Domain error: %-.256s in function %s."
+ chi "域å错误:%-.256s. 函数%s"
+ eng "Domain error: %-.256s in function %s."
ER_STD_LENGTH_ERROR
- eng "Length error: %-.256s in function %s."
+ chi "长度误差:%-.256s函数%s。"
+ eng "Length error: %-.256s in function %s."
ER_STD_INVALID_ARGUMENT
- eng "Invalid argument error: %-.256s in function %s."
+ chi "无效的å‚数错误:%-.256s函数%s。"
+ eng "Invalid argument error: %-.256s in function %s."
ER_STD_OUT_OF_RANGE_ERROR
- eng "Out of range error: %-.256s in function %s."
+ chi "超出范围错误:%-.256s 函数%s。"
+ eng "Out of range error: %-.256s in function %s."
ER_STD_OVERFLOW_ERROR
- eng "Overflow error error: %-.256s in function %s."
+ chi "溢出错误:%-.256s。功能%s。"
+ eng "Overflow error: %-.256s in function %s."
ER_STD_RANGE_ERROR
- eng "Range error: %-.256s in function %s."
+ chi "范围错误:%-.256s函数%s。"
+ eng "Range error: %-.256s in function %s."
ER_STD_UNDERFLOW_ERROR
- eng "Underflow error: %-.256s in function %s."
+ chi "下溢错误:%-.256s函数%s。"
+ eng "Underflow error: %-.256s in function %s."
ER_STD_LOGIC_ERROR
- eng "Logic error: %-.256s in function %s."
+ chi "逻辑错误:%-.256s 函数%s。"
+ eng "Logic error: %-.256s in function %s."
ER_STD_RUNTIME_ERROR
- eng "Runtime error: %-.256s in function %s."
+ chi "è¿è¡Œæ—¶é”™è¯¯ï¼š%-.256s函数%s。"
+ eng "Runtime error: %-.256s in function %s."
ER_STD_UNKNOWN_EXCEPTION
- eng "Unknown exception: %-.384s in function %s."
+ chi "未知例外:%-.384s在函数%s中。"
+ eng "Unknown exception: %-.384s in function %s."
ER_GIS_DATA_WRONG_ENDIANESS
- eng "Geometry byte string must be little endian."
+ chi "几何字节字符串必须是å°endian。"
+ eng "Geometry byte string must be little endian."
ER_CHANGE_MASTER_PASSWORD_LENGTH
- eng "The password provided for the replication user exceeds the maximum length of 32 characters"
+ chi "为Replication Useræ供的密ç è¶…过32个字符的最大长度"
+ eng "The password provided for the replication user exceeds the maximum length of 32 characters"
ER_USER_LOCK_WRONG_NAME 42000
+ chi "用户级é”åå称'%-.192s'ä¸æ­£ç¡®ã€‚"
eng "Incorrect user-level lock name '%-.192s'."
# Should be different from ER_LOCK_DEADLOCK since it doesn't cause implicit
# rollback. Should not be mapped to SQLSTATE 40001 for the same reason.
ER_USER_LOCK_DEADLOCK
- eng "Deadlock found when trying to get user-level lock; try rolling back transaction/releasing locks and restarting lock acquisition."
+ chi "在å°è¯•èŽ·å¾—用户级é”æ—¶å‘现死é”;å°è¯•å›žæ»šäº¤æ˜“/释放é”定并é‡æ–°å¯åŠ¨é”定采集。"
+ eng "Deadlock found when trying to get user-level lock; try rolling back transaction/releasing locks and restarting lock acquisition."
ER_REPLACE_INACCESSIBLE_ROWS
- eng "REPLACE cannot be executed as it requires deleting rows that are not in the view"
+ chi "无法执行REPLACE,因为它需è¦åˆ é™¤ä¸åœ¨è§†å›¾ä¸­çš„è¡Œ"
+ eng "REPLACE cannot be executed as it requires deleting rows that are not in the view"
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS
- eng "Do not support online operation on table with GIS index"
-
+ chi "ä¸è¦æ”¯æŒä½¿ç”¨GIS索引的表中的在线æ“作"
+ eng "Do not support online operation on table with GIS index"
# MariaDB extra error numbers starts from 4000
skip-to-error-number 4000
ER_COMMULTI_BADCONTEXT 0A000
+ chi "COM_MULTI无法返回给定上下文中的结果集"
eng "COM_MULTI can't return a result set in the given context"
ger "COM_MULTI kann im gegebenen Kontext keine Ergebnismenge zurückgeben"
ukr "COM_MULTI не може повернути результати у цьому контекÑÑ‚Ñ–"
ER_BAD_COMMAND_IN_MULTI
+ chi "COM_MULTIä¸å…许命令'%s'"
eng "Command '%s' is not allowed for COM_MULTI"
ukr "Команда '%s' не дозволена Ð´Ð»Ñ COM_MULTI"
ER_WITH_COL_WRONG_LIST
+ chi "使用列列表并选择字段列表具有ä¸åŒçš„列计数"
eng "WITH column list and SELECT field list have different column counts"
ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
+ chi "WITHæ¡æ¬¾ä¸­çš„元素太多了"
eng "Too many WITH elements in WITH clause"
ER_DUP_QUERY_NAME
+ chi "WITHå­å¥é‡å¤æŸ¥è¯¢å称%`-.64s"
eng "Duplicate query name %`-.64s in WITH clause"
ER_RECURSIVE_WITHOUT_ANCHORS
+ chi "没有元素'%s'递归的锚点"
eng "No anchors for recursive WITH element '%s'"
ER_UNACCEPTABLE_MUTUAL_RECURSION
+ chi "锚定表'%s'ä¸å¯æŽ¥å—的相互递归"
eng "Unacceptable mutual recursion with anchored table '%s'"
ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
+ chi "物质化的è¡ç”Ÿå‚考指å‘递归的WITH 表'%s'"
eng "Reference to recursive WITH table '%s' in materialized derived"
ER_NOT_STANDARD_COMPLIANT_RECURSIVE
- eng "Restrictions imposed on recursive definitions are violated for table '%s'"R_WRONG_WINDOW_SPEC_NAME
+ chi "表'%s'R_WRONG_WINDOW_SPEC_NAMEè¿å了递归定义的é™åˆ¶"
+ eng "Restrictions imposed on recursive definitions are violated for table '%s'"
ER_WRONG_WINDOW_SPEC_NAME
- eng "Window specification with name '%s' is not defined"
+ chi "没有定义å称'%s'的窗å£è§„范"
+ eng "Window specification with name '%s' is not defined"
ER_DUP_WINDOW_NAME
+ chi "具有相åŒå称'%s'的多个窗å£è§„范"
eng "Multiple window specifications with the same name '%s'"
ER_PARTITION_LIST_IN_REFERENCING_WINDOW_SPEC
+ chi "窗å£è§„范引用å¦ä¸€ä¸ª'%s'ä¸èƒ½åŒ…å«åˆ†åŒºåˆ—表"
eng "Window specification referencing another one '%s' cannot contain partition list"
ER_ORDER_LIST_IN_REFERENCING_WINDOW_SPEC
+ chi "引用的窗å£è§„范'%s'已包å«æ¬¡åºåˆ—表"
eng "Referenced window specification '%s' already contains order list"
ER_WINDOW_FRAME_IN_REFERENCED_WINDOW_SPEC
+ chi "引用的窗å£è§„范'%s'ä¸èƒ½åŒ…å«çª—å£æ¡†æž¶"
eng "Referenced window specification '%s' cannot contain window frame"
ER_BAD_COMBINATION_OF_WINDOW_FRAME_BOUND_SPECS
+ chi "窗框绑定规格的ä¸å¯æŽ¥å—的组åˆ"
eng "Unacceptable combination of window frame bound specifications"
ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION
+ chi "窗å£å‡½æ•°ä»…在SELECT列表和ORDER BYå­å¥ä¸­å…许"
eng "Window function is allowed only in SELECT list and ORDER BY clause"
ER_WINDOW_FUNCTION_IN_WINDOW_SPEC
+ chi "窗å£è§„范中ä¸å…许窗å£åŠŸèƒ½"
eng "Window function is not allowed in window specification"
ER_NOT_ALLOWED_WINDOW_FRAME
+ chi "窗框ä¸å…许使用'%s'"
eng "Window frame is not allowed with '%s'"
ER_NO_ORDER_LIST_IN_WINDOW_SPEC
+ chi "在“%sâ€çš„窗å£è§„范中没有订å•åˆ—表"
eng "No order list in window specification for '%s'"
ER_RANGE_FRAME_NEEDS_SIMPLE_ORDERBY
+ chi "范围型框架需è¦å•ä¸ªæŽ’åºé”®è®¢è´­é€ä¸ªæ¡æ¬¾"
eng "RANGE-type frame requires ORDER BY clause with single sort key"
ER_WRONG_TYPE_FOR_ROWS_FRAME
+ chi "行类型框架需è¦æ•´æ•°"
eng "Integer is required for ROWS-type frame"
ER_WRONG_TYPE_FOR_RANGE_FRAME
+ chi "范围类型框架需è¦æ•°å­—æ•°æ®ç±»åž‹"
eng "Numeric datatype is required for RANGE-type frame"
ER_FRAME_EXCLUSION_NOT_SUPPORTED
+ chi "帧排除尚ä¸æ”¯æŒ"
eng "Frame exclusion is not supported yet"
ER_WINDOW_FUNCTION_DONT_HAVE_FRAME
+ chi "此窗å£åŠŸèƒ½å¯èƒ½æ²¡æœ‰çª—å£æ¡†æž¶"
eng "This window function may not have a window frame"
ER_INVALID_NTILE_ARGUMENT
+ chi "NTILEçš„å‚数必须大于0"
eng "Argument of NTILE must be greater than 0"
ER_CONSTRAINT_FAILED 23000
+ chi "CONSTRAINT %`s失败的%`-.192s。%`-.192s"
eng "CONSTRAINT %`s failed for %`-.192s.%`-.192s"
ger "CONSTRAINT %`s fehlgeschlagen: %`-.192s.%`-.192s"
rus "проверка CONSTRAINT %`s Ð´Ð»Ñ %`-.192s.%`-.192s провалилаÑÑŒ"
ukr "Перевірка CONSTRAINT %`s Ð´Ð»Ñ %`-.192s.%`-.192s не пройшла"
ER_EXPRESSION_IS_TOO_BIG
+ chi "%sæ¡æ¬¾ä¸­çš„表达太大了"
eng "Expression in the %s clause is too big"
ER_ERROR_EVALUATING_EXPRESSION
+ chi "获得了一个错误评估存储的表达å¼%s"
eng "Got an error evaluating stored expression %s"
ER_CALCULATING_DEFAULT_VALUE
+ chi "计算默认值为%`s时出错"
eng "Got an error when calculating default value for %`s"
ER_EXPRESSION_REFERS_TO_UNINIT_FIELD 01000
+ chi "字段%`-.64s的表达指的是未åˆå§‹åŒ–的字段%`s"
eng "Expression for field %`-.64s is referring to uninitialized field %`s"
ER_PARTITION_DEFAULT_ERROR
+ chi "åªå…许一个默认分区"
eng "Only one DEFAULT partition allowed"
ukr "ПрипуÑтимо мати тільки один DEFAULT розділ"
ER_REFERENCED_TRG_DOES_NOT_EXIST
- eng "Referenced trigger '%s' for the given action time and event type does not exist"
+ chi "给定动作时间和事件类型的引用触å‘'%s'ä¸å­˜åœ¨"
+ eng "Referenced trigger '%s' for the given action time and event type does not exist"
ER_INVALID_DEFAULT_PARAM
+ chi "此类å‚数使用ä¸æ”¯æŒé»˜è®¤/忽略值"
eng "Default/ignore value is not supported for such parameter usage"
ukr "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð° замовчуваннÑм або ігнороване Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ підтримано Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ випадку викориÑÑ‚Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°ÑŒÐµÑ‚Ñ€Ð°"
ER_BINLOG_NON_SUPPORTED_BULK
+ chi "仅支æŒåŸºäºŽè¡Œçš„å¤åˆ¶ï¼Œæ”¯æŒæ‰¹é‡æ“作"
eng "Only row based replication supported for bulk operations"
ER_BINLOG_UNCOMPRESS_ERROR
+ chi "解压压缩的binlog失败"
eng "Uncompress the compressed binlog failed"
ER_JSON_BAD_CHR
+ chi "åJSON,å‚æ•°%d 函数'%s' ä½ç½®%d"
eng "Broken JSON string in argument %d to function '%s' at position %d"
ER_JSON_NOT_JSON_CHR
+ chi "å˜é‡%d出现ç¦æ­¢å­—符,函数'%s'在%d处"
eng "Character disallowed in JSON in argument %d to function '%s' at position %d"
ER_JSON_EOS
+ chi "JSON文本中的æ„外结尾,å‚æ•°%d 函数'%s'"
eng "Unexpected end of JSON text in argument %d to function '%s'"
ER_JSON_SYNTAX
+ chi "JSON文本语法错误 å‚æ•°%d 函数'%s' ä½ç½®%d"
eng "Syntax error in JSON text in argument %d to function '%s' at position %d"
ER_JSON_ESCAPING
+ chi "JSON文本中逸出ä¸æ­£ç¡® å‚æ•°%d 函数'%s' ä½ç½®%d"
eng "Incorrect escaping in JSON text in argument %d to function '%s' at position %d"
ER_JSON_DEPTH
+ chi "超过JSON嵌套深度的%dé™åˆ¶ å‚æ•°%d 函数'%s' ä½ç½®%dçš„"
eng "Limit of %d on JSON nested structures depth is reached in argument %d to function '%s' at position %d"
ER_JSON_PATH_EOS
+ chi "JSON文本路径错误 å‚æ•°%d 函数'%s'"
eng "Unexpected end of JSON path in argument %d to function '%s'"
ER_JSON_PATH_SYNTAX
+ chi "JSON路径语法错误 å‚æ•°%d 函数'%s' ä½ç½®%d"
eng "Syntax error in JSON path in argument %d to function '%s' at position %d"
ER_JSON_PATH_DEPTH
+ chi "JSON路径深度上é™è¾¾åˆ°ï¼š%d å‚æ•°%d 函数'%s' ä½ç½®%d"
eng "Limit of %d on JSON path depth is reached in argument %d to function '%s' at position %d"
ER_JSON_PATH_NO_WILDCARD
+ chi "JSON路径中的通é…符ä¸å…许 å‚æ•°%d 函数'%s'"
eng "Wildcards in JSON path not allowed in argument %d to function '%s'"
ER_JSON_PATH_ARRAY
+ chi "JSON路径应当以排列为终 å‚æ•°%d 函数'%s'"
eng "JSON path should end with an array identifier in argument %d to function '%s'"
ER_JSON_ONE_OR_ALL
+ chi "函数'%s'的第二个å‚数必须是'一个'或'全部'"
eng "Argument 2 to function '%s' must be "one" or "all"."
ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
- eng "CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE."
+ chi "CREATE TEMPORARY TABLE ä¸å…许用ROW_FORMAT=COMPRESSED或KEY_BLOCK_SIZE"
+ eng "CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE."
ER_GEOJSON_INCORRECT
+ chi "为st_geomfromgeojson函数指定了ä¸æ­£ç¡®çš„GeoJSONæ ¼å¼ã€‚"
eng "Incorrect GeoJSON format specified for st_geomfromgeojson function."
ER_GEOJSON_TOO_FEW_POINTS
+ chi "Geojsonæ ¼å¼ä¸æ­£ç¡® - Linestring指定的太少点。"
eng "Incorrect GeoJSON format - too few points for linestring specified."
ER_GEOJSON_NOT_CLOSED
+ chi "Geojsonæ ¼å¼ä¸æ­£ç¡® - 多边形未关闭。"
eng "Incorrect GeoJSON format - polygon not closed."
ER_JSON_PATH_EMPTY
+ chi "path表达å¼'$'ä¸å…许在å‚æ•°%d中å…许è¿è¡Œ'%s'。"
eng "Path expression '$' is not allowed in argument %d to function '%s'."
ER_SLAVE_SAME_ID
+ chi "与此从站相åŒçš„server_uuId / server_id的从站已连接到主设备"
eng "A slave with the same server_uuid/server_id as this slave has connected to the master"
ER_FLASHBACK_NOT_SUPPORTED
+ chi "闪回ä¸æ”¯æŒ%s%s"
eng "Flashback does not support %s %s"
-
-
-
#
# MyRocks error messages
#
ER_KEYS_OUT_OF_ORDER
- eng "Keys are out order during bulk load"
+ chi "钥匙在散装负载期间出现订å•"
+ eng "Keys are out order during bulk load"
ER_OVERLAPPING_KEYS
- eng "Bulk load rows overlap existing rows"
+ chi "批é‡è´Ÿè½½è¡Œé‡å çŽ°æœ‰è¡Œ"
+ eng "Bulk load rows overlap existing rows"
ER_REQUIRE_ROW_BINLOG_FORMAT
- eng "Can't execute updates on master with binlog_format != ROW."
+ chi "binlog_format != ROW时无法在master上执行更新"
+ eng "Can't execute updates on master with binlog_format != ROW."
ER_ISOLATION_MODE_NOT_SUPPORTED
- eng "MyRocks supports only READ COMMITTED and REPEATABLE READ isolation levels. Please change from current isolation level %s"
+ chi "MyRocks仅支æŒè¯»å–承诺和å¯é‡å¤è¯»å–隔离级别。请从当å‰éš”离级别的%s改å˜"
+ eng "MyRocks supports only READ COMMITTED and REPEATABLE READ isolation levels. Please change from current isolation level %s"
ER_ON_DUPLICATE_DISABLED
- eng "When unique checking is disabled in MyRocks, INSERT,UPDATE,LOAD statements with clauses that update or replace the key (i.e. INSERT ON DUPLICATE KEY UPDATE, REPLACE) are not allowed. Query: %s"
+ chi "当在MyRocksç¦ç”¨å”¯ä¸€æ£€æŸ¥æ—¶ï¼ŒINSERT,UPDATE, LOAD,使用Clauses更新或替æ¢ç´¢å¼•çš„å­å¥ï¼ˆå³ï¼Œåœ¨é‡å¤çš„é‡å¤é”®æ›´æ–°ï¼Œæ›¿æ¢ï¼‰ä¸­ï¼Œä¸å…许使用。查询:%s"
+ eng "When unique checking is disabled in MyRocks, INSERT,UPDATE,LOAD statements with clauses that update or replace the key (i.e. INSERT ON DUPLICATE KEY UPDATE, REPLACE) are not allowed. Query: %s"
ER_UPDATES_WITH_CONSISTENT_SNAPSHOT
- eng "Can't execute updates when you started a transaction with START TRANSACTION WITH CONSISTENT [ROCKSDB] SNAPSHOT."
+ chi "START TRANSACTION WITH CONSISTENT [ROCKSDB] SNAPSHOT时,无法执行更新。"
+ eng "Can't execute updates when you started a transaction with START TRANSACTION WITH CONSISTENT [ROCKSDB] SNAPSHOT."
ER_ROLLBACK_ONLY
- eng "This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction."
+ chi "此交易回滚并无法承诺。åªæ”¯æŒæ”¯æŒçš„æ“作是滚动,因此将丢弃所有待处ç†çš„更改。请é‡æ–°å¯åŠ¨å…¶ä»–事务。"
+ eng "This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction."
ER_ROLLBACK_TO_SAVEPOINT
- eng "MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows."
+ chi "如果修改行,MyRocksç›®å‰ä¸æ”¯æŒä¿å­˜ç‚¹çš„回滚。"
+ eng "MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows."
ER_ISOLATION_LEVEL_WITH_CONSISTENT_SNAPSHOT
- eng "Only REPEATABLE READ isolation level is supported for START TRANSACTION WITH CONSISTENT SNAPSHOT in RocksDB Storage Engine."
+ chi "在RockSDB存储引擎中,START TRANSACTION WITH CONSISTENT SNAPSHOT åªæ”¯æŒREPEATABLE READ隔离"
+ eng "Only REPEATABLE READ isolation level is supported for START TRANSACTION WITH CONSISTENT SNAPSHOT in RocksDB Storage Engine."
ER_UNSUPPORTED_COLLATION
- eng "Unsupported collation on string indexed column %s.%s Use binary collation (%s)."
+ chi "字符串索引列%sçš„ä¸å—支æŒçš„归类。%s使用二进制校构(%s)。"
+ eng "Unsupported collation on string indexed column %s.%s Use binary collation (%s)."
ER_METADATA_INCONSISTENCY
- eng "Table '%s' does not exist, but metadata information exists inside MyRocks. This is a sign of data inconsistency. Please check if '%s.frm' exists, and try to restore it if it does not exist."
+ chi "表'%s'ä¸å­˜åœ¨ï¼Œä½†MyRocks内存存在元数æ®ä¿¡æ¯ã€‚这是数æ®ä¸ä¸€è‡´çš„标志。请检查是å¦å­˜åœ¨'%s.frm',并å°è¯•æ¢å¤å¦‚果它ä¸å­˜åœ¨ã€‚"
+ eng "Table '%s' does not exist, but metadata information exists inside MyRocks. This is a sign of data inconsistency. Please check if '%s.frm' exists, and try to restore it if it does not exist."
ER_CF_DIFFERENT
- eng "Column family ('%s') flag (%d) is different from an existing flag (%d). Assign a new CF flag, or do not change existing CF flag."
+ chi "列æ—('%s')标志(%d)与现有标志(%d)ä¸åŒã€‚分é…æ–°çš„CF标志,或者ä¸è¦æ›´æ”¹çŽ°æœ‰çš„CF标志。"
+ eng "Column family ('%s') flag (%d) is different from an existing flag (%d). Assign a new CF flag, or do not change existing CF flag."
ER_RDB_TTL_DURATION_FORMAT
- eng "TTL duration (%s) in MyRocks must be an unsigned non-null 64-bit integer."
+ chi "Myrocks中的TTLæŒç»­æ—¶é—´(%s)必须是无符å·éžç©º64ä½æ•´æ•°ã€‚"
+ eng "TTL duration (%s) in MyRocks must be an unsigned non-null 64-bit integer."
ER_RDB_STATUS_GENERAL
+ chi "状æ€è¯¯å·®%d从RockSDB收到:%s"
eng "Status error %d received from RocksDB: %s"
ER_RDB_STATUS_MSG
+ chi "%s,状æ€è¯¯å·®%d从rocksdb收到:%s"
eng "%s, Status error %d received from RocksDB: %s"
ER_RDB_TTL_UNSUPPORTED
- eng "TTL support is currently disabled when table has a hidden PK."
+ chi "当表有éšè—çš„PK时,目å‰ç¦ç”¨TTL支æŒã€‚"
+ eng "TTL support is currently disabled when table has a hidden PK."
ER_RDB_TTL_COL_FORMAT
- eng "TTL column (%s) in MyRocks must be an unsigned non-null 64-bit integer, exist inside the table, and have an accompanying ttl duration."
+ chi "Myrocks中的TTL列(%s)必须是一个无符å·çš„éžç©º64ä½æ•´æ•°ï¼Œå­˜åœ¨äºŽè¡¨å†…,并具有伴éšçš„TTLæŒç»­æ—¶é—´ã€‚"
+ eng "TTL column (%s) in MyRocks must be an unsigned non-null 64-bit integer, exist inside the table, and have an accompanying ttl duration."
ER_PER_INDEX_CF_DEPRECATED
- eng "The per-index column family option has been deprecated"
+ chi "已弃用æ¯ä¸ªç´¢å¼•åˆ—æ—选项"
+ eng "The per-index column family option has been deprecated"
ER_KEY_CREATE_DURING_ALTER
- eng "MyRocks failed creating new key definitions during alter."
+ chi "MyRocks在Alter期间创建新的索引定义失败。"
+ eng "MyRocks failed creating new key definitions during alter."
ER_SK_POPULATE_DURING_ALTER
- eng "MyRocks failed populating secondary key during alter."
-
+ chi "MyRocks在Alter期间失败填充次è¦ç´¢å¼•ã€‚"
+ eng "MyRocks failed populating secondary key during alter."
# MyRocks messages end
+
ER_SUM_FUNC_WITH_WINDOW_FUNC_AS_ARG
- eng "Window functions can not be used as arguments to group functions."
+ chi "窗å£å‡½æ•°ä¸èƒ½ç”¨ä½œç»„函数的å‚数。"
+ eng "Window functions can not be used as arguments to group functions."
ER_NET_OK_PACKET_TOO_LARGE
- eng "OK packet too large"
+ chi "好的包太大了"
+ eng "OK packet too large"
ER_GEOJSON_EMPTY_COORDINATES
+ chi "Geojsonæ ¼å¼ä¸æ­£ç¡® - 空的'coordinates'阵列。"
eng "Incorrect GeoJSON format - empty 'coordinates' array."
ER_MYROCKS_CANT_NOPAD_COLLATION
- eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
+ chi "MyRocksç›®å‰ä¸æ”¯æŒä¸Žâ€œNo Pad \â€å±žæ€§çš„归类。"
+ eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+ chi "éžæ³•å‚æ•°æ•°æ®ç±»åž‹%så’Œ%s为æ“作'%s'"
eng "Illegal parameter data types %s and %s for operation '%s'"
ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
+ chi "éžæ³•å‚æ•°æ•°æ®ç±»åž‹%s用于æ“作'%s'"
eng "Illegal parameter data type %s for operation '%s'"
ER_WRONG_PARAMCOUNT_TO_CURSOR 42000
+ chi "对Cursorçš„å‚数计数ä¸æ­£ç¡®'%-.192s'"
eng "Incorrect parameter count to cursor '%-.192s'"
rus "Ðекорректное количеÑтво параметров Ð´Ð»Ñ ÐºÑƒÑ€Ñора '%-.192s'"
ER_UNKNOWN_STRUCTURED_VARIABLE
+ chi "未知的结构系统å˜é‡æˆ–行程å˜é‡'%-.*s'"
eng "Unknown structured system variable or ROW routine variable '%-.*s'"
ER_ROW_VARIABLE_DOES_NOT_HAVE_FIELD
+ chi "è¡Œå˜é‡'%-.192s'没有字段'%-.192s'"
eng "Row variable '%-.192s' does not have a field '%-.192s'"
ER_END_IDENTIFIER_DOES_NOT_MATCH
+ chi "结æŸæ ‡è¯†ç¬¦'%-.192s'ä¸åŒ¹é…'%-.192s'"
eng "END identifier '%-.192s' does not match '%-.192s'"
ER_SEQUENCE_RUN_OUT
+ chi "åºåˆ—'%-.64s。%-.64s'å·²ç»ç”¨å®Œäº†"
eng "Sequence '%-.64s.%-.64s' has run out"
ER_SEQUENCE_INVALID_DATA
- eng "Sequence '%-.64s.%-.64s' values are conflicting"
+ chi "åºåˆ—'%-.64s。%-.64s的值冲çª"
+ eng "Sequence '%-.64s.%-.64s' has out of range value for options"
ER_SEQUENCE_INVALID_TABLE_STRUCTURE
+ chi "åºåˆ—'%-.64s。%-.64s'表结构无效(%s)"
eng "Sequence '%-.64s.%-.64s' table structure is invalid (%s)"
ER_SEQUENCE_ACCESS_ERROR
+ chi "åºåˆ—'%-.64s。%-.64s的访问错误"
eng "Sequence '%-.64s.%-.64s' access error"
ER_SEQUENCE_BINLOG_FORMAT
eng "Sequences requires binlog_format mixed or row"
ER_NOT_SEQUENCE 42S02
+ chi "'%-.64s。%-.64s'ä¸æ˜¯åºåˆ—"
eng "'%-.64s.%-.64s' is not a SEQUENCE"
ER_NOT_SEQUENCE2 42S02
+ chi "'%-.192s'ä¸æ˜¯åºåˆ—"
eng "'%-.192s' is not a SEQUENCE"
ER_UNKNOWN_SEQUENCES 42S02
+ chi "未知åºåˆ—:'%-.300s'"
eng "Unknown SEQUENCE: '%-.300s'"
ER_UNKNOWN_VIEW 42S02
+ chi "未知视图:'%-.300s'"
eng "Unknown VIEW: '%-.300s'"
ER_WRONG_INSERT_INTO_SEQUENCE
+ chi "错误æ’å…¥åºåˆ—。人们åªèƒ½å°†å•è¡¨æ’入到åºåˆ—对象(与mysqldump)中进行。如果è¦æ›´æ”¹åºåˆ—,请使用更改åºåˆ—。"
eng "Wrong INSERT into a SEQUENCE. One can only do single table INSERT into a sequence object (like with mysqldump). If you want to change the SEQUENCE, use ALTER SEQUENCE instead."
ER_SP_STACK_TRACE
+ chi "在%u中以%s"
eng "At line %u in %s"
ER_PACKAGE_ROUTINE_IN_SPEC_NOT_DEFINED_IN_BODY
+ chi "在包规范中声明å­ç¨‹åº'%-.192s',但未在包主体中定义"
eng "Subroutine '%-.192s' is declared in the package specification but is not defined in the package body"
ER_PACKAGE_ROUTINE_FORWARD_DECLARATION_NOT_DEFINED
+ chi "å­ç¨‹åº'%-.192s'具有å‰å‘声明但未定义"
eng "Subroutine '%-.192s' has a forward declaration but is not defined"
ER_COMPRESSED_COLUMN_USED_AS_KEY
- eng "Compressed column '%-.192s' can't be used in key specification"
+ chi "压缩列'%-.192s'ä¸èƒ½ç”¨äºŽç´¢å¼•è§„范"
+ eng "Compressed column '%-.192s' can't be used in key specification"
ER_UNKNOWN_COMPRESSION_METHOD
- eng "Unknown compression method: %s"
+ chi "未知压缩方法:%s"
+ eng "Unknown compression method: %s"
ER_WRONG_NUMBER_OF_VALUES_IN_TVC
+ chi "使用的表值构造函数具有ä¸åŒæ•°é‡çš„值"
eng "The used table value constructor has a different number of values"
ER_FIELD_REFERENCE_IN_TVC
- eng "Field reference '%-.192s' can't be used in table value constructor"
+ chi "字段å‚考'%-.192s'ä¸èƒ½ç”¨äºŽè¡¨å€¼æž„造函数"
+ eng "Field reference '%-.192s' can't be used in table value constructor"
ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
+ chi "%s函数需è¦æ•°å­—æ•°æ®ç±»åž‹"
eng "Numeric datatype is required for %s function"
ER_ARGUMENT_NOT_CONSTANT
+ chi "%s函数的å‚æ•°ä¸æ˜¯åˆ†åŒºçš„常é‡"
eng "Argument to the %s function is not a constant for a partition"
ER_ARGUMENT_OUT_OF_RANGE
+ chi "%s函数的å‚æ•°ä¸å±žäºŽèŒƒå›´[0,1]"
eng "Argument to the %s function does not belong to the range [0,1]"
ER_WRONG_TYPE_OF_ARGUMENT
+ chi "%s函数仅接å—å¯ä»¥è½¬æ¢ä¸ºæ•°å­—类型的å‚æ•°"
eng "%s function only accepts arguments that can be converted to numerical types"
ER_NOT_AGGREGATE_FUNCTION
- eng "Non-aggregate function contains aggregate specific instructions: (FETCH GROUP NEXT ROW)"
+ chi "在错误的上下文中使用的èšåˆç‰¹å®šæŒ‡ä»¤ï¼ˆfetch组下一行)"
+ eng "Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context"
ER_INVALID_AGGREGATE_FUNCTION
+ chi "èšåˆå‡½æ•°ä¸¢å¤±çš„èšåˆç‰¹å®šæŒ‡ä»¤ï¼ˆfetch组下一行)"
eng "Aggregate specific instruction(FETCH GROUP NEXT ROW) missing from the aggregate function"
ER_INVALID_VALUE_TO_LIMIT
+ chi "é™åˆ¶ä»…接å—整数值"
eng "Limit only accepts integer values"
ER_INVISIBLE_NOT_NULL_WITHOUT_DEFAULT
+ chi "éšå½¢åˆ—%`s必须具有默认值"
eng "Invisible column %`s must have a default value"
-
-
# MariaDB error numbers related to System Versioning
+
ER_UPDATE_INFO_WITH_SYSTEM_VERSIONING
+ chi "匹é…的行:%ld已更改:%ldæ’入:%ld警告:%ld"
eng "Rows matched: %ld Changed: %ld Inserted: %ld Warnings: %ld"
ER_VERS_FIELD_WRONG_TYPE
+ chi "%`s必须为系统版本为表%s的类型%`s"
eng "%`s must be of type %s for system-versioned table %`s"
ER_VERS_ENGINE_UNSUPPORTED
+ chi "Transaction-Precise系统版本控制%`sä¸å—支æŒ"
eng "Transaction-precise system versioning for %`s is not supported"
ER_UNUSED_23
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
ER_PARTITION_WRONG_TYPE
+ chi "错误的分区类型,预期类型:%`s"
eng "Wrong partitioning type, expected type: %`s"
WARN_VERS_PART_FULL
+ chi "版本化表%`s.%`s:partition%`s已满,添加更多历å²åˆ†åŒº"
eng "Versioned table %`s.%`s: partition %`s is full, add more HISTORY partitions"
WARN_VERS_PARAMETERS
+ chi "也许缺少å‚数:%s"
eng "Maybe missing parameters: %s"
ER_VERS_DROP_PARTITION_INTERVAL
+ chi "åªèƒ½åœ¨æ—‹è½¬é—´éš”时丢弃最旧的分区"
eng "Can only drop oldest partitions when rotating by INTERVAL"
ER_UNUSED_25
+ chi "你永远ä¸åº”该看到它"
eng "You should never see it"
-
WARN_VERS_PART_NON_HISTORICAL
+ chi "分区%`s包å«éžåŽ†å²æ•°æ®"
eng "Partition %`s contains non-historical data"
ER_VERS_ALTER_NOT_ALLOWED
+ chi "系统版本为%`s.%`sä¸å…许。更改@@system_versioning_alter_history用ALTER。"
eng "Not allowed for system-versioned %`s.%`s. Change @@system_versioning_alter_history to proceed with ALTER."
ER_VERS_ALTER_ENGINE_PROHIBITED
+ chi "ä¸å…许系统版本为%`s.%`s。ä¸æ”¯æŒæ›´æ”¹è¿”回/æ¥è‡ªæœ¬æœºç³»ç»Ÿç‰ˆæœ¬ä¼ è¾“引擎。"
eng "Not allowed for system-versioned %`s.%`s. Change to/from native system versioning engine is not supported."
ER_VERS_RANGE_PROHIBITED
+ chi "ä¸å…许使用SYSTEM_TIME范围选择器"
eng "SYSTEM_TIME range selector is not allowed"
ER_CONFLICTING_FOR_SYSTEM_TIME
+ chi "与递归的System_timeå­å¥ç›¸å†²çª"
eng "Conflicting FOR SYSTEM_TIME clauses in WITH RECURSIVE"
ER_VERS_TABLE_MUST_HAVE_COLUMNS
+ chi "表%`s必须至少有一个版本åŽçš„列"
eng "Table %`s must have at least one versioned column"
ER_VERS_NOT_VERSIONED
+ chi "表%`sä¸æ˜¯ç³»ç»Ÿç‰ˆæœ¬çš„"
eng "Table %`s is not system-versioned"
ER_MISSING
+ chi "%`s的错误å‚数:缺少'%s'"
eng "Wrong parameters for %`s: missing '%s'"
ER_VERS_PERIOD_COLUMNS
+ chi "system_time的时期必须使用列%`s和%`s"
eng "PERIOD FOR SYSTEM_TIME must use columns %`s and %`s"
ER_PART_WRONG_VALUE
+ chi "用于分区%`s的错误å‚数:'%s'的错误值"
eng "Wrong parameters for partitioned %`s: wrong value for '%s'"
ER_VERS_WRONG_PARTS
+ chi "%`s的错误分区:必须至少有一个HISTORY,åªèƒ½æœ‰ä¸€ä¸ªCURRENT"
eng "Wrong partitions for %`s: must have at least one HISTORY and exactly one last CURRENT"
ER_VERS_NO_TRX_ID
+ chi "TRX_ID%llu在`mysql.transaction_registry`中找ä¸åˆ°"
eng "TRX_ID %llu not found in `mysql.transaction_registry`"
ER_VERS_ALTER_SYSTEM_FIELD
+ chi "无法更改系统版本é…置字段%`s"
eng "Can not change system versioning field %`s"
ER_DROP_VERSIONING_SYSTEM_TIME_PARTITION
+ chi "无法删除由SYSTEM_TIME分区的表%`s的系统版本"
eng "Can not DROP SYSTEM VERSIONING for table %`s partitioned BY SYSTEM_TIME"
ER_VERS_DB_NOT_SUPPORTED
- eng "System versioning tables in the %`s database are not supported"
+ chi "ä¸æ”¯æŒ%`sæ•°æ®åº“中的系统版本化表"
+ eng "System-versioned tables in the %`s database are not supported"
ER_VERS_TRT_IS_DISABLED
+ chi "事务注册表已ç¦ç”¨"
eng "Transaction registry is disabled"
ER_VERS_DUPLICATE_ROW_START_END
- eng "Duplicate ROW %s column %`s"
+ chi "é‡å¤è¡Œ%s列%`s"
+ eng "Duplicate ROW %s column %`s"
ER_VERS_ALREADY_VERSIONED
+ chi "表%`så·²ç»æ˜¯ç³»ç»Ÿç‰ˆæœ¬çš„"
eng "Table %`s is already system-versioned"
ER_UNUSED_24
- eng "You should never see it"
+ chi "你永远ä¸åº”该看到它"
+ eng "You should never see it"
-ER_VERS_TEMPORARY
- eng "TEMPORARY tables do not support system versioning"
+ER_VERS_NOT_SUPPORTED
+ chi "系统版本的表ä¸æ”¯æŒ%s"
+ eng "System-versioned tables do not support %s"
ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
- eng "Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END"
+ chi "事务 - 精确的系统 - 版本的表ä¸æ”¯æŒæŒ‰è¡Œå¼€å§‹æˆ–行末端分区"
+ eng "Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END"
ER_INDEX_FILE_FULL
+ chi "表'%-.192s'的索引文件已满"
eng "The index file for table '%-.192s' is full"
ER_UPDATED_COLUMN_ONLY_ONCE
+ chi "列%`s.%`s在å•ä¸ªæ›´æ–°è¯­å¥ä¸­ä¸èƒ½æ›´æ¢ä¸€æ¬¡"
eng "The column %`s.%`s cannot be changed more than once in a single UPDATE statement"
ER_EMPTY_ROW_IN_TVC
+ chi "在此上下文中,表值构造函数ä¸å…许在没有元素的行"
eng "Row with no elements is not allowed in table value constructor in this context"
ER_VERS_QUERY_IN_PARTITION
+ chi "表%`sçš„SYSTEM_TIME分区ä¸æ”¯æŒåŽ†å²æŸ¥è¯¢"
eng "SYSTEM_TIME partitions in table %`s does not support historical query"
ER_KEY_DOESNT_SUPPORT
+ chi "%s索引%`sä¸æ”¯æŒæ­¤æ“作"
eng "%s index %`s does not support this operation"
ER_ALTER_OPERATION_TABLE_OPTIONS_NEED_REBUILD
- eng "Changing table options requires the table to be rebuilt"
+ chi "更改表选项需è¦å°†è¦é‡å»ºçš„表格é‡å»º"
+ eng "Changing table options requires the table to be rebuilt"
+ER_BACKUP_LOCK_IS_ACTIVE
+ chi "由于您在è¿è¡ŒBACKUP STAGE,无法执行命令"
+ eng "Can't execute the command as you have a BACKUP STAGE active"
+ER_BACKUP_NOT_RUNNING
+ chi "您必须å¯åŠ¨å¤‡ä»½â€œå¤‡ä»½é˜¶æ®µå¼€å§‹â€"
+ eng "You must start backup with \"BACKUP STAGE START\""
+ER_BACKUP_WRONG_STAGE
+ chi "备份阶段'%s'相åŒæˆ–在当å‰å¤‡ä»½é˜¶æ®µ'%s'之å‰"
+ eng "Backup stage '%s' is same or before current backup stage '%s'"
+ER_BACKUP_STAGE_FAILED
+ chi "备份阶段'%s'失败"
+ eng "Backup stage '%s' failed"
+ER_BACKUP_UNKNOWN_STAGE
+ chi "未知备份阶段:'%s'。阶段应该是START,FLUSH,BLOCK_DDL,BLOCK_COMIT或END之一"
+ eng "Unknown backup stage: '%s'. Stage should be one of START, FLUSH, BLOCK_DDL, BLOCK_COMMIT or END"
+ER_USER_IS_BLOCKED
+ chi "由于凭è¯é”™è¯¯å¤ªå¤šï¼Œç”¨æˆ·è¢«é˜»æ­¢;用'FLUSH PRIVILEGES'解é”"
+ eng "User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'"
+ER_ACCOUNT_HAS_BEEN_LOCKED
+ chi "访问拒ç»ï¼Œæ­¤å¸æˆ·å·²é”定"
+ eng "Access denied, this account is locked"
+ rum "Acces refuzat, acest cont este blocat"
+ER_PERIOD_TEMPORARY_NOT_ALLOWED
+ chi "应用程åºæ—¶é—´æ®µè¡¨ä¸èƒ½ä¸´æ—¶"
+ eng "Application-time period table cannot be temporary"
+ER_PERIOD_TYPES_MISMATCH
+ chi "%`s的期间的字段有ä¸åŒçš„类型"
+ eng "Fields of PERIOD FOR %`s have different types"
+ER_MORE_THAN_ONE_PERIOD
+ chi "无法指定多个应用程åºæ—¶é—´æ®µ"
+ eng "Cannot specify more than one application-time period"
+ER_PERIOD_FIELD_WRONG_ATTRIBUTES
+ chi "期间字段%`sä¸èƒ½æ˜¯%s"
+ eng "Period field %`s cannot be %s"
+ER_PERIOD_NOT_FOUND
+ chi "期间%`s未在表中找到"
+ eng "Period %`s is not found in table"
+ER_PERIOD_COLUMNS_UPDATED
+ chi "列%`s在更新集列表中指定的周期%`s中使用"
+ eng "Column %`s used in period %`s specified in update SET list"
+ER_PERIOD_CONSTRAINT_DROP
+ chi "无法DROP CONSTRAINT `%s`。使用DROP PERIOD `%s`"
+ eng "Can't DROP CONSTRAINT `%s`. Use DROP PERIOD `%s` for this"
+ER_TOO_LONG_KEYPART 42000 S1009
+ chi "指定的索引部分太长;最大索引部分长度为 %u 个字节"
+ eng "Specified key part was too long; max key part length is %u bytes"
diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
index 915291185d5..e9bb1dc0436 100644
--- a/sql/signal_handler.cc
+++ b/sql/signal_handler.cc
@@ -15,6 +15,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include "mariadb.h"
+#include "my_dbug.h"
#include <signal.h>
//#include "sys_vars.h"
@@ -140,8 +141,8 @@ extern "C" sig_handler handle_fatal_signal(int sig)
my_safe_printf_stderr("Fatal " SIGNAL_FMT " while backtracing\n", sig);
goto end;
}
-
segfaulted = 1;
+ DBUG_PRINT("error", ("handling fatal signal"));
curr_time= my_time(0);
localtime_r(&curr_time, &tm);
@@ -194,7 +195,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
(uint) thread_scheduler->max_threads +
(uint) extra_max_connections);
- my_safe_printf_stderr("thread_count=%u\n", (uint) thread_count);
+ my_safe_printf_stderr("thread_count=%u\n", THD_count::value());
if (dflt_key_cache && thread_scheduler)
{
diff --git a/sql/slave.cc b/sql/slave.cc
index 60a62d71cf6..f883b13e7b5 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -53,6 +53,9 @@
// Create_file_log_event,
// Format_description_log_event
#include "wsrep_mysqld.h"
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h"
+#endif
#ifdef HAVE_REPLICATION
@@ -360,6 +363,29 @@ end:
return err;
}
+static THD *new_bg_THD()
+{
+ THD *thd= new THD(next_thread_id());
+ thd->thread_stack= (char*) &thd;
+ thd->store_globals();
+ thd->system_thread = SYSTEM_THREAD_SLAVE_BACKGROUND;
+ thd->security_ctx->skip_grants();
+ thd->set_command(COM_DAEMON);
+ thd->variables.wsrep_on= 0;
+ return thd;
+}
+
+static void bg_gtid_delete_pending(void *)
+{
+ THD *thd= new_bg_THD();
+
+ rpl_slave_state::list_element *list;
+ list= rpl_global_gtid_slave_state->gtid_grab_pending_delete_list();
+ rpl_global_gtid_slave_state->gtid_delete_pending(thd, &list);
+ if (list)
+ rpl_global_gtid_slave_state->put_back_list(list);
+ delete thd;
+}
static void bg_gtid_pos_auto_create(void *hton)
{
@@ -394,8 +420,8 @@ static void bg_gtid_pos_auto_create(void *hton)
/* Find the entry for the table to auto-create. */
mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state);
- entry= (rpl_slave_state::gtid_pos_table *)
- rpl_global_gtid_slave_state->gtid_pos_tables;
+ entry= rpl_global_gtid_slave_state->
+ gtid_pos_tables.load(std::memory_order_relaxed);
while (entry)
{
if (entry->table_hton == hton &&
@@ -419,13 +445,7 @@ static void bg_gtid_pos_auto_create(void *hton)
table_name.str= loc_table_name.c_ptr_safe();
table_name.length= loc_table_name.length();
- thd= new THD(next_thread_id());
- thd->thread_stack= (char*) &thd; /* Set approximate stack start */
- thd->system_thread = SYSTEM_THREAD_SLAVE_BACKGROUND;
- thd->store_globals();
- thd->security_ctx->skip_grants();
- thd->set_command(COM_DAEMON);
- thd->variables.wsrep_on= 0;
+ thd= new_bg_THD();
err= gtid_pos_table_creation(thd, engine, &table_name);
if (err)
{
@@ -438,8 +458,8 @@ static void bg_gtid_pos_auto_create(void *hton)
/* Now enable the entry for the auto-created table. */
mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state);
- entry= (rpl_slave_state::gtid_pos_table *)
- rpl_global_gtid_slave_state->gtid_pos_tables;
+ entry= rpl_global_gtid_slave_state->
+ gtid_pos_tables.load(std::memory_order_relaxed);
while (entry)
{
if (entry->table_hton == hton &&
@@ -458,19 +478,11 @@ end:
plugin_unlock(NULL, engine);
}
-
static bool slave_background_thread_gtid_loaded;
static void bg_rpl_load_gtid_slave_state(void *)
{
- THD *thd= new THD(next_thread_id());
- thd->thread_stack= (char*) &thd; /* Set approximate stack start */
- thd->system_thread = SYSTEM_THREAD_SLAVE_BACKGROUND;
- thd->store_globals();
- thd->security_ctx->skip_grants();
- thd->set_command(COM_DAEMON);
- thd->variables.wsrep_on= 0;
-
+ THD *thd= new_bg_THD();
thd_proc_info(thd, "Loading slave GTID position from table");
if (rpl_load_gtid_slave_state(thd))
sql_print_warning("Failed to load slave replication state from table "
@@ -510,8 +522,7 @@ void slave_background_kill_request(THD *to_kill)
to ensure that the table_entry will not go away before we can lock the
LOCK_slave_state.
*/
-void
-slave_background_gtid_pos_create_request(
+void slave_background_gtid_pos_create_request(
rpl_slave_state::gtid_pos_table *table_entry)
{
if (table_entry->state != rpl_slave_state::GTID_POS_AUTO_CREATE)
@@ -529,6 +540,16 @@ slave_background_gtid_pos_create_request(
}
+/*
+ Request the manager thread to delete no longer used rows from the
+ mysql.gtid_slave_pos* tables.
+*/
+void slave_background_gtid_pending_delete_request(void)
+{
+ mysql_manager_submit(bg_gtid_delete_pending, NULL);
+}
+
+
/* Initialize slave structures */
int init_slave()
@@ -833,6 +854,8 @@ static void make_slave_transaction_retry_errors_printable(void)
}
+#define DEFAULT_SLAVE_RETRY_ERRORS 9
+
bool init_slave_transaction_retry_errors(const char* arg)
{
const char *p;
@@ -844,7 +867,7 @@ bool init_slave_transaction_retry_errors(const char* arg)
if (!arg)
arg= "";
- slave_transaction_retry_error_length= 2;
+ slave_transaction_retry_error_length= DEFAULT_SLAVE_RETRY_ERRORS;
for (;my_isspace(system_charset_info,*arg);++arg)
/* empty */;
for (p= arg; *p; )
@@ -867,15 +890,22 @@ bool init_slave_transaction_retry_errors(const char* arg)
currently, InnoDB deadlock detected by InnoDB or lock
wait timeout (innodb_lock_wait_timeout exceeded
*/
- slave_transaction_retry_errors[0]= ER_LOCK_DEADLOCK;
- slave_transaction_retry_errors[1]= ER_LOCK_WAIT_TIMEOUT;
+ slave_transaction_retry_errors[0]= ER_NET_READ_ERROR;
+ slave_transaction_retry_errors[1]= ER_NET_READ_INTERRUPTED;
+ slave_transaction_retry_errors[2]= ER_NET_ERROR_ON_WRITE;
+ slave_transaction_retry_errors[3]= ER_NET_WRITE_INTERRUPTED;
+ slave_transaction_retry_errors[4]= ER_LOCK_WAIT_TIMEOUT;
+ slave_transaction_retry_errors[5]= ER_LOCK_DEADLOCK;
+ slave_transaction_retry_errors[6]= ER_CONNECT_TO_FOREIGN_DATA_SOURCE;
+ slave_transaction_retry_errors[7]= 2013; /* CR_SERVER_LOST */
+ slave_transaction_retry_errors[8]= 12701; /* ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM */
/* Add user codes after this */
- for (p= arg, i= 2; *p; )
+ for (p= arg, i= DEFAULT_SLAVE_RETRY_ERRORS; *p; )
{
if (!(p= str2int(p, 10, 0, LONG_MAX, &err_code)))
break;
- if (err_code > 0 && err_code < ER_ERROR_LAST)
+ if (err_code > 0)
slave_transaction_retry_errors[i++]= (uint) err_code;
while (!my_isdigit(system_charset_info,*p) && *p)
p++;
@@ -1040,6 +1070,7 @@ terminate_slave_thread(THD *thd,
DBUG_PRINT("loop", ("killing slave thread"));
mysql_mutex_lock(&thd->LOCK_thd_kill);
+ mysql_mutex_lock(&thd->LOCK_thd_data);
#ifndef DONT_USE_THR_ALARM
/*
Error codes from pthread_kill are:
@@ -1052,6 +1083,7 @@ terminate_slave_thread(THD *thd,
thd->awake_no_mutex(NOT_KILLED);
mysql_mutex_unlock(&thd->LOCK_thd_kill);
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
/*
There is a small chance that slave thread might miss the first
@@ -1304,7 +1336,7 @@ static bool io_slave_killed(Master_info* mi)
DBUG_ENTER("io_slave_killed");
DBUG_ASSERT(mi->slave_running); // tracking buffer overrun
- DBUG_RETURN(mi->abort_slave || abort_loop || mi->io_thd->killed);
+ DBUG_RETURN(mi->abort_slave || mi->io_thd->killed);
}
/**
@@ -1329,7 +1361,7 @@ static bool sql_slave_killed(rpl_group_info *rgi)
DBUG_ASSERT(rli->sql_driver_thd == thd);
DBUG_ASSERT(rli->slave_running == 1);// tracking buffer overrun
- if (abort_loop || rli->sql_driver_thd->killed || rli->abort_slave)
+ if (rli->sql_driver_thd->killed || rli->abort_slave)
{
/*
The transaction should always be binlogged if OPTION_KEEP_LOG is
@@ -2555,10 +2587,7 @@ static bool wait_for_relay_log_space(Relay_log_info* rli)
&rli->log_space_lock,
&stage_waiting_for_relay_log_space,
&old_stage);
- while (rli->log_space_limit <
- (ulonglong)my_atomic_load64_explicit((volatile int64*)
- (&rli->log_space_total),
- MY_MEMORY_ORDER_RELAXED) &&
+ while (rli->log_space_limit < rli->log_space_total &&
!(slave_killed=io_slave_killed(mi)) &&
!rli->ignore_log_space_limit)
mysql_cond_wait(&rli->log_space_cond, &rli->log_space_lock);
@@ -2599,7 +2628,7 @@ static bool wait_for_relay_log_space(Relay_log_info* rli)
DBUG_PRINT("info", ("log_space_limit=%llu log_space_total=%llu "
"ignore_log_space_limit=%d "
"sql_force_rotate_relay=%d",
- rli->log_space_limit, rli->log_space_total,
+ rli->log_space_limit, uint64(rli->log_space_total),
(int) rli->ignore_log_space_limit,
(int) rli->sql_force_rotate_relay));
}
@@ -3121,10 +3150,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
protocol->store(mi->rli.last_error().message, &my_charset_bin);
protocol->store((uint32) mi->rli.slave_skip_counter);
protocol->store((ulonglong) mi->rli.group_master_log_pos);
- protocol->store((ulonglong)
- my_atomic_load64_explicit((volatile int64*)
- (&mi->rli.log_space_total),
- MY_MEMORY_ORDER_RELAXED));
+ protocol->store((ulonglong) mi->rli.log_space_total);
protocol->store(
mi->rli.until_condition==Relay_log_info::UNTIL_NONE ? "None":
@@ -3251,22 +3277,15 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
// Slave_SQL_Running_State
protocol->store(slave_sql_running_state, &my_charset_bin);
- uint64 events;
- events= (uint64)my_atomic_load64_explicit((volatile int64 *)
- &mi->total_ddl_groups, MY_MEMORY_ORDER_RELAXED);
- protocol->store(events);
- events= (uint64)my_atomic_load64_explicit((volatile int64 *)
- &mi->total_non_trans_groups, MY_MEMORY_ORDER_RELAXED);
- protocol->store(events);
- events= (uint64)my_atomic_load64_explicit((volatile int64 *)
- &mi->total_trans_groups, MY_MEMORY_ORDER_RELAXED);
- protocol->store(events);
+ protocol->store(mi->total_ddl_groups);
+ protocol->store(mi->total_non_trans_groups);
+ protocol->store(mi->total_trans_groups);
if (full)
{
protocol->store((uint32) mi->rli.retried_trans);
protocol->store((ulonglong) mi->rli.max_relay_log_size);
- protocol->store((uint32) mi->rli.executed_entries);
+ protocol->store(mi->rli.executed_entries);
protocol->store((uint32) mi->received_heartbeats);
protocol->store((double) mi->heartbeat_period, 3, &tmp);
protocol->store(gtid_pos->ptr(), gtid_pos->length(), &my_charset_bin);
@@ -3418,7 +3437,6 @@ static int init_slave_thread(THD* thd, Master_info *mi,
thd->system_thread = (thd_type == SLAVE_THD_SQL) ?
SYSTEM_THREAD_SLAVE_SQL : SYSTEM_THREAD_SLAVE_IO;
- thread_safe_increment32(&service_thread_count);
/* We must call store_globals() before doing my_net_init() */
if (init_thr_lock() || thd->store_globals() ||
@@ -3789,32 +3807,26 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi,
exec_res= ev->apply_event(rgi);
#ifdef WITH_WSREP
- if (exec_res)
- {
- switch (thd->wsrep_conflict_state) {
- case NO_CONFLICT: break;
- case MUST_REPLAY:
- WSREP_DEBUG("SQL apply failed for MUST_REPLAY, res %d", exec_res);
+ if (WSREP(thd)) {
+
+ if (exec_res) {
mysql_mutex_lock(&thd->LOCK_thd_data);
- wsrep_replay_transaction(thd);
- switch (thd->wsrep_conflict_state) {
- case NO_CONFLICT:
- exec_res = 0; /* replaying succeeded, and slave may continue */
+ switch(thd->wsrep_trx().state()) {
+ case wsrep::transaction::s_must_replay:
+ /* this transaction will be replayed,
+ so not raising slave error here */
+ WSREP_DEBUG("SQL apply failed for MUST_REPLAY, res %d", exec_res);
+ exec_res = 0;
break;
- case ABORTED: break; /* replaying has failed, trx is rolled back */
default:
- WSREP_WARN("unexpected result of slave transaction replaying: %lld, %d",
- thd->thread_id, thd->wsrep_conflict_state);
+ WSREP_DEBUG("SQL apply failed, res %d conflict state: %s",
+ exec_res, wsrep_thd_transaction_state_str(thd));
+ rli->abort_slave= 1;
+ rli->report(ERROR_LEVEL, ER_UNKNOWN_COM_ERROR, rgi->gtid_info(),
+ "Node has dropped from cluster");
+ break;
}
mysql_mutex_unlock(&thd->LOCK_thd_data);
- break;
- default:
- WSREP_DEBUG("SQL apply failed, res %d conflict state: %d",
- exec_res, thd->wsrep_conflict_state);
- rli->abort_slave= 1;
- rli->report(ERROR_LEVEL, ER_UNKNOWN_COM_ERROR, rgi->gtid_info(),
- "Node has dropped from cluster");
- break;
}
}
#endif
@@ -4109,6 +4121,15 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
}
if (ev)
{
+#ifdef WITH_WSREP
+ if (wsrep_before_statement(thd))
+ {
+ mysql_mutex_unlock(&rli->data_lock);
+ delete ev;
+ WSREP_INFO("Wsrep before statement error");
+ DBUG_RETURN(1);
+ }
+#endif /* WITH_WSREP */
int exec_res;
Log_event_type typ= ev->get_type_code();
@@ -4149,6 +4170,9 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
rli->abort_slave= 1;
rli->stop_for_until= true;
mysql_mutex_unlock(&rli->data_lock);
+#ifdef WITH_WSREP
+ wsrep_after_statement(thd);
+#endif /* WITH_WSREP */
delete ev;
DBUG_RETURN(1);
}
@@ -4186,7 +4210,12 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
if (res == 0)
rli->event_relay_log_pos= rli->future_event_relay_log_pos;
if (res >= 0)
+ {
+#ifdef WITH_WSREP
+ wsrep_after_statement(thd);
+#endif /* WITH_WSREP */
DBUG_RETURN(res);
+ }
/*
Else we proceed to execute the event non-parallel.
This is the case for pre-10.0 events without GTID, and for handling
@@ -4221,6 +4250,9 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
"aborted because of out-of-memory error");
mysql_mutex_unlock(&rli->data_lock);
delete ev;
+#ifdef WITH_WSREP
+ wsrep_after_statement(thd);
+#endif /* WITH_WSREP */
DBUG_RETURN(1);
}
@@ -4235,6 +4267,9 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
"thread aborted because of out-of-memory error");
mysql_mutex_unlock(&rli->data_lock);
delete ev;
+#ifdef WITH_WSREP
+ wsrep_after_statement(thd);
+#endif /* WITH_WSREP */
DBUG_RETURN(1);
}
/*
@@ -4263,13 +4298,17 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
retry.
*/
if (unlikely(exec_res == 2))
+ {
+#ifdef WITH_WSREP
+ wsrep_after_statement(thd);
+#endif /* WITH_WSREP */
DBUG_RETURN(1);
-
+ }
#ifdef WITH_WSREP
mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state == NO_CONFLICT)
- {
- mysql_mutex_unlock(&thd->LOCK_thd_data);
+ enum wsrep::client_error wsrep_error= thd->wsrep_cs().current_error();
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ if (wsrep_error == wsrep::e_success)
#endif /* WITH_WSREP */
if (slave_trans_retries)
{
@@ -4282,8 +4321,8 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
We were in a transaction which has been rolled back because of a
temporary error;
let's seek back to BEGIN log event and retry it all again.
- Note, if lock wait timeout (innodb_lock_wait_timeout exceeded)
- there is no rollback since 5.0.13 (ref: manual).
+ Note, if lock wait timeout (innodb_lock_wait_timeout exceeded)
+ there is no rollback since 5.0.13 (ref: manual).
We have to not only seek but also
a) init_master_info(), to seek back to hot relay log's start
@@ -4344,13 +4383,11 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
serial_rgi->trans_retries));
}
}
+
+ rli->executed_entries++;
#ifdef WITH_WSREP
- }
- else
- mysql_mutex_unlock(&thd->LOCK_thd_data);
+ wsrep_after_statement(thd);
#endif /* WITH_WSREP */
-
- thread_safe_increment64(&rli->executed_entries);
DBUG_EXECUTE_IF(
"pause_sql_thread_on_fde",
if (ev && typ == FORMAT_DESCRIPTION_EVENT) {
@@ -4529,7 +4566,7 @@ pthread_handler_t handle_slave_io(void *arg)
goto err_during_init;
}
thd->system_thread_info.rpl_io_info= &io_info;
- add_to_active_threads(thd);
+ server_threads.insert(thd);
mi->slave_running = MYSQL_SLAVE_RUN_NOT_CONNECT;
mi->abort_slave = 0;
mysql_mutex_unlock(&mi->run_lock);
@@ -4822,6 +4859,7 @@ Stopping slave I/O thread due to out-of-memory error from master");
not cause the slave IO thread to stop, and the error messages are
already reported.
*/
+ DBUG_EXECUTE_IF("simulate_delay_semisync_slave_reply", my_sleep(800000););
(void)repl_semisync_slave.slave_reply(mi);
}
@@ -4857,15 +4895,13 @@ Stopping slave I/O thread due to out-of-memory error from master");
{
DBUG_PRINT("info", ("log_space_limit=%llu log_space_total=%llu "
"ignore_log_space_limit=%d",
- rli->log_space_limit, rli->log_space_total,
+ rli->log_space_limit, uint64(rli->log_space_total),
(int) rli->ignore_log_space_limit));
}
#endif
if (rli->log_space_limit && rli->log_space_limit <
- (ulonglong) my_atomic_load64_explicit((volatile int64*)
- (&rli->log_space_total),
- MY_MEMORY_ORDER_RELAXED) &&
+ rli->log_space_total &&
!rli->ignore_log_space_limit)
if (wait_for_relay_log_space(rli))
{
@@ -4919,7 +4955,7 @@ err:
flush_master_info(mi, TRUE, TRUE);
THD_STAGE_INFO(thd, stage_waiting_for_slave_mutex_on_exit);
thd->add_status_to_global();
- unlink_not_visible_thd(thd);
+ server_threads.erase(thd);
mysql_mutex_lock(&mi->run_lock);
err_during_init:
@@ -4931,8 +4967,6 @@ err_during_init:
thd->assert_not_linked();
delete thd;
- thread_safe_decrement32(&service_thread_count);
- signal_thd_deleted();
mi->abort_slave= 0;
mi->slave_running= MYSQL_SLAVE_NOT_RUN;
@@ -5207,7 +5241,7 @@ pthread_handler_t handle_slave_sql(void *arg)
/* Ensure that slave can exeute any alter table it gets from master */
thd->variables.alter_algorithm= (ulong) Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT;
- add_to_active_threads(thd);
+ server_threads.insert(thd);
/*
We are going to set slave_running to 1. Assuming slave I/O thread is
alive and connected, this is going to make Seconds_Behind_Master be 0
@@ -5294,13 +5328,6 @@ pthread_handler_t handle_slave_sql(void *arg)
}
#endif
-#ifdef WITH_WSREP
- thd->wsrep_exec_mode= LOCAL_STATE;
- wsrep_thd_set_query_state(thd, QUERY_EXEC);
- /* synchronize with wsrep replication */
- if (WSREP_ON)
- wsrep_ready_wait();
-#endif
DBUG_PRINT("master_info",("log_file_name: %s position: %llu",
rli->group_master_log_name,
rli->group_master_log_pos));
@@ -5401,7 +5428,14 @@ pthread_handler_t handle_slave_sql(void *arg)
goto err;
}
mysql_mutex_unlock(&rli->data_lock);
-
+#ifdef WITH_WSREP
+ wsrep_open(thd);
+ if (wsrep_before_command(thd))
+ {
+ WSREP_WARN("Slave SQL wsrep_before_command() failed");
+ goto err;
+ }
+#endif /* WITH_WSREP */
/* Read queries from the IO/THREAD until this thread is killed */
thd->set_command(COM_SLAVE_SQL);
@@ -5438,10 +5472,16 @@ pthread_handler_t handle_slave_sql(void *arg)
if (exec_relay_log_event(thd, rli, serial_rgi))
{
#ifdef WITH_WSREP
- if (thd->wsrep_conflict_state != NO_CONFLICT)
+ if (WSREP(thd))
{
- wsrep_node_dropped= TRUE;
- rli->abort_slave= TRUE;
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+
+ if (thd->wsrep_cs().current_error())
+ {
+ wsrep_node_dropped = TRUE;
+ rli->abort_slave = TRUE;
+ }
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
}
#endif /* WITH_WSREP */
@@ -5494,6 +5534,10 @@ pthread_handler_t handle_slave_sql(void *arg)
rli->group_master_log_pos, tmp.c_ptr_safe());
sql_print_information("master was %s:%d", mi->host, mi->port);
}
+#ifdef WITH_WSREP
+ wsrep_after_command_before_result(thd);
+ wsrep_after_command_after_result(thd);
+#endif /* WITH_WSREP */
err_before_start:
@@ -5567,7 +5611,7 @@ pthread_handler_t handle_slave_sql(void *arg)
}
THD_STAGE_INFO(thd, stage_waiting_for_slave_mutex_on_exit);
thd->add_status_to_global();
- unlink_not_visible_thd(thd);
+ server_threads.erase(thd);
mysql_mutex_lock(&rli->run_lock);
err_during_init:
@@ -5612,17 +5656,17 @@ err_during_init:
"SQL slave will continue");
wsrep_node_dropped= FALSE;
mysql_mutex_unlock(&rli->run_lock);
- WSREP_DEBUG("wsrep_conflict_state now: %d", thd->wsrep_conflict_state);
- WSREP_INFO("slave restart: %d", thd->wsrep_conflict_state);
- thd->wsrep_conflict_state= NO_CONFLICT;
goto wsrep_restart_point;
- } else {
+ }
+ else
+ {
WSREP_INFO("Slave error due to node going non-primary");
WSREP_INFO("wsrep_restart_slave was set and therefore slave will be "
- "automatically restarted when node joins back to cluster.");
+ "automatically restarted when node joins back to cluster");
wsrep_restart_slave_activated= TRUE;
}
}
+ wsrep_close(thd);
#endif /* WITH_WSREP */
/*
@@ -5639,8 +5683,6 @@ err_during_init:
delete serial_rgi;
delete thd;
- thread_safe_decrement32(&service_thread_count);
- signal_thd_deleted();
DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
@@ -7693,10 +7735,7 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size)
is are able to rotate and purge sometime soon.
*/
if (rli->log_space_limit &&
- rli->log_space_limit <
- (ulonglong) my_atomic_load64_explicit((volatile int64*)
- (&rli->log_space_total),
- MY_MEMORY_ORDER_RELAXED))
+ rli->log_space_limit < rli->log_space_total)
{
/* force rotation if not in an unfinished group */
rli->sql_force_rotate_relay= !rli->is_in_group();
@@ -7931,7 +7970,7 @@ enum Log_event_type wsrep_peak_event(rpl_group_info *rgi, ulonglong* event_size)
ev_type= (ev) ? ev->get_type_code() : UNKNOWN_EVENT;
delete ev;
future_pos+= *event_size;
- } while (ev_type == ANNOTATE_ROWS_EVENT);
+ } while (ev_type == ANNOTATE_ROWS_EVENT || ev_type == XID_EVENT);
/* scan the log back and re-set the positions to original values */
rgi->rli->event_relay_log_pos= event_pos;
@@ -8015,8 +8054,8 @@ bool rpl_master_has_bug(const Relay_log_info *rli, uint bug_id, bool report,
{
struct st_version_range_for_one_bug {
uint bug_id;
- const uchar introduced_in[3]; // first version with bug
- const uchar fixed_in[3]; // first version with fix
+ Version introduced_in; // first version with bug
+ Version fixed_in; // first version with fix
};
static struct st_version_range_for_one_bug versions_for_all_bugs[]=
{
@@ -8026,19 +8065,17 @@ bool rpl_master_has_bug(const Relay_log_info *rli, uint bug_id, bool report,
{33029, { 5, 1, 0 }, { 5, 1, 12 } },
{37426, { 5, 1, 0 }, { 5, 1, 26 } },
};
- const uchar *master_ver=
- rli->relay_log.description_event_for_exec->server_version_split.ver;
-
- DBUG_ASSERT(sizeof(rli->relay_log.description_event_for_exec->server_version_split.ver) == 3);
+ const Version &master_ver=
+ rli->relay_log.description_event_for_exec->server_version_split;
for (uint i= 0;
i < sizeof(versions_for_all_bugs)/sizeof(*versions_for_all_bugs);i++)
{
- const uchar *introduced_in= versions_for_all_bugs[i].introduced_in,
- *fixed_in= versions_for_all_bugs[i].fixed_in;
+ const Version &introduced_in= versions_for_all_bugs[i].introduced_in;
+ const Version &fixed_in= versions_for_all_bugs[i].fixed_in;
if ((versions_for_all_bugs[i].bug_id == bug_id) &&
- (memcmp(introduced_in, master_ver, 3) <= 0) &&
- (memcmp(fixed_in, master_ver, 3) > 0) &&
+ introduced_in <= master_ver &&
+ fixed_in > master_ver &&
(pred == NULL || (*pred)(param)))
{
if (!report)
diff --git a/sql/slave.h b/sql/slave.h
index 97fd4823a07..5ca6054a178 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -276,8 +276,8 @@ bool net_request_file(NET* net, const char* fname);
void slave_background_kill_request(THD *to_kill);
void slave_background_gtid_pos_create_request
(rpl_slave_state::gtid_pos_table *table_entry);
+void slave_background_gtid_pending_delete_request(void);
-extern bool volatile abort_loop;
extern Master_info *active_mi; /* active_mi for multi-master */
extern Master_info *default_master_info; /* To replace active_mi */
extern Master_info_index *master_info_index;
diff --git a/sql/sp.cc b/sql/sp.cc
index 8bf3c450941..56c59fcf696 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -200,7 +200,8 @@ TABLE_FIELD_TYPE proc_table_fields[MYSQL_PROC_FIELD_COUNT] =
"'STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES',"
"'ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER',"
"'HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH',"
- "'EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')") },
+ "'EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT',"
+ "'TIME_ROUND_FRACTIONAL')") },
{ NULL, 0 }
},
{
@@ -1465,7 +1466,7 @@ log:
log_query.ptr(), log_query.length(),
FALSE, FALSE, FALSE, 0) > 0)
{
- my_error(ER_ERROR_ON_WRITE, MYF(MY_WME), "binary log", -1);
+ my_error(ER_ERROR_ON_WRITE, MYF(0), "binary log", -1);
goto done;
}
thd->variables.sql_mode= 0;
@@ -1789,8 +1790,8 @@ bool lock_db_routines(THD *thd, const char *db)
close_system_tables(thd, &open_tables_state_backup);
/* We should already hold a global IX lock and a schema X lock. */
- DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::GLOBAL, "", "",
- MDL_INTENTION_EXCLUSIVE) &&
+ DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::BACKUP, "", "",
+ MDL_BACKUP_DDL) &&
thd->mdl_context.is_lock_owner(MDL_key::SCHEMA, db, "",
MDL_EXCLUSIVE));
DBUG_RETURN(thd->mdl_context.acquire_locks(&mdl_requests,
diff --git a/sql/sp.h b/sql/sp.h
index 852fbccafdf..49bf1eb93cf 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -522,12 +522,11 @@ inline const Sp_handler *Sp_handler::handler(MDL_key::enum_mdl_namespace type)
return &sp_handler_procedure;
case MDL_key::PACKAGE_BODY:
return &sp_handler_package_body;
- case MDL_key::GLOBAL:
+ case MDL_key::BACKUP:
case MDL_key::SCHEMA:
case MDL_key::TABLE:
case MDL_key::TRIGGER:
case MDL_key::EVENT:
- case MDL_key::COMMIT:
case MDL_key::USER_LOCK:
case MDL_key::NAMESPACE_END:
break;
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index cc121c05a01..ddf9df6e3d5 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2002, 2016, Oracle and/or its affiliates.
- Copyright (c) 2011, 2017, MariaDB
+ Copyright (c) 2011, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,6 +29,8 @@
#include "sql_derived.h" // mysql_handle_derived
#include "sql_cte.h"
#include "sql_select.h" // Virtual_tmp_table
+#include "opt_trace.h"
+#include "my_json_writer.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
@@ -45,7 +47,8 @@
#include "sql_audit.h"
#include "debug_sync.h"
#ifdef WITH_WSREP
-#include "wsrep_thd.h"
+#include "wsrep.h"
+#include "wsrep_trans_observer.h"
#endif /* WITH_WSREP */
/*
@@ -74,33 +77,6 @@ static void reset_start_time_for_sp(THD *thd)
}
-Item::Type
-sp_map_item_type(const Type_handler *handler)
-{
- if (handler == &type_handler_row)
- return Item::ROW_ITEM;
- enum_field_types type= real_type_to_type(handler->real_field_type());
-
- switch (type) {
- case MYSQL_TYPE_BIT:
- case MYSQL_TYPE_TINY:
- case MYSQL_TYPE_SHORT:
- case MYSQL_TYPE_LONG:
- case MYSQL_TYPE_LONGLONG:
- case MYSQL_TYPE_INT24:
- return Item::INT_ITEM;
- case MYSQL_TYPE_DECIMAL:
- case MYSQL_TYPE_NEWDECIMAL:
- return Item::DECIMAL_ITEM;
- case MYSQL_TYPE_FLOAT:
- case MYSQL_TYPE_DOUBLE:
- return Item::REAL_ITEM;
- default:
- return Item::STRING_ITEM;
- }
-}
-
-
bool Item_splocal::append_for_log(THD *thd, String *str)
{
if (fix_fields_if_needed(thd, NULL))
@@ -322,7 +298,7 @@ sp_get_flags_for_command(LEX *lex)
- EXPLAIN DELETE ...
- ANALYZE DELETE ...
*/
- if (lex->select_lex.item_list.is_empty() &&
+ if (lex->first_select_lex()->item_list.is_empty() &&
!lex->describe && !lex->analyze_stmt)
flags= 0;
else
@@ -477,13 +453,14 @@ check_routine_name(const LEX_CSTRING *ident)
*
*/
-sp_head *sp_head::create(sp_package *parent, const Sp_handler *handler)
+sp_head *sp_head::create(sp_package *parent, const Sp_handler *handler,
+ enum_sp_aggregate_type agg_type)
{
MEM_ROOT own_root;
init_sql_alloc(&own_root, "sp_head", MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC,
MYF(0));
sp_head *sp;
- if (!(sp= new (&own_root) sp_head(&own_root, parent, handler)))
+ if (!(sp= new (&own_root) sp_head(&own_root, parent, handler, agg_type)))
free_root(&own_root, MYF(0));
return sp;
@@ -511,8 +488,8 @@ void sp_head::destroy(sp_head *sp)
*
*/
-sp_head::sp_head(MEM_ROOT *mem_root_arg, sp_package *parent,
- const Sp_handler *sph)
+sp_head::sp_head(MEM_ROOT *mem_root_arg, sp_package *parent,
+ const Sp_handler *sph, enum_sp_aggregate_type agg_type)
:Query_arena(NULL, STMT_INITIALIZED_FOR_SP),
Database_qualified_name(&null_clex_str, &null_clex_str),
main_mem_root(*mem_root_arg),
@@ -548,6 +525,7 @@ sp_head::sp_head(MEM_ROOT *mem_root_arg, sp_package *parent,
{
mem_root= &main_mem_root;
+ set_chistics_agg_type(agg_type);
m_first_instance= this;
m_first_free_instance= this;
m_last_cached_sp= this;
@@ -565,6 +543,7 @@ sp_head::sp_head(MEM_ROOT *mem_root_arg, sp_package *parent,
my_hash_init(&m_sptabs, system_charset_info, 0, 0, 0, sp_table_key, 0, 0);
my_hash_init(&m_sroutines, system_charset_info, 0, 0, 0, sp_sroutine_key,
0, 0);
+ m_security_ctx.init();
DBUG_VOID_RETURN;
}
@@ -588,7 +567,7 @@ sp_package::sp_package(MEM_ROOT *mem_root_arg,
LEX *top_level_lex,
const sp_name *name,
const Sp_handler *sph)
- :sp_head(mem_root_arg, NULL, sph),
+ :sp_head(mem_root_arg, NULL, sph, DEFAULT_AGGREGATE),
m_current_routine(NULL),
m_top_level_lex(top_level_lex),
m_rcontext(NULL),
@@ -1191,6 +1170,8 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
if (check_stack_overrun(thd, 7 * STACK_MIN_SIZE, (uchar*)&old_packet))
DBUG_RETURN(TRUE);
+ opt_trace_disable_if_no_security_context_access(thd);
+
/* init per-instruction memroot */
init_sql_alloc(&execute_mem_root, "per_instruction_memroot",
MEM_ROOT_BLOCK_SIZE, 0, MYF(0));
@@ -1374,40 +1355,19 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
sql_digest_state *parent_digest= thd->m_digest;
thd->m_digest= NULL;
- err_status= i->execute(thd, &ip);
#ifdef WITH_WSREP
- if (m_handler->type() == TYPE_ENUM_PROCEDURE)
+ if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID)
{
- mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state == MUST_REPLAY)
- {
- wsrep_replay_sp_transaction(thd);
- err_status= thd->get_stmt_da()->is_set();
- thd->wsrep_conflict_state= NO_CONFLICT;
- }
- else if (thd->wsrep_conflict_state == ABORTED ||
- thd->wsrep_conflict_state == CERT_FAILURE)
- {
- /*
- If the statement execution was BF aborted or was aborted
- due to certification failure, clean up transaction here
- and reset conflict state to NO_CONFLICT and thd->killed
- to THD::NOT_KILLED. Error handling is done based on err_status
- below. Error must have been raised by wsrep hton code before
- entering here.
- */
- DBUG_ASSERT(err_status);
- DBUG_ASSERT(thd->get_stmt_da()->is_error());
- thd->wsrep_conflict_state= NO_CONFLICT;
- thd->killed= NOT_KILLED;
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
+ thd->set_wsrep_next_trx_id(thd->query_id);
+ WSREP_DEBUG("assigned new next trx ID for SP, trx id: %" PRIu64, thd->wsrep_next_trx_id());
}
#endif /* WITH_WSREP */
-#ifdef WITH_WSREP_NO
+ err_status= i->execute(thd, &ip);
+
+#ifdef WITH_WSREP
if (WSREP(thd))
{
- if (((thd->wsrep_trx().state() == wsrep::transaction::s_executing) &&
+ if (((thd->wsrep_trx().state() == wsrep::transaction::s_executing || thd->in_sub_stmt) &&
(thd->is_fatal_error || thd->killed)))
{
WSREP_DEBUG("SP abort err status %d in sub %d trx state %d",
@@ -1420,6 +1380,11 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
otherwise it clears the error, and cleans up the
whole transaction. For now we just return and finish
our handling once we are back to mysql_parse.
+
+ Same applies to a SP execution, which was aborted due
+ to wsrep related conflict, but which is executing as sub statement.
+ SP in sub statement level should not commit not rollback,
+ we have to call for rollback is up-most SP level.
*/
WSREP_DEBUG("Skipping after_command hook for killed SP");
}
@@ -2032,7 +1997,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
for (arg_no= 0; arg_no < argcount; arg_no++)
{
/* Arguments must be fixed in Item_func_sp::fix_fields */
- DBUG_ASSERT(argp[arg_no]->fixed);
+ DBUG_ASSERT(argp[arg_no]->is_fixed());
if ((err_status= (*func_ctx)->set_parameter(thd, arg_no, &(argp[arg_no]))))
goto err_with_cleanup;
@@ -2109,6 +2074,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
thd->variables.option_bits&= ~OPTION_BIN_LOG;
}
+ opt_trace_disable_if_no_stored_proc_func_access(thd, this);
/*
Switch to call arena/mem_root so objects like sp_cursor or
Item_cache holders for case expressions can be allocated on it.
@@ -2399,9 +2365,11 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
err_status= set_routine_security_ctx(thd, this, &save_security_ctx);
#endif
+ opt_trace_disable_if_no_stored_proc_func_access(thd, this);
if (!err_status)
{
err_status= execute(thd, TRUE);
+ DBUG_PRINT("info", ("execute returned %d", (int) err_status));
}
if (save_log_general)
@@ -2800,6 +2768,17 @@ sp_head::set_chistics(const st_sp_chistics &chistics)
m_chistics.comment.length);
}
+
+void
+sp_head::set_c_chistics(const st_sp_chistics &chistics)
+{
+ // Set all chistics but preserve agg_type.
+ enum_sp_aggregate_type save_agg_type= agg_type();
+ set_chistics(chistics);
+ set_chistics_agg_type(save_agg_type);
+}
+
+
void
sp_head::set_info(longlong created, longlong modified,
const st_sp_chistics &chistics, sql_mode_t sql_mode)
@@ -3430,6 +3409,13 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
thd->lex->safe_to_cache_query= 0;
#endif
+ Opt_trace_start ots(thd, m_lex->query_tables,
+ SQLCOM_SELECT, &m_lex->var_list,
+ NULL, 0,
+ thd->variables.character_set_client);
+
+ Json_writer_object trace_command(thd);
+ Json_writer_array trace_command_steps(thd, "steps");
if (open_tables)
res= instr->exec_open_and_lock_tables(thd, m_lex->query_tables);
@@ -4643,8 +4629,8 @@ int
sp_instr_error::execute(THD *thd, uint *nextp)
{
DBUG_ENTER("sp_instr_error::execute");
-
my_message(m_errcode, ER_THD(thd, m_errcode), MYF(0));
+ WSREP_DEBUG("sp_instr_error: %s %d", ER_THD(thd, m_errcode), thd->is_error());
*nextp= m_ip+1;
DBUG_RETURN(-1);
}
@@ -4692,7 +4678,7 @@ sp_instr_set_case_expr::exec_core(THD *thd, uint *nextp)
thd->spcont->set_case_expr(thd, m_case_expr_id, &null_item))
{
/* If this also failed, we have to abort. */
- my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
+ my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
}
}
else
@@ -5236,6 +5222,36 @@ bool sp_head::spvar_fill_table_rowtype_reference(THD *thd,
}
+bool sp_head::check_group_aggregate_instructions_forbid() const
+{
+ if (unlikely(m_flags & sp_head::HAS_AGGREGATE_INSTR))
+ {
+ my_error(ER_NOT_AGGREGATE_FUNCTION, MYF(0));
+ return true;
+ }
+ return false;
+}
+
+
+bool sp_head::check_group_aggregate_instructions_require() const
+{
+ if (unlikely(!(m_flags & HAS_AGGREGATE_INSTR)))
+ {
+ my_error(ER_INVALID_AGGREGATE_FUNCTION, MYF(0));
+ return true;
+ }
+ return false;
+}
+
+
+bool sp_head::check_group_aggregate_instructions_function() const
+{
+ return agg_type() == GROUP_AGGREGATE ?
+ check_group_aggregate_instructions_require() :
+ check_group_aggregate_instructions_forbid();
+}
+
+
/*
In Oracle mode stored routines have an optional name
at the end of a declaration:
@@ -5270,6 +5286,19 @@ err:
}
+bool
+sp_head::check_standalone_routine_end_name(const sp_name *end_name) const
+{
+ if (end_name && !end_name->eq(this))
+ {
+ my_error(ER_END_IDENTIFIER_DOES_NOT_MATCH, MYF(0),
+ ErrConvDQName(end_name).ptr(), ErrConvDQName(this).ptr());
+ return true;
+ }
+ return false;
+}
+
+
ulong sp_head::sp_cache_version() const
{
return m_parent ? m_parent->sp_cache_version() : m_sp_cache_version;
diff --git a/sql/sp_head.h b/sql/sp_head.h
index e1cfbb484ad..69232da10c7 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -1,6 +1,7 @@
/* -*- C++ -*- */
/*
Copyright (c) 2002, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -39,9 +40,6 @@
@{
*/
-Item::Type
-sp_map_item_type(const Type_handler *handler);
-
uint
sp_get_flags_for_command(LEX *lex);
@@ -130,8 +128,8 @@ class sp_head :private Query_arena,
public Database_qualified_name,
public Sql_alloc
{
- sp_head(const sp_head &); /**< Prevent use of these */
- void operator=(sp_head &);
+ sp_head(const sp_head &)= delete;
+ void operator=(sp_head &)= delete;
protected:
MEM_ROOT main_mem_root;
@@ -187,6 +185,11 @@ private:
set_chistics() makes sure this.
*/
Sp_chistics m_chistics;
+ void set_chistics(const st_sp_chistics &chistics);
+ inline void set_chistics_agg_type(enum enum_sp_aggregate_type type)
+ {
+ m_chistics.agg_type= type;
+ }
public:
sql_mode_t m_sql_mode; ///< For SHOW CREATE and execution
bool m_explicit_name; /**< Prepend the db name? */
@@ -318,11 +321,13 @@ public:
SQL_I_List<Item_trigger_field> m_trg_table_fields;
protected:
- sp_head(MEM_ROOT *mem_root, sp_package *parent, const Sp_handler *handler);
+ sp_head(MEM_ROOT *mem_root, sp_package *parent, const Sp_handler *handler,
+ enum_sp_aggregate_type agg_type);
virtual ~sp_head();
public:
static void destroy(sp_head *sp);
- static sp_head *create(sp_package *parent, const Sp_handler *handler);
+ static sp_head *create(sp_package *parent, const Sp_handler *handler,
+ enum_sp_aggregate_type agg_type);
/// Initialize after we have reset mem_root
void
@@ -414,6 +419,10 @@ public:
const LEX_CSTRING *field_name,
Item *val, LEX *lex);
bool check_package_routine_end_name(const LEX_CSTRING &end_name) const;
+ bool check_standalone_routine_end_name(const sp_name *end_name) const;
+ bool check_group_aggregate_instructions_function() const;
+ bool check_group_aggregate_instructions_forbid() const;
+ bool check_group_aggregate_instructions_require() const;
private:
/**
Generate a code to set a single cursor parameter variable.
@@ -591,7 +600,8 @@ public:
if (!oldlex)
DBUG_RETURN(false); // Nothing to restore
LEX *sublex= thd->lex;
- if (thd->restore_from_local_lex_to_old_lex(oldlex))// This restores 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)
{
@@ -602,6 +612,23 @@ public:
DBUG_RETURN(false);
}
+ /**
+ Iterate through the LEX stack from the top (the newest) to the bottom
+ (the oldest) and find the one that contains a non-zero spname.
+ @returns - the address of spname, or NULL of no spname found.
+ */
+ const sp_name *find_spname_recursive()
+ {
+ uint count= m_lex.elements;
+ for (uint i= 0; i < count; i++)
+ {
+ const LEX *tmp= m_lex.elem(count - i - 1);
+ if (tmp->spname)
+ return tmp->spname;
+ }
+ return NULL;
+ }
+
/// Put the instruction on the backpatch list, associated with the label.
int
push_backpatch(THD *thd, sp_instr *, sp_label *);
@@ -730,11 +757,7 @@ public:
const LEX_CSTRING &db,
const LEX_CSTRING &table);
- void set_chistics(const st_sp_chistics &chistics);
- inline void set_chistics_agg_type(enum enum_sp_aggregate_type type)
- {
- m_chistics.agg_type= type;
- }
+ void set_c_chistics(const st_sp_chistics &chistics);
void set_info(longlong created, longlong modified,
const st_sp_chistics &chistics, sql_mode_t sql_mode);
@@ -2031,6 +2054,7 @@ private:
}; // class sp_instr_set_case_expr : public sp_instr_opt_meta
+bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access);
#ifndef NO_EMBEDDED_ACCESS_CHECKS
bool
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h
index 4d36ca8b479..b1d77234f54 100644
--- a/sql/sp_pcontext.h
+++ b/sql/sp_pcontext.h
@@ -22,7 +22,6 @@
#endif
#include "sql_string.h" // LEX_STRING
-#include "mysql_com.h" // enum_field_types
#include "field.h" // Create_field
#include "sql_array.h" // Dynamic_array
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index 61d7c708983..17b4c83b7bc 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -119,6 +119,19 @@ sp_rcontext *sp_rcontext::create(THD *thd,
}
+bool Row_definition_list::append_uniq(MEM_ROOT *mem_root, Spvar_definition *var)
+{
+ DBUG_ASSERT(elements);
+ uint unused;
+ if (unlikely(find_row_field_by_name(&var->field_name, &unused)))
+ {
+ my_error(ER_DUP_FIELDNAME, MYF(0), var->field_name.str);
+ return true;
+ }
+ return push_back(var, mem_root);
+}
+
+
bool Row_definition_list::
adjust_formal_params_to_actual_params(THD *thd, List<Item> *args)
{
@@ -228,9 +241,10 @@ bool Qualified_column_ident::resolve_type_ref(THD *thd, Column_definition *def)
// Make %TYPE variables see temporary tables that shadow permanent tables
thd->temporary_tables= open_tables_state_backup.temporary_tables;
- if ((table_list= lex.select_lex.add_table_to_list(thd, this, NULL, 0,
- TL_READ_NO_INSERT,
- MDL_SHARED_READ)) &&
+ if ((table_list=
+ lex.first_select_lex()->add_table_to_list(thd, this, NULL, 0,
+ TL_READ_NO_INSERT,
+ MDL_SHARED_READ)) &&
!check_table_access(thd, SELECT_ACL, table_list, TRUE, UINT_MAX, FALSE) &&
!open_tables_only_view_structure(thd, table_list,
thd->mdl_context.has_locks()))
@@ -286,9 +300,10 @@ bool Table_ident::resolve_table_rowtype_ref(THD *thd,
// Make %ROWTYPE variables see temporary tables that shadow permanent tables
thd->temporary_tables= open_tables_state_backup.temporary_tables;
- if ((table_list= lex.select_lex.add_table_to_list(thd, this, NULL, 0,
- TL_READ_NO_INSERT,
- MDL_SHARED_READ)) &&
+ if ((table_list=
+ lex.first_select_lex()->add_table_to_list(thd, this, NULL, 0,
+ TL_READ_NO_INSERT,
+ MDL_SHARED_READ)) &&
!check_table_access(thd, SELECT_ACL, table_list, TRUE, UINT_MAX, FALSE) &&
!open_tables_only_view_structure(thd, table_list,
thd->mdl_context.has_locks()))
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index eae180837ae..826b2d9ea22 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2009, 2020, MariaDB
+ Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -56,8 +56,20 @@
#include "password.h"
#include "sql_plugin_compat.h"
+#include "wsrep_mysqld.h"
+
+#define MAX_SCRAMBLE_LENGTH 1024
bool mysql_user_table_is_in_short_password_format= false;
+bool using_global_priv_table= true;
+
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+// set that from field length in acl_load?
+const uint max_hostname_length= 60;
+const uint max_dbname_length= 64;
+
+#include "sql_acl_getsort.ic"
+#endif
static LEX_CSTRING native_password_plugin_name= {
STRING_WITH_LEN("mysql_native_password")
@@ -84,11 +96,20 @@ LEX_CSTRING current_user= { STRING_WITH_LEN("*current_user") };
LEX_CSTRING current_role= { STRING_WITH_LEN("*current_role") };
LEX_CSTRING current_user_and_current_role= { STRING_WITH_LEN("*current_user_and_current_role") };
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
+
static plugin_ref old_password_plugin;
-#endif
static plugin_ref native_password_plugin;
+static plugin_ref get_auth_plugin(THD *thd, const LEX_CSTRING &name, bool *locked)
+{
+ if (name.str == native_password_plugin_name.str)
+ return native_password_plugin;
+ else if (name.str == old_password_plugin_name.str)
+ return old_password_plugin;
+ *locked=true;
+ return my_plugin_lock_by_name(thd, &name, MYSQL_AUTHENTICATION_PLUGIN);
+}
+
/* Classes */
struct acl_host_and_ip
@@ -105,8 +126,11 @@ static bool compare_hostname(const acl_host_and_ip *, const char *, const char *
class ACL_ACCESS {
public:
- ulong sort;
+ ulonglong sort;
ulong access;
+ ACL_ACCESS()
+ :sort(0), access(0)
+ { }
};
/* ACL_HOST is used if no host is specified */
@@ -118,53 +142,88 @@ public:
char *db;
};
-class ACL_USER_BASE :public ACL_ACCESS
+class ACL_USER_BASE :public ACL_ACCESS, public Sql_alloc
{
public:
- static void *operator new(size_t size, MEM_ROOT *mem_root)
- { return (void*) alloc_root(mem_root, size); }
- static void operator delete(void *, MEM_ROOT *){}
+ ACL_USER_BASE()
+ :flags(0), user(null_clex_str)
+ {
+ bzero(&role_grants, sizeof(role_grants));
+ }
uchar flags; // field used to store various state information
LEX_CSTRING user;
/* list to hold references to granted roles (ACL_ROLE instances) */
DYNAMIC_ARRAY role_grants;
+ const char *get_username() { return user.str; }
};
-class ACL_USER :public ACL_USER_BASE
+class ACL_USER_PARAM
{
public:
+ ACL_USER_PARAM()
+ {
+ bzero(this, sizeof(*this));
+ }
acl_host_and_ip host;
size_t hostname_length;
USER_RESOURCES user_resource;
- uint8 salt[SCRAMBLE_LENGTH + 1]; // scrambled password in binary form
- uint8 salt_len; // 0 - no password, 4 - 3.20, 8 - 4.0, 20 - 4.1.1
enum SSL_type ssl_type;
+ uint password_errors;
const char *ssl_cipher, *x509_issuer, *x509_subject;
- LEX_CSTRING plugin;
- LEX_CSTRING auth_string;
LEX_CSTRING default_rolename;
+ struct AUTH { LEX_CSTRING plugin, auth_string, salt; } *auth;
+ uint nauth;
+ bool account_locked;
+ bool password_expired;
+ my_time_t password_last_changed;
+ longlong password_lifetime;
+
+ bool alloc_auth(MEM_ROOT *root, uint n)
+ {
+ return !(auth= (AUTH*) alloc_root(root, (nauth= n)*sizeof(AUTH)));
+ }
+};
+
+
+class ACL_USER :public ACL_USER_BASE,
+ public ACL_USER_PARAM
+{
+public:
+
+ ACL_USER() { }
+ ACL_USER(THD *thd, const LEX_USER &combo,
+ const Account_options &options,
+ const ulong privileges);
ACL_USER *copy(MEM_ROOT *root)
{
- ACL_USER *dst= (ACL_USER *) alloc_root(root, sizeof(ACL_USER));
- if (!dst)
+ ACL_USER *dst;
+ AUTH *dauth;
+ if (!multi_alloc_root(root, &dst, sizeof(ACL_USER),
+ &dauth, sizeof(AUTH)*nauth, NULL))
return 0;
*dst= *this;
- dst->user.str= safe_strdup_root(root, user.str);
- dst->user.length= user.length;
+ dst->user= safe_lexcstrdup_root(root, user);
dst->ssl_cipher= safe_strdup_root(root, ssl_cipher);
dst->x509_issuer= safe_strdup_root(root, x509_issuer);
dst->x509_subject= safe_strdup_root(root, x509_subject);
- if (plugin.str == native_password_plugin_name.str ||
- plugin.str == old_password_plugin_name.str)
- dst->plugin= plugin;
- else
- dst->plugin.str= strmake_root(root, plugin.str, plugin.length);
- dst->auth_string.str= safe_strdup_root(root, auth_string.str);
+ dst->auth= dauth;
+ for (uint i=0; i < nauth; i++, dauth++)
+ {
+ if (auth[i].plugin.str == native_password_plugin_name.str ||
+ auth[i].plugin.str == old_password_plugin_name.str)
+ dauth->plugin= auth[i].plugin;
+ else
+ dauth->plugin= safe_lexcstrdup_root(root, auth[i].plugin);
+ dauth->auth_string= safe_lexcstrdup_root(root, auth[i].auth_string);
+ if (auth[i].salt.length == 0)
+ dauth->salt= auth[i].salt;
+ else
+ dauth->salt= safe_lexcstrdup_root(root, auth[i].salt);
+ }
dst->host.hostname= safe_strdup_root(root, host.hostname);
- dst->default_rolename.str= safe_strdup_root(root, default_rolename.str);
- dst->default_rolename.length= default_rolename.length;
+ dst->default_rolename= safe_lexcstrdup_root(root, default_rolename);
bzero(&dst->role_grants, sizeof(role_grants));
return dst;
}
@@ -173,7 +232,7 @@ public:
{
CHARSET_INFO *cs= system_charset_info;
int res;
- res= strcmp(safe_str(user.str), safe_str(user2));
+ res= strcmp(user.str, user2);
if (!res)
res= my_strcasecmp(cs, host.hostname, host2);
return res;
@@ -183,7 +242,7 @@ public:
bool wild_eq(const char *user2, const char *host2, const char *ip2)
{
- if (strcmp(safe_str(user.str), safe_str(user2)))
+ if (strcmp(user.str, user2))
return false;
return compare_hostname(&host, host2, ip2 ? ip2 : host2);
@@ -222,6 +281,8 @@ public:
acl_host_and_ip host;
const char *user,*db;
ulong initial_access; /* access bits present in the table */
+
+ const char *get_username() { return user; }
};
#ifndef DBUG_OFF
@@ -231,9 +292,7 @@ ulong role_global_merges= 0, role_db_merges= 0, role_table_merges= 0,
#endif
#ifndef NO_EMBEDDED_ACCESS_CHECKS
-static bool fix_and_copy_user(LEX_USER *to, LEX_USER *from, THD *thd);
static void update_hostname(acl_host_and_ip *host, const char *hostname);
-static ulong get_sort(uint count,...);
static bool show_proxy_grants (THD *, const char *, const char *,
char *, size_t);
static bool show_role_grants(THD *, const char *,
@@ -275,15 +334,15 @@ public:
const char *proxied_host_arg, const char *proxied_user_arg,
bool with_grant_arg)
{
- user= (user_arg && *user_arg) ? user_arg : NULL;
+ user= user_arg;
update_hostname (&host, (host_arg && *host_arg) ? host_arg : NULL);
- proxied_user= (proxied_user_arg && *proxied_user_arg) ?
- proxied_user_arg : NULL;
+ proxied_user= proxied_user_arg;
update_hostname (&proxied_host,
(proxied_host_arg && *proxied_host_arg) ?
proxied_host_arg : NULL);
with_grant= with_grant_arg;
- sort= get_sort(4, host.hostname, user, proxied_host.hostname, proxied_user);
+ sort= get_magic_sort("huhu", host.hostname, user, proxied_host.hostname,
+ proxied_user);
}
void init(MEM_ROOT *mem, const char *host_arg, const char *user_arg,
@@ -291,11 +350,10 @@ public:
bool with_grant_arg)
{
init ((host_arg && *host_arg) ? strdup_root (mem, host_arg) : NULL,
- (user_arg && *user_arg) ? strdup_root (mem, user_arg) : NULL,
+ strdup_root (mem, user_arg),
(proxied_host_arg && *proxied_host_arg) ?
strdup_root (mem, proxied_host_arg) : NULL,
- (proxied_user_arg && *proxied_user_arg) ?
- strdup_root (mem, proxied_user_arg) : NULL,
+ strdup_root (mem, proxied_user_arg),
with_grant_arg);
}
@@ -308,7 +366,7 @@ public:
const char *get_proxied_host() { return proxied_host.hostname; }
void set_user(MEM_ROOT *mem, const char *user_arg)
{
- user= user_arg && *user_arg ? strdup_root(mem, user_arg) : NULL;
+ user= *user_arg ? strdup_root(mem, user_arg) : "";
}
void set_host(MEM_ROOT *mem, const char *host_arg)
{
@@ -323,9 +381,8 @@ public:
{
sql_print_warning("'proxies_priv' entry '%s@%s %s@%s' "
"ignored in --skip-name-resolve mode.",
- safe_str(proxied_user),
- safe_str(proxied_host.hostname),
- safe_str(user),
+ proxied_user,
+ safe_str(proxied_host.hostname), user,
safe_str(host.hostname));
return TRUE;
}
@@ -345,11 +402,8 @@ public:
proxied_user_arg, proxied_user));
DBUG_RETURN(compare_hostname(&host, host_arg, ip_arg) &&
compare_hostname(&proxied_host, host_arg, ip_arg) &&
- (!user ||
- (user_arg && !wild_compare(user_arg, user, TRUE))) &&
- (!proxied_user ||
- (proxied_user && !wild_compare(proxied_user_arg,
- proxied_user, TRUE))));
+ (!*user || !strcmp(user_arg, user)) &&
+ (!*proxied_user || !strcmp(proxied_user_arg, proxied_user)));
}
@@ -381,8 +435,7 @@ public:
bool granted_on(const char *host_arg, const char *user_arg)
{
- return (((!user && (!user_arg || !user_arg[0])) ||
- (user && user_arg && !strcmp(user, user_arg))) &&
+ return (!strcmp(user, user_arg) &&
((!host.hostname && (!host_arg || !host_arg[0])) ||
(host.hostname && host_arg && !strcmp(host.hostname, host_arg))));
}
@@ -391,17 +444,15 @@ public:
void print_grant(String *str)
{
str->append(STRING_WITH_LEN("GRANT PROXY ON '"));
- if (proxied_user)
- str->append(proxied_user, strlen(proxied_user));
+ str->append(proxied_user);
str->append(STRING_WITH_LEN("'@'"));
if (proxied_host.hostname)
str->append(proxied_host.hostname, strlen(proxied_host.hostname));
str->append(STRING_WITH_LEN("' TO '"));
- if (user)
- str->append(user, strlen(user));
+ str->append(user);
str->append(STRING_WITH_LEN("'@'"));
if (host.hostname)
- str->append(host.hostname, strlen(host.hostname));
+ str->append(host.hostname);
str->append(STRING_WITH_LEN("'"));
if (with_grant)
str->append(STRING_WITH_LEN(" WITH GRANT OPTION"));
@@ -614,8 +665,11 @@ static DYNAMIC_ARRAY acl_wild_hosts;
static Hash_filo<acl_entry> *acl_cache;
static uint grant_version=0; /* Version of priv tables. incremented by acl_load */
static ulong get_access(TABLE *form,uint fieldnr, uint *next_field=0);
-static int acl_compare(ACL_ACCESS *a,ACL_ACCESS *b);
-static ulong get_sort(uint count,...);
+static int acl_compare(const ACL_ACCESS *a, const ACL_ACCESS *b);
+static int acl_user_compare(const ACL_USER *a, const ACL_USER *b);
+static void rebuild_acl_users();
+static int acl_db_compare(const ACL_DB *a, const ACL_DB *b);
+static void rebuild_acl_dbs();
static void init_check_host(void);
static void rebuild_check_host(void);
static void rebuild_role_grants(void);
@@ -624,8 +678,7 @@ static ACL_USER *find_user_wild(const char *host, const char *user, const char *
static ACL_ROLE *find_acl_role(const char *user);
static ROLE_GRANT_PAIR *find_role_grant_pair(const LEX_CSTRING *u, const LEX_CSTRING *h, const LEX_CSTRING *r);
static ACL_USER_BASE *find_acl_user_base(const char *user, const char *host);
-static bool update_user_table(THD *, const User_table &, const char *, const char *, const
- char *, size_t new_password_len);
+static bool update_user_table_password(THD *, const User_table&, const ACL_USER&);
static bool acl_load(THD *thd, const Grant_tables& grant_tables);
static inline void get_grantor(THD *thd, char* grantor);
static bool add_role_user_mapping(const char *uname, const char *hname, const char *rname);
@@ -670,7 +723,6 @@ HASH *Sp_handler_package_body::get_priv_hash() const
*/
enum enum_acl_tables
{
- USER_TABLE,
DB_TABLE,
TABLES_PRIV_TABLE,
COLUMNS_PRIV_TABLE,
@@ -679,7 +731,7 @@ enum enum_acl_tables
PROCS_PRIV_TABLE,
PROXIES_PRIV_TABLE,
ROLES_MAPPING_TABLE,
- TABLES_MAX // <== always the last
+ USER_TABLE // <== always the last
};
static const int Table_user= 1 << USER_TABLE;
@@ -691,6 +743,31 @@ static const int Table_procs_priv= 1 << PROCS_PRIV_TABLE;
static const int Table_proxies_priv= 1 << PROXIES_PRIV_TABLE;
static const int Table_roles_mapping= 1 << ROLES_MAPPING_TABLE;
+static LEX_CSTRING MYSQL_TABLE_NAME[USER_TABLE+1]= {
+ {STRING_WITH_LEN("db")},
+ {STRING_WITH_LEN("tables_priv")},
+ {STRING_WITH_LEN("columns_priv")},
+ {STRING_WITH_LEN("host")},
+ {STRING_WITH_LEN("procs_priv")},
+ {STRING_WITH_LEN("proxies_priv")},
+ {STRING_WITH_LEN("roles_mapping")},
+ {STRING_WITH_LEN("global_priv")}
+};
+static LEX_CSTRING MYSQL_TABLE_NAME_USER={STRING_WITH_LEN("user")};
+
+/**
+ Choose from either native or old password plugins when assigning a password
+*/
+
+static LEX_CSTRING &guess_auth_plugin(THD *thd, size_t password_len)
+{
+ if (thd->variables.old_passwords == 1 ||
+ password_len == SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
+ return old_password_plugin_name;
+ else
+ return native_password_plugin_name;
+}
+
/**
Base class representing a generic grant table from the mysql database.
@@ -705,104 +782,52 @@ class Grant_table_base
{
public:
/* Number of fields for this Grant Table. */
- uint num_fields() const { return tl.table->s->fields; }
+ uint num_fields() const { return m_table->s->fields; }
/* Check if the table exists after an attempt to open it was made.
Some tables, such as the host table in MySQL 5.6.7+ are missing. */
- bool table_exists() const { return tl.table; };
+ bool table_exists() const { return m_table; };
/* Initializes the READ_RECORD structure provided as a parameter
to read through the whole table, with all columns available. Cleaning up
is the caller's job. */
- bool init_read_record(READ_RECORD* info, THD* thd) const
+ bool init_read_record(READ_RECORD* info) const
{
- DBUG_ASSERT(tl.table);
- bool result= ::init_read_record(info, thd, tl.table, NULL, NULL, 1,
- true, false);
- if (!result)
- tl.table->use_all_columns();
- return result;
- }
+ DBUG_ASSERT(m_table);
- /* Return the number of privilege columns for this table. */
- uint num_privileges() const { return num_privilege_cols; }
- /* Return a privilege column by index. */
- Field* priv_field(uint privilege_idx) const
- {
- DBUG_ASSERT(privilege_idx < num_privileges());
- return tl.table->field[start_privilege_column + privilege_idx];
- }
+ if (num_fields() < min_columns)
+ {
+ my_printf_error(ER_UNKNOWN_ERROR, "Fatal error: mysql.%s table is "
+ "damaged or in unsupported 3.20 format",
+ MYF(ME_ERROR_LOG), m_table->s->table_name.str);
+ return 1;
+ }
- /* Fetch the privileges from the table as a set of bits. The first column
- is represented by the first bit in the result, the second column by the
- second bit, etc. */
- ulong get_access() const
- {
- return get_access(start_privilege_column,
- start_privilege_column + num_privileges() - 1);
+ bool result= ::init_read_record(info, m_table->in_use, m_table,
+ NULL, NULL, 1, true, false);
+ if (!result)
+ m_table->use_all_columns();
+ return result;
}
/* Return the underlying TABLE handle. */
- TABLE* table() const
- {
- return tl.table;
- }
-
- /** Check if the table was opened, issue an error otherwise. */
- int no_such_table() const
- {
- if (table_exists())
- return 0;
-
- my_error(ER_NO_SUCH_TABLE, MYF(0), tl.db.str, tl.alias.str);
- return 1;
- }
-
+ TABLE* table() const { return m_table; }
- protected:
- friend class Grant_tables;
-
- Grant_table_base() : start_privilege_column(0), num_privilege_cols(0)
- {
- tl.reset();
- };
-
- /* Initialization sequence common for all grant tables. This should be called
- after all table-specific initialization is performed. */
- void init(enum thr_lock_type lock_type, bool is_optional)
- {
- tl.open_type= OT_BASE_ONLY;
- tl.i_s_requested_object= OPEN_TABLE_ONLY;
- if (is_optional)
- tl.open_strategy= TABLE_LIST::OPEN_IF_EXISTS;
- }
-
- /*
- Get all access bits from table between start_field and end_field indices.
-
- IMPLEMENTATION
- The record should be already read in table->record[0]. All privileges
- are specified as an ENUM(Y,N).
-
- SYNOPSIS
- get_access()
- start_field_idx The field index at which the first privilege
- specification begins.
- end_field_idx The field index at which the last privilege
- specification is located.
-
- RETURN VALUE
- privilege mask
- */
- ulong get_access(uint start_field_idx, uint end_field_idx) const
+ ulong get_access() const
{
ulong access_bits= 0, bit= 1;
- for (uint i = start_field_idx; i <= end_field_idx; i++, bit<<=1)
+ for (uint i = start_priv_columns; i < end_priv_columns; i++, bit<<=1)
{
- if (get_YN_as_bool(tl.table->field[i]))
+ if (get_YN_as_bool(m_table->field[i]))
access_bits|= bit;
}
return access_bits;
}
+ protected:
+ friend class Grant_tables;
+
+ Grant_table_base() : min_columns(3), start_priv_columns(0), end_priv_columns(0), m_table(0)
+ { }
+
/* Compute how many privilege columns this table has. This method
can only be called after the table has been opened.
@@ -810,102 +835,165 @@ class Grant_table_base
A privilege column is of type enum('Y', 'N'). Privilege columns are
expected to be one after another.
*/
- void compute_num_privilege_cols()
+ void set_table(TABLE *table)
{
- if (!table_exists()) // Table does not exist or not opened.
+ if (!(m_table= table)) // Table does not exist or not opened.
return;
- num_privilege_cols= 0;
- for (uint i= 0; i < num_fields(); i++)
+ for (end_priv_columns= 0; end_priv_columns < num_fields(); end_priv_columns++)
{
- Field *field= tl.table->field[i];
- if (num_privilege_cols > 0 && field->real_type() != MYSQL_TYPE_ENUM)
- return;
+ Field *field= m_table->field[end_priv_columns];
if (field->real_type() == MYSQL_TYPE_ENUM &&
static_cast<Field_enum*>(field)->typelib->count == 2)
{
- num_privilege_cols++;
- if (num_privilege_cols == 1)
- start_privilege_column= i;
+ if (!start_priv_columns)
+ start_priv_columns= end_priv_columns;
}
+ else if (start_priv_columns)
+ break;
}
}
+
+ /* the min number of columns a table should have */
+ uint min_columns;
/* The index at which privilege columns start. */
- uint start_privilege_column;
- /* The number of privilege columns in the table. */
- uint num_privilege_cols;
+ uint start_priv_columns;
+ /* The index after the last privilege column */
+ uint end_priv_columns;
- TABLE_LIST tl;
+ TABLE *m_table;
};
class User_table: public Grant_table_base
{
public:
- /* Field getters return NULL if the column is not present in the table.
- This is consistent only if the table is in a supported version. We do
- not guard against corrupt tables. (yet) */
- Field* host() const
- { return get_field(0); }
- Field* user() const
- { return get_field(1); }
- Field* password() const
- { return have_password() ? NULL : tl.table->field[2]; }
- /* Columns after privilege columns. */
- Field* ssl_type() const
- { return get_field(start_privilege_column + num_privileges()); }
- Field* ssl_cipher() const
- { return get_field(start_privilege_column + num_privileges() + 1); }
- Field* x509_issuer() const
- { return get_field(start_privilege_column + num_privileges() + 2); }
- Field* x509_subject() const
- { return get_field(start_privilege_column + num_privileges() + 3); }
- Field* max_questions() const
- { return get_field(start_privilege_column + num_privileges() + 4); }
- Field* max_updates() const
- { return get_field(start_privilege_column + num_privileges() + 5); }
- Field* max_connections() const
- { return get_field(start_privilege_column + num_privileges() + 6); }
- Field* max_user_connections() const
- { return get_field(start_privilege_column + num_privileges() + 7); }
- Field* plugin() const
- { return get_field(start_privilege_column + num_privileges() + 8); }
- Field* authentication_string() const
- { return get_field(start_privilege_column + num_privileges() + 9); }
- Field* password_expired() const
- { return get_field(start_privilege_column + num_privileges() + 10); }
- Field* is_role() const
- { return get_field(start_privilege_column + num_privileges() + 11); }
- Field* default_role() const
- { return get_field(start_privilege_column + num_privileges() + 12); }
- Field* max_statement_time() const
- { return get_field(start_privilege_column + num_privileges() + 13); }
-
- /*
- Check if a user entry in the user table is marked as being a role entry
+ bool init_read_record(READ_RECORD* info) const
+ {
+ return Grant_table_base::init_read_record(info) || setup_sysvars();
+ }
+
+ virtual LEX_CSTRING& name() const = 0;
+ virtual int get_auth(THD *, MEM_ROOT *, ACL_USER *u) const= 0;
+ virtual bool set_auth(const ACL_USER &u) const = 0;
+ virtual ulong get_access() const = 0;
+ virtual void set_access(ulong rights, bool revoke) const = 0;
+
+ char *get_host(MEM_ROOT *root) const
+ { return ::get_field(root, m_table->field[0]); }
+ int set_host(const char *s, size_t l) const
+ { return m_table->field[0]->store(s, l, system_charset_info); };
+ char *get_user(MEM_ROOT *root) const
+ { return ::get_field(root, m_table->field[1]); }
+ int set_user(const char *s, size_t l) const
+ { return m_table->field[1]->store(s, l, system_charset_info); };
+
+ virtual SSL_type get_ssl_type () const = 0;
+ virtual int set_ssl_type (SSL_type x) const = 0;
+ virtual const char* get_ssl_cipher (MEM_ROOT *root) const = 0;
+ virtual int set_ssl_cipher (const char *s, size_t l) const = 0;
+ virtual const char* get_x509_issuer (MEM_ROOT *root) const = 0;
+ virtual int set_x509_issuer (const char *s, size_t l) const = 0;
+ virtual const char* get_x509_subject (MEM_ROOT *root) const = 0;
+ virtual int set_x509_subject (const char *s, size_t l) const = 0;
+ virtual longlong get_max_questions () const = 0;
+ virtual int set_max_questions (longlong x) const = 0;
+ virtual longlong get_max_updates () const = 0;
+ virtual int set_max_updates (longlong x) const = 0;
+ virtual longlong get_max_connections () const = 0;
+ virtual int set_max_connections (longlong x) const = 0;
+ virtual longlong get_max_user_connections () const = 0;
+ virtual int set_max_user_connections (longlong x) const = 0;
+ virtual double get_max_statement_time () const = 0;
+ virtual int set_max_statement_time (double x) const = 0;
+ virtual bool get_is_role () const = 0;
+ virtual int set_is_role (bool x) const = 0;
+ virtual const char* get_default_role (MEM_ROOT *root) const = 0;
+ virtual int set_default_role (const char *s, size_t l) const = 0;
+ virtual bool get_account_locked () const = 0;
+ virtual int set_account_locked (bool x) const = 0;
+ virtual bool get_password_expired () const = 0;
+ virtual int set_password_expired (bool x) const = 0;
+ virtual my_time_t get_password_last_changed () const = 0;
+ virtual int set_password_last_changed (my_time_t x) const = 0;
+ virtual longlong get_password_lifetime () const = 0;
+ virtual int set_password_lifetime (longlong x) const = 0;
+
+ virtual ~User_table() {}
+ private:
+ friend class Grant_tables;
+ virtual int setup_sysvars() const = 0;
+};
- IMPLEMENTATION
- Access the coresponding column and check the coresponding ENUM of the form
- ENUM('N', 'Y')
+/* MySQL-3.23 to MariaDB 10.3 `user` table */
+class User_table_tabular: public User_table
+{
+ public:
- SYNOPSIS
- check_is_role()
- form an open table to read the entry from.
- The record should be already read in table->record[0]
+ LEX_CSTRING& name() const { return MYSQL_TABLE_NAME_USER; }
- RETURN VALUE
- TRUE if the user is marked as a role
- FALSE otherwise
- */
- bool check_is_role() const
+ int get_auth(THD *thd, MEM_ROOT *root, ACL_USER *u) const
{
- /* Table version does not support roles */
- if (!is_role())
- return false;
-
- return get_YN_as_bool(is_role());
+ u->alloc_auth(root, 1);
+ if (have_password())
+ {
+ const char *as= safe_str(::get_field(&acl_memroot, password()));
+ u->auth->auth_string.str= as;
+ u->auth->auth_string.length= strlen(as);
+ u->auth->plugin= guess_auth_plugin(thd, u->auth->auth_string.length);
+ }
+ else
+ {
+ u->auth->plugin= native_password_plugin_name;
+ u->auth->auth_string= empty_clex_str;
+ }
+ if (plugin() && authstr())
+ {
+ char *tmpstr= ::get_field(&acl_memroot, plugin());
+ if (tmpstr)
+ {
+ const char *pw= u->auth->auth_string.str;
+ const char *as= safe_str(::get_field(&acl_memroot, authstr()));
+ if (*pw)
+ {
+ if (*as && strcmp(as, pw))
+ {
+ sql_print_warning("'user' entry '%s@%s' has both a password and an "
+ "authentication plugin specified. The password will be ignored.",
+ safe_str(get_user(thd->mem_root)), safe_str(get_host(thd->mem_root)));
+ }
+ else
+ as= pw;
+ }
+ u->auth->plugin.str= tmpstr;
+ u->auth->plugin.length= strlen(tmpstr);
+ u->auth->auth_string.str= as;
+ u->auth->auth_string.length= strlen(as);
+ }
+ }
+ return 0;
}
+ bool set_auth(const ACL_USER &u) const
+ {
+ if (u.nauth != 1)
+ return 1;
+ if (plugin())
+ {
+ if (have_password())
+ password()->reset();
+ plugin()->store(u.auth->plugin.str, u.auth->plugin.length, system_charset_info);
+ authstr()->store(u.auth->auth_string.str, u.auth->auth_string.length, system_charset_info);
+ }
+ else
+ {
+ if (u.auth->plugin.str != native_password_plugin_name.str &&
+ u.auth->plugin.str != old_password_plugin_name.str)
+ return 1;
+ password()->store(u.auth->auth_string.str, u.auth->auth_string.length, system_charset_info);
+ }
+ return 0;
+ }
ulong get_access() const
{
@@ -921,16 +1009,10 @@ class User_table: public Grant_table_base
if (access & PROCESS_ACL)
access|= SUPER_ACL | EXECUTE_ACL;
}
- /*
- If it is pre 5.0.1 privilege table then map CREATE privilege on
- CREATE VIEW & SHOW VIEW privileges.
- */
+
if (num_fields() <= 31 && (access & CREATE_ACL))
access|= (CREATE_VIEW_ACL | SHOW_VIEW_ACL);
- /*
- If it is pre 5.0.2 privilege table then map CREATE/ALTER privilege on
- CREATE PROCEDURE & ALTER PROCEDURE privileges.
- */
+
if (num_fields() <= 33)
{
if (access & CREATE_ACL)
@@ -938,20 +1020,13 @@ class User_table: public Grant_table_base
if (access & ALTER_ACL)
access|= ALTER_PROC_ACL;
}
- /*
- Pre 5.0.3 did not have CREATE_USER_ACL.
- */
+
if (num_fields() <= 36 && (access & GRANT_ACL))
access|= CREATE_USER_ACL;
- /*
- If it is pre 5.1.6 privilege table then map CREATE privilege on
- CREATE|ALTER|DROP|EXECUTE EVENT.
- */
+
if (num_fields() <= 37 && (access & SUPER_ACL))
access|= EVENT_ACL;
- /*
- If it is pre 5.1.6 privilege then map TRIGGER privilege on CREATE.
- */
+
if (num_fields() <= 38 && (access & SUPER_ACL))
access|= TRIGGER_ACL;
@@ -961,18 +1036,226 @@ class User_table: public Grant_table_base
return access & GLOBAL_ACLS;
}
- private:
- friend class Grant_tables;
+ void set_access(ulong rights, bool revoke) const
+ {
+ ulong priv= SELECT_ACL;
+ for (uint i= start_priv_columns; i < end_priv_columns; i++, priv <<= 1)
+ {
+ if (priv & rights)
+ m_table->field[i]->store(1 + !revoke, 0);
+ }
+ }
- /* Only Grant_tables can instantiate this class. */
- User_table() {};
+ SSL_type get_ssl_type () const
+ {
+ Field *f= get_field(end_priv_columns, MYSQL_TYPE_ENUM);
+ return (SSL_type)(f ? f->val_int()-1 : 0);
+ }
+ int set_ssl_type (SSL_type x) const
+ {
+ if (Field *f= get_field(end_priv_columns, MYSQL_TYPE_ENUM))
+ return f->store(x+1, 0);
+ else
+ return 1;
+ }
+ const char* get_ssl_cipher (MEM_ROOT *root) const
+ {
+ Field *f= get_field(end_priv_columns + 1, MYSQL_TYPE_BLOB);
+ return f ? ::get_field(root,f) : 0;
+ }
+ int set_ssl_cipher (const char *s, size_t l) const
+ {
+ if (Field *f= get_field(end_priv_columns + 1, MYSQL_TYPE_BLOB))
+ return f->store(s, l, &my_charset_latin1);
+ else
+ return 1;
+ }
+ const char* get_x509_issuer (MEM_ROOT *root) const
+ {
+ Field *f= get_field(end_priv_columns + 2, MYSQL_TYPE_BLOB);
+ return f ? ::get_field(root,f) : 0;
+ }
+ int set_x509_issuer (const char *s, size_t l) const
+ {
+ if (Field *f= get_field(end_priv_columns + 2, MYSQL_TYPE_BLOB))
+ return f->store(s, l, &my_charset_latin1);
+ else
+ return 1;
+ }
+ const char* get_x509_subject (MEM_ROOT *root) const
+ {
+ Field *f= get_field(end_priv_columns + 3, MYSQL_TYPE_BLOB);
+ return f ? ::get_field(root,f) : 0;
+ }
+ int set_x509_subject (const char *s, size_t l) const
+ {
+ if (Field *f= get_field(end_priv_columns + 3, MYSQL_TYPE_BLOB))
+ return f->store(s, l, &my_charset_latin1);
+ else
+ return 1;
+ }
+ longlong get_max_questions () const
+ {
+ Field *f= get_field(end_priv_columns + 4, MYSQL_TYPE_LONG);
+ return f ? f->val_int() : 0;
+ }
+ int set_max_questions (longlong x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 4, MYSQL_TYPE_LONG))
+ return f->store(x, 0);
+ else
+ return 1;
+ }
+ longlong get_max_updates () const
+ {
+ Field *f= get_field(end_priv_columns + 5, MYSQL_TYPE_LONG);
+ return f ? f->val_int() : 0;
+ }
+ int set_max_updates (longlong x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 5, MYSQL_TYPE_LONG))
+ return f->store(x, 0);
+ else
+ return 1;
+ }
+ longlong get_max_connections () const
+ {
+ Field *f= get_field(end_priv_columns + 6, MYSQL_TYPE_LONG);
+ return f ? f->val_int() : 0;
+ }
+ int set_max_connections (longlong x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 6, MYSQL_TYPE_LONG))
+ return f->store(x, 0);
+ else
+ return 1;
+ }
+ longlong get_max_user_connections () const
+ {
+ Field *f= get_field(end_priv_columns + 7, MYSQL_TYPE_LONG);
+ return f ? f->val_int() : 0;
+ }
+ int set_max_user_connections (longlong x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 7, MYSQL_TYPE_LONG))
+ return f->store(x, 0);
+ else
+ return 1;
+ }
+ double get_max_statement_time () const
+ {
+ Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_NEWDECIMAL);
+ return f ? f->val_real() : 0;
+ }
+ int set_max_statement_time (double x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_NEWDECIMAL))
+ return f->store(x);
+ else
+ return 1;
+ }
+ bool get_is_role () const
+ {
+ Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_ENUM);
+ return f ? f->val_int()-1 : 0;
+ }
+ int set_is_role (bool x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_ENUM))
+ return f->store(x+1, 0);
+ else
+ return 1;
+ }
+ const char* get_default_role (MEM_ROOT *root) const
+ {
+ Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_STRING);
+ return f ? ::get_field(root,f) : 0;
+ }
+ int set_default_role (const char *s, size_t l) const
+ {
+ if (Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_STRING))
+ return f->store(s, l, system_charset_info);
+ else
+ return 1;
+ }
+ /* On a MariaDB 10.3 user table, the account locking accessors will try to
+ get the content of the max_statement_time column, but they will fail due
+ to the typecheck in get_field. */
+ bool get_account_locked () const
+ {
+ Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_ENUM);
+ return f ? f->val_int()-1 : 0;
+ }
+ int set_account_locked (bool x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_ENUM))
+ return f->store(x+1, 0);
- void init(enum thr_lock_type lock_type)
+ return 1;
+ }
+
+ bool get_password_expired () const
{
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_USER_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, false);
+ uint field_num= end_priv_columns + 10;
+
+ Field *f= get_field(field_num, MYSQL_TYPE_ENUM);
+ return f ? f->val_int()-1 : 0;
}
+ int set_password_expired (bool x) const
+ {
+ uint field_num= end_priv_columns + 10;
+
+ if (Field *f= get_field(field_num, MYSQL_TYPE_ENUM))
+ return f->store(x+1, 0);
+ return 1;
+ }
+ my_time_t get_password_last_changed () const
+ {
+ ulong unused_dec;
+ if (Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_TIMESTAMP2))
+ return f->get_timestamp(&unused_dec);
+ return 0;
+ }
+ int set_password_last_changed (my_time_t x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_TIMESTAMP2))
+ {
+ f->set_notnull();
+ return f->store_timestamp(x, 0);
+ }
+ return 1;
+ }
+ longlong get_password_lifetime () const
+ {
+ if (Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_SHORT))
+ {
+ if (f->is_null())
+ return -1;
+ return f->val_int();
+ }
+ return 0;
+ }
+ int set_password_lifetime (longlong x) const
+ {
+ if (Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_SHORT))
+ {
+ if (x < 0)
+ {
+ f->set_null();
+ return 0;
+ }
+ f->set_notnull();
+ return f->store(x, 0);
+ }
+ return 1;
+ }
+
+ virtual ~User_table_tabular() {}
+ private:
+ friend class Grant_tables;
+
+ /* Only Grant_tables can instantiate this class. */
+ User_table_tabular() { min_columns= 13; /* As in 3.20.13 */ }
/* The user table is a bit different compared to the other Grant tables.
Usually, we only add columns to the grant tables when adding functionality.
@@ -984,183 +1267,544 @@ class User_table: public Grant_table_base
doesn't exist. This simplifies checking of table "version", as we don't
have to make use of num_fields() any more.
*/
- inline Field* get_field(uint field_num) const
+ inline Field* get_field(uint field_num, enum enum_field_types type) const
{
if (field_num >= num_fields())
return NULL;
+ Field *f= m_table->field[field_num];
+ return f->real_type() == type ? f : NULL;
+ }
+
+ int setup_sysvars() const
+ {
+ username_char_length= MY_MIN(m_table->field[1]->char_length(),
+ USERNAME_CHAR_LENGTH);
+ using_global_priv_table= false;
- return tl.table->field[field_num];
+ if (have_password()) // Password column might be missing. (MySQL 5.7.6+)
+ {
+ int password_length= password()->field_length /
+ password()->charset()->mbmaxlen;
+ if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
+ {
+ sql_print_error("Fatal error: mysql.user table is damaged or in "
+ "unsupported 3.20 format.");
+ return 1;
+ }
+
+ mysql_mutex_lock(&LOCK_global_system_variables);
+ if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH)
+ {
+ if (opt_secure_auth)
+ {
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ sql_print_error("Fatal error: mysql.user table is in old format, "
+ "but server started with --secure-auth option.");
+ return 1;
+ }
+ mysql_user_table_is_in_short_password_format= true;
+ if (global_system_variables.old_passwords)
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ else
+ {
+ extern sys_var *Sys_old_passwords_ptr;
+ Sys_old_passwords_ptr->value_origin= sys_var::AUTO;
+ global_system_variables.old_passwords= 1;
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ sql_print_warning("mysql.user table is not updated to new password format; "
+ "Disabling new password usage until "
+ "mysql_fix_privilege_tables is run");
+ }
+ m_table->in_use->variables.old_passwords= 1;
+ }
+ else
+ {
+ mysql_user_table_is_in_short_password_format= false;
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ }
+ }
+ return 0;
}
/* Normally password column is the third column in the table. If privileges
start on the third column instead, we are missing the password column.
This means we are using a MySQL 5.7.6+ data directory. */
- bool have_password() const { return start_privilege_column == 2; }
+ bool have_password() const { return start_priv_columns == 3; }
+
+ Field* password() const { return m_table->field[2]; }
+ Field* plugin() const { return get_field(end_priv_columns + 8, MYSQL_TYPE_STRING); }
+ Field* authstr() const { return get_field(end_priv_columns + 9, MYSQL_TYPE_BLOB); }
+};
+
+/*
+ MariaDB 10.4 and up `global_priv` table
+
+ TODO possible optimizations:
+ * update json in-place if the new value can fit
+ * don't repeat get_value for every key, but use a streaming parser
+ to convert json into in-memory object (ACL_USER?) in one json scan.
+ - this makes sense for acl_load(), but hardly for GRANT
+ * similarly, pack ACL_USER (?) into json in one go.
+ - doesn't make sense? GRANT rarely updates more than one field.
+*/
+class User_table_json: public User_table
+{
+ LEX_CSTRING& name() const { return MYSQL_TABLE_NAME[USER_TABLE]; }
+
+ int get_auth(THD *thd, MEM_ROOT *root, ACL_USER *u) const
+ {
+ size_t array_len;
+ const char *array;
+ int vl;
+ const char *v;
+
+ if (get_value("auth_or", JSV_ARRAY, &array, &array_len))
+ {
+ u->alloc_auth(root, 1);
+ return get_auth1(thd, root, u, 0);
+ }
+
+ if (json_get_array_item(array, array + array_len, (int)array_len,
+ &v, &vl) != JSV_NOTHING)
+ return 1;
+ u->alloc_auth(root, vl);
+ for (uint i=0; i < u->nauth; i++)
+ {
+ if (json_get_array_item(array, array + array_len, i, &v, &vl) != JSV_OBJECT)
+ return 1;
+
+ const char *p, *a;
+ int pl, al;
+ switch (json_get_object_key(v, v + vl, "plugin", &p, &pl)) {
+ case JSV_STRING: u->auth[i].plugin.str= strmake_root(root, p, pl);
+ u->auth[i].plugin.length= pl;
+ break;
+ case JSV_NOTHING: if (get_auth1(thd, root, u, i))
+ return 1;
+ else
+ continue;
+ default: return 1;
+ }
+ switch (json_get_object_key(v, v + vl, "authentication_string", &a, &al)) {
+ case JSV_NOTHING: u->auth[i].auth_string= empty_clex_str;
+ break;
+ case JSV_STRING: u->auth[i].auth_string.str= strmake_root(root, a, al);
+ u->auth[i].auth_string.length= al;
+ break;
+ default: return 1;
+ }
+ }
+ return 0;
+ }
+
+ int get_auth1(THD *thd, MEM_ROOT *root, ACL_USER *u, uint n) const
+ {
+ const char *authstr= get_str_value(root, "authentication_string");
+ const char *plugin= get_str_value(root, "plugin");
+ if (plugin && authstr)
+ {
+ if (plugin && *plugin)
+ {
+ u->auth[n].plugin.str= plugin;
+ u->auth[n].plugin.length= strlen(plugin);
+ }
+ else
+ u->auth[n].plugin= native_password_plugin_name;
+ u->auth[n].auth_string.str= authstr;
+ u->auth[n].auth_string.length= strlen(authstr);
+ return 0;
+ }
+ return 1;
+ }
+ bool append_str_value(String *to, const LEX_CSTRING &str) const
+ {
+ to->append('"');
+ to->reserve(str.length*2);
+ int len= json_escape(system_charset_info, (uchar*)str.str, (uchar*)str.str + str.length,
+ to->charset(), (uchar*)to->end(), (uchar*)to->end() + str.length*2);
+ if (len < 0)
+ return 1;
+ to->length(to->length() + len);
+ to->append('"');
+ return 0;
+ }
+
+ bool set_auth(const ACL_USER &u) const
+ {
+ size_t array_len;
+ const char *array;
+ if (u.nauth == 1 && get_value("auth_or", JSV_ARRAY, &array, &array_len))
+ return set_auth1(u, 0);
+
+ StringBuffer<JSON_SIZE> json(m_table->field[2]->charset());
+ bool top_done = false;
+ json.append('[');
+ for (uint i=0; i < u.nauth; i++)
+ {
+ ACL_USER::AUTH * const auth= u.auth + i;
+ if (i)
+ json.append(',');
+ json.append('{');
+ if (!top_done &&
+ (auth->plugin.str == native_password_plugin_name.str ||
+ auth->plugin.str == old_password_plugin_name.str ||
+ i == u.nauth - 1))
+ {
+ if (set_auth1(u, i))
+ return 1;
+ top_done= true;
+ }
+ else
+ {
+ json.append(STRING_WITH_LEN("\"plugin\":"));
+ if (append_str_value(&json, auth->plugin))
+ return 1;
+ if (auth->auth_string.length)
+ {
+ json.append(STRING_WITH_LEN(",\"authentication_string\":"));
+ if (append_str_value(&json, auth->auth_string))
+ return 1;
+ }
+ }
+ json.append('}');
+ }
+ json.append(']');
+ return set_value("auth_or", json.ptr(), json.length(), false) == JSV_BAD_JSON;
+ }
+ bool set_auth1(const ACL_USER &u, uint i) const
+ {
+ return set_str_value("plugin",
+ u.auth[i].plugin.str, u.auth[i].plugin.length) ||
+ set_str_value("authentication_string",
+ u.auth[i].auth_string.str, u.auth[i].auth_string.length);
+ }
+ ulong get_access() const
+ {
+ /*
+ when new privileges will be added, we'll start storing GLOBAL_ACLS
+ (or, for example, my_count_bits(GLOBAL_ACLS))
+ in the json too, and it'll allow us to do privilege upgrades
+ */
+ return get_int_value("access") & GLOBAL_ACLS;
+ }
+ void set_access(ulong rights, bool revoke) const
+ {
+ ulong access= get_access();
+ if (revoke)
+ access&= ~rights;
+ else
+ access|= rights;
+ set_int_value("access", access & GLOBAL_ACLS);
+ }
+ const char *unsafe_str(const char *s) const
+ { return s[0] ? s : NULL; }
+
+ SSL_type get_ssl_type () const
+ { return (SSL_type)get_int_value("ssl_type"); }
+ int set_ssl_type (SSL_type x) const
+ { return set_int_value("ssl_type", x); }
+ const char* get_ssl_cipher (MEM_ROOT *root) const
+ { return unsafe_str(get_str_value(root, "ssl_cipher")); }
+ int set_ssl_cipher (const char *s, size_t l) const
+ { return set_str_value("ssl_cipher", s, l); }
+ const char* get_x509_issuer (MEM_ROOT *root) const
+ { return unsafe_str(get_str_value(root, "x509_issuer")); }
+ int set_x509_issuer (const char *s, size_t l) const
+ { return set_str_value("x509_issuer", s, l); }
+ const char* get_x509_subject (MEM_ROOT *root) const
+ { return unsafe_str(get_str_value(root, "x509_subject")); }
+ int set_x509_subject (const char *s, size_t l) const
+ { return set_str_value("x509_subject", s, l); }
+ longlong get_max_questions () const
+ { return get_int_value("max_questions"); }
+ int set_max_questions (longlong x) const
+ { return set_int_value("max_questions", x); }
+ longlong get_max_updates () const
+ { return get_int_value("max_updates"); }
+ int set_max_updates (longlong x) const
+ { return set_int_value("max_updates", x); }
+ longlong get_max_connections () const
+ { return get_int_value("max_connections"); }
+ int set_max_connections (longlong x) const
+ { return set_int_value("max_connections", x); }
+ longlong get_max_user_connections () const
+ { return get_int_value("max_user_connections"); }
+ int set_max_user_connections (longlong x) const
+ { return set_int_value("max_user_connections", x); }
+ double get_max_statement_time () const
+ { return get_double_value("max_statement_time"); }
+ int set_max_statement_time (double x) const
+ { return set_double_value("max_statement_time", x); }
+ bool get_is_role () const
+ { return get_bool_value("is_role"); }
+ int set_is_role (bool x) const
+ { return set_bool_value("is_role", x); }
+ const char* get_default_role (MEM_ROOT *root) const
+ { return get_str_value(root, "default_role"); }
+ int set_default_role (const char *s, size_t l) const
+ { return set_str_value("default_role", s, l); }
+ bool get_account_locked () const
+ { return get_bool_value("account_locked"); }
+ int set_account_locked (bool x) const
+ { return set_bool_value("account_locked", x); }
+ my_time_t get_password_last_changed () const
+ { return static_cast<my_time_t>(get_int_value("password_last_changed")); }
+ int set_password_last_changed (my_time_t x) const
+ { return set_int_value("password_last_changed", static_cast<longlong>(x)); }
+ int set_password_lifetime (longlong x) const
+ { return set_int_value("password_lifetime", x); }
+ longlong get_password_lifetime () const
+ { return get_int_value("password_lifetime", -1); }
+ /*
+ password_last_changed=0 means the password is manually expired.
+ In MySQL 5.7+ this state is described using the password_expired column
+ in mysql.user
+ */
+ bool get_password_expired () const
+ { return get_int_value("password_last_changed", -1) == 0; }
+ int set_password_expired (bool x) const
+ { return x ? set_password_last_changed(0) : 0; }
+
+ ~User_table_json() {}
+ private:
+ friend class Grant_tables;
+ static const uint JSON_SIZE=1024;
+ int setup_sysvars() const
+ {
+ using_global_priv_table= true;
+ username_char_length= MY_MIN(m_table->field[1]->char_length(),
+ USERNAME_CHAR_LENGTH);
+ return 0;
+ }
+ bool get_value(const char *key,
+ enum json_types vt, const char **v, size_t *vl) const
+ {
+ enum json_types value_type;
+ int int_vl;
+ String str, *res= m_table->field[2]->val_str(&str);
+ if (!res ||
+ (value_type= json_get_object_key(res->ptr(), res->end(), key,
+ v, &int_vl)) == JSV_BAD_JSON)
+ return 1; // invalid
+ *vl= int_vl;
+ return value_type != vt;
+ }
+ const char *get_str_value(MEM_ROOT *root, const char *key) const
+ {
+ size_t value_len;
+ const char *value_start;
+ if (get_value(key, JSV_STRING, &value_start, &value_len))
+ return "";
+ char *ptr= (char*)alloca(value_len);
+ int len= json_unescape(m_table->field[2]->charset(),
+ (const uchar*)value_start,
+ (const uchar*)value_start + value_len,
+ system_charset_info,
+ (uchar*)ptr, (uchar*)ptr + value_len);
+ if (len < 0)
+ return NULL;
+ return strmake_root(root, ptr, len);
+ }
+ longlong get_int_value(const char *key, longlong def_val= 0) const
+ {
+ int err;
+ size_t value_len;
+ const char *value_start;
+ if (get_value(key, JSV_NUMBER, &value_start, &value_len))
+ return def_val;
+ const char *value_end= value_start + value_len;
+ return my_strtoll10(value_start, (char**)&value_end, &err);
+ }
+ double get_double_value(const char *key) const
+ {
+ int err;
+ size_t value_len;
+ const char *value_start;
+ if (get_value(key, JSV_NUMBER, &value_start, &value_len))
+ return 0;
+ const char *value_end= value_start + value_len;
+ return my_strtod(value_start, (char**)&value_end, &err);
+ }
+ bool get_bool_value(const char *key) const
+ {
+ size_t value_len;
+ const char *value_start;
+ if (get_value(key, JSV_TRUE, &value_start, &value_len))
+ return false;
+ return true;
+ }
+ enum json_types set_value(const char *key,
+ const char *val, size_t vlen, bool string) const
+ {
+ int value_len;
+ const char *value_start;
+ enum json_types value_type;
+ String str, *res= m_table->field[2]->val_str(&str);
+ if (!res || !res->length())
+ (res= &str)->set(STRING_WITH_LEN("{}"), m_table->field[2]->charset());
+ value_type= json_get_object_key(res->ptr(), res->end(), key,
+ &value_start, &value_len);
+ if (value_type == JSV_BAD_JSON)
+ return value_type; // invalid
+ StringBuffer<JSON_SIZE> json(res->charset());
+ json.copy(res->ptr(), value_start - res->ptr(), res->charset());
+ if (value_type == JSV_NOTHING)
+ {
+ if (value_len)
+ json.append(',');
+ json.append('"');
+ json.append(key);
+ json.append(STRING_WITH_LEN("\":"));
+ if (string)
+ json.append('"');
+ }
+ else
+ value_start+= value_len;
+ json.append(val, vlen);
+ if (!value_type && string)
+ json.append('"');
+ json.append(value_start, res->end() - value_start);
+ DBUG_ASSERT(json_valid(json.ptr(), json.length(), json.charset()));
+ m_table->field[2]->store(json.ptr(), json.length(), json.charset());
+ return value_type;
+ }
+ bool set_str_value(const char *key, const char *val, size_t vlen) const
+ {
+ char buf[JSON_SIZE];
+ int blen= json_escape(system_charset_info,
+ (const uchar*)val, (const uchar*)val + vlen,
+ m_table->field[2]->charset(),
+ (uchar*)buf, (uchar*)buf+sizeof(buf));
+ if (blen < 0)
+ return 1;
+ return set_value(key, buf, blen, true) == JSV_BAD_JSON;
+ }
+ bool set_int_value(const char *key, longlong val) const
+ {
+ char v[MY_INT64_NUM_DECIMAL_DIGITS+1];
+ size_t vlen= longlong10_to_str(val, v, -10) - v;
+ return set_value(key, v, vlen, false) == JSV_BAD_JSON;
+ }
+ bool set_double_value(const char *key, double val) const
+ {
+ char v[FLOATING_POINT_BUFFER+1];
+ size_t vlen= my_fcvt(val, TIME_SECOND_PART_DIGITS, v, NULL);
+ return set_value(key, v, vlen, false) == JSV_BAD_JSON;
+ }
+ bool set_bool_value(const char *key, bool val) const
+ {
+ return set_value(key, val ? "true" : "false", val ? 4 : 5, false) == JSV_BAD_JSON;
+ }
};
class Db_table: public Grant_table_base
{
public:
- Field* host() const { return tl.table->field[0]; }
- Field* db() const { return tl.table->field[1]; }
- Field* user() const { return tl.table->field[2]; }
+ Field* host() const { return m_table->field[0]; }
+ Field* db() const { return m_table->field[1]; }
+ Field* user() const { return m_table->field[2]; }
private:
friend class Grant_tables;
- Db_table() {};
-
- void init(enum thr_lock_type lock_type)
- {
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_DB_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, false);
- }
+ Db_table() { min_columns= 9; /* as in 3.20.13 */ }
};
class Tables_priv_table: public Grant_table_base
{
public:
- Field* host() const { return tl.table->field[0]; }
- Field* db() const { return tl.table->field[1]; }
- Field* user() const { return tl.table->field[2]; }
- Field* table_name() const { return tl.table->field[3]; }
- Field* grantor() const { return tl.table->field[4]; }
- Field* timestamp() const { return tl.table->field[5]; }
- Field* table_priv() const { return tl.table->field[6]; }
- Field* column_priv() const { return tl.table->field[7]; }
+ Field* host() const { return m_table->field[0]; }
+ Field* db() const { return m_table->field[1]; }
+ Field* user() const { return m_table->field[2]; }
+ Field* table_name() const { return m_table->field[3]; }
+ Field* grantor() const { return m_table->field[4]; }
+ Field* timestamp() const { return m_table->field[5]; }
+ Field* table_priv() const { return m_table->field[6]; }
+ Field* column_priv() const { return m_table->field[7]; }
private:
friend class Grant_tables;
- Tables_priv_table() {};
-
- void init(enum thr_lock_type lock_type, Grant_table_base *next_table= NULL)
- {
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- LEX_CSTRING MYSQL_TABLES_PRIV_NAME={STRING_WITH_LEN("tables_priv") };
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_TABLES_PRIV_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, false);
- }
+ Tables_priv_table() { min_columns= 8; /* as in 3.22.26a */ }
};
class Columns_priv_table: public Grant_table_base
{
public:
- Field* host() const { return tl.table->field[0]; }
- Field* db() const { return tl.table->field[1]; }
- Field* user() const { return tl.table->field[2]; }
- Field* table_name() const { return tl.table->field[3]; }
- Field* column_name() const { return tl.table->field[4]; }
- Field* timestamp() const { return tl.table->field[5]; }
- Field* column_priv() const { return tl.table->field[6]; }
+ Field* host() const { return m_table->field[0]; }
+ Field* db() const { return m_table->field[1]; }
+ Field* user() const { return m_table->field[2]; }
+ Field* table_name() const { return m_table->field[3]; }
+ Field* column_name() const { return m_table->field[4]; }
+ Field* timestamp() const { return m_table->field[5]; }
+ Field* column_priv() const { return m_table->field[6]; }
private:
friend class Grant_tables;
- Columns_priv_table() {};
-
- void init(enum thr_lock_type lock_type)
- {
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- LEX_CSTRING MYSQL_COLUMNS_PRIV_NAME={ STRING_WITH_LEN("columns_priv") };
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_COLUMNS_PRIV_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, false);
- }
+ Columns_priv_table() { min_columns= 7; /* as in 3.22.26a */ }
};
class Host_table: public Grant_table_base
{
public:
- Field* host() const { return tl.table->field[0]; }
- Field* db() const { return tl.table->field[1]; }
+ Field* host() const { return m_table->field[0]; }
+ Field* db() const { return m_table->field[1]; }
private:
friend class Grant_tables;
- Host_table() {}
-
- void init(enum thr_lock_type lock_type)
- {
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- LEX_CSTRING MYSQL_HOST_NAME={STRING_WITH_LEN("host") };
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_HOST_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, true);
- }
+ Host_table() { min_columns= 8; /* as in 3.20.13 */ }
};
class Procs_priv_table: public Grant_table_base
{
public:
- Field* host() const { return tl.table->field[0]; }
- Field* db() const { return tl.table->field[1]; }
- Field* user() const { return tl.table->field[2]; }
- Field* routine_name() const { return tl.table->field[3]; }
- Field* routine_type() const { return tl.table->field[4]; }
- Field* grantor() const { return tl.table->field[5]; }
- Field* proc_priv() const { return tl.table->field[6]; }
- Field* timestamp() const { return tl.table->field[7]; }
+ Field* host() const { return m_table->field[0]; }
+ Field* db() const { return m_table->field[1]; }
+ Field* user() const { return m_table->field[2]; }
+ Field* routine_name() const { return m_table->field[3]; }
+ Field* routine_type() const { return m_table->field[4]; }
+ Field* grantor() const { return m_table->field[5]; }
+ Field* proc_priv() const { return m_table->field[6]; }
+ Field* timestamp() const { return m_table->field[7]; }
private:
friend class Grant_tables;
- Procs_priv_table() {}
-
- void init(enum thr_lock_type lock_type)
- {
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- LEX_CSTRING MYSQL_PROCS_PRIV_NAME={STRING_WITH_LEN("procs_priv") };
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_PROCS_PRIV_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, true);
- }
+ Procs_priv_table() { min_columns=8; }
};
class Proxies_priv_table: public Grant_table_base
{
public:
- Field* host() const { return tl.table->field[0]; }
- Field* user() const { return tl.table->field[1]; }
- Field* proxied_host() const { return tl.table->field[2]; }
- Field* proxied_user() const { return tl.table->field[3]; }
- Field* with_grant() const { return tl.table->field[4]; }
- Field* grantor() const { return tl.table->field[5]; }
- Field* timestamp() const { return tl.table->field[6]; }
+ Field* host() const { return m_table->field[0]; }
+ Field* user() const { return m_table->field[1]; }
+ Field* proxied_host() const { return m_table->field[2]; }
+ Field* proxied_user() const { return m_table->field[3]; }
+ Field* with_grant() const { return m_table->field[4]; }
+ Field* grantor() const { return m_table->field[5]; }
+ Field* timestamp() const { return m_table->field[6]; }
private:
friend class Grant_tables;
- Proxies_priv_table() {}
-
- void init(enum thr_lock_type lock_type)
- {
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- LEX_CSTRING MYSQL_PROXIES_PRIV_NAME={STRING_WITH_LEN("proxies_priv") };
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_PROXIES_PRIV_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, true);
- }
+ Proxies_priv_table() { min_columns= 7; }
};
class Roles_mapping_table: public Grant_table_base
{
public:
- Field* host() const { return tl.table->field[0]; }
- Field* user() const { return tl.table->field[1]; }
- Field* role() const { return tl.table->field[2]; }
- Field* admin_option() const { return tl.table->field[3]; }
+ Field* host() const { return m_table->field[0]; }
+ Field* user() const { return m_table->field[1]; }
+ Field* role() const { return m_table->field[2]; }
+ Field* admin_option() const { return m_table->field[3]; }
private:
friend class Grant_tables;
- Roles_mapping_table() {}
-
- void init(enum thr_lock_type lock_type)
- {
- /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */
- LEX_CSTRING MYSQL_ROLES_MAPPING_NAME={STRING_WITH_LEN("roles_mapping") };
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_ROLES_MAPPING_NAME, NULL, lock_type);
- Grant_table_base::init(lock_type, true);
- }
+ Roles_mapping_table() { min_columns= 4; }
};
/**
@@ -1169,189 +1813,198 @@ class Roles_mapping_table: public Grant_table_base
class Grant_tables
{
public:
- /* When constructing the Grant_tables object, we initialize only
- the tables which are going to be opened.
- @param which_tables Bitmap of which tables to open.
- @param lock_type Lock type to use when opening tables.
- */
- Grant_tables(int which_tables, enum thr_lock_type lock_type)
- {
- DBUG_ENTER("Grant_tables::Grant_tables");
- DBUG_PRINT("info", ("which_tables: %x, lock_type: %u",
- which_tables, lock_type));
- DBUG_ASSERT(which_tables); /* At least one table must be opened. */
- Grant_table_base* prev= NULL;
- /* We start from the last table, Table_roles_mapping, such that
- the first one in the linked list is Table_user. */
- if (which_tables & Table_roles_mapping)
- {
- m_roles_mapping_table.init(lock_type);
- prev= &m_roles_mapping_table;
- }
- if (which_tables & Table_proxies_priv)
- {
- m_proxies_priv_table.init(lock_type);
- link_tables(&m_proxies_priv_table, prev);
- prev= &m_proxies_priv_table;
- }
- if (which_tables & Table_procs_priv)
- {
- m_procs_priv_table.init(lock_type);
- link_tables(&m_procs_priv_table, prev);
- prev= &m_procs_priv_table;
- }
- if (which_tables & Table_host)
- {
- m_host_table.init(lock_type);
- link_tables(&m_host_table, prev);
- prev= &m_host_table;
- }
- if (which_tables & Table_columns_priv)
- {
- m_columns_priv_table.init(lock_type);
- link_tables(&m_columns_priv_table, prev);
- prev= &m_columns_priv_table;
- }
- if (which_tables & Table_tables_priv)
- {
- m_tables_priv_table.init(lock_type);
- link_tables(&m_tables_priv_table, prev);
- prev= &m_tables_priv_table;
- }
- if (which_tables & Table_db)
- {
- m_db_table.init(lock_type);
- link_tables(&m_db_table, prev);
- prev= &m_db_table;
- }
- if (which_tables & Table_user)
- {
- m_user_table.init(lock_type);
- link_tables(&m_user_table, prev);
- prev= &m_user_table;
- }
+ Grant_tables() : p_user_table(&m_user_table_json) { }
- first_table_in_list= prev;
- DBUG_VOID_RETURN;
- }
-
- /* Before any operation is possible on grant tables, they must be opened.
- This opens the tables according to the lock type specified during
- construction.
+ /**
+ An auxiliary to build a list of involved tables.
- @retval 1 replication filters matched. Abort the operation,
- but return OK (!)
- @retval 0 tables were opened successfully
- @retval -1 error, tables could not be opened
- */
- int open_and_lock(THD *thd)
+ @retval 0 Success
+ @retval -1 A my_error reported error
+ */
+ int build_table_list(THD *thd, TABLE_LIST** ptr_first,
+ int which_tables, enum thr_lock_type lock_type,
+ TABLE_LIST *tables)
{
- DBUG_ENTER("Grant_tables::open_and_lock");
- DBUG_ASSERT(first_table_in_list);
-#ifdef HAVE_REPLICATION
- if (int ignore_ret= rpl_ignore_tables(thd))
- DBUG_RETURN(ignore_ret);
-#endif
- if (open_and_lock_tables(thd, &first_table_in_list->tl, FALSE,
- MYSQL_LOCK_IGNORE_TIMEOUT))
- DBUG_RETURN(-1);
+ DBUG_ENTER("Grant_tables::build_table_list");
+ DBUG_ASSERT(which_tables); /* At least one table must be opened. */
/*
We can read privilege tables even when !initialized.
This can be acl_load() - server startup or FLUSH PRIVILEGES
*/
- if (first_table_in_list->tl.lock_type >= TL_WRITE_ALLOW_WRITE &&
- !initialized)
+ if (lock_type >= TL_WRITE_ALLOW_WRITE && !initialized)
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables");
DBUG_RETURN(-1);
}
- /* The privilge columns vary based on MariaDB version. Figure out
- how many we have after we've opened the table. */
- m_user_table.compute_num_privilege_cols();
- m_db_table.compute_num_privilege_cols();
- m_tables_priv_table.compute_num_privilege_cols();
- m_columns_priv_table.compute_num_privilege_cols();
- m_host_table.compute_num_privilege_cols();
- m_procs_priv_table.compute_num_privilege_cols();
- m_proxies_priv_table.compute_num_privilege_cols();
- m_roles_mapping_table.compute_num_privilege_cols();
+ for (int i=USER_TABLE; i >=0; i--)
+ {
+ TABLE_LIST *tl= tables + i;
+ if (which_tables & (1 << i))
+ {
+ tl->init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_TABLE_NAME[i],
+ NULL, lock_type);
+ tl->open_type= OT_BASE_ONLY;
+ tl->i_s_requested_object= OPEN_TABLE_ONLY;
+ tl->updating= lock_type >= TL_WRITE_ALLOW_WRITE;
+ if (i >= FIRST_OPTIONAL_TABLE)
+ tl->open_strategy= TABLE_LIST::OPEN_IF_EXISTS;
+ tl->next_global= tl->next_local= *ptr_first;
+ *ptr_first= tl;
+ }
+ else
+ tl->table= NULL;
+ }
DBUG_RETURN(0);
}
-#ifdef HAVE_REPLICATION
- /* Checks if the tables targeted by a grant command should be ignored because
- of the configured replication filters
-
- @retval 1 Tables are excluded for replication
- @retval 0 tables are included for replication
- */
- int rpl_ignore_tables(THD *thd)
+ int open_and_lock(THD *thd, int which_tables, enum thr_lock_type lock_type)
{
- DBUG_ENTER("Grant_tables::rpl_ignore_tables");
- if (first_table_in_list->tl.lock_type >= TL_WRITE_ALLOW_WRITE &&
- thd->slave_thread && !thd->spcont)
+ DBUG_ENTER("Grant_tables::open_and_lock");
+
+ TABLE_LIST tables[USER_TABLE+1], *first= NULL;
+
+ if (build_table_list(thd, &first, which_tables, lock_type, tables))
+ DBUG_RETURN(-1);
+
+ uint counter;
+ int res= really_open(thd, first, &counter);
+
+ /* if User_table_json wasn't found, let's try User_table_tabular */
+ if (!res && (which_tables & Table_user) && !tables[USER_TABLE].table)
{
- /*
- GRANT and REVOKE are applied the slave in/exclusion rules as they are
- some kind of updates to the mysql.% tables.
- */
- Rpl_filter *rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter;
- if (rpl_filter->is_on() &&
- !rpl_filter->tables_ok(0, &first_table_in_list->tl))
+ uint unused;
+ TABLE_LIST *tl= tables + USER_TABLE;
+ TABLE *backup_open_tables= thd->open_tables;
+ thd->set_open_tables(NULL);
+
+ tl->init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_TABLE_NAME_USER,
+ NULL, lock_type);
+ tl->open_type= OT_BASE_ONLY;
+ tl->i_s_requested_object= OPEN_TABLE_ONLY;
+ tl->updating= lock_type >= TL_WRITE_ALLOW_WRITE;
+ p_user_table= &m_user_table_tabular;
+ counter++;
+ res= really_open(thd, tl, &unused);
+ thd->set_open_tables(backup_open_tables);
+ if (tables[USER_TABLE].table)
{
- thd->slave_expected_error= 0;
- DBUG_RETURN(1);
+ tables[USER_TABLE].table->next= backup_open_tables;
+ thd->set_open_tables(tables[USER_TABLE].table);
}
}
+ if (res)
+ DBUG_RETURN(res);
+
+ if (lock_tables(thd, first, counter, MYSQL_LOCK_IGNORE_TIMEOUT))
+ DBUG_RETURN(-1);
+
+ p_user_table->set_table(tables[USER_TABLE].table);
+ m_db_table.set_table(tables[DB_TABLE].table);
+ m_tables_priv_table.set_table(tables[TABLES_PRIV_TABLE].table);
+ m_columns_priv_table.set_table(tables[COLUMNS_PRIV_TABLE].table);
+ m_host_table.set_table(tables[HOST_TABLE].table);
+ m_procs_priv_table.set_table(tables[PROCS_PRIV_TABLE].table);
+ m_proxies_priv_table.set_table(tables[PROXIES_PRIV_TABLE].table);
+ m_roles_mapping_table.set_table(tables[ROLES_MAPPING_TABLE].table);
DBUG_RETURN(0);
}
-#endif
inline const User_table& user_table() const
- {
- return m_user_table;
- }
+ { return *p_user_table; }
inline const Db_table& db_table() const
- {
- return m_db_table;
- }
-
+ { return m_db_table; }
inline const Tables_priv_table& tables_priv_table() const
- {
- return m_tables_priv_table;
- }
+ { return m_tables_priv_table; }
inline const Columns_priv_table& columns_priv_table() const
- {
- return m_columns_priv_table;
- }
+ { return m_columns_priv_table; }
inline const Host_table& host_table() const
- {
- return m_host_table;
- }
+ { return m_host_table; }
inline const Procs_priv_table& procs_priv_table() const
- {
- return m_procs_priv_table;
- }
+ { return m_procs_priv_table; }
inline const Proxies_priv_table& proxies_priv_table() const
- {
- return m_proxies_priv_table;
- }
+ { return m_proxies_priv_table; }
inline const Roles_mapping_table& roles_mapping_table() const
+ { return m_roles_mapping_table; }
+
+#ifdef HAVE_REPLICATION
+ /**
+ Checks if the tables targeted by a grant command should be ignored because
+ of the configured replication filters
+
+ @retval 1 Tables are excluded for replication
+ @retval 0 tables are included for replication
+ */
+ int rpl_ignore_tables(THD *thd, TABLE_LIST* tables, int which_tables= 0,
+ enum thr_lock_type lock_type= TL_IGNORE)
{
- return m_roles_mapping_table;
+ DBUG_ENTER("Grant_tables::rpl_ignore_tables");
+
+ if (!(thd->slave_thread && !thd->spcont))
+ DBUG_RETURN(0);
+
+ TABLE_LIST all_tables[USER_TABLE+1];
+
+ if (!tables)
+ {
+ int rc __attribute__((unused))=
+ build_table_list(thd, &tables, which_tables, lock_type, all_tables);
+
+ DBUG_ASSERT(!rc); // Grant_tables must be already initialized
+ DBUG_ASSERT(tables);
+ }
+
+ if (tables->lock_type >= TL_WRITE_ALLOW_WRITE)
+ {
+ /*
+ GRANT and REVOKE are applied the slave in/exclusion rules as they are
+ some kind of updates to the mysql.% tables.
+ */
+ Rpl_filter *rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter;
+ if (rpl_filter->is_on() && !rpl_filter->tables_ok(0, tables))
+ {
+ thd->slave_expected_error= 0;
+ DBUG_RETURN(1);
+ }
+ }
+ DBUG_RETURN(0);
}
+#endif
private:
- User_table m_user_table;
+
+ /* Before any operation is possible on grant tables, they must be opened.
+
+ @retval 1 replication filters matched. Abort the operation,
+ but return OK (!)
+ @retval 0 tables were opened successfully
+ @retval -1 error, tables could not be opened
+ */
+ int really_open(THD *thd, TABLE_LIST* tables, uint *counter)
+ {
+ DBUG_ENTER("Grant_tables::really_open:");
+#ifdef HAVE_REPLICATION
+ if (rpl_ignore_tables(thd, tables))
+ {
+ DBUG_RETURN(1);
+ }
+#endif
+ if (open_tables(thd, &tables, counter, MYSQL_LOCK_IGNORE_TIMEOUT))
+ DBUG_RETURN(-1);
+ DBUG_RETURN(0);
+ }
+
+ User_table *p_user_table;
+ User_table_json m_user_table_json;
+ User_table_tabular m_user_table_tabular;
Db_table m_db_table;
Tables_priv_table m_tables_priv_table;
Columns_priv_table m_columns_priv_table;
@@ -1359,20 +2012,6 @@ class Grant_tables
Procs_priv_table m_procs_priv_table;
Proxies_priv_table m_proxies_priv_table;
Roles_mapping_table m_roles_mapping_table;
-
- /* The grant tables are set-up in a linked list. We keep the head of it. */
- Grant_table_base *first_table_in_list;
- /**
- Chain two grant tables' TABLE_LIST members.
- */
- static void link_tables(Grant_table_base *from, Grant_table_base *to)
- {
- DBUG_ASSERT(from);
- if (to)
- from->tl.next_local= from->tl.next_global= &to->tl;
- else
- from->tl.next_local= from->tl.next_global= NULL;
- }
};
@@ -1380,14 +2019,13 @@ void ACL_PROXY_USER::init(const Proxies_priv_table& proxies_priv_table,
MEM_ROOT *mem)
{
init(get_field(mem, proxies_priv_table.host()),
- get_field(mem, proxies_priv_table.user()),
+ safe_str(get_field(mem, proxies_priv_table.user())),
get_field(mem, proxies_priv_table.proxied_host()),
- get_field(mem, proxies_priv_table.proxied_user()),
+ safe_str(get_field(mem, proxies_priv_table.proxied_user())),
proxies_priv_table.with_grant()->val_int() != 0);
}
-
/*
Enumeration of various ACL's and Hashes used in handle_grant_struct()
*/
@@ -1407,13 +2045,10 @@ enum enum_acl_lists
ACL_ROLE::ACL_ROLE(ACL_USER *user, MEM_ROOT *root) : counter(0)
{
-
access= user->access;
/* set initial role access the same as the table row privileges */
initial_role_access= user->access;
- this->user.str= safe_strdup_root(root, user->user.str);
- this->user.length= user->user.length;
- bzero(&role_grants, sizeof(role_grants));
+ this->user= user->user;
bzero(&parent_grantee, sizeof(parent_grantee));
flags= IS_ROLE;
}
@@ -1424,7 +2059,6 @@ ACL_ROLE::ACL_ROLE(const char * rolename, ulong privileges, MEM_ROOT *root) :
this->access= initial_role_access;
this->user.str= safe_strdup_root(root, rolename);
this->user.length= strlen(rolename);
- bzero(&role_grants, sizeof(role_grants));
bzero(&parent_grantee, sizeof(parent_grantee));
flags= IS_ROLE;
}
@@ -1462,7 +2096,7 @@ static bool has_validation_plugins()
MariaDB_PASSWORD_VALIDATION_PLUGIN, NULL);
}
-struct validation_data { LEX_CSTRING *user, *password; };
+struct validation_data { const LEX_CSTRING *user, *password; };
static my_bool do_validate(THD *, plugin_ref plugin, void *arg)
{
@@ -1478,13 +2112,13 @@ static my_bool do_validate(THD *, plugin_ref plugin, void *arg)
}
-static bool validate_password(LEX_USER *user, THD *thd)
+static bool validate_password(THD *thd, const LEX_CSTRING &user,
+ const LEX_CSTRING &pwtext, bool has_hash)
{
- if (user->pwtext.length || !user->pwhash.length)
+ if (pwtext.length || !has_hash)
{
- struct validation_data data= { &user->user,
- user->pwtext.str ? &user->pwtext :
- const_cast<LEX_CSTRING *>(&empty_clex_str) };
+ struct validation_data data= { &user,
+ pwtext.str ? &pwtext : &empty_clex_str };
if (plugin_foreach(NULL, do_validate,
MariaDB_PASSWORD_VALIDATION_PLUGIN, &data))
{
@@ -1507,161 +2141,159 @@ static bool validate_password(LEX_USER *user, THD *thd)
return false;
}
-/**
- Convert scrambled password to binary form, according to scramble type,
- Binary form is stored in user.salt.
-
- @param acl_user The object where to store the salt
- @param password The password hash containing the salt
- @param password_len The length of the password hash
-
- Despite the name of the function it is used when loading ACLs from disk
- to store the password hash in the ACL_USER object.
-*/
-
-static void
-set_user_salt(ACL_USER *acl_user, const char *password, size_t password_len)
+static int set_user_salt(ACL_USER::AUTH *auth, plugin_ref plugin)
{
- if (password_len == SCRAMBLED_PASSWORD_CHAR_LENGTH)
- {
- get_salt_from_password(acl_user->salt, password);
- acl_user->salt_len= SCRAMBLE_LENGTH;
- }
- else if (password_len == SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
+ st_mysql_auth *info= (st_mysql_auth *) plugin_decl(plugin)->info;
+ if (info->interface_version >= 0x0202 && info->preprocess_hash &&
+ auth->auth_string.length)
{
- get_salt_from_password_323((ulong *) acl_user->salt, password);
- acl_user->salt_len= SCRAMBLE_LENGTH_323;
+ uchar buf[MAX_SCRAMBLE_LENGTH];
+ size_t len= sizeof(buf);
+ if (info->preprocess_hash(auth->auth_string.str,
+ auth->auth_string.length, buf, &len))
+ return 1;
+ auth->salt.str= (char*)memdup_root(&acl_memroot, buf, len);
+ auth->salt.length= len;
}
else
- acl_user->salt_len= 0;
-}
+ auth->salt= safe_lexcstrdup_root(&acl_memroot, auth->auth_string);
-static const char *fix_plugin_ptr(const char *name)
-{
- if (my_strcasecmp(system_charset_info, name,
- native_password_plugin_name.str) == 0)
- return native_password_plugin_name.str;
- else
- if (my_strcasecmp(system_charset_info, name,
- old_password_plugin_name.str) == 0)
- return old_password_plugin_name.str;
- else
- return name;
+ return 0;
}
/**
- Fix ACL::plugin pointer to point to a hard-coded string, if appropriate
-
- Make sure that if ACL_USER's plugin is a built-in, then it points
- to a hard coded string, not to an allocated copy. Run-time, for
- authentication, we want to be able to detect built-ins by comparing
- pointers, not strings.
-
- Additionally - update the salt if the plugin is built-in.
-
- @retval 0 the pointers were fixed
- @retval 1 this ACL_USER uses a not built-in plugin
-*/
-static bool fix_user_plugin_ptr(ACL_USER *user)
-{
- if (lex_string_eq(&user->plugin, &native_password_plugin_name))
- user->plugin= native_password_plugin_name;
- else
- if (lex_string_eq(&user->plugin, &old_password_plugin_name))
- user->plugin= old_password_plugin_name;
- else
- return true;
-
- set_user_salt(user, user->auth_string.str, user->auth_string.length);
- return false;
-}
+ Fills in ACL_USER::auth_string and ACL_USER::salt fields, as needed
+ hashes the plain-text password (if provided) to auth_string,
+ converts auth_string to salt.
-/*
- Validates the password, calculates password hash, transforms
- equivalent LEX_USER representations.
-
- Upon entering this function:
-
- - if user->plugin is specified, user->auth is the plugin auth data.
- - if user->plugin is mysql_native_password or mysql_old_password,
- user->auth is the password hash, and LEX_USER is transformed
- to match the next case (that is, user->plugin is cleared).
- - if user->plugin is NOT specified, built-in auth is assumed, that is
- mysql_native_password or mysql_old_password. In that case,
- user->pwhash is the password hash. And user->pwtext is the original
- plain-text password. Either one can be set or both.
-
- Upon exiting this function:
-
- - user->pwtext is left untouched
- - user->pwhash is the password hash, as the mysql.user.password column
- - user->plugin is the plugin name, as the mysql.user.plugin column
- - user->auth is the plugin auth data, as the mysql.user.authentication_string column
+ Fails if the plain-text password fails validation, if the plugin is
+ not loaded, if the auth_string is invalid, if the password is not applicable
*/
-static bool fix_lex_user(THD *thd, LEX_USER *user)
+static int set_user_auth(THD *thd, const LEX_CSTRING &user,
+ ACL_USER::AUTH *auth, const LEX_CSTRING &pwtext)
{
- size_t check_length;
+ const char *plugin_name= auth->plugin.str;
+ bool unlock_plugin= false;
+ plugin_ref plugin= get_auth_plugin(thd, auth->plugin, &unlock_plugin);
+ int res= 1;
- DBUG_ASSERT(user->plugin.length || !user->auth.length);
- DBUG_ASSERT(!(user->plugin.length && (user->pwtext.length || user->pwhash.length)));
+ if (!plugin)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_PLUGIN_IS_NOT_LOADED,
+ ER_THD(thd, ER_PLUGIN_IS_NOT_LOADED), plugin_name);
+ return ER_PLUGIN_IS_NOT_LOADED;
+ }
- if (lex_string_eq(&user->plugin, &native_password_plugin_name))
- check_length= SCRAMBLED_PASSWORD_CHAR_LENGTH;
- else
- if (lex_string_eq(&user->plugin, &old_password_plugin_name))
- check_length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
- else
- if (user->plugin.length)
- return false; // nothing else to do
- else if (thd->variables.old_passwords == 1 ||
- user->pwhash.length == SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
- check_length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
- else
- check_length= SCRAMBLED_PASSWORD_CHAR_LENGTH;
+ auth->salt= auth->auth_string;
- if (user->plugin.length)
+ st_mysql_auth *info= (st_mysql_auth *) plugin_decl(plugin)->info;
+ if (info->interface_version < 0x0202)
{
- user->pwhash= user->auth;
- user->plugin= empty_clex_str;
- user->auth= empty_clex_str;
+ res= pwtext.length ? ER_SET_PASSWORD_AUTH_PLUGIN : 0;
+ goto end;
}
- if (user->pwhash.length && user->pwhash.length != check_length)
+ if (thd->lex->sql_command == SQLCOM_SET_OPTION && !info->hash_password)
{
- my_error(ER_PASSWD_LENGTH, MYF(0), (int) check_length);
- return true;
+ res= ER_SET_PASSWORD_AUTH_PLUGIN;
+ goto end;
}
- if (user->pwtext.length && !user->pwhash.length)
+ if (info->hash_password &&
+ validate_password(thd, user, pwtext, auth->auth_string.length))
{
- size_t scramble_length;
- void (*make_scramble)(char *, const char *, size_t);
-
- if (thd->variables.old_passwords == 1)
+ res= ER_NOT_VALID_PASSWORD;
+ goto end;
+ }
+ if (pwtext.length)
+ {
+ if (info->hash_password)
{
- scramble_length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
- make_scramble= my_make_scrambled_password_323;
+ char buf[MAX_SCRAMBLE_LENGTH];
+ size_t len= sizeof(buf) - 1;
+ if (info->hash_password(pwtext.str, pwtext.length, buf, &len))
+ {
+ res= ER_OUTOFMEMORY;
+ goto end;
+ }
+ buf[len] = 0;
+ auth->auth_string.str= (char*)memdup_root(&acl_memroot, buf, len+1);
+ auth->auth_string.length= len;
}
else
{
- scramble_length= SCRAMBLED_PASSWORD_CHAR_LENGTH;
- make_scramble= my_make_scrambled_password;
+ res= ER_SET_PASSWORD_AUTH_PLUGIN;
+ goto end;
}
+ }
+ if (set_user_salt(auth, plugin))
+ {
+ res= ER_PASSWD_LENGTH;
+ goto end;
+ }
+
+ res= 0;
+end:
+ if (unlock_plugin)
+ plugin_unlock(thd, plugin);
+ return res;
+}
- Query_arena *arena, backup;
- arena= thd->activate_stmt_arena_if_needed(&backup);
- char *buff= (char *) thd->alloc(scramble_length + 1);
- if (arena)
- thd->restore_active_arena(arena, &backup);
- if (buff == NULL)
- return true;
- make_scramble(buff, user->pwtext.str, user->pwtext.length);
- user->pwhash.str= buff;
- user->pwhash.length= scramble_length;
+/**
+ Lazily computes user's salt from the password hash
+*/
+static bool set_user_salt_if_needed(ACL_USER *user_copy, int curr_auth,
+ plugin_ref plugin)
+{
+ ACL_USER::AUTH *auth_copy= user_copy->auth + curr_auth;
+ DBUG_ASSERT(!strcasecmp(auth_copy->plugin.str, plugin_name(plugin)->str));
+
+ if (auth_copy->salt.str)
+ return 0; // already done
+
+ if (set_user_salt(auth_copy, plugin))
+ return 1;
+
+ mysql_mutex_lock(&acl_cache->lock);
+ ACL_USER *user= find_user_exact(user_copy->host.hostname, user_copy->user.str);
+ // make sure the user wasn't altered or dropped meanwhile
+ if (user)
+ {
+ ACL_USER::AUTH *auth= user->auth + curr_auth;
+ if (!auth->salt.str && auth->plugin.length == auth_copy->plugin.length &&
+ auth->auth_string.length == auth_copy->auth_string.length &&
+ !memcmp(auth->plugin.str, auth_copy->plugin.str, auth->plugin.length) &&
+ !memcmp(auth->auth_string.str, auth_copy->auth_string.str, auth->auth_string.length))
+ auth->salt= auth_copy->salt;
}
+ mysql_mutex_unlock(&acl_cache->lock);
+ return 0;
+}
+
+/**
+ Fix ACL::plugin pointer to point to a hard-coded string, if appropriate
+
+ Make sure that if ACL_USER's plugin is a built-in, then it points
+ to a hard coded string, not to an allocated copy. Run-time, for
+ authentication, we want to be able to detect built-ins by comparing
+ pointers, not strings.
+
+ @retval 0 the pointers were fixed
+ @retval 1 this ACL_USER uses a not built-in plugin
+*/
+static bool fix_user_plugin_ptr(ACL_USER::AUTH *auth)
+{
+ if (lex_string_eq(&auth->plugin, &native_password_plugin_name))
+ auth->plugin= native_password_plugin_name;
+ else
+ if (lex_string_eq(&auth->plugin, &old_password_plugin_name))
+ auth->plugin= old_password_plugin_name;
+ else
+ return true;
return false;
}
@@ -1738,27 +2370,12 @@ bool acl_init(bool dont_read_acl_tables)
DBUG_RETURN(return_val);
}
-/**
- Choose from either native or old password plugins when assigning a password
-*/
-
-static bool set_user_plugin (ACL_USER *user, size_t password_len)
+static void push_new_user(const ACL_USER &user)
{
- switch (password_len)
- {
- case 0: /* no password */
- case SCRAMBLED_PASSWORD_CHAR_LENGTH:
- user->plugin= native_password_plugin_name;
- return FALSE;
- case SCRAMBLED_PASSWORD_CHAR_LENGTH_323:
- user->plugin= old_password_plugin_name;
- return FALSE;
- default:
- sql_print_warning("Found invalid password for user: '%s@%s'; "
- "Ignoring user", safe_str(user->user.str),
- safe_str(user->host.hostname));
- return TRUE;
- }
+ push_dynamic(&acl_users, &user);
+ if (!user.host.hostname ||
+ (user.host.hostname[0] == wild_many && !user.host.hostname[1]))
+ allow_all_hosts=1; // Anyone can connect
}
@@ -1783,7 +2400,6 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
READ_RECORD read_record_info;
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
char tmp_name[SAFE_NAME_LEN+1];
- int password_length;
Sql_mode_save old_mode_save(thd);
DBUG_ENTER("acl_load");
@@ -1795,7 +2411,7 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
init_sql_alloc(&acl_memroot, "ACL", ACL_ALLOC_BLOCK_SIZE, 0, MYF(0));
if (host_table.table_exists()) // "host" table may not exist (e.g. in MySQL 5.6.7+)
{
- if (host_table.init_read_record(&read_record_info, thd))
+ if (host_table.init_read_record(&read_record_info))
DBUG_RETURN(true);
while (!(read_record_info.read_record()))
{
@@ -1824,7 +2440,7 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
}
host.access= host_table.get_access();
host.access= fix_rights_for_db(host.access);
- host.sort= get_sort(2, host.host.hostname, host.db);
+ host.sort= get_magic_sort("hd", host.host.hostname, host.db);
if (check_no_resolve && hostname_requires_resolving(host.host.hostname))
{
sql_print_warning("'host' entry '%s|%s' "
@@ -1849,252 +2465,100 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
freeze_size(&acl_hosts);
const User_table& user_table= tables.user_table();
- if (user_table.init_read_record(&read_record_info, thd))
+ if (user_table.init_read_record(&read_record_info))
DBUG_RETURN(true);
- if (user_table.num_fields() < 13) // number of columns in 3.21
- {
- sql_print_error("Fatal error: mysql.user table is damaged or in "
- "unsupported 3.20 format.");
- DBUG_RETURN(true);
- }
- username_char_length= MY_MIN(user_table.user()->char_length(),
- USERNAME_CHAR_LENGTH);
- if (user_table.password()) // Password column might be missing. (MySQL 5.7.6+)
- {
- password_length= user_table.password()->field_length /
- user_table.password()->charset()->mbmaxlen;
- if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
- {
- sql_print_error("Fatal error: mysql.user table is damaged or in "
- "unsupported 3.20 format.");
- DBUG_RETURN(TRUE);
- }
-
- DBUG_PRINT("info",("user table fields: %d, password length: %d",
- user_table.num_fields(), password_length));
-
- mysql_mutex_lock(&LOCK_global_system_variables);
- if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH)
- {
- if (opt_secure_auth)
- {
- mysql_mutex_unlock(&LOCK_global_system_variables);
- sql_print_error("Fatal error: mysql.user table is in old format, "
- "but server started with --secure-auth option.");
- DBUG_RETURN(TRUE);
- }
- mysql_user_table_is_in_short_password_format= true;
- if (global_system_variables.old_passwords)
- mysql_mutex_unlock(&LOCK_global_system_variables);
- else
- {
- extern sys_var *Sys_old_passwords_ptr;
- Sys_old_passwords_ptr->value_origin= sys_var::AUTO;
- global_system_variables.old_passwords= 1;
- mysql_mutex_unlock(&LOCK_global_system_variables);
- sql_print_warning("mysql.user table is not updated to new password format; "
- "Disabling new password usage until "
- "mysql_fix_privilege_tables is run");
- }
- thd->variables.old_passwords= 1;
- }
- else
- {
- mysql_user_table_is_in_short_password_format= false;
- mysql_mutex_unlock(&LOCK_global_system_variables);
- }
- }
-
allow_all_hosts=0;
while (!(read_record_info.read_record()))
{
ACL_USER user;
bool is_role= FALSE;
- bzero(&user, sizeof(user));
- update_hostname(&user.host, get_field(&acl_memroot, user_table.host()));
- char *username= get_field(&acl_memroot, user_table.user());
+ update_hostname(&user.host, user_table.get_host(&acl_memroot));
+ char *username= safe_str(user_table.get_user(&acl_memroot));
user.user.str= username;
- user.user.length= safe_strlen(username);
+ user.user.length= strlen(username);
- /*
- If the user entry is a role, skip password and hostname checks
- A user can not log in with a role so some checks are not necessary
- */
- is_role= user_table.check_is_role();
+ is_role= user_table.get_is_role();
- if (is_role && is_invalid_role_name(username))
- {
- thd->clear_error(); // the warning is still issued
- continue;
- }
+ user.access= user_table.get_access();
- if (!is_role && check_no_resolve &&
- hostname_requires_resolving(user.host.hostname))
- {
- sql_print_warning("'user' entry '%s@%s' "
- "ignored in --skip-name-resolve mode.",
- safe_str(user.user.str),
- safe_str(user.host.hostname));
- continue;
- }
+ user.sort= get_magic_sort("hu", user.host.hostname, user.user.str);
+ user.hostname_length= safe_strlen(user.host.hostname);
- char *password= const_cast<char*>("");
- if (user_table.password())
- password= get_field(&acl_memroot, user_table.password());
- size_t password_len= safe_strlen(password);
- user.auth_string.str= safe_str(password);
- user.auth_string.length= password_len;
- set_user_salt(&user, password, password_len);
+ my_init_dynamic_array(&user.role_grants, sizeof(ACL_ROLE *), 0, 8, MYF(0));
- if (!is_role && set_user_plugin(&user, password_len))
- continue;
+ user.account_locked= user_table.get_account_locked();
- {
- user.access= user_table.get_access();
- user.sort= get_sort(2, user.host.hostname, user.user.str);
- user.hostname_length= safe_strlen(user.host.hostname);
- user.user_resource.user_conn= 0;
- user.user_resource.max_statement_time= 0.0;
+ user.password_expired= user_table.get_password_expired();
+ user.password_last_changed= user_table.get_password_last_changed();
+ user.password_lifetime= user_table.get_password_lifetime();
- /* Starting from 4.0.2 we have more fields */
- if (user_table.ssl_type())
- {
- char *ssl_type=get_field(thd->mem_root, user_table.ssl_type());
- if (!ssl_type)
- user.ssl_type=SSL_TYPE_NONE;
- else if (!strcmp(ssl_type, "ANY"))
- user.ssl_type=SSL_TYPE_ANY;
- else if (!strcmp(ssl_type, "X509"))
- user.ssl_type=SSL_TYPE_X509;
- else /* !strcmp(ssl_type, "SPECIFIED") */
- user.ssl_type=SSL_TYPE_SPECIFIED;
-
- user.ssl_cipher= get_field(&acl_memroot, user_table.ssl_cipher());
- user.x509_issuer= get_field(&acl_memroot, user_table.x509_issuer());
- user.x509_subject= get_field(&acl_memroot, user_table.x509_subject());
-
- char *ptr = get_field(thd->mem_root, user_table.max_questions());
- user.user_resource.questions=ptr ? atoi(ptr) : 0;
- ptr = get_field(thd->mem_root, user_table.max_updates());
- user.user_resource.updates=ptr ? atoi(ptr) : 0;
- ptr = get_field(thd->mem_root, user_table.max_connections());
- user.user_resource.conn_per_hour= ptr ? atoi(ptr) : 0;
- if (user.user_resource.questions || user.user_resource.updates ||
- user.user_resource.conn_per_hour)
- mqh_used=1;
-
- if (user_table.max_user_connections())
- {
- /* Starting from 5.0.3 we have max_user_connections field */
- ptr= get_field(thd->mem_root, user_table.max_user_connections());
- user.user_resource.user_conn= ptr ? atoi(ptr) : 0;
- }
-
- if (!is_role && user_table.plugin())
- {
- /* We may have plugin & auth_String fields */
- char *tmpstr= get_field(&acl_memroot, user_table.plugin());
- if (tmpstr)
- {
- user.plugin.str= tmpstr;
- user.plugin.length= strlen(user.plugin.str);
- user.auth_string.str=
- safe_str(get_field(&acl_memroot,
- user_table.authentication_string()));
- user.auth_string.length= strlen(user.auth_string.str);
-
- if (user.auth_string.length && password_len &&
- (user.auth_string.length != password_len ||
- memcmp(user.auth_string.str, password, password_len)))
- {
- sql_print_warning("'user' entry '%s@%s' has both a password "
- "and an authentication plugin specified. The "
- "password will be ignored.",
- safe_str(user.user.str),
- safe_str(user.host.hostname));
- }
- else if (password_len)
- {
- user.auth_string.str= password;
- user.auth_string.length= password_len;
- }
-
- fix_user_plugin_ptr(&user);
- }
- }
-
- if (user_table.max_statement_time())
- {
- /* Starting from 10.1.1 we can have max_statement_time */
- ptr= get_field(thd->mem_root,
- user_table.max_statement_time());
- user.user_resource.max_statement_time= ptr ? atof(ptr) : 0.0;
- }
- }
- else
+ if (is_role)
+ {
+ if (is_invalid_role_name(username))
{
- user.ssl_type=SSL_TYPE_NONE;
-#ifndef TO_BE_REMOVED
- if (user_table.num_fields() <= 13)
- { // Without grant
- if (user.access & CREATE_ACL)
- user.access|=REFERENCES_ACL | INDEX_ACL | ALTER_ACL;
- }
- /* Convert old privileges */
- user.access|= LOCK_TABLES_ACL | CREATE_TMP_ACL | SHOW_DB_ACL;
- if (user.access & FILE_ACL)
- user.access|= REPL_CLIENT_ACL | REPL_SLAVE_ACL;
- if (user.access & PROCESS_ACL)
- user.access|= SUPER_ACL | EXECUTE_ACL;
-#endif
+ thd->clear_error(); // the warning is still issued
+ continue;
}
- (void) my_init_dynamic_array(&user.role_grants,sizeof(ACL_ROLE *),
- 8, 8, MYF(0));
+ ACL_ROLE *entry= new (&acl_memroot) ACL_ROLE(&user, &acl_memroot);
+ entry->role_grants = user.role_grants;
+ my_init_dynamic_array(&entry->parent_grantee,
+ sizeof(ACL_USER_BASE *), 0, 8, MYF(0));
+ my_hash_insert(&acl_roles, (uchar *)entry);
- /* check default role, if any */
- if (!is_role && user_table.default_role())
+ continue;
+ }
+ else
+ {
+ if (check_no_resolve && hostname_requires_resolving(user.host.hostname))
{
- user.default_rolename.str=
- get_field(&acl_memroot, user_table.default_role());
- user.default_rolename.length= safe_strlen(user.default_rolename.str);
+ sql_print_warning("'user' entry '%s@%s' "
+ "ignored in --skip-name-resolve mode.", user.user.str,
+ safe_str(user.host.hostname));
+ continue;
}
- if (is_role)
- {
- DBUG_PRINT("info", ("Found role %s", user.user.str));
- ACL_ROLE *entry= new (&acl_memroot) ACL_ROLE(&user, &acl_memroot);
- entry->role_grants = user.role_grants;
- (void) my_init_dynamic_array(&entry->parent_grantee,
- sizeof(ACL_USER_BASE *), 8, 8, MYF(0));
- my_hash_insert(&acl_roles, (uchar *)entry);
-
+ if (user_table.get_auth(thd, &acl_memroot, &user))
continue;
- }
- else
+ for (uint i= 0; i < user.nauth; i++)
{
- DBUG_PRINT("info", ("Found user %s", user.user.str));
- (void) push_dynamic(&acl_users,(uchar*) &user);
+ ACL_USER::AUTH *auth= user.auth + i;
+ auth->salt= null_clex_str;
+ fix_user_plugin_ptr(auth);
}
- if (!user.host.hostname ||
- (user.host.hostname[0] == wild_many && !user.host.hostname[1]))
- allow_all_hosts=1; // Anyone can connect
+
+ user.ssl_type= user_table.get_ssl_type();
+ user.ssl_cipher= user_table.get_ssl_cipher(&acl_memroot);
+ user.x509_issuer= safe_str(user_table.get_x509_issuer(&acl_memroot));
+ user.x509_subject= safe_str(user_table.get_x509_subject(&acl_memroot));
+ user.user_resource.questions= (uint)user_table.get_max_questions();
+ user.user_resource.updates= (uint)user_table.get_max_updates();
+ user.user_resource.conn_per_hour= (uint)user_table.get_max_connections();
+ if (user.user_resource.questions || user.user_resource.updates ||
+ user.user_resource.conn_per_hour)
+ mqh_used=1;
+
+ user.user_resource.user_conn= (int)user_table.get_max_user_connections();
+ user.user_resource.max_statement_time= user_table.get_max_statement_time();
+
+ user.default_rolename.str= user_table.get_default_role(&acl_memroot);
+ user.default_rolename.length= safe_strlen(user.default_rolename.str);
}
+ push_new_user(user);
}
- my_qsort((uchar*) dynamic_element(&acl_users,0,ACL_USER*),acl_users.elements,
- sizeof(ACL_USER),(qsort_cmp) acl_compare);
+ rebuild_acl_users();
end_read_record(&read_record_info);
freeze_size(&acl_users);
const Db_table& db_table= tables.db_table();
- if (db_table.init_read_record(&read_record_info, thd))
+ if (db_table.init_read_record(&read_record_info))
DBUG_RETURN(TRUE);
while (!(read_record_info.read_record()))
{
ACL_DB db;
char *db_name;
- db.user=get_field(&acl_memroot, db_table.user());
+ db.user=safe_str(get_field(&acl_memroot, db_table.user()));
const char *hostname= get_field(&acl_memroot, db_table.host());
if (!hostname && find_acl_role(db.user))
hostname= "";
@@ -2109,7 +2573,7 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
{
sql_print_warning("'db' entry '%s %s@%s' "
"ignored in --skip-name-resolve mode.",
- db.db, safe_str(db.user), safe_str(db.host.hostname));
+ db.db, db.user, safe_str(db.host.hostname));
continue;
}
db.access= db_table.get_access();
@@ -2134,10 +2598,10 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
"case that has been forced to lowercase because "
"lower_case_table_names is set. It will not be "
"possible to remove this privilege using REVOKE.",
- db.db, safe_str(db.user), safe_str(db.host.hostname));
+ db.db, db.user, safe_str(db.host.hostname));
}
}
- db.sort=get_sort(3,db.host.hostname,db.db,db.user);
+ db.sort=get_magic_sort("hdu", db.host.hostname, db.db, db.user);
#ifndef TO_BE_REMOVED
if (db_table.num_fields() <= 9)
{ // Without grant
@@ -2148,13 +2612,13 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
acl_dbs.push(db);
}
end_read_record(&read_record_info);
- acl_dbs.sort((acl_dbs_cmp)acl_compare);
+ rebuild_acl_dbs();
acl_dbs.freeze();
const Proxies_priv_table& proxies_priv_table= tables.proxies_priv_table();
if (proxies_priv_table.table_exists())
{
- if (proxies_priv_table.init_read_record(&read_record_info, thd))
+ if (proxies_priv_table.init_read_record(&read_record_info))
DBUG_RETURN(TRUE);
while (!(read_record_info.read_record()))
{
@@ -2180,7 +2644,7 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
const Roles_mapping_table& roles_mapping_table= tables.roles_mapping_table();
if (roles_mapping_table.table_exists())
{
- if (roles_mapping_table.init_read_record(&read_record_info, thd))
+ if (roles_mapping_table.init_read_record(&read_record_info))
DBUG_RETURN(TRUE);
MEM_ROOT temp_root;
@@ -2217,6 +2681,7 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
init_check_host();
+ thd->bootstrap= !initialized; // keep FLUSH PRIVILEGES connection special
initialized=1;
DBUG_RETURN(FALSE);
}
@@ -2273,13 +2738,14 @@ bool acl_reload(THD *thd)
int result;
DBUG_ENTER("acl_reload");
- Grant_tables tables(Table_host | Table_user | Table_db | Table_proxies_priv |
- Table_roles_mapping, TL_READ);
+ Grant_tables tables;
/*
To avoid deadlocks we should obtain table locks before
obtaining acl_cache->lock mutex.
*/
- if (unlikely((result= tables.open_and_lock(thd))))
+ const uint tables_to_open= Table_host | Table_user | Table_db |
+ Table_proxies_priv | Table_roles_mapping;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_READ)))
{
DBUG_ASSERT(result <= 0);
/*
@@ -2383,56 +2849,161 @@ static ulong get_access(TABLE *form, uint fieldnr, uint *next_field)
}
+static int acl_compare(const ACL_ACCESS *a, const ACL_ACCESS *b)
+{
+ if (a->sort > b->sort)
+ return -1;
+ if (a->sort < b->sort)
+ return 1;
+ return 0;
+}
+
+static int acl_user_compare(const ACL_USER *a, const ACL_USER *b)
+{
+ int res= strcmp(a->user.str, b->user.str);
+ if (res)
+ return res;
+
+ res= acl_compare(a, b);
+ if (res)
+ return res;
+
+ /*
+ For more deterministic results, resolve ambiguity between
+ "localhost" and "127.0.0.1"/"::1" by sorting "localhost" before
+ loopback addresses.
+ Test suite (on Windows) expects "root@localhost", even if
+ root@::1 would also match.
+ */
+ return -strcmp(a->host.hostname, b->host.hostname);
+}
+
+static int acl_db_compare(const ACL_DB *a, const ACL_DB *b)
+{
+ int res= strcmp(a->user, b->user);
+ if (res)
+ return res;
+
+ return acl_compare(a, b);
+}
+
+static void rebuild_acl_users()
+{
+ my_qsort((uchar*)dynamic_element(&acl_users, 0, ACL_USER*), acl_users.elements,
+ sizeof(ACL_USER), (qsort_cmp)acl_user_compare);
+}
+
+static void rebuild_acl_dbs()
+{
+ acl_dbs.sort(acl_db_compare);
+}
+
+
/*
- Return a number which, if sorted 'desc', puts strings in this order:
- no wildcards
- wildcards
- empty string
+ Return index of the first entry with given user in the array,
+ or SIZE_T_MAX if not found.
+
+ Assumes the array is sorted by get_username
*/
+template<typename T> size_t find_first_user(T* arr, size_t len, const char *user)
+{
+ size_t low= 0;
+ size_t high= len;
+ size_t mid;
+
+ bool found= false;
+ if(!len)
+ return SIZE_T_MAX;
-static ulong get_sort(uint count,...)
+#ifndef DBUG_OFF
+ for (uint i = 0; i < len - 1; i++)
+ DBUG_ASSERT(strcmp(arr[i].get_username(), arr[i + 1].get_username()) <= 0);
+#endif
+ while (low < high)
+ {
+ mid= low + (high - low) / 2;
+ int cmp= strcmp(arr[mid].get_username(),user);
+ if (cmp == 0)
+ found= true;
+
+ if (cmp >= 0 )
+ high= mid;
+ else
+ low= mid + 1;
+ }
+ return (!found || low == len || strcmp(arr[low].get_username(), user)!=0 )?SIZE_T_MAX:low;
+}
+
+static size_t acl_find_user_by_name(const char *user)
+{
+ return find_first_user<ACL_USER>((ACL_USER *)acl_users.buffer,acl_users.elements,user);
+}
+
+static size_t acl_find_db_by_username(const char *user)
{
- va_list args;
- va_start(args,count);
- ulong sort=0;
+ return find_first_user<ACL_DB>(acl_dbs.front(), acl_dbs.elements(), user);
+}
+
+static bool match_db(ACL_DB *acl_db, const char *db, my_bool db_is_pattern)
+{
+ return !acl_db->db || (db && !wild_compare(db, acl_db->db, db_is_pattern));
+}
- /* Should not use this function with more than 4 arguments for compare. */
- DBUG_ASSERT(count <= 4);
- while (count--)
+/*
+ Lookup in the acl_users or acl_dbs for the best matching entry corresponding to
+ given user, host and ip parameters (also db, in case of ACL_DB)
+
+ Historical note:
+
+ In the past, both arrays were sorted just by ACL_ENTRY::sort field and were
+ searched linearly, until the first match of (username,host) pair was found.
+
+ This function uses optimizations (binary search by username), yet preserves the
+ historical behavior, i.e the returns a match with highest ACL_ENTRY::sort.
+*/
+template <typename T> T* find_by_username_or_anon(T* arr, size_t len, const char *user,
+ const char *host, const char *ip,
+ const char *db, my_bool db_is_pattern, bool (*match_db_func)(T*,const char *,my_bool))
+{
+ size_t i;
+ T *ret = NULL;
+
+ // Check entries matching user name.
+ size_t start = find_first_user(arr, len, user);
+ for (i= start; i < len; i++)
{
- char *start, *str= va_arg(args,char*);
- uint chars= 0;
- uint wild_pos= 0; /* first wildcard position */
+ T *entry= &arr[i];
+ if (i > start && strcmp(user, entry->get_username()))
+ break;
- if ((start= str))
+ if (compare_hostname(&entry->host, host, ip) && (!match_db_func || match_db_func(entry, db, db_is_pattern)))
{
- for (; *str ; str++)
- {
- if (*str == wild_prefix && str[1])
- str++;
- else if (*str == wild_many || *str == wild_one)
- {
- wild_pos= (uint) (str - start) + 1;
- break;
- }
- chars= 128; // Marker that chars existed
- }
+ ret= entry;
+ break;
}
- sort= (sort << 8) + (wild_pos ? MY_MIN(wild_pos, 127U) : chars);
}
- va_end(args);
- return sort;
-}
+ // Look also for anonymous user (username is empty string)
+ // Due to sort by name, entries for anonymous user start at the start of array.
+ for (i= 0; i < len; i++)
+ {
+ T *entry = &arr[i];
+ if (*entry->get_username() || (ret && acl_compare(entry, ret) >= 0))
+ break;
+ if (compare_hostname(&entry->host, host, ip) && (!match_db_func || match_db_func(entry, db, db_is_pattern)))
+ {
+ ret= entry;
+ break;
+ }
+ }
+ return ret;
+}
-static int acl_compare(ACL_ACCESS *a,ACL_ACCESS *b)
+static ACL_DB *acl_db_find(const char *db, const char *user, const char *host, const char *ip, my_bool db_is_pattern)
{
- if (a->sort > b->sort)
- return -1;
- if (a->sort < b->sort)
- return 1;
- return 0;
+ return find_by_username_or_anon(acl_dbs.front(), acl_dbs.elements(),
+ user, host, ip, db, db_is_pattern, match_db);
}
@@ -2456,13 +3027,13 @@ bool acl_getroot(Security_context *sctx, const char *user, const char *host,
const char *ip, const char *db)
{
int res= 1;
- uint i;
ACL_USER *acl_user= 0;
DBUG_ENTER("acl_getroot");
DBUG_PRINT("enter", ("Host: '%s', Ip: '%s', User: '%s', db: '%s'",
host, ip, user, db));
- sctx->user= user;
+ sctx->init();
+ sctx->user= *user ? user : NULL;
sctx->host= host;
sctx->ip= ip;
sctx->host_or_ip= host ? host : (safe_str(ip));
@@ -2478,9 +3049,7 @@ bool acl_getroot(Security_context *sctx, const char *user, const char *host,
mysql_mutex_lock(&acl_cache->lock);
- sctx->master_access= 0;
sctx->db_access= 0;
- *sctx->priv_user= *sctx->priv_host= *sctx->priv_role= 0;
if (host[0]) // User, not Role
{
@@ -2489,26 +3058,12 @@ bool acl_getroot(Security_context *sctx, const char *user, const char *host,
if (acl_user)
{
res= 0;
- for (i=0 ; i < acl_dbs.elements() ; i++)
- {
- ACL_DB *acl_db= &acl_dbs.at(i);
- if (!acl_db->user ||
- (user && user[0] && !strcmp(user, acl_db->user)))
- {
- if (compare_hostname(&acl_db->host, host, ip))
- {
- if (!acl_db->db || (db && !wild_compare(db, acl_db->db, 0)))
- {
- sctx->db_access= acl_db->access;
- break;
- }
- }
- }
- }
+ if (ACL_DB *acl_db= acl_db_find(db, user, host, ip, FALSE))
+ sctx->db_access= acl_db->access;
+
sctx->master_access= acl_user->access;
- if (acl_user->user.str)
- strmake_buf(sctx->priv_user, user);
+ strmake_buf(sctx->priv_user, user);
if (acl_user->host.hostname)
strmake_buf(sctx->priv_host, acl_user->host.hostname);
@@ -2520,26 +3075,12 @@ bool acl_getroot(Security_context *sctx, const char *user, const char *host,
if (acl_role)
{
res= 0;
- for (i=0 ; i < acl_dbs.elements() ; i++)
- {
- ACL_DB *acl_db= &acl_dbs.at(i);
- if (!acl_db->user ||
- (user && user[0] && !strcmp(user, acl_db->user)))
- {
- if (compare_hostname(&acl_db->host, "", ""))
- {
- if (!acl_db->db || (db && !wild_compare(db, acl_db->db, 0)))
- {
- sctx->db_access= acl_db->access;
- break;
- }
- }
- }
- }
+ if (ACL_DB *acl_db= acl_db_find(db, user, "", "", FALSE))
+ sctx->db_access = acl_db->access;
+
sctx->master_access= acl_role->access;
- if (acl_role->user.str)
- strmake_buf(sctx->priv_role, user);
+ strmake_buf(sctx->priv_role, user);
}
}
@@ -2565,20 +3106,9 @@ static int check_role_is_granted_callback(ACL_USER_BASE *grantee, void *data)
*/
static ACL_USER *find_user_or_anon(const char *host, const char *user, const char *ip)
{
- ACL_USER *result= NULL;
- mysql_mutex_assert_owner(&acl_cache->lock);
- for (uint i=0; i < acl_users.elements; i++)
- {
- ACL_USER *acl_user_tmp= dynamic_element(&acl_users, i, ACL_USER*);
- if ((!acl_user_tmp->user.str ||
- !strcmp(user, acl_user_tmp->user.str)) &&
- compare_hostname(&acl_user_tmp->host, host, ip))
- {
- result= acl_user_tmp;
- break;
- }
- }
- return result;
+ return find_by_username_or_anon<ACL_USER>
+ (reinterpret_cast<ACL_USER*>(acl_users.buffer), acl_users.elements,
+ user, host, ip, NULL, FALSE, NULL);
}
static int check_user_can_set_role(THD *thd, const char *user, const char *host,
@@ -2736,7 +3266,6 @@ static uchar* check_get_key(ACL_USER *buff, size_t *length,
return (uchar*) buff->host.hostname;
}
-
static void acl_update_role(const char *rolename, ulong privileges)
{
ACL_ROLE *role= find_acl_role(rolename);
@@ -2745,66 +3274,116 @@ static void acl_update_role(const char *rolename, ulong privileges)
}
-static void acl_update_user(const char *user, const char *host,
- const char *password, size_t password_len,
- enum SSL_type ssl_type,
- const char *ssl_cipher,
- const char *x509_issuer,
- const char *x509_subject,
- USER_RESOURCES *mqh,
- ulong privileges,
- const LEX_CSTRING *plugin,
- const LEX_CSTRING *auth)
+ACL_USER::ACL_USER(THD *thd, const LEX_USER &combo,
+ const Account_options &options,
+ const ulong privileges)
{
- mysql_mutex_assert_owner(&acl_cache->lock);
+ user= safe_lexcstrdup_root(&acl_memroot, combo.user);
+ update_hostname(&host, safe_strdup_root(&acl_memroot, combo.host.str));
+ hostname_length= combo.host.length;
+ sort= get_magic_sort("hu", host.hostname, user.str);
+ password_last_changed= thd->query_start();
+ password_lifetime= -1;
+ my_init_dynamic_array(&role_grants, sizeof(ACL_USER *), 0, 8, MYF(0));
+}
+
- for (uint i=0 ; i < acl_users.elements ; i++)
+static int acl_user_update(THD *thd, ACL_USER *acl_user, uint nauth,
+ const LEX_USER &combo,
+ const Account_options &options,
+ const ulong privileges)
+{
+ ACL_USER_PARAM::AUTH *work_copy= NULL;
+ if (nauth)
{
- ACL_USER *acl_user=dynamic_element(&acl_users,i,ACL_USER*);
- if (acl_user->eq(user, host))
+ if (!(work_copy= (ACL_USER_PARAM::AUTH*)
+ alloc_root(thd->mem_root, nauth * sizeof(ACL_USER_PARAM::AUTH))))
+ return 1;
+
+ USER_AUTH *auth= combo.auth;
+ for (uint i= 0; i < nauth; i++, auth= auth->next)
{
- if (plugin->str[0])
+ work_copy[i].plugin= auth->plugin;
+ work_copy[i].auth_string= safe_lexcstrdup_root(&acl_memroot,
+ auth->auth_str);
+ if (fix_user_plugin_ptr(work_copy + i))
+ work_copy[i].plugin= safe_lexcstrdup_root(&acl_memroot, auth->plugin);
+ if (set_user_auth(thd, acl_user->user, work_copy + i, auth->pwtext))
+ return 1;
+ }
+ }
+
+ acl_user->access= privileges;
+ if (options.specified_limits & USER_RESOURCES::QUERIES_PER_HOUR)
+ acl_user->user_resource.questions= options.questions;
+ if (options.specified_limits & USER_RESOURCES::UPDATES_PER_HOUR)
+ acl_user->user_resource.updates= options.updates;
+ if (options.specified_limits & USER_RESOURCES::CONNECTIONS_PER_HOUR)
+ acl_user->user_resource.conn_per_hour= options.conn_per_hour;
+ if (options.specified_limits & USER_RESOURCES::USER_CONNECTIONS)
+ acl_user->user_resource.user_conn= options.user_conn;
+ if (options.specified_limits & USER_RESOURCES::MAX_STATEMENT_TIME)
+ acl_user->user_resource.max_statement_time= options.max_statement_time;
+ if (options.ssl_type != SSL_TYPE_NOT_SPECIFIED)
+ {
+ acl_user->ssl_type= options.ssl_type;
+ acl_user->ssl_cipher= safe_strdup_root(&acl_memroot, options.ssl_cipher.str);
+ acl_user->x509_issuer= safe_strdup_root(&acl_memroot,
+ safe_str(options.x509_issuer.str));
+ acl_user->x509_subject= safe_strdup_root(&acl_memroot,
+ safe_str(options.x509_subject.str));
+ }
+ if (options.account_locked != ACCOUNTLOCK_UNSPECIFIED)
+ acl_user->account_locked= options.account_locked == ACCOUNTLOCK_LOCKED;
+
+ if (thd->is_error())
+ {
+ // If something went wrong (including OOM) we will not spoil acl cache
+ return 1;
+ }
+ /* Unexpire the user password and copy AUTH (when no more errors possible)*/
+ if (nauth)
+ {
+ acl_user->password_expired= false;
+ acl_user->password_last_changed= thd->query_start();
+
+ if (acl_user->nauth >= nauth)
+ {
+ acl_user->nauth= nauth;
+ }
+ else
+ {
+ if (acl_user->alloc_auth(&acl_memroot, nauth))
{
- acl_user->plugin= *plugin;
- acl_user->auth_string.str= auth->str ?
- strmake_root(&acl_memroot, auth->str, auth->length) : const_cast<char*>("");
- acl_user->auth_string.length= auth->length;
- if (fix_user_plugin_ptr(acl_user))
- acl_user->plugin.str= strmake_root(&acl_memroot, plugin->str, plugin->length);
+ /*
+ acl_user is a copy, so NULL assigned in case of an error do not
+ change the acl cache
+ */
+ return 1;
}
- else
- if (password[0])
- {
- acl_user->auth_string.str= strmake_root(&acl_memroot, password, password_len);
- acl_user->auth_string.length= password_len;
- set_user_salt(acl_user, password, password_len);
- set_user_plugin(acl_user, password_len);
- }
- acl_user->access=privileges;
- if (mqh->specified_limits & USER_RESOURCES::QUERIES_PER_HOUR)
- acl_user->user_resource.questions=mqh->questions;
- if (mqh->specified_limits & USER_RESOURCES::UPDATES_PER_HOUR)
- acl_user->user_resource.updates=mqh->updates;
- if (mqh->specified_limits & USER_RESOURCES::CONNECTIONS_PER_HOUR)
- acl_user->user_resource.conn_per_hour= mqh->conn_per_hour;
- if (mqh->specified_limits & USER_RESOURCES::USER_CONNECTIONS)
- acl_user->user_resource.user_conn= mqh->user_conn;
- if (mqh->specified_limits & USER_RESOURCES::MAX_STATEMENT_TIME)
- acl_user->user_resource.max_statement_time= mqh->max_statement_time;
- if (ssl_type != SSL_TYPE_NOT_SPECIFIED)
- {
- acl_user->ssl_type= ssl_type;
- acl_user->ssl_cipher= (ssl_cipher ? strdup_root(&acl_memroot,ssl_cipher) :
- 0);
- acl_user->x509_issuer= (x509_issuer ? strdup_root(&acl_memroot,x509_issuer) :
- 0);
- acl_user->x509_subject= (x509_subject ?
- strdup_root(&acl_memroot,x509_subject) : 0);
- }
- /* search complete: */
- break;
}
+ DBUG_ASSERT(work_copy); // allocated under the same condinition
+ memcpy(acl_user->auth, work_copy, nauth * sizeof(ACL_USER_PARAM::AUTH));
+ }
+
+ switch (options.password_expire) {
+ case PASSWORD_EXPIRE_UNSPECIFIED:
+ break;
+ case PASSWORD_EXPIRE_NOW:
+ acl_user->password_expired= true;
+ break;
+ case PASSWORD_EXPIRE_NEVER:
+ acl_user->password_lifetime= 0;
+ break;
+ case PASSWORD_EXPIRE_DEFAULT:
+ acl_user->password_lifetime= -1;
+ break;
+ case PASSWORD_EXPIRE_INTERVAL:
+ acl_user->password_lifetime= options.num_expiration_days;
+ break;
}
+
+ return 0;
}
@@ -2814,82 +3393,14 @@ static void acl_insert_role(const char *rolename, ulong privileges)
mysql_mutex_assert_owner(&acl_cache->lock);
entry= new (&acl_memroot) ACL_ROLE(rolename, privileges, &acl_memroot);
- (void) my_init_dynamic_array(&entry->parent_grantee,
- sizeof(ACL_USER_BASE *), 8, 8, MYF(0));
- (void) my_init_dynamic_array(&entry->role_grants,sizeof(ACL_ROLE *),
- 8, 8, MYF(0));
+ my_init_dynamic_array(&entry->parent_grantee,
+ sizeof(ACL_USER_BASE *), 0, 8, MYF(0));
+ my_init_dynamic_array(&entry->role_grants, sizeof(ACL_ROLE *), 0, 8, MYF(0));
my_hash_insert(&acl_roles, (uchar *)entry);
}
-static void acl_insert_user(const char *user, const char *host,
- const char *password, size_t password_len,
- enum SSL_type ssl_type,
- const char *ssl_cipher,
- const char *x509_issuer,
- const char *x509_subject,
- USER_RESOURCES *mqh,
- ulong privileges,
- const LEX_CSTRING *plugin,
- const LEX_CSTRING *auth)
-{
- ACL_USER acl_user;
-
- mysql_mutex_assert_owner(&acl_cache->lock);
-
- bzero(&acl_user, sizeof(acl_user));
- acl_user.user.str=*user ? strdup_root(&acl_memroot,user) : 0;
- acl_user.user.length= strlen(user);
- update_hostname(&acl_user.host, safe_strdup_root(&acl_memroot, host));
- if (plugin->str[0])
- {
- acl_user.plugin= *plugin;
- acl_user.auth_string.str= auth->str ?
- strmake_root(&acl_memroot, auth->str, auth->length) : const_cast<char*>("");
- acl_user.auth_string.length= auth->length;
- if (fix_user_plugin_ptr(&acl_user))
- acl_user.plugin.str= strmake_root(&acl_memroot, plugin->str, plugin->length);
- }
- else
- {
- acl_user.auth_string.str= strmake_root(&acl_memroot, password, password_len);
- acl_user.auth_string.length= password_len;
- set_user_salt(&acl_user, password, password_len);
- set_user_plugin(&acl_user, password_len);
- }
-
- acl_user.flags= 0;
- acl_user.access=privileges;
- acl_user.user_resource = *mqh;
- acl_user.sort=get_sort(2, acl_user.host.hostname, acl_user.user.str);
- acl_user.hostname_length=(uint) strlen(host);
- acl_user.ssl_type= (ssl_type != SSL_TYPE_NOT_SPECIFIED ?
- ssl_type : SSL_TYPE_NONE);
- acl_user.ssl_cipher= ssl_cipher ? strdup_root(&acl_memroot,ssl_cipher) : 0;
- acl_user.x509_issuer= x509_issuer ? strdup_root(&acl_memroot,x509_issuer) : 0;
- acl_user.x509_subject=x509_subject ? strdup_root(&acl_memroot,x509_subject) : 0;
- (void) my_init_dynamic_array(&acl_user.role_grants, sizeof(ACL_USER *),
- 8, 8, MYF(0));
-
- (void) push_dynamic(&acl_users,(uchar*) &acl_user);
- if (!acl_user.host.hostname ||
- (acl_user.host.hostname[0] == wild_many && !acl_user.host.hostname[1]))
- allow_all_hosts=1; // Anyone can connect /* purecov: tested */
- my_qsort((uchar*) dynamic_element(&acl_users,0,ACL_USER*),acl_users.elements,
- sizeof(ACL_USER),(qsort_cmp) acl_compare);
-
- /* Rebuild 'acl_check_hosts' since 'acl_users' has been modified */
- rebuild_check_host();
-
- /*
- Rebuild every user's role_grants since 'acl_users' has been sorted
- and old pointers to ACL_USER elements are no longer valid
- */
- rebuild_role_grants();
-}
-
-
static bool acl_update_db(const char *user, const char *host, const char *db,
ulong privileges)
{
@@ -2897,16 +3408,13 @@ static bool acl_update_db(const char *user, const char *host, const char *db,
bool updated= false;
- for (uint i=0 ; i < acl_dbs.elements() ; i++)
+ for (size_t i= acl_find_db_by_username(user); i < acl_dbs.elements(); i++)
{
ACL_DB *acl_db= &acl_dbs.at(i);
- if ((!acl_db->user && !user[0]) ||
- (acl_db->user &&
- !strcmp(user,acl_db->user)))
+ if (!strcmp(user,acl_db->user))
{
if ((!acl_db->host.hostname && !host[0]) ||
- (acl_db->host.hostname &&
- !strcmp(host, acl_db->host.hostname)))
+ (acl_db->host.hostname && !strcmp(host, acl_db->host.hostname)))
{
if ((!acl_db->db && !db[0]) ||
(acl_db->db && !strcmp(db,acl_db->db)))
@@ -2923,6 +3431,8 @@ static bool acl_update_db(const char *user, const char *host, const char *db,
}
}
}
+ else
+ break;
}
return updated;
@@ -2952,9 +3462,9 @@ static void acl_insert_db(const char *user, const char *host, const char *db,
update_hostname(&acl_db.host, safe_strdup_root(&acl_memroot, host));
acl_db.db=strdup_root(&acl_memroot,db);
acl_db.initial_access= acl_db.access= privileges;
- acl_db.sort=get_sort(3,acl_db.host.hostname,acl_db.db,acl_db.user);
+ acl_db.sort=get_magic_sort("hdu", acl_db.host.hostname, acl_db.db, acl_db.user);
acl_dbs.push(acl_db);
- acl_dbs.sort((acl_dbs_cmp)acl_compare);
+ rebuild_acl_dbs();
}
@@ -3000,26 +3510,16 @@ ulong acl_get(const char *host, const char *ip,
/*
Check if there are some access rights for database and user
*/
- for (i=0 ; i < acl_dbs.elements() ; i++)
+ if (ACL_DB *acl_db= acl_db_find(db,user, host, ip, db_is_pattern))
{
- ACL_DB *acl_db= &acl_dbs.at(i);
- if (!acl_db->user || !strcmp(user,acl_db->user))
- {
- if (compare_hostname(&acl_db->host,host,ip))
- {
- if (!acl_db->db || !wild_compare(db,acl_db->db,db_is_pattern))
- {
- db_access=acl_db->access;
- if (acl_db->host.hostname)
- goto exit; // Fully specified. Take it
- /* the host table is not used for roles */
- if ((!host || !host[0]) && !acl_db->host.hostname && find_acl_role(user))
- goto exit;
- break; /* purecov: tested */
- }
- }
- }
+ db_access= acl_db->access;
+ if (acl_db->host.hostname)
+ goto exit; // Fully specified. Take it
+ /* the host table is not used for roles */
+ if ((!host || !host[0]) && !acl_db->host.hostname && find_acl_role(user))
+ goto exit;
}
+
if (!db_access)
goto exit; // Can't be better
@@ -3317,7 +3817,7 @@ static int check_alter_user(THD *thd, const char *host, const char *user)
if (IF_WSREP((!WSREP(thd) || !thd->wsrep_applier), 1) &&
!thd->slave_thread && !thd->security_ctx->priv_user[0] &&
- !in_bootstrap)
+ !thd->bootstrap)
{
my_message(ER_PASSWORD_ANONYMOUS_USER,
ER_THD(thd, ER_PASSWORD_ANONYMOUS_USER),
@@ -3332,10 +3832,13 @@ static int check_alter_user(THD *thd, const char *host, const char *user)
if (!thd->slave_thread &&
IF_WSREP((!WSREP(thd) || !thd->wsrep_applier),1) &&
- (strcmp(thd->security_ctx->priv_user, user) ||
- my_strcasecmp(system_charset_info, host,
- thd->security_ctx->priv_host)))
+ !thd->security_ctx->is_priv_user(user, host))
{
+ if (thd->security_ctx->password_expired)
+ {
+ my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
+ goto end;
+ }
if (check_access(thd, UPDATE_ACL, "mysql", NULL, NULL, 1, 0))
goto end;
}
@@ -3359,13 +3862,8 @@ end:
bool check_change_password(THD *thd, LEX_USER *user)
{
LEX_USER *real_user= get_current_user(thd, user);
-
- if (fix_and_copy_user(real_user, user, thd) ||
- validate_password(real_user, thd))
- return true;
-
- *user= *real_user;
-
+ user->user= real_user->user;
+ user->host= real_user->host;
return check_alter_user(thd, user->host.str, user->user.str);
}
@@ -3382,17 +3880,20 @@ bool check_change_password(THD *thd, LEX_USER *user)
*/
bool change_password(THD *thd, LEX_USER *user)
{
- Grant_tables tables(Table_user, TL_WRITE);
+ Grant_tables tables;
/* Buffer should be extended when password length is extended. */
char buff[512];
ulong query_length= 0;
enum_binlog_format save_binlog_format;
- int result=0;
+ bool result= false, acl_cache_is_locked= false;
+ ACL_USER *acl_user;
+ ACL_USER::AUTH auth;
+ const char *password_plugin= 0;
const CSET_STRING query_save __attribute__((unused)) = thd->query_string;
DBUG_ENTER("change_password");
DBUG_PRINT("enter",("host: '%s' user: '%s' new_password: '%s'",
- user->host.str, user->user.str, user->pwhash.str));
- DBUG_ASSERT(user->host.str != 0); // Ensured by parent
+ user->host.str, user->user.str, user->auth->auth_str.str));
+ DBUG_ASSERT(user->host.str != 0); // Ensured by caller
/*
This statement will be replicated as a statement, even when using
@@ -3403,80 +3904,87 @@ bool change_password(THD *thd, LEX_USER *user)
*/
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
- if (mysql_bin_log.is_open() ||
- (WSREP(thd) && !IF_WSREP(thd->wsrep_applier, 0)))
- {
- query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
- safe_str(user->user.str), safe_str(user->host.str),
- safe_str(user->pwhash.str));
- }
-
if (WSREP(thd) && !IF_WSREP(thd->wsrep_applier, 0))
- {
- thd->set_query(buff, query_length, system_charset_info);
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL);
- }
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
- if ((result= tables.open_and_lock(thd)))
+ if ((result= tables.open_and_lock(thd, Table_user, TL_WRITE)))
DBUG_RETURN(result != 1);
- result= 1;
-
+ acl_cache_is_locked= 1;
mysql_mutex_lock(&acl_cache->lock);
- ACL_USER *acl_user;
+
if (!(acl_user= find_user_exact(user->host.str, user->user.str)))
{
- mysql_mutex_unlock(&acl_cache->lock);
- my_message(ER_PASSWORD_NO_MATCH,
- ER_THD(thd, ER_PASSWORD_NO_MATCH), MYF(0));
+ my_error(ER_PASSWORD_NO_MATCH, MYF(0));
goto end;
}
- /* update loaded acl entry: */
- if (acl_user->plugin.str == native_password_plugin_name.str ||
- acl_user->plugin.str == old_password_plugin_name.str)
+ if (acl_user->nauth == 1 &&
+ (acl_user->auth[0].plugin.str == native_password_plugin_name.str ||
+ acl_user->auth[0].plugin.str == old_password_plugin_name.str))
{
- acl_user->auth_string.str= strmake_root(&acl_memroot, user->pwhash.str, user->pwhash.length);
- acl_user->auth_string.length= user->pwhash.length;
- set_user_salt(acl_user, user->pwhash.str, user->pwhash.length);
-
- set_user_plugin(acl_user, user->pwhash.length);
+ /* historical hack of auto-changing the plugin */
+ acl_user->auth[0].plugin= guess_auth_plugin(thd, user->auth->auth_str.length);
}
- else
- push_warning(thd, Sql_condition::WARN_LEVEL_NOTE,
- ER_SET_PASSWORD_AUTH_PLUGIN,
- ER_THD(thd, ER_SET_PASSWORD_AUTH_PLUGIN));
- if (update_user_table(thd, tables.user_table(),
- safe_str(acl_user->host.hostname),
- safe_str(acl_user->user.str),
- user->pwhash.str, user->pwhash.length))
+ for (uint i=0; i < acl_user->nauth; i++)
{
- mysql_mutex_unlock(&acl_cache->lock); /* purecov: deadcode */
+ auth= acl_user->auth[i];
+ auth.auth_string= safe_lexcstrdup_root(&acl_memroot, user->auth->auth_str);
+ int r= set_user_auth(thd, user->user, &auth, user->auth->pwtext);
+ if (r == ER_SET_PASSWORD_AUTH_PLUGIN)
+ password_plugin= auth.plugin.str;
+ else if (r)
+ goto end;
+ else
+ {
+ acl_user->auth[i]= auth;
+ password_plugin= 0;
+ break;
+ }
+ }
+ if (password_plugin)
+ {
+ my_error(ER_SET_PASSWORD_AUTH_PLUGIN, MYF(0), password_plugin);
goto end;
}
- acl_cache->clear(1); // Clear locked hostname cache
+ /* Update the acl password expired state of user */
+ acl_user->password_last_changed= thd->query_start();
+ acl_user->password_expired= false;
+
+ /* If user is the connected user, reset the password expired field on sctx
+ and allow the user to exit sandbox mode */
+ if (thd->security_ctx->is_priv_user(user->user.str, user->host.str))
+ thd->security_ctx->password_expired= false;
+
+ if (update_user_table_password(thd, tables.user_table(), *acl_user))
+ goto end;
+
+ acl_cache->clear(1); // Clear locked hostname cache
mysql_mutex_unlock(&acl_cache->lock);
- result= 0;
+ result= acl_cache_is_locked= 0;
if (mysql_bin_log.is_open())
{
+ query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
+ user->user.str, safe_str(user->host.str), auth.auth_string.str);
DBUG_ASSERT(query_length);
thd->clear_error();
result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length,
FALSE, FALSE, FALSE, 0) > 0;
}
end:
+ if (acl_cache_is_locked)
+ mysql_mutex_unlock(&acl_cache->lock);
close_mysql_tables(thd);
#ifdef WITH_WSREP
-WSREP_ERROR_LABEL:
+wsrep_error_label:
if (WSREP(thd) && !thd->wsrep_applier)
{
WSREP_TO_ISOLATION_END;
thd->set_query(query_save);
- thd->wsrep_exec_mode = LOCAL_STATE;
}
#endif /* WITH_WSREP */
thd->restore_stmt_binlog_format(save_binlog_format);
@@ -3494,8 +4002,9 @@ int acl_check_set_default_role(THD *thd, const char *host, const char *user,
successful without validating the user/role data because the command will
be ignored in a later call to `acl_set_default_role()` for a graceful exit.
*/
- Grant_tables tables(Table_roles_mapping, TL_WRITE);
- if (tables.rpl_ignore_tables(thd))
+ Grant_tables tables;
+ TABLE_LIST* first= NULL;
+ if (tables.rpl_ignore_tables(thd, first, Table_roles_mapping, TL_WRITE))
DBUG_RETURN(0);
#endif
DBUG_RETURN(check_alter_user(thd, host, user) ||
@@ -3505,20 +4014,19 @@ int acl_check_set_default_role(THD *thd, const char *host, const char *user,
int acl_set_default_role(THD *thd, const char *host, const char *user,
const char *rolename)
{
- Grant_tables tables(Table_user, TL_WRITE);
+ Grant_tables tables;
char user_key[MAX_KEY_LENGTH];
int result= 1;
int error;
ulong query_length= 0;
bool clear_role= FALSE;
char buff[512];
- enum_binlog_format save_binlog_format=
- thd->get_current_stmt_binlog_format();
+ enum_binlog_format save_binlog_format= thd->get_current_stmt_binlog_format();
const CSET_STRING query_save __attribute__((unused)) = thd->query_string;
DBUG_ENTER("acl_set_default_role");
DBUG_PRINT("enter",("host: '%s' user: '%s' rolename: '%s'",
- safe_str(user), safe_str(host), safe_str(rolename)));
+ user, safe_str(host), safe_str(rolename)));
if (!strcasecmp(rolename, "NONE"))
clear_role= TRUE;
@@ -3528,7 +4036,7 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
{
query_length=
sprintf(buff,"SET DEFAULT ROLE '%-.120s' FOR '%-.120s'@'%-.120s'",
- safe_str(rolename), safe_str(user), safe_str(host));
+ safe_str(rolename), user, safe_str(host));
}
/*
@@ -3544,7 +4052,7 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
{
thd->set_query(buff, query_length, system_charset_info);
// Attention!!! here is implicit goto error;
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL);
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
}
/*
@@ -3552,7 +4060,7 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
TODO(cvicentiu) Should move this block out in a new function.
*/
{
- if ((result= tables.open_and_lock(thd)))
+ if ((result= tables.open_and_lock(thd, Table_user, TL_WRITE)))
DBUG_RETURN(result != 1);
const User_table& user_table= tables.user_table();
@@ -3585,17 +4093,8 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
/* update the mysql.user table with the new default role */
tables.user_table().table()->use_all_columns();
- if (!tables.user_table().default_role())
- {
- my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0),
- table->alias.c_ptr(), DEFAULT_ROLE_COLUMN_IDX + 1,
- tables.user_table().num_fields(),
- static_cast<int>(table->s->mysql_version), MYSQL_VERSION_ID);
- mysql_mutex_unlock(&acl_cache->lock);
- goto end;
- }
- user_table.host()->store(host,(uint) strlen(host), system_charset_info);
- user_table.user()->store(user,(uint) strlen(user), system_charset_info);
+ user_table.set_host(host, strlen(host));
+ user_table.set_user(user, strlen(user));
key_copy((uchar *) user_key, table->record[0], table->key_info,
table->key_info->key_length);
@@ -3609,9 +4108,8 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
goto end;
}
store_record(table, record[1]);
- user_table.default_role()->store(acl_user->default_rolename.str,
- acl_user->default_rolename.length,
- system_charset_info);
+ user_table.set_default_role(acl_user->default_rolename.str,
+ acl_user->default_rolename.length);
if (unlikely(error= table->file->ha_update_row(table->record[1],
table->record[0])) &&
error != HA_ERR_RECORD_IS_THE_SAME)
@@ -3636,13 +4134,12 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
}
#ifdef WITH_WSREP
-WSREP_ERROR_LABEL:
+wsrep_error_label:
if (WSREP(thd) && !thd->wsrep_applier)
{
WSREP_TO_ISOLATION_END;
thd->set_query(query_save);
- thd->wsrep_exec_mode = LOCAL_STATE;
}
#endif /* WITH_WSREP */
@@ -3684,17 +4181,22 @@ bool is_acl_user(const char *host, const char *user)
return res;
}
+
/*
Find first entry that matches the specified user@host pair
*/
-static ACL_USER * find_user_exact(const char *host, const char *user)
+static ACL_USER *find_user_exact(const char *host, const char *user)
{
mysql_mutex_assert_owner(&acl_cache->lock);
+ size_t start= acl_find_user_by_name(user);
- for (uint i=0 ; i < acl_users.elements ; i++)
+ for (size_t i= start; i < acl_users.elements; i++)
{
- ACL_USER *acl_user=dynamic_element(&acl_users,i,ACL_USER*);
- if (acl_user->eq(user, host))
+ ACL_USER *acl_user= dynamic_element(&acl_users, i, ACL_USER*);
+ if (i > start && strcmp(acl_user->user.str, user))
+ return 0;
+
+ if (!my_strcasecmp(system_charset_info, acl_user->host.hostname, host))
return acl_user;
}
return 0;
@@ -3707,10 +4209,14 @@ static ACL_USER * find_user_wild(const char *host, const char *user, const char
{
mysql_mutex_assert_owner(&acl_cache->lock);
- for (uint i=0 ; i < acl_users.elements ; i++)
+ size_t start = acl_find_user_by_name(user);
+
+ for (size_t i= start; i < acl_users.elements; i++)
{
ACL_USER *acl_user=dynamic_element(&acl_users,i,ACL_USER*);
- if (acl_user->wild_eq(user, host, ip))
+ if (i > start && strcmp(acl_user->user.str, user))
+ break;
+ if (compare_hostname(&acl_user->host, host, ip ? ip : host))
return acl_user;
}
return 0;
@@ -3728,7 +4234,7 @@ static ACL_ROLE *find_acl_role(const char *role)
mysql_mutex_assert_owner(&acl_cache->lock);
ACL_ROLE *r= (ACL_ROLE *)my_hash_search(&acl_roles, (uchar *)role,
- safe_strlen(role));
+ strlen(role));
DBUG_RETURN(r);
}
@@ -3880,53 +4386,23 @@ bool hostname_requires_resolving(const char *hostname)
}
-void set_authentication_plugin_from_password(const User_table& user_table,
- const char* password, size_t password_length)
-{
- if (password_length == SCRAMBLED_PASSWORD_CHAR_LENGTH ||
- password_length == 0)
- {
- user_table.plugin()->store(native_password_plugin_name.str,
- native_password_plugin_name.length,
- system_charset_info);
- }
- else
- {
- DBUG_ASSERT(password_length == SCRAMBLED_PASSWORD_CHAR_LENGTH_323);
- user_table.plugin()->store(old_password_plugin_name.str,
- old_password_plugin_name.length,
- system_charset_info);
- }
- user_table.authentication_string()->store(password,
- password_length,
- system_charset_info);
-}
/**
Update record for user in mysql.user privilege table with new password.
- @param thd THD
- @param table Pointer to TABLE object for open mysql.user table
- @param host Hostname
- @param user Username
- @param new_password New password hash
- @param new_password_len Length of new password hash
-
@see change_password
*/
-static bool update_user_table(THD *thd, const User_table& user_table,
- const char *host, const char *user,
- const char *new_password, size_t new_password_len)
+static bool update_user_table_password(THD *thd, const User_table& user_table,
+ const ACL_USER &user)
{
char user_key[MAX_KEY_LENGTH];
int error;
- DBUG_ENTER("update_user_table");
- DBUG_PRINT("enter",("user: %s host: %s",user,host));
+ DBUG_ENTER("update_user_table_password");
TABLE *table= user_table.table();
table->use_all_columns();
- user_table.host()->store(host,(uint) strlen(host), system_charset_info);
- user_table.user()->store(user,(uint) strlen(user), system_charset_info);
+ user_table.set_host(user.host.hostname, user.hostname_length);
+ user_table.set_user(user.user.str, user.user.length);
key_copy((uchar *) user_key, table->record[0], table->key_info,
table->key_info->key_length);
@@ -3935,28 +4411,30 @@ static bool update_user_table(THD *thd, const User_table& user_table,
HA_READ_KEY_EXACT))
{
my_message(ER_PASSWORD_NO_MATCH, ER_THD(thd, ER_PASSWORD_NO_MATCH),
- MYF(0)); /* purecov: deadcode */
- DBUG_RETURN(1); /* purecov: deadcode */
+ MYF(0));
+ DBUG_RETURN(1);
}
- store_record(table,record[1]);
+ store_record(table, record[1]);
- if (user_table.plugin())
+ if (user_table.set_auth(user))
{
- set_authentication_plugin_from_password(user_table, new_password,
- new_password_len);
+ my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0),
+ user_table.name().str, 3, user_table.num_fields(),
+ static_cast<int>(table->s->mysql_version), MYSQL_VERSION_ID);
+ DBUG_RETURN(1);
}
- if (user_table.password())
- user_table.password()->store(new_password, new_password_len, system_charset_info);
-
+ user_table.set_password_expired(user.password_expired);
+ user_table.set_password_last_changed(user.password_last_changed);
if (unlikely(error= table->file->ha_update_row(table->record[1],
table->record[0])) &&
error != HA_ERR_RECORD_IS_THE_SAME)
{
- table->file->print_error(error,MYF(0)); /* purecov: deadcode */
+ table->file->print_error(error,MYF(0));
DBUG_RETURN(1);
}
+
DBUG_RETURN(0);
}
@@ -3978,7 +4456,8 @@ static bool test_if_create_new_users(THD *thd)
{
TABLE_LIST tl;
ulong db_access;
- tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_USER_NAME, NULL, TL_WRITE);
+ tl.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_TABLE_NAME[USER_TABLE],
+ NULL, TL_WRITE);
create_new_users= 1;
db_access=acl_get(sctx->host, sctx->ip,
@@ -3998,63 +4477,41 @@ static bool test_if_create_new_users(THD *thd)
/****************************************************************************
Handle GRANT commands
****************************************************************************/
+static USER_AUTH auth_no_password;
static int replace_user_table(THD *thd, const User_table &user_table,
- LEX_USER &combo,
- ulong rights, bool revoke_grant,
- bool can_create_user, bool no_auto_create)
+ LEX_USER * const combo, ulong rights,
+ const bool revoke_grant, const bool can_create_user,
+ const bool no_auto_create)
{
int error = -1;
+ uint nauth= 0;
bool old_row_exists=0;
- char what= (revoke_grant) ? 'N' : 'Y';
uchar user_key[MAX_KEY_LENGTH];
- bool handle_as_role= combo.is_role();
+ bool handle_as_role= combo->is_role();
LEX *lex= thd->lex;
TABLE *table= user_table.table();
+ ACL_USER new_acl_user, *old_acl_user= 0;
DBUG_ENTER("replace_user_table");
mysql_mutex_assert_owner(&acl_cache->lock);
- if (combo.pwhash.str && combo.pwhash.str[0])
- {
- if (combo.pwhash.length != SCRAMBLED_PASSWORD_CHAR_LENGTH &&
- combo.pwhash.length != SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
- {
- DBUG_ASSERT(0);
- my_error(ER_PASSWD_LENGTH, MYF(0), SCRAMBLED_PASSWORD_CHAR_LENGTH);
- DBUG_RETURN(-1);
- }
- }
- else
- combo.pwhash= empty_clex_str;
-
- /* if the user table is not up to date, we can't handle role updates */
- if (!user_table.is_role() && handle_as_role)
- {
- my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0),
- "user", ROLE_ASSIGN_COLUMN_IDX + 1, user_table.num_fields(),
- static_cast<int>(table->s->mysql_version), MYSQL_VERSION_ID);
- DBUG_RETURN(-1);
- }
-
table->use_all_columns();
- user_table.host()->store(combo.host.str,combo.host.length,
- system_charset_info);
- user_table.user()->store(combo.user.str,combo.user.length,
- system_charset_info);
+ user_table.set_host(combo->host.str,combo->host.length);
+ user_table.set_user(combo->user.str,combo->user.length);
key_copy(user_key, table->record[0], table->key_info,
table->key_info->key_length);
if (table->file->ha_index_read_idx_map(table->record[0], 0, user_key,
HA_WHOLE_KEY, HA_READ_KEY_EXACT))
{
- /* what == 'N' means revoke */
- if (what == 'N')
+ if (revoke_grant)
{
- if (combo.host.length)
- my_error(ER_NONEXISTING_GRANT, MYF(0), combo.user.str, combo.host.str);
+ if (combo->host.length)
+ my_error(ER_NONEXISTING_GRANT, MYF(0), combo->user.str,
+ combo->host.str);
else
- my_error(ER_INVALID_ROLE, MYF(0), combo.user.str);
+ my_error(ER_INVALID_ROLE, MYF(0), combo->user.str);
goto end;
}
/*
@@ -4070,7 +4527,7 @@ static int replace_user_table(THD *thd, const User_table &user_table,
see also test_if_create_new_users()
*/
- else if (!combo.pwhash.length && !combo.plugin.length && no_auto_create)
+ else if (!combo->has_auth() && no_auto_create)
{
my_error(ER_PASSWORD_NO_MATCH, MYF(0));
goto end;
@@ -4080,21 +4537,14 @@ static int replace_user_table(THD *thd, const User_table &user_table,
my_error(ER_CANT_CREATE_USER_WITH_GRANT, MYF(0));
goto end;
}
- else if (combo.plugin.str[0])
- {
- if (!plugin_is_ready(&combo.plugin, MYSQL_AUTHENTICATION_PLUGIN))
- {
- my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), combo.plugin.str);
- goto end;
- }
- }
+
+ if (!combo->auth)
+ combo->auth= &auth_no_password;
old_row_exists = 0;
- restore_record(table,s->default_values);
- user_table.host()->store(combo.host.str,combo.host.length,
- system_charset_info);
- user_table.user()->store(combo.user.str,combo.user.length,
- system_charset_info);
+ restore_record(table, s->default_values);
+ user_table.set_host(combo->host.str, combo->host.length);
+ user_table.set_user(combo->user.str, combo->user.length);
}
else
{
@@ -4102,138 +4552,117 @@ static int replace_user_table(THD *thd, const User_table &user_table,
store_record(table,record[1]); // Save copy for update
}
- if (!old_row_exists || combo.pwtext.length || combo.pwhash.length)
- if (!handle_as_role && validate_password(&combo, thd))
- goto end;
+ for (USER_AUTH *auth= combo->auth; auth; auth= auth->next)
+ {
+ nauth++;
+ if (auth->plugin.length)
+ {
+ if (!plugin_is_ready(&auth->plugin, MYSQL_AUTHENTICATION_PLUGIN))
+ {
+ my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), auth->plugin.str);
+ goto end;
+ }
+ }
+ else
+ auth->plugin= guess_auth_plugin(thd, auth->auth_str.length);
+ }
/* Update table columns with new privileges */
+ user_table.set_access(rights, revoke_grant);
+ rights= user_table.get_access();
- ulong priv;
- priv = SELECT_ACL;
- for (uint i= 0; i < user_table.num_privileges(); i++, priv <<= 1)
+ if (handle_as_role)
{
- if (priv & rights)
- user_table.priv_field(i)->store(&what, 1, &my_charset_latin1);
+ if (old_row_exists && !user_table.get_is_role())
+ {
+ goto end;
+ }
+ if (user_table.set_is_role(true))
+ {
+ my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0),
+ user_table.name().str,
+ ROLE_ASSIGN_COLUMN_IDX + 1, user_table.num_fields(),
+ static_cast<int>(table->s->mysql_version), MYSQL_VERSION_ID);
+ goto end;
+ }
}
+ else
+ {
+ old_acl_user= find_user_exact(combo->host.str, combo->user.str);
+ if ((old_acl_user != NULL) != old_row_exists)
+ {
+ my_error(ER_PASSWORD_NO_MATCH, MYF(0));
+ goto end;
+ }
+ new_acl_user= old_row_exists ? *old_acl_user :
+ ACL_USER(thd, *combo, lex->account_options, rights);
+ if (acl_user_update(thd, &new_acl_user, nauth,
+ *combo, lex->account_options, rights))
+ goto end;
- rights= user_table.get_access();
+ if (user_table.set_auth(new_acl_user))
+ {
+ my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0),
+ user_table.name().str, 3, user_table.num_fields(),
+ static_cast<int>(table->s->mysql_version), MYSQL_VERSION_ID);
+ DBUG_RETURN(1);
+ }
- DBUG_PRINT("info",("table fields: %d", user_table.num_fields()));
- /* If we don't have a password column, we'll use the authentication_string
- column later. */
- if (combo.pwhash.str[0] && user_table.password())
- user_table.password()->store(combo.pwhash.str, combo.pwhash.length,
- system_charset_info);
- /* We either have the password column, the plugin column, or both. Otherwise
- we have a corrupt user table. */
- DBUG_ASSERT(user_table.password() || user_table.plugin());
- if (user_table.ssl_type()) /* From 4.0.0 we have more fields */
- {
- /* We write down SSL related ACL stuff */
- switch (lex->ssl_type) {
- case SSL_TYPE_ANY:
- user_table.ssl_type()->store(STRING_WITH_LEN("ANY"),
- &my_charset_latin1);
- user_table.ssl_cipher()->store("", 0, &my_charset_latin1);
- user_table.x509_issuer()->store("", 0, &my_charset_latin1);
- user_table.x509_subject()->store("", 0, &my_charset_latin1);
+ switch (lex->account_options.ssl_type) {
+ case SSL_TYPE_NOT_SPECIFIED:
break;
+ case SSL_TYPE_NONE:
+ case SSL_TYPE_ANY:
case SSL_TYPE_X509:
- user_table.ssl_type()->store(STRING_WITH_LEN("X509"),
- &my_charset_latin1);
- user_table.ssl_cipher()->store("", 0, &my_charset_latin1);
- user_table.x509_issuer()->store("", 0, &my_charset_latin1);
- user_table.x509_subject()->store("", 0, &my_charset_latin1);
+ user_table.set_ssl_type(lex->account_options.ssl_type);
+ user_table.set_ssl_cipher("", 0);
+ user_table.set_x509_issuer("", 0);
+ user_table.set_x509_subject("", 0);
break;
case SSL_TYPE_SPECIFIED:
- user_table.ssl_type()->store(STRING_WITH_LEN("SPECIFIED"),
- &my_charset_latin1);
- user_table.ssl_cipher()->store("", 0, &my_charset_latin1);
- user_table.x509_issuer()->store("", 0, &my_charset_latin1);
- user_table.x509_subject()->store("", 0, &my_charset_latin1);
- if (lex->ssl_cipher)
- user_table.ssl_cipher()->store(lex->ssl_cipher,
- strlen(lex->ssl_cipher),
- system_charset_info);
- if (lex->x509_issuer)
- user_table.x509_issuer()->store(lex->x509_issuer,
- strlen(lex->x509_issuer),
- system_charset_info);
- if (lex->x509_subject)
- user_table.x509_subject()->store(lex->x509_subject,
- strlen(lex->x509_subject),
- system_charset_info);
- break;
- case SSL_TYPE_NOT_SPECIFIED:
- break;
- case SSL_TYPE_NONE:
- user_table.ssl_type()->store("", 0, &my_charset_latin1);
- user_table.ssl_cipher()->store("", 0, &my_charset_latin1);
- user_table.x509_issuer()->store("", 0, &my_charset_latin1);
- user_table.x509_subject()->store("", 0, &my_charset_latin1);
+ user_table.set_ssl_type(lex->account_options.ssl_type);
+ if (lex->account_options.ssl_cipher.str)
+ user_table.set_ssl_cipher(lex->account_options.ssl_cipher.str,
+ lex->account_options.ssl_cipher.length);
+ else
+ user_table.set_ssl_cipher("", 0);
+ if (lex->account_options.x509_issuer.str)
+ user_table.set_x509_issuer(lex->account_options.x509_issuer.str,
+ lex->account_options.x509_issuer.length);
+ else
+ user_table.set_x509_issuer("", 0);
+ if (lex->account_options.x509_subject.str)
+ user_table.set_x509_subject(lex->account_options.x509_subject.str,
+ lex->account_options.x509_subject.length);
+ else
+ user_table.set_x509_subject("", 0);
break;
}
- USER_RESOURCES mqh= lex->mqh;
- if (mqh.specified_limits & USER_RESOURCES::QUERIES_PER_HOUR)
- user_table.max_questions()->store((longlong) mqh.questions, TRUE);
- if (mqh.specified_limits & USER_RESOURCES::UPDATES_PER_HOUR)
- user_table.max_updates()->store((longlong) mqh.updates, TRUE);
- if (mqh.specified_limits & USER_RESOURCES::CONNECTIONS_PER_HOUR)
- user_table.max_connections()->store((longlong) mqh.conn_per_hour, TRUE);
- if (user_table.max_user_connections() &&
- (mqh.specified_limits & USER_RESOURCES::USER_CONNECTIONS))
- user_table.max_user_connections()->store((longlong) mqh.user_conn, FALSE);
- if (user_table.plugin())
- {
- user_table.plugin()->set_notnull();
- user_table.authentication_string()->set_notnull();
- if (combo.plugin.str[0])
- {
- DBUG_ASSERT(combo.pwhash.str[0] == 0);
- if (user_table.password())
- user_table.password()->reset();
- user_table.plugin()->store(combo.plugin.str, combo.plugin.length,
- system_charset_info);
- user_table.authentication_string()->store(combo.auth.str, combo.auth.length,
- system_charset_info);
- }
- if (combo.pwhash.str[0])
- {
- DBUG_ASSERT(combo.plugin.str[0] == 0);
- /* We have Password column. */
- if (user_table.password())
- {
- user_table.plugin()->reset();
- user_table.authentication_string()->reset();
- }
- else
- {
- /* We do not have Password column. Use PLUGIN && Authentication_string
- columns instead. */
- set_authentication_plugin_from_password(user_table,
- combo.pwhash.str,
- combo.pwhash.length);
- }
- }
+ if (lex->account_options.specified_limits & USER_RESOURCES::QUERIES_PER_HOUR)
+ user_table.set_max_questions(lex->account_options.questions);
+ if (lex->account_options.specified_limits & USER_RESOURCES::UPDATES_PER_HOUR)
+ user_table.set_max_updates(lex->account_options.updates);
+ if (lex->account_options.specified_limits & USER_RESOURCES::CONNECTIONS_PER_HOUR)
+ user_table.set_max_connections(lex->account_options.conn_per_hour);
+ if (lex->account_options.specified_limits & USER_RESOURCES::USER_CONNECTIONS)
+ user_table.set_max_user_connections(lex->account_options.user_conn);
+ if (lex->account_options.specified_limits & USER_RESOURCES::MAX_STATEMENT_TIME)
+ user_table.set_max_statement_time(lex->account_options.max_statement_time);
- if (user_table.max_statement_time())
- {
- if (mqh.specified_limits & USER_RESOURCES::MAX_STATEMENT_TIME)
- user_table.max_statement_time()->store(mqh.max_statement_time);
- }
- }
- mqh_used= (mqh_used || mqh.questions || mqh.updates || mqh.conn_per_hour ||
- mqh.user_conn || mqh.max_statement_time != 0.0);
+ mqh_used= (mqh_used || lex->account_options.questions || lex->account_options.updates ||
+ lex->account_options.conn_per_hour || lex->account_options.user_conn ||
+ lex->account_options.max_statement_time != 0.0);
- /* table format checked earlier */
- if (handle_as_role)
+ if (lex->account_options.account_locked != ACCOUNTLOCK_UNSPECIFIED)
+ user_table.set_account_locked(new_acl_user.account_locked);
+
+ if (nauth)
+ user_table.set_password_last_changed(new_acl_user.password_last_changed);
+ if (lex->account_options.password_expire != PASSWORD_EXPIRE_UNSPECIFIED)
{
- if (old_row_exists && !user_table.check_is_role())
- {
- goto end;
- }
- user_table.is_role()->store("Y", 1, system_charset_info);
+ user_table.set_password_lifetime(new_acl_user.password_lifetime);
+ user_table.set_password_expired(new_acl_user.password_expired);
}
}
@@ -4273,37 +4702,31 @@ end:
if (likely(!error))
{
acl_cache->clear(1); // Clear privilege cache
- if (old_row_exists)
+ if (handle_as_role)
{
- if (handle_as_role)
- acl_update_role(combo.user.str, rights);
+ if (old_row_exists)
+ acl_update_role(combo->user.str, rights);
else
- acl_update_user(combo.user.str, combo.host.str,
- combo.pwhash.str, combo.pwhash.length,
- lex->ssl_type,
- lex->ssl_cipher,
- lex->x509_issuer,
- lex->x509_subject,
- &lex->mqh,
- rights,
- &combo.plugin,
- &combo.auth);
+ acl_insert_role(combo->user.str, rights);
}
else
{
- if (handle_as_role)
- acl_insert_role(combo.user.str, rights);
+ if (old_acl_user)
+ *old_acl_user= new_acl_user;
else
- acl_insert_user(combo.user.str, combo.host.str,
- combo.pwhash.str, combo.pwhash.length,
- lex->ssl_type,
- lex->ssl_cipher,
- lex->x509_issuer,
- lex->x509_subject,
- &lex->mqh,
- rights,
- &combo.plugin,
- &combo.auth);
+ {
+ push_new_user(new_acl_user);
+ rebuild_acl_users();
+
+ /* Rebuild 'acl_check_hosts' since 'acl_users' has been modified */
+ rebuild_check_host();
+
+ /*
+ Rebuild every user's role_grants since 'acl_users' has been sorted
+ and old pointers to ACL_USER elements are no longer valid
+ */
+ rebuild_role_grants();
+ }
}
}
DBUG_RETURN(error);
@@ -4316,13 +4739,13 @@ end:
static int replace_db_table(TABLE *table, const char *db,
const LEX_USER &combo,
- ulong rights, bool revoke_grant)
+ ulong rights, const bool revoke_grant)
{
uint i;
ulong priv,store_rights;
bool old_row_exists=0;
int error;
- char what= (revoke_grant) ? 'N' : 'Y';
+ char what= revoke_grant ? 'N' : 'Y';
uchar user_key[MAX_KEY_LENGTH];
DBUG_ENTER("replace_db_table");
@@ -4351,7 +4774,7 @@ static int replace_db_table(TABLE *table, const char *db,
HA_WHOLE_KEY,
HA_READ_KEY_EXACT))
{
- if (what == 'N')
+ if (revoke_grant)
{ // no row, no revoke
my_error(ER_NONEXISTING_GRANT, MYF(0), combo.user.str, combo.host.str);
goto abort;
@@ -4611,6 +5034,13 @@ replace_proxies_priv_table(THD *thd, TABLE *table, const LEX_USER *user,
DBUG_ENTER("replace_proxies_priv_table");
+ if (!table)
+ {
+ my_error(ER_NO_SUCH_TABLE, MYF(0), MYSQL_SCHEMA_NAME.str,
+ MYSQL_TABLE_NAME[PROXIES_PRIV_TABLE].str);
+ DBUG_RETURN(-1);
+ }
+
/* Check if there is such a user in user table in memory? */
if (!find_user_wild(user->host.str,user->user.str))
{
@@ -4746,7 +5176,7 @@ public:
char *db, *user, *tname, *hash_key;
ulong privs;
ulong init_privs; /* privileges found in physical table */
- ulong sort;
+ ulonglong sort;
size_t key_length;
GRANT_NAME(const char *h, const char *d,const char *u,
const char *t, ulong p, bool is_routine);
@@ -4792,7 +5222,7 @@ void GRANT_NAME::set_user_details(const char *h, const char *d,
my_casedn_str(files_charset_info, db);
}
user = strdup_root(&grant_memroot,u);
- sort= get_sort(3,host.hostname,db,user);
+ sort= get_magic_sort("hdu", host.hostname, db, user);
if (tname != t)
{
tname= strdup_root(&grant_memroot, t);
@@ -4834,7 +5264,6 @@ GRANT_NAME::GRANT_NAME(TABLE *form, bool is_routine)
update_hostname(&host, hostname);
db= get_field(&grant_memroot,form->field[1]);
- sort= get_sort(3, host.hostname, db, user);
tname= get_field(&grant_memroot,form->field[3]);
if (!db || !tname)
{
@@ -4842,6 +5271,7 @@ GRANT_NAME::GRANT_NAME(TABLE *form, bool is_routine)
privs= 0;
return; /* purecov: inspected */
}
+ sort= get_magic_sort("hdu", host.hostname, db, user);
if (lower_case_table_names)
{
my_casedn_str(files_charset_info, db);
@@ -5020,7 +5450,7 @@ routine_hash_search(const char *host, const char *ip, const char *db,
const char *user, const char *tname, const Sp_handler *sph,
bool exact)
{
- return (GRANT_TABLE*)
+ return (GRANT_NAME*)
name_hash_search(sph->get_priv_hash(),
host, ip, db, user, tname, exact, TRUE);
}
@@ -5034,6 +5464,10 @@ table_hash_search(const char *host, const char *ip, const char *db,
user, tname, exact, FALSE);
}
+static bool column_priv_insert(GRANT_TABLE *grant)
+{
+ return my_hash_insert(&column_priv_hash,(uchar*) grant);
+}
static GRANT_COLUMN *
column_hash_search(GRANT_TABLE *t, const char *cname, size_t length)
@@ -5263,6 +5697,15 @@ static inline void get_grantor(THD *thd, char *grantor)
strxmov(grantor, user, "@", host, NullS);
}
+
+/**
+ Revoke rights from a grant table entry.
+
+ @return 0 ok
+ @return 1 fatal error (error given)
+ @return -1 grant table was revoked
+*/
+
static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
TABLE *table, const LEX_USER &combo,
const char *db, const char *table_name,
@@ -5287,7 +5730,7 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
{
my_message(ER_PASSWORD_NO_MATCH, ER_THD(thd, ER_PASSWORD_NO_MATCH),
MYF(0)); /* purecov: deadcode */
- DBUG_RETURN(-1); /* purecov: deadcode */
+ DBUG_RETURN(1); /* purecov: deadcode */
}
}
@@ -5318,7 +5761,7 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
my_error(ER_NONEXISTING_TABLE_GRANT, MYF(0),
combo.user.str, combo.host.str,
table_name); /* purecov: deadcode */
- DBUG_RETURN(-1); /* purecov: deadcode */
+ DBUG_RETURN(1); /* purecov: deadcode */
}
old_row_exists = 0;
restore_record(table,record[1]); // Get saved record
@@ -5381,13 +5824,14 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
else
{
my_hash_delete(&column_priv_hash,(uchar*) grant_table);
+ DBUG_RETURN(-1); // Entry revoked
}
DBUG_RETURN(0);
/* This should never happen */
table_error:
table->file->print_error(error,MYF(0)); /* purecov: deadcode */
- DBUG_RETURN(-1); /* purecov: deadcode */
+ DBUG_RETURN(1); /* purecov: deadcode */
}
@@ -5408,6 +5852,13 @@ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name,
HASH *hash= sph->get_priv_hash();
DBUG_ENTER("replace_routine_table");
+ if (!table)
+ {
+ my_error(ER_NO_SUCH_TABLE, MYF(0), MYSQL_SCHEMA_NAME.str,
+ MYSQL_TABLE_NAME[PROCS_PRIV_TABLE].str);
+ DBUG_RETURN(-1);
+ }
+
if (revoke_grant && !grant_name->init_privs) // only inherited role privs
{
my_hash_delete(hash, (uchar*) grant_name);
@@ -5922,7 +6373,7 @@ static int update_role_db(int merged, int first, ulong access,
acl_db.db= acl_dbs.at(first).db;
acl_db.access= access;
acl_db.initial_access= 0;
- acl_db.sort=get_sort(3, "", acl_db.db, role);
+ acl_db.sort= get_magic_sort("hdu", "", acl_db.db, role);
acl_dbs.push(acl_db);
return 2;
}
@@ -6005,22 +6456,29 @@ static bool merge_role_db_privileges(ACL_ROLE *grantee, const char *dbname,
}
update_flags|= update_role_db(merged, first, access, grantee->user.str);
- /*
- to make this code a bit simpler, we sort on deletes, to move
- deleted elements to the end of the array. strictly speaking it's
- unnecessary, it'd be faster to remove them in one O(N) array scan.
-
- on the other hand, qsort on almost sorted array is pretty fast anyway...
- */
- if (update_flags & (2|4))
- { // inserted or deleted, need to sort
- acl_dbs.sort((acl_dbs_cmp)acl_compare);
- }
if (update_flags & 4)
- { // deleted, trim the end
- while (acl_dbs.elements() && acl_dbs.back()->sort == 0)
- acl_dbs.pop();
+ {
+ // Remove elements marked for deletion.
+ uint count= 0;
+ for(uint i= 0; i < acl_dbs.elements(); i++)
+ {
+ ACL_DB *acl_db= &acl_dbs.at(i);
+ if (acl_db->sort)
+ {
+ if (i > count)
+ acl_dbs.set(count, *acl_db);
+ count++;
+ }
+ }
+ acl_dbs.elements(count);
}
+
+
+ if (update_flags & 2)
+ { // inserted, need to sort
+ rebuild_acl_dbs();
+ }
+
return update_flags;
}
@@ -6134,7 +6592,7 @@ static int update_role_table_columns(GRANT_TABLE *merged,
privs, cols);
merged->init_privs= merged->init_cols= 0;
update_role_columns(merged, first, last);
- my_hash_insert(&column_priv_hash,(uchar*) merged);
+ column_priv_insert(merged);
return 2;
}
else if ((privs | cols) == 0)
@@ -6406,33 +6864,17 @@ static bool merge_one_role_privileges(ACL_ROLE *grantee)
static bool has_auth(LEX_USER *user, LEX *lex)
{
- return user->pwtext.length || user->pwhash.length || user->plugin.length || user->auth.length ||
- lex->ssl_type != SSL_TYPE_NOT_SPECIFIED || lex->ssl_cipher ||
- lex->x509_issuer || lex->x509_subject ||
- lex->mqh.specified_limits;
-}
-
-static bool fix_and_copy_user(LEX_USER *to, LEX_USER *from, THD *thd)
-{
- if (to != from)
- {
- /* preserve authentication information, if LEX_USER was reallocated */
- to->pwtext= from->pwtext;
- to->pwhash= from->pwhash;
- to->plugin= from->plugin;
- to->auth= from->auth;
- }
-
- if (fix_lex_user(thd, to))
- return true;
-
- return false;
+ return user->has_auth() ||
+ lex->account_options.ssl_type != SSL_TYPE_NOT_SPECIFIED ||
+ lex->account_options.ssl_cipher.str ||
+ lex->account_options.x509_issuer.str ||
+ lex->account_options.x509_subject.str ||
+ lex->account_options.specified_limits;
}
static bool copy_and_check_auth(LEX_USER *to, LEX_USER *from, THD *thd)
{
- if (fix_and_copy_user(to, from, thd))
- return true;
+ to->auth= from->auth;
// if changing auth for an existing user
if (has_auth(to, thd->lex) && find_user_exact(to->host.str, to->user.str))
@@ -6470,7 +6912,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
bool revoke_grant)
{
ulong column_priv= 0;
- int result;
+ int result, res;
List_iterator <LEX_USER> str_list (user_list);
LEX_USER *Str, *tmp_Str;
bool create_new_users=0;
@@ -6544,10 +6986,10 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
Open the mysql.user and mysql.tables_priv tables.
Don't open column table if we don't need it !
*/
- int maybe_columns_priv= 0;
+ int tables_to_open= Table_user | Table_tables_priv;
if (column_priv ||
(revoke_grant && ((rights & COL_ACLS) || columns.elements)))
- maybe_columns_priv= Table_columns_priv;
+ tables_to_open|= Table_columns_priv;
/*
The lock api is depending on the thd->lex variable which needs to be
@@ -6562,9 +7004,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
*/
thd->lex->sql_command= backup.sql_command;
- Grant_tables tables(Table_user | Table_tables_priv | maybe_columns_priv,
- TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_WRITE)))
{
thd->lex->restore_backup_query_tables_list(&backup);
DBUG_RETURN(result != 1);
@@ -6589,7 +7030,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
}
/* Create user if needed */
error= copy_and_check_auth(Str, tmp_Str, thd) ||
- replace_user_table(thd, tables.user_table(), *Str,
+ replace_user_table(thd, tables.user_table(), Str,
0, revoke_grant, create_new_users,
MY_TEST(thd->variables.sql_mode &
MODE_NO_AUTO_CREATE_USER));
@@ -6614,12 +7055,12 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
result= TRUE;
continue;
}
- grant_table = new GRANT_TABLE (Str->host.str, db_name,
- Str->user.str, table_name,
- rights,
- column_priv);
+ grant_table= new (&grant_memroot) GRANT_TABLE(Str->host.str, db_name,
+ Str->user.str, table_name,
+ rights,
+ column_priv);
if (!grant_table ||
- my_hash_insert(&column_priv_hash,(uchar*) grant_table))
+ column_priv_insert(grant_table))
{
result= TRUE; /* purecov: deadcode */
continue; /* purecov: deadcode */
@@ -6662,22 +7103,24 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
/* TODO(cvicentiu) refactor replace_table_table to use Tables_priv_table
instead of TABLE directly. */
- if (replace_table_table(thd, grant_table, tables.tables_priv_table().table(),
- *Str, db_name, table_name,
- rights, column_priv, revoke_grant))
- {
- /* Should only happen if table is crashed */
- result= TRUE; /* purecov: deadcode */
- }
- else if (tables.columns_priv_table().table_exists())
+ if (tables.columns_priv_table().table_exists())
{
/* TODO(cvicentiu) refactor replace_column_table to use Columns_priv_table
instead of TABLE directly. */
if (replace_column_table(grant_table, tables.columns_priv_table().table(),
*Str, columns, db_name, table_name, rights,
revoke_grant))
- {
result= TRUE;
+ }
+ if ((res= replace_table_table(thd, grant_table,
+ tables.tables_priv_table().table(),
+ *Str, db_name, table_name,
+ rights, column_priv, revoke_grant)))
+ {
+ if (res > 0)
+ {
+ /* Should only happen if table is crashed */
+ result= TRUE; /* purecov: deadcode */
}
}
if (Str->is_role())
@@ -6689,9 +7132,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
mysql_mutex_unlock(&acl_cache->lock);
if (!result) /* success */
- {
result= write_bin_log(thd, TRUE, thd->query(), thd->query_length());
- }
mysql_rwlock_unlock(&LOCK_grant);
@@ -6744,8 +7185,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list,
DBUG_RETURN(TRUE);
}
- Grant_tables tables(Table_user | Table_procs_priv, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ if ((result= tables.open_and_lock(thd, Table_user | Table_procs_priv, TL_WRITE)))
DBUG_RETURN(result != 1);
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
@@ -6769,7 +7210,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list,
}
/* Create user if needed */
if (copy_and_check_auth(Str, tmp_Str, thd) ||
- replace_user_table(thd, tables.user_table(), *Str,
+ replace_user_table(thd, tables.user_table(), Str,
0, revoke_grant, create_new_users,
MY_TEST(thd->variables.sql_mode &
MODE_NO_AUTO_CREATE_USER)))
@@ -6802,12 +7243,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list,
}
}
- /* TODO(cvicentiu) refactor replace_routine_table to use Tables_procs_priv
- instead of TABLE directly. */
- if (tables.procs_priv_table().no_such_table() ||
- replace_routine_table(thd, grant_name, tables.procs_priv_table().table(),
- *Str, db_name, table_name, sph, rights,
- revoke_grant) != 0)
+ if (replace_routine_table(thd, grant_name, tables.procs_priv_table().table(),
+ *Str, db_name, table_name, sph, rights, revoke_grant) != 0)
{
result= TRUE;
continue;
@@ -6945,8 +7382,8 @@ bool mysql_grant_role(THD *thd, List <LEX_USER> &list, bool revoke)
no_auto_create_user= MY_TEST(thd->variables.sql_mode &
MODE_NO_AUTO_CREATE_USER);
- Grant_tables tables(Table_user | Table_roles_mapping, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ if ((result= tables.open_and_lock(thd, Table_user | Table_roles_mapping, TL_WRITE)))
DBUG_RETURN(result != 1);
mysql_rwlock_wrlock(&LOCK_grant);
@@ -7045,7 +7482,7 @@ bool mysql_grant_role(THD *thd, List <LEX_USER> &list, bool revoke)
user_combo.user = username;
if (copy_and_check_auth(&user_combo, &user_combo, thd) ||
- replace_user_table(thd, tables.user_table(), user_combo, 0,
+ replace_user_table(thd, tables.user_table(), &user_combo, 0,
false, create_new_user,
no_auto_create_user))
{
@@ -7185,9 +7622,9 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
proxied_user= str_list++;
}
- Grant_tables tables(Table_user | (is_proxy ? Table_proxies_priv : Table_db),
- TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ const uint tables_to_open= Table_user | (is_proxy ? Table_proxies_priv : Table_db);
+ Grant_tables tables;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_WRITE)))
DBUG_RETURN(result != 1);
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
@@ -7216,7 +7653,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
}
if (copy_and_check_auth(Str, tmp_Str, thd) ||
- replace_user_table(thd, tables.user_table(), *Str,
+ replace_user_table(thd, tables.user_table(), Str,
(!db ? rights : 0), revoke_grant, create_new_users,
MY_TEST(thd->variables.sql_mode &
MODE_NO_AUTO_CREATE_USER)))
@@ -7238,13 +7675,8 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
}
else if (is_proxy)
{
- /* TODO(cvicentiu) refactor replace_proxies_priv_table to use
- Proxies_priv_table instead of TABLE directly. */
- if (tables.proxies_priv_table().no_such_table() ||
- replace_proxies_priv_table (thd, tables.proxies_priv_table().table(),
- Str, proxied_user,
- rights & GRANT_ACL ? TRUE : FALSE,
- revoke_grant))
+ if (replace_proxies_priv_table(thd, tables.proxies_priv_table().table(),
+ Str, proxied_user, rights & GRANT_ACL ? TRUE : FALSE, revoke_grant))
result= true;
}
if (Str->is_role())
@@ -7380,8 +7812,7 @@ static bool grant_load(THD *thd,
{
sql_print_warning("'tables_priv' entry '%s %s@%s' "
"ignored in --skip-name-resolve mode.",
- mem_check->tname,
- safe_str(mem_check->user),
+ mem_check->tname, mem_check->user,
safe_str(mem_check->host.hostname));
continue;
}
@@ -7389,7 +7820,7 @@ static bool grant_load(THD *thd,
if (! mem_check->ok())
delete mem_check;
- else if (my_hash_insert(&column_priv_hash,(uchar*) mem_check))
+ else if (column_priv_insert(mem_check))
{
delete mem_check;
goto end_unlock;
@@ -7507,9 +7938,9 @@ bool grant_reload(THD *thd)
obtaining LOCK_grant rwlock.
*/
- Grant_tables tables(Table_tables_priv | Table_columns_priv| Table_procs_priv,
- TL_READ);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ const uint tables_to_open= Table_tables_priv | Table_columns_priv| Table_procs_priv;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_READ)))
DBUG_RETURN(result != 1);
mysql_rwlock_wrlock(&LOCK_grant);
@@ -8025,7 +8456,8 @@ bool check_grant_all_columns(THD *thd, ulong want_access_arg,
grant_table= grant->grant_table_user;
grant_table_role= grant->grant_table_role;
- DBUG_ASSERT (grant_table || grant_table_role);
+ if (!grant_table && !grant_table_role)
+ goto err;
}
}
@@ -8447,26 +8879,31 @@ static void add_user_parameters(THD *thd, String *result, ACL_USER* acl_user,
append_identifier(thd, result, acl_user->host.hostname,
acl_user->hostname_length);
- if (acl_user->plugin.str == native_password_plugin_name.str ||
- acl_user->plugin.str == old_password_plugin_name.str)
+ if (acl_user->nauth == 1 &&
+ (acl_user->auth->plugin.str == native_password_plugin_name.str ||
+ acl_user->auth->plugin.str == old_password_plugin_name.str))
{
- if (acl_user->auth_string.length)
+ if (acl_user->auth->auth_string.length)
{
- DBUG_ASSERT(acl_user->salt_len);
result->append(STRING_WITH_LEN(" IDENTIFIED BY PASSWORD '"));
- result->append(&acl_user->auth_string);
+ result->append(&acl_user->auth->auth_string);
result->append('\'');
}
}
else
{
result->append(STRING_WITH_LEN(" IDENTIFIED VIA "));
- result->append(&acl_user->plugin);
- if (acl_user->auth_string.length)
+ for (uint i=0; i < acl_user->nauth; i++)
{
- result->append(STRING_WITH_LEN(" USING '"));
- result->append(&acl_user->auth_string);
- result->append('\'');
+ if (i)
+ result->append(STRING_WITH_LEN(" OR "));
+ result->append(&acl_user->auth[i].plugin);
+ if (acl_user->auth[i].auth_string.length)
+ {
+ result->append(STRING_WITH_LEN(" USING '"));
+ result->append(&acl_user->auth[i].auth_string);
+ result->append('\'');
+ }
}
}
/* "show grants" SSL related stuff */
@@ -8478,14 +8915,14 @@ static void add_user_parameters(THD *thd, String *result, ACL_USER* acl_user,
{
int ssl_options = 0;
result->append(STRING_WITH_LEN(" REQUIRE "));
- if (acl_user->x509_issuer)
+ if (acl_user->x509_issuer[0])
{
ssl_options++;
result->append(STRING_WITH_LEN("ISSUER \'"));
result->append(acl_user->x509_issuer,strlen(acl_user->x509_issuer));
result->append('\'');
}
- if (acl_user->x509_subject)
+ if (acl_user->x509_subject[0])
{
if (ssl_options++)
result->append(' ');
@@ -8581,6 +9018,16 @@ static bool print_grants_for_role(THD *thd, ACL_ROLE * role)
}
+static void append_auto_expiration_policy(ACL_USER *acl_user, String *r) {
+ if (!acl_user->password_lifetime)
+ r->append(STRING_WITH_LEN(" PASSWORD EXPIRE NEVER"));
+ else if (acl_user->password_lifetime > 0)
+ {
+ r->append(STRING_WITH_LEN(" PASSWORD EXPIRE INTERVAL "));
+ r->append_longlong(acl_user->password_lifetime);
+ r->append(STRING_WITH_LEN(" DAY"));
+ }
+}
bool mysql_show_create_user(THD *thd, LEX_USER *lex_user)
{
@@ -8592,6 +9039,11 @@ bool mysql_show_create_user(THD *thd, LEX_USER *lex_user)
uint head_length;
DBUG_ENTER("mysql_show_create_user");
+ if (!initialized)
+ {
+ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables");
+ DBUG_RETURN(TRUE);
+ }
if (get_show_user(thd, lex_user, &username, &hostname, NULL))
DBUG_RETURN(TRUE);
@@ -8630,12 +9082,42 @@ bool mysql_show_create_user(THD *thd, LEX_USER *lex_user)
append_identifier(thd, &result, username, strlen(username));
add_user_parameters(thd, &result, acl_user, false);
+ if (acl_user->account_locked)
+ result.append(STRING_WITH_LEN(" ACCOUNT LOCK"));
+
+ if (acl_user->password_expired)
+ result.append(STRING_WITH_LEN(" PASSWORD EXPIRE"));
+ else
+ append_auto_expiration_policy(acl_user, &result);
+
protocol->prepare_for_resend();
protocol->store(result.ptr(), result.length(), result.charset());
if (protocol->write())
{
error= true;
}
+
+ /* MDEV-24114 - PASSWORD EXPIRE and PASSWORD EXPIRE [NEVER | INTERVAL X DAY]
+ are two different mechanisms. To make sure a tool can restore the state
+ of a user account, including both the manual expiration state of the
+ account and the automatic expiration policy attached to it, we should
+ print two statements here, a CREATE USER (printed above) and an ALTER USER */
+ if (acl_user->password_expired && acl_user->password_lifetime > -1) {
+ result.length(0);
+ result.append("ALTER USER ");
+ append_identifier(thd, &result, username, strlen(username));
+ result.append('@');
+ append_identifier(thd, &result, acl_user->host.hostname,
+ acl_user->hostname_length);
+ append_auto_expiration_policy(acl_user, &result);
+ protocol->prepare_for_resend();
+ protocol->store(result.ptr(), result.length(), result.charset());
+ if (protocol->write())
+ {
+ error= true;
+ }
+ }
+
my_eof(thd);
end:
@@ -9015,7 +9497,7 @@ static bool show_database_privileges(THD *thd, const char *username,
const char *user, *host;
ACL_DB *acl_db= &acl_dbs.at(i);
- user= safe_str(acl_db->user);
+ user= acl_db->user;
host=acl_db->host.hostname;
/*
@@ -9093,7 +9575,7 @@ static bool show_table_and_column_privileges(THD *thd, const char *username,
GRANT_TABLE *grant_table= (GRANT_TABLE*)
my_hash_element(&column_priv_hash, index);
- user= safe_str(grant_table->user);
+ user= grant_table->user;
host= grant_table->host.hostname;
/*
@@ -9226,7 +9708,7 @@ static int show_routine_grants(THD* thd,
const char *user, *host;
GRANT_NAME *grant_proc= (GRANT_NAME*) my_hash_element(hash, index);
- user= safe_str(grant_proc->user);
+ user= grant_proc->user;
host= grant_proc->host.hostname;
/*
@@ -9554,7 +10036,7 @@ static int handle_grant_table(THD *thd, const Grant_table_base& grant_table,
if (!unlikely(error) && !*host_str)
{
// verify that we got a role or a user, as needed
- if (static_cast<const User_table&>(grant_table).check_is_role() !=
+ if (static_cast<const User_table&>(grant_table).get_is_role() !=
user_from->is_role())
error= HA_ERR_KEY_NOT_FOUND;
}
@@ -9718,8 +10200,7 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop,
my_hash_delete(&acl_roles, (uchar*) acl_role);
DBUG_RETURN(1);
}
- acl_role->user.str= strdup_root(&acl_memroot, user_to->user.str);
- acl_role->user.length= user_to->user.length;
+ acl_role->user= safe_lexcstrdup_root(&acl_memroot, user_to->user);
my_hash_update(&acl_roles, (uchar*) acl_role, (uchar*) old_key,
old_key_length);
@@ -9824,8 +10305,6 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop,
default:
DBUG_ASSERT(0);
}
- if (! user)
- user= "";
if (! host)
host= "";
@@ -9910,8 +10389,7 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop,
{
switch ( struct_no ) {
case USER_ACL:
- acl_user->user.str= strdup_root(&acl_memroot, user_to->user.str);
- acl_user->user.length= user_to->user.length;
+ acl_user->user= safe_lexcstrdup_root(&acl_memroot, user_to->user);
update_hostname(&acl_user->host, strdup_root(&acl_memroot, user_to->host.str));
acl_user->hostname_length= strlen(acl_user->host.hostname);
break;
@@ -10249,11 +10727,11 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list, bool handle_as_role)
DBUG_RETURN(TRUE);
/* CREATE USER may be skipped on replication client. */
- Grant_tables tables(Table_user | Table_db |
- Table_tables_priv | Table_columns_priv |
- Table_procs_priv | Table_proxies_priv |
- Table_roles_mapping, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ const uint tables_to_open= Table_user | Table_db | Table_tables_priv |
+ Table_columns_priv | Table_procs_priv |
+ Table_proxies_priv | Table_roles_mapping;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_WRITE)))
DBUG_RETURN(result != 1);
mysql_rwlock_wrlock(&LOCK_grant);
@@ -10285,13 +10763,6 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list, bool handle_as_role)
if (!user_name->host.str)
user_name->host= host_not_specified;
- if (fix_lex_user(thd, user_name))
- {
- append_user(thd, &wrong_users, user_name);
- result= TRUE;
- continue;
- }
-
/*
Search all in-memory structures and grant tables
for a mention of the new user/role name.
@@ -10336,7 +10807,7 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list, bool handle_as_role)
}
}
- if (replace_user_table(thd, tables.user_table(), *user_name, 0, 0, 1, 0))
+ if (replace_user_table(thd, tables.user_table(), user_name, 0, 0, 1, 0))
{
append_user(thd, &wrong_users, user_name);
result= TRUE;
@@ -10426,11 +10897,11 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list, bool handle_as_role)
DBUG_PRINT("entry", ("Handle as %s", handle_as_role ? "role" : "user"));
/* DROP USER may be skipped on replication client. */
- Grant_tables tables(Table_user | Table_db |
- Table_tables_priv | Table_columns_priv |
- Table_procs_priv | Table_proxies_priv |
- Table_roles_mapping, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ const uint tables_to_open= Table_user | Table_db | Table_tables_priv |
+ Table_columns_priv | Table_procs_priv |
+ Table_proxies_priv | Table_roles_mapping;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_WRITE)))
DBUG_RETURN(result != 1);
thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
@@ -10536,11 +11007,11 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list)
DBUG_ENTER("mysql_rename_user");
/* RENAME USER may be skipped on replication client. */
- Grant_tables tables(Table_user | Table_db |
- Table_tables_priv | Table_columns_priv |
- Table_procs_priv | Table_proxies_priv |
- Table_roles_mapping, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ const uint tables_to_open= Table_user | Table_db | Table_tables_priv |
+ Table_columns_priv | Table_procs_priv |
+ Table_proxies_priv | Table_roles_mapping;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_WRITE)))
DBUG_RETURN(result != 1);
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
@@ -10579,8 +11050,12 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list)
continue;
}
some_users_renamed= TRUE;
+ rebuild_acl_users();
}
+ /* Rebuild 'acl_dbs' since 'acl_users' has been modified */
+ rebuild_acl_dbs();
+
/* Rebuild 'acl_check_hosts' since 'acl_users' has been modified */
rebuild_check_host();
@@ -10622,8 +11097,8 @@ int mysql_alter_user(THD* thd, List<LEX_USER> &users_list)
bool some_users_altered= false;
/* The only table we're altering is the user table. */
- Grant_tables tables(Table_user, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ if ((result= tables.open_and_lock(thd, Table_user, TL_WRITE)))
DBUG_RETURN(result != 1);
/* Lock ACL data structures until we finish altering all users. */
@@ -10632,13 +11107,12 @@ int mysql_alter_user(THD* thd, List<LEX_USER> &users_list)
LEX_USER *tmp_lex_user;
List_iterator<LEX_USER> users_list_iterator(users_list);
+
while ((tmp_lex_user= users_list_iterator++))
{
LEX_USER* lex_user= get_current_user(thd, tmp_lex_user, false);
- if (!lex_user ||
- fix_lex_user(thd, lex_user) ||
- replace_user_table(thd, tables.user_table(), *lex_user, 0,
- false, false, true))
+ if (!lex_user || replace_user_table(thd, tables.user_table(), lex_user, 0,
+ false, false, true))
{
thd->clear_error();
append_user(thd, &wrong_users, tmp_lex_user);
@@ -10679,9 +11153,7 @@ int mysql_alter_user(THD* thd, List<LEX_USER> &users_list)
static bool
-mysql_revoke_sp_privs(THD *thd,
- Grant_tables *tables,
- const Sp_handler *sph,
+mysql_revoke_sp_privs(THD *thd, Grant_tables *tables, const Sp_handler *sph,
const LEX_USER *lex_user)
{
bool rc= false;
@@ -10692,7 +11164,7 @@ mysql_revoke_sp_privs(THD *thd,
{
const char *user,*host;
GRANT_NAME *grant_proc= (GRANT_NAME*) my_hash_element(hash, counter);
- user= safe_str(grant_proc->user);
+ user= grant_proc->user;
host= safe_str(grant_proc->host.hostname);
if (!strcmp(lex_user->user.str, user) &&
@@ -10733,15 +11205,15 @@ mysql_revoke_sp_privs(THD *thd,
bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
{
uint counter, revoked;
- int result;
+ int result, res;
ACL_DB *acl_db;
DBUG_ENTER("mysql_revoke_all");
- Grant_tables tables(Table_user | Table_db |
- Table_tables_priv | Table_columns_priv |
- Table_procs_priv | Table_proxies_priv |
- Table_roles_mapping, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ const uint tables_to_open= Table_user | Table_db | Table_tables_priv |
+ Table_columns_priv | Table_procs_priv |
+ Table_proxies_priv | Table_roles_mapping;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_WRITE)))
DBUG_RETURN(result != 1);
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
@@ -10767,7 +11239,7 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
continue;
}
- if (replace_user_table(thd, tables.user_table(), *lex_user,
+ if (replace_user_table(thd, tables.user_table(), lex_user,
~(ulong)0, 1, 0, 0))
{
result= -1;
@@ -10784,11 +11256,11 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
{
for (counter= 0, revoked= 0 ; counter < acl_dbs.elements() ; )
{
- const char *user,*host;
+ const char *user, *host;
- acl_db=&acl_dbs.at(counter);
+ acl_db= &acl_dbs.at(counter);
- user= safe_str(acl_db->user);
+ user= acl_db->user;
host= safe_str(acl_db->host.hostname);
if (!strcmp(lex_user->user.str, user) &&
@@ -10820,42 +11292,41 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
const char *user,*host;
GRANT_TABLE *grant_table=
(GRANT_TABLE*) my_hash_element(&column_priv_hash, counter);
- user= safe_str(grant_table->user);
+ user= grant_table->user;
host= safe_str(grant_table->host.hostname);
if (!strcmp(lex_user->user.str,user) &&
!strcmp(lex_user->host.str, host))
{
- /* TODO(cvicentiu) refactor replace_db_table to use
- Db_table instead of TABLE directly. */
- if (replace_table_table(thd, grant_table,
- tables.tables_priv_table().table(),
- *lex_user, grant_table->db,
- grant_table->tname, ~(ulong)0, 0, 1))
- {
+ List<LEX_COLUMN> columns;
+ /* TODO(cvicentiu) refactor replace_db_table to use
+ Db_table instead of TABLE directly. */
+ if (replace_column_table(grant_table,
+ tables.columns_priv_table().table(),
+ *lex_user, columns, grant_table->db,
+ grant_table->tname, ~(ulong)0, 1))
result= -1;
- }
- else
+
+ /* TODO(cvicentiu) refactor replace_db_table to use
+ Db_table instead of TABLE directly. */
+ if ((res= replace_table_table(thd, grant_table,
+ tables.tables_priv_table().table(),
+ *lex_user, grant_table->db,
+ grant_table->tname, ~(ulong)0, 0, 1)))
{
- if (!grant_table->cols)
- {
- revoked= 1;
- continue;
- }
- List<LEX_COLUMN> columns;
- /* TODO(cvicentiu) refactor replace_db_table to use
- Db_table instead of TABLE directly. */
- if (!replace_column_table(grant_table,
- tables.columns_priv_table().table(),
- *lex_user, columns, grant_table->db,
- grant_table->tname, ~(ulong)0, 1))
- {
- revoked= 1;
- continue;
- }
- result= -1;
- }
- }
+ if (res > 0)
+ result= -1;
+ else
+ {
+ /*
+ Entry was deleted. We have to retry the loop as the
+ hash table has probably been reorganized.
+ */
+ revoked= 1;
+ continue;
+ }
+ }
+ }
counter++;
}
} while (revoked);
@@ -11025,11 +11496,11 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name,
Silence_routine_definer_errors error_handler;
DBUG_ENTER("sp_revoke_privileges");
- Grant_tables tables(Table_user | Table_db |
- Table_tables_priv | Table_columns_priv |
- Table_procs_priv | Table_proxies_priv |
- Table_roles_mapping, TL_WRITE);
- if ((result= tables.open_and_lock(thd)))
+ Grant_tables tables;
+ const uint tables_to_open= Table_user | Table_db | Table_tables_priv |
+ Table_columns_priv | Table_procs_priv |
+ Table_proxies_priv | Table_roles_mapping;
+ if ((result= tables.open_and_lock(thd, tables_to_open, TL_WRITE)))
DBUG_RETURN(result != 1);
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
@@ -11128,20 +11599,12 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
thd->make_lex_string(&combo->user, combo->user.str, strlen(combo->user.str));
thd->make_lex_string(&combo->host, combo->host.str, strlen(combo->host.str));
- combo->reset_auth();
-
- if(au)
- {
- combo->plugin= au->plugin;
- combo->auth= au->auth_string;
- }
+ combo->auth= NULL;
if (user_list.push_back(combo, thd->mem_root))
DBUG_RETURN(TRUE);
- thd->lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
- thd->lex->ssl_cipher= thd->lex->x509_subject= thd->lex->x509_issuer= 0;
- bzero((char*) &thd->lex->mqh, sizeof(thd->lex->mqh));
+ thd->lex->account_options.reset();
/*
Only care about whether the operation failed or succeeded
@@ -11228,9 +11691,7 @@ acl_check_proxy_grant_access(THD *thd, const char *host, const char *user,
or revoking proxy privilege, user is expected to provide entries mentioned
in mysql.user table.
*/
- if (!strcmp(thd->security_ctx->priv_user, user) &&
- !my_strcasecmp(system_charset_info, host,
- thd->security_ctx->priv_host))
+ if (thd->security_ctx->is_priv_user(user, host))
{
DBUG_PRINT("info", ("strcmp (%s, %s) my_casestrcmp (%s, %s) equal",
thd->security_ctx->priv_user, user,
@@ -11399,10 +11860,10 @@ static int show_database_grants(THD *thd, SHOW_VAR *var, char *buff,
}
#else
+static bool set_user_salt_if_needed(ACL_USER *, int, plugin_ref)
+{ return 0; }
bool check_grant(THD *, ulong, TABLE_LIST *, bool, uint, bool)
-{
- return 0;
-}
+{ return 0; }
#endif /*NO_EMBEDDED_ACCESS_CHECKS */
SHOW_VAR acl_statistics[] = {
@@ -11438,7 +11899,7 @@ bool check_role_is_granted(const char *username,
ACL_USER_BASE *root;
mysql_mutex_lock(&acl_cache->lock);
if (hostname)
- root= find_user_exact(username, hostname);
+ root= find_user_exact(hostname, username);
else
root= find_acl_role(username);
@@ -11615,7 +12076,6 @@ int fill_schema_user_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
TABLE *table= tables->table;
bool no_global_access= check_access(thd, SELECT_ACL, "mysql",
NULL, NULL, 1, 1);
- char *curr_host= thd->security_ctx->priv_host_name();
DBUG_ENTER("fill_schema_user_privileges");
if (!initialized)
@@ -11626,12 +12086,11 @@ int fill_schema_user_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
{
const char *user,*host, *is_grantable="YES";
acl_user=dynamic_element(&acl_users,counter,ACL_USER*);
- user= safe_str(acl_user->user.str);
+ user= acl_user->user.str;
host= safe_str(acl_user->host.hostname);
if (no_global_access &&
- (strcmp(thd->security_ctx->priv_user, user) ||
- my_strcasecmp(system_charset_info, curr_host, host)))
+ !thd->security_ctx->is_priv_user(user, host))
continue;
want_access= acl_user->access;
@@ -11687,7 +12146,6 @@ int fill_schema_schema_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
TABLE *table= tables->table;
bool no_global_access= check_access(thd, SELECT_ACL, "mysql",
NULL, NULL, 1, 1);
- char *curr_host= thd->security_ctx->priv_host_name();
DBUG_ENTER("fill_schema_schema_privileges");
if (!initialized)
@@ -11699,12 +12157,11 @@ int fill_schema_schema_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
const char *user, *host, *is_grantable="YES";
acl_db=&acl_dbs.at(counter);
- user= safe_str(acl_db->user);
+ user= acl_db->user;
host= safe_str(acl_db->host.hostname);
if (no_global_access &&
- (strcmp(thd->security_ctx->priv_user, user) ||
- my_strcasecmp(system_charset_info, curr_host, host)))
+ !thd->security_ctx->is_priv_user(user, host))
continue;
want_access=acl_db->access;
@@ -11761,7 +12218,6 @@ int fill_schema_table_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
TABLE *table= tables->table;
bool no_global_access= check_access(thd, SELECT_ACL, "mysql",
NULL, NULL, 1, 1);
- char *curr_host= thd->security_ctx->priv_host_name();
DBUG_ENTER("fill_schema_table_privileges");
mysql_rwlock_rdlock(&LOCK_grant);
@@ -11771,12 +12227,11 @@ int fill_schema_table_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
const char *user, *host, *is_grantable= "YES";
GRANT_TABLE *grant_table= (GRANT_TABLE*) my_hash_element(&column_priv_hash,
index);
- user= safe_str(grant_table->user);
+ user= grant_table->user;
host= safe_str(grant_table->host.hostname);
if (no_global_access &&
- (strcmp(thd->security_ctx->priv_user, user) ||
- my_strcasecmp(system_charset_info, curr_host, host)))
+ !thd->security_ctx->is_priv_user(user, host))
continue;
ulong table_access= grant_table->privs;
@@ -11844,7 +12299,6 @@ int fill_schema_column_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
TABLE *table= tables->table;
bool no_global_access= check_access(thd, SELECT_ACL, "mysql",
NULL, NULL, 1, 1);
- char *curr_host= thd->security_ctx->priv_host_name();
DBUG_ENTER("fill_schema_table_privileges");
mysql_rwlock_rdlock(&LOCK_grant);
@@ -11854,12 +12308,11 @@ int fill_schema_column_privileges(THD *thd, TABLE_LIST *tables, COND *cond)
const char *user, *host, *is_grantable= "YES";
GRANT_TABLE *grant_table= (GRANT_TABLE*) my_hash_element(&column_priv_hash,
index);
- user= safe_str(grant_table->user);
+ user= grant_table->user;
host= safe_str(grant_table->host.hostname);
if (no_global_access &&
- (strcmp(thd->security_ctx->priv_user, user) ||
- my_strcasecmp(system_charset_info, curr_host, host)))
+ !thd->security_ctx->is_priv_user(user, host))
continue;
ulong table_access= grant_table->cols;
@@ -12199,6 +12652,7 @@ struct MPVIO_EXT :public MYSQL_PLUGIN_VIO
char *pkt;
uint pkt_len;
} cached_server_packet;
+ uint curr_auth; ///< an index in acl_user->auth[]
int packets_read, packets_written; ///< counters for send/received packets
bool make_it_fail;
/** when plugin returns a failure this tells us what really happened */
@@ -12262,7 +12716,7 @@ static void login_failed_error(THD *thd)
static bool send_server_handshake_packet(MPVIO_EXT *mpvio,
const char *data, uint data_len)
{
- DBUG_ASSERT(mpvio->status == MPVIO_EXT::FAILURE);
+ DBUG_ASSERT(mpvio->status == MPVIO_EXT::RESTART);
DBUG_ASSERT(data_len <= 255);
THD *thd= mpvio->auth_info.thd;
@@ -12417,14 +12871,10 @@ static bool secure_auth(THD *thd)
static bool send_plugin_request_packet(MPVIO_EXT *mpvio,
const uchar *data, uint data_len)
{
- DBUG_ASSERT(mpvio->packets_written == 1);
- DBUG_ASSERT(mpvio->packets_read == 1);
NET *net= &mpvio->auth_info.thd->net;
static uchar switch_plugin_request_buf[]= { 254 };
DBUG_ENTER("send_plugin_request_packet");
- mpvio->status= MPVIO_EXT::FAILURE; // the status is no longer RESTART
-
const char *client_auth_plugin=
((st_mysql_auth *) (plugin_decl(mpvio->plugin)->info))->client_auth_plugin;
@@ -12442,8 +12892,9 @@ static bool send_plugin_request_packet(MPVIO_EXT *mpvio,
user account, it's the plugin that the client need to use to login.
*/
bool switch_from_long_to_short_scramble=
- native_password_plugin_name.str == mpvio->cached_client_reply.plugin &&
- client_auth_plugin == old_password_plugin_name.str;
+ client_auth_plugin == old_password_plugin_name.str &&
+ my_strcasecmp(system_charset_info, mpvio->cached_client_reply.plugin,
+ native_password_plugin_name.str) == 0;
if (switch_from_long_to_short_scramble)
DBUG_RETURN (secure_auth(mpvio->auth_info.thd) ||
@@ -12456,8 +12907,9 @@ static bool send_plugin_request_packet(MPVIO_EXT *mpvio,
ask an old 4.0 client to use the new 4.1 authentication protocol.
*/
bool switch_from_short_to_long_scramble=
- old_password_plugin_name.str == mpvio->cached_client_reply.plugin &&
- client_auth_plugin == native_password_plugin_name.str;
+ client_auth_plugin == native_password_plugin_name.str &&
+ my_strcasecmp(system_charset_info, mpvio->cached_client_reply.plugin,
+ old_password_plugin_name.str) == 0;
if (switch_from_short_to_long_scramble)
{
@@ -12476,6 +12928,23 @@ static bool send_plugin_request_packet(MPVIO_EXT *mpvio,
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
+
+/**
+ Safeguard to avoid blocking the root, when max_password_errors
+ limit is reached.
+
+ Currently, we allow password errors for superuser on localhost.
+
+ @return true, if password errors should be ignored, and user should not be locked.
+*/
+static bool ignore_max_password_errors(const ACL_USER *acl_user)
+{
+ const char *host= acl_user->host.hostname;
+ return (acl_user->access & SUPER_ACL)
+ && (!strcasecmp(host, "localhost") ||
+ !strcmp(host, "127.0.0.1") ||
+ !strcmp(host, "::1"));
+}
/**
Finds acl entry in user database for authentication purposes.
@@ -12494,6 +12963,7 @@ static bool find_mpvio_user(MPVIO_EXT *mpvio)
mysql_mutex_lock(&acl_cache->lock);
ACL_USER *user= find_user_or_anon(sctx->host, sctx->user, sctx->ip);
+
if (user)
mpvio->acl_user= user->copy(mpvio->auth_info.thd->mem_root);
@@ -12530,33 +13000,29 @@ static bool find_mpvio_user(MPVIO_EXT *mpvio)
mpvio->make_it_fail= true;
}
+ if (mpvio->acl_user->password_errors >= max_password_errors &&
+ !ignore_max_password_errors(mpvio->acl_user))
+ {
+ my_error(ER_USER_IS_BLOCKED, MYF(0));
+ general_log_print(mpvio->auth_info.thd, COM_CONNECT,
+ ER_THD(mpvio->auth_info.thd, ER_USER_IS_BLOCKED));
+ DBUG_RETURN(1);
+ }
+
/* user account requires non-default plugin and the client is too old */
- if (mpvio->acl_user->plugin.str != native_password_plugin_name.str &&
- mpvio->acl_user->plugin.str != old_password_plugin_name.str &&
+ if (mpvio->acl_user->auth->plugin.str != native_password_plugin_name.str &&
+ mpvio->acl_user->auth->plugin.str != old_password_plugin_name.str &&
!(mpvio->auth_info.thd->client_capabilities & CLIENT_PLUGIN_AUTH))
{
- DBUG_ASSERT(my_strcasecmp(system_charset_info, mpvio->acl_user->plugin.str,
- native_password_plugin_name.str));
- DBUG_ASSERT(my_strcasecmp(system_charset_info, mpvio->acl_user->plugin.str,
- old_password_plugin_name.str));
+ DBUG_ASSERT(my_strcasecmp(system_charset_info,
+ mpvio->acl_user->auth->plugin.str, native_password_plugin_name.str));
+ DBUG_ASSERT(my_strcasecmp(system_charset_info,
+ mpvio->acl_user->auth->plugin.str, old_password_plugin_name.str));
my_error(ER_NOT_SUPPORTED_AUTH_MODE, MYF(0));
general_log_print(mpvio->auth_info.thd, COM_CONNECT,
ER_THD(mpvio->auth_info.thd, ER_NOT_SUPPORTED_AUTH_MODE));
DBUG_RETURN (1);
}
-
- mpvio->auth_info.user_name= sctx->user;
- mpvio->auth_info.user_name_length= (uint)strlen(sctx->user);
- mpvio->auth_info.auth_string= mpvio->acl_user->auth_string.str;
- mpvio->auth_info.auth_string_length= (unsigned long) mpvio->acl_user->auth_string.length;
- strmake_buf(mpvio->auth_info.authenticated_as, safe_str(mpvio->acl_user->user.str));
-
- DBUG_PRINT("info", ("exit: user=%s, auth_string=%s, authenticated as=%s"
- "plugin=%s",
- mpvio->auth_info.user_name,
- mpvio->auth_info.auth_string,
- mpvio->auth_info.authenticated_as,
- mpvio->acl_user->plugin.str));
DBUG_RETURN(0);
}
@@ -12700,7 +13166,7 @@ static bool parse_com_change_user_packet(MPVIO_EXT *mpvio, uint packet_length)
MYF(0));
DBUG_RETURN(1);
}
- client_plugin= fix_plugin_ptr(next_field);
+ client_plugin= next_field;
next_field+= strlen(next_field) + 1;
}
else
@@ -12709,21 +13175,18 @@ static bool parse_com_change_user_packet(MPVIO_EXT *mpvio, uint packet_length)
client_plugin= native_password_plugin_name.str;
else
{
- client_plugin= old_password_plugin_name.str;
/*
- For a passwordless accounts we use native_password_plugin.
- But when an old 4.0 client connects to it, we change it to
- old_password_plugin, otherwise MySQL will think that server
- and client plugins don't match.
+ Normally old clients use old_password_plugin, but for
+ a passwordless accounts we use native_password_plugin.
+ See guess_auth_plugin().
*/
- if (mpvio->acl_user->auth_string.length == 0)
- mpvio->acl_user->plugin= old_password_plugin_name;
+ client_plugin= passwd_len ? old_password_plugin_name.str
+ : native_password_plugin_name.str;
}
}
if ((thd->client_capabilities & CLIENT_CONNECT_ATTRS) &&
- read_client_connect_attrs(&next_field, end,
- thd->charset()))
+ read_client_connect_attrs(&next_field, end, thd->charset()))
{
my_message(ER_UNKNOWN_COM_ERROR, ER_THD(thd, ER_UNKNOWN_COM_ERROR),
MYF(0));
@@ -12794,7 +13257,12 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
return packet_error;
DBUG_PRINT("info", ("IO layer change in progress..."));
- if (sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout, &errptr))
+ mysql_rwlock_rdlock(&LOCK_ssl_refresh);
+ int ssl_ret = sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout, &errptr);
+ mysql_rwlock_unlock(&LOCK_ssl_refresh);
+ ssl_acceptor_stats_update(ssl_ret);
+
+ if(ssl_ret)
{
DBUG_PRINT("error", ("Failed to accept new SSL connection"));
return packet_error;
@@ -12945,7 +13413,6 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
if ((thd->client_capabilities & CLIENT_PLUGIN_AUTH) &&
(client_plugin < (char *)net->read_pos + pkt_len))
{
- client_plugin= fix_plugin_ptr(client_plugin);
next_field+= strlen(next_field) + 1;
}
else
@@ -12957,15 +13424,13 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
client_plugin= native_password_plugin_name.str;
else
{
- client_plugin= old_password_plugin_name.str;
/*
- For a passwordless accounts we use native_password_plugin.
- But when an old 4.0 client connects to it, we change it to
- old_password_plugin, otherwise MySQL will think that server
- and client plugins don't match.
+ Normally old clients use old_password_plugin, but for
+ a passwordless accounts we use native_password_plugin.
+ See guess_auth_plugin().
*/
- if (mpvio->acl_user->auth_string.length == 0)
- mpvio->acl_user->plugin= old_password_plugin_name;
+ client_plugin= passwd_len ? old_password_plugin_name.str
+ : native_password_plugin_name.str;
}
}
@@ -12983,7 +13448,7 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
restarted and a server auth plugin will read the data that the client
has just send. Cache them to return in the next server_mpvio_read_packet().
*/
- if (!lex_string_eq(&mpvio->acl_user->plugin, plugin_name(mpvio->plugin)))
+ if (!lex_string_eq(&mpvio->acl_user->auth->plugin, plugin_name(mpvio->plugin)))
{
mpvio->cached_client_reply.pkt= passwd;
mpvio->cached_client_reply.pkt_len= (uint)passwd_len;
@@ -13063,6 +13528,7 @@ static int server_mpvio_write_packet(MYSQL_PLUGIN_VIO *param,
res= my_net_write(&mpvio->auth_info.thd->net, packet, packet_len) ||
net_flush(&mpvio->auth_info.thd->net);
}
+ mpvio->status= MPVIO_EXT::FAILURE; // the status is no longer RESTART
mpvio->packets_written++;
DBUG_RETURN(res);
}
@@ -13079,56 +13545,53 @@ static int server_mpvio_write_packet(MYSQL_PLUGIN_VIO *param,
*/
static int server_mpvio_read_packet(MYSQL_PLUGIN_VIO *param, uchar **buf)
{
- MPVIO_EXT *mpvio= (MPVIO_EXT *) param;
+ MPVIO_EXT * const mpvio= (MPVIO_EXT *) param;
+ MYSQL_SERVER_AUTH_INFO * const ai= &mpvio->auth_info;
ulong pkt_len;
DBUG_ENTER("server_mpvio_read_packet");
- if (mpvio->packets_written == 0)
- {
- /*
- plugin wants to read the data without sending anything first.
- send an empty packet to force a server handshake packet to be sent
- */
- if (server_mpvio_write_packet(mpvio, 0, 0))
- pkt_len= packet_error;
- else
- pkt_len= my_net_read(&mpvio->auth_info.thd->net);
- }
- else if (mpvio->cached_client_reply.pkt)
+ if (mpvio->status == MPVIO_EXT::RESTART)
{
- DBUG_ASSERT(mpvio->status == MPVIO_EXT::RESTART);
- DBUG_ASSERT(mpvio->packets_read > 0);
- /*
- if the have the data cached from the last server_mpvio_read_packet
- (which can be the case if it's a restarted authentication)
- and a client has used the correct plugin, then we can return the
- cached data straight away and avoid one round trip.
- */
const char *client_auth_plugin=
((st_mysql_auth *) (plugin_decl(mpvio->plugin)->info))->client_auth_plugin;
- if (client_auth_plugin == 0 ||
- my_strcasecmp(system_charset_info, mpvio->cached_client_reply.plugin,
- client_auth_plugin) == 0)
+ if (client_auth_plugin == 0)
{
mpvio->status= MPVIO_EXT::FAILURE;
- *buf= (uchar*) mpvio->cached_client_reply.pkt;
- mpvio->cached_client_reply.pkt= 0;
- mpvio->packets_read++;
+ pkt_len= 0;
+ *buf= 0;
+ goto done;
+ }
- DBUG_RETURN ((int) mpvio->cached_client_reply.pkt_len);
+ if (mpvio->cached_client_reply.pkt)
+ {
+ DBUG_ASSERT(mpvio->packets_read > 0);
+ /*
+ if the have the data cached from the last server_mpvio_read_packet
+ (which can be the case if it's a restarted authentication)
+ and a client has used the correct plugin, then we can return the
+ cached data straight away and avoid one round trip.
+ */
+ if (my_strcasecmp(system_charset_info, mpvio->cached_client_reply.plugin,
+ client_auth_plugin) == 0)
+ {
+ mpvio->status= MPVIO_EXT::FAILURE;
+ pkt_len= mpvio->cached_client_reply.pkt_len;
+ *buf= (uchar*) mpvio->cached_client_reply.pkt;
+ mpvio->packets_read++;
+ goto done;
+ }
}
/*
- But if the client has used the wrong plugin, the cached data are
- useless. Furthermore, we have to send a "change plugin" request
- to the client.
+ plugin wants to read the data without sending anything first.
+ send an empty packet to force a server handshake packet to be sent
*/
if (server_mpvio_write_packet(mpvio, 0, 0))
pkt_len= packet_error;
else
- pkt_len= my_net_read(&mpvio->auth_info.thd->net);
+ pkt_len= my_net_read(&ai->thd->net);
}
else
- pkt_len= my_net_read(&mpvio->auth_info.thd->net);
+ pkt_len= my_net_read(&ai->thd->net);
if (unlikely(pkt_len == packet_error))
goto err;
@@ -13146,14 +13609,29 @@ static int server_mpvio_read_packet(MYSQL_PLUGIN_VIO *param, uchar **buf)
goto err;
}
else
- *buf= mpvio->auth_info.thd->net.read_pos;
+ *buf= ai->thd->net.read_pos;
+
+done:
+ if (set_user_salt_if_needed(mpvio->acl_user, mpvio->curr_auth, mpvio->plugin))
+ {
+ ai->thd->clear_error(); // authenticating user should not see these errors
+ my_error(ER_ACCESS_DENIED_ERROR, MYF(0), ai->thd->security_ctx->user,
+ ai->thd->security_ctx->host_or_ip, ER_THD(ai->thd, ER_YES));
+ goto err;
+ }
+
+ ai->user_name= ai->thd->security_ctx->user;
+ ai->user_name_length= (uint) strlen(ai->user_name);
+ ai->auth_string= mpvio->acl_user->auth[mpvio->curr_auth].salt.str;
+ ai->auth_string_length= (ulong) mpvio->acl_user->auth[mpvio->curr_auth].salt.length;
+ strmake_buf(ai->authenticated_as, mpvio->acl_user->user.str);
DBUG_RETURN((int)pkt_len);
err:
if (mpvio->status == MPVIO_EXT::FAILURE)
{
- if (!mpvio->auth_info.thd->is_error())
+ if (!ai->thd->is_error())
my_error(ER_HANDSHAKE_ERROR, MYF(0));
}
DBUG_RETURN(-1);
@@ -13214,24 +13692,25 @@ static bool acl_check_ssl(THD *thd, const ACL_USER *acl_user)
return 1;
if (acl_user->ssl_cipher)
{
+ const char *ssl_cipher= SSL_get_cipher(ssl);
DBUG_PRINT("info", ("comparing ciphers: '%s' and '%s'",
- acl_user->ssl_cipher, SSL_get_cipher(ssl)));
- if (strcmp(acl_user->ssl_cipher, SSL_get_cipher(ssl)))
+ acl_user->ssl_cipher, ssl_cipher));
+ if (strcmp(acl_user->ssl_cipher, ssl_cipher))
{
if (global_system_variables.log_warnings)
sql_print_information("X509 ciphers mismatch: should be '%s' but is '%s'",
- acl_user->ssl_cipher, SSL_get_cipher(ssl));
+ acl_user->ssl_cipher, ssl_cipher);
return 1;
}
}
- if (!acl_user->x509_issuer && !acl_user->x509_subject)
+ if (!acl_user->x509_issuer[0] && !acl_user->x509_subject[0])
return 0; // all done
/* Prepare certificate (if exists) */
if (!(cert= SSL_get_peer_certificate(ssl)))
return 1;
/* If X509 issuer is specified, we check it... */
- if (acl_user->x509_issuer)
+ if (acl_user->x509_issuer[0])
{
char *ptr= X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0);
DBUG_PRINT("info", ("comparing issuers: '%s' and '%s'",
@@ -13248,7 +13727,7 @@ static bool acl_check_ssl(THD *thd, const ACL_USER *acl_user)
free(ptr);
}
/* X509 subject is specified, we check it .. */
- if (acl_user->x509_subject)
+ if (acl_user->x509_subject[0])
{
char *ptr= X509_NAME_oneline(X509_get_subject_name(cert), 0, 0);
DBUG_PRINT("info", ("comparing subjects: '%s' and '%s'",
@@ -13282,35 +13761,25 @@ static bool acl_check_ssl(THD *thd, const ACL_USER *acl_user)
static int do_auth_once(THD *thd, const LEX_CSTRING *auth_plugin_name,
MPVIO_EXT *mpvio)
{
- int res= CR_OK, old_status= MPVIO_EXT::FAILURE;
+ int res= CR_OK;
bool unlock_plugin= false;
- plugin_ref plugin= NULL;
-
- if (auth_plugin_name->str == native_password_plugin_name.str)
- plugin= native_password_plugin;
-#ifndef EMBEDDED_LIBRARY
- else if (auth_plugin_name->str == old_password_plugin_name.str)
- plugin= old_password_plugin;
- else if ((plugin= my_plugin_lock_by_name(thd, auth_plugin_name,
- MYSQL_AUTHENTICATION_PLUGIN)))
- unlock_plugin= true;
-#endif
+ plugin_ref plugin= get_auth_plugin(thd, *auth_plugin_name, &unlock_plugin);
mpvio->plugin= plugin;
- old_status= mpvio->status;
+ mpvio->auth_info.user_name= NULL;
if (plugin)
{
- st_mysql_auth *auth= (st_mysql_auth *) plugin_decl(plugin)->info;
- switch (auth->interface_version >> 8) {
+ st_mysql_auth *info= (st_mysql_auth *) plugin_decl(plugin)->info;
+ switch (info->interface_version >> 8) {
case 0x02:
- res= auth->authenticate_user(mpvio, &mpvio->auth_info);
+ res= info->authenticate_user(mpvio, &mpvio->auth_info);
break;
case 0x01:
{
MYSQL_SERVER_AUTH_INFO_0x0100 compat;
compat.downgrade(&mpvio->auth_info);
- res= auth->authenticate_user(mpvio, (MYSQL_SERVER_AUTH_INFO *)&compat);
+ res= info->authenticate_user(mpvio, (MYSQL_SERVER_AUTH_INFO *)&compat);
compat.upgrade(&mpvio->auth_info);
}
break;
@@ -13330,20 +13799,64 @@ static int do_auth_once(THD *thd, const LEX_CSTRING *auth_plugin_name,
res= CR_ERROR;
}
- /*
- If the status was MPVIO_EXT::RESTART before the authenticate_user() call
- it can never be MPVIO_EXT::RESTART after the call, because any call
- to write_packet() or read_packet() will reset the status.
+ return res;
+}
- But (!) if a plugin never called a read_packet() or write_packet(), the
- status will stay unchanged. We'll fix it, by resetting the status here.
- */
- if (old_status == MPVIO_EXT::RESTART && mpvio->status == MPVIO_EXT::RESTART)
- mpvio->status= MPVIO_EXT::FAILURE; // reset to the default
+enum PASSWD_ERROR_ACTION
+{
+ PASSWD_ERROR_CLEAR,
+ PASSWD_ERROR_INCREMENT
+};
- return res;
+/* Increment, or clear password errors for a user. */
+static void handle_password_errors(const char *user, const char *hostname, PASSWD_ERROR_ACTION action)
+{
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ mysql_mutex_assert_not_owner(&acl_cache->lock);
+ mysql_mutex_lock(&acl_cache->lock);
+ ACL_USER *u = find_user_exact(hostname, user);
+ if (u)
+ {
+ switch(action)
+ {
+ case PASSWD_ERROR_INCREMENT:
+ u->password_errors++;
+ break;
+ case PASSWD_ERROR_CLEAR:
+ u->password_errors= 0;
+ break;
+ default:
+ DBUG_ASSERT(0);
+ break;
+ }
+ }
+ mysql_mutex_unlock(&acl_cache->lock);
+#endif
}
+static bool check_password_lifetime(THD *thd, const ACL_USER &acl_user)
+{
+ /* the password should never expire */
+ if (!acl_user.password_lifetime)
+ return false;
+
+ longlong interval= acl_user.password_lifetime;
+ if (interval < 0)
+ {
+ interval= default_password_lifetime;
+
+ /* default global policy applies, and that is password never expires */
+ if (!interval)
+ return false;
+ }
+
+ thd->set_time();
+
+ if ((thd->query_start() - acl_user.password_last_changed)/3600/24 >= interval)
+ return true;
+
+ return false;
+}
/**
Perform the handshake, authorize the client and update thd sctx variables.
@@ -13361,7 +13874,6 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
{
int res= CR_OK;
MPVIO_EXT mpvio;
- const LEX_CSTRING *auth_plugin_name= default_auth_plugin_name;
enum enum_server_command command= com_change_user_pkt_len ? COM_CHANGE_USER
: COM_CONNECT;
DBUG_ENTER("acl_authenticate");
@@ -13369,9 +13881,9 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
bzero(&mpvio, sizeof(mpvio));
mpvio.read_packet= server_mpvio_read_packet;
mpvio.write_packet= server_mpvio_write_packet;
+ mpvio.cached_client_reply.plugin= "";
mpvio.info= server_mpvio_info;
- mpvio.status= MPVIO_EXT::FAILURE;
- mpvio.make_it_fail= false;
+ mpvio.status= MPVIO_EXT::RESTART;
mpvio.auth_info.thd= thd;
mpvio.auth_info.host_or_ip= thd->security_ctx->host_or_ip;
mpvio.auth_info.host_or_ip_length=
@@ -13387,6 +13899,8 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
if (parse_com_change_user_packet(&mpvio, com_change_user_pkt_len))
DBUG_RETURN(1);
+ res= mpvio.status == MPVIO_EXT::SUCCESS ? CR_OK : CR_ERROR;
+
DBUG_ASSERT(mpvio.status == MPVIO_EXT::RESTART ||
mpvio.status == MPVIO_EXT::SUCCESS);
}
@@ -13402,29 +13916,35 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
the correct plugin.
*/
- res= do_auth_once(thd, auth_plugin_name, &mpvio);
+ res= do_auth_once(thd, default_auth_plugin_name, &mpvio);
}
- /*
- retry the authentication, if - after receiving the user name -
- we found that we need to switch to a non-default plugin
- */
- if (mpvio.status == MPVIO_EXT::RESTART)
+ Security_context * const sctx= thd->security_ctx;
+ const ACL_USER * acl_user= mpvio.acl_user;
+ if (!acl_user)
+ statistic_increment(aborted_connects_preauth, &LOCK_status);
+
+ if (acl_user)
{
- DBUG_ASSERT(mpvio.acl_user);
- DBUG_ASSERT(command == COM_CHANGE_USER ||
- !lex_string_eq(auth_plugin_name, &mpvio.acl_user->plugin));
- auth_plugin_name= &mpvio.acl_user->plugin;
- res= do_auth_once(thd, auth_plugin_name, &mpvio);
+ /*
+ retry the authentication with curr_auth==0 if after receiving the user
+ name we found that we need to switch to a non-default plugin
+ */
+ for (mpvio.curr_auth= mpvio.status != MPVIO_EXT::RESTART;
+ res != CR_OK && mpvio.curr_auth < acl_user->nauth;
+ mpvio.curr_auth++)
+ {
+ thd->clear_error();
+ mpvio.status= MPVIO_EXT::RESTART;
+ res= do_auth_once(thd, &acl_user->auth[mpvio.curr_auth].plugin, &mpvio);
+ }
}
+
if (mpvio.make_it_fail && res == CR_OK)
{
mpvio.status= MPVIO_EXT::FAILURE;
res= CR_ERROR;
}
-
- Security_context *sctx= thd->security_ctx;
- const ACL_USER *acl_user= mpvio.acl_user;
thd->password= mpvio.auth_info.password_used; // remember for error messages
@@ -13452,7 +13972,6 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
if (res > CR_OK && mpvio.status != MPVIO_EXT::SUCCESS)
{
Host_errors errors;
- DBUG_ASSERT(mpvio.status == MPVIO_EXT::FAILURE);
switch (res)
{
case CR_AUTH_PLUGIN_ERROR:
@@ -13463,6 +13982,8 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
break;
case CR_AUTH_USER_CREDENTIALS:
errors.m_authentication= 1;
+ if (thd->password && !mpvio.make_it_fail)
+ handle_password_errors(acl_user->user.str, acl_user->host.hostname, PASSWD_ERROR_INCREMENT);
break;
case CR_ERROR:
default:
@@ -13477,80 +13998,108 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
}
sctx->proxy_user[0]= 0;
+ if (thd->password && acl_user->password_errors)
+ {
+ /* Login succeeded, clear password errors.*/
+ handle_password_errors(acl_user->user.str, acl_user->host.hostname, PASSWD_ERROR_CLEAR);
+ }
if (initialized) // if not --skip-grant-tables
{
+ /*
+ OK. Let's check the SSL. Historically it was checked after the password,
+ as an additional layer, not instead of the password
+ (in which case it would've been a plugin too).
+ */
+ if (acl_check_ssl(thd, acl_user))
+ {
+ Host_errors errors;
+ errors.m_ssl= 1;
+ inc_host_errors(mpvio.auth_info.thd->security_ctx->ip, &errors);
+ login_failed_error(thd);
+ DBUG_RETURN(1);
+ }
+
+ if (acl_user->account_locked) {
+ status_var_increment(denied_connections);
+ my_error(ER_ACCOUNT_HAS_BEEN_LOCKED, MYF(0));
+ DBUG_RETURN(1);
+ }
+
+ bool client_can_handle_exp_pass= thd->client_capabilities &
+ CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS;
+ bool password_expired= thd->password != PASSWORD_USED_NO_MENTION
+ && (acl_user->password_expired ||
+ check_password_lifetime(thd, *acl_user));
+
+ if (!client_can_handle_exp_pass && disconnect_on_expired_password &&
+ password_expired)
+ {
+ status_var_increment(denied_connections);
+ my_error(ER_MUST_CHANGE_PASSWORD_LOGIN, MYF(0));
+ DBUG_RETURN(1);
+ }
+
+ sctx->password_expired= password_expired;
+
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- bool is_proxy_user= FALSE;
- const char *auth_user = safe_str(acl_user->user.str);
- ACL_PROXY_USER *proxy_user;
- /* check if the user is allowed to proxy as another user */
- proxy_user= acl_find_proxy_user(auth_user, sctx->host, sctx->ip,
- mpvio.auth_info.authenticated_as,
- &is_proxy_user);
- if (is_proxy_user)
- {
- ACL_USER *acl_proxy_user;
-
- /* we need to find the proxy user, but there was none */
- if (!proxy_user)
+ if (!password_expired)
+ {
+ bool is_proxy_user= FALSE;
+ const char *auth_user = acl_user->user.str;
+ ACL_PROXY_USER *proxy_user;
+ /* check if the user is allowed to proxy as another user */
+ proxy_user= acl_find_proxy_user(auth_user, sctx->host, sctx->ip,
+ mpvio.auth_info.authenticated_as,
+ &is_proxy_user);
+ if (is_proxy_user)
{
- Host_errors errors;
- errors.m_proxy_user= 1;
- inc_host_errors(mpvio.auth_info.thd->security_ctx->ip, &errors);
- if (!thd->is_error())
- login_failed_error(thd);
- DBUG_RETURN(1);
- }
+ ACL_USER *acl_proxy_user;
- my_snprintf(sctx->proxy_user, sizeof(sctx->proxy_user) - 1,
- "'%s'@'%s'", auth_user,
- safe_str(acl_user->host.hostname));
+ /* we need to find the proxy user, but there was none */
+ if (!proxy_user)
+ {
+ Host_errors errors;
+ errors.m_proxy_user= 1;
+ inc_host_errors(mpvio.auth_info.thd->security_ctx->ip, &errors);
+ if (!thd->is_error())
+ login_failed_error(thd);
+ DBUG_RETURN(1);
+ }
- /* we're proxying : find the proxy user definition */
- mysql_mutex_lock(&acl_cache->lock);
- acl_proxy_user= find_user_exact(safe_str(proxy_user->get_proxied_host()),
- mpvio.auth_info.authenticated_as);
- if (!acl_proxy_user)
- {
- mysql_mutex_unlock(&acl_cache->lock);
+ my_snprintf(sctx->proxy_user, sizeof(sctx->proxy_user) - 1,
+ "'%s'@'%s'", auth_user,
+ safe_str(acl_user->host.hostname));
- Host_errors errors;
- errors.m_proxy_user_acl= 1;
- inc_host_errors(mpvio.auth_info.thd->security_ctx->ip, &errors);
- if (!thd->is_error())
- login_failed_error(thd);
- DBUG_RETURN(1);
+ /* we're proxying : find the proxy user definition */
+ mysql_mutex_lock(&acl_cache->lock);
+ acl_proxy_user= find_user_exact(safe_str(proxy_user->get_proxied_host()),
+ mpvio.auth_info.authenticated_as);
+ if (!acl_proxy_user)
+ {
+ mysql_mutex_unlock(&acl_cache->lock);
+
+ Host_errors errors;
+ errors.m_proxy_user_acl= 1;
+ inc_host_errors(mpvio.auth_info.thd->security_ctx->ip, &errors);
+ if (!thd->is_error())
+ login_failed_error(thd);
+ DBUG_RETURN(1);
+ }
+ acl_user= acl_proxy_user->copy(thd->mem_root);
+ mysql_mutex_unlock(&acl_cache->lock);
}
- acl_user= acl_proxy_user->copy(thd->mem_root);
- mysql_mutex_unlock(&acl_cache->lock);
}
#endif
sctx->master_access= acl_user->access;
- if (acl_user->user.str)
- strmake_buf(sctx->priv_user, acl_user->user.str);
- else
- *sctx->priv_user= 0;
+ strmake_buf(sctx->priv_user, acl_user->user.str);
if (acl_user->host.hostname)
strmake_buf(sctx->priv_host, acl_user->host.hostname);
else
*sctx->priv_host= 0;
- /*
- OK. Let's check the SSL. Historically it was checked after the password,
- as an additional layer, not instead of the password
- (in which case it would've been a plugin too).
- */
- if (acl_check_ssl(thd, acl_user))
- {
- Host_errors errors;
- errors.m_ssl= 1;
- inc_host_errors(mpvio.auth_info.thd->security_ctx->ip, &errors);
- login_failed_error(thd);
- DBUG_RETURN(1);
- }
/*
Don't allow the user to connect if he has done too many queries.
@@ -13703,12 +14252,11 @@ static int native_password_authenticate(MYSQL_PLUGIN_VIO *vio,
/* generate the scramble, or reuse the old one */
if (thd->scramble[SCRAMBLE_LENGTH])
- {
thd_create_random_password(thd, thd->scramble, SCRAMBLE_LENGTH);
- /* and send it to the client */
- if (mpvio->write_packet(mpvio, (uchar*)thd->scramble, SCRAMBLE_LENGTH + 1))
- DBUG_RETURN(CR_AUTH_HANDSHAKE);
- }
+
+ /* and send it to the client */
+ if (mpvio->write_packet(mpvio, (uchar*)thd->scramble, SCRAMBLE_LENGTH + 1))
+ DBUG_RETURN(CR_AUTH_HANDSHAKE);
/* reply and authenticate */
@@ -13759,15 +14307,16 @@ static int native_password_authenticate(MYSQL_PLUGIN_VIO *vio,
DBUG_EXECUTE_IF("native_password_bad_reply", { pkt_len= 12; });
if (pkt_len == 0) /* no password */
- DBUG_RETURN(mpvio->acl_user->salt_len != 0 ? CR_AUTH_USER_CREDENTIALS : CR_OK);
+ DBUG_RETURN(info->auth_string_length != 0
+ ? CR_AUTH_USER_CREDENTIALS : CR_OK);
info->password_used= PASSWORD_USED_YES;
if (pkt_len == SCRAMBLE_LENGTH)
{
- if (!mpvio->acl_user->salt_len)
+ if (info->auth_string_length != SCRAMBLE_LENGTH)
DBUG_RETURN(CR_AUTH_USER_CREDENTIALS);
- if (check_scramble(pkt, thd->scramble, mpvio->acl_user->salt))
+ if (check_scramble(pkt, thd->scramble, (uchar*)info->auth_string))
DBUG_RETURN(CR_AUTH_USER_CREDENTIALS);
else
DBUG_RETURN(CR_OK);
@@ -13777,6 +14326,65 @@ static int native_password_authenticate(MYSQL_PLUGIN_VIO *vio,
DBUG_RETURN(CR_AUTH_HANDSHAKE);
}
+static int native_password_make_scramble(const char *password,
+ size_t password_length, char *hash, size_t *hash_length)
+{
+ DBUG_ASSERT(*hash_length >= SCRAMBLED_PASSWORD_CHAR_LENGTH);
+ if (password_length == 0)
+ *hash_length= 0;
+ else
+ {
+ *hash_length= SCRAMBLED_PASSWORD_CHAR_LENGTH;
+ my_make_scrambled_password(hash, password, password_length);
+ }
+ return 0;
+}
+
+/* As this contains is a string of not a valid SCRAMBLE_LENGTH */
+static const char invalid_password[] = "*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE";
+
+static int native_password_get_salt(const char *hash, size_t hash_length,
+ unsigned char *out, size_t *out_length)
+{
+ DBUG_ASSERT(sizeof(invalid_password) > SCRAMBLE_LENGTH);
+ DBUG_ASSERT(*out_length >= SCRAMBLE_LENGTH);
+ DBUG_ASSERT(*out_length >= sizeof(invalid_password));
+ if (hash_length == 0)
+ {
+ *out_length= 0;
+ return 0;
+ }
+
+ if (hash_length != SCRAMBLED_PASSWORD_CHAR_LENGTH)
+ {
+ if (hash_length == 7 && strcmp(hash, "invalid") == 0)
+ {
+ memcpy(out, invalid_password, sizeof(invalid_password));
+ *out_length= sizeof(invalid_password);
+ return 0;
+ }
+ my_error(ER_PASSWD_LENGTH, MYF(0), SCRAMBLED_PASSWORD_CHAR_LENGTH);
+ return 1;
+ }
+
+ for (const char *c= hash + 1; c < (hash + hash_length); c++)
+ {
+ /* If any non-hex characters are found, mark the password as invalid. */
+ if (!(*c >= '0' && *c <= '9') &&
+ !(*c >= 'A' && *c <= 'F') &&
+ !(*c >= 'a' && *c <= 'f'))
+ {
+ memcpy(out, invalid_password, sizeof(invalid_password));
+ *out_length= sizeof(invalid_password);
+ return 0;
+ }
+ }
+
+ *out_length= SCRAMBLE_LENGTH;
+ get_salt_from_password(out, hash);
+ return 0;
+}
+
static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio,
MYSQL_SERVER_AUTH_INFO *info)
{
@@ -13787,12 +14395,10 @@ static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio,
/* generate the scramble, or reuse the old one */
if (thd->scramble[SCRAMBLE_LENGTH])
- {
thd_create_random_password(thd, thd->scramble, SCRAMBLE_LENGTH);
- /* and send it to the client */
- if (mpvio->write_packet(mpvio, (uchar*)thd->scramble, SCRAMBLE_LENGTH + 1))
- return CR_AUTH_HANDSHAKE;
- }
+ /* and send it to the client */
+ if (mpvio->write_packet(mpvio, (uchar*)thd->scramble, SCRAMBLE_LENGTH + 1))
+ return CR_AUTH_HANDSHAKE;
/* read the reply and authenticate */
if ((pkt_len= mpvio->read_packet(mpvio, &pkt)) < 0)
@@ -13811,7 +14417,7 @@ static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio,
pkt_len= (int)strnlen((char*)pkt, pkt_len);
if (pkt_len == 0) /* no password */
- return info->auth_string[0] ? CR_AUTH_USER_CREDENTIALS : CR_OK;
+ return info->auth_string_length ? CR_AUTH_USER_CREDENTIALS : CR_OK;
if (secure_auth(thd))
return CR_AUTH_HANDSHAKE;
@@ -13820,30 +14426,64 @@ static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio,
if (pkt_len == SCRAMBLE_LENGTH_323)
{
- if (!mpvio->acl_user->salt_len)
+ if (!info->auth_string_length)
return CR_AUTH_USER_CREDENTIALS;
- return check_scramble_323(pkt, thd->scramble,
- (ulong *) mpvio->acl_user->salt) ?
- CR_AUTH_USER_CREDENTIALS : CR_OK;
+ return check_scramble_323(pkt, thd->scramble, (ulong *) info->auth_string)
+ ? CR_AUTH_USER_CREDENTIALS : CR_OK;
}
my_error(ER_HANDSHAKE_ERROR, MYF(0));
return CR_AUTH_HANDSHAKE;
}
+static int old_password_make_scramble(const char *password,
+ size_t password_length, char *hash, size_t *hash_length)
+{
+ DBUG_ASSERT(*hash_length >= SCRAMBLED_PASSWORD_CHAR_LENGTH_323);
+ if (password_length == 0)
+ *hash_length= 0;
+ else
+ {
+ *hash_length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
+ my_make_scrambled_password_323(hash, password, password_length);
+ }
+ return 0;
+}
+
+#define SALT_LENGTH_323 (sizeof(ulong)*2)
+static int old_password_get_salt(const char *hash, size_t hash_length,
+ unsigned char *out, size_t *out_length)
+{
+ DBUG_ASSERT(*out_length >= SALT_LENGTH_323);
+
+ if (hash_length != SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
+ {
+ my_error(ER_PASSWD_LENGTH, MYF(0), SCRAMBLED_PASSWORD_CHAR_LENGTH_323);
+ return 1;
+ }
+
+ *out_length= SALT_LENGTH_323;
+ get_salt_from_password_323((ulong*)out, hash);
+ return 0;
+}
+
static struct st_mysql_auth native_password_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
native_password_plugin_name.str,
- native_password_authenticate
+ native_password_authenticate,
+ native_password_make_scramble,
+ native_password_get_salt
};
static struct st_mysql_auth old_password_handler=
{
MYSQL_AUTHENTICATION_INTERFACE_VERSION,
old_password_plugin_name.str,
- old_password_authenticate
+ old_password_authenticate,
+ old_password_make_scramble,
+ old_password_get_salt
};
maria_declare_plugin(mysql_password)
diff --git a/sql/sql_acl_getsort.ic b/sql/sql_acl_getsort.ic
new file mode 100644
index 00000000000..df55c7c5f1e
--- /dev/null
+++ b/sql/sql_acl_getsort.ic
@@ -0,0 +1,205 @@
+/* Copyright (c) 2019, 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 Street, Fifth Floor, Boston, MA 02110-1335 USA */
+
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+/*
+ Returns a number which, if sorted in descending order, magically puts
+ patterns in the order from most specific (e.g. no wildcards) to most generic
+ (e.g. "%"). That is, the larger the number, the more specific the pattern is.
+
+ Takes a template that lists types of following patterns (by the first letter
+ of _h_ostname, _d_bname, _u_sername) and up to four patterns.
+ No more than two can be of 'h' or 'd' type (because one magic value takes 26
+ bits, see below).
+
+ ========================================================================
+
+ Here's how the magic is created:
+
+ Let's look at one iteration of the for() loop. That's one pattern. With
+ wildcards (usernames aren't interesting).
+
+ By definition a pattern A is "more specific" than pattern B if the set of
+ strings that match the pattern A is smaller than the set of strings that
+ match the pattern B. Strings are taken from the big superset of all valid
+ utf8 strings up to the maxlen.
+
+ Strings are matched character by character. For every non-wildcard
+ character there can be only one matching character in the matched string.
+
+ For a wild_one character ('_') any valid utf8 character will do. Below
+ numchars would mean a total number of vaid utf8 characters. It's a huge
+ number. A number of matching strings for wild_one will be numchars.
+
+ For a wild_many character ('%') any number of valid utf8 characters will do.
+ How many string will match it depends on the amount of non-wild_many
+ characters. Say, if a number of non-wildcard characters is N, and a number
+ of wild_one characters is M, and the number of wild_many characters is K,
+ then for K=1 its wild_many character will match any number of valid utf8
+ characters from 0 to L=maxlen-N-M. The number of matching strings will be
+
+ 1 + numchars + numchars^2 + numchars^3 + ... + numchars^L
+
+ Intermediate result: if M=K=0, the pattern will match only one string,
+ if M>0, K=0, the pattern will match numchars^M strings, if K=1, the
+ pattern will match
+
+ numchars^M + 1 + numchars + numchars^2 + ... + numchars^L
+
+ For a more visual notation, let's write these huge numbers not as
+ decimal or binary, but base numchars. Then the last number will be
+ a sum of two numbers: the first is one followed by M zeros, the second
+ constists of L+1 ones:
+
+ 1000{...M...}000 + 111{...L+1...}1111
+
+ This could produce any of the following
+
+ 111...112111...1111 if L > M, K = 1
+ 100...001111...1111 if M > L, K = 1
+ 2111111...111111111 if M = L, K = 1
+ 1111111...111111111 if M = 0, K = 1
+ 1000000...000000000 if K = 0, M > 0
+
+ There are two complications caused by multiple wild_many characters.
+ For, say, two wild_many characters, either can accept any number of utf8
+ characters, as long the the total amount of them is less then or equal to L.
+ Same logic applies to any number of non-consequent wild_many characters
+ (consequent wild_many characters count as one). This gives the number of
+ matching strings of
+
+ 1 + F(K,1)*numchars + F(K,2)*numchars^2 + ... + F(K,L)*numchars^L
+
+ where F(K,R) is the "number of ways one can put R balls into K boxes",
+ that is C^{K-1}_{R+K-1}.
+
+ In the "base numchars" notation, it means that besides 0, 1, and 2,
+ an R-th digit can be F(K,R). For the purpose of comparison, we only need
+ to know the most significant digit, F(K, L).
+ While it can be huge, we don't need the exact value, it's a
+ a monotonously increasing function of K, so if K1>K2, F(K1,L) > F(K2,L)
+ and we can simply compare values of K instead of complex F(K,L).
+
+ The second complication: F(K,R) gives only an upper boundary, the
+ actual number of matched strings can be smaller.
+ Example: pattern "a%b%c" can match "abbc" as a(b)b()c, and as a()b(b)c.
+ F(2,1) = 2, but it's only one string "abbc".
+ We'll ignore it here under assumption that it almost never happens
+ in practice and this simplification won't noticeably disrupt the ordering.
+
+ The last detail: old get_sort function sorted by the non-wildcard prefix
+ length, so in "abc_" and "a_bc" the former one was sorted first. Strictly
+ speaking they're both equally specific, but to preserve the backward
+ compatible sorting we'll use the P "prefix length or 0 if no wildcards"
+ to break ties.
+
+ Now, let's compare two long numbers. Numbers are easy to compare,
+ the longer number is larger. If they both have the same lengths,
+ the one with the larger first digit is larger, and so on.
+
+ But there is no need to actually calculate these numbers.
+ Three numbers L, K, M (and P to break ties) are enough to describe a pattern
+ for a purpose of comparison. L/K/M triplets can be compared like this:
+
+ * case 1: if for both patterns L>M: compare L, K, M, in that order
+ because:
+ - if L1 > L2, the first number is longer
+ - If L1 == L2, then the first digit is a monotonously increasing function
+ of K, so the first digit is larger when K is larger
+ - if K1 == K2, then all other digits in these numbers would be the
+ same too, with the exception of one digit in the middle that
+ got +1 because of +1000{...M...}000. So, whatever number has a
+ larger M will get this +1 first.
+ * case 2: if for both patterns L<M: compare M, L, K, in that order
+ * case 3: if for both patterns L=M: compare L (or M), K
+ * case 4: if one L1>M1, other L2=M2: compare L, K, M
+ * case 5: if one L1<M1, other L2=M2: compare M, L, K
+ * case 6: if one pattern L1>M1, the other M2>L2: first is more generic
+ unless (case 6a) K1=K2=1,M1=0,M2=L2+1 (in that case - equal)
+
+ note that in case 3 one can use a rule from the case either 1 or 2,
+ in the case 4 one can use the rule from the case 1,
+ in the case 5 one can use the rule from the case 2.
+
+ for the case 6 and ignoring the special case 6a, to compare patterns by a
+ magic number as a function z(a,b,c), we must ensure that z(L1,K1,M1) is
+ greater than z(M2,L2,K2) when L1=M2. This can be done by an extra bit,
+ which is 1 for K and 0 for L. Thus, the magic number could be
+
+ case 1: (((L*2 + 1)*(maxlen+1) + K)*(maxlen+1) + M)*(maxlen+1) + P
+ case 2: ((M*2*(maxlen+1) + L)*(maxlen+1) + K)*(maxlen+1) + P
+
+ upper bound: L<=maxlen, M<=maxlen, K<=maxlen/2, P<maxlen
+ for a current maxlen=64, the magic number needs 26 bits.
+*/
+
+static ulonglong get_magic_sort(const char *templ, ...)
+{
+ ulonglong sort=0;
+ va_list args;
+ va_start(args, templ);
+
+ IF_DBUG(uint bits_used= 0,);
+
+ for (; *templ; templ++)
+ {
+ char *pat= va_arg(args, char*);
+
+ if (*templ == 'u')
+ {
+ /* Username. Can be empty (= anybody) or a literal. Encoded in one bit */
+ sort= (sort << 1) + !*pat;
+ IF_DBUG(bits_used++,);
+ continue;
+ }
+
+ /* A wildcard pattern. Encoded in 26 bits. */
+ uint maxlen= *templ == 'd' ? max_dbname_length : max_hostname_length;
+ DBUG_ASSERT(maxlen <= 64);
+ DBUG_ASSERT(*templ == 'd' || *templ == 'h');
+
+ uint N= 0, M= 0, K= 0, P= 0;
+ for (uint i=0; pat[i]; i++)
+ {
+ if (pat[i] == wild_many)
+ {
+ if (!K && !M) P= N;
+ K++;
+ while (pat[i+1] == wild_many) i++;
+ continue;
+ }
+ if (pat[i] == wild_one)
+ {
+ if (!K && !M) P= N;
+ M++;
+ continue;
+ }
+ if (pat[i] == wild_prefix && pat[i+1]) i++;
+ N++;
+ }
+ uint L= K ? maxlen - N - M : 0, d= maxlen + 1, magic;
+ if (L > M)
+ magic= (((L * 2 + 1) * d + K) * d + M) * d + P;
+ else
+ magic= (((M * 2 + 0) * d + L) * d + K) * d + P;
+ DBUG_ASSERT(magic < 1<<26);
+ sort= (sort << 26) + magic;
+ IF_DBUG(bits_used+= 26,);
+ }
+ DBUG_ASSERT(bits_used < 8*sizeof(sort));
+ va_end(args);
+ return ~sort;
+}
+#endif
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 71afba74215..213d77f8237 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -32,7 +32,7 @@
#include "strfunc.h"
#include "sql_admin.h"
#include "sql_statistics.h"
-
+#include "wsrep_mysqld.h"
/* Prepare, run and cleanup for mysql_recreate_table() */
static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list)
@@ -323,7 +323,7 @@ static bool open_only_one_table(THD* thd, TABLE_LIST* table,
bool is_view_operator_func)
{
LEX *lex= thd->lex;
- SELECT_LEX *select= &lex->select_lex;
+ SELECT_LEX *select= lex->first_select_lex();
TABLE_LIST *save_next_global, *save_next_local;
bool open_error;
save_next_global= table->next_global;
@@ -810,7 +810,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
collect_eis=
(table->table->s->table_category == TABLE_CATEGORY_USER &&
!(lex->alter_info.flags & ALTER_PARTITION_ADMIN) &&
- (get_use_stat_tables_mode(thd) > NEVER ||
+ (check_eits_collection_allowed(thd) ||
lex->with_persistent_for_clause));
}
@@ -1252,7 +1252,10 @@ send_result_message:
if (is_table_modified && is_cmd_replicated &&
(!opt_readonly || thd->slave_thread) && !thd->lex->no_write_to_binlog)
{
- if (write_bin_log(thd, TRUE, thd->query(), thd->query_length()))
+ thd->get_stmt_da()->set_overwrite_status(true);
+ auto res= write_bin_log(thd, true, thd->query(), thd->query_length());
+ thd->get_stmt_da()->set_overwrite_status(false);
+ if (res)
goto err;
}
@@ -1350,7 +1353,7 @@ bool mysql_preload_keys(THD* thd, TABLE_LIST* tables)
bool Sql_cmd_analyze_table::execute(THD *thd)
{
LEX *m_lex= thd->lex;
- TABLE_LIST *first_table= m_lex->select_lex.table_list.first;
+ TABLE_LIST *first_table= m_lex->first_select_lex()->table_list.first;
bool res= TRUE;
thr_lock_type lock_type = TL_READ_NO_INSERT;
DBUG_ENTER("Sql_cmd_analyze_table::execute");
@@ -1358,15 +1361,21 @@ bool Sql_cmd_analyze_table::execute(THD *thd)
if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
FALSE, UINT_MAX, FALSE))
goto error;
+ if (thd->has_read_only_protection())
+ goto error;
+
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
res= mysql_admin_table(thd, first_table, &m_lex->check_opt,
"analyze", lock_type, 1, 0, 0, 0,
&handler::ha_analyze, 0, true);
- m_lex->select_lex.table_list.first= first_table;
+
+ m_lex->first_select_lex()->table_list.first= first_table;
m_lex->query_tables= first_table;
+#ifdef WITH_WSREP
+ wsrep_error_label:
+#endif /* WITH_WSREP */
error:
-WSREP_ERROR_LABEL:
DBUG_RETURN(res);
}
@@ -1374,7 +1383,7 @@ WSREP_ERROR_LABEL:
bool Sql_cmd_check_table::execute(THD *thd)
{
LEX *m_lex= thd->lex;
- TABLE_LIST *first_table= m_lex->select_lex.table_list.first;
+ TABLE_LIST *first_table= m_lex->first_select_lex()->table_list.first;
thr_lock_type lock_type = TL_READ_NO_INSERT;
bool res= TRUE;
DBUG_ENTER("Sql_cmd_check_table::execute");
@@ -1387,7 +1396,7 @@ bool Sql_cmd_check_table::execute(THD *thd)
lock_type, 0, 0, HA_OPEN_FOR_REPAIR, 0,
&handler::ha_check, &view_check, false);
- m_lex->select_lex.table_list.first= first_table;
+ m_lex->first_select_lex()->table_list.first= first_table;
m_lex->query_tables= first_table;
error:
@@ -1398,25 +1407,28 @@ error:
bool Sql_cmd_optimize_table::execute(THD *thd)
{
LEX *m_lex= thd->lex;
- TABLE_LIST *first_table= m_lex->select_lex.table_list.first;
+ TABLE_LIST *first_table= m_lex->first_select_lex()->table_list.first;
bool res= TRUE;
DBUG_ENTER("Sql_cmd_optimize_table::execute");
if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
FALSE, UINT_MAX, FALSE))
goto error; /* purecov: inspected */
- WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
+ WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
res= (specialflag & SPECIAL_NO_NEW_FUNC) ?
mysql_recreate_table(thd, first_table, true) :
mysql_admin_table(thd, first_table, &m_lex->check_opt,
"optimize", TL_WRITE, 1, 0, 0, 0,
&handler::ha_optimize, 0, true);
- m_lex->select_lex.table_list.first= first_table;
+
+ m_lex->first_select_lex()->table_list.first= first_table;
m_lex->query_tables= first_table;
+#ifdef WITH_WSREP
+wsrep_error_label:
+#endif /* WITH_WSREP */
error:
-WSREP_ERROR_LABEL:
DBUG_RETURN(res);
}
@@ -1424,13 +1436,14 @@ WSREP_ERROR_LABEL:
bool Sql_cmd_repair_table::execute(THD *thd)
{
LEX *m_lex= thd->lex;
- TABLE_LIST *first_table= m_lex->select_lex.table_list.first;
+ TABLE_LIST *first_table= m_lex->first_select_lex()->table_list.first;
bool res= TRUE;
DBUG_ENTER("Sql_cmd_repair_table::execute");
if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
FALSE, UINT_MAX, FALSE))
goto error; /* purecov: inspected */
+
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
res= mysql_admin_table(thd, first_table, &m_lex->check_opt, "repair",
TL_WRITE, 1,
@@ -1438,10 +1451,12 @@ bool Sql_cmd_repair_table::execute(THD *thd)
HA_OPEN_FOR_REPAIR, &prepare_for_repair,
&handler::ha_repair, &view_repair, true);
- m_lex->select_lex.table_list.first= first_table;
+ m_lex->first_select_lex()->table_list.first= first_table;
m_lex->query_tables= first_table;
+#ifdef WITH_WSREP
+wsrep_error_label:
+#endif /* WITH_WSREP */
error:
-WSREP_ERROR_LABEL:
DBUG_RETURN(res);
}
diff --git a/sql/sql_alloc.h b/sql/sql_alloc.h
index 153b0401e29..f475ecdff73 100644
--- a/sql/sql_alloc.h
+++ b/sql/sql_alloc.h
@@ -45,9 +45,6 @@ public:
#ifdef HAVE_valgrind
bool dummy_for_valgrind;
inline Sql_alloc() :dummy_for_valgrind(0) {}
-#else
- inline Sql_alloc() {}
#endif
- inline ~Sql_alloc() {}
};
#endif /* SQL_ALLOC_INCLUDED */
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc
index 59498d71bb1..6d75c20e868 100644
--- a/sql/sql_alter.cc
+++ b/sql/sql_alter.cc
@@ -368,7 +368,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
{
LEX *lex= thd->lex;
/* first SELECT_LEX (have special meaning for many of non-SELECTcommands) */
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
/* first table of first SELECT_LEX */
TABLE_LIST *first_table= (TABLE_LIST*) select_lex->table_list.first;
@@ -470,6 +470,26 @@ bool Sql_cmd_alter_table::execute(THD *thd)
if (check_grant(thd, priv_needed, first_table, FALSE, UINT_MAX, FALSE))
DBUG_RETURN(TRUE); /* purecov: inspected */
+#ifdef WITH_WSREP
+ if (WSREP(thd) &&
+ (!thd->is_current_stmt_binlog_format_row() ||
+ !thd->find_temporary_table(first_table)))
+ {
+ wsrep::key_array keys;
+ wsrep_append_fk_parent_table(thd, first_table, &keys);
+
+ WSREP_TO_ISOLATION_BEGIN_ALTER((lex->name.str ? select_lex->db.str : NULL),
+ (lex->name.str ? lex->name.str : NULL),
+ first_table, &alter_info, &keys)
+ {
+ WSREP_WARN("ALTER TABLE isolation failure");
+ DBUG_RETURN(TRUE);
+ }
+
+ thd->variables.auto_increment_offset = 1;
+ thd->variables.auto_increment_increment = 1;
+ }
+#endif
if (lex->name.str && !test_all_bits(priv, INSERT_ACL | CREATE_ACL))
{
@@ -497,18 +517,6 @@ bool Sql_cmd_alter_table::execute(THD *thd)
thd->work_part_info= 0;
#endif
- if (WSREP(thd) &&
- (!thd->is_current_stmt_binlog_format_row() ||
- !thd->find_temporary_table(first_table)))
- {
- WSREP_TO_ISOLATION_BEGIN_ALTER((lex->name.str ? select_lex->db.str : NULL),
- (lex->name.str ? lex->name.str : NULL),
- first_table, &alter_info);
-
- thd->variables.auto_increment_offset = 1;
- thd->variables.auto_increment_increment = 1;
- }
-
result= mysql_alter_table(thd, &select_lex->db, &lex->name,
&create_info,
first_table,
@@ -518,16 +526,12 @@ bool Sql_cmd_alter_table::execute(THD *thd)
lex->ignore);
DBUG_RETURN(result);
-
-WSREP_ERROR_LABEL:
- WSREP_WARN("ALTER TABLE isolation failure");
- DBUG_RETURN(TRUE);
}
bool Sql_cmd_discard_import_tablespace::execute(THD *thd)
{
/* first SELECT_LEX (have special meaning for many of non-SELECTcommands) */
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
/* first table of first SELECT_LEX */
TABLE_LIST *table_list= (TABLE_LIST*) select_lex->table_list.first;
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index 65049348869..edcc8aeeda6 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -68,6 +68,25 @@ int compare_decimal2(int* len, const char *s, const char *t)
}
+static bool
+prepare_param(THD *thd, Item **item, const char *proc_name, uint pos)
+{
+ if ((*item)->fix_fields_if_needed(thd, item))
+ {
+ DBUG_PRINT("info", ("fix_fields() for the parameter %u failed", pos));
+ return true;
+ }
+ if ((*item)->type_handler()->result_type() != INT_RESULT ||
+ !(*item)->basic_const_item() ||
+ (*item)->val_real() < 0)
+ {
+ my_error(ER_WRONG_PARAMETERS_TO_PROCEDURE, MYF(0), proc_name);
+ return true;
+ }
+ return false;
+}
+
+
Procedure *
proc_analyse_init(THD *thd, ORDER *param, select_result *result,
List<Item> &field_list)
@@ -88,17 +107,8 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
else if (param->next)
{
// first parameter
- if ((*param->item)->fix_fields_if_needed(thd, param->item))
- {
- DBUG_PRINT("info", ("fix_fields() for the first parameter failed"));
- goto err;
- }
- if ((*param->item)->type() != Item::INT_ITEM ||
- (*param->item)->val_real() < 0)
- {
- my_error(ER_WRONG_PARAMETERS_TO_PROCEDURE, MYF(0), proc_name);
+ if (prepare_param(thd, param->item, proc_name, 0))
goto err;
- }
pc->max_tree_elements = (uint) (*param->item)->val_int();
param = param->next;
if (param->next) // no third parameter possible
@@ -107,25 +117,12 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
goto err;
}
// second parameter
- if ((*param->item)->fix_fields_if_needed(thd, param->item))
- {
- DBUG_PRINT("info", ("fix_fields() for the second parameter failed"));
- goto err;
- }
- if ((*param->item)->type() != Item::INT_ITEM ||
- (*param->item)->val_real() < 0)
- {
- my_error(ER_WRONG_PARAMETERS_TO_PROCEDURE, MYF(0), proc_name);
+ if (prepare_param(thd, param->item, proc_name, 1))
goto err;
- }
pc->max_treemem = (uint) (*param->item)->val_int();
}
- else if ((*param->item)->type() != Item::INT_ITEM ||
- (*param->item)->val_real() < 0)
- {
- my_error(ER_WRONG_PARAMETERS_TO_PROCEDURE, MYF(0), proc_name);
+ else if (prepare_param(thd, param->item, proc_name, 0))
goto err;
- }
// if only one parameter was given, it will be the value of max_tree_elements
else
{
@@ -481,30 +478,28 @@ void field_real::add()
void field_decimal::add()
{
/*TODO - remove rounding stuff after decimal_div returns proper frac */
- my_decimal dec_buf, *dec= item->val_decimal(&dec_buf);
- my_decimal rounded;
+ VDec vdec(item);
uint length;
TREE_ELEMENT *element;
- if (item->null_value)
+ if (vdec.is_null())
{
nulls++;
return;
}
- my_decimal_round(E_DEC_FATAL_ERROR, dec, item->decimals, FALSE,&rounded);
- dec= &rounded;
+ my_decimal dec;
+ vdec.round_to(&dec, item->decimals, HALF_UP);
- length= my_decimal_string_length(dec);
+ length= my_decimal_string_length(&dec);
- if (decimal_is_zero(dec))
+ if (decimal_is_zero(&dec))
empty++;
if (room_in_tree)
{
uchar buf[DECIMAL_MAX_FIELD_SIZE];
- my_decimal2binary(E_DEC_FATAL_ERROR, dec, buf,
- item->max_length, item->decimals);
+ dec.to_binary(buf, item->max_length, item->decimals);
if (!(element = tree_insert(&tree, (void*)buf, 0, tree.custom_arg)))
{
room_in_tree = 0; // Remove tree, out of RAM ?
@@ -524,18 +519,18 @@ void field_decimal::add()
if (!found)
{
found = 1;
- min_arg = max_arg = sum[0] = *dec;
- my_decimal_mul(E_DEC_FATAL_ERROR, sum_sqr, dec, dec);
+ min_arg = max_arg = sum[0] = dec;
+ my_decimal_mul(E_DEC_FATAL_ERROR, sum_sqr, &dec, &dec);
cur_sum= 0;
min_length = max_length = length;
}
- else if (!decimal_is_zero(dec))
+ else if (!decimal_is_zero(&dec))
{
int next_cur_sum= cur_sum ^ 1;
my_decimal sqr_buf;
- my_decimal_add(E_DEC_FATAL_ERROR, sum+next_cur_sum, sum+cur_sum, dec);
- my_decimal_mul(E_DEC_FATAL_ERROR, &sqr_buf, dec, dec);
+ my_decimal_add(E_DEC_FATAL_ERROR, sum+next_cur_sum, sum+cur_sum, &dec);
+ my_decimal_mul(E_DEC_FATAL_ERROR, &sqr_buf, &dec, &dec);
my_decimal_add(E_DEC_FATAL_ERROR,
sum_sqr+next_cur_sum, sum_sqr+cur_sum, &sqr_buf);
cur_sum= next_cur_sum;
@@ -543,13 +538,13 @@ void field_decimal::add()
min_length = length;
if (length > max_length)
max_length = length;
- if (my_decimal_cmp(dec, &min_arg) < 0)
+ if (dec.cmp(&min_arg) < 0)
{
- min_arg= *dec;
+ min_arg= dec;
}
- if (my_decimal_cmp(dec, &max_arg) > 0)
+ if (dec.cmp(&max_arg) > 0)
{
- max_arg= *dec;
+ max_arg= dec;
}
}
}
@@ -1003,7 +998,7 @@ void field_decimal::get_opt_type(String *answer,
uint length;
my_decimal_set_zero(&zero);
- my_bool is_unsigned= (my_decimal_cmp(&zero, &min_arg) >= 0);
+ my_bool is_unsigned= (zero.cmp(&min_arg) >= 0);
length= sprintf(buff, "DECIMAL(%d, %d)",
(int) (max_length - (item->decimals ? 1 : 0)),
@@ -1016,14 +1011,14 @@ void field_decimal::get_opt_type(String *answer,
String *field_decimal::get_min_arg(String *str)
{
- my_decimal2string(E_DEC_FATAL_ERROR, &min_arg, 0, 0, '0', str);
+ min_arg.to_string_native(str, 0, 0, '0');
return str;
}
String *field_decimal::get_max_arg(String *str)
{
- my_decimal2string(E_DEC_FATAL_ERROR, &max_arg, 0, 0, '0', str);
+ max_arg.to_string_native(str, 0, 0, '0');
return str;
}
@@ -1041,10 +1036,10 @@ String *field_decimal::avg(String *s, ha_rows rows)
int2my_decimal(E_DEC_FATAL_ERROR, rows - nulls, FALSE, &num);
my_decimal_div(E_DEC_FATAL_ERROR, &avg_val, sum+cur_sum, &num, prec_increment);
/* TODO remove this after decimal_div returns proper frac */
- my_decimal_round(E_DEC_FATAL_ERROR, &avg_val,
+ avg_val.round_to(&rounded_avg,
MY_MIN(sum[cur_sum].frac + prec_increment, DECIMAL_MAX_SCALE),
- FALSE,&rounded_avg);
- my_decimal2string(E_DEC_FATAL_ERROR, &rounded_avg, 0, 0, '0', s);
+ HALF_UP);
+ rounded_avg.to_string_native(s, 0, 0, '0');
return s;
}
@@ -1057,7 +1052,6 @@ String *field_decimal::std(String *s, ha_rows rows)
return s;
}
my_decimal num, tmp, sum2, sum2d;
- double std_sqr;
int prec_increment= current_thd->variables.div_precincrement;
int2my_decimal(E_DEC_FATAL_ERROR, rows - nulls, FALSE, &num);
@@ -1065,7 +1059,7 @@ String *field_decimal::std(String *s, ha_rows rows)
my_decimal_div(E_DEC_FATAL_ERROR, &tmp, &sum2, &num, prec_increment);
my_decimal_sub(E_DEC_FATAL_ERROR, &sum2, sum_sqr+cur_sum, &tmp);
my_decimal_div(E_DEC_FATAL_ERROR, &tmp, &sum2, &num, prec_increment);
- my_decimal2double(E_DEC_FATAL_ERROR, &tmp, &std_sqr);
+ double std_sqr= tmp.to_double();
s->set_real(((double) std_sqr <= 0.0 ? 0.0 : sqrt(std_sqr)),
MY_MIN(item->decimals + prec_increment, NOT_FIXED_DEC), my_thd_charset);
@@ -1117,12 +1111,9 @@ int collect_decimal(uchar *element, element_count count,
info->str->append(',');
else
info->found = 1;
- my_decimal dec;
- binary2my_decimal(E_DEC_FATAL_ERROR, element, &dec,
- info->item->max_length, info->item->decimals);
-
+ my_decimal dec(element, info->item->max_length, info->item->decimals);
info->str->append('\'');
- my_decimal2string(E_DEC_FATAL_ERROR, &dec, 0, 0, '0', &s);
+ dec.to_string_native(&s, 0, 0, '0');
info->str->append(s);
info->str->append('\'');
return 0;
diff --git a/sql/sql_analyze_stmt.h b/sql/sql_analyze_stmt.h
index 3d294f50a49..eec52822ae5 100644
--- a/sql/sql_analyze_stmt.h
+++ b/sql/sql_analyze_stmt.h
@@ -284,3 +284,82 @@ private:
ulonglong sort_buffer_size;
};
+
+/**
+ A class to collect data about how rowid filter is executed.
+
+ It stores information about how rowid filter container is filled,
+ containers size and observed selectivity.
+
+ The observed selectivity is calculated in this way.
+ Some elements elem_set are checked if they belong to container.
+ Observed selectivity is calculated as the count of elem_set
+ elements that belong to container devided by all elem_set elements.
+*/
+
+class Rowid_filter_tracker : public Sql_alloc
+{
+private:
+ /* A member to track the time to fill the rowid filter */
+ Time_and_counter_tracker time_tracker;
+
+ /* Size of the rowid filter container buffer */
+ size_t container_buff_size;
+
+ /* Count of elements that were used to fill the rowid filter container */
+ uint container_elements;
+
+ /* Elements counts used for observed selectivity calculation */
+ uint n_checks;
+ uint n_positive_checks;
+public:
+ Rowid_filter_tracker(bool do_timing) :
+ time_tracker(do_timing), container_buff_size(0),
+ container_elements(0), n_checks(0), n_positive_checks(0)
+ {}
+
+ inline void start_tracking()
+ {
+ ANALYZE_START_TRACKING(&time_tracker);
+ }
+
+ inline void stop_tracking()
+ {
+ ANALYZE_STOP_TRACKING(&time_tracker);
+ }
+
+ /* Save container buffer size in bytes */
+ inline void report_container_buff_size(uint elem_size)
+ {
+ container_buff_size= container_elements * elem_size / 8;
+ }
+
+ Time_and_counter_tracker *get_time_tracker()
+ {
+ return &time_tracker;
+ }
+
+ double get_time_fill_container_ms()
+ {
+ return time_tracker.get_time_ms();
+ }
+
+ void increment_checked_elements_count(bool was_checked)
+ {
+ n_checks++;
+ if (was_checked)
+ n_positive_checks++;
+ }
+
+ inline void increment_container_elements_count() { container_elements++; }
+
+ uint get_container_elements() { return container_elements; }
+
+ double get_r_selectivity_pct()
+ {
+ return (double)n_positive_checks/(double)n_checks;
+ }
+
+ size_t get_container_buff_size() { return container_buff_size; }
+};
+
diff --git a/sql/sql_array.h b/sql/sql_array.h
index 56dba784d7d..bcfbb98ef19 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -165,6 +165,19 @@ public:
return ((const Elem*)array.buffer) + array.elements - 1;
}
+ /// @returns pointer to n-th element
+ Elem *get_pos(size_t idx)
+ {
+ return ((Elem*)array.buffer) + idx;
+ }
+
+ /// @returns pointer to n-th element
+ const Elem *get_pos(size_t idx) const
+ {
+ return ((const Elem*)array.buffer) + idx;
+ }
+
+
/**
@retval false ok
@retval true OOM, @c my_error() has been called.
diff --git a/sql/sql_audit.h b/sql/sql_audit.h
index 97317203e34..d76750e9b2a 100644
--- a/sql/sql_audit.h
+++ b/sql/sql_audit.h
@@ -155,7 +155,7 @@ void mysql_audit_general(THD *thd, uint event_subtype,
DBUG_ENTER("mysql_audit_general");
if (mysql_audit_general_enabled())
{
- char user_buff[MAX_USER_HOST_SIZE];
+ char user_buff[MAX_USER_HOST_SIZE+1];
mysql_event_general event;
event.event_subclass= event_subtype;
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 60b0b88bf5f..9942552e80b 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
- Copyright (c) 2010, 2020, MariaDB
+ Copyright (c) 2010, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -62,7 +62,11 @@
#include <io.h>
#endif
#include "wsrep_mysqld.h"
+#ifdef WITH_WSREP
#include "wsrep_thd.h"
+#include "wsrep_trans_observer.h"
+#endif /* WITH_WSREP */
+
bool
No_such_table_error_handler::handle_condition(THD *,
@@ -306,97 +310,65 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild)
}
-/*
- Close all tables which aren't in use by any thread
-
- @param thd Thread context
- @param tables List of tables to remove from the cache
- @param wait_for_refresh Wait for a impending flush
- @param timeout Timeout for waiting for flush to be completed.
-
- @note THD can be NULL, but then wait_for_refresh must be FALSE
- and tables must be NULL.
-
- @note When called as part of FLUSH TABLES WITH READ LOCK this function
- ignores metadata locks held by other threads. In order to avoid
- situation when FLUSH TABLES WITH READ LOCK sneaks in at the moment
- when some write-locked table is being reopened (by FLUSH TABLES or
- ALTER TABLE) we have to rely on additional global shared metadata
- lock taken by thread trying to obtain global read lock.
-*/
+/**
+ Close all tables that are not in use in table definition cache
+ @param purge_flag Argument for tc_purge. true if we should force all
+ shares to be deleted. false if it's enough to just
+ evict those that are not in use.
+*/
-struct close_cached_tables_arg
+void purge_tables(bool purge_flag)
{
- tdc_version_t refresh_version;
- TDC_element *element;
-};
-
+ /*
+ Force close of all open tables.
-static my_bool close_cached_tables_callback(TDC_element *element,
- close_cached_tables_arg *arg)
-{
- mysql_mutex_lock(&element->LOCK_table_share);
- if (element->share && element->flushed &&
- element->version < arg->refresh_version)
- {
- /* wait_for_old_version() will unlock mutex and free share */
- arg->element= element;
- return TRUE;
- }
- mysql_mutex_unlock(&element->LOCK_table_share);
- return FALSE;
+ Note that code in TABLE_SHARE::wait_for_old_version() assumes that
+ incrementing of refresh_version is followed by purge of unused table
+ shares.
+ */
+ kill_delayed_threads();
+ /*
+ Get rid of all unused TABLE and TABLE_SHARE instances. By doing
+ this we automatically close all tables which were marked as "old".
+ */
+ tc_purge(purge_flag);
+ /* Free table shares which were not freed implicitly by loop above. */
+ tdc_purge(true);
}
+/**
+ close_cached_tables
+
+ This function has two separate usages:
+ 1) Close not used tables in the table cache to free memory
+ 2) Close a list of tables and wait until they are not used anymore. This
+ is used mainly when preparing a table for export.
+
+ If there are locked tables, they are closed and reopened before
+ function returns. This is done to ensure that table files will be closed
+ by all threads and thus external copyable when FLUSH TABLES returns.
+*/
+
bool close_cached_tables(THD *thd, TABLE_LIST *tables,
bool wait_for_refresh, ulong timeout)
{
- bool result= FALSE;
- struct timespec abstime;
- tdc_version_t refresh_version;
DBUG_ENTER("close_cached_tables");
DBUG_ASSERT(thd || (!wait_for_refresh && !tables));
-
- refresh_version= tdc_increment_refresh_version();
+ DBUG_ASSERT(wait_for_refresh || !tables);
if (!tables)
{
- /*
- Force close of all open tables.
-
- Note that code in TABLE_SHARE::wait_for_old_version() assumes that
- incrementing of refresh_version is followed by purge of unused table
- shares.
- */
- kill_delayed_threads();
- /*
- Get rid of all unused TABLE and TABLE_SHARE instances. By doing
- this we automatically close all tables which were marked as "old".
- */
- tc_purge(true);
- /* Free table shares which were not freed implicitly by loop above. */
- tdc_purge(true);
- }
- else
- {
- bool found=0;
- for (TABLE_LIST *table= tables; table; table= table->next_local)
- {
- /* tdc_remove_table() also sets TABLE_SHARE::version to 0. */
- found|= tdc_remove_table(thd, TDC_RT_REMOVE_UNUSED, table->db.str,
- table->table_name.str, TRUE);
- }
- if (!found)
- wait_for_refresh=0; // Nothing to wait for
+ /* Free tables that are not used */
+ purge_tables(false);
+ if (!wait_for_refresh)
+ DBUG_RETURN(false);
}
DBUG_PRINT("info", ("open table definitions: %d",
(int) tdc_records()));
- if (!wait_for_refresh)
- DBUG_RETURN(result);
-
if (thd->locked_tables_mode)
{
/*
@@ -407,8 +379,9 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
*/
TABLE_LIST *tables_to_reopen= (tables ? tables :
thd->locked_tables_list.locked_tables());
+ bool result= false;
- /* Close open HANDLER instances to avoid self-deadlock. */
+ /* close open HANDLER for this thread to allow table to be closed */
mysql_ha_flush_tables(thd, tables_to_reopen);
for (TABLE_LIST *table_list= tables_to_reopen; table_list;
@@ -423,63 +396,15 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
if (! table)
continue;
- if (wait_while_table_is_used(thd, table,
- HA_EXTRA_PREPARE_FOR_FORCED_CLOSE))
- {
- result= TRUE;
- goto err_with_reopen;
- }
- close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL);
- }
- }
-
- /* Wait until all threads have closed all the tables we are flushing. */
- DBUG_PRINT("info", ("Waiting for other threads to close their open tables"));
-
- /*
- To a self-deadlock or deadlocks with other FLUSH threads
- waiting on our open HANDLERs, we have to flush them.
- */
- mysql_ha_flush(thd);
- DEBUG_SYNC(thd, "after_flush_unlock");
-
- if (!tables)
- {
- int r= 0;
- close_cached_tables_arg argument;
- argument.refresh_version= refresh_version;
- set_timespec(abstime, timeout);
-
- while (!thd->killed &&
- (r= tdc_iterate(thd,
- (my_hash_walk_action) close_cached_tables_callback,
- &argument)) == 1 &&
- !argument.element->share->wait_for_old_version(thd, &abstime,
- MDL_wait_for_subgraph::DEADLOCK_WEIGHT_DDL))
- /* no-op */;
-
- if (r)
- result= TRUE;
- }
- else
- {
- for (TABLE_LIST *table= tables; table; table= table->next_local)
- {
- if (thd->killed)
- break;
- if (tdc_wait_for_old_version(thd, table->db.str, table->table_name.str, timeout,
- MDL_wait_for_subgraph::DEADLOCK_WEIGHT_DDL,
- refresh_version))
+ if (thd->mdl_context.upgrade_shared_lock(table->mdl_ticket, MDL_EXCLUSIVE,
+ timeout))
{
- result= TRUE;
+ result= true;
break;
}
+ table->file->extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE);
+ close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL);
}
- }
-
-err_with_reopen:
- if (thd->locked_tables_mode)
- {
/*
No other thread has the locked tables open; reopen them and get the
old locks. This should always succeed (unless some external process
@@ -487,6 +412,7 @@ err_with_reopen:
*/
if (thd->locked_tables_list.reopen_tables(thd, false))
result= true;
+
/*
Since downgrade_lock() won't do anything with shared
metadata lock it is much simpler to go through all open tables rather
@@ -494,7 +420,220 @@ err_with_reopen:
*/
for (TABLE *tab= thd->open_tables; tab; tab= tab->next)
tab->mdl_ticket->downgrade_lock(MDL_SHARED_NO_READ_WRITE);
+
+ DBUG_RETURN(result);
+ }
+ else if (tables)
+ {
+ /*
+ Get an explicit MDL lock for all requested tables to ensure they are
+ not used by any other thread
+ */
+ MDL_request_list mdl_requests;
+
+ DBUG_PRINT("info", ("Waiting for other threads to close their open tables"));
+ DEBUG_SYNC(thd, "after_flush_unlock");
+
+ /* close open HANDLER for this thread to allow table to be closed */
+ mysql_ha_flush_tables(thd, tables);
+
+ for (TABLE_LIST *table= tables; table; table= table->next_local)
+ {
+ MDL_request *mdl_request= new (thd->mem_root) MDL_request;
+ if (mdl_request == NULL)
+ DBUG_RETURN(true);
+ mdl_request->init(&table->mdl_request.key, MDL_EXCLUSIVE, MDL_STATEMENT);
+ mdl_requests.push_front(mdl_request);
+ }
+
+ if (thd->mdl_context.acquire_locks(&mdl_requests, timeout))
+ DBUG_RETURN(true);
+
+ for (TABLE_LIST *table= tables; table; table= table->next_local)
+ tdc_remove_table(thd, TDC_RT_REMOVE_ALL, table->db.str,
+ table->table_name.str, false);
+ }
+ DBUG_RETURN(false);
+}
+
+
+/**
+ Collect all shares that has open tables
+*/
+
+struct tc_collect_arg
+{
+ DYNAMIC_ARRAY shares;
+ flush_tables_type flush_type;
+};
+
+static my_bool tc_collect_used_shares(TDC_element *element,
+ tc_collect_arg *arg)
+{
+ my_bool result= FALSE;
+
+ DYNAMIC_ARRAY *shares= &arg->shares;
+ mysql_mutex_lock(&element->LOCK_table_share);
+ if (element->ref_count > 0 && !element->share->is_view)
+ {
+ DBUG_ASSERT(element->share);
+ bool do_flush= 0;
+ switch (arg->flush_type) {
+ case FLUSH_ALL:
+ do_flush= 1;
+ break;
+ case FLUSH_NON_TRANS_TABLES:
+ if (!element->share->online_backup &&
+ element->share->table_category == TABLE_CATEGORY_USER)
+ do_flush= 1;
+ break;
+ case FLUSH_SYS_TABLES:
+ if (!element->share->online_backup &&
+ element->share->table_category != TABLE_CATEGORY_USER)
+ do_flush= 1;
+ }
+ if (do_flush)
+ {
+ element->ref_count++; // Protect against delete
+ if (push_dynamic(shares, (uchar*) &element->share))
+ result= TRUE;
+ }
+ }
+ mysql_mutex_unlock(&element->LOCK_table_share);
+ return result;
+}
+
+
+/*
+ Ignore errors from opening read only tables
+*/
+
+class flush_tables_error_handler : public Internal_error_handler
+{
+public:
+ int handled_errors;
+ int unhandled_errors;
+ flush_tables_error_handler() : handled_errors(0), unhandled_errors(0)
+ {}
+
+ bool handle_condition(THD *thd,
+ uint sql_errno,
+ const char* sqlstate,
+ Sql_condition::enum_warning_level *level,
+ const char* msg,
+ Sql_condition ** cond_hdl)
+ {
+ *cond_hdl= NULL;
+ if (sql_errno == ER_OPEN_AS_READONLY)
+ {
+ handled_errors++;
+ return TRUE;
+ }
+ if (*level == Sql_condition::WARN_LEVEL_ERROR)
+ unhandled_errors++;
+ return FALSE;
+ }
+
+ bool got_fatal_error()
+ {
+ return unhandled_errors > 0;
+ }
+};
+
+
+/**
+ Flush cached table as part of global read lock
+
+ @param thd
+ @param flag What type of tables should be flushed
+
+ @return 0 ok
+ @return 1 error
+
+ After we get the list of table shares, we will call flush on all
+ possible tables, even if some flush fails.
+*/
+
+bool flush_tables(THD *thd, flush_tables_type flag)
+{
+ bool result= TRUE;
+ tc_collect_arg collect_arg;
+ TABLE *tmp_table;
+ flush_tables_error_handler error_handler;
+ DBUG_ENTER("flush_tables");
+
+ purge_tables(false); /* Flush unused tables and shares */
+
+ /*
+ Loop over all shares and collect shares that have open tables
+ TODO:
+ Optimize this to only collect shares that have been used for
+ write after last time all tables was closed.
+ */
+
+ if (!(tmp_table= (TABLE*) my_malloc(sizeof(*tmp_table),
+ MYF(MY_WME | MY_THREAD_SPECIFIC))))
+ DBUG_RETURN(1);
+
+ my_init_dynamic_array(&collect_arg.shares, sizeof(TABLE_SHARE*), 100, 100,
+ MYF(0));
+ collect_arg.flush_type= flag;
+ if (tdc_iterate(thd, (my_hash_walk_action) tc_collect_used_shares,
+ &collect_arg, true))
+ {
+ /* Release already collected shares */
+ for (uint i= 0 ; i < collect_arg.shares.elements ; i++)
+ {
+ TABLE_SHARE *share= *dynamic_element(&collect_arg.shares, i,
+ TABLE_SHARE**);
+ tdc_release_share(share);
+ }
+ goto err;
}
+
+ /* Call HA_EXTRA_FLUSH on all found shares */
+
+ thd->push_internal_handler(&error_handler);
+ for (uint i= 0 ; i < collect_arg.shares.elements ; i++)
+ {
+ TABLE_SHARE *share= *dynamic_element(&collect_arg.shares, i,
+ TABLE_SHARE**);
+ TABLE *table= tc_acquire_table(thd, share->tdc);
+ if (table)
+ {
+ (void) table->file->extra(HA_EXTRA_FLUSH);
+ tc_release_table(table);
+ }
+ else
+ {
+ /*
+ HA_OPEN_FOR_ALTER is used to allow us to open the table even if
+ TABLE_SHARE::incompatible_version is set.
+ */
+ if (!open_table_from_share(thd, share, &empty_clex_str,
+ HA_OPEN_KEYFILE, 0,
+ HA_OPEN_FOR_ALTER,
+ tmp_table, FALSE,
+ NULL))
+ {
+ (void) tmp_table->file->extra(HA_EXTRA_FLUSH);
+ /*
+ We don't put the table into the TDC as the table was not fully
+ opened (we didn't open triggers)
+ */
+ closefrm(tmp_table);
+ }
+ }
+ tdc_release_share(share);
+ }
+ thd->pop_internal_handler();
+ result= error_handler.got_fatal_error();
+ DBUG_PRINT("note", ("open_errors: %u %u",
+ error_handler.handled_errors,
+ error_handler.unhandled_errors));
+err:
+ my_free(tmp_table);
+ delete_dynamic(&collect_arg.shares);
DBUG_RETURN(result);
}
@@ -552,8 +691,17 @@ end:
}
+/**
+ Close cached connections
+
+ @return false ok
+ @return true If there was an error from closed_cached_connection_tables or
+ if there was any open connections that we had to force closed
+*/
+
bool close_cached_connection_tables(THD *thd, LEX_CSTRING *connection)
{
+ bool res= false;
close_cached_connection_tables_arg argument;
DBUG_ENTER("close_cached_connections");
DBUG_ASSERT(thd);
@@ -567,9 +715,13 @@ bool close_cached_connection_tables(THD *thd, LEX_CSTRING *connection)
&argument))
DBUG_RETURN(true);
- DBUG_RETURN(argument.tables ?
- close_cached_tables(thd, argument.tables, FALSE, LONG_TIMEOUT) :
- false);
+ for (TABLE_LIST *table= argument.tables; table; table= table->next_local)
+ res|= tdc_remove_table(thd, TDC_RT_REMOVE_UNUSED,
+ table->db.str,
+ table->table_name.str, TRUE);
+
+ /* Return true if we found any open connections */
+ DBUG_RETURN(res);
}
@@ -604,6 +756,7 @@ bool close_cached_connection_tables(THD *thd, LEX_CSTRING *connection)
static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
{
+ DBUG_ENTER("mark_used_tables_as_free_for_reuse");
for (; table ; table= table->next)
{
DBUG_ASSERT(table->pos_in_locked_tables == NULL ||
@@ -616,6 +769,7 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
else if (table->file->check_table_binlog_row_based_done)
table->file->clear_cached_table_binlog_row_based_flag();
}
+ DBUG_VOID_RETURN;
}
@@ -638,7 +792,7 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
- The table is marked as closed in the
locked_table_list but kept there so one can call
locked_table_list->reopen_tables() to put it back.
-
+
In case of drop/rename the documented behavior is to
implicitly remove the table from LOCK TABLES
list.
@@ -743,12 +897,15 @@ void close_thread_tables(THD *thd)
DBUG_ASSERT(thd->transaction.stmt.is_empty() || thd->in_sub_stmt ||
(thd->state_flags & Open_tables_state::BACKUPS_AVAIL));
- /* Detach MERGE children after every statement. Even under LOCK TABLES. */
for (table= thd->open_tables; table; table= table->next)
{
+ if (table->update_handler)
+ table->delete_update_handler();
+
/* Table might be in use by some outer statement. */
DBUG_PRINT("tcache", ("table: '%s' query_id: %lu",
table->s->table_name.str, (ulong) table->query_id));
+
if (thd->locked_tables_mode)
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
@@ -758,6 +915,8 @@ void close_thread_tables(THD *thd)
#endif
table->vcol_cleanup_expr(thd);
}
+
+ /* Detach MERGE children after every statement. Even under LOCK TABLES. */
if (thd->locked_tables_mode <= LTM_LOCK_TABLES ||
table->query_id == thd->query_id)
{
@@ -1766,59 +1925,6 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
if (! (flags & MYSQL_OPEN_HAS_MDL_LOCK))
{
- /*
- We are not under LOCK TABLES and going to acquire write-lock/
- modify the base table. We need to acquire protection against
- global read lock until end of this statement in order to have
- this statement blocked by active FLUSH TABLES WITH READ LOCK.
-
- We don't need to acquire this protection under LOCK TABLES as
- such protection already acquired at LOCK TABLES time and
- not released until UNLOCK TABLES.
-
- We don't block statements which modify only temporary tables
- as these tables are not preserved by any form of
- backup which uses FLUSH TABLES WITH READ LOCK.
-
- TODO: The fact that we sometimes acquire protection against
- GRL only when we encounter table to be write-locked
- slightly increases probability of deadlock.
- This problem will be solved once Alik pushes his
- temporary table refactoring patch and we can start
- pre-acquiring metadata locks at the beggining of
- open_tables() call.
- */
- if (table_list->mdl_request.is_write_lock_request() &&
- ! (flags & (MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK |
- MYSQL_OPEN_FORCE_SHARED_MDL |
- MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL |
- MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK)) &&
- ! ot_ctx->has_protection_against_grl())
- {
- MDL_request protection_request;
- MDL_deadlock_handler mdl_deadlock_handler(ot_ctx);
-
- if (thd->global_read_lock.can_acquire_protection())
- DBUG_RETURN(TRUE);
-
- protection_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
- MDL_STATEMENT);
-
- /*
- Install error handler which if possible will convert deadlock error
- into request to back-off and restart process of opening tables.
- */
- thd->push_internal_handler(&mdl_deadlock_handler);
- bool result= thd->mdl_context.acquire_lock(&protection_request,
- ot_ctx->get_timeout());
- thd->pop_internal_handler();
-
- if (result)
- DBUG_RETURN(TRUE);
-
- ot_ctx->set_has_protection_against_grl();
- }
-
if (open_table_get_mdl_lock(thd, ot_ctx, &table_list->mdl_request,
flags, &mdl_ticket) ||
mdl_ticket == NULL)
@@ -1917,7 +2023,6 @@ retry_share:
if (mysql_make_view(thd, share, table_list, false))
goto err_lock;
-
/* TODO: Don't free this */
tdc_release_share(share);
@@ -1996,7 +2101,6 @@ retry_share:
else
{
enum open_frm_error error;
-
/* make a new table */
if (!(table=(TABLE*) my_malloc(sizeof(*table),MYF(MY_WME))))
goto err_lock;
@@ -2036,6 +2140,78 @@ retry_share:
from_share= true;
}
+ if (!(flags & MYSQL_OPEN_HAS_MDL_LOCK) &&
+ table->s->table_category < TABLE_CATEGORY_INFORMATION)
+ {
+ /*
+ We are not under LOCK TABLES and going to acquire write-lock/
+ modify the base table. We need to acquire protection against
+ global read lock until end of this statement in order to have
+ this statement blocked by active FLUSH TABLES WITH READ LOCK.
+
+ We don't need to acquire this protection under LOCK TABLES as
+ such protection already acquired at LOCK TABLES time and
+ not released until UNLOCK TABLES.
+
+ We don't block statements which modify only temporary tables
+ as these tables are not preserved by any form of
+ backup which uses FLUSH TABLES WITH READ LOCK.
+
+ TODO: The fact that we sometimes acquire protection against
+ GRL only when we encounter table to be write-locked
+ slightly increases probability of deadlock.
+ This problem will be solved once Alik pushes his
+ temporary table refactoring patch and we can start
+ pre-acquiring metadata locks at the beggining of
+ open_tables() call.
+ */
+ enum enum_mdl_type mdl_type= MDL_BACKUP_DML;
+
+ if (table->s->table_category != TABLE_CATEGORY_USER)
+ mdl_type= MDL_BACKUP_SYS_DML;
+ else if (table->s->online_backup)
+ mdl_type= MDL_BACKUP_TRANS_DML;
+
+ if (table_list->mdl_request.is_write_lock_request() &&
+ ! (flags & (MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK |
+ MYSQL_OPEN_FORCE_SHARED_MDL |
+ MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL |
+ MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK)) &&
+ ! ot_ctx->has_protection_against_grl(mdl_type))
+ {
+ MDL_request protection_request;
+ MDL_deadlock_handler mdl_deadlock_handler(ot_ctx);
+
+ if (thd->has_read_only_protection())
+ {
+ MYSQL_UNBIND_TABLE(table->file);
+ tc_release_table(table);
+ DBUG_RETURN(TRUE);
+ }
+
+ protection_request.init(MDL_key::BACKUP, "", "", mdl_type,
+ MDL_STATEMENT);
+
+ /*
+ Install error handler which if possible will convert deadlock error
+ into request to back-off and restart process of opening tables.
+ */
+ thd->push_internal_handler(&mdl_deadlock_handler);
+ bool result= thd->mdl_context.acquire_lock(&protection_request,
+ ot_ctx->get_timeout());
+ thd->pop_internal_handler();
+
+ if (result)
+ {
+ MYSQL_UNBIND_TABLE(table->file);
+ tc_release_table(table);
+ DBUG_RETURN(TRUE);
+ }
+
+ ot_ctx->set_has_protection_against_grl(mdl_type);
+ }
+ }
+
table->mdl_ticket= mdl_ticket;
table->reginfo.lock_type=TL_READ; /* Assume read */
@@ -2154,8 +2330,8 @@ TABLE *find_table_for_mdl_upgrade(THD *thd, const char *db,
cases don't take a global IX lock in order to be compatible with
global read lock.
*/
- if (unlikely(!thd->mdl_context.is_lock_owner(MDL_key::GLOBAL, "", "",
- MDL_INTENTION_EXCLUSIVE)))
+ if (unlikely(!thd->mdl_context.is_lock_owner(MDL_key::BACKUP, "", "",
+ MDL_BACKUP_DDL)))
{
error= ER_TABLE_NOT_LOCKED_FOR_WRITE;
goto err_exit;
@@ -2974,7 +3150,7 @@ Open_table_context::Open_table_context(THD *thd, uint flags)
m_flags(flags),
m_action(OT_NO_ACTION),
m_has_locks(thd->mdl_context.has_locks()),
- m_has_protection_against_grl(FALSE)
+ m_has_protection_against_grl(0)
{}
@@ -3190,7 +3366,7 @@ Open_table_context::recover_from_failed_open()
against GRL. It is no longer valid as the corresponding lock was
released by close_tables_for_reopen().
*/
- m_has_protection_against_grl= FALSE;
+ m_has_protection_against_grl= 0;
/* Prepare for possible another back-off. */
m_action= OT_NO_ACTION;
return result;
@@ -3835,6 +4011,40 @@ end:
}
+static bool upgrade_lock_if_not_exists(THD *thd,
+ const DDL_options_st &create_info,
+ TABLE_LIST *create_table,
+ ulong lock_wait_timeout)
+{
+ DBUG_ENTER("upgrade_lock_if_not_exists");
+
+ if (thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
+ thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE)
+ {
+ DEBUG_SYNC(thd,"create_table_before_check_if_exists");
+ if (!create_info.or_replace() &&
+ ha_table_exists(thd, &create_table->db, &create_table->table_name))
+ {
+ if (create_info.if_not_exists())
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_TABLE_EXISTS_ERROR,
+ ER_THD(thd, ER_TABLE_EXISTS_ERROR),
+ create_table->table_name.str);
+ }
+ else
+ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_table->table_name.str);
+ DBUG_RETURN(true);
+ }
+ DBUG_RETURN(thd->mdl_context.upgrade_shared_lock(
+ create_table->mdl_request.ticket,
+ MDL_EXCLUSIVE,
+ lock_wait_timeout));
+ }
+ DBUG_RETURN(false);
+}
+
+
/**
Acquire upgradable (SNW, SNRW) metadata locks on tables used by
LOCK TABLES or by a DDL statement. Under LOCK TABLES, we can't take
@@ -3872,10 +4082,7 @@ lock_table_names(THD *thd, const DDL_options_st &options,
MDL_request_list mdl_requests;
TABLE_LIST *table;
MDL_request global_request;
- ulong org_lock_wait_timeout= lock_wait_timeout;
- /* Check if we are using CREATE TABLE ... IF NOT EXISTS */
- bool create_table;
- Dummy_error_handler error_handler;
+ MDL_savepoint mdl_savepoint;
DBUG_ENTER("lock_table_names");
DBUG_ASSERT(!thd->locked_tables_mode);
@@ -3883,6 +4090,8 @@ lock_table_names(THD *thd, const DDL_options_st &options,
for (table= tables_start; table && table != tables_end;
table= table->next_global)
{
+ DBUG_PRINT("info", ("mdl_request.type: %d open_type: %d",
+ table->mdl_request.type, table->open_type));
if (table->mdl_request.type < MDL_SHARED_UPGRADABLE ||
table->mdl_request.type == MDL_SHARED_READ_ONLY ||
table->open_type == OT_TEMPORARY_ONLY ||
@@ -3916,74 +4125,48 @@ lock_table_names(THD *thd, const DDL_options_st &options,
if (mdl_requests.is_empty())
DBUG_RETURN(FALSE);
- /* Check if CREATE TABLE without REPLACE was used */
- create_table= ((thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
- thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE) &&
- !options.or_replace());
-
- if (!(flags & MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK))
+ if (flags & MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK)
{
- /*
- Protect this statement against concurrent global read lock
- by acquiring global intention exclusive lock with statement
- duration.
- */
- if (thd->global_read_lock.can_acquire_protection())
- DBUG_RETURN(TRUE);
- global_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
- MDL_STATEMENT);
- mdl_requests.push_front(&global_request);
-
- if (create_table)
-#ifdef WITH_WSREP
- if (!(thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
- thd->wsrep_exec_mode == REPL_RECV))
-#endif
- lock_wait_timeout= 0; // Don't wait for timeout
+ DBUG_RETURN(thd->mdl_context.acquire_locks(&mdl_requests,
+ lock_wait_timeout) ||
+ upgrade_lock_if_not_exists(thd, options, tables_start,
+ lock_wait_timeout));
}
- for (;;)
- {
- if (create_table)
- thd->push_internal_handler(&error_handler); // Avoid warnings & errors
- bool res= thd->mdl_context.acquire_locks(&mdl_requests, lock_wait_timeout);
- if (create_table)
- thd->pop_internal_handler();
-
- if (!res)
- DBUG_RETURN(FALSE); // Got locks
+ /* Protect this statement against concurrent BACKUP STAGE or FTWRL. */
+ if (thd->has_read_only_protection())
+ DBUG_RETURN(true);
- if (!create_table)
- DBUG_RETURN(TRUE); // Return original error
+ global_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_DDL, MDL_STATEMENT);
+ mdl_savepoint= thd->mdl_context.mdl_savepoint();
- /*
- We come here in the case of lock timeout when executing CREATE TABLE.
- Verify that table does exist (it usually does, as we got a lock conflict)
- */
- if (ha_table_exists(thd, &tables_start->db, &tables_start->table_name))
+ while (!thd->mdl_context.acquire_locks(&mdl_requests, lock_wait_timeout) &&
+ !upgrade_lock_if_not_exists(thd, options, tables_start,
+ lock_wait_timeout) &&
+ !thd->mdl_context.try_acquire_lock(&global_request))
+ {
+ if (global_request.ticket)
{
- if (options.if_not_exists())
- {
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
- ER_TABLE_EXISTS_ERROR,
- ER_THD(thd, ER_TABLE_EXISTS_ERROR),
- tables_start->table_name.str);
- }
- else
- my_error(ER_TABLE_EXISTS_ERROR, MYF(0), tables_start->table_name.str);
- DBUG_RETURN(TRUE);
+ thd->mdl_backup_ticket= global_request.ticket;
+ DBUG_RETURN(false);
}
+
/*
- We got error from acquire_locks, but the table didn't exists.
- This could happen if another connection runs a statement
- involving this non-existent table, and this statement took the mdl,
- but didn't error out with ER_NO_SUCH_TABLE yet (yes, a race condition).
- We play safe and restart the original acquire_locks with the
- original timeout.
+ There is ongoing or pending BACKUP STAGE or FTWRL.
+ Wait until it finishes and re-try.
*/
- create_table= 0;
- lock_wait_timeout= org_lock_wait_timeout;
+ thd->mdl_context.rollback_to_savepoint(mdl_savepoint);
+ if (thd->mdl_context.acquire_lock(&global_request, lock_wait_timeout))
+ break;
+ thd->mdl_context.rollback_to_savepoint(mdl_savepoint);
+
+ /* Reset tickets for all acquired locks */
+ global_request.ticket= 0;
+ MDL_request_list::Iterator it(mdl_requests);
+ while (auto mdl_request= it++)
+ mdl_request->ticket= 0;
}
+ DBUG_RETURN(true);
}
@@ -4108,10 +4291,9 @@ bool open_tables(THD *thd, const DDL_options_st &options,
for (TABLE_LIST *table= *start; table; table= table->next_global)
if (!table->schema_table)
{
- enum xa_states xa_state= thd->transaction.xid_state.xa_state;
- if (xa_state == XA_IDLE || xa_state == XA_PREPARED)
+ if (thd->transaction.xid_state.check_has_uncommitted_xa())
{
- my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
+ thd->transaction.xid_state.er_xaer_rmfail();
DBUG_RETURN(true);
}
else
@@ -4363,13 +4545,14 @@ restart:
}
}
+#ifdef WITH_WSREP
if (WSREP(thd) &&
wsrep_replicate_myisam &&
(*start) &&
(*start)->table &&
(*start)->table->file->ht == myisam_hton &&
- wsrep_thd_exec_mode(thd) == LOCAL_STATE &&
- !is_stat_table(&(*start)->db, &(*start)->alias) &&
+ wsrep_thd_is_local(thd) &&
+ !is_stat_table(&(*start)->db, &(*start)->alias) &&
thd->get_command() != COM_STMT_PREPARE &&
!thd->stmt_arena->is_stmt_prepare() &&
((thd->lex->sql_command == SQLCOM_INSERT ||
@@ -4381,11 +4564,17 @@ restart:
thd->lex->sql_command == SQLCOM_LOAD ||
thd->lex->sql_command == SQLCOM_DELETE)))
{
- WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start));
+ wsrep_before_rollback(thd, true);
+ wsrep_after_rollback(thd, true);
+ wsrep_after_statement(thd);
+ WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start));
}
+#endif /* WITH_WSREP */
error:
-WSREP_ERROR_LABEL:
+#ifdef WITH_WSREP
+wsrep_error_label:
+#endif
THD_STAGE_INFO(thd, stage_after_opening_tables);
thd_proc_info(thd, 0);
@@ -5327,8 +5516,7 @@ static void mark_real_tables_as_free_for_reuse(TABLE_LIST *table_list)
@retval TRUE A lock wait timeout, deadlock or out of memory.
*/
-bool lock_tables(THD *thd, TABLE_LIST *tables, uint count,
- uint flags)
+bool lock_tables(THD *thd, TABLE_LIST *tables, uint count, uint flags)
{
TABLE_LIST *table;
DBUG_ENTER("lock_tables");
@@ -5579,43 +5767,27 @@ static void update_field_dependencies(THD *thd, Field *field, TABLE *table)
DBUG_ENTER("update_field_dependencies");
if (should_mark_column(thd->column_usage))
{
- MY_BITMAP *bitmap;
-
/*
We always want to register the used keys, as the column bitmap may have
been set for all fields (for example for view).
*/
-
table->covering_keys.intersect(field->part_of_key);
- if (field->vcol_info)
- table->mark_virtual_col(field);
-
if (thd->column_usage == MARK_COLUMNS_READ)
- bitmap= table->read_set;
+ {
+ if (table->mark_column_with_deps(field))
+ DBUG_VOID_RETURN; // Field was already marked
+ }
else
- bitmap= table->write_set;
-
- /*
- The test-and-set mechanism in the bitmap is not reliable during
- multi-UPDATE statements under MARK_COLUMNS_READ mode
- (thd->column_usage == MARK_COLUMNS_READ), as this bitmap contains
- only those columns that are used in the SET clause. I.e they are being
- set here. See multi_update::prepare()
- */
- if (bitmap_fast_test_and_set(bitmap, field->field_index))
{
- if (thd->column_usage == MARK_COLUMNS_WRITE)
+ if (bitmap_fast_test_and_set(table->write_set, field->field_index))
{
DBUG_PRINT("warning", ("Found duplicated field"));
thd->dup_field= field;
+ DBUG_VOID_RETURN;
}
- else
- {
- DBUG_PRINT("note", ("Field found before"));
- }
- DBUG_VOID_RETURN;
}
+
table->used_fields++;
}
if (table->get_fields_in_item_tree)
@@ -7558,7 +7730,7 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array,
Item_window_func::split_sum_func.
*/
if (sum_func_list &&
- ((item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM) ||
+ ((item->with_sum_func() && item->type() != Item::SUM_FUNC_ITEM) ||
item->with_window_func))
{
item->split_sum_func(thd, ref_pointer_array, *sum_func_list,
@@ -7660,7 +7832,7 @@ bool setup_table_attributes(THD *thd, TABLE_LIST *table_list,
{
/* new counting for SELECT of INSERT ... SELECT command */
first_select_table= 0;
- thd->lex->select_lex.insert_tables= tablenr;
+ thd->lex->first_select_lex()->insert_tables= tablenr;
tablenr= 0;
}
if (table_list->jtbm_subselect)
@@ -7738,7 +7910,7 @@ bool setup_tables(THD *thd, Name_resolution_context *context,
TABLE_LIST *first_select_table= (select_insert ?
tables->next_local:
0);
- SELECT_LEX *select_lex= select_insert ? &thd->lex->select_lex :
+ SELECT_LEX *select_lex= select_insert ? thd->lex->first_select_lex() :
thd->lex->current_select;
if (select_lex->first_cond_optimization)
{
@@ -8121,18 +8293,9 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
if ((field= field_iterator.field()))
{
- /* Mark fields as used to allow storage engine to optimze access */
- bitmap_set_bit(field->table->read_set, field->field_index);
- /*
- Mark virtual fields for write and others that the virtual fields
- depend on for read.
- */
- if (field->vcol_info)
- field->table->mark_virtual_col(field);
+ field->table->mark_column_with_deps(field);
if (table)
- {
table->covering_keys.intersect(field->part_of_key);
- }
if (tables->is_natural_join)
{
TABLE *field_table;
@@ -8310,13 +8473,15 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves,
from subquery of VIEW, because tables of subquery belongs to VIEW
(see condition before prepare_check_option() call)
*/
- bool it_is_update= (select_lex == &thd->lex->select_lex) &&
+ bool it_is_update= (select_lex == thd->lex->first_select_lex()) &&
thd->lex->which_check_option_applicable();
bool save_is_item_list_lookup= select_lex->is_item_list_lookup;
TABLE_LIST *derived= select_lex->master_unit()->derived;
+ bool save_resolve_in_select_list= select_lex->context.resolve_in_select_list;
DBUG_ENTER("setup_conds");
select_lex->is_item_list_lookup= 0;
+ select_lex->context.resolve_in_select_list= false;
thd->column_usage= MARK_COLUMNS_READ;
DBUG_PRINT("info", ("thd->column_usage: %d", thd->column_usage));
@@ -8326,7 +8491,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves,
for (table= tables; table; table= table->next_local)
{
- if (select_lex == &thd->lex->select_lex &&
+ if (select_lex == thd->lex->first_select_lex() &&
select_lex->first_cond_optimization &&
table->merged_for_insert &&
table->prepare_where(thd, conds, FALSE))
@@ -8369,7 +8534,8 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves,
select_lex->where= *conds;
}
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
- DBUG_RETURN(MY_TEST(thd->is_error()));
+ select_lex->context.resolve_in_select_list= save_resolve_in_select_list;
+ DBUG_RETURN(thd->is_error());
err_no_arena:
select_lex->is_item_list_lookup= save_is_item_list_lookup;
@@ -8497,12 +8663,12 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
table_arg->update_default_fields(ignore_errors))
goto err;
+ if (table_arg->versioned() && !only_unvers_fields)
+ table_arg->vers_update_fields();
/* Update virtual fields */
if (table_arg->vfield &&
table_arg->update_virtual_fields(table_arg->file, VCOL_UPDATE_FOR_WRITE))
goto err;
- if (table_arg->versioned() && !only_unvers_fields)
- table_arg->vers_update_fields();
thd->abort_on_warning= save_abort_on_warning;
thd->no_errors= save_no_errors;
DBUG_RETURN(thd->is_error());
@@ -8743,17 +8909,19 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
goto err;
field->set_has_explicit_value();
}
- thd->abort_on_warning= FALSE;
- if (table->default_field &&
- table->update_default_fields(ignore_errors))
- goto err;
- /* Update virtual fields */
- if (table->vfield &&
- table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE))
- goto err;
- if (table->versioned())
- table->vers_update_fields();
- thd->abort_on_warning= abort_on_warning_saved;
+ /* Update virtual fields if there wasn't any errors */
+ if (!thd->is_error())
+ {
+ thd->abort_on_warning= FALSE;
+ if (table->default_field && table->update_default_fields(ignore_errors))
+ goto err;
+ if (table->versioned())
+ table->vers_update_fields();
+ if (table->vfield &&
+ table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE))
+ goto err;
+ thd->abort_on_warning= abort_on_warning_saved;
+ }
DBUG_RETURN(thd->is_error());
err:
@@ -8925,7 +9093,7 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
Item_func_match *ifm;
while ((ifm=li++))
- if (unlikely(!ifm->fixed))
+ if (unlikely(!ifm->is_fixed()))
/*
it mean that clause where was FT function was removed, so we have
to remove the function from the list.
@@ -8979,7 +9147,6 @@ open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
{
Query_tables_list query_tables_list_backup;
LEX *lex= thd->lex;
-
DBUG_ENTER("open_system_tables_for_read");
/*
@@ -8993,9 +9160,15 @@ open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
thd->reset_n_backup_open_tables_state(backup);
thd->lex->sql_command= SQLCOM_SELECT;
+ /*
+ Only use MYSQL_LOCK_IGNORE_TIMEOUT for tables opened for read.
+ This is to ensure that lock_wait_timeout is honored when trying
+ to update stats tables.
+ */
if (open_and_lock_tables(thd, table_list, FALSE,
- MYSQL_OPEN_IGNORE_FLUSH |
- MYSQL_LOCK_IGNORE_TIMEOUT))
+ (MYSQL_OPEN_IGNORE_FLUSH |
+ (table_list->lock_type < TL_WRITE_ALLOW_WRITE ?
+ MYSQL_LOCK_IGNORE_TIMEOUT : 0))))
{
lex->restore_backup_query_tables_list(&query_tables_list_backup);
thd->restore_backup_open_tables_state(backup);
@@ -9027,6 +9200,13 @@ open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
void
close_system_tables(THD *thd, Open_tables_backup *backup)
{
+ /*
+ Inform the transaction handler that we are closing the
+ system tables and we don't need the read view anymore.
+ */
+ for (TABLE *table= thd->open_tables ; table ; table= table->next)
+ table->file->extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE);
+
close_thread_tables(thd);
thd->restore_backup_open_tables_state(backup);
}
@@ -9160,7 +9340,7 @@ void unfix_fields(List<Item> &fields)
List_iterator<Item> li(fields);
Item *item;
while ((item= li++))
- item->fixed= 0;
+ item->unfix_fields();
}
@@ -9209,9 +9389,7 @@ int dynamic_column_error_message(enum_dyncol_func_result rc)
void promote_select_describe_flag_if_needed(LEX *lex)
{
if (lex->describe)
- {
- lex->select_lex.options |= SELECT_DESCRIBE;
- }
+ lex->first_select_lex()->options|= SELECT_DESCRIBE;
}
diff --git a/sql/sql_base.h b/sql/sql_base.h
index 3a31518840d..5d30c3611dc 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -57,6 +57,13 @@ enum enum_resolution_type {
RESOLVED_AGAINST_ALIAS
};
+/* Argument to flush_tables() of what to flush */
+enum flush_tables_type {
+ FLUSH_ALL,
+ FLUSH_NON_TRANS_TABLES,
+ FLUSH_SYS_TABLES
+};
+
enum find_item_error_report_type {REPORT_ALL_ERRORS, REPORT_EXCEPT_NOT_FOUND,
IGNORE_ERRORS, REPORT_EXCEPT_NON_UNIQUE,
IGNORE_EXCEPT_NON_UNIQUE};
@@ -289,12 +296,10 @@ TABLE *open_system_table_for_update(THD *thd, TABLE_LIST *one_table);
TABLE *open_log_table(THD *thd, TABLE_LIST *one_table, Open_tables_backup *backup);
void close_log_table(THD *thd, Open_tables_backup *backup);
-TABLE *open_performance_schema_table(THD *thd, TABLE_LIST *one_table,
- Open_tables_state *backup);
-void close_performance_schema_table(THD *thd, Open_tables_state *backup);
-
bool close_cached_tables(THD *thd, TABLE_LIST *tables,
bool wait_for_refresh, ulong timeout);
+void purge_tables(bool purge_flag);
+bool flush_tables(THD *thd, flush_tables_type flag);
bool close_cached_connection_tables(THD *thd, LEX_CSTRING *connect_string);
void close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
ha_extra_function extra,
@@ -348,13 +353,6 @@ inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
table->force_index= table_list->force_index;
table->force_index_order= table->force_index_group= 0;
table->covering_keys= table->s->keys_for_keyread;
- TABLE_LIST *orig= table_list->select_lex ?
- table_list->select_lex->master_unit()->derived : 0;
- if (!orig || !orig->is_merged_derived())
- {
- /* Tables merged from derived were set up already.*/
- table->covering_keys= table->s->keys_for_keyread;
- }
}
inline TABLE_LIST *find_table_in_global_list(TABLE_LIST *table,
@@ -372,10 +370,12 @@ inline bool setup_fields_with_no_wrap(THD *thd, Ref_ptr_array ref_pointer_array,
bool allow_sum_func)
{
bool res;
- thd->lex->select_lex.no_wrap_view_item= TRUE;
+ SELECT_LEX *first= thd->lex->first_select_lex();
+ DBUG_ASSERT(thd->lex->current_select == first);
+ first->no_wrap_view_item= TRUE;
res= setup_fields(thd, ref_pointer_array, item, column_usage,
sum_func_list, NULL, allow_sum_func);
- thd->lex->select_lex.no_wrap_view_item= FALSE;
+ first->no_wrap_view_item= FALSE;
return res;
}
@@ -561,14 +561,14 @@ public:
Set flag indicating that we have already acquired metadata lock
protecting this statement against GRL while opening tables.
*/
- void set_has_protection_against_grl()
+ void set_has_protection_against_grl(enum_mdl_type mdl_type)
{
- m_has_protection_against_grl= TRUE;
+ m_has_protection_against_grl|= MDL_BIT(mdl_type);
}
- bool has_protection_against_grl() const
+ bool has_protection_against_grl(enum_mdl_type mdl_type) const
{
- return m_has_protection_against_grl;
+ return (bool) (m_has_protection_against_grl & MDL_BIT(mdl_type));
}
private:
@@ -600,7 +600,7 @@ private:
Indicates that in the process of opening tables we have acquired
protection against global read lock.
*/
- bool m_has_protection_against_grl;
+ mdl_bitmap_t m_has_protection_against_grl;
};
diff --git a/sql/sql_basic_types.h b/sql/sql_basic_types.h
index 6749b2251df..170e93741ef 100644
--- a/sql/sql_basic_types.h
+++ b/sql/sql_basic_types.h
@@ -22,4 +22,314 @@
typedef ulonglong sql_mode_t;
typedef int64 query_id_t;
+
+
+/*
+ "fuzzydate" with strict data type control.
+ Represents a mixture of *only* data type conversion flags, without rounding.
+ Please keep "explicit" in constructors and conversion methods.
+*/
+class date_conv_mode_t
+{
+public:
+ enum value_t
+ {
+ CONV_NONE= 0U,
+ /*
+ FUZZY_DATES is used for the result will only be used for comparison
+ purposes. Conversion is as relaxed as possible.
+ */
+ FUZZY_DATES= 1U,
+ TIME_ONLY= 4U,
+ INTERVAL_hhmmssff= 8U,
+ INTERVAL_DAY= 16U,
+ RANGE0_LAST= INTERVAL_DAY,
+ NO_ZERO_IN_DATE= (1UL << 23), // MODE_NO_ZERO_IN_DATE
+ NO_ZERO_DATE= (1UL << 24), // MODE_NO_ZERO_DATE
+ INVALID_DATES= (1UL << 25) // MODE_INVALID_DATES
+ };
+
+ /*
+ BIT-OR for all known values. Let's have a separate enum for it.
+ - We don't put this value "value_t", to avoid handling it in switch().
+ - We don't put this value as a static const inside the class,
+ because "gdb" would display it every time when we do "print"
+ for a time_round_mode_t value.
+ - We can't put into into a function returning this value, because
+ it's not allowed to use functions in static_assert.
+ */
+ enum known_values_t
+ {
+ KNOWN_MODES= FUZZY_DATES |
+ TIME_ONLY | INTERVAL_hhmmssff | INTERVAL_DAY |
+ NO_ZERO_IN_DATE | NO_ZERO_DATE | INVALID_DATES
+ };
+private:
+ value_t m_mode;
+public:
+
+ // Constructors
+ explicit date_conv_mode_t(ulonglong fuzzydate)
+ :m_mode((value_t) fuzzydate)
+ { }
+
+ // Conversion operators
+ explicit operator ulonglong() const
+ {
+ return m_mode;
+ }
+ explicit operator bool() const
+ {
+ return m_mode != 0;
+ }
+
+ // Unary operators
+ ulonglong operator~() const
+ {
+ return ~m_mode;
+ }
+
+ // Dyadic bitwise operators
+ date_conv_mode_t operator&(const date_conv_mode_t &other) const
+ {
+ return date_conv_mode_t(m_mode & other.m_mode);
+ }
+ date_conv_mode_t operator&(const ulonglong other) const
+ {
+ return date_conv_mode_t(m_mode & other);
+ }
+
+ date_conv_mode_t operator|(const date_conv_mode_t &other) const
+ {
+ return date_conv_mode_t(m_mode | other.m_mode);
+ }
+
+ // Dyadic bitwise assignment operators
+ date_conv_mode_t &operator&=(const date_conv_mode_t &other)
+ {
+ m_mode= value_t(m_mode & other.m_mode);
+ return *this;
+ }
+
+ date_conv_mode_t &operator|=(const date_conv_mode_t &other)
+ {
+ m_mode= value_t(m_mode | other.m_mode);
+ return *this;
+ }
+};
+
+
+/*
+ Fractional rounding mode for temporal data types.
+*/
+class time_round_mode_t
+{
+public:
+ enum value_t
+ {
+ /*
+ Use FRAC_NONE when the value needs no rounding nor truncation,
+ because it is already known not to haveany fractional digits outside
+ of the requested precision.
+ */
+ FRAC_NONE= 0,
+ FRAC_TRUNCATE= date_conv_mode_t::RANGE0_LAST << 1, // 32
+ FRAC_ROUND= date_conv_mode_t::RANGE0_LAST << 2 // 64
+ };
+ // BIT-OR for all known values. See comments in time_conv_mode_t.
+ enum known_values_t
+ {
+ KNOWN_MODES= FRAC_TRUNCATE | FRAC_ROUND
+ };
+private:
+ value_t m_mode;
+public:
+ // Constructors
+ explicit time_round_mode_t(ulonglong mode)
+ :m_mode((value_t) mode)
+ {
+ DBUG_ASSERT(mode == FRAC_NONE ||
+ mode == FRAC_TRUNCATE ||
+ mode == FRAC_ROUND);
+ }
+ // Conversion operators
+ explicit operator ulonglong() const
+ {
+ return m_mode;
+ }
+ value_t mode() const
+ {
+ return m_mode;
+ }
+ // Comparison operators
+ bool operator==(const time_round_mode_t &other)
+ {
+ return m_mode == other.m_mode;
+ }
+};
+
+
+/*
+ "fuzzydate" with strict data type control.
+ Used as a parameter to get_date() and represents a mixture of:
+ - data type conversion flags
+ - fractional second rounding flags
+ Please keep "explicit" in constructors and conversion methods.
+*/
+class date_mode_t
+{
+public:
+ enum value_t
+ {
+ CONV_NONE= date_conv_mode_t::CONV_NONE, // 0
+ FUZZY_DATES= date_conv_mode_t::FUZZY_DATES, // 1
+ TIME_ONLY= date_conv_mode_t::TIME_ONLY, // 4
+ INTERVAL_hhmmssff= date_conv_mode_t::INTERVAL_hhmmssff, // 8
+ INTERVAL_DAY= date_conv_mode_t::INTERVAL_DAY, // 16
+ FRAC_TRUNCATE= time_round_mode_t::FRAC_TRUNCATE, // 32
+ FRAC_ROUND= time_round_mode_t::FRAC_ROUND, // 64
+ NO_ZERO_IN_DATE= date_conv_mode_t::NO_ZERO_IN_DATE, // (1UL << 23)
+ NO_ZERO_DATE= date_conv_mode_t::NO_ZERO_DATE, // (1UL << 24)
+ INVALID_DATES= date_conv_mode_t::INVALID_DATES, // (1UL << 25)
+ };
+protected:
+ value_t m_mode;
+public:
+
+ // Constructors
+ explicit date_mode_t(ulonglong fuzzydate)
+ :m_mode((value_t) fuzzydate)
+ { }
+
+ // Conversion operators
+ explicit operator ulonglong() const
+ {
+ return m_mode;
+ }
+ explicit operator bool() const
+ {
+ return m_mode != 0;
+ }
+ explicit operator date_conv_mode_t() const
+ {
+ return date_conv_mode_t(ulonglong(m_mode) & date_conv_mode_t::KNOWN_MODES);
+ }
+ explicit operator time_round_mode_t() const
+ {
+ return time_round_mode_t(ulonglong(m_mode) & time_round_mode_t::KNOWN_MODES);
+ }
+ // Unary operators
+ ulonglong operator~() const
+ {
+ return ~m_mode;
+ }
+ bool operator!() const
+ {
+ return !m_mode;
+ }
+
+ // Dyadic bitwise operators
+ date_mode_t operator&(const date_mode_t &other) const
+ {
+ return date_mode_t(m_mode & other.m_mode);
+ }
+ date_mode_t operator&(ulonglong other) const
+ {
+ return date_mode_t(m_mode & other);
+ }
+
+ date_mode_t operator|(const date_mode_t &other) const
+ {
+ return date_mode_t(m_mode | other.m_mode);
+ }
+
+ // Dyadic bitwise assignment operators
+ date_mode_t &operator&=(const date_mode_t &other)
+ {
+ m_mode= value_t(m_mode & other.m_mode);
+ return *this;
+ }
+
+ date_mode_t &operator|=(const date_mode_t &other)
+ {
+ m_mode= value_t(m_mode | other.m_mode);
+ return *this;
+ }
+
+ date_mode_t &operator|=(const date_conv_mode_t &other)
+ {
+ m_mode= value_t(m_mode | ulonglong(other));
+ return *this;
+ }
+};
+
+
+// Bitwise OR out-of-class operators for data type mixtures
+static inline date_mode_t operator|(const date_mode_t &a,
+ const date_conv_mode_t &b)
+{
+ return date_mode_t(ulonglong(a) | ulonglong(b));
+}
+
+static inline date_mode_t operator|(const date_conv_mode_t &a,
+ const time_round_mode_t &b)
+{
+ return date_mode_t(ulonglong(a) | ulonglong(b));
+}
+
+
+static inline date_mode_t operator|(const date_conv_mode_t &a,
+ const date_mode_t &b)
+{
+ return date_mode_t(ulonglong(a) | ulonglong(b));
+}
+
+
+// Bitwise AND out-of-class operators for data type mixtures
+static inline date_conv_mode_t operator&(const date_mode_t &a,
+ const date_conv_mode_t &b)
+{
+ return date_conv_mode_t(ulonglong(a) & ulonglong(b));
+}
+
+static inline date_conv_mode_t operator&(const date_conv_mode_t &a,
+ const date_mode_t &b)
+{
+ return date_conv_mode_t(ulonglong(a) & ulonglong(b));
+}
+
+static inline date_conv_mode_t operator&(sql_mode_t &a,
+ const date_conv_mode_t &b)
+{
+ return date_conv_mode_t(a & ulonglong(b));
+}
+
+
+static const date_conv_mode_t
+ TIME_CONV_NONE (date_conv_mode_t::CONV_NONE),
+ TIME_FUZZY_DATES (date_conv_mode_t::FUZZY_DATES),
+ TIME_TIME_ONLY (date_conv_mode_t::TIME_ONLY),
+ TIME_INTERVAL_hhmmssff (date_conv_mode_t::INTERVAL_hhmmssff),
+ TIME_INTERVAL_DAY (date_conv_mode_t::INTERVAL_DAY),
+ TIME_NO_ZERO_IN_DATE (date_conv_mode_t::NO_ZERO_IN_DATE),
+ TIME_NO_ZERO_DATE (date_conv_mode_t::NO_ZERO_DATE),
+ TIME_INVALID_DATES (date_conv_mode_t::INVALID_DATES);
+
+// An often used combination
+static const date_conv_mode_t
+ TIME_NO_ZEROS (date_conv_mode_t::NO_ZERO_DATE|
+ date_conv_mode_t::NO_ZERO_IN_DATE);
+
+// Flags understood by str_to_xxx, number_to_xxx, check_date
+static const date_conv_mode_t
+ TIME_MODE_FOR_XXX_TO_DATE (date_mode_t::NO_ZERO_IN_DATE |
+ date_mode_t::NO_ZERO_DATE |
+ date_mode_t::INVALID_DATES);
+
+static const time_round_mode_t
+ TIME_FRAC_NONE (time_round_mode_t::FRAC_NONE),
+ TIME_FRAC_TRUNCATE (time_round_mode_t::FRAC_TRUNCATE),
+ TIME_FRAC_ROUND (time_round_mode_t::FRAC_ROUND);
+
+
#endif
diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc
index 1b8ba311a80..f1326d97a21 100644
--- a/sql/sql_binlog.cc
+++ b/sql/sql_binlog.cc
@@ -147,7 +147,7 @@ int binlog_defragment(THD *thd)
(char *) my_malloc(thd->lex->comment.length, MYF(MY_WME));
if (!thd->lex->comment.str)
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 1);
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), 1);
return -1;
}
@@ -226,7 +226,7 @@ void mysql_client_binlog_statement(THD* thd)
*/
if (!(rli))
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 1); /* needed 1 bytes */
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), 1); /* needed 1 bytes */
goto end;
}
@@ -245,7 +245,7 @@ void mysql_client_binlog_statement(THD* thd)
decoded_len= my_base64_needed_decoded_length((int)coded_len);
if (!(buf= (char *) my_malloc(decoded_len, MYF(MY_WME))))
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 1);
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), 1);
goto end;
}
diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h
index ca9ba0b67f4..765e4ee2725 100644
--- a/sql/sql_bitmap.h
+++ b/sql/sql_bitmap.h
@@ -25,135 +25,21 @@
#include <my_sys.h>
#include <my_bitmap.h>
+#include <my_bit.h>
-template <uint default_width> class Bitmap
-{
- MY_BITMAP map;
- uint32 buffer[(default_width+31)/32];
-public:
- Bitmap() { init(); }
- Bitmap(const Bitmap& from) { *this=from; }
- explicit Bitmap(uint prefix_to_set) { init(prefix_to_set); }
- void init() { my_bitmap_init(&map, buffer, default_width, 0); }
- void init(uint prefix_to_set) { init(); set_prefix(prefix_to_set); }
- uint length() const { return default_width; }
- Bitmap& operator=(const Bitmap& map2)
- {
- init();
- memcpy(buffer, map2.buffer, sizeof(buffer));
- return *this;
- }
- void set_bit(uint n) { bitmap_set_bit(&map, n); }
- void clear_bit(uint n) { bitmap_clear_bit(&map, n); }
- void set_prefix(uint n) { bitmap_set_prefix(&map, n); }
- void set_all() { bitmap_set_all(&map); }
- void clear_all() { bitmap_clear_all(&map); }
- void intersect(Bitmap& map2) { bitmap_intersect(&map, &map2.map); }
- void intersect(ulonglong map2buff)
- {
- // Use a spearate temporary buffer, as bitmap_init() clears all the bits.
- ulonglong buf2;
- MY_BITMAP map2;
-
- my_bitmap_init(&map2, (uint32 *) &buf2, sizeof(ulonglong) * 8, 0);
-
- // Store the original bits.
- if (sizeof(ulonglong) >= 8)
- {
- int8store(const_cast<uchar *>(static_cast<uchar *>
- (static_cast<void *>(&buf2))),
- map2buff);
- }
- else
- {
- DBUG_ASSERT(sizeof(buffer) >= 4);
- int4store(const_cast<uchar *>(static_cast<uchar *>
- (static_cast<void *>(&buf2))),
- static_cast<uint32>(map2buff));
- }
-
- bitmap_intersect(&map, &map2);
- }
- /* Use highest bit for all bits above sizeof(ulonglong)*8. */
- void intersect_extended(ulonglong map2buff)
- {
- intersect(map2buff);
- if (map.n_bits > sizeof(ulonglong) * 8)
- bitmap_set_above(&map, sizeof(ulonglong),
- MY_TEST(map2buff & (1LL << (sizeof(ulonglong) * 8 - 1))));
- }
- void subtract(Bitmap& map2) { bitmap_subtract(&map, &map2.map); }
- void merge(Bitmap& map2) { bitmap_union(&map, &map2.map); }
- bool is_set(uint n) const { return bitmap_is_set(&map, n); }
- bool is_prefix(uint n) const { return bitmap_is_prefix(&map, n); }
- bool is_clear_all() const { return bitmap_is_clear_all(&map); }
- bool is_set_all() const { return bitmap_is_set_all(&map); }
- bool is_subset(const Bitmap& map2) const { return bitmap_is_subset(&map, &map2.map); }
- bool is_overlapping(const Bitmap& map2) const { return bitmap_is_overlapping(&map, &map2.map); }
- bool operator==(const Bitmap& map2) const { return bitmap_cmp(&map, &map2.map); }
- bool operator!=(const Bitmap& map2) const { return !(*this == map2); }
- char *print(char *buf) const
- {
- char *s=buf;
- const uchar *e=(uchar *)buffer, *b=e+sizeof(buffer)-1;
- while (!*b && b>e)
- b--;
- if ((*s=_dig_vec_upper[*b >> 4]) != '0')
- s++;
- *s++=_dig_vec_upper[*b & 15];
- while (--b>=e)
- {
- *s++=_dig_vec_upper[*b >> 4];
- *s++=_dig_vec_upper[*b & 15];
- }
- *s=0;
- return buf;
- }
- ulonglong to_ulonglong() const
- {
- if (sizeof(buffer) >= 8)
- return uint8korr(static_cast<const uchar *>
- (static_cast<const void *>(buffer)));
- DBUG_ASSERT(sizeof(buffer) >= 4);
- return (ulonglong)
- uint4korr(static_cast<const uchar *>
- (static_cast<const void *>(buffer)));
- }
- uint bits_set()
- {
- return bitmap_bits_set(&map);
- }
- class Iterator
- {
- Bitmap &map;
- uint no;
- public:
- Iterator(Bitmap<default_width> &map2): map(map2), no(0) {}
- int operator++(int) {
- if (no == default_width) return BITMAP_END;
- while (!map.is_set(no))
- {
- if ((++no) == default_width) return BITMAP_END;
- }
- return no ++;
- }
- enum { BITMAP_END= default_width };
- };
-};
-
-/* An iterator to quickly walk over bits in ulonglong bitmap. */
+/* An iterator to quickly walk over bits in unlonglong bitmap. */
class Table_map_iterator
{
ulonglong bmp;
uint no;
public:
Table_map_iterator(ulonglong t) : bmp(t), no(0) {}
- uint next_bit()
+ int next_bit()
{
- static const uchar last_bit[16]= {32, 0, 1, 0,
- 2, 0, 1, 0,
+ static const char last_bit[16] = { 32, 0, 1, 0,
+ 2, 0, 1, 0,
3, 0, 1, 0,
- 2, 0, 1, 0};
+ 2, 0, 1, 0 };
uint bit;
while ((bit= last_bit[bmp & 0xF]) == 32)
{
@@ -162,67 +48,276 @@ public:
if (!bmp)
return BITMAP_END;
}
- bmp &= ~(1ULL << bit);
+ bmp &= ~(1LL << bit);
return no + bit;
}
- uint operator++(int) { return next_bit(); }
+ int operator++(int) { return next_bit(); }
enum { BITMAP_END= 64 };
};
-template <> class Bitmap<64>
+template <uint width> class Bitmap
{
- ulonglong map;
+/*
+ Workaround GCC optimizer bug (generating SSE instuctions on unaligned data)
+*/
+#if defined (__GNUC__) && defined(__x86_64__) && (__GNUC__ < 6) && !defined(__clang__)
+#define NEED_GCC_NO_SSE_WORKAROUND
+#endif
+
+#ifdef NEED_GCC_NO_SSE_WORKAROUND
+#pragma GCC push_options
+#pragma GCC target ("no-sse")
+#endif
+
+private:
+ static const int BITS_PER_ELEMENT= sizeof(ulonglong) * 8;
+ static const int ARRAY_ELEMENTS= (width + BITS_PER_ELEMENT - 1) / BITS_PER_ELEMENT;
+ static const ulonglong ALL_BITS_SET= ULLONG_MAX;
+
+ ulonglong buffer[ARRAY_ELEMENTS];
+
+ uint bit_index(uint n) const
+ {
+ DBUG_ASSERT(n < width);
+ return ARRAY_ELEMENTS == 1 ? 0 : n / BITS_PER_ELEMENT;
+ }
+ ulonglong bit_mask(uint n) const
+ {
+ DBUG_ASSERT(n < width);
+ return ARRAY_ELEMENTS == 1 ? 1ULL << n : 1ULL << (n % BITS_PER_ELEMENT);
+ }
+ ulonglong last_element_mask(int n) const
+ {
+ DBUG_ASSERT(n % BITS_PER_ELEMENT != 0);
+ return bit_mask(n) - 1;
+ }
+
public:
- Bitmap<64>() { }
- explicit Bitmap<64>(uint prefix_to_set) { set_prefix(prefix_to_set); }
- void init() { }
- void init(uint prefix_to_set) { set_prefix(prefix_to_set); }
- uint length() const { return 64; }
- void set_bit(uint n) { map|= ((ulonglong)1) << n; }
- void clear_bit(uint n) { map&= ~(((ulonglong)1) << n); }
- void set_prefix(uint n)
- {
- if (n >= length())
- set_all();
+ /*
+ The default constructor does nothing.
+ The caller is supposed to either zero the memory
+ or to call set_all()/clear_all()/set_prefix()
+ to initialize bitmap.
+ */
+ Bitmap() { }
+
+ explicit Bitmap(uint prefix)
+ {
+ set_prefix(prefix);
+ }
+ void init(uint prefix)
+ {
+ set_prefix(prefix);
+ }
+ uint length() const
+ {
+ return width;
+ }
+ void set_bit(uint n)
+ {
+ buffer[bit_index(n)] |= bit_mask(n);
+ }
+ void clear_bit(uint n)
+ {
+ buffer[bit_index(n)] &= ~bit_mask(n);
+ }
+ bool is_set(uint n) const
+ {
+ return buffer[bit_index(n)] & bit_mask(n);
+ }
+ void set_prefix(uint prefix_size)
+ {
+ set_if_smaller(prefix_size, width);
+
+ size_t idx= prefix_size / BITS_PER_ELEMENT;
+
+ for (size_t i= 0; i < idx; i++)
+ buffer[i]= ALL_BITS_SET;
+
+ if (prefix_size % BITS_PER_ELEMENT)
+ buffer[idx++]= last_element_mask(prefix_size);
+
+ for (size_t i= idx; i < ARRAY_ELEMENTS; i++)
+ buffer[i]= 0;
+ }
+ bool is_prefix(uint prefix_size) const
+ {
+ DBUG_ASSERT(prefix_size <= width);
+
+ size_t idx= prefix_size / BITS_PER_ELEMENT;
+
+ for (size_t i= 0; i < idx; i++)
+ if (buffer[i] != ALL_BITS_SET)
+ return false;
+
+ if (prefix_size % BITS_PER_ELEMENT)
+ if (buffer[idx++] != last_element_mask(prefix_size))
+ return false;
+
+ for (size_t i= idx; i < ARRAY_ELEMENTS; i++)
+ if (buffer[i] != 0)
+ return false;
+
+ return true;
+ }
+ void set_all()
+ {
+ if (width % BITS_PER_ELEMENT)
+ set_prefix(width);
+ else if (ARRAY_ELEMENTS > 1)
+ memset(buffer, 0xff, sizeof(buffer));
else
- map= (((ulonglong)1) << n)-1;
- }
- void set_all() { map=~(ulonglong)0; }
- void clear_all() { map=(ulonglong)0; }
- void intersect(Bitmap<64>& map2) { map&= map2.map; }
- void intersect(ulonglong map2) { map&= map2; }
- void intersect_extended(ulonglong map2) { map&= map2; }
- void subtract(Bitmap<64>& map2) { map&= ~map2.map; }
- void merge(Bitmap<64>& map2) { map|= map2.map; }
- bool is_set(uint n) const { return MY_TEST(map & (((ulonglong) 1) << n)); }
- bool is_prefix(uint n) const { return map == (((ulonglong)1) << n)-1; }
- bool is_clear_all() const { return map == (ulonglong)0; }
- bool is_set_all() const { return map == ~(ulonglong)0; }
- bool is_subset(const Bitmap<64>& map2) const { return !(map & ~map2.map); }
- bool is_overlapping(const Bitmap<64>& map2) const { return (map & map2.map)!= 0; }
- bool operator==(const Bitmap<64>& map2) const { return map == map2.map; }
- char *print(char *buf) const {
- longlong2str(longlong(map), buf, 16);
- return buf;
+ buffer[0] = ALL_BITS_SET;
}
- ulonglong to_ulonglong() const { return map; }
- class Iterator : public Table_map_iterator
+ void clear_all()
{
- public:
- Iterator(Bitmap<64> &map2) : Table_map_iterator(map2.map) {}
- };
- uint bits_set()
+ if (ARRAY_ELEMENTS > 1)
+ memset(buffer, 0, sizeof(buffer));
+ else
+ buffer[0]= 0;
+ }
+ void intersect(const Bitmap& map2)
+ {
+ for (size_t i= 0; i < ARRAY_ELEMENTS; i++)
+ buffer[i] &= map2.buffer[i];
+ }
+
+private:
+ /*
+ Intersect with a bitmap represented as as longlong.
+ In addition, pad the rest of the bitmap with 0 or 1 bits
+ depending on pad_with_ones parameter.
+ */
+ void intersect_and_pad(ulonglong map2buff, bool pad_with_ones)
{
- //TODO: use my_count_bits()
- uint res= 0, i= 0;
- for (; i < 64 ; i++)
+ buffer[0] &= map2buff;
+
+ for (size_t i= 1; i < ARRAY_ELEMENTS; i++)
+ buffer[i]= pad_with_ones ? ALL_BITS_SET : 0;
+
+ if (ARRAY_ELEMENTS > 1 && (width % BITS_PER_ELEMENT) && pad_with_ones)
+ buffer[ARRAY_ELEMENTS - 1]= last_element_mask(width);
+ }
+
+public:
+ void intersect(ulonglong map2buff)
+ {
+ intersect_and_pad(map2buff, 0);
+ }
+ /* Use highest bit for all bits above first element. */
+ void intersect_extended(ulonglong map2buff)
+ {
+ intersect_and_pad(map2buff, (map2buff & (1ULL << 63)));
+ }
+ void subtract(const Bitmap& map2)
+ {
+ for (size_t i= 0; i < ARRAY_ELEMENTS; i++)
+ buffer[i] &= ~(map2.buffer[i]);
+ }
+ void merge(const Bitmap& map2)
+ {
+ for (size_t i= 0; i < ARRAY_ELEMENTS; i++)
+ buffer[i] |= map2.buffer[i];
+ }
+ bool is_clear_all() const
+ {
+ for (size_t i= 0; i < ARRAY_ELEMENTS; i++)
+ if (buffer[i])
+ return false;
+ return true;
+ }
+ bool is_subset(const Bitmap& map2) const
+ {
+ for (size_t i= 0; i < ARRAY_ELEMENTS; i++)
+ if (buffer[i] & ~(map2.buffer[i]))
+ return false;
+ return true;
+ }
+ bool is_overlapping(const Bitmap& map2) const
+ {
+ for (size_t i= 0; i < ARRAY_ELEMENTS; i++)
+ if (buffer[i] & map2.buffer[i])
+ return true;
+ return false;
+ }
+ bool operator==(const Bitmap& map2) const
+ {
+ if (ARRAY_ELEMENTS > 1)
+ return !memcmp(buffer,map2.buffer,sizeof(buffer));
+ return buffer[0] == map2.buffer[0];
+ }
+ bool operator!=(const Bitmap& map2) const
+ {
+ return !(*this == map2);
+ }
+ /*
+ Print hexadecimal representation of bitmap.
+ Truncate trailing zeros.
+ */
+ char *print(char *buf) const
+ {
+ size_t last; /*index of the last non-zero element, or 0. */
+
+ for (last= ARRAY_ELEMENTS - 1; last && !buffer[last]; last--){}
+
+ const int HEX_DIGITS_PER_ELEMENT= BITS_PER_ELEMENT / 4;
+ for (size_t i= 0; i < last; i++)
{
- if (map & ((ulonglong)1<<i))
- res++;
+ ulonglong num = buffer[i];
+ uint shift = BITS_PER_ELEMENT - 4;
+ size_t pos= i * HEX_DIGITS_PER_ELEMENT;
+ for (size_t j= 0; j < HEX_DIGITS_PER_ELEMENT; j++)
+ {
+ buf[pos + j]= _dig_vec_upper[(num >> shift) & 0xf];
+ shift += 4;
+ }
}
+ longlong2str(buffer[last], buf, 16);
+ return buf;
+ }
+ ulonglong to_ulonglong() const
+ {
+ return buffer[0];
+ }
+ uint bits_set()
+ {
+ uint res= 0;
+ for (size_t i= 0; i < ARRAY_ELEMENTS; i++)
+ res += my_count_bits(buffer[i]);
return res;
}
+ class Iterator
+ {
+ const Bitmap& map;
+ uint offset;
+ Table_map_iterator tmi;
+ public:
+ Iterator(const Bitmap<width>& map2) : map(map2), offset(0), tmi(map2.buffer[0]) {}
+ int operator++(int)
+ {
+ for (;;)
+ {
+ int nextbit= tmi++;
+
+ if (nextbit != Table_map_iterator::BITMAP_END)
+ return offset + nextbit;
+
+ if (offset + BITS_PER_ELEMENT >= map.length())
+ return BITMAP_END;
+
+ offset += BITS_PER_ELEMENT;
+ tmi= Table_map_iterator(map.buffer[offset / BITS_PER_ELEMENT]);
+ }
+ }
+ enum { BITMAP_END = width };
+ };
+
+#ifdef NEED_GCC_NO_SSE_WORKAROUND
+#pragma GCC pop_options
+#undef NEED_GCC_NO_SSE_WORKAROUND
+#endif
};
+typedef Bitmap<MAX_INDEXES> key_map; /* Used for finding keys */
#endif /* SQL_BITMAP_INCLUDED */
diff --git a/sql/sql_builtin.cc.in b/sql/sql_builtin.cc.in
index 5ac044afd5d..810f98a876c 100644
--- a/sql/sql_builtin.cc.in
+++ b/sql/sql_builtin.cc.in
@@ -32,9 +32,6 @@ extern
builtin_maria_plugin
@mysql_mandatory_plugins@ @mysql_optional_plugins@
builtin_maria_binlog_plugin,
-#ifdef WITH_WSREP
- builtin_maria_wsrep_plugin,
-#endif /* WITH_WSREP */
builtin_maria_mysql_password_plugin;
struct st_maria_plugin *mysql_optional_plugins[]=
@@ -45,8 +42,5 @@ struct st_maria_plugin *mysql_optional_plugins[]=
struct st_maria_plugin *mysql_mandatory_plugins[]=
{
builtin_maria_binlog_plugin, builtin_maria_mysql_password_plugin,
-#ifdef WITH_WSREP
- builtin_maria_wsrep_plugin,
-#endif /* WITH_WSREP */
@mysql_mandatory_plugins@ 0
};
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 6a23534b99c..92189c30bee 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -276,8 +276,8 @@ functions:
- Called before parsing and used to match a statement with the stored
queries hash.
If a match is found the cached result set is sent through repeated
- calls to net_real_write. (note: calling thread doesn't have a regis-
- tered result set writer: thd->net.query_cache_query=0)
+ calls to net_real_write. (note: calling thread does not have a
+ registered result set writer: thd->net.query_cache_query=0)
2. Query_cache::store_query
- Called just before handle_select() and is used to register a result
set writer to the statement currently being processed
@@ -347,6 +347,9 @@ TODO list:
#include "probes_mysql.h"
#include "transaction.h"
#include "strfunc.h"
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif
const uchar *query_state_map;
@@ -477,8 +480,7 @@ static void make_base_query(String *new_query,
/* We do not support UCS2, UTF16, UTF32 as a client character set */
DBUG_ASSERT(current_thd->variables.character_set_client->mbminlen == 1);
- new_query->length(0); // Don't copy anything from old buffer
- if (new_query->realloc(query_length + additional_length))
+ if (new_query->alloc(query_length + additional_length))
{
/*
We could not allocate the query. Use original query for
@@ -4154,13 +4156,13 @@ Query_cache::is_cacheable(THD *thd, LEX *lex,
if (thd->lex->safe_to_cache_query &&
(thd->variables.query_cache_type == 1 ||
- (thd->variables.query_cache_type == 2 && (lex->select_lex.options &
- OPTION_TO_QUERY_CACHE))) &&
+ (thd->variables.query_cache_type == 2 &&
+ (lex->first_select_lex()->options & OPTION_TO_QUERY_CACHE))) &&
qc_is_able_to_intercept_result(thd))
{
DBUG_PRINT("qcache", ("options: %lx %lx type: %u",
(long) OPTION_TO_QUERY_CACHE,
- (long) lex->select_lex.options,
+ (long) lex->first_select_lex()->options,
(int) thd->variables.query_cache_type));
if (!(table_count= process_and_count_tables(thd, tables_used,
@@ -4181,7 +4183,7 @@ Query_cache::is_cacheable(THD *thd, LEX *lex,
("not interesting query: %d or not cacheable, options %lx %lx type: %u net->vio present: %u",
(int) lex->sql_command,
(long) OPTION_TO_QUERY_CACHE,
- (long) lex->select_lex.options,
+ (long) lex->first_select_lex()->options,
(int) thd->variables.query_cache_type,
(uint) MY_TEST(qc_is_able_to_intercept_result(thd))));
DBUG_RETURN(0);
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 733f399a32c..4826597bb95 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -49,9 +49,6 @@
#include <m_ctype.h>
#include <sys/stat.h>
#include <thr_alarm.h>
-#ifdef __WIN__0
-#include <io.h>
-#endif
#include <mysys_err.h>
#include <limits.h>
@@ -66,14 +63,19 @@
#include "sql_callback.h"
#include "lock.h"
#include "wsrep_mysqld.h"
-#include "wsrep_thd.h"
#include "sql_connect.h"
-#include "my_atomic.h"
+#ifdef WITH_WSREP
+#include "wsrep_thd.h"
+#include "wsrep_trans_observer.h"
+#include "wsrep_server_state.h"
+#else
+static inline bool wsrep_is_bf_aborted(THD* thd) { return false; }
+#endif /* WITH_WSREP */
+#include "opt_trace.h"
#ifdef HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#endif
-#include "repl_failsafe.h"
/*
The following is used to initialise Table_ident with a internal
@@ -298,17 +300,6 @@ THD *thd_get_current_thd()
return current_thd;
}
-/**
- Clear errors from the previous THD
-
- @param thd THD object
-*/
-void thd_clear_errors(THD *thd)
-{
- my_errno= 0;
- thd->mysys_var->abort= 0;
-}
-
/**
Get thread attributes for connection threads
@@ -647,17 +638,52 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
tdc_hash_pins(0),
xid_hash_pins(0),
m_tmp_tables_locked(false)
+#ifdef HAVE_REPLICATION
+ ,
+ current_linfo(0),
+ slave_info(0),
+ is_awaiting_semisync_ack(0)
+#endif
#ifdef WITH_WSREP
- ,
+ ,
wsrep_applier(is_wsrep_applier),
wsrep_applier_closing(false),
wsrep_client_thread(false),
- wsrep_apply_toi(false),
+ wsrep_retry_counter(0),
+ wsrep_PA_safe(true),
+ wsrep_retry_query(NULL),
+ wsrep_retry_query_len(0),
+ wsrep_retry_command(COM_CONNECT),
+ wsrep_consistency_check(NO_CONSISTENCY_CHECK),
+ wsrep_mysql_replicated(0),
+ wsrep_TOI_pre_query(NULL),
+ wsrep_TOI_pre_query_len(0),
wsrep_po_handle(WSREP_PO_INITIALIZER),
wsrep_po_cnt(0),
wsrep_apply_format(0),
- wsrep_ignore_table(false)
-#endif
+ wsrep_rbr_buf(NULL),
+ wsrep_sync_wait_gtid(WSREP_GTID_UNDEFINED),
+ wsrep_affected_rows(0),
+ wsrep_has_ignored_error(false),
+ wsrep_replicate_GTID(false),
+ wsrep_ignore_table(false),
+ wsrep_aborter(0),
+ wsrep_delayed_BF_abort(false),
+
+/* wsrep-lib */
+ m_wsrep_next_trx_id(WSREP_UNDEFINED_TRX_ID),
+ m_wsrep_mutex(&LOCK_thd_data),
+ m_wsrep_cond(&COND_wsrep_thd),
+ m_wsrep_client_service(this, m_wsrep_client_state),
+ m_wsrep_client_state(this,
+ m_wsrep_mutex,
+ m_wsrep_cond,
+ Wsrep_server_state::instance(),
+ m_wsrep_client_service,
+ wsrep::client_id(thread_id)),
+ wsrep_applier_service(NULL),
+ wsrep_wfc()
+#endif /*WITH_WSREP */
{
ulong tmp;
bzero(&variables, sizeof(variables));
@@ -676,6 +702,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
main_da.init();
mdl_context.init(this);
+ mdl_backup_lock= 0;
/*
Pass nominal parameters to init_alloc_root only to ensure that
@@ -725,7 +752,6 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
progress.arena= 0;
progress.report_to_client= 0;
progress.max_counter= 0;
- current_linfo = 0;
slave_thread = 0;
connection_name.str= 0;
connection_name.length= 0;
@@ -750,7 +776,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
net.reading_or_writing= 0;
client_capabilities= 0; // minimalistic client
system_thread= NON_SYSTEM_THREAD;
- cleanup_done= free_connection_done= abort_on_warning= 0;
+ cleanup_done= free_connection_done= abort_on_warning= got_warning= 0;
peer_port= 0; // For SHOW PROCESSLIST
transaction.m_pending_rows_event= 0;
transaction.on= 1;
@@ -765,11 +791,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
mysql_mutex_init(key_LOCK_wakeup_ready, &LOCK_wakeup_ready, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_thd_kill, &LOCK_thd_kill, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_wakeup_ready, &COND_wakeup_ready, 0);
- /*
- LOCK_thread_count goes before LOCK_thd_data - the former is called around
- 'delete thd', the latter - in THD::~THD
- */
- mysql_mutex_record_order(&LOCK_thread_count, &LOCK_thd_data);
+ mysql_mutex_record_order(&LOCK_thd_kill, &LOCK_thd_data);
/* Variables with default values */
proc_info="login";
@@ -779,23 +801,8 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
*scramble= '\0';
#ifdef WITH_WSREP
- wsrep_ws_handle.trx_id = WSREP_UNDEFINED_TRX_ID;
- wsrep_ws_handle.opaque = NULL;
- wsrep_retry_counter = 0;
- wsrep_PA_safe = true;
- wsrep_retry_query = NULL;
- wsrep_retry_query_len = 0;
- wsrep_retry_command = COM_CONNECT;
- wsrep_consistency_check = NO_CONSISTENCY_CHECK;
- wsrep_mysql_replicated = 0;
- wsrep_TOI_pre_query = NULL;
- wsrep_TOI_pre_query_len = 0;
+ mysql_cond_init(key_COND_wsrep_thd, &COND_wsrep_thd, NULL);
wsrep_info[sizeof(wsrep_info) - 1] = '\0'; /* make sure it is 0-terminated */
- wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
- wsrep_affected_rows = 0;
- wsrep_replicate_GTID = false;
- wsrep_skip_wsrep_GTID = false;
- wsrep_split_flag = false;
#endif
/* Call to init() below requires fully initialized Open_tables_state. */
reset_open_tables_state(this);
@@ -854,7 +861,6 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
org_charset= 0;
/* Restore THR_THD */
set_current_thd(old_THR_THD);
- inc_thread_count();
}
@@ -1008,6 +1014,15 @@ Sql_condition* THD::raise_condition(uint sql_errno,
if (!(variables.option_bits & OPTION_SQL_NOTES) &&
(level == Sql_condition::WARN_LEVEL_NOTE))
DBUG_RETURN(NULL);
+#ifdef WITH_WSREP
+ /*
+ Suppress warnings/errors if the wsrep THD is going to replay. The
+ deadlock/interrupted errors may be transitient and should not be
+ reported to the client.
+ */
+ if (wsrep_must_replay(this))
+ DBUG_RETURN(NULL);
+#endif /* WITH_WSREP */
da->opt_clear_warning_info(query_id);
@@ -1033,7 +1048,8 @@ Sql_condition* THD::raise_condition(uint sql_errno,
level= Sql_condition::WARN_LEVEL_ERROR;
}
- if (handle_condition(sql_errno, sqlstate, &level, msg, &cond))
+ if (!is_fatal_error &&
+ handle_condition(sql_errno, sqlstate, &level, msg, &cond))
DBUG_RETURN(cond);
switch (level) {
@@ -1054,10 +1070,25 @@ Sql_condition* THD::raise_condition(uint sql_errno,
is_slave_error= 1; // needed to catch query errors during replication
- if (!da->is_error())
+#ifdef WITH_WSREP
+ /*
+ With wsrep we allow converting BF abort error to warning if
+ errors are ignored.
+ */
+ if (!is_fatal_error &&
+ no_errors &&
+ (wsrep_trx().bf_aborted() || wsrep_retry_counter))
{
- set_row_count_func(-1);
- da->set_error_status(sql_errno, msg, sqlstate, ucid, cond);
+ WSREP_DEBUG("BF abort error converted to warning");
+ }
+ else
+#endif /* WITH_WSREP */
+ {
+ if (!da->is_error())
+ {
+ set_row_count_func(-1);
+ da->set_error_status(sql_errno, msg, sqlstate, ucid, cond);
+ }
}
}
@@ -1118,7 +1149,16 @@ void *thd_memdup(MYSQL_THD thd, const void* str, size_t size)
extern "C"
void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid)
{
- *xid = *(MYSQL_XID *) &thd->transaction.xid_state.xid;
+#ifdef WITH_WSREP
+ if (!thd->wsrep_xid.is_null())
+ {
+ *xid = *(MYSQL_XID *) &thd->wsrep_xid;
+ return;
+ }
+#endif /* WITH_WSREP */
+ *xid= thd->transaction.xid_state.is_explicit_XA() ?
+ *(MYSQL_XID *) thd->transaction.xid_state.get_xid() :
+ *(MYSQL_XID *) &thd->transaction.implicit_xid;
}
@@ -1220,13 +1260,12 @@ void THD::init()
first_successful_insert_id_in_prev_stmt= 0;
first_successful_insert_id_in_prev_stmt_for_binlog= 0;
first_successful_insert_id_in_cur_stmt= 0;
+ current_backup_stage= BACKUP_FINISHED;
+ backup_commit_lock= 0;
#ifdef WITH_WSREP
- wsrep_exec_mode= wsrep_applier ? REPL_RECV : LOCAL_STATE;
- wsrep_conflict_state= NO_CONFLICT;
- wsrep_thd_set_query_state(this, QUERY_IDLE);
wsrep_last_query_id= 0;
- wsrep_trx_meta.gtid= WSREP_GTID_UNDEFINED;
- wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED;
+ wsrep_xid.null();
+ wsrep_skip_locking= FALSE;
wsrep_converted_lock_session= false;
wsrep_retry_counter= 0;
wsrep_rgi= NULL;
@@ -1235,11 +1274,12 @@ void THD::init()
wsrep_mysql_replicated = 0;
wsrep_TOI_pre_query = NULL;
wsrep_TOI_pre_query_len = 0;
- wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
+ wsrep_rbr_buf = NULL;
wsrep_affected_rows = 0;
+ m_wsrep_next_trx_id = WSREP_UNDEFINED_TRX_ID;
wsrep_replicate_GTID = false;
- wsrep_skip_wsrep_GTID = false;
- wsrep_split_flag = false;
+ wsrep_aborter = 0;
+ wsrep_desynced_backup_stage= false;
#endif /* WITH_WSREP */
if (variables.sql_log_bin)
@@ -1333,14 +1373,20 @@ void THD::update_all_stats()
void THD::init_for_queries()
{
set_time();
- ha_enable_transaction(this,TRUE);
+ /*
+ We don't need to call ha_enable_transaction() as we can't have
+ any active transactions that has to be committed
+ */
+ DBUG_ASSERT(transaction.is_empty());
+ transaction.on= TRUE;
reset_root_defaults(mem_root, variables.query_alloc_block_size,
variables.query_prealloc_size);
reset_root_defaults(&transaction.mem_root,
variables.trans_alloc_block_size,
variables.trans_prealloc_size);
- transaction.xid_state.xid.null();
+ DBUG_ASSERT(!transaction.xid_state.is_explicit_XA());
+ DBUG_ASSERT(transaction.implicit_xid.is_null());
}
@@ -1364,7 +1410,10 @@ void THD::change_user(void)
cleanup();
cleanup_done= 0;
reset_killed();
- thd_clear_errors(this);
+ /* Clear errors from the previous THD */
+ my_errno= 0;
+ if (mysys_var)
+ mysys_var->abort= 0;
/* Clear warnings. */
if (!get_stmt_da()->is_warning_info_empty())
@@ -1379,6 +1428,7 @@ void THD::change_user(void)
(my_hash_get_key) get_sequence_last_key,
(my_hash_free_key) free_sequence_last, HASH_THREAD_SPECIFIC);
sp_caches_clear();
+ opt_trace.delete_traces();
}
/**
@@ -1410,7 +1460,7 @@ bool THD::set_db(const LEX_CSTRING *new_db)
const char *tmp= NULL;
if (new_db->str)
{
- if (!(tmp= my_strndup(new_db->str, new_db->length, MYF(MY_WME | ME_FATALERROR))))
+ if (!(tmp= my_strndup(new_db->str, new_db->length, MYF(MY_WME | ME_FATAL))))
result= 1;
}
@@ -1459,12 +1509,11 @@ void THD::cleanup(void)
DBUG_ASSERT(cleanup_done == 0);
set_killed(KILL_CONNECTION);
-#ifdef ENABLE_WHEN_BINLOG_WILL_BE_ABLE_TO_PREPARE
- if (transaction.xid_state.xa_state == XA_PREPARED)
- {
-#error xid_state in the cache should be replaced by the allocated value
- }
-#endif
+#ifdef WITH_WSREP
+ if (wsrep_cs().state() != wsrep::client_state::s_none)
+ wsrep_cs().cleanup();
+ wsrep_client_thread= false;
+#endif /* WITH_WSREP */
mysql_ha_cleanup(this);
locked_tables_list.unlock_locked_tables(this);
@@ -1472,10 +1521,10 @@ void THD::cleanup(void)
delete_dynamic(&user_var_events);
close_temporary_tables();
- transaction.xid_state.xa_state= XA_NOTR;
- transaction.xid_state.rm_error= 0;
- trans_rollback(this);
- xid_cache_delete(this, &transaction.xid_state);
+ if (transaction.xid_state.is_explicit_XA())
+ trans_xa_detach(this);
+ else
+ trans_rollback(this);
DBUG_ASSERT(open_tables == NULL);
/*
@@ -1484,7 +1533,10 @@ void THD::cleanup(void)
and left the mode a few lines above), there will be outstanding
metadata locks. Release them.
*/
- mdl_context.release_transactional_locks();
+ mdl_context.release_transactional_locks(this);
+
+ backup_end(this);
+ backup_unlock(this);
/* Release the global read lock, if acquired. */
if (global_read_lock.is_acquired())
@@ -1515,9 +1567,8 @@ void THD::cleanup(void)
apc_target.destroy();
#ifdef HAVE_REPLICATION
- unregister_slave(this, true, true);
+ unregister_slave();
#endif
-
cleanup_done=1;
DBUG_VOID_RETURN;
}
@@ -1538,7 +1589,7 @@ void THD::free_connection()
#ifndef EMBEDDED_LIBRARY
if (net.vio)
vio_delete(net.vio);
- net.vio= 0;
+ net.vio= nullptr;
net_end(&net);
#endif
if (!cleanup_done)
@@ -1577,12 +1628,16 @@ void THD::reset_for_reuse()
abort_on_warning= 0;
free_connection_done= 0;
m_command= COM_CONNECT;
+ transaction.on= 1;
#if defined(ENABLED_PROFILING)
profiling.reset();
#endif
#ifdef SIGNAL_WITH_VIO_CLOSE
active_vio = 0;
#endif
+#ifdef WITH_WSREP
+ wsrep_free_status(this);
+#endif /* WITH_WSREP */
}
@@ -1591,10 +1646,8 @@ THD::~THD()
THD *orig_thd= current_thd;
THD_CHECK_SENTRY(this);
DBUG_ENTER("~THD()");
- /* Check that we have already called thd->unlink() */
- DBUG_ASSERT(prev == 0 && next == 0);
- /* This takes a long time so we should not do this under LOCK_thread_count */
- mysql_mutex_assert_not_owner(&LOCK_thread_count);
+ /* Make sure threads are not available via server_threads. */
+ assert_not_linked();
/*
In error cases, thd may not be current thd. We have to fix this so
@@ -1618,6 +1671,9 @@ THD::~THD()
if (!free_connection_done)
free_connection();
+#ifdef WITH_WSREP
+ mysql_cond_destroy(&COND_wsrep_thd);
+#endif
mdl_context.destroy();
free_root(&transaction.mem_root,MYF(0));
@@ -1669,7 +1725,6 @@ THD::~THD()
}
update_global_memory_status(status_var.global_memory_used);
set_current_thd(orig_thd == this ? 0 : orig_thd);
- dec_thread_count();
DBUG_VOID_RETURN;
}
@@ -1831,14 +1886,21 @@ void THD::awake_no_mutex(killed_state state_to_set)
}
/* Interrupt target waiting inside a storage engine. */
- if (state_to_set != NOT_KILLED)
+ if (state_to_set != NOT_KILLED && !wsrep_is_bf_aborted(this))
ha_kill_query(this, thd_kill_level(this));
- /* Broadcast a condition to kick the target if it is waiting on it. */
+ abort_current_cond_wait(false);
+ DBUG_VOID_RETURN;
+}
+
+/* Broadcast a condition to kick the target if it is waiting on it. */
+void THD::abort_current_cond_wait(bool force)
+{
+ mysql_mutex_assert_owner(&LOCK_thd_kill);
if (mysys_var)
{
mysql_mutex_lock(&mysys_var->mutex);
- if (!system_thread) // Don't abort locks
+ if (!system_thread || force) // Don't abort locks
mysys_var->abort=1;
/*
@@ -1896,7 +1958,6 @@ void THD::awake_no_mutex(killed_state state_to_set)
}
mysql_mutex_unlock(&mysys_var->mutex);
}
- DBUG_VOID_RETURN;
}
@@ -1950,16 +2011,7 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use,
mysql_mutex_lock(&in_use->LOCK_thd_kill);
if (in_use->killed < KILL_CONNECTION)
in_use->set_killed_no_mutex(KILL_CONNECTION);
- if (in_use->mysys_var)
- {
- mysql_mutex_lock(&in_use->mysys_var->mutex);
- if (in_use->mysys_var->current_cond)
- mysql_cond_broadcast(in_use->mysys_var->current_cond);
-
- /* Abort if about to wait in thr_upgrade_write_delay_lock */
- in_use->mysys_var->abort= 1;
- mysql_mutex_unlock(&in_use->mysys_var->mutex);
- }
+ in_use->abort_current_cond_wait(true);
mysql_mutex_unlock(&in_use->LOCK_thd_kill);
signalled= TRUE;
}
@@ -1967,8 +2019,8 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use,
if (needs_thr_lock_abort)
{
bool mutex_released= false;
- mysql_mutex_lock(&in_use->LOCK_thd_data);
mysql_mutex_lock(&in_use->LOCK_thd_kill);
+ mysql_mutex_lock(&in_use->LOCK_thd_data);
/* If not already dying */
if (in_use->killed != KILL_CONNECTION_HARD)
{
@@ -1993,15 +2045,15 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use,
" victim %llu query %s",
this->real_id, wsrep_thd_query(this),
in_use->real_id, wsrep_thd_query(in_use));
- wsrep_abort_thd((void *)this, (void *)in_use, false);
+ wsrep_abort_thd(this, in_use, false);
mutex_released= true;
}
#endif /* WITH_WSREP */
}
if (!mutex_released)
{
- mysql_mutex_unlock(&in_use->LOCK_thd_kill);
mysql_mutex_unlock(&in_use->LOCK_thd_data);
+ mysql_mutex_unlock(&in_use->LOCK_thd_kill);
}
}
DBUG_RETURN(signalled);
@@ -2069,11 +2121,19 @@ void THD::reset_killed()
DBUG_ENTER("reset_killed");
if (killed != NOT_KILLED)
{
+ mysql_mutex_assert_not_owner(&LOCK_thd_kill);
mysql_mutex_lock(&LOCK_thd_kill);
killed= NOT_KILLED;
killed_err= 0;
mysql_mutex_unlock(&LOCK_thd_kill);
}
+#ifdef WITH_WSREP
+ mysql_mutex_assert_not_owner(&LOCK_thd_data);
+ mysql_mutex_lock(&LOCK_thd_data);
+ wsrep_aborter= 0;
+ mysql_mutex_unlock(&LOCK_thd_data);
+#endif /* WITH_WSREP */
+
DBUG_VOID_RETURN;
}
@@ -2230,12 +2290,6 @@ void THD::cleanup_after_query()
/* reset table map for multi-table update */
table_map_for_update= 0;
m_binlog_invoker= INVOKER_NONE;
-#ifdef WITH_WSREP
- if (TOTAL_ORDER == wsrep_exec_mode)
- {
- wsrep_exec_mode = LOCAL_STATE;
- }
-#endif /* WITH_WSREP */
#ifndef EMBEDDED_LIBRARY
if (rgi_slave)
@@ -2243,7 +2297,6 @@ void THD::cleanup_after_query()
#endif
#ifdef WITH_WSREP
- wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
if (!in_active_multi_stmt_transaction())
wsrep_affected_rows= 0;
#endif /* WITH_WSREP */
@@ -2555,6 +2608,16 @@ void THD::update_charset()
&not_used);
}
+void THD::give_protection_error()
+{
+ if (current_backup_stage != BACKUP_FINISHED)
+ my_error(ER_BACKUP_LOCK_IS_ACTIVE, MYF(0));
+ else
+ {
+ DBUG_ASSERT(global_read_lock.is_acquired() || mdl_backup_lock);
+ my_error(ER_CANT_UPDATE_WITH_READLOCK, MYF(0));
+ }
+}
/* routings to adding tables to list of changed in transaction tables */
@@ -2631,7 +2694,7 @@ CHANGED_TABLE_LIST* THD::changed_table_dup(const char *key, size_t key_length)
key_length + 1);
if (!new_table)
{
- my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATALERROR),
+ my_error(EE_OUTOFMEMORY, MYF(ME_FATAL),
ALIGN_SIZE(sizeof(TABLE_LIST)) + key_length + 1);
set_killed(KILL_CONNECTION);
return 0;
@@ -2735,13 +2798,13 @@ void THD::make_explain_field_list(List<Item> &field_list, uint8 explain_flags,
NAME_CHAR_LEN*MAX_REF_PARTS, cs),
mem_root);
item->maybe_null=1;
- field_list.push_back(item= new (mem_root)
- Item_return_int(this, "rows", 10, MYSQL_TYPE_LONGLONG),
+ field_list.push_back(item=new (mem_root)
+ Item_empty_string(this, "rows", NAME_CHAR_LEN, cs),
mem_root);
if (is_analyze)
{
field_list.push_back(item= new (mem_root)
- Item_float(this, "r_rows", 0.1234, 2, 4),
+ Item_empty_string(this, "r_rows", NAME_CHAR_LEN, cs),
mem_root);
item->maybe_null=1;
}
@@ -2812,6 +2875,7 @@ bool THD::sql_parser(LEX *old_lex, LEX *lex,
char *str, uint str_len, bool stmt_prepare_mode)
{
extern int MYSQLparse(THD * thd);
+ extern int ORAparse(THD * thd);
bool parse_status= false;
Parser_state parser_state;
@@ -2832,7 +2896,8 @@ bool THD::sql_parser(LEX *old_lex, LEX *lex,
lex->sp_chistics= old_lex->sp_chistics;
lex->trg_chistics= old_lex->trg_chistics;
- parse_status= MYSQLparse(this) != 0;
+ parse_status= (variables.sql_mode & MODE_ORACLE) ?
+ ORAparse(this) : MYSQLparse(this) != 0;
m_parser_state= old_parser_state;
@@ -3054,7 +3119,8 @@ int select_send::send_data(List<Item> &items)
thd->inc_sent_row_count(1);
- if (thd->vio_ok())
+ /* Don't return error if disconnected, only if write fails */
+ if (likely(thd->vio_ok()))
DBUG_RETURN(protocol->write());
DBUG_RETURN(0);
@@ -3337,9 +3403,9 @@ int select_export::send_data(List<Item> &items)
((uint64) res->length() / res->charset()->mbminlen + 1) *
write_cs->mbmaxlen + 1;
set_if_smaller(estimated_bytes, UINT_MAX32);
- if (cvt_str.realloc((uint32) estimated_bytes))
+ if (cvt_str.alloc((uint32) estimated_bytes))
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), (uint32) estimated_bytes);
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), (uint32) estimated_bytes);
goto err;
}
@@ -3606,7 +3672,7 @@ int select_singlerow_subselect::send_data(List<Item> &items)
if (it->assigned())
{
my_message(ER_SUBQUERY_NO_1_ROW, ER_THD(thd, ER_SUBQUERY_NO_1_ROW),
- MYF(current_thd->lex->ignore ? ME_JUST_WARNING : 0));
+ MYF(current_thd->lex->ignore ? ME_WARNING : 0));
DBUG_RETURN(1);
}
if (unit->offset_limit_cnt)
@@ -3633,6 +3699,41 @@ void select_max_min_finder_subselect::cleanup()
}
+void select_max_min_finder_subselect::set_op(const Type_handler *th)
+{
+ if (th->is_val_native_ready())
+ {
+ op= &select_max_min_finder_subselect::cmp_native;
+ return;
+ }
+
+ switch (th->cmp_type()) {
+ case REAL_RESULT:
+ op= &select_max_min_finder_subselect::cmp_real;
+ break;
+ case INT_RESULT:
+ op= &select_max_min_finder_subselect::cmp_int;
+ break;
+ case STRING_RESULT:
+ op= &select_max_min_finder_subselect::cmp_str;
+ break;
+ case DECIMAL_RESULT:
+ op= &select_max_min_finder_subselect::cmp_decimal;
+ break;
+ case TIME_RESULT:
+ if (th->field_type() == MYSQL_TYPE_TIME)
+ op= &select_max_min_finder_subselect::cmp_time;
+ else
+ op= &select_max_min_finder_subselect::cmp_str;
+ break;
+ case ROW_RESULT:
+ // This case should never be chosen
+ DBUG_ASSERT(0);
+ op= 0;
+ }
+}
+
+
int select_max_min_finder_subselect::send_data(List<Item> &items)
{
DBUG_ENTER("select_max_min_finder_subselect::send_data");
@@ -3651,30 +3752,7 @@ int select_max_min_finder_subselect::send_data(List<Item> &items)
if (!cache)
{
cache= val_item->get_cache(thd);
- switch (val_item->cmp_type()) {
- case REAL_RESULT:
- op= &select_max_min_finder_subselect::cmp_real;
- break;
- case INT_RESULT:
- op= &select_max_min_finder_subselect::cmp_int;
- break;
- case STRING_RESULT:
- op= &select_max_min_finder_subselect::cmp_str;
- break;
- case DECIMAL_RESULT:
- op= &select_max_min_finder_subselect::cmp_decimal;
- break;
- case TIME_RESULT:
- if (val_item->field_type() == MYSQL_TYPE_TIME)
- op= &select_max_min_finder_subselect::cmp_time;
- else
- op= &select_max_min_finder_subselect::cmp_str;
- break;
- case ROW_RESULT:
- // This case should never be choosen
- DBUG_ASSERT(0);
- op= 0;
- }
+ set_op(val_item->type_handler());
}
cache->store(val_item);
it->store(0, cache);
@@ -3718,7 +3796,8 @@ bool select_max_min_finder_subselect::cmp_int()
bool select_max_min_finder_subselect::cmp_time()
{
Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
- longlong val1= cache->val_time_packed(), val2= maxmin->val_time_packed();
+ THD *thd= current_thd;
+ auto val1= cache->val_time_packed(thd), val2= maxmin->val_time_packed(thd);
/* Ignore NULLs for ANY and keep them for ALL subqueries */
if (cache->null_value)
@@ -3734,18 +3813,15 @@ bool select_max_min_finder_subselect::cmp_time()
bool select_max_min_finder_subselect::cmp_decimal()
{
Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
- my_decimal cval, *cvalue= cache->val_decimal(&cval);
- my_decimal mval, *mvalue= maxmin->val_decimal(&mval);
+ VDec cvalue(cache), mvalue(maxmin);
/* Ignore NULLs for ANY and keep them for ALL subqueries */
- if (cache->null_value)
- return (is_all && !maxmin->null_value) || (!is_all && maxmin->null_value);
- if (maxmin->null_value)
+ if (cvalue.is_null())
+ return (is_all && !mvalue.is_null()) || (!is_all && mvalue.is_null());
+ if (mvalue.is_null())
return !is_all;
- if (fmax)
- return (my_decimal_cmp(cvalue, mvalue) > 0) ;
- return (my_decimal_cmp(cvalue,mvalue) < 0);
+ return fmax ? cvalue.cmp(mvalue) > 0 : cvalue.cmp(mvalue) < 0;
}
bool select_max_min_finder_subselect::cmp_str()
@@ -3770,6 +3846,26 @@ bool select_max_min_finder_subselect::cmp_str()
return (sortcmp(val1, val2, cache->collation.collation) < 0);
}
+
+bool select_max_min_finder_subselect::cmp_native()
+{
+ NativeBuffer<STRING_BUFFER_USUAL_SIZE> cvalue, mvalue;
+ Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
+ bool cvalue_is_null= cache->val_native(thd, &cvalue);
+ bool mvalue_is_null= maxmin->val_native(thd, &mvalue);
+
+ /* Ignore NULLs for ANY and keep them for ALL subqueries */
+ if (cvalue_is_null)
+ return (is_all && !mvalue_is_null) || (!is_all && mvalue_is_null);
+ if (mvalue_is_null)
+ return !is_all;
+
+ const Type_handler *th= cache->type_handler();
+ return fmax ? th->cmp_native(cvalue, mvalue) > 0 :
+ th->cmp_native(cvalue, mvalue) < 0;
+}
+
+
int select_exists_subselect::send_data(List<Item> &items)
{
DBUG_ENTER("select_exists_subselect::send_data");
@@ -4378,6 +4474,7 @@ void Security_context::init()
host_or_ip= "connecting host";
priv_user[0]= priv_host[0]= proxy_user[0]= priv_role[0]= '\0';
master_access= 0;
+ password_expired= false;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
db_access= NO_ACCESS;
#endif
@@ -4416,6 +4513,7 @@ void Security_context::skip_grants()
host_or_ip= (char *)"";
master_access= ~NO_ACCESS;
*priv_user= *priv_host= '\0';
+ password_expired= false;
}
@@ -4426,6 +4524,13 @@ bool Security_context::set_user(char *user_arg)
return user == 0;
}
+bool Security_context::check_access(ulong want_access, bool match_any)
+{
+ DBUG_ENTER("Security_context::check_access");
+ DBUG_RETURN((match_any ? (master_access & want_access)
+ : ((master_access & want_access) == want_access)));
+}
+
#ifndef NO_EMBEDDED_ACCESS_CHECKS
/**
Initialize this security context from the passed in credentials
@@ -4527,6 +4632,13 @@ bool Security_context::user_matches(Security_context *them)
!strcmp(user, them->user));
}
+bool Security_context::is_priv_user(const char *user, const char *host)
+{
+ return ((user != NULL) && (host != NULL) &&
+ !strcmp(user, priv_user) &&
+ !my_strcasecmp(system_charset_info, host,priv_host));
+}
+
/****************************************************************************
Handling of open and locked tables states.
@@ -4853,14 +4965,14 @@ MYSQL_THD create_thd()
thd->set_command(COM_DAEMON);
thd->system_thread= SYSTEM_THREAD_GENERIC;
thd->security_ctx->host_or_ip="";
- add_to_active_threads(thd);
+ server_threads.insert(thd);
return thd;
}
void destroy_thd(MYSQL_THD thd)
{
thd->add_status_to_global();
- unlink_not_visible_thd(thd);
+ server_threads.erase(thd);
delete thd;
}
@@ -5108,9 +5220,10 @@ thd_need_ordering_with(const MYSQL_THD thd, const MYSQL_THD other_thd)
#ifdef WITH_WSREP
/* wsrep applier, replayer and TOI processing threads are ordered
by replication provider, relaxed GAP locking protocol can be used
- between high priority wsrep threads. Note that this function
- is called while holding lock_sys mutex, therefore we can't
- use THD::LOCK_thd_data mutex below to follow mutex ordering rules.
+ between high priority wsrep threads.
+ Note that wsrep_thd_is_BF() doesn't take LOCK_thd_data for either thd,
+ the caller should guarantee that the BF state won't change.
+ (e.g. InnoDB does it by keeping lock_sys.mutex locked)
*/
if (WSREP_ON &&
wsrep_thd_is_BF(const_cast<THD *>(thd), false) &&
@@ -5149,8 +5262,9 @@ extern "C" int thd_binlog_format(const MYSQL_THD thd)
if (WSREP(thd))
{
/* for wsrep binlog format is meaningful also when binlogging is off */
- return (int) thd->wsrep_binlog_format();
+ return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format);
}
+
if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG))
return (int) thd->variables.binlog_format;
return BINLOG_FORMAT_UNSPEC;
@@ -5227,8 +5341,8 @@ extern "C" bool thd_is_strict_mode(const MYSQL_THD thd)
*/
void thd_get_query_start_data(THD *thd, char *buf)
{
- Field_timestampf f((uchar *)buf, NULL, 0, Field::NONE, &empty_clex_str,
- NULL, 6);
+ Field_timestampf f((uchar *)buf, nullptr, 0, Field::NONE, &empty_clex_str,
+ nullptr, 6);
f.store_TIME(thd->query_start(), thd->query_start_sec_part());
}
@@ -5633,6 +5747,10 @@ void THD::set_query_and_id(char *query_arg, uint32 query_length_arg,
set_query_inner(query_arg, query_length_arg, cs);
mysql_mutex_unlock(&LOCK_thd_data);
query_id= new_query_id;
+#ifdef WITH_WSREP
+ set_wsrep_next_trx_id(query_id);
+ WSREP_DEBUG("assigned new next query and trx id: %" PRIu64, wsrep_next_trx_id());
+#endif /* WITH_WSREP */
}
/** Assign a new value to thd->mysys_var. */
@@ -5652,6 +5770,7 @@ void THD::leave_locked_tables_mode()
{
if (locked_tables_mode == LTM_LOCK_TABLES)
{
+ DBUG_ASSERT(current_backup_stage == BACKUP_FINISHED);
/*
When leaving LOCK TABLES mode we have to change the duration of most
of the metadata locks being held, except for HANDLER and GRL locks,
@@ -5684,7 +5803,7 @@ void THD::get_definer(LEX_USER *definer, bool role)
{
definer->user= invoker.user;
definer->host= invoker.host;
- definer->reset_auth();
+ definer->auth= NULL;
}
else
#endif
@@ -5708,263 +5827,6 @@ void THD::mark_transaction_to_rollback(bool all)
is_fatal_sub_stmt_error= true;
transaction_rollback_request= all;
}
-/***************************************************************************
- Handling of XA id cacheing
-***************************************************************************/
-class XID_cache_element
-{
- /*
- m_state is used to prevent elements from being deleted while XA RECOVER
- iterates xid cache and to prevent recovered elments from being acquired by
- multiple threads.
-
- bits 1..29 are reference counter
- bit 30 is RECOVERED flag
- bit 31 is ACQUIRED flag (thread owns this xid)
- bit 32 is unused
-
- Newly allocated and deleted elements have m_state set to 0.
-
- On lock() m_state is atomically incremented. It also creates load-ACQUIRE
- memory barrier to make sure m_state is actually updated before furhter
- memory accesses. Attempting to lock an element that has neither ACQUIRED
- nor RECOVERED flag set returns failure and further accesses to element
- memory are forbidden.
-
- On unlock() m_state is decremented. It also creates store-RELEASE memory
- barrier to make sure m_state is actually updated after preceding memory
- accesses.
-
- ACQUIRED flag is set when thread registers it's xid or when thread acquires
- recovered xid.
-
- RECOVERED flag is set for elements found during crash recovery.
-
- ACQUIRED and RECOVERED flags are cleared before element is deleted from
- hash in a spin loop, after last reference is released.
- */
- int32 m_state;
-public:
- static const int32 ACQUIRED= 1 << 30;
- static const int32 RECOVERED= 1 << 29;
- XID_STATE *m_xid_state;
- bool is_set(int32 flag)
- { return my_atomic_load32_explicit(&m_state, MY_MEMORY_ORDER_RELAXED) & flag; }
- void set(int32 flag)
- {
- DBUG_ASSERT(!is_set(ACQUIRED | RECOVERED));
- my_atomic_add32_explicit(&m_state, flag, MY_MEMORY_ORDER_RELAXED);
- }
- bool lock()
- {
- int32 old= my_atomic_add32_explicit(&m_state, 1, MY_MEMORY_ORDER_ACQUIRE);
- if (old & (ACQUIRED | RECOVERED))
- return true;
- unlock();
- return false;
- }
- void unlock()
- { my_atomic_add32_explicit(&m_state, -1, MY_MEMORY_ORDER_RELEASE); }
- void mark_uninitialized()
- {
- int32 old= ACQUIRED;
- while (!my_atomic_cas32_weak_explicit(&m_state, &old, 0,
- MY_MEMORY_ORDER_RELAXED,
- MY_MEMORY_ORDER_RELAXED))
- {
- old&= ACQUIRED | RECOVERED;
- (void) LF_BACKOFF();
- }
- }
- bool acquire_recovered()
- {
- int32 old= RECOVERED;
- while (!my_atomic_cas32_weak_explicit(&m_state, &old, ACQUIRED | RECOVERED,
- MY_MEMORY_ORDER_RELAXED,
- MY_MEMORY_ORDER_RELAXED))
- {
- if (!(old & RECOVERED) || (old & ACQUIRED))
- return false;
- old= RECOVERED;
- (void) LF_BACKOFF();
- }
- return true;
- }
- static void lf_hash_initializer(LF_HASH *hash __attribute__((unused)),
- XID_cache_element *element,
- XID_STATE *xid_state)
- {
- DBUG_ASSERT(!element->is_set(ACQUIRED | RECOVERED));
- element->m_xid_state= xid_state;
- xid_state->xid_cache_element= element;
- }
- static void lf_alloc_constructor(uchar *ptr)
- {
- XID_cache_element *element= (XID_cache_element*) (ptr + LF_HASH_OVERHEAD);
- element->m_state= 0;
- }
- static void lf_alloc_destructor(uchar *ptr)
- {
- XID_cache_element *element= (XID_cache_element*) (ptr + LF_HASH_OVERHEAD);
- DBUG_ASSERT(!element->is_set(ACQUIRED));
- if (element->is_set(RECOVERED))
- my_free(element->m_xid_state);
- }
- static uchar *key(const XID_cache_element *element, size_t *length,
- my_bool not_used __attribute__((unused)))
- {
- *length= element->m_xid_state->xid.key_length();
- return element->m_xid_state->xid.key();
- }
-};
-
-
-static LF_HASH xid_cache;
-static bool xid_cache_inited;
-
-
-bool THD::fix_xid_hash_pins()
-{
- if (!xid_hash_pins)
- xid_hash_pins= lf_hash_get_pins(&xid_cache);
- return !xid_hash_pins;
-}
-
-
-void xid_cache_init()
-{
- xid_cache_inited= true;
- lf_hash_init(&xid_cache, sizeof(XID_cache_element), LF_HASH_UNIQUE, 0, 0,
- (my_hash_get_key) XID_cache_element::key, &my_charset_bin);
- xid_cache.alloc.constructor= XID_cache_element::lf_alloc_constructor;
- xid_cache.alloc.destructor= XID_cache_element::lf_alloc_destructor;
- xid_cache.initializer=
- (lf_hash_initializer) XID_cache_element::lf_hash_initializer;
-}
-
-
-void xid_cache_free()
-{
- if (xid_cache_inited)
- {
- lf_hash_destroy(&xid_cache);
- xid_cache_inited= false;
- }
-}
-
-
-/**
- Find recovered XA transaction by XID.
-*/
-
-XID_STATE *xid_cache_search(THD *thd, XID *xid)
-{
- XID_STATE *xs= 0;
- DBUG_ASSERT(thd->xid_hash_pins);
- XID_cache_element *element=
- (XID_cache_element*) lf_hash_search(&xid_cache, thd->xid_hash_pins,
- xid->key(), xid->key_length());
- if (element)
- {
- if (element->acquire_recovered())
- xs= element->m_xid_state;
- lf_hash_search_unpin(thd->xid_hash_pins);
- DEBUG_SYNC(thd, "xa_after_search");
- }
- return xs;
-}
-
-
-bool xid_cache_insert(XID *xid, enum xa_states xa_state)
-{
- XID_STATE *xs;
- LF_PINS *pins;
- int res= 1;
-
- if (!(pins= lf_hash_get_pins(&xid_cache)))
- return true;
-
- if ((xs= (XID_STATE*) my_malloc(sizeof(*xs), MYF(MY_WME))))
- {
- xs->xa_state=xa_state;
- xs->xid.set(xid);
- xs->rm_error=0;
-
- if ((res= lf_hash_insert(&xid_cache, pins, xs)))
- my_free(xs);
- else
- xs->xid_cache_element->set(XID_cache_element::RECOVERED);
- if (res == 1)
- res= 0;
- }
- lf_hash_put_pins(pins);
- return res;
-}
-
-
-bool xid_cache_insert(THD *thd, XID_STATE *xid_state)
-{
- if (thd->fix_xid_hash_pins())
- return true;
-
- int res= lf_hash_insert(&xid_cache, thd->xid_hash_pins, xid_state);
- switch (res)
- {
- case 0:
- xid_state->xid_cache_element->set(XID_cache_element::ACQUIRED);
- break;
- case 1:
- my_error(ER_XAER_DUPID, MYF(0));
- /* fall through */
- default:
- xid_state->xid_cache_element= 0;
- }
- return res;
-}
-
-
-void xid_cache_delete(THD *thd, XID_STATE *xid_state)
-{
- if (xid_state->xid_cache_element)
- {
- bool recovered= xid_state->xid_cache_element->is_set(XID_cache_element::RECOVERED);
- DBUG_ASSERT(thd->xid_hash_pins);
- xid_state->xid_cache_element->mark_uninitialized();
- lf_hash_delete(&xid_cache, thd->xid_hash_pins,
- xid_state->xid.key(), xid_state->xid.key_length());
- xid_state->xid_cache_element= 0;
- if (recovered)
- my_free(xid_state);
- }
-}
-
-
-struct xid_cache_iterate_arg
-{
- my_hash_walk_action action;
- void *argument;
-};
-
-static my_bool xid_cache_iterate_callback(XID_cache_element *element,
- xid_cache_iterate_arg *arg)
-{
- my_bool res= FALSE;
- if (element->lock())
- {
- res= arg->action(element->m_xid_state, arg->argument);
- element->unlock();
- }
- return res;
-}
-
-int xid_cache_iterate(THD *thd, my_hash_walk_action action, void *arg)
-{
- xid_cache_iterate_arg argument= { action, arg };
- return thd->fix_xid_hash_pins() ? -1 :
- lf_hash_iterate(&xid_cache, thd->xid_hash_pins,
- (my_hash_walk_action) xid_cache_iterate_callback,
- &argument);
-}
/**
@@ -6078,9 +5940,30 @@ int THD::decide_logging_format(TABLE_LIST *tables)
binlogging is off, or if the statement is filtered out from the
binlog by filtering rules.
*/
+#ifdef WITH_WSREP
+ if (WSREP_CLIENT_NNULL(this) &&
+ wsrep_thd_is_local(this) &&
+ wsrep_is_active(this) &&
+ variables.wsrep_trx_fragment_size > 0)
+ {
+ if (!is_current_stmt_binlog_format_row())
+ {
+ my_message(ER_NOT_SUPPORTED_YET,
+ "Streaming replication not supported with "
+ "binlog_format=STATEMENT", MYF(0));
+ DBUG_RETURN(-1);
+ }
+ }
+
+ if ((WSREP_EMULATE_BINLOG_NNULL(this) ||
+ (mysql_bin_log.is_open() && (variables.option_bits & OPTION_BIN_LOG))) &&
+ !(wsrep_binlog_format() == BINLOG_FORMAT_STMT &&
+ !binlog_filter->db_ok(db.str)))
+#else
if (mysql_bin_log.is_open() && (variables.option_bits & OPTION_BIN_LOG) &&
!(wsrep_binlog_format() == BINLOG_FORMAT_STMT &&
!binlog_filter->db_ok(db.str)))
+#endif /* WITH_WSREP */
{
if (is_bulk_op())
@@ -6435,8 +6318,9 @@ int THD::decide_logging_format(TABLE_LIST *tables)
/* As all updated tables are temporary, nothing will be logged */
set_current_stmt_binlog_format_row();
}
- else if (IF_WSREP((!WSREP(this) ||
- wsrep_exec_mode == LOCAL_STATE),1))
+ else if (IF_WSREP((!WSREP_NNULL(this) ||
+ wsrep_cs().mode() ==
+ wsrep::client_state::m_local),1))
{
my_error((error= ER_BINLOG_STMT_MODE_AND_ROW_ENGINE), MYF(0), "");
}
@@ -6864,8 +6748,9 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
uchar const *record)
{
- DBUG_ASSERT(is_current_stmt_binlog_format_row() &&
- ((WSREP(this) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()));
+ DBUG_ASSERT(is_current_stmt_binlog_format_row());
+ DBUG_ASSERT((WSREP_NNULL(this) && wsrep_emulate_bin_log) ||
+ mysql_bin_log.is_open());
/*
Pack records into format for transfer. We are allocating more
memory than needed, but that doesn't matter.
@@ -6905,8 +6790,9 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
const uchar *before_record,
const uchar *after_record)
{
- DBUG_ASSERT(is_current_stmt_binlog_format_row() &&
- ((WSREP(this) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()));
+ DBUG_ASSERT(is_current_stmt_binlog_format_row());
+ DBUG_ASSERT((WSREP_NNULL(this) && wsrep_emulate_bin_log) ||
+ mysql_bin_log.is_open());
/**
Save a reference to the original read bitmaps
@@ -6984,8 +6870,9 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
int THD::binlog_delete_row(TABLE* table, bool is_trans,
uchar const *record)
{
- DBUG_ASSERT(is_current_stmt_binlog_format_row() &&
- ((WSREP(this) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()));
+ DBUG_ASSERT(is_current_stmt_binlog_format_row());
+ DBUG_ASSERT((WSREP_NNULL(this) && wsrep_emulate_bin_log) ||
+ mysql_bin_log.is_open());
/**
Save a reference to the original read bitmaps
We will need this to restore the bitmaps at the end as
@@ -7116,7 +7003,7 @@ int THD::binlog_remove_pending_rows_event(bool clear_maps,
{
DBUG_ENTER("THD::binlog_remove_pending_rows_event");
- if(!WSREP_EMULATE_BINLOG(this) && !mysql_bin_log.is_open())
+ if(!WSREP_EMULATE_BINLOG_NNULL(this) && !mysql_bin_log.is_open())
DBUG_RETURN(0);
/* Ensure that all events in a GTID group are in the same cache */
@@ -7139,7 +7026,7 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end, bool is_transactional)
mode: it might be the case that we left row-based mode before
flushing anything (e.g., if we have explicitly locked tables).
*/
- if(!WSREP_EMULATE_BINLOG(this) && !mysql_bin_log.is_open())
+ if (!WSREP_EMULATE_BINLOG_NNULL(this) && !mysql_bin_log.is_open())
DBUG_RETURN(0);
/* Ensure that all events in a GTID group are in the same cache */
@@ -7413,7 +7300,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
show_query_type(qtype), (int) query_len, query_arg));
DBUG_ASSERT(query_arg);
- DBUG_ASSERT(WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open());
+ DBUG_ASSERT(WSREP_EMULATE_BINLOG_NNULL(this) || mysql_bin_log.is_open());
/* If this is withing a BEGIN ... COMMIT group, don't log it */
if (variables.option_bits & OPTION_GTID_BEGIN)
@@ -7581,7 +7468,7 @@ wait_for_commit::reinit()
{
subsequent_commits_list= NULL;
next_subsequent_commit= NULL;
- waitee= NULL;
+ waitee.store(NULL, std::memory_order_relaxed);
opaque_pointer= NULL;
wakeup_error= 0;
wakeup_subsequent_commits_running= false;
@@ -7642,7 +7529,6 @@ wait_for_commit::~wait_for_commit()
mysql_cond_destroy(&COND_wait_commit);
}
-
void
wait_for_commit::wakeup(int wakeup_error)
{
@@ -7659,8 +7545,9 @@ wait_for_commit::wakeup(int wakeup_error)
*/
mysql_mutex_lock(&LOCK_wait_commit);
- waitee= NULL;
this->wakeup_error= wakeup_error;
+ /* Memory barrier to make wakeup_error visible to the waiter thread. */
+ waitee.store(NULL, std::memory_order_release);
/*
Note that it is critical that the mysql_cond_signal() here is done while
still holding the mutex. As soon as we release the mutex, the waiter might
@@ -7691,9 +7578,10 @@ wait_for_commit::wakeup(int wakeup_error)
void
wait_for_commit::register_wait_for_prior_commit(wait_for_commit *waitee)
{
- DBUG_ASSERT(!this->waitee /* No prior registration allowed */);
+ DBUG_ASSERT(!this->waitee.load(std::memory_order_relaxed)
+ /* No prior registration allowed */);
wakeup_error= 0;
- this->waitee= waitee;
+ this->waitee.store(waitee, std::memory_order_relaxed);
mysql_mutex_lock(&waitee->LOCK_wait_commit);
/*
@@ -7702,7 +7590,7 @@ wait_for_commit::register_wait_for_prior_commit(wait_for_commit *waitee)
see comments on wakeup_subsequent_commits2() for details.
*/
if (waitee->wakeup_subsequent_commits_running)
- this->waitee= NULL;
+ this->waitee.store(NULL, std::memory_order_relaxed);
else
{
/*
@@ -7716,23 +7604,41 @@ wait_for_commit::register_wait_for_prior_commit(wait_for_commit *waitee)
}
-/*
- Wait for commit of another transaction to complete, as already registered
+/**
+ Waits for commit of another transaction to complete, as already registered
with register_wait_for_prior_commit(). If the commit already completed,
returns immediately.
+
+ If thd->backup_commit_lock is set, release it while waiting for other threads
*/
+
int
wait_for_commit::wait_for_prior_commit2(THD *thd)
{
PSI_stage_info old_stage;
wait_for_commit *loc_waitee;
+ bool backup_lock_released= 0;
+
+ /*
+ Release MDL_BACKUP_COMMIT LOCK while waiting for other threads to commit
+ This is needed to avoid deadlock between the other threads (which not
+ yet have the MDL_BACKUP_COMMIT_LOCK) and any threads using
+ BACKUP LOCK BLOCK_COMMIT.
+ */
+ if (thd->backup_commit_lock && thd->backup_commit_lock->ticket)
+ {
+ backup_lock_released= 1;
+ thd->mdl_context.release_lock(thd->backup_commit_lock->ticket);
+ thd->backup_commit_lock->ticket= 0;
+ }
mysql_mutex_lock(&LOCK_wait_commit);
DEBUG_SYNC(thd, "wait_for_prior_commit_waiting");
thd->ENTER_COND(&COND_wait_commit, &LOCK_wait_commit,
&stage_waiting_for_prior_transaction_to_commit,
&old_stage);
- while ((loc_waitee= this->waitee) && likely(!thd->check_killed(1)))
+ while ((loc_waitee= this->waitee.load(std::memory_order_relaxed)) &&
+ likely(!thd->check_killed(1)))
mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit);
if (!loc_waitee)
{
@@ -7755,14 +7661,14 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
do
{
mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit);
- } while (this->waitee);
+ } while (this->waitee.load(std::memory_order_relaxed));
if (wakeup_error)
my_error(ER_PRIOR_COMMIT_FAILED, MYF(0));
goto end;
}
remove_from_list(&loc_waitee->subsequent_commits_list);
mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit);
- this->waitee= NULL;
+ this->waitee.store(NULL, std::memory_order_relaxed);
wakeup_error= thd->killed_errno();
if (!wakeup_error)
@@ -7774,10 +7680,16 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
use within enter_cond/exit_cond.
*/
DEBUG_SYNC(thd, "wait_for_prior_commit_killed");
+ if (backup_lock_released)
+ thd->mdl_context.acquire_lock(thd->backup_commit_lock,
+ thd->variables.lock_wait_timeout);
return wakeup_error;
end:
thd->EXIT_COND(&old_stage);
+ if (backup_lock_released)
+ thd->mdl_context.acquire_lock(thd->backup_commit_lock,
+ thd->variables.lock_wait_timeout);
return wakeup_error;
}
@@ -7864,7 +7776,7 @@ wait_for_commit::unregister_wait_for_prior_commit2()
wait_for_commit *loc_waitee;
mysql_mutex_lock(&LOCK_wait_commit);
- if ((loc_waitee= this->waitee))
+ if ((loc_waitee= this->waitee.load(std::memory_order_relaxed)))
{
mysql_mutex_lock(&loc_waitee->LOCK_wait_commit);
if (loc_waitee->wakeup_subsequent_commits_running)
@@ -7877,7 +7789,7 @@ wait_for_commit::unregister_wait_for_prior_commit2()
See comments on wakeup_subsequent_commits2() for more details.
*/
mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit);
- while (this->waitee)
+ while (this->waitee.load(std::memory_order_relaxed))
mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit);
}
else
@@ -7885,7 +7797,7 @@ wait_for_commit::unregister_wait_for_prior_commit2()
/* Remove ourselves from the list in the waitee. */
remove_from_list(&loc_waitee->subsequent_commits_list);
mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit);
- this->waitee= NULL;
+ this->waitee.store(NULL, std::memory_order_relaxed);
}
}
wakeup_error= 0;
@@ -8008,7 +7920,7 @@ Query_arena_stmt::~Query_arena_stmt()
bool THD::timestamp_to_TIME(MYSQL_TIME *ltime, my_time_t ts,
- ulong sec_part, ulonglong fuzzydate)
+ ulong sec_part, date_mode_t fuzzydate)
{
time_zone_used= 1;
if (ts == 0 && sec_part == 0)
diff --git a/sql/sql_class.h b/sql/sql_class.h
index d3e2b72b12d..64f9ba276b3 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -20,6 +20,7 @@
/* Classes in mysql */
+#include <atomic>
#include "dur_prop.h"
#include <waiting_threads.h>
#include "sql_const.h"
@@ -28,6 +29,7 @@
#include "rpl_tblmap.h"
#include "mdl.h"
#include "field.h" // Create_field
+#include "opt_trace_context.h"
#include "probes_mysql.h"
#include "sql_locale.h" /* my_locale_st */
#include "sql_profile.h" /* PROFILING */
@@ -39,15 +41,15 @@
#include "thr_malloc.h"
#include "log_slow.h" /* LOG_SLOW_DISABLE_... */
#include <my_tree.h>
-
#include "sql_digest_stream.h" // sql_digest_state
-
#include <mysql/psi/mysql_stage.h>
#include <mysql/psi/mysql_statement.h>
#include <mysql/psi/mysql_idle.h>
#include <mysql/psi/mysql_table.h>
#include <mysql_com_server.h>
#include "session_tracker.h"
+#include "backup.h"
+#include "xa.h"
extern "C"
void set_thd_stage_info(void *thd,
@@ -62,8 +64,25 @@ void set_thd_stage_info(void *thd,
#include "my_apc.h"
#include "rpl_gtid.h"
-#include "wsrep_mysqld.h"
+#include "wsrep.h"
+#include "wsrep_on.h"
+#ifdef WITH_WSREP
+#include <inttypes.h>
+/* wsrep-lib */
+#include "wsrep_client_service.h"
+#include "wsrep_client_state.h"
+#include "wsrep_mutex.h"
+#include "wsrep_condition_variable.h"
+
+class Wsrep_applier_service;
+
+enum wsrep_consistency_check_mode {
+ NO_CONSISTENCY_CHECK,
+ CONSISTENCY_CHECK_DECLARED,
+ CONSISTENCY_CHECK_RUNNING,
+};
+#endif /* WITH_WSREP */
class Reprepare_observer;
class Relay_log_info;
struct rpl_group_info;
@@ -80,6 +99,9 @@ class user_var_entry;
struct Trans_binlog_info;
class rpl_io_thread_info;
class rpl_sql_thread_info;
+#ifdef HAVE_REPLICATION
+struct Slave_info;
+#endif
enum enum_ha_read_modes { RFIRST, RNEXT, RPREV, RLAST, RKEY, RNEXT_SAME };
enum enum_duplicates { DUP_ERROR, DUP_REPLACE, DUP_UPDATE };
@@ -157,8 +179,15 @@ enum enum_binlog_row_image {
#define MODE_HIGH_NOT_PRECEDENCE (1ULL << 29)
#define MODE_NO_ENGINE_SUBSTITUTION (1ULL << 30)
#define MODE_PAD_CHAR_TO_FULL_LENGTH (1ULL << 31)
+/* SQL mode bits defined above are common for MariaDB and MySQL */
+#define MODE_MASK_MYSQL_COMPATIBLE 0xFFFFFFFFULL
+/* The following modes are specific to MariaDB */
#define MODE_EMPTY_STRING_IS_NULL (1ULL << 32)
#define MODE_SIMULTANEOUS_ASSIGNMENT (1ULL << 33)
+#define MODE_TIME_ROUND_FRACTIONAL (1ULL << 34)
+/* The following modes are specific to MySQL */
+#define MODE_MYSQL80_TIME_TRUNCATE_FRACTIONAL (1ULL << 32)
+
/* Bits for different old style modes */
#define OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE (1 << 0)
@@ -169,8 +198,6 @@ extern char internal_table_name[2];
extern char empty_c_string[1];
extern MYSQL_PLUGIN_IMPORT const char **errmesg;
-extern bool volatile shutdown_in_progress;
-
extern "C" LEX_STRING * thd_query_string (MYSQL_THD thd);
extern "C" size_t thd_query_safe(MYSQL_THD thd, char *buf, size_t buflen);
@@ -275,7 +302,7 @@ public:
class Alter_drop :public Sql_alloc {
public:
- enum drop_type {KEY, COLUMN, FOREIGN_KEY, CHECK_CONSTRAINT };
+ enum drop_type { KEY, COLUMN, FOREIGN_KEY, CHECK_CONSTRAINT, PERIOD };
const char *name;
enum drop_type type;
bool drop_if_exists;
@@ -294,6 +321,7 @@ public:
{
return type == COLUMN ? "COLUMN" :
type == CHECK_CONSTRAINT ? "CONSTRAINT" :
+ type == PERIOD ? "PERIOD" :
type == KEY ? "INDEX" : "FOREIGN KEY";
}
};
@@ -557,6 +585,8 @@ typedef struct system_variables
ulonglong long_query_time;
ulonglong max_statement_time;
ulonglong optimizer_switch;
+ ulonglong optimizer_trace;
+ ulong optimizer_trace_max_mem_size;
sql_mode_t sql_mode; ///< which non-standard SQL behaviour should be enabled
sql_mode_t old_behavior; ///< which old SQL behaviour should be enabled
ulonglong option_bits; ///< OPTION_xxx constants, e.g. OPTION_PROFILING
@@ -591,6 +621,7 @@ typedef struct system_variables
are based on the cluster size):
*/
ulong saved_auto_increment_increment, saved_auto_increment_offset;
+ ulong saved_lock_wait_timeout;
#endif /* WITH_WSREP */
uint eq_range_index_dive_limit;
ulong column_compression_zlib_strategy;
@@ -616,6 +647,7 @@ typedef struct system_variables
ulong optimizer_selectivity_sampling_limit;
ulong optimizer_use_condition_selectivity;
ulong use_stat_tables;
+ double sample_percentage;
ulong histogram_size;
ulong histogram_type;
ulong preload_buff_size;
@@ -719,10 +751,12 @@ typedef struct system_variables
my_bool wsrep_on;
my_bool wsrep_causal_reads;
+ uint wsrep_sync_wait;
+ ulong wsrep_retry_autocommit;
+ ulonglong wsrep_trx_fragment_size;
+ ulong wsrep_trx_fragment_unit;
+ ulong wsrep_OSU_method;
my_bool wsrep_dirty_reads;
- uint wsrep_sync_wait;
- ulong wsrep_retry_autocommit;
- ulong wsrep_OSU_method;
double long_query_time_double, max_statement_time_double;
my_bool pseudo_slave_mode;
@@ -731,6 +765,7 @@ typedef struct system_variables
ulong session_track_transaction_info;
my_bool session_track_schema;
my_bool session_track_state_change;
+ my_bool tcp_nodelay;
ulong threadpool_priority;
@@ -740,6 +775,7 @@ typedef struct system_variables
uint column_compression_threshold;
uint column_compression_zlib_level;
uint in_subquery_conversion_threshold;
+ ulonglong max_rowid_filter_size;
vers_asof_timestamp_t vers_asof_timestamp;
ulong vers_alter_history;
@@ -838,6 +874,8 @@ typedef struct system_status_var
ulong feature_locale; /* +1 when LOCALE is set */
ulong feature_subquery; /* +1 when subqueries are used */
ulong feature_system_versioning; /* +1 opening a table WITH SYSTEM VERSIONING */
+ ulong feature_application_time_periods;
+ /* +1 opening a table with application-time period */
ulong feature_timezone; /* +1 when XPATH is used */
ulong feature_trigger; /* +1 opening a table with triggers */
ulong feature_xml; /* +1 when XPATH is used */
@@ -961,6 +999,23 @@ static inline bool is_supported_parser_charset(CHARSET_INFO *cs)
return MY_TEST(cs->mbminlen == 1 && cs->number != 17 /* filename */);
}
+/**
+ A counter of THDs
+
+ It must be specified as a first base class of THD, so that increment is
+ done before any other THD constructors and decrement - after any other THD
+ destructors.
+
+ Destructor unblocks close_conneciton() if there are no more THD's left.
+*/
+struct THD_count
+{
+ static Atomic_counter<uint32_t> count;
+ static uint value() { return static_cast<uint>(count); }
+ THD_count() { count++; }
+ ~THD_count() { count--; }
+};
+
#ifdef MYSQL_SERVER
void free_tmp_table(THD *thd, TABLE *entry);
@@ -1217,7 +1272,7 @@ public:
int insert(THD *thd, Statement *statement);
- Statement *find_by_name(LEX_CSTRING *name)
+ Statement *find_by_name(const LEX_CSTRING *name)
{
Statement *stmt;
stmt= (Statement*)my_hash_search(&names_hash, (uchar*)name->str,
@@ -1263,50 +1318,6 @@ struct st_savepoint {
MDL_savepoint mdl_savepoint;
};
-enum xa_states {XA_NOTR=0, XA_ACTIVE, XA_IDLE, XA_PREPARED, XA_ROLLBACK_ONLY};
-extern const char *xa_state_names[];
-class XID_cache_element;
-
-typedef struct st_xid_state {
- /* For now, this is only used to catch duplicated external xids */
- XID xid; // transaction identifier
- enum xa_states xa_state; // used by external XA only
- /* Error reported by the Resource Manager (RM) to the Transaction Manager. */
- uint rm_error;
- XID_cache_element *xid_cache_element;
-
- /**
- Check that XA transaction has an uncommitted work. Report an error
- to the user in case when there is an uncommitted work for XA transaction.
-
- @return result of check
- @retval false XA transaction is NOT in state IDLE, PREPARED
- or ROLLBACK_ONLY.
- @retval true XA transaction is in state IDLE or PREPARED
- or ROLLBACK_ONLY.
- */
-
- bool check_has_uncommitted_xa() const
- {
- if (xa_state == XA_IDLE ||
- xa_state == XA_PREPARED ||
- xa_state == XA_ROLLBACK_ONLY)
- {
- my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
- return true;
- }
- return false;
- }
-} XID_STATE;
-
-void xid_cache_init(void);
-void xid_cache_free(void);
-XID_STATE *xid_cache_search(THD *thd, XID *xid);
-bool xid_cache_insert(XID *xid, enum xa_states xa_state);
-bool xid_cache_insert(THD *thd, XID_STATE *xid_state);
-void xid_cache_delete(THD *thd, XID_STATE *xid_state);
-int xid_cache_iterate(THD *thd, my_hash_walk_action action, void *argument);
-
/**
@class Security_context
@brief A set of THD members describing the current authenticated user.
@@ -1337,6 +1348,8 @@ public:
ulong master_access; /* Global privileges from mysql.user */
ulong db_access; /* Privileges for current db */
+ bool password_expired;
+
void init();
void destroy();
void skip_grants();
@@ -1359,6 +1372,15 @@ public:
restore_security_context(THD *thd, Security_context *backup);
#endif
bool user_matches(Security_context *);
+ /**
+ Check global access
+ @param want_access The required privileges
+ @param match_any if the security context must match all or any of the req.
+ * privileges.
+ @return True if the security context fulfills the access requirements.
+ */
+ bool check_access(ulong want_access, bool match_any = false);
+ bool is_priv_user(const char *user, const char *host);
};
@@ -1979,42 +2001,22 @@ public:
Global_read_lock()
: m_state(GRL_NONE),
- m_mdl_global_shared_lock(NULL),
- m_mdl_blocks_commits_lock(NULL)
+ m_mdl_global_read_lock(NULL)
{}
bool lock_global_read_lock(THD *thd);
void unlock_global_read_lock(THD *thd);
- /**
- Check if this connection can acquire protection against GRL and
- emit error if otherwise.
- */
- bool can_acquire_protection() const
- {
- if (m_state)
- {
- my_error(ER_CANT_UPDATE_WITH_READLOCK, MYF(0));
- return TRUE;
- }
- return FALSE;
- }
bool make_global_read_lock_block_commit(THD *thd);
bool is_acquired() const { return m_state != GRL_NONE; }
void set_explicit_lock_duration(THD *thd);
private:
enum_grl_state m_state;
/**
- In order to acquire the global read lock, the connection must
- acquire shared metadata lock in GLOBAL namespace, to prohibit
- all DDL.
+ Global read lock is acquired in two steps:
+ 1. acquire MDL_BACKUP_FTWRL1 in BACKUP namespace to prohibit DDL and DML
+ 2. upgrade to MDL_BACKUP_FTWRL2 to prohibit commits
*/
- MDL_ticket *m_mdl_global_shared_lock;
- /**
- Also in order to acquire the global read lock, the connection
- must acquire a shared metadata lock in COMMIT namespace, to
- prohibit commits.
- */
- MDL_ticket *m_mdl_blocks_commits_lock;
+ MDL_ticket *m_mdl_global_read_lock;
};
@@ -2053,7 +2055,7 @@ struct wait_for_commit
/*
The LOCK_wait_commit protects the fields subsequent_commits_list and
wakeup_subsequent_commits_running (for a waitee), and the pointer
- waiterr and associated COND_wait_commit (for a waiter).
+ waitee and associated COND_wait_commit (for a waiter).
*/
mysql_mutex_t LOCK_wait_commit;
mysql_cond_t COND_wait_commit;
@@ -2067,8 +2069,14 @@ struct wait_for_commit
When this is cleared for wakeup, the COND_wait_commit condition is
signalled.
+
+ This pointer is protected by LOCK_wait_commit. But there is also a "fast
+ path" where the waiter compares this to NULL without holding the lock.
+ Such read must be done with acquire semantics (and all corresponding
+ writes done with release semantics). This ensures that a wakeup with error
+ is reliably detected as (waitee==NULL && wakeup_error != 0).
*/
- wait_for_commit *waitee;
+ std::atomic<wait_for_commit *> waitee;
/*
Generic pointer for use by the transaction coordinator to optimise the
waiting for improved group commit.
@@ -2103,7 +2111,7 @@ struct wait_for_commit
Quick inline check, to avoid function call and locking in the common case
where no wakeup is registered, or a registered wait was already signalled.
*/
- if (waitee)
+ if (waitee.load(std::memory_order_acquire))
return wait_for_prior_commit2(thd);
else
{
@@ -2131,7 +2139,7 @@ struct wait_for_commit
}
void unregister_wait_for_prior_commit()
{
- if (waitee)
+ if (waitee.load(std::memory_order_relaxed))
unregister_wait_for_prior_commit2();
else
wakeup_error= 0;
@@ -2153,7 +2161,7 @@ struct wait_for_commit
}
next_ptr_ptr= &cur->next_subsequent_commit;
}
- waitee= NULL;
+ waitee.store(NULL, std::memory_order_relaxed);
}
void wakeup(int wakeup_error);
@@ -2202,13 +2210,15 @@ public:
extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
+
/**
@class THD
For each client connection we create a separate thread with THD serving as
a thread/connection descriptor
*/
-class THD :public Statement,
+class THD: public THD_count, /* this must be first */
+ public Statement,
/*
This is to track items changed during execution of a prepared
statement/stored procedure. It's created by
@@ -2234,19 +2244,6 @@ private:
inline bool is_conventional() const
{ DBUG_ASSERT(0); return Statement::is_conventional(); }
- void dec_thread_count(void)
- {
- DBUG_ASSERT(thread_count > 0);
- thread_safe_decrement32(&thread_count);
- signal_thd_deleted();
- }
-
-
- void inc_thread_count(void)
- {
- thread_safe_increment32(&thread_count);
- }
-
public:
MDL_context mdl_context;
@@ -2260,6 +2257,10 @@ public:
rpl_io_thread_info *rpl_io_info;
rpl_sql_thread_info *rpl_sql_info;
} system_thread_info;
+ /* Used for BACKUP LOCK */
+ MDL_ticket *mdl_backup_ticket, *mdl_backup_lock;
+ /* Used to register that thread has a MDL_BACKUP_WAIT_COMMIT lock */
+ MDL_request *backup_commit_lock;
void reset_for_next_command(bool do_clear_errors= 1);
/*
@@ -2315,14 +2316,14 @@ public:
- thd->db (used in SHOW PROCESSLIST)
Is locked when THD is deleted.
*/
- mysql_mutex_t LOCK_thd_data;
+ mutable mysql_mutex_t LOCK_thd_data;
/*
Protects:
- kill information
- mysys_var (used by KILL statement and shutdown).
- Also ensures that THD is not deleted while mutex is hold
*/
- mysql_mutex_t LOCK_thd_kill;
+ mutable mysql_mutex_t LOCK_thd_kill;
/* all prepared statements and cursors of this connection */
Statement_map stmt_map;
@@ -2359,6 +2360,8 @@ public:
Security_context main_security_ctx;
Security_context *security_ctx;
+ Security_context *security_context() const { return security_ctx; }
+ void set_security_context(Security_context *sctx) { security_ctx = sctx; }
/*
Points to info-string that we show in SHOW PROCESSLIST
@@ -2655,6 +2658,7 @@ public:
THD_TRANS stmt; // Trans for current statement
bool on; // see ha_enable_transaction()
XID_STATE xid_state;
+ XID implicit_xid;
WT_THD wt; ///< for deadlock detection
Rows_log_event *m_pending_rows_event;
@@ -2676,28 +2680,25 @@ public:
MEM_ROOT mem_root; // Transaction-life memory allocation pool
void cleanup()
{
- DBUG_ENTER("thd::cleanup");
+ DBUG_ENTER("THD::st_transactions::cleanup");
changed_tables= 0;
savepoints= 0;
- /*
- If rm_error is raised, it means that this piece of a distributed
- transaction has failed and must be rolled back. But the user must
- rollback it explicitly, so don't start a new distributed XA until
- then.
- */
- if (!xid_state.rm_error)
- xid_state.xid.null();
+ implicit_xid.null();
free_root(&mem_root,MYF(MY_KEEP_PREALLOC));
DBUG_VOID_RETURN;
}
- my_bool is_active()
+ bool is_active()
{
return (all.ha_list != NULL);
}
+ bool is_empty()
+ {
+ return all.is_empty() && stmt.is_empty();
+ }
st_transactions()
{
bzero((char*)this, sizeof(*this));
- xid_state.xid.null();
+ implicit_xid.null();
init_sql_alloc(&mem_root, "THD::transactions",
ALLOC_ROOT_MIN_BLOCK_SIZE, 0,
MYF(MY_THREAD_SPECIFIC));
@@ -3042,12 +3043,17 @@ public:
ulonglong bytes_sent_old;
ulonglong affected_rows; /* Number of changed rows */
+ Opt_trace_context opt_trace;
pthread_t real_id; /* For debugging */
my_thread_id thread_id, thread_dbug_id;
uint32 os_thread_id;
uint tmp_table, global_disable_checkpoint;
uint server_status,open_options;
enum enum_thread_type system_thread;
+ enum backup_stages current_backup_stage;
+#ifdef WITH_WSREP
+ bool wsrep_desynced_backup_stage;
+#endif /* WITH_WSREP */
/*
Current or next transaction isolation level.
When a connection is established, the value is taken from
@@ -3194,6 +3200,9 @@ public:
it returned an error on master, and this is OK on the slave.
*/
bool is_slave_error;
+ /* True if we have printed something to the error log for this statement */
+ bool error_printed_to_log;
+
/*
True when a transaction is queued up for binlog group commit.
Used so that if another transaction needs to wait for a row lock held by
@@ -3220,12 +3229,6 @@ public:
/** number of name_const() substitutions, see sp_head.cc:subst_spvars() */
uint query_name_consts;
- /*
- If we do a purge of binary logs, log index info of the threads
- that are currently reading it needs to be adjusted. To do that
- each thread that is using LOG_INFO needs to adjust the pointer to it
- */
- LOG_INFO* current_linfo;
NET* slave_net; // network connection from slave -> m.
/*
@@ -3273,7 +3276,6 @@ public:
mysql_bin_log.start_union_events() call.
*/
bool unioned_events_trans;
-
/*
'queries' (actually SP statements) that run under inside this binlog
union have thd->query_id >= first_query_id.
@@ -3281,7 +3283,6 @@ public:
query_id_t first_query_id;
} binlog_evt_union;
- mysql_cond_t COND_wsrep_thd;
/**
Internal parser state.
Note that since the parser is not re-entrant, we keep only one parser
@@ -3342,6 +3343,10 @@ public:
void reset_for_reuse();
bool store_globals();
void reset_globals();
+ bool trace_started()
+ {
+ return opt_trace.is_started();
+ }
#ifdef SIGNAL_WITH_VIO_CLOSE
inline void set_active_vio(Vio* vio)
{
@@ -3361,9 +3366,12 @@ public:
void awake(killed_state state_to_set)
{
mysql_mutex_lock(&LOCK_thd_kill);
+ mysql_mutex_lock(&LOCK_thd_data);
awake_no_mutex(state_to_set);
+ mysql_mutex_unlock(&LOCK_thd_data);
mysql_mutex_unlock(&LOCK_thd_kill);
}
+ void abort_current_cond_wait(bool force);
/** Disconnect the associated communication endpoint. */
void disconnect();
@@ -3471,11 +3479,16 @@ public:
}
const Type_handler *type_handler_for_datetime() const;
bool timestamp_to_TIME(MYSQL_TIME *ltime, my_time_t ts,
- ulong sec_part, ulonglong fuzzydate);
+ ulong sec_part, date_mode_t fuzzydate);
inline my_time_t query_start() { return start_time; }
inline ulong query_start_sec_part()
{ query_start_sec_part_used=1; return start_time_sec_part; }
MYSQL_TIME query_start_TIME();
+ time_round_mode_t temporal_round_mode() const
+ {
+ return variables.sql_mode & MODE_TIME_ROUND_FRACTIONAL ?
+ TIME_FRAC_ROUND : TIME_FRAC_TRUNCATE;
+ }
private:
struct {
@@ -3668,6 +3681,22 @@ public:
{
return server_status & SERVER_STATUS_IN_TRANS;
}
+ void give_protection_error();
+ /*
+ Give an error if any of the following is true for this connection
+ - BACKUP STAGE is active
+ - FLUSH TABLE WITH READ LOCK is active
+ - BACKUP LOCK table_name is active
+ */
+ inline bool has_read_only_protection()
+ {
+ if (current_backup_stage == BACKUP_FINISHED &&
+ !global_read_lock.is_acquired() &&
+ !mdl_backup_lock)
+ return FALSE;
+ give_protection_error();
+ return TRUE;
+ }
inline bool fill_information_schema_tables()
{
return !stmt_arena->is_stmt_prepare();
@@ -4081,8 +4110,7 @@ public:
mysql_mutex_lock(&LOCK_thd_kill);
int err= killed_errno();
if (err)
- my_message(err, killed_err ? killed_err->msg : ER_THD(this, err),
- MYF(0));
+ my_message(err, killed_err ? killed_err->msg : ER_THD(this, err), MYF(0));
mysql_mutex_unlock(&LOCK_thd_kill);
}
/* return TRUE if we will abort query if we make a warning now */
@@ -4439,6 +4467,80 @@ private:
return raised;
}
+private:
+ void push_warning_truncated_priv(Sql_condition::enum_warning_level level,
+ uint sql_errno,
+ const char *type_str, const char *val)
+ {
+ DBUG_ASSERT(sql_errno == ER_TRUNCATED_WRONG_VALUE ||
+ sql_errno == ER_WRONG_VALUE);
+ char buff[MYSQL_ERRMSG_SIZE];
+ CHARSET_INFO *cs= &my_charset_latin1;
+ cs->cset->snprintf(cs, buff, sizeof(buff),
+ ER_THD(this, sql_errno), type_str, val);
+ /*
+ Note: the format string can vary between ER_TRUNCATED_WRONG_VALUE
+ and ER_WRONG_VALUE, but the code passed to push_warning() is
+ always ER_TRUNCATED_WRONG_VALUE. This is intentional.
+ */
+ push_warning(this, level, ER_TRUNCATED_WRONG_VALUE, buff);
+ }
+public:
+ void push_warning_truncated_wrong_value(Sql_condition::enum_warning_level level,
+ const char *type_str, const char *val)
+ {
+ return push_warning_truncated_priv(level, ER_TRUNCATED_WRONG_VALUE,
+ type_str, val);
+ }
+ void push_warning_wrong_value(Sql_condition::enum_warning_level level,
+ const char *type_str, const char *val)
+ {
+ return push_warning_truncated_priv(level, ER_WRONG_VALUE, type_str, val);
+ }
+ void push_warning_truncated_wrong_value(const char *type_str, const char *val)
+ {
+ return push_warning_truncated_wrong_value(Sql_condition::WARN_LEVEL_WARN,
+ type_str, val);
+ }
+ void push_warning_truncated_value_for_field(Sql_condition::enum_warning_level
+ level, const char *type_str,
+ const char *val,
+ const char *db_name,
+ const char *table_name,
+ const char *name)
+ {
+ DBUG_ASSERT(name);
+ char buff[MYSQL_ERRMSG_SIZE];
+ CHARSET_INFO *cs= &my_charset_latin1;
+
+ if (!db_name)
+ db_name= "";
+ if (!table_name)
+ table_name= "";
+ cs->cset->snprintf(cs, buff, sizeof(buff),
+ ER_THD(this, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
+ type_str, val, db_name, table_name, name,
+ (ulong) get_stmt_da()->current_row_for_warning());
+ push_warning(this, level, ER_TRUNCATED_WRONG_VALUE, buff);
+
+ }
+ void push_warning_wrong_or_truncated_value(Sql_condition::enum_warning_level level,
+ bool totally_useless_value,
+ const char *type_str,
+ const char *val,
+ const char *db_name,
+ const char *table_name,
+ const char *field_name)
+ {
+ if (field_name)
+ push_warning_truncated_value_for_field(level, type_str, val,
+ db_name, table_name, field_name);
+ else if (totally_useless_value)
+ push_warning_wrong_value(level, type_str, val);
+ else
+ push_warning_truncated_wrong_value(level, type_str, val);
+ }
+
public:
/** Overloaded to guard query/query_length fields */
virtual void set_statement(Statement *stmt);
@@ -4480,6 +4582,13 @@ public:
void set_query_id(query_id_t new_query_id)
{
query_id= new_query_id;
+#ifdef WITH_WSREP
+ if (WSREP_NNULL(this))
+ {
+ set_wsrep_next_trx_id(query_id);
+ WSREP_DEBUG("assigned new next trx id: %" PRIu64, wsrep_next_trx_id());
+ }
+#endif /* WITH_WSREP */
}
void set_open_tables(TABLE *open_tables_arg)
{
@@ -4513,7 +4622,7 @@ public:
{
if (!(server_status &
(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY)))
- mdl_context.release_transactional_locks();
+ mdl_context.release_transactional_locks(this);
}
int decide_logging_format(TABLE_LIST *tables);
@@ -4681,12 +4790,10 @@ public:
};
bool has_thd_temporary_tables();
- TABLE *create_and_open_tmp_table(handlerton *hton,
- LEX_CUSTRING *frm,
+ TABLE *create_and_open_tmp_table(LEX_CUSTRING *frm,
const char *path,
const char *db,
const char *table_name,
- bool open_in_engine,
bool open_internal_tables);
TABLE *find_temporary_table(const char *db, const char *table_name,
@@ -4723,13 +4830,12 @@ private:
bool has_temporary_tables();
uint create_tmp_table_def_key(char *key, const char *db,
const char *table_name);
- TMP_TABLE_SHARE *create_temporary_table(handlerton *hton, LEX_CUSTRING *frm,
+ TMP_TABLE_SHARE *create_temporary_table(LEX_CUSTRING *frm,
const char *path, const char *db,
const char *table_name);
TABLE *find_temporary_table(const char *key, uint key_length,
Temporary_table_state state);
- TABLE *open_temporary_table(TMP_TABLE_SHARE *share, const char *alias,
- bool open_in_engine);
+ TABLE *open_temporary_table(TMP_TABLE_SHARE *share, const char *alias);
bool find_and_use_tmp_table(const TABLE_LIST *tl, TABLE **out_table);
bool use_temporary_table(TABLE *table, TABLE **out_table);
void close_temporary_table(TABLE *table);
@@ -4752,62 +4858,150 @@ private:
}
public:
+#ifdef HAVE_REPLICATION
+ /*
+ If we do a purge of binary logs, log index info of the threads
+ that are currently reading it needs to be adjusted. To do that
+ each thread that is using LOG_INFO needs to adjust the pointer to it
+ */
+ LOG_INFO *current_linfo;
+ Slave_info *slave_info;
+
+ void set_current_linfo(LOG_INFO *linfo);
+ void reset_current_linfo() { set_current_linfo(0); }
+
+ int register_slave(uchar *packet, size_t packet_length);
+ void unregister_slave();
+ bool is_binlog_dump_thread();
+#endif
+
+ /*
+ Indicates if this thread is suspended due to awaiting an ACK from a
+ replica. True if suspended, false otherwise.
+
+ Note that this variable is protected by Repl_semi_sync_master::LOCK_binlog
+ */
+ bool is_awaiting_semisync_ack;
+
inline ulong wsrep_binlog_format() const
{
- return WSREP_FORMAT(variables.binlog_format);
+ return WSREP_BINLOG_FORMAT(variables.binlog_format);
}
#ifdef WITH_WSREP
- const bool wsrep_applier; /* dedicated slave applier thread */
+ bool wsrep_applier; /* dedicated slave applier thread */
bool wsrep_applier_closing; /* applier marked to close */
bool wsrep_client_thread; /* to identify client threads*/
- bool wsrep_PA_safe;
- bool wsrep_converted_lock_session;
- bool wsrep_apply_toi; /* applier processing in TOI */
- enum wsrep_exec_mode wsrep_exec_mode;
query_id_t wsrep_last_query_id;
- enum wsrep_query_state wsrep_query_state;
- enum wsrep_conflict_state wsrep_conflict_state;
- wsrep_trx_meta_t wsrep_trx_meta;
+ XID wsrep_xid;
+
+ /** This flag denotes that record locking should be skipped during INSERT
+ and gap locking during SELECT. Only used by the streaming replication thread
+ that only modifies the wsrep_schema.SR table. */
+ my_bool wsrep_skip_locking;
+
+ mysql_cond_t COND_wsrep_thd;
+
+ // changed from wsrep_seqno_t to wsrep_trx_meta_t in wsrep API rev 75
uint32 wsrep_rand;
- Relay_log_info *wsrep_rli;
rpl_group_info *wsrep_rgi;
- wsrep_ws_handle_t wsrep_ws_handle;
+ bool wsrep_converted_lock_session;
+ char wsrep_info[128]; /* string for dynamic proc info */
ulong wsrep_retry_counter; // of autocommit
- char *wsrep_retry_query;
+ bool wsrep_PA_safe;
+ char* wsrep_retry_query;
size_t wsrep_retry_query_len;
enum enum_server_command wsrep_retry_command;
- enum wsrep_consistency_check_mode
+ enum wsrep_consistency_check_mode
wsrep_consistency_check;
+ std::vector<wsrep::provider::status_variable> wsrep_status_vars;
int wsrep_mysql_replicated;
- const char *wsrep_TOI_pre_query; /* a query to apply before
- the actual TOI query */
+ const char* wsrep_TOI_pre_query; /* a query to apply before
+ the actual TOI query */
size_t wsrep_TOI_pre_query_len;
wsrep_po_handle_t wsrep_po_handle;
size_t wsrep_po_cnt;
#ifdef GTID_SUPPORT
+ my_bool wsrep_po_in_trans;
rpl_sid wsrep_po_sid;
-#endif /* GTID_SUPPORT */
+#endif /* GTID_SUPPORT */
void *wsrep_apply_format;
- char wsrep_info[128]; /* string for dynamic proc info */
+ uchar* wsrep_rbr_buf;
+ wsrep_gtid_t wsrep_sync_wait_gtid;
+ // wsrep_gtid_t wsrep_last_written_gtid;
+ ulong wsrep_affected_rows;
+ bool wsrep_has_ignored_error;
+ bool wsrep_replicate_GTID;
+
/*
When enabled, do not replicate/binlog updates from the current table that's
being processed. At the moment, it is used to keep mysql.gtid_slave_pos
table updates from being replicated to other nodes via galera replication.
*/
bool wsrep_ignore_table;
- wsrep_gtid_t wsrep_sync_wait_gtid;
- ulong wsrep_affected_rows;
- bool wsrep_replicate_GTID;
- bool wsrep_skip_wsrep_GTID;
- /* This flag is set when innodb do an intermediate commit to
- processing the LOAD DATA INFILE statement by splitting it into 10K
- rows chunks. If flag is set, then binlog rotation is not performed
- while intermediate transaction try to commit, because in this case
- rotation causes unregistration of innodb handler. Later innodb handler
- registered again, but replication of last chunk of rows is skipped
- by the innodb engine: */
- bool wsrep_split_flag;
+ /* thread who has started kill for this THD protected by LOCK_thd_data*/
+ my_thread_id wsrep_aborter;
+
+ /* true if BF abort is observed in do_command() right after reading
+ client's packet, and if the client has sent PS execute command. */
+ bool wsrep_delayed_BF_abort;
+
+ /*
+ Transaction id:
+ * m_wsrep_next_trx_id is assigned on the first query after
+ wsrep_next_trx_id() return WSREP_UNDEFINED_TRX_ID
+ * Each storage engine must assign value of wsrep_next_trx_id()
+ when the transaction starts.
+ * Effective transaction id is returned via wsrep_trx_id()
+ */
+ /*
+ Return effective transaction id
+ */
+ wsrep_trx_id_t wsrep_trx_id() const
+ {
+ return m_wsrep_client_state.transaction().id().get();
+ }
+
+
+ /*
+ Set next trx id
+ */
+ void set_wsrep_next_trx_id(query_id_t query_id)
+ {
+ m_wsrep_next_trx_id = (wsrep_trx_id_t) query_id;
+ }
+ /*
+ Return next trx id
+ */
+ wsrep_trx_id_t wsrep_next_trx_id() const
+ {
+ return m_wsrep_next_trx_id;
+ }
+ /*
+ If node is async slave and have parallel execution, wait for prior commits.
+ */
+ bool wsrep_parallel_slave_wait_for_prior_commit();
+private:
+ wsrep_trx_id_t m_wsrep_next_trx_id; /* cast from query_id_t */
+ /* wsrep-lib */
+ Wsrep_mutex m_wsrep_mutex;
+ Wsrep_condition_variable m_wsrep_cond;
+ Wsrep_client_service m_wsrep_client_service;
+ Wsrep_client_state m_wsrep_client_state;
+
+public:
+ Wsrep_client_state& wsrep_cs() { return m_wsrep_client_state; }
+ const Wsrep_client_state& wsrep_cs() const { return m_wsrep_client_state; }
+ const wsrep::transaction& wsrep_trx() const
+ { return m_wsrep_client_state.transaction(); }
+ const wsrep::streaming_context& wsrep_sr() const
+ { return m_wsrep_client_state.transaction().streaming_context(); }
+ /* Pointer to applier service for streaming THDs. This is needed to
+ be able to delete applier service object in case of background
+ rollback. */
+ Wsrep_applier_service* wsrep_applier_service;
+ /* wait_for_commit struct for binlog group commit */
+ wait_for_commit wsrep_wfc;
#endif /* WITH_WSREP */
/* Handling of timeouts for commands */
@@ -4856,22 +5050,6 @@ public:
THD_TRANS::DROPPED_TEMP_TABLE | THD_TRANS::DID_DDL |
THD_TRANS::EXECUTED_TABLE_ADMIN_CMD));
}
- /*
- Reset current_linfo
- Setting current_linfo to 0 needs to be done with LOCK_thread_count to
- ensure that adjust_linfo_offsets doesn't use a structure that may
- be deleted.
- */
- inline void reset_current_linfo()
- {
- mysql_mutex_lock(&LOCK_thread_count);
- current_linfo= 0;
- mysql_mutex_unlock(&LOCK_thread_count);
- }
-
- bool sql_parser(LEX *old_lex, LEX *lex,
- char *str, uint str_len, bool stmt_prepare_mode);
-
uint get_net_wait_timeout()
{
@@ -4922,26 +5100,11 @@ public:
Item *sp_fix_func_item(Item **it_addr);
Item *sp_prepare_func_item(Item **it_addr, uint cols= 1);
bool sp_eval_expr(Field *result_field, Item **expr_item_ptr);
-};
-inline void add_to_active_threads(THD *thd)
-{
- mysql_mutex_lock(&LOCK_thread_count);
- threads.append(thd);
- mysql_mutex_unlock(&LOCK_thread_count);
-}
-
-/*
- This should be called when you want to delete a thd that was not
- running any queries.
-*/
+ bool sql_parser(LEX *old_lex, LEX *lex,
+ char *str, uint str_len, bool stmt_prepare_mode);
-inline void unlink_not_visible_thd(THD *thd)
-{
- mysql_mutex_lock(&LOCK_thread_count);
- thd->unlink();
- mysql_mutex_unlock(&LOCK_thread_count);
-}
+};
/** A short cut for thd->get_stmt_da()->set_ok_status(). */
@@ -4976,10 +5139,18 @@ my_eof(THD *thd)
(A)->variables.sql_log_bin_off= 0;}
-inline sql_mode_t sql_mode_for_dates(THD *thd)
+inline date_conv_mode_t sql_mode_for_dates(THD *thd)
{
- return thd->variables.sql_mode &
- (MODE_NO_ZERO_DATE | MODE_NO_ZERO_IN_DATE | MODE_INVALID_DATES);
+ static_assert((ulonglong(date_conv_mode_t::KNOWN_MODES) &
+ ulonglong(time_round_mode_t::KNOWN_MODES)) == 0,
+ "date_conv_mode_t and time_round_mode_t must use different "
+ "bit values");
+ static_assert(MODE_NO_ZERO_DATE == date_mode_t::NO_ZERO_DATE &&
+ MODE_NO_ZERO_IN_DATE == date_mode_t::NO_ZERO_IN_DATE &&
+ MODE_INVALID_DATES == date_mode_t::INVALID_DATES,
+ "sql_mode_t and date_mode_t values must be equal");
+ return date_conv_mode_t(thd->variables.sql_mode &
+ (MODE_NO_ZERO_DATE | MODE_NO_ZERO_IN_DATE | MODE_INVALID_DATES));
}
/*
@@ -5905,6 +6076,7 @@ class select_max_min_finder_subselect :public select_subselect
bool (select_max_min_finder_subselect::*op)();
bool fmax;
bool is_all;
+ void set_op(const Type_handler *ha);
public:
select_max_min_finder_subselect(THD *thd_arg, Item_subselect *item_arg,
bool mx, bool all):
@@ -5917,6 +6089,7 @@ public:
bool cmp_decimal();
bool cmp_str();
bool cmp_time();
+ bool cmp_native();
};
/* EXISTS subselect interface class */
@@ -5935,11 +6108,13 @@ public:
- The sj-materialization temporary table
- Members needed to make index lookup or a full scan of the temptable.
*/
+class POSITION;
+
class SJ_MATERIALIZATION_INFO : public Sql_alloc
{
public:
/* Optimal join sub-order */
- struct st_position *positions;
+ POSITION *positions;
uint tables; /* Number of tables in the sj-nest */
@@ -6131,6 +6306,10 @@ class multi_delete :public select_result_interceptor
bool error_handled;
public:
+ // Methods used by ColumnStore
+ uint get_num_of_tables() const { return num_of_tables; }
+ TABLE_LIST* get_tables() const { return delete_tables; }
+public:
multi_delete(THD *thd_arg, TABLE_LIST *dt, uint num_of_tables);
~multi_delete();
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
@@ -6312,7 +6491,7 @@ public:
be rolled back or that do not expect any previously metadata
locked tables.
*/
-#define CF_IMPLICT_COMMIT_BEGIN (1U << 6)
+#define CF_IMPLICIT_COMMIT_BEGIN (1U << 6)
/**
Implicitly commit after the SQL statement.
@@ -6330,7 +6509,7 @@ public:
before and after every DDL statement and any statement that
modifies our currently non-transactional system tables.
*/
-#define CF_AUTO_COMMIT_TRANS (CF_IMPLICT_COMMIT_BEGIN | CF_IMPLICIT_COMMIT_END)
+#define CF_AUTO_COMMIT_TRANS (CF_IMPLICIT_COMMIT_BEGIN | CF_IMPLICIT_COMMIT_END)
/**
Diagnostic statement.
@@ -6411,6 +6590,14 @@ public:
*/
#define CF_DB_CHANGE (1U << 23)
+#ifdef WITH_WSREP
+/**
+ DDL statement that may be subject to error filtering.
+*/
+#define CF_WSREP_MAY_IGNORE_ERRORS (1U << 24)
+#endif /* WITH_WSREP */
+
+
/* Bits in server_command_flags */
/**
@@ -6450,7 +6637,8 @@ public:
inline bool add_item_to_list(THD *thd, Item *item)
{
- return thd->lex->current_select->add_item_to_list(thd, item);
+ bool res= thd->lex->current_select->add_item_to_list(thd, item);
+ return res;
}
inline bool add_value_to_list(THD *thd, Item *value)
@@ -6919,5 +7107,85 @@ private:
THD *const thd;
};
+
+/** THD registry */
+class THD_list
+{
+ I_List<THD> threads;
+ mutable mysql_rwlock_t lock;
+
+public:
+ /**
+ Constructor replacement.
+
+ Unfortunately we can't use fair constructor to initialize mutex
+ for two reasons: PFS and embedded. The former can probably be fixed,
+ the latter can probably be dropped.
+ */
+ void init()
+ {
+ mysql_rwlock_init(key_rwlock_THD_list, &lock);
+ }
+
+ /** Destructor replacement. */
+ void destroy()
+ {
+ mysql_rwlock_destroy(&lock);
+ }
+
+ /**
+ Inserts thread to registry.
+
+ @param thd thread
+
+ Thread becomes accessible via server_threads.
+ */
+ void insert(THD *thd)
+ {
+ mysql_rwlock_wrlock(&lock);
+ threads.append(thd);
+ mysql_rwlock_unlock(&lock);
+ }
+
+ /**
+ Removes thread from registry.
+
+ @param thd thread
+
+ Thread becomes not accessible via server_threads.
+ */
+ void erase(THD *thd)
+ {
+ thd->assert_linked();
+ mysql_rwlock_wrlock(&lock);
+ thd->unlink();
+ mysql_rwlock_unlock(&lock);
+ }
+
+ /**
+ Iterates registered threads.
+
+ @param action called for every element
+ @param argument opque argument passed to action
+
+ @return
+ @retval 0 iteration completed successfully
+ @retval 1 iteration was interrupted (action returned 1)
+ */
+ template <typename T> int iterate(my_bool (*action)(THD *thd, T *arg), T *arg= 0)
+ {
+ int res= 0;
+ mysql_rwlock_rdlock(&lock);
+ I_List_iterator<THD> it(threads);
+ while (auto tmp= it++)
+ if ((res= action(tmp, arg)))
+ break;
+ mysql_rwlock_unlock(&lock);
+ return res;
+ }
+};
+
+extern THD_list server_threads;
+
#endif /* MYSQL_SERVER */
#endif /* SQL_CLASS_INCLUDED */
diff --git a/sql/sql_cmd.h b/sql/sql_cmd.h
index f5df73216d8..7f1fd06aa46 100644
--- a/sql/sql_cmd.h
+++ b/sql/sql_cmd.h
@@ -108,6 +108,7 @@ enum enum_sql_command {
SQLCOM_SHOW_STATUS_PACKAGE,
SQLCOM_SHOW_STATUS_PACKAGE_BODY,
SQLCOM_SHOW_PACKAGE_BODY_CODE,
+ SQLCOM_BACKUP, SQLCOM_BACKUP_LOCK,
/*
When a command is added here, be sure it's also added in mysqld.cc
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 4d9ef98d22b..733d281efd5 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2007, 2013, Oracle and/or its affiliates.
- Copyright (c) 2008, 2016, MariaDB
+ Copyright (c) 2008, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,11 @@
// reset_host_errors
#include "sql_acl.h" // acl_getroot, NO_ACCESS, SUPER_ACL
#include "sql_callback.h"
+
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h" /* wsrep open/close */
#include "wsrep_mysqld.h"
+#endif /* WITH_WSREP */
#include "proxy_protocol.h"
HASH global_user_stats, global_client_stats, global_table_stats;
@@ -1032,12 +1036,16 @@ static int check_connection(THD *thd)
*/
statistic_increment(connection_errors_peer_addr, &LOCK_status);
my_error(ER_BAD_HOST_ERROR, MYF(0));
+ statistic_increment(aborted_connects_preauth, &LOCK_status);
return 1;
}
if (thd_set_peer_addr(thd, &net->vio->remote, ip, peer_port,
true, &connect_errors))
+ {
+ statistic_increment(aborted_connects_preauth, &LOCK_status);
return 1;
+ }
}
else /* Hostname given means that the connection was on a socket */
{
@@ -1065,6 +1073,7 @@ static int check_connection(THD *thd)
*/
statistic_increment(aborted_connects,&LOCK_status);
statistic_increment(connection_errors_internal, &LOCK_status);
+ statistic_increment(aborted_connects_preauth, &LOCK_status);
return 1; /* The error is set by alloc(). */
}
@@ -1178,18 +1187,17 @@ exit:
void end_connection(THD *thd)
{
NET *net= &thd->net;
+
#ifdef WITH_WSREP
- if (WSREP(thd) && wsrep)
+ if (thd->wsrep_cs().state() == wsrep::client_state::s_exec)
{
- wsrep_status_t rcode= wsrep->free_connection(wsrep, thd->thread_id);
- if (rcode) {
- WSREP_WARN("wsrep failed to free connection context: %lld code: %d",
- (longlong) thd->thread_id, rcode);
- }
+ /* Error happened after the thread acquired ownership to wsrep
+ client state, but before command was processed. Clean up the
+ state before wsrep_close(). */
+ wsrep_after_command_ignore_result(thd);
}
- thd->wsrep_client_thread= 0;
-#endif
-
+ wsrep_close(thd);
+#endif /* WITH_WSREP */
if (thd->user_connect)
{
/*
@@ -1322,7 +1330,8 @@ bool thd_prepare_connection(THD *thd)
prepare_new_connection_state(thd);
#ifdef WITH_WSREP
- thd->wsrep_client_thread= 1;
+ thd->wsrep_client_thread= true;
+ wsrep_open(thd);
#endif /* WITH_WSREP */
return FALSE;
}
@@ -1351,6 +1360,14 @@ void do_handle_one_connection(CONNECT *connect)
return;
}
+ DBUG_EXECUTE_IF("CONNECT_wait",
+ {
+ extern MYSQL_SOCKET unix_sock;
+ DBUG_ASSERT(unix_sock.fd >= 0);
+ while (unix_sock.fd >= 0)
+ my_sleep(1000);
+ });
+
/*
If a thread was created to handle this connection:
increment slow_launch_threads counter if it took more than
@@ -1364,10 +1381,10 @@ void do_handle_one_connection(CONNECT *connect)
if (launch_time >= slow_launch_time*1000000L)
statistic_increment(slow_launch_threads, &LOCK_status);
}
- delete connect;
- /* Make THD visible in show processlist */
- add_to_active_threads(thd);
+ server_threads.insert(thd); // Make THD visible in show processlist
+
+ delete connect; // must be after server_threads.insert, see close_connections()
thd->thr_create_utime= thr_create_utime;
/* We need to set this because of time_out_user_resource_limits */
@@ -1405,14 +1422,6 @@ void do_handle_one_connection(CONNECT *connect)
}
end_connection(thd);
-#ifdef WITH_WSREP
- if (WSREP(thd))
- {
- mysql_mutex_lock(&thd->LOCK_thd_data);
- wsrep_thd_set_query_state(thd, QUERY_EXITING);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-#endif
end_thread:
close_connection(thd);
@@ -1481,6 +1490,7 @@ CONNECT::~CONNECT()
{
if (vio)
vio_delete(vio);
+ count--;
}
diff --git a/sql/sql_connect.h b/sql/sql_connect.h
index 82ab4423b37..ef6484fa081 100644
--- a/sql/sql_connect.h
+++ b/sql/sql_connect.h
@@ -42,11 +42,14 @@ public:
bool thread_count_incremented;
ulonglong prior_thr_create_utime;
+ static Atomic_counter<uint32_t> count;
+
CONNECT()
:vio(0), host(0), scheduler(thread_scheduler), thread_id(0), real_id(0),
extra_port(0),
thread_count_incremented(0), prior_thr_create_utime(0)
{
+ count++;
};
~CONNECT();
void close_and_delete();
diff --git a/sql/sql_const.h b/sql/sql_const.h
index e33d8b73626..f7c820c727b 100644
--- a/sql/sql_const.h
+++ b/sql/sql_const.h
@@ -204,7 +204,11 @@
instead of reading with keys. The number says how many evaluation of the
WHERE clause is comparable to reading one extra row from a table.
*/
-#define TIME_FOR_COMPARE 5 // 5 compares == one read
+#define TIME_FOR_COMPARE 5 // 5 compares == one read
+#define TIME_FOR_COMPARE_IDX 20
+
+#define IDX_BLOCK_COPY_COST ((double) 1 / TIME_FOR_COMPARE)
+#define IDX_LOOKUP_COST ((double) 1 / 8)
/**
Number of comparisons of table rowids equivalent to reading one row from a
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc
index 9acdf2278ac..8c2630c5106 100644
--- a/sql/sql_cte.cc
+++ b/sql/sql_cte.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2016, 2021, MariaDB
+ Copyright (c) 2016, 2017 MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,6 +55,14 @@ bool With_clause::add_with_element(With_element *elem)
}
+void st_select_lex_unit::set_with_clause(With_clause *with_cl)
+{
+ with_clause= with_cl;
+ if (with_clause)
+ with_clause->set_owner(this);
+}
+
+
/**
@brief
Check dependencies between tables defined in a list of with clauses
@@ -189,15 +197,15 @@ bool LEX::resolve_references_to_cte(TABLE_LIST *tables,
{
if (tbl->derived)
continue;
- if (!tbl->db.length && !tbl->with)
+ if (!tbl->db.str && !tbl->with)
tbl->with= tbl->select_lex->find_table_def_in_with_clauses(tbl);
if (!tbl->with) // no CTE matches table reference tbl
{
if (only_cte_resolution)
continue;
- if (!tbl->db.length) // no database specified in table reference tbl
+ if (!tbl->db.str) // no database specified in table reference tbl
{
- if (!thd->db.length) // no default database is set
+ if (!thd->db.str) // no default database is set
{
my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
return true;
@@ -243,7 +251,8 @@ bool LEX::resolve_references_to_cte(TABLE_LIST *tables,
tbl->schema_table= 0;
if (tbl->derived)
{
- tbl->derived->first_select()->linkage= DERIVED_TABLE_TYPE;
+ tbl->derived->first_select()->set_linkage(DERIVED_TABLE_TYPE);
+ tbl->select_lex->add_statistics(tbl->derived);
}
if (tbl->with->is_recursive && tbl->is_with_table_recursive_reference())
continue;
@@ -323,8 +332,8 @@ bool With_clause::check_dependencies()
elem != with_elem;
elem= elem->next)
{
- if (my_strcasecmp(system_charset_info, with_elem->get_name_str(),
- elem->get_name_str()) == 0)
+ if (lex_string_cmp(system_charset_info, with_elem->get_name(),
+ elem->get_name()) == 0)
{
my_error(ER_DUP_QUERY_NAME, MYF(0),
with_elem->get_name_str());
@@ -435,7 +444,7 @@ With_element *With_clause::find_table_def(TABLE_LIST *table,
with_elem= with_elem->next)
{
if (my_strcasecmp(system_charset_info, with_elem->get_name_str(),
- table->table_name.str) == 0 &&
+ table->table_name.str) == 0 &&
!table->is_fqtn)
{
table->set_derived();
@@ -878,7 +887,7 @@ void With_element::move_anchors_ahead()
{
st_select_lex *next_sl;
st_select_lex *new_pos= spec->first_select();
- new_pos->linkage= UNION_TYPE;
+ new_pos->set_linkage(UNION_TYPE);
for (st_select_lex *sl= new_pos; sl; sl= next_sl)
{
next_sl= sl->next_select();
@@ -887,9 +896,9 @@ void With_element::move_anchors_ahead()
sl->move_node(new_pos);
if (new_pos == spec->first_select())
{
- enum sub_select_type type= new_pos->linkage;
- new_pos->linkage= sl->linkage;
- sl->linkage= type;
+ enum sub_select_type type= new_pos->get_linkage();
+ new_pos->set_linkage(sl->get_linkage());
+ sl->set_linkage(type);
new_pos->with_all_modifier= sl->with_all_modifier;
sl->with_all_modifier= false;
}
@@ -902,7 +911,7 @@ void With_element::move_anchors_ahead()
}
}
first_recursive= new_pos;
- spec->first_select()->linkage= DERIVED_TABLE_TYPE;
+ spec->first_select()->set_linkage(DERIVED_TABLE_TYPE);
}
@@ -956,7 +965,9 @@ bool With_clause::prepare_unreferenced_elements(THD *thd)
true on failure
*/
-bool With_element::set_unparsed_spec(THD *thd, char *spec_start, char *spec_end,
+bool With_element::set_unparsed_spec(THD *thd,
+ const char *spec_start,
+ const char *spec_end,
my_ptrdiff_t spec_offset)
{
stmt_prepare_mode= thd->m_parser_state->m_lip.stmt_prepare_mode;
@@ -970,7 +981,7 @@ bool With_element::set_unparsed_spec(THD *thd, char *spec_start, char *spec_end,
if (!unparsed_spec.str)
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR),
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
static_cast<int>(unparsed_spec.length));
return true;
}
@@ -1031,7 +1042,7 @@ st_select_lex_unit *With_element::clone_parsed_spec(LEX *old_lex,
st_select_lex *last_clone_select;
char save_end= unparsed_spec.str[unparsed_spec.length];
- const_cast<char*>(unparsed_spec.str)[unparsed_spec.length]= '\0';
+ ((char*) &unparsed_spec.str[unparsed_spec.length])[0]= '\0';
lex_start(thd);
lex->clone_spec_offset= unparsed_spec_offset;
@@ -1083,9 +1094,8 @@ st_select_lex_unit *With_element::clone_parsed_spec(LEX *old_lex,
(unsigned int)unparsed_spec.length,
stmt_prepare_mode);
- const_cast<char*>(unparsed_spec.str)[unparsed_spec.length]= save_end;
+ ((char*) &unparsed_spec.str[unparsed_spec.length])[0]= save_end;
with_select= lex->unit.first_select();
- with_select->select_number= ++lex->stmt_lex->current_select_number;
if (parse_status)
goto err;
@@ -1256,7 +1266,7 @@ bool With_element::prepare_unreferenced(THD *thd)
rename_columns_of_derived_unit(thd, spec) ||
check_duplicate_names(thd, first_sl->item_list, 1)))
rc= true;
-
+
thd->lex->context_analysis_only&= ~CONTEXT_ANALYSIS_ONLY_DERIVED;
return rc;
}
diff --git a/sql/sql_cte.h b/sql/sql_cte.h
index 47071dd06fd..c0624c5e9e1 100644
--- a/sql/sql_cte.h
+++ b/sql/sql_cte.h
@@ -152,6 +152,7 @@ public:
global chain of TABLE_LIST objects created for the whole query.
*/
With_element_head *head;
+
/*
Optional list of column names to name the columns of the table introduced
by this with element. It is used in the case when the names are not
@@ -253,7 +254,7 @@ public:
TABLE_LIST *find_first_sq_rec_ref_in_select(st_select_lex *sel);
- bool set_unparsed_spec(THD *thd, char *spec_start, char *spec_end,
+ bool set_unparsed_spec(THD *thd, const char *spec_start, const char *spec_end,
my_ptrdiff_t spec_offset);
st_select_lex_unit *clone_parsed_spec(LEX *old_lex, TABLE_LIST *with_table);
@@ -356,8 +357,7 @@ private:
*/
With_clause *next_with_clause;
/* Set to true if dependencies between with elements have been checked */
- bool dependencies_are_checked;
-
+ bool dependencies_are_checked;
/*
The bitmap of all recursive with elements whose specifications
are not complied with restrictions imposed by the SQL standards
@@ -381,9 +381,8 @@ public:
bool with_recursive;
With_clause(bool recursive_fl, With_clause *emb_with_clause)
- : owner(NULL),
- embedding_with_clause(emb_with_clause), next_with_clause(NULL),
- dependencies_are_checked(false), unrestricted(0),
+ : owner(NULL), embedding_with_clause(emb_with_clause),
+ next_with_clause(NULL), dependencies_are_checked(false), unrestricted(0),
with_prepared_anchor(0), cleaned(0), stabilized(0),
with_recursive(recursive_fl)
{ }
@@ -397,8 +396,12 @@ public:
last_next= &this->next_with_clause;
}
+ st_select_lex_unit *get_owner() { return owner; }
+
void set_owner(st_select_lex_unit *unit) { owner= unit; }
+ void attach_to(st_select_lex *select_lex);
+
With_clause *pop() { return embedding_with_clause; }
bool check_dependencies();
@@ -433,7 +436,6 @@ bool With_element::is_unrestricted()
}
inline
-
bool With_element::is_with_prepared_anchor()
{
return owner->with_prepared_anchor & get_elem_map();
@@ -515,11 +517,14 @@ void With_element::prepare_for_next_iteration()
inline
-void st_select_lex_unit::set_with_clause(With_clause *with_cl)
-{
- with_clause= with_cl;
- if (with_clause)
- with_clause->set_owner(this);
+void With_clause::attach_to(st_select_lex *select_lex)
+{
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
+ {
+ select_lex->register_unit(with_elem->spec, NULL);
+ }
}
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 7b1ca52239c..b2b591464f7 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -882,7 +882,7 @@ mysql_rm_db_internal(THD *thd, const LEX_CSTRING *db, bool if_exists, bool silen
lock_db_routines(thd, dbnorm))
goto exit;
- if (!in_bootstrap && !rm_mysql_schema)
+ if (!rm_mysql_schema)
{
for (table= tables; table; table= table->next_local)
{
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 95de5d6ad61..82d4dc48440 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2019, Oracle and/or its affiliates.
- Copyright (c) 2010, 2019, MariaDB
+ Copyright (c) 2010, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -237,6 +237,53 @@ static bool record_should_be_deleted(THD *thd, TABLE *table, SQL_SELECT *sel,
return false;
}
+static
+int update_portion_of_time(THD *thd, TABLE *table,
+ const vers_select_conds_t &period_conds,
+ bool *inside_period)
+{
+ bool lcond= period_conds.field_start->val_datetime_packed(thd)
+ < period_conds.start.item->val_datetime_packed(thd);
+ bool rcond= period_conds.field_end->val_datetime_packed(thd)
+ > period_conds.end.item->val_datetime_packed(thd);
+
+ *inside_period= !lcond && !rcond;
+ if (*inside_period)
+ return 0;
+
+ DBUG_ASSERT(!table->triggers
+ || !table->triggers->has_triggers(TRG_EVENT_INSERT,
+ TRG_ACTION_BEFORE));
+
+ int res= 0;
+ Item *src= lcond ? period_conds.start.item : period_conds.end.item;
+ uint dst_fieldno= lcond ? table->s->period.end_fieldno
+ : table->s->period.start_fieldno;
+
+ ulonglong prev_insert_id= table->file->next_insert_id;
+ store_record(table, record[1]);
+ if (likely(!res))
+ res= src->save_in_field(table->field[dst_fieldno], true);
+
+ if (likely(!res))
+ res= table->update_generated_fields();
+
+ if(likely(!res))
+ res= table->file->ha_update_row(table->record[1], table->record[0]);
+
+ if (likely(!res) && table->triggers)
+ res= table->triggers->process_triggers(thd, TRG_EVENT_INSERT,
+ TRG_ACTION_AFTER, true);
+ restore_record(table, record[1]);
+ if (res)
+ table->file->restore_auto_increment(prev_insert_id);
+
+ if (likely(!res) && lcond && rcond)
+ res= table->period_make_insert(period_conds.end.item,
+ table->field[table->s->period.start_fieldno]);
+
+ return res;
+}
inline
int TABLE::delete_row()
@@ -282,10 +329,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
bool return_error= 0;
ha_rows deleted= 0;
bool reverse= FALSE;
- bool has_triggers;
+ bool has_triggers= false;
ORDER *order= (ORDER *) ((order_list && order_list->elements) ?
order_list->first : NULL);
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
killed_state killed_status= NOT_KILLED;
THD::enum_binlog_query_type query_type= THD::ROW_QUERY_TYPE;
bool binlog_is_row;
@@ -293,7 +340,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
Explain_delete *explain;
Delete_plan query_plan(thd->mem_root);
Unique * deltempfile= NULL;
- bool delete_record, delete_while_scanning;
+ bool delete_record= false;
+ bool delete_while_scanning;
+ bool portion_of_time_through_update;
DBUG_ENTER("mysql_delete");
query_plan.index= MAX_KEY;
@@ -306,6 +355,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
THD_STAGE_INFO(thd, stage_init_update);
const bool delete_history= table_list->vers_conditions.delete_history;
+ DBUG_ASSERT(!(delete_history && table_list->period_conditions.is_set()));
if (thd->lex->handle_list_of_derived(table_list, DT_MERGE_FOR_INSERT))
DBUG_RETURN(TRUE);
@@ -324,7 +374,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
DBUG_RETURN(TRUE);
}
table->map=1;
- query_plan.select_lex= &thd->lex->select_lex;
+ query_plan.select_lex= thd->lex->first_select_lex();
query_plan.table= table;
query_plan.updating_a_view= MY_TEST(table_list->view);
@@ -361,7 +411,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
setup_order(thd, select_lex->ref_pointer_array, &tables,
fields, all_fields, order))
{
- free_underlaid_joins(thd, &thd->lex->select_lex);
+ free_underlaid_joins(thd, thd->lex->first_select_lex());
DBUG_RETURN(TRUE);
}
}
@@ -403,12 +453,12 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
- there should be no delete triggers associated with the table.
*/
- has_triggers= (table->triggers &&
- table->triggers->has_delete_triggers());
+ has_triggers= table->triggers && table->triggers->has_delete_triggers();
+
if (!with_select && !using_limit && const_cond_result &&
(!thd->is_current_stmt_binlog_format_row() &&
!has_triggers)
- && !table->versioned(VERS_TIMESTAMP))
+ && !table->versioned(VERS_TIMESTAMP) && !table_list->has_period())
{
/* Update the table->file->stats.records number */
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
@@ -578,7 +628,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
*/
if ((table->file->ha_table_flags() & HA_CAN_DIRECT_UPDATE_AND_DELETE) &&
- !has_triggers && !binlog_is_row && !with_select)
+ !has_triggers && !binlog_is_row && !with_select &&
+ !table_list->has_period())
{
table->mark_columns_needed_for_delete();
if (!table->check_virtual_columns_marked_for_read())
@@ -652,7 +703,15 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (unlikely(init_ftfuncs(thd, select_lex, 1)))
goto got_error;
- table->mark_columns_needed_for_delete();
+ if (table_list->has_period())
+ {
+ table->use_all_columns();
+ table->rpl_write_set= table->write_set;
+ }
+ else
+ {
+ table->mark_columns_needed_for_delete();
+ }
if ((table->file->ha_table_flags() & HA_CAN_FORCE_BULK_DELETE) &&
!table->prepare_triggers_for_delete_stmt_or_event())
@@ -709,6 +768,24 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
delete_record= true;
}
+ /*
+ From SQL2016, Part 2, 15.7 <Effect of deleting rows from base table>,
+ General Rules, 8), we can conclude that DELETE FOR PORTTION OF time performs
+ 0-2 INSERTS + DELETE. We can substitute INSERT+DELETE with one UPDATE, with
+ a condition of no side effects. The side effect is possible if there is a
+ BEFORE INSERT trigger, since it is the only one splitting DELETE and INSERT
+ operations.
+ Another possible side effect is related to tables of non-transactional
+ engines, since UPDATE is anyway atomic, and DELETE+INSERT is not.
+
+ This optimization is not possible for system-versioned table.
+ */
+ portion_of_time_through_update=
+ !(table->triggers && table->triggers->has_triggers(TRG_EVENT_INSERT,
+ TRG_ACTION_BEFORE))
+ && !table->versioned()
+ && table->file->has_transactions();
+
THD_STAGE_INFO(thd, stage_updating);
while (likely(!(error=info.read_record())) && likely(!thd->killed) &&
likely(!thd->is_error()))
@@ -732,7 +809,25 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
break;
}
- error= table->delete_row();
+ if (table_list->has_period() && portion_of_time_through_update)
+ {
+ bool need_delete= true;
+ error= update_portion_of_time(thd, table, table_list->period_conditions,
+ &need_delete);
+ if (likely(!error) && need_delete)
+ error= table->delete_row();
+ }
+ else
+ {
+ error= table->delete_row();
+
+ ha_rows rows_inserted;
+ if (likely(!error) && table_list->has_period()
+ && !portion_of_time_through_update)
+ error= table->insert_portion_of_time(thd, table_list->period_conditions,
+ &rows_inserted);
+ }
+
if (likely(!error))
{
deleted++;
@@ -752,7 +847,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
else
{
table->file->print_error(error,
- MYF(thd->lex->ignore ? ME_JUST_WARNING : 0));
+ MYF(thd->lex->ignore ? ME_WARNING : 0));
if (thd->is_error())
{
error= 1;
@@ -782,6 +877,8 @@ terminate_delete:
}
THD_STAGE_INFO(thd, stage_end);
end_read_record(&info);
+ if (table_list->has_period())
+ table->file->ha_release_auto_increment();
if (options & OPTION_QUICK)
(void) table->file->extra(HA_EXTRA_NORMAL);
ANALYZE_STOP_TRACKING(&explain->command_tracker);
@@ -913,14 +1010,16 @@ int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list,
bool *delete_while_scanning)
{
Item *fake_conds= 0;
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
DBUG_ENTER("mysql_prepare_delete");
List<Item> all_fields;
*delete_while_scanning= true;
thd->lex->allow_sum_func.clear_all();
- if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
- &thd->lex->select_lex.top_join_list,
+ if (setup_tables_and_check_access(thd,
+ &thd->lex->first_select_lex()->context,
+ &thd->lex->first_select_lex()->
+ top_join_list,
table_list,
select_lex->leaf_tables, FALSE,
DELETE_ACL, SELECT_ACL, TRUE))
@@ -932,6 +1031,18 @@ int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list,
DBUG_RETURN(true);
}
+ if (table_list->has_period())
+ {
+ if (table_list->is_view_or_derived())
+ {
+ my_error(ER_IT_IS_A_VIEW, MYF(0), table_list->table_name.str);
+ DBUG_RETURN(true);
+ }
+
+ if (select_lex->period_setup_conds(thd, table_list))
+ DBUG_RETURN(true);
+ }
+
DBUG_ASSERT(table_list->table);
// conds could be cached from previous SP call
DBUG_ASSERT(!table_list->vers_conditions.need_setup() ||
@@ -955,7 +1066,13 @@ int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list,
DBUG_RETURN(TRUE);
}
- if (unique_table(thd, table_list, table_list->next_global, 0))
+ /*
+ Application-time periods: if FOR PORTION OF ... syntax used, DELETE
+ statement could issue delete_row's mixed with write_row's. This causes
+ problems for myisam and corrupts table, if deleting while scanning.
+ */
+ if (table_list->has_period()
+ || unique_table(thd, table_list, table_list->next_global, 0))
*delete_while_scanning= false;
if (select_lex->inner_refs_list.elements &&
@@ -1009,18 +1126,20 @@ int mysql_multi_delete_prepare(THD *thd)
lex->query_tables also point on local list of DELETE SELECT_LEX
*/
- if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
- &thd->lex->select_lex.top_join_list,
+ if (setup_tables_and_check_access(thd,
+ &thd->lex->first_select_lex()->context,
+ &thd->lex->first_select_lex()->
+ top_join_list,
lex->query_tables,
- lex->select_lex.leaf_tables, FALSE,
- DELETE_ACL, SELECT_ACL, FALSE))
+ lex->first_select_lex()->leaf_tables,
+ FALSE, DELETE_ACL, SELECT_ACL, FALSE))
DBUG_RETURN(TRUE);
/*
Multi-delete can't be constructed over-union => we always have
single SELECT on top and have to check underlying SELECTs of it
*/
- lex->select_lex.set_unique_exclude();
+ lex->first_select_lex()->set_unique_exclude();
/* Fix tables-to-be-deleted-from list to point at opened tables */
for (target_tbl= (TABLE_LIST*) aux_tables;
target_tbl;
@@ -1068,8 +1187,8 @@ int mysql_multi_delete_prepare(THD *thd)
Reset the exclude flag to false so it doesn't interfare
with further calls to unique_table
*/
- lex->select_lex.exclude_from_table_unique_test= FALSE;
-
+ lex->first_select_lex()->exclude_from_table_unique_test= FALSE;
+
if (lex->save_prep_leaf_tables())
DBUG_RETURN(TRUE);
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 93dc62828ac..a4e0fd6b683 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2002, 2011, Oracle and/or its affiliates.
- Copyright (c) 2010, 2020, MariaDB
+ Copyright (c) 2010, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,25 +25,28 @@
#include "mariadb.h" /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "unireg.h"
-#include "sql_derived.h"
#include "sql_select.h"
+#include "derived_handler.h"
#include "sql_base.h"
#include "sql_view.h" // check_duplicate_names
#include "sql_acl.h" // SELECT_ACL
#include "sql_class.h"
+#include "sql_derived.h"
#include "sql_cte.h"
+#include "my_json_writer.h"
+#include "opt_trace.h"
typedef bool (*dt_processor)(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_init(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_optimize(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived);
-bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived);
-
+static bool mysql_derived_init(THD *thd, LEX *lex, TABLE_LIST *derived);
+static bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived);
+static bool mysql_derived_optimize(THD *thd, LEX *lex, TABLE_LIST *derived);
+static bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived);
+static bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived);
+static bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived);
+static bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived);
+static bool mysql_derived_merge_for_insert(THD *thd, LEX *lex,
+ TABLE_LIST *derived);
dt_processor processors[]=
{
@@ -97,7 +100,8 @@ mysql_handle_derived(LEX *lex, uint phases)
processed normally.
*/
if (phases == DT_MERGE_FOR_INSERT &&
- cursor && cursor->top_table()->select_lex != &lex->select_lex)
+ cursor && (cursor->top_table()->select_lex !=
+ lex->first_select_lex()))
continue;
for (;
cursor && !res;
@@ -175,7 +179,10 @@ mysql_handle_single_derived(LEX *lex, TABLE_LIST *derived, uint phases)
if (!lex->derived_tables)
DBUG_RETURN(FALSE);
- derived->select_lex->changed_elements|= TOUCHED_SEL_DERIVED;
+ if (derived->select_lex)
+ derived->select_lex->changed_elements|= TOUCHED_SEL_DERIVED;
+ else
+ DBUG_ASSERT(derived->prelocking_placeholder);
lex->thd->derived_tables_processing= TRUE;
for (uint phase= 0; phase < DT_PHASES; phase++)
@@ -193,6 +200,7 @@ mysql_handle_single_derived(LEX *lex, TABLE_LIST *derived, uint phases)
if ((res= (*processors[phase])(lex->thd, lex, derived)))
break;
}
+
lex->thd->derived_tables_processing= FALSE;
DBUG_RETURN(res);
}
@@ -321,6 +329,7 @@ mysql_handle_single_derived(LEX *lex, TABLE_LIST *derived, uint phases)
@return TRUE if an error occur.
*/
+static
bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived)
{
bool res= FALSE;
@@ -333,6 +342,7 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived)
DBUG_PRINT("enter", ("Alias: '%s' Unit: %p",
(derived->alias.str ? derived->alias.str : "<NULL>"),
derived->get_unit()));
+ const char *cause= NULL;
if (derived->merged)
{
@@ -344,6 +354,23 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived)
if (dt_select->uncacheable & UNCACHEABLE_RAND)
{
/* There is random function => fall back to materialization. */
+ cause= "Random function in the select";
+ if (unlikely(thd->trace_started()))
+ {
+ OPT_TRACE_VIEWS_TRANSFORM(thd, trace_wrapper, trace_derived,
+ derived->is_derived() ? "derived" : "view",
+ derived->alias.str ? derived->alias.str : "<NULL>",
+ derived->get_unit()->first_select()->select_number,
+ "materialized");
+ trace_derived.add("cause", cause);
+ }
+ derived->change_refs_to_fields();
+ derived->set_materialized_derived();
+ DBUG_RETURN(FALSE);
+ }
+
+ if (derived->dt_handler)
+ {
derived->change_refs_to_fields();
derived->set_materialized_derived();
DBUG_RETURN(FALSE);
@@ -362,15 +389,11 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived)
and small subqueries, and the bigger one can't be merged it wouldn't
block the smaller one.
*/
- if (parent_lex->get_free_table_map(&map, &tablenr))
- {
- /* There is no enough table bits, fall back to materialization. */
- goto unconditional_materialization;
- }
-
- if (dt_select->leaf_tables.elements + tablenr > MAX_TABLES)
+ if (parent_lex->get_free_table_map(&map, &tablenr) ||
+ dt_select->leaf_tables.elements + tablenr > MAX_TABLES)
{
/* There is no enough table bits, fall back to materialization. */
+ cause= "Not enough table bits to merge subquery";
goto unconditional_materialization;
}
@@ -448,6 +471,17 @@ exit_merge:
DBUG_RETURN(res);
unconditional_materialization:
+
+ if (unlikely(thd->trace_started()))
+ {
+ OPT_TRACE_VIEWS_TRANSFORM(thd,trace_wrapper, trace_derived,
+ derived->is_derived() ? "derived" : "view",
+ derived->alias.str ? derived->alias.str : "<NULL>",
+ derived->get_unit()->first_select()->select_number,
+ "materialized");
+ trace_derived.add("cause", cause);
+ }
+
derived->change_refs_to_fields();
derived->set_materialized_derived();
if (!derived->table || !derived->table->is_created())
@@ -475,6 +509,7 @@ unconditional_materialization:
@return TRUE if an error occur.
*/
+static
bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived)
{
DBUG_ENTER("mysql_derived_merge_for_insert");
@@ -531,7 +566,7 @@ bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived)
true Error
*/
-
+static
bool mysql_derived_init(THD *thd, LEX *lex, TABLE_LIST *derived)
{
SELECT_LEX_UNIT *unit= derived->get_unit();
@@ -552,7 +587,7 @@ bool mysql_derived_init(THD *thd, LEX *lex, TABLE_LIST *derived)
}
-/*
+/**
@brief
Prevent name resolution out of context of ON expressions in derived tables
@@ -634,7 +669,7 @@ static void nullify_outer_context_for_on_clauses(List<TABLE_LIST>& join_list)
true Error
*/
-
+static
bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
{
SELECT_LEX_UNIT *unit= derived->get_unit();
@@ -642,7 +677,6 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
DBUG_ENTER("mysql_derived_prepare");
DBUG_PRINT("enter", ("unit: %p table_list: %p alias: '%s'",
unit, derived, derived->alias.str));
-
if (!unit)
DBUG_RETURN(FALSE);
@@ -772,6 +806,18 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
}
}
+ if (unlikely(thd->trace_started()))
+ {
+ /*
+ Add to optimizer trace whether a derived table/view
+ is merged into the parent select or not.
+ */
+ OPT_TRACE_VIEWS_TRANSFORM(thd, trace_wrapper, trace_derived,
+ derived->is_derived() ? "derived" : "view",
+ derived->alias.str ? derived->alias.str : "<NULL>",
+ derived->get_unit()->first_select()->select_number,
+ derived->is_merged_derived() ? "merged" : "materialized");
+ }
/*
Above cascade call of prepare is important for PS protocol, but after it
is called we can check if we really need prepare for this derived
@@ -838,6 +884,24 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
if (derived->is_derived() && derived->is_merged_derived())
first_select->mark_as_belong_to_derived(derived);
+ derived->dt_handler= derived->find_derived_handler(thd);
+ if (derived->dt_handler)
+ {
+ char query_buff[4096];
+ String derived_query(query_buff, sizeof(query_buff), thd->charset());
+ derived_query.length(0);
+ derived->derived->print(&derived_query,
+ enum_query_type(QT_VIEW_INTERNAL |
+ QT_ITEM_ORIGINAL_FUNC_NULLIF |
+ QT_PARSABLE));
+ if (!thd->make_lex_string(&derived->derived_spec,
+ derived_query.ptr(), derived_query.length()))
+ {
+ delete derived->dt_handler;
+ derived->dt_handler= NULL;
+ }
+ }
+
exit:
/* Hide "Unknown column" or "Unknown function" error */
if (derived->view)
@@ -914,6 +978,7 @@ exit:
@return TRUE if an error occur.
*/
+static
bool mysql_derived_optimize(THD *thd, LEX *lex, TABLE_LIST *derived)
{
SELECT_LEX_UNIT *unit= derived->get_unit();
@@ -930,6 +995,18 @@ bool mysql_derived_optimize(THD *thd, LEX *lex, TABLE_LIST *derived)
DBUG_RETURN(FALSE);
}
+ if (derived->is_materialized_derived() && derived->dt_handler)
+ {
+ /* Create an object for execution of the query specifying the table */
+ if (!(derived->pushdown_derived=
+ new (thd->mem_root) Pushdown_derived(derived, derived->dt_handler)))
+ {
+ delete derived->dt_handler;
+ derived->dt_handler= NULL;
+ DBUG_RETURN(TRUE);
+ }
+ }
+
lex->current_select= first_select;
if (unit->is_unit_op())
@@ -958,6 +1035,15 @@ bool mysql_derived_optimize(THD *thd, LEX *lex, TABLE_LIST *derived)
if (unit->optimized)
DBUG_RETURN(FALSE);
unit->optimized= TRUE;
+ if (!join)
+ {
+ /*
+ This happens when derived is used in SELECT for which
+ zer_result_cause != 0.
+ In this case join is already destroyed.
+ */
+ DBUG_RETURN(FALSE);
+ }
}
if ((res= join->optimize()))
goto err;
@@ -1004,6 +1090,7 @@ err:
@return TRUE if an error occur.
*/
+static
bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
{
DBUG_ENTER("mysql_derived_create");
@@ -1114,7 +1201,7 @@ bool TABLE_LIST::fill_recursive(THD *thd)
@return TRUE Error
*/
-
+static
bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
{
Field_iterator_table field_iterator;
@@ -1134,6 +1221,18 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
select_unit *derived_result= derived->derived_result;
SELECT_LEX *save_current_select= lex->current_select;
+ if (derived->pushdown_derived)
+ {
+ int res;
+ if (unit->executed)
+ DBUG_RETURN(FALSE);
+ /* Execute the query that specifies the derived table by a foreign engine */
+ res= derived->pushdown_derived->execute();
+ unit->executed= true;
+ delete derived->pushdown_derived;
+ DBUG_RETURN(res);
+ }
+
if (unit->executed && !derived_is_recursive &&
(unit->uncacheable & UNCACHEABLE_DEPENDENT))
{
@@ -1163,7 +1262,7 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
res= derived->fill_recursive(thd);
}
}
- else if (unit->is_unit_op() || unit->fake_select_lex)
+ else if (unit->is_unit_op())
{
// execute union without clean up
res= unit->exec();
@@ -1241,6 +1340,7 @@ err:
@return TRUE Error
*/
+static
bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
{
DBUG_ENTER("mysql_derived_reinit");
@@ -1254,11 +1354,6 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
unit->types.empty();
/* for derived tables & PS (which can't be reset by Item_subselect) */
unit->reinit_exec_mechanism();
- for (st_select_lex *sl= unit->first_select(); sl; sl= sl->next_select())
- {
- sl->cond_pushed_into_where= NULL;
- sl->cond_pushed_into_having= NULL;
- }
unit->set_thd(thd);
DBUG_RETURN(FALSE);
}
@@ -1283,7 +1378,6 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
Converted condition, or NULL if nothing could be converted
*/
-static
Item *transform_condition_or_part(THD *thd,
Item *cond,
Item_transformer transformer,
@@ -1328,25 +1422,61 @@ Item *transform_condition_or_part(THD *thd,
/**
@brief
- Extract the condition depended on derived table/view and pushed it there
+ Extract condition that can be pushed into a derived table/view
- @param thd The thread handle
- @param cond The condition from which to extract the pushed condition
- @param derived The reference to the derived table/view
+ @param thd the thread handle
+ @param cond current condition
+ @param derived the reference to the derived table/view
@details
- This functiom builds the most restrictive condition depending only on
- the derived table/view that can be extracted from the condition cond.
- The built condition is pushed into the having clauses of the
- selects contained in the query specifying the derived table/view.
- The function also checks for each select whether any condition depending
- only on grouping fields can be extracted from the pushed condition.
- If so, it pushes the condition over grouping fields into the where
- clause of the select.
-
- @retval
- true if an error is reported
- false otherwise
+ This function builds the most restrictive condition depending only on
+ the derived table/view (directly or indirectly through equality) that
+ can be extracted from the given condition cond and pushes it into the
+ derived table/view.
+
+ Example of the transformation:
+
+ SELECT *
+ FROM t1,
+ (
+ SELECT x,MAX(y) AS max_y
+ FROM t2
+ GROUP BY x
+ ) AS d_tab
+ WHERE d_tab.x>1 AND d_tab.max_y<30;
+
+ =>
+
+ SELECT *
+ FROM t1,
+ (
+ SELECT x,z,MAX(y) AS max_y
+ FROM t2
+ WHERE x>1
+ HAVING max_y<30
+ GROUP BY x
+ ) AS d_tab
+ WHERE d_tab.x>1 AND d_tab.max_y<30;
+
+ In details:
+ 1. Check what pushable formula can be extracted from cond
+ 2. Build a clone PC of the formula that can be extracted
+ (the clone is built only if the extracted formula is a AND subformula
+ of cond or conjunction of such subformulas)
+ Do for every select specifying derived table/view:
+ 3. If there is no HAVING clause prepare PC to be conjuncted with
+ WHERE clause of the select. Otherwise do 4-7.
+ 4. Check what formula PC_where can be extracted from PC to be pushed
+ into the WHERE clause of the select
+ 5. Build PC_where and if PC_where is a conjunct(s) of PC remove it from PC
+ getting PC_having
+ 6. Prepare PC_where to be conjuncted with the WHERE clause of the select
+ 7. Prepare PC_having to be conjuncted with the HAVING clause of the select
+ @note
+ This method is similar to pushdown_cond_for_in_subquery()
+
+ @retval TRUE if an error occurs
+ @retval FALSE otherwise
*/
bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
@@ -1387,63 +1517,27 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
if (!some_select_allows_cond_pushdown)
DBUG_RETURN(false);
- /*
- Build the most restrictive condition extractable from 'cond'
- that can be pushed into the derived table 'derived'.
- All subexpressions of this condition are cloned from the
- subexpressions of 'cond'.
- This condition has to be fixed yet.
- */
+ /* 1. Check what pushable formula can be extracted from cond */
Item *extracted_cond;
- derived->check_pushable_cond_for_table(cond);
- extracted_cond= derived->build_pushable_cond_for_table(thd, cond);
+ cond->check_pushable_cond(&Item::pushable_cond_checker_for_derived,
+ (uchar *)(&derived->table->map));
+ /* 2. Build a clone PC of the formula that can be extracted */
+ extracted_cond=
+ cond->build_pushable_cond(thd,
+ &Item::pushable_equality_checker_for_derived,
+ ((uchar *)&derived->table->map));
if (!extracted_cond)
{
/* Nothing can be pushed into the derived table */
DBUG_RETURN(false);
}
- /* Push extracted_cond into every select of the unit specifying 'derived' */
+
st_select_lex *save_curr_select= thd->lex->current_select;
for (; sl; sl= sl->next_select())
{
Item *extracted_cond_copy;
if (!sl->cond_pushdown_is_allowed())
continue;
- thd->lex->current_select= sl;
- if (sl->have_window_funcs())
- {
- if (sl->join->group_list || sl->join->implicit_grouping)
- continue;
- ORDER *common_partition_fields=
- sl->find_common_window_func_partition_fields(thd);
- if (!common_partition_fields)
- continue;
- extracted_cond_copy= !sl->next_select() ?
- extracted_cond :
- extracted_cond->build_clone(thd);
- if (!extracted_cond_copy)
- continue;
-
- Item *cond_over_partition_fields;;
- sl->collect_grouping_fields(thd, common_partition_fields);
- sl->check_cond_extraction_for_grouping_fields(extracted_cond_copy,
- derived);
- cond_over_partition_fields=
- sl->build_cond_for_grouping_fields(thd, extracted_cond_copy, true);
- if (cond_over_partition_fields)
- cond_over_partition_fields= cond_over_partition_fields->transform(thd,
- &Item::derived_grouping_field_transformer_for_where,
- (uchar*) sl);
- if (cond_over_partition_fields)
- {
- cond_over_partition_fields->walk(
- &Item::cleanup_excluding_const_fields_processor, 0, 0);
- sl->cond_pushed_into_where= cond_over_partition_fields;
- }
-
- continue;
- }
-
/*
For each select of the unit except the last one
create a clone of extracted_cond
@@ -1454,63 +1548,6 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
if (!extracted_cond_copy)
continue;
- if (!sl->join->group_list && !sl->with_sum_func)
- {
- /* extracted_cond_copy is pushed into where of sl */
- extracted_cond_copy=
- transform_condition_or_part(thd,
- extracted_cond_copy,
- &Item::derived_field_transformer_for_where,
- (uchar*)sl);
- if (extracted_cond_copy)
- {
- extracted_cond_copy->walk(
- &Item::cleanup_excluding_const_fields_processor, 0, 0);
- sl->cond_pushed_into_where= extracted_cond_copy;
- }
-
- continue;
- }
-
- /*
- Figure out what can be extracted from the pushed condition
- that could be pushed into the where clause of sl
- */
- Item *cond_over_grouping_fields;
- sl->collect_grouping_fields(thd, sl->join->group_list);
- sl->check_cond_extraction_for_grouping_fields(extracted_cond_copy,
- derived);
- cond_over_grouping_fields=
- sl->build_cond_for_grouping_fields(thd, extracted_cond_copy, true);
-
- /*
- Transform the references to the 'derived' columns from the condition
- pushed into the where clause of sl to make them usable in the new context
- */
- if (cond_over_grouping_fields)
- {
- cond_over_grouping_fields=
- transform_condition_or_part(thd, cond_over_grouping_fields,
- &Item::derived_grouping_field_transformer_for_where,
- (uchar*) sl);
- }
-
- if (cond_over_grouping_fields)
- {
- /*
- In extracted_cond_copy remove top conjuncts that
- has been pushed into the where clause of sl
- */
- extracted_cond_copy= remove_pushed_top_conjuncts(thd, extracted_cond_copy);
-
- cond_over_grouping_fields->walk(
- &Item::cleanup_excluding_const_fields_processor, 0, 0);
- sl->cond_pushed_into_where= cond_over_grouping_fields;
-
- if (!extracted_cond_copy)
- continue;
- }
-
/*
Rename the columns of all non-first selects of a union to be compatible
by names with the columns of the first select. It will allow to use copies
@@ -1521,27 +1558,115 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
DBUG_ASSERT(sl->item_list.elements == first_sl->item_list.elements);
List_iterator_fast<Item> it(sl->item_list);
List_iterator_fast<Item> nm_it(unit->types);
- Item * item;
- while((item= it++))
- {
+ while (Item *item= it++)
item->share_name_with(nm_it++);
- }
}
+ /* Collect fields that are used in the GROUP BY of sl */
+ if (sl->have_window_funcs())
+ {
+ if (sl->group_list.first || sl->join->implicit_grouping)
+ continue;
+ ORDER *common_partition_fields=
+ sl->find_common_window_func_partition_fields(thd);
+ if (!common_partition_fields)
+ continue;
+ sl->collect_grouping_fields_for_derived(thd, common_partition_fields);
+ }
+ else
+ sl->collect_grouping_fields_for_derived(thd, sl->group_list.first);
+
+ Item *remaining_cond= NULL;
+ /* Do 4-6 */
+ sl->pushdown_cond_into_where_clause(thd, extracted_cond_copy,
+ &remaining_cond,
+ &Item::derived_field_transformer_for_where,
+ (uchar *) sl);
+
+ if (!remaining_cond)
+ continue;
/*
- Transform the references to the 'derived' columns from the condition
- pushed into the having clause of sl to make them usable in the new context
+ 7. Prepare PC_having to be conjuncted with the HAVING clause of
+ the select
*/
- extracted_cond_copy= extracted_cond_copy->transform(thd,
- &Item::derived_field_transformer_for_having,
- (uchar*) sl);
- if (!extracted_cond_copy)
+ remaining_cond=
+ remaining_cond->transform(thd,
+ &Item::derived_field_transformer_for_having,
+ (uchar *) sl);
+ if (!remaining_cond)
continue;
- extracted_cond_copy->walk(&Item::cleanup_excluding_const_fields_processor,
- 0, 0);
- sl->cond_pushed_into_having= extracted_cond_copy;
+ if (remaining_cond->walk(&Item::cleanup_excluding_const_fields_processor,
+ 0, 0))
+ continue;
+
+ mark_or_conds_to_avoid_pushdown(remaining_cond);
+
+ sl->cond_pushed_into_having= remaining_cond;
}
thd->lex->current_select= save_curr_select;
DBUG_RETURN(false);
}
+
+
+/**
+ @brief
+ Look for provision of the derived_handler interface by a foreign engine
+
+ @param thd The thread handler
+
+ @details
+ The function looks through its tables of the query that specifies this
+ derived table searching for a table whose handlerton owns a
+ create_derived call-back function. If the call of this function returns
+ a derived_handler interface object then the server will push the query
+ specifying the derived table into this engine.
+ This is a responsibility of the create_derived call-back function to
+ check whether the engine can execute the query.
+
+ @retval the found derived_handler if the search is successful
+ 0 otherwise
+*/
+
+derived_handler *TABLE_LIST::find_derived_handler(THD *thd)
+{
+ if (!derived || is_recursive_with_table())
+ return 0;
+ for (SELECT_LEX *sl= derived->first_select(); sl; sl= sl->next_select())
+ {
+ if (!(sl->join))
+ continue;
+ for (TABLE_LIST *tbl= sl->join->tables_list; tbl; tbl= tbl->next_local)
+ {
+ if (!tbl->table)
+ continue;
+ handlerton *ht= tbl->table->file->partition_ht();
+ if (!ht->create_derived)
+ continue;
+ derived_handler *dh= ht->create_derived(thd, this);
+ if (dh)
+ {
+ dh->set_derived(this);
+ return dh;
+ }
+ }
+ }
+ return 0;
+}
+
+
+TABLE_LIST *TABLE_LIST::get_first_table()
+{
+ for (SELECT_LEX *sl= derived->first_select(); sl; sl= sl->next_select())
+ {
+ if (!(sl->join))
+ continue;
+ for (TABLE_LIST *tbl= sl->join->tables_list; tbl; tbl= tbl->next_local)
+ {
+ if (!tbl->table)
+ continue;
+ return tbl;
+ }
+ }
+ return 0;
+}
diff --git a/sql/sql_derived.h b/sql/sql_derived.h
index 093191e62a7..6100b4b4d7e 100644
--- a/sql/sql_derived.h
+++ b/sql/sql_derived.h
@@ -22,7 +22,11 @@ struct LEX;
bool mysql_handle_derived(LEX *lex, uint phases);
bool mysql_handle_single_derived(LEX *lex, TABLE_LIST *derived, uint phases);
-bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived);
+
+Item *transform_condition_or_part(THD *thd,
+ Item *cond,
+ Item_transformer transformer,
+ uchar *arg);
bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived);
diff --git a/sql/sql_do.cc b/sql/sql_do.cc
index eab0e57b1d2..5a7bca2774c 100644
--- a/sql/sql_do.cc
+++ b/sql/sql_do.cc
@@ -33,7 +33,7 @@ bool mysql_do(THD *thd, List<Item> &values)
DBUG_RETURN(TRUE);
while ((value = li++))
(void) value->is_null();
- free_underlaid_joins(thd, &thd->lex->select_lex);
+ free_underlaid_joins(thd, thd->lex->first_select_lex());
if (unlikely(thd->is_error()))
{
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index da6a12137f7..a11a0f454a2 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -781,7 +781,7 @@ bool mysqld_show_warnings(THD *thd, ulong levels_to_show)
List<Item> field_list;
MEM_ROOT *mem_root= thd->mem_root;
const Sql_condition *err;
- SELECT_LEX *sel= &thd->lex->select_lex;
+ SELECT_LEX *sel= thd->lex->first_select_lex();
SELECT_LEX_UNIT *unit= &thd->lex->unit;
ulonglong idx= 0;
Protocol *protocol=thd->protocol;
diff --git a/sql/sql_error.h b/sql/sql_error.h
index ec52724b6da..12926d7209f 100644
--- a/sql/sql_error.h
+++ b/sql/sql_error.h
@@ -821,11 +821,48 @@ private:
extern char *err_conv(char *buff, uint to_length, const char *from,
uint from_length, CHARSET_INFO *from_cs);
-class ErrConv
+class ErrBuff
{
protected:
mutable char err_buffer[MYSQL_ERRMSG_SIZE];
public:
+ ErrBuff()
+ {
+ err_buffer[0]= '\0';
+ }
+ const char *ptr() const { return err_buffer; }
+ const char *set_longlong(const Longlong_hybrid &nr) const
+ {
+ return nr.is_unsigned() ? ullstr(nr.value(), err_buffer) :
+ llstr(nr.value(), err_buffer);
+ }
+ const char *set_double(double nr) const
+ {
+ my_gcvt(nr, MY_GCVT_ARG_DOUBLE, sizeof(err_buffer), err_buffer, 0);
+ return err_buffer;
+ }
+ const char *set_decimal(const decimal_t *d) const
+ {
+ int len= sizeof(err_buffer);
+ decimal2string(d, err_buffer, &len, 0, 0, ' ');
+ return err_buffer;
+ }
+ const char *set_str(const char *str, size_t len, CHARSET_INFO *cs) const
+ {
+ DBUG_ASSERT(len < UINT_MAX32);
+ return err_conv(err_buffer, (uint) sizeof(err_buffer), str, (uint) len, cs);
+ }
+ const char *set_mysql_time(const MYSQL_TIME *ltime) const
+ {
+ my_TIME_to_str(ltime, err_buffer, AUTO_SEC_PART_DIGITS);
+ return err_buffer;
+ }
+};
+
+
+class ErrConv: public ErrBuff
+{
+public:
ErrConv() {}
virtual ~ErrConv() {}
virtual const char *ptr() const = 0;
@@ -845,20 +882,18 @@ public:
: ErrConv(), str(s->ptr()), len(s->length()), cs(s->charset()) {}
const char *ptr() const
{
- DBUG_ASSERT(len < UINT_MAX32);
- return err_conv(err_buffer, (uint) sizeof(err_buffer), str, (uint) len, cs);
+ return set_str(str, len, cs);
}
};
class ErrConvInteger : public ErrConv, public Longlong_hybrid
{
public:
- ErrConvInteger(longlong num_arg, bool unsigned_flag= false) :
- ErrConv(), Longlong_hybrid(num_arg, unsigned_flag) {}
+ ErrConvInteger(const Longlong_hybrid &nr)
+ : ErrConv(), Longlong_hybrid(nr) { }
const char *ptr() const
{
- return m_unsigned ? ullstr(m_value, err_buffer) :
- llstr(m_value, err_buffer);
+ return set_longlong(static_cast<Longlong_hybrid>(*this));
}
};
@@ -869,8 +904,7 @@ public:
ErrConvDouble(double num_arg) : ErrConv(), num(num_arg) {}
const char *ptr() const
{
- my_gcvt(num, MY_GCVT_ARG_DOUBLE, sizeof(err_buffer), err_buffer, 0);
- return err_buffer;
+ return set_double(num);
}
};
@@ -881,8 +915,7 @@ public:
ErrConvTime(const MYSQL_TIME *ltime_arg) : ErrConv(), ltime(ltime_arg) {}
const char *ptr() const
{
- my_TIME_to_str(ltime, err_buffer, AUTO_SEC_PART_DIGITS);
- return err_buffer;
+ return set_mysql_time(ltime);
}
};
@@ -893,9 +926,7 @@ public:
ErrConvDecimal(const decimal_t *d_arg) : ErrConv(), d(d_arg) {}
const char *ptr() const
{
- int len= sizeof(err_buffer);
- decimal2string(d, err_buffer, &len, 0, 0, ' ');
- return err_buffer;
+ return set_decimal(d);
}
};
diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc
index 8690a4a38bb..860e840f34e 100644
--- a/sql/sql_explain.cc
+++ b/sql/sql_explain.cc
@@ -34,6 +34,9 @@ const char *unit_operation_text[4]=
"UNIT RESULT","UNION RESULT","INTERSECT RESULT","EXCEPT RESULT"
};
+const char *pushed_derived_text= "PUSHED DERIVED";
+const char *pushed_select_text= "PUSHED SELECT";
+
static void write_item(Json_writer *writer, Item *item);
static void append_item_to_str(String *out, Item *item);
@@ -233,7 +236,7 @@ void Explain_query::print_explain_json(select_result_sink *output,
CHARSET_INFO *cs= system_charset_info;
List<Item> item_list;
- String *buf= &writer.output;
+ const String *buf= writer.output.get_string();
item_list.push_back(new (thd->mem_root)
Item_string(thd, buf->ptr(), buf->length(), cs),
thd->mem_root);
@@ -334,6 +337,9 @@ int print_explain_row(select_result_sink *result,
List<Item> item_list;
Item *item;
+ if (!select_type[0])
+ return 0;
+
item_list.push_back(new (mem_root) Item_int(thd, (int32) select_number),
mem_root);
item_list.push_back(new (mem_root) Item_string_sys(thd, select_type),
@@ -380,21 +386,31 @@ int print_explain_row(select_result_sink *result,
item_list.push_back(item, mem_root);
/* 'rows' */
+ StringBuffer<64> rows_str;
if (rows)
{
+ rows_str.append_ulonglong((ulonglong)(*rows));
item_list.push_back(new (mem_root)
- Item_int(thd, *rows, MY_INT64_NUM_DECIMAL_DIGITS),
- mem_root);
+ Item_string_sys(thd, rows_str.ptr(),
+ rows_str.length()), mem_root);
}
else
item_list.push_back(item_null, mem_root);
/* 'r_rows' */
+ StringBuffer<64> r_rows_str;
if (is_analyze)
{
if (r_rows)
- item_list.push_back(new (mem_root) Item_float(thd, *r_rows, 2),
- mem_root);
+ {
+ Item_float *fl= new (mem_root) Item_float(thd, *r_rows, 2);
+ String tmp;
+ String *res= fl->val_str(&tmp);
+ r_rows_str.append(res->ptr());
+ item_list.push_back(new (mem_root)
+ Item_string_sys(thd, r_rows_str.ptr(),
+ r_rows_str.length()), mem_root);
+ }
else
item_list.push_back(item_null, mem_root);
}
@@ -529,10 +545,17 @@ int Explain_union::print_explain(Explain_query *query,
item_list.push_back(item_null, mem_root);
/* `r_rows` */
+ StringBuffer<64> r_rows_str;
if (is_analyze)
{
double avg_rows= fake_select_lex_tracker.get_avg_rows();
- item_list.push_back(new (mem_root) Item_float(thd, avg_rows, 2), mem_root);
+ Item_float *fl= new (mem_root) Item_float(thd, avg_rows, 2);
+ String tmp;
+ String *res= fl->val_str(&tmp);
+ r_rows_str.append(res->ptr());
+ item_list.push_back(new (mem_root)
+ Item_string_sys(thd, r_rows_str.ptr(),
+ r_rows_str.length()), mem_root);
}
/* `filtered` */
@@ -750,7 +773,15 @@ int Explain_select::print_explain(Explain_query *query,
THD *thd= output->thd;
MEM_ROOT *mem_root= thd->mem_root;
- if (message)
+ if (select_type == pushed_derived_text || select_type == pushed_select_text)
+ {
+ print_explain_message_line(output, explain_flags, is_analyze,
+ select_id /*select number*/,
+ select_type,
+ NULL, /* rows */
+ NULL);
+ }
+ else if (message)
{
List<Item> item_list;
Item *item_null= new (mem_root) Item_null(thd);
@@ -873,14 +904,20 @@ void Explain_select::print_explain_json(Explain_query *query,
bool started_cache= print_explain_json_cache(writer, is_analyze);
- if (message)
+ if (message ||
+ select_type == pushed_derived_text ||
+ select_type == pushed_select_text)
{
writer->add_member("query_block").start_object();
writer->add_member("select_id").add_ll(select_id);
add_linkage(writer);
writer->add_member("table").start_object();
- writer->add_member("message").add_str(message);
+ writer->add_member("message").add_str(select_type == pushed_derived_text ?
+ "Pushed derived" :
+ select_type == pushed_select_text ?
+ "Pushed select" :
+ message);
writer->end_object();
print_explain_json_for_children(query, writer, is_analyze);
@@ -1122,12 +1159,14 @@ void Explain_table_access::fill_key_str(String *key_str, bool is_json) const
- this is just used key length for ref/range
- for index_merge, it is a comma-separated list of lengths.
- for hash join, it is key_len:pseudo_key_len
+ - [tabular form only] rowid filter length is added after "|".
- The column looks identical in tabular and json forms. In JSON, we consider
- the column legacy, it is superceded by used_key_parts.
+ In JSON, we consider this column to be legacy, it is superceded by
+ used_key_parts.
*/
-void Explain_table_access::fill_key_len_str(String *key_len_str) const
+void Explain_table_access::fill_key_len_str(String *key_len_str,
+ bool is_json) const
{
bool is_hj= (type == JT_HASH || type == JT_HASH_NEXT ||
type == JT_HASH_RANGE || type == JT_HASH_INDEX_MERGE);
@@ -1155,6 +1194,14 @@ void Explain_table_access::fill_key_len_str(String *key_len_str) const
length= longlong10_to_str(hash_next_key.get_key_len(), buf, 10) - buf;
key_len_str->append(buf, length);
}
+
+ if (!is_json && rowid_filter)
+ {
+ key_len_str->append('|');
+ StringBuffer<64> filter_key_len;
+ rowid_filter->quick->print_key_len(&filter_key_len);
+ key_len_str->append(filter_key_len);
+ }
}
@@ -1240,7 +1287,18 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
}
/* `type` column */
- push_str(thd, &item_list, join_type_str[type]);
+ StringBuffer<64> join_type_buf;
+ if (rowid_filter == NULL)
+ push_str(thd, &item_list, join_type_str[type]);
+ else
+ {
+ join_type_buf.append(join_type_str[type]);
+ join_type_buf.append("|filter");
+ item_list.push_back(new (mem_root)
+ Item_string_sys(thd, join_type_buf.ptr(),
+ join_type_buf.length()),
+ mem_root);
+ }
/* `possible_keys` column */
StringBuffer<64> possible_keys_buf;
@@ -1252,6 +1310,14 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
/* `key` */
StringBuffer<64> key_str;
fill_key_str(&key_str, false);
+
+ if (rowid_filter)
+ {
+ key_str.append("|");
+ StringBuffer<64> rowid_key_str;
+ rowid_filter->quick->print_key(&rowid_key_str);
+ key_str.append(rowid_key_str);
+ }
if (key_str.length() > 0)
push_string(thd, &item_list, &key_str);
@@ -1260,7 +1326,7 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
/* `key_len` */
StringBuffer<64> key_len_str;
- fill_key_len_str(&key_len_str);
+ fill_key_len_str(&key_len_str, false);
if (key_len_str.length() > 0)
push_string(thd, &item_list, &key_len_str);
@@ -1283,17 +1349,27 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
push_string_list(thd, &item_list, ref_list, &ref_list_buf);
/* `rows` */
+ StringBuffer<64> rows_str;
if (rows_set)
{
+ rows_str.append_ulonglong((ulonglong)rows);
+
+ if (rowid_filter)
+ {
+ rows_str.append(" (");
+ rows_str.append_ulonglong((ulonglong) (round(rowid_filter->selectivity *
+ 100.0)));
+ rows_str.append("%)");
+ }
item_list.push_back(new (mem_root)
- Item_int(thd, (ulonglong) rows,
- MY_INT64_NUM_DECIMAL_DIGITS),
- mem_root);
+ Item_string_sys(thd, rows_str.ptr(),
+ rows_str.length()), mem_root);
}
else
item_list.push_back(item_null, mem_root);
/* `r_rows` */
+ StringBuffer<64> r_rows_str;
if (is_analyze)
{
if (!tracker.has_scans())
@@ -1303,8 +1379,20 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
else
{
double avg_rows= tracker.get_avg_rows();
- item_list.push_back(new (mem_root) Item_float(thd, avg_rows, 2),
- mem_root);
+ Item_float *fl= new (mem_root) Item_float(thd, avg_rows, 2);
+ String tmp;
+ String *res= fl->val_str(&tmp);
+ r_rows_str.append(res->ptr());
+ if (rowid_filter)
+ {
+ r_rows_str.append(" (");
+ r_rows_str.append_ulonglong(
+ (ulonglong) (rowid_filter->tracker->get_r_selectivity_pct() * 100.0));
+ r_rows_str.append("%)");
+ }
+ item_list.push_back(new (mem_root)
+ Item_string_sys(thd, r_rows_str.ptr(),
+ r_rows_str.length()), mem_root);
}
}
@@ -1368,6 +1456,15 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
extra_buf.append(STRING_WITH_LEN("Using filesort"));
}
+ if (rowid_filter)
+ {
+ if (first)
+ first= false;
+ else
+ extra_buf.append(STRING_WITH_LEN("; "));
+ extra_buf.append(STRING_WITH_LEN("Using rowid filter"));
+ }
+
item_list.push_back(new (mem_root)
Item_string_sys(thd, extra_buf.ptr(),
extra_buf.length()),
@@ -1556,6 +1653,29 @@ void add_json_keyset(Json_writer *writer, const char *elem_name,
}
+void Explain_rowid_filter::print_explain_json(Explain_query *query,
+ Json_writer *writer,
+ bool is_analyze)
+{
+ Json_writer_nesting_guard guard(writer);
+ writer->add_member("rowid_filter").start_object();
+ quick->print_json(writer);
+ writer->add_member("rows").add_ll(rows);
+ writer->add_member("selectivity_pct").add_double(selectivity * 100.0);
+ if (is_analyze)
+ {
+ writer->add_member("r_rows").add_double(tracker->get_container_elements());
+ writer->add_member("r_selectivity_pct").
+ add_double(tracker->get_r_selectivity_pct() * 100.0);
+ writer->add_member("r_buffer_size").
+ add_double((double) (tracker->get_container_buff_size()));
+ writer->add_member("r_filling_time_ms").
+ add_double(tracker->get_time_fill_container_ms());
+ }
+ writer->end_object(); // rowid_filter
+}
+
+
void Explain_table_access::print_explain_json(Explain_query *query,
Json_writer *writer,
bool is_analyze)
@@ -1628,7 +1748,7 @@ void Explain_table_access::print_explain_json(Explain_query *query,
/* `key_length` */
StringBuffer<64> key_len_str;
- fill_key_len_str(&key_len_str);
+ fill_key_len_str(&key_len_str, true);
if (key_len_str.length())
writer->add_member("key_length").add_str(key_len_str);
@@ -1653,6 +1773,11 @@ void Explain_table_access::print_explain_json(Explain_query *query,
if (!ref_list.is_empty())
print_json_array(writer, "ref", ref_list);
+ if (rowid_filter)
+ {
+ rowid_filter->print_explain_json(query, writer, is_analyze);
+ }
+
/* r_loops (not present in tabular output) */
if (is_analyze)
{
@@ -1685,8 +1810,10 @@ void Explain_table_access::print_explain_json(Explain_query *query,
if (op_tracker.get_loops())
{
- writer->add_member("r_total_time_ms").
- add_double(op_tracker.get_time_ms());
+ double total_time= op_tracker.get_time_ms();
+ if (rowid_filter)
+ total_time+= rowid_filter->tracker->get_time_fill_container_ms();
+ writer->add_member("r_total_time_ms").add_double(total_time);
}
}
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index 73b9eb19435..6575511bd52 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -333,6 +333,8 @@ public:
/////////////////////////////////////////////////////////////////////////////
extern const char *unit_operation_text[4];
+extern const char *pushed_derived_text;
+extern const char *pushed_select_text;
/*
Explain structure for a UNION.
@@ -588,6 +590,8 @@ class Explain_index_use : public Sql_alloc
{
char *key_name;
uint key_len;
+ char *filter_name;
+ uint filter_len;
public:
String_list key_parts_list;
@@ -600,12 +604,46 @@ public:
{
key_name= NULL;
key_len= (uint)-1;
+ filter_name= NULL;
+ filter_len= (uint)-1;
}
bool set(MEM_ROOT *root, KEY *key_name, uint key_len_arg);
bool set_pseudo_key(MEM_ROOT *root, const char *key_name);
inline const char *get_key_name() const { return key_name; }
inline uint get_key_len() const { return key_len; }
+ //inline const char *get_filter_name() const { return filter_name; }
+};
+
+
+/*
+ Query Plan data structure for Rowid filter.
+*/
+class Explain_rowid_filter : public Sql_alloc
+{
+public:
+ /* Quick select used to collect the rowids into filter */
+ Explain_quick_select *quick;
+
+ /* How many rows the above quick select is expected to return */
+ ha_rows rows;
+
+ /* Expected selectivity for the filter */
+ double selectivity;
+
+ /* Tracker with the information about how rowid filter is executed */
+ Rowid_filter_tracker *tracker;
+
+ void print_explain_json(Explain_query *query, Json_writer *writer,
+ bool is_analyze);
+
+ /*
+ TODO:
+ Here should be ANALYZE members:
+ - r_rows for the quick select
+ - An object that tracked the table access time
+ - real selectivity of the filter.
+ */
};
@@ -675,6 +713,7 @@ public:
void print_json(Json_writer *writer, bool is_analyze);
};
+
/*
EXPLAIN data structure for a single JOIN_TAB.
*/
@@ -694,7 +733,8 @@ public:
cache_cond(NULL),
pushed_index_cond(NULL),
sjm_nest(NULL),
- pre_join_sort(NULL)
+ pre_join_sort(NULL),
+ rowid_filter(NULL)
{}
~Explain_table_access() { delete sjm_nest; }
@@ -801,6 +841,8 @@ public:
Exec_time_tracker op_tracker;
Table_access_tracker jbuf_tracker;
+ Explain_rowid_filter *rowid_filter;
+
int print_explain(select_result_sink *output, uint8 explain_flags,
bool is_analyze,
uint select_id, const char *select_type,
@@ -811,7 +853,7 @@ public:
private:
void append_tag_name(String *str, enum explain_extra_tag tag);
void fill_key_str(String *key_str, bool is_json) const;
- void fill_key_len_str(String *key_len_str) const;
+ void fill_key_len_str(String *key_len_str, bool is_json) const;
double get_r_filtered();
void tag_to_json(Json_writer *writer, enum explain_extra_tag tag);
};
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index c86458c438d..eb0dc1c2b3f 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -433,8 +433,6 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, SQL_HANDLER *reopen)
/* Always read all columns */
table->read_set= &table->s->all_set;
- if (table->vcol_set)
- table->vcol_set= &table->s->all_set;
/* Restore the state. */
thd->set_open_tables(backup_open_tables);
@@ -1199,10 +1197,10 @@ void mysql_ha_flush(THD *thd)
@note Broadcasts refresh if it closed a table with old version.
*/
-void mysql_ha_cleanup(THD *thd)
+void mysql_ha_cleanup_no_free(THD *thd)
{
SQL_HANDLER *hash_tables;
- DBUG_ENTER("mysql_ha_cleanup");
+ DBUG_ENTER("mysql_ha_cleanup_no_free");
for (uint i= 0; i < thd->handler_tables_hash.records; i++)
{
@@ -1210,9 +1208,15 @@ void mysql_ha_cleanup(THD *thd)
if (hash_tables->table)
mysql_ha_close_table(hash_tables);
}
+ DBUG_VOID_RETURN;
+}
- my_hash_free(&thd->handler_tables_hash);
+void mysql_ha_cleanup(THD *thd)
+{
+ DBUG_ENTER("mysql_ha_cleanup");
+ mysql_ha_cleanup_no_free(thd);
+ my_hash_free(&thd->handler_tables_hash);
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_handler.h b/sql/sql_handler.h
index 8d9dc5a9af2..4ac0d09e7a1 100644
--- a/sql/sql_handler.h
+++ b/sql/sql_handler.h
@@ -73,6 +73,7 @@ bool mysql_ha_read(THD *, TABLE_LIST *,enum enum_ha_read_modes, const char *,
void mysql_ha_flush(THD *thd);
void mysql_ha_flush_tables(THD *thd, TABLE_LIST *all_tables);
void mysql_ha_rm_tables(THD *thd, TABLE_LIST *tables);
+void mysql_ha_cleanup_no_free(THD *thd);
void mysql_ha_cleanup(THD *thd);
void mysql_ha_set_explicit_lock_duration(THD *thd);
void mysql_ha_rm_temporary_tables(THD *thd);
diff --git a/sql/sql_help.cc b/sql/sql_help.cc
index 5e0420652e4..81e5ad48e7e 100644
--- a/sql/sql_help.cc
+++ b/sql/sql_help.cc
@@ -87,7 +87,7 @@ enum enum_used_fields
static bool init_fields(THD *thd, TABLE_LIST *tables,
struct st_find_field *find_fields, uint count)
{
- Name_resolution_context *context= &thd->lex->select_lex.context;
+ Name_resolution_context *context= &thd->lex->first_select_lex()->context;
DBUG_ENTER("init_fields");
context->resolve_in_table_list_only(tables);
for (; count-- ; find_fields++)
@@ -719,10 +719,11 @@ static bool mysqld_help_internal(THD *thd, const char *mask)
Init tables and fields to be usable from items
tables do not contain VIEWs => we can pass 0 as conds
*/
- thd->lex->select_lex.context.table_list=
- thd->lex->select_lex.context.first_name_resolution_table= &tables[0];
- if (setup_tables(thd, &thd->lex->select_lex.context,
- &thd->lex->select_lex.top_join_list,
+ thd->lex->first_select_lex()->context.table_list=
+ thd->lex->first_select_lex()->context.first_name_resolution_table=
+ &tables[0];
+ if (setup_tables(thd, &thd->lex->first_select_lex()->context,
+ &thd->lex->first_select_lex()->top_join_list,
tables, leaves, FALSE, FALSE))
goto error;
memcpy((char*) used_fields, (char*) init_used_fields, sizeof(used_fields));
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index a180147190b..68d063720ed 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -82,6 +82,10 @@
#include "debug_sync.h"
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h" /* wsrep_start_transction() */
+#endif /* WITH_WSREP */
+
#ifndef EMBEDDED_LIBRARY
static bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
TABLE_LIST *table_list);
@@ -241,7 +245,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
}
else
{ // Part field list
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
Name_resolution_context *context= &select_lex->context;
Name_resolution_context_state ctx_state;
int res;
@@ -273,7 +277,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
/* Restore the current context. */
ctx_state.restore_state(context, table_list);
- thd->lex->select_lex.no_wrap_view_item= FALSE;
+ thd->lex->first_select_lex()->no_wrap_view_item= FALSE;
if (res)
DBUG_RETURN(-1);
@@ -470,7 +474,7 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type,
}
bool log_on= (thd->variables.option_bits & OPTION_BIN_LOG);
- if (global_system_variables.binlog_format == BINLOG_FORMAT_STMT &&
+ if (WSREP_BINLOG_FORMAT(global_system_variables.binlog_format) == BINLOG_FORMAT_STMT &&
log_on && mysql_bin_log.is_open())
{
/*
@@ -547,10 +551,10 @@ bool open_and_lock_for_insert_delayed(THD *thd, TABLE_LIST *table_list)
If this goes ok, the tickets are cloned and added to the list of granted
locks held by the handler thread.
*/
- if (thd->global_read_lock.can_acquire_protection())
+ if (thd->has_read_only_protection())
DBUG_RETURN(TRUE);
- protection_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
+ protection_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_DML,
MDL_STATEMENT);
if (thd->mdl_context.acquire_lock(&protection_request,
@@ -640,7 +644,7 @@ create_insert_stmt_from_insert_delayed(THD *thd, String *buf)
if (buf->append(thd->query()) ||
buf->replace(thd->lex->keyword_delayed_begin_offset,
thd->lex->keyword_delayed_end_offset -
- thd->lex->keyword_delayed_begin_offset, 0))
+ thd->lex->keyword_delayed_begin_offset, NULL, 0))
return 1;
return 0;
}
@@ -657,7 +661,7 @@ static void save_insert_query_plan(THD* thd, TABLE_LIST *table_list)
bool skip= MY_TEST(table_list->view);
/* Save subquery children */
- for (SELECT_LEX_UNIT *unit= thd->lex->select_lex.first_inner_unit();
+ for (SELECT_LEX_UNIT *unit= thd->lex->first_select_lex()->first_inner_unit();
unit;
unit= unit->next_unit())
{
@@ -777,7 +781,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
/* mysql_prepare_insert sets table_list->table if it was not set */
table= table_list->table;
- context= &thd->lex->select_lex.context;
+ context= &thd->lex->first_select_lex()->context;
/*
These three asserts test the hypothesis that the resetting of the name
resolution context below is not necessary at all since the list of local
@@ -900,6 +904,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
using_bulk_insert= 1;
table->file->ha_start_bulk_insert(values_list.elements);
}
+ else
+ table->file->ha_reset_copy_info();
}
thd->abort_on_warning= !ignore && thd->is_strict_mode();
@@ -1084,7 +1090,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
} while (bulk_parameters_iterations(thd));
values_loop_end:
- free_underlaid_joins(thd, &thd->lex->select_lex);
+ free_underlaid_joins(thd, thd->lex->first_select_lex());
joins_freed= TRUE;
/*
@@ -1108,11 +1114,23 @@ values_loop_end:
auto_inc values from the delayed_insert thread as they share TABLE.
*/
table->file->ha_release_auto_increment();
- if (using_bulk_insert && unlikely(table->file->ha_end_bulk_insert()) &&
- !error)
+ if (using_bulk_insert)
{
- table->file->print_error(my_errno,MYF(0));
- error=1;
+ if (unlikely(table->file->ha_end_bulk_insert()) &&
+ !error)
+ {
+ table->file->print_error(my_errno,MYF(0));
+ error=1;
+ }
+ }
+ /* Get better status from handler if handler supports it */
+ if (table->file->copy_info.records)
+ {
+ DBUG_ASSERT(info.copied >= table->file->copy_info.copied);
+ info.touched= table->file->copy_info.touched;
+ info.copied= table->file->copy_info.copied;
+ info.deleted= table->file->copy_info.deleted;
+ info.updated= table->file->copy_info.updated;
}
if (duplic != DUP_ERROR || ignore)
{
@@ -1235,8 +1253,12 @@ values_loop_end:
retval= thd->lex->explain->send_explain(thd);
goto abort;
}
- if ((iteration * values_list.elements) == 1 && (!(thd->variables.option_bits & OPTION_WARNINGS) ||
- !thd->cuted_fields))
+ DBUG_PRINT("info", ("touched: %llu copied: %llu updated: %llu deleted: %llu",
+ (ulonglong) info.touched, (ulonglong) info.copied,
+ (ulonglong) info.updated, (ulonglong) info.deleted));
+
+ if ((iteration * values_list.elements) == 1 &&
+ (!(thd->variables.option_bits & OPTION_WARNINGS) || !thd->cuted_fields))
{
my_ok(thd, info.copied + info.deleted +
((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
@@ -1266,6 +1288,10 @@ values_loop_end:
thd->lex->current_select->first_cond_optimization= 0;
}
+#ifndef EMBEDDED_LIBRARY
+ if (lock_type == TL_WRITE_DELAYED && table->expr_arena)
+ table->expr_arena->free_items();
+#endif
DBUG_RETURN(FALSE);
abort:
@@ -1282,13 +1308,15 @@ abort:
*/
for (Field **ptr= table_list->table->field ; *ptr ; ptr++)
(*ptr)->free();
+ if (table_list->table->expr_arena)
+ table_list->table->expr_arena->free_items();
}
#endif
if (table != NULL)
table->file->ha_release_auto_increment();
if (!joins_freed)
- free_underlaid_joins(thd, &thd->lex->select_lex);
+ free_underlaid_joins(thd, thd->lex->first_select_lex());
thd->abort_on_warning= 0;
DBUG_RETURN(retval);
}
@@ -1318,7 +1346,7 @@ abort:
static bool check_view_insertability(THD * thd, TABLE_LIST *view)
{
- uint num= view->view->select_lex.item_list.elements;
+ uint num= view->view->first_select_lex()->item_list.elements;
TABLE *table= view->table;
Field_translator *trans_start= view->field_translation,
*trans_end= trans_start + num;
@@ -1418,10 +1446,12 @@ static bool mysql_prepare_insert_check_table(THD *thd, TABLE_LIST *table_list,
than INSERT.
*/
- if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
- &thd->lex->select_lex.top_join_list,
+ if (setup_tables_and_check_access(thd,
+ &thd->lex->first_select_lex()->context,
+ &thd->lex->first_select_lex()->
+ top_join_list,
table_list,
- thd->lex->select_lex.leaf_tables,
+ thd->lex->first_select_lex()->leaf_tables,
select_insert, INSERT_ACL, SELECT_ACL,
TRUE))
DBUG_RETURN(TRUE);
@@ -1502,7 +1532,7 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
enum_duplicates duplic, COND **where,
bool select_insert)
{
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
Name_resolution_context *context= &select_lex->context;
Name_resolution_context_state ctx_state;
bool insert_into_view= (table_list->view != 0);
@@ -1752,7 +1782,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
*/
if (info->ignore)
{
- table->file->print_error(error, MYF(ME_JUST_WARNING));
+ table->file->print_error(error, MYF(ME_WARNING));
goto ok_or_after_trg_err; /* Ignoring a not fatal error, return 0 */
}
goto err;
@@ -1771,10 +1801,8 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
was used. This ensures that we don't get a problem when the
whole range of the key has been used.
*/
- if (info->handle_duplicates == DUP_REPLACE &&
- table->next_number_field &&
- key_nr == table->s->next_number_index &&
- (insert_id_for_cur_row > 0))
+ if (info->handle_duplicates == DUP_REPLACE && table->next_number_field &&
+ key_nr == table->s->next_number_index && insert_id_for_cur_row > 0)
goto err;
if (table->file->ha_table_flags() & HA_DUPLICATE_POS)
{
@@ -1877,7 +1905,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
{
if (!(thd->variables.old_behavior &
OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE))
- table->file->print_error(error, MYF(ME_JUST_WARNING));
+ table->file->print_error(error, MYF(ME_WARNING));
goto ok_or_after_trg_err;
}
goto err;
@@ -2059,7 +2087,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
goto err;
if (!(thd->variables.old_behavior &
OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE))
- table->file->print_error(error, MYF(ME_JUST_WARNING));
+ table->file->print_error(error, MYF(ME_WARNING));
table->file->restore_auto_increment(prev_insert_id);
goto ok_or_after_trg_err;
}
@@ -2221,11 +2249,11 @@ public:
mysql_mutex_init(key_delayed_insert_mutex, &mutex, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_delayed_insert_cond, &cond, NULL);
mysql_cond_init(key_delayed_insert_cond_client, &cond_client, NULL);
- mysql_mutex_lock(&LOCK_thread_count);
+ mysql_mutex_lock(&LOCK_delayed_insert);
delayed_insert_threads++;
+ mysql_mutex_unlock(&LOCK_delayed_insert);
delayed_lock= global_system_variables.low_priority_updates ?
TL_WRITE_LOW_PRIORITY : TL_WRITE;
- mysql_mutex_unlock(&LOCK_thread_count);
DBUG_VOID_RETURN;
}
~Delayed_insert()
@@ -2237,21 +2265,15 @@ public:
if (table)
{
close_thread_tables(&thd);
- thd.mdl_context.release_transactional_locks();
+ thd.mdl_context.release_transactional_locks(&thd);
}
mysql_mutex_destroy(&mutex);
mysql_cond_destroy(&cond);
mysql_cond_destroy(&cond_client);
- /*
- We could use unlink_not_visible_threads() here, but as
- delayed_insert_threads also needs to be protected by
- the LOCK_thread_count mutex, we open code this.
- */
- mysql_mutex_lock(&LOCK_thread_count);
- thd.unlink(); // Must be unlinked under lock
+ server_threads.erase(&thd);
+ mysql_mutex_assert_owner(&LOCK_delayed_insert);
delayed_insert_threads--;
- mysql_mutex_unlock(&LOCK_thread_count);
my_free(thd.query());
thd.security_ctx->user= 0;
@@ -2398,7 +2420,7 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
di->thd.set_db(&table_list->db);
di->thd.set_query(my_strndup(table_list->table_name.str,
table_list->table_name.length,
- MYF(MY_WME | ME_FATALERROR)),
+ MYF(MY_WME | ME_FATAL)),
table_list->table_name.length, system_charset_info);
if (di->thd.db.str == NULL || di->thd.query() == NULL)
{
@@ -2411,9 +2433,17 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
di->table_list.alias.str= di->table_list.table_name.str= di->thd.query();
di->table_list.alias.length= di->table_list.table_name.length= di->thd.query_length();
di->table_list.db= di->thd.db;
- /* We need the tickets so that they can be cloned in handle_delayed_insert */
- di->grl_protection.init(MDL_key::GLOBAL, "", "",
- MDL_INTENTION_EXCLUSIVE, MDL_STATEMENT);
+ /*
+ Nulify select_lex because, if the thread that spawned the current one
+ disconnects, the select_lex will point to freed memory.
+ */
+ di->table_list.select_lex= NULL;
+ /*
+ We need the tickets so that they can be cloned in
+ handle_delayed_insert
+ */
+ di->grl_protection.init(MDL_key::BACKUP, "", "",
+ MDL_BACKUP_DML, MDL_STATEMENT);
di->grl_protection.ticket= grl_protection_request->ticket;
init_mdl_requests(&di->table_list);
di->table_list.mdl_request.ticket= table_list->mdl_request.ticket;
@@ -2430,7 +2460,7 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
mysql_mutex_unlock(&di->mutex);
di->unlock();
delete di;
- my_error(ER_CANT_CREATE_THREAD, MYF(ME_FATALERROR), error);
+ my_error(ER_CANT_CREATE_THREAD, MYF(ME_FATAL), error);
goto end_create;
}
@@ -2488,10 +2518,12 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
}
/* Unlock the delayed insert object after its last access. */
di->unlock();
- DBUG_RETURN((table_list->table == NULL));
+ DBUG_PRINT("exit", ("table_list->table: %p", table_list->table));
+ DBUG_RETURN(thd->is_error());
end_create:
mysql_mutex_unlock(&LOCK_delayed_create);
+ DBUG_PRINT("exit", ("is_error: %d", thd->is_error()));
DBUG_RETURN(thd->is_error());
}
@@ -2546,24 +2578,27 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
if (thd.killed)
{
/*
- Copy the error message. Note that we don't treat fatal
- errors in the delayed thread as fatal errors in the
- main thread. If delayed thread was killed, we don't
- want to send "Server shutdown in progress" in the
- INSERT THREAD.
-
- The thread could be killed with an error message if
- di->handle_inserts() or di->open_and_lock_table() fails.
- The thread could be killed without an error message if
- killed using THD::notify_shared_lock() or
- kill_delayed_threads_for_table().
+ Check how the insert thread was killed. If it was killed
+ by FLUSH TABLES which calls kill_delayed_threads_for_table(),
+ then is_error is not set.
+ In this case, return without setting an error,
+ which means that the insert will be converted to a normal insert.
*/
- if (!thd.is_error())
- my_message(ER_QUERY_INTERRUPTED, ER_THD(&thd, ER_QUERY_INTERRUPTED),
- MYF(0));
- else
+ if (thd.is_error())
+ {
+ /*
+ Copy the error message. Note that we don't treat fatal
+ errors in the delayed thread as fatal errors in the
+ main thread. If delayed thread was killed, we don't
+ want to send "Server shutdown in progress" in the
+ INSERT THREAD.
+
+ The thread could be killed with an error message if
+ di->handle_inserts() or di->open_and_lock_table() fails.
+ */
my_message(thd.get_stmt_da()->sql_errno(),
thd.get_stmt_da()->message(), MYF(0));
+ }
goto error;
}
}
@@ -2633,6 +2668,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
(*field)->invisible= (*org_field)->invisible;
(*field)->orig_table= copy; // Remove connection
(*field)->move_field_offset(adjust_ptrs); // Point at copy->record[0]
+ (*field)->flags|= ((*org_field)->flags & LONG_UNIQUE_HASH_FIELD);
memdup_vcol(client_thd, (*field)->vcol_info);
memdup_vcol(client_thd, (*field)->default_value);
memdup_vcol(client_thd, (*field)->check_constraint);
@@ -2641,14 +2677,14 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
}
*field=0;
+ if (copy_keys_from_share(copy, client_thd->mem_root))
+ goto error;
+
+
if (share->virtual_fields || share->default_expressions ||
share->default_fields)
{
bool error_reported= FALSE;
- if (unlikely(!(copy->def_vcol_set=
- (MY_BITMAP*) alloc_root(client_thd->mem_root,
- sizeof(MY_BITMAP)))))
- goto error;
if (unlikely(parse_vcol_defs(client_thd, client_thd->mem_root, copy,
&error_reported,
VCOL_INIT_DEPENDENCY_FAILURE_IS_WARNING)))
@@ -2668,15 +2704,6 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
copy->def_write_set.bitmap= ((my_bitmap_map*)
(bitmap + share->column_bitmap_size));
bitmaps_used= 2;
- if (share->virtual_fields)
- {
- my_bitmap_init(copy->def_vcol_set,
- (my_bitmap_map*) (bitmap +
- bitmaps_used*share->column_bitmap_size),
- share->fields, FALSE);
- bitmaps_used++;
- copy->vcol_set= copy->def_vcol_set;
- }
if (share->default_fields || share->default_expressions)
{
my_bitmap_init(&copy->has_value_set,
@@ -2874,23 +2901,7 @@ void kill_delayed_threads(void)
mysql_mutex_lock(&di->thd.LOCK_thd_kill);
if (di->thd.killed < KILL_CONNECTION)
di->thd.set_killed_no_mutex(KILL_CONNECTION);
- if (di->thd.mysys_var)
- {
- mysql_mutex_lock(&di->thd.mysys_var->mutex);
- if (di->thd.mysys_var->current_cond)
- {
- /*
- We need the following test because the main mutex may be locked
- in handle_delayed_insert()
- */
- if (&di->mutex != di->thd.mysys_var->current_mutex)
- mysql_mutex_lock(di->thd.mysys_var->current_mutex);
- mysql_cond_broadcast(di->thd.mysys_var->current_cond);
- if (&di->mutex != di->thd.mysys_var->current_mutex)
- mysql_mutex_unlock(di->thd.mysys_var->current_mutex);
- }
- mysql_mutex_unlock(&di->thd.mysys_var->mutex);
- }
+ di->thd.abort_current_cond_wait(false);
mysql_mutex_unlock(&di->thd.LOCK_thd_kill);
}
mysql_mutex_unlock(&LOCK_delayed_insert); // For unlink from list
@@ -3015,7 +3026,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
pthread_detach_this_thread();
/* Add thread to THD list so that's it's visible in 'show processlist' */
thd->set_start_time();
- add_to_active_threads(thd);
+ server_threads.insert(thd);
if (abort_loop)
thd->set_killed(KILL_CONNECTION);
else
@@ -3173,11 +3184,30 @@ pthread_handler_t handle_delayed_insert(void *arg)
mysql_mutex_unlock(&di->thd.mysys_var->mutex);
mysql_mutex_lock(&di->mutex);
}
+
+ /*
+ The code depends on that the following ASSERT always hold.
+ I don't want to accidently introduce and bugs in the following code
+ in this commit, so I leave the small cleaning up of the code to
+ a future commit
+ */
+ DBUG_ASSERT(thd->lock || di->stacked_inserts == 0);
+
DBUG_PRINT("delayed",
- ("thd->killed: %d di->tables_in_use: %d thd->lock: %d",
- thd->killed, di->tables_in_use, thd->lock != 0));
+ ("thd->killed: %d di->status: %d di->stacked_insert: %d di->tables_in_use: %d thd->lock: %d",
+ thd->killed, di->status, di->stacked_inserts, di->tables_in_use, thd->lock != 0));
+
+ /*
+ This is used to test see what happens if killed is sent before
+ we have time to handle the insert requests.
+ */
+ DBUG_EXECUTE_IF("write_delay_wakeup",
+ if (!thd->killed && di->stacked_inserts)
+ my_sleep(500000);
+ );
- if (di->tables_in_use && ! thd->lock && !thd->killed)
+ if (di->tables_in_use && ! thd->lock &&
+ (!thd->killed || di->stacked_inserts))
{
/*
Request for new delayed insert.
@@ -3351,7 +3381,7 @@ bool Delayed_insert::handle_inserts(void)
or if another thread is removing the current table definition
from the table cache.
*/
- my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATALERROR | ME_NOREFRESH),
+ my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATAL | ME_ERROR_LOG),
table->s->table_name.str);
goto err;
}
@@ -3527,7 +3557,7 @@ bool Delayed_insert::handle_inserts(void)
{
/* This is not known to happen. */
my_error(ER_DELAYED_CANT_CHANGE_LOCK,
- MYF(ME_FATALERROR | ME_NOREFRESH),
+ MYF(ME_FATAL | ME_ERROR_LOG),
table->s->table_name.str);
goto err;
}
@@ -3625,7 +3655,7 @@ bool Delayed_insert::handle_inserts(void)
bool mysql_insert_select_prepare(THD *thd)
{
LEX *lex= thd->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
DBUG_ENTER("mysql_insert_select_prepare");
@@ -3713,7 +3743,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
select, LEX::current_select should point to the first select while
we are fixing fields from insert list.
*/
- lex->current_select= &lex->select_lex;
+ lex->current_select= lex->first_select_lex();
res= (setup_fields(thd, Ref_ptr_array(),
values, MARK_COLUMNS_READ, 0, NULL, 0) ||
@@ -3730,7 +3760,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
if (info.handle_duplicates == DUP_UPDATE && !res)
{
- Name_resolution_context *context= &lex->select_lex.context;
+ Name_resolution_context *context= &lex->first_select_lex()->context;
Name_resolution_context_state ctx_state;
/* Save the state of the current name resolution context. */
@@ -3740,7 +3770,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
table_list->next_local= 0;
context->resolve_in_table_list_only(table_list);
- lex->select_lex.no_wrap_view_item= TRUE;
+ lex->first_select_lex()->no_wrap_view_item= TRUE;
res= res ||
check_update_fields(thd, context->table_list,
*info.update_fields, *info.update_values,
@@ -3751,22 +3781,26 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
*/
true,
&map);
- lex->select_lex.no_wrap_view_item= FALSE;
+ lex->first_select_lex()->no_wrap_view_item= FALSE;
/*
- When we are not using GROUP BY and there are no ungrouped aggregate functions
- we can refer to other tables in the ON DUPLICATE KEY part.
- We use next_name_resolution_table descructively, so check it first (views?)
+ When we are not using GROUP BY and there are no ungrouped
+ aggregate functions we can refer to other tables in the ON
+ DUPLICATE KEY part. We use next_name_resolution_table
+ descructively, so check it first (views?)
*/
DBUG_ASSERT (!table_list->next_name_resolution_table);
- if (lex->select_lex.group_list.elements == 0 &&
- !lex->select_lex.with_sum_func)
+ if (lex->first_select_lex()->group_list.elements == 0 &&
+ !lex->first_select_lex()->with_sum_func)
+ {
/*
- We must make a single context out of the two separate name resolution contexts :
- the INSERT table and the tables in the SELECT part of INSERT ... SELECT.
- To do that we must concatenate the two lists
+ We must make a single context out of the two separate name
+ resolution contexts : the INSERT table and the tables in the
+ SELECT part of INSERT ... SELECT. To do that we must
+ concatenate the two lists
*/
table_list->next_name_resolution_table=
ctx_state.get_first_name_resolution_table();
+ }
res= res || setup_fields(thd, Ref_ptr_array(), *info.update_values,
MARK_COLUMNS_READ, 0, NULL, 0);
@@ -3872,9 +3906,9 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
void
DESCRIPTION
- If the result table is the same as one of the source tables (INSERT SELECT),
- the result table is not finally prepared at the join prepair phase.
- Do the final preparation now.
+ If the result table is the same as one of the source tables
+ (INSERT SELECT), the result table is not finally prepared at the
+ join prepair phase. Do the final preparation now.
RETURN
0 OK
@@ -4014,10 +4048,13 @@ bool select_insert::prepare_eof()
DBUG_PRINT("enter", ("trans_table=%d, table_type='%s'",
trans_table, table->file->table_type()));
- error= (IF_WSREP((thd->wsrep_conflict_state == MUST_ABORT ||
- thd->wsrep_conflict_state == CERT_FAILURE) ? -1 :, )
- (thd->locked_tables_mode <= LTM_LOCK_TABLES ?
- table->file->ha_end_bulk_insert() : 0));
+#ifdef WITH_WSREP
+ error= (thd->wsrep_cs().current_error()) ? -1 :
+ (thd->locked_tables_mode <= LTM_LOCK_TABLES) ?
+#else
+ error= (thd->locked_tables_mode <= LTM_LOCK_TABLES) ?
+#endif /* WITH_WSREP */
+ table->file->ha_end_bulk_insert() : 0;
if (likely(!error) && unlikely(thd->is_error()))
error= thd->get_stmt_da()->sql_errno();
@@ -4202,9 +4239,9 @@ void select_insert::abort_result_set()
Field *Item::create_field_for_create_select(TABLE *table)
{
- Field *def_field, *tmp_field;
- return ::create_tmp_field(table->in_use, table, this, type(),
- (Item ***) 0, &tmp_field, &def_field, 0, 0, 0, 0);
+ static Tmp_field_param param(false, false, false, false);
+ Tmp_field_src src;
+ return create_tmp_field_ex(table, &src, &param);
}
@@ -4247,10 +4284,8 @@ Field *Item::create_field_for_create_select(TABLE *table)
@retval 0 Error
*/
-TABLE *select_create::create_table_from_items(THD *thd,
- List<Item> *items,
- MYSQL_LOCK **lock,
- TABLEOP_HOOKS *hooks)
+TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
+ MYSQL_LOCK **lock, TABLEOP_HOOKS *hooks)
{
TABLE tmp_table; // Used during 'Create_field()'
TABLE_SHARE share;
@@ -4273,7 +4308,7 @@ TABLE *select_create::create_table_from_items(THD *thd,
if (!opt_explicit_defaults_for_timestamp)
promote_first_timestamp_column(&alter_info->create_list);
- if (create_info->vers_fix_system_fields(thd, alter_info, *create_table))
+ if (create_info->fix_create_fields(thd, alter_info, *create_table))
DBUG_RETURN(NULL);
while ((item=it++))
@@ -4312,10 +4347,10 @@ TABLE *select_create::create_table_from_items(THD *thd,
alter_info->create_list.push_back(cr_field, thd->mem_root);
}
- if (create_info->vers_check_system_fields(thd, alter_info,
- create_table->table_name,
- create_table->db,
- select_field_count))
+ if (create_info->check_fields(thd, alter_info,
+ create_table->table_name,
+ create_table->db,
+ select_field_count))
DBUG_RETURN(NULL);
DEBUG_SYNC(thd,"create_table_select_before_create");
@@ -4536,8 +4571,6 @@ select_create::prepare(List<Item> &_values, SELECT_LEX_UNIT *u)
thd->binlog_start_trans_and_stmt();
}
- DEBUG_SYNC(thd,"create_table_select_before_check_if_exists");
-
if (!(table= create_table_from_items(thd, &values, &extra_lock, hook_ptr)))
{
if (create_info->or_replace())
@@ -4664,9 +4697,16 @@ select_create::binlog_show_create_table(TABLE **tables, uint count)
/* suppress_use */ FALSE,
errcode) > 0;
}
-
- ha_fake_trx_id(thd);
-
+#ifdef WITH_WSREP
+ if (thd->wsrep_trx().active())
+ {
+ WSREP_DEBUG("transaction already started for CTAS");
+ }
+ else
+ {
+ wsrep_start_transaction(thd, thd->wsrep_next_trx_id());
+ }
+#endif
return result;
}
@@ -4724,10 +4764,19 @@ bool select_create::send_eof()
if (!table->s->tmp_table)
{
#ifdef WITH_WSREP
- if (WSREP_ON)
+ if (WSREP(thd) &&
+ table->file->ht->db_type == DB_TYPE_INNODB)
{
+ if (thd->wsrep_trx_id() == WSREP_UNDEFINED_TRX_ID)
+ {
+ wsrep_start_transaction(thd, thd->wsrep_next_trx_id());
+ }
+ DBUG_ASSERT(thd->wsrep_trx_id() != WSREP_UNDEFINED_TRX_ID);
+ WSREP_DEBUG("CTAS key append for trx: %" PRIu64 " thd %llu query %lld ",
+ thd->wsrep_trx_id(), thd->thread_id, thd->query_id);
+
/*
- append table level exclusive key for CTAS
+ append table level exclusive key for CTAS
*/
wsrep_key_arr_t key_arr= {0, 0};
wsrep_prepare_keys_for_isolation(thd,
@@ -4735,15 +4784,11 @@ bool select_create::send_eof()
create_table->table_name.str,
table_list,
&key_arr);
- int rcode = wsrep->append_key(
- wsrep,
- &thd->wsrep_ws_handle,
- key_arr.keys, //&wkey,
- key_arr.keys_len,
- WSREP_KEY_EXCLUSIVE,
- false);
+ int rcode= wsrep_thd_append_key(thd, key_arr.keys, key_arr.keys_len,
+ WSREP_SERVICE_KEY_EXCLUSIVE);
wsrep_keys_free(&key_arr);
- if (rcode) {
+ if (rcode)
+ {
DBUG_PRINT("wsrep", ("row key failed: %d", rcode));
WSREP_ERROR("Appending table key for CTAS failed: %s, %d",
(wsrep_thd_query(thd)) ?
@@ -4752,22 +4797,22 @@ bool select_create::send_eof()
DBUG_RETURN(true);
}
/* If commit fails, we should be able to reset the OK status. */
- thd->get_stmt_da()->set_overwrite_status(TRUE);
+ thd->get_stmt_da()->set_overwrite_status(true);
}
#endif /* WITH_WSREP */
trans_commit_stmt(thd);
if (!(thd->variables.option_bits & OPTION_GTID_BEGIN))
trans_commit_implicit(thd);
#ifdef WITH_WSREP
- if (WSREP_ON)
+ if (WSREP(thd))
{
thd->get_stmt_da()->set_overwrite_status(FALSE);
mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state != NO_CONFLICT)
+ if (wsrep_current_error(thd))
{
- WSREP_DEBUG("select_create commit failed, thd: %lld err: %d %s",
- (longlong) thd->thread_id, thd->wsrep_conflict_state,
- thd->query());
+ WSREP_DEBUG("select_create commit failed, thd: %llu err: %s %s",
+ thd->thread_id,
+ wsrep_thd_transaction_state_str(thd), wsrep_thd_query(thd));
mysql_mutex_unlock(&thd->LOCK_thd_data);
abort_result_set();
DBUG_RETURN(true);
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index 86df1d32bd9..f072a675e31 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -2317,6 +2317,8 @@ enum_nested_loop_state JOIN_CACHE::join_matching_records(bool skip_last)
if ((rc= join_tab_execution_startup(join_tab)) < 0)
goto finish2;
+ join_tab->build_range_rowid_filter_if_needed();
+
/* Prepare to retrieve all records of the joined table */
if (unlikely((error= join_tab_scan->open())))
{
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 3400e31fd5c..3d1837fe698 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -31,8 +31,15 @@
#include "sql_select.h"
#include "sql_cte.h"
#include "sql_signal.h"
+#include "sql_derived.h"
+#include "sql_truncate.h" // Sql_cmd_truncate_table
+#include "sql_admin.h" // Sql_cmd_analyze/Check..._table
#include "sql_partition.h"
-
+#include "sql_partition_admin.h" // Sql_cmd_alter_table_*_part
+#include "event_parse_data.h"
+#ifdef WITH_WSREP
+#include "mysql/service_wsrep.h"
+#endif
void LEX::parse_error(uint err_number)
{
@@ -181,7 +188,7 @@ init_lex_with_single_table(THD *thd, TABLE *table, LEX *lex)
{
TABLE_LIST *table_list;
Table_ident *table_ident;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
Name_resolution_context *context= &select_lex->context;
/*
We will call the parser to create a part_info struct based on the
@@ -643,6 +650,30 @@ void Lex_input_stream::reduce_digest_token(uint token_left, uint token_right)
}
}
+/**
+ lex starting operations for builtin select collected together
+*/
+
+void SELECT_LEX::lex_start(LEX *plex)
+{
+ SELECT_LEX_UNIT *unit= &plex->unit;
+ /* 'parent_lex' is used in init_query() so it must be before it. */
+ parent_lex= plex;
+ init_query();
+ master= unit;
+ prev= &unit->slave;
+ link_next= slave= next= 0;
+ link_prev= (st_select_lex_node**)&(plex->all_selects_list);
+ DBUG_ASSERT(!group_list_ptrs);
+ select_number= 1;
+ in_sum_expr=0;
+ ftfunc_list_alloc.empty();
+ ftfunc_list= &ftfunc_list_alloc;
+ group_list.empty();
+ order_list.empty();
+ gorder_list.empty();
+}
+
void lex_start(THD *thd)
{
DBUG_ENTER("lex_start");
@@ -667,18 +698,20 @@ void LEX::start(THD *thd_arg)
DBUG_ASSERT(!explain);
+ builtin_select.lex_start(this);
+ lex_options= 0;
context_stack.empty();
+ //empty select_stack
+ select_stack_top= 0;
+ select_stack_outer_barrier= 0;
unit.init_query();
- current_select_number= 1;
- select_lex.linkage= UNSPECIFIED_TYPE;
- /* 'parent_lex' is used in init_query() so it must be before it. */
- select_lex.parent_lex= this;
- select_lex.init_query();
+ current_select_number= 0;
curr_with_clause= 0;
with_clauses_list= 0;
with_clauses_list_last_next= &with_clauses_list;
clone_spec_offset= 0;
create_view= NULL;
+ field_list.empty();
value_list.empty();
update_list.empty();
set_var_list.empty();
@@ -688,21 +721,12 @@ void LEX::start(THD *thd_arg)
with_persistent_for_clause= FALSE;
column_list= NULL;
index_list= NULL;
- prepared_stmt_params.empty();
+ prepared_stmt.lex_start();
auxiliary_table_list.empty();
unit.next= unit.master= unit.link_next= unit.return_to= 0;
unit.prev= unit.link_prev= 0;
- unit.slave= current_select= all_selects_list= &select_lex;
- select_lex.master= &unit;
- select_lex.prev= &unit.slave;
- select_lex.link_next= select_lex.slave= select_lex.next= 0;
- select_lex.link_prev= (st_select_lex_node**)&(all_selects_list);
- select_lex.options= 0;
- select_lex.sql_cache= SELECT_LEX::SQL_CACHE_UNSPECIFIED;
- select_lex.init_order();
- select_lex.group_list.empty();
- if (select_lex.group_list_ptrs)
- select_lex.group_list_ptrs->clear();
+ unit.slave= current_select= all_selects_list= &builtin_select;
+ sql_cache= LEX::SQL_CACHE_UNSPECIFIED;
describe= 0;
analyze_stmt= 0;
explain_json= false;
@@ -713,14 +737,7 @@ void LEX::start(THD *thd_arg)
safe_to_cache_query= 1;
parsing_options.reset();
empty_field_list_on_rset= 0;
- select_lex.select_number= 1;
part_info= 0;
- select_lex.in_sum_expr=0;
- select_lex.ftfunc_list_alloc.empty();
- select_lex.ftfunc_list= &select_lex.ftfunc_list_alloc;
- select_lex.group_list.empty();
- select_lex.order_list.empty();
- select_lex.gorder_list.empty();
m_sql_cmd= NULL;
duplicates= DUP_ERROR;
ignore= 0;
@@ -731,7 +748,9 @@ void LEX::start(THD *thd_arg)
default_used= FALSE;
query_tables= 0;
reset_query_tables_list(FALSE);
- expr_allows_subselect= TRUE;
+ clause_that_disallows_subselect= NULL;
+ selects_allow_into= FALSE;
+ selects_allow_procedure= FALSE;
use_only_table_context= FALSE;
parse_vcol_expr= FALSE;
check_exists= FALSE;
@@ -741,8 +760,8 @@ void LEX::start(THD *thd_arg)
name= null_clex_str;
event_parse_data= NULL;
profile_options= PROFILE_NONE;
- nest_level=0 ;
- select_lex.nest_level_base= &unit;
+ nest_level= 0;
+ builtin_select.nest_level_base= &unit;
allow_sum_func.clear_all();
in_sum_func= NULL;
@@ -764,8 +783,16 @@ void LEX::start(THD *thd_arg)
win_spec= NULL;
vers_conditions.empty();
+ period_conditions.empty();
is_lex_started= TRUE;
+
+ next_is_main= FALSE;
+ next_is_down= FALSE;
+
+ wild= 0;
+ exchange= 0;
+
DBUG_VOID_RETURN;
}
@@ -1308,7 +1335,8 @@ int ORAlex(YYSTYPE *yylval, THD *thd)
int Lex_input_stream::lex_token(YYSTYPE *yylval, THD *thd)
{
int token;
-
+ const int left_paren= (int) '(';
+
if (lookahead_token >= 0)
{
/*
@@ -1325,6 +1353,8 @@ int Lex_input_stream::lex_token(YYSTYPE *yylval, THD *thd)
token= lex_one_token(yylval, thd);
add_digest_token(token, yylval);
+ SELECT_LEX *curr_sel= thd->lex->current_select;
+
switch(token) {
case WITH:
/*
@@ -1373,8 +1403,16 @@ int Lex_input_stream::lex_token(YYSTYPE *yylval, THD *thd)
}
break;
case VALUES:
- if (thd->lex->current_select->parsing_place == IN_UPDATE_ON_DUP_KEY ||
- thd->lex->current_select->parsing_place == IN_PART_FUNC)
+ if (curr_sel &&
+ (curr_sel->parsing_place == BEFORE_OPT_LIST ||
+ curr_sel->parsing_place == AFTER_LIST))
+ {
+ curr_sel->parsing_place= NO_MATTER;
+ break;
+ }
+ if (curr_sel &&
+ (curr_sel->parsing_place == IN_UPDATE_ON_DUP_KEY ||
+ curr_sel->parsing_place == IN_PART_FUNC))
return VALUE_SYM;
token= lex_one_token(yylval, thd);
add_digest_token(token, yylval);
@@ -1388,6 +1426,43 @@ int Lex_input_stream::lex_token(YYSTYPE *yylval, THD *thd)
lookahead_token= token;
return VALUES;
}
+ case VALUE_SYM:
+ if (curr_sel &&
+ (curr_sel->parsing_place == BEFORE_OPT_LIST ||
+ curr_sel->parsing_place == AFTER_LIST))
+ {
+ curr_sel->parsing_place= NO_MATTER;
+ return VALUES;
+ }
+ break;
+ case PARTITION_SYM:
+ case SELECT_SYM:
+ case UNION_SYM:
+ if (curr_sel &&
+ (curr_sel->parsing_place == BEFORE_OPT_LIST ||
+ curr_sel->parsing_place == AFTER_LIST))
+ {
+ curr_sel->parsing_place= NO_MATTER;
+ }
+ break;
+ case left_paren:
+ if (!curr_sel ||
+ curr_sel->parsing_place != BEFORE_OPT_LIST)
+ return token;
+ token= lex_one_token(yylval, thd);
+ add_digest_token(token, yylval);
+ lookahead_yylval= yylval;
+ yylval= NULL;
+ lookahead_token= token;
+ curr_sel->parsing_place= NO_MATTER;
+ if (token == LIKE)
+ return LEFT_PAREN_LIKE;
+ if (token == WITH)
+ return LEFT_PAREN_WITH;
+ if (token != left_paren && token != SELECT_SYM && token != VALUES)
+ return LEFT_PAREN_ALT;
+ else
+ return left_paren;
break;
default:
break;
@@ -1444,10 +1519,13 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd)
next_state= MY_LEX_START;
return PERCENT_ORACLE_SYM;
}
+ if (c == '[' && (m_thd->variables.sql_mode & MODE_MSSQL))
+ return scan_ident_delimited(thd, &yylval->ident_cli, ']');
/* Fall through */
case MY_LEX_SKIP: // This should not happen
if (c != ')')
next_state= MY_LEX_START; // Allow signed numbers
+ yylval->kwd.set_keyword(m_tok_start, 1);
return((int) c);
case MY_LEX_MINUS_OR_COMMENT:
@@ -1625,7 +1703,7 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd)
return scan_ident_start(thd, &yylval->ident_cli);
case MY_LEX_USER_VARIABLE_DELIMITER: // Found quote char
- return scan_ident_delimited(thd, &yylval->ident_cli);
+ return scan_ident_delimited(thd, &yylval->ident_cli, m_tok_start[0]);
case MY_LEX_INT_OR_REAL: // Complete int or incomplete real
if (c != '.' || yyPeek() == '.')
@@ -1748,7 +1826,7 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd)
return(TEXT_STRING);
}
case MY_LEX_COMMENT: // Comment
- lex->select_lex.options|= OPTION_FOUND_COMMENT;
+ lex->lex_options|= OPTION_LEX_FOUND_COMMENT;
while ((c= yyGet()) != '\n' && c) ;
yyUnget(); // Safety against eof
state= MY_LEX_START; // Try again
@@ -1759,7 +1837,7 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd)
state= MY_LEX_CHAR; // Probable division
break;
}
- lex->select_lex.options|= OPTION_FOUND_COMMENT;
+ lex->lex_options|= OPTION_LEX_FOUND_COMMENT;
/* Reject '/' '*', since we might need to turn off the echo */
yyUnget();
@@ -1821,7 +1899,7 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd)
else
{
#ifdef WITH_WSREP
- if (WSREP(thd) && version == 99997 && thd->wsrep_exec_mode == LOCAL_STATE)
+ if (WSREP(thd) && version == 99997 && wsrep_thd_is_local(thd))
{
WSREP_DEBUG("consistency check: %s", thd->query());
thd->wsrep_consistency_check= CONSISTENCY_CHECK_DECLARED;
@@ -2188,10 +2266,11 @@ int Lex_input_stream::scan_ident_middle(THD *thd, Lex_ident_cli_st *str,
int Lex_input_stream::scan_ident_delimited(THD *thd,
- Lex_ident_cli_st *str)
+ Lex_ident_cli_st *str,
+ uchar quote_char)
{
CHARSET_INFO *const cs= thd->charset();
- uchar c, quote_char= m_tok_start[0];
+ uchar c;
DBUG_ASSERT(m_ptr == m_tok_start + 1);
for ( ; ; )
@@ -2275,8 +2354,8 @@ void trim_whitespace(CHARSET_INFO *cs, LEX_CSTRING *str, size_t * prefix_length)
void st_select_lex_node::init_query_common()
{
options= 0;
- sql_cache= SQL_CACHE_UNSPECIFIED;
- linkage= UNSPECIFIED_TYPE;
+ set_linkage(UNSPECIFIED_TYPE);
+ distinct= TRUE;
no_table_names_allowed= 0;
uncacheable= 0;
}
@@ -2284,7 +2363,7 @@ void st_select_lex_node::init_query_common()
void st_select_lex_unit::init_query()
{
init_query_common();
- linkage= GLOBAL_OPTIONS_TYPE;
+ set_linkage(GLOBAL_OPTIONS_TYPE);
select_limit_cnt= HA_POS_ERROR;
offset_limit_cnt= 0;
union_distinct= 0;
@@ -2323,21 +2402,12 @@ void st_select_lex::init_query()
join= 0;
having= prep_having= where= prep_where= 0;
cond_pushed_into_where= cond_pushed_into_having= 0;
+ attach_to_conds.empty();
olap= UNSPECIFIED_OLAP_TYPE;
having_fix_field= 0;
having_fix_field_for_pushed_cond= 0;
context.select_lex= this;
context.init();
- /*
- Add the name resolution context of the current (sub)query to the
- stack of contexts for the whole query.
- TODO:
- push_context may return an error if there is no memory for a new
- element in the stack, however this method has no return value,
- thus push_context should be moved to a place where query
- initialization is checked for failure.
- */
- parent_lex->push_context(&context, parent_lex->thd->mem_root);
cond_count= between_count= with_wild= 0;
max_equal_elems= 0;
ref_pointer_array.reset();
@@ -2353,7 +2423,10 @@ void st_select_lex::init_query()
changed_elements= 0;
first_natural_join_processing= 1;
first_cond_optimization= 1;
+ is_service_select= 0;
parsing_place= NO_MATTER;
+ save_parsing_place= NO_MATTER;
+ context_analysis_place= NO_MATTER;
exclude_from_table_unique_test= no_wrap_view_item= FALSE;
nest_level= 0;
link_next= 0;
@@ -2369,6 +2442,7 @@ void st_select_lex::init_query()
tvc= 0;
in_tvc= false;
versioned_tables= 0;
+ pushdown_select= 0;
}
void st_select_lex::init_select()
@@ -2384,16 +2458,14 @@ void st_select_lex::init_select()
table_join_options= 0;
in_sum_expr= with_wild= 0;
options= 0;
- sql_cache= SQL_CACHE_UNSPECIFIED;
ftfunc_list_alloc.empty();
inner_sum_func_list= 0;
ftfunc_list= &ftfunc_list_alloc;
- order_list.elements= 0;
- order_list.first= 0;
- order_list.next= &order_list.first;
+ order_list.empty();
/* Set limit and offset to default values */
select_limit= 0; /* denotes the default limit = HA_POS_ERROR */
offset_limit= 0; /* denotes the default offset = 0 */
+ is_set_query_expr_tail= false;
with_sum_func= 0;
with_all_modifier= 0;
is_correlated= 0;
@@ -2459,6 +2531,24 @@ void st_select_lex_node::add_slave(st_select_lex_node *slave_arg)
}
}
+void st_select_lex_node::link_chain_down(st_select_lex_node *first)
+{
+ st_select_lex_node *last_node;
+ st_select_lex_node *node= first;
+ do
+ {
+ last_node= node;
+ node->master= this;
+ node= node->next;
+ } while (node);
+ if ((last_node->next= slave))
+ {
+ slave->prev= &last_node->next;
+ }
+ first->prev= &slave;
+ slave= first;
+}
+
/*
@brief
Substitute this node in select tree for a newly creates node
@@ -2480,7 +2570,6 @@ void st_select_lex_node::substitute_in_tree(st_select_lex_node *subst)
subst->master= master;
}
-
/*
include on level down (but do not link)
@@ -2529,7 +2618,7 @@ void st_select_lex_node::fast_exclude()
// Remove slave structure
for (; slave; slave= slave->next)
slave->fast_exclude();
-
+
prev= NULL; // to ensure correct behavior of st_select_lex_unit::is_excluded()
}
@@ -3011,8 +3100,7 @@ void st_select_lex::print_order(String *str,
else
{
/* replace numeric reference with equivalent for ORDER constant */
- if (order->item[0]->type() == Item::INT_ITEM &&
- order->item[0]->basic_const_item())
+ if (order->item[0]->is_order_clause_position())
{
/* make it expression instead of integer constant */
str->append(STRING_WITH_LEN("''"));
@@ -3206,6 +3294,7 @@ LEX::LEX()
gtid_domain_static_buffer,
initial_gtid_domain_buffer_size,
initial_gtid_domain_buffer_size, 0);
+ unit.slave= &builtin_select;
}
@@ -3232,12 +3321,12 @@ bool LEX::can_be_merged()
// TODO: do not forget implement case when select_lex.table_list.elements==0
/* find non VIEW subqueries/unions */
- bool selects_allow_merge= (select_lex.next_select() == 0 &&
- !(select_lex.uncacheable &
+ bool selects_allow_merge= (first_select_lex()->next_select() == 0 &&
+ !(first_select_lex()->uncacheable &
UNCACHEABLE_RAND));
if (selects_allow_merge)
{
- for (SELECT_LEX_UNIT *tmp_unit= select_lex.first_inner_unit();
+ for (SELECT_LEX_UNIT *tmp_unit= first_select_lex()->first_inner_unit();
tmp_unit;
tmp_unit= tmp_unit->next_unit())
{
@@ -3254,12 +3343,12 @@ bool LEX::can_be_merged()
}
return (selects_allow_merge &&
- select_lex.group_list.elements == 0 &&
- select_lex.having == 0 &&
- select_lex.with_sum_func == 0 &&
- select_lex.table_list.elements >= 1 &&
- !(select_lex.options & SELECT_DISTINCT) &&
- select_lex.select_limit == 0);
+ first_select_lex()->group_list.elements == 0 &&
+ first_select_lex()->having == 0 &&
+ first_select_lex()->with_sum_func == 0 &&
+ first_select_lex()->table_list.elements >= 1 &&
+ !(first_select_lex()->options & SELECT_DISTINCT) &&
+ first_select_lex()->select_limit == 0);
}
@@ -3613,12 +3702,25 @@ void LEX::set_trg_event_type_for_tables()
break;
}
+ if (period_conditions.is_set())
+ {
+ switch (sql_command)
+ {
+ case SQLCOM_DELETE:
+ case SQLCOM_UPDATE:
+ case SQLCOM_REPLACE:
+ new_trg_event_map |= trg2bit(TRG_EVENT_INSERT);
+ default:
+ break;
+ }
+ }
+
/*
Do not iterate over sub-selects, only the tables in the outermost
SELECT_LEX can be modified, if any.
*/
- TABLE_LIST *tables= select_lex.get_table_list();
+ TABLE_LIST *tables= first_select_lex()->get_table_list();
while (tables)
{
@@ -3674,12 +3776,13 @@ TABLE_LIST *LEX::unlink_first_table(bool *link_to_local)
/*
and from local list if it is not empty
*/
- if ((*link_to_local= MY_TEST(select_lex.table_list.first)))
+ if ((*link_to_local= MY_TEST(first_select_lex()->table_list.first)))
{
- select_lex.context.table_list=
- select_lex.context.first_name_resolution_table= first->next_local;
- select_lex.table_list.first= first->next_local;
- select_lex.table_list.elements--; //safety
+ first_select_lex()->context.table_list=
+ first_select_lex()->context.first_name_resolution_table=
+ first->next_local;
+ first_select_lex()->table_list.first= first->next_local;
+ first_select_lex()->table_list.elements--; //safety
first->next_local= 0;
/*
Ensure that the global list has the same first table as the local
@@ -3710,7 +3813,7 @@ TABLE_LIST *LEX::unlink_first_table(bool *link_to_local)
void LEX::first_lists_tables_same()
{
- TABLE_LIST *first_table= select_lex.table_list.first;
+ TABLE_LIST *first_table= first_select_lex()->table_list.first;
if (query_tables != first_table && first_table != 0)
{
TABLE_LIST *next;
@@ -3735,6 +3838,23 @@ void LEX::first_lists_tables_same()
}
}
+void LEX::fix_first_select_number()
+{
+ SELECT_LEX *first= first_select_lex();
+ if (first && first->select_number != 1)
+ {
+ uint num= first->select_number;
+ for (SELECT_LEX *sel= all_selects_list;
+ sel;
+ sel= sel->next_select_in_list())
+ {
+ if (sel->select_number < num)
+ sel->select_number++;
+ }
+ first->select_number= 1;
+ }
+}
+
/*
Link table back that was unlinked with unlink_first_table()
@@ -3760,10 +3880,10 @@ void LEX::link_first_table_back(TABLE_LIST *first,
if (link_to_local)
{
- first->next_local= select_lex.table_list.first;
- select_lex.context.table_list= first;
- select_lex.table_list.first= first;
- select_lex.table_list.elements++; //safety
+ first->next_local= first_select_lex()->table_list.first;
+ first_select_lex()->context.table_list= first;
+ first_select_lex()->table_list.first= first;
+ first_select_lex()->table_list.elements++; //safety
}
}
}
@@ -3792,19 +3912,19 @@ void LEX::cleanup_after_one_table_open()
NOTE: all units will be connected to thd->lex->select_lex, because we
have not UNION on most upper level.
*/
- if (all_selects_list != &select_lex)
+ if (all_selects_list != first_select_lex())
{
derived_tables= 0;
- select_lex.exclude_from_table_unique_test= false;
+ first_select_lex()->exclude_from_table_unique_test= false;
/* cleunup underlying units (units of VIEW) */
- for (SELECT_LEX_UNIT *un= select_lex.first_inner_unit();
+ for (SELECT_LEX_UNIT *un= first_select_lex()->first_inner_unit();
un;
un= un->next_unit())
un->cleanup();
/* reduce all selects list to default state */
- all_selects_list= &select_lex;
+ all_selects_list= first_select_lex();
/* remove underlying units (units of VIEW) subtree */
- select_lex.cut_subtree();
+ first_select_lex()->cut_subtree();
}
}
@@ -4470,7 +4590,7 @@ void SELECT_LEX::update_used_tables()
tab->covering_keys= tab->s->keys_for_keyread;
tab->covering_keys.intersect(tab->keys_in_use_for_query);
/*
- View/derived was merged. Need to recalculate read_set/vcol_set
+ View/derived was merged. Need to recalculate read_set
bitmaps here. For example:
CREATE VIEW v1 AS SELECT f1,f2,f3 FROM t1;
SELECT f1 FROM v1;
@@ -4479,8 +4599,6 @@ void SELECT_LEX::update_used_tables()
be in the read_set.
*/
bitmap_clear_all(tab->read_set);
- if (tab->vcol_set)
- bitmap_clear_all(tab->vcol_set);
break;
}
}
@@ -4688,9 +4806,12 @@ void st_select_lex::set_explain_type(bool on_the_fly)
using_materialization= TRUE;
}
- if (&master_unit()->thd->lex->select_lex == this)
+ if (master_unit()->thd->lex->first_select_lex() == this)
{
- type= is_primary ? "PRIMARY" : "SIMPLE";
+ if (pushdown_select)
+ type= pushed_select_text;
+ else
+ type= is_primary ? "PRIMARY" : "SIMPLE";
}
else
{
@@ -4699,7 +4820,11 @@ void st_select_lex::set_explain_type(bool on_the_fly)
/* If we're a direct child of a UNION, we're the first sibling there */
if (linkage == DERIVED_TABLE_TYPE)
{
- if (is_uncacheable & UNCACHEABLE_DEPENDENT)
+ bool is_pushed_master_unit= master_unit()->derived &&
+ master_unit()->derived->pushdown_derived;
+ if (is_pushed_master_unit)
+ type= pushed_derived_text;
+ else if (is_uncacheable & UNCACHEABLE_DEPENDENT)
type= "LATERAL DERIVED";
else
type= "DERIVED";
@@ -4888,8 +5013,8 @@ bool LEX::save_prep_leaf_tables()
Query_arena *arena= thd->stmt_arena, backup;
arena= thd->activate_stmt_arena_if_needed(&backup);
//It is used for DETETE/UPDATE so top level has only one SELECT
- DBUG_ASSERT(select_lex.next_select() == NULL);
- bool res= select_lex.save_prep_leaf_tables(thd);
+ DBUG_ASSERT(first_select_lex()->next_select() == NULL);
+ bool res= first_select_lex()->save_prep_leaf_tables(thd);
if (arena)
thd->restore_active_arena(arena, &backup);
@@ -5245,8 +5370,13 @@ bool LEX::is_partition_management() const
SELECT_LEX *LEX::exclude_last_select()
{
- DBUG_ENTER("SELECT_LEX::exclude_last_select");
- SELECT_LEX *exclude= current_select;
+ return exclude_not_first_select(current_select);
+}
+
+SELECT_LEX *LEX::exclude_not_first_select(SELECT_LEX *exclude)
+{
+ DBUG_ENTER("LEX::exclude_not_first_select");
+ DBUG_PRINT("enter", ("exclude %p #%u", exclude, exclude->select_number));
SELECT_LEX_UNIT *unit= exclude->master_unit();
SELECT_LEX *sl;
DBUG_ASSERT(unit->first_select() != exclude);
@@ -5257,87 +5387,271 @@ SELECT_LEX *LEX::exclude_last_select()
DBUG_PRINT("info", ("excl: %p unit: %p prev: %p", exclude, unit, sl));
if (!sl)
DBUG_RETURN(NULL);
- DBUG_ASSERT(exclude->next_select() == NULL);
- exclude->exclude_from_tree();
+ DBUG_ASSERT(&sl->next == exclude->prev);
+
+ exclude->prev= NULL;
+
current_select= sl;
DBUG_RETURN(exclude);
}
-/**
- Put given (new) SELECT_LEX level below after currect (last) SELECT
+SELECT_LEX_UNIT *LEX::alloc_unit()
+{
+ SELECT_LEX_UNIT *unit;
+ DBUG_ENTER("LEX::alloc_unit");
+ if (!(unit= new (thd->mem_root) SELECT_LEX_UNIT()))
+ DBUG_RETURN(NULL);
- LAST SELECT -> DUMMY SELECT
- |
- V
- NEW UNIT
- |
- V
- NEW SELECT
+ unit->init_query();
+ /* TODO: reentrant problem */
+ unit->thd= thd;
+ unit->link_next= 0;
+ unit->link_prev= 0;
+ /* TODO: remove return_to */
+ unit->return_to= NULL;
+ DBUG_RETURN(unit);
+}
- SELECT (*LAST*) ... FROM (SELECT (*NEW*) ... )
- @param nselect Select to put one level below
+SELECT_LEX *LEX::alloc_select(bool select)
+{
+ SELECT_LEX *select_lex;
+ DBUG_ENTER("LEX::alloc_select");
+ if (!(select_lex= new (thd->mem_root) SELECT_LEX()))
+ DBUG_RETURN(NULL);
+ DBUG_PRINT("info", ("Allocate select: %p #%u statement lex: %p",
+ select_lex, thd->lex->stmt_lex->current_select_number,
+ thd->lex->stmt_lex));
+ /*
+ TODO: move following init to constructor when we get rid of builtin
+ select
+ */
+ select_lex->select_number= ++thd->lex->stmt_lex->current_select_number;
+ select_lex->parent_lex= this; /* Used in init_query. */
+ select_lex->init_query();
+ if (select)
+ select_lex->init_select();
+ select_lex->nest_level_base= &this->unit;
+ select_lex->include_global((st_select_lex_node**)&all_selects_list);
+ select_lex->context.resolve_in_select_list= TRUE;
+ DBUG_RETURN(select_lex);
+}
- @retval TRUE Error
- @retval FALSE OK
-*/
+SELECT_LEX_UNIT *
+LEX::create_unit(SELECT_LEX *first_sel)
+{
+ SELECT_LEX_UNIT *unit;
+ DBUG_ENTER("LEX::create_unit");
+
+ unit = first_sel->master_unit();
+
+ if (!unit && !(unit= alloc_unit()))
+ DBUG_RETURN(NULL);
+
+ unit->register_select_chain(first_sel);
+ if (first_sel->next_select())
+ {
+ unit->reset_distinct();
+ DBUG_ASSERT(!unit->fake_select_lex);
+ if (unit->add_fake_select_lex(thd))
+ DBUG_RETURN(NULL);
+ }
+ DBUG_RETURN(unit);
+}
-bool LEX::add_unit_in_brackets(SELECT_LEX *nselect)
+SELECT_LEX_UNIT *
+SELECT_LEX::attach_selects_chain(SELECT_LEX *first_sel,
+ Name_resolution_context *context)
{
- DBUG_ENTER("LEX::add_unit_in_brackets");
- bool distinct= nselect->master_unit()->union_distinct == nselect;
- bool rc= add_select_to_union_list(distinct, nselect->linkage, 0);
- if (rc)
- DBUG_RETURN(TRUE);
- SELECT_LEX* dummy_select= current_select;
- dummy_select->automatic_brackets= TRUE;
- dummy_select->linkage= nselect->linkage;
+ SELECT_LEX_UNIT *unit;
+ DBUG_ENTER("SELECT_LEX::attach_select_chain");
+
+ if (!(unit= parent_lex->alloc_unit()))
+ DBUG_RETURN(NULL);
+
+ unit->register_select_chain(first_sel);
+ register_unit(unit, context);
+ if (first_sel->next_select())
+ {
+ unit->reset_distinct();
+ DBUG_ASSERT(!unit->fake_select_lex);
+ if (unit->add_fake_select_lex(parent_lex->thd))
+ DBUG_RETURN(NULL);
+ }
+
+ DBUG_RETURN(unit);
+}
+
+SELECT_LEX *
+LEX::wrap_unit_into_derived(SELECT_LEX_UNIT *unit)
+{
+ SELECT_LEX *wrapping_sel;
+ Table_ident *ti;
+ DBUG_ENTER("LEX::wrap_unit_into_derived");
+
+ if (!(wrapping_sel= alloc_select(TRUE)))
+ DBUG_RETURN(NULL);
+ Name_resolution_context *context= &wrapping_sel->context;
+ context->init();
+ wrapping_sel->automatic_brackets= FALSE;
+
+ wrapping_sel->register_unit(unit, context);
/* stuff dummy SELECT * FROM (...) */
+
+ if (push_select(wrapping_sel)) // for Items & TABLE_LIST
+ DBUG_RETURN(NULL);
+
+ /* add SELECT list*/
+ {
+ Item *item= new (thd->mem_root)
+ Item_field(thd, context, NULL, NULL, &star_clex_str);
+ if (item == NULL)
+ goto err;
+ if (add_item_to_list(thd, item))
+ goto err;
+ (wrapping_sel->with_wild)++;
+ }
+
+ unit->first_select()->set_linkage(DERIVED_TABLE_TYPE);
+
+ ti= new (thd->mem_root) Table_ident(unit);
+ if (ti == NULL)
+ goto err;
+ {
+ TABLE_LIST *table_list;
+ LEX_CSTRING alias;
+ if (wrapping_sel->make_unique_derived_name(thd, &alias))
+ goto err;
+
+ if (!(table_list= wrapping_sel->add_table_to_list(thd, ti, &alias,
+ 0, TL_READ,
+ MDL_SHARED_READ)))
+ goto err;
+
+ context->resolve_in_table_list_only(table_list);
+ wrapping_sel->add_joined_table(table_list);
+ }
+
+ pop_select();
+
+ derived_tables|= DERIVED_SUBQUERY;
+
+ DBUG_RETURN(wrapping_sel);
+
+err:
+ pop_select();
+ DBUG_RETURN(NULL);
+}
+
+SELECT_LEX *LEX::wrap_select_chain_into_derived(SELECT_LEX *sel)
+{
+ SELECT_LEX *dummy_select;
+ SELECT_LEX_UNIT *unit;
+ Table_ident *ti;
+ DBUG_ENTER("LEX::wrap_select_chain_into_derived");
+
+ if (!(dummy_select= alloc_select(TRUE)))
+ DBUG_RETURN(NULL);
Name_resolution_context *context= &dummy_select->context;
- context->init();
+ dummy_select->automatic_brackets= FALSE;
+ sel->distinct= TRUE; // First select has not this attribute (safety)
+
+ if (!(unit= dummy_select->attach_selects_chain(sel, context)))
+ DBUG_RETURN(NULL);
+
+ /* stuff dummy SELECT * FROM (...) */
+
+ if (push_select(dummy_select)) // for Items & TABLE_LIST
+ DBUG_RETURN(NULL);
/* add SELECT list*/
- Item *item= new (thd->mem_root)
- Item_field(thd, context, NULL, NULL, &star_clex_str);
- if (unlikely(item == NULL))
- DBUG_RETURN(TRUE);
- if (unlikely(add_item_to_list(thd, item)))
- DBUG_RETURN(TRUE);
- (dummy_select->with_wild)++;
+ {
+ Item *item= new (thd->mem_root)
+ Item_field(thd, context, NULL, NULL, &star_clex_str);
+ if (item == NULL)
+ goto err;
+ if (add_item_to_list(thd, item))
+ goto err;
+ (dummy_select->with_wild)++;
+ }
- rc= mysql_new_select(this, 1, nselect);
- nselect->linkage= DERIVED_TABLE_TYPE;
- DBUG_ASSERT(nselect->outer_select() == dummy_select);
+ sel->set_linkage(DERIVED_TABLE_TYPE);
- current_select= dummy_select;
+ ti= new (thd->mem_root) Table_ident(unit);
+ if (ti == NULL)
+ goto err;
+ {
+ TABLE_LIST *table_list;
+ LEX_CSTRING alias;
+ if (dummy_select->make_unique_derived_name(thd, &alias))
+ goto err;
- SELECT_LEX_UNIT *unit= nselect->master_unit();
- Table_ident *ti= new (thd->mem_root) Table_ident(unit);
- if (unlikely(ti == NULL))
- DBUG_RETURN(TRUE);
- char buff[10];
- LEX_CSTRING alias;
- alias.length= my_snprintf(buff, sizeof(buff),
- "__%u", dummy_select->select_number);
- alias.str= thd->strmake(buff, alias.length);
- if (unlikely(!alias.str))
- DBUG_RETURN(TRUE);
+ if (!(table_list= dummy_select->add_table_to_list(thd, ti, &alias,
+ 0, TL_READ,
+ MDL_SHARED_READ)))
+ goto err;
- TABLE_LIST *table_list;
- if (unlikely(!(table_list=
- dummy_select->add_table_to_list(thd, ti, &alias,
- 0, TL_READ,
- MDL_SHARED_READ))))
- DBUG_RETURN(TRUE);
- context->resolve_in_table_list_only(table_list);
- dummy_select->add_joined_table(table_list);
+ context->resolve_in_table_list_only(table_list);
+ dummy_select->add_joined_table(table_list);
+ }
+
+ pop_select();
derived_tables|= DERIVED_SUBQUERY;
- current_select= nselect;
- DBUG_RETURN(rc);
+ DBUG_RETURN(dummy_select);
+
+err:
+ pop_select();
+ DBUG_RETURN(NULL);
+}
+
+bool LEX::push_context(Name_resolution_context *context)
+{
+ DBUG_ENTER("LEX::push_context");
+ DBUG_PRINT("info", ("Context: %p Select: %p (%d)",
+ context, context->select_lex,
+ (context->select_lex ?
+ context->select_lex->select_number:
+ 0)));
+ bool res= context_stack.push_front(context, thd->mem_root);
+ DBUG_RETURN(res);
+}
+
+
+Name_resolution_context *LEX::pop_context()
+{
+ DBUG_ENTER("LEX::pop_context");
+ Name_resolution_context *context= context_stack.pop();
+ DBUG_PRINT("info", ("Context: %p Select: %p (%d)",
+ context, context->select_lex,
+ (context->select_lex ?
+ context->select_lex->select_number:
+ 0)));
+ DBUG_RETURN(context);
+}
+
+
+SELECT_LEX *LEX::create_priority_nest(SELECT_LEX *first_in_nest)
+{
+ DBUG_ENTER("LEX::create_priority_nest");
+ DBUG_ASSERT(first_in_nest->first_nested);
+ enum sub_select_type wr_unit_type= first_in_nest->get_linkage();
+ bool wr_distinct= first_in_nest->distinct;
+ SELECT_LEX *attach_to= first_in_nest->first_nested;
+ attach_to->cut_next();
+ SELECT_LEX *wrapper= wrap_select_chain_into_derived(first_in_nest);
+ if (wrapper)
+ {
+ first_in_nest->first_nested= NULL;
+ wrapper->set_linkage_and_distinct(wr_unit_type, wr_distinct);
+ wrapper->first_nested= attach_to->first_nested;
+ wrapper->set_master_unit(attach_to->master_unit());
+ attach_to->link_neighbour(wrapper);
+ }
+ DBUG_RETURN(wrapper);
}
@@ -5352,7 +5666,7 @@ bool LEX::add_unit_in_brackets(SELECT_LEX *nselect)
void LEX::check_automatic_up(enum sub_select_type type)
{
if (type != INTERSECT_TYPE &&
- current_select->linkage == INTERSECT_TYPE &&
+ current_select->get_linkage() == INTERSECT_TYPE &&
current_select->outer_select() &&
current_select->outer_select()->automatic_brackets)
{
@@ -5822,10 +6136,17 @@ bool LEX::sp_for_loop_implicit_cursor_statement(THD *thd,
bounds->m_index->sp_lex_in_use= true;
sphead->reset_lex(thd, bounds->m_index);
DBUG_ASSERT(thd->lex != this);
- if (unlikely(!(item=
- new (thd->mem_root) Item_field(thd,
- thd->lex->current_context(),
- NullS, NullS, &name))))
+ /*
+ We pass NULL as Name_resolution_context here.
+ It's OK, fix_fields() will not be called for this Item_field created.
+ Item_field is only needed for LEX::sp_for_loop_cursor_declarations()
+ and is used to transfer the loop index variable name, "rec" in this example:
+ FOR rec IN (SELECT * FROM t1)
+ DO
+ SELECT rec.a, rec.b;
+ END FOR;
+ */
+ if (!(item= new (thd->mem_root) Item_field(thd, NULL, NullS, NullS, &name)))
return true;
bounds->m_index->set_item_and_free_list(item, NULL);
if (thd->lex->sphead->restore_lex(thd))
@@ -5932,10 +6253,22 @@ bool LEX::sp_for_loop_intrange_declarations(THD *thd, Lex_for_loop_st *loop,
const LEX_CSTRING *index,
const Lex_for_loop_bounds_st &bounds)
{
- if (unlikely(!(loop->m_index=
- bounds.m_index->
- sp_add_for_loop_variable(thd, index,
- bounds.m_index->get_item()))))
+ Item *item;
+ if ((item= bounds.m_index->get_item())->type() == Item::FIELD_ITEM)
+ {
+ // We're here is the lower bound is unknown identifier
+ my_error(ER_SP_UNDECLARED_VAR, MYF(0), item->full_name());
+ return true;
+ }
+ if ((item= bounds.m_target_bound->get_item())->type() == Item::FIELD_ITEM)
+ {
+ // We're here is the upper bound is unknown identifier
+ my_error(ER_SP_UNDECLARED_VAR, MYF(0), item->full_name());
+ return true;
+ }
+ if (!(loop->m_index=
+ bounds.m_index->sp_add_for_loop_variable(thd, index,
+ bounds.m_index->get_item())))
return true;
if (unlikely(!(loop->m_target_bound=
bounds.m_target_bound->
@@ -5961,6 +6294,7 @@ bool LEX::sp_for_loop_cursor_declarations(THD *thd,
LEX_CSTRING name;
uint coffs, param_count= 0;
const sp_pcursor *pcursor;
+ DBUG_ENTER("LEX::sp_for_loop_cursor_declarations");
if ((item_splocal= item->get_item_splocal()))
name= item_splocal->m_name;
@@ -5992,23 +6326,23 @@ bool LEX::sp_for_loop_cursor_declarations(THD *thd,
else
{
thd->parse_error();
- return true;
+ DBUG_RETURN(true);
}
if (unlikely(!(pcursor= spcont->find_cursor_with_error(&name, &coffs,
false)) ||
pcursor->check_param_count_with_error(param_count)))
- return true;
+ DBUG_RETURN(true);
if (!(loop->m_index= sp_add_for_loop_cursor_variable(thd, index,
pcursor, coffs,
bounds.m_index,
item_func_sp)))
- return true;
+ DBUG_RETURN(true);
loop->m_target_bound= NULL;
loop->m_direction= bounds.m_direction;
loop->m_cursor_offset= coffs;
loop->m_implicit_cursor= bounds.m_implicit_cursor;
- return false;
+ DBUG_RETURN(false);
}
@@ -6300,13 +6634,14 @@ sp_name *LEX::make_sp_name(THD *thd, const LEX_CSTRING *name1,
sp_head *LEX::make_sp_head(THD *thd, const sp_name *name,
- const Sp_handler *sph)
+ const Sp_handler *sph,
+ enum_sp_aggregate_type agg_type)
{
sp_package *package= get_sp_package();
sp_head *sp;
/* Order is important here: new - reset - init */
- if (likely((sp= sp_head::create(package, sph))))
+ if (likely((sp= sp_head::create(package, sph, agg_type))))
{
sp->reset_thd_mem_root(thd);
sp->init(this);
@@ -6329,7 +6664,8 @@ sp_head *LEX::make_sp_head(THD *thd, const sp_name *name,
sp_head *LEX::make_sp_head_no_recursive(THD *thd, const sp_name *name,
- const Sp_handler *sph)
+ const Sp_handler *sph,
+ enum_sp_aggregate_type agg_type)
{
sp_package *package= thd->lex->get_sp_package();
/*
@@ -6347,13 +6683,13 @@ sp_head *LEX::make_sp_head_no_recursive(THD *thd, const sp_name *name,
(package &&
(sph == &sp_handler_package_procedure ||
sph == &sp_handler_package_function)))
- return make_sp_head(thd, name, sph);
+ return make_sp_head(thd, name, sph, agg_type);
my_error(ER_SP_NO_RECURSIVE_CREATE, MYF(0), sph->type_str());
return NULL;
}
-bool LEX::sp_body_finalize_procedure(THD *thd)
+bool LEX::sp_body_finalize_routine(THD *thd)
{
if (sphead->check_unresolved_goto())
return true;
@@ -6363,22 +6699,61 @@ bool LEX::sp_body_finalize_procedure(THD *thd)
}
+bool LEX::sp_body_finalize_procedure(THD *thd)
+{
+ return sphead->check_group_aggregate_instructions_forbid() ||
+ sp_body_finalize_routine(thd);
+}
+
+
+bool LEX::sp_body_finalize_procedure_standalone(THD *thd,
+ const sp_name *end_name)
+{
+ return sp_body_finalize_procedure(thd) ||
+ sphead->check_standalone_routine_end_name(end_name);
+}
+
+
bool LEX::sp_body_finalize_function(THD *thd)
{
- if (sphead->is_not_allowed_in_function("function"))
+ if (sphead->is_not_allowed_in_function("function") ||
+ sphead->check_group_aggregate_instructions_function())
return true;
if (!(sphead->m_flags & sp_head::HAS_RETURN))
{
my_error(ER_SP_NORETURN, MYF(0), ErrConvDQName(sphead).ptr());
return true;
}
- if (sp_body_finalize_procedure(thd))
+ if (sp_body_finalize_routine(thd))
return true;
(void) is_native_function_with_warn(thd, &sphead->m_name);
return false;
}
+bool LEX::sp_body_finalize_trigger(THD *thd)
+{
+ return sphead->is_not_allowed_in_function("trigger") ||
+ sp_body_finalize_procedure(thd);
+}
+
+
+bool LEX::sp_body_finalize_event(THD *thd)
+{
+ event_parse_data->body_changed= true;
+ return sp_body_finalize_procedure(thd);
+}
+
+
+bool LEX::stmt_create_stored_function_finalize_standalone(const sp_name *end_name)
+{
+ if (sphead->check_standalone_routine_end_name(end_name))
+ return true;
+ stmt_create_routine_finalize();
+ return false;
+}
+
+
bool LEX::sp_block_with_exceptions_finalize_declarations(THD *thd)
{
/*
@@ -6670,7 +7045,7 @@ bool LEX::maybe_start_compound_statement(THD *thd)
{
if (!sphead)
{
- if (!make_sp_head(thd, NULL, &sp_handler_procedure))
+ if (!make_sp_head(thd, NULL, &sp_handler_procedure, DEFAULT_AGGREGATE))
return true;
sphead->set_suid(SP_IS_NOT_SUID);
sphead->set_body_start(thd, thd->m_parser_state->m_lip.get_cpp_tok_start());
@@ -6880,7 +7255,6 @@ Item_param *LEX::add_placeholder(THD *thd, const LEX_CSTRING *name,
my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));
return NULL;
}
-
Query_fragment pos(thd, sphead, start, end);
Item_param *item= new (thd->mem_root) Item_param(thd, name,
pos.pos(), pos.length());
@@ -6911,6 +7285,38 @@ bool LEX::add_resignal_statement(THD *thd, const sp_condition_value *v)
}
+/*
+ Make an Item when an identifier is found in the FOR loop bounds:
+ FOR rec IN cursor
+ FOR var IN var1 .. xxx
+ FOR var IN row1.field1 .. xxx
+ When we parse the first expression after the "IN" keyword,
+ we don't know yet if it's a cursor name, or a scalar SP variable name,
+ or a field of a ROW SP variable. Here we create Item_field to remember
+ the fully qualified name. Later sp_for_loop_cursor_declarations()
+ detects how to treat this name properly.
+*/
+Item *LEX::create_item_for_loop_bound(THD *thd,
+ const LEX_CSTRING *a,
+ const LEX_CSTRING *b,
+ const LEX_CSTRING *c)
+{
+ /*
+ Pass NULL as the name resolution context.
+ This is OK, fix_fields() won't be called for this Item_field.
+ */
+ return new (thd->mem_root) Item_field(thd, NULL, a->str, b->str, c);
+}
+
+
+bool LEX::check_expr_allows_fields_or_error(THD *thd, const char *name) const
+{
+ if (select_stack_top > 0)
+ return false; // OK, fields are allowed
+ my_error(ER_BAD_FIELD_ERROR, MYF(0), name, thd->where);
+ return true; // Error, fields are not allowed
+}
+
Item *LEX::create_item_ident_nospvar(THD *thd,
const Lex_ident_sys_st *a,
const Lex_ident_sys_st *b)
@@ -6933,12 +7339,11 @@ Item *LEX::create_item_ident_nospvar(THD *thd,
my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), a->str, thd->where);
return NULL;
}
- if ((current_select->parsing_place != IN_HAVING) ||
- (current_select->get_in_sum_expr() > 0))
- return new (thd->mem_root) Item_field(thd, current_context(),
- NullS, a->str, b);
- return new (thd->mem_root) Item_ref(thd, current_context(),
- NullS, a->str, b);
+
+ if (current_select->parsing_place == FOR_LOOP_BOUND)
+ return create_item_for_loop_bound(thd, &null_clex_str, a, b);
+
+ return create_item_ident_field(thd, NullS, a->str, b);
}
@@ -7150,12 +7555,11 @@ Item *LEX::create_item_ident(THD *thd,
my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), b->str, thd->where);
return NULL;
}
- if (current_select->parsing_place != IN_HAVING ||
- current_select->get_in_sum_expr() > 0)
- return new (thd->mem_root) Item_field(thd, current_context(),
- schema, b->str, c);
- return new (thd->mem_root) Item_ref(thd, current_context(),
- schema, b->str, c);
+
+ if (current_select->parsing_place == FOR_LOOP_BOUND)
+ return create_item_for_loop_bound(thd, &null_clex_str, b, c);
+
+ return create_item_ident_field(thd, schema, b->str, c);
}
@@ -7189,11 +7593,9 @@ Item *LEX::create_item_limit(THD *thd, const Lex_ident_cli_st *ca)
#endif
safe_to_cache_query= 0;
- if (unlikely(item->type() != Item::INT_ITEM))
- {
- my_error(ER_WRONG_SPVAR_TYPE_IN_LIMIT, MYF(0));
+ if (!item->is_valid_limit_clause_variable_with_error())
return NULL;
- }
+
item->limit_clause_param= true;
return item;
}
@@ -7223,11 +7625,8 @@ Item *LEX::create_item_limit(THD *thd,
if (unlikely(!(item= create_item_spvar_row_field(thd, rh, &sa, &sb, spv,
ca->pos(), cb->end()))))
return NULL;
- if (unlikely(item->type() != Item::INT_ITEM))
- {
- my_error(ER_WRONG_SPVAR_TYPE_IN_LIMIT, MYF(0));
+ if (!item->is_valid_limit_clause_variable_with_error())
return NULL;
- }
item->limit_clause_param= true;
return item;
}
@@ -7247,15 +7646,20 @@ bool LEX::set_user_variable(THD *thd, const LEX_CSTRING *name, Item *val)
}
-Item *LEX::create_item_ident_nosp(THD *thd, Lex_ident_sys_st *name)
+Item *LEX::create_item_ident_field(THD *thd, const char *db,
+ const char *table,
+ const Lex_ident_sys_st *name)
{
+ if (check_expr_allows_fields_or_error(thd, name->str))
+ return NULL;
+
if (current_select->parsing_place != IN_HAVING ||
current_select->get_in_sum_expr() > 0)
return new (thd->mem_root) Item_field(thd, current_context(),
- NullS, NullS, name);
+ db, table, name);
return new (thd->mem_root) Item_ref(thd, current_context(),
- NullS, NullS, name);
+ db, table, name);
}
@@ -7269,6 +7673,7 @@ Item *LEX::create_item_ident_sp(THD *thd, Lex_ident_sys_st *name,
const Sp_rcontext_handler *rh;
sp_variable *spv;
+ uint unused_off;
DBUG_ASSERT(spcont);
DBUG_ASSERT(sphead);
if ((spv= find_variable(name, &rh)))
@@ -7306,6 +7711,20 @@ Item *LEX::create_item_ident_sp(THD *thd, Lex_ident_sys_st *name,
if (lex_string_eq(name, STRING_WITH_LEN("SQLERRM")))
return new (thd->mem_root) Item_func_sqlerrm(thd);
}
+
+ if (fields_are_impossible() &&
+ (current_select->parsing_place != FOR_LOOP_BOUND ||
+ spcont->find_cursor(name, &unused_off, false) == NULL))
+ {
+ // we are out of SELECT or FOR so it is syntax error
+ my_error(ER_SP_UNDECLARED_VAR, MYF(0), name->str);
+ return NULL;
+ }
+
+ if (current_select->parsing_place == FOR_LOOP_BOUND)
+ return create_item_for_loop_bound(thd, &null_clex_str, &null_clex_str,
+ name);
+
return create_item_ident_nosp(thd, name);
}
@@ -7577,46 +7996,80 @@ void binlog_unsafe_map_init()
/**
@brief
- Finding fiels that are used in the GROUP BY of this st_select_lex
+ Collect fiels that are used in the GROUP BY of this st_select_lex
@param thd The thread handle
@details
- This method looks through the fields which are used in the GROUP BY of this
- st_select_lex and saves this fields.
+ This method looks through the fields that are used in the GROUP BY of this
+ st_select_lex and saves info on these fields.
*/
-void st_select_lex::collect_grouping_fields(THD *thd,
- ORDER *grouping_list)
+void st_select_lex::collect_grouping_fields_for_derived(THD *thd,
+ ORDER *grouping_list)
{
grouping_tmp_fields.empty();
List_iterator<Item> li(join->fields_list);
Item *item= li++;
- for (uint i= 0; i < master_unit()->derived->table->s->fields; i++, (item=li++))
+ for (uint i= 0; i < master_unit()->derived->table->s->fields;
+ i++, (item=li++))
{
for (ORDER *ord= grouping_list; ord; ord= ord->next)
{
if ((*ord->item)->eq((Item*)item, 0))
{
- Grouping_tmp_field *grouping_tmp_field=
- new Grouping_tmp_field(master_unit()->derived->table->field[i], item);
+ Field_pair *grouping_tmp_field=
+ new Field_pair(master_unit()->derived->table->field[i], item);
grouping_tmp_fields.push_back(grouping_tmp_field);
}
}
}
}
+
+/**
+ Collect fields that are used in the GROUP BY of this SELECT
+*/
+
+bool st_select_lex::collect_grouping_fields(THD *thd)
+{
+ grouping_tmp_fields.empty();
+
+ for (ORDER *ord= group_list.first; ord; ord= ord->next)
+ {
+ Item *item= *ord->item;
+ if (item->type() != Item::FIELD_ITEM &&
+ !(item->type() == Item::REF_ITEM &&
+ item->real_type() == Item::FIELD_ITEM &&
+ ((((Item_ref *) item)->ref_type() == Item_ref::VIEW_REF) ||
+ (((Item_ref *) item)->ref_type() == Item_ref::REF))))
+ continue;
+
+ Field_pair *grouping_tmp_field=
+ new Field_pair(((Item_field *)item->real_item())->field, item);
+ if (grouping_tmp_fields.push_back(grouping_tmp_field, thd->mem_root))
+ return false;
+ }
+ if (grouping_tmp_fields.elements)
+ return false;
+ return true;
+}
+
+
/**
@brief
For a condition check possibility of exraction a formula over grouping fields
-
- @param cond The condition whose subformulas are to be analyzed
+
+ @param thd The thread handle
+ @param cond The condition whose subformulas are to be analyzed
+ @param checker The checker callback function to be applied to the nodes
+ of the tree of the object
@details
This method traverses the AND-OR condition cond and for each subformula of
the condition it checks whether it can be usable for the extraction of a
condition over the grouping fields of this select. The method uses
- the call-back parameter check_processor to ckeck whether a primary formula
+ the call-back parameter checker to check whether a primary formula
depends only on grouping fields.
The subformulas that are not usable are marked with the flag NO_EXTRACTION_FL.
The subformulas that can be entierly extracted are marked with the flag
@@ -7630,13 +8083,17 @@ void st_select_lex::collect_grouping_fields(THD *thd,
*/
void
-st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
- TABLE_LIST *derived)
+st_select_lex::check_cond_extraction_for_grouping_fields(THD *thd, Item *cond)
{
+ if (cond->get_extraction_flag() == NO_EXTRACTION_FL)
+ return;
cond->clear_extraction_flag();
if (cond->type() == Item::COND_ITEM)
{
- bool and_cond= ((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC;
+ Item_cond_and *and_cond=
+ (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC) ?
+ ((Item_cond_and*) cond) : 0;
+
List<Item> *arg_list= ((Item_cond*) cond)->argument_list();
List_iterator<Item> li(*arg_list);
uint count= 0; // to count items not containing NO_EXTRACTION_FL
@@ -7644,7 +8101,7 @@ st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
Item *item;
while ((item=li++))
{
- check_cond_extraction_for_grouping_fields(item, derived);
+ check_cond_extraction_for_grouping_fields(thd, item);
if (item->get_extraction_flag() != NO_EXTRACTION_FL)
{
count++;
@@ -7657,7 +8114,9 @@ st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
if ((and_cond && count == 0) || item)
cond->set_extraction_flag(NO_EXTRACTION_FL);
if (count_full == arg_list->elements)
+ {
cond->set_extraction_flag(FULL_EXTRACTION_FL);
+ }
if (cond->get_extraction_flag() != 0)
{
li.rewind();
@@ -7667,7 +8126,7 @@ st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
}
else
{
- int fl= cond->excl_dep_on_grouping_fields(this) ?
+ int fl= cond->excl_dep_on_grouping_fields(this) && !cond->is_expensive() ?
FULL_EXTRACTION_FL : NO_EXTRACTION_FL;
cond->set_extraction_flag(fl);
}
@@ -7693,7 +8152,7 @@ st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
to figure out whether a subformula depends only on these fields or not.
@note
The built condition C is always implied by the condition cond
- (cond => C). The method tries to build the most restictive such
+ (cond => C). The method tries to build the least restictive such
condition (i.e. for any other condition C' such that cond => C'
we have C => C').
@note
@@ -7769,6 +8228,142 @@ Item *st_select_lex::build_cond_for_grouping_fields(THD *thd, Item *cond,
}
+bool st_select_lex::set_nest_level(int new_nest_level)
+{
+ DBUG_ENTER("st_select_lex::set_nest_level");
+ DBUG_PRINT("enter", ("select #%d %p nest level: %d",
+ select_number, this, new_nest_level));
+ if (new_nest_level > (int) MAX_SELECT_NESTING)
+ {
+ my_error(ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+ nest_level= new_nest_level;
+ new_nest_level++;
+ for (SELECT_LEX_UNIT *u= first_inner_unit(); u; u= u->next_unit())
+ {
+ if (u->set_nest_level(new_nest_level))
+ DBUG_RETURN(TRUE);
+ }
+ DBUG_RETURN(FALSE);
+}
+
+bool st_select_lex_unit::set_nest_level(int new_nest_level)
+{
+ DBUG_ENTER("st_select_lex_unit::set_nest_level");
+ for(SELECT_LEX *sl= first_select(); sl; sl= sl->next_select())
+ {
+ if (sl->set_nest_level(new_nest_level))
+ DBUG_RETURN(TRUE);
+ }
+ if (fake_select_lex &&
+ fake_select_lex->set_nest_level(new_nest_level))
+ DBUG_RETURN(TRUE);
+ DBUG_RETURN(FALSE);
+}
+
+
+bool st_select_lex::check_parameters(SELECT_LEX *main_select)
+{
+ DBUG_ENTER("st_select_lex::check_parameters");
+ DBUG_PRINT("enter", ("select #%d %p nest level: %d",
+ select_number, this, nest_level));
+
+
+ if ((options & OPTION_PROCEDURE_CLAUSE) &&
+ (!parent_lex->selects_allow_procedure ||
+ next_select() != NULL ||
+ this != master_unit()->first_select() ||
+ nest_level != 0))
+ {
+ my_error(ER_CANT_USE_OPTION_HERE, MYF(0), "PROCEDURE");
+ DBUG_RETURN(TRUE);
+ }
+
+ if ((options & SELECT_HIGH_PRIORITY) && this != main_select)
+ {
+ my_error(ER_CANT_USE_OPTION_HERE, MYF(0), "HIGH_PRIORITY");
+ DBUG_RETURN(TRUE);
+ }
+ if ((options & OPTION_BUFFER_RESULT) && this != main_select)
+ {
+ my_error(ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_BUFFER_RESULT");
+ DBUG_RETURN(TRUE);
+ }
+ if ((options & OPTION_FOUND_ROWS) && this != main_select)
+ {
+ my_error(ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_CALC_FOUND_ROWS");
+ DBUG_RETURN(TRUE);
+ }
+ if (options & OPTION_NO_QUERY_CACHE)
+ {
+ /*
+ Allow this flag only on the first top-level SELECT statement, if
+ SQL_CACHE wasn't specified.
+ */
+ if (this != main_select)
+ {
+ my_error(ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_NO_CACHE");
+ DBUG_RETURN(TRUE);
+ }
+ if (parent_lex->sql_cache == LEX::SQL_CACHE)
+ {
+ my_error(ER_WRONG_USAGE, MYF(0), "SQL_CACHE", "SQL_NO_CACHE");
+ DBUG_RETURN(TRUE);
+ }
+ parent_lex->safe_to_cache_query=0;
+ parent_lex->sql_cache= LEX::SQL_NO_CACHE;
+ }
+ if (options & OPTION_TO_QUERY_CACHE)
+ {
+ /*
+ Allow this flag only on the first top-level SELECT statement, if
+ SQL_NO_CACHE wasn't specified.
+ */
+ if (this != main_select)
+ {
+ my_error(ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_CACHE");
+ DBUG_RETURN(TRUE);
+ }
+ if (parent_lex->sql_cache == LEX::SQL_NO_CACHE)
+ {
+ my_error(ER_WRONG_USAGE, MYF(0), "SQL_NO_CACHE", "SQL_CACHE");
+ DBUG_RETURN(TRUE);
+ }
+ parent_lex->safe_to_cache_query=1;
+ parent_lex->sql_cache= LEX::SQL_CACHE;
+ }
+
+ for (SELECT_LEX_UNIT *u= first_inner_unit(); u; u= u->next_unit())
+ {
+ if (u->check_parameters(main_select))
+ DBUG_RETURN(TRUE);
+ }
+ DBUG_RETURN(FALSE);
+}
+
+
+bool st_select_lex_unit::check_parameters(SELECT_LEX *main_select)
+{
+ for(SELECT_LEX *sl= first_select(); sl; sl= sl->next_select())
+ {
+ if (sl->check_parameters(main_select))
+ return TRUE;
+ }
+ return fake_select_lex && fake_select_lex->check_parameters(main_select);
+}
+
+
+bool LEX::check_main_unit_semantics()
+{
+ if (unit.set_nest_level(0) ||
+ unit.check_parameters(first_select_lex()))
+ return TRUE;
+ if (check_cte_dependencies_and_resolve_references())
+ return TRUE;
+ return FALSE;
+}
+
int set_statement_var_if_exists(THD *thd, const char *var_name,
size_t var_name_length, ulonglong value)
{
@@ -7819,14 +8414,23 @@ bool LEX::sp_add_cfetch(THD *thd, const LEX_CSTRING *name)
}
+bool LEX::sp_add_agg_cfetch()
+{
+ sphead->m_flags|= sp_head::HAS_AGGREGATE_INSTR;
+ sp_instr_agg_cfetch *i=
+ new (thd->mem_root) sp_instr_agg_cfetch(sphead->instructions(), spcont);
+ return i == NULL || sphead->add_instr(i);
+}
+
+
bool LEX::create_or_alter_view_finalize(THD *thd, Table_ident *table_ident)
{
sql_command= SQLCOM_CREATE_VIEW;
/* first table in list is target VIEW name */
- if (unlikely(!select_lex.add_table_to_list(thd, table_ident, NULL,
+ if (!first_select_lex()->add_table_to_list(thd, table_ident, NULL,
TL_OPTION_UPDATING,
TL_IGNORE,
- MDL_EXCLUSIVE)))
+ MDL_EXCLUSIVE))
return true;
query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
return false;
@@ -8008,6 +8612,7 @@ bool LEX::create_package_finalize(THD *thd,
exp ? ErrConvDQName(name).ptr() : name->m_name.str);
return true;
}
+ // TODO: reuse code in LEX::create_package_finalize and sp_head::set_stmt_end
sphead->m_body.length= body_end - body_start;
if (unlikely(!(sphead->m_body.str= thd->strmake(body_start,
sphead->m_body.length))))
@@ -8022,7 +8627,8 @@ bool LEX::create_package_finalize(THD *thd,
sphead->restore_thd_mem_root(thd);
sp_package *pkg= sphead->get_package();
DBUG_ASSERT(pkg);
- return pkg->validate_after_parser(thd);
+ return sphead->check_group_aggregate_instructions_forbid() ||
+ pkg->validate_after_parser(thd);
}
@@ -8442,6 +9048,20 @@ bool LEX::last_field_generated_always_as_row_end()
VERS_ROW_END);
}
+void st_select_lex_unit::reset_distinct()
+{
+ union_distinct= NULL;
+ for(SELECT_LEX *sl= first_select()->next_select();
+ sl;
+ sl= sl->next_select())
+ {
+ if (sl->distinct)
+ {
+ union_distinct= sl;
+ }
+ }
+}
+
void LEX::save_values_list_state()
{
@@ -8457,64 +9077,1566 @@ void LEX::restore_values_list_state()
}
-void LEX::tvc_start()
+void st_select_lex_unit::fix_distinct()
+{
+ if (union_distinct && this != union_distinct->master_unit())
+ reset_distinct();
+}
+
+
+void st_select_lex_unit::register_select_chain(SELECT_LEX *first_sel)
+{
+ DBUG_ASSERT(first_sel != 0);
+ slave= first_sel;
+ first_sel->prev= &slave;
+ for(SELECT_LEX *sel=first_sel; sel; sel= sel->next_select())
+ {
+ sel->master= (st_select_lex_node *)this;
+ uncacheable|= sel->uncacheable;
+ }
+}
+
+
+void st_select_lex::register_unit(SELECT_LEX_UNIT *unit,
+ Name_resolution_context *outer_context)
+{
+ if ((unit->next= slave))
+ slave->prev= &unit->next;
+ unit->prev= &slave;
+ slave= unit;
+ unit->master= this;
+ uncacheable|= unit->uncacheable;
+
+ for(SELECT_LEX *sel= unit->first_select();sel; sel= sel->next_select())
+ {
+ sel->context.outer_context= outer_context;
+ }
+}
+
+
+void st_select_lex::add_statistics(SELECT_LEX_UNIT *unit)
+{
+ for (;
+ unit;
+ unit= unit->next_unit())
+ for(SELECT_LEX *child= unit->first_select();
+ child;
+ child= child->next_select())
+ {
+ /*
+ A subselect can add fields to an outer select.
+ Reserve space for them.
+ */
+ select_n_where_fields+= child->select_n_where_fields;
+ /*
+ Aggregate functions in having clause may add fields
+ to an outer select. Count them also.
+ */
+ select_n_having_items+= child->select_n_having_items;
+ }
+}
+
+
+bool LEX::main_select_push(bool service)
+{
+ DBUG_ENTER("LEX::main_select_push");
+ current_select_number= ++thd->lex->stmt_lex->current_select_number;
+ builtin_select.select_number= current_select_number;
+ builtin_select.is_service_select= service;
+ if (push_select(&builtin_select))
+ DBUG_RETURN(TRUE);
+ DBUG_RETURN(FALSE);
+}
+
+void Lex_select_lock::set_to(SELECT_LEX *sel)
+{
+ if (defined_lock)
+ {
+ if (sel->master_unit() &&
+ sel == sel->master_unit()->fake_select_lex)
+ sel->master_unit()->set_lock_to_the_last_select(*this);
+ else
+ {
+ sel->parent_lex->safe_to_cache_query= 0;
+ if (update_lock)
+ {
+ sel->lock_type= TL_WRITE;
+ sel->set_lock_for_tables(TL_WRITE, false);
+ }
+ else
+ {
+ sel->lock_type= TL_READ_WITH_SHARED_LOCKS;
+ sel->set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
+ }
+ }
+ }
+}
+
+bool Lex_order_limit_lock::set_to(SELECT_LEX *sel)
+{
+ /*TODO: lock */
+ //if (lock.defined_lock && sel == sel->master_unit()->fake_select_lex)
+ // return TRUE;
+ if (lock.defined_timeout)
+ {
+ THD *thd= sel->parent_lex->thd;
+ if (set_statement_var_if_exists(thd,
+ C_STRING_WITH_LEN("lock_wait_timeout"),
+ lock.timeout) ||
+ set_statement_var_if_exists(thd,
+ C_STRING_WITH_LEN("innodb_lock_wait_timeout"),
+ lock.timeout))
+ return TRUE;
+ }
+ lock.set_to(sel);
+ sel->explicit_limit= limit.explicit_limit;
+ sel->select_limit= limit.select_limit;
+ sel->offset_limit= limit.offset_limit;
+ if (order_list)
+ {
+ if (sel->get_linkage() != GLOBAL_OPTIONS_TYPE &&
+ sel->olap != UNSPECIFIED_OLAP_TYPE &&
+ (sel->get_linkage() != UNION_TYPE || sel->braces))
+ {
+ my_error(ER_WRONG_USAGE, MYF(0),
+ "CUBE/ROLLUP", "ORDER BY");
+ return TRUE;
+ }
+ sel->order_list= *(order_list);
+ }
+ sel->is_set_query_expr_tail= true;
+ return FALSE;
+}
+
+
+static void change_item_list_context(List<Item> *list,
+ Name_resolution_context *context)
+{
+ List_iterator_fast<Item> it (*list);
+ Item *item;
+ while((item= it++))
+ {
+ item->walk(&Item::change_context_processor, FALSE, (void *)context);
+ }
+}
+
+
+bool LEX::insert_select_hack(SELECT_LEX *sel)
+{
+ DBUG_ENTER("LEX::insert_select_hack");
+
+ DBUG_ASSERT(first_select_lex() == &builtin_select);
+ DBUG_ASSERT(sel != NULL);
+
+ DBUG_ASSERT(builtin_select.first_inner_unit() == NULL);
+
+ if (builtin_select.link_prev)
+ {
+ if ((*builtin_select.link_prev= builtin_select.link_next))
+ ((st_select_lex *)builtin_select.link_next)->link_prev=
+ builtin_select.link_prev;
+ builtin_select.link_prev= NULL; // indicator of removal
+ }
+
+ if (set_main_unit(sel->master_unit()))
+ return true;
+
+ DBUG_ASSERT(builtin_select.table_list.elements == 1);
+ TABLE_LIST *insert_table= builtin_select.table_list.first;
+
+ if (!(insert_table->next_local= sel->table_list.first))
+ {
+ sel->table_list.next= &insert_table->next_local;
+ }
+ sel->table_list.first= insert_table;
+ sel->table_list.elements++;
+ insert_table->select_lex= sel;
+
+ sel->context.first_name_resolution_table= insert_table;
+ builtin_select.context= sel->context;
+ change_item_list_context(&field_list, &sel->context);
+
+ if (sel->tvc && !sel->next_select() &&
+ (sql_command == SQLCOM_INSERT_SELECT ||
+ sql_command == SQLCOM_REPLACE_SELECT))
+ {
+ DBUG_PRINT("info", ("'Usual' INSERT detected"));
+ many_values= sel->tvc->lists_of_values;
+ sel->options= sel->tvc->select_options;
+ sel->tvc= NULL;
+ if (sql_command == SQLCOM_INSERT_SELECT)
+ sql_command= SQLCOM_INSERT;
+ else
+ sql_command= SQLCOM_REPLACE;
+ }
+
+
+ for (SELECT_LEX *sel= all_selects_list;
+ sel;
+ sel= sel->next_select_in_list())
+ {
+ if (sel->select_number != 1)
+ sel->select_number--;
+ };
+
+ DBUG_RETURN(FALSE);
+}
+
+
+/**
+ Create an Item_singlerow_subselect for a query expression.
+*/
+
+Item *LEX::create_item_query_expression(THD *thd,
+ st_select_lex_unit *unit)
+{
+ if (clause_that_disallows_subselect)
+ {
+ my_error(ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
+ clause_that_disallows_subselect);
+ return NULL;
+ }
+
+ // Add the subtree of subquery to the current SELECT_LEX
+ SELECT_LEX *curr_sel= select_stack_head();
+ DBUG_ASSERT(current_select == curr_sel ||
+ (curr_sel == NULL && current_select == &builtin_select));
+ if (!curr_sel)
+ {
+ curr_sel= &builtin_select;
+ curr_sel->register_unit(unit, &curr_sel->context);
+ curr_sel->add_statistics(unit);
+ }
+
+ return new (thd->mem_root)
+ Item_singlerow_subselect(thd, unit->first_select());
+}
+
+
+SELECT_LEX_UNIT *LEX::parsed_select_expr_start(SELECT_LEX *s1, SELECT_LEX *s2,
+ enum sub_select_type unit_type,
+ bool distinct)
{
- if (current_select == &select_lex)
- mysql_init_select(this);
+ SELECT_LEX_UNIT *res;
+ SELECT_LEX *sel1;
+ SELECT_LEX *sel2;
+ if (!s1->next_select())
+ sel1= s1;
else
- save_values_list_state();
- many_values.empty();
- insert_list= 0;
+ {
+ sel1= wrap_unit_into_derived(s1->master_unit());
+ if (!sel1)
+ return NULL;
+ }
+ if (!s2->next_select())
+ sel2= s2;
+ else
+ {
+ sel2= wrap_unit_into_derived(s2->master_unit());
+ if (!sel2)
+ return NULL;
+ }
+ sel1->link_neighbour(sel2);
+ sel2->set_linkage_and_distinct(unit_type, distinct);
+ sel2->first_nested= sel1->first_nested= sel1;
+ res= create_unit(sel1);
+ if (res == NULL)
+ return NULL;
+ res->pre_last_parse= sel1;
+ push_select(res->fake_select_lex);
+ return res;
+}
+
+
+SELECT_LEX_UNIT *LEX::parsed_select_expr_cont(SELECT_LEX_UNIT *unit,
+ SELECT_LEX *s2,
+ enum sub_select_type unit_type,
+ bool distinct, bool oracle)
+{
+ DBUG_ASSERT(!s2->next_select());
+ SELECT_LEX *sel1= s2;
+ SELECT_LEX *last= unit->pre_last_parse->next_select();
+
+ int cmp= oracle? 0 : cmp_unit_op(unit_type, last->get_linkage());
+ if (cmp == 0)
+ {
+ sel1->first_nested= last->first_nested;
+ }
+ else if (cmp > 0)
+ {
+ last->first_nested= unit->pre_last_parse;
+ sel1->first_nested= last;
+ }
+ else /* cmp < 0 */
+ {
+ SELECT_LEX *first_in_nest= last->first_nested;
+ if (first_in_nest->first_nested != first_in_nest)
+ {
+ /* There is a priority jump starting from first_in_nest */
+ if ((last= create_priority_nest(first_in_nest)) == NULL)
+ return NULL;
+ unit->fix_distinct();
+ }
+ sel1->first_nested= last->first_nested;
+ }
+ last->link_neighbour(sel1);
+ sel1->set_master_unit(unit);
+ sel1->set_linkage_and_distinct(unit_type, distinct);
+ unit->pre_last_parse= last;
+ return unit;
+}
+
+
+/**
+ Add primary expression as the next term in a given query expression body
+ pruducing a new query expression body
+*/
+
+SELECT_LEX_UNIT *
+LEX::add_primary_to_query_expression_body(SELECT_LEX_UNIT *unit,
+ SELECT_LEX *sel,
+ enum sub_select_type unit_type,
+ bool distinct,
+ bool oracle)
+{
+ SELECT_LEX *sel2= sel;
+ if (sel->master_unit() && sel->master_unit()->first_select()->next_select())
+ {
+ sel2= wrap_unit_into_derived(sel->master_unit());
+ if (!sel2)
+ return NULL;
+ }
+ SELECT_LEX *sel1= unit->first_select();
+ if (!sel1->next_select())
+ unit= parsed_select_expr_start(sel1, sel2, unit_type, distinct);
+ else
+ unit= parsed_select_expr_cont(unit, sel2, unit_type, distinct, oracle);
+ return unit;
}
-bool LEX::tvc_start_derived()
+/**
+ Add query primary to a parenthesized query primary
+ pruducing a new query expression body
+*/
+
+SELECT_LEX_UNIT *
+LEX::add_primary_to_query_expression_body_ext_parens(
+ SELECT_LEX_UNIT *unit,
+ SELECT_LEX *sel,
+ enum sub_select_type unit_type,
+ bool distinct)
{
- if (current_select->linkage == GLOBAL_OPTIONS_TYPE ||
- unlikely(mysql_new_select(this, 1, NULL)))
+ SELECT_LEX *sel1= unit->first_select();
+ if (unit->first_select()->next_select())
+ {
+ sel1= wrap_unit_into_derived(unit);
+ if (!sel1)
+ return NULL;
+ if (!create_unit(sel1))
+ return NULL;
+ }
+ SELECT_LEX *sel2= sel;
+ if (sel->master_unit() && sel->master_unit()->first_select()->next_select())
+ {
+ sel2= wrap_unit_into_derived(sel->master_unit());
+ if (!sel2)
+ return NULL;
+ }
+ unit= parsed_select_expr_start(sel1, sel2, unit_type, distinct);
+ return unit;
+}
+
+
+/**
+ Process multi-operand query expression body
+*/
+
+bool LEX::parsed_multi_operand_query_expression_body(SELECT_LEX_UNIT *unit)
+{
+ SELECT_LEX *first_in_nest=
+ unit->pre_last_parse->next_select()->first_nested;
+ if (first_in_nest->first_nested != first_in_nest)
+ {
+ /* There is a priority jump starting from first_in_nest */
+ if (create_priority_nest(first_in_nest) == NULL)
+ return true;
+ unit->fix_distinct();
+ }
+ return false;
+}
+
+
+/**
+ Add non-empty tail to a query expression body
+*/
+
+SELECT_LEX_UNIT *LEX::add_tail_to_query_expression_body(SELECT_LEX_UNIT *unit,
+ Lex_order_limit_lock *l)
+{
+ DBUG_ASSERT(l != NULL);
+ pop_select();
+ SELECT_LEX *sel= unit->first_select()->next_select() ? unit->fake_select_lex :
+ unit->first_select();
+ l->set_to(sel);
+ return unit;
+}
+
+
+/**
+ Add non-empty tail to a parenthesized query primary
+*/
+
+SELECT_LEX_UNIT *
+LEX::add_tail_to_query_expression_body_ext_parens(SELECT_LEX_UNIT *unit,
+ Lex_order_limit_lock *l)
+{
+ SELECT_LEX *sel= unit->first_select()->next_select() ? unit->fake_select_lex :
+ unit->first_select();
+
+ DBUG_ASSERT(l != NULL);
+
+ pop_select();
+ if (sel->is_set_query_expr_tail)
+ {
+ if (!l->order_list && !sel->explicit_limit)
+ l->order_list= &sel->order_list;
+ else
+ {
+ if (!unit)
+ return NULL;
+ sel= wrap_unit_into_derived(unit);
+ if (!sel)
+ return NULL;
+ if (!create_unit(sel))
+ return NULL;
+ }
+ }
+ l->set_to(sel);
+ return sel->master_unit();
+}
+
+
+/**
+ Process subselect parsing
+*/
+
+SELECT_LEX *LEX::parsed_subselect(SELECT_LEX_UNIT *unit)
+{
+ if (clause_that_disallows_subselect)
+ {
+ my_error(ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
+ clause_that_disallows_subselect);
+ return NULL;
+ }
+
+ // Add the subtree of subquery to the current SELECT_LEX
+ SELECT_LEX *curr_sel= select_stack_head();
+ DBUG_ASSERT(current_select == curr_sel ||
+ (curr_sel == NULL && current_select == &builtin_select));
+ if (curr_sel)
+ {
+ curr_sel->register_unit(unit, context_stack.head());
+ curr_sel->add_statistics(unit);
+ }
+
+ return unit->first_select();
+}
+
+
+/**
+ Process INSERT-like select
+*/
+
+bool LEX::parsed_insert_select(SELECT_LEX *first_select)
+{
+ if (sql_command == SQLCOM_INSERT ||
+ sql_command == SQLCOM_REPLACE)
+ {
+ if (sql_command == SQLCOM_INSERT)
+ sql_command= SQLCOM_INSERT_SELECT;
+ else
+ sql_command= SQLCOM_REPLACE_SELECT;
+ }
+ insert_select_hack(first_select);
+ if (check_main_unit_semantics())
return true;
+
+ // fix "main" select
+ SELECT_LEX *blt __attribute__((unused))= pop_select();
+ DBUG_ASSERT(blt == &builtin_select);
+ push_select(first_select);
+ return false;
+}
+
+
+bool LEX::parsed_TVC_start()
+{
+ SELECT_LEX *sel;
save_values_list_state();
many_values.empty();
insert_list= 0;
+ if (!(sel= alloc_select(TRUE)) ||
+ push_select(sel))
+ return true;
+ sel->init_select();
+ sel->braces= FALSE; // just initialisation
return false;
}
-bool LEX::tvc_finalize()
+SELECT_LEX *LEX::parsed_TVC_end()
{
- if (unlikely(!(current_select->tvc=
- new (thd->mem_root)
- table_value_constr(many_values,
- current_select,
- current_select->options))))
- return true;
+ SELECT_LEX *res= pop_select(); // above TVC select
+ if (!(res->tvc=
+ new (thd->mem_root) table_value_constr(many_values,
+ res,
+ res->options)))
+ return NULL;
restore_values_list_state();
- if (!current_select->master_unit()->fake_select_lex)
- current_select->master_unit()->add_fake_select_lex(thd);
- return false;
+ return res;
}
-bool LEX::tvc_finalize_derived()
+
+TABLE_LIST *LEX::parsed_derived_table(SELECT_LEX_UNIT *unit,
+ int for_system_time,
+ LEX_CSTRING *alias)
{
+ TABLE_LIST *res;
derived_tables|= DERIVED_SUBQUERY;
- if (unlikely(!expr_allows_subselect || sql_command == (int)SQLCOM_PURGE))
+ unit->first_select()->set_linkage(DERIVED_TABLE_TYPE);
+
+ // Add the subtree of subquery to the current SELECT_LEX
+ SELECT_LEX *curr_sel= select_stack_head();
+ DBUG_ASSERT(current_select == curr_sel ||
+ (curr_sel == NULL && current_select == &builtin_select));
+
+ Table_ident *ti= new (thd->mem_root) Table_ident(unit);
+ if (ti == NULL)
+ return NULL;
+ if (!(res= curr_sel->add_table_to_list(thd, ti, alias, 0,
+ TL_READ, MDL_SHARED_READ)))
+ return NULL;
+ if (for_system_time)
{
- thd->parse_error();
+ res->vers_conditions= vers_conditions;
+ }
+ return res;
+}
+
+bool LEX::parsed_create_view(SELECT_LEX_UNIT *unit, int check)
+{
+ SQL_I_List<TABLE_LIST> *save= &first_select_lex()->table_list;
+ if (set_main_unit(unit))
+ return true;
+ if (check_main_unit_semantics())
+ return true;
+ first_select_lex()->table_list.push_front(save);
+ current_select= first_select_lex();
+ size_t len= thd->m_parser_state->m_lip.get_cpp_ptr() -
+ create_view->select.str;
+ void *create_view_select= thd->memdup(create_view->select.str, len);
+ create_view->select.length= len;
+ create_view->select.str= (char *) create_view_select;
+ size_t not_used;
+ trim_whitespace(thd->charset(),
+ &create_view->select, &not_used);
+ create_view->check= check;
+ parsing_options.allows_variable= TRUE;
+ return false;
+}
+
+bool LEX::select_finalize(st_select_lex_unit *expr)
+{
+ sql_command= SQLCOM_SELECT;
+ selects_allow_into= TRUE;
+ selects_allow_procedure= TRUE;
+ if (set_main_unit(expr))
return true;
+ return check_main_unit_semantics();
+}
+
+
+bool LEX::select_finalize(st_select_lex_unit *expr, Lex_select_lock l)
+{
+ return expr->set_lock_to_the_last_select(l) ||
+ select_finalize(expr);
+}
+
+
+/*
+ "IN" and "EXISTS" subselect can appear in two statement types:
+
+ 1. Statements that can have table columns, such as SELECT, DELETE, UPDATE
+ 2. Statements that cannot have table columns, e.g:
+ RETURN ((1) IN (SELECT * FROM t1))
+ IF ((1) IN (SELECT * FROM t1))
+
+ Statements of the first type call master_select_push() in the beginning.
+ In such case everything is properly linked.
+
+ Statements of the second type do not call mastr_select_push().
+ Here we catch the second case and relink thd->lex->builtin_select and
+ select_lex to properly point to each other.
+
+ QQ: Shouldn't subselects of other type also call relink_hack()?
+ QQ: Can we do it at constructor time instead?
+*/
+
+void LEX::relink_hack(st_select_lex *select_lex)
+{
+ if (!select_stack_top) // Statements of the second type
+ {
+ if (!select_lex->outer_select() &&
+ !builtin_select.first_inner_unit())
+ {
+ builtin_select.register_unit(select_lex->master_unit(),
+ &builtin_select.context);
+ builtin_select.add_statistics(select_lex->master_unit());
+ }
+ }
+}
+
+
+bool SELECT_LEX_UNIT::set_lock_to_the_last_select(Lex_select_lock l)
+{
+ if (l.defined_lock)
+ {
+ SELECT_LEX *sel= first_select();
+ while (sel->next_select())
+ sel= sel->next_select();
+ if (sel->braces)
+ {
+ my_error(ER_WRONG_USAGE, MYF(0), "lock options",
+ "SELECT in brackets");
+ return TRUE;
+ }
+ l.set_to(sel);
}
- if (unlikely(!(current_select->tvc=
- new (thd->mem_root)
- table_value_constr(many_values,
- current_select,
- current_select->options))))
+ return FALSE;
+}
+
+/**
+ Generate unique name for generated derived table for this SELECT
+*/
+
+bool SELECT_LEX::make_unique_derived_name(THD *thd, LEX_CSTRING *alias)
+{
+ // uint32 digits + two underscores + trailing '\0'
+ char buff[MAX_INT_WIDTH + 2 + 1];
+ alias->length= my_snprintf(buff, sizeof(buff), "__%u", select_number);
+ alias->str= thd->strmake(buff, alias->length);
+ return !alias->str;
+}
+
+
+/*
+ Make a new sp_instr_stmt and set its m_query to a concatenation
+ of two strings.
+*/
+bool LEX::new_sp_instr_stmt(THD *thd,
+ const LEX_CSTRING &prefix,
+ const LEX_CSTRING &suffix)
+{
+ LEX_STRING qbuff;
+ sp_instr_stmt *i;
+
+ if (!(i= new (thd->mem_root) sp_instr_stmt(sphead->instructions(),
+ spcont, this)))
+ return true;
+
+ qbuff.length= prefix.length + suffix.length;
+ if (!(qbuff.str= (char*) alloc_root(thd->mem_root, qbuff.length + 1)))
+ return true;
+ if (prefix.length)
+ memcpy(qbuff.str, prefix.str, prefix.length);
+ strmake(qbuff.str + prefix.length, suffix.str, suffix.length);
+ i->m_query= qbuff;
+ return sphead->add_instr(i);
+}
+
+
+bool LEX::sp_proc_stmt_statement_finalize_buf(THD *thd, const LEX_CSTRING &qbuf)
+{
+ sphead->m_flags|= sp_get_flags_for_command(this);
+ /* "USE db" doesn't work in a procedure */
+ if (unlikely(sql_command == SQLCOM_CHANGE_DB))
+ {
+ my_error(ER_SP_BADSTATEMENT, MYF(0), "USE");
+ return true;
+ }
+ /*
+ Don't add an instruction for SET statements, since all
+ instructions for them were already added during processing
+ of "set" rule.
+ */
+ DBUG_ASSERT(sql_command != SQLCOM_SET_OPTION || var_list.is_empty());
+ if (sql_command != SQLCOM_SET_OPTION)
+ return new_sp_instr_stmt(thd, empty_clex_str, qbuf);
+ return false;
+}
+
+
+bool LEX::sp_proc_stmt_statement_finalize(THD *thd, bool no_lookahead)
+{
+ // Extract the query statement from the tokenizer
+ Lex_input_stream *lip= &thd->m_parser_state->m_lip;
+ Lex_cstring qbuf(sphead->m_tmp_query, no_lookahead ? lip->get_ptr() :
+ lip->get_tok_start());
+ return LEX::sp_proc_stmt_statement_finalize_buf(thd, qbuf);
+}
+
+
+/**
+ @brief
+ Extract the condition that can be pushed into WHERE clause
+
+ @param thd the thread handle
+ @param cond the condition from which to extract a pushed condition
+ @param remaining_cond IN/OUT the condition that will remain of cond after
+ the extraction
+ @param transformer the transformer callback function to be
+ applied to the fields of the condition so it
+ can be pushed`
+ @param arg parameter to be passed to the transformer
+
+ @details
+ This function builds the most restrictive condition depending only on
+ the fields used in the GROUP BY of this SELECT. These fields were
+ collected before in grouping_tmp_fields list of this SELECT.
+
+ First this method checks if this SELECT doesn't have any aggregation
+ functions and has no GROUP BY clause. If so cond can be entirely pushed
+ into WHERE.
+
+ Otherwise the method checks if there is a condition depending only on
+ grouping fields that can be extracted from cond.
+
+ The condition that can be pushed into WHERE should be transformed.
+ It is done by transformer.
+
+ The extracted condition is saved in cond_pushed_into_where of this select.
+ cond can remain un empty after the extraction of the condition that can be
+ pushed into WHERE. It is saved in remaining_cond.
+
+ @note
+ This method is called for pushdown conditions into materialized
+ derived tables/views optimization.
+ Item::derived_field_transformer_for_where is passed as the actual
+ callback function.
+ Also it is called for pushdown into materialized IN subqueries.
+ Item::in_subq_field_transformer_for_where is passed as the actual
+ callback function.
+*/
+
+void st_select_lex::pushdown_cond_into_where_clause(THD *thd, Item *cond,
+ Item **remaining_cond,
+ Item_transformer transformer,
+ uchar *arg)
+{
+ if (!cond_pushdown_is_allowed())
+ return;
+ thd->lex->current_select= this;
+ if (have_window_funcs())
+ {
+ Item *cond_over_partition_fields;
+ check_cond_extraction_for_grouping_fields(thd, cond);
+ cond_over_partition_fields=
+ build_cond_for_grouping_fields(thd, cond, true);
+ if (cond_over_partition_fields)
+ cond_over_partition_fields= cond_over_partition_fields->transform(thd,
+ &Item::grouping_field_transformer_for_where,
+ (uchar*) this);
+ if (cond_over_partition_fields)
+ {
+ cond_over_partition_fields->walk(
+ &Item::cleanup_excluding_const_fields_processor, 0, 0);
+ cond_pushed_into_where= cond_over_partition_fields;
+ }
+
+ return;
+ }
+
+ if (!join->group_list && !with_sum_func)
+ {
+ cond= transform_condition_or_part(thd, cond, transformer, arg);
+ if (cond)
+ {
+ cond->walk(
+ &Item::cleanup_excluding_const_fields_processor, 0, 0);
+ cond_pushed_into_where= cond;
+ }
+
+ return;
+ }
+
+ /*
+ Figure out what can be extracted from cond and pushed into
+ the WHERE clause of this select.
+ */
+ Item *cond_over_grouping_fields;
+ check_cond_extraction_for_grouping_fields(thd, cond);
+ cond_over_grouping_fields=
+ build_cond_for_grouping_fields(thd, cond, true);
+
+ /*
+ Transform references to the columns of condition that can be pushed
+ into WHERE so it can be pushed.
+ */
+ if (cond_over_grouping_fields)
+ {
+ cond_over_grouping_fields=
+ transform_condition_or_part(thd, cond_over_grouping_fields,
+ &Item::grouping_field_transformer_for_where,
+ (uchar*) this);
+ }
+
+ if (cond_over_grouping_fields)
+ {
+
+ /*
+ Remove top conjuncts in cond that has been pushed into the WHERE
+ clause of this select
+ */
+ cond= remove_pushed_top_conjuncts(thd, cond);
+
+ cond_over_grouping_fields->walk(
+ &Item::cleanup_excluding_const_fields_processor, 0, 0);
+ cond_pushed_into_where= cond_over_grouping_fields;
+ }
+
+ *remaining_cond= cond;
+}
+
+
+/**
+ @brief
+ Mark OR-conditions as non-pushable to avoid repeatable pushdown
+
+ @param cond the processed condition
+
+ @details
+ Consider pushdown into the materialized derived table/view.
+ Consider OR condition that can be pushed into HAVING and some
+ parts of this OR condition that can be pushed into WHERE.
+
+ On example:
+
+ SELECT *
+ FROM t1,
+ (
+ SELECT a,MAX(c) AS m_c
+ GROUP BY a
+ ) AS dt
+ WHERE ((dt.m_c>10) AND (dt.a>2)) OR ((dt.m_c<7) and (dt.a<3)) AND
+ (t1.a=v1.a);
+
+
+ Here ((dt.m_c>10) AND (dt.a>2)) OR ((dt.m_c<7) and (dt.a<3)) or1
+ can be pushed down into the HAVING of the materialized
+ derived table dt.
+
+ (dt.a>2) OR (dt.a<3) part of or1 depends only on grouping fields
+ of dt and can be pushed into WHERE.
+
+ As a result:
+
+ SELECT *
+ FROM t1,
+ (
+ SELECT a,MAX(c) AS m_c
+ WHERE (dt.a>2) OR (dt.a<3)
+ GROUP BY a
+ HAVING ((dt.m_c>10) AND (dt.a>2)) OR ((dt.m_c<7) and (dt.a<3))
+ ) AS dt
+ WHERE ((dt.m_c>10) AND (dt.a>2)) OR ((dt.m_c<7) and (dt.a<3)) AND
+ (t1.a=v1.a);
+
+
+ Here (dt.a>2) OR (dt.a<3) also remains in HAVING of dt.
+ When SELECT that defines df is processed HAVING pushdown optimization
+ is made. In HAVING pushdown optimization it will extract
+ (dt.a>2) OR (dt.a<3) condition from or1 again and push it into WHERE.
+ This will cause duplicate conditions in WHERE of dt.
+
+ To avoid repeatable pushdown such OR conditions as or1 describen
+ above are marked with NO_EXTRACTION_FL.
+
+ @note
+ This method is called for pushdown into materialized
+ derived tables/views/IN subqueries optimization.
+*/
+
+void mark_or_conds_to_avoid_pushdown(Item *cond)
+{
+ if (cond->type() == Item::COND_ITEM &&
+ ((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
+ {
+ List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
+ Item *item;
+ while ((item=li++))
+ {
+ if (item->type() == Item::COND_ITEM &&
+ ((Item_cond*) item)->functype() == Item_func::COND_OR_FUNC)
+ item->set_extraction_flag(NO_EXTRACTION_FL);
+ }
+ }
+ else if (cond->type() == Item::COND_ITEM &&
+ ((Item_cond*) cond)->functype() == Item_func::COND_OR_FUNC)
+ cond->set_extraction_flag(NO_EXTRACTION_FL);
+}
+
+/**
+ @brief
+ Get condition that can be pushed from HAVING into WHERE
+
+ @param thd the thread handle
+ @param cond the condition from which to extract the condition
+
+ @details
+ The method collects in attach_to_conds list conditions from cond
+ that can be pushed from HAVING into WHERE.
+
+ Conditions that can be pushed were marked with FULL_EXTRACTION_FL in
+ check_cond_extraction_for_grouping_fields() method.
+ Conditions that can't be pushed were marked with NO_EXTRACTION_FL.
+ Conditions which parts can be pushed weren't marked.
+
+ There are two types of conditions that can be pushed:
+ 1. Condition that can be simply moved from HAVING
+ (if cond is marked with FULL_EXTRACTION_FL or
+ cond is an AND condition and some of its parts are marked with
+ FULL_EXTRACTION_FL)
+ In this case condition is transformed and pushed into attach_to_conds
+ list.
+ 2. Part of some other condition c1 that can't be entirely pushed
+ (if Ñ1 isn't marked with any flag).
+
+ For example:
+
+ SELECT t1.a,MAX(t1.b),t1.c
+ FROM t1
+ GROUP BY t1.a
+ HAVING ((t1.a > 5) AND (t1.c < 3)) OR (t1.a = 3);
+
+ Here (t1.a > 5) OR (t1.a = 3) from HAVING can be pushed into WHERE.
+
+ In this case build_pushable_cond() is called for c1.
+ This method builds a clone of the c1 part that can be pushed.
+
+ Transformation mentioned above is made with multiple_equality_transformer
+ transformer. It transforms all multiple equalities in the extracted
+ condition into the set of equalities.
+
+ @note
+ Conditions that can be pushed are collected in attach_to_conds in this way:
+ 1. if cond is an AND condition its parts that can be pushed into WHERE
+ are added to attach_to_conds list separately.
+ 2. in all other cases conditions are pushed into the list entirely.
+
+ @retval
+ true - if an error occurs
+ false - otherwise
+*/
+
+bool
+st_select_lex::build_pushable_cond_for_having_pushdown(THD *thd, Item *cond)
+{
+ List<Item> equalities;
+
+ /* Condition can't be pushed */
+ if (cond->get_extraction_flag() == NO_EXTRACTION_FL)
+ return false;
+
+ /**
+ Condition can be pushed entirely.
+ Transform its multiple equalities and add to attach_to_conds list.
+ */
+ if (cond->get_extraction_flag() == FULL_EXTRACTION_FL)
+ {
+ Item *result= cond->transform(thd,
+ &Item::multiple_equality_transformer,
+ (uchar *)this);
+ if (!result)
+ return true;
+ if (result->type() == Item::COND_ITEM &&
+ ((Item_cond*) result)->functype() == Item_func::COND_AND_FUNC)
+ {
+ List_iterator<Item> li(*((Item_cond*) result)->argument_list());
+ Item *item;
+ while ((item= li++))
+ {
+ if (attach_to_conds.push_back(item, thd->mem_root))
+ return true;
+ }
+ }
+ else
+ {
+ if (attach_to_conds.push_back(result, thd->mem_root))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ There is no flag set for this condition. It means that some
+ part of this condition can be pushed.
+ */
+ if (cond->type() != Item::COND_ITEM)
+ return false;
+
+ if (((Item_cond *)cond)->functype() != Item_cond::COND_AND_FUNC)
+ {
+ /*
+ cond is not a conjunctive formula and it cannot be pushed into WHERE.
+ Try to extract a formula that can be pushed.
+ */
+ Item *fix= cond->build_pushable_cond(thd, 0, 0);
+ if (!fix)
+ return false;
+ if (attach_to_conds.push_back(fix, thd->mem_root))
+ return true;
+ }
+ else
+ {
+ List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
+ Item *item;
+ while ((item=li++))
+ {
+ if (item->get_extraction_flag() == NO_EXTRACTION_FL)
+ continue;
+ else if (item->get_extraction_flag() == FULL_EXTRACTION_FL)
+ {
+ Item *result= item->transform(thd,
+ &Item::multiple_equality_transformer,
+ (uchar *)item);
+ if (!result)
+ return true;
+ if (result->type() == Item::COND_ITEM &&
+ ((Item_cond*) result)->functype() == Item_func::COND_AND_FUNC)
+ {
+ List_iterator<Item> li(*((Item_cond*) result)->argument_list());
+ Item *item;
+ while ((item=li++))
+ {
+ if (attach_to_conds.push_back(item, thd->mem_root))
+ return true;
+ }
+ }
+ else
+ {
+ if (attach_to_conds.push_back(result, thd->mem_root))
+ return true;
+ }
+ }
+ else
+ {
+ Item *fix= item->build_pushable_cond(thd, 0, 0);
+ if (!fix)
+ continue;
+ if (attach_to_conds.push_back(fix, thd->mem_root))
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+
+/**
+ Check if item is equal to some field in Field_pair 'field_pair'
+ from 'pair_list' and return found 'field_pair' if it exists.
+*/
+
+Field_pair *get_corresponding_field_pair(Item *item,
+ List<Field_pair> pair_list)
+{
+ DBUG_ASSERT(item->type() == Item::FIELD_ITEM ||
+ (item->type() == Item::REF_ITEM &&
+ ((((Item_ref *) item)->ref_type() == Item_ref::VIEW_REF) ||
+ (((Item_ref *) item)->ref_type() == Item_ref::REF))));
+
+ List_iterator<Field_pair> it(pair_list);
+ Field_pair *field_pair;
+ Item_field *field_item= (Item_field *) (item->real_item());
+ while ((field_pair= it++))
+ {
+ if (field_item->field == field_pair->field)
+ return field_pair;
+ }
+ return NULL;
+}
+
+
+/**
+ @brief
+ Collect fields from multiple equalities which are equal to grouping
+
+ @param thd the thread handle
+
+ @details
+ This method checks if multiple equalities of the WHERE clause contain
+ fields from GROUP BY of this SELECT. If so all fields of such multiple
+ equalities are collected in grouping_tmp_fields list without repetitions.
+
+ @retval
+ true - if an error occurs
+ false - otherwise
+*/
+
+bool st_select_lex::collect_fields_equal_to_grouping(THD *thd)
+{
+ if (!join->cond_equal || join->cond_equal->is_empty())
+ return false;
+
+ List_iterator_fast<Item_equal> li(join->cond_equal->current_level);
+ Item_equal *item_equal;
+
+ while ((item_equal= li++))
+ {
+ Item_equal_fields_iterator it(*item_equal);
+ Item *item;
+ while ((item= it++))
+ {
+ if (get_corresponding_field_pair(item, grouping_tmp_fields))
+ break;
+ }
+ if (!item)
+ break;
+
+ it.rewind();
+ while ((item= it++))
+ {
+ if (get_corresponding_field_pair(item, grouping_tmp_fields))
+ continue;
+ Field_pair *grouping_tmp_field=
+ new Field_pair(((Item_field *)item->real_item())->field, item);
+ if (grouping_tmp_fields.push_back(grouping_tmp_field, thd->mem_root))
+ return true;
+ }
+ }
+ return false;
+}
+
+
+/**
+ @brief
+ Remove marked top conjuncts of HAVING for having pushdown
+
+ @param thd the thread handle
+ @param cond the condition which subformulas are to be removed
+
+ @details
+ This method removes from cond all subformulas that can be moved from HAVING
+ into WHERE.
+
+ @retval
+ condition without removed subformulas
+ 0 if the whole 'cond' is removed
+*/
+
+Item *remove_pushed_top_conjuncts_for_having(THD *thd, Item *cond)
+{
+ /* Nothing to extract */
+ if (cond->get_extraction_flag() == NO_EXTRACTION_FL)
+ {
+ cond->clear_extraction_flag();
+ return cond;
+ }
+ /* cond can be pushed in WHERE entirely */
+ if (cond->get_extraction_flag() == FULL_EXTRACTION_FL)
+ {
+ cond->clear_extraction_flag();
+ return 0;
+ }
+
+ /* Some parts of cond can be pushed */
+ if (cond->type() == Item::COND_ITEM &&
+ ((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
+ {
+ List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
+ Item *item;
+ while ((item=li++))
+ {
+ if (item->get_extraction_flag() == NO_EXTRACTION_FL)
+ item->clear_extraction_flag();
+ else if (item->get_extraction_flag() == FULL_EXTRACTION_FL)
+ {
+ if (item->type() == Item::FUNC_ITEM &&
+ ((Item_func*) item)->functype() == Item_func::MULT_EQUAL_FUNC)
+ item->set_extraction_flag(DELETION_FL);
+ else
+ {
+ item->clear_extraction_flag();
+ li.remove();
+ }
+ }
+ }
+ switch (((Item_cond*) cond)->argument_list()->elements)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return (((Item_cond*) cond)->argument_list()->head());
+ default:
+ return cond;
+ }
+ }
+ return cond;
+}
+
+
+/**
+ @brief
+ Extract condition that can be pushed from HAVING into WHERE
+
+ @param thd the thread handle
+ @param having the HAVING clause of this select
+ @param having_equal multiple equalities of HAVING
+
+ @details
+ This method builds a set of conditions dependent only on
+ fields used in the GROUP BY of this select (directly or indirectly
+ through equalities). These conditions are extracted from the HAVING
+ clause of this select.
+ The method saves these conditions into attach_to_conds list and removes
+ from HAVING conditions that can be entirely pushed into WHERE.
+
+ Example of the HAVING pushdown transformation:
+
+ SELECT t1.a,MAX(t1.b)
+ FROM t1
+ GROUP BY t1.a
+ HAVING (t1.a>2) AND (MAX(c)>12);
+
+ =>
+
+ SELECT t1.a,MAX(t1.b)
+ FROM t1
+ WHERE (t1.a>2)
+ GROUP BY t1.a
+ HAVING (MAX(c)>12);
+
+ In this method (t1.a>2) is not attached to the WHERE clause.
+ It is pushed into the attach_to_conds list to be attached to
+ the WHERE clause later.
+
+ In details:
+ 1. Collect fields used in the GROUP BY grouping_fields of this SELECT
+ 2. Collect fields equal to grouping_fields from the WHERE clause
+ of this SELECT and add them to the grouping_fields list.
+ 3. Extract the most restrictive condition from the HAVING clause of this
+ select that depends only on the grouping fields (directly or indirectly
+ through equality).
+ If the extracted condition is an AND condition it is transformed into a
+ list of all its conjuncts saved in attach_to_conds. Otherwise,
+ the condition is put into attach_to_conds as the only its element.
+ 4. Remove conditions from HAVING clause that can be entirely pushed
+ into WHERE.
+ Multiple equalities are not removed but marked with DELETION_FL flag.
+ They will be deleted later in substitite_for_best_equal_field() called
+ for the HAVING condition.
+ 5. Unwrap fields wrapped in Item_ref wrappers contained in the condition
+ of attach_to_conds so the condition could be pushed into WHERE.
+
+ @note
+ This method is similar to st_select_lex::pushdown_cond_into_where_clause().
+
+ @retval TRUE if an error occurs
+ @retval FALSE otherwise
+*/
+
+Item *st_select_lex::pushdown_from_having_into_where(THD *thd, Item *having)
+{
+ if (!having || !group_list.first)
+ return having;
+ if (!cond_pushdown_is_allowed())
+ return having;
+
+ st_select_lex *save_curr_select= thd->lex->current_select;
+ thd->lex->current_select= this;
+
+ /*
+ 1. Collect fields used in the GROUP BY grouping fields of this SELECT
+ 2. Collect fields equal to grouping_fields from the WHERE clause
+ of this SELECT and add them to the grouping fields list.
+ */
+ if (collect_grouping_fields(thd) ||
+ collect_fields_equal_to_grouping(thd))
+ return having;
+
+ /*
+ 3. Extract the most restrictive condition from the HAVING clause of this
+ select that depends only on the grouping fields (directly or indirectly
+ through equality).
+ If the extracted condition is an AND condition it is transformed into a
+ list of all its conjuncts saved in attach_to_conds. Otherwise,
+ the condition is put into attach_to_conds as the only its element.
+ */
+ List_iterator_fast<Item> it(attach_to_conds);
+ Item *item;
+ check_cond_extraction_for_grouping_fields(thd, having);
+ if (build_pushable_cond_for_having_pushdown(thd, having))
+ {
+ attach_to_conds.empty();
+ goto exit;
+ }
+ if (!attach_to_conds.elements)
+ goto exit;
+
+ /*
+ 4. Remove conditions from HAVING clause that can be entirely pushed
+ into WHERE.
+ Multiple equalities are not removed but marked with DELETION_FL flag.
+ They will be deleted later in substitite_for_best_equal_field() called
+ for the HAVING condition.
+ */
+ having= remove_pushed_top_conjuncts_for_having(thd, having);
+
+ /*
+ Change join->cond_equal which points to the multiple equalities of
+ the top level of HAVING.
+ Removal of AND conditions may leave only one conjunct in HAVING.
+
+ Example 1:
+ SELECT *
+ FROM t1
+ GROUP BY t1.a
+ (t1.a < 2) AND (t1.b = 2)
+
+ (t1.a < 2) is pushed into WHERE.
+ join->cond_equal should point on (t1.b = 2) multiple equality now.
+
+ Example 2:
+ SELECT *
+ FROM t1
+ GROUP BY t1.a
+ (t1.a = 2) AND (t1.b < 2)
+
+ (t1.a = 2) is pushed into WHERE.
+ join->cond_equal should be NULL now.
+ */
+ if (having &&
+ having->type() == Item::FUNC_ITEM &&
+ ((Item_func*) having)->functype() == Item_func::MULT_EQUAL_FUNC)
+ join->having_equal= new (thd->mem_root) COND_EQUAL((Item_equal *)having,
+ thd->mem_root);
+ else if (!having ||
+ having->type() != Item::COND_ITEM ||
+ ((Item_cond *)having)->functype() != Item_cond::COND_AND_FUNC)
+ join->having_equal= 0;
+
+ /*
+ 5. Unwrap fields wrapped in Item_ref wrappers contained in the condition
+ of attach_to_conds so the condition could be pushed into WHERE.
+ */
+ it.rewind();
+ while ((item=it++))
+ {
+ item= item->transform(thd,
+ &Item::field_transformer_for_having_pushdown,
+ (uchar *)this);
+
+ if (item->walk(&Item::cleanup_excluding_immutables_processor, 0, STOP_PTR)
+ || item->fix_fields(thd, NULL))
+ {
+ attach_to_conds.empty();
+ goto exit;
+ }
+ }
+exit:
+ thd->lex->current_select= save_curr_select;
+ return having;
+}
+
+
+bool LEX::stmt_install_plugin(const DDL_options_st &opt,
+ const Lex_ident_sys_st &name,
+ const LEX_CSTRING &soname)
+{
+ create_info.init();
+ if (add_create_options_with_check(opt))
+ return true;
+ sql_command= SQLCOM_INSTALL_PLUGIN;
+ comment= name;
+ ident= soname;
+ return false;
+}
+
+
+void LEX::stmt_install_plugin(const LEX_CSTRING &soname)
+{
+ sql_command= SQLCOM_INSTALL_PLUGIN;
+ comment= null_clex_str;
+ ident= soname;
+}
+
+
+bool LEX::stmt_uninstall_plugin_by_name(const DDL_options_st &opt,
+ const Lex_ident_sys_st &name)
+{
+ check_opt.init();
+ if (add_create_options_with_check(opt))
+ return true;
+ sql_command= SQLCOM_UNINSTALL_PLUGIN;
+ comment= name;
+ ident= null_clex_str;
+ return false;
+}
+
+
+bool LEX::stmt_uninstall_plugin_by_soname(const DDL_options_st &opt,
+ const LEX_CSTRING &soname)
+{
+ check_opt.init();
+ if (add_create_options_with_check(opt))
+ return true;
+ sql_command= SQLCOM_UNINSTALL_PLUGIN;
+ comment= null_clex_str;
+ ident= soname;
+ return false;
+}
+
+
+bool LEX::stmt_prepare_validate(const char *stmt_type)
+{
+ if (unlikely(table_or_sp_used()))
+ {
+ my_error(ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), stmt_type);
+ return true;
+ }
+ return check_main_unit_semantics();
+}
+
+
+bool LEX::stmt_prepare(const Lex_ident_sys_st &ident, Item *code)
+{
+ sql_command= SQLCOM_PREPARE;
+ if (stmt_prepare_validate("PREPARE..FROM"))
+ return true;
+ prepared_stmt.set(ident, code, NULL);
+ return false;
+}
+
+
+bool LEX::stmt_execute_immediate(Item *code, List<Item> *params)
+{
+ sql_command= SQLCOM_EXECUTE_IMMEDIATE;
+ if (stmt_prepare_validate("EXECUTE IMMEDIATE"))
+ return true;
+ static const Lex_ident_sys immediate(STRING_WITH_LEN("IMMEDIATE"));
+ prepared_stmt.set(immediate, code, params);
+ return false;
+}
+
+
+bool LEX::stmt_execute(const Lex_ident_sys_st &ident, List<Item> *params)
+{
+ sql_command= SQLCOM_EXECUTE;
+ prepared_stmt.set(ident, NULL, params);
+ return stmt_prepare_validate("EXECUTE..USING");
+}
+
+
+void LEX::stmt_deallocate_prepare(const Lex_ident_sys_st &ident)
+{
+ sql_command= SQLCOM_DEALLOCATE_PREPARE;
+ prepared_stmt.set(ident, NULL, NULL);
+}
+
+
+bool LEX::stmt_alter_table_exchange_partition(Table_ident *table)
+{
+ DBUG_ASSERT(sql_command == SQLCOM_ALTER_TABLE);
+ first_select_lex()->db= table->db;
+ if (first_select_lex()->db.str == NULL &&
+ copy_db_to(&first_select_lex()->db))
+ return true;
+ name= table->table;
+ alter_info.partition_flags|= ALTER_PARTITION_EXCHANGE;
+ if (!first_select_lex()->add_table_to_list(thd, table, NULL,
+ TL_OPTION_UPDATING,
+ TL_READ_NO_INSERT,
+ MDL_SHARED_NO_WRITE))
+ return true;
+ DBUG_ASSERT(!m_sql_cmd);
+ m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table_exchange_partition();
+ return m_sql_cmd == NULL;
+}
+
+
+void LEX::stmt_purge_to(const LEX_CSTRING &to)
+{
+ type= 0;
+ sql_command= SQLCOM_PURGE;
+ to_log= to.str;
+}
+
+
+bool LEX::stmt_purge_before(Item *item)
+{
+ type= 0;
+ sql_command= SQLCOM_PURGE_BEFORE;
+ value_list.empty();
+ value_list.push_front(item, thd->mem_root);
+ return check_main_unit_semantics();
+}
+
+
+bool LEX::stmt_create_udf_function(const DDL_options_st &options,
+ enum_sp_aggregate_type agg_type,
+ const Lex_ident_sys_st &name,
+ Item_result return_type,
+ const LEX_CSTRING &soname)
+{
+ if (stmt_create_function_start(options))
+ return true;
+
+ if (unlikely(is_native_function(thd, &name)))
+ {
+ my_error(ER_NATIVE_FCT_NAME_COLLISION, MYF(0), name.str);
+ return true;
+ }
+ sql_command= SQLCOM_CREATE_FUNCTION;
+ udf.name= name;
+ udf.returns= return_type;
+ udf.dl= soname.str;
+ udf.type= agg_type == GROUP_AGGREGATE ? UDFTYPE_AGGREGATE :
+ UDFTYPE_FUNCTION;
+ stmt_create_routine_finalize();
+ return false;
+}
+
+
+bool LEX::stmt_create_stored_function_start(const DDL_options_st &options,
+ enum_sp_aggregate_type agg_type,
+ const sp_name *spname)
+{
+ if (stmt_create_function_start(options) ||
+ unlikely(!make_sp_head_no_recursive(thd, spname,
+ &sp_handler_function, agg_type)))
return true;
- restore_values_list_state();
- current_select->linkage= DERIVED_TABLE_TYPE;
return false;
}
+Spvar_definition *LEX::row_field_name(THD *thd, const Lex_ident_sys_st &name)
+{
+ Spvar_definition *res;
+ if (unlikely(check_string_char_length(&name, 0, NAME_CHAR_LEN,
+ system_charset_info, 1)))
+ {
+ my_error(ER_TOO_LONG_IDENT, MYF(0), name.str);
+ return NULL;
+ }
+ if (unlikely(!(res= new (thd->mem_root) Spvar_definition())))
+ return NULL;
+ init_last_field(res, &name, thd->variables.collation_database);
+ return res;
+}
+
+
bool LEX::map_data_type(const Lex_ident_sys_st &schema_name,
Lex_field_type_st *type) const
{
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index d720d902bd7..976d1b79cad 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -33,6 +33,7 @@
#include "sql_tvc.h"
#include "item.h"
#include "sql_schema.h"
+#include "table.h"
/* Used for flags of nesting constructs */
#define SELECT_NESTING_MAP_SIZE 64
@@ -149,6 +150,12 @@ public:
bool copy_or_convert(THD *thd, const Lex_ident_cli_st *str, CHARSET_INFO *cs);
bool is_null() const { return str == NULL; }
bool to_size_number(ulonglong *to) const;
+ void set_valid_utf8(const LEX_CSTRING *name)
+ {
+ DBUG_ASSERT(Well_formed_prefix(system_charset_info, name->str,
+ name->length).length() == name->length);
+ str= name->str ; length= name->length;
+ }
};
@@ -164,6 +171,33 @@ public:
{
((LEX_CSTRING &) *this)= null_clex_str;
}
+ Lex_ident_sys(const char *name, size_t length)
+ {
+ LEX_CSTRING tmp= {name, length};
+ set_valid_utf8(&tmp);
+ }
+ Lex_ident_sys & operator=(const Lex_ident_sys_st &name)
+ {
+ Lex_ident_sys_st::operator=(name);
+ return *this;
+ }
+};
+
+
+/**
+ ORDER BY ... LIMIT parameters;
+*/
+class Lex_order_limit_lock: public Sql_alloc
+{
+public:
+ SQL_I_List<st_order> *order_list; /* ORDER clause */
+ Lex_select_lock lock;
+ Lex_select_limit limit;
+
+ Lex_order_limit_lock() :order_list(NULL)
+ {}
+
+ bool set_to(st_select_lex *sel);
};
@@ -174,6 +208,14 @@ enum sub_select_type
UNION_TYPE, INTERSECT_TYPE, EXCEPT_TYPE,
GLOBAL_OPTIONS_TYPE, DERIVED_TABLE_TYPE, OLAP_TYPE
};
+
+inline int cmp_unit_op(enum sub_select_type op1, enum sub_select_type op2)
+{
+ DBUG_ASSERT(op1 >= UNION_TYPE && op1 <= EXCEPT_TYPE);
+ DBUG_ASSERT(op2 >= UNION_TYPE && op2 <= EXCEPT_TYPE);
+ return (op1 == INTERSECT_TYPE ? 1 : 0) - (op2 == INTERSECT_TYPE ? 1 : 0);
+}
+
enum unit_common_op {OP_MIX, OP_UNION, OP_INTERSECT, OP_EXCEPT};
enum enum_view_suid
@@ -193,6 +235,22 @@ enum plsql_cursor_attr_t
};
+enum enum_sp_suid_behaviour
+{
+ SP_IS_DEFAULT_SUID= 0,
+ SP_IS_NOT_SUID,
+ SP_IS_SUID
+};
+
+
+enum enum_sp_aggregate_type
+{
+ DEFAULT_AGGREGATE= 0,
+ NOT_AGGREGATE,
+ GROUP_AGGREGATE
+};
+
+
/* These may not be declared yet */
class Table_ident;
class sql_exchange;
@@ -215,6 +273,8 @@ class Item_window_func;
struct sql_digest_state;
class With_clause;
class my_var;
+class select_handler;
+class Pushdown_select;
#define ALLOC_ROOT_SET 1024
@@ -265,15 +325,6 @@ extern uint binlog_unsafe_map[256];
void binlog_unsafe_map_init();
#endif
-struct LEX_TYPE
-{
- enum enum_field_types type;
- char *length, *dec;
- CHARSET_INFO *charset;
- void set(int t, char *l, char *d, CHARSET_INFO *cs)
- { type= (enum_field_types)t; length= l; dec= d; charset= cs; }
-};
-
#ifdef MYSQL_SERVER
/*
The following hack is needed because mysql_yacc.cc does not define
@@ -302,7 +353,8 @@ struct LEX_TYPE
This is not within #ifdef because we want "EXPLAIN PARTITIONS ..." to produce
additional "partitions" column even if partitioning is not compiled in.
*/
-#define DESCRIBE_PARTITIONS 4
+#define DESCRIBE_PARTITIONS 4
+#define DESCRIBE_EXTENDED2 8
#ifdef MYSQL_SERVER
@@ -311,13 +363,6 @@ extern MYSQL_PLUGIN_IMPORT const LEX_CSTRING empty_clex_str;
extern const LEX_CSTRING star_clex_str;
extern const LEX_CSTRING param_clex_str;
-enum enum_sp_suid_behaviour
-{
- SP_IS_DEFAULT_SUID= 0,
- SP_IS_NOT_SUID,
- SP_IS_SUID
-};
-
enum enum_sp_data_access
{
SP_DEFAULT_ACCESS= 0,
@@ -327,13 +372,6 @@ enum enum_sp_data_access
SP_MODIFIES_SQL_DATA
};
-enum enum_sp_aggregate_type
-{
- DEFAULT_AGGREGATE= 0,
- NOT_AGGREGATE,
- GROUP_AGGREGATE
-};
-
const LEX_CSTRING sp_data_access_name[]=
{
{ STRING_WITH_LEN("") },
@@ -541,7 +579,7 @@ public:
unit is container of either
- One SELECT
- UNION of selects
- select_lex and unit are both inherited form select_lex_node
+ select_lex and unit are both inherited form st_select_lex_node
neighbors are two select_lex or units on the same level
All select describing structures linked with following pointers:
@@ -666,13 +704,6 @@ public:
ulonglong options;
/*
- In sql_cache we store SQL_CACHE flag as specified by user to be
- able to restore SELECT statement from internal structures.
- */
- enum e_sql_cache { SQL_CACHE_UNSPECIFIED, SQL_NO_CACHE, SQL_CACHE };
- e_sql_cache sql_cache;
-
- /*
result of this query can't be cached, bit field, can be :
UNCACHEABLE_DEPENDENT_GENERATED
UNCACHEABLE_DEPENDENT_INJECTED
@@ -682,11 +713,15 @@ public:
UNCACHEABLE_PREPARE
*/
uint8 uncacheable;
+private:
enum sub_select_type linkage;
+public:
bool is_linkage_set() const
{
return linkage == UNION_TYPE || linkage == INTERSECT_TYPE || linkage == EXCEPT_TYPE;
}
+ enum sub_select_type get_linkage() { return linkage; }
+ bool distinct;
bool no_table_names_allowed; /* used for global order by */
static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
@@ -707,10 +742,28 @@ public:
void include_down(st_select_lex_node *upper);
void add_slave(st_select_lex_node *slave_arg);
void include_neighbour(st_select_lex_node *before);
+ void link_chain_down(st_select_lex_node *first);
+ void link_neighbour(st_select_lex_node *neighbour)
+ {
+ DBUG_ASSERT(next == NULL);
+ DBUG_ASSERT(neighbour != NULL);
+ next= neighbour;
+ neighbour->prev= &next;
+ }
+ void cut_next() { next= NULL; }
void include_standalone(st_select_lex_node *sel, st_select_lex_node **ref);
void include_global(st_select_lex_node **plink);
void exclude();
void exclude_from_tree();
+ void exclude_from_global()
+ {
+ if (!link_prev)
+ return;
+ if (((*link_prev)= link_next))
+ link_next->link_prev= link_prev;
+ link_next= NULL;
+ link_prev= NULL;
+ }
void substitute_in_tree(st_select_lex_node *subst);
void set_slave(st_select_lex_node *slave_arg) { slave= slave_arg; }
@@ -727,10 +780,27 @@ public:
st_select_lex_node *insert_chain_before(st_select_lex_node **ptr_pos_to_insert,
st_select_lex_node *end_chain_node);
void move_as_slave(st_select_lex_node *new_master);
+ void set_linkage(enum sub_select_type l)
+ {
+ DBUG_ENTER("st_select_lex_node::set_linkage");
+ DBUG_PRINT("info", ("node: %p linkage: %d->%d", this, linkage, l));
+ linkage= l;
+ DBUG_VOID_RETURN;
+ }
+ /*
+ This method created for reiniting LEX in mysql_admin_table() and can be
+ used only if you are going remove all SELECT_LEX & units except belonger
+ to LEX (LEX::unit & LEX::select, for other purposes there are
+ SELECT_LEX_UNIT::exclude_level & SELECT_LEX_UNIT::exclude_tree.
+
+ It is also used in parsing to detach builtin select.
+ */
+ void cut_subtree() { slave= 0; }
friend class st_select_lex_unit;
friend bool mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *sel);
friend bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
bool open_view_no_parse);
+ friend class st_select_lex;
private:
void fast_exclude();
};
@@ -762,12 +832,13 @@ protected:
bool prepare_join(THD *thd, SELECT_LEX *sl, select_result *result,
ulong additional_options,
bool is_union_select);
- bool join_union_item_types(THD *thd, List<Item> &types, uint count);
bool join_union_type_handlers(THD *thd,
class Type_holder *holders, uint count);
bool join_union_type_attributes(THD *thd,
class Type_holder *holders, uint count);
public:
+ bool join_union_item_types(THD *thd, List<Item> &types, uint count);
+public:
// Ensures that at least all members used during cleanup() are initialized.
st_select_lex_unit()
: union_result(NULL), table(NULL), result(NULL),
@@ -776,9 +847,9 @@ public:
{
}
-
TABLE *table; /* temporary table using for appending UNION results */
select_result *result;
+ st_select_lex *pre_last_parse;
bool prepared, // prepare phase already performed for UNION (unit)
optimized, // optimize phase already performed for UNION (unit)
optimized_2,
@@ -869,11 +940,15 @@ public:
void init_query();
st_select_lex* outer_select();
+ const st_select_lex* first_select() const
+ {
+ return reinterpret_cast<const st_select_lex*>(slave);
+ }
st_select_lex* first_select()
{
return reinterpret_cast<st_select_lex*>(slave);
}
- inline void set_with_clause(With_clause *with_cl);
+ void set_with_clause(With_clause *with_cl);
st_select_lex_unit* next_unit()
{
return reinterpret_cast<st_select_lex_unit*>(next);
@@ -917,36 +992,70 @@ public:
int save_union_explain(Explain_query *output);
int save_union_explain_part2(Explain_query *output);
unit_common_op common_op();
+
+ void reset_distinct();
+ void fix_distinct();
+
+ void register_select_chain(SELECT_LEX *first_sel);
+
+ bool set_nest_level(int new_nest_level);
+ bool check_parameters(SELECT_LEX *main_select);
+
+ bool set_lock_to_the_last_select(Lex_select_lock l);
+
+ friend class st_select_lex;
};
typedef class st_select_lex_unit SELECT_LEX_UNIT;
typedef Bounds_checked_array<Item*> Ref_ptr_array;
-/*
- Structure which consists of the field and the item which
- produces this field.
+/**
+ Structure which consists of the field and the item that
+ corresponds to this field.
*/
-class Grouping_tmp_field :public Sql_alloc
+class Field_pair :public Sql_alloc
{
public:
- Field *tmp_field;
- Item *producing_item;
- Grouping_tmp_field(Field *fld, Item *item)
- :tmp_field(fld), producing_item(item) {}
+ Field *field;
+ Item *corresponding_item;
+ Field_pair(Field *fld, Item *item)
+ :field(fld), corresponding_item(item) {}
};
+Field_pair *get_corresponding_field_pair(Item *item,
+ List<Field_pair> pair_list);
+Field_pair *find_matching_field_pair(Item *item, List<Field_pair> pair_list);
+
#define TOUCHED_SEL_COND 1/* WHERE/HAVING/ON should be reinited before use */
#define TOUCHED_SEL_DERIVED (1<<1)/* derived should be reinited before use */
+
/*
SELECT_LEX - store information of parsed SELECT statment
*/
class st_select_lex: public st_select_lex_node
{
public:
+ /*
+ Currently the field first_nested is used only by parser.
+ It containa either a reference to the first select
+ of the nest of selects to which 'this' belongs to, or
+ in the case of priority jump it contains a reference to
+ the select to which the priority nest has to be attached to.
+ If there is no priority jump then the first select of the
+ nest contains the reference to itself in first_nested.
+ Example:
+ select1 union select2 intersect select
+ Here we have a priority jump at select2.
+ So select2->first_nested points to select1,
+ while select3->first_nested points to select2 and
+ select1->first_nested points to select1.
+ */
+ st_select_lex *first_nested;
+
Name_resolution_context context;
LEX_CSTRING db;
Item *where, *having; /* WHERE & HAVING clauses */
@@ -954,6 +1063,7 @@ public:
Item *prep_having;/* saved HAVING clause for prepared statement processing */
Item *cond_pushed_into_where; /* condition pushed into the select's WHERE */
Item *cond_pushed_into_having; /* condition pushed into the select's HAVING */
+ List<Item> attach_to_conds;
/* Saved values of the WHERE and HAVING clauses*/
Item::cond_result cond_value, having_value;
/*
@@ -1042,6 +1152,7 @@ public:
SQL_I_List<ORDER> order_list; /* ORDER clause */
SQL_I_List<ORDER> gorder_list;
Item *select_limit, *offset_limit; /* LIMIT clause parameters */
+ bool is_set_query_expr_tail;
/// Array of pointers to top elements of all_fields list
Ref_ptr_array ref_pointer_array;
@@ -1076,6 +1187,7 @@ public:
*/
uint fields_in_window_functions;
enum_parsing_place parsing_place; /* where we are parsing expression */
+ enum_parsing_place save_parsing_place;
enum_parsing_place context_analysis_place; /* where we are in prepare */
bool with_sum_func; /* sum function indicator */
@@ -1143,6 +1255,8 @@ public:
bool no_wrap_view_item;
/* exclude this select from check of unique_table() */
bool exclude_from_table_unique_test;
+ /* the select is "service-select" and can not have tables*/
+ bool is_service_select;
/* index in the select list of the expression currently being fixed */
int cur_pos_in_select_list;
@@ -1173,7 +1287,8 @@ public:
nesting_map name_visibility_map;
table_map with_dep;
- List<Grouping_tmp_field> grouping_tmp_fields;
+ /* the structure to store fields that are used in the GROUP BY of this select */
+ List<Field_pair> grouping_tmp_fields;
/* it is for correct printing SELECT options */
thr_lock_type lock_type;
@@ -1183,6 +1298,11 @@ public:
table_value_constr *tvc;
bool in_tvc;
+ /* The interface employed to execute the select query by a foreign engine */
+ select_handler *select_h;
+ /* The object used to organize execution of the query by a foreign engine */
+ Pushdown_select *pushdown_select;
+
/** System Versioning */
public:
uint versioned_tables;
@@ -1190,9 +1310,18 @@ public:
/* push new Item_field into item_list */
bool vers_push_field(THD *thd, TABLE_LIST *table, const LEX_CSTRING field_name);
+ int period_setup_conds(THD *thd, TABLE_LIST *table);
void init_query();
void init_select();
st_select_lex_unit* master_unit() { return (st_select_lex_unit*) master; }
+ inline void set_master_unit(st_select_lex_unit *master_unit)
+ {
+ master= (st_select_lex_node *)master_unit;
+ }
+ void set_master(st_select_lex *master_arg)
+ {
+ master= master_arg;
+ }
st_select_lex_unit* first_inner_unit()
{
return (st_select_lex_unit*) slave;
@@ -1247,12 +1376,6 @@ public:
List<Item>* get_item_list();
ulong get_table_join_options();
void set_lock_for_tables(thr_lock_type lock_type, bool for_update);
- inline void init_order()
- {
- order_list.elements= 0;
- order_list.first= 0;
- order_list.next= &order_list.first;
- }
/*
This method created for reiniting LEX in mysql_admin_table() and can be
used only if you are going remove all SELECT_LEX & units except belonger
@@ -1387,9 +1510,10 @@ public:
With_element *find_table_def_in_with_clauses(TABLE_LIST *table);
bool check_unrestricted_recursive(bool only_standard_compliant);
bool check_subqueries_with_recursive_references();
- void collect_grouping_fields(THD *thd, ORDER *grouping_list);
- void check_cond_extraction_for_grouping_fields(Item *cond,
- TABLE_LIST *derived);
+ void collect_grouping_fields_for_derived(THD *thd, ORDER *grouping_list);
+ bool collect_grouping_fields(THD *thd);
+ bool collect_fields_equal_to_grouping(THD *thd);
+ void check_cond_extraction_for_grouping_fields(THD *thd, Item *cond);
Item *build_cond_for_grouping_fields(THD *thd, Item *cond,
bool no_to_clones);
@@ -1412,6 +1536,15 @@ public:
bool cond_pushdown_is_allowed() const
{ return !olap && !explicit_limit && !tvc; }
+ bool build_pushable_cond_for_having_pushdown(THD *thd, Item *cond);
+ void pushdown_cond_into_where_clause(THD *thd, Item *extracted_cond,
+ Item **remaining_cond,
+ Item_transformer transformer,
+ uchar *arg);
+ Item *pushdown_from_having_into_where(THD *thd, Item *having);
+
+ select_handler *find_select_handler(THD *thd);
+
private:
bool m_non_agg_field_used;
bool m_agg_func_used;
@@ -1429,6 +1562,35 @@ public:
DBUG_ASSERT(this != sel);
select_n_where_fields+= sel->select_n_where_fields;
}
+ inline void set_linkage_and_distinct(enum sub_select_type l, bool d)
+ {
+ DBUG_ENTER("SELECT_LEX::set_linkage_and_distinct");
+ DBUG_PRINT("info", ("select: %p distinct %d", this, d));
+ set_linkage(l);
+ DBUG_ASSERT(l == UNION_TYPE ||
+ l == INTERSECT_TYPE ||
+ l == EXCEPT_TYPE);
+ if (d && master_unit() && master_unit()->union_distinct != this)
+ master_unit()->union_distinct= this;
+ distinct= d;
+ with_all_modifier= !distinct;
+ DBUG_VOID_RETURN;
+ }
+ bool set_nest_level(int new_nest_level);
+ bool check_parameters(SELECT_LEX *main_select);
+ void mark_select()
+ {
+ DBUG_ENTER("st_select_lex::mark_select()");
+ DBUG_PRINT("info", ("Select #%d", select_number));
+ DBUG_VOID_RETURN;
+ }
+ void register_unit(SELECT_LEX_UNIT *unit,
+ Name_resolution_context *outer_context);
+ SELECT_LEX_UNIT *attach_selects_chain(SELECT_LEX *sel,
+ Name_resolution_context *context);
+ void add_statistics(SELECT_LEX_UNIT *unit);
+ bool make_unique_derived_name(THD *thd, LEX_CSTRING *alias);
+ void lex_start(LEX *plex);
};
typedef class st_select_lex SELECT_LEX;
@@ -1824,8 +1986,7 @@ public:
@retval nonzero if the statement is a row injection
*/
inline bool is_stmt_row_injection() const {
- return binlog_stmt_flags &
- (1U << (BINLOG_STMT_UNSAFE_COUNT + BINLOG_STMT_TYPE_ROW_INJECTION));
+ return binlog_stmt_flags & (1U << BINLOG_STMT_TYPE_ROW_INJECTION);
}
/**
@@ -1835,8 +1996,7 @@ public:
*/
inline void set_stmt_row_injection() {
DBUG_ENTER("set_stmt_row_injection");
- binlog_stmt_flags|=
- (1U << (BINLOG_STMT_UNSAFE_COUNT + BINLOG_STMT_TYPE_ROW_INJECTION));
+ binlog_stmt_flags|= (1U << BINLOG_STMT_TYPE_ROW_INJECTION);
DBUG_VOID_RETURN;
}
@@ -2112,7 +2272,7 @@ private:
The statement is a row injection (i.e., either a BINLOG
statement or a row event executed by the slave SQL thread).
*/
- BINLOG_STMT_TYPE_ROW_INJECTION = 0,
+ BINLOG_STMT_TYPE_ROW_INJECTION = BINLOG_STMT_UNSAFE_COUNT,
/** The last element of this enumeration type. */
BINLOG_STMT_TYPE_COUNT
@@ -2126,8 +2286,8 @@ private:
- The low BINLOG_STMT_UNSAFE_COUNT bits indicate the types of
unsafeness that the current statement has.
- - The next BINLOG_STMT_TYPE_COUNT bits indicate if the statement
- is of some special type.
+ - The next BINLOG_STMT_TYPE_COUNT-BINLOG_STMT_TYPE_COUNT bits indicate if
+ the statement is of some special type.
This must be a member of LEX, not of THD: each stored procedure
needs to remember its unsafeness state between calls and each
@@ -2561,7 +2721,7 @@ private:
int scan_ident_start(THD *thd, Lex_ident_cli_st *str);
int scan_ident_middle(THD *thd, Lex_ident_cli_st *str,
CHARSET_INFO **cs, my_lex_states *);
- int scan_ident_delimited(THD *thd, Lex_ident_cli_st *str);
+ int scan_ident_delimited(THD *thd, Lex_ident_cli_st *str, uchar quote_char);
bool get_7bit_or_8bit_ident(THD *thd, uchar *last_char);
/** Current thread. */
@@ -2836,15 +2996,103 @@ public:
Explain_delete* save_explain_delete_data(MEM_ROOT *mem_root, THD *thd);
};
+enum account_lock_type
+{
+ ACCOUNTLOCK_UNSPECIFIED= 0,
+ ACCOUNTLOCK_LOCKED,
+ ACCOUNTLOCK_UNLOCKED
+};
+
+enum password_exp_type
+{
+ PASSWORD_EXPIRE_UNSPECIFIED= 0,
+ PASSWORD_EXPIRE_NOW,
+ PASSWORD_EXPIRE_NEVER,
+ PASSWORD_EXPIRE_DEFAULT,
+ PASSWORD_EXPIRE_INTERVAL
+};
+
+struct Account_options: public USER_RESOURCES
+{
+ Account_options() { }
+
+ void reset()
+ {
+ bzero(this, sizeof(*this));
+ ssl_type= SSL_TYPE_NOT_SPECIFIED;
+ }
+
+ enum SSL_type ssl_type; // defined in violite.h
+ LEX_CSTRING x509_subject, x509_issuer, ssl_cipher;
+ account_lock_type account_locked;
+ password_exp_type password_expire;
+ longlong num_expiration_days;
+};
class Query_arena_memroot;
/* The state of the lex parsing. This is saved in the THD struct */
+
+class Lex_prepared_stmt
+{
+ Lex_ident_sys m_name; // Statement name (in all queries)
+ Item *m_code; // PREPARE or EXECUTE IMMEDIATE source expression
+ List<Item> m_params; // List of parameters for EXECUTE [IMMEDIATE]
+public:
+
+ Lex_prepared_stmt()
+ :m_code(NULL)
+ { }
+ const Lex_ident_sys &name() const
+ {
+ return m_name;
+ }
+ uint param_count() const
+ {
+ return m_params.elements;
+ }
+ List<Item> &params()
+ {
+ return m_params;
+ }
+ void set(const Lex_ident_sys_st &ident, Item *code, List<Item> *params)
+ {
+ DBUG_ASSERT(m_params.elements == 0);
+ m_name= ident;
+ m_code= code;
+ if (params)
+ m_params= *params;
+ }
+ bool params_fix_fields(THD *thd)
+ {
+ // Fix Items in the EXECUTE..USING list
+ List_iterator_fast<Item> param_it(m_params);
+ while (Item *param= param_it++)
+ {
+ if (param->fix_fields_if_needed_for_scalar(thd, 0))
+ return true;
+ }
+ return false;
+ }
+ bool get_dynamic_sql_string(THD *thd, LEX_CSTRING *dst, String *buffer);
+ void lex_start()
+ {
+ m_params.empty();
+ }
+};
+
+
struct LEX: public Query_tables_list
{
SELECT_LEX_UNIT unit; /* most upper unit */
- SELECT_LEX select_lex; /* first SELECT_LEX */
+ SELECT_LEX *first_select_lex() { return unit.first_select(); }
+ const SELECT_LEX *first_select_lex() const { return unit.first_select(); }
+
+private:
+ SELECT_LEX builtin_select;
/* current SELECT_LEX in parsing */
+
+public:
SELECT_LEX *current_select;
/* list of all SELECT_LEX */
SELECT_LEX *all_selects_list;
@@ -2890,7 +3138,6 @@ struct LEX: public Query_tables_list
const char *help_arg;
const char *backup_dir; /* For RESTORE/BACKUP */
const char* to_log; /* For PURGE MASTER LOGS TO */
- const char* x509_subject,*x509_issuer,*ssl_cipher;
String *wild; /* Wildcard in SHOW {something} LIKE 'wild'*/
sql_exchange *exchange;
select_result *result;
@@ -2926,6 +3173,9 @@ struct LEX: public Query_tables_list
*/
LEX_USER *definer;
+ /* Used in ALTER/CREATE user to store account locking options */
+ Account_options account_options;
+
Table_type table_type; /* Used for SHOW CREATE */
List<Key_part_spec> ref_list;
List<LEX_USER> users_list;
@@ -2950,6 +3200,12 @@ private:
bool sp_for_loop_condition(THD *thd, const Lex_for_loop_st &loop);
bool sp_for_loop_increment(THD *thd, const Lex_for_loop_st &loop);
+ /*
+ Check if Item_field and Item_ref are allowed in the current statement.
+ @retval false OK (fields are allowed)
+ @retval true ERROR (fields are not allowed). Error is raised.
+ */
+ bool check_expr_allows_fields_or_error(THD *thd, const char *name) const;
public:
void parse_error(uint err_number= ER_SYNTAX_ERROR);
inline bool is_arena_for_set_stmt() {return arena_for_set_stmt != 0;}
@@ -2977,6 +3233,14 @@ public:
required a local context, the parser pops the top-most context.
*/
List<Name_resolution_context> context_stack;
+ SELECT_LEX *select_stack[MAX_SELECT_NESTING + 1];
+ uint select_stack_top;
+ /*
+ Usually this is set to 0, but for INSERT/REPLACE SELECT it is set to 1.
+ When parsing such statements the pointer to the most outer select is placed
+ into the second element of select_stack rather than into the first.
+ */
+ uint select_stack_outer_barrier;
SQL_I_List<ORDER> proc_list;
SQL_I_List<TABLE_LIST> auxiliary_table_list, save_list;
@@ -2989,13 +3253,13 @@ public:
LEX_MASTER_INFO mi; // used by CHANGE MASTER
LEX_SERVER_OPTIONS server_options;
LEX_CSTRING relay_log_connection_name;
- USER_RESOURCES mqh;
LEX_RESET_SLAVE reset_slave_info;
ulonglong type;
ulong next_binlog_file_number;
/* The following is used by KILL */
killed_state kill_signal;
killed_type kill_type;
+ bool is_shutdown_wait_for_slaves;
/*
This variable is used in post-parse stage to declare that sum-functions,
or functions which have sense only if GROUP BY is present, are allowed.
@@ -3012,10 +3276,12 @@ public:
/*
Usually `expr` rule of yacc is quite reused but some commands better
not support subqueries which comes standard with this rule, like
- KILL, HA_READ, CREATE/ALTER EVENT etc. Set this to `false` to get
- syntax error back.
+ KILL, HA_READ, CREATE/ALTER EVENT etc. Set this to a non-NULL
+ clause name to get an error.
*/
- bool expr_allows_subselect;
+ const char *clause_that_disallows_subselect;
+ bool selects_allow_into;
+ bool selects_allow_procedure;
/*
A special command "PARSE_VCOL_EXPR" is defined for the parser
to translate a defining expression of a virtual column into an
@@ -3025,7 +3291,6 @@ public:
*/
bool parse_vcol_expr;
- enum SSL_type ssl_type; // defined in violite.h
enum enum_duplicates duplicates;
enum enum_tx_isolation tx_isolation;
enum enum_ha_read_modes ha_read_mode;
@@ -3041,6 +3306,7 @@ public:
uint profile_query_id;
uint profile_options;
uint grant, grant_tot_col, which_columns;
+ enum backup_stages backup_stage;
enum Foreign_key::fk_match_opt fk_match_option;
enum_fk_option fk_update_opt;
enum_fk_option fk_delete_opt;
@@ -3084,7 +3350,17 @@ public:
enum enum_yes_no_unknown tx_chain, tx_release;
bool safe_to_cache_query;
bool ignore;
+ bool next_is_main; // use "main" SELECT_LEX for nrxt allocation;
+ bool next_is_down; // use "main" SELECT_LEX for nrxt allocation;
st_parsing_options parsing_options;
+ uint8 lex_options; // see OPTION_LEX_*
+ /*
+ In sql_cache we store SQL_CACHE flag as specified by user to be
+ able to restore SELECT statement from internal structures.
+ */
+ enum e_sql_cache { SQL_CACHE_UNSPECIFIED, SQL_NO_CACHE, SQL_CACHE };
+ e_sql_cache sql_cache;
+
Alter_info alter_info;
/*
For CREATE TABLE statement last element of table list which is not
@@ -3092,12 +3368,7 @@ public:
creating or last of tables referenced by foreign keys).
*/
TABLE_LIST *create_last_non_select_table;
- /* Prepared statements SQL syntax:*/
- LEX_CSTRING prepared_stmt_name; /* Statement name (in all queries) */
- /* PREPARE or EXECUTE IMMEDIATE source expression */
- Item *prepared_stmt_code;
- /* Names of user variables holding parameters (in EXECUTE) */
- List<Item> prepared_stmt_params;
+ Lex_prepared_stmt prepared_stmt;
sp_head *sphead;
sp_name *spname;
bool sp_lex_in_use; // Keep track on lex usage in SPs for error handling
@@ -3225,6 +3496,7 @@ public:
/* System Versioning */
vers_select_conds_t vers_conditions;
+ vers_select_conds_t period_conditions;
inline void free_set_stmt_mem_root()
{
@@ -3282,20 +3554,24 @@ public:
SELECT_LEX *sl;
SELECT_LEX_UNIT *un;
for (sl= current_select, un= sl->master_unit();
- un != &unit;
- sl= sl->outer_select(), un= sl->master_unit())
+ un && un != &unit;
+ sl= sl->outer_select(), un= (sl ? sl->master_unit() : NULL))
{
- sl->uncacheable|= cause;
- un->uncacheable|= cause;
+ sl->uncacheable|= cause;
+ un->uncacheable|= cause;
}
- select_lex.uncacheable|= cause;
+ if (sl)
+ sl->uncacheable|= cause;
}
+ if (first_select_lex())
+ first_select_lex()->uncacheable|= cause;
}
void set_trg_event_type_for_tables();
TABLE_LIST *unlink_first_table(bool *link_to_local);
void link_first_table_back(TABLE_LIST *first, bool link_to_local);
void first_lists_tables_same();
+ void fix_first_select_number();
bool can_be_merged();
bool can_use_merged();
@@ -3333,22 +3609,94 @@ public:
void cleanup_after_one_table_open();
- bool push_context(Name_resolution_context *context, MEM_ROOT *mem_root)
+ bool push_context(Name_resolution_context *context);
+
+ Name_resolution_context *pop_context();
+
+ SELECT_LEX *select_stack_head()
{
- return context_stack.push_front(context, mem_root);
+ if (likely(select_stack_top))
+ return select_stack[select_stack_top - 1];
+ return NULL;
}
- Name_resolution_context *pop_context()
+ bool push_select(SELECT_LEX *select_lex)
{
- return context_stack.pop();
+ DBUG_ENTER("LEX::push_select");
+ DBUG_PRINT("info", ("Top Select was %p (%d) depth: %u pushed: %p (%d)",
+ select_stack_head(),
+ select_stack_top,
+ (select_stack_top ?
+ select_stack_head()->select_number :
+ 0),
+ select_lex, select_lex->select_number));
+ if (unlikely(select_stack_top > MAX_SELECT_NESTING))
+ {
+ my_error(ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+ if (push_context(&select_lex->context))
+ DBUG_RETURN(TRUE);
+ select_stack[select_stack_top++]= select_lex;
+ current_select= select_lex;
+ DBUG_RETURN(FALSE);
+ }
+
+ SELECT_LEX *pop_select()
+ {
+ DBUG_ENTER("LEX::pop_select");
+ SELECT_LEX *select_lex;
+ if (likely(select_stack_top))
+ select_lex= select_stack[--select_stack_top];
+ else
+ select_lex= 0;
+ DBUG_PRINT("info", ("Top Select is %p (%d) depth: %u poped: %p (%d)",
+ select_stack_head(),
+ select_stack_top,
+ (select_stack_top ?
+ select_stack_head()->select_number :
+ 0),
+ select_lex,
+ (select_lex ? select_lex->select_number : 0)));
+ DBUG_ASSERT(select_lex);
+
+ pop_context();
+
+ if (unlikely(!select_stack_top))
+ {
+ current_select= &builtin_select;
+ DBUG_PRINT("info", ("Top Select is empty -> sel builtin: %p",
+ current_select));
+ }
+ else
+ current_select= select_stack[select_stack_top - 1];
+
+ DBUG_RETURN(select_lex);
+ }
+
+ SELECT_LEX *current_select_or_default()
+ {
+ return current_select ? current_select : &builtin_select;
}
bool copy_db_to(LEX_CSTRING *to);
+ void inc_select_stack_outer_barrier()
+ {
+ select_stack_outer_barrier++;
+ }
+
+ SELECT_LEX *parser_current_outer_select()
+ {
+ return select_stack_top - 1 == select_stack_outer_barrier ?
+ 0 : select_stack[select_stack_top - 2];
+ }
+
Name_resolution_context *current_context()
{
return context_stack.head();
}
+
/*
Restore the LEX and THD in case of a parse error.
*/
@@ -3377,9 +3725,8 @@ public:
on its top. So select_lex (as the first added) will be at the tail
of the list.
*/
- if (&select_lex == all_selects_list && !sroutines.records)
+ if (first_select_lex() == all_selects_list && !sroutines.records)
{
- DBUG_ASSERT(!all_selects_list->next_select_in_list());
return TRUE;
}
return FALSE;
@@ -3400,27 +3747,17 @@ public:
bool last_field_generated_always_as_row_end();
bool set_bincmp(CHARSET_INFO *cs, bool bin);
- bool get_dynamic_sql_string(LEX_CSTRING *dst, String *buffer);
- bool prepared_stmt_params_fix_fields(THD *thd)
- {
- // Fix Items in the EXECUTE..USING list
- List_iterator_fast<Item> param_it(prepared_stmt_params);
- while (Item *param= param_it++)
- {
- if (param->fix_fields_if_needed_for_scalar(thd, 0))
- return true;
- }
- return false;
- }
+ bool new_sp_instr_stmt(THD *, const LEX_CSTRING &prefix,
+ const LEX_CSTRING &suffix);
+ bool sp_proc_stmt_statement_finalize_buf(THD *, const LEX_CSTRING &qbuf);
+ bool sp_proc_stmt_statement_finalize(THD *, bool no_lookahead);
+
sp_variable *sp_param_init(LEX_CSTRING *name);
bool sp_param_fill_definition(sp_variable *spvar);
int case_stmt_action_expr(Item* expr);
int case_stmt_action_when(Item *when, bool simple);
int case_stmt_action_then();
- bool add_select_to_union_list(bool is_union_distinct,
- enum sub_select_type type,
- bool is_top_level);
bool setup_select_in_parentheses();
bool set_trigger_new_row(const LEX_CSTRING *name, Item *val);
bool set_trigger_field(const LEX_CSTRING *name1, const LEX_CSTRING *name2,
@@ -3442,19 +3779,17 @@ public:
sp_name *make_sp_name(THD *thd, const LEX_CSTRING *name1,
const LEX_CSTRING *name2);
sp_name *make_sp_name_package_routine(THD *thd, const LEX_CSTRING *name);
- sp_head *make_sp_head(THD *thd, const sp_name *name, const Sp_handler *sph);
+ sp_head *make_sp_head(THD *thd, const sp_name *name, const Sp_handler *sph,
+ enum_sp_aggregate_type agg_type);
sp_head *make_sp_head_no_recursive(THD *thd, const sp_name *name,
- const Sp_handler *sph);
- sp_head *make_sp_head_no_recursive(THD *thd,
- DDL_options_st options, sp_name *name,
- const Sp_handler *sph)
- {
- if (add_create_options_with_check(options))
- return NULL;
- return make_sp_head_no_recursive(thd, name, sph);
- }
+ const Sp_handler *sph,
+ enum_sp_aggregate_type agg_type);
+ bool sp_body_finalize_routine(THD *);
+ bool sp_body_finalize_trigger(THD *);
+ bool sp_body_finalize_event(THD *);
bool sp_body_finalize_function(THD *);
bool sp_body_finalize_procedure(THD *);
+ bool sp_body_finalize_procedure_standalone(THD *, const sp_name *end_name);
sp_package *create_package_start(THD *thd,
enum_sql_command command,
const Sp_handler *sph,
@@ -3548,7 +3883,12 @@ public:
return create_item_qualified_asterisk(thd, &a, &b);
}
- Item *create_item_ident_nosp(THD *thd, Lex_ident_sys_st *name);
+ Item *create_item_ident_field(THD *thd, const char *db, const char *table,
+ const Lex_ident_sys_st *name);
+ Item *create_item_ident_nosp(THD *thd, Lex_ident_sys_st *name)
+ {
+ return create_item_ident_field(thd, NullS, NullS, name);
+ }
Item *create_item_ident_sp(THD *thd, Lex_ident_sys_st *name,
const char *start, const char *end);
Item *create_item_ident(THD *thd, Lex_ident_cli_st *cname)
@@ -3686,6 +4026,8 @@ public:
const Lex_ident_cli_st *var_name,
const Lex_ident_cli_st *field_name);
+ Item *create_item_query_expression(THD *thd, st_select_lex_unit *unit);
+
Item *make_item_func_replace(THD *thd, Item *org, Item *find, Item *replace);
Item *make_item_func_substr(THD *thd, Item *a, Item *b, Item *c);
Item *make_item_func_substr(THD *thd, Item *a, Item *b);
@@ -3889,6 +4231,17 @@ public:
sp_for_loop_intrange_finalize(thd, loop);
}
bool sp_for_loop_outer_block_finalize(THD *thd, const Lex_for_loop_st &loop);
+
+ /*
+ Make an Item when an identifier is found in the FOR loop bounds:
+ FOR rec IN cursor
+ FOR rec IN var1 .. var2
+ FOR rec IN row1.field1 .. xxx
+ */
+ Item *create_item_for_loop_bound(THD *thd,
+ const LEX_CSTRING *a,
+ const LEX_CSTRING *b,
+ const LEX_CSTRING *c);
/* End of FOR LOOP methods */
bool add_signal_statement(THD *thd, const class sp_condition_value *value);
@@ -3944,10 +4297,10 @@ public:
void add_key_to_list(LEX_CSTRING *field_name,
enum Key::Keytype type, bool check_exists);
// Add a constraint as a part of CREATE TABLE or ALTER TABLE
- bool add_constraint(LEX_CSTRING *name, Virtual_column_info *constr,
+ bool add_constraint(const LEX_CSTRING &name, Virtual_column_info *constr,
bool if_not_exists)
{
- constr->name= *name;
+ constr->name= name;
constr->flags= if_not_exists ?
Alter_info::CHECK_CONSTRAINT_IF_NOT_EXISTS : 0;
alter_info.check_constraint_list.push_back(constr);
@@ -3988,6 +4341,7 @@ public:
return check_create_options(create_info);
}
bool sp_add_cfetch(THD *thd, const LEX_CSTRING *name);
+ bool sp_add_agg_cfetch();
bool set_command_with_check(enum_sql_command command,
uint scope,
@@ -4037,14 +4391,16 @@ public:
bool create_like() const
{
- DBUG_ASSERT(!create_info.like() || !select_lex.item_list.elements);
+ DBUG_ASSERT(!create_info.like() ||
+ !first_select_lex()->item_list.elements);
return create_info.like();
}
bool create_select() const
{
- DBUG_ASSERT(!create_info.like() || !select_lex.item_list.elements);
- return select_lex.item_list.elements;
+ DBUG_ASSERT(!create_info.like() ||
+ !first_select_lex()->item_list.elements);
+ return first_select_lex()->item_list.elements;
}
bool create_simple() const
@@ -4052,14 +4408,8 @@ public:
return !create_like() && !create_select();
}
- bool check_dependencies_in_with_clauses();
- bool resolve_references_to_cte_in_hanging_cte();
- bool check_cte_dependencies_and_resolve_references();
- bool resolve_references_to_cte(TABLE_LIST *tables,
- TABLE_LIST **tables_last);
-
SELECT_LEX *exclude_last_select();
- bool add_unit_in_brackets(SELECT_LEX *nselect);
+ SELECT_LEX *exclude_not_first_select(SELECT_LEX *exclude);
void check_automatic_up(enum sub_select_type type);
bool create_or_alter_view_finalize(THD *thd, Table_ident *table_ident);
bool add_alter_view(THD *thd, uint16 algorithm, enum_view_suid suid,
@@ -4067,7 +4417,6 @@ public:
bool add_create_view(THD *thd, DDL_options_st ddl,
uint16 algorithm, enum_view_suid suid,
Table_ident *table_ident);
-
bool add_grant_command(THD *thd, enum_sql_command sql_command_arg,
stored_procedure_type type_arg);
@@ -4075,6 +4424,7 @@ public:
{
return create_info.vers_info;
}
+
/* The list of history-generating DML commands */
bool vers_history_generating() const
{
@@ -4097,6 +4447,41 @@ public:
return false;
}
}
+
+ int add_period(Lex_ident name, Lex_ident_sys_st start, Lex_ident_sys_st end)
+ {
+ if (check_period_name(name.str)) {
+ my_error(ER_WRONG_COLUMN_NAME, MYF(0), name.str);
+ return 1;
+ }
+
+ if (lex_string_cmp(system_charset_info, &start, &end) == 0)
+ {
+ my_error(ER_FIELD_SPECIFIED_TWICE, MYF(0), start.str);
+ return 1;
+ }
+
+ Table_period_info &info= create_info.period_info;
+
+ if (check_exists && info.name.streq(name))
+ return 0;
+
+ if (info.is_set())
+ {
+ my_error(ER_MORE_THAN_ONE_PERIOD, MYF(0));
+ return 1;
+ }
+ info.set_period(start, end);
+ info.name= name;
+
+ info.constr= new Virtual_column_info();
+ info.constr->expr= lt_creator.create(thd,
+ create_item_ident_nosp(thd, &start),
+ create_item_ident_nosp(thd, &end));
+ add_constraint(null_clex_str, info.constr, false);
+ return 0;
+ }
+
sp_package *get_sp_package() const;
/**
@@ -4108,7 +4493,7 @@ public:
*/
bool check_simple_select(const LEX_CSTRING *option)
{
- if (current_select != &select_lex)
+ if (current_select != &builtin_select)
{
char command[80];
strmake(command, option->str, MY_MIN(option->length, sizeof(command)-1));
@@ -4118,17 +4503,145 @@ public:
return false;
}
+ SELECT_LEX_UNIT *alloc_unit();
+ SELECT_LEX *alloc_select(bool is_select);
+ SELECT_LEX_UNIT *create_unit(SELECT_LEX*);
+ SELECT_LEX *wrap_unit_into_derived(SELECT_LEX_UNIT *unit);
+ SELECT_LEX *wrap_select_chain_into_derived(SELECT_LEX *sel);
+ bool main_select_push(bool service= false);
+ bool insert_select_hack(SELECT_LEX *sel);
+ SELECT_LEX *create_priority_nest(SELECT_LEX *first_in_nest);
+
+ bool set_main_unit(st_select_lex_unit *u)
+ {
+ unit.options= u->options;
+ unit.uncacheable= u->uncacheable;
+ unit.register_select_chain(u->first_select());
+ unit.first_select()->options|= builtin_select.options;
+ unit.fake_select_lex= u->fake_select_lex;
+ unit.union_distinct= u->union_distinct;
+ unit.set_with_clause(u->with_clause);
+ builtin_select.exclude_from_global();
+ return false;
+ }
+ bool check_main_unit_semantics();
+
+ SELECT_LEX_UNIT *parsed_select_expr_start(SELECT_LEX *s1, SELECT_LEX *s2,
+ enum sub_select_type unit_type,
+ bool distinct);
+ SELECT_LEX_UNIT *parsed_select_expr_cont(SELECT_LEX_UNIT *unit,
+ SELECT_LEX *s2,
+ enum sub_select_type unit_type,
+ bool distinct, bool oracle);
+ bool parsed_multi_operand_query_expression_body(SELECT_LEX_UNIT *unit);
+ SELECT_LEX_UNIT *add_tail_to_query_expression_body(SELECT_LEX_UNIT *unit,
+ Lex_order_limit_lock *l);
+ SELECT_LEX_UNIT *
+ add_tail_to_query_expression_body_ext_parens(SELECT_LEX_UNIT *unit,
+ Lex_order_limit_lock *l);
+ SELECT_LEX_UNIT *parsed_body_ext_parens_primary(SELECT_LEX_UNIT *unit,
+ SELECT_LEX *primary,
+ enum sub_select_type unit_type,
+ bool distinct);
+ SELECT_LEX_UNIT *
+ add_primary_to_query_expression_body(SELECT_LEX_UNIT *unit,
+ SELECT_LEX *sel,
+ enum sub_select_type unit_type,
+ bool distinct,
+ bool oracle);
+ SELECT_LEX_UNIT *
+ add_primary_to_query_expression_body_ext_parens(
+ SELECT_LEX_UNIT *unit,
+ SELECT_LEX *sel,
+ enum sub_select_type unit_type,
+ bool distinct);
+ SELECT_LEX *parsed_subselect(SELECT_LEX_UNIT *unit);
+ bool parsed_insert_select(SELECT_LEX *firs_select);
void save_values_list_state();
void restore_values_list_state();
- void tvc_start();
- bool tvc_start_derived();
- bool tvc_finalize();
- bool tvc_finalize_derived();
+ bool parsed_TVC_start();
+ SELECT_LEX *parsed_TVC_end();
+ TABLE_LIST *parsed_derived_table(SELECT_LEX_UNIT *unit,
+ int for_system_time,
+ LEX_CSTRING *alias);
+ bool parsed_create_view(SELECT_LEX_UNIT *unit, int check);
+ bool select_finalize(st_select_lex_unit *expr);
+ bool select_finalize(st_select_lex_unit *expr, Lex_select_lock l);
+ void relink_hack(st_select_lex *select_lex);
+
+ bool stmt_install_plugin(const DDL_options_st &opt,
+ const Lex_ident_sys_st &name,
+ const LEX_CSTRING &soname);
+ void stmt_install_plugin(const LEX_CSTRING &soname);
+
+ bool stmt_uninstall_plugin_by_name(const DDL_options_st &opt,
+ const Lex_ident_sys_st &name);
+ bool stmt_uninstall_plugin_by_soname(const DDL_options_st &opt,
+ const LEX_CSTRING &soname);
+ bool stmt_prepare_validate(const char *stmt_type);
+ bool stmt_prepare(const Lex_ident_sys_st &ident, Item *code);
+ bool stmt_execute(const Lex_ident_sys_st &ident, List<Item> *params);
+ bool stmt_execute_immediate(Item *code, List<Item> *params);
+ void stmt_deallocate_prepare(const Lex_ident_sys_st &ident);
+
+ bool stmt_alter_table_exchange_partition(Table_ident *table);
+
+ void stmt_purge_to(const LEX_CSTRING &to);
+ bool stmt_purge_before(Item *item);
+
+private:
+ bool stmt_create_routine_start(const DDL_options_st &options)
+ {
+ create_info.set(options);
+ return main_select_push() || check_create_options(options);
+ }
+public:
+ bool stmt_create_function_start(const DDL_options_st &options)
+ {
+ sql_command= SQLCOM_CREATE_SPFUNCTION;
+ return stmt_create_routine_start(options);
+ }
+ bool stmt_create_procedure_start(const DDL_options_st &options)
+ {
+ sql_command= SQLCOM_CREATE_PROCEDURE;
+ return stmt_create_routine_start(options);
+ }
+ void stmt_create_routine_finalize()
+ {
+ pop_select(); // main select
+ }
+
+ bool stmt_create_stored_function_start(const DDL_options_st &options,
+ enum_sp_aggregate_type,
+ const sp_name *name);
+ bool stmt_create_stored_function_finalize_standalone(const sp_name *end_name);
+
+ bool stmt_create_udf_function(const DDL_options_st &options,
+ enum_sp_aggregate_type agg_type,
+ const Lex_ident_sys_st &name,
+ Item_result return_type,
+ const LEX_CSTRING &soname);
+ Spvar_definition *row_field_name(THD *thd, const Lex_ident_sys_st &name);
bool map_data_type(const Lex_ident_sys_st &schema,
Lex_field_type_st *type) const;
void mark_first_table_as_inserting();
+
+ bool fields_are_impossible()
+ {
+ // no select or it is last select with no tables (service select)
+ return !select_stack_head() ||
+ (select_stack_top == 1 &&
+ select_stack[0]->is_service_select);
+ }
+
+ bool check_dependencies_in_with_clauses();
+ bool resolve_references_to_cte_in_hanging_cte();
+ bool check_cte_dependencies_and_resolve_references();
+ bool resolve_references_to_cte(TABLE_LIST *tables,
+ TABLE_LIST **tables_last);
+
};
@@ -4416,8 +4929,10 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr);
Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal,
Item *expr);
-void sp_create_assignment_lex(THD *thd, bool no_lookahead);
+bool sp_create_assignment_lex(THD *thd, bool no_lookahead);
bool sp_create_assignment_instr(THD *thd, bool no_lookahead);
+void mark_or_conds_to_avoid_pushdown(Item *cond);
+
#endif /* MYSQL_SERVER */
#endif /* SQL_LEX_INCLUDED */
diff --git a/sql/sql_list.h b/sql/sql_list.h
index a47acf57b54..9d1c01a484d 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -21,6 +21,7 @@
#endif
#include "sql_alloc.h"
+#include <iterator>
/**
Simple intrusive linked list.
@@ -526,6 +527,63 @@ public:
empty();
}
T *elem(uint n) { return (T*) base_list::elem(n); }
+ // Create a new list with one element
+ static List<T> *make(MEM_ROOT *mem_root, T *first)
+ {
+ List<T> *res= new (mem_root) List<T>;
+ return res == NULL || res->push_back(first, mem_root) ? NULL : res;
+ }
+
+ class Iterator;
+ using value_type= T;
+ using iterator= Iterator;
+ using const_iterator= const Iterator;
+
+ Iterator begin() const { return Iterator(first); }
+ Iterator end() const { return Iterator(); }
+
+ class Iterator
+ {
+ public:
+ using iterator_category= std::forward_iterator_tag;
+ using value_type= T;
+ using difference_type= std::ptrdiff_t;
+ using pointer= T *;
+ using reference= T &;
+
+ Iterator(list_node *p= &end_of_list) : node{p} {}
+
+ Iterator &operator++()
+ {
+ DBUG_ASSERT(node != &end_of_list);
+
+ node= node->next;
+ return *this;
+ }
+
+ T operator++(int)
+ {
+ Iterator tmp(*this);
+ operator++();
+ return tmp;
+ }
+
+ T &operator*() { return *static_cast<T *>(node->info); }
+ T *operator->() { return static_cast<T *>(node->info); }
+
+ bool operator==(const typename List<T>::iterator &rhs)
+ {
+ return node == rhs.node;
+ }
+
+ bool operator!=(const typename List<T>::iterator &rhs)
+ {
+ return node != rhs.node;
+ }
+
+ private:
+ list_node *node{&end_of_list};
+ };
};
@@ -619,7 +677,7 @@ struct ilink
struct ilink **prev,*next;
static void *operator new(size_t size) throw ()
{
- return (void*)my_malloc((uint)size, MYF(MY_WME | MY_FAE | ME_FATALERROR));
+ return (void*)my_malloc((uint)size, MYF(MY_WME | MY_FAE | ME_FATAL));
}
static void operator delete(void* ptr_arg, size_t)
{
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 09af120e6cf..afc2f121167 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -41,7 +41,8 @@
#include "sql_trigger.h"
#include "sql_derived.h"
#include "sql_show.h"
-#include "debug_sync.h"
+
+#include "wsrep_mysqld.h"
extern "C" int _my_b_net_read(IO_CACHE *info, uchar *Buffer, size_t Count);
@@ -99,64 +100,41 @@ public:
#define PUSH(A) *(stack_pos++)=(A)
#ifdef WITH_WSREP
-/** If requested by wsrep_load_data_splitting, commit and restart
-the transaction after every 10,000 inserted rows. */
-
-static bool wsrep_load_data_split(THD *thd, const TABLE *table,
- const COPY_INFO &info)
+/** If requested by wsrep_load_data_splitting and streaming replication is
+ not enabled, replicate a streaming fragment every 10,000 rows.*/
+class Wsrep_load_data_split
{
- DBUG_ENTER("wsrep_load_data_split");
-
- if (!wsrep_load_data_splitting || !wsrep_on(thd)
- || !info.records || (info.records % 10000)
- || !thd->transaction.stmt.ha_list
- || thd->transaction.stmt.ha_list->ht() != binlog_hton
- || !thd->transaction.stmt.ha_list->next()
- || thd->transaction.stmt.ha_list->next()->next())
- DBUG_RETURN(false);
-
- if (handlerton* hton= thd->transaction.stmt.ha_list->next()->ht())
+public:
+ Wsrep_load_data_split(THD *thd)
+ : m_thd(thd)
+ , m_load_data_splitting(wsrep_load_data_splitting)
+ , m_fragment_unit(thd->wsrep_trx().streaming_context().fragment_unit())
+ , m_fragment_size(thd->wsrep_trx().streaming_context().fragment_size())
{
- if (hton->db_type != DB_TYPE_INNODB)
- DBUG_RETURN(false);
- WSREP_DEBUG("intermediate transaction commit in LOAD DATA");
- wsrep_set_load_multi_commit(thd, true);
- if (wsrep_run_wsrep_commit(thd, true) != WSREP_TRX_OK) DBUG_RETURN(true);
- if (binlog_hton->commit(binlog_hton, thd, true)) DBUG_RETURN(true);
- wsrep_post_commit(thd, true);
- hton->commit(hton, thd, true);
- wsrep_set_load_multi_commit(thd, false);
- DEBUG_SYNC(thd, "intermediate_transaction_commit");
- table->file->extra(HA_EXTRA_FAKE_START_STMT);
+ if (WSREP(m_thd) && m_load_data_splitting)
+ {
+ /* Override streaming settings with backward compatible values for
+ load data splitting */
+ m_thd->wsrep_cs().streaming_params(wsrep::streaming_context::row, 10000);
+ }
}
- DBUG_RETURN(false);
-}
-/*
- If the commit fails, then an early return from
- the function occurs there and therefore we need
- to reset the table->auto_increment_field_not_null
- flag, which is usually reset after calling
- the write_record():
-*/
-#define WSREP_LOAD_DATA_SPLIT(thd,table,info) \
- if (wsrep_load_data_split(thd,table,info)) \
- { \
- table->auto_increment_field_not_null= FALSE; \
- DBUG_RETURN(1); \
+ ~Wsrep_load_data_split()
+ {
+ if (WSREP(m_thd) && m_load_data_splitting)
+ {
+ /* Restore original settings */
+ m_thd->wsrep_cs().streaming_params(m_fragment_unit, m_fragment_size);
+ }
}
-#else /* WITH_WSREP */
-#define WSREP_LOAD_DATA_SPLIT(thd,table,info) /* empty */
+private:
+ THD *m_thd;
+ my_bool m_load_data_splitting;
+ enum wsrep::streaming_context::fragment_unit m_fragment_unit;
+ size_t m_fragment_size;
+};
#endif /* WITH_WSREP */
-#define WRITE_RECORD(thd,table,info) \
- do { \
- int err_= write_record(thd, table, &info); \
- table->auto_increment_field_not_null= FALSE; \
- if (err_) \
- DBUG_RETURN(1); \
- } while (0)
-
class READ_INFO: public Load_data_param
{
File file;
@@ -374,6 +352,9 @@ int mysql_load(THD *thd, const sql_exchange *ex, TABLE_LIST *table_list,
bool transactional_table __attribute__((unused));
DBUG_ENTER("mysql_load");
+#ifdef WITH_WSREP
+ Wsrep_load_data_split wsrep_load_data_split(thd);
+#endif /* WITH_WSREP */
/*
Bug #34283
mysqlbinlog leaves tmpfile after termination if binlog contains
@@ -410,10 +391,13 @@ int mysql_load(THD *thd, const sql_exchange *ex, TABLE_LIST *table_list,
DBUG_RETURN(TRUE);
if (thd->lex->handle_list_of_derived(table_list, DT_PREPARE))
DBUG_RETURN(TRUE);
- if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
- &thd->lex->select_lex.top_join_list,
+ if (setup_tables_and_check_access(thd,
+ &thd->lex->first_select_lex()->context,
+ &thd->lex->first_select_lex()->
+ top_join_list,
table_list,
- thd->lex->select_lex.leaf_tables, FALSE,
+ thd->lex->first_select_lex()->leaf_tables,
+ FALSE,
INSERT_ACL | UPDATE_ACL,
INSERT_ACL | UPDATE_ACL, FALSE))
DBUG_RETURN(-1);
@@ -944,7 +928,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
List_iterator_fast<Item> it(fields_vars);
Item *item;
TABLE *table= table_list->table;
- bool progress_reports;
+ bool err, progress_reports;
ulonglong counter, time_to_report_progress;
DBUG_ENTER("read_fixed_length");
@@ -1035,9 +1019,11 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
DBUG_RETURN(-1);
}
- WSREP_LOAD_DATA_SPLIT(thd, table, info);
- WRITE_RECORD(thd, table, info);
-
+ err= write_record(thd, table, &info);
+ table->auto_increment_field_not_null= FALSE;
+ if (err)
+ DBUG_RETURN(1);
+
/*
We don't need to reset auto-increment field since we are restoring
its default value at the beginning of each loop iteration.
@@ -1070,7 +1056,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
Item *item;
TABLE *table= table_list->table;
uint enclosed_length;
- bool progress_reports;
+ bool err, progress_reports;
ulonglong counter, time_to_report_progress;
DBUG_ENTER("read_sep_field");
@@ -1175,9 +1161,10 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
DBUG_RETURN(-1);
}
- WSREP_LOAD_DATA_SPLIT(thd, table, info);
- WRITE_RECORD(thd, table, info);
-
+ err= write_record(thd, table, &info);
+ table->auto_increment_field_not_null= FALSE;
+ if (err)
+ DBUG_RETURN(1);
/*
We don't need to reset auto-increment field since we are restoring
its default value at the beginning of each loop iteration.
@@ -1221,6 +1208,7 @@ read_xml_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
for ( ; ; it.rewind())
{
+ bool err;
if (thd->killed)
{
thd->send_kill_message();
@@ -1294,10 +1282,12 @@ read_xml_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
case VIEW_CHECK_ERROR:
DBUG_RETURN(-1);
}
-
- WSREP_LOAD_DATA_SPLIT(thd, table, info);
- WRITE_RECORD(thd, table, info);
-
+
+ err= write_record(thd, table, &info);
+ table->auto_increment_field_not_null= false;
+ if (err)
+ DBUG_RETURN(1);
+
/*
We don't need to reset auto-increment field since we are restoring
its default value at the beginning of each loop iteration.
diff --git a/sql/sql_manager.cc b/sql/sql_manager.cc
index b08e43e8af2..97f525ea3a6 100644
--- a/sql/sql_manager.cc
+++ b/sql/sql_manager.cc
@@ -133,6 +133,7 @@ void start_handle_manager()
{
pthread_t hThread;
int err;
+ DBUG_EXECUTE_IF("delay_start_handle_manager", my_sleep(1000););
manager_thread_in_use = 1;
mysql_cond_init(key_COND_manager, &COND_manager,NULL);
mysql_mutex_init(key_LOCK_manager, &LOCK_manager, NULL);
diff --git a/sql/sql_mode.cc b/sql/sql_mode.cc
index 32d19cecbdb..6e62fa8fa24 100644
--- a/sql/sql_mode.cc
+++ b/sql/sql_mode.cc
@@ -17,7 +17,7 @@
#include "mariadb.h"
#include "set_var.h"
-void Sql_mode_dependency::push_dependency_warnings(THD *thd)
+void Sql_mode_dependency::push_dependency_warnings(THD *thd) const
{
sql_mode_t all= m_hard | m_soft;
for (uint i= 0; all ; i++, all >>= 1)
diff --git a/sql/sql_mode.h b/sql/sql_mode.h
index e92848fb6d1..fb2b7cefa0a 100644
--- a/sql/sql_mode.h
+++ b/sql/sql_mode.h
@@ -155,7 +155,7 @@ public:
m_soft= 0;
return *this;
}
- void push_dependency_warnings(THD *thd);
+ void push_dependency_warnings(THD *thd) const;
};
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 5807be62339..3f654777605 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -100,6 +100,7 @@
#include "set_var.h"
#include "sql_bootstrap.h"
#include "sql_sequence.h"
+#include "opt_trace.h"
#include "my_json_writer.h"
@@ -111,14 +112,18 @@
#include "../storage/maria/ha_maria.h"
#endif
+#include "wsrep.h"
#include "wsrep_mysqld.h"
+#ifdef WITH_WSREP
#include "wsrep_thd.h"
+#include "wsrep_trans_observer.h" /* wsrep transaction hooks */
-static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
+static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state,
bool is_com_multi,
bool is_next_command);
+#endif /* WITH_WSREP */
/**
@defgroup Runtime_Environment Runtime Environment
@{
@@ -392,10 +397,6 @@ const LEX_CSTRING command_name[257]={
{ STRING_WITH_LEN("Error") } // Last command number 255
};
-const char *xa_state_names[]={
- "NON-EXISTING", "ACTIVE", "IDLE", "PREPARED", "ROLLBACK ONLY"
-};
-
#ifdef HAVE_REPLICATION
/**
Returns true if all tables should be ignored.
@@ -784,6 +785,8 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_CREATE_SERVER]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_ALTER_SERVER]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_DROP_SERVER]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_BACKUP]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_BACKUP_LOCK]= CF_AUTO_COMMIT_TRANS;
/*
The following statements can deal with temporary tables,
@@ -893,6 +896,16 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_REVOKE_ALL]|= CF_DISALLOW_IN_RO_TRANS;
sql_command_flags[SQLCOM_INSTALL_PLUGIN]|= CF_DISALLOW_IN_RO_TRANS;
sql_command_flags[SQLCOM_UNINSTALL_PLUGIN]|= CF_DISALLOW_IN_RO_TRANS;
+#ifdef WITH_WSREP
+ /*
+ Statements for which some errors are ignored when
+ wsrep_ignore_apply_errors = WSREP_IGNORE_ERRORS_ON_RECONCILING_DDL
+ */
+ sql_command_flags[SQLCOM_DROP_DB]|= CF_WSREP_MAY_IGNORE_ERRORS;
+ sql_command_flags[SQLCOM_DROP_TABLE]|= CF_WSREP_MAY_IGNORE_ERRORS;
+ sql_command_flags[SQLCOM_DROP_INDEX]|= CF_WSREP_MAY_IGNORE_ERRORS;
+ sql_command_flags[SQLCOM_ALTER_TABLE]|= CF_WSREP_MAY_IGNORE_ERRORS;
+#endif /* WITH_WSREP */
}
bool sqlcom_can_generate_row_events(const THD *thd)
@@ -967,15 +980,29 @@ static char *fgets_fn(char *buffer, size_t size, fgets_input_t input, int *error
}
-static void handle_bootstrap_impl(THD *thd)
+int bootstrap(MYSQL_FILE *file)
{
- MYSQL_FILE *file= bootstrap_file;
- DBUG_ENTER("handle_bootstrap_impl");
+ int bootstrap_error= 0;
+ DBUG_ENTER("handle_bootstrap");
+
+ THD *thd= new THD(next_thread_id());
+#ifdef WITH_WSREP
+ thd->variables.wsrep_on= 0;
+#endif
+ thd->bootstrap=1;
+ my_net_init(&thd->net,(st_vio*) 0, thd, MYF(0));
+ thd->max_client_packet_length= thd->net.max_packet;
+ thd->security_ctx->master_access= ~(ulong)0;
#ifndef EMBEDDED_LIBRARY
- pthread_detach_this_thread();
+ mysql_thread_set_psi_id(thd->thread_id);
+#else
+ thd->mysql= 0;
+#endif
+
+ /* The following must be called before DBUG_ENTER */
thd->thread_stack= (char*) &thd;
-#endif /* EMBEDDED_LIBRARY */
+ thd->store_globals();
thd->security_ctx->user= (char*) my_strdup("boot", MYF(MY_WME));
thd->security_ctx->priv_user[0]= thd->security_ctx->priv_host[0]=
@@ -1052,10 +1079,6 @@ static void handle_bootstrap_impl(THD *thd)
thd->profiling.set_query_source(thd->query(), length);
#endif
- /*
- We don't need to obtain LOCK_thread_count here because in bootstrap
- mode we have only one thread.
- */
thd->set_time();
Parser_state parser_state;
if (parser_state.init(thd, thd->query(), length))
@@ -1082,56 +1105,8 @@ static void handle_bootstrap_impl(THD *thd)
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
thd->lex->restore_set_statement_var();
}
-
- DBUG_VOID_RETURN;
-}
-
-
-/**
- Execute commands from bootstrap_file.
-
- Used when creating the initial grant tables.
-*/
-
-pthread_handler_t handle_bootstrap(void *arg)
-{
- THD *thd=(THD*) arg;
-
- mysql_thread_set_psi_id(thd->thread_id);
-
- do_handle_bootstrap(thd);
- return 0;
-}
-
-void do_handle_bootstrap(THD *thd)
-{
- /* The following must be called before DBUG_ENTER */
- thd->thread_stack= (char*) &thd;
- if (my_thread_init() || thd->store_globals())
- {
-#ifndef EMBEDDED_LIBRARY
- close_connection(thd, ER_OUT_OF_RESOURCES);
-#endif
- thd->fatal_error();
- goto end;
- }
-
- handle_bootstrap_impl(thd);
-
-end:
delete thd;
-
- mysql_mutex_lock(&LOCK_thread_count);
- in_bootstrap = FALSE;
- mysql_cond_broadcast(&COND_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
-
-#ifndef EMBEDDED_LIBRARY
- my_thread_end();
- pthread_exit(0);
-#endif
-
- return;
+ DBUG_RETURN(bootstrap_error);
}
@@ -1183,14 +1158,19 @@ static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
{
for (const TABLE_LIST *table= tables; table; table= table->next_global)
{
- TABLE_CATEGORY c;
LEX_CSTRING db= table->db, tn= table->table_name;
- c= get_table_category(&db, &tn);
- if (c != TABLE_CATEGORY_INFORMATION && c != TABLE_CATEGORY_PERFORMANCE)
+ if (get_table_category(&db, &tn) < TABLE_CATEGORY_INFORMATION)
return false;
}
return true;
}
+
+static bool wsrep_command_no_result(char command)
+{
+ return (command == COM_STMT_FETCH ||
+ command == COM_STMT_SEND_LONG_DATA ||
+ command == COM_STMT_CLOSE);
+}
#endif /* WITH_WSREP */
#ifndef EMBEDDED_LIBRARY
@@ -1210,28 +1190,11 @@ bool do_command(THD *thd)
{
bool return_value;
char *packet= 0;
-#ifdef WITH_WSREP
- ulong packet_length= 0; // just to avoid (false positive) compiler warning
-#else
ulong packet_length;
-#endif /* WITH_WSREP */
NET *net= &thd->net;
enum enum_server_command command;
DBUG_ENTER("do_command");
-#ifdef WITH_WSREP
- if (WSREP(thd))
- {
- mysql_mutex_lock(&thd->LOCK_thd_data);
- wsrep_thd_set_query_state(thd, QUERY_IDLE);
- if (thd->wsrep_conflict_state==MUST_ABORT)
- {
- wsrep_client_rollback(thd);
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-#endif /* WITH_WSREP */
-
/*
indicator of uninitialized lex => normal flow of errors handling
(see my_message_sql)
@@ -1272,29 +1235,6 @@ bool do_command(THD *thd)
DEBUG_SYNC(thd, "before_do_command_net_read");
packet_length= my_net_read_packet(net, 1);
-#ifdef WITH_WSREP
- if (WSREP(thd)) {
- mysql_mutex_lock(&thd->LOCK_thd_data);
-
- /* these THD's are aborted or are aborting during being idle */
- if (thd->wsrep_conflict_state == ABORTING)
- {
- while (thd->wsrep_conflict_state == ABORTING) {
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- my_sleep(1000);
- mysql_mutex_lock(&thd->LOCK_thd_data);
- }
- thd->store_globals();
- }
- else if (thd->wsrep_conflict_state == ABORTED)
- {
- thd->store_globals();
- }
-
- wsrep_thd_set_query_state(thd, QUERY_EXEC);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-#endif /* WITH_WSREP */
if (unlikely(packet_length == packet_error))
{
@@ -1302,20 +1242,6 @@ bool do_command(THD *thd)
net->error,
vio_description(net->vio)));
-#ifdef WITH_WSREP
- if (WSREP(thd))
- {
- mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state == MUST_ABORT)
- {
- DBUG_PRINT("wsrep",("aborted for wsrep rollback: %lu",
- (ulong) thd->real_id));
- wsrep_client_rollback(thd);
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-#endif /* WITH_WSREP */
-
/* Instrument this broken statement as "statement/com/error" */
thd->m_statement_psi= MYSQL_REFINE_STATEMENT(thd->m_statement_psi,
com_statement_info[COM_END].
@@ -1366,13 +1292,67 @@ bool do_command(THD *thd)
command= fetch_command(thd, packet);
#ifdef WITH_WSREP
- if (WSREP(thd))
+ DEBUG_SYNC(thd, "wsrep_before_before_command");
+ /*
+ If this command does not return a result, then we
+ instruct wsrep_before_command() to skip result handling.
+ This causes BF aborted transaction to roll back but keep
+ the error state until next command which is able to return
+ a result to the client.
+ */
+ if (wsrep_before_command(thd, wsrep_command_no_result(command)))
{
/*
- Bail out if DB snapshot has not been installed.
+ Aborted by background rollbacker thread.
+ Handle error here and jump straight to out.
+ Notice that thd->store_globals() is called
+ in wsrep_before_command().
*/
- if (!thd->wsrep_applier &&
- (!wsrep_ready || wsrep_reject_queries != WSREP_REJECT_NONE) &&
+ WSREP_LOG_THD(thd, "enter found BF aborted");
+ DBUG_ASSERT(!thd->mdl_context.has_locks());
+ DBUG_ASSERT(!thd->get_stmt_da()->is_set());
+ /* We let COM_QUIT and COM_STMT_CLOSE to execute even if wsrep aborted. */
+ if (command == COM_STMT_EXECUTE)
+ {
+ WSREP_DEBUG("PS BF aborted at do_command");
+ thd->wsrep_delayed_BF_abort= true;
+ }
+ if (command != COM_STMT_CLOSE &&
+ command != COM_STMT_EXECUTE &&
+ command != COM_QUIT)
+ {
+ my_error(ER_LOCK_DEADLOCK, MYF(0));
+ WSREP_DEBUG("Deadlock error for: %s", thd->query());
+ thd->reset_killed();
+ thd->mysys_var->abort = 0;
+ thd->wsrep_retry_counter = 0;
+
+ /* Instrument this broken statement as "statement/com/error" */
+ thd->m_statement_psi= MYSQL_REFINE_STATEMENT(thd->m_statement_psi,
+ com_statement_info[COM_END].
+ m_key);
+
+ thd->protocol->end_statement();
+
+ /* Mark the statement completed. */
+ MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
+ thd->m_statement_psi= NULL;
+ thd->m_digest= NULL;
+ return_value= FALSE;
+
+ wsrep_after_command_before_result(thd);
+ goto out;
+ }
+ }
+
+ if (WSREP(thd))
+ {
+ /*
+ * bail out if DB snapshot has not been installed. We however,
+ * allow queries "SET" and "SHOW", they are trapped later in execute_command
+ */
+ if (!(thd->wsrep_applier) &&
+ (!wsrep_ready_get() || wsrep_reject_queries != WSREP_REJECT_NONE) &&
(server_command_flags[command] & CF_SKIP_WSREP_CHECK) == 0)
{
my_message(ER_UNKNOWN_COM_ERROR,
@@ -1385,11 +1365,11 @@ bool do_command(THD *thd)
thd->m_digest= NULL;
return_value= FALSE;
+ wsrep_after_command_before_result(thd);
goto out;
}
}
-#endif
-
+#endif /* WITH_WSREP */
/* Restore read timeout value */
my_net_set_read_timeout(net, thd->variables.net_read_timeout);
@@ -1397,37 +1377,6 @@ bool do_command(THD *thd)
DBUG_ASSERT(!thd->apc_target.is_enabled());
return_value= dispatch_command(command, thd, packet+1,
(uint) (packet_length-1), FALSE, FALSE);
-#ifdef WITH_WSREP
- if (WSREP(thd))
- {
- while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT)
- {
- WSREP_DEBUG("Retry autocommit for: %s\n", thd->wsrep_retry_query);
- CHARSET_INFO *current_charset = thd->variables.character_set_client;
- if (!is_supported_parser_charset(current_charset))
- {
- /* Do not use non-supported parser character sets */
- WSREP_WARN("Current client character set is non-supported parser "
- "character set: %s", current_charset->csname);
- thd->variables.character_set_client = &my_charset_latin1;
- WSREP_WARN("For retry temporally setting character set to : %s",
- my_charset_latin1.csname);
- }
- thd->clear_error();
- return_value= dispatch_command(command, thd, thd->wsrep_retry_query,
- thd->wsrep_retry_query_len, FALSE, FALSE);
- thd->variables.character_set_client = current_charset;
- }
-
- if (thd->wsrep_retry_query && thd->wsrep_conflict_state != REPLAYING)
- {
- my_free(thd->wsrep_retry_query);
- thd->wsrep_retry_query = NULL;
- thd->wsrep_retry_query_len = 0;
- thd->wsrep_retry_command = COM_CONNECT;
- }
- }
-#endif /* WITH_WSREP */
DBUG_ASSERT(!thd->apc_target.is_enabled());
out:
@@ -1435,6 +1384,24 @@ out:
/* The statement instrumentation must be closed in all cases. */
DBUG_ASSERT(thd->m_digest == NULL);
DBUG_ASSERT(thd->m_statement_psi == NULL);
+#ifdef WITH_WSREP
+ if (packet_length != packet_error)
+ {
+ /* there was a command to process, and before_command() has been called */
+ wsrep_after_command_after_result(thd);
+ }
+
+ if (thd->wsrep_delayed_BF_abort)
+ {
+ my_error(ER_LOCK_DEADLOCK, MYF(0));
+ WSREP_DEBUG("Deadlock error for PS query: %s", thd->query());
+ thd->reset_killed();
+ thd->mysys_var->abort = 0;
+ thd->wsrep_retry_counter = 0;
+
+ thd->wsrep_delayed_BF_abort= false;
+ }
+#endif /* WITH_WSREP */
DBUG_RETURN(return_value);
}
#endif /* EMBEDDED_LIBRARY */
@@ -1500,6 +1467,20 @@ static bool deny_updates_if_read_only_option(THD *thd, TABLE_LIST *all_tables)
DBUG_RETURN(FALSE);
}
+#ifdef WITH_WSREP
+static void wsrep_copy_query(THD *thd)
+{
+ thd->wsrep_retry_command = thd->get_command();
+ thd->wsrep_retry_query_len = thd->query_length();
+ if (thd->wsrep_retry_query) {
+ my_free(thd->wsrep_retry_query);
+ }
+ thd->wsrep_retry_query = (char *)my_malloc(
+ thd->wsrep_retry_query_len + 1, MYF(0));
+ strncpy(thd->wsrep_retry_query, thd->query(), thd->wsrep_retry_query_len);
+ thd->wsrep_retry_query[thd->wsrep_retry_query_len] = '\0';
+}
+#endif /* WITH_WSREP */
/**
check COM_MULTI packet
@@ -1582,41 +1563,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
/* keep it withing 1 byte */
compile_time_assert(COM_END == 255);
-#ifdef WITH_WSREP
- if (WSREP(thd))
- {
- if (!thd->in_multi_stmt_transaction_mode())
- {
- thd->wsrep_PA_safe= true;
- }
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- wsrep_thd_set_query_state(thd, QUERY_EXEC);
- if (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT)
- {
- thd->wsrep_conflict_state= NO_CONFLICT;
- }
- if (thd->wsrep_conflict_state== MUST_ABORT)
- {
- wsrep_client_rollback(thd);
- }
- /* We let COM_QUIT and COM_STMT_CLOSE to execute even if wsrep aborted. */
- if (thd->wsrep_conflict_state == ABORTED &&
- command != COM_STMT_CLOSE && command != COM_QUIT)
- {
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- my_message(ER_LOCK_DEADLOCK, "Deadlock: wsrep aborted transaction",
- MYF(0));
- WSREP_DEBUG("Deadlock error for: %s", thd->query());
- thd->reset_killed();
- thd->mysys_var->abort = 0;
- thd->wsrep_conflict_state = NO_CONFLICT;
- thd->wsrep_retry_counter = 0;
- goto dispatch_end;
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-#endif /* WITH_WSREP */
#if defined(ENABLED_PROFILING)
thd->profiling.start_new_query();
#endif
@@ -1659,6 +1605,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
*/
thd->set_query_id(get_query_id());
}
+#ifdef WITH_WSREP
+ if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID)
+ {
+ thd->set_wsrep_next_trx_id(thd->query_id);
+ WSREP_DEBUG("assigned new next trx id: %" PRIu64, thd->wsrep_next_trx_id());
+ }
+#endif /* WITH_WSREP */
if (!(server_command_flags[command] & CF_SKIP_QUESTIONS))
statistic_increment(thd->status_var.questions, &LOCK_status);
@@ -1685,6 +1638,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->get_stmt_da()->set_skip_flush();
}
+ if (unlikely(thd->security_ctx->password_expired &&
+ command != COM_QUERY &&
+ command != COM_PING &&
+ command != COM_QUIT &&
+ command != COM_STMT_PREPARE &&
+ command != COM_STMT_EXECUTE))
+ {
+ my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
+ goto dispatch_end;
+ }
+
switch (command) {
case COM_INIT_DB:
{
@@ -1704,7 +1668,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
case COM_REGISTER_SLAVE:
{
status_var_increment(thd->status_var.com_register_slave);
- if (!register_slave(thd, (uchar*)packet, packet_length))
+ if (!thd->register_slave((uchar*) packet, packet_length))
my_ok(thd);
break;
}
@@ -1712,8 +1676,16 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
case COM_RESET_CONNECTION:
{
thd->status_var.com_other++;
+#ifdef WITH_WSREP
+ wsrep_after_command_ignore_result(thd);
+ wsrep_close(thd);
+#endif /* WITH_WSREP */
thd->change_user();
thd->clear_error(); // if errors from rollback
+#ifdef WITH_WSREP
+ wsrep_open(thd);
+ wsrep_before_command(thd);
+#endif /* WITH_WSREP */
/* Restore original charset from client authentication packet.*/
if(thd->org_charset)
thd->update_charset(thd->org_charset,thd->org_charset,thd->org_charset);
@@ -1725,7 +1697,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
int auth_rc;
status_var_increment(thd->status_var.com_other);
+#ifdef WITH_WSREP
+ wsrep_after_command_ignore_result(thd);
+ wsrep_close(thd);
+#endif /* WITH_WSREP */
thd->change_user();
+#ifdef WITH_WSREP
+ wsrep_open(thd);
+ wsrep_before_command(thd);
+#endif /* WITH_WSREP */
thd->clear_error(); // if errors from rollback
/* acl_authenticate() takes the data from net->read_pos */
@@ -1788,11 +1768,23 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
case COM_STMT_BULK_EXECUTE:
{
mysqld_stmt_bulk_execute(thd, packet, packet_length);
+#ifdef WITH_WSREP
+ if (WSREP(thd))
+ {
+ (void)wsrep_after_statement(thd);
+ }
+#endif /* WITH_WSREP */
break;
}
case COM_STMT_EXECUTE:
{
mysqld_stmt_execute(thd, packet, packet_length);
+#ifdef WITH_WSREP
+ if (WSREP(thd))
+ {
+ (void)wsrep_after_statement(thd);
+ }
+#endif /* WITH_WSREP */
break;
}
case COM_STMT_FETCH:
@@ -1845,10 +1837,23 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (unlikely(parser_state.init(thd, thd->query(), thd->query_length())))
break;
+#ifdef WITH_WSREP
if (WSREP(thd))
- wsrep_mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
- is_com_multi, is_next_command);
+ {
+ if (wsrep_mysql_parse(thd, thd->query(), thd->query_length(),
+ &parser_state,
+ is_com_multi, is_next_command))
+ {
+ WSREP_DEBUG("Deadlock error for: %s", thd->query());
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ thd->reset_kill_query();
+ thd->wsrep_retry_counter = 0;
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ goto dispatch_end;
+ }
+ }
else
+#endif /* WITH_WSREP */
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
is_com_multi, is_next_command);
@@ -1860,9 +1865,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
*/
char *beginning_of_next_stmt= (char*) parser_state.m_lip.found_semicolon;
-#ifdef WITH_ARIA_STORAGE_ENGINE
- ha_maria::implicit_commit(thd, FALSE);
-#endif
+ ha_maria_implicit_commit(thd, FALSE);
/* Finalize server status flags after executing a statement. */
thd->update_server_status();
@@ -1930,16 +1933,30 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
statistic_increment(thd->status_var.questions, &LOCK_status);
if (!WSREP(thd))
- thd->set_time(); /* Reset the query start time. */
+ thd->set_time(); /* Reset the query start time. */
parser_state.reset(beginning_of_next_stmt, length);
+#ifdef WITH_WSREP
if (WSREP(thd))
- wsrep_mysql_parse(thd, beginning_of_next_stmt, length, &parser_state,
- is_com_multi, is_next_command);
+ {
+ if (wsrep_mysql_parse(thd, beginning_of_next_stmt,
+ length, &parser_state,
+ is_com_multi, is_next_command))
+ {
+ WSREP_DEBUG("Deadlock error for: %s", thd->query());
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ thd->reset_kill_query();
+ thd->wsrep_retry_counter = 0;
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+
+ goto dispatch_end;
+ }
+ }
else
- mysql_parse(thd, beginning_of_next_stmt, length, &parser_state,
- is_com_multi, is_next_command);
+#endif /* WITH_WSREP */
+ mysql_parse(thd, beginning_of_next_stmt, length, &parser_state,
+ is_com_multi, is_next_command);
}
@@ -2010,10 +2027,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
Init TABLE_LIST members necessary when the undelrying
table is view.
*/
- table_list.select_lex= &(thd->lex->select_lex);
+ table_list.select_lex= thd->lex->first_select_lex();
thd->lex->
- select_lex.table_list.link_in_list(&table_list,
- &table_list.next_local);
+ first_select_lex()->table_list.link_in_list(&table_list,
+ &table_list.next_local);
thd->lex->add_to_query_tables(&table_list);
if (is_infoschema_db(&table_list.db))
@@ -2102,7 +2119,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
general_log_print(thd, command, "Log: '%s' Pos: %lu", name, pos);
if (nlen < FN_REFLEN)
mysql_binlog_send(thd, thd->strmake(name, nlen), (my_off_t)pos, flags);
- unregister_slave(thd, true, true); // todo: can be extraneous
+ thd->unregister_slave(); // todo: can be extraneous
/* fake COM_QUIT -- if we get here, the thread needs to terminate */
error = TRUE;
break;
@@ -2132,6 +2149,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
DBUG_EXECUTE_IF("simulate_detached_thread_refresh", debug_simulate= TRUE;);
if (debug_simulate)
{
+ /* This code doesn't work under FTWRL */
+ DBUG_ASSERT(! (options & REFRESH_READ_LOCK));
/*
Simulate a reload without a attached thread session.
Provides a environment similar to that of when the
@@ -2174,6 +2193,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
*/
enum mysql_enum_shutdown_level level;
level= (enum mysql_enum_shutdown_level) (uchar) packet[0];
+ thd->lex->is_shutdown_wait_for_slaves= false; // "deferred" cleanup
if (level == SHUTDOWN_DEFAULT)
level= SHUTDOWN_WAIT_ALL_BUFFERS; // soon default will be configurable
else if (level != SHUTDOWN_WAIT_ALL_BUFFERS)
@@ -2212,15 +2232,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
size_t length=
#endif
my_snprintf(buff, buff_len - 1,
- "Uptime: %lu Threads: %d Questions: %lu "
+ "Uptime: %lu Threads: %u Questions: %lu "
"Slow queries: %lu Opens: %lu Flush tables: %lld "
"Open tables: %u Queries per second avg: %u.%03u",
- uptime,
- (int) thread_count, (ulong) thd->query_id,
+ uptime, THD_count::value(), (ulong) thd->query_id,
current_global_status_var->long_query_count,
current_global_status_var->opened_tables,
- tdc_refresh_version(),
- tc_records(),
+ tdc_refresh_version(), tc_records(),
(uint) (queries_per_second1000 / 1000),
(uint) (queries_per_second1000 % 1000));
#ifdef EMBEDDED_LIBRARY
@@ -2373,9 +2391,23 @@ com_multi_end:
break;
}
+dispatch_end:
#ifdef WITH_WSREP
- dispatch_end:
-
+ /*
+ BF aborted before sending response back to client
+ */
+ if (thd->killed == KILL_QUERY)
+ {
+ WSREP_DEBUG("THD is killed at dispatch_end");
+ }
+ wsrep_after_command_before_result(thd);
+ if (wsrep_current_error(thd) && !wsrep_command_no_result(command))
+ {
+ /* todo: Pass wsrep client state current error to override */
+ wsrep_override_error(thd, wsrep_current_error(thd),
+ wsrep_current_error_status(thd));
+ WSREP_LOG_THD(thd, "leave");
+ }
if (WSREP(thd))
{
/*
@@ -2384,12 +2416,11 @@ com_multi_end:
*/
DBUG_ASSERT((command != COM_QUIT && command != COM_STMT_CLOSE)
|| thd->get_stmt_da()->is_disabled());
+ DBUG_ASSERT(thd->wsrep_trx().state() != wsrep::transaction::s_replaying);
/* wsrep BF abort in query exec phase */
- mysql_mutex_lock(&thd->LOCK_thd_data);
- do_end_of_statement= thd->wsrep_conflict_state != REPLAYING &&
- thd->wsrep_conflict_state != RETRY_AUTOCOMMIT &&
- !thd->killed;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
+ mysql_mutex_lock(&thd->LOCK_thd_kill);
+ do_end_of_statement= thd_is_connection_alive(thd);
+ mysql_mutex_unlock(&thd->LOCK_thd_kill);
}
else
do_end_of_statement= true;
@@ -2616,23 +2647,24 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
DBUG_RETURN(1);
#else
{
- if (lex->select_lex.db.str == NULL &&
- lex->copy_db_to(&lex->select_lex.db))
+ if (lex->first_select_lex()->db.str == NULL &&
+ lex->copy_db_to(&lex->first_select_lex()->db))
{
DBUG_RETURN(1);
}
schema_select_lex= new (thd->mem_root) SELECT_LEX();
schema_select_lex->table_list.first= NULL;
if (lower_case_table_names == 1)
- lex->select_lex.db.str= thd->strdup(lex->select_lex.db.str);
- schema_select_lex->db= lex->select_lex.db;
+ lex->first_select_lex()->db.str=
+ thd->strdup(lex->first_select_lex()->db.str);
+ schema_select_lex->db= lex->first_select_lex()->db;
/*
check_db_name() may change db.str if lower_case_table_names == 1,
but that's ok as the db is allocted above in this case.
*/
- if (check_db_name((LEX_STRING*) &lex->select_lex.db))
+ if (check_db_name((LEX_STRING*) &lex->first_select_lex()->db))
{
- my_error(ER_WRONG_DB_NAME, MYF(0), lex->select_lex.db.str);
+ my_error(ER_WRONG_DB_NAME, MYF(0), lex->first_select_lex()->db.str);
DBUG_RETURN(1);
}
break;
@@ -2671,7 +2703,8 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
default:
break;
}
-
+ if (schema_select_lex)
+ schema_select_lex->set_master_unit(&lex->unit);
SELECT_LEX *select_lex= lex->current_select;
if (make_schema_select(thd, select_lex, get_schema_table(schema_table_idx)))
DBUG_RETURN(1);
@@ -3078,7 +3111,7 @@ static int mysql_create_routine(THD *thd, LEX *lex)
if (sp_process_definer(thd))
return true;
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
if (!lex->sphead->m_handler->sp_create_routine(thd, lex->sphead))
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
@@ -3147,7 +3180,9 @@ static int mysql_create_routine(THD *thd, LEX *lex)
#endif
return false;
}
-WSREP_ERROR_LABEL:
+#ifdef WITH_WSREP
+wsrep_error_label:
+#endif
return true;
}
@@ -3436,7 +3471,7 @@ mysql_execute_command(THD *thd)
int up_result= 0;
LEX *lex= thd->lex;
/* first SELECT_LEX (have special meaning for many of non-SELECTcommands) */
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
/* first table of first SELECT_LEX */
TABLE_LIST *first_table= select_lex->table_list.first;
/* list of all tables in query */
@@ -3455,6 +3490,16 @@ mysql_execute_command(THD *thd)
DBUG_ASSERT(!(sql_command_flags[lex->sql_command] & CF_INSERTS_DATA) ||
first_table->for_insert_data);
+ if (thd->security_ctx->password_expired &&
+ lex->sql_command != SQLCOM_SET_OPTION &&
+ lex->sql_command != SQLCOM_PREPARE &&
+ lex->sql_command != SQLCOM_EXECUTE &&
+ lex->sql_command != SQLCOM_DEALLOCATE_PREPARE)
+ {
+ my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
+ DBUG_RETURN(1);
+ }
+
DBUG_ASSERT(thd->transaction.stmt.is_empty() || thd->in_sub_stmt);
/*
Each statement or replication event which might produce deadlock
@@ -3479,6 +3524,7 @@ mysql_execute_command(THD *thd)
DBUG_ASSERT(first_table == all_tables && first_table != 0);
*/
lex->first_lists_tables_same();
+ lex->fix_first_select_number();
/* should be assigned after making first tables same */
all_tables= lex->query_tables;
/* set context for commands which do not use setup_tables */
@@ -3621,13 +3667,20 @@ mysql_execute_command(THD *thd)
#ifdef HAVE_REPLICATION
} /* endif unlikely slave */
#endif
+ Opt_trace_start ots(thd, all_tables, lex->sql_command, &lex->var_list,
+ thd->query(), thd->query_length(),
+ thd->variables.character_set_client);
+
+ Json_writer_object trace_command(thd);
+ Json_writer_array trace_command_steps(thd, "steps");
+
/* store old value of binlog format */
enum_binlog_format orig_binlog_format,orig_current_stmt_binlog_format;
thd->get_binlog_format(&orig_binlog_format,
&orig_current_stmt_binlog_format);
#ifdef WITH_WSREP
- if (wsrep && WSREP(thd))
+ if (WSREP(thd))
{
/*
change LOCK TABLE WRITE to transaction
@@ -3657,8 +3710,8 @@ mysql_execute_command(THD *thd)
* allow SET and SHOW queries and reads from information schema
* and dirty reads (if configured)
*/
- if (!thd->wsrep_applier &&
- !(wsrep_ready && wsrep_reject_queries == WSREP_REJECT_NONE) &&
+ if (!(thd->wsrep_applier) &&
+ !(wsrep_ready_get() && wsrep_reject_queries == WSREP_REJECT_NONE) &&
!(thd->variables.wsrep_dirty_reads &&
(sql_command_flags[lex->sql_command] & CF_CHANGES_DATA) == 0) &&
!wsrep_tables_accessible_when_detached(all_tables) &&
@@ -3704,7 +3757,7 @@ mysql_execute_command(THD *thd)
not run in it's own transaction it may simply never appear on
the slave in case the outside transaction rolls back.
*/
- if (stmt_causes_implicit_commit(thd, CF_IMPLICT_COMMIT_BEGIN))
+ if (stmt_causes_implicit_commit(thd, CF_IMPLICIT_COMMIT_BEGIN))
{
/*
Note that this should never happen inside of stored functions
@@ -3727,6 +3780,14 @@ mysql_execute_command(THD *thd)
}
}
thd->transaction.stmt.mark_trans_did_ddl();
+#ifdef WITH_WSREP
+ /* Clean up the previous transaction on implicit commit */
+ if (WSREP_NNULL(thd) && wsrep_thd_is_local(thd) &&
+ wsrep_after_statement(thd))
+ {
+ goto error;
+ }
+#endif /* WITH_WSREP */
}
#ifndef DBUG_OFF
@@ -3780,6 +3841,34 @@ mysql_execute_command(THD *thd)
/* Start timeouts */
thd->set_query_timer();
+#ifdef WITH_WSREP
+ /*
+ Always start a new transaction for a wsrep THD unless the
+ current command is DDL or explicit BEGIN. This will guarantee that
+ the THD is BF abortable even if it does not generate any
+ changes and takes only read locks. If the statement does not
+ start a multi STMT transaction, the wsrep_transaction is
+ committed as empty at the end of this function.
+
+ Transaction is started for BEGIN in trans_begin(), for DDL the
+ implicit commit took care of committing previous transaction
+ above and a new transaction should not be started.
+
+ Do not start transaction for stored procedures, it will be handled
+ internally in SP processing.
+ */
+ if (WSREP_NNULL(thd) &&
+ wsrep_thd_is_local(thd) &&
+ lex->sql_command != SQLCOM_BEGIN &&
+ lex->sql_command != SQLCOM_CALL &&
+ lex->sql_command != SQLCOM_EXECUTE &&
+ lex->sql_command != SQLCOM_EXECUTE_IMMEDIATE &&
+ !(sql_command_flags[lex->sql_command] & CF_AUTO_COMMIT_TRANS))
+ {
+ wsrep_start_trx_if_not_started(thd);
+ }
+#endif /* WITH_WSREP */
+
switch (lex->sql_command) {
case SQLCOM_SHOW_EVENTS:
@@ -3839,17 +3928,21 @@ mysql_execute_command(THD *thd)
case SQLCOM_SHOW_STORAGE_ENGINES:
case SQLCOM_SHOW_PROFILE:
case SQLCOM_SELECT:
- {
- if (lex->sql_command == SQLCOM_SELECT)
- WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ);
- else
- {
- WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
-#ifdef ENABLED_PROFILING
- if (lex->sql_command == SQLCOM_SHOW_PROFILE)
- thd->profiling.discard_current_query();
-#endif
- }
+ {
+#ifdef WITH_WSREP
+ if (lex->sql_command == SQLCOM_SELECT)
+ {
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ);
+ }
+ else
+ {
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
+# ifdef ENABLED_PROFILING
+ if (lex->sql_command == SQLCOM_SHOW_PROFILE)
+ thd->profiling.discard_current_query();
+# endif
+ }
+#endif /* WITH_WSREP */
thd->status_var.last_query_cost= 0.0;
@@ -4322,9 +4415,7 @@ mysql_execute_command(THD *thd)
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
ha_rows found= 0, updated= 0;
DBUG_ASSERT(first_table == all_tables && first_table != 0);
- if (WSREP_CLIENT(thd) &&
- wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE))
- goto error;
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
if (update_precheck(thd, all_tables))
break;
@@ -4353,6 +4444,11 @@ mysql_execute_command(THD *thd)
/* mysql_update return 2 if we need to switch to multi-update */
if (up_result != 2)
break;
+ if (thd->lex->period_conditions.is_set())
+ {
+ DBUG_ASSERT(0); // Should never happen
+ goto error;
+ }
}
/* fall through */
case SQLCOM_UPDATE_MULTI:
@@ -4482,9 +4578,7 @@ mysql_execute_command(THD *thd)
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE);
DBUG_ASSERT(first_table == all_tables && first_table != 0);
- if (WSREP_CLIENT(thd) &&
- wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE))
- goto error;
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE);
/*
Since INSERT DELAYED doesn't support temporary tables, we could
@@ -4542,9 +4636,7 @@ mysql_execute_command(THD *thd)
select_insert *sel_result;
bool explain= MY_TEST(lex->describe);
DBUG_ASSERT(first_table == all_tables && first_table != 0);
- if (WSREP_CLIENT(thd) &&
- wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE))
- goto error;
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
if ((res= insert_precheck(thd, all_tables)))
break;
@@ -4671,9 +4763,7 @@ mysql_execute_command(THD *thd)
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
select_result *sel_result= NULL;
DBUG_ASSERT(first_table == all_tables && first_table != 0);
- if (WSREP_CLIENT(thd) &&
- wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE))
- goto error;
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
if ((res= delete_precheck(thd, all_tables)))
break;
@@ -4732,9 +4822,7 @@ mysql_execute_command(THD *thd)
DBUG_ASSERT(first_table == all_tables && first_table != 0);
TABLE_LIST *aux_tables= thd->lex->auxiliary_table_list.first;
multi_delete *result;
- if (WSREP_CLIENT(thd) &&
- wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE))
- goto error;
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
if ((res= multi_delete_precheck(thd, all_tables)))
break;
@@ -4965,7 +5053,8 @@ mysql_execute_command(THD *thd)
thd->release_transactional_locks();
thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
}
- if (thd->global_read_lock.is_acquired())
+ if (thd->global_read_lock.is_acquired() &&
+ thd->current_backup_stage == BACKUP_FINISHED)
thd->global_read_lock.unlock_global_read_lock(thd);
if (res)
goto error;
@@ -4980,6 +5069,26 @@ mysql_execute_command(THD *thd)
if (res)
goto error;
+#ifdef WITH_WSREP
+ /* Clean up the previous transaction on implicit commit. */
+ if (wsrep_on(thd) && !wsrep_not_committed(thd) && wsrep_after_statement(thd))
+ goto error;
+#endif
+
+ /* We can't have any kind of table locks while backup is active */
+ if (thd->current_backup_stage != BACKUP_FINISHED)
+ {
+ my_error(ER_BACKUP_LOCK_IS_ACTIVE, MYF(0));
+ goto error;
+ }
+
+ /* Should not lock tables while BACKUP LOCK is active */
+ if (thd->mdl_backup_lock)
+ {
+ my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
+ goto error;
+ }
+
/*
Here we have to pre-open temporary tables for LOCK TABLES.
@@ -5012,6 +5121,23 @@ mysql_execute_command(THD *thd)
my_ok(thd);
}
break;
+ case SQLCOM_BACKUP:
+ if (check_global_access(thd, RELOAD_ACL))
+ goto error;
+ if (!(res= run_backup_stage(thd, lex->backup_stage)))
+ my_ok(thd);
+ break;
+ case SQLCOM_BACKUP_LOCK:
+ if (check_global_access(thd, RELOAD_ACL))
+ goto error;
+ /* first table is set for lock. For unlock the list is empty */
+ if (first_table)
+ res= backup_lock(thd, first_table);
+ else
+ backup_unlock(thd);
+ if (!res)
+ my_ok(thd);
+ break;
case SQLCOM_CREATE_DB:
{
if (prepare_db_action(thd, lex->create_info.or_replace() ?
@@ -5560,6 +5686,7 @@ mysql_execute_command(THD *thd)
thd->release_transactional_locks();
WSREP_DEBUG("BEGIN failed, MDL released: %lld",
(longlong) thd->thread_id);
+ WSREP_DEBUG("stmt_da, sql_errno: %d", (thd->get_stmt_da()->is_error()) ? thd->get_stmt_da()->sql_errno() : 0);
goto error;
}
my_ok(thd);
@@ -5599,20 +5726,7 @@ mysql_execute_command(THD *thd)
thd->set_killed(KILL_CONNECTION);
thd->print_aborted_warning(3, "RELEASE");
}
-#ifdef WITH_WSREP
- if (WSREP(thd)) {
-
- if (thd->wsrep_conflict_state == NO_CONFLICT ||
- thd->wsrep_conflict_state == REPLAYING)
- {
- my_ok(thd);
- }
- } else {
-#endif /* WITH_WSREP */
- my_ok(thd);
-#ifdef WITH_WSREP
- }
-#endif /* WITH_WSREP */
+ my_ok(thd);
break;
}
case SQLCOM_ROLLBACK:
@@ -5637,6 +5751,11 @@ mysql_execute_command(THD *thd)
/* Begin transaction with the same isolation level. */
if (tx_chain)
{
+#ifdef WITH_WSREP
+ /* If there are pending changes after rollback we should clear them */
+ if (wsrep_on(thd) && wsrep_has_changes(thd))
+ wsrep_after_statement(thd);
+#endif
if (trans_begin(thd))
goto error;
}
@@ -5648,17 +5767,7 @@ mysql_execute_command(THD *thd)
/* Disconnect the current client connection. */
if (tx_release)
thd->set_killed(KILL_CONNECTION);
-#ifdef WITH_WSREP
- if (WSREP(thd)) {
- if (thd->wsrep_conflict_state == NO_CONFLICT) {
- my_ok(thd);
- }
- } else {
-#endif /* WITH_WSREP */
- my_ok(thd);
-#ifdef WITH_WSREP
- }
-#endif /* WITH_WSREP */
+ my_ok(thd);
break;
}
case SQLCOM_RELEASE_SAVEPOINT:
@@ -5922,6 +6031,14 @@ mysql_execute_command(THD *thd)
break;
}
case SQLCOM_XA_START:
+#ifdef WITH_WSREP
+ if (WSREP_ON)
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "XA transactions with Galera replication");
+ break;
+ }
+#endif /* WITH_WSREP */
if (trans_xa_start(thd))
goto error;
my_ok(thd);
@@ -6089,8 +6206,10 @@ mysql_execute_command(THD *thd)
goto finish;
error:
-WSREP_ERROR_LABEL:
- res= TRUE;
+#ifdef WITH_WSREP
+wsrep_error_label:
+#endif
+ res= true;
finish:
@@ -6098,7 +6217,6 @@ finish:
DBUG_ASSERT(!thd->in_active_multi_stmt_transaction() ||
thd->in_multi_stmt_transaction_mode());
-
lex->unit.cleanup();
/* close/reopen tables that were marked to need reopen under LOCK TABLES */
@@ -6125,25 +6243,6 @@ finish:
THD_STAGE_INFO(thd, stage_rollback);
trans_rollback_stmt(thd);
}
-#ifdef WITH_WSREP
- else if (thd->spcont &&
- (thd->wsrep_conflict_state == MUST_ABORT ||
- thd->wsrep_conflict_state == ABORTED ||
- thd->wsrep_conflict_state == CERT_FAILURE))
- {
- /*
- The error was cleared, but THD was aborted by wsrep and
- wsrep_conflict_state is still set accordingly. This
- situation is expected if we are running a stored procedure
- that declares a handler that catches ER_LOCK_DEADLOCK error.
- In which case the error may have been cleared in method
- sp_rcontext::handle_sql_condition().
- */
- trans_rollback_stmt(thd);
- thd->wsrep_conflict_state= NO_CONFLICT;
- thd->killed= NOT_KILLED;
- }
-#endif /* WITH_WSREP */
else
{
/* If commit fails, we should be able to reset the OK status. */
@@ -6152,16 +6251,11 @@ finish:
trans_commit_stmt(thd);
thd->get_stmt_da()->set_overwrite_status(false);
}
-#ifdef WITH_ARIA_STORAGE_ENGINE
- ha_maria::implicit_commit(thd, FALSE);
-#endif
+ ha_maria_implicit_commit(thd, FALSE);
}
/* Free tables. Set stage 'closing tables' */
close_thread_tables(thd);
-#ifdef WITH_WSREP
- thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
-#endif /* WITH_WSREP */
#ifndef DBUG_OFF
@@ -6223,9 +6317,10 @@ finish:
TRANSACT_TRACKER(add_trx_state_from_thd(thd));
- WSREP_TO_ISOLATION_END;
-
#ifdef WITH_WSREP
+ thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
+
+ WSREP_TO_ISOLATION_END;
/*
Force release of transactional locks if not in active MST and wsrep is on.
*/
@@ -6238,11 +6333,26 @@ finish:
(longlong) thd->thread_id);
thd->release_transactional_locks();
}
+
+ /*
+ Current command did not start multi STMT transaction and the command
+ did not cause commit to happen (e.g. read only). Commit the wsrep
+ transaction as empty.
+ */
+ if (!thd->in_active_multi_stmt_transaction() &&
+ !thd->in_sub_stmt &&
+ thd->wsrep_trx().active() &&
+ thd->wsrep_trx().state() == wsrep::transaction::s_executing)
+ {
+ wsrep_commit_empty(thd, true);
+ }
+
+ /* assume PA safety for next transaction */
+ thd->wsrep_PA_safe= true;
#endif /* WITH_WSREP */
DBUG_RETURN(res || thd->is_error());
-}
-
+ }
static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
{
@@ -6368,6 +6478,7 @@ static bool execute_show_status(THD *thd, TABLE_LIST *all_tables)
bool res;
system_status_var old_status_var= thd->status_var;
thd->initial_status_var= &old_status_var;
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
if (!(res= check_table_access(thd, SELECT_ACL, all_tables, FALSE,
UINT_MAX, FALSE)))
res= execute_sqlcom_select(thd, all_tables);
@@ -6386,6 +6497,10 @@ static bool execute_show_status(THD *thd, TABLE_LIST *all_tables)
offsetof(STATUS_VAR, last_cleared_system_status_var));
mysql_mutex_unlock(&LOCK_status);
return res;
+#ifdef WITH_WSREP
+wsrep_error_label: /* see WSREP_SYNC_WAIT() macro above */
+ return true;
+#endif /* WITH_WSREP */
}
@@ -7295,7 +7410,7 @@ bool check_stack_overrun(THD *thd, long margin,
if (ebuff) {
my_snprintf(ebuff, MYSQL_ERRMSG_SIZE, ER_THD(thd, ER_STACK_OVERRUN_NEED_MORE),
stack_used, my_thread_stack_size, margin);
- my_message(ER_STACK_OVERRUN_NEED_MORE, ebuff, MYF(ME_FATALERROR));
+ my_message(ER_STACK_OVERRUN_NEED_MORE, ebuff, MYF(ME_FATAL));
delete [] ebuff;
}
return 1;
@@ -7365,16 +7480,21 @@ void THD::reset_for_next_command(bool do_clear_error)
DBUG_ASSERT(!in_sub_stmt);
if (likely(do_clear_error))
+ {
clear_error(1);
-
+ /*
+ The following variable can't be reset in clear_error() as
+ clear_error() is called during auto_repair of table
+ */
+ error_printed_to_log= 0;
+ }
free_list= 0;
/*
We also assign stmt_lex in lex_start(), but during bootstrap this
code is executed first.
*/
DBUG_ASSERT(lex == &main_lex);
- main_lex.stmt_lex= &main_lex; main_lex.current_select_number= 1;
- DBUG_PRINT("info", ("Lex and stmt_lex: %p", &main_lex));
+ main_lex.stmt_lex= &main_lex; main_lex.current_select_number= 0;
/*
Those two lines below are theoretically unneeded as
THD::cleanup_after_query() should take care of this already.
@@ -7391,7 +7511,7 @@ void THD::reset_for_next_command(bool do_clear_error)
use autoinc values passed in binlog events, not the values forced by
the cluster.
*/
- if (WSREP(this) && wsrep_exec_mode == LOCAL_STATE &&
+ if (WSREP_NNULL(this) && wsrep_thd_is_local(this) &&
!slave_thread && wsrep_auto_increment_control)
{
variables.auto_increment_offset=
@@ -7445,7 +7565,7 @@ void THD::reset_for_next_command(bool do_clear_error)
#endif
DBUG_PRINT("debug",
("is_current_stmt_binlog_format_row(): %d",
- is_current_stmt_binlog_format_row()));
+ is_current_stmt_binlog_format_row()));
DBUG_VOID_RETURN;
}
@@ -7465,11 +7585,7 @@ mysql_init_select(LEX *lex)
SELECT_LEX *select_lex= lex->current_select;
select_lex->init_select();
lex->wild= 0;
- if (select_lex == &lex->select_lex)
- {
- DBUG_ASSERT(lex->result == 0);
- lex->exchange= 0;
- }
+ lex->exchange= 0;
}
@@ -7490,7 +7606,7 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
{
THD *thd= lex->thd;
bool new_select= select_lex == NULL;
- Name_resolution_context *curr_context= lex->context_stack.head();
+ int old_nest_level= lex->current_select->nest_level;
DBUG_ENTER("mysql_new_select");
if (new_select)
@@ -7502,34 +7618,25 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
select_lex->init_query();
select_lex->init_select();
}
- lex->nest_level++;
- if (lex->nest_level > (int) MAX_SELECT_NESTING)
- {
- my_error(ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT, MYF(0));
- DBUG_RETURN(1);
- }
- select_lex->nest_level= lex->nest_level;
select_lex->nest_level_base= &thd->lex->unit;
if (move_down)
{
+ lex->nest_level++;
+ if (select_lex->set_nest_level(old_nest_level + 1))
+ DBUG_RETURN(1);
SELECT_LEX_UNIT *unit;
/* first select_lex of subselect or derived table */
- if (!(unit= new (thd->mem_root) SELECT_LEX_UNIT()))
+ if (!(unit= lex->alloc_unit()))
DBUG_RETURN(1);
- unit->init_query();
- unit->thd= thd;
unit->include_down(lex->current_select);
- unit->link_next= 0;
- unit->link_prev= 0;
unit->return_to= lex->current_select;
select_lex->include_down(unit);
/*
By default we assume that it is usual subselect and we have outer name
resolution context, if no we will assign it to 0 later
*/
-
- select_lex->context.outer_context= curr_context;
+ select_lex->context.outer_context= &select_lex->outer_select()->context;
}
else
{
@@ -7556,15 +7663,13 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
"SELECT ... PROCEDURE ANALYSE()");
DBUG_RETURN(TRUE);
}
- // SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 -- not possible
- DBUG_ASSERT(!lex->current_select->order_list.first ||
- lex->current_select->braces);
- // SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1; -- not possible
- DBUG_ASSERT(!lex->current_select->explicit_limit ||
- lex->current_select->braces);
+ SELECT_LEX_NODE *save_slave= select_lex->slave;
select_lex->include_neighbour(lex->current_select);
- SELECT_LEX_UNIT *unit= select_lex->master_unit();
+ select_lex->slave= save_slave;
+ SELECT_LEX_UNIT *unit= select_lex->master_unit();
+ if (select_lex->set_nest_level(old_nest_level))
+ DBUG_RETURN(1);
if (!unit->fake_select_lex && unit->add_fake_select_lex(lex->thd))
DBUG_RETURN(1);
select_lex->context.outer_context=
@@ -7620,151 +7725,171 @@ void mysql_init_multi_delete(LEX *lex)
{
lex->sql_command= SQLCOM_DELETE_MULTI;
mysql_init_select(lex);
- lex->select_lex.select_limit= 0;
+ lex->first_select_lex()->select_limit= 0;
lex->unit.select_limit_cnt= HA_POS_ERROR;
- lex->select_lex.table_list.save_and_clear(&lex->auxiliary_table_list);
+ lex->first_select_lex()->table_list.
+ save_and_clear(&lex->auxiliary_table_list);
lex->query_tables= 0;
lex->query_tables_last= &lex->query_tables;
}
-static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
+#ifdef WITH_WSREP
+static void wsrep_prepare_for_autocommit_retry(THD* thd,
+ char* rawbuf,
+ uint length,
+ Parser_state* parser_state)
+{
+ thd->clear_error();
+ close_thread_tables(thd);
+ thd->wsrep_retry_counter++; // grow
+ wsrep_copy_query(thd);
+ thd->set_time();
+ parser_state->reset(rawbuf, length);
+
+ /* PSI end */
+ MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
+ thd->m_statement_psi= NULL;
+ thd->m_digest= NULL;
+
+ /* DTRACE end */
+ if (MYSQL_QUERY_DONE_ENABLED())
+ {
+ MYSQL_QUERY_DONE(thd->is_error());
+ }
+
+ /* SHOW PROFILE end */
+#if defined(ENABLED_PROFILING)
+ thd->profiling.finish_current_query();
+#endif
+
+ /* SHOW PROFILE begin */
+#if defined(ENABLED_PROFILING)
+ thd->profiling.start_new_query("continuing");
+ thd->profiling.set_query_source(rawbuf, length);
+#endif
+
+ /* DTRACE begin */
+ MYSQL_QUERY_START(rawbuf, thd->thread_id,
+ thd->get_db(),
+ &thd->security_ctx->priv_user[0],
+ (char *) thd->security_ctx->host_or_ip);
+
+ /* Performance Schema Interface instrumentation, begin */
+ thd->m_statement_psi= MYSQL_REFINE_STATEMENT(thd->m_statement_psi,
+ com_statement_info[thd->get_command()].m_key);
+ MYSQL_SET_STATEMENT_TEXT(thd->m_statement_psi, thd->query(),
+ thd->query_length());
+
+ DBUG_ASSERT(thd->wsrep_trx().active() == false);
+ thd->wsrep_cs().reset_error();
+ thd->set_query_id(next_query_id());
+}
+
+static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state,
bool is_com_multi,
bool is_next_command)
{
-#ifdef WITH_WSREP
bool is_autocommit=
!thd->in_multi_stmt_transaction_mode() &&
- thd->wsrep_conflict_state == NO_CONFLICT &&
!thd->wsrep_applier;
-
+ bool retry_autocommit;
do
{
- if (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT)
+ retry_autocommit= false;
+ mysql_parse(thd, rawbuf, length, parser_state, is_com_multi, is_next_command);
+
+ /*
+ Convert all ER_QUERY_INTERRUPTED errors to ER_LOCK_DEADLOCK
+ if the transaction was BF aborted. This can happen when the
+ transaction is being BF aborted via thd->awake() while it is
+ still executing.
+
+ Note that this must be done before wsrep_after_statement() call
+ since it clears the transaction for autocommit queries.
+ */
+ if (((thd->get_stmt_da()->is_error() &&
+ thd->get_stmt_da()->sql_errno() == ER_QUERY_INTERRUPTED) ||
+ !thd->get_stmt_da()->is_set()) &&
+ thd->wsrep_trx().bf_aborted())
{
- thd->wsrep_conflict_state= NO_CONFLICT;
- /* Performance Schema Interface instrumentation, begin */
- thd->m_statement_psi= MYSQL_REFINE_STATEMENT(thd->m_statement_psi,
- com_statement_info[thd->get_command()].m_key);
- MYSQL_SET_STATEMENT_TEXT(thd->m_statement_psi, thd->query(),
- thd->query_length());
-
- DBUG_EXECUTE_IF("sync.wsrep_retry_autocommit",
- {
- const char act[]=
- "now "
- "SIGNAL wsrep_retry_autocommit_reached "
- "WAIT_FOR wsrep_retry_autocommit_continue";
- DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act)));
- });
- WSREP_DEBUG("Retry autocommit query: %s", thd->query());
- }
-
- mysql_parse(thd, rawbuf, length, parser_state, is_com_multi,
- is_next_command);
-
- if (WSREP(thd)) {
- /* wsrep BF abort in query exec phase */
- mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state == MUST_ABORT) {
- wsrep_client_rollback(thd);
-
- WSREP_DEBUG("abort in exec query state, avoiding autocommit");
- }
+ WSREP_DEBUG("overriding error: %d with DEADLOCK",
+ (thd->get_stmt_da()->is_error()) ?
+ thd->get_stmt_da()->sql_errno() : 0);
- if (thd->wsrep_conflict_state == MUST_REPLAY)
- {
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- if (thd->lex->explain)
- delete_explain_query(thd->lex);
- mysql_mutex_lock(&thd->LOCK_thd_data);
+ thd->reset_kill_query();
+ wsrep_override_error(thd, ER_LOCK_DEADLOCK);
+ }
- wsrep_replay_transaction(thd);
- }
+#ifdef ENABLED_DEBUG_SYNC
+ /* we need the test otherwise we get stuck in the "SET DEBUG_SYNC" itself */
+ if (thd->lex->sql_command != SQLCOM_SET_OPTION)
+ DEBUG_SYNC(thd, "wsrep_after_statement_enter");
+#endif
- /* setting error code for BF aborted trxs */
- if (thd->wsrep_conflict_state == ABORTED ||
- thd->wsrep_conflict_state == CERT_FAILURE)
+ if (wsrep_after_statement(thd) &&
+ is_autocommit &&
+ thd_is_connection_alive(thd))
+ {
+ thd->reset_for_next_command();
+ thd->reset_kill_query();
+ if (is_autocommit &&
+ thd->lex->sql_command != SQLCOM_SELECT &&
+ thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit)
{
- thd->reset_for_next_command();
- if (is_autocommit &&
- thd->lex->sql_command != SQLCOM_SELECT &&
- (thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit))
- {
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- WSREP_DEBUG("wsrep retrying AC query: %s",
- (thd->query()) ? thd->query() : "void");
-
- /* Performance Schema Interface instrumentation, end */
- MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
- thd->m_statement_psi= NULL;
- thd->m_digest= NULL;
- // Released thd->LOCK_thd_data above as below could end up
- // close_thread_tables()/close_open_tables()/close_thread_table()/mysql_mutex_lock(&thd->LOCK_thd_data)
- close_thread_tables(thd);
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- thd->wsrep_conflict_state= RETRY_AUTOCOMMIT;
- thd->wsrep_retry_counter++; // grow
- wsrep_copy_query(thd);
- thd->set_time();
- parser_state->reset(rawbuf, length);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
- else
- {
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- // This does dirty read to wsrep variables but it is only a debug code
- WSREP_DEBUG("%s, thd: %lld is_AC: %d, retry: %lu - %lu SQL: %s",
- (thd->wsrep_conflict_state == ABORTED) ?
- "BF Aborted" : "cert failure",
- (longlong) thd->thread_id, is_autocommit,
- thd->wsrep_retry_counter,
- thd->variables.wsrep_retry_autocommit, thd->query());
- my_message(ER_LOCK_DEADLOCK, "Deadlock: wsrep aborted transaction",
- MYF(0));
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- thd->wsrep_conflict_state= NO_CONFLICT;
- if (thd->wsrep_conflict_state != REPLAYING)
- thd->wsrep_retry_counter= 0; // reset
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-
- thd->reset_killed();
+ DBUG_EXECUTE_IF("sync.wsrep_retry_autocommit",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL wsrep_retry_autocommit_reached "
+ "WAIT_FOR wsrep_retry_autocommit_continue";
+ DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act)));
+ });
+ WSREP_DEBUG("wsrep retrying AC query: %lu %s",
+ thd->wsrep_retry_counter, wsrep_thd_query(thd));
+ wsrep_prepare_for_autocommit_retry(thd, rawbuf, length, parser_state);
+ if (thd->lex->explain)
+ delete_explain_query(thd->lex);
+ retry_autocommit= true;
}
else
{
- set_if_smaller(thd->wsrep_retry_counter, 0); // reset; eventually ok
- mysql_mutex_unlock(&thd->LOCK_thd_data);
+ WSREP_DEBUG("%s, thd: %llu is_AC: %d, retry: %lu - %lu SQL: %s",
+ wsrep_thd_transaction_state_str(thd),
+ thd->thread_id,
+ is_autocommit,
+ thd->wsrep_retry_counter,
+ thd->variables.wsrep_retry_autocommit,
+ wsrep_thd_query(thd));
+ my_error(ER_LOCK_DEADLOCK, MYF(0));
+ thd->reset_kill_query();
+ thd->wsrep_retry_counter= 0; // reset
}
}
-
- /* If retry is requested clean up explain structure */
- if ((thd->wsrep_conflict_state == RETRY_AUTOCOMMIT ||
- thd->wsrep_conflict_state == MUST_REPLAY )
- && thd->lex->explain)
+ else
{
- delete_explain_query(thd->lex);
+ set_if_smaller(thd->wsrep_retry_counter, 0); // reset; eventually ok
}
-
- } while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT);
+ } while (retry_autocommit);
if (thd->wsrep_retry_query)
{
- WSREP_DEBUG("releasing retry_query: conf %d sent %d kill %d errno %d SQL %s",
- thd->wsrep_conflict_state,
- thd->get_stmt_da()->is_sent(),
+ WSREP_DEBUG("releasing retry_query: "
+ "conf %s sent %d kill %d errno %d SQL %s",
+ wsrep_thd_transaction_state_str(thd),
+ thd->get_stmt_da()->is_sent(),
thd->killed,
- thd->get_stmt_da()->is_error() ? thd->get_stmt_da()->sql_errno() : 0,
+ thd->get_stmt_da()->is_error() ?
+ thd->get_stmt_da()->sql_errno() : 0,
thd->wsrep_retry_query);
my_free(thd->wsrep_retry_query);
thd->wsrep_retry_query = NULL;
thd->wsrep_retry_query_len = 0;
thd->wsrep_retry_command = COM_CONNECT;
}
-#endif /* WITH_WSREP */
+ return false;
}
+#endif /* WITH_WSREP */
/*
@@ -7938,7 +8063,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *rawbuf, uint length)
thd->reset_for_next_command();
if (!parse_sql(thd, & parser_state, NULL, true) &&
- all_tables_not_ok(thd, lex->select_lex.table_list.first))
+ all_tables_not_ok(thd, lex->first_select_lex()->table_list.first))
error= 1; /* Ignore question */
thd->end_statement();
}
@@ -8020,6 +8145,11 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
LEX_CSTRING alias_str;
LEX *lex= thd->lex;
DBUG_ENTER("add_table_to_list");
+ DBUG_PRINT("enter", ("Table '%s' (%p) Select %p (%u)",
+ (alias ? alias->str : table->table.str),
+ table,
+ this, select_number));
+ DBUG_ASSERT(!is_service_select || (table_options & TL_OPTION_SEQUENCE));
if (unlikely(!table))
DBUG_RETURN(0); // End of memory
@@ -8075,7 +8205,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
}
ptr->table_name= table->table;
- ptr->lock_type= lock_type;
+ ptr->lock_type= lock_type;
ptr->mdl_type= mdl_type;
ptr->table_options= table_options;
ptr->updating= MY_TEST(table_options & TL_OPTION_UPDATING);
@@ -8102,7 +8232,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
ptr->schema_table_name= ptr->table_name;
ptr->schema_table= schema_table;
}
- ptr->select_lex= lex->current_select;
+ ptr->select_lex= this;
/*
We can't cache internal temporary tables between prepares as the
table may be deleted before next exection.
@@ -8209,8 +8339,6 @@ bool st_select_lex::init_nested_join(THD *thd)
nested_join= ptr->nested_join=
((NESTED_JOIN*) ((uchar*) ptr + ALIGN_SIZE(sizeof(TABLE_LIST))));
- if (unlikely(join_list->push_front(ptr, thd->mem_root)))
- DBUG_RETURN(1);
ptr->embedding= embedding;
ptr->join_list= join_list;
ptr->alias.str="(nested_join)";
@@ -8247,7 +8375,6 @@ TABLE_LIST *st_select_lex::end_nested_join(THD *thd)
join_list= ptr->join_list;
embedding= ptr->embedding;
nested_join= ptr->nested_join;
- nested_join->nest_type= 0;
if (nested_join->join_list.elements == 1)
{
TABLE_LIST *embedded= nested_join->join_list.head();
@@ -8257,8 +8384,6 @@ TABLE_LIST *st_select_lex::end_nested_join(THD *thd)
join_list->push_front(embedded, thd->mem_root);
ptr= embedded;
embedded->lifted= 1;
- if (embedded->nested_join)
- embedded->nested_join->nest_type= 0;
}
else if (nested_join->join_list.elements == 0)
{
@@ -8290,10 +8415,12 @@ TABLE_LIST *st_select_lex::nest_last_join(THD *thd)
DBUG_ENTER("nest_last_join");
TABLE_LIST *head= join_list->head();
- if (head->nested_join && head->nested_join->nest_type & REBALANCED_NEST)
+ if (head->nested_join && (head->nested_join->nest_type & REBALANCED_NEST))
{
+ head= join_list->pop();
DBUG_RETURN(head);
}
+
if (unlikely(!(ptr= (TABLE_LIST*) thd->calloc(ALIGN_SIZE(sizeof(TABLE_LIST))+
sizeof(NESTED_JOIN)))))
DBUG_RETURN(0);
@@ -8327,7 +8454,6 @@ TABLE_LIST *st_select_lex::nest_last_join(THD *thd)
ptr->join_using_fields= prev_join_using;
}
}
- join_list->push_front(ptr, thd->mem_root);
nested_join->used_tables= nested_join->not_null_tables= (table_map) 0;
DBUG_RETURN(ptr);
}
@@ -8524,16 +8650,14 @@ bool st_select_lex::add_cross_joined_table(TABLE_LIST *left_op,
SELECT * FROM t1 JOIN t2;
SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a JOIN t3
*/
+ add_joined_table(left_op);
+ add_joined_table(right_op);
right_op->straight= straight_fl;
DBUG_RETURN(false);
}
TABLE_LIST *tbl;
List<TABLE_LIST> *right_op_jl= right_op->join_list;
- IF_DBUG(const TABLE_LIST *r_tbl=,) right_op_jl->pop();
- DBUG_ASSERT(right_op == r_tbl);
- IF_DBUG(const TABLE_LIST *l_tbl=,) right_op_jl->pop();
- DBUG_ASSERT(left_op == l_tbl);
TABLE_LIST *cj_nest;
/*
@@ -8586,7 +8710,7 @@ bool st_select_lex::add_cross_joined_table(TABLE_LIST *left_op,
cj_nest->embedding= tbl->embedding;
cj_nest->join_list= jl;
cj_nest->alias.str= "(nest_last_join)";
- cj_nest->alias.length= sizeof("(nest_last_join)");
+ cj_nest->alias.length= sizeof("(nest_last_join)")-1;
li.replace(cj_nest);
/*
@@ -8805,7 +8929,7 @@ void st_select_lex::set_lock_for_tables(thr_lock_type lock_type, bool for_update
bool st_select_lex_unit::add_fake_select_lex(THD *thd_arg)
{
SELECT_LEX *first_sl= first_select();
- DBUG_ENTER("add_fake_select_lex");
+ DBUG_ENTER("st_select_lex_unit::add_fake_select_lex");
DBUG_ASSERT(!fake_select_lex);
if (!(fake_select_lex= new (thd_arg->mem_root) SELECT_LEX()))
@@ -8815,16 +8939,19 @@ bool st_select_lex_unit::add_fake_select_lex(THD *thd_arg)
fake_select_lex->select_number= INT_MAX;
fake_select_lex->parent_lex= thd_arg->lex; /* Used in init_query. */
fake_select_lex->make_empty_select();
- fake_select_lex->linkage= GLOBAL_OPTIONS_TYPE;
+ fake_select_lex->set_linkage(GLOBAL_OPTIONS_TYPE);
fake_select_lex->select_limit= 0;
+ fake_select_lex->no_table_names_allowed= 1;
+
fake_select_lex->context.outer_context=first_sl->context.outer_context;
/* allow item list resolving in fake select for ORDER BY */
fake_select_lex->context.resolve_in_select_list= TRUE;
fake_select_lex->context.select_lex= fake_select_lex;
fake_select_lex->nest_level_base= first_select()->nest_level_base;
- fake_select_lex->nest_level=first_select()->nest_level;
+ if (fake_select_lex->set_nest_level(first_select()->nest_level))
+ DBUG_RETURN(1);
if (!is_unit_op())
{
@@ -8837,7 +8964,7 @@ bool st_select_lex_unit::add_fake_select_lex(THD *thd_arg)
fake_select_lex->no_table_names_allowed= 1;
thd_arg->lex->current_select= fake_select_lex;
}
- thd_arg->lex->pop_context();
+ //thd_arg->lex->pop_context("add fake");
DBUG_RETURN(0);
}
@@ -8873,9 +9000,11 @@ push_new_name_resolution_context(THD *thd,
left_op->first_leaf_for_name_resolution();
on_context->last_name_resolution_table=
right_op->last_leaf_for_name_resolution();
- on_context->select_lex = thd->lex->current_select;
- on_context->outer_context = thd->lex->current_context()->outer_context;
- return thd->lex->push_context(on_context, thd->mem_root);
+ LEX *lex= thd->lex;
+ on_context->select_lex = lex->current_select;
+ st_select_lex *outer_sel= lex->parser_current_outer_select();
+ on_context->outer_context = outer_sel ? &outer_sel->context : 0;
+ return lex->push_context(on_context);
}
@@ -8964,7 +9093,7 @@ void add_join_on(THD *thd, TABLE_LIST *b, Item *expr)
SELECT * FROM t1, t2 WHERE (t1.j=t2.j and <some_cond>)
@endverbatim
- @param a Left join argument
+ @param a Left join argumentex
@param b Right join argument
@param using_fields Field names from USING clause
*/
@@ -8987,23 +9116,33 @@ void add_join_natural(TABLE_LIST *a, TABLE_LIST *b, List<String> *using_fields,
pointer - thread found, and its LOCK_thd_kill is locked.
*/
-THD *find_thread_by_id(longlong id, bool query_id)
+struct find_thread_callback_arg
{
- THD *tmp;
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
+ find_thread_callback_arg(longlong id_arg, bool query_id_arg):
+ thd(0), id(id_arg), query_id(query_id_arg) {}
+ THD *thd;
+ longlong id;
+ bool query_id;
+};
+
+
+static my_bool find_thread_callback(THD *thd, find_thread_callback_arg *arg)
+{
+ if (arg->id == (arg->query_id ? thd->query_id : (longlong) thd->thread_id))
{
- if (tmp->get_command() == COM_DAEMON)
- continue;
- if (id == (query_id ? tmp->query_id : (longlong) tmp->thread_id))
- {
- mysql_mutex_lock(&tmp->LOCK_thd_kill); // Lock from delete
- break;
- }
+ mysql_mutex_lock(&thd->LOCK_thd_kill); // Lock from delete
+ arg->thd= thd;
+ return 1;
}
- mysql_mutex_unlock(&LOCK_thread_count);
- return tmp;
+ return 0;
+}
+
+
+THD *find_thread_by_id(longlong id, bool query_id)
+{
+ find_thread_callback_arg arg(id, query_id);
+ server_threads.iterate(find_thread_callback, &arg);
+ return arg.thd;
}
@@ -9014,9 +9153,6 @@ THD *find_thread_by_id(longlong id, bool query_id)
@param id Thread id or query id
@param kill_signal Should it kill the query or the connection
@param type Type of id: thread id or query id
-
- @note
- This is written such that we have a short lock on LOCK_thread_count
*/
uint
@@ -9025,9 +9161,12 @@ kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type typ
THD *tmp;
uint error= (type == KILL_TYPE_QUERY ? ER_NO_SUCH_QUERY : ER_NO_SUCH_THREAD);
DBUG_ENTER("kill_one_thread");
- DBUG_PRINT("enter", ("id: %lld signal: %u", id, (uint) kill_signal));
+ DBUG_PRINT("enter", ("id: %lld signal: %d", id, kill_signal));
+ tmp= find_thread_by_id(id, type == KILL_TYPE_QUERY);
+ if (!tmp)
+ DBUG_RETURN(error);
- if (id && (tmp= find_thread_by_id(id, type == KILL_TYPE_QUERY)))
+ if (tmp->get_command() != COM_DAEMON)
{
/*
If we're SUPER, we can KILL anything, including system-threads.
@@ -9050,19 +9189,44 @@ kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type typ
faster and do a harder kill than KILL_SYSTEM_THREAD;
*/
+ mysql_mutex_lock(&tmp->LOCK_thd_data); // Lock from concurrent usage
+
+#ifdef WITH_WSREP
if (((thd->security_ctx->master_access & SUPER_ACL) ||
thd->security_ctx->user_matches(tmp->security_ctx)) &&
- !wsrep_thd_is_BF(tmp, false))
+ !wsrep_thd_is_BF(tmp, false) && !tmp->wsrep_applier)
+#else
+ if ((thd->security_ctx->master_access & SUPER_ACL) ||
+ thd->security_ctx->user_matches(tmp->security_ctx))
+#endif /* WITH_WSREP */
{
- tmp->awake_no_mutex(kill_signal);
- error=0;
+#ifdef WITH_WSREP
+ DEBUG_SYNC(thd, "before_awake_no_mutex");
+ if (tmp->wsrep_aborter && tmp->wsrep_aborter != thd->thread_id)
+ {
+ /* victim is in hit list already, bail out */
+ WSREP_DEBUG("victim %lld has wsrep aborter: %lu, skipping awake()",
+ id, tmp->wsrep_aborter);
+ error= 0;
+ }
+ else
+#endif /* WITH_WSREP */
+ {
+ WSREP_DEBUG("kill_one_thread victim: %lld wsrep_aborter %lu"
+ " by signal %d",
+ id, tmp->wsrep_aborter, kill_signal);
+ tmp->awake_no_mutex(kill_signal);
+ error= 0;
+ }
}
else
error= (type == KILL_TYPE_QUERY ? ER_KILL_QUERY_DENIED_ERROR :
ER_KILL_DENIED_ERROR);
- mysql_mutex_unlock(&tmp->LOCK_thd_kill);
+
+ mysql_mutex_unlock(&tmp->LOCK_thd_data);
}
- DBUG_PRINT("exit", ("%d", error));
+ mysql_mutex_unlock(&tmp->LOCK_thd_kill);
+ DBUG_PRINT("exit", ("%u", error));
DBUG_RETURN(error);
}
@@ -9075,56 +9239,67 @@ kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type typ
@param only_kill_query Should it kill the query or the connection
@note
- This is written such that we have a short lock on LOCK_thread_count
-
If we can't kill all threads because of security issues, no threads
are killed.
*/
-static uint kill_threads_for_user(THD *thd, LEX_USER *user,
- killed_state kill_signal, ha_rows *rows)
+struct kill_threads_callback_arg
{
- THD *tmp;
+ kill_threads_callback_arg(THD *thd_arg, LEX_USER *user_arg):
+ thd(thd_arg), user(user_arg) {}
+ THD *thd;
+ LEX_USER *user;
List<THD> threads_to_kill;
- DBUG_ENTER("kill_threads_for_user");
-
- *rows= 0;
-
- if (unlikely(thd->is_fatal_error)) // If we run out of memory
- DBUG_RETURN(ER_OUT_OF_RESOURCES);
+};
- DBUG_PRINT("enter", ("user: %s signal: %u", user->user.str,
- (uint) kill_signal));
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
+static my_bool kill_threads_callback(THD *thd, kill_threads_callback_arg *arg)
+{
+ if (thd->security_ctx->user)
{
- if (!tmp->security_ctx->user)
- continue;
/*
Check that hostname (if given) and user name matches.
host.str[0] == '%' means that host name was not given. See sql_yacc.yy
*/
- if (((user->host.str[0] == '%' && !user->host.str[1]) ||
- !strcmp(tmp->security_ctx->host_or_ip, user->host.str)) &&
- !strcmp(tmp->security_ctx->user, user->user.str))
+ if (((arg->user->host.str[0] == '%' && !arg->user->host.str[1]) ||
+ !strcmp(thd->security_ctx->host_or_ip, arg->user->host.str)) &&
+ !strcmp(thd->security_ctx->user, arg->user->user.str))
{
- if (!(thd->security_ctx->master_access & SUPER_ACL) &&
- !thd->security_ctx->user_matches(tmp->security_ctx))
+ if (!(arg->thd->security_ctx->master_access & SUPER_ACL) &&
+ !arg->thd->security_ctx->user_matches(thd->security_ctx))
+ return 1;
+ if (!arg->threads_to_kill.push_back(thd, arg->thd->mem_root))
{
- mysql_mutex_unlock(&LOCK_thread_count);
- DBUG_RETURN(ER_KILL_DENIED_ERROR);
+ mysql_mutex_lock(&thd->LOCK_thd_kill); // Lock from delete
+ mysql_mutex_lock(&thd->LOCK_thd_data);
}
- if (!threads_to_kill.push_back(tmp, thd->mem_root))
- mysql_mutex_lock(&tmp->LOCK_thd_kill); // Lock from delete
}
}
- mysql_mutex_unlock(&LOCK_thread_count);
- if (!threads_to_kill.is_empty())
+ return 0;
+}
+
+
+static uint kill_threads_for_user(THD *thd, LEX_USER *user,
+ killed_state kill_signal, ha_rows *rows)
+{
+ kill_threads_callback_arg arg(thd, user);
+ DBUG_ENTER("kill_threads_for_user");
+
+ *rows= 0;
+
+ if (unlikely(thd->is_fatal_error)) // If we run out of memory
+ DBUG_RETURN(ER_OUT_OF_RESOURCES);
+
+ DBUG_PRINT("enter", ("user: %s signal: %u", user->user.str,
+ (uint) kill_signal));
+
+ if (server_threads.iterate(kill_threads_callback, &arg))
+ DBUG_RETURN(ER_KILL_DENIED_ERROR);
+
+ if (!arg.threads_to_kill.is_empty())
{
- List_iterator_fast<THD> it2(threads_to_kill);
+ List_iterator_fast<THD> it2(arg.threads_to_kill);
THD *next_ptr;
THD *ptr= it2++;
do
@@ -9140,6 +9315,7 @@ static uint kill_threads_for_user(THD *thd, LEX_USER *user,
*/
next_ptr= it2++;
mysql_mutex_unlock(&ptr->LOCK_thd_kill);
+ mysql_mutex_unlock(&ptr->LOCK_thd_data);
(*rows)++;
} while ((ptr= next_ptr));
}
@@ -9342,7 +9518,7 @@ bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
{
TABLE_LIST *table;
LEX *lex= thd->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
DBUG_ENTER("multi_update_precheck");
if (select_lex->item_list.elements != lex->value_list.elements)
@@ -9378,7 +9554,7 @@ bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
/*
Is there tables of subqueries?
*/
- if (&lex->select_lex != lex->all_selects_list)
+ if (lex->first_select_lex() != lex->all_selects_list)
{
DBUG_PRINT("info",("Checking sub query list"));
for (table= tables; table; table= table->next_global)
@@ -9412,7 +9588,7 @@ bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
bool multi_delete_precheck(THD *thd, TABLE_LIST *tables)
{
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
TABLE_LIST *aux_tables= thd->lex->auxiliary_table_list.first;
TABLE_LIST **save_query_tables_own_last= thd->lex->query_tables_own_last;
DBUG_ENTER("multi_delete_precheck");
@@ -9529,7 +9705,7 @@ static TABLE_LIST *multi_delete_table_match(LEX *lex, TABLE_LIST *tbl,
bool multi_delete_set_locks_and_link_aux_tables(LEX *lex)
{
- TABLE_LIST *tables= lex->select_lex.table_list.first;
+ TABLE_LIST *tables= lex->first_select_lex()->table_list.first;
TABLE_LIST *target_tbl;
DBUG_ENTER("multi_delete_set_locks_and_link_aux_tables");
@@ -9571,7 +9747,8 @@ bool multi_delete_set_locks_and_link_aux_tables(LEX *lex)
bool update_precheck(THD *thd, TABLE_LIST *tables)
{
DBUG_ENTER("update_precheck");
- if (thd->lex->select_lex.item_list.elements != thd->lex->value_list.elements)
+ if (thd->lex->first_select_lex()->item_list.elements !=
+ thd->lex->value_list.elements)
{
my_message(ER_WRONG_VALUE_COUNT, ER_THD(thd, ER_WRONG_VALUE_COUNT), MYF(0));
DBUG_RETURN(TRUE);
@@ -9662,7 +9839,7 @@ void create_table_set_open_action_and_adjust_tables(LEX *lex)
else
create_table->open_type= OT_BASE_ONLY;
- if (!lex->select_lex.item_list.elements)
+ if (!lex->first_select_lex()->item_list.elements)
{
/*
Avoid opening and locking target table for ordinary CREATE TABLE
@@ -9693,7 +9870,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
TABLE_LIST *create_table)
{
LEX *lex= thd->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
ulong want_priv;
bool error= TRUE; // Error message is given
DBUG_ENTER("create_table_precheck");
@@ -9834,8 +10011,9 @@ Item *negate_expression(THD *thd, Item *expr)
{
/* it is NOT(NOT( ... )) */
Item *arg= ((Item_func *) expr)->arguments()[0];
+ const Type_handler *fh= arg->fixed_type_handler();
enum_parsing_place place= thd->lex->current_select->parsing_place;
- if (arg->is_bool_type() || place == IN_WHERE || place == IN_HAVING)
+ if ((fh && fh->is_bool_type()) || place == IN_WHERE || place == IN_HAVING)
return arg;
/*
if it is not boolean function then we have to emulate value of
@@ -9873,8 +10051,7 @@ void get_default_definer(THD *thd, LEX_USER *definer, bool role)
definer->host.length= strlen(definer->host.str);
}
definer->user.length= strlen(definer->user.str);
-
- definer->reset_auth();
+ definer->auth= NULL;
}
@@ -9933,7 +10110,7 @@ LEX_USER *create_definer(THD *thd, LEX_CSTRING *user_name,
definer->user= *user_name;
definer->host= *host_name;
- definer->reset_auth();
+ definer->auth= NULL;
return definer;
}
@@ -10202,6 +10379,9 @@ bool parse_sql(THD *thd, Parser_state *parser_state,
((thd->variables.sql_mode & MODE_ORACLE) ?
ORAparse(thd) :
MYSQLparse(thd)) != 0;
+ DBUG_ASSERT(opt_bootstrap || mysql_parse_status ||
+ thd->lex->select_stack_top == 0);
+ thd->lex->current_select= thd->lex->first_select_lex();
/*
Check that if MYSQLparse() failed either thd->is_error() is set, or an
@@ -10301,7 +10481,7 @@ CHARSET_INFO *find_bin_collation(CHARSET_INFO *cs)
void LEX::mark_first_table_as_inserting()
{
- TABLE_LIST *t= select_lex.table_list.first;
+ TABLE_LIST *t= first_select_lex()->table_list.first;
DBUG_ENTER("Query_tables_list::mark_tables_with_important_flags");
DBUG_ASSERT(sql_command_flags[sql_command] & CF_INSERTS_DATA);
t->for_insert_data= TRUE;
diff --git a/sql/sql_parse.h b/sql/sql_parse.h
index b726bb667b2..be37e3f6bb3 100644
--- a/sql/sql_parse.h
+++ b/sql/sql_parse.h
@@ -99,11 +99,10 @@ void create_table_set_open_action_and_adjust_tables(LEX *lex);
void mysql_init_multi_delete(LEX *lex);
bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
void create_table_set_open_action_and_adjust_tables(LEX *lex);
-pthread_handler_t handle_bootstrap(void *arg);
+int bootstrap(MYSQL_FILE *file);
bool run_set_statement_if_requested(THD *thd, LEX *lex);
int mysql_execute_command(THD *thd);
bool do_command(THD *thd);
-void do_handle_bootstrap(THD *thd);
bool dispatch_command(enum enum_server_command command, THD *thd,
char* packet, uint packet_length,
bool is_com_multi, bool is_next_command);
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 4a0a55f8178..487800df1ab 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -533,15 +533,10 @@ static bool create_full_part_field_array(THD *thd, TABLE *table,
full_part_field_array may be NULL if storage engine supports native
partitioning.
*/
- table->vcol_set= table->read_set= &part_info->full_part_field_set;
+ table->read_set= &part_info->full_part_field_set;
if ((ptr= part_info->full_part_field_array))
for (; *ptr; ptr++)
- {
- if ((*ptr)->vcol_info)
- table->mark_virtual_col(*ptr);
- else
- bitmap_fast_test_and_set(table->read_set, (*ptr)->field_index);
- }
+ table->mark_column_with_deps(*ptr);
table->default_column_bitmaps();
end:
@@ -843,7 +838,8 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
goto end;
table->get_fields_in_item_tree= true;
- func_expr->walk(&Item::change_context_processor, 0, &lex.select_lex.context);
+ func_expr->walk(&Item::change_context_processor, 0,
+ &lex.first_select_lex()->context);
thd->where= "partition function";
/*
In execution we must avoid the use of thd->change_item_tree since
@@ -1509,7 +1505,7 @@ static bool check_list_constants(THD *thd, partition_info *part_info)
List_iterator<part_elem_value> list_val_it2(part_def->list_val_list);
while ((list_value= list_val_it2++))
{
- calc_value= list_value->value - type_add;
+ calc_value= list_value->value ^ type_add;
part_info->list_array[list_index].list_value= calc_value;
part_info->list_array[list_index++].partition_id= i;
}
@@ -1571,7 +1567,7 @@ static bool check_vers_constants(THD *thd, partition_info *part_info)
my_tz_OFFSET0->gmt_sec_to_TIME(&ltime, vers_info->interval.start);
while ((el= it++)->id < hist_parts)
{
- if (date_add_interval(&ltime, vers_info->interval.type,
+ if (date_add_interval(thd, &ltime, vers_info->interval.type,
vers_info->interval.step))
goto err;
uint error= 0;
@@ -2392,6 +2388,8 @@ static int add_column_list_values(String *str, partition_info *part_info,
*/
if (create_info)
{
+ const Column_derived_attributes
+ derived_attr(create_info->default_table_charset);
Create_field *sql_field;
if (!(sql_field= get_sql_field(field_name,
@@ -2406,7 +2404,7 @@ static int add_column_list_values(String *str, partition_info *part_info,
&need_cs_check))
return 1;
if (need_cs_check)
- field_cs= get_sql_field_charset(sql_field, create_info);
+ field_cs= sql_field->explicit_or_derived_charset(&derived_attr);
else
field_cs= NULL;
}
@@ -2667,7 +2665,7 @@ char *generate_partition_syntax(THD *thd, partition_info *part_info,
default:
DBUG_ASSERT(0);
/* We really shouldn't get here, no use in continuing from here */
- my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
+ my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
DBUG_RETURN(NULL);
}
if (part_info->part_type == VERSIONING_PARTITION)
@@ -6142,7 +6140,7 @@ static bool mysql_change_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
lpt->pack_frm_data,
lpt->pack_frm_len))))
{
- file->print_error(error, MYF(error != ER_OUTOFMEMORY ? 0 : ME_FATALERROR));
+ file->print_error(error, MYF(error != ER_OUTOFMEMORY ? 0 : ME_FATAL));
}
if (mysql_trans_commit_alter_copy_data(thd))
@@ -6883,9 +6881,9 @@ static void release_log_entries(partition_info *part_info)
alter_partition_lock_handling()
lpt Struct carrying parameters
RETURN VALUES
- NONE
+ true on error
*/
-static void alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
+static bool alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
{
THD *thd= lpt->thd;
@@ -6899,23 +6897,9 @@ static void alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
lpt->table= 0;
lpt->table_list->table= 0;
if (thd->locked_tables_mode)
- {
- Diagnostics_area *stmt_da= NULL;
- Diagnostics_area tmp_stmt_da(true);
-
- if (unlikely(thd->is_error()))
- {
- /* reopen might fail if we have a previous error, use a temporary da. */
- stmt_da= thd->get_stmt_da();
- thd->set_stmt_da(&tmp_stmt_da);
- }
-
- if (unlikely(thd->locked_tables_list.reopen_tables(thd, false)))
- sql_print_warning("We failed to reacquire LOCKs in ALTER TABLE");
+ return thd->locked_tables_list.reopen_tables(thd, false);
- if (stmt_da)
- thd->set_stmt_da(stmt_da);
- }
+ return false;
}
@@ -7131,6 +7115,8 @@ err_exclusive_lock:
thd->set_stmt_da(&tmp_stmt_da);
}
+ /* NB: error status is not needed here, the statement fails with
+ the original error. */
if (unlikely(thd->locked_tables_list.reopen_tables(thd, false)))
sql_print_warning("We failed to reacquire LOCKs in ALTER TABLE");
@@ -7354,13 +7340,14 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
ERROR_INJECT_ERROR("fail_drop_partition_8") ||
(write_log_completed(lpt, FALSE), FALSE) ||
ERROR_INJECT_CRASH("crash_drop_partition_9") ||
- ERROR_INJECT_ERROR("fail_drop_partition_9") ||
- (alter_partition_lock_handling(lpt), FALSE))
+ ERROR_INJECT_ERROR("fail_drop_partition_9"))
{
handle_alter_part_error(lpt, action_completed, TRUE, frm_install,
close_table_on_failure);
goto err;
}
+ if (alter_partition_lock_handling(lpt))
+ goto err;
}
else if ((alter_info->partition_flags & ALTER_PARTITION_ADD) &&
(part_info->part_type == RANGE_PARTITION ||
@@ -7431,13 +7418,14 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
ERROR_INJECT_ERROR("fail_add_partition_9") ||
(write_log_completed(lpt, FALSE), FALSE) ||
ERROR_INJECT_CRASH("crash_add_partition_10") ||
- ERROR_INJECT_ERROR("fail_add_partition_10") ||
- (alter_partition_lock_handling(lpt), FALSE))
+ ERROR_INJECT_ERROR("fail_add_partition_10"))
{
handle_alter_part_error(lpt, action_completed, FALSE, frm_install,
close_table_on_failure);
goto err;
}
+ if (alter_partition_lock_handling(lpt))
+ goto err;
}
else
{
@@ -7536,13 +7524,14 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
ERROR_INJECT_ERROR("fail_change_partition_11") ||
(write_log_completed(lpt, FALSE), FALSE) ||
ERROR_INJECT_CRASH("crash_change_partition_12") ||
- ERROR_INJECT_ERROR("fail_change_partition_12") ||
- (alter_partition_lock_handling(lpt), FALSE))
+ ERROR_INJECT_ERROR("fail_change_partition_12"))
{
handle_alter_part_error(lpt, action_completed, FALSE, frm_install,
close_table_on_failure);
goto err;
}
+ if (alter_partition_lock_handling(lpt))
+ goto err;
}
downgrade_mdl_if_lock_tables_mode(thd, mdl_ticket, MDL_SHARED_NO_READ_WRITE);
/*
@@ -8368,7 +8357,8 @@ static int get_part_iter_for_interval_via_mapping(partition_info *part_info,
field->type() == MYSQL_TYPE_DATETIME))
{
/* Monotonic, but return NULL for dates with zeros in month/day. */
- zero_in_start_date= field->get_date(&start_date, 0);
+ DBUG_ASSERT(field->cmp_type() == TIME_RESULT); // No rounding/truncation
+ zero_in_start_date= field->get_date(&start_date, date_mode_t(0));
DBUG_PRINT("info", ("zero start %u %04d-%02d-%02d",
zero_in_start_date, start_date.year,
start_date.month, start_date.day));
@@ -8392,7 +8382,8 @@ static int get_part_iter_for_interval_via_mapping(partition_info *part_info,
!part_info->part_expr->null_value)
{
MYSQL_TIME end_date;
- bool zero_in_end_date= field->get_date(&end_date, 0);
+ DBUG_ASSERT(field->cmp_type() == TIME_RESULT); // No rounding/truncation
+ bool zero_in_end_date= field->get_date(&end_date, date_mode_t(0));
/*
This is an optimization for TO_DAYS()/TO_SECONDS() to avoid scanning
the NULL partition for ranges that cannot include a date with 0 as
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc
index 90b114b792c..bd51d9a2e08 100644
--- a/sql/sql_partition_admin.cc
+++ b/sql/sql_partition_admin.cc
@@ -32,6 +32,7 @@
#include "ha_partition.h" // ha_partition
#endif
#include "sql_base.h" // open_and_lock_tables
+#include "wsrep_mysqld.h"
#ifndef WITH_PARTITION_STORAGE_ENGINE
@@ -51,7 +52,7 @@ bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd)
/* Moved from mysql_execute_command */
LEX *lex= thd->lex;
/* first SELECT_LEX (have special meaning for many of non-SELECTcommands) */
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
/* first table of first SELECT_LEX */
TABLE_LIST *first_table= (TABLE_LIST*) select_lex->table_list.first;
/*
@@ -755,7 +756,7 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd)
int error;
ha_partition *partition;
ulong timeout= thd->variables.lock_wait_timeout;
- TABLE_LIST *first_table= thd->lex->select_lex.table_list.first;
+ TABLE_LIST *first_table= thd->lex->first_select_lex()->table_list.first;
Alter_info *alter_info= &thd->lex->alter_info;
uint table_counter, i;
List<String> partition_names_list;
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index b251df490c4..4ab329c454a 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005, 2018, Oracle and/or its affiliates.
- Copyright (c) 2010, 2018, MariaDB Corporation
+ Copyright (c) 2010, 2020, 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
@@ -39,6 +39,7 @@
#include <mysql/plugin_password_validation.h>
#include <mysql/plugin_encryption.h>
#include "sql_plugin_compat.h"
+#include "wsrep_mysqld.h"
#ifdef HAVE_LINK_H
#include <link.h>
@@ -281,6 +282,7 @@ struct st_mysql_sys_var
MYSQL_PLUGIN_VAR_HEADER;
};
+enum install_status { INSTALL_GOOD, INSTALL_FAIL_WARN_OK, INSTALL_FAIL_NOT_OK };
/*
sys_var class for access to all plugin variables visible to the user
*/
@@ -1080,7 +1082,7 @@ static st_plugin_int *plugin_insert_or_reuse(struct st_plugin_int *plugin)
NOTE
Requires that a write-lock is held on LOCK_system_variables_hash
*/
-static bool plugin_add(MEM_ROOT *tmp_root,
+static enum install_status plugin_add(MEM_ROOT *tmp_root, bool if_not_exists,
const LEX_CSTRING *name, LEX_CSTRING *dl, myf MyFlags)
{
struct st_plugin_int tmp, *maybe_dupe;
@@ -1091,14 +1093,16 @@ static bool plugin_add(MEM_ROOT *tmp_root,
if (name->str && plugin_find_internal(name, MYSQL_ANY_PLUGIN))
{
+ if (if_not_exists)
+ MyFlags|= ME_NOTE;
my_error(ER_PLUGIN_INSTALLED, MyFlags, name->str);
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(if_not_exists ? INSTALL_FAIL_WARN_OK : INSTALL_FAIL_NOT_OK);
}
/* Clear the whole struct to catch future extensions. */
bzero((char*) &tmp, sizeof(tmp));
fix_dl_name(tmp_root, dl);
if (! (tmp.plugin_dl= plugin_dl_add(dl, MyFlags)))
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(INSTALL_FAIL_NOT_OK);
/* Find plugin by name */
for (plugin= tmp.plugin_dl->plugins; plugin->info; plugin++)
{
@@ -1124,7 +1128,7 @@ static bool plugin_add(MEM_ROOT *tmp_root,
if (plugin->name != maybe_dupe->plugin->name)
{
my_error(ER_UDF_EXISTS, MyFlags, plugin->name);
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(INSTALL_FAIL_NOT_OK);
}
dupes++;
continue; // already installed
@@ -1176,7 +1180,7 @@ static bool plugin_add(MEM_ROOT *tmp_root,
init_alloc_root(&tmp_plugin_ptr->mem_root, "plugin", 4096, 4096, MYF(0));
if (name->str)
- DBUG_RETURN(FALSE); // all done
+ DBUG_RETURN(INSTALL_GOOD); // all done
oks++;
tmp.plugin_dl->ref_count++;
@@ -1194,7 +1198,9 @@ err:
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, name->str);
plugin_dl_del(tmp.plugin_dl);
- DBUG_RETURN(errs > 0 || oks + dupes == 0);
+ if (errs > 0 || oks + dupes == 0)
+ DBUG_RETURN(INSTALL_FAIL_NOT_OK);
+ DBUG_RETURN(INSTALL_GOOD);
}
static void plugin_variables_deinit(struct st_plugin_int *plugin)
@@ -1798,6 +1804,8 @@ static void plugin_load(MEM_ROOT *tmp_root)
int error;
THD *new_thd= new THD(0);
bool result;
+ unsigned long event_class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE] =
+ { MYSQL_AUDIT_GENERAL_CLASSMASK };
DBUG_ENTER("plugin_load");
if (global_system_variables.log_warnings >= 9)
@@ -1847,13 +1855,38 @@ static void plugin_load(MEM_ROOT *tmp_root)
continue;
/*
+ Pre-acquire audit plugins for events that may potentially occur
+ during [UN]INSTALL PLUGIN.
+
+ When audit event is triggered, audit subsystem acquires interested
+ plugins by walking through plugin list. Evidently plugin list
+ iterator protects plugin list by acquiring LOCK_plugin, see
+ plugin_foreach_with_mask().
+
+ On the other hand plugin_load is acquiring LOCK_plugin
+ rather for a long time.
+
+ When audit event is triggered during plugin_load plugin
+ list iterator acquires the same lock (within the same thread)
+ second time.
+
+ This hack should be removed when LOCK_plugin is fixed so it
+ protects only what it supposed to protect.
+
+ See also mysql_install_plugin(), mysql_uninstall_plugin() and
+ initialize_audit_plugin()
+ */
+ if (mysql_audit_general_enabled())
+ mysql_audit_acquire_plugins(new_thd, event_class_mask);
+
+ /*
there're no other threads running yet, so we don't need a mutex.
but plugin_add() before is designed to work in multi-threaded
environment, and it uses mysql_mutex_assert_owner(), so we lock
the mutex here to satisfy the assert
*/
mysql_mutex_lock(&LOCK_plugin);
- plugin_add(tmp_root, &name, &dl, MYF(ME_ERROR_LOG));
+ plugin_add(tmp_root, false, &name, &dl, MYF(ME_ERROR_LOG));
free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE));
mysql_mutex_unlock(&LOCK_plugin);
}
@@ -1876,7 +1909,7 @@ end:
static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
{
char buffer[FN_REFLEN];
- LEX_STRING name= {buffer, 0}, dl= {NULL, 0}, *str= &name;
+ LEX_CSTRING name= {buffer, 0}, dl= {NULL, 0}, *str= &name;
char *p= buffer;
DBUG_ENTER("plugin_load_list");
while (list)
@@ -1895,7 +1928,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
#ifndef __WIN__
case ':': /* can't use this as delimiter as it may be drive letter */
#endif
- str->str[str->length]= '\0';
+ p[-1]= 0;
if (str == &name) // load all plugins in named module
{
if (!name.length)
@@ -1908,16 +1941,16 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
mysql_mutex_lock(&LOCK_plugin);
free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE));
name.str= 0; // load everything
- if (plugin_add(tmp_root, (LEX_CSTRING*) &name, (LEX_CSTRING*) &dl,
- MYF(ME_ERROR_LOG)))
+ if (plugin_add(tmp_root, false, &name, &dl,
+ MYF(ME_ERROR_LOG)) != INSTALL_GOOD)
goto error;
}
else
{
free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE));
mysql_mutex_lock(&LOCK_plugin);
- if (plugin_add(tmp_root, (LEX_CSTRING*) &name, (LEX_CSTRING*) &dl,
- MYF(ME_ERROR_LOG)))
+ if (plugin_add(tmp_root, false, &name, &dl,
+ MYF(ME_ERROR_LOG)) != INSTALL_GOOD)
goto error;
}
mysql_mutex_unlock(&LOCK_plugin);
@@ -1929,7 +1962,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
case '#':
if (str == &name)
{
- name.str[name.length]= '\0';
+ p[-1]= 0;
str= &dl;
str->str= p;
continue;
@@ -2152,7 +2185,7 @@ bool mysql_install_plugin(THD *thd, const LEX_CSTRING *name,
TABLE_LIST tables;
TABLE *table;
LEX_CSTRING dl= *dl_arg;
- bool error;
+ enum install_status error;
int argc=orig_argc;
char **argv=orig_argv;
unsigned long event_class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE] =
@@ -2200,12 +2233,14 @@ bool mysql_install_plugin(THD *thd, const LEX_CSTRING *name,
mysql_audit_acquire_plugins(thd, event_class_mask);
mysql_mutex_lock(&LOCK_plugin);
- error= plugin_add(thd->mem_root, name, &dl, MYF(0));
- if (unlikely(error))
+ error= plugin_add(thd->mem_root, thd->lex->create_info.if_not_exists(),
+ name, &dl, MYF(0));
+ if (unlikely(error != INSTALL_GOOD))
goto err;
if (name->str)
- error= finalize_install(thd, table, name, &argc, argv);
+ error= finalize_install(thd, table, name, &argc, argv)
+ ? INSTALL_FAIL_NOT_OK : INSTALL_GOOD;
else
{
st_plugin_dl *plugin_dl= plugin_dl_find(&dl);
@@ -2213,11 +2248,12 @@ bool mysql_install_plugin(THD *thd, const LEX_CSTRING *name,
for (plugin= plugin_dl->plugins; plugin->info; plugin++)
{
LEX_CSTRING str= { plugin->name, strlen(plugin->name) };
- error|= finalize_install(thd, table, &str, &argc, argv);
+ if (finalize_install(thd, table, &str, &argc, argv))
+ error= INSTALL_FAIL_NOT_OK;
}
}
- if (unlikely(error))
+ if (unlikely(error != INSTALL_GOOD))
{
reap_needed= true;
reap_plugins();
@@ -2227,10 +2263,11 @@ err:
mysql_mutex_unlock(&LOCK_plugin);
if (argv)
free_defaults(argv);
- DBUG_RETURN(error);
-
-WSREP_ERROR_LABEL:
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(error == INSTALL_FAIL_NOT_OK);
+#ifdef WITH_WSREP
+wsrep_error_label:
+ DBUG_RETURN(true);
+#endif
}
@@ -2242,8 +2279,8 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_CSTRING *name)
if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)) ||
plugin->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_DYING))
{
- // maybe plugin is in mysql.plugin present so postpond the error
- plugin= NULL;
+ // maybe plugin is present in mysql.plugin; postpone the error
+ plugin= nullptr;
}
if (plugin)
@@ -2292,8 +2329,9 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_CSTRING *name)
}
else if (!plugin)
{
- my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str);
- return 1;
+ const myf MyFlags= thd->lex->if_exists() ? ME_NOTE : 0;
+ my_error(ER_SP_DOES_NOT_EXIST, MyFlags, "PLUGIN", name->str);
+ return !MyFlags;
}
return 0;
}
@@ -2315,7 +2353,7 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_CSTRING *name,
if (!opt_noacl && check_table_access(thd, DELETE_ACL, &tables, FALSE, 1, FALSE))
DBUG_RETURN(TRUE);
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
/* need to open before acquiring LOCK_plugin or it will deadlock */
if (! (table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT)))
@@ -2374,8 +2412,9 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_CSTRING *name,
}
else
{
- my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "SONAME", dl.str);
- error= true;
+ myf MyFlags= thd->lex->if_exists() ? ME_NOTE : 0;
+ my_error(ER_SP_DOES_NOT_EXIST, MyFlags, "SONAME", dl.str);
+ error|= !MyFlags;
}
}
reap_plugins();
@@ -2383,9 +2422,10 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_CSTRING *name,
global_plugin_version++;
mysql_mutex_unlock(&LOCK_plugin);
DBUG_RETURN(error);
-
-WSREP_ERROR_LABEL:
- DBUG_RETURN(TRUE);
+#ifdef WITH_WSREP
+wsrep_error_label:
+ DBUG_RETURN(true);
+#endif
}
@@ -4354,33 +4394,31 @@ void wsrep_plugins_pre_init()
members of wsrep startup threads with correct values, as these value
were not available at the time these threads were created.
*/
-void wsrep_plugins_post_init()
-{
- THD *thd;
- I_List_iterator<THD> it(threads);
+my_bool post_init_callback(THD *thd, void *)
+{
DBUG_ASSERT(!current_thd);
-
- mysql_mutex_lock(&LOCK_global_system_variables);
-
- while ((thd= it++))
+ if (thd->wsrep_applier)
{
- if (thd->wsrep_applier)
- {
- // Save options_bits as it will get overwritten in
- // plugin_thdvar_init() (verified)
- ulonglong option_bits_saved= thd->variables.option_bits;
+ // Save options_bits as it will get overwritten in
+ // plugin_thdvar_init() (verified)
+ ulonglong option_bits_saved= thd->variables.option_bits;
- set_current_thd(thd);
- plugin_thdvar_init(thd);
+ set_current_thd(thd);
+ plugin_thdvar_init(thd);
- // Restore option_bits
- thd->variables.option_bits= option_bits_saved;
- }
+ // Restore option_bits
+ thd->variables.option_bits= option_bits_saved;
}
+ set_current_thd(0);
+ return 0;
+}
+
+void wsrep_plugins_post_init()
+{
+ mysql_mutex_lock(&LOCK_global_system_variables);
+ server_threads.iterate(post_init_callback);
mysql_mutex_unlock(&LOCK_global_system_variables);
- set_current_thd(0);
- return;
}
#endif /* WITH_WSREP */
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h
index b266cdb8a9a..eb5532f5d59 100644
--- a/sql/sql_plugin.h
+++ b/sql/sql_plugin.h
@@ -23,11 +23,11 @@
*/
#define SHOW_always_last SHOW_KEY_CACHE_LONG, \
SHOW_HAVE, SHOW_MY_BOOL, SHOW_HA_ROWS, SHOW_SYS, \
- SHOW_LONG_NOFLUSH, SHOW_LEX_STRING, \
+ SHOW_LONG_NOFLUSH, SHOW_LEX_STRING, SHOW_ATOMIC_COUNTER_UINT32_T, \
/* SHOW_*_STATUS must be at the end, SHOW_LONG_STATUS being first */ \
SHOW_LONG_STATUS, SHOW_DOUBLE_STATUS, SHOW_LONGLONG_STATUS, \
SHOW_UINT32_STATUS
-#include <my_global.h>
+#include "mariadb.h"
#undef SHOW_always_last
#include "m_string.h" /* LEX_STRING */
@@ -205,4 +205,3 @@ extern void sync_dynamic_session_variables(THD* thd, bool global_lock);
extern void wsrep_plugins_pre_init();
extern void wsrep_plugins_post_init();
#endif /* WITH_WSREP */
-
diff --git a/sql/sql_plugin_services.inl b/sql/sql_plugin_services.inl
index 4153873c64f..60ba38eae61 100644
--- a/sql/sql_plugin_services.inl
+++ b/sql/sql_plugin_services.inl
@@ -142,53 +142,42 @@ static struct thd_error_context_service_st thd_error_context_handler= {
};
static struct wsrep_service_st wsrep_handler = {
- get_wsrep,
- get_wsrep_certify_nonPK,
- get_wsrep_debug,
- get_wsrep_drupal_282555_workaround,
get_wsrep_recovery,
- get_wsrep_load_data_splitting,
- get_wsrep_log_conflicts,
- get_wsrep_protocol_version,
- wsrep_aborting_thd_contains,
- wsrep_aborting_thd_enqueue,
wsrep_consistency_check,
wsrep_is_wsrep_xid,
wsrep_xid_seqno,
wsrep_xid_uuid,
- wsrep_lock_rollback,
wsrep_on,
- wsrep_post_commit,
- wsrep_prepare_key,
- wsrep_run_wsrep_commit,
+ wsrep_prepare_key_for_innodb,
wsrep_thd_LOCK,
wsrep_thd_UNLOCK,
- wsrep_thd_awake,
- wsrep_thd_conflict_state,
- wsrep_thd_conflict_state_str,
- wsrep_thd_exec_mode,
- wsrep_thd_exec_mode_str,
- wsrep_thd_get_conflict_state,
- wsrep_thd_is_BF,
- wsrep_thd_is_wsrep,
wsrep_thd_query,
- wsrep_thd_query_state,
- wsrep_thd_query_state_str,
wsrep_thd_retry_counter,
- wsrep_thd_set_conflict_state,
wsrep_thd_ignore_table,
wsrep_thd_trx_seqno,
- wsrep_thd_ws_handle,
- wsrep_set_load_multi_commit,
- wsrep_is_load_multi_commit,
- wsrep_trx_is_aborting,
- wsrep_trx_order_before,
- wsrep_unlock_rollback,
+ wsrep_thd_is_aborting,
wsrep_set_data_home_dir,
- wsrep_thd_is_applier,
+ wsrep_thd_is_BF,
+ wsrep_thd_is_local,
+ wsrep_thd_self_abort,
+ wsrep_thd_append_key,
+ wsrep_thd_client_state_str,
+ wsrep_thd_client_mode_str,
+ wsrep_thd_transaction_state_str,
+ wsrep_thd_transaction_id,
+ wsrep_thd_bf_abort,
+ wsrep_thd_order_before,
+ wsrep_handle_SR_rollback,
+ wsrep_thd_skip_locking,
+ wsrep_get_sr_table_name,
+ wsrep_get_debug,
+ wsrep_commit_ordered,
+ wsrep_thd_is_applying,
+ wsrep_thd_set_wsrep_aborter,
wsrep_report_bf_lock_wait,
wsrep_thd_kill_LOCK,
- wsrep_thd_kill_UNLOCK
+ wsrep_thd_kill_UNLOCK,
+ wsrep_thd_set_PA_unsafe
};
static struct thd_specifics_service_st thd_specifics_handler=
@@ -223,6 +212,16 @@ static struct my_print_error_service_st my_print_error_handler=
my_printv_error
};
+struct json_service_st json_handler=
+{
+ json_type,
+ json_get_array_item,
+ json_get_object_key,
+ json_get_object_nkey,
+ json_escape_string,
+ json_unescape_json
+};
+
static struct st_service_ref list_of_services[]=
{
{ "base64_service", VERSION_base64, &base64_handler },
@@ -245,6 +244,6 @@ static struct st_service_ref list_of_services[]=
{ "thd_specifics_service", VERSION_thd_specifics, &thd_specifics_handler },
{ "thd_timezone_service", VERSION_thd_timezone, &thd_timezone_handler },
{ "thd_wait_service", VERSION_thd_wait, &thd_wait_handler },
- { "wsrep_service", VERSION_wsrep, &wsrep_handler }
+ { "wsrep_service", VERSION_wsrep, &wsrep_handler },
+ { "json_service", VERSION_json, &json_handler }
};
-
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 71dc85c3100..a15c3062e16 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -112,6 +112,7 @@ When one supplies long data for a placeholder:
#include "sp_cache.h"
#include "sql_handler.h" // mysql_ha_rm_tables
#include "probes_mysql.h"
+#include "opt_trace.h"
#ifdef EMBEDDED_LIBRARY
/* include MYSQL_BIND headers */
#include <mysql.h>
@@ -124,7 +125,10 @@ static const uint PARAMETER_FLAG_UNSIGNED= 128U << 8;
#include "log_event.h" // class Log_event
#include "sql_handler.h"
#include "transaction.h" // trans_rollback_implicit
+#ifdef WITH_WSREP
#include "wsrep_mysqld.h"
+#include "wsrep_trans_observer.h"
+#endif /* WITH_WSREP */
/**
A result class used to send cursor rows using the binary protocol.
@@ -192,7 +196,7 @@ public:
void setup_set_params();
virtual Query_arena::Type type() const;
virtual void cleanup_stmt();
- bool set_name(LEX_CSTRING *name);
+ bool set_name(const LEX_CSTRING *name);
inline void close_cursor() { delete cursor; cursor= 0; }
inline bool is_in_use() { return flags & (uint) IS_IN_USE; }
inline bool is_sql_prepare() const { return flags & (uint) IS_SQL_PREPARE; }
@@ -1426,7 +1430,7 @@ static int mysql_test_update(Prepared_statement *stmt,
THD *thd= stmt->thd;
uint table_count= 0;
TABLE_LIST *update_source_table;
- SELECT_LEX *select= &stmt->lex->select_lex;
+ SELECT_LEX *select= stmt->lex->first_select_lex();
#ifndef NO_EMBEDDED_ACCESS_CHECKS
uint want_privilege;
#endif
@@ -1482,10 +1486,10 @@ static int mysql_test_update(Prepared_statement *stmt,
table_list->table->grant.want_privilege= want_privilege;
table_list->register_want_access(want_privilege);
#endif
- thd->lex->select_lex.no_wrap_view_item= TRUE;
+ thd->lex->first_select_lex()->no_wrap_view_item= TRUE;
res= setup_fields(thd, Ref_ptr_array(),
select->item_list, MARK_COLUMNS_READ, 0, NULL, 0);
- thd->lex->select_lex.no_wrap_view_item= FALSE;
+ thd->lex->first_select_lex()->no_wrap_view_item= FALSE;
if (res)
goto error;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
@@ -1550,10 +1554,10 @@ static bool mysql_test_delete(Prepared_statement *stmt,
goto error;
}
- DBUG_RETURN(mysql_prepare_delete(thd, table_list,
- lex->select_lex.with_wild,
- lex->select_lex.item_list,
- &lex->select_lex.where,
+ DBUG_RETURN(mysql_prepare_delete(thd, table_list,
+ lex->first_select_lex()->with_wild,
+ lex->first_select_lex()->item_list,
+ &lex->first_select_lex()->where,
&delete_while_scanning));
error:
DBUG_RETURN(TRUE);
@@ -1585,7 +1589,7 @@ static int mysql_test_select(Prepared_statement *stmt,
SELECT_LEX_UNIT *unit= &lex->unit;
DBUG_ENTER("mysql_test_select");
- lex->select_lex.context.resolve_in_select_list= TRUE;
+ lex->first_select_lex()->context.resolve_in_select_list= TRUE;
ulong privilege= lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL;
if (tables)
@@ -1598,7 +1602,7 @@ static int mysql_test_select(Prepared_statement *stmt,
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd)))
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR),
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
static_cast<int>(sizeof(select_send)));
goto error;
}
@@ -1624,7 +1628,7 @@ static int mysql_test_select(Prepared_statement *stmt,
master_unit->is_unit_op() || master_unit->fake_select_lex;
List<Item> fields(is_union_op ? unit->item_list :
- lex->select_lex.item_list);
+ lex->first_select_lex()->item_list);
/* Change columns if a procedure like analyse() */
if (unit->last_procedure && unit->last_procedure->change_columns(thd, fields))
@@ -1782,7 +1786,7 @@ static bool select_like_stmt_test(Prepared_statement *stmt,
THD *thd= stmt->thd;
LEX *lex= stmt->lex;
- lex->select_lex.context.resolve_in_select_list= TRUE;
+ lex->first_select_lex()->context.resolve_in_select_list= TRUE;
if (specific_prepare && (*specific_prepare)(thd))
DBUG_RETURN(TRUE);
@@ -1850,7 +1854,7 @@ static bool mysql_test_create_table(Prepared_statement *stmt)
DBUG_ENTER("mysql_test_create_table");
THD *thd= stmt->thd;
LEX *lex= stmt->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
bool res= FALSE;
bool link_to_local;
TABLE_LIST *create_table= lex->query_tables;
@@ -2182,11 +2186,11 @@ static bool mysql_test_multidelete(Prepared_statement *stmt,
{
THD *thd= stmt->thd;
- thd->lex->current_select= &thd->lex->select_lex;
+ thd->lex->current_select= thd->lex->first_select_lex();
if (add_item_to_list(thd, new (thd->mem_root)
Item_null(thd)))
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 0);
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), 0);
goto error;
}
@@ -2221,13 +2225,14 @@ error:
static int mysql_insert_select_prepare_tester(THD *thd)
{
- SELECT_LEX *first_select= &thd->lex->select_lex;
+ SELECT_LEX *first_select= thd->lex->first_select_lex();
TABLE_LIST *second_table= first_select->table_list.first->next_local;
/* Skip first table, which is the table we are inserting in */
first_select->table_list.first= second_table;
- thd->lex->select_lex.context.table_list=
- thd->lex->select_lex.context.first_name_resolution_table= second_table;
+ thd->lex->first_select_lex()->context.table_list=
+ thd->lex->first_select_lex()->context.first_name_resolution_table=
+ second_table;
return mysql_insert_select_prepare(thd);
}
@@ -2262,7 +2267,7 @@ static bool mysql_test_insert_select(Prepared_statement *stmt,
return 1;
/* store it, because mysql_insert_select_prepare_tester change it */
- first_local_table= lex->select_lex.table_list.first;
+ first_local_table= lex->first_select_lex()->table_list.first;
DBUG_ASSERT(first_local_table != 0);
res=
@@ -2270,7 +2275,7 @@ static bool mysql_test_insert_select(Prepared_statement *stmt,
&mysql_insert_select_prepare_tester,
OPTION_SETUP_TABLES_DONE);
/* revert changes made by mysql_insert_select_prepare_tester */
- lex->select_lex.table_list.first= first_local_table;
+ lex->first_select_lex()->table_list.first= first_local_table;
return res;
}
@@ -2296,7 +2301,7 @@ static int mysql_test_handler_read(Prepared_statement *stmt,
SQL_HANDLER *ha_table;
DBUG_ENTER("mysql_test_handler_read");
- lex->select_lex.context.resolve_in_select_list= TRUE;
+ lex->first_select_lex()->context.resolve_in_select_list= TRUE;
/*
We don't have to test for permissions as this is already done during
@@ -2306,7 +2311,7 @@ static int mysql_test_handler_read(Prepared_statement *stmt,
lex->ident.str,
lex->insert_list,
lex->ha_rkey_mode,
- lex->select_lex.where)))
+ lex->first_select_lex()->where)))
DBUG_RETURN(1);
if (!stmt->is_sql_prepare())
@@ -2345,7 +2350,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
{
THD *thd= stmt->thd;
LEX *lex= stmt->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
TABLE_LIST *tables;
enum enum_sql_command sql_command= lex->sql_command;
int res= 0;
@@ -2354,12 +2359,24 @@ static bool check_prepared_statement(Prepared_statement *stmt)
sql_command, stmt->param_count));
lex->first_lists_tables_same();
+ lex->fix_first_select_number();
tables= lex->query_tables;
/* set context for commands which do not use setup_tables */
- lex->select_lex.context.resolve_in_table_list_only(select_lex->
+ lex->first_select_lex()->context.resolve_in_table_list_only(select_lex->
get_table_list());
+ /*
+ For the optimizer trace, this is the symmetric, for statement preparation,
+ of what is done at statement execution (in mysql_execute_command()).
+ */
+ Opt_trace_start ots(thd, tables, lex->sql_command, &lex->var_list,
+ thd->query(), thd->query_length(),
+ thd->variables.character_set_client);
+
+ Json_writer_object trace_command(thd);
+ Json_writer_array trace_command_steps(thd, "steps");
+
/* Reset warning count for each query that uses tables */
if (tables)
thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
@@ -2377,6 +2394,10 @@ static bool check_prepared_statement(Prepared_statement *stmt)
goto error;
}
+#ifdef WITH_WSREP
+ if (wsrep_sync_wait(thd, sql_command))
+ goto error;
+#endif
switch (sql_command) {
case SQLCOM_REPLACE:
case SQLCOM_INSERT:
@@ -2747,7 +2768,7 @@ end:
}
/**
- Get an SQL statement from an item in lex->prepared_stmt_code.
+ Get an SQL statement from an item in m_code.
This function can return pointers to very different memory classes:
- a static string "NULL", if the item returned NULL
@@ -2772,13 +2793,15 @@ end:
@retval true on error (out of memory)
*/
-bool LEX::get_dynamic_sql_string(LEX_CSTRING *dst, String *buffer)
+bool Lex_prepared_stmt::get_dynamic_sql_string(THD *thd,
+ LEX_CSTRING *dst,
+ String *buffer)
{
- if (prepared_stmt_code->fix_fields_if_needed_for_scalar(thd, NULL))
+ if (m_code->fix_fields_if_needed_for_scalar(thd, NULL))
return true;
- const String *str= prepared_stmt_code->val_str(buffer);
- if (prepared_stmt_code->null_value)
+ const String *str= m_code->val_str(buffer);
+ if (m_code->null_value)
{
/*
Prepare source was NULL, so we need to set "str" to
@@ -2859,7 +2882,7 @@ bool LEX::get_dynamic_sql_string(LEX_CSTRING *dst, String *buffer)
void mysql_sql_stmt_prepare(THD *thd)
{
LEX *lex= thd->lex;
- LEX_CSTRING *name= &lex->prepared_stmt_name;
+ const LEX_CSTRING *name= &lex->prepared_stmt.name();
Prepared_statement *stmt;
LEX_CSTRING query;
DBUG_ENTER("mysql_sql_stmt_prepare");
@@ -2884,7 +2907,7 @@ void mysql_sql_stmt_prepare(THD *thd)
See comments in get_dynamic_sql_string().
*/
StringBuffer<256> buffer;
- if (lex->get_dynamic_sql_string(&query, &buffer) ||
+ if (lex->prepared_stmt.get_dynamic_sql_string(thd, &query, &buffer) ||
! (stmt= new Prepared_statement(thd)))
{
DBUG_VOID_RETURN; /* out of memory */
@@ -2947,7 +2970,7 @@ void mysql_sql_stmt_execute_immediate(THD *thd)
LEX_CSTRING query;
DBUG_ENTER("mysql_sql_stmt_execute_immediate");
- if (lex->prepared_stmt_params_fix_fields(thd))
+ if (lex->prepared_stmt.params_fix_fields(thd))
DBUG_VOID_RETURN;
/*
@@ -2959,7 +2982,7 @@ void mysql_sql_stmt_execute_immediate(THD *thd)
See comments in get_dynamic_sql_string().
*/
StringBuffer<256> buffer;
- if (lex->get_dynamic_sql_string(&query, &buffer) ||
+ if (lex->prepared_stmt.get_dynamic_sql_string(thd, &query, &buffer) ||
!(stmt= new Prepared_statement(thd)))
DBUG_VOID_RETURN; // out of memory
@@ -3094,6 +3117,10 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
for (order= win_spec->order_list->first; order; order= order->next)
order->item= &order->item_ptr;
}
+
+ // Reinit Pushdown
+ sl->cond_pushed_into_where= NULL;
+ sl->cond_pushed_into_having= NULL;
}
if (sl->changed_elements & TOUCHED_SEL_DERIVED)
{
@@ -3148,7 +3175,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
{
tables->reinit_before_use(thd);
}
- lex->current_select= &lex->select_lex;
+ lex->current_select= lex->first_select_lex();
if (lex->result)
@@ -3419,6 +3446,11 @@ static void mysql_stmt_execute_common(THD *thd,
stmt_id == LAST_STMT_ID, read_types))
{
my_error(ER_MALFORMED_PACKET, MYF(0));
+ /*
+ Let's set the thd->query_string so the audit plugin
+ can report the executed query that failed.
+ */
+ thd->set_query_inner(stmt->query_string);
DBUG_VOID_RETURN;
}
@@ -3472,7 +3504,7 @@ void mysql_sql_stmt_execute(THD *thd)
{
LEX *lex= thd->lex;
Prepared_statement *stmt;
- LEX_CSTRING *name= &lex->prepared_stmt_name;
+ const LEX_CSTRING *name= &lex->prepared_stmt.name();
/* Query text for binary, general or slow log, if any of them is open */
String expanded_query;
DBUG_ENTER("mysql_sql_stmt_execute");
@@ -3485,7 +3517,7 @@ void mysql_sql_stmt_execute(THD *thd)
DBUG_VOID_RETURN;
}
- if (stmt->param_count != lex->prepared_stmt_params.elements)
+ if (stmt->param_count != lex->prepared_stmt.param_count())
{
my_error(ER_WRONG_ARGUMENTS, MYF(0), "EXECUTE");
DBUG_VOID_RETURN;
@@ -3493,7 +3525,7 @@ void mysql_sql_stmt_execute(THD *thd)
DBUG_PRINT("info",("stmt: %p", stmt));
- if (lex->prepared_stmt_params_fix_fields(thd))
+ if (lex->prepared_stmt.params_fix_fields(thd))
DBUG_VOID_RETURN;
/*
@@ -3713,7 +3745,7 @@ void mysqld_stmt_close(THD *thd, char *packet)
void mysql_sql_stmt_close(THD *thd)
{
Prepared_statement* stmt;
- LEX_CSTRING *name= &thd->lex->prepared_stmt_name;
+ const LEX_CSTRING *name= &thd->lex->prepared_stmt.name();
DBUG_PRINT("info", ("DEALLOCATE PREPARE: %.*s", (int) name->length,
name->str));
@@ -4078,7 +4110,7 @@ void Prepared_statement::cleanup_stmt()
}
-bool Prepared_statement::set_name(LEX_CSTRING *name_arg)
+bool Prepared_statement::set_name(const LEX_CSTRING *name_arg)
{
name.length= name_arg->length;
name.str= (char*) memdup_root(mem_root, name_arg->str, name_arg->length);
@@ -4196,6 +4228,15 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
thd->is_error() ||
init_param_array(this));
+ if (thd->security_ctx->password_expired &&
+ lex->sql_command != SQLCOM_SET_OPTION)
+ {
+ thd->restore_backup_statement(this, &stmt_backup);
+ thd->restore_active_arena(this, &stmt_backup);
+ thd->stmt_arena= old_stmt_arena;
+ my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
+ DBUG_RETURN(true);
+ }
lex->set_trg_event_type_for_tables();
/*
@@ -4345,7 +4386,7 @@ Prepared_statement::set_parameters(String *expanded_query,
if (is_sql_ps)
{
/* SQL prepared statement */
- res= set_params_from_actual_params(this, thd->lex->prepared_stmt_params,
+ res= set_params_from_actual_params(this, thd->lex->prepared_stmt.params(),
expanded_query);
}
else if (param_count)
@@ -4424,16 +4465,13 @@ Prepared_statement::execute_loop(String *expanded_query,
if (set_parameters(expanded_query, packet, packet_end))
return TRUE;
-
-#ifdef NOT_YET_FROM_MYSQL_5_6
- if (unlikely(thd->security_ctx->password_expired &&
- !lex->is_change_password))
+#ifdef WITH_WSREP
+ if (thd->wsrep_delayed_BF_abort)
{
- my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
- return true;
+ WSREP_DEBUG("delayed BF abort, quitting execute_loop, stmt: %d", id);
+ return TRUE;
}
-#endif
-
+#endif /* WITH_WSREP */
reexecute:
// Make sure that reprepare() did not create any new Items.
DBUG_ASSERT(thd->free_list == NULL);
@@ -4455,30 +4493,6 @@ reexecute:
error= execute(expanded_query, open_cursor) || thd->is_error();
thd->m_reprepare_observer= NULL;
-#ifdef WITH_WSREP
-
- if (WSREP_ON)
- {
- mysql_mutex_lock(&thd->LOCK_thd_data);
- switch (thd->wsrep_conflict_state)
- {
- case CERT_FAILURE:
- WSREP_DEBUG("PS execute fail for CERT_FAILURE: thd: %lld err: %d",
- (longlong) thd->thread_id,
- thd->get_stmt_da()->sql_errno() );
- thd->wsrep_conflict_state = NO_CONFLICT;
- break;
-
- case MUST_REPLAY:
- (void) wsrep_replay_transaction(thd);
- break;
-
- default:
- break;
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-#endif /* WITH_WSREP */
if (unlikely(error) &&
(sql_command_flags[lex->sql_command] & CF_REEXECUTION_FRAGILE) &&
@@ -4598,16 +4612,6 @@ Prepared_statement::execute_bulk_loop(String *expanded_query,
}
read_types= FALSE;
-#ifdef NOT_YET_FROM_MYSQL_5_6
- if (unlikely(thd->security_ctx->password_expired &&
- !lex->is_change_password))
- {
- my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
- thd->set_bulk_execution(0);
- return true;
- }
-#endif
-
// iterations changed by set_bulk_parameters
while ((iterations || start_param) && !error && !thd->is_error())
{
@@ -4651,31 +4655,24 @@ reexecute:
error= execute(expanded_query, open_cursor) || thd->is_error();
thd->m_reprepare_observer= NULL;
-#ifdef WITH_WSREP
- if (WSREP_ON)
+#ifdef WITH_WSREP
+ if (!(sql_command_flags[lex->sql_command] & CF_PS_ARRAY_BINDING_OPTIMIZED) &&
+ WSREP(thd))
{
- mysql_mutex_lock(&thd->LOCK_thd_data);
- switch (thd->wsrep_conflict_state)
+ if (wsrep_after_statement(thd))
{
- case CERT_FAILURE:
- WSREP_DEBUG("PS execute fail for CERT_FAILURE: thd: %lld err: %d",
- (longlong) thd->thread_id,
- thd->get_stmt_da()->sql_errno() );
- thd->wsrep_conflict_state = NO_CONFLICT;
- break;
-
- case MUST_REPLAY:
- (void) wsrep_replay_transaction(thd);
- break;
-
- default:
- break;
+ /*
+ Re-execution success is unlikely after an error from
+ wsrep_after_statement(), so retrun error immediately.
+ */
+ thd->get_stmt_da()->reset_diagnostics_area();
+ wsrep_override_error(thd, thd->wsrep_cs().current_error(),
+ thd->wsrep_cs().current_error_status());
}
- mysql_mutex_unlock(&thd->LOCK_thd_data);
}
+ else
#endif /* WITH_WSREP */
-
if (unlikely(error) &&
(sql_command_flags[lex->sql_command] & CF_REEXECUTION_FRAGILE) &&
!thd->is_fatal_error && !thd->killed &&
@@ -4822,8 +4819,8 @@ bool Prepared_statement::validate_metadata(Prepared_statement *copy)
if (is_sql_prepare() || lex->describe)
return FALSE;
- if (lex->select_lex.item_list.elements !=
- copy->lex->select_lex.item_list.elements)
+ if (lex->first_select_lex()->item_list.elements !=
+ copy->lex->first_select_lex()->item_list.elements)
{
/** Column counts mismatch, update the client */
thd->server_status|= SERVER_STATUS_METADATA_CHANGED;
@@ -4980,7 +4977,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
alloc_query(thd, (char*) expanded_query->ptr(),
expanded_query->length()))
{
- my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), expanded_query->length());
+ my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), expanded_query->length());
goto error;
}
/*
@@ -5141,7 +5138,7 @@ bool Prepared_statement::execute_immediate(const char *query, uint query_len)
if (unlikely(prepare(query, query_len)))
DBUG_RETURN(true);
- if (param_count != thd->lex->prepared_stmt_params.elements)
+ if (param_count != thd->lex->prepared_stmt.param_count())
{
my_error(ER_WRONG_ARGUMENTS, MYF(0), "EXECUTE");
deallocate_immediate();
@@ -5560,16 +5557,9 @@ bool Protocol_local::store_longlong(longlong value, bool unsigned_flag)
bool Protocol_local::store_decimal(const my_decimal *value)
{
- char buf[DECIMAL_MAX_STR_LENGTH];
- String str(buf, sizeof (buf), &my_charset_bin);
- int rc;
-
- rc= my_decimal2string(E_DEC_FATAL_ERROR, value, 0, 0, 0, &str);
-
- if (rc)
- return TRUE;
-
- return store_column(str.ptr(), str.length());
+ DBUG_ASSERT(0); // This method is not used yet
+ StringBuffer<DECIMAL_MAX_STR_LENGTH> str;
+ return value->to_string(&str) ? store_column(str.ptr(), str.length()) : true;
}
@@ -5599,7 +5589,7 @@ bool Protocol_local::store(const char *str, size_t length,
bool Protocol_local::store(MYSQL_TIME *time, int decimals)
{
if (decimals != AUTO_SEC_PART_DIGITS)
- my_time_trunc(time, decimals);
+ my_datetime_trunc(time, decimals);
return store_column(time, sizeof(MYSQL_TIME));
}
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 2f37e1106f0..0d1c9881c17 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2010, 2018, Monty Program Ab.
+ Copyright (c) 2010, 2019, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -177,7 +177,11 @@
#define OPTION_SKIP_REPLICATION (1ULL << 37) // THD, user
#define OPTION_RPL_SKIP_PARALLEL (1ULL << 38)
-#define OPTION_FOUND_COMMENT (1ULL << 39) // SELECT, intern, parser
+#define OPTION_NO_QUERY_CACHE (1ULL << 39) // SELECT, user
+#define OPTION_PROCEDURE_CLAUSE (1ULL << 40) // Internal usage
+
+
+#define OPTION_LEX_FOUND_COMMENT (1ULL << 0) // intern, parser
/* The rest of the file is included in the server only */
#ifndef MYSQL_CLIENT
@@ -222,6 +226,9 @@
#define OPTIMIZER_SWITCH_ORDERBY_EQ_PROP (1ULL << 29)
#define OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED (1ULL << 30)
#define OPTIMIZER_SWITCH_SPLIT_MATERIALIZED (1ULL << 31)
+#define OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_SUBQUERY (1ULL << 32)
+#define OPTIMIZER_SWITCH_USE_ROWID_FILTER (1ULL << 33)
+#define OPTIMIZER_SWITCH_COND_PUSHDOWN_FROM_HAVING (1ULL << 34)
#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
@@ -248,7 +255,11 @@
OPTIMIZER_SWITCH_EXISTS_TO_IN | \
OPTIMIZER_SWITCH_ORDERBY_EQ_PROP | \
OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED | \
- OPTIMIZER_SWITCH_SPLIT_MATERIALIZED)
+ OPTIMIZER_SWITCH_SPLIT_MATERIALIZED | \
+ OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_SUBQUERY | \
+ OPTIMIZER_SWITCH_USE_ROWID_FILTER | \
+ OPTIMIZER_SWITCH_COND_PUSHDOWN_FROM_HAVING | \
+ OPTIMIZER_SWITCH_OPTIMIZE_JOIN_BUFFER_SIZE)
/*
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
@@ -333,10 +344,15 @@
#ifndef MYSQL_CLIENT
/*
- Some defines for exit codes for ::is_equal class functions.
+ Field::is_equal() return codes.
*/
#define IS_EQUAL_NO 0
#define IS_EQUAL_YES 1
+/**
+ new_field has compatible packed representation with old type,
+ so it is theoretically possible to perform change by only updating
+ data dictionary without changing table rows
+*/
#define IS_EQUAL_PACK_LENGTH 2
enum enum_parsing_place
@@ -350,6 +366,9 @@ enum enum_parsing_place
IN_ORDER_BY,
IN_UPDATE_ON_DUP_KEY,
IN_PART_FUNC,
+ BEFORE_OPT_LIST,
+ AFTER_LIST,
+ FOR_LOOP_BOUND,
PARSING_PLACE_SIZE /* always should be the last */
};
diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc
index 4d54ab32691..f36805012b2 100644
--- a/sql/sql_profile.cc
+++ b/sql/sql_profile.cc
@@ -110,7 +110,7 @@ int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table)
};
ST_FIELD_INFO *field_info;
- Name_resolution_context *context= &thd->lex->select_lex.context;
+ Name_resolution_context *context= &thd->lex->first_select_lex()->context;
int i;
for (i= 0; schema_table->fields_info[i].field_name != NULL; i++)
@@ -402,7 +402,7 @@ bool PROFILING::show_profiles()
QUERY_PROFILE *prof;
List<Item> field_list;
MEM_ROOT *mem_root= thd->mem_root;
- SELECT_LEX *sel= &thd->lex->select_lex;
+ SELECT_LEX *sel= thd->lex->first_select_lex();
SELECT_LEX_UNIT *unit= &thd->lex->unit;
ha_rows idx= 0;
Protocol *protocol= thd->protocol;
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 930c00fac35..eb7f1a9da2c 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -31,6 +31,9 @@
#include "debug_sync.h"
#include "des_key_file.h"
#include "transaction.h"
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif
static void disable_checkpoints(THD *thd);
@@ -153,6 +156,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
if (mysql_bin_log.rotate_and_purge(true, drop_gtid_domain))
*write_to_binlog= -1;
+ /* Note that WSREP(thd) might not be true here e.g. during
+ SST. */
if (WSREP_ON)
{
/* Wait for last binlog checkpoint event to be logged. */
@@ -214,7 +219,10 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
!thd->mdl_context.has_locks() ||
thd->handler_tables_hash.records ||
thd->ull_hash.records ||
- thd->global_read_lock.is_acquired());
+ thd->global_read_lock.is_acquired() ||
+ thd->mdl_backup_lock ||
+ thd->current_backup_stage != BACKUP_FINISHED
+ );
/*
Note that if REFRESH_READ_LOCK bit is set then REFRESH_TABLES is set too
@@ -224,6 +232,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
{
if ((options & REFRESH_READ_LOCK) && thd)
{
+ DBUG_ASSERT(!(options & REFRESH_FAST) && !tables);
/*
On the first hand we need write lock on the tables to be flushed,
on the other hand we must not try to aspire a global read lock
@@ -235,6 +244,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
return 1;
}
+
/*
Writing to the binlog could cause deadlocks, as we don't log
UNLOCK TABLES
@@ -242,9 +252,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
tmp_write_to_binlog= 0;
if (thd->global_read_lock.lock_global_read_lock(thd))
return 1; // Killed
- if (close_cached_tables(thd, tables,
- ((options & REFRESH_FAST) ? FALSE : TRUE),
- thd->variables.lock_wait_timeout))
+ if (flush_tables(thd, FLUSH_ALL))
{
/*
NOTE: my_error() has been already called by reopen_tables() within
@@ -267,11 +275,9 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
make_global_read_lock_block_commit(thd) above since they could have
modified the tables too.
*/
- if (WSREP(thd) &&
- close_cached_tables(thd, tables, (options & REFRESH_FAST) ?
- FALSE : TRUE, TRUE))
- result= 1;
- }
+ if (WSREP(thd) && flush_tables(thd, FLUSH_ALL))
+ result= 1;
+ }
else
{
if (thd && thd->locked_tables_mode)
@@ -304,8 +310,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
with global read lock.
*/
if (thd->open_tables &&
- !thd->mdl_context.is_lock_owner(MDL_key::GLOBAL, "", "",
- MDL_INTENTION_EXCLUSIVE))
+ !thd->mdl_context.is_lock_owner(MDL_key::BACKUP, "", "",
+ MDL_BACKUP_DDL))
{
my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, MYF(0),
thd->open_tables->s->table_name.str);
@@ -325,25 +331,21 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
}
#ifdef WITH_WSREP
- if (thd && thd->wsrep_applier)
- {
- /*
- In case of applier thread, do not wait for table share(s) to be
- removed from table definition cache.
- */
- options|= REFRESH_FAST;
- }
-#endif
- if (close_cached_tables(thd, tables,
- ((options & REFRESH_FAST) ? FALSE : TRUE),
- (thd ? thd->variables.lock_wait_timeout :
- LONG_TIMEOUT)))
+ /* In case of applier thread, do not call flush tables */
+ if (!thd || !thd->wsrep_applier)
+#endif /* WITH_WSREP */
{
- /*
- NOTE: my_error() has been already called by reopen_tables() within
- close_cached_tables().
- */
- result= 1;
+ if (close_cached_tables(thd, tables,
+ ((options & REFRESH_FAST) ? FALSE : TRUE),
+ (thd ? thd->variables.lock_wait_timeout :
+ LONG_TIMEOUT)))
+ {
+ /*
+ NOTE: my_error() has been already called by reopen_tables() within
+ close_cached_tables().
+ */
+ result= 1;
+ }
}
}
my_dbopt_cleanup();
@@ -413,6 +415,19 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
#endif
if (options & REFRESH_USER_RESOURCES)
reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */
+ if (options & REFRESH_SSL)
+ {
+ if (reinit_ssl())
+ result= 1;
+#ifdef WITH_WSREP
+ if (!result &&
+ WSREP_ON && wsrep_reload_ssl())
+ {
+ my_message(ER_UNKNOWN_ERROR, "Failed to refresh WSREP SSL.", MYF(0));
+ result= 1;
+ }
+#endif
+ }
if (options & REFRESH_GENERIC)
{
List_iterator_fast<LEX_CSTRING> li(thd->lex->view_list);
@@ -524,6 +539,19 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables)
goto error;
}
+ if (thd->current_backup_stage != BACKUP_FINISHED)
+ {
+ my_error(ER_BACKUP_LOCK_IS_ACTIVE, MYF(0));
+ goto error;
+ }
+
+ /* Should not flush tables while BACKUP LOCK is active */
+ if (thd->mdl_backup_lock)
+ {
+ my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
+ goto error;
+ }
+
if (thd->lex->type & REFRESH_READ_LOCK)
{
/*
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 7d1ddc08aaa..94cbc6be614 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2008, 2019, MariaDB Corporation
+ Copyright (c) 2008, 2020, 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
@@ -31,6 +31,7 @@
#include "debug_sync.h"
#include "semisync_master.h"
#include "semisync_slave.h"
+#include "mysys_err.h"
enum enum_gtid_until_state {
@@ -522,6 +523,22 @@ static enum enum_binlog_checksum_alg get_binlog_checksum_value_at_connect(THD *
DBUG_RETURN(ret);
}
+
+/**
+ Set current_linfo
+
+ Setting current_linfo needs to be done with LOCK_thd_data to ensure that
+ adjust_linfo_offsets doesn't use a structure that may be deleted.
+*/
+
+void THD::set_current_linfo(LOG_INFO *linfo)
+{
+ mysql_mutex_lock(&LOCK_thd_data);
+ current_linfo= linfo;
+ mysql_mutex_unlock(&LOCK_thd_data);
+}
+
+
/*
Adjust the position pointer in the binary log file for all running slaves
@@ -543,61 +560,48 @@ static enum enum_binlog_checksum_alg get_binlog_checksum_value_at_connect(THD *
Now they sync is done for next read.
*/
-void adjust_linfo_offsets(my_off_t purge_offset)
+static my_bool adjust_callback(THD *thd, my_off_t *purge_offset)
{
- THD *tmp;
-
- mysql_mutex_lock(&LOCK_thread_count);
- I_List_iterator<THD> it(threads);
-
- while ((tmp=it++))
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ if (auto linfo= thd->current_linfo)
{
- LOG_INFO* linfo;
- if ((linfo = tmp->current_linfo))
- {
- mysql_mutex_lock(&linfo->lock);
- /*
- Index file offset can be less that purge offset only if
- we just started reading the index file. In that case
- we have nothing to adjust
- */
- if (linfo->index_file_offset < purge_offset)
- linfo->fatal = (linfo->index_file_offset != 0);
- else
- linfo->index_file_offset -= purge_offset;
- mysql_mutex_unlock(&linfo->lock);
- }
+ /*
+ Index file offset can be less that purge offset only if
+ we just started reading the index file. In that case
+ we have nothing to adjust
+ */
+ if (linfo->index_file_offset < *purge_offset)
+ linfo->fatal= (linfo->index_file_offset != 0);
+ else
+ linfo->index_file_offset-= *purge_offset;
}
- mysql_mutex_unlock(&LOCK_thread_count);
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ return 0;
}
-bool log_in_use(const char* log_name)
+void adjust_linfo_offsets(my_off_t purge_offset)
{
- size_t log_name_len = strlen(log_name) + 1;
- THD *tmp;
- bool result = 0;
-
- mysql_mutex_lock(&LOCK_thread_count);
- I_List_iterator<THD> it(threads);
+ server_threads.iterate(adjust_callback, &purge_offset);
+}
- while ((tmp=it++))
- {
- LOG_INFO* linfo;
- if ((linfo = tmp->current_linfo))
- {
- mysql_mutex_lock(&linfo->lock);
- result = !strncmp(log_name, linfo->log_file_name, log_name_len);
- mysql_mutex_unlock(&linfo->lock);
- if (result)
- break;
- }
- }
- mysql_mutex_unlock(&LOCK_thread_count);
+static my_bool log_in_use_callback(THD *thd, const char *log_name)
+{
+ my_bool result= 0;
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ if (auto linfo= thd->current_linfo)
+ result= !strcmp(log_name, linfo->log_file_name);
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
return result;
}
+
+bool log_in_use(const char* log_name)
+{
+ return server_threads.iterate(log_in_use_callback, log_name);
+}
+
bool purge_error_message(THD* thd, int res)
{
uint errcode;
@@ -901,44 +905,88 @@ static int send_heartbeat_event(binlog_send_info *info,
struct binlog_file_entry
{
binlog_file_entry *next;
- char *name;
+ LEX_CSTRING name;
+ my_off_t size;
};
+/**
+ Read all binary logs and return as a list
+
+ @param memroot Use this for mem_root calls
+ @param reverse If set filenames returned in latest first order (reverse
+ order than in the index file)
+ @param already_locked If set, index file is already locked.
+
+ @return 0 error
+ # pointer to list
+
+ @notes
+ index_file is always unlocked at return
+*/
+
static binlog_file_entry *
-get_binlog_list(MEM_ROOT *memroot)
+get_binlog_list(MEM_ROOT *memroot, bool reverse= true,
+ bool already_locked= false)
{
IO_CACHE *index_file;
- char fname[FN_REFLEN];
- size_t length;
- binlog_file_entry *current_list= NULL, *e;
+ char *fname, *buff, *end_pos;
+ binlog_file_entry *current_list= NULL, *current_link= NULL, *e;
DBUG_ENTER("get_binlog_list");
if (!mysql_bin_log.is_open())
{
+ if (already_locked)
+ mysql_bin_log.unlock_index();
my_error(ER_NO_BINARY_LOGGING, MYF(0));
DBUG_RETURN(NULL);
}
-
- mysql_bin_log.lock_index();
+ if (!already_locked)
+ mysql_bin_log.lock_index();
index_file=mysql_bin_log.get_index_file();
reinit_io_cache(index_file, READ_CACHE, (my_off_t) 0, 0, 0);
+ if (!(buff= (char*) alloc_root(memroot,
+ (size_t) (index_file->end_of_file+1))))
+ goto err;
+ if (my_b_read(index_file, (uchar*) buff, (size_t) index_file->end_of_file))
+ {
+ my_error(EE_READ, MYF(ME_ERROR_LOG), my_filename(index_file->file),
+ my_errno);
+ goto err;
+ }
+ buff[index_file->end_of_file]= 0; // For strchr
+ mysql_bin_log.unlock_index();
+
/* The file ends with EOF or empty line */
- while ((length=my_b_gets(index_file, fname, sizeof(fname))) > 1)
+ for (fname= buff;
+ (end_pos= strchr(fname, '\n')) && (end_pos - fname) > 1;
+ fname= end_pos+1)
{
- --length; /* Remove the newline */
- if (!(e= (binlog_file_entry *)alloc_root(memroot, sizeof(*e))) ||
- !(e->name= strmake_root(memroot, fname, length)))
- {
- mysql_bin_log.unlock_index();
+ end_pos[0]= '\0'; // remove the newline
+ if (!(e= (binlog_file_entry *) alloc_root(memroot, sizeof(*e))))
DBUG_RETURN(NULL);
+ if (reverse)
+ {
+ e->next= current_list;
+ current_list= e;
}
- e->next= current_list;
- current_list= e;
+ else
+ {
+ e->next= NULL;
+ if (!current_link)
+ current_list= e;
+ else
+ current_link->next= e;
+ current_link= e;
+ }
+ e->name.str= fname;
+ e->name.length= (size_t) (end_pos - fname);
}
- mysql_bin_log.unlock_index();
-
DBUG_RETURN(current_list);
+
+err:
+ mysql_bin_log.unlock_index();
+ DBUG_RETURN(0);
}
@@ -1263,8 +1311,7 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name,
char buf[FN_REFLEN];
init_alloc_root(&memroot, "gtid_find_binlog_file",
- 10*(FN_REFLEN+sizeof(binlog_file_entry)),
- 0, MYF(MY_THREAD_SPECIFIC));
+ 8192, 0, MYF(MY_THREAD_SPECIFIC));
if (!(list= get_binlog_list(&memroot)))
{
errormsg= "Out of memory while looking for GTID position in binlog";
@@ -1290,7 +1337,7 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name,
Read the Gtid_list_log_event at the start of the binlog file to
get the binlog state.
*/
- if (normalize_binlog_name(buf, list->name, false))
+ if (normalize_binlog_name(buf, list->name.str, false))
{
errormsg= "Failed to determine binlog file name while looking for "
"GTID position in binlog";
@@ -2181,9 +2228,8 @@ static int init_binlog_sender(binlog_send_info *info,
// set current pos too
linfo->pos= *pos;
-
// note: publish that we use file, before we open it
- thd->current_linfo= linfo;
+ thd->set_current_linfo(linfo);
if (check_start_offset(info, linfo->log_file_name, *pos))
return 1;
@@ -2435,14 +2481,15 @@ static int send_format_descriptor_event(binlog_send_info *info, IO_CACHE *log,
DBUG_RETURN(0);
}
-static bool should_stop(binlog_send_info *info)
+static bool should_stop(binlog_send_info *info, bool kill_server_check= false)
{
return
- info->net->error ||
- info->net->vio == NULL ||
- info->thd->killed ||
- info->error != 0 ||
- info->should_stop;
+ info->net->error ||
+ info->net->vio == NULL ||
+ (info->thd->killed &&
+ (info->thd->killed != KILL_SERVER || kill_server_check)) ||
+ info->error != 0 ||
+ info->should_stop;
}
/**
@@ -2463,7 +2510,7 @@ static int wait_new_events(binlog_send_info *info, /* in */
&stage_master_has_sent_all_binlog_to_slave,
&old_stage);
- while (!should_stop(info))
+ while (!should_stop(info, true))
{
*end_pos_ptr= mysql_bin_log.get_binlog_end_pos(binlog_end_pos_filename);
if (strcmp(linfo->log_file_name, binlog_end_pos_filename) != 0)
@@ -2818,6 +2865,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
info->error= ER_UNKNOWN_ERROR;
goto err;
}
+ DBUG_EXECUTE_IF("simulate_delay_at_shutdown",
+ {
+ const char act[]=
+ "now "
+ "WAIT_FOR greetings_from_kill_mysql";
+ DBUG_ASSERT(!debug_sync_set_action(thd,
+ STRING_WITH_LEN(act)));
+ };);
/*
heartbeat_period from @master_heartbeat_period user variable
@@ -3429,31 +3484,42 @@ err:
slave_server_id the slave's server id
*/
-void kill_zombie_dump_threads(uint32 slave_server_id)
+struct kill_callback_arg
{
- mysql_mutex_lock(&LOCK_thread_count);
- I_List_iterator<THD> it(threads);
- THD *tmp;
+ kill_callback_arg(uint32 id): slave_server_id(id), thd(0) {}
+ uint32 slave_server_id;
+ THD *thd;
+};
- while ((tmp=it++))
+static my_bool kill_callback(THD *thd, kill_callback_arg *arg)
+{
+ if (thd->get_command() == COM_BINLOG_DUMP &&
+ thd->variables.server_id == arg->slave_server_id)
{
- if (tmp->get_command() == COM_BINLOG_DUMP &&
- tmp->variables.server_id == slave_server_id)
- {
- mysql_mutex_lock(&tmp->LOCK_thd_kill); // Lock from delete
- break;
- }
+ arg->thd= thd;
+ mysql_mutex_lock(&thd->LOCK_thd_kill); // Lock from delete
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ return 1;
}
- mysql_mutex_unlock(&LOCK_thread_count);
- if (tmp)
+ return 0;
+}
+
+
+void kill_zombie_dump_threads(uint32 slave_server_id)
+{
+ kill_callback_arg arg(slave_server_id);
+ server_threads.iterate(kill_callback, &arg);
+
+ if (arg.thd)
{
/*
Here we do not call kill_one_thread() as
it will be slow because it will iterate through the list
again. We just to do kill the thread ourselves.
*/
- tmp->awake_no_mutex(KILL_SLAVE_SAME_ID);
- mysql_mutex_unlock(&tmp->LOCK_thd_kill);
+ arg.thd->awake_no_mutex(KILL_SLAVE_SAME_ID);
+ mysql_mutex_unlock(&arg.thd->LOCK_thd_kill);
+ mysql_mutex_unlock(&arg.thd->LOCK_thd_data);
}
}
@@ -3911,11 +3977,21 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len,
if (!mysql_bin_log.is_open())
{
my_message(ER_FLUSH_MASTER_BINLOG_CLOSED,
- ER_THD(thd, ER_FLUSH_MASTER_BINLOG_CLOSED),
- MYF(ME_BELL+ME_WAITTANG));
+ ER_THD(thd, ER_FLUSH_MASTER_BINLOG_CLOSED), MYF(0));
return 1;
}
+#ifdef WITH_WSREP
+ if (WSREP(thd))
+ {
+ /* RESET MASTER will initialize GTID sequence, and that would happen locally
+ in this node, so better reject it
+ */
+ my_message(ER_NOT_ALLOWED_COMMAND,
+ "RESET MASTER not allowed when node is in cluster", MYF(0));
+ return 1;
+ }
+#endif /* WITH_WSREP */
bool ret= 0;
/* Temporarily disable master semisync before resetting master. */
repl_semisync_master.before_reset_master();
@@ -4023,7 +4099,7 @@ bool mysql_show_binlog_events(THD* thd)
goto err;
}
- thd->current_linfo= &linfo;
+ thd->set_current_linfo(&linfo);
if ((file=open_binlog(&log, linfo.log_file_name, &errmsg)) < 0)
goto err;
@@ -4289,17 +4365,26 @@ void show_binlogs_get_fields(THD *thd, List<Item> *field_list)
@retval FALSE success
@retval TRUE failure
+
+ @notes
+ We only keep the index locked while reading all file names as
+ if there are 1000+ binary logs, there can be a serious impact
+ as getting the file sizes can take some notable time (up to 20 seconds
+ has been reported) and we don't want to block log rotations for that long.
*/
+
+#define BINLOG_INDEX_RETRY_COUNT 5
+
bool show_binlogs(THD* thd)
{
- IO_CACHE *index_file;
LOG_INFO cur;
- File file;
- char fname[FN_REFLEN];
+ MEM_ROOT mem_root;
+ binlog_file_entry *list;
List<Item> field_list;
- size_t length;
- size_t cur_dir_len;
Protocol *protocol= thd->protocol;
+ uint retry_count= 0;
+ size_t cur_dir_len;
+ uint64 expected_reset_masters;
DBUG_ENTER("show_binlogs");
if (!mysql_bin_log.is_open())
@@ -4313,55 +4398,82 @@ bool show_binlogs(THD* thd)
if (protocol->send_result_set_metadata(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(TRUE);
-
+
+ init_alloc_root(&mem_root, "binlog_file_list", 8192, 0,
+ MYF(MY_THREAD_SPECIFIC));
+retry:
+ /*
+ The current mutex handling here is to ensure we get the current log position
+ and all the log files from the index in sync without any index rotation
+ in between.
+ */
mysql_mutex_lock(mysql_bin_log.get_log_lock());
mysql_bin_log.lock_index();
- index_file=mysql_bin_log.get_index_file();
+ mysql_bin_log.raw_get_current_log(&cur);
+ expected_reset_masters= mysql_bin_log.get_reset_master_count();
+ mysql_mutex_unlock(mysql_bin_log.get_log_lock());
- mysql_bin_log.raw_get_current_log(&cur); // dont take mutex
- mysql_mutex_unlock(mysql_bin_log.get_log_lock()); // lockdep, OK
-
- cur_dir_len= dirname_length(cur.log_file_name);
+ /* The following call unlocks lock_index */
+ if ((!(list= get_binlog_list(&mem_root, false, true))))
+ goto err;
- reinit_io_cache(index_file, READ_CACHE, (my_off_t) 0, 0, 0);
+ DEBUG_SYNC(thd, "at_after_lock_index");
- /* The file ends with EOF or empty line */
- while ((length=my_b_gets(index_file, fname, sizeof(fname))) > 1)
+ // the 1st loop computes the sizes; If stat() fails, then retry
+ cur_dir_len= dirname_length(cur.log_file_name);
+ for (binlog_file_entry *cur_link= list; cur_link; cur_link= cur_link->next)
{
- size_t dir_len;
- ulonglong file_length= 0; // Length if open fails
- fname[--length] = '\0'; // remove the newline
+ const char *fname= cur_link->name.str;
+ size_t dir_len= dirname_length(fname);
+ size_t length= cur_link->name.length- dir_len;
- protocol->prepare_for_resend();
- dir_len= dirname_length(fname);
- length-= dir_len;
- protocol->store(fname + dir_len, length, &my_charset_bin);
+ /* Skip directory name as we shouldn't include this in the result */
+ cur_link->name.str+= dir_len;
+ cur_link->name.length-= dir_len;
+
+ if (mysql_bin_log.get_reset_master_count() > expected_reset_masters)
+ {
+ /*
+ Reset master was called after we cached filenames.
+ Reinitialize the cache.
+ */
+ free_root(&mem_root, MYF(MY_MARK_BLOCKS_FREE));
+ goto retry;
+ }
if (!(strncmp(fname+dir_len, cur.log_file_name+cur_dir_len, length)))
- file_length= cur.pos; /* The active log, use the active position */
+ cur_link->size= cur.pos; /* The active log, use the active position */
else
{
- /* this is an old log, open it and find the size */
- if ((file= mysql_file_open(key_file_binlog,
- fname, O_RDONLY | O_SHARE | O_BINARY,
- MYF(0))) >= 0)
+ MY_STAT stat_info;
+ if (mysql_file_stat(key_file_binlog, fname, &stat_info, MYF(0)))
+ cur_link->size= stat_info.st_size;
+ else
{
- file_length= (ulonglong) mysql_file_seek(file, 0L, MY_SEEK_END, MYF(0));
- mysql_file_close(file, MYF(0));
+ if (retry_count++ < BINLOG_INDEX_RETRY_COUNT)
+ {
+ free_root(&mem_root, MYF(MY_MARK_BLOCKS_FREE));
+ goto retry;
+ }
+ cur_link->size= 0;
}
}
- protocol->store(file_length);
+ }
+
+ for (binlog_file_entry *cur_link= list; cur_link; cur_link= cur_link->next)
+ {
+ protocol->prepare_for_resend();
+ protocol->store(cur_link->name.str, cur_link->name.length, &my_charset_bin);
+ protocol->store((ulonglong) cur_link->size);
if (protocol->write())
goto err;
}
- if (unlikely(index_file->error == -1))
- goto err;
- mysql_bin_log.unlock_index();
+ free_root(&mem_root, MYF(0));
my_eof(thd);
DBUG_RETURN(FALSE);
err:
- mysql_bin_log.unlock_index();
+ free_root(&mem_root, MYF(0));
DBUG_RETURN(TRUE);
}
diff --git a/sql/sql_repl.h b/sql/sql_repl.h
index 9129aaeed5e..95916e31abf 100644
--- a/sql/sql_repl.h
+++ b/sql/sql_repl.h
@@ -21,17 +21,6 @@
#ifdef HAVE_REPLICATION
#include "slave.h"
-typedef struct st_slave_info
-{
- uint32 server_id;
- uint32 rpl_recovery_rank, master_id;
- char host[HOSTNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN+1];
- char user[USERNAME_LENGTH+1];
- char password[MAX_PASSWORD_LENGTH*SYSTEM_CHARSET_MBMAXLEN+1];
- uint16 port;
- THD* thd;
-} SLAVE_INFO;
-
struct slave_connection_state;
extern my_bool opt_show_slave_auth_info;
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 70c0a80ba2a..a91b4571b21 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -64,6 +64,10 @@
#include "sys_vars_shared.h"
#include "sp_head.h"
#include "sp_rcontext.h"
+#include "rowid_filter.h"
+#include "select_handler.h"
+#include "my_json_writer.h"
+#include "opt_trace.h"
/*
A key part number that means we're using a fulltext scan.
@@ -100,6 +104,9 @@ static int sort_keyuse(KEYUSE *a,KEYUSE *b);
static bool are_tables_local(JOIN_TAB *jtab, table_map used_tables);
static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
bool allow_full_scan, table_map used_tables);
+static ha_rows get_quick_record_count(THD *thd, SQL_SELECT *select,
+ TABLE *table,
+ const key_map *keys,ha_rows limit);
static void optimize_straight_join(JOIN *join, table_map join_tables);
static bool greedy_search(JOIN *join, table_map remaining_tables,
uint depth, uint prune_level,
@@ -147,7 +154,8 @@ static COND *build_equal_items(JOIN *join, COND *cond,
static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
COND *cond,
COND_EQUAL *cond_equal,
- void *table_join_idx);
+ void *table_join_idx,
+ bool do_substitution);
static COND *simplify_joins(JOIN *join, List<TABLE_LIST> *join_list,
COND *conds, bool top, bool in_sj);
static bool check_interleaving_with_nj(JOIN_TAB *next);
@@ -342,7 +350,63 @@ bool dbug_user_var_equals_int(THD *thd, const char *name, int value)
}
return FALSE;
}
-#endif
+#endif /* DBUG_OFF */
+
+/*
+ Intialize POSITION structure.
+*/
+
+POSITION::POSITION()
+{
+ table= 0;
+ records_read= cond_selectivity= read_time= 0.0;
+ prefix_record_count= 0.0;
+ key= 0;
+ use_join_buffer= 0;
+ sj_strategy= SJ_OPT_NONE;
+ n_sj_tables= 0;
+ spl_plan= 0;
+ range_rowid_filter_info= 0;
+ ref_depend_map= dups_producing_tables= 0;
+ inner_tables_handled_with_other_sjs= 0;
+ dups_weedout_picker.set_empty();
+ firstmatch_picker.set_empty();
+ loosescan_picker.set_empty();
+ sjmat_picker.set_empty();
+}
+
+
+static void trace_table_dependencies(THD *thd,
+ JOIN_TAB *join_tabs, uint table_count)
+{
+ DBUG_ASSERT(thd->trace_started());
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_array trace_dep(thd, "table_dependencies");
+
+ for (uint i= 0; i < table_count; i++)
+ {
+ TABLE_LIST *table_ref= join_tabs[i].tab_list;
+ Json_writer_object trace_one_table(thd);
+ trace_one_table.add_table_name(&join_tabs[i]);
+ trace_one_table.add("row_may_be_null",
+ (bool)table_ref->table->maybe_null);
+ const table_map map= table_ref->get_map();
+ DBUG_ASSERT(map < (1ULL << table_count));
+ for (uint j= 0; j < table_count; j++)
+ {
+ if (map & (1ULL << j))
+ {
+ trace_one_table.add("map_bit", j);
+ break;
+ }
+ }
+ Json_writer_array depends_on(thd, "depends_on_map_bits");
+ Table_map_iterator it(join_tabs[i].dependent);
+ uint dep_bit;
+ while ((dep_bit= it++) != Table_map_iterator::BITMAP_END)
+ depends_on.add(static_cast<longlong>(dep_bit));
+ }
+}
/**
@@ -353,7 +417,7 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
ulong setup_tables_done_option)
{
bool res;
- SELECT_LEX *select_lex = &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
DBUG_ENTER("handle_select");
MYSQL_SELECT_START(thd->query());
@@ -711,12 +775,10 @@ bool vers_select_conds_t::init_from_sysvar(THD *thd)
if (type != SYSTEM_TIME_UNSPECIFIED && type != SYSTEM_TIME_ALL)
{
DBUG_ASSERT(type == SYSTEM_TIME_AS_OF);
- MYSQL_TIME ltime;
- thd->variables.time_zone->gmt_sec_to_TIME(&ltime, in.unix_time);
- ltime.second_part = in.second_part;
+ Datetime dt(in.unix_time, in.second_part, thd->variables.time_zone);
start.item= new (thd->mem_root)
- Item_datetime_literal(thd, &ltime, TIME_SECOND_PART_DIGITS);
+ Item_datetime_literal(thd, &dt, TIME_SECOND_PART_DIGITS);
if (!start.item)
return true;
}
@@ -743,8 +805,10 @@ void vers_select_conds_t::print(String *str, enum_query_type query_type) const
end.print(str, query_type, STRING_WITH_LEN(" AND "));
break;
case SYSTEM_TIME_BEFORE:
+ start.print(str, query_type, STRING_WITH_LEN(" FOR SYSTEM_TIME BEFORE "));
+ break;
case SYSTEM_TIME_HISTORY:
- DBUG_ASSERT(0);
+ // nothing to add
break;
case SYSTEM_TIME_ALL:
str->append(" FOR SYSTEM_TIME ALL");
@@ -753,6 +817,130 @@ void vers_select_conds_t::print(String *str, enum_query_type query_type) const
}
static
+Item* period_get_condition(THD *thd, TABLE_LIST *table, SELECT_LEX *select,
+ vers_select_conds_t *conds, bool timestamp)
+{
+ DBUG_ASSERT(table);
+ DBUG_ASSERT(table->table);
+#define newx new (thd->mem_root)
+ TABLE_SHARE *share= table->table->s;
+ const TABLE_SHARE::period_info_t *period= conds->period;
+
+ const LEX_CSTRING &fstart= period->start_field(share)->field_name;
+ const LEX_CSTRING &fend= period->end_field(share)->field_name;
+
+ conds->field_start= newx Item_field(thd, &select->context,
+ table->db.str, table->alias.str,
+ thd->make_clex_string(fstart));
+ conds->field_end= newx Item_field(thd, &select->context,
+ table->db.str, table->alias.str,
+ thd->make_clex_string(fend));
+
+ Item *cond1= NULL, *cond2= NULL, *cond3= NULL, *curr= NULL;
+ if (timestamp)
+ {
+ MYSQL_TIME max_time;
+ switch (conds->type)
+ {
+ case SYSTEM_TIME_UNSPECIFIED:
+ case SYSTEM_TIME_HISTORY:
+ {
+ thd->variables.time_zone->gmt_sec_to_TIME(&max_time, TIMESTAMP_MAX_VALUE);
+ max_time.second_part= TIME_MAX_SECOND_PART;
+ Datetime dt(&max_time);
+ curr= newx Item_datetime_literal(thd, &dt, TIME_SECOND_PART_DIGITS);
+ if (conds->type == SYSTEM_TIME_UNSPECIFIED)
+ cond1= newx Item_func_eq(thd, conds->field_end, curr);
+ else
+ cond1= newx Item_func_lt(thd, conds->field_end, curr);
+ break;
+ }
+ case SYSTEM_TIME_AS_OF:
+ cond1= newx Item_func_le(thd, conds->field_start, conds->start.item);
+ cond2= newx Item_func_gt(thd, conds->field_end, conds->start.item);
+ break;
+ case SYSTEM_TIME_FROM_TO:
+ cond1= newx Item_func_lt(thd, conds->field_start, conds->end.item);
+ cond2= newx Item_func_gt(thd, conds->field_end, conds->start.item);
+ cond3= newx Item_func_lt(thd, conds->start.item, conds->end.item);
+ break;
+ case SYSTEM_TIME_BETWEEN:
+ cond1= newx Item_func_le(thd, conds->field_start, conds->end.item);
+ cond2= newx Item_func_gt(thd, conds->field_end, conds->start.item);
+ cond3= newx Item_func_le(thd, conds->start.item, conds->end.item);
+ break;
+ case SYSTEM_TIME_BEFORE:
+ cond1= newx Item_func_history(thd, conds->field_end);
+ cond2= newx Item_func_lt(thd, conds->field_end, conds->start.item);
+ break;
+ default:
+ DBUG_ASSERT(0);
+ }
+ }
+ else
+ {
+ DBUG_ASSERT(table->table->s && table->table->s->db_plugin);
+
+ Item *trx_id0= conds->start.item;
+ Item *trx_id1= conds->end.item;
+ if (conds->start.item && conds->start.unit == VERS_TIMESTAMP)
+ {
+ bool backwards= conds->type != SYSTEM_TIME_AS_OF;
+ trx_id0= newx Item_func_trt_id(thd, conds->start.item,
+ TR_table::FLD_TRX_ID, backwards);
+ }
+ if (conds->end.item && conds->end.unit == VERS_TIMESTAMP)
+ {
+ trx_id1= newx Item_func_trt_id(thd, conds->end.item,
+ TR_table::FLD_TRX_ID, false);
+ }
+
+ switch (conds->type)
+ {
+ case SYSTEM_TIME_UNSPECIFIED:
+ case SYSTEM_TIME_HISTORY:
+ curr= newx Item_int(thd, ULONGLONG_MAX);
+ if (conds->type == SYSTEM_TIME_UNSPECIFIED)
+ cond1= newx Item_func_eq(thd, conds->field_end, curr);
+ else
+ cond1= newx Item_func_lt(thd, conds->field_end, curr);
+ break;
+ DBUG_ASSERT(!conds->start.item);
+ DBUG_ASSERT(!conds->end.item);
+ break;
+ case SYSTEM_TIME_AS_OF:
+ cond1= newx Item_func_trt_trx_sees_eq(thd, trx_id0, conds->field_start);
+ cond2= newx Item_func_trt_trx_sees(thd, conds->field_end, trx_id0);
+ DBUG_ASSERT(!conds->end.item);
+ break;
+ case SYSTEM_TIME_FROM_TO:
+ cond1= newx Item_func_trt_trx_sees(thd, trx_id1, conds->field_start);
+ cond2= newx Item_func_trt_trx_sees_eq(thd, conds->field_end, trx_id0);
+ cond3= newx Item_func_lt(thd, conds->start.item, conds->end.item);
+ break;
+ case SYSTEM_TIME_BETWEEN:
+ cond1= newx Item_func_trt_trx_sees_eq(thd, trx_id1, conds->field_start);
+ cond2= newx Item_func_trt_trx_sees_eq(thd, conds->field_end, trx_id0);
+ cond3= newx Item_func_le(thd, conds->start.item, conds->end.item);
+ break;
+ case SYSTEM_TIME_BEFORE:
+ cond1= newx Item_func_history(thd, conds->field_end);
+ cond2= newx Item_func_trt_trx_sees(thd, trx_id0, conds->field_end);
+ break;
+ default:
+ DBUG_ASSERT(0);
+ }
+ }
+
+ if (cond1)
+ {
+ cond1= and_items(thd, cond2, cond1);
+ cond1= and_items(thd, cond3, cond1);
+ }
+ return cond1;
+}
+
+static
bool skip_setup_conds(THD *thd)
{
return (!thd->stmt_arena->is_conventional()
@@ -760,17 +948,54 @@ bool skip_setup_conds(THD *thd)
|| thd->lex->is_view_context_analysis();
}
-int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
+int SELECT_LEX::period_setup_conds(THD *thd, TABLE_LIST *tables)
{
- DBUG_ENTER("SELECT_LEX::vers_setup_cond");
-#define newx new (thd->mem_root)
+ DBUG_ENTER("SELECT_LEX::period_setup_conds");
+ const bool update_conds= !skip_setup_conds(thd);
+
+ Query_arena backup;
+ Query_arena *arena= thd->activate_stmt_arena_if_needed(&backup);
+
+ DBUG_ASSERT(!tables->next_local && tables->table);
+
+ Item *result= NULL;
+ for (TABLE_LIST *table= tables; table; table= table->next_local)
+ {
+ if (!table->table)
+ continue;
+ vers_select_conds_t &conds= table->period_conditions;
+ if (!table->table->s->period.name.streq(conds.name))
+ {
+ my_error(ER_PERIOD_NOT_FOUND, MYF(0), conds.name.str);
+ if (arena)
+ thd->restore_active_arena(arena, &backup);
+ DBUG_RETURN(-1);
+ }
+
+ if (update_conds)
+ {
+ conds.period= &table->table->s->period;
+ result= and_items(thd, result,
+ period_get_condition(thd, table, this, &conds, true));
+ }
+ }
+ if (update_conds)
+ where= and_items(thd, where, result);
+
+ if (arena)
+ thd->restore_active_arena(arena, &backup);
+ DBUG_RETURN(0);
+}
+
+int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
+{
+ DBUG_ENTER("SELECT_LEX::vers_setup_conds");
const bool update_conds= !skip_setup_conds(thd);
- TABLE_LIST *table;
if (!versioned_tables)
{
- for (table= tables; table; table= table->next_local)
+ for (TABLE_LIST *table= tables; table; table= table->next_local)
{
if (table->table && table->table->versioned())
versioned_tables++;
@@ -827,7 +1052,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
break;
}
- for (table= tables; table; table= table->next_local)
+ for (TABLE_LIST *table= tables; table; table= table->next_local)
{
if (!table->table || table->is_view() || !table->table->versioned())
continue;
@@ -849,7 +1074,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
DBUG_RETURN(-1);
}
else if (!vers_conditions.is_set())
- vers_conditions.type= SYSTEM_TIME_ALL;
+ vers_conditions.set_all();
}
#endif
@@ -881,16 +1106,6 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
continue;
}
- const LEX_CSTRING *fstart=
- thd->make_clex_string(table->table->vers_start_field()->field_name);
- const LEX_CSTRING *fend=
- thd->make_clex_string(table->table->vers_end_field()->field_name);
-
- Item *row_start=
- newx Item_field(thd, &this->context, table->db.str, table->alias.str, fstart);
- Item *row_end=
- newx Item_field(thd, &this->context, table->db.str, table->alias.str, fend);
-
bool timestamps_only= table->table->versioned(VERS_TIMESTAMP);
if (vers_conditions.is_set() && vers_conditions.type != SYSTEM_TIME_HISTORY)
@@ -910,126 +1125,30 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
}
}
- if (!update_conds)
- continue;
-
- Item *cond1= NULL, *cond2= NULL, *cond3= NULL, *curr= NULL;
- Item *point_in_time1= vers_conditions.start.item;
- Item *point_in_time2= vers_conditions.end.item;
- TABLE *t= table->table;
- if (t->versioned(VERS_TIMESTAMP))
- {
- MYSQL_TIME max_time;
- switch (vers_conditions.type)
- {
- case SYSTEM_TIME_UNSPECIFIED:
- case SYSTEM_TIME_HISTORY:
- thd->variables.time_zone->gmt_sec_to_TIME(&max_time, TIMESTAMP_MAX_VALUE);
- max_time.second_part= TIME_MAX_SECOND_PART;
- curr= newx Item_datetime_literal(thd, &max_time, TIME_SECOND_PART_DIGITS);
- if (vers_conditions.type == SYSTEM_TIME_UNSPECIFIED)
- cond1= newx Item_func_eq(thd, row_end, curr);
- else
- cond1= newx Item_func_lt(thd, row_end, curr);
- break;
- case SYSTEM_TIME_AS_OF:
- cond1= newx Item_func_le(thd, row_start, point_in_time1);
- cond2= newx Item_func_gt(thd, row_end, point_in_time1);
- break;
- case SYSTEM_TIME_FROM_TO:
- cond1= newx Item_func_lt(thd, row_start, point_in_time2);
- cond2= newx Item_func_gt(thd, row_end, point_in_time1);
- cond3= newx Item_func_lt(thd, point_in_time1, point_in_time2);
- break;
- case SYSTEM_TIME_BETWEEN:
- cond1= newx Item_func_le(thd, row_start, point_in_time2);
- cond2= newx Item_func_gt(thd, row_end, point_in_time1);
- cond3= newx Item_func_le(thd, point_in_time1, point_in_time2);
- break;
- case SYSTEM_TIME_BEFORE:
- cond1= newx Item_func_history(thd, row_end);
- cond2= newx Item_func_lt(thd, row_end, point_in_time1);
- break;
- default:
- DBUG_ASSERT(0);
- }
- }
- else
+ if (update_conds)
{
- DBUG_ASSERT(table->table->s && table->table->s->db_plugin);
-
- Item *trx_id0, *trx_id1;
-
- switch (vers_conditions.type)
- {
- case SYSTEM_TIME_UNSPECIFIED:
- case SYSTEM_TIME_HISTORY:
- curr= newx Item_int(thd, ULONGLONG_MAX);
- if (vers_conditions.type == SYSTEM_TIME_UNSPECIFIED)
- cond1= newx Item_func_eq(thd, row_end, curr);
- else
- cond1= newx Item_func_lt(thd, row_end, curr);
- break;
- case SYSTEM_TIME_AS_OF:
- trx_id0= vers_conditions.start.unit == VERS_TIMESTAMP
- ? newx Item_func_trt_id(thd, point_in_time1, TR_table::FLD_TRX_ID)
- : point_in_time1;
- cond1= newx Item_func_trt_trx_sees_eq(thd, trx_id0, row_start);
- cond2= newx Item_func_trt_trx_sees(thd, row_end, trx_id0);
- break;
- case SYSTEM_TIME_FROM_TO:
- cond3= newx Item_func_lt(thd, point_in_time1, point_in_time2);
- /* fall through */
- case SYSTEM_TIME_BETWEEN:
- trx_id0= vers_conditions.start.unit == VERS_TIMESTAMP
- ? newx Item_func_trt_id(thd, point_in_time1, TR_table::FLD_TRX_ID, true)
- : point_in_time1;
- trx_id1= vers_conditions.end.unit == VERS_TIMESTAMP
- ? newx Item_func_trt_id(thd, point_in_time2, TR_table::FLD_TRX_ID, false)
- : point_in_time2;
- cond1= vers_conditions.type == SYSTEM_TIME_FROM_TO
- ? newx Item_func_trt_trx_sees(thd, trx_id1, row_start)
- : newx Item_func_trt_trx_sees_eq(thd, trx_id1, row_start);
- cond2= newx Item_func_trt_trx_sees_eq(thd, row_end, trx_id0);
- if (!cond3)
- cond3= newx Item_func_le(thd, point_in_time1, point_in_time2);
- break;
- case SYSTEM_TIME_BEFORE:
- trx_id0= vers_conditions.start.unit == VERS_TIMESTAMP
- ? newx Item_func_trt_id(thd, point_in_time1, TR_table::FLD_TRX_ID, true)
- : point_in_time1;
- cond1= newx Item_func_history(thd, row_end);
- cond2= newx Item_func_trt_trx_sees(thd, trx_id0, row_end);
- break;
- default:
- DBUG_ASSERT(0);
- }
- }
-
- if (cond1)
- {
- cond1= and_items(thd, cond2, cond1);
- cond1= and_items(thd, cond3, cond1);
+ vers_conditions.period = &table->table->s->vers;
+ Item *cond= period_get_condition(thd, table, this, &vers_conditions,
+ timestamps_only);
if (is_select)
- table->on_expr= and_items(thd, table->on_expr, cond1);
+ table->on_expr= and_items(thd, table->on_expr, cond);
else
{
if (join)
{
- where= and_items(thd, join->conds, cond1);
+ where= and_items(thd, join->conds, cond);
join->conds= where;
}
else
- where= and_items(thd, where, cond1);
- table->where= and_items(thd, table->where, cond1);
+ where= and_items(thd, where, cond);
+ table->where= and_items(thd, table->where, cond);
}
- }
- table->vers_conditions.type= SYSTEM_TIME_ALL;
+ table->vers_conditions.set_all();
+ }
} // for (table= tables; ...)
DBUG_RETURN(0);
-#undef newx
}
/*****************************************************************************
@@ -1071,10 +1190,17 @@ JOIN::prepare(TABLE_LIST *tables_init,
proc_param= proc_param_init;
tables_list= tables_init;
select_lex= select_lex_arg;
+ DBUG_PRINT("info", ("select %p (%u) = JOIN %p",
+ select_lex, select_lex->select_number, this));
select_lex->join= this;
join_list= &select_lex->top_join_list;
union_part= unit_arg->is_unit_op();
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_object trace_prepare(thd, "join_preparation");
+ trace_prepare.add_select_number(select_lex->select_number);
+ Json_writer_array trace_steps(thd, "steps");
+
// simple check that we got usable conds
dbug_print_item(conds);
@@ -1116,7 +1242,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
while ((select_el= select_it++))
{
- if (select_el->with_sum_func)
+ if (select_el->with_sum_func())
found_sum_func_elem= true;
if (select_el->with_field)
found_field_elem= true;
@@ -1301,7 +1427,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
item->max_length)))
real_order= TRUE;
- if ((item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM) ||
+ if ((item->with_sum_func() && item->type() != Item::SUM_FUNC_ITEM) ||
item->with_window_func)
item->split_sum_func(thd, ref_ptrs, all_fields, SPLIT_SUM_SELECT);
}
@@ -1309,7 +1435,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
order= NULL;
}
- if (having && having->with_sum_func)
+ if (having && having->with_sum_func())
having->split_sum_func2(thd, ref_ptrs, all_fields,
&having, SPLIT_SUM_SKIP_REGISTERED);
if (select_lex->inner_sum_func_list)
@@ -1419,6 +1545,12 @@ JOIN::prepare(TABLE_LIST *tables_init,
}
}
+ if (thd->trace_started())
+ {
+ Json_writer_object trace_wrapper(thd);
+ opt_trace_print_expanded_query(thd, select_lex, &trace_wrapper);
+ }
+
if (!procedure && result && result->prepare(fields_list, unit_arg))
goto err; /* purecov: inspected */
@@ -1479,6 +1611,7 @@ err:
bool JOIN::build_explain()
{
+ DBUG_ENTER("JOIN::build_explain");
have_query_plan= QEP_AVAILABLE;
/*
@@ -1495,8 +1628,7 @@ bool JOIN::build_explain()
thd->mem_root= old_mem_root;
DBUG_ASSERT(thd->free_list == old_free_list); // no Items were created
if (res)
- return 1;
-
+ DBUG_RETURN(1);
uint select_nr= select_lex->select_number;
JOIN_TAB *curr_tab= join_tab + exec_join_tab_cnt();
for (uint i= 0; i < aggr_tables; i++, curr_tab++)
@@ -1508,13 +1640,14 @@ bool JOIN::build_explain()
curr_tab->tracker= thd->lex->explain->get_union(select_nr)->
get_tmptable_read_tracker();
}
- else
+ else if (select_nr < INT_MAX)
{
- curr_tab->tracker= thd->lex->explain->get_select(select_nr)->
- get_using_temporary_read_tracker();
+ Explain_select *tmp= thd->lex->explain->get_select(select_nr);
+ if (tmp)
+ curr_tab->tracker= tmp->get_using_temporary_read_tracker();
}
}
- return 0;
+ DBUG_RETURN(0);
}
@@ -1523,7 +1656,16 @@ int JOIN::optimize()
int res= 0;
create_explain_query_if_not_exists(thd->lex, thd->mem_root);
join_optimization_state init_state= optimization_state;
- if (optimization_state == JOIN::OPTIMIZATION_PHASE_1_DONE)
+ if (select_lex->pushdown_select)
+ {
+ if (!(select_options & SELECT_DESCRIBE))
+ {
+ /* Prepare to execute the query pushed into a foreign engine */
+ res= select_lex->pushdown_select->init();
+ }
+ with_two_phase_optimization= false;
+ }
+ else if (optimization_state == JOIN::OPTIMIZATION_PHASE_1_DONE)
res= optimize_stage2();
else
{
@@ -1544,6 +1686,139 @@ int JOIN::optimize()
}
+/**
+ @brief
+ Create range filters objects needed in execution for all join tables
+
+ @details
+ For each join table from the chosen execution plan such that a range filter
+ is used when joining this table the function creates a Rowid_filter object
+ for this range filter. In order to do this the function first constructs
+ a quick select to scan the range for this range filter. Then it creates
+ a container for the range filter and finally constructs a Range_rowid_filter
+ object a pointer to which is set in the field JOIN_TAB::rowid_filter of
+ the joined table.
+
+ @retval false always
+*/
+
+bool JOIN::make_range_rowid_filters()
+{
+ DBUG_ENTER("make_range_rowid_filters");
+
+ /*
+ Do not build range filters with detected impossible WHERE.
+ Anyway conditions cannot be used anymore to extract ranges for filters.
+ */
+ if (const_table_map != found_const_table_map)
+ DBUG_RETURN(0);
+
+ JOIN_TAB *tab;
+
+ for (tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITHOUT_CONST_TABLES);
+ tab;
+ tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS))
+ {
+ if (!tab->range_rowid_filter_info)
+ continue;
+
+ DBUG_ASSERT(!(tab->ref.key >= 0 &&
+ tab->ref.key == (int) tab->range_rowid_filter_info->key_no));
+ DBUG_ASSERT(!(tab->ref.key == -1 && tab->quick &&
+ tab->quick->index == tab->range_rowid_filter_info->key_no));
+
+ int err;
+ SQL_SELECT *sel= NULL;
+ Rowid_filter_container *filter_container= NULL;
+ Item **sargable_cond= get_sargable_cond(this, tab->table);
+ sel= make_select(tab->table, const_table_map, const_table_map,
+ *sargable_cond, (SORT_INFO*) 0, 1, &err);
+ if (!sel)
+ continue;
+
+ key_map filter_map;
+ filter_map.clear_all();
+ filter_map.set_bit(tab->range_rowid_filter_info->key_no);
+ filter_map.merge(tab->table->with_impossible_ranges);
+ bool force_index_save= tab->table->force_index;
+ tab->table->force_index= true;
+ int rc= sel->test_quick_select(thd, filter_map, (table_map) 0,
+ (ha_rows) HA_POS_ERROR,
+ true, false, true, true);
+ tab->table->force_index= force_index_save;
+ if (thd->is_error())
+ goto no_filter;
+ /*
+ If SUBS_IN_TO_EXISTS strtrategy is chosen for the subquery then
+ additional conditions are injected into WHERE/ON/HAVING and it may
+ happen that the call of test_quick_select() discovers impossible range.
+ */
+ if (rc == -1)
+ {
+ const_table_map|= tab->table->map;
+ goto no_filter;
+ }
+ DBUG_ASSERT(sel->quick);
+ filter_container=
+ tab->range_rowid_filter_info->create_container();
+ if (filter_container)
+ {
+ tab->rowid_filter=
+ new (thd->mem_root) Range_rowid_filter(tab->table,
+ tab->range_rowid_filter_info,
+ filter_container, sel);
+ if (tab->rowid_filter)
+ continue;
+ }
+ no_filter:
+ if (sel->quick)
+ delete sel->quick;
+ delete sel;
+ }
+
+ DBUG_RETURN(0);
+}
+
+
+/**
+ @brief
+ Allocate memory the rowid containers of the used the range filters
+
+ @details
+ For each join table from the chosen execution plan such that a range filter
+ is used when joining this table the function allocate memory for the
+ rowid container employed by the filter. On success it lets the table engine
+ know that what rowid filter will be used when accessing the table rows.
+
+ @retval false always
+*/
+
+bool
+JOIN::init_range_rowid_filters()
+{
+ DBUG_ENTER("init_range_rowid_filters");
+
+ JOIN_TAB *tab;
+
+ for (tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITHOUT_CONST_TABLES);
+ tab;
+ tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS))
+ {
+ if (!tab->rowid_filter)
+ continue;
+ if (tab->rowid_filter->get_container()->alloc())
+ {
+ delete tab->rowid_filter;
+ tab->rowid_filter= 0;
+ continue;
+ }
+ tab->table->file->rowid_filter_push(tab->rowid_filter);
+ tab->is_rowid_filter_built= false;
+ }
+ DBUG_RETURN(0);
+}
+
+
int JOIN::init_join_caches()
{
JOIN_TAB *tab;
@@ -1603,6 +1878,11 @@ JOIN::optimize_inner()
set_allowed_join_cache_types();
need_distinct= TRUE;
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_object trace_prepare(thd, "join_optimization");
+ trace_prepare.add_select_number(select_lex->select_number);
+ Json_writer_array trace_steps(thd, "steps");
+
/*
Needed in case optimizer short-cuts,
set properly in make_aggr_tables_info()
@@ -1683,7 +1963,7 @@ JOIN::optimize_inner()
{
/*
Item_cond_and can't be fixed after creation, so we do not check
- conds->fixed
+ conds->is_fixed()
*/
conds->fix_fields(thd, &conds);
conds->change_ref_to_fields(thd, tables_list);
@@ -1729,7 +2009,7 @@ JOIN::optimize_inner()
if (arena)
thd->restore_active_arena(arena, &backup);
}
-
+
if (optimize_constant_subqueries())
DBUG_RETURN(1);
@@ -1740,9 +2020,28 @@ JOIN::optimize_inner()
(void) having->walk(&Item::cleanup_is_expensive_cache_processor,
0, (void *) 0);
- if (setup_jtbm_semi_joins(this, join_list, &conds))
+ List<Item> eq_list;
+
+ if (setup_degenerate_jtbm_semi_joins(this, join_list, eq_list))
DBUG_RETURN(1);
+ if (eq_list.elements != 0)
+ {
+ Item *new_cond;
+
+ if (eq_list.elements == 1)
+ new_cond= eq_list.pop();
+ else
+ new_cond= new (thd->mem_root) Item_cond_and(thd, eq_list);
+
+ if (new_cond &&
+ ((new_cond->fix_fields(thd, &new_cond) ||
+ !(conds= and_items(thd, conds, new_cond)) ||
+ conds->fix_fields(thd, &conds))))
+ DBUG_RETURN(TRUE);
+ }
+ eq_list.empty();
+
if (select_lex->cond_pushed_into_where)
{
conds= and_conds(thd, conds, select_lex->cond_pushed_into_where);
@@ -1762,7 +2061,7 @@ JOIN::optimize_inner()
select_lex->having_fix_field_for_pushed_cond= 0;
}
}
-
+
bool ignore_on_expr= false;
/*
PS/SP note: on_expr of versioned table can not be reallocated
@@ -1778,7 +2077,7 @@ JOIN::optimize_inner()
}
conds= optimize_cond(this, conds, join_list, ignore_on_expr,
&cond_value, &cond_equal, OPT_LINK_EQUAL_FIELDS);
-
+
if (thd->is_error())
{
error= 1;
@@ -1786,6 +2085,58 @@ JOIN::optimize_inner()
DBUG_RETURN(1);
}
+ having= optimize_cond(this, having, join_list, TRUE,
+ &having_value, &having_equal);
+
+ if (thd->is_error())
+ {
+ error= 1;
+ DBUG_PRINT("error",("Error from optimize_cond"));
+ DBUG_RETURN(1);
+ }
+
+ /* Do not push into WHERE from HAVING if cond_value == Item::COND_FALSE */
+
+ if (thd->lex->sql_command == SQLCOM_SELECT &&
+ optimizer_flag(thd, OPTIMIZER_SWITCH_COND_PUSHDOWN_FROM_HAVING) &&
+ cond_value != Item::COND_FALSE)
+ {
+ having=
+ select_lex->pushdown_from_having_into_where(thd, having);
+ if (select_lex->attach_to_conds.elements != 0)
+ {
+ conds= and_new_conditions_to_optimized_cond(thd, conds, &cond_equal,
+ select_lex->attach_to_conds,
+ &cond_value);
+ sel->attach_to_conds.empty();
+ }
+ }
+
+ if (optimizer_flag(thd, OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_SUBQUERY))
+ {
+ TABLE_LIST *tbl;
+ List_iterator_fast<TABLE_LIST> li(select_lex->leaf_tables);
+ while ((tbl= li++))
+ if (tbl->jtbm_subselect)
+ {
+ if (tbl->jtbm_subselect->pushdown_cond_for_in_subquery(thd, conds))
+ DBUG_RETURN(1);
+ }
+ }
+
+ if (setup_jtbm_semi_joins(this, join_list, eq_list))
+ DBUG_RETURN(1);
+
+ if (eq_list.elements != 0)
+ {
+ conds= and_new_conditions_to_optimized_cond(thd, conds, &cond_equal,
+ eq_list, &cond_value);
+
+ if (!conds &&
+ cond_value != Item::COND_FALSE && cond_value != Item::COND_TRUE)
+ DBUG_RETURN(TRUE);
+ }
+
if (optimizer_flag(thd, OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED))
{
TABLE_LIST *tbl;
@@ -1823,32 +2174,22 @@ JOIN::optimize_inner()
if (select_lex->handle_derived(thd->lex, DT_OPTIMIZE))
DBUG_RETURN(1);
}
-
{
- having= optimize_cond(this, having, join_list, TRUE,
- &having_value, &having_equal);
-
- if (unlikely(thd->is_error()))
- {
- error= 1;
- DBUG_PRINT("error",("Error from optimize_cond"));
- DBUG_RETURN(1);
- }
if (select_lex->where)
{
select_lex->cond_value= cond_value;
if (sel->where != conds && cond_value == Item::COND_OK)
thd->change_item_tree(&sel->where, conds);
- }
+ }
if (select_lex->having)
{
select_lex->having_value= having_value;
if (sel->having != having && having_value == Item::COND_OK)
- thd->change_item_tree(&sel->having, having);
+ thd->change_item_tree(&sel->having, having);
}
- if (cond_value == Item::COND_FALSE || having_value == Item::COND_FALSE ||
+ if (cond_value == Item::COND_FALSE || having_value == Item::COND_FALSE ||
(!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS)))
- { /* Impossible cond */
+ { /* Impossible cond */
if (unit->select_limit_cnt)
{
DBUG_PRINT("info", (having_value == Item::COND_FALSE ?
@@ -2039,6 +2380,9 @@ int JOIN::optimize_stage2()
if (get_best_combination())
DBUG_RETURN(1);
+ if (make_range_rowid_filters())
+ DBUG_RETURN(1);
+
if (select_lex->handle_derived(thd->lex, DT_OPTIMIZE))
DBUG_RETURN(1);
@@ -2096,7 +2440,7 @@ int JOIN::optimize_stage2()
if (!conds && outer_join)
{
/* Handle the case where we have an OUTER JOIN without a WHERE */
- conds= new (thd->mem_root) Item_int(thd, (longlong) 1,1); // Always true
+ conds= new (thd->mem_root) Item_bool(thd, true); // Always true
}
if (impossible_where)
@@ -2132,7 +2476,7 @@ int JOIN::optimize_stage2()
if (conds)
{
conds= substitute_for_best_equal_field(thd, NO_PARTICULAR_TAB, conds,
- cond_equal, map2table);
+ cond_equal, map2table, true);
if (unlikely(thd->is_error()))
{
error= 1;
@@ -2145,6 +2489,23 @@ int JOIN::optimize_stage2()
"after substitute_best_equal",
QT_ORDINARY););
}
+ if (having)
+ {
+ having= substitute_for_best_equal_field(thd, NO_PARTICULAR_TAB, having,
+ having_equal, map2table, false);
+ if (thd->is_error())
+ {
+ error= 1;
+ DBUG_PRINT("error",("Error from substitute_for_best_equal"));
+ DBUG_RETURN(1);
+ }
+ if (having)
+ having->update_used_tables();
+ DBUG_EXECUTE("having",
+ print_where(having,
+ "after substitute_best_equal",
+ QT_ORDINARY););
+ }
/*
Perform the optimization on fields evaluation mentioned above
@@ -2158,7 +2519,7 @@ int JOIN::optimize_stage2()
*tab->on_expr_ref= substitute_for_best_equal_field(thd, NO_PARTICULAR_TAB,
*tab->on_expr_ref,
tab->cond_equal,
- map2table);
+ map2table, true);
if (unlikely(thd->is_error()))
{
error= 1;
@@ -2188,7 +2549,7 @@ int JOIN::optimize_stage2()
while (equals)
{
ref_item= substitute_for_best_equal_field(thd, tab, ref_item,
- equals, map2table);
+ equals, map2table, true);
if (unlikely(thd->is_fatal_error))
DBUG_RETURN(1);
@@ -2236,7 +2597,7 @@ int JOIN::optimize_stage2()
if (conds && const_table_map != found_const_table_map &&
(select_options & SELECT_DESCRIBE))
{
- conds=new (thd->mem_root) Item_int(thd, (longlong) 0, 1); // Always false
+ conds=new (thd->mem_root) Item_bool(thd, false); // Always false
}
/* Cache constant expressions in WHERE, HAVING, ON clauses. */
@@ -2529,13 +2890,13 @@ int JOIN::optimize_stage2()
elements may be lost during further having
condition transformation in JOIN::exec.
*/
- if (having && const_table_map && !having->with_sum_func)
+ if (having && const_table_map && !having->with_sum_func())
{
having->update_used_tables();
having= having->remove_eq_conds(thd, &select_lex->having_value, true);
if (select_lex->having_value == Item::COND_FALSE)
{
- having= new (thd->mem_root) Item_int(thd, (longlong) 0,1);
+ having= new (thd->mem_root) Item_bool(thd, false);
zero_result_cause= "Impossible HAVING noticed after reading const tables";
error= 0;
select_lex->mark_const_derived(zero_result_cause);
@@ -2573,7 +2934,7 @@ int JOIN::optimize_stage2()
{
JOIN_TAB *tab= &join_tab[const_tables];
- if (order)
+ if (order && !need_tmp)
{
/*
Force using of tmp table if sorting by a SP or UDF function due to
@@ -2715,6 +3076,9 @@ int JOIN::optimize_stage2()
if (init_join_caches())
DBUG_RETURN(1);
+ if (init_range_rowid_filters())
+ DBUG_RETURN(1);
+
error= 0;
if (select_options & SELECT_DESCRIBE)
@@ -2939,9 +3303,17 @@ bool JOIN::make_aggr_tables_info()
if (ht && ht->create_group_by)
{
- /* Check if the storage engine can intercept the query */
- Query query= {&all_fields, select_distinct, tables_list, conds,
- group_list, order ? order : group_list, having};
+ /*
+ Check if the storage engine can intercept the query.
+
+ JOIN::optimize_stage2() might convert DISTINCT into GROUP BY and then
+ optimize away GROUP BY (group_list). In such a case, we need to notify
+ a storage engine supporting a group by handler of the existence of the
+ original DISTINCT. Thus, we set select_distinct || group_optimized_away
+ to Query::distinct.
+ */
+ Query query= {&all_fields, select_distinct || group_optimized_away, tables_list,
+ conds, group_list, order ? order : group_list, having};
group_by_handler *gbh= ht->create_group_by(thd, &query);
if (gbh)
@@ -3291,7 +3663,7 @@ bool JOIN::make_aggr_tables_info()
or end_write_group()) if JOIN::group is set to false.
*/
// the temporary table was explicitly requested
- DBUG_ASSERT(MY_TEST(select_options & OPTION_BUFFER_RESULT));
+ DBUG_ASSERT(select_options & OPTION_BUFFER_RESULT);
// the temporary table does not have a grouping expression
DBUG_ASSERT(!curr_tab->table->group);
}
@@ -3896,6 +4268,15 @@ bool JOIN::save_explain_data(Explain_query *output, bool can_overwrite,
bool need_tmp_table, bool need_order,
bool distinct)
{
+ DBUG_ENTER("JOIN::save_explain_data");
+ DBUG_PRINT("enter", ("Save explain Select_lex: %u (%p) parent lex: %p stmt_lex: %p present select: %u (%p)",
+ select_lex->select_number, select_lex,
+ select_lex->parent_lex, thd->lex->stmt_lex,
+ (output->get_select(select_lex->select_number) ?
+ select_lex->select_number : 0),
+ (output->get_select(select_lex->select_number) ?
+ output->get_select(select_lex->select_number)
+ ->select_lex : NULL)));
/*
If there is SELECT in this statement with the same number it must be the
same SELECT
@@ -3922,8 +4303,9 @@ bool JOIN::save_explain_data(Explain_query *output, bool can_overwrite,
/* It's a degenerate join */
message= zero_result_cause ? zero_result_cause : "No tables used";
}
- return save_explain_data_intern(thd->lex->explain, need_tmp_table, need_order,
- distinct, message);
+ bool rc= save_explain_data_intern(thd->lex->explain, need_tmp_table,
+ need_order, distinct, message);
+ DBUG_RETURN(rc);
}
/*
@@ -3945,11 +4327,11 @@ bool JOIN::save_explain_data(Explain_query *output, bool can_overwrite,
{
if (!(join_tab[i].filesort->tracker=
new Filesort_tracker(thd->lex->analyze_stmt)))
- return 1;
+ DBUG_RETURN(1);
}
}
}
- return 0;
+ DBUG_RETURN(0);
}
@@ -3991,6 +4373,12 @@ void JOIN::exec_inner()
limit in order to produce the partial query result stored in the
UNION temp table.
*/
+
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_object trace_exec(thd, "join_execution");
+ trace_exec.add_select_number(select_lex->select_number);
+ Json_writer_array trace_steps(thd, "steps");
+
if (!select_lex->outer_select() && // (1)
select_lex != select_lex->master_unit()->fake_select_lex) // (2)
thd->lex->set_limit_rows_examined();
@@ -4016,7 +4404,6 @@ void JOIN::exec_inner()
if (select_options & SELECT_DESCRIBE)
select_describe(this, FALSE, FALSE, FALSE,
(zero_result_cause?zero_result_cause:"No tables used"));
-
else
{
if (result->send_result_set_metadata(*columns_list,
@@ -4115,7 +4502,8 @@ void JOIN::exec_inner()
not the case.
*/
if (exec_const_order_group_cond.elements &&
- !(select_options & SELECT_DESCRIBE))
+ !(select_options & SELECT_DESCRIBE) &&
+ !select_lex->pushdown_select)
{
List_iterator_fast<Item> const_item_it(exec_const_order_group_cond);
Item *cur_const_item;
@@ -4142,6 +4530,12 @@ void JOIN::exec_inner()
!table_count ? "No tables used" : NullS);
DBUG_VOID_RETURN;
}
+ else if (select_lex->pushdown_select)
+ {
+ /* Execute the query pushed into a foreign engine */
+ error= select_lex->pushdown_select->execute();
+ DBUG_VOID_RETURN;
+ }
else
{
/* it's a const select, materialize it. */
@@ -4189,6 +4583,9 @@ int
JOIN::destroy()
{
DBUG_ENTER("JOIN::destroy");
+
+ DBUG_PRINT("info", ("select %p (%u) <> JOIN %p",
+ select_lex, select_lex->select_number, this));
select_lex->join= 0;
cond_equal= 0;
@@ -4307,10 +4704,10 @@ mysql_select(THD *thd,
is it single SELECT in derived table, called in derived table
creation
*/
- if (select_lex->linkage != DERIVED_TABLE_TYPE ||
+ if (select_lex->get_linkage() != DERIVED_TABLE_TYPE ||
(select_options & SELECT_DESCRIBE))
{
- if (select_lex->linkage != GLOBAL_OPTIONS_TYPE)
+ if (select_lex->get_linkage() != GLOBAL_OPTIONS_TYPE)
{
/*
Original join tabs might be overwritten at first
@@ -4357,6 +4754,21 @@ mysql_select(THD *thd,
}
}
+ /* Look for a table owned by an engine with the select_handler interface */
+ select_lex->select_h= select_lex->find_select_handler(thd);
+ if (select_lex->select_h)
+ {
+ /* Create a Pushdown_select object for later execution of the query */
+ if (!(select_lex->pushdown_select=
+ new (thd->mem_root) Pushdown_select(select_lex,
+ select_lex->select_h)))
+ {
+ delete select_lex->select_h;
+ select_lex->select_h= NULL;
+ DBUG_RETURN(TRUE);
+ }
+ }
+
if ((err= join->optimize()))
{
goto err; // 1
@@ -4380,6 +4792,13 @@ mysql_select(THD *thd,
}
err:
+
+ if (select_lex->pushdown_select)
+ {
+ delete select_lex->pushdown_select;
+ select_lex->pushdown_select= NULL;
+ }
+
if (free_join)
{
THD_STAGE_INFO(thd, stage_end);
@@ -4412,7 +4831,8 @@ static ha_rows get_quick_record_count(THD *thd, SQL_SELECT *select,
select->test_quick_select(thd, *(key_map *)keys,
(table_map) 0,
limit, 0, FALSE,
- TRUE /* remove_where_parts*/)) ==
+ TRUE, /* remove_where_parts*/
+ FALSE)) ==
1))
DBUG_RETURN(select->quick->records);
if (unlikely(error == -1))
@@ -4545,6 +4965,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
SARGABLE_PARAM *sargables= 0;
List_iterator<TABLE_LIST> ti(tables_list);
TABLE_LIST *tables;
+ THD *thd= join->thd;
DBUG_ENTER("make_join_statistics");
table_count=join->table_count;
@@ -4567,6 +4988,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
/* The following should be optimized to only clear critical things */
bzero((void*)stat, sizeof(JOIN_TAB)* table_count);
+
/* Initialize POSITION objects */
for (i=0 ; i <= table_count ; i++)
(void) new ((char*) (join->positions + i)) POSITION;
@@ -4581,10 +5003,6 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
{
TABLE_LIST *embedding= tables->embedding;
stat_vector[i]=s;
- s->keys.init();
- s->const_keys.init();
- s->checked_keys.init();
- s->needed_reg.init();
table_vector[i]=s->table=table=tables->table;
s->tab_list= tables;
table->pos_in_table_list= tables;
@@ -4740,9 +5158,12 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
}
}
+ if (thd->trace_started())
+ trace_table_dependencies(thd, stat, join->table_count);
+
if (join->conds || outer_join)
{
- if (update_ref_and_keys(join->thd, keyuse_array, stat, join->table_count,
+ if (update_ref_and_keys(thd, keyuse_array, stat, join->table_count,
join->conds, ~outer_join, join->select_lex, &sargables))
goto error;
/*
@@ -4754,10 +5175,12 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
((Item_in_subselect*)join->unit->item)->test_strategy(SUBS_IN_TO_EXISTS));
if (keyuse_array->elements &&
- sort_and_filter_keyuse(join->thd, keyuse_array,
+ sort_and_filter_keyuse(thd, keyuse_array,
skip_unprefixed_keyparts))
goto error;
DBUG_EXECUTE("opt", print_keyuse_array(keyuse_array););
+ if (thd->trace_started())
+ print_keyuse_array_for_trace(thd, keyuse_array);
}
join->const_table_map= no_rows_const_tables;
@@ -4999,7 +5422,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
if (join->cond_value == Item::COND_FALSE)
{
join->impossible_where= true;
- conds= new (join->thd->mem_root) Item_int(join->thd, (longlong) 0, 1);
+ conds= new (join->thd->mem_root) Item_bool(join->thd, false);
}
join->cond_equal= NULL;
@@ -5036,150 +5459,177 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
/* Calc how many (possible) matched records in each table */
- for (s=stat ; s < stat_end ; s++)
+ /*
+ Todo: add a function so that we can add these Json_writer_objects
+ easily.
+ Another way would be to enclose them in a scope {};
+ */
{
- s->startup_cost= 0;
- if (s->type == JT_SYSTEM || s->type == JT_CONST)
- {
- /* Only one matching row */
- s->found_records= s->records= 1;
- s->read_time=1.0;
- s->worst_seeks=1.0;
- continue;
- }
- /* Approximate found rows and time to read them */
- if (s->table->is_filled_at_execution())
- {
- get_delayed_table_estimates(s->table, &s->records, &s->read_time,
- &s->startup_cost);
- s->found_records= s->records;
- table->quick_condition_rows=s->records;
- }
- else
- {
- s->scan_time();
- }
+ Json_writer_object rows_estimation_wrapper(thd);
+ Json_writer_array rows_estimation(thd, "rows_estimation");
- if (s->table->is_splittable())
- s->add_keyuses_for_splitting();
+ for (s=stat ; s < stat_end ; s++)
+ {
+ s->startup_cost= 0;
+ if (s->type == JT_SYSTEM || s->type == JT_CONST)
+ {
- /*
- Set a max range of how many seeks we can expect when using keys
- This is can't be to high as otherwise we are likely to use
- table scan.
- */
- s->worst_seeks= MY_MIN((double) s->found_records / 10,
- (double) s->read_time*3);
- if (s->worst_seeks < 2.0) // Fix for small tables
- s->worst_seeks=2.0;
+ Json_writer_object table_records(thd);
+ /* Only one matching row */
+ s->found_records= s->records= 1;
+ s->read_time=1.0;
+ s->worst_seeks=1.0;
+ table_records.add_table_name(s)
+ .add("rows", s->found_records)
+ .add("cost", s->read_time)
+ .add("table_type", s->type == JT_CONST ?
+ "const" :
+ "system");
+ continue;
+ }
+ /* Approximate found rows and time to read them */
+ if (s->table->is_filled_at_execution())
+ {
+ get_delayed_table_estimates(s->table, &s->records, &s->read_time,
+ &s->startup_cost);
+ s->found_records= s->records;
+ table->quick_condition_rows=s->records;
+ }
+ else
+ s->scan_time();
- /*
- Add to stat->const_keys those indexes for which all group fields or
- all select distinct fields participate in one index.
- */
- add_group_and_distinct_keys(join, s);
+ if (s->table->is_splittable())
+ s->add_keyuses_for_splitting();
- s->table->cond_selectivity= 1.0;
-
- /*
- Perform range analysis if there are keys it could use (1).
- Don't do range analysis for materialized subqueries (2).
- Don't do range analysis for materialized derived tables (3)
- */
- if ((!s->const_keys.is_clear_all() ||
- !bitmap_is_clear_all(&s->table->cond_set)) && // (1)
- !s->table->is_filled_at_execution() && // (2)
- !(s->table->pos_in_table_list->derived && // (3)
- s->table->pos_in_table_list->is_materialized_derived())) // (3)
- {
- bool impossible_range= FALSE;
- ha_rows records= HA_POS_ERROR;
- SQL_SELECT *select= 0;
- Item **sargable_cond= NULL;
- if (!s->const_keys.is_clear_all())
- {
- sargable_cond= get_sargable_cond(join, s->table);
- bool is_sargable_cond_of_where= sargable_cond == &join->conds;
-
- select= make_select(s->table, found_const_table_map,
- found_const_table_map,
- *sargable_cond,
- (SORT_INFO*) 0,
- 1, &error);
- if (!select)
- goto error;
- records= get_quick_record_count(join->thd, select, s->table,
- &s->const_keys, join->row_limit);
+ /*
+ Set a max range of how many seeks we can expect when using keys
+ This is can't be to high as otherwise we are likely to use
+ table scan.
+ */
+ s->worst_seeks= MY_MIN((double) s->found_records / 10,
+ (double) s->read_time*3);
+ if (s->worst_seeks < 2.0) // Fix for small tables
+ s->worst_seeks=2.0;
- /*
- Range analyzer might have modified the condition. Put it the new
- condition to where we got it from.
- */
- *sargable_cond= select->cond;
+ /*
+ Add to stat->const_keys those indexes for which all group fields or
+ all select distinct fields participate in one index.
+ */
+ add_group_and_distinct_keys(join, s);
- if (is_sargable_cond_of_where &&
- join->conds && join->conds->type() == Item::COND_ITEM &&
- ((Item_cond*) (join->conds))->functype() ==
- Item_func::COND_AND_FUNC)
- join->cond_equal= &((Item_cond_and*) (join->conds))->m_cond_equal;
+ s->table->cond_selectivity= 1.0;
- s->quick=select->quick;
- s->needed_reg=select->needed_reg;
- select->quick=0;
- impossible_range= records == 0 && s->table->reginfo.impossible_range;
- }
- if (!impossible_range)
- {
- if (!sargable_cond)
+ /*
+ Perform range analysis if there are keys it could use (1).
+ Don't do range analysis for materialized subqueries (2).
+ Don't do range analysis for materialized derived tables (3)
+ */
+ if ((!s->const_keys.is_clear_all() ||
+ !bitmap_is_clear_all(&s->table->cond_set)) && // (1)
+ !s->table->is_filled_at_execution() && // (2)
+ !(s->table->pos_in_table_list->derived && // (3)
+ s->table->pos_in_table_list->is_materialized_derived())) // (3)
+ {
+ bool impossible_range= FALSE;
+ ha_rows records= HA_POS_ERROR;
+ SQL_SELECT *select= 0;
+ Item **sargable_cond= NULL;
+ if (!s->const_keys.is_clear_all())
+ {
sargable_cond= get_sargable_cond(join, s->table);
- if (join->thd->variables.optimizer_use_condition_selectivity > 1)
- calculate_cond_selectivity_for_table(join->thd, s->table,
- sargable_cond);
- if (s->table->reginfo.impossible_range)
- {
- impossible_range= TRUE;
- records= 0;
+ bool is_sargable_cond_of_where= sargable_cond == &join->conds;
+
+ select= make_select(s->table, found_const_table_map,
+ found_const_table_map,
+ *sargable_cond,
+ (SORT_INFO*) 0, 1, &error);
+ if (!select)
+ goto error;
+ records= get_quick_record_count(join->thd, select, s->table,
+ &s->const_keys, join->row_limit);
+
+ /*
+ Range analyzer might have modified the condition. Put it the new
+ condition to where we got it from.
+ */
+ *sargable_cond= select->cond;
+
+ if (is_sargable_cond_of_where &&
+ join->conds && join->conds->type() == Item::COND_ITEM &&
+ ((Item_cond*) (join->conds))->functype() ==
+ Item_func::COND_AND_FUNC)
+ join->cond_equal= &((Item_cond_and*) (join->conds))->m_cond_equal;
+
+ s->quick=select->quick;
+ s->needed_reg=select->needed_reg;
+ select->quick=0;
+ impossible_range= records == 0 && s->table->reginfo.impossible_range;
+ if (join->thd->lex->sql_command == SQLCOM_SELECT &&
+ optimizer_flag(join->thd, OPTIMIZER_SWITCH_USE_ROWID_FILTER))
+ s->table->init_cost_info_for_usable_range_rowid_filters(join->thd);
}
- }
- if (impossible_range)
- {
- /*
- Impossible WHERE or ON expression
- In case of ON, we mark that the we match one empty NULL row.
- In case of WHERE, don't set found_const_table_map to get the
- caller to abort with a zero row result.
- */
- TABLE_LIST *emb= s->table->pos_in_table_list->embedding;
- if (emb && !emb->sj_on_expr)
+ if (!impossible_range)
{
- /* Mark all tables in a multi-table join nest as const */
- mark_join_nest_as_const(join, emb, &found_const_table_map,
- &const_count);
+ if (!sargable_cond)
+ sargable_cond= get_sargable_cond(join, s->table);
+ if (join->thd->variables.optimizer_use_condition_selectivity > 1)
+ calculate_cond_selectivity_for_table(join->thd, s->table,
+ sargable_cond);
+ if (s->table->reginfo.impossible_range)
+ {
+ impossible_range= TRUE;
+ records= 0;
+ }
}
- else
+ if (impossible_range)
{
- join->const_table_map|= s->table->map;
- set_position(join,const_count++,s,(KEYUSE*) 0);
- s->type= JT_CONST;
- s->table->const_table= 1;
- if (*s->on_expr_ref)
+ /*
+ Impossible WHERE or ON expression
+ In case of ON, we mark that the we match one empty NULL row.
+ In case of WHERE, don't set found_const_table_map to get the
+ caller to abort with a zero row result.
+ */
+ TABLE_LIST *emb= s->table->pos_in_table_list->embedding;
+ if (emb && !emb->sj_on_expr)
{
- /* Generate empty row */
- s->info= ET_IMPOSSIBLE_ON_CONDITION;
- found_const_table_map|= s->table->map;
- mark_as_null_row(s->table); // All fields are NULL
+ /* Mark all tables in a multi-table join nest as const */
+ mark_join_nest_as_const(join, emb, &found_const_table_map,
+ &const_count);
}
+ else
+ {
+ join->const_table_map|= s->table->map;
+ set_position(join,const_count++,s,(KEYUSE*) 0);
+ s->type= JT_CONST;
+ s->table->const_table= 1;
+ if (*s->on_expr_ref)
+ {
+ /* Generate empty row */
+ s->info= ET_IMPOSSIBLE_ON_CONDITION;
+ found_const_table_map|= s->table->map;
+ mark_as_null_row(s->table); // All fields are NULL
+ }
+ }
+ }
+ if (records != HA_POS_ERROR)
+ {
+ s->found_records=records;
+ s->read_time= s->quick ? s->quick->read_time : 0.0;
+ }
+ if (select)
+ delete select;
+ else
+ {
+ if (thd->trace_started())
+ add_table_scan_values_to_trace(thd, s);
}
}
- if (records != HA_POS_ERROR)
+ else
{
- s->found_records=records;
- s->read_time= s->quick ? s->quick->read_time : 0.0;
+ if (thd->trace_started())
+ add_table_scan_values_to_trace(thd, s);
}
- if (select)
- delete select;
}
-
}
if (pull_out_semijoin_tables(join))
@@ -6638,7 +7088,6 @@ void optimize_keyuse(JOIN *join, DYNAMIC_ARRAY *keyuse_array)
}
}
-
/**
Check for the presence of AGGFN(DISTINCT a) queries that may be subject
to loose index scan.
@@ -6676,7 +7125,6 @@ is_indexed_agg_distinct(JOIN *join, List<Item_field> *out_args)
{
Item_sum **sum_item_ptr;
bool result= false;
- Field_map first_aggdistinct_fields;
if (join->table_count != 1 || /* reference more than 1 table */
join->select_distinct || /* or a DISTINCT */
@@ -6686,10 +7134,11 @@ is_indexed_agg_distinct(JOIN *join, List<Item_field> *out_args)
if (join->make_sum_func_list(join->all_fields, join->fields_list, true))
return false;
+ Bitmap<MAX_FIELDS> first_aggdistinct_fields;
+ bool first_aggdistinct_fields_initialized= false;
for (sum_item_ptr= join->sum_funcs; *sum_item_ptr; sum_item_ptr++)
{
Item_sum *sum_item= *sum_item_ptr;
- Field_map cur_aggdistinct_fields;
Item *expr;
/* aggregate is not AGGFN(DISTINCT) or more than 1 argument to it */
switch (sum_item->sum_func())
@@ -6712,6 +7161,8 @@ is_indexed_agg_distinct(JOIN *join, List<Item_field> *out_args)
We don't worry about duplicates as these will be sorted out later in
get_best_group_min_max
*/
+ Bitmap<MAX_FIELDS> cur_aggdistinct_fields;
+ cur_aggdistinct_fields.clear_all();
for (uint i= 0; i < sum_item->get_arg_count(); i++)
{
expr= sum_item->get_arg(i);
@@ -6730,8 +7181,11 @@ is_indexed_agg_distinct(JOIN *join, List<Item_field> *out_args)
If there are multiple aggregate functions, make sure that they all
refer to exactly the same set of columns.
*/
- if (first_aggdistinct_fields.is_clear_all())
- first_aggdistinct_fields.merge(cur_aggdistinct_fields);
+ if (!first_aggdistinct_fields_initialized)
+ {
+ first_aggdistinct_fields= cur_aggdistinct_fields;
+ first_aggdistinct_fields_initialized=true;
+ }
else if (first_aggdistinct_fields != cur_aggdistinct_fields)
return false;
}
@@ -6823,6 +7277,7 @@ void set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key)
// join->positions[idx].loosescan_key= MAX_KEY; /* Not a LooseScan */
join->positions[idx].sj_strategy= SJ_OPT_NONE;
join->positions[idx].use_join_buffer= FALSE;
+ join->positions[idx].range_rowid_filter_info= 0;
/* Move the const table as down as possible in best_ref */
JOIN_TAB **pos=join->best_ref+idx+1;
@@ -6943,18 +7398,25 @@ best_access_path(JOIN *join,
double best_time= DBL_MAX;
double records= DBL_MAX;
table_map best_ref_depends_map= 0;
+ Range_rowid_filter_cost_info *best_filter= 0;
double tmp;
ha_rows rec;
bool best_uses_jbuf= FALSE;
MY_BITMAP *eq_join_set= &s->table->eq_join_set;
KEYUSE *hj_start_key= 0;
SplM_plan_info *spl_plan= 0;
+ Range_rowid_filter_cost_info *filter= 0;
+ const char* cause= NULL;
+ enum join_type best_type= JT_UNKNOWN, type= JT_UNKNOWN;
disable_jbuf= disable_jbuf || idx == join->const_tables;
Loose_scan_opt loose_scan_opt;
DBUG_ENTER("best_access_path");
-
+
+ Json_writer_object trace_wrapper(thd, "best_access_path");
+ Json_writer_array trace_paths(thd, "considered_access_paths");
+
bitmap_clear_all(eq_join_set);
loose_scan_opt.init(join, s, remaining_tables);
@@ -6981,6 +7443,7 @@ best_access_path(JOIN *join,
key_part_map notnull_part=0; // key parts which won't have NULL in lookup tuple.
table_map found_ref= 0;
uint key= keyuse->key;
+ filter= 0;
bool ft_key= (keyuse->keypart == FT_KEYPART);
/* Bitmap of keyparts where the ref access is over 'keypart=const': */
key_part_map const_part= 0;
@@ -7072,8 +7535,9 @@ best_access_path(JOIN *join,
if (rec < MATCHING_ROWS_IN_OTHER_TABLE)
rec= MATCHING_ROWS_IN_OTHER_TABLE; // Fix for small tables
+ Json_writer_object trace_access_idx(thd);
/*
- ft-keys require special treatment
+ full text keys require special treatment
*/
if (ft_key)
{
@@ -7083,6 +7547,9 @@ best_access_path(JOIN *join,
*/
tmp= prev_record_reads(join_positions, idx, found_ref);
records= 1.0;
+ type= JT_FT;
+ trace_access_idx.add("access_type", join_type_str[type])
+ .add("full-text index", keyinfo->name);
}
else
{
@@ -7104,11 +7571,17 @@ best_access_path(JOIN *join,
(!(key_flags & HA_NULL_PART_KEY) || // (2)
all_key_parts == notnull_part)) // (3)
{
+ type= JT_EQ_REF;
+ trace_access_idx.add("access_type", join_type_str[type])
+ .add("index", keyinfo->name);
tmp = prev_record_reads(join_positions, idx, found_ref);
records=1.0;
}
else
{
+ type= JT_REF;
+ trace_access_idx.add("access_type", join_type_str[type])
+ .add("index", keyinfo->name);
if (!found_ref)
{ /* We found a const key */
/*
@@ -7129,11 +7602,16 @@ best_access_path(JOIN *join,
empty interval we wouldn't have got here).
*/
if (table->quick_keys.is_set(key))
+ {
records= (double) table->quick_rows[key];
+ trace_access_idx.add("used_range_estimates", true);
+ }
else
{
/* quick_range couldn't use key! */
records= (double) s->records/rec;
+ trace_access_idx.add("used_range_estimates", false)
+ .add("cause", "not available");
}
}
else
@@ -7165,7 +7643,23 @@ best_access_path(JOIN *join,
table->quick_n_ranges[key] == 1 &&
records > (double) table->quick_rows[key])
{
+
records= (double) table->quick_rows[key];
+ trace_access_idx.add("used_range_estimates", true);
+ }
+ else
+ {
+ if (table->quick_keys.is_set(key))
+ {
+ trace_access_idx.add("used_range_estimates",false)
+ .add("cause",
+ "not better than ref estimates");
+ }
+ else
+ {
+ trace_access_idx.add("used_range_estimates", false)
+ .add("cause", "not available");
+ }
}
}
/* Limit the number of matched rows */
@@ -7181,6 +7675,9 @@ best_access_path(JOIN *join,
}
else
{
+ type = ref_or_null_part ? JT_REF_OR_NULL : JT_REF;
+ trace_access_idx.add("access_type", join_type_str[type])
+ .add("index", keyinfo->name);
/*
Use as much key-parts as possible and a uniq key is better
than a not unique key
@@ -7235,6 +7732,7 @@ best_access_path(JOIN *join,
table->quick_n_ranges[key] == 1 + MY_TEST(ref_or_null_part)) //(C3)
{
tmp= records= (double) table->quick_rows[key];
+ trace_access_idx.add("used_range_estimates", true);
}
else
{
@@ -7260,7 +7758,19 @@ best_access_path(JOIN *join,
if (!found_ref && table->quick_keys.is_set(key) && // (1)
table->quick_key_parts[key] > max_key_part && // (2)
records < (double)table->quick_rows[key]) // (3)
+ {
+ trace_access_idx.add("used_range_estimates", true);
records= (double)table->quick_rows[key];
+ }
+ else
+ {
+ if (table->quick_keys.is_set(key) &&
+ table->quick_key_parts[key] < max_key_part)
+ {
+ trace_access_idx.add("chosen", false);
+ cause= "range uses more keyparts";
+ }
+ }
tmp= records;
}
@@ -7344,7 +7854,11 @@ best_access_path(JOIN *join,
tmp= COST_MULT(tmp, record_count);
}
else
- tmp= best_time; // Do nothing
+ {
+ if (!(found_part & 1))
+ cause= "no predicate for first keypart";
+ tmp= best_time; // Do nothing
+ }
}
tmp= COST_ADD(tmp, s->startup_cost);
@@ -7352,15 +7866,43 @@ best_access_path(JOIN *join,
found_ref);
} /* not ft_key */
+ if (records < DBL_MAX &&
+ (found_part & 1)) // start_key->key can be used for index access
+ {
+ double rows= record_count * records;
+ double access_cost_factor= MY_MIN(tmp / rows, 1.0);
+ filter=
+ table->best_range_rowid_filter_for_partial_join(start_key->key, rows,
+ access_cost_factor);
+ if (filter)
+ {
+ filter->get_cmp_gain(rows);
+ tmp-= filter->get_adjusted_gain(rows) - filter->get_cmp_gain(rows);
+ DBUG_ASSERT(tmp >= 0);
+ trace_access_idx.add("rowid_filter_key",
+ s->table->key_info[filter->key_no].name);
+ }
+ }
+ trace_access_idx.add("rows", records).add("cost", tmp);
+
if (tmp + 0.0001 < best_time - records/(double) TIME_FOR_COMPARE)
{
+ trace_access_idx.add("chosen", true);
best_time= COST_ADD(tmp, records/(double) TIME_FOR_COMPARE);
best= tmp;
best_records= records;
best_key= start_key;
best_max_key_part= max_key_part;
best_ref_depends_map= found_ref;
+ best_filter= filter;
+ best_type= type;
+ }
+ else
+ {
+ trace_access_idx.add("chosen", false)
+ .add("cause", cause ? cause : "cost");
}
+ cause= NULL;
} /* for each key */
records= best_records;
}
@@ -7382,6 +7924,7 @@ best_access_path(JOIN *join,
(!(s->table->map & join->outer_join) ||
join->allowed_outer_join_with_cache)) // (2)
{
+ Json_writer_object trace_access_hash(thd);
double join_sel= 0.1;
/* Estimate the cost of the hash join access to the table */
double rnd_records= matching_candidates_in_table(s, found_constraint,
@@ -7405,7 +7948,14 @@ best_access_path(JOIN *join,
best_key= hj_start_key;
best_ref_depends_map= 0;
best_uses_jbuf= TRUE;
- }
+ best_filter= 0;
+ best_type= JT_HASH;
+ trace_access_hash.add("type", "hash");
+ trace_access_hash.add("index", "hj-key");
+ trace_access_hash.add("cost", rnd_records);
+ trace_access_hash.add("cost", best);
+ trace_access_hash.add("chosen", true);
+ }
/*
Don't test table scan if it can't be better.
@@ -7441,6 +7991,7 @@ best_access_path(JOIN *join,
can be [considered to be] more expensive, which causes lookups not to
be used for cases with small datasets, which is annoying.
*/
+ Json_writer_object trace_access_scan(thd);
if ((records >= s->found_records || best > s->read_time) && // (1)
!(best_key && best_key->key == MAX_KEY) && // (2)
!(s->quick && best_key && s->quick->index == best_key->key && // (2)
@@ -7459,6 +8010,7 @@ best_access_path(JOIN *join,
Here we estimate its cost.
*/
+ filter= 0;
if (s->quick)
{
/*
@@ -7474,15 +8026,41 @@ best_access_path(JOIN *join,
tmp= COST_MULT(record_count,
COST_ADD(s->quick->read_time, cmp_time));
+ if ( s->quick->get_type() == QUICK_SELECT_I::QS_TYPE_RANGE)
+ {
+ double rows= record_count * s->found_records;
+ double access_cost_factor= MY_MIN(tmp / rows, 1.0);
+ uint key_no= s->quick->index;
+ filter=
+ s->table->best_range_rowid_filter_for_partial_join(key_no, rows,
+ access_cost_factor);
+ if (filter)
+ {
+ tmp-= filter->get_adjusted_gain(rows);
+ DBUG_ASSERT(tmp >= 0);
+ }
+ type= JT_RANGE;
+ }
+ else
+ {
+ type= JT_INDEX_MERGE;
+ best_filter= 0;
+ }
loose_scan_opt.check_range_access(join, idx, s->quick);
}
else
{
/* Estimate cost of reading table. */
if (s->table->force_index && !best_key) // index scan
+ {
+ type= JT_NEXT;
tmp= s->table->file->read_time(s->ref.key, 1, s->records);
+ }
else // table scan
+ {
tmp= s->scan_time();
+ type= JT_ALL;
+ }
if ((s->table->map & join->outer_join) || disable_jbuf) // Can't use join cache
{
@@ -7512,20 +8090,32 @@ best_access_path(JOIN *join,
}
}
+ trace_access_scan.add("access_type", type == JT_ALL ?
+ "scan" :
+ join_type_str[type]);
/* Splitting technique cannot be used with join cache */
if (s->table->is_splittable())
tmp+= s->table->get_materialization_cost();
else
tmp+= s->startup_cost;
+
/*
We estimate the cost of evaluating WHERE clause for found records
as record_count * rnd_records / TIME_FOR_COMPARE. This cost plus
tmp give us total cost of using TABLE SCAN
*/
+
+ const double best_filter_cmp_gain= best_filter
+ ? best_filter->get_cmp_gain(record_count * records)
+ : 0;
+ trace_access_scan.add("resulting_rows", rnd_records);
+ trace_access_scan.add("cost", tmp);
+
if (best == DBL_MAX ||
COST_ADD(tmp, record_count/(double) TIME_FOR_COMPARE*rnd_records) <
(best_key->is_for_hash_join() ? best_time :
- COST_ADD(best, record_count/(double) TIME_FOR_COMPARE*records)))
+ COST_ADD(best - best_filter_cmp_gain,
+ record_count/(double) TIME_FOR_COMPARE*records)))
{
/*
If the table has a range (s->quick is set) make_join_select()
@@ -7534,12 +8124,23 @@ best_access_path(JOIN *join,
best= tmp;
records= rnd_records;
best_key= 0;
+ best_filter= 0;
+ if (s->quick && s->quick->get_type() == QUICK_SELECT_I::QS_TYPE_RANGE)
+ best_filter= filter;
/* range/index_merge/ALL/index access method are "independent", so: */
best_ref_depends_map= 0;
best_uses_jbuf= MY_TEST(!disable_jbuf && !((s->table->map &
join->outer_join)));
spl_plan= 0;
+ best_type= type;
}
+ trace_access_scan.add("chosen", best_key == NULL);
+ }
+ else
+ {
+ trace_access_scan.add("type", "scan");
+ trace_access_scan.add("chosen", false);
+ trace_access_scan.add("cause", "cost");
}
/* Update the cost information for the current partial plan */
@@ -7551,6 +8152,7 @@ best_access_path(JOIN *join,
pos->loosescan_picker.loosescan_key= MAX_KEY;
pos->use_join_buffer= best_uses_jbuf;
pos->spl_plan= spl_plan;
+ pos->range_rowid_filter_info= best_filter;
loose_scan_opt.save_to_position(s, loose_scan_pos);
@@ -7558,7 +8160,15 @@ best_access_path(JOIN *join,
idx == join->const_tables &&
s->table == join->sort_by_table &&
join->unit->select_limit_cnt >= records)
+ {
+ trace_access_scan.add("use_tmp_table", true);
join->sort_by_table= (TABLE*) 1; // Must use temporary table
+ }
+ trace_access_scan.end();
+ trace_paths.end();
+
+ if (unlikely(thd->trace_started()))
+ print_best_access_for_table(thd, pos, best_type);
DBUG_VOID_RETURN;
}
@@ -7701,6 +8311,7 @@ choose_plan(JOIN *join, table_map join_tables)
uint use_cond_selectivity=
join->thd->variables.optimizer_use_condition_selectivity;
bool straight_join= MY_TEST(join->select_options & SELECT_STRAIGHT_JOIN);
+ THD *thd= join->thd;
DBUG_ENTER("choose_plan");
join->cur_embedding_map= 0;
@@ -7737,6 +8348,9 @@ choose_plan(JOIN *join, table_map join_tables)
join->table_count - join->const_tables, sizeof(JOIN_TAB*),
jtab_sort_func, (void*)join->emb_sjm_nest);
+ Json_writer_object wrapper(thd);
+ Json_writer_array trace_plan(thd,"considered_execution_plans");
+
if (!join->emb_sjm_nest)
{
choose_initial_table_order(join);
@@ -8034,19 +8648,30 @@ optimize_straight_join(JOIN *join, table_map join_tables)
uint use_cond_selectivity=
join->thd->variables.optimizer_use_condition_selectivity;
POSITION loose_scan_pos;
+ THD *thd= join->thd;
for (JOIN_TAB **pos= join->best_ref + idx ; (s= *pos) ; pos++)
{
+ POSITION *position= join->positions + idx;
+ Json_writer_object trace_one_table(thd);
+ if (unlikely(thd->trace_started()))
+ {
+ trace_plan_prefix(join, idx, join_tables);
+ trace_one_table.add_table_name(s);
+ }
/* Find the best access method from 's' to the current partial plan */
best_access_path(join, s, join_tables, join->positions, idx,
disable_jbuf, record_count,
- join->positions + idx, &loose_scan_pos);
+ position, &loose_scan_pos);
/* compute the cost of the new plan extended with 's' */
- record_count= COST_MULT(record_count, join->positions[idx].records_read);
- read_time= COST_ADD(read_time,
- COST_ADD(join->positions[idx].read_time,
- record_count / (double) TIME_FOR_COMPARE));
+ record_count= COST_MULT(record_count, position->records_read);
+ const double filter_cmp_gain= position->range_rowid_filter_info
+ ? position->range_rowid_filter_info->get_cmp_gain(record_count)
+ : 0;
+ read_time+= COST_ADD(read_time - filter_cmp_gain,
+ COST_ADD(position->read_time,
+ record_count / (double) TIME_FOR_COMPARE));
optimize_semi_joins(join, join_tables, idx, &record_count, &read_time,
&loose_scan_pos);
@@ -8055,7 +8680,7 @@ optimize_straight_join(JOIN *join, table_map join_tables)
if (use_cond_selectivity > 1)
pushdown_cond_selectivity= table_cond_selectivity(join, idx, s,
join_tables);
- join->positions[idx].cond_selectivity= pushdown_cond_selectivity;
+ position->cond_selectivity= pushdown_cond_selectivity;
++idx;
}
@@ -8725,7 +9350,7 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
fldno= table->key_info[key].key_part[keyparts-1].fieldnr - 1;
if (table->field[fldno]->cond_selectivity > 0)
- {
+ {
sel /= table->field[fldno]->cond_selectivity;
set_if_smaller(sel, 1.0);
}
@@ -8803,9 +9428,9 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
next_field= next_field->next_equal_field)
{
if (!(next_field->table->map & rem_tables) && next_field->table != table)
- {
+ {
if (field->cond_selectivity > 0)
- {
+ {
sel/= field->cond_selectivity;
set_if_smaller(sel, 1.0);
}
@@ -9002,6 +9627,13 @@ best_extension_by_limited_search(JOIN *join,
double current_record_count, current_read_time;
POSITION *position= join->positions + idx;
+ Json_writer_object trace_one_table(thd);
+ if (unlikely(thd->trace_started()))
+ {
+ trace_plan_prefix(join, idx, remaining_tables);
+ trace_one_table.add_table_name(s);
+ }
+
/* Find the best access method from 's' to the current partial plan */
POSITION loose_scan_pos;
best_access_path(join, s, remaining_tables, join->positions, idx,
@@ -9009,11 +9641,20 @@ best_extension_by_limited_search(JOIN *join,
/* Compute the cost of extending the plan with 's' */
current_record_count= COST_MULT(record_count, position->records_read);
+ const double filter_cmp_gain= position->range_rowid_filter_info
+ ? position->range_rowid_filter_info->get_cmp_gain(current_record_count)
+ : 0;
current_read_time=COST_ADD(read_time,
- COST_ADD(position->read_time,
+ COST_ADD(position->read_time -
+ filter_cmp_gain,
current_record_count /
(double) TIME_FOR_COMPARE));
+ if (unlikely(thd->trace_started()))
+ {
+ trace_one_table.add("rows_for_plan", current_record_count);
+ trace_one_table.add("cost_for_plan", current_read_time);
+ }
optimize_semi_joins(join, remaining_tables, idx, &current_record_count,
&current_read_time, &loose_scan_pos);
@@ -9025,6 +9666,7 @@ best_extension_by_limited_search(JOIN *join,
read_time,
current_read_time,
"prune_by_cost"););
+ trace_one_table.add("pruned_by_cost", true);
restore_prev_nj_state(s);
restore_prev_sj_state(remaining_tables, s, idx);
continue;
@@ -9058,6 +9700,7 @@ best_extension_by_limited_search(JOIN *join,
read_time,
current_read_time,
"pruned_by_heuristic"););
+ trace_one_table.add("pruned_by_heuristic", true);
restore_prev_nj_state(s);
restore_prev_sj_state(remaining_tables, s, idx);
continue;
@@ -9070,11 +9713,16 @@ best_extension_by_limited_search(JOIN *join,
remaining_tables &
~real_table_bit);
join->positions[idx].cond_selectivity= pushdown_cond_selectivity;
+
+ if (unlikely(thd->trace_started()) && pushdown_cond_selectivity < 1.0)
+ trace_one_table.add("selectivity", pushdown_cond_selectivity);
+
double partial_join_cardinality= current_record_count *
pushdown_cond_selectivity;
if ( (search_depth > 1) && (remaining_tables & ~real_table_bit) & allowed_tables )
{ /* Recursively expand the current partial plan */
swap_variables(JOIN_TAB*, join->best_ref[idx], *pos);
+ Json_writer_array trace_rest(thd, "rest_of_plan");
if (best_extension_by_limited_search(join,
remaining_tables & ~real_table_bit,
idx + 1,
@@ -9094,12 +9742,17 @@ best_extension_by_limited_search(JOIN *join,
if (join->sort_by_table &&
join->sort_by_table !=
join->positions[join->const_tables].table->table)
+ {
/*
We may have to make a temp table, note that this is only a
heuristic since we cannot know for sure at this point.
Hence it may be wrong.
*/
+ trace_one_table.add("cost_for_sorting", current_record_count);
current_read_time= COST_ADD(current_read_time, current_record_count);
+ }
+ trace_one_table.add("estimated_join_cardinality",
+ partial_join_cardinality);
if (current_read_time < join->best_read)
{
memcpy((uchar*) join->best_positions, (uchar*) join->positions,
@@ -9722,6 +10375,7 @@ bool JOIN::inject_cond_into_where(Item *injected_cond)
static Item * const null_ptr= NULL;
+
/*
Set up join struct according to the picked join order in
@@ -9901,6 +10555,8 @@ bool JOIN::get_best_combination()
is_hash_join_key_no(j->ref.key))
hash_join= TRUE;
+ j->range_rowid_filter_info= best_positions[tablenr].range_rowid_filter_info;
+
loop_end:
/*
Save records_read in JOIN_TAB so that select_describe()/etc don't have
@@ -9941,6 +10597,9 @@ bool JOIN::get_best_combination()
top_join_tab_count= (uint)(join_tab_ranges.head()->end -
join_tab_ranges.head()->start);
+ if (unlikely(thd->trace_started()))
+ print_final_join_order(this);
+
update_depend_map(this);
DBUG_RETURN(0);
}
@@ -10790,23 +11449,44 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
there inside the triggers.
*/
{ // Check const tables
- join->exec_const_cond=
- make_cond_for_table(thd, cond,
+ Item* const_cond= NULL;
+ const_cond= make_cond_for_table(thd, cond,
join->const_table_map,
(table_map) 0, -1, FALSE, FALSE);
/* Add conditions added by add_not_null_conds(). */
for (uint i= 0 ; i < join->const_tables ; i++)
- add_cond_and_fix(thd, &join->exec_const_cond,
+ add_cond_and_fix(thd, &const_cond,
join->join_tab[i].select_cond);
- DBUG_EXECUTE("where",print_where(join->exec_const_cond,"constants",
+ DBUG_EXECUTE("where",print_where(const_cond,"constants",
QT_ORDINARY););
- if (join->exec_const_cond && !join->exec_const_cond->is_expensive() &&
- !join->exec_const_cond->val_int())
+
+ if (const_cond)
{
- DBUG_PRINT("info",("Found impossible WHERE condition"));
- join->exec_const_cond= NULL;
- DBUG_RETURN(1); // Impossible const condition
+ Json_writer_object trace_const_cond(thd);
+ trace_const_cond.add("condition_on_constant_tables", const_cond);
+ if (const_cond->is_expensive())
+ {
+ trace_const_cond.add("evaluated", "false")
+ .add("cause", "expensive cond");
+ }
+ else
+ {
+ bool const_cond_result;
+ {
+ Json_writer_array a(thd, "computing_condition");
+ const_cond_result= const_cond->val_int() != 0;
+ }
+ if (!const_cond_result)
+ {
+ DBUG_PRINT("info",("Found impossible WHERE condition"));
+ trace_const_cond.add("evaluated", "true")
+ .add("found", "impossible where");
+ join->exec_const_cond= NULL;
+ DBUG_RETURN(1);
+ }
+ }
+ join->exec_const_cond= const_cond;
}
if (join->table_count != join->const_tables)
@@ -10843,6 +11523,11 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
/*
Step #2: Extract WHERE/ON parts
*/
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_object trace_conditions(thd, "attaching_conditions_to_tables");
+ trace_conditions.add("original_condition", cond);
+ Json_writer_array trace_attached_comp(thd,
+ "attached_conditions_computation");
uint i;
for (i= join->top_join_tab_count - 1; i >= join->const_tables; i--)
{
@@ -10899,10 +11584,13 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
(!is_hash_join_key_no(tab->ref.key) &&
tab->table->intersect_keys.is_set(tab->ref.key))))
{
- /* Range uses longer key; Use this instead of ref on key */
- tab->type=JT_ALL;
- use_quick_range=1;
- tab->use_quick=1;
+ /* Range uses longer key; Use this instead of ref on key */
+ Json_writer_object ref_to_range(thd);
+ ref_to_range.add("ref_to_range", true);
+ ref_to_range.add("cause", "range uses longer key");
+ tab->type=JT_ALL;
+ use_quick_range=1;
+ tab->use_quick=1;
tab->ref.key= -1;
tab->ref.key_parts=0; // Don't use ref key.
join->best_positions[i].records_read= rows2double(tab->quick->records);
@@ -10982,7 +11670,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
below to check if we should use 'quick' instead.
*/
DBUG_PRINT("info", ("Item_int"));
- tmp= new (thd->mem_root) Item_int(thd, (longlong) 1, 1); // Always true
+ tmp= new (thd->mem_root) Item_bool(thd, true); // Always true
}
}
@@ -11061,6 +11749,11 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
sel->quick=tab->quick; // Use value from get_quick_...
sel->quick_keys.clear_all();
sel->needed_reg.clear_all();
+ if (is_hj && tab->rowid_filter)
+ {
+ delete tab->rowid_filter;
+ tab->rowid_filter= 0;
+ }
}
else
{
@@ -11120,7 +11813,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
Yet attributes of the just built condition are not needed.
Thus we call sel->cond->quick_fix_field for safety.
*/
- if (sel->cond && !sel->cond->fixed)
+ if (sel->cond && !sel->cond->is_fixed())
sel->cond->quick_fix_field();
if (sel->test_quick_select(thd, tab->keys,
@@ -11130,7 +11823,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
OPTION_FOUND_ROWS ?
HA_POS_ERROR :
join->unit->select_limit_cnt), 0,
- FALSE, FALSE) < 0)
+ FALSE, FALSE, FALSE) < 0)
{
/*
Before reporting "Impossible WHERE" for the whole query
@@ -11144,7 +11837,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
OPTION_FOUND_ROWS ?
HA_POS_ERROR :
join->unit->select_limit_cnt),0,
- FALSE, FALSE) < 0)
+ FALSE, FALSE, FALSE) < 0)
DBUG_RETURN(1); // Impossible WHERE
}
else
@@ -11386,6 +12079,23 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
if (!tab->bush_children)
i++;
}
+
+ if (unlikely(thd->trace_started()))
+ {
+ trace_attached_comp.end();
+ Json_writer_array trace_attached_summary(thd,
+ "attached_conditions_summary");
+ for (tab= first_depth_first_tab(join); tab;
+ tab= next_depth_first_tab(join, tab))
+ {
+ if (!tab->table)
+ continue;
+ Item *const cond = tab->select_cond;
+ Json_writer_object trace_one_table(thd);
+ trace_one_table.add_table_name(tab);
+ trace_one_table.add("attached", cond);
+ }
+ }
}
DBUG_RETURN(0);
}
@@ -12769,6 +13479,37 @@ bool error_if_full_join(JOIN *join)
}
+void JOIN_TAB::build_range_rowid_filter_if_needed()
+{
+ if (rowid_filter && !is_rowid_filter_built)
+ {
+ /**
+ The same handler object (table->file) is used to build a filter
+ and to perfom a primary table access (by the main query).
+
+ To estimate the time for filter building tracker should be changed
+ and after building of the filter has been finished it should be
+ switched back to the previos tracker.
+ */
+ Exec_time_tracker *table_tracker= table->file->get_time_tracker();
+ Rowid_filter_tracker *rowid_tracker= rowid_filter->get_tracker();
+ table->file->set_time_tracker(rowid_tracker->get_time_tracker());
+ rowid_tracker->start_tracking();
+ if (!rowid_filter->build())
+ {
+ is_rowid_filter_built= true;
+ }
+ else
+ {
+ delete rowid_filter;
+ rowid_filter= 0;
+ }
+ rowid_tracker->stop_tracking();
+ table->file->set_time_tracker(table_tracker);
+ }
+}
+
+
/**
cleanup JOIN_TAB.
@@ -12788,6 +13529,11 @@ void JOIN_TAB::cleanup()
select= 0;
delete quick;
quick= 0;
+ if (rowid_filter)
+ {
+ delete rowid_filter;
+ rowid_filter= 0;
+ }
if (cache)
{
cache->free();
@@ -13160,7 +13906,8 @@ void JOIN::join_free()
!(select_options & SELECT_NO_UNLOCK) &&
!select_lex->subquery_in_having &&
(select_lex == (thd->lex->unit.fake_select_lex ?
- thd->lex->unit.fake_select_lex : &thd->lex->select_lex)))
+ thd->lex->unit.fake_select_lex :
+ thd->lex->first_select_lex())))
{
/*
TODO: unlock tables even if the join isn't top level select in the
@@ -13189,8 +13936,10 @@ void JOIN::join_free()
void JOIN::cleanup(bool full)
{
DBUG_ENTER("JOIN::cleanup");
- DBUG_PRINT("enter", ("full %u", (uint) full));
-
+ DBUG_PRINT("enter", ("select: %d (%p) join: %p full: %u",
+ select_lex->select_number, select_lex, this,
+ (uint) full));
+
if (full)
have_query_plan= QEP_DELETED;
@@ -13435,7 +14184,7 @@ static void update_depend_map_for_order(JOIN *join, ORDER *order)
order->used= 0;
// Not item_sum(), RAND() and no reference to table outside of sub select
if (!(order->depend_map & (OUTER_REF_TABLE_BIT | RAND_TABLE_BIT))
- && !order->item[0]->with_sum_func &&
+ && !order->item[0]->with_sum_func() &&
join->join_tab)
{
for (JOIN_TAB **tab=join->map2table;
@@ -13510,7 +14259,23 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond,
tab++)
tab->cached_eq_ref_table= FALSE;
- *simple_order= *join->join_tab[join->const_tables].on_expr_ref ? 0 : 1;
+ JOIN_TAB *head= join->join_tab + join->const_tables;
+ *simple_order= head->on_expr_ref[0] == NULL;
+ if (*simple_order && head->table->file->ha_table_flags() & HA_SLOW_RND_POS)
+ {
+ uint u1, u2, u3;
+ /*
+ normally the condition is (see filesort_use_addons())
+
+ length + sortlength <= max_length_for_sort_data
+
+ but for HA_SLOW_RND_POS tables we relax it a bit, as the alternative
+ is to use a temporary table, which is rather expensive.
+
+ TODO proper cost estimations
+ */
+ *simple_order= filesort_use_addons(head->table, 0, &u1, &u2, &u3);
+ }
}
else
{
@@ -13526,7 +14291,7 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond,
for (order=first_order; order ; order=order->next)
{
table_map order_tables=order->item[0]->used_tables();
- if (order->item[0]->with_sum_func ||
+ if (order->item[0]->with_sum_func() ||
order->item[0]->with_window_func ||
/*
If the outer table of an outer join is const (either by itself or
@@ -13703,7 +14468,7 @@ ORDER *simple_remove_const(ORDER *order, COND *where)
ORDER *first= NULL, *prev= NULL;
for (; order; order= order->next)
{
- DBUG_ASSERT(!order->item[0]->with_sum_func); // should never happen
+ DBUG_ASSERT(!order->item[0]->with_sum_func()); // should never happen
if (!const_expression_in_where(where, order->item[0]))
{
if (!first)
@@ -14007,31 +14772,44 @@ finish:
FALSE otherwise
*/
-static bool check_simple_equality(THD *thd, const Item::Context &ctx,
- Item *left_item, Item *right_item,
- COND_EQUAL *cond_equal)
+bool check_simple_equality(THD *thd, const Item::Context &ctx,
+ Item *left_item, Item *right_item,
+ COND_EQUAL *cond_equal)
{
Item *orig_left_item= left_item;
Item *orig_right_item= right_item;
- if (left_item->type() == Item::REF_ITEM &&
- ((Item_ref*)left_item)->ref_type() == Item_ref::VIEW_REF)
+ if (left_item->type() == Item::REF_ITEM)
{
- if (((Item_ref*)left_item)->get_depended_from())
- return FALSE;
- if (((Item_direct_view_ref*)left_item)->get_null_ref_table() !=
- NO_NULL_TABLE && !left_item->real_item()->used_tables())
- return FALSE;
- left_item= left_item->real_item();
+ Item_ref::Ref_Type left_ref= ((Item_ref*)left_item)->ref_type();
+
+ if (left_ref == Item_ref::VIEW_REF ||
+ left_ref == Item_ref::REF)
+ {
+ if (((Item_ref*)left_item)->get_depended_from())
+ return FALSE;
+ if (left_ref == Item_ref::VIEW_REF &&
+ ((Item_direct_view_ref*)left_item)->get_null_ref_table() !=
+ NO_NULL_TABLE &&
+ !left_item->real_item()->used_tables())
+ return FALSE;
+ left_item= left_item->real_item();
+ }
}
- if (right_item->type() == Item::REF_ITEM &&
- ((Item_ref*)right_item)->ref_type() == Item_ref::VIEW_REF)
+ if (right_item->type() == Item::REF_ITEM)
{
- if (((Item_ref*)right_item)->get_depended_from())
- return FALSE;
- if (((Item_direct_view_ref*)right_item)->get_null_ref_table() !=
- NO_NULL_TABLE && !right_item->real_item()->used_tables())
- return FALSE;
- right_item= right_item->real_item();
+ Item_ref::Ref_Type right_ref= ((Item_ref*)right_item)->ref_type();
+ if (right_ref == Item_ref::VIEW_REF ||
+ (right_ref == Item_ref::REF))
+ {
+ if (((Item_ref*)right_item)->get_depended_from())
+ return FALSE;
+ if (right_ref == Item_ref::VIEW_REF &&
+ ((Item_direct_view_ref*)right_item)->get_null_ref_table() !=
+ NO_NULL_TABLE &&
+ !right_item->real_item()->used_tables())
+ return FALSE;
+ right_item= right_item->real_item();
+ }
}
if (left_item->type() == Item::FIELD_ITEM &&
right_item->type() == Item::FIELD_ITEM &&
@@ -14468,7 +15246,7 @@ COND *Item_cond_and::build_equal_items(THD *thd,
if (!cond_args->elements &&
!cond_equal.current_level.elements &&
!eq_list.elements)
- return new (thd->mem_root) Item_int(thd, (longlong) 1, 1);
+ return new (thd->mem_root) Item_bool(thd, true);
List_iterator_fast<Item_equal> it(cond_equal.current_level);
while ((item_equal= it++))
@@ -14575,7 +15353,7 @@ COND *Item_func_eq::build_equal_items(THD *thd,
Item_equal *item_equal;
int n= cond_equal.current_level.elements + eq_list.elements;
if (n == 0)
- return new (thd->mem_root) Item_int(thd, (longlong) 1, 1);
+ return new (thd->mem_root) Item_bool(thd, true);
else if (n == 1)
{
if ((item_equal= cond_equal.current_level.pop()))
@@ -14969,7 +15747,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
List<Item> eq_list;
Item_func_eq *eq_item= 0;
if (((Item *) item_equal)->const_item() && !item_equal->val_int())
- return new (thd->mem_root) Item_int(thd, (longlong) 0, 1);
+ return new (thd->mem_root) Item_bool(thd, false);
Item *item_const= item_equal->get_const();
Item_equal_fields_iterator it(*item_equal);
Item *head;
@@ -14977,12 +15755,12 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
Item *current_sjm_head= NULL;
DBUG_ASSERT(!cond ||
- cond->type() == Item::INT_ITEM ||
+ cond->is_bool_literal() ||
(cond->type() == Item::FUNC_ITEM &&
((Item_func *) cond)->functype() == Item_func::EQ_FUNC) ||
(cond->type() == Item::COND_ITEM &&
((Item_func *) cond)->functype() == Item_func::COND_AND_FUNC));
-
+
/*
Pick the "head" item: the constant one or the first in the join order
(if the first in the join order happends to be inside an SJM nest, that's
@@ -15079,11 +15857,9 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
*/
Item *head_item= (!item_const && current_sjm &&
current_sjm_head != field_item) ? current_sjm_head: head;
- Item *head_real_item= head_item->real_item();
- if (head_real_item->type() == Item::FIELD_ITEM)
- head_item= head_real_item;
-
- eq_item= new (thd->mem_root) Item_func_eq(thd, field_item->real_item(), head_item);
+ eq_item= new (thd->mem_root) Item_func_eq(thd,
+ field_item->remove_item_direct_ref(),
+ head_item->remove_item_direct_ref());
if (!eq_item || eq_item->set_cmp_func())
return 0;
@@ -15098,13 +15874,13 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
cond AND eq_1 AND eq_2 AND eq_3 AND ...
- 'cond' is a parameter for this function, which may be NULL, an Item_int(1),
+ 'cond' is a parameter for this function, which may be NULL, an Item_bool(1),
or an Item_func_eq or an Item_cond_and.
We want to return a well-formed condition: no nested Item_cond_and objects,
or Item_cond_and with a single child:
- if 'cond' is an Item_cond_and, we add eq_i as its tail
- - if 'cond' is Item_int(1), we return eq_i
+ - if 'cond' is Item_bool(1), we return eq_i
- otherwise, we create our own Item_cond_and and put 'cond' at the front of
it.
- if we have only one condition to return, we don't create an Item_cond_and
@@ -15116,10 +15892,10 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
switch (eq_list.elements)
{
case 0:
- res= cond ? cond : new (thd->mem_root) Item_int(thd, (longlong) 1, 1);
+ res= cond ? cond : new (thd->mem_root) Item_bool(thd, true);
break;
case 1:
- if (!cond || cond->type() == Item::INT_ITEM)
+ if (!cond || cond->is_bool_literal())
res= eq_item;
break;
default:
@@ -15170,6 +15946,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
@param cond condition to process
@param cond_equal multiple equalities to take into consideration
@param table_join_idx index to tables determining field preference
+ @param do_substitution if false: do not do any field substitution
@note
At the first glance full sort of fields in multiple equality
@@ -15209,7 +15986,8 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
COND *cond,
COND_EQUAL *cond_equal,
- void *table_join_idx)
+ void *table_join_idx,
+ bool do_substitution)
{
Item_equal *item_equal;
COND *org_cond= cond; // Return this in case of fatal error
@@ -15238,7 +16016,8 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
{
Item *new_item= substitute_for_best_equal_field(thd, context_tab,
item, cond_equal,
- table_join_idx);
+ table_join_idx,
+ do_substitution);
/*
This works OK with PS/SP re-execution as changes are made to
the arguments of AND/OR items only
@@ -15252,8 +16031,12 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
COND *eq_cond= 0;
List_iterator_fast<Item_equal> it(cond_equal->current_level);
bool false_eq_cond= FALSE;
+ bool all_deleted= true;
while ((item_equal= it++))
{
+ if (item_equal->get_extraction_flag() == DELETION_FL)
+ continue;
+ all_deleted= false;
eq_cond= eliminate_item_equal(thd, eq_cond, cond_equal->upper_levels,
item_equal);
if (!eq_cond)
@@ -15261,7 +16044,7 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
eq_cond= 0;
break;
}
- else if (eq_cond->type() == Item::INT_ITEM && !eq_cond->val_bool())
+ else if (eq_cond->is_bool_literal() && !eq_cond->val_bool())
{
/*
This occurs when eliminate_item_equal() founds that cond is
@@ -15286,13 +16069,13 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
else
{
/* Do not add an equality condition if it's always true */
- if (eq_cond->type() != Item::INT_ITEM &&
+ if (!eq_cond->is_bool_literal() &&
cond_list->push_front(eq_cond, thd->mem_root))
eq_cond= 0;
}
}
}
- if (!eq_cond)
+ if (!eq_cond && !all_deleted)
{
/*
We are out of memory doing the transformation.
@@ -15311,10 +16094,12 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
cond_equal= item_equal->upper_levels;
if (cond_equal && cond_equal->current_level.head() == item_equal)
cond_equal= cond_equal->upper_levels;
+ if (item_equal->get_extraction_flag() == DELETION_FL)
+ return 0;
cond= eliminate_item_equal(thd, 0, cond_equal, item_equal);
return cond ? cond : org_cond;
}
- else
+ else if (do_substitution)
{
while (cond_equal)
{
@@ -15365,7 +16150,7 @@ static void update_const_equal_items(THD *thd, COND *cond, JOIN_TAB *tab,
Item_func::COND_AND_FUNC));
}
else if (cond->type() == Item::FUNC_ITEM &&
- ((Item_cond*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
+ ((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
{
Item_equal *item_equal= (Item_equal *) cond;
bool contained_const= item_equal->get_const() != NULL;
@@ -15560,7 +16345,7 @@ propagate_cond_constants(THD *thd, I_List<COND_CMP> *save_list,
(((Item_func*) cond)->functype() == Item_func::EQ_FUNC ||
((Item_func*) cond)->functype() == Item_func::EQUAL_FUNC))
{
- Item_func_eq *func=(Item_func_eq*) cond;
+ Item_bool_func2 *func= dynamic_cast<Item_bool_func2*>(cond);
Item **args= func->arguments();
bool left_const= args[0]->const_item() && !args[0]->is_expensive();
bool right_const= args[1]->const_item() && !args[1]->is_expensive();
@@ -15812,7 +16597,7 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top,
conds= and_conds(join->thd, conds, table->on_expr);
conds->top_level_item();
/* conds is always a new item as both cond and on_expr existed */
- DBUG_ASSERT(!conds->fixed);
+ DBUG_ASSERT(!conds->is_fixed());
conds->fix_fields(join->thd, &conds);
}
else
@@ -16285,6 +17070,8 @@ void optimize_wo_join_buffering(JOIN *join, uint first_tab, uint last_tab,
double cost, rec_count;
table_map reopt_remaining_tables= last_remaining_tables;
uint i;
+ THD *thd= join->thd;
+ Json_writer_temp_disable trace_wo_join_buffering(thd);
if (first_tab > join->const_tables)
{
@@ -16319,7 +17106,7 @@ void optimize_wo_join_buffering(JOIN *join, uint first_tab, uint last_tab,
{
JOIN_TAB *rs= join->positions[i].table;
POSITION pos, loose_scan_pos;
-
+
if ((i == first_tab && first_alt) || join->positions[i].use_join_buffer)
{
/* Find the best access method that would not use join buffering */
@@ -16383,12 +17170,24 @@ optimize_cond(JOIN *join, COND *conds,
that occurs in a function set a pointer to the multiple equality
predicate. Substitute a constant instead of this field if the
multiple equality contains a constant.
- */
+ */
+
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_object trace_cond(thd, "condition_processing");
+ trace_cond.add("condition", join->conds == conds ? "WHERE" : "HAVING")
+ .add("original_condition", conds);
+
+ Json_writer_array trace_steps(thd, "steps");
DBUG_EXECUTE("where", print_where(conds, "original", QT_ORDINARY););
conds= build_equal_items(join, conds, NULL, join_list,
ignore_on_conds, cond_equal,
MY_TEST(flags & OPT_LINK_EQUAL_FIELDS));
DBUG_EXECUTE("where",print_where(conds,"after equal_items", QT_ORDINARY););
+ {
+ Json_writer_object equal_prop_wrapper(thd);
+ equal_prop_wrapper.add("transformation", "equality_propagation")
+ .add("resulting_condition", conds);
+ }
/* change field = field to field = const for each found field = const */
propagate_cond_constants(thd, (I_List<COND_CMP> *) 0, conds, conds);
@@ -16397,10 +17196,21 @@ optimize_cond(JOIN *join, COND *conds,
Remove all and-levels where CONST item != CONST item
*/
DBUG_EXECUTE("where",print_where(conds,"after const change", QT_ORDINARY););
+ {
+ Json_writer_object const_prop_wrapper(thd);
+ const_prop_wrapper.add("transformation", "constant_propagation")
+ .add("resulting_condition", conds);
+ }
conds= conds->remove_eq_conds(thd, cond_value, true);
if (conds && conds->type() == Item::COND_ITEM &&
((Item_cond*) conds)->functype() == Item_func::COND_AND_FUNC)
*cond_equal= &((Item_cond_and*) conds)->m_cond_equal;
+
+ {
+ Json_writer_object cond_removal_wrapper(thd);
+ cond_removal_wrapper.add("transformation", "trivial_condition_removal")
+ .add("resulting_condition", conds);
+ }
DBUG_EXECUTE("info",print_where(conds,"after remove", QT_ORDINARY););
}
DBUG_RETURN(conds);
@@ -16475,7 +17285,7 @@ void propagate_new_equalities(THD *thd, Item *cond,
}
}
else if (cond->type() == Item::FUNC_ITEM &&
- ((Item_cond*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
+ ((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
{
Item_equal *equal_item;
List_iterator<Item_equal> it(*new_equalities);
@@ -16720,7 +17530,7 @@ Item_cond::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
}
else if (and_level &&
new_item->type() == Item::FUNC_ITEM &&
- ((Item_cond*) new_item)->functype() ==
+ ((Item_func*) new_item)->functype() ==
Item_func::MULT_EQUAL_FUNC)
{
li.remove();
@@ -16862,7 +17672,8 @@ Item_bool_func2::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
{
if (args[0]->eq(args[1], true))
{
- if (!args[0]->maybe_null || functype() == Item_func::EQUAL_FUNC)
+ if (*cond_value == Item::COND_FALSE ||
+ !args[0]->maybe_null || functype() == Item_func::EQUAL_FUNC)
return (COND*) 0; // Compare of identical items
}
}
@@ -16900,9 +17711,8 @@ Item_func_isnull::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
{
Field *field= ((Item_field*) real_item)->field;
- if (((field->type() == MYSQL_TYPE_DATE) ||
- (field->type() == MYSQL_TYPE_DATETIME)) &&
- (field->flags & NOT_NULL_FLAG))
+ if ((field->flags & NOT_NULL_FLAG) &&
+ field->type_handler()->cond_notnull_field_isnull_to_field_eq_zero())
{
/* fix to replace 'NULL' dates with '0' (shreeve@uci.edu) */
/*
@@ -16918,7 +17728,7 @@ Item_func_isnull::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
*/
- Item *item0= new(thd->mem_root) Item_int(thd, (longlong) 0, 1);
+ Item *item0= new(thd->mem_root) Item_bool(thd, false);
Item *eq_cond= new(thd->mem_root) Item_func_eq(thd, args[0], item0);
if (!eq_cond)
return this;
@@ -16988,7 +17798,7 @@ Item_func_isnull::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
cond= new_cond;
/*
Item_func_eq can't be fixed after creation so we do not check
- cond->fixed, also it do not need tables so we use 0 as second
+ cond->is_fixed(), also it do not need tables so we use 0 as second
argument.
*/
cond->fix_fields(thd, &cond);
@@ -17148,60 +17958,6 @@ const_expression_in_where(COND *cond, Item *comp_item, Field *comp_field,
Create internal temporary table
****************************************************************************/
-/**
- Create field for temporary table from given field.
-
- @param thd Thread handler
- @param org_field field from which new field will be created
- @param name New field name
- @param table Temporary table
- @param item !=NULL if item->result_field should point to new field.
- This is relevant for how fill_record() is going to work:
- If item != NULL then fill_record() will update
- the record in the original table.
- If item == NULL then fill_record() will update
- the temporary table
-
- @retval
- NULL on error
- @retval
- new_created field
-*/
-
-Field *create_tmp_field_from_field(THD *thd, Field *org_field,
- LEX_CSTRING *name, TABLE *table,
- Item_field *item)
-{
- Field *new_field;
-
- new_field= org_field->make_new_field(thd->mem_root, table,
- table == org_field->table);
- if (new_field)
- {
- new_field->init(table);
- new_field->orig_table= org_field->orig_table;
- if (item)
- item->result_field= new_field;
- else
- new_field->field_name= *name;
- new_field->flags|= org_field->flags & NO_DEFAULT_VALUE_FLAG;
- if (org_field->maybe_null() || (item && item->maybe_null))
- new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join
- if (org_field->type() == MYSQL_TYPE_VAR_STRING ||
- org_field->type() == MYSQL_TYPE_VARCHAR)
- table->s->db_create_options|= HA_OPTION_PACK_RECORD;
- else if (org_field->type() == FIELD_TYPE_DOUBLE)
- ((Field_double *) new_field)->not_fixed= TRUE;
- new_field->vcol_info= 0;
- new_field->cond_selectivity= 1.0;
- new_field->next_equal_field= NULL;
- new_field->option_list= NULL;
- new_field->option_struct= NULL;
- }
- return new_field;
-}
-
-
Field *Item::create_tmp_field_int(TABLE *table, uint convert_int_length)
{
const Type_handler *h= &type_handler_long;
@@ -17211,6 +17967,26 @@ Field *Item::create_tmp_field_int(TABLE *table, uint convert_int_length)
*this, table);
}
+Field *Item::tmp_table_field_from_field_type_maybe_null(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param,
+ bool is_explicit_null)
+{
+ /*
+ item->type() == CONST_ITEM excluded due to making fields for counter
+ With help of Item_uint
+ */
+ DBUG_ASSERT(!param->make_copy_field() || type() == CONST_ITEM);
+ DBUG_ASSERT(!is_result_field());
+ Field *result;
+ if ((result= tmp_table_field_from_field_type(table)))
+ {
+ if (result && is_explicit_null)
+ result->is_created_from_null_item= true;
+ }
+ return result;
+}
+
Field *Item_sum::create_tmp_field(bool group, TABLE *table)
{
@@ -17242,57 +18018,6 @@ Field *Item_sum::create_tmp_field(bool group, TABLE *table)
}
-static void create_tmp_field_from_item_finalize(THD *thd,
- Field *new_field,
- Item *item,
- Item ***copy_func,
- bool modify_item)
-{
- if (copy_func &&
- (item->is_result_field() ||
- (item->real_item()->is_result_field())))
- *((*copy_func)++) = item; // Save for copy_funcs
- if (modify_item)
- item->set_result_field(new_field);
- if (item->type() == Item::NULL_ITEM)
- new_field->is_created_from_null_item= TRUE;
-}
-
-
-/**
- Create field for temporary table using type of given item.
-
- @param thd Thread handler
- @param item Item to create a field for
- @param table Temporary table
- @param copy_func If set and item is a function, store copy of
- item in this array
- @param modify_item 1 if item->result_field should point to new
- item. This is relevent for how fill_record()
- is going to work:
- If modify_item is 1 then fill_record() will
- update the record in the original table.
- If modify_item is 0 then fill_record() will
- update the temporary table
-
- @retval
- 0 on error
- @retval
- new_created field
-*/
-
-static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
- Item ***copy_func, bool modify_item)
-{
- DBUG_ASSERT(thd == table->in_use);
- Field* new_field= item->create_tmp_field(false, table);
- if (new_field)
- create_tmp_field_from_item_finalize(thd, new_field, item,
- copy_func, modify_item);
- return new_field;
-}
-
-
/**
Create field for information schema table.
@@ -17326,19 +18051,212 @@ Field *Item::create_field_for_schema(THD *thd, TABLE *table)
/**
+ Create a temporary field for Item_field (or its descendant),
+ either direct or referenced by an Item_ref.
+
+ param->modify_item is set when we create a field for an internal temporary
+ table. In this case we have to ensure the new field name is identical to
+ the original field name as the field will info will be sent to the client.
+ In other cases, the field name is set from orig_item or name if org_item is
+ not set.
+*/
+
+Field *
+Item_field::create_tmp_field_from_item_field(TABLE *new_table,
+ Item_ref *orig_item,
+ const Tmp_field_param *param)
+{
+ DBUG_ASSERT(!is_result_field());
+ Field *result;
+ LEX_CSTRING *new_name= (orig_item ? &orig_item->name :
+ !param->modify_item() ? &name :
+ &field->field_name);
+
+ /*
+ If item have to be able to store NULLs but underlaid field can't do it,
+ create_tmp_field_from_field() can't be used for tmp field creation.
+ */
+ if (((maybe_null && in_rollup) ||
+ (new_table->in_use->create_tmp_table_for_derived && /* for mat. view/dt */
+ orig_item && orig_item->maybe_null)) &&
+ !field->maybe_null())
+ {
+ /*
+ The item the ref points to may have maybe_null flag set while
+ the ref doesn't have it. This may happen for outer fields
+ when the outer query decided at some point after name resolution phase
+ that this field might be null. Take this into account here.
+ */
+ Record_addr rec(orig_item ? orig_item->maybe_null : maybe_null);
+ const Type_handler *handler= type_handler()->
+ type_handler_for_tmp_table(this);
+ result= handler->make_and_init_table_field(new_name,
+ rec, *this, new_table);
+ }
+ else if (param->table_cant_handle_bit_fields() &&
+ field->type() == MYSQL_TYPE_BIT)
+ {
+ const Type_handler *handler= type_handler_long_or_longlong();
+ result= handler->make_and_init_table_field(new_name,
+ Record_addr(maybe_null),
+ *this, new_table);
+ }
+ else
+ {
+ bool tmp_maybe_null= param->modify_item() ? maybe_null :
+ field->maybe_null();
+ result= field->create_tmp_field(new_table->in_use->mem_root, new_table,
+ tmp_maybe_null);
+ if (result && ! param->modify_item())
+ result->field_name= *new_name;
+ }
+ if (result && param->modify_item())
+ result_field= result;
+ return result;
+}
+
+
+Field *Item_field::create_tmp_field_ex(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)
+{
+ DBUG_ASSERT(!is_result_field());
+ Field *result;
+ src->set_field(field);
+ if (!(result= create_tmp_field_from_item_field(table, NULL, param)))
+ return NULL;
+ if (field->eq_def(result))
+ src->set_default_field(field);
+ return result;
+}
+
+
+Field *Item_default_value::create_tmp_field_ex(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)
+{
+ if (field->default_value || (field->flags & BLOB_FLAG))
+ {
+ /*
+ We have to use a copy function when using a blob with default value
+ as the we have to calculate the default value before we can use it.
+ */
+ get_tmp_field_src(src, param);
+ Field *result= tmp_table_field_from_field_type(table);
+ if (result && param->modify_item())
+ result_field= result;
+ return result;
+ }
+ /*
+ Same code as in Item_field::create_tmp_field_ex, except no default field
+ handling
+ */
+ src->set_field(field);
+ return create_tmp_field_from_item_field(table, NULL, param);
+}
+
+
+Field *Item_ref::create_tmp_field_ex(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)
+{
+ Item *item= real_item();
+ DBUG_ASSERT(is_result_field());
+ if (item->type() == Item::FIELD_ITEM)
+ {
+ Field *result;
+ Item_field *field= (Item_field*) item;
+ Tmp_field_param prm2(*param);
+ prm2.set_modify_item(false);
+ src->set_field(field->field);
+ if (!(result= field->create_tmp_field_from_item_field(table, this, &prm2)))
+ return NULL;
+ if (param->modify_item())
+ result_field= result;
+ return result;
+ }
+ return Item_result_field::create_tmp_field_ex(table, src, param);
+}
+
+
+void Item_result_field::get_tmp_field_src(Tmp_field_src *src,
+ const Tmp_field_param *param)
+{
+ if (param->make_copy_field())
+ {
+ DBUG_ASSERT(result_field);
+ src->set_field(result_field);
+ }
+ else
+ {
+ src->set_item_result_field(this); // Save for copy_funcs
+ }
+}
+
+
+Field *Item_result_field::create_tmp_field_ex(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)
+{
+ /*
+ Possible Item types:
+ - Item_cache_wrapper (only for CREATE..SELECT ?)
+ - Item_func
+ - Item_subselect
+ */
+ DBUG_ASSERT(is_result_field());
+ DBUG_ASSERT(type() != NULL_ITEM);
+ get_tmp_field_src(src, param);
+ Field *result;
+ if ((result= tmp_table_field_from_field_type(table)) && param->modify_item())
+ result_field= result;
+ return result;
+}
+
+
+Field *Item_func_user_var::create_tmp_field_ex(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)
+{
+ DBUG_ASSERT(is_result_field());
+ DBUG_ASSERT(type() != NULL_ITEM);
+ get_tmp_field_src(src, param);
+ Field *result;
+ if ((result= create_table_field_from_handler(table)) && param->modify_item())
+ result_field= result;
+ return result;
+}
+
+
+Field *Item_func_sp::create_tmp_field_ex(TABLE *table,
+ Tmp_field_src *src,
+ const Tmp_field_param *param)
+{
+ Field *result;
+ get_tmp_field_src(src, param);
+ if ((result= sp_result_field->create_tmp_field(table->in_use->mem_root,
+ table)))
+ {
+ result->field_name= name;
+ if (param->modify_item())
+ result_field= result;
+ }
+ return result;
+}
+
+/**
Create field for temporary table.
- @param thd Thread handler
- @param table Temporary table
- @param item Item to create a field for
- @param type Type of item (normally item->type)
- @param copy_func If set and item is a function, store copy of item
+ @param table Temporary table
+ @param item Item to create a field for
+ @param type Type of item (normally item->type)
+ @param copy_func If set and item is a function, store copy of item
in this array
@param from_field if field will be created using other field as example,
pointer example field will be written here
- @param default_field If field has a default value field, store it here
- @param group 1 if we are going to do a relative group by on result
- @param modify_item 1 if item->result_field should point to new item.
+ @param default_field If field has a default value field, store it here
+ @param group 1 if we are going to do a relative group by on result
+ @param modify_item 1 if item->result_field should point to new item.
This is relevent for how fill_record() is going to
work:
If modify_item is 1 then fill_record() will update
@@ -17353,190 +18271,28 @@ Field *Item::create_field_for_schema(THD *thd, TABLE *table)
Set when using with rollup when we want to have
an exact copy of the field.
@retval
- 0 on error
+ 0 on error
@retval
new_created field
+ Create a temporary field for Item_field (or its descendant),
+ either direct or referenced by an Item_ref.
*/
-
-Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
+Field *create_tmp_field(TABLE *table, Item *item,
Item ***copy_func, Field **from_field,
Field **default_field,
bool group, bool modify_item,
bool table_cant_handle_bit_fields,
bool make_copy_field)
{
- Field *result;
- Item::Type orig_type= type;
- Item *orig_item= 0;
-
- DBUG_ASSERT(thd == table->in_use);
-
- if (type != Item::FIELD_ITEM &&
- item->real_item()->type() == Item::FIELD_ITEM)
- {
- orig_item= item;
- item= item->real_item();
- type= Item::FIELD_ITEM;
- }
-
- switch (type) {
- case Item::TYPE_HOLDER:
- case Item::SUM_FUNC_ITEM:
- {
- result= item->create_tmp_field(group, table);
- if (!result)
- my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
- return result;
- }
- case Item::DEFAULT_VALUE_ITEM:
- {
- Field *field= ((Item_default_value*) item)->field;
- if (field->default_value || (field->flags & BLOB_FLAG))
- {
- /*
- We have to use a copy function when using a blob with default value
- as the we have to calcuate the default value before we can use it.
- */
- return create_tmp_field_from_item(thd, item, table,
- (make_copy_field ? 0 : copy_func),
- modify_item);
- }
- }
- /* Fall through */
- case Item::FIELD_ITEM:
- case Item::CONTEXTUALLY_TYPED_VALUE_ITEM:
- case Item::INSERT_VALUE_ITEM:
- case Item::TRIGGER_FIELD_ITEM:
- {
- Item_field *field= (Item_field*) item;
- bool orig_modify= modify_item;
- if (orig_type == Item::REF_ITEM)
- modify_item= 0;
- /*
- If item have to be able to store NULLs but underlaid field can't do it,
- create_tmp_field_from_field() can't be used for tmp field creation.
- */
- if (((field->maybe_null && field->in_rollup) ||
- (thd->create_tmp_table_for_derived && /* for mat. view/dt */
- orig_item && orig_item->maybe_null)) &&
- !field->field->maybe_null())
- {
- bool save_maybe_null= FALSE;
- /*
- The item the ref points to may have maybe_null flag set while
- the ref doesn't have it. This may happen for outer fields
- when the outer query decided at some point after name resolution phase
- that this field might be null. Take this into account here.
- */
- if (orig_item)
- {
- save_maybe_null= item->maybe_null;
- item->maybe_null= orig_item->maybe_null;
- }
- result= create_tmp_field_from_item(thd, item, table, NULL,
- modify_item);
- *from_field= field->field;
- if (result && modify_item)
- field->result_field= result;
- if (orig_item)
- {
- item->maybe_null= save_maybe_null;
- result->field_name= orig_item->name;
- }
- }
- else if (table_cant_handle_bit_fields && field->field->type() ==
- MYSQL_TYPE_BIT)
- {
- const Type_handler *handler= item->type_handler_long_or_longlong();
- *from_field= field->field;
- if ((result=
- handler->make_and_init_table_field(&item->name,
- Record_addr(item->maybe_null),
- *item, table)))
- create_tmp_field_from_item_finalize(thd, result, item,
- copy_func, modify_item);
- if (result && modify_item)
- field->result_field= result;
- }
- else
- {
- LEX_CSTRING *tmp= orig_item ? &orig_item->name : &item->name;
- result= create_tmp_field_from_field(thd, (*from_field= field->field),
- tmp, table,
- modify_item ? field :
- NULL);
- }
-
- if (orig_type == Item::REF_ITEM && orig_modify)
- ((Item_ref*)orig_item)->set_result_field(result);
- /*
- Fields that are used as arguments to the DEFAULT() function already have
- their data pointers set to the default value during name resolution. See
- Item_default_value::fix_fields.
- */
- if (orig_type != Item::DEFAULT_VALUE_ITEM && field->field->eq_def(result))
- *default_field= field->field;
- return result;
- }
- /* Fall through */
- case Item::FUNC_ITEM:
- if (((Item_func *) item)->functype() == Item_func::FUNC_SP)
- {
- Item_func_sp *item_func_sp= (Item_func_sp *) item;
- Field *sp_result_field= item_func_sp->get_sp_result_field();
-
- if (make_copy_field)
- {
- DBUG_ASSERT(item_func_sp->result_field);
- *from_field= item_func_sp->result_field;
- }
- else
- {
- *((*copy_func)++)= item;
- }
- Field *result_field=
- create_tmp_field_from_field(thd,
- sp_result_field,
- &item_func_sp->name,
- table,
- NULL);
-
- if (modify_item)
- item->set_result_field(result_field);
-
- return result_field;
- }
-
- /* Fall through */
- case Item::COND_ITEM:
- case Item::SUBSELECT_ITEM:
- case Item::REF_ITEM:
- case Item::EXPR_CACHE_ITEM:
- if (make_copy_field)
- {
- DBUG_ASSERT(((Item_result_field*)item)->result_field);
- *from_field= ((Item_result_field*)item)->result_field;
- }
- /* Fall through */
- case Item::FIELD_AVG_ITEM:
- case Item::FIELD_STD_ITEM:
- case Item::PROC_ITEM:
- case Item::INT_ITEM:
- case Item::REAL_ITEM:
- case Item::DECIMAL_ITEM:
- case Item::STRING_ITEM:
- case Item::DATE_ITEM:
- case Item::NULL_ITEM:
- case Item::VARBIN_ITEM:
- case Item::CACHE_ITEM:
- case Item::WINDOW_FUNC_ITEM: // psergey-winfunc:
- case Item::PARAM_ITEM:
- return create_tmp_field_from_item(thd, item, table,
- (make_copy_field ? 0 : copy_func),
- modify_item);
- default: // Dosen't have to be stored
- return 0;
- }
+ Tmp_field_src src;
+ Tmp_field_param prm(group, modify_item, table_cant_handle_bit_fields,
+ make_copy_field);
+ Field *result= item->create_tmp_field_ex(table, &src, &prm);
+ *from_field= src.field();
+ *default_field= src.default_field();
+ if (src.item_result_field())
+ *((*copy_func)++)= src.item_result_field();
+ return result;
}
/*
@@ -17552,7 +18308,7 @@ setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps, uint field_count)
{
uint bitmap_size= bitmap_buffer_size(field_count);
- DBUG_ASSERT(table->s->virtual_fields == 0 && table->def_vcol_set == 0);
+ DBUG_ASSERT(table->s->virtual_fields == 0);
my_bitmap_init(&table->def_read_set, (my_bitmap_map*) bitmaps, field_count,
FALSE);
@@ -17782,20 +18538,16 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
table->temp_pool_slot = temp_pool_slot;
table->copy_blobs= 1;
table->in_use= thd;
- table->quick_keys.init();
- table->covering_keys.init();
- table->intersect_keys.init();
- table->keys_in_use_for_query.init();
table->no_rows_with_nulls= param->force_not_null_cols;
table->expr_arena= thd;
+ table->update_handler= NULL;
+ table->check_unique_buf= NULL;
table->s= share;
init_tmp_table_share(thd, share, "", 0, "(temporary)", tmpname);
share->blob_field= blob_field;
share->table_charset= param->table_charset;
share->primary_key= MAX_KEY; // Indicate no primary key
- share->keys_for_keyread.init();
- share->keys_in_use.init();
if (param->schema_table)
share->db= INFORMATION_SCHEMA_NAME;
@@ -17818,7 +18570,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
}
if (not_all_columns)
{
- if (item->with_sum_func && type != Item::SUM_FUNC_ITEM)
+ if (item->with_sum_func() && type != Item::SUM_FUNC_ITEM)
{
if (item->used_tables() & OUTER_REF_TABLE_BIT)
item->update_used_tables();
@@ -17848,7 +18600,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
{
Item *tmp_item;
Field *new_field=
- create_tmp_field(thd, table, arg, arg->type(), &copy_func,
+ create_tmp_field(table, arg, &copy_func,
tmp_from_field, &default_field[fieldnr],
group != 0,not_all_columns,
distinct, false);
@@ -17898,7 +18650,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
else
{
/*
- The last parameter to create_tmp_field() is a bit tricky:
+ The last parameter to create_tmp_field_ex() is a bit tricky:
We need to set it to 0 in union, to get fill_record() to modify the
temporary table.
@@ -17919,7 +18671,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
else
{
new_field=
- create_tmp_field(thd, table, item, type, &copy_func,
+ create_tmp_field(table, item, &copy_func,
tmp_from_field, &default_field[fieldnr],
group != 0,
!force_copy_fields &&
@@ -18533,12 +19285,10 @@ bool Virtual_tmp_table::add(List<Spvar_definition> &field_list)
while ((cdef= it++))
{
Field *tmp;
- if (!(tmp= cdef->make_field(s, in_use->mem_root, 0,
- (uchar*) (f_maybe_null(cdef->pack_flag) ? "" : 0),
- f_maybe_null(cdef->pack_flag) ? 1 : 0,
- &cdef->field_name)))
+ Record_addr addr(f_maybe_null(cdef->pack_flag));
+ if (!(tmp= cdef->make_field(s, in_use->mem_root, &addr, &cdef->field_name)))
DBUG_RETURN(true);
- add(tmp);
+ add(tmp);
}
DBUG_RETURN(false);
}
@@ -18658,7 +19408,7 @@ bool Virtual_tmp_table::sp_set_all_fields_from_item_list(THD *thd,
bool Virtual_tmp_table::sp_set_all_fields_from_item(THD *thd, Item *value)
{
- DBUG_ASSERT(value->fixed);
+ DBUG_ASSERT(value->is_fixed());
DBUG_ASSERT(value->cols() == s->fields);
for (uint i= 0; i < value->cols(); i++)
{
@@ -19082,7 +19832,7 @@ create_internal_tmp_table_from_heap(THD *thd, TABLE *table,
We don't want this error to be converted to a warning, e.g. in case of
INSERT IGNORE ... SELECT.
*/
- table->file->print_error(error, MYF(ME_FATALERROR));
+ table->file->print_error(error, MYF(ME_FATAL));
DBUG_RETURN(1);
}
new_table= *table;
@@ -19105,7 +19855,7 @@ create_internal_tmp_table_from_heap(THD *thd, TABLE *table,
new_table.no_rows= table->no_rows;
if (create_internal_tmp_table(&new_table, table->key_info, start_recinfo,
recinfo,
- thd->lex->select_lex.options |
+ thd->lex->first_select_lex()->options |
thd->variables.option_bits))
goto err2;
if (open_tmp_table(&new_table))
@@ -19900,6 +20650,8 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
if (!join_tab->preread_init_done && join_tab->preread_init())
DBUG_RETURN(NESTED_LOOP_ERROR);
+ join_tab->build_range_rowid_filter_if_needed();
+
join->return_tab= join_tab;
if (join_tab->last_inner)
@@ -20829,7 +21581,8 @@ test_if_quick_select(JOIN_TAB *tab)
int res= tab->select->test_quick_select(tab->join->thd, tab->keys,
(table_map) 0, HA_POS_ERROR, 0,
- FALSE, /*remove where parts*/FALSE);
+ FALSE, /*remove where parts*/FALSE,
+ FALSE);
if (tab->explain_plan && tab->explain_plan->range_checked_fer)
tab->explain_plan->range_checked_fer->collect_data(tab->select->quick);
@@ -20851,6 +21604,9 @@ int join_init_read_record(JOIN_TAB *tab)
*/
if (tab->distinct && tab->remove_duplicates()) // Remove duplicates.
return 1;
+
+ tab->build_range_rowid_filter_if_needed();
+
if (tab->filesort && tab->sort_table()) // Sort table.
return 1;
@@ -20868,6 +21624,8 @@ int join_init_read_record(JOIN_TAB *tab)
tab->join->thd->reset_killed(););
if (!tab->preread_init_done && tab->preread_init())
return 1;
+
+
if (init_read_record(&tab->read_record, tab->join->thd, tab->table,
tab->select, tab->filesort_result, 1,1, FALSE))
return 1;
@@ -20911,6 +21669,9 @@ JOIN_TAB::sort_table()
JOIN::ordered_index_order_by :
JOIN::ordered_index_group_by));
rc= create_sort_index(join->thd, join, this, NULL);
+ /* Disactivate rowid filter if it was used when creating sort index */
+ if (rowid_filter)
+ table->file->rowid_filter_is_active= false;
return (rc != 0);
}
@@ -22737,9 +23498,9 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
res= select->test_quick_select(tab->join->thd, new_ref_key_map, 0,
(tab->join->select_options &
OPTION_FOUND_ROWS) ?
- HA_POS_ERROR :
- tab->join->unit->select_limit_cnt,TRUE,
- TRUE, FALSE) <= 0;
+ HA_POS_ERROR :
+ tab->join->unit->select_limit_cnt,TRUE,
+ TRUE, FALSE, FALSE) <= 0;
if (res)
{
select->cond= save_cond;
@@ -22841,7 +23602,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
join->select_options & OPTION_FOUND_ROWS ?
HA_POS_ERROR :
join->unit->select_limit_cnt,
- TRUE, FALSE, FALSE);
+ TRUE, FALSE, FALSE, FALSE);
if (cond_saved)
select->cond= saved_cond;
@@ -22916,6 +23677,19 @@ check_reverse_order:
join_read_first:join_read_last;
tab->type=JT_NEXT; // Read with index_first(), index_next()
+ /*
+ Currently usage of rowid filters is not supported in InnoDB
+ if the table is accessed by the primary key
+ */
+ if (tab->rowid_filter &&
+ tab->index == table->s->primary_key &&
+ table->file->primary_key_is_clustered())
+ {
+ tab->range_rowid_filter_info= 0;
+ delete tab->rowid_filter;
+ tab->rowid_filter= 0;
+ }
+
if (tab->pre_idx_push_select_cond)
{
tab->set_cond(tab->pre_idx_push_select_cond);
@@ -22949,6 +23723,12 @@ check_reverse_order:
tab->use_quick=1;
tab->ref.key= -1;
tab->ref.key_parts=0; // Don't use ref key.
+ tab->range_rowid_filter_info= 0;
+ if (tab->rowid_filter)
+ {
+ delete tab->rowid_filter;
+ tab->rowid_filter= 0;
+ }
tab->read_first_record= join_init_read_record;
if (tab->is_using_loose_index_scan())
tab->join->tmp_table_param.precomputed_group_by= TRUE;
@@ -23358,7 +24138,7 @@ static int remove_dup_with_compare(THD *thd, TABLE *table, Field **first_field,
if (unlikely(copy_blobs(first_field)))
{
my_message(ER_OUTOFMEMORY, ER_THD(thd,ER_OUTOFMEMORY),
- MYF(ME_FATALERROR));
+ MYF(ME_FATAL));
error=0;
goto err;
}
@@ -23633,12 +24413,7 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array,
uint counter;
enum_resolution_type resolution;
- /*
- Local SP variables may be int but are expressions, not positions.
- (And they can't be used before fix_fields is called for them).
- */
- if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
- !from_window_spec)
+ if (order_item->is_order_clause_position() && !from_window_spec)
{ /* Order by position */
uint count;
if (order->counter_used)
@@ -23752,7 +24527,7 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array,
inspite of that fix_fields() calls find_item_in_list() one more
time.
- We check order_item->fixed because Item_func_group_concat can put
+ We check order_item->is_fixed() because Item_func_group_concat can put
arguments for which fix_fields already was called.
*/
if (order_item->fix_fields_if_needed_for_order_by(thd, order->item) ||
@@ -23805,8 +24580,8 @@ int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
if (find_order_in_list(thd, ref_pointer_array, tables, order, fields,
all_fields, false, true, from_window_spec))
return 1;
- if ((*order->item)->with_window_func &&
- context_analysis_place != IN_ORDER_BY)
+ Item * const item= *order->item;
+ if (item->with_window_func && context_analysis_place != IN_ORDER_BY)
{
my_error(ER_WINDOW_FUNCTION_IN_WINDOW_SPEC, MYF(0));
return 1;
@@ -23817,18 +24592,18 @@ int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
an ORDER BY clause
*/
- if (for_union &&
- ((*order->item)->with_sum_func ||
- (*order->item)->with_window_func))
+ if (for_union && (item->with_sum_func() || item->with_window_func))
{
my_error(ER_AGGREGATE_ORDER_FOR_UNION, MYF(0), number);
return 1;
}
- if (from_window_spec && (*order->item)->with_sum_func &&
- (*order->item)->type() != Item::SUM_FUNC_ITEM)
- (*order->item)->split_sum_func(thd, ref_pointer_array,
- all_fields, SPLIT_SUM_SELECT);
+ if ((from_window_spec && item->with_sum_func() &&
+ item->type() != Item::SUM_FUNC_ITEM) || item->with_window_func)
+ {
+ item->split_sum_func(thd, ref_pointer_array,
+ all_fields, SPLIT_SUM_SELECT);
+ }
}
return 0;
}
@@ -23883,7 +24658,7 @@ setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
all_fields, true, true, from_window_spec))
return 1;
(*ord->item)->marker= UNDEF_POS; /* Mark found */
- if ((*ord->item)->with_sum_func && context_analysis_place == IN_GROUP_BY)
+ if ((*ord->item)->with_sum_func() && context_analysis_place == IN_GROUP_BY)
{
my_error(ER_WRONG_GROUP_FIELD, MYF(0), (*ord->item)->full_name());
return 1;
@@ -23896,7 +24671,7 @@ setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
my_error(ER_WINDOW_FUNCTION_IN_WINDOW_SPEC, MYF(0));
return 1;
}
- if (from_window_spec && (*ord->item)->with_sum_func &&
+ if (from_window_spec && (*ord->item)->with_sum_func() &&
(*ord->item)->type() != Item::SUM_FUNC_ITEM)
(*ord->item)->split_sum_func(thd, ref_pointer_array,
all_fields, SPLIT_SUM_SELECT);
@@ -24046,7 +24821,7 @@ create_distinct_group(THD *thd, Ref_ptr_array ref_pointer_array,
li.rewind();
while ((item=li++))
{
- if (!item->const_item() && !item->with_sum_func && !item->marker)
+ if (!item->const_item() && !item->with_sum_func() && !item->marker)
{
/*
Don't put duplicate columns from the SELECT list into the
@@ -24143,9 +24918,11 @@ count_field_types(SELECT_LEX *select_lex, TMP_TABLE_PARAM *param,
}
else
{
+ With_sum_func_cache *cache= field->get_with_sum_func_cache();
param->func_count++;
- if (reset_with_sum_func)
- field->with_sum_func=0;
+ // "field" can point to Item_std_field, so "cache" can be NULL here.
+ if (reset_with_sum_func && cache)
+ cache->reset_with_sum_func();
}
}
}
@@ -24285,7 +25062,7 @@ void calc_group_buffer(TMP_TABLE_PARAM *param, ORDER *group)
{
/*
Group strings are taken as varstrings and require an length field.
- A field is not yet created by create_tmp_field()
+ A field is not yet created by create_tmp_field_ex()
and the sizes should match up.
*/
key_length+= group_item->max_length + HA_KEY_BLOB_LENGTH;
@@ -24295,7 +25072,7 @@ void calc_group_buffer(TMP_TABLE_PARAM *param, ORDER *group)
default:
/* This case should never be choosen */
DBUG_ASSERT(0);
- my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
+ my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
}
}
parts++;
@@ -24549,7 +25326,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
real_pos->real_type() == Item::SUBSELECT_ITEM ||
real_pos->type() == Item::CACHE_ITEM ||
real_pos->type() == Item::COND_ITEM) &&
- !real_pos->with_sum_func)
+ !real_pos->with_sum_func())
{ // Save for send fields
LEX_CSTRING real_name= pos->name;
pos= real_pos;
@@ -24560,7 +25337,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
on how the value is to be used: In some cases this may be an
argument in a group function, like: IF(ISNULL(col),0,COUNT(*))
*/
- if (!(pos=new (thd->mem_root) Item_copy_string(thd, pos)))
+ if (!(pos= pos->type_handler()->create_item_copy(thd, pos)))
goto err;
if (i < border) // HAVING, ORDER and GROUP BY
{
@@ -24615,8 +25392,8 @@ copy_fields(TMP_TABLE_PARAM *param)
(*ptr->do_copy)(ptr);
List_iterator_fast<Item> it(param->copy_funcs);
- Item_copy_string *item;
- while ((item = (Item_copy_string*) it++))
+ Item_copy *item;
+ while ((item= (Item_copy*) it++))
item->copy();
}
@@ -24759,7 +25536,7 @@ change_to_use_tmp_fields(THD *thd, Ref_ptr_array ref_pointer_array,
{
Field *field;
enum Item::Type item_type= item->type();
- if ((item->with_sum_func && item_type != Item::SUM_FUNC_ITEM) ||
+ if ((item->with_sum_func() && item_type != Item::SUM_FUNC_ITEM) ||
item->with_window_func)
item_field= item;
else if (item_type == Item::FIELD_ITEM ||
@@ -25069,7 +25846,7 @@ static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab)
}
if (unlikely(thd->is_fatal_error))
DBUG_RETURN(TRUE);
- if (!cond->fixed)
+ if (!cond->is_fixed())
{
Item *tmp_item= (Item*) cond;
cond->fix_fields(thd, &tmp_item);
@@ -25288,7 +26065,7 @@ bool JOIN::rollup_init()
Marking the expression item as 'with_sum_func' will ensure this.
*/
if (changed)
- item->with_sum_func= 1;
+ item->get_with_sum_func_cache()->set_with_sum_func();
}
}
return 0;
@@ -25630,11 +26407,13 @@ int print_explain_message_line(select_result_sink *result,
item_list.push_back(item_null, mem_root);
/* `rows` */
+ StringBuffer<64> rows_str;
if (rows)
{
- item_list.push_back(new (mem_root) Item_int(thd, *rows,
- MY_INT64_NUM_DECIMAL_DIGITS),
- mem_root);
+ rows_str.append_ulonglong((ulonglong)(*rows));
+ item_list.push_back(new (mem_root)
+ Item_string_sys(thd, rows_str.ptr(),
+ rows_str.length()), mem_root);
}
else
item_list.push_back(item_null, mem_root);
@@ -25734,7 +26513,7 @@ bool JOIN_TAB::save_explain_data(Explain_table_access *eta,
filesort)))
return 1;
}
-
+ // psergey-todo: data for filtering!
tracker= &eta->tracker;
jbuf_tracker= &eta->jbuf_tracker;
@@ -25776,7 +26555,8 @@ bool JOIN_TAB::save_explain_data(Explain_table_access *eta,
*/
if (real_table->merged_for_insert)
{
- TABLE_LIST *view_child= real_table->view->select_lex.table_list.first;
+ TABLE_LIST *view_child=
+ real_table->view->first_select_lex()->table_list.first;
for (;view_child; view_child= view_child->next_local)
{
if (view_child->table == table)
@@ -25834,6 +26614,22 @@ bool JOIN_TAB::save_explain_data(Explain_table_access *eta,
// psergey-todo: ^ check for error return code
/* Build "key", "key_len", and "ref" */
+
+ if (rowid_filter)
+ {
+ Range_rowid_filter *range_filter= (Range_rowid_filter *) rowid_filter;
+ QUICK_SELECT_I *quick= range_filter->get_select()->quick;
+
+ Explain_rowid_filter *erf= new (thd->mem_root) Explain_rowid_filter;
+ erf->quick= quick->get_explain(thd->mem_root);
+ erf->selectivity= range_rowid_filter_info->selectivity;
+ erf->rows= quick->records;
+ if (!(erf->tracker= new Rowid_filter_tracker(thd->lex->analyze_stmt)))
+ return 1;
+ rowid_filter->set_tracker(erf->tracker);
+ eta->rowid_filter= erf;
+ }
+
if (tab_type == JT_NEXT)
{
key_info= table->key_info+index;
@@ -26238,8 +27034,9 @@ int JOIN::save_explain_data_intern(Explain_query *output,
{
JOIN *join= this; /* Legacy: this code used to be a non-member function */
DBUG_ENTER("JOIN::save_explain_data_intern");
- DBUG_PRINT("info", ("Select %p, type %s, message %s",
- join->select_lex, join->select_lex->type,
+ DBUG_PRINT("info", ("Select %p (%u), type %s, message %s",
+ join->select_lex, join->select_lex->select_number,
+ join->select_lex->type,
message ? message : "NULL"));
DBUG_ASSERT(have_query_plan == QEP_AVAILABLE);
/* fake_select_lex is created/printed by Explain_union */
@@ -26265,7 +27062,7 @@ int JOIN::save_explain_data_intern(Explain_query *output,
explain->select_id= join->select_lex->select_number;
explain->select_type= join->select_lex->type;
- explain->linkage= select_lex->linkage;
+ explain->linkage= select_lex->get_linkage();
explain->using_temporary= need_tmp;
explain->using_filesort= need_order_arg;
/* Setting explain->message means that all other members are invalid */
@@ -26288,7 +27085,7 @@ int JOIN::save_explain_data_intern(Explain_query *output,
explain->select_id= select_lex->select_number;
explain->select_type= select_lex->type;
- explain->linkage= select_lex->linkage;
+ explain->linkage= select_lex->get_linkage();
explain->using_temporary= need_tmp;
explain->using_filesort= need_order_arg;
explain->message= "Storage engine handles GROUP BY";
@@ -26311,8 +27108,8 @@ int JOIN::save_explain_data_intern(Explain_query *output,
join->select_lex->set_explain_type(true);
xpl_sel->select_id= join->select_lex->select_number;
xpl_sel->select_type= join->select_lex->type;
- xpl_sel->linkage= select_lex->linkage;
- xpl_sel->is_lateral= ((select_lex->linkage == DERIVED_TABLE_TYPE) &&
+ xpl_sel->linkage= select_lex->get_linkage();
+ xpl_sel->is_lateral= ((select_lex->get_linkage() == DERIVED_TABLE_TYPE) &&
(select_lex->uncacheable & UNCACHEABLE_DEPENDENT));
if (select_lex->master_unit()->derived)
xpl_sel->connection_type= Explain_node::EXPLAIN_NODE_DERIVED;
@@ -26394,26 +27191,35 @@ int JOIN::save_explain_data_intern(Explain_query *output,
output->add_node(xpl_sel);
}
- for (SELECT_LEX_UNIT *tmp_unit= join->select_lex->first_inner_unit();
- tmp_unit;
- tmp_unit= tmp_unit->next_unit())
+ /*
+ Don't try to add query plans for child selects if this select was pushed
+ down into a Smart Storage Engine:
+ - the entire statement was pushed down ("PUSHED SELECT"), or
+ - this derived table was pushed down ("PUSHED DERIVED")
+ */
+ if (!select_lex->pushdown_select && select_lex->type != pushed_derived_text)
{
- /*
- Display subqueries only if
- (1) they are not parts of ON clauses that were eliminated by table
- elimination.
- (2) they are not merged derived tables
- (3) they are not hanging CTEs (they are needed for execution)
- */
- if (!(tmp_unit->item && tmp_unit->item->eliminated) && // (1)
- (!tmp_unit->derived ||
- tmp_unit->derived->is_materialized_derived()) && // (2)
- (!tmp_unit->with_element ||
- (tmp_unit->derived &&
- tmp_unit->derived->derived_result &&
- !tmp_unit->with_element->is_hanging_recursive()))) // (3)
- {
- explain->add_child(tmp_unit->first_select()->select_number);
+ for (SELECT_LEX_UNIT *tmp_unit= join->select_lex->first_inner_unit();
+ tmp_unit;
+ tmp_unit= tmp_unit->next_unit())
+ {
+ /*
+ Display subqueries only if
+ (1) they are not parts of ON clauses that were eliminated by table
+ elimination.
+ (2) they are not merged derived tables
+ (3) they are not hanging CTEs (they are needed for execution)
+ */
+ if (!(tmp_unit->item && tmp_unit->item->eliminated) && // (1)
+ (!tmp_unit->derived ||
+ tmp_unit->derived->is_materialized_derived()) && // (2)
+ (!tmp_unit->with_element ||
+ (tmp_unit->derived &&
+ tmp_unit->derived->derived_result &&
+ !tmp_unit->with_element->is_hanging_recursive()))) // (3)
+ {
+ explain->add_child(tmp_unit->first_select()->select_number);
+ }
}
}
@@ -26446,7 +27252,16 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
THD *thd=join->thd;
select_result *result=join->result;
DBUG_ENTER("select_describe");
-
+
+ if (join->select_lex->pushdown_select)
+ {
+ /*
+ The whole statement was pushed down to a Smart Storage Engine. Do not
+ attempt to produce a query plan locally.
+ */
+ DBUG_VOID_RETURN;
+ }
+
/* Update the QPF with latest values of using_temporary, using_filesort */
for (SELECT_LEX_UNIT *unit= join->select_lex->first_inner_unit();
unit;
@@ -26460,7 +27275,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
for such queries, we'll get here before having called
subquery_expr->fix_fields(), which will cause failure to
*/
- if (unit->item && !unit->item->fixed)
+ if (unit->item && !unit->item->is_fixed())
{
Item *ref= unit->item;
if (unit->item->fix_fields(thd, &ref))
@@ -26494,6 +27309,7 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
DBUG_ENTER("mysql_explain_union");
bool res= 0;
SELECT_LEX *first= unit->first_select();
+ bool is_pushed_union= unit->derived && unit->derived->pushdown_derived;
for (SELECT_LEX *sl= first; sl; sl= sl->next_select())
{
@@ -26514,7 +27330,10 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
}
if (!(res= unit->prepare(unit->derived, result,
SELECT_NO_UNLOCK | SELECT_DESCRIBE)))
- res= unit->exec();
+ {
+ if (!is_pushed_union)
+ res= unit->exec();
+ }
if (unit->union_needs_tmp_table() && unit->fake_select_lex)
unit->fake_select_lex->options= save_options;
@@ -26535,6 +27354,13 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
first->options | thd->variables.option_bits | SELECT_DESCRIBE,
result, unit, first);
}
+
+ if (unit->derived && unit->derived->pushdown_derived)
+ {
+ delete unit->derived->pushdown_derived;
+ unit->derived->pushdown_derived= NULL;
+ }
+
DBUG_RETURN(res || thd->is_error());
}
@@ -26792,7 +27618,8 @@ void TABLE_LIST::print(THD *thd, table_map eliminated_tables, String *str,
// A view
if (!(belong_to_view &&
- belong_to_view->compact_view_format))
+ belong_to_view->compact_view_format) &&
+ !(query_type & QT_ITEM_IDENT_SKIP_DB_NAMES))
{
append_identifier(thd, str, &view_db);
str->append('.');
@@ -26821,7 +27648,8 @@ void TABLE_LIST::print(THD *thd, table_map eliminated_tables, String *str,
// A normal table
if (!(belong_to_view &&
- belong_to_view->compact_view_format))
+ belong_to_view->compact_view_format) &&
+ !(query_type & QT_ITEM_IDENT_SKIP_DB_NAMES))
{
append_identifier(thd, str, &db);
str->append('.');
@@ -26908,6 +27736,18 @@ void st_select_lex::print(THD *thd, String *str, enum_query_type query_type)
{
str->append("/* select#");
str->append_ulonglong(select_number);
+ if (thd->lex->describe & DESCRIBE_EXTENDED2)
+ {
+ str->append("/");
+ str->append_ulonglong(nest_level);
+
+ if (master_unit()->fake_select_lex &&
+ master_unit()->first_select() == this)
+ {
+ str->append(" Filter Select: ");
+ master_unit()->fake_select_lex->print(thd, str, query_type);
+ }
+ }
str->append(" */ ");
}
@@ -26939,18 +27779,21 @@ void st_select_lex::print(THD *thd, String *str, enum_query_type query_type)
str->append(STRING_WITH_LEN("sql_buffer_result "));
if (options & OPTION_FOUND_ROWS)
str->append(STRING_WITH_LEN("sql_calc_found_rows "));
- switch (sql_cache)
+ if (this == parent_lex->first_select_lex())
{
- case SQL_NO_CACHE:
- str->append(STRING_WITH_LEN("sql_no_cache "));
- break;
- case SQL_CACHE:
- str->append(STRING_WITH_LEN("sql_cache "));
- break;
- case SQL_CACHE_UNSPECIFIED:
- break;
- default:
- DBUG_ASSERT(0);
+ switch (parent_lex->sql_cache)
+ {
+ case LEX::SQL_NO_CACHE:
+ str->append(STRING_WITH_LEN("sql_no_cache "));
+ break;
+ case LEX::SQL_CACHE:
+ str->append(STRING_WITH_LEN("sql_cache "));
+ break;
+ case LEX::SQL_CACHE_UNSPECIFIED:
+ break;
+ default:
+ DBUG_ASSERT(0);
+ }
}
//Item List
@@ -27359,16 +28202,22 @@ void JOIN::cache_const_exprs()
/*
- Get a cost of reading rows_limit rows through index keynr.
+ Get the cost of using index keynr to read #LIMIT matching rows
@detail
- If there is a quick select, we try to use it.
- if there is a ref(const) access, we try to use it, too.
- quick and ref(const) use different cost formulas, so if both are possible
we should make a cost-based choice.
-
+
+ rows_limit is the number of rows we would need to read when using a full
+ index scan. This is generally higher than the N from "LIMIT N" clause,
+ because there's a WHERE condition (a part of which is used to construct a
+ range access we are considering using here)
+
@param tab JOIN_TAB with table access (is NULL for single-table
UPDATE/DELETE)
+ @param rows_limit See explanation above
@param read_time OUT Cost of reading using quick or ref(const) access.
@@ -27381,7 +28230,8 @@ void JOIN::cache_const_exprs()
static bool get_range_limit_read_cost(const JOIN_TAB *tab,
const TABLE *table,
- uint keynr,
+ ha_rows table_records,
+ uint keynr,
ha_rows rows_limit,
double *read_time)
{
@@ -27445,8 +28295,32 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab,
}
}
}
-
- if (best_rows > rows_limit)
+
+ /*
+ Consider an example:
+
+ SELECT *
+ FROM t1
+ WHERE key1 BETWEEN 10 AND 20 AND col2='foo'
+ ORDER BY key1 LIMIT 10
+
+ If we were using a full index scan on key1, we would need to read this
+ many rows to get 10 matches:
+
+ 10 / selectivity(key1 BETWEEN 10 AND 20 AND col2='foo')
+
+ This is the number we get in rows_limit.
+ But we intend to use range access on key1. The rows returned by quick
+ select will satisfy the range part of the condition,
+ "key1 BETWEEN 10 and 20". We will still need to filter them with
+ the remainder condition, (col2='foo').
+
+ The selectivity of the range access is (best_rows/table_records). We need
+ to discount it from the rows_limit:
+ */
+ double rows_limit_for_quick= rows_limit * (best_rows / table_records);
+
+ if (best_rows > rows_limit_for_quick)
{
/*
LIMIT clause specifies that we will need to read fewer records than
@@ -27455,7 +28329,7 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab,
only need 1/3rd of records, it will cost us 1/3rd of quick select's
read time)
*/
- best_cost *= rows_limit / best_rows;
+ best_cost *= rows_limit_for_quick / best_rows;
}
*read_time= best_cost;
res= true;
@@ -27527,6 +28401,12 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
bool group= join && join->group && order == join->group_list;
ha_rows refkey_rows_estimate= table->quick_condition_rows;
const bool has_limit= (select_limit_arg != HA_POS_ERROR);
+ THD* thd= join ? join->thd : table->in_use;
+
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_object trace_cheaper_ordering(
+ thd, "reconsidering_access_paths_for_index_ordering");
+ trace_cheaper_ordering.add("clause", group ? "GROUP BY" : "ORDER BY");
/*
If not used with LIMIT, only use keys if the whole query can be
@@ -27556,16 +28436,21 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
uint tablenr= (uint)(tab - join->join_tab);
read_time= join->best_positions[tablenr].read_time;
for (uint i= tablenr+1; i < join->table_count; i++)
+ {
fanout*= join->best_positions[i].records_read; // fanout is always >= 1
+ // But selectivity is =< 1 :
+ fanout*= join->best_positions[i].cond_selectivity;
+ }
}
else
read_time= table->file->scan_time();
+ trace_cheaper_ordering.add("fanout", fanout);
/*
TODO: add cost of sorting here.
*/
read_time += COST_EPS;
-
+ trace_cheaper_ordering.add("read_time", read_time);
/*
Calculate the selectivity of the ref_key for REF_ACCESS. For
RANGE_ACCESS we use table->quick_condition_rows.
@@ -27590,11 +28475,20 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
set_if_bigger(refkey_rows_estimate, 1);
}
+ if (tab)
+ trace_cheaper_ordering.add_table_name(tab);
+ else
+ trace_cheaper_ordering.add_table_name(table);
+ trace_cheaper_ordering.add("rows_estimation", refkey_rows_estimate);
+
+ Json_writer_array possible_keys(thd,"possible_keys");
for (nr=0; nr < table->s->keys ; nr++)
{
int direction;
ha_rows select_limit= select_limit_arg;
uint used_key_parts= 0;
+ Json_writer_object possible_key(thd);
+ possible_key.add("index", table->key_info[nr].name);
if (keys.is_set(nr) &&
(direction= test_if_order_by_key(join, order, table, nr,
@@ -27607,6 +28501,7 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
*/
DBUG_ASSERT (ref_key != (int) nr);
+ possible_key.add("can_resolve_order", true);
bool is_covering= (table->covering_keys.is_set(nr) ||
(table->file->index_flags(nr, 0, 1) &
HA_CLUSTERED_INDEX));
@@ -27702,6 +28597,24 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
*/
select_limit= (ha_rows) (select_limit < fanout ?
1 : select_limit/fanout);
+
+ /*
+ refkey_rows_estimate is E(#rows) produced by the table access
+ strategy that was picked without regard to ORDER BY ... LIMIT.
+
+ It will be used as the source of selectivity data.
+ Use table->cond_selectivity as a better estimate which includes
+ condition selectivity too.
+ */
+ {
+ // we use MIN(...), because "Using LooseScan" queries have
+ // cond_selectivity=1 while refkey_rows_estimate has a better
+ // estimate.
+ refkey_rows_estimate= MY_MIN(refkey_rows_estimate,
+ ha_rows(table_records *
+ table->cond_selectivity));
+ }
+
/*
We assume that each of the tested indexes is not correlated
with ref_key. Thus, to select first N records we have to scan
@@ -27712,12 +28625,14 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
N/(refkey_rows_estimate/table_records) > table_records
<=> N > refkey_rows_estimate.
*/
+
if (select_limit > refkey_rows_estimate)
select_limit= table_records;
else
select_limit= (ha_rows) (select_limit *
(double) table_records /
refkey_rows_estimate);
+ possible_key.add("updated_limit", select_limit);
rec_per_key= keyinfo->actual_rec_per_key(keyinfo->user_defined_key_parts-1);
set_if_bigger(rec_per_key, 1);
/*
@@ -27734,12 +28649,14 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
index_scan_time= select_limit/rec_per_key *
MY_MIN(rec_per_key, table->file->scan_time());
double range_scan_time;
- if (get_range_limit_read_cost(tab, table, nr, select_limit,
- &range_scan_time))
+ if (get_range_limit_read_cost(tab, table, table_records, nr,
+ select_limit, &range_scan_time))
{
+ possible_key.add("range_scan_time", range_scan_time);
if (range_scan_time < index_scan_time)
index_scan_time= range_scan_time;
}
+ possible_key.add("index_scan_time", index_scan_time);
if ((ref_key < 0 && (group || table->force_index || is_covering)) ||
index_scan_time < read_time)
@@ -27750,17 +28667,29 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
table->covering_keys.is_set(ref_key)) ?
refkey_rows_estimate :
HA_POS_ERROR;
- if ((is_best_covering && !is_covering) ||
- (is_covering && refkey_select_limit < select_limit))
+ if (is_best_covering && !is_covering)
+ {
+ possible_key.add("chosen", false);
+ possible_key.add("cause", "covering index already found");
continue;
+ }
+
+ if (is_covering && refkey_select_limit < select_limit)
+ {
+ possible_key.add("chosen", false);
+ possible_key.add("cause", "ref estimates better");
+ continue;
+ }
if (table->quick_keys.is_set(nr))
quick_records= table->quick_rows[nr];
+ possible_key.add("records", quick_records);
if (best_key < 0 ||
(select_limit <= MY_MIN(quick_records,best_records) ?
keyinfo->user_defined_key_parts < best_key_parts :
quick_records < best_records) ||
(!is_best_covering && is_covering))
{
+ possible_key.add("chosen", true);
best_key= nr;
best_key_parts= keyinfo->user_defined_key_parts;
if (saved_best_key_parts)
@@ -27770,8 +28699,47 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
best_key_direction= direction;
best_select_limit= select_limit;
}
- }
- }
+ else
+ {
+ char const *cause;
+ possible_key.add("chosen", false);
+ if (is_covering)
+ cause= "covering index already found";
+ else
+ {
+ if (select_limit <= MY_MIN(quick_records,best_records))
+ cause= "keyparts greater than the current best keyparts";
+ else
+ cause= "rows estimation greater";
+ }
+ possible_key.add("cause", cause);
+ }
+ }
+ else
+ {
+ possible_key.add("usable", false);
+ possible_key.add("cause", "cost");
+ }
+ }
+ else
+ {
+ possible_key.add("usable", false);
+ if (!group && select_limit == HA_POS_ERROR)
+ possible_key.add("cause", "order by without limit");
+ }
+ }
+ else
+ {
+ if (keys.is_set(nr))
+ {
+ possible_key.add("can_resolve_order", false);
+ possible_key.add("cause", "order can not be resolved by key");
+ }
+ else
+ {
+ possible_key.add("can_resolve_order", false);
+ possible_key.add("cause", "not usable index for the query");
+ }
}
}
@@ -28187,6 +29155,7 @@ Item *remove_pushed_top_conjuncts(THD *thd, Item *cond)
return cond;
}
+
/*
There are 5 cases in which we shortcut the join optimization process as we
conclude that the join would be a degenerate one
@@ -28200,7 +29169,6 @@ Item *remove_pushed_top_conjuncts(THD *thd, Item *cond)
*/
-
void JOIN::handle_implicit_grouping_with_window_funcs()
{
if (select_lex->have_window_funcs() && send_row_on_empty_set())
@@ -28210,6 +29178,7 @@ void JOIN::handle_implicit_grouping_with_window_funcs()
}
+
/*
@brief
Perform a partial cleanup for the JOIN_TAB structure
@@ -28244,5 +29213,45 @@ void JOIN_TAB::partial_cleanup()
/**
+ @brief
+ Look for provision of the select_handler interface by a foreign engine
+
+ @param thd The thread handler
+
+ @details
+ The function checks that this is an upper level select and if so looks
+ through its tables searching for one whose handlerton owns a
+ create_select call-back function. If the call of this function returns
+ a select_handler interface object then the server will push the select
+ query into this engine.
+ This is a responsibility of the create_select call-back function to
+ check whether the engine can execute the query.
+
+ @retval the found select_handler if the search is successful
+ 0 otherwise
+*/
+
+select_handler *SELECT_LEX::find_select_handler(THD *thd)
+{
+ if (next_select())
+ return 0;
+ if (master_unit()->outer_select())
+ return 0;
+ for (TABLE_LIST *tbl= join->tables_list; tbl; tbl= tbl->next_global)
+ {
+ if (!tbl->table)
+ continue;
+ handlerton *ht= tbl->table->file->partition_ht();
+ if (!ht->create_select)
+ continue;
+ select_handler *sh= ht->create_select(thd, this);
+ return sh;
+ }
+ return 0;
+}
+
+
+
+/**
@} (end of group Query_Optimizer)
*/
diff --git a/sql/sql_select.h b/sql/sql_select.h
index a953354abb0..ecfa4c6fd11 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -231,6 +231,10 @@ Next_select_func setup_end_select_func(JOIN *join, JOIN_TAB *tab);
int rr_sequential(READ_RECORD *info);
int rr_sequential_and_unpack(READ_RECORD *info);
Item *remove_pushed_top_conjuncts(THD *thd, Item *cond);
+Item *and_new_conditions_to_optimized_cond(THD *thd, Item *cond,
+ COND_EQUAL **cond_eq,
+ List<Item> &new_conds,
+ Item::cond_result *cond_value);
#include "sql_explain.h"
@@ -516,6 +520,18 @@ typedef struct st_join_table {
bool preread_init_done;
+ /*
+ Cost info to the range filter used when joining this join table
+ (Defined when the best join order has been already chosen)
+ */
+ Range_rowid_filter_cost_info *range_rowid_filter_info;
+ /* Rowid filter to be used when joining this join table */
+ Rowid_filter *rowid_filter;
+ /* Becomes true just after the used range filter has been built / filled */
+ bool is_rowid_filter_built;
+
+ void build_range_rowid_filter_if_needed();
+
void cleanup();
inline bool is_using_loose_index_scan()
{
@@ -688,8 +704,6 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
bool end_of_records);
-struct st_position;
-
class Semi_join_strategy_picker
{
public:
@@ -700,7 +714,7 @@ public:
Update internal state after another table has been added to the join
prefix
*/
- virtual void set_from_prev(struct st_position *prev) = 0;
+ virtual void set_from_prev(POSITION *prev) = 0;
virtual bool check_qep(JOIN *join,
uint idx,
@@ -710,7 +724,7 @@ public:
double *read_time,
table_map *handled_fanout,
sj_strategy_enum *strategy,
- struct st_position *loose_scan_pos) = 0;
+ POSITION *loose_scan_pos) = 0;
virtual void mark_used() = 0;
@@ -741,7 +755,7 @@ public:
first_dupsweedout_table= MAX_TABLES;
is_used= FALSE;
}
- void set_from_prev(struct st_position *prev);
+ void set_from_prev(POSITION *prev);
bool check_qep(JOIN *join,
uint idx,
@@ -751,7 +765,7 @@ public:
double *read_time,
table_map *handled_fanout,
sj_strategy_enum *stratey,
- struct st_position *loose_scan_pos);
+ POSITION *loose_scan_pos);
void mark_used() { is_used= TRUE; }
friend void fix_semijoin_strategies_for_picked_join_order(JOIN *join);
@@ -787,7 +801,7 @@ public:
is_used= FALSE;
}
- void set_from_prev(struct st_position *prev);
+ void set_from_prev(POSITION *prev);
bool check_qep(JOIN *join,
uint idx,
table_map remaining_tables,
@@ -796,7 +810,7 @@ public:
double *read_time,
table_map *handled_fanout,
sj_strategy_enum *strategy,
- struct st_position *loose_scan_pos);
+ POSITION *loose_scan_pos);
void mark_used() { is_used= TRUE; }
friend void fix_semijoin_strategies_for_picked_join_order(JOIN *join);
@@ -805,6 +819,7 @@ public:
class LooseScan_picker : public Semi_join_strategy_picker
{
+public:
/* The first (i.e. driving) table we're doing loose scan for */
uint first_loosescan_table;
/*
@@ -823,14 +838,13 @@ class LooseScan_picker : public Semi_join_strategy_picker
uint loosescan_parts; /* Number of keyparts to be kept distinct */
bool is_used;
-public:
void set_empty()
{
first_loosescan_table= MAX_TABLES;
is_used= FALSE;
}
- void set_from_prev(struct st_position *prev);
+ void set_from_prev(POSITION *prev);
bool check_qep(JOIN *join,
uint idx,
table_map remaining_tables,
@@ -839,19 +853,19 @@ public:
double *read_time,
table_map *handled_fanout,
sj_strategy_enum *strategy,
- struct st_position *loose_scan_pos);
+ POSITION *loose_scan_pos);
void mark_used() { is_used= TRUE; }
friend class Loose_scan_opt;
friend void best_access_path(JOIN *join,
JOIN_TAB *s,
table_map remaining_tables,
- const struct st_position *join_positions,
+ const POSITION *join_positions,
uint idx,
bool disable_jbuf,
double record_count,
- struct st_position *pos,
- struct st_position *loose_scan_pos);
+ POSITION *pos,
+ POSITION *loose_scan_pos);
friend bool get_best_combination(JOIN *join);
friend int setup_semijoin_loosescan(JOIN *join);
friend void fix_semijoin_strategies_for_picked_join_order(JOIN *join);
@@ -878,7 +892,7 @@ public:
sjm_scan_last_inner= 0;
is_used= FALSE;
}
- void set_from_prev(struct st_position *prev);
+ void set_from_prev(POSITION *prev);
bool check_qep(JOIN *join,
uint idx,
table_map remaining_tables,
@@ -887,19 +901,24 @@ public:
double *read_time,
table_map *handled_fanout,
sj_strategy_enum *strategy,
- struct st_position *loose_scan_pos);
+ POSITION *loose_scan_pos);
void mark_used() { is_used= TRUE; }
friend void fix_semijoin_strategies_for_picked_join_order(JOIN *join);
};
+class Range_rowid_filter_cost_info;
+class Rowid_filter;
+
+
/**
Information about a position of table within a join order. Used in join
optimization.
*/
-typedef struct st_position
+class POSITION
{
+public:
/* The table that's put into join order */
JOIN_TAB *table;
@@ -911,7 +930,7 @@ typedef struct st_position
double records_read;
/* The selectivity of the pushed down conditions */
- double cond_selectivity;
+ double cond_selectivity;
/*
Cost accessing the table in course of the entire complete join execution,
@@ -920,8 +939,6 @@ typedef struct st_position
*/
double read_time;
- /* Cumulative cost and record count for the join prefix */
- Cost_estimate prefix_cost;
double prefix_record_count;
/*
@@ -930,29 +947,46 @@ typedef struct st_position
*/
KEYUSE *key;
+ /* Info on splitting plan used at this position */
+ SplM_plan_info *spl_plan;
+
+ /* Cost info for the range filter used at this position */
+ Range_rowid_filter_cost_info *range_rowid_filter_info;
+
/* If ref-based access is used: bitmap of tables this table depends on */
table_map ref_depend_map;
-
+
/*
- TRUE <=> join buffering will be used. At the moment this is based on
- *very* imprecise guesses made in best_access_path().
+ Bitmap of semi-join inner tables that are in the join prefix and for
+ which there's no provision for how to eliminate semi-join duplicates
+ they produce.
*/
- bool use_join_buffer;
-
+ table_map dups_producing_tables;
+
+ table_map inner_tables_handled_with_other_sjs;
+
+ Duplicate_weedout_picker dups_weedout_picker;
+ Firstmatch_picker firstmatch_picker;
+ LooseScan_picker loosescan_picker;
+ Sj_materialization_picker sjmat_picker;
+
+ /* Cumulative cost and record count for the join prefix */
+ Cost_estimate prefix_cost;
+
/*
Current optimization state: Semi-join strategy to be used for this
and preceding join tables.
-
+
Join optimizer sets this for the *last* join_tab in the
- duplicate-generating range. That is, in order to interpret this field,
+ duplicate-generating range. That is, in order to interpret this field,
one needs to traverse join->[best_]positions array from right to left.
When you see a join table with sj_strategy!= SJ_OPT_NONE, some other
- field (depending on the strategy) tells how many preceding positions
+ field (depending on the strategy) tells how many preceding positions
this applies to. The values of covered_preceding_positions->sj_strategy
must be ignored.
*/
enum sj_strategy_enum sj_strategy;
-
+
/*
Valid only after fix_semijoin_strategies_for_picked_join_order() call:
if sj_strategy!=SJ_OPT_NONE, this is the number of subsequent tables that
@@ -961,22 +995,12 @@ typedef struct st_position
uint n_sj_tables;
/*
- Bitmap of semi-join inner tables that are in the join prefix and for
- which there's no provision for how to eliminate semi-join duplicates
- they produce.
+ TRUE <=> join buffering will be used. At the moment this is based on
+ *very* imprecise guesses made in best_access_path().
*/
- table_map dups_producing_tables;
-
- table_map inner_tables_handled_with_other_sjs;
-
- Duplicate_weedout_picker dups_weedout_picker;
- Firstmatch_picker firstmatch_picker;
- LooseScan_picker loosescan_picker;
- Sj_materialization_picker sjmat_picker;
-
- /* Info on splitting plan used at this position */
- SplM_plan_info *spl_plan;
-} POSITION;
+ bool use_join_buffer;
+ POSITION();
+};
typedef Bounds_checked_array<Item_null_result*> Item_null_array;
@@ -1493,6 +1517,11 @@ public:
Dynamic_array<KEYUSE_EXT> *ext_keyuses_for_splitting;
JOIN_TAB *sort_and_group_aggr_tab;
+ /*
+ Flag is set to true if select_lex was found to be degenerated before
+ the optimize_cond() call in JOIN::optimize_inner() method.
+ */
+ bool is_orig_degenerated;
JOIN(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg,
select_result *result_arg)
@@ -1573,6 +1602,7 @@ public:
fields_list= fields_arg;
non_agg_fields.empty();
bzero((char*) &keyuse,sizeof(keyuse));
+ having_value= Item::COND_UNDEF;
tmp_table_param.init();
tmp_table_param.end_write_records= HA_POS_ERROR;
rollup.state= ROLLUP::STATE_NONE;
@@ -1588,6 +1618,7 @@ public:
emb_sjm_nest= NULL;
sjm_lookup_tables= 0;
sjm_scan_tables= 0;
+ is_orig_degenerated= false;
}
/* True if the plan guarantees that it will be returned zero or one row */
@@ -1626,6 +1657,8 @@ public:
bool optimize_unflattened_subqueries();
bool optimize_constant_subqueries();
int init_join_caches();
+ bool make_range_rowid_filters();
+ bool init_range_rowid_filters();
bool make_sum_func_list(List<Item> &all_fields, List<Item> &send_fields,
bool before_group_by, bool recompute= FALSE);
@@ -1837,10 +1870,6 @@ bool setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
void copy_fields(TMP_TABLE_PARAM *param);
bool copy_funcs(Item **func_ptr, const THD *thd);
uint find_shortest_key(TABLE *table, const key_map *usable_keys);
-Field* create_tmp_field_from_field(THD *thd, Field* org_field,
- LEX_CSTRING *name, TABLE *table,
- Item_field *item);
-
bool is_indexed_agg_distinct(JOIN *join, List<Item_field> *out_args);
/* functions from opt_sum.cc */
@@ -2090,12 +2119,6 @@ bool mysql_select(THD *thd,
void free_underlaid_joins(THD *thd, SELECT_LEX *select);
bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit,
select_result *result);
-Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
- Item ***copy_func, Field **from_field,
- Field **def_field,
- bool group, bool modify_item,
- bool table_cant_handle_bit_fields,
- bool make_copy_field);
/*
General routine to change field->ptr of a NULL-terminated array of Field
@@ -2363,7 +2386,7 @@ Item_equal *find_item_equal(COND_EQUAL *cond_equal, Field *field,
extern bool test_if_ref(Item *,
Item_field *left_item,Item *right_item);
-inline bool optimizer_flag(THD *thd, uint flag)
+inline bool optimizer_flag(THD *thd, ulonglong flag)
{
return (thd->variables.optimizer_switch & flag);
}
@@ -2469,9 +2492,53 @@ public:
~Pushdown_query() { delete handler; }
/* Function that calls the above scan functions */
- int execute(JOIN *join);
+ int execute(JOIN *);
+};
+
+class derived_handler;
+
+class Pushdown_derived: public Sql_alloc
+{
+private:
+ bool is_analyze;
+public:
+ TABLE_LIST *derived;
+ derived_handler *handler;
+
+ Pushdown_derived(TABLE_LIST *tbl, derived_handler *h);
+
+ ~Pushdown_derived();
+
+ int execute();
+};
+
+
+class select_handler;
+
+
+class Pushdown_select: public Sql_alloc
+{
+private:
+ bool is_analyze;
+ List<Item> result_columns;
+ bool send_result_set_metadata();
+ bool send_data();
+ bool send_eof();
+
+public:
+ SELECT_LEX *select;
+ select_handler *handler;
+
+ Pushdown_select(SELECT_LEX *sel, select_handler *h);
+
+ ~Pushdown_select();
+
+ bool init();
+
+ int execute();
};
+
bool test_if_order_compatible(SQL_I_List<ORDER> &a, SQL_I_List<ORDER> &b);
int test_if_group_changed(List<Cached_item> &list);
int create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort);
@@ -2481,4 +2548,13 @@ JOIN_TAB *next_explain_order_tab(JOIN* join, JOIN_TAB* tab);
bool is_eliminated_table(table_map eliminated_tables, TABLE_LIST *tbl);
+bool check_simple_equality(THD *thd, const Item::Context &ctx,
+ Item *left_item, Item *right_item,
+ COND_EQUAL *cond_equal);
+
+void propagate_new_equalities(THD *thd, Item *cond,
+ List<Item_equal> *new_equalities,
+ COND_EQUAL *inherited,
+ bool *is_simplifiable_cond);
+
#endif /* SQL_SELECT_INCLUDED */
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index 40524702835..e2c1c504245 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -25,6 +25,9 @@
#include "transaction.h"
#include "lock.h"
#include "sql_acl.h"
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif
struct Field_definition
{
@@ -121,7 +124,7 @@ bool sequence_definition::check_and_adjust(bool set_reserved_until)
start >= min_value &&
max_value != LONGLONG_MAX &&
min_value != LONGLONG_MIN &&
- cache < (LONGLONG_MAX - max_increment) / max_increment &&
+ cache >= 0 && cache < (LONGLONG_MAX - max_increment) / max_increment &&
((real_increment > 0 && reserved_until >= min_value) ||
(real_increment < 0 && reserved_until <= max_value)))
DBUG_RETURN(FALSE);
@@ -231,8 +234,8 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
err:
my_error(ER_SEQUENCE_INVALID_TABLE_STRUCTURE, MYF(0),
- lex->select_lex.table_list.first->db.str,
- lex->select_lex.table_list.first->table_name.str, reason);
+ lex->first_select_lex()->table_list.first->db.str,
+ lex->first_select_lex()->table_list.first->table_name.str, reason);
DBUG_RETURN(TRUE);
}
@@ -308,6 +311,11 @@ bool sequence_insert(THD *thd, LEX *lex, TABLE_LIST *org_table_list)
DBUG_RETURN(TRUE);
}
+#ifdef WITH_WSREP
+ if (WSREP_ON && seq->cache != 0)
+ WSREP_WARN("CREATE SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+#endif
+
/* If not temporary table */
if (!temporary_table)
{
@@ -737,8 +745,8 @@ longlong SEQUENCE::next_value(TABLE *table, bool second_round, int *error)
if (real_increment > 0)
{
- if (reserved_until + add_to > max_value ||
- reserved_until > max_value - add_to)
+ if (reserved_until > max_value - add_to ||
+ reserved_until + add_to > max_value)
{
reserved_until= max_value + 1;
out_of_values= res_value >= reserved_until;
@@ -910,15 +918,28 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
No_such_table_error_handler no_such_table_handler;
DBUG_ENTER("Sql_cmd_alter_sequence::execute");
+
if (check_access(thd, ALTER_ACL, first_table->db.str,
&first_table->grant.privilege,
&first_table->grant.m_internal,
0, 0))
DBUG_RETURN(TRUE); /* purecov: inspected */
+#ifdef WITH_WSREP
+ if (WSREP_ON && new_seq->cache != 0)
+ WSREP_WARN("ALTER SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+#endif
+
if (check_grant(thd, ALTER_ACL, first_table, FALSE, 1, FALSE))
DBUG_RETURN(TRUE); /* purecov: inspected */
+#ifdef WITH_WSREP
+ if (WSREP_ON && WSREP(thd) &&
+ wsrep_to_isolation_begin(thd, first_table->db.str,
+ first_table->table_name.str,
+ first_table))
+ DBUG_RETURN(TRUE);
+#endif /* WITH_WSREP */
if (if_exists())
thd->push_internal_handler(&no_such_table_handler);
error= open_and_lock_tables(thd, first_table, FALSE, 0);
diff --git a/sql/sql_sequence.h b/sql/sql_sequence.h
index 2d609d8591b..29c589e67cd 100644
--- a/sql/sql_sequence.h
+++ b/sql/sql_sequence.h
@@ -111,8 +111,8 @@ public:
{
if (real_increment > 0)
{
- if (value + real_increment > max_value ||
- value > max_value - real_increment)
+ if (value > max_value - real_increment ||
+ value + real_increment > max_value)
value= max_value + 1;
else
value+= real_increment;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index a019c3c9dbd..267630df9b9 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2020, MariaDB
+ Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,6 +63,8 @@
#include "ha_partition.h"
#endif
#include "transaction.h"
+#include "opt_trace.h"
+#include "my_cpu.h"
#include "lex_symbol.h"
@@ -1047,9 +1049,9 @@ find_files(THD *thd, Dynamic_array<LEX_CSTRING*> *files, LEX_CSTRING *db,
if (!(dirp = my_dir(path, MY_THREAD_SPECIFIC | (db ? 0 : MY_WANT_STAT))))
{
if (my_errno == ENOENT)
- my_error(ER_BAD_DB_ERROR, MYF(ME_BELL | ME_WAITTANG), db->str);
+ my_error(ER_BAD_DB_ERROR, MYF(0), db->str);
else
- my_error(ER_CANT_READ_DIR, MYF(ME_BELL | ME_WAITTANG), path, my_errno);
+ my_error(ER_CANT_READ_DIR, MYF(0), path, my_errno);
DBUG_RETURN(FIND_FILES_DIR);
}
@@ -1577,7 +1579,6 @@ void
mysqld_list_fields(THD *thd, TABLE_LIST *table_list, const char *wild)
{
TABLE *table;
- MEM_ROOT *mem_root= thd->mem_root;
DBUG_ENTER("mysqld_list_fields");
DBUG_PRINT("enter",("table: %s", table_list->table_name.str));
@@ -1587,28 +1588,18 @@ mysqld_list_fields(THD *thd, TABLE_LIST *table_list, const char *wild)
DBUG_VOID_RETURN;
table= table_list->table;
- List<Item> field_list;
+ List<Field> field_list;
Field **ptr,*field;
for (ptr=table->field ; (field= *ptr); ptr++)
{
if (!wild || !wild[0] ||
!wild_case_compare(system_charset_info, field->field_name.str,wild))
- {
- if (table_list->view)
- field_list.push_back(new (mem_root)
- Item_ident_for_show(thd, field,
- table_list->view_db.str,
- table_list->view_name.str),
- mem_root);
- else
- field_list.push_back(new (mem_root) Item_field(thd, field), mem_root);
- }
+ field_list.push_back(field);
}
restore_record(table, s->default_values); // Get empty record
table->use_all_columns();
- if (thd->protocol->send_result_set_metadata(&field_list,
- Protocol::SEND_DEFAULTS))
+ if (thd->protocol->send_list_fields(&field_list, table_list))
DBUG_VOID_RETURN;
my_eof(thd);
DBUG_VOID_RETURN;
@@ -2103,6 +2094,22 @@ end_options:
append_directory(thd, packet, "INDEX", create_info.index_file_name);
}
+static void append_period(THD *thd, String *packet, const LEX_CSTRING &start,
+ const LEX_CSTRING &end, const LEX_CSTRING &period,
+ bool ident)
+{
+ packet->append(STRING_WITH_LEN(",\n PERIOD FOR "));
+ if (ident)
+ append_identifier(thd, packet, period.str, period.length);
+ else
+ packet->append(period);
+ packet->append(STRING_WITH_LEN(" ("));
+ append_identifier(thd, packet, start.str, start.length);
+ packet->append(STRING_WITH_LEN(", "));
+ append_identifier(thd, packet, end.str, end.length);
+ packet->append(STRING_WITH_LEN(")"));
+}
+
/*
Build a CREATE TABLE statement for a table.
@@ -2141,6 +2148,7 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
KEY *key_info;
TABLE *table= table_list->table;
TABLE_SHARE *share= table->s;
+ TABLE_SHARE::period_info_t &period= share->period;
sql_mode_t sql_mode= thd->variables.sql_mode;
bool explicit_fields= false;
bool foreign_db_mode= sql_mode & (MODE_POSTGRESQL | MODE_ORACLE |
@@ -2247,6 +2255,12 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
field->sql_type(type);
packet->append(type.ptr(), type.length(), system_charset_info);
+ DBUG_EXECUTE_IF("sql_type",
+ packet->append(" /* ");
+ packet->append(field->type_handler()->version().ptr());
+ packet->append(" */ ");
+ );
+
if (field->has_charset() && !(sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)))
{
if (field->charset() != share->table_charset)
@@ -2355,7 +2369,7 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
}
- key_info= table->key_info;
+ key_info= table->s->key_info;
primary_key= share->primary_key;
for (uint i=0 ; i < share->keys ; i++,key_info++)
@@ -2410,7 +2424,7 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
}
}
packet->append(')');
- store_key_options(thd, packet, table, key_info);
+ store_key_options(thd, packet, table, &table->key_info[i]);
if (key_info->parser)
{
LEX_CSTRING *parser_name= plugin_name(key_info->parser);
@@ -2432,11 +2446,8 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
DBUG_ASSERT(!explicit_fields || fe->invisible < INVISIBLE_SYSTEM);
if (explicit_fields)
{
- packet->append(STRING_WITH_LEN(",\n PERIOD FOR SYSTEM_TIME ("));
- append_identifier(thd,packet,fs->field_name.str, fs->field_name.length);
- packet->append(STRING_WITH_LEN(", "));
- append_identifier(thd,packet,fe->field_name.str, fe->field_name.length);
- packet->append(STRING_WITH_LEN(")"));
+ append_period(thd, packet, fs->field_name, fe->field_name,
+ table->s->vers.name, false);
}
else
{
@@ -2445,6 +2456,15 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
}
}
+ if (period.name)
+ {
+ append_period(thd, packet,
+ period.start_field(share)->field_name,
+ period.end_field(share)->field_name,
+ period.name, true);
+ }
+
+
/*
Get possible foreign key definitions stored in InnoDB and append them
to the CREATE TABLE statement
@@ -2462,8 +2482,12 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
for (uint i= share->field_check_constraints;
i < share->table_check_constraints ; i++)
{
- StringBuffer<MAX_FIELD_WIDTH> str(&my_charset_utf8mb4_general_ci);
Virtual_column_info *check= table->check_constraints[i];
+ // period constraint is implicit
+ if (share->period.constr_name.streq(check->name))
+ continue;
+
+ StringBuffer<MAX_FIELD_WIDTH> str(&my_charset_utf8mb4_general_ci);
check->print(&str);
packet->append(STRING_WITH_LEN(",\n "));
@@ -2535,7 +2559,8 @@ static void store_key_options(THD *thd, String *packet, TABLE *table,
if (key_info->algorithm == HA_KEY_ALG_BTREE)
packet->append(STRING_WITH_LEN(" USING BTREE"));
- if (key_info->algorithm == HA_KEY_ALG_HASH)
+ if (key_info->algorithm == HA_KEY_ALG_HASH ||
+ key_info->algorithm == HA_KEY_ALG_LONG_HASH)
packet->append(STRING_WITH_LEN(" USING HASH"));
/* send USING only in non-default case: non-spatial rtree */
@@ -2805,13 +2830,111 @@ static const char *thread_state_info(THD *tmp)
}
+struct list_callback_arg
+{
+ list_callback_arg(const char *u, THD *t, ulong m):
+ user(u), thd(t), max_query_length(m) {}
+ I_List<thread_info> thread_infos;
+ const char *user;
+ THD *thd;
+ ulong max_query_length;
+};
+
+
+static my_bool list_callback(THD *tmp, list_callback_arg *arg)
+{
+
+ Security_context *tmp_sctx= tmp->security_ctx;
+ bool got_thd_data;
+ if ((tmp->vio_ok() || tmp->system_thread) &&
+ (!arg->user || (!tmp->system_thread &&
+ tmp_sctx->user && !strcmp(tmp_sctx->user, arg->user))))
+ {
+ thread_info *thd_info= new (arg->thd->mem_root) thread_info;
+
+ thd_info->thread_id=tmp->thread_id;
+ thd_info->os_thread_id=tmp->os_thread_id;
+ thd_info->user= arg->thd->strdup(tmp_sctx->user ? tmp_sctx->user :
+ (tmp->system_thread ?
+ "system user" : "unauthenticated user"));
+ if (tmp->peer_port && (tmp_sctx->host || tmp_sctx->ip) &&
+ arg->thd->security_ctx->host_or_ip[0])
+ {
+ if ((thd_info->host= (char*) arg->thd->alloc(LIST_PROCESS_HOST_LEN+1)))
+ my_snprintf((char *) thd_info->host, LIST_PROCESS_HOST_LEN,
+ "%s:%u", tmp_sctx->host_or_ip, tmp->peer_port);
+ }
+ else
+ thd_info->host= arg->thd->strdup(tmp_sctx->host_or_ip[0] ?
+ tmp_sctx->host_or_ip :
+ tmp_sctx->host ? tmp_sctx->host : "");
+ thd_info->command=(int) tmp->get_command();
+
+ if ((got_thd_data= !trylock_short(&tmp->LOCK_thd_data)))
+ {
+ /* This is an approximation */
+ thd_info->proc_info= (char*) (tmp->killed >= KILL_QUERY ?
+ "Killed" : 0);
+
+ /* The following variables are only safe to access under a lock */
+ thd_info->db= 0;
+ if (tmp->db.str)
+ thd_info->db= arg->thd->strmake(tmp->db.str, tmp->db.length);
+
+ if (tmp->query())
+ {
+ uint length= MY_MIN(arg->max_query_length, tmp->query_length());
+ char *q= arg->thd->strmake(tmp->query(),length);
+ /* Safety: in case strmake failed, we set length to 0. */
+ thd_info->query_string=
+ CSET_STRING(q, q ? length : 0, tmp->query_charset());
+ }
+
+ /*
+ Progress report. We need to do this under a lock to ensure that all
+ is from the same stage.
+ */
+ if (tmp->progress.max_counter)
+ {
+ uint max_stage= MY_MAX(tmp->progress.max_stage, 1);
+ thd_info->progress= (((tmp->progress.stage / (double) max_stage) +
+ ((tmp->progress.counter /
+ (double) tmp->progress.max_counter) /
+ (double) max_stage)) *
+ 100.0);
+ set_if_smaller(thd_info->progress, 100);
+ }
+ else
+ thd_info->progress= 0.0;
+ }
+ else
+ {
+ thd_info->proc_info= "Busy";
+ thd_info->progress= 0.0;
+ thd_info->db= "";
+ }
+
+ thd_info->state_info= thread_state_info(tmp);
+ thd_info->start_time= tmp->start_utime;
+ ulonglong utime_after_query_snapshot= tmp->utime_after_query;
+ if (thd_info->start_time < utime_after_query_snapshot)
+ thd_info->start_time= utime_after_query_snapshot; // COM_SLEEP
+
+ if (got_thd_data)
+ mysql_mutex_unlock(&tmp->LOCK_thd_data);
+ arg->thread_infos.append(thd_info);
+ }
+ return 0;
+}
+
+
void mysqld_list_processes(THD *thd,const char *user, bool verbose)
{
Item *field;
List<Item> field_list;
- I_List<thread_info> thread_infos;
- ulong max_query_length= (verbose ? thd->variables.max_allowed_packet :
- PROCESS_LIST_WIDTH);
+ list_callback_arg arg(user, thd,
+ verbose ? thd->variables.max_allowed_packet :
+ PROCESS_LIST_WIDTH);
Protocol *protocol= thd->protocol;
MEM_ROOT *mem_root= thd->mem_root;
DBUG_ENTER("mysqld_list_processes");
@@ -2842,7 +2965,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
mem_root);
field->maybe_null=1;
field_list.push_back(field=new (mem_root)
- Item_empty_string(thd, "Info", max_query_length),
+ Item_empty_string(thd, "Info", arg.max_query_length),
mem_root);
field->maybe_null=1;
if (!thd->variables.old_mode &&
@@ -2861,102 +2984,13 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
if (thd->killed)
DBUG_VOID_RETURN;
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
- I_List_iterator<THD> it(threads);
- THD *tmp;
- while ((tmp=it++))
- {
- Security_context *tmp_sctx= tmp->security_ctx;
- bool got_thd_data;
- if ((tmp->vio_ok() || tmp->system_thread) &&
- (!user || (!tmp->system_thread &&
- tmp_sctx->user && !strcmp(tmp_sctx->user, user))))
- {
- thread_info *thd_info= new (thd->mem_root) thread_info;
-
- thd_info->thread_id=tmp->thread_id;
- thd_info->os_thread_id=tmp->os_thread_id;
- thd_info->user= thd->strdup(tmp_sctx->user ? tmp_sctx->user :
- (tmp->system_thread ?
- "system user" : "unauthenticated user"));
- if (tmp->peer_port && (tmp_sctx->host || tmp_sctx->ip) &&
- thd->security_ctx->host_or_ip[0])
- {
- if ((thd_info->host= (char*) thd->alloc(LIST_PROCESS_HOST_LEN+1)))
- my_snprintf((char *) thd_info->host, LIST_PROCESS_HOST_LEN,
- "%s:%u", tmp_sctx->host_or_ip, tmp->peer_port);
- }
- else
- thd_info->host= thd->strdup(tmp_sctx->host_or_ip[0] ?
- tmp_sctx->host_or_ip :
- tmp_sctx->host ? tmp_sctx->host : "");
- thd_info->command=(int) tmp->get_command();
-
- if ((got_thd_data= !trylock_short(&tmp->LOCK_thd_data)))
- {
- /* This is an approximation */
- thd_info->proc_info= (char*) (tmp->killed >= KILL_QUERY ?
- "Killed" : 0);
- /*
- The following variables are only safe to access under a lock
- */
-
- thd_info->db= 0;
- if (tmp->db.str)
- thd_info->db= thd->strmake(tmp->db.str, tmp->db.length);
-
- if (tmp->query())
- {
- uint length= MY_MIN(max_query_length, tmp->query_length());
- char *q= thd->strmake(tmp->query(),length);
- /* Safety: in case strmake failed, we set length to 0. */
- thd_info->query_string=
- CSET_STRING(q, q ? length : 0, tmp->query_charset());
- }
-
- /*
- Progress report. We need to do this under a lock to ensure that all
- is from the same stage.
- */
- if (tmp->progress.max_counter)
- {
- uint max_stage= MY_MAX(tmp->progress.max_stage, 1);
- thd_info->progress= (((tmp->progress.stage / (double) max_stage) +
- ((tmp->progress.counter /
- (double) tmp->progress.max_counter) /
- (double) max_stage)) *
- 100.0);
- set_if_smaller(thd_info->progress, 100);
- }
- else
- thd_info->progress= 0.0;
- }
- else
- {
- thd_info->proc_info= "Busy";
- thd_info->progress= 0.0;
- thd_info->db= "";
- }
-
- thd_info->state_info= thread_state_info(tmp);
- thd_info->start_time= tmp->start_utime;
- ulonglong utime_after_query_snapshot= tmp->utime_after_query;
- if (thd_info->start_time < utime_after_query_snapshot)
- thd_info->start_time= utime_after_query_snapshot; // COM_SLEEP
-
- if (got_thd_data)
- mysql_mutex_unlock(&tmp->LOCK_thd_data);
- thread_infos.append(thd_info);
- }
- }
- mysql_mutex_unlock(&LOCK_thread_count);
+ server_threads.iterate(list_callback, &arg);
- thread_info *thd_info;
ulonglong now= microsecond_interval_timer();
char buff[20]; // For progress
String store_buffer(buff, sizeof(buff), system_charset_info);
- while ((thd_info=thread_infos.get()))
+ while (auto thd_info= arg.thread_infos.get())
{
protocol->prepare_for_resend();
protocol->store(thd_info->thread_id);
@@ -3236,160 +3270,155 @@ int fill_show_explain(THD *thd, TABLE_LIST *table, COND *cond)
}
DBUG_RETURN(bres);
}
- else
- {
- my_error(ER_NO_SUCH_THREAD, MYF(0), (ulong) thread_id);
- DBUG_RETURN(1);
- }
+ my_error(ER_NO_SUCH_THREAD, MYF(0), (ulong) thread_id);
+ DBUG_RETURN(1);
}
-int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
+struct processlist_callback_arg
{
- TABLE *table= tables->table;
- CHARSET_INFO *cs= system_charset_info;
- char *user;
- ulonglong unow= microsecond_interval_timer();
- DBUG_ENTER("fill_schema_processlist");
+ processlist_callback_arg(THD *thd_arg, TABLE *table_arg):
+ thd(thd_arg), table(table_arg), unow(microsecond_interval_timer()) {}
+ THD *thd;
+ TABLE *table;
+ ulonglong unow;
+};
- DEBUG_SYNC(thd,"fill_schema_processlist_after_unow");
- user= thd->security_ctx->master_access & PROCESS_ACL ?
- NullS : thd->security_ctx->priv_user;
+static my_bool processlist_callback(THD *tmp, processlist_callback_arg *arg)
+{
+ Security_context *tmp_sctx= tmp->security_ctx;
+ CHARSET_INFO *cs= system_charset_info;
+ const char *val;
+ ulonglong max_counter;
+ bool got_thd_data;
+ char *user= arg->thd->security_ctx->master_access & PROCESS_ACL ?
+ NullS : arg->thd->security_ctx->priv_user;
+
+ if ((!tmp->vio_ok() && !tmp->system_thread) ||
+ (user && (tmp->system_thread || !tmp_sctx->user ||
+ strcmp(tmp_sctx->user, user))))
+ return 0;
- mysql_mutex_lock(&LOCK_thread_count);
+ restore_record(arg->table, s->default_values);
+ /* ID */
+ arg->table->field[0]->store((longlong) tmp->thread_id, TRUE);
+ /* USER */
+ val= tmp_sctx->user ? tmp_sctx->user :
+ (tmp->system_thread ? "system user" : "unauthenticated user");
+ arg->table->field[1]->store(val, strlen(val), cs);
+ /* HOST */
+ if (tmp->peer_port && (tmp_sctx->host || tmp_sctx->ip) &&
+ arg->thd->security_ctx->host_or_ip[0])
+ {
+ char host[LIST_PROCESS_HOST_LEN + 1];
+ my_snprintf(host, LIST_PROCESS_HOST_LEN, "%s:%u",
+ tmp_sctx->host_or_ip, tmp->peer_port);
+ arg->table->field[2]->store(host, strlen(host), cs);
+ }
+ else
+ arg->table->field[2]->store(tmp_sctx->host_or_ip,
+ strlen(tmp_sctx->host_or_ip), cs);
- if (!thd->killed)
+ if ((got_thd_data= !trylock_short(&tmp->LOCK_thd_data)))
{
- I_List_iterator<THD> it(threads);
- THD* tmp;
-
- while ((tmp= it++))
+ /* DB */
+ if (tmp->db.str)
{
- Security_context *tmp_sctx= tmp->security_ctx;
- const char *val;
- ulonglong max_counter;
- bool got_thd_data;
-
- if ((!tmp->vio_ok() && !tmp->system_thread) ||
- (user && (tmp->system_thread || !tmp_sctx->user ||
- strcmp(tmp_sctx->user, user))))
- continue;
-
- restore_record(table, s->default_values);
- /* ID */
- table->field[0]->store((longlong) tmp->thread_id, TRUE);
- /* USER */
- val= tmp_sctx->user ? tmp_sctx->user :
- (tmp->system_thread ? "system user" : "unauthenticated user");
- table->field[1]->store(val, strlen(val), cs);
- /* HOST */
- if (tmp->peer_port && (tmp_sctx->host || tmp_sctx->ip) &&
- thd->security_ctx->host_or_ip[0])
- {
- char host[LIST_PROCESS_HOST_LEN + 1];
- my_snprintf(host, LIST_PROCESS_HOST_LEN, "%s:%u",
- tmp_sctx->host_or_ip, tmp->peer_port);
- table->field[2]->store(host, strlen(host), cs);
- }
- else
- table->field[2]->store(tmp_sctx->host_or_ip,
- strlen(tmp_sctx->host_or_ip), cs);
+ arg->table->field[3]->store(tmp->db.str, tmp->db.length, cs);
+ arg->table->field[3]->set_notnull();
+ }
+ }
- if ((got_thd_data= !trylock_short(&tmp->LOCK_thd_data)))
- {
- /* DB */
- if (tmp->db.str)
- {
- table->field[3]->store(tmp->db.str, tmp->db.length, cs);
- table->field[3]->set_notnull();
- }
- }
+ /* COMMAND */
+ if ((val= (char *) (!got_thd_data ? "Busy" :
+ (tmp->killed >= KILL_QUERY ?
+ "Killed" : 0))))
+ arg->table->field[4]->store(val, strlen(val), cs);
+ else
+ arg->table->field[4]->store(command_name[tmp->get_command()].str,
+ command_name[tmp->get_command()].length, cs);
- /* COMMAND */
- if ((val= (char *) (!got_thd_data ? "Busy" :
- (tmp->killed >= KILL_QUERY ?
- "Killed" : 0))))
- table->field[4]->store(val, strlen(val), cs);
- else
- table->field[4]->store(command_name[tmp->get_command()].str,
- command_name[tmp->get_command()].length, cs);
+ /* MYSQL_TIME */
+ ulonglong utime= tmp->start_utime;
+ ulonglong utime_after_query_snapshot= tmp->utime_after_query;
+ if (utime < utime_after_query_snapshot)
+ utime= utime_after_query_snapshot; // COM_SLEEP
+ utime= utime && utime < arg->unow ? arg->unow - utime : 0;
- /* MYSQL_TIME */
- ulonglong utime= tmp->start_utime;
- ulonglong utime_after_query_snapshot= tmp->utime_after_query;
- if (utime < utime_after_query_snapshot)
- utime= utime_after_query_snapshot; // COM_SLEEP
- utime= utime && utime < unow ? unow - utime : 0;
+ arg->table->field[5]->store(utime / HRTIME_RESOLUTION, TRUE);
- table->field[5]->store(utime / HRTIME_RESOLUTION, TRUE);
+ if (got_thd_data)
+ {
+ if (tmp->query())
+ {
+ arg->table->field[7]->store(tmp->query(),
+ MY_MIN(PROCESS_LIST_INFO_WIDTH,
+ tmp->query_length()), cs);
+ arg->table->field[7]->set_notnull();
- if (got_thd_data)
- {
- if (tmp->query())
- {
- table->field[7]->store(tmp->query(),
- MY_MIN(PROCESS_LIST_INFO_WIDTH,
- tmp->query_length()), cs);
- table->field[7]->set_notnull();
+ /* INFO_BINARY */
+ arg->table->field[16]->store(tmp->query(),
+ MY_MIN(PROCESS_LIST_INFO_WIDTH,
+ tmp->query_length()),
+ &my_charset_bin);
+ arg->table->field[16]->set_notnull();
+ }
- /* INFO_BINARY */
- table->field[16]->store(tmp->query(),
- MY_MIN(PROCESS_LIST_INFO_WIDTH,
- tmp->query_length()),
- &my_charset_bin);
- table->field[16]->set_notnull();
- }
+ /*
+ Progress report. We need to do this under a lock to ensure that all
+ is from the same stage.
+ */
+ if ((max_counter= tmp->progress.max_counter))
+ {
+ arg->table->field[9]->store((longlong) tmp->progress.stage + 1, 1);
+ arg->table->field[10]->store((longlong) tmp->progress.max_stage, 1);
+ arg->table->field[11]->store((double) tmp->progress.counter /
+ (double) max_counter*100.0);
+ }
+ mysql_mutex_unlock(&tmp->LOCK_thd_data);
+ }
- /*
- Progress report. We need to do this under a lock to ensure that all
- is from the same stage.
- */
- if ((max_counter= tmp->progress.max_counter))
- {
- table->field[9]->store((longlong) tmp->progress.stage + 1, 1);
- table->field[10]->store((longlong) tmp->progress.max_stage, 1);
- table->field[11]->store((double) tmp->progress.counter /
- (double) max_counter*100.0);
- }
- mysql_mutex_unlock(&tmp->LOCK_thd_data);
- }
+ /* STATE */
+ if ((val= thread_state_info(tmp)))
+ {
+ arg->table->field[6]->store(val, strlen(val), cs);
+ arg->table->field[6]->set_notnull();
+ }
- /* STATE */
- if ((val= thread_state_info(tmp)))
- {
- table->field[6]->store(val, strlen(val), cs);
- table->field[6]->set_notnull();
- }
+ /* TIME_MS */
+ arg->table->field[8]->store((double)(utime / (HRTIME_RESOLUTION / 1000.0)));
- /* TIME_MS */
- table->field[8]->store((double)(utime / (HRTIME_RESOLUTION / 1000.0)));
+ /*
+ This may become negative if we free a memory allocated by another
+ thread in this thread. However it's better that we notice it eventually
+ than hide it.
+ */
+ arg->table->field[12]->store((longlong) tmp->status_var.local_memory_used,
+ FALSE);
+ arg->table->field[13]->store((longlong) tmp->status_var.max_local_memory_used,
+ FALSE);
+ arg->table->field[14]->store((longlong) tmp->get_examined_row_count(), TRUE);
- /*
- This may become negative if we free a memory allocated by another
- thread in this thread. However it's better that we notice it eventually
- than hide it.
- */
- table->field[12]->store((longlong) tmp->status_var.local_memory_used,
- FALSE);
- table->field[13]->store((longlong) tmp->status_var.max_local_memory_used,
- FALSE);
- table->field[14]->store((longlong) tmp->get_examined_row_count(), TRUE);
+ /* QUERY_ID */
+ arg->table->field[15]->store(tmp->query_id, TRUE);
- /* QUERY_ID */
- table->field[15]->store(tmp->query_id, TRUE);
+ arg->table->field[17]->store(tmp->os_thread_id);
- table->field[17]->store(tmp->os_thread_id);
+ if (schema_table_store_record(arg->thd, arg->table))
+ return 1;
+ return 0;
+}
- if (schema_table_store_record(thd, table))
- {
- mysql_mutex_unlock(&LOCK_thread_count);
- DBUG_RETURN(1);
- }
- }
- }
- mysql_mutex_unlock(&LOCK_thread_count);
+int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
+{
+ processlist_callback_arg arg(thd, tables->table);
+ DBUG_ENTER("fill_schema_processlist");
+ DEBUG_SYNC(thd,"fill_schema_processlist_after_unow");
+ if (!thd->killed &&
+ server_threads.iterate(processlist_callback, &arg))
+ DBUG_RETURN(1);
DBUG_RETURN(0);
}
@@ -3451,7 +3480,7 @@ int add_status_vars(SHOW_VAR *list)
{
int res= 0;
if (status_vars_inited)
- mysql_mutex_lock(&LOCK_show_status);
+ mysql_rwlock_wrlock(&LOCK_all_status_vars);
if (!all_status_vars.buffer && // array is not allocated yet - do it now
my_init_dynamic_array(&all_status_vars, sizeof(SHOW_VAR), 250, 50, MYF(0)))
{
@@ -3466,7 +3495,7 @@ int add_status_vars(SHOW_VAR *list)
sort_dynamic(&all_status_vars, show_var_cmp);
err:
if (status_vars_inited)
- mysql_mutex_unlock(&LOCK_show_status);
+ mysql_rwlock_unlock(&LOCK_all_status_vars);
return res;
}
@@ -3528,7 +3557,7 @@ void remove_status_vars(SHOW_VAR *list)
{
if (status_vars_inited)
{
- mysql_mutex_lock(&LOCK_show_status);
+ mysql_rwlock_wrlock(&LOCK_all_status_vars);
SHOW_VAR *all= dynamic_element(&all_status_vars, 0, SHOW_VAR *);
for (; list->name; list++)
@@ -3549,7 +3578,7 @@ void remove_status_vars(SHOW_VAR *list)
}
}
shrink_var_array(&all_status_vars);
- mysql_mutex_unlock(&LOCK_show_status);
+ mysql_rwlock_unlock(&LOCK_all_status_vars);
}
else
{
@@ -3590,6 +3619,7 @@ union Any_pointer {
const LEX_STRING *as_lex_cstring;
const SHOW_COMP_OPTION *as_show_comp_options;
intptr as_intptr;
+ Atomic_counter<uint32_t>* as_atomic_counter;
};
/**
@@ -3708,6 +3738,9 @@ const char* get_one_variable(THD *thd,
end= pos + value.as_lex_cstring->length;
break;
}
+ case SHOW_ATOMIC_COUNTER_UINT32_T:
+ end= int10_to_str(static_cast<long>(*value.as_atomic_counter), buff, 10);
+ break;
case SHOW_UNDEF:
break; // Return empty string
case SHOW_SYS: // Cannot happen
@@ -3868,34 +3901,37 @@ end:
Return number of threads used
*/
-uint calc_sum_of_all_status(STATUS_VAR *to)
+struct calc_sum_callback_arg
{
- uint count= 0;
- DBUG_ENTER("calc_sum_of_all_status");
+ calc_sum_callback_arg(STATUS_VAR *to_arg): to(to_arg), count(0) {}
+ STATUS_VAR *to;
+ uint count;
+};
- /* Ensure that thread id not killed during loop */
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
- I_List_iterator<THD> it(threads);
- THD *tmp;
+static my_bool calc_sum_callback(THD *thd, calc_sum_callback_arg *arg)
+{
+ arg->count++;
+ if (!thd->status_in_global)
+ {
+ add_to_status(arg->to, &thd->status_var);
+ arg->to->local_memory_used+= thd->status_var.local_memory_used;
+ }
+ if (thd->get_command() != COM_SLEEP)
+ arg->to->threads_running++;
+ return 0;
+}
- to->local_memory_used= 0;
+uint calc_sum_of_all_status(STATUS_VAR *to)
+{
+ calc_sum_callback_arg arg(to);
+ DBUG_ENTER("calc_sum_of_all_status");
+
+ to->local_memory_used= 0;
/* Add to this status from existing threads */
- while ((tmp= it++))
- {
- count++;
- if (!tmp->status_in_global)
- {
- add_to_status(to, &tmp->status_var);
- to->local_memory_used+= tmp->status_var.local_memory_used;
- }
- if (tmp->get_command() != COM_SLEEP)
- to->threads_running++;
- }
-
- mysql_mutex_unlock(&LOCK_thread_count);
- DBUG_RETURN(count);
+ server_threads.iterate(calc_sum_callback, &arg);
+ DBUG_RETURN(arg.count);
}
@@ -4245,8 +4281,9 @@ bool get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *tables,
case SQLCOM_SHOW_TABLE_STATUS:
case SQLCOM_SHOW_TRIGGERS:
case SQLCOM_SHOW_EVENTS:
- thd->make_lex_string(&lookup_field_values->db_value,
- lex->select_lex.db.str, lex->select_lex.db.length);
+ thd->make_lex_string(&lookup_field_values->db_value,
+ lex->first_select_lex()->db.str,
+ lex->first_select_lex()->db.length);
if (wild)
{
thd->make_lex_string(&lookup_field_values->table_value,
@@ -4643,10 +4680,10 @@ fill_schema_table_by_open(THD *thd, MEM_ROOT *mem_root,
temporary LEX. The latter is required to correctly open views and
produce table describing their structure.
*/
- if (make_table_list(thd, &lex->select_lex, &db_name, &table_name))
+ if (make_table_list(thd, lex->first_select_lex(), &db_name, &table_name))
goto end;
- table_list= lex->select_lex.table_list.first;
+ table_list= lex->first_select_lex()->table_list.first;
if (is_show_fields_or_keys)
{
@@ -5093,7 +5130,8 @@ end:
*/
DBUG_ASSERT(thd->open_tables == NULL);
thd->mdl_context.rollback_to_savepoint(open_tables_state_backup->mdl_system_tables_svp);
- thd->clear_error();
+ if (!thd->is_fatal_error)
+ thd->clear_error();
return res;
}
@@ -5332,6 +5370,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
error= 0;
goto err;
}
+ if (thd->is_fatal_error)
+ goto err;
DEBUG_SYNC(thd, "before_open_in_get_all_tables");
if (fill_schema_table_by_open(thd, &tmp_mem_root, FALSE,
@@ -5744,7 +5784,9 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
table->field[16]->store_time(&time);
table->field[16]->set_notnull();
}
- if (file->ha_table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM))
+ if ((file->ha_table_flags() &
+ (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM)) &&
+ !file->stats.checksum_null)
{
table->field[18]->store((longlong) file->stats.checksum, TRUE);
table->field[18]->set_notnull();
@@ -6497,7 +6539,6 @@ bool store_schema_params(THD *thd, TABLE *table, TABLE *proc_table,
bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table,
const char *wild, bool full_access, const char *sp_user)
{
- MYSQL_TIME time;
LEX *lex= thd->lex;
CHARSET_INFO *cs= system_charset_info;
const Sp_handler *sph;
@@ -6585,14 +6626,11 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table,
copy_field_as_string(table->field[22],
proc_table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]);
- bzero((char *)&time, sizeof(time));
- ((Field_timestamp *) proc_table->field[MYSQL_PROC_FIELD_CREATED])->
- get_time(&time);
- table->field[23]->store_time(&time);
- bzero((char *)&time, sizeof(time));
- ((Field_timestamp *) proc_table->field[MYSQL_PROC_FIELD_MODIFIED])->
- get_time(&time);
- table->field[24]->store_time(&time);
+ proc_table->field[MYSQL_PROC_FIELD_CREATED]->
+ save_in_field(table->field[23]);
+ proc_table->field[MYSQL_PROC_FIELD_MODIFIED]->
+ save_in_field(table->field[24]);
+
copy_field_as_string(table->field[25],
proc_table->field[MYSQL_PROC_FIELD_SQL_MODE]);
copy_field_as_string(table->field[26],
@@ -6721,6 +6759,7 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables,
(void) read_statistics_for_tables(thd, tables);
show_table->file->info(HA_STATUS_VARIABLE |
HA_STATUS_NO_LOCK |
+ HA_STATUS_CONST |
HA_STATUS_TIME);
set_statistics_for_table(thd, show_table);
}
@@ -6765,16 +6804,26 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables,
"D" : "A"), 1, cs);
table->field[8]->set_notnull();
}
- KEY *key=show_table->key_info+i;
- if (key->rec_per_key[j])
+ if (key_info->algorithm == HA_KEY_ALG_LONG_HASH)
+ table->field[13]->store(STRING_WITH_LEN("HASH"), cs);
+ else
{
- ha_rows records= (ha_rows) ((double) show_table->stat_records() /
- key->actual_rec_per_key(j));
- table->field[9]->store((longlong) records, TRUE);
- table->field[9]->set_notnull();
+ /*
+ We have to use table key information to get the key statistics
+ from table as key_info points to TABLE_SHARE which has no
+ statistics.
+ */
+ KEY *key_info= show_table->key_info + i;
+ if (key_info->rec_per_key[j])
+ {
+ ha_rows records= (ha_rows) ((double) show_table->stat_records() /
+ key_info->actual_rec_per_key(j));
+ table->field[9]->store((longlong) records, TRUE);
+ table->field[9]->set_notnull();
+ }
+ const char *tmp= show_table->file->index_type(i);
+ table->field[13]->store(tmp, strlen(tmp), cs);
}
- const char *tmp= show_table->file->index_type(i);
- table->field[13]->store(tmp, strlen(tmp), cs);
}
if (!(key_info->flags & HA_FULLTEXT) &&
(key_part->field &&
@@ -6896,7 +6945,7 @@ static int get_schema_views_record(THD *thd, TABLE_LIST *tables,
& 'field_translation_end' are uninitialized is this
case.
*/
- List<Item> *fields= &tables->view->select_lex.item_list;
+ List<Item> *fields= &tables->view->first_select_lex()->item_list;
List_iterator<Item> it(*fields);
Item *item;
Item_field *field;
@@ -7036,7 +7085,7 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables,
{
List<FOREIGN_KEY_INFO> f_key_list;
TABLE *show_table= tables->table;
- KEY *key_info=show_table->key_info;
+ KEY *key_info=show_table->s->key_info;
uint primary_key= show_table->s->primary_key;
show_table->file->info(HA_STATUS_VARIABLE |
HA_STATUS_NO_LOCK |
@@ -7129,8 +7178,7 @@ static bool store_trigger(THD *thd, Trigger *trigger,
(my_time_t)(trigger->create_time/100));
/* timestamp is with 6 digits */
timestamp.second_part= (trigger->create_time % 100) * 10000;
- ((Field_temporal_with_date*) table->field[16])->store_time_dec(&timestamp,
- 2);
+ table->field[16]->store_time_dec(&timestamp, 2);
}
sql_mode_string_representation(thd, trigger->sql_mode, &sql_mode_rep);
@@ -7234,7 +7282,7 @@ static int get_schema_key_column_usage_record(THD *thd,
{
List<FOREIGN_KEY_INFO> f_key_list;
TABLE *show_table= tables->table;
- KEY *key_info=show_table->key_info;
+ KEY *key_info=show_table->s->key_info;
uint primary_key= show_table->s->primary_key;
show_table->file->info(HA_STATUS_VARIABLE |
HA_STATUS_NO_LOCK |
@@ -7556,7 +7604,7 @@ static int get_schema_partitions_record(THD *thd, TABLE_LIST *tables,
break;
default:
DBUG_ASSERT(0);
- my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
+ my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
DBUG_RETURN(1);
}
table->field[7]->set_notnull();
@@ -7682,7 +7730,8 @@ static int get_schema_partitions_record(THD *thd, TABLE_LIST *tables,
}
else if (part_info->vers_info->interval.is_set())
{
- table->field[11]->store_timestamp((my_time_t)part_elem->range_value, 0);
+ Timeval tv((my_time_t) part_elem->range_value, 0);
+ table->field[11]->store_timestamp_dec(tv, AUTO_SEC_PART_DIGITS);
table->field[11]->set_notnull();
}
}
@@ -7868,11 +7917,11 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table)
sch_table->field[ISE_ON_COMPLETION]->
store(STRING_WITH_LEN("PRESERVE"), scs);
- number_to_datetime(et.created, 0, &time, 0, &not_used);
+ number_to_datetime_or_date(et.created, 0, &time, 0, &not_used);
DBUG_ASSERT(not_used==0);
sch_table->field[ISE_CREATED]->store_time(&time);
- number_to_datetime(et.modified, 0, &time, 0, &not_used);
+ number_to_datetime_or_date(et.modified, 0, &time, 0, &not_used);
DBUG_ASSERT(not_used==0);
sch_table->field[ISE_LAST_ALTERED]->store_time(&time);
@@ -7918,9 +7967,9 @@ int fill_open_tables(THD *thd, TABLE_LIST *tables, COND *cond)
TABLE *table= tables->table;
CHARSET_INFO *cs= system_charset_info;
OPEN_TABLE_LIST *open_list;
- if (unlikely(!(open_list= list_open_tables(thd, thd->lex->select_lex.db.str,
- wild))) &&
- unlikely(thd->is_fatal_error))
+ if (!(open_list= list_open_tables(thd, thd->lex->first_select_lex()->db.str,
+ wild))
+ && thd->is_fatal_error)
DBUG_RETURN(1);
for (; open_list ; open_list=open_list->next)
@@ -8067,12 +8116,12 @@ int fill_status(THD *thd, TABLE_LIST *tables, COND *cond)
tmp.local_memory_used= 0; // meaning tmp was not populated yet
- mysql_mutex_lock(&LOCK_show_status);
+ mysql_rwlock_rdlock(&LOCK_all_status_vars);
res= show_status_array(thd, wild,
(SHOW_VAR *)all_status_vars.buffer,
scope, tmp1, "", tables->table,
upper_case_names, partial_cond);
- mysql_mutex_unlock(&LOCK_show_status);
+ mysql_rwlock_unlock(&LOCK_all_status_vars);
DBUG_RETURN(res);
}
@@ -8376,7 +8425,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list)
tmp_table_param->table_charset= cs;
tmp_table_param->field_count= field_count;
tmp_table_param->schema_table= 1;
- SELECT_LEX *select_lex= thd->lex->current_select;
+ SELECT_LEX *select_lex= table_list->select_lex;
bool keep_row_order= is_show_command(thd);
if (!(table= create_tmp_table(thd, tmp_table_param, field_list, (ORDER*) 0, 0,
0, (select_lex->options | thd->variables.option_bits |
@@ -8412,7 +8461,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list)
static int make_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
{
ST_FIELD_INFO *field_info= schema_table->fields_info;
- Name_resolution_context *context= &thd->lex->select_lex.context;
+ Name_resolution_context *context= &thd->lex->first_select_lex()->context;
for (; field_info->field_name; field_info++)
{
if (field_info->old_name)
@@ -8472,14 +8521,14 @@ int make_table_names_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
char tmp[128];
String buffer(tmp,sizeof(tmp), thd->charset());
LEX *lex= thd->lex;
- Name_resolution_context *context= &lex->select_lex.context;
+ Name_resolution_context *context= &lex->first_select_lex()->context;
ST_FIELD_INFO *field_info= &schema_table->fields_info[2];
LEX_CSTRING field_name= {field_info->field_name,
strlen(field_info->field_name) };
buffer.length(0);
buffer.append(field_info->old_name);
- buffer.append(&lex->select_lex.db);
+ buffer.append(&lex->first_select_lex()->db);
if (lex->wild && lex->wild->ptr())
{
buffer.append(STRING_WITH_LEN(" ("));
@@ -8512,7 +8561,7 @@ int make_columns_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
int fields_arr[]= {3, 15, 14, 6, 16, 5, 17, 18, 19, -1};
int *field_num= fields_arr;
ST_FIELD_INFO *field_info;
- Name_resolution_context *context= &thd->lex->select_lex.context;
+ Name_resolution_context *context= &thd->lex->first_select_lex()->context;
for (; *field_num >= 0; field_num++)
{
@@ -8543,7 +8592,7 @@ int make_character_sets_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
int fields_arr[]= {0, 2, 1, 3, -1};
int *field_num= fields_arr;
ST_FIELD_INFO *field_info;
- Name_resolution_context *context= &thd->lex->select_lex.context;
+ Name_resolution_context *context= &thd->lex->first_select_lex()->context;
for (; *field_num >= 0; field_num++)
{
@@ -8570,7 +8619,7 @@ int make_proc_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
int fields_arr[]= {2, 3, 4, 27, 24, 23, 22, 26, 28, 29, 30, -1};
int *field_num= fields_arr;
ST_FIELD_INFO *field_info;
- Name_resolution_context *context= &thd->lex->select_lex.context;
+ Name_resolution_context *context= &thd->lex->first_select_lex()->context;
for (; *field_num >= 0; field_num++)
{
@@ -8852,6 +8901,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
{
/* all fields were optimized away. Force a non-0-length row */
table->s->reclength= to_recinfo->length= 1;
+ to_recinfo->type= FIELD_NORMAL;
to_recinfo++;
}
store_record(table, s->default_values);
@@ -9993,6 +10043,10 @@ ST_FIELD_INFO check_constraints_fields_info[]=
OPEN_FULL_TABLE},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
};
+
+/** For creating fields of information_schema.OPTIMIZER_TRACE */
+extern ST_FIELD_INFO optimizer_trace_info[];
+
/*
Description of ST_FIELD_INFO in table.h
@@ -10047,6 +10101,8 @@ ST_SCHEMA_TABLE schema_tables[]=
OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
{"OPEN_TABLES", open_tables_fields_info, 0,
fill_open_tables, make_old_format, 0, -1, -1, 1, 0},
+ {"OPTIMIZER_TRACE", optimizer_trace_info, 0,
+ fill_optimizer_trace_info, NULL, NULL, -1, -1, false, 0},
{"PARAMETERS", parameters_fields_info, 0,
fill_schema_proc, 0, 0, -1, -1, 0, 0},
{"PARTITIONS", partitions_fields_info, 0,
@@ -10172,11 +10228,6 @@ int finalize_schema_table(st_plugin_int *plugin)
DBUG_RETURN(0);
}
-/*
- This is used to create a timestamp field
-*/
-
-MYSQL_TIME zero_time={ 0,0,0,0,0,0,0,0, MYSQL_TIMESTAMP_TIME };
/**
Output trigger information (SHOW CREATE TRIGGER) to the client.
@@ -10261,8 +10312,9 @@ static bool show_create_trigger_impl(THD *thd, Trigger *trigger)
MY_CS_NAME_SIZE),
mem_root);
+ static const Datetime zero_datetime(Datetime::zero());
Item_datetime_literal *tmp= (new (mem_root)
- Item_datetime_literal(thd, &zero_time, 2));
+ Item_datetime_literal(thd, &zero_datetime, 2));
tmp->set_name(thd, STRING_WITH_LEN("Created"), system_charset_info);
fields.push_back(tmp, mem_root);
diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc
index bf0757f78fe..320a954711a 100644
--- a/sql/sql_signal.cc
+++ b/sql/sql_signal.cc
@@ -323,7 +323,7 @@ end:
set= m_set_signal_information.m_item[i];
if (set)
{
- if (set->fixed)
+ if (set->is_fixed())
set->cleanup();
}
}
diff --git a/sql/sql_sort.h b/sql/sql_sort.h
index 93bcaf45a2c..7abbc808632 100644
--- a/sql/sql_sort.h
+++ b/sql/sql_sort.h
@@ -92,7 +92,6 @@ public:
memset(this, 0, sizeof(*this));
}
void init_for_filesort(uint sortlen, TABLE *table,
- ulong max_length_for_sort_data,
ha_rows maxrows, bool sort_positions);
};
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 5e31034847e..e3b461167bb 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -30,7 +30,6 @@
#include "sql_statistics.h"
#include "opt_range.h"
#include "uniques.h"
-#include "my_atomic.h"
#include "sql_show.h"
#include "sql_partition.h"
@@ -104,29 +103,6 @@ inline void init_table_list_for_stat_tables(TABLE_LIST *tables, bool for_write)
}
}
-
-/**
- @details
- The function builds a TABLE_LIST containing only one element 'tbl' for
- the statistical table called 'stat_tab_name'.
- The lock type of the element is set to TL_READ if for_write = FALSE,
- otherwise it is set to TL_WRITE.
-*/
-
-static inline
-void init_table_list_for_single_stat_table(TABLE_LIST *tbl,
- const LEX_CSTRING *stat_tab_name,
- bool for_write)
-{
- memset((char *) tbl, 0, sizeof(TABLE_LIST));
-
- tbl->db= MYSQL_SCHEMA_NAME;
- tbl->table_name= *stat_tab_name;
- tbl->alias= *stat_tab_name;
- tbl->lock_type= for_write ? TL_WRITE : TL_READ;
-}
-
-
static Table_check_intact_log_error stat_table_intact;
static const
@@ -288,16 +264,21 @@ static int open_stat_tables(THD *thd, TABLE_LIST *tables,
/**
@brief
Open a statistical table and lock it
+
+ @details
+ This is used by DDLs. When a column or index is dropped or renamed,
+ stat tables need to be adjusted accordingly.
*/
-static
-inline int open_single_stat_table(THD *thd, TABLE_LIST *table,
- const LEX_CSTRING *stat_tab_name,
- Open_tables_backup *backup,
- bool for_write)
+static inline int open_stat_table_for_ddl(THD *thd, TABLE_LIST *table,
+ const LEX_CSTRING *stat_tab_name,
+ Open_tables_backup *backup)
{
- init_table_list_for_single_stat_table(table, stat_tab_name, for_write);
- init_mdl_requests(table);
- return open_system_tables_for_read(thd, table, backup);
+ table->init_one_table(&MYSQL_SCHEMA_NAME, stat_tab_name, NULL, TL_WRITE);
+ No_such_table_error_handler nst_handler;
+ thd->push_internal_handler(&nst_handler);
+ int res= open_system_tables_for_read(thd, table, backup);
+ thd->pop_internal_handler();
+ return res;
}
@@ -326,8 +307,8 @@ private:
public:
inline void init(THD *thd, Field * table_field);
- inline bool add(ha_rows rowno);
- inline void finish(ha_rows rows);
+ inline bool add();
+ inline void finish(ha_rows rows, double sample_fraction);
inline void cleanup();
};
@@ -1558,6 +1539,8 @@ class Histogram_builder
uint curr_bucket; /* number of the current bucket to be built */
ulonglong count; /* number of values retrieved */
ulonglong count_distinct; /* number of distinct values retrieved */
+ /* number of distinct values that occured only once */
+ ulonglong count_distinct_single_occurence;
public:
Histogram_builder(Field *col, uint col_len, ha_rows rows)
@@ -1571,14 +1554,21 @@ public:
bucket_capacity= (double) records / (hist_width + 1);
curr_bucket= 0;
count= 0;
- count_distinct= 0;
+ count_distinct= 0;
+ count_distinct_single_occurence= 0;
}
- ulonglong get_count_distinct() { return count_distinct; }
+ ulonglong get_count_distinct() const { return count_distinct; }
+ ulonglong get_count_single_occurence() const
+ {
+ return count_distinct_single_occurence;
+ }
int next(void *elem, element_count elem_cnt)
{
count_distinct++;
+ if (elem_cnt == 1)
+ count_distinct_single_occurence++;
count+= elem_cnt;
if (curr_bucket == hist_width)
return 0;
@@ -1592,7 +1582,7 @@ public:
count > bucket_capacity * (curr_bucket + 1))
{
histogram->set_prev_value(curr_bucket);
- curr_bucket++;
+ curr_bucket++;
}
}
return 0;
@@ -1608,9 +1598,18 @@ int histogram_build_walk(void *elem, element_count elem_cnt, void *arg)
return hist_builder->next(elem, elem_cnt);
}
-C_MODE_END
+static int count_distinct_single_occurence_walk(void *elem,
+ element_count count, void *arg)
+{
+ ((ulonglong*)arg)[0]+= 1;
+ if (count == 1)
+ ((ulonglong*)arg)[1]+= 1;
+ return 0;
+}
+
+C_MODE_END
/*
The class Count_distinct_field is a helper class used to calculate
the number of distinct values for a column. The class employs the
@@ -1629,6 +1628,9 @@ protected:
Unique *tree; /* The helper object to contain distinct values */
uint tree_key_length; /* The length of the keys for the elements of 'tree */
+ ulonglong distincts;
+ ulonglong distincts_single_occurence;
+
public:
Count_distinct_field() {}
@@ -1681,30 +1683,40 @@ public:
table_field->mark_unused_memory_as_defined();
return tree->unique_add(table_field->ptr);
}
-
+
/*
@brief
Calculate the number of elements accumulated in the container of 'tree'
*/
- ulonglong get_value()
+ void walk_tree()
{
- ulonglong count;
- if (tree->elements == 0)
- return (ulonglong) tree->elements_in_tree();
- count= 0;
- tree->walk(table_field->table, count_distinct_walk, (void*) &count);
- return count;
+ ulonglong counts[2] = {0, 0};
+ tree->walk(table_field->table,
+ count_distinct_single_occurence_walk, counts);
+ distincts= counts[0];
+ distincts_single_occurence= counts[1];
}
/*
@brief
- Build the histogram for the elements accumulated in the container of 'tree'
+ Calculate a histogram of the tree
*/
- ulonglong get_value_with_histogram(ha_rows rows)
+ void walk_tree_with_histogram(ha_rows rows)
{
Histogram_builder hist_builder(table_field, tree_key_length, rows);
tree->walk(table_field->table, histogram_build_walk, (void *) &hist_builder);
- return hist_builder.get_count_distinct();
+ distincts= hist_builder.get_count_distinct();
+ distincts_single_occurence= hist_builder.get_count_single_occurence();
+ }
+
+ ulonglong get_count_distinct()
+ {
+ return distincts;
+ }
+
+ ulonglong get_count_distinct_single_occurence()
+ {
+ return distincts_single_occurence;
}
/*
@@ -2349,7 +2361,7 @@ void Column_statistics_collected::init(THD *thd, Field *table_field)
*/
inline
-bool Column_statistics_collected::add(ha_rows rowno)
+bool Column_statistics_collected::add()
{
bool err= 0;
@@ -2358,9 +2370,11 @@ bool Column_statistics_collected::add(ha_rows rowno)
else
{
column_total_length+= column->value_length();
- if (min_value && column->update_min(min_value, rowno == nulls))
+ if (min_value && column->update_min(min_value,
+ is_null(COLUMN_STAT_MIN_VALUE)))
set_not_null(COLUMN_STAT_MIN_VALUE);
- if (max_value && column->update_max(max_value, rowno == nulls))
+ if (max_value && column->update_max(max_value,
+ is_null(COLUMN_STAT_MAX_VALUE)))
set_not_null(COLUMN_STAT_MAX_VALUE);
if (count_distinct)
err= count_distinct->add();
@@ -2378,7 +2392,7 @@ bool Column_statistics_collected::add(ha_rows rowno)
*/
inline
-void Column_statistics_collected::finish(ha_rows rows)
+void Column_statistics_collected::finish(ha_rows rows, double sample_fraction)
{
double val;
@@ -2396,16 +2410,44 @@ void Column_statistics_collected::finish(ha_rows rows)
}
if (count_distinct)
{
- ulonglong distincts;
uint hist_size= count_distinct->get_hist_size();
+
+ /* Compute cardinality statistics and optionally histogram. */
if (hist_size == 0)
- distincts= count_distinct->get_value();
+ count_distinct->walk_tree();
else
- distincts= count_distinct->get_value_with_histogram(rows - nulls);
+ count_distinct->walk_tree_with_histogram(rows - nulls);
+
+ ulonglong distincts= count_distinct->get_count_distinct();
+ ulonglong distincts_single_occurence=
+ count_distinct->get_count_distinct_single_occurence();
+
if (distincts)
{
- val= (double) (rows - nulls) / distincts;
- set_avg_frequency(val);
+ /*
+ We use the unsmoothed first-order jackknife estimator" to estimate
+ the number of distinct values.
+ With a sufficient large percentage of rows sampled (80%), we revert back
+ to computing the avg_frequency off of the raw data.
+ */
+ if (sample_fraction > 0.8)
+ val= (double) (rows - nulls) / distincts;
+ else
+ {
+ if (nulls == 1)
+ distincts_single_occurence+= 1;
+ if (nulls)
+ distincts+= 1;
+ double fraction_single_occurence=
+ static_cast<double>(distincts_single_occurence) / rows;
+ double total_number_of_rows= rows / sample_fraction;
+ double estimate_total_distincts= total_number_of_rows /
+ (distincts /
+ (1.0 - (1.0 - sample_fraction) * fraction_single_occurence));
+ val = std::fmax(estimate_total_distincts * (rows - nulls) / rows, 1.0);
+ }
+
+ set_avg_frequency(val);
set_not_null(COLUMN_STAT_AVG_FREQUENCY);
}
else
@@ -2591,12 +2633,28 @@ int collect_statistics_for_table(THD *thd, TABLE *table)
Field *table_field;
ha_rows rows= 0;
handler *file=table->file;
+ double sample_fraction= thd->variables.sample_percentage / 100;
+ const ha_rows MIN_THRESHOLD_FOR_SAMPLING= 50000;
DBUG_ENTER("collect_statistics_for_table");
table->collected_stats->cardinality_is_null= TRUE;
table->collected_stats->cardinality= 0;
+ if (thd->variables.sample_percentage == 0)
+ {
+ if (file->records() < MIN_THRESHOLD_FOR_SAMPLING)
+ {
+ sample_fraction= 1;
+ }
+ else
+ {
+ sample_fraction= std::fmin(
+ (MIN_THRESHOLD_FOR_SAMPLING + 4096 *
+ log(200 * file->records())) / file->records(), 1);
+ }
+ }
+
for (field_ptr= table->field; *field_ptr; field_ptr++)
{
table_field= *field_ptr;
@@ -2609,7 +2667,7 @@ int collect_statistics_for_table(THD *thd, TABLE *table)
/* Perform a full table scan to collect statistics on 'table's columns */
if (!(rc= file->ha_rnd_init(TRUE)))
- {
+ {
DEBUG_SYNC(table->in_use, "statistics_collection_start");
while ((rc= file->ha_rnd_next(table->record[0])) != HA_ERR_END_OF_FILE)
@@ -2620,17 +2678,20 @@ int collect_statistics_for_table(THD *thd, TABLE *table)
if (rc)
break;
- for (field_ptr= table->field; *field_ptr; field_ptr++)
+ if (thd_rnd(thd) <= sample_fraction)
{
- table_field= *field_ptr;
- if (!table_field->collected_stats)
- continue;
- if ((rc= table_field->collected_stats->add(rows)))
+ for (field_ptr= table->field; *field_ptr; field_ptr++)
+ {
+ table_field= *field_ptr;
+ if (!table_field->collected_stats)
+ continue;
+ if ((rc= table_field->collected_stats->add()))
+ break;
+ }
+ if (rc)
break;
+ rows++;
}
- if (rc)
- break;
- rows++;
}
file->ha_rnd_end();
}
@@ -2644,7 +2705,8 @@ int collect_statistics_for_table(THD *thd, TABLE *table)
if (!rc)
{
table->collected_stats->cardinality_is_null= FALSE;
- table->collected_stats->cardinality= rows;
+ table->collected_stats->cardinality=
+ static_cast<ha_rows>(rows / sample_fraction);
}
bitmap_clear_all(table->write_set);
@@ -2655,7 +2717,7 @@ int collect_statistics_for_table(THD *thd, TABLE *table)
continue;
bitmap_set_bit(table->write_set, table_field->field_index);
if (!rc)
- table_field->collected_stats->finish(rows);
+ table_field->collected_stats->finish(rows, sample_fraction);
else
table_field->collected_stats->cleanup();
}
@@ -3189,7 +3251,7 @@ int read_statistics_for_tables(THD *thd, TABLE_LIST *tables)
'db' from all statistical tables: table_stats, column_stats, index_stats.
@retval
- 0 If all deletions are successful
+ 0 If all deletions are successful or we couldn't open statistics table
@retval
1 Otherwise
@@ -3197,7 +3259,8 @@ int read_statistics_for_tables(THD *thd, TABLE_LIST *tables)
The function is called when executing the statement DROP TABLE 'tab'.
*/
-int delete_statistics_for_table(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *tab)
+int delete_statistics_for_table(THD *thd, const LEX_CSTRING *db,
+ const LEX_CSTRING *tab)
{
int err;
enum_binlog_format save_binlog_format;
@@ -3205,11 +3268,10 @@ int delete_statistics_for_table(THD *thd, const LEX_CSTRING *db, const LEX_CSTRI
TABLE_LIST tables[STATISTICS_TABLES];
Open_tables_backup open_tables_backup;
int rc= 0;
-
DBUG_ENTER("delete_statistics_for_table");
if (open_stat_tables(thd, tables, &open_tables_backup, TRUE))
- DBUG_RETURN(rc);
+ DBUG_RETURN(0);
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
@@ -3262,21 +3324,16 @@ int delete_statistics_for_table(THD *thd, const LEX_CSTRING *db, const LEX_CSTRI
@brief
Delete statistics on a column of the specified table
- @param
- thd The thread handle
- @param
- tab The table the column belongs to
- @param
- col The field of the column whose statistics is to be deleted
+ @param thd The thread handle
+ @param tab The table the column belongs to
+ @param col The field of the column whose statistics is to be deleted
@details
The function delete statistics on the column 'col' belonging to the table
'tab' from the statistical table column_stats.
- @retval
- 0 If the deletion is successful
- @retval
- 1 Otherwise
+ @retval 0 If all deletions are successful or we couldn't open statistics table
+ @retval 1 Otherwise
@note
The function is called when dropping a table column or when changing
@@ -3291,15 +3348,11 @@ int delete_statistics_for_column(THD *thd, TABLE *tab, Field *col)
TABLE_LIST tables;
Open_tables_backup open_tables_backup;
int rc= 0;
-
DBUG_ENTER("delete_statistics_for_column");
- if (open_single_stat_table(thd, &tables, &stat_table_name[1],
- &open_tables_backup, TRUE))
- {
- thd->clear_error();
- DBUG_RETURN(rc);
- }
+ if (open_stat_table_for_ddl(thd, &tables, &stat_table_name[1],
+ &open_tables_backup))
+ DBUG_RETURN(0);
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
@@ -3325,24 +3378,18 @@ int delete_statistics_for_column(THD *thd, TABLE *tab, Field *col)
@brief
Delete statistics on an index of the specified table
- @param
- thd The thread handle
- @param
- tab The table the index belongs to
- @param
- key_info The descriptor of the index whose statistics is to be deleted
- @param
- ext_prefixes_only Delete statistics only on the index prefixes extended by
- the components of the primary key
+ @param thd The thread handle
+ @param tab The table the index belongs to
+ @param key_info The descriptor of the index whose statistics is to be deleted
+ @param ext_prefixes_only Delete statistics only on the index prefixes
+ extended by the components of the primary key
@details
The function delete statistics on the index specified by 'key_info'
defined on the table 'tab' from the statistical table index_stats.
- @retval
- 0 If the deletion is successful
- @retval
- 1 Otherwise
+ @retval 0 If all deletions are successful or we couldn't open statistics table
+ @retval 1 Otherwise
@note
The function is called when dropping an index, or dropping/changing the
@@ -3358,15 +3405,11 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info,
TABLE_LIST tables;
Open_tables_backup open_tables_backup;
int rc= 0;
-
DBUG_ENTER("delete_statistics_for_index");
- if (open_single_stat_table(thd, &tables, &stat_table_name[2],
- &open_tables_backup, TRUE))
- {
- thd->clear_error();
- DBUG_RETURN(rc);
- }
+ if (open_stat_table_for_ddl(thd, &tables, &stat_table_name[2],
+ &open_tables_backup))
+ DBUG_RETURN(0);
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
@@ -3427,7 +3470,7 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info,
index_stats.
@retval
- 0 If all updates of the table name are successful
+ 0 If all updates of the table name are successful
@retval
1 Otherwise
@@ -3435,8 +3478,10 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info,
The function is called when executing any statement that renames a table
*/
-int rename_table_in_stat_tables(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *tab,
- const LEX_CSTRING *new_db, const LEX_CSTRING *new_tab)
+int rename_table_in_stat_tables(THD *thd, const LEX_CSTRING *db,
+ const LEX_CSTRING *tab,
+ const LEX_CSTRING *new_db,
+ const LEX_CSTRING *new_tab)
{
int err;
enum_binlog_format save_binlog_format;
@@ -3447,7 +3492,9 @@ int rename_table_in_stat_tables(THD *thd, const LEX_CSTRING *db, const LEX_CSTRI
DBUG_ENTER("rename_table_in_stat_tables");
if (open_stat_tables(thd, tables, &open_tables_backup, TRUE))
+ {
DBUG_RETURN(0); // not an error
+ }
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
@@ -3504,26 +3551,19 @@ int rename_table_in_stat_tables(THD *thd, const LEX_CSTRING *db, const LEX_CSTRI
/**
- @brief
Rename a column in the statistical table column_stats
- @param
- thd The thread handle
- @param
- tab The table the column belongs to
- @param
- col The column to be renamed
- @param
- new_name The new column name
+ @param thd The thread handle
+ @param tab The table the column belongs to
+ @param col The column to be renamed
+ @param new_name The new column name
@details
The function replaces the name of the column 'col' belonging to the table
'tab' for 'new_name' in the statistical table column_stats.
- @retval
- 0 If all updates of the table name are successful
- @retval
- 1 Otherwise
+ @retval 0 If all updates of the table name are successful
+ @retval 1 Otherwise
@note
The function is called when executing any statement that renames a column,
@@ -3539,18 +3579,14 @@ int rename_column_in_stat_tables(THD *thd, TABLE *tab, Field *col,
TABLE_LIST tables;
Open_tables_backup open_tables_backup;
int rc= 0;
-
DBUG_ENTER("rename_column_in_stat_tables");
if (tab->s->tmp_table != NO_TMP_TABLE)
DBUG_RETURN(0);
- if (open_single_stat_table(thd, &tables, &stat_table_name[1],
- &open_tables_backup, TRUE))
- {
- thd->clear_error();
+ if (open_stat_table_for_ddl(thd, &tables, &stat_table_name[1],
+ &open_tables_backup))
DBUG_RETURN(rc);
- }
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
@@ -3592,9 +3628,8 @@ void set_statistics_for_table(THD *thd, TABLE *table)
{
TABLE_STATISTICS_CB *stats_cb= &table->s->stats_cb;
Table_statistics *read_stats= stats_cb->table_stats;
- Use_stat_tables_mode use_stat_table_mode= get_use_stat_tables_mode(thd);
table->used_stat_records=
- (use_stat_table_mode <= COMPLEMENTARY ||
+ (!check_eits_preferred(thd) ||
!table->stats_is_read || read_stats->cardinality_is_null) ?
table->file->stats.records : read_stats->cardinality;
@@ -3618,7 +3653,7 @@ void set_statistics_for_table(THD *thd, TABLE *table)
key_info < key_info_end; key_info++)
{
key_info->is_statistics_from_stat_tables=
- (use_stat_table_mode > COMPLEMENTARY &&
+ (check_eits_preferred(thd) &&
table->stats_is_read &&
key_info->read_stats->avg_frequency_is_inited() &&
key_info->read_stats->get_avg_frequency(0) > 0.5);
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h
index e2e66488b06..35b3aa33acc 100644
--- a/sql/sql_statistics.h
+++ b/sql/sql_statistics.h
@@ -16,12 +16,26 @@
#ifndef SQL_STATISTICS_H
#define SQL_STATISTICS_H
+/*
+ For COMPLEMENTARY_FOR_QUERIES and PREFERABLY_FOR_QUERIES they are
+ similar to the COMPLEMENTARY and PREFERABLY respectively except that
+ with these values we would not be collecting EITS for queries like
+ ANALYZE TABLE t1;
+ To collect EITS with these values, we have to use PERSISITENT FOR
+ analyze table t1 persistent for
+ columns (col1,col2...) index (idx1, idx2...)
+ or
+ analyze table t1 persistent for all
+*/
+
typedef
enum enum_use_stat_tables_mode
{
NEVER,
COMPLEMENTARY,
PREFERABLY,
+ COMPLEMENTARY_FOR_QUERIES,
+ PREFERABLY_FOR_QUERIES
} Use_stat_tables_mode;
typedef
@@ -87,6 +101,19 @@ Use_stat_tables_mode get_use_stat_tables_mode(THD *thd)
{
return (Use_stat_tables_mode) (thd->variables.use_stat_tables);
}
+inline
+bool check_eits_collection_allowed(THD *thd)
+{
+ return (get_use_stat_tables_mode(thd) == COMPLEMENTARY ||
+ get_use_stat_tables_mode(thd) == PREFERABLY);
+}
+
+inline
+bool check_eits_preferred(THD *thd)
+{
+ return (get_use_stat_tables_mode(thd) == PREFERABLY ||
+ get_use_stat_tables_mode(thd) == PREFERABLY_FOR_QUERIES);
+}
int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables);
int read_statistics_for_tables(THD *thd, TABLE_LIST *tables);
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index 3195f797e25..560815eeb6b 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2016, 2020, MariaDB
+ Copyright (c) 2016, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
** String functions
*****************************************************************************/
-bool String::real_alloc(size_t length)
+bool Binary_string::real_alloc(size_t length)
{
size_t arg_length= ALIGN_SIZE(length + 1);
DBUG_ASSERT(arg_length > length);
@@ -81,7 +81,7 @@ bool String::real_alloc(size_t length)
@retval true An error occurred when attempting to allocate memory.
*/
-bool String::realloc_raw(size_t alloc_length)
+bool Binary_string::realloc_raw(size_t alloc_length)
{
if (Alloced_length <= alloc_length)
{
@@ -103,8 +103,7 @@ bool String::realloc_raw(size_t alloc_length)
(thread_specific ?
MY_THREAD_SPECIFIC : 0)))))
{
- if (str_length > len - 1)
- str_length= 0;
+ DBUG_ASSERT(str_length < len);
if (str_length) // Avoid bugs in memcpy on AIX
memcpy(new_ptr,Ptr,str_length);
new_ptr[str_length]=0;
@@ -127,19 +126,18 @@ bool String::set_int(longlong num, bool unsigned_flag, CHARSET_INFO *cs)
if (alloc(l))
return TRUE;
str_length=(uint32) (cs->cset->longlong10_to_str)(cs,Ptr,l,base,num);
- str_charset=cs;
+ set_charset(cs);
return FALSE;
}
// Convert a number into its HEX representation
-bool String::set_hex(ulonglong num)
+bool Binary_string::set_hex(ulonglong num)
{
char *n_end;
if (alloc(65) || !(n_end= longlong2str(num, Ptr, 16)))
return true;
length((uint32) (n_end - Ptr));
- set_charset(&my_charset_latin1);
return false;
}
@@ -157,7 +155,7 @@ static inline void APPEND_HEX(char *&to, uchar value)
}
-void String::qs_append_hex(const char *str, uint32 len)
+void Static_binary_string::qs_append_hex(const char *str, uint32 len)
{
const char *str_end= str + len;
for (char *to= Ptr + str_length ; str < str_end; str++)
@@ -167,7 +165,7 @@ void String::qs_append_hex(const char *str, uint32 len)
// Convert a string to its HEX representation
-bool String::set_hex(const char *str, uint32 len)
+bool Binary_string::set_hex(const char *str, uint32 len)
{
/*
Safety: cut the source string if "len" is too large.
@@ -181,7 +179,17 @@ bool String::set_hex(const char *str, uint32 len)
return true;
length(0);
qs_append_hex(str, len);
- set_charset(&my_charset_latin1);
+ return false;
+}
+
+
+bool Binary_string::set_fcvt(double num, uint decimals)
+{
+ // Assert that `decimals` is small enough to fit into FLOATING_POINT_BUFFER
+ DBUG_ASSERT(decimals < DECIMAL_NOT_SPECIFIED);
+ if (alloc(FLOATING_POINT_BUFFER))
+ return true;
+ length(my_fcvt(num, decimals, Ptr, NULL));
return false;
}
@@ -192,7 +200,7 @@ bool String::set_real(double num,uint decimals, CHARSET_INFO *cs)
uint dummy_errors;
size_t len;
- str_charset=cs;
+ set_charset(cs);
if (decimals >= FLOATING_POINT_DECIMALS)
{
len= my_gcvt(num, MY_GCVT_ARG_DOUBLE, sizeof(buff) - 1, buff, NULL);
@@ -204,7 +212,7 @@ bool String::set_real(double num,uint decimals, CHARSET_INFO *cs)
}
-bool String::copy()
+bool Binary_string::copy()
{
if (!alloced)
{
@@ -225,18 +233,17 @@ bool String::copy()
@retval false Success.
@retval true Memory allocation failed.
*/
-bool String::copy(const String &str)
+bool Binary_string::copy(const Binary_string &str)
{
if (alloc(str.str_length))
return TRUE;
if ((str_length=str.str_length))
bmove(Ptr,str.Ptr,str_length); // May be overlapping
Ptr[str_length]=0;
- str_charset=str.str_charset;
return FALSE;
}
-bool String::copy(const char *str,size_t arg_length, CHARSET_INFO *cs)
+bool Binary_string::copy(const char *str, size_t arg_length)
{
DBUG_ASSERT(arg_length < UINT_MAX32);
if (alloc(arg_length))
@@ -253,7 +260,6 @@ bool String::copy(const char *str,size_t arg_length, CHARSET_INFO *cs)
else if ((str_length=uint32(arg_length)))
memcpy(Ptr,str,arg_length);
Ptr[arg_length]=0;
- str_charset=cs;
return FALSE;
}
@@ -263,7 +269,7 @@ bool String::copy(const char *str,size_t arg_length, CHARSET_INFO *cs)
from valgrind
*/
-bool String::copy_or_move(const char *str,size_t arg_length, CHARSET_INFO *cs)
+bool Binary_string::copy_or_move(const char *str, size_t arg_length)
{
DBUG_ASSERT(arg_length < UINT_MAX32);
if (alloc(arg_length))
@@ -271,7 +277,6 @@ bool String::copy_or_move(const char *str,size_t arg_length, CHARSET_INFO *cs)
if ((str_length=uint32(arg_length)))
memmove(Ptr,str,arg_length);
Ptr[arg_length]=0;
- str_charset=cs;
return FALSE;
}
@@ -397,7 +402,7 @@ bool String::copy_aligned(const char *str, size_t arg_length, size_t offset,
Ptr[aligned_length]=0;
/* str_length is always >= 0 as arg_length is != 0 */
str_length= (uint32)aligned_length;
- str_charset= cs;
+ set_charset(cs);
return FALSE;
}
@@ -433,8 +438,8 @@ bool String::copy(const char *str, size_t arg_length,
{
uint32 offset;
- DBUG_ASSERT(!str || str != Ptr || !alloced);
-
+ DBUG_ASSERT(!str || str != Ptr || !is_alloced());
+
if (!needs_conversion(arg_length, from_cs, to_cs, &offset))
{
*errors= 0;
@@ -450,7 +455,7 @@ bool String::copy(const char *str, size_t arg_length,
return TRUE;
str_length=copy_and_convert((char*) Ptr, new_length, to_cs,
str, arg_length, from_cs, errors);
- str_charset=to_cs;
+ set_charset(to_cs);
return FALSE;
}
@@ -476,19 +481,20 @@ bool String::copy(const char *str, size_t arg_length,
bool String::set_ascii(const char *str, size_t arg_length)
{
- if (str_charset->mbminlen == 1)
+ if (mbminlen() == 1)
{
- set(str, arg_length, str_charset);
+ set(str, arg_length, charset());
return 0;
}
uint dummy_errors;
- return copy(str, (uint32)arg_length, &my_charset_latin1, str_charset, &dummy_errors);
+ return copy(str, (uint32) arg_length, &my_charset_latin1,
+ charset(), &dummy_errors);
}
/* This is used by mysql.cc */
-bool String::fill(uint32 max_length,char fill_char)
+bool Binary_string::fill(uint32 max_length,char fill_char)
{
if (str_length > max_length)
Ptr[str_length=max_length]=0;
@@ -504,22 +510,10 @@ bool String::fill(uint32 max_length,char fill_char)
void String::strip_sp()
{
- while (str_length && my_isspace(str_charset,Ptr[str_length-1]))
+ while (str_length && my_isspace(charset(), Ptr[str_length-1]))
str_length--;
}
-bool String::append(const String &s)
-{
- if (s.length())
- {
- if (realloc_with_extra_if_needed(str_length+s.length()))
- return TRUE;
- memcpy(Ptr+str_length,s.ptr(),s.length());
- str_length+=s.length();
- }
- return FALSE;
-}
-
/*
Append an ASCII string to the a string of the current character set
@@ -535,13 +529,13 @@ bool String::append(const char *s,size_t size)
/*
For an ASCII incompatible string, e.g. UCS-2, we need to convert
*/
- if (str_charset->mbminlen > 1)
+ if (mbminlen() > 1)
{
- uint32 add_length=arg_length * str_charset->mbmaxlen;
+ uint32 add_length= arg_length * mbmaxlen();
uint dummy_errors;
if (realloc_with_extra_if_needed(str_length+ add_length))
return TRUE;
- str_length+= copy_and_convert(Ptr+str_length, add_length, str_charset,
+ str_length+= copy_and_convert(Ptr + str_length, add_length, charset(),
s, arg_length, &my_charset_latin1,
&dummy_errors);
return FALSE;
@@ -550,24 +544,11 @@ bool String::append(const char *s,size_t size)
/*
For an ASCII compatinble string we can just append.
*/
- if (realloc_with_extra_if_needed(str_length+arg_length))
- return TRUE;
- memcpy(Ptr+str_length,s,arg_length);
- str_length+=arg_length;
- return FALSE;
+ return Binary_string::append(s, arg_length);
}
-/*
- Append a 0-terminated ASCII string
-*/
-
-bool String::append(const char *s)
-{
- return append(s, (uint) strlen(s));
-}
-
-bool String::append_longlong(longlong val)
+bool Binary_string::append_longlong(longlong val)
{
if (realloc(str_length+MAX_BIGINT_WIDTH+2))
return TRUE;
@@ -577,7 +558,7 @@ bool String::append_longlong(longlong val)
}
-bool String::append_ulonglong(ulonglong val)
+bool Binary_string::append_ulonglong(ulonglong val)
{
if (realloc(str_length+MAX_BIGINT_WIDTH+2))
return TRUE;
@@ -598,13 +579,13 @@ bool String::append(const char *s, size_t arg_length, CHARSET_INFO *cs)
uint32 offset;
- if (needs_conversion((uint32)arg_length, cs, str_charset, &offset))
+ if (needs_conversion((uint32)arg_length, cs, charset(), &offset))
{
size_t add_length;
if ((cs == &my_charset_bin) && offset)
{
- DBUG_ASSERT(str_charset->mbminlen > offset);
- offset= str_charset->mbminlen - offset; // How many characters to pad
+ DBUG_ASSERT(mbminlen() > offset);
+ offset= mbminlen() - offset; // How many characters to pad
add_length= arg_length + offset;
if (realloc(str_length + add_length))
return TRUE;
@@ -614,24 +595,19 @@ bool String::append(const char *s, size_t arg_length, CHARSET_INFO *cs)
return FALSE;
}
- add_length= arg_length / cs->mbminlen * str_charset->mbmaxlen;
+ add_length= arg_length / cs->mbminlen * mbmaxlen();
uint dummy_errors;
if (realloc_with_extra_if_needed(str_length + add_length))
return TRUE;
- str_length+= copy_and_convert(Ptr+str_length, (uint32)add_length, str_charset,
- s, (uint32)arg_length, cs, &dummy_errors);
- }
- else
- {
- if (realloc_with_extra_if_needed(str_length + arg_length))
- return TRUE;
- memcpy(Ptr + str_length, s, arg_length);
- str_length+= (uint32)arg_length;
+ str_length+= copy_and_convert(Ptr + str_length, (uint32)add_length, charset(),
+ s, (uint32)arg_length, cs, &dummy_errors);
+ return false;
}
- return FALSE;
+ return Binary_string::append(s, arg_length);
}
-bool String::append(IO_CACHE* file, uint32 arg_length)
+
+bool Binary_string::append(IO_CACHE* file, uint32 arg_length)
{
if (realloc_with_extra_if_needed(str_length+arg_length))
return TRUE;
@@ -679,19 +655,8 @@ bool String::append_with_prefill(const char *s,uint32 arg_length,
return FALSE;
}
-uint32 String::numchars() const
-{
- return (uint32) str_charset->cset->numchars(str_charset, Ptr, Ptr+str_length);
-}
-
-int String::charpos(longlong i,uint32 offset)
-{
- if (i <= 0)
- return (int)i;
- return (int)str_charset->cset->charpos(str_charset,Ptr+offset,Ptr+str_length,(size_t)i);
-}
-int String::strstr(const String &s,uint32 offset)
+int Static_binary_string::strstr(const Static_binary_string &s, uint32 offset)
{
if (s.length()+offset <= str_length)
{
@@ -722,7 +687,7 @@ skip:
** Search string from end. Offset is offset to the end of string
*/
-int String::strrstr(const String &s,uint32 offset)
+int Static_binary_string::strrstr(const Static_binary_string &s, uint32 offset)
{
if (s.length() <= offset && offset <= str_length)
{
@@ -749,18 +714,9 @@ skip:
return -1;
}
-/*
- Replace substring with string
- If wrong parameter or not enough memory, do nothing
-*/
-bool String::replace(uint32 offset,uint32 arg_length,const String &to)
-{
- return replace(offset,arg_length,to.ptr(),to.length());
-}
-
-bool String::replace(uint32 offset,uint32 arg_length,
- const char *to, uint32 to_length)
+bool Binary_string::replace(uint32 offset, uint32 arg_length,
+ const char *to, uint32 to_length)
{
long diff = (long) to_length-(long) arg_length;
if (offset+arg_length <= str_length)
@@ -791,7 +747,7 @@ bool String::replace(uint32 offset,uint32 arg_length,
// added by Holyfoot for "geometry" needs
-int String::reserve(size_t space_needed, size_t grow_by)
+int Binary_string::reserve(size_t space_needed, size_t grow_by)
{
if (Alloced_length < str_length + space_needed)
{
@@ -801,34 +757,34 @@ int String::reserve(size_t space_needed, size_t grow_by)
return FALSE;
}
-void String::qs_append(const char *str, size_t len)
+void Static_binary_string::qs_append(const char *str, size_t len)
{
memcpy(Ptr + str_length, str, len + 1);
str_length += (uint32)len;
}
-void String::qs_append(double d)
+void Static_binary_string::qs_append(double d)
{
char *buff = Ptr + str_length;
str_length+= (uint32) my_gcvt(d, MY_GCVT_ARG_DOUBLE, FLOATING_POINT_BUFFER - 1, buff,
NULL);
}
-void String::qs_append(double *d)
+void Static_binary_string::qs_append(double *d)
{
double ld;
float8get(ld, (char*) d);
qs_append(ld);
}
-void String::qs_append(int i)
+void Static_binary_string::qs_append(int i)
{
char *buff= Ptr + str_length;
char *end= int10_to_str(i, buff, -10);
str_length+= (int) (end-buff);
}
-void String::qs_append(ulonglong i)
+void Static_binary_string::qs_append(ulonglong i)
{
char *buff= Ptr + str_length;
char *end= longlong10_to_str(i, buff, 10);
@@ -950,12 +906,12 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length)
of a constant string.
Not safe to reuse.
*/
- if (from->Alloced_length > 0) // "from" is #c or #d (not a constant)
+ if (from->alloced_length() > 0) // "from" is #c or #d (not a constant)
{
- if (from->Alloced_length >= from_length)
+ if (from->alloced_length() >= from_length)
return from; // #c or #d (large enough to store from_length bytes)
- if (from->alloced)
+ if (from->is_alloced())
{
(void) from->realloc(from_length);
return from; // #d (reallocated to fit from_length bytes)
@@ -994,15 +950,15 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length)
Note, as we can't distinguish between #a and #b for sure,
so we can't assert "not #a", but we can at least assert "not #e".
*/
- DBUG_ASSERT(!from->alloced || from->Alloced_length > 0); // Not #e
+ DBUG_ASSERT(!from->is_alloced() || from->alloced_length() > 0); // Not #e
(void) from->realloc(from_length);
return from;
}
if (from->uses_buffer_owned_by(to))
{
- DBUG_ASSERT(!from->alloced);
- DBUG_ASSERT(to->alloced);
+ DBUG_ASSERT(!from->is_alloced());
+ DBUG_ASSERT(to->is_alloced());
/*
"from" is a constant string pointing to a fragment of alloced string "to":
to= xxxFFFyyy
@@ -1017,14 +973,14 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length)
DBUG_ASSERT(to->length() >= xxx_length);
to->replace(0, xxx_length, "", 0); // Remove the "xxx" part
to->realloc(from_length);
- to->str_charset= from->str_charset;
+ to->set_charset(from->charset());
return to;
}
- if (to->realloc(from_length))
+ if (to->alloc(from_length))
return from; // Actually an error
if ((to->str_length=MY_MIN(from->str_length,from_length)))
memcpy(to->Ptr,from->Ptr,to->str_length);
- to->str_charset=from->str_charset;
+ to->set_charset(*from);
return to; // "from" was of types #a, #b, #e, or small #c.
}
@@ -1184,26 +1140,6 @@ void String::print_with_conversion(String *print, CHARSET_INFO *cs) const
}
-/*
- Exchange state of this object and argument.
-
- SYNOPSIS
- String::swap()
-
- RETURN
- Target string will contain state of this object and vice versa.
-*/
-
-void String::swap(String &s)
-{
- swap_variables(char *, Ptr, s.Ptr);
- swap_variables(uint32, str_length, s.str_length);
- swap_variables(uint32, Alloced_length, s.Alloced_length);
- swap_variables(bool, alloced, s.alloced);
- swap_variables(CHARSET_INFO*, str_charset, s.str_charset);
-}
-
-
/**
Convert string to printable ASCII string
@@ -1274,3 +1210,21 @@ uint convert_to_printable(char *to, size_t to_len,
*t= '\0';
return (uint) (t - to);
}
+
+size_t convert_to_printable_required_length(uint len)
+{
+ return static_cast<size_t>(len) * 4 + 3/*dots*/ + 1/*trailing \0 */;
+}
+
+bool String::append_semi_hex(const char *s, uint len, CHARSET_INFO *cs)
+{
+ if (!len)
+ return false;
+ size_t dst_len= convert_to_printable_required_length(len);
+ if (reserve(dst_len))
+ return true;
+ uint nbytes= convert_to_printable(Ptr + str_length, dst_len, s, len, cs);
+ DBUG_ASSERT((ulonglong) str_length + nbytes < UINT_MAX32);
+ str_length+= nbytes;
+ return false;
+}
diff --git a/sql/sql_string.h b/sql/sql_string.h
index 4f9a68acbb4..0098ad15cb6 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -130,6 +130,8 @@ size_t my_copy_with_hex_escaping(CHARSET_INFO *cs,
uint convert_to_printable(char *to, size_t to_len,
const char *from, size_t from_len,
CHARSET_INFO *from_cs, size_t nbytes= 0);
+size_t convert_to_printable_required_length(uint len);
+
class Charset
{
@@ -139,6 +141,37 @@ public:
Charset(CHARSET_INFO *cs) :m_charset(cs) { }
CHARSET_INFO *charset() const { return m_charset; }
+ uint mbminlen() const { return m_charset->mbminlen; }
+ uint mbmaxlen() const { return m_charset->mbmaxlen; }
+
+ size_t numchars(const char *str, const char *end) const
+ {
+ return m_charset->cset->numchars(m_charset, str, end);
+ }
+ size_t lengthsp(const char *str, size_t length) const
+ {
+ return m_charset->cset->lengthsp(m_charset, str, length);
+ }
+ size_t charpos(const char *str, const char *end, size_t pos) const
+ {
+ return m_charset->cset->charpos(m_charset, str, end, pos);
+ }
+ void set_charset(CHARSET_INFO *charset_arg)
+ {
+ m_charset= charset_arg;
+ }
+ void set_charset(const Charset &other)
+ {
+ m_charset= other.m_charset;
+ }
+ void swap(Charset &other)
+ {
+ swap_variables(CHARSET_INFO*, m_charset, other.m_charset);
+ }
+ bool same_encoding(const Charset &other) const
+ {
+ return !strcmp(m_charset->csname, other.m_charset->csname);
+ }
/*
Collation name without the character set name.
For example, in case of "latin1_swedish_ci",
@@ -149,57 +182,242 @@ public:
bool eq_collation_specific_names(CHARSET_INFO *cs) const;
};
-class String : public Sql_alloc
+
+/*
+ A storage for String.
+ Should be eventually derived from LEX_STRING.
+*/
+class Static_binary_string : public Sql_alloc
{
+protected:
char *Ptr;
- uint32 str_length,Alloced_length, extra_alloc;
- bool alloced,thread_specific;
- CHARSET_INFO *str_charset;
+ uint32 str_length;
public:
- String()
- {
- Ptr=0; str_length=Alloced_length=extra_alloc=0;
- alloced= thread_specific= 0;
- str_charset= &my_charset_bin;
+ Static_binary_string()
+ :Ptr(NULL),
+ str_length(0)
+ { }
+ Static_binary_string(char *str, size_t length_arg)
+ :Ptr(str),
+ str_length((uint32) length_arg)
+ {
+ DBUG_ASSERT(length_arg < UINT_MAX32);
}
- String(size_t length_arg)
- {
- alloced= thread_specific= 0;
- Alloced_length= extra_alloc= 0; (void) real_alloc(length_arg);
- str_charset= &my_charset_bin;
+ inline uint32 length() const { return str_length;}
+ inline char& operator [] (size_t i) const { return Ptr[i]; }
+ inline void length(size_t len) { str_length=(uint32)len ; }
+ inline bool is_empty() const { return (str_length == 0); }
+ inline const char *ptr() const { return Ptr; }
+ inline const char *end() const { return Ptr + str_length; }
+
+ LEX_STRING lex_string() const
+ {
+ LEX_STRING str = { (char*) ptr(), length() };
+ return str;
}
- String(const char *str, CHARSET_INFO *cs)
- {
- Ptr=(char*) str; str_length= (uint32) strlen(str);
+ LEX_CSTRING lex_cstring() const
+ {
+ LEX_CSTRING skr = { ptr(), length() };
+ return skr;
+ }
+
+ bool has_8bit_bytes() const
+ {
+ for (const char *c= ptr(), *c_end= end(); c < c_end; c++)
+ {
+ if (!my_isascii(*c))
+ return true;
+ }
+ return false;
+ }
+
+ bool bin_eq(const Static_binary_string *other) const
+ {
+ return length() == other->length() &&
+ !memcmp(ptr(), other->ptr(), length());
+ }
+
+ void set(char *str, size_t len)
+ {
+ Ptr= str;
+ str_length= (uint32) len;
+ }
+
+ void swap(Static_binary_string &s)
+ {
+ swap_variables(char *, Ptr, s.Ptr);
+ swap_variables(uint32, str_length, s.str_length);
+ }
+
+ /*
+ PMG 2004.11.12
+ This is a method that works the same as perl's "chop". It simply
+ drops the last character of a string. This is useful in the case
+ of the federated storage handler where I'm building a unknown
+ number, list of values and fields to be used in a sql insert
+ statement to be run on the remote server, and have a comma after each.
+ When the list is complete, I "chop" off the trailing comma
+
+ ex.
+ String stringobj;
+ stringobj.append("VALUES ('foo', 'fi', 'fo',");
+ stringobj.chop();
+ stringobj.append(")");
+
+ In this case, the value of string was:
+
+ VALUES ('foo', 'fi', 'fo',
+ VALUES ('foo', 'fi', 'fo'
+ VALUES ('foo', 'fi', 'fo')
+ */
+ inline void chop()
+ {
+ str_length--;
+ Ptr[str_length]= '\0';
+ DBUG_ASSERT(strlen(Ptr) == str_length);
+ }
+
+ // Returns offset to substring or -1
+ int strstr(const Static_binary_string &search, uint32 offset=0);
+ // Returns offset to substring or -1
+ int strrstr(const Static_binary_string &search, uint32 offset=0);
+
+ /*
+ The following append operations do NOT check alloced memory
+ q_*** methods writes values of parameters itself
+ qs_*** methods writes string representation of value
+ */
+ void q_append(const char c)
+ {
+ Ptr[str_length++] = c;
+ }
+ void q_append2b(const uint32 n)
+ {
+ int2store(Ptr + str_length, n);
+ str_length += 2;
+ }
+ void q_append(const uint32 n)
+ {
+ int4store(Ptr + str_length, n);
+ str_length += 4;
+ }
+ void q_append(double d)
+ {
+ float8store(Ptr + str_length, d);
+ str_length += 8;
+ }
+ void q_append(double *d)
+ {
+ float8store(Ptr + str_length, *d);
+ str_length += 8;
+ }
+ void q_append(const char *data, size_t data_len)
+ {
+ if (data_len)
+ memcpy(Ptr + str_length, data, data_len);
+ DBUG_ASSERT(str_length <= UINT_MAX32 - data_len);
+ str_length += (uint)data_len;
+ }
+ void q_append(const LEX_CSTRING *ls)
+ {
+ DBUG_ASSERT(ls->length < UINT_MAX32 &&
+ ((ls->length == 0 && !ls->str) ||
+ ls->length == strlen(ls->str)));
+ q_append(ls->str, (uint32) ls->length);
+ }
+
+ void write_at_position(int position, uint32 value)
+ {
+ int4store(Ptr + position,value);
+ }
+
+ void qs_append(const char *str)
+ {
+ qs_append(str, (uint32)strlen(str));
+ }
+ void qs_append(const LEX_CSTRING *ls)
+ {
+ DBUG_ASSERT(ls->length < UINT_MAX32 &&
+ ((ls->length == 0 && !ls->str) ||
+ ls->length == strlen(ls->str)));
+ qs_append(ls->str, (uint32)ls->length);
+ }
+ void qs_append(const char *str, size_t len);
+ void qs_append_hex(const char *str, uint32 len);
+ void qs_append(double d);
+ void qs_append(double *d);
+ inline void qs_append(const char c)
+ {
+ Ptr[str_length]= c;
+ str_length++;
+ }
+ void qs_append(int i);
+ void qs_append(uint i)
+ {
+ qs_append((ulonglong)i);
+ }
+ void qs_append(ulong i)
+ {
+ qs_append((ulonglong)i);
+ }
+ void qs_append(ulonglong i);
+ void qs_append(longlong i, int radix)
+ {
+ char *buff= Ptr + str_length;
+ char *end= ll2str(i, buff, radix, 0);
+ str_length+= uint32(end-buff);
+ }
+};
+
+
+class Binary_string: public Static_binary_string
+{
+ uint32 Alloced_length, extra_alloc;
+ bool alloced, thread_specific;
+ void init_private_data()
+ {
Alloced_length= extra_alloc= 0;
- alloced= thread_specific= 0;
- str_charset=cs;
+ alloced= thread_specific= false;
+ }
+public:
+ Binary_string()
+ {
+ init_private_data();
+ }
+ explicit Binary_string(size_t length_arg)
+ {
+ init_private_data();
+ (void) real_alloc(length_arg);
}
+ explicit Binary_string(const char *str)
+ :Binary_string(str, strlen(str))
+ { }
/*
NOTE: If one intend to use the c_ptr() method, the following two
contructors need the size of memory for STR to be at least LEN+1 (to make
room for zero termination).
*/
- String(const char *str,size_t len, CHARSET_INFO *cs)
- {
- Ptr=(char*) str; str_length=(uint32)len; Alloced_length= extra_alloc=0;
- alloced= thread_specific= 0;
- str_charset=cs;
+ Binary_string(const char *str, size_t len)
+ :Static_binary_string((char *) str, len)
+ {
+ init_private_data();
}
- String(char *str,size_t len, CHARSET_INFO *cs)
- {
- Ptr=(char*) str; Alloced_length=str_length=(uint32)len; extra_alloc= 0;
+ Binary_string(char *str, size_t len)
+ :Static_binary_string(str, len)
+ {
+ Alloced_length= (uint32) len;
+ extra_alloc= 0;
alloced= thread_specific= 0;
- str_charset=cs;
}
- String(const String &str)
- {
- Ptr=str.Ptr ; str_length=str.str_length ;
- Alloced_length=str.Alloced_length; extra_alloc= 0;
+ explicit Binary_string(const Binary_string &str)
+ :Static_binary_string(str)
+ {
+ Alloced_length= str.Alloced_length;
+ extra_alloc= 0;
alloced= thread_specific= 0;
- str_charset=str.str_charset;
}
- ~String() { free(); }
+
+ ~Binary_string() { free(); }
/* Mark variable thread specific it it's not allocated already */
inline void set_thread_specific()
@@ -207,158 +425,181 @@ public:
if (!alloced)
thread_specific= 1;
}
- inline void set_charset(CHARSET_INFO *charset_arg)
- { str_charset= charset_arg; }
- inline CHARSET_INFO *charset() const { return str_charset; }
- inline uint32 length() const { return str_length;}
+ bool is_alloced() const { return alloced; }
inline uint32 alloced_length() const { return Alloced_length;}
inline uint32 extra_allocation() const { return extra_alloc;}
- inline char& operator [] (size_t i) const { return Ptr[i]; }
- inline void length(size_t len) { str_length=(uint32)len ; }
inline void extra_allocation(size_t len) { extra_alloc= (uint32)len; }
- inline bool is_empty() const { return (str_length == 0); }
inline void mark_as_const() { Alloced_length= 0;}
- inline const char *ptr() const { return Ptr; }
- inline const char *end() const { return Ptr + str_length; }
- inline char *c_ptr()
- {
- DBUG_ASSERT(!alloced || !Ptr || !Alloced_length ||
- (Alloced_length >= (str_length + 1)));
- if (!Ptr || Ptr[str_length]) /* Should be safe */
- (void) realloc(str_length);
- return Ptr;
- }
- inline char *c_ptr_quick()
+ inline bool uses_buffer_owned_by(const Binary_string *s) const
{
- if (Ptr && str_length < Alloced_length)
- Ptr[str_length]=0;
- return Ptr;
+ return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length);
}
- inline char *c_ptr_safe()
+
+ /* Swap two string objects. Efficient way to exchange data without memcpy. */
+ void swap(Binary_string &s)
{
- if (Ptr && str_length < Alloced_length)
- Ptr[str_length]=0;
- else
- (void) realloc(str_length);
- return Ptr;
+ Static_binary_string::swap(s);
+ swap_variables(uint32, Alloced_length, s.Alloced_length);
+ swap_variables(bool, alloced, s.alloced);
}
- LEX_STRING lex_string() const
+
+ /**
+ Points the internal buffer to the supplied one. The old buffer is freed.
+ @param str Pointer to the new buffer.
+ @param arg_length Length of the new buffer in characters, excluding any
+ null character.
+ @note The new buffer will not be null terminated.
+ */
+ void set_alloced(char *str, size_t length_arg, size_t alloced_length_arg)
{
- LEX_STRING str = { (char*) ptr(), length() };
- return str;
+ free();
+ Static_binary_string::set(str, length_arg);
+ DBUG_ASSERT(alloced_length_arg < UINT_MAX32);
+ Alloced_length= (uint32) alloced_length_arg;
}
- LEX_CSTRING lex_cstring() const
+ inline void set(char *str, size_t arg_length)
{
- LEX_CSTRING skr = { ptr(), length() };
- return skr;
+ set_alloced(str, arg_length, arg_length);
}
-
- size_t lengthsp() const
+ inline void set(const char *str, size_t arg_length)
{
- return str_charset->cset->lengthsp(str_charset, Ptr, str_length);
+ free();
+ Static_binary_string::set((char *) str, arg_length);
}
- void set(String &str,size_t offset,size_t arg_length)
+ void set(Binary_string &str, size_t offset, size_t arg_length)
{
DBUG_ASSERT(&str != this);
free();
- Ptr=(char*) str.ptr()+offset; str_length=(uint32)arg_length;
+ Static_binary_string::set((char*) str.ptr() + offset, arg_length);
if (str.Alloced_length)
- Alloced_length=(uint32)(str.Alloced_length-offset);
- str_charset=str.str_charset;
+ Alloced_length= (uint32) (str.Alloced_length - offset);
}
-
- /**
- Points the internal buffer to the supplied one. The old buffer is freed.
- @param str Pointer to the new buffer.
- @param arg_length Length of the new buffer in characters, excluding any
- null character.
- @param cs Character set to use for interpreting string data.
- @note The new buffer will not be null terminated.
- */
- inline void set(char *str,size_t arg_length, CHARSET_INFO *cs)
+ /* Take over handling of buffer from some other object */
+ void reset(char *ptr_arg, size_t length_arg, size_t alloced_length_arg)
{
- free();
- Ptr=(char*) str; str_length=Alloced_length=(uint32)arg_length;
- str_charset=cs;
+ set_alloced(ptr_arg, length_arg, alloced_length_arg);
+ alloced= ptr_arg != 0;
}
- inline void set(const char *str,size_t arg_length, CHARSET_INFO *cs)
+
+ /* Forget about the buffer, let some other object handle it */
+ char *release()
{
- free();
- Ptr=(char*) str; str_length=(uint32)arg_length;
- str_charset=cs;
+ char *old= Ptr;
+ Static_binary_string::set(NULL, 0);
+ init_private_data();
+ return old;
}
- bool set_ascii(const char *str, size_t arg_length);
- inline void set_quick(char *str,size_t arg_length, CHARSET_INFO *cs)
+
+ inline void set_quick(char *str, size_t arg_length)
{
if (!alloced)
{
- Ptr=(char*) str; str_length=Alloced_length=(uint32)arg_length;
+ Static_binary_string::set(str, arg_length);
+ Alloced_length= (uint32) arg_length;
}
- str_charset=cs;
}
- bool set_int(longlong num, bool unsigned_flag, CHARSET_INFO *cs);
- bool set(int num, CHARSET_INFO *cs) { return set_int(num, false, cs); }
- bool set(uint num, CHARSET_INFO *cs) { return set_int(num, true, cs); }
- bool set(long num, CHARSET_INFO *cs) { return set_int(num, false, cs); }
- bool set(ulong num, CHARSET_INFO *cs) { return set_int(num, true, cs); }
- bool set(longlong num, CHARSET_INFO *cs) { return set_int(num, false, cs); }
- bool set(ulonglong num, CHARSET_INFO *cs) { return set_int((longlong)num, true, cs); }
- bool set_real(double num,uint decimals, CHARSET_INFO *cs);
+
+ inline Binary_string& operator=(const Binary_string &s)
+ {
+ if (&s != this)
+ {
+ /*
+ It is forbidden to do assignments like
+ some_string = substring_of_that_string
+ */
+ DBUG_ASSERT(!s.uses_buffer_owned_by(this));
+ set_alloced((char *) s.Ptr, s.str_length, s.Alloced_length);
+ }
+ return *this;
+ }
bool set_hex(ulonglong num);
bool set_hex(const char *str, uint32 len);
+ bool set_fcvt(double num, uint decimals);
- /* Take over handling of buffer from some other object */
- void reset(char *ptr_arg, size_t length_arg, size_t alloced_length_arg,
- CHARSET_INFO *cs)
- {
- free();
- Ptr= ptr_arg;
- str_length= (uint32)length_arg;
- Alloced_length= (uint32)alloced_length_arg;
- str_charset= cs;
- alloced= ptr_arg != 0;
- }
+ bool copy(); // Alloc string if not alloced
+ bool copy(const Binary_string &s); // Allocate new string
+ bool copy(const char *s, size_t arg_length); // Allocate new string
+ bool copy_or_move(const char *s,size_t arg_length);
- /* Forget about the buffer, let some other object handle it */
- char *release()
+ bool append_ulonglong(ulonglong val);
+ bool append_longlong(longlong val);
+
+ bool append(const char *s, size_t size)
{
- char *old= Ptr;
- Ptr=0; str_length= Alloced_length= extra_alloc= 0;
- alloced= thread_specific= 0;
- return old;
+ if (!size)
+ return false;
+ if (realloc_with_extra_if_needed(str_length + size))
+ return true;
+ q_append(s, size);
+ return false;
+ }
+ bool append(const Binary_string &s)
+ {
+ return append(s.ptr(), s.length());
}
+ bool append(IO_CACHE* file, uint32 arg_length);
- /*
- PMG 2004.11.12
- This is a method that works the same as perl's "chop". It simply
- drops the last character of a string. This is useful in the case
- of the federated storage handler where I'm building a unknown
- number, list of values and fields to be used in a sql insert
- statement to be run on the remote server, and have a comma after each.
- When the list is complete, I "chop" off the trailing comma
+ inline bool append_char(char chr)
+ {
+ if (str_length < Alloced_length)
+ {
+ Ptr[str_length++]= chr;
+ }
+ else
+ {
+ if (unlikely(realloc_with_extra(str_length + 1)))
+ return true;
+ Ptr[str_length++]= chr;
+ }
+ return false;
+ }
+ bool append_hex(const char *src, uint32 srclen)
+ {
+ for (const char *src_end= src + srclen ; src != src_end ; src++)
+ {
+ if (unlikely(append_char(_dig_vec_lower[((uchar) *src) >> 4])) ||
+ unlikely(append_char(_dig_vec_lower[((uchar) *src) & 0x0F])))
+ return true;
+ }
+ return false;
+ }
- ex.
- String stringobj;
- stringobj.append("VALUES ('foo', 'fi', 'fo',");
- stringobj.chop();
- stringobj.append(")");
+ bool append_with_step(const char *s, uint32 arg_length, uint32 step_alloc)
+ {
+ uint32 new_length= arg_length + str_length;
+ if (new_length > Alloced_length &&
+ unlikely(realloc(new_length + step_alloc)))
+ return true;
+ q_append(s, arg_length);
+ return false;
+ }
- In this case, the value of string was:
+ inline char *c_ptr()
+ {
+ DBUG_ASSERT(!alloced || !Ptr || !Alloced_length ||
+ (Alloced_length >= (str_length + 1)));
- VALUES ('foo', 'fi', 'fo',
- VALUES ('foo', 'fi', 'fo'
- VALUES ('foo', 'fi', 'fo')
-
- */
- inline void chop()
+ if (!Ptr || Ptr[str_length]) // Should be safe
+ (void) realloc(str_length);
+ return Ptr;
+ }
+ inline char *c_ptr_quick()
{
- str_length--;
- Ptr[str_length]= '\0';
- DBUG_ASSERT(strlen(Ptr) == str_length);
+ if (Ptr && str_length < Alloced_length)
+ Ptr[str_length]=0;
+ return Ptr;
+ }
+ inline char *c_ptr_safe()
+ {
+ if (Ptr && str_length < Alloced_length)
+ Ptr[str_length]=0;
+ else
+ (void) realloc(str_length);
+ return Ptr;
}
inline void free()
@@ -369,8 +610,7 @@ public:
my_free(Ptr);
}
Alloced_length= extra_alloc= 0;
- Ptr=0;
- str_length=0; /* Safety */
+ Static_binary_string::set(NULL, 0); // Safety
}
inline bool alloc(size_t arg_length)
{
@@ -378,13 +618,13 @@ public:
return 0;
return real_alloc(arg_length);
}
- bool real_alloc(size_t arg_length); // Empties old string
+ bool real_alloc(size_t arg_length); // Empties old string
bool realloc_raw(size_t arg_length);
bool realloc(size_t arg_length)
{
if (realloc_raw(arg_length))
return TRUE;
- Ptr[arg_length]=0; // This make other funcs shorter
+ Ptr[arg_length]= 0; // This make other funcs shorter
return FALSE;
}
bool realloc_with_extra(size_t arg_length)
@@ -418,37 +658,185 @@ public:
arg_length,MYF((thread_specific ?
MY_THREAD_SPECIFIC : 0))))))
{
- Alloced_length = 0;
- real_alloc(arg_length);
+ Alloced_length= 0;
+ real_alloc(arg_length);
}
else
{
- Ptr=new_ptr;
- Alloced_length=(uint32)arg_length;
+ Ptr= new_ptr;
+ Alloced_length= (uint32) arg_length;
}
}
}
- bool is_alloced() const { return alloced; }
+ void move(Binary_string &s)
+ {
+ set_alloced(s.Ptr, s.str_length, s.Alloced_length);
+ extra_alloc= s.extra_alloc;
+ alloced= s.alloced;
+ thread_specific= s.thread_specific;
+ s.alloced= 0;
+ }
+ bool fill(uint32 max_length,char fill);
+ /*
+ Replace substring with string
+ If wrong parameter or not enough memory, do nothing
+ */
+ bool replace(uint32 offset,uint32 arg_length, const char *to, uint32 length);
+ bool replace(uint32 offset,uint32 arg_length, const Static_binary_string &to)
+ {
+ return replace(offset,arg_length,to.ptr(),to.length());
+ }
+
+ int reserve(size_t space_needed)
+ {
+ DBUG_ASSERT((ulonglong) str_length + space_needed < UINT_MAX32);
+ return realloc(str_length + space_needed);
+ }
+ int reserve(size_t space_needed, size_t grow_by);
+
+ inline char *prep_append(uint32 arg_length, uint32 step_alloc)
+ {
+ uint32 new_length= arg_length + str_length;
+ if (new_length > Alloced_length)
+ {
+ if (unlikely(realloc(new_length + step_alloc)))
+ return 0;
+ }
+ uint32 old_length= str_length;
+ str_length+= arg_length;
+ return Ptr + old_length; // Area to use
+ }
+
+
+ void q_net_store_length(ulonglong length)
+ {
+ DBUG_ASSERT(Alloced_length >= (str_length + net_length_size(length)));
+ char *pos= (char *) net_store_length((uchar *)(Ptr + str_length), length);
+ str_length= uint32(pos - Ptr);
+ }
+ void q_net_store_data(const uchar *from, size_t length)
+ {
+ DBUG_ASSERT(length < UINT_MAX32);
+ DBUG_ASSERT(Alloced_length >= (str_length + length +
+ net_length_size(length)));
+ q_net_store_length(length);
+ q_append((const char *)from, (uint32) length);
+ }
+};
+
+
+class String: public Charset, public Binary_string
+{
+public:
+ String() { }
+ String(size_t length_arg)
+ :Binary_string(length_arg)
+ { }
+ String(const char *str, CHARSET_INFO *cs)
+ :Charset(cs),
+ Binary_string(str)
+ { }
+ /*
+ NOTE: If one intend to use the c_ptr() method, the following two
+ contructors need the size of memory for STR to be at least LEN+1 (to make
+ room for zero termination).
+ */
+ String(const char *str, size_t len, CHARSET_INFO *cs)
+ :Charset(cs),
+ Binary_string((char *) str, len)
+ { }
+ String(char *str, size_t len, CHARSET_INFO *cs)
+ :Charset(cs),
+ Binary_string(str, len)
+ { }
+ String(const String &str)
+ :Charset(str),
+ Binary_string(str)
+ { }
+
+ void set(String &str,size_t offset,size_t arg_length)
+ {
+ Binary_string::set(str, offset, arg_length);
+ set_charset(str);
+ }
+ inline void set(char *str,size_t arg_length, CHARSET_INFO *cs)
+ {
+ Binary_string::set(str, arg_length);
+ set_charset(cs);
+ }
+ inline void set(const char *str,size_t arg_length, CHARSET_INFO *cs)
+ {
+ Binary_string::set(str, arg_length);
+ set_charset(cs);
+ }
+ bool set_ascii(const char *str, size_t arg_length);
+ inline void set_quick(char *str,size_t arg_length, CHARSET_INFO *cs)
+ {
+ Binary_string::set_quick(str, arg_length);
+ set_charset(cs);
+ }
+ bool set_int(longlong num, bool unsigned_flag, CHARSET_INFO *cs);
+ bool set(int num, CHARSET_INFO *cs) { return set_int(num, false, cs); }
+ bool set(uint num, CHARSET_INFO *cs) { return set_int(num, true, cs); }
+ bool set(long num, CHARSET_INFO *cs) { return set_int(num, false, cs); }
+ bool set(ulong num, CHARSET_INFO *cs) { return set_int(num, true, cs); }
+ bool set(longlong num, CHARSET_INFO *cs) { return set_int(num, false, cs); }
+ bool set(ulonglong num, CHARSET_INFO *cs) { return set_int((longlong)num, true, cs); }
+ bool set_real(double num,uint decimals, CHARSET_INFO *cs);
+ bool set_fcvt(double num, uint decimals)
+ {
+ set_charset(&my_charset_latin1);
+ return Binary_string::set_fcvt(num, decimals);
+ }
+
+ bool set_hex(ulonglong num)
+ {
+ set_charset(&my_charset_latin1);
+ return Binary_string::set_hex(num);
+ }
+ bool set_hex(const char *str, uint32 len)
+ {
+ set_charset(&my_charset_latin1);
+ return Binary_string::set_hex(str, len);
+ }
+
+ /* Take over handling of buffer from some other object */
+ void reset(char *ptr_arg, size_t length_arg, size_t alloced_length_arg,
+ CHARSET_INFO *cs)
+ {
+ Binary_string::reset(ptr_arg, length_arg, alloced_length_arg);
+ set_charset(cs);
+ }
+
inline String& operator = (const String &s)
{
if (&s != this)
{
- /*
- It is forbidden to do assignments like
- some_string = substring_of_that_string
- */
- DBUG_ASSERT(!s.uses_buffer_owned_by(this));
- free();
- Ptr=s.Ptr ; str_length=s.str_length ; Alloced_length=s.Alloced_length;
- str_charset=s.str_charset;
+ set_charset(s);
+ Binary_string::operator=(s);
}
return *this;
}
- bool copy(); // Alloc string if not alloced
- bool copy(const String &s); // Allocate new string
- bool copy(const char *s,size_t arg_length, CHARSET_INFO *cs); // Allocate new string
- bool copy_or_move(const char *s,size_t arg_length, CHARSET_INFO *cs);
+ bool copy()
+ {
+ return Binary_string::copy();
+ }
+ bool copy(const String &s)
+ {
+ set_charset(s);
+ return Binary_string::copy(s);
+ }
+ bool copy(const char *s, size_t arg_length, CHARSET_INFO *cs)
+ {
+ set_charset(cs);
+ return Binary_string::copy(s, arg_length);
+ }
+ bool copy_or_move(const char *s, size_t arg_length, CHARSET_INFO *cs)
+ {
+ set_charset(cs);
+ return Binary_string::copy_or_move(s, arg_length);
+ }
static bool needs_conversion(size_t arg_length,
CHARSET_INFO *cs_from, CHARSET_INFO *cs_to,
uint32 *offset);
@@ -470,211 +858,92 @@ public:
{
if (unlikely(alloc(tocs->mbmaxlen * src_length)))
return true;
- str_length= copier->well_formed_copy(tocs, Ptr, Alloced_length,
+ str_length= copier->well_formed_copy(tocs, Ptr, alloced_length(),
fromcs, src, (uint)src_length, (uint)nchars);
- str_charset= tocs;
+ set_charset(tocs);
return false;
}
- void move(String &s)
+ // Append without character set conversion
+ bool append(const String &s)
{
- free();
- Ptr=s.Ptr ; str_length=s.str_length ; Alloced_length=s.Alloced_length;
- extra_alloc= s.extra_alloc;
- alloced= s.alloced;
- thread_specific= s.thread_specific;
- s.alloced= 0;
+ return Binary_string::append(s);
}
- bool append(const String &s);
- bool append(const char *s);
- bool append(const LEX_STRING *ls)
- {
- DBUG_ASSERT(ls->length < UINT_MAX32 &&
- ((ls->length == 0 && !ls->str) ||
- ls->length == strlen(ls->str)));
- return append(ls->str, (uint32) ls->length);
- }
- bool append(const LEX_CSTRING *ls)
- {
- DBUG_ASSERT(ls->length < UINT_MAX32 &&
- ((ls->length == 0 && !ls->str) ||
- ls->length == strlen(ls->str)));
- return append(ls->str, (uint32) ls->length);
- }
- bool append(const LEX_CSTRING &ls)
- {
- return append(&ls);
- }
- bool append(const char *s, size_t size);
- bool append(const char *s, size_t arg_length, CHARSET_INFO *cs);
- bool append(const LEX_CSTRING &s, CHARSET_INFO *cs)
- {
- return append(s.str, s.length, cs);
- }
- bool append_ulonglong(ulonglong val);
- bool append_longlong(longlong val);
- bool append(IO_CACHE* file, uint32 arg_length);
- bool append_with_prefill(const char *s, uint32 arg_length,
- uint32 full_length, char fill_char);
- bool append_parenthesized(long nr, int radix= 10);
- int strstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
- int strrstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
- bool replace(uint32 offset,uint32 arg_length,const char *to,uint32 length);
- bool replace(uint32 offset,uint32 arg_length,const String &to);
inline bool append(char chr)
{
- if (str_length < Alloced_length)
- {
- Ptr[str_length++]=chr;
- }
- else
- {
- if (unlikely(realloc_with_extra(str_length + 1)))
- return 1;
- Ptr[str_length++]=chr;
- }
- return 0;
+ return Binary_string::append_char(chr);
}
bool append_hex(const char *src, uint32 srclen)
{
- for (const char *src_end= src + srclen ; src != src_end ; src++)
- {
- if (unlikely(append(_dig_vec_lower[((uchar) *src) >> 4])) ||
- unlikely(append(_dig_vec_lower[((uchar) *src) & 0x0F])))
- return true;
- }
- return false;
+ return Binary_string::append_hex(src, srclen);
}
bool append_hex(const uchar *src, uint32 srclen)
{
- return append_hex((const char*)src, srclen);
- }
- bool fill(uint32 max_length,char fill);
- void strip_sp();
- friend int sortcmp(const String *a,const String *b, CHARSET_INFO *cs);
- friend int stringcmp(const String *a,const String *b);
- friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
- friend class Field;
- uint32 numchars() const;
- int charpos(longlong i,uint32 offset=0);
-
- int reserve(size_t space_needed)
- {
- return realloc(str_length + space_needed);
+ return Binary_string::append_hex((const char*)src, srclen);
}
- int reserve(size_t space_needed, size_t grow_by);
-
- /*
- The following append operations do NOT check alloced memory
- q_*** methods writes values of parameters itself
- qs_*** methods writes string representation of value
- */
- void q_append(const char c)
- {
- Ptr[str_length++] = c;
- }
- void q_append2b(const uint32 n)
+ bool append(IO_CACHE* file, uint32 arg_length)
{
- int2store(Ptr + str_length, n);
- str_length += 2;
+ return Binary_string::append(file, arg_length);
}
- void q_append(const uint32 n)
+ inline bool append(const char *s, uint32 arg_length, uint32 step_alloc)
{
- int4store(Ptr + str_length, n);
- str_length += 4;
+ return append_with_step(s, arg_length, step_alloc);
}
- void q_append(double d)
- {
- float8store(Ptr + str_length, d);
- str_length += 8;
- }
- void q_append(double *d)
- {
- float8store(Ptr + str_length, *d);
- str_length += 8;
- }
- void q_append(const char *data, size_t data_len)
+
+ // Append with optional character set conversion from ASCII (e.g. to UCS2)
+ bool append(const char *s)
{
- if (data_len)
- memcpy(Ptr + str_length, data, data_len);
- DBUG_ASSERT(str_length <= UINT_MAX32 - data_len);
- str_length += (uint)data_len;
+ return append(s, strlen(s));
}
- void q_append(const LEX_CSTRING *ls)
+ bool append(const LEX_STRING *ls)
{
DBUG_ASSERT(ls->length < UINT_MAX32 &&
((ls->length == 0 && !ls->str) ||
ls->length == strlen(ls->str)));
- q_append(ls->str, (uint32) ls->length);
- }
-
- void write_at_position(int position, uint32 value)
- {
- int4store(Ptr + position,value);
- }
-
- void qs_append(const char *str)
- {
- qs_append(str, (uint32)strlen(str));
+ return append(ls->str, (uint32) ls->length);
}
- void qs_append(const LEX_CSTRING *ls)
+ bool append(const LEX_CSTRING *ls)
{
DBUG_ASSERT(ls->length < UINT_MAX32 &&
((ls->length == 0 && !ls->str) ||
ls->length == strlen(ls->str)));
- qs_append(ls->str, (uint32)ls->length);
+ return append(ls->str, (uint32) ls->length);
}
- void qs_append(const char *str, size_t len);
- void qs_append_hex(const char *str, uint32 len);
- void qs_append(double d);
- void qs_append(double *d);
- inline void qs_append(const char c)
+ bool append(const LEX_CSTRING &ls)
{
- Ptr[str_length]= c;
- str_length++;
+ return append(&ls);
}
- void qs_append(int i);
- void qs_append(uint i)
+ bool append(const char *s, size_t size);
+ bool append_with_prefill(const char *s, uint32 arg_length,
+ uint32 full_length, char fill_char);
+ bool append_parenthesized(long nr, int radix= 10);
+
+ // Append with optional character set conversion from cs to charset()
+ bool append(const char *s, size_t arg_length, CHARSET_INFO *cs);
+ bool append(const LEX_CSTRING &s, CHARSET_INFO *cs)
{
- qs_append((ulonglong)i);
+ return append(s.str, s.length, cs);
}
- void qs_append(ulong i)
+
+ void strip_sp();
+ friend int sortcmp(const String *a,const String *b, CHARSET_INFO *cs);
+ friend int stringcmp(const String *a,const String *b);
+ friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
+ friend class Field;
+ uint32 numchars() const
{
- qs_append((ulonglong)i);
+ return (uint32) Charset::numchars(ptr(), end());
}
- void qs_append(ulonglong i);
- void qs_append(longlong i, int radix)
+ int charpos(longlong i, uint32 offset=0)
{
- char *buff= Ptr + str_length;
- char *end= ll2str(i, buff, radix, 0);
- str_length+= uint32(end-buff);
+ if (i <= 0)
+ return (int) i;
+ return (int) Charset::charpos(ptr() + offset, end(), (size_t) i);
}
-
- /* Inline (general) functions used by the protocol functions */
-
- inline char *prep_append(uint32 arg_length, uint32 step_alloc)
+ size_t lengthsp() const
{
- uint32 new_length= arg_length + str_length;
- if (new_length > Alloced_length)
- {
- if (unlikely(realloc(new_length + step_alloc)))
- return 0;
- }
- uint32 old_length= str_length;
- str_length+= arg_length;
- return Ptr+ old_length; /* Area to use */
+ return Charset::lengthsp(Ptr, str_length);
}
-
- inline bool append(const char *s, uint32 arg_length, uint32 step_alloc)
- {
- uint32 new_length= arg_length + str_length;
- if (new_length > Alloced_length &&
- unlikely(realloc(new_length + step_alloc)))
- return TRUE;
- memcpy(Ptr+str_length, s, arg_length);
- str_length+= arg_length;
- return FALSE;
- }
void print(String *to) const;
void print_with_conversion(String *to, CHARSET_INFO *cs) const;
void print(String *to, CHARSET_INFO *cs) const
@@ -697,13 +966,12 @@ public:
return append_for_single_quote(st, (uint32) len);
}
- /* Swap two string objects. Efficient way to exchange data without memcpy. */
- void swap(String &s);
-
- inline bool uses_buffer_owned_by(const String *s) const
+ void swap(String &s)
{
- return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length);
+ Charset::swap(s);
+ Binary_string::swap(s);
}
+
uint well_formed_length() const
{
return (uint) Well_formed_prefix(charset(), ptr(), length()).length();
@@ -714,36 +982,14 @@ public:
return TRUE;
if (charset()->mbminlen > 1)
return FALSE;
- for (const char *c= ptr(), *c_end= c + length(); c < c_end; c++)
- {
- if (!my_isascii(*c))
- return FALSE;
- }
- return TRUE;
- }
- bool bin_eq(const String *other) const
- {
- return length() == other->length() &&
- !memcmp(ptr(), other->ptr(), length());
+ return !has_8bit_bytes();
}
bool eq(const String *other, CHARSET_INFO *cs) const
{
return !sortcmp(this, other, cs);
}
- void q_net_store_length(ulonglong length)
- {
- DBUG_ASSERT(Alloced_length >= (str_length + net_length_size(length)));
- char *pos= (char *) net_store_length((uchar *)(Ptr + str_length), length);
- str_length= uint32(pos - Ptr);
- }
- void q_net_store_data(const uchar *from, size_t length)
- {
- DBUG_ASSERT(length < UINT_MAX32);
- DBUG_ASSERT(Alloced_length >= (str_length + length +
- net_length_size(length)));
- q_net_store_length(length);
- q_append((const char *)from, (uint32) length);
- }
+private:
+ bool append_semi_hex(const char *s, uint len, CHARSET_INFO *cs);
};
@@ -773,8 +1019,19 @@ public:
};
+class String_space: public String
+{
+public:
+ String_space(uint n)
+ {
+ if (fill(n, ' '))
+ set("", 0, &my_charset_bin);
+ }
+};
+
+
static inline bool check_if_only_end_space(CHARSET_INFO *cs,
- const char *str,
+ const char *str,
const char *end)
{
return str+ cs->cset->scan(cs, str, end, MY_SEQ_SPACES) == end;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index cc9cb37ca15..a5fa36ffde6 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -33,7 +33,6 @@
// partition_info
// NOT_A_PARTITION_ID
#include "sql_db.h" // load_db_opt_by_name
-#include "sql_time.h" // make_truncated_value_warning
#include "records.h" // init_read_record, end_read_record
#include "filesort.h" // filesort_free_buffers
#include "sql_select.h" // setup_order
@@ -55,7 +54,10 @@
#include "sql_audit.h"
#include "sql_sequence.h"
#include "tztime.h"
-
+#include <algorithm>
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif
#ifdef __WIN__
#include <io.h>
@@ -64,29 +66,23 @@
const char *primary_key_name="PRIMARY";
static int check_if_keyname_exists(const char *name,KEY *start, KEY *end);
-static char *make_unique_key_name(THD *thd, const char *field_name, KEY *start,
- KEY *end);
-static bool make_unique_constraint_name(THD *thd, LEX_CSTRING *name,
- List<Virtual_column_info> *vcol,
- uint *nr);
-static const
-char * make_unique_invisible_field_name(THD *thd, const char *field_name,
- List<Create_field> *fields);
-
-static int copy_data_between_tables(THD *thd, TABLE *from,TABLE *to,
- List<Create_field> &create, bool ignore,
- uint order_num, ORDER *order,
- ha_rows *copied,ha_rows *deleted,
- Alter_info::enum_enable_or_disable keys_onoff,
- Alter_table_ctx *alter_ctx);
-
+static char *make_unique_key_name(THD *, const char *, KEY *, KEY *);
+static bool make_unique_constraint_name(THD *, LEX_CSTRING *, const char *,
+ List<Virtual_column_info> *, uint *);
+static const char *make_unique_invisible_field_name(THD *, const char *,
+ List<Create_field> *);
+static int copy_data_between_tables(THD *, TABLE *,TABLE *,
+ List<Create_field> &, bool, uint, ORDER *,
+ ha_rows *, ha_rows *,
+ Alter_info::enum_enable_or_disable,
+ Alter_table_ctx *);
static int mysql_prepare_create_table(THD *, HA_CREATE_INFO *, Alter_info *,
uint *, handler *, KEY **, uint *, int,
const LEX_CSTRING db,
const LEX_CSTRING table_name);
static uint blob_length_by_type(enum_field_types type);
-static bool fix_constraints_names(THD *thd, List<Virtual_column_info>
- *check_constraint_list);
+static bool fix_constraints_names(THD *, List<Virtual_column_info> *,
+ const HA_CREATE_INFO *);
/**
@brief Helper function for explain_filename
@@ -1853,7 +1849,7 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
#endif
/* Write shadow frm file */
lpt->create_info->table_options= lpt->db_options;
- LEX_CUSTRING frm= build_frm_image(lpt->thd, &lpt->table_name,
+ LEX_CUSTRING frm= build_frm_image(lpt->thd, lpt->table_name,
lpt->create_info,
lpt->alter_info->create_list,
lpt->key_count, lpt->key_info_buffer,
@@ -2045,18 +2041,6 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, bool if_exists,
if (!drop_temporary)
{
- if (!in_bootstrap)
- {
- for (table= tables; table; table= table->next_local)
- {
- LEX_CSTRING db_name= table->db;
- LEX_CSTRING table_name= table->table_name;
- if (table->open_type == OT_BASE_ONLY ||
- !thd->find_temporary_table(table))
- (void) delete_statistics_for_table(thd, &db_name, &table_name);
- }
- }
-
if (!thd->locked_tables_mode)
{
if (drop_sequence)
@@ -2120,6 +2104,15 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, bool if_exists,
}
}
}
+ /* We remove statistics for table last, after we have the DDL lock */
+ for (table= tables; table; table= table->next_local)
+ {
+ LEX_CSTRING db_name= table->db;
+ LEX_CSTRING table_name= table->table_name;
+ if (table->open_type == OT_BASE_ONLY ||
+ !thd->find_temporary_table(table))
+ (void) delete_statistics_for_table(thd, &db_name, &table_name);
+ }
}
DBUG_EXECUTE_IF("ib_purge_virtual_mdev_16222_1",
@@ -2137,7 +2130,6 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, bool if_exists,
DBUG_RETURN(TRUE);
my_ok(thd);
DBUG_RETURN(FALSE);
-
}
@@ -2655,9 +2647,6 @@ err:
/* Chop of the last comma */
built_non_trans_tmp_query.chop();
built_non_trans_tmp_query.append(" /* generated by server */");
-#ifdef WITH_WSREP
- thd->wsrep_skip_wsrep_GTID = true;
-#endif /* WITH_WSREP */
error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
built_non_trans_tmp_query.ptr(),
built_non_trans_tmp_query.length(),
@@ -2670,9 +2659,6 @@ err:
/* Chop of the last comma */
built_trans_tmp_query.chop();
built_trans_tmp_query.append(" /* generated by server */");
-#ifdef WITH_WSREP
- thd->wsrep_skip_wsrep_GTID = true;
-#endif /* WITH_WSREP */
error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
built_trans_tmp_query.ptr(),
built_trans_tmp_query.length(),
@@ -2687,9 +2673,6 @@ err:
built_query.append(" /* generated by server */");
int error_code = non_tmp_error ? thd->get_stmt_da()->sql_errno()
: 0;
-#ifdef WITH_WSREP
- thd->wsrep_skip_wsrep_GTID = false;
-#endif /* WITH_WSREP */
error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
built_query.ptr(),
built_query.length(),
@@ -2738,9 +2721,6 @@ err:
}
end:
-#ifdef WITH_WSREP
- thd->wsrep_skip_wsrep_GTID = false;
-#endif /* WITH_WSREP */
DBUG_RETURN(error);
}
@@ -2840,6 +2820,7 @@ bool quick_rm_table(THD *thd, handlerton *base, const LEX_CSTRING *db,
- UNIQUE keys where all column are NOT NULL
- UNIQUE keys that don't contain partial segments
- Other UNIQUE keys
+ - LONG UNIQUE keys
- Normal keys
- Fulltext keys
@@ -2851,10 +2832,26 @@ static int sort_keys(KEY *a, KEY *b)
{
ulong a_flags= a->flags, b_flags= b->flags;
+ /*
+ Do not reorder LONG_HASH indexes, because they must match the order
+ of their LONG_UNIQUE_HASH_FIELD's.
+ */
+ if (a->algorithm == HA_KEY_ALG_LONG_HASH &&
+ b->algorithm == HA_KEY_ALG_LONG_HASH)
+ return a->usable_key_parts - b->usable_key_parts;
+
if (a_flags & HA_NOSAME)
{
if (!(b_flags & HA_NOSAME))
return -1;
+ /*
+ Long Unique keys should always be last unique key.
+ Before this patch they used to change order wrt to partial keys (MDEV-19049)
+ */
+ if (a->algorithm == HA_KEY_ALG_LONG_HASH)
+ return 1;
+ if (b->algorithm == HA_KEY_ALG_LONG_HASH)
+ return -1;
if ((a_flags ^ b_flags) & HA_NULL_PART_KEY)
{
/* Sort NOT NULL keys before other keys */
@@ -2879,9 +2876,7 @@ static int sort_keys(KEY *a, KEY *b)
Prefer original key order. usable_key_parts contains here
the original key position.
*/
- return ((a->usable_key_parts < b->usable_key_parts) ? -1 :
- (a->usable_key_parts > b->usable_key_parts) ? 1 :
- 0);
+ return a->usable_key_parts - b->usable_key_parts;
}
/*
@@ -2938,6 +2933,15 @@ bool check_duplicates_in_interval(const char *set_or_name,
}
+bool Column_definition::
+ prepare_charset_for_string(const Column_derived_attributes *dattr)
+{
+ if (!charset)
+ charset= dattr->charset();
+ return (flags & BINCMP_FLAG) && !(charset= find_bin_collation(charset));
+}
+
+
bool Column_definition::prepare_stage2_blob(handler *file,
ulonglong table_flags,
uint field_flags)
@@ -3019,44 +3023,13 @@ bool Column_definition::prepare_stage2(handler *file,
}
-/*
- Get character set from field object generated by parser using
- default values when not set.
-
- SYNOPSIS
- get_sql_field_charset()
- sql_field The sql_field object
- create_info Info generated by parser
-
- RETURN VALUES
- cs Character set
-*/
-
-CHARSET_INFO* get_sql_field_charset(Column_definition *sql_field,
- HA_CREATE_INFO *create_info)
-{
- CHARSET_INFO *cs= sql_field->charset;
-
- if (!cs)
- cs= create_info->default_table_charset;
- /*
- table_charset is set only in ALTER TABLE t1 CONVERT TO CHARACTER SET csname
- if we want change character set for all varchar/char columns.
- But the table charset must not affect the BLOB fields, so don't
- allow to change my_charset_bin to somethig else.
- */
- if (create_info->table_charset && cs != &my_charset_bin)
- cs= create_info->table_charset;
- return cs;
-}
-
-
/**
Modifies the first column definition whose SQL type is TIMESTAMP
by adding the features DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP.
If the first TIMESTAMP column appears to be nullable, or to have an
- explicit default, or to be a virtual column, then no promition is done.
+ explicit default, or to be a virtual column, or to be part of table period,
+ then no promotion is done.
@param column_definitions The list of column definitions, in the physical
order in which they appear in the table.
@@ -3064,33 +3037,36 @@ CHARSET_INFO* get_sql_field_charset(Column_definition *sql_field,
void promote_first_timestamp_column(List<Create_field> *column_definitions)
{
- List_iterator_fast<Create_field> it(*column_definitions);
- Create_field *column_definition;
-
- while ((column_definition= it++) != NULL)
+ for (Create_field &column_definition : *column_definitions)
{
- if (column_definition->is_timestamp_type() || // TIMESTAMP
- column_definition->unireg_check == Field::TIMESTAMP_OLD_FIELD) // Legacy
+ if (column_definition.is_timestamp_type() || // TIMESTAMP
+ column_definition.unireg_check == Field::TIMESTAMP_OLD_FIELD) // Legacy
{
- DBUG_PRINT("info", ("field-ptr:%p", column_definition->field));
- if ((column_definition->flags & NOT_NULL_FLAG) != 0 && // NOT NULL,
- column_definition->default_value == NULL && // no constant default,
- column_definition->unireg_check == Field::NONE && // no function default
- column_definition->vcol_info == NULL &&
- !(column_definition->flags & VERS_SYSTEM_FIELD)) // column isn't generated
+ DBUG_PRINT("info", ("field-ptr:%p", column_definition.field));
+ if ((column_definition.flags & NOT_NULL_FLAG) != 0 && // NOT NULL,
+ column_definition.default_value == NULL && // no constant default,
+ column_definition.unireg_check == Field::NONE && // no function default
+ column_definition.vcol_info == NULL &&
+ column_definition.period == NULL &&
+ !(column_definition.flags & VERS_SYSTEM_FIELD)) // column isn't generated
{
DBUG_PRINT("info", ("First TIMESTAMP column '%s' was promoted to "
"DEFAULT CURRENT_TIMESTAMP ON UPDATE "
"CURRENT_TIMESTAMP",
- column_definition->field_name.str
+ column_definition.field_name.str
));
- column_definition->unireg_check= Field::TIMESTAMP_DNUN_FIELD;
+ column_definition.unireg_check= Field::TIMESTAMP_DNUN_FIELD;
}
return;
}
}
}
+static bool key_cmp(const Key_part_spec &a, const Key_part_spec &b)
+{
+ return a.length == b.length &&
+ !lex_string_cmp(system_charset_info, &a.field_name, &b.field_name);
+}
/**
Check if there is a duplicate key. Report a warning for every duplicate key.
@@ -3100,8 +3076,8 @@ void promote_first_timestamp_column(List<Create_field> *column_definitions)
@param key_info Key meta-data info.
@param key_list List of existing keys.
*/
-static void check_duplicate_key(THD *thd, Key *key, KEY *key_info,
- List<Key> *key_list)
+static void check_duplicate_key(THD *thd, const Key *key, const KEY *key_info,
+ const List<Key> *key_list)
{
/*
We only check for duplicate indexes if it is requested and the
@@ -3113,56 +3089,28 @@ static void check_duplicate_key(THD *thd, Key *key, KEY *key_info,
if (!key->key_create_info.check_for_duplicate_indexes || key->generated)
return;
- List_iterator_fast<Key> key_list_iterator(*key_list);
- List_iterator_fast<Key_part_spec> key_column_iterator(key->columns);
- Key *k;
-
- while ((k= key_list_iterator++))
+ for (const Key &k : *key_list)
{
// Looking for a similar key...
- if (k == key)
+ if (&k == key)
break;
- if (k->generated ||
- (key->type != k->type) ||
- (key->key_create_info.algorithm != k->key_create_info.algorithm) ||
- (key->columns.elements != k->columns.elements))
+ if (k.generated ||
+ (key->type != k.type) ||
+ (key->key_create_info.algorithm != k.key_create_info.algorithm) ||
+ (key->columns.elements != k.columns.elements))
{
// Keys are different.
continue;
}
- /*
- Keys 'key' and 'k' might be identical.
- Check that the keys have identical columns in the same order.
- */
-
- List_iterator_fast<Key_part_spec> k_column_iterator(k->columns);
- uint i;
- key_column_iterator.rewind();
-
- for (i= 0; i < key->columns.elements; ++i)
- {
- Key_part_spec *c1= key_column_iterator++;
- Key_part_spec *c2= k_column_iterator++;
-
- DBUG_ASSERT(c1 && c2);
-
- if (lex_string_cmp(system_charset_info,
- &c1->field_name, &c2->field_name) ||
- (c1->length != c2->length))
- break;
- }
-
- // Report a warning if we have two identical keys.
-
- if (i == key->columns.elements)
+ if (std::equal(key->columns.begin(), key->columns.end(), k.columns.begin(),
+ key_cmp))
{
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
- ER_DUP_INDEX, ER_THD(thd, ER_DUP_INDEX),
- key_info->name.str);
- break;
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, ER_DUP_INDEX,
+ ER_THD(thd, ER_DUP_INDEX), key_info->name.str);
+ return;
}
}
}
@@ -3247,11 +3195,14 @@ bool Column_definition::prepare_stage1_bit(THD *thd,
bool Column_definition::prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
handler *file,
- ulonglong table_flags)
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
{
return type_handler()->Column_definition_prepare_stage1(thd, mem_root,
this, file,
- table_flags);
+ table_flags,
+ derived_attr);
}
@@ -3357,6 +3308,55 @@ int mysql_add_invisible_field(THD *thd, List<Create_field> * field_list,
return 0;
}
+#define LONG_HASH_FIELD_NAME_LENGTH 30
+static inline void make_long_hash_field_name(LEX_CSTRING *buf, uint num)
+{
+ buf->length= my_snprintf((char *)buf->str,
+ LONG_HASH_FIELD_NAME_LENGTH, "DB_ROW_HASH_%u", num);
+}
+
+/**
+ Add fully invisible hash field to table in case of long
+ unique column
+ @param thd Thread Context.
+ @param create_list List of table fields.
+ @param key_info current long unique key info
+*/
+static Create_field * add_hash_field(THD * thd, List<Create_field> *create_list,
+ KEY *key_info)
+{
+ List_iterator<Create_field> it(*create_list);
+ Create_field *dup_field, *cf= new (thd->mem_root) Create_field();
+ cf->flags|= UNSIGNED_FLAG | LONG_UNIQUE_HASH_FIELD;
+ cf->decimals= 0;
+ cf->length= cf->char_length= cf->pack_length= HA_HASH_FIELD_LENGTH;
+ cf->invisible= INVISIBLE_FULL;
+ cf->pack_flag|= FIELDFLAG_MAYBE_NULL;
+ cf->vcol_info= new (thd->mem_root) Virtual_column_info();
+ cf->vcol_info->stored_in_db= false;
+ uint num= 1;
+ LEX_CSTRING field_name;
+ field_name.str= (char *)thd->alloc(LONG_HASH_FIELD_NAME_LENGTH);
+ make_long_hash_field_name(&field_name, num);
+ /*
+ Check for collisions
+ */
+ while ((dup_field= it++))
+ {
+ if (!my_strcasecmp(system_charset_info, field_name.str, dup_field->field_name.str))
+ {
+ num++;
+ make_long_hash_field_name(&field_name, num);
+ it.rewind();
+ }
+ }
+ cf->field_name= field_name;
+ cf->set_handler(&type_handler_longlong);
+ key_info->algorithm= HA_KEY_ALG_LONG_HASH;
+ create_list->push_back(cf,thd->mem_root);
+ return cf;
+}
+
Key *
mysql_add_invisible_index(THD *thd, List<Key> *key_list,
LEX_CSTRING* field_name, enum Key::Keytype type)
@@ -3416,6 +3416,10 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
int select_field_count= C_CREATE_SELECT(create_table_mode);
bool tmp_table= create_table_mode == C_ALTER_TABLE;
const bool create_simple= thd->lex->create_simple();
+ bool is_hash_field_needed= false;
+ const Column_derived_attributes dattr(create_info->default_table_charset);
+ const Column_bulk_alter_attributes
+ battr(create_info->alter_table_convert_to_charset);
DBUG_ENTER("mysql_prepare_create_table");
DBUG_EXECUTE_IF("test_pseudo_invisible",{
@@ -3472,26 +3476,27 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
for (field_no=0; (sql_field=it++) ; field_no++)
{
+ /* Virtual fields are always NULL */
+ if (sql_field->vcol_info)
+ sql_field->flags&= ~NOT_NULL_FLAG;
+
/*
Initialize length from its original value (number of characters),
which was set in the parser. This is necessary if we're
executing a prepared statement for the second time.
*/
sql_field->length= sql_field->char_length;
- /* Set field charset. */
- sql_field->charset= get_sql_field_charset(sql_field, create_info);
- if ((sql_field->flags & BINCMP_FLAG) &&
- !(sql_field->charset= find_bin_collation(sql_field->charset)))
- DBUG_RETURN(true);
- /* Virtual fields are always NULL */
- if (sql_field->vcol_info)
- sql_field->flags&= ~NOT_NULL_FLAG;
+ if (sql_field->bulk_alter(&dattr, &battr))
+ DBUG_RETURN(true);
if (sql_field->prepare_stage1(thd, thd->mem_root,
- file, file->ha_table_flags()))
+ file, file->ha_table_flags(),
+ &dattr))
DBUG_RETURN(true);
+ DBUG_ASSERT(sql_field->charset);
+
if (sql_field->real_field_type() == MYSQL_TYPE_BIT &&
file->ha_table_flags() & HA_CAN_BIT_FIELD)
total_uneven_bit_length+= sql_field->length & 7;
@@ -3542,7 +3547,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (!(sql_field->flags & NOT_NULL_FLAG))
null_fields--;
- if (sql_field->redefine_stage1(dup_field, file, create_info))
+ if (sql_field->redefine_stage1(dup_field, file))
DBUG_RETURN(true);
it2.remove(); // Remove first (create) definition
@@ -3743,6 +3748,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
uint key_length=0;
Key_part_spec *column;
+ is_hash_field_needed= false;
if (key->name.str == ignore_key)
{
/* ignore redundant keys */
@@ -3953,22 +3959,29 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (f_is_blob(sql_field->pack_flag) ||
(f_is_geom(sql_field->pack_flag) && key->type != Key::SPATIAL))
- {
- if (!(file->ha_table_flags() & HA_CAN_INDEX_BLOBS))
- {
- my_error(ER_BLOB_USED_AS_KEY, MYF(0), column->field_name.str,
+ {
+ if (!(file->ha_table_flags() & HA_CAN_INDEX_BLOBS))
+ {
+ my_error(ER_BLOB_USED_AS_KEY, MYF(0), column->field_name.str,
file->table_type());
- DBUG_RETURN(TRUE);
- }
+ DBUG_RETURN(TRUE);
+ }
if (f_is_geom(sql_field->pack_flag) && sql_field->geom_type ==
Field::GEOM_POINT)
column->length= MAX_LEN_GEOM_POINT_FIELD;
- if (!column->length)
- {
- my_error(ER_BLOB_KEY_WITHOUT_LENGTH, MYF(0), column->field_name.str);
- DBUG_RETURN(TRUE);
- }
- }
+ if (!column->length)
+ {
+ if (key->type == Key::UNIQUE)
+ is_hash_field_needed= true; // for case "a BLOB UNIQUE"
+ else if (key->type == Key::MULTIPLE)
+ column->length= file->max_key_length() + 1;
+ else
+ {
+ my_error(ER_BLOB_KEY_WITHOUT_LENGTH, MYF(0), column->field_name.str);
+ DBUG_RETURN(TRUE);
+ }
+ }
+ }
#ifdef HAVE_SPATIAL
if (key->type == Key::SPATIAL)
{
@@ -4037,33 +4050,28 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (column->length)
{
- if (f_is_blob(sql_field->pack_flag))
- {
- key_part_length= MY_MIN(column->length,
- blob_length_by_type(sql_field->real_field_type())
- * sql_field->charset->mbmaxlen);
- if (key_part_length > max_key_length ||
- key_part_length > file->max_key_part_length())
- {
- key_part_length= MY_MIN(max_key_length, file->max_key_part_length());
- if (key->type == Key::MULTIPLE)
- {
- /* not a critical problem */
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ if (f_is_blob(sql_field->pack_flag))
+ {
+ key_part_length= MY_MIN(column->length,
+ blob_length_by_type(sql_field->real_field_type())
+ * sql_field->charset->mbmaxlen);
+ if (key_part_length > max_key_length ||
+ key_part_length > file->max_key_part_length())
+ {
+ if (key->type == Key::MULTIPLE)
+ {
+ key_part_length= MY_MIN(max_key_length, file->max_key_part_length());
+ /* not a critical problem */
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_TOO_LONG_KEY, ER_THD(thd, ER_TOO_LONG_KEY),
key_part_length);
/* Align key length to multibyte char boundary */
key_part_length-= key_part_length % sql_field->charset->mbmaxlen;
- }
- else
- {
- my_error(ER_TOO_LONG_KEY, MYF(0), key_part_length);
- DBUG_RETURN(TRUE);
- }
- }
- }
+ }
+ }
+ }
// Catch invalid use of partial keys
- else if (!f_is_geom(sql_field->pack_flag) &&
+ else if (!f_is_geom(sql_field->pack_flag) &&
// is the key partial?
column->length != key_part_length &&
// is prefix length bigger than field length?
@@ -4077,13 +4085,14 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
// and is this a 'unique' key?
(key_info->flags & HA_NOSAME))))
{
- my_message(ER_WRONG_SUB_KEY, ER_THD(thd, ER_WRONG_SUB_KEY), MYF(0));
- DBUG_RETURN(TRUE);
- }
- else if (!(file->ha_table_flags() & HA_NO_PREFIX_CHAR_KEYS))
- key_part_length= column->length;
+ my_message(ER_WRONG_SUB_KEY, ER_THD(thd, ER_WRONG_SUB_KEY), MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+ else if (!(file->ha_table_flags() & HA_NO_PREFIX_CHAR_KEYS))
+ key_part_length= column->length;
}
- else if (key_part_length == 0 && (sql_field->flags & NOT_NULL_FLAG))
+ else if (key_part_length == 0 && (sql_field->flags & NOT_NULL_FLAG) &&
+ !is_hash_field_needed)
{
my_error(ER_WRONG_KEY_COLUMN, MYF(0), file->table_type(),
column->field_name.str);
@@ -4092,30 +4101,49 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (key_part_length > file->max_key_part_length() &&
key->type != Key::FULLTEXT)
{
- key_part_length= file->max_key_part_length();
- if (key->type == Key::MULTIPLE)
- {
- /* not a critical problem */
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ if (key->type == Key::MULTIPLE)
+ {
+ key_part_length= file->max_key_part_length();
+ /* not a critical problem */
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_TOO_LONG_KEY, ER_THD(thd, ER_TOO_LONG_KEY),
key_part_length);
/* Align key length to multibyte char boundary */
key_part_length-= key_part_length % sql_field->charset->mbmaxlen;
- }
- else
- {
- my_error(ER_TOO_LONG_KEY, MYF(0), key_part_length);
- DBUG_RETURN(TRUE);
- }
+ }
+ else
+ {
+ if (key->type != Key::UNIQUE)
+ {
+ key_part_length= MY_MIN(max_key_length, file->max_key_part_length());
+ my_error(ER_TOO_LONG_KEY, MYF(0), key_part_length);
+ DBUG_RETURN(TRUE);
+ }
+ }
}
- key_part_info->length= (uint16) key_part_length;
+
+ if (key->type == Key::UNIQUE
+ && key_part_length > MY_MIN(max_key_length,
+ file->max_key_part_length()))
+ {
+ is_hash_field_needed= true;
+ }
+
+ /* We can not store key_part_length more then 2^16 - 1 in frm */
+ if (is_hash_field_needed && column->length > UINT_MAX16)
+ {
+ my_error(ER_TOO_LONG_KEYPART, MYF(0), UINT_MAX16);
+ DBUG_RETURN(TRUE);
+ }
+ else
+ key_part_info->length= (uint16) key_part_length;
/* Use packed keys for long strings on the first column */
if (!((*db_options) & HA_OPTION_NO_PACK_KEYS) &&
!((create_info->table_options & HA_OPTION_NO_PACK_KEYS)) &&
(key_part_length >= KEY_DEFAULT_PACK_LENGTH &&
(sql_field->real_field_type() == MYSQL_TYPE_STRING ||
sql_field->real_field_type() == MYSQL_TYPE_VARCHAR ||
- f_is_blob(sql_field->pack_flag))))
+ f_is_blob(sql_field->pack_flag))) && !is_hash_field_needed)
{
if ((column_nr == 0 && f_is_blob(sql_field->pack_flag)) ||
sql_field->real_field_type() == MYSQL_TYPE_VARCHAR)
@@ -4124,7 +4152,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
key_info->flags|= HA_PACK_KEY;
}
/* Check if the key segment is partial, set the key flag accordingly */
- if (key_part_length != sql_field->key_length)
+ if (key_part_length != sql_field->key_length &&
+ key_part_length != sql_field->type_handler()->max_octet_length())
key_info->flags|= HA_KEY_HAS_PART_KEY_SEG;
key_length+= key_part_length;
@@ -4164,12 +4193,43 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (key->type == Key::UNIQUE && !(key_info->flags & HA_NULL_PART_KEY))
unique_key=1;
key_info->key_length=(uint16) key_length;
- if (key_length > max_key_length && key->type != Key::FULLTEXT)
+ if (key_info->key_length > max_key_length && key->type == Key::UNIQUE)
+ is_hash_field_needed= true;
+ if (key_length > max_key_length && key->type != Key::FULLTEXT &&
+ !is_hash_field_needed)
{
- my_error(ER_TOO_LONG_KEY,MYF(0),max_key_length);
+ my_error(ER_TOO_LONG_KEY, MYF(0), max_key_length);
DBUG_RETURN(TRUE);
}
+ if (is_hash_field_needed && key_info->algorithm != HA_KEY_ALG_UNDEF &&
+ key_info->algorithm != HA_KEY_ALG_HASH )
+ {
+ my_error(ER_TOO_LONG_KEY, MYF(0), max_key_length);
+ DBUG_RETURN(TRUE);
+ }
+ if (is_hash_field_needed ||
+ (key_info->algorithm == HA_KEY_ALG_HASH &&
+ key->type != Key::PRIMARY &&
+ key_info->flags & HA_NOSAME &&
+ !(file->ha_table_flags() & HA_CAN_HASH_KEYS ) &&
+ file->ha_table_flags() & HA_CAN_VIRTUAL_COLUMNS))
+ {
+ Create_field *hash_fld= add_hash_field(thd, &alter_info->create_list,
+ key_info);
+ if (!hash_fld)
+ DBUG_RETURN(TRUE);
+ hash_fld->offset= record_offset;
+ hash_fld->charset= create_info->default_table_charset;
+ record_offset+= hash_fld->pack_length;
+ if (key_info->flags & HA_NULL_PART_KEY)
+ null_fields++;
+ else
+ {
+ hash_fld->flags|= NOT_NULL_FLAG;
+ hash_fld->pack_flag&= ~FIELDFLAG_MAYBE_NULL;
+ }
+ }
if (validate_comment_length(thd, &key->key_create_info.comment,
INDEX_COMMENT_MAXLEN,
ER_TOO_LONG_INDEX_COMMENT,
@@ -4185,14 +4245,11 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
// Check if a duplicate index is defined.
check_duplicate_key(thd, key, key_info, &alter_info->key_list);
-
key_info++;
}
- if (!unique_key && !primary_key &&
- ((file->ha_table_flags() & HA_REQUIRE_PRIMARY_KEY) ||
- ((file->ha_table_flags() & HA_WANTS_PRIMARY_KEY) &&
- !create_info->sequence)))
+ if (!unique_key && !primary_key && !create_info->sequence &&
+ (file->ha_table_flags() & HA_REQUIRE_PRIMARY_KEY))
{
my_message(ER_REQUIRES_PRIMARY_KEY, ER_THD(thd, ER_REQUIRES_PRIMARY_KEY),
MYF(0));
@@ -4292,9 +4349,9 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
NOTE: we cannot do this in check_vcol_func_processor() as there is already
no table name qualifier in expression.
*/
- if (sql_field->vcol_info &&
+ if (sql_field->vcol_info && sql_field->vcol_info->expr &&
sql_field->vcol_info->expr->walk(&Item::check_table_name_processor,
- false, (void *) &walk_prm))
+ false, (void *) &walk_prm))
{
my_error(ER_BAD_FIELD_ERROR, MYF(0), walk_prm.field.c_ptr(), "GENERATED ALWAYS");
DBUG_RETURN(TRUE);
@@ -4383,11 +4440,9 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
}
/* Give warnings for not supported table options */
-#if defined(WITH_ARIA_STORAGE_ENGINE)
extern handlerton *maria_hton;
- if (file->partition_ht() != maria_hton)
-#endif
- if (create_info->transactional)
+ if (file->partition_ht() != maria_hton && create_info->transactional &&
+ !file->has_transaction_manager())
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
ER_THD(thd, ER_ILLEGAL_HA_CREATE_OPTION),
@@ -4478,9 +4533,8 @@ bool validate_comment_length(THD *thd, LEX_CSTRING *comment, size_t max_len,
apply it to the table.
*/
-static void set_table_default_charset(THD *thd,
- HA_CREATE_INFO *create_info,
- const LEX_CSTRING *db)
+static void set_table_default_charset(THD *thd, HA_CREATE_INFO *create_info,
+ const LEX_CSTRING &db)
{
/*
If the table character set was not given explicitly,
@@ -4491,7 +4545,7 @@ static void set_table_default_charset(THD *thd,
{
Schema_specification_st db_info;
- load_db_opt_by_name(thd, db->str, &db_info);
+ load_db_opt_by_name(thd, db.str, &db_info);
create_info->default_table_charset= db_info.default_table_charset;
}
@@ -4545,7 +4599,7 @@ bool Column_definition::prepare_blob_field(THD *thd)
set_handler(Type_handler::blob_type_handler((uint) length));
pack_length= type_handler()->calc_pack_length(0);
}
- length= 0;
+ length= key_length= 0;
}
DBUG_RETURN(0);
}
@@ -4568,7 +4622,9 @@ bool Column_definition::prepare_blob_field(THD *thd)
bool Column_definition::sp_prepare_create_field(THD *thd, MEM_ROOT *mem_root)
{
- return prepare_stage1(thd, mem_root, NULL, HA_CAN_GEOMETRY) ||
+ DBUG_ASSERT(charset);
+ const Column_derived_attributes dattr(&my_charset_bin);
+ return prepare_stage1(thd, mem_root, NULL, HA_CAN_GEOMETRY, &dattr) ||
prepare_stage2(NULL, HA_CAN_GEOMETRY);
}
@@ -4615,12 +4671,11 @@ static bool vers_prepare_keys(THD *thd, HA_CREATE_INFO *create_info,
return false;
}
-handler *mysql_create_frm_image(THD *thd,
- const LEX_CSTRING *db, const LEX_CSTRING *table_name,
+handler *mysql_create_frm_image(THD *thd, const LEX_CSTRING &db,
+ const LEX_CSTRING &table_name,
HA_CREATE_INFO *create_info,
Alter_info *alter_info, int create_table_mode,
- KEY **key_info,
- uint *key_count,
+ KEY **key_info, uint *key_count,
LEX_CUSTRING *frm)
{
uint db_options;
@@ -4754,7 +4809,7 @@ handler *mysql_create_frm_image(THD *thd,
if (part_info->vers_info && !create_info->versioned())
{
- my_error(ER_VERS_NOT_VERSIONED, MYF(0), table_name->str);
+ my_error(ER_VERS_NOT_VERSIONED, MYF(0), table_name.str);
goto err;
}
@@ -4859,7 +4914,7 @@ handler *mysql_create_frm_image(THD *thd,
if (mysql_prepare_create_table(thd, create_info, alter_info, &db_options,
file, key_info, key_count,
- create_table_mode, *db, *table_name))
+ create_table_mode, db, table_name))
goto err;
create_info->table_options=db_options;
@@ -4911,19 +4966,13 @@ err:
*/
static
-int create_table_impl(THD *thd,
- const LEX_CSTRING *orig_db,
- const LEX_CSTRING *orig_table_name,
- const LEX_CSTRING *db, const LEX_CSTRING *table_name,
- const char *path,
- const DDL_options_st options,
- HA_CREATE_INFO *create_info,
- Alter_info *alter_info,
- int create_table_mode,
- bool *is_trans,
- KEY **key_info,
- uint *key_count,
- LEX_CUSTRING *frm)
+int create_table_impl(THD *thd, const LEX_CSTRING &orig_db,
+ const LEX_CSTRING &orig_table_name,
+ const LEX_CSTRING &db, const LEX_CSTRING &table_name,
+ const char *path, const DDL_options_st options,
+ HA_CREATE_INFO *create_info, Alter_info *alter_info,
+ int create_table_mode, bool *is_trans, KEY **key_info,
+ uint *key_count, LEX_CUSTRING *frm)
{
LEX_CSTRING *alias;
handler *file= 0;
@@ -4932,9 +4981,10 @@ int create_table_impl(THD *thd,
bool internal_tmp_table= create_table_mode == C_ALTER_TABLE || frm_only;
DBUG_ENTER("mysql_create_table_no_lock");
DBUG_PRINT("enter", ("db: '%s' table: '%s' tmp: %d path: %s",
- db->str, table_name->str, internal_tmp_table, path));
+ db.str, table_name.str, internal_tmp_table, path));
- if (fix_constraints_names(thd, &alter_info->check_constraint_list))
+ if (fix_constraints_names(thd, &alter_info->check_constraint_list,
+ create_info))
DBUG_RETURN(1);
if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)
@@ -4961,7 +5011,7 @@ int create_table_impl(THD *thd,
goto err;
}
- alias= const_cast<LEX_CSTRING*>(table_case_name(create_info, table_name));
+ alias= const_cast<LEX_CSTRING*>(table_case_name(create_info, &table_name));
/* Check if table exists */
if (create_info->tmp_table())
@@ -4970,7 +5020,7 @@ int create_table_impl(THD *thd,
If a table exists, it must have been pre-opened. Try looking for one
in-use in THD::all_temp_tables list of TABLE_SHAREs.
*/
- TABLE *tmp_table= thd->find_temporary_table(db->str, table_name->str);
+ TABLE *tmp_table= thd->find_temporary_table(db.str, table_name.str);
if (tmp_table)
{
@@ -5005,14 +5055,14 @@ int create_table_impl(THD *thd,
}
else
{
- if (!internal_tmp_table && ha_table_exists(thd, db, table_name))
+ if (!internal_tmp_table && ha_table_exists(thd, &db, &table_name))
{
if (options.or_replace())
{
- (void) delete_statistics_for_table(thd, db, table_name);
+ (void) delete_statistics_for_table(thd, &db, &table_name);
TABLE_LIST table_list;
- table_list.init_one_table(db, table_name, 0, TL_WRITE_ALLOW_WRITE);
+ table_list.init_one_table(&db, &table_name, 0, TL_WRITE_ALLOW_WRITE);
table_list.table= create_info->table;
if (check_if_log_table(&table_list, TRUE, "CREATE OR REPLACE"))
@@ -5039,7 +5089,7 @@ int create_table_impl(THD *thd,
/*
Restart statement transactions for the case of CREATE ... SELECT.
*/
- if (thd->lex->select_lex.item_list.elements &&
+ if (thd->lex->first_select_lex()->item_list.elements &&
restart_trans_for_tables(thd, thd->lex->query_tables))
goto err;
}
@@ -5047,7 +5097,7 @@ int create_table_impl(THD *thd,
goto warn;
else
{
- my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name->str);
+ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name.str);
goto err;
}
}
@@ -5055,7 +5105,7 @@ int create_table_impl(THD *thd,
THD_STAGE_INFO(thd, stage_creating_table);
- if (check_engine(thd, orig_db->str, orig_table_name->str, create_info))
+ if (check_engine(thd, orig_db.str, orig_table_name.str, create_info))
goto err;
if (create_table_mode == C_ASSISTED_DISCOVERY)
@@ -5075,7 +5125,7 @@ int create_table_impl(THD *thd,
goto err;
}
- init_tmp_table_share(thd, &share, db->str, 0, table_name->str, path);
+ init_tmp_table_share(thd, &share, db.str, 0, table_name.str, path);
/* prepare everything for discovery */
share.field= &no_fields;
@@ -5117,17 +5167,29 @@ int create_table_impl(THD *thd,
*/
if (!file || thd->is_error())
goto err;
- if (rea_create_table(thd, frm, path, db->str, table_name->str, create_info,
- file, frm_only))
+
+ if (thd->variables.keep_files_on_create)
+ create_info->options|= HA_CREATE_KEEP_FILES;
+
+ if (file->ha_create_partitioning_metadata(path, NULL, CHF_CREATE_FLAG))
goto err;
+
+ if (!frm_only)
+ {
+ if (ha_create_table(thd, path, db.str, table_name.str, create_info, frm))
+ {
+ file->ha_create_partitioning_metadata(path, NULL, CHF_DELETE_FLAG);
+ deletefrm(path);
+ goto err;
+ }
+ }
}
create_info->table= 0;
if (!frm_only && create_info->tmp_table())
{
- TABLE *table= thd->create_and_open_tmp_table(create_info->db_type, frm,
- path, db->str,
- table_name->str, true,
+ TABLE *table= thd->create_and_open_tmp_table(frm, path, db.str,
+ table_name.str,
false);
if (!table)
@@ -5142,43 +5204,7 @@ int create_table_impl(THD *thd,
thd->thread_specific_used= TRUE;
create_info->table= table; // Store pointer to table
}
-#ifdef WITH_PARTITION_STORAGE_ENGINE
- else if (thd->work_part_info && frm_only)
- {
- /*
- For partitioned tables we can't find some problems with table
- until table is opened. Therefore in order to disallow creation
- of corrupted tables we have to try to open table as the part
- of its creation process.
- In cases when both .FRM and SE part of table are created table
- is implicitly open in ha_create_table() call.
- In cases when we create .FRM without SE part we have to open
- table explicitly.
- */
- TABLE table;
- TABLE_SHARE share;
-
- init_tmp_table_share(thd, &share, db->str, 0, table_name->str, path);
-
- bool result= (open_table_def(thd, &share, GTS_TABLE) ||
- open_table_from_share(thd, &share, &empty_clex_str, 0,
- (uint) READ_ALL, 0, &table, true));
- if (!result)
- (void) closefrm(&table);
- free_table_share(&share);
-
- if (result)
- {
- char frm_name[FN_REFLEN];
- strxnmov(frm_name, sizeof(frm_name), path, reg_ext, NullS);
- (void) mysql_file_delete(key_file_frm, frm_name, MYF(0));
- (void) file->ha_create_partitioning_metadata(path, NULL, CHF_DELETE_FLAG);
- goto err;
- }
- }
-#endif
-
error= 0;
err:
THD_STAGE_INFO(thd, stage_after_create);
@@ -5206,13 +5232,11 @@ warn:
-1 Table was used with IF NOT EXISTS and table existed (warning, not error)
*/
-int mysql_create_table_no_lock(THD *thd,
- const LEX_CSTRING *db,
+int mysql_create_table_no_lock(THD *thd, const LEX_CSTRING *db,
const LEX_CSTRING *table_name,
Table_specification_st *create_info,
Alter_info *alter_info, bool *is_trans,
- int create_table_mode,
- TABLE_LIST *table_list)
+ int create_table_mode, TABLE_LIST *table_list)
{
KEY *not_used_1;
uint not_used_2;
@@ -5236,7 +5260,7 @@ int mysql_create_table_no_lock(THD *thd,
}
}
- res= create_table_impl(thd, db, table_name, db, table_name, path,
+ res= create_table_impl(thd, *db, *table_name, *db, *table_name, path,
*create_info, create_info,
alter_info, create_table_mode,
is_trans, &not_used_1, &not_used_2, &frm);
@@ -5473,17 +5497,22 @@ make_unique_key_name(THD *thd, const char *field_name,KEY *start,KEY *end)
*/
static bool make_unique_constraint_name(THD *thd, LEX_CSTRING *name,
+ const char *own_name_base,
List<Virtual_column_info> *vcol,
uint *nr)
{
char buff[MAX_FIELD_NAME], *end;
List_iterator_fast<Virtual_column_info> it(*vcol);
-
- end=strmov(buff, "CONSTRAINT_");
- for (;;)
+ end=strmov(buff, own_name_base ? own_name_base : "CONSTRAINT_");
+ for (int round= 0;; round++)
{
Virtual_column_info *check;
- char *real_end= int10_to_str((*nr)++, end, 10);
+ char *real_end= end;
+ if (round == 1 && own_name_base)
+ *end++= '_';
+ // if own_base_name provided, try it first
+ if (round != 0 || !own_name_base)
+ real_end= int10_to_str((*nr)++, end, 10);
it.rewind();
while ((check= it++))
{
@@ -5707,7 +5736,9 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
#ifdef WITH_WSREP
if (WSREP(thd) && !thd->wsrep_applier &&
wsrep_create_like_table(thd, table, src_table, create_info))
+ {
DBUG_RETURN(res);
+ }
#endif
/*
@@ -5722,12 +5753,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
properly isolated from all concurrent operations which matter.
*/
- /* Copy temporarily the statement flags to thd for lock_table_names() */
- // QQ: is this really needed???
- uint save_thd_create_info_options= thd->lex->create_info.options;
- thd->lex->create_info.options|= create_info->options;
- res= open_tables(thd, &thd->lex->query_tables, &not_used, 0);
- thd->lex->create_info.options= save_thd_create_info_options;
+ res= open_tables(thd, *create_info, &thd->lex->query_tables, &not_used, 0);
if (res)
{
@@ -6133,6 +6159,7 @@ static bool is_candidate_key(KEY *key)
thd Thread object.
table The altered table.
alter_info List of columns and indexes to create
+ period_info Application-time period info
DESCRIPTION
Looks for the IF [NOT] EXISTS options, checks the states and remove items
@@ -6144,7 +6171,8 @@ static bool is_candidate_key(KEY *key)
*/
static bool
-handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info)
+handle_if_exists_options(THD *thd, TABLE *table, Alter_info *alter_info,
+ Table_period_info *period_info)
{
Field **f_ptr;
DBUG_ENTER("handle_if_exists_option");
@@ -6330,6 +6358,11 @@ drop_create_field:
}
}
}
+ else if (drop->type == Alter_drop::PERIOD)
+ {
+ if (table->s->period.name.streq(drop->name))
+ remove_drop= FALSE;
+ }
else /* Alter_drop::KEY and Alter_drop::FOREIGN_KEY */
{
uint n_key;
@@ -6611,12 +6644,33 @@ remove_key:
}
}
- DBUG_RETURN(FALSE);
+ /* ADD PERIOD */
+
+ if (period_info->create_if_not_exists && table->s->period.name
+ && table->s->period.name.streq(period_info->name))
+ {
+ DBUG_ASSERT(period_info->is_set());
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_DUP_FIELDNAME, ER_THD(thd, ER_DUP_FIELDNAME),
+ period_info->name.str, table->s->table_name.str);
+
+ List_iterator<Virtual_column_info> vit(alter_info->check_constraint_list);
+ while (vit++ != period_info->constr)
+ {
+ // do nothing
+ }
+ vit.remove();
+
+ *period_info= {};
+ }
+
+ DBUG_RETURN(false);
}
static bool fix_constraints_names(THD *thd, List<Virtual_column_info>
- *check_constraint_list)
+ *check_constraint_list,
+ const HA_CREATE_INFO *create_info)
{
List_iterator<Virtual_column_info> it((*check_constraint_list));
Virtual_column_info *check;
@@ -6640,7 +6694,12 @@ static bool fix_constraints_names(THD *thd, List<Virtual_column_info>
if (!check->name.length)
{
check->automatic_name= TRUE;
+
+ const char *own_name_base= create_info->period_info.constr == check
+ ? create_info->period_info.name.str : NULL;
+
if (make_unique_constraint_name(thd, &check->name,
+ own_name_base,
check_constraint_list,
&nr))
DBUG_RETURN(TRUE);
@@ -6649,31 +6708,101 @@ static bool fix_constraints_names(THD *thd, List<Virtual_column_info>
DBUG_RETURN(FALSE);
}
-/**
- Get Create_field object for newly created table by field index.
- @param alter_info Alter_info describing newly created table.
- @param idx Field index.
-*/
-
-static Create_field *get_field_by_index(Alter_info *alter_info, uint idx)
+static int compare_uint(const uint *s, const uint *t)
{
- List_iterator_fast<Create_field> field_it(alter_info->create_list);
- uint field_idx= 0;
- Create_field *field;
+ return (*s < *t) ? -1 : ((*s > *t) ? 1 : 0);
+}
- while ((field= field_it++) && field_idx < idx)
- { field_idx++; }
+static Compare_keys merge(Compare_keys current, Compare_keys add) {
+ if (current == Compare_keys::Equal)
+ return add;
- return field;
-}
+ if (add == Compare_keys::Equal)
+ return current;
+ if (current == add)
+ return current;
-static int compare_uint(const uint *s, const uint *t)
-{
- return (*s < *t) ? -1 : ((*s > *t) ? 1 : 0);
+ if (current == Compare_keys::EqualButComment) {
+ return Compare_keys::NotEqual;
+ }
+
+ if (current == Compare_keys::EqualButKeyPartLength) {
+ if (add == Compare_keys::EqualButComment)
+ return Compare_keys::NotEqual;
+ DBUG_ASSERT(add == Compare_keys::NotEqual);
+ return Compare_keys::NotEqual;
+ }
+
+ DBUG_ASSERT(current == Compare_keys::NotEqual);
+ return current;
}
+Compare_keys compare_keys_but_name(const KEY *table_key, const KEY *new_key,
+ Alter_info *alter_info, const TABLE *table,
+ const KEY *const new_pk,
+ const KEY *const old_pk)
+{
+ if (table_key->algorithm != new_key->algorithm)
+ return Compare_keys::NotEqual;
+
+ if ((table_key->flags & HA_KEYFLAG_MASK) !=
+ (new_key->flags & HA_KEYFLAG_MASK))
+ return Compare_keys::NotEqual;
+
+ if (table_key->user_defined_key_parts != new_key->user_defined_key_parts)
+ return Compare_keys::NotEqual;
+
+ if (table_key->block_size != new_key->block_size)
+ return Compare_keys::NotEqual;
+
+ /*
+ Rebuild the index if following condition get satisfied:
+
+ (i) Old table doesn't have primary key, new table has it and vice-versa
+ (ii) Primary key changed to another existing index
+ */
+ if ((new_key == new_pk) != (table_key == old_pk))
+ return Compare_keys::NotEqual;
+
+ if (engine_options_differ(table_key->option_struct, new_key->option_struct,
+ table->file->ht->index_options))
+ return Compare_keys::NotEqual;
+
+ Compare_keys result= Compare_keys::Equal;
+
+ for (const KEY_PART_INFO *
+ key_part= table_key->key_part,
+ *new_part= new_key->key_part,
+ *end= table_key->key_part + table_key->user_defined_key_parts;
+ key_part < end; key_part++, new_part++)
+ {
+ /*
+ For prefix keys KEY_PART_INFO::field points to cloned Field
+ object with adjusted length. So below we have to check field
+ indexes instead of simply comparing pointers to Field objects.
+ */
+ const Create_field &new_field=
+ *alter_info->create_list.elem(new_part->fieldnr);
+
+ if (!new_field.field ||
+ new_field.field->field_index != key_part->fieldnr - 1)
+ {
+ return Compare_keys::NotEqual;
+ }
+
+ auto compare= table->file->compare_key_parts(
+ *table->field[key_part->fieldnr - 1], new_field, *key_part, *new_part);
+ result= merge(result, compare);
+ }
+
+ /* Check that key comment is not changed. */
+ if (cmp(table_key->comment, new_key->comment) != 0)
+ result= merge(result, Compare_keys::EqualButComment);
+
+ return result;
+}
/**
Compare original and new versions of a table and fill Alter_inplace_info
@@ -6720,21 +6849,21 @@ static int compare_uint(const uint *s, const uint *t)
static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
Alter_inplace_info *ha_alter_info)
{
- Field **f_ptr, *field, *old_field;
+ Field **f_ptr, *field;
List_iterator_fast<Create_field> new_field_it;
Create_field *new_field;
- KEY_PART_INFO *key_part, *new_part;
- KEY_PART_INFO *end;
Alter_info *alter_info= ha_alter_info->alter_info;
DBUG_ENTER("fill_alter_inplace_info");
DBUG_PRINT("info", ("alter_info->flags: %llu", alter_info->flags));
/* Allocate result buffers. */
+ DBUG_ASSERT(ha_alter_info->rename_keys.mem_root() == thd->mem_root);
if (! (ha_alter_info->index_drop_buffer=
(KEY**) thd->alloc(sizeof(KEY*) * table->s->keys)) ||
! (ha_alter_info->index_add_buffer=
(uint*) thd->alloc(sizeof(uint) *
- alter_info->key_list.elements)))
+ alter_info->key_list.elements)) ||
+ ha_alter_info->rename_keys.reserve(ha_alter_info->index_add_count))
DBUG_RETURN(true);
/*
@@ -6809,61 +6938,50 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
/* Field is not dropped. Evaluate changes bitmap for it. */
/*
- Check if type of column has changed to some incompatible type.
+ Check if type of column has changed.
*/
- uint is_equal= field->is_equal(new_field);
- switch (is_equal)
+ bool is_equal= field->is_equal(*new_field);
+ if (!is_equal)
{
- case IS_EQUAL_NO:
- /* New column type is incompatible with old one. */
- if (field->stored_in_db())
- ha_alter_info->handler_flags|= ALTER_STORED_COLUMN_TYPE;
+ if (field->can_be_converted_by_engine(*new_field))
+ {
+ /*
+ New column type differs from the old one, but storage engine can
+ change it by itself.
+ (for example, VARCHAR(300) is changed to VARCHAR(400)).
+ */
+ ha_alter_info->handler_flags|= ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE;
+ }
else
- ha_alter_info->handler_flags|= ALTER_VIRTUAL_COLUMN_TYPE;
- if (table->s->tmp_table == NO_TMP_TABLE)
{
- delete_statistics_for_column(thd, table, field);
- KEY *key_info= table->key_info;
- for (uint i=0; i < table->s->keys; i++, key_info++)
+ /* New column type is incompatible with old one. */
+ ha_alter_info->handler_flags|= field->stored_in_db()
+ ? ALTER_STORED_COLUMN_TYPE
+ : ALTER_VIRTUAL_COLUMN_TYPE;
+
+ if (table->s->tmp_table == NO_TMP_TABLE)
{
- if (field->part_of_key.is_set(i))
+ delete_statistics_for_column(thd, table, field);
+ KEY *key_info= table->key_info;
+ for (uint i= 0; i < table->s->keys; i++, key_info++)
{
+ if (!field->part_of_key.is_set(i))
+ continue;
+
uint key_parts= table->actual_n_key_parts(key_info);
for (uint j= 0; j < key_parts; j++)
{
- if (key_info->key_part[j].fieldnr-1 == field->field_index)
+ if (key_info->key_part[j].fieldnr - 1 == field->field_index)
{
- delete_statistics_for_index(thd, table, key_info,
- j >= key_info->user_defined_key_parts);
+ delete_statistics_for_index(
+ thd, table, key_info,
+ j >= key_info->user_defined_key_parts);
break;
}
- }
+ }
}
- }
+ }
}
- break;
- case IS_EQUAL_YES:
- /*
- New column is the same as the old one or the fully compatible with
- it (for example, ENUM('a','b') was changed to ENUM('a','b','c')).
- Such a change if any can ALWAYS be carried out by simply updating
- data-dictionary without even informing storage engine.
- No flag is set in this case.
- */
- break;
- case IS_EQUAL_PACK_LENGTH:
- /*
- New column type differs from the old one, but has compatible packed
- data representation. Depending on storage engine, such a change can
- be carried out by simply updating data dictionary without changing
- actual data (for example, VARCHAR(300) is changed to VARCHAR(400)).
- */
- ha_alter_info->handler_flags|= ALTER_COLUMN_EQUAL_PACK_LENGTH;
- break;
- default:
- DBUG_ASSERT(0);
- /* Safety. */
- ha_alter_info->handler_flags|= ALTER_STORED_COLUMN_TYPE;
}
if (field->vcol_info || new_field->vcol_info)
@@ -6874,7 +6992,7 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
ALTER_VIRTUAL_COLUMN_TYPE);
if (field->vcol_info && new_field->vcol_info)
{
- bool value_changes= is_equal == IS_EQUAL_NO;
+ bool value_changes= !is_equal;
alter_table_operations alter_expr;
if (field->stored_in_db())
alter_expr= ALTER_STORED_GCOL_EXPR;
@@ -6968,7 +7086,6 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
ha_alter_info->create_info->fields_option_struct[f_ptr - table->field]=
new_field->option_struct;
}
-
}
else
{
@@ -7018,7 +7135,6 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
Go through keys and check if the original ones are compatible
with new table.
*/
- uint old_field_len= 0;
KEY *table_key;
KEY *table_key_end= table->key_info + table->s->keys;
KEY *new_key;
@@ -7065,88 +7181,21 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
continue;
}
- /* Check that the key types are compatible between old and new tables. */
- if ((table_key->algorithm != new_key->algorithm) ||
- ((table_key->flags & HA_KEYFLAG_MASK) !=
- (new_key->flags & HA_KEYFLAG_MASK)) ||
- (table_key->user_defined_key_parts !=
- new_key->user_defined_key_parts))
- goto index_changed;
-
- if (table_key->block_size != new_key->block_size)
- goto index_changed;
-
- if (engine_options_differ(table_key->option_struct, new_key->option_struct,
- table->file->ht->index_options))
- goto index_changed;
-
- /*
- Check that the key parts remain compatible between the old and
- new tables.
- */
- end= table_key->key_part + table_key->user_defined_key_parts;
- for (key_part= table_key->key_part, new_part= new_key->key_part;
- key_part < end;
- key_part++, new_part++)
+ switch (compare_keys_but_name(table_key, new_key, alter_info, table, new_pk,
+ old_pk))
{
- new_field= get_field_by_index(alter_info, new_part->fieldnr);
- old_field= table->field[key_part->fieldnr - 1];
- /*
- If there is a change in index length due to column expansion
- like varchar(X) changed to varchar(X + N) and has a compatible
- packed data representation, we mark it for fast/INPLACE change
- in index definition. InnoDB supports INPLACE for this cases
-
- Key definition has changed if we are using a different field or
- if the user key part length is different.
- */
- old_field_len= old_field->pack_length();
-
- if (old_field->type() == MYSQL_TYPE_VARCHAR)
- {
- old_field_len= (old_field->pack_length()
- - ((Field_varstring*) old_field)->length_bytes);
- }
-
- if (key_part->length == old_field_len &&
- key_part->length < new_part->length &&
- (key_part->field->is_equal((Create_field*) new_field)
- == IS_EQUAL_PACK_LENGTH))
- {
- ha_alter_info->handler_flags |= ALTER_COLUMN_INDEX_LENGTH;
- }
- else if (key_part->length != new_part->length)
- goto index_changed;
-
- /*
- For prefix keys KEY_PART_INFO::field points to cloned Field
- object with adjusted length. So below we have to check field
- indexes instead of simply comparing pointers to Field objects.
- */
- if (! new_field->field ||
- new_field->field->field_index != key_part->fieldnr - 1)
- goto index_changed;
+ case Compare_keys::Equal:
+ continue;
+ case Compare_keys::EqualButKeyPartLength:
+ ha_alter_info->handler_flags|= ALTER_COLUMN_INDEX_LENGTH;
+ continue;
+ case Compare_keys::EqualButComment:
+ ha_alter_info->handler_flags|= ALTER_CHANGE_INDEX_COMMENT;
+ continue;
+ case Compare_keys::NotEqual:
+ break;
}
- /*
- Rebuild the index if following condition get satisfied:
-
- (i) Old table doesn't have primary key, new table has it and vice-versa
- (ii) Primary key changed to another existing index
- */
- if ((new_key == new_pk) != (table_key == old_pk))
- goto index_changed;
-
- /* Check that key comment is not changed. */
- if (table_key->comment.length != new_key->comment.length ||
- (table_key->comment.length &&
- memcmp(table_key->comment.str, new_key->comment.str,
- table_key->comment.length) != 0))
- goto index_changed;
-
- continue;
-
- index_changed:
/* Key modified. Add the key / key offset to both buffers. */
ha_alter_info->index_drop_buffer
[ha_alter_info->index_drop_count++]=
@@ -7186,6 +7235,40 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
new_key->option_struct;
}
+ for (uint i= 0; i < ha_alter_info->index_add_count; i++)
+ {
+ uint *add_buffer= ha_alter_info->index_add_buffer;
+ const KEY *new_key= ha_alter_info->key_info_buffer + add_buffer[i];
+
+ for (uint j= 0; j < ha_alter_info->index_drop_count; j++)
+ {
+ KEY **drop_buffer= ha_alter_info->index_drop_buffer;
+ const KEY *old_key= drop_buffer[j];
+
+ if (compare_keys_but_name(old_key, new_key, alter_info, table, new_pk,
+ old_pk) != Compare_keys::Equal)
+ {
+ continue;
+ }
+
+ DBUG_ASSERT(
+ lex_string_cmp(system_charset_info, &old_key->name, &new_key->name));
+
+ ha_alter_info->handler_flags|= ALTER_RENAME_INDEX;
+ ha_alter_info->rename_keys.push_back(
+ Alter_inplace_info::Rename_key_pair(old_key, new_key));
+
+ --ha_alter_info->index_add_count;
+ --ha_alter_info->index_drop_count;
+ memmove(add_buffer + i, add_buffer + i + 1,
+ sizeof(add_buffer[0]) * (ha_alter_info->index_add_count - i));
+ memmove(drop_buffer + j, drop_buffer + j + 1,
+ sizeof(drop_buffer[0]) * (ha_alter_info->index_drop_count - j));
+ --i; // this index once again
+ break;
+ }
+ }
+
/*
Sort index_add_buffer according to how key_info_buffer is sorted.
I.e. with primary keys first - see sort_keys().
@@ -7372,7 +7455,7 @@ bool mysql_compare_tables(TABLE *table,
DBUG_RETURN(false);
/* Evaluate changes bitmap and send to check_if_incompatible_data() */
- uint field_changes= field->is_equal(tmp_new_field);
+ uint field_changes= field->is_equal(*tmp_new_field);
if (field_changes != IS_EQUAL_YES)
DBUG_RETURN(false);
@@ -7615,7 +7698,6 @@ static bool mysql_inplace_alter_table(THD *thd,
Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN | MYSQL_OPEN_IGNORE_KILLED);
handlerton *db_type= table->s->db_type();
MDL_ticket *mdl_ticket= table->mdl_ticket;
- HA_CREATE_INFO *create_info= ha_alter_info->create_info;
Alter_info *alter_info= ha_alter_info->alter_info;
bool reopen_tables= false;
bool res;
@@ -7624,6 +7706,9 @@ static bool mysql_inplace_alter_table(THD *thd,
DBUG_ENTER("mysql_inplace_alter_table");
+ /* Downgrade DDL lock while we are waiting for exclusive lock below */
+ backup_set_alter_copy_lock(thd, table);
+
/*
Upgrade to EXCLUSIVE lock if:
- This is requested by the storage engine
@@ -7696,9 +7781,7 @@ static bool mysql_inplace_alter_table(THD *thd,
thd->mdl_context.upgrade_shared_lock(table->mdl_ticket,
MDL_SHARED_NO_WRITE,
thd->variables.lock_wait_timeout))
- {
goto cleanup;
- }
// It's now safe to take the table level lock.
if (lock_tables(thd, table_list, alter_ctx->tables_opened, 0))
@@ -7735,16 +7818,15 @@ static bool mysql_inplace_alter_table(THD *thd,
if (table->file->ha_prepare_inplace_alter_table(altered_table,
ha_alter_info))
- {
goto rollback;
- }
/*
Downgrade the lock if storage engine has told us that exclusive lock was
necessary only for prepare phase (unless we are not under LOCK TABLES) and
user has not explicitly requested exclusive lock.
*/
- if ((inplace_supported == HA_ALTER_INPLACE_COPY_NO_LOCK ||
+ if (!ha_alter_info->mdl_exclusive_after_prepare &&
+ (inplace_supported == HA_ALTER_INPLACE_COPY_NO_LOCK ||
inplace_supported == HA_ALTER_INPLACE_COPY_LOCK ||
inplace_supported == HA_ALTER_INPLACE_NOCOPY_LOCK ||
inplace_supported == HA_ALTER_INPLACE_NOCOPY_NO_LOCK) &&
@@ -7780,6 +7862,10 @@ static bool mysql_inplace_alter_table(THD *thd,
if (wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME))
goto rollback;
+ /* Set MDL_BACKUP_DDL */
+ if (backup_reset_alter_copy_lock(thd))
+ goto rollback;
+
/*
If we are killed after this point, we should ignore and continue.
We have mostly completed the operation at this point, there should
@@ -7823,10 +7909,7 @@ static bool mysql_inplace_alter_table(THD *thd,
{
goto rollback;
}
-
DEBUG_SYNC(thd, "alter_table_inplace_after_commit");
-
- thd->drop_temporary_table(altered_table, NULL, false);
}
close_all_tables_for_name(thd, table->s,
@@ -7850,9 +7933,6 @@ static bool mysql_inplace_alter_table(THD *thd,
thd->is_error())
{
// Since changes were done in-place, we can't revert them.
- (void) quick_rm_table(thd, db_type,
- &alter_ctx->new_db, &alter_ctx->tmp_name,
- FN_IS_TMP | NO_HA_TABLE);
DBUG_RETURN(true);
}
@@ -7929,10 +8009,6 @@ static bool mysql_inplace_alter_table(THD *thd,
thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0);
/* QQ; do something about metadata locks ? */
}
- thd->drop_temporary_table(altered_table, NULL, false);
- // Delete temporary .frm/.par
- (void) quick_rm_table(thd, create_info->db_type, &alter_ctx->new_db,
- &alter_ctx->tmp_name, FN_IS_TMP | NO_HA_TABLE);
DBUG_RETURN(true);
}
@@ -8048,6 +8124,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
Create_field *def;
Field **f_ptr,*field;
MY_BITMAP *dropped_fields= NULL; // if it's NULL - no dropped fields
+ bool drop_period= false;
DBUG_ENTER("mysql_prepare_alter_table");
/*
@@ -8240,12 +8317,12 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
def->invisible= INVISIBLE_SYSTEM;
alter_info->flags|= ALTER_CHANGE_COLUMN;
if (field->flags & VERS_ROW_START)
- create_info->vers_info.system_time.start=
+ create_info->vers_info.period.start=
create_info->vers_info.as_row.start=
def->field_name= Vers_parse_info::default_start;
else
- create_info->vers_info.system_time.end=
+ create_info->vers_info.period.end=
create_info->vers_info.as_row.end=
def->field_name= Vers_parse_info::default_end;
new_create_list.push_back(def, thd->mem_root);
@@ -8436,9 +8513,9 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
Collect all keys which isn't in drop list. Add only those
for which some fields exists.
*/
-
for (uint i=0 ; i < table->s->keys ; i++,key_info++)
{
+ bool long_hash_key= false;
if (key_info->flags & HA_INVISIBLE_KEY)
continue;
const char *key_name= key_info->name.str;
@@ -8477,6 +8554,11 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
continue;
}
+ if (key_info->algorithm == HA_KEY_ALG_LONG_HASH)
+ {
+ setup_keyinfo_hash(key_info);
+ long_hash_key= true;
+ }
const char *dropped_key_part= NULL;
bool user_keyparts= false; // some user-defined keyparts left
KEY_PART_INFO *key_part= key_info->key_part;
@@ -8587,6 +8669,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
enum Key::Keytype key_type;
LEX_CSTRING tmp_name;
bzero((char*) &key_create_info, sizeof(key_create_info));
+ if (key_info->algorithm == HA_KEY_ALG_LONG_HASH)
+ key_info->algorithm= HA_KEY_ALG_UNDEF;
key_create_info.algorithm= key_info->algorithm;
/*
We copy block size directly as some engines, like Area, sets this
@@ -8616,6 +8700,11 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
if (dropped_key_part)
{
my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), dropped_key_part);
+ if (long_hash_key)
+ {
+ key_info->algorithm= HA_KEY_ALG_LONG_HASH;
+ re_setup_keyinfo_hash(key_info);
+ }
goto err;
}
}
@@ -8626,11 +8715,17 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
tmp_name.str= key_name;
tmp_name.length= strlen(key_name);
- key= new Key(key_type, &tmp_name, &key_create_info,
+ /* We dont need LONG_UNIQUE_HASH_FIELD flag because it will be autogenerated */
+ key= new (thd->mem_root) Key(key_type, &tmp_name, &key_create_info,
MY_TEST(key_info->flags & HA_GENERATED_KEY),
&key_parts, key_info->option_list, DDL_options());
new_key_list.push_back(key, thd->mem_root);
}
+ if (long_hash_key)
+ {
+ key_info->algorithm= HA_KEY_ALG_LONG_HASH;
+ re_setup_keyinfo_hash(key_info);
+ }
}
{
Key *key;
@@ -8649,6 +8744,35 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
}
+ if (table->s->period.name)
+ {
+ drop_it.rewind();
+ Alter_drop *drop;
+ for (bool found= false; !found && (drop= drop_it++); )
+ {
+ found= drop->type == Alter_drop::PERIOD &&
+ table->s->period.name.streq(drop->name);
+ }
+
+ if (drop)
+ {
+ drop_period= true;
+ drop_it.remove();
+ }
+ else if (create_info->period_info.is_set() && table->s->period.name)
+ {
+ my_error(ER_MORE_THAN_ONE_PERIOD, MYF(0));
+ goto err;
+ }
+ else
+ {
+ Field *s= table->s->period.start_field(table->s);
+ Field *e= table->s->period.end_field(table->s);
+ create_info->period_info.set_period(s->field_name, e->field_name);
+ create_info->period_info.name= table->s->period.name;
+ }
+ }
+
/* Add all table level constraints which are not in the drop list */
if (table->s->table_check_constraints)
{
@@ -8659,6 +8783,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
{
Virtual_column_info *check= table->check_constraints[i];
Alter_drop *drop;
+ bool keep= true;
drop_it.rewind();
while ((drop=drop_it++))
{
@@ -8666,17 +8791,41 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
!my_strcasecmp(system_charset_info, check->name.str, drop->name))
{
drop_it.remove();
+ keep= false;
break;
}
}
+
+ if (share->period.constr_name.streq(check->name.str))
+ {
+ if (!drop_period && !keep)
+ {
+ my_error(ER_PERIOD_CONSTRAINT_DROP, MYF(0), check->name.str,
+ share->period.name.str);
+ goto err;
+ }
+ keep= keep && !drop_period;
+
+ DBUG_ASSERT(create_info->period_info.constr == NULL || drop_period);
+
+ if (keep)
+ {
+ Item *expr_copy= check->expr->get_copy(thd);
+ check= new Virtual_column_info();
+ check->name= share->period.constr_name;
+ check->automatic_name= true;
+ check->expr= expr_copy;
+ create_info->period_info.constr= check;
+ }
+ }
/* see if the constraint depends on *only* on dropped fields */
- if (!drop && dropped_fields)
+ if (keep && dropped_fields)
{
table->default_column_bitmaps();
bitmap_clear_all(table->read_set);
check->expr->walk(&Item::register_field_in_read_map, 1, 0);
if (bitmap_is_subset(table->read_set, dropped_fields))
- drop= (Alter_drop*)1;
+ keep= false;
else if (bitmap_is_overlapping(dropped_fields, table->read_set))
{
bitmap_intersect(table->read_set, dropped_fields);
@@ -8686,7 +8835,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
goto err;
}
}
- if (!drop)
+ if (keep)
{
if (alter_info->flags & ALTER_RENAME_COLUMN)
{
@@ -8740,8 +8889,9 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
case Alter_drop::KEY:
case Alter_drop::COLUMN:
case Alter_drop::CHECK_CONSTRAINT:
- my_error(ER_CANT_DROP_FIELD_OR_KEY, MYF(0), drop->type_name(),
- alter_info->drop_list.head()->name);
+ case Alter_drop::PERIOD:
+ my_error(ER_CANT_DROP_FIELD_OR_KEY, MYF(0), drop->type_name(),
+ alter_info->drop_list.head()->name);
goto err;
case Alter_drop::FOREIGN_KEY:
// Leave the DROP FOREIGN KEY names in the alter_info->drop_list.
@@ -8877,7 +9027,7 @@ fk_check_column_changes(THD *thd, Alter_info *alter_info,
return FK_COLUMN_RENAMED;
}
- if ((old_field->is_equal(new_field) == IS_EQUAL_NO) ||
+ if ((old_field->is_equal(*new_field) == IS_EQUAL_NO) ||
((new_field->flags & NOT_NULL_FLAG) &&
!(old_field->flags & NOT_NULL_FLAG)))
{
@@ -9275,11 +9425,6 @@ simple_rename_or_index_change(THD *thd, TABLE_LIST *table_list,
close_all_tables_for_name(thd, table->s, HA_EXTRA_PREPARE_FOR_RENAME,
NULL);
- (void) rename_table_in_stat_tables(thd, &alter_ctx->db,
- &alter_ctx->table_name,
- &alter_ctx->new_db,
- &alter_ctx->new_alias);
-
if (mysql_rename_table(old_db_type, &alter_ctx->db, &alter_ctx->table_name,
&alter_ctx->new_db, &alter_ctx->new_alias, 0))
error= -1;
@@ -9296,6 +9441,12 @@ simple_rename_or_index_change(THD *thd, TABLE_LIST *table_list,
NO_FK_CHECKS);
error= -1;
}
+ /* Update stat tables last. This is to be able to handle rename of a stat table */
+ if (error == 0)
+ (void) rename_table_in_stat_tables(thd, &alter_ctx->db,
+ &alter_ctx->table_name,
+ &alter_ctx->new_db,
+ &alter_ctx->new_alias);
}
if (likely(!error))
@@ -9325,6 +9476,49 @@ simple_rename_or_index_change(THD *thd, TABLE_LIST *table_list,
}
+static void cleanup_table_after_inplace_alter_keep_files(TABLE *table)
+{
+ TABLE_SHARE *share= table->s;
+ closefrm(table);
+ free_table_share(share);
+}
+
+
+static void cleanup_table_after_inplace_alter(TABLE *table)
+{
+ table->file->ha_create_partitioning_metadata(table->s->normalized_path.str, 0,
+ CHF_DELETE_FLAG);
+ deletefrm(table->s->normalized_path.str);
+ cleanup_table_after_inplace_alter_keep_files(table);
+}
+
+
+static int create_table_for_inplace_alter(THD *thd,
+ const Alter_table_ctx &alter_ctx,
+ LEX_CUSTRING *frm,
+ TABLE_SHARE *share,
+ TABLE *table)
+{
+ init_tmp_table_share(thd, share, alter_ctx.new_db.str, 0,
+ alter_ctx.new_name.str, alter_ctx.get_tmp_path());
+ if (share->init_from_binary_frm_image(thd, true, frm->str, frm->length) ||
+ open_table_from_share(thd, share, &alter_ctx.new_name, 0,
+ EXTRA_RECORD, thd->open_options,
+ table, false))
+ {
+ free_table_share(share);
+ deletefrm(alter_ctx.get_tmp_path());
+ return 1;
+ }
+ if (table->internal_tables && open_and_lock_internal_tables(table, false))
+ {
+ cleanup_table_after_inplace_alter(table);
+ return 1;
+ }
+ return 0;
+}
+
+
/**
Alter table
@@ -9428,6 +9622,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
uint tables_opened;
thd->open_options|= HA_OPEN_FOR_ALTER;
+ thd->mdl_backup_ticket= 0;
bool error= open_tables(thd, &table_list, &tables_opened, 0,
&alter_prelocking_strategy);
thd->open_options&= ~HA_OPEN_FOR_ALTER;
@@ -9505,7 +9700,8 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
If such table exists, there must be a corresponding TABLE_SHARE in
THD::all_temp_tables list.
*/
- if (thd->find_tmp_table_share(alter_ctx.new_db.str, alter_ctx.new_name.str))
+ if (thd->find_tmp_table_share(alter_ctx.new_db.str,
+ alter_ctx.new_name.str))
{
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alter_ctx.new_alias.str);
DBUG_RETURN(true);
@@ -9535,12 +9731,12 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
}
/*
- Global intention exclusive lock must have been already acquired when
- table to be altered was open, so there is no need to do it here.
+ Protection against global read lock must have been acquired when table
+ to be altered was being opened.
*/
- DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::GLOBAL,
+ DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::BACKUP,
"", "",
- MDL_INTENTION_EXCLUSIVE));
+ MDL_BACKUP_DDL));
if (thd->mdl_context.acquire_locks(&mdl_requests,
thd->variables.lock_wait_timeout))
@@ -9648,6 +9844,17 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
if (table->s->tmp_table == NO_TMP_TABLE)
mysql_audit_alter_table(thd, table_list);
+ else if (table->s->table_creation_was_logged && mysql_bin_log.is_open())
+ {
+ /* Protect against MDL error in binary logging */
+ MDL_request mdl_request;
+ DBUG_ASSERT(!mdl_ticket);
+ mdl_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_COMMIT,
+ MDL_TRANSACTION);
+ if (thd->mdl_context.acquire_lock(&mdl_request,
+ thd->variables.lock_wait_timeout))
+ DBUG_RETURN(true);
+ }
THD_STAGE_INFO(thd, stage_setup);
@@ -9709,11 +9916,12 @@ do_continue:;
}
}
- if (handle_if_exists_options(thd, table, alter_info) ||
- fix_constraints_names(thd, &alter_info->check_constraint_list))
+ if (handle_if_exists_options(thd, table, alter_info,
+ &create_info->period_info) ||
+ fix_constraints_names(thd, &alter_info->check_constraint_list,
+ create_info))
DBUG_RETURN(true);
-
/*
Look if we have to do anything at all.
ALTER can become NOOP after handling
@@ -9726,9 +9934,12 @@ do_continue:;
thd->get_stmt_da()->current_statement_warn_count());
my_ok(thd, 0L, 0L, alter_ctx.tmp_buff);
- /* We don't replicate alter table statement on temporary tables */
+ /*
+ We don't replicate alter table statement on temporary tables
+ For which we did not log the CREATE TEMPORARY TABLE statement.
+ */
if (table->s->tmp_table == NO_TMP_TABLE ||
- !thd->is_current_stmt_binlog_format_row())
+ table->s->table_creation_was_logged)
{
if (write_bin_log(thd, true, thd->query(), thd->query_length()))
DBUG_RETURN(true);
@@ -9803,13 +10014,12 @@ do_continue:;
DBUG_RETURN(true);
}
- if (create_info->vers_check_system_fields(thd, alter_info,
- table->s->table_name, table->s->db))
- {
- DBUG_RETURN(true);
- }
+ set_table_default_charset(thd, create_info, alter_ctx.db);
- set_table_default_charset(thd, create_info, &alter_ctx.db);
+ if (create_info->check_fields(thd, alter_info,
+ table_list->table_name, table_list->db) ||
+ create_info->fix_period_fields(thd, alter_info))
+ DBUG_RETURN(true);
if (!opt_explicit_defaults_for_timestamp)
promote_first_timestamp_column(&alter_info->create_list);
@@ -9953,8 +10163,6 @@ do_continue:;
}
DEBUG_SYNC(thd, "alter_table_before_create_table_no_lock");
- /* We can abort alter table for any table type */
- thd->abort_on_warning= !ignore && thd->is_strict_mode();
/*
Create .FRM for new version of table with a temporary name.
@@ -9979,15 +10187,13 @@ do_continue:;
if (!(alter_info->flags & ALTER_ADD_INDEX) && !alter_ctx.modified_primary_key)
create_info->options|= HA_SKIP_KEY_SORT;
create_info->alias= alter_ctx.table_name;
- error= create_table_impl(thd,
- &alter_ctx.db, &alter_ctx.table_name,
- &alter_ctx.new_db, &alter_ctx.tmp_name,
+ error= create_table_impl(thd, alter_ctx.db, alter_ctx.table_name,
+ alter_ctx.new_db, alter_ctx.tmp_name,
alter_ctx.get_tmp_path(),
thd->lex->create_info, create_info, alter_info,
C_ALTER_TABLE_FRM_ONLY, NULL,
&key_info, &key_count, &frm);
reenable_binlog(thd);
- thd->abort_on_warning= false;
if (unlikely(error))
{
my_free(const_cast<uchar*>(frm.str));
@@ -10003,7 +10209,8 @@ do_continue:;
key_info, key_count,
IF_PARTITIONING(thd->work_part_info, NULL),
ignore, alter_ctx.error_if_not_empty);
- TABLE *altered_table= NULL;
+ TABLE_SHARE altered_share;
+ TABLE altered_table;
bool use_inplace= true;
/* Fill the Alter_inplace_info structure. */
@@ -10032,11 +10239,10 @@ do_continue:;
Also note that we ignore the LOCK clause here.
- TODO don't create the frm in the first place
+ TODO don't create partitioning metadata in the first place
*/
- const char *path= alter_ctx.get_tmp_path();
- table->file->ha_create_partitioning_metadata(path, NULL, CHF_DELETE_FLAG);
- deletefrm(path);
+ table->file->ha_create_partitioning_metadata(alter_ctx.get_tmp_path(),
+ NULL, CHF_DELETE_FLAG);
my_free(const_cast<uchar*>(frm.str));
goto end_inplace;
}
@@ -10044,31 +10250,30 @@ do_continue:;
// We assume that the table is non-temporary.
DBUG_ASSERT(!table->s->tmp_table);
- if (!(altered_table=
- thd->create_and_open_tmp_table(new_db_type, &frm,
- alter_ctx.get_tmp_path(),
- alter_ctx.new_db.str,
- alter_ctx.new_name.str,
- false, true)))
+ if (create_table_for_inplace_alter(thd, alter_ctx, &frm, &altered_share,
+ &altered_table))
goto err_new_table_cleanup;
/* Set markers for fields in TABLE object for altered table. */
- update_altered_table(ha_alter_info, altered_table);
+ update_altered_table(ha_alter_info, &altered_table);
/*
Mark all columns in 'altered_table' as used to allow usage
of its record[0] buffer and Field objects during in-place
ALTER TABLE.
*/
- altered_table->column_bitmaps_set_no_signal(&altered_table->s->all_set,
- &altered_table->s->all_set);
- restore_record(altered_table, s->default_values); // Create empty record
+ altered_table.column_bitmaps_set_no_signal(&altered_table.s->all_set,
+ &altered_table.s->all_set);
+ restore_record(&altered_table, s->default_values); // Create empty record
/* Check that we can call default functions with default field values */
thd->count_cuted_fields= CHECK_FIELD_EXPRESSION;
- altered_table->reset_default_fields();
- if (altered_table->default_field &&
- altered_table->update_default_fields(true))
+ altered_table.reset_default_fields();
+ if (altered_table.default_field &&
+ altered_table.update_default_fields(true))
+ {
+ cleanup_table_after_inplace_alter(&altered_table);
goto err_new_table_cleanup;
+ }
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
if (alter_info->requested_lock == Alter_info::ALTER_TABLE_LOCK_NONE)
@@ -10077,14 +10282,14 @@ do_continue:;
{
Check_level_instant_set check_level_save(thd, CHECK_FIELD_WARN);
ha_alter_info.inplace_supported=
- table->file->check_if_supported_inplace_alter(altered_table,
+ table->file->check_if_supported_inplace_alter(&altered_table,
&ha_alter_info);
}
if (alter_info->supports_algorithm(thd, &ha_alter_info) ||
alter_info->supports_lock(thd, &ha_alter_info))
{
- thd->drop_temporary_table(altered_table, NULL, false);
+ cleanup_table_after_inplace_alter(&altered_table);
goto err_new_table_cleanup;
}
@@ -10108,20 +10313,22 @@ do_continue:;
for alter table.
*/
Check_level_instant_set check_level_save(thd, CHECK_FIELD_WARN);
- int res= mysql_inplace_alter_table(thd, table_list, table, altered_table,
+ int res= mysql_inplace_alter_table(thd, table_list, table, &altered_table,
&ha_alter_info,
&target_mdl_request, &alter_ctx);
my_free(const_cast<uchar*>(frm.str));
if (res)
+ {
+ cleanup_table_after_inplace_alter(&altered_table);
DBUG_RETURN(true);
+ }
+ cleanup_table_after_inplace_alter_keep_files(&altered_table);
goto end_inplace;
}
else
- {
- thd->drop_temporary_table(altered_table, NULL, false);
- }
+ cleanup_table_after_inplace_alter_keep_files(&altered_table);
}
/* ALTER TABLE using copy algorithm. */
@@ -10175,15 +10382,15 @@ do_continue:;
no_ha_table= false;
DEBUG_SYNC(thd, "alter_table_intermediate_table_created");
- new_table=
- thd->create_and_open_tmp_table(new_db_type, &frm, alter_ctx.get_tmp_path(),
- alter_ctx.new_db.str,
- alter_ctx.new_name.str,
- true, true);
+ /* Open the table since we need to copy the data. */
+ new_table= thd->create_and_open_tmp_table(&frm,
+ alter_ctx.get_tmp_path(),
+ alter_ctx.new_db.str,
+ alter_ctx.new_name.str,
+ true);
if (!new_table)
goto err_new_table_cleanup;
- /* Open the table since we need to copy the data. */
if (table->s->tmp_table != NO_TMP_TABLE)
{
/* in case of alter temp table send the tracker in OK packet */
@@ -10303,7 +10510,7 @@ do_continue:;
close_all_tables_for_name(thd, table->s,
alter_ctx.is_table_renamed() ?
- HA_EXTRA_PREPARE_FOR_RENAME:
+ HA_EXTRA_PREPARE_FOR_RENAME:
HA_EXTRA_NOT_USED,
NULL);
table_list->table= table= NULL; /* Safety */
@@ -10428,19 +10635,17 @@ err_new_table_cleanup:
if (unlikely(alter_ctx.error_if_not_empty &&
thd->get_stmt_da()->current_row_for_warning()))
{
- const char *f_val= 0;
- enum enum_mysql_timestamp_type t_type= MYSQL_TIMESTAMP_DATE;
+ const char *f_val= "0000-00-00";
+ const char *f_type= "date";
switch (alter_ctx.datetime_field->real_field_type())
{
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_NEWDATE:
- f_val= "0000-00-00";
- t_type= MYSQL_TIMESTAMP_DATE;
break;
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_DATETIME2:
f_val= "0000-00-00 00:00:00";
- t_type= MYSQL_TIMESTAMP_DATETIME;
+ f_type= "datetime";
break;
default:
/* Shouldn't get here. */
@@ -10448,11 +10653,12 @@ err_new_table_cleanup:
}
bool save_abort_on_warning= thd->abort_on_warning;
thd->abort_on_warning= true;
- make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN,
- f_val, strlength(f_val), t_type,
- alter_ctx.new_db.str,
- alter_ctx.new_name.str,
- alter_ctx.datetime_field->field_name.str);
+ thd->push_warning_truncated_value_for_field(Sql_condition::WARN_LEVEL_WARN,
+ f_type, f_val,
+ alter_ctx.new_db.str,
+ alter_ctx.new_name.str,
+ alter_ctx.datetime_field->
+ field_name.str);
thd->abort_on_warning= save_abort_on_warning;
}
@@ -10500,7 +10706,7 @@ bool mysql_trans_prepare_alter_copy_data(THD *thd)
/*
Turn off recovery logging since rollback of an alter table is to
delete the new table so there is no need to log the changes to it.
-
+
This needs to be done before external_lock.
*/
DBUG_RETURN(ha_enable_transaction(thd, FALSE) != 0);
@@ -10567,6 +10773,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
bool make_versioned= !from->versioned() && to->versioned();
bool make_unversioned= from->versioned() && !to->versioned();
bool keep_versioned= from->versioned() && to->versioned();
+ bool bulk_insert_started= 0;
Field *to_row_start= NULL, *to_row_end= NULL, *from_row_end= NULL;
MYSQL_TIME query_start;
DBUG_ENTER("copy_data_between_tables");
@@ -10592,12 +10799,11 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
DBUG_RETURN(-1);
}
+ backup_set_alter_copy_lock(thd, from);
+
alter_table_manage_keys(to, from->file->indexes_are_disabled(), keys_onoff);
- /* Set read map for all fields in from table */
from->default_column_bitmaps();
- bitmap_set_all(from->read_set);
- from->file->column_bitmaps_signal();
/* We can abort alter table for any table type */
thd->abort_on_warning= !ignore && thd->is_strict_mode();
@@ -10606,6 +10812,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
to->file->extra(HA_EXTRA_PREPARE_FOR_ALTER_TABLE);
to->file->ha_start_bulk_insert(from->file->stats.records,
ignore ? 0 : HA_CREATE_UNIQUE_INDEX_BY_SORT);
+ bulk_insert_started= 1;
List_iterator<Create_field> it(create);
Create_field *def;
copy_end=copy;
@@ -10627,7 +10834,11 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
if (def->field == from->found_next_number_field)
thd->variables.sql_mode|= MODE_NO_AUTO_VALUE_ON_ZERO;
}
- (copy_end++)->set(*ptr,def->field,0);
+ if (!(*ptr)->vcol_info)
+ {
+ bitmap_set_bit(from->read_set, def->field->field_index);
+ (copy_end++)->set(*ptr,def->field,0);
+ }
}
else
{
@@ -10655,7 +10866,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
char warn_buff[MYSQL_ERRMSG_SIZE];
bool save_abort_on_warning= thd->abort_on_warning;
thd->abort_on_warning= false;
- my_snprintf(warn_buff, sizeof(warn_buff),
+ my_snprintf(warn_buff, sizeof(warn_buff),
"ORDER BY ignored as there is a user-defined clustered index"
" in the table '%-.192s'", from->s->table_name.str);
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
@@ -10673,8 +10884,8 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
Filesort_tracker dummy_tracker(false);
Filesort fsort(order, HA_POS_ERROR, true, NULL);
- if (thd->lex->select_lex.setup_ref_array(thd, order_num) ||
- setup_order(thd, thd->lex->select_lex.ref_pointer_array,
+ if (thd->lex->first_select_lex()->setup_ref_array(thd, order_num) ||
+ setup_order(thd, thd->lex->first_select_lex()->ref_pointer_array,
&tables, fields, all_fields, order))
goto err;
@@ -10695,6 +10906,11 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
from_row_end= from->vers_end_field();
}
+ if (from_row_end)
+ bitmap_set_bit(from->read_set, from_row_end->field_index);
+
+ from->file->column_bitmaps_signal();
+
THD_STAGE_INFO(thd, stage_copy_to_tmp_table);
/* Tell handler that we have values for all columns in the to table */
to->use_all_columns();
@@ -10859,17 +11075,24 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
to->file->print_error(my_errno,MYF(0));
error= 1;
}
+ bulk_insert_started= 0;
if (!ignore)
to->file->extra(HA_EXTRA_END_ALTER_COPY);
cleanup_done= 1;
to->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
+ if (backup_reset_alter_copy_lock(thd))
+ error= 1;
+
if (unlikely(mysql_trans_commit_alter_copy_data(thd)))
error= 1;
err:
- /* Free resources */
+ if (bulk_insert_started)
+ (void) to->file->ha_end_bulk_insert();
+
+/* Free resources */
if (init_read_record_done)
end_read_record(&info);
delete [] copy;
@@ -10884,7 +11107,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
if (!cleanup_done)
{
- /* This happens if we get an error during initialzation of data */
+ /* This happens if we get an error during initialization of data */
DBUG_ASSERT(error);
to->file->ha_end_bulk_insert();
ha_enable_transaction(thd, TRUE);
@@ -11023,7 +11246,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
(((t->file->ha_table_flags() & HA_HAS_OLD_CHECKSUM) && thd->variables.old_mode) ||
((t->file->ha_table_flags() & HA_HAS_NEW_CHECKSUM) && !thd->variables.old_mode)))
{
- if (t->file->info(HA_STATUS_VARIABLE))
+ if (t->file->info(HA_STATUS_VARIABLE) || t->file->stats.checksum_null)
protocol->store_null();
else
protocol->store((longlong)t->file->stats.checksum);
@@ -11043,7 +11266,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
thd->protocol->remove_last_row();
goto err;
}
- if (error)
+ if (error || t->file->stats.checksum_null)
protocol->store_null();
else
protocol->store((longlong)t->file->stats.checksum);
@@ -11127,10 +11350,10 @@ bool check_engine(THD *thd, const char *db_name,
if (req_engine && req_engine != *new_engine)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
- ER_WARN_USING_OTHER_HANDLER,
+ ER_WARN_USING_OTHER_HANDLER,
ER_THD(thd, ER_WARN_USING_OTHER_HANDLER),
- ha_resolve_storage_engine_name(*new_engine),
- table_name);
+ ha_resolve_storage_engine_name(*new_engine),
+ table_name);
}
if (create_info->tmp_table() &&
ha_check_storage_engine_flag(*new_engine, HTON_TEMPORARY_NOT_SUPPORTED))
@@ -11153,7 +11376,7 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
{
DBUG_ENTER("Sql_cmd_create_table::execute");
LEX *lex= thd->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
TABLE_LIST *first_table= select_lex->table_list.first;
DBUG_ASSERT(first_table == lex->query_tables);
DBUG_ASSERT(first_table != 0);
@@ -11241,8 +11464,8 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
{
create_info.used_fields&= ~HA_CREATE_USED_CHARSET;
create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
- create_info.default_table_charset= create_info.table_charset;
- create_info.table_charset= 0;
+ create_info.default_table_charset= create_info.alter_table_convert_to_charset;
+ create_info.alter_table_convert_to_charset= 0;
}
/*
@@ -11272,7 +11495,7 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
}
#endif
- if (select_lex->item_list.elements) // With select
+ if (select_lex->item_list.elements || select_lex->tvc) // With select or TVC
{
select_result *result;
@@ -11341,11 +11564,7 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
goto end_with_restore_list;
}
- /* Copy temporarily the statement flags to thd for lock_table_names() */
- uint save_thd_create_info_options= thd->lex->create_info.options;
- thd->lex->create_info.options|= create_info.options;
res= open_and_lock_tables(thd, create_info, lex->query_tables, TRUE, 0);
- thd->lex->create_info.options= save_thd_create_info_options;
if (unlikely(res))
{
/* Got error or warning. Set res to 1 if error */
@@ -11417,10 +11636,9 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
}
else
{
- if (create_info.vers_fix_system_fields(thd, &alter_info, *create_table) ||
- create_info.vers_check_system_fields(thd, &alter_info,
- create_table->table_name,
- create_table->db))
+ if (create_info.fix_create_fields(thd, &alter_info, *create_table) ||
+ create_info.check_fields(thd, &alter_info,
+ create_table->table_name, create_table->db))
goto end_with_restore_list;
/*
@@ -11428,7 +11646,6 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
tables, like mysql replication does. Also check if the requested
engine is allowed/supported.
*/
-#ifdef WITH_WSREP
if (WSREP(thd))
{
handlerton *orig_ht= create_info.db_type;
@@ -11438,15 +11655,20 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
(!thd->is_current_stmt_binlog_format_row() ||
!create_info.tmp_table()))
{
- WSREP_TO_ISOLATION_BEGIN(create_table->db.str,
- create_table->table_name.str, NULL)
+#ifdef WITH_WSREP
+ WSREP_TO_ISOLATION_BEGIN_ALTER(create_table->db.str, create_table->table_name.str,
+ first_table, &alter_info, NULL)
+ {
+ WSREP_WARN("CREATE TABLE isolation failure");
+ DBUG_RETURN(true);
+ }
+#endif /* WITH_WSREP */
}
// check_engine will set db_type to NULL if e.g. TEMPORARY is
// not supported by the storage engine, this case is checked
// again in mysql_create_table
create_info.db_type= orig_ht;
}
-#endif /* WITH_WSREP */
/* Regular CREATE TABLE */
res= mysql_create_table(thd, create_table, &create_info, &alter_info);
}
@@ -11467,7 +11689,4 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
end_with_restore_list:
DBUG_RETURN(res);
-
-WSREP_ERROR_LABEL:
- DBUG_RETURN(true);
}
diff --git a/sql/sql_table.h b/sql/sql_table.h
index 0ccd1bfe827..62b61684286 100644
--- a/sql/sql_table.h
+++ b/sql/sql_table.h
@@ -198,8 +198,8 @@ int mysql_create_table_no_lock(THD *thd, const LEX_CSTRING *db,
int create_table_mode, TABLE_LIST *table);
handler *mysql_create_frm_image(THD *thd,
- const LEX_CSTRING *db,
- const LEX_CSTRING *table_name,
+ const LEX_CSTRING &db,
+ const LEX_CSTRING &table_name,
HA_CREATE_INFO *create_info,
Alter_info *alter_info,
int create_table_mode,
@@ -252,8 +252,6 @@ bool quick_rm_table(THD *thd, handlerton *base, const LEX_CSTRING *db,
const char *table_path=0);
void close_cached_table(THD *thd, TABLE *table);
void sp_prepare_create_field(THD *thd, Column_definition *sql_field);
-CHARSET_INFO* get_sql_field_charset(Column_definition *sql_field,
- HA_CREATE_INFO *create_info);
bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags);
int write_bin_log(THD *thd, bool clear_error,
char const *query, ulong query_length,
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 5a5e73c5b1a..5ea132c83d4 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -24,6 +24,7 @@
#include "sql_show.h" // calc_sum_of_all_status
#include "sql_select.h"
#include "keycaches.h"
+#include "my_json_writer.h"
#include <hash.h>
#include <thr_alarm.h>
#if defined(HAVE_MALLINFO) && defined(HAVE_MALLOC_H)
@@ -36,6 +37,8 @@
#include "events.h"
#endif
+#define FT_KEYPART (MAX_FIELDS+10)
+
static const char *lock_descriptions[] =
{
/* TL_UNLOCK */ "No lock",
@@ -225,8 +228,6 @@ TEST_join(JOIN *join)
}
-#define FT_KEYPART (MAX_FIELDS+10)
-
static void print_keyuse(KEYUSE *keyuse)
{
char buff[256];
@@ -263,7 +264,6 @@ void print_keyuse_array(DYNAMIC_ARRAY *keyuse_array)
DBUG_UNLOCK_FILE;
}
-
/*
Print the current state during query optimization.
@@ -294,7 +294,6 @@ print_plan(JOIN* join, uint idx, double record_count, double read_time,
double current_read_time, const char *info)
{
uint i;
- POSITION pos;
JOIN_TAB *join_table;
JOIN_TAB **plan_nodes;
TABLE* table;
@@ -321,8 +320,8 @@ print_plan(JOIN* join, uint idx, double record_count, double read_time,
fputs(" POSITIONS: ", DBUG_FILE);
for (i= 0; i < idx ; i++)
{
- pos = join->positions[i];
- table= pos.table->table;
+ POSITION *pos= join->positions + i;
+ table= pos->table->table;
if (table)
fputs(table->s->table_name.str, DBUG_FILE);
fputc(' ', DBUG_FILE);
@@ -338,8 +337,8 @@ print_plan(JOIN* join, uint idx, double record_count, double read_time,
fputs("BEST_POSITIONS: ", DBUG_FILE);
for (i= 0; i < idx ; i++)
{
- pos= join->best_positions[i];
- table= pos.table->table;
+ POSITION *pos= join->best_positions + i;
+ table= pos->table->table;
if (table)
fputs(table->s->table_name.str, DBUG_FILE);
fputc(' ', DBUG_FILE);
@@ -660,3 +659,27 @@ Memory allocated by threads: %s\n",
puts("");
fflush(stdout);
}
+
+void print_keyuse_array_for_trace(THD *thd, DYNAMIC_ARRAY *keyuse_array)
+{
+ DBUG_ASSERT(thd->trace_started());
+
+ Json_writer_object wrapper(thd);
+ Json_writer_array trace_key_uses(thd, "ref_optimizer_key_uses");
+
+ for (uint i=0; i < keyuse_array->elements; i++)
+ {
+ KEYUSE *keyuse= (KEYUSE*)dynamic_array_ptr(keyuse_array, i);
+ Json_writer_object keyuse_elem(thd);
+ keyuse_elem.add_table_name(keyuse->table->reginfo.join_tab);
+ keyuse_elem.add("field", (keyuse->keypart == FT_KEYPART) ? "<fulltext>":
+ (keyuse->is_for_hash_join() ?
+ keyuse->table->field[keyuse->keypart]
+ ->field_name.str :
+ keyuse->table->key_info[keyuse->key]
+ .key_part[keyuse->keypart]
+ .field->field_name.str));
+ keyuse_elem.add("equals",keyuse->val);
+ keyuse_elem.add("null_rejecting",keyuse->null_rejecting);
+ }
+}
diff --git a/sql/sql_test.h b/sql/sql_test.h
index 58262580a75..2ab305acd66 100644
--- a/sql/sql_test.h
+++ b/sql/sql_test.h
@@ -17,6 +17,7 @@
#define SQL_TEST_INCLUDED
#include "mysqld.h"
+#include "opt_trace_context.h"
class JOIN;
struct TABLE_LIST;
@@ -34,6 +35,7 @@ void print_keyuse_array(DYNAMIC_ARRAY *keyuse_array);
void print_sjm(SJ_MATERIALIZATION_INFO *sjm);
void dump_TABLE_LIST_graph(SELECT_LEX *select_lex, TABLE_LIST* tl);
#endif
+void print_keyuse_array_for_trace(THD *thd, DYNAMIC_ARRAY *keyuse_array);
void mysql_print_status();
#endif /* SQL_TEST_INCLUDED */
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index cb09daff6f5..abc91907a55 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -174,7 +174,7 @@ int calc_weekday(long daynr,bool sunday_first_day_of_week)
next week is week 1.
*/
-uint calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year)
+uint calc_week(const MYSQL_TIME *l_time, uint week_behaviour, uint *year)
{
uint days;
ulong daynr=calc_daynr(l_time->year,l_time->month,l_time->day);
@@ -288,15 +288,15 @@ ulong convert_month_to_period(ulong month)
bool
-check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date,
- timestamp_type ts_type)
+check_date_with_warn(THD *thd, const MYSQL_TIME *ltime,
+ date_conv_mode_t fuzzydate, timestamp_type ts_type)
{
int unused;
- if (check_date(ltime, fuzzy_date, &unused))
+ if (check_date(ltime, fuzzydate, &unused))
{
ErrConvTime str(ltime);
- make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
- &str, ts_type, NULL, NULL, NULL);
+ make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ &str, ts_type, nullptr, nullptr, nullptr);
return true;
}
return false;
@@ -304,7 +304,7 @@ check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date,
bool
-adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec)
+adjust_time_range_with_warn(THD *thd, MYSQL_TIME *ltime, uint dec)
{
MYSQL_TIME copy= *ltime;
ErrConvTime str(&copy);
@@ -312,8 +312,7 @@ adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec)
if (check_time_range(ltime, dec, &warnings))
return true;
if (warnings)
- make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
- &str, MYSQL_TIMESTAMP_TIME, NULL, NULL, NULL);
+ thd->push_warning_truncated_wrong_value("time", str.ptr());
return false;
}
@@ -351,33 +350,70 @@ to_ascii(CHARSET_INFO *cs,
}
-/* Character set-aware version of str_to_time() */
-bool
-str_to_time(CHARSET_INFO *cs, const char *str, size_t length,
- MYSQL_TIME *l_time, ulonglong fuzzydate, MYSQL_TIME_STATUS *status)
+class TemporalAsciiBuffer: public LEX_CSTRING
{
char cnv[32];
- if ((cs->state & MY_CS_NONASCII) != 0)
+public:
+ TemporalAsciiBuffer(const char *str, size_t length, CHARSET_INFO *cs)
{
- length= to_ascii(cs, str, length, cnv, sizeof(cnv));
- str= cnv;
+ if ((cs->state & MY_CS_NONASCII) != 0)
+ {
+ LEX_CSTRING::str= cnv;
+ LEX_CSTRING::length= to_ascii(cs, str, length, cnv, sizeof(cnv));
+ }
+ else
+ {
+ LEX_CSTRING::str= str;
+ LEX_CSTRING::length= length;
+ }
}
- return str_to_time(str, length, l_time, fuzzydate, status);
+};
+
+
+/* Character set-aware version of ascii_to_datetime_or_date_or_time() */
+bool Temporal::str_to_datetime_or_date_or_time(THD *thd, MYSQL_TIME_STATUS *st,
+ const char *str, size_t length,
+ CHARSET_INFO *cs,
+ date_mode_t fuzzydate)
+{
+ TemporalAsciiBuffer tmp(str, length, cs);
+ return ascii_to_datetime_or_date_or_time(st, tmp.str, tmp.length, fuzzydate)||
+ add_nanoseconds(thd, &st->warnings, fuzzydate, st->nanoseconds);
}
-/* Character set-aware version of str_to_datetime() */
-bool str_to_datetime(CHARSET_INFO *cs, const char *str, size_t length,
- MYSQL_TIME *l_time, ulonglong flags,
- MYSQL_TIME_STATUS *status)
+/* Character set-aware version of str_to_datetime_or_date() */
+bool Temporal::str_to_datetime_or_date(THD *thd, MYSQL_TIME_STATUS *status,
+ const char *str, size_t length,
+ CHARSET_INFO *cs,
+ date_mode_t flags)
{
- char cnv[32];
- if ((cs->state & MY_CS_NONASCII) != 0)
- {
- length= to_ascii(cs, str, length, cnv, sizeof(cnv));
- str= cnv;
- }
- return str_to_datetime(str, length, l_time, flags, status);
+ TemporalAsciiBuffer tmp(str, length, cs);
+ return ascii_to_datetime_or_date(status, tmp.str, tmp.length, flags) ||
+ add_nanoseconds(thd, &status->warnings, flags, status->nanoseconds);
+}
+
+
+/* Character set-aware version of ascii_to_temporal() */
+bool Temporal::str_to_temporal(THD *thd, MYSQL_TIME_STATUS *status,
+ const char *str, size_t length, CHARSET_INFO *cs,
+ date_mode_t flags)
+{
+ TemporalAsciiBuffer tmp(str, length, cs);
+ return ascii_to_temporal(status, tmp.str, tmp.length, flags) ||
+ add_nanoseconds(thd, &status->warnings, flags, status->nanoseconds);
+}
+
+
+/* Character set-aware version of str_to_DDhhmmssff() */
+bool Interval_DDhhmmssff::str_to_DDhhmmssff(MYSQL_TIME_STATUS *status,
+ const char *str, size_t length,
+ CHARSET_INFO *cs, ulong max_hour)
+{
+ TemporalAsciiBuffer tmp(str, length, cs);
+ bool rc= ::str_to_DDhhmmssff(tmp.str, tmp.length, this, UINT_MAX32, status);
+ DBUG_ASSERT(status->warnings || !rc);
+ return rc;
}
@@ -386,127 +422,59 @@ bool str_to_datetime(CHARSET_INFO *cs, const char *str, size_t length,
if string was truncated during conversion.
NOTE
- See description of str_to_datetime() for more information.
+ See description of str_to_datetime_xxx() for more information.
*/
bool
-str_to_datetime_with_warn(CHARSET_INFO *cs,
- const char *str, size_t length, MYSQL_TIME *l_time,
- ulonglong flags)
+str_to_datetime_with_warn(THD *thd, CHARSET_INFO *cs,
+ const char *str, size_t length, MYSQL_TIME *to,
+ date_mode_t mode)
{
- MYSQL_TIME_STATUS status;
- THD *thd= current_thd;
- bool ret_val= str_to_datetime(cs, str, length, l_time, flags, &status);
- if (ret_val || status.warnings)
- make_truncated_value_warning(thd,
- ret_val ? Sql_condition::WARN_LEVEL_WARN :
- Sql_condition::time_warn_level(status.warnings),
- str, length, flags & TIME_TIME_ONLY ?
- MYSQL_TIMESTAMP_TIME : l_time->time_type,
- NULL, NULL, NULL);
- DBUG_EXECUTE_IF("str_to_datetime_warn",
- push_warning(thd, Sql_condition::WARN_LEVEL_NOTE,
- ER_YES, str););
- return ret_val;
+ Temporal::Warn_push warn(thd, nullptr, nullptr, nullptr, to, mode);
+ Temporal_hybrid *t= new(to) Temporal_hybrid(thd, &warn, str, length, cs, mode);
+ return !t->is_valid_temporal();
}
-/**
- converts a pair of numbers (integer part, microseconds) to MYSQL_TIME
-
- @param neg sign of the time value
- @param nr integer part of the number to convert
- @param sec_part microsecond part of the number
- @param ltime converted value will be written here
- @param fuzzydate conversion flags (TIME_INVALID_DATE, etc)
- @param str original number, as an ErrConv. For the warning
- @param field_name field name or NULL if not a field. For the warning
-
- @returns 0 for success, 1 for a failure
-*/
-static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part,
- MYSQL_TIME *ltime, ulonglong fuzzydate,
- const ErrConv *str,
- const TABLE_SHARE *s, const char *field_name)
-{
- int was_cut;
- longlong res;
- enum_mysql_timestamp_type ts_type;
- bool have_warnings= false;
-
- if (fuzzydate & TIME_TIME_ONLY)
- {
- fuzzydate= TIME_TIME_ONLY; // clear other flags
- ts_type= MYSQL_TIMESTAMP_TIME;
- res= number_to_time(neg, nr, sec_part, ltime, &was_cut);
- have_warnings= MYSQL_TIME_WARN_HAVE_WARNINGS(was_cut);
- }
- else
- {
- ts_type= MYSQL_TIMESTAMP_DATETIME;
- if (neg)
- {
- res= -1;
- }
- else
- {
- res= number_to_datetime(nr, sec_part, ltime, fuzzydate, &was_cut);
- have_warnings= was_cut && (fuzzydate & TIME_NO_ZERO_IN_DATE);
- }
- }
-
- if (res < 0 || have_warnings)
- {
- make_truncated_value_warning(current_thd,
- Sql_condition::WARN_LEVEL_WARN, str,
- res < 0 ? MYSQL_TIMESTAMP_ERROR : ts_type,
- s ? s->db.str : NULL,
- s ? s->table_name.str : NULL, field_name);
- }
- return res < 0;
-}
-
-
-bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime,
- ulonglong fuzzydate,
+bool double_to_datetime_with_warn(THD *thd, double value, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *field_name)
{
- const ErrConvDouble str(value);
- bool neg= value < 0;
-
- if (neg)
- value= -value;
-
- if (value > static_cast<double>(LONGLONG_MAX))
- value= static_cast<double>(LONGLONG_MAX);
-
- longlong nr= static_cast<ulonglong>(floor(value));
- uint sec_part= static_cast<ulong>((value - floor(value))*TIME_SECOND_PART_FACTOR);
- return number_to_time_with_warn(neg, nr, sec_part, ltime, fuzzydate, &str,
- s, field_name);
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name, ltime, fuzzydate);
+ Temporal_hybrid *t= new (ltime) Temporal_hybrid(thd, &warn, value, fuzzydate);
+ return !t->is_valid_temporal();
}
-bool decimal_to_datetime_with_warn(const my_decimal *value, MYSQL_TIME *ltime,
- ulonglong fuzzydate,
+bool decimal_to_datetime_with_warn(THD *thd, const my_decimal *value,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *field_name)
{
- const ErrConvDecimal str(value);
- ulonglong nr;
- ulong sec_part;
- bool neg= my_decimal2seconds(value, &nr, &sec_part);
- return number_to_time_with_warn(neg, nr, sec_part, ltime, fuzzydate, &str,
- s, field_name);
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name, ltime, fuzzydate);
+ Temporal_hybrid *t= new (ltime) Temporal_hybrid(thd, &warn, value, fuzzydate);
+ return !t->is_valid_temporal();
}
-bool int_to_datetime_with_warn(bool neg, ulonglong value, MYSQL_TIME *ltime,
- ulonglong fuzzydate,
+bool int_to_datetime_with_warn(THD *thd, const Longlong_hybrid &nr,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *field_name)
{
- const ErrConvInteger str(neg ? - (longlong) value : (longlong) value, !neg);
- return number_to_time_with_warn(neg, value, 0, ltime,
- fuzzydate, &str, s, field_name);
+ /*
+ Note: conversion from an integer to TIME can overflow to '838:59:59.999999',
+ so the conversion result can have fractional digits.
+ */
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name, ltime, fuzzydate);
+ Temporal_hybrid *t= new (ltime) Temporal_hybrid(thd, &warn, nr, fuzzydate);
+ return !t->is_valid_temporal();
}
@@ -553,7 +521,7 @@ void localtime_to_TIME(MYSQL_TIME *to, struct tm *from)
}
-void calc_time_from_sec(MYSQL_TIME *to, long seconds, long microseconds)
+void calc_time_from_sec(MYSQL_TIME *to, ulong seconds, ulong microseconds)
{
long t_seconds;
// to->neg is not cleared, it may already be set to a useful value
@@ -937,47 +905,10 @@ void make_truncated_value_warning(THD *thd,
const char *db_name, const char *table_name,
const char *field_name)
{
- char warn_buff[MYSQL_ERRMSG_SIZE];
- const char *type_str;
- CHARSET_INFO *cs= &my_charset_latin1;
-
- switch (time_type) {
- case MYSQL_TIMESTAMP_DATE:
- type_str= "date";
- break;
- case MYSQL_TIMESTAMP_TIME:
- type_str= "time";
- break;
- case MYSQL_TIMESTAMP_DATETIME: // FALLTHROUGH
- default:
- type_str= "datetime";
- break;
- }
- if (field_name)
- {
- if (!db_name)
- db_name= "";
- if (!table_name)
- table_name= "";
-
- cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
- ER_THD(thd, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
- type_str, sval->ptr(),
- db_name, table_name, field_name,
- (ulong) thd->get_stmt_da()->current_row_for_warning());
- }
- else
- {
- if (time_type > MYSQL_TIMESTAMP_ERROR)
- cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
- ER_THD(thd, ER_TRUNCATED_WRONG_VALUE),
- type_str, sval->ptr());
- else
- cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
- ER_THD(thd, ER_WRONG_VALUE), type_str, sval->ptr());
- }
- push_warning(thd, level,
- ER_TRUNCATED_WRONG_VALUE, warn_buff);
+ const char *type_str= Temporal::type_name_by_timestamp_type(time_type);
+ return thd->push_warning_wrong_or_truncated_value
+ (level, time_type <= MYSQL_TIMESTAMP_ERROR, type_str, sval->ptr(),
+ db_name, table_name, field_name);
}
@@ -988,8 +919,8 @@ void make_truncated_value_warning(THD *thd,
(X)->second_part)
#define GET_PART(X, N) X % N ## LL; X/= N ## LL
-bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type,
- const INTERVAL &interval)
+bool date_add_interval(THD *thd, MYSQL_TIME *ltime, interval_type int_type,
+ const INTERVAL &interval, bool push_warn)
{
long period, sign;
@@ -1102,8 +1033,8 @@ bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type,
return 0; // Ok
invalid_date:
+ if (push_warn)
{
- THD *thd= current_thd;
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_DATETIME_FUNCTION_OVERFLOW,
ER_THD(thd, ER_DATETIME_FUNCTION_OVERFLOW),
@@ -1143,7 +1074,7 @@ null_date:
bool
calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
- int l_sign, longlong *seconds_out, long *microseconds_out)
+ int l_sign, ulonglong *seconds_out, ulong *microseconds_out)
{
long days;
bool neg;
@@ -1170,10 +1101,10 @@ calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
}
microseconds= ((longlong)days * SECONDS_IN_24H +
- (longlong)(l_time1->hour*3600L +
+ (longlong)(l_time1->hour*3600LL +
l_time1->minute*60L +
l_time1->second) -
- l_sign*(longlong)(l_time2->hour*3600L +
+ l_sign*(longlong)(l_time2->hour*3600LL +
l_time2->minute*60L +
l_time2->second)) * 1000000LL +
(longlong)l_time1->second_part -
@@ -1185,17 +1116,17 @@ calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
microseconds= -microseconds;
neg= 1;
}
- *seconds_out= microseconds/1000000L;
- *microseconds_out= (long) (microseconds%1000000L);
+ *seconds_out= (ulonglong) microseconds/1000000L;
+ *microseconds_out= (ulong) (microseconds%1000000L);
return neg;
}
bool calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
- int l_sign, MYSQL_TIME *l_time3, ulonglong fuzzydate)
+ int l_sign, MYSQL_TIME *l_time3, date_mode_t fuzzydate)
{
- longlong seconds;
- long microseconds;
+ ulonglong seconds;
+ ulong microseconds;
bzero((char *) l_time3, sizeof(*l_time3));
l_time3->neg= calc_time_diff(l_time1, l_time2, l_sign,
&seconds, &microseconds);
@@ -1214,7 +1145,7 @@ bool calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
("invalid" means > TIME_MAX_SECOND)
*/
set_if_smaller(seconds, INT_MAX32);
- calc_time_from_sec(l_time3, (long) seconds, microseconds);
+ calc_time_from_sec(l_time3, (ulong) seconds, microseconds);
return ((fuzzydate & TIME_NO_ZERO_DATE) && (seconds == 0) &&
(microseconds == 0));
}
@@ -1271,56 +1202,6 @@ bool time_to_datetime(MYSQL_TIME *ltime)
}
-/**
- Return a valid DATE or DATETIME value from an arbitrary MYSQL_TIME.
- If ltime is TIME, it's first converted to DATETIME.
- If ts_type is DATE, hhmmss is set to zero.
- The date part of the result is checked against fuzzy_date.
-
- @param ltime The value to convert.
- @param fuzzy_date Flags to check date.
- @param ts_type The type to convert to.
- @return false on success, true of error (negative time).*/
-bool
-make_date_with_warn(MYSQL_TIME *ltime, ulonglong fuzzy_date,
- timestamp_type ts_type)
-{
- DBUG_ASSERT(ts_type == MYSQL_TIMESTAMP_DATE ||
- ts_type == MYSQL_TIMESTAMP_DATETIME);
- if (ltime->time_type == MYSQL_TIMESTAMP_TIME && time_to_datetime(ltime))
- {
- /* e.g. negative time */
- ErrConvTime str(ltime);
- make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
- &str, ts_type, NULL, NULL, NULL);
- return true;
- }
- if ((ltime->time_type= ts_type) == MYSQL_TIMESTAMP_DATE)
- ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0;
- return check_date_with_warn(ltime, fuzzy_date, ts_type);
-}
-
-
-/*
- Convert a TIME value to DAY-TIME interval, e.g. for extraction:
- EXTRACT(DAY FROM x), EXTRACT(HOUR FROM x), etc.
- Moves full days from ltime->hour to ltime->day.
- Note, time_type is set to MYSQL_TIMESTAMP_NONE, to make sure that
- the structure is not used for anything else other than extraction:
- non-extraction TIME functions expect zero day value!
-*/
-void time_to_daytime_interval(MYSQL_TIME *ltime)
-{
- DBUG_ASSERT(ltime->time_type == MYSQL_TIMESTAMP_TIME);
- DBUG_ASSERT(ltime->year == 0);
- DBUG_ASSERT(ltime->month == 0);
- DBUG_ASSERT(ltime->day == 0);
- ltime->day= ltime->hour / 24;
- ltime->hour%= 24;
- ltime->time_type= MYSQL_TIMESTAMP_NONE;
-}
-
-
/*** Conversion from TIME to DATETIME ***/
/*
@@ -1348,8 +1229,8 @@ mix_date_and_time_complex(MYSQL_TIME *ldate, const MYSQL_TIME *ltime)
{
DBUG_ASSERT(ldate->time_type == MYSQL_TIMESTAMP_DATE ||
ldate->time_type == MYSQL_TIMESTAMP_DATETIME);
- longlong seconds;
- long days, useconds;
+ ulonglong seconds;
+ ulong days, useconds;
int sign= ltime->neg ? 1 : -1;
ldate->neg= calc_time_diff(ldate, ltime, sign, &seconds, &useconds);
@@ -1439,7 +1320,7 @@ time_to_datetime(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to)
bool
time_to_datetime_with_warn(THD *thd,
const MYSQL_TIME *from, MYSQL_TIME *to,
- ulonglong fuzzydate)
+ date_conv_mode_t fuzzydate)
{
int warn= 0;
DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_TIME);
@@ -1455,34 +1336,13 @@ time_to_datetime_with_warn(THD *thd,
check_date(to, fuzzydate, &warn)))
{
ErrConvTime str(from);
- make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN,
- &str, MYSQL_TIMESTAMP_DATETIME, NULL, NULL, NULL);
+ thd->push_warning_truncated_wrong_value("datetime", str.ptr());
return true;
}
return false;
}
-bool datetime_to_time_with_warn(THD *thd, const MYSQL_TIME *dt,
- MYSQL_TIME *tm, uint dec)
-{
- if (thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST)
- {
- *tm= *dt;
- datetime_to_time(tm);
- return false;
- }
- else /* new mode */
- {
- MYSQL_TIME current_date;
- set_current_date(thd, &current_date);
- calc_time_diff(dt, &current_date, 1, tm, 0);
- }
- int warnings= 0;
- return check_time_range(tm, dec, &warnings);
-}
-
-
longlong pack_time(const MYSQL_TIME *my_time)
{
return ((((((my_time->year * 13ULL +
diff --git a/sql/sql_time.h b/sql/sql_time.h
index a0eea359c6a..c918eb6d807 100644
--- a/sql/sql_time.h
+++ b/sql/sql_time.h
@@ -17,6 +17,7 @@
#ifndef SQL_TIME_INCLUDED
#define SQL_TIME_INCLUDED
+#include "sql_basic_types.h"
#include "my_time.h"
#include "mysql_time.h" /* timestamp_type */
#include "sql_error.h" /* Sql_condition */
@@ -35,69 +36,28 @@ ulong convert_period_to_month(ulong period);
ulong convert_month_to_period(ulong month);
void set_current_date(THD *thd, MYSQL_TIME *to);
bool time_to_datetime(MYSQL_TIME *ltime);
-void time_to_daytime_interval(MYSQL_TIME *l_time);
bool get_date_from_daynr(long daynr,uint *year, uint *month, uint *day);
my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, uint *error_code);
-bool str_to_datetime_with_warn(CHARSET_INFO *cs, const char *str, size_t length, MYSQL_TIME *l_time,
- ulonglong flags);
-bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime,
- ulonglong fuzzydate,
+bool str_to_datetime_with_warn(THD *thd,
+ CHARSET_INFO *cs, const char *str, size_t length,
+ MYSQL_TIME *l_time,
+ date_mode_t flags);
+bool double_to_datetime_with_warn(THD *thd, double value, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *name);
-bool decimal_to_datetime_with_warn(const my_decimal *value, MYSQL_TIME *ltime,
- ulonglong fuzzydate,
+bool decimal_to_datetime_with_warn(THD *thd,
+ const my_decimal *value, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *name);
-bool int_to_datetime_with_warn(bool neg, ulonglong value, MYSQL_TIME *ltime,
- ulonglong fuzzydate,
+bool int_to_datetime_with_warn(THD *thd, const Longlong_hybrid &nr,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *name);
bool time_to_datetime(THD *thd, const MYSQL_TIME *tm, MYSQL_TIME *dt);
bool time_to_datetime_with_warn(THD *thd,
const MYSQL_TIME *tm, MYSQL_TIME *dt,
- ulonglong fuzzydate);
-/*
- Simply truncate the YYYY-MM-DD part to 0000-00-00
- and change time_type to MYSQL_TIMESTAMP_TIME
-*/
-inline void datetime_to_time(MYSQL_TIME *ltime)
-{
- DBUG_ASSERT(ltime->time_type == MYSQL_TIMESTAMP_DATE ||
- ltime->time_type == MYSQL_TIMESTAMP_DATETIME);
- DBUG_ASSERT(ltime->neg == 0);
- ltime->year= ltime->month= ltime->day= 0;
- ltime->time_type= MYSQL_TIMESTAMP_TIME;
-}
-
-
-/**
- Convert DATE/DATETIME to TIME(dec)
- using CURRENT_DATE in a non-old mode,
- or using simple truncation in old mode (OLD_MODE_ZERO_DATE_TIME_CAST).
-
- @param thd - the thread to get the variables.old_behaviour value from
- @param dt - the DATE of DATETIME value to convert
- @param[out] tm - store result here
- @param dec - the desired scale. The fractional part of the result
- is checked according to this parameter before returning
- the conversion result. "dec" is important in the corner
- cases near the max/min limits.
- If the result is '838:59:59.999999' and the desired scale
- is less than 6, an error is returned.
- Note, dec is not important in the
- OLD_MODE_ZERO_DATE_TIME_CAST old mode.
-
- - in case of OLD_MODE_ZERO_DATE_TIME_CAST
- the TIME part is simply truncated and "false" is returned.
- - otherwise, the result is calculated effectively similar to:
- TIMEDIFF(dt, CAST(CURRENT_DATE AS DATETIME))
- If the difference fits into the supported TIME range, "false" is returned,
- otherwise a warning is issued and "true" is returned.
-
- @return false - on success
- @return true - on error
-*/
-bool datetime_to_time_with_warn(THD *, const MYSQL_TIME *dt,
- MYSQL_TIME *tm, uint dec);
-
+ date_conv_mode_t fuzzydate);
inline void datetime_to_date(MYSQL_TIME *ltime)
{
@@ -121,17 +81,6 @@ void make_truncated_value_warning(THD *thd,
const char *db_name, const char *table_name,
const char *field_name);
-static inline void make_truncated_value_warning(THD *thd,
- Sql_condition::enum_warning_level level, const char *str_val,
- size_t str_length, timestamp_type time_type,
- const char *db_name, const char *table_name,
- const char *field_name)
-{
- const ErrConvString str(str_val, str_length, &my_charset_bin);
- make_truncated_value_warning(thd, level, &str, time_type, db_name, table_name,
- field_name);
-}
-
extern DATE_TIME_FORMAT *date_time_format_make(timestamp_type format_type,
const char *format_str,
uint format_length);
@@ -142,10 +91,10 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
bool my_TIME_to_str(const MYSQL_TIME *ltime, String *str, uint dec);
/* MYSQL_TIME operations */
-bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type,
- const INTERVAL &interval);
+bool date_add_interval(THD *thd, MYSQL_TIME *ltime, interval_type int_type,
+ const INTERVAL &interval, bool push_warn= true);
bool calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
- int l_sign, longlong *seconds_out, long *microseconds_out);
+ int l_sign, ulonglong *seconds_out, ulong *microseconds_out);
int append_interval(String *str, interval_type int_type,
const INTERVAL &interval);
/**
@@ -171,26 +120,17 @@ int append_interval(String *str, interval_type int_type,
@return false - otherwise
*/
bool calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
- int lsign, MYSQL_TIME *l_time3, ulonglong fuzzydate);
+ int lsign, MYSQL_TIME *l_time3, date_mode_t fuzzydate);
int my_time_compare(const MYSQL_TIME *a, const MYSQL_TIME *b);
void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);
-void calc_time_from_sec(MYSQL_TIME *to, long seconds, long microseconds);
-uint calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year);
+void calc_time_from_sec(MYSQL_TIME *to, ulong seconds, ulong microseconds);
+uint calc_week(const MYSQL_TIME *l_time, uint week_behaviour, uint *year);
int calc_weekday(long daynr,bool sunday_first_day_of_week);
bool parse_date_time_format(timestamp_type format_type,
const char *format, uint format_length,
DATE_TIME_FORMAT *date_time_format);
-/* Character set-aware version of str_to_time() */
-bool str_to_time(CHARSET_INFO *cs, const char *str,size_t length,
- MYSQL_TIME *l_time, ulonglong fuzzydate,
- MYSQL_TIME_STATUS *status);
-/* Character set-aware version of str_to_datetime() */
-bool str_to_datetime(CHARSET_INFO *cs,
- const char *str, size_t length,
- MYSQL_TIME *l_time, ulonglong flags,
- MYSQL_TIME_STATUS *status);
/* convenience wrapper */
inline bool parse_date_time_format(timestamp_type format_type,
@@ -227,15 +167,21 @@ non_zero_date(const MYSQL_TIME *ltime)
non_zero_hhmmssuu(ltime));
}
static inline bool
-check_date(const MYSQL_TIME *ltime, ulonglong flags, int *was_cut)
+check_date(const MYSQL_TIME *ltime, date_conv_mode_t flags, int *was_cut)
{
- return check_date(ltime, non_zero_date(ltime), flags, was_cut);
+ return check_date(ltime, non_zero_date(ltime),
+ ulonglong(flags & TIME_MODE_FOR_XXX_TO_DATE), was_cut);
}
-bool check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date,
- timestamp_type ts_type);
-bool make_date_with_warn(MYSQL_TIME *ltime,
- ulonglong fuzzy_date, timestamp_type ts_type);
-bool adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec);
+bool check_date_with_warn(THD *thd, const MYSQL_TIME *ltime,
+ date_conv_mode_t fuzzy_date, timestamp_type ts_type);
+static inline bool
+check_date_with_warn(THD *thd, const MYSQL_TIME *ltime,
+ date_mode_t fuzzydate, timestamp_type ts_type)
+{
+ return check_date_with_warn(thd, ltime, date_conv_mode_t(fuzzydate), ts_type);
+}
+
+bool adjust_time_range_with_warn(THD *thd, MYSQL_TIME *ltime, uint dec);
longlong pack_time(const MYSQL_TIME *my_time);
void unpack_time(longlong packed, MYSQL_TIME *my_time,
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 247055d397c..fe10adb0417 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -34,19 +34,10 @@
#include "sql_handler.h" // mysql_ha_rm_tables
#include "sp_cache.h" // sp_invalidate_cache
#include <mysys_err.h>
-#ifdef WITH_WSREP
#include "debug_sync.h"
-#endif /* WITH_WSREP */
-
-LEX_CSTRING *make_lex_string(LEX_CSTRING *lex_str,
- const char* str, size_t length,
- MEM_ROOT *mem_root)
-{
- if (!(lex_str->str= strmake_root(mem_root, str, length)))
- return 0;
- lex_str->length= length;
- return lex_str;
-}
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif
/*************************************************************************/
@@ -304,7 +295,7 @@ class Deprecated_trigger_syntax_handler : public Internal_error_handler
private:
char m_message[MYSQL_ERRMSG_SIZE];
- LEX_CSTRING *m_trigger_name;
+ const LEX_CSTRING *m_trigger_name;
public:
@@ -320,8 +311,23 @@ public:
if (sql_errno != EE_OUTOFMEMORY &&
sql_errno != ER_OUT_OF_RESOURCES)
{
+ // Check if the current LEX contains a non-empty spname
if(thd->lex->spname)
m_trigger_name= &thd->lex->spname->m_name;
+ else if (thd->lex->sphead)
+ {
+ /*
+ Some SP statements, for example IF, create their own local LEX.
+ All LEX instances are available in the LEX stack in sphead::m_lex.
+ Let's find the one that contains a non-zero spname.
+ Note, although a parse error has happened, the LEX instances
+ in sphead::m_lex are not freed yet at this point. The first
+ found non-zero spname contains the valid trigger name.
+ */
+ const sp_name *spname= thd->lex->sphead->find_spname_recursive();
+ if (spname)
+ m_trigger_name= &spname->m_name;
+ }
if (m_trigger_name)
my_snprintf(m_message, sizeof(m_message),
ER_THD(thd, ER_ERROR_IN_TRIGGER_BODY),
@@ -334,7 +340,7 @@ public:
return false;
}
- LEX_CSTRING *get_trigger_name() { return m_trigger_name; }
+ const LEX_CSTRING *get_trigger_name() { return m_trigger_name; }
char *get_error_message() { return m_message; }
};
@@ -410,6 +416,11 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
bool lock_upgrade_done= FALSE;
MDL_ticket *mdl_ticket= NULL;
Query_tables_list backup;
+ char path[FN_REFLEN + 1];
+ char engine_name_buf[NAME_CHAR_LEN + 1];
+ LEX_CSTRING engine_name= { engine_name_buf, 0 };
+ bool is_sequence= 0;
+
DBUG_ENTER("mysql_create_or_drop_trigger");
/* Charset of the buffer for statement must be system one. */
@@ -520,15 +531,17 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
}
#ifdef WITH_WSREP
- if (thd->wsrep_exec_mode == LOCAL_STATE)
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, tables);
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, tables);
#endif
/* We should have only one table in table list. */
DBUG_ASSERT(tables->next_global == 0);
- /* We do not allow creation of triggers on temporary tables. */
- if (create && thd->find_tmp_table_share(tables))
+ build_table_filename(path, sizeof(path) - 1, tables->db.str, tables->alias.str, ".frm", 0);
+ tables->required_type= dd_frm_type(NULL, path, &engine_name, &is_sequence);
+
+ /* We do not allow creation of triggers on temporary tables or sequence. */
+ if (is_sequence || (create && thd->find_tmp_table_share(tables)))
{
my_error(ER_TRG_ON_VIEW_OR_TEMP_TABLE, MYF(0), tables->alias.str);
goto end;
@@ -593,6 +606,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
STRING_WITH_LEN(act)));
};);
#endif /* WITH_WSREP */
+
result= (create ?
table->triggers->create_trigger(thd, tables, &stmt_query):
table->triggers->drop_trigger(thd, tables, &stmt_query));
@@ -635,9 +649,10 @@ end:
my_ok(thd);
DBUG_RETURN(result);
-
-WSREP_ERROR_LABEL:
+#ifdef WITH_WSREP
+wsrep_error_label:
DBUG_RETURN(true);
+#endif
}
@@ -1501,7 +1516,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db,
if (unlikely(parse_error))
{
- LEX_CSTRING *name;
+ const LEX_CSTRING *name;
/*
In case of errors, disable all triggers for the table, but keep
@@ -1515,8 +1530,8 @@ bool Table_triggers_list::check_n_load(THD *thd, const LEX_CSTRING *db,
if (likely((name= error_handler.get_trigger_name())))
{
- if (unlikely(!(make_lex_string(&trigger->name, name->str,
- name->length, &table->mem_root))))
+ trigger->name= safe_lexcstrdup_root(&table->mem_root, *name);
+ if (unlikely(!trigger->name.str))
goto err_with_lex_cleanup;
}
trigger->definer= ((!trg_definer || !trg_definer->length) ?
@@ -2325,12 +2340,10 @@ void Table_triggers_list::mark_fields_used(trg_event_type event)
if (trg_field->field_idx != (uint)-1)
{
DBUG_PRINT("info", ("marking field: %d", trg_field->field_idx));
- bitmap_set_bit(trigger_table->read_set, trg_field->field_idx);
if (trg_field->get_settable_routine_parameter())
bitmap_set_bit(trigger_table->write_set, trg_field->field_idx);
- if (trigger_table->field[trg_field->field_idx]->vcol_info)
- trigger_table->mark_virtual_col(trigger_table->
- field[trg_field->field_idx]);
+ trigger_table->mark_column_with_deps(
+ trigger_table->field[trg_field->field_idx]);
}
}
}
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc
index 96e55bf4588..62f6f8a3f90 100644
--- a/sql/sql_truncate.cc
+++ b/sql/sql_truncate.cc
@@ -271,6 +271,9 @@ Sql_cmd_truncate_table::handler_truncate(THD *thd, TABLE_LIST *table_ref,
bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
bool *hton_can_recreate)
{
+ handlerton *hton;
+ bool versioned;
+ bool sequence= false;
TABLE *table= NULL;
DBUG_ENTER("Sql_cmd_truncate_table::lock_table");
@@ -298,43 +301,43 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
table_ref->table_name.str, NULL)))
DBUG_RETURN(TRUE);
- *hton_can_recreate= ha_check_storage_engine_flag(table->file->ht,
- HTON_CAN_RECREATE);
+ versioned= table->versioned();
+ hton= table->file->ht;
table_ref->mdl_request.ticket= table->mdl_ticket;
}
else
{
- handlerton *hton;
- bool is_sequence;
-
- /* Acquire an exclusive lock. */
DBUG_ASSERT(table_ref->next_global == NULL);
if (lock_table_names(thd, table_ref, NULL,
thd->variables.lock_wait_timeout, 0))
DBUG_RETURN(TRUE);
- if (!ha_table_exists(thd, &table_ref->db, &table_ref->table_name,
- &hton, &is_sequence) ||
- hton == view_pseudo_hton)
+ TABLE_SHARE *share= tdc_acquire_share(thd, table_ref, GTS_TABLE | GTS_VIEW);
+ if (share == NULL)
+ DBUG_RETURN(TRUE);
+ DBUG_ASSERT(share != UNUSABLE_TABLE_SHARE);
+
+ versioned= share->versioned;
+ sequence= share->table_type == TABLE_TYPE_SEQUENCE;
+ hton= share->db_type();
+
+ tdc_release_share(share);
+
+ if (hton == view_pseudo_hton)
{
my_error(ER_NO_SUCH_TABLE, MYF(0), table_ref->db.str,
table_ref->table_name.str);
DBUG_RETURN(TRUE);
}
+ }
- if (!hton)
- {
- /*
- The table exists, but its storage engine is unknown, perhaps not
- loaded at the moment. We need to open and parse the frm to know the
- storage engine in question, so let's proceed with the truncation and
- try to open the table. This will produce the correct error message
- about unknown engine.
- */
- *hton_can_recreate= false;
- }
- else
- *hton_can_recreate= !is_sequence && hton->flags & HTON_CAN_RECREATE;
+ *hton_can_recreate= !sequence
+ && ha_check_storage_engine_flag(hton, HTON_CAN_RECREATE);
+
+ if (versioned)
+ {
+ my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "TRUNCATE TABLE");
+ DBUG_RETURN(TRUE);
}
/*
@@ -412,9 +415,26 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref)
{
bool hton_can_recreate;
- if (WSREP(thd) &&
- wsrep_to_isolation_begin(thd, table_ref->db.str, table_ref->table_name.str, 0))
- DBUG_RETURN(TRUE);
+#ifdef WITH_WSREP
+ if (WSREP(thd) && wsrep_thd_is_local(thd))
+ {
+ wsrep::key_array keys;
+ /* Do not start TOI if table is not found */
+ if (!wsrep_append_fk_parent_table(thd, table_ref, &keys))
+ {
+ if (keys.empty())
+ {
+ if (wsrep_to_isolation_begin(thd, table_ref->db.str, table_ref->table_name.str, NULL))
+ DBUG_RETURN(TRUE);
+ }
+ else
+ {
+ if (wsrep_to_isolation_begin(thd, NULL, NULL, table_ref, NULL, &keys))
+ DBUG_RETURN(TRUE);
+ }
+ }
+ }
+#endif /* WITH_WSREP */
if (lock_table(thd, table_ref, &hton_can_recreate))
DBUG_RETURN(TRUE);
@@ -499,7 +519,7 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref)
bool Sql_cmd_truncate_table::execute(THD *thd)
{
bool res= TRUE;
- TABLE_LIST *table= thd->lex->select_lex.table_list.first;
+ TABLE_LIST *table= thd->lex->first_select_lex()->table_list.first;
DBUG_ENTER("Sql_cmd_truncate_table::execute");
if (check_one_table_access(thd, DROP_ACL, table))
diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc
index 13efd973326..72d53b2307c 100644
--- a/sql/sql_tvc.cc
+++ b/sql/sql_tvc.cc
@@ -181,7 +181,7 @@ bool get_type_attributes_for_tvc(THD *thd,
Item *item;
for (uint holder_pos= 0 ; (item= it++); holder_pos++)
{
- DBUG_ASSERT(item->fixed);
+ DBUG_ASSERT(item->is_fixed());
holders[holder_pos].add_argument(item);
}
}
@@ -257,7 +257,6 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl,
Item_type_holder(thd, item, holders[pos].type_handler(),
&holders[pos]/*Type_all_attributes*/,
holders[pos].get_maybe_null());
- new_holder->fix_fields(thd, 0);
sl->item_list.push_back(new_holder);
}
if (arena)
@@ -281,7 +280,7 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl,
for (; order; order=order->next)
{
Item *order_item= *order->item;
- if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item())
+ if (order_item->is_order_clause_position())
{
uint count= 0;
if (order->counter_used)
@@ -333,7 +332,7 @@ int table_value_constr::save_explain_data_intern(THD *thd,
explain->select_id= select_lex->select_number;
explain->select_type= select_lex->type;
- explain->linkage= select_lex->linkage;
+ explain->linkage= select_lex->get_linkage();
explain->using_temporary= false;
explain->using_filesort= false;
/* Setting explain->message means that all other members are invalid */
@@ -407,9 +406,11 @@ bool table_value_constr::exec(SELECT_LEX *sl)
while ((elem= li++))
{
+ THD *cur_thd= sl->parent_lex->thd;
if (send_records >= sl->master_unit()->select_limit_cnt)
break;
int rc= result->send_data(*elem);
+ cur_thd->get_stmt_da()->inc_current_row_for_warning();
if (!rc)
send_records++;
else if (rc > 0)
@@ -624,8 +625,8 @@ static bool create_tvc_name(THD *thd, st_select_lex *parent_select,
bool table_value_constr::to_be_wrapped_as_with_tail()
{
- return select_lex->master_unit()->first_select()->next_select() &&
- select_lex->order_list.elements && select_lex->explicit_limit;
+ return select_lex->master_unit()->first_select()->next_select() &&
+ select_lex->order_list.elements && select_lex->explicit_limit;
}
@@ -676,7 +677,7 @@ st_select_lex *wrap_tvc(THD *thd, st_select_lex *tvc_sl,
wrapper_sl->nest_level= tvc_sl->nest_level;
wrapper_sl->parsing_place= tvc_sl->parsing_place;
- wrapper_sl->linkage= tvc_sl->linkage;
+ wrapper_sl->set_linkage(tvc_sl->get_linkage());
wrapper_sl->exclude_from_table_unique_test=
tvc_sl->exclude_from_table_unique_test;
@@ -709,7 +710,7 @@ st_select_lex *wrap_tvc(THD *thd, st_select_lex *tvc_sl,
the derived table tvc_x of the transformation
*/
derived_unit->add_slave(tvc_sl);
- tvc_sl->linkage= DERIVED_TABLE_TYPE;
+ tvc_sl->set_linkage(DERIVED_TABLE_TYPE);
/*
Generate the name of the derived table created for TVC and
@@ -954,7 +955,7 @@ Item *Item_func_in::in_predicate_to_in_subs_transformer(THD *thd,
mysql_init_select(lex);
tvc_select= lex->current_select;
derived_unit= tvc_select->master_unit();
- tvc_select->linkage= DERIVED_TABLE_TYPE;
+ tvc_select->set_linkage(DERIVED_TABLE_TYPE);
/* Create TVC used in the transformation */
if (create_value_list_for_tvc(thd, &values))
diff --git a/sql/sql_type.cc b/sql/sql_type.cc
index df9ac28bab6..a9610195e65 100644
--- a/sql/sql_type.cc
+++ b/sql/sql_type.cc
@@ -22,11 +22,19 @@
#include "sql_string.h"
#include "item.h"
#include "log.h"
+#include "tztime.h"
+
+const DTCollation &DTCollation_numeric::singleton()
+{
+ static const DTCollation_numeric tmp;
+ return tmp;
+}
Type_handler_row type_handler_row;
Type_handler_null type_handler_null;
+Type_handler_bool type_handler_bool;
Type_handler_tiny type_handler_tiny;
Type_handler_short type_handler_short;
Type_handler_long type_handler_long;
@@ -42,6 +50,7 @@ Type_handler_olddecimal type_handler_olddecimal;
Type_handler_newdecimal type_handler_newdecimal;
Type_handler_year type_handler_year;
+Type_handler_year type_handler_year2;
Type_handler_time type_handler_time;
Type_handler_date type_handler_date;
Type_handler_timestamp type_handler_timestamp;
@@ -57,6 +66,7 @@ Type_handler_set type_handler_set;
Type_handler_string type_handler_string;
Type_handler_var_string type_handler_var_string;
Type_handler_varchar type_handler_varchar;
+Type_handler_hex_hybrid type_handler_hex_hybrid;
static Type_handler_varchar_compressed type_handler_varchar_compressed;
Type_handler_tiny_blob type_handler_tiny_blob;
@@ -65,6 +75,8 @@ Type_handler_long_blob type_handler_long_blob;
Type_handler_blob type_handler_blob;
static Type_handler_blob_compressed type_handler_blob_compressed;
+Type_handler_interval_DDhhmmssff type_handler_interval_DDhhmmssff;
+
#ifdef HAVE_SPATIAL
Type_handler_geometry type_handler_geometry;
#endif
@@ -98,6 +110,9 @@ bool Type_handler_data::init()
&type_handler_geometry,
&type_handler_geometry) ||
m_type_aggregator_for_result.add(&type_handler_geometry,
+ &type_handler_hex_hybrid,
+ &type_handler_long_blob) ||
+ m_type_aggregator_for_result.add(&type_handler_geometry,
&type_handler_tiny_blob,
&type_handler_long_blob) ||
m_type_aggregator_for_result.add(&type_handler_geometry,
@@ -158,18 +173,723 @@ bool Float::to_string(String *val_buffer, uint dec) const
}
-void Time::make_from_item(Item *item, const Options opt)
+String_ptr::String_ptr(Item *item, String *buffer)
+ :m_string_ptr(item->val_str(buffer))
+{ }
+
+
+Ascii_ptr::Ascii_ptr(Item *item, String *buffer)
+ :String_ptr(item->val_str_ascii(buffer))
+{ }
+
+
+void VDec::set(Item *item)
+{
+ m_ptr= item->val_decimal(&m_buffer);
+ DBUG_ASSERT((m_ptr == NULL) == item->null_value);
+}
+
+
+VDec::VDec(Item *item)
+{
+ m_ptr= item->val_decimal(&m_buffer);
+ DBUG_ASSERT((m_ptr == NULL) == item->null_value);
+}
+
+
+VDec_op::VDec_op(Item_func_hybrid_field_type *item)
+{
+ m_ptr= item->decimal_op(&m_buffer);
+ DBUG_ASSERT((m_ptr == NULL) == item->null_value);
+}
+
+
+date_conv_mode_t Temporal::sql_mode_for_dates(THD *thd)
+{
+ return ::sql_mode_for_dates(thd);
+}
+
+
+time_round_mode_t Temporal::default_round_mode(THD *thd)
+{
+ return thd->temporal_round_mode();
+}
+
+
+time_round_mode_t Timestamp::default_round_mode(THD *thd)
+{
+ return thd->temporal_round_mode();
+}
+
+
+my_decimal *Temporal::to_decimal(my_decimal *to) const
+{
+ return date2my_decimal(this, to);
+}
+
+
+my_decimal *Temporal::bad_to_decimal(my_decimal *to) const
+{
+ my_decimal_set_zero(to);
+ return NULL;
+}
+
+
+void Temporal::make_from_str(THD *thd, Warn *warn,
+ const char *str, size_t length,
+ CHARSET_INFO *cs, date_mode_t fuzzydate)
+{
+ DBUG_EXECUTE_IF("str_to_datetime_warn",
+ push_warning(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_YES, ErrConvString(str, length,cs).ptr()););
+
+ if (str_to_temporal(thd, warn, str, length, cs, fuzzydate))
+ make_fuzzy_date(&warn->warnings, date_conv_mode_t(fuzzydate));
+ if (warn->warnings)
+ warn->set_str(str, length, &my_charset_bin);
+}
+
+
+Temporal_hybrid::Temporal_hybrid(THD *thd, Item *item, date_mode_t fuzzydate)
{
- if (item->get_date(this, opt.get_date_flags()))
+ if (item->get_date(thd, this, fuzzydate))
time_type= MYSQL_TIMESTAMP_NONE;
+}
+
+
+uint Timestamp::binary_length_to_precision(uint length)
+{
+ switch (length) {
+ case 4: return 0;
+ case 5: return 2;
+ case 6: return 4;
+ case 7: return 6;
+ }
+ DBUG_ASSERT(0);
+ return 0;
+}
+
+
+Timestamp::Timestamp(const Native &native)
+{
+ DBUG_ASSERT(native.length() >= 4 && native.length() <= 7);
+ uint dec= binary_length_to_precision(native.length());
+ my_timestamp_from_binary(this, (const uchar *) native.ptr(), dec);
+}
+
+
+bool Timestamp::to_native(Native *to, uint decimals) const
+{
+ uint len= my_timestamp_binary_length(decimals);
+ if (to->reserve(len))
+ return true;
+ my_timestamp_to_binary(this, (uchar *) to->ptr(), decimals);
+ to->length(len);
+ return false;
+}
+
+
+bool Timestamp::to_TIME(THD *thd, MYSQL_TIME *to, date_mode_t fuzzydate) const
+{
+ return thd->timestamp_to_TIME(to, tv_sec, tv_usec, fuzzydate);
+}
+
+
+Timestamp::Timestamp(THD *thd, const MYSQL_TIME *ltime, uint *error_code)
+ :Timeval(TIME_to_timestamp(thd, ltime, error_code), ltime->second_part)
+{ }
+
+
+Timestamp_or_zero_datetime::Timestamp_or_zero_datetime(THD *thd,
+ const MYSQL_TIME *ltime,
+ uint *error_code)
+ :Timestamp(thd, ltime, error_code),
+ m_is_zero_datetime(*error_code == ER_WARN_DATA_OUT_OF_RANGE)
+{
+ if (m_is_zero_datetime)
+ {
+ if (!non_zero_date(ltime))
+ *error_code= 0; // ltime was '0000-00-00 00:00:00'
+ }
+ else if (*error_code == ER_WARN_INVALID_TIMESTAMP)
+ *error_code= 0; // ltime fell into spring time gap, adjusted.
+}
+
+
+bool Timestamp_or_zero_datetime::to_TIME(THD *thd, MYSQL_TIME *to,
+ date_mode_t fuzzydate) const
+{
+ if (m_is_zero_datetime)
+ {
+ set_zero_time(to, MYSQL_TIMESTAMP_DATETIME);
+ return false;
+ }
+ return Timestamp::to_TIME(thd, to, fuzzydate);
+}
+
+
+bool Timestamp_or_zero_datetime::to_native(Native *to, uint decimals) const
+{
+ if (m_is_zero_datetime)
+ {
+ to->length(0);
+ return false;
+ }
+ return Timestamp::to_native(to, decimals);
+}
+
+
+int Timestamp_or_zero_datetime_native::save_in_field(Field *field,
+ uint decimals) const
+{
+ field->set_notnull();
+ if (field->type_handler()->type_handler_for_native_format() ==
+ &type_handler_timestamp2)
+ return field->store_native(*this);
+ if (is_zero_datetime())
+ {
+ static Datetime zero(Datetime::zero());
+ return field->store_time_dec(zero.get_mysql_time(), decimals);
+ }
+ return field->store_timestamp_dec(Timestamp(*this).tv(), decimals);
+}
+
+
+void Sec6::make_from_decimal(const my_decimal *d, ulong *nanoseconds)
+{
+ m_neg= my_decimal2seconds(d, &m_sec, &m_usec, nanoseconds);
+ m_truncated= (m_sec >= LONGLONG_MAX);
+}
+
+
+void Sec6::make_from_double(double nr, ulong *nanoseconds)
+{
+ if ((m_neg= nr < 0))
+ nr= -nr;
+ if ((m_truncated= nr > (double) LONGLONG_MAX))
+ {
+ m_sec= LONGLONG_MAX;
+ m_usec= 0;
+ *nanoseconds= 0;
+ }
else
- valid_MYSQL_TIME_to_valid_value(opt);
+ {
+ m_sec= (ulonglong) nr;
+ m_usec= (ulong) ((nr - floor(nr)) * 1000000000);
+ *nanoseconds= m_usec % 1000;
+ m_usec/= 1000;
+ }
+}
+
+
+void Sec6::make_truncated_warning(THD *thd, const char *type_str) const
+{
+ char buff[1 + MAX_BIGINT_WIDTH + 1 + 6 + 1]; // '-' int '.' frac '\0'
+ to_string(buff, sizeof(buff));
+ thd->push_warning_truncated_wrong_value(type_str, buff);
+}
+
+
+bool Sec6::convert_to_mysql_time(THD *thd, int *warn, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
+{
+ bool rc= fuzzydate & (TIME_INTERVAL_hhmmssff | TIME_INTERVAL_DAY) ?
+ to_datetime_or_to_interval_hhmmssff(ltime, warn) :
+ fuzzydate & TIME_TIME_ONLY ?
+ to_datetime_or_time(ltime, warn, date_conv_mode_t(fuzzydate)) :
+ to_datetime_or_date(ltime, warn, date_conv_mode_t(fuzzydate));
+ DBUG_ASSERT(*warn || !rc);
+ if (truncated())
+ *warn|= MYSQL_TIME_WARN_TRUNCATED;
+ return rc;
}
-void Temporal_with_date::make_from_item(THD *thd, Item *item, sql_mode_t flags)
+void Temporal::push_conversion_warnings(THD *thd, bool totally_useless_value,
+ int warn,
+ const char *typestr,
+ const char *db_name,
+ const char *table_name,
+ const char *field_name,
+ const char *value)
{
- flags&= ~TIME_TIME_ONLY;
+ if (MYSQL_TIME_WARN_HAVE_WARNINGS(warn))
+ thd->push_warning_wrong_or_truncated_value(Sql_condition::WARN_LEVEL_WARN,
+ totally_useless_value,
+ typestr, value,
+ db_name, table_name,
+ field_name);
+ else if (MYSQL_TIME_WARN_HAVE_NOTES(warn))
+ thd->push_warning_wrong_or_truncated_value(Sql_condition::WARN_LEVEL_NOTE,
+ false, typestr, value,
+ db_name, table_name,
+ field_name);
+}
+
+
+VSec9::VSec9(THD *thd, Item *item, const char *type_str, ulonglong limit)
+{
+ if (item->decimals == 0)
+ { // optimize for an important special case
+ Longlong_hybrid nr(item->val_int(), item->unsigned_flag);
+ make_from_int(nr);
+ m_is_null= item->null_value;
+ if (!m_is_null && m_sec > limit)
+ {
+ m_sec= limit;
+ m_truncated= true;
+ ErrConvInteger err(nr);
+ thd->push_warning_truncated_wrong_value(type_str, err.ptr());
+ }
+ }
+ else if (item->cmp_type() == REAL_RESULT)
+ {
+ double nr= item->val_real();
+ make_from_double(nr, &m_nsec);
+ m_is_null= item->null_value;
+ if (!m_is_null && m_sec > limit)
+ {
+ m_sec= limit;
+ m_truncated= true;
+ }
+ if (m_truncated)
+ {
+ ErrConvDouble err(nr);
+ thd->push_warning_truncated_wrong_value(type_str, err.ptr());
+ }
+ }
+ else
+ {
+ VDec tmp(item);
+ (m_is_null= tmp.is_null()) ? reset() : make_from_decimal(tmp.ptr(), &m_nsec);
+ if (!m_is_null && m_sec > limit)
+ {
+ m_sec= limit;
+ m_truncated= true;
+ }
+ if (m_truncated)
+ {
+ ErrConvDecimal err(tmp.ptr());
+ thd->push_warning_truncated_wrong_value(type_str, err.ptr());
+ }
+ }
+}
+
+
+Year::Year(longlong value, bool unsigned_flag, uint length)
+{
+ if ((m_truncated= (value < 0))) // Negative or huge unsigned
+ m_year= unsigned_flag ? 9999 : 0;
+ else if (value > 9999)
+ {
+ m_truncated= true;
+ m_year= 9999;
+ }
+ else if (length == 2)
+ {
+ m_year= value < 70 ? (uint) value + 2000 :
+ value <= 1900 ? (uint) value + 1900 :
+ (uint) value;
+ }
+ else
+ m_year= (uint) value;
+ DBUG_ASSERT(m_year <= 9999);
+}
+
+
+uint Year::year_precision(const Item *item) const
+{
+ return item->type_handler() == &type_handler_year2 ? 2 : 4;
+}
+
+
+VYear::VYear(Item *item)
+ :Year_null(item->to_longlong_null(), item->unsigned_flag, year_precision(item))
+{ }
+
+
+VYear_op::VYear_op(Item_func_hybrid_field_type *item)
+ :Year_null(item->to_longlong_null_op(), item->unsigned_flag,
+ year_precision(item))
+{ }
+
+
+const LEX_CSTRING Interval_DDhhmmssff::m_type_name=
+ {STRING_WITH_LEN("INTERVAL DAY TO SECOND")};
+
+
+Interval_DDhhmmssff::Interval_DDhhmmssff(THD *thd, Status *st,
+ bool push_warnings,
+ Item *item, ulong max_hour,
+ time_round_mode_t mode, uint dec)
+{
+ switch (item->cmp_type()) {
+ case ROW_RESULT:
+ DBUG_ASSERT(0);
+ time_type= MYSQL_TIMESTAMP_NONE;
+ break;
+ case TIME_RESULT:
+ {
+ // Rounding mode is not important here
+ if (item->get_date(thd, this, Options(TIME_TIME_ONLY, TIME_FRAC_NONE)))
+ time_type= MYSQL_TIMESTAMP_NONE;
+ else if (time_type != MYSQL_TIMESTAMP_TIME)
+ {
+ st->warnings|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ push_warning_wrong_or_truncated_value(thd, ErrConvTime(this),
+ st->warnings);
+ time_type= MYSQL_TIMESTAMP_NONE;
+ }
+ break;
+ }
+ case INT_RESULT:
+ case REAL_RESULT:
+ case DECIMAL_RESULT:
+ case STRING_RESULT:
+ {
+ StringBuffer<STRING_BUFFER_USUAL_SIZE> tmp;
+ String *str= item->val_str(&tmp);
+ if (!str)
+ time_type= MYSQL_TIMESTAMP_NONE;
+ else if (str_to_DDhhmmssff(st, str->ptr(), str->length(), str->charset(),
+ UINT_MAX32))
+ {
+ if (push_warnings)
+ thd->push_warning_wrong_value(Sql_condition::WARN_LEVEL_WARN,
+ m_type_name.str,
+ ErrConvString(str).ptr());
+ time_type= MYSQL_TIMESTAMP_NONE;
+ }
+ else
+ {
+ if (mode == TIME_FRAC_ROUND)
+ time_round_or_set_max(dec, &st->warnings, max_hour, st->nanoseconds);
+ if (hour > max_hour)
+ {
+ st->warnings|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ time_type= MYSQL_TIMESTAMP_NONE;
+ }
+ // Warn if hour or nanosecond truncation happened
+ if (push_warnings)
+ push_warning_wrong_or_truncated_value(thd, ErrConvString(str),
+ st->warnings);
+ }
+ }
+ break;
+ }
+ DBUG_ASSERT(is_valid_value_slow());
+}
+
+
+void
+Interval_DDhhmmssff::push_warning_wrong_or_truncated_value(THD *thd,
+ const ErrConv &str,
+ int warnings)
+{
+ if (warnings & MYSQL_TIME_WARN_OUT_OF_RANGE)
+ {
+ thd->push_warning_wrong_value(Sql_condition::WARN_LEVEL_WARN,
+ m_type_name.str, str.ptr());
+ }
+ else if (MYSQL_TIME_WARN_HAVE_WARNINGS(warnings))
+ {
+ thd->push_warning_truncated_wrong_value(Sql_condition::WARN_LEVEL_WARN,
+ m_type_name.str, str.ptr());
+ }
+ else if (MYSQL_TIME_WARN_HAVE_NOTES(warnings))
+ {
+ thd->push_warning_truncated_wrong_value(Sql_condition::WARN_LEVEL_NOTE,
+ m_type_name.str, str.ptr());
+ }
+}
+
+
+uint Interval_DDhhmmssff::fsp(THD *thd, Item *item)
+{
+ switch (item->cmp_type()) {
+ case INT_RESULT:
+ case TIME_RESULT:
+ return item->decimals;
+ case REAL_RESULT:
+ case DECIMAL_RESULT:
+ return MY_MIN(item->decimals, TIME_SECOND_PART_DIGITS);
+ case ROW_RESULT:
+ DBUG_ASSERT(0);
+ return 0;
+ case STRING_RESULT:
+ break;
+ }
+ if (!item->const_item() || item->is_expensive())
+ return TIME_SECOND_PART_DIGITS;
+ Status st;
+ Interval_DDhhmmssff it(thd, &st, false/*no warnings*/, item, UINT_MAX32,
+ TIME_FRAC_TRUNCATE, TIME_SECOND_PART_DIGITS);
+ return it.is_valid_interval_DDhhmmssff() ? st.precision :
+ TIME_SECOND_PART_DIGITS;
+}
+
+
+bool Time::to_native(Native *to, uint decimals) const
+{
+ if (!is_valid_time())
+ {
+ to->length(0);
+ return true;
+ }
+ uint len= my_time_binary_length(decimals);
+ if (to->reserve(len))
+ return true;
+ longlong tmp= TIME_to_longlong_time_packed(get_mysql_time());
+ my_time_packed_to_binary(tmp, (uchar*) to->ptr(), decimals);
+ to->length(len);
+ return false;
+}
+
+
+void Time::make_from_item(THD *thd, int *warn, Item *item, const Options opt)
+{
+ *warn= 0;
+ if (item->get_date(thd, this, opt))
+ time_type= MYSQL_TIMESTAMP_NONE;
+ else
+ valid_MYSQL_TIME_to_valid_value(thd, warn, opt);
+}
+
+
+static uint msec_round_add[7]=
+{
+ 500000000,
+ 50000000,
+ 5000000,
+ 500000,
+ 50000,
+ 5000,
+ 0
+};
+
+
+Sec9 & Sec9::round(uint dec)
+{
+ DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS);
+ if (Sec6::add_nanoseconds(m_nsec + msec_round_add[dec]))
+ m_sec++;
+ m_nsec= 0;
+ Sec6::trunc(dec);
+ return *this;
+}
+
+
+void Timestamp::round_or_set_max(uint dec, int *warn)
+{
+ DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS);
+ if (add_nanoseconds_usec(msec_round_add[dec]) &&
+ tv_sec++ >= TIMESTAMP_MAX_VALUE)
+ {
+ tv_sec= TIMESTAMP_MAX_VALUE;
+ tv_usec= TIME_MAX_SECOND_PART;
+ *warn|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ }
+ my_timeval_trunc(this, dec);
+}
+
+
+bool Temporal::add_nanoseconds_with_round(THD *thd, int *warn,
+ date_conv_mode_t mode,
+ ulong nsec)
+{
+ switch (time_type) {
+ case MYSQL_TIMESTAMP_TIME:
+ {
+ ulong max_hour= (mode & (TIME_INTERVAL_DAY | TIME_INTERVAL_hhmmssff)) ?
+ TIME_MAX_INTERVAL_HOUR : TIME_MAX_HOUR;
+ time_round_or_set_max(6, warn, max_hour, nsec);
+ return false;
+ }
+ case MYSQL_TIMESTAMP_DATETIME:
+ return datetime_round_or_invalidate(thd, 6, warn, nsec);
+ case MYSQL_TIMESTAMP_DATE:
+ return false;
+ case MYSQL_TIMESTAMP_NONE:
+ return false;
+ case MYSQL_TIMESTAMP_ERROR:
+ break;
+ }
+ DBUG_ASSERT(0);
+ return false;
+}
+
+
+void Temporal::time_round_or_set_max(uint dec, int *warn,
+ ulong max_hour, ulong nsec)
+{
+ DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS);
+ if (add_nanoseconds_mmssff(nsec) && ++hour > max_hour)
+ {
+ time_hhmmssff_set_max(max_hour);
+ *warn|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ }
+ my_time_trunc(this, dec);
+}
+
+
+void Time::round_or_set_max(uint dec, int *warn, ulong nsec)
+{
+ Temporal::time_round_or_set_max(dec, warn, TIME_MAX_HOUR, nsec);
+ DBUG_ASSERT(is_valid_time_slow());
+}
+
+
+void Time::round_or_set_max(uint dec, int *warn)
+{
+ round_or_set_max(dec, warn, msec_round_add[dec]);
+}
+
+/**
+ Create from a DATETIME by subtracting a given number of days,
+ implementing an optimized version of calc_time_diff().
+*/
+void Time::make_from_datetime_with_days_diff(int *warn, const MYSQL_TIME *from,
+ long days)
+{
+ *warn= 0;
+ DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_DATETIME ||
+ from->time_type == MYSQL_TIMESTAMP_DATE);
+ long daynr= calc_daynr(from->year, from->month, from->day);
+ long daydiff= daynr - days;
+ if (!daynr) // Zero date
+ {
+ set_zero_time(this, MYSQL_TIMESTAMP_TIME);
+ neg= true;
+ hour= TIME_MAX_HOUR + 1; // to report "out of range" in "warn"
+ }
+ else if (daydiff >=0)
+ {
+ neg= false;
+ year= month= day= 0;
+ hhmmssff_copy(from);
+ hour+= daydiff * 24;
+ time_type= MYSQL_TIMESTAMP_TIME;
+ }
+ else
+ {
+ longlong timediff= ((((daydiff * 24LL +
+ from->hour) * 60LL +
+ from->minute) * 60LL +
+ from->second) * 1000000LL +
+ from->second_part);
+ unpack_time(timediff, this, MYSQL_TIMESTAMP_TIME);
+ if (year || month)
+ {
+ *warn|= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ year= month= day= 0;
+ hour= TIME_MAX_HOUR + 1;
+ }
+ }
+ // The above code can generate TIME values outside of the valid TIME range.
+ adjust_time_range_or_invalidate(warn);
+}
+
+
+void Time::make_from_datetime_move_day_to_hour(int *warn,
+ const MYSQL_TIME *from)
+{
+ *warn= 0;
+ DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_DATE ||
+ from->time_type == MYSQL_TIMESTAMP_DATETIME);
+ time_type= MYSQL_TIMESTAMP_TIME;
+ neg= false;
+ year= month= day= 0;
+ hhmmssff_copy(from);
+ datetime_to_time_YYYYMMDD_000000DD_mix_to_hours(warn, from->year,
+ from->month, from->day);
+ adjust_time_range_or_invalidate(warn);
+}
+
+
+void Time::make_from_datetime(int *warn, const MYSQL_TIME *from, long curdays)
+{
+ if (!curdays)
+ make_from_datetime_move_day_to_hour(warn, from);
+ else
+ make_from_datetime_with_days_diff(warn, from, curdays);
+}
+
+
+void Time::make_from_time(int *warn, const MYSQL_TIME *from)
+{
+ DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_TIME);
+ if (from->year || from->month)
+ make_from_out_of_range(warn);
+ else
+ {
+ *warn= 0;
+ DBUG_ASSERT(from->day == 0);
+ *(static_cast<MYSQL_TIME*>(this))= *from;
+ adjust_time_range_or_invalidate(warn);
+ }
+}
+
+
+uint Time::binary_length_to_precision(uint length)
+{
+ switch (length) {
+ case 3: return 0;
+ case 4: return 2;
+ case 5: return 4;
+ case 6: return 6;
+ }
+ DBUG_ASSERT(0);
+ return 0;
+}
+
+
+Time::Time(const Native &native)
+{
+ uint dec= binary_length_to_precision(native.length());
+ longlong tmp= my_time_packed_from_binary((const uchar *) native.ptr(), dec);
+ TIME_from_longlong_time_packed(this, tmp);
+ DBUG_ASSERT(is_valid_time());
+}
+
+
+Time::Time(int *warn, const MYSQL_TIME *from, long curdays)
+{
+ switch (from->time_type) {
+ case MYSQL_TIMESTAMP_NONE:
+ case MYSQL_TIMESTAMP_ERROR:
+ make_from_out_of_range(warn);
+ break;
+ case MYSQL_TIMESTAMP_DATE:
+ case MYSQL_TIMESTAMP_DATETIME:
+ make_from_datetime(warn, from, curdays);
+ break;
+ case MYSQL_TIMESTAMP_TIME:
+ make_from_time(warn, from);
+ break;
+ }
+ DBUG_ASSERT(is_valid_value_slow());
+}
+
+
+Time::Time(int *warn, bool neg, ulonglong hour, uint minute, const Sec6 &second)
+{
+ DBUG_ASSERT(second.sec() <= 59);
+ *warn= 0;
+ set_zero_time(this, MYSQL_TIMESTAMP_TIME);
+ MYSQL_TIME::neg= neg;
+ MYSQL_TIME::hour= hour > TIME_MAX_HOUR ? (uint) (TIME_MAX_HOUR + 1) :
+ (uint) hour;
+ MYSQL_TIME::minute= minute;
+ MYSQL_TIME::second= (uint) second.sec();
+ MYSQL_TIME::second_part= second.usec();
+ adjust_time_range_or_invalidate(warn);
+}
+
+
+void Temporal_with_date::make_from_item(THD *thd, Item *item,
+ date_mode_t fuzzydate)
+{
+ date_conv_mode_t flags= date_conv_mode_t(fuzzydate) & ~TIME_TIME_ONLY;
/*
Some TIME type items return error when trying to do get_date()
without TIME_TIME_ONLY set (e.g. Item_field for Field_time).
@@ -177,10 +897,11 @@ void Temporal_with_date::make_from_item(THD *thd, Item *item, sql_mode_t flags)
In the legacy time->datetime conversion mode we do not add TIME_TIME_ONLY
and leave it to get_date() to check date.
*/
- ulonglong time_flag= (item->field_type() == MYSQL_TYPE_TIME &&
- !(thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST)) ?
- TIME_TIME_ONLY : 0;
- if (item->get_date(this, flags | time_flag))
+ date_conv_mode_t time_flag= (item->field_type() == MYSQL_TYPE_TIME &&
+ !(thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST)) ?
+ TIME_TIME_ONLY : TIME_CONV_NONE;
+ Options opt(flags | time_flag, time_round_mode_t(fuzzydate));
+ if (item->get_date(thd, this, opt))
time_type= MYSQL_TIMESTAMP_NONE;
else if (time_type == MYSQL_TIMESTAMP_TIME)
{
@@ -193,6 +914,172 @@ void Temporal_with_date::make_from_item(THD *thd, Item *item, sql_mode_t flags)
}
+void Temporal_with_date::check_date_or_invalidate(int *warn,
+ date_conv_mode_t flags)
+{
+ if (::check_date(this, pack_time(this) != 0,
+ ulonglong(flags & TIME_MODE_FOR_XXX_TO_DATE), warn))
+ time_type= MYSQL_TIMESTAMP_NONE;
+}
+
+
+void Datetime::make_from_time(THD *thd, int *warn, const MYSQL_TIME *from,
+ date_conv_mode_t flags)
+{
+ DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_TIME);
+ if (time_to_datetime(thd, from, this))
+ make_from_out_of_range(warn);
+ else
+ {
+ *warn= 0;
+ check_date_or_invalidate(warn, flags);
+ }
+}
+
+
+void Datetime::make_from_datetime(THD *thd, int *warn, const MYSQL_TIME *from,
+ date_conv_mode_t flags)
+{
+ DBUG_ASSERT(from->time_type == MYSQL_TIMESTAMP_DATE ||
+ from->time_type == MYSQL_TIMESTAMP_DATETIME);
+ if (from->neg || check_datetime_range(from))
+ make_from_out_of_range(warn);
+ else
+ {
+ *warn= 0;
+ *(static_cast<MYSQL_TIME*>(this))= *from;
+ date_to_datetime(this);
+ check_date_or_invalidate(warn, flags);
+ }
+}
+
+
+Datetime::Datetime(THD *thd, const timeval &tv)
+{
+ thd->variables.time_zone->gmt_sec_to_TIME(this, tv.tv_sec);
+ second_part= tv.tv_usec;
+ thd->time_zone_used= 1;
+ DBUG_ASSERT(is_valid_value_slow());
+}
+
+
+Datetime::Datetime(THD *thd, int *warn, const MYSQL_TIME *from,
+ date_conv_mode_t flags)
+{
+ DBUG_ASSERT(bool(flags & TIME_TIME_ONLY) == false);
+ switch (from->time_type) {
+ case MYSQL_TIMESTAMP_ERROR:
+ case MYSQL_TIMESTAMP_NONE:
+ make_from_out_of_range(warn);
+ break;
+ case MYSQL_TIMESTAMP_TIME:
+ make_from_time(thd, warn, from, flags);
+ break;
+ case MYSQL_TIMESTAMP_DATETIME:
+ case MYSQL_TIMESTAMP_DATE:
+ make_from_datetime(thd, warn, from, flags);
+ break;
+ }
+ DBUG_ASSERT(is_valid_value_slow());
+}
+
+Datetime::Datetime(my_time_t unix_time, ulong second_part_arg,
+ const Time_zone* time_zone)
+{
+ time_zone->gmt_sec_to_TIME(this, unix_time);
+ second_part= second_part_arg;
+}
+
+
+bool Temporal::datetime_add_nanoseconds_or_invalidate(THD *thd, int *warn, ulong nsec)
+{
+ if (!add_nanoseconds_mmssff(nsec))
+ return false;
+ /*
+ Overflow happened on minutes. Now we need to add 1 hour to the value.
+ Catch a special case for the maximum possible date and hour==23, to
+ truncate '9999-12-31 23:59:59.9999999' (with 7 fractional digits)
+ to '9999-12-31 23:59:59.999999' (with 6 fractional digits),
+ with a warning, instead of returning an error, so this statement:
+ INSERT INTO (datetime_column) VALUES ('9999-12-31 23:59:59.9999999');
+ inserts a value truncated to 6 fractional digits, instead of zero
+ date '0000-00-00 00:00:00.000000'.
+ */
+ if (year == 9999 && month == 12 && day == 31 && hour == 23)
+ {
+ minute= 59;
+ second= 59;
+ second_part= 999999;
+ *warn= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ return false;
+ }
+ INTERVAL interval;
+ memset(&interval, 0, sizeof(interval));
+ interval.hour= 1;
+ /*
+ date_add_interval cannot handle bad dates with zero YYYY or MM.
+ Note, check_date(NO_ZERO_XX) does not check YYYY against zero,
+ so let's additionally check it.
+ */
+ if (year == 0 ||
+ check_date(TIME_NO_ZERO_IN_DATE | TIME_NO_ZERO_DATE, warn) ||
+ date_add_interval(thd, this, INTERVAL_HOUR, interval, false/*no warn*/))
+ {
+ char buf[MAX_DATE_STRING_REP_LENGTH];
+ my_date_to_str(this, buf);
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_TYPE,
+ ER_THD(thd, ER_WRONG_VALUE_FOR_TYPE),
+ "date", buf, "round(datetime)");
+ make_from_out_of_range(warn);
+ return true;
+ }
+ return false;
+}
+
+
+bool Temporal::datetime_round_or_invalidate(THD *thd, uint dec, int *warn, ulong nsec)
+{
+ DBUG_ASSERT(dec <= TIME_SECOND_PART_DIGITS);
+ if (datetime_add_nanoseconds_or_invalidate(thd, warn, nsec))
+ return true;
+ my_datetime_trunc(this, dec);
+ return false;
+
+}
+
+
+bool Datetime::round_or_invalidate(THD *thd, uint dec, int *warn)
+{
+ return round_or_invalidate(thd, dec, warn, msec_round_add[dec]);
+}
+
+
+Datetime_from_temporal::Datetime_from_temporal(THD *thd, Item *temporal,
+ date_conv_mode_t fuzzydate)
+ :Datetime(thd, temporal, Options(fuzzydate, TIME_FRAC_NONE))
+{
+ // Exact rounding mode does not matter
+ DBUG_ASSERT(temporal->cmp_type() == TIME_RESULT);
+}
+
+
+Datetime_truncation_not_needed::Datetime_truncation_not_needed(THD *thd, Item *item,
+ date_conv_mode_t mode)
+ :Datetime(thd, item, Options(mode, TIME_FRAC_NONE))
+{
+ /*
+ The called Datetime() constructor only would truncate nanoseconds if they
+ existed (but we know there were no nanoseconds). Here we assert that there
+ are also no microsecond digits outside of the scale specified in "dec".
+ */
+ DBUG_ASSERT(!is_valid_datetime() ||
+ fraction_remainder(MY_MIN(item->decimals,
+ TIME_SECOND_PART_DIGITS)) == 0);
+}
+
+/********************************************************************/
+
uint Type_std_attributes::count_max_decimals(Item **item, uint nitems)
{
uint res= 0;
@@ -313,6 +1200,32 @@ bool Type_std_attributes::count_string_length(const char *func_name,
}
+/*
+ Find a handler by its ODBC literal data type.
+
+ @param type_str - data type name, not necessarily 0-terminated
+ @retval - a pointer to data type handler if type_str points
+ to a known ODBC literal data type, or NULL otherwise
+*/
+const Type_handler *
+Type_handler::odbc_literal_type_handler(const LEX_CSTRING *type_str)
+{
+ if (type_str->length == 1)
+ {
+ if (type_str->str[0] == 'd') // {d'2001-01-01'}
+ return &type_handler_newdate;
+ else if (type_str->str[0] == 't') // {t'10:20:30'}
+ return &type_handler_time2;
+ }
+ else if (type_str->length == 2) // {ts'2001-01-01 10:20:30'}
+ {
+ if (type_str->str[0] == 't' && type_str->str[1] == 's')
+ return &type_handler_datetime2;
+ }
+ return NULL; // Not a known ODBC literal type
+}
+
+
/**
This method is used by:
- Item_user_var_as_out_param::field_type()
@@ -468,6 +1381,7 @@ const Name
Type_handler_string::m_name_char(STRING_WITH_LEN("char")),
Type_handler_var_string::m_name_var_string(STRING_WITH_LEN("varchar")),
Type_handler_varchar::m_name_varchar(STRING_WITH_LEN("varchar")),
+ Type_handler_hex_hybrid::m_name_hex_hybrid(STRING_WITH_LEN("hex_hybrid")),
Type_handler_tiny_blob::m_name_tinyblob(STRING_WITH_LEN("tinyblob")),
Type_handler_medium_blob::m_name_mediumblob(STRING_WITH_LEN("mediumblob")),
Type_handler_long_blob::m_name_longblob(STRING_WITH_LEN("longblob")),
@@ -478,6 +1392,7 @@ const Name
Type_handler_set::m_name_set(STRING_WITH_LEN("set"));
const Name
+ Type_handler_bool::m_name_bool(STRING_WITH_LEN("boolean")),
Type_handler_tiny::m_name_tiny(STRING_WITH_LEN("tinyint")),
Type_handler_short::m_name_short(STRING_WITH_LEN("smallint")),
Type_handler_long::m_name_int(STRING_WITH_LEN("int")),
@@ -500,6 +1415,11 @@ const Name
Type_handler_datetime_common::m_name_datetime(STRING_WITH_LEN("datetime")),
Type_handler_timestamp_common::m_name_timestamp(STRING_WITH_LEN("timestamp"));
+const Name
+ Type_handler::m_version_default(STRING_WITH_LEN("")),
+ Type_handler::m_version_mariadb53(STRING_WITH_LEN("mariadb-5.3")),
+ Type_handler::m_version_mysql56(STRING_WITH_LEN("mysql-5.6"));
+
const Type_limits_int
Type_handler_tiny::m_limits_sint8= Type_limits_sint8(),
@@ -565,7 +1485,7 @@ const Type_handler *Type_handler_datetime_common::type_handler_for_comparison()
const Type_handler *Type_handler_timestamp_common::type_handler_for_comparison() const
{
- return &type_handler_datetime;
+ return &type_handler_timestamp;
}
@@ -576,6 +1496,22 @@ const Type_handler *Type_handler_row::type_handler_for_comparison() const
/***************************************************************************/
+const Type_handler *
+Type_handler_timestamp_common::type_handler_for_native_format() const
+{
+ return &type_handler_timestamp2;
+}
+
+
+const Type_handler *
+Type_handler_time_common::type_handler_for_native_format() const
+{
+ return &type_handler_time2;
+}
+
+
+/***************************************************************************/
+
const Type_handler *Type_handler_typelib::type_handler_for_item_field() const
{
return &type_handler_string;
@@ -750,6 +1686,16 @@ Type_handler_hybrid_field_type::aggregate_for_comparison(const Type_handler *h)
*/
if (b == TIME_RESULT)
m_type_handler= h; // Temporal types bit non-temporal types
+ /*
+ Compare TIMESTAMP to a non-temporal type as DATETIME.
+ This is needed to make queries with fuzzy dates work:
+ SELECT * FROM t1
+ WHERE
+ ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00';
+ */
+ if (m_type_handler->type_handler_for_native_format() ==
+ &type_handler_timestamp2)
+ m_type_handler= &type_handler_datetime;
}
else
{
@@ -838,7 +1784,19 @@ Type_handler_hybrid_field_type::aggregate_for_min_max(const Type_handler *h)
}
else if (a == TIME_RESULT || b == TIME_RESULT)
{
- if ((a == TIME_RESULT) + (b == TIME_RESULT) == 1)
+ if ((m_type_handler->type_handler_for_native_format() ==
+ &type_handler_timestamp2) +
+ (h->type_handler_for_native_format() ==
+ &type_handler_timestamp2) == 1)
+ {
+ /*
+ Handle LEAST(TIMESTAMP, non-TIMESTAMP) as DATETIME,
+ to make sure fuzzy dates work in this context:
+ LEAST('2001-00-00', timestamp_field)
+ */
+ m_type_handler= &type_handler_datetime2;
+ }
+ else if ((a == TIME_RESULT) + (b == TIME_RESULT) == 1)
{
/*
We're here if there's only one temporal data type:
@@ -1483,6 +2441,17 @@ Field *Type_handler_set::make_conversion_table_field(TABLE *table,
((const Field_enum*) target)->typelib, target->charset());
}
+
+/*************************************************************************/
+
+bool Type_handler::
+ Column_definition_validate_check_constraint(THD *thd,
+ Column_definition * c) const
+{
+ return c->validate_check_constraint(thd);
+}
+
+
/*************************************************************************/
bool Type_handler_null::
Column_definition_fix_attributes(Column_definition *def) const
@@ -1644,14 +2613,81 @@ bool Type_handler_bit::
/*************************************************************************/
+void Type_handler_blob_common::
+ Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *def,
+ const Field *field) const
+{
+ DBUG_ASSERT(def->key_length == 0);
+}
+
+
+void Type_handler_typelib::
+ Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *def,
+ const Field *field) const
+{
+ DBUG_ASSERT(def->flags & (ENUM_FLAG | SET_FLAG));
+ def->interval= field->get_typelib();
+}
+
+
+#ifdef HAVE_SPATIAL
+void Type_handler_geometry::
+ Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *def,
+ const Field *field) const
+{
+ def->geom_type= ((Field_geom*) field)->geom_type;
+ def->srid= ((Field_geom*) field)->srid;
+}
+#endif
+
+
+void Type_handler_year::
+ Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *def,
+ const Field *field) const
+{
+ if (def->length != 4)
+ {
+ char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
+ my_snprintf(buff, sizeof(buff), "YEAR(%llu)", def->length);
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_WARN_DEPRECATED_SYNTAX,
+ ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
+ buff, "YEAR(4)");
+ }
+}
+
+
+void Type_handler_real_result::
+ Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *def,
+ const Field *field) const
+{
+ /*
+ Floating points are stored with FLOATING_POINT_DECIMALS but internally
+ in MariaDB used with NOT_FIXED_DEC, which is >= FLOATING_POINT_DECIMALS.
+ */
+ if (def->decimals >= FLOATING_POINT_DECIMALS)
+ def->decimals= NOT_FIXED_DEC;
+}
+
+
+/*************************************************************************/
+
bool Type_handler::
Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
- def->create_length_to_internal_length_simple();
+ def->prepare_stage1_simple(&my_charset_bin);
return false;
}
@@ -1660,8 +2696,12 @@ bool Type_handler_null::
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
+ def->prepare_charset_for_string(derived_attr);
def->create_length_to_internal_length_null();
return false;
}
@@ -1671,19 +2711,56 @@ bool Type_handler_row::
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
+ def->charset= &my_charset_bin;
def->create_length_to_internal_length_null();
return false;
}
+bool Type_handler_temporal_result::
+ Column_definition_prepare_stage1(THD *thd,
+ MEM_ROOT *mem_root,
+ Column_definition *def,
+ handler *file,
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
+{
+ def->prepare_stage1_simple(&my_charset_numeric);
+ return false;
+}
+
+
+bool Type_handler_numeric::
+ Column_definition_prepare_stage1(THD *thd,
+ MEM_ROOT *mem_root,
+ Column_definition *def,
+ handler *file,
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
+{
+ def->prepare_stage1_simple(&my_charset_numeric);
+ return false;
+}
+
bool Type_handler_newdecimal::
Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
+ def->charset= &my_charset_numeric;
def->create_length_to_internal_length_newdecimal();
return false;
}
@@ -1693,8 +2770,12 @@ bool Type_handler_bit::
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
+ def->charset= &my_charset_numeric;
return def->prepare_stage1_bit(thd, mem_root, file, table_flags);
}
@@ -1703,9 +2784,13 @@ bool Type_handler_typelib::
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
- return def->prepare_stage1_typelib(thd, mem_root, file, table_flags);
+ return def->prepare_charset_for_string(derived_attr) ||
+ def->prepare_stage1_typelib(thd, mem_root, file, table_flags);
}
@@ -1714,20 +2799,31 @@ bool Type_handler_string_result::
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
- return def->prepare_stage1_string(thd, mem_root, file, table_flags);
+ return def->prepare_charset_for_string(derived_attr) ||
+ def->prepare_stage1_string(thd, mem_root, file, table_flags);
}
#ifdef HAVE_SPATIAL
+#if MYSQL_VERSION_ID > 100500
+#error The below method is in sql/sql_type_geom.cc starting from 10.5
+#endif
bool Type_handler_geometry::
Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *def,
handler *file,
- ulonglong table_flags) const
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const
{
+ def->charset= &my_charset_bin;
def->create_length_to_internal_length_string();
return def->prepare_blob_field(thd);
}
@@ -1736,14 +2832,38 @@ bool Type_handler_geometry::
/*************************************************************************/
+bool Type_handler_general_purpose_string::
+ Column_definition_bulk_alter(Column_definition *def,
+ const Column_derived_attributes
+ *derived_attr,
+ const Column_bulk_alter_attributes
+ *bulk_alter_attr)
+ const
+{
+ if (!bulk_alter_attr->alter_table_convert_to_charset())
+ return false; // No "CONVERT TO" clause.
+ CHARSET_INFO *defcs= def->explicit_or_derived_charset(derived_attr);
+ DBUG_ASSERT(defcs);
+ /*
+ Handle 'ALTER TABLE t1 CONVERT TO CHARACTER SET csname'.
+ Change character sets for all varchar/char/text columns,
+ but do not touch varbinary/binary/blob columns.
+ */
+ if (defcs != &my_charset_bin)
+ def->charset= bulk_alter_attr->alter_table_convert_to_charset();
+ return false;
+};
+
+
+/*************************************************************************/
+
bool Type_handler::
Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const
{
- def->redefine_stage1_common(dup, file, schema);
+ def->redefine_stage1_common(dup, file);
def->create_length_to_internal_length_simple();
return false;
}
@@ -1752,11 +2872,10 @@ bool Type_handler::
bool Type_handler_null::
Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const
{
- def->redefine_stage1_common(dup, file, schema);
+ def->redefine_stage1_common(dup, file);
def->create_length_to_internal_length_null();
return false;
}
@@ -1765,11 +2884,10 @@ bool Type_handler_null::
bool Type_handler_newdecimal::
Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const
{
- def->redefine_stage1_common(dup, file, schema);
+ def->redefine_stage1_common(dup, file);
def->create_length_to_internal_length_newdecimal();
return false;
}
@@ -1778,11 +2896,10 @@ bool Type_handler_newdecimal::
bool Type_handler_string_result::
Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const
{
- def->redefine_stage1_common(dup, file, schema);
+ def->redefine_stage1_common(dup, file);
def->set_compression_method(dup->compression_method());
def->create_length_to_internal_length_string();
return false;
@@ -1792,11 +2909,10 @@ bool Type_handler_string_result::
bool Type_handler_typelib::
Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const
{
- def->redefine_stage1_common(dup, file, schema);
+ def->redefine_stage1_common(dup, file);
def->create_length_to_internal_length_typelib();
return false;
}
@@ -1805,11 +2921,10 @@ bool Type_handler_typelib::
bool Type_handler_bit::
Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const
{
- def->redefine_stage1_common(dup, file, schema);
+ def->redefine_stage1_common(dup, file);
/*
If we are replacing a field with a BIT field, we need
to initialize pack_flag.
@@ -2047,8 +3162,8 @@ Field *Type_handler_tiny::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_tiny(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_tiny(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name, 0/*zerofill*/, attr.unsigned_flag);
}
@@ -2060,8 +3175,8 @@ Field *Type_handler_short::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_short(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_short(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name, 0/*zerofill*/, attr.unsigned_flag);
}
@@ -2072,8 +3187,8 @@ Field *Type_handler_int24::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_medium(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_medium(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
0/*zerofill*/, attr.unsigned_flag);
}
@@ -2085,8 +3200,8 @@ Field *Type_handler_long::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_long(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_long(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name, 0/*zerofill*/, attr.unsigned_flag);
}
@@ -2097,8 +3212,8 @@ Field *Type_handler_longlong::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_longlong(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_longlong(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
0/*zerofill*/, attr.unsigned_flag);
}
@@ -2110,8 +3225,8 @@ Field *Type_handler_vers_trx_id::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_vers_trx_id(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_vers_trx_id(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
0/*zerofill*/, attr.unsigned_flag);
}
@@ -2123,8 +3238,8 @@ Field *Type_handler_float::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_float(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_float(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
(uint8) attr.decimals, 0/*zerofill*/, attr.unsigned_flag);
}
@@ -2136,8 +3251,8 @@ Field *Type_handler_double::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_double(addr.ptr, attr.max_char_length(),
- addr.null_ptr, addr.null_bit,
+ Field_double(addr.ptr(), attr.max_char_length(),
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
(uint8) attr.decimals, 0/*zerofill*/, attr.unsigned_flag);
}
@@ -2158,7 +3273,8 @@ Type_handler_olddecimal::make_table_field(const LEX_CSTRING *name,
*/
DBUG_ASSERT(0);
return new (table->in_use->mem_root)
- Field_decimal(addr.ptr, attr.max_length, addr.null_ptr, addr.null_bit,
+ Field_decimal(addr.ptr(), attr.max_length,
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name, (uint8) attr.decimals,
0/*zerofill*/,attr.unsigned_flag);
}
@@ -2205,7 +3321,7 @@ Type_handler_newdecimal::make_table_field(const LEX_CSTRING *name,
len= required_length;
}
return new (table->in_use->mem_root)
- Field_new_decimal(addr.ptr, len, addr.null_ptr, addr.null_bit,
+ Field_new_decimal(addr.ptr(), len, addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
dec, 0/*zerofill*/, attr.unsigned_flag);
}
@@ -2217,7 +3333,8 @@ Field *Type_handler_year::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_year(addr.ptr, attr.max_length, addr.null_ptr, addr.null_bit,
+ Field_year(addr.ptr(), attr.max_length,
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name);
}
@@ -2229,7 +3346,7 @@ Field *Type_handler_null::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_null(addr.ptr, attr.max_length,
+ Field_null(addr.ptr(), attr.max_length,
Field::NONE, name, attr.collation.collation);
}
@@ -2241,7 +3358,7 @@ Field *Type_handler_timestamp::make_table_field(const LEX_CSTRING *name,
{
return new_Field_timestamp(table->in_use->mem_root,
- addr.ptr, addr.null_ptr, addr.null_bit,
+ addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, table->s, attr.decimals);
}
@@ -2257,7 +3374,7 @@ Field *Type_handler_timestamp2::make_table_field(const LEX_CSTRING *name,
make_table_field() for make_field() purposes in field.cc.
*/
return new_Field_timestamp(table->in_use->mem_root,
- addr.ptr, addr.null_ptr, addr.null_bit,
+ addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, table->s, attr.decimals);
}
@@ -2269,7 +3386,7 @@ Field *Type_handler_newdate::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_newdate(addr.ptr, addr.null_ptr, addr.null_bit,
+ Field_newdate(addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name);
}
@@ -2286,7 +3403,7 @@ Field *Type_handler_date::make_table_field(const LEX_CSTRING *name,
*/
DBUG_ASSERT(0);
return new (table->in_use->mem_root)
- Field_date(addr.ptr, addr.null_ptr, addr.null_bit,
+ Field_date(addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name);
}
@@ -2298,7 +3415,7 @@ Field *Type_handler_time::make_table_field(const LEX_CSTRING *name,
{
return new_Field_time(table->in_use->mem_root,
- addr.ptr, addr.null_ptr, addr.null_bit,
+ addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, attr.decimals);
}
@@ -2315,7 +3432,7 @@ Field *Type_handler_time2::make_table_field(const LEX_CSTRING *name,
make_table_field() for make_field() purposes in field.cc.
*/
return new_Field_time(table->in_use->mem_root,
- addr.ptr, addr.null_ptr, addr.null_bit,
+ addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, attr.decimals);
}
@@ -2327,7 +3444,7 @@ Field *Type_handler_datetime::make_table_field(const LEX_CSTRING *name,
{
return new_Field_datetime(table->in_use->mem_root,
- addr.ptr, addr.null_ptr, addr.null_bit,
+ addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, attr.decimals);
}
@@ -2342,7 +3459,7 @@ Field *Type_handler_datetime2::make_table_field(const LEX_CSTRING *name,
make_table_field() for make_field() purposes in field.cc.
*/
return new_Field_datetime(table->in_use->mem_root,
- addr.ptr, addr.null_ptr, addr.null_bit,
+ addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, attr.decimals);
}
@@ -2354,8 +3471,8 @@ Field *Type_handler_bit::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_bit_as_char(addr.ptr, attr.max_length,
- addr.null_ptr, addr.null_bit,
+ Field_bit_as_char(addr.ptr(), attr.max_length,
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name);
}
@@ -2367,7 +3484,8 @@ Field *Type_handler_string::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_string(addr.ptr, attr.max_length, addr.null_ptr, addr.null_bit,
+ Field_string(addr.ptr(), attr.max_length,
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name, attr.collation);
}
@@ -2381,9 +3499,9 @@ Field *Type_handler_varchar::make_table_field(const LEX_CSTRING *name,
DBUG_ASSERT(HA_VARCHAR_PACKLENGTH(attr.max_length) <=
MAX_FIELD_VARCHARLENGTH);
return new (table->in_use->mem_root)
- Field_varstring(addr.ptr, attr.max_length,
+ Field_varstring(addr.ptr(), attr.max_length,
HA_VARCHAR_PACKLENGTH(attr.max_length),
- addr.null_ptr, addr.null_bit,
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
table->s, attr.collation);
}
@@ -2396,7 +3514,7 @@ Field *Type_handler_tiny_blob::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_blob(addr.ptr, addr.null_ptr, addr.null_bit,
+ Field_blob(addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, table->s,
1, attr.collation);
}
@@ -2409,7 +3527,7 @@ Field *Type_handler_blob::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_blob(addr.ptr, addr.null_ptr, addr.null_bit,
+ Field_blob(addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, table->s,
2, attr.collation);
}
@@ -2423,7 +3541,7 @@ Type_handler_medium_blob::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_blob(addr.ptr, addr.null_ptr, addr.null_bit,
+ Field_blob(addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, table->s,
3, attr.collation);
}
@@ -2436,7 +3554,7 @@ Field *Type_handler_long_blob::make_table_field(const LEX_CSTRING *name,
{
return new (table->in_use->mem_root)
- Field_blob(addr.ptr, addr.null_ptr, addr.null_bit,
+ Field_blob(addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, table->s,
4, attr.collation);
}
@@ -2450,7 +3568,7 @@ Field *Type_handler_geometry::make_table_field(const LEX_CSTRING *name,
TABLE *table) const
{
return new (table->in_use->mem_root)
- Field_geom(addr.ptr, addr.null_ptr, addr.null_bit,
+ Field_geom(addr.ptr(), addr.null_ptr(), addr.null_bit(),
Field::NONE, name, table->s, 4,
(Field::geometry_type) attr.uint_geometry_type(),
0);
@@ -2466,7 +3584,8 @@ Field *Type_handler_enum::make_table_field(const LEX_CSTRING *name,
TYPELIB *typelib= attr.get_typelib();
DBUG_ASSERT(typelib);
return new (table->in_use->mem_root)
- Field_enum(addr.ptr, attr.max_length, addr.null_ptr, addr.null_bit,
+ Field_enum(addr.ptr(), attr.max_length,
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
get_enum_pack_length(typelib->count), typelib,
attr.collation);
@@ -2482,7 +3601,8 @@ Field *Type_handler_set::make_table_field(const LEX_CSTRING *name,
TYPELIB *typelib= attr.get_typelib();
DBUG_ASSERT(typelib);
return new (table->in_use->mem_root)
- Field_set(addr.ptr, attr.max_length, addr.null_ptr, addr.null_bit,
+ Field_set(addr.ptr(), attr.max_length,
+ addr.null_ptr(), addr.null_bit(),
Field::NONE, name,
get_enum_pack_length(typelib->count), typelib,
attr.collation);
@@ -2526,7 +3646,6 @@ uint32 Type_handler_temporal_result::max_display_length(const Item *item) const
return item->max_length;
}
-
uint32 Type_handler_string_result::max_display_length(const Item *item) const
{
return item->max_length;
@@ -2551,6 +3670,121 @@ uint32 Type_handler_general_purpose_int::max_display_length(const Item *item)
return type_limits_int_by_unsigned_flag(item->unsigned_flag)->char_length();
}
+/*************************************************************************/
+
+uint32
+Type_handler_decimal_result::Item_decimal_notation_int_digits(const Item *item)
+ const
+{
+ return item->decimal_int_part();
+}
+
+
+uint32
+Type_handler_temporal_result::Item_decimal_notation_int_digits(const Item *item)
+ const
+{
+ return item->decimal_int_part();
+}
+
+
+uint32
+Type_handler_bit::Item_decimal_notation_int_digits(const Item *item)
+ const
+{
+ return Bit_decimal_notation_int_digits_by_nbits(item->max_length);
+}
+
+
+uint32
+Type_handler_general_purpose_int::Item_decimal_notation_int_digits(
+ const Item *item) const
+{
+ return type_limits_int_by_unsigned_flag(item->unsigned_flag)->precision();
+}
+
+/*************************************************************************/
+
+/*
+ Binary to Decimal digits ratio converges to log2(10) thus using 3 as
+ a divisor.
+*/
+uint32
+Type_handler_bit::Bit_decimal_notation_int_digits_by_nbits(uint nbits)
+{
+ DBUG_ASSERT(nbits > 0);
+ DBUG_ASSERT(nbits <= 64);
+ set_if_smaller(nbits, 64); // Safety
+ static uint ndigits[65]=
+ {0,
+ 1,1,1,2,2,2,3,3, // 1..8 bits
+ 3,4,4,4,4,5,5,5, // 9..16 bits
+ 6,6,6,7,7,7,7,8, // 17..24 bits
+ 8,8,9,9,9,10,10,10, // 25..32 bits
+ 10,11,11,11,12,12,12,13, // 33..40 bits
+ 13,13,13,14,14,14,15,15, // 41..48 bits
+ 15,16,16,16,16,17,17,17, // 49..56 bits
+ 18,18,18,19,19,19,19,20 // 57..64 bits
+ };
+ return ndigits[nbits];
+}
+
+/*************************************************************************/
+
+void Type_handler_row::Item_update_null_value(Item *item) const
+{
+ DBUG_ASSERT(0);
+ item->null_value= true;
+}
+
+
+void Type_handler_time_common::Item_update_null_value(Item *item) const
+{
+ MYSQL_TIME ltime;
+ THD *thd= current_thd;
+ (void) item->get_date(thd, &ltime, Time::Options(TIME_TIME_ONLY, thd));
+}
+
+
+void Type_handler_temporal_with_date::Item_update_null_value(Item *item) const
+{
+ MYSQL_TIME ltime;
+ THD *thd= current_thd;
+ (void) item->get_date(thd, &ltime, Datetime::Options(thd));
+}
+
+
+void Type_handler_string_result::Item_update_null_value(Item *item) const
+{
+ StringBuffer<MAX_FIELD_WIDTH> tmp;
+ (void) item->val_str(&tmp);
+}
+
+
+void Type_handler_real_result::Item_update_null_value(Item *item) const
+{
+ (void) item->val_real();
+}
+
+
+void Type_handler_decimal_result::Item_update_null_value(Item *item) const
+{
+ my_decimal tmp;
+ (void) item->val_decimal(&tmp);
+}
+
+
+void Type_handler_int_result::Item_update_null_value(Item *item) const
+{
+ (void) item->val_int();
+}
+
+
+void Type_handler_bool::Item_update_null_value(Item *item) const
+{
+ (void) item->val_bool();
+}
+
/*************************************************************************/
@@ -2569,6 +3803,18 @@ int Type_handler_temporal_with_date::Item_save_in_field(Item *item,
}
+int Type_handler_timestamp_common::Item_save_in_field(Item *item,
+ Field *field,
+ bool no_conversions)
+ const
+{
+ Timestamp_or_zero_datetime_native_null tmp(field->table->in_use, item, true);
+ if (tmp.is_null())
+ return set_field_to_null_with_conversions(field, no_conversions);
+ return tmp.save_in_field(field, item->decimals);
+}
+
+
int Type_handler_string_result::Item_save_in_field(Item *item, Field *field,
bool no_conversions) const
{
@@ -2635,6 +3881,12 @@ Type_handler_temporal_with_date::set_comparator_func(Arg_comparator *cmp) const
return cmp->set_cmp_func_datetime();
}
+bool
+Type_handler_timestamp_common::set_comparator_func(Arg_comparator *cmp) const
+{
+ return cmp->set_cmp_func_native();
+}
+
/*************************************************************************/
@@ -2746,7 +3998,7 @@ Type_handler_int_result::Item_get_cache(THD *thd, const Item *item) const
Item_cache *
Type_handler_year::Item_get_cache(THD *thd, const Item *item) const
{
- return new (thd->mem_root) Item_cache_year(thd);
+ return new (thd->mem_root) Item_cache_year(thd, item->type_handler());
}
Item_cache *
@@ -2776,7 +4028,7 @@ Type_handler_string_result::Item_get_cache(THD *thd, const Item *item) const
Item_cache *
Type_handler_timestamp_common::Item_get_cache(THD *thd, const Item *item) const
{
- return new (thd->mem_root) Item_cache_datetime(thd);
+ return new (thd->mem_root) Item_cache_timestamp(thd);
}
Item_cache *
@@ -2797,6 +4049,22 @@ Type_handler_date_common::Item_get_cache(THD *thd, const Item *item) const
return new (thd->mem_root) Item_cache_date(thd);
}
+
+/*************************************************************************/
+
+Item_copy *
+Type_handler::create_item_copy(THD *thd, Item *item) const
+{
+ return new (thd->mem_root) Item_copy_string(thd, item);
+}
+
+
+Item_copy *
+Type_handler_timestamp_common::create_item_copy(THD *thd, Item *item) const
+{
+ return new (thd->mem_root) Item_copy_timestamp(thd, item);
+}
+
/*************************************************************************/
bool Type_handler_int_result::
@@ -2872,8 +4140,21 @@ bool Type_handler_typelib::
TYPELIB *typelib= NULL;
for (uint i= 0; i < nitems; i++)
{
- if ((typelib= items[i]->get_typelib()))
- break;
+ TYPELIB *typelib2;
+ if ((typelib2= items[i]->get_typelib()))
+ {
+ if (typelib)
+ {
+ /*
+ Two ENUM/SET columns found. We convert such combinations to VARCHAR.
+ This may change in the future to preserve ENUM/SET
+ if typelib definitions are equal.
+ */
+ handler->set_handler(&type_handler_varchar);
+ return func->aggregate_attributes_string(func_name, items, nitems);
+ }
+ typelib= typelib2;
+ }
}
DBUG_ASSERT(typelib); // There must be at least one typelib
func->set_typelib(typelib);
@@ -2985,8 +4266,18 @@ bool Type_handler_temporal_result::
Item_func_min_max_fix_attributes(THD *thd, Item_func_min_max *func,
Item **items, uint nitems) const
{
+ DBUG_ASSERT(func->field_type() != MYSQL_TYPE_DATE);
bool rc= Type_handler::Item_func_min_max_fix_attributes(thd, func,
items, nitems);
+ bool is_time= func->field_type() == MYSQL_TYPE_TIME;
+ func->decimals= 0;
+ for (uint i= 0; i < nitems; i++)
+ {
+ uint deci= is_time ? items[i]->time_precision(thd) :
+ items[i]->datetime_precision(thd);
+ set_if_bigger(func->decimals, deci);
+ }
+
if (rc || func->maybe_null)
return rc;
/*
@@ -3030,7 +4321,6 @@ bool Type_handler_temporal_result::
DATETIME DATETIME no conversion
DATETIME TIMESTAMP safe conversion
DATETIME DATE safe conversion
- DATE DATE no conversion
TIME TIME no conversion
Note, a function cannot return TIMESTAMP if it has non-TIMESTAMP
@@ -3047,9 +4337,6 @@ bool Type_handler_temporal_result::
-------------------- ------------- -------
TIMESTAMP TIME Not possible
DATETIME TIME depends on OLD_MODE_ZERO_DATE_TIME_CAST
- DATE TIMESTAMP Not possible
- DATE DATETIME Not possible
- DATE TIME Not possible
TIME TIMESTAMP Not possible
TIME DATETIME Not possible
TIME DATE Not possible
@@ -3072,6 +4359,30 @@ bool Type_handler_temporal_result::
}
+bool Type_handler_date_common::
+ Item_func_min_max_fix_attributes(THD *thd, Item_func_min_max *func,
+ Item **items, uint nitems) const
+{
+ func->fix_attributes_date();
+ if (func->maybe_null)
+ return false;
+ /*
+ We cannot trust the generic maybe_null value calculated during fix_fields().
+ If a conversion from non-temoral types to DATE happens,
+ then the result can be NULL (even if all arguments are not NULL).
+ */
+ for (uint i= 0; i < nitems; i++)
+ {
+ if (items[i]->type_handler()->cmp_type() != TIME_RESULT)
+ {
+ func->maybe_null= true;
+ break;
+ }
+ }
+ return false;
+}
+
+
bool Type_handler_real_result::
Item_func_min_max_fix_attributes(THD *thd, Item_func_min_max *func,
Item **items, uint nitems) const
@@ -3094,6 +4405,13 @@ bool Type_handler_int_result::
}
+bool Type_handler_bool::
+ Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *func) const
+{
+ return func->fix_length_and_dec_numeric(&type_handler_bool);
+}
+
+
bool Type_handler_real_result::
Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *func) const
{
@@ -3117,9 +4435,6 @@ bool Type_handler_string_result::
}
-/**
- Traditional temporal types always preserve the type of the argument.
-*/
bool Type_handler_temporal_result::
Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *func) const
{
@@ -3292,15 +4607,6 @@ bool Type_handler_int_result::Item_val_bool(Item *item) const
return item->val_int() != 0;
}
-bool Type_handler_decimal_result::Item_val_bool(Item *item) const
-{
- my_decimal decimal_value;
- my_decimal *val= item->val_decimal(&decimal_value);
- if (val)
- return !my_decimal_is_zero(val);
- return false;
-}
-
bool Type_handler_temporal_result::Item_val_bool(Item *item) const
{
return item->val_real() != 0.0;
@@ -3314,48 +4620,93 @@ bool Type_handler_string_result::Item_val_bool(Item *item) const
/*************************************************************************/
-bool Type_handler_int_result::Item_get_date(Item *item, MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+
+bool Type_handler::Item_get_date_with_warn(THD *thd, Item *item,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
{
- return item->get_date_from_int(ltime, fuzzydate);
+ const TABLE_SHARE *s= item->field_table_or_null();
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ item->field_name_or_null(), ltime, fuzzydate);
+ Item_get_date(thd, item, &warn, ltime, fuzzydate);
+ return ltime->time_type < 0;
}
-bool Type_handler_year::Item_get_date(Item *item, MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+bool Type_handler::Item_func_hybrid_field_type_get_date_with_warn(THD *thd,
+ Item_func_hybrid_field_type *item,
+ MYSQL_TIME *ltime,
+ date_mode_t mode) const
{
- return item->get_date_from_year(ltime, fuzzydate);
+ const TABLE_SHARE *s= item->field_table_or_null();
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ item->field_name_or_null(), ltime, mode);
+ Item_func_hybrid_field_type_get_date(thd, item, &warn, ltime, mode);
+ return ltime->time_type < 0;
}
-bool Type_handler_real_result::Item_get_date(Item *item, MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+/************************************************************************/
+void Type_handler_decimal_result::Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *warn,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
{
- return item->get_date_from_real(ltime, fuzzydate);
+ new(ltime) Temporal_hybrid(thd, warn, VDec(item).ptr(), fuzzydate);
}
-bool Type_handler_decimal_result::Item_get_date(Item *item, MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+void Type_handler_int_result::Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *warn,
+ MYSQL_TIME *to,
+ date_mode_t mode) const
{
- return item->get_date_from_decimal(ltime, fuzzydate);
+ new(to) Temporal_hybrid(thd, warn, item->to_longlong_hybrid_null(), mode);
}
-bool Type_handler_string_result::Item_get_date(Item *item, MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+void Type_handler_year::Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *warn,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
{
- return item->get_date_from_string(ltime, fuzzydate);
+ VYear year(item);
+ DBUG_ASSERT(!year.truncated());
+ Longlong_hybrid_null nr(Longlong_null(year.to_YYYYMMDD(), year.is_null()),
+ item->unsigned_flag);
+ new(ltime) Temporal_hybrid(thd, warn, nr, fuzzydate);
}
-bool Type_handler_temporal_result::Item_get_date(Item *item, MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+void Type_handler_real_result::Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *warn,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
+{
+ new(ltime) Temporal_hybrid(thd, warn, item->to_double_null(), fuzzydate);
+}
+
+
+void Type_handler_string_result::Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *warn,
+ MYSQL_TIME *ltime,
+ date_mode_t mode) const
+{
+ StringBuffer<40> tmp;
+ new(ltime) Temporal_hybrid(thd, warn, item->val_str(&tmp), mode);
+}
+
+
+void Type_handler_temporal_result::Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *warn,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
{
DBUG_ASSERT(0); // Temporal type items must implement native get_date()
item->null_value= true;
- set_zero_time(ltime, mysql_timestamp_type());
- return true;
+ set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
}
@@ -3364,19 +4715,19 @@ bool Type_handler_temporal_result::Item_get_date(Item *item, MYSQL_TIME *ltime,
longlong Type_handler_real_result::
Item_val_int_signed_typecast(Item *item) const
{
- return item->val_int();
+ return item->val_int_signed_typecast_from_real();
}
longlong Type_handler_int_result::
Item_val_int_signed_typecast(Item *item) const
{
- return item->val_int_signed_typecast_from_int();
+ return item->val_int();
}
longlong Type_handler_decimal_result::
Item_val_int_signed_typecast(Item *item) const
{
- return item->val_int();
+ return VDec(item).to_longlong(false);
}
longlong Type_handler_temporal_result::
@@ -3396,7 +4747,7 @@ longlong Type_handler_string_result::
longlong Type_handler_real_result::
Item_val_int_unsigned_typecast(Item *item) const
{
- return item->val_int_unsigned_typecast_from_int();
+ return item->val_int_unsigned_typecast_from_real();
}
longlong Type_handler_int_result::
@@ -3405,16 +4756,36 @@ longlong Type_handler_int_result::
return item->val_int_unsigned_typecast_from_int();
}
-longlong Type_handler_decimal_result::
+longlong Type_handler_temporal_result::
Item_val_int_unsigned_typecast(Item *item) const
{
- return item->val_int_unsigned_typecast_from_decimal();
+ return item->val_int_unsigned_typecast_from_int();
}
-longlong Type_handler_temporal_result::
+longlong Type_handler_time_common::
Item_val_int_unsigned_typecast(Item *item) const
{
- return item->val_int_unsigned_typecast_from_int();
+ /*
+ TODO: this should eventually be fixed to do rounding
+ when TIME_ROUND_FRACTIONAL is enabled, together with
+ Field_{tiny|short|long|longlong}::store_time_dec().
+ See MDEV-19502.
+ */
+ THD *thd= current_thd;
+ Time tm(thd, item);
+ DBUG_ASSERT(!tm.is_valid_time() == item->null_value);
+ if (!tm.is_valid_time())
+ return 0;
+ longlong res= tm.to_longlong();
+ if (res < 0)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_DATA_OVERFLOW, ER_THD(thd, ER_DATA_OVERFLOW),
+ ErrConvTime(tm.get_mysql_time()).ptr(),
+ "UNSIGNED BIGINT");
+ return 0;
+ }
+ return res;
}
longlong Type_handler_string_result::
@@ -3471,7 +4842,7 @@ Type_handler_decimal_result::Item_func_hybrid_field_type_val_str(
Item_func_hybrid_field_type *item,
String *str) const
{
- return item->val_str_from_decimal_op(str);
+ return VDec_op(item).to_string_round(str, item->decimals);
}
@@ -3480,7 +4851,7 @@ Type_handler_decimal_result::Item_func_hybrid_field_type_val_real(
Item_func_hybrid_field_type *item)
const
{
- return item->val_real_from_decimal_op();
+ return VDec_op(item).to_double();
}
@@ -3489,7 +4860,7 @@ Type_handler_decimal_result::Item_func_hybrid_field_type_val_int(
Item_func_hybrid_field_type *item)
const
{
- return item->val_int_from_decimal_op();
+ return VDec_op(item).to_longlong(item->unsigned_flag);
}
@@ -3498,17 +4869,35 @@ Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal(
Item_func_hybrid_field_type *item,
my_decimal *dec) const
{
- return item->val_decimal_from_decimal_op(dec);
+ return VDec_op(item).to_decimal(dec);
}
-bool
+void
Type_handler_decimal_result::Item_func_hybrid_field_type_get_date(
+ THD *thd,
+ Item_func_hybrid_field_type *item,
+ Temporal::Warn *warn,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
+{
+ new (ltime) Temporal_hybrid(thd, warn, VDec_op(item).ptr(), fuzzydate);
+}
+
+
+void
+Type_handler_year::Item_func_hybrid_field_type_get_date(
+ THD *thd,
Item_func_hybrid_field_type *item,
+ Temporal::Warn *warn,
MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- return item->get_date_from_decimal_op(ltime, fuzzydate);
+ VYear_op year(item);
+ DBUG_ASSERT(!year.truncated());
+ Longlong_hybrid_null nr(Longlong_null(year.to_YYYYMMDD(), year.is_null()),
+ item->unsigned_flag);
+ new(ltime) Temporal_hybrid(thd, warn, nr, fuzzydate);
}
@@ -3551,17 +4940,18 @@ Type_handler_int_result::Item_func_hybrid_field_type_val_decimal(
}
-bool
+void
Type_handler_int_result::Item_func_hybrid_field_type_get_date(
+ THD *thd,
Item_func_hybrid_field_type *item,
- MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+ Temporal::Warn *warn,
+ MYSQL_TIME *to,
+ date_mode_t mode) const
{
- return item->get_date_from_int_op(ltime, fuzzydate);
+ new(to) Temporal_hybrid(thd, warn, item->to_longlong_hybrid_null_op(), mode);
}
-
/***************************************************************************/
String *
@@ -3572,7 +4962,6 @@ Type_handler_double::Item_func_hybrid_field_type_val_str(
return item->val_str_from_real_op(str);
}
-
String *
Type_handler_float::Item_func_hybrid_field_type_val_str(
Item_func_hybrid_field_type *item,
@@ -3585,7 +4974,6 @@ Type_handler_float::Item_func_hybrid_field_type_val_str(
return str;
}
-
double
Type_handler_real_result::Item_func_hybrid_field_type_val_real(
Item_func_hybrid_field_type *item)
@@ -3613,13 +5001,15 @@ Type_handler_real_result::Item_func_hybrid_field_type_val_decimal(
}
-bool
+void
Type_handler_real_result::Item_func_hybrid_field_type_get_date(
+ THD *thd,
Item_func_hybrid_field_type *item,
- MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+ Temporal::Warn *warn,
+ MYSQL_TIME *to,
+ date_mode_t mode) const
{
- return item->get_date_from_real_op(ltime, fuzzydate);
+ new(to) Temporal_hybrid(thd, warn, item->to_double_null_op(), mode);
}
@@ -3661,13 +5051,16 @@ Type_handler_temporal_result::Item_func_hybrid_field_type_val_decimal(
}
-bool
+void
Type_handler_temporal_result::Item_func_hybrid_field_type_get_date(
+ THD *thd,
Item_func_hybrid_field_type *item,
+ Temporal::Warn *warn,
MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- return item->date_op(ltime, fuzzydate);
+ if (item->date_op(thd, ltime, fuzzydate))
+ set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
}
@@ -3709,13 +5102,16 @@ Type_handler_time_common::Item_func_hybrid_field_type_val_decimal(
}
-bool
+void
Type_handler_time_common::Item_func_hybrid_field_type_get_date(
+ THD *thd,
Item_func_hybrid_field_type *item,
+ Temporal::Warn *warn,
MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+ date_mode_t fuzzydate) const
{
- return item->time_op(ltime);
+ if (item->time_op(thd, ltime))
+ set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
}
@@ -3757,13 +5153,18 @@ Type_handler_string_result::Item_func_hybrid_field_type_val_decimal(
}
-bool
+void
Type_handler_string_result::Item_func_hybrid_field_type_get_date(
+ THD *thd,
Item_func_hybrid_field_type *item,
+ Temporal::Warn *warn,
MYSQL_TIME *ltime,
- ulonglong fuzzydate) const
+ date_mode_t mode) const
{
- return item->get_date_from_str_op(ltime, fuzzydate);
+ StringBuffer<40> tmp;
+ String *res= item->str_op(&tmp);
+ DBUG_ASSERT((res == NULL) == item->null_value);
+ new(ltime) Temporal_hybrid(thd, warn, res, mode);
}
/***************************************************************************/
@@ -3801,10 +5202,22 @@ longlong Type_handler_string_result::
return func->val_int_cmp_string();
}
-longlong Type_handler_temporal_result::
+longlong Type_handler_temporal_with_date::
+ Item_func_between_val_int(Item_func_between *func) const
+{
+ return func->val_int_cmp_datetime();
+}
+
+longlong Type_handler_time_common::
+ Item_func_between_val_int(Item_func_between *func) const
+{
+ return func->val_int_cmp_time();
+}
+
+longlong Type_handler_timestamp_common::
Item_func_between_val_int(Item_func_between *func) const
{
- return func->val_int_cmp_temporal();
+ return func->val_int_cmp_native();
}
longlong Type_handler_int_result::
@@ -3870,6 +5283,12 @@ cmp_item *Type_handler_temporal_with_date::make_cmp_item(THD *thd,
return new (thd->mem_root) cmp_item_datetime;
}
+cmp_item *Type_handler_timestamp_common::make_cmp_item(THD *thd,
+ CHARSET_INFO *cs) const
+{
+ return new (thd->mem_root) cmp_item_timestamp;
+}
+
/***************************************************************************/
static int srtcmp_in(const void *cs_, const void *x_, const void *y_)
@@ -3933,6 +5352,15 @@ Type_handler_temporal_with_date::make_in_vector(THD *thd,
}
+in_vector *
+Type_handler_timestamp_common::make_in_vector(THD *thd,
+ const Item_func_in *func,
+ uint nargs) const
+{
+ return new (thd->mem_root) in_timestamp(thd, nargs);
+}
+
+
in_vector *Type_handler_row::make_in_vector(THD *thd,
const Item_func_in *func,
uint nargs) const
@@ -4027,10 +5455,33 @@ String *Type_handler_string_result::
}
-String *Type_handler_temporal_result::
+String *Type_handler_time_common::
+ Item_func_min_max_val_str(Item_func_min_max *func, String *str) const
+{
+ return Time(func).to_string(str, func->decimals);
+}
+
+
+String *Type_handler_date_common::
+ Item_func_min_max_val_str(Item_func_min_max *func, String *str) const
+{
+ return Date(func).to_string(str);
+}
+
+
+String *Type_handler_datetime_common::
+ Item_func_min_max_val_str(Item_func_min_max *func, String *str) const
+{
+ return Datetime(func).to_string(str, func->decimals);
+}
+
+
+String *Type_handler_timestamp_common::
Item_func_min_max_val_str(Item_func_min_max *func, String *str) const
{
- return func->val_string_from_date(str);
+ THD *thd= current_thd;
+ return Timestamp_or_zero_datetime_native_null(thd, func).
+ to_datetime(thd).to_string(str, func->decimals);
}
@@ -4044,7 +5495,7 @@ String *Type_handler_int_result::
String *Type_handler_decimal_result::
Item_func_min_max_val_str(Item_func_min_max *func, String *str) const
{
- return func->val_string_from_decimal(str);
+ return VDec(func).to_string_round(str, func->decimals);
}
@@ -4073,13 +5524,33 @@ double Type_handler_string_result::
}
-double Type_handler_temporal_result::
+double Type_handler_time_common::
Item_func_min_max_val_real(Item_func_min_max *func) const
{
- MYSQL_TIME ltime;
- if (func->get_date(&ltime, 0))
- return 0;
- return TIME_to_double(&ltime);
+ return Time(current_thd, func).to_double();
+}
+
+
+double Type_handler_date_common::
+ Item_func_min_max_val_real(Item_func_min_max *func) const
+{
+ return Date(current_thd, func).to_double();
+}
+
+
+double Type_handler_datetime_common::
+ Item_func_min_max_val_real(Item_func_min_max *func) const
+{
+ return Datetime(current_thd, func).to_double();
+}
+
+
+double Type_handler_timestamp_common::
+ Item_func_min_max_val_real(Item_func_min_max *func) const
+{
+ THD *thd= current_thd;
+ return Timestamp_or_zero_datetime_native_null(thd, func).
+ to_datetime(thd).to_double();
}
@@ -4097,13 +5568,33 @@ longlong Type_handler_string_result::
}
-longlong Type_handler_temporal_result::
+longlong Type_handler_time_common::
Item_func_min_max_val_int(Item_func_min_max *func) const
{
- MYSQL_TIME ltime;
- if (func->get_date(&ltime, 0))
- return 0;
- return TIME_to_ulonglong(&ltime);
+ return Time(current_thd, func).to_longlong();
+}
+
+
+longlong Type_handler_date_common::
+ Item_func_min_max_val_int(Item_func_min_max *func) const
+{
+ return Date(current_thd, func).to_longlong();
+}
+
+
+longlong Type_handler_datetime_common::
+ Item_func_min_max_val_int(Item_func_min_max *func) const
+{
+ return Datetime(current_thd, func).to_longlong();
+}
+
+
+longlong Type_handler_timestamp_common::
+ Item_func_min_max_val_int(Item_func_min_max *func) const
+{
+ THD *thd= current_thd;
+ return Timestamp_or_zero_datetime_native_null(thd, func).
+ to_datetime(thd).to_longlong();
}
@@ -4130,20 +5621,43 @@ my_decimal *Type_handler_numeric::
}
-my_decimal *Type_handler_temporal_result::
+my_decimal *Type_handler_time_common::
Item_func_min_max_val_decimal(Item_func_min_max *func,
my_decimal *dec) const
{
- MYSQL_TIME ltime;
- if (func->get_date(&ltime, 0))
- return 0;
- return date2my_decimal(&ltime, dec);
+ return Time(current_thd, func).to_decimal(dec);
+}
+
+
+my_decimal *Type_handler_date_common::
+ Item_func_min_max_val_decimal(Item_func_min_max *func,
+ my_decimal *dec) const
+{
+ return Date(current_thd, func).to_decimal(dec);
+}
+
+
+my_decimal *Type_handler_datetime_common::
+ Item_func_min_max_val_decimal(Item_func_min_max *func,
+ my_decimal *dec) const
+{
+ return Datetime(current_thd, func).to_decimal(dec);
+}
+
+
+my_decimal *Type_handler_timestamp_common::
+ Item_func_min_max_val_decimal(Item_func_min_max *func,
+ my_decimal *dec) const
+{
+ THD *thd= current_thd;
+ return Timestamp_or_zero_datetime_native_null(thd, func).
+ to_datetime(thd).to_decimal(dec);
}
bool Type_handler_string_result::
- Item_func_min_max_get_date(Item_func_min_max *func,
- MYSQL_TIME *ltime, ulonglong fuzzydate) const
+ Item_func_min_max_get_date(THD *thd, Item_func_min_max *func,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const
{
/*
just like ::val_int() method of a string item can be called,
@@ -4151,30 +5665,51 @@ bool Type_handler_string_result::
::get_date() can be called for non-temporal values,
for example, SELECT MONTH(GREATEST("2011-11-21", "2010-10-09"))
*/
- return func->get_date_from_string(ltime, fuzzydate);
+ return func->get_date_from_string(thd, ltime, fuzzydate);
}
bool Type_handler_numeric::
- Item_func_min_max_get_date(Item_func_min_max *func,
- MYSQL_TIME *ltime, ulonglong fuzzydate) const
+ Item_func_min_max_get_date(THD *thd, Item_func_min_max *func,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const
{
- return Item_get_date(func, ltime, fuzzydate);
+ return Item_get_date_with_warn(thd, func, ltime, fuzzydate);
}
bool Type_handler_temporal_result::
- Item_func_min_max_get_date(Item_func_min_max *func,
- MYSQL_TIME *ltime, ulonglong fuzzydate) const
+ Item_func_min_max_get_date(THD *thd, Item_func_min_max *func,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const
{
- return func->get_date_native(ltime, fuzzydate);
+ /*
+ - If the caller specified TIME_TIME_ONLY, then it's going to convert
+ a DATETIME or DATE to TIME. So we pass the default flags for date. This is
+ exactly the same with what Item_func_min_max_val_{int|real|decimal|str} or
+ Item_send_datetime() do. We return the value in accordance with the
+ current session date flags and let the caller further convert it to TIME.
+ - If the caller did not specify TIME_TIME_ONLY, then return the value
+ according to the flags supplied by the caller.
+ */
+ return func->get_date_native(thd, ltime,
+ fuzzydate & TIME_TIME_ONLY ?
+ Datetime::Options(thd) :
+ fuzzydate);
}
bool Type_handler_time_common::
- Item_func_min_max_get_date(Item_func_min_max *func,
- MYSQL_TIME *ltime, ulonglong fuzzydate) const
+ Item_func_min_max_get_date(THD *thd, Item_func_min_max *func,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const
+{
+ return func->get_time_native(thd, ltime);
+}
+
+
+bool Type_handler_timestamp_common::
+ Item_func_min_max_get_date(THD *thd, Item_func_min_max *func,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const
{
- return func->get_time_native(ltime);
+ return Timestamp_or_zero_datetime_native_null(thd, func).
+ to_datetime(thd).copy_to_mysql_time(ltime);
}
/***************************************************************************/
@@ -4308,7 +5843,41 @@ bool Type_handler_row::
bool Type_handler_int_result::
Item_func_round_fix_length_and_dec(Item_func_round *item) const
{
- item->fix_arg_int();
+ item->fix_arg_int(this, item->arguments()[0],
+ field_type() == MYSQL_TYPE_LONGLONG);
+ return false;
+}
+
+
+bool Type_handler_year::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ item->fix_arg_int(&type_handler_long, item->arguments()[0], false); // 10.5 merge: fix to type_handler_ulong
+ return false;
+}
+
+
+bool Type_handler_hex_hybrid::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ item->fix_arg_hex_hybrid();
+ return false;
+}
+
+
+bool Type_handler_bit::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ uint nbits= item->arguments()[0]->max_length;
+ item->fix_length_and_dec_ulong_or_ulonglong_by_nbits(nbits);
+ return false;
+}
+
+
+bool Type_handler_typelib::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ item->fix_length_and_dec_long_or_longlong(5, true);
return false;
}
@@ -4329,10 +5898,36 @@ bool Type_handler_decimal_result::
}
-bool Type_handler_temporal_result::
+bool Type_handler_date_common::
Item_func_round_fix_length_and_dec(Item_func_round *item) const
{
- item->fix_arg_double();
+ static const Type_std_attributes attr(8, 0/*dec*/, true/*unsigned*/,
+ DTCollation_numeric::singleton());
+ item->fix_arg_int(&type_handler_long, &attr, false); // 10.5 merge: fix to *_ulong
+ return false;
+}
+
+
+bool Type_handler_time_common::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ item->fix_arg_time();
+ return false;
+}
+
+
+bool Type_handler_datetime_common::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ item->fix_arg_datetime();
+ return false;
+}
+
+
+bool Type_handler_timestamp_common::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ item->fix_arg_datetime();
return false;
}
@@ -4366,7 +5961,43 @@ bool Type_handler_row::
bool Type_handler_int_result::
Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
{
- item->fix_length_and_dec_int_or_decimal();
+ item->Type_std_attributes::set(item->arguments()[0]);
+ item->set_handler(this);
+ return false;
+}
+
+
+bool Type_handler_year::
+ Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
+{
+ item->Type_std_attributes::set(item->arguments()[0]);
+ item->set_handler(&type_handler_long);
+ return false;
+}
+
+
+bool Type_handler_bit::
+ Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
+{
+ uint nbits= item->arguments()[0]->max_length;
+ item->fix_length_and_dec_ulong_or_ulonglong_by_nbits(nbits);
+ return false;
+}
+
+
+bool Type_handler_typelib::
+ Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
+{
+ item->fix_length_and_dec_long_or_longlong(5, true);
+ return false;
+}
+
+
+bool Type_handler_hex_hybrid::
+ Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
+{
+ uint nchars= item->arguments()[0]->decimal_precision();
+ item->fix_length_and_dec_long_or_longlong(nchars, true);
return false;
}
@@ -4387,10 +6018,37 @@ bool Type_handler_decimal_result::
}
-bool Type_handler_temporal_result::
+bool Type_handler_date_common::
Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
{
- item->fix_length_and_dec_int_or_decimal();
+ static const Type_std_attributes attr(8, 0/*dec*/, true/*unsigned*/,
+ DTCollation_numeric::singleton());
+ item->Type_std_attributes::set(attr);
+ item->set_handler(&type_handler_long); // 10.5 merge: fix to *_ulong
+ return false;
+}
+
+
+bool Type_handler_time_common::
+ Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
+{
+ item->fix_length_and_dec_time();
+ return false;
+}
+
+
+bool Type_handler_datetime_common::
+ Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
+{
+ item->fix_length_and_dec_datetime();
+ return false;
+}
+
+
+bool Type_handler_timestamp_common::
+ Item_func_int_val_fix_length_and_dec(Item_func_int_val *item) const
+{
+ item->fix_length_and_dec_datetime();
return false;
}
@@ -4647,7 +6305,7 @@ bool Type_handler::
Item_time_typecast_fix_length_and_dec(Item_time_typecast *item) const
{
uint dec= item->decimals == NOT_FIXED_DEC ?
- item->arguments()[0]->time_precision() :
+ item->arguments()[0]->time_precision(current_thd) :
item->decimals;
item->fix_attributes_temporal(MIN_TIME_WIDTH, dec);
item->maybe_null= true;
@@ -4669,7 +6327,7 @@ bool Type_handler::
const
{
uint dec= item->decimals == NOT_FIXED_DEC ?
- item->arguments()[0]->datetime_precision() :
+ item->arguments()[0]->datetime_precision(current_thd) :
item->decimals;
item->fix_attributes_temporal(MAX_DATETIME_WIDTH, dec);
item->maybe_null= true;
@@ -4933,7 +6591,6 @@ bool Type_handler_decimal_result::
bool Type_handler_temporal_result::
Item_func_div_fix_length_and_dec(Item_func_div *item) const
{
- // Item_func_div::int_op() is not implemented. Disallow DECIMAL->INT downcast.
item->fix_length_and_dec_temporal(false);
return false;
}
@@ -4997,32 +6654,35 @@ bool Type_handler_string_result::
/***************************************************************************/
-uint Type_handler::Item_time_precision(Item *item) const
+uint Type_handler::Item_time_precision(THD *thd, Item *item) const
{
return MY_MIN(item->decimals, TIME_SECOND_PART_DIGITS);
}
-uint Type_handler::Item_datetime_precision(Item *item) const
+uint Type_handler::Item_datetime_precision(THD *thd, Item *item) const
{
return MY_MIN(item->decimals, TIME_SECOND_PART_DIGITS);
}
-uint Type_handler_string_result::Item_temporal_precision(Item *item,
+uint Type_handler_string_result::Item_temporal_precision(THD *thd, Item *item,
bool is_time) const
{
- MYSQL_TIME ltime;
StringBuffer<64> buf;
String *tmp;
MYSQL_TIME_STATUS status;
- DBUG_ASSERT(item->fixed);
+ DBUG_ASSERT(item->is_fixed());
+ // Nanosecond rounding is not needed here, for performance purposes
if ((tmp= item->val_str(&buf)) &&
- !(is_time ?
- str_to_time(tmp->charset(), tmp->ptr(), tmp->length(),
- &ltime, TIME_TIME_ONLY, &status) :
- str_to_datetime(tmp->charset(), tmp->ptr(), tmp->length(),
- &ltime, TIME_FUZZY_DATES, &status)))
+ (is_time ?
+ Time(thd, &status, tmp->ptr(), tmp->length(), tmp->charset(),
+ Time::Options(TIME_TIME_ONLY, TIME_FRAC_TRUNCATE,
+ Time::DATETIME_TO_TIME_YYYYMMDD_TRUNCATE)).
+ is_valid_time() :
+ Datetime(thd, &status, tmp->ptr(), tmp->length(), tmp->charset(),
+ Datetime::Options(TIME_FUZZY_DATES, TIME_FRAC_TRUNCATE)).
+ is_valid_datetime()))
return MY_MIN(status.precision, TIME_SECOND_PART_DIGITS);
return MY_MIN(item->decimals, TIME_SECOND_PART_DIGITS);
}
@@ -5228,7 +6888,7 @@ bool Type_handler::check_null(const Item *item, st_value *value) const
bool Type_handler_null::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
value->m_type= DYN_COL_NULL;
return true;
@@ -5236,7 +6896,7 @@ bool Type_handler_null::
bool Type_handler_row::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
DBUG_ASSERT(0);
value->m_type= DYN_COL_NULL;
@@ -5245,7 +6905,7 @@ bool Type_handler_row::
bool Type_handler_int_result::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
value->m_type= item->unsigned_flag ? DYN_COL_UINT : DYN_COL_INT;
value->value.m_longlong= item->val_int();
@@ -5254,7 +6914,7 @@ bool Type_handler_int_result::
bool Type_handler_real_result::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
value->m_type= DYN_COL_DOUBLE;
value->value.m_double= item->val_real();
@@ -5263,7 +6923,7 @@ bool Type_handler_real_result::
bool Type_handler_decimal_result::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
value->m_type= DYN_COL_DECIMAL;
my_decimal *dec= item->val_decimal(&value->m_decimal);
@@ -5274,7 +6934,7 @@ bool Type_handler_decimal_result::
bool Type_handler_string_result::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
value->m_type= DYN_COL_STRING;
String *str= item->val_str(&value->m_string);
@@ -5285,19 +6945,20 @@ bool Type_handler_string_result::
bool Type_handler_temporal_with_date::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
value->m_type= DYN_COL_DATETIME;
- item->get_date(&value->value.m_time, sql_mode_for_dates(current_thd));
+ item->get_date(thd, &value->value.m_time,
+ Datetime::Options(thd, TIME_FRAC_NONE));
return check_null(item, value);
}
bool Type_handler_time_common::
- Item_save_in_value(Item *item, st_value *value) const
+ Item_save_in_value(THD *thd, Item *item, st_value *value) const
{
value->m_type= DYN_COL_DATETIME;
- item->get_time(&value->value.m_time);
+ item->get_time(thd, &value->value.m_time);
return check_null(item, value);
}
@@ -5478,10 +7139,23 @@ bool Type_handler::
}
+bool Type_handler::Item_send_timestamp(Item *item,
+ Protocol *protocol,
+ st_value *buf) const
+{
+ Timestamp_or_zero_datetime_native_null native(protocol->thd, item);
+ if (native.is_null())
+ return protocol->store_null();
+ native.to_TIME(protocol->thd, &buf->value.m_time);
+ return protocol->store(&buf->value.m_time, item->decimals);
+}
+
+
bool Type_handler::
Item_send_datetime(Item *item, Protocol *protocol, st_value *buf) const
{
- item->get_date(&buf->value.m_time, sql_mode_for_dates(current_thd));
+ item->get_date(protocol->thd, &buf->value.m_time,
+ Datetime::Options(protocol->thd));
if (!item->null_value)
return protocol->store(&buf->value.m_time, item->decimals);
return protocol->store_null();
@@ -5491,7 +7165,8 @@ bool Type_handler::
bool Type_handler::
Item_send_date(Item *item, Protocol *protocol, st_value *buf) const
{
- item->get_date(&buf->value.m_time, sql_mode_for_dates(current_thd));
+ item->get_date(protocol->thd, &buf->value.m_time,
+ Date::Options(protocol->thd));
if (!item->null_value)
return protocol->store_date(&buf->value.m_time);
return protocol->store_null();
@@ -5501,7 +7176,7 @@ bool Type_handler::
bool Type_handler::
Item_send_time(Item *item, Protocol *protocol, st_value *buf) const
{
- item->get_time(&buf->value.m_time);
+ item->get_time(protocol->thd, &buf->value.m_time);
if (!item->null_value)
return protocol->store_time(&buf->value.m_time, item->decimals);
return protocol->store_null();
@@ -5534,11 +7209,10 @@ Item *Type_handler_real_result::
Item *Type_handler_decimal_result::
make_const_item_for_comparison(THD *thd, Item *item, const Item *cmp) const
{
- my_decimal decimal_value;
- my_decimal *result= item->val_decimal(&decimal_value);
- if (item->null_value)
+ VDec result(item);
+ if (result.is_null())
return new (thd->mem_root) Item_null(thd, item->name.str);
- return new (thd->mem_root) Item_decimal(thd, item->name.str, result,
+ return new (thd->mem_root) Item_decimal(thd, item->name.str, result.ptr(),
item->max_length, item->decimals);
}
@@ -5561,7 +7235,7 @@ Item *Type_handler_time_common::
make_const_item_for_comparison(THD *thd, Item *item, const Item *cmp) const
{
Item_cache_temporal *cache;
- longlong value= item->val_time_packed();
+ longlong value= item->val_time_packed(thd);
if (item->null_value)
return new (thd->mem_root) Item_null(thd, item->name.str);
cache= new (thd->mem_root) Item_cache_time(thd);
@@ -5575,7 +7249,7 @@ Item *Type_handler_temporal_with_date::
make_const_item_for_comparison(THD *thd, Item *item, const Item *cmp) const
{
Item_cache_temporal *cache;
- longlong value= item->val_datetime_packed();
+ longlong value= item->val_datetime_packed(thd);
if (item->null_value)
return new (thd->mem_root) Item_null(thd, item->name.str);
cache= new (thd->mem_root) Item_cache_datetime(thd);
@@ -5786,6 +7460,21 @@ Item *Type_handler_long_blob::
return new (thd->mem_root) Item_char_typecast(thd, item, len, real_cs);
}
+Item *Type_handler_interval_DDhhmmssff::
+ create_typecast_item(THD *thd, Item *item,
+ const Type_cast_attributes &attr) const
+{
+ if (attr.decimals() > MAX_DATETIME_PRECISION)
+ {
+ wrong_precision_error(ER_TOO_BIG_PRECISION, item, attr.decimals(),
+ MAX_DATETIME_PRECISION);
+ return 0;
+ }
+ return new (thd->mem_root) Item_interval_DDhhmmssff_typecast(thd, item,
+ (uint)
+ attr.decimals());
+}
+
/***************************************************************************/
void Type_handler_string_result::Item_param_setup_conversion(THD *thd,
@@ -5937,21 +7626,487 @@ void Type_handler_geometry::Item_param_set_param_func(Item_param *param,
/***************************************************************************/
-bool Type_handler_string_result::union_element_finalize(Item_type_holder *item) const
+Field *Type_handler_row::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
{
- if (item->collation.derivation == DERIVATION_NONE)
- {
- my_error(ER_CANT_AGGREGATE_NCOLLATIONS, MYF(0), "UNION");
- return true;
- }
- return false;
+ DBUG_ASSERT(attr->length == 0);
+ DBUG_ASSERT(f_maybe_null(attr->pack_flag));
+ return new (mem_root) Field_row(rec.ptr(), name);
}
-bool Type_handler_null::union_element_finalize(Item_type_holder *item) const
+
+Field *Type_handler_olddecimal::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
{
- item->set_handler(&type_handler_string);
+ return new (mem_root)
+ Field_decimal(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_decimals(attr->pack_flag),
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+}
+
+
+Field *Type_handler_newdecimal::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_new_decimal(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_decimals(attr->pack_flag),
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+}
+
+
+Field *Type_handler_float::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ int decimals= f_decimals(attr->pack_flag);
+ if (decimals == FLOATING_POINT_DECIMALS)
+ decimals= NOT_FIXED_DEC;
+ return new (mem_root)
+ Field_float(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, decimals,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag)== 0);
+}
+
+
+Field *Type_handler_double::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ int decimals= f_decimals(attr->pack_flag);
+ if (decimals == FLOATING_POINT_DECIMALS)
+ decimals= NOT_FIXED_DEC;
+ return new (mem_root)
+ Field_double(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, decimals,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag)== 0);
+}
+
+
+Field *Type_handler_tiny::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_tiny(rec.ptr(), (uint32) attr->length, rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+}
+
+
+Field *Type_handler_short::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_short(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+}
+
+
+Field *Type_handler_int24::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_medium(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+}
+
+
+Field *Type_handler_long::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_long(rec.ptr(), (uint32) attr->length, rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+}
+
+
+Field *Type_handler_longlong::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ if (flags & (VERS_ROW_START|VERS_ROW_END))
+ return new (mem_root)
+ Field_vers_trx_id(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+ return new (mem_root)
+ Field_longlong(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ f_is_zerofill(attr->pack_flag) != 0,
+ f_is_dec(attr->pack_flag) == 0);
+}
+
+
+Field *Type_handler_timestamp::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new_Field_timestamp(mem_root,
+ rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, share,
+ attr->temporal_dec(MAX_DATETIME_WIDTH));
+}
+
+
+Field *Type_handler_timestamp2::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_timestampf(rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check,
+ name, share, attr->temporal_dec(MAX_DATETIME_WIDTH));
+}
+
+
+Field *Type_handler_year::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_year(rec.ptr(), (uint32) attr->length, rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name);
+}
+
+
+Field *Type_handler_date::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_date(rec.ptr(),rec.null_ptr(),rec.null_bit(),
+ attr->unireg_check, name);
+}
+
+
+Field *Type_handler_newdate::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_newdate(rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name);
+}
+
+
+Field *Type_handler_time::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new_Field_time(mem_root, rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ attr->temporal_dec(MIN_TIME_WIDTH));
+}
+
+
+Field *Type_handler_time2::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_timef(rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ attr->temporal_dec(MIN_TIME_WIDTH));
+}
+
+
+Field *Type_handler_datetime::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new_Field_datetime(mem_root, rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ attr->temporal_dec(MAX_DATETIME_WIDTH));
+}
+
+
+Field *Type_handler_datetime2::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_datetimef(rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name,
+ attr->temporal_dec(MAX_DATETIME_WIDTH));
+}
+
+
+Field *Type_handler_null::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_null(rec.ptr(), (uint32) attr->length, attr->unireg_check,
+ name, attr->charset);
+}
+
+
+Field *Type_handler_bit::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return f_bit_as_char(attr->pack_flag) ?
+ new (mem_root) Field_bit_as_char(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name) :
+ new (mem_root) Field_bit(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ bit.ptr(), bit.offs(), attr->unireg_check, name);
+}
+
+
+#ifdef HAVE_SPATIAL
+Field *Type_handler_geometry::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ status_var_increment(current_thd->status_var.feature_gis);
+ return new (mem_root)
+ Field_geom(rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, share,
+ attr->pack_flag_to_pack_length(), attr->geom_type, attr->srid);
+}
+#endif
+
+
+Field *Type_handler_string::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_string(rec.ptr(), (uint32) attr->length,
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, attr->charset);
+}
+
+
+Field *Type_handler_varchar::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ if (attr->unireg_check == Field::TMYSQL_COMPRESSED)
+ return new (mem_root)
+ Field_varstring_compressed(rec.ptr(), (uint32) attr->length,
+ HA_VARCHAR_PACKLENGTH((uint32) attr->length),
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, share, attr->charset,
+ zlib_compression_method);
+ return new (mem_root)
+ Field_varstring(rec.ptr(), (uint32) attr->length,
+ HA_VARCHAR_PACKLENGTH((uint32) attr->length),
+ rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, share, attr->charset);
+}
+
+
+Field *Type_handler_blob_common::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ if (attr->unireg_check == Field::TMYSQL_COMPRESSED)
+ return new (mem_root)
+ Field_blob_compressed(rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, share,
+ attr->pack_flag_to_pack_length(), attr->charset,
+ zlib_compression_method);
+ return new (mem_root)
+ Field_blob(rec.ptr(), rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, share,
+ attr->pack_flag_to_pack_length(), attr->charset);
+}
+
+
+Field *Type_handler_enum::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_enum(rec.ptr(), (uint32) attr->length, rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, attr->pack_flag_to_pack_length(),
+ attr->interval, attr->charset);
+}
+
+
+Field *Type_handler_set::
+ make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &rec, const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const
+{
+ return new (mem_root)
+ Field_set(rec.ptr(), (uint32) attr->length, rec.null_ptr(), rec.null_bit(),
+ attr->unireg_check, name, attr->pack_flag_to_pack_length(),
+ attr->interval, attr->charset);
+}
+
+
+/***************************************************************************/
+
+void Type_handler::
+ Column_definition_attributes_frm_pack(const Column_definition_attributes *def,
+ uchar *buff) const
+{
+ def->frm_pack_basic(buff);
+ def->frm_pack_charset(buff);
+}
+
+
+#ifdef HAVE_SPATIAL
+void Type_handler_geometry::
+ Column_definition_attributes_frm_pack(const Column_definition_attributes *def,
+ uchar *buff) const
+{
+ def->frm_pack_basic(buff);
+ buff[11]= 0;
+ buff[14]= (uchar) def->geom_type;
+}
+#endif
+
+
+/***************************************************************************/
+
+bool Type_handler::
+ Column_definition_attributes_frm_unpack(Column_definition_attributes *attr,
+ TABLE_SHARE *share,
+ const uchar *buffer,
+ LEX_CUSTRING *gis_options)
+ const
+{
+ attr->frm_unpack_basic(buffer);
+ return attr->frm_unpack_charset(share, buffer);
+}
+
+
+#ifdef HAVE_SPATIAL
+bool Type_handler_geometry::
+ Column_definition_attributes_frm_unpack(Column_definition_attributes *attr,
+ TABLE_SHARE *share,
+ const uchar *buffer,
+ LEX_CUSTRING *gis_options)
+ const
+{
+ uint gis_opt_read, gis_length, gis_decimals;
+ Field_geom::storage_type st_type;
+ attr->frm_unpack_basic(buffer);
+ // charset and geometry_type share the same byte in frm
+ attr->geom_type= (Field::geometry_type) buffer[14];
+ gis_opt_read= gis_field_options_read(gis_options->str,
+ gis_options->length,
+ &st_type, &gis_length,
+ &gis_decimals, &attr->srid);
+ gis_options->str+= gis_opt_read;
+ gis_options->length-= gis_opt_read;
return false;
}
+#endif
/***************************************************************************/
@@ -6014,6 +8169,562 @@ bool Type_handler_general_purpose_string::
/***************************************************************************/
+bool Type_handler_null::Item_const_eq(const Item_const *a,
+ const Item_const *b,
+ bool binary_cmp) const
+{
+ return true;
+}
+
+
+bool Type_handler_real_result::Item_const_eq(const Item_const *a,
+ const Item_const *b,
+ bool binary_cmp) const
+{
+ const double *va= a->const_ptr_double();
+ const double *vb= b->const_ptr_double();
+ return va[0] == vb[0];
+}
+
+
+bool Type_handler_int_result::Item_const_eq(const Item_const *a,
+ const Item_const *b,
+ bool binary_cmp) const
+{
+ const longlong *va= a->const_ptr_longlong();
+ const longlong *vb= b->const_ptr_longlong();
+ bool res= va[0] == vb[0] &&
+ (va[0] >= 0 ||
+ (a->get_type_all_attributes_from_const()->unsigned_flag ==
+ b->get_type_all_attributes_from_const()->unsigned_flag));
+ return res;
+}
+
+
+bool Type_handler_string_result::Item_const_eq(const Item_const *a,
+ const Item_const *b,
+ bool binary_cmp) const
+{
+ const String *sa= a->const_ptr_string();
+ const String *sb= b->const_ptr_string();
+ return binary_cmp ? sa->bin_eq(sb) :
+ a->get_type_all_attributes_from_const()->collation.collation ==
+ b->get_type_all_attributes_from_const()->collation.collation &&
+ sa->eq(sb, a->get_type_all_attributes_from_const()->collation.collation);
+}
+
+
+bool
+Type_handler_decimal_result::Item_const_eq(const Item_const *a,
+ const Item_const *b,
+ bool binary_cmp) const
+{
+ const my_decimal *da= a->const_ptr_my_decimal();
+ const my_decimal *db= b->const_ptr_my_decimal();
+ return !da->cmp(db) &&
+ (!binary_cmp ||
+ a->get_type_all_attributes_from_const()->decimals ==
+ b->get_type_all_attributes_from_const()->decimals);
+}
+
+
+bool
+Type_handler_temporal_result::Item_const_eq(const Item_const *a,
+ const Item_const *b,
+ bool binary_cmp) const
+{
+ const MYSQL_TIME *ta= a->const_ptr_mysql_time();
+ const MYSQL_TIME *tb= b->const_ptr_mysql_time();
+ return !my_time_compare(ta, tb) &&
+ (!binary_cmp ||
+ a->get_type_all_attributes_from_const()->decimals ==
+ b->get_type_all_attributes_from_const()->decimals);
+}
+
+/***************************************************************************/
+
+const Type_handler *
+Type_handler_hex_hybrid::cast_to_int_type_handler() const
+{
+ return &type_handler_longlong;
+}
+
+
+const Type_handler *
+Type_handler_hex_hybrid::type_handler_for_system_time() const
+{
+ return &type_handler_longlong;
+}
+
+
+/***************************************************************************/
+
+bool Type_handler_row::Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+{
+ DBUG_ASSERT(0);
+ return false;
+}
+
+
+bool Type_handler_int_result::Item_eq_value(THD *thd,
+ const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+{
+ longlong value0= a->val_int();
+ longlong value1= b->val_int();
+ return !a->null_value && !b->null_value && value0 == value1 &&
+ (value0 >= 0 || a->unsigned_flag == b->unsigned_flag);
+}
+
+
+bool Type_handler_real_result::Item_eq_value(THD *thd,
+ const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+{
+ double value0= a->val_real();
+ double value1= b->val_real();
+ return !a->null_value && !b->null_value && value0 == value1;
+}
+
+
+bool Type_handler_time_common::Item_eq_value(THD *thd,
+ const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+{
+ longlong value0= a->val_time_packed(thd);
+ longlong value1= b->val_time_packed(thd);
+ return !a->null_value && !b->null_value && value0 == value1;
+}
+
+
+bool Type_handler_temporal_with_date::Item_eq_value(THD *thd,
+ const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+{
+ longlong value0= a->val_datetime_packed(thd);
+ longlong value1= b->val_datetime_packed(thd);
+ return !a->null_value && !b->null_value && value0 == value1;
+}
+
+
+bool Type_handler_timestamp_common::Item_eq_value(THD *thd,
+ const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+{
+ Timestamp_or_zero_datetime_native_null na(thd, a, true);
+ Timestamp_or_zero_datetime_native_null nb(thd, b, true);
+ return !na.is_null() && !nb.is_null() && !cmp_native(na, nb);
+}
+
+
+bool Type_handler_string_result::Item_eq_value(THD *thd,
+ const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+{
+ String *va, *vb;
+ StringBuffer<128> cmp_value1, cmp_value2;
+ return (va= a->val_str(&cmp_value1)) &&
+ (vb= b->val_str(&cmp_value2)) &&
+ va->eq(vb, attr->compare_collation());
+}
+
+
+/***************************************************************************/
+
+bool Type_handler_string_result::union_element_finalize(Item_type_holder* item) const
+{
+ if (item->collation.derivation == DERIVATION_NONE)
+ {
+ my_error(ER_CANT_AGGREGATE_NCOLLATIONS, MYF(0), "UNION");
+ return true;
+ }
+ return false;
+}
+
+
+/***************************************************************************/
+
+void Type_handler_var_string::
+ Column_definition_implicit_upgrade(Column_definition *c) const
+{
+ // Change old VARCHAR to new VARCHAR
+ c->set_handler(&type_handler_varchar);
+}
+
+
+void Type_handler_time_common::
+ Column_definition_implicit_upgrade(Column_definition *c) const
+{
+ if (opt_mysql56_temporal_format)
+ c->set_handler(&type_handler_time2);
+ else
+ c->set_handler(&type_handler_time);
+}
+
+
+void Type_handler_datetime_common::
+ Column_definition_implicit_upgrade(Column_definition *c) const
+{
+ if (opt_mysql56_temporal_format)
+ c->set_handler(&type_handler_datetime2);
+ else
+ c->set_handler(&type_handler_datetime);
+}
+
+
+void Type_handler_timestamp_common::
+ Column_definition_implicit_upgrade(Column_definition *c) const
+{
+ if (opt_mysql56_temporal_format)
+ c->set_handler(&type_handler_timestamp2);
+ else
+ c->set_handler(&type_handler_timestamp);
+}
+
+
+/***************************************************************************/
+
+
+int Type_handler_temporal_with_date::stored_field_cmp_to_item(THD *thd,
+ Field *field,
+ Item *item) const
+{
+ MYSQL_TIME field_time, item_time, item_time2, *item_time_cmp= &item_time;
+ field->get_date(&field_time, Datetime::Options(TIME_INVALID_DATES, thd));
+ item->get_date(thd, &item_time, Datetime::Options(TIME_INVALID_DATES, thd));
+ if (item_time.time_type == MYSQL_TIMESTAMP_TIME &&
+ time_to_datetime(thd, &item_time, item_time_cmp= &item_time2))
+ return 1;
+ return my_time_compare(&field_time, item_time_cmp);
+}
+
+
+int Type_handler_time_common::stored_field_cmp_to_item(THD *thd,
+ Field *field,
+ Item *item) const
+{
+ MYSQL_TIME field_time, item_time;
+ field->get_date(&field_time, Time::Options(thd));
+ item->get_date(thd, &item_time, Time::Options(thd));
+ return my_time_compare(&field_time, &item_time);
+}
+
+
+int Type_handler_string_result::stored_field_cmp_to_item(THD *thd,
+ Field *field,
+ Item *item) const
+{
+ StringBuffer<MAX_FIELD_WIDTH> item_tmp;
+ StringBuffer<MAX_FIELD_WIDTH> field_tmp;
+ String *item_result= item->val_str(&item_tmp);
+ /*
+ Some implementations of Item::val_str(String*) actually modify
+ the field Item::null_value, hence we can't check it earlier.
+ */
+ if (item->null_value)
+ return 0;
+ String *field_result= field->val_str(&field_tmp);
+ return sortcmp(field_result, item_result, field->charset());
+}
+
+
+int Type_handler_int_result::stored_field_cmp_to_item(THD *thd,
+ Field *field,
+ Item *item) const
+{
+ DBUG_ASSERT(0); // Not used yet
+ return 0;
+}
+
+
+int Type_handler_real_result::stored_field_cmp_to_item(THD *thd,
+ Field *field,
+ Item *item) const
+{
+ /*
+ The patch for Bug#13463415 started using this function for comparing
+ BIGINTs. That uncovered a bug in Visual Studio 32bit optimized mode.
+ Prefixing the auto variables with volatile fixes the problem....
+ */
+ volatile double result= item->val_real();
+ if (item->null_value)
+ return 0;
+ volatile double field_result= field->val_real();
+ if (field_result < result)
+ return -1;
+ else if (field_result > result)
+ return 1;
+ return 0;
+}
+
+
+/***************************************************************************/
+
+
+static bool have_important_literal_warnings(const MYSQL_TIME_STATUS *status)
+{
+ return (status->warnings & ~MYSQL_TIME_NOTE_TRUNCATED) != 0;
+}
+
+
+static void literal_warn(THD *thd, const Item *item,
+ const char *str, size_t length, CHARSET_INFO *cs,
+ const MYSQL_TIME_STATUS *st,
+ const char *typestr, bool send_error)
+{
+ if (likely(item))
+ {
+ if (st->warnings) // e.g. a note on nanosecond truncation
+ {
+ ErrConvString err(str, length, cs);
+ thd->push_warning_wrong_or_truncated_value(
+ Sql_condition::time_warn_level(st->warnings),
+ false, typestr, err.ptr(),
+ nullptr, nullptr, nullptr);
+ }
+ }
+ else if (send_error)
+ {
+ ErrConvString err(str, length, cs);
+ my_error(ER_WRONG_VALUE, MYF(0), typestr, err.ptr());
+ }
+}
+
+
+Item_literal *
+Type_handler_date_common::create_literal_item(THD *thd,
+ const char *str,
+ size_t length,
+ CHARSET_INFO *cs,
+ bool send_error) const
+{
+ Temporal::Warn st;
+ Item_literal *item= NULL;
+ Temporal_hybrid tmp(thd, &st, str, length, cs, Temporal_hybrid::Options(thd));
+ if (tmp.is_valid_temporal() &&
+ tmp.get_mysql_time()->time_type == MYSQL_TIMESTAMP_DATE &&
+ !have_important_literal_warnings(&st))
+ {
+ Date d(&tmp);
+ item= new (thd->mem_root) Item_date_literal(thd, &d);
+ }
+ literal_warn(thd, item, str, length, cs, &st, "DATE", send_error);
+ return item;
+}
+
+
+Item_literal *
+Type_handler_temporal_with_date::create_literal_item(THD *thd,
+ const char *str,
+ size_t length,
+ CHARSET_INFO *cs,
+ bool send_error) const
+{
+ Temporal::Warn st;
+ Item_literal *item= NULL;
+ Temporal_hybrid tmp(thd, &st, str, length, cs, Temporal_hybrid::Options(thd));
+ if (tmp.is_valid_temporal() &&
+ tmp.get_mysql_time()->time_type == MYSQL_TIMESTAMP_DATETIME &&
+ !have_important_literal_warnings(&st))
+ {
+ Datetime dt(&tmp);
+ item= new (thd->mem_root) Item_datetime_literal(thd, &dt, st.precision);
+ }
+ literal_warn(thd, item, str, length, cs, &st, "DATETIME", send_error);
+ return item;
+}
+
+
+Item_literal *
+Type_handler_time_common::create_literal_item(THD *thd,
+ const char *str,
+ size_t length,
+ CHARSET_INFO *cs,
+ bool send_error) const
+{
+ MYSQL_TIME_STATUS st;
+ Item_literal *item= NULL;
+ Time::Options opt(TIME_TIME_ONLY, thd, Time::DATETIME_TO_TIME_DISALLOW);
+ Time tmp(thd, &st, str, length, cs, opt);
+ if (tmp.is_valid_time() &&
+ !have_important_literal_warnings(&st))
+ item= new (thd->mem_root) Item_time_literal(thd, &tmp, st.precision);
+ literal_warn(thd, item, str, length, cs, &st, "TIME", send_error);
+ return item;
+}
+
+
+bool
+Type_handler_time_common::Item_val_native_with_conversion(THD *thd,
+ Item *item,
+ Native *to) const
+{
+ if (item->type_handler()->type_handler_for_native_format() ==
+ &type_handler_time2)
+ return item->val_native(thd, to);
+ return Time(thd, item).to_native(to, item->time_precision(thd));
+}
+
+
+bool
+Type_handler_time_common::Item_val_native_with_conversion_result(THD *thd,
+ Item *item,
+ Native *to)
+ const
+{
+ if (item->type_handler()->type_handler_for_native_format() ==
+ &type_handler_time2)
+ return item->val_native_result(thd, to);
+ MYSQL_TIME ltime;
+ if (item->get_date_result(thd, &ltime, Time::Options(thd)))
+ return true;
+ int warn;
+ return Time(&warn, &ltime, 0).to_native(to, item->time_precision(thd));
+}
+
+
+int Type_handler_time_common::cmp_native(const Native &a,
+ const Native &b) const
+{
+ // Optimize a simple case: equal fractional precision:
+ if (a.length() == b.length())
+ return memcmp(a.ptr(), b.ptr(), a.length());
+ longlong lla= Time(a).to_packed();
+ longlong llb= Time(b).to_packed();
+ if (lla < llb)
+ return -1;
+ if (lla> llb)
+ return 1;
+ return 0;
+}
+
+
+bool Type_handler_timestamp_common::TIME_to_native(THD *thd,
+ const MYSQL_TIME *ltime,
+ Native *to,
+ uint decimals) const
+{
+ uint error_code;
+ Timestamp_or_zero_datetime tm(thd, ltime, &error_code);
+ if (error_code)
+ return true;
+ tm.trunc(decimals);
+ return tm.to_native(to, decimals);
+}
+
+
+bool
+Type_handler_timestamp_common::Item_val_native_with_conversion(THD *thd,
+ Item *item,
+ Native *to) const
+{
+ MYSQL_TIME ltime;
+ if (item->type_handler()->type_handler_for_native_format() ==
+ &type_handler_timestamp2)
+ return item->val_native(thd, to);
+ return
+ item->get_date(thd, &ltime, Datetime::Options(TIME_NO_ZERO_IN_DATE, thd)) ||
+ TIME_to_native(thd, &ltime, to, item->datetime_precision(thd));
+}
+
+bool Type_handler_null::union_element_finalize(Item_type_holder *item) const
+{
+ item->set_handler(&type_handler_string);
+ return false;
+}
+
+
+bool
+Type_handler_timestamp_common::Item_val_native_with_conversion_result(THD *thd,
+ Item *item,
+ Native *to)
+ const
+{
+ MYSQL_TIME ltime;
+ if (item->type_handler()->type_handler_for_native_format() ==
+ &type_handler_timestamp2)
+ return item->val_native_result(thd, to);
+ return
+ item->get_date_result(thd, &ltime,
+ Datetime::Options(TIME_NO_ZERO_IN_DATE, thd)) ||
+ TIME_to_native(thd, &ltime, to, item->datetime_precision(thd));
+}
+
+
+int Type_handler_timestamp_common::cmp_native(const Native &a,
+ const Native &b) const
+{
+ /*
+ Optimize a simple case:
+ Either both timeatamp values have the same fractional precision,
+ or both values are zero datetime '0000-00-00 00:00:00.000000',
+ */
+ if (a.length() == b.length())
+ return memcmp(a.ptr(), b.ptr(), a.length());
+ return Timestamp_or_zero_datetime(a).cmp(Timestamp_or_zero_datetime(b));
+}
+
+
+Timestamp_or_zero_datetime_native_null::
+ Timestamp_or_zero_datetime_native_null(THD *thd, Item *item, bool conv)
+ :Null_flag(false)
+{
+ DBUG_ASSERT(item->type_handler()->type_handler_for_native_format() ==
+ &type_handler_timestamp2 || conv);
+ if (conv ?
+ type_handler_timestamp2.Item_val_native_with_conversion(thd, item, this) :
+ item->val_native(thd, this))
+ Null_flag::operator=(true);
+ // If no conversion, then is_null() should be equal to item->null_value
+ DBUG_ASSERT(is_null() == item->null_value || conv);
+ /*
+ is_null() can be true together with item->null_value==false, which means
+ a non-NULL item was evaluated, but then the conversion to TIMESTAMP failed.
+ But is_null() can never be false if item->null_value==true.
+ */
+ DBUG_ASSERT(is_null() >= item->null_value);
+}
+
+
+bool
+Type_handler::Item_param_val_native(THD *thd,
+ Item_param *item,
+ Native *to) const
+{
+ DBUG_ASSERT(0); // TODO-TYPE: MDEV-14271
+ return item->null_value= true;
+}
+
+
+bool
+Type_handler_timestamp_common::Item_param_val_native(THD *thd,
+ Item_param *item,
+ Native *to) const
+{
+ /*
+ The below code may not run well in corner cases.
+ This will be fixed under terms of MDEV-14271.
+ Item_param should:
+ - either remember @@time_zone at bind time
+ - or store TIMESTAMP in my_time_t format, rather than in MYSQL_TIME format.
+ */
+ MYSQL_TIME ltime;
+ return
+ item->get_date(thd, &ltime, Datetime::Options(TIME_NO_ZERO_IN_DATE, thd)) ||
+ TIME_to_native(thd, &ltime, to, item->datetime_precision(thd));
+}
+
+
+bool
+Type_handler_time_common::Item_param_val_native(THD *thd,
+ Item_param *item,
+ Native *to) const
+{
+ return Time(thd, item).to_native(to, item->decimals);
+}
+
+
LEX_CSTRING Charset::collation_specific_name() const
{
/*
diff --git a/sql/sql_type.h b/sql/sql_type.h
index 08b599af7ab..40e3541baf2 100644
--- a/sql/sql_type.h
+++ b/sql/sql_type.h
@@ -1,7 +1,7 @@
#ifndef SQL_TYPE_H_INCLUDED
#define SQL_TYPE_H_INCLUDED
/*
- Copyright (c) 2015 MariaDB Foundation.
+ Copyright (c) 2015, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,12 +26,17 @@
#include "sql_const.h"
#include "sql_time.h"
#include "sql_type_real.h"
+#include "compat56.h"
class Field;
class Column_definition;
+class Column_definition_attributes;
class Item;
+class Item_const;
+class Item_literal;
class Item_param;
class Item_cache;
+class Item_copy;
class Item_func_or_sum;
class Item_sum_hybrid;
class Item_sum_sum;
@@ -72,10 +77,1276 @@ class Spvar_definition;
struct st_value;
class Protocol;
class handler;
-struct Schema_specification_st;
struct TABLE;
struct SORT_FIELD_ATTR;
class Vers_history_point;
+class Virtual_column_info;
+
+#define my_charset_numeric my_charset_latin1
+
+enum protocol_send_type_t
+{
+ PROTOCOL_SEND_STRING,
+ PROTOCOL_SEND_FLOAT,
+ PROTOCOL_SEND_DOUBLE,
+ PROTOCOL_SEND_TINY,
+ PROTOCOL_SEND_SHORT,
+ PROTOCOL_SEND_LONG,
+ PROTOCOL_SEND_LONGLONG,
+ PROTOCOL_SEND_DATETIME,
+ PROTOCOL_SEND_DATE,
+ PROTOCOL_SEND_TIME
+};
+
+
+enum scalar_comparison_op
+{
+ SCALAR_CMP_EQ,
+ SCALAR_CMP_EQUAL,
+ SCALAR_CMP_LT,
+ SCALAR_CMP_LE,
+ SCALAR_CMP_GE,
+ SCALAR_CMP_GT
+};
+
+
+/*
+ A helper class to store column attributes that are inherited
+ by columns (from the table level) when not specified explicitly.
+*/
+class Column_derived_attributes
+{
+ /*
+ Table level CHARACTER SET and COLLATE value:
+
+ CREATE TABLE t1 (a VARCHAR(1), b CHAR(2)) CHARACTER SET latin1;
+
+ All character string columns (CHAR, VARCHAR, TEXT)
+ inherit CHARACTER SET from the table level.
+ */
+ CHARSET_INFO *m_charset;
+public:
+ explicit Column_derived_attributes(CHARSET_INFO *cs)
+ :m_charset(cs)
+ { }
+ CHARSET_INFO *charset() const { return m_charset; }
+};
+
+
+/*
+ A helper class to store requests for changes
+ in multiple column data types during ALTER.
+*/
+class Column_bulk_alter_attributes
+{
+ /*
+ Target CHARACTER SET specification in ALTER .. CONVERT, e.g.
+
+ ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+
+ All character string columns (CHAR, VARCHAR, TEXT)
+ get converted to the "CONVERT TO CHARACTER SET".
+ */
+ CHARSET_INFO *m_alter_table_convert_to_charset;
+public:
+ explicit Column_bulk_alter_attributes(CHARSET_INFO *convert)
+ :m_alter_table_convert_to_charset(convert)
+ { }
+ CHARSET_INFO *alter_table_convert_to_charset() const
+ { return m_alter_table_convert_to_charset; }
+};
+
+
+class Native: public Binary_string
+{
+public:
+ Native(char *str, size_t len)
+ :Binary_string(str, len)
+ { }
+};
+
+
+template<size_t buff_sz>
+class NativeBuffer: public Native
+{
+ char buff[buff_sz];
+public:
+ NativeBuffer() : Native(buff, buff_sz) { length(0); }
+};
+
+
+class String_ptr
+{
+protected:
+ String *m_string_ptr;
+public:
+ String_ptr(String *str)
+ :m_string_ptr(str)
+ { }
+ String_ptr(Item *item, String *buffer);
+ const String *string() const
+ {
+ DBUG_ASSERT(m_string_ptr);
+ return m_string_ptr;
+ }
+ bool is_null() const { return m_string_ptr == NULL; }
+};
+
+
+class Ascii_ptr: public String_ptr
+{
+public:
+ Ascii_ptr(Item *item, String *buffer);
+};
+
+
+template<size_t buff_sz>
+class String_ptr_and_buffer: public StringBuffer<buff_sz>,
+ public String_ptr
+{
+public:
+ String_ptr_and_buffer(Item *item)
+ :String_ptr(item, this)
+ { }
+};
+
+
+template<size_t buff_sz>
+class Ascii_ptr_and_buffer: public StringBuffer<buff_sz>,
+ public Ascii_ptr
+{
+public:
+ Ascii_ptr_and_buffer(Item *item)
+ :Ascii_ptr(item, this)
+ { }
+};
+
+
+class Dec_ptr
+{
+protected:
+ my_decimal *m_ptr;
+ Dec_ptr() { }
+public:
+ Dec_ptr(my_decimal *ptr) :m_ptr(ptr) { }
+ bool is_null() const { return m_ptr == NULL; }
+ const my_decimal *ptr() const { return m_ptr; }
+ const my_decimal *ptr_or(const my_decimal *def) const
+ {
+ return m_ptr ? m_ptr : def;
+ }
+ my_decimal *to_decimal(my_decimal *to) const
+ {
+ if (!m_ptr)
+ return NULL;
+ *to= *m_ptr;
+ return to;
+ }
+ double to_double() const { return m_ptr ? m_ptr->to_double() : 0.0; }
+ longlong to_longlong(bool unsigned_flag)
+ { return m_ptr ? m_ptr->to_longlong(unsigned_flag) : 0; }
+ bool to_bool() const { return m_ptr ? m_ptr->to_bool() : false; }
+ String *to_string(String *to) const
+ {
+ return m_ptr ? m_ptr->to_string(to) : NULL;
+ }
+ String *to_string(String *to, uint prec, uint dec, char filler)
+ {
+ return m_ptr ? m_ptr->to_string(to, prec, dec, filler) : NULL;
+ }
+ int to_binary(uchar *bin, int prec, int scale) const
+ {
+ return (m_ptr ? m_ptr : &decimal_zero)->to_binary(bin, prec, scale);
+ }
+ int cmp(const my_decimal *dec) const
+ {
+ DBUG_ASSERT(m_ptr);
+ DBUG_ASSERT(dec);
+ return m_ptr->cmp(dec);
+ }
+ int cmp(const Dec_ptr &other) const
+ {
+ return cmp(other.m_ptr);
+ }
+};
+
+
+// A helper class to handle results of val_decimal(), date_op(), etc.
+class Dec_ptr_and_buffer: public Dec_ptr
+{
+protected:
+ my_decimal m_buffer;
+public:
+ int round_to(my_decimal *to, int scale, decimal_round_mode mode)
+ {
+ DBUG_ASSERT(m_ptr);
+ return m_ptr->round_to(to, scale, mode);
+ }
+ int round_self(uint scale, decimal_round_mode mode)
+ {
+ return round_to(&m_buffer, scale, mode);
+ }
+ int round_self_if_needed(int scale, decimal_round_mode mode)
+ {
+ if (scale >= m_ptr->frac)
+ return E_DEC_OK;
+ int res= m_ptr->round_to(&m_buffer, scale, mode);
+ m_ptr= &m_buffer;
+ return res;
+ }
+ String *to_string_round(String *to, uint dec)
+ {
+ /*
+ decimal_round() allows from==to
+ So it's save even if m_ptr points to m_buffer before this call:
+ */
+ return m_ptr ? m_ptr->to_string_round(to, dec, &m_buffer) : NULL;
+ }
+};
+
+
+// A helper class to handle val_decimal() results.
+class VDec: public Dec_ptr_and_buffer
+{
+public:
+ VDec(): Dec_ptr_and_buffer() { }
+ VDec(Item *item);
+ void set(Item *a);
+};
+
+
+// A helper class to handler decimal_op() results.
+class VDec_op: public Dec_ptr_and_buffer
+{
+public:
+ VDec_op(Item_func_hybrid_field_type *item);
+};
+
+
+/*
+ Get and cache val_decimal() values for two items.
+ If the first value appears to be NULL, the second value is not evaluated.
+*/
+class VDec2_lazy
+{
+public:
+ VDec m_a;
+ VDec m_b;
+ VDec2_lazy(Item *a, Item *b) :m_a(a)
+ {
+ if (!m_a.is_null())
+ m_b.set(b);
+ }
+ bool has_null() const
+ {
+ return m_a.is_null() || m_b.is_null();
+ }
+};
+
+
+/**
+ Class Sec6 represents a fixed point value with 6 fractional digits.
+ Used e.g. to convert double and my_decimal values to TIME/DATETIME.
+*/
+
+class Sec6
+{
+protected:
+ ulonglong m_sec; // The integer part, between 0 and LONGLONG_MAX
+ ulong m_usec; // The fractional part, between 0 and 999999
+ bool m_neg; // false if positive, true of negative
+ bool m_truncated; // Indicates if the constructor truncated the value
+ void make_from_decimal(const my_decimal *d, ulong *nanoseconds);
+ void make_from_double(double d, ulong *nanoseconds);
+ void make_from_int(const Longlong_hybrid &nr)
+ {
+ m_neg= nr.neg();
+ m_sec= nr.abs();
+ m_usec= 0;
+ m_truncated= false;
+ }
+ void reset()
+ {
+ m_sec= m_usec= m_neg= m_truncated= 0;
+ }
+ Sec6() { }
+ bool add_nanoseconds(uint nanoseconds)
+ {
+ DBUG_ASSERT(nanoseconds <= 1000000000);
+ if (nanoseconds < 500)
+ return false;
+ m_usec+= (nanoseconds + 500) / 1000;
+ if (m_usec < 1000000)
+ return false;
+ m_usec%= 1000000;
+ return true;
+ }
+public:
+ explicit Sec6(double nr)
+ {
+ ulong nanoseconds;
+ make_from_double(nr, &nanoseconds);
+ }
+ explicit Sec6(const my_decimal *d)
+ {
+ ulong nanoseconds;
+ make_from_decimal(d, &nanoseconds);
+ }
+ explicit Sec6(const Longlong_hybrid &nr)
+ {
+ make_from_int(nr);
+ }
+ explicit Sec6(longlong nr, bool unsigned_val)
+ {
+ make_from_int(Longlong_hybrid(nr, unsigned_val));
+ }
+ bool neg() const { return m_neg; }
+ bool truncated() const { return m_truncated; }
+ ulonglong sec() const { return m_sec; }
+ long usec() const { return m_usec; }
+ /**
+ Converts Sec6 to MYSQL_TIME
+ @param thd current thd
+ @param [out] warn conversion warnings will be written here
+ @param [out] ltime converted value will be written here
+ @param fuzzydate conversion flags (TIME_INVALID_DATE, etc)
+ @returns false for success, true for a failure
+ */
+ bool convert_to_mysql_time(THD *thd,
+ int *warn,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const;
+
+protected:
+
+ bool to_interval_hhmmssff_only(MYSQL_TIME *to, int *warn) const
+ {
+ return number_to_time_only(m_neg, m_sec, m_usec,
+ TIME_MAX_INTERVAL_HOUR, to, warn);
+ }
+ bool to_datetime_or_to_interval_hhmmssff(MYSQL_TIME *to, int *warn) const
+ {
+ /*
+ Convert a number to a time interval.
+ The following formats are understood:
+ - 0 <= x <= 999999995959 - parse as hhhhmmss
+ - 999999995959 < x <= 99991231235959 - parse as YYYYMMDDhhmmss
+ (YYMMDDhhmmss) (YYYYMMDDhhmmss)
+
+ Note, these formats are NOT understood:
+ - YYMMDD - overlaps with INTERVAL range
+ - YYYYMMDD - overlaps with INTERVAL range
+ - YYMMDDhhmmss - overlaps with INTERVAL range, partially
+ (see TIME_MAX_INTERVAL_HOUR)
+
+ If we ever need wider intervals, this code switching between
+ full datetime and interval-only should be rewised.
+ */
+ DBUG_ASSERT(TIME_MAX_INTERVAL_HOUR <= 999999995959);
+ /* (YYMMDDhhmmss) */
+ if (m_sec > 999999995959ULL &&
+ m_sec <= 99991231235959ULL && m_neg == 0)
+ return to_datetime_or_date(to, warn, TIME_INVALID_DATES);
+ if (m_sec / 10000 > TIME_MAX_INTERVAL_HOUR)
+ {
+ *warn= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ return true;
+ }
+ return to_interval_hhmmssff_only(to, warn);
+ }
+public:
+ // [-][DD]hhhmmss.ff, YYMMDDhhmmss.ff, YYYYMMDDhhmmss.ff
+ bool to_datetime_or_time(MYSQL_TIME *to, int *warn,
+ date_conv_mode_t mode) const
+ {
+ bool rc= m_sec > 9999999 && m_sec <= 99991231235959ULL && !m_neg ?
+ ::number_to_datetime_or_date(m_sec, m_usec, to,
+ ulonglong(mode & TIME_MODE_FOR_XXX_TO_DATE), warn) < 0 :
+ ::number_to_time_only(m_neg, m_sec, m_usec, TIME_MAX_HOUR, to, warn);
+ DBUG_ASSERT(*warn || !rc);
+ return rc;
+ }
+ /*
+ Convert a number in formats YYYYMMDDhhmmss.ff or YYMMDDhhmmss.ff to
+ TIMESTAMP'YYYY-MM-DD hh:mm:ss.ff'
+ */
+ bool to_datetime_or_date(MYSQL_TIME *to, int *warn,
+ date_conv_mode_t flags) const
+ {
+ if (m_neg)
+ {
+ *warn= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ return true;
+ }
+ bool rc= number_to_datetime_or_date(m_sec, m_usec, to,
+ ulonglong(flags & TIME_MODE_FOR_XXX_TO_DATE),
+ warn) == -1;
+ DBUG_ASSERT(*warn || !rc);
+ return rc;
+ }
+ // Convert elapsed seconds to TIME
+ bool sec_to_time(MYSQL_TIME *ltime, uint dec) const
+ {
+ set_zero_time(ltime, MYSQL_TIMESTAMP_TIME);
+ ltime->neg= m_neg;
+ if (m_sec > TIME_MAX_VALUE_SECONDS)
+ {
+ // use check_time_range() to set ltime to the max value depending on dec
+ int unused;
+ ltime->hour= TIME_MAX_HOUR + 1;
+ check_time_range(ltime, dec, &unused);
+ return true;
+ }
+ DBUG_ASSERT(usec() <= TIME_MAX_SECOND_PART);
+ ltime->hour= (uint) (m_sec / 3600);
+ ltime->minute= (uint) (m_sec % 3600) / 60;
+ ltime->second= (uint) m_sec % 60;
+ ltime->second_part= m_usec;
+ return false;
+ }
+ Sec6 &trunc(uint dec)
+ {
+ m_usec-= my_time_fraction_remainder(m_usec, dec);
+ return *this;
+ }
+ size_t to_string(char *to, size_t nbytes) const
+ {
+ return m_usec ?
+ my_snprintf(to, nbytes, "%s%llu.%06lu",
+ m_neg ? "-" : "", m_sec, (uint) m_usec) :
+ my_snprintf(to, nbytes, "%s%llu", m_neg ? "-" : "", m_sec);
+ }
+ void make_truncated_warning(THD *thd, const char *type_str) const;
+};
+
+
+class Sec9: public Sec6
+{
+protected:
+ ulong m_nsec; // Nanoseconds 0..999
+ void make_from_int(const Longlong_hybrid &nr)
+ {
+ Sec6::make_from_int(nr);
+ m_nsec= 0;
+ }
+ Sec9() { }
+public:
+ Sec9(const my_decimal *d)
+ {
+ Sec6::make_from_decimal(d, &m_nsec);
+ }
+ Sec9(double d)
+ {
+ Sec6::make_from_double(d, &m_nsec);
+ }
+ ulong nsec() const { return m_nsec; }
+ Sec9 &trunc(uint dec)
+ {
+ m_nsec= 0;
+ Sec6::trunc(dec);
+ return *this;
+ }
+ Sec9 &round(uint dec);
+ Sec9 &round(uint dec, time_round_mode_t mode)
+ {
+ return mode == TIME_FRAC_TRUNCATE ? trunc(dec) : round(dec);
+ }
+};
+
+
+class VSec9: protected Sec9
+{
+ bool m_is_null;
+ Sec9& to_sec9()
+ {
+ DBUG_ASSERT(!is_null());
+ return *this;
+ }
+public:
+ VSec9(THD *thd, Item *item, const char *type_str, ulonglong limit);
+ bool is_null() const { return m_is_null; }
+ const Sec9& to_const_sec9() const
+ {
+ DBUG_ASSERT(!is_null());
+ return *this;
+ }
+ bool neg() const { return to_const_sec9().neg(); }
+ bool truncated() const { return to_const_sec9().truncated(); }
+ ulonglong sec() const { return to_const_sec9().sec(); }
+ long usec() const { return to_const_sec9().usec(); }
+ bool sec_to_time(MYSQL_TIME *ltime, uint dec) const
+ {
+ return to_const_sec9().sec_to_time(ltime, dec);
+ }
+ void make_truncated_warning(THD *thd, const char *type_str) const
+ {
+ return to_const_sec9().make_truncated_warning(thd, type_str);
+ }
+ Sec9 &round(uint dec)
+ {
+ return to_sec9().round(dec);
+ }
+ Sec9 &round(uint dec, time_round_mode_t mode)
+ {
+ return to_sec9().round(dec, mode);
+ }
+};
+
+
+/*
+ A heler class to perform additive operations between
+ two MYSQL_TIME structures and return the result as a
+ combination of seconds, microseconds and sign.
+*/
+class Sec6_add
+{
+ ulonglong m_sec; // number of seconds
+ ulong m_usec; // number of microseconds
+ bool m_neg; // false if positive, true if negative
+ bool m_error; // false if the value is OK, true otherwise
+ void to_hh24mmssff(MYSQL_TIME *ltime, timestamp_type tstype) const
+ {
+ bzero(ltime, sizeof(*ltime));
+ ltime->neg= m_neg;
+ calc_time_from_sec(ltime, (ulong) (m_sec % SECONDS_IN_24H), m_usec);
+ ltime->time_type= tstype;
+ }
+public:
+ /*
+ @param ltime1 - the first value to add (must be a valid DATE,TIME,DATETIME)
+ @param ltime2 - the second value to add (must be a valid TIME)
+ @param sign - the sign of the operation
+ (+1 for addition, -1 for subtraction)
+ */
+ Sec6_add(const MYSQL_TIME *ltime1, const MYSQL_TIME *ltime2, int sign)
+ {
+ DBUG_ASSERT(sign == -1 || sign == 1);
+ DBUG_ASSERT(!ltime1->neg || ltime1->time_type == MYSQL_TIMESTAMP_TIME);
+ if (!(m_error= (ltime2->time_type != MYSQL_TIMESTAMP_TIME)))
+ {
+ if (ltime1->neg != ltime2->neg)
+ sign= -sign;
+ m_neg= calc_time_diff(ltime1, ltime2, -sign, &m_sec, &m_usec);
+ if (ltime1->neg && (m_sec || m_usec))
+ m_neg= !m_neg; // Swap sign
+ }
+ }
+ bool to_time(THD *thd, MYSQL_TIME *ltime, uint decimals) const
+ {
+ if (m_error)
+ return true;
+ to_hh24mmssff(ltime, MYSQL_TIMESTAMP_TIME);
+ ltime->hour+= to_days_abs() * 24;
+ return adjust_time_range_with_warn(thd, ltime, decimals);
+ }
+ bool to_datetime(MYSQL_TIME *ltime) const
+ {
+ if (m_error || m_neg)
+ return true;
+ to_hh24mmssff(ltime, MYSQL_TIMESTAMP_DATETIME);
+ return get_date_from_daynr(to_days_abs(),
+ &ltime->year, &ltime->month, &ltime->day) ||
+ !ltime->day;
+ }
+ long to_days_abs() const { return (long) (m_sec / SECONDS_IN_24H); }
+};
+
+
+class Year
+{
+protected:
+ uint m_year;
+ bool m_truncated;
+ uint year_precision(const Item *item) const;
+public:
+ Year(): m_year(0), m_truncated(false) { }
+ Year(longlong value, bool unsigned_flag, uint length);
+ uint year() const { return m_year; }
+ uint to_YYYYMMDD() const { return m_year * 10000; }
+ bool truncated() const { return m_truncated; }
+};
+
+
+class Year_null: public Year, public Null_flag
+{
+public:
+ Year_null(const Longlong_null &nr, bool unsigned_flag, uint length)
+ :Year(nr.is_null() ? 0 : nr.value(), unsigned_flag, length),
+ Null_flag(nr.is_null())
+ { }
+};
+
+
+class VYear: public Year_null
+{
+public:
+ VYear(Item *item);
+};
+
+
+class VYear_op: public Year_null
+{
+public:
+ VYear_op(Item_func_hybrid_field_type *item);
+};
+
+
+class Double_null: public Null_flag
+{
+protected:
+ double m_value;
+public:
+ Double_null(double value, bool is_null)
+ :Null_flag(is_null), m_value(value)
+ { }
+ double value() const { return m_value; }
+};
+
+
+class Temporal: protected MYSQL_TIME
+{
+public:
+ class Status: public MYSQL_TIME_STATUS
+ {
+ public:
+ Status() { my_time_status_init(this); }
+ };
+
+ class Warn: public ErrBuff,
+ public Status
+ {
+ public:
+ void push_conversion_warnings(THD *thd, bool totally_useless_value,
+ date_mode_t mode, timestamp_type tstype,
+ const char *db_name, const char *table_name,
+ const char *name)
+ {
+ const char *typestr= tstype >= 0 ? type_name_by_timestamp_type(tstype) :
+ mode & (TIME_INTERVAL_hhmmssff | TIME_INTERVAL_DAY) ?
+ "interval" :
+ mode & TIME_TIME_ONLY ? "time" : "datetime";
+ Temporal::push_conversion_warnings(thd, totally_useless_value, warnings,
+ typestr, db_name, table_name, name,
+ ptr());
+ }
+ };
+
+ class Warn_push: public Warn
+ {
+ THD * const m_thd;
+ const char * const m_db_name;
+ const char * const m_table_name;
+ const char * const m_name;
+ const MYSQL_TIME * const m_ltime;
+ const date_mode_t m_mode;
+ public:
+ Warn_push(THD *thd, const char *db_name, const char *table_name,
+ const char *name, const MYSQL_TIME *ltime, date_mode_t mode)
+ : m_thd(thd), m_db_name(db_name), m_table_name(table_name), m_name(name),
+ m_ltime(ltime), m_mode(mode)
+ { }
+ ~Warn_push()
+ {
+ if (warnings)
+ push_conversion_warnings(m_thd, m_ltime->time_type < 0,
+ m_mode, m_ltime->time_type,
+ m_db_name, m_table_name, m_name);
+ }
+ };
+
+public:
+ static date_conv_mode_t sql_mode_for_dates(THD *thd);
+ static time_round_mode_t default_round_mode(THD *thd);
+ class Options: public date_mode_t
+ {
+ public:
+ explicit Options(date_mode_t flags)
+ :date_mode_t(flags)
+ { }
+ Options(date_conv_mode_t flags, time_round_mode_t round_mode)
+ :date_mode_t(flags | round_mode)
+ {
+ DBUG_ASSERT(ulonglong(flags) <= UINT_MAX32);
+ }
+ Options(date_conv_mode_t flags, THD *thd)
+ :Options(flags, default_round_mode(thd))
+ { }
+ };
+
+ bool is_valid_temporal() const
+ {
+ DBUG_ASSERT(time_type != MYSQL_TIMESTAMP_ERROR);
+ return time_type != MYSQL_TIMESTAMP_NONE;
+ }
+ static const char *type_name_by_timestamp_type(timestamp_type time_type)
+ {
+ switch (time_type) {
+ case MYSQL_TIMESTAMP_DATE: return "date";
+ case MYSQL_TIMESTAMP_TIME: return "time";
+ case MYSQL_TIMESTAMP_DATETIME: // FALLTHROUGH
+ default:
+ break;
+ }
+ return "datetime";
+ }
+ static void push_conversion_warnings(THD *thd, bool totally_useless_value, int warn,
+ const char *type_name,
+ const char *db_name,
+ const char *table_name,
+ const char *field_name,
+ const char *value);
+ /*
+ This method is used if the item was not null but convertion to
+ TIME/DATE/DATETIME failed. We return a zero date if allowed,
+ otherwise - null.
+ */
+ void make_fuzzy_date(int *warn, date_conv_mode_t fuzzydate)
+ {
+ /*
+ In the following scenario:
+ - The caller expected to get a TIME value
+ - Item returned a not NULL string or numeric value
+ - But then conversion from string or number to TIME failed
+ we need to change the default time_type from MYSQL_TIMESTAMP_DATE
+ (which was set in bzero) to MYSQL_TIMESTAMP_TIME and therefore
+ return TIME'00:00:00' rather than DATE'0000-00-00'.
+ If we don't do this, methods like Item::get_time_with_conversion()
+ will erroneously subtract CURRENT_DATE from '0000-00-00 00:00:00'
+ and return TIME'-838:59:59' instead of TIME'00:00:00' as a result.
+ */
+ timestamp_type tstype= !(fuzzydate & TIME_FUZZY_DATES) ?
+ MYSQL_TIMESTAMP_NONE :
+ fuzzydate & TIME_TIME_ONLY ?
+ MYSQL_TIMESTAMP_TIME :
+ MYSQL_TIMESTAMP_DATETIME;
+ set_zero_time(this, tstype);
+ }
+
+protected:
+ my_decimal *bad_to_decimal(my_decimal *to) const;
+ my_decimal *to_decimal(my_decimal *to) const;
+ static double to_double(bool negate, ulonglong num, ulong frac)
+ {
+ double d= (double) num + frac / (double) TIME_SECOND_PART_FACTOR;
+ return negate ? -d : d;
+ }
+ longlong to_packed() const { return ::pack_time(this); }
+ void make_from_out_of_range(int *warn)
+ {
+ *warn= MYSQL_TIME_WARN_OUT_OF_RANGE;
+ time_type= MYSQL_TIMESTAMP_NONE;
+ }
+ void make_from_sec6(THD *thd, MYSQL_TIME_STATUS *st,
+ const Sec6 &nr, date_mode_t mode)
+ {
+ if (nr.convert_to_mysql_time(thd, &st->warnings, this, mode))
+ make_fuzzy_date(&st->warnings, date_conv_mode_t(mode));
+ }
+ void make_from_sec9(THD *thd, MYSQL_TIME_STATUS *st,
+ const Sec9 &nr, date_mode_t mode)
+ {
+ if (nr.convert_to_mysql_time(thd, &st->warnings, this, mode) ||
+ add_nanoseconds(thd, &st->warnings, mode, nr.nsec()))
+ make_fuzzy_date(&st->warnings, date_conv_mode_t(mode));
+ }
+ void make_from_str(THD *thd, Warn *warn,
+ const char *str, size_t length, CHARSET_INFO *cs,
+ date_mode_t fuzzydate);
+ void make_from_double(THD *thd, Warn *warn, double nr, date_mode_t mode)
+ {
+ make_from_sec9(thd, warn, Sec9(nr), mode);
+ if (warn->warnings)
+ warn->set_double(nr);
+ }
+ void make_from_longlong_hybrid(THD *thd, Warn *warn,
+ const Longlong_hybrid &nr, date_mode_t mode)
+ {
+ /*
+ Note: conversion from an integer to TIME can overflow to
+ '838:59:59.999999', so the conversion result can have fractional digits.
+ */
+ make_from_sec6(thd, warn, Sec6(nr), mode);
+ if (warn->warnings)
+ warn->set_longlong(nr);
+ }
+ void make_from_decimal(THD *thd, Warn *warn,
+ const my_decimal *nr, date_mode_t mode)
+ {
+ make_from_sec9(thd, warn, Sec9(nr), mode);
+ if (warn->warnings)
+ warn->set_decimal(nr);
+ }
+ bool ascii_to_temporal(MYSQL_TIME_STATUS *st,
+ const char *str, size_t length,
+ date_mode_t mode)
+ {
+ if (mode & (TIME_INTERVAL_hhmmssff | TIME_INTERVAL_DAY))
+ return ascii_to_datetime_or_date_or_interval_DDhhmmssff(st, str, length,
+ mode);
+ if (mode & TIME_TIME_ONLY)
+ return ascii_to_datetime_or_date_or_time(st, str, length, mode);
+ return ascii_to_datetime_or_date(st, str, length, mode);
+ }
+ bool ascii_to_datetime_or_date_or_interval_DDhhmmssff(MYSQL_TIME_STATUS *st,
+ const char *str,
+ size_t length,
+ date_mode_t mode)
+ {
+ longlong cflags= ulonglong(mode & TIME_MODE_FOR_XXX_TO_DATE);
+ bool rc= mode & TIME_INTERVAL_DAY ?
+ ::str_to_datetime_or_date_or_interval_day(str, length, this, cflags, st,
+ TIME_MAX_INTERVAL_HOUR,
+ TIME_MAX_INTERVAL_HOUR) :
+ ::str_to_datetime_or_date_or_interval_hhmmssff(str, length, this,
+ cflags, st,
+ TIME_MAX_INTERVAL_HOUR,
+ TIME_MAX_INTERVAL_HOUR);
+ DBUG_ASSERT(!rc || st->warnings);
+ return rc;
+ }
+ bool ascii_to_datetime_or_date_or_time(MYSQL_TIME_STATUS *status,
+ const char *str, size_t length,
+ date_mode_t fuzzydate)
+ {
+ ulonglong cflags= ulonglong(fuzzydate & TIME_MODE_FOR_XXX_TO_DATE);
+ bool rc= ::str_to_datetime_or_date_or_time(str, length, this,
+ cflags, status,
+ TIME_MAX_HOUR, UINT_MAX32);
+ DBUG_ASSERT(!rc || status->warnings);
+ return rc;
+ }
+ bool ascii_to_datetime_or_date(MYSQL_TIME_STATUS *status,
+ const char *str, size_t length,
+ date_mode_t fuzzydate)
+ {
+ DBUG_ASSERT(bool(fuzzydate & TIME_TIME_ONLY) == false);
+ bool rc= ::str_to_datetime_or_date(str, length, this,
+ ulonglong(fuzzydate & TIME_MODE_FOR_XXX_TO_DATE),
+ status);
+ DBUG_ASSERT(!rc || status->warnings);
+ return rc;
+ }
+ // Character set aware versions for string conversion routines
+ bool str_to_temporal(THD *thd, MYSQL_TIME_STATUS *st,
+ const char *str, size_t length,
+ CHARSET_INFO *cs, date_mode_t fuzzydate);
+ bool str_to_datetime_or_date_or_time(THD *thd, MYSQL_TIME_STATUS *st,
+ const char *str, size_t length,
+ CHARSET_INFO *cs, date_mode_t mode);
+ bool str_to_datetime_or_date(THD *thd, MYSQL_TIME_STATUS *st,
+ const char *str, size_t length,
+ CHARSET_INFO *cs, date_mode_t mode);
+
+ bool has_valid_mmssff() const
+ {
+ return minute <= TIME_MAX_MINUTE &&
+ second <= TIME_MAX_SECOND &&
+ second_part <= TIME_MAX_SECOND_PART;
+ }
+ bool has_zero_YYYYMM() const
+ {
+ return year == 0 && month == 0;
+ }
+ bool has_zero_YYYYMMDD() const
+ {
+ return year == 0 && month == 0 && day == 0;
+ }
+ bool check_date(date_conv_mode_t flags, int *warn) const
+ {
+ return ::check_date(this, flags, warn);
+ }
+ void time_hhmmssff_set_max(ulong max_hour)
+ {
+ hour= max_hour;
+ minute= TIME_MAX_MINUTE;
+ second= TIME_MAX_SECOND;
+ second_part= TIME_MAX_SECOND_PART;
+ }
+ /*
+ Add nanoseconds to ssff
+ retval true if seconds overflowed (the caller should increment minutes)
+ false if no overflow happened
+ */
+ bool add_nanoseconds_ssff(uint nanoseconds)
+ {
+ DBUG_ASSERT(nanoseconds <= 1000000000);
+ if (nanoseconds < 500)
+ return false;
+ second_part+= (nanoseconds + 500) / 1000;
+ if (second_part < 1000000)
+ return false;
+ second_part%= 1000000;
+ if (second < 59)
+ {
+ second++;
+ return false;
+ }
+ second= 0;
+ return true;
+ }
+ /*
+ Add nanoseconds to mmssff
+ retval true if hours overflowed (the caller should increment hours)
+ false if no overflow happened
+ */
+ bool add_nanoseconds_mmssff(uint nanoseconds)
+ {
+ if (!add_nanoseconds_ssff(nanoseconds))
+ return false;
+ if (minute < 59)
+ {
+ minute++;
+ return false;
+ }
+ minute= 0;
+ return true;
+ }
+ void time_round_or_set_max(uint dec, int *warn, ulong max_hour, ulong nsec);
+ bool datetime_add_nanoseconds_or_invalidate(THD *thd, int *warn, ulong nsec);
+ bool datetime_round_or_invalidate(THD *thd, uint dec, int *warn, ulong nsec);
+ bool add_nanoseconds_with_round(THD *thd, int *warn,
+ date_conv_mode_t mode, ulong nsec);
+ bool add_nanoseconds(THD *thd, int *warn, date_mode_t mode, ulong nsec)
+ {
+ date_conv_mode_t cmode= date_conv_mode_t(mode);
+ return time_round_mode_t(mode) == TIME_FRAC_ROUND ?
+ add_nanoseconds_with_round(thd, warn, cmode, nsec) : false;
+ }
+public:
+ static void *operator new(size_t size, MYSQL_TIME *ltime) throw()
+ {
+ DBUG_ASSERT(size == sizeof(MYSQL_TIME));
+ return ltime;
+ }
+ static void operator delete(void *ptr, MYSQL_TIME *ltime) { }
+
+ long fraction_remainder(uint dec) const
+ {
+ return my_time_fraction_remainder(second_part, dec);
+ }
+};
+
+
+/*
+ Use this class when you need to get a MYSQL_TIME from an Item
+ using Item's native timestamp type, without automatic timestamp
+ type conversion.
+*/
+class Temporal_hybrid: public Temporal
+{
+public:
+ class Options: public Temporal::Options
+ {
+ public:
+ Options(THD *thd)
+ :Temporal::Options(sql_mode_for_dates(thd), default_round_mode(thd))
+ { }
+ Options(date_conv_mode_t flags, time_round_mode_t round_mode)
+ :Temporal::Options(flags, round_mode)
+ { }
+ explicit Options(const Temporal::Options &opt)
+ :Temporal::Options(opt)
+ { }
+ explicit Options(date_mode_t fuzzydate)
+ :Temporal::Options(fuzzydate)
+ { }
+ };
+
+public:
+ // Contructors for Item
+ Temporal_hybrid(THD *thd, Item *item, date_mode_t fuzzydate);
+ Temporal_hybrid(THD *thd, Item *item)
+ :Temporal_hybrid(thd, item, Options(thd))
+ { }
+ Temporal_hybrid(Item *item)
+ :Temporal_hybrid(current_thd, item)
+ { }
+
+ // Constructors for non-NULL values
+ Temporal_hybrid(THD *thd, Warn *warn,
+ const char *str, size_t length, CHARSET_INFO *cs,
+ date_mode_t fuzzydate)
+ {
+ make_from_str(thd, warn, str, length, cs, fuzzydate);
+ }
+ Temporal_hybrid(THD *thd, Warn *warn,
+ const Longlong_hybrid &nr, date_mode_t fuzzydate)
+ {
+ make_from_longlong_hybrid(thd, warn, nr, fuzzydate);
+ }
+ Temporal_hybrid(THD *thd, Warn *warn, double nr, date_mode_t fuzzydate)
+ {
+ make_from_double(thd, warn, nr, fuzzydate);
+ }
+
+ // Constructors for nullable values
+ Temporal_hybrid(THD *thd, Warn *warn, const String *str, date_mode_t mode)
+ {
+ if (!str)
+ time_type= MYSQL_TIMESTAMP_NONE;
+ else
+ make_from_str(thd, warn, str->ptr(), str->length(), str->charset(), mode);
+ }
+ Temporal_hybrid(THD *thd, Warn *warn,
+ const Longlong_hybrid_null &nr, date_mode_t fuzzydate)
+ {
+ if (nr.is_null())
+ time_type= MYSQL_TIMESTAMP_NONE;
+ else
+ make_from_longlong_hybrid(thd, warn, nr, fuzzydate);
+ }
+ Temporal_hybrid(THD *thd, Warn *warn, const Double_null &nr, date_mode_t mode)
+ {
+ if (nr.is_null())
+ time_type= MYSQL_TIMESTAMP_NONE;
+ else
+ make_from_double(thd, warn, nr.value(), mode);
+ }
+ Temporal_hybrid(THD *thd, Warn *warn, const my_decimal *nr, date_mode_t mode)
+ {
+ if (!nr)
+ time_type= MYSQL_TIMESTAMP_NONE;
+ else
+ make_from_decimal(thd, warn, nr, mode);
+ }
+ // End of constuctors
+
+ bool copy_valid_value_to_mysql_time(MYSQL_TIME *ltime) const
+ {
+ DBUG_ASSERT(is_valid_temporal());
+ *ltime= *this;
+ return false;
+ }
+
+ longlong to_longlong() const
+ {
+ if (!is_valid_temporal())
+ return 0;
+ ulonglong v= TIME_to_ulonglong(this);
+ return neg ? -(longlong) v : (longlong) v;
+ }
+ double to_double() const
+ {
+ return is_valid_temporal() ? TIME_to_double(this) : 0;
+ }
+ my_decimal *to_decimal(my_decimal *to)
+ {
+ return is_valid_temporal() ? Temporal::to_decimal(to) : bad_to_decimal(to);
+ }
+ String *to_string(String *str, uint dec) const
+ {
+ if (!is_valid_temporal())
+ return NULL;
+ str->set_charset(&my_charset_numeric);
+ if (!str->alloc(MAX_DATE_STRING_REP_LENGTH))
+ str->length(my_TIME_to_str(this, const_cast<char*>(str->ptr()), dec));
+ return str;
+ }
+ const MYSQL_TIME *get_mysql_time() const
+ {
+ DBUG_ASSERT(is_valid_temporal());
+ return this;
+ }
+};
+
+
+/*
+ This class resembles the SQL standard <extract source>,
+ used in extract expressions, e.g: EXTRACT(DAY FROM dt)
+ <extract expression> ::=
+ EXTRACT <left paren> <extract field> FROM <extract source> <right paren>
+ <extract source> ::= <datetime value expression> | <interval value expression>
+*/
+class Extract_source: public Temporal_hybrid
+{
+ /*
+ Convert a TIME value to DAY-TIME interval, e.g. for extraction:
+ EXTRACT(DAY FROM x), EXTRACT(HOUR FROM x), etc.
+ Moves full days from ltime->hour to ltime->day.
+ */
+ void time_to_daytime_interval()
+ {
+ DBUG_ASSERT(time_type == MYSQL_TIMESTAMP_TIME);
+ DBUG_ASSERT(has_zero_YYYYMMDD());
+ MYSQL_TIME::day= MYSQL_TIME::hour / 24;
+ MYSQL_TIME::hour%= 24;
+ }
+ bool is_valid_extract_source_slow() const
+ {
+ return is_valid_temporal() && MYSQL_TIME::hour < 24 &&
+ (has_zero_YYYYMM() || time_type != MYSQL_TIMESTAMP_TIME);
+ }
+ bool is_valid_value_slow() const
+ {
+ return time_type == MYSQL_TIMESTAMP_NONE || is_valid_extract_source_slow();
+ }
+public:
+ Extract_source(THD *thd, Item *item, date_mode_t mode)
+ :Temporal_hybrid(thd, item, mode)
+ {
+ if (MYSQL_TIME::time_type == MYSQL_TIMESTAMP_TIME)
+ time_to_daytime_interval();
+ DBUG_ASSERT(is_valid_value_slow());
+ }
+ inline const MYSQL_TIME *get_mysql_time() const
+ {
+ DBUG_ASSERT(is_valid_extract_source_slow());
+ return this;
+ }
+ bool is_valid_extract_source() const { return is_valid_temporal(); }
+ int sign() const { return get_mysql_time()->neg ? -1 : 1; }
+ uint year() const { return get_mysql_time()->year; }
+ uint month() const { return get_mysql_time()->month; }
+ int day() const { return (int) get_mysql_time()->day * sign(); }
+ int hour() const { return (int) get_mysql_time()->hour * sign(); }
+ int minute() const { return (int) get_mysql_time()->minute * sign(); }
+ int second() const { return (int) get_mysql_time()->second * sign(); }
+ int microsecond() const { return (int) get_mysql_time()->second_part * sign(); }
+
+ uint year_month() const { return year() * 100 + month(); }
+ uint quarter() const { return (month() + 2)/3; }
+ uint week(THD *thd) const;
+
+ longlong second_microsecond() const
+ {
+ return (second() * 1000000LL + microsecond());
+ }
+
+ // DAY TO XXX
+ longlong day_hour() const
+ {
+ return (longlong) day() * 100LL + hour();
+ }
+ longlong day_minute() const
+ {
+ return day_hour() * 100LL + minute();
+ }
+ longlong day_second() const
+ {
+ return day_minute() * 100LL + second();
+ }
+ longlong day_microsecond() const
+ {
+ return day_second() * 1000000LL + microsecond();
+ }
+
+ // HOUR TO XXX
+ int hour_minute() const
+ {
+ return hour() * 100 + minute();
+ }
+ int hour_second() const
+ {
+ return hour_minute() * 100 + second();
+ }
+ longlong hour_microsecond() const
+ {
+ return hour_second() * 1000000LL + microsecond();
+ }
+
+ // MINUTE TO XXX
+ int minute_second() const
+ {
+ return minute() * 100 + second();
+ }
+ longlong minute_microsecond() const
+ {
+ return minute_second() * 1000000LL + microsecond();
+ }
+};
+
+
+/*
+ This class is used for the "time_interval" argument of these SQL functions:
+ TIMESTAMP(tm,time_interval)
+ ADDTIME(tm,time_interval)
+ Features:
+ - DATE and DATETIME formats are treated as errors
+ - Preserves hours for TIME format as is, without limiting to TIME_MAX_HOUR
+*/
+class Interval_DDhhmmssff: public Temporal
+{
+ static const LEX_CSTRING m_type_name;
+ bool str_to_DDhhmmssff(MYSQL_TIME_STATUS *status,
+ const char *str, size_t length, CHARSET_INFO *cs,
+ ulong max_hour);
+ void push_warning_wrong_or_truncated_value(THD *thd,
+ const ErrConv &str,
+ int warnings);
+ bool is_valid_interval_DDhhmmssff_slow() const
+ {
+ return time_type == MYSQL_TIMESTAMP_TIME &&
+ has_zero_YYYYMMDD() && has_valid_mmssff();
+ }
+ bool is_valid_value_slow() const
+ {
+ return time_type == MYSQL_TIMESTAMP_NONE ||
+ is_valid_interval_DDhhmmssff_slow();
+ }
+public:
+ // Get fractional second precision from an Item
+ static uint fsp(THD *thd, Item *item);
+ /*
+ Maximum useful HOUR value:
+ TIMESTAMP'0001-01-01 00:00:00' + '87649415:59:59' = '9999-12-31 23:59:59'
+ This gives maximum possible interval values:
+ - '87649415:59:59.999999' (in 'hh:mm:ss.ff' format)
+ - '3652058 23:59:59.999999' (in 'DD hh:mm:ss.ff' format)
+ */
+ static uint max_useful_hour()
+ {
+ return TIME_MAX_INTERVAL_HOUR;
+ }
+ static uint max_int_part_char_length()
+ {
+ // e.g. '+3652058 23:59:59'
+ return 1/*sign*/ + TIME_MAX_INTERVAL_DAY_CHAR_LENGTH + 1 + 8/*hh:mm:ss*/;
+ }
+ static uint max_char_length(uint fsp)
+ {
+ DBUG_ASSERT(fsp <= TIME_SECOND_PART_DIGITS);
+ return max_int_part_char_length() + (fsp ? 1 : 0) + fsp;
+ }
+
+public:
+ Interval_DDhhmmssff(THD *thd, Status *st, bool push_warnings,
+ Item *item, ulong max_hour,
+ time_round_mode_t mode, uint dec);
+ Interval_DDhhmmssff(THD *thd, Item *item, uint dec)
+ {
+ Status st;
+ new(this) Interval_DDhhmmssff(thd, &st, true, item, max_useful_hour(),
+ default_round_mode(thd), dec);
+ }
+ Interval_DDhhmmssff(THD *thd, Item *item)
+ :Interval_DDhhmmssff(thd, item, TIME_SECOND_PART_DIGITS)
+ { }
+ const MYSQL_TIME *get_mysql_time() const
+ {
+ DBUG_ASSERT(is_valid_interval_DDhhmmssff_slow());
+ return this;
+ }
+ bool is_valid_interval_DDhhmmssff() const
+ {
+ return time_type == MYSQL_TIMESTAMP_TIME;
+ }
+ bool is_valid_value() const
+ {
+ return time_type == MYSQL_TIMESTAMP_NONE || is_valid_interval_DDhhmmssff();
+ }
+ String *to_string(String *str, uint dec) const
+ {
+ if (!is_valid_interval_DDhhmmssff())
+ return NULL;
+ str->set_charset(&my_charset_numeric);
+ if (!str->alloc(MAX_DATE_STRING_REP_LENGTH))
+ str->length(my_interval_DDhhmmssff_to_str(this,
+ const_cast<char*>(str->ptr()),
+ dec));
+ return str;
+ }
+};
+
class Schema;
@@ -97,35 +1368,47 @@ class Schema;
Time derives from MYSQL_TIME privately to make sure it is accessed
externally only in the valid state.
*/
-class Time: private MYSQL_TIME
+class Time: public Temporal
{
+ static uint binary_length_to_precision(uint length);
public:
enum datetime_to_time_mode_t
{
+ DATETIME_TO_TIME_DISALLOW,
DATETIME_TO_TIME_YYYYMMDD_000000DD_MIX_TO_HOURS,
- DATETIME_TO_TIME_YYYYMMDD_TRUNCATE
+ DATETIME_TO_TIME_YYYYMMDD_TRUNCATE,
+ DATETIME_TO_TIME_YYYYMMDD_00000000_ONLY,
+ DATETIME_TO_TIME_MINUS_CURRENT_DATE
};
- class Options
+ class Options: public Temporal::Options
{
- sql_mode_t m_get_date_flags;
datetime_to_time_mode_t m_datetime_to_time_mode;
public:
- Options()
- :m_get_date_flags(flags_for_get_date()),
- m_datetime_to_time_mode(DATETIME_TO_TIME_YYYYMMDD_000000DD_MIX_TO_HOURS)
+ Options(THD *thd)
+ :Temporal::Options(default_flags_for_get_date(), default_round_mode(thd)),
+ m_datetime_to_time_mode(default_datetime_to_time_mode())
{ }
- Options(sql_mode_t flags)
- :m_get_date_flags(flags),
- m_datetime_to_time_mode(DATETIME_TO_TIME_YYYYMMDD_000000DD_MIX_TO_HOURS)
+ Options(date_conv_mode_t flags, THD *thd)
+ :Temporal::Options(flags, default_round_mode(thd)),
+ m_datetime_to_time_mode(default_datetime_to_time_mode())
{ }
- Options(sql_mode_t flags, datetime_to_time_mode_t dtmode)
- :m_get_date_flags(flags),
+ Options(date_conv_mode_t flags, THD *thd, datetime_to_time_mode_t dtmode)
+ :Temporal::Options(flags, default_round_mode(thd)),
m_datetime_to_time_mode(dtmode)
{ }
- sql_mode_t get_date_flags() const
- { return m_get_date_flags; }
+ Options(date_conv_mode_t fuzzydate, time_round_mode_t round_mode,
+ datetime_to_time_mode_t datetime_to_time_mode)
+ :Temporal::Options(fuzzydate, round_mode),
+ m_datetime_to_time_mode(datetime_to_time_mode)
+ { }
+
datetime_to_time_mode_t datetime_to_time_mode() const
{ return m_datetime_to_time_mode; }
+
+ static datetime_to_time_mode_t default_datetime_to_time_mode()
+ {
+ return DATETIME_TO_TIME_YYYYMMDD_000000DD_MIX_TO_HOURS;
+ }
};
/*
CAST(AS TIME) historically does not mix days to hours.
@@ -135,8 +1418,34 @@ public:
class Options_for_cast: public Options
{
public:
- Options_for_cast()
- :Options(flags_for_get_date(), DATETIME_TO_TIME_YYYYMMDD_TRUNCATE)
+ Options_for_cast(THD *thd)
+ :Options(default_flags_for_get_date(), default_round_mode(thd),
+ DATETIME_TO_TIME_YYYYMMDD_TRUNCATE)
+ { }
+ Options_for_cast(date_mode_t mode, THD *thd)
+ :Options(default_flags_for_get_date() | (mode & TIME_FUZZY_DATES),
+ default_round_mode(thd),
+ DATETIME_TO_TIME_YYYYMMDD_TRUNCATE)
+ { }
+ };
+
+ class Options_for_round: public Options
+ {
+ public:
+ Options_for_round(time_round_mode_t round_mode= TIME_FRAC_TRUNCATE)
+ :Options(Time::default_flags_for_get_date(), round_mode,
+ Time::DATETIME_TO_TIME_DISALLOW)
+ { }
+ };
+ class Options_cmp: public Options
+ {
+ public:
+ Options_cmp(THD *thd)
+ :Options(comparison_flags_for_get_date(), thd)
+ { }
+ Options_cmp(THD *thd, datetime_to_time_mode_t dtmode)
+ :Options(comparison_flags_for_get_date(),
+ default_round_mode(thd), dtmode)
{ }
};
private:
@@ -147,46 +1456,79 @@ private:
bool is_valid_time_slow() const
{
return time_type == MYSQL_TIMESTAMP_TIME &&
- year == 0 && month == 0 && day == 0 &&
- minute <= TIME_MAX_MINUTE &&
- second <= TIME_MAX_SECOND &&
- second_part <= TIME_MAX_SECOND_PART;
+ has_zero_YYYYMMDD() && has_valid_mmssff();
+ }
+ void hhmmssff_copy(const MYSQL_TIME *from)
+ {
+ hour= from->hour;
+ minute= from->minute;
+ second= from->second;
+ second_part= from->second_part;
+ }
+ void datetime_to_time_YYYYMMDD_000000DD_mix_to_hours(int *warn,
+ uint from_year,
+ uint from_month,
+ uint from_day)
+ {
+ if (from_year != 0 || from_month != 0)
+ *warn|= MYSQL_TIME_NOTE_TRUNCATED;
+ else
+ hour+= from_day * 24;
+ }
+ /*
+ The result is calculated effectively similar to:
+ TIMEDIFF(dt, CAST(CURRENT_DATE AS DATETIME))
+ If the difference does not fit to the supported TIME range, it's truncated.
+ */
+ void datetime_to_time_minus_current_date(THD *thd)
+ {
+ MYSQL_TIME current_date, tmp;
+ set_current_date(thd, &current_date);
+ calc_time_diff(this, &current_date, 1, &tmp, date_mode_t(0));
+ static_cast<MYSQL_TIME*>(this)[0]= tmp;
+ int warnings= 0;
+ (void) check_time_range(this, TIME_SECOND_PART_DIGITS, &warnings);
+ DBUG_ASSERT(is_valid_time());
}
-
/*
Convert a valid DATE or DATETIME to TIME.
Before this call, "this" must be a valid DATE or DATETIME value,
- e.g. returned from Item::get_date().
+ e.g. returned from Item::get_date(), str_to_xxx(), number_to_xxx().
After this call, "this" is a valid TIME value.
*/
- void valid_datetime_to_valid_time(const Options opt)
+ void valid_datetime_to_valid_time(THD *thd, int *warn, const Options opt)
{
DBUG_ASSERT(time_type == MYSQL_TIMESTAMP_DATE ||
time_type == MYSQL_TIMESTAMP_DATETIME);
/*
- Make sure that day and hour are valid, so the result hour value
+ We're dealing with a DATE or DATETIME returned from
+ str_to_xxx(), number_to_xxx() or unpack_time().
+ Do some asserts to make sure the result hour value
after mixing days to hours does not go out of the valid TIME range.
+ The maximum hour value after mixing days will be 31*24+23=767,
+ which is within the supported TIME range.
+ Thus no adjust_time_range_or_invalidate() is needed here.
*/
DBUG_ASSERT(day < 32);
DBUG_ASSERT(hour < 24);
- if (year == 0 && month == 0 &&
- opt.datetime_to_time_mode() ==
- DATETIME_TO_TIME_YYYYMMDD_000000DD_MIX_TO_HOURS)
+ if (opt.datetime_to_time_mode() == DATETIME_TO_TIME_MINUS_CURRENT_DATE)
{
- /*
- The maximum hour value after mixing days will be 31*24+23=767,
- which is within the supported TIME range.
- Thus no adjust_time_range_or_invalidate() is needed here.
- */
- hour+= day * 24;
+ datetime_to_time_minus_current_date(thd);
+ }
+ else
+ {
+ if (opt.datetime_to_time_mode() ==
+ DATETIME_TO_TIME_YYYYMMDD_000000DD_MIX_TO_HOURS)
+ datetime_to_time_YYYYMMDD_000000DD_mix_to_hours(warn, year, month, day);
+ year= month= day= 0;
+ time_type= MYSQL_TIMESTAMP_TIME;
}
- year= month= day= 0;
- time_type= MYSQL_TIMESTAMP_TIME;
DBUG_ASSERT(is_valid_time_slow());
}
/**
Convert valid DATE/DATETIME to valid TIME if needed.
This method is called after Item::get_date(),
+ str_to_xxx(), number_to_xxx().
which can return only valid TIME/DATE/DATETIME values.
Before this call, "this" is:
- either a valid TIME/DATE/DATETIME value
@@ -196,12 +1538,19 @@ private:
- either a valid TIME (within the supported TIME range),
- or MYSQL_TIMESTAMP_NONE
*/
- void valid_MYSQL_TIME_to_valid_value(const Options opt)
+ void valid_MYSQL_TIME_to_valid_value(THD *thd, int *warn, const Options opt)
{
switch (time_type) {
case MYSQL_TIMESTAMP_DATE:
case MYSQL_TIMESTAMP_DATETIME:
- valid_datetime_to_valid_time(opt);
+ if (opt.datetime_to_time_mode() ==
+ DATETIME_TO_TIME_YYYYMMDD_00000000_ONLY &&
+ (year || month || day))
+ make_from_out_of_range(warn);
+ else if (opt.datetime_to_time_mode() == DATETIME_TO_TIME_DISALLOW)
+ make_from_out_of_range(warn);
+ else
+ valid_datetime_to_valid_time(thd, warn, opt);
break;
case MYSQL_TIMESTAMP_NONE:
break;
@@ -213,14 +1562,155 @@ private:
break;
}
}
- void make_from_item(class Item *item, const Options opt);
+
+ /*
+ This method is called after number_to_xxx() and str_to_xxx(),
+ which can return DATE or DATETIME values. Convert to TIME if needed.
+ We trust that xxx_to_time() returns a valid TIME/DATE/DATETIME value,
+ so here we need to do only simple validation.
+ */
+ void xxx_to_time_result_to_valid_value(THD *thd, int *warn, const Options opt)
+ {
+ // str_to_xxx(), number_to_xxx() never return MYSQL_TIMESTAMP_ERROR
+ DBUG_ASSERT(time_type != MYSQL_TIMESTAMP_ERROR);
+ valid_MYSQL_TIME_to_valid_value(thd, warn, opt);
+ }
+ void adjust_time_range_or_invalidate(int *warn)
+ {
+ if (check_time_range(this, TIME_SECOND_PART_DIGITS, warn))
+ time_type= MYSQL_TIMESTAMP_NONE;
+ DBUG_ASSERT(is_valid_value_slow());
+ }
public:
+ void round_or_set_max(uint dec, int *warn, ulong nsec);
+private:
+ void round_or_set_max(uint dec, int *warn);
+
+ /*
+ All make_from_xxx() methods initialize *warn.
+ The old value gets lost.
+ */
+ void make_from_datetime_move_day_to_hour(int *warn, const MYSQL_TIME *from);
+ void make_from_datetime_with_days_diff(int *warn, const MYSQL_TIME *from,
+ long curdays);
+ void make_from_time(int *warn, const MYSQL_TIME *from);
+ void make_from_datetime(int *warn, const MYSQL_TIME *from, long curdays);
+ void make_from_item(THD *thd, int *warn, Item *item, const Options opt);
+public:
+ /*
+ All constructors that accept an "int *warn" parameter initialize *warn.
+ The old value gets lost.
+ */
+ Time(int *warn, bool neg, ulonglong hour, uint minute, const Sec6 &second);
Time() { time_type= MYSQL_TIMESTAMP_NONE; }
- Time(Item *item) { make_from_item(item, Options()); }
- Time(Item *item, const Options opt) { make_from_item(item, opt); }
- static sql_mode_t flags_for_get_date()
+ Time(const Native &native);
+ Time(THD *thd, const MYSQL_TIME *ltime, const Options opt)
+ {
+ *(static_cast<MYSQL_TIME*>(this))= *ltime;
+ DBUG_ASSERT(is_valid_temporal());
+ int warn= 0;
+ valid_MYSQL_TIME_to_valid_value(thd, &warn, opt);
+ }
+ Time(Item *item)
+ :Time(current_thd, item)
+ { }
+ Time(THD *thd, Item *item, const Options opt)
+ {
+ int warn;
+ make_from_item(thd, &warn, item, opt);
+ }
+ Time(THD *thd, Item *item)
+ :Time(thd, item, Options(thd))
+ { }
+ Time(int *warn, const MYSQL_TIME *from, long curdays);
+ Time(THD *thd, MYSQL_TIME_STATUS *status,
+ const char *str, size_t len, CHARSET_INFO *cs,
+ const Options opt)
+ {
+ if (str_to_datetime_or_date_or_time(thd, status, str, len, cs, opt))
+ time_type= MYSQL_TIMESTAMP_NONE;
+ // The below call will optionally add notes to already collected warnings:
+ else
+ xxx_to_time_result_to_valid_value(thd, &status->warnings, opt);
+ }
+
+protected:
+ Time(THD *thd, int *warn, const Sec6 &nr, const Options opt)
+ {
+ if (nr.to_datetime_or_time(this, warn, TIME_INVALID_DATES))
+ time_type= MYSQL_TIMESTAMP_NONE;
+ xxx_to_time_result_to_valid_value(thd, warn, opt);
+ }
+ Time(THD *thd, int *warn, const Sec9 &nr, const Options &opt)
+ :Time(thd, warn, static_cast<Sec6>(nr), opt)
+ {
+ if (is_valid_time() && time_round_mode_t(opt) == TIME_FRAC_ROUND)
+ round_or_set_max(6, warn, nr.nsec());
+ }
+
+public:
+ Time(THD *thd, int *warn, const Longlong_hybrid &nr, const Options &opt)
+ :Time(thd, warn, Sec6(nr), opt)
+ { }
+ Time(THD *thd, int *warn, double nr, const Options &opt)
+ :Time(thd, warn, Sec9(nr), opt)
+ { }
+ Time(THD *thd, int *warn, const my_decimal *d, const Options &opt)
+ :Time(thd, warn, Sec9(d), opt)
+ { }
+
+ Time(THD *thd, Item *item, const Options opt, uint dec)
+ :Time(thd, item, opt)
+ {
+ round(dec, time_round_mode_t(opt));
+ }
+ Time(int *warn, const MYSQL_TIME *from, long curdays,
+ const Time::Options &opt, uint dec)
+ :Time(warn, from, curdays)
+ {
+ round(dec, time_round_mode_t(opt), warn);
+ }
+ Time(int *warn, bool neg, ulonglong hour, uint minute, const Sec9 &second,
+ time_round_mode_t mode, uint dec)
+ :Time(warn, neg, hour, minute, second)
+ {
+ DBUG_ASSERT(is_valid_time());
+ if ((ulonglong) mode == (ulonglong) TIME_FRAC_ROUND)
+ round_or_set_max(6, warn, second.nsec());
+ round(dec, mode, warn);
+ }
+ Time(THD *thd, MYSQL_TIME_STATUS *status,
+ const char *str, size_t len, CHARSET_INFO *cs,
+ const Options &opt, uint dec)
+ :Time(thd, status, str, len, cs, opt)
+ {
+ round(dec, time_round_mode_t(opt), &status->warnings);
+ }
+ Time(THD *thd, int *warn, const Longlong_hybrid &nr,
+ const Options &opt, uint dec)
+ :Time(thd, warn, nr, opt)
+ {
+ /*
+ Decimal digit truncation is needed here in case if nr was out
+ of the supported TIME range, so "this" was set to '838:59:59.999999'.
+ We always do truncation (not rounding) here, independently from "opt".
+ */
+ trunc(dec);
+ }
+ Time(THD *thd, int *warn, double nr, const Options &opt, uint dec)
+ :Time(thd, warn, nr, opt)
+ {
+ round(dec, time_round_mode_t(opt), warn);
+ }
+ Time(THD *thd, int *warn, const my_decimal *d, const Options &opt, uint dec)
+ :Time(thd, warn, d, opt)
+ {
+ round(dec, time_round_mode_t(opt), warn);
+ }
+
+ static date_conv_mode_t default_flags_for_get_date()
{ return TIME_TIME_ONLY | TIME_INVALID_DATES; }
- static sql_mode_t comparison_flags_for_get_date()
+ static date_conv_mode_t comparison_flags_for_get_date()
{ return TIME_TIME_ONLY | TIME_INVALID_DATES | TIME_FUZZY_DATES; }
bool is_valid_time() const
{
@@ -247,8 +1737,8 @@ public:
{
DBUG_ASSERT(is_valid_time_slow());
DBUG_ASSERT(other->is_valid_time_slow());
- longlong p0= pack_time(this);
- longlong p1= pack_time(other);
+ longlong p0= to_packed();
+ longlong p1= other->to_packed();
if (p0 < p1)
return -1;
if (p0 > p1)
@@ -264,6 +1754,114 @@ public:
{
return neg ? -to_seconds_abs() : to_seconds_abs();
}
+ longlong to_longlong() const
+ {
+ if (!is_valid_time())
+ return 0;
+ ulonglong v= TIME_to_ulonglong_time(this);
+ return neg ? -(longlong) v : (longlong) v;
+ }
+ double to_double() const
+ {
+ return !is_valid_time() ? 0 :
+ Temporal::to_double(neg, TIME_to_ulonglong_time(this), second_part);
+ }
+ bool to_native(Native *to, uint decimals) const;
+ String *to_string(String *str, uint dec) const
+ {
+ if (!is_valid_time())
+ return NULL;
+ str->set_charset(&my_charset_numeric);
+ if (!str->alloc(MAX_DATE_STRING_REP_LENGTH))
+ str->length(my_time_to_str(this, const_cast<char*>(str->ptr()), dec));
+ return str;
+ }
+ my_decimal *to_decimal(my_decimal *to)
+ {
+ return is_valid_time() ? Temporal::to_decimal(to) : bad_to_decimal(to);
+ }
+ longlong to_packed() const
+ {
+ return is_valid_time() ? Temporal::to_packed() : 0;
+ }
+ longlong valid_time_to_packed() const
+ {
+ DBUG_ASSERT(is_valid_time_slow());
+ return Temporal::to_packed();
+ }
+ long fraction_remainder(uint dec) const
+ {
+ DBUG_ASSERT(is_valid_time());
+ return Temporal::fraction_remainder(dec);
+ }
+
+ Time &trunc(uint dec)
+ {
+ if (is_valid_time())
+ my_time_trunc(this, dec);
+ DBUG_ASSERT(is_valid_value_slow());
+ return *this;
+ }
+ Time &ceiling(int *warn)
+ {
+ if (is_valid_time())
+ {
+ if (neg)
+ my_time_trunc(this, 0);
+ else if (second_part)
+ round_or_set_max(0, warn, 999999999);
+ }
+ DBUG_ASSERT(is_valid_value_slow());
+ return *this;
+ }
+ Time &ceiling()
+ {
+ int warn= 0;
+ return ceiling(&warn);
+ }
+ Time &floor(int *warn)
+ {
+ if (is_valid_time())
+ {
+ if (!neg)
+ my_time_trunc(this, 0);
+ else if (second_part)
+ round_or_set_max(0, warn, 999999999);
+ }
+ DBUG_ASSERT(is_valid_value_slow());
+ return *this;
+ }
+ Time &floor()
+ {
+ int warn= 0;
+ return floor(&warn);
+ }
+ Time &round(uint dec, int *warn)
+ {
+ if (is_valid_time())
+ round_or_set_max(dec, warn);
+ DBUG_ASSERT(is_valid_value_slow());
+ return *this;
+ }
+ Time &round(uint dec, time_round_mode_t mode, int *warn)
+ {
+ switch (mode.mode()) {
+ case time_round_mode_t::FRAC_NONE:
+ DBUG_ASSERT(fraction_remainder(dec) == 0);
+ return trunc(dec);
+ case time_round_mode_t::FRAC_TRUNCATE:
+ return trunc(dec);
+ case time_round_mode_t::FRAC_ROUND:
+ return round(dec, warn);
+ }
+ return *this;
+ }
+ Time &round(uint dec, time_round_mode_t mode)
+ {
+ int warn= 0;
+ return round(dec, mode, &warn);
+ }
+
};
@@ -290,10 +1888,25 @@ public:
it is accessed externally only in the valid state.
*/
-class Temporal_with_date: protected MYSQL_TIME
+class Temporal_with_date: public Temporal
{
+public:
+ class Options: public Temporal::Options
+ {
+ public:
+ Options(date_conv_mode_t fuzzydate, time_round_mode_t mode):
+ Temporal::Options(fuzzydate, mode)
+ {}
+ explicit Options(const Temporal::Options &opt)
+ :Temporal::Options(opt)
+ { }
+ explicit Options(date_mode_t mode)
+ :Temporal::Options(mode)
+ { }
+ };
protected:
- void make_from_item(THD *thd, Item *item, sql_mode_t flags);
+ void check_date_or_invalidate(int *warn, date_conv_mode_t flags);
+ void make_from_item(THD *thd, Item *item, date_mode_t flags);
ulong daynr() const
{
@@ -303,10 +1916,60 @@ protected:
{
return ::calc_weekday(daynr(), sunday_first_day_of_week);
}
- Temporal_with_date(THD *thd, Item *item, sql_mode_t flags)
+ ulong dayofyear() const
+ {
+ return (ulong) (daynr() - ::calc_daynr(year, 1, 1) + 1);
+ }
+ uint quarter() const
{
- make_from_item(thd, item, flags);
+ return (month + 2) / 3;
}
+ uint week(uint week_behaviour) const
+ {
+ uint year;
+ return calc_week(this, week_behaviour, &year);
+ }
+ uint yearweek(uint week_behaviour) const
+ {
+ uint year;
+ uint week= calc_week(this, week_behaviour, &year);
+ return week + year * 100;
+ }
+public:
+ Temporal_with_date()
+ {
+ time_type= MYSQL_TIMESTAMP_NONE;
+ }
+ Temporal_with_date(THD *thd, Item *item, date_mode_t fuzzydate)
+ {
+ make_from_item(thd, item, fuzzydate);
+ }
+ Temporal_with_date(int *warn, const Sec6 &nr, date_mode_t flags)
+ {
+ DBUG_ASSERT(bool(flags & TIME_TIME_ONLY) == false);
+ if (nr.to_datetime_or_date(this, warn, date_conv_mode_t(flags)))
+ time_type= MYSQL_TIMESTAMP_NONE;
+ }
+ Temporal_with_date(THD *thd, MYSQL_TIME_STATUS *status,
+ const char *str, size_t len, CHARSET_INFO *cs,
+ date_mode_t flags)
+ {
+ DBUG_ASSERT(bool(flags & TIME_TIME_ONLY) == false);
+ if (str_to_datetime_or_date(thd, status, str, len, cs, flags))
+ time_type= MYSQL_TIMESTAMP_NONE;
+ }
+public:
+ bool check_date_with_warn(THD *thd, date_conv_mode_t flags)
+ {
+ return ::check_date_with_warn(thd, this, flags, MYSQL_TIMESTAMP_ERROR);
+ }
+ bool check_date_with_warn(THD *thd)
+ {
+ return ::check_date_with_warn(thd, this, Temporal::sql_mode_for_dates(thd),
+ MYSQL_TIMESTAMP_ERROR);
+ }
+ static date_conv_mode_t comparison_flags_for_get_date()
+ { return TIME_INVALID_DATES | TIME_FUZZY_DATES; }
};
@@ -331,29 +1994,147 @@ class Date: public Temporal_with_date
return !check_datetime_range(this);
}
public:
- Date(THD *thd, Item *item, sql_mode_t flags)
- :Temporal_with_date(thd, item, flags)
+ class Options: public Temporal_with_date::Options
+ {
+ public:
+ explicit Options(date_conv_mode_t fuzzydate)
+ :Temporal_with_date::Options(fuzzydate, TIME_FRAC_TRUNCATE)
+ { }
+ Options(THD *thd, time_round_mode_t mode)
+ :Temporal_with_date::Options(sql_mode_for_dates(thd), mode)
+ { }
+ explicit Options(THD *thd)
+ :Temporal_with_date::Options(sql_mode_for_dates(thd), TIME_FRAC_TRUNCATE)
+ { }
+ explicit Options(date_mode_t fuzzydate)
+ :Temporal_with_date::Options(fuzzydate)
+ { }
+ };
+public:
+ Date(Item *item, date_mode_t fuzzydate)
+ :Date(current_thd, item, fuzzydate)
+ { }
+ Date(THD *thd, Item *item, date_mode_t fuzzydate)
+ :Temporal_with_date(thd, item, fuzzydate)
{
if (time_type == MYSQL_TIMESTAMP_DATETIME)
datetime_to_date(this);
DBUG_ASSERT(is_valid_value_slow());
}
+ Date(THD *thd, Item *item, date_conv_mode_t fuzzydate)
+ :Date(thd, item, Options(fuzzydate))
+ { }
+ Date(THD *thd, Item *item)
+ :Temporal_with_date(Date(thd, item, Options(thd, TIME_FRAC_TRUNCATE)))
+ { }
+ Date(Item *item)
+ :Temporal_with_date(Date(current_thd, item))
+ { }
Date(const Temporal_with_date *d)
:Temporal_with_date(*d)
{
datetime_to_date(this);
DBUG_ASSERT(is_valid_date_slow());
}
+ explicit Date(const Temporal_hybrid *from)
+ {
+ from->copy_valid_value_to_mysql_time(this);
+ DBUG_ASSERT(is_valid_date_slow());
+ }
bool is_valid_date() const
{
DBUG_ASSERT(is_valid_value_slow());
return time_type == MYSQL_TIMESTAMP_DATE;
}
+ bool check_date(date_conv_mode_t flags, int *warnings) const
+ {
+ DBUG_ASSERT(is_valid_date_slow());
+ return ::check_date(this, (year || month || day),
+ ulonglong(flags & TIME_MODE_FOR_XXX_TO_DATE),
+ warnings);
+ }
+ bool check_date(THD *thd, int *warnings) const
+ {
+ return check_date(Temporal::sql_mode_for_dates(thd), warnings);
+ }
+ bool check_date(date_conv_mode_t flags) const
+ {
+ int dummy; /* unused */
+ return check_date(flags, &dummy);
+ }
+ bool check_date(THD *thd) const
+ {
+ int dummy;
+ return check_date(Temporal::sql_mode_for_dates(thd), &dummy);
+ }
const MYSQL_TIME *get_mysql_time() const
{
DBUG_ASSERT(is_valid_date_slow());
return this;
}
+ bool copy_to_mysql_time(MYSQL_TIME *ltime) const
+ {
+ if (time_type == MYSQL_TIMESTAMP_NONE)
+ {
+ ltime->time_type= MYSQL_TIMESTAMP_NONE;
+ return true;
+ }
+ DBUG_ASSERT(is_valid_date_slow());
+ *ltime= *this;
+ return false;
+ }
+ ulong daynr() const
+ {
+ DBUG_ASSERT(is_valid_date_slow());
+ return Temporal_with_date::daynr();
+ }
+ ulong dayofyear() const
+ {
+ DBUG_ASSERT(is_valid_date_slow());
+ return Temporal_with_date::dayofyear();
+ }
+ uint quarter() const
+ {
+ DBUG_ASSERT(is_valid_date_slow());
+ return Temporal_with_date::quarter();
+ }
+ uint week(uint week_behaviour) const
+ {
+ DBUG_ASSERT(is_valid_date_slow());
+ return Temporal_with_date::week(week_behaviour);
+ }
+ uint yearweek(uint week_behaviour) const
+ {
+ DBUG_ASSERT(is_valid_date_slow());
+ return Temporal_with_date::yearweek(week_behaviour);
+ }
+
+ longlong valid_date_to_packed() const
+ {
+ DBUG_ASSERT(is_valid_date_slow());
+ return Temporal::to_packed();
+ }
+ longlong to_longlong() const
+ {
+ return is_valid_date() ? (longlong) TIME_to_ulonglong_date(this) : 0LL;
+ }
+ double to_double() const
+ {
+ return (double) to_longlong();
+ }
+ String *to_string(String *str) const
+ {
+ if (!is_valid_date())
+ return NULL;
+ str->set_charset(&my_charset_numeric);
+ if (!str->alloc(MAX_DATE_STRING_REP_LENGTH))
+ str->length(my_date_to_str(this, const_cast<char*>(str->ptr())));
+ return str;
+ }
+ my_decimal *to_decimal(my_decimal *to)
+ {
+ return is_valid_date() ? Temporal::to_decimal(to) : bad_to_decimal(to);
+ }
};
@@ -378,14 +2159,160 @@ class Datetime: public Temporal_with_date
DBUG_ASSERT(time_type == MYSQL_TIMESTAMP_DATETIME);
return !check_datetime_range(this);
}
-public:
- Datetime(THD *thd, Item *item, sql_mode_t flags)
- :Temporal_with_date(thd, item, flags)
+ bool add_nanoseconds_or_invalidate(THD *thd, int *warn, ulong nsec)
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ bool rc= Temporal::datetime_add_nanoseconds_or_invalidate(thd, warn, nsec);
+ DBUG_ASSERT(is_valid_value_slow());
+ return rc;
+ }
+ void date_to_datetime_if_needed()
{
if (time_type == MYSQL_TIMESTAMP_DATE)
date_to_datetime(this);
+ }
+ void make_from_time(THD *thd, int *warn, const MYSQL_TIME *from,
+ date_conv_mode_t flags);
+ void make_from_datetime(THD *thd, int *warn, const MYSQL_TIME *from,
+ date_conv_mode_t flags);
+ bool round_or_invalidate(THD *thd, uint dec, int *warn);
+ bool round_or_invalidate(THD *thd, uint dec, int *warn, ulong nsec)
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ bool rc= Temporal::datetime_round_or_invalidate(thd, dec, warn, nsec);
+ DBUG_ASSERT(is_valid_value_slow());
+ return rc;
+ }
+public:
+
+ class Options: public Temporal_with_date::Options
+ {
+ public:
+ Options(date_conv_mode_t fuzzydate, time_round_mode_t nanosecond_rounding)
+ :Temporal_with_date::Options(fuzzydate, nanosecond_rounding)
+ { }
+ Options(THD *thd)
+ :Temporal_with_date::Options(sql_mode_for_dates(thd), default_round_mode(thd))
+ { }
+ Options(THD *thd, time_round_mode_t rounding_mode)
+ :Temporal_with_date::Options(sql_mode_for_dates(thd), rounding_mode)
+ { }
+ Options(date_conv_mode_t fuzzydate, THD *thd)
+ :Temporal_with_date::Options(fuzzydate, default_round_mode(thd))
+ { }
+ };
+
+ class Options_cmp: public Options
+ {
+ public:
+ Options_cmp(THD *thd)
+ :Options(comparison_flags_for_get_date(), thd)
+ { }
+ };
+
+ static Datetime zero()
+ {
+ int warn;
+ static Longlong_hybrid nr(0, false);
+ return Datetime(&warn, nr, date_mode_t(0));
+ }
+public:
+ Datetime() // NULL value
+ :Temporal_with_date()
+ { }
+ Datetime(THD *thd, Item *item, date_mode_t fuzzydate)
+ :Temporal_with_date(thd, item, fuzzydate)
+ {
+ date_to_datetime_if_needed();
+ DBUG_ASSERT(is_valid_value_slow());
+ }
+ Datetime(THD *thd, Item *item)
+ :Temporal_with_date(Datetime(thd, item, Options(thd)))
+ { }
+ Datetime(Item *item)
+ :Datetime(current_thd, item)
+ { }
+
+ Datetime(THD *thd, int *warn, const MYSQL_TIME *from, date_conv_mode_t flags);
+ Datetime(THD *thd, MYSQL_TIME_STATUS *status,
+ const char *str, size_t len, CHARSET_INFO *cs,
+ const date_mode_t fuzzydate)
+ :Temporal_with_date(thd, status, str, len, cs, fuzzydate)
+ {
+ date_to_datetime_if_needed();
+ DBUG_ASSERT(is_valid_value_slow());
+ }
+
+protected:
+ Datetime(int *warn, const Sec6 &nr, date_mode_t flags)
+ :Temporal_with_date(warn, nr, flags)
+ {
+ date_to_datetime_if_needed();
+ DBUG_ASSERT(is_valid_value_slow());
+ }
+ Datetime(THD *thd, int *warn, const Sec9 &nr, date_mode_t fuzzydate)
+ :Datetime(warn, static_cast<const Sec6>(nr), fuzzydate)
+ {
+ if (is_valid_datetime() &&
+ time_round_mode_t(fuzzydate) == TIME_FRAC_ROUND)
+ round_or_invalidate(thd, 6, warn, nr.nsec());
DBUG_ASSERT(is_valid_value_slow());
}
+
+public:
+ Datetime(int *warn, const Longlong_hybrid &nr, date_mode_t mode)
+ :Datetime(warn, Sec6(nr), mode)
+ { }
+ Datetime(THD *thd, int *warn, double nr, date_mode_t fuzzydate)
+ :Datetime(thd, warn, Sec9(nr), fuzzydate)
+ { }
+ Datetime(THD *thd, int *warn, const my_decimal *d, date_mode_t fuzzydate)
+ :Datetime(thd, warn, Sec9(d), fuzzydate)
+ { }
+ Datetime(THD *thd, const timeval &tv);
+
+ Datetime(THD *thd, Item *item, date_mode_t fuzzydate, uint dec)
+ :Datetime(thd, item, fuzzydate)
+ {
+ int warn= 0;
+ round(thd, dec, time_round_mode_t(fuzzydate), &warn);
+ }
+ Datetime(THD *thd, MYSQL_TIME_STATUS *status,
+ const char *str, size_t len, CHARSET_INFO *cs,
+ date_mode_t fuzzydate, uint dec)
+ :Datetime(thd, status, str, len, cs, fuzzydate)
+ {
+ round(thd, dec, time_round_mode_t(fuzzydate), &status->warnings);
+ }
+ Datetime(THD *thd, int *warn, double nr, date_mode_t fuzzydate, uint dec)
+ :Datetime(thd, warn, nr, fuzzydate)
+ {
+ round(thd, dec, time_round_mode_t(fuzzydate), warn);
+ }
+ Datetime(THD *thd, int *warn, const my_decimal *d, date_mode_t fuzzydate, uint dec)
+ :Datetime(thd, warn, d, fuzzydate)
+ {
+ round(thd, dec, time_round_mode_t(fuzzydate), warn);
+ }
+ Datetime(THD *thd, int *warn, const MYSQL_TIME *from,
+ date_mode_t fuzzydate, uint dec)
+ :Datetime(thd, warn, from, date_conv_mode_t(fuzzydate) & ~TIME_TIME_ONLY)
+ {
+ round(thd, dec, time_round_mode_t(fuzzydate), warn);
+ }
+ explicit Datetime(const Temporal_hybrid *from)
+ {
+ from->copy_valid_value_to_mysql_time(this);
+ DBUG_ASSERT(is_valid_datetime_slow());
+ }
+ explicit Datetime(const MYSQL_TIME *from)
+ {
+ *(static_cast<MYSQL_TIME*>(this))= *from;
+ DBUG_ASSERT(is_valid_datetime_slow());
+ }
+ Datetime(my_time_t unix_time, ulong second_part,
+ const Time_zone* time_zone);
+
bool is_valid_datetime() const
{
/*
@@ -395,16 +2322,72 @@ public:
DBUG_ASSERT(is_valid_value_slow());
return time_type == MYSQL_TIMESTAMP_DATETIME;
}
+ bool check_date(date_conv_mode_t flags, int *warnings) const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return ::check_date(this, (year || month || day),
+ ulonglong(flags & TIME_MODE_FOR_XXX_TO_DATE),
+ warnings);
+ }
+ bool check_date(date_conv_mode_t flags) const
+ {
+ int dummy; /* unused */
+ return check_date(flags, &dummy);
+ }
+ bool check_date(THD *thd) const
+ {
+ return check_date(Temporal::sql_mode_for_dates(thd));
+ }
bool hhmmssff_is_zero() const
{
DBUG_ASSERT(is_valid_datetime_slow());
return hour == 0 && minute == 0 && second == 0 && second_part == 0;
}
+ ulong daynr() const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return Temporal_with_date::daynr();
+ }
int weekday(bool sunday_first_day_of_week) const
{
DBUG_ASSERT(is_valid_datetime_slow());
return Temporal_with_date::weekday(sunday_first_day_of_week);
}
+ ulong dayofyear() const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return Temporal_with_date::dayofyear();
+ }
+ uint quarter() const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return Temporal_with_date::quarter();
+ }
+ uint week(uint week_behaviour) const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return Temporal_with_date::week(week_behaviour);
+ }
+ uint yearweek(uint week_behaviour) const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return Temporal_with_date::yearweek(week_behaviour);
+ }
+
+ longlong hhmmss_to_seconds_abs() const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return hour * 3600L + minute * 60 + second;
+ }
+ longlong hhmmss_to_seconds() const
+ {
+ return neg ? -hhmmss_to_seconds_abs() : hhmmss_to_seconds_abs();
+ }
+ longlong to_seconds() const
+ {
+ return hhmmss_to_seconds() + (longlong) daynr() * 24L * 3600L;
+ }
+
const MYSQL_TIME *get_mysql_time() const
{
DBUG_ASSERT(is_valid_datetime_slow());
@@ -436,8 +2419,322 @@ public:
ltime->time_type= type;
return false;
}
+ longlong to_longlong() const
+ {
+ return is_valid_datetime() ?
+ (longlong) TIME_to_ulonglong_datetime(this) : 0LL;
+ }
+ double to_double() const
+ {
+ return !is_valid_datetime() ? 0 :
+ Temporal::to_double(neg, TIME_to_ulonglong_datetime(this), second_part);
+ }
+ String *to_string(String *str, uint dec) const
+ {
+ if (!is_valid_datetime())
+ return NULL;
+ str->set_charset(&my_charset_numeric);
+ if (!str->alloc(MAX_DATE_STRING_REP_LENGTH))
+ str->length(my_datetime_to_str(this, const_cast<char*>(str->ptr()), dec));
+ return str;
+ }
+ my_decimal *to_decimal(my_decimal *to)
+ {
+ return is_valid_datetime() ? Temporal::to_decimal(to) : bad_to_decimal(to);
+ }
+ longlong to_packed() const
+ {
+ return is_valid_datetime() ? Temporal::to_packed() : 0;
+ }
+ longlong valid_datetime_to_packed() const
+ {
+ DBUG_ASSERT(is_valid_datetime_slow());
+ return Temporal::to_packed();
+ }
+ long fraction_remainder(uint dec) const
+ {
+ DBUG_ASSERT(is_valid_datetime());
+ return Temporal::fraction_remainder(dec);
+ }
+
+ Datetime &trunc(uint dec)
+ {
+ if (is_valid_datetime())
+ my_datetime_trunc(this, dec);
+ DBUG_ASSERT(is_valid_value_slow());
+ return *this;
+ }
+ Datetime &ceiling(THD *thd, int *warn)
+ {
+ if (is_valid_datetime() && second_part)
+ round_or_invalidate(thd, 0, warn, 999999999);
+ DBUG_ASSERT(is_valid_value_slow());
+ return *this;
+ }
+ Datetime &ceiling(THD *thd)
+ {
+ int warn= 0;
+ return ceiling(thd, &warn);
+ }
+ Datetime &round(THD *thd, uint dec, int *warn)
+ {
+ if (is_valid_datetime())
+ round_or_invalidate(thd, dec, warn);
+ DBUG_ASSERT(is_valid_value_slow());
+ return *this;
+ }
+ Datetime &round(THD *thd, uint dec, time_round_mode_t mode, int *warn)
+ {
+ switch (mode.mode()) {
+ case time_round_mode_t::FRAC_NONE:
+ DBUG_ASSERT(fraction_remainder(dec) == 0);
+ return trunc(dec);
+ case time_round_mode_t::FRAC_TRUNCATE:
+ return trunc(dec);
+ case time_round_mode_t::FRAC_ROUND:
+ return round(thd, dec, warn);
+ }
+ return *this;
+ }
+ Datetime &round(THD *thd, uint dec, time_round_mode_t mode)
+ {
+ int warn= 0;
+ return round(thd, dec, mode, &warn);
+ }
+
+};
+
+
+/*
+ Datetime to be created from an Item who is known to be of a temporal
+ data type. For temporal data types we don't need nanosecond rounding
+ or truncation, as their precision is limited.
+*/
+class Datetime_from_temporal: public Datetime
+{
+public:
+ // The constructor DBUG_ASSERTs on a proper Item data type.
+ Datetime_from_temporal(THD *thd, Item *temporal, date_conv_mode_t flags);
};
+
+/*
+ Datetime to be created from an Item who is known not to have digits outside
+ of the specified scale. So it's not important which rounding method to use.
+ TRUNCATE should work.
+ Typically, Item is of a temporal data type, but this is not strictly required.
+*/
+class Datetime_truncation_not_needed: public Datetime
+{
+public:
+ Datetime_truncation_not_needed(THD *thd, Item *item, date_conv_mode_t mode);
+ Datetime_truncation_not_needed(THD *thd, Item *item, date_mode_t mode)
+ :Datetime_truncation_not_needed(thd, item, date_conv_mode_t(mode))
+ { }
+};
+
+
+class Timestamp: protected Timeval
+{
+ static uint binary_length_to_precision(uint length);
+protected:
+ void round_or_set_max(uint dec, int *warn);
+ bool add_nanoseconds_usec(uint nanoseconds)
+ {
+ DBUG_ASSERT(nanoseconds <= 1000000000);
+ if (nanoseconds < 500)
+ return false;
+ tv_usec+= (nanoseconds + 500) / 1000;
+ if (tv_usec < 1000000)
+ return false;
+ tv_usec%= 1000000;
+ return true;
+ }
+public:
+ static date_conv_mode_t sql_mode_for_timestamp(THD *thd);
+ static time_round_mode_t default_round_mode(THD *thd);
+ class DatetimeOptions: public date_mode_t
+ {
+ public:
+ DatetimeOptions(date_conv_mode_t fuzzydate, time_round_mode_t round_mode)
+ :date_mode_t(fuzzydate | round_mode)
+ { }
+ DatetimeOptions(THD *thd)
+ :DatetimeOptions(sql_mode_for_timestamp(thd), default_round_mode(thd))
+ { }
+ };
+public:
+ Timestamp(my_time_t timestamp, ulong sec_part)
+ :Timeval(timestamp, sec_part)
+ { }
+ explicit Timestamp(const timeval &tv)
+ :Timeval(tv)
+ { }
+ explicit Timestamp(const Native &native);
+ Timestamp(THD *thd, const MYSQL_TIME *ltime, uint *error_code);
+ const struct timeval &tv() const { return *this; }
+ int cmp(const Timestamp &other) const
+ {
+ return tv_sec < other.tv_sec ? -1 :
+ tv_sec > other.tv_sec ? +1 :
+ tv_usec < other.tv_usec ? -1 :
+ tv_usec > other.tv_usec ? +1 : 0;
+ }
+ bool to_TIME(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) const;
+ bool to_native(Native *to, uint decimals) const;
+ Datetime to_datetime(THD *thd) const
+ {
+ return Datetime(thd, *this);
+ }
+ long fraction_remainder(uint dec) const
+ {
+ return my_time_fraction_remainder(tv_usec, dec);
+ }
+ Timestamp &trunc(uint dec)
+ {
+ my_timeval_trunc(this, dec);
+ return *this;
+ }
+ Timestamp &round(uint dec, int *warn)
+ {
+ round_or_set_max(dec, warn);
+ return *this;
+ }
+ Timestamp &round(uint dec, time_round_mode_t mode, int *warn)
+ {
+ switch (mode.mode()) {
+ case time_round_mode_t::FRAC_NONE:
+ DBUG_ASSERT(fraction_remainder(dec) == 0);
+ return trunc(dec);
+ case time_round_mode_t::FRAC_TRUNCATE:
+ return trunc(dec);
+ case time_round_mode_t::FRAC_ROUND:
+ return round(dec, warn);
+ }
+ return *this;
+ }
+ Timestamp &round(uint dec, time_round_mode_t mode)
+ {
+ int warn= 0;
+ return round(dec, mode, &warn);
+ }
+};
+
+
+/**
+ A helper class to store MariaDB TIMESTAMP values, which can be:
+ - real TIMESTAMP (seconds and microseconds since epoch), or
+ - zero datetime '0000-00-00 00:00:00.000000'
+*/
+class Timestamp_or_zero_datetime: protected Timestamp
+{
+ bool m_is_zero_datetime;
+public:
+ Timestamp_or_zero_datetime()
+ :Timestamp(0,0), m_is_zero_datetime(true)
+ { }
+ Timestamp_or_zero_datetime(const Native &native)
+ :Timestamp(native.length() ? Timestamp(native) : Timestamp(0,0)),
+ m_is_zero_datetime(native.length() == 0)
+ { }
+ Timestamp_or_zero_datetime(const Timestamp &tm, bool is_zero_datetime)
+ :Timestamp(tm), m_is_zero_datetime(is_zero_datetime)
+ { }
+ Timestamp_or_zero_datetime(THD *thd, const MYSQL_TIME *ltime, uint *err_code);
+ Datetime to_datetime(THD *thd) const
+ {
+ if (is_zero_datetime())
+ return Datetime::zero();
+ return Timestamp::to_datetime(thd);
+ }
+ bool is_zero_datetime() const { return m_is_zero_datetime; }
+ void trunc(uint decimals)
+ {
+ if (!is_zero_datetime())
+ Timestamp::trunc(decimals);
+ }
+ int cmp(const Timestamp_or_zero_datetime &other) const
+ {
+ if (is_zero_datetime())
+ return other.is_zero_datetime() ? 0 : -1;
+ if (other.is_zero_datetime())
+ return 1;
+ return Timestamp::cmp(other);
+ }
+ bool to_TIME(THD *thd, MYSQL_TIME *to, date_mode_t fuzzydate) const;
+ /*
+ Convert to native format:
+ - Real timestamps are encoded in the same way how Field_timestamp2 stores
+ values (big endian seconds followed by big endian microseconds)
+ - Zero datetime '0000-00-00 00:00:00.000000' is encoded as empty string.
+ Two native values are binary comparable.
+ */
+ bool to_native(Native *to, uint decimals) const;
+};
+
+
+/**
+ A helper class to store non-null MariaDB TIMESTAMP values in
+ the native binary encoded representation.
+*/
+class Timestamp_or_zero_datetime_native:
+ public NativeBuffer<STRING_BUFFER_TIMESTAMP_BINARY_SIZE>
+{
+public:
+ Timestamp_or_zero_datetime_native() { }
+ Timestamp_or_zero_datetime_native(const Timestamp_or_zero_datetime &ts,
+ uint decimals)
+ {
+ if (ts.to_native(this, decimals))
+ length(0); // safety
+ }
+ int save_in_field(Field *field, uint decimals) const;
+ Datetime to_datetime(THD *thd) const
+ {
+ return is_zero_datetime() ?
+ Datetime::zero() :
+ Datetime(thd, Timestamp(*this).tv());
+ }
+ bool is_zero_datetime() const
+ {
+ return length() == 0;
+ }
+};
+
+
+/**
+ A helper class to store nullable MariaDB TIMESTAMP values in
+ the native binary encoded representation.
+*/
+class Timestamp_or_zero_datetime_native_null: public Timestamp_or_zero_datetime_native,
+ public Null_flag
+{
+public:
+ // With optional data type conversion
+ Timestamp_or_zero_datetime_native_null(THD *thd, Item *item, bool conv);
+ // Without data type conversion: item is known to be of the TIMESTAMP type
+ Timestamp_or_zero_datetime_native_null(THD *thd, Item *item)
+ :Timestamp_or_zero_datetime_native_null(thd, item, false)
+ { }
+ Datetime to_datetime(THD *thd) const
+ {
+ return is_null() ? Datetime() :
+ Timestamp_or_zero_datetime_native::to_datetime(thd);
+ }
+ void to_TIME(THD *thd, MYSQL_TIME *to)
+ {
+ DBUG_ASSERT(!is_null());
+ Datetime::Options opt(TIME_CONV_NONE, TIME_FRAC_NONE);
+ Timestamp_or_zero_datetime(*this).to_TIME(thd, to, opt);
+ }
+ bool is_zero_datetime() const
+ {
+ DBUG_ASSERT(!is_null());
+ return Timestamp_or_zero_datetime_native::is_zero_datetime();
+ }
+};
+
+
/*
Flags for collation aggregation modes, used in TDCollation::agg():
@@ -463,7 +2760,6 @@ public:
#define MY_COLL_CMP_CONV (MY_COLL_ALLOW_CONV | MY_COLL_DISALLOW_NONE)
-#define my_charset_numeric my_charset_latin1
#define MY_REPERTOIRE_NUMERIC MY_REPERTOIRE_ASCII
@@ -588,6 +2884,17 @@ public:
};
+class DTCollation_numeric: public DTCollation
+{
+public:
+ DTCollation_numeric()
+ :DTCollation(charset_info(), DERIVATION_NUMERIC, MY_REPERTOIRE_NUMERIC)
+ { }
+ static const CHARSET_INFO *charset_info() { return &my_charset_numeric; }
+ static const DTCollation & singleton();
+};
+
+
static inline uint32
char_to_byte_length_safe(size_t char_length_arg, uint32 mbmaxlen_arg)
{
@@ -852,6 +3159,14 @@ public:
};
+class Type_cmp_attributes
+{
+public:
+ virtual ~Type_cmp_attributes() { }
+ virtual CHARSET_INFO *compare_collation() const= 0;
+};
+
+
class Type_cast_attributes
{
CHARSET_INFO *m_charset;
@@ -904,28 +3219,67 @@ public:
};
-class Record_addr
+class Bit_addr
{
-public:
- uchar *ptr; // Position to field in record
/**
- Byte where the @c NULL bit is stored inside a record. If this Field is a
- @c NOT @c NULL field, this member is @c NULL.
+ Byte where the bit is stored inside a record.
+ If the corresponding Field is a NOT NULL field, this member is NULL.
+ */
+ uchar *m_ptr;
+ /**
+ Offset of the bit inside m_ptr[0], in the range 0..7.
*/
- uchar *null_ptr;
- uchar null_bit; // Bit used to test null bit
+ uchar m_offs;
+public:
+ Bit_addr()
+ :m_ptr(NULL),
+ m_offs(0)
+ { }
+ Bit_addr(uchar *ptr, uchar offs)
+ :m_ptr(ptr), m_offs(offs)
+ {
+ DBUG_ASSERT(ptr || offs == 0);
+ DBUG_ASSERT(offs < 8);
+ }
+ Bit_addr(bool maybe_null)
+ :m_ptr(maybe_null ? (uchar *) "" : NULL),
+ m_offs(0)
+ { }
+ uchar *ptr() const { return m_ptr; }
+ uchar offs() const { return m_offs; }
+ uchar bit() const { return m_ptr ? ((uchar) 1) << m_offs : 0; }
+ void inc()
+ {
+ DBUG_ASSERT(m_ptr);
+ m_ptr+= (m_offs == 7);
+ m_offs= (m_offs + 1) & 7;
+ }
+};
+
+
+class Record_addr
+{
+ uchar *m_ptr; // Position of the field in the record
+ Bit_addr m_null; // Position and offset of the null bit
+public:
Record_addr(uchar *ptr_arg,
uchar *null_ptr_arg,
uchar null_bit_arg)
- :ptr(ptr_arg),
- null_ptr(null_ptr_arg),
- null_bit(null_bit_arg)
+ :m_ptr(ptr_arg),
+ m_null(null_ptr_arg, null_bit_arg)
+ { }
+ Record_addr(uchar *ptr, const Bit_addr &null)
+ :m_ptr(ptr),
+ m_null(null)
{ }
Record_addr(bool maybe_null)
- :ptr(NULL),
- null_ptr(maybe_null ? (uchar*) "" : 0),
- null_bit(0)
+ :m_ptr(NULL),
+ m_null(maybe_null)
{ }
+ uchar *ptr() const { return m_ptr; }
+ const Bit_addr &null() const { return m_null; }
+ uchar *null_ptr() const { return m_null.ptr(); }
+ uchar null_bit() const { return m_null.bit(); }
};
@@ -1000,6 +3354,9 @@ public:
class Type_handler
{
protected:
+ static const Name m_version_default;
+ static const Name m_version_mysql56;
+ static const Name m_version_mariadb53;
String *print_item_value_csstr(THD *thd, Item *item, String *str) const;
String *print_item_value_temporal(THD *thd, Item *item, String *str,
const Name &type_name, String *buf) const;
@@ -1021,6 +3378,7 @@ protected:
bool Item_send_double(Item *item, Protocol *protocol, st_value *buf) const;
bool Item_send_time(Item *item, Protocol *protocol, st_value *buf) const;
bool Item_send_date(Item *item, Protocol *protocol, st_value *buf) const;
+ bool Item_send_timestamp(Item *item, Protocol *protocol, st_value *buf) const;
bool Item_send_datetime(Item *item, Protocol *protocol, st_value *buf) const;
bool Column_definition_prepare_stage2_legacy(Column_definition *c,
enum_field_types type)
@@ -1032,6 +3390,7 @@ protected:
enum_field_types type)
const;
public:
+ static const Type_handler *odbc_literal_type_handler(const LEX_CSTRING *str);
static const Type_handler *blob_type_handler(uint max_octet_length);
static const Type_handler *string_type_handler(uint max_octet_length);
static const Type_handler *bit_and_int_mixture_handler(uint max_char_len);
@@ -1066,18 +3425,75 @@ public:
virtual Schema *schema() const;
virtual const Name name() const= 0;
+ virtual const Name version() const { return m_version_default; }
virtual enum_field_types field_type() const= 0;
virtual enum_field_types real_field_type() const { return field_type(); }
+ /**
+ Type code which is used for merging of traditional data types for result
+ (for UNION and for hybrid functions such as COALESCE).
+ Mapping can be done both ways: old->new, new->old, depending
+ on the particular data type implementation:
+ - type_handler_var_string (MySQL-4.1 old VARCHAR) is converted to
+ new VARCHAR before merging.
+ field_type_merge_rules[][] returns new VARCHAR.
+ - type_handler_newdate is converted to old DATE before merging.
+ field_type_merge_rules[][] returns NEWDATE.
+ - Temporal type_handler_xxx2 (new MySQL-5.6 types) are converted to
+ corresponding old type codes before merging (e.g. TIME2->TIME).
+ field_type_merge_rules[][] returns old type codes (e.g. TIME).
+ Then old types codes are supposed to convert to new type codes somehow,
+ but they do not. So UNION and COALESCE create old columns.
+ This is a bug and should be fixed eventually.
+ */
+ virtual enum_field_types traditional_merge_field_type() const
+ {
+ DBUG_ASSERT(is_traditional_type());
+ return field_type();
+ }
+ virtual enum_field_types type_code_for_protocol() const
+ {
+ return field_type();
+ }
+ virtual protocol_send_type_t protocol_send_type() const= 0;
virtual Item_result result_type() const= 0;
virtual Item_result cmp_type() const= 0;
virtual enum_mysql_timestamp_type mysql_timestamp_type() const
{
return MYSQL_TIMESTAMP_ERROR;
}
+ /*
+ Return true if the native format is fully implemented for a data type:
+ - Field_xxx::val_native()
+ - Item_xxx::val_native() for all classes supporting this data type
+ - Type_handler_xxx::cmp_native()
+ */
+ virtual bool is_val_native_ready() const
+ {
+ return false;
+ }
virtual bool is_timestamp_type() const
{
return false;
}
+ virtual bool is_order_clause_position_type() const
+ {
+ return false;
+ }
+ virtual bool is_limit_clause_valid_type() const
+ {
+ return false;
+ }
+ /*
+ Returns true if this data type supports a hack that
+ WHERE notnull_column IS NULL
+ finds zero values, e.g.:
+ WHERE date_notnull_column IS NULL ->
+ WHERE date_notnull_column = '0000-00-00'
+ */
+ virtual bool cond_notnull_field_isnull_to_field_eq_zero() const
+ {
+ return false;
+ }
/**
Check whether a field type can be partially indexed by a key.
@param type field type
@@ -1092,6 +3508,7 @@ public:
{
return false;
}
+ virtual uint max_octet_length() const { return 0; }
/**
Prepared statement long data:
Check whether this parameter data type is compatible with long data.
@@ -1100,6 +3517,10 @@ public:
*/
virtual bool is_param_long_data_type() const { return false; }
virtual const Type_handler *type_handler_for_comparison() const= 0;
+ virtual const Type_handler *type_handler_for_native_format() const
+ {
+ return this;
+ }
virtual const Type_handler *type_handler_for_item_field() const
{
return this;
@@ -1116,6 +3537,12 @@ public:
{
return this;
}
+ virtual const Type_handler *type_handler_for_system_time() const
+ {
+ return this;
+ }
+ virtual int
+ stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const= 0;
virtual CHARSET_INFO *charset_for_protocol(const Item *item) const;
virtual const Type_handler*
type_handler_adjusted_to_max_octet_length(uint max_octet_length,
@@ -1142,9 +3569,10 @@ public:
virtual bool can_return_text() const { return true; }
virtual bool can_return_date() const { return true; }
virtual bool can_return_time() const { return true; }
+ virtual bool is_bool_type() const { return false; }
virtual bool is_general_purpose_string_type() const { return false; }
- virtual uint Item_time_precision(Item *item) const;
- virtual uint Item_datetime_precision(Item *item) const;
+ virtual uint Item_time_precision(THD *thd, Item *item) const;
+ virtual uint Item_datetime_precision(THD *thd, Item *item) const;
virtual uint Item_decimal_scale(const Item *item) const;
virtual uint Item_decimal_precision(const Item *item) const= 0;
/*
@@ -1192,16 +3620,43 @@ public:
Performs the final data type validation for a UNION element,
after the regular "aggregation for result" was done.
*/
- virtual bool union_element_finalize(Item_type_holder *item) const
+ virtual bool union_element_finalize(Item_type_holder* item) const
{
return false;
}
+ // Automatic upgrade, e.g. for ALTER TABLE t1 FORCE
+ virtual void Column_definition_implicit_upgrade(Column_definition *c) const
+ { }
+ // Validate CHECK constraint after the parser
+ virtual bool Column_definition_validate_check_constraint(THD *thd,
+ Column_definition *c)
+ const;
+ // Fix attributes after the parser
virtual bool Column_definition_fix_attributes(Column_definition *c) const= 0;
+ /*
+ Fix attributes from an existing field. Used for:
+ - ALTER TABLE (for columns that do not change)
+ - DECLARE var TYPE OF t1.col1; (anchored SP variables)
+ */
+ virtual void Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *c,
+ const Field *field) const
+ { }
virtual bool Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
+ virtual bool Column_definition_bulk_alter(Column_definition *c,
+ const Column_derived_attributes
+ *derived_attr,
+ const Column_bulk_alter_attributes
+ *bulk_alter_attr)
+ const
+ { return false; }
/*
This method is called on queries like:
CREATE TABLE t2 (a INT) AS SELECT a FROM t1;
@@ -1220,9 +3675,7 @@ public:
*/
virtual bool Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *
- schema)
+ const handler *file)
const;
virtual bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
@@ -1235,6 +3688,23 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ virtual Field *
+ make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const= 0;
+ virtual void
+ Column_definition_attributes_frm_pack(const Column_definition_attributes *at,
+ uchar *buff) const;
+ virtual bool
+ Column_definition_attributes_frm_unpack(Column_definition_attributes *attr,
+ TABLE_SHARE *share,
+ const uchar *buffer,
+ LEX_CUSTRING *gis_options) const;
+
virtual void make_sort_key(uchar *to, Item *item,
const SORT_FIELD_ATTR *sort_field,
Sort_param *param) const= 0;
@@ -1243,8 +3713,10 @@ public:
SORT_FIELD_ATTR *attr) const= 0;
virtual uint32 max_display_length(const Item *item) const= 0;
+ virtual uint32 Item_decimal_notation_int_digits(const Item *item) const { return 0; }
virtual uint32 calc_pack_length(uint32 length) const= 0;
- virtual bool Item_save_in_value(Item *item, st_value *value) const= 0;
+ virtual void Item_update_null_value(Item *item) const= 0;
+ virtual bool Item_save_in_value(THD *thd, Item *item, st_value *value) const= 0;
virtual void Item_param_setup_conversion(THD *thd, Item_param *) const {}
virtual void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
@@ -1252,6 +3724,9 @@ public:
Item_param *param,
const Type_all_attributes *attr,
const st_value *value) const= 0;
+ virtual bool Item_param_val_native(THD *thd,
+ Item_param *item,
+ Native *to) const;
virtual bool Item_send(Item *item, Protocol *p, st_value *buf) const= 0;
virtual int Item_save_in_field(Item *item, Field *field,
bool no_conversions) const= 0;
@@ -1334,13 +3809,52 @@ public:
Item *src,
const Item *cmp) const= 0;
virtual Item_cache *Item_get_cache(THD *thd, const Item *item) const= 0;
+ /**
+ A builder for literals with data type name prefix, e.g.:
+ TIME'00:00:00', DATE'2001-01-01', TIMESTAMP'2001-01-01 00:00:00'.
+ @param thd The current thread
+ @param str Character literal
+ @param length Length of str
+ @param cs Character set of the string
+ @param send_error Whether to generate an error on failure
+
+ @retval A pointer to a new Item on success
+ NULL on error (wrong literal value, EOM)
+ */
+ virtual Item_literal *create_literal_item(THD *thd,
+ const char *str, size_t length,
+ CHARSET_INFO *cs,
+ bool send_error) const
+ {
+ DBUG_ASSERT(0);
+ return NULL;
+ }
+ Item_literal *create_literal_item(THD *thd, const String *str,
+ bool send_error) const
+ {
+ return create_literal_item(thd, str->ptr(), str->length(), str->charset(),
+ send_error);
+ }
virtual Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const
{
DBUG_ASSERT(0);
return NULL;
}
+ virtual Item_copy *create_item_copy(THD *thd, Item *item) const;
+ virtual int cmp_native(const Native &a, const Native &b) const
+ {
+ DBUG_ASSERT(0);
+ return 0;
+ }
virtual bool set_comparator_func(Arg_comparator *cmp) const= 0;
+ virtual bool Item_const_eq(const Item_const *a, const Item_const *b,
+ bool binary_cmp) const
+ {
+ return false;
+ }
+ virtual bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const= 0;
virtual bool Item_hybrid_func_fix_attributes(THD *thd,
const char *name,
Type_handler_hybrid_field_type *,
@@ -1357,9 +3871,23 @@ public:
virtual
bool Item_sum_variance_fix_length_and_dec(Item_sum_variance *) const= 0;
+ virtual bool Item_val_native_with_conversion(THD *thd, Item *item,
+ Native *to) const
+ {
+ return true;
+ }
+ virtual bool Item_val_native_with_conversion_result(THD *thd, Item *item,
+ Native *to) const
+ {
+ return true;
+ }
+
virtual bool Item_val_bool(Item *item) const= 0;
- virtual bool Item_get_date(Item *item, MYSQL_TIME *ltime,
- ulonglong fuzzydate) const= 0;
+ virtual void Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *buff, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const= 0;
+ bool Item_get_date_with_warn(THD *thd, Item *item, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const;
virtual longlong Item_val_int_signed_typecast(Item *item) const= 0;
virtual longlong Item_val_int_unsigned_typecast(Item *item) const= 0;
@@ -1380,9 +3908,15 @@ public:
Item_func_hybrid_field_type *,
my_decimal *) const= 0;
virtual
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
MYSQL_TIME *,
- ulonglong fuzzydate) const= 0;
+ date_mode_t fuzzydate) const= 0;
+ bool Item_func_hybrid_field_type_get_date_with_warn(THD *thd,
+ Item_func_hybrid_field_type *,
+ MYSQL_TIME *,
+ date_mode_t) const;
virtual
String *Item_func_min_max_val_str(Item_func_min_max *, String *) const= 0;
virtual
@@ -1393,8 +3927,8 @@ public:
my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
my_decimal *) const= 0;
virtual
- bool Item_func_min_max_get_date(Item_func_min_max*,
- MYSQL_TIME *, ulonglong fuzzydate) const= 0;
+ bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
+ MYSQL_TIME *, date_mode_t fuzzydate) const= 0;
virtual bool
Item_func_between_fix_length_and_dec(Item_func_between *func) const= 0;
virtual longlong
@@ -1479,6 +4013,11 @@ public:
DBUG_ASSERT(0);
return MYSQL_TYPE_NULL;
};
+ protocol_send_type_t protocol_send_type() const
+ {
+ DBUG_ASSERT(0);
+ return PROTOCOL_SEND_STRING;
+ }
Item_result result_type() const
{
return ROW_RESULT;
@@ -1488,6 +4027,11 @@ public:
return ROW_RESULT;
}
const Type_handler *type_handler_for_comparison() const;
+ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const
+ {
+ DBUG_ASSERT(0);
+ return 0;
+ }
bool subquery_type_allows_materialization(const Item *inner,
const Item *outer,
bool is_in_predicate) const
@@ -1511,15 +4055,23 @@ public:
{
return false;
}
+ void Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *c,
+ const Field *field) const
+ {
+ DBUG_ASSERT(0);
+ }
bool Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
bool Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const
{
DBUG_ASSERT(0);
@@ -1539,6 +4091,13 @@ public:
DBUG_ASSERT(0);
return NULL;
}
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
void make_sort_key(uchar *to, Item *item,
const SORT_FIELD_ATTR *sort_field,
Sort_param *param) const
@@ -1560,12 +4119,14 @@ public:
DBUG_ASSERT(0);
return 0;
}
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const;
uint Item_decimal_precision(const Item *item) const
{
DBUG_ASSERT(0);
return DECIMAL_MAX_PRECISION;
}
- bool Item_save_in_value(Item *item, st_value *value) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
bool Item_param_set_from_value(THD *thd,
Item_param *param,
const Type_all_attributes *attr,
@@ -1575,6 +4136,7 @@ public:
DBUG_ASSERT(0);
return true;
}
+ void Item_update_null_value(Item *item) const;
int Item_save_in_field(Item *item, Field *field, bool no_conversions) const
{
DBUG_ASSERT(0);
@@ -1591,6 +4153,11 @@ public:
}
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
+ Item_copy *create_item_copy(THD *thd, Item *item) const
+ {
+ DBUG_ASSERT(0);
+ return NULL;
+ }
bool set_comparator_func(Arg_comparator *cmp) const;
bool Item_hybrid_func_fix_attributes(THD *thd,
const char *name,
@@ -1626,10 +4193,12 @@ public:
DBUG_ASSERT(0);
return false;
}
- bool Item_get_date(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate) const
+ void Item_get_date(THD *thd, Item *item,
+ Temporal::Warn *warn, MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
{
DBUG_ASSERT(0);
- return true;
+ set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
}
longlong Item_val_int_signed_typecast(Item *item) const
{
@@ -1671,12 +4240,14 @@ public:
DBUG_ASSERT(0);
return NULL;
}
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
- MYSQL_TIME *,
- ulonglong fuzzydate) const
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
+ MYSQL_TIME *ltime,
+ date_mode_t fuzzydate) const
{
DBUG_ASSERT(0);
- return true;
+ set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
}
String *Item_func_min_max_val_str(Item_func_min_max *, String *) const
@@ -1700,8 +4271,8 @@ public:
DBUG_ASSERT(0);
return NULL;
}
- bool Item_func_min_max_get_date(Item_func_min_max*,
- MYSQL_TIME *, ulonglong fuzzydate) const
+ bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
+ MYSQL_TIME *, date_mode_t fuzzydate) const
{
DBUG_ASSERT(0);
return true;
@@ -1782,12 +4353,20 @@ class Type_handler_numeric: public Type_handler
{
public:
String *print_item_value(THD *thd, Item *item, String *str) const;
+ bool Column_definition_prepare_stage1(THD *thd,
+ MEM_ROOT *mem_root,
+ Column_definition *c,
+ handler *file,
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
double Item_func_min_max_val_real(Item_func_min_max *) const;
longlong Item_func_min_max_val_int(Item_func_min_max *) const;
my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
my_decimal *) const;
- bool Item_func_min_max_get_date(Item_func_min_max*,
- MYSQL_TIME *, ulonglong fuzzydate) const;
+ bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
+ MYSQL_TIME *, date_mode_t fuzzydate) const;
virtual ~Type_handler_numeric() { }
bool can_change_cond_ref_to_const(Item_bool_func2 *target,
Item *target_expr, Item *target_value,
@@ -1807,6 +4386,10 @@ public:
Item_result cmp_type() const { return REAL_RESULT; }
virtual ~Type_handler_real_result() {}
const Type_handler *type_handler_for_comparison() const;
+ void Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *c,
+ const Field *field) const;
+ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
bool subquery_type_allows_materialization(const Item *inner,
const Item *outer,
bool is_in_predicate) const;
@@ -1815,12 +4398,17 @@ public:
void sortlength(THD *thd,
const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const;
+ bool Item_const_eq(const Item_const *a, const Item_const *b,
+ bool binary_cmp) const;
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const;
uint Item_decimal_precision(const Item *item) const;
- bool Item_save_in_value(Item *item, st_value *value) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
bool Item_param_set_from_value(THD *thd,
Item_param *param,
const Type_all_attributes *attr,
const st_value *value) const;
+ void Item_update_null_value(Item *item) const;
int Item_save_in_field(Item *item, Field *field, bool no_conversions) const;
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const;
bool set_comparator_func(Arg_comparator *cmp) const;
@@ -1838,7 +4426,8 @@ public:
bool Item_func_signed_fix_length_and_dec(Item_func_signed *item) const;
bool Item_func_unsigned_fix_length_and_dec(Item_func_unsigned *item) const;
bool Item_val_bool(Item *item) const;
- bool Item_get_date(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate) const;
+ void Item_get_date(THD *thd, Item *item, Temporal::Warn *warn,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const;
longlong Item_val_int_signed_typecast(Item *item) const;
longlong Item_val_int_unsigned_typecast(Item *item) const;
String *Item_func_hex_val_str_ascii(Item_func_hex *item, String *str) const;
@@ -1849,9 +4438,11 @@ public:
my_decimal *Item_func_hybrid_field_type_val_decimal(
Item_func_hybrid_field_type *,
my_decimal *) const;
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
MYSQL_TIME *,
- ulonglong fuzzydate) const;
+ date_mode_t fuzzydate) const;
longlong Item_func_between_val_int(Item_func_between *func) const;
cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const;
in_vector *make_in_vector(THD *, const Item_func_in *, uint nargs) const;
@@ -1873,10 +4464,19 @@ public:
class Type_handler_decimal_result: public Type_handler_numeric
{
public:
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_STRING;
+ }
Item_result result_type() const { return DECIMAL_RESULT; }
Item_result cmp_type() const { return DECIMAL_RESULT; }
virtual ~Type_handler_decimal_result() {};
const Type_handler *type_handler_for_comparison() const;
+ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const
+ {
+ VDec item_val(item);
+ return item_val.is_null() ? 0 : my_decimal(field).cmp(item_val.ptr());
+ }
bool subquery_type_allows_materialization(const Item *inner,
const Item *outer,
bool is_in_predicate) const;
@@ -1887,10 +4487,19 @@ public:
const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const;
uint32 max_display_length(const Item *item) const;
+ uint32 Item_decimal_notation_int_digits(const Item *item) const;
Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const;
+ bool Item_const_eq(const Item_const *a, const Item_const *b,
+ bool binary_cmp) const;
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const
+ {
+ VDec va(a), vb(b);
+ return va.ptr() && vb.ptr() && !va.cmp(vb);
+ }
uint Item_decimal_precision(const Item *item) const;
- bool Item_save_in_value(Item *item, st_value *value) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
bool Item_param_set_from_value(THD *thd,
@@ -1901,6 +4510,7 @@ public:
{
return Item_send_str(item, protocol, buf);
}
+ void Item_update_null_value(Item *item) const;
int Item_save_in_field(Item *item, Field *field, bool no_conversions) const;
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
@@ -1914,10 +4524,17 @@ public:
bool Item_sum_sum_fix_length_and_dec(Item_sum_sum *) const;
bool Item_sum_avg_fix_length_and_dec(Item_sum_avg *) const;
bool Item_sum_variance_fix_length_and_dec(Item_sum_variance *) const;
- bool Item_val_bool(Item *item) const;
- bool Item_get_date(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate) const;
+ bool Item_val_bool(Item *item) const
+ {
+ return VDec(item).to_bool();
+ }
+ void Item_get_date(THD *thd, Item *item, Temporal::Warn *warn,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const;
longlong Item_val_int_signed_typecast(Item *item) const;
- longlong Item_val_int_unsigned_typecast(Item *item) const;
+ longlong Item_val_int_unsigned_typecast(Item *item) const
+ {
+ return VDec(item).to_longlong(true);
+ }
String *Item_func_hex_val_str_ascii(Item_func_hex *item, String *str) const;
String *Item_func_hybrid_field_type_val_str(Item_func_hybrid_field_type *,
String *) const;
@@ -1928,9 +4545,11 @@ public:
my_decimal *Item_func_hybrid_field_type_val_decimal(
Item_func_hybrid_field_type *,
my_decimal *) const;
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
MYSQL_TIME *,
- ulonglong fuzzydate) const;
+ date_mode_t fuzzydate) const;
String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
longlong Item_func_between_val_int(Item_func_between *func) const;
cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const;
@@ -2079,8 +4698,11 @@ class Type_handler_int_result: public Type_handler_numeric
public:
Item_result result_type() const { return INT_RESULT; }
Item_result cmp_type() const { return INT_RESULT; }
+ bool is_order_clause_position_type() const { return true; }
+ bool is_limit_clause_valid_type() const { return true; }
virtual ~Type_handler_int_result() {}
const Type_handler *type_handler_for_comparison() const;
+ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
bool subquery_type_allows_materialization(const Item *inner,
const Item *outer,
bool is_in_predicate) const;
@@ -2090,12 +4712,17 @@ public:
void sortlength(THD *thd,
const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const;
+ bool Item_const_eq(const Item_const *a, const Item_const *b,
+ bool binary_cmp) const;
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const;
uint Item_decimal_precision(const Item *item) const;
- bool Item_save_in_value(Item *item, st_value *value) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
bool Item_param_set_from_value(THD *thd,
Item_param *param,
const Type_all_attributes *attr,
const st_value *value) const;
+ void Item_update_null_value(Item *item) const;
int Item_save_in_field(Item *item, Field *field, bool no_conversions) const;
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
@@ -2110,7 +4737,8 @@ public:
bool Item_sum_avg_fix_length_and_dec(Item_sum_avg *) const;
bool Item_sum_variance_fix_length_and_dec(Item_sum_variance *) const;
bool Item_val_bool(Item *item) const;
- bool Item_get_date(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate) const;
+ void Item_get_date(THD *thd, Item *item, Temporal::Warn *warn,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const;
longlong Item_val_int_signed_typecast(Item *item) const;
longlong Item_val_int_unsigned_typecast(Item *item) const;
String *Item_func_hex_val_str_ascii(Item_func_hex *item, String *str) const;
@@ -2123,9 +4751,11 @@ public:
my_decimal *Item_func_hybrid_field_type_val_decimal(
Item_func_hybrid_field_type *,
my_decimal *) const;
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
MYSQL_TIME *,
- ulonglong fuzzydate) const;
+ date_mode_t fuzzydate) const;
String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
longlong Item_func_between_val_int(Item_func_between *func) const;
cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const;
@@ -2141,6 +4771,7 @@ public:
bool Item_func_mul_fix_length_and_dec(Item_func_mul *) const;
bool Item_func_div_fix_length_and_dec(Item_func_div *) const;
bool Item_func_mod_fix_length_and_dec(Item_func_mod *) const;
+
};
@@ -2151,6 +4782,7 @@ public:
virtual const Type_limits_int *
type_limits_int_by_unsigned_flag(bool unsigned_flag) const= 0;
uint32 max_display_length(const Item *item) const;
+ uint32 Item_decimal_notation_int_digits(const Item *item) const;
bool Vers_history_point_resolve_unit(THD *thd, Vers_history_point *p) const;
};
@@ -2169,11 +4801,22 @@ public:
void sortlength(THD *thd,
const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const;
+ bool Column_definition_prepare_stage1(THD *thd,
+ MEM_ROOT *mem_root,
+ Column_definition *c,
+ handler *file,
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
+ bool Item_const_eq(const Item_const *a, const Item_const *b,
+ bool binary_cmp) const;
bool Item_param_set_from_value(THD *thd,
Item_param *param,
const Type_all_attributes *attr,
const st_value *value) const;
uint32 max_display_length(const Item *item) const;
+ uint32 Item_decimal_notation_int_digits(const Item *item) const;
bool can_change_cond_ref_to_const(Item_bool_func2 *target,
Item *target_expr, Item *target_value,
Item_bool_func2 *source,
@@ -2188,7 +4831,8 @@ public:
bool Item_sum_avg_fix_length_and_dec(Item_sum_avg *) const;
bool Item_sum_variance_fix_length_and_dec(Item_sum_variance *) const;
bool Item_val_bool(Item *item) const;
- bool Item_get_date(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate) const;
+ void Item_get_date(THD *thd, Item *item, Temporal::Warn *warn,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const;
longlong Item_val_int_signed_typecast(Item *item) const;
longlong Item_val_int_unsigned_typecast(Item *item) const;
String *Item_func_hex_val_str_ascii(Item_func_hex *item, String *str) const;
@@ -2201,22 +4845,16 @@ public:
my_decimal *Item_func_hybrid_field_type_val_decimal(
Item_func_hybrid_field_type *,
my_decimal *) const;
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
MYSQL_TIME *,
- ulonglong fuzzydate) const;
- String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
- double Item_func_min_max_val_real(Item_func_min_max *) const;
- longlong Item_func_min_max_val_int(Item_func_min_max *) const;
- my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
- my_decimal *) const;
- bool Item_func_min_max_get_date(Item_func_min_max*,
- MYSQL_TIME *, ulonglong fuzzydate) const;
+ date_mode_t fuzzydate) const;
+ bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
+ MYSQL_TIME *, date_mode_t fuzzydate) const;
bool Item_func_between_fix_length_and_dec(Item_func_between *func) const;
- longlong Item_func_between_val_int(Item_func_between *func) const;
bool Item_func_in_fix_comparator_compatible_types(THD *thd,
Item_func_in *) const;
- bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
- bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
bool Item_func_abs_fix_length_and_dec(Item_func_abs *) const;
bool Item_func_neg_fix_length_and_dec(Item_func_neg *) const;
bool Item_func_plus_fix_length_and_dec(Item_func_plus *) const;
@@ -2230,13 +4868,18 @@ public:
class Type_handler_string_result: public Type_handler
{
- uint Item_temporal_precision(Item *item, bool is_time) const;
+ uint Item_temporal_precision(THD *thd, Item *item, bool is_time) const;
public:
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_STRING;
+ }
Item_result result_type() const { return STRING_RESULT; }
Item_result cmp_type() const { return STRING_RESULT; }
CHARSET_INFO *charset_for_protocol(const Item *item) const;
virtual ~Type_handler_string_result() {}
const Type_handler *type_handler_for_comparison() const;
+ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
const Type_handler *
type_handler_adjusted_to_max_octet_length(uint max_octet_length,
CHARSET_INFO *cs) const;
@@ -2245,28 +4888,42 @@ public:
void sortlength(THD *thd,
const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const;
- bool union_element_finalize(Item_type_holder *item) const;
+
+ bool union_element_finalize(Item_type_holder* item) const;
+
bool Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
bool Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const;
uint32 max_display_length(const Item *item) const;
- uint Item_time_precision(Item *item) const
+/*
+ The next method returns 309 for long stringified doubles in scientific
+ notation, e.g. FORMAT('1e308', 2).
+*/
+ uint32 Item_decimal_notation_int_digits(const Item *item) const { return 309; }
+ bool Item_const_eq(const Item_const *a, const Item_const *b,
+ bool binary_cmp) const;
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const;
+ uint Item_time_precision(THD *thd, Item *item) const
{
- return Item_temporal_precision(item, true);
+ return Item_temporal_precision(thd, item, true);
}
- uint Item_datetime_precision(Item *item) const
+ uint Item_datetime_precision(THD *thd, Item *item) const
{
- return Item_temporal_precision(item, false);
+ return Item_temporal_precision(thd, item, false);
}
uint Item_decimal_precision(const Item *item) const;
- bool Item_save_in_value(Item *item, st_value *value) const;
+ void Item_update_null_value(Item *item) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
void Item_param_setup_conversion(THD *thd, Item_param *) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
@@ -2305,7 +4962,8 @@ public:
bool Item_func_signed_fix_length_and_dec(Item_func_signed *item) const;
bool Item_func_unsigned_fix_length_and_dec(Item_func_unsigned *item) const;
bool Item_val_bool(Item *item) const;
- bool Item_get_date(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate) const;
+ void Item_get_date(THD *thd, Item *item, Temporal::Warn *warn,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const;
longlong Item_val_int_signed_typecast(Item *item) const;
longlong Item_val_int_unsigned_typecast(Item *item) const;
String *Item_func_hex_val_str_ascii(Item_func_hex *item, String *str) const;
@@ -2318,16 +4976,18 @@ public:
my_decimal *Item_func_hybrid_field_type_val_decimal(
Item_func_hybrid_field_type *,
my_decimal *) const;
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
MYSQL_TIME *,
- ulonglong fuzzydate) const;
+ date_mode_t fuzzydate) const;
String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
double Item_func_min_max_val_real(Item_func_min_max *) const;
longlong Item_func_min_max_val_int(Item_func_min_max *) const;
my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
my_decimal *) const;
- bool Item_func_min_max_get_date(Item_func_min_max*,
- MYSQL_TIME *, ulonglong fuzzydate) const;
+ bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
+ MYSQL_TIME *, date_mode_t fuzzydate) const;
bool Item_func_between_fix_length_and_dec(Item_func_between *func) const;
longlong Item_func_between_val_int(Item_func_between *func) const;
bool Item_char_typecast_fix_length_and_dec(Item_char_typecast *) const;
@@ -2352,6 +5012,12 @@ class Type_handler_general_purpose_string: public Type_handler_string_result
public:
bool is_general_purpose_string_type() const { return true; }
bool Vers_history_point_resolve_unit(THD *thd, Vers_history_point *p) const;
+ bool Column_definition_bulk_alter(Column_definition *c,
+ const Column_derived_attributes
+ *derived_attr,
+ const Column_bulk_alter_attributes
+ *bulk_alter_attr)
+ const;
};
@@ -2384,6 +5050,10 @@ public:
virtual ~Type_handler_tiny() {}
const Name name() const { return m_name_tiny; }
enum_field_types field_type() const { return MYSQL_TYPE_TINY; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_TINY;
+ }
const Type_limits_int *type_limits_int_by_unsigned_flag(bool unsigned_fl) const
{
return unsigned_fl ? &m_limits_uint8 : &m_limits_sint8;
@@ -2404,6 +5074,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
};
@@ -2418,6 +5095,10 @@ public:
virtual ~Type_handler_short() {}
const Name name() const { return m_name_short; }
enum_field_types field_type() const { return MYSQL_TYPE_SHORT; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_SHORT;
+ }
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const
{
return Item_send_short(item, protocol, buf);
@@ -2438,6 +5119,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
};
@@ -2452,6 +5140,10 @@ public:
virtual ~Type_handler_long() {}
const Name name() const { return m_name_int; }
enum_field_types field_type() const { return MYSQL_TYPE_LONG; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_LONG;
+ }
const Type_limits_int *type_limits_int_by_unsigned_flag(bool unsigned_fl) const
{
return unsigned_fl ? &m_limits_uint32 : &m_limits_sint32;
@@ -2472,11 +5164,29 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
};
+class Type_handler_bool: public Type_handler_long
+{
+ static const Name m_name_bool;
+public:
+ const Name name() const { return m_name_bool; }
+ bool is_bool_type() const { return true; }
+ void Item_update_null_value(Item *item) const;
+ bool Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *) const;
+};
+
+
class Type_handler_longlong: public Type_handler_general_purpose_int
{
static const Name m_name_longlong;
@@ -2486,6 +5196,10 @@ public:
virtual ~Type_handler_longlong() {}
const Name name() const { return m_name_longlong; }
enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_LONGLONG;
+ }
const Type_limits_int *type_limits_int_by_unsigned_flag(bool unsigned_fl) const
{
return unsigned_fl ? &m_limits_uint64 : &m_limits_sint64;
@@ -2510,6 +5224,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
};
@@ -2535,6 +5256,10 @@ public:
virtual ~Type_handler_int24() {}
const Name name() const { return m_name_mediumint; }
enum_field_types field_type() const { return MYSQL_TYPE_INT24; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_LONG;
+ }
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const
{
return Item_send_long(item, protocol, buf);
@@ -2555,6 +5280,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -2565,7 +5297,12 @@ public:
virtual ~Type_handler_year() {}
const Name name() const { return m_name_year; }
enum_field_types field_type() const { return MYSQL_TYPE_YEAR; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_SHORT;
+ }
uint32 max_display_length(const Item *item) const;
+ uint32 Item_decimal_notation_int_digits(const Item *item) const { return 4; };
uint32 calc_pack_length(uint32 length) const { return 1; }
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const
{
@@ -2574,6 +5311,9 @@ public:
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
+ void Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *c,
+ const Field *field) const;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
ulonglong table_flags) const
@@ -2582,8 +5322,23 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
- bool Item_get_date(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate) const;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
+ void Item_get_date(THD *thd, Item *item, Temporal::Warn *warn,
+ MYSQL_TIME *ltime, date_mode_t fuzzydate) const;
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *item,
+ Temporal::Warn *,
+ MYSQL_TIME *to,
+ date_mode_t fuzzydate) const;
};
@@ -2594,7 +5349,13 @@ public:
virtual ~Type_handler_bit() {}
const Name name() const { return m_name_bit; }
enum_field_types field_type() const { return MYSQL_TYPE_BIT; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_STRING;
+ }
uint32 max_display_length(const Item *item) const;
+ uint32 Item_decimal_notation_int_digits(const Item *item) const;
+ static uint32 Bit_decimal_notation_int_digits_by_nbits(uint nbits);
uint32 calc_pack_length(uint32 length) const { return length / 8; }
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const
{
@@ -2604,6 +5365,8 @@ public:
{
return print_item_value_csstr(thd, item, str);
}
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
@@ -2611,11 +5374,13 @@ public:
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
bool Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
@@ -2624,6 +5389,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
bool Vers_history_point_resolve_unit(THD *thd, Vers_history_point *p) const;
};
@@ -2635,8 +5407,13 @@ public:
virtual ~Type_handler_float() {}
const Name name() const { return m_name_float; }
enum_field_types field_type() const { return MYSQL_TYPE_FLOAT; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_FLOAT;
+ }
bool type_can_have_auto_increment_attribute() const { return true; }
uint32 max_display_length(const Item *item) const { return 25; }
+ uint32 Item_decimal_notation_int_digits(const Item *item) const { return 39; }
uint32 calc_pack_length(uint32 length) const { return sizeof(float); }
Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const;
@@ -2656,6 +5433,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
@@ -2673,8 +5457,13 @@ public:
virtual ~Type_handler_double() {}
const Name name() const { return m_name_double; }
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_DOUBLE;
+ }
bool type_can_have_auto_increment_attribute() const { return true; }
uint32 max_display_length(const Item *item) const { return 53; }
+ uint32 Item_decimal_notation_int_digits(const Item *item) const { return 309; }
uint32 calc_pack_length(uint32 length) const { return sizeof(double); }
Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const;
@@ -2693,6 +5482,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
@@ -2710,12 +5506,26 @@ public:
virtual ~Type_handler_time_common() { }
const Name name() const { return m_name_time; }
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_TIME;
+ }
enum_mysql_timestamp_type mysql_timestamp_type() const
{
return MYSQL_TIMESTAMP_TIME;
}
+ bool is_val_native_ready() const { return true; }
+ const Type_handler *type_handler_for_native_format() const;
+ int cmp_native(const Native &a, const Native &b) const;
+ bool Item_val_native_with_conversion(THD *thd, Item *, Native *to) const;
+ bool Item_val_native_with_conversion_result(THD *thd, Item *, Native *to) const;
+ bool Item_param_val_native(THD *thd, Item_param *item, Native *to) const;
+ Item_literal *create_literal_item(THD *thd, const char *str, size_t length,
+ CHARSET_INFO *cs, bool send_error) const;
Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const;
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const;
uint Item_decimal_scale(const Item *item) const
{
return Item_decimal_scale_with_seconds(item);
@@ -2726,15 +5536,19 @@ public:
return Item_divisor_precision_increment_with_seconds(item);
}
const Type_handler *type_handler_for_comparison() const;
+ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
+ void Column_definition_implicit_upgrade(Column_definition *c) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
- bool Item_save_in_value(Item *item, st_value *value) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const
{
return Item_send_time(item, protocol, buf);
}
+ void Item_update_null_value(Item *item) const;
int Item_save_in_field(Item *item, Field *field, bool no_conversions) const;
String *print_item_value(THD *thd, Item *item, String *str) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
+ longlong Item_val_int_unsigned_typecast(Item *item) const;
bool Item_hybrid_func_fix_attributes(THD *thd,
const char *name,
Type_handler_hybrid_field_type *,
@@ -2749,11 +5563,21 @@ public:
my_decimal *Item_func_hybrid_field_type_val_decimal(
Item_func_hybrid_field_type *,
my_decimal *) const;
- bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *,
+ void Item_func_hybrid_field_type_get_date(THD *,
+ Item_func_hybrid_field_type *,
+ Temporal::Warn *,
MYSQL_TIME *,
- ulonglong fuzzydate) const;
- bool Item_func_min_max_get_date(Item_func_min_max*,
- MYSQL_TIME *, ulonglong fuzzydate) const;
+ date_mode_t fuzzydate) const;
+ String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
+ double Item_func_min_max_val_real(Item_func_min_max *) const;
+ longlong Item_func_min_max_val_int(Item_func_min_max *) const;
+ my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
+ my_decimal *) const;
+ bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
+ MYSQL_TIME *, date_mode_t fuzzydate) const;
+ longlong Item_func_between_val_int(Item_func_between *func) const;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const;
bool set_comparator_func(Arg_comparator *cmp) const;
cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const;
@@ -2770,6 +5594,7 @@ class Type_handler_time: public Type_handler_time_common
public:
static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; }
virtual ~Type_handler_time() {}
+ const Name version() const { return m_version_mariadb53; }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
@@ -2781,6 +5606,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -2788,6 +5620,7 @@ class Type_handler_time2: public Type_handler_time_common
{
public:
virtual ~Type_handler_time2() {}
+ const Name version() const { return m_version_mysql56; }
enum_field_types real_field_type() const { return MYSQL_TYPE_TIME2; }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
@@ -2800,6 +5633,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -2807,16 +5647,23 @@ class Type_handler_temporal_with_date: public Type_handler_temporal_result
{
public:
virtual ~Type_handler_temporal_with_date() {}
- bool Item_save_in_value(Item *item, st_value *value) const;
+ Item_literal *create_literal_item(THD *thd, const char *str, size_t length,
+ CHARSET_INFO *cs, bool send_error) const;
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const;
+ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const
{
return Item_send_date(item, protocol, buf);
}
+ void Item_update_null_value(Item *item) const;
int Item_save_in_field(Item *item, Field *field, bool no_conversions) const;
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const;
bool set_comparator_func(Arg_comparator *cmp) const;
cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const;
in_vector *make_in_vector(THD *, const Item_func_in *, uint nargs) const;
+ longlong Item_func_between_val_int(Item_func_between *func) const;
};
@@ -2828,21 +5675,40 @@ public:
const Name name() const { return m_name_date; }
const Type_handler *type_handler_for_comparison() const;
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_DATE;
+ }
enum_mysql_timestamp_type mysql_timestamp_type() const
{
return MYSQL_TIMESTAMP_DATE;
}
+ bool cond_notnull_field_isnull_to_field_eq_zero() const
+ {
+ return true;
+ }
+ Item_literal *create_literal_item(THD *thd, const char *str, size_t length,
+ CHARSET_INFO *cs, bool send_error) const;
Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
uint Item_decimal_precision(const Item *item) const;
String *print_item_value(THD *thd, Item *item, String *str) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
+ String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
+ double Item_func_min_max_val_real(Item_func_min_max *) const;
+ longlong Item_func_min_max_val_int(Item_func_min_max *) const;
+ my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
+ my_decimal *) const;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
bool Item_hybrid_func_fix_attributes(THD *thd,
const char *name,
Type_handler_hybrid_field_type *,
Type_all_attributes *atrr,
Item **items, uint nitems) const;
+ bool Item_func_min_max_fix_attributes(THD *thd, Item_func_min_max *func,
+ Item **items, uint nitems) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
};
@@ -2862,6 +5728,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -2881,6 +5754,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -2892,12 +5772,21 @@ public:
const Name name() const { return m_name_datetime; }
const Type_handler *type_handler_for_comparison() const;
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_DATETIME;
+ }
enum_mysql_timestamp_type mysql_timestamp_type() const
{
return MYSQL_TIMESTAMP_DATETIME;
}
+ bool cond_notnull_field_isnull_to_field_eq_zero() const
+ {
+ return true;
+ }
Item *create_typecast_item(THD *thd, Item *item,
const Type_cast_attributes &attr) const;
+ void Column_definition_implicit_upgrade(Column_definition *c) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
uint Item_decimal_scale(const Item *item) const
{
@@ -2914,6 +5803,13 @@ public:
}
String *print_item_value(THD *thd, Item *item, String *str) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
+ String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
+ double Item_func_min_max_val_real(Item_func_min_max *) const;
+ longlong Item_func_min_max_val_int(Item_func_min_max *) const;
+ my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
+ my_decimal *) const;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
bool Item_hybrid_func_fix_attributes(THD *thd,
const char *name,
Type_handler_hybrid_field_type *,
@@ -2931,6 +5827,7 @@ class Type_handler_datetime: public Type_handler_datetime_common
public:
static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; }
virtual ~Type_handler_datetime() {}
+ const Name version() const { return m_version_mariadb53; }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
@@ -2942,6 +5839,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -2949,6 +5853,7 @@ class Type_handler_datetime2: public Type_handler_datetime_common
{
public:
virtual ~Type_handler_datetime2() {}
+ const Name version() const { return m_version_mysql56; }
enum_field_types real_field_type() const { return MYSQL_TYPE_DATETIME2; }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
@@ -2961,25 +5866,60 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
class Type_handler_timestamp_common: public Type_handler_temporal_with_date
{
static const Name m_name_timestamp;
+protected:
+ bool TIME_to_native(THD *, const MYSQL_TIME *from, Native *to, uint dec) const;
public:
virtual ~Type_handler_timestamp_common() {}
const Name name() const { return m_name_timestamp; }
const Type_handler *type_handler_for_comparison() const;
+ const Type_handler *type_handler_for_native_format() const;
enum_field_types field_type() const { return MYSQL_TYPE_TIMESTAMP; }
+ protocol_send_type_t protocol_send_type() const
+ {
+ return PROTOCOL_SEND_DATETIME;
+ }
enum_mysql_timestamp_type mysql_timestamp_type() const
{
return MYSQL_TIMESTAMP_DATETIME;
}
+ bool is_val_native_ready() const
+ {
+ return true;
+ }
bool is_timestamp_type() const
{
return true;
}
+ void Column_definition_implicit_upgrade(Column_definition *c) const;
+ bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
+ Item *a, Item *b) const;
+ bool Item_val_native_with_conversion(THD *thd, Item *, Native *to) const;
+ bool Item_val_native_with_conversion_result(THD *thd, Item *, Native *to) const;
+ bool Item_param_val_native(THD *thd, Item_param *item, Native *to) const;
+ int cmp_native(const Native &a, const Native &b) const;
+ longlong Item_func_between_val_int(Item_func_between *func) const;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
+ cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const;
+ in_vector *make_in_vector(THD *thd, const Item_func_in *f, uint nargs) const;
+ void make_sort_key(uchar *to, Item *item, const SORT_FIELD_ATTR *sort_field,
+ Sort_param *param) const;
+ void sortlength(THD *thd,
+ const Type_std_attributes *item,
+ SORT_FIELD_ATTR *attr) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
uint Item_decimal_scale(const Item *item) const
{
@@ -2992,10 +5932,18 @@ public:
}
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const
{
- return Item_send_datetime(item, protocol, buf);
+ return Item_send_timestamp(item, protocol, buf);
}
+ int Item_save_in_field(Item *item, Field *field, bool no_conversions) const;
String *print_item_value(THD *thd, Item *item, String *str) const;
Item_cache *Item_get_cache(THD *thd, const Item *item) const;
+ Item_copy *create_item_copy(THD *thd, Item *item) const;
+ String *Item_func_min_max_val_str(Item_func_min_max *, String *) const;
+ double Item_func_min_max_val_real(Item_func_min_max *) const;
+ longlong Item_func_min_max_val_int(Item_func_min_max *) const;
+ my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
+ my_decimal *) const;
+ bool set_comparator_func(Arg_comparator *cmp) const;
bool Item_hybrid_func_fix_attributes(THD *thd,
const char *name,
Type_handler_hybrid_field_type *,
@@ -3003,6 +5951,8 @@ public:
Item **items, uint nitems) const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
+ bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
+ MYSQL_TIME *, date_mode_t fuzzydate) const;
};
@@ -3013,6 +5963,7 @@ class Type_handler_timestamp: public Type_handler_timestamp_common
public:
static uint sec_part_bytes(uint dec) { return m_sec_part_bytes[dec]; }
virtual ~Type_handler_timestamp() {}
+ const Name version() const { return m_version_mariadb53; }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
@@ -3024,6 +5975,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3031,6 +5989,7 @@ class Type_handler_timestamp2: public Type_handler_timestamp_common
{
public:
virtual ~Type_handler_timestamp2() {}
+ const Name version() const { return m_version_mysql56; }
enum_field_types real_field_type() const { return MYSQL_TYPE_TIMESTAMP2; }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
@@ -3045,6 +6004,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3069,6 +6035,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3087,11 +6060,13 @@ public:
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
bool Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
@@ -3100,6 +6075,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3115,21 +6097,25 @@ public:
const Type_handler *type_handler_for_union(const Item *) const;
uint32 max_display_length(const Item *item) const { return 0; }
uint32 calc_pack_length(uint32 length) const { return 0; }
- bool Item_save_in_value(Item *item, st_value *value) const;
+ bool Item_const_eq(const Item_const *a, const Item_const *b,
+ bool binary_cmp) const;
+ bool Item_save_in_value(THD *thd, Item *item, st_value *value) const;
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
- bool union_element_finalize(Item_type_holder *item) const;
+ bool union_element_finalize(Item_type_holder* item) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
bool Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
bool Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
@@ -3139,6 +6125,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3175,6 +6168,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3187,10 +6187,15 @@ public:
const Name name() const { return m_name_var_string; }
enum_field_types field_type() const { return MYSQL_TYPE_VAR_STRING; }
enum_field_types real_field_type() const { return MYSQL_TYPE_STRING; }
+ enum_field_types traditional_merge_field_type() const
+ {
+ return MYSQL_TYPE_VARCHAR;
+ }
const Type_handler *type_handler_for_tmp_table(const Item *item) const
{
return varstring_type_handler(item);
}
+ void Column_definition_implicit_upgrade(Column_definition *c) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
@@ -3210,6 +6215,10 @@ public:
virtual ~Type_handler_varchar() {}
const Name name() const { return m_name_varchar; }
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
+ enum_field_types type_code_for_protocol() const
+ {
+ return MYSQL_TYPE_VAR_STRING; // Keep things compatible for old clients
+ }
uint32 calc_pack_length(uint32 length) const
{
return (length + (length < 256 ? 1: 2));
@@ -3233,10 +6242,30 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
bool adjust_spparam_type(Spvar_definition *def, Item *from) const;
};
+class Type_handler_hex_hybrid: public Type_handler_varchar
+{
+ static const Name m_name_hex_hybrid;
+public:
+ virtual ~Type_handler_hex_hybrid() {}
+ const Name name() const { return m_name_hex_hybrid; }
+ const Type_handler *cast_to_int_type_handler() const;
+ const Type_handler *type_handler_for_system_time() const;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
+};
+
+
class Type_handler_varchar_compressed: public Type_handler_varchar
{
public:
@@ -3267,6 +6296,9 @@ public:
}
bool is_param_long_data_type() const { return true; }
bool Column_definition_fix_attributes(Column_definition *c) const;
+ void Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *c,
+ const Field *field) const;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
ulonglong table_flags) const;
@@ -3277,6 +6309,13 @@ public:
Item **items, uint nitems) const;
void Item_param_setup_conversion(THD *thd, Item_param *) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3292,6 +6331,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ uint max_octet_length() const { return UINT_MAX8; }
};
@@ -3307,6 +6347,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ uint max_octet_length() const { return UINT_MAX24; }
};
@@ -3324,6 +6365,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ uint max_octet_length() const { return UINT_MAX32; }
};
@@ -3339,6 +6381,7 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ uint max_octet_length() const { return UINT_MAX16; }
};
@@ -3379,12 +6422,26 @@ public:
const st_value *value) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
+ void
+ Column_definition_attributes_frm_pack(const Column_definition_attributes *at,
+ uchar *buff) const;
+ bool
+ Column_definition_attributes_frm_unpack(Column_definition_attributes *attr,
+ TABLE_SHARE *share,
+ const uchar *buffer,
+ LEX_CUSTRING *gis_options) const;
bool Column_definition_fix_attributes(Column_definition *c) const;
+ void Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *c,
+ const Field *field) const;
bool Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
ulonglong table_flags) const;
@@ -3393,6 +6450,14 @@ public:
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
+
bool can_return_int() const { return false; }
bool can_return_decimal() const { return false; }
bool can_return_real() const { return false; }
@@ -3438,20 +6503,27 @@ public:
enum_field_types field_type() const { return MYSQL_TYPE_STRING; }
const Type_handler *type_handler_for_item_field() const;
const Type_handler *cast_to_int_type_handler() const;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const;
+ bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const;
bool Item_hybrid_func_fix_attributes(THD *thd,
const char *name,
Type_handler_hybrid_field_type *,
Type_all_attributes *atrr,
Item **items, uint nitems) const;
+ void Column_definition_reuse_fix_attributes(THD *thd,
+ Column_definition *c,
+ const Field *field) const;
bool Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *c,
handler *file,
- ulonglong table_flags) const;
+ ulonglong table_flags,
+ const Column_derived_attributes
+ *derived_attr)
+ const;
bool Column_definition_redefine_stage1(Column_definition *def,
const Column_definition *dup,
- const handler *file,
- const Schema_specification_st *schema)
+ const handler *file)
const;
void Item_param_set_param_func(Item_param *param,
uchar **pos, ulong len) const;
@@ -3465,7 +6537,11 @@ class Type_handler_enum: public Type_handler_typelib
public:
virtual ~Type_handler_enum() {}
const Name name() const { return m_name_enum; }
- virtual enum_field_types real_field_type() const { return MYSQL_TYPE_ENUM; }
+ enum_field_types real_field_type() const { return MYSQL_TYPE_ENUM; }
+ enum_field_types traditional_merge_field_type() const
+ {
+ return MYSQL_TYPE_ENUM;
+ }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
@@ -3477,6 +6553,13 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
@@ -3486,7 +6569,11 @@ class Type_handler_set: public Type_handler_typelib
public:
virtual ~Type_handler_set() {}
const Name name() const { return m_name_set; }
- virtual enum_field_types real_field_type() const { return MYSQL_TYPE_SET; }
+ enum_field_types real_field_type() const { return MYSQL_TYPE_SET; }
+ enum_field_types traditional_merge_field_type() const
+ {
+ return MYSQL_TYPE_SET;
+ }
uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const;
@@ -3498,9 +6585,26 @@ public:
const Record_addr &addr,
const Type_all_attributes &attr,
TABLE *table) const;
+ Field *make_table_field_from_def(TABLE_SHARE *share,
+ MEM_ROOT *mem_root,
+ const LEX_CSTRING *name,
+ const Record_addr &addr,
+ const Bit_addr &bit,
+ const Column_definition_attributes *attr,
+ uint32 flags) const;
};
+// A pseudo type handler, mostly for test purposes for now
+class Type_handler_interval_DDhhmmssff: public Type_handler_long_blob
+{
+public:
+ Item *create_typecast_item(THD *thd, Item *item,
+ const Type_cast_attributes &attr) const;
+};
+
+
+
/**
A handler for hybrid type functions, e.g.
COALESCE(), IF(), IFNULL(), NULLIF(), CASE,
@@ -3594,12 +6698,14 @@ extern MYSQL_PLUGIN_IMPORT Type_handler_set type_handler_set;
extern MYSQL_PLUGIN_IMPORT Type_handler_string type_handler_string;
extern MYSQL_PLUGIN_IMPORT Type_handler_var_string type_handler_var_string;
extern MYSQL_PLUGIN_IMPORT Type_handler_varchar type_handler_varchar;
+extern MYSQL_PLUGIN_IMPORT Type_handler_hex_hybrid type_handler_hex_hybrid;
extern MYSQL_PLUGIN_IMPORT Type_handler_tiny_blob type_handler_tiny_blob;
extern MYSQL_PLUGIN_IMPORT Type_handler_medium_blob type_handler_medium_blob;
extern MYSQL_PLUGIN_IMPORT Type_handler_long_blob type_handler_long_blob;
extern MYSQL_PLUGIN_IMPORT Type_handler_blob type_handler_blob;
+extern MYSQL_PLUGIN_IMPORT Type_handler_bool type_handler_bool;
extern MYSQL_PLUGIN_IMPORT Type_handler_tiny type_handler_tiny;
extern MYSQL_PLUGIN_IMPORT Type_handler_short type_handler_short;
extern MYSQL_PLUGIN_IMPORT Type_handler_int24 type_handler_int24;
@@ -3612,6 +6718,7 @@ extern MYSQL_PLUGIN_IMPORT Type_handler_newdecimal type_handler_newdecimal;
extern MYSQL_PLUGIN_IMPORT Type_handler_olddecimal type_handler_olddecimal;
extern MYSQL_PLUGIN_IMPORT Type_handler_year type_handler_year;
+extern MYSQL_PLUGIN_IMPORT Type_handler_year type_handler_year2;
extern MYSQL_PLUGIN_IMPORT Type_handler_newdate type_handler_newdate;
extern MYSQL_PLUGIN_IMPORT Type_handler_date type_handler_date;
extern MYSQL_PLUGIN_IMPORT Type_handler_time type_handler_time;
@@ -3621,10 +6728,8 @@ extern MYSQL_PLUGIN_IMPORT Type_handler_datetime2 type_handler_datetime2;
extern MYSQL_PLUGIN_IMPORT Type_handler_timestamp type_handler_timestamp;
extern MYSQL_PLUGIN_IMPORT Type_handler_timestamp2 type_handler_timestamp2;
-extern MYSQL_PLUGIN_IMPORT Type_handler_tiny_blob type_handler_tiny_blob;
-extern MYSQL_PLUGIN_IMPORT Type_handler_blob type_handler_blob;
-extern MYSQL_PLUGIN_IMPORT Type_handler_medium_blob type_handler_medium_blob;
-extern MYSQL_PLUGIN_IMPORT Type_handler_long_blob type_handler_long_blob;
+extern MYSQL_PLUGIN_IMPORT Type_handler_interval_DDhhmmssff
+ type_handler_interval_DDhhmmssff;
class Type_aggregator
{
diff --git a/sql/sql_type_int.h b/sql/sql_type_int.h
index 3e5e6a345fa..d3e9d0318cf 100644
--- a/sql/sql_type_int.h
+++ b/sql/sql_type_int.h
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates.
- Copyright (c) 2011, 2016, MariaDB
+/* Copyright (c) 2018, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,11 +17,39 @@
#define SQL_TYPE_INT_INCLUDED
-// A longlong/ulonglong hybrid. Good to store results of val_int().
-class Longlong_hybrid
+class Null_flag
+{
+protected:
+ bool m_is_null;
+public:
+ bool is_null() const { return m_is_null; }
+ Null_flag(bool is_null) :m_is_null(is_null) { }
+};
+
+
+class Longlong
{
protected:
longlong m_value;
+public:
+ longlong value() const { return m_value; }
+ Longlong(longlong nr) :m_value(nr) { }
+};
+
+
+class Longlong_null: public Longlong, public Null_flag
+{
+public:
+ Longlong_null(longlong nr, bool is_null)
+ :Longlong(nr), Null_flag(is_null)
+ { }
+};
+
+
+// A longlong/ulonglong hybrid. Good to store results of val_int().
+class Longlong_hybrid: public Longlong
+{
+protected:
bool m_unsigned;
int cmp_signed(const Longlong_hybrid& other) const
{
@@ -35,9 +62,8 @@ protected:
}
public:
Longlong_hybrid(longlong nr, bool unsigned_flag)
- :m_value(nr), m_unsigned(unsigned_flag)
+ :Longlong(nr), m_unsigned(unsigned_flag)
{ }
- longlong value() const { return m_value; }
bool is_unsigned() const { return m_unsigned; }
bool is_unsigned_outside_of_signed_range() const
{
@@ -105,4 +131,16 @@ public:
}
};
+
+class Longlong_hybrid_null: public Longlong_hybrid,
+ public Null_flag
+{
+public:
+ Longlong_hybrid_null(const Longlong_null &nr, bool unsigned_flag)
+ :Longlong_hybrid(nr.value(), unsigned_flag),
+ Null_flag(nr.is_null())
+ { }
+};
+
+
#endif // SQL_TYPE_INT_INCLUDED
diff --git a/sql/sql_type_json.cc b/sql/sql_type_json.cc
new file mode 100644
index 00000000000..f53a247d816
--- /dev/null
+++ b/sql/sql_type_json.cc
@@ -0,0 +1,55 @@
+/*
+ Copyright (c) 2019, MariaDB
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by 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-1301 USA
+*/
+
+#include "sql_type_json.h"
+#include "sql_class.h"
+
+
+Type_handler_json_longtext type_handler_json_longtext;
+
+
+/**
+ Create JSON_VALID(field_name) expression
+*/
+
+Virtual_column_info *
+Type_handler_json_longtext::make_json_valid_expr(THD *thd,
+ const LEX_CSTRING *field_name)
+ const
+{
+ Lex_ident_sys_st str;
+ Item *field, *expr;
+ str.set_valid_utf8(field_name);
+ if (unlikely(!(field= thd->lex->create_item_ident_field(thd, NullS, NullS,
+ &str))))
+ return 0;
+ if (unlikely(!(expr= new (thd->mem_root) Item_func_json_valid(thd, field))))
+ return 0;
+ return add_virtual_expression(thd, expr);
+}
+
+
+bool Type_handler_json_longtext::
+ Column_definition_validate_check_constraint(THD *thd,
+ Column_definition * c) const
+{
+ if (!c->check_constraint &&
+ !(c->check_constraint= make_json_valid_expr(thd, &c->field_name)))
+ return true;
+ return Type_handler::Column_definition_validate_check_constraint(thd, c);
+}
diff --git a/sql/sql_type_json.h b/sql/sql_type_json.h
new file mode 100644
index 00000000000..6c4ee8cb2eb
--- /dev/null
+++ b/sql/sql_type_json.h
@@ -0,0 +1,38 @@
+#ifndef SQL_TYPE_JSON_INCLUDED
+#define SQL_TYPE_JSON_INCLUDED
+/*
+ Copyright (c) 2019, MariaDB
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by 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-1301 USA
+*/
+
+#include "mariadb.h"
+#include "sql_type.h"
+
+class Type_handler_json_longtext: public Type_handler_long_blob
+{
+ Virtual_column_info *make_json_valid_expr(THD *thd,
+ const LEX_CSTRING *field_name)
+ const;
+public:
+ virtual ~Type_handler_json_longtext() {}
+ bool Column_definition_validate_check_constraint(THD *thd,
+ Column_definition *c) const;
+};
+
+extern MYSQL_PLUGIN_IMPORT
+ Type_handler_json_longtext type_handler_json_longtext;
+
+#endif // SQL_TYPE_JSON_INCLUDED
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index d0657cf973e..400a8ae8c30 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -78,6 +78,8 @@ static const char *init_syms(udf_func *tmp, char *nm)
(void)strmov(end, "_add");
if (!((tmp->func_add= (Udf_func_add) dlsym(tmp->dlhandle, nm))))
return nm;
+ (void)strmov(end, "_remove");
+ tmp->func_remove= (Udf_func_add) dlsym(tmp->dlhandle, nm);
}
(void) strmov(end,"_deinit");
@@ -601,6 +603,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
u_d->func_deinit= udf->func_deinit;
u_d->func_clear= udf->func_clear;
u_d->func_add= udf->func_add;
+ u_d->func_remove= udf->func_remove;
/* create entry in mysql.func table */
diff --git a/sql/sql_udf.h b/sql/sql_udf.h
index 97b0f640b1e..cb1954353fa 100644
--- a/sql/sql_udf.h
+++ b/sql/sql_udf.h
@@ -47,6 +47,7 @@ typedef struct st_udf_func
Udf_func_deinit func_deinit;
Udf_func_clear func_clear;
Udf_func_add func_add;
+ Udf_func_add func_remove;
ulong usage_count;
} udf_func;
@@ -131,6 +132,20 @@ class udf_handler :public Sql_alloc
func(&initid, &f_args, &is_null, &error);
*null_value= (my_bool) (is_null || error);
}
+ bool supports_removal() const
+ { return MY_TEST(u_d->func_remove); }
+ void remove(my_bool *null_value)
+ {
+ DBUG_ASSERT(u_d->func_remove);
+ if (get_arguments())
+ {
+ *null_value=1;
+ return;
+ }
+ Udf_func_add func= u_d->func_remove;
+ func(&initid, &f_args, &is_null, &error);
+ *null_value= (my_bool) (is_null || error);
+ }
String *val_str(String *str,String *save_str);
};
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 32d307de5e8..70a521696d2 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -69,7 +69,7 @@ void select_unit::change_select()
curr_sel= current_select_number;
/* New SELECT processing starts */
DBUG_ASSERT(table->file->inited == 0);
- step= thd->lex->current_select->linkage;
+ step= thd->lex->current_select->get_linkage();
switch (step)
{
case INTERSECT_TYPE:
@@ -249,7 +249,7 @@ bool select_unit::send_eof()
{
if (step != INTERSECT_TYPE ||
(thd->lex->current_select->next_select() &&
- thd->lex->current_select->next_select()->linkage == INTERSECT_TYPE))
+ thd->lex->current_select->next_select()->get_linkage() == INTERSECT_TYPE))
{
/*
it is not INTESECT or next SELECT in the sequence is INTERSECT so no
@@ -766,11 +766,11 @@ bool st_select_lex_unit::join_union_type_attributes(THD *thd_arg,
been fixed yet. An Item_type_holder must be created based on a fixed
Item, so use the inner Item instead.
*/
- DBUG_ASSERT(item_tmp->fixed ||
+ DBUG_ASSERT(item_tmp->is_fixed() ||
(item_tmp->type() == Item::REF_ITEM &&
((Item_ref *)(item_tmp))->ref_type() ==
Item_ref::OUTER_REF));
- if (!item_tmp->fixed)
+ if (!item_tmp->is_fixed())
item_tmp= item_tmp->real_item();
holders[holder_pos].add_argument(item_tmp);
}
@@ -844,8 +844,8 @@ bool st_select_lex_unit::prepare(TABLE_LIST *derived_arg,
bool is_union_select;
bool have_except= FALSE, have_intersect= FALSE;
bool instantiate_tmp_table= false;
- bool single_tvc= !first_sl->next_select() && first_sl->tvc &&
- !fake_select_lex;
+ bool single_tvc= !first_sl->next_select() && first_sl->tvc;
+ bool single_tvc_wo_order= single_tvc && !first_sl->order_list.elements;
DBUG_ENTER("st_select_lex_unit::prepare");
DBUG_ASSERT(thd == current_thd);
@@ -957,8 +957,9 @@ bool st_select_lex_unit::prepare(TABLE_LIST *derived_arg,
if (is_union_select || is_recursive)
{
- if ((is_unit_op() && !union_needs_tmp_table() &&
- !have_except && !have_intersect) || single_tvc)
+ if ((single_tvc_wo_order && !fake_select_lex) ||
+ (is_unit_op() && !union_needs_tmp_table() &&
+ !have_except && !have_intersect && !single_tvc))
{
SELECT_LEX *last= first_select();
while (last->next_select())
@@ -973,7 +974,7 @@ bool st_select_lex_unit::prepare(TABLE_LIST *derived_arg,
else
{
if (!is_recursive)
- union_result= new (thd->mem_root) select_unit(thd);
+ union_result= new (thd->mem_root) select_unit(thd);
else
{
with_element->rec_result=
@@ -1027,7 +1028,47 @@ bool st_select_lex_unit::prepare(TABLE_LIST *derived_arg,
types= first_sl->item_list;
goto cont;
}
-
+
+ if (sl->tvc && sl->order_list.elements &&
+ !sl->tvc->to_be_wrapped_as_with_tail())
+ {
+ SELECT_LEX_UNIT *unit= sl->master_unit();
+ if (thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW)
+ {
+ unit->fake_select_lex= 0;
+ unit->saved_fake_select_lex= 0;
+ }
+ else
+ {
+ if (!unit->first_select()->next_select())
+ {
+ if (!unit->fake_select_lex)
+ {
+ Query_arena *arena, backup_arena;
+ arena= thd->activate_stmt_arena_if_needed(&backup_arena);
+ bool rc= unit->add_fake_select_lex(thd);
+ if (arena)
+ thd->restore_active_arena(arena, &backup_arena);
+ if (rc)
+ goto err;
+ }
+ SELECT_LEX *fake= unit->fake_select_lex;
+ fake->order_list= sl->order_list;
+ fake->explicit_limit= sl->explicit_limit;
+ fake->select_limit= sl->select_limit;
+ fake->offset_limit= sl->offset_limit;
+ sl->order_list.empty();
+ sl->explicit_limit= 0;
+ sl->select_limit= 0;
+ sl->offset_limit= 0;
+ if (describe)
+ fake->options|= SELECT_DESCRIBE;
+ }
+ else if (!sl->explicit_limit)
+ sl->order_list.empty();
+ }
+ }
+
for (;sl; sl= sl->next_select(), union_part_count++)
{
if (sl->tvc)
@@ -1049,7 +1090,7 @@ bool st_select_lex_unit::prepare(TABLE_LIST *derived_arg,
goto err;
}
else if (sl->tvc->prepare(thd, sl, tmp_result, this))
- goto err;
+ goto err;
}
else if (prepare_join(thd, sl, tmp_result, additional_options,
is_union_select))
@@ -1519,7 +1560,7 @@ bool st_select_lex_unit::exec()
union_result->change_select();
if (fake_select_lex)
{
- if (sl != &thd->lex->select_lex)
+ if (sl != thd->lex->first_select_lex())
fake_select_lex->uncacheable|= sl->uncacheable;
else
fake_select_lex->uncacheable= 0;
@@ -2096,6 +2137,8 @@ bool st_select_lex::cleanup()
bool error= FALSE;
DBUG_ENTER("st_select_lex::cleanup()");
+ DBUG_PRINT("info", ("select: %p (%u) JOIN %p",
+ this, select_number, join));
cleanup_order(order_list.first);
cleanup_order(group_list.first);
cleanup_ftfuncs(this);
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 85d7dd1ca92..a2980717018 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
- Copyright (c) 2011, 2016, MariaDB
+ Copyright (c) 2011, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -137,7 +137,8 @@ bool compare_record(const TABLE *table)
FALSE Items are OK
*/
-static bool check_fields(THD *thd, List<Item> &items, bool update_view)
+static bool check_fields(THD *thd, TABLE_LIST *table, List<Item> &items,
+ bool update_view)
{
Item *item;
if (update_view)
@@ -182,6 +183,34 @@ static bool check_fields(THD *thd, List<Item> &items, bool update_view)
f->set_has_explicit_value();
}
}
+
+ if (table->has_period())
+ {
+ if (table->is_view_or_derived())
+ {
+ my_error(ER_IT_IS_A_VIEW, MYF(0), table->table_name.str);
+ return TRUE;
+ }
+ if (thd->lex->sql_command == SQLCOM_UPDATE_MULTI)
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "updating and querying the same temporal periods table");
+
+ return true;
+ }
+ DBUG_ASSERT(thd->lex->sql_command == SQLCOM_UPDATE);
+ for (List_iterator_fast<Item> it(items); (item=it++);)
+ {
+ Field *f= item->field_for_view_update()->field;
+ vers_select_conds_t &period= table->period_conditions;
+ if (period.field_start->field == f || period.field_end->field == f)
+ {
+ my_error(ER_PERIOD_COLUMNS_UPDATED, MYF(0),
+ item->name.str, period.name.str);
+ return true;
+ }
+ }
+ }
return FALSE;
}
@@ -283,6 +312,34 @@ static void prepare_record_for_error_message(int error, TABLE *table)
}
+static
+int cut_fields_for_portion_of_time(THD *thd, TABLE *table,
+ const vers_select_conds_t &period_conds)
+{
+ bool lcond= period_conds.field_start->val_datetime_packed(thd)
+ < period_conds.start.item->val_datetime_packed(thd);
+ bool rcond= period_conds.field_end->val_datetime_packed(thd)
+ > period_conds.end.item->val_datetime_packed(thd);
+
+ Field *start_field= table->field[table->s->period.start_fieldno];
+ Field *end_field= table->field[table->s->period.end_fieldno];
+
+ int res= 0;
+ if (lcond)
+ {
+ res= period_conds.start.item->save_in_field(start_field, true);
+ start_field->set_has_explicit_value();
+ }
+
+ if (likely(!res) && rcond)
+ {
+ res= period_conds.end.item->save_in_field(end_field, true);
+ end_field->set_has_explicit_value();
+ }
+
+ return res;
+}
+
/*
Process usual UPDATE
@@ -334,7 +391,7 @@ int mysql_update(THD *thd,
SQL_SELECT *select= NULL;
SORT_INFO *file_sort= 0;
READ_RECORD info;
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
ulonglong id;
List<Item> all_fields;
killed_state killed_status= NOT_KILLED;
@@ -346,7 +403,7 @@ int mysql_update(THD *thd,
query_plan.using_filesort= FALSE;
// For System Versioning (may need to insert new fields to a table).
- ha_rows updated_sys_ver= 0;
+ ha_rows rows_inserted= 0;
DBUG_ENTER("mysql_update");
@@ -358,6 +415,12 @@ int mysql_update(THD *thd,
if (mysql_handle_derived(thd->lex, DT_INIT))
DBUG_RETURN(1);
+ if (table_list->has_period() && table_list->is_view_or_derived())
+ {
+ my_error(ER_IT_IS_A_VIEW, MYF(0), table_list->table_name.str);
+ DBUG_RETURN(TRUE);
+ }
+
if (((update_source_table=unique_table(thd, table_list,
table_list->next_global, 0)) ||
table_list->is_multitable()))
@@ -366,6 +429,14 @@ int mysql_update(THD *thd,
DBUG_PRINT("info", ("Switch to multi-update"));
/* pass counter value */
thd->lex->table_count_update= table_count;
+ if (thd->lex->period_conditions.is_set())
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "updating and querying the same temporal periods table");
+
+ DBUG_RETURN(1);
+ }
+
/* convert to multiupdate */
DBUG_RETURN(2);
}
@@ -393,7 +464,7 @@ int mysql_update(THD *thd,
table->covering_keys= table->s->keys_in_use;
table->quick_keys.clear_all();
- query_plan.select_lex= &thd->lex->select_lex;
+ query_plan.select_lex= thd->lex->first_select_lex();
query_plan.table= table;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
/* Force privilege re-checking for views after they have been opened. */
@@ -405,6 +476,17 @@ int mysql_update(THD *thd,
if (mysql_prepare_update(thd, table_list, &conds, order_num, order))
DBUG_RETURN(1);
+ if (table_list->has_period())
+ {
+ if (!table_list->period_conditions.start.item->const_item()
+ || !table_list->period_conditions.end.item->const_item())
+ {
+ my_error(ER_NOT_CONSTANT_EXPRESSION, MYF(0), "FOR PORTION OF");
+ DBUG_RETURN(true);
+ }
+ table->no_cache= true;
+ }
+
old_covering_keys= table->covering_keys; // Keys used in WHERE
/* Check the fields we are going to modify */
#ifndef NO_EMBEDDED_ACCESS_CHECKS
@@ -418,7 +500,7 @@ int mysql_update(THD *thd,
if (setup_fields_with_no_wrap(thd, Ref_ptr_array(),
fields, MARK_COLUMNS_WRITE, 0, 0))
DBUG_RETURN(1); /* purecov: inspected */
- if (check_fields(thd, fields, table_list->view))
+ if (check_fields(thd, table_list, fields, table_list->view))
{
DBUG_RETURN(1);
}
@@ -531,7 +613,15 @@ int mysql_update(THD *thd,
if (unlikely(init_ftfuncs(thd, select_lex, 1)))
goto err;
- table->mark_columns_needed_for_update();
+ if (table_list->has_period())
+ {
+ table->use_all_columns();
+ table->rpl_write_set= table->write_set;
+ }
+ else
+ {
+ table->mark_columns_needed_for_update();
+ }
table->update_const_key_parts(conds);
order= simple_remove_const(order, conds);
@@ -612,6 +702,14 @@ int mysql_update(THD *thd,
TRG_ACTION_BEFORE) ||
table->triggers->has_triggers(TRG_EVENT_UPDATE,
TRG_ACTION_AFTER)));
+
+ if (table_list->has_period())
+ has_triggers= table->triggers &&
+ (table->triggers->has_triggers(TRG_EVENT_INSERT,
+ TRG_ACTION_BEFORE)
+ || table->triggers->has_triggers(TRG_EVENT_INSERT,
+ TRG_ACTION_AFTER)
+ || has_triggers);
DBUG_PRINT("info", ("has_triggers: %s", has_triggers ? "TRUE" : "FALSE"));
binlog_is_row= thd->is_current_stmt_binlog_format_row();
DBUG_PRINT("info", ("binlog_is_row: %s", binlog_is_row ? "TRUE" : "FALSE"));
@@ -645,6 +743,11 @@ int mysql_update(THD *thd,
Later we also ensure that we are only using one table (no sub queries)
*/
+ DBUG_PRINT("info", ("HA_CAN_DIRECT_UPDATE_AND_DELETE: %s", (table->file->ha_table_flags() & HA_CAN_DIRECT_UPDATE_AND_DELETE) ? "TRUE" : "FALSE"));
+ DBUG_PRINT("info", ("using_io_buffer: %s", query_plan.using_io_buffer ? "TRUE" : "FALSE"));
+ DBUG_PRINT("info", ("ignore: %s", ignore ? "TRUE" : "FALSE"));
+ DBUG_PRINT("info", ("virtual_columns_marked_for_read: %s", table->check_virtual_columns_marked_for_read() ? "TRUE" : "FALSE"));
+ DBUG_PRINT("info", ("virtual_columns_marked_for_write: %s", table->check_virtual_columns_marked_for_write() ? "TRUE" : "FALSE"));
if ((table->file->ha_table_flags() & HA_CAN_DIRECT_UPDATE_AND_DELETE) &&
!has_triggers && !binlog_is_row &&
!query_plan.using_io_buffer && !ignore &&
@@ -860,11 +963,16 @@ update_begin:
if (do_direct_update)
{
/* Direct updating is supported */
+ ha_rows update_rows= 0, found_rows= 0;
DBUG_PRINT("info", ("Using direct update"));
table->reset_default_fields();
- if (unlikely(!(error= table->file->ha_direct_update_rows(&updated))))
+ if (unlikely(!(error= table->file->ha_direct_update_rows(&update_rows,
+ &found_rows))))
error= -1;
- found= updated;
+ updated= update_rows;
+ found= found_rows;
+ if (found < updated)
+ found= updated;
goto update_end;
}
@@ -902,14 +1010,25 @@ update_begin:
explain->tracker.on_record_after_where();
store_record(table,record[1]);
+ if (table_list->has_period())
+ cut_fields_for_portion_of_time(thd, table,
+ table_list->period_conditions);
+
if (fill_record_n_invoke_before_triggers(thd, table, fields, values, 0,
TRG_EVENT_UPDATE))
break; /* purecov: inspected */
found++;
- if (!can_compare_record || compare_record(table))
+ bool record_was_same= false;
+ bool need_update= !can_compare_record || compare_record(table);
+
+ if (need_update)
{
+ if (table->versioned(VERS_TIMESTAMP) &&
+ thd->lex->sql_command == SQLCOM_DELETE)
+ table->vers_update_end();
+
if ((res= table_list->view_check_option(thd, ignore)) !=
VIEW_CHECK_OK)
{
@@ -963,17 +1082,29 @@ update_begin:
error= table->file->ha_update_row(table->record[1],
table->record[0]);
}
- if (unlikely(error == HA_ERR_RECORD_IS_THE_SAME))
+
+ record_was_same= error == HA_ERR_RECORD_IS_THE_SAME;
+ if (unlikely(record_was_same))
{
error= 0;
}
else if (likely(!error))
{
if (has_vers_fields && table->versioned(VERS_TRX_ID))
- updated_sys_ver++;
+ rows_inserted++;
updated++;
}
+ if (likely(!error) && !record_was_same && table_list->has_period())
+ {
+ store_record(table, record[2]);
+ restore_record(table, record[1]);
+ error= table->insert_portion_of_time(thd,
+ table_list->period_conditions,
+ &rows_inserted);
+ restore_record(table, record[2]);
+ }
+
if (unlikely(error) &&
(!ignore || table->file->is_fatal_error(error, HA_CHECK_ALL)))
{
@@ -985,6 +1116,7 @@ update_begin:
{
store_record(table, record[2]);
table->mark_columns_per_binlog_row_image();
+ table->clone_handler_for_update();
error= vers_insert_history_row(table);
restore_record(table, record[2]);
if (unlikely(error))
@@ -997,14 +1129,14 @@ error:
myf flags= 0;
if (table->file->is_fatal_error(error, HA_CHECK_ALL))
- flags|= ME_FATALERROR; /* Other handler errors are fatal */
+ flags|= ME_FATAL; /* Other handler errors are fatal */
prepare_record_for_error_message(error, table);
table->file->print_error(error,MYF(flags));
error= 1;
break;
}
- updated_sys_ver++;
+ rows_inserted++;
}
if (table->triggers &&
@@ -1109,7 +1241,7 @@ error:
{
/* purecov: begin inspected */
prepare_record_for_error_message(loc_error, table);
- table->file->print_error(loc_error,MYF(ME_FATALERROR));
+ table->file->print_error(loc_error,MYF(ME_FATAL));
error= 1;
/* purecov: end */
}
@@ -1128,6 +1260,8 @@ update_end:
delete select;
select= NULL;
THD_STAGE_INFO(thd, stage_end);
+ if (table_list->has_period())
+ table->file->ha_release_auto_increment();
(void) table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
/*
@@ -1190,14 +1324,14 @@ update_end:
if (likely(error < 0) && likely(!thd->lex->analyze_stmt))
{
char buff[MYSQL_ERRMSG_SIZE];
- if (!table->versioned(VERS_TIMESTAMP))
+ if (!table->versioned(VERS_TIMESTAMP) && !table_list->has_period())
my_snprintf(buff, sizeof(buff), ER_THD(thd, ER_UPDATE_INFO), (ulong) found,
(ulong) updated,
(ulong) thd->get_stmt_da()->current_statement_warn_count());
else
my_snprintf(buff, sizeof(buff),
ER_THD(thd, ER_UPDATE_INFO_WITH_SYSTEM_VERSIONING),
- (ulong) found, (ulong) updated, (ulong) updated_sys_ver,
+ (ulong) found, (ulong) updated, (ulong) rows_inserted,
(ulong) thd->get_stmt_da()->current_statement_warn_count());
my_ok(thd, (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated,
id, buff);
@@ -1267,7 +1401,7 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
TABLE *table= table_list->table;
#endif
List<Item> all_fields;
- SELECT_LEX *select_lex= &thd->lex->select_lex;
+ SELECT_LEX *select_lex= thd->lex->first_select_lex();
DBUG_ENTER("mysql_prepare_update");
#ifndef NO_EMBEDDED_ACCESS_CHECKS
@@ -1278,6 +1412,10 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
thd->lex->allow_sum_func.clear_all();
+ if (table_list->has_period() &&
+ select_lex->period_setup_conds(thd, table_list))
+ DBUG_RETURN(true);
+
DBUG_ASSERT(table_list->table);
// conds could be cached from previous SP call
DBUG_ASSERT(!table_list->vers_conditions.need_setup() ||
@@ -1305,6 +1443,7 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
setup_ftfuncs(select_lex))
DBUG_RETURN(TRUE);
+
select_lex->fix_prepare_information(thd, conds, &fake_conds);
DBUG_RETURN(FALSE);
}
@@ -1563,7 +1702,7 @@ bool Multiupdate_prelocking_strategy::handle_end(THD *thd)
DBUG_RETURN(0);
LEX *lex= thd->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
TABLE_LIST *table_list= lex->query_tables, *tl;
done= true;
@@ -1584,7 +1723,7 @@ bool Multiupdate_prelocking_strategy::handle_end(THD *thd)
FALSE, UPDATE_ACL, SELECT_ACL, TRUE))
DBUG_RETURN(1);
- List<Item> *fields= &lex->select_lex.item_list;
+ List<Item> *fields= &lex->first_select_lex()->item_list;
if (setup_fields_with_no_wrap(thd, Ref_ptr_array(),
*fields, MARK_COLUMNS_WRITE, 0, 0))
DBUG_RETURN(1);
@@ -1594,7 +1733,7 @@ bool Multiupdate_prelocking_strategy::handle_end(THD *thd)
if (tl->view)
break;
// ... and pass this knowlage in check_fields call
- if (check_fields(thd, *fields, tl != NULL ))
+ if (check_fields(thd, table_list, *fields, tl != NULL ))
DBUG_RETURN(1);
table_map tables_for_update= thd->table_map_for_update= get_table_map(fields);
@@ -1605,7 +1744,7 @@ bool Multiupdate_prelocking_strategy::handle_end(THD *thd)
/*
Setup timestamp handling and locking mode
*/
- List_iterator<TABLE_LIST> ti(select_lex->leaf_tables);
+ List_iterator<TABLE_LIST> ti(lex->first_select_lex()->leaf_tables);
const bool using_lock_tables= thd->locked_tables_mode != LTM_NONE;
while ((tl= ti++))
{
@@ -1756,10 +1895,9 @@ int mysql_multi_update_prepare(THD *thd)
Check that we are not using table that we are updating, but we should
skip all tables of UPDATE SELECT itself
*/
- lex->select_lex.exclude_from_table_unique_test= TRUE;
-
+ lex->first_select_lex()->exclude_from_table_unique_test= TRUE;
/* We only need SELECT privilege for columns in the values list */
- List_iterator<TABLE_LIST> ti(lex->select_lex.leaf_tables);
+ List_iterator<TABLE_LIST> ti(lex->first_select_lex()->leaf_tables);
while ((tl= ti++))
{
if (tl->is_jtbm())
@@ -1779,7 +1917,7 @@ int mysql_multi_update_prepare(THD *thd)
Set exclude_from_table_unique_test value back to FALSE. It is needed for
further check in multi_update::prepare whether to use record cache.
*/
- lex->select_lex.exclude_from_table_unique_test= FALSE;
+ lex->first_select_lex()->exclude_from_table_unique_test= FALSE;
if (lex->save_prep_leaf_tables())
DBUG_RETURN(TRUE);
@@ -1802,7 +1940,7 @@ bool mysql_multi_update(THD *thd, TABLE_LIST *table_list, List<Item> *fields,
DBUG_ENTER("mysql_multi_update");
if (!(*result= new (thd->mem_root) multi_update(thd, table_list,
- &thd->lex->select_lex.leaf_tables,
+ &thd->lex->first_select_lex()->leaf_tables,
fields, values, handle_duplicates, ignore)))
{
DBUG_RETURN(TRUE);
@@ -2336,11 +2474,11 @@ int multi_update::prepare2(JOIN *join)
{
if (item_rowid_table(*it2) != tbl)
continue;
- Item *fld= new (thd->mem_root)
- Item_field(thd, (*it)->get_tmp_table_field());
+ Item_field *fld= new (thd->mem_root)
+ Item_field(thd, (*it)->get_tmp_table_field());
if (!fld)
return 1;
- fld->set_result_field((*it2)->get_tmp_table_field());
+ fld->result_field= (*it2)->get_tmp_table_field();
*it2= fld;
}
}
@@ -2482,6 +2620,7 @@ int multi_update::send_data(List<Item> &not_used_values)
if (has_vers_fields && table->versioned(VERS_TIMESTAMP))
{
store_record(table, record[2]);
+ table->clone_handler_for_update();
if (unlikely(error= vers_insert_history_row(table)))
{
restore_record(table, record[2]);
@@ -2541,7 +2680,7 @@ error:
myf flags= 0;
if (table->file->is_fatal_error(error, HA_CHECK_ALL))
- flags|= ME_FATALERROR; /* Other handler errors are fatal */
+ flags|= ME_FATAL; /* Other handler errors are fatal */
prepare_record_for_error_message(error, table);
table->file->print_error(error,MYF(flags));
@@ -2622,17 +2761,10 @@ int multi_update::do_updates()
not its dependencies
*/
while(TABLE *tbl= check_opt_it++)
- {
- if (tbl->vcol_set)
- {
- bitmap_clear_all(tbl->vcol_set);
- for (Field **vf= tbl->vfield; *vf; vf++)
- {
+ if (Field **vf= tbl->vfield)
+ for (; *vf; vf++)
if (bitmap_is_set(tbl->read_set, (*vf)->field_index))
- tbl->mark_virtual_col(*vf);
- }
- }
- }
+ (*vf)->vcol_info->expr->walk(&Item::register_field_in_read_map, 1, 0);
for (cur_table= update_tables; cur_table; cur_table= cur_table->next_local)
{
@@ -2723,10 +2855,10 @@ int multi_update::do_updates()
do
{
DBUG_ASSERT(!tmp_table->field[field_num]->is_null());
- if (unlikely((local_error=
- tbl->file->ha_rnd_pos(tbl->record[0],
- (uchar *) tmp_table->
- field[field_num]->ptr))))
+ String rowid;
+ tmp_table->field[field_num]->val_str(&rowid);
+ if (unlikely((local_error= tbl->file->ha_rnd_pos(tbl->record[0],
+ (uchar*)rowid.ptr()))))
{
err_table= tbl;
goto err;
@@ -2841,7 +2973,7 @@ int multi_update::do_updates()
err:
{
prepare_record_for_error_message(local_error, err_table);
- err_table->file->print_error(local_error,MYF(ME_FATALERROR));
+ err_table->file->print_error(local_error,MYF(ME_FATAL));
}
err2:
@@ -2950,14 +3082,18 @@ bool multi_update::send_eof()
DBUG_ASSERT(trans_safe || !updated ||
thd->transaction.stmt.modified_non_trans_table);
- if (likely(local_error != 0))
- error_handled= TRUE; // to force early leave from ::abort_result_set()
-
- if (unlikely(local_error > 0)) // if the above log write did not fail ...
+ if (unlikely(local_error))
{
- /* Safety: If we haven't got an error before (can happen in do_updates) */
- my_message(ER_UNKNOWN_ERROR, "An error occurred in multi-table update",
- MYF(0));
+ error_handled= TRUE; // to force early leave from ::abort_result_set()
+ if (thd->killed == NOT_KILLED && !thd->get_stmt_da()->is_set())
+ {
+ /*
+ No error message was sent and query was not killed (in which case
+ mysql_execute_command() will send the error mesage).
+ */
+ my_message(ER_UNKNOWN_ERROR, "An error occurred in multi-table update",
+ MYF(0));
+ }
DBUG_RETURN(TRUE);
}
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index b6787a1cb8b..093f12f5fb5 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -36,6 +36,8 @@
#include "datadict.h" // dd_frm_is_view()
#include "sql_derived.h"
#include "sql_cte.h" // check_dependencies_in_with_clauses()
+#include "opt_trace.h"
+#include "wsrep_mysqld.h"
#define MD5_BUFF_LENGTH 33
@@ -256,7 +258,7 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
LEX *lex= thd->lex;
/* first table in list is target VIEW name => cut off it */
TABLE_LIST *tbl;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
SELECT_LEX *sl;
bool res= TRUE;
DBUG_ENTER("create_view_precheck");
@@ -327,7 +329,6 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
}
}
- if (&lex->select_lex != lex->all_selects_list)
{
/* check tables of subqueries */
for (tbl= tables; tbl; tbl= tbl->next_global)
@@ -402,7 +403,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
TABLE_LIST *view= lex->unlink_first_table(&link_to_local);
TABLE_LIST *tables= lex->query_tables;
TABLE_LIST *tbl;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
SELECT_LEX *sl;
SELECT_LEX_UNIT *unit= &lex->unit;
bool res= FALSE;
@@ -717,10 +718,11 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
lex->link_first_table_back(view, link_to_local);
DBUG_RETURN(0);
-
-WSREP_ERROR_LABEL:
- res= TRUE;
+#ifdef WITH_WSREP
+wsrep_error_label:
+ res= true;
goto err_no_relink;
+#endif
err:
lex->link_first_table_back(view, link_to_local);
@@ -1003,7 +1005,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
view->algorithm != VIEW_ALGORITHM_TMPTABLE)))
{
/* TODO: change here when we will support UNIONs */
- for (TABLE_LIST *tbl= lex->select_lex.table_list.first;
+ for (TABLE_LIST *tbl= lex->first_select_lex()->table_list.first;
tbl;
tbl= tbl->next_local)
{
@@ -1122,8 +1124,8 @@ loop_out:
UNION
*/
if (view->updatable_view &&
- !lex->select_lex.master_unit()->is_unit_op() &&
- !(lex->select_lex.table_list.first)->next_local &&
+ !lex->first_select_lex()->master_unit()->is_unit_op() &&
+ !(lex->first_select_lex()->table_list.first)->next_local &&
find_table_in_global_list(lex->query_tables->next_global,
&lex->query_tables->db,
&lex->query_tables->table_name))
@@ -1170,7 +1172,8 @@ err:
bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
bool open_view_no_parse)
{
- SELECT_LEX *end, *UNINIT_VAR(view_select);
+ SELECT_LEX_NODE *end;
+ SELECT_LEX *UNINIT_VAR(view_select);
LEX *old_lex, *lex;
Query_arena *arena, backup;
TABLE_LIST *top_view= table->top_table();
@@ -1213,7 +1216,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
in which case the reinit call wasn't done.
See MDEV-6668 for details.
*/
- mysql_derived_reinit(thd, NULL, table);
+ mysql_handle_single_derived(thd->lex, table, DT_REINIT);
DEBUG_SYNC(thd, "after_cached_view_opened");
DBUG_RETURN(0);
@@ -1369,8 +1372,6 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
lex_start(thd);
lex->stmt_lex= old_lex;
- view_select= &lex->select_lex;
- view_select->select_number= ++thd->lex->stmt_lex->current_select_number;
sql_mode_t saved_mode= thd->variables.sql_mode;
/* switch off modes which can prevent normal parsing of VIEW
@@ -1405,6 +1406,8 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
parse_status= parse_sql(thd, & parser_state, table->view_creation_ctx);
+ view_select= lex->first_select_lex();
+
/* Restore environment. */
if ((old_lex->sql_command == SQLCOM_SHOW_FIELDS) ||
@@ -1424,6 +1427,15 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
Security_context *security_ctx= 0;
/*
+ Check rights to run commands which show underlying tables.
+ In the optimizer trace we would not like to show trace for
+ cases when the current user does not have rights for the
+ underlying tables.
+ */
+ if (!table->prelocking_placeholder)
+ opt_trace_disable_if_no_view_access(thd, table, view_tables);
+
+ /*
Check rights to run commands (ANALYZE SELECT, EXPLAIN SELECT &
SHOW CREATE) which show underlying tables.
Skip this step if we are opening view for prelocking only.
@@ -1552,7 +1564,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
This may change in future, for example if we enable merging of
views with subqueries in select list.
*/
- view_main_select_tables= lex->select_lex.table_list.first;
+ view_main_select_tables= lex->first_select_lex()->table_list.first;
/*
Mergeable view can be used for inserting, so we move the flag down
*/
@@ -1592,7 +1604,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
/* Fields in this view can be used in upper select in case of merge. */
if (table->select_lex)
- table->select_lex->add_where_field(&lex->select_lex);
+ table->select_lex->add_where_field(lex->first_select_lex());
}
/*
This method has a dependency on the proper lock type being set,
@@ -1614,8 +1626,8 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
old_lex->safe_to_cache_query= (old_lex->safe_to_cache_query &&
lex->safe_to_cache_query);
/* move SQL_CACHE to whole query */
- if (view_select->options & OPTION_TO_QUERY_CACHE)
- old_lex->select_lex.options|= OPTION_TO_QUERY_CACHE;
+ if (lex->first_select_lex()->options & OPTION_TO_QUERY_CACHE)
+ old_lex->first_select_lex()->options|= OPTION_TO_QUERY_CACHE;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (table->view_suid)
@@ -1697,9 +1709,10 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
tbl->grant.want_privilege= top_view->grant.orig_want_privilege;
/* prepare view context */
- lex->select_lex.context.resolve_in_table_list_only(view_main_select_tables);
- lex->select_lex.context.outer_context= 0;
- lex->select_lex.select_n_having_items+=
+ lex->first_select_lex()->
+ context.resolve_in_table_list_only(view_main_select_tables);
+ lex->first_select_lex()->context.outer_context= 0;
+ lex->first_select_lex()->select_n_having_items+=
table->select_lex->select_n_having_items;
table->where= view_select->where;
@@ -1710,12 +1723,13 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
*/
if (!table->select_lex->master_unit()->is_unit_op() &&
table->select_lex->order_list.elements == 0)
- table->select_lex->order_list.push_back(&lex->select_lex.order_list);
+ table->select_lex->order_list.
+ push_back(&lex->first_select_lex()->order_list);
else
{
if (old_lex->sql_command == SQLCOM_SELECT &&
(old_lex->describe & DESCRIBE_EXTENDED) &&
- lex->select_lex.order_list.elements &&
+ lex->first_select_lex()->order_list.elements &&
!table->select_lex->master_unit()->is_unit_op())
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
@@ -1749,7 +1763,11 @@ ok:
lex->unit.include_down(table->select_lex);
lex->unit.slave= view_select; // fix include_down initialisation
/* global SELECT list linking */
- end= view_select; // primary SELECT_LEX is always last
+ /*
+ The primary SELECT_LEX is always last (because parsed first) if WITH not
+ used, otherwise it is good start point for last element finding
+ */
+ for (end= view_select; end->link_next; end= end->link_next);
end->link_next= old_lex->all_selects_list;
old_lex->all_selects_list->link_prev= &end->link_next;
old_lex->all_selects_list= lex->all_selects_list;
@@ -1934,7 +1952,7 @@ bool check_key_in_view(THD *thd, TABLE_LIST *view)
*/
if ((!view->view && !view->belong_to_view) ||
thd->lex->sql_command == SQLCOM_INSERT ||
- thd->lex->select_lex.select_limit == 0)
+ thd->lex->first_select_lex()->select_limit == 0)
DBUG_RETURN(FALSE); /* it is normal table or query without LIMIT */
table= view->table;
view= view->top_table();
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 577405725ca..57540f9d3bd 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2021, MariaDB
+ Copyright (c) 2010, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -68,6 +68,7 @@
#include "sql_lex.h"
#include "sql_sequence.h"
#include "my_base.h"
+#include "sql_type_json.h"
/* this is to get the bison compilation windows warnings out */
#ifdef _MSC_VER
@@ -503,96 +504,6 @@ Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal,
}
/**
- @brief Creates a new SELECT_LEX for a UNION branch.
-
- Sets up and initializes a SELECT_LEX structure for a query once the parser
- discovers a UNION token. The current SELECT_LEX is pushed on the stack and
- the new SELECT_LEX becomes the current one.
-
- @param lex The parser state.
-
- @param is_union_distinct True if the union preceding the new select
- statement uses UNION DISTINCT.
-
- @param is_top_level This should be @c TRUE if the newly created SELECT_LEX
- is a non-nested statement.
-
- @return <code>false</code> if successful, <code>true</code> if an error was
- reported. In the latter case parsing should stop.
- */
-bool LEX::add_select_to_union_list(bool is_union_distinct,
- enum sub_select_type type,
- bool is_top_level)
-{
- const char *type_name= (type == INTERSECT_TYPE ? "INTERSECT" :
- (type == EXCEPT_TYPE ? "EXCEPT" : "UNION"));
- /*
- Only the last SELECT can have INTO. Since the grammar won't allow INTO in
- a nested SELECT, we make this check only when creating a top-level SELECT.
- */
- if (is_top_level && result)
- {
- my_error(ER_WRONG_USAGE, MYF(0), type_name, "INTO");
- return TRUE;
- }
- if (current_select->order_list.first && !current_select->braces)
- {
- my_error(ER_WRONG_USAGE, MYF(0), type_name, "ORDER BY");
- return TRUE;
- }
-
- if (current_select->explicit_limit && !current_select->braces)
- {
- my_error(ER_WRONG_USAGE, MYF(0), type_name, "LIMIT");
- return TRUE;
- }
- if (current_select->linkage == GLOBAL_OPTIONS_TYPE)
- {
- thd->parse_error();
- return TRUE;
- }
- if (!is_union_distinct && (type == INTERSECT_TYPE || type == EXCEPT_TYPE))
- {
- my_error(ER_WRONG_USAGE, MYF(0), type_name, "ALL");
- return TRUE;
- }
- /*
- Priority implementation, but also trying to keep things as flat
- as possible */
- if (type == INTERSECT_TYPE &&
- (current_select->linkage != INTERSECT_TYPE &&
- current_select != current_select->master_unit()->first_select())
- && !(thd->variables.sql_mode & MODE_ORACLE))
- {
- /*
- This and previous SELECTs should go one level down because of
- priority
- */
- SELECT_LEX *prev= exclude_last_select();
- if (add_unit_in_brackets(prev))
- return TRUE;
- return add_select_to_union_list(is_union_distinct, type, 0);
- }
- else
- {
- check_automatic_up(type);
- }
- /* This counter shouldn't be incremented for UNION parts */
- nest_level--;
- if (mysql_new_select(this, 0, NULL))
- return TRUE;
- mysql_init_select(this);
- current_select->linkage= type;
- current_select->with_all_modifier= !is_union_distinct;
- if (is_union_distinct) /* UNION DISTINCT - remember position */
- current_select->master_unit()->union_distinct= current_select;
- else
- DBUG_ASSERT(type == UNION_TYPE);
- return FALSE;
-}
-
-
-/**
Create a separate LEX for each assignment if in SP.
If we are in SP we want have own LEX for each assignment.
@@ -610,7 +521,7 @@ bool LEX::add_select_to_union_list(bool is_union_distinct,
@param no_lookahead True if the parser has no lookahead
*/
-void sp_create_assignment_lex(THD *thd, bool no_lookahead)
+bool sp_create_assignment_lex(THD *thd, bool no_lookahead)
{
LEX *lex= thd->lex;
@@ -623,6 +534,8 @@ void sp_create_assignment_lex(THD *thd, bool no_lookahead)
/* Set new LEX as if we at start of set rule. */
lex->sql_command= SQLCOM_SET_OPTION;
+ if (lex->main_select_push())
+ return true;
mysql_init_select(lex);
lex->var_list.empty();
lex->autocommit= 0;
@@ -634,6 +547,7 @@ void sp_create_assignment_lex(THD *thd, bool no_lookahead)
/* Inherit from outer lex. */
lex->option_type= old_lex->option_type;
}
+ return false;
}
@@ -654,8 +568,6 @@ bool sp_create_assignment_instr(THD *thd, bool no_lookahead)
if (lex->sphead)
{
- sp_head *sp= lex->sphead;
-
if (!lex->var_list.is_empty())
{
/*
@@ -663,35 +575,38 @@ bool sp_create_assignment_instr(THD *thd, bool no_lookahead)
option setting, so we should construct sp_instr_stmt
for it.
*/
- LEX_STRING qbuff;
- sp_instr_stmt *i;
Lex_input_stream *lip= &thd->m_parser_state->m_lip;
- if (!(i= new (thd->mem_root)
- sp_instr_stmt(sp->instructions(), lex->spcont, lex)))
- return true;
-
/*
Extract the query statement from the tokenizer. The
end is either lip->ptr, if there was no lookahead,
lip->tok_end otherwise.
*/
- if (no_lookahead)
- qbuff.length= lip->get_ptr() - sp->m_tmp_query;
- else
- qbuff.length= lip->get_tok_end() - sp->m_tmp_query;
-
- if (!(qbuff.str= (char*) alloc_root(thd->mem_root,
- qbuff.length + 5)))
- return true;
-
- strmake(strmake(qbuff.str, "SET ", 4), sp->m_tmp_query,
- qbuff.length);
- qbuff.length+= 4;
- i->m_query= qbuff;
- if (sp->add_instr(i))
+ static const LEX_CSTRING setsp= { STRING_WITH_LEN("SET ") };
+ const char *qend= no_lookahead ? lip->get_ptr() : lip->get_tok_end();
+ Lex_cstring qbuf(lex->sphead->m_tmp_query, qend);
+ if (lex->new_sp_instr_stmt(thd, setsp, qbuf))
return true;
}
+ lex->pop_select();
+ if (lex->check_main_unit_semantics())
+ {
+ /*
+ "lex" can be referrenced by:
+ - sp_instr_set SET a= expr;
+ - sp_instr_set_row_field SET r.a= expr;
+ - sp_instr_stmt (just generated above) SET @a= expr;
+ In this case, "lex" is fully owned by sp_instr_xxx and it will
+ be deleted by the destructor ~sp_instr_xxx().
+ So we should remove "lex" from the stack sp_head::m_lex,
+ to avoid double free.
+ Note, in case "lex" is not owned by any sp_instr_xxx,
+ it's also safe to remove it from the stack right now.
+ So we can remove it unconditionally, without testing lex->sp_lex_in_use.
+ */
+ lex->sphead->restore_lex(thd);
+ return true;
+ }
enum_var_type inner_option_type= lex->option_type;
if (lex->sphead->restore_lex(thd))
return true;
@@ -779,6 +694,7 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
return v;
}
+
%}
%union {
int num;
@@ -803,6 +719,20 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
Lex_for_loop_bounds_st for_loop_bounds;
Lex_trim_st trim;
vers_history_point_t vers_history_point;
+ struct
+ {
+ enum sub_select_type unit_type;
+ bool distinct;
+ } unit_operation;
+ struct
+ {
+ SELECT_LEX *first;
+ SELECT_LEX *prev_last;
+ } select_list;
+ SQL_I_List<ORDER> *select_order;
+ Lex_select_lock select_lock;
+ Lex_select_limit select_limit;
+ Lex_order_limit_lock *order_limit_lock;
/* pointers */
Create_field *create_field;
@@ -823,6 +753,7 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
class sp_lex_cursor *sp_cursor_stmt;
LEX_CSTRING *lex_str_ptr;
LEX_USER *lex_user;
+ USER_AUTH *user_auth;
List<Condition_information_item> *cond_info_list;
List<DYNCALL_CREATE_DEF> *dyncol_def_list;
List<Item> *item_list;
@@ -849,6 +780,7 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
handlerton *db_type;
st_select_lex *select_lex;
+ st_select_lex_unit *select_lex_unit;
struct p_elem_val *p_elem_value;
class Window_frame *window_frame;
class Window_frame_bound *window_frame_bound;
@@ -856,8 +788,9 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
st_trg_execution_order trg_execution_order;
/* enums */
+ enum enum_sp_suid_behaviour sp_suid;
+ enum enum_sp_aggregate_type sp_aggregate_type;
enum enum_view_suid view_suid;
- enum sub_select_type unit_type;
enum Condition_information_item::Name cond_info_item_name;
enum enum_diag_condition_item_name diag_condition_item_name;
enum Diagnostics_information::Which_area diag_area;
@@ -890,6 +823,8 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
}
%{
+/* avoid unintentional %union size increases, it's what a parser stack made of */
+static_assert(sizeof(YYSTYPE) == sizeof(void*)*2+8, "%union size check");
bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%}
@@ -899,7 +834,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
/*
We should not introduce any further shift/reduce conflicts.
*/
-%expect 85
+%expect 72
/*
Comments for TOKENS.
@@ -1057,6 +992,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token LEADING /* SQL-2003-R */
%token LEAVE_SYM
%token LEFT /* SQL-2003-R */
+%token LEFT_PAREN_ALT /* INTERNAL */
+%token LEFT_PAREN_WITH /* INTERNAL */
+%token LEFT_PAREN_LIKE /* INTERNAL */
%token LEX_HOSTNAME
%token LIKE /* SQL-2003-R */
%token LIMIT
@@ -1119,6 +1057,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token PERCENT_RANK_SYM
%token PERCENTILE_CONT_SYM
%token PERCENTILE_DISC_SYM
+%token PORTION_SYM /* SQL-2016-R */
%token POSITION_SYM /* SQL-2003-N */
%token PRECISION /* SQL-2003-R */
%token PRIMARY_SYM /* SQL-2003-R */
@@ -1247,6 +1186,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
Non-reserved keywords
*/
+%token <kwd> ACCOUNT_SYM /* MYSQL */
%token <kwd> ACTION /* SQL-2003-N */
%token <kwd> ADMIN_SYM /* SQL-2003-N */
%token <kwd> ADDDATE_SYM /* MYSQL-FUNC */
@@ -1364,6 +1304,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token <kwd> EXIT_MARIADB_SYM /* PLSQL-R */
%token <kwd> EXIT_ORACLE_SYM /* PLSQL-R */
%token <kwd> EXPANSION_SYM
+%token <kwd> EXPIRE_SYM /* MySQL */
%token <kwd> EXPORT_SYM
%token <kwd> EXTENDED_SYM
%token <kwd> EXTENT_SIZE_SYM
@@ -1479,6 +1420,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token <kwd> NAME_SYM /* SQL-2003-N */
%token <kwd> NATIONAL_SYM /* SQL-2003-R */
%token <kwd> NCHAR_SYM /* SQL-2003-R */
+%token <kwd> NEVER_SYM /* MySQL */
%token <kwd> NEW_SYM /* SQL-2003-R */
%token <kwd> NEXT_SYM /* SQL-2003-N */
%token <kwd> NEXTVAL_SYM /* PostgreSQL sequence function */
@@ -1602,6 +1544,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token <kwd> SQL_CALC_FOUND_ROWS
%token <kwd> SQL_NO_CACHE_SYM
%token <kwd> SQL_THREAD
+%token <kwd> STAGE_SYM
%token <kwd> STARTS_SYM
%token <kwd> START_SYM /* SQL-2003-R */
%token <kwd> STATEMENT_SYM
@@ -1680,6 +1623,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
/* A dummy token to force the priority of table_ref production in a join. */
%left CONDITIONLESS_JOIN
%left JOIN_SYM INNER_SYM STRAIGHT_JOIN CROSS LEFT RIGHT ON_SYM USING
+
%left SET_VAR
%left OR_SYM OR2_SYM
%left XOR
@@ -1701,6 +1645,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%left MYSQL_CONCAT_SYM
%nonassoc NEG '~' NOT2_SYM BINARY
%nonassoc COLLATE_SYM
+%nonassoc SUBQUERY_AS_EXPR
/*
Tokens that can change their meaning from identifier to something else
@@ -1791,7 +1736,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
ALTER TABLE t1 ADD SYSTEM VERSIONING;
*/
%left PREC_BELOW_CONTRACTION_TOKEN2
-%left TEXT_STRING '(' VALUE_SYM VERSIONING_SYM
+%left TEXT_STRING '(' ')' VALUE_SYM VERSIONING_SYM
+%left EMPTY_FROM_CLAUSE
+%right INTO
%type <lex_str>
DECIMAL_NUM FLOAT_NUM NUM LONG_NUM
@@ -1821,7 +1768,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
NCHAR_STRING
%type <lex_str_ptr>
- opt_table_alias
+ opt_table_alias_clause
+ table_alias_clause
%type <ident_cli>
IDENT
@@ -1854,7 +1802,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <simple_string>
remember_name remember_end
- remember_tok_start remember_tok_end
+ remember_tok_start
wild_and_where
%type <const_simple_string>
@@ -1887,7 +1835,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
opt_temporary all_or_any opt_distinct opt_glimit_clause
opt_ignore_leaves fulltext_options union_option
opt_not
- select_derived_init transaction_access_mode_types
+ transaction_access_mode_types
opt_natural_language_mode opt_query_expansion
opt_ev_status opt_ev_on_completion ev_on_completion opt_ev_comment
ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_sql_stmt
@@ -1896,7 +1844,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
opt_default_time_precision
case_stmt_body opt_bin_mod opt_for_system_time_clause
opt_if_exists_table_element opt_if_not_exists_table_element
- opt_recursive opt_format_xid
+ opt_recursive opt_format_xid opt_for_portion_of_time_clause
%type <object_ddl_options>
create_or_replace
@@ -1976,6 +1924,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
expr_list opt_udf_expr_list udf_expr_list when_list when_list_opt_else
ident_list ident_list_arg opt_expr_list
decode_when_list_oracle
+ execute_using
+ execute_params
%type <sp_cursor_stmt>
sp_cursor_stmt_lex
@@ -2008,12 +1958,11 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <table_list>
join_table_list join_table
table_factor table_ref esc_table_ref
- table_primary_ident table_primary_derived
- select_derived derived_table_list
- select_derived_union
- derived_simple_table
- derived_query_specification
- derived_table_value_constructor
+ table_primary_ident table_primary_ident_opt_parens
+ table_primary_derived table_primary_derived_opt_parens
+ derived_table_list table_reference_list_parens
+ nested_table_reference_list join_table_parens
+ update_table_list
%type <date_time_type> date_time_type;
%type <interval> interval
@@ -2034,6 +1983,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <lex_user> user grant_user grant_role user_or_role current_role
admin_option_for_role user_maybe_role
+%type <user_auth> opt_auth_str auth_expression auth_token
+
%type <charset>
opt_collate
collate
@@ -2048,14 +1999,21 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
UNDERSCORE_CHARSET
%type <select_lex> subselect
- get_select_lex get_select_lex_derived
- simple_table
query_specification
- query_term_union_not_ready
- query_term_union_ready
- query_expression_body
- select_paren_derived
table_value_constructor
+ simple_table
+ query_simple
+ query_primary
+ subquery
+ select_into_query_specification
+
+%type <select_lex_unit>
+ query_expression
+ query_expression_no_with_clause
+ query_expression_body_ext
+ query_expression_body_ext_parens
+ query_expression_body
+ query_specification_start
%type <boolfunc2creator> comp_op
@@ -2067,11 +2025,30 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <virtual_column> opt_check_constraint check_constraint virtual_column_func
column_default_expr
-%type <unit_type> unit_type_decl
+
+%type <unit_operation> unit_type_decl
+
+%type <select_lock>
+ opt_procedure_or_into
+ opt_select_lock_type
+ select_lock_type
+ opt_lock_wait_timeout_new
+
+%type <select_limit> opt_limit_clause limit_clause limit_options
+
+%type <order_limit_lock>
+ query_expression_tail
+ opt_query_expression_tail
+ order_or_limit
+ order_limit_lock
+ opt_order_limit_lock
+
+%type <select_order> opt_order_clause order_clause order_list
%type <NONE>
- analyze_stmt_command
- query verb_clause create change select do drop insert replace insert2
+ analyze_stmt_command backup backup_statements
+ query verb_clause create change select select_into
+ do drop insert replace insert2
insert_values update delete truncate rename compound_statement
show describe load alter optimize keycache preload flush
reset purge begin_stmt_mariadb commit rollback savepoint release
@@ -2087,7 +2064,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
assign_to_keycache_parts
preload_list preload_list_or_parts preload_keys preload_keys_parts
select_item_list select_item values_list no_braces
- opt_limit_clause delete_limit_clause fields opt_values values
+ delete_limit_clause fields opt_values values
no_braces_with_names opt_values_with_names values_with_names
procedure_list procedure_list2 procedure_item
field_def handler opt_generated_always
@@ -2111,18 +2088,16 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
table_to_table_list table_to_table opt_table_list opt_as
handler_rkey_function handler_read_or_scan
single_multi table_wild_list table_wild_one opt_wild
- union_clause union_list
- subselect_start opt_and charset
- subselect_end select_var_list select_var_list_init help
+ opt_and charset
+ select_var_list select_var_list_init help
opt_extended_describe shutdown
opt_format_json
- prepare prepare_src execute deallocate
- statement sp_suid
+ prepare execute deallocate
+ statement
sp_c_chistics sp_a_chistics sp_chistic sp_c_chistic xa
opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
view_list_opt view_list view_select
- trigger_tail sp_tail sf_tail event_tail
- udf_tail create_function_tail create_aggregate_function_tail
+ trigger_tail sp_tail event_tail
install uninstall partition_entry binlog_base64_event
normal_key_options normal_key_opts all_key_opt
spatial_key_options fulltext_key_options normal_key_opt
@@ -2131,6 +2106,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
key_using_alg
part_column_list
period_for_system_time
+ period_for_application_time
server_def server_options_list server_option
definer_opt no_definer definer get_diagnostics
parse_vcol_expr vcol_opt_specifier vcol_opt_attribute
@@ -2163,6 +2139,8 @@ END_OF_INPUT
%type <view_suid> view_suid opt_view_suid
%type <plsql_cursor_attr> plsql_cursor_attr
+%type <sp_suid> sp_suid
+%type <sp_aggregate_type> opt_aggregate
%type <num> sp_decl_idents sp_decl_idents_init_vars
%type <num> sp_handler_type sp_hcond_list
@@ -2206,13 +2184,16 @@ END_OF_INPUT
%type <frame_exclusion> opt_window_frame_exclusion;
%type <window_frame_bound> window_frame_start window_frame_bound;
-%type <NONE>
+%type <kwd>
'-' '+' '*' '/' '%' '(' ')'
- ',' '!' '{' '}' '&' '|' AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
+ ',' '!' '{' '}' '&' '|'
+
+%type <NONE>
+ AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
THEN_SYM WHEN_SYM DIV_SYM MOD_SYM OR2_SYM AND_AND_SYM DELETE_SYM
MYSQL_CONCAT_SYM ORACLE_CONCAT_SYM
-%type <with_clause> opt_with_clause with_clause
+%type <with_clause> with_clause
%type <with_element_head> with_element_head
@@ -2248,8 +2229,8 @@ rule: <-- starts at col 1
query:
END_OF_INPUT
{
- if (likely(!thd->bootstrap) &&
- unlikely(!(thd->lex->select_lex.options & OPTION_FOUND_COMMENT)))
+ if (!thd->bootstrap &&
+ (!(thd->lex->lex_options & OPTION_LEX_FOUND_COMMENT)))
my_yyabort_error((ER_EMPTY_QUERY, MYF(0)));
thd->lex->sql_command= SQLCOM_EMPTY_QUERY;
@@ -2303,6 +2284,7 @@ statement:
alter
| analyze
| analyze_stmt_command
+ | backup
| binlog_base64_event
| call
| change
@@ -2345,6 +2327,7 @@ statement:
| rollback
| savepoint
| select
+ | select_into
| set
| signal_stmt
| show
@@ -2362,9 +2345,7 @@ statement:
deallocate:
deallocate_or_drop PREPARE_SYM ident
{
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_DEALLOCATE_PREPARE;
- lex->prepared_stmt_name= $3;
+ Lex->stmt_deallocate_prepare($3);
}
;
@@ -2374,72 +2355,58 @@ deallocate_or_drop:
;
prepare:
- PREPARE_SYM ident FROM prepare_src
- {
- LEX *lex= thd->lex;
- if (unlikely(lex->table_or_sp_used()))
- my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
- "PREPARE..FROM"));
- lex->sql_command= SQLCOM_PREPARE;
- lex->prepared_stmt_name= $2;
- }
- ;
-
-prepare_src:
- { Lex->expr_allows_subselect= false; }
+ PREPARE_SYM ident FROM
+ { Lex->clause_that_disallows_subselect= "PREPARE..FROM"; }
expr
{
- Lex->prepared_stmt_code= $2;
- Lex->expr_allows_subselect= true;
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_prepare($2, $5))
+ MYSQL_YYABORT;
}
;
execute:
- EXECUTE_SYM ident
+ EXECUTE_SYM ident execute_using
{
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_EXECUTE;
- lex->prepared_stmt_name= $2;
+ if (Lex->stmt_execute($2, $3))
+ MYSQL_YYABORT;
}
+ | EXECUTE_SYM IMMEDIATE_SYM
+ { Lex->clause_that_disallows_subselect= "EXECUTE IMMEDIATE"; }
+ expr
+ { Lex->clause_that_disallows_subselect= NULL; }
execute_using
- {}
- | EXECUTE_SYM IMMEDIATE_SYM prepare_src
{
- if (unlikely(Lex->table_or_sp_used()))
- my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
- "EXECUTE IMMEDIATE"));
- Lex->sql_command= SQLCOM_EXECUTE_IMMEDIATE;
+ if (Lex->stmt_execute_immediate($4, $6))
+ MYSQL_YYABORT;
}
- execute_using
- {}
;
execute_using:
- /* nothing */
- | USING { Lex->expr_allows_subselect= false; }
- execute_var_list
+ /* nothing */ { $$= NULL; }
+ | USING
+ { Lex->clause_that_disallows_subselect= "EXECUTE..USING"; }
+ execute_params
{
- if (unlikely(Lex->table_or_sp_used()))
- my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
- "EXECUTE..USING"));
- Lex->expr_allows_subselect= true;
+ $$= $3;
+ Lex->clause_that_disallows_subselect= NULL;
}
;
-execute_var_list:
- execute_var_list ',' execute_var_ident
- | execute_var_ident
- ;
-
-execute_var_ident:
+execute_params:
expr_or_ignore_or_default
{
- if (unlikely(Lex->prepared_stmt_params.push_back($1,
- thd->mem_root)))
+ if (unlikely(!($$= List<Item>::make(thd->mem_root, $1))))
+ MYSQL_YYABORT;
+ }
+ | execute_params ',' expr_or_ignore_or_default
+ {
+ if (($$= $1)->push_back($3, thd->mem_root))
MYSQL_YYABORT;
}
;
+
/* help */
help:
@@ -2698,19 +2665,24 @@ connection_name:
/* create a table */
create:
- create_or_replace opt_temporary TABLE_SYM opt_if_not_exists table_ident
+ create_or_replace opt_temporary TABLE_SYM opt_if_not_exists
{
LEX *lex= thd->lex;
if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_create_table()))
MYSQL_YYABORT;
lex->create_info.init();
- if (unlikely(lex->set_command_with_check(SQLCOM_CREATE_TABLE, $2,
- $1 | $4)))
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
+ if (lex->set_command_with_check(SQLCOM_CREATE_TABLE, $2, $1 | $4))
MYSQL_YYABORT;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_UPDATING,
- TL_WRITE,
- MDL_EXCLUSIVE)))
+ }
+ table_ident
+ {
+ LEX *lex= thd->lex;
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, $6, NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_SHARED_UPGRADABLE))
MYSQL_YYABORT;
lex->alter_info.reset();
/*
@@ -2721,16 +2693,19 @@ create:
lex->create_info.default_table_charset= NULL;
lex->name= null_clex_str;
lex->create_last_non_select_table= lex->last_table();
+ lex->inc_select_stack_outer_barrier();
}
create_body
{
LEX *lex= thd->lex;
- lex->current_select= &lex->select_lex;
create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
}
| create_or_replace opt_temporary SEQUENCE_SYM opt_if_not_exists table_ident
{
LEX *lex= thd->lex;
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_create_sequence()))
MYSQL_YYABORT;
lex->create_info.init();
@@ -2738,10 +2713,9 @@ create:
$1 | $4)))
MYSQL_YYABORT;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_UPDATING,
- TL_WRITE,
- MDL_EXCLUSIVE)))
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_EXCLUSIVE))
MYSQL_YYABORT;
/*
@@ -2764,8 +2738,9 @@ create:
if (unlikely(lex->create_info.seq_create_info->check_and_adjust(1)))
{
my_error(ER_SEQUENCE_INVALID_DATA, MYF(0),
- lex->select_lex.table_list.first->db.str,
- lex->select_lex.table_list.first->table_name.str);
+ lex->first_select_lex()->table_list.first->db.str,
+ lex->first_select_lex()->table_list.first->
+ table_name.str);
MYSQL_YYABORT;
}
@@ -2778,42 +2753,64 @@ create:
Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
Lex->create_info.sequence= 1;
- lex->current_select= &lex->select_lex;
create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
}
- | create_or_replace opt_unique INDEX_SYM opt_if_not_exists ident
+ | create_or_replace opt_unique INDEX_SYM opt_if_not_exists
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ ident
opt_key_algorithm_clause
ON table_ident
{
- if (unlikely(Lex->add_create_index_prepare($8)))
+ if (Lex->add_create_index_prepare($9))
MYSQL_YYABORT;
- if (unlikely(Lex->add_create_index($2, &$5, $6, $1 | $4)))
+ if (Lex->add_create_index($2, &$6, $7, $1 | $4))
MYSQL_YYABORT;
}
'(' key_list ')' opt_lock_wait_timeout normal_key_options
- opt_index_lock_algorithm { }
- | create_or_replace fulltext INDEX_SYM opt_if_not_exists ident
+ opt_index_lock_algorithm
+ {
+ Lex->pop_select(); //main select
+ }
+ | create_or_replace fulltext INDEX_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ opt_if_not_exists ident
ON table_ident
{
- if (unlikely(Lex->add_create_index_prepare($7)))
+ if (Lex->add_create_index_prepare($8))
MYSQL_YYABORT;
- if (unlikely(Lex->add_create_index($2, &$5, HA_KEY_ALG_UNDEF,
- $1 | $4)))
+ if (Lex->add_create_index($2, &$6, HA_KEY_ALG_UNDEF, $1 | $5))
MYSQL_YYABORT;
}
'(' key_list ')' opt_lock_wait_timeout fulltext_key_options
- opt_index_lock_algorithm { }
- | create_or_replace spatial INDEX_SYM opt_if_not_exists ident
+ opt_index_lock_algorithm
+ {
+ Lex->pop_select(); //main select
+ }
+ | create_or_replace spatial INDEX_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ opt_if_not_exists ident
ON table_ident
{
- if (unlikely(Lex->add_create_index_prepare($7)))
+ if (Lex->add_create_index_prepare($8))
MYSQL_YYABORT;
- if (unlikely(Lex->add_create_index($2, &$5, HA_KEY_ALG_UNDEF,
- $1 | $4)))
+ if (Lex->add_create_index($2, &$6, HA_KEY_ALG_UNDEF, $1 | $5))
MYSQL_YYABORT;
}
'(' key_list ')' opt_lock_wait_timeout spatial_key_options
- opt_index_lock_algorithm { }
+ opt_index_lock_algorithm
+ {
+ Lex->pop_select(); //main select
+ }
| create_or_replace DATABASE opt_if_not_exists ident
{
Lex->create_info.default_table_charset= NULL;
@@ -2830,57 +2827,92 @@ create:
| create_or_replace definer_opt opt_view_suid VIEW_SYM
opt_if_not_exists table_ident
{
- if (unlikely(Lex->add_create_view(thd, $1 | $5,
- DTYPE_ALGORITHM_UNDEFINED, $3,
- $6)))
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
+ if (Lex->add_create_view(thd, $1 | $5,
+ DTYPE_ALGORITHM_UNDEFINED, $3, $6))
MYSQL_YYABORT;
}
view_list_opt AS view_select
- { }
+ {
+ Lex->pop_select(); //main select
+ }
| create_or_replace view_algorithm definer_opt opt_view_suid VIEW_SYM
opt_if_not_exists table_ident
{
if (unlikely(Lex->add_create_view(thd, $1 | $6, $2, $4, $7)))
MYSQL_YYABORT;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
}
view_list_opt AS view_select
- { }
+ {
+ Lex->pop_select(); //main select
+ }
| create_or_replace definer_opt TRIGGER_SYM
- { Lex->create_info.set($1); }
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->create_info.set($1);
+ }
trigger_tail
- { }
- | create_or_replace definer_opt PROCEDURE_SYM
- { Lex->create_info.set($1); }
+ {
+ Lex->pop_select(); //main select
+ }
+ | create_or_replace definer_opt PROCEDURE_SYM opt_if_not_exists
+ {
+ if (Lex->stmt_create_procedure_start($1 | $4))
+ MYSQL_YYABORT;
+ }
sp_tail
- { }
+ {
+ Lex->stmt_create_routine_finalize();
+ }
| create_or_replace definer_opt EVENT_SYM
- { Lex->create_info.set($1); }
- event_tail
- { }
- | create_or_replace definer FUNCTION_SYM
{
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
Lex->create_info.set($1);
}
- sf_tail_not_aggregate
- { }
- | create_or_replace definer AGGREGATE_SYM FUNCTION_SYM
+ event_tail
{
- Lex->create_info.set($1);
+ Lex->pop_select(); //main select
}
- sf_tail_aggregate
- { }
- | create_or_replace no_definer FUNCTION_SYM
- { Lex->create_info.set($1); }
- create_function_tail
- { }
- | create_or_replace no_definer AGGREGATE_SYM FUNCTION_SYM
+ | create_or_replace definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ sp_name '('
{
- Lex->create_info.set($1);
+ if (Lex->stmt_create_stored_function_start($1 | $5, $3, $6))
+ MYSQL_YYABORT;
}
- create_aggregate_function_tail
- { }
- | create_or_replace USER_SYM opt_if_not_exists clear_privileges grant_list
- opt_require_clause opt_resource_options
+ sp_fdparam_list ')'
+ sf_return_type
+ sf_c_chistics_and_body
+ {
+ Lex->stmt_create_routine_finalize();
+ }
+ | create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ sp_name '('
+ {
+ if (Lex->stmt_create_stored_function_start($1 | $5, $3, $6))
+ MYSQL_YYABORT;
+ }
+ sp_fdparam_list ')'
+ sf_return_type
+ sf_c_chistics_and_body
+ {
+ Lex->stmt_create_routine_finalize();
+ }
+ | create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ ident RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
+ {
+ if (Lex->stmt_create_udf_function($1 | $5, $3, $6,
+ (Item_result) $8, $10))
+ MYSQL_YYABORT;
+ }
+ | create_or_replace USER_SYM opt_if_not_exists clear_privileges
+ grant_list opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration
{
if (unlikely(Lex->set_command_with_check(SQLCOM_CREATE_USER,
$1 | $3)))
@@ -2906,38 +2938,6 @@ create:
{ }
;
-sf_tail_not_aggregate:
- sf_tail
- {
- if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
- {
- my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
- }
- Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
- }
- ;
-
-sf_tail_aggregate:
- sf_tail
- {
- if (unlikely(!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)))
- {
- my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0)));
- }
- Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
- }
- ;
-
-create_function_tail:
- sf_tail_not_aggregate { }
- | udf_tail { Lex->udf.type= UDFTYPE_FUNCTION; }
- ;
-
-create_aggregate_function_tail:
- sf_tail_aggregate
- { }
- | udf_tail { Lex->udf.type= UDFTYPE_AGGREGATE; }
- ;
opt_sequence:
/* empty */ { }
| sequence_defs
@@ -3259,20 +3259,17 @@ ev_sql_stmt:
if (unlikely(!lex->make_sp_head(thd,
lex->event_parse_data->identifier,
- &sp_handler_procedure)))
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
}
sp_proc_stmt force_lookahead
{
- LEX *lex= thd->lex;
-
/* return back to the original memory root ASAP */
- lex->sphead->set_stmt_end(thd);
- lex->sphead->restore_thd_mem_root(thd);
-
- lex->event_parse_data->body_changed= TRUE;
+ if (Lex->sp_body_finalize_event(thd))
+ MYSQL_YYABORT;
}
;
@@ -3284,13 +3281,16 @@ clear_privileges:
lex->columns.empty();
lex->grant= lex->grant_tot_col= 0;
lex->all_privileges= 0;
- lex->select_lex.db= null_clex_str;
- lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
- lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0;
- bzero((char *)&(lex->mqh),sizeof(lex->mqh));
+ lex->first_select_lex()->db= null_clex_str;
+ lex->account_options.reset();
}
;
+opt_aggregate:
+ /* Empty */ { $$= NOT_AGGREGATE; }
+ | AGGREGATE_SYM { $$= GROUP_AGGREGATE; }
+ ;
+
sp_name:
ident '.' ident
{
@@ -3329,7 +3329,7 @@ sp_chistic:
| MODIFIES_SYM SQL_SYM DATA_SYM
{ Lex->sp_chistics.daccess= SP_MODIFIES_SQL_DATA; }
| sp_suid
- {}
+ { Lex->sp_chistics.suid= $1; }
;
/* Create characteristics */
@@ -3339,14 +3339,8 @@ sp_c_chistic:
;
sp_suid:
- SQL_SYM SECURITY_SYM DEFINER_SYM
- {
- Lex->sp_chistics.suid= SP_IS_SUID;
- }
- | SQL_SYM SECURITY_SYM INVOKER_SYM
- {
- Lex->sp_chistics.suid= SP_IS_NOT_SUID;
- }
+ SQL_SYM SECURITY_SYM DEFINER_SYM { $$= SP_IS_SUID; }
+ | SQL_SYM SECURITY_SYM INVOKER_SYM { $$= SP_IS_NOT_SUID; }
;
call:
@@ -3407,7 +3401,18 @@ sp_cparams:
/* Stored FUNCTION parameter declaration list */
sp_fdparam_list:
/* Empty */
- | sp_fdparams
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ Lex->sphead->m_param_end= Lex->sphead->m_param_begin;
+ }
+ |
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ }
+ sp_fdparams
+ {
+ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
+ }
;
sp_fdparams:
@@ -3481,18 +3486,6 @@ sp_opt_inout:
| INOUT_SYM { $$= sp_variable::MODE_INOUT; }
;
-sp_parenthesized_fdparam_list:
- '('
- {
- Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
- }
- sp_fdparam_list
- ')'
- {
- Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
- }
- ;
-
sp_parenthesized_pdparam_list:
'('
{
@@ -3560,12 +3553,8 @@ optionally_qualified_column_ident:
row_field_name:
ident
{
- if (unlikely(check_string_char_length(&$1, 0, NAME_CHAR_LEN,
- system_charset_info, 1)))
- my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), $1.str));
- if (unlikely(!($$= new (thd->mem_root) Spvar_definition())))
+ if (!($$= Lex->row_field_name(thd, $1)))
MYSQL_YYABORT;
- Lex->init_last_field($$, &$1, thd->variables.collation_database);
}
;
@@ -3576,17 +3565,12 @@ row_field_definition:
row_field_definition_list:
row_field_definition
{
- if (unlikely(!($$= new (thd->mem_root) Row_definition_list())) ||
- unlikely($$->push_back($1, thd->mem_root)))
+ if (!($$= Row_definition_list::make(thd->mem_root, $1)))
MYSQL_YYABORT;
}
| row_field_definition_list ',' row_field_definition
{
- uint unused;
- if (unlikely($1->find_row_field_by_name(&$3->field_name, &unused)))
- my_yyabort_error((ER_DUP_FIELDNAME, MYF(0), $3->field_name.str));
- $$= $1;
- if (unlikely($$->push_back($3, thd->mem_root)))
+ if (($$= $1)->append_uniq(thd->mem_root, $3))
MYSQL_YYABORT;
}
;
@@ -3701,10 +3685,13 @@ sp_cursor_stmt:
{
DBUG_ASSERT(thd->free_list == NULL);
Lex->sphead->reset_lex(thd, $1);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
select
{
DBUG_ASSERT(Lex == $1);
+ Lex->pop_select(); //main select
if (unlikely($1->stmt_finalize(thd)) ||
unlikely($1->sphead->restore_lex(thd)))
MYSQL_YYABORT;
@@ -3833,7 +3820,7 @@ raise_stmt_oracle:
signal_stmt:
SIGNAL_SYM signal_value opt_set_signal_information
{
- if (unlikely(Lex->add_signal_statement(thd, $2)))
+ if (Lex->add_signal_statement(thd, $2))
MYSQL_YYABORT;
}
;
@@ -4202,48 +4189,17 @@ sp_proc_stmt_statement:
Lex_input_stream *lip= YYLIP;
lex->sphead->reset_lex(thd);
+ /*
+ We should not push main select here, it will be done or not
+ done by the statement, we just provide only a new LEX for the
+ statement here as if it is start of parsing a new statement.
+ */
lex->sphead->m_tmp_query= lip->get_tok_start();
}
statement
{
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
- sp_head *sp= lex->sphead;
-
- sp->m_flags|= sp_get_flags_for_command(lex);
- /* "USE db" doesn't work in a procedure */
- if (unlikely(lex->sql_command == SQLCOM_CHANGE_DB))
- my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "USE"));
- /*
- Don't add an instruction for SET statements, since all
- instructions for them were already added during processing
- of "set" rule.
- */
- DBUG_ASSERT(lex->sql_command != SQLCOM_SET_OPTION ||
- lex->var_list.is_empty());
- if (lex->sql_command != SQLCOM_SET_OPTION)
- {
- sp_instr_stmt *i=new (thd->mem_root)
- sp_instr_stmt(sp->instructions(), lex->spcont, lex);
- if (unlikely(i == NULL))
- MYSQL_YYABORT;
-
- /*
- Extract the query statement from the tokenizer. The
- end is either lex->ptr, if there was no lookahead,
- lex->tok_end otherwise.
- */
- if (yychar == YYEMPTY)
- i->m_query.length= lip->get_ptr() - sp->m_tmp_query;
- else
- i->m_query.length= lip->get_tok_start() - sp->m_tmp_query;;
- if (unlikely(!(i->m_query.str= strmake_root(thd->mem_root,
- sp->m_tmp_query,
- i->m_query.length))) ||
- unlikely(sp->add_instr(i)))
- MYSQL_YYABORT;
- }
- if (unlikely(sp->restore_lex(thd)))
+ if (Lex->sp_proc_stmt_statement_finalize(thd, yychar == YYEMPTY) ||
+ Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
;
@@ -4256,11 +4212,16 @@ RETURN_ALLMODES_SYM:
sp_proc_stmt_return:
RETURN_ALLMODES_SYM
- { Lex->sphead->reset_lex(thd); }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
+ Lex->pop_select(); //main select
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
if (unlikely(sp->m_handler->add_instr_freturn(thd, sp, lex->spcont,
@@ -4272,8 +4233,6 @@ sp_proc_stmt_return:
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
- if (Lex->check_cte_dependencies_and_resolve_references())
- MYSQL_YYABORT;
if (unlikely(sp->m_handler->add_instr_preturn(thd, sp,
lex->spcont)))
MYSQL_YYABORT;
@@ -4281,7 +4240,16 @@ sp_proc_stmt_return:
;
reset_lex_expr:
- { Lex->sphead->reset_lex(thd); } expr { $$= $2; }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+ expr
+ {
+ Lex->pop_select(); //main select
+ $$= $2;
+ }
;
sp_proc_stmt_exit_oracle:
@@ -4373,6 +4341,8 @@ assignment_source_expr:
{
DBUG_ASSERT(thd->free_list == NULL);
Lex->sphead->reset_lex(thd, $1);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
expr
{
@@ -4381,7 +4351,8 @@ assignment_source_expr:
$$->sp_lex_in_use= true;
$$->set_item_and_free_list($3, thd->free_list);
thd->free_list= NULL;
- if (unlikely($$->sphead->restore_lex(thd)))
+ Lex->pop_select(); //min select
+ if ($$->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
;
@@ -4390,6 +4361,9 @@ for_loop_bound_expr:
assignment_source_lex
{
Lex->sphead->reset_lex(thd, $1);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ Lex->current_select->parsing_place= FOR_LOOP_BOUND;
}
expr
{
@@ -4397,8 +4371,10 @@ for_loop_bound_expr:
$$= $1;
$$->sp_lex_in_use= true;
$$->set_item_and_free_list($3, NULL);
+ Lex->pop_select(); //main select
if (unlikely($$->sphead->restore_lex(thd)))
MYSQL_YYABORT;
+ Lex->current_select->parsing_place= NO_MATTER;
}
;
@@ -4451,15 +4427,8 @@ sp_proc_stmt_fetch:
sp_proc_stmt_fetch_head sp_fetch_list { }
| FETCH_SYM GROUP_SYM NEXT_SYM ROW_SYM
{
- LEX *lex= Lex;
- sp_head *sp= lex->sphead;
- lex->sphead->m_flags|= sp_head::HAS_AGGREGATE_INSTR;
- sp_instr_agg_cfetch *i=
- new (thd->mem_root) sp_instr_agg_cfetch(sp->instructions(),
- lex->spcont);
- if (unlikely(i == NULL) ||
- unlikely(sp->add_instr(i)))
- MYSQL_YYABORT;
+ if (unlikely(Lex->sp_add_agg_cfetch()))
+ MYSQL_YYABORT;
}
;
@@ -4517,7 +4486,11 @@ sp_fetch_list:
;
sp_if:
- { Lex->sphead->reset_lex(thd); }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr THEN_SYM
{
LEX *lex= Lex;
@@ -4531,6 +4504,7 @@ sp_if:
unlikely(sp->add_cont_backpatch(i)) ||
unlikely(sp->add_instr(i)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
if (unlikely(sp->restore_lex(thd)))
MYSQL_YYABORT;
}
@@ -4631,12 +4605,18 @@ case_stmt_specification:
;
case_stmt_body:
- { Lex->sphead->reset_lex(thd); /* For expr $2 */ }
+ {
+ Lex->sphead->reset_lex(thd); /* For expr $2 */
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr
{
if (unlikely(Lex->case_stmt_action_expr($2)))
MYSQL_YYABORT;
- if (unlikely(Lex->sphead->restore_lex(thd)))
+
+ Lex->pop_select(); //main select
+ if (Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
simple_when_clause_list
@@ -4659,6 +4639,8 @@ simple_when_clause:
WHEN_SYM
{
Lex->sphead->reset_lex(thd); /* For expr $3 */
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
expr
{
@@ -4667,6 +4649,7 @@ simple_when_clause:
LEX *lex= Lex;
if (unlikely(lex->case_stmt_action_when($3, true)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
/* For expr $3 */
if (unlikely(lex->sphead->restore_lex(thd)))
MYSQL_YYABORT;
@@ -4683,12 +4666,15 @@ searched_when_clause:
WHEN_SYM
{
Lex->sphead->reset_lex(thd); /* For expr $3 */
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
expr
{
LEX *lex= Lex;
if (unlikely(lex->case_stmt_action_when($3, false)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
/* For expr $3 */
if (unlikely(lex->sphead->restore_lex(thd)))
MYSQL_YYABORT;
@@ -4787,9 +4773,15 @@ opt_sp_for_loop_direction:
;
sp_for_loop_index_and_bounds:
- ident sp_for_loop_bounds
+ ident
+ {
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+ sp_for_loop_bounds
{
- if (unlikely(Lex->sp_for_loop_declarations(thd, &$$, &$1, $2)))
+ Lex->pop_select(); //main select
+ if (unlikely(Lex->sp_for_loop_declarations(thd, &$$, &$1, $3)))
MYSQL_YYABORT;
}
;
@@ -4835,8 +4827,11 @@ while_body:
LEX *lex= Lex;
if (unlikely(lex->sp_while_loop_expression(thd, $1)))
MYSQL_YYABORT;
- if (unlikely(lex->sphead->restore_lex(thd)))
+ Lex->pop_select(); //main select
+ if (lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
}
sp_proc_stmts1 END WHILE_SYM
{
@@ -4847,7 +4842,11 @@ while_body:
repeat_body:
sp_proc_stmts1 UNTIL_SYM
- { Lex->sphead->reset_lex(thd); }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr END REPEAT_SYM
{
LEX *lex= Lex;
@@ -4858,7 +4857,8 @@ repeat_body:
if (unlikely(i == NULL) ||
unlikely(lex->sphead->add_instr(i)))
MYSQL_YYABORT;
- if (unlikely(lex->sphead->restore_lex(thd)))
+ Lex->pop_select(); //main select
+ if (lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
/* We can shortcut the cont_backpatch here */
i->m_cont_dest= ip+1;
@@ -4886,6 +4886,8 @@ sp_labeled_control:
if (unlikely(Lex->sp_push_loop_label(thd, &$1)))
MYSQL_YYABORT;
Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
while_body pop_sp_loop_label
{ }
@@ -4937,6 +4939,8 @@ sp_unlabeled_control:
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
while_body
{
@@ -5338,26 +5342,16 @@ size_number:
*/
create_body:
- '(' create_field_list ')'
+ create_field_list_parens
{ Lex->create_info.option_list= NULL; }
opt_create_table_options opt_create_partitioning opt_create_select {}
| opt_create_table_options opt_create_partitioning opt_create_select {}
- /*
- the following rule is redundant, but there's a shift/reduce
- conflict that prevents the rule above from parsing a syntax like
- CREATE TABLE t1 (SELECT 1);
- */
- | '(' create_select_query_specification ')'
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_list {}
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_order_or_limit {}
| create_like
{
Lex->create_info.add(DDL_options_st::OPT_LIKE);
- TABLE_LIST *src_table= Lex->select_lex.add_table_to_list(thd,
- $1, NULL, 0, TL_READ, MDL_SHARED_READ);
+ TABLE_LIST *src_table= Lex->first_select_lex()->
+ add_table_to_list(thd, $1, NULL, 0, TL_READ, MDL_SHARED_READ);
if (unlikely(! src_table))
MYSQL_YYABORT;
/* CREATE TABLE ... LIKE is not allowed for views. */
@@ -5367,7 +5361,7 @@ create_body:
create_like:
LIKE table_ident { $$= $2; }
- | '(' LIKE table_ident ')' { $$= $3; }
+ | LEFT_PAREN_LIKE LIKE table_ident ')' { $$= $3; }
;
opt_create_select:
@@ -5381,23 +5375,19 @@ opt_create_select:
;
create_select_query_expression:
- opt_with_clause SELECT_SYM create_select_part2 opt_table_expression
- create_select_part4
- {
- Select->set_braces(0);
- Select->set_with_clause($1);
+ query_expression
+ {
+ if (Lex->parsed_insert_select($1->first_select()))
+ MYSQL_YYABORT;
}
- union_clause
- | opt_with_clause SELECT_SYM create_select_part2
- create_select_part3_union_not_ready create_select_part4
+ | LEFT_PAREN_WITH with_clause query_expression_no_with_clause ')'
{
- Select->set_with_clause($1);
+ SELECT_LEX *first_select= $3->first_select();
+ $3->set_with_clause($2);
+ $2->attach_to(first_select);
+ if (Lex->parsed_insert_select(first_select))
+ MYSQL_YYABORT;
}
- | '(' create_select_query_specification ')'
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_list {}
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_order_or_limit {}
;
opt_create_partitioning:
@@ -5480,13 +5470,17 @@ partition_entry:
thd->parse_error(ER_PARTITION_ENTRY_ERROR);
MYSQL_YYABORT;
}
- DBUG_ASSERT(Lex->part_info->table);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
/*
We enter here when opening the frm file to translate
partition info string into part_info data structure.
*/
}
- partition {}
+ partition
+ {
+ Lex->pop_select(); //main select
+ }
;
partition:
@@ -6135,58 +6129,6 @@ opt_versioning_interval_start:
End of partition parser part
*/
-create_select_query_specification:
- opt_with_clause SELECT_SYM create_select_part2 create_select_part3
- create_select_part4
- {
- Select->set_with_clause($1);
- if (Lex->check_cte_dependencies_and_resolve_references())
- MYSQL_YYABORT;
- }
- ;
-
-create_select_part2:
- {
- LEX *lex=Lex;
- if (lex->sql_command == SQLCOM_INSERT)
- lex->sql_command= SQLCOM_INSERT_SELECT;
- else if (lex->sql_command == SQLCOM_REPLACE)
- lex->sql_command= SQLCOM_REPLACE_SELECT;
- /*
- The following work only with the local list, the global list
- is created correctly in this case
- */
- lex->current_select->table_list.save_and_clear(&lex->save_list);
- mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LIST;
- }
- select_options select_item_list
- {
- Select->parsing_place= NO_MATTER;
- }
- ;
-
-create_select_part3:
- opt_table_expression
- | create_select_part3_union_not_ready
- ;
-
-create_select_part3_union_not_ready:
- table_expression order_or_limit
- | order_or_limit
- ;
-
-create_select_part4:
- opt_select_lock_type
- {
- /*
- The following work only with the local list, the global list
- is created correctly in this case
- */
- Lex->current_select->table_list.push_front(&Lex->save_list);
- }
- ;
-
opt_as:
/* empty */ {}
| AS {}
@@ -6414,7 +6356,7 @@ create_table_option:
}
| UNION_SYM opt_equal
{
- Lex->select_lex.table_list.save_and_clear(&Lex->save_list);
+ Lex->first_select_lex()->table_list.save_and_clear(&Lex->save_list);
}
'(' opt_table_list ')'
{
@@ -6423,8 +6365,8 @@ create_table_option:
from the global list.
*/
LEX *lex=Lex;
- lex->create_info.merge_list= lex->select_lex.table_list.first;
- lex->select_lex.table_list= lex->save_list;
+ lex->create_info.merge_list= lex->first_select_lex()->table_list.first;
+ lex->first_select_lex()->table_list= lex->save_list;
/*
When excluding union list from the global list we assume that
elements of the former immediately follow elements which represent
@@ -6527,7 +6469,7 @@ versioning_option:
{
if (DBUG_EVALUATE_IF("sysvers_force", 0, 1))
{
- my_error(ER_VERS_TEMPORARY, MYF(0));
+ my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
MYSQL_YYABORT;
}
}
@@ -6614,6 +6556,13 @@ create_field_list:
}
;
+create_field_list_parens:
+ LEFT_PAREN_ALT field_list ')'
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ }
+ ;
+
field_list:
field_list_item
| field_list ',' field_list_item
@@ -6624,6 +6573,7 @@ field_list_item:
| key_def
| constraint_def
| period_for_system_time
+ | PERIOD_SYM period_for_application_time { }
;
column_def:
@@ -6720,7 +6670,7 @@ key_def:
constraint_def:
opt_constraint check_constraint
{
- Lex->add_constraint(&$1, $2, FALSE);
+ Lex->add_constraint($1, $2, FALSE);
}
;
@@ -6729,7 +6679,15 @@ period_for_system_time:
PERIOD_SYM FOR_SYSTEM_TIME_SYM '(' ident ',' ident ')'
{
Vers_parse_info &info= Lex->vers_get_info();
- info.set_system_time($4, $6);
+ info.set_period($4, $6);
+ }
+ ;
+
+period_for_application_time:
+ FOR_SYM ident '(' ident ',' ident ')'
+ {
+ if (Lex->add_period($2, $4, $6))
+ MYSQL_YYABORT;
}
;
@@ -6919,6 +6877,8 @@ parse_vcol_expr:
Prevent the end user from invoking this command.
*/
MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
}
expr
{
@@ -6926,17 +6886,12 @@ parse_vcol_expr:
if (unlikely(!v))
MYSQL_YYABORT;
Lex->last_field->vcol_info= v;
+ Lex->pop_select(); //main select
}
;
parenthesized_expr:
- subselect
- {
- $$= new (thd->mem_root) Item_singlerow_subselect(thd, $1);
- if (unlikely($$ == NULL))
- MYSQL_YYABORT;
- }
- | expr
+ expr
| expr ',' expr_list
{
$3->push_front($1, thd->mem_root);
@@ -6955,6 +6910,16 @@ virtual_column_func:
MYSQL_YYABORT;
$$= v;
}
+ | subquery
+ {
+ Item *item;
+ if (!(item= new (thd->mem_root) Item_singlerow_subselect(thd, $1)))
+ MYSQL_YYABORT;
+ Virtual_column_info *v= add_virtual_expression(thd, item);
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ $$= v;
+ }
;
expr_or_literal: column_default_non_parenthesized_expr | signed_literal ;
@@ -7194,7 +7159,7 @@ field_type_lob:
| JSON_SYM opt_compressed
{
Lex->charset= &my_charset_utf8mb4_bin;
- $$.set(&type_handler_long_blob);
+ $$.set(&type_handler_json_longtext);
}
;
@@ -7925,23 +7890,25 @@ alter:
Lex->name= null_clex_str;
Lex->table_type= TABLE_TYPE_UNKNOWN;
Lex->sql_command= SQLCOM_ALTER_TABLE;
- Lex->duplicates= DUP_ERROR;
- Lex->select_lex.init_order();
+ Lex->duplicates= DUP_ERROR;
+ Lex->first_select_lex()->order_list.empty();
Lex->create_info.init();
Lex->create_info.row_type= ROW_TYPE_NOT_USED;
Lex->alter_info.reset();
Lex->no_write_to_binlog= 0;
Lex->create_info.storage_media= HA_SM_DEFAULT;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
DBUG_ASSERT(!Lex->m_sql_cmd);
}
alter_options TABLE_SYM table_ident opt_lock_wait_timeout
{
- if (unlikely(!Lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_UPDATING,
- TL_READ_NO_INSERT,
- MDL_SHARED_UPGRADABLE)))
+ if (!Lex->first_select_lex()->
+ add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING,
+ TL_READ_NO_INSERT, MDL_SHARED_UPGRADABLE))
MYSQL_YYABORT;
- Lex->select_lex.db= (Lex->select_lex.table_list.first)->db;
+ Lex->first_select_lex()->db=
+ (Lex->first_select_lex()->table_list.first)->db;
Lex->create_last_non_select_table= Lex->last_table();
Lex->mark_first_table_as_inserting();
}
@@ -7954,11 +7921,14 @@ alter:
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
+ Lex->pop_select(); //main select
}
| ALTER DATABASE ident_or_empty
{
Lex->create_info.default_table_charset= NULL;
Lex->create_info.used_fields= 0;
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
create_database_options
{
@@ -7968,6 +7938,7 @@ alter:
if (lex->name.str == NULL &&
unlikely(lex->copy_db_to(&lex->name)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
}
| ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM
{
@@ -7983,6 +7954,8 @@ alter:
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE"));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
lex->sp_chistics.init();
}
sp_a_chistics
@@ -7991,6 +7964,9 @@ alter:
lex->sql_command= SQLCOM_ALTER_PROCEDURE;
lex->spname= $3;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
| ALTER FUNCTION_SYM sp_name
{
@@ -7998,6 +7974,8 @@ alter:
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "FUNCTION"));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
lex->sp_chistics.init();
}
sp_a_chistics
@@ -8006,14 +7984,23 @@ alter:
lex->sql_command= SQLCOM_ALTER_FUNCTION;
lex->spname= $3;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
| ALTER view_algorithm definer_opt opt_view_suid VIEW_SYM table_ident
{
- if (unlikely(Lex->add_alter_view(thd, $2, $4, $6)))
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, $2, $4, $6))
MYSQL_YYABORT;
}
view_list_opt AS view_select
- {}
+ {
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
| ALTER definer_opt opt_view_suid VIEW_SYM table_ident
/*
We have two separate rules for ALTER VIEW rather that
@@ -8021,14 +8008,22 @@ alter:
with the ALTER EVENT below.
*/
{
- if (unlikely(Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, $3, $5)))
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, $3, $5))
MYSQL_YYABORT;
}
view_list_opt AS view_select
- {}
+ {
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
| ALTER definer_opt remember_name EVENT_SYM sp_name
{
- /*
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ /*
It is safe to use Lex->spname because
ALTER EVENT xxx RENATE TO yyy DO ALTER EVENT RENAME TO
is not allowed. Lex->spname is used in the case of RENAME TO
@@ -8060,6 +8055,8 @@ alter:
*/
Lex->sql_command= SQLCOM_ALTER_EVENT;
Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();
+
+ Lex->pop_select(); //main select
}
| ALTER TABLESPACE alter_tablespace_info
{
@@ -8089,7 +8086,7 @@ alter:
} OPTIONS_SYM '(' server_options_list ')' { }
/* ALTER USER foo is allowed for MySQL compatibility. */
| ALTER USER_SYM opt_if_exists clear_privileges grant_list
- opt_require_clause opt_resource_options
+ opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration
{
Lex->create_info.set($3);
Lex->sql_command= SQLCOM_ALTER_USER;
@@ -8103,16 +8100,17 @@ alter:
lex->create_info.init();
lex->no_write_to_binlog= 0;
DBUG_ASSERT(!lex->m_sql_cmd);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
}
table_ident
{
LEX *lex= Lex;
- if (unlikely(!(lex->create_info.seq_create_info=
- new (thd->mem_root) sequence_definition())) ||
- unlikely(!lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_SEQUENCE,
- TL_WRITE,
- MDL_EXCLUSIVE)))
+ if (!(lex->create_info.seq_create_info= new (thd->mem_root)
+ sequence_definition()) ||
+ !lex->first_select_lex()->
+ add_table_to_list(thd, $5, NULL, TL_OPTION_SEQUENCE,
+ TL_WRITE, MDL_EXCLUSIVE))
MYSQL_YYABORT;
}
sequence_defs
@@ -8121,9 +8119,52 @@ alter:
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence($3);
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+ ;
+
+account_locking_option:
+ LOCK_SYM
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_LOCKED;
+ }
+ | UNLOCK_SYM
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_UNLOCKED;
}
;
+opt_password_expire_option:
+ /* empty */
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NOW;
+ }
+ | NEVER_SYM
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NEVER;
+ }
+ | DEFAULT
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_DEFAULT;
+ }
+ | INTERVAL_SYM NUM DAY_SYM
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_INTERVAL;
+ if (!(Lex->account_options.num_expiration_days= atoi($2.str)))
+ my_yyabort_error((ER_WRONG_VALUE, MYF(0), "DAY", $2.str));
+ }
+ ;
+
+opt_account_locking_and_opt_password_expiration:
+ /* empty */
+ | ACCOUNT_SYM account_locking_option
+ | PASSWORD_SYM EXPIRE_SYM opt_password_expire_option
+ | ACCOUNT_SYM account_locking_option PASSWORD_SYM EXPIRE_SYM opt_password_expire_option
+ | PASSWORD_SYM EXPIRE_SYM opt_password_expire_option ACCOUNT_SYM account_locking_option
+ ;
+
ev_alter_on_schedule_completion:
/* empty */ { $$= 0;}
| ON SCHEDULE_SYM ev_schedule_time { $$= 1; }
@@ -8269,22 +8310,7 @@ alter_commands:
| EXCHANGE_SYM PARTITION_SYM alt_part_name_item
WITH TABLE_SYM table_ident have_partitioning
{
- LEX *lex= thd->lex;
- lex->select_lex.db= $6->db;
- if (lex->select_lex.db.str == NULL &&
- unlikely(lex->copy_db_to(&lex->select_lex.db)))
- MYSQL_YYABORT;
- lex->name= $6->table;
- lex->alter_info.partition_flags|= ALTER_PARTITION_EXCHANGE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $6, NULL,
- TL_OPTION_UPDATING,
- TL_READ_NO_INSERT,
- MDL_SHARED_NO_WRITE)))
- MYSQL_YYABORT;
- DBUG_ASSERT(!lex->m_sql_cmd);
- lex->m_sql_cmd= new (thd->mem_root)
- Sql_cmd_alter_table_exchange_partition();
- if (unlikely(lex->m_sql_cmd == NULL))
+ if (Lex->stmt_alter_table_exchange_partition($6))
MYSQL_YYABORT;
}
;
@@ -8408,6 +8434,13 @@ alter_list_item:
{
Lex->alter_info.flags|= ALTER_ADD_PERIOD;
}
+ | ADD
+ PERIOD_SYM opt_if_not_exists_table_element period_for_application_time
+ {
+ Table_period_info &period= Lex->create_info.period_info;
+ period.create_if_not_exists= Lex->check_exists;
+ Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
+ }
| add_column '(' create_field_list ')'
{
LEX *lex=Lex;
@@ -8422,7 +8455,7 @@ alter_list_item:
| ADD CONSTRAINT IF_SYM not EXISTS field_ident check_constraint
{
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
- Lex->add_constraint(&$6, $7, TRUE);
+ Lex->add_constraint($6, $7, TRUE);
}
| CHANGE opt_column opt_if_exists_table_element field_ident
field_spec opt_place
@@ -8520,9 +8553,9 @@ alter_list_item:
| RENAME opt_to table_ident
{
LEX *lex=Lex;
- lex->select_lex.db= $3->db;
- if (lex->select_lex.db.str == NULL &&
- unlikely(lex->copy_db_to(&lex->select_lex.db)))
+ lex->first_select_lex()->db= $3->db;
+ if (lex->first_select_lex()->db.str == NULL &&
+ lex->copy_db_to(&lex->first_select_lex()->db))
MYSQL_YYABORT;
if (unlikely(check_table_name($3->table.str,$3->table.length,
FALSE)) ||
@@ -8543,7 +8576,7 @@ alter_list_item:
$5->name, $4->csname));
if (unlikely(Lex->create_info.add_alter_list_item_convert_to_charset($5)))
MYSQL_YYABORT;
- Lex->alter_info.flags|= ALTER_OPTIONS;
+ Lex->alter_info.flags|= ALTER_CONVERT_TO;
}
| create_table_options_space_separated
{
@@ -8575,6 +8608,14 @@ alter_list_item:
{
Lex->alter_info.flags|= ALTER_DROP_PERIOD;
}
+ | DROP PERIOD_SYM opt_if_exists_table_element FOR_SYM ident
+ {
+ Alter_drop *ad= new Alter_drop(Alter_drop::PERIOD, $5.str, $3);
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ Lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ Lex->alter_info.flags|= ALTER_DROP_CHECK_CONSTRAINT;
+ }
;
opt_index_lock_algorithm:
@@ -8644,7 +8685,6 @@ alter_option:
}
;
-
opt_restrict:
/* empty */ { Lex->drop_mode= DROP_DEFAULT; }
| RESTRICT { Lex->drop_mode= DROP_RESTRICT; }
@@ -8923,6 +8963,7 @@ persistent_column_stat_spec:
}
table_column_list
')'
+ { }
;
persistent_index_stat_spec:
@@ -8936,6 +8977,7 @@ persistent_index_stat_spec:
}
table_index_list
')'
+ { }
;
table_column_list:
@@ -9078,9 +9120,13 @@ rename:
RENAME table_or_tables
{
Lex->sql_command= SQLCOM_RENAME_TABLE;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
}
table_to_table_list
- {}
+ {
+ Lex->pop_select(); //main select
+ }
| RENAME USER_SYM clear_privileges rename_list
{
Lex->sql_command = SQLCOM_RENAME_USER;
@@ -9178,9 +9224,13 @@ preload:
LEX *lex=Lex;
lex->sql_command=SQLCOM_PRELOAD_KEYS;
lex->alter_info.reset();
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
}
preload_list_or_parts
- {}
+ {
+ Lex->pop_select(); //main select
+ }
;
preload_list_or_parts:
@@ -9225,8 +9275,8 @@ adm_partition:
cache_keys_spec:
{
- Lex->select_lex.alloc_index_hints(thd);
- Select->set_index_hint_type(INDEX_HINT_USE,
+ Lex->first_select_lex()->alloc_index_hints(thd);
+ Select->set_index_hint_type(INDEX_HINT_USE,
INDEX_HINT_MASK_ALL);
}
cache_key_list_or_empty
@@ -9249,245 +9299,387 @@ opt_ignore_leaves:
select:
- opt_with_clause select_init
+ query_expression_no_with_clause
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SELECT;
- lex->current_select->set_with_clause($1);
- if (Lex->check_cte_dependencies_and_resolve_references())
+ if (Lex->push_select($1->fake_select_lex ?
+ $1->fake_select_lex :
+ $1->first_select()))
+ MYSQL_YYABORT;
+ }
+ opt_procedure_or_into
+ {
+ Lex->pop_select();
+ $1->set_with_clause(NULL);
+ if (Lex->select_finalize($1, $3))
+ MYSQL_YYABORT;
+ }
+ | with_clause query_expression_no_with_clause
+ {
+ if (Lex->push_select($2->fake_select_lex ?
+ $2->fake_select_lex :
+ $2->first_select()))
+ MYSQL_YYABORT;
+ }
+ opt_procedure_or_into
+ {
+ Lex->pop_select();
+ $2->set_with_clause($1);
+ $1->attach_to($2->first_select());
+ if (Lex->select_finalize($2, $4))
MYSQL_YYABORT;
}
;
-select_init:
- SELECT_SYM select_options_and_item_list select_init3
- | table_value_constructor
- | table_value_constructor union_list
- | table_value_constructor union_order_or_limit
- | '(' select_paren ')'
- | '(' select_paren ')' union_list
- | '(' select_paren ')' union_order_or_limit
- ;
-
-union_list_part2:
- SELECT_SYM select_options_and_item_list select_init3_union_query_term
- | table_value_constructor
- | table_value_constructor union_list
- | table_value_constructor union_order_or_limit
- | '(' select_paren_union_query_term ')'
- | '(' select_paren_union_query_term ')' union_list
- | '(' select_paren_union_query_term ')' union_order_or_limit
- ;
-
-select_paren:
+select_into:
+ select_into_query_specification
{
- Lex->current_select->set_braces(true);
+ if (Lex->push_select($1))
+ MYSQL_YYABORT;
}
- table_value_constructor select_part3
+ opt_order_limit_lock
{
- DBUG_ASSERT(Lex->current_select->braces);
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit($1)))
+ MYSQL_YYABORT;
+ if ($3)
+ unit= Lex->add_tail_to_query_expression_body(unit, $3);
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
}
- |
+ | with_clause
+ select_into_query_specification
{
- /*
- In order to correctly parse UNION's global ORDER BY we need to
- set braces before parsing the clause.
- */
- Lex->current_select->set_braces(true);
+ if (Lex->push_select($2))
+ MYSQL_YYABORT;
}
- SELECT_SYM select_options_and_item_list select_part3
- opt_select_lock_type
+ opt_order_limit_lock
{
- DBUG_ASSERT(Lex->current_select->braces);
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit($2)))
+ MYSQL_YYABORT;
+ if ($4)
+ unit= Lex->add_tail_to_query_expression_body(unit, $4);
+ unit->set_with_clause($1);
+ $1->attach_to($2);
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
}
- | '(' select_paren ')'
;
-select_parent_union_query_term_proper:
- SELECT_SYM select_options_and_item_list select_part3_union_query_term
- opt_select_lock_type
- | table_value_constructor select_part3_union_query_term
+simple_table:
+ query_specification { $$= $1; }
+ | table_value_constructor { $$= $1; }
;
-select_paren_union_query_term:
+table_value_constructor:
+ VALUES
+ {
+ if (Lex->parsed_TVC_start())
+ MYSQL_YYABORT;
+ }
+ values_list
+ {
+ if (!($$= Lex->parsed_TVC_end()))
+ MYSQL_YYABORT;
+ }
+ ;
+
+query_specification_start:
+ SELECT_SYM
{
- /*
- In order to correctly parse UNION's global ORDER BY we need to
- set braces before parsing the clause.
- */
- Lex->current_select->set_braces(true);
+ SELECT_LEX *sel;
+ LEX *lex= Lex;
+ if (!(sel= lex->alloc_select(TRUE)) ||
+ lex->push_select(sel))
+ MYSQL_YYABORT;
+ sel->init_select();
+ sel->braces= FALSE;
}
- select_parent_union_query_term_proper
+ select_options
{
- DBUG_ASSERT(Lex->current_select->braces);
+ Select->parsing_place= SELECT_LIST;
}
- | '(' select_paren_union_query_term ')'
- ;
-
-select_parent_view_proper:
- SELECT_SYM select_options_and_item_list select_part3_view
- opt_select_lock_type
- | table_value_constructor select_part3_view
- ;
+ select_item_list
+ {
+ Select->parsing_place= NO_MATTER;
+ }
+ ;
-select_paren_view:
+query_specification:
+ query_specification_start
+ opt_from_clause
+ opt_where_clause
+ opt_group_clause
+ opt_having_clause
+ opt_window_clause
{
- /*
- In order to correctly parse UNION's global ORDER BY we need to
- set braces before parsing the clause.
- */
- Lex->current_select->set_braces(true);
+ $$= Lex->pop_select();
}
- select_parent_view_proper
+ ;
+
+select_into_query_specification:
+ query_specification_start
+ into
+ opt_from_clause
+ opt_where_clause
+ opt_group_clause
+ opt_having_clause
+ opt_window_clause
{
- DBUG_ASSERT(Lex->current_select->braces);
+ $$= Lex->pop_select();
}
- | '(' select_paren_view ')'
;
-/* The equivalent of select_paren for nested queries. */
-select_paren_derived:
+/**
+
+ The following grammar for query expressions conformant to
+ the latest SQL Standard is supported:
+
+ <query expression> ::=
+ [ <with clause> ] <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+
+ <with clause> ::=
+ WITH [ RECURSIVE ] <with_list
+
+ <with list> ::=
+ <with list element> [ { <comma> <with list element> }... ]
+
+ <with list element> ::=
+ <query name> [ '(' <with column list> ')' ]
+ AS <table subquery>
+
+ <with column list> ::=
+ <column name list>
+
+ <query expression body> ::
+ <query term>
+ | <query expression body> UNION [ ALL | DISTINCT ] <query term>
+ | <query expression body> EXCEPT [ DISTINCT ] <query term>
+
+ <query term> ::=
+ <query primary>
+ | <query term> INTERSECT [ DISTINCT ] <query primary>
+
+ <query primary> ::=
+ <simple table>
+ | '(' <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+ ')'
+
+ <simple table>
+ <query specification>
+ | <table value constructor>
+
+ <subquery>
+ '(' <query_expression> ')'
+
+*/
+
+/*
+ query_expression produces the same expressions as
+ <query expression>
+*/
+
+query_expression:
+ query_expression_no_with_clause
{
- Lex->current_select->set_braces(true);
+ $1->set_with_clause(NULL);
+ $$= $1;
}
- table_value_constructor
+ | with_clause
+ query_expression_no_with_clause
{
- DBUG_ASSERT(Lex->current_select->braces);
- $$= Lex->current_select->master_unit()->first_select();
+ $2->set_with_clause($1);
+ $1->attach_to($2->first_select());
+ $$= $2;
}
- |
+ ;
+
+/*
+ query_expression_no_with_clause produces the same expressions as
+ <query expression> without [ <with clause> ]
+*/
+
+query_expression_no_with_clause:
+ query_expression_body_ext { $$= $1; }
+ | query_expression_body_ext_parens { $$= $1; }
+ ;
+
+/*
+ query_expression_body_ext produces the same expressions as
+ <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+ | '('... <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+ ')'...
+ Note: number of ')' must be equal to the number of '(' in the rule above
+*/
+
+query_expression_body_ext:
+ query_expression_body
{
- Lex->current_select->set_braces(true);
+ if ($1->first_select()->next_select())
+ {
+ if (Lex->parsed_multi_operand_query_expression_body($1))
+ MYSQL_YYABORT;
+ }
}
- SELECT_SYM select_part2_derived
- opt_table_expression
- opt_order_clause
- opt_limit_clause
- opt_select_lock_type
+ opt_query_expression_tail
{
- DBUG_ASSERT(Lex->current_select->braces);
- $$= Lex->current_select->master_unit()->first_select();
+ if (!$3)
+ $$= $1;
+ else
+ $$= Lex->add_tail_to_query_expression_body($1, $3);
}
- | '(' select_paren_derived ')' { $$= $2; }
- ;
-
-select_init3:
- opt_table_expression
- opt_select_lock_type
+ | query_expression_body_ext_parens
{
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
+ Lex->push_select(!$1->first_select()->next_select() ?
+ $1->first_select() : $1->fake_select_lex);
}
- union_clause
- | select_part3_union_not_ready
- opt_select_lock_type
+ query_expression_tail
{
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
+ if (!($$= Lex->add_tail_to_query_expression_body_ext_parens($1, $3)))
+ MYSQL_YYABORT;
}
;
-
-select_init3_union_query_term:
- opt_table_expression
- opt_select_lock_type
+query_expression_body_ext_parens:
+ '(' query_expression_body_ext_parens ')'
+ { $$= $2; }
+ | '(' query_expression_body_ext ')'
{
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
- }
- union_clause
- | select_part3_union_not_ready_noproc
- opt_select_lock_type
- {
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
+ SELECT_LEX *sel= $2->first_select()->next_select() ?
+ $2->fake_select_lex : $2->first_select();
+ sel->braces= true;
+ $$= $2;
}
;
+/*
+ query_expression_body produces the same expressions as
+ <query expression body>
+*/
-select_init3_view:
- opt_table_expression opt_select_lock_type
+query_expression_body:
+ query_simple
{
- Lex->current_select->set_braces(false);
+ Lex->push_select($1);
+ if (!($$= Lex->create_unit($1)))
+ MYSQL_YYABORT;
}
- | opt_table_expression opt_select_lock_type
+ | query_expression_body
+ unit_type_decl
{
- Lex->current_select->set_braces(false);
+ if (!$1->first_select()->next_select())
+ {
+ Lex->pop_select();
+ }
}
- union_list_view
- | order_or_limit opt_select_lock_type
+ query_primary
{
- Lex->current_select->set_braces(false);
+ if (!($$= Lex->add_primary_to_query_expression_body($1, $4,
+ $2.unit_type,
+ $2.distinct,
+ FALSE)))
+ MYSQL_YYABORT;
}
- | table_expression order_or_limit opt_select_lock_type
+ | query_expression_body_ext_parens
+ unit_type_decl
+ query_primary
{
- Lex->current_select->set_braces(false);
+ if (!($$= Lex->add_primary_to_query_expression_body_ext_parens(
+ $1, $3,
+ $2.unit_type,
+ $2.distinct)))
+ MYSQL_YYABORT;
}
;
/*
- The SELECT parts after select_item_list that cannot be followed by UNION.
+ query_primary produces the same expressions as
+ <query primary>
*/
-select_part3:
- opt_table_expression
- | select_part3_union_not_ready
+query_primary:
+ query_simple
+ { $$= $1; }
+ | query_expression_body_ext_parens
+ { $$= $1->first_select(); }
;
-select_part3_union_query_term:
- opt_table_expression
- | select_part3_union_not_ready_noproc
- ;
+/*
+ query_simple produces the same expressions as
+ <simple table>
+*/
-select_part3_view:
- opt_table_expression
- | order_or_limit
- | table_expression order_or_limit
+query_simple:
+ simple_table { $$= $1;}
;
-select_part3_union_not_ready:
- select_part3_union_not_ready_noproc
- | table_expression procedure_clause
- | table_expression order_or_limit procedure_clause
+subselect:
+ query_expression
+ {
+ if (!($$= Lex->parsed_subselect($1)))
+ MYSQL_YYABORT;
+ }
;
-select_part3_union_not_ready_noproc:
- order_or_limit
- | into opt_table_expression opt_order_clause opt_limit_clause
- | table_expression into
- | table_expression order_or_limit
- | table_expression order_or_limit into
- ;
+/*
+ subquery produces the same expressions as
+ <subquery>
+
+ Consider the production rule of the SQL Standard
+ subquery:
+ '(' query_expression')'
+
+ This rule is equivalent to the rule
+ subquery:
+ '(' query_expression_no_with_clause ')'
+ | '(' with_clause query_expression_no_with_clause ')'
+ that in its turn is equivalent to
+ subquery:
+ '(' query_expression_body_ext ')'
+ | query_expression_body_ext_parens
+ | '(' with_clause query_expression_no_with_clause ')'
+
+ The latter can be re-written into
+ subquery:
+ query_expression_body_ext_parens ')'
+ | '(' with_clause query_expression_no_with_clause ')'
+
+ The last rule allows us to resolve properly the shift/reduce conflict
+ when subquery is used in expressions such as in the following queries
+ select (select * from t1 limit 1) + t2.a from t2
+ select * from t1 where t1.a [not] in (select t2.a from t2)
+
+ In the rule below %prec SUBQUERY_AS_EXPR forces the parser to perform a shift
+ operation rather then a reduce operation when ')' is encountered and can be
+ considered as the last symbol a query expression.
+*/
-select_options_and_item_list:
+subquery:
+ query_expression_body_ext_parens %prec SUBQUERY_AS_EXPR
{
- LEX *lex= Lex;
- SELECT_LEX *sel= lex->current_select;
- if (sel->linkage != UNION_TYPE)
- mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LIST;
+ if (!$1->fake_select_lex)
+ $1->first_select()->braces= false;
+ else
+ $1->fake_select_lex->braces= false;
+ if (!($$= Lex->parsed_subselect($1)))
+ MYSQL_YYABORT;
}
- select_options select_item_list
+ | '(' with_clause query_expression_no_with_clause ')'
{
- Select->parsing_place= NO_MATTER;
+ $3->set_with_clause($2);
+ $2->attach_to($3->first_select());
+ if (!($$= Lex->parsed_subselect($3)))
+ MYSQL_YYABORT;
}
;
-
-/**
- <table expression>, as in the SQL standard.
-*/
-table_expression:
- from_clause
- opt_where_clause
- opt_group_clause
- opt_having_clause
- opt_window_clause
- ;
-
-opt_table_expression:
- /* Empty */
- | table_expression
+opt_from_clause:
+ /* empty */ %prec EMPTY_FROM_CLAUSE
+ | from_clause
;
from_clause:
@@ -9537,8 +9729,9 @@ history_point:
TIMESTAMP TEXT_STRING
{
Item *item;
- if (!(item= create_temporal_literal(thd, $2.str, $2.length, YYCSCL,
- MYSQL_TYPE_DATETIME, true)))
+ if (!(item= type_handler_datetime.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true)))
MYSQL_YYABORT;
$$= Vers_history_point(VERS_TIMESTAMP, item);
}
@@ -9552,6 +9745,33 @@ history_point:
}
;
+for_portion_of_time_clause:
+ FOR_SYM PORTION_SYM OF_SYM remember_tok_start ident FROM
+ bit_expr TO_SYM bit_expr
+ {
+ if (unlikely(0 == strcasecmp($5.str, "SYSTEM_TIME")))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, $4);
+ MYSQL_YYABORT;
+ }
+ Lex->period_conditions.init(SYSTEM_TIME_FROM_TO,
+ Vers_history_point(VERS_TIMESTAMP, $7),
+ Vers_history_point(VERS_TIMESTAMP, $9),
+ $5);
+ }
+ ;
+
+opt_for_portion_of_time_clause:
+ /* empty */
+ {
+ $$= false;
+ }
+ | for_portion_of_time_clause
+ {
+ $$= true;
+ }
+ ;
+
opt_for_system_time_clause:
/* empty */
{
@@ -9591,59 +9811,70 @@ select_option:
query_expression_option
| SQL_NO_CACHE_SYM
{
- /*
- Allow this flag only on the first top-level SELECT statement, if
- SQL_CACHE wasn't specified, and only once per query.
- */
- if (unlikely(Lex->current_select != &Lex->select_lex))
- my_yyabort_error((ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_NO_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_CACHE))
- my_yyabort_error((ER_WRONG_USAGE, MYF(0), "SQL_CACHE", "SQL_NO_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_NO_CACHE))
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_NO_QUERY_CACHE)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_NO_CACHE"));
-
- Lex->safe_to_cache_query=0;
- Lex->select_lex.options&= ~OPTION_TO_QUERY_CACHE;
- Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE;
+ Select->options|= OPTION_NO_QUERY_CACHE;
}
| SQL_CACHE_SYM
{
- /*
- Allow this flag only on the first top-level SELECT statement, if
- SQL_NO_CACHE wasn't specified, and only once per query.
- */
- if (unlikely(Lex->current_select != &Lex->select_lex))
- my_yyabort_error((ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_NO_CACHE))
- my_yyabort_error((ER_WRONG_USAGE, MYF(0), "SQL_NO_CACHE", "SQL_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_CACHE))
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_TO_QUERY_CACHE)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_CACHE"));
-
- Lex->safe_to_cache_query=1;
- Lex->select_lex.options|= OPTION_TO_QUERY_CACHE;
- Lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE;
+ Select->options|= OPTION_TO_QUERY_CACHE;
}
;
-opt_select_lock_type:
- /* empty */
- | FOR_SYM UPDATE_SYM opt_lock_wait_timeout
+
+select_lock_type:
+ FOR_SYM UPDATE_SYM opt_lock_wait_timeout_new
{
- LEX *lex=Lex;
- lex->current_select->lock_type= TL_WRITE;
- lex->current_select->set_lock_for_tables(TL_WRITE, false);
- lex->safe_to_cache_query=0;
+ $$= $3;
+ $$.defined_lock= TRUE;
+ $$.update_lock= TRUE;
}
- | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout
+ | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout_new
{
- LEX *lex=Lex;
- lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS;
- lex->current_select->
- set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
- lex->safe_to_cache_query=0;
+ $$= $5;
+ $$.defined_lock= TRUE;
+ $$.update_lock= FALSE;
}
;
+
+opt_select_lock_type:
+ /* empty */
+ {
+ $$.empty();
+ }
+ | select_lock_type
+ {
+ $$= $1;
+ }
+ ;
+
+
+opt_lock_wait_timeout_new:
+ /* empty */
+ {
+ $$.empty();
+ }
+ | WAIT_SYM ulong_num
+ {
+ $$.defined_timeout= TRUE;
+ $$.timeout= $2;
+ }
+ | NOWAIT_SYM
+ {
+ $$.defined_timeout= TRUE;
+ $$.timeout= 0;
+ }
+ ;
+
select_item_list:
select_item_list ',' select_item
| select_item
@@ -9693,12 +9924,6 @@ remember_tok_start:
}
;
-remember_tok_end:
- {
- $$= (char*) YYLIP->get_tok_end();
- }
- ;
-
remember_name:
{
$$= (char*) YYLIP->get_cpp_tok_start();
@@ -9915,19 +10140,19 @@ expr:
;
predicate:
- predicate IN_SYM '(' subselect ')'
+ predicate IN_SYM subquery
{
- $$= new (thd->mem_root) Item_in_subselect(thd, $1, $4);
- if (unlikely($$ == NULL))
+ $$= new (thd->mem_root) Item_in_subselect(thd, $1, $3);
+ if (unlikely(!$$))
MYSQL_YYABORT;
}
- | predicate not IN_SYM '(' subselect ')'
+ | predicate not IN_SYM subquery
{
- Item *item= new (thd->mem_root) Item_in_subselect(thd, $1, $5);
- if (unlikely(item == NULL))
+ Item *item= new (thd->mem_root) Item_in_subselect(thd, $1, $4);
+ if (unlikely(!item))
MYSQL_YYABORT;
$$= negate_expression(thd, item);
- if (unlikely($$ == NULL))
+ if (unlikely(!$$))
MYSQL_YYABORT;
}
| predicate IN_SYM '(' expr ')'
@@ -10325,7 +10550,21 @@ column_default_non_parenthesized_expr:
| param_marker { $$= $1; }
| variable
| sum_expr
+ {
+ if (!Lex->select_stack_top)
+ {
+ my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
| window_func_expr
+ {
+ if (!Lex->select_stack_top)
+ {
+ my_error(ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
| inverse_distribution_function
| ROW_SYM '(' expr ',' expr_list ')'
{
@@ -10441,6 +10680,11 @@ primary_expr:
column_default_non_parenthesized_expr
| explicit_cursor_attr
| '(' parenthesized_expr ')' { $$= $2; }
+ | subquery
+ {
+ if (!($$= Lex->create_item_query_expression(thd, $1->master_unit())))
+ MYSQL_YYABORT;
+ }
;
string_factor_expr:
@@ -10504,7 +10748,7 @@ function_call_keyword_timestamp:
}
| TIMESTAMP '(' expr ',' expr ')'
{
- $$= new (thd->mem_root) Item_func_add_time(thd, $3, $5, 1, 0);
+ $$= new (thd->mem_root) Item_func_timestamp(thd, $3, $5);
if (unlikely($$ == NULL))
MYSQL_YYABORT;
}
@@ -11485,6 +11729,19 @@ window_func:
simple_window_func
|
sum_expr
+ |
+ function_call_generic
+ {
+ Item* item = (Item*)$1;
+ /* Only UDF aggregate here possible */
+ if ((item == NULL) ||
+ (item->type() != Item::SUM_FUNC_ITEM)
+ || (((Item_sum *)item)->sum_func() != Item_sum::UDF_SUM_FUNC))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
;
simple_window_func:
@@ -11839,6 +12096,10 @@ cast_type_temporal:
DATE_SYM { $$.set(&type_handler_newdate); }
| TIME_SYM opt_field_length { $$.set(&type_handler_time2, 0, $2); }
| DATETIME opt_field_length { $$.set(&type_handler_datetime2, 0, $2); }
+ | INTERVAL_SYM DAY_SECOND_SYM field_length
+ {
+ $$.set(&type_handler_interval_DDhhmmssff, 0, $3);
+ }
;
opt_expr_list:
@@ -11849,9 +12110,7 @@ opt_expr_list:
expr_list:
expr
{
- $$= new (thd->mem_root) List<Item>;
- if (unlikely($$ == NULL) ||
- unlikely($$->push_back($1, thd->mem_root)))
+ if (unlikely(!($$= List<Item>::make(thd->mem_root, $1))))
MYSQL_YYABORT;
}
| expr_list ',' expr
@@ -11963,10 +12222,15 @@ esc_table_ref:
/* Equivalent to <table reference list> in the SQL:2003 standard. */
/* Warning - may return NULL in case of incomplete SELECT */
derived_table_list:
- esc_table_ref { $$=$1; }
+ esc_table_ref
+ {
+ $$=$1;
+ Select->add_joined_table($1);
+ }
| derived_table_list ',' esc_table_ref
{
MYSQL_YYABORT_UNLESS($1 && ($$=$3));
+ Select->add_joined_table($3);
}
;
@@ -11977,15 +12241,9 @@ derived_table_list:
*/
join_table:
/* INNER JOIN variants */
- /*
- Use %prec to evaluate production 'table_ref' before 'normal_join'
- so that [INNER | CROSS] JOIN is properly nested as other
- left-associative joins.
- */
table_ref normal_join table_ref %prec CONDITIONLESS_JOIN
{
MYSQL_YYABORT_UNLESS($1 && ($$=$3));
-
if (unlikely(Select->add_cross_joined_table($1, $3, $2)))
MYSQL_YYABORT;
}
@@ -11993,6 +12251,8 @@ join_table:
ON
{
MYSQL_YYABORT_UNLESS($1 && $3);
+ Select->add_joined_table($1);
+ Select->add_joined_table($3);
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, $1, $3)))
MYSQL_YYABORT;
@@ -12000,7 +12260,7 @@ join_table:
}
expr
{
- $3->straight=$2;
+ $3->straight=$2;
add_join_on(thd, $3, $6);
$3->on_context= Lex->pop_context();
Select->parsing_place= NO_MATTER;
@@ -12009,6 +12269,8 @@ join_table:
USING
{
MYSQL_YYABORT_UNLESS($1 && $3);
+ Select->add_joined_table($1);
+ Select->add_joined_table($3);
}
'(' using_list ')'
{
@@ -12019,6 +12281,8 @@ join_table:
| table_ref NATURAL inner_join table_factor
{
MYSQL_YYABORT_UNLESS($1 && ($$=$4));
+ Select->add_joined_table($1);
+ Select->add_joined_table($4);
$4->straight=$3;
add_join_natural($1,$4,NULL,Select);
}
@@ -12028,6 +12292,8 @@ join_table:
ON
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, $1, $5)))
MYSQL_YYABORT;
@@ -12044,6 +12310,8 @@ join_table:
| table_ref LEFT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
}
USING '(' using_list ')'
{
@@ -12054,6 +12322,8 @@ join_table:
| table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $6);
+ Select->add_joined_table($1);
+ Select->add_joined_table($6);
add_join_natural($1,$6,NULL,Select);
$6->outer_join|=JOIN_TYPE_LEFT;
$$=$6;
@@ -12064,6 +12334,8 @@ join_table:
ON
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, $1, $5)))
MYSQL_YYABORT;
@@ -12081,6 +12353,8 @@ join_table:
| table_ref RIGHT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
}
USING '(' using_list ')'
{
@@ -12092,6 +12366,8 @@ join_table:
| table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $6);
+ Select->add_joined_table($1);
+ Select->add_joined_table($6);
add_join_natural($6,$1,NULL,Select);
LEX *lex= Lex;
if (unlikely(!($$= lex->current_select->convert_right_join())))
@@ -12124,326 +12400,95 @@ use_partition:
PARTITION_SYM '(' using_list ')' have_partitioning
{
$$= $3;
+ Select->parsing_place= Select->save_parsing_place;
+ Select->save_parsing_place= NO_MATTER;
}
;
-
-/*
- This is a flattening of the rules <table factor> and <table primary>
- in the SQL:2003 standard, since we don't have <sample clause>
- I.e.
- <table factor> ::= <table primary> [ <sample clause> ]
-*/
-/* Warning - may return NULL in case of incomplete SELECT */
table_factor:
- table_primary_ident
- | table_primary_derived
- ;
-
-table_primary_ident:
- {
- DBUG_ASSERT(Select);
- SELECT_LEX *sel= Select;
- sel->table_join_options= 0;
- }
- table_ident opt_use_partition opt_for_system_time_clause opt_table_alias opt_key_definition
- {
- if (unlikely(!($$= Select->add_table_to_list(thd, $2, $5,
- Select->get_table_join_options(),
- YYPS->m_lock_type,
- YYPS->m_mdl_type,
- Select->
- pop_index_hints(),
- $3))))
- MYSQL_YYABORT;
- TABLE_LIST *tl= $$;
- Select->add_joined_table(tl);
- if ($4)
- tl->vers_conditions= Lex->vers_conditions;
- }
- ;
-
-
-
-/*
- Represents a flattening of the following rules from the SQL:2003
- standard. This sub-rule corresponds to the sub-rule
- <table primary> ::= ... | <derived table> [ AS ] <correlation name>
-
- <derived table> ::= <table subquery>
- <table subquery> ::= <subquery>
- <subquery> ::= <left paren> <query expression> <right paren>
- <query expression> ::= [ <with clause> ] <query expression body>
-
- For the time being we use the non-standard rule
- select_derived_union which is a compromise between the standard
- and our parser. Possibly this rule could be replaced by our
- query_expression_body.
-*/
-
-table_primary_derived:
- '(' get_select_lex select_derived_union ')' opt_for_system_time_clause opt_table_alias
- {
- /* Use $2 instead of Lex->current_select as derived table will
- alter value of Lex->current_select. */
- if (!($3 || $6) && $2->embedding &&
- !$2->embedding->nested_join->join_list.elements)
- {
- /* we have a derived table ($3 == NULL) but no alias,
- Since we are nested in further parentheses so we
- can pass NULL to the outer level parentheses
- Permits parsing of "((((select ...))) as xyz)" */
- $$= 0;
- }
- else if (!$3)
- {
- /* Handle case of derived table, alias may be NULL if there
- are no outer parentheses, add_table_to_list() will throw
- error in this case */
- LEX *lex=Lex;
- lex->check_automatic_up(UNSPECIFIED_TYPE);
- SELECT_LEX *sel= lex->current_select;
- SELECT_LEX_UNIT *unit= sel->master_unit();
- lex->current_select= sel= unit->outer_select();
- Table_ident *ti= new (thd->mem_root) Table_ident(unit);
- if (unlikely(ti == NULL))
- MYSQL_YYABORT;
- if (unlikely(!($$= sel->add_table_to_list(thd,
- ti, $6, 0,
- TL_READ,
- MDL_SHARED_READ))))
- MYSQL_YYABORT;
- sel->add_joined_table($$);
- lex->pop_context();
- lex->nest_level--;
- }
- else if (unlikely($6 != NULL))
- {
- /*
- Tables with or without joins within parentheses cannot
- have aliases, and we ruled out derived tables above.
- */
- thd->parse_error();
- MYSQL_YYABORT;
- }
- else
- {
- /* nested join: FROM (t1 JOIN t2 ...),
- nest_level is the same as in the outer query */
- $$= $3;
- }
- /*
- Fields in derived table can be used in upper select in
- case of merge. We do not add HAVING fields because we do
- not merge such derived. We do not add union because
- also do not merge them
- */
- if ($$ && $$->derived &&
- !$$->derived->first_select()->next_select())
- $$->select_lex->add_where_field($$->derived->first_select());
- if ($5)
- {
- MYSQL_YYABORT_UNLESS(!$3);
- $$->vers_conditions= Lex->vers_conditions;
- }
+ table_primary_ident_opt_parens { $$= $1; }
+ | table_primary_derived_opt_parens { $$= $1; }
+ | join_table_parens
+ {
+ $1->nested_join->nest_type= 0;
+ $$= $1;
}
- /* Represents derived table with WITH clause */
- | '(' get_select_lex subselect_start
- with_clause query_expression_body
- subselect_end ')' opt_for_system_time_clause opt_table_alias
- {
- LEX *lex=Lex;
- SELECT_LEX *sel= $2;
- SELECT_LEX_UNIT *unit= $5->master_unit();
- Table_ident *ti= new (thd->mem_root) Table_ident(unit);
- if (unlikely(ti == NULL))
- MYSQL_YYABORT;
- $5->set_with_clause($4);
- lex->current_select= sel;
- if (unlikely(!($$= sel->add_table_to_list(lex->thd,
- ti, $9, 0,
- TL_READ,
- MDL_SHARED_READ))))
- MYSQL_YYABORT;
- sel->add_joined_table($$);
- if ($8)
- $$->vers_conditions= Lex->vers_conditions;
- }
+ | table_reference_list_parens { $$= $1; }
;
-/*
- This rule accepts just about anything. The reason is that we have
- empty-producing rules in the beginning of rules, in this case
- subselect_start. This forces bison to take a decision which rules to
- reduce by long before it has seen any tokens. This approach ties us
- to a very limited class of parseable languages, and unfortunately
- SQL is not one of them. The chosen 'solution' was this rule, which
- produces just about anything, even complete bogus statements, for
- instance ( table UNION SELECT 1 ).
- Fortunately, we know that the semantic value returned by
- select_derived is NULL if it contained a derived table, and a pointer to
- the base table's TABLE_LIST if it was a base table. So in the rule
- regarding union's, we throw a parse error manually and pretend it
- was bison that did it.
-
- Also worth noting is that this rule concerns query expressions in
- the from clause only. Top level select statements and other types of
- subqueries have their own union rules.
-*/
-select_derived_union:
- select_derived
- | select_derived union_order_or_limit
- {
- if (unlikely($1))
- {
- thd->parse_error();
- MYSQL_YYABORT;
- }
- }
- | select_derived union_head_non_top
- {
- if (unlikely($1))
- {
- thd->parse_error();
- MYSQL_YYABORT;
- }
- }
- union_list_derived_part2
- | derived_simple_table opt_select_lock_type
- | derived_simple_table order_or_limit opt_select_lock_type
- | derived_simple_table opt_select_lock_type union_list_derived
- ;
-
-union_list_derived_part2:
- query_term_union_not_ready { Lex->pop_context(); }
- | query_term_union_ready { Lex->pop_context(); }
- | query_term_union_ready { Lex->pop_context(); } union_list_derived
- ;
-
-union_list_derived:
- union_head_non_top union_list_derived_part2
- ;
-
-
-/* The equivalent of select_init2 for nested queries. */
-select_init2_derived:
- select_part2_derived
- {
- Select->set_braces(0);
- }
+table_primary_ident_opt_parens:
+ table_primary_ident { $$= $1; }
+ | '(' table_primary_ident_opt_parens ')' { $$= $2; }
;
-/* The equivalent of select_part2 for nested queries. */
-select_part2_derived:
- {
- LEX *lex= Lex;
- SELECT_LEX *sel= lex->current_select;
- if (sel->linkage != UNION_TYPE)
- mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LIST;
- }
- opt_query_expression_options select_item_list
- {
- Select->parsing_place= NO_MATTER;
- }
+table_primary_derived_opt_parens:
+ table_primary_derived { $$= $1; }
+ | '(' table_primary_derived_opt_parens ')' { $$= $2; }
;
-/* handle contents of parentheses in join expression */
-select_derived:
- get_select_lex_derived derived_table_list
+table_reference_list_parens:
+ '(' table_reference_list_parens ')' { $$= $2; }
+ | '(' nested_table_reference_list ')'
{
- LEX *lex= Lex;
- /* for normal joins, $2 != NULL and end_nested_join() != NULL,
- for derived tables, both must equal NULL */
-
- if (unlikely(!($$= $1->end_nested_join(lex->thd)) && $2))
- MYSQL_YYABORT;
- if (unlikely(!$2 && $$))
- {
- thd->parse_error();
+ if (!($$= Select->end_nested_join(thd)))
MYSQL_YYABORT;
- }
- }
- ;
-
-derived_simple_table:
- derived_query_specification { $$= $1; }
- | derived_table_value_constructor { $$= $1; }
- ;
-/*
- Similar to query_specification, but for derived tables.
- Example: the inner parenthesized SELECT in this query:
- SELECT * FROM (SELECT * FROM t1);
-*/
-derived_query_specification:
- SELECT_SYM select_derived_init select_derived2
- {
- if ($2)
- Select->set_braces(1);
- $$= NULL;
}
;
-derived_table_value_constructor:
- VALUES
+nested_table_reference_list:
+ table_ref ',' table_ref
{
- if (Lex->tvc_start_derived())
+ if (Select->init_nested_join(thd))
MYSQL_YYABORT;
+ Select->add_joined_table($1);
+ Select->add_joined_table($3);
+ $$= $1->embedding;
}
- values_list
+ | nested_table_reference_list ',' table_ref
{
- if (Lex->tvc_finalize_derived())
- MYSQL_YYABORT;
- $$= NULL;
+ Select->add_joined_table($3);
+ $$= $1;
}
;
-
-select_derived2:
+join_table_parens:
+ '(' join_table_parens ')' { $$= $2; }
+ | '(' join_table ')'
{
LEX *lex= Lex;
- lex->derived_tables|= DERIVED_SUBQUERY;
- if (unlikely(!lex->expr_allows_subselect ||
- lex->sql_command == (int)SQLCOM_PURGE))
+ if (!($$= lex->current_select->nest_last_join(thd)))
{
thd->parse_error();
MYSQL_YYABORT;
}
- if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE ||
- unlikely(mysql_new_select(lex, 1, NULL)))
- MYSQL_YYABORT;
- mysql_init_select(lex);
- lex->current_select->linkage= DERIVED_TABLE_TYPE;
- lex->current_select->parsing_place= SELECT_LIST;
- }
- select_options select_item_list
- {
- Select->parsing_place= NO_MATTER;
}
- opt_table_expression
;
-get_select_lex:
- /* Empty */ { $$= Select; }
- ;
-get_select_lex_derived:
- get_select_lex
+table_primary_ident:
+ table_ident opt_use_partition opt_for_system_time_clause
+ opt_table_alias_clause opt_key_definition
{
- LEX *lex= Lex;
- if (unlikely($1->init_nested_join(lex->thd)))
+ SELECT_LEX *sel= Select;
+ sel->table_join_options= 0;
+ if (!($$= Select->add_table_to_list(thd, $1, $4,
+ Select->get_table_join_options(),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ $2)))
MYSQL_YYABORT;
+ if ($3)
+ $$->vers_conditions= Lex->vers_conditions;
}
- ;
+ ;
-select_derived_init:
+table_primary_derived:
+ subquery
+ opt_for_system_time_clause table_alias_clause
{
- LEX *lex= Lex;
-
- TABLE_LIST *embedding= lex->current_select->embedding;
- $$= embedding &&
- !embedding->nested_join->join_list.elements;
- /* return true if we are deeply nested */
+ if (!($$= Lex->parsed_derived_table($1->master_unit(), $2, $3)))
+ MYSQL_YYABORT;
}
;
@@ -12577,9 +12622,13 @@ table_alias:
| '='
;
-opt_table_alias:
+opt_table_alias_clause:
/* empty */ { $$=0; }
- | table_alias ident_table_alias
+ | table_alias_clause { $$= $1; }
+ ;
+
+table_alias_clause:
+ table_alias ident_table_alias
{
$$= (LEX_CSTRING*) thd->memdup(&$2,sizeof(LEX_STRING));
if (unlikely($$ == NULL))
@@ -12658,7 +12707,7 @@ olap_opt:
SQL-2003: GROUP BY ... CUBE(col1, col2, col3)
*/
LEX *lex=Lex;
- if (unlikely(lex->current_select->linkage == GLOBAL_OPTIONS_TYPE))
+ if (unlikely(lex->current_select->get_linkage() == GLOBAL_OPTIONS_TYPE))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "WITH CUBE",
"global union parameters"));
lex->current_select->olap= CUBE_TYPE;
@@ -12675,7 +12724,7 @@ olap_opt:
SQL-2003: GROUP BY ... ROLLUP(col1, col2, col3)
*/
LEX *lex= Lex;
- if (unlikely(lex->current_select->linkage == GLOBAL_OPTIONS_TYPE))
+ if (unlikely(lex->current_select->get_linkage() == GLOBAL_OPTIONS_TYPE))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "WITH ROLLUP",
"global union parameters"));
lex->current_select->olap= ROLLUP_TYPE;
@@ -12691,7 +12740,7 @@ opt_window_clause:
{}
| WINDOW_SYM
window_def_list
- {}
+ {}
;
window_def_list:
@@ -12717,6 +12766,7 @@ window_spec:
opt_window_ref opt_window_partition_clause
opt_window_order_clause opt_window_frame_clause
')'
+ { }
;
opt_window_ref:
@@ -12736,7 +12786,7 @@ opt_window_partition_clause:
opt_window_order_clause:
/* empty */ { }
- | ORDER_SYM BY order_list
+ | ORDER_SYM BY order_list { Select->order_list= *($3); }
;
opt_window_frame_clause:
@@ -12862,73 +12912,35 @@ alter_order_item:
opt_order_clause:
/* empty */
+ { $$= NULL; }
| order_clause
+ { $$= $1; }
;
order_clause:
ORDER_SYM BY
{
- LEX *lex=Lex;
- SELECT_LEX *sel= lex->current_select;
- SELECT_LEX_UNIT *unit= sel-> master_unit();
- if (unlikely(sel->linkage != GLOBAL_OPTIONS_TYPE &&
- sel->olap != UNSPECIFIED_OLAP_TYPE &&
- (sel->linkage != UNION_TYPE || sel->braces)))
- {
- my_error(ER_WRONG_USAGE, MYF(0),
- "CUBE/ROLLUP", "ORDER BY");
- MYSQL_YYABORT;
- }
- if (lex->sql_command != SQLCOM_ALTER_TABLE &&
- !unit->fake_select_lex)
- {
- /*
- A query of the of the form (SELECT ...) ORDER BY order_list is
- executed in the same way as the query
- SELECT ... ORDER BY order_list
- unless the SELECT construct contains ORDER BY or LIMIT clauses.
- Otherwise we create a fake SELECT_LEX if it has not been
- created yet.
- */
- SELECT_LEX *first_sl= unit->first_select();
- if (unlikely(!first_sl->next_select() && first_sl->tvc &&
- unit->add_fake_select_lex(thd)))
- MYSQL_YYABORT;
- else if (unlikely(!unit->is_unit_op() &&
- (first_sl->order_list.elements ||
- first_sl->select_limit) &&
- unit->add_fake_select_lex(thd)))
- MYSQL_YYABORT;
- }
- if (sel->master_unit()->is_unit_op() && !sel->braces)
- {
- /*
- At this point we don't know yet whether this is the last
- select in union or not, but we move ORDER BY to
- fake_select_lex anyway. If there would be one more select
- in union mysql_new_select will correctly throw error.
- */
- DBUG_ASSERT(sel->master_unit()->fake_select_lex);
- lex->current_select= sel->master_unit()->fake_select_lex;
- }
+ thd->where= "ORDER clause";
}
order_list
{
-
+ $$= $4;
}
;
order_list:
order_list ',' order_ident order_dir
{
- if (unlikely(add_order_to_list(thd, $3,(bool) $4)))
- MYSQL_YYABORT;
- }
+ $$= $1;
+ if (add_to_list(thd, *$$, $3,(bool) $4))
+ MYSQL_YYABORT;
+ }
| order_ident order_dir
{
- if (unlikely(add_order_to_list(thd, $1,(bool) $2)))
+ $$= new (thd->mem_root) SQL_I_List<ORDER>();
+ if (add_to_list(thd, *$$, $1, (bool) $2))
MYSQL_YYABORT;
- }
+ }
;
order_dir:
@@ -12938,64 +12950,62 @@ order_dir:
;
opt_limit_clause:
- /* empty */ {}
- | limit_clause {}
+ /* empty */
+ { $$.empty(); }
+ | limit_clause
+ { $$= $1; }
;
-limit_clause_init:
- LIMIT
- {
- SELECT_LEX *sel= Select;
- if (sel->master_unit()->is_unit_op() && !sel->braces &&
- sel->master_unit()->fake_select_lex)
- {
- /* Move LIMIT that belongs to UNION to fake_select_lex */
- Lex->current_select= sel->master_unit()->fake_select_lex;
- DBUG_ASSERT(Select);
- }
- }
- ;
-
limit_clause:
- limit_clause_init limit_options
+ LIMIT limit_options
{
- SELECT_LEX *sel= Select;
- if (!sel->select_limit->basic_const_item() ||
- sel->select_limit->val_int() > 0)
+ $$= $2;
+ if (!$$.select_limit->basic_const_item() ||
+ $$.select_limit->val_int() > 0)
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
- | limit_clause_init limit_options
+ | LIMIT limit_options
ROWS_SYM EXAMINED_SYM limit_rows_option
{
+ $$= $2;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
- | limit_clause_init ROWS_SYM EXAMINED_SYM limit_rows_option
+ | LIMIT ROWS_SYM EXAMINED_SYM limit_rows_option
{
+ $$.select_limit= 0;
+ $$.offset_limit= 0;
+ $$.explicit_limit= 0;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
;
+opt_global_limit_clause:
+ opt_limit_clause
+ {
+ Select->explicit_limit= $1.explicit_limit;
+ Select->select_limit= $1.select_limit;
+ Select->offset_limit= $1.offset_limit;
+ }
+ ;
+
limit_options:
limit_option
{
- SELECT_LEX *sel= Select;
- sel->select_limit= $1;
- sel->offset_limit= 0;
- sel->explicit_limit= 1;
+ $$.select_limit= $1;
+ $$.offset_limit= 0;
+ $$.explicit_limit= 1;
}
| limit_option ',' limit_option
{
- SELECT_LEX *sel= Select;
- sel->select_limit= $3;
- sel->offset_limit= $1;
- sel->explicit_limit= 1;
+ $$.select_limit= $3;
+ $$.offset_limit= $1;
+ $$.explicit_limit= 1;
}
| limit_option OFFSET_SYM limit_option
{
- SELECT_LEX *sel= Select;
- sel->select_limit= $1;
- sel->offset_limit= $3;
- sel->explicit_limit= 1;
+ $$.select_limit= $1;
+ $$.offset_limit= $3;
+ $$.explicit_limit= 1;
}
;
@@ -13059,6 +13069,88 @@ delete_limit_clause:
| LIMIT limit_option ROWS_SYM EXAMINED_SYM { thd->parse_error(); MYSQL_YYABORT; }
;
+order_limit_lock:
+ order_or_limit
+ {
+ $$= $1;
+ $$->lock.empty();
+ }
+ | order_or_limit select_lock_type
+ {
+ $$= $1;
+ $$->lock= $2;
+ }
+ | select_lock_type
+ {
+ $$= new(thd->mem_root) Lex_order_limit_lock;
+ if (!$$)
+ YYABORT;
+ $$->order_list= NULL;
+ $$->limit.empty();
+ $$->lock= $1;
+ }
+ ;
+
+opt_order_limit_lock:
+ /* empty */
+ {
+ Lex->pop_select();
+ $$= NULL;
+ }
+ | order_limit_lock { $$= $1; }
+ ;
+
+query_expression_tail:
+ order_limit_lock
+ ;
+
+opt_query_expression_tail:
+ opt_order_limit_lock
+ ;
+
+opt_procedure_or_into:
+ /* empty */
+ {
+ $$.empty();
+ }
+ | procedure_clause opt_select_lock_type
+ {
+ $$= $2;
+ }
+ | into opt_select_lock_type
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WARN_DEPRECATED_SYNTAX,
+ ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
+ "<select expression> INTO <destination>;",
+ "'SELECT <select list> INTO <destination>"
+ " FROM...'");
+ $$= $2;
+ }
+ ;
+
+order_or_limit:
+ order_clause opt_limit_clause
+ {
+ $$= new(thd->mem_root) Lex_order_limit_lock;
+ if (!$$)
+ YYABORT;
+ $$->order_list= $1;
+ $$->limit= $2;
+ }
+ | limit_clause
+ {
+ Lex_order_limit_lock *op= $$= new(thd->mem_root) Lex_order_limit_lock;
+ if (!$$)
+ YYABORT;
+ op->order_list= NULL;
+ op->limit= $1;
+ $$->order_list= NULL;
+ $$->limit= $1;
+ }
+ ;
+
+
opt_plus:
/* empty */
| '+'
@@ -13135,8 +13227,6 @@ procedure_clause:
{
LEX *lex=Lex;
- DBUG_ASSERT(&lex->select_lex == lex->current_select);
-
lex->proc_list.elements=0;
lex->proc_list.first=0;
lex->proc_list.next= &lex->proc_list.first;
@@ -13151,16 +13241,16 @@ procedure_clause:
/*
PROCEDURE CLAUSE cannot handle subquery as one of its parameter,
- so set expr_allows_subselect as false to disallow any subqueries
- further. Reset expr_allows_subselect back to true once the
- parameters are reduced.
+ so disallow any subqueries further.
+ Alow subqueries back once the parameters are reduced.
*/
- Lex->expr_allows_subselect= false;
+ Lex->clause_that_disallows_subselect= "PROCEDURE";
+ Select->options|= OPTION_PROCEDURE_CLAUSE;
}
'(' procedure_list ')'
{
/* Subqueries are allowed from now.*/
- Lex->expr_allows_subselect= true;
+ Lex->clause_that_disallows_subselect= NULL;
}
;
@@ -13239,6 +13329,7 @@ select_outvar:
into:
INTO into_destination
+ {}
;
into_destination:
@@ -13286,11 +13377,14 @@ do:
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_DO;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
mysql_init_select(lex);
}
expr_list
{
Lex->insert_list= $3;
+ Lex->pop_select(); //main select
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
@@ -13310,11 +13404,16 @@ drop:
}
table_list opt_lock_wait_timeout opt_restrict
{}
- | DROP INDEX_SYM opt_if_exists_table_element ident ON table_ident opt_lock_wait_timeout
+ | DROP INDEX_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ opt_if_exists_table_element ident ON table_ident opt_lock_wait_timeout
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
- Alter_drop(Alter_drop::KEY, $4.str, $3));
+ Alter_drop(Alter_drop::KEY, $5.str, $4));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->sql_command= SQLCOM_DROP_INDEX;
@@ -13322,10 +13421,11 @@ drop:
lex->alter_info.flags= ALTER_DROP_INDEX;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
if (unlikely(!lex->current_select->
- add_table_to_list(thd, $6, NULL, TL_OPTION_UPDATING,
+ add_table_to_list(thd, $7, NULL, TL_OPTION_UPDATING,
TL_READ_NO_INSERT,
MDL_SHARED_UPGRADABLE)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
}
| DROP DATABASE opt_if_exists ident
{
@@ -13434,10 +13534,11 @@ table_list:
table_name:
table_ident
{
- if (unlikely(!Select->add_table_to_list(thd, $1, NULL,
- TL_OPTION_UPDATING,
- YYPS->m_lock_type,
- YYPS->m_mdl_type)))
+ if (!thd->lex->current_select_or_default()->
+ add_table_to_list(thd, $1, NULL,
+ TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type))
MYSQL_YYABORT;
}
;
@@ -13510,18 +13611,23 @@ insert:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_INSERT;
- lex->duplicates= DUP_ERROR;
+ lex->duplicates= DUP_ERROR;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
+ lex->inc_select_stack_outer_barrier();
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
}
insert_lock_option
opt_ignore insert2
{
Select->set_lock_for_tables($3, true);
- Lex->current_select= &Lex->select_lex;
+ Lex->current_select= Lex->first_select_lex();
}
insert_field_spec opt_insert_update
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
Lex->mark_first_table_as_inserting();
}
@@ -13533,16 +13639,21 @@ replace:
LEX *lex=Lex;
lex->sql_command = SQLCOM_REPLACE;
lex->duplicates= DUP_REPLACE;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
+ lex->inc_select_stack_outer_barrier();
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
}
replace_lock_option insert2
{
Select->set_lock_for_tables($3, true);
- Lex->current_select= &Lex->select_lex;
+ Lex->current_select= Lex->first_select_lex();
}
insert_field_spec
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
Lex->mark_first_table_as_inserting();
}
@@ -13585,10 +13696,13 @@ insert2:
;
insert_table:
+ {
+ Select->save_parsing_place= Select->parsing_place;
+ }
table_name_with_opt_use_partition
{
LEX *lex=Lex;
- lex->field_list.empty();
+ //lex->field_list.empty();
lex->many_values.empty();
lex->insert_list=0;
}
@@ -13596,8 +13710,7 @@ insert_table:
insert_field_spec:
insert_values {}
- | '(' ')' insert_values {}
- | '(' fields ')' insert_values {}
+ | insert_field_list insert_values {}
| SET
{
LEX *lex=Lex;
@@ -13605,20 +13718,33 @@ insert_field_spec:
unlikely(lex->many_values.push_back(lex->insert_list,
thd->mem_root)))
MYSQL_YYABORT;
+ lex->current_select->parsing_place= NO_MATTER;
}
ident_eq_list
;
+insert_field_list:
+ LEFT_PAREN_ALT opt_fields ')'
+ {
+ Lex->current_select->parsing_place= AFTER_LIST;
+ }
+ ;
+
+opt_fields:
+ /* empty */
+ | fields
+ ;
+
fields:
fields ',' insert_ident
{ Lex->field_list.push_back($3, thd->mem_root); }
| insert_ident { Lex->field_list.push_back($1, thd->mem_root); }
;
+
+
insert_values:
- VALUES values_list {}
- | VALUE_SYM values_list {}
- | create_select_query_expression {}
+ create_select_query_expression {}
;
values_list:
@@ -13766,23 +13892,43 @@ opt_insert_update:
}
;
+update_table_list:
+ table_ident opt_use_partition for_portion_of_time_clause
+ opt_table_alias_clause opt_key_definition
+ {
+ SELECT_LEX *sel= Select;
+ sel->table_join_options= 0;
+ if (!($$= Select->add_table_to_list(thd, $1, $4,
+ Select->get_table_join_options(),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ $2)))
+ MYSQL_YYABORT;
+ $$->period_conditions= Lex->period_conditions;
+ }
+ | join_table_list { $$= $1; }
+ ;
+
/* Update rows in a table */
update:
UPDATE_SYM
{
LEX *lex= Lex;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
lex->sql_command= SQLCOM_UPDATE;
lex->duplicates= DUP_ERROR;
}
- opt_low_priority opt_ignore join_table_list
+ opt_low_priority opt_ignore update_table_list
SET update_list
{
- SELECT_LEX *slex= &Lex->select_lex;
+ SELECT_LEX *slex= Lex->first_select_lex();
if (slex->table_list.elements > 1)
Lex->sql_command= SQLCOM_UPDATE_MULTI;
- else if (unlikely(slex->get_table_list()->derived))
+ else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
@@ -13798,7 +13944,10 @@ update:
}
opt_where_clause opt_order_clause delete_limit_clause
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ if ($10)
+ Select->order_list= *($10);
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
;
@@ -13850,12 +13999,13 @@ delete:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_DELETE;
- mysql_init_select(lex);
YYPS->m_lock_type= TL_WRITE_DEFAULT;
YYPS->m_mdl_type= MDL_SHARED_WRITE;
-
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ mysql_init_select(lex);
lex->ignore= 0;
- lex->select_lex.init_order();
+ lex->first_select_lex()->order_list.empty();
}
delete_part2
{
@@ -13880,6 +14030,7 @@ delete_part2:
| HISTORY_SYM delete_single_table opt_delete_system_time
{
Lex->last_table()->vers_conditions= Lex->vers_conditions;
+ Lex->pop_select(); //main select
}
;
@@ -13898,12 +14049,25 @@ delete_single_table:
}
;
+delete_single_table_for_period:
+ delete_single_table opt_for_portion_of_time_clause
+ {
+ if ($2)
+ Lex->last_table()->period_conditions= Lex->period_conditions;
+ }
+ ;
+
single_multi:
- delete_single_table
+ delete_single_table_for_period
opt_where_clause
opt_order_clause
delete_limit_clause
- opt_select_expressions {}
+ opt_select_expressions
+ {
+ if ($3)
+ Select->order_list= *($3);
+ Lex->pop_select(); //main select
+ }
| table_wild_list
{
mysql_init_multi_delete(Lex);
@@ -13914,6 +14078,9 @@ single_multi:
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
| FROM table_alias_ref_list
{
@@ -13925,7 +14092,8 @@ single_multi:
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
;
@@ -13995,9 +14163,9 @@ truncate:
LEX* lex= Lex;
lex->sql_command= SQLCOM_TRUNCATE;
lex->alter_info.reset();
- lex->select_lex.options= 0;
- lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE_UNSPECIFIED;
- lex->select_lex.init_order();
+ lex->first_select_lex()->options= 0;
+ lex->sql_cache= LEX::SQL_CACHE_UNSPECIFIED;
+ lex->first_select_lex()->order_list.empty();
YYPS->m_lock_type= TL_WRITE;
YYPS->m_mdl_type= MDL_EXCLUSIVE;
}
@@ -14082,6 +14250,8 @@ show:
LEX *lex=Lex;
lex->wild=0;
lex->ident= null_clex_str;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
lex->current_select->parsing_place= SELECT_LIST;
lex->create_info.init();
@@ -14089,6 +14259,7 @@ show:
show_param
{
Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
}
;
@@ -14104,40 +14275,40 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLES;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES))
MYSQL_YYABORT;
}
| opt_full TRIGGERS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TRIGGERS;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS))
MYSQL_YYABORT;
}
| EVENTS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_EVENTS;
- lex->select_lex.db= $2;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_EVENTS)))
+ lex->first_select_lex()->db= $2;
+ if (prepare_schema_table(thd, lex, 0, SCH_EVENTS))
MYSQL_YYABORT;
}
| TABLE_SYM STATUS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLES)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLES))
MYSQL_YYABORT;
}
| OPEN_SYM TABLES opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES))
MYSQL_YYABORT;
}
| PLUGINS_SYM
@@ -14186,12 +14357,13 @@ show_param:
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
}
- opt_limit_clause
+ opt_global_limit_clause
| RELAYLOG_SYM optional_connection_name EVENTS_SYM binlog_in binlog_from
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
- } opt_limit_clause
+ }
+ opt_global_limit_clause
| keys_or_index from_or_in table_ident opt_db opt_where_clause
{
LEX *lex= Lex;
@@ -14233,13 +14405,13 @@ show_param:
LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
(void) create_select_for_variable(thd, &var);
}
- | WARNINGS opt_limit_clause
+ | WARNINGS opt_global_limit_clause
{ Lex->sql_command = SQLCOM_SHOW_WARNS;}
- | ERRORS opt_limit_clause
+ | ERRORS opt_global_limit_clause
{ Lex->sql_command = SQLCOM_SHOW_ERRORS;}
| PROFILES_SYM
{ Lex->sql_command = SQLCOM_SHOW_PROFILES; }
- | PROFILE_SYM opt_profile_defs opt_profile_args opt_limit_clause
+ | PROFILE_SYM opt_profile_defs opt_profile_args opt_global_limit_clause
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_PROFILE;
@@ -14301,7 +14473,7 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $3, NULL,0)))
+ if (!lex->first_select_lex()->add_table_to_list(thd, $3, NULL,0))
MYSQL_YYABORT;
lex->create_info.storage_media= HA_SM_DEFAULT;
}
@@ -14309,7 +14481,7 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $3, NULL, 0)))
+ if (!lex->first_select_lex()->add_table_to_list(thd, $3, NULL, 0))
MYSQL_YYABORT;
lex->table_type= TABLE_TYPE_VIEW;
}
@@ -14317,7 +14489,7 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $3, NULL, 0)))
+ if (!lex->first_select_lex()->add_table_to_list(thd, $3, NULL, 0))
MYSQL_YYABORT;
lex->table_type= TABLE_TYPE_SEQUENCE;
}
@@ -14531,10 +14703,12 @@ describe:
describe_command table_ident
{
LEX *lex= Lex;
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
lex->current_select->parsing_place= SELECT_LIST;
lex->sql_command= SQLCOM_SHOW_FIELDS;
- lex->select_lex.db= null_clex_str;
+ lex->first_select_lex()->db= null_clex_str;
lex->verbose= 0;
if (unlikely(prepare_schema_table(thd, lex, $2, SCH_COLUMNS)))
MYSQL_YYABORT;
@@ -14542,18 +14716,20 @@ describe:
opt_describe_column
{
Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
}
| describe_command opt_extended_describe
{ Lex->describe|= DESCRIBE_NORMAL; }
explainable_command
{
LEX *lex=Lex;
- lex->select_lex.options|= SELECT_DESCRIBE;
+ lex->first_select_lex()->options|= SELECT_DESCRIBE;
}
;
explainable_command:
select
+ | select_into
| insert
| replace
| update
@@ -14574,6 +14750,8 @@ analyze_stmt_command:
opt_extended_describe:
EXTENDED_SYM { Lex->describe|= DESCRIBE_EXTENDED; }
+ | EXTENDED_SYM ALL
+ { Lex->describe|= DESCRIBE_EXTENDED | DESCRIBE_EXTENDED2; }
| PARTITIONS_SYM { Lex->describe|= DESCRIBE_PARTITIONS; }
| opt_format_json {}
;
@@ -14616,8 +14794,7 @@ flush:
lex->type= 0;
lex->no_write_to_binlog= $2;
}
- flush_options
- {}
+ flush_options {}
;
flush_options:
@@ -14634,6 +14811,7 @@ flush_options:
opt_table_list opt_flush_lock
{}
| flush_options_list
+ {}
;
opt_flush_lock:
@@ -14719,6 +14897,8 @@ flush_option:
{ Lex->type|= REFRESH_DES_KEY_FILE; }
| RESOURCES
{ Lex->type|= REFRESH_USER_RESOURCES; }
+ | SSL_SYM
+ { Lex->type|= REFRESH_SSL;}
| IDENT_sys remember_tok_start
{
Lex->type|= REFRESH_GENERIC;
@@ -14740,6 +14920,47 @@ opt_table_list:
| table_list {}
;
+backup:
+ BACKUP_SYM backup_statements {}
+ ;
+
+backup_statements:
+ STAGE_SYM ident
+ {
+ int type;
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP STAGE"));
+ if ((type= find_type($2.str, &backup_stage_names,
+ FIND_TYPE_NO_PREFIX)) <= 0)
+ my_yyabort_error((ER_BACKUP_UNKNOWN_STAGE, MYF(0), $2.str));
+ Lex->sql_command= SQLCOM_BACKUP;
+ Lex->backup_stage= (backup_stages) (type-1);
+ break;
+ }
+ | LOCK_SYM
+ {
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP LOCK"));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ table_ident
+ {
+ if (unlikely(!Select->add_table_to_list(thd, $3, NULL, 0,
+ TL_READ, MDL_SHARED_HIGH_PRIO)))
+ MYSQL_YYABORT;
+ Lex->sql_command= SQLCOM_BACKUP_LOCK;
+ Lex->pop_select(); //main select
+ }
+ | UNLOCK_SYM
+ {
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP UNLOCK"));
+ /* Table list is empty for unlock */
+ Lex->sql_command= SQLCOM_BACKUP_LOCK;
+ }
+ ;
+
opt_delete_gtid_domain:
/* empty */ {}
| DELETE_DOMAIN_ID_SYM '=' '(' delete_domain_id_list ')'
@@ -14814,34 +15035,21 @@ master_reset_options:
;
purge:
- PURGE
+ PURGE master_or_binary LOGS_SYM TO_SYM TEXT_STRING_sys
{
- LEX *lex=Lex;
- lex->type=0;
- lex->sql_command = SQLCOM_PURGE;
+ Lex->stmt_purge_to($5);
}
- purge_options
- {}
- ;
-
-purge_options:
- master_or_binary LOGS_SYM purge_option
- ;
-
-purge_option:
- TO_SYM TEXT_STRING_sys
- {
- Lex->to_log = $2.str;
- }
- | BEFORE_SYM expr
+ | PURGE master_or_binary LOGS_SYM BEFORE_SYM
+ { Lex->clause_that_disallows_subselect= "PURGE..BEFORE"; }
+ expr
{
- LEX *lex= Lex;
- lex->value_list.empty();
- lex->value_list.push_front($2, thd->mem_root);
- lex->sql_command= SQLCOM_PURGE_BEFORE;
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_purge_before($6))
+ MYSQL_YYABORT;
}
;
+
/* kill threads */
kill:
@@ -14895,6 +15103,15 @@ kill_expr:
shutdown:
SHUTDOWN { Lex->sql_command= SQLCOM_SHUTDOWN; }
+ shutdown_option {}
+ ;
+
+shutdown_option:
+ /* Empty */ { Lex->is_shutdown_wait_for_slaves= false; }
+ | WAIT_SYM FOR_SYM ALL SLAVES
+ {
+ Lex->is_shutdown_wait_for_slaves= true;
+ }
;
/* change database */
@@ -14904,7 +15121,7 @@ use:
{
LEX *lex=Lex;
lex->sql_command=SQLCOM_CHANGE_DB;
- lex->select_lex.db= $2;
+ lex->first_select_lex()->db= $2;
}
;
@@ -14914,7 +15131,6 @@ load:
LOAD data_or_xml
{
LEX *lex= thd->lex;
- mysql_init_select(lex);
if (unlikely(lex->sphead))
{
@@ -14922,6 +15138,9 @@ load:
$2 == FILETYPE_CSV ? "LOAD DATA" : "LOAD XML");
MYSQL_YYABORT;
}
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ mysql_init_select(lex);
}
load_data_lock opt_local INFILE TEXT_STRING_filesystem
{
@@ -14953,7 +15172,8 @@ load:
opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec
opt_load_data_set_spec
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
Lex->mark_first_table_as_inserting();
}
@@ -15155,11 +15375,6 @@ hex_or_bin_String:
$1.length);
if (unlikely(tmp == NULL))
MYSQL_YYABORT;
- /*
- it is OK only emulate fix_fields, because we need only
- value of constant
- */
- tmp->quick_fix_field();
$$= tmp->val_str((String*) 0);
}
| HEX_STRING
@@ -15168,7 +15383,6 @@ hex_or_bin_String:
$1.length);
if (unlikely(tmp == NULL))
MYSQL_YYABORT;
- tmp->quick_fix_field();
$$= tmp->val_str((String*) 0);
}
| BIN_NUM
@@ -15181,7 +15395,6 @@ hex_or_bin_String:
it is OK only emulate fix_fields, because we need only
value of constant
*/
- tmp->quick_fix_field();
$$= tmp->val_str((String*) 0);
}
;
@@ -15330,53 +15543,44 @@ NUM_literal:
temporal_literal:
DATE_SYM TEXT_STRING
{
- if (unlikely(!($$= create_temporal_literal(thd, $2.str, $2.length,
- YYCSCL,
- MYSQL_TYPE_DATE,
- true))))
+ if (unlikely(!($$= type_handler_newdate.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true))))
MYSQL_YYABORT;
}
| TIME_SYM TEXT_STRING
{
- if (unlikely(!($$= create_temporal_literal(thd, $2.str, $2.length,
- YYCSCL,
- MYSQL_TYPE_TIME,
- true))))
+ if (unlikely(!($$= type_handler_time2.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true))))
MYSQL_YYABORT;
}
| TIMESTAMP TEXT_STRING
{
- if (unlikely(!($$= create_temporal_literal(thd, $2.str, $2.length,
- YYCSCL,
- MYSQL_TYPE_DATETIME,
- true))))
+ if (unlikely(!($$= type_handler_datetime.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true))))
MYSQL_YYABORT;
}
;
-
-opt_with_clause:
- /*empty */ { $$= 0; }
- | with_clause
- {
- $$= $1;
- }
- ;
-
-
with_clause:
- WITH opt_recursive
+ WITH opt_recursive
{
+ LEX *lex= Lex;
With_clause *with_clause=
new With_clause($2, Lex->curr_with_clause);
if (unlikely(with_clause == NULL))
MYSQL_YYABORT;
- Lex->derived_tables|= DERIVED_WITH;
- Lex->with_cte_resolution= true;
- Lex->curr_with_clause= with_clause;
+ lex->derived_tables|= DERIVED_WITH;
+ lex->with_cte_resolution= true;
+ lex->curr_with_clause= with_clause;
with_clause->add_to_list(Lex->with_clauses_list_last_next);
+ if (lex->current_select &&
+ lex->current_select->parsing_place == BEFORE_OPT_LIST)
+ lex->current_select->parsing_place= NO_MATTER;
}
- with_list
+ with_list
{
$$= Lex->curr_with_clause;
Lex->curr_with_clause= Lex->curr_with_clause->pop();
@@ -15405,17 +15609,16 @@ with_list_element:
MYSQL_YYABORT;
Lex->with_column_list.empty();
}
- AS '(' remember_tok_start subselect remember_tok_end ')'
+ AS '(' query_expression ')'
{
LEX *lex= thd->lex;
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
: thd->query();
- char *spec_start= $6 + 1;
- With_element *elem= new With_element($1, *$2, $7->master_unit());
- if (unlikely(elem == NULL) ||
- unlikely(Lex->curr_with_clause->add_with_element(elem)))
+ const char *spec_start= $5.pos() + 1;
+ With_element *elem= new With_element($1, *$2, $6);
+ if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
- if (elem->set_unparsed_spec(thd, spec_start, $8,
+ if (elem->set_unparsed_spec(thd, spec_start, $7.pos(),
spec_start - query_start))
MYSQL_YYABORT;
elem->set_tables_end_pos(lex->query_tables_last);
@@ -15450,10 +15653,8 @@ with_element_head:
{
LEX_CSTRING *name=
(LEX_CSTRING *) thd->memdup(&$1, sizeof(LEX_CSTRING));
- if (unlikely($$ == NULL))
- MYSQL_YYABORT;
$$= new (thd->mem_root) With_element_head(name);
- if ($$ == NULL)
+ if (unlikely(name == NULL || $$ == NULL))
MYSQL_YYABORT;
$$->tables_pos.set_start_pos(Lex->query_tables_last);
}
@@ -15733,11 +15934,9 @@ ident_or_text:
user_maybe_role:
ident_or_text
{
- if (unlikely(!($$=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
+ if (unlikely(!($$=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user = $1;
- $$->host= null_clex_str; // User or Role, see get_current_user()
- $$->reset_auth();
if (unlikely(check_string_char_length(&$$->user, ER_USERNAME,
username_char_length,
@@ -15746,10 +15945,9 @@ user_maybe_role:
}
| ident_or_text '@' ident_or_text
{
- if (unlikely(!($$=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
+ if (unlikely(!($$=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user = $1; $$->host=$3;
- $$->reset_auth();
if (unlikely(check_string_char_length(&$$->user, ER_USERNAME,
username_char_length,
@@ -15779,8 +15977,7 @@ user_maybe_role:
if (unlikely(!($$=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user= current_user;
- $$->plugin= empty_clex_str;
- $$->auth= empty_clex_str;
+ $$->auth= new (thd->mem_root) USER_AUTH();
}
;
@@ -16066,6 +16263,7 @@ keyword_data_type:
*/
keyword_sp_var_and_label:
ACTION
+ | ACCOUNT_SYM
| ADDDATE_SYM
| ADMIN_SYM
| AFTER_SYM
@@ -16149,6 +16347,7 @@ keyword_sp_var_and_label:
| EXCEPTION_MARIADB_SYM
| EXCHANGE_SYM
| EXPANSION_SYM
+ | EXPIRE_SYM
| EXPORT_SYM
| EXTENDED_SYM
| EXTENT_SIZE_SYM
@@ -16239,6 +16438,7 @@ keyword_sp_var_and_label:
| MYSQL_SYM
| MYSQL_ERRNO_SYM
| NAME_SYM
+ | NEVER_SYM
| NEXT_SYM %prec PREC_BELOW_CONTRACTION_TOKEN2
| NEXTVAL_SYM
| NEW_SYM
@@ -16327,6 +16527,7 @@ keyword_sp_var_and_label:
| SQL_BUFFER_RESULT
| SQL_NO_CACHE_SYM
| SQL_THREAD
+ | STAGE_SYM
| STARTS_SYM
| STATEMENT_SYM
| STATUS_SYM
@@ -16395,17 +16596,23 @@ set:
SET
{
LEX *lex=Lex;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
lex->set_stmt_init();
lex->var_list.empty();
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
start_option_value_list
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
| SET STATEMENT_SYM
{
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
Lex->set_stmt_init();
}
set_stmt_option_value_following_option_type_list
@@ -16415,6 +16622,9 @@ set:
my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), "SET STATEMENT"));
lex->stmt_var_list= lex->var_list;
lex->var_list.empty();
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
FOR_SYM verb_clause
{}
@@ -16479,7 +16689,8 @@ option_value_list_continued:
/* Repeating list of option values after first option value. */
option_value_list:
{
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
option_value
{
@@ -16488,7 +16699,8 @@ option_value_list:
}
| option_value_list ','
{
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
option_value
{
@@ -16754,21 +16966,29 @@ opt_for_user:
thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
lex->definer->user= current_user;
- lex->definer->plugin= empty_clex_str;
- lex->definer->auth= empty_clex_str;
+ lex->definer->auth= new (thd->mem_root) USER_AUTH();
}
| FOR_SYM user equal { Lex->definer= $2; }
;
text_or_password:
- TEXT_STRING { Lex->definer->pwhash= $1;}
- | PASSWORD_SYM '(' TEXT_STRING ')' { Lex->definer->pwtext= $3; }
+ TEXT_STRING
+ {
+ Lex->definer->auth= new (thd->mem_root) USER_AUTH();
+ Lex->definer->auth->auth_str= $1;
+ }
+ | PASSWORD_SYM '(' TEXT_STRING ')'
+ {
+ Lex->definer->auth= new (thd->mem_root) USER_AUTH();
+ Lex->definer->auth->pwtext= $3;
+ }
| OLD_PASSWORD_SYM '(' TEXT_STRING ')'
{
- Lex->definer->pwtext= $3;
- Lex->definer->pwhash.str= Item_func_password::alloc(thd,
+ Lex->definer->auth= new (thd->mem_root) USER_AUTH();
+ Lex->definer->auth->pwtext= $3;
+ Lex->definer->auth->auth_str.str= Item_func_password::alloc(thd,
$3.str, $3.length, Item_func_password::OLD);
- Lex->definer->pwhash.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
+ Lex->definer->auth->auth_str.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
}
;
@@ -16838,7 +17058,7 @@ table_lock_list:
;
table_lock:
- table_ident opt_table_alias lock_option
+ table_ident opt_table_alias_clause lock_option
{
thr_lock_type lock_type= (thr_lock_type) $3;
bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE);
@@ -16849,7 +17069,7 @@ table_lock:
? MDL_SHARED_WRITE
: MDL_SHARED_NO_READ_WRITE;
- if (unlikely(!Select->
+ if (unlikely(!Lex->current_select_or_default()->
add_table_to_list(thd, $1, $2, table_options,
lock_type, mdl_type)))
MYSQL_YYABORT;
@@ -16886,32 +17106,42 @@ unlock:
*/
handler:
- HANDLER_SYM table_ident OPEN_SYM opt_table_alias
+ HANDLER_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ handler_tail
+ {
+ Lex->pop_select(); //main select
+ }
+ ;
+
+handler_tail:
+ table_ident OPEN_SYM opt_table_alias_clause
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
lex->sql_command = SQLCOM_HA_OPEN;
- if (unlikely(!lex->current_select->add_table_to_list(thd, $2, $4,
- 0)))
+ if (!lex->current_select->add_table_to_list(thd, $1, $3, 0))
MYSQL_YYABORT;
}
- | HANDLER_SYM table_ident_nodb CLOSE_SYM
+ | table_ident_nodb CLOSE_SYM
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
lex->sql_command = SQLCOM_HA_CLOSE;
- if (unlikely(!lex->current_select->add_table_to_list(thd, $2, 0,
- 0)))
+ if (!lex->current_select->add_table_to_list(thd, $1, 0, 0))
MYSQL_YYABORT;
}
- | HANDLER_SYM table_ident_nodb READ_SYM
+ | table_ident_nodb READ_SYM
{
LEX *lex=Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
- lex->expr_allows_subselect= FALSE;
+ lex->clause_that_disallows_subselect= "HANDLER..READ";
lex->sql_command = SQLCOM_HA_READ;
lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */
Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
@@ -16920,15 +17150,24 @@ handler:
lex->current_select->select_limit= one;
lex->current_select->offset_limit= 0;
lex->limit_rows_examined= 0;
- if (unlikely(!lex->current_select->add_table_to_list(thd, $2, 0,
- 0)))
+ if (!lex->current_select->add_table_to_list(thd, $1, 0, 0))
MYSQL_YYABORT;
}
- handler_read_or_scan opt_where_clause opt_limit_clause
+ handler_read_or_scan opt_where_clause opt_global_limit_clause
{
- Lex->expr_allows_subselect= TRUE;
+ LEX *lex=Lex;
+ lex->clause_that_disallows_subselect= NULL;
+ if (!lex->current_select->explicit_limit)
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (one == NULL)
+ MYSQL_YYABORT;
+ lex->current_select->select_limit= one;
+ lex->current_select->offset_limit= 0;
+ lex->limit_rows_examined= 0;
+ }
/* Stored functions are not supported for HANDLER READ. */
- if (unlikely(Lex->uses_stored_routines()))
+ if (lex->uses_stored_routines())
{
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
"stored functions in HANDLER ... READ");
@@ -17126,7 +17365,7 @@ current_role:
if (unlikely(!($$=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user= current_role;
- $$->reset_auth();
+ $$->auth= NULL;
}
;
@@ -17143,7 +17382,7 @@ grant_role:
MYSQL_YYABORT;
$$->user= $1;
$$->host= empty_clex_str;
- $$->reset_auth();
+ $$->auth= NULL;
if (unlikely(check_string_char_length(&$$->user, ER_USERNAME,
username_char_length,
@@ -17233,23 +17472,23 @@ require_list_element:
SUBJECT_SYM TEXT_STRING
{
LEX *lex=Lex;
- if (unlikely(lex->x509_subject))
+ if (lex->account_options.x509_subject.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
- lex->x509_subject=$2.str;
+ lex->account_options.x509_subject= $2;
}
| ISSUER_SYM TEXT_STRING
{
LEX *lex=Lex;
- if (unlikely(lex->x509_issuer))
+ if (lex->account_options.x509_issuer.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
- lex->x509_issuer=$2.str;
+ lex->account_options.x509_issuer= $2;
}
| CIPHER_SYM TEXT_STRING
{
LEX *lex=Lex;
- if (unlikely(lex->ssl_cipher))
+ if (lex->account_options.ssl_cipher.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
- lex->ssl_cipher=$2.str;
+ lex->account_options.ssl_cipher= $2;
}
;
@@ -17257,7 +17496,7 @@ grant_ident:
'*'
{
LEX *lex= Lex;
- if (unlikely(lex->copy_db_to(&lex->current_select->db)))
+ if (unlikely(lex->copy_db_to(&lex->first_select_lex()->db)))
MYSQL_YYABORT;
if (lex->grant == GLOBAL_ACLS)
lex->grant = DB_ACLS & ~GRANT_ACL;
@@ -17267,7 +17506,7 @@ grant_ident:
| ident '.' '*'
{
LEX *lex= Lex;
- lex->current_select->db= $1;
+ lex->first_select_lex()->db= $1;
if (lex->grant == GLOBAL_ACLS)
lex->grant = DB_ACLS & ~GRANT_ACL;
else if (unlikely(lex->columns.elements))
@@ -17276,7 +17515,7 @@ grant_ident:
| '*' '.' '*'
{
LEX *lex= Lex;
- lex->current_select->db= null_clex_str;
+ lex->first_select_lex()->db= null_clex_str;
if (lex->grant == GLOBAL_ACLS)
lex->grant= GLOBAL_ACLS & ~GRANT_ACL;
else if (unlikely(lex->columns.elements))
@@ -17285,7 +17524,7 @@ grant_ident:
| table_ident
{
LEX *lex=Lex;
- if (unlikely(!lex->current_select->
+ if (unlikely(!lex->first_select_lex()->
add_table_to_list(thd, $1,NULL,
TL_OPTION_UPDATING)))
MYSQL_YYABORT;
@@ -17340,38 +17579,74 @@ grant_user:
user IDENTIFIED_SYM BY TEXT_STRING
{
$$= $1;
- $1->pwtext= $4;
- if (unlikely(Lex->sql_command == SQLCOM_REVOKE))
- MYSQL_YYABORT;
+ $1->auth= new (thd->mem_root) USER_AUTH();
+ $1->auth->pwtext= $4;
}
| user IDENTIFIED_SYM BY PASSWORD_SYM TEXT_STRING
{
$$= $1;
- $1->pwhash= $5;
+ $1->auth= new (thd->mem_root) USER_AUTH();
+ $1->auth->auth_str= $5;
}
- | user IDENTIFIED_SYM via_or_with ident_or_text
+ | user IDENTIFIED_SYM via_or_with auth_expression
{
$$= $1;
- $1->plugin= $4;
- $1->auth= empty_clex_str;
+ $1->auth= $4;
}
- | user IDENTIFIED_SYM via_or_with ident_or_text using_or_as TEXT_STRING_sys
+ | user_or_role
{
$$= $1;
- $1->plugin= $4;
- $1->auth= $6;
}
- | user_or_role
- { $$= $1; }
;
+auth_expression:
+ auth_token OR_SYM auth_expression
+ {
+ $$= $1;
+ DBUG_ASSERT($$->next == NULL);
+ $$->next= $3;
+ }
+ | auth_token
+ {
+ $$= $1;
+ }
+ ;
+
+auth_token:
+ ident_or_text opt_auth_str
+ {
+ $$= $2;
+ $$->plugin= $1;
+ }
+ ;
+
+opt_auth_str:
+ /* empty */
+ {
+ if (!($$=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ }
+ | using_or_as TEXT_STRING_sys
+ {
+ if (!($$=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ $$->auth_str= $2;
+ }
+ | using_or_as PASSWORD_SYM '(' TEXT_STRING ')'
+ {
+ if (!($$=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ $$->pwtext= $4;
+ }
+ ;
+
opt_column_list:
/* empty */
{
LEX *lex=Lex;
lex->grant |= lex->which_columns;
}
- | '(' column_list ')'
+ | '(' column_list ')' { }
;
column_list:
@@ -17412,52 +17687,47 @@ opt_require_clause:
/* empty */
| REQUIRE_SYM require_list
{
- Lex->ssl_type=SSL_TYPE_SPECIFIED;
+ Lex->account_options.ssl_type= SSL_TYPE_SPECIFIED;
}
| REQUIRE_SYM SSL_SYM
{
- Lex->ssl_type=SSL_TYPE_ANY;
+ Lex->account_options.ssl_type= SSL_TYPE_ANY;
}
| REQUIRE_SYM X509_SYM
{
- Lex->ssl_type=SSL_TYPE_X509;
+ Lex->account_options.ssl_type= SSL_TYPE_X509;
}
| REQUIRE_SYM NONE_SYM
{
- Lex->ssl_type=SSL_TYPE_NONE;
+ Lex->account_options.ssl_type= SSL_TYPE_NONE;
}
;
resource_option:
MAX_QUERIES_PER_HOUR ulong_num
{
- LEX *lex=Lex;
- lex->mqh.questions=$2;
- lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
+ Lex->account_options.questions=$2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
}
| MAX_UPDATES_PER_HOUR ulong_num
{
- LEX *lex=Lex;
- lex->mqh.updates=$2;
- lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
+ Lex->account_options.updates=$2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
}
| MAX_CONNECTIONS_PER_HOUR ulong_num
{
- LEX *lex=Lex;
- lex->mqh.conn_per_hour= $2;
- lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
+ Lex->account_options.conn_per_hour= $2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
}
| MAX_USER_CONNECTIONS_SYM int_num
{
- LEX *lex=Lex;
- lex->mqh.user_conn= $2;
- lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
+ Lex->account_options.user_conn= $2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
}
| MAX_STATEMENT_TIME_SYM NUM_literal
{
- LEX *lex=Lex;
- lex->mqh.max_statement_time= $2->val_real();
- lex->mqh.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
+ Lex->account_options.max_statement_time= $2->val_real();
+ Lex->account_options.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
}
;
@@ -17506,8 +17776,8 @@ compound_statement:
sp_proc_stmt_compound_ok
{
Lex->sql_command= SQLCOM_COMPOUND;
- Lex->sphead->set_stmt_end(thd);
- Lex->sphead->restore_thd_mem_root(thd);
+ if (Lex->sp_body_finalize_procedure(thd))
+ MYSQL_YYABORT;
}
;
@@ -17594,214 +17864,27 @@ release:
*/
unit_type_decl:
- UNION_SYM
- { $$= UNION_TYPE; }
+ UNION_SYM union_option
+ { $$.unit_type= UNION_TYPE; $$.distinct= $2; }
| INTERSECT_SYM
- { $$= INTERSECT_TYPE; }
+ { $$.unit_type= INTERSECT_TYPE; $$.distinct= 1; }
| EXCEPT_SYM
- { $$= EXCEPT_TYPE; }
- ;
-
-union_clause:
- /* empty */ {}
- | union_list
- ;
-
-union_list:
- unit_type_decl union_option
- {
- if (unlikely(Lex->add_select_to_union_list((bool)$2, $1, TRUE)))
- MYSQL_YYABORT;
- }
- union_list_part2
- {
- /*
- Remove from the name resolution context stack the context of the
- last select in the union.
- */
- Lex->pop_context();
- }
- ;
-
-union_list_view:
- unit_type_decl union_option
- {
- if (unlikely(Lex->add_select_to_union_list((bool)$2, $1, TRUE)))
- MYSQL_YYABORT;
- }
- query_expression_body_view
- {
- Lex->pop_context();
- }
- ;
-
-union_order_or_limit:
- {
- LEX *lex= thd->lex;
- DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
- SELECT_LEX *sel= lex->current_select;
- SELECT_LEX_UNIT *unit= sel->master_unit();
- SELECT_LEX *fake= unit->fake_select_lex;
- if (fake)
- {
- fake->no_table_names_allowed= 1;
- lex->current_select= fake;
- }
- thd->where= "global ORDER clause";
- }
- order_or_limit
- {
- thd->lex->current_select->no_table_names_allowed= 0;
- thd->where= "";
- }
- ;
-
-order_or_limit:
- order_clause opt_limit_clause
- | limit_clause
+ { $$.unit_type= EXCEPT_TYPE; $$.distinct= 1; }
;
/*
Start a UNION, for non-top level query expressions.
*/
-union_head_non_top:
- unit_type_decl union_option
- {
- if (unlikely(Lex->add_select_to_union_list((bool)$2, $1, FALSE)))
- MYSQL_YYABORT;
- }
- ;
-
union_option:
/* empty */ { $$=1; }
| DISTINCT { $$=1; }
| ALL { $$=0; }
;
-simple_table:
- query_specification { $$= $1; }
- | table_value_constructor { $$= $1; }
- ;
-
-table_value_constructor:
- VALUES
- {
- Lex->tvc_start();
- }
- values_list
- {
- $$= Lex->current_select;
- if (Lex->tvc_finalize())
- MYSQL_YYABORT;
- }
- ;
-
-/*
- Corresponds to the SQL Standard
- <query specification> ::=
- SELECT [ <set quantifier> ] <select list> <table expression>
-
- Notes:
- - We allow more options in addition to <set quantifier>
- - <table expression> is optional in MariaDB
-*/
-query_specification:
- SELECT_SYM select_init2_derived opt_table_expression
- {
- $$= Lex->current_select->master_unit()->first_select();
- }
- ;
-
-query_term_union_not_ready:
- simple_table order_or_limit opt_select_lock_type { $$= $1; }
- | '(' select_paren_derived ')' union_order_or_limit { $$= $2; }
- ;
-
-query_term_union_ready:
- simple_table opt_select_lock_type { $$= $1; }
- | '(' select_paren_derived ')' { $$= $2; }
- ;
-
-query_expression_body:
- query_term_union_not_ready { $$= $1; }
- | query_term_union_ready { $$= $1; }
- | query_term_union_ready union_list_derived { $$= $1; }
- ;
-
-/* Corresponds to <query expression> in the SQL:2003 standard. */
-subselect:
- subselect_start opt_with_clause query_expression_body subselect_end
- {
- $3->set_with_clause($2);
- $$= $3;
- }
- ;
-
-subselect_start:
- {
- LEX *lex=Lex;
- if (unlikely(!lex->expr_allows_subselect ||
- lex->sql_command == (int)SQLCOM_PURGE))
- {
- thd->parse_error();
- MYSQL_YYABORT;
- }
- /*
- we are making a "derived table" for the parenthesis
- as we need to have a lex level to fit the union
- after the parenthesis, e.g.
- (SELECT .. ) UNION ... becomes
- SELECT * FROM ((SELECT ...) UNION ...)
- */
- if (unlikely(mysql_new_select(Lex, 1, NULL)))
- MYSQL_YYABORT;
- }
- ;
-
-subselect_end:
- {
- LEX *lex=Lex;
-
- lex->check_automatic_up(UNSPECIFIED_TYPE);
- lex->pop_context();
- SELECT_LEX *child= lex->current_select;
- lex->current_select = lex->current_select->return_after_parsing();
- lex->nest_level--;
- lex->current_select->n_child_sum_items += child->n_sum_items;
-
- /*
- A subquery (and all the subsequent query blocks in a UNION) can
- add columns to an outer query block. Reserve space for them.
- Aggregate functions in having clause can also add fields to an
- outer select.
- */
- for (SELECT_LEX *temp= child->master_unit()->first_select();
- temp != NULL; temp= temp->next_select())
- {
- lex->current_select->select_n_where_fields+=
- temp->select_n_where_fields;
- lex->current_select->select_n_having_items+=
- temp->select_n_having_items;
- }
- }
- ;
-
-opt_query_expression_options:
- /* empty */
- | query_expression_option_list
- ;
-
-query_expression_option_list:
- query_expression_option_list query_expression_option
- | query_expression_option
- ;
-
query_expression_option:
STRAIGHT_JOIN { Select->options|= SELECT_STRAIGHT_JOIN; }
| HIGH_PRIORITY
{
- if (unlikely(Lex->check_simple_select(&$1)))
- MYSQL_YYABORT;
YYPS->m_lock_type= TL_READ_HIGH_PRIORITY;
YYPS->m_mdl_type= MDL_SHARED_READ;
Select->options|= SELECT_HIGH_PRIORITY;
@@ -17809,18 +17892,8 @@ query_expression_option:
| DISTINCT { Select->options|= SELECT_DISTINCT; }
| SQL_SMALL_RESULT { Select->options|= SELECT_SMALL_RESULT; }
| SQL_BIG_RESULT { Select->options|= SELECT_BIG_RESULT; }
- | SQL_BUFFER_RESULT
- {
- if (unlikely(Lex->check_simple_select(&$1)))
- MYSQL_YYABORT;
- Select->options|= OPTION_BUFFER_RESULT;
- }
- | SQL_CALC_FOUND_ROWS
- {
- if (unlikely(Lex->check_simple_select(&$1)))
- MYSQL_YYABORT;
- Select->options|= OPTION_FOUND_ROWS;
- }
+ | SQL_BUFFER_RESULT { Select->options|= OPTION_BUFFER_RESULT; }
+ | SQL_CALC_FOUND_ROWS { Select->options|= OPTION_FOUND_ROWS; }
| ALL { Select->options|= SELECT_ALL; }
;
@@ -17853,9 +17926,7 @@ definer:
DEFINER_SYM '=' user_or_role
{
Lex->definer= $3;
- Lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
- Lex->ssl_cipher= Lex->x509_subject= Lex->x509_issuer= 0;
- bzero(&(Lex->mqh), sizeof(Lex->mqh));
+ Lex->account_options.reset();
}
;
@@ -17884,7 +17955,7 @@ view_suid:
view_list_opt:
/* empty */
{}
- | '(' view_list ')'
+ | '(' view_list ')' { }
;
view_list:
@@ -17908,38 +17979,14 @@ view_select:
lex->parsing_options.allows_variable= FALSE;
lex->create_view->select.str= (char *) YYLIP->get_cpp_ptr();
}
- opt_with_clause query_expression_body_view view_check_option
+ query_expression
+ view_check_option
{
- LEX *lex= Lex;
- size_t len= YYLIP->get_cpp_ptr() - lex->create_view->select.str;
- void *create_view_select= thd->memdup(lex->create_view->select.str, len);
- lex->create_view->select.length= len;
- lex->create_view->select.str= (char *) create_view_select;
- trim_whitespace(thd->charset(),
- &lex->create_view->select);
- lex->create_view->check= $4;
- lex->parsing_options.allows_variable= TRUE;
- lex->current_select->set_with_clause($2);
- if (Lex->check_cte_dependencies_and_resolve_references())
+ if (Lex->parsed_create_view($2, $3))
MYSQL_YYABORT;
-
}
;
-/*
- SQL Standard <query expression body> for VIEWs.
- Does not include INTO and PROCEDURE clauses.
-*/
-query_expression_body_view:
- SELECT_SYM select_options_and_item_list select_init3_view
- | table_value_constructor
- | table_value_constructor union_order_or_limit
- | table_value_constructor union_list_view
- | '(' select_paren_view ')'
- | '(' select_paren_view ')' union_order_or_limit
- | '(' select_paren_view ')' union_list_view
- ;
-
view_check_option:
/* empty */ { $$= VIEW_CHECK_NONE; }
| WITH CHECK_SYM OPTION { $$= VIEW_CHECK_CASCADED; }
@@ -18016,7 +18063,8 @@ trigger_tail:
(*static_cast<st_trg_execution_order*>(&lex->trg_chistics))= ($17);
lex->trg_chistics.ordering_clause_end= lip->get_cpp_ptr();
- if (unlikely(!lex->make_sp_head(thd, $4, &sp_handler_trigger)))
+ if (unlikely(!lex->make_sp_head(thd, $4, &sp_handler_trigger,
+ DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
@@ -18024,13 +18072,9 @@ trigger_tail:
sp_proc_stmt /* $19 */ force_lookahead /* $20 */
{ /* $21 */
LEX *lex= Lex;
- sp_head *sp= lex->sphead;
lex->sql_command= SQLCOM_CREATE_TRIGGER;
- sp->set_stmt_end(thd);
- sp->restore_thd_mem_root(thd);
-
- if (unlikely(sp->is_not_allowed_in_function("trigger")))
+ if (lex->sp_body_finalize_trigger(thd))
MYSQL_YYABORT;
/*
@@ -18038,11 +18082,10 @@ trigger_tail:
sp_proc_stmt alternatives are not saving/restoring LEX, so
lex->query_tables can be wiped out.
*/
- if (unlikely(!lex->select_lex.
- add_table_to_list(thd, $10, (LEX_CSTRING*) 0,
- TL_OPTION_UPDATING,
- TL_READ_NO_INSERT,
- MDL_SHARED_NO_WRITE)))
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, $10, (LEX_CSTRING*) 0,
+ TL_OPTION_UPDATING, TL_READ_NO_INSERT,
+ MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
}
;
@@ -18053,22 +18096,6 @@ trigger_tail:
**************************************************************************/
-udf_tail:
- opt_if_not_exists ident
- RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
- {
- LEX *lex= thd->lex;
- if (unlikely(lex->add_create_options_with_check($1)))
- MYSQL_YYABORT;
- if (unlikely(is_native_function(thd, & $2)))
- my_yyabort_error((ER_NATIVE_FCT_NAME_COLLISION, MYF(0), $2.str));
- lex->sql_command= SQLCOM_CREATE_FUNCTION;
- lex->udf.name= $2;
- lex->udf.returns= (Item_result) $4;
- lex->udf.dl= $6.str;
- }
- ;
-
sf_return_type:
RETURNS_SYM
@@ -18086,24 +18113,12 @@ sf_return_type:
}
;
-sf_tail:
- opt_if_not_exists
- sp_name
- {
- Lex->sql_command= SQLCOM_CREATE_SPFUNCTION;
- if (unlikely(!Lex->make_sp_head_no_recursive(thd, $1, $2,
- &sp_handler_function)))
- MYSQL_YYABORT;
- }
- sp_parenthesized_fdparam_list
- sf_return_type
+sf_c_chistics_and_body:
sp_c_chistics
{
LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
-
- lex->sphead->set_chistics(lex->sp_chistics);
- lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
+ lex->sphead->set_c_chistics(lex->sp_chistics);
+ lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
sp_proc_stmt_in_returns_clause force_lookahead
{
@@ -18112,18 +18127,19 @@ sf_tail:
}
;
+
sp_tail:
- opt_if_not_exists sp_name
+ sp_name
{
- Lex->sql_command= SQLCOM_CREATE_PROCEDURE;
- if (unlikely(!Lex->make_sp_head_no_recursive(thd, $1, $2,
- &sp_handler_procedure)))
+ if (unlikely(!Lex->make_sp_head_no_recursive(thd, $1,
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
}
sp_parenthesized_pdparam_list
sp_c_chistics
{
- Lex->sphead->set_chistics(Lex->sp_chistics);
+ Lex->sphead->set_c_chistics(Lex->sp_chistics);
Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
sp_proc_stmt force_lookahead
@@ -18235,35 +18251,27 @@ opt_migrate:
;
install:
- INSTALL_SYM PLUGIN_SYM ident SONAME_SYM TEXT_STRING_sys
+ INSTALL_SYM PLUGIN_SYM opt_if_not_exists ident SONAME_SYM TEXT_STRING_sys
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_INSTALL_PLUGIN;
- lex->comment= $3;
- lex->ident= $5;
+ if (Lex->stmt_install_plugin($3, $4, $6))
+ MYSQL_YYABORT;
}
| INSTALL_SYM SONAME_SYM TEXT_STRING_sys
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_INSTALL_PLUGIN;
- lex->comment= null_clex_str;
- lex->ident= $3;
+ Lex->stmt_install_plugin($3);
}
;
uninstall:
- UNINSTALL_SYM PLUGIN_SYM ident
+ UNINSTALL_SYM PLUGIN_SYM opt_if_exists ident
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
- lex->comment= $3;
+ if (Lex->stmt_uninstall_plugin_by_name($3, $4))
+ MYSQL_YYABORT;
}
- | UNINSTALL_SYM SONAME_SYM TEXT_STRING_sys
+ | UNINSTALL_SYM SONAME_SYM opt_if_exists TEXT_STRING_sys
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
- lex->comment= null_clex_str;
- lex->ident= $3;
+ if (Lex->stmt_uninstall_plugin_by_soname($3, $4))
+ MYSQL_YYABORT;
}
;
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy
index 2a42abe5d20..f49efa8c262 100644
--- a/sql/sql_yacc_ora.yy
+++ b/sql/sql_yacc_ora.yy
@@ -68,6 +68,7 @@
#include "sql_lex.h"
#include "sql_sequence.h"
#include "my_base.h"
+#include "sql_type_json.h"
/* this is to get the bison compilation windows warnings out */
#ifdef _MSC_VER
@@ -196,6 +197,20 @@ void ORAerror(THD *thd, const char *s)
Lex_for_loop_bounds_st for_loop_bounds;
Lex_trim_st trim;
vers_history_point_t vers_history_point;
+ struct
+ {
+ enum sub_select_type unit_type;
+ bool distinct;
+ } unit_operation;
+ struct
+ {
+ SELECT_LEX *first;
+ SELECT_LEX *prev_last;
+ } select_list;
+ SQL_I_List<ORDER> *select_order;
+ Lex_select_lock select_lock;
+ Lex_select_limit select_limit;
+ Lex_order_limit_lock *order_limit_lock;
/* pointers */
Create_field *create_field;
@@ -216,6 +231,7 @@ void ORAerror(THD *thd, const char *s)
class sp_lex_cursor *sp_cursor_stmt;
LEX_CSTRING *lex_str_ptr;
LEX_USER *lex_user;
+ USER_AUTH *user_auth;
List<Condition_information_item> *cond_info_list;
List<DYNCALL_CREATE_DEF> *dyncol_def_list;
List<Item> *item_list;
@@ -242,6 +258,7 @@ void ORAerror(THD *thd, const char *s)
handlerton *db_type;
st_select_lex *select_lex;
+ st_select_lex_unit *select_lex_unit;
struct p_elem_val *p_elem_value;
class Window_frame *window_frame;
class Window_frame_bound *window_frame_bound;
@@ -250,8 +267,8 @@ void ORAerror(THD *thd, const char *s)
/* enums */
enum enum_sp_suid_behaviour sp_suid;
+ enum enum_sp_aggregate_type sp_aggregate_type;
enum enum_view_suid view_suid;
- enum sub_select_type unit_type;
enum Condition_information_item::Name cond_info_item_name;
enum enum_diag_condition_item_name diag_condition_item_name;
enum Diagnostics_information::Which_area diag_area;
@@ -293,7 +310,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
/*
We should not introduce any further shift/reduce conflicts.
*/
-%expect 87
+%expect 73
/*
Comments for TOKENS.
@@ -451,6 +468,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token LEADING /* SQL-2003-R */
%token LEAVE_SYM
%token LEFT /* SQL-2003-R */
+%token LEFT_PAREN_ALT /* INTERNAL */
+%token LEFT_PAREN_WITH /* INTERNAL */
+%token LEFT_PAREN_LIKE /* INTERNAL */
%token LEX_HOSTNAME
%token LIKE /* SQL-2003-R */
%token LIMIT
@@ -513,6 +533,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token PERCENT_RANK_SYM
%token PERCENTILE_CONT_SYM
%token PERCENTILE_DISC_SYM
+%token PORTION_SYM /* SQL-2016-R */
%token POSITION_SYM /* SQL-2003-N */
%token PRECISION /* SQL-2003-R */
%token PRIMARY_SYM /* SQL-2003-R */
@@ -641,6 +662,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
Non-reserved keywords
*/
+%token <kwd> ACCOUNT_SYM /* MYSQL */
%token <kwd> ACTION /* SQL-2003-N */
%token <kwd> ADMIN_SYM /* SQL-2003-N */
%token <kwd> ADDDATE_SYM /* MYSQL-FUNC */
@@ -758,6 +780,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token <kwd> EXIT_MARIADB_SYM /* PLSQL-R */
%token <kwd> EXIT_ORACLE_SYM /* PLSQL-R */
%token <kwd> EXPANSION_SYM
+%token <kwd> EXPIRE_SYM /* MySQL */
%token <kwd> EXPORT_SYM
%token <kwd> EXTENDED_SYM
%token <kwd> EXTENT_SIZE_SYM
@@ -873,6 +896,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token <kwd> NAME_SYM /* SQL-2003-N */
%token <kwd> NATIONAL_SYM /* SQL-2003-R */
%token <kwd> NCHAR_SYM /* SQL-2003-R */
+%token <kwd> NEVER_SYM /* MySQL */
%token <kwd> NEW_SYM /* SQL-2003-R */
%token <kwd> NEXT_SYM /* SQL-2003-N */
%token <kwd> NEXTVAL_SYM /* PostgreSQL sequence function */
@@ -996,6 +1020,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%token <kwd> SQL_CALC_FOUND_ROWS
%token <kwd> SQL_NO_CACHE_SYM
%token <kwd> SQL_THREAD
+%token <kwd> STAGE_SYM
%token <kwd> STARTS_SYM
%token <kwd> START_SYM /* SQL-2003-R */
%token <kwd> STATEMENT_SYM
@@ -1074,6 +1099,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
/* A dummy token to force the priority of table_ref production in a join. */
%left CONDITIONLESS_JOIN
%left JOIN_SYM INNER_SYM STRAIGHT_JOIN CROSS LEFT RIGHT ON_SYM USING
+
%left SET_VAR
%left OR_SYM OR2_SYM
%left XOR
@@ -1095,6 +1121,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%left MYSQL_CONCAT_SYM
%nonassoc NEG '~' NOT2_SYM BINARY
%nonassoc COLLATE_SYM
+%nonassoc SUBQUERY_AS_EXPR
/*
Tokens that can change their meaning from identifier to something else
@@ -1185,7 +1212,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
ALTER TABLE t1 ADD SYSTEM VERSIONING;
*/
%left PREC_BELOW_CONTRACTION_TOKEN2
-%left TEXT_STRING '(' VALUE_SYM VERSIONING_SYM
+%left TEXT_STRING '(' ')' VALUE_SYM VERSIONING_SYM
+%left EMPTY_FROM_CLAUSE
+%right INTO
%type <lex_str>
DECIMAL_NUM FLOAT_NUM NUM LONG_NUM
@@ -1218,7 +1247,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
NCHAR_STRING
%type <lex_str_ptr>
- opt_table_alias
+ opt_table_alias_clause
+ table_alias_clause
%type <ident_cli>
IDENT
@@ -1252,7 +1282,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <simple_string>
remember_name remember_end remember_end_opt
- remember_tok_start remember_tok_end
+ remember_tok_start
wild_and_where
%type <const_simple_string>
@@ -1288,7 +1318,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
opt_temporary all_or_any opt_distinct opt_glimit_clause
opt_ignore_leaves fulltext_options union_option
opt_not
- select_derived_init transaction_access_mode_types
+ transaction_access_mode_types
opt_natural_language_mode opt_query_expansion
opt_ev_status opt_ev_on_completion ev_on_completion opt_ev_comment
ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_sql_stmt
@@ -1297,7 +1327,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
opt_default_time_precision
case_stmt_body opt_bin_mod opt_for_system_time_clause
opt_if_exists_table_element opt_if_not_exists_table_element
- opt_recursive opt_format_xid
+ opt_recursive opt_format_xid opt_for_portion_of_time_clause
%type <object_ddl_options>
create_or_replace
@@ -1377,6 +1407,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
expr_list opt_udf_expr_list udf_expr_list when_list when_list_opt_else
ident_list ident_list_arg opt_expr_list
decode_when_list_oracle
+ execute_using
+ execute_params
%type <sp_cursor_stmt>
sp_cursor_stmt_lex
@@ -1409,12 +1441,11 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <table_list>
join_table_list join_table
table_factor table_ref esc_table_ref
- table_primary_ident table_primary_derived
- select_derived derived_table_list
- select_derived_union
- derived_simple_table
- derived_query_specification
- derived_table_value_constructor
+ table_primary_ident table_primary_ident_opt_parens
+ table_primary_derived table_primary_derived_opt_parens
+ derived_table_list table_reference_list_parens
+ nested_table_reference_list join_table_parens
+ update_table_list
%type <date_time_type> date_time_type;
%type <interval> interval
@@ -1437,6 +1468,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <lex_user> user grant_user grant_role user_or_role current_role
admin_option_for_role user_maybe_role
+%type <user_auth> opt_auth_str auth_expression auth_token
+
%type <charset>
opt_collate
collate
@@ -1451,14 +1484,21 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
UNDERSCORE_CHARSET
%type <select_lex> subselect
- get_select_lex get_select_lex_derived
- simple_table
query_specification
- query_term_union_not_ready
- query_term_union_ready
- query_expression_body
- select_paren_derived
table_value_constructor
+ simple_table
+ query_simple
+ query_primary
+ subquery
+ select_into_query_specification
+
+%type <select_lex_unit>
+ query_expression
+ query_expression_no_with_clause
+ query_expression_body_ext
+ query_expression_body_ext_parens
+ query_expression_body
+ query_specification_start
%type <boolfunc2creator> comp_op
@@ -1470,11 +1510,30 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <virtual_column> opt_check_constraint check_constraint virtual_column_func
column_default_expr
-%type <unit_type> unit_type_decl
+
+%type <unit_operation> unit_type_decl
+
+%type <select_lock>
+ opt_procedure_or_into
+ opt_select_lock_type
+ select_lock_type
+ opt_lock_wait_timeout_new
+
+%type <select_limit> opt_limit_clause limit_clause limit_options
+
+%type <order_limit_lock>
+ query_expression_tail
+ opt_query_expression_tail
+ order_or_limit
+ order_limit_lock
+ opt_order_limit_lock
+
+%type <select_order> opt_order_clause order_clause order_list
%type <NONE>
- analyze_stmt_command
- query verb_clause create change select do drop insert replace insert2
+ analyze_stmt_command backup backup_statements
+ query verb_clause create change select select_into
+ do drop insert replace insert2
insert_values update delete truncate rename compound_statement
show describe load alter optimize keycache preload flush
reset purge begin_stmt_mariadb commit rollback savepoint release
@@ -1490,7 +1549,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
assign_to_keycache_parts
preload_list preload_list_or_parts preload_keys preload_keys_parts
select_item_list select_item values_list no_braces
- opt_limit_clause delete_limit_clause fields opt_values values
+ delete_limit_clause fields opt_values values
no_braces_with_names opt_values_with_names values_with_names
procedure_list procedure_list2 procedure_item
field_def handler opt_generated_always
@@ -1514,18 +1573,16 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
table_to_table_list table_to_table opt_table_list opt_as
handler_rkey_function handler_read_or_scan
single_multi table_wild_list table_wild_one opt_wild
- union_clause union_list
- subselect_start opt_and charset
- subselect_end select_var_list select_var_list_init help
+ opt_and charset
+ select_var_list select_var_list_init help
opt_extended_describe shutdown
opt_format_json
- prepare prepare_src execute deallocate
+ prepare execute deallocate
statement
sp_c_chistics sp_a_chistics sp_chistic sp_c_chistic xa
opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
view_list_opt view_list view_select
- trigger_tail sp_tail sf_tail event_tail
- udf_tail create_function_tail
+ trigger_tail event_tail
install uninstall partition_entry binlog_base64_event
normal_key_options normal_key_opts all_key_opt
spatial_key_options fulltext_key_options normal_key_opt
@@ -1534,6 +1591,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
key_using_alg
part_column_list
period_for_system_time
+ period_for_application_time
server_def server_options_list server_option
definer_opt no_definer definer get_diagnostics
parse_vcol_expr vcol_opt_specifier vcol_opt_attribute
@@ -1544,7 +1602,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
opt_delete_gtid_domain
asrow_attribute
set_assign
- sf_tail_standalone
sp_tail_standalone
opt_constraint_no_id
END_OF_INPUT
@@ -1570,6 +1627,7 @@ END_OF_INPUT
%type <plsql_cursor_attr> plsql_cursor_attr
%type <sp_suid> sp_suid
+%type <sp_aggregate_type> opt_aggregate
%type <num> sp_decl_idents sp_decl_idents_init_vars
%type <num> sp_handler_type sp_hcond_list
@@ -1627,13 +1685,16 @@ END_OF_INPUT
%type <frame_exclusion> opt_window_frame_exclusion;
%type <window_frame_bound> window_frame_start window_frame_bound;
-%type <NONE>
+%type <kwd>
'-' '+' '*' '/' '%' '(' ')'
- ',' '!' '{' '}' '&' '|' AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
+ ',' '!' '{' '}' '&' '|'
+
+%type <NONE>
+ AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
THEN_SYM WHEN_SYM DIV_SYM MOD_SYM OR2_SYM AND_AND_SYM DELETE_SYM
MYSQL_CONCAT_SYM ORACLE_CONCAT_SYM
-%type <with_clause> opt_with_clause with_clause
+%type <with_clause> with_clause
%type <with_element_head> with_element_head
@@ -1669,8 +1730,8 @@ rule: <-- starts at col 1
query:
END_OF_INPUT
{
- if (likely(!thd->bootstrap) &&
- unlikely(!(thd->lex->select_lex.options & OPTION_FOUND_COMMENT)))
+ if (!thd->bootstrap &&
+ (!(thd->lex->lex_options & OPTION_LEX_FOUND_COMMENT)))
my_yyabort_error((ER_EMPTY_QUERY, MYF(0)));
thd->lex->sql_command= SQLCOM_EMPTY_QUERY;
@@ -1724,6 +1785,7 @@ statement:
alter
| analyze
| analyze_stmt_command
+ | backup
| binlog_base64_event
| call
| change
@@ -1766,6 +1828,7 @@ statement:
| rollback
| savepoint
| select
+ | select_into
| set
| set_assign
| signal_stmt
@@ -1784,9 +1847,7 @@ statement:
deallocate:
deallocate_or_drop PREPARE_SYM ident
{
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_DEALLOCATE_PREPARE;
- lex->prepared_stmt_name= $3;
+ Lex->stmt_deallocate_prepare($3);
}
;
@@ -1796,72 +1857,58 @@ deallocate_or_drop:
;
prepare:
- PREPARE_SYM ident FROM prepare_src
- {
- LEX *lex= thd->lex;
- if (unlikely(lex->table_or_sp_used()))
- my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
- "PREPARE..FROM"));
- lex->sql_command= SQLCOM_PREPARE;
- lex->prepared_stmt_name= $2;
- }
- ;
-
-prepare_src:
- { Lex->expr_allows_subselect= false; }
+ PREPARE_SYM ident FROM
+ { Lex->clause_that_disallows_subselect= "PREPARE..FROM"; }
expr
{
- Lex->prepared_stmt_code= $2;
- Lex->expr_allows_subselect= true;
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_prepare($2, $5))
+ MYSQL_YYABORT;
}
;
execute:
- EXECUTE_SYM ident
+ EXECUTE_SYM ident execute_using
{
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_EXECUTE;
- lex->prepared_stmt_name= $2;
+ if (Lex->stmt_execute($2, $3))
+ MYSQL_YYABORT;
}
+ | EXECUTE_SYM IMMEDIATE_SYM
+ { Lex->clause_that_disallows_subselect= "EXECUTE IMMEDIATE"; }
+ expr
+ { Lex->clause_that_disallows_subselect= NULL; }
execute_using
- {}
- | EXECUTE_SYM IMMEDIATE_SYM prepare_src
{
- if (unlikely(Lex->table_or_sp_used()))
- my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
- "EXECUTE IMMEDIATE"));
- Lex->sql_command= SQLCOM_EXECUTE_IMMEDIATE;
+ if (Lex->stmt_execute_immediate($4, $6))
+ MYSQL_YYABORT;
}
- execute_using
- {}
;
execute_using:
- /* nothing */
- | USING { Lex->expr_allows_subselect= false; }
- execute_var_list
+ /* nothing */ { $$= NULL; }
+ | USING
+ { Lex->clause_that_disallows_subselect= "EXECUTE..USING"; }
+ execute_params
{
- if (unlikely(Lex->table_or_sp_used()))
- my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0),
- "EXECUTE..USING"));
- Lex->expr_allows_subselect= true;
+ $$= $3;
+ Lex->clause_that_disallows_subselect= NULL;
}
;
-execute_var_list:
- execute_var_list ',' execute_var_ident
- | execute_var_ident
- ;
-
-execute_var_ident:
+execute_params:
expr_or_ignore_or_default
{
- if (unlikely(Lex->prepared_stmt_params.push_back($1,
- thd->mem_root)))
+ if (unlikely(!($$= List<Item>::make(thd->mem_root, $1))))
+ MYSQL_YYABORT;
+ }
+ | execute_params ',' expr_or_ignore_or_default
+ {
+ if (($$= $1)->push_back($3, thd->mem_root))
MYSQL_YYABORT;
}
;
+
/* help */
help:
@@ -2120,19 +2167,24 @@ connection_name:
/* create a table */
create:
- create_or_replace opt_temporary TABLE_SYM opt_if_not_exists table_ident
+ create_or_replace opt_temporary TABLE_SYM opt_if_not_exists
{
LEX *lex= thd->lex;
if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_create_table()))
MYSQL_YYABORT;
lex->create_info.init();
- if (unlikely(lex->set_command_with_check(SQLCOM_CREATE_TABLE, $2,
- $1 | $4)))
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
+ if (lex->set_command_with_check(SQLCOM_CREATE_TABLE, $2, $1 | $4))
MYSQL_YYABORT;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_UPDATING,
- TL_WRITE,
- MDL_EXCLUSIVE)))
+ }
+ table_ident
+ {
+ LEX *lex= thd->lex;
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, $6, NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_SHARED_UPGRADABLE))
MYSQL_YYABORT;
lex->alter_info.reset();
/*
@@ -2147,12 +2199,14 @@ create:
create_body
{
LEX *lex= thd->lex;
- lex->current_select= &lex->select_lex;
create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
}
| create_or_replace opt_temporary SEQUENCE_SYM opt_if_not_exists table_ident
{
LEX *lex= thd->lex;
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_create_sequence()))
MYSQL_YYABORT;
lex->create_info.init();
@@ -2160,10 +2214,9 @@ create:
$1 | $4)))
MYSQL_YYABORT;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_UPDATING,
- TL_WRITE,
- MDL_EXCLUSIVE)))
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_EXCLUSIVE))
MYSQL_YYABORT;
/*
@@ -2186,8 +2239,9 @@ create:
if (unlikely(lex->create_info.seq_create_info->check_and_adjust(1)))
{
my_error(ER_SEQUENCE_INVALID_DATA, MYF(0),
- lex->select_lex.table_list.first->db.str,
- lex->select_lex.table_list.first->table_name.str);
+ lex->first_select_lex()->table_list.first->db.str,
+ lex->first_select_lex()->table_list.first->
+ table_name.str);
MYSQL_YYABORT;
}
@@ -2200,42 +2254,64 @@ create:
Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
Lex->create_info.sequence= 1;
- lex->current_select= &lex->select_lex;
create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
}
- | create_or_replace opt_unique INDEX_SYM opt_if_not_exists ident
+ | create_or_replace opt_unique INDEX_SYM opt_if_not_exists
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ ident
opt_key_algorithm_clause
ON table_ident
{
- if (unlikely(Lex->add_create_index_prepare($8)))
+ if (Lex->add_create_index_prepare($9))
MYSQL_YYABORT;
- if (unlikely(Lex->add_create_index($2, &$5, $6, $1 | $4)))
+ if (Lex->add_create_index($2, &$6, $7, $1 | $4))
MYSQL_YYABORT;
}
'(' key_list ')' opt_lock_wait_timeout normal_key_options
- opt_index_lock_algorithm { }
- | create_or_replace fulltext INDEX_SYM opt_if_not_exists ident
+ opt_index_lock_algorithm
+ {
+ Lex->pop_select(); //main select
+ }
+ | create_or_replace fulltext INDEX_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ opt_if_not_exists ident
ON table_ident
{
- if (unlikely(Lex->add_create_index_prepare($7)))
+ if (Lex->add_create_index_prepare($8))
MYSQL_YYABORT;
- if (unlikely(Lex->add_create_index($2, &$5, HA_KEY_ALG_UNDEF,
- $1 | $4)))
+ if (Lex->add_create_index($2, &$6, HA_KEY_ALG_UNDEF, $1 | $5))
MYSQL_YYABORT;
}
'(' key_list ')' opt_lock_wait_timeout fulltext_key_options
- opt_index_lock_algorithm { }
- | create_or_replace spatial INDEX_SYM opt_if_not_exists ident
+ opt_index_lock_algorithm
+ {
+ Lex->pop_select(); //main select
+ }
+ | create_or_replace spatial INDEX_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ opt_if_not_exists ident
ON table_ident
{
- if (unlikely(Lex->add_create_index_prepare($7)))
+ if (Lex->add_create_index_prepare($8))
MYSQL_YYABORT;
- if (unlikely(Lex->add_create_index($2, &$5, HA_KEY_ALG_UNDEF,
- $1 | $4)))
+ if (Lex->add_create_index($2, &$6, HA_KEY_ALG_UNDEF, $1 | $5))
MYSQL_YYABORT;
}
'(' key_list ')' opt_lock_wait_timeout spatial_key_options
- opt_index_lock_algorithm { }
+ opt_index_lock_algorithm
+ {
+ Lex->pop_select(); //main select
+ }
| create_or_replace DATABASE opt_if_not_exists ident
{
Lex->create_info.default_table_charset= NULL;
@@ -2252,50 +2328,122 @@ create:
| create_or_replace definer_opt opt_view_suid VIEW_SYM
opt_if_not_exists table_ident
{
- if (unlikely(Lex->add_create_view(thd, $1 | $5,
- DTYPE_ALGORITHM_UNDEFINED, $3,
- $6)))
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
+ if (Lex->add_create_view(thd, $1 | $5,
+ DTYPE_ALGORITHM_UNDEFINED, $3, $6))
MYSQL_YYABORT;
}
view_list_opt AS view_select
- { }
+ {
+ Lex->pop_select(); //main select
+ }
| create_or_replace view_algorithm definer_opt opt_view_suid VIEW_SYM
opt_if_not_exists table_ident
{
- if (unlikely(Lex->add_create_view(thd, $1 | $6, $2, $4, $7)))
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_create_view(thd, $1 | $6, $2, $4, $7))
MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
}
view_list_opt AS view_select
- { }
+ {
+ Lex->pop_select(); //main select
+ }
| create_or_replace definer_opt TRIGGER_SYM
- { Lex->create_info.set($1); }
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->create_info.set($1);
+ }
trigger_tail
- { }
- | create_or_replace definer_opt PROCEDURE_SYM
- { Lex->create_info.set($1); }
+ {
+ Lex->pop_select(); //main select
+ }
+ | create_or_replace definer_opt PROCEDURE_SYM opt_if_not_exists
+ {
+ if (Lex->stmt_create_procedure_start($1 | $4))
+ MYSQL_YYABORT;
+ }
sp_tail_standalone
- { }
+ {
+ Lex->stmt_create_routine_finalize();
+ }
| create_or_replace definer_opt EVENT_SYM
- { Lex->create_info.set($1); }
- event_tail
- { }
- | create_or_replace definer FUNCTION_SYM
- { Lex->create_info.set($1); }
- sf_tail_standalone
- { }
- | create_or_replace no_definer FUNCTION_SYM
- { Lex->create_info.set($1); }
- create_function_tail
- { }
- | create_or_replace no_definer AGGREGATE_SYM FUNCTION_SYM
{
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
Lex->create_info.set($1);
- Lex->udf.type= UDFTYPE_AGGREGATE;
}
- udf_tail
- { }
- | create_or_replace USER_SYM opt_if_not_exists clear_privileges grant_list
- opt_require_clause opt_resource_options
+ event_tail
+ {
+ Lex->pop_select(); //main select
+ }
+ | create_or_replace definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ sp_name RETURN_ORACLE_SYM
+ {
+ if (Lex->stmt_create_stored_function_start($1 | $5, $3, $6))
+ MYSQL_YYABORT;
+ }
+ sf_return_type
+ sf_c_chistics_and_body_standalone
+ opt_sp_name
+ {
+ if (Lex->stmt_create_stored_function_finalize_standalone($11))
+ MYSQL_YYABORT;
+ }
+ | create_or_replace definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ sp_name '('
+ {
+ if (Lex->stmt_create_stored_function_start($1 | $5, $3, $6))
+ MYSQL_YYABORT;
+ }
+ sp_fdparam_list ')'
+ RETURN_ORACLE_SYM sf_return_type
+ sf_c_chistics_and_body_standalone
+ opt_sp_name
+ {
+ if (Lex->stmt_create_stored_function_finalize_standalone($14))
+ MYSQL_YYABORT;
+ }
+ | create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ sp_name RETURN_ORACLE_SYM
+ {
+ if (Lex->stmt_create_stored_function_start($1 | $5, $3, $6))
+ MYSQL_YYABORT;
+ }
+ sf_return_type
+ sf_c_chistics_and_body_standalone
+ opt_sp_name
+ {
+ if (Lex->stmt_create_stored_function_finalize_standalone($11))
+ MYSQL_YYABORT;
+ }
+ | create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ sp_name '('
+ {
+ if (Lex->stmt_create_stored_function_start($1 | $5, $3, $6))
+ MYSQL_YYABORT;
+ }
+ sp_fdparam_list ')'
+ RETURN_ORACLE_SYM sf_return_type
+ sf_c_chistics_and_body_standalone
+ opt_sp_name
+ {
+ if (Lex->stmt_create_stored_function_finalize_standalone($14))
+ MYSQL_YYABORT;
+ }
+ | create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists
+ ident RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
+ {
+ if (Lex->stmt_create_udf_function($1 | $5, $3, $6,
+ (Item_result) $8, $10))
+ MYSQL_YYABORT;
+ }
+ | create_or_replace USER_SYM opt_if_not_exists clear_privileges
+ grant_list opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration
{
if (unlikely(Lex->set_command_with_check(SQLCOM_CREATE_USER,
$1 | $3)))
@@ -2331,7 +2479,7 @@ create:
&sp_handler_package_spec,
$5, $1 | $4))))
MYSQL_YYABORT;
- pkg->set_chistics(Lex->sp_chistics);
+ pkg->set_c_chistics(Lex->sp_chistics);
}
opt_package_specification_element_list END
remember_end_opt opt_sp_name
@@ -2351,7 +2499,7 @@ create:
&sp_handler_package_body,
$6, $1 | $5))))
MYSQL_YYABORT;
- pkg->set_chistics(Lex->sp_chistics);
+ pkg->set_c_chistics(Lex->sp_chistics);
Lex->sp_block_init(thd);
}
package_implementation_declare_section
@@ -2428,13 +2576,14 @@ package_specification_function:
MYSQL_YYABORT;
thd->lex= $2;
if (unlikely(!$2->make_sp_head_no_recursive(thd, spname,
- &sp_handler_package_function)))
+ &sp_handler_package_function,
+ NOT_AGGREGATE)))
MYSQL_YYABORT;
$1->sphead->get_package()->m_current_routine= $2;
(void) is_native_function_with_warn(thd, &$3);
}
opt_sp_parenthesized_fdparam_list
- sf_return_type
+ RETURN_ORACLE_SYM sf_return_type
sp_c_chistics
{
sp_head *sp= thd->lex->sphead;
@@ -2454,7 +2603,8 @@ package_specification_procedure:
MYSQL_YYABORT;
thd->lex= $2;
if (unlikely(!$2->make_sp_head_no_recursive(thd, spname,
- &sp_handler_package_procedure)))
+ &sp_handler_package_procedure,
+ DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
$1->sphead->get_package()->m_current_routine= $2;
}
@@ -2504,11 +2654,6 @@ package_implementation_function_body:
}
sp_body opt_package_routine_end_name
{
- if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
- {
- my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
- }
- Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
if (unlikely(thd->lex->sp_body_finalize_function(thd) ||
thd->lex->sphead->check_package_routine_end_name($5)))
MYSQL_YYABORT;
@@ -2528,7 +2673,7 @@ package_implementation_procedure_body:
sp_body opt_package_routine_end_name
{
if (unlikely(thd->lex->sp_body_finalize_procedure(thd) ||
- thd->lex->sphead->check_package_routine_end_name($5)))
+ thd->lex->sphead->check_package_routine_end_name($5)))
MYSQL_YYABORT;
thd->lex= $2;
}
@@ -2566,10 +2711,6 @@ package_specification_element:
}
;
-create_function_tail:
- sf_tail_standalone { }
- | udf_tail { Lex->udf.type= UDFTYPE_FUNCTION; }
- ;
opt_sequence:
/* empty */ { }
@@ -2892,20 +3033,17 @@ ev_sql_stmt:
if (unlikely(!lex->make_sp_head(thd,
lex->event_parse_data->identifier,
- &sp_handler_procedure)))
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
}
sp_proc_stmt force_lookahead
{
- LEX *lex= thd->lex;
-
/* return back to the original memory root ASAP */
- lex->sphead->set_stmt_end(thd);
- lex->sphead->restore_thd_mem_root(thd);
-
- lex->event_parse_data->body_changed= TRUE;
+ if (Lex->sp_body_finalize_event(thd))
+ MYSQL_YYABORT;
}
;
@@ -2917,13 +3055,16 @@ clear_privileges:
lex->columns.empty();
lex->grant= lex->grant_tot_col= 0;
lex->all_privileges= 0;
- lex->select_lex.db= null_clex_str;
- lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
- lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0;
- bzero((char *)&(lex->mqh),sizeof(lex->mqh));
+ lex->first_select_lex()->db= null_clex_str;
+ lex->account_options.reset();
}
;
+opt_aggregate:
+ /* Empty */ { $$= NOT_AGGREGATE; }
+ | AGGREGATE_SYM { $$= GROUP_AGGREGATE; }
+ ;
+
sp_name:
ident '.' ident
{
@@ -3061,7 +3202,18 @@ sp_cparams:
/* Stored FUNCTION parameter declaration list */
sp_fdparam_list:
/* Empty */
- | sp_fdparams
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ Lex->sphead->m_param_end= Lex->sphead->m_param_begin;
+ }
+ |
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ }
+ sp_fdparams
+ {
+ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
+ }
;
sp_fdparams:
@@ -3168,18 +3320,6 @@ sp_opt_inout:
| IN_SYM OUT_SYM { $$= sp_variable::MODE_INOUT; }
;
-sp_parenthesized_fdparam_list:
- '('
- {
- Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
- }
- sp_fdparam_list
- ')'
- {
- Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
- }
- ;
-
sp_parenthesized_pdparam_list:
'('
{
@@ -3202,7 +3342,7 @@ sp_no_param:
opt_sp_parenthesized_fdparam_list:
sp_no_param
- | sp_parenthesized_fdparam_list
+ | '(' sp_fdparam_list ')'
;
opt_sp_parenthesized_pdparam_list:
@@ -3297,12 +3437,8 @@ optionally_qualified_column_ident:
row_field_name:
ident_directly_assignable
{
- if (unlikely(check_string_char_length(&$1, 0, NAME_CHAR_LEN,
- system_charset_info, 1)))
- my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), $1.str));
- if (unlikely(!($$= new (thd->mem_root) Spvar_definition())))
+ if (!($$= Lex->row_field_name(thd, $1)))
MYSQL_YYABORT;
- Lex->init_last_field($$, &$1, thd->variables.collation_database);
}
;
@@ -3313,17 +3449,12 @@ row_field_definition:
row_field_definition_list:
row_field_definition
{
- if (unlikely(!($$= new (thd->mem_root) Row_definition_list())) ||
- unlikely($$->push_back($1, thd->mem_root)))
+ if (!($$= Row_definition_list::make(thd->mem_root, $1)))
MYSQL_YYABORT;
}
| row_field_definition_list ',' row_field_definition
{
- uint unused;
- if (unlikely($1->find_row_field_by_name(&$3->field_name, &unused)))
- my_yyabort_error((ER_DUP_FIELDNAME, MYF(0), $3->field_name.str));
- $$= $1;
- if (unlikely($$->push_back($3, thd->mem_root)))
+ if (($$= $1)->append_uniq(thd->mem_root, $3))
MYSQL_YYABORT;
}
;
@@ -3447,10 +3578,13 @@ sp_cursor_stmt:
{
DBUG_ASSERT(thd->free_list == NULL);
Lex->sphead->reset_lex(thd, $1);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
select
{
DBUG_ASSERT(Lex == $1);
+ Lex->pop_select(); //main select
if (unlikely($1->stmt_finalize(thd)) ||
unlikely($1->sphead->restore_lex(thd)))
MYSQL_YYABORT;
@@ -3579,7 +3713,7 @@ raise_stmt_oracle:
signal_stmt:
SIGNAL_SYM signal_value opt_set_signal_information
{
- if (unlikely(Lex->add_signal_statement(thd, $2)))
+ if (Lex->add_signal_statement(thd, $2))
MYSQL_YYABORT;
}
;
@@ -3979,48 +4113,17 @@ sp_proc_stmt_statement:
Lex_input_stream *lip= YYLIP;
lex->sphead->reset_lex(thd);
+ /*
+ We should not push main select here, it will be done or not
+ done by the statement, we just provide only new LEX for the
+ statement here as if it is start of parsing new statement.
+ */
lex->sphead->m_tmp_query= lip->get_tok_start();
}
sp_statement
{
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
- sp_head *sp= lex->sphead;
-
- sp->m_flags|= sp_get_flags_for_command(lex);
- /* "USE db" doesn't work in a procedure */
- if (unlikely(lex->sql_command == SQLCOM_CHANGE_DB))
- my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "USE"));
- /*
- Don't add an instruction for SET statements, since all
- instructions for them were already added during processing
- of "set" rule.
- */
- DBUG_ASSERT(lex->sql_command != SQLCOM_SET_OPTION ||
- lex->var_list.is_empty());
- if (lex->sql_command != SQLCOM_SET_OPTION)
- {
- sp_instr_stmt *i=new (thd->mem_root)
- sp_instr_stmt(sp->instructions(), lex->spcont, lex);
- if (unlikely(i == NULL))
- MYSQL_YYABORT;
-
- /*
- Extract the query statement from the tokenizer. The
- end is either lex->ptr, if there was no lookahead,
- lex->tok_end otherwise.
- */
- if (yychar == YYEMPTY)
- i->m_query.length= lip->get_ptr() - sp->m_tmp_query;
- else
- i->m_query.length= lip->get_tok_start() - sp->m_tmp_query;;
- if (unlikely(!(i->m_query.str= strmake_root(thd->mem_root,
- sp->m_tmp_query,
- i->m_query.length))) ||
- unlikely(sp->add_instr(i)))
- MYSQL_YYABORT;
- }
- if (unlikely(sp->restore_lex(thd)))
+ if (Lex->sp_proc_stmt_statement_finalize(thd, yychar == YYEMPTY) ||
+ Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
;
@@ -4033,11 +4136,16 @@ RETURN_ALLMODES_SYM:
sp_proc_stmt_return:
RETURN_ALLMODES_SYM
- { Lex->sphead->reset_lex(thd); }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
+ Lex->pop_select(); //main select
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
if (unlikely(sp->m_handler->add_instr_freturn(thd, sp, lex->spcont,
@@ -4049,8 +4157,6 @@ sp_proc_stmt_return:
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
- if (Lex->check_cte_dependencies_and_resolve_references())
- MYSQL_YYABORT;
if (unlikely(sp->m_handler->add_instr_preturn(thd, sp,
lex->spcont)))
MYSQL_YYABORT;
@@ -4058,7 +4164,16 @@ sp_proc_stmt_return:
;
reset_lex_expr:
- { Lex->sphead->reset_lex(thd); } expr { $$= $2; }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+ expr
+ {
+ $$= $2;
+ Lex->pop_select(); //main select
+ }
;
sp_proc_stmt_exit_oracle:
@@ -4074,14 +4189,14 @@ sp_proc_stmt_exit_oracle:
}
| EXIT_ORACLE_SYM WHEN_SYM reset_lex_expr
{
- if (unlikely(Lex->sp_exit_statement(thd, $3)) ||
- unlikely(Lex->sphead->restore_lex(thd)))
+ if (Lex->sp_exit_statement(thd, $3) ||
+ Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
| EXIT_ORACLE_SYM label_ident WHEN_SYM reset_lex_expr
{
- if (unlikely(Lex->sp_exit_statement(thd, &$2, $4)) ||
- unlikely(Lex->sphead->restore_lex(thd)))
+ if (Lex->sp_exit_statement(thd, &$2, $4) ||
+ Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
;
@@ -4099,14 +4214,14 @@ sp_proc_stmt_continue_oracle:
}
| CONTINUE_ORACLE_SYM WHEN_SYM reset_lex_expr
{
- if (unlikely(Lex->sp_continue_statement(thd, $3)) ||
- unlikely(Lex->sphead->restore_lex(thd)))
+ if (Lex->sp_continue_statement(thd, $3) ||
+ Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
| CONTINUE_ORACLE_SYM label_ident WHEN_SYM reset_lex_expr
{
- if (unlikely(Lex->sp_continue_statement(thd, &$2, $4)) ||
- unlikely(Lex->sphead->restore_lex(thd)))
+ if (Lex->sp_continue_statement(thd, &$2, $4) ||
+ Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
;
@@ -4157,6 +4272,8 @@ assignment_source_expr:
{
DBUG_ASSERT(thd->free_list == NULL);
Lex->sphead->reset_lex(thd, $1);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
expr
{
@@ -4165,7 +4282,8 @@ assignment_source_expr:
$$->sp_lex_in_use= true;
$$->set_item_and_free_list($3, thd->free_list);
thd->free_list= NULL;
- if (unlikely($$->sphead->restore_lex(thd)))
+ Lex->pop_select(); //main select
+ if ($$->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
;
@@ -4174,6 +4292,9 @@ for_loop_bound_expr:
assignment_source_lex
{
Lex->sphead->reset_lex(thd, $1);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ Lex->current_select->parsing_place= FOR_LOOP_BOUND;
}
expr
{
@@ -4181,8 +4302,10 @@ for_loop_bound_expr:
$$= $1;
$$->sp_lex_in_use= true;
$$->set_item_and_free_list($3, NULL);
+ Lex->pop_select(); //main select
if (unlikely($$->sphead->restore_lex(thd)))
MYSQL_YYABORT;
+ Lex->current_select->parsing_place= NO_MATTER;
}
;
@@ -4232,7 +4355,12 @@ sp_proc_stmt_fetch_head:
;
sp_proc_stmt_fetch:
- sp_proc_stmt_fetch_head sp_fetch_list { }
+ sp_proc_stmt_fetch_head sp_fetch_list { }
+ | FETCH_SYM GROUP_SYM NEXT_SYM ROW_SYM
+ {
+ if (unlikely(Lex->sp_add_agg_cfetch()))
+ MYSQL_YYABORT;
+ }
;
sp_proc_stmt_close:
@@ -4287,7 +4415,11 @@ sp_fetch_list:
;
sp_if:
- { Lex->sphead->reset_lex(thd); }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr THEN_SYM
{
LEX *lex= Lex;
@@ -4301,6 +4433,7 @@ sp_if:
unlikely(sp->add_cont_backpatch(i)) ||
unlikely(sp->add_instr(i)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
if (unlikely(sp->restore_lex(thd)))
MYSQL_YYABORT;
}
@@ -4401,12 +4534,18 @@ case_stmt_specification:
;
case_stmt_body:
- { Lex->sphead->reset_lex(thd); /* For expr $2 */ }
+ {
+ Lex->sphead->reset_lex(thd); /* For expr $2 */
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr
{
if (unlikely(Lex->case_stmt_action_expr($2)))
MYSQL_YYABORT;
- if (unlikely(Lex->sphead->restore_lex(thd)))
+
+ Lex->pop_select(); //main select
+ if (Lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
}
simple_when_clause_list
@@ -4429,6 +4568,8 @@ simple_when_clause:
WHEN_SYM
{
Lex->sphead->reset_lex(thd); /* For expr $3 */
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
expr
{
@@ -4437,6 +4578,7 @@ simple_when_clause:
LEX *lex= Lex;
if (unlikely(lex->case_stmt_action_when($3, true)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
/* For expr $3 */
if (unlikely(lex->sphead->restore_lex(thd)))
MYSQL_YYABORT;
@@ -4453,12 +4595,15 @@ searched_when_clause:
WHEN_SYM
{
Lex->sphead->reset_lex(thd); /* For expr $3 */
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
expr
{
LEX *lex= Lex;
if (unlikely(lex->case_stmt_action_when($3, false)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
/* For expr $3 */
if (unlikely(lex->sphead->restore_lex(thd)))
MYSQL_YYABORT;
@@ -4647,9 +4792,15 @@ opt_sp_for_loop_direction:
;
sp_for_loop_index_and_bounds:
- ident_directly_assignable sp_for_loop_bounds
+ ident_directly_assignable
{
- if (unlikely(Lex->sp_for_loop_declarations(thd, &$$, &$1, $2)))
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+ sp_for_loop_bounds
+ {
+ Lex->pop_select(); //main select
+ if (unlikely(Lex->sp_for_loop_declarations(thd, &$$, &$1, $3)))
MYSQL_YYABORT;
}
;
@@ -4695,8 +4846,11 @@ while_body:
LEX *lex= Lex;
if (unlikely(lex->sp_while_loop_expression(thd, $1)))
MYSQL_YYABORT;
- if (unlikely(lex->sphead->restore_lex(thd)))
+ Lex->pop_select(); //main select
+ if (lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
}
sp_proc_stmts1 END LOOP_SYM
{
@@ -4707,7 +4861,11 @@ while_body:
repeat_body:
sp_proc_stmts1 UNTIL_SYM
- { Lex->sphead->reset_lex(thd); }
+ {
+ Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
expr END REPEAT_SYM
{
LEX *lex= Lex;
@@ -4718,7 +4876,8 @@ repeat_body:
if (unlikely(i == NULL) ||
unlikely(lex->sphead->add_instr(i)))
MYSQL_YYABORT;
- if (unlikely(lex->sphead->restore_lex(thd)))
+ Lex->pop_select(); //main select
+ if (lex->sphead->restore_lex(thd))
MYSQL_YYABORT;
/* We can shortcut the cont_backpatch here */
i->m_cont_dest= ip+1;
@@ -4746,6 +4905,8 @@ sp_labeled_control:
if (unlikely(Lex->sp_push_loop_label(thd, &$1)))
MYSQL_YYABORT;
Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
while_body pop_sp_loop_label
{ }
@@ -4797,6 +4958,8 @@ sp_unlabeled_control:
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
Lex->sphead->reset_lex(thd);
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
while_body
{
@@ -5198,26 +5361,16 @@ size_number:
*/
create_body:
- '(' create_field_list ')'
+ create_field_list_parens
{ Lex->create_info.option_list= NULL; }
opt_create_table_options opt_create_partitioning opt_create_select {}
| opt_create_table_options opt_create_partitioning opt_create_select {}
- /*
- the following rule is redundant, but there's a shift/reduce
- conflict that prevents the rule above from parsing a syntax like
- CREATE TABLE t1 (SELECT 1);
- */
- | '(' create_select_query_specification ')'
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_list {}
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_order_or_limit {}
| create_like
{
Lex->create_info.add(DDL_options_st::OPT_LIKE);
- TABLE_LIST *src_table= Lex->select_lex.add_table_to_list(thd,
- $1, NULL, 0, TL_READ, MDL_SHARED_READ);
+ TABLE_LIST *src_table= Lex->first_select_lex()->
+ add_table_to_list(thd, $1, NULL, 0, TL_READ, MDL_SHARED_READ);
if (unlikely(! src_table))
MYSQL_YYABORT;
/* CREATE TABLE ... LIKE is not allowed for views. */
@@ -5227,7 +5380,7 @@ create_body:
create_like:
LIKE table_ident { $$= $2; }
- | '(' LIKE table_ident ')' { $$= $3; }
+ | LEFT_PAREN_LIKE LIKE table_ident ')' { $$= $3; }
;
opt_create_select:
@@ -5241,23 +5394,19 @@ opt_create_select:
;
create_select_query_expression:
- opt_with_clause SELECT_SYM create_select_part2 opt_table_expression
- create_select_part4
- {
- Select->set_braces(0);
- Select->set_with_clause($1);
+ query_expression
+ {
+ if (Lex->parsed_insert_select($1->first_select()))
+ MYSQL_YYABORT;
}
- union_clause
- | opt_with_clause SELECT_SYM create_select_part2
- create_select_part3_union_not_ready create_select_part4
+ | LEFT_PAREN_WITH with_clause query_expression_no_with_clause ')'
{
- Select->set_with_clause($1);
+ SELECT_LEX *first_select= $3->first_select();
+ $3->set_with_clause($2);
+ $2->attach_to(first_select);
+ if (Lex->parsed_insert_select(first_select))
+ MYSQL_YYABORT;
}
- | '(' create_select_query_specification ')'
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_list {}
- | '(' create_select_query_specification ')'
- { Select->set_braces(1);} union_order_or_limit {}
;
opt_create_partitioning:
@@ -5345,8 +5494,13 @@ partition_entry:
We enter here when opening the frm file to translate
partition info string into part_info data structure.
*/
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ partition
+ {
+ Lex->pop_select(); //main select
}
- partition {}
;
partition:
@@ -5995,58 +6149,6 @@ opt_versioning_interval_start:
End of partition parser part
*/
-create_select_query_specification:
- opt_with_clause SELECT_SYM create_select_part2 create_select_part3
- create_select_part4
- {
- Select->set_with_clause($1);
- if (Lex->check_cte_dependencies_and_resolve_references())
- MYSQL_YYABORT;
- }
- ;
-
-create_select_part2:
- {
- LEX *lex=Lex;
- if (lex->sql_command == SQLCOM_INSERT)
- lex->sql_command= SQLCOM_INSERT_SELECT;
- else if (lex->sql_command == SQLCOM_REPLACE)
- lex->sql_command= SQLCOM_REPLACE_SELECT;
- /*
- The following work only with the local list, the global list
- is created correctly in this case
- */
- lex->current_select->table_list.save_and_clear(&lex->save_list);
- mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LIST;
- }
- select_options select_item_list
- {
- Select->parsing_place= NO_MATTER;
- }
- ;
-
-create_select_part3:
- opt_table_expression
- | create_select_part3_union_not_ready
- ;
-
-create_select_part3_union_not_ready:
- table_expression order_or_limit
- | order_or_limit
- ;
-
-create_select_part4:
- opt_select_lock_type
- {
- /*
- The following work only with the local list, the global list
- is created correctly in this case
- */
- Lex->current_select->table_list.push_front(&Lex->save_list);
- }
- ;
-
opt_as:
/* empty */ {}
| AS {}
@@ -6274,7 +6376,7 @@ create_table_option:
}
| UNION_SYM opt_equal
{
- Lex->select_lex.table_list.save_and_clear(&Lex->save_list);
+ Lex->first_select_lex()->table_list.save_and_clear(&Lex->save_list);
}
'(' opt_table_list ')'
{
@@ -6283,8 +6385,8 @@ create_table_option:
from the global list.
*/
LEX *lex=Lex;
- lex->create_info.merge_list= lex->select_lex.table_list.first;
- lex->select_lex.table_list= lex->save_list;
+ lex->create_info.merge_list= lex->first_select_lex()->table_list.first;
+ lex->first_select_lex()->table_list= lex->save_list;
/*
When excluding union list from the global list we assume that
elements of the former immediately follow elements which represent
@@ -6387,7 +6489,7 @@ versioning_option:
{
if (DBUG_EVALUATE_IF("sysvers_force", 0, 1))
{
- my_error(ER_VERS_TEMPORARY, MYF(0));
+ my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
MYSQL_YYABORT;
}
}
@@ -6474,6 +6576,13 @@ create_field_list:
}
;
+create_field_list_parens:
+ LEFT_PAREN_ALT field_list ')'
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ }
+ ;
+
field_list:
field_list_item
| field_list ',' field_list_item
@@ -6484,6 +6593,7 @@ field_list_item:
| key_def
| constraint_def
| period_for_system_time
+ | PERIOD_SYM period_for_application_time { }
;
column_def:
@@ -6580,7 +6690,7 @@ key_def:
constraint_def:
opt_constraint check_constraint
{
- Lex->add_constraint(&$1, $2, FALSE);
+ Lex->add_constraint($1, $2, FALSE);
}
;
@@ -6589,7 +6699,15 @@ period_for_system_time:
PERIOD_SYM FOR_SYSTEM_TIME_SYM '(' ident ',' ident ')'
{
Vers_parse_info &info= Lex->vers_get_info();
- info.set_system_time($4, $6);
+ info.set_period($4, $6);
+ }
+ ;
+
+period_for_application_time:
+ FOR_SYM ident '(' ident ',' ident ')'
+ {
+ if (Lex->add_period($2, $4, $6))
+ MYSQL_YYABORT;
}
;
@@ -6779,6 +6897,8 @@ parse_vcol_expr:
Prevent the end user from invoking this command.
*/
MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
}
expr
{
@@ -6786,17 +6906,12 @@ parse_vcol_expr:
if (unlikely(!v))
MYSQL_YYABORT;
Lex->last_field->vcol_info= v;
+ Lex->pop_select(); //main select
}
;
parenthesized_expr:
- subselect
- {
- $$= new (thd->mem_root) Item_singlerow_subselect(thd, $1);
- if (unlikely($$ == NULL))
- MYSQL_YYABORT;
- }
- | expr
+ expr
| expr ',' expr_list
{
$3->push_front($1, thd->mem_root);
@@ -6815,6 +6930,16 @@ virtual_column_func:
MYSQL_YYABORT;
$$= v;
}
+ | subquery
+ {
+ Item *item;
+ if (!(item= new (thd->mem_root) Item_singlerow_subselect(thd, $1)))
+ MYSQL_YYABORT;
+ Virtual_column_info *v= add_virtual_expression(thd, item);
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ $$= v;
+ }
;
expr_or_literal: column_default_non_parenthesized_expr | signed_literal ;
@@ -7106,7 +7231,7 @@ field_type_lob:
| JSON_SYM opt_compressed
{
Lex->charset= &my_charset_utf8mb4_bin;
- $$.set(&type_handler_long_blob);
+ $$.set(&type_handler_json_longtext);
}
;
@@ -7215,7 +7340,6 @@ opt_field_length_default_1:
| field_length { $$= $1; }
;
-
/*
In sql_mode=ORACLE, real size of VARCHAR and CHAR with no length
in SP parameters is fixed at runtime with the length of real args.
@@ -7873,23 +7997,25 @@ alter:
Lex->name= null_clex_str;
Lex->table_type= TABLE_TYPE_UNKNOWN;
Lex->sql_command= SQLCOM_ALTER_TABLE;
- Lex->duplicates= DUP_ERROR;
- Lex->select_lex.init_order();
+ Lex->duplicates= DUP_ERROR;
+ Lex->first_select_lex()->order_list.empty();
Lex->create_info.init();
Lex->create_info.row_type= ROW_TYPE_NOT_USED;
Lex->alter_info.reset();
Lex->no_write_to_binlog= 0;
Lex->create_info.storage_media= HA_SM_DEFAULT;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
DBUG_ASSERT(!Lex->m_sql_cmd);
}
alter_options TABLE_SYM table_ident opt_lock_wait_timeout
{
- if (unlikely(!Lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_UPDATING,
- TL_READ_NO_INSERT,
- MDL_SHARED_UPGRADABLE)))
+ if (!Lex->first_select_lex()->
+ add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING,
+ TL_READ_NO_INSERT, MDL_SHARED_UPGRADABLE))
MYSQL_YYABORT;
- Lex->select_lex.db= (Lex->select_lex.table_list.first)->db;
+ Lex->first_select_lex()->db=
+ (Lex->first_select_lex()->table_list.first)->db;
Lex->create_last_non_select_table= Lex->last_table();
Lex->mark_first_table_as_inserting();
}
@@ -7902,11 +8028,14 @@ alter:
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
+ Lex->pop_select(); //main select
}
| ALTER DATABASE ident_or_empty
{
Lex->create_info.default_table_charset= NULL;
Lex->create_info.used_fields= 0;
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
}
create_database_options
{
@@ -7916,6 +8045,7 @@ alter:
if (lex->name.str == NULL &&
unlikely(lex->copy_db_to(&lex->name)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
}
| ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM
{
@@ -7931,6 +8061,8 @@ alter:
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE"));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
lex->sp_chistics.init();
}
sp_a_chistics
@@ -7939,6 +8071,9 @@ alter:
lex->sql_command= SQLCOM_ALTER_PROCEDURE;
lex->spname= $3;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
| ALTER FUNCTION_SYM sp_name
{
@@ -7946,6 +8081,8 @@ alter:
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "FUNCTION"));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
lex->sp_chistics.init();
}
sp_a_chistics
@@ -7954,14 +8091,23 @@ alter:
lex->sql_command= SQLCOM_ALTER_FUNCTION;
lex->spname= $3;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
| ALTER view_algorithm definer_opt opt_view_suid VIEW_SYM table_ident
{
- if (unlikely(Lex->add_alter_view(thd, $2, $4, $6)))
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, $2, $4, $6))
MYSQL_YYABORT;
}
view_list_opt AS view_select
- {}
+ {
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
| ALTER definer_opt opt_view_suid VIEW_SYM table_ident
/*
We have two separate rules for ALTER VIEW rather that
@@ -7969,14 +8115,22 @@ alter:
with the ALTER EVENT below.
*/
{
- if (unlikely(Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, $3, $5)))
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, $3, $5))
MYSQL_YYABORT;
}
view_list_opt AS view_select
- {}
+ {
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
| ALTER definer_opt remember_name EVENT_SYM sp_name
{
- /*
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ /*
It is safe to use Lex->spname because
ALTER EVENT xxx RENATE TO yyy DO ALTER EVENT RENAME TO
is not allowed. Lex->spname is used in the case of RENAME TO
@@ -8008,6 +8162,8 @@ alter:
*/
Lex->sql_command= SQLCOM_ALTER_EVENT;
Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();
+
+ Lex->pop_select(); //main select
}
| ALTER TABLESPACE alter_tablespace_info
{
@@ -8037,7 +8193,7 @@ alter:
} OPTIONS_SYM '(' server_options_list ')' { }
/* ALTER USER foo is allowed for MySQL compatibility. */
| ALTER USER_SYM opt_if_exists clear_privileges grant_list
- opt_require_clause opt_resource_options
+ opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration
{
Lex->create_info.set($3);
Lex->sql_command= SQLCOM_ALTER_USER;
@@ -8051,16 +8207,17 @@ alter:
lex->create_info.init();
lex->no_write_to_binlog= 0;
DBUG_ASSERT(!lex->m_sql_cmd);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
}
table_ident
{
LEX *lex= Lex;
- if (unlikely(!(lex->create_info.seq_create_info=
- new (thd->mem_root) sequence_definition())) ||
- unlikely(!lex->select_lex.add_table_to_list(thd, $5, NULL,
- TL_OPTION_SEQUENCE,
- TL_WRITE,
- MDL_EXCLUSIVE)))
+ if (!(lex->create_info.seq_create_info= new (thd->mem_root)
+ sequence_definition()) ||
+ !lex->first_select_lex()->
+ add_table_to_list(thd, $5, NULL, TL_OPTION_SEQUENCE,
+ TL_WRITE, MDL_EXCLUSIVE))
MYSQL_YYABORT;
}
sequence_defs
@@ -8069,9 +8226,52 @@ alter:
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence($3);
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+ ;
+
+account_locking_option:
+ LOCK_SYM
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_LOCKED;
+ }
+ | UNLOCK_SYM
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_UNLOCKED;
+ }
+ ;
+
+opt_password_expire_option:
+ /* empty */
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NOW;
+ }
+ | NEVER_SYM
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NEVER;
+ }
+ | DEFAULT
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_DEFAULT;
+ }
+ | INTERVAL_SYM NUM DAY_SYM
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_INTERVAL;
+ if (!(Lex->account_options.num_expiration_days= atoi($2.str)))
+ my_yyabort_error((ER_WRONG_VALUE, MYF(0), "DAY", $2.str));
}
;
+opt_account_locking_and_opt_password_expiration:
+ /* empty */
+ | ACCOUNT_SYM account_locking_option
+ | PASSWORD_SYM EXPIRE_SYM opt_password_expire_option
+ | ACCOUNT_SYM account_locking_option PASSWORD_SYM EXPIRE_SYM opt_password_expire_option
+ | PASSWORD_SYM EXPIRE_SYM opt_password_expire_option ACCOUNT_SYM account_locking_option
+ ;
+
ev_alter_on_schedule_completion:
/* empty */ { $$= 0;}
| ON SCHEDULE_SYM ev_schedule_time { $$= 1; }
@@ -8217,22 +8417,7 @@ alter_commands:
| EXCHANGE_SYM PARTITION_SYM alt_part_name_item
WITH TABLE_SYM table_ident have_partitioning
{
- LEX *lex= thd->lex;
- lex->select_lex.db= $6->db;
- if (lex->select_lex.db.str == NULL &&
- unlikely(lex->copy_db_to(&lex->select_lex.db)))
- MYSQL_YYABORT;
- lex->name= $6->table;
- lex->alter_info.partition_flags|= ALTER_PARTITION_EXCHANGE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $6, NULL,
- TL_OPTION_UPDATING,
- TL_READ_NO_INSERT,
- MDL_SHARED_NO_WRITE)))
- MYSQL_YYABORT;
- DBUG_ASSERT(!lex->m_sql_cmd);
- lex->m_sql_cmd= new (thd->mem_root)
- Sql_cmd_alter_table_exchange_partition();
- if (unlikely(lex->m_sql_cmd == NULL))
+ if (Lex->stmt_alter_table_exchange_partition($6))
MYSQL_YYABORT;
}
;
@@ -8356,6 +8541,13 @@ alter_list_item:
{
Lex->alter_info.flags|= ALTER_ADD_PERIOD;
}
+ | ADD
+ PERIOD_SYM opt_if_not_exists_table_element period_for_application_time
+ {
+ Table_period_info &period= Lex->create_info.period_info;
+ period.create_if_not_exists= Lex->check_exists;
+ Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
+ }
| add_column '(' create_field_list ')'
{
LEX *lex=Lex;
@@ -8370,7 +8562,7 @@ alter_list_item:
| ADD CONSTRAINT IF_SYM not EXISTS field_ident check_constraint
{
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
- Lex->add_constraint(&$6, $7, TRUE);
+ Lex->add_constraint($6, $7, TRUE);
}
| CHANGE opt_column opt_if_exists_table_element field_ident
field_spec opt_place
@@ -8468,9 +8660,9 @@ alter_list_item:
| RENAME opt_to table_ident
{
LEX *lex=Lex;
- lex->select_lex.db= $3->db;
- if (lex->select_lex.db.str == NULL &&
- unlikely(lex->copy_db_to(&lex->select_lex.db)))
+ lex->first_select_lex()->db= $3->db;
+ if (lex->first_select_lex()->db.str == NULL &&
+ lex->copy_db_to(&lex->first_select_lex()->db))
MYSQL_YYABORT;
if (unlikely(check_table_name($3->table.str,$3->table.length,
FALSE)) ||
@@ -8491,7 +8683,7 @@ alter_list_item:
$5->name, $4->csname));
if (unlikely(Lex->create_info.add_alter_list_item_convert_to_charset($5)))
MYSQL_YYABORT;
- Lex->alter_info.flags|= ALTER_OPTIONS;
+ Lex->alter_info.flags|= ALTER_CONVERT_TO;
}
| create_table_options_space_separated
{
@@ -8523,6 +8715,14 @@ alter_list_item:
{
Lex->alter_info.flags|= ALTER_DROP_PERIOD;
}
+ | DROP PERIOD_SYM opt_if_exists_table_element FOR_SYM ident
+ {
+ Alter_drop *ad= new Alter_drop(Alter_drop::PERIOD, $5.str, $3);
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ Lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ Lex->alter_info.flags|= ALTER_DROP_CHECK_CONSTRAINT;
+ }
;
opt_index_lock_algorithm:
@@ -8592,7 +8792,6 @@ alter_option:
}
;
-
opt_restrict:
/* empty */ { Lex->drop_mode= DROP_DEFAULT; }
| RESTRICT { Lex->drop_mode= DROP_RESTRICT; }
@@ -8871,6 +9070,7 @@ persistent_column_stat_spec:
}
table_column_list
')'
+ { }
;
persistent_index_stat_spec:
@@ -8884,6 +9084,7 @@ persistent_index_stat_spec:
}
table_index_list
')'
+ { }
;
table_column_list:
@@ -9026,9 +9227,13 @@ rename:
RENAME table_or_tables
{
Lex->sql_command= SQLCOM_RENAME_TABLE;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
}
table_to_table_list
- {}
+ {
+ Lex->pop_select(); //main select
+ }
| RENAME USER_SYM clear_privileges rename_list
{
Lex->sql_command = SQLCOM_RENAME_USER;
@@ -9126,9 +9331,13 @@ preload:
LEX *lex=Lex;
lex->sql_command=SQLCOM_PRELOAD_KEYS;
lex->alter_info.reset();
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
}
preload_list_or_parts
- {}
+ {
+ Lex->pop_select(); //main select
+ }
;
preload_list_or_parts:
@@ -9173,9 +9382,9 @@ adm_partition:
cache_keys_spec:
{
- Lex->select_lex.alloc_index_hints(thd);
- Select->set_index_hint_type(INDEX_HINT_USE,
- INDEX_HINT_MASK_ALL);
+ Lex->first_select_lex()->alloc_index_hints(thd);
+ Lex->first_select_lex()->set_index_hint_type(INDEX_HINT_USE,
+ INDEX_HINT_MASK_ALL);
}
cache_key_list_or_empty
;
@@ -9195,247 +9404,390 @@ opt_ignore_leaves:
Select : retrieve data from table
*/
-
select:
- opt_with_clause select_init
+ query_expression_no_with_clause
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SELECT;
- lex->current_select->set_with_clause($1);
- if (Lex->check_cte_dependencies_and_resolve_references())
+ if (Lex->push_select($1->fake_select_lex ?
+ $1->fake_select_lex :
+ $1->first_select()))
+ MYSQL_YYABORT;
+ }
+ opt_procedure_or_into
+ {
+ Lex->pop_select();
+ $1->set_with_clause(NULL);
+ if (Lex->select_finalize($1, $3))
+ MYSQL_YYABORT;
+ }
+ | with_clause query_expression_no_with_clause
+ {
+ if (Lex->push_select($2->fake_select_lex ?
+ $2->fake_select_lex :
+ $2->first_select()))
+ MYSQL_YYABORT;
+ }
+ opt_procedure_or_into
+ {
+ Lex->pop_select();
+ $2->set_with_clause($1);
+ $1->attach_to($2->first_select());
+ if (Lex->select_finalize($2, $4))
MYSQL_YYABORT;
}
;
-select_init:
- SELECT_SYM select_options_and_item_list select_init3
- | table_value_constructor
- | table_value_constructor union_list
- | table_value_constructor union_order_or_limit
- | '(' select_paren ')'
- | '(' select_paren ')' union_list
- | '(' select_paren ')' union_order_or_limit
- ;
-
-union_list_part2:
- SELECT_SYM select_options_and_item_list select_init3_union_query_term
- | table_value_constructor
- | table_value_constructor union_list
- | table_value_constructor union_order_or_limit
- | '(' select_paren_union_query_term ')'
- | '(' select_paren_union_query_term ')' union_list
- | '(' select_paren_union_query_term ')' union_order_or_limit
- ;
-select_paren:
+select_into:
+ select_into_query_specification
{
- Lex->current_select->set_braces(true);
+ if (Lex->push_select($1))
+ MYSQL_YYABORT;
}
- table_value_constructor select_part3
+ opt_order_limit_lock
{
- DBUG_ASSERT(Lex->current_select->braces);
- }
- |
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit($1)))
+ MYSQL_YYABORT;
+ if ($3)
+ unit= Lex->add_tail_to_query_expression_body(unit, $3);
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
+ }
+ | with_clause
+ select_into_query_specification
{
- /*
- In order to correctly parse UNION's global ORDER BY we need to
- set braces before parsing the clause.
- */
- Lex->current_select->set_braces(true);
+ if (Lex->push_select($2))
+ MYSQL_YYABORT;
}
- SELECT_SYM select_options_and_item_list select_part3
- opt_select_lock_type
+ opt_order_limit_lock
{
- DBUG_ASSERT(Lex->current_select->braces);
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit($2)))
+ MYSQL_YYABORT;
+ if ($4)
+ unit= Lex->add_tail_to_query_expression_body(unit, $4);
+ unit->set_with_clause($1);
+ $1->attach_to($2);
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
}
- | '(' select_paren ')'
- ;
+ ;
-select_parent_union_query_term_proper:
- SELECT_SYM select_options_and_item_list select_part3_union_query_term
- opt_select_lock_type
- | table_value_constructor select_part3_union_query_term
+
+simple_table:
+ query_specification { $$= $1; }
+ | table_value_constructor { $$= $1; }
;
-select_paren_union_query_term:
+table_value_constructor:
+ VALUES
+ {
+ if (Lex->parsed_TVC_start())
+ MYSQL_YYABORT;
+ }
+ values_list
+ {
+ if (!($$= Lex->parsed_TVC_end()))
+ MYSQL_YYABORT;
+ }
+ ;
+
+query_specification_start:
+ SELECT_SYM
{
- /*
- In order to correctly parse UNION's global ORDER BY we need to
- set braces before parsing the clause.
- */
- Lex->current_select->set_braces(true);
+ SELECT_LEX *sel;
+ LEX *lex= Lex;
+ if (!(sel= lex->alloc_select(TRUE)) ||
+ lex->push_select(sel))
+ MYSQL_YYABORT;
+ sel->init_select();
+ sel->braces= FALSE;
}
- select_parent_union_query_term_proper
+ select_options
{
- DBUG_ASSERT(Lex->current_select->braces);
+ Select->parsing_place= SELECT_LIST;
}
- | '(' select_paren_union_query_term ')'
- ;
-
-select_parent_view_proper:
- SELECT_SYM select_options_and_item_list select_part3_view
- opt_select_lock_type
- | table_value_constructor select_part3_view
- ;
+ select_item_list
+ {
+ Select->parsing_place= NO_MATTER;
+ }
+ ;
-select_paren_view:
+query_specification:
+ query_specification_start
+ opt_from_clause
+ opt_where_clause
+ opt_group_clause
+ opt_having_clause
+ opt_window_clause
{
- /*
- In order to correctly parse UNION's global ORDER BY we need to
- set braces before parsing the clause.
- */
- Lex->current_select->set_braces(true);
+ $$= Lex->pop_select();
}
- select_parent_view_proper
+ ;
+
+select_into_query_specification:
+ query_specification_start
+ into
+ opt_from_clause
+ opt_where_clause
+ opt_group_clause
+ opt_having_clause
+ opt_window_clause
{
- DBUG_ASSERT(Lex->current_select->braces);
+ $$= Lex->pop_select();
}
- | '(' select_paren_view ')'
;
-/* The equivalent of select_paren for nested queries. */
-select_paren_derived:
+/**
+
+ The following grammar for query expressions conformant to
+ the latest SQL Standard is supported:
+
+ <query expression> ::=
+ [ <with clause> ] <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+
+ <with clause> ::=
+ WITH [ RECURSIVE ] <with_list
+
+ <with list> ::=
+ <with list element> [ { <comma> <with list element> }... ]
+
+ <with list element> ::=
+ <query name> [ '(' <with column list> ')' ]
+ AS <table subquery>
+
+ <with column list> ::=
+ <column name list>
+
+ <query expression body> ::
+ <query term>
+ | <query expression body> UNION [ ALL | DISTINCT ] <query term>
+ | <query expression body> EXCEPT [ DISTINCT ] <query term>
+
+ <query term> ::=
+ <query primary>
+ | <query term> INTERSECT [ DISTINCT ] <query primary>
+
+ <query primary> ::=
+ <simple table>
+ | '(' <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+ ')'
+
+ <simple table>
+ <query specification>
+ | <table value constructor>
+
+ <subquery>
+ '(' <query_expression> ')'
+
+*/
+
+/*
+ query_expression produces the same expressions as
+ <query expression>
+*/
+
+query_expression:
+ query_expression_no_with_clause
{
- Lex->current_select->set_braces(true);
+ $1->set_with_clause(NULL);
+ $$= $1;
}
- table_value_constructor
+ | with_clause
+ query_expression_no_with_clause
{
- DBUG_ASSERT(Lex->current_select->braces);
- $$= Lex->current_select->master_unit()->first_select();
+ $2->set_with_clause($1);
+ $1->attach_to($2->first_select());
+ $$= $2;
}
- |
+ ;
+
+/*
+ query_expression_no_with_clause produces the same expressions as
+ <query expression> without [ <with clause> ]
+*/
+
+query_expression_no_with_clause:
+ query_expression_body_ext { $$= $1; }
+ | query_expression_body_ext_parens { $$= $1; }
+ ;
+
+/*
+ query_expression_body_ext produces the same expressions as
+ <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+ | '('... <query expression body>
+ [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
+ ')'...
+ Note: number of ')' must be equal to the number of '(' in the rule above
+*/
+
+query_expression_body_ext:
+ query_expression_body
{
- Lex->current_select->set_braces(true);
+ if ($1->first_select()->next_select())
+ {
+ if (Lex->parsed_multi_operand_query_expression_body($1))
+ MYSQL_YYABORT;
+ }
}
- SELECT_SYM select_part2_derived
- opt_table_expression
- opt_order_clause
- opt_limit_clause
- opt_select_lock_type
+ opt_query_expression_tail
{
- DBUG_ASSERT(Lex->current_select->braces);
- $$= Lex->current_select->master_unit()->first_select();
+ if (!$3)
+ $$= $1;
+ else
+ $$= Lex->add_tail_to_query_expression_body($1, $3);
}
- | '(' select_paren_derived ')' { $$= $2; }
- ;
-
-select_init3:
- opt_table_expression
- opt_select_lock_type
+ | query_expression_body_ext_parens
{
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
+ Lex->push_select(!$1->first_select()->next_select() ?
+ $1->first_select() : $1->fake_select_lex);
}
- union_clause
- | select_part3_union_not_ready
- opt_select_lock_type
+ query_expression_tail
{
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
+ if (!($$= Lex->add_tail_to_query_expression_body_ext_parens($1, $3)))
+ MYSQL_YYABORT;
}
;
-
-select_init3_union_query_term:
- opt_table_expression
- opt_select_lock_type
- {
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
- }
- union_clause
- | select_part3_union_not_ready_noproc
- opt_select_lock_type
+query_expression_body_ext_parens:
+ '(' query_expression_body_ext_parens ')'
+ { $$= $2; }
+ | '(' query_expression_body_ext ')'
{
- /* Parentheses carry no meaning here */
- Lex->current_select->set_braces(false);
+ SELECT_LEX *sel= $2->first_select()->next_select() ?
+ $2->fake_select_lex : $2->first_select();
+ sel->braces= true;
+ $$= $2;
}
;
+/*
+ query_expression_body produces the same expressions as
+ <query expression body>
+*/
-select_init3_view:
- opt_table_expression opt_select_lock_type
+query_expression_body:
+ query_simple
{
- Lex->current_select->set_braces(false);
+ Lex->push_select($1);
+ if (!($$= Lex->create_unit($1)))
+ MYSQL_YYABORT;
}
- | opt_table_expression opt_select_lock_type
+ | query_expression_body
+ unit_type_decl
{
- Lex->current_select->set_braces(false);
+ if (!$1->first_select()->next_select())
+ {
+ Lex->pop_select();
+ }
}
- union_list_view
- | order_or_limit opt_select_lock_type
+ query_primary
{
- Lex->current_select->set_braces(false);
+ if (!($$= Lex->add_primary_to_query_expression_body($1, $4,
+ $2.unit_type,
+ $2.distinct,
+ TRUE)))
+ MYSQL_YYABORT;
}
- | table_expression order_or_limit opt_select_lock_type
+ | query_expression_body_ext_parens
+ unit_type_decl
+ query_primary
{
- Lex->current_select->set_braces(false);
+ if (!($$= Lex->add_primary_to_query_expression_body_ext_parens(
+ $1, $3,
+ $2.unit_type,
+ $2.distinct)))
+ MYSQL_YYABORT;
}
;
/*
- The SELECT parts after select_item_list that cannot be followed by UNION.
+ query_primary produces the same expressions as
+ <query primary>
*/
-select_part3:
- opt_table_expression
- | select_part3_union_not_ready
+query_primary:
+ query_simple
+ { $$= $1; }
+ | query_expression_body_ext_parens
+ { $$= $1->first_select(); }
;
-select_part3_union_query_term:
- opt_table_expression
- | select_part3_union_not_ready_noproc
- ;
+/*
+ query_simple produces the same expressions as
+ <simple table>
+*/
-select_part3_view:
- opt_table_expression
- | order_or_limit
- | table_expression order_or_limit
+query_simple:
+ simple_table { $$= $1;}
;
-select_part3_union_not_ready:
- select_part3_union_not_ready_noproc
- | table_expression procedure_clause
- | table_expression order_or_limit procedure_clause
+subselect:
+ query_expression
+ {
+ if (!($$= Lex->parsed_subselect($1)))
+ YYABORT;
+ }
;
-select_part3_union_not_ready_noproc:
- order_or_limit
- | into opt_table_expression opt_order_clause opt_limit_clause
- | table_expression into
- | table_expression order_or_limit
- | table_expression order_or_limit into
- ;
+/*
+ subquery produces the same expressions as
+ <subquery>
+
+ Consider the production rule of the SQL Standard
+ subquery:
+ '(' query_expression ')'
+
+ This rule is equivalent to the rule
+ subquery:
+ '(' query_expression_no_with_clause ')'
+ | '(' with_clause query_expression_no_with_clause ')'
+ that in its turn is equivalent to
+ subquery:
+ '(' query_expression_body_ext ')'
+ | query_expression_body_ext_parens
+ | '(' with_clause query_expression_no_with_clause ')'
+
+ The latter can be re-written into
+ subquery:
+ query_expression_body_ext_parens
+ | '(' with_clause query_expression_no_with_clause ')'
+
+ The last rule allows us to resolve properly the shift/reduce conflict
+ when subquery is used in expressions such as in the following queries
+ select (select * from t1 limit 1) + t2.a from t2
+ select * from t1 where t1.a [not] in (select t2.a from t2)
+
+ In the rule below %prec SUBQUERY_AS_EXPR forces the parser to perform a shift
+ operation rather then a reduce operation when ')' is encountered and can be
+ considered as the last symbol a query expression.
+*/
-select_options_and_item_list:
+subquery:
+ query_expression_body_ext_parens %prec SUBQUERY_AS_EXPR
{
- LEX *lex= Lex;
- SELECT_LEX *sel= lex->current_select;
- if (sel->linkage != UNION_TYPE)
- mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LIST;
+ if (!$1->fake_select_lex)
+ $1->first_select()->braces= false;
+ else
+ $1->fake_select_lex->braces= false;
+ if (!($$= Lex->parsed_subselect($1)))
+ YYABORT;
}
- select_options select_item_list
+ | '(' with_clause query_expression_no_with_clause ')'
{
- Select->parsing_place= NO_MATTER;
+ $3->set_with_clause($2);
+ $2->attach_to($3->first_select());
+ if (!($$= Lex->parsed_subselect($3)))
+ YYABORT;
}
;
-
-/**
- <table expression>, as in the SQL standard.
-*/
-table_expression:
- from_clause
- opt_where_clause
- opt_group_clause
- opt_having_clause
- opt_window_clause
- ;
-
-opt_table_expression:
- /* Empty */
- | table_expression
+opt_from_clause:
+ /* empty */ %prec EMPTY_FROM_CLAUSE
+ | from_clause
;
from_clause:
@@ -9485,8 +9837,9 @@ history_point:
TIMESTAMP TEXT_STRING
{
Item *item;
- if (!(item= create_temporal_literal(thd, $2.str, $2.length, YYCSCL,
- MYSQL_TYPE_DATETIME, true)))
+ if (!(item= type_handler_datetime2.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true)))
MYSQL_YYABORT;
$$= Vers_history_point(VERS_TIMESTAMP, item);
}
@@ -9500,6 +9853,33 @@ history_point:
}
;
+for_portion_of_time_clause:
+ FOR_SYM PORTION_SYM OF_SYM remember_tok_start ident FROM
+ bit_expr TO_SYM bit_expr
+ {
+ if (unlikely(0 == strcasecmp($5.str, "SYSTEM_TIME")))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, $4);
+ MYSQL_YYABORT;
+ }
+ Lex->period_conditions.init(SYSTEM_TIME_FROM_TO,
+ Vers_history_point(VERS_TIMESTAMP, $7),
+ Vers_history_point(VERS_TIMESTAMP, $9),
+ $5);
+ }
+ ;
+
+opt_for_portion_of_time_clause:
+ /* empty */
+ {
+ $$= false;
+ }
+ | for_portion_of_time_clause
+ {
+ $$= true;
+ }
+ ;
+
opt_for_system_time_clause:
/* empty */
{
@@ -9539,59 +9919,68 @@ select_option:
query_expression_option
| SQL_NO_CACHE_SYM
{
- /*
- Allow this flag only on the first top-level SELECT statement, if
- SQL_CACHE wasn't specified, and only once per query.
- */
- if (unlikely(Lex->current_select != &Lex->select_lex))
- my_yyabort_error((ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_NO_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_CACHE))
- my_yyabort_error((ER_WRONG_USAGE, MYF(0), "SQL_CACHE", "SQL_NO_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_NO_CACHE))
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_NO_QUERY_CACHE)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_NO_CACHE"));
-
- Lex->safe_to_cache_query=0;
- Lex->select_lex.options&= ~OPTION_TO_QUERY_CACHE;
- Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE;
+ Select->options|= OPTION_NO_QUERY_CACHE;
}
| SQL_CACHE_SYM
{
- /*
- Allow this flag only on the first top-level SELECT statement, if
- SQL_NO_CACHE wasn't specified, and only once per query.
- */
- if (unlikely(Lex->current_select != &Lex->select_lex))
- my_yyabort_error((ER_CANT_USE_OPTION_HERE, MYF(0), "SQL_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_NO_CACHE))
- my_yyabort_error((ER_WRONG_USAGE, MYF(0), "SQL_NO_CACHE", "SQL_CACHE"));
- if (unlikely(Lex->select_lex.sql_cache == SELECT_LEX::SQL_CACHE))
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_TO_QUERY_CACHE)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_CACHE"));
-
- Lex->safe_to_cache_query=1;
- Lex->select_lex.options|= OPTION_TO_QUERY_CACHE;
- Lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE;
+ Select->options|= OPTION_TO_QUERY_CACHE;
}
;
-opt_select_lock_type:
- /* empty */
- | FOR_SYM UPDATE_SYM opt_lock_wait_timeout
+
+select_lock_type:
+ FOR_SYM UPDATE_SYM opt_lock_wait_timeout_new
{
- LEX *lex=Lex;
- lex->current_select->lock_type= TL_WRITE;
- lex->current_select->set_lock_for_tables(TL_WRITE, false);
- lex->safe_to_cache_query=0;
+ $$= $3;
+ $$.defined_lock= TRUE;
+ $$.update_lock= TRUE;
}
- | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout
+ | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout_new
{
- LEX *lex=Lex;
- lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS;
- lex->current_select->
- set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
- lex->safe_to_cache_query=0;
+ $$= $5;
+ $$.defined_lock= TRUE;
+ $$.update_lock= FALSE;
}
;
+opt_select_lock_type:
+ /* empty */
+ {
+ $$.empty();
+ }
+ | select_lock_type
+ {
+ $$= $1;
+ }
+ ;
+
+opt_lock_wait_timeout_new:
+ /* empty */
+ {
+ $$.empty();
+ }
+ | WAIT_SYM ulong_num
+ {
+ $$.defined_timeout= TRUE;
+ $$.timeout= $2;
+ }
+ | NOWAIT_SYM
+ {
+ $$.defined_timeout= TRUE;
+ $$.timeout= 0;
+ }
+ ;
+
select_item_list:
select_item_list ',' select_item
| select_item
@@ -9641,12 +10030,6 @@ remember_tok_start:
}
;
-remember_tok_end:
- {
- $$= (char*) YYLIP->get_tok_end();
- }
- ;
-
remember_name:
{
$$= (char*) YYLIP->get_cpp_tok_start();
@@ -9872,19 +10255,19 @@ expr:
;
predicate:
- predicate IN_SYM '(' subselect ')'
+ predicate IN_SYM subquery
{
- $$= new (thd->mem_root) Item_in_subselect(thd, $1, $4);
- if (unlikely($$ == NULL))
+ $$= new (thd->mem_root) Item_in_subselect(thd, $1, $3);
+ if (unlikely(!$$))
MYSQL_YYABORT;
}
- | predicate not IN_SYM '(' subselect ')'
+ | predicate not IN_SYM subquery
{
- Item *item= new (thd->mem_root) Item_in_subselect(thd, $1, $5);
- if (unlikely(item == NULL))
+ Item *item= new (thd->mem_root) Item_in_subselect(thd, $1, $4);
+ if (unlikely(!item))
MYSQL_YYABORT;
$$= negate_expression(thd, item);
- if (unlikely($$ == NULL))
+ if (unlikely(!$$))
MYSQL_YYABORT;
}
| predicate IN_SYM '(' expr ')'
@@ -10282,7 +10665,21 @@ column_default_non_parenthesized_expr:
| param_marker { $$= $1; }
| variable
| sum_expr
+ {
+ if (!Lex->select_stack_top)
+ {
+ my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
| window_func_expr
+ {
+ if (!Lex->select_stack_top)
+ {
+ my_error(ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
| inverse_distribution_function
| ROW_SYM '(' expr ',' expr_list ')'
{
@@ -10398,6 +10795,11 @@ primary_expr:
column_default_non_parenthesized_expr
| explicit_cursor_attr
| '(' parenthesized_expr ')' { $$= $2; }
+ | subquery
+ {
+ if (!($$= Lex->create_item_query_expression(thd, $1->master_unit())))
+ MYSQL_YYABORT;
+ }
;
string_factor_expr:
@@ -10461,7 +10863,7 @@ function_call_keyword_timestamp:
}
| TIMESTAMP '(' expr ',' expr ')'
{
- $$= new (thd->mem_root) Item_func_add_time(thd, $3, $5, 1, 0);
+ $$= new (thd->mem_root) Item_func_timestamp(thd, $3, $5);
if (unlikely($$ == NULL))
MYSQL_YYABORT;
}
@@ -11442,6 +11844,19 @@ window_func:
simple_window_func
|
sum_expr
+ |
+ function_call_generic
+ {
+ Item* item = (Item*)$1;
+ /* Only UDF aggregate here possible */
+ if ((item == NULL) ||
+ (item->type() != Item::SUM_FUNC_ITEM)
+ || (((Item_sum *)item)->sum_func() != Item_sum::UDF_SUM_FUNC))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
;
simple_window_func:
@@ -11796,6 +12211,10 @@ cast_type_temporal:
DATE_SYM { $$.set(&type_handler_newdate); }
| TIME_SYM opt_field_length { $$.set(&type_handler_time2, 0, $2); }
| DATETIME opt_field_length { $$.set(&type_handler_datetime2, 0, $2); }
+ | INTERVAL_SYM DAY_SECOND_SYM field_length
+ {
+ $$.set(&type_handler_interval_DDhhmmssff, 0, $3);
+ }
;
opt_expr_list:
@@ -11806,9 +12225,7 @@ opt_expr_list:
expr_list:
expr
{
- $$= new (thd->mem_root) List<Item>;
- if (unlikely($$ == NULL) ||
- unlikely($$->push_back($1, thd->mem_root)))
+ if (unlikely(!($$= List<Item>::make(thd->mem_root, $1))))
MYSQL_YYABORT;
}
| expr_list ',' expr
@@ -11920,10 +12337,15 @@ esc_table_ref:
/* Equivalent to <table reference list> in the SQL:2003 standard. */
/* Warning - may return NULL in case of incomplete SELECT */
derived_table_list:
- esc_table_ref { $$=$1; }
+ esc_table_ref
+ {
+ $$=$1;
+ Select->add_joined_table($1);
+ }
| derived_table_list ',' esc_table_ref
{
MYSQL_YYABORT_UNLESS($1 && ($$=$3));
+ Select->add_joined_table($3);
}
;
@@ -11934,15 +12356,9 @@ derived_table_list:
*/
join_table:
/* INNER JOIN variants */
- /*
- Use %prec to evaluate production 'table_ref' before 'normal_join'
- so that [INNER | CROSS] JOIN is properly nested as other
- left-associative joins.
- */
table_ref normal_join table_ref %prec CONDITIONLESS_JOIN
{
MYSQL_YYABORT_UNLESS($1 && ($$=$3));
-
if (unlikely(Select->add_cross_joined_table($1, $3, $2)))
MYSQL_YYABORT;
}
@@ -11950,6 +12366,8 @@ join_table:
ON
{
MYSQL_YYABORT_UNLESS($1 && $3);
+ Select->add_joined_table($1);
+ Select->add_joined_table($3);
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, $1, $3)))
MYSQL_YYABORT;
@@ -11957,7 +12375,7 @@ join_table:
}
expr
{
- $3->straight=$2;
+ $3->straight=$2;
add_join_on(thd, $3, $6);
$3->on_context= Lex->pop_context();
Select->parsing_place= NO_MATTER;
@@ -11966,6 +12384,8 @@ join_table:
USING
{
MYSQL_YYABORT_UNLESS($1 && $3);
+ Select->add_joined_table($1);
+ Select->add_joined_table($3);
}
'(' using_list ')'
{
@@ -11976,6 +12396,8 @@ join_table:
| table_ref NATURAL inner_join table_factor
{
MYSQL_YYABORT_UNLESS($1 && ($$=$4));
+ Select->add_joined_table($1);
+ Select->add_joined_table($4);
$4->straight=$3;
add_join_natural($1,$4,NULL,Select);
}
@@ -11985,6 +12407,8 @@ join_table:
ON
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, $1, $5)))
MYSQL_YYABORT;
@@ -12001,6 +12425,8 @@ join_table:
| table_ref LEFT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
}
USING '(' using_list ')'
{
@@ -12011,6 +12437,8 @@ join_table:
| table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $6);
+ Select->add_joined_table($1);
+ Select->add_joined_table($6);
add_join_natural($1,$6,NULL,Select);
$6->outer_join|=JOIN_TYPE_LEFT;
$$=$6;
@@ -12021,6 +12449,8 @@ join_table:
ON
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, $1, $5)))
MYSQL_YYABORT;
@@ -12038,6 +12468,8 @@ join_table:
| table_ref RIGHT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $5);
+ Select->add_joined_table($1);
+ Select->add_joined_table($5);
}
USING '(' using_list ')'
{
@@ -12049,6 +12481,8 @@ join_table:
| table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor
{
MYSQL_YYABORT_UNLESS($1 && $6);
+ Select->add_joined_table($1);
+ Select->add_joined_table($6);
add_join_natural($6,$1,NULL,Select);
LEX *lex= Lex;
if (unlikely(!($$= lex->current_select->convert_right_join())))
@@ -12081,240 +12515,63 @@ use_partition:
PARTITION_SYM '(' using_list ')' have_partitioning
{
$$= $3;
+ Select->parsing_place= Select->save_parsing_place;
+ Select->save_parsing_place= NO_MATTER;
}
;
-
-/*
- This is a flattening of the rules <table factor> and <table primary>
- in the SQL:2003 standard, since we don't have <sample clause>
- I.e.
- <table factor> ::= <table primary> [ <sample clause> ]
-*/
-/* Warning - may return NULL in case of incomplete SELECT */
table_factor:
- table_primary_ident
- | table_primary_derived
- ;
-
-table_primary_ident:
- {
- DBUG_ASSERT(Select);
- SELECT_LEX *sel= Select;
- sel->table_join_options= 0;
- }
- table_ident opt_use_partition opt_for_system_time_clause opt_table_alias opt_key_definition
- {
- if (unlikely(!($$= Select->add_table_to_list(thd, $2, $5,
- Select->get_table_join_options(),
- YYPS->m_lock_type,
- YYPS->m_mdl_type,
- Select->
- pop_index_hints(),
- $3))))
- MYSQL_YYABORT;
- Select->add_joined_table($$);
- if ($4)
- $$->vers_conditions= Lex->vers_conditions;
+ table_primary_ident_opt_parens { $$= $1; }
+ | table_primary_derived_opt_parens { $$= $1; }
+ | join_table_parens
+ {
+ $1->nested_join->nest_type= 0;
+ $$= $1;
}
+ | table_reference_list_parens { $$= $1; }
;
+table_primary_ident_opt_parens:
+ table_primary_ident { $$= $1; }
+ | '(' table_primary_ident_opt_parens ')' { $$= $2; }
+ ;
-
-/*
- Represents a flattening of the following rules from the SQL:2003
- standard. This sub-rule corresponds to the sub-rule
- <table primary> ::= ... | <derived table> [ AS ] <correlation name>
-
- <derived table> ::= <table subquery>
- <table subquery> ::= <subquery>
- <subquery> ::= <left paren> <query expression> <right paren>
- <query expression> ::= [ <with clause> ] <query expression body>
-
- For the time being we use the non-standard rule
- select_derived_union which is a compromise between the standard
- and our parser. Possibly this rule could be replaced by our
- query_expression_body.
-*/
-
-table_primary_derived:
- '(' get_select_lex select_derived_union ')' opt_for_system_time_clause opt_table_alias
- {
- /* Use $2 instead of Lex->current_select as derived table will
- alter value of Lex->current_select. */
- if (!($3 || $6) && $2->embedding &&
- !$2->embedding->nested_join->join_list.elements)
- {
- /* we have a derived table ($3 == NULL) but no alias,
- Since we are nested in further parentheses so we
- can pass NULL to the outer level parentheses
- Permits parsing of "((((select ...))) as xyz)" */
- $$= 0;
- }
- else if (!$3)
- {
- /* Handle case of derived table, alias may be NULL if there
- are no outer parentheses, add_table_to_list() will throw
- error in this case */
- LEX *lex=Lex;
- lex->check_automatic_up(UNSPECIFIED_TYPE);
- SELECT_LEX *sel= lex->current_select;
- SELECT_LEX_UNIT *unit= sel->master_unit();
- lex->current_select= sel= unit->outer_select();
- Table_ident *ti= new (thd->mem_root) Table_ident(unit);
- if (unlikely(ti == NULL))
- MYSQL_YYABORT;
- if (unlikely(!($$= sel->add_table_to_list(thd,
- ti, $6, 0,
- TL_READ,
- MDL_SHARED_READ))))
- MYSQL_YYABORT;
- sel->add_joined_table($$);
- lex->pop_context();
- lex->nest_level--;
- }
- else if (unlikely($6 != NULL))
- {
- /*
- Tables with or without joins within parentheses cannot
- have aliases, and we ruled out derived tables above.
- */
- thd->parse_error();
- MYSQL_YYABORT;
- }
- else
- {
- /* nested join: FROM (t1 JOIN t2 ...),
- nest_level is the same as in the outer query */
- $$= $3;
- }
- /*
- Fields in derived table can be used in upper select in
- case of merge. We do not add HAVING fields because we do
- not merge such derived. We do not add union because
- also do not merge them
- */
- if ($$ && $$->derived &&
- !$$->derived->first_select()->next_select())
- $$->select_lex->add_where_field($$->derived->first_select());
- if ($5)
- {
- MYSQL_YYABORT_UNLESS(!$3);
- $$->vers_conditions= Lex->vers_conditions;
- }
- }
- /* Represents derived table with WITH clause */
- | '(' get_select_lex subselect_start
- with_clause query_expression_body
- subselect_end ')' opt_for_system_time_clause opt_table_alias
- {
- LEX *lex=Lex;
- SELECT_LEX *sel= $2;
- SELECT_LEX_UNIT *unit= $5->master_unit();
- Table_ident *ti= new (thd->mem_root) Table_ident(unit);
- if (unlikely(ti == NULL))
- MYSQL_YYABORT;
- $5->set_with_clause($4);
- lex->current_select= sel;
- if (unlikely(!($$= sel->add_table_to_list(lex->thd,
- ti, $9, 0,
- TL_READ,
- MDL_SHARED_READ))))
- MYSQL_YYABORT;
- sel->add_joined_table($$);
- if ($8)
- $$->vers_conditions= Lex->vers_conditions;
- }
+table_primary_derived_opt_parens:
+ table_primary_derived { $$= $1; }
+ | '(' table_primary_derived_opt_parens ')' { $$= $2; }
;
-/*
- This rule accepts just about anything. The reason is that we have
- empty-producing rules in the beginning of rules, in this case
- subselect_start. This forces bison to take a decision which rules to
- reduce by long before it has seen any tokens. This approach ties us
- to a very limited class of parseable languages, and unfortunately
- SQL is not one of them. The chosen 'solution' was this rule, which
- produces just about anything, even complete bogus statements, for
- instance ( table UNION SELECT 1 ).
- Fortunately, we know that the semantic value returned by
- select_derived is NULL if it contained a derived table, and a pointer to
- the base table's TABLE_LIST if it was a base table. So in the rule
- regarding union's, we throw a parse error manually and pretend it
- was bison that did it.
-
- Also worth noting is that this rule concerns query expressions in
- the from clause only. Top level select statements and other types of
- subqueries have their own union rules.
-*/
-select_derived_union:
- select_derived
- | select_derived union_order_or_limit
- {
- if (unlikely($1))
- {
- thd->parse_error();
- MYSQL_YYABORT;
- }
- }
- | select_derived union_head_non_top
+table_reference_list_parens:
+ '(' table_reference_list_parens ')' { $$= $2; }
+ | '(' nested_table_reference_list ')'
{
- if (unlikely($1))
- {
- thd->parse_error();
+ if (!($$= Select->end_nested_join(thd)))
MYSQL_YYABORT;
- }
- }
- union_list_derived_part2
- | derived_simple_table opt_select_lock_type
- | derived_simple_table order_or_limit opt_select_lock_type
- | derived_simple_table opt_select_lock_type union_list_derived
- ;
-
-union_list_derived_part2:
- query_term_union_not_ready { Lex->pop_context(); }
- | query_term_union_ready { Lex->pop_context(); }
- | query_term_union_ready { Lex->pop_context(); } union_list_derived
- ;
-
-union_list_derived:
- union_head_non_top union_list_derived_part2
- ;
-
-
-/* The equivalent of select_init2 for nested queries. */
-select_init2_derived:
- select_part2_derived
- {
- Select->set_braces(0);
}
;
-/* The equivalent of select_part2 for nested queries. */
-select_part2_derived:
+nested_table_reference_list:
+ table_ref ',' table_ref
{
- LEX *lex= Lex;
- SELECT_LEX *sel= lex->current_select;
- if (sel->linkage != UNION_TYPE)
- mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LIST;
+ if (Select->init_nested_join(thd))
+ MYSQL_YYABORT;
+ Select->add_joined_table($1);
+ Select->add_joined_table($3);
+ $$= $1->embedding;
}
- opt_query_expression_options select_item_list
+ | nested_table_reference_list ',' table_ref
{
- Select->parsing_place= NO_MATTER;
+ Select->add_joined_table($3);
+ $$= $1;
}
;
-/* handle contents of parentheses in join expression */
-select_derived:
- get_select_lex_derived derived_table_list
+join_table_parens:
+ '(' join_table_parens ')' { $$= $2; }
+ | '(' join_table ')'
{
LEX *lex= Lex;
- /* for normal joins, $2 != NULL and end_nested_join() != NULL,
- for derived tables, both must equal NULL */
-
- if (unlikely(!($$= $1->end_nested_join(lex->thd)) && $2))
- MYSQL_YYABORT;
- if (unlikely(!$2 && $$))
+ if (!($$= lex->current_select->nest_last_join(thd)))
{
thd->parse_error();
MYSQL_YYABORT;
@@ -12322,85 +12579,33 @@ select_derived:
}
;
-derived_simple_table:
- derived_query_specification { $$= $1; }
- | derived_table_value_constructor { $$= $1; }
- ;
-/*
- Similar to query_specification, but for derived tables.
- Example: the inner parenthesized SELECT in this query:
- SELECT * FROM (SELECT * FROM t1);
-*/
-derived_query_specification:
- SELECT_SYM select_derived_init select_derived2
- {
- if ($2)
- Select->set_braces(1);
- $$= NULL;
- }
- ;
-derived_table_value_constructor:
- VALUES
- {
- if (Lex->tvc_start_derived())
- MYSQL_YYABORT;
- }
- values_list
+table_primary_ident:
+ table_ident opt_use_partition opt_for_system_time_clause
+ opt_table_alias_clause opt_key_definition
{
- if (Lex->tvc_finalize_derived())
+ SELECT_LEX *sel= Select;
+ sel->table_join_options= 0;
+ if (!($$= Select->add_table_to_list(thd, $1, $4,
+ Select->get_table_join_options(),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ $2)))
MYSQL_YYABORT;
- $$= NULL;
+ if ($3)
+ $$->vers_conditions= Lex->vers_conditions;
}
;
-
-select_derived2:
+table_primary_derived:
+ subquery
+ opt_for_system_time_clause table_alias_clause
{
- LEX *lex= Lex;
- lex->derived_tables|= DERIVED_SUBQUERY;
- if (unlikely(!lex->expr_allows_subselect ||
- lex->sql_command == (int)SQLCOM_PURGE))
- {
- thd->parse_error();
- MYSQL_YYABORT;
- }
- if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE ||
- unlikely(mysql_new_select(lex, 1, NULL)))
+ if (!($$= Lex->parsed_derived_table($1->master_unit(), $2, $3)))
MYSQL_YYABORT;
- mysql_init_select(lex);
- lex->current_select->linkage= DERIVED_TABLE_TYPE;
- lex->current_select->parsing_place= SELECT_LIST;
}
- select_options select_item_list
- {
- Select->parsing_place= NO_MATTER;
- }
- opt_table_expression
- ;
-
-get_select_lex:
- /* Empty */ { $$= Select; }
;
-
-get_select_lex_derived:
- get_select_lex
- {
- LEX *lex= Lex;
- if (unlikely($1->init_nested_join(lex->thd)))
- MYSQL_YYABORT;
- }
- ;
-
-select_derived_init:
- {
- LEX *lex= Lex;
-
- TABLE_LIST *embedding= lex->current_select->embedding;
- $$= embedding &&
- !embedding->nested_join->join_list.elements;
- /* return true if we are deeply nested */
- }
;
opt_outer:
@@ -12533,9 +12738,13 @@ table_alias:
| '='
;
-opt_table_alias:
+opt_table_alias_clause:
/* empty */ { $$=0; }
- | table_alias ident_table_alias
+ | table_alias_clause { $$= $1; }
+ ;
+
+table_alias_clause:
+ table_alias ident_table_alias
{
$$= (LEX_CSTRING*) thd->memdup(&$2,sizeof(LEX_STRING));
if (unlikely($$ == NULL))
@@ -12614,7 +12823,7 @@ olap_opt:
SQL-2003: GROUP BY ... CUBE(col1, col2, col3)
*/
LEX *lex=Lex;
- if (unlikely(lex->current_select->linkage == GLOBAL_OPTIONS_TYPE))
+ if (unlikely(lex->current_select->get_linkage() == GLOBAL_OPTIONS_TYPE))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "WITH CUBE",
"global union parameters"));
lex->current_select->olap= CUBE_TYPE;
@@ -12631,7 +12840,7 @@ olap_opt:
SQL-2003: GROUP BY ... ROLLUP(col1, col2, col3)
*/
LEX *lex= Lex;
- if (unlikely(lex->current_select->linkage == GLOBAL_OPTIONS_TYPE))
+ if (unlikely(lex->current_select->get_linkage() == GLOBAL_OPTIONS_TYPE))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "WITH ROLLUP",
"global union parameters"));
lex->current_select->olap= ROLLUP_TYPE;
@@ -12673,6 +12882,7 @@ window_spec:
opt_window_ref opt_window_partition_clause
opt_window_order_clause opt_window_frame_clause
')'
+ { }
;
opt_window_ref:
@@ -12692,7 +12902,7 @@ opt_window_partition_clause:
opt_window_order_clause:
/* empty */ { }
- | ORDER_SYM BY order_list
+ | ORDER_SYM BY order_list { Select->order_list= *($3); }
;
opt_window_frame_clause:
@@ -12818,73 +13028,35 @@ alter_order_item:
opt_order_clause:
/* empty */
+ { $$= NULL; }
| order_clause
+ { $$= $1; }
;
order_clause:
ORDER_SYM BY
{
- LEX *lex=Lex;
- SELECT_LEX *sel= lex->current_select;
- SELECT_LEX_UNIT *unit= sel-> master_unit();
- if (unlikely(sel->linkage != GLOBAL_OPTIONS_TYPE &&
- sel->olap != UNSPECIFIED_OLAP_TYPE &&
- (sel->linkage != UNION_TYPE || sel->braces)))
- {
- my_error(ER_WRONG_USAGE, MYF(0),
- "CUBE/ROLLUP", "ORDER BY");
- MYSQL_YYABORT;
- }
- if (lex->sql_command != SQLCOM_ALTER_TABLE &&
- !unit->fake_select_lex)
- {
- /*
- A query of the of the form (SELECT ...) ORDER BY order_list is
- executed in the same way as the query
- SELECT ... ORDER BY order_list
- unless the SELECT construct contains ORDER BY or LIMIT clauses.
- Otherwise we create a fake SELECT_LEX if it has not been
- created yet.
- */
- SELECT_LEX *first_sl= unit->first_select();
- if (unlikely(!first_sl->next_select() && first_sl->tvc &&
- unit->add_fake_select_lex(thd)))
- MYSQL_YYABORT;
- else if (unlikely(!unit->is_unit_op() &&
- (first_sl->order_list.elements ||
- first_sl->select_limit) &&
- unit->add_fake_select_lex(thd)))
- MYSQL_YYABORT;
- }
- if (sel->master_unit()->is_unit_op() && !sel->braces)
- {
- /*
- At this point we don't know yet whether this is the last
- select in union or not, but we move ORDER BY to
- fake_select_lex anyway. If there would be one more select
- in union mysql_new_select will correctly throw error.
- */
- DBUG_ASSERT(sel->master_unit()->fake_select_lex);
- lex->current_select= sel->master_unit()->fake_select_lex;
- }
+ thd->where= "ORDER clause";
}
order_list
{
-
+ $$= $4;
}
;
order_list:
order_list ',' order_ident order_dir
{
- if (unlikely(add_order_to_list(thd, $3,(bool) $4)))
- MYSQL_YYABORT;
- }
+ $$= $1;
+ if (add_to_list(thd, *$$, $3,(bool) $4))
+ MYSQL_YYABORT;
+ }
| order_ident order_dir
{
- if (unlikely(add_order_to_list(thd, $1,(bool) $2)))
+ $$= new (thd->mem_root) SQL_I_List<ORDER>();
+ if (add_to_list(thd, *$$, $1, (bool) $2))
MYSQL_YYABORT;
- }
+ }
;
order_dir:
@@ -12894,64 +13066,62 @@ order_dir:
;
opt_limit_clause:
- /* empty */ {}
- | limit_clause {}
+ /* empty */
+ { $$.empty(); }
+ | limit_clause
+ { $$= $1; }
;
-limit_clause_init:
- LIMIT
- {
- SELECT_LEX *sel= Select;
- if (sel->master_unit()->is_unit_op() && !sel->braces &&
- sel->master_unit()->fake_select_lex)
- {
- /* Move LIMIT that belongs to UNION to fake_select_lex */
- Lex->current_select= sel->master_unit()->fake_select_lex;
- DBUG_ASSERT(Select);
- }
- }
- ;
-
limit_clause:
- limit_clause_init limit_options
+ LIMIT limit_options
{
- SELECT_LEX *sel= Select;
- if (!sel->select_limit->basic_const_item() ||
- sel->select_limit->val_int() > 0)
+ $$= $2;
+ if (!$$.select_limit->basic_const_item() ||
+ $$.select_limit->val_int() > 0)
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
- | limit_clause_init limit_options
+ | LIMIT limit_options
ROWS_SYM EXAMINED_SYM limit_rows_option
{
+ $$= $2;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
- | limit_clause_init ROWS_SYM EXAMINED_SYM limit_rows_option
+ | LIMIT ROWS_SYM EXAMINED_SYM limit_rows_option
{
+ $$.select_limit= 0;
+ $$.offset_limit= 0;
+ $$.explicit_limit= 1;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
;
+opt_global_limit_clause:
+ opt_limit_clause
+ {
+ Select->explicit_limit= $1.explicit_limit;
+ Select->select_limit= $1.select_limit;
+ Select->offset_limit= $1.offset_limit;
+ }
+ ;
+
limit_options:
limit_option
{
- SELECT_LEX *sel= Select;
- sel->select_limit= $1;
- sel->offset_limit= 0;
- sel->explicit_limit= 1;
+ $$.select_limit= $1;
+ $$.offset_limit= 0;
+ $$.explicit_limit= 1;
}
| limit_option ',' limit_option
{
- SELECT_LEX *sel= Select;
- sel->select_limit= $3;
- sel->offset_limit= $1;
- sel->explicit_limit= 1;
+ $$.select_limit= $3;
+ $$.offset_limit= $1;
+ $$.explicit_limit= 1;
}
| limit_option OFFSET_SYM limit_option
{
- SELECT_LEX *sel= Select;
- sel->select_limit= $1;
- sel->offset_limit= $3;
- sel->explicit_limit= 1;
+ $$.select_limit= $1;
+ $$.offset_limit= $3;
+ $$.explicit_limit= 1;
}
;
@@ -13015,6 +13185,88 @@ delete_limit_clause:
| LIMIT limit_option ROWS_SYM EXAMINED_SYM { thd->parse_error(); MYSQL_YYABORT; }
;
+order_limit_lock:
+ order_or_limit
+ {
+ $$= $1;
+ $$->lock.empty();
+ }
+ | order_or_limit select_lock_type
+ {
+ $$= $1;
+ $$->lock= $2;
+ }
+ | select_lock_type
+ {
+ $$= new(thd->mem_root) Lex_order_limit_lock;
+ if (!$$)
+ YYABORT;
+ $$->order_list= NULL;
+ $$->limit.empty();
+ $$->lock= $1;
+ }
+ ;
+opt_order_limit_lock:
+ /* empty */
+ {
+ Lex->pop_select();
+ $$= NULL;
+ }
+ | order_limit_lock { $$= $1; }
+ ;
+
+query_expression_tail:
+ order_limit_lock
+ ;
+
+opt_query_expression_tail:
+ opt_order_limit_lock
+ ;
+
+opt_procedure_or_into:
+ /* empty */
+ {
+ $$.empty();
+ }
+ | procedure_clause opt_select_lock_type
+ {
+ $$= $2;
+ }
+ | into opt_select_lock_type
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WARN_DEPRECATED_SYNTAX,
+ ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
+ "<select expression> INTO <destination>;",
+ "'SELECT <select list> INTO <destination>"
+ " FROM...'");
+ $$= $2;
+ }
+ ;
+
+
+order_or_limit:
+ order_clause opt_limit_clause
+ {
+ $$= new(thd->mem_root) Lex_order_limit_lock;
+ if (!$$)
+ YYABORT;
+ $$->order_list= $1;
+ $$->limit= $2;
+ }
+ | limit_clause
+ {
+ Lex_order_limit_lock *op= $$= new(thd->mem_root) Lex_order_limit_lock;
+ if (!$$)
+ YYABORT;
+ op->order_list= NULL;
+ op->limit= $1;
+ $$->order_list= NULL;
+ $$->limit= $1;
+ }
+ ;
+
+
opt_plus:
/* empty */
| '+'
@@ -13091,8 +13343,6 @@ procedure_clause:
{
LEX *lex=Lex;
- DBUG_ASSERT(&lex->select_lex == lex->current_select);
-
lex->proc_list.elements=0;
lex->proc_list.first=0;
lex->proc_list.next= &lex->proc_list.first;
@@ -13107,16 +13357,16 @@ procedure_clause:
/*
PROCEDURE CLAUSE cannot handle subquery as one of its parameter,
- so set expr_allows_subselect as false to disallow any subqueries
- further. Reset expr_allows_subselect back to true once the
- parameters are reduced.
+ so disallow any subqueries further.
+ Alow subqueries back once the parameters are reduced.
*/
- Lex->expr_allows_subselect= false;
+ Lex->clause_that_disallows_subselect= "PROCEDURE";
+ Select->options|= OPTION_PROCEDURE_CLAUSE;
}
'(' procedure_list ')'
{
/* Subqueries are allowed from now.*/
- Lex->expr_allows_subselect= true;
+ Lex->clause_that_disallows_subselect= NULL;
}
;
@@ -13195,6 +13445,7 @@ select_outvar:
into:
INTO into_destination
+ {}
;
into_destination:
@@ -13242,11 +13493,14 @@ do:
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_DO;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
mysql_init_select(lex);
}
expr_list
{
Lex->insert_list= $3;
+ Lex->pop_select(); //main select
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
@@ -13266,11 +13520,16 @@ drop:
}
table_list opt_lock_wait_timeout opt_restrict
{}
- | DROP INDEX_SYM opt_if_exists_table_element ident ON table_ident opt_lock_wait_timeout
+ | DROP INDEX_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ opt_if_exists_table_element ident ON table_ident opt_lock_wait_timeout
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
- Alter_drop(Alter_drop::KEY, $4.str, $3));
+ Alter_drop(Alter_drop::KEY, $5.str, $4));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->sql_command= SQLCOM_DROP_INDEX;
@@ -13278,10 +13537,11 @@ drop:
lex->alter_info.flags= ALTER_DROP_INDEX;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
if (unlikely(!lex->current_select->
- add_table_to_list(thd, $6, NULL, TL_OPTION_UPDATING,
+ add_table_to_list(thd, $7, NULL, TL_OPTION_UPDATING,
TL_READ_NO_INSERT,
MDL_SHARED_UPGRADABLE)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
}
| DROP DATABASE opt_if_exists ident
{
@@ -13406,10 +13666,11 @@ table_list:
table_name:
table_ident
{
- if (unlikely(!Select->add_table_to_list(thd, $1, NULL,
- TL_OPTION_UPDATING,
- YYPS->m_lock_type,
- YYPS->m_mdl_type)))
+ if (!thd->lex->current_select_or_default()->
+ add_table_to_list(thd, $1, NULL,
+ TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type))
MYSQL_YYABORT;
}
;
@@ -13482,18 +13743,22 @@ insert:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_INSERT;
- lex->duplicates= DUP_ERROR;
+ lex->duplicates= DUP_ERROR;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
}
insert_lock_option
opt_ignore insert2
{
Select->set_lock_for_tables($3, true);
- Lex->current_select= &Lex->select_lex;
+ Lex->current_select= Lex->first_select_lex();
}
insert_field_spec opt_insert_update
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
Lex->mark_first_table_as_inserting();
}
@@ -13505,16 +13770,20 @@ replace:
LEX *lex=Lex;
lex->sql_command = SQLCOM_REPLACE;
lex->duplicates= DUP_REPLACE;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
}
replace_lock_option insert2
{
Select->set_lock_for_tables($3, true);
- Lex->current_select= &Lex->select_lex;
+ Lex->current_select= Lex->first_select_lex();
}
insert_field_spec
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
Lex->mark_first_table_as_inserting();
}
@@ -13557,10 +13826,13 @@ insert2:
;
insert_table:
+ {
+ Select->save_parsing_place= Select->parsing_place;
+ }
table_name_with_opt_use_partition
{
LEX *lex=Lex;
- lex->field_list.empty();
+ //lex->field_list.empty();
lex->many_values.empty();
lex->insert_list=0;
}
@@ -13568,8 +13840,7 @@ insert_table:
insert_field_spec:
insert_values {}
- | '(' ')' insert_values {}
- | '(' fields ')' insert_values {}
+ | insert_field_list insert_values {}
| SET
{
LEX *lex=Lex;
@@ -13577,20 +13848,33 @@ insert_field_spec:
unlikely(lex->many_values.push_back(lex->insert_list,
thd->mem_root)))
MYSQL_YYABORT;
+ lex->current_select->parsing_place= NO_MATTER;
}
ident_eq_list
;
+insert_field_list:
+ LEFT_PAREN_ALT opt_fields ')'
+ {
+ Lex->current_select->parsing_place= AFTER_LIST;
+ }
+ ;
+
+opt_fields:
+ /* empty */
+ | fields
+ ;
+
fields:
fields ',' insert_ident
{ Lex->field_list.push_back($3, thd->mem_root); }
| insert_ident { Lex->field_list.push_back($1, thd->mem_root); }
;
+
+
insert_values:
- VALUES values_list {}
- | VALUE_SYM values_list {}
- | create_select_query_expression {}
+ create_select_query_expression {}
;
values_list:
@@ -13738,23 +14022,43 @@ opt_insert_update:
}
;
+update_table_list:
+ table_ident opt_use_partition for_portion_of_time_clause
+ opt_table_alias_clause opt_key_definition
+ {
+ SELECT_LEX *sel= Select;
+ sel->table_join_options= 0;
+ if (!($$= Select->add_table_to_list(thd, $1, $4,
+ Select->get_table_join_options(),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ $2)))
+ MYSQL_YYABORT;
+ $$->period_conditions= Lex->period_conditions;
+ }
+ | join_table_list { $$= $1; }
+ ;
+
/* Update rows in a table */
update:
UPDATE_SYM
{
LEX *lex= Lex;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
lex->sql_command= SQLCOM_UPDATE;
lex->duplicates= DUP_ERROR;
}
- opt_low_priority opt_ignore join_table_list
+ opt_low_priority opt_ignore update_table_list
SET update_list
{
- SELECT_LEX *slex= &Lex->select_lex;
+ SELECT_LEX *slex= Lex->first_select_lex();
if (slex->table_list.elements > 1)
Lex->sql_command= SQLCOM_UPDATE_MULTI;
- else if (unlikely(slex->get_table_list()->derived))
+ else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
@@ -13770,7 +14074,10 @@ update:
}
opt_where_clause opt_order_clause delete_limit_clause
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ if ($10)
+ Select->order_list= *($10);
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
;
@@ -13822,12 +14129,13 @@ delete:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_DELETE;
- mysql_init_select(lex);
YYPS->m_lock_type= TL_WRITE_DEFAULT;
YYPS->m_mdl_type= MDL_SHARED_WRITE;
-
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ mysql_init_select(lex);
lex->ignore= 0;
- lex->select_lex.init_order();
+ lex->first_select_lex()->order_list.empty();
}
delete_part2
{
@@ -13852,6 +14160,7 @@ delete_part2:
| HISTORY_SYM delete_single_table opt_delete_system_time
{
Lex->last_table()->vers_conditions= Lex->vers_conditions;
+ Lex->pop_select(); //main select
}
;
@@ -13870,12 +14179,25 @@ delete_single_table:
}
;
+delete_single_table_for_period:
+ delete_single_table opt_for_portion_of_time_clause
+ {
+ if ($2)
+ Lex->last_table()->period_conditions= Lex->period_conditions;
+ }
+ ;
+
single_multi:
- delete_single_table
+ delete_single_table_for_period
opt_where_clause
opt_order_clause
delete_limit_clause
- opt_select_expressions {}
+ opt_select_expressions
+ {
+ if ($3)
+ Select->order_list= *($3);
+ Lex->pop_select(); //main select
+ }
| table_wild_list
{
mysql_init_multi_delete(Lex);
@@ -13886,6 +14208,9 @@ single_multi:
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
| FROM table_alias_ref_list
{
@@ -13897,7 +14222,8 @@ single_multi:
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
;
@@ -13967,9 +14293,9 @@ truncate:
LEX* lex= Lex;
lex->sql_command= SQLCOM_TRUNCATE;
lex->alter_info.reset();
- lex->select_lex.options= 0;
- lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE_UNSPECIFIED;
- lex->select_lex.init_order();
+ lex->first_select_lex()->options= 0;
+ lex->sql_cache= LEX::SQL_CACHE_UNSPECIFIED;
+ lex->first_select_lex()->order_list.empty();
YYPS->m_lock_type= TL_WRITE;
YYPS->m_mdl_type= MDL_EXCLUSIVE;
}
@@ -14061,6 +14387,8 @@ show:
LEX *lex=Lex;
lex->wild=0;
lex->ident= null_clex_str;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
lex->current_select->parsing_place= SELECT_LIST;
lex->create_info.init();
@@ -14068,6 +14396,7 @@ show:
show_param
{
Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
}
;
@@ -14083,40 +14412,40 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLES;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES))
MYSQL_YYABORT;
}
| opt_full TRIGGERS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TRIGGERS;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS))
MYSQL_YYABORT;
}
| EVENTS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_EVENTS;
- lex->select_lex.db= $2;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_EVENTS)))
+ lex->first_select_lex()->db= $2;
+ if (prepare_schema_table(thd, lex, 0, SCH_EVENTS))
MYSQL_YYABORT;
}
| TABLE_SYM STATUS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLES)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLES))
MYSQL_YYABORT;
}
| OPEN_SYM TABLES opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
- lex->select_lex.db= $3;
- if (unlikely(prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)))
+ lex->first_select_lex()->db= $3;
+ if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES))
MYSQL_YYABORT;
}
| PLUGINS_SYM
@@ -14165,12 +14494,13 @@ show_param:
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
}
- opt_limit_clause
+ opt_global_limit_clause
| RELAYLOG_SYM optional_connection_name EVENTS_SYM binlog_in binlog_from
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
- } opt_limit_clause
+ }
+ opt_global_limit_clause
| keys_or_index from_or_in table_ident opt_db opt_where_clause
{
LEX *lex= Lex;
@@ -14212,13 +14542,13 @@ show_param:
LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
(void) create_select_for_variable(thd, &var);
}
- | WARNINGS opt_limit_clause
+ | WARNINGS opt_global_limit_clause
{ Lex->sql_command = SQLCOM_SHOW_WARNS;}
- | ERRORS opt_limit_clause
+ | ERRORS opt_global_limit_clause
{ Lex->sql_command = SQLCOM_SHOW_ERRORS;}
| PROFILES_SYM
{ Lex->sql_command = SQLCOM_SHOW_PROFILES; }
- | PROFILE_SYM opt_profile_defs opt_profile_args opt_limit_clause
+ | PROFILE_SYM opt_profile_defs opt_profile_args opt_global_limit_clause
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_PROFILE;
@@ -14280,7 +14610,7 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $3, NULL,0)))
+ if (!lex->first_select_lex()->add_table_to_list(thd, $3, NULL,0))
MYSQL_YYABORT;
lex->create_info.storage_media= HA_SM_DEFAULT;
}
@@ -14288,7 +14618,7 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $3, NULL, 0)))
+ if (!lex->first_select_lex()->add_table_to_list(thd, $3, NULL, 0))
MYSQL_YYABORT;
lex->table_type= TABLE_TYPE_VIEW;
}
@@ -14296,7 +14626,7 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
- if (unlikely(!lex->select_lex.add_table_to_list(thd, $3, NULL, 0)))
+ if (!lex->first_select_lex()->add_table_to_list(thd, $3, NULL, 0))
MYSQL_YYABORT;
lex->table_type= TABLE_TYPE_SEQUENCE;
}
@@ -14510,10 +14840,12 @@ describe:
describe_command table_ident
{
LEX *lex= Lex;
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
mysql_init_select(lex);
lex->current_select->parsing_place= SELECT_LIST;
lex->sql_command= SQLCOM_SHOW_FIELDS;
- lex->select_lex.db= null_clex_str;
+ lex->first_select_lex()->db= null_clex_str;
lex->verbose= 0;
if (unlikely(prepare_schema_table(thd, lex, $2, SCH_COLUMNS)))
MYSQL_YYABORT;
@@ -14521,18 +14853,20 @@ describe:
opt_describe_column
{
Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
}
| describe_command opt_extended_describe
{ Lex->describe|= DESCRIBE_NORMAL; }
explainable_command
{
LEX *lex=Lex;
- lex->select_lex.options|= SELECT_DESCRIBE;
+ lex->first_select_lex()->options|= SELECT_DESCRIBE;
}
;
explainable_command:
select
+ | select_into
| insert
| replace
| update
@@ -14553,6 +14887,8 @@ analyze_stmt_command:
opt_extended_describe:
EXTENDED_SYM { Lex->describe|= DESCRIBE_EXTENDED; }
+ | EXTENDED_SYM ALL
+ { Lex->describe|= DESCRIBE_EXTENDED | DESCRIBE_EXTENDED2; }
| PARTITIONS_SYM { Lex->describe|= DESCRIBE_PARTITIONS; }
| opt_format_json {}
;
@@ -14595,8 +14931,7 @@ flush:
lex->type= 0;
lex->no_write_to_binlog= $2;
}
- flush_options
- {}
+ flush_options {}
;
flush_options:
@@ -14613,6 +14948,7 @@ flush_options:
opt_table_list opt_flush_lock
{}
| flush_options_list
+ {}
;
opt_flush_lock:
@@ -14698,6 +15034,8 @@ flush_option:
{ Lex->type|= REFRESH_DES_KEY_FILE; }
| RESOURCES
{ Lex->type|= REFRESH_USER_RESOURCES; }
+ | SSL_SYM
+ { Lex->type|= REFRESH_SSL;}
| IDENT_sys remember_tok_start
{
Lex->type|= REFRESH_GENERIC;
@@ -14719,6 +15057,43 @@ opt_table_list:
| table_list {}
;
+backup:
+ BACKUP_SYM backup_statements {}
+ ;
+
+backup_statements:
+ STAGE_SYM ident
+ {
+ int type;
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP STAGE"));
+ if ((type= find_type($2.str, &backup_stage_names,
+ FIND_TYPE_NO_PREFIX)) <= 0)
+ my_yyabort_error((ER_BACKUP_UNKNOWN_STAGE, MYF(0), $2.str));
+ Lex->sql_command= SQLCOM_BACKUP;
+ Lex->backup_stage= (backup_stages) (type-1);
+ break;
+ }
+ | LOCK_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ table_ident
+ {
+ if (unlikely(!Select->add_table_to_list(thd, $3, NULL, 0,
+ TL_READ, MDL_SHARED_HIGH_PRIO)))
+ MYSQL_YYABORT;
+ Lex->sql_command= SQLCOM_BACKUP_LOCK;
+ Lex->pop_select(); //main select
+ }
+ | UNLOCK_SYM
+ {
+ /* Table list is empty for unlock */
+ Lex->sql_command= SQLCOM_BACKUP_LOCK;
+ }
+ ;
+
opt_delete_gtid_domain:
/* empty */ {}
| DELETE_DOMAIN_ID_SYM '=' '(' delete_domain_id_list ')'
@@ -14793,34 +15168,21 @@ master_reset_options:
;
purge:
- PURGE
- {
- LEX *lex=Lex;
- lex->type=0;
- lex->sql_command = SQLCOM_PURGE;
- }
- purge_options
- {}
- ;
-
-purge_options:
- master_or_binary LOGS_SYM purge_option
- ;
-
-purge_option:
- TO_SYM TEXT_STRING_sys
+ PURGE master_or_binary LOGS_SYM TO_SYM TEXT_STRING_sys
{
- Lex->to_log = $2.str;
+ Lex->stmt_purge_to($5);
}
- | BEFORE_SYM expr
+ | PURGE master_or_binary LOGS_SYM BEFORE_SYM
+ { Lex->clause_that_disallows_subselect= "PURGE..BEFORE"; }
+ expr
{
- LEX *lex= Lex;
- lex->value_list.empty();
- lex->value_list.push_front($2, thd->mem_root);
- lex->sql_command= SQLCOM_PURGE_BEFORE;
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_purge_before($6))
+ MYSQL_YYABORT;
}
;
+
/* kill threads */
kill:
@@ -14874,8 +15236,16 @@ kill_expr:
shutdown:
SHUTDOWN { Lex->sql_command= SQLCOM_SHUTDOWN; }
+ shutdown_option {}
;
+shutdown_option:
+ /* Empty */ { Lex->is_shutdown_wait_for_slaves= false; }
+ | WAIT_SYM FOR_SYM ALL SLAVES
+ {
+ Lex->is_shutdown_wait_for_slaves= true;
+ }
+ ;
/* change database */
use:
@@ -14883,7 +15253,7 @@ use:
{
LEX *lex=Lex;
lex->sql_command=SQLCOM_CHANGE_DB;
- lex->select_lex.db= $2;
+ lex->first_select_lex()->db= $2;
}
;
@@ -14900,6 +15270,9 @@ load:
$2 == FILETYPE_CSV ? "LOAD DATA" : "LOAD XML");
MYSQL_YYABORT;
}
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ mysql_init_select(lex);
}
load_data_lock opt_local INFILE TEXT_STRING_filesystem
{
@@ -14931,7 +15304,8 @@ load:
opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec
opt_load_data_set_spec
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
Lex->mark_first_table_as_inserting();
}
@@ -15133,11 +15507,6 @@ hex_or_bin_String:
$1.length);
if (unlikely(tmp == NULL))
MYSQL_YYABORT;
- /*
- it is OK only emulate fix_fields, because we need only
- value of constant
- */
- tmp->quick_fix_field();
$$= tmp->val_str((String*) 0);
}
| HEX_STRING
@@ -15146,7 +15515,6 @@ hex_or_bin_String:
$1.length);
if (unlikely(tmp == NULL))
MYSQL_YYABORT;
- tmp->quick_fix_field();
$$= tmp->val_str((String*) 0);
}
| BIN_NUM
@@ -15159,7 +15527,6 @@ hex_or_bin_String:
it is OK only emulate fix_fields, because we need only
value of constant
*/
- tmp->quick_fix_field();
$$= tmp->val_str((String*) 0);
}
;
@@ -15308,53 +15675,44 @@ NUM_literal:
temporal_literal:
DATE_SYM TEXT_STRING
{
- if (unlikely(!($$= create_temporal_literal(thd, $2.str, $2.length,
- YYCSCL,
- MYSQL_TYPE_DATE,
- true))))
+ if (unlikely(!($$= type_handler_newdate.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true))))
MYSQL_YYABORT;
}
| TIME_SYM TEXT_STRING
{
- if (unlikely(!($$= create_temporal_literal(thd, $2.str, $2.length,
- YYCSCL,
- MYSQL_TYPE_TIME,
- true))))
+ if (unlikely(!($$= type_handler_time2.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true))))
MYSQL_YYABORT;
}
| TIMESTAMP TEXT_STRING
{
- if (unlikely(!($$= create_temporal_literal(thd, $2.str, $2.length,
- YYCSCL,
- MYSQL_TYPE_DATETIME,
- true))))
+ if (unlikely(!($$= type_handler_datetime2.create_literal_item(thd,
+ $2.str, $2.length,
+ YYCSCL, true))))
MYSQL_YYABORT;
}
;
-
-opt_with_clause:
- /*empty */ { $$= 0; }
- | with_clause
- {
- $$= $1;
- }
- ;
-
-
with_clause:
- WITH opt_recursive
+ WITH opt_recursive
{
+ LEX *lex= Lex;
With_clause *with_clause=
new With_clause($2, Lex->curr_with_clause);
if (unlikely(with_clause == NULL))
MYSQL_YYABORT;
- Lex->derived_tables|= DERIVED_WITH;
- Lex->with_cte_resolution= true;
- Lex->curr_with_clause= with_clause;
+ lex->derived_tables|= DERIVED_WITH;
+ lex->with_cte_resolution= true;
+ lex->curr_with_clause= with_clause;
with_clause->add_to_list(Lex->with_clauses_list_last_next);
+ if (lex->current_select &&
+ lex->current_select->parsing_place == BEFORE_OPT_LIST)
+ lex->current_select->parsing_place= NO_MATTER;
}
- with_list
+ with_list
{
$$= Lex->curr_with_clause;
Lex->curr_with_clause= Lex->curr_with_clause->pop();
@@ -15383,17 +15741,16 @@ with_list_element:
MYSQL_YYABORT;
Lex->with_column_list.empty();
}
- AS '(' remember_tok_start subselect remember_tok_end ')'
+ AS '(' query_expression ')'
{
LEX *lex= thd->lex;
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
: thd->query();
- char *spec_start= $6 + 1;
- With_element *elem= new With_element($1, *$2, $7->master_unit());
- if (unlikely(elem == NULL) ||
- unlikely(Lex->curr_with_clause->add_with_element(elem)))
+ const char *spec_start= $5.pos() + 1;
+ With_element *elem= new With_element($1, *$2, $6);
+ if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
- if (elem->set_unparsed_spec(thd, spec_start, $8,
+ if (elem->set_unparsed_spec(thd, spec_start, $7.pos(),
spec_start - query_start))
MYSQL_YYABORT;
elem->set_tables_end_pos(lex->query_tables_last);
@@ -15428,10 +15785,8 @@ with_element_head:
{
LEX_CSTRING *name=
(LEX_CSTRING *) thd->memdup(&$1, sizeof(LEX_CSTRING));
- if (unlikely($$ == NULL))
- MYSQL_YYABORT;
$$= new (thd->mem_root) With_element_head(name);
- if ($$ == NULL)
+ if (unlikely(name == NULL || $$ == NULL))
MYSQL_YYABORT;
$$->tables_pos.set_start_pos(Lex->query_tables_last);
}
@@ -15735,11 +16090,9 @@ ident_or_text:
user_maybe_role:
ident_or_text
{
- if (unlikely(!($$=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
+ if (unlikely(!($$=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user = $1;
- $$->host= null_clex_str; // User or Role, see get_current_user()
- $$->reset_auth();
if (unlikely(check_string_char_length(&$$->user, ER_USERNAME,
username_char_length,
@@ -15748,10 +16101,9 @@ user_maybe_role:
}
| ident_or_text '@' ident_or_text
{
- if (unlikely(!($$=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
+ if (unlikely(!($$=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user = $1; $$->host=$3;
- $$->reset_auth();
if (unlikely(check_string_char_length(&$$->user, ER_USERNAME,
username_char_length,
@@ -15781,8 +16133,7 @@ user_maybe_role:
if (unlikely(!($$=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user= current_user;
- $$->plugin= empty_clex_str;
- $$->auth= empty_clex_str;
+ $$->auth= new (thd->mem_root) USER_AUTH();
}
;
@@ -16082,6 +16433,7 @@ keyword_data_type:
*/
keyword_sp_var_and_label:
ACTION
+ | ACCOUNT_SYM
| ADDDATE_SYM
| ADMIN_SYM
| AFTER_SYM
@@ -16165,6 +16517,7 @@ keyword_sp_var_and_label:
| EXCEPTION_MARIADB_SYM
| EXCHANGE_SYM
| EXPANSION_SYM
+ | EXPIRE_SYM
| EXPORT_SYM
| EXTENDED_SYM
| EXTENT_SIZE_SYM
@@ -16257,6 +16610,7 @@ keyword_sp_var_and_label:
| NAME_SYM
| NEXT_SYM %prec PREC_BELOW_CONTRACTION_TOKEN2
| NEXTVAL_SYM
+ | NEVER_SYM
| NEW_SYM
| NOCACHE_SYM
| NOCYCLE_SYM
@@ -16343,6 +16697,7 @@ keyword_sp_var_and_label:
| SQL_BUFFER_RESULT
| SQL_NO_CACHE_SYM
| SQL_THREAD
+ | STAGE_SYM
| STARTS_SYM
| STATEMENT_SYM
| STATUS_SYM
@@ -16410,17 +16765,23 @@ set:
SET
{
LEX *lex=Lex;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
lex->set_stmt_init();
lex->var_list.empty();
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
start_option_value_list
{
- if (Lex->check_cte_dependencies_and_resolve_references())
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
| SET STATEMENT_SYM
{
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
Lex->set_stmt_init();
}
set_stmt_option_value_following_option_type_list
@@ -16430,6 +16791,9 @@ set:
my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), "SET STATEMENT"));
lex->stmt_var_list= lex->var_list;
lex->var_list.empty();
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
}
FOR_SYM verb_clause
{}
@@ -16441,7 +16805,8 @@ set_assign:
LEX *lex=Lex;
lex->set_stmt_init();
lex->var_list.empty();
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if(sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
set_expr_or_default
{
@@ -16454,7 +16819,8 @@ set_assign:
LEX *lex=Lex;
lex->set_stmt_init();
lex->var_list.empty();
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
set_expr_or_default
{
@@ -16474,7 +16840,8 @@ set_assign:
}
lex->set_stmt_init();
lex->var_list.empty();
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
set_expr_or_default
{
@@ -16544,7 +16911,8 @@ option_value_list_continued:
/* Repeating list of option values after first option value. */
option_value_list:
{
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
option_value
{
@@ -16553,7 +16921,8 @@ option_value_list:
}
| option_value_list ','
{
- sp_create_assignment_lex(thd, yychar == YYEMPTY);
+ if (sp_create_assignment_lex(thd, yychar == YYEMPTY))
+ MYSQL_YYABORT;
}
option_value
{
@@ -16819,21 +17188,29 @@ opt_for_user:
thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
lex->definer->user= current_user;
- lex->definer->plugin= empty_clex_str;
- lex->definer->auth= empty_clex_str;
+ lex->definer->auth= new (thd->mem_root) USER_AUTH();
}
| FOR_SYM user equal { Lex->definer= $2; }
;
text_or_password:
- TEXT_STRING { Lex->definer->pwhash= $1;}
- | PASSWORD_SYM '(' TEXT_STRING ')' { Lex->definer->pwtext= $3; }
+ TEXT_STRING
+ {
+ Lex->definer->auth= new (thd->mem_root) USER_AUTH();
+ Lex->definer->auth->auth_str= $1;
+ }
+ | PASSWORD_SYM '(' TEXT_STRING ')'
+ {
+ Lex->definer->auth= new (thd->mem_root) USER_AUTH();
+ Lex->definer->auth->pwtext= $3;
+ }
| OLD_PASSWORD_SYM '(' TEXT_STRING ')'
{
- Lex->definer->pwtext= $3;
- Lex->definer->pwhash.str= Item_func_password::alloc(thd,
+ Lex->definer->auth= new (thd->mem_root) USER_AUTH();
+ Lex->definer->auth->pwtext= $3;
+ Lex->definer->auth->auth_str.str= Item_func_password::alloc(thd,
$3.str, $3.length, Item_func_password::OLD);
- Lex->definer->pwhash.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
+ Lex->definer->auth->auth_str.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
}
;
@@ -16903,7 +17280,7 @@ table_lock_list:
;
table_lock:
- table_ident opt_table_alias lock_option
+ table_ident opt_table_alias_clause lock_option
{
thr_lock_type lock_type= (thr_lock_type) $3;
bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE);
@@ -16914,7 +17291,7 @@ table_lock:
? MDL_SHARED_WRITE
: MDL_SHARED_NO_READ_WRITE;
- if (unlikely(!Select->
+ if (unlikely(!Lex->current_select_or_default()->
add_table_to_list(thd, $1, $2, table_options,
lock_type, mdl_type)))
MYSQL_YYABORT;
@@ -16951,32 +17328,42 @@ unlock:
*/
handler:
- HANDLER_SYM table_ident OPEN_SYM opt_table_alias
+ HANDLER_SYM
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+ handler_tail
+ {
+ Lex->pop_select(); //main select
+ }
+ ;
+
+handler_tail:
+ table_ident OPEN_SYM opt_table_alias_clause
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
lex->sql_command = SQLCOM_HA_OPEN;
- if (unlikely(!lex->current_select->add_table_to_list(thd, $2, $4,
- 0)))
+ if (!lex->current_select->add_table_to_list(thd, $1, $3, 0))
MYSQL_YYABORT;
}
- | HANDLER_SYM table_ident_nodb CLOSE_SYM
+ | table_ident_nodb CLOSE_SYM
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
lex->sql_command = SQLCOM_HA_CLOSE;
- if (unlikely(!lex->current_select->add_table_to_list(thd, $2, 0,
- 0)))
+ if (!lex->current_select->add_table_to_list(thd, $1, 0, 0))
MYSQL_YYABORT;
}
- | HANDLER_SYM table_ident_nodb READ_SYM
+ | table_ident_nodb READ_SYM
{
LEX *lex=Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
- lex->expr_allows_subselect= FALSE;
+ lex->clause_that_disallows_subselect= "HANDLER..READ";
lex->sql_command = SQLCOM_HA_READ;
lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */
Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
@@ -16985,15 +17372,24 @@ handler:
lex->current_select->select_limit= one;
lex->current_select->offset_limit= 0;
lex->limit_rows_examined= 0;
- if (unlikely(!lex->current_select->add_table_to_list(thd, $2, 0,
- 0)))
+ if (!lex->current_select->add_table_to_list(thd, $1, 0, 0))
MYSQL_YYABORT;
}
- handler_read_or_scan opt_where_clause opt_limit_clause
+ handler_read_or_scan opt_where_clause opt_global_limit_clause
{
- Lex->expr_allows_subselect= TRUE;
+ LEX *lex=Lex;
+ lex->clause_that_disallows_subselect= NULL;
+ if (!lex->current_select->explicit_limit)
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (one == NULL)
+ MYSQL_YYABORT;
+ lex->current_select->select_limit= one;
+ lex->current_select->offset_limit= 0;
+ lex->limit_rows_examined= 0;
+ }
/* Stored functions are not supported for HANDLER READ. */
- if (unlikely(Lex->uses_stored_routines()))
+ if (lex->uses_stored_routines())
{
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
"stored functions in HANDLER ... READ");
@@ -17191,7 +17587,7 @@ current_role:
if (unlikely(!($$=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
$$->user= current_role;
- $$->reset_auth();
+ $$->auth= NULL;
}
;
@@ -17208,7 +17604,7 @@ grant_role:
MYSQL_YYABORT;
$$->user= $1;
$$->host= empty_clex_str;
- $$->reset_auth();
+ $$->auth= NULL;
if (unlikely(check_string_char_length(&$$->user, ER_USERNAME,
username_char_length,
@@ -17298,23 +17694,23 @@ require_list_element:
SUBJECT_SYM TEXT_STRING
{
LEX *lex=Lex;
- if (unlikely(lex->x509_subject))
+ if (lex->account_options.x509_subject.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
- lex->x509_subject=$2.str;
+ lex->account_options.x509_subject= $2;
}
| ISSUER_SYM TEXT_STRING
{
LEX *lex=Lex;
- if (unlikely(lex->x509_issuer))
+ if (lex->account_options.x509_issuer.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
- lex->x509_issuer=$2.str;
+ lex->account_options.x509_issuer= $2;
}
| CIPHER_SYM TEXT_STRING
{
LEX *lex=Lex;
- if (unlikely(lex->ssl_cipher))
+ if (lex->account_options.ssl_cipher.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
- lex->ssl_cipher=$2.str;
+ lex->account_options.ssl_cipher= $2;
}
;
@@ -17322,7 +17718,7 @@ grant_ident:
'*'
{
LEX *lex= Lex;
- if (unlikely(lex->copy_db_to(&lex->current_select->db)))
+ if (unlikely(lex->copy_db_to(&lex->first_select_lex()->db)))
MYSQL_YYABORT;
if (lex->grant == GLOBAL_ACLS)
lex->grant = DB_ACLS & ~GRANT_ACL;
@@ -17332,7 +17728,7 @@ grant_ident:
| ident '.' '*'
{
LEX *lex= Lex;
- lex->current_select->db= $1;
+ lex->first_select_lex()->db= $1;
if (lex->grant == GLOBAL_ACLS)
lex->grant = DB_ACLS & ~GRANT_ACL;
else if (unlikely(lex->columns.elements))
@@ -17341,7 +17737,7 @@ grant_ident:
| '*' '.' '*'
{
LEX *lex= Lex;
- lex->current_select->db= null_clex_str;
+ lex->first_select_lex()->db= null_clex_str;
if (lex->grant == GLOBAL_ACLS)
lex->grant= GLOBAL_ACLS & ~GRANT_ACL;
else if (unlikely(lex->columns.elements))
@@ -17350,7 +17746,7 @@ grant_ident:
| table_ident
{
LEX *lex=Lex;
- if (unlikely(!lex->current_select->
+ if (unlikely(!lex->first_select_lex()->
add_table_to_list(thd, $1,NULL,
TL_OPTION_UPDATING)))
MYSQL_YYABORT;
@@ -17405,29 +17801,65 @@ grant_user:
user IDENTIFIED_SYM BY TEXT_STRING
{
$$= $1;
- $1->pwtext= $4;
- if (unlikely(Lex->sql_command == SQLCOM_REVOKE))
- MYSQL_YYABORT;
+ $1->auth= new (thd->mem_root) USER_AUTH();
+ $1->auth->pwtext= $4;
}
| user IDENTIFIED_SYM BY PASSWORD_SYM TEXT_STRING
{
$$= $1;
- $1->pwhash= $5;
+ $1->auth= new (thd->mem_root) USER_AUTH();
+ $1->auth->auth_str= $5;
+ }
+ | user IDENTIFIED_SYM via_or_with auth_expression
+ {
+ $$= $1;
+ $1->auth= $4;
}
- | user IDENTIFIED_SYM via_or_with ident_or_text
+ | user_or_role
{
$$= $1;
- $1->plugin= $4;
- $1->auth= empty_clex_str;
}
- | user IDENTIFIED_SYM via_or_with ident_or_text using_or_as TEXT_STRING_sys
+ ;
+
+auth_expression:
+ auth_token OR_SYM auth_expression
{
$$= $1;
- $1->plugin= $4;
- $1->auth= $6;
+ DBUG_ASSERT($$->next == NULL);
+ $$->next= $3;
}
- | user_or_role
- { $$= $1; }
+ | auth_token
+ {
+ $$= $1;
+ }
+ ;
+
+auth_token:
+ ident_or_text opt_auth_str
+ {
+ $$= $2;
+ $$->plugin= $1;
+ }
+ ;
+
+opt_auth_str:
+ /* empty */
+ {
+ if (!($$=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ }
+ | using_or_as TEXT_STRING_sys
+ {
+ if (!($$=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ $$->auth_str= $2;
+ }
+ | using_or_as PASSWORD_SYM '(' TEXT_STRING ')'
+ {
+ if (!($$=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ $$->pwtext= $4;
+ }
;
opt_column_list:
@@ -17436,7 +17868,7 @@ opt_column_list:
LEX *lex=Lex;
lex->grant |= lex->which_columns;
}
- | '(' column_list ')'
+ | '(' column_list ')' { }
;
column_list:
@@ -17477,52 +17909,47 @@ opt_require_clause:
/* empty */
| REQUIRE_SYM require_list
{
- Lex->ssl_type=SSL_TYPE_SPECIFIED;
+ Lex->account_options.ssl_type= SSL_TYPE_SPECIFIED;
}
| REQUIRE_SYM SSL_SYM
{
- Lex->ssl_type=SSL_TYPE_ANY;
+ Lex->account_options.ssl_type= SSL_TYPE_ANY;
}
| REQUIRE_SYM X509_SYM
{
- Lex->ssl_type=SSL_TYPE_X509;
+ Lex->account_options.ssl_type= SSL_TYPE_X509;
}
| REQUIRE_SYM NONE_SYM
{
- Lex->ssl_type=SSL_TYPE_NONE;
+ Lex->account_options.ssl_type= SSL_TYPE_NONE;
}
;
resource_option:
MAX_QUERIES_PER_HOUR ulong_num
{
- LEX *lex=Lex;
- lex->mqh.questions=$2;
- lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
+ Lex->account_options.questions=$2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
}
| MAX_UPDATES_PER_HOUR ulong_num
{
- LEX *lex=Lex;
- lex->mqh.updates=$2;
- lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
+ Lex->account_options.updates=$2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
}
| MAX_CONNECTIONS_PER_HOUR ulong_num
{
- LEX *lex=Lex;
- lex->mqh.conn_per_hour= $2;
- lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
+ Lex->account_options.conn_per_hour= $2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
}
| MAX_USER_CONNECTIONS_SYM int_num
{
- LEX *lex=Lex;
- lex->mqh.user_conn= $2;
- lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
+ Lex->account_options.user_conn= $2;
+ Lex->account_options.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
}
| MAX_STATEMENT_TIME_SYM NUM_literal
{
- LEX *lex=Lex;
- lex->mqh.max_statement_time= $2->val_real();
- lex->mqh.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
+ Lex->account_options.max_statement_time= $2->val_real();
+ Lex->account_options.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
}
;
@@ -17571,8 +17998,8 @@ compound_statement:
sp_proc_stmt_compound_ok
{
Lex->sql_command= SQLCOM_COMPOUND;
- Lex->sphead->set_stmt_end(thd);
- Lex->sphead->restore_thd_mem_root(thd);
+ if (Lex->sp_body_finalize_procedure(thd))
+ MYSQL_YYABORT;
}
;
@@ -17659,214 +18086,27 @@ release:
*/
unit_type_decl:
- UNION_SYM
- { $$= UNION_TYPE; }
+ UNION_SYM union_option
+ { $$.unit_type= UNION_TYPE; $$.distinct= $2; }
| INTERSECT_SYM
- { $$= INTERSECT_TYPE; }
+ { $$.unit_type= INTERSECT_TYPE; $$.distinct= 1; }
| EXCEPT_SYM
- { $$= EXCEPT_TYPE; }
- ;
-
-union_clause:
- /* empty */ {}
- | union_list
- ;
-
-union_list:
- unit_type_decl union_option
- {
- if (unlikely(Lex->add_select_to_union_list((bool)$2, $1, TRUE)))
- MYSQL_YYABORT;
- }
- union_list_part2
- {
- /*
- Remove from the name resolution context stack the context of the
- last select in the union.
- */
- Lex->pop_context();
- }
- ;
-
-union_list_view:
- unit_type_decl union_option
- {
- if (unlikely(Lex->add_select_to_union_list((bool)$2, $1, TRUE)))
- MYSQL_YYABORT;
- }
- query_expression_body_view
- {
- Lex->pop_context();
- }
- ;
-
-union_order_or_limit:
- {
- LEX *lex= thd->lex;
- DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
- SELECT_LEX *sel= lex->current_select;
- SELECT_LEX_UNIT *unit= sel->master_unit();
- SELECT_LEX *fake= unit->fake_select_lex;
- if (fake)
- {
- fake->no_table_names_allowed= 1;
- lex->current_select= fake;
- }
- thd->where= "global ORDER clause";
- }
- order_or_limit
- {
- thd->lex->current_select->no_table_names_allowed= 0;
- thd->where= "";
- }
- ;
-
-order_or_limit:
- order_clause opt_limit_clause
- | limit_clause
+ { $$.unit_type= EXCEPT_TYPE; $$.distinct= 1; }
;
/*
Start a UNION, for non-top level query expressions.
*/
-union_head_non_top:
- unit_type_decl union_option
- {
- if (unlikely(Lex->add_select_to_union_list((bool)$2, $1, FALSE)))
- MYSQL_YYABORT;
- }
- ;
-
union_option:
/* empty */ { $$=1; }
| DISTINCT { $$=1; }
| ALL { $$=0; }
;
-simple_table:
- query_specification { $$= $1; }
- | table_value_constructor { $$= $1; }
- ;
-
-table_value_constructor:
- VALUES
- {
- Lex->tvc_start();
- }
- values_list
- {
- $$= Lex->current_select;
- if (Lex->tvc_finalize())
- MYSQL_YYABORT;
- }
- ;
-
-/*
- Corresponds to the SQL Standard
- <query specification> ::=
- SELECT [ <set quantifier> ] <select list> <table expression>
-
- Notes:
- - We allow more options in addition to <set quantifier>
- - <table expression> is optional in MariaDB
-*/
-query_specification:
- SELECT_SYM select_init2_derived opt_table_expression
- {
- $$= Lex->current_select->master_unit()->first_select();
- }
- ;
-
-query_term_union_not_ready:
- simple_table order_or_limit opt_select_lock_type { $$= $1; }
- | '(' select_paren_derived ')' union_order_or_limit { $$= $2; }
- ;
-
-query_term_union_ready:
- simple_table opt_select_lock_type { $$= $1; }
- | '(' select_paren_derived ')' { $$= $2; }
- ;
-
-query_expression_body:
- query_term_union_not_ready { $$= $1; }
- | query_term_union_ready { $$= $1; }
- | query_term_union_ready union_list_derived { $$= $1; }
- ;
-
-/* Corresponds to <query expression> in the SQL:2003 standard. */
-subselect:
- subselect_start opt_with_clause query_expression_body subselect_end
- {
- $3->set_with_clause($2);
- $$= $3;
- }
- ;
-
-subselect_start:
- {
- LEX *lex=Lex;
- if (unlikely(!lex->expr_allows_subselect ||
- lex->sql_command == (int)SQLCOM_PURGE))
- {
- thd->parse_error();
- MYSQL_YYABORT;
- }
- /*
- we are making a "derived table" for the parenthesis
- as we need to have a lex level to fit the union
- after the parenthesis, e.g.
- (SELECT .. ) UNION ... becomes
- SELECT * FROM ((SELECT ...) UNION ...)
- */
- if (unlikely(mysql_new_select(Lex, 1, NULL)))
- MYSQL_YYABORT;
- }
- ;
-
-subselect_end:
- {
- LEX *lex=Lex;
-
- lex->check_automatic_up(UNSPECIFIED_TYPE);
- lex->pop_context();
- SELECT_LEX *child= lex->current_select;
- lex->current_select = lex->current_select->return_after_parsing();
- lex->nest_level--;
- lex->current_select->n_child_sum_items += child->n_sum_items;
-
- /*
- A subquery (and all the subsequent query blocks in a UNION) can
- add columns to an outer query block. Reserve space for them.
- Aggregate functions in having clause can also add fields to an
- outer select.
- */
- for (SELECT_LEX *temp= child->master_unit()->first_select();
- temp != NULL; temp= temp->next_select())
- {
- lex->current_select->select_n_where_fields+=
- temp->select_n_where_fields;
- lex->current_select->select_n_having_items+=
- temp->select_n_having_items;
- }
- }
- ;
-
-opt_query_expression_options:
- /* empty */
- | query_expression_option_list
- ;
-
-query_expression_option_list:
- query_expression_option_list query_expression_option
- | query_expression_option
- ;
-
query_expression_option:
STRAIGHT_JOIN { Select->options|= SELECT_STRAIGHT_JOIN; }
| HIGH_PRIORITY
{
- if (unlikely(Lex->check_simple_select(&$1)))
- MYSQL_YYABORT;
YYPS->m_lock_type= TL_READ_HIGH_PRIORITY;
YYPS->m_mdl_type= MDL_SHARED_READ;
Select->options|= SELECT_HIGH_PRIORITY;
@@ -17875,18 +18115,8 @@ query_expression_option:
| UNIQUE_SYM { Select->options|= SELECT_DISTINCT; }
| SQL_SMALL_RESULT { Select->options|= SELECT_SMALL_RESULT; }
| SQL_BIG_RESULT { Select->options|= SELECT_BIG_RESULT; }
- | SQL_BUFFER_RESULT
- {
- if (unlikely(Lex->check_simple_select(&$1)))
- MYSQL_YYABORT;
- Select->options|= OPTION_BUFFER_RESULT;
- }
- | SQL_CALC_FOUND_ROWS
- {
- if (unlikely(Lex->check_simple_select(&$1)))
- MYSQL_YYABORT;
- Select->options|= OPTION_FOUND_ROWS;
- }
+ | SQL_BUFFER_RESULT { Select->options|= OPTION_BUFFER_RESULT; }
+ | SQL_CALC_FOUND_ROWS { Select->options|= OPTION_FOUND_ROWS; }
| ALL { Select->options|= SELECT_ALL; }
;
@@ -17919,9 +18149,7 @@ definer:
DEFINER_SYM '=' user_or_role
{
Lex->definer= $3;
- Lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
- Lex->ssl_cipher= Lex->x509_subject= Lex->x509_issuer= 0;
- bzero(&(Lex->mqh), sizeof(Lex->mqh));
+ Lex->account_options.reset();
}
;
@@ -17950,7 +18178,7 @@ view_suid:
view_list_opt:
/* empty */
{}
- | '(' view_list ')'
+ | '(' view_list ')' { }
;
view_list:
@@ -17974,38 +18202,14 @@ view_select:
lex->parsing_options.allows_variable= FALSE;
lex->create_view->select.str= (char *) YYLIP->get_cpp_ptr();
}
- opt_with_clause query_expression_body_view view_check_option
+ query_expression
+ view_check_option
{
- LEX *lex= Lex;
- size_t len= YYLIP->get_cpp_ptr() - lex->create_view->select.str;
- void *create_view_select= thd->memdup(lex->create_view->select.str, len);
- lex->create_view->select.length= len;
- lex->create_view->select.str= (char *) create_view_select;
- trim_whitespace(thd->charset(),
- &lex->create_view->select);
- lex->create_view->check= $4;
- lex->parsing_options.allows_variable= TRUE;
- lex->current_select->set_with_clause($2);
- if (Lex->check_cte_dependencies_and_resolve_references())
+ if (Lex->parsed_create_view($2, $3))
MYSQL_YYABORT;
-
}
;
-/*
- SQL Standard <query expression body> for VIEWs.
- Does not include INTO and PROCEDURE clauses.
-*/
-query_expression_body_view:
- SELECT_SYM select_options_and_item_list select_init3_view
- | table_value_constructor
- | table_value_constructor union_order_or_limit
- | table_value_constructor union_list_view
- | '(' select_paren_view ')'
- | '(' select_paren_view ')' union_order_or_limit
- | '(' select_paren_view ')' union_list_view
- ;
-
view_check_option:
/* empty */ { $$= VIEW_CHECK_NONE; }
| WITH CHECK_SYM OPTION { $$= VIEW_CHECK_CASCADED; }
@@ -18082,7 +18286,8 @@ trigger_tail:
(*static_cast<st_trg_execution_order*>(&lex->trg_chistics))= ($17);
lex->trg_chistics.ordering_clause_end= lip->get_cpp_ptr();
- if (unlikely(!lex->make_sp_head(thd, $4, &sp_handler_trigger)))
+ if (unlikely(!lex->make_sp_head(thd, $4, &sp_handler_trigger,
+ DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
@@ -18090,15 +18295,9 @@ trigger_tail:
sp_proc_stmt /* $19 */ force_lookahead /* $20 */
{ /* $21 */
LEX *lex= Lex;
- sp_head *sp= lex->sphead;
- if (unlikely(sp->check_unresolved_goto()))
- MYSQL_YYABORT;
lex->sql_command= SQLCOM_CREATE_TRIGGER;
- sp->set_stmt_end(thd);
- sp->restore_thd_mem_root(thd);
-
- if (unlikely(sp->is_not_allowed_in_function("trigger")))
+ if (lex->sp_body_finalize_trigger(thd))
MYSQL_YYABORT;
/*
@@ -18106,11 +18305,10 @@ trigger_tail:
sp_proc_stmt alternatives are not saving/restoring LEX, so
lex->query_tables can be wiped out.
*/
- if (unlikely(!lex->select_lex.
- add_table_to_list(thd, $10, (LEX_CSTRING*) 0,
- TL_OPTION_UPDATING,
- TL_READ_NO_INSERT,
- MDL_SHARED_NO_WRITE)))
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, $10, (LEX_CSTRING*) 0,
+ TL_OPTION_UPDATING, TL_READ_NO_INSERT,
+ MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
}
;
@@ -18121,25 +18319,7 @@ trigger_tail:
**************************************************************************/
-udf_tail:
- opt_if_not_exists ident
- RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
- {
- LEX *lex= thd->lex;
- if (unlikely(lex->add_create_options_with_check($1)))
- MYSQL_YYABORT;
- if (unlikely(is_native_function(thd, & $2)))
- my_yyabort_error((ER_NATIVE_FCT_NAME_COLLISION, MYF(0), $2.str));
- lex->sql_command= SQLCOM_CREATE_FUNCTION;
- lex->udf.name= $2;
- lex->udf.returns= (Item_result) $4;
- lex->udf.dl= $6.str;
- }
- ;
-
-
sf_return_type:
- RETURN_ORACLE_SYM
{
LEX *lex= Lex;
lex->init_last_field(&lex->sphead->m_return_field_def,
@@ -18154,79 +18334,44 @@ sf_return_type:
}
;
-sf_tail:
- opt_if_not_exists
- sp_name
- {
- Lex->sql_command= SQLCOM_CREATE_SPFUNCTION;
- if (unlikely(!Lex->make_sp_head_no_recursive(thd, $1, $2,
- &sp_handler_function)))
- MYSQL_YYABORT;
- }
- opt_sp_parenthesized_fdparam_list
- sf_return_type
+sf_c_chistics_and_body_standalone:
sp_c_chistics
{
LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
-
- lex->sphead->set_chistics(lex->sp_chistics);
- lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
+ lex->sphead->set_c_chistics(lex->sp_chistics);
+ lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
sp_tail_is
sp_body force_lookahead
{
if (unlikely(Lex->sp_body_finalize_function(thd)))
MYSQL_YYABORT;
- if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
- {
- my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
- }
- Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
}
;
-sp_tail:
- opt_if_not_exists sp_name
+sp_tail_standalone:
+ sp_name
{
- Lex->sql_command= SQLCOM_CREATE_PROCEDURE;
- if (unlikely(!Lex->make_sp_head_no_recursive(thd, $1, $2,
- &sp_handler_procedure)))
+ if (unlikely(!Lex->make_sp_head_no_recursive(thd, $1,
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
}
opt_sp_parenthesized_pdparam_list
sp_c_chistics
{
- Lex->sphead->set_chistics(Lex->sp_chistics);
+ Lex->sphead->set_c_chistics(Lex->sp_chistics);
Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
sp_tail_is
- sp_body force_lookahead
+ sp_body
+ opt_sp_name
{
- if (unlikely(Lex->sp_body_finalize_procedure(thd)))
+ if (unlikely(Lex->sp_body_finalize_procedure_standalone(thd, $8)))
MYSQL_YYABORT;
}
;
-sf_tail_standalone:
- sf_tail opt_sp_name
- {
- if (unlikely($2 && !$2->eq(Lex->sphead)))
- my_yyabort_error((ER_END_IDENTIFIER_DOES_NOT_MATCH, MYF(0),
- ErrConvDQName($2).ptr(),
- ErrConvDQName(Lex->sphead).ptr()));
- }
- ;
-
-sp_tail_standalone:
- sp_tail opt_sp_name
- {
- if (unlikely($2 && !$2->eq(Lex->sphead)))
- my_yyabort_error((ER_END_IDENTIFIER_DOES_NOT_MATCH, MYF(0),
- ErrConvDQName($2).ptr(),
- ErrConvDQName(Lex->sphead).ptr()));
- }
- ;
opt_package_routine_end_name:
/* Empty */ { $$= null_clex_str; }
@@ -18340,35 +18485,27 @@ opt_migrate:
;
install:
- INSTALL_SYM PLUGIN_SYM ident SONAME_SYM TEXT_STRING_sys
+ INSTALL_SYM PLUGIN_SYM opt_if_not_exists ident SONAME_SYM TEXT_STRING_sys
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_INSTALL_PLUGIN;
- lex->comment= $3;
- lex->ident= $5;
+ if (Lex->stmt_install_plugin($3, $4, $6))
+ MYSQL_YYABORT;
}
| INSTALL_SYM SONAME_SYM TEXT_STRING_sys
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_INSTALL_PLUGIN;
- lex->comment= null_clex_str;
- lex->ident= $3;
+ Lex->stmt_install_plugin($3);
}
;
uninstall:
- UNINSTALL_SYM PLUGIN_SYM ident
+ UNINSTALL_SYM PLUGIN_SYM opt_if_exists ident
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
- lex->comment= $3;
+ if (Lex->stmt_uninstall_plugin_by_name($3, $4))
+ MYSQL_YYABORT;
}
- | UNINSTALL_SYM SONAME_SYM TEXT_STRING_sys
+ | UNINSTALL_SYM SONAME_SYM opt_if_exists TEXT_STRING_sys
{
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
- lex->comment= null_clex_str;
- lex->ident= $3;
+ if (Lex->stmt_uninstall_plugin_by_soname($3, $4))
+ MYSQL_YYABORT;
}
;
diff --git a/sql/strfunc.cc b/sql/strfunc.cc
index a0a465bdf94..8f3ef43ba22 100644
--- a/sql/strfunc.cc
+++ b/sql/strfunc.cc
@@ -79,14 +79,17 @@ ulonglong find_set(TYPELIB *lib, const char *str, size_t length, CHARSET_INFO *c
var_len= (uint) (pos - start);
uint find= cs ? find_type2(lib, start, var_len, cs) :
find_type(lib, start, var_len, (bool) 0);
- if (unlikely(!find && *err_len == 0))
+ if (unlikely(!find))
{
- // report the first error with length > 0
- *err_pos= (char*) start;
- *err_len= var_len;
- *set_warning= 1;
+ if (*err_len == 0)
+ {
+ // report the first error with length > 0
+ *err_pos= (char*) start;
+ *err_len= var_len;
+ *set_warning= 1;
+ }
}
- else
+ else if (find <= sizeof(longlong) * 8)
found|= 1ULL << (find - 1);
if (pos >= end)
break;
@@ -400,4 +403,3 @@ const char *flagset_to_string(THD *thd, LEX_CSTRING *result, ulonglong set,
return result->str;
}
-
diff --git a/sql/structs.h b/sql/structs.h
index c6f9fef2277..bd5013d221c 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -1,8 +1,8 @@
#ifndef STRUCTS_INCLUDED
#define STRUCTS_INCLUDED
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
- Copyright (c) 2017, MariaDB Corporation.
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, 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
@@ -27,6 +27,7 @@
#include "thr_lock.h" /* thr_lock_type */
#include "my_base.h" /* ha_rows, ha_key_alg */
#include <mysql_com.h> /* USERNAME_LENGTH */
+#include "sql_bitmap.h"
struct TABLE;
class Type_handler;
@@ -110,6 +111,13 @@ typedef struct st_key {
ext_key_part_map.is_set(1) == false
*/
key_part_map ext_key_part_map;
+ /*
+ Bitmap of indexes having common parts with this index
+ (only key parts from key definitions are taken into account)
+ */
+ key_map overlapped;
+ /* Set of keys constraint correlated with this key */
+ key_map constraint_correlated;
LEX_CSTRING name;
uint block_size;
enum ha_key_alg algorithm;
@@ -200,6 +208,17 @@ extern const char *show_comp_option_name[];
typedef int *(*update_var)(THD *, struct st_mysql_show_var *);
+struct USER_AUTH : public Sql_alloc
+{
+ LEX_CSTRING plugin, auth_str, pwtext;
+ USER_AUTH *next;
+ USER_AUTH() : next(NULL)
+ {
+ plugin.str= auth_str.str= "";
+ pwtext.str= NULL;
+ plugin.length= auth_str.length= pwtext.length= 0;
+ }
+};
struct AUTHID
{
@@ -224,13 +243,10 @@ struct AUTHID
struct LEX_USER: public AUTHID
{
- LEX_CSTRING plugin, auth;
- LEX_CSTRING pwtext, pwhash;
- void reset_auth()
+ USER_AUTH *auth;
+ bool has_auth()
{
- pwtext.length= pwhash.length= plugin.length= auth.length= 0;
- pwtext.str= pwhash.str= 0;
- plugin.str= auth.str= "";
+ return auth && (auth->plugin.length || auth->auth_str.length || auth->pwtext.length);
}
};
@@ -774,6 +790,43 @@ public:
};
+class st_select_lex;
+
+class Lex_select_lock
+{
+public:
+ struct
+ {
+ uint defined_lock:1;
+ uint update_lock:1;
+ uint defined_timeout:1;
+ };
+ ulong timeout;
+
+
+ void empty()
+ {
+ defined_lock= update_lock= defined_timeout= FALSE;
+ timeout= 0;
+ }
+ void set_to(st_select_lex *sel);
+};
+
+class Lex_select_limit
+{
+public:
+ bool explicit_limit;
+ Item *select_limit, *offset_limit;
+
+ void empty()
+ {
+ explicit_limit= FALSE;
+ select_limit= offset_limit= NULL;
+ }
+};
+
+struct st_order;
+
class Load_data_param
{
protected:
@@ -810,4 +863,26 @@ public:
};
+class Timeval: public timeval
+{
+protected:
+ Timeval() { }
+public:
+ Timeval(my_time_t sec, ulong usec)
+ {
+ tv_sec= sec;
+ /*
+ Since tv_usec is not always of type ulong, cast usec parameter
+ explicitly to uint to avoid compiler warnings about losing
+ integer precision.
+ */
+ DBUG_ASSERT(usec < 1000000);
+ tv_usec= (uint)usec;
+ }
+ explicit Timeval(const timeval &tv)
+ :timeval(tv)
+ { }
+};
+
+
#endif /* STRUCTS_INCLUDED */
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index f04b295a953..b29264536f9 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2002, 2015, Oracle and/or its affiliates.
- Copyright (c) 2012, 2018, MariaDB Corporation.
+ Copyright (c) 2012, 2020, 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
@@ -53,6 +53,7 @@
#include <myisam.h>
#include "debug_sync.h" // DEBUG_SYNC
#include "sql_show.h"
+#include "opt_trace_context.h"
#include "log_event.h"
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
@@ -65,6 +66,9 @@
#include "semisync_master.h"
#include "semisync_slave.h"
#include <ssl_compat.h>
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif
/*
The rule for this file: everything should be 'static'. When a sys_var
@@ -368,6 +372,15 @@ static bool update_auto_increment_increment (sys_var *self, THD *thd, enum_var_t
#endif /* WITH_WSREP */
+static Sys_var_double Sys_analyze_sample_percentage(
+ "analyze_sample_percentage",
+ "Percentage of rows from the table ANALYZE TABLE will sample "
+ "to collect table statistics. Set to 0 to let MariaDB decide "
+ "what percentage of rows to sample.",
+ SESSION_VAR(sample_percentage),
+ CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 100),
+ DEFAULT(100));
+
static Sys_var_ulong Sys_auto_increment_increment(
"auto_increment_increment",
"Auto-increment columns are incremented by this",
@@ -520,7 +533,7 @@ bool check_has_super(sys_var *self, THD *thd, set_var *var)
static Sys_var_bit Sys_core_file("core_file", "write a core-file on crashes",
READ_ONLY GLOBAL_VAR(test_flags), NO_CMD_LINE,
- TEST_CORE_ON_SIGNAL, DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ TEST_CORE_ON_SIGNAL, DEFAULT(IF_WIN(TRUE,FALSE)), NO_MUTEX_GUARD, NOT_IN_BINLOG,
0,0,0);
static bool binlog_format_check(sys_var *self, THD *thd, set_var *var)
@@ -645,7 +658,7 @@ static Sys_var_mybool Sys_explicit_defaults_for_timestamp(
"as NULL with DEFAULT NULL attribute, Without this option, "
"TIMESTAMP columns are NOT NULL and have implicit DEFAULT clauses.",
READ_ONLY GLOBAL_VAR(opt_explicit_defaults_for_timestamp),
- CMD_LINE(OPT_ARG), DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
+ CMD_LINE(OPT_ARG), DEFAULT(FALSE));
static Sys_var_ulonglong Sys_bulk_insert_buff_size(
@@ -1556,6 +1569,24 @@ static Sys_var_ulong Sys_max_connections(
DEFAULT(MAX_CONNECTIONS_DEFAULT), BLOCK_SIZE(1), NO_MUTEX_GUARD,
NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_max_connections));
+static Sys_var_uint Sys_default_password_lifetime(
+ "default_password_lifetime",
+ "This defines the global password expiration policy. 0 means "
+ "automatic password expiration is disabled. If the value is a "
+ "positive integer N, the passwords must be changed every N days. This "
+ "behavior can be overridden using the password expiration options in "
+ "ALTER USER.",
+ GLOBAL_VAR(default_password_lifetime), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(0, UINT_MAX), DEFAULT(0), BLOCK_SIZE(1));
+
+static Sys_var_mybool Sys_disconnect_on_expired_password(
+ "disconnect_on_expired_password",
+ "This variable controls how the server handles clients that are not "
+ "aware of the sandbox mode. If enabled, the server disconnects the "
+ "client, otherwise the server puts the client in a sandbox mode.",
+ GLOBAL_VAR(disconnect_on_expired_password), CMD_LINE(OPT_ARG),
+ DEFAULT(FALSE));
+
static Sys_var_ulong Sys_max_connect_errors(
"max_connect_errors",
"If there is more than this number of interrupted connections from "
@@ -1564,6 +1595,14 @@ static Sys_var_ulong Sys_max_connect_errors(
VALID_RANGE(1, UINT_MAX), DEFAULT(MAX_CONNECT_ERRORS),
BLOCK_SIZE(1));
+static Sys_var_uint Sys_max_password_errors(
+ "max_password_errors",
+ "If there is more than this number of failed connect attempts "
+ "due to invalid password, user will be blocked from further connections until FLUSH_PRIVILEGES.",
+ GLOBAL_VAR(max_password_errors), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(1, UINT_MAX), DEFAULT(UINT_MAX),
+ BLOCK_SIZE(1));
+
static Sys_var_uint Sys_max_digest_length(
"max_digest_length", "Maximum length considered for digest text.",
READ_ONLY GLOBAL_VAR(max_digest_length),
@@ -1995,6 +2034,19 @@ Sys_var_last_gtid::session_value_ptr(THD *thd, const LEX_CSTRING *base) const
}
+static Sys_var_uint Sys_gtid_cleanup_batch_size(
+ "gtid_cleanup_batch_size",
+ "Normally does not need tuning. How many old rows must accumulate in "
+ "the mysql.gtid_slave_pos table before a background job will be run to "
+ "delete them. Can be increased to reduce number of commits if "
+ "using many different engines with --gtid_pos_auto_engines, or to "
+ "reduce CPU overhead if using a huge number of different "
+ "gtid_domain_ids. Can be decreased to reduce number of old rows in the "
+ "table.",
+ GLOBAL_VAR(opt_gtid_cleanup_batch_size), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(0,2147483647), DEFAULT(64), BLOCK_SIZE(1));
+
+
static bool
check_slave_parallel_threads(sys_var *self, THD *thd, set_var *var)
{
@@ -2189,7 +2241,7 @@ static Sys_var_bit Sys_skip_parallel_replication(
"retry for transactions that are likely to cause a conflict if "
"replicated in parallel.",
SESSION_ONLY(option_bits), NO_CMD_LINE, OPTION_RPL_SKIP_PARALLEL,
- DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
+ DEFAULT(FALSE));
static bool
@@ -2285,7 +2337,9 @@ static Sys_var_ulong Sys_max_long_data_size(
READ_ONLY GLOBAL_VAR(max_long_data_size),
CMD_LINE(REQUIRED_ARG, OPT_MAX_LONG_DATA_SIZE),
VALID_RANGE(1024, UINT_MAX32), DEFAULT(1024*1024),
- BLOCK_SIZE(1));
+ BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(0), ON_UPDATE(0),
+ DEPRECATED("'@@max_allowed_packet'"));
static PolyLock_mutex PLock_prepared_stmt_count(&LOCK_prepared_stmt_count);
static Sys_var_uint Sys_max_prepared_stmt_count(
@@ -2510,7 +2564,7 @@ static Sys_var_ulong Sys_optimizer_use_condition_selectivity(
"5 - additionally use selectivity of certain non-range predicates "
"calculated on record samples",
SESSION_VAR(optimizer_use_condition_selectivity), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(1, 5), DEFAULT(1), BLOCK_SIZE(1));
+ VALID_RANGE(1, 5), DEFAULT(4), BLOCK_SIZE(1));
static Sys_var_ulong Sys_optimizer_search_depth(
"optimizer_search_depth",
@@ -2550,6 +2604,9 @@ export const char *optimizer_switch_names[]=
"orderby_uses_equalities",
"condition_pushdown_for_derived",
"split_materialized",
+ "condition_pushdown_for_subquery",
+ "rowid_filter",
+ "condition_pushdown_from_having",
"default",
NullS
};
@@ -2583,6 +2640,23 @@ static Sys_var_flagset Sys_optimizer_switch(
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_legal_optimizer_switch),
ON_UPDATE(fix_optimizer_switch));
+static Sys_var_flagset Sys_optimizer_trace(
+ "optimizer_trace",
+ "Controls tracing of the Optimizer:"
+ " optimizer_trace=option=val[,option=val...], where option is one of"
+ " {enabled}"
+ " and val is one of {on, off, default}",
+ SESSION_VAR(optimizer_trace), CMD_LINE(REQUIRED_ARG),
+ Opt_trace_context::flag_names, DEFAULT(Opt_trace_context::FLAG_DEFAULT));
+ // @see set_var::is_var_optimizer_trace()
+export sys_var *Sys_optimizer_trace_ptr = &Sys_optimizer_trace;
+
+static Sys_var_ulong Sys_optimizer_trace_max_mem_size(
+ "optimizer_trace_max_mem_size",
+ "Maximum allowed size of an optimizer trace",
+ SESSION_VAR(optimizer_trace_max_mem_size), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(0, ULONG_MAX), DEFAULT(1024 * 1024), BLOCK_SIZE(1));
+
static Sys_var_charptr Sys_pid_file(
"pid_file", "Pid file used by safe_mysqld",
READ_ONLY GLOBAL_VAR(pidfile_name_ptr), CMD_LINE(REQUIRED_ARG),
@@ -2636,13 +2710,15 @@ static Sys_var_ulong Sys_read_buff_size(
static bool check_read_only(sys_var *self, THD *thd, set_var *var)
{
/* Prevent self dead-lock */
- if (thd->locked_tables_mode || thd->in_active_multi_stmt_transaction())
+ if (thd->locked_tables_mode || thd->in_active_multi_stmt_transaction() ||
+ thd->current_backup_stage != BACKUP_FINISHED)
{
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
return true;
}
return false;
}
+
static bool fix_read_only(sys_var *self, THD *thd, enum_var_type type)
{
bool result= true;
@@ -2743,7 +2819,7 @@ static Sys_var_uint Sys_eq_range_index_dive_limit(
"ranges for the index is larger than or equal to this number. "
"If set to 0, index dives are always used.",
SESSION_VAR(eq_range_index_dive_limit), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(0, UINT_MAX32), DEFAULT(0),
+ VALID_RANGE(0, UINT_MAX32), DEFAULT(200),
BLOCK_SIZE(1));
static Sys_var_ulong Sys_range_alloc_block_size(
@@ -2785,17 +2861,6 @@ static Sys_var_ulong Sys_query_prealloc_size(
BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_thd_mem_root));
-#ifdef HAVE_SMEM
-static Sys_var_mybool Sys_shared_memory(
- "shared_memory", "Enable the shared memory",
- READ_ONLY GLOBAL_VAR(opt_enable_shared_memory), CMD_LINE(OPT_ARG),
- DEFAULT(FALSE));
-
-static Sys_var_charptr Sys_shared_memory_base_name(
- "shared_memory_base_name", "Base name of shared memory",
- READ_ONLY GLOBAL_VAR(shared_memory_base_name), CMD_LINE(REQUIRED_ARG),
- IN_FS_CHARSET, DEFAULT(0));
-#endif
// this has to be NO_CMD_LINE as the command-line option has a different name
static Sys_var_mybool Sys_skip_external_locking(
@@ -2943,7 +3008,7 @@ static Sys_var_ulong Sys_query_cache_limit(
"Don't cache results that are bigger than this",
GLOBAL_VAR(query_cache_limit), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, UINT_MAX), DEFAULT(1024*1024), BLOCK_SIZE(1),
- NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_query_cache_limit));
static bool fix_qcache_min_res_unit(sys_var *self, THD *thd, enum_var_type type)
@@ -3430,6 +3495,7 @@ static const char *sql_mode_names[]=
"ALLOW_INVALID_DATES", "ERROR_FOR_DIVISION_BY_ZERO", "TRADITIONAL",
"NO_AUTO_CREATE_USER", "HIGH_NOT_PRECEDENCE", "NO_ENGINE_SUBSTITUTION",
"PAD_CHAR_TO_FULL_LENGTH", "EMPTY_STRING_IS_NULL", "SIMULTANEOUS_ASSIGNMENT",
+ "TIME_ROUND_FRACTIONAL",
0
};
@@ -3527,6 +3593,29 @@ static Sys_var_charptr Sys_ssl_crlpath(
READ_ONLY GLOBAL_VAR(opt_ssl_crlpath), SSL_OPT(OPT_SSL_CRLPATH),
IN_FS_CHARSET, DEFAULT(0));
+static const char *tls_version_names[]=
+{
+ "TLSv1.0",
+ "TLSv1.1",
+ "TLSv1.2",
+ "TLSv1.3",
+ 0
+};
+
+export bool tls_version_string_representation(THD *thd, sql_mode_t sql_mode,
+ LEX_CSTRING *ls)
+{
+ set_to_string(thd, ls, tls_version, tls_version_names);
+ return ls->str == 0;
+}
+
+static Sys_var_set Sys_tls_version(
+ "tls_version",
+ "TLS protocol version for secure connections.",
+ READ_ONLY GLOBAL_VAR(tls_version), CMD_LINE(REQUIRED_ARG),
+ tls_version_names,
+ DEFAULT(VIO_TLSv1_1 | VIO_TLSv1_2 | VIO_TLSv1_3));
+
static Sys_var_mybool Sys_standard_compliant_cte(
"standard_compliant_cte",
"Allow only CTEs compliant to SQL standard",
@@ -3827,7 +3916,7 @@ static Sys_var_mybool Sys_timed_mutexes(
"timed_mutexes",
"Specify whether to time mutexes. Deprecated, has no effect.",
GLOBAL_VAR(timed_mutexes), CMD_LINE(OPT_ARG), DEFAULT(0),
- NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL), ON_UPDATE(NULL),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
DEPRECATED(""));
static Sys_var_charptr Sys_version(
@@ -4135,6 +4224,16 @@ static bool fix_sql_log_bin_after_update(sys_var *self, THD *thd,
return FALSE;
}
+static bool check_session_only_variable(sys_var *self, THD *,set_var *var)
+{
+ if (unlikely(var->type == OPT_GLOBAL))
+ {
+ my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), self->name.str, "SESSION");
+ return true;
+ }
+ return false;
+}
+
/**
This function checks if the sql_log_bin can be changed,
what is possible if:
@@ -4150,20 +4249,17 @@ static bool fix_sql_log_bin_after_update(sys_var *self, THD *thd,
static bool check_sql_log_bin(sys_var *self, THD *thd, set_var *var)
{
if (check_has_super(self, thd, var))
- return TRUE;
+ return true;
- if (unlikely(var->type == OPT_GLOBAL))
- {
- my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), self->name.str, "SESSION");
- return TRUE;
- }
+ if (check_session_only_variable(self, thd, var))
+ return true;
if (unlikely(error_if_in_trans_or_substatement(thd,
ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN,
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN)))
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
static Sys_var_mybool Sys_log_binlog(
@@ -4753,6 +4849,24 @@ static Sys_var_have Sys_have_symlink(
"--skip-symbolic-links option.",
READ_ONLY GLOBAL_VAR(have_symlink), NO_CMD_LINE);
+#if defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN)
+
+#ifdef __SANITIZE_ADDRESS__
+#define SANITIZER_MODE "ASAN"
+#else
+#define SANITIZER_MODE "UBSAN"
+#endif /* __SANITIZE_ADDRESS__ */
+
+static char *have_sanitizer;
+static Sys_var_charptr Sys_have_santitizer(
+ "have_sanitizer",
+ "If the server is compiled with sanitize (compiler option), this "
+ "variable is set to the sanitizer mode used. Possible values are "
+ "ASAN (Address sanitizer) or UBSAN (The Undefined Behavior Sanitizer).",
+ READ_ONLY GLOBAL_VAR(have_sanitizer), NO_CMD_LINE,
+ IN_FS_CHARSET, DEFAULT(SANITIZER_MODE));
+#endif /* defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN) */
+
static bool fix_log_state(sys_var *self, THD *thd, enum_var_type type);
static Sys_var_mybool Sys_general_log(
@@ -5191,8 +5305,10 @@ static Sys_var_ulonglong Sys_read_binlog_speed_limit(
static Sys_var_charptr Sys_slave_transaction_retry_errors(
"slave_transaction_retry_errors", "Tells the slave thread to retry "
"transaction for replication when a query event returns an error from "
- "the provided list. Deadlock and elapsed lock wait timeout errors are "
- "automatically added to this list",
+ "the provided list. Deadlock error, elapsed lock wait timeout, "
+ "net read error, net read timeout, net write error, net write timeout, "
+ "connect error and 2 types of lost connection error are automatically "
+ "added to this list",
READ_ONLY GLOBAL_VAR(opt_slave_transaction_retry_errors), CMD_LINE(REQUIRED_ARG),
IN_SYSTEM_CHARSET, DEFAULT(0));
@@ -5312,14 +5428,14 @@ static bool update_locale(sys_var *self, THD* thd, enum_var_type type)
static Sys_var_struct Sys_lc_messages(
"lc_messages", "Set the language used for the error messages",
SESSION_VAR(lc_messages), NO_CMD_LINE,
- my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages),
+ offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_locale), ON_UPDATE(update_locale));
static Sys_var_struct Sys_lc_time_names(
"lc_time_names", "Set the language used for the month "
"names and the days of the week",
SESSION_VAR(lc_time_names), NO_CMD_LINE,
- my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names),
+ offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names),
NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_locale));
static Sys_var_tz Sys_time_zone(
@@ -5363,13 +5479,12 @@ static Sys_var_charptr Sys_wsrep_cluster_name(
ON_CHECK(wsrep_cluster_name_check),
ON_UPDATE(wsrep_cluster_name_update));
-static PolyLock_mutex PLock_wsrep_slave_threads(&LOCK_wsrep_slave_threads);
static Sys_var_charptr Sys_wsrep_cluster_address (
"wsrep_cluster_address", "Address to initially connect to cluster",
PREALLOCATED GLOBAL_VAR(wsrep_cluster_address),
CMD_LINE(REQUIRED_ARG),
IN_SYSTEM_CHARSET, DEFAULT(""),
- &PLock_wsrep_slave_threads, NOT_IN_BINLOG,
+ NO_MUTEX_GUARD, NOT_IN_BINLOG,
ON_CHECK(wsrep_cluster_address_check),
ON_UPDATE(wsrep_cluster_address_update));
@@ -5400,8 +5515,8 @@ static Sys_var_ulong Sys_wsrep_slave_threads(
"wsrep_slave_threads", "Number of slave appliers to launch",
GLOBAL_VAR(wsrep_slave_threads), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1, 512), DEFAULT(1), BLOCK_SIZE(1),
- &PLock_wsrep_slave_threads, NOT_IN_BINLOG,
- ON_CHECK(NULL),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(0),
ON_UPDATE(wsrep_slave_threads_update));
static Sys_var_charptr Sys_wsrep_dbug_option(
@@ -5409,9 +5524,14 @@ static Sys_var_charptr Sys_wsrep_dbug_option(
GLOBAL_VAR(wsrep_dbug_option),CMD_LINE(REQUIRED_ARG),
IN_SYSTEM_CHARSET, DEFAULT(""));
-static Sys_var_mybool Sys_wsrep_debug(
- "wsrep_debug", "To enable debug level logging",
- GLOBAL_VAR(wsrep_debug), CMD_LINE(OPT_ARG), DEFAULT(FALSE));
+static const char *wsrep_debug_names[]=
+{ "NONE", "SERVER", "TRANSACTION", "STREAMING", "CLIENT", NullS };
+static Sys_var_enum Sys_wsrep_debug(
+ "wsrep_debug", "WSREP debug level logging",
+ GLOBAL_VAR(wsrep_debug), CMD_LINE(REQUIRED_ARG),
+ wsrep_debug_names, DEFAULT(0),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(0), ON_UPDATE(wsrep_debug_update));
static Sys_var_mybool Sys_wsrep_convert_LOCK_to_trx(
"wsrep_convert_LOCK_to_trx", "To convert locking sessions "
@@ -5639,9 +5759,10 @@ static Sys_var_ulong Sys_wsrep_mysql_replication_bundle(
static Sys_var_mybool Sys_wsrep_load_data_splitting(
"wsrep_load_data_splitting", "To commit LOAD DATA "
- "transaction after every 10K rows inserted",
+ "transaction after every 10K rows inserted (deprecated)",
GLOBAL_VAR(wsrep_load_data_splitting),
- CMD_LINE(OPT_ARG), DEFAULT(TRUE));
+ CMD_LINE(OPT_ARG), DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(0), ON_UPDATE(0), DEPRECATED(""));
static Sys_var_mybool Sys_wsrep_slave_FK_checks(
"wsrep_slave_FK_checks", "Should slave thread do "
@@ -5659,19 +5780,53 @@ static Sys_var_mybool Sys_wsrep_restart_slave(
"wsrep_restart_slave", "Should MariaDB slave be restarted automatically, when node joins back to cluster",
GLOBAL_VAR(wsrep_restart_slave), CMD_LINE(OPT_ARG), DEFAULT(FALSE));
+static Sys_var_ulonglong Sys_wsrep_trx_fragment_size(
+ "wsrep_trx_fragment_size",
+ "Size of transaction fragments for streaming replication (measured in "
+ "units of 'wsrep_trx_fragment_unit')",
+ SESSION_VAR(wsrep_trx_fragment_size), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(0, WSREP_MAX_WS_SIZE), DEFAULT(0), BLOCK_SIZE(1),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(wsrep_trx_fragment_size_check),
+ ON_UPDATE(wsrep_trx_fragment_size_update));
+
+extern const char *wsrep_fragment_units[];
+
+static Sys_var_enum Sys_wsrep_trx_fragment_unit(
+ "wsrep_trx_fragment_unit",
+ "Unit for streaming replication transaction fragments' size: bytes, "
+ "rows, statements",
+ SESSION_VAR(wsrep_trx_fragment_unit), CMD_LINE(REQUIRED_ARG),
+ wsrep_fragment_units,
+ DEFAULT(WSREP_FRAG_BYTES),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(0),
+ ON_UPDATE(wsrep_trx_fragment_unit_update));
+
+extern const char *wsrep_SR_store_types[];
+static Sys_var_enum Sys_wsrep_SR_store(
+ "wsrep_SR_store", "Storage for streaming replication fragments",
+ READ_ONLY GLOBAL_VAR(wsrep_SR_store_type), CMD_LINE(REQUIRED_ARG),
+ wsrep_SR_store_types, DEFAULT(WSREP_SR_STORE_TABLE));
+
static Sys_var_mybool Sys_wsrep_dirty_reads(
"wsrep_dirty_reads",
"Allow reads even when the node is not in the primary component.",
SESSION_VAR(wsrep_dirty_reads), CMD_LINE(OPT_ARG),
- DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
+ DEFAULT(FALSE));
+
+static Sys_var_uint Sys_wsrep_ignore_apply_errors (
+ "wsrep_ignore_apply_errors", "Ignore replication errors",
+ GLOBAL_VAR(wsrep_ignore_apply_errors), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(WSREP_IGNORE_ERRORS_NONE, WSREP_IGNORE_ERRORS_MAX),
+ DEFAULT(7), BLOCK_SIZE(1));
static Sys_var_uint Sys_wsrep_gtid_domain_id(
"wsrep_gtid_domain_id", "When wsrep_gtid_mode is set, this value is "
"used as gtid_domain_id for galera transactions and also copied to the "
"joiner nodes during state transfer. It is ignored, otherwise.",
GLOBAL_VAR(wsrep_gtid_domain_id), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(0, UINT_MAX32), DEFAULT(0), BLOCK_SIZE(1), NO_MUTEX_GUARD,
- NOT_IN_BINLOG);
+ VALID_RANGE(0, UINT_MAX32), DEFAULT(0), BLOCK_SIZE(1));
static Sys_var_mybool Sys_wsrep_gtid_mode(
"wsrep_gtid_mode", "Automatically update the (joiner) node's "
@@ -5702,7 +5857,7 @@ static Sys_var_ulong Sys_host_cache_size(
CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 65536),
DEFAULT(HOST_CACHE_SIZE),
BLOCK_SIZE(1),
- NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_host_cache_size));
vio_keepalive_opts opt_vio_keepalive;
@@ -5712,30 +5867,45 @@ static Sys_var_int Sys_keepalive_time(
"Timeout, in seconds, with no activity until the first TCP keep-alive packet is sent."
"If set to 0, system dependent default is used.",
AUTO_SET GLOBAL_VAR(opt_vio_keepalive.idle),
- CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000),
- DEFAULT(0),
- BLOCK_SIZE(1),
- NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL));
+ CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000), DEFAULT(0),
+ BLOCK_SIZE(1));
static Sys_var_int Sys_keepalive_interval(
"tcp_keepalive_interval",
"The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received."
"If set to 0, system dependent default is used.",
AUTO_SET GLOBAL_VAR(opt_vio_keepalive.interval),
- CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000),
- DEFAULT(0),
- BLOCK_SIZE(1),
- NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL));
+ CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000), DEFAULT(0),
+ BLOCK_SIZE(1));
static Sys_var_int Sys_keepalive_probes(
"tcp_keepalive_probes",
"The number of unacknowledged probes to send before considering the connection dead and notifying the application layer."
"If set to 0, system dependent default is used.",
AUTO_SET GLOBAL_VAR(opt_vio_keepalive.probes),
- CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000),
- DEFAULT(0),
- BLOCK_SIZE(1),
- NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL));
+ CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000), DEFAULT(0),
+ BLOCK_SIZE(1));
+
+
+static bool update_tcp_nodelay(sys_var *self, THD *thd,
+ enum_var_type type)
+{
+ DBUG_ASSERT(thd);
+
+ Vio *vio = thd->net.vio;
+ if (vio)
+ return (MY_TEST(vio_nodelay(vio, thd->variables.tcp_nodelay)));
+
+ return false;
+}
+
+static Sys_var_mybool Sys_tcp_nodelay(
+ "tcp_nodelay",
+ "Set option TCP_NODELAY (disable Nagle's algorithm) on socket",
+ SESSION_VAR(tcp_nodelay), CMD_LINE(OPT_ARG),
+ DEFAULT(TRUE),NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(check_session_only_variable),
+ ON_UPDATE(update_tcp_nodelay));
static Sys_var_charptr Sys_ignore_db_dirs(
"ignore_db_dirs",
@@ -5968,19 +6138,20 @@ static Sys_var_ulong Sys_progress_report_time(
VALID_RANGE(0, UINT_MAX), DEFAULT(5), BLOCK_SIZE(1));
const char *use_stat_tables_modes[] =
- {"NEVER", "COMPLEMENTARY", "PREFERABLY", 0};
+ {"NEVER", "COMPLEMENTARY", "PREFERABLY",
+ "COMPLEMENTARY_FOR_QUERIES", "PREFERABLY_FOR_QUERIES", 0};
static Sys_var_enum Sys_optimizer_use_stat_tables(
"use_stat_tables",
"Specifies how to use system statistics tables",
SESSION_VAR(use_stat_tables), CMD_LINE(REQUIRED_ARG),
- use_stat_tables_modes, DEFAULT(0));
+ use_stat_tables_modes, DEFAULT(4));
static Sys_var_ulong Sys_histogram_size(
"histogram_size",
"Number of bytes used for a histogram. "
"If set to 0, no histograms are created by ANALYZE.",
SESSION_VAR(histogram_size), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(0, 255), DEFAULT(0), BLOCK_SIZE(1));
+ VALID_RANGE(0, 255), DEFAULT(254), BLOCK_SIZE(1));
extern const char *histogram_types[];
static Sys_var_enum Sys_histogram_type(
@@ -5990,7 +6161,7 @@ static Sys_var_enum Sys_histogram_type(
"SINGLE_PREC_HB - single precision height-balanced, "
"DOUBLE_PREC_HB - double precision height-balanced.",
SESSION_VAR(histogram_type), CMD_LINE(REQUIRED_ARG),
- histogram_types, DEFAULT(0));
+ histogram_types, DEFAULT(1));
static Sys_var_mybool Sys_no_thread_alarm(
"debug_no_thread_alarm",
@@ -6125,14 +6296,14 @@ static Sys_var_mybool Sys_mysql56_temporal_format(
"mysql56_temporal_format",
"Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME, DATETIME, TIMESTAMP columns.",
GLOBAL_VAR(opt_mysql56_temporal_format),
- CMD_LINE(OPT_ARG), DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
+ CMD_LINE(OPT_ARG), DEFAULT(TRUE));
static Sys_var_mybool Sys_strict_password_validation(
"strict_password_validation",
"When password validation plugins are enabled, reject passwords "
"that cannot be validated (passwords specified as a hash)",
GLOBAL_VAR(strict_password_validation),
- CMD_LINE(OPT_ARG), DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
+ CMD_LINE(OPT_ARG), DEFAULT(TRUE));
#ifdef HAVE_MMAP
static Sys_var_ulong Sys_log_tc_size(
@@ -6159,8 +6330,7 @@ static Sys_var_sesvartrack Sys_track_session_sys_vars(
"Track changes in registered system variables. ",
CMD_LINE(REQUIRED_ARG), IN_SYSTEM_CHARSET,
DEFAULT("autocommit,character_set_client,character_set_connection,"
- "character_set_results,time_zone"),
- NO_MUTEX_GUARD);
+ "character_set_results,time_zone"));
static bool update_session_track_schema(sys_var *self, THD *thd,
enum_var_type type)
@@ -6239,3 +6409,10 @@ static Sys_var_enum Sys_secure_timestamp(
"historical behavior, anyone can modify session timestamp",
READ_ONLY GLOBAL_VAR(opt_secure_timestamp), CMD_LINE(REQUIRED_ARG),
secure_timestamp_levels, DEFAULT(SECTIME_NO));
+
+static Sys_var_ulonglong Sys_max_rowid_filter_size(
+ "max_rowid_filter_size",
+ "The maximum size of the container of a rowid filter",
+ SESSION_VAR(max_rowid_filter_size), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(1024, (ulonglong)~(intptr)0), DEFAULT(128*1024),
+ BLOCK_SIZE(1));
diff --git a/sql/sys_vars.inl b/sql/sys_vars.inl
index 5757186e6f2..84d1cd6b331 100644
--- a/sql/sys_vars.inl
+++ b/sql/sys_vars.inl
@@ -599,7 +599,7 @@ public:
const char *comment,
CMD_LINE getopt,
enum charset_enum is_os_charset_arg,
- const char *def_val, PolyLock *lock) :
+ const char *def_val, PolyLock *lock= 0) :
Sys_var_charptr_base(name_arg, comment,
SESSION_VAR(session_track_system_variables),
getopt, is_os_charset_arg, def_val, lock,
@@ -2654,8 +2654,10 @@ public:
return false;
MYSQL_TIME ltime;
- bool res= var->value->get_date(&ltime,
- TIME_NO_ZERO_IN_DATE | TIME_NO_ZERO_DATE);
+ Datetime::Options opt(TIME_CONV_NONE |
+ TIME_NO_ZERO_IN_DATE |
+ TIME_NO_ZERO_DATE, thd);
+ bool res= var->value->get_date(thd, &ltime, opt);
if (!res)
{
uint error;
diff --git a/sql/table.cc b/sql/table.cc
index 506195127b2..37a23d5b93e 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -44,11 +44,25 @@
#include "sql_cte.h"
#include "ha_sequence.h"
#include "sql_show.h"
+#include "opt_trace.h"
/* For MySQL 5.7 virtual fields */
#define MYSQL57_GENERATED_FIELD 128
#define MYSQL57_GCOL_HEADER_SIZE 4
+struct extra2_fields
+{
+ LEX_CUSTRING version;
+ LEX_CUSTRING options;
+ Lex_ident engine;
+ LEX_CUSTRING gis;
+ LEX_CUSTRING field_flags;
+ LEX_CUSTRING system_period;
+ LEX_CUSTRING application_period;
+ void reset()
+ { bzero((void*)this, sizeof(*this)); }
+};
+
static Virtual_column_info * unpack_vcol_info_from_frm(THD *,
TABLE *, String *, Virtual_column_info **, bool *);
@@ -68,8 +82,6 @@ LEX_CSTRING GENERAL_LOG_NAME= {STRING_WITH_LEN("general_log")};
LEX_CSTRING SLOW_LOG_NAME= {STRING_WITH_LEN("slow_log")};
LEX_CSTRING TRANSACTION_REG_NAME= {STRING_WITH_LEN("transaction_registry")};
-LEX_CSTRING MYSQL_USER_NAME= {STRING_WITH_LEN("user")};
-LEX_CSTRING MYSQL_DB_NAME= {STRING_WITH_LEN("db")};
LEX_CSTRING MYSQL_PROC_NAME= {STRING_WITH_LEN("proc")};
/*
@@ -78,7 +90,7 @@ LEX_CSTRING MYSQL_PROC_NAME= {STRING_WITH_LEN("proc")};
*/
static LEX_CSTRING parse_vcol_keyword= { STRING_WITH_LEN("PARSE_VCOL_EXPR ") };
-static int64 last_table_id;
+static std::atomic<ulong> last_table_id;
/* Functions defined in this file */
@@ -251,6 +263,13 @@ TABLE_CATEGORY get_table_category(const LEX_CSTRING *db,
DBUG_ASSERT(db != NULL);
DBUG_ASSERT(name != NULL);
+#ifdef WITH_WSREP
+ if (my_strcasecmp(system_charset_info, db->str, "mysql") == 0 &&
+ my_strcasecmp(system_charset_info, name->str, "wsrep_streaming_log") == 0)
+ {
+ return TABLE_CATEGORY_INFORMATION;
+ }
+#endif /* WITH_WSREP */
if (is_infoschema_db(db))
return TABLE_CATEGORY_INFORMATION;
@@ -349,8 +368,8 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
*/
do
{
- share->table_map_id=(ulong) my_atomic_add64_explicit(&last_table_id, 1,
- MY_MEMORY_ORDER_RELAXED);
+ share->table_map_id=
+ last_table_id.fetch_add(1, std::memory_order_relaxed);
} while (unlikely(share->table_map_id == ~0UL ||
share->table_map_id == 0));
}
@@ -699,7 +718,7 @@ err_not_open:
static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end,
uint keys, KEY *keyinfo,
- uint new_frm_ver, uint &ext_key_parts,
+ uint new_frm_ver, uint *ext_key_parts,
TABLE_SHARE *share, uint len,
KEY *first_keyinfo,
LEX_STRING *keynames)
@@ -758,8 +777,8 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end,
if (i == 0)
{
- ext_key_parts+= (share->use_ext_keys ? first_keyinfo->user_defined_key_parts*(keys-1) : 0);
- n_length=keys * sizeof(KEY) + ext_key_parts * sizeof(KEY_PART_INFO);
+ (*ext_key_parts)+= (share->use_ext_keys ? first_keyinfo->user_defined_key_parts*(keys-1) : 0);
+ n_length=keys * sizeof(KEY) + *ext_key_parts * sizeof(KEY_PART_INFO);
if (!(keyinfo= (KEY*) alloc_root(&share->mem_root,
n_length + len)))
return 1;
@@ -768,7 +787,7 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end,
key_part= reinterpret_cast<KEY_PART_INFO*> (keyinfo + keys);
if (!(rec_per_key= (ulong*) alloc_root(&share->mem_root,
- sizeof(ulong) * ext_key_parts)))
+ sizeof(ulong) * *ext_key_parts)))
return 1;
first_key_part= key_part;
first_key_parts= first_keyinfo->user_defined_key_parts;
@@ -786,7 +805,8 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end,
{
if (strpos + (new_frm_ver >= 1 ? 9 : 7) >= frm_image_end)
return 1;
- *rec_per_key++=0;
+ if (!(keyinfo->algorithm == HA_KEY_ALG_LONG_HASH))
+ *rec_per_key++=0;
key_part->fieldnr= (uint16) (uint2korr(strpos) & FIELD_NR_MASK);
key_part->offset= (uint) uint2korr(strpos+2)-1;
key_part->key_type= (uint) uint2korr(strpos+5);
@@ -810,6 +830,12 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end,
}
key_part->store_length=key_part->length;
}
+ if (keyinfo->algorithm == HA_KEY_ALG_LONG_HASH)
+ {
+ keyinfo->key_length= HA_HASH_KEY_LENGTH_WITHOUT_NULL;
+ key_part++; // reserved for the hash value
+ *rec_per_key++=0;
+ }
/*
Add primary key to end of extended keys for non unique keys for
@@ -843,7 +869,9 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end,
if (j == first_key_parts)
keyinfo->ext_key_flags= keyinfo->flags | HA_EXT_NOSAME;
}
- share->ext_key_parts+= keyinfo->ext_key_parts;
+ if (keyinfo->algorithm == HA_KEY_ALG_LONG_HASH)
+ share->ext_key_parts++;
+ share->ext_key_parts+= keyinfo->ext_key_parts;
}
keynames->str= (char*) key_part;
keynames->length= strnmov(keynames->str, (char *) strpos,
@@ -930,6 +958,54 @@ static uint upgrade_collation(ulong mysql_version, uint cs_number)
}
+void Column_definition_attributes::frm_pack_basic(uchar *buff) const
+{
+ int2store(buff + 3, length);
+ int2store(buff + 8, pack_flag);
+ buff[10]= (uchar) unireg_check;
+}
+
+
+void Column_definition_attributes::frm_unpack_basic(const uchar *buff)
+{
+ length= uint2korr(buff + 3);
+ pack_flag= uint2korr(buff + 8);
+ unireg_check= (Field::utype) MTYP_TYPENR((uint) buff[10]);
+}
+
+
+void Column_definition_attributes::frm_pack_charset(uchar *buff) const
+{
+ buff[11]= (uchar) (charset->number >> 8);
+ buff[14]= (uchar) charset->number;
+}
+
+
+bool Column_definition_attributes::frm_unpack_charset(TABLE_SHARE *share,
+ const uchar *buff)
+{
+ uint cs_org= buff[14] + (((uint) buff[11]) << 8);
+ uint cs_new= upgrade_collation(share->mysql_version, cs_org);
+ if (cs_org != cs_new)
+ share->incompatible_version|= HA_CREATE_USED_CHARSET;
+ if (cs_new && !(charset= get_charset(cs_new, MYF(0))))
+ {
+ const char *csname= get_charset_name((uint) cs_new);
+ char tmp[10];
+ if (!csname || csname[0] =='?')
+ {
+ my_snprintf(tmp, sizeof(tmp), "#%u", cs_new);
+ csname= tmp;
+ }
+ my_printf_error(ER_UNKNOWN_COLLATION,
+ "Unknown collation '%s' in table '%-.64s' definition",
+ MYF(0), csname, share->table_name.str);
+ return true;
+ }
+ return false;
+}
+
+
/*
In MySQL 5.7 the null bits for not stored virtual fields are last.
Calculate the position for these bits
@@ -976,7 +1052,6 @@ static void mysql57_calculate_null_position(TABLE_SHARE *share,
}
}
-
/** Parse TABLE_SHARE::vcol_defs
unpack_vcol_info_from_frm
@@ -1110,12 +1185,21 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
vcol= unpack_vcol_info_from_frm(thd, table, &expr_str,
&((*field_ptr)->vcol_info), error_reported);
*(vfield_ptr++)= *field_ptr;
+ DBUG_ASSERT(table->map == 0);
+ /*
+ We need Item_field::const_item() to return false, so
+ datetime_precision() and time_precision() do not try to calculate
+ field values, e.g. val_str().
+ Set table->map to non-zero temporarily.
+ */
+ table->map= 1;
if (vcol && field_ptr[0]->check_vcol_sql_mode_dependency(thd, mode))
{
DBUG_ASSERT(thd->is_error());
*error_reported= true;
goto end;
}
+ table->map= 0;
break;
case VCOL_DEFAULT:
vcol= unpack_vcol_info_from_frm(thd, table, &expr_str,
@@ -1142,10 +1226,60 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
pos+= expr_length;
}
- /* Now, initialize CURRENT_TIMESTAMP fields */
+ /* Now, initialize CURRENT_TIMESTAMP and UNIQUE_INDEX_HASH_FIELD fields */
for (field_ptr= table->field; *field_ptr; field_ptr++)
{
Field *field= *field_ptr;
+ if (field->flags & LONG_UNIQUE_HASH_FIELD)
+ {
+ List<Item> *field_list= new (mem_root) List<Item>();
+ Item *list_item;
+ KEY *key= 0;
+ uint key_index, parts= 0;
+ for (key_index= 0; key_index < table->s->keys; key_index++)
+ {
+ key=table->key_info + key_index;
+ parts= key->user_defined_key_parts;
+ if (key->key_part[parts].fieldnr == field->field_index + 1)
+ break;
+ }
+ if (!key || key->algorithm != HA_KEY_ALG_LONG_HASH)
+ goto end;
+ KEY_PART_INFO *keypart;
+ for (uint i=0; i < parts; i++)
+ {
+ keypart= key->key_part + i;
+ if (keypart->key_part_flag & HA_PART_KEY_SEG)
+ {
+ int length= keypart->length/keypart->field->charset()->mbmaxlen;
+ list_item= new (mem_root) Item_func_left(thd,
+ new (mem_root) Item_field(thd, keypart->field),
+ new (mem_root) Item_int(thd, length));
+ list_item->fix_fields(thd, NULL);
+ keypart->field->vcol_info=
+ table->field[keypart->field->field_index]->vcol_info;
+ }
+ else
+ list_item= new (mem_root) Item_field(thd, keypart->field);
+ field_list->push_back(list_item, mem_root);
+ }
+ Item_func_hash *hash_item= new(mem_root)Item_func_hash(thd, *field_list);
+ Virtual_column_info *v= new (mem_root) Virtual_column_info();
+ field->vcol_info= v;
+ field->vcol_info->expr= hash_item;
+ field->vcol_info->set_vcol_type(VCOL_USING_HASH);
+ if (v->fix_and_check_expr(thd, table))
+ goto end;
+ key->user_defined_key_parts= key->ext_key_parts= key->usable_key_parts= 1;
+ key->key_part+= parts;
+
+ if (key->flags & HA_NULL_PART_KEY)
+ key->key_length= HA_HASH_KEY_LENGTH_WITH_NULL;
+ else
+ key->key_length= HA_HASH_KEY_LENGTH_WITHOUT_NULL;
+
+ *(vfield_ptr++)= *field_ptr;
+ }
if (field->has_default_now_unireg_check())
{
expr_str.length(parse_vcol_keyword.length);
@@ -1180,6 +1314,8 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
goto end;
}
+ table->find_constraint_correlated_indexes();
+
res=0;
end:
thd->restore_active_arena(table->expr_arena, &backup_arena);
@@ -1190,6 +1326,255 @@ end:
DBUG_RETURN(res);
}
+
+static const Type_handler *old_frm_type_handler(uint pack_flag,
+ uint interval_nr)
+{
+ enum_field_types field_type= (enum_field_types) f_packtype(pack_flag);
+ DBUG_ASSERT(field_type < 16);
+
+ if (!f_is_alpha(pack_flag))
+ return Type_handler::get_handler_by_real_type(field_type);
+
+ if (!f_is_packed(pack_flag))
+ {
+ if (field_type == MYSQL_TYPE_DECIMAL) // 3.23 or 4.0 string
+ return &type_handler_string;
+ if (field_type == MYSQL_TYPE_VARCHAR) // Since mysql-5.0
+ return &type_handler_varchar;
+ return NULL; // Error (bad frm?)
+ }
+
+ if (f_is_blob(pack_flag))
+ return &type_handler_blob; // QQ: exact type??
+
+ if (interval_nr)
+ {
+ if (f_is_enum(pack_flag))
+ return &type_handler_enum;
+ return &type_handler_set;
+ }
+ return Type_handler::get_handler_by_real_type(field_type);
+}
+
+/* Set overlapped bitmaps for each index */
+
+void TABLE_SHARE::set_overlapped_keys()
+{
+ KEY *key1= key_info;
+ for (uint i= 0; i < keys; i++, key1++)
+ {
+ key1->overlapped.clear_all();
+ key1->overlapped.set_bit(i);
+ }
+ key1= key_info;
+ for (uint i= 0; i < keys; i++, key1++)
+ {
+ KEY *key2= key1 + 1;
+ for (uint j= i+1; j < keys; j++, key2++)
+ {
+ KEY_PART_INFO *key_part1= key1->key_part;
+ uint n1= key1->user_defined_key_parts;
+ uint n2= key2->user_defined_key_parts;
+ for (uint k= 0; k < n1; k++, key_part1++)
+ {
+ KEY_PART_INFO *key_part2= key2->key_part;
+ for (uint l= 0; l < n2; l++, key_part2++)
+ {
+ if (key_part1->fieldnr == key_part2->fieldnr)
+ {
+ key1->overlapped.set_bit(j);
+ key2->overlapped.set_bit(i);
+ goto end_checking_overlap;
+ }
+ }
+ }
+ end_checking_overlap:
+ ;
+ }
+ }
+}
+
+
+bool Item_field::check_index_dependence(void *arg)
+{
+ TABLE *table= (TABLE *)arg;
+
+ KEY *key= table->key_info;
+ for (uint j= 0; j < table->s->keys; j++, key++)
+ {
+ if (table->constraint_dependent_keys.is_set(j))
+ continue;
+
+ KEY_PART_INFO *key_part= key->key_part;
+ uint n= key->user_defined_key_parts;
+
+ for (uint k= 0; k < n; k++, key_part++)
+ {
+ if (this->field == key_part->field)
+ {
+ table->constraint_dependent_keys.set_bit(j);
+ break;
+ }
+ }
+ }
+ return false;
+}
+
+
+/**
+ @brief
+ Find keys that occur in the same constraint on this table
+
+ @details
+ Constraints on this table are checked only.
+
+ The method goes through constraints list trying to find at
+ least two keys which parts participate in some constraint.
+ These keys are called constraint correlated.
+
+ Each key has its own key map with the information about with
+ which keys it is constraint correlated. Bit in this map is set
+ only if keys are constraint correlated.
+ This method fills each keys constraint correlated key map.
+*/
+
+void TABLE::find_constraint_correlated_indexes()
+{
+ if (s->keys == 0)
+ return;
+
+ KEY *key= key_info;
+ for (uint i= 0; i < s->keys; i++, key++)
+ {
+ key->constraint_correlated.clear_all();
+ key->constraint_correlated.set_bit(i);
+ }
+
+ if (!check_constraints)
+ return;
+
+ for (Virtual_column_info **chk= check_constraints ; *chk ; chk++)
+ {
+ constraint_dependent_keys.clear_all();
+ (*chk)->expr->walk(&Item::check_index_dependence, 0, this);
+
+ if (constraint_dependent_keys.bits_set() <= 1)
+ continue;
+
+ uint key_no= 0;
+ key_map::Iterator ki(constraint_dependent_keys);
+ while ((key_no= ki++) != key_map::Iterator::BITMAP_END)
+ key_info[key_no].constraint_correlated.merge(constraint_dependent_keys);
+ }
+}
+
+
+bool TABLE_SHARE::init_period_from_extra2(period_info_t *period,
+ const uchar *data, const uchar *end)
+{
+ if (data + 2*frm_fieldno_size > end)
+ return 1;
+ period->start_fieldno= read_frm_fieldno(data);
+ period->end_fieldno= read_frm_fieldno(data + frm_fieldno_size);
+ return period->start_fieldno >= fields || period->end_fieldno >= fields;
+}
+
+
+size_t extra2_read_len(const uchar **extra2, const uchar *extra2_end)
+{
+ size_t length= *(*extra2)++;
+ if (length)
+ return length;
+
+ if ((*extra2) + 2 >= extra2_end)
+ return 0;
+ length= uint2korr(*extra2);
+ (*extra2)+= 2;
+ if (length < 256 || *extra2 + length > extra2_end)
+ return 0;
+ return length;
+}
+
+
+static
+bool read_extra2(const uchar *frm_image, size_t len, extra2_fields *fields)
+{
+ const uchar *extra2= frm_image + 64;
+
+ DBUG_ENTER("read_extra2");
+
+ fields->reset();
+
+ if (*extra2 != '/') // old frm had '/' there
+ {
+ const uchar *e2end= extra2 + len;
+ while (extra2 + 3 <= e2end)
+ {
+ extra2_frm_value_type type= (extra2_frm_value_type)*extra2++;
+ size_t length= extra2_read_len(&extra2, e2end);
+ if (!length)
+ DBUG_RETURN(true);
+ switch (type) {
+ case EXTRA2_TABLEDEF_VERSION:
+ if (fields->version.str) // see init_from_sql_statement_string()
+ {
+ if (length != fields->version.length)
+ DBUG_RETURN(true);
+ }
+ else
+ {
+ fields->version.str= extra2;
+ fields->version.length= length;
+ }
+ break;
+ case EXTRA2_ENGINE_TABLEOPTS:
+ if (fields->options.str)
+ DBUG_RETURN(true);
+ fields->options.str= extra2;
+ fields->options.length= length;
+ break;
+ case EXTRA2_DEFAULT_PART_ENGINE:
+ fields->engine.set((const char*)extra2, length);
+ break;
+ case EXTRA2_GIS:
+ if (fields->gis.str)
+ DBUG_RETURN(true);
+ fields->gis.str= extra2;
+ fields->gis.length= length;
+ break;
+ case EXTRA2_PERIOD_FOR_SYSTEM_TIME:
+ if (fields->system_period.str || length != 2 * frm_fieldno_size)
+ DBUG_RETURN(true);
+ fields->system_period.str = extra2;
+ fields->system_period.length= length;
+ break;
+ case EXTRA2_FIELD_FLAGS:
+ if (fields->field_flags.str)
+ DBUG_RETURN(true);
+ fields->field_flags.str= extra2;
+ fields->field_flags.length= length;
+ break;
+ case EXTRA2_APPLICATION_TIME_PERIOD:
+ if (fields->application_period.str)
+ DBUG_RETURN(true);
+ fields->application_period.str= extra2;
+ fields->application_period.length= length;
+ break;
+ default:
+ /* abort frm parsing if it's an unknown but important extra2 value */
+ if (type >= EXTRA2_ENGINE_IMPORTANT)
+ DBUG_RETURN(true);
+ }
+ extra2+= length;
+ }
+ if (extra2 != e2end)
+ DBUG_RETURN(true);
+ }
+ DBUG_RETURN(false);
+}
+
+
/**
Read data from a binary .frm file image into a TABLE_SHARE
@@ -1216,11 +1601,11 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
uint total_typelib_value_count;
uint db_create_options, keys, key_parts, n_length;
uint com_length, null_bit_pos, UNINIT_VAR(mysql57_vcol_null_bit_pos), bitmap_count;
- uint i;
+ uint i, hash_fields= 0;
bool use_hash, mysql57_null_bits= 0;
LEX_STRING keynames= {NULL, 0};
char *names, *comment_pos;
- const uchar *forminfo, *extra2;
+ const uchar *forminfo;
const uchar *frm_image_end = frm_image + frm_length;
uchar *record, *null_flags, *null_pos, *UNINIT_VAR(mysql57_vcol_null_pos);
const uchar *disk_buff, *strpos;
@@ -1236,27 +1621,22 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
my_bitmap_map *bitmaps;
bool null_bits_are_used;
uint vcol_screen_length;
- size_t UNINIT_VAR(options_len);
uchar *vcol_screen_pos;
- const uchar *options= 0;
- size_t UNINIT_VAR(gis_options_len);
- const uchar *gis_options= 0;
+ LEX_CUSTRING options;
KEY first_keyinfo;
uint len;
uint ext_key_parts= 0;
plugin_ref se_plugin= 0;
- const uchar *system_period= 0;
bool vers_can_native= false;
- const uchar *extra2_field_flags= 0;
- size_t extra2_field_flags_length= 0;
MEM_ROOT *old_root= thd->mem_root;
Virtual_column_info **table_check_constraints;
bool *interval_unescaped= NULL;
+ extra2_fields extra2;
+
DBUG_ENTER("TABLE_SHARE::init_from_binary_frm_image");
keyinfo= &first_keyinfo;
- share->ext_key_parts= 0;
thd->mem_root= &share->mem_root;
if (write && write_frm_image(frm_image, frm_length))
@@ -1281,90 +1661,27 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
/* Length of the MariaDB extra2 segment in the form file. */
len = uint2korr(frm_image+4);
- extra2= frm_image + 64;
- if (*extra2 != '/') // old frm had '/' there
- {
- const uchar *e2end= extra2 + len;
- while (extra2 + 3 <= e2end)
- {
- uchar type= *extra2++;
- size_t length= *extra2++;
- if (!length)
- {
- if (extra2 + 2 >= e2end)
- goto err;
- length= uint2korr(extra2);
- extra2+= 2;
- if (length < 256)
- goto err;
- }
- if (extra2 + length > e2end)
- goto err;
- switch (type) {
- case EXTRA2_TABLEDEF_VERSION:
- if (tabledef_version.str) // see init_from_sql_statement_string()
- {
- if (length != tabledef_version.length ||
- memcmp(extra2, tabledef_version.str, length))
- goto err;
- }
- else
- {
- tabledef_version.length= length;
- tabledef_version.str= (uchar*)memdup_root(&mem_root, extra2, length);
- if (!tabledef_version.str)
- goto err;
- }
- break;
- case EXTRA2_ENGINE_TABLEOPTS:
- if (options)
- goto err;
- /* remember but delay parsing until we have read fields and keys */
- options= extra2;
- options_len= length;
- break;
- case EXTRA2_DEFAULT_PART_ENGINE:
+ if (read_extra2(frm_image, len, &extra2))
+ goto err;
+
+ tabledef_version.length= extra2.version.length;
+ tabledef_version.str= (uchar*)memdup_root(&mem_root, extra2.version.str,
+ extra2.version.length);
+ if (!tabledef_version.str)
+ goto err;
+
+ /* remember but delay parsing until we have read fields and keys */
+ options= extra2.options;
+
#ifdef WITH_PARTITION_STORAGE_ENGINE
- {
- LEX_CSTRING name= { (char*)extra2, length };
- share->default_part_plugin= ha_resolve_by_name(NULL, &name, false);
- if (!share->default_part_plugin)
- goto err;
- }
-#endif
- break;
- case EXTRA2_GIS:
-#ifdef HAVE_SPATIAL
- {
- if (gis_options)
- goto err;
- gis_options= extra2;
- gis_options_len= length;
- }
-#endif /*HAVE_SPATIAL*/
- break;
- case EXTRA2_PERIOD_FOR_SYSTEM_TIME:
- if (system_period || length != 2 * sizeof(uint16))
- goto err;
- system_period = extra2;
- break;
- case EXTRA2_FIELD_FLAGS:
- if (extra2_field_flags)
- goto err;
- extra2_field_flags= extra2;
- extra2_field_flags_length= length;
- break;
- default:
- /* abort frm parsing if it's an unknown but important extra2 value */
- if (type >= EXTRA2_ENGINE_IMPORTANT)
- goto err;
- }
- extra2+= length;
- }
- if (extra2 != e2end)
+ if (extra2.engine)
+ {
+ share->default_part_plugin= ha_resolve_by_name(NULL, &extra2.engine, false);
+ if (!share->default_part_plugin)
goto err;
}
+#endif
if (frm_length < FRM_HEADER_SIZE + len ||
!(pos= uint4korr(frm_image + FRM_HEADER_SIZE + len)))
@@ -1560,7 +1877,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
share->set_use_ext_keys_flag(plugin_hton(se_plugin)->flags & HTON_SUPPORTS_EXTENDED_KEYS);
if (create_key_infos(disk_buff + 6, frm_image_end, keys, keyinfo,
- new_frm_ver, ext_key_parts,
+ new_frm_ver, &ext_key_parts,
share, len, &first_keyinfo, &keynames))
goto err;
@@ -1642,23 +1959,26 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
if (share->db_create_options & HA_OPTION_TEXT_CREATE_OPTIONS_legacy)
{
- if (options)
+ if (options.str)
goto err;
- options_len= uint4korr(next_chunk);
- options= next_chunk + 4;
- next_chunk+= options_len + 4;
+ options.length= uint4korr(next_chunk);
+ options.str= next_chunk + 4;
+ next_chunk+= options.length + 4;
}
DBUG_ASSERT(next_chunk <= buff_end);
}
else
{
if (create_key_infos(disk_buff + 6, frm_image_end, keys, keyinfo,
- new_frm_ver, ext_key_parts,
+ new_frm_ver, &ext_key_parts,
share, len, &first_keyinfo, &keynames))
goto err;
}
-
share->key_block_size= uint2korr(frm_image+62);
+ keyinfo= share->key_info;
+ for (uint i= 0; i < share->keys; i++, keyinfo++)
+ if (keyinfo->algorithm == HA_KEY_ALG_LONG_HASH)
+ hash_fields++;
if (share->db_plugin && !plugin_equals(share->db_plugin, se_plugin))
goto err; // wrong engine (someone changed the frm under our feet?)
@@ -1674,7 +1994,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
disk_buff= frm_image + pos + FRM_FORMINFO_SIZE;
share->fields= uint2korr(forminfo+258);
- if (extra2_field_flags && extra2_field_flags_length != share->fields)
+ if (extra2.field_flags.str && extra2.field_flags.length != share->fields)
goto err;
pos= uint2korr(forminfo+260); /* Length of all screens */
n_length= uint2korr(forminfo+268);
@@ -1827,106 +2147,59 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
}
/* Set system versioning information. */
- if (system_period == NULL)
+ vers.name= Lex_ident(STRING_WITH_LEN("SYSTEM_TIME"));
+ if (extra2.system_period.str == NULL)
{
versioned= VERS_UNDEFINED;
- row_start_field= 0;
- row_end_field= 0;
+ vers.start_fieldno= 0;
+ vers.end_fieldno= 0;
}
else
{
DBUG_PRINT("info", ("Setting system versioning informations"));
- uint16 row_start= uint2korr(system_period);
- uint16 row_end= uint2korr(system_period + sizeof(uint16));
- if (row_start >= share->fields || row_end >= share->fields)
+ if (init_period_from_extra2(&vers, extra2.system_period.str,
+ extra2.system_period.str + extra2.system_period.length))
goto err;
- DBUG_PRINT("info", ("Columns with system versioning: [%d, %d]", row_start, row_end));
+ DBUG_PRINT("info", ("Columns with system versioning: [%d, %d]",
+ vers.start_fieldno, vers.end_fieldno));
versioned= VERS_TIMESTAMP;
vers_can_native= handler_file->vers_can_native(thd);
- row_start_field= row_start;
- row_end_field= row_end;
status_var_increment(thd->status_var.feature_system_versioning);
} // if (system_period == NULL)
+ if (extra2.application_period.str)
+ {
+ const uchar *pos= extra2.application_period.str;
+ const uchar *end= pos + extra2.application_period.length;
+ period.name.length= extra2_read_len(&pos, end);
+ period.name.str= strmake_root(&mem_root, (char*)pos, period.name.length);
+ pos+= period.name.length;
+
+ period.constr_name.length= extra2_read_len(&pos, end);
+ period.constr_name.str= strmake_root(&mem_root, (char*)pos,
+ period.constr_name.length);
+ pos+= period.constr_name.length;
+
+ if (init_period_from_extra2(&period, pos, end))
+ goto err;
+ status_var_increment(thd->status_var.feature_application_time_periods);
+ }
+
for (i=0 ; i < share->fields; i++, strpos+=field_pack_length, field_ptr++)
{
- uint pack_flag, interval_nr, unireg_type, recpos, field_length;
- uint vcol_info_length=0;
- uint vcol_expr_length=0;
- enum_field_types field_type;
- CHARSET_INFO *charset=NULL;
- Field::geometry_type geom_type= Field::GEOM_GEOMETRY;
+ uint interval_nr= 0, recpos;
LEX_CSTRING comment;
LEX_CSTRING name;
Virtual_column_info *vcol_info= 0;
- uint gis_length, gis_decimals, srid= 0;
- Field::utype unireg_check;
const Type_handler *handler;
uint32 flags= 0;
+ Column_definition_attributes attr;
if (new_frm_ver >= 3)
{
/* new frm file in 4.1 */
- field_length= uint2korr(strpos+3);
recpos= uint3korr(strpos+5);
- pack_flag= uint2korr(strpos+8);
- unireg_type= (uint) strpos[10];
- interval_nr= (uint) strpos[12];
uint comment_length=uint2korr(strpos+15);
- field_type=(enum_field_types) (uint) strpos[13];
-
- /* charset and geometry_type share the same byte in frm */
- if (field_type == MYSQL_TYPE_GEOMETRY)
- {
-#ifdef HAVE_SPATIAL
- uint gis_opt_read;
- Field_geom::storage_type st_type;
- geom_type= (Field::geometry_type) strpos[14];
- charset= &my_charset_bin;
- gis_opt_read= gis_field_options_read(gis_options, gis_options_len,
- &st_type, &gis_length, &gis_decimals, &srid);
- gis_options+= gis_opt_read;
- gis_options_len-= gis_opt_read;
-#else
- goto err;
-#endif
- }
- else
- {
- uint cs_org= strpos[14] + (((uint) strpos[11]) << 8);
- uint cs_new= upgrade_collation(share->mysql_version, cs_org);
- if (cs_org != cs_new)
- share->incompatible_version|= HA_CREATE_USED_CHARSET;
- if (!cs_new)
- charset= &my_charset_bin;
- else if (!(charset= get_charset(cs_new, MYF(0))))
- {
- const char *csname= get_charset_name((uint) cs_new);
- char tmp[10];
- if (!csname || csname[0] =='?')
- {
- my_snprintf(tmp, sizeof(tmp), "#%u", cs_new);
- csname= tmp;
- }
- my_printf_error(ER_UNKNOWN_COLLATION,
- "Unknown collation '%s' in table '%-.64s' definition",
- MYF(0), csname, share->table_name.str);
- goto err;
- }
- }
-
- if ((uchar)field_type == (uchar)MYSQL_TYPE_VIRTUAL)
- {
- if (!interval_nr) // Expect non-null expression
- goto err;
- /*
- MariaDB version 10.0 version.
- The interval_id byte in the .frm file stores the length of the
- expression statement for a virtual column.
- */
- vcol_info_length= interval_nr;
- interval_nr= 0;
- }
if (!comment_length)
{
@@ -1940,33 +2213,21 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
comment_pos+= comment_length;
}
- if (unireg_type & MYSQL57_GENERATED_FIELD)
+ if ((uchar) strpos[13] == (uchar) MYSQL_TYPE_VIRTUAL)
{
- unireg_type&= MYSQL57_GENERATED_FIELD;
-
/*
- MySQL 5.7 generated fields
-
- byte 1 = 1
- byte 2,3 = expr length
- byte 4 = stored_in_db
- byte 5.. = expr
+ MariaDB version 10.0 version.
+ The interval_id byte in the .frm file stores the length of the
+ expression statement for a virtual column.
*/
- if ((uint)(vcol_screen_pos)[0] != 1)
- goto err;
- vcol_info= new (&share->mem_root) Virtual_column_info();
- vcol_info_length= uint2korr(vcol_screen_pos + 1);
- if (!vcol_info_length) // Expect non-empty expression
+ uint vcol_info_length= (uint) strpos[12];
+
+ if (!vcol_info_length) // Expect non-null expression
goto err;
- vcol_info->stored_in_db= vcol_screen_pos[3];
- vcol_info->utf8= 0;
- vcol_screen_pos+= vcol_info_length + MYSQL57_GCOL_HEADER_SIZE;;
- share->virtual_fields++;
- vcol_info_length= 0;
- }
- if (vcol_info_length)
- {
+ attr.frm_unpack_basic(strpos);
+ if (attr.frm_unpack_charset(share, strpos))
+ goto err;
/*
Old virtual field information before 10.2
@@ -1980,7 +2241,9 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
vcol_info= new (&share->mem_root) Virtual_column_info();
bool opt_interval_id= (uint)vcol_screen_pos[0] == 2;
- field_type= (enum_field_types) (uchar) vcol_screen_pos[1];
+ enum_field_types ftype= (enum_field_types) (uchar) vcol_screen_pos[1];
+ if (!(handler= Type_handler::get_handler_by_real_type(ftype)))
+ goto err;
if (opt_interval_id)
interval_nr= (uint)vcol_screen_pos[3];
else if ((uint)vcol_screen_pos[0] != 1)
@@ -1988,26 +2251,64 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
bool stored= vcol_screen_pos[2] & 1;
vcol_info->stored_in_db= stored;
vcol_info->set_vcol_type(stored ? VCOL_GENERATED_STORED : VCOL_GENERATED_VIRTUAL);
- vcol_expr_length= vcol_info_length -
- (uint)(FRM_VCOL_OLD_HEADER_SIZE(opt_interval_id));
+ uint vcol_expr_length= vcol_info_length -
+ (uint)(FRM_VCOL_OLD_HEADER_SIZE(opt_interval_id));
vcol_info->utf8= 0; // before 10.2.1 the charset was unknown
int2store(vcol_screen_pos+1, vcol_expr_length); // for parse_vcol_defs()
vcol_screen_pos+= vcol_info_length;
share->virtual_fields++;
}
+ else
+ {
+ interval_nr= (uint) strpos[12];
+ enum_field_types field_type= (enum_field_types) strpos[13];
+ if (!(handler= Type_handler::get_handler_by_real_type(field_type)))
+ goto err; // Not supported field type
+ if (handler->Column_definition_attributes_frm_unpack(&attr, share,
+ strpos,
+ &extra2.gis))
+ goto err;
+ }
+
+ if (((uint) strpos[10]) & MYSQL57_GENERATED_FIELD)
+ {
+ attr.unireg_check= Field::NONE;
+
+ /*
+ MySQL 5.7 generated fields
+
+ byte 1 = 1
+ byte 2,3 = expr length
+ byte 4 = stored_in_db
+ byte 5.. = expr
+ */
+ if ((uint)(vcol_screen_pos)[0] != 1)
+ goto err;
+ vcol_info= new (&share->mem_root) Virtual_column_info();
+ uint vcol_info_length= uint2korr(vcol_screen_pos + 1);
+ if (!vcol_info_length) // Expect non-empty expression
+ goto err;
+ vcol_info->stored_in_db= vcol_screen_pos[3];
+ vcol_info->utf8= 0;
+ vcol_screen_pos+= vcol_info_length + MYSQL57_GCOL_HEADER_SIZE;;
+ share->virtual_fields++;
+ }
}
else
{
- field_length= (uint) strpos[3];
+ attr.length= (uint) strpos[3];
recpos= uint2korr(strpos+4),
- pack_flag= uint2korr(strpos+6);
- pack_flag&= ~FIELDFLAG_NO_DEFAULT; // Safety for old files
- unireg_type= (uint) strpos[8];
+ attr.pack_flag= uint2korr(strpos+6);
+ attr.pack_flag&= ~FIELDFLAG_NO_DEFAULT; // Safety for old files
+ attr.unireg_check= (Field::utype) MTYP_TYPENR((uint) strpos[8]);
interval_nr= (uint) strpos[10];
/* old frm file */
- field_type= (enum_field_types) f_packtype(pack_flag);
- if (f_is_binary(pack_flag))
+ enum_field_types ftype= (enum_field_types) f_packtype(attr.pack_flag);
+ if (!(handler= Type_handler::get_handler_by_real_type(ftype)))
+ goto err; // Not supported field type
+
+ if (f_is_binary(attr.pack_flag))
{
/*
Try to choose the best 4.1 type:
@@ -2015,26 +2316,26 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
try to find a binary collation for character set.
- for other types (e.g. BLOB) just use my_charset_bin.
*/
- if (!f_is_blob(pack_flag))
+ if (!f_is_blob(attr.pack_flag))
{
// 3.23 or 4.0 string
- if (!(charset= get_charset_by_csname(share->table_charset->csname,
- MY_CS_BINSORT, MYF(0))))
- charset= &my_charset_bin;
+ if (!(attr.charset= get_charset_by_csname(share->table_charset->csname,
+ MY_CS_BINSORT, MYF(0))))
+ attr.charset= &my_charset_bin;
}
- else
- charset= &my_charset_bin;
}
else
- charset= share->table_charset;
+ attr.charset= share->table_charset;
bzero((char*) &comment, sizeof(comment));
+ if ((!(handler= old_frm_type_handler(attr.pack_flag, interval_nr))))
+ goto err; // Not supported field type
}
/* Remove >32 decimals from old files */
if (share->mysql_version < 100200)
- pack_flag&= ~FIELDFLAG_LONG_DECIMAL;
+ attr.pack_flag&= ~FIELDFLAG_LONG_DECIMAL;
- if (interval_nr && charset->mbminlen > 1 &&
+ if (interval_nr && attr.charset->mbminlen > 1 &&
!interval_unescaped[interval_nr - 1])
{
/*
@@ -2048,17 +2349,18 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
}
#ifndef TO_BE_DELETED_ON_PRODUCTION
- if (field_type == MYSQL_TYPE_NEWDECIMAL && !share->mysql_version)
+ if (handler->real_field_type() == MYSQL_TYPE_NEWDECIMAL &&
+ !share->mysql_version)
{
/*
Fix pack length of old decimal values from 5.0.3 -> 5.0.4
The difference is that in the old version we stored precision
in the .frm table while we now store the display_length
*/
- uint decimals= f_decimals(pack_flag);
- field_length= my_decimal_precision_to_length(field_length,
- decimals,
- f_is_dec(pack_flag) == 0);
+ uint decimals= f_decimals(attr.pack_flag);
+ attr.length=
+ my_decimal_precision_to_length((uint) attr.length, decimals,
+ f_is_dec(attr.pack_flag) == 0);
sql_print_error("Found incompatible DECIMAL field '%s' in %s; "
"Please do \"ALTER TABLE '%s' FORCE\" to fix it!",
share->fieldnames.type_names[i], share->table_name.str,
@@ -2082,13 +2384,15 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
if (versioned)
{
- if (i == row_start_field)
+ if (i == vers.start_fieldno)
flags|= VERS_ROW_START;
- else if (i == row_end_field)
+ else if (i == vers.end_fieldno)
flags|= VERS_ROW_END;
if (flags & VERS_SYSTEM_FIELD)
{
+ auto field_type= handler->real_field_type();
+
if (DBUG_EVALUATE_IF("error_vers_wrong_type", 1, 0))
field_type= MYSQL_TYPE_BLOB;
@@ -2117,22 +2421,17 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
}
/* Convert pre-10.2.2 timestamps to use Field::default_value */
- unireg_check= (Field::utype) MTYP_TYPENR(unireg_type);
name.str= fieldnames.type_names[i];
name.length= strlen(name.str);
- if (!(handler= Type_handler::get_handler_by_real_type(field_type)))
- goto err; // Not supported field type
+ attr.interval= interval_nr ? share->intervals + interval_nr - 1 : NULL;
+ Record_addr addr(record + recpos, null_pos, null_bit_pos);
*field_ptr= reg_field=
- make_field(share, &share->mem_root, record+recpos, (uint32) field_length,
- null_pos, null_bit_pos, pack_flag, handler, charset,
- geom_type, srid, unireg_check,
- (interval_nr ? share->intervals+interval_nr-1 : NULL),
- &name, flags);
+ attr.make_field(share, &share->mem_root, &addr, handler, &name, flags);
if (!reg_field) // Not supported field type
goto err;
- if (unireg_check == Field::TIMESTAMP_DNUN_FIELD ||
- unireg_check == Field::TIMESTAMP_DN_FIELD)
+ if (attr.unireg_check == Field::TIMESTAMP_DNUN_FIELD ||
+ attr.unireg_check == Field::TIMESTAMP_DN_FIELD)
{
reg_field->default_value= new (&share->mem_root) Virtual_column_info();
reg_field->default_value->set_vcol_type(VCOL_DEFAULT);
@@ -2144,9 +2443,9 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
reg_field->comment=comment;
reg_field->vcol_info= vcol_info;
reg_field->flags|= flags;
- if (extra2_field_flags)
+ if (extra2.field_flags.str)
{
- uchar flags= *extra2_field_flags++;
+ uchar flags= *extra2.field_flags.str++;
if (flags & VERS_OPTIMIZED_UPDATE)
reg_field->flags|= VERS_UPDATE_UNVERSIONED_FLAG;
@@ -2156,10 +2455,11 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
status_var_increment(thd->status_var.feature_invisible_columns);
if (!reg_field->invisible)
share->visible_fields++;
- if (field_type == MYSQL_TYPE_BIT && !f_bit_as_char(pack_flag))
+ if (handler->real_field_type() == MYSQL_TYPE_BIT &&
+ !f_bit_as_char(attr.pack_flag))
{
null_bits_are_used= 1;
- if ((null_bit_pos+= field_length & 7) > 7)
+ if ((null_bit_pos+= (uint) (attr.length & 7)) > 7)
{
null_pos++;
null_bit_pos-= 8;
@@ -2182,7 +2482,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
}
}
- if (f_no_default(pack_flag))
+ if (f_no_default(attr.pack_flag))
reg_field->flags|= NO_DEFAULT_VALUE_FLAG;
if (reg_field->unireg_check == Field::NEXT_NUMBER)
@@ -2219,6 +2519,37 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
/* Fix key->name and key_part->field */
if (key_parts)
{
+ keyinfo= share->key_info;
+ uint hash_field_used_no= share->fields - hash_fields;
+ KEY_PART_INFO *hash_keypart;
+ Field *hash_field;
+ uint offset= share->reclength - HA_HASH_FIELD_LENGTH * hash_fields;
+ for (uint i= 0; i < share->keys; i++, keyinfo++)
+ {
+ /* We need set value in hash key_part */
+ if (keyinfo->algorithm == HA_KEY_ALG_LONG_HASH)
+ {
+ share->long_unique_table= 1;
+ hash_keypart= keyinfo->key_part + keyinfo->user_defined_key_parts;
+ hash_keypart->length= HA_HASH_KEY_LENGTH_WITHOUT_NULL;
+ hash_keypart->store_length= hash_keypart->length;
+ hash_keypart->type= HA_KEYTYPE_ULONGLONG;
+ hash_keypart->key_part_flag= 0;
+ hash_keypart->key_type= 32834;
+ /* Last n fields are unique_index_hash fields*/
+ hash_keypart->offset= offset;
+ hash_keypart->fieldnr= hash_field_used_no + 1;
+ hash_field= share->field[hash_field_used_no];
+ hash_field->flags|= LONG_UNIQUE_HASH_FIELD;//Used in parse_vcol_defs
+ keyinfo->flags|= HA_NOSAME;
+ share->virtual_fields++;
+ share->stored_fields--;
+ if (record + share->stored_rec_length >= hash_field->ptr)
+ share->stored_rec_length= (ulong)(hash_field->ptr - record - 1);
+ hash_field_used_no++;
+ offset+= HA_HASH_FIELD_LENGTH;
+ }
+ }
uint add_first_key_parts= 0;
longlong ha_option= handler_file->ha_table_flags();
keyinfo= share->key_info;
@@ -2226,7 +2557,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
primary_key_name) ? MAX_KEY : 0;
KEY* key_first_info= NULL;
- if (primary_key >= MAX_KEY && keyinfo->flags & HA_NOSAME)
+ if (primary_key >= MAX_KEY && keyinfo->flags & HA_NOSAME &&
+ keyinfo->algorithm != HA_KEY_ALG_LONG_HASH)
{
/*
If the UNIQUE key doesn't have NULL columns and is not a part key
@@ -2261,7 +2593,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
}
if (share->use_ext_keys)
- {
+ {
if (primary_key >= MAX_KEY)
{
add_first_key_parts= 0;
@@ -2313,6 +2645,9 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
uint length_bytes= 0, len_null_byte= 0, ext_key_length= 0;
Field *field;
+ if ((keyinfo-1)->algorithm == HA_KEY_ALG_LONG_HASH)
+ new_key_part++; // reserved for the hash value
+
/*
Do not extend the key that contains a component
defined over the beginning of a field.
@@ -2320,22 +2655,22 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
for (i= 0; i < keyinfo->user_defined_key_parts; i++)
{
uint fieldnr= keyinfo->key_part[i].fieldnr;
- field= share->field[keyinfo->key_part[i].fieldnr-1];
+ field= share->field[fieldnr-1];
if (field->null_ptr)
len_null_byte= HA_KEY_NULL_LENGTH;
- if (field->type() == MYSQL_TYPE_BLOB ||
+ if ((field->type() == MYSQL_TYPE_BLOB ||
field->real_type() == MYSQL_TYPE_VARCHAR ||
- field->type() == MYSQL_TYPE_GEOMETRY)
+ field->type() == MYSQL_TYPE_GEOMETRY) &&
+ keyinfo->algorithm != HA_KEY_ALG_LONG_HASH )
{
length_bytes= HA_KEY_BLOB_LENGTH;
}
ext_key_length+= keyinfo->key_part[i].length + len_null_byte
+ length_bytes;
- if (share->field[fieldnr-1]->key_length() !=
- keyinfo->key_part[i].length)
+ if (field->key_length() != keyinfo->key_part[i].length)
{
add_keyparts_for_this_key= 0;
break;
@@ -2392,6 +2727,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
key_part= keyinfo->key_part;
uint key_parts= share->use_ext_keys ? keyinfo->ext_key_parts :
keyinfo->user_defined_key_parts;
+ if (keyinfo->algorithm == HA_KEY_ALG_LONG_HASH)
+ key_parts++;
for (i=0; i < key_parts; key_part++, i++)
{
Field *field;
@@ -2405,8 +2742,10 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
field= key_part->field= share->field[key_part->fieldnr-1];
key_part->type= field->key_type();
+
if (field->invisible > INVISIBLE_USER && !field->vers_sys_field())
- keyinfo->flags |= HA_INVISIBLE_KEY;
+ if (keyinfo->algorithm != HA_KEY_ALG_LONG_HASH)
+ keyinfo->flags |= HA_INVISIBLE_KEY;
if (field->null_ptr)
{
key_part->null_offset=(uint) ((uchar*) field->null_ptr -
@@ -2414,12 +2753,6 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
key_part->null_bit= field->null_bit;
key_part->store_length+=HA_KEY_NULL_LENGTH;
keyinfo->flags|=HA_NULL_PART_KEY;
-
- /*
- This branch is executed only for user defined key parts of the
- secondary indexes.
- */
- DBUG_ASSERT(i < keyinfo->user_defined_key_parts);
keyinfo->key_length+= HA_KEY_NULL_LENGTH;
}
if (field->type() == MYSQL_TYPE_BLOB ||
@@ -2439,13 +2772,15 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
key_part->key_part_flag|= HA_BIT_PART;
if (i == 0 && key != primary_key)
- field->flags |= (((keyinfo->flags & HA_NOSAME) &&
+ field->flags |= (((keyinfo->flags & HA_NOSAME ||
+ keyinfo->algorithm == HA_KEY_ALG_LONG_HASH) &&
(keyinfo->user_defined_key_parts == 1)) ?
UNIQUE_KEY_FLAG : MULTIPLE_KEY_FLAG);
if (i == 0)
field->key_start.set_bit(key);
if (field->key_length() == key_part->length &&
- !(field->flags & BLOB_FLAG))
+ !(field->flags & BLOB_FLAG) &&
+ keyinfo->algorithm != HA_KEY_ALG_LONG_HASH)
{
if (handler_file->index_flags(key, i, 0) & HA_KEYREAD_ONLY)
{
@@ -2480,7 +2815,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
if (field->key_length() != key_part->length)
{
#ifndef TO_BE_DELETED_ON_PRODUCTION
- if (field->type() == MYSQL_TYPE_NEWDECIMAL)
+ if (field->type() == MYSQL_TYPE_NEWDECIMAL &&
+ keyinfo->algorithm != HA_KEY_ALG_LONG_HASH)
{
/*
Fix a fatal error in decimal key handling that causes crashes
@@ -2519,7 +2855,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
if (!(key_part->key_part_flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART |
HA_BIT_PART)) &&
key_part->type != HA_KEYTYPE_FLOAT &&
- key_part->type != HA_KEYTYPE_DOUBLE)
+ key_part->type == HA_KEYTYPE_DOUBLE &&
+ keyinfo->algorithm != HA_KEY_ALG_LONG_HASH)
key_part->key_part_flag|= HA_CAN_MEMCMP;
}
keyinfo->usable_key_parts= usable_parts; // Filesort
@@ -2566,6 +2903,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
null_length, 255);
}
+ set_overlapped_keys();
+
/* Handle virtual expressions */
if (vcol_screen_length && share->frm_version >= FRM_VER_EXPRESSSIONS)
{
@@ -2658,10 +2997,10 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
(uint) (share->table_check_constraints -
share->field_check_constraints));
- if (options)
+ if (options.str)
{
- DBUG_ASSERT(options_len);
- if (engine_table_options_frm_read(options, options_len, share))
+ DBUG_ASSERT(options.length);
+ if (engine_table_options_frm_read(options.str, options.length, share))
goto err;
}
if (parse_engine_table_options(thd, handler_file->partition_ht(), share))
@@ -2782,7 +3121,7 @@ static bool sql_unusable_for_discovery(THD *thd, handlerton *engine,
if (lex->create_info.like())
return 1;
// ... create select
- if (lex->select_lex.item_list.elements)
+ if (lex->first_select_lex()->item_list.elements)
return 1;
// ... temporary
if (create_info->tmp_table())
@@ -2882,7 +3221,7 @@ int TABLE_SHARE::init_from_sql_statement_string(THD *thd, bool write,
thd->lex->create_info.tabledef_version= tabledef_version;
promote_first_timestamp_column(&thd->lex->alter_info.create_list);
- file= mysql_create_frm_image(thd, &db, &table_name,
+ file= mysql_create_frm_image(thd, db, table_name,
&thd->lex->create_info, &thd->lex->alter_info,
C_ORDINARY_CREATE, &unused1, &unused2, &frm);
error|= file == 0;
@@ -2982,10 +3321,8 @@ bool Virtual_column_info::fix_session_expr(THD *thd)
if (!need_refix())
return false;
- DBUG_ASSERT(!expr->fixed);
- if (fix_expr(thd))
- return true;
- return false;
+ DBUG_ASSERT(!expr->is_fixed());
+ return fix_expr(thd);
}
@@ -3056,7 +3393,7 @@ bool TABLE::vcol_fix_expr(THD *thd)
return false;
if (!thd->stmt_arena->is_conventional() &&
- vcol_refix_list.head()->expr->fixed)
+ vcol_refix_list.head()->expr->is_fixed())
{
/* NOTE: Under trigger we already have fixed expressions */
return false;
@@ -3118,12 +3455,12 @@ bool TABLE::vcol_cleanup_expr(THD *thd)
bool Virtual_column_info::fix_and_check_expr(THD *thd, TABLE *table)
{
- DBUG_ENTER("fix_and_check_vcol_expr");
+ DBUG_ENTER("Virtual_column_info::fix_and_check_expr");
DBUG_PRINT("info", ("vcol: %p", this));
DBUG_ASSERT(expr);
/* NOTE: constants are fixed when constructed */
- if (expr->fixed)
+ if (expr->is_fixed())
DBUG_RETURN(0); // nothing to do
if (fix_expr(thd))
@@ -3165,7 +3502,7 @@ bool Virtual_column_info::fix_and_check_expr(THD *thd, TABLE *table)
of the statement because the field item does not have a field
pointer at that time
*/
- myf warn= table->s->frm_version < FRM_VER_EXPRESSSIONS ? ME_JUST_WARNING : 0;
+ myf warn= table->s->frm_version < FRM_VER_EXPRESSSIONS ? ME_WARNING : 0;
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(warn),
"AUTO_INCREMENT", get_vcol_type_name(), res.name);
if (!warn)
@@ -3265,6 +3602,135 @@ end:
DBUG_RETURN(vcol_info);
}
+#ifndef DBUG_OFF
+static void print_long_unique_table(TABLE *table)
+{
+ char buff[256];
+ String str;
+ KEY *key_info_table, *key_info_share;
+ KEY_PART_INFO *key_part;
+ Field *field;
+ my_snprintf(buff, sizeof(buff), "Printing Table state, It will print table fields,"
+ " fields->offset,field->null_bit, field->null_pos and key_info ... \n"
+ "\nPrinting Table keyinfo\n");
+ str.append(buff, strlen(buff));
+ my_snprintf(buff, sizeof(buff), "\ntable->s->reclength %d\n"
+ "table->s->fields %d\n",
+ table->s->reclength, table->s->fields);
+ str.append(buff, strlen(buff));
+ for (uint i= 0; i < table->s->keys; i++)
+ {
+ key_info_table= table->key_info + i;
+ key_info_share= table->s->key_info + i;
+ my_snprintf(buff, sizeof(buff), "\ntable->key_info[%d] user_defined_key_parts = %d\n"
+ "table->key_info[%d] algorithm == HA_KEY_ALG_LONG_HASH = %d\n"
+ "table->key_info[%d] flags & HA_NOSAME = %d\n",
+ i, key_info_table->user_defined_key_parts,
+ i, key_info_table->algorithm == HA_KEY_ALG_LONG_HASH,
+ i, key_info_table->flags & HA_NOSAME);
+ str.append(buff, strlen(buff));
+ my_snprintf(buff, sizeof(buff), "\ntable->s->key_info[%d] user_defined_key_parts = %d\n"
+ "table->s->key_info[%d] algorithm == HA_KEY_ALG_LONG_HASH = %d\n"
+ "table->s->key_info[%d] flags & HA_NOSAME = %d\n",
+ i, key_info_share->user_defined_key_parts,
+ i, key_info_share->algorithm == HA_KEY_ALG_LONG_HASH,
+ i, key_info_share->flags & HA_NOSAME);
+ str.append(buff, strlen(buff));
+ key_part = key_info_table->key_part;
+ my_snprintf(buff, sizeof(buff), "\nPrinting table->key_info[%d].key_part[0] info\n"
+ "key_part->offset = %d\n"
+ "key_part->field_name = %s\n"
+ "key_part->length = %d\n"
+ "key_part->null_bit = %d\n"
+ "key_part->null_offset = %d\n",
+ i, key_part->offset, key_part->field->field_name.str, key_part->length,
+ key_part->null_bit, key_part->null_offset);
+ str.append(buff, strlen(buff));
+
+ for (uint j= 0; j < key_info_share->user_defined_key_parts; j++)
+ {
+ key_part= key_info_share->key_part + j;
+ my_snprintf(buff, sizeof(buff), "\nPrinting share->key_info[%d].key_part[%d] info\n"
+ "key_part->offset = %d\n"
+ "key_part->field_name = %s\n"
+ "key_part->length = %d\n"
+ "key_part->null_bit = %d\n"
+ "key_part->null_offset = %d\n",
+ i,j,key_part->offset, key_part->field->field_name.str, key_part->length,
+ key_part->null_bit, key_part->null_offset);
+ str.append(buff, strlen(buff));
+ }
+ }
+ my_snprintf(buff, sizeof(buff), "\nPrinting table->fields\n");
+ str.append(buff, strlen(buff));
+ for(uint i= 0; i < table->s->fields; i++)
+ {
+ field= table->field[i];
+ my_snprintf(buff, sizeof(buff), "\ntable->field[%d]->field_name %s\n"
+ "table->field[%d]->offset = %d\n"
+ "table->field[%d]->field_length = %d\n"
+ "table->field[%d]->null_pos wrt to record 0 = %d\n"
+ "table->field[%d]->null_bit_pos = %d\n",
+ i, field->field_name.str,
+ i, field->ptr- table->record[0],
+ i, field->pack_length(),
+ i, field->null_bit ? field->null_ptr - table->record[0] : -1,
+ i, field->null_bit);
+ str.append(buff, strlen(buff));
+ }
+ (*error_handler_hook)(1, str.ptr(), ME_NOTE);
+}
+#endif
+
+bool copy_keys_from_share(TABLE *outparam, MEM_ROOT *root)
+{
+ TABLE_SHARE *share= outparam->s;
+ if (share->key_parts)
+ {
+ KEY *key_info, *key_info_end;
+ KEY_PART_INFO *key_part;
+
+ if (!multi_alloc_root(root, &key_info, share->keys*sizeof(KEY),
+ &key_part, share->ext_key_parts*sizeof(KEY_PART_INFO),
+ NullS))
+ return 1;
+
+ outparam->key_info= key_info;
+
+ memcpy(key_info, share->key_info, sizeof(*key_info)*share->keys);
+ memcpy(key_part, key_info->key_part, sizeof(*key_part)*share->ext_key_parts);
+
+ my_ptrdiff_t adjust_ptrs= PTR_BYTE_DIFF(key_part, key_info->key_part);
+ for (key_info_end= key_info + share->keys ;
+ key_info < key_info_end ;
+ key_info++)
+ {
+ key_info->table= outparam;
+ key_info->key_part= reinterpret_cast<KEY_PART_INFO*>
+ (reinterpret_cast<char*>(key_info->key_part) + adjust_ptrs);
+ if (key_info->algorithm == HA_KEY_ALG_LONG_HASH)
+ key_info->flags&= ~HA_NOSAME;
+ }
+ for (KEY_PART_INFO *key_part_end= key_part+share->ext_key_parts;
+ key_part < key_part_end;
+ key_part++)
+ {
+ Field *field= key_part->field= outparam->field[key_part->fieldnr - 1];
+ if (field->key_length() != key_part->length &&
+ !(field->flags & BLOB_FLAG))
+ {
+ /*
+ We are using only a prefix of the column as a key:
+ Create a new field for the key part that matches the index
+ */
+ field= key_part->field=field->make_new_field(root, outparam, 0);
+ field->field_length= key_part->length;
+ }
+ }
+ }
+ return 0;
+}
+
/*
Open a table based on a TABLE_SHARE
@@ -3336,10 +3802,6 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
goto err;
outparam->alias.set(tmp_alias, alias->length, table_alias_charset);
- outparam->quick_keys.init();
- outparam->covering_keys.init();
- outparam->intersect_keys.init();
- outparam->keys_in_use_for_query.init();
outparam->vcol_refix_list.empty();
/* Allocate handler */
@@ -3377,7 +3839,7 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
if (prgflag & (READ_ALL + EXTRA_RECORD))
{
records++;
- if (share->versioned)
+ if (share->versioned || share->period.name)
records++;
}
@@ -3461,10 +3923,14 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
key_part_end= key_part + (share->use_ext_keys ? key_info->ext_key_parts :
key_info->user_defined_key_parts) ;
+ if (key_info->algorithm == HA_KEY_ALG_LONG_HASH)
+ {
+ key_part_end++;
+ key_info->flags&= ~HA_NOSAME;
+ }
for ( ; key_part < key_part_end; key_part++)
{
Field *field= key_part->field= outparam->field[key_part->fieldnr - 1];
-
if (field->key_length() != key_part->length &&
!(field->flags & BLOB_FLAG))
{
@@ -3474,7 +3940,7 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
*/
field= key_part->field=field->make_new_field(&outparam->mem_root,
outparam, 0);
- field->field_length= key_part->length;
+ const_cast<uint32_t&>(field->field_length)= key_part->length;
}
}
if (!share->use_ext_keys)
@@ -3650,17 +4116,6 @@ partititon_err:
(my_bitmap_map*) bitmaps, share->fields, FALSE);
bitmaps+= bitmap_size;
- /* Don't allocate vcol_bitmap if we don't need it */
- if (share->virtual_fields)
- {
- if (!(outparam->def_vcol_set= (MY_BITMAP*)
- alloc_root(&outparam->mem_root, sizeof(*outparam->def_vcol_set))))
- goto err;
- my_bitmap_init(outparam->def_vcol_set,
- (my_bitmap_map*) bitmaps, share->fields, FALSE);
- bitmaps+= bitmap_size;
- }
-
my_bitmap_init(&outparam->has_value_set,
(my_bitmap_map*) bitmaps, share->fields, FALSE);
bitmaps+= bitmap_size;
@@ -3741,6 +4196,8 @@ partititon_err:
share->no_replicate= TRUE;
if (outparam->file->table_cache_type() & HA_CACHE_TBL_NOCACHE)
share->not_usable_by_query_cache= TRUE;
+ if (outparam->file->ha_table_flags() & HA_CAN_ONLINE_BACKUPS)
+ share->online_backup= 1;
}
if (share->no_replicate || !binlog_filter->db_ok(share->db.str))
@@ -3751,6 +4208,8 @@ partititon_err:
thd->status_var.opened_tables++;
thd->lex->context_analysis_only= save_context_analysis_only;
+ DBUG_EXECUTE_IF("print_long_unique_internal_state",
+ print_long_unique_table(outparam););
DBUG_RETURN (OPEN_FRM_OK);
err:
@@ -3863,7 +4322,7 @@ void open_table_error(TABLE_SHARE *share, enum open_frm_error error,
int db_errno)
{
char buff[FN_REFLEN];
- const myf errortype= ME_ERROR+ME_WAITTANG; // Write fatals error to log
+ const myf errortype= ME_ERROR_LOG; // Write fatals error to log
DBUG_ENTER("open_table_error");
DBUG_PRINT("info", ("error: %d db_errno: %d", error, db_errno));
@@ -4090,6 +4549,8 @@ void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo,
{
size_t key_comment_total_bytes= 0;
uint i;
+ uchar frm_format= create_info->expression_length ? FRM_VER_EXPRESSSIONS
+ : FRM_VER_TRUE_VARCHAR;
DBUG_ENTER("prepare_frm_header");
/* Fix this when we have new .frm files; Current limit is 4G rows (TODO) */
@@ -4098,17 +4559,6 @@ void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo,
if (create_info->min_rows > UINT_MAX32)
create_info->min_rows= UINT_MAX32;
- size_t key_length, tmp_key_length, tmp, csid;
- bzero((char*) fileinfo, FRM_HEADER_SIZE);
- /* header */
- fileinfo[0]=(uchar) 254;
- fileinfo[1]= 1;
- fileinfo[2]= (create_info->expression_length == 0 ? FRM_VER_TRUE_VARCHAR :
- FRM_VER_EXPRESSSIONS);
-
- DBUG_ASSERT(ha_storage_engine_is_enabled(create_info->db_type));
- fileinfo[3]= (uchar) ha_legacy_type(create_info->db_type);
-
/*
Keep in sync with pack_keys() in unireg.cc
For each key:
@@ -4127,8 +4577,20 @@ void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo,
(key_info[i].comment.length > 0));
if (key_info[i].flags & HA_USES_COMMENT)
key_comment_total_bytes += 2 + key_info[i].comment.length;
+ if (key_info[i].algorithm == HA_KEY_ALG_LONG_HASH)
+ frm_format= FRM_VER_EXPRESSSIONS;
}
+ size_t key_length, tmp_key_length, tmp, csid;
+ bzero((char*) fileinfo, FRM_HEADER_SIZE);
+ /* header */
+ fileinfo[0]=(uchar) 254;
+ fileinfo[1]= 1;
+ fileinfo[2]= frm_format;
+
+ DBUG_ASSERT(ha_storage_engine_is_enabled(create_info->db_type));
+ fileinfo[3]= (uchar) ha_legacy_type(create_info->db_type);
+
key_length= keys * (8 + MAX_REF_PARTS * 9 + NAME_LEN + 1) + 16
+ key_comment_total_bytes;
@@ -4184,7 +4646,7 @@ void update_create_info_from_table(HA_CREATE_INFO *create_info, TABLE *table)
create_info->row_type= share->row_type;
create_info->key_block_size= share->key_block_size;
create_info->default_table_charset= share->table_charset;
- create_info->table_charset= 0;
+ create_info->alter_table_convert_to_charset= 0;
create_info->comment= share->comment;
create_info->transactional= share->transactional;
create_info->page_checksum= share->page_checksum;
@@ -4275,7 +4737,7 @@ uint calculate_key_len(TABLE *table, uint key, const uchar *buf,
/* works only with key prefixes */
DBUG_ASSERT(((keypart_map + 1) & keypart_map) == 0);
- KEY *key_info= table->s->key_info+key;
+ KEY *key_info= table->key_info+key;
KEY_PART_INFO *key_part= key_info->key_part;
KEY_PART_INFO *end_key_part= key_part + table->actual_n_key_parts(key_info);
uint length= 0;
@@ -4457,6 +4919,12 @@ bool check_column_name(const char *name)
}
+bool check_period_name(const char *name)
+{
+ return check_column_name(name);
+}
+
+
/**
Checks whether a table is intact. Should be done *just* after the table has
been opened.
@@ -4893,9 +5361,16 @@ void TABLE::init(THD *thd, TABLE_LIST *tl)
fulltext_searched= 0;
file->ft_handler= 0;
reginfo.impossible_range= 0;
+ reginfo.join_tab= NULL;
+ reginfo.not_exists_optimize= FALSE;
created= TRUE;
cond_selectivity= 1.0;
cond_selectivity_sampling_explain= NULL;
+ range_rowid_filter_cost_info_elems= 0;
+ range_rowid_filter_cost_info_ptr= NULL;
+ range_rowid_filter_cost_info= NULL;
+ update_handler= NULL;
+ check_unique_buf= NULL;
vers_write= s->versioned;
quick_condition_rows=0;
no_cache= false;
@@ -5183,7 +5658,7 @@ bool TABLE_LIST::prep_where(THD *thd, Item **conds,
if (where)
{
- if (where->fixed)
+ if (where->is_fixed())
where->update_used_tables();
else if (where->fix_fields(thd, &where))
DBUG_RETURN(TRUE);
@@ -5243,13 +5718,13 @@ bool TABLE_LIST::single_table_updatable()
{
if (!updatable)
return false;
- if (view && view->select_lex.table_list.elements == 1)
+ if (view && view->first_select_lex()->table_list.elements == 1)
{
/*
We need to check deeply only single table views. Multi-table views
will be turned to multi-table updates and then checked by leaf tables
*/
- return (((TABLE_LIST *)view->select_lex.table_list.first)->
+ return (((TABLE_LIST *)view->first_select_lex()->table_list.first)->
single_table_updatable());
}
return true;
@@ -5286,7 +5761,8 @@ merge_on_conds(THD *thd, TABLE_LIST *table, bool is_cascaded)
cond= table->on_expr->copy_andor_structure(thd);
if (!table->view)
DBUG_RETURN(cond);
- for (TABLE_LIST *tbl= (TABLE_LIST*)table->view->select_lex.table_list.first;
+ for (TABLE_LIST *tbl=
+ (TABLE_LIST*)table->view->first_select_lex()->table_list.first;
tbl;
tbl= tbl->next_local)
{
@@ -5328,7 +5804,7 @@ bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type)
{
DBUG_ENTER("TABLE_LIST::prep_check_option");
bool is_cascaded= check_opt_type == VIEW_CHECK_CASCADED;
- TABLE_LIST *merge_underlying_list= view->select_lex.get_table_list();
+ TABLE_LIST *merge_underlying_list= view->first_select_lex()->get_table_list();
for (TABLE_LIST *tbl= merge_underlying_list; tbl; tbl= tbl->next_local)
{
/* see comment of check_opt_type parameter */
@@ -5446,7 +5922,7 @@ TABLE_LIST *TABLE_LIST::find_underlying_table(TABLE *table_to_find)
if (!view)
return 0;
- for (TABLE_LIST *tbl= view->select_lex.get_table_list();
+ for (TABLE_LIST *tbl= view->first_select_lex()->get_table_list();
tbl;
tbl= tbl->next_local)
{
@@ -5508,7 +5984,7 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
main_view->db.str);
const char *name_table= (main_view->view ? main_view->view_name.str :
main_view->table_name.str);
- my_error(ER_VIEW_CHECK_FAILED, MYF(ignore_failure ? ME_JUST_WARNING : 0),
+ my_error(ER_VIEW_CHECK_FAILED, MYF(ignore_failure ? ME_WARNING : 0),
name_db, name_table);
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR;
}
@@ -5552,7 +6028,7 @@ int TABLE::verify_constraints(bool ignore_failure)
}
field_error.append((*chk)->name.str);
my_error(ER_CONSTRAINT_FAILED,
- MYF(ignore_failure ? ME_JUST_WARNING : 0), field_error.c_ptr(),
+ MYF(ignore_failure ? ME_WARNING : 0), field_error.c_ptr(),
s->db.str, s->table_name.str);
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR;
}
@@ -5644,7 +6120,8 @@ bool TABLE_LIST::set_insert_values(MEM_ROOT *mem_root)
{
DBUG_PRINT("info", ("setting insert_value for view"));
DBUG_ASSERT(is_view_or_derived() && is_merged_derived());
- for (TABLE_LIST *tbl= (TABLE_LIST*)view->select_lex.table_list.first;
+ for (TABLE_LIST *tbl=
+ (TABLE_LIST*)view->first_select_lex()->table_list.first;
tbl;
tbl= tbl->next_local)
if (tbl->set_insert_values(mem_root))
@@ -5811,7 +6288,7 @@ void TABLE_LIST::register_want_access(ulong want_access)
}
if (!view)
return;
- for (TABLE_LIST *tbl= view->select_lex.get_table_list();
+ for (TABLE_LIST *tbl= view->first_select_lex()->get_table_list();
tbl;
tbl= tbl->next_local)
tbl->register_want_access(want_access);
@@ -5945,6 +6422,7 @@ bool TABLE_LIST::prepare_security(THD *thd)
if (prepare_view_security_context(thd))
DBUG_RETURN(TRUE);
thd->security_ctx= find_view_security_context(thd);
+ opt_trace_disable_if_no_security_context_access(thd);
while ((tbl= tb++))
{
DBUG_ASSERT(tbl->referencing_view);
@@ -6003,6 +6481,7 @@ void TABLE_LIST::set_check_materialized()
The subtree should be already excluded
*/
DBUG_ASSERT(!derived->first_select()->first_inner_unit() ||
+ derived->first_select()->first_inner_unit()->with_element ||
derived->first_select()->first_inner_unit()->first_select()->
exclude_from_table_unique_test);
}
@@ -6019,14 +6498,14 @@ TABLE *TABLE_LIST::get_real_join_table()
break;
/* we do not support merging of union yet */
DBUG_ASSERT(tbl->view == NULL ||
- tbl->view->select_lex.next_select() == NULL);
+ tbl->view->first_select_lex()->next_select() == NULL);
DBUG_ASSERT(tbl->derived == NULL ||
tbl->derived->first_select()->next_select() == NULL);
{
List_iterator_fast<TABLE_LIST>
ti(tbl->view != NULL ?
- tbl->view->select_lex.top_join_list :
+ tbl->view->first_select_lex()->top_join_list :
tbl->derived->first_select()->top_join_list);
for (;;)
{
@@ -6208,13 +6687,13 @@ Item *create_view_field(THD *thd, TABLE_LIST *view, Item **field_ref,
('mysql_schema_table' function). So we can return directly the
field. This case happens only for 'show & where' commands.
*/
- DBUG_ASSERT(field && field->fixed);
+ DBUG_ASSERT(field && field->is_fixed());
DBUG_RETURN(field);
}
DBUG_ASSERT(field);
thd->lex->current_select->no_wrap_view_item= TRUE;
- if (!field->fixed)
+ if (!field->is_fixed())
{
if (field->fix_fields(thd, field_ref))
{
@@ -6228,8 +6707,9 @@ Item *create_view_field(THD *thd, TABLE_LIST *view, Item **field_ref,
{
DBUG_RETURN(field);
}
- Name_resolution_context *context= view->view ? &view->view->select_lex.context :
- &thd->lex->select_lex.context;
+ Name_resolution_context *context= (view->view ?
+ &view->view->first_select_lex()->context:
+ &thd->lex->first_select_lex()->context);
Item *item= (new (thd->mem_root)
Item_direct_view_ref(thd, context, field_ref, view->alias.str,
name, view));
@@ -6553,13 +7033,12 @@ void TABLE::clear_column_bitmaps()
Reset column read/write usage. It's identical to:
bitmap_clear_all(&table->def_read_set);
bitmap_clear_all(&table->def_write_set);
- if (s->virtual_fields) bitmap_clear_all(table->def_vcol_set);
The code assumes that the bitmaps are allocated after each other, as
guaranteed by open_table_from_share()
*/
bzero((char*) def_read_set.bitmap,
s->column_bitmap_size * (s->virtual_fields ? 3 : 2));
- column_bitmaps_set(&def_read_set, &def_write_set, def_vcol_set);
+ column_bitmaps_set(&def_read_set, &def_write_set);
rpl_write_set= 0; // Safety
}
@@ -6719,13 +7198,8 @@ void TABLE::mark_columns_needed_for_delete()
Field **reg_field;
for (reg_field= field ; *reg_field ; reg_field++)
{
- Field *cur_field= *reg_field;
- if (cur_field->flags & (PART_KEY_FLAG | PART_INDIRECT_KEY_FLAG))
- {
- bitmap_set_bit(read_set, cur_field->field_index);
- if (cur_field->vcol_info)
- bitmap_set_bit(vcol_set, cur_field->field_index);
- }
+ if ((*reg_field)->flags & (PART_KEY_FLAG | PART_INDIRECT_KEY_FLAG))
+ mark_column_with_deps(*reg_field);
}
need_signal= true;
}
@@ -6747,9 +7221,9 @@ void TABLE::mark_columns_needed_for_delete()
if (s->versioned)
{
- bitmap_set_bit(read_set, s->vers_start_field()->field_index);
- bitmap_set_bit(read_set, s->vers_end_field()->field_index);
- bitmap_set_bit(write_set, s->vers_end_field()->field_index);
+ bitmap_set_bit(read_set, s->vers.start_fieldno);
+ bitmap_set_bit(read_set, s->vers.end_fieldno);
+ bitmap_set_bit(write_set, s->vers.end_fieldno);
need_signal= true;
}
@@ -6781,7 +7255,6 @@ void TABLE::mark_columns_needed_for_update()
DBUG_ENTER("TABLE::mark_columns_needed_for_update");
bool need_signal= false;
- mark_columns_per_binlog_row_image();
if (triggers)
triggers->mark_fields_used(TRG_EVENT_UPDATE);
@@ -6805,13 +7278,7 @@ void TABLE::mark_columns_needed_for_update()
if (any_written && !all_read)
{
for (KEY_PART_INFO *kp= k->key_part; kp < kpend; kp++)
- {
- int idx= kp->fieldnr - 1;
- if (bitmap_fast_test_and_set(read_set, idx))
- continue;
- if (field[idx]->vcol_info)
- mark_virtual_col(field[idx]);
- }
+ mark_column_with_deps(field[kp->fieldnr - 1]);
}
}
need_signal= true;
@@ -6863,6 +7330,7 @@ void TABLE::mark_columns_needed_for_update()
bitmap_union(read_set, write_set);
need_signal= true;
}
+ mark_columns_per_binlog_row_image();
if (need_signal)
file->column_bitmaps_signal();
DBUG_VOID_RETURN;
@@ -6879,7 +7347,6 @@ void TABLE::mark_columns_needed_for_update()
void TABLE::mark_columns_needed_for_insert()
{
DBUG_ENTER("mark_columns_needed_for_insert");
- mark_columns_per_binlog_row_image();
if (triggers)
{
@@ -6899,6 +7366,7 @@ void TABLE::mark_columns_needed_for_insert()
/* Mark virtual columns for insert */
if (vfield)
mark_virtual_columns_for_write(TRUE);
+ mark_columns_per_binlog_row_image();
if (check_constraints)
mark_check_constraint_columns_for_read();
DBUG_VOID_RETURN;
@@ -7022,49 +7490,12 @@ void TABLE::mark_columns_per_binlog_row_image()
DBUG_ASSERT(FALSE);
}
}
- /*
- We have to ensure that all virtual columns that are part of read set
- are calculated.
- */
- if (vcol_set)
- bitmap_union(vcol_set, read_set);
file->column_bitmaps_signal();
}
DBUG_VOID_RETURN;
}
-/*
- @brief Mark a column as virtual used by the query
-
- @param field the field for the column to be marked
-
- @details
- The function marks the column for 'field' as virtual (computed)
- in the bitmap vcol_set.
- If the column is marked for the first time the expression to compute
- the column is traversed and all columns that are occurred there are
- marked in the read_set of the table.
-
- @retval
- TRUE if column is marked for the first time
- @retval
- FALSE otherwise
-*/
-
-bool TABLE::mark_virtual_col(Field *field)
-{
- bool res;
- DBUG_ASSERT(field->vcol_info);
- if (!(res= bitmap_fast_test_and_set(vcol_set, field->field_index)))
- {
- Item *vcol_item= field->vcol_info->expr;
- DBUG_ASSERT(vcol_item);
- vcol_item->walk(&Item::register_field_in_read_map, 1, 0);
- }
- return res;
-}
-
/*
@brief Mark virtual columns for update/insert commands
@@ -7106,13 +7537,13 @@ bool TABLE::mark_virtual_columns_for_write(bool insert_fl
{
tmp_vfield= *vfield_ptr;
if (bitmap_is_set(write_set, tmp_vfield->field_index))
- bitmap_updated|= mark_virtual_col(tmp_vfield);
+ bitmap_updated|= mark_virtual_column_with_deps(tmp_vfield);
else if (tmp_vfield->vcol_info->stored_in_db ||
(tmp_vfield->flags & (PART_KEY_FLAG | FIELD_IN_PART_FUNC_FLAG |
PART_INDIRECT_KEY_FLAG)))
{
bitmap_set_bit(write_set, tmp_vfield->field_index);
- mark_virtual_col(tmp_vfield);
+ mark_virtual_column_with_deps(tmp_vfield);
bitmap_updated= true;
}
}
@@ -7243,8 +7674,6 @@ void TABLE::mark_columns_used_by_virtual_fields(void)
void TABLE::mark_check_constraint_columns_for_read(void)
{
bitmap_union(read_set, s->check_set);
- if (vcol_set)
- bitmap_union(vcol_set, s->check_set);
}
@@ -8018,6 +8447,20 @@ public:
}
};
+
+/*
+ to satisfy marked_for_write_or_computed() Field's assert we temporarily
+ mark field for write before storing the generated value in it
+*/
+#ifdef DBUG_ASSERT_EXISTS
+#define DBUG_FIX_WRITE_SET(f) bool _write_set_fixed= !bitmap_fast_test_and_set(write_set, (f)->field_index)
+#define DBUG_RESTORE_WRITE_SET(f) if (_write_set_fixed) bitmap_clear_bit(write_set, (f)->field_index)
+#else
+#define DBUG_FIX_WRITE_SET(f)
+#define DBUG_RESTORE_WRITE_SET(f)
+#endif
+
+
/*
@brief Compute values for virtual columns used in query
@@ -8026,17 +8469,30 @@ public:
@details
The function computes the values of the virtual columns of the table and
stores them in the table record buffer.
+ This will be done even if is_error() is set either when function was called
+ or by calculating the virtual function, as most calls to this
+ function doesn't check the result. We also want to ensure that as many
+ fields as possible has the right value so that we can optionally
+ return the partly-faulty-row from a storage engine with a virtual
+ field that gives an error on storage for an existing row.
+
+ @todo
+ Ensure that all caller checks the value of this function and
+ either properly ignores it (and resets the error) or sends the
+ error forward to the caller.
@retval
0 Success
@retval
- >0 Error occurred when storing a virtual field value
+ >0 Error occurred when storing a virtual field value or potentially
+ is_error() was set when function was called.
*/
int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
{
DBUG_ENTER("TABLE::update_virtual_fields");
- DBUG_PRINT("enter", ("update_mode: %d", update_mode));
+ DBUG_PRINT("enter", ("update_mode: %d is_error: %d", update_mode,
+ in_use->is_error()));
Field **vfield_ptr, *vf;
Query_arena backup_arena;
Turn_errors_to_warnings_handler Suppress_errors;
@@ -8077,7 +8533,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
}
/* Iterate over virtual fields in the table */
- for (vfield_ptr= vfield; *vfield_ptr; vfield_ptr++)
+ for (vfield_ptr= vfield; *vfield_ptr ; vfield_ptr++)
{
vf= (*vfield_ptr);
Virtual_column_info *vcol_info= vf->vcol_info;
@@ -8088,17 +8544,17 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
switch (update_mode) {
case VCOL_UPDATE_FOR_READ:
update= (!vcol_info->stored_in_db &&
- bitmap_is_set(vcol_set, vf->field_index));
+ bitmap_is_set(read_set, vf->field_index));
swap_values= 1;
break;
case VCOL_UPDATE_FOR_DELETE:
case VCOL_UPDATE_FOR_WRITE:
- update= bitmap_is_set(vcol_set, vf->field_index);
+ update= bitmap_is_set(read_set, vf->field_index);
break;
case VCOL_UPDATE_FOR_REPLACE:
update= ((!vcol_info->stored_in_db &&
(vf->flags & (PART_KEY_FLAG | PART_INDIRECT_KEY_FLAG)) &&
- bitmap_is_set(vcol_set, vf->field_index)) ||
+ bitmap_is_set(read_set, vf->field_index)) ||
update_all_columns);
if (update && (vf->flags & BLOB_FLAG))
{
@@ -8118,17 +8574,20 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
/* Read indexed fields that was not updated in VCOL_UPDATE_FOR_READ */
update= (!vcol_info->stored_in_db &&
(vf->flags & (PART_KEY_FLAG | PART_INDIRECT_KEY_FLAG)) &&
- !bitmap_is_set(vcol_set, vf->field_index));
+ !bitmap_is_set(read_set, vf->field_index));
swap_values= 1;
break;
}
if (update)
{
- int field_error __attribute__((unused)) = 0;
/* Compute the actual value of the virtual fields */
- if (vcol_info->expr->save_in_field(vf, 0))
- field_error= 1;
+ DBUG_FIX_WRITE_SET(vf);
+# ifndef DBUG_OFF
+ int field_error=
+# endif
+ vcol_info->expr->save_in_field(vf, 0);
+ DBUG_RESTORE_WRITE_SET(vf);
DBUG_PRINT("info", ("field '%s' - updated error: %d",
vf->field_name.str, field_error));
if (swap_values && (vf->flags & BLOB_FLAG))
@@ -8169,7 +8628,9 @@ int TABLE::update_virtual_field(Field *vf)
in_use->set_n_backup_active_arena(expr_arena, &backup_arena);
bitmap_clear_all(&tmp_set);
vf->vcol_info->expr->walk(&Item::update_vcol_processor, 0, &tmp_set);
+ DBUG_FIX_WRITE_SET(vf);
vf->vcol_info->expr->save_in_field(vf, 0);
+ DBUG_RESTORE_WRITE_SET(vf);
in_use->restore_active_arena(expr_arena, &backup_arena);
in_use->pop_internal_handler();
DBUG_RETURN(count_errors.errors);
@@ -8236,6 +8697,81 @@ int TABLE::update_default_fields(bool ignore_errors)
DBUG_RETURN(res);
}
+int TABLE::update_generated_fields()
+{
+ int res= 0;
+ if (found_next_number_field)
+ {
+ next_number_field= found_next_number_field;
+ res= found_next_number_field->set_default();
+ if (likely(!res))
+ res= file->update_auto_increment();
+ }
+
+ if (likely(!res) && vfield)
+ res= update_virtual_fields(file, VCOL_UPDATE_FOR_WRITE);
+ if (likely(!res) && versioned())
+ vers_update_fields();
+ if (likely(!res))
+ res= verify_constraints(false) == VIEW_CHECK_ERROR;
+ return res;
+}
+
+int TABLE::period_make_insert(Item *src, Field *dst)
+{
+ THD *thd= in_use;
+
+ ulonglong prev_insert_id= file->next_insert_id;
+ store_record(this, record[1]);
+ int res= src->save_in_field(dst, true);
+
+ if (likely(!res))
+ res= update_generated_fields();
+
+ if (likely(!res) && triggers)
+ res= triggers->process_triggers(thd, TRG_EVENT_INSERT,
+ TRG_ACTION_BEFORE, true);
+
+ if (likely(!res))
+ res = file->ha_write_row(record[0]);
+
+ if (likely(!res) && triggers)
+ res= triggers->process_triggers(thd, TRG_EVENT_INSERT,
+ TRG_ACTION_AFTER, true);
+
+ restore_record(this, record[1]);
+ if (res)
+ file->restore_auto_increment(prev_insert_id);
+ return res;
+}
+
+int TABLE::insert_portion_of_time(THD *thd,
+ const vers_select_conds_t &period_conds,
+ ha_rows *rows_inserted)
+{
+ bool lcond= period_conds.field_start->val_datetime_packed(thd)
+ < period_conds.start.item->val_datetime_packed(thd);
+ bool rcond= period_conds.field_end->val_datetime_packed(thd)
+ > period_conds.end.item->val_datetime_packed(thd);
+
+ int res= 0;
+ if (lcond)
+ {
+ res= period_make_insert(period_conds.start.item,
+ field[s->period.end_fieldno]);
+ if (likely(!res))
+ ++*rows_inserted;
+ }
+ if (likely(!res) && rcond)
+ {
+ res= period_make_insert(period_conds.end.item,
+ field[s->period.start_fieldno]);
+ if (likely(!res))
+ ++*rows_inserted;
+ }
+
+ return res;
+}
void TABLE::evaluate_update_default_function()
{
@@ -8877,199 +9413,72 @@ double KEY::actual_rec_per_key(uint i)
read_stats->get_avg_frequency(i) : (double) rec_per_key[i]);
}
+/*
+ find total number of field in hash expr
+*/
+int fields_in_hash_keyinfo(KEY *keyinfo)
+{
+ Item_func_hash * temp= (Item_func_hash *)
+ keyinfo->key_part->field->vcol_info->expr;
+ return temp->argument_count();
+}
+/*
+ setup_keyinfo_hash changes the key_info->key_part
+ to be same as defined by user
+ */
+void setup_keyinfo_hash(KEY *key_info)
+{
+ DBUG_ASSERT(key_info->algorithm == HA_KEY_ALG_LONG_HASH);
+ DBUG_ASSERT(key_info->key_part->field->flags & LONG_UNIQUE_HASH_FIELD);
+ uint no_of_keyparts= fields_in_hash_keyinfo(key_info);
+ key_info->key_part-= no_of_keyparts;
+ key_info->user_defined_key_parts= key_info->usable_key_parts=
+ key_info->ext_key_parts= no_of_keyparts;
+ key_info->flags|= HA_NOSAME;
+}
+/*
+ re_setup_keyinfo_hash reverts th setup_keyinfo_hash and this type of
+ arrangement is expected by storage engine
+ */
+void re_setup_keyinfo_hash(KEY *key_info)
+{
+ DBUG_ASSERT(key_info->algorithm == HA_KEY_ALG_LONG_HASH);
+ DBUG_ASSERT(!(key_info->key_part->field->flags & LONG_UNIQUE_HASH_FIELD));
+ while(!(key_info->key_part->field->flags & LONG_UNIQUE_HASH_FIELD))
+ key_info->key_part++;
+ key_info->user_defined_key_parts= key_info->usable_key_parts=
+ key_info->ext_key_parts= 1;
+ key_info->flags&= ~HA_NOSAME;
+}
/**
- @brief
- Mark subformulas of a condition unusable for the condition pushed into table
-
- @param cond The condition whose subformulas are to be marked
-
- @details
- This method recursively traverses the AND-OR condition cond and for each subformula
- of the codition it checks whether it can be usable for the extraction of a condition
- that can be pushed into this table. The subformulas that are not usable are
- marked with the flag NO_EXTRACTION_FL.
- @note
- This method is called before any call of TABLE_LIST::build_pushable_cond_for_table.
- The flag NO_EXTRACTION_FL set in a subformula allows to avoid building clone
- for the subformula when extracting the pushable condition.
-*/
-
-void TABLE_LIST::check_pushable_cond_for_table(Item *cond)
+ @brief clone of current handler.
+ Creates a clone of handler used in update for
+ unique hash key.
+*/
+void TABLE::clone_handler_for_update()
{
- table_map tab_map= table->map;
- cond->clear_extraction_flag();
- if (cond->type() == Item::COND_ITEM)
- {
- bool and_cond= ((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC;
- List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
- uint count= 0;
- Item *item;
- while ((item=li++))
- {
- check_pushable_cond_for_table(item);
- if (item->get_extraction_flag() != NO_EXTRACTION_FL)
- count++;
- else if (!and_cond)
- break;
- }
- if ((and_cond && count == 0) || item)
- {
- cond->set_extraction_flag(NO_EXTRACTION_FL);
- if (and_cond)
- li.rewind();
- while ((item= li++))
- item->clear_extraction_flag();
- }
- }
- else if (!cond->excl_dep_on_table(tab_map))
- cond->set_extraction_flag(NO_EXTRACTION_FL);
+ if (this->update_handler)
+ return;
+ handler *update_handler= NULL;
+ if (!s->long_unique_table)
+ return;
+ update_handler= file->clone(s->normalized_path.str,
+ in_use->mem_root);
+ update_handler->ha_external_lock(in_use, F_RDLCK);
+ this->update_handler= update_handler;
+ return;
}
-
/**
- @brief
- Build condition extractable from the given one depended only on this table
-
- @param thd The thread handle
- @param cond The condition from which the pushable one is to be extracted
-
- @details
- For the given condition cond this method finds out what condition depended
- only on this table can be extracted from cond. If such condition C exists
- the method builds the item for it.
- The method uses the flag NO_EXTRACTION_FL set by the preliminary call of
- the method TABLE_LIST::check_pushable_cond_for_table to figure out whether
- a subformula depends only on this table or not.
- @note
- The built condition C is always implied by the condition cond
- (cond => C). The method tries to build the most restictive such
- condition (i.e. for any other condition C' such that cond => C'
- we have C => C').
- @note
- The build item is not ready for usage: substitution for the field items
- has to be done and it has to be re-fixed.
-
- @retval
- the built condition pushable into this table if such a condition exists
- NULL if there is no such a condition
-*/
-
-Item* TABLE_LIST::build_pushable_cond_for_table(THD *thd, Item *cond)
+ @brief Deletes update handler object
+*/
+void TABLE::delete_update_handler()
{
- table_map tab_map= table->map;
- bool is_multiple_equality= cond->type() == Item::FUNC_ITEM &&
- ((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC;
- if (cond->get_extraction_flag() == NO_EXTRACTION_FL)
- return 0;
- if (cond->type() == Item::COND_ITEM)
- {
- bool cond_and= false;
- Item_cond *new_cond;
- if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
- {
- cond_and= true;
- new_cond=new (thd->mem_root) Item_cond_and(thd);
- }
- else
- new_cond= new (thd->mem_root) Item_cond_or(thd);
- if (!new_cond)
- return 0;
- List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
- Item *item;
- bool is_fix_needed= false;
- while ((item=li++))
- {
- if (item->get_extraction_flag() == NO_EXTRACTION_FL)
- {
- if (!cond_and)
- return 0;
- continue;
- }
- Item *fix= build_pushable_cond_for_table(thd, item);
- if (!fix && !cond_and)
- return 0;
- if (!fix)
- continue;
-
- if (fix->type() == Item::COND_ITEM &&
- ((Item_cond*) fix)->functype() == Item_func::COND_AND_FUNC)
- is_fix_needed= true;
-
- new_cond->argument_list()->push_back(fix, thd->mem_root);
- }
- if (is_fix_needed && new_cond->fix_fields(thd, 0))
- return 0;
-
- switch (new_cond->argument_list()->elements)
- {
- case 0:
- return 0;
- case 1:
- return new_cond->argument_list()->head();
- default:
- return new_cond;
- }
- }
- else if (is_multiple_equality)
- {
- if (!(cond->used_tables() & tab_map))
- return 0;
- Item *new_cond= NULL;
- int i= 0;
- Item_equal *item_equal= (Item_equal *) cond;
- Item *left_item = item_equal->get_const();
- Item_equal_fields_iterator it(*item_equal);
- Item *item;
- if (!left_item)
- {
- while ((item=it++))
- if (item->used_tables() == tab_map)
- {
- left_item= item;
- break;
- }
- }
- if (!left_item)
- return 0;
- while ((item=it++))
- {
- if (!(item->used_tables() == tab_map))
- continue;
- Item_func_eq *eq= 0;
- Item *left_item_clone= left_item->build_clone(thd);
- Item *right_item_clone= item->build_clone(thd);
- if (left_item_clone && right_item_clone)
- {
- left_item_clone->set_item_equal(NULL);
- right_item_clone->set_item_equal(NULL);
- eq= new (thd->mem_root) Item_func_eq(thd, right_item_clone,
- left_item_clone);
- }
- if (eq)
- {
- i++;
- switch (i)
- {
- case 1:
- new_cond= eq;
- break;
- case 2:
- new_cond= new (thd->mem_root) Item_cond_and(thd, new_cond, eq);
- break;
- default:
- ((Item_cond_and*)new_cond)->argument_list()->push_back(eq,
- thd->mem_root);
- }
- }
- }
- if (new_cond)
- new_cond->fix_fields(thd, &new_cond);
- return new_cond;
- }
- else if (cond->get_extraction_flag() != NO_EXTRACTION_FL)
- return cond->build_clone(thd);
- return 0;
+ update_handler->ha_external_lock(in_use, F_UNLCK);
+ update_handler->ha_close();
+ delete update_handler;
+ this->update_handler= NULL;
}
LEX_CSTRING *fk_option_name(enum_fk_option opt)
@@ -9180,7 +9589,7 @@ bool TR_table::query(ulonglong trx_id)
READ_RECORD info;
int error;
List<TABLE_LIST> dummy;
- SELECT_LEX &slex= thd->lex->select_lex;
+ SELECT_LEX &slex= *(thd->lex->first_select_lex());
Name_resolution_context_backup backup(slex.context, *this);
Item *field= newx Item_field(thd, &slex.context, (*this)[FLD_TRX_ID]);
Item *value= newx Item_int(thd, trx_id);
@@ -9214,10 +9623,11 @@ bool TR_table::query(MYSQL_TIME &commit_time, bool backwards)
READ_RECORD info;
int error;
List<TABLE_LIST> dummy;
- SELECT_LEX &slex= thd->lex->select_lex;
+ SELECT_LEX &slex= *(thd->lex->first_select_lex());
Name_resolution_context_backup backup(slex.context, *this);
Item *field= newx Item_field(thd, &slex.context, (*this)[FLD_COMMIT_TS]);
- Item *value= newx Item_datetime_literal(thd, &commit_time, 6);
+ Datetime dt(&commit_time);
+ Item *value= newx Item_datetime_literal(thd, &dt, 6);
COND *conds;
if (backwards)
conds= newx Item_func_ge(thd, field, value);
@@ -9244,7 +9654,7 @@ bool TR_table::query(MYSQL_TIME &commit_time, bool backwards)
if (res > 0)
{
MYSQL_TIME commit_ts;
- if ((*this)[FLD_COMMIT_TS]->get_date(&commit_ts, 0))
+ if ((*this)[FLD_COMMIT_TS]->get_date(&commit_ts, date_mode_t(0)))
{
found= false;
break;
@@ -9465,7 +9875,8 @@ bool Vers_history_point::resolve_unit(THD *thd)
return false;
if (item->fix_fields_if_needed(thd, &item))
return true;
- return item->this_item()->type_handler_for_system_time()->
+ return item->this_item()->real_type_handler()->
+ type_handler_for_system_time()->
Vers_history_point_resolve_unit(thd, this);
}
diff --git a/sql/table.h b/sql/table.h
index 097deca46b2..3f750e7b221 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -25,6 +25,7 @@
#ifndef MYSQL_CLIENT
+#include "my_cpu.h" /* LF_BACKOFF() */
#include "hash.h" /* HASH */
#include "handler.h" /* row_type, ha_choice, handler */
#include "mysql_com.h" /* enum_field_types */
@@ -55,6 +56,9 @@ class Virtual_column_info;
class Table_triggers_list;
class TMP_TABLE_PARAM;
class SEQUENCE;
+class Range_rowid_filter_cost_info;
+class derived_handler;
+class Pushdown_derived;
struct Name_resolution_context;
/*
@@ -361,9 +365,18 @@ enum field_visibility_t {
INVISIBLE_FULL
};
-#define INVISIBLE_MAX_BITS 3
+#define INVISIBLE_MAX_BITS 3
+#define HA_HASH_FIELD_LENGTH 8
+#define HA_HASH_KEY_LENGTH_WITHOUT_NULL 8
+#define HA_HASH_KEY_LENGTH_WITH_NULL 9
+int fields_in_hash_keyinfo(KEY *keyinfo);
+
+void setup_keyinfo_hash(KEY *key_info);
+
+void re_setup_keyinfo_hash(KEY *key_info);
+
/**
Category of table found in the table share.
*/
@@ -410,28 +423,6 @@ enum enum_table_category
TABLE_CATEGORY_SYSTEM=3,
/**
- Information schema tables.
- These tables are an interface provided by the system
- to inspect the system metadata.
- These tables do *not* honor:
- - LOCK TABLE t FOR READ/WRITE
- - FLUSH TABLES WITH READ LOCK
- - SET GLOBAL READ_ONLY = ON
- as there is no point in locking explicitly
- an INFORMATION_SCHEMA table.
- Nothing is directly written to information schema tables.
- Note that this value is not used currently,
- since information schema tables are not shared,
- but implemented as session specific temporary tables.
- */
- /*
- TODO: Fixing the performance issues of I_S will lead
- to I_S tables in the table cache, which should use
- this table type.
- */
- TABLE_CATEGORY_INFORMATION=4,
-
- /**
Log tables.
These tables are an interface provided by the system
to inspect the system logs.
@@ -451,7 +442,33 @@ enum enum_table_category
The server implementation perform writes.
Log tables are cached in the table cache.
*/
- TABLE_CATEGORY_LOG=5,
+ TABLE_CATEGORY_LOG=4,
+
+ /*
+ Types below are read only tables, not affected by FLUSH TABLES or
+ MDL locks.
+ */
+ /**
+ Information schema tables.
+ These tables are an interface provided by the system
+ to inspect the system metadata.
+ These tables do *not* honor:
+ - LOCK TABLE t FOR READ/WRITE
+ - FLUSH TABLES WITH READ LOCK
+ - SET GLOBAL READ_ONLY = ON
+ as there is no point in locking explicitly
+ an INFORMATION_SCHEMA table.
+ Nothing is directly written to information schema tables.
+ Note that this value is not used currently,
+ since information schema tables are not shared,
+ but implemented as session specific temporary tables.
+ */
+ /*
+ TODO: Fixing the performance issues of I_S will lead
+ to I_S tables in the table cache, which should use
+ this table type.
+ */
+ TABLE_CATEGORY_INFORMATION=5,
/**
Performance schema tables.
@@ -475,6 +492,7 @@ enum enum_table_category
*/
TABLE_CATEGORY_PERFORMANCE=6
};
+
typedef enum enum_table_category TABLE_CATEGORY;
TABLE_CATEGORY get_table_category(const LEX_CSTRING *db,
@@ -811,6 +829,7 @@ struct TABLE_SHARE
bool null_field_first;
bool system; /* Set if system table (one record) */
bool not_usable_by_query_cache;
+ bool online_backup; /* Set if on-line backup supported */
/*
This is used by log tables, for tables that have their own internal
binary logging or for tables that doesn't support statement or row logging
@@ -824,6 +843,8 @@ struct TABLE_SHARE
bool non_determinstic_insert;
bool has_update_default_function;
bool can_do_row_logging; /* 1 if table supports RBR */
+ bool long_unique_table;
+
ulong table_map_id; /* for row-based replication */
/*
@@ -853,20 +874,38 @@ struct TABLE_SHARE
/**
System versioning support.
- */
+ */
+ struct period_info_t
+ {
+ uint16 start_fieldno;
+ uint16 end_fieldno;
+ Lex_ident name;
+ Lex_ident constr_name;
+ Field *start_field(TABLE_SHARE *s) const
+ {
+ return s->field[start_fieldno];
+ }
+ Field *end_field(TABLE_SHARE *s) const
+ {
+ return s->field[end_fieldno];
+ }
+ };
vers_sys_type_t versioned;
- uint16 row_start_field;
- uint16 row_end_field;
+ period_info_t vers;
+ period_info_t period;
+
+ bool init_period_from_extra2(period_info_t *period, const uchar *data,
+ const uchar *end);
Field *vers_start_field()
{
- return field[row_start_field];
+ return field[vers.start_fieldno];
}
Field *vers_end_field()
{
- return field[row_end_field];
+ return field[vers.end_fieldno];
}
/**
@@ -1081,8 +1120,12 @@ struct TABLE_SHARE
/* frees the memory allocated in read_frm_image */
void free_frm_image(const uchar *frm);
+
+ void set_overlapped_keys();
};
+/* not NULL, but cannot be dereferenced */
+#define UNUSABLE_TABLE_SHARE ((TABLE_SHARE*)1)
/**
Class is used as a BLOB field value storage for
@@ -1149,11 +1192,10 @@ struct st_cond_statistic;
#define CHECK_ROW_FOR_NULLS_TO_REJECT (1 << 0)
#define REJECT_ROW_DUE_TO_NULL_FIELDS (1 << 1)
-/* Bitmap of table's fields */
-typedef Bitmap<MAX_FIELDS> Field_map;
-
class SplM_opt_info;
+struct vers_select_conds_t;
+
struct TABLE
{
TABLE() {} /* Remove gcc warning */
@@ -1179,6 +1221,9 @@ public:
THD *in_use; /* Which thread uses this */
uchar *record[3]; /* Pointer to records */
+ /* record buf to resolve hash collisions for long UNIQUE constraints */
+ uchar *check_unique_buf;
+ handler *update_handler; /* Handler used in case of update */
uchar *write_row_record; /* Used as optimisation in
THD::write_row */
uchar *insert_values; /* used by INSERT ... UPDATE */
@@ -1204,6 +1249,8 @@ public:
key_map keys_in_use_for_group_by;
/* Map of keys that can be used to calculate ORDER BY without sorting */
key_map keys_in_use_for_order_by;
+ /* Map of keys dependent on some constraint */
+ key_map constraint_dependent_keys;
KEY *key_info; /* data of keys in database */
Field **field; /* Pointer to fields */
@@ -1235,8 +1282,6 @@ public:
MY_BITMAP cond_set; /* used to mark fields from sargable conditions*/
/* Active column sets */
MY_BITMAP *read_set, *write_set, *rpl_write_set;
- /* Set if using virtual fields */
- MY_BITMAP *vcol_set, *def_vcol_set;
/* On INSERT: fields that the user specified a value for */
MY_BITMAP has_value_set;
@@ -1274,7 +1319,14 @@ public:
and max #key parts that range access would use.
*/
ha_rows quick_rows[MAX_KEY];
+ uint quick_key_parts[MAX_KEY];
+
double quick_costs[MAX_KEY];
+ /*
+ If there is a range access by i-th index then the cost of
+ index only access for it is stored in quick_index_only_costs[i]
+ */
+ double quick_index_only_costs[MAX_KEY];
/*
Bitmaps of key parts that =const for the duration of join execution. If
@@ -1283,8 +1335,7 @@ public:
*/
key_part_map const_key_parts[MAX_KEY];
- uint quick_key_parts[MAX_KEY];
- uint quick_n_ranges[MAX_KEY];
+ uint quick_n_ranges[MAX_KEY];
/*
Estimate of number of records that satisfy SARGable part of the table
@@ -1474,7 +1525,9 @@ public:
void mark_columns_needed_for_delete(void);
void mark_columns_needed_for_insert(void);
void mark_columns_per_binlog_row_image(void);
- bool mark_virtual_col(Field *field);
+ inline bool mark_column_with_deps(Field *field);
+ inline bool mark_virtual_column_with_deps(Field *field);
+ inline void mark_virtual_column_deps(Field *field);
bool mark_virtual_columns_for_write(bool insert_fl);
bool check_virtual_columns_marked_for_read();
bool check_virtual_columns_marked_for_write();
@@ -1496,39 +1549,21 @@ public:
if (file)
file->column_bitmaps_signal();
}
- inline void column_bitmaps_set(MY_BITMAP *read_set_arg,
- MY_BITMAP *write_set_arg,
- MY_BITMAP *vcol_set_arg)
- {
- read_set= read_set_arg;
- write_set= write_set_arg;
- vcol_set= vcol_set_arg;
- if (file)
- file->column_bitmaps_signal();
- }
inline void column_bitmaps_set_no_signal(MY_BITMAP *read_set_arg,
MY_BITMAP *write_set_arg)
{
read_set= read_set_arg;
write_set= write_set_arg;
}
- inline void column_bitmaps_set_no_signal(MY_BITMAP *read_set_arg,
- MY_BITMAP *write_set_arg,
- MY_BITMAP *vcol_set_arg)
- {
- read_set= read_set_arg;
- write_set= write_set_arg;
- vcol_set= vcol_set_arg;
- }
inline void use_all_columns()
{
column_bitmaps_set(&s->all_set, &s->all_set);
}
+ inline void use_all_stored_columns();
inline void default_column_bitmaps()
{
read_set= &def_read_set;
write_set= &def_write_set;
- vcol_set= def_vcol_set; /* Note that this may be 0 */
rpl_write_set= 0;
}
/** Should this instance of the table be reopened? */
@@ -1623,6 +1658,23 @@ public:
double get_materialization_cost(); // Now used only if is_splittable()==true
void add_splitting_info_for_key_field(struct KEY_FIELD *key_field);
+ key_map with_impossible_ranges;
+
+ /* Number of cost info elements for possible range filters */
+ uint range_rowid_filter_cost_info_elems;
+ /* Pointer to the array of cost info elements for range filters */
+ Range_rowid_filter_cost_info *range_rowid_filter_cost_info;
+ /* The array of pointers to cost info elements for range filters */
+ Range_rowid_filter_cost_info **range_rowid_filter_cost_info_ptr;
+
+ void init_cost_info_for_usable_range_rowid_filters(THD *thd);
+ void prune_range_rowid_filters();
+ void trace_range_rowid_filters(THD *thd) const;
+ Range_rowid_filter_cost_info *
+ best_range_rowid_filter_for_partial_join(uint access_key_no,
+ double records,
+ double access_cost_factor);
+
/**
System Versioning support
*/
@@ -1657,18 +1709,22 @@ public:
Field *vers_start_field() const
{
DBUG_ASSERT(s && s->versioned);
- return field[s->row_start_field];
+ return field[s->vers.start_fieldno];
}
Field *vers_end_field() const
{
DBUG_ASSERT(s && s->versioned);
- return field[s->row_end_field];
+ return field[s->vers.end_fieldno];
}
ulonglong vers_start_id() const;
ulonglong vers_end_id() const;
+ int update_generated_fields();
+ int period_make_insert(Item *src, Field *dst);
+ int insert_portion_of_time(THD *thd, const vers_select_conds_t &period_conds,
+ ha_rows *rows_inserted);
bool vers_check_update(List<Item> &items);
int delete_row();
@@ -1676,6 +1732,9 @@ public:
void vers_update_fields();
/* Used in DELETE, DUP REPLACE and insert history row */
void vers_update_end();
+ void find_constraint_correlated_indexes();
+ void clone_handler_for_update();
+ void delete_update_handler();
/** Number of additional fields used in versioned tables */
#define VERSIONING_FIELDS 2
@@ -1872,6 +1931,13 @@ class IS_table_read_plan;
/** The threshold size a blob field buffer before it is freed */
#define MAX_TDC_BLOB_SIZE 65536
+/** number of bytes used by field positional indexes in frm */
+constexpr uint frm_fieldno_size= 2;
+static inline uint16 read_frm_fieldno(const uchar *data)
+{ return uint2korr(data); }
+static inline void store_frm_fieldno(const uchar *data, uint16 fieldno)
+{ int2store(data, fieldno); }
+
class select_unit;
class TMP_TABLE_PARAM;
@@ -1983,6 +2049,12 @@ struct vers_select_conds_t
bool delete_history:1;
Vers_history_point start;
Vers_history_point end;
+ Lex_ident name;
+
+ Item_field *field_start;
+ Item_field *field_end;
+
+ const TABLE_SHARE::period_info_t *period;
void empty()
{
@@ -1996,7 +2068,8 @@ struct vers_select_conds_t
void init(vers_system_time_t _type,
Vers_history_point _start= Vers_history_point(),
- Vers_history_point _end= Vers_history_point())
+ Vers_history_point _end= Vers_history_point(),
+ Lex_ident _name= "SYSTEM_TIME")
{
type= _type;
orig_type= _type;
@@ -2005,6 +2078,13 @@ struct vers_select_conds_t
type == SYSTEM_TIME_BEFORE);
start= _start;
end= _end;
+ name= _name;
+ }
+
+ void set_all()
+ {
+ type= SYSTEM_TIME_ALL;
+ name= "SYSTEM_TIME";
}
void print(String *str, enum_query_type query_type) const;
@@ -2135,6 +2215,7 @@ struct TABLE_LIST
init_one_table(&table_arg->s->db, &table_arg->s->table_name,
NULL, lock_type);
table= table_arg;
+ vers_conditions.name= table->s->vers.name;
}
inline void init_one_table_for_prelocking(const LEX_CSTRING *db_arg,
@@ -2314,6 +2395,15 @@ struct TABLE_LIST
TABLE_LIST * next_with_rec_ref;
bool is_derived_with_recursive_reference;
bool block_handle_derived;
+ /* The interface employed to materialize the table by a foreign engine */
+ derived_handler *dt_handler;
+ /* The text of the query specifying the derived table */
+ LEX_CSTRING derived_spec;
+ /*
+ The object used to organize execution of the query that specifies
+ the derived table by a foreign engine
+ */
+ Pushdown_derived *pushdown_derived;
ST_SCHEMA_TABLE *schema_table; /* Information_schema table */
st_select_lex *schema_select_lex;
/*
@@ -2592,6 +2682,12 @@ struct TABLE_LIST
/* System Versioning */
vers_select_conds_t vers_conditions;
+ vers_select_conds_t period_conditions;
+
+ bool has_period() const
+ {
+ return period_conditions.is_set();
+ }
my_bool for_insert_data;
@@ -2796,8 +2892,9 @@ struct TABLE_LIST
return false;
}
void set_lock_type(THD* thd, enum thr_lock_type lock);
- void check_pushable_cond_for_table(Item *cond);
- Item *build_pushable_cond_for_table(THD *thd, Item *cond);
+
+ derived_handler *find_derived_handler(THD *thd);
+ TABLE_LIST *get_first_table();
void remove_join_columns()
{
@@ -3117,6 +3214,7 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
uint ha_open_flags, TABLE *outparam,
bool is_create_table,
List<String> *partitions_to_open= NULL);
+bool copy_keys_from_share(TABLE *outparam, MEM_ROOT *root);
bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
bool *error_reported, vcol_init_mode expr);
TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
@@ -3133,6 +3231,7 @@ void open_table_error(TABLE_SHARE *share, enum open_frm_error error,
void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form);
bool check_db_name(LEX_STRING *db);
bool check_column_name(const char *name);
+bool check_period_name(const char *name);
bool check_table_name(const char *name, size_t length, bool check_for_path_chars);
int rename_file_ext(const char * from,const char * to,const char * ext);
char *get_field(MEM_ROOT *mem, Field *field);
@@ -3172,7 +3271,7 @@ extern LEX_CSTRING INFORMATION_SCHEMA_NAME;
extern LEX_CSTRING MYSQL_SCHEMA_NAME;
/* table names */
-extern LEX_CSTRING MYSQL_USER_NAME, MYSQL_DB_NAME, MYSQL_PROC_NAME;
+extern LEX_CSTRING MYSQL_PROC_NAME;
inline bool is_infoschema_db(const LEX_CSTRING *name)
{
diff --git a/sql/table_cache.cc b/sql/table_cache.cc
index c1ae89f85ed..15255c56083 100644
--- a/sql/table_cache.cc
+++ b/sql/table_cache.cc
@@ -56,8 +56,8 @@
ulong tdc_size; /**< Table definition cache threshold for LRU eviction. */
ulong tc_size; /**< Table cache threshold for LRU eviction. */
uint32 tc_instances;
-uint32 tc_active_instances= 1;
-static uint32 tc_contention_warning_reported;
+static std::atomic<uint32_t> tc_active_instances(1);
+static std::atomic<bool> tc_contention_warning_reported;
/** Data collections. */
static LF_HASH tdc_hash; /**< Collection of TABLE_SHARE objects. */
@@ -163,7 +163,7 @@ struct Table_cache_instance
overhead on TABLE object release. All other table cache mutex acquistions
are considered out of hot path and are not instrumented either.
*/
- void lock_and_check_contention(uint32 n_instances, uint32 instance)
+ void lock_and_check_contention(uint32_t n_instances, uint32_t instance)
{
if (mysql_mutex_trylock(&LOCK_table_cache))
{
@@ -172,11 +172,10 @@ struct Table_cache_instance
{
if (n_instances < tc_instances)
{
- if (my_atomic_cas32_weak_explicit((int32*) &tc_active_instances,
- (int32*) &n_instances,
- (int32) n_instances + 1,
- MY_MEMORY_ORDER_RELAXED,
- MY_MEMORY_ORDER_RELAXED))
+ if (tc_active_instances.
+ compare_exchange_weak(n_instances, n_instances + 1,
+ std::memory_order_relaxed,
+ std::memory_order_relaxed))
{
sql_print_information("Detected table cache mutex contention at instance %d: "
"%d%% waits. Additional table cache instance "
@@ -187,8 +186,8 @@ struct Table_cache_instance
n_instances + 1);
}
}
- else if (!my_atomic_fas32_explicit((int32*) &tc_contention_warning_reported,
- 1, MY_MEMORY_ORDER_RELAXED))
+ else if (!tc_contention_warning_reported.exchange(true,
+ std::memory_order_relaxed))
{
sql_print_warning("Detected table cache mutex contention at instance %d: "
"%d%% waits. Additional table cache instance "
@@ -232,7 +231,7 @@ static void intern_close_table(TABLE *table)
uint tc_records(void)
{
ulong total= 0;
- for (ulong i= 0; i < tc_instances; i++)
+ for (uint32 i= 0; i < tc_instances; i++)
{
mysql_mutex_lock(&tc[i].LOCK_table_cache);
total+= tc[i].records;
@@ -277,7 +276,7 @@ static void tc_remove_all_unused_tables(TDC_element *element,
*/
if (mark_flushed)
element->flushed= true;
- for (ulong i= 0; i < tc_instances; i++)
+ for (uint32 i= 0; i < tc_instances; i++)
{
mysql_mutex_lock(&tc[i].LOCK_table_cache);
while ((table= element->free_tables[i].list.pop_front()))
@@ -354,8 +353,8 @@ void tc_purge(bool mark_flushed)
void tc_add_table(THD *thd, TABLE *table)
{
- uint32 i= thd->thread_id % my_atomic_load32_explicit((int32*) &tc_active_instances,
- MY_MEMORY_ORDER_RELAXED);
+ uint32_t i=
+ thd->thread_id % tc_active_instances.load(std::memory_order_relaxed);
TABLE *LRU_table= 0;
TDC_element *element= table->s->tdc;
@@ -406,12 +405,10 @@ void tc_add_table(THD *thd, TABLE *table)
@return TABLE object, or NULL if no unused objects.
*/
-static TABLE *tc_acquire_table(THD *thd, TDC_element *element)
+TABLE *tc_acquire_table(THD *thd, TDC_element *element)
{
- uint32 n_instances=
- my_atomic_load32_explicit((int32*) &tc_active_instances,
- MY_MEMORY_ORDER_RELAXED);
- uint32 i= thd->thread_id % n_instances;
+ uint32_t n_instances= tc_active_instances.load(std::memory_order_relaxed);
+ uint32_t i= thd->thread_id % n_instances;
TABLE *table;
tc[i].lock_and_check_contention(n_instances, i);
@@ -491,7 +488,7 @@ static void tdc_assert_clean_share(TDC_element *element)
DBUG_ASSERT(element->m_flush_tickets.is_empty());
DBUG_ASSERT(element->all_tables.is_empty());
#ifndef DBUG_OFF
- for (ulong i= 0; i < tc_instances; i++)
+ for (uint32 i= 0; i < tc_instances; i++)
DBUG_ASSERT(element->free_tables[i].list.is_empty());
#endif
DBUG_ASSERT(element->all_tables_refs == 0);
@@ -564,7 +561,7 @@ static void lf_alloc_constructor(uchar *arg)
mysql_cond_init(key_TABLE_SHARE_COND_release, &element->COND_release, 0);
element->m_flush_tickets.empty();
element->all_tables.empty();
- for (ulong i= 0; i < tc_instances; i++)
+ for (uint32 i= 0; i < tc_instances; i++)
element->free_tables[i].list.empty();
element->all_tables_refs= 0;
element->share= 0;
@@ -645,7 +642,7 @@ bool tdc_init(void)
void tdc_start_shutdown(void)
{
- DBUG_ENTER("table_def_start_shutdown");
+ DBUG_ENTER("tdc_start_shutdown");
if (tdc_inited)
{
/*
@@ -657,7 +654,7 @@ void tdc_start_shutdown(void)
tdc_size= 0;
tc_size= 0;
/* Free all cached but unused TABLEs and TABLE_SHAREs. */
- close_cached_tables(NULL, NULL, FALSE, LONG_TIMEOUT);
+ purge_tables(true);
}
DBUG_VOID_RETURN;
}
@@ -689,7 +686,7 @@ void tdc_deinit(void)
ulong tdc_records(void)
{
- return my_atomic_load32_explicit(&tdc_hash.count, MY_MEMORY_ORDER_RELAXED);
+ return lf_hash_size(&tdc_hash);
}
@@ -945,7 +942,7 @@ end:
table existed?
Let's return an invalid pointer here to catch dereferencing attempts.
*/
- share= (TABLE_SHARE*) 1;
+ share= UNUSABLE_TABLE_SHARE;
}
DBUG_RETURN(share);
@@ -1094,6 +1091,7 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
TABLE *table;
TDC_element *element;
uint my_refs= 1;
+ bool res= false;
DBUG_ENTER("tdc_remove_table");
DBUG_PRINT("enter",("name: %s remove_type: %d", table_name, remove_type));
@@ -1101,7 +1099,6 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name,
MDL_EXCLUSIVE));
-
mysql_mutex_lock(&LOCK_unused_shares);
if (!(element= tdc_lock_share(thd, db, table_name)))
{
@@ -1123,7 +1120,7 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
mysql_mutex_unlock(&LOCK_unused_shares);
tdc_delete_share_from_hash(element);
- DBUG_RETURN(true);
+ DBUG_RETURN(false);
}
mysql_mutex_unlock(&LOCK_unused_shares);
@@ -1189,10 +1186,16 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
#endif
mysql_mutex_unlock(&element->LOCK_table_share);
}
+ else
+ {
+ mysql_mutex_lock(&element->LOCK_table_share);
+ res= element->ref_count > 1;
+ mysql_mutex_unlock(&element->LOCK_table_share);
+ }
tdc_release_share(element->share);
- DBUG_RETURN(true);
+ DBUG_RETURN(res);
}
@@ -1336,3 +1339,14 @@ int tdc_iterate(THD *thd, my_hash_walk_action action, void *argument,
}
return res;
}
+
+
+int show_tc_active_instances(THD *thd, SHOW_VAR *var, char *buff,
+ enum enum_var_type scope)
+{
+ var->type= SHOW_UINT;
+ var->value= buff;
+ *(reinterpret_cast<uint32_t*>(buff))=
+ tc_active_instances.load(std::memory_order_relaxed);
+ return 0;
+}
diff --git a/sql/table_cache.h b/sql/table_cache.h
index b2790e44b6e..3be7b5fe413 100644
--- a/sql/table_cache.h
+++ b/sql/table_cache.h
@@ -71,7 +71,6 @@ enum enum_tdc_remove_table_type
extern ulong tdc_size;
extern ulong tc_size;
extern uint32 tc_instances;
-extern uint32 tc_active_instances;
extern bool tdc_init(void);
extern void tdc_start_shutdown(void);
@@ -88,7 +87,6 @@ extern bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
const char *db, const char *table_name,
bool kill_delayed_threads);
-
extern int tdc_wait_for_old_version(THD *thd, const char *db,
const char *table_name,
ulong wait_timeout, uint deadlock_weight,
@@ -99,9 +97,12 @@ extern int tdc_iterate(THD *thd, my_hash_walk_action action, void *argument,
bool no_dups= false);
extern uint tc_records(void);
+int show_tc_active_instances(THD *thd, SHOW_VAR *var, char *buff,
+ enum enum_var_type scope);
extern void tc_purge(bool mark_flushed= false);
extern void tc_add_table(THD *thd, TABLE *table);
extern void tc_release_table(TABLE *table);
+extern TABLE *tc_acquire_table(THD *thd, TDC_element *element);
/**
Create a table cache key for non-temporary table.
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc
index 8cae54f6a54..05e32d78b7f 100644
--- a/sql/temporary_tables.cc
+++ b/sql/temporary_tables.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2016, 2019, MariaDB Corporation.
+ Copyright (c) 2016, 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
@@ -49,23 +49,18 @@ bool THD::has_thd_temporary_tables()
/**
Create a temporary table, open it and return the TABLE handle.
- @param hton [IN] Handlerton
@param frm [IN] Binary frm image
@param path [IN] File path (without extension)
@param db [IN] Schema name
@param table_name [IN] Table name
- @param open_in_engine [IN] Whether open table in SE
-
@return Success A pointer to table object
Failure NULL
*/
-TABLE *THD::create_and_open_tmp_table(handlerton *hton,
- LEX_CUSTRING *frm,
+TABLE *THD::create_and_open_tmp_table(LEX_CUSTRING *frm,
const char *path,
const char *db,
const char *table_name,
- bool open_in_engine,
bool open_internal_tables)
{
DBUG_ENTER("THD::create_and_open_tmp_table");
@@ -73,10 +68,10 @@ TABLE *THD::create_and_open_tmp_table(handlerton *hton,
TMP_TABLE_SHARE *share;
TABLE *table= NULL;
- if ((share= create_temporary_table(hton, frm, path, db, table_name)))
+ if ((share= create_temporary_table(frm, path, db, table_name)))
{
open_options|= HA_OPEN_FOR_CREATE;
- table= open_temporary_table(share, table_name, open_in_engine);
+ table= open_temporary_table(share, table_name);
open_options&= ~HA_OPEN_FOR_CREATE;
/*
@@ -96,7 +91,7 @@ TABLE *THD::create_and_open_tmp_table(handlerton *hton,
/* Open any related tables */
if (open_internal_tables && table->internal_tables &&
- open_and_lock_internal_tables(table, open_in_engine))
+ open_and_lock_internal_tables(table, true))
{
drop_temporary_table(table, NULL, false);
DBUG_RETURN(0);
@@ -388,7 +383,7 @@ bool THD::open_temporary_table(TABLE_LIST *tl)
*/
if (!table && (share= find_tmp_table_share(tl)))
{
- table= open_temporary_table(share, tl->get_table_name(), true);
+ table= open_temporary_table(share, tl->get_table_name());
/*
Temporary tables are not safe for parallel replication. They were
designed to be visible to one thread only, so have no table locking.
@@ -755,6 +750,8 @@ void THD::mark_tmp_tables_as_free_for_reuse()
{
if ((table->query_id == query_id) && !table->open_by_handler)
{
+ if (table->update_handler)
+ table->delete_update_handler();
mark_tmp_table_as_free_for_reuse(table);
}
}
@@ -879,10 +876,12 @@ void THD::restore_tmp_table_share(TMP_TABLE_SHARE *share)
bool THD::has_temporary_tables()
{
DBUG_ENTER("THD::has_temporary_tables");
- bool result= (rgi_slave
- ? (rgi_slave->rli->save_temporary_tables &&
- !rgi_slave->rli->save_temporary_tables->is_empty())
- : (has_thd_temporary_tables()));
+ bool result=
+#ifdef HAVE_REPLICATION
+ rgi_slave ? (rgi_slave->rli->save_temporary_tables &&
+ !rgi_slave->rli->save_temporary_tables->is_empty()) :
+#endif
+ has_thd_temporary_tables();
DBUG_RETURN(result);
}
@@ -927,7 +926,6 @@ uint THD::create_tmp_table_def_key(char *key, const char *db,
/**
Create a temporary table.
- @param hton [IN] Handlerton
@param frm [IN] Binary frm image
@param path [IN] File path (without extension)
@param db [IN] Schema name
@@ -936,8 +934,7 @@ uint THD::create_tmp_table_def_key(char *key, const char *db,
@return Success A pointer to table share object
Failure NULL
*/
-TMP_TABLE_SHARE *THD::create_temporary_table(handlerton *hton,
- LEX_CUSTRING *frm,
+TMP_TABLE_SHARE *THD::create_temporary_table(LEX_CUSTRING *frm,
const char *path,
const char *db,
const char *table_name)
@@ -975,8 +972,6 @@ TMP_TABLE_SHARE *THD::create_temporary_table(handlerton *hton,
init_tmp_table_share(this, share, saved_key_cache, key_length,
strend(saved_key_cache) + 1, tmp_path);
- share->db_plugin= ha_lock_engine(this, hton);
-
/*
Prefer using frm image over file. The image might not be available in
ALTER TABLE, when the discovering engine took over the ownership (see
@@ -1103,14 +1098,12 @@ TABLE *THD::find_temporary_table(const char *key, uint key_length,
@param share [IN] Table share
@param alias [IN] Table alias
- @param open_in_engine [IN] Whether open table in SE
@return Success A pointer to table object
Failure NULL
*/
TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share,
- const char *alias_arg,
- bool open_in_engine)
+ const char *alias_arg)
{
TABLE *table;
LEX_CSTRING alias= {alias_arg, strlen(alias_arg) };
@@ -1123,11 +1116,11 @@ TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share,
}
if (open_table_from_share(this, share, &alias,
- open_in_engine ? (uint)HA_OPEN_KEYFILE : 0,
+ (uint) HA_OPEN_KEYFILE,
EXTRA_RECORD,
(ha_open_options |
(open_options & HA_OPEN_FOR_CREATE)),
- table, open_in_engine ? false : true))
+ table, false))
{
my_free(table);
DBUG_RETURN(NULL);
@@ -1147,9 +1140,7 @@ TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share,
/* Increment Slave_open_temp_table_definitions status variable count. */
if (rgi_slave)
- {
- thread_safe_increment32(&slave_open_temp_tables);
- }
+ slave_open_temp_tables++;
DBUG_PRINT("tmptable", ("Opened table: '%s'.'%s table: %p",
table->s->db.str,
@@ -1255,7 +1246,7 @@ void THD::close_temporary_table(TABLE *table)
/* Natural invariant of temporary_tables */
DBUG_ASSERT(slave_open_temp_tables || !temporary_tables);
/* Decrement Slave_open_temp_table_definitions status variable count. */
- thread_safe_decrement32(&slave_open_temp_tables);
+ slave_open_temp_tables--;
}
DBUG_VOID_RETURN;
@@ -1520,12 +1511,14 @@ bool THD::lock_temporary_tables()
DBUG_RETURN(false);
}
+#ifdef HAVE_REPLICATION
if (rgi_slave)
{
mysql_mutex_lock(&rgi_slave->rli->data_lock);
temporary_tables= rgi_slave->rli->save_temporary_tables;
m_tmp_tables_locked= true;
}
+#endif
DBUG_RETURN(m_tmp_tables_locked);
}
@@ -1546,6 +1539,7 @@ void THD::unlock_temporary_tables()
DBUG_VOID_RETURN;
}
+#ifdef HAVE_REPLICATION
if (rgi_slave)
{
rgi_slave->rli->save_temporary_tables= temporary_tables;
@@ -1553,6 +1547,7 @@ void THD::unlock_temporary_tables()
mysql_mutex_unlock(&rgi_slave->rli->data_lock);
m_tmp_tables_locked= false;
}
+#endif
DBUG_VOID_RETURN;
}
diff --git a/sql/threadpool.h b/sql/threadpool.h
index ec320c6945c..817681e174f 100644
--- a/sql/threadpool.h
+++ b/sql/threadpool.h
@@ -1,3 +1,7 @@
+#ifndef THREADPOOL_H_INCLUDED
+#define THREADPOOL_H_INCLUDED
+
+#ifdef HAVE_POOL_OF_THREADS
/* Copyright (C) 2012 Monty Program Ab
This program is free software; you can redistribute it and/or modify
@@ -43,7 +47,7 @@ extern void tp_timeout_handler(TP_connection *c);
struct TP_STATISTICS
{
/* Current number of worker thread. */
- volatile int32 num_worker_threads;
+ Atomic_counter<uint32_t> num_worker_threads;
};
extern TP_STATISTICS tp_stats;
@@ -155,3 +159,6 @@ struct TP_pool_generic :TP_pool
virtual int set_stall_limit(uint);
virtual int get_idle_thread_count();
};
+
+#endif /* HAVE_POOL_OF_THREADS */
+#endif /* THREADPOOL_H_INCLUDED */
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index 7de7866e015..4195bf21e48 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -23,7 +23,9 @@
#include <sql_audit.h>
#include <debug_sync.h>
#include <threadpool.h>
-
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h"
+#endif /* WITH_WSREP */
/* Threadpool parameters */
@@ -136,6 +138,11 @@ static inline void set_thd_idle(THD *thd)
*/
static void thread_attach(THD* thd)
{
+#ifdef WITH_WSREP
+ /* Wait until possible background rollback has finished before
+ attaching the thd. */
+ wsrep_wait_rollback_complete_and_acquire_ownership(thd);
+#endif /* WITH_WSREP */
set_mysys_var(thd->mysys_var);
thd->thread_stack=(char*)&thd;
thd->store_globals();
@@ -215,6 +222,14 @@ static THD* threadpool_add_connection(CONNECT *connect, void *scheduler_data)
{
THD *thd= NULL;
+ DBUG_EXECUTE_IF("CONNECT_wait",
+ {
+ extern MYSQL_SOCKET unix_sock;
+ DBUG_ASSERT(unix_sock.fd >= 0);
+ while (unix_sock.fd >= 0)
+ my_sleep(1000);
+ });
+
/*
Create a new connection context: mysys_thread_var and PSI thread
Store them in THD.
@@ -240,8 +255,8 @@ static THD* threadpool_add_connection(CONNECT *connect, void *scheduler_data)
}
return NULL;
}
- delete connect;
- add_to_active_threads(thd);
+ server_threads.insert(thd); // Make THD visible in show processlist
+ delete connect; // must be after server_threads.insert, see close_connections()
thd->set_mysys_var(mysys_var);
thd->event_scheduler.data= scheduler_data;
diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc
index 74b1a778647..c129f518674 100644
--- a/sql/threadpool_generic.cc
+++ b/sql/threadpool_generic.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012 Monty Program Ab
+/* Copyright (C) 2012, 2020, 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
@@ -200,7 +200,7 @@ struct MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) thread_group_t
static thread_group_t *all_groups;
static uint group_count;
-static int32 shutdown_group_count;
+static Atomic_counter<uint32_t> shutdown_group_count;
/**
Used for printing "pool blocked" message, see
@@ -214,7 +214,7 @@ struct pool_timer_t
mysql_mutex_t mutex;
mysql_cond_t cond;
volatile uint64 current_microtime;
- volatile uint64 next_timeout_check;
+ std::atomic<uint64_t> next_timeout_check;
int tick_interval;
bool shutdown;
pthread_t timer_thread_id;
@@ -578,40 +578,34 @@ static void queue_put(thread_group_t *thread_group, native_event *ev, int cnt)
Also, recalculate time when next timeout check should run.
*/
-static void timeout_check(pool_timer_t *timer)
+static my_bool timeout_check(THD *thd, pool_timer_t *timer)
{
DBUG_ENTER("timeout_check");
-
- mysql_mutex_lock(&LOCK_thread_count);
- I_List_iterator<THD> it(threads);
-
- /* Reset next timeout check, it will be recalculated in the loop below */
- my_atomic_fas64((volatile int64*)&timer->next_timeout_check, ULONGLONG_MAX);
-
- THD *thd;
- while ((thd=it++))
+ if (thd->net.reading_or_writing == 1)
{
TP_connection_generic *connection= (TP_connection_generic *)thd->event_scheduler.data;
if (!connection || connection->state != TP_STATE_IDLE)
{
- /*
+ /*
Connection does not have scheduler data. This happens for example
if THD belongs to a different scheduler, that is listening to extra_port.
*/
- continue;
+ DBUG_RETURN(0);
}
if(connection->abs_wait_timeout < timer->current_microtime)
{
tp_timeout_handler(connection);
}
- else
+ else
{
- set_next_timeout_check(connection->abs_wait_timeout);
+ if (connection->abs_wait_timeout < timer->current_microtime)
+ tp_timeout_handler(connection);
+ else
+ set_next_timeout_check(connection->abs_wait_timeout);
}
}
- mysql_mutex_unlock(&LOCK_thread_count);
- DBUG_VOID_RETURN;
+ DBUG_RETURN(0);
}
@@ -639,7 +633,8 @@ static void* timer_thread(void *param)
my_thread_init();
DBUG_ENTER("timer_thread");
- timer->next_timeout_check= ULONGLONG_MAX;
+ timer->next_timeout_check.store(std::numeric_limits<uint64_t>::max(),
+ std::memory_order_relaxed);
timer->current_microtime= microsecond_interval_timer();
for(;;)
@@ -667,8 +662,14 @@ static void* timer_thread(void *param)
}
/* Check if any client exceeded wait_timeout */
- if (timer->next_timeout_check <= timer->current_microtime)
- timeout_check(timer);
+ if (timer->next_timeout_check.load(std::memory_order_relaxed) <=
+ timer->current_microtime)
+ {
+ /* Reset next timeout check, it will be recalculated below */
+ timer->next_timeout_check.store(std::numeric_limits<uint64_t>::max(),
+ std::memory_order_relaxed);
+ server_threads.iterate(timeout_check, timer);
+ }
}
mysql_mutex_unlock(&timer->mutex);
}
@@ -917,7 +918,7 @@ static void add_thread_count(thread_group_t *thread_group, int32 count)
thread_group->thread_count += count;
/* worker starts out and end in "active" state */
thread_group->active_thread_count += count;
- my_atomic_add32(&tp_stats.num_worker_threads, count);
+ tp_stats.num_worker_threads+= count;
}
@@ -937,7 +938,7 @@ static int create_worker(thread_group_t *thread_group)
int err;
DBUG_ENTER("create_worker");
- if (tp_stats.num_worker_threads >= (int)threadpool_max_threads
+ if (tp_stats.num_worker_threads >= threadpool_max_threads
&& thread_group->thread_count >= 2)
{
err= 1;
@@ -1077,7 +1078,7 @@ void thread_group_destroy(thread_group_t *thread_group)
}
#endif
- if (my_atomic_add32(&shutdown_group_count, -1) == 1)
+ if (!--shutdown_group_count)
{
my_free(all_groups);
all_groups= 0;
@@ -1425,12 +1426,15 @@ void TP_connection_generic::wait_end()
static void set_next_timeout_check(ulonglong abstime)
{
+ auto old= pool_timer.next_timeout_check.load(std::memory_order_relaxed);
DBUG_ENTER("set_next_timeout_check");
- while(abstime < pool_timer.next_timeout_check)
+ while (abstime < old)
{
- longlong old= (longlong)pool_timer.next_timeout_check;
- my_atomic_cas64((volatile int64*)&pool_timer.next_timeout_check,
- &old, abstime);
+ if (pool_timer.next_timeout_check.
+ compare_exchange_weak(old, abstime,
+ std::memory_order_relaxed,
+ std::memory_order_relaxed))
+ break;
}
DBUG_VOID_RETURN;
}
@@ -1702,7 +1706,7 @@ int TP_pool_generic::set_pool_size(uint size)
success= (group->pollfd != INVALID_HANDLE_VALUE);
if(!success)
{
- sql_print_error("io_poll_create() failed, errno=%d\n", errno);
+ sql_print_error("io_poll_create() failed, errno=%d", errno);
}
}
mysql_mutex_unlock(&group->mutex);
diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc
index ce0ea2252c1..7d721c88f96 100644
--- a/sql/threadpool_win.cc
+++ b/sql/threadpool_win.cc
@@ -70,12 +70,16 @@ static DWORD fls;
static bool skip_completion_port_on_success = false;
+PTP_CALLBACK_ENVIRON get_threadpool_win_callback_environ()
+{
+ return pool? &callback_environ: 0;
+}
+
/*
Threadpool callbacks.
io_completion_callback - handle client request
timer_callback - handle wait timeout (kill connection)
- shm_read_callback, shm_close_callback - shared memory stuff
login_callback - user login (submitted as threadpool work)
*/
@@ -89,9 +93,6 @@ static void CALLBACK io_completion_callback(PTP_CALLBACK_INSTANCE instance,
static void CALLBACK work_callback(PTP_CALLBACK_INSTANCE instance, PVOID context, PTP_WORK work);
-static void CALLBACK shm_read_callback(PTP_CALLBACK_INSTANCE instance,
- PVOID Context, PTP_WAIT wait,TP_WAIT_RESULT wait_result);
-
static void pre_callback(PVOID context, PTP_CALLBACK_INSTANCE instance);
/* Get current time as Windows time */
@@ -120,7 +121,6 @@ public:
PTP_CALLBACK_INSTANCE callback_instance;
PTP_IO io;
PTP_TIMER timer;
- PTP_WAIT shm_read;
PTP_WORK work;
bool long_callback;
@@ -139,7 +139,15 @@ struct TP_connection *new_TP_connection(CONNECT *connect)
void TP_pool_win::add(TP_connection *c)
{
- SubmitThreadpoolWork(((TP_connection_win *)c)->work);
+ if(FlsGetValue(fls))
+ {
+ /* Inside threadpool(), execute callback directly. */
+ tp_callback(c);
+ }
+ else
+ {
+ SubmitThreadpoolWork(((TP_connection_win *)c)->work);
+ }
}
@@ -149,7 +157,6 @@ TP_connection_win::TP_connection_win(CONNECT *c) :
callback_instance(0),
io(0),
timer(0),
- shm_read(0),
work(0)
{
}
@@ -170,30 +177,20 @@ int TP_connection_win::init()
case VIO_TYPE_NAMEDPIPE:
handle= (HANDLE)vio->hPipe;
break;
- case VIO_TYPE_SHARED_MEMORY:
- handle= vio->event_server_wrote;
- break;
default:
abort();
}
- if (vio_type == VIO_TYPE_SHARED_MEMORY)
- {
- CHECK_ALLOC_ERROR(shm_read= CreateThreadpoolWait(shm_read_callback, this, &callback_environ));
- }
- else
+
+ /* Performance tweaks (s. MSDN documentation)*/
+ UCHAR flags= FILE_SKIP_SET_EVENT_ON_HANDLE;
+ if (skip_completion_port_on_success)
{
- /* Performance tweaks (s. MSDN documentation)*/
- UCHAR flags= FILE_SKIP_SET_EVENT_ON_HANDLE;
- if (skip_completion_port_on_success)
- {
- flags |= FILE_SKIP_COMPLETION_PORT_ON_SUCCESS;
- }
- (void)SetFileCompletionNotificationModes(handle, flags);
- /* Assign io completion callback */
- CHECK_ALLOC_ERROR(io= CreateThreadpoolIo(handle, io_completion_callback, this, &callback_environ));
+ flags |= FILE_SKIP_COMPLETION_PORT_ON_SUCCESS;
}
-
+ (void)SetFileCompletionNotificationModes(handle, flags);
+ /* Assign io completion callback */
+ CHECK_ALLOC_ERROR(io= CreateThreadpoolIo(handle, io_completion_callback, this, &callback_environ));
CHECK_ALLOC_ERROR(timer= CreateThreadpoolTimer(timer_callback, this, &callback_environ));
CHECK_ALLOC_ERROR(work= CreateThreadpoolWork(work_callback, this, &callback_environ));
return 0;
@@ -214,11 +211,6 @@ int TP_connection_win::start_io()
DWORD last_error= 0;
int retval;
- if (shm_read)
- {
- SetThreadpoolWait(shm_read, handle, NULL);
- return 0;
- }
StartThreadpoolIo(io);
if (vio_type == VIO_TYPE_TCPIP || vio_type == VIO_TYPE_SSL)
@@ -297,9 +289,6 @@ TP_connection_win::~TP_connection_win()
if (io)
CloseThreadpoolIo(io);
- if (shm_read)
- CloseThreadpoolWait(shm_read);
-
if (work)
CloseThreadpoolWork(work);
@@ -313,14 +302,13 @@ TP_connection_win::~TP_connection_win()
void TP_connection_win::wait_begin(int type)
{
-
/*
Signal to the threadpool whenever callback can run long. Currently, binlog
waits are a good candidate, its waits are really long
*/
if (type == THD_WAIT_BINLOG)
{
- if (!long_callback)
+ if (!long_callback && callback_instance)
{
CallbackMayRunLong(callback_instance);
long_callback= true;
@@ -333,21 +321,26 @@ void TP_connection_win::wait_end()
/* Do we need to do anything ? */
}
-/*
- This function should be called first whenever a callback is invoked in the
+/*
+ This function should be called first whenever a callback is invoked in the
threadpool, does my_thread_init() if not yet done
*/
-extern ulong thread_created;
-static void pre_callback(PVOID context, PTP_CALLBACK_INSTANCE instance)
+void tp_win_callback_prolog()
{
if (FlsGetValue(fls) == NULL)
{
/* Running in new worker thread*/
FlsSetValue(fls, (void *)1);
statistic_increment(thread_created, &LOCK_status);
- InterlockedIncrement((volatile long *)&tp_stats.num_worker_threads);
+ tp_stats.num_worker_threads++;
my_thread_init();
}
+}
+
+extern ulong thread_created;
+static void pre_callback(PVOID context, PTP_CALLBACK_INSTANCE instance)
+{
+ tp_win_callback_prolog();
TP_connection_win *c = (TP_connection_win *)context;
c->callback_instance = instance;
c->long_callback = false;
@@ -362,7 +355,7 @@ static VOID WINAPI thread_destructor(void *data)
{
if(data)
{
- InterlockedDecrement((volatile long *)&tp_stats.num_worker_threads);
+ tp_stats.num_worker_threads--;
my_thread_end();
}
}
@@ -421,29 +414,6 @@ static VOID CALLBACK timer_callback(PTP_CALLBACK_INSTANCE instance,
}
}
-
-/*
- Shared memory read callback.
- Invoked when read event is set on connection.
-*/
-
-static void CALLBACK shm_read_callback(PTP_CALLBACK_INSTANCE instance,
- PVOID context, PTP_WAIT wait,TP_WAIT_RESULT wait_result)
-{
- TP_connection_win *c= (TP_connection_win *)context;
- /* Disarm wait. */
- SetThreadpoolWait(wait, NULL, NULL);
-
- /*
- This is an autoreset event, and one wakeup is eaten already by threadpool,
- and the current state is "not set". Thus we need to reset the event again,
- or vio_read will hang.
- */
- SetEvent(c->handle);
- tp_callback(instance, context);
-}
-
-
static void CALLBACK work_callback(PTP_CALLBACK_INSTANCE instance, PVOID context, PTP_WORK work)
{
tp_callback(instance, context);
diff --git a/sql/transaction.cc b/sql/transaction.cc
index 1a1c7e47b73..e98672eaa9d 100644
--- a/sql/transaction.cc
+++ b/sql/transaction.cc
@@ -25,19 +25,20 @@
#include "debug_sync.h" // DEBUG_SYNC
#include "sql_acl.h"
#include "semisync_master.h"
+#ifdef WITH_WSREP
+#include "wsrep_trans_observer.h"
+#endif /* WITH_WSREP */
-#ifndef EMBEDDED_LIBRARY
/**
Helper: Tell tracker (if any) that transaction ended.
*/
-static void trans_track_end_trx(THD *thd)
+void trans_track_end_trx(THD *thd)
{
+#ifndef EMBEDDED_LIBRARY
if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
thd->session_tracker.transaction_info.end_trx(thd);
-}
-#else
-#define trans_track_end_trx(A) do{}while(0)
#endif //EMBEDDED_LIBRARY
+}
/**
@@ -60,7 +61,6 @@ void trans_reset_one_shot_chistics(THD *thd)
/* Conditions under which the transaction state must not change. */
static bool trans_check(THD *thd)
{
- enum xa_states xa_state= thd->transaction.xid_state.xa_state;
DBUG_ENTER("trans_check");
/*
@@ -71,8 +71,8 @@ static bool trans_check(THD *thd)
if (unlikely(thd->in_sub_stmt))
my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
- if (xa_state != XA_NOTR)
- my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
+ if (thd->transaction.xid_state.is_explicit_XA())
+ thd->transaction.xid_state.er_xaer_rmfail();
else
DBUG_RETURN(FALSE);
@@ -81,67 +81,6 @@ static bool trans_check(THD *thd)
/**
- Mark a XA transaction as rollback-only if the RM unilaterally
- rolled back the transaction branch.
-
- @note If a rollback was requested by the RM, this function sets
- the appropriate rollback error code and transits the state
- to XA_ROLLBACK_ONLY.
-
- @return TRUE if transaction was rolled back or if the transaction
- state is XA_ROLLBACK_ONLY. FALSE otherwise.
-*/
-static bool xa_trans_rolled_back(XID_STATE *xid_state)
-{
- if (xid_state->rm_error)
- {
- switch (xid_state->rm_error) {
- case ER_LOCK_WAIT_TIMEOUT:
- my_error(ER_XA_RBTIMEOUT, MYF(0));
- break;
- case ER_LOCK_DEADLOCK:
- my_error(ER_XA_RBDEADLOCK, MYF(0));
- break;
- default:
- my_error(ER_XA_RBROLLBACK, MYF(0));
- }
- xid_state->xa_state= XA_ROLLBACK_ONLY;
- }
-
- return (xid_state->xa_state == XA_ROLLBACK_ONLY);
-}
-
-
-/**
- Rollback the active XA transaction.
-
- @note Resets rm_error before calling ha_rollback(), so
- the thd->transaction.xid structure gets reset
- by ha_rollback() / THD::transaction::cleanup().
-
- @return TRUE if the rollback failed, FALSE otherwise.
-*/
-
-static bool xa_trans_force_rollback(THD *thd)
-{
- /*
- We must reset rm_error before calling ha_rollback(),
- so thd->transaction.xid structure gets reset
- by ha_rollback()/THD::transaction::cleanup().
- */
- thd->transaction.xid_state.rm_error= 0;
- if (WSREP_ON)
- wsrep_register_hton(thd, TRUE);
- if (ha_rollback_trans(thd, true))
- {
- my_error(ER_XAER_RMERR, MYF(0));
- return true;
- }
- return false;
-}
-
-
-/**
Begin a new transaction.
@note Beginning a transaction implicitly commits any current
@@ -170,14 +109,16 @@ bool trans_begin(THD *thd, uint flags)
(thd->variables.option_bits & OPTION_TABLE_LOCK))
{
thd->variables.option_bits&= ~OPTION_TABLE_LOCK;
- if (WSREP_ON)
- wsrep_register_hton(thd, TRUE);
thd->server_status&=
~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
res= MY_TEST(ha_commit_trans(thd, TRUE));
- if (WSREP_ON)
- wsrep_post_commit(thd, TRUE);
+#ifdef WITH_WSREP
+ if (wsrep_thd_is_local(thd))
+ {
+ res= res || wsrep_after_statement(thd);
+ }
+#endif /* WITH_WSREP */
}
thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
@@ -238,9 +179,14 @@ bool trans_begin(THD *thd, uint flags)
}
#ifdef WITH_WSREP
- thd->wsrep_PA_safe= true;
- if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd))
- DBUG_RETURN(TRUE);
+ if (wsrep_thd_is_local(thd))
+ {
+ if (wsrep_sync_wait(thd))
+ DBUG_RETURN(TRUE);
+ if (!thd->tx_read_only &&
+ wsrep_start_transaction(thd, thd->wsrep_next_trx_id()))
+ DBUG_RETURN(TRUE);
+ }
#endif /* WITH_WSREP */
thd->variables.option_bits|= OPTION_BEGIN;
@@ -285,8 +231,6 @@ bool trans_commit(THD *thd)
if (trans_check(thd))
DBUG_RETURN(TRUE);
- if (WSREP_ON)
- wsrep_register_hton(thd, TRUE);
thd->server_status&=
~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
@@ -297,8 +241,6 @@ bool trans_commit(THD *thd)
mysql_mutex_assert_not_owner(&LOCK_after_binlog_sync);
mysql_mutex_assert_not_owner(&LOCK_commit_ordered);
- if (WSREP_ON)
- wsrep_post_commit(thd, TRUE);
/*
if res is non-zero, then ha_commit_trans has rolled back the
transaction, so the hooks for rollback will be called.
@@ -354,14 +296,10 @@ bool trans_commit_implicit(THD *thd)
/* Safety if one did "drop table" on locked tables */
if (!thd->locked_tables_mode)
thd->variables.option_bits&= ~OPTION_TABLE_LOCK;
- if (WSREP_ON)
- wsrep_register_hton(thd, TRUE);
thd->server_status&=
~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
res= MY_TEST(ha_commit_trans(thd, TRUE));
- if (WSREP_ON)
- wsrep_post_commit(thd, TRUE);
}
thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
@@ -395,14 +333,9 @@ bool trans_rollback(THD *thd)
int res;
DBUG_ENTER("trans_rollback");
-#ifdef WITH_WSREP
- thd->wsrep_PA_safe= true;
-#endif /* WITH_WSREP */
if (trans_check(thd))
DBUG_RETURN(TRUE);
- if (WSREP_ON)
- wsrep_register_hton(thd, TRUE);
thd->server_status&=
~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
@@ -501,14 +434,10 @@ bool trans_commit_stmt(THD *thd)
if (thd->transaction.stmt.ha_list)
{
- if (WSREP_ON)
- wsrep_register_hton(thd, FALSE);
res= ha_commit_trans(thd, FALSE);
if (! thd->in_active_multi_stmt_transaction())
{
trans_reset_one_shot_chistics(thd);
- if (WSREP_ON)
- wsrep_post_commit(thd, FALSE);
}
}
@@ -564,8 +493,6 @@ bool trans_rollback_stmt(THD *thd)
if (thd->transaction.stmt.ha_list)
{
- if (WSREP_ON)
- wsrep_register_hton(thd, FALSE);
ha_rollback_trans(thd, FALSE);
if (! thd->in_active_multi_stmt_transaction())
trans_reset_one_shot_chistics(thd);
@@ -620,9 +547,6 @@ bool trans_savepoint(THD *thd, LEX_CSTRING name)
if (thd->transaction.xid_state.check_has_uncommitted_xa())
DBUG_RETURN(TRUE);
- if (WSREP_ON)
- wsrep_register_hton(thd, thd->in_multi_stmt_transaction_mode());
-
sv= find_savepoint(thd, name);
if (*sv) /* old savepoint of the same name exists */
@@ -699,9 +623,6 @@ bool trans_rollback_to_savepoint(THD *thd, LEX_CSTRING name)
if (thd->transaction.xid_state.check_has_uncommitted_xa())
DBUG_RETURN(TRUE);
- if (WSREP_ON)
- wsrep_register_hton(thd, thd->in_multi_stmt_transaction_mode());
-
if (ha_rollback_to_savepoint(thd, sv))
res= TRUE;
else if (((thd->variables.option_bits & OPTION_KEEP_LOG) ||
@@ -715,7 +636,8 @@ bool trans_rollback_to_savepoint(THD *thd, LEX_CSTRING name)
if (res)
/* An error occurred during rollback; we cannot release any MDL */;
- else if (thd->variables.sql_log_bin && mysql_bin_log.is_open())
+ else if (thd->variables.sql_log_bin &&
+ (WSREP_EMULATE_BINLOG_NNULL(thd) || mysql_bin_log.is_open()))
/* In some cases (such as with non-transactional tables) we may
choose to preserve events that were added after the SAVEPOINT,
delimiting them by SAVEPOINT and ROLLBACK TO SAVEPOINT statements.
@@ -760,279 +682,3 @@ bool trans_release_savepoint(THD *thd, LEX_CSTRING name)
DBUG_RETURN(MY_TEST(res));
}
-
-
-/**
- Starts an XA transaction with the given xid value.
-
- @param thd Current thread
-
- @retval FALSE Success
- @retval TRUE Failure
-*/
-
-bool trans_xa_start(THD *thd)
-{
- enum xa_states xa_state= thd->transaction.xid_state.xa_state;
- DBUG_ENTER("trans_xa_start");
-
- if (xa_state == XA_IDLE && thd->lex->xa_opt == XA_RESUME)
- {
- bool not_equal= !thd->transaction.xid_state.xid.eq(thd->lex->xid);
- if (not_equal)
- my_error(ER_XAER_NOTA, MYF(0));
- else
- thd->transaction.xid_state.xa_state= XA_ACTIVE;
- DBUG_RETURN(not_equal);
- }
-
- /* TODO: JOIN is not supported yet. */
- if (thd->lex->xa_opt != XA_NONE)
- my_error(ER_XAER_INVAL, MYF(0));
- else if (xa_state != XA_NOTR)
- my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
- else if (thd->locked_tables_mode || thd->in_active_multi_stmt_transaction())
- my_error(ER_XAER_OUTSIDE, MYF(0));
- else if (!trans_begin(thd))
- {
- DBUG_ASSERT(thd->transaction.xid_state.xid.is_null());
- thd->transaction.xid_state.xa_state= XA_ACTIVE;
- thd->transaction.xid_state.rm_error= 0;
- thd->transaction.xid_state.xid.set(thd->lex->xid);
- if (xid_cache_insert(thd, &thd->transaction.xid_state))
- {
- thd->transaction.xid_state.xa_state= XA_NOTR;
- thd->transaction.xid_state.xid.null();
- trans_rollback(thd);
- DBUG_RETURN(true);
- }
- DBUG_RETURN(FALSE);
- }
-
- DBUG_RETURN(TRUE);
-}
-
-
-/**
- Put a XA transaction in the IDLE state.
-
- @param thd Current thread
-
- @retval FALSE Success
- @retval TRUE Failure
-*/
-
-bool trans_xa_end(THD *thd)
-{
- DBUG_ENTER("trans_xa_end");
-
- /* TODO: SUSPEND and FOR MIGRATE are not supported yet. */
- if (thd->lex->xa_opt != XA_NONE)
- my_error(ER_XAER_INVAL, MYF(0));
- else if (thd->transaction.xid_state.xa_state != XA_ACTIVE)
- my_error(ER_XAER_RMFAIL, MYF(0),
- xa_state_names[thd->transaction.xid_state.xa_state]);
- else if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
- my_error(ER_XAER_NOTA, MYF(0));
- else if (!xa_trans_rolled_back(&thd->transaction.xid_state))
- thd->transaction.xid_state.xa_state= XA_IDLE;
-
- DBUG_RETURN(thd->is_error() ||
- thd->transaction.xid_state.xa_state != XA_IDLE);
-}
-
-
-/**
- Put a XA transaction in the PREPARED state.
-
- @param thd Current thread
-
- @retval FALSE Success
- @retval TRUE Failure
-*/
-
-bool trans_xa_prepare(THD *thd)
-{
- DBUG_ENTER("trans_xa_prepare");
-
- if (thd->transaction.xid_state.xa_state != XA_IDLE)
- my_error(ER_XAER_RMFAIL, MYF(0),
- xa_state_names[thd->transaction.xid_state.xa_state]);
- else if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
- my_error(ER_XAER_NOTA, MYF(0));
- else if (ha_prepare(thd))
- {
- xid_cache_delete(thd, &thd->transaction.xid_state);
- thd->transaction.xid_state.xa_state= XA_NOTR;
- my_error(ER_XA_RBROLLBACK, MYF(0));
- }
- else
- thd->transaction.xid_state.xa_state= XA_PREPARED;
-
- DBUG_RETURN(thd->is_error() ||
- thd->transaction.xid_state.xa_state != XA_PREPARED);
-}
-
-
-/**
- Commit and terminate the a XA transaction.
- Transactional locks are released if transaction ended
-
- @param thd Current thread
-
- @retval FALSE Success
- @retval TRUE Failure
-
-*/
-
-bool trans_xa_commit(THD *thd)
-{
- bool res= TRUE;
- enum xa_states xa_state= thd->transaction.xid_state.xa_state;
- DBUG_ENTER("trans_xa_commit");
-
- if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
- {
- if (thd->fix_xid_hash_pins())
- {
- my_error(ER_OUT_OF_RESOURCES, MYF(0));
- DBUG_RETURN(TRUE);
- }
-
- XID_STATE *xs= xid_cache_search(thd, thd->lex->xid);
- res= !xs;
- if (res)
- my_error(ER_XAER_NOTA, MYF(0));
- else
- {
- res= xa_trans_rolled_back(xs);
- ha_commit_or_rollback_by_xid(thd->lex->xid, !res);
- xid_cache_delete(thd, xs);
- }
- DBUG_RETURN(res);
- }
-
- if (xa_trans_rolled_back(&thd->transaction.xid_state))
- {
- xa_trans_force_rollback(thd);
- res= thd->is_error();
- }
- else if (xa_state == XA_IDLE && thd->lex->xa_opt == XA_ONE_PHASE)
- {
- if (WSREP_ON)
- wsrep_register_hton(thd, TRUE);
- int r= ha_commit_trans(thd, TRUE);
- if ((res= MY_TEST(r)))
- my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0));
- if (WSREP_ON)
- wsrep_post_commit(thd, TRUE);
- }
- else if (xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE)
- {
- MDL_request mdl_request;
-
- /*
- Acquire metadata lock which will ensure that COMMIT is blocked
- by active FLUSH TABLES WITH READ LOCK (and vice versa COMMIT in
- progress blocks FTWRL).
-
- We allow FLUSHer to COMMIT; we assume FLUSHer knows what it does.
- */
- mdl_request.init(MDL_key::COMMIT, "", "", MDL_INTENTION_EXCLUSIVE,
- MDL_TRANSACTION);
-
- if (thd->mdl_context.acquire_lock(&mdl_request,
- thd->variables.lock_wait_timeout))
- {
- if (WSREP_ON)
- wsrep_register_hton(thd, TRUE);
- ha_rollback_trans(thd, TRUE);
- my_error(ER_XAER_RMERR, MYF(0));
- }
- else
- {
- DEBUG_SYNC(thd, "trans_xa_commit_after_acquire_commit_lock");
-
- res= MY_TEST(ha_commit_one_phase(thd, 1));
- if (res)
- my_error(ER_XAER_RMERR, MYF(0));
- }
- }
- else
- {
- my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
- DBUG_RETURN(TRUE);
- }
-
- thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
- thd->transaction.all.reset();
- thd->server_status&=
- ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
- DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
- xid_cache_delete(thd, &thd->transaction.xid_state);
- thd->transaction.xid_state.xa_state= XA_NOTR;
-
- trans_track_end_trx(thd);
- thd->mdl_context.release_transactional_locks();
-
- DBUG_RETURN(res);
-}
-
-
-/**
- Roll back and terminate a XA transaction.
- Transactional locks are released if transaction ended
-
- @param thd Current thread
-
- @retval FALSE Success
- @retval TRUE Failure
-*/
-
-bool trans_xa_rollback(THD *thd)
-{
- bool res= TRUE;
- enum xa_states xa_state= thd->transaction.xid_state.xa_state;
- DBUG_ENTER("trans_xa_rollback");
-
- if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
- {
- if (thd->fix_xid_hash_pins())
- {
- my_error(ER_OUT_OF_RESOURCES, MYF(0));
- DBUG_RETURN(TRUE);
- }
-
- XID_STATE *xs= xid_cache_search(thd, thd->lex->xid);
- if (!xs)
- my_error(ER_XAER_NOTA, MYF(0));
- else
- {
- xa_trans_rolled_back(xs);
- ha_commit_or_rollback_by_xid(thd->lex->xid, 0);
- xid_cache_delete(thd, xs);
- }
- DBUG_RETURN(thd->get_stmt_da()->is_error());
- }
-
- if (xa_state != XA_IDLE && xa_state != XA_PREPARED && xa_state != XA_ROLLBACK_ONLY)
- {
- my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
- DBUG_RETURN(TRUE);
- }
-
- res= xa_trans_force_rollback(thd);
-
- thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
- thd->transaction.all.reset();
- thd->server_status&=
- ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
- DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
- xid_cache_delete(thd, &thd->transaction.xid_state);
- thd->transaction.xid_state.xa_state= XA_NOTR;
-
- trans_track_end_trx(thd);
- thd->mdl_context.release_transactional_locks();
-
- DBUG_RETURN(res);
-}
diff --git a/sql/transaction.h b/sql/transaction.h
index 56cc6f8f011..fe0129fa8bc 100644
--- a/sql/transaction.h
+++ b/sql/transaction.h
@@ -24,6 +24,8 @@
class THD;
+void trans_track_end_trx(THD *thd);
+
bool trans_begin(THD *thd, uint flags= 0);
bool trans_commit(THD *thd);
bool trans_commit_implicit(THD *thd);
@@ -37,12 +39,6 @@ bool trans_savepoint(THD *thd, LEX_CSTRING name);
bool trans_rollback_to_savepoint(THD *thd, LEX_CSTRING name);
bool trans_release_savepoint(THD *thd, LEX_CSTRING name);
-bool trans_xa_start(THD *thd);
-bool trans_xa_end(THD *thd);
-bool trans_xa_prepare(THD *thd);
-bool trans_xa_commit(THD *thd);
-bool trans_xa_rollback(THD *thd);
-
void trans_reset_one_shot_chistics(THD *thd);
#endif /* TRANSACTION_H */
diff --git a/sql/tztime.cc b/sql/tztime.cc
index ec9e68ee66d..3db97ad97d6 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -2453,7 +2453,7 @@ print_tz_leaps_as_sql(const TIME_ZONE_INFO *sp)
printf("\\d |\n"
"IF (select count(*) from information_schema.global_variables where\n"
"variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
- "ALTER TABLE time_zone_leap_second ENGINE=MyISAM;\n"
+ "ALTER TABLE time_zone_leap_second ENGINE=Aria;\n"
"END IF|\n"
"\\d ;\n");
@@ -2624,7 +2624,7 @@ static struct my_option my_long_options[] =
&opt_verbose, &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"skip-write-binlog", 'S', "Do not replicate changes to time zone tables to the binary log, or to other nodes in a Galera cluster.",
+ {"skip-write-binlog", 'S', "Do not replicate changes to time zone tables to the binary log, or to other nodes in a Galera cluster (if wsrep_on=ON).",
&opt_skip_write_binlog,&opt_skip_write_binlog, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
@@ -2696,9 +2696,22 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
}
+static const char *lock_tables=
+ "LOCK TABLES time_zone WRITE,\n"
+ " time_zone_leap_second WRITE,\n"
+ " time_zone_name WRITE,\n"
+ " time_zone_transition WRITE,\n"
+ " time_zone_transition_type WRITE;\n";
+static const char *trunc_tables_const=
+ "TRUNCATE TABLE time_zone;\n"
+ "TRUNCATE TABLE time_zone_name;\n"
+ "TRUNCATE TABLE time_zone_transition;\n"
+ "TRUNCATE TABLE time_zone_transition_type;\n";
+
int
main(int argc, char **argv)
{
+ const char *trunc_tables;
MY_INIT(argv[0]);
load_defaults_or_exit("my", load_default_groups, &argc, &argv);
@@ -2714,30 +2727,38 @@ main(int argc, char **argv)
return 1;
}
+ if (!(argc == 1 && !opt_leap))
+ trunc_tables= "SELECT 'skip truncate tables';\n"; // No-op - needed for ELSE clause
+ else
+ trunc_tables= trunc_tables_const;
+
if (opt_skip_write_binlog)
- {
/* If skip_write_binlog is set and wsrep is compiled in we disable
sql_log_bin and wsrep_on to avoid Galera replicating below
- truncate table clauses. This will allow user to set different
+ TRUNCATE TABLE clauses. This will allow user to set different
time zones to nodes in Galera cluster. */
printf("set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION WSREP_ON=OFF', 'do 0');\n"
"SET SESSION SQL_LOG_BIN=0;\n"
- "execute immediate @prep1;\n");
- }
+ "execute immediate @prep1;\n"
+ "%s%s", trunc_tables, lock_tables);
else
- {
- // Alter time zone tables to InnoDB if wsrep_on is enabled
- // to allow changes to them to replicate with Galera
- printf("\\d |\n"
- "IF (select count(*) from information_schema.global_variables where\n"
- "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
- "ALTER TABLE time_zone ENGINE=InnoDB;\n"
- "ALTER TABLE time_zone_name ENGINE=InnoDB;\n"
- "ALTER TABLE time_zone_transition ENGINE=InnoDB;\n"
- "ALTER TABLE time_zone_transition_type ENGINE=InnoDB;\n"
- "END IF|\n"
- "\\d ;\n");
- }
+ // Alter time zone tables to InnoDB if wsrep_on is enabled
+ // to allow changes to them to replicate with Galera
+ printf("\\d |\n"
+ "IF (select count(*) from information_schema.global_variables where\n"
+ "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
+ "ALTER TABLE time_zone ENGINE=InnoDB;\n"
+ "ALTER TABLE time_zone_name ENGINE=InnoDB;\n"
+ "ALTER TABLE time_zone_transition ENGINE=InnoDB;\n"
+ "ALTER TABLE time_zone_transition_type ENGINE=InnoDB;\n"
+ "%s"
+ "START TRANSACTION;\n"
+ "ELSE\n%s"
+ "END IF|\n"
+ "\\d ;\n",
+ trunc_tables, trunc_tables);
+ // Ideally we'd like to put lock_tables in the ELSE branch however
+ // "ERROR 1314 (0A000) at line 2: LOCK is not allowed in stored procedures"
if (argc == 1 && !opt_leap)
{
@@ -2745,12 +2766,6 @@ main(int argc, char **argv)
root_name_end= strmake_buf(fullname, argv[0]);
- printf("TRUNCATE TABLE time_zone;\n");
- printf("TRUNCATE TABLE time_zone_name;\n");
- printf("TRUNCATE TABLE time_zone_transition;\n");
- printf("TRUNCATE TABLE time_zone_transition_type;\n");
- printf("START TRANSACTION;\n");
-
if (scan_tz_dir(root_name_end, 0, opt_verbose))
{
printf("ROLLBACK;\n");
@@ -2761,7 +2776,8 @@ main(int argc, char **argv)
return 1;
}
- printf("COMMIT;\n");
+ printf("UNLOCK TABLES;\n"
+ "COMMIT;\n");
printf("ALTER TABLE time_zone_transition "
"ORDER BY Time_zone_id, Transition_time;\n");
printf("ALTER TABLE time_zone_transition_type "
@@ -2785,25 +2801,24 @@ main(int argc, char **argv)
print_tz_leaps_as_sql(&tz_info);
else
print_tz_as_sql(argv[1], &tz_info);
-
+ printf("UNLOCK TABLES;\n"
+ "COMMIT;\n");
free_root(&tz_storage, MYF(0));
}
if(!opt_skip_write_binlog)
- {
- // Fall back to MyISAM
- printf("\\d |\n"
- "IF (select count(*) from information_schema.global_variables where\n"
- "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
- "ALTER TABLE time_zone ENGINE=MyISAM;\n"
- "ALTER TABLE time_zone_name ENGINE=MyISAM;\n"
- "ALTER TABLE time_zone_transition ENGINE=MyISAM;\n"
- "ALTER TABLE time_zone_transition_type ENGINE=MyISAM;\n"
- "END IF|\n"
- "\\d ;\n");
- }
-
- free_defaults(default_argv);
+ // Fall back to Aria
+ printf("\\d |\n"
+ "IF (select count(*) from information_schema.global_variables where\n"
+ "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
+ "ALTER TABLE time_zone ENGINE=Aria;\n"
+ "ALTER TABLE time_zone_name ENGINE=Aria;\n"
+ "ALTER TABLE time_zone_transition ENGINE=Aria, ORDER BY Time_zone_id, Transition_time;\n"
+ "ALTER TABLE time_zone_transition_type ENGINE=Aria, ORDER BY Time_zone_id, Transition_type_id;\n"
+ "END IF|\n"
+ "\\d ;\n");
+
+ free_allocated_data();
my_end(0);
return 0;
}
diff --git a/sql/udf_example.c b/sql/udf_example.c
index 26afa538e88..e4757de880d 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -173,6 +173,13 @@ void avgcost_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error
void avgcost_clear( UDF_INIT* initid, char* is_null, char *error );
void avgcost_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
double avgcost( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
+my_bool avg2_init( UDF_INIT* initid, UDF_ARGS* args, char* message );
+void avg2_deinit( UDF_INIT* initid );
+void avg2_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
+void avg2_clear( UDF_INIT* initid, char* is_null, char *error );
+void avg2_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
+void avg2_remove( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
+double avg2( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
char *is_const(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long
*length, char *is_null, char *error);
@@ -1049,6 +1056,138 @@ avgcost( UDF_INIT* initid, UDF_ARGS* args __attribute__((unused)),
return data->totalprice/(double)data->totalquantity;
}
+
+/*
+** Average 2 (number, sum)*/
+struct avg2_data
+{
+ ulonglong count;
+ double sum;
+};
+
+
+my_bool
+avg2_init( UDF_INIT* initid, UDF_ARGS* args, char* message )
+{
+ struct avg2_data* data;
+
+ if (args->arg_count != 2)
+ {
+ strcpy(
+ message,
+ "wrong number of arguments: AVG2() requires two arguments"
+ );
+ return 1;
+ }
+
+ if ((args->arg_type[0] != INT_RESULT) || (args->arg_type[1] != REAL_RESULT) )
+ {
+ strcpy(
+ message,
+ "wrong argument type: AVG2() requires an INT and a REAL"
+ );
+ return 1;
+ }
+
+ /*
+ ** force arguments to double.
+ */
+ /*args->arg_type[0] = REAL_RESULT;
+ args->arg_type[1] = REAL_RESULT;*/
+
+ initid->maybe_null = 0; /* The result may be null */
+ initid->decimals = 4; /* We want 4 decimals in the result */
+ initid->max_length = 20; /* 6 digits + . + 10 decimals */
+
+ if (!(data = (struct avg2_data*) malloc(sizeof(struct avg2_data))))
+ {
+ strmov(message,"Couldn't allocate memory");
+ return 1;
+ }
+ data->count = 0;
+ data->sum = 0.0;
+
+ initid->ptr = (char*)data;
+
+ return 0;
+}
+
+void
+avg2_deinit( UDF_INIT* initid )
+{
+ free(initid->ptr);
+}
+
+
+/* This is only for MySQL 4.0 compability */
+void
+avg2_reset(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message)
+{
+ avgcost_clear(initid, is_null, message);
+ avgcost_add(initid, args, is_null, message);
+}
+
+/* This is needed to get things to work in MySQL 4.1.1 and above */
+
+void
+avg2_clear(UDF_INIT* initid, char* is_null __attribute__((unused)),
+ char* message __attribute__((unused)))
+{
+ struct avg2_data* data = (struct avg2_data*)initid->ptr;
+ data->sum= 0.0;
+ data->count= 0;
+}
+
+
+void
+avg2_add(UDF_INIT* initid, UDF_ARGS* args,
+ char* is_null __attribute__((unused)),
+ char* message __attribute__((unused)))
+{
+ if (args->args[0] && args->args[1])
+ {
+ struct avg2_data* data = (struct avg2_data*)initid->ptr;
+ longlong quantity = *((longlong*)args->args[0]);
+ double sum = *((double*)args->args[1]);
+
+ data->count += quantity;
+ data->sum += sum;
+ }
+}
+
+
+void
+avg2_remove(UDF_INIT* initid, UDF_ARGS* args,
+ char* is_null __attribute__((unused)),
+ char* message __attribute__((unused)))
+{
+ if (args->args[0] && args->args[1])
+ {
+ struct avg2_data* data = (struct avg2_data*)initid->ptr;
+ longlong quantity = *((longlong*)args->args[0]);
+ double sum = *((double*)args->args[1]);
+
+ data->count -= quantity;
+ data->sum -= sum;
+ }
+}
+
+
+double
+avg2( UDF_INIT* initid, UDF_ARGS* args __attribute__((unused)),
+ char* is_null, char* error __attribute__((unused)))
+{
+ struct avg2_data* data = (struct avg2_data*)initid->ptr;
+ if (!data->count)
+ {
+ *is_null = 1;
+ return 0.0;
+ }
+
+ *is_null = 0;
+ return data->sum/(double)data->count;
+}
+
my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
char *myfunc_argument_name(UDF_INIT *initid, UDF_ARGS *args, char *result,
diff --git a/sql/udf_example.def b/sql/udf_example.def
index 74230b638bf..903c2b74893 100644
--- a/sql/udf_example.def
+++ b/sql/udf_example.def
@@ -23,6 +23,13 @@ EXPORTS
avgcost_add
avgcost_clear
avgcost
+ avg2_init
+ avg2_deinit
+ avg2_reset
+ avg2_add
+ avg2_remove
+ avg2_clear
+ avg2
is_const
is_const_init
check_const_len
diff --git a/sql/unireg.cc b/sql/unireg.cc
index efbb5e773b4..b4213786abb 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
- Copyright (c) 2009, 2018, MariaDB Corporation
+ Copyright (c) 2009, 2020, 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
@@ -39,7 +39,7 @@
/* threshold for safe_alloca */
#define ALLOCA_THRESHOLD 2048
-static uint pack_keys(uchar *,uint, KEY *, ulong);
+static uint pack_keys(uchar *,uint, KEY *, ulong, uint);
static bool pack_header(THD *, uchar *, List<Create_field> &, HA_CREATE_INFO *,
ulong, handler *);
static bool pack_vcols(String *, List<Create_field> &, List<Virtual_column_info> *);
@@ -57,6 +57,7 @@ static bool make_empty_rec(THD *, uchar *, uint, List<Create_field> &, uint,
*/
static uchar *extra2_write_len(uchar *pos, size_t len)
{
+ DBUG_ASSERT(len);
if (len <= 255)
*pos++= (uchar)len;
else
@@ -72,19 +73,24 @@ static uchar *extra2_write_len(uchar *pos, size_t len)
return pos;
}
+static uchar* extra2_write_str(uchar *pos, const LEX_CSTRING &str)
+{
+ pos= extra2_write_len(pos, str.length);
+ memcpy(pos, str.str, str.length);
+ return pos + str.length;
+}
+
static uchar *extra2_write(uchar *pos, enum extra2_frm_value_type type,
- const LEX_CSTRING *str)
+ const LEX_CSTRING &str)
{
*pos++ = type;
- pos= extra2_write_len(pos, str->length);
- memcpy(pos, str->str, str->length);
- return pos + str->length;
+ return extra2_write_str(pos, str);
}
static uchar *extra2_write(uchar *pos, enum extra2_frm_value_type type,
- LEX_CUSTRING *str)
+ const LEX_CUSTRING &str)
{
- return extra2_write(pos, type, reinterpret_cast<LEX_CSTRING *>(str));
+ return extra2_write(pos, type, *reinterpret_cast<const LEX_CSTRING*>(&str));
}
static uchar *extra2_write_field_properties(uchar *pos,
@@ -106,25 +112,18 @@ static uchar *extra2_write_field_properties(uchar *pos,
return pos;
}
-static const bool ROW_START = true;
-static const bool ROW_END = false;
-
-static inline
-uint16
-vers_get_field(HA_CREATE_INFO *create_info, List<Create_field> &create_fields, bool row_start)
+static uint16
+get_fieldno_by_name(HA_CREATE_INFO *create_info, List<Create_field> &create_fields,
+ const Lex_ident &field_name)
{
- DBUG_ASSERT(create_info->versioned());
-
List_iterator<Create_field> it(create_fields);
Create_field *sql_field = NULL;
- const Lex_ident row_field= row_start ? create_info->vers_info.as_row.start
- : create_info->vers_info.as_row.end;
- DBUG_ASSERT(row_field);
+ DBUG_ASSERT(field_name);
for (unsigned field_no = 0; (sql_field = it++); ++field_no)
{
- if (row_field.streq(sql_field->field_name))
+ if (field_name.streq(sql_field->field_name))
{
DBUG_ASSERT(field_no <= uint16(~0U));
return uint16(field_no);
@@ -149,6 +148,11 @@ bool has_extra2_field_flags(List<Create_field> &create_fields)
return false;
}
+static size_t extra2_str_size(size_t len)
+{
+ return (len > 255 ? 3 : 1) + len;
+}
+
/**
Create a frm (table definition) file
@@ -164,7 +168,7 @@ bool has_extra2_field_flags(List<Create_field> &create_fields)
or null LEX_CUSTRING (str==0) in case of an error.
*/
-LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
+LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING &table,
HA_CREATE_INFO *create_info,
List<Create_field> &create_fields,
uint keys, KEY *key_info, handler *db_file)
@@ -176,6 +180,12 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
ulong data_offset;
uint options_len;
uint gis_extra2_len= 0;
+ size_t period_info_len= create_info->period_info.name
+ ? extra2_str_size(create_info->period_info.name.length)
+ + extra2_str_size(create_info->period_info.constr->name.length)
+ + 2 * frm_fieldno_size
+ : 0;
+ uint e_unique_hash_extra_parts= 0;
uchar fileinfo[FRM_HEADER_SIZE],forminfo[FRM_FORMINFO_SIZE];
const partition_info *part_info= IF_PARTITIONING(thd->work_part_info, 0);
bool error;
@@ -238,7 +248,7 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
DBUG_PRINT("info", ("Options length: %u", options_len));
if (validate_comment_length(thd, &create_info->comment, TABLE_COMMENT_MAXLEN,
- ER_TOO_LONG_TABLE_COMMENT, table->str))
+ ER_TOO_LONG_TABLE_COMMENT, table.str))
DBUG_RETURN(frm);
/*
If table comment is longer than TABLE_COMMENT_INLINE_MAXLEN bytes,
@@ -272,28 +282,35 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
prepare_frm_header(thd, reclength, fileinfo, create_info, keys, key_info);
/* one byte for a type, one or three for a length */
- size_t extra2_size= 1 + 1 + create_info->tabledef_version.length;
+ size_t extra2_size= 1 + extra2_str_size(create_info->tabledef_version.length);
if (options_len)
- extra2_size+= 1 + (options_len > 255 ? 3 : 1) + options_len;
+ extra2_size+= 1 + extra2_str_size(options_len);
if (part_info)
- extra2_size+= 1 + 1 + hton_name(part_info->default_engine_type)->length;
+ extra2_size+= 1 + extra2_str_size(hton_name(part_info->default_engine_type)->length);
if (gis_extra2_len)
- extra2_size+= 1 + (gis_extra2_len > 255 ? 3 : 1) + gis_extra2_len;
+ extra2_size+= 1 + extra2_str_size(gis_extra2_len);
if (create_info->versioned())
{
- extra2_size+= 1 + 1 + 2 * sizeof(uint16);
+ extra2_size+= 1 + extra2_str_size(2 * frm_fieldno_size);
+ }
+
+ if (create_info->period_info.name)
+ {
+ extra2_size+= 1 + extra2_str_size(period_info_len);
}
bool has_extra2_field_flags_= has_extra2_field_flags(create_fields);
if (has_extra2_field_flags_)
{
- extra2_size+= 1 + (create_fields.elements > 255 ? 3 : 1) +
- create_fields.elements;
+ extra2_size+= 1 + extra2_str_size(create_fields.elements);
}
+ for (i= 0; i < keys; i++)
+ if (key_info[i].algorithm == HA_KEY_ALG_LONG_HASH)
+ e_unique_hash_extra_parts++;
key_buff_length= uint4korr(fileinfo+47);
frm.length= FRM_HEADER_SIZE; // fileinfo;
@@ -313,7 +330,7 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
if (frm.length > FRM_MAX_SIZE ||
create_info->expression_length > UINT_MAX32)
{
- my_error(ER_TABLE_DEFINITION_TOO_BIG, MYF(0), table->str);
+ my_error(ER_TABLE_DEFINITION_TOO_BIG, MYF(0), table.str);
DBUG_RETURN(frm);
}
@@ -326,11 +343,11 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
pos = frm_ptr + 64;
compile_time_assert(EXTRA2_TABLEDEF_VERSION != '/');
pos= extra2_write(pos, EXTRA2_TABLEDEF_VERSION,
- &create_info->tabledef_version);
+ create_info->tabledef_version);
if (part_info)
pos= extra2_write(pos, EXTRA2_DEFAULT_PART_ENGINE,
- hton_name(part_info->default_engine_type));
+ *hton_name(part_info->default_engine_type));
if (options_len)
{
@@ -349,14 +366,32 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
}
#endif /*HAVE_SPATIAL*/
+ // PERIOD
+ if (create_info->period_info.is_set())
+ {
+ *pos++= EXTRA2_APPLICATION_TIME_PERIOD;
+ pos= extra2_write_len(pos, period_info_len);
+ pos= extra2_write_str(pos, create_info->period_info.name);
+ pos= extra2_write_str(pos, create_info->period_info.constr->name);
+
+ store_frm_fieldno(pos, get_fieldno_by_name(create_info, create_fields,
+ create_info->period_info.period.start));
+ pos+= frm_fieldno_size;
+ store_frm_fieldno(pos, get_fieldno_by_name(create_info, create_fields,
+ create_info->period_info.period.end));
+ pos+= frm_fieldno_size;
+ }
+
if (create_info->versioned())
{
*pos++= EXTRA2_PERIOD_FOR_SYSTEM_TIME;
- *pos++= 2 * sizeof(uint16);
- int2store(pos, vers_get_field(create_info, create_fields, ROW_START));
- pos+= sizeof(uint16);
- int2store(pos, vers_get_field(create_info, create_fields, ROW_END));
- pos+= sizeof(uint16);
+ *pos++= 2 * frm_fieldno_size;
+ store_frm_fieldno(pos, get_fieldno_by_name(create_info, create_fields,
+ create_info->vers_info.as_row.start));
+ pos+= frm_fieldno_size;
+ store_frm_fieldno(pos, get_fieldno_by_name(create_info, create_fields,
+ create_info->vers_info.as_row.end));
+ pos+= frm_fieldno_size;
}
if (has_extra2_field_flags_)
@@ -366,13 +401,13 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
pos+= 4;
DBUG_ASSERT(pos == frm_ptr + uint2korr(fileinfo+6));
- key_info_length= pack_keys(pos, keys, key_info, data_offset);
+ key_info_length= pack_keys(pos, keys, key_info, data_offset, e_unique_hash_extra_parts);
if (key_info_length > UINT_MAX16)
{
my_printf_error(ER_CANT_CREATE_TABLE,
"Cannot create table %`s: index information is too long. "
"Decrease number of indexes or use shorter index names or shorter comments.",
- MYF(0), table->str);
+ MYF(0), table.str);
goto err;
}
@@ -476,60 +511,10 @@ err:
}
-/**
- Create a frm (table definition) file and the tables
-
- @param thd Thread handler
- @param frm Binary frm image of the table to create
- @param path Name of file (including database, without .frm)
- @param db Data base name
- @param table_name Table name
- @param create_info create info parameters
- @param file Handler to use or NULL if only frm needs to be created
-
- @retval 0 ok
- @retval 1 error
-*/
-
-int rea_create_table(THD *thd, LEX_CUSTRING *frm,
- const char *path, const char *db, const char *table_name,
- HA_CREATE_INFO *create_info, handler *file,
- bool no_ha_create_table)
-{
- DBUG_ENTER("rea_create_table");
-
- if (no_ha_create_table)
- {
- if (writefrm(path, db, table_name, true, frm->str, frm->length))
- goto err_frm;
- }
-
- if (thd->variables.keep_files_on_create)
- create_info->options|= HA_CREATE_KEEP_FILES;
-
- if (file->ha_create_partitioning_metadata(path, NULL, CHF_CREATE_FLAG))
- goto err_part;
-
- if (!no_ha_create_table)
- {
- if (ha_create_table(thd, path, db, table_name, create_info, frm))
- goto err_part;
- }
-
- DBUG_RETURN(0);
-
-err_part:
- file->ha_create_partitioning_metadata(path, NULL, CHF_DELETE_FLAG);
-err_frm:
- deletefrm(path);
- DBUG_RETURN(1);
-} /* rea_create_table */
-
-
/* Pack keyinfo and keynames to keybuff for save in form-file. */
static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
- ulong data_offset)
+ ulong data_offset, uint e_unique_hash_extra_parts)
{
uint key_parts,length;
uchar *pos, *keyname_pos;
@@ -591,6 +576,7 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
}
}
+ key_parts+= e_unique_hash_extra_parts;
if (key_count > 127 || key_parts > 127)
{
keybuff[0]= (key_count & 0x7f) | 0x80;
@@ -657,7 +643,7 @@ static bool pack_vcols(String *buf, List<Create_field> &create_fields,
for (uint field_nr=0; (field= it++); field_nr++)
{
- if (field->vcol_info)
+ if (field->vcol_info && field->vcol_info->expr)
if (pack_expression(buf, field->vcol_info, field_nr,
field->vcol_info->stored_in_db
? VCOL_GENERATED_STORED : VCOL_GENERATED_VIRTUAL))
@@ -914,32 +900,12 @@ static bool pack_fields(uchar **buff_arg, List<Create_field> &create_fields,
while ((field=it++))
{
uint recpos;
- int2store(buff+3, field->length);
/* The +1 is here becasue the col offset in .frm file have offset 1 */
recpos= field->offset+1 + (uint) data_offset;
int3store(buff+5,recpos);
- int2store(buff+8,field->pack_flag);
- buff[10]= (uchar) field->unireg_check;
buff[12]= (uchar) field->interval_id;
- buff[13]= (uchar) field->real_field_type();
- if (field->real_field_type() == MYSQL_TYPE_GEOMETRY)
- {
- buff[11]= 0;
- buff[14]= (uchar) field->geom_type;
-#ifndef HAVE_SPATIAL
- DBUG_ASSERT(0); // Should newer happen
-#endif
- }
- else if (field->charset)
- {
- buff[11]= (uchar) (field->charset->number >> 8);
- buff[14]= (uchar) field->charset->number;
- }
- else
- {
- buff[11]= buff[14]= 0; // Numerical
- }
-
+ buff[13]= (uchar) field->type_handler()->real_field_type();
+ field->type_handler()->Column_definition_attributes_frm_pack(field, buff);
int2store(buff+15, field->comment.length);
comment_length+= field->comment.length;
set_if_bigger(int_count,field->interval_id);
@@ -1029,13 +995,37 @@ static bool pack_fields(uchar **buff_arg, List<Create_field> &create_fields,
DBUG_RETURN(0);
}
+
+static bool make_empty_rec_store_default(THD *thd, Field *regfield,
+ Create_field *field)
+{
+ Virtual_column_info *default_value= field->default_value;
+ if (!field->vers_sys_field() && default_value && !default_value->flags)
+ {
+ Item *expr= default_value->expr;
+ // may be already fixed if ALTER TABLE
+ if (expr->fix_fields_if_needed(thd, &expr))
+ return true;
+ DBUG_ASSERT(expr == default_value->expr); // Should not change
+ if (regfield->make_empty_rec_store_default_value(thd, expr))
+ {
+ my_error(ER_INVALID_DEFAULT, MYF(0), regfield->field_name.str);
+ return true;
+ }
+ return false;
+ }
+ regfield->make_empty_rec_reset(thd);
+ return false;
+}
+
+
/* save an empty record on start of formfile */
static bool make_empty_rec(THD *thd, uchar *buff, uint table_options,
List<Create_field> &create_fields,
uint reclength, ulong data_offset)
{
- int error= 0;
+ int error= false;
uint null_count;
uchar *null_pos;
TABLE table;
@@ -1063,24 +1053,19 @@ static bool make_empty_rec(THD *thd, uchar *buff, uint table_options,
List_iterator<Create_field> it(create_fields);
while ((field=it++))
{
+ Record_addr addr(buff + field->offset + data_offset,
+ null_pos + null_count / 8, null_count & 7);
+ Column_definition_attributes tmp(*field);
+ tmp.interval= field->save_interval ?
+ field->save_interval : field->interval;
/* regfield don't have to be deleted as it's allocated on THD::mem_root */
- Field *regfield= make_field(&share, thd->mem_root,
- buff+field->offset + data_offset,
- (uint32)field->length,
- null_pos + null_count / 8,
- null_count & 7,
- field->pack_flag,
- field->type_handler(),
- field->charset,
- field->geom_type, field->srid,
- field->unireg_check,
- field->save_interval ? field->save_interval
- : field->interval,
- &field->field_name,
- field->flags);
+ Field *regfield= tmp.make_field(&share, thd->mem_root, &addr,
+ field->type_handler(),
+ &field->field_name,
+ field->flags);
if (!regfield)
{
- error= 1;
+ error= true;
goto err; // End of memory
}
@@ -1097,38 +1082,10 @@ static bool make_empty_rec(THD *thd, uchar *buff, uint table_options,
!f_bit_as_char(field->pack_flag))
null_count+= field->length & 7;
- if (field->default_value && !field->default_value->flags &&
- !field->vers_sys_field() &&
- (!(field->flags & BLOB_FLAG) ||
- field->real_field_type() == MYSQL_TYPE_GEOMETRY))
- {
- Item *expr= field->default_value->expr;
- // may be already fixed if ALTER TABLE
- int res= expr->fix_fields_if_needed(thd, &expr);
- if (!res)
- res= expr->save_in_field(regfield, 1);
- if (!res && (field->flags & BLOB_FLAG))
- regfield->reset();
-
- /* If not ok or warning of level 'note' */
- if (res != 0 && res != 3)
- {
- my_error(ER_INVALID_DEFAULT, MYF(0), regfield->field_name.str);
- error= 1;
- delete regfield; //To avoid memory leak
- goto err;
- }
- delete regfield; //To avoid memory leak
- }
- else if (regfield->real_type() == MYSQL_TYPE_ENUM &&
- !field->vers_sys_field() &&
- (field->flags & NOT_NULL_FLAG))
- {
- regfield->set_notnull();
- regfield->store((longlong) 1, TRUE);
- }
- else
- regfield->reset();
+ error= make_empty_rec_store_default(thd, regfield, field);
+ delete regfield; // Avoid memory leaks
+ if (error)
+ goto err;
}
DBUG_ASSERT(data_offset == ((null_count + 7) / 8));
diff --git a/sql/unireg.h b/sql/unireg.h
index 03d63d0fd06..dd003cd0b3f 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -56,11 +56,6 @@
#endif
#define ER_THD_OR_DEFAULT(thd,X) ((thd) ? ER_THD(thd, (X)) : ER_DEFAULT(X))
-
-#define ME_INFO (ME_HOLDTANG | ME_NOREFRESH)
-#define ME_ERROR (ME_BELL | ME_NOREFRESH)
-#define MYF_RW MYF(MY_WME+MY_NABP) /* Vid my_read & my_write */
-
#define SPECIAL_USE_LOCKS 1 /* Lock used databases */
#define SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */
#define SPECIAL_SKIP_SHOW_DB 4 /* Don't allow 'show db' */
@@ -176,6 +171,7 @@ enum extra2_frm_value_type {
EXTRA2_TABLEDEF_VERSION=0,
EXTRA2_DEFAULT_PART_ENGINE=1,
EXTRA2_GIS=2,
+ EXTRA2_APPLICATION_TIME_PERIOD=3,
EXTRA2_PERIOD_FOR_SYSTEM_TIME=4,
#define EXTRA2_ENGINE_IMPORTANT 128
@@ -185,29 +181,12 @@ enum extra2_frm_value_type {
};
enum extra2_field_flags {
- VERS_OPTIMIZED_UPDATE= 1 << INVISIBLE_MAX_BITS
+ VERS_OPTIMIZED_UPDATE= 1 << INVISIBLE_MAX_BITS,
};
-static inline size_t extra2_read_len(const uchar **extra2, const uchar *end)
-{
- size_t length= *(*extra2)++;
- if (length)
- return length;
-
- if ((*extra2) + 2 >= end)
- return 0;
- length= uint2korr(*extra2);
- (*extra2)+= 2;
- if (length < 256 || *extra2 + length > end)
- return 0;
- return length;
-}
+size_t extra2_read_len(const uchar **extra2, const uchar *end);
-int rea_create_table(THD *thd, LEX_CUSTRING *frm,
- const char *path, const char *db, const char *table_name,
- HA_CREATE_INFO *create_info, handler *file,
- bool no_ha_create_table);
-LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING *table,
+LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING &table,
HA_CREATE_INFO *create_info,
List<Create_field> &create_fields,
uint keys, KEY *key_info, handler *db_file);
diff --git a/sql/vers_string.h b/sql/vers_string.h
index 3709cdbf786..cfadc890dcd 100644
--- a/sql/vers_string.h
+++ b/sql/vers_string.h
@@ -39,6 +39,8 @@ struct Compare_identifiers
{
int operator()(const LEX_CSTRING& a, const LEX_CSTRING& b) const
{
+ DBUG_ASSERT(a.str != NULL);
+ DBUG_ASSERT(b.str != NULL);
DBUG_ASSERT(a.str[a.length] == 0);
DBUG_ASSERT(b.str[b.length] == 0);
return my_strcasecmp(system_charset_info, a.str, b.str);
@@ -58,6 +60,12 @@ class Lex_cstring : public LEX_CSTRING
str= _str;
length= _len;
}
+ Lex_cstring(const char *start, const char *end)
+ {
+ DBUG_ASSERT(start <= end);
+ str= start;
+ length= end - start;
+ }
void set(const char *_str, size_t _len)
{
str= _str;
diff --git a/sql/vers_utils.h b/sql/vers_utils.h
index e896f84135e..2bea191da9e 100644
--- a/sql/vers_utils.h
+++ b/sql/vers_utils.h
@@ -5,43 +5,4 @@
#include "sql_class.h"
#include "vers_string.h"
-class MDL_auto_lock
-{
- THD *thd;
- TABLE_LIST &table;
- bool error;
-
-public:
- MDL_auto_lock(THD *_thd, TABLE_LIST &_table) :
- thd(_thd), table(_table)
- {
- DBUG_ASSERT(thd);
- MDL_request protection_request;
- if (thd->global_read_lock.can_acquire_protection())
- {
- error= true;
- return;
- }
- protection_request.init(MDL_key::GLOBAL, "", "", MDL_INTENTION_EXCLUSIVE,
- MDL_EXPLICIT);
- error= thd->mdl_context.acquire_lock(&protection_request, thd->variables.lock_wait_timeout);
- if (error)
- return;
-
- table.mdl_request.init(MDL_key::TABLE, table.db.str, table.table_name.str, MDL_EXCLUSIVE, MDL_EXPLICIT);
- error= thd->mdl_context.acquire_lock(&table.mdl_request, thd->variables.lock_wait_timeout);
- thd->mdl_context.release_lock(protection_request.ticket);
- }
- ~MDL_auto_lock()
- {
- if (!error)
- {
- DBUG_ASSERT(table.mdl_request.ticket);
- thd->mdl_context.release_lock(table.mdl_request.ticket);
- table.mdl_request.ticket= NULL;
- }
- }
- bool acquire_error() const { return error; }
-};
-
#endif // VERS_UTILS_INCLUDED
diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc
index bc9b68400f4..fd51dbf9439 100644
--- a/sql/wsrep_applier.cc
+++ b/sql/wsrep_applier.cc
@@ -14,12 +14,17 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. */
#include "mariadb.h"
+#include "mysql/service_wsrep.h"
+#include "wsrep_applier.h"
+
#include "wsrep_priv.h"
#include "wsrep_binlog.h" // wsrep_dump_rbr_buf()
#include "wsrep_xid.h"
+#include "wsrep_thd.h"
+#include "wsrep_trans_observer.h"
+#include "slave.h" // opt_log_slave_updates
#include "log_event.h" // class THD, EVENT_LEN_OFFSET, etc.
-#include "wsrep_applier.h"
#include "debug_sync.h"
/*
@@ -27,7 +32,6 @@
At the end (*buf) is shitfed to point to the following event or NULL and
(*buf_len) will be changed to account just being read bytes of the 1st event.
*/
-
static Log_event* wsrep_read_log_event(
char **arg_buf, size_t *arg_buf_len,
const Format_description_log_event *description_event)
@@ -35,7 +39,7 @@ static Log_event* wsrep_read_log_event(
DBUG_ENTER("wsrep_read_log_event");
char *head= (*arg_buf);
- uint data_len = uint4korr(head + EVENT_LEN_OFFSET);
+ uint data_len= uint4korr(head + EVENT_LEN_OFFSET);
char *buf= (*arg_buf);
const char *error= 0;
Log_event *res= 0;
@@ -62,12 +66,13 @@ void wsrep_set_apply_format(THD* thd, Format_description_log_event* ev)
{
if (thd->wsrep_apply_format)
{
- delete (Format_description_log_event*)thd->wsrep_apply_format;
+ delete (Format_description_log_event*)thd->wsrep_apply_format;
}
thd->wsrep_apply_format= ev;
}
-Format_description_log_event* wsrep_get_apply_format(THD* thd)
+Format_description_log_event*
+wsrep_get_apply_format(THD* thd)
{
if (thd->wsrep_apply_format)
{
@@ -79,45 +84,77 @@ Format_description_log_event* wsrep_get_apply_format(THD* thd)
return thd->wsrep_rgi->rli->relay_log.description_event_for_exec;
}
-static wsrep_cb_status_t wsrep_apply_events(THD* thd,
- const void* events_buf,
- size_t buf_len)
+void wsrep_apply_error::store(const THD* const thd)
{
- char *buf= (char *)events_buf;
- int rcode= 0;
- int event= 1;
- Log_event_type typ;
+ Diagnostics_area::Sql_condition_iterator it=
+ thd->get_stmt_da()->sql_conditions();
+ const Sql_condition* cond;
- DBUG_ENTER("wsrep_apply_events");
+ static size_t const max_len= 2*MAX_SLAVE_ERRMSG; // 2x so that we have enough
+
+ if (NULL == str_)
+ {
+ // this must be freeable by standard free()
+ str_= static_cast<char*>(malloc(max_len));
+ if (NULL == str_)
+ {
+ WSREP_ERROR("Failed to allocate %zu bytes for error buffer.", max_len);
+ len_= 0;
+ return;
+ }
+ }
+ else
+ {
+ /* This is possible when we invoke rollback after failed applying.
+ * In this situation DA should not be reset yet and should contain
+ * all previous errors from applying and new ones from rollbacking,
+ * so we just overwrite is from scratch */
+ }
- if (thd->killed == KILL_CONNECTION &&
- thd->wsrep_conflict_state != REPLAYING)
+ char* slider= str_;
+ const char* const buf_end= str_ + max_len - 1; // -1: leave space for \0
+
+ for (cond= it++; cond && slider < buf_end; cond= it++)
{
- WSREP_INFO("applier has been aborted, skipping apply_rbr: %lld",
- (long long) wsrep_thd_trx_seqno(thd));
- DBUG_RETURN(WSREP_CB_FAILURE);
+ uint const err_code= cond->get_sql_errno();
+ const char* const err_str= cond->get_message_text();
+
+ slider+= my_snprintf(slider, buf_end - slider, " %s, Error_code: %d;",
+ err_str, err_code);
}
- mysql_mutex_lock(&thd->LOCK_thd_data);
- wsrep_thd_set_query_state(thd, QUERY_EXEC);
- if (thd->wsrep_conflict_state!= REPLAYING)
- thd->wsrep_conflict_state= NO_CONFLICT;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
+ *slider= '\0';
+ len_= slider - str_ + 1; // +1: add \0
+
+ WSREP_DEBUG("Error buffer for thd %llu seqno %lld, %zu bytes: %s",
+ thd->thread_id, (long long)wsrep_thd_trx_seqno(thd),
+ len_, str_ ? str_ : "(null)");
+}
+
+int wsrep_apply_events(THD* thd,
+ Relay_log_info* rli,
+ const void* events_buf,
+ size_t buf_len)
+{
+ char *buf= (char *)events_buf;
+ int rcode= 0;
+ int event= 1;
+ Log_event_type typ;
+ DBUG_ENTER("wsrep_apply_events");
if (!buf_len) WSREP_DEBUG("empty rbr buffer to apply: %lld",
(long long) wsrep_thd_trx_seqno(thd));
- while(buf_len)
+ while (buf_len)
{
int exec_res;
Log_event* ev= wsrep_read_log_event(&buf, &buf_len,
- wsrep_get_apply_format(thd));
-
+ wsrep_get_apply_format(thd));
if (!ev)
{
WSREP_ERROR("applier could not read binlog event, seqno: %lld, len: %zu",
(long long)wsrep_thd_trx_seqno(thd), buf_len);
- rcode= 1;
+ rcode= WSREP_ERR_BAD_EVENT;
goto error;
}
@@ -147,9 +184,6 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
thd->set_server_id(ev->server_id);
thd->set_time(); // time the query
thd->transaction.start_time.reset(thd);
- wsrep_xid_init(&thd->transaction.xid_state.xid,
- thd->wsrep_trx_meta.gtid.uuid,
- thd->wsrep_trx_meta.gtid.seqno);
thd->lex->current_select= 0;
if (!ev->when)
{
@@ -162,13 +196,13 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
(thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) |
(ev->flags & LOG_EVENT_SKIP_REPLICATION_F ? OPTION_SKIP_REPLICATION : 0);
- ev->thd = thd;
- exec_res = ev->apply_event(thd->wsrep_rgi);
+ ev->thd= thd;
+ exec_res= ev->apply_event(thd->wsrep_rgi);
DBUG_PRINT("info", ("exec_event result: %d", exec_res));
if (exec_res)
{
- WSREP_WARN("RBR event %d %s apply warning: %d, %lld",
+ WSREP_WARN("Event %d %s apply failed: %d, seqno %lld",
event, ev->get_type_str(), exec_res,
(long long) wsrep_thd_trx_seqno(thd));
rcode= exec_res;
@@ -178,230 +212,14 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
}
event++;
- if (thd->wsrep_conflict_state!= NO_CONFLICT &&
- thd->wsrep_conflict_state!= REPLAYING)
- WSREP_WARN("conflict state after RBR event applying: %d, %lld",
- thd->wsrep_query_state, (long long)wsrep_thd_trx_seqno(thd));
-
- if (thd->wsrep_conflict_state == MUST_ABORT) {
- WSREP_WARN("RBR event apply failed, rolling back: %lld",
- (long long) wsrep_thd_trx_seqno(thd));
- trans_rollback(thd);
- thd->locked_tables_list.unlock_locked_tables(thd);
- /* Release transactional metadata locks. */
- thd->release_transactional_locks();
- thd->wsrep_conflict_state= NO_CONFLICT;
- DBUG_RETURN(WSREP_CB_FAILURE);
- }
-
delete_or_keep_event_post_apply(thd->wsrep_rgi, typ, ev);
}
- error:
- mysql_mutex_lock(&thd->LOCK_thd_data);
- wsrep_thd_set_query_state(thd, QUERY_IDLE);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-
- assert(thd->wsrep_exec_mode== REPL_RECV);
-
+error:
if (thd->killed == KILL_CONNECTION)
WSREP_INFO("applier aborted: %lld", (long long)wsrep_thd_trx_seqno(thd));
- if (rcode) DBUG_RETURN(WSREP_CB_FAILURE);
- DBUG_RETURN(WSREP_CB_SUCCESS);
-}
-
-wsrep_cb_status_t wsrep_apply_cb(void* const ctx,
- const void* const buf,
- size_t const buf_len,
- uint32_t const flags,
- const wsrep_trx_meta_t* meta)
-{
- THD* const thd((THD*)ctx);
-
- assert(thd->wsrep_apply_toi == false);
-
- // Allow tests to block the applier thread using the DBUG facilities.
- DBUG_EXECUTE_IF("sync.wsrep_apply_cb",
- {
- const char act[]=
- "now "
- "SIGNAL sync.wsrep_apply_cb_reached "
- "WAIT_FOR signal.wsrep_apply_cb";
- DBUG_ASSERT(!debug_sync_set_action(thd,
- STRING_WITH_LEN(act)));
- };);
-
- thd->wsrep_trx_meta = *meta;
-
-#ifdef WSREP_PROC_INFO
- snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1,
- "Applying write set %lld: %p, %zu",
- (long long)wsrep_thd_trx_seqno(thd), buf, buf_len);
- thd_proc_info(thd, thd->wsrep_info);
-#else
- thd_proc_info(thd, "Applying write set");
-#endif /* WSREP_PROC_INFO */
-
- /* tune FK and UK checking policy */
- if (wsrep_slave_UK_checks == FALSE)
- thd->variables.option_bits|= OPTION_RELAXED_UNIQUE_CHECKS;
- else
- thd->variables.option_bits&= ~OPTION_RELAXED_UNIQUE_CHECKS;
-
- if (wsrep_slave_FK_checks == FALSE)
- thd->variables.option_bits|= OPTION_NO_FOREIGN_KEY_CHECKS;
- else
- thd->variables.option_bits&= ~OPTION_NO_FOREIGN_KEY_CHECKS;
-
- /* With galera we assume that the master has done the constraint checks */
- thd->variables.option_bits|= OPTION_NO_CHECK_CONSTRAINT_CHECKS;
-
- if (flags & WSREP_FLAG_ISOLATION)
- {
- thd->wsrep_apply_toi= true;
- /*
- Don't run in transaction mode with TOI actions.
- */
- thd->variables.option_bits&= ~OPTION_BEGIN;
- thd->server_status&= ~SERVER_STATUS_IN_TRANS;
- }
- wsrep_cb_status_t rcode(wsrep_apply_events(thd, buf, buf_len));
-
-#ifdef WSREP_PROC_INFO
- snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1,
- "Applied write set %lld", (long long)wsrep_thd_trx_seqno(thd));
- thd_proc_info(thd, thd->wsrep_info);
-#else
- thd_proc_info(thd, "Applied write set");
-#endif /* WSREP_PROC_INFO */
-
- if (WSREP_CB_SUCCESS != rcode)
- {
- wsrep_dump_rbr_buf_with_header(thd, buf, buf_len);
- }
-
- if (thd->has_thd_temporary_tables())
- {
- WSREP_DEBUG("Applier %lld has temporary tables. Closing them now..",
- thd->thread_id);
- thd->close_temporary_tables();
- }
-
- return rcode;
-}
-
-static wsrep_cb_status_t wsrep_commit(THD* const thd)
-{
-#ifdef WSREP_PROC_INFO
- snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1,
- "Committing %lld", (long long)wsrep_thd_trx_seqno(thd));
- thd_proc_info(thd, thd->wsrep_info);
-#else
- thd_proc_info(thd, "Committing");
-#endif /* WSREP_PROC_INFO */
-
- wsrep_cb_status_t const rcode(trans_commit(thd) ?
- WSREP_CB_FAILURE : WSREP_CB_SUCCESS);
-
- if (WSREP_CB_SUCCESS == rcode)
- {
- thd->wsrep_rgi->cleanup_context(thd, false);
-#ifdef GTID_SUPPORT
- thd->variables.gtid_next.set_automatic();
-#endif /* GTID_SUPPORT */
- if (thd->wsrep_apply_toi)
- {
- wsrep_set_SE_checkpoint(thd->wsrep_trx_meta.gtid.uuid,
- thd->wsrep_trx_meta.gtid.seqno);
- }
- }
-
-#ifdef WSREP_PROC_INFO
- snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1,
- "Committed %lld", (long long) wsrep_thd_trx_seqno(thd));
- thd_proc_info(thd, thd->wsrep_info);
-#else
- thd_proc_info(thd, "Committed");
-#endif /* WSREP_PROC_INFO */
-
- return rcode;
-}
-
-static wsrep_cb_status_t wsrep_rollback(THD* const thd)
-{
-#ifdef WSREP_PROC_INFO
- snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1,
- "Rolling back %lld", (long long)wsrep_thd_trx_seqno(thd));
- thd_proc_info(thd, thd->wsrep_info);
-#else
- thd_proc_info(thd, "Rolling back");
-#endif /* WSREP_PROC_INFO */
-
- wsrep_cb_status_t const rcode(trans_rollback(thd) ?
- WSREP_CB_FAILURE : WSREP_CB_SUCCESS);
-
-#ifdef WSREP_PROC_INFO
- snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1,
- "Rolled back %lld", (long long)wsrep_thd_trx_seqno(thd));
- thd_proc_info(thd, thd->wsrep_info);
-#else
- thd_proc_info(thd, "Rolled back");
-#endif /* WSREP_PROC_INFO */
-
- return rcode;
-}
-
-wsrep_cb_status_t wsrep_commit_cb(void* const ctx,
- uint32_t const flags,
- const wsrep_trx_meta_t* meta,
- wsrep_bool_t* const exit,
- bool const commit)
-{
- THD* const thd((THD*)ctx);
-
- assert(meta->gtid.seqno >= wsrep_thd_trx_seqno(thd));
-
- wsrep_cb_status_t rcode;
-
- if (commit)
- rcode = wsrep_commit(thd);
- else
- rcode = wsrep_rollback(thd);
-
- /* Cleanup */
wsrep_set_apply_format(thd, NULL);
- thd->release_transactional_locks();
- thd->reset_query(); /* Mutex protected */
- free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- if (wsrep_slave_count_change < 0 && commit && WSREP_CB_SUCCESS == rcode)
- {
- mysql_mutex_lock(&LOCK_wsrep_slave_threads);
- if (wsrep_slave_count_change < 0)
- {
- wsrep_slave_count_change++;
- *exit = true;
- }
- mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
- }
-
- if (thd->wsrep_applier)
- {
- /* From trans_begin() */
- thd->variables.option_bits|= OPTION_BEGIN;
- thd->server_status|= SERVER_STATUS_IN_TRANS;
- thd->wsrep_apply_toi= false;
- }
-
- return rcode;
-}
-
-
-wsrep_cb_status_t wsrep_unordered_cb(void* const ctx,
- const void* const data,
- size_t const size)
-{
- return WSREP_CB_SUCCESS;
+ DBUG_RETURN(rcode);
}
diff --git a/sql/wsrep_applier.h b/sql/wsrep_applier.h
index 3cfcd556ae8..70361987cc7 100644
--- a/sql/wsrep_applier.h
+++ b/sql/wsrep_applier.h
@@ -1,4 +1,4 @@
-/* Copyright 2013 Codership Oy <http://www.codership.com>
+/* Copyright 2013-2015 Codership Oy <http://www.codership.com>
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
@@ -17,28 +17,57 @@
#define WSREP_APPLIER_H
#include <my_config.h>
-#include "../wsrep/wsrep_api.h"
-void wsrep_set_apply_format(THD* thd, Format_description_log_event* ev);
-Format_description_log_event* wsrep_get_apply_format(THD* thd);
+#include "sql_class.h" // THD class
+
+int wsrep_apply_events(THD* thd,
+ Relay_log_info* rli,
+ const void* events_buf,
+ size_t buf_len);
-/* wsrep callback prototypes */
-extern "C" {
-wsrep_cb_status_t wsrep_apply_cb(void *ctx,
- const void* buf, size_t buf_len,
- uint32_t flags,
- const wsrep_trx_meta_t* meta);
+/* Applier error codes, when nothing better is available. */
+#define WSREP_RET_SUCCESS 0 // Success
+#define WSREP_ERR_GENERIC 1 // When in doubt (MySQL default error code)
+#define WSREP_ERR_BAD_EVENT 2 // Can't parse event
+#define WSREP_ERR_NOT_FOUND 3 // Key. table, schema not found
+#define WSREP_ERR_EXISTS 4 // Key, table, schema already exists
+#define WSREP_ERR_WRONG_TYPE 5 // Incompatible data type
+#define WSREP_ERR_FAILED 6 // Operation failed for some internal reason
+#define WSREP_ERR_ABORTED 7 // Operation was aborted externally
-wsrep_cb_status_t wsrep_commit_cb(void *ctx,
- uint32_t flags,
- const wsrep_trx_meta_t* meta,
- wsrep_bool_t* exit,
- bool commit);
+class wsrep_apply_error
+{
+public:
+ wsrep_apply_error() : str_(NULL), len_(0) {};
+ ~wsrep_apply_error() { ::free(str_); }
+ /* stores the current THD error info from the diagnostic area. Works only
+ * once, subsequent invocations are ignored in order to preserve the original
+ * condition. */
+ void store(const THD* thd);
+ const char* c_str() const { return str_; }
+ size_t length() const { return len_; }
+ bool is_null() const { return (c_str() == NULL && length() == 0); }
+ wsrep_buf_t get_buf() const
+ {
+ wsrep_buf_t ret= { c_str(), length() };
+ return ret;
+ }
+private:
+ char* str_;
+ size_t len_;
+};
+
+class Format_description_log_event;
+void wsrep_set_apply_format(THD*, Format_description_log_event*);
+Format_description_log_event* wsrep_get_apply_format(THD* thd);
+int wsrep_apply(void* ctx,
+ uint32_t flags,
+ const wsrep_buf_t* buf,
+ const wsrep_trx_meta_t* meta,
+ wsrep_apply_error& err);
-wsrep_cb_status_t wsrep_unordered_cb(void* ctx,
- const void* data,
- size_t size);
+wsrep_cb_status_t wsrep_unordered_cb(void* ctx,
+ const wsrep_buf_t* data);
-} /* extern "C" */
#endif /* WSREP_APPLIER_H */
diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc
index 85c1deb0d71..2b2c948bb1a 100644
--- a/sql/wsrep_binlog.cc
+++ b/sql/wsrep_binlog.cc
@@ -14,11 +14,15 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. */
#include "mariadb.h"
+#include "mysql/service_wsrep.h"
#include "wsrep_binlog.h"
-#include "wsrep_priv.h"
#include "log.h"
+#include "slave.h"
#include "log_event.h"
#include "wsrep_applier.h"
+#include "wsrep_mysqld.h"
+
+#include "transaction.h"
extern handlerton *binlog_hton;
/*
@@ -40,10 +44,10 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len)
DBUG_RETURN(ER_ERROR_ON_WRITE);
}
- uint length = my_b_bytes_in_cache(cache);
- if (unlikely(0 == length)) length = my_b_fill(cache);
+ uint length= my_b_bytes_in_cache(cache);
+ if (unlikely(0 == length)) length= my_b_fill(cache);
- size_t total_length = 0;
+ size_t total_length= 0;
if (likely(length > 0)) do
{
@@ -60,7 +64,7 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len)
wsrep_max_ws_size, total_length);
goto error;
}
- uchar* tmp = (uchar *)my_realloc(*buf, total_length,
+ uchar* tmp= (uchar *)my_realloc(*buf, total_length,
MYF(MY_ALLOW_ZERO_PTR));
if (!tmp)
{
@@ -68,17 +72,17 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len)
*buf_len, length);
goto error;
}
- *buf = tmp;
+ *buf= tmp;
memcpy(*buf + *buf_len, cache->read_pos, length);
- *buf_len = total_length;
+ *buf_len= total_length;
if (cache->file < 0)
{
cache->read_pos= cache->read_end;
break;
}
- } while ((length = my_b_fill(cache)));
+ } while ((length= my_b_fill(cache)));
if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0))
{
@@ -104,137 +108,6 @@ cleanup:
* many transactions would fit in there
* so there is no need to reach for the heap */
-/* Returns minimum multiple of HEAP_PAGE_SIZE that is >= length */
-static inline size_t
-heap_size(size_t length)
-{
- return (length + HEAP_PAGE_SIZE - 1)/HEAP_PAGE_SIZE*HEAP_PAGE_SIZE;
-}
-
-/* append data to writeset */
-static inline wsrep_status_t
-wsrep_append_data(wsrep_t* const wsrep,
- wsrep_ws_handle_t* const ws,
- const void* const data,
- size_t const len)
-{
- struct wsrep_buf const buff = { data, len };
- wsrep_status_t const rc(wsrep->append_data(wsrep, ws, &buff, 1,
- WSREP_DATA_ORDERED, true));
- DBUG_DUMP("buff", (uchar*) data, len);
- if (rc != WSREP_OK)
- {
- WSREP_WARN("append_data() returned %d", rc);
- }
-
- return rc;
-}
-
-/*
- Write the contents of a cache to wsrep provider.
-
- This function quite the same as MYSQL_BIN_LOG::write_cache(),
- with the exception that here we write in buffer instead of log file.
-
- This version reads all of cache into single buffer and then appends to a
- writeset at once.
- */
-static int wsrep_write_cache_once(wsrep_t* const wsrep,
- THD* const thd,
- IO_CACHE* const cache,
- size_t* const len)
-{
- my_off_t const saved_pos(my_b_tell(cache));
- DBUG_ENTER("wsrep_write_cache_once");
-
- if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0))
- {
- WSREP_ERROR("failed to initialize io-cache");
- DBUG_RETURN(ER_ERROR_ON_WRITE);
- }
-
- int err(WSREP_OK);
-
- size_t total_length(0);
- uchar stack_buf[STACK_SIZE]; /* to avoid dynamic allocations for few data*/
- uchar* heap_buf(NULL);
- uchar* buf(stack_buf);
- size_t allocated(sizeof(stack_buf));
- size_t used(0);
-
- uint length(my_b_bytes_in_cache(cache));
- if (unlikely(0 == length)) length = my_b_fill(cache);
-
- if (likely(length > 0)) do
- {
- total_length += length;
- /*
- Bail out if buffer grows too large.
- A temporary fix to avoid allocating indefinitely large buffer,
- not a real limit on a writeset size which includes other things
- like header and keys.
- */
- if (unlikely(total_length > wsrep_max_ws_size))
- {
- WSREP_WARN("transaction size limit (%lu) exceeded: %zu",
- wsrep_max_ws_size, total_length);
- err = WSREP_TRX_SIZE_EXCEEDED;
- goto cleanup;
- }
-
- if (total_length > allocated)
- {
- size_t const new_size(heap_size(total_length));
- uchar* tmp = (uchar *)my_realloc(heap_buf, new_size,
- MYF(MY_ALLOW_ZERO_PTR));
- if (!tmp)
- {
- WSREP_ERROR("could not (re)allocate buffer: %zu + %u",
- allocated, length);
- err = WSREP_TRX_SIZE_EXCEEDED;
- goto cleanup;
- }
-
- heap_buf = tmp;
- buf = heap_buf;
- allocated = new_size;
-
- if (used <= STACK_SIZE && used > 0) // there's data in stack_buf
- {
- DBUG_ASSERT(buf == stack_buf);
- memcpy(heap_buf, stack_buf, used);
- }
- }
-
- memcpy(buf + used, cache->read_pos, length);
- used = total_length;
- if (cache->file < 0)
- {
- cache->read_pos= cache->read_end;
- break;
- }
- } while ((length = my_b_fill(cache)));
-
- if (used > 0)
- err = wsrep_append_data(wsrep, &thd->wsrep_ws_handle, buf, used);
-
- if (WSREP_OK == err) *len = total_length;
-
-cleanup:
- if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0))
- {
- WSREP_ERROR("failed to reinitialize io-cache");
- }
-
- if (unlikely(WSREP_OK != err))
- {
- wsrep_dump_rbr_buf_with_header(thd, buf, used);
- }
-
- my_free(heap_buf);
- DBUG_RETURN(err);
-}
-
/*
Write the contents of a cache to wsrep provider.
@@ -243,62 +116,58 @@ cleanup:
This version uses incremental data appending as it reads it from cache.
*/
-static int wsrep_write_cache_inc(wsrep_t* const wsrep,
- THD* const thd,
+static int wsrep_write_cache_inc(THD* const thd,
IO_CACHE* const cache,
size_t* const len)
{
- my_off_t const saved_pos(my_b_tell(cache));
- DBUG_ENTER("wsrep_write_cache_inc");
-
- if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0))
- {
- WSREP_ERROR("failed to initialize io-cache");
- DBUG_RETURN(WSREP_TRX_ERROR);
- }
+ DBUG_ENTER("wsrep_write_cache_inc");
+ my_off_t const saved_pos(my_b_tell(cache));
- int err(WSREP_OK);
+ if (reinit_io_cache(cache, READ_CACHE, thd->wsrep_sr().log_position(), 0, 0))
+ {
+ WSREP_ERROR("failed to initialize io-cache");
+ DBUG_RETURN(1);;
+ }
- size_t total_length(0);
+ int ret= 0;
+ size_t total_length(0);
- uint length(my_b_bytes_in_cache(cache));
- if (unlikely(0 == length)) length = my_b_fill(cache);
+ uint length(my_b_bytes_in_cache(cache));
+ if (unlikely(0 == length)) length= my_b_fill(cache);
- if (likely(length > 0)) do
+ if (likely(length > 0))
+ {
+ do
{
- total_length += length;
- /* bail out if buffer grows too large
- not a real limit on a writeset size which includes other things
- like header and keys.
- */
- if (unlikely(total_length > wsrep_max_ws_size))
- {
- WSREP_WARN("transaction size limit (%lu) exceeded: %zu",
- wsrep_max_ws_size, total_length);
- err = WSREP_TRX_SIZE_EXCEEDED;
- goto cleanup;
- }
-
- if(WSREP_OK != (err=wsrep_append_data(wsrep, &thd->wsrep_ws_handle,
- cache->read_pos, length)))
- goto cleanup;
-
- if (cache->file < 0)
- {
- cache->read_pos= cache->read_end;
- break;
- }
- } while ((length = my_b_fill(cache)));
-
- if (WSREP_OK == err) *len = total_length;
-
-cleanup:
- if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0))
+ total_length += length;
+ /* bail out if buffer grows too large
+ not a real limit on a writeset size which includes other things
+ like header and keys.
+ */
+ if (unlikely(total_length > wsrep_max_ws_size))
+ {
+ WSREP_WARN("transaction size limit (%lu) exceeded: %zu",
+ wsrep_max_ws_size, total_length);
+ ret= 1;
+ goto cleanup;
+ }
+ if (thd->wsrep_cs().append_data(wsrep::const_buffer(cache->read_pos, length)))
+ goto cleanup;
+ cache->read_pos= cache->read_end;
+ } while ((cache->file >= 0) && (length= my_b_fill(cache)));
+ if (ret == 0)
{
- WSREP_ERROR("failed to reinitialize io-cache");
+ assert(total_length + thd->wsrep_sr().log_position() == saved_pos);
}
+ }
- DBUG_RETURN(err);
+cleanup:
+ *len= total_length;
+ if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0))
+ {
+ WSREP_ERROR("failed to reinitialize io-cache");
+ }
+ DBUG_RETURN(ret);
}
/*
@@ -307,17 +176,11 @@ cleanup:
This function quite the same as MYSQL_BIN_LOG::write_cache(),
with the exception that here we write in buffer instead of log file.
*/
-int wsrep_write_cache(wsrep_t* const wsrep,
- THD* const thd,
+int wsrep_write_cache(THD* const thd,
IO_CACHE* const cache,
size_t* const len)
{
- if (wsrep_incremental_data_collection) {
- return wsrep_write_cache_inc(wsrep, thd, cache, len);
- }
- else {
- return wsrep_write_cache_once(wsrep, thd, cache, len);
- }
+ return wsrep_write_cache_inc(thd, cache, len);
}
void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len)
@@ -365,89 +228,6 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len)
free(filename);
}
-/*
- wsrep exploits binlog's caches even if binlogging itself is not
- activated. In such case connection close needs calling
- actual binlog's method.
- Todo: split binlog hton from its caches to use ones by wsrep
- without referring to binlog's stuff.
-*/
-int wsrep_binlog_close_connection(THD* thd)
-{
- DBUG_ENTER("wsrep_binlog_close_connection");
- if (thd_get_ha_data(thd, binlog_hton) != NULL)
- binlog_hton->close_connection (binlog_hton, thd);
- DBUG_RETURN(0);
-}
-
-#if 0
-void wsrep_dump_rbr_direct(THD* thd, IO_CACHE* cache)
-{
- char filename[PATH_MAX]= {0};
- int len= snprintf(filename, PATH_MAX, "%s/GRA_%lld_%lld.log",
- wsrep_data_home_dir, (longlong) thd->thread_id,
- (longlong) wsrep_thd_trx_seqno(thd));
- size_t bytes_in_cache = 0;
- // check path
- if (len >= PATH_MAX)
- {
- WSREP_ERROR("RBR dump path too long: %d, skipping dump.", len);
- return ;
- }
- // init cache
- my_off_t const saved_pos(my_b_tell(cache));
- if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0))
- {
- WSREP_ERROR("failed to initialize io-cache");
- return ;
- }
- // open file
- FILE* of = fopen(filename, "wb");
- if (!of)
- {
- WSREP_ERROR("Failed to open file '%s': %d (%s)",
- filename, errno, strerror(errno));
- goto cleanup;
- }
- // ready to write
- bytes_in_cache= my_b_bytes_in_cache(cache);
- if (unlikely(bytes_in_cache == 0)) bytes_in_cache = my_b_fill(cache);
- if (likely(bytes_in_cache > 0)) do
- {
- if (my_fwrite(of, cache->read_pos, bytes_in_cache,
- MYF(MY_WME | MY_NABP)) == (size_t) -1)
- {
- WSREP_ERROR("Failed to write file '%s'", filename);
- goto cleanup;
- }
-
- if (cache->file < 0)
- {
- cache->read_pos= cache->read_end;
- break;
- }
- } while ((bytes_in_cache= my_b_fill(cache)));
- if (cache->error == -1)
- {
- WSREP_ERROR("RBR inconsistent");
- goto cleanup;
- }
-cleanup:
- // init back
- if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0))
- {
- WSREP_ERROR("failed to reinitialize io-cache");
- }
- // close file
- if (of) fclose(of);
-}
-#endif
-
-void thd_binlog_flush_pending_rows_event(THD *thd, bool stmt_end)
-{
- thd->binlog_flush_pending_rows_event(stmt_end);
-}
-
/* Dump replication buffer along with header to a file. */
void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
size_t buf_len)
@@ -529,3 +309,92 @@ cleanup1:
DBUG_VOID_RETURN;
}
+int wsrep_write_skip_event(THD* thd)
+{
+ DBUG_ENTER("wsrep_write_skip_event");
+ Ignorable_log_event skip_event(thd);
+ int ret= mysql_bin_log.write_event(&skip_event);
+ if (ret)
+ {
+ WSREP_WARN("wsrep_write_skip_event: write to binlog failed: %d", ret);
+ }
+ if (!ret && (ret= trans_commit_stmt(thd)))
+ {
+ WSREP_WARN("wsrep_write_skip_event: statt commit failed");
+ }
+ DBUG_RETURN(ret);
+}
+
+int wsrep_write_dummy_event_low(THD *thd, const char *msg)
+{
+ ::abort();
+ return 0;
+}
+
+int wsrep_write_dummy_event(THD *orig_thd, const char *msg)
+{
+ return 0;
+}
+
+bool wsrep_commit_will_write_binlog(THD *thd)
+{
+ return (!wsrep_emulate_bin_log && /* binlog enabled*/
+ (wsrep_thd_is_local(thd) || /* local thd*/
+ (thd->wsrep_applier_service && /* applier and log-slave-updates */
+ opt_log_slave_updates)));
+}
+
+/*
+ The last THD/commit_for_wait registered for group commit.
+*/
+static wait_for_commit *commit_order_tail= NULL;
+
+void wsrep_register_for_group_commit(THD *thd)
+{
+ DBUG_ENTER("wsrep_register_for_group_commit");
+ if (wsrep_emulate_bin_log)
+ {
+ /* Binlog is off, no need to maintain group commit queue */
+ DBUG_VOID_RETURN;
+ }
+
+ DBUG_ASSERT(thd->wsrep_trx().ordered());
+
+ wait_for_commit *wfc= thd->wait_for_commit_ptr= &thd->wsrep_wfc;
+
+ mysql_mutex_lock(&LOCK_wsrep_group_commit);
+ if (commit_order_tail)
+ {
+ wfc->register_wait_for_prior_commit(commit_order_tail);
+ }
+ commit_order_tail= thd->wait_for_commit_ptr;
+ mysql_mutex_unlock(&LOCK_wsrep_group_commit);
+
+ /*
+ Now we have queued for group commit. If the commit will go
+ through TC log_and_order(), the commit ordering is done
+ by TC group commit. Otherwise the wait for prior
+ commits to complete is done in ha_commit_one_phase().
+ */
+ DBUG_VOID_RETURN;
+}
+
+void wsrep_unregister_from_group_commit(THD *thd)
+{
+ DBUG_ASSERT(thd->wsrep_trx().ordered());
+ wait_for_commit *wfc= thd->wait_for_commit_ptr;
+
+ if (wfc)
+ {
+ mysql_mutex_lock(&LOCK_wsrep_group_commit);
+ wfc->unregister_wait_for_prior_commit();
+ thd->wakeup_subsequent_commits(0);
+
+ /* The last one queued for group commit has completed commit, it is
+ safe to set tail to NULL. */
+ if (wfc == commit_order_tail)
+ commit_order_tail= NULL;
+ mysql_mutex_unlock(&LOCK_wsrep_group_commit);
+ thd->wait_for_commit_ptr= NULL;
+ }
+}
diff --git a/sql/wsrep_binlog.h b/sql/wsrep_binlog.h
index ed8e19ed651..252fbe602d2 100644
--- a/sql/wsrep_binlog.h
+++ b/sql/wsrep_binlog.h
@@ -16,6 +16,7 @@
#ifndef WSREP_BINLOG_H
#define WSREP_BINLOG_H
+#include "my_global.h"
#include "sql_class.h" // THD, IO_CACHE
#define HEAP_PAGE_SIZE 65536 /* 64K */
@@ -38,21 +39,65 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len);
@param len total amount of data written
@return wsrep error status
*/
-int wsrep_write_cache (wsrep_t* const wsrep,
- THD* const thd,
- IO_CACHE* const cache,
- size_t* const len);
+int wsrep_write_cache(THD* thd,
+ IO_CACHE* cache,
+ size_t* len);
/* Dump replication buffer to disk */
void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len);
-/* Dump replication buffer to disk without intermediate buffer */
-void wsrep_dump_rbr_direct(THD* thd, IO_CACHE* cache);
-
/* Dump replication buffer along with header to a file */
void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
size_t buf_len);
-int wsrep_binlog_close_connection(THD* thd);
+/**
+ Write a skip event into binlog.
+
+ @param thd Thread object pointer
+ @return Zero in case of success, non-zero on failure.
+*/
+int wsrep_write_skip_event(THD* thd);
+
+/*
+ Write dummy event into binlog in place of unused GTID.
+ The binlog write is done in thd context.
+*/
+int wsrep_write_dummy_event_low(THD *thd, const char *msg);
+/*
+ Write dummy event to binlog in place of unused GTID and
+ commit. The binlog write and commit are done in temporary
+ thd context, the original thd state is not altered.
+*/
+int wsrep_write_dummy_event(THD* thd, const char *msg);
+
+void wsrep_register_binlog_handler(THD *thd, bool trx);
+
+/**
+ Return true if committing THD will write to binlog during commit.
+ This is the case for:
+ - Local THD, binlog is open
+ - Replaying THD, binlog is open
+ - Applier THD, log-slave-updates is enabled
+*/
+bool wsrep_commit_will_write_binlog(THD *thd);
+
+/**
+ Register THD for group commit. The wsrep_trx must be in committing state,
+ i.e. the call must be done after wsrep_before_commit() but before
+ commit order is released.
+
+ This call will release commit order critical section if it is
+ determined that the commit will go through binlog group commit.
+ */
+void wsrep_register_for_group_commit(THD *thd);
+
+/**
+ Deregister THD from group commit. The wsrep_trx must be in committing state,
+ as for wsrep_register_for_group_commit() above.
+
+ This call must be used only for THDs which will not go through
+ binlog group commit.
+*/
+void wsrep_unregister_from_group_commit(THD *thd);
#endif /* WSREP_BINLOG_H */
diff --git a/sql/wsrep_check_opts.cc b/sql/wsrep_check_opts.cc
index 075546d827a..b17a5f164a4 100644
--- a/sql/wsrep_check_opts.cc
+++ b/sql/wsrep_check_opts.cc
@@ -19,6 +19,7 @@
#include "sys_vars_shared.h"
#include "wsrep.h"
#include "wsrep_sst.h"
+#include "wsrep_mysqld.h"
extern char *my_bind_addr_str;
@@ -33,7 +34,7 @@ int wsrep_check_opts()
autoinc_lock_mode->val_int(&is_null, 0, OPT_GLOBAL, 0) != 2)
{
WSREP_ERROR("Parallel applying (wsrep_slave_threads > 1) requires"
- " innodb_autoinc_lock_mode = 2.");
+ " innodb_autoinc_lock_mode= 2.");
return 1;
}
}
@@ -63,7 +64,7 @@ int wsrep_check_opts()
else
{
// non-mysqldump SST requires wsrep_cluster_address on startup
- if (!wsrep_cluster_address || !wsrep_cluster_address[0])
+ if (!wsrep_cluster_address_exists())
{
WSREP_ERROR ("%s SST method requires wsrep_cluster_address to be "
"configured on startup.", wsrep_sst_method);
@@ -88,7 +89,7 @@ int wsrep_check_opts()
{
if (global_system_variables.binlog_format != BINLOG_FORMAT_ROW)
{
- WSREP_ERROR("Only binlog_format = 'ROW' is currently supported. "
+ WSREP_ERROR("Only binlog_format= 'ROW' is currently supported. "
"Configured value: '%s'. Please adjust your "
"configuration.",
binlog_format_names[global_system_variables.binlog_format]);
diff --git a/sql/wsrep_client_service.cc b/sql/wsrep_client_service.cc
new file mode 100644
index 00000000000..f00dfccf274
--- /dev/null
+++ b/sql/wsrep_client_service.cc
@@ -0,0 +1,369 @@
+/* Copyright 2018-2021 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#include "wsrep_client_service.h"
+#include "wsrep_high_priority_service.h"
+#include "wsrep_applier.h" /* wsrep_apply_events() */
+#include "wsrep_binlog.h" /* wsrep_dump_rbr_buf() */
+#include "wsrep_schema.h" /* remove_fragments() */
+#include "wsrep_thd.h"
+#include "wsrep_xid.h"
+#include "wsrep_trans_observer.h"
+#include "wsrep_server_state.h"
+
+#include "sql_base.h" /* close_temporary_table() */
+#include "sql_class.h" /* THD */
+#include "sql_parse.h" /* stmt_causes_implicit_commit() */
+#include "rpl_filter.h" /* binlog_filter */
+#include "rpl_rli.h" /* Relay_log_info */
+#include "slave.h" /* opt_log_slave_updates */
+#include "transaction.h" /* trans_commit()... */
+#include "log.h" /* stmt_has_updated_trans_table() */
+#include "mysql/service_debug_sync.h"
+#include "mysql/psi/mysql_thread.h" /* mysql_mutex_assert_owner() */
+
+namespace
+{
+
+void debug_sync_caller(THD* thd, const char* sync_point)
+{
+#ifdef ENABLED_DEBUG_SYNC_OUT
+ debug_sync_set_action(thd, sync_point, strlen(sync_point));
+#endif
+#ifdef ENABLED_DEBUG_SYNC
+ if (debug_sync_service) debug_sync_service(thd,sync_point,strlen(sync_point));
+#endif
+
+}
+}
+
+Wsrep_client_service::Wsrep_client_service(THD* thd,
+ Wsrep_client_state& client_state)
+ : wsrep::client_service()
+ , m_thd(thd)
+ , m_client_state(client_state)
+{ }
+
+void Wsrep_client_service::store_globals()
+{
+ wsrep_store_threadvars(m_thd);
+}
+
+void Wsrep_client_service::reset_globals()
+{
+ wsrep_reset_threadvars(m_thd);
+}
+
+bool Wsrep_client_service::interrupted(
+ wsrep::unique_lock<wsrep::mutex>& lock WSREP_UNUSED) const
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ /* Underlying mutex in lock object points to THD::LOCK_thd_data, which
+ protects m_thd->wsrep_trx() and protects us from thd delete. */
+ mysql_mutex_assert_owner(static_cast<mysql_mutex_t*>(lock.mutex()->native()));
+ bool ret= (m_thd->killed != NOT_KILLED);
+ if (ret)
+ {
+ WSREP_DEBUG("wsrep state is interrupted, THD::killed %d trx state %d",
+ m_thd->killed, m_thd->wsrep_trx().state());
+ }
+ return ret;
+}
+
+int Wsrep_client_service::prepare_data_for_replication()
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_ENTER("Wsrep_client_service::prepare_data_for_replication");
+ size_t data_len= 0;
+ IO_CACHE* transactional_cache= wsrep_get_cache(m_thd, true);
+ IO_CACHE* stmt_cache= wsrep_get_cache(m_thd, false);
+
+ if (transactional_cache || stmt_cache)
+ {
+ m_thd->binlog_flush_pending_rows_event(true);
+
+ size_t transactional_data_len= 0;
+ size_t stmt_data_len= 0;
+
+ // Write transactional cache
+ if (transactional_cache &&
+ wsrep_write_cache(m_thd, transactional_cache, &transactional_data_len))
+ {
+ WSREP_ERROR("rbr write fail, data_len: %zu",
+ data_len);
+ // wsrep_override_error(m_thd, ER_ERROR_DURING_COMMIT);
+ DBUG_RETURN(1);
+ }
+
+ // Write stmt cache
+ if (stmt_cache && wsrep_write_cache(m_thd, stmt_cache, &stmt_data_len))
+ {
+ WSREP_ERROR("rbr write fail, data_len: %zu",
+ data_len);
+ // wsrep_override_error(m_thd, ER_ERROR_DURING_COMMIT);
+ DBUG_RETURN(1);
+ }
+
+ // Complete data written from both caches
+ data_len = transactional_data_len + stmt_data_len;
+ }
+
+ if (data_len == 0)
+ {
+ if (m_thd->get_stmt_da()->is_ok() &&
+ m_thd->get_stmt_da()->affected_rows() > 0 &&
+ !binlog_filter->is_on() &&
+ !m_thd->wsrep_trx().is_streaming())
+ {
+ WSREP_DEBUG("empty rbr buffer, query: %s, "
+ "affected rows: %llu, "
+ "changed tables: %d, "
+ "sql_log_bin: %d",
+ wsrep_thd_query(m_thd),
+ m_thd->get_stmt_da()->affected_rows(),
+ stmt_has_updated_trans_table(m_thd),
+ m_thd->variables.sql_log_bin);
+ }
+ else
+ {
+ WSREP_DEBUG("empty rbr buffer, query: %s", wsrep_thd_query(m_thd));
+ }
+ }
+ DBUG_RETURN(0);
+}
+
+
+void Wsrep_client_service::cleanup_transaction()
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ if (WSREP_EMULATE_BINLOG(m_thd)) wsrep_thd_binlog_trx_reset(m_thd);
+ m_thd->wsrep_affected_rows= 0;
+}
+
+
+int Wsrep_client_service::prepare_fragment_for_replication(
+ wsrep::mutable_buffer& buffer, size_t& log_position)
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ THD* thd= m_thd;
+ DBUG_ENTER("Wsrep_client_service::prepare_fragment_for_replication");
+ IO_CACHE* cache= wsrep_get_cache(thd, true);
+ thd->binlog_flush_pending_rows_event(true);
+
+ if (!cache)
+ {
+ DBUG_RETURN(0);
+ }
+
+ const my_off_t saved_pos(my_b_tell(cache));
+ if (reinit_io_cache(cache, READ_CACHE, thd->wsrep_sr().log_position(), 0, 0))
+ {
+ DBUG_RETURN(1);
+ }
+
+ int ret= 0;
+ size_t total_length= 0;
+ size_t length= my_b_bytes_in_cache(cache);
+
+ if (!length)
+ {
+ length= my_b_fill(cache);
+ }
+
+ if (length > 0)
+ {
+ do
+ {
+ total_length+= length;
+ if (total_length > wsrep_max_ws_size)
+ {
+ WSREP_WARN("transaction size limit (%lu) exceeded: %zu",
+ wsrep_max_ws_size, total_length);
+ ret= 1;
+ goto cleanup;
+ }
+
+ buffer.push_back(reinterpret_cast<const char*>(cache->read_pos),
+ reinterpret_cast<const char*>(cache->read_pos + length));
+ cache->read_pos= cache->read_end;
+ }
+ while (cache->file >= 0 && (length= my_b_fill(cache)));
+ }
+ DBUG_ASSERT(total_length == buffer.size());
+ log_position= saved_pos;
+cleanup:
+ if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0))
+ {
+ WSREP_WARN("Failed to reinitialize IO cache");
+ ret= 1;
+ }
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_client_service::remove_fragments()
+{
+ DBUG_ENTER("Wsrep_client_service::remove_fragments");
+ DEBUG_SYNC(m_thd, "wsrep_before_fragment_removal");
+ if (wsrep_schema->remove_fragments(m_thd,
+ Wsrep_server_state::instance().id(),
+ m_thd->wsrep_trx().id(),
+ m_thd->wsrep_sr().fragments()))
+ {
+ WSREP_DEBUG("Failed to remove fragments from SR storage for transaction "
+ "%llu, %llu",
+ m_thd->thread_id, m_thd->wsrep_trx().id().get());
+ DBUG_RETURN(1);
+ }
+ DBUG_RETURN(0);
+}
+
+bool Wsrep_client_service::statement_allowed_for_streaming() const
+{
+ /*
+ Todo: Decide if implicit commit is allowed with streaming
+ replication.
+ !stmt_causes_implicit_commit(m_thd, CF_IMPLICIT_COMMIT_BEGIN);
+ */
+ return true;
+}
+
+size_t Wsrep_client_service::bytes_generated() const
+{
+ IO_CACHE* cache= wsrep_get_cache(m_thd, true);
+ if (cache)
+ {
+ size_t pending_rows_event_length= 0;
+ if (Rows_log_event* ev= m_thd->binlog_get_pending_rows_event(true))
+ {
+ pending_rows_event_length= ev->get_data_size();
+ }
+ return my_b_tell(cache) + pending_rows_event_length;
+ }
+ return 0;
+}
+
+void Wsrep_client_service::will_replay()
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ mysql_mutex_lock(&LOCK_wsrep_replaying);
+ ++wsrep_replaying;
+ mysql_mutex_unlock(&LOCK_wsrep_replaying);
+}
+
+void Wsrep_client_service::signal_replayed()
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ mysql_mutex_lock(&LOCK_wsrep_replaying);
+ --wsrep_replaying;
+ DBUG_ASSERT(wsrep_replaying >= 0);
+ mysql_cond_broadcast(&COND_wsrep_replaying);
+ mysql_mutex_unlock(&LOCK_wsrep_replaying);
+}
+
+enum wsrep::provider::status Wsrep_client_service::replay()
+{
+
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_ENTER("Wsrep_client_service::replay");
+
+ /*
+ Allocate separate THD for replaying to avoid tampering
+ original THD state during replication event applying.
+ */
+ THD *replayer_thd= new THD(true, true);
+ replayer_thd->thread_stack= m_thd->thread_stack;
+ replayer_thd->real_id= pthread_self();
+ replayer_thd->prior_thr_create_utime=
+ replayer_thd->start_utime= microsecond_interval_timer();
+ replayer_thd->set_command(COM_SLEEP);
+ replayer_thd->reset_for_next_command(true);
+
+ enum wsrep::provider::status ret;
+ {
+ Wsrep_replayer_service replayer_service(replayer_thd, m_thd);
+ wsrep::provider& provider(replayer_thd->wsrep_cs().provider());
+ ret= provider.replay(replayer_thd->wsrep_trx().ws_handle(),
+ &replayer_service);
+ replayer_service.replay_status(ret);
+ }
+
+ delete replayer_thd;
+ DBUG_RETURN(ret);
+}
+
+enum wsrep::provider::status Wsrep_client_service::replay_unordered()
+{
+ DBUG_ASSERT(0);
+ return wsrep::provider::error_not_implemented;
+}
+
+void Wsrep_client_service::wait_for_replayers(wsrep::unique_lock<wsrep::mutex>& lock)
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ lock.unlock();
+ mysql_mutex_lock(&LOCK_wsrep_replaying);
+ /* We need to check if the THD is BF aborted during condition wait.
+ Because the aborter does not know which condition this thread is waiting,
+ use timed wait and check if the THD is BF aborted in the loop. */
+ while (wsrep_replaying > 0 && !wsrep_is_bf_aborted(m_thd))
+ {
+ struct timespec wait_time;
+ set_timespec_nsec(wait_time, 10000000L);
+ mysql_cond_timedwait(&COND_wsrep_replaying, &LOCK_wsrep_replaying,
+ &wait_time);
+ }
+ mysql_mutex_unlock(&LOCK_wsrep_replaying);
+ lock.lock();
+}
+
+enum wsrep::provider::status Wsrep_client_service::commit_by_xid()
+{
+ DBUG_ASSERT(0);
+ return wsrep::provider::error_not_implemented;
+}
+
+void Wsrep_client_service::debug_sync(const char* sync_point)
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ debug_sync_caller(m_thd, sync_point);
+}
+
+void Wsrep_client_service::debug_crash(const char* crash_point)
+{
+ // DBUG_ASSERT(m_thd == current_thd);
+ DBUG_EXECUTE_IF(crash_point, DBUG_SUICIDE(); );
+}
+
+int Wsrep_client_service::bf_rollback()
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_ENTER("Wsrep_client_service::rollback");
+
+ int ret= (trans_rollback_stmt(m_thd) || trans_rollback(m_thd));
+ if (m_thd->locked_tables_mode && m_thd->lock)
+ {
+ m_thd->locked_tables_list.unlock_locked_tables(m_thd);
+ m_thd->variables.option_bits&= ~OPTION_TABLE_LOCK;
+ }
+ if (m_thd->global_read_lock.is_acquired())
+ {
+ m_thd->global_read_lock.unlock_global_read_lock(m_thd);
+ }
+ m_thd->release_transactional_locks();
+ mysql_ull_cleanup(m_thd);
+ m_thd->mdl_context.release_explicit_locks();
+
+ DBUG_RETURN(ret);
+}
diff --git a/sql/wsrep_client_service.h b/sql/wsrep_client_service.h
new file mode 100644
index 00000000000..253d2f43ac3
--- /dev/null
+++ b/sql/wsrep_client_service.h
@@ -0,0 +1,74 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+/** @file wsrep_client_service.h
+
+ This file provides declaratios for client service implementation.
+ See wsrep/client_service.hpp for interface documentation.
+*/
+
+#ifndef WSREP_CLIENT_SERVICE_H
+#define WSREP_CLIENT_SERVICE_H
+
+/* wsrep-lib */
+#include "wsrep/client_service.hpp"
+#include "wsrep/client_state.hpp"
+#include "wsrep/exception.hpp" /* not_implemented_error, remove when finished */
+
+class THD;
+class Wsrep_client_state;
+class Wsrep_high_priority_context;
+
+class Wsrep_client_service : public wsrep::client_service
+{
+public:
+ Wsrep_client_service(THD*, Wsrep_client_state&);
+
+ bool interrupted(wsrep::unique_lock<wsrep::mutex>&) const;
+ void reset_globals();
+ void store_globals();
+ int prepare_data_for_replication();
+ void cleanup_transaction();
+ bool statement_allowed_for_streaming() const;
+ size_t bytes_generated() const;
+ int prepare_fragment_for_replication(wsrep::mutable_buffer&, size_t&);
+ int remove_fragments();
+ void emergency_shutdown()
+ { throw wsrep::not_implemented_error(); }
+ void will_replay();
+ void signal_replayed();
+ enum wsrep::provider::status replay();
+ enum wsrep::provider::status replay_unordered();
+ void wait_for_replayers(wsrep::unique_lock<wsrep::mutex>&);
+ enum wsrep::provider::status commit_by_xid();
+ bool is_explicit_xa()
+ {
+ return false;
+ }
+ bool is_xa_rollback()
+ {
+ return false;
+ }
+ void debug_sync(const char*);
+ void debug_crash(const char*);
+ int bf_rollback();
+private:
+ friend class Wsrep_server_service;
+ THD* m_thd;
+ Wsrep_client_state& m_client_state;
+};
+
+
+#endif /* WSREP_CLIENT_SERVICE_H */
diff --git a/sql/wsrep_client_state.h b/sql/wsrep_client_state.h
new file mode 100644
index 00000000000..403bfa81365
--- /dev/null
+++ b/sql/wsrep_client_state.h
@@ -0,0 +1,47 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#ifndef WSREP_CLIENT_STATE_H
+#define WSREP_CLIENT_STATE_H
+
+/* wsrep-lib */
+#include "wsrep/client_state.hpp"
+#include "my_global.h"
+
+class THD;
+
+class Wsrep_client_state : public wsrep::client_state
+{
+public:
+ Wsrep_client_state(THD* thd,
+ wsrep::mutex& mutex,
+ wsrep::condition_variable& cond,
+ wsrep::server_state& server_state,
+ wsrep::client_service& client_service,
+ const wsrep::client_id& id)
+ : wsrep::client_state(mutex,
+ cond,
+ server_state,
+ client_service,
+ id,
+ wsrep::client_state::m_local)
+ , m_thd(thd)
+ { }
+ THD* thd() { return m_thd; }
+private:
+ THD* m_thd;
+};
+
+#endif /* WSREP_CLIENT_STATE_H */
diff --git a/sql/wsrep_condition_variable.h b/sql/wsrep_condition_variable.h
new file mode 100644
index 00000000000..c97b47378f7
--- /dev/null
+++ b/sql/wsrep_condition_variable.h
@@ -0,0 +1,54 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#ifndef WSREP_CONDITION_VARIABLE_H
+#define WSREP_CONDITION_VARIABLE_H
+
+/* wsrep-lib */
+#include "wsrep/condition_variable.hpp"
+
+/* implementation */
+#include "my_pthread.h"
+
+class Wsrep_condition_variable : public wsrep::condition_variable
+{
+public:
+
+ Wsrep_condition_variable(mysql_cond_t* cond)
+ : m_cond(cond)
+ { }
+ ~Wsrep_condition_variable()
+ { }
+
+ void notify_one()
+ {
+ mysql_cond_signal(m_cond);
+ }
+
+ void notify_all()
+ {
+ mysql_cond_broadcast(m_cond);
+ }
+
+ void wait(wsrep::unique_lock<wsrep::mutex>& lock)
+ {
+ mysql_mutex_t* mutex= static_cast<mysql_mutex_t*>(lock.mutex()->native());
+ mysql_cond_wait(m_cond, mutex);
+ }
+private:
+ mysql_cond_t* m_cond;
+};
+
+#endif /* WSREP_CONDITION_VARIABLE_H */
diff --git a/sql/wsrep_dummy.cc b/sql/wsrep_dummy.cc
index b00b2f134b1..83bf4778d10 100644
--- a/sql/wsrep_dummy.cc
+++ b/sql/wsrep_dummy.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014, 2020, MariaDB
+/* Copyright (C) 2014, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,16 +17,10 @@
#include <sql_class.h>
#include <mysql/service_wsrep.h>
-my_bool wsrep_thd_is_BF(THD *, my_bool)
+my_bool wsrep_thd_is_BF(const THD *, my_bool)
{ return 0; }
-int wsrep_trx_order_before(THD *, THD *)
-{ return 0; }
-
-enum wsrep_conflict_state wsrep_thd_conflict_state(THD *, my_bool)
-{ return NO_CONFLICT; }
-
-int wsrep_is_wsrep_xid(const XID*)
+int wsrep_is_wsrep_xid(const void* xid)
{ return 0; }
long long wsrep_xid_seqno(const XID* x)
@@ -34,134 +28,126 @@ long long wsrep_xid_seqno(const XID* x)
const unsigned char* wsrep_xid_uuid(const XID*)
{
- static const unsigned char uuid[16] = {0};
+ static const unsigned char uuid[16]= {0};
return uuid;
}
+bool wsrep_prepare_key_for_innodb(THD* thd, const uchar*, size_t, const uchar*, size_t, struct wsrep_buf*, size_t*)
+{ return 1; }
+
bool wsrep_prepare_key(const uchar*, size_t, const uchar*, size_t, struct wsrep_buf*, size_t*)
{ return 0; }
struct wsrep *get_wsrep()
{ return 0; }
-my_bool get_wsrep_certify_nonPK()
-{ return 0; }
-
-my_bool get_wsrep_debug()
-{ return 0; }
-
-my_bool get_wsrep_drupal_282555_workaround()
-{ return 0; }
-
-my_bool get_wsrep_load_data_splitting()
-{ return 0; }
-
my_bool get_wsrep_recovery()
{ return 0; }
-my_bool get_wsrep_log_conflicts()
-{ return 0; }
-
-long get_wsrep_protocol_version()
-{ return 0; }
-
-my_bool wsrep_aborting_thd_contains(THD *)
-{ return 0; }
-
-void wsrep_aborting_thd_enqueue(THD *)
-{ }
-
bool wsrep_consistency_check(THD *)
{ return 0; }
void wsrep_lock_rollback()
{ }
-int wsrep_on(THD *thd)
+my_bool wsrep_on(const THD *)
{ return 0; }
-void wsrep_post_commit(THD*, bool)
-{ }
-
-enum wsrep_trx_status wsrep_run_wsrep_commit(THD *, bool)
-{ return WSREP_TRX_ERROR; }
-
-void wsrep_thd_LOCK(THD *)
-{ }
-
-void wsrep_thd_UNLOCK(THD *)
+void wsrep_thd_LOCK(const THD *)
{ }
-void wsrep_thd_kill_LOCK(THD *)
+void wsrep_thd_UNLOCK(const THD *)
{ }
-void wsrep_thd_kill_UNLOCK(THD *)
+void wsrep_thd_kill_LOCK(const THD *)
{ }
-void wsrep_thd_awake(THD *, my_bool)
+void wsrep_thd_kill_UNLOCK(const THD *)
{ }
const char *wsrep_thd_conflict_state_str(THD *)
{ return 0; }
-enum wsrep_exec_mode wsrep_thd_exec_mode(THD *)
-{ return LOCAL_STATE; }
-
const char *wsrep_thd_exec_mode_str(THD *)
{ return NULL; }
-enum wsrep_conflict_state wsrep_thd_get_conflict_state(THD *)
-{ return NO_CONFLICT; }
+const char *wsrep_thd_query(const THD *)
+{ return "NULL"; }
-my_bool wsrep_thd_is_wsrep(THD *)
+const char *wsrep_thd_query_state_str(THD *)
{ return 0; }
-const char *wsrep_thd_query(THD *)
-{ return "NULL"; }
+int wsrep_thd_retry_counter(const THD *)
+{ return 0; }
-enum wsrep_query_state wsrep_thd_query_state(THD *)
-{ return QUERY_IDLE; }
+bool wsrep_thd_ignore_table(THD *)
+{ return 0; }
-const char *wsrep_thd_query_state_str(THD *)
+long long wsrep_thd_trx_seqno(const THD *)
+{ return -1; }
+
+my_bool wsrep_thd_is_aborting(const THD *)
{ return 0; }
-int wsrep_thd_retry_counter(THD *)
+void wsrep_set_data_home_dir(const char *)
+{ }
+
+my_bool wsrep_thd_is_local(const THD *)
{ return 0; }
-void wsrep_thd_set_conflict_state(THD *, enum wsrep_conflict_state)
+void wsrep_thd_self_abort(THD *)
{ }
-bool wsrep_thd_ignore_table(THD *)
+int wsrep_thd_append_key(THD *, const struct wsrep_key*, int, enum Wsrep_service_key_type)
{ return 0; }
-longlong wsrep_thd_trx_seqno(THD *)
-{ return -1; }
+const char* wsrep_thd_client_state_str(const THD*)
+{ return 0; }
-struct wsrep_ws_handle* wsrep_thd_ws_handle(THD *)
+const char* wsrep_thd_client_mode_str(const THD*)
{ return 0; }
-void wsrep_set_load_multi_commit(THD *thd, bool split)
-{ }
+const char* wsrep_thd_transaction_state_str(const THD*)
+{ return 0; }
+
+query_id_t wsrep_thd_transaction_id(const THD *)
+{ return 0; }
-bool wsrep_is_load_multi_commit(THD *thd)
-{ return false; }
+my_bool wsrep_thd_bf_abort(THD *, THD *, my_bool)
+{ return 0; }
-int wsrep_trx_is_aborting(THD *)
+my_bool wsrep_thd_order_before(const THD*, const THD *)
{ return 0; }
-void wsrep_unlock_rollback()
+void wsrep_handle_SR_rollback(THD*, THD*)
{ }
-void wsrep_set_data_home_dir(const char *)
+my_bool wsrep_thd_skip_locking(const THD*)
+{ return 0;}
+
+const char* wsrep_get_sr_table_name()
+{ return 0; }
+
+my_bool wsrep_get_debug()
+{ return 0;}
+
+void wsrep_commit_ordered(THD* )
{ }
void wsrep_log(void (*)(const char *, ...), const char *, ...)
{
}
-my_bool wsrep_thd_is_applier(MYSQL_THD thd)
-{ return false; }
+my_bool wsrep_thd_is_applying(const THD*)
+{ return 0;}
+
+bool wsrep_thd_set_wsrep_aborter(THD*, THD*)
+{ return 0;}
-void wsrep_report_bf_lock_wait(MYSQL_THD thd,
- unsigned long long id)
+void wsrep_report_bf_lock_wait(const THD*,
+ unsigned long long)
{}
+
+void wsrep_thd_set_PA_unsafe(THD*)
+{}
+
diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc
new file mode 100644
index 00000000000..e45bcf3e5ce
--- /dev/null
+++ b/sql/wsrep_high_priority_service.cc
@@ -0,0 +1,735 @@
+/* Copyright 2018-2021 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#include "wsrep_high_priority_service.h"
+#include "wsrep_applier.h"
+#include "wsrep_binlog.h"
+#include "wsrep_schema.h"
+#include "wsrep_xid.h"
+#include "wsrep_trans_observer.h"
+#include "wsrep_server_state.h"
+
+#include "sql_class.h" /* THD */
+#include "transaction.h"
+#include "debug_sync.h"
+/* RLI */
+#include "rpl_rli.h"
+#define NUMBER_OF_FIELDS_TO_IDENTIFY_COORDINATOR 1
+#define NUMBER_OF_FIELDS_TO_IDENTIFY_WORKER 2
+#include "slave.h"
+#include "rpl_mi.h"
+
+namespace
+{
+/*
+ Scoped mode for applying non-transactional write sets (TOI)
+ */
+class Wsrep_non_trans_mode
+{
+public:
+ Wsrep_non_trans_mode(THD* thd, const wsrep::ws_meta& ws_meta)
+ : m_thd(thd)
+ , m_option_bits(thd->variables.option_bits)
+ , m_server_status(thd->server_status)
+ {
+ m_thd->variables.option_bits&= ~OPTION_BEGIN;
+ m_thd->server_status&= ~SERVER_STATUS_IN_TRANS;
+ m_thd->wsrep_cs().enter_toi_mode(ws_meta);
+ }
+ ~Wsrep_non_trans_mode()
+ {
+ m_thd->variables.option_bits= m_option_bits;
+ m_thd->server_status= m_server_status;
+ m_thd->wsrep_cs().leave_toi_mode();
+ }
+private:
+ Wsrep_non_trans_mode(const Wsrep_non_trans_mode&);
+ Wsrep_non_trans_mode& operator=(const Wsrep_non_trans_mode&);
+ THD* m_thd;
+ ulonglong m_option_bits;
+ uint m_server_status;
+};
+}
+
+static rpl_group_info* wsrep_relay_group_init(THD* thd, const char* log_fname)
+{
+ Relay_log_info* rli= new Relay_log_info(false);
+
+ if (!rli->relay_log.description_event_for_exec)
+ {
+ rli->relay_log.description_event_for_exec=
+ new Format_description_log_event(4);
+ }
+
+ static LEX_CSTRING connection_name= { STRING_WITH_LEN("wsrep") };
+
+ /*
+ Master_info's constructor initializes rpl_filter by either an already
+ constructed Rpl_filter object from global 'rpl_filters' list if the
+ specified connection name is same, or it constructs a new Rpl_filter
+ object and adds it to rpl_filters. This object is later destructed by
+ Mater_info's destructor by looking it up based on connection name in
+ rpl_filters list.
+
+ However, since all Master_info objects created here would share same
+ connection name ("wsrep"), destruction of any of the existing Master_info
+ objects (in wsrep_return_from_bf_mode()) would free rpl_filter referenced
+ by any/all existing Master_info objects.
+
+ In order to avoid that, we have added a check in Master_info's destructor
+ to not free the "wsrep" rpl_filter. It will eventually be freed by
+ free_all_rpl_filters() when server terminates.
+ */
+ rli->mi= new Master_info(&connection_name, false);
+
+ struct rpl_group_info *rgi= new rpl_group_info(rli);
+ rgi->thd= rli->sql_driver_thd= thd;
+
+ if ((rgi->deferred_events_collecting= rli->mi->rpl_filter->is_on()))
+ {
+ rgi->deferred_events= new Deferred_log_events(rli);
+ }
+
+ return rgi;
+}
+
+static void wsrep_setup_uk_and_fk_checks(THD* thd)
+{
+ /* Tune FK and UK checking policy. These are reset back to original
+ in Wsrep_high_priority_service destructor. */
+ if (wsrep_slave_UK_checks == FALSE)
+ thd->variables.option_bits|= OPTION_RELAXED_UNIQUE_CHECKS;
+ else
+ thd->variables.option_bits&= ~OPTION_RELAXED_UNIQUE_CHECKS;
+
+ if (wsrep_slave_FK_checks == FALSE)
+ thd->variables.option_bits|= OPTION_NO_FOREIGN_KEY_CHECKS;
+ else
+ thd->variables.option_bits&= ~OPTION_NO_FOREIGN_KEY_CHECKS;
+}
+
+/****************************************************************************
+ High priority service
+*****************************************************************************/
+
+Wsrep_high_priority_service::Wsrep_high_priority_service(THD* thd)
+ : wsrep::high_priority_service(Wsrep_server_state::instance())
+ , wsrep::high_priority_context(thd->wsrep_cs())
+ , m_thd(thd)
+ , m_rli()
+{
+ LEX_CSTRING db_str= { NULL, 0 };
+ m_shadow.option_bits = thd->variables.option_bits;
+ m_shadow.server_status= thd->server_status;
+ m_shadow.vio = thd->net.vio;
+ m_shadow.tx_isolation = thd->variables.tx_isolation;
+ m_shadow.db = (char *)thd->db.str;
+ m_shadow.db_length = thd->db.length;
+ m_shadow.user_time = thd->user_time;
+ m_shadow.row_count_func= thd->get_row_count_func();
+ m_shadow.wsrep_applier= thd->wsrep_applier;
+
+ /* Disable general logging on applier threads */
+ thd->variables.option_bits |= OPTION_LOG_OFF;
+
+ /* enable binlogging regardless of log_slave_updates setting
+ this is for ensuring that both local and applier transaction go through
+ same commit ordering algorithm in group commit control
+ */
+ thd->variables.option_bits|= OPTION_BIN_LOG;
+
+ thd->net.vio= 0;
+ thd->reset_db(&db_str);
+ thd->clear_error();
+ thd->variables.tx_isolation= ISO_READ_COMMITTED;
+ thd->tx_isolation = ISO_READ_COMMITTED;
+
+ /* From trans_begin() */
+ thd->variables.option_bits|= OPTION_BEGIN;
+ thd->server_status|= SERVER_STATUS_IN_TRANS;
+
+ /* Make THD wsrep_applier so that it cannot be killed */
+ thd->wsrep_applier= true;
+
+ if (!thd->wsrep_rgi) thd->wsrep_rgi= wsrep_relay_group_init(thd, "wsrep_relay");
+
+ m_rgi= thd->wsrep_rgi;
+ m_rgi->thd= thd;
+ m_rli= m_rgi->rli;
+ thd_proc_info(thd, "wsrep applier idle");
+}
+
+Wsrep_high_priority_service::~Wsrep_high_priority_service()
+{
+ THD* thd= m_thd;
+ thd->variables.option_bits = m_shadow.option_bits;
+ thd->server_status = m_shadow.server_status;
+ thd->net.vio = m_shadow.vio;
+ thd->variables.tx_isolation= m_shadow.tx_isolation;
+ LEX_CSTRING db_str= { m_shadow.db, m_shadow.db_length };
+ thd->reset_db(&db_str);
+ thd->user_time = m_shadow.user_time;
+
+ if (thd->wsrep_rgi && thd->wsrep_rgi->rli)
+ delete thd->wsrep_rgi->rli->mi;
+ if (thd->wsrep_rgi)
+ delete thd->wsrep_rgi->rli;
+ delete thd->wsrep_rgi;
+ thd->wsrep_rgi= NULL;
+
+ thd->set_row_count_func(m_shadow.row_count_func);
+ thd->wsrep_applier = m_shadow.wsrep_applier;
+}
+
+int Wsrep_high_priority_service::start_transaction(
+ const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER(" Wsrep_high_priority_service::start_transaction");
+ DBUG_RETURN(m_thd->wsrep_cs().start_transaction(ws_handle, ws_meta) ||
+ trans_begin(m_thd));
+}
+
+const wsrep::transaction& Wsrep_high_priority_service::transaction() const
+{
+ DBUG_ENTER(" Wsrep_high_priority_service::transaction");
+ DBUG_RETURN(m_thd->wsrep_trx());
+}
+
+int Wsrep_high_priority_service::next_fragment(const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER(" Wsrep_high_priority_service::next_fragment");
+ DBUG_RETURN(m_thd->wsrep_cs().next_fragment(ws_meta));
+}
+
+int Wsrep_high_priority_service::adopt_transaction(
+ const wsrep::transaction& transaction)
+{
+ DBUG_ENTER(" Wsrep_high_priority_service::adopt_transaction");
+ /* Adopt transaction first to set up transaction meta data for
+ trans begin. If trans_begin() fails for some reason, roll back
+ the wsrep transaction before return. */
+ m_thd->wsrep_cs().adopt_transaction(transaction);
+ int ret= trans_begin(m_thd);
+ if (ret)
+ {
+ m_thd->wsrep_cs().before_rollback();
+ m_thd->wsrep_cs().after_rollback();
+ }
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_high_priority_service::append_fragment_and_commit(
+ const wsrep::ws_handle& ws_handle,
+ const wsrep::ws_meta& ws_meta,
+ const wsrep::const_buffer& data,
+ const wsrep::xid& xid WSREP_UNUSED)
+{
+ DBUG_ENTER("Wsrep_high_priority_service::append_fragment_and_commit");
+ int ret= start_transaction(ws_handle, ws_meta);
+ /*
+ Start transaction explicitly to avoid early commit via
+ trans_commit_stmt() in append_fragment()
+ */
+ ret= ret || trans_begin(m_thd);
+ ret= ret || wsrep_schema->append_fragment(m_thd,
+ ws_meta.server_id(),
+ ws_meta.transaction_id(),
+ ws_meta.seqno(),
+ ws_meta.flags(),
+ data);
+
+ /*
+ Note: The commit code below seems to be identical to
+ Wsrep_storage_service::commit(). Consider implementing
+ common utility function to deal with commit.
+ */
+ const bool do_binlog_commit= (opt_log_slave_updates &&
+ wsrep_gtid_mode &&
+ m_thd->variables.gtid_seq_no);
+ /*
+ Write skip event into binlog if gtid_mode is on. This is to
+ maintain gtid continuity.
+ */
+ if (do_binlog_commit)
+ {
+ ret= wsrep_write_skip_event(m_thd);
+ }
+
+ if (!ret)
+ {
+ ret= m_thd->wsrep_cs().prepare_for_ordering(ws_handle,
+ ws_meta, true);
+ }
+
+ ret= ret || trans_commit(m_thd);
+
+ m_thd->wsrep_cs().after_applying();
+ m_thd->release_transactional_locks();
+
+ free_root(m_thd->mem_root, MYF(MY_KEEP_PREALLOC));
+
+ thd_proc_info(m_thd, "wsrep applier committed");
+
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_high_priority_service::remove_fragments(const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER("Wsrep_high_priority_service::remove_fragments");
+ int ret= wsrep_schema->remove_fragments(m_thd,
+ ws_meta.server_id(),
+ ws_meta.transaction_id(),
+ m_thd->wsrep_sr().fragments());
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle,
+ const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER("Wsrep_high_priority_service::commit");
+ THD* thd= m_thd;
+ DBUG_ASSERT(thd->wsrep_trx().active());
+ thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, true);
+ thd_proc_info(thd, "committing");
+ int ret=0;
+
+ const bool is_ordered= !ws_meta.seqno().is_undefined();
+
+ if (!thd->transaction.stmt.is_empty())
+ ret= trans_commit_stmt(thd);
+
+ if (ret == 0)
+ ret= trans_commit(thd);
+
+ if (ret == 0)
+ {
+ m_rgi->cleanup_context(thd, 0);
+ }
+
+ m_thd->release_transactional_locks();
+
+ thd_proc_info(thd, "wsrep applier committed");
+
+ if (!is_ordered)
+ {
+ m_thd->wsrep_cs().before_rollback();
+ m_thd->wsrep_cs().after_rollback();
+ }
+ else if (m_thd->wsrep_trx().state() == wsrep::transaction::s_executing)
+ {
+ /*
+ Wsrep commit was ordered but it did not go through commit time
+ hooks and remains active. Cycle through commit hooks to release
+ commit order and to make cleanup happen in after_applying() call.
+
+ This is a workaround for CTAS with empty result set.
+ */
+ WSREP_DEBUG("Commit not finished for applier %llu", thd->thread_id);
+ ret= ret || m_thd->wsrep_cs().before_commit() ||
+ m_thd->wsrep_cs().ordered_commit() ||
+ m_thd->wsrep_cs().after_commit();
+ }
+
+ thd->lex->sql_command= SQLCOM_END;
+
+ free_root(thd->mem_root, MYF(MY_KEEP_PREALLOC));
+
+ must_exit_= check_exit_status();
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_high_priority_service::rollback(const wsrep::ws_handle& ws_handle,
+ const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER("Wsrep_high_priority_service::rollback");
+ m_thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, false);
+ int ret= (trans_rollback_stmt(m_thd) || trans_rollback(m_thd));
+ m_thd->release_transactional_locks();
+ mysql_ull_cleanup(m_thd);
+ m_thd->mdl_context.release_explicit_locks();
+
+ free_root(m_thd->mem_root, MYF(MY_KEEP_PREALLOC));
+
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta,
+ const wsrep::const_buffer& data,
+ wsrep::mutable_buffer&)
+{
+ DBUG_ENTER("Wsrep_high_priority_service::apply_toi");
+ THD* thd= m_thd;
+ Wsrep_non_trans_mode non_trans_mode(thd, ws_meta);
+
+ wsrep::client_state& client_state(thd->wsrep_cs());
+ DBUG_ASSERT(client_state.in_toi());
+
+ thd_proc_info(thd, "wsrep applier toi");
+
+ WSREP_DEBUG("Wsrep_high_priority_service::apply_toi: %lld",
+ client_state.toi_meta().seqno().get());
+
+ DBUG_EXECUTE_IF("sync.wsrep_apply_toi",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL sync.wsrep_apply_toi_reached "
+ "WAIT_FOR signal.wsrep_apply_toi";
+ DBUG_ASSERT(!debug_sync_set_action(thd,
+ STRING_WITH_LEN(act)));
+ };);
+
+ int ret= wsrep_apply_events(thd, m_rli, data.data(), data.size());
+ if (ret != 0 || thd->wsrep_has_ignored_error)
+ {
+ wsrep_dump_rbr_buf_with_header(thd, data.data(), data.size());
+ thd->wsrep_has_ignored_error= false;
+ /* todo: error voting */
+ }
+ trans_commit(thd);
+
+ thd->close_temporary_tables();
+ thd->lex->sql_command= SQLCOM_END;
+
+ wsrep_set_SE_checkpoint(client_state.toi_meta().gtid());
+
+ must_exit_= check_exit_status();
+
+ DBUG_RETURN(ret);
+}
+
+void Wsrep_high_priority_service::store_globals()
+{
+ wsrep_store_threadvars(m_thd);
+ m_thd->wsrep_cs().acquire_ownership();
+}
+
+void Wsrep_high_priority_service::reset_globals()
+{
+ wsrep_reset_threadvars(m_thd);
+}
+
+void Wsrep_high_priority_service::switch_execution_context(wsrep::high_priority_service& orig_high_priority_service)
+{
+ DBUG_ENTER("Wsrep_high_priority_service::switch_execution_context");
+ Wsrep_high_priority_service&
+ orig_hps= static_cast<Wsrep_high_priority_service&>(orig_high_priority_service);
+ m_thd->thread_stack= orig_hps.m_thd->thread_stack;
+ DBUG_VOID_RETURN;
+}
+
+int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_handle,
+ const wsrep::ws_meta& ws_meta,
+ wsrep::mutable_buffer& err)
+{
+ DBUG_ENTER("Wsrep_high_priority_service::log_dummy_write_set");
+ int ret= 0;
+ DBUG_PRINT("info",
+ ("Wsrep_high_priority_service::log_dummy_write_set: seqno=%lld",
+ ws_meta.seqno().get()));
+ DBUG_EXECUTE_IF("sync.wsrep_log_dummy_write_set",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL sync.wsrep_log_dummy_write_set_reached ";
+ DBUG_ASSERT(!debug_sync_set_action(m_thd,
+ STRING_WITH_LEN(act)));
+ };);
+
+ if (ws_meta.ordered())
+ {
+ wsrep::client_state& cs(m_thd->wsrep_cs());
+ if (!cs.transaction().active())
+ {
+ cs.start_transaction(ws_handle, ws_meta);
+ }
+ adopt_apply_error(err);
+ WSREP_DEBUG("Log dummy write set %lld", ws_meta.seqno().get());
+ ret= cs.provider().commit_order_enter(ws_handle, ws_meta);
+ if (!(ret && opt_log_slave_updates && wsrep_gtid_mode &&
+ m_thd->variables.gtid_seq_no))
+ {
+ cs.before_rollback();
+ cs.after_rollback();
+ }
+
+ if (!WSREP_EMULATE_BINLOG(m_thd))
+ {
+ wsrep_register_for_group_commit(m_thd);
+ ret = ret || cs.provider().commit_order_leave(ws_handle, ws_meta, err);
+ m_thd->wait_for_prior_commit();
+ }
+
+ wsrep_set_SE_checkpoint(ws_meta.gtid());
+
+ if (!WSREP_EMULATE_BINLOG(m_thd))
+ {
+ wsrep_unregister_from_group_commit(m_thd);
+ }
+ else
+ {
+ ret= ret || cs.provider().commit_order_leave(ws_handle, ws_meta, err);
+ }
+ cs.after_applying();
+ }
+ DBUG_RETURN(ret);
+}
+
+void Wsrep_high_priority_service::debug_crash(const char* crash_point)
+{
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_EXECUTE_IF(crash_point, DBUG_SUICIDE(););
+}
+
+/****************************************************************************
+ Applier service
+*****************************************************************************/
+
+Wsrep_applier_service::Wsrep_applier_service(THD* thd)
+ : Wsrep_high_priority_service(thd)
+{
+ thd->wsrep_applier_service= this;
+ thd->wsrep_cs().open(wsrep::client_id(thd->thread_id));
+ thd->wsrep_cs().before_command();
+ thd->wsrep_cs().debug_log_level(wsrep_debug);
+ if (!thd->slave_thread)
+ thd->system_thread_info.rpl_sql_info=
+ new rpl_sql_thread_info(thd->wsrep_rgi->rli->mi->rpl_filter);
+}
+
+Wsrep_applier_service::~Wsrep_applier_service()
+{
+ if (!m_thd->slave_thread)
+ delete m_thd->system_thread_info.rpl_sql_info;
+ m_thd->wsrep_cs().after_command_before_result();
+ m_thd->wsrep_cs().after_command_after_result();
+ m_thd->wsrep_cs().close();
+ m_thd->wsrep_cs().cleanup();
+ m_thd->wsrep_applier_service= NULL;
+}
+
+int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta& ws_meta,
+ const wsrep::const_buffer& data,
+ wsrep::mutable_buffer&)
+{
+ DBUG_ENTER("Wsrep_applier_service::apply_write_set");
+ THD* thd= m_thd;
+
+ thd->variables.option_bits |= OPTION_BEGIN;
+ thd->variables.option_bits |= OPTION_NOT_AUTOCOMMIT;
+ DBUG_ASSERT(thd->wsrep_trx().active());
+ DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_executing);
+
+ thd_proc_info(thd, "applying write set");
+ /* moved dbug sync point here, after possible THD switch for SR transactions
+ has ben done
+ */
+ /* Allow tests to block the applier thread using the DBUG facilities */
+ DBUG_EXECUTE_IF("sync.wsrep_apply_cb",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL sync.wsrep_apply_cb_reached "
+ "WAIT_FOR signal.wsrep_apply_cb";
+ DBUG_ASSERT(!debug_sync_set_action(thd,
+ STRING_WITH_LEN(act)));
+ };);
+
+ wsrep_setup_uk_and_fk_checks(thd);
+
+ int ret= wsrep_apply_events(thd, m_rli, data.data(), data.size());
+
+ if (ret || thd->wsrep_has_ignored_error)
+ {
+ wsrep_dump_rbr_buf_with_header(thd, data.data(), data.size());
+ }
+
+ thd->close_temporary_tables();
+ if (!ret && !(ws_meta.flags() & wsrep::provider::flag::commit))
+ {
+ thd->wsrep_cs().fragment_applied(ws_meta.seqno());
+ }
+ thd_proc_info(thd, "wsrep applied write set");
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_applier_service::apply_nbo_begin(const wsrep::ws_meta& ws_meta,
+ const wsrep::const_buffer& data,
+ wsrep::mutable_buffer& err)
+{
+ DBUG_ENTER("Wsrep_applier_service::apply_nbo_begin");
+ DBUG_RETURN(0);
+}
+
+void Wsrep_applier_service::after_apply()
+{
+ DBUG_ENTER("Wsrep_applier_service::after_apply");
+ wsrep_after_apply(m_thd);
+ DBUG_VOID_RETURN;
+}
+
+bool Wsrep_applier_service::check_exit_status() const
+{
+ bool ret= false;
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+ if (wsrep_slave_count_change < 0)
+ {
+ ++wsrep_slave_count_change;
+ ret= true;
+ }
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
+ return ret;
+}
+
+/****************************************************************************
+ Replayer service
+*****************************************************************************/
+
+Wsrep_replayer_service::Wsrep_replayer_service(THD* replayer_thd, THD* orig_thd)
+ : Wsrep_high_priority_service(replayer_thd)
+ , m_orig_thd(orig_thd)
+ , m_da_shadow()
+ , m_replay_status()
+{
+ /* Response must not have been sent to client */
+ DBUG_ASSERT(!orig_thd->get_stmt_da()->is_sent());
+ /* PS reprepare observer should have been removed already
+ open_table() will fail if we have dangling observer here */
+ DBUG_ASSERT(!orig_thd->m_reprepare_observer);
+ /* Replaying should happen always from after_statement() hook
+ after rollback, which should guarantee that there are no
+ transactional locks */
+ DBUG_ASSERT(!orig_thd->mdl_context.has_transactional_locks());
+
+ /* Make a shadow copy of diagnostics area and reset */
+ m_da_shadow.status= orig_thd->get_stmt_da()->status();
+ if (m_da_shadow.status == Diagnostics_area::DA_OK)
+ {
+ m_da_shadow.affected_rows= orig_thd->get_stmt_da()->affected_rows();
+ m_da_shadow.last_insert_id= orig_thd->get_stmt_da()->last_insert_id();
+ strmake(m_da_shadow.message, orig_thd->get_stmt_da()->message(),
+ sizeof(m_da_shadow.message) - 1);
+ }
+ orig_thd->get_stmt_da()->reset_diagnostics_area();
+
+ /* Release explicit locks */
+ if (orig_thd->locked_tables_mode && orig_thd->lock)
+ {
+ WSREP_WARN("releasing table lock for replaying (%llu)",
+ orig_thd->thread_id);
+ orig_thd->locked_tables_list.unlock_locked_tables(orig_thd);
+ orig_thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
+ }
+
+ thd_proc_info(orig_thd, "wsrep replaying trx");
+
+ /*
+ Switch execution context to replayer_thd and prepare it for
+ replay execution.
+ */
+ /* Copy thd vars from orig_thd before reset, otherwise reset
+ for orig thd clears thread local storage before copy. */
+ wsrep_assign_from_threadvars(replayer_thd);
+ wsrep_reset_threadvars(orig_thd);
+ wsrep_store_threadvars(replayer_thd);
+ wsrep_open(replayer_thd);
+ wsrep_before_command(replayer_thd);
+ replayer_thd->wsrep_cs().clone_transaction_for_replay(orig_thd->wsrep_trx());
+}
+
+Wsrep_replayer_service::~Wsrep_replayer_service()
+{
+ THD* replayer_thd= m_thd;
+ THD* orig_thd= m_orig_thd;
+
+ /* Switch execution context back to original. */
+ wsrep_after_apply(replayer_thd);
+ wsrep_after_command_ignore_result(replayer_thd);
+ wsrep_close(replayer_thd);
+ wsrep_reset_threadvars(replayer_thd);
+ wsrep_store_threadvars(orig_thd);
+
+ DBUG_ASSERT(!orig_thd->get_stmt_da()->is_sent());
+ DBUG_ASSERT(!orig_thd->get_stmt_da()->is_set());
+
+ if (m_replay_status == wsrep::provider::success)
+ {
+ DBUG_ASSERT(replayer_thd->wsrep_cs().current_error() == wsrep::e_success);
+ orig_thd->reset_kill_query();
+ my_ok(orig_thd, m_da_shadow.affected_rows, m_da_shadow.last_insert_id);
+ }
+ else if (m_replay_status == wsrep::provider::error_certification_failed)
+ {
+ wsrep_override_error(orig_thd, ER_LOCK_DEADLOCK);
+ }
+ else
+ {
+ DBUG_ASSERT(0);
+ WSREP_ERROR("trx_replay failed for: %d, schema: %s, query: %s",
+ m_replay_status,
+ orig_thd->db.str, wsrep_thd_query(orig_thd));
+ unireg_abort(1);
+ }
+}
+
+int Wsrep_replayer_service::apply_write_set(const wsrep::ws_meta& ws_meta,
+ const wsrep::const_buffer& data,
+ wsrep::mutable_buffer&)
+{
+ DBUG_ENTER("Wsrep_replayer_service::apply_write_set");
+ THD* thd= m_thd;
+
+ DBUG_ASSERT(thd->wsrep_trx().active());
+ DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_replaying);
+
+ /* Allow tests to block the replayer thread using the DBUG facilities */
+ DBUG_EXECUTE_IF("sync.wsrep_replay_cb",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL sync.wsrep_replay_cb_reached "
+ "WAIT_FOR signal.wsrep_replay_cb";
+ DBUG_ASSERT(!debug_sync_set_action(thd,
+ STRING_WITH_LEN(act)));
+ };);
+
+ wsrep_setup_uk_and_fk_checks(thd);
+
+ int ret= 0;
+ if (!wsrep::starts_transaction(ws_meta.flags()))
+ {
+ DBUG_ASSERT(thd->wsrep_trx().is_streaming());
+ ret= wsrep_schema->replay_transaction(thd,
+ m_rli,
+ ws_meta,
+ thd->wsrep_sr().fragments());
+ }
+
+ ret= ret || wsrep_apply_events(thd, m_rli, data.data(), data.size());
+
+ if (ret || thd->wsrep_has_ignored_error)
+ {
+ wsrep_dump_rbr_buf_with_header(thd, data.data(), data.size());
+ }
+
+ thd->close_temporary_tables();
+ if (!ret && !(ws_meta.flags() & wsrep::provider::flag::commit))
+ {
+ thd->wsrep_cs().fragment_applied(ws_meta.seqno());
+ }
+
+ thd_proc_info(thd, "wsrep replayed write set");
+ DBUG_RETURN(ret);
+}
diff --git a/sql/wsrep_high_priority_service.h b/sql/wsrep_high_priority_service.h
new file mode 100644
index 00000000000..2c61f0126af
--- /dev/null
+++ b/sql/wsrep_high_priority_service.h
@@ -0,0 +1,135 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#ifndef WSREP_HIGH_PRIORITY_SERVICE_H
+#define WSREP_HIGH_PRIORITY_SERVICE_H
+
+#include "wsrep/high_priority_service.hpp"
+#include "wsrep/client_state.hpp"
+#include "my_global.h"
+#include "sql_error.h" /* Diagnostics area */
+#include "sql_class.h" /* rpl_group_info */
+
+class THD;
+class Relay_log_info;
+class Wsrep_server_service;
+
+class Wsrep_high_priority_service :
+ public wsrep::high_priority_service,
+ public wsrep::high_priority_context
+{
+public:
+ Wsrep_high_priority_service(THD*);
+ ~Wsrep_high_priority_service();
+ int start_transaction(const wsrep::ws_handle&,
+ const wsrep::ws_meta&);
+ int next_fragment(const wsrep::ws_meta&);
+ const wsrep::transaction& transaction() const;
+ int adopt_transaction(const wsrep::transaction&);
+ int apply_write_set(const wsrep::ws_meta&, const wsrep::const_buffer&,
+ wsrep::mutable_buffer&) = 0;
+ int append_fragment_and_commit(const wsrep::ws_handle&,
+ const wsrep::ws_meta&,
+ const wsrep::const_buffer&,
+ const wsrep::xid&);
+ int remove_fragments(const wsrep::ws_meta&);
+ int commit(const wsrep::ws_handle&, const wsrep::ws_meta&);
+ int rollback(const wsrep::ws_handle&, const wsrep::ws_meta&);
+ int apply_toi(const wsrep::ws_meta&, const wsrep::const_buffer&,
+ wsrep::mutable_buffer&);
+ void store_globals();
+ void reset_globals();
+ void switch_execution_context(wsrep::high_priority_service&);
+ int log_dummy_write_set(const wsrep::ws_handle&,
+ const wsrep::ws_meta&,
+ wsrep::mutable_buffer&);
+ void adopt_apply_error(wsrep::mutable_buffer& err) {}
+
+ virtual bool check_exit_status() const = 0;
+ void debug_crash(const char*);
+protected:
+ friend Wsrep_server_service;
+ THD* m_thd;
+ Relay_log_info* m_rli;
+ rpl_group_info* m_rgi;
+ struct shadow
+ {
+ ulonglong option_bits;
+ uint server_status;
+ struct st_vio* vio;
+ ulong tx_isolation;
+ char* db;
+ size_t db_length;
+ //struct timeval user_time;
+ my_hrtime_t user_time;
+ longlong row_count_func;
+ bool wsrep_applier;
+} m_shadow;
+};
+
+class Wsrep_applier_service : public Wsrep_high_priority_service
+{
+public:
+ Wsrep_applier_service(THD*);
+ ~Wsrep_applier_service();
+ int apply_write_set(const wsrep::ws_meta&, const wsrep::const_buffer&,
+ wsrep::mutable_buffer&);
+ int apply_nbo_begin(const wsrep::ws_meta&, const wsrep::const_buffer& data,
+ wsrep::mutable_buffer& err);
+ void after_apply();
+ bool is_replaying() const { return false; }
+ bool check_exit_status() const;
+};
+
+class Wsrep_replayer_service : public Wsrep_high_priority_service
+{
+public:
+ Wsrep_replayer_service(THD* replayer_thd, THD* orig_thd);
+ ~Wsrep_replayer_service();
+ int apply_write_set(const wsrep::ws_meta&, const wsrep::const_buffer&,
+ wsrep::mutable_buffer&);
+ int apply_nbo_begin(const wsrep::ws_meta&, const wsrep::const_buffer& data,
+ wsrep::mutable_buffer& err)
+ {
+ DBUG_ASSERT(0); /* DDL should never cause replaying */
+ return 0;
+ }
+ void after_apply() { }
+ bool is_replaying() const { return true; }
+ void replay_status(enum wsrep::provider::status status)
+ { m_replay_status = status; }
+ enum wsrep::provider::status replay_status() const
+ { return m_replay_status; }
+ /* Replayer should never be forced to exit */
+ bool check_exit_status() const { return false; }
+private:
+ THD* m_orig_thd;
+ struct da_shadow
+ {
+ enum Diagnostics_area::enum_diagnostics_status status;
+ ulonglong affected_rows;
+ ulonglong last_insert_id;
+ char message[MYSQL_ERRMSG_SIZE];
+ da_shadow()
+ : status()
+ , affected_rows()
+ , last_insert_id()
+ , message()
+ { }
+ } m_da_shadow;
+ enum wsrep::provider::status m_replay_status;
+};
+
+#endif /* WSREP_HIGH_PRIORITY_SERVICE_H */
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
deleted file mode 100644
index 1e302734df8..00000000000
--- a/sql/wsrep_hton.cc
+++ /dev/null
@@ -1,675 +0,0 @@
-/* Copyright 2008-2022 Codership Oy <http://www.codership.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
-
-#include "mariadb.h"
-#include <mysqld.h>
-#include "sql_base.h"
-#include "rpl_filter.h"
-#include <sql_class.h>
-#include "wsrep_mysqld.h"
-#include "wsrep_binlog.h"
-#include "wsrep_xid.h"
-#include <cstdio>
-#include <cstdlib>
-#include "debug_sync.h"
-
-extern handlerton *binlog_hton;
-extern int binlog_close_connection(handlerton *hton, THD *thd);
-extern ulonglong thd_to_trx_id(THD *thd);
-
-extern "C" int thd_binlog_format(const MYSQL_THD thd);
-// todo: share interface with ha_innodb.c
-
-/*
- Cleanup after local transaction commit/rollback, replay or TOI.
-*/
-void wsrep_cleanup_transaction(THD *thd)
-{
- if (!WSREP(thd)) return;
- DBUG_ASSERT(thd->wsrep_conflict_state != MUST_REPLAY &&
- thd->wsrep_conflict_state != REPLAYING);
-
- if (wsrep_emulate_bin_log) thd_binlog_trx_reset(thd);
- thd->wsrep_ws_handle.trx_id= WSREP_UNDEFINED_TRX_ID;
- thd->wsrep_trx_meta.gtid= WSREP_GTID_UNDEFINED;
- thd->wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED;
- thd->wsrep_exec_mode= LOCAL_STATE;
- thd->wsrep_affected_rows= 0;
- thd->wsrep_skip_wsrep_GTID= false;
- thd->wsrep_split_flag= false;
- return;
-}
-
-/*
- wsrep hton
-*/
-handlerton *wsrep_hton;
-
-
-/*
- Registers wsrep hton at commit time if transaction has registered htons
- for supported engine types.
-
- Hton should not be registered for TOTAL_ORDER operations.
-
- Registration is needed for both LOCAL_MODE and REPL_RECV transactions to run
- commit in 2pc so that wsrep position gets properly recorded in storage
- engines.
-
- Note that all hton calls should immediately return for threads that are
- in REPL_RECV mode as their states are controlled by wsrep appliers or
- replaying code. Only threads in LOCAL_MODE should run wsrep callbacks
- from hton methods.
-*/
-void wsrep_register_hton(THD* thd, bool all)
-{
- if (WSREP(thd) && thd->wsrep_exec_mode != TOTAL_ORDER &&
- !thd->wsrep_apply_toi)
- {
- if (thd->wsrep_exec_mode == LOCAL_STATE &&
- (thd_sql_command(thd) == SQLCOM_OPTIMIZE ||
- thd_sql_command(thd) == SQLCOM_ANALYZE ||
- thd_sql_command(thd) == SQLCOM_REPAIR) &&
- thd->lex->no_write_to_binlog == 1)
- {
- WSREP_DEBUG("Skipping wsrep_register_hton for LOCAL sql admin command : %s",
- thd->query());
- return;
- }
-
- THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
- for (Ha_trx_info *i= trans->ha_list; i; i = i->next())
- {
- if ((i->ht()->db_type == DB_TYPE_INNODB) ||
- (i->ht()->db_type == DB_TYPE_TOKUDB))
- {
- trans_register_ha(thd, all, wsrep_hton);
-
- /* follow innodb read/write setting
- * but, as an exception: CTAS with empty result set will not be
- * replicated unless we declare wsrep hton as read/write here
- */
- if (i->is_trx_read_write() ||
- ((thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
- thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE) &&
- thd->wsrep_exec_mode == LOCAL_STATE))
- {
- thd->ha_data[wsrep_hton->slot].ha_info[all].set_trx_read_write();
- }
- break;
- }
- }
- }
-}
-
-/*
- Calls wsrep->post_commit() for locally executed transactions that have
- got seqno from provider (must commit) and don't require replaying.
- */
-void wsrep_post_commit(THD* thd, bool all)
-{
- if (!WSREP(thd)) return;
-
- switch (thd->wsrep_exec_mode)
- {
- case LOCAL_COMMIT:
- {
- DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED);
- if (wsrep && wsrep->post_commit(wsrep, &thd->wsrep_ws_handle))
- {
- DBUG_PRINT("wsrep", ("set committed fail"));
- WSREP_WARN("set committed fail: %llu %d",
- (long long)thd->real_id, thd->get_stmt_da()->status());
- }
- wsrep_cleanup_transaction(thd);
- break;
- }
- case LOCAL_STATE:
- {
- /* non-InnoDB statements may have populated events in stmt cache
- => cleanup
- */
- if (thd->wsrep_conflict_state != MUST_REPLAY)
- {
- WSREP_DEBUG("cleanup transaction for LOCAL_STATE: %s",
- WSREP_QUERY(thd));
- }
- /*
- Run post-rollback hook to clean up in the case if
- some keys were populated for the transaction in provider
- but during commit time there was no write set to replicate.
- This may happen when client sets the SAVEPOINT and immediately
- rolls back to savepoint after first operation.
- */
- if (all && thd->wsrep_conflict_state != MUST_REPLAY &&
- thd->wsrep_conflict_state != REPLAYING &&
- wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
- {
- WSREP_WARN("post_rollback fail: %llu %d",
- (long long)thd->thread_id, thd->get_stmt_da()->status());
- }
- if (thd->wsrep_conflict_state != MUST_REPLAY &&
- thd->wsrep_conflict_state != REPLAYING)
- {
- wsrep_cleanup_transaction(thd);
- }
- break;
- }
- default: break;
- }
-}
-
-/*
- wsrep exploits binlog's caches even if binlogging itself is not
- activated. In such case connection close needs calling
- actual binlog's method.
- Todo: split binlog hton from its caches to use ones by wsrep
- without referring to binlog's stuff.
-*/
-static int
-wsrep_close_connection(handlerton* hton, THD* thd)
-{
- DBUG_ENTER("wsrep_close_connection");
-
- if (thd->wsrep_exec_mode == REPL_RECV)
- {
- DBUG_RETURN(0);
- }
-
- if (wsrep_emulate_bin_log && thd_get_ha_data(thd, binlog_hton) != NULL)
- binlog_hton->close_connection (binlog_hton, thd);
- DBUG_RETURN(0);
-}
-
-/*
- prepare/wsrep_run_wsrep_commit can fail in two ways
- - certification test or an equivalent. As a result,
- the current transaction just rolls back
- Error codes:
- WSREP_TRX_CERT_FAIL, WSREP_TRX_SIZE_EXCEEDED, WSREP_TRX_ERROR
- - a post-certification failure makes this server unable to
- commit its own WS and therefore the server must abort
-*/
-static int wsrep_prepare(handlerton *hton, THD *thd, bool all)
-{
- DBUG_ENTER("wsrep_prepare");
-
- if (thd->wsrep_exec_mode == REPL_RECV)
- {
- DBUG_RETURN(0);
- }
-
- DBUG_ASSERT(thd->ha_data[wsrep_hton->slot].ha_info[all].is_trx_read_write());
- DBUG_ASSERT(thd->wsrep_exec_mode == LOCAL_STATE);
- DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno == WSREP_SEQNO_UNDEFINED);
-
- if ((all ||
- !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) &&
- (thd->variables.wsrep_on && !wsrep_trans_cache_is_empty(thd)))
- {
- int res= wsrep_run_wsrep_commit(thd, all);
- if (res != 0)
- {
- if (res == WSREP_TRX_SIZE_EXCEEDED)
- res= EMSGSIZE;
- else
- res= EDEADLK; // for a better error message
- }
- DBUG_RETURN (res);
- }
- DBUG_RETURN(0);
-}
-
-/*
- Empty callbacks to support SAVEPOINT callbacks.
-*/
-
-static int wsrep_savepoint_set(handlerton *hton, THD *thd, void *sv)
-{
- DBUG_ENTER("wsrep_savepoint_set");
- DBUG_RETURN(0);
-}
-
-static int wsrep_savepoint_rollback(handlerton *hton, THD *thd, void *sv)
-{
- DBUG_ENTER("wsrep_savepoint_rollback");
- DBUG_RETURN(0);
-}
-
-static int wsrep_rollback(handlerton *hton, THD *thd, bool all)
-{
- DBUG_ENTER("wsrep_rollback");
-
- if (thd->wsrep_exec_mode == REPL_RECV)
- {
- DBUG_RETURN(0);
- }
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- switch (thd->wsrep_exec_mode)
- {
- case TOTAL_ORDER:
- case REPL_RECV:
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- WSREP_DEBUG("Avoiding wsrep rollback for failed DDL: %s", thd->query());
- DBUG_RETURN(0);
- default: break;
- }
-
- if ((all || !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) &&
- thd->variables.wsrep_on && thd->wsrep_conflict_state != MUST_REPLAY)
- {
- if (wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
- {
- DBUG_PRINT("wsrep", ("setting rollback fail"));
- WSREP_ERROR("setting rollback fail: thd: %llu, schema: %s, SQL: %s",
- (long long)thd->real_id, thd->get_db(), thd->query());
- }
- wsrep_cleanup_transaction(thd);
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- DBUG_RETURN(0);
-}
-
-int wsrep_commit(handlerton *hton, THD *thd, bool all)
-{
- DBUG_ENTER("wsrep_commit");
-
- if (thd->wsrep_exec_mode == REPL_RECV)
- {
- DBUG_RETURN(0);
- }
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- if ((all || !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) &&
- (thd->variables.wsrep_on && thd->wsrep_conflict_state != MUST_REPLAY))
- {
- if (thd->wsrep_exec_mode == LOCAL_COMMIT)
- {
- DBUG_ASSERT(thd->ha_data[wsrep_hton->slot].ha_info[all].is_trx_read_write());
- /*
- Call to wsrep->post_commit() (moved to wsrep_post_commit()) must
- be done only after commit has done for all involved htons.
- */
- DBUG_PRINT("wsrep", ("commit"));
- }
- else
- {
- /*
- Transaction didn't go through wsrep->pre_commit() so just roll back
- possible changes to clean state.
- */
- if (WSREP_PROVIDER_EXISTS) {
- if (wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
- {
- DBUG_PRINT("wsrep", ("setting rollback fail"));
- WSREP_ERROR("setting rollback fail: thd: %llu, schema: %s, SQL: %s",
- (long long)thd->real_id, thd->get_db(),
- thd->query());
- }
- }
- wsrep_cleanup_transaction(thd);
- }
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- DBUG_RETURN(0);
-}
-
-
-extern Rpl_filter* binlog_filter;
-extern my_bool opt_log_slave_updates;
-
-enum wsrep_trx_status
-wsrep_run_wsrep_commit(THD *thd, bool all)
-{
- int rcode= -1;
- size_t data_len= 0;
- IO_CACHE *cache;
- int replay_round= 0;
- DBUG_ENTER("wsrep_run_wsrep_commit");
-
- if (thd->get_stmt_da()->is_error()) {
- WSREP_DEBUG("commit issue, error: %d %s",
- thd->get_stmt_da()->sql_errno(), thd->get_stmt_da()->message());
- }
-
- DEBUG_SYNC(thd, "wsrep_before_replication");
-
- if (thd->slave_thread && !opt_log_slave_updates) DBUG_RETURN(WSREP_TRX_OK);
-
- if (thd->wsrep_exec_mode == REPL_RECV) {
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state == MUST_ABORT) {
- if (wsrep_debug)
- WSREP_INFO("WSREP: must abort for BF");
- DBUG_PRINT("wsrep", ("BF apply commit fail"));
- thd->wsrep_conflict_state = NO_CONFLICT;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- //
- // TODO: test all calls of the rollback.
- // rollback must happen automagically innobase_rollback(hton, thd, 1);
- //
- DBUG_RETURN(WSREP_TRX_ERROR);
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
-
- if (thd->wsrep_exec_mode != LOCAL_STATE) DBUG_RETURN(WSREP_TRX_OK);
-
- if (thd->wsrep_consistency_check == CONSISTENCY_CHECK_RUNNING) {
- WSREP_DEBUG("commit for consistency check: %s", thd->query());
- DBUG_RETURN(WSREP_TRX_OK);
- }
-
- DBUG_PRINT("wsrep", ("replicating commit"));
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state == MUST_ABORT) {
- DBUG_PRINT("wsrep", ("replicate commit fail"));
- thd->wsrep_conflict_state = ABORTED;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- if (wsrep_debug) {
- WSREP_INFO("innobase_commit, abort %s",
- (thd->query()) ? thd->query() : "void");
- }
- DBUG_RETURN(WSREP_TRX_CERT_FAIL);
- }
-
- mysql_mutex_lock(&LOCK_wsrep_replaying);
-
- DBUG_PRINT("info", ("wsrep_replaying: %d wsrep_conflict_state: %d killed: %d shutdown_in_progress: %d",
- (int) wsrep_replaying, (int) thd->wsrep_conflict_state,
- (int) thd->killed,
- (int) shutdown_in_progress));
-
- while (wsrep_replaying > 0 &&
- thd->wsrep_conflict_state == NO_CONFLICT &&
- thd->killed == NOT_KILLED &&
- !shutdown_in_progress)
- {
-
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-
- mysql_mutex_lock(&thd->mysys_var->mutex);
- thd_proc_info(thd, "WSREP waiting on replaying");
- thd->mysys_var->current_mutex= &LOCK_wsrep_replaying;
- thd->mysys_var->current_cond= &COND_wsrep_replaying;
- mysql_mutex_unlock(&thd->mysys_var->mutex);
-
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- // Using timedwait is a hack to avoid deadlock in case if BF victim
- // misses the signal.
- struct timespec wtime = {0, 1000000};
- mysql_cond_timedwait(&COND_wsrep_replaying, &LOCK_wsrep_replaying,
- &wtime);
-
- if (replay_round++ % 100000 == 0)
- WSREP_DEBUG("commit waiting for replaying: replayers %d, thd: %lld "
- "conflict: %d (round: %d)",
- wsrep_replaying, (longlong) thd->thread_id,
- thd->wsrep_conflict_state, replay_round);
-
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
-
- mysql_mutex_lock(&thd->mysys_var->mutex);
- thd->mysys_var->current_mutex= 0;
- thd->mysys_var->current_cond= 0;
- mysql_mutex_unlock(&thd->mysys_var->mutex);
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- }
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
-
- if (thd->wsrep_conflict_state == MUST_ABORT) {
- DBUG_PRINT("wsrep", ("replicate commit fail"));
- thd->wsrep_conflict_state = ABORTED;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- WSREP_DEBUG("innobase_commit abort after replaying wait %s",
- (thd->query()) ? thd->query() : "void");
- DBUG_RETURN(WSREP_TRX_CERT_FAIL);
- }
-
- wsrep_thd_set_query_state(thd, QUERY_COMMITTING);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-
- cache = get_trans_log(thd);
- rcode = 0;
- if (cache) {
- thd->binlog_flush_pending_rows_event(true);
- rcode = wsrep_write_cache(wsrep, thd, cache, &data_len);
- if (WSREP_OK != rcode) {
- WSREP_ERROR("rbr write fail, data_len: %zu, %d", data_len, rcode);
- DBUG_RETURN(WSREP_TRX_SIZE_EXCEEDED);
- }
- }
-
- DBUG_PRINT("info", ("rcode: %d wsrep_conflict_state: %d",
- rcode, thd->wsrep_conflict_state));
-
- if (data_len == 0)
- {
- if (thd->get_stmt_da()->is_ok() &&
- thd->get_stmt_da()->affected_rows() > 0 &&
- !binlog_filter->is_on())
- {
- WSREP_DEBUG("empty rbr buffer, query: %s, "
- "affected rows: %llu, "
- "changed tables: %d, "
- "sql_log_bin: %d, "
- "wsrep status (%d %d %d)",
- thd->query(), thd->get_stmt_da()->affected_rows(),
- stmt_has_updated_trans_table(thd), thd->variables.sql_log_bin,
- thd->wsrep_exec_mode, thd->wsrep_query_state,
- thd->wsrep_conflict_state);
- }
- else
- {
- WSREP_DEBUG("empty rbr buffer, query: %s", thd->query());
- }
- wsrep_thd_set_query_state(thd, QUERY_EXEC);
- DBUG_RETURN(WSREP_TRX_OK);
- }
-
- if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id)
- {
- /*
- Async replication slave may have applied some non-innodb workload,
- and then has written replication "meta data" into gtid_slave_pos
- innodb table. Writes to gtid_slave_pos must not be replicated,
- but this activity has caused that innodb hton is registered for this
- transaction, but no wsrep keys have been appended.
- We enter in this code path, because IO cache has events for non-innodb
- tables.
- => we should not treat it an error if trx is not introduced for provider
- */
- if (thd->system_thread == SYSTEM_THREAD_SLAVE_SQL)
- {
- WSREP_DEBUG("skipping wsrep replication for async slave, error not raised");
- DBUG_RETURN(WSREP_TRX_OK);
- }
-
- WSREP_WARN("SQL statement was ineffective thd: %llu buf: %zu\n"
- "schema: %s \n"
- "QUERY: %s\n"
- " => Skipping replication",
- (ulonglong) thd->thread_id, data_len,
- thd->get_db(), thd->query());
- rcode = WSREP_TRX_FAIL;
- }
- else if (!rcode)
- {
- if (WSREP_OK == rcode && wsrep)
- rcode = wsrep->pre_commit(wsrep,
- (wsrep_conn_id_t)thd->thread_id,
- &thd->wsrep_ws_handle,
- WSREP_FLAG_COMMIT |
- ((thd->wsrep_PA_safe) ?
- 0ULL : WSREP_FLAG_PA_UNSAFE),
- &thd->wsrep_trx_meta);
-
- DBUG_PRINT("info", ("rcode after pre_commit: %d", rcode));
-
- if (rcode == WSREP_TRX_MISSING) {
- WSREP_WARN("Transaction missing in provider, thd: %lld schema: %s SQL: %s",
- (longlong) thd->thread_id,
- thd->get_db(), thd->query());
- rcode = WSREP_TRX_FAIL;
- } else if (rcode == WSREP_BF_ABORT) {
- WSREP_DEBUG("thd: %lld seqno: %lld BF aborted by provider, will replay",
- (longlong) thd->thread_id,
- (longlong) thd->wsrep_trx_meta.gtid.seqno);
- mysql_mutex_lock(&thd->LOCK_thd_data);
- thd->wsrep_conflict_state = MUST_REPLAY;
- DBUG_ASSERT(wsrep_thd_trx_seqno(thd) > 0);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- wsrep_replaying++;
- WSREP_DEBUG("replaying increased: %d, thd: %lld",
- wsrep_replaying, (longlong) thd->thread_id);
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
- }
- } else {
- WSREP_ERROR("I/O error reading from thd's binlog iocache: "
- "errno=%d, io cache code=%d", my_errno, cache->error);
- DBUG_ASSERT(0); // failure like this can not normally happen
- DBUG_RETURN(WSREP_TRX_ERROR);
- }
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
-
- DEBUG_SYNC(thd, "wsrep_after_replication");
-
- DBUG_PRINT("info", ("rcode: %d wsrep_conflict_state: %d",
- rcode, thd->wsrep_conflict_state));
-
- switch(rcode) {
- case 0:
- /*
- About MUST_ABORT: We assume that even if thd conflict state was set
- to MUST_ABORT, underlying transaction was not rolled back or marked
- as deadlock victim in QUERY_COMMITTING state. Conflict state is
- set to NO_CONFLICT and commit proceeds as usual.
- */
- if (thd->wsrep_conflict_state == MUST_ABORT)
- thd->wsrep_conflict_state= NO_CONFLICT;
-
- if (thd->wsrep_conflict_state != NO_CONFLICT)
- {
- WSREP_WARN("thd: %llu seqno: %lld conflict state %d after post commit",
- (longlong) thd->thread_id,
- (longlong) thd->wsrep_trx_meta.gtid.seqno,
- thd->wsrep_conflict_state);
- }
- thd->wsrep_exec_mode= LOCAL_COMMIT;
- DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED);
- /* Override XID iff it was generated by mysql */
- if (thd->transaction.xid_state.xid.get_my_xid())
- {
- wsrep_xid_init(&thd->transaction.xid_state.xid,
- thd->wsrep_trx_meta.gtid.uuid,
- thd->wsrep_trx_meta.gtid.seqno);
- }
- DBUG_PRINT("wsrep", ("replicating commit success"));
- break;
- case WSREP_BF_ABORT:
- DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED);
- /* fall through */
- case WSREP_TRX_FAIL:
- WSREP_DEBUG("commit failed for reason: %d conf %d",
- rcode, thd->wsrep_conflict_state);
- DBUG_PRINT("wsrep", ("replicating commit fail"));
-
- wsrep_thd_set_query_state(thd, QUERY_EXEC);
-
- if (thd->wsrep_conflict_state == MUST_ABORT) {
- thd->wsrep_conflict_state= ABORTED;
- }
- else
- {
- WSREP_DEBUG("conflict state: %d", thd->wsrep_conflict_state);
- if (thd->wsrep_conflict_state == NO_CONFLICT)
- {
- thd->wsrep_conflict_state = CERT_FAILURE;
- WSREP_LOG_CONFLICT(NULL, thd, FALSE);
- }
- }
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-
- DBUG_RETURN(WSREP_TRX_CERT_FAIL);
-
- case WSREP_SIZE_EXCEEDED:
- WSREP_ERROR("transaction size exceeded");
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- DBUG_RETURN(WSREP_TRX_SIZE_EXCEEDED);
- case WSREP_CONN_FAIL:
- WSREP_ERROR("connection failure");
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- DBUG_RETURN(WSREP_TRX_ERROR);
- default:
- WSREP_ERROR("unknown connection failure");
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- DBUG_RETURN(WSREP_TRX_ERROR);
- }
-
- wsrep_thd_set_query_state(thd, QUERY_EXEC);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-
- DBUG_RETURN(WSREP_TRX_OK);
-}
-
-
-static int wsrep_hton_init(void *p)
-{
- wsrep_hton= (handlerton *)p;
- //wsrep_hton->state=opt_bin_log ? SHOW_OPTION_YES : SHOW_OPTION_NO;
- wsrep_hton->state= SHOW_OPTION_YES;
- wsrep_hton->db_type=(legacy_db_type)0;
- wsrep_hton->savepoint_offset= sizeof(my_off_t);
- wsrep_hton->close_connection= wsrep_close_connection;
- wsrep_hton->savepoint_set= wsrep_savepoint_set;
- wsrep_hton->savepoint_rollback= wsrep_savepoint_rollback;
- wsrep_hton->commit= wsrep_commit;
- wsrep_hton->rollback= wsrep_rollback;
- wsrep_hton->prepare= wsrep_prepare;
- wsrep_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN; // todo: fix flags
- return 0;
-}
-
-
-struct st_mysql_storage_engine wsrep_storage_engine=
-{ MYSQL_HANDLERTON_INTERFACE_VERSION };
-
-
-maria_declare_plugin(wsrep)
-{
- MYSQL_STORAGE_ENGINE_PLUGIN,
- &wsrep_storage_engine,
- "wsrep",
- "Codership Oy",
- "A pseudo storage engine to represent transactions in multi-master "
- "synchornous replication",
- PLUGIN_LICENSE_GPL,
- wsrep_hton_init, /* Plugin Init */
- NULL, /* Plugin Deinit */
- 0x0100 /* 1.0 */,
- NULL, /* status variables */
- NULL, /* system variables */
- "1.0", /* string version */
- MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
-}
-maria_declare_plugin_end;
diff --git a/sql/wsrep_mutex.h b/sql/wsrep_mutex.h
new file mode 100644
index 00000000000..f396c1be331
--- /dev/null
+++ b/sql/wsrep_mutex.h
@@ -0,0 +1,50 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#ifndef WSREP_MUTEX_H
+#define WSREP_MUTEX_H
+
+/* wsrep-lib */
+#include "wsrep/mutex.hpp"
+
+/* implementation */
+#include "my_pthread.h"
+
+class Wsrep_mutex : public wsrep::mutex
+{
+public:
+ Wsrep_mutex(mysql_mutex_t* mutex)
+ : m_mutex(mutex)
+ { }
+
+ void lock()
+ {
+ mysql_mutex_lock(m_mutex);
+ }
+
+ void unlock()
+ {
+ mysql_mutex_unlock(m_mutex);
+ }
+
+ void* native()
+ {
+ return m_mutex;
+ }
+private:
+ mysql_mutex_t* m_mutex;
+};
+
+#endif /* WSREP_MUTEX_H */
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 72af51df0ef..3a5db89d02b 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -14,7 +14,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#include "sql_plugin.h" /* wsrep_plugins_pre_init() */
+#include "my_global.h"
+#include "wsrep_server_state.h"
+
+#include "mariadb.h"
#include <mysqld.h>
+#include <transaction.h>
#include <sql_class.h>
#include <sql_parse.h>
#include <sql_base.h> /* find_temporary_table() */
@@ -33,25 +38,32 @@
#include "wsrep_var.h"
#include "wsrep_binlog.h"
#include "wsrep_applier.h"
+#include "wsrep_schema.h"
#include "wsrep_xid.h"
+#include "wsrep_trans_observer.h"
+#include "mysql/service_wsrep.h"
#include <cstdio>
#include <cstdlib>
+#include <string>
#include "log_event.h"
+#include "sql_connect.h"
-wsrep_t *wsrep = NULL;
-/*
- wsrep_emulate_bin_log is a flag to tell that binlog has not been configured.
- wsrep needs to get binlog events from transaction cache even when binlog is
- not enabled, wsrep_emulate_bin_log opens needed code paths to make this
- possible
-*/
-my_bool wsrep_emulate_bin_log = FALSE; // activating parts of binlog interface
+#include <sstream>
+
+/* wsrep-lib */
+Wsrep_server_state* Wsrep_server_state::m_instance;
+
+my_bool wsrep_emulate_bin_log = FALSE; // activating parts of binlog interface
#ifdef GTID_SUPPORT
/* Sidno in global_sid_map corresponding to group uuid */
rpl_sidno wsrep_sidno= -1;
#endif /* GTID_SUPPORT */
my_bool wsrep_preordered_opt= FALSE;
+/* Streaming Replication */
+const char *wsrep_fragment_units[]= { "bytes", "rows", "statements", NullS };
+const char *wsrep_SR_store_types[]= { "none", "table", NullS };
+
/*
* Begin configuration options
*/
@@ -73,7 +85,7 @@ const char *wsrep_data_home_dir;
const char *wsrep_dbug_option;
const char *wsrep_notify_cmd;
-my_bool wsrep_debug; // Enable debug level logging
+ulong wsrep_debug; // Debug level logging
my_bool wsrep_convert_LOCK_to_trx; // Convert locking sessions to trx
my_bool wsrep_auto_increment_control; // Control auto increment variables
my_bool wsrep_drupal_282555_workaround; // Retry autoinc insert after dupkey
@@ -82,7 +94,7 @@ ulong wsrep_certification_rules = WSREP_CERTIFICATION_RULES_STRICT;
my_bool wsrep_recovery; // Recovery
my_bool wsrep_replicate_myisam; // Enable MyISAM replication
my_bool wsrep_log_conflicts;
-my_bool wsrep_load_data_splitting; // Commit load data every 10K intervals
+my_bool wsrep_load_data_splitting= 0; // Commit load data every 10K intervals
my_bool wsrep_slave_UK_checks; // Slave thread does UK checks
my_bool wsrep_slave_FK_checks; // Slave thread does FK checks
my_bool wsrep_restart_slave; // Should mysql slave thread be
@@ -93,7 +105,7 @@ long wsrep_slave_threads; // No. of slave appliers threads
ulong wsrep_retry_autocommit; // Retry aborted autocommit trx
ulong wsrep_max_ws_size; // Max allowed ws (RBR buffer) size
ulong wsrep_max_ws_rows; // Max number of rows in ws
-ulong wsrep_forced_binlog_format;
+ulong wsrep_forced_binlog_format= BINLOG_FORMAT_UNSPEC;
ulong wsrep_mysql_replication_bundle;
bool wsrep_gtid_mode; // Use wsrep_gtid_domain_id
// for galera transactions?
@@ -107,13 +119,31 @@ my_bool wsrep_restart_slave_activated= 0; // Node has dropped, and slave
bool wsrep_new_cluster= false; // Bootstrap the cluster?
int wsrep_slave_count_change= 0; // No. of appliers to stop/start
int wsrep_to_isolation= 0; // No. of active TO isolation threads
-long wsrep_max_protocol_version= 3; // Maximum protocol version to use
+long wsrep_max_protocol_version= 4; // Maximum protocol version to use
+long int wsrep_protocol_version= wsrep_max_protocol_version;
+ulong wsrep_trx_fragment_unit= WSREP_FRAG_BYTES;
+ // unit for fragment size
+ulong wsrep_SR_store_type= WSREP_SR_STORE_TABLE;
+uint wsrep_ignore_apply_errors= 0;
+
/*
* End configuration options
*/
/*
+ * Cached variables
+ */
+
+// Whether the Galera write-set replication provider is set
+// wsrep_provider && strcmp(wsrep_provider, WSREP_NONE)
+bool WSREP_PROVIDER_EXISTS_;
+
+// Whether the Galera write-set replication is enabled
+// global_system_variables.wsrep_on && WSREP_PROVIDER_EXISTS_
+bool WSREP_ON_;
+
+/*
* Other wsrep global variables.
*/
@@ -123,14 +153,20 @@ mysql_mutex_t LOCK_wsrep_sst;
mysql_cond_t COND_wsrep_sst;
mysql_mutex_t LOCK_wsrep_sst_init;
mysql_cond_t COND_wsrep_sst_init;
-mysql_mutex_t LOCK_wsrep_rollback;
-mysql_cond_t COND_wsrep_rollback;
-wsrep_aborting_thd_t wsrep_aborting_thd= NULL;
mysql_mutex_t LOCK_wsrep_replaying;
mysql_cond_t COND_wsrep_replaying;
mysql_mutex_t LOCK_wsrep_slave_threads;
+mysql_cond_t COND_wsrep_slave_threads;
+mysql_mutex_t LOCK_wsrep_cluster_config;
mysql_mutex_t LOCK_wsrep_desync;
mysql_mutex_t LOCK_wsrep_config_state;
+mysql_mutex_t LOCK_wsrep_group_commit;
+mysql_mutex_t LOCK_wsrep_SR_pool;
+mysql_mutex_t LOCK_wsrep_SR_store;
+mysql_mutex_t LOCK_wsrep_joiner_monitor;
+mysql_mutex_t LOCK_wsrep_donor_monitor;
+mysql_cond_t COND_wsrep_joiner_monitor;
+mysql_cond_t COND_wsrep_donor_monitor;
int wsrep_replaying= 0;
ulong wsrep_running_threads = 0; // # of currently running wsrep
@@ -141,15 +177,23 @@ ulong wsrep_running_rollbacker_threads = 0; // # of running
ulong my_bind_addr;
#ifdef HAVE_PSI_INTERFACE
-PSI_mutex_key key_LOCK_wsrep_rollback,
+PSI_mutex_key
key_LOCK_wsrep_replaying, key_LOCK_wsrep_ready, key_LOCK_wsrep_sst,
key_LOCK_wsrep_sst_thread, key_LOCK_wsrep_sst_init,
key_LOCK_wsrep_slave_threads, key_LOCK_wsrep_desync,
- key_LOCK_wsrep_config_state;
-
-PSI_cond_key key_COND_wsrep_rollback,
+ key_LOCK_wsrep_config_state, key_LOCK_wsrep_cluster_config,
+ key_LOCK_wsrep_group_commit,
+ key_LOCK_wsrep_SR_pool,
+ key_LOCK_wsrep_SR_store,
+ key_LOCK_wsrep_thd_queue,
+ key_LOCK_wsrep_joiner_monitor,
+ key_LOCK_wsrep_donor_monitor;
+
+PSI_cond_key key_COND_wsrep_thd,
key_COND_wsrep_replaying, key_COND_wsrep_ready, key_COND_wsrep_sst,
- key_COND_wsrep_sst_init, key_COND_wsrep_sst_thread;
+ key_COND_wsrep_sst_init, key_COND_wsrep_sst_thread,
+ key_COND_wsrep_thd_queue, key_COND_wsrep_slave_threads,
+ key_COND_wsrep_joiner_monitor, key_COND_wsrep_donor_monitor;
PSI_file_key key_file_wsrep_gra_log;
@@ -160,11 +204,16 @@ static PSI_mutex_info wsrep_mutexes[]=
{ &key_LOCK_wsrep_sst_thread, "wsrep_sst_thread", 0},
{ &key_LOCK_wsrep_sst_init, "LOCK_wsrep_sst_init", PSI_FLAG_GLOBAL},
{ &key_LOCK_wsrep_sst, "LOCK_wsrep_sst", PSI_FLAG_GLOBAL},
- { &key_LOCK_wsrep_rollback, "LOCK_wsrep_rollback", PSI_FLAG_GLOBAL},
{ &key_LOCK_wsrep_replaying, "LOCK_wsrep_replaying", PSI_FLAG_GLOBAL},
{ &key_LOCK_wsrep_slave_threads, "LOCK_wsrep_slave_threads", PSI_FLAG_GLOBAL},
+ { &key_LOCK_wsrep_cluster_config, "LOCK_wsrep_cluster_config", PSI_FLAG_GLOBAL},
{ &key_LOCK_wsrep_desync, "LOCK_wsrep_desync", PSI_FLAG_GLOBAL},
- { &key_LOCK_wsrep_config_state, "LOCK_wsrep_config_state", PSI_FLAG_GLOBAL}
+ { &key_LOCK_wsrep_config_state, "LOCK_wsrep_config_state", PSI_FLAG_GLOBAL},
+ { &key_LOCK_wsrep_group_commit, "LOCK_wsrep_group_commit", PSI_FLAG_GLOBAL},
+ { &key_LOCK_wsrep_SR_pool, "LOCK_wsrep_SR_pool", PSI_FLAG_GLOBAL},
+ { &key_LOCK_wsrep_SR_store, "LOCK_wsrep_SR_store", PSI_FLAG_GLOBAL},
+ { &key_LOCK_wsrep_joiner_monitor, "LOCK_wsrep_joiner_monitor", PSI_FLAG_GLOBAL},
+ { &key_LOCK_wsrep_donor_monitor, "LOCK_wsrep_donor_monitor", PSI_FLAG_GLOBAL}
};
static PSI_cond_info wsrep_conds[]=
@@ -173,8 +222,11 @@ static PSI_cond_info wsrep_conds[]=
{ &key_COND_wsrep_sst, "COND_wsrep_sst", PSI_FLAG_GLOBAL},
{ &key_COND_wsrep_sst_init, "COND_wsrep_sst_init", PSI_FLAG_GLOBAL},
{ &key_COND_wsrep_sst_thread, "wsrep_sst_thread", 0},
- { &key_COND_wsrep_rollback, "COND_wsrep_rollback", PSI_FLAG_GLOBAL},
- { &key_COND_wsrep_replaying, "COND_wsrep_replaying", PSI_FLAG_GLOBAL}
+ { &key_COND_wsrep_thd, "THD::COND_wsrep_thd", 0},
+ { &key_COND_wsrep_replaying, "COND_wsrep_replaying", PSI_FLAG_GLOBAL},
+ { &key_COND_wsrep_slave_threads, "COND_wsrep_wsrep_slave_threads", PSI_FLAG_GLOBAL},
+ { &key_COND_wsrep_joiner_monitor, "COND_wsrep_joiner_monitor", PSI_FLAG_GLOBAL},
+ { &key_COND_wsrep_donor_monitor, "COND_wsrep_donor_monitor", PSI_FLAG_GLOBAL}
};
static PSI_file_info wsrep_files[]=
@@ -183,322 +235,273 @@ static PSI_file_info wsrep_files[]=
};
PSI_thread_key key_wsrep_sst_joiner, key_wsrep_sst_donor,
- key_wsrep_rollbacker, key_wsrep_applier;
+ key_wsrep_rollbacker, key_wsrep_applier,
+ key_wsrep_sst_joiner_monitor, key_wsrep_sst_donor_monitor;
static PSI_thread_info wsrep_threads[]=
{
{&key_wsrep_sst_joiner, "wsrep_sst_joiner_thread", PSI_FLAG_GLOBAL},
{&key_wsrep_sst_donor, "wsrep_sst_donor_thread", PSI_FLAG_GLOBAL},
{&key_wsrep_rollbacker, "wsrep_rollbacker_thread", PSI_FLAG_GLOBAL},
- {&key_wsrep_applier, "wsrep_applier_thread", PSI_FLAG_GLOBAL}
+ {&key_wsrep_applier, "wsrep_applier_thread", PSI_FLAG_GLOBAL},
+ {&key_wsrep_sst_joiner_monitor, "wsrep_sst_joiner_monitor", PSI_FLAG_GLOBAL},
+ {&key_wsrep_sst_donor_monitor, "wsrep_sst_donor_monitor", PSI_FLAG_GLOBAL}
};
#endif /* HAVE_PSI_INTERFACE */
-my_bool wsrep_inited = 0; // initialized ?
+my_bool wsrep_inited= 0; // initialized ?
-static wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED;
+static wsrep_uuid_t node_uuid= WSREP_UUID_UNDEFINED;
static char cluster_uuid_str[40]= { 0, };
-static const char* cluster_status_str[WSREP_VIEW_MAX] =
-{
- "Primary",
- "non-Primary",
- "Disconnected"
-};
static char provider_name[256]= { 0, };
static char provider_version[256]= { 0, };
static char provider_vendor[256]= { 0, };
/*
- * wsrep status variables
+ * Wsrep status variables. LOCK_status must be locked When modifying
+ * these variables,
*/
-my_bool wsrep_connected = FALSE;
-my_bool wsrep_ready = FALSE; // node can accept queries
-const char* wsrep_cluster_state_uuid = cluster_uuid_str;
-long long wsrep_cluster_conf_id = WSREP_SEQNO_UNDEFINED;
-const char* wsrep_cluster_status = cluster_status_str[WSREP_VIEW_DISCONNECTED];
-long wsrep_cluster_size = 0;
-long wsrep_local_index = -1;
-long long wsrep_local_bf_aborts = 0;
-const char* wsrep_provider_name = provider_name;
-const char* wsrep_provider_version = provider_version;
-const char* wsrep_provider_vendor = provider_vendor;
+my_bool wsrep_connected = FALSE;
+my_bool wsrep_ready = FALSE;
+const char* wsrep_cluster_state_uuid= cluster_uuid_str;
+long long wsrep_cluster_conf_id = WSREP_SEQNO_UNDEFINED;
+const char* wsrep_cluster_status = "Disconnected";
+long wsrep_cluster_size = 0;
+long wsrep_local_index = -1;
+long long wsrep_local_bf_aborts = 0;
+const char* wsrep_provider_name = provider_name;
+const char* wsrep_provider_version = provider_version;
+const char* wsrep_provider_vendor = provider_vendor;
+char* wsrep_provider_capabilities = NULL;
+char* wsrep_cluster_capabilities = NULL;
/* End wsrep status variables */
-wsrep_uuid_t local_uuid = WSREP_UUID_UNDEFINED;
-wsrep_seqno_t local_seqno = WSREP_SEQNO_UNDEFINED;
-long wsrep_protocol_version = 3;
-
wsp::Config_state *wsrep_config_state;
-// Boolean denoting if server is in initial startup phase. This is needed
-// to make sure that main thread waiting in wsrep_sst_wait() is signaled
-// if there was no state gap on receiving first view event.
-static my_bool wsrep_startup = TRUE;
+void WSREP_LOG(void (*fun)(const char* fmt, ...), const char* fmt, ...)
+{
+ /* Allocate short buffer from stack. If the vsnprintf() return value
+ indicates that the message was truncated, a new buffer will be allocated
+ dynamically and the message will be reprinted. */
+ char msg[128] = {'\0'};
+ va_list arglist;
+ va_start(arglist, fmt);
+ int n= vsnprintf(msg, sizeof(msg), fmt, arglist);
+ va_end(arglist);
+ if (n < 0)
+ {
+ sql_print_warning("WSREP: Printing message failed");
+ }
+ else if (n < (int)sizeof(msg))
+ {
+ fun("WSREP: %s", msg);
+ }
+ else
+ {
+ size_t dynbuf_size= std::max(n, 4096);
+ char* dynbuf= (char*) my_malloc(dynbuf_size, MYF(0));
+ if (dynbuf)
+ {
+ va_start(arglist, fmt);
+ (void)vsnprintf(&dynbuf[0], dynbuf_size - 1, fmt, arglist);
+ va_end(arglist);
+ dynbuf[dynbuf_size - 1] = '\0';
+ fun("WSREP: %s", &dynbuf[0]);
+ my_free(dynbuf);
+ }
+ else
+ {
+ /* Memory allocation for vector failed, print truncated message. */
+ fun("WSREP: %s", msg);
+ }
+ }
+}
+
+wsrep_uuid_t local_uuid = WSREP_UUID_UNDEFINED;
+wsrep_seqno_t local_seqno = WSREP_SEQNO_UNDEFINED;
+
+/*
+ */
+Wsrep_schema *wsrep_schema= 0;
+
+static void wsrep_log_cb(wsrep::log::level level,
+ const char*, const char *msg)
+{
+ /*
+ Silence all wsrep related logging from lib and provider if
+ wsrep is not enabled.
+ */
+ if (!WSREP_ON) return;
-static void wsrep_log_cb(wsrep_log_level_t level, const char *msg) {
switch (level) {
- case WSREP_LOG_INFO:
- sql_print_information("WSREP: %s", msg);
+ case wsrep::log::info:
+ WSREP_INFO("%s", msg);
break;
- case WSREP_LOG_WARN:
- sql_print_warning("WSREP: %s", msg);
+ case wsrep::log::warning:
+ WSREP_WARN("%s", msg);
break;
- case WSREP_LOG_ERROR:
- case WSREP_LOG_FATAL:
- sql_print_error("WSREP: %s", msg);
+ case wsrep::log::error:
+ WSREP_ERROR("%s", msg);
break;
- case WSREP_LOG_DEBUG:
- if (wsrep_debug) sql_print_information ("[Debug] WSREP: %s", msg);
- default:
+ case wsrep::log::debug:
+ WSREP_DEBUG("%s", msg);
+ break;
+ case wsrep::log::unknown:
+ WSREP_UNKNOWN("%s", msg);
break;
}
}
-void wsrep_log(void (*fun)(const char *, ...), const char *format, ...)
-{
- va_list args;
- char msg[1024];
- va_start(args, format);
- vsnprintf(msg, sizeof(msg) - 1, format, args);
- va_end(args);
- (fun)("WSREP: %s", msg);
-}
-
-
-static void wsrep_log_states (wsrep_log_level_t const level,
- const wsrep_uuid_t* const group_uuid,
- wsrep_seqno_t const group_seqno,
- const wsrep_uuid_t* const node_uuid,
- wsrep_seqno_t const node_seqno)
-{
- char uuid_str[37];
- char msg[256];
-
- wsrep_uuid_print (group_uuid, uuid_str, sizeof(uuid_str));
- snprintf (msg, 255, "WSREP: Group state: %s:%lld",
- uuid_str, (long long)group_seqno);
- wsrep_log_cb (level, msg);
-
- wsrep_uuid_print (node_uuid, uuid_str, sizeof(uuid_str));
- snprintf (msg, 255, "WSREP: Local state: %s:%lld",
- uuid_str, (long long)node_seqno);
- wsrep_log_cb (level, msg);
-}
-
-#ifdef GTID_SUPPORT
-void wsrep_init_sidno(const wsrep_uuid_t& wsrep_uuid)
+void wsrep_init_sidno(const wsrep::id& uuid)
{
- /* generate new Sid map entry from inverted uuid */
- rpl_sid sid;
- wsrep_uuid_t ltid_uuid;
-
- for (size_t i= 0; i < sizeof(ltid_uuid.data); ++i)
+ /*
+ Protocol versions starting from 4 use group gtid as it is.
+ For lesser protocol versions generate new Sid map entry from inverted
+ uuid.
+ */
+ rpl_gtid sid;
+ if (wsrep_protocol_version >= 4)
{
- ltid_uuid.data[i] = ~wsrep_uuid.data[i];
+ memcpy((void*)&sid, (const uchar*)uuid.data(),16);
}
-
- sid.copy_from(ltid_uuid.data);
+ else
+ {
+ wsrep_uuid_t ltid_uuid;
+ for (size_t i= 0; i < sizeof(ltid_uuid.data); ++i)
+ {
+ ltid_uuid.data[i]= ~((const uchar*)uuid.data())[i];
+ }
+ memcpy((void*)&sid, (const uchar*)ltid_uuid.data,16);
+ }
+#ifdef GTID_SUPPORT
global_sid_lock->wrlock();
wsrep_sidno= global_sid_map->add_sid(sid);
WSREP_INFO("Initialized wsrep sidno %d", wsrep_sidno);
global_sid_lock->unlock();
+#endif
}
-#endif /* GTID_SUPPORT */
-static wsrep_cb_status_t
-wsrep_view_handler_cb (void* app_ctx,
- void* recv_ctx,
- const wsrep_view_info_t* view,
- const char* state,
- size_t state_len,
- void** sst_req,
- size_t* sst_req_len)
+void wsrep_init_schema()
{
- *sst_req = NULL;
- *sst_req_len = 0;
-
- wsrep_member_status_t memb_status= wsrep_config_state->get_status();
-
- if (memcmp(&cluster_uuid, &view->state_id.uuid, sizeof(wsrep_uuid_t)))
- {
- memcpy(&cluster_uuid, &view->state_id.uuid, sizeof(cluster_uuid));
-
- wsrep_uuid_print (&cluster_uuid, cluster_uuid_str,
- sizeof(cluster_uuid_str));
- }
-
- wsrep_cluster_conf_id= view->view;
- wsrep_cluster_status= cluster_status_str[view->status];
- wsrep_cluster_size= view->memb_num;
- wsrep_local_index= view->my_idx;
-
- WSREP_INFO("New cluster view: global state: %s:%lld, view# %lld: %s, "
- "number of nodes: %ld, my index: %ld, protocol version %d",
- wsrep_cluster_state_uuid, (long long)view->state_id.seqno,
- (long long)wsrep_cluster_conf_id, wsrep_cluster_status,
- wsrep_cluster_size, wsrep_local_index, view->proto_ver);
-
- /* Proceed further only if view is PRIMARY */
- if (WSREP_VIEW_PRIMARY != view->status)
- {
-#ifdef HAVE_QUERY_CACHE
- // query cache must be initialised by now
- query_cache.flush();
-#endif /* HAVE_QUERY_CACHE */
-
- wsrep_ready_set(FALSE);
- memb_status= WSREP_MEMBER_UNDEFINED;
- /* Always record local_uuid and local_seqno in non-prim since this
- * may lead to re-initializing provider and start position is
- * determined according to these variables */
- // WRONG! local_uuid should be the last primary configuration uuid we were
- // a member of. local_seqno should be updated in commit calls.
- // local_uuid= cluster_uuid;
- // local_seqno= view->first - 1;
- goto out;
- }
+ DBUG_ASSERT(!wsrep_schema);
- switch (view->proto_ver)
+ WSREP_INFO("wsrep_init_schema_and_SR %p", wsrep_schema);
+ if (!wsrep_schema)
{
- case 0:
- case 1:
- case 2:
- case 3:
- // version change
- if (view->proto_ver != wsrep_protocol_version)
- {
- my_bool wsrep_ready_saved= wsrep_ready_get();
- wsrep_ready_set(FALSE);
- WSREP_INFO("closing client connections for "
- "protocol change %ld -> %d",
- wsrep_protocol_version, view->proto_ver);
- wsrep_close_client_connections(TRUE);
- wsrep_protocol_version= view->proto_ver;
- wsrep_ready_set(wsrep_ready_saved);
- }
- break;
- default:
- WSREP_ERROR("Unsupported application protocol version: %d",
- view->proto_ver);
- unireg_abort(1);
- }
-
- if (view->state_gap)
- {
- WSREP_WARN("Gap in state sequence. Need state transfer.");
-
- /* After that wsrep will call wsrep_sst_prepare. */
- /* keep ready flag 0 until we receive the snapshot */
- wsrep_ready_set(FALSE);
-
- /* Close client connections to ensure that they don't interfere
- * with SST. Necessary only if storage engines are initialized
- * before SST.
- * TODO: Just killing all ongoing transactions should be enough
- * since wsrep_ready is OFF and no new transactions can start.
- */
- if (!wsrep_before_SE())
+ wsrep_schema= new Wsrep_schema();
+ if (wsrep_schema->init())
{
- WSREP_DEBUG("[debug]: closing client connections for PRIM");
- wsrep_close_client_connections(FALSE);
+ WSREP_ERROR("Failed to init wsrep schema");
+ unireg_abort(1);
}
+ }
+}
- ssize_t const req_len= wsrep_sst_prepare (sst_req);
+void wsrep_deinit_schema()
+{
+ delete wsrep_schema;
+ wsrep_schema= 0;
+}
- if (req_len < 0)
+void wsrep_recover_sr_from_storage(THD *orig_thd)
+{
+ switch (wsrep_SR_store_type)
+ {
+ case WSREP_SR_STORE_TABLE:
+ if (!wsrep_schema)
{
- WSREP_ERROR("SST preparation failed: %zd (%s)", -req_len,
- strerror(-req_len));
- memb_status= WSREP_MEMBER_UNDEFINED;
+ WSREP_ERROR("Wsrep schema not initialized when trying to recover "
+ "streaming transactions");
+ unireg_abort(1);
}
- else
+ if (wsrep_schema->recover_sr_transactions(orig_thd))
{
- assert(sst_req != NULL);
- *sst_req_len= req_len;
- memb_status= WSREP_MEMBER_JOINER;
+ WSREP_ERROR("Failed to recover SR transactions from schema");
+ unireg_abort(1);
}
+ break;
+ default:
+ /* */
+ WSREP_ERROR("Unsupported wsrep SR store type: %lu", wsrep_SR_store_type);
+ unireg_abort(1);
+ break;
}
- else
- {
- /*
- * NOTE: Initialize wsrep_group_uuid here only if it wasn't initialized
- * before - OR - it was reinitilized on startup (lp:992840)
- */
- if (wsrep_startup)
+}
+
+/** Export the WSREP provider's capabilities as a human readable string.
+ * The result is saved in a dynamically allocated string of the form:
+ * :cap1:cap2:cap3:
+ */
+static void wsrep_capabilities_export(wsrep_cap_t const cap, char** str)
+{
+ static const char* names[] =
+ {
+ /* Keep in sync with wsrep/wsrep_api.h WSREP_CAP_* macros. */
+ "MULTI_MASTER",
+ "CERTIFICATION",
+ "PARALLEL_APPLYING",
+ "TRX_REPLAY",
+ "ISOLATION",
+ "PAUSE",
+ "CAUSAL_READS",
+ "CAUSAL_TRX",
+ "INCREMENTAL_WRITESET",
+ "SESSION_LOCKS",
+ "DISTRIBUTED_LOCKS",
+ "CONSISTENCY_CHECK",
+ "UNORDERED",
+ "ANNOTATION",
+ "PREORDERED",
+ "STREAMING",
+ "SNAPSHOT",
+ "NBO",
+ };
+
+ std::string s;
+ for (size_t i= 0; i < sizeof(names) / sizeof(names[0]); ++i)
+ {
+ if (cap & (1ULL << i))
{
- if (wsrep_before_SE())
- {
- wsrep_SE_init_grab();
- // Signal mysqld init thread to continue
- wsrep_sst_complete (&cluster_uuid, view->state_id.seqno, false);
- // and wait for SE initialization
- wsrep_SE_init_wait();
- }
- else
+ if (s.empty())
{
- local_uuid= cluster_uuid;
- local_seqno= view->state_id.seqno;
+ s= ":";
}
- /* Init storage engine XIDs from first view */
- wsrep_set_SE_checkpoint(local_uuid, local_seqno);
-#ifdef GTID_SUPPORT
- wsrep_init_sidno(local_uuid);
-#endif /* GTID_SUPPORT */
- memb_status= WSREP_MEMBER_JOINED;
+ s += names[i];
+ s += ":";
}
-
- // just some sanity check
- if (memcmp (&local_uuid, &cluster_uuid, sizeof (wsrep_uuid_t)))
- {
- WSREP_ERROR("Undetected state gap. Can't continue.");
- wsrep_log_states(WSREP_LOG_FATAL, &cluster_uuid, view->state_id.seqno,
- &local_uuid, -1);
- unireg_abort(1);
- }
- }
-
- if (wsrep_auto_increment_control)
- {
- global_system_variables.auto_increment_offset= view->my_idx + 1;
- global_system_variables.auto_increment_increment= view->memb_num;
}
- { /* capabilities may be updated on new configuration */
- uint64_t const caps(wsrep->capabilities (wsrep));
+ /* A read from the string pointed to by *str may be started at any time,
+ * so it must never point to free(3)d memory or non '\0' terminated string. */
- my_bool const idc((caps & WSREP_CAP_INCREMENTAL_WRITESET) != 0);
- if (TRUE == wsrep_incremental_data_collection && FALSE == idc)
- {
- WSREP_WARN("Unsupported protocol downgrade: "
- "incremental data collection disabled. Expect abort.");
- }
- wsrep_incremental_data_collection = idc;
- }
+ char* const previous= *str;
-out:
- if (view->status == WSREP_VIEW_PRIMARY) wsrep_startup= FALSE;
- wsrep_config_state->set(memb_status, view);
+ *str= strdup(s.c_str());
- return WSREP_CB_SUCCESS;
+ if (previous != NULL)
+ {
+ free(previous);
+ }
}
-my_bool wsrep_ready_set (my_bool x)
+/* Verifies that SE position is consistent with the group position
+ * and initializes other variables */
+void wsrep_verify_SE_checkpoint(const wsrep_uuid_t& uuid,
+ wsrep_seqno_t const seqno)
{
- WSREP_DEBUG("Setting wsrep_ready to %d", x);
- if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort();
- my_bool ret= (wsrep_ready != x);
- if (ret)
- {
- wsrep_ready= x;
- mysql_cond_signal (&COND_wsrep_ready);
- }
- mysql_mutex_unlock (&LOCK_wsrep_ready);
- return ret;
}
+/*
+ Wsrep is considered ready if
+ 1) Provider is not loaded (native mode)
+ 2) Server has reached synced state
+ 3) Server is in joiner mode and mysqldump SST method has been
+ specified
+ See Wsrep_server_service::log_state_change() for further details.
+ */
my_bool wsrep_ready_get (void)
{
if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort();
@@ -515,182 +518,67 @@ int wsrep_show_ready(THD *thd, SHOW_VAR *var, char *buff)
return 0;
}
-// Wait until wsrep has reached ready state
-void wsrep_ready_wait ()
+void wsrep_update_cluster_state_uuid(const char* uuid)
{
- if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort();
- while (!wsrep_ready)
- {
- WSREP_INFO("Waiting to reach ready state");
- mysql_cond_wait (&COND_wsrep_ready, &LOCK_wsrep_ready);
- }
- WSREP_INFO("ready state reached");
- mysql_mutex_unlock (&LOCK_wsrep_ready);
+ strncpy(cluster_uuid_str, uuid, sizeof(cluster_uuid_str) - 1);
}
-static void wsrep_synced_cb(void* app_ctx)
+static void wsrep_init_position()
{
- WSREP_INFO("Synchronized with group, ready for connections");
- my_bool signal_main= wsrep_ready_set(TRUE);
- wsrep_config_state->set(WSREP_MEMBER_SYNCED);
-
- if (signal_main)
- {
- wsrep_SE_init_grab();
- // Signal mysqld init thread to continue
- wsrep_sst_complete (&local_uuid, local_seqno, false);
- // and wait for SE initialization
- wsrep_SE_init_wait();
- }
- if (wsrep_restart_slave_activated)
- {
- int rcode;
- WSREP_INFO("MariaDB slave restart");
- wsrep_restart_slave_activated= FALSE;
-
- mysql_mutex_lock(&LOCK_active_mi);
- if ((rcode = start_slave_threads(0,
- 1 /* need mutex */,
- 0 /* no wait for start*/,
- active_mi,
- master_info_file,
- relay_log_info_file,
- SLAVE_SQL)))
- {
- WSREP_WARN("Failed to create slave threads: %d", rcode);
- }
- mysql_mutex_unlock(&LOCK_active_mi);
-
- }
}
-static void wsrep_init_position()
+/****************************************************************************
+ Helpers for wsrep_init()
+ ****************************************************************************/
+static std::string wsrep_server_name()
{
- /* read XIDs from storage engines */
- wsrep_uuid_t uuid;
- wsrep_seqno_t seqno;
- wsrep_get_SE_checkpoint(uuid, seqno);
-
- if (!memcmp(&uuid, &WSREP_UUID_UNDEFINED, sizeof(wsrep_uuid_t)))
- {
- WSREP_INFO("Read nil XID from storage engines, skipping position init");
- return;
- }
-
- char uuid_str[40] = {0, };
- wsrep_uuid_print(&uuid, uuid_str, sizeof(uuid_str));
- WSREP_INFO("Initial position: %s:%lld", uuid_str, (long long)seqno);
-
- if (!memcmp(&local_uuid, &WSREP_UUID_UNDEFINED, sizeof(local_uuid)) &&
- local_seqno == WSREP_SEQNO_UNDEFINED)
- {
- // Initial state
- local_uuid= uuid;
- local_seqno= seqno;
- }
- else if (memcmp(&local_uuid, &uuid, sizeof(local_uuid)) ||
- local_seqno != seqno)
- {
- WSREP_WARN("Initial position was provided by configuration or SST, "
- "avoiding override");
- }
+ std::string ret(wsrep_node_name ? wsrep_node_name : "");
+ return ret;
}
-extern char* my_bind_addr_str;
-
-int wsrep_init()
+static std::string wsrep_server_id()
{
- int rcode= -1;
- DBUG_ASSERT(wsrep_inited == 0);
-
- if (strcmp(wsrep_start_position, WSREP_START_POSITION_ZERO) &&
- wsrep_start_position_init(wsrep_start_position))
- {
- return 1;
- }
-
- wsrep_sst_auth_init();
-
- wsrep_ready_set(FALSE);
- assert(wsrep_provider);
-
- wsrep_init_position();
-
- if ((rcode= wsrep_load(wsrep_provider, &wsrep, wsrep_log_cb)) != WSREP_OK)
- {
- if (strcasecmp(wsrep_provider, WSREP_NONE))
- {
- WSREP_ERROR("wsrep_load(%s) failed: %s (%d). Reverting to no provider.",
- wsrep_provider, strerror(rcode), rcode);
- strcpy((char*)wsrep_provider, WSREP_NONE); // damn it's a dirty hack
- return wsrep_init();
- }
- else /* this is for recursive call above */
- {
- WSREP_ERROR("Could not revert to no provider: %s (%d). Need to abort.",
- strerror(rcode), rcode);
- unireg_abort(1);
- }
- }
+ /* using empty server_id, which enables view change handler to
+ set final server_id later on
+ */
+ std::string ret("");
+ return ret;
+}
- if (!WSREP_PROVIDER_EXISTS)
- {
- // enable normal operation in case no provider is specified
- wsrep_ready_set(TRUE);
- global_system_variables.wsrep_on = 0;
- wsrep_init_args args;
- args.logger_cb = wsrep_log_cb;
- args.options = (wsrep_provider_options) ?
- wsrep_provider_options : "";
- rcode = wsrep->init(wsrep, &args);
- if (rcode)
- {
- DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode));
- WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode);
- wsrep_ready_set(FALSE);
- wsrep->free(wsrep);
- free(wsrep);
- wsrep = NULL;
- }
- else
- {
- wsrep_inited= 1;
- }
- return rcode;
- }
- else
- {
- global_system_variables.wsrep_on = 1;
- strncpy(provider_name,
- wsrep->provider_name, sizeof(provider_name) - 1);
- strncpy(provider_version,
- wsrep->provider_version, sizeof(provider_version) - 1);
- strncpy(provider_vendor,
- wsrep->provider_vendor, sizeof(provider_vendor) - 1);
- }
+static std::string wsrep_server_node_address()
+{
+ std::string ret;
if (!wsrep_data_home_dir || strlen(wsrep_data_home_dir) == 0)
- wsrep_data_home_dir = mysql_real_data_home;
+ wsrep_data_home_dir= mysql_real_data_home;
/* Initialize node address */
- char node_addr[512]= { 0, };
- size_t const node_addr_max= sizeof(node_addr) - 1;
if (!wsrep_node_address || !strcmp(wsrep_node_address, ""))
{
- size_t const ret= wsrep_guess_ip(node_addr, node_addr_max);
- if (!(ret > 0 && ret < node_addr_max))
+ char node_addr[512]= {0, };
+ const size_t node_addr_max= sizeof(node_addr) - 1;
+ size_t guess_ip_ret= wsrep_guess_ip(node_addr, node_addr_max);
+ if (!(guess_ip_ret > 0 && guess_ip_ret < node_addr_max))
{
WSREP_WARN("Failed to guess base node address. Set it explicitly via "
"wsrep_node_address.");
- node_addr[0]= '\0';
+ }
+ else
+ {
+ ret= node_addr;
}
}
else
{
- strncpy(node_addr, wsrep_node_address, node_addr_max);
+ ret= wsrep_node_address;
}
+ return ret;
+}
- /* Initialize node's incoming address */
+static std::string wsrep_server_incoming_address()
+{
+ std::string ret;
+ const std::string node_addr(wsrep_server_node_address());
char inc_addr[512]= { 0, };
size_t const inc_addr_max= sizeof (inc_addr);
@@ -705,7 +593,8 @@ int wsrep_init()
bool is_ipv6= false;
unsigned int my_bind_ip= INADDR_ANY; // default if not set
- if (my_bind_addr_str && strlen(my_bind_addr_str))
+ if (my_bind_addr_str && strlen(my_bind_addr_str) &&
+ strcmp(my_bind_addr_str, "*") != 0)
{
my_bind_ip= wsrep_check_ip(my_bind_addr_str, &is_ipv6);
}
@@ -724,22 +613,28 @@ int wsrep_init()
}
else /* mysqld binds to 0.0.0.0, try taking IP from wsrep_node_address. */
{
- size_t const node_addr_len= strlen(node_addr);
- if (node_addr_len > 0)
+ if (node_addr.size())
{
- wsp::Address addr(node_addr);
-
- if (!addr.is_valid())
+ size_t const ip_len_mdb= wsrep_host_len(node_addr.c_str(), node_addr.size());
+ if (ip_len_mdb + 7 /* :55555\0 */ < inc_addr_max)
{
- WSREP_DEBUG("Could not parse node address : %s", node_addr);
- WSREP_WARN("Guessing address for incoming client connections failed. "
- "Try setting wsrep_node_incoming_address explicitly.");
- goto done;
+ memcpy (inc_addr, node_addr.c_str(), ip_len_mdb);
+ snprintf(inc_addr + ip_len_mdb, inc_addr_max - ip_len_mdb, ":%u",
+ (int)mysqld_port);
}
+ else
+ {
+ WSREP_WARN("Guessing address for incoming client connections: "
+ "address too long.");
+ inc_addr[0]= '\0';
+ }
+ }
- const char *fmt= (addr.is_ipv6()) ? "[%s]:%u" : "%s:%u";
- snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(),
- (int) mysqld_port);
+ if (!strlen(inc_addr))
+ {
+ WSREP_WARN("Guessing address for incoming client connections failed. "
+ "Try setting wsrep_node_incoming_address explicitly.");
+ WSREP_INFO("Node addr: %s", node_addr.c_str());
}
}
}
@@ -764,51 +659,183 @@ int wsrep_init()
snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(), port);
}
-done:
- struct wsrep_init_args wsrep_args;
-
- struct wsrep_gtid const state_id = { local_uuid, local_seqno };
+ done:
+ if (!strlen(inc_addr))
+ ret= wsrep_node_incoming_address;
+ else
+ ret= inc_addr;
+ WSREP_DEBUG("wsrep_incoming_address = %s", ret.c_str());
+ return ret;
+}
- wsrep_args.data_dir = wsrep_data_home_dir;
- wsrep_args.node_name = (wsrep_node_name) ? wsrep_node_name : "";
- wsrep_args.node_address = node_addr;
- wsrep_args.node_incoming = inc_addr;
- wsrep_args.options = (wsrep_provider_options) ?
- wsrep_provider_options : "";
- wsrep_args.proto_ver = wsrep_max_protocol_version;
+static std::string wsrep_server_working_dir()
+{
+ std::string ret;
+ if (!wsrep_data_home_dir || strlen(wsrep_data_home_dir) == 0)
+ {
+ ret= mysql_real_data_home;
+ }
+ else
+ {
+ ret= wsrep_data_home_dir;
+ }
+ return ret;
+}
- wsrep_args.state_id = &state_id;
+static wsrep::gtid wsrep_server_initial_position()
+{
+ wsrep::gtid ret;
+ WSREP_DEBUG("Server initial position: %s", wsrep_start_position);
+ std::istringstream is(wsrep_start_position);
+ is >> ret;
+ return ret;
+}
- wsrep_args.logger_cb = wsrep_log_cb;
- wsrep_args.view_handler_cb = wsrep_view_handler_cb;
- wsrep_args.apply_cb = wsrep_apply_cb;
- wsrep_args.commit_cb = wsrep_commit_cb;
- wsrep_args.unordered_cb = wsrep_unordered_cb;
- wsrep_args.sst_donate_cb = wsrep_sst_donate_cb;
- wsrep_args.synced_cb = wsrep_synced_cb;
+/*
+ Intitialize provider specific status variables
+ */
+static void wsrep_init_provider_status_variables()
+{
+ wsrep_inited= 1;
+ const wsrep::provider& provider=
+ Wsrep_server_state::instance().provider();
+ strncpy(provider_name,
+ provider.name().c_str(), sizeof(provider_name) - 1);
+ strncpy(provider_version,
+ provider.version().c_str(), sizeof(provider_version) - 1);
+ strncpy(provider_vendor,
+ provider.vendor().c_str(), sizeof(provider_vendor) - 1);
+}
+
+int wsrep_init_server()
+{
+ wsrep::log::logger_fn(wsrep_log_cb);
+ try
+ {
+ std::string server_name;
+ std::string server_id;
+ std::string node_address;
+ std::string incoming_address;
+ std::string working_dir;
+ wsrep::gtid initial_position;
+
+ server_name= wsrep_server_name();
+ server_id= wsrep_server_id();
+ node_address= wsrep_server_node_address();
+ incoming_address= wsrep_server_incoming_address();
+ working_dir= wsrep_server_working_dir();
+ initial_position= wsrep_server_initial_position();
+
+ Wsrep_server_state::init_once(server_name,
+ incoming_address,
+ node_address,
+ working_dir,
+ initial_position,
+ wsrep_max_protocol_version);
+ Wsrep_server_state::instance().debug_log_level(wsrep_debug);
+ }
+ catch (const wsrep::runtime_error& e)
+ {
+ WSREP_ERROR("Failed to init wsrep server %s", e.what());
+ return 1;
+ }
+ catch (const std::exception& e)
+ {
+ WSREP_ERROR("Failed to init wsrep server %s", e.what());
+ }
+ return 0;
+}
- rcode = wsrep->init(wsrep, &wsrep_args);
+void wsrep_init_globals()
+{
+ wsrep_init_sidno(Wsrep_server_state::instance().connected_gtid().id());
+ wsrep_init_schema();
- if (rcode)
+ if (WSREP_ON)
{
- DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode));
- WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode);
- wsrep->free(wsrep);
- free(wsrep);
- wsrep = NULL;
- } else {
- wsrep_inited= 1;
+ Wsrep_server_state::instance().initialized();
}
+}
- return rcode;
+void wsrep_deinit_server()
+{
+ wsrep_deinit_schema();
+ Wsrep_server_state::destroy();
}
+int wsrep_init()
+{
+ assert(wsrep_provider);
+
+ wsrep_init_position();
+ wsrep_sst_auth_init();
+
+ if (strlen(wsrep_provider)== 0 ||
+ !strcmp(wsrep_provider, WSREP_NONE))
+ {
+ // enable normal operation in case no provider is specified
+ global_system_variables.wsrep_on= 0;
+ int err= Wsrep_server_state::instance().load_provider(wsrep_provider, wsrep_provider_options ? wsrep_provider_options : "");
+ if (err)
+ {
+ DBUG_PRINT("wsrep",("wsrep::init() failed: %d", err));
+ WSREP_ERROR("wsrep::init() failed: %d, must shutdown", err);
+ }
+ else
+ wsrep_init_provider_status_variables();
+ return err;
+ }
+
+ global_system_variables.wsrep_on= 1;
+
+ WSREP_ON_= wsrep_provider && strcmp(wsrep_provider, WSREP_NONE);
+
+ if (wsrep_gtid_mode && opt_bin_log && !opt_log_slave_updates)
+ {
+ WSREP_ERROR("Option --log-slave-updates is required if "
+ "binlog is enabled, GTID mode is on and wsrep provider "
+ "is specified");
+ return 1;
+ }
+
+ if (!wsrep_data_home_dir || strlen(wsrep_data_home_dir) == 0)
+ wsrep_data_home_dir= mysql_real_data_home;
+
+ if (Wsrep_server_state::instance().load_provider(wsrep_provider,
+ wsrep_provider_options))
+ {
+ WSREP_ERROR("Failed to load provider");
+ return 1;
+ }
+
+ if (!wsrep_provider_is_SR_capable() &&
+ global_system_variables.wsrep_trx_fragment_size > 0)
+ {
+ WSREP_ERROR("The WSREP provider (%s) does not support streaming "
+ "replication but wsrep_trx_fragment_size is set to a "
+ "value other than 0 (%llu). Cannot continue. Either set "
+ "wsrep_trx_fragment_size to 0 or use wsrep_provider that "
+ "supports streaming replication.",
+ wsrep_provider, global_system_variables.wsrep_trx_fragment_size);
+ Wsrep_server_state::instance().unload_provider();
+ return 1;
+ }
+
+ wsrep_init_provider_status_variables();
+ wsrep_capabilities_export(Wsrep_server_state::instance().provider().capabilities(),
+ &wsrep_provider_capabilities);
+
+ WSREP_DEBUG("SR storage init for: %s",
+ (wsrep_SR_store_type == WSREP_SR_STORE_TABLE) ? "table" : "void");
+
+ return 0;
+}
/* Initialize wsrep thread LOCKs and CONDs */
void wsrep_thr_init()
{
DBUG_ENTER("wsrep_thr_init");
- wsrep_config_state = new wsp::Config_state;
+ wsrep_config_state= new wsp::Config_state;
#ifdef HAVE_PSI_INTERFACE
mysql_mutex_register("sql", wsrep_mutexes, array_elements(wsrep_mutexes));
mysql_cond_register("sql", wsrep_conds, array_elements(wsrep_conds));
@@ -822,39 +849,32 @@ void wsrep_thr_init()
mysql_cond_init(key_COND_wsrep_sst, &COND_wsrep_sst, NULL);
mysql_mutex_init(key_LOCK_wsrep_sst_init, &LOCK_wsrep_sst_init, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_wsrep_sst_init, &COND_wsrep_sst_init, NULL);
- mysql_mutex_init(key_LOCK_wsrep_rollback, &LOCK_wsrep_rollback, MY_MUTEX_INIT_FAST);
- mysql_cond_init(key_COND_wsrep_rollback, &COND_wsrep_rollback, NULL);
mysql_mutex_init(key_LOCK_wsrep_replaying, &LOCK_wsrep_replaying, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_wsrep_replaying, &COND_wsrep_replaying, NULL);
mysql_mutex_init(key_LOCK_wsrep_slave_threads, &LOCK_wsrep_slave_threads, MY_MUTEX_INIT_FAST);
+ mysql_cond_init(key_COND_wsrep_slave_threads, &COND_wsrep_slave_threads, NULL);
+ mysql_mutex_init(key_LOCK_wsrep_cluster_config, &LOCK_wsrep_cluster_config, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_wsrep_desync, &LOCK_wsrep_desync, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_LOCK_wsrep_config_state, &LOCK_wsrep_config_state, MY_MUTEX_INIT_FAST);
+ mysql_mutex_init(key_LOCK_wsrep_group_commit, &LOCK_wsrep_group_commit, MY_MUTEX_INIT_FAST);
+ mysql_mutex_init(key_LOCK_wsrep_SR_pool,
+ &LOCK_wsrep_SR_pool, MY_MUTEX_INIT_FAST);
+ mysql_mutex_init(key_LOCK_wsrep_SR_store,
+ &LOCK_wsrep_SR_store, MY_MUTEX_INIT_FAST);
+ mysql_mutex_init(key_LOCK_wsrep_joiner_monitor,
+ &LOCK_wsrep_joiner_monitor, MY_MUTEX_INIT_FAST);
+ mysql_mutex_init(key_LOCK_wsrep_donor_monitor,
+ &LOCK_wsrep_donor_monitor, MY_MUTEX_INIT_FAST);
+ mysql_cond_init(key_COND_wsrep_joiner_monitor, &COND_wsrep_joiner_monitor, NULL);
+ mysql_cond_init(key_COND_wsrep_donor_monitor, &COND_wsrep_donor_monitor, NULL);
DBUG_VOID_RETURN;
}
-/* This is wrapper for wsrep_break_lock in thr_lock.c */
-static int wsrep_thr_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr, my_bool signal)
-{
- THD* victim_thd= (THD *) victim_thd_ptr;
- /* We need to lock THD::LOCK_thd_data to protect victim
- from concurrent usage or disconnect or delete. */
- wsrep_thd_LOCK(victim_thd);
- int res= wsrep_abort_thd(bf_thd_ptr, victim_thd_ptr, signal);
- return res;
-}
-
-
-void wsrep_init_startup (bool first)
+void wsrep_init_startup (bool sst_first)
{
if (wsrep_init()) unireg_abort(1);
- wsrep_thr_lock_init(
- (wsrep_thd_is_brute_force_fun)wsrep_thd_is_BF,
- (wsrep_abort_thd_fun)wsrep_thr_abort_thd,
- wsrep_debug, wsrep_convert_LOCK_to_trx,
- (wsrep_on_fun)wsrep_on);
-
/*
Pre-initialize global_system_variables.table_plugin with a dummy engine
(placeholder) required during the initialization of wsrep threads (THDs).
@@ -870,30 +890,56 @@ void wsrep_init_startup (bool first)
if (!strcmp(wsrep_provider, WSREP_NONE)) return;
/* Skip replication start if no cluster address */
- if (!wsrep_cluster_address || wsrep_cluster_address[0] == 0) return;
+ if (!wsrep_cluster_address_exists()) return;
- if (first) wsrep_sst_grab(); // do it so we can wait for SST below
-
- if (!wsrep_start_replication()) unireg_abort(1);
+ /*
+ Read value of wsrep_new_cluster before wsrep_start_replication(),
+ the value is reset to FALSE inside wsrep_start_replication.
+ */
+ if (!wsrep_start_replication(wsrep_cluster_address)) unireg_abort(1);
wsrep_create_rollbacker();
wsrep_create_appliers(1);
- if (first && !wsrep_sst_wait()) unireg_abort(1);// wait until SST is completed
+ Wsrep_server_state& server_state= Wsrep_server_state::instance();
+ /*
+ If the SST happens before server initialization, wait until the server
+ state reaches initializing. This indicates that
+ either SST was not necessary or SST has been delivered.
+
+ With mysqldump SST (!sst_first) wait until the server reaches
+ joiner state and procedd to accepting connections.
+ */
+ if (sst_first)
+ {
+ server_state.wait_until_state(Wsrep_server_state::s_initializing);
+ }
+ else
+ {
+ server_state.wait_until_state(Wsrep_server_state::s_joiner);
+ }
}
void wsrep_deinit(bool free_options)
{
DBUG_ASSERT(wsrep_inited == 1);
- wsrep_unload(wsrep);
- wsrep= 0;
+ WSREP_DEBUG("wsrep_deinit");
+
+ Wsrep_server_state::instance().unload_provider();
provider_name[0]= '\0';
provider_version[0]= '\0';
provider_vendor[0]= '\0';
wsrep_inited= 0;
+ if (wsrep_provider_capabilities != NULL)
+ {
+ char* p= wsrep_provider_capabilities;
+ wsrep_provider_capabilities= NULL;
+ free(p);
+ }
+
if (free_options)
{
wsrep_sst_auth_free();
@@ -905,28 +951,44 @@ void wsrep_thr_deinit()
{
if (!wsrep_config_state)
return; // Never initialized
+ WSREP_DEBUG("wsrep_thr_deinit");
mysql_mutex_destroy(&LOCK_wsrep_ready);
mysql_cond_destroy(&COND_wsrep_ready);
mysql_mutex_destroy(&LOCK_wsrep_sst);
mysql_cond_destroy(&COND_wsrep_sst);
mysql_mutex_destroy(&LOCK_wsrep_sst_init);
mysql_cond_destroy(&COND_wsrep_sst_init);
- mysql_mutex_destroy(&LOCK_wsrep_rollback);
- mysql_cond_destroy(&COND_wsrep_rollback);
mysql_mutex_destroy(&LOCK_wsrep_replaying);
mysql_cond_destroy(&COND_wsrep_replaying);
mysql_mutex_destroy(&LOCK_wsrep_slave_threads);
+ mysql_cond_destroy(&COND_wsrep_slave_threads);
+ mysql_mutex_destroy(&LOCK_wsrep_cluster_config);
mysql_mutex_destroy(&LOCK_wsrep_desync);
mysql_mutex_destroy(&LOCK_wsrep_config_state);
+ mysql_mutex_destroy(&LOCK_wsrep_group_commit);
+ mysql_mutex_destroy(&LOCK_wsrep_SR_pool);
+ mysql_mutex_destroy(&LOCK_wsrep_SR_store);
+ mysql_mutex_destroy(&LOCK_wsrep_joiner_monitor);
+ mysql_mutex_destroy(&LOCK_wsrep_donor_monitor);
+ mysql_cond_destroy(&COND_wsrep_joiner_monitor);
+ mysql_cond_destroy(&COND_wsrep_donor_monitor);
+
delete wsrep_config_state;
wsrep_config_state= 0; // Safety
+
+ if (wsrep_cluster_capabilities != NULL)
+ {
+ char* p= wsrep_cluster_capabilities;
+ wsrep_cluster_capabilities= NULL;
+ free(p);
+ }
}
void wsrep_recover()
{
char uuid_str[40];
- if (!memcmp(&local_uuid, &WSREP_UUID_UNDEFINED, sizeof(wsrep_uuid_t)) &&
+ if (wsrep_uuid_compare(&local_uuid, &WSREP_UUID_UNDEFINED) == 0 &&
local_seqno == -2)
{
wsrep_uuid_print(&local_uuid, uuid_str, sizeof(uuid_str));
@@ -934,43 +996,60 @@ void wsrep_recover()
uuid_str, (long long)local_seqno);
return;
}
- wsrep_uuid_t uuid;
- wsrep_seqno_t seqno;
- wsrep_get_SE_checkpoint(uuid, seqno);
- wsrep_uuid_print(&uuid, uuid_str, sizeof(uuid_str));
- WSREP_INFO("Recovered position: %s:%lld", uuid_str, (long long)seqno);
+ wsrep::gtid gtid= wsrep_get_SE_checkpoint();
+ std::ostringstream oss;
+ oss << gtid;
+ WSREP_INFO("Recovered position: %s", oss.str().c_str());
}
void wsrep_stop_replication(THD *thd)
{
- WSREP_INFO("Stop replication");
- if (!wsrep)
+ WSREP_INFO("Stop replication by %llu", (thd) ? thd->thread_id : 0);
+ if (Wsrep_server_state::instance().state() !=
+ Wsrep_server_state::s_disconnected)
{
- WSREP_INFO("Provider was not loaded, in stop replication");
- return;
+ WSREP_DEBUG("Disconnect provider");
+ Wsrep_server_state::instance().disconnect();
+ Wsrep_server_state::instance().wait_until_state(Wsrep_server_state::s_disconnected);
}
- /* disconnect from group first to get wsrep_ready == FALSE */
- WSREP_DEBUG("Provider disconnect");
- wsrep->disconnect(wsrep);
+ /* my connection, should not terminate with wsrep_close_client_connection(),
+ make transaction to rollback
+ */
+ if (thd && !thd->wsrep_applier) trans_rollback(thd);
+ wsrep_close_client_connections(TRUE, thd);
+
+ /* wait until appliers have stopped */
+ wsrep_wait_appliers_close(thd);
+
+ node_uuid= WSREP_UUID_UNDEFINED;
+}
- wsrep_connected= FALSE;
+void wsrep_shutdown_replication()
+{
+ WSREP_INFO("Shutdown replication");
+ if (Wsrep_server_state::instance().state() != wsrep::server_state::s_disconnected)
+ {
+ WSREP_DEBUG("Disconnect provider");
+ Wsrep_server_state::instance().disconnect();
+ Wsrep_server_state::instance().wait_until_state(Wsrep_server_state::s_disconnected);
+ }
wsrep_close_client_connections(TRUE);
/* wait until appliers have stopped */
- wsrep_wait_appliers_close(thd);
+ wsrep_wait_appliers_close(NULL);
+ node_uuid= WSREP_UUID_UNDEFINED;
- return;
+ /* Undocking the thread specific data. */
+ my_pthread_setspecific_ptr(THR_THD, NULL);
}
-bool wsrep_start_replication()
+bool wsrep_start_replication(const char *wsrep_cluster_address)
{
- wsrep_status_t rcode;
-
- /* wsrep provider must be loaded. */
- DBUG_ASSERT(wsrep);
+ int rcode;
+ WSREP_DEBUG("wsrep_start_replication");
/*
if provider is trivial, don't even try to connect,
@@ -979,34 +1058,23 @@ bool wsrep_start_replication()
if (!WSREP_PROVIDER_EXISTS)
{
// enable normal operation in case no provider is specified
- wsrep_ready_set(TRUE);
return true;
}
- if (!wsrep_cluster_address || wsrep_cluster_address[0]== 0)
- {
- // if provider is non-trivial, but no address is specified, wait for address
- wsrep_ready_set(FALSE);
- return true;
- }
+ DBUG_ASSERT(wsrep_cluster_address[0]);
- bool const bootstrap= wsrep_new_cluster;
+ bool const bootstrap(TRUE == wsrep_new_cluster);
+ wsrep_new_cluster= FALSE;
WSREP_INFO("Start replication");
- if (wsrep_new_cluster)
- {
- WSREP_INFO("'wsrep-new-cluster' option used, bootstrapping the cluster");
- wsrep_new_cluster= false;
- }
-
- if ((rcode = wsrep->connect(wsrep,
- wsrep_cluster_name,
- wsrep_cluster_address,
- wsrep_sst_donor,
- bootstrap)))
+ if ((rcode= Wsrep_server_state::instance().connect(
+ wsrep_cluster_name,
+ wsrep_cluster_address,
+ wsrep_sst_donor,
+ bootstrap)))
{
- DBUG_PRINT("wsrep",("wsrep->connect(%s) failed: %d",
+ DBUG_PRINT("wsrep",("wsrep_ptr->connect(%s) failed: %d",
wsrep_cluster_address, rcode));
WSREP_ERROR("wsrep::connect(%s) failed: %d",
wsrep_cluster_address, rcode);
@@ -1014,15 +1082,12 @@ bool wsrep_start_replication()
}
else
{
- wsrep_connected= TRUE;
-
- char* opts= wsrep->options_get(wsrep);
- if (opts)
+ try
{
- wsrep_provider_options_init(opts);
- free(opts);
+ std::string opts= Wsrep_server_state::instance().provider().options();
+ wsrep_provider_options_init(opts.c_str());
}
- else
+ catch (const wsrep::runtime_error&)
{
WSREP_WARN("Failed to get wsrep options");
}
@@ -1033,40 +1098,50 @@ bool wsrep_start_replication()
bool wsrep_must_sync_wait (THD* thd, uint mask)
{
- return (thd->variables.wsrep_sync_wait & mask) &&
- thd->variables.wsrep_on &&
+ bool ret;
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ ret= (thd->variables.wsrep_sync_wait & mask) &&
+ thd->wsrep_client_thread &&
+ WSREP_ON && thd->variables.wsrep_on &&
!(thd->variables.wsrep_dirty_reads &&
!is_update_query(thd->lex->sql_command)) &&
!thd->in_active_multi_stmt_transaction() &&
- thd->wsrep_conflict_state != REPLAYING &&
- thd->wsrep_sync_wait_gtid.seqno == WSREP_SEQNO_UNDEFINED;
+ thd->wsrep_trx().state() !=
+ wsrep::transaction::s_replaying &&
+ thd->wsrep_cs().sync_wait_gtid().is_undefined();
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ return ret;
}
bool wsrep_sync_wait (THD* thd, uint mask)
{
if (wsrep_must_sync_wait(thd, mask))
{
- WSREP_DEBUG("wsrep_sync_wait: thd->variables.wsrep_sync_wait = %u, mask = %u",
- thd->variables.wsrep_sync_wait, mask);
- // This allows autocommit SELECTs and a first SELECT after SET AUTOCOMMIT=0
- // TODO: modify to check if thd has locked any rows.
- wsrep_status_t ret= wsrep->causal_read (wsrep, &thd->wsrep_sync_wait_gtid);
-
- if (unlikely(WSREP_OK != ret))
+ WSREP_DEBUG("wsrep_sync_wait: thd->variables.wsrep_sync_wait= %u, "
+ "mask= %u, thd->variables.wsrep_on= %d",
+ thd->variables.wsrep_sync_wait, mask,
+ thd->variables.wsrep_on);
+ /*
+ This allows autocommit SELECTs and a first SELECT after SET AUTOCOMMIT=0
+ TODO: modify to check if thd has locked any rows.
+ */
+ if (thd->wsrep_cs().sync_wait(-1))
{
const char* msg;
int err;
- // Possibly relevant error codes:
- // ER_CHECKREAD, ER_ERROR_ON_READ, ER_INVALID_DEFAULT, ER_EMPTY_QUERY,
- // ER_FUNCTION_NOT_DEFINED, ER_NOT_ALLOWED_COMMAND, ER_NOT_SUPPORTED_YET,
- // ER_FEATURE_DISABLED, ER_QUERY_INTERRUPTED
+ /*
+ Possibly relevant error codes:
+ ER_CHECKREAD, ER_ERROR_ON_READ, ER_INVALID_DEFAULT, ER_EMPTY_QUERY,
+ ER_FUNCTION_NOT_DEFINED, ER_NOT_ALLOWED_COMMAND, ER_NOT_SUPPORTED_YET,
+ ER_FEATURE_DISABLED, ER_QUERY_INTERRUPTED
+ */
- switch (ret)
+ switch (thd->wsrep_cs().current_error())
{
- case WSREP_NOT_IMPLEMENTED:
+ case wsrep::e_not_supported_error:
msg= "synchronous reads by wsrep backend. "
- "Please unset wsrep_causal_reads variable.";
+ "Please unset wsrep_causal_reads variable.";
err= ER_NOT_SUPPORTED_YET;
break;
default:
@@ -1084,6 +1159,94 @@ bool wsrep_sync_wait (THD* thd, uint mask)
return false;
}
+enum wsrep::provider::status
+wsrep_sync_wait_upto (THD* thd,
+ wsrep_gtid_t* upto,
+ int timeout)
+{
+ DBUG_ASSERT(upto);
+ enum wsrep::provider::status ret;
+ if (upto)
+ {
+ wsrep::gtid upto_gtid(wsrep::id(upto->uuid.data, sizeof(upto->uuid.data)),
+ wsrep::seqno(upto->seqno));
+ ret= Wsrep_server_state::instance().wait_for_gtid(upto_gtid, timeout);
+ }
+ else
+ {
+ ret= Wsrep_server_state::instance().causal_read(timeout).second;
+ }
+ WSREP_DEBUG("wsrep_sync_wait_upto: %d", ret);
+ return ret;
+}
+
+bool wsrep_is_show_query(enum enum_sql_command command)
+{
+ DBUG_ASSERT(command >= 0 && command <= SQLCOM_END);
+ return (sql_command_flags[command] & CF_STATUS_COMMAND) != 0;
+}
+
+static bool wsrep_is_diagnostic_query(enum enum_sql_command command)
+{
+ assert(command >= 0 && command <= SQLCOM_END);
+ return (sql_command_flags[command] & CF_DIAGNOSTIC_STMT) != 0;
+}
+
+static enum enum_wsrep_sync_wait
+wsrep_sync_wait_mask_for_command(enum enum_sql_command command)
+{
+ switch (command)
+ {
+ case SQLCOM_SELECT:
+ case SQLCOM_CHECKSUM:
+ return WSREP_SYNC_WAIT_BEFORE_READ;
+ case SQLCOM_DELETE:
+ case SQLCOM_DELETE_MULTI:
+ case SQLCOM_UPDATE:
+ case SQLCOM_UPDATE_MULTI:
+ return WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE;
+ case SQLCOM_REPLACE:
+ case SQLCOM_INSERT:
+ case SQLCOM_REPLACE_SELECT:
+ case SQLCOM_INSERT_SELECT:
+ return WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE;
+ default:
+ if (wsrep_is_diagnostic_query(command))
+ {
+ return WSREP_SYNC_WAIT_NONE;
+ }
+ if (wsrep_is_show_query(command))
+ {
+ switch (command)
+ {
+ case SQLCOM_SHOW_PROFILE:
+ case SQLCOM_SHOW_PROFILES:
+ case SQLCOM_SHOW_SLAVE_HOSTS:
+ case SQLCOM_SHOW_RELAYLOG_EVENTS:
+ case SQLCOM_SHOW_SLAVE_STAT:
+ case SQLCOM_SHOW_MASTER_STAT:
+ case SQLCOM_SHOW_ENGINE_STATUS:
+ case SQLCOM_SHOW_ENGINE_MUTEX:
+ case SQLCOM_SHOW_ENGINE_LOGS:
+ case SQLCOM_SHOW_PROCESSLIST:
+ case SQLCOM_SHOW_PRIVILEGES:
+ return WSREP_SYNC_WAIT_NONE;
+ default:
+ return WSREP_SYNC_WAIT_BEFORE_SHOW;
+ }
+ }
+ }
+ return WSREP_SYNC_WAIT_NONE;
+}
+
+bool wsrep_sync_wait(THD* thd, enum enum_sql_command command)
+{
+ bool res = false;
+ if (WSREP_CLIENT(thd) && thd->variables.wsrep_sync_wait)
+ res = wsrep_sync_wait(thd, wsrep_sync_wait_mask_for_command(command));
+ return res;
+}
+
void wsrep_keys_free(wsrep_key_arr_t* key_arr)
{
for (size_t i= 0; i < key_arr->keys_len; ++i)
@@ -1095,6 +1258,98 @@ void wsrep_keys_free(wsrep_key_arr_t* key_arr)
key_arr->keys_len= 0;
}
+/*!
+ * @param thd thread
+ * @param tables list of tables
+ * @param keys prepared keys
+
+ * @return true if parent table append was successfull, otherwise false.
+*/
+bool
+wsrep_append_fk_parent_table(THD* thd, TABLE_LIST* tables, wsrep::key_array* keys)
+{
+ bool fail= false;
+ TABLE_LIST *table;
+
+ for (table= tables; table; table= table->next_local)
+ {
+ if (is_temporary_table(table))
+ {
+ WSREP_DEBUG("Temporary table %s.%s already opened query=%s", table->db.str,
+ table->table_name.str, wsrep_thd_query(thd));
+ return false;
+ }
+ }
+
+ thd->release_transactional_locks();
+ uint counter;
+ MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint();
+
+ if (open_tables(thd, &tables, &counter, MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL))
+ {
+ WSREP_DEBUG("Unable to open table for FK checks for %s", wsrep_thd_query(thd));
+ fail= true;
+ goto exit;
+ }
+
+ for (table= tables; table; table= table->next_local)
+ {
+ if (!is_temporary_table(table) && table->table)
+ {
+ FOREIGN_KEY_INFO *f_key_info;
+ List<FOREIGN_KEY_INFO> f_key_list;
+
+ table->table->file->get_foreign_key_list(thd, &f_key_list);
+ List_iterator_fast<FOREIGN_KEY_INFO> it(f_key_list);
+ while ((f_key_info=it++))
+ {
+ WSREP_DEBUG("appended fkey %s", f_key_info->referenced_table->str);
+ keys->push_back(wsrep_prepare_key_for_toi(f_key_info->referenced_db->str,
+ f_key_info->referenced_table->str,
+ wsrep::key::shared));
+ }
+ }
+ }
+
+exit:
+ /* close the table and release MDL locks */
+ close_thread_tables(thd);
+ thd->mdl_context.rollback_to_savepoint(mdl_savepoint);
+ for (table= tables; table; table= table->next_local)
+ {
+ table->table= NULL;
+ table->next_global= NULL;
+ table->mdl_request.ticket= NULL;
+ }
+
+ return fail;
+}
+
+bool wsrep_reload_ssl()
+{
+ try
+ {
+ std::string opts= Wsrep_server_state::instance().provider().options();
+ if (opts.find("socket.ssl_reload") == std::string::npos)
+ {
+ WSREP_DEBUG("Option `socket.ssl_reload` not found in parameters.");
+ return false;
+ }
+ const std::string reload_ssl_param("socket.ssl_reload=1");
+ enum wsrep::provider::status ret= Wsrep_server_state::instance().provider().options(reload_ssl_param);
+ if (ret)
+ {
+ WSREP_ERROR("Set options returned %d", ret);
+ return true;
+ }
+ return false;
+ }
+ catch (...)
+ {
+ WSREP_ERROR("Failed to get provider options");
+ return true;
+ }
+}
/*!
* @param db Database string
@@ -1107,9 +1362,9 @@ void wsrep_keys_free(wsrep_key_arr_t* key_arr)
*/
static bool wsrep_prepare_key_for_isolation(const char* db,
- const char* table,
- wsrep_buf_t* key,
- size_t* key_len)
+ const char* table,
+ wsrep_buf_t* key,
+ size_t* key_len)
{
if (*key_len < 2) return false;
@@ -1121,11 +1376,11 @@ static bool wsrep_prepare_key_for_isolation(const char* db,
case 1:
case 2:
case 3:
+ case 4:
{
*key_len= 0;
if (db)
{
- // sql_print_information("%s.%s", db, table);
key[*key_len].ptr= db;
key[*key_len].len= strlen(db);
++(*key_len);
@@ -1139,26 +1394,23 @@ static bool wsrep_prepare_key_for_isolation(const char* db,
break;
}
default:
+ assert(0);
+ WSREP_ERROR("Unsupported protocol version: %ld", wsrep_protocol_version);
+ unireg_abort(1);
return false;
}
- return true;
-}
+ return true;
+}
static bool wsrep_prepare_key_for_isolation(const char* db,
const char* table,
wsrep_key_arr_t* ka)
{
wsrep_key_t* tmp;
-
- if (!ka->keys)
- tmp= (wsrep_key_t*)my_malloc((ka->keys_len + 1) * sizeof(wsrep_key_t),
- MYF(0));
- else
- tmp= (wsrep_key_t*)my_realloc(ka->keys,
- (ka->keys_len + 1) * sizeof(wsrep_key_t),
- MYF(0));
-
+ tmp= (wsrep_key_t*)my_realloc(ka->keys,
+ (ka->keys_len + 1) * sizeof(wsrep_key_t),
+ MYF(MY_ALLOW_ZERO_PTR));
if (!tmp)
{
WSREP_ERROR("Can't allocate memory for key_array");
@@ -1184,7 +1436,6 @@ static bool wsrep_prepare_key_for_isolation(const char* db,
return true;
}
-
static bool wsrep_prepare_keys_for_alter_add_fk(const char* child_table_db,
Alter_info* alter_info,
wsrep_key_arr_t* ka)
@@ -1211,7 +1462,6 @@ static bool wsrep_prepare_keys_for_alter_add_fk(const char* child_table_db,
return true;
}
-
static bool wsrep_prepare_keys_for_isolation(THD* thd,
const char* db,
const char* table,
@@ -1234,21 +1484,24 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
goto err;
}
- if (alter_info && (alter_info->flags & (ALTER_ADD_FOREIGN_KEY)))
+ if (alter_info)
{
if (!wsrep_prepare_keys_for_alter_add_fk(table_list->db.str, alter_info, ka))
goto err;
}
-
return false;
err:
- wsrep_keys_free(ka);
- return true;
+ wsrep_keys_free(ka);
+ return true;
}
+/*
+ * Prepare key list from db/table and table_list
+ *
+ * Return zero in case of success, 1 in case of failure.
+ */
-/* Prepare key list from db/table and table_list */
bool wsrep_prepare_keys_for_isolation(THD* thd,
const char* db,
const char* table,
@@ -1258,7 +1511,6 @@ bool wsrep_prepare_keys_for_isolation(THD* thd,
return wsrep_prepare_keys_for_isolation(thd, db, table, table_list, NULL, ka);
}
-
bool wsrep_prepare_key(const uchar* cache_key, size_t cache_key_len,
const uchar* row_id, size_t row_id_len,
wsrep_buf_t* key, size_t* key_len)
@@ -1270,36 +1522,115 @@ bool wsrep_prepare_key(const uchar* cache_key, size_t cache_key_len,
{
case 0:
{
- key[0].ptr = cache_key;
- key[0].len = cache_key_len;
+ key[0].ptr= cache_key;
+ key[0].len= cache_key_len;
- *key_len = 1;
+ *key_len= 1;
break;
}
case 1:
case 2:
case 3:
+ case 4:
{
- key[0].ptr = cache_key;
- key[0].len = strlen( (char*)cache_key );
+ key[0].ptr= cache_key;
+ key[0].len= strlen( (char*)cache_key );
- key[1].ptr = cache_key + strlen( (char*)cache_key ) + 1;
- key[1].len = strlen( (char*)(key[1].ptr) );
+ key[1].ptr= cache_key + strlen( (char*)cache_key ) + 1;
+ key[1].len= strlen( (char*)(key[1].ptr) );
- *key_len = 2;
+ *key_len= 2;
break;
}
default:
return false;
}
- key[*key_len].ptr = row_id;
- key[*key_len].len = row_id_len;
+ key[*key_len].ptr= row_id;
+ key[*key_len].len= row_id_len;
++(*key_len);
return true;
}
+bool wsrep_prepare_key_for_innodb(THD* thd,
+ const uchar* cache_key,
+ size_t cache_key_len,
+ const uchar* row_id,
+ size_t row_id_len,
+ wsrep_buf_t* key,
+ size_t* key_len)
+{
+
+ return wsrep_prepare_key(cache_key, cache_key_len, row_id, row_id_len, key, key_len);
+}
+
+wsrep::key wsrep_prepare_key_for_toi(const char* db, const char* table,
+ enum wsrep::key::type type)
+{
+ wsrep::key ret(type);
+ DBUG_ASSERT(db);
+ ret.append_key_part(db, strlen(db));
+ if (table) ret.append_key_part(table, strlen(table));
+ return ret;
+}
+
+wsrep::key_array
+wsrep_prepare_keys_for_alter_add_fk(const char* child_table_db,
+ Alter_info* alter_info)
+
+{
+ wsrep::key_array ret;
+ Key *key;
+ List_iterator<Key> key_iterator(alter_info->key_list);
+ while ((key= key_iterator++))
+ {
+ if (key->type == Key::FOREIGN_KEY)
+ {
+ Foreign_key *fk_key= (Foreign_key *)key;
+ const char *db_name= fk_key->ref_db.str;
+ const char *table_name= fk_key->ref_table.str;
+ if (!db_name)
+ {
+ db_name= child_table_db;
+ }
+ ret.push_back(wsrep_prepare_key_for_toi(db_name, table_name,
+ wsrep::key::exclusive));
+ }
+ }
+ return ret;
+}
+
+wsrep::key_array wsrep_prepare_keys_for_toi(const char* db,
+ const char* table,
+ const TABLE_LIST* table_list,
+ Alter_info* alter_info,
+ wsrep::key_array* fk_tables)
+{
+ wsrep::key_array ret;
+ if (db || table)
+ {
+ ret.push_back(wsrep_prepare_key_for_toi(db, table, wsrep::key::exclusive));
+ }
+ for (const TABLE_LIST* table= table_list; table; table= table->next_global)
+ {
+ ret.push_back(wsrep_prepare_key_for_toi(table->db.str, table->table_name.str,
+ wsrep::key::exclusive));
+ }
+ if (alter_info)
+ {
+ wsrep::key_array fk(wsrep_prepare_keys_for_alter_add_fk(table_list->db.str, alter_info));
+ if (!fk.empty())
+ {
+ ret.insert(ret.end(), fk.begin(), fk.end());
+ }
+ }
+ if (fk_tables && !fk_tables->empty())
+ {
+ ret.insert(ret.end(), fk_tables->begin(), fk_tables->end());
+ }
+ return ret;
+}
/*
* Construct Query_log_Event from thd query and serialize it
@@ -1311,7 +1642,7 @@ int wsrep_to_buf_helper(
THD* thd, const char *query, uint query_len, uchar** buf, size_t* buf_len)
{
IO_CACHE tmp_io_cache;
- Log_event_writer writer(&tmp_io_cache,0);
+ Log_event_writer writer(&tmp_io_cache, 0);
if (open_cached_file(&tmp_io_cache, mysql_tmpdir, TEMP_PREFIX,
65536, MYF(MY_WME)))
return 1;
@@ -1397,9 +1728,9 @@ static int
create_view_query(THD *thd, uchar** buf, size_t* buf_len)
{
LEX *lex= thd->lex;
- SELECT_LEX *select_lex= &lex->select_lex;
+ SELECT_LEX *select_lex= lex->first_select_lex();
TABLE_LIST *first_table= select_lex->table_list.first;
- TABLE_LIST *views = first_table;
+ TABLE_LIST *views= first_table;
LEX_USER *definer;
String buff;
const LEX_CSTRING command[3]=
@@ -1424,16 +1755,16 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len)
if (definer)
{
- views->definer.user = definer->user;
- views->definer.host = definer->host;
+ views->definer.user= definer->user;
+ views->definer.host= definer->host;
} else {
WSREP_ERROR("Failed to get DEFINER for VIEW.");
return 1;
}
- views->algorithm = lex->create_view->algorithm;
- views->view_suid = lex->create_view->suid;
- views->with_check = lex->create_view->check;
+ views->algorithm = lex->create_view->algorithm;
+ views->view_suid = lex->create_view->suid;
+ views->with_check = lex->create_view->check;
view_store_options(thd, views, &buff);
buff.append(STRING_WITH_LEN("VIEW "));
@@ -1459,12 +1790,8 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len)
buff.append(')');
}
buff.append(STRING_WITH_LEN(" AS "));
- //buff.append(views->source.str, views->source.length);
buff.append(thd->lex->create_view->select.str,
thd->lex->create_view->select.length);
- //int errcode= query_error_code(thd, TRUE);
- //if (thd->binlog_query(THD::STMT_QUERY_TYPE,
- // buff.ptr(), buff.length(), FALSE, FALSE, FALSE, errcod
return wsrep_to_buf_helper(thd, buff.ptr(), buff.length(), buf, buf_len);
}
@@ -1479,7 +1806,7 @@ static int wsrep_drop_table_query(THD* thd, uchar** buf, size_t* buf_len)
{
LEX* lex= thd->lex;
- SELECT_LEX* select_lex= &lex->select_lex;
+ SELECT_LEX* select_lex= lex->first_select_lex();
TABLE_LIST* first_table= select_lex->table_list.first;
String buff;
@@ -1530,8 +1857,7 @@ static int wsrep_drop_table_query(THD* thd, uchar** buf, size_t* buf_len)
/* Forward declarations. */
-static int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len);
-static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len);
+int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len);
/*
Decide if statement should run in TOI.
@@ -1550,13 +1876,12 @@ static bool wsrep_can_run_in_toi(THD *thd, const char *db, const char *table,
DBUG_ASSERT(table_list || db);
LEX* lex= thd->lex;
- SELECT_LEX* select_lex= &lex->select_lex;
+ SELECT_LEX* select_lex= lex->first_select_lex();
TABLE_LIST* first_table= select_lex->table_list.first;
switch (lex->sql_command)
{
case SQLCOM_CREATE_TABLE:
- DBUG_ASSERT(!table_list);
if (thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)
{
return false;
@@ -1651,56 +1976,68 @@ static bool wsrep_can_run_in_toi(THD *thd, const char *db, const char *table,
}
}
-/*
- returns:
- 0: statement was replicated as TOI
- 1: TOI replication was skipped
- -1: TOI replication failed
- */
-static int wsrep_TOI_begin(THD *thd, const char *db_, const char *table_,
- const TABLE_LIST* table_list,
- Alter_info* alter_info)
+
+static int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len)
{
- wsrep_status_t ret(WSREP_WARNING);
- uchar* buf(0);
- size_t buf_len(0);
- int buf_err;
- int rc= 0;
+ String log_query;
+ sp_head *sp= thd->lex->sphead;
+ sql_mode_t saved_mode= thd->variables.sql_mode;
+ String retstr(64);
+ LEX_CSTRING returns= empty_clex_str;
+ retstr.set_charset(system_charset_info);
- if (wsrep_can_run_in_toi(thd, db_, table_, table_list) == false)
+ log_query.set_charset(system_charset_info);
+
+ if (sp->m_handler->type() == TYPE_ENUM_FUNCTION)
+ {
+ sp_returns_type(thd, retstr, sp);
+ returns= retstr.lex_cstring();
+ }
+ if (sp->m_handler->
+ show_create_sp(thd, &log_query,
+ sp->m_explicit_name ? sp->m_db : null_clex_str,
+ sp->m_name, sp->m_params, returns,
+ sp->m_body, sp->chistics(),
+ thd->lex->definer[0],
+ thd->lex->create_info,
+ saved_mode))
{
- WSREP_DEBUG("No TOI for %s", WSREP_QUERY(thd));
+ WSREP_WARN("SP create string failed: schema: %s, query: %s",
+ thd->get_db(), thd->query());
return 1;
}
- WSREP_DEBUG("TO BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
- thd->wsrep_exec_mode, wsrep_thd_query(thd));
+ return wsrep_to_buf_helper(thd, log_query.ptr(), log_query.length(), buf, buf_len);
+}
+static int wsrep_TOI_event_buf(THD* thd, uchar** buf, size_t* buf_len)
+{
+ int err;
switch (thd->lex->sql_command)
{
case SQLCOM_CREATE_VIEW:
- buf_err= create_view_query(thd, &buf, &buf_len);
+ err= create_view_query(thd, buf, buf_len);
break;
case SQLCOM_CREATE_PROCEDURE:
case SQLCOM_CREATE_SPFUNCTION:
- buf_err= wsrep_create_sp(thd, &buf, &buf_len);
+ err= wsrep_create_sp(thd, buf, buf_len);
break;
case SQLCOM_CREATE_TRIGGER:
- buf_err= wsrep_create_trigger_query(thd, &buf, &buf_len);
+ err= wsrep_create_trigger_query(thd, buf, buf_len);
break;
case SQLCOM_CREATE_EVENT:
- buf_err= wsrep_create_event_query(thd, &buf, &buf_len);
+ err= wsrep_create_event_query(thd, buf, buf_len);
break;
case SQLCOM_ALTER_EVENT:
- buf_err= wsrep_alter_event_query(thd, &buf, &buf_len);
+ err= wsrep_alter_event_query(thd, buf, buf_len);
break;
case SQLCOM_DROP_TABLE:
- buf_err= wsrep_drop_table_query(thd, &buf, &buf_len);
+ err= wsrep_drop_table_query(thd, buf, buf_len);
break;
case SQLCOM_KILL:
WSREP_DEBUG("KILL as TOI: %s", thd->query());
- buf_err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(),
- &buf, &buf_len);
+ err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(),
+ buf, buf_len);
break;
case SQLCOM_CREATE_ROLE:
if (sp_process_definer(thd))
@@ -1709,169 +2046,221 @@ static int wsrep_TOI_begin(THD *thd, const char *db_, const char *table_,
}
/* fallthrough */
default:
- buf_err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(),
- &buf, &buf_len);
+ err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(), buf,
+ buf_len);
break;
}
- wsrep_key_arr_t key_arr= {0, 0};
- struct wsrep_buf buff = { buf, buf_len };
- if (!buf_err &&
- !wsrep_prepare_keys_for_isolation(thd, db_, table_,
- table_list, alter_info, &key_arr) &&
- key_arr.keys_len > 0 &&
- WSREP_OK == (ret = wsrep->to_execute_start(wsrep, thd->thread_id,
- key_arr.keys, key_arr.keys_len,
- &buff, 1,
- &thd->wsrep_trx_meta)))
- {
- thd->wsrep_exec_mode= TOTAL_ORDER;
- wsrep_to_isolation++;
- wsrep_keys_free(&key_arr);
- WSREP_DEBUG("TO BEGIN: %lld, %d",(long long)wsrep_thd_trx_seqno(thd),
- thd->wsrep_exec_mode);
- }
- else if (key_arr.keys_len > 0) {
+ return err;
+}
+
+static void wsrep_TOI_begin_failed(THD* thd, const wsrep_buf_t* /* const err */)
+{
+ if (wsrep_thd_trx_seqno(thd) > 0)
+ {
+ /* GTID was granted and TO acquired - need to log event and release TO */
+ if (wsrep_emulate_bin_log) wsrep_thd_binlog_trx_reset(thd);
+ if (wsrep_write_dummy_event(thd, "TOI begin failed")) { goto fail; }
+ wsrep::client_state& cs(thd->wsrep_cs());
+ int const ret= cs.leave_toi_local(wsrep::mutable_buffer());
+ if (ret)
+ {
+ WSREP_ERROR("Leaving critical section for failed TOI failed: thd: %lld, "
+ "schema: %s, SQL: %s, rcode: %d wsrep_error: %s",
+ (long long)thd->real_id, thd->db.str,
+ thd->query(), ret, wsrep::to_c_string(cs.current_error()));
+ goto fail;
+ }
+ }
+ return;
+fail:
+ WSREP_ERROR("Failed to release TOI resources. Need to abort.");
+ unireg_abort(1);
+}
+
+
+/*
+ returns:
+ 0: statement was replicated as TOI
+ 1: TOI replication was skipped
+ -1: TOI replication failed
+ */
+static int wsrep_TOI_begin(THD *thd, const char *db, const char *table,
+ const TABLE_LIST* table_list,
+ Alter_info* alter_info, wsrep::key_array* fk_tables)
+{
+ DBUG_ASSERT(thd->variables.wsrep_OSU_method == WSREP_OSU_TOI);
+
+ WSREP_DEBUG("TOI Begin for %s", wsrep_thd_query(thd));
+ if (wsrep_can_run_in_toi(thd, db, table, table_list) == false)
+ {
+ WSREP_DEBUG("No TOI for %s", wsrep_thd_query(thd));
+ return 1;
+ }
+
+ uchar* buf= 0;
+ size_t buf_len(0);
+ int buf_err;
+ int rc;
+
+ buf_err= wsrep_TOI_event_buf(thd, &buf, &buf_len);
+ if (buf_err) {
+ WSREP_ERROR("Failed to create TOI event buf: %d", buf_err);
+ my_message(ER_UNKNOWN_ERROR,
+ "WSREP replication failed to prepare TOI event buffer. "
+ "Check your query.",
+ MYF(0));
+ return -1;
+ }
+ struct wsrep_buf buff= { buf, buf_len };
+
+ wsrep::key_array key_array=
+ wsrep_prepare_keys_for_toi(db, table, table_list, alter_info, fk_tables);
+
+ if (thd->has_read_only_protection())
+ {
+ /* non replicated DDL, affecting temporary tables only */
+ WSREP_DEBUG("TO isolation skipped, sql: %s."
+ "Only temporary tables affected.",
+ wsrep_thd_query(thd));
+ if (buf) my_free(buf);
+ return -1;
+ }
+
+ thd_proc_info(thd, "acquiring total order isolation");
+
+ wsrep::client_state& cs(thd->wsrep_cs());
+ int ret= cs.enter_toi_local(key_array,
+ wsrep::const_buffer(buff.ptr, buff.len));
+
+ if (ret)
+ {
+ DBUG_ASSERT(cs.current_error());
+ WSREP_DEBUG("to_execute_start() failed for %llu: %s, seqno: %lld",
+ thd->thread_id, wsrep_thd_query(thd),
+ (long long)wsrep_thd_trx_seqno(thd));
+
/* jump to error handler in mysql_execute_command() */
- WSREP_WARN("TO isolation failed for: %d, schema: %s, sql: %s. Check wsrep "
- "connection state and retry the query.",
- ret,
- thd->get_db(),
- (thd->query()) ? thd->query() : "void");
- my_message(ER_LOCK_DEADLOCK, "WSREP replication failed. Check "
- "your wsrep connection state and retry the query.", MYF(0));
- wsrep_keys_free(&key_arr);
+ switch (cs.current_error())
+ {
+ case wsrep::e_size_exceeded_error:
+ WSREP_WARN("TO isolation failed for: %d, schema: %s, sql: %s. "
+ "Maximum size exceeded.",
+ ret,
+ (thd->db.str ? thd->db.str : "(null)"),
+ wsrep_thd_query(thd));
+ my_error(ER_ERROR_DURING_COMMIT, MYF(0), WSREP_SIZE_EXCEEDED);
+ break;
+ case wsrep::e_deadlock_error:
+ WSREP_WARN("TO isolation failed for: %d, schema: %s, sql: %s. "
+ "Deadlock error.",
+ ret,
+ (thd->db.str ? thd->db.str : "(null)"),
+ wsrep_thd_query(thd));
+ my_error(ER_LOCK_DEADLOCK, MYF(0));
+ break;
+ case wsrep::e_timeout_error:
+ WSREP_WARN("TO isolation failed for: %d, schema: %s, sql: %s. "
+ "Operation timed out.",
+ ret,
+ (thd->db.str ? thd->db.str : "(null)"),
+ wsrep_thd_query(thd));
+ my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0));
+ break;
+ default:
+ WSREP_WARN("TO isolation failed for: %d, schema: %s, sql: %s. "
+ "Check your wsrep connection state and retry the query.",
+ ret,
+ (thd->db.str ? thd->db.str : "(null)"),
+ wsrep_thd_query(thd));
+
+ if (!thd->is_error())
+ {
+ my_error(ER_LOCK_DEADLOCK, MYF(0), "WSREP replication failed. Check "
+ "your wsrep connection state and retry the query.");
+ }
+ }
rc= -1;
}
else {
- /* non replicated DDL, affecting temporary tables only */
- WSREP_DEBUG("TO isolation skipped for: %d, sql: %s."
- "Only temporary tables affected.",
- ret, (thd->query()) ? thd->query() : "void");
- rc= 1;
+ ++wsrep_to_isolation;
+ rc= 0;
}
+
if (buf) my_free(buf);
+
+ if (rc) wsrep_TOI_begin_failed(thd, NULL);
+
return rc;
}
static void wsrep_TOI_end(THD *thd) {
- wsrep_status_t ret;
wsrep_to_isolation--;
+ wsrep::client_state& client_state(thd->wsrep_cs());
+ DBUG_ASSERT(wsrep_thd_is_local_toi(thd));
- WSREP_DEBUG("TO END: %lld, %d: %s", (long long)wsrep_thd_trx_seqno(thd),
- thd->wsrep_exec_mode, wsrep_thd_query(thd));
+ wsrep_set_SE_checkpoint(client_state.toi_meta().gtid());
- wsrep_set_SE_checkpoint(thd->wsrep_trx_meta.gtid.uuid,
- thd->wsrep_trx_meta.gtid.seqno);
- WSREP_DEBUG("TO END: %lld, update seqno",
- (long long)wsrep_thd_trx_seqno(thd));
+ int ret= client_state.leave_toi_local(wsrep::mutable_buffer());
- if (WSREP_OK == (ret = wsrep->to_execute_end(wsrep, thd->thread_id))) {
- WSREP_DEBUG("TO END: %lld", (long long)wsrep_thd_trx_seqno(thd));
+ if (!ret)
+ {
+ WSREP_DEBUG("TO END: %lld: %s",
+ client_state.toi_meta().seqno().get(), wsrep_thd_query(thd));
}
- else {
- WSREP_WARN("TO isolation end failed for: %d, schema: %s, sql: %s",
- ret,
- thd->get_db(),
- (thd->query()) ? thd->query() : "void");
+ else
+ {
+ WSREP_WARN("TO isolation end failed for: %d, sql: %s",
+ ret, wsrep_thd_query(thd));
}
}
static int wsrep_RSU_begin(THD *thd, const char *db_, const char *table_)
{
- wsrep_status_t ret(WSREP_WARNING);
- WSREP_DEBUG("RSU BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
- thd->wsrep_exec_mode, thd->query() );
-
- ret = wsrep->desync(wsrep);
- if (ret != WSREP_OK)
+ WSREP_DEBUG("RSU BEGIN: %lld, : %s", wsrep_thd_trx_seqno(thd),
+ wsrep_thd_query(thd));
+ if (thd->wsrep_cs().begin_rsu(5000))
{
- WSREP_WARN("RSU desync failed %d for schema: %s, query: %s",
- ret, thd->get_db(), thd->query());
- my_error(ER_LOCK_DEADLOCK, MYF(0));
- return(ret);
- }
-
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- wsrep_replaying++;
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
-
- if (wsrep_wait_committing_connections_close(5000))
- {
- /* no can do, bail out from DDL */
- WSREP_WARN("RSU failed due to pending transactions, schema: %s, query %s",
- thd->get_db(), thd->query());
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- wsrep_replaying--;
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
-
- ret = wsrep->resync(wsrep);
- if (ret != WSREP_OK)
- {
- WSREP_WARN("resync failed %d for schema: %s, query: %s",
- ret, thd->get_db(), thd->query());
- }
-
- my_error(ER_LOCK_DEADLOCK, MYF(0));
- return(-1);
+ WSREP_WARN("RSU begin failed");
}
-
- wsrep_seqno_t seqno = wsrep->pause(wsrep);
- if (seqno == WSREP_SEQNO_UNDEFINED)
+ else
{
- WSREP_WARN("pause failed %lld for schema: %s, query: %s", (long long)seqno,
- thd->get_db(), thd->query());
- return(1);
+ thd->variables.wsrep_on= 0;
}
- WSREP_DEBUG("paused at %lld", (long long)seqno);
- thd->variables.wsrep_on = 0;
return 0;
}
static void wsrep_RSU_end(THD *thd)
{
- wsrep_status_t ret(WSREP_WARNING);
- WSREP_DEBUG("RSU END: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
- thd->wsrep_exec_mode, thd->query() );
-
-
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- wsrep_replaying--;
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
-
- ret = wsrep->resume(wsrep);
- if (ret != WSREP_OK)
+ WSREP_DEBUG("RSU END: %lld : %s", wsrep_thd_trx_seqno(thd),
+ wsrep_thd_query(thd));
+ if (thd->wsrep_cs().end_rsu())
{
- WSREP_WARN("resume failed %d for schema: %s, query: %s", ret,
- thd->get_db(), thd->query());
+ WSREP_WARN("Failed to end RSU, server may need to be restarted");
}
-
- ret = wsrep->resync(wsrep);
- if (ret != WSREP_OK)
- {
- WSREP_WARN("resync failed %d for schema: %s, query: %s", ret,
- thd->get_db(), thd->query());
- return;
- }
-
- thd->variables.wsrep_on = 1;
+ thd->variables.wsrep_on= 1;
}
int wsrep_to_isolation_begin(THD *thd, const char *db_, const char *table_,
const TABLE_LIST* table_list,
- Alter_info* alter_info)
+ Alter_info* alter_info, wsrep::key_array* fk_tables)
{
- int ret= 0;
-
/*
No isolation for applier or replaying threads.
- */
- if (thd->wsrep_exec_mode == REPL_RECV)
+ */
+ if (!wsrep_thd_is_local(thd))
return 0;
+ if (thd->wsrep_parallel_slave_wait_for_prior_commit())
+ {
+ WSREP_WARN("TOI: wait_for_prior_commit() returned error.");
+ return -1;
+ }
+
+ int ret= 0;
mysql_mutex_lock(&thd->LOCK_thd_data);
- if (thd->wsrep_conflict_state == MUST_ABORT)
+ if (thd->wsrep_trx().state() == wsrep::transaction::s_must_abort)
{
WSREP_INFO("thread: %lld schema: %s query: %s has been aborted due to multi-master conflict",
(longlong) thd->thread_id, thd->get_db(), thd->query());
@@ -1880,20 +2269,20 @@ int wsrep_to_isolation_begin(THD *thd, const char *db_, const char *table_,
}
mysql_mutex_unlock(&thd->LOCK_thd_data);
- DBUG_ASSERT(thd->wsrep_exec_mode == LOCAL_STATE);
- DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno == WSREP_SEQNO_UNDEFINED);
+ DBUG_ASSERT(wsrep_thd_is_local(thd));
+ DBUG_ASSERT(thd->wsrep_trx().ws_meta().seqno().is_undefined());
- if (thd->global_read_lock.can_acquire_protection())
+ if (Wsrep_server_state::instance().desynced_on_pause())
{
- WSREP_DEBUG("Aborting TOI: Global Read-Lock (FTWRL) in place: %s %lld",
- thd->query(), (longlong) thd->thread_id);
+ my_message(ER_UNKNOWN_COM_ERROR,
+ "Aborting TOI: Replication paused on node for FTWRL/BACKUP STAGE.", MYF(0));
return -1;
}
if (wsrep_debug && thd->mdl_context.has_locks())
{
- WSREP_DEBUG("thread holds MDL locks at TI begin: %s %lld",
- thd->query(), (longlong) thd->thread_id);
+ WSREP_DEBUG("thread holds MDL locks at TI begin: %s %llu",
+ wsrep_thd_query(thd), thd->thread_id);
}
/*
@@ -1905,15 +2294,15 @@ int wsrep_to_isolation_begin(THD *thd, const char *db_, const char *table_,
*/
if (wsrep_auto_increment_control)
{
- thd->variables.auto_increment_offset = 1;
- thd->variables.auto_increment_increment = 1;
+ thd->variables.auto_increment_offset= 1;
+ thd->variables.auto_increment_increment= 1;
}
- if (thd->variables.wsrep_on && thd->wsrep_exec_mode==LOCAL_STATE)
+ if (thd->variables.wsrep_on && wsrep_thd_is_local(thd))
{
switch (thd->variables.wsrep_OSU_method) {
case WSREP_OSU_TOI:
- ret= wsrep_TOI_begin(thd, db_, table_, table_list, alter_info);
+ ret= wsrep_TOI_begin(thd, db_, table_, table_list, alter_info, fk_tables);
break;
case WSREP_OSU_RSU:
ret= wsrep_RSU_begin(thd, db_, table_);
@@ -1924,49 +2313,67 @@ int wsrep_to_isolation_begin(THD *thd, const char *db_, const char *table_,
ret= -1;
break;
}
+
switch (ret) {
- case 0: thd->wsrep_exec_mode= TOTAL_ORDER; break;
+ case 0: /* wsrep_TOI_begin sould set toi mode */
+ if (thd->variables.wsrep_OSU_method == WSREP_OSU_TOI)
+ {
+ /*
+ TOI operations ignore the provided lock_wait_timeout once replicated,
+ and restore it after operation is done.
+ */
+ thd->variables.saved_lock_wait_timeout= thd->variables.lock_wait_timeout;
+ thd->variables.lock_wait_timeout= LONG_TIMEOUT;
+ }
+ break;
case 1:
/* TOI replication skipped, treat as success */
- ret = 0;
+ ret= 0;
break;
case -1:
/* TOI replication failed, treat as error */
break;
}
}
+
return ret;
}
void wsrep_to_isolation_end(THD *thd)
{
- if (thd->wsrep_exec_mode == TOTAL_ORDER)
+ DBUG_ASSERT(wsrep_thd_is_local_toi(thd) ||
+ wsrep_thd_is_in_rsu(thd));
+
+ if (wsrep_thd_is_local_toi(thd))
{
- switch(thd->variables.wsrep_OSU_method)
- {
- case WSREP_OSU_TOI: wsrep_TOI_end(thd); break;
- case WSREP_OSU_RSU: wsrep_RSU_end(thd); break;
- default:
- WSREP_WARN("Unsupported wsrep OSU method at isolation end: %lu",
- thd->variables.wsrep_OSU_method);
- break;
- }
- wsrep_cleanup_transaction(thd);
+ thd->variables.lock_wait_timeout= thd->variables.saved_lock_wait_timeout;
+ DBUG_ASSERT(thd->variables.wsrep_OSU_method == WSREP_OSU_TOI);
+ wsrep_TOI_end(thd);
}
+ else if (wsrep_thd_is_in_rsu(thd))
+ {
+ DBUG_ASSERT(thd->variables.wsrep_OSU_method == WSREP_OSU_RSU);
+ wsrep_RSU_end(thd);
+ }
+ else
+ {
+ DBUG_ASSERT(0);
+ }
+ if (wsrep_emulate_bin_log) wsrep_thd_binlog_trx_reset(thd);
}
#define WSREP_MDL_LOG(severity, msg, schema, schema_len, req, gra) \
WSREP_##severity( \
"%s\n" \
"schema: %.*s\n" \
- "request: (%lld \tseqno %lld \twsrep (%d, %d, %d) cmd %d %d \t%s)\n" \
- "granted: (%lld \tseqno %lld \twsrep (%d, %d, %d) cmd %d %d \t%s)", \
+ "request: (%llu \tseqno %lld \twsrep (%s, %s, %s) cmd %d %d \t%s)\n" \
+ "granted: (%llu \tseqno %lld \twsrep (%s, %s, %s) cmd %d %d \t%s)", \
msg, schema_len, schema, \
- (longlong) req->thread_id, (long long)wsrep_thd_trx_seqno(req), \
- req->wsrep_exec_mode, req->wsrep_query_state, req->wsrep_conflict_state, \
+ req->thread_id, (long long)wsrep_thd_trx_seqno(req), \
+ wsrep_thd_client_mode_str(req), wsrep_thd_client_state_str(req), wsrep_thd_transaction_state_str(req), \
req->get_command(), req->lex->sql_command, req->query(), \
- (longlong) gra->thread_id, (long long)wsrep_thd_trx_seqno(gra), \
- gra->wsrep_exec_mode, gra->wsrep_query_state, gra->wsrep_conflict_state, \
+ gra->thread_id, (long long)wsrep_thd_trx_seqno(gra), \
+ wsrep_thd_client_mode_str(gra), wsrep_thd_client_state_str(gra), wsrep_thd_transaction_state_str(gra), \
gra->get_command(), gra->lex->sql_command, gra->query());
/**
@@ -1979,58 +2386,58 @@ void wsrep_to_isolation_end(THD *thd)
@retval FALSE Lock request cannot be granted
*/
-bool wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
+void wsrep_handle_mdl_conflict(MDL_context *requestor_ctx,
MDL_ticket *ticket,
const MDL_key *key)
{
/* Fallback to the non-wsrep behaviour */
- if (!WSREP_ON) return FALSE;
+ if (!WSREP_ON) return;
THD *request_thd= requestor_ctx->get_thd();
THD *granted_thd= ticket->get_ctx()->get_thd();
- bool ret= false;
const char* schema= key->db_name();
int schema_len= key->db_name_length();
mysql_mutex_lock(&request_thd->LOCK_thd_data);
+ if (wsrep_thd_is_toi(request_thd) ||
+ wsrep_thd_is_applying(request_thd)) {
- /*
- We consider granting MDL exceptions only for appliers (BF THD) and ones
- executing under TOI mode.
-
- Rules:
- 1. If granted/owner THD is also an applier (BF THD) or one executing
- under TOI mode, then we grant the requested lock to the requester
- THD.
- @return true
-
- 2. If granted/owner THD is executing a FLUSH command or already has an
- explicit lock, then do not grant the requested lock to the requester
- THD and it has to wait.
- @return false
-
- 3. In all other cases the granted/owner THD is aborted and the requested
- lock is not granted to the requester THD, thus it has to wait.
- @return false
- */
- if (request_thd->wsrep_exec_mode == TOTAL_ORDER ||
- request_thd->wsrep_exec_mode == REPL_RECV)
- {
mysql_mutex_unlock(&request_thd->LOCK_thd_data);
WSREP_MDL_LOG(DEBUG, "MDL conflict ", schema, schema_len,
request_thd, granted_thd);
ticket->wsrep_report(wsrep_debug);
+ /* Here we will call wsrep_abort_transaction so we should hold
+ THD::LOCK_thd_data to protect victim from concurrent usage
+ and THD::LOCK_thd_kill to protect from disconnect or delete. */
wsrep_thd_LOCK(granted_thd);
- if (granted_thd->wsrep_exec_mode == TOTAL_ORDER ||
- granted_thd->wsrep_exec_mode == REPL_RECV)
+
+ if (wsrep_thd_is_toi(granted_thd) ||
+ wsrep_thd_is_applying(granted_thd))
{
- WSREP_MDL_LOG(INFO, "MDL BF-BF conflict", schema, schema_len,
- request_thd, granted_thd);
- ticket->wsrep_report(true);
- wsrep_thd_UNLOCK(granted_thd);
- ret= true;
+ if (wsrep_thd_is_aborting(granted_thd))
+ {
+ WSREP_DEBUG("BF thread waiting for SR in aborting state");
+ ticket->wsrep_report(wsrep_debug);
+ wsrep_thd_UNLOCK(granted_thd);
+ }
+ else if (wsrep_thd_is_SR(granted_thd) && !wsrep_thd_is_SR(request_thd))
+ {
+ WSREP_MDL_LOG(INFO, "MDL conflict, DDL vs SR",
+ schema, schema_len, request_thd, granted_thd);
+ wsrep_abort_thd(request_thd, granted_thd, 1);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_data);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_kill);
+ }
+ else
+ {
+ WSREP_MDL_LOG(INFO, "MDL BF-BF conflict", schema, schema_len,
+ request_thd, granted_thd);
+ ticket->wsrep_report(true);
+ wsrep_thd_UNLOCK(granted_thd);
+ unireg_abort(1);
+ }
}
else if (granted_thd->lex->sql_command == SQLCOM_FLUSH ||
granted_thd->mdl_context.has_explicit_locks())
@@ -2038,210 +2445,61 @@ bool wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
WSREP_DEBUG("BF thread waiting for FLUSH");
ticket->wsrep_report(wsrep_debug);
wsrep_thd_UNLOCK(granted_thd);
- ret= false;
+ }
+ else if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE)
+ {
+ WSREP_DEBUG("DROP caused BF abort, conf %s",
+ wsrep_thd_transaction_state_str(granted_thd));
+ ticket->wsrep_report(wsrep_debug);
+ wsrep_abort_thd(request_thd, granted_thd, 1);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_data);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_kill);
}
else
{
- /* Print some debug information. */
- if (wsrep_debug)
+ WSREP_MDL_LOG(DEBUG, "MDL conflict-> BF abort", schema, schema_len,
+ request_thd, granted_thd);
+ ticket->wsrep_report(wsrep_debug);
+ if (granted_thd->wsrep_trx().active())
{
- if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE ||
- request_thd->lex->sql_command == SQLCOM_DROP_SEQUENCE)
- {
- WSREP_DEBUG("DROP caused BF abort, conf %d", granted_thd->wsrep_conflict_state);
- }
- else if (granted_thd->wsrep_query_state == QUERY_COMMITTING)
+ wsrep_abort_thd(request_thd, granted_thd, true);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_data);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_kill);
+ }
+ else
+ {
+ /*
+ Granted_thd is likely executing with wsrep_on=0. If the requesting
+ thd is BF, BF abort and wait.
+ */
+ if (wsrep_thd_is_BF(request_thd, FALSE))
{
- WSREP_DEBUG("MDL granted, but committing thd abort scheduled");
+ ha_abort_transaction(request_thd, granted_thd, TRUE);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_data);
+ mysql_mutex_assert_not_owner(&granted_thd->LOCK_thd_kill);
}
else
{
- WSREP_MDL_LOG(DEBUG, "MDL conflict-> BF abort", schema, schema_len,
- request_thd, granted_thd);
+ WSREP_MDL_LOG(INFO, "MDL unknown BF-BF conflict", schema, schema_len,
+ request_thd, granted_thd);
+ ticket->wsrep_report(true);
+ unireg_abort(1);
}
- ticket->wsrep_report(true);
}
-
- /* This will call wsrep_abort_transaction so we should hold
- THD::LOCK_thd_data to protect victim from concurrent usage
- or disconnect or delete. */
- wsrep_abort_thd((void *) request_thd, (void *) granted_thd, true);
- ret= false;
}
}
else
{
mysql_mutex_unlock(&request_thd->LOCK_thd_data);
}
-
- return ret;
-}
-
-
-pthread_handler_t start_wsrep_THD(void *arg)
-{
- THD *thd;
- wsrep_thread_args* args= (wsrep_thread_args*)arg;
- wsrep_thd_processor_fun processor= args->processor;
-
- if (my_thread_init() || (!(thd= new THD(next_thread_id(), true))))
- {
- goto error;
- }
-
- mysql_mutex_lock(&LOCK_thread_count);
-
- if (wsrep_gtid_mode)
- {
- /* Adjust domain_id. */
- thd->variables.gtid_domain_id= wsrep_gtid_domain_id;
- }
-
- thd->real_id=pthread_self(); // Keep purify happy
- thread_created++;
- threads.append(thd);
-
- my_net_init(&thd->net,(st_vio*) 0, thd, MYF(0));
-
- DBUG_PRINT("wsrep",(("creating thread %lld"), (long long)thd->thread_id));
- thd->prior_thr_create_utime= thd->start_utime= microsecond_interval_timer();
- (void) mysql_mutex_unlock(&LOCK_thread_count);
-
- /* from bootstrap()... */
- thd->bootstrap=1;
- thd->max_client_packet_length= thd->net.max_packet;
- thd->security_ctx->master_access= ~(ulong)0;
-
- /* from handle_one_connection... */
- pthread_detach_this_thread();
-
- mysql_thread_set_psi_id(thd->thread_id);
- thd->thr_create_utime= microsecond_interval_timer();
- if (MYSQL_CALLBACK_ELSE(thread_scheduler, init_new_connection_thread, (), 0))
- {
- close_connection(thd, ER_OUT_OF_RESOURCES);
- statistic_increment(aborted_connects,&LOCK_status);
- MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0));
- goto error;
- }
-
-// </5.1.17>
- /*
- handle_one_connection() is normally the only way a thread would
- start and would always be on the very high end of the stack ,
- therefore, the thread stack always starts at the address of the
- first local variable of handle_one_connection, which is thd. We
- need to know the start of the stack so that we could check for
- stack overruns.
- */
- DBUG_PRINT("wsrep", ("handle_one_connection called by thread %lld",
- (long long)thd->thread_id));
- /* now that we've called my_thread_init(), it is safe to call DBUG_* */
-
- thd->thread_stack= (char*) &thd;
- if (thd->store_globals())
- {
- close_connection(thd, ER_OUT_OF_RESOURCES);
- statistic_increment(aborted_connects,&LOCK_status);
- MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0));
- goto error;
- }
-
- thd->system_thread= SYSTEM_THREAD_SLAVE_SQL;
- thd->security_ctx->skip_grants();
-
- /* handle_one_connection() again... */
- //thd->version= refresh_version;
- thd->proc_info= 0;
- thd->set_command(COM_SLEEP);
- thd->init_for_queries();
-
- mysql_mutex_lock(&LOCK_thread_count);
- wsrep_running_threads++;
-
- switch (args->thread_type) {
- case WSREP_APPLIER_THREAD:
- wsrep_running_applier_threads++;
- break;
- case WSREP_ROLLBACKER_THREAD:
- wsrep_running_rollbacker_threads++;
- break;
- default:
- WSREP_ERROR("Incorrect wsrep thread type: %d", args->thread_type);
- break;
- }
-
- mysql_cond_broadcast(&COND_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
-
- processor(thd);
-
- close_connection(thd, 0);
-
- mysql_mutex_lock(&LOCK_thread_count);
- DBUG_ASSERT(wsrep_running_threads > 0);
- wsrep_running_threads--;
-
- switch (args->thread_type) {
- case WSREP_APPLIER_THREAD:
- DBUG_ASSERT(wsrep_running_applier_threads > 0);
- wsrep_running_applier_threads--;
- break;
- case WSREP_ROLLBACKER_THREAD:
- DBUG_ASSERT(wsrep_running_rollbacker_threads > 0);
- wsrep_running_rollbacker_threads--;
- break;
- default:
- WSREP_ERROR("Incorrect wsrep thread type: %d", args->thread_type);
- break;
- }
-
- my_free(args);
-
- WSREP_DEBUG("wsrep running threads now: %lu", wsrep_running_threads);
- mysql_cond_broadcast(&COND_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
-
- // Note: We can't call THD destructor without crashing
- // if plugins have not been initialized. However, in most of the
- // cases this means that pre SE initialization SST failed and
- // we are going to exit anyway.
- if (plugins_are_initialized)
- {
- net_end(&thd->net);
- MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 1));
- }
- else
- {
- // TODO: lightweight cleanup to get rid of:
- // 'Error in my_thread_global_end(): 2 threads didn't exit'
- // at server shutdown
- }
-
- unlink_not_visible_thd(thd);
- delete thd;
- my_thread_end();
- return(NULL);
-
-error:
- WSREP_ERROR("Failed to create/initialize system thread");
-
- my_free(args);
-
- /* Abort if its the first applier/rollbacker thread. */
- if (!mysqld_server_initialized)
- unireg_abort(1);
- else
- return NULL;
}
-
/**/
static bool abort_replicated(THD *thd)
{
bool ret_code= false;
wsrep_thd_LOCK(thd);
- if (thd->wsrep_query_state== QUERY_COMMITTING)
+ if (thd->wsrep_trx().state() == wsrep::transaction::s_committing)
{
WSREP_DEBUG("aborting replicated trx: %llu", (ulonglong)(thd->real_id));
@@ -2250,206 +2508,144 @@ static bool abort_replicated(THD *thd)
}
else
wsrep_thd_UNLOCK(thd);
+
return ret_code;
}
-
/**/
static inline bool is_client_connection(THD *thd)
{
return (thd->wsrep_client_thread && thd->variables.wsrep_on);
}
-
static inline bool is_replaying_connection(THD *thd)
{
bool ret;
mysql_mutex_lock(&thd->LOCK_thd_data);
- ret= (thd->wsrep_conflict_state == REPLAYING) ? true : false;
+ ret= (thd->wsrep_trx().state() == wsrep::transaction::s_replaying) ? true : false;
mysql_mutex_unlock(&thd->LOCK_thd_data);
return ret;
}
-
static inline bool is_committing_connection(THD *thd)
{
bool ret;
mysql_mutex_lock(&thd->LOCK_thd_data);
- ret= (thd->wsrep_query_state == QUERY_COMMITTING) ? true : false;
+ ret= (thd->wsrep_trx().state() == wsrep::transaction::s_committing) ? true : false;
mysql_mutex_unlock(&thd->LOCK_thd_data);
return ret;
}
-
-static bool have_client_connections()
+static my_bool have_client_connections(THD *thd, void*)
{
- THD *tmp;
-
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
+ DBUG_PRINT("quit",("Informing thread %lld that it's time to die",
+ (longlong) thd->thread_id));
+ if (is_client_connection(thd) && thd->killed == KILL_CONNECTION)
{
- DBUG_PRINT("quit",("Informing thread %lld that it's time to die",
- (longlong) tmp->thread_id));
- if (is_client_connection(tmp) && tmp->killed == KILL_CONNECTION)
- {
- WSREP_DEBUG("Informing thread %lld that it's time to die",
- (longlong)tmp->thread_id);
- (void)abort_replicated(tmp);
- return true;
- }
+ WSREP_DEBUG("Informing thread %lld that it's time to die",
+ thd->thread_id);
+ (void)abort_replicated(thd);
+ return true;
}
- return false;
+ return 0;
}
static void wsrep_close_thread(THD *thd)
{
thd->set_killed(KILL_CONNECTION);
MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (thd));
- if (thd->mysys_var)
- {
- thd->mysys_var->abort=1;
- mysql_mutex_lock(&thd->mysys_var->mutex);
- if (thd->mysys_var->current_cond)
- {
- mysql_mutex_lock(thd->mysys_var->current_mutex);
- mysql_cond_broadcast(thd->mysys_var->current_cond);
- mysql_mutex_unlock(thd->mysys_var->current_mutex);
- }
- mysql_mutex_unlock(&thd->mysys_var->mutex);
- }
+ mysql_mutex_lock(&thd->LOCK_thd_kill);
+ thd->abort_current_cond_wait(true);
+ mysql_mutex_unlock(&thd->LOCK_thd_kill);
}
-
-static my_bool have_committing_connections()
+static my_bool have_committing_connections(THD *thd, void *)
{
- THD *tmp;
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
-
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
- {
- if (!is_client_connection(tmp))
- continue;
-
- if (is_committing_connection(tmp))
- {
- mysql_mutex_unlock(&LOCK_thread_count);
- return TRUE;
- }
- }
- mysql_mutex_unlock(&LOCK_thread_count);
- return FALSE;
+ return is_client_connection(thd) && is_committing_connection(thd) ? 1 : 0;
}
-
int wsrep_wait_committing_connections_close(int wait_time)
{
int sleep_time= 100;
- while (have_committing_connections() && wait_time > 0)
+ WSREP_DEBUG("wait for committing transaction to close: %d sleep: %d", wait_time, sleep_time);
+ while (server_threads.iterate(have_committing_connections) && wait_time > 0)
{
WSREP_DEBUG("wait for committing transaction to close: %d", wait_time);
my_sleep(sleep_time);
wait_time -= sleep_time;
}
- if (have_committing_connections())
- {
- return 1;
- }
- return 0;
+ return server_threads.iterate(have_committing_connections);
}
-
-void wsrep_close_client_connections(my_bool wait_to_end, THD *except_caller_thd)
+static my_bool kill_all_threads(THD *thd, THD *caller_thd)
{
- /*
- First signal all threads that it's time to die
- */
-
- THD *tmp;
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
-
- bool kill_cached_threads_saved= kill_cached_threads;
- kill_cached_threads= true; // prevent future threads caching
- mysql_cond_broadcast(&COND_thread_cache); // tell cached threads to die
-
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
+ DBUG_PRINT("quit", ("Informing thread %lld that it's time to die",
+ (longlong) thd->thread_id));
+ WSREP_DEBUG("Informing thread %lld that it's time to die",
+ thd->thread_id);
+ /* We skip slave threads & scheduler on this first loop through. */
+ if (is_client_connection(thd) && thd != caller_thd)
{
- DBUG_PRINT("quit",("Informing thread %lld that it's time to die",
- (longlong) tmp->thread_id));
- WSREP_DEBUG("Informing thread %lld that it's time to die",
- (longlong)tmp->thread_id);
- /* We skip slave threads & scheduler on this first loop through. */
- if (!is_client_connection(tmp))
- continue;
-
- if (tmp == except_caller_thd)
+ if (is_replaying_connection(thd))
+ thd->set_killed(KILL_CONNECTION);
+ else if (!abort_replicated(thd))
{
- DBUG_ASSERT(is_client_connection(tmp));
- continue;
+ /* replicated transactions must be skipped */
+ WSREP_DEBUG("closing connection %lld", (longlong) thd->thread_id);
+ /* instead of wsrep_close_thread() we do now soft kill by THD::awake */
+ thd->awake(KILL_CONNECTION);
}
+ }
+ return 0;
+}
- if (is_replaying_connection(tmp))
- {
- tmp->set_killed(KILL_CONNECTION);
- continue;
- }
-
- /* replicated transactions must be skipped and aborted
- with wsrep_abort_thd. */
- if (abort_replicated(tmp))
- continue;
-
- WSREP_DEBUG("closing connection %lld", (longlong) tmp->thread_id);
+static my_bool kill_remaining_threads(THD *thd, THD *caller_thd)
+{
+#ifndef __bsdi__ // Bug in BSDI kernel
+ if (is_client_connection(thd) &&
+ !abort_replicated(thd) &&
+ !is_replaying_connection(thd) &&
+ thd_is_connection_alive(thd) &&
+ thd != caller_thd)
+ {
- /*
- instead of wsrep_close_thread() we do now soft kill by
- THD::awake(). Here also victim needs to be protected from
- concurrent usage or disconnect or delete.
- */
- tmp->awake(KILL_CONNECTION);
+ WSREP_INFO("killing local connection: %lld", (longlong) thd->thread_id);
+ close_connection(thd);
}
- mysql_mutex_unlock(&LOCK_thread_count);
+#endif
+ return 0;
+}
- if (thread_count)
- sleep(2); // Give threads time to die
+void wsrep_close_client_connections(my_bool wait_to_end, THD* except_caller_thd)
+{
+ /* Clear thread cache */
+ kill_cached_threads++;
+ flush_thread_cache();
+
+ /*
+ First signal all threads that it's time to die
+ */
+ server_threads.iterate(kill_all_threads, except_caller_thd);
- mysql_mutex_lock(&LOCK_thread_count);
/*
Force remaining threads to die by closing the connection to the client
*/
+ server_threads.iterate(kill_remaining_threads, except_caller_thd);
- I_List_iterator<THD> it2(threads);
- while ((tmp=it2++))
- {
- if (is_client_connection(tmp) &&
- !abort_replicated(tmp) &&
- !is_replaying_connection(tmp) &&
- tmp != except_caller_thd)
- {
- WSREP_INFO("killing local connection: %lld", (longlong) tmp->thread_id);
- close_connection(tmp,0);
- }
- }
-
- DBUG_PRINT("quit",("Waiting for threads to die (count=%u)",thread_count));
- WSREP_DEBUG("waiting for client connections to close: %u", thread_count);
+ DBUG_PRINT("quit", ("Waiting for threads to die (count=%u)", THD_count::value()));
+ WSREP_DEBUG("waiting for client connections to close: %u", THD_count::value());
- while (wait_to_end && have_client_connections())
+ while (wait_to_end && server_threads.iterate(have_client_connections))
{
- mysql_cond_wait(&COND_thread_count, &LOCK_thread_count);
- DBUG_PRINT("quit",("One thread died (count=%u)", thread_count));
+ sleep(1);
+ DBUG_PRINT("quit",("One thread died (count=%u)", THD_count::value()));
}
- kill_cached_threads= kill_cached_threads_saved;
-
- mysql_mutex_unlock(&LOCK_thread_count);
-
/* All client connection threads have now been aborted */
}
@@ -2460,399 +2656,131 @@ void wsrep_close_applier(THD *thd)
wsrep_close_thread(thd);
}
-
-void wsrep_close_threads(THD *thd)
+static my_bool wsrep_close_threads_callback(THD *thd, THD *caller_thd)
{
- THD *tmp;
- mysql_mutex_lock(&LOCK_thread_count); // For unlink from list
-
- I_List_iterator<THD> it(threads);
- while ((tmp=it++))
+ DBUG_PRINT("quit",("Informing thread %lld that it's time to die",
+ (longlong) thd->thread_id));
+ /* We skip slave threads & scheduler on this first loop through. */
+ if (thd->wsrep_applier && thd != caller_thd)
{
- DBUG_PRINT("quit",("Informing thread %lld that it's time to die",
- (longlong) tmp->thread_id));
- /* We skip slave threads & scheduler on this first loop through. */
- if (tmp->wsrep_applier && tmp != thd)
- {
- WSREP_DEBUG("closing wsrep thread %lld", (longlong) tmp->thread_id);
- wsrep_close_thread (tmp);
- }
+ WSREP_DEBUG("closing wsrep thread %lld", (longlong) thd->thread_id);
+ wsrep_close_thread(thd);
}
+ return 0;
+}
- mysql_mutex_unlock(&LOCK_thread_count);
+void wsrep_close_threads(THD *thd)
+{
+ server_threads.iterate(wsrep_close_threads_callback, thd);
}
void wsrep_wait_appliers_close(THD *thd)
{
/* Wait for wsrep appliers to gracefully exit */
- mysql_mutex_lock(&LOCK_thread_count);
- while (wsrep_running_threads > 1)
- // 1 is for rollbacker thread which needs to be killed explicitly.
- // This gotta be fixed in a more elegant manner if we gonna have arbitrary
- // number of non-applier wsrep threads.
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+ while (wsrep_running_threads > 2)
+ /*
+ 2 is for rollbacker thread which needs to be killed explicitly.
+ This gotta be fixed in a more elegant manner if we gonna have arbitrary
+ number of non-applier wsrep threads.
+ */
{
- if (thread_handling > SCHEDULER_ONE_THREAD_PER_CONNECTION)
- {
- mysql_mutex_unlock(&LOCK_thread_count);
- my_sleep(100);
- mysql_mutex_lock(&LOCK_thread_count);
- }
- else
- mysql_cond_wait(&COND_thread_count,&LOCK_thread_count);
- DBUG_PRINT("quit",("One applier died (count=%u)",thread_count));
+ mysql_cond_wait(&COND_wsrep_slave_threads, &LOCK_wsrep_slave_threads);
}
- mysql_mutex_unlock(&LOCK_thread_count);
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
+ DBUG_PRINT("quit",("applier threads have died (count=%u)",
+ uint32_t(wsrep_running_threads)));
+
/* Now kill remaining wsrep threads: rollbacker */
wsrep_close_threads (thd);
/* and wait for them to die */
- mysql_mutex_lock(&LOCK_thread_count);
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
while (wsrep_running_threads > 0)
{
- if (thread_handling > SCHEDULER_ONE_THREAD_PER_CONNECTION)
- {
- mysql_mutex_unlock(&LOCK_thread_count);
- my_sleep(100);
- mysql_mutex_lock(&LOCK_thread_count);
- }
- else
- mysql_cond_wait(&COND_thread_count,&LOCK_thread_count);
- DBUG_PRINT("quit",("One thread died (count=%u)",thread_count));
+ mysql_cond_wait(&COND_wsrep_slave_threads, &LOCK_wsrep_slave_threads);
}
- mysql_mutex_unlock(&LOCK_thread_count);
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
+ DBUG_PRINT("quit",("all wsrep system threads have died"));
/* All wsrep applier threads have now been aborted. However, if this thread
is also applier, we are still running...
*/
}
-
-void wsrep_kill_mysql(THD *thd)
+int wsrep_must_ignore_error(THD* thd)
{
- if (mysqld_server_started)
- {
- if (!shutdown_in_progress)
- {
- WSREP_INFO("starting shutdown");
- kill_mysql();
- }
- }
- else
- {
- unireg_abort(1);
- }
-}
-
+ const int error= thd->get_stmt_da()->sql_errno();
+ const uint flags= sql_command_flags[thd->lex->sql_command];
-static int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len)
-{
- String log_query;
- sp_head *sp = thd->lex->sphead;
- sql_mode_t saved_mode= thd->variables.sql_mode;
- String retstr(64);
- LEX_CSTRING returns= empty_clex_str;
- retstr.set_charset(system_charset_info);
+ DBUG_ASSERT(error);
+ DBUG_ASSERT(wsrep_thd_is_toi(thd) || wsrep_thd_is_applying(thd));
- log_query.set_charset(system_charset_info);
+ if ((wsrep_ignore_apply_errors & WSREP_IGNORE_ERRORS_ON_DDL))
+ goto ignore_error;
- if (sp->m_handler->type() == TYPE_ENUM_FUNCTION)
+ if ((flags & CF_WSREP_MAY_IGNORE_ERRORS) &&
+ (wsrep_ignore_apply_errors & WSREP_IGNORE_ERRORS_ON_RECONCILING_DDL))
{
- sp_returns_type(thd, retstr, sp);
- returns= retstr.lex_cstring();
- }
- if (sp->m_handler->
- show_create_sp(thd, &log_query,
- sp->m_explicit_name ? sp->m_db : null_clex_str,
- sp->m_name, sp->m_params, returns,
- sp->m_body, sp->chistics(),
- thd->lex->definer[0],
- thd->lex->create_info,
- saved_mode))
- {
- WSREP_WARN("SP create string failed: schema: %s, query: %s",
- thd->get_db(), thd->query());
- return 1;
- }
-
- return wsrep_to_buf_helper(thd, log_query.ptr(), log_query.length(), buf, buf_len);
-}
-
-
-extern int wsrep_on(THD *thd)
-{
- return (int)(WSREP(thd));
-}
-
-
-extern "C" bool wsrep_thd_is_wsrep_on(THD *thd)
-{
- return thd->variables.wsrep_on;
-}
-
-
-bool wsrep_consistency_check(THD *thd)
-{
- return thd->wsrep_consistency_check == CONSISTENCY_CHECK_RUNNING;
-}
-
-
-extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode)
-{
- thd->wsrep_exec_mode= mode;
-}
-
-
-extern "C" void wsrep_thd_set_query_state(
- THD *thd, enum wsrep_query_state state)
-{
- /* async slave thread should never flag IDLE state, as it may
- give rollbacker thread chance to interfere and rollback async slave
- transaction.
- in fact, async slave thread is never idle as it reads complete
- transactions from relay log and applies them, as a whole.
- BF abort happens voluntarily by async slave thread.
- */
- if (thd->slave_thread && state == QUERY_IDLE) {
- WSREP_DEBUG("Skipping IDLE state change for slave SQL");
- return;
- }
- thd->wsrep_query_state= state;
-}
-
-
-void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state)
-{
- mysql_mutex_assert_owner(&thd->LOCK_thd_data);
- thd->wsrep_conflict_state= state;
-}
-
-
-enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd)
-{
- return thd->wsrep_exec_mode;
-}
-
-
-const char *wsrep_thd_exec_mode_str(THD *thd)
-{
- return
- (!thd) ? "void" :
- (thd->wsrep_exec_mode == LOCAL_STATE) ? "local" :
- (thd->wsrep_exec_mode == REPL_RECV) ? "applier" :
- (thd->wsrep_exec_mode == TOTAL_ORDER) ? "total order" :
- (thd->wsrep_exec_mode == LOCAL_COMMIT) ? "local commit" : "void";
-}
-
-
-enum wsrep_query_state wsrep_thd_query_state(THD *thd)
-{
- return thd->wsrep_query_state;
-}
-
-
-const char *wsrep_thd_query_state_str(THD *thd)
-{
- return
- (!thd) ? "void" :
- (thd->wsrep_query_state == QUERY_IDLE) ? "idle" :
- (thd->wsrep_query_state == QUERY_EXEC) ? "executing" :
- (thd->wsrep_query_state == QUERY_COMMITTING) ? "committing" :
- (thd->wsrep_query_state == QUERY_EXITING) ? "exiting" :
- (thd->wsrep_query_state == QUERY_ROLLINGBACK) ? "rolling back" : "void";
-}
-
-
-enum wsrep_conflict_state wsrep_thd_get_conflict_state(THD *thd)
-{
- return thd->wsrep_conflict_state;
-}
-
-
-const char *wsrep_thd_conflict_state_str(THD *thd)
-{
- return
- (!thd) ? "void" :
- (thd->wsrep_conflict_state == NO_CONFLICT) ? "no conflict" :
- (thd->wsrep_conflict_state == MUST_ABORT) ? "must abort" :
- (thd->wsrep_conflict_state == ABORTING) ? "aborting" :
- (thd->wsrep_conflict_state == MUST_REPLAY) ? "must replay" :
- (thd->wsrep_conflict_state == REPLAYING) ? "replaying" :
- (thd->wsrep_conflict_state == RETRY_AUTOCOMMIT) ? "retrying" :
- (thd->wsrep_conflict_state == CERT_FAILURE) ? "cert failure" : "void";
-}
-
-
-wsrep_ws_handle_t* wsrep_thd_ws_handle(THD *thd)
-{
- return &thd->wsrep_ws_handle;
-}
-
-
-void wsrep_thd_LOCK(THD *thd)
-{
- mysql_mutex_lock(&thd->LOCK_thd_data);
- mysql_mutex_lock(&thd->LOCK_thd_kill);
-}
-
-
-void wsrep_thd_UNLOCK(THD *thd)
-{
- mysql_mutex_unlock(&thd->LOCK_thd_kill);
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-}
-
-
-void wsrep_thd_kill_LOCK(THD *thd)
-{
- mysql_mutex_lock(&thd->LOCK_thd_kill);
-}
-
-
-void wsrep_thd_kill_UNLOCK(THD *thd)
-{
- mysql_mutex_unlock(&thd->LOCK_thd_kill);
-}
-
-
-extern "C" time_t wsrep_thd_query_start(THD *thd)
-{
- return thd->query_start();
-}
-
-
-extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd)
-{
- return thd->wsrep_rand;
-}
-
-longlong wsrep_thd_trx_seqno(THD *thd)
-{
- return (thd) ? thd->wsrep_trx_meta.gtid.seqno : WSREP_SEQNO_UNDEFINED;
-}
-
-
-extern "C" query_id_t wsrep_thd_query_id(THD *thd)
-{
- return thd->query_id;
-}
-
-
-const char *wsrep_thd_query(THD *thd)
-{
- if (thd)
- {
- switch(thd->lex->sql_command)
+ switch (error)
{
- case SQLCOM_CREATE_USER:
- return "CREATE USER";
- case SQLCOM_GRANT:
- return "GRANT";
- case SQLCOM_REVOKE:
- return "REVOKE";
- case SQLCOM_SET_OPTION:
- if (thd->lex->definer)
- return "SET PASSWORD";
- /* fallthrough */
- default:
- if (thd->query())
- return thd->query();
+ case ER_DB_DROP_EXISTS:
+ case ER_BAD_TABLE_ERROR:
+ case ER_CANT_DROP_FIELD_OR_KEY:
+ goto ignore_error;
}
}
- return "NULL";
-}
+ return 0;
-extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd)
-{
- return thd->wsrep_last_query_id;
+ignore_error:
+ WSREP_WARN("Ignoring error '%s' on query. "
+ "Default database: '%s'. Query: '%s', Error_code: %d",
+ thd->get_stmt_da()->message(),
+ print_slave_db_safe(thd->db.str),
+ thd->query(),
+ error);
+ return 1;
}
-
-extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id)
+int wsrep_ignored_error_code(Log_event* ev, int error)
{
- thd->wsrep_last_query_id= id;
-}
+ const THD* thd= ev->thd;
+ DBUG_ASSERT(error);
+ DBUG_ASSERT(wsrep_thd_is_applying(thd) &&
+ !wsrep_thd_is_local_toi(thd));
-extern "C" void wsrep_thd_awake(THD *thd, my_bool signal)
-{
- if (signal)
+ if ((wsrep_ignore_apply_errors & WSREP_IGNORE_ERRORS_ON_RECONCILING_DML))
{
- /* Here we should hold THD::LOCK_thd_data to
- protect from concurrent usage and
- THD::LOCK_thd_kill from disconnect or delete */
- mysql_mutex_assert_owner(&thd->LOCK_thd_data);
- mysql_mutex_assert_owner(&thd->LOCK_thd_kill);
- thd->awake_no_mutex(KILL_QUERY);
+ const int ev_type= ev->get_type_code();
+ if ((ev_type == DELETE_ROWS_EVENT || ev_type == DELETE_ROWS_EVENT_V1)
+ && error == ER_KEY_NOT_FOUND)
+ goto ignore_error;
}
- else
- {
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- mysql_cond_broadcast(&COND_wsrep_replaying);
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
- }
-}
-
-
-int wsrep_thd_retry_counter(THD *thd)
-{
- return(thd->wsrep_retry_counter);
-}
-
-
-extern "C" bool wsrep_thd_ignore_table(THD *thd)
-{
- return thd->wsrep_ignore_table;
-}
-
-
-extern int
-wsrep_trx_order_before(THD *thd1, THD *thd2)
-{
- const longlong trx1_seqno= wsrep_thd_trx_seqno(thd1);
- const longlong trx2_seqno= wsrep_thd_trx_seqno(thd2);
- WSREP_DEBUG("BF conflict, order: %lld %lld\n",
- trx1_seqno, trx2_seqno);
-
- if (trx1_seqno == WSREP_SEQNO_UNDEFINED ||
- trx2_seqno == WSREP_SEQNO_UNDEFINED)
- return 1; /* trx is not yet replicated */
- else if (trx1_seqno < trx2_seqno)
- return 1;
return 0;
-}
+ignore_error:
+ WSREP_WARN("Ignoring error '%s' on %s event. Error_code: %d",
+ thd->get_stmt_da()->message(),
+ ev->get_type_str(),
+ error);
+ return 1;
+}
-int wsrep_trx_is_aborting(THD *thd_ptr)
+bool wsrep_provider_is_SR_capable()
{
- if (thd_ptr) {
- if ((((THD *)thd_ptr)->wsrep_conflict_state == MUST_ABORT) ||
- (((THD *)thd_ptr)->wsrep_conflict_state == ABORTING)) {
- return 1;
- }
- }
- return 0;
+ return Wsrep_server_state::has_capability(wsrep::provider::capability::streaming);
}
-
-void wsrep_copy_query(THD *thd)
+int wsrep_thd_retry_counter(const THD *thd)
{
- thd->wsrep_retry_command = thd->get_command();
- thd->wsrep_retry_query_len = thd->query_length();
- if (thd->wsrep_retry_query) {
- my_free(thd->wsrep_retry_query);
- }
- thd->wsrep_retry_query = (char *)my_malloc(
- thd->wsrep_retry_query_len + 1, MYF(0));
- strncpy(thd->wsrep_retry_query, thd->query(), thd->wsrep_retry_query_len);
- thd->wsrep_retry_query[thd->wsrep_retry_query_len] = '\0';
+ return thd->wsrep_retry_counter;
}
-
-bool wsrep_is_show_query(enum enum_sql_command command)
+extern bool wsrep_thd_ignore_table(THD *thd)
{
- DBUG_ASSERT(command >= 0 && command <= SQLCOM_END);
- return (sql_command_flags[command] & CF_STATUS_COMMAND) != 0;
+ return thd->wsrep_ignore_table;
}
bool wsrep_create_like_table(THD* thd, TABLE_LIST* table,
@@ -2897,14 +2825,14 @@ bool wsrep_create_like_table(THD* thd, TABLE_LIST* table,
}
return(false);
-
+#ifdef WITH_WSREP
wsrep_error_label:
thd->wsrep_TOI_pre_query= NULL;
return (true);
+#endif
}
-
-static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len)
+int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len)
{
LEX *lex= thd->lex;
String stmt_query;
@@ -2966,88 +2894,203 @@ static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len)
buf, buf_len);
}
-/***** callbacks for wsrep service ************/
-
-my_bool get_wsrep_debug()
+void* start_wsrep_THD(void *arg)
{
- return wsrep_debug;
-}
+ THD *thd;
-my_bool get_wsrep_load_data_splitting()
-{
- return wsrep_load_data_splitting;
-}
+ Wsrep_thd_args* thd_args= (Wsrep_thd_args*) arg;
-long get_wsrep_protocol_version()
-{
- return wsrep_protocol_version;
-}
+ if (my_thread_init() || (!(thd= new THD(next_thread_id(), true))))
+ {
+ goto error;
+ }
-my_bool get_wsrep_drupal_282555_workaround()
-{
- return wsrep_drupal_282555_workaround;
-}
+ statistic_increment(thread_created, &LOCK_status);
-my_bool get_wsrep_recovery()
-{
- return wsrep_recovery;
-}
+ if (wsrep_gtid_mode)
+ {
+ /* Adjust domain_id. */
+ thd->variables.gtid_domain_id= wsrep_gtid_domain_id;
+ }
-my_bool get_wsrep_log_conflicts()
-{
- return wsrep_log_conflicts;
-}
+ thd->real_id=pthread_self(); // Keep purify happy
-wsrep_t *get_wsrep()
-{
- return wsrep;
-}
+ my_net_init(&thd->net,(st_vio*) 0, thd, MYF(0));
-my_bool get_wsrep_certify_nonPK()
-{
- return wsrep_certify_nonPK;
-}
+ DBUG_PRINT("wsrep",(("creating thread %lld"), (long long)thd->thread_id));
+ thd->prior_thr_create_utime= thd->start_utime= microsecond_interval_timer();
-void wsrep_lock_rollback()
-{
- mysql_mutex_lock(&LOCK_wsrep_rollback);
-}
+ server_threads.insert(thd);
-void wsrep_unlock_rollback()
-{
- mysql_cond_signal(&COND_wsrep_rollback);
- mysql_mutex_unlock(&LOCK_wsrep_rollback);
+ /* from bootstrap()... */
+ thd->bootstrap=1;
+ thd->max_client_packet_length= thd->net.max_packet;
+ thd->security_ctx->master_access= ~(ulong)0;
+
+ /* from handle_one_connection... */
+ pthread_detach_this_thread();
+
+ mysql_thread_set_psi_id(thd->thread_id);
+ thd->thr_create_utime= microsecond_interval_timer();
+ if (MYSQL_CALLBACK_ELSE(thread_scheduler, init_new_connection_thread, (), 0))
+ {
+ close_connection(thd, ER_OUT_OF_RESOURCES);
+ statistic_increment(aborted_connects,&LOCK_status);
+ MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0));
+ goto error;
+ }
+
+// </5.1.17>
+ /*
+ handle_one_connection() is normally the only way a thread would
+ start and would always be on the very high end of the stack ,
+ therefore, the thread stack always starts at the address of the
+ first local variable of handle_one_connection, which is thd. We
+ need to know the start of the stack so that we could check for
+ stack overruns.
+ */
+ DBUG_PRINT("wsrep", ("handle_one_connection called by thread %lld",
+ (long long)thd->thread_id));
+ /* now that we've called my_thread_init(), it is safe to call DBUG_* */
+
+ thd->thread_stack= (char*) &thd;
+ wsrep_assign_from_threadvars(thd);
+ if (wsrep_store_threadvars(thd))
+ {
+ close_connection(thd, ER_OUT_OF_RESOURCES);
+ statistic_increment(aborted_connects,&LOCK_status);
+ MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0));
+ delete thd;
+ delete thd_args;
+ goto error;
+ }
+
+ thd->system_thread= SYSTEM_THREAD_SLAVE_SQL;
+ thd->security_ctx->skip_grants();
+
+ /* handle_one_connection() again... */
+ thd->proc_info= 0;
+ thd->set_command(COM_SLEEP);
+ thd->init_for_queries();
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+
+ wsrep_running_threads++;
+
+ switch (thd_args->thread_type()) {
+ case WSREP_APPLIER_THREAD:
+ wsrep_running_applier_threads++;
+ break;
+ case WSREP_ROLLBACKER_THREAD:
+ wsrep_running_rollbacker_threads++;
+ break;
+ default:
+ WSREP_ERROR("Incorrect wsrep thread type: %d", thd_args->thread_type());
+ break;
+ }
+
+ mysql_cond_broadcast(&COND_wsrep_slave_threads);
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
+
+ WSREP_DEBUG("wsrep system thread %llu, %p starting",
+ thd->thread_id, thd);
+ thd_args->fun()(thd, static_cast<void *>(thd_args));
+
+ WSREP_DEBUG("wsrep system thread: %llu, %p closing",
+ thd->thread_id, thd);
+
+ /* Wsrep may reset globals during thread context switches, store globals
+ before cleanup. */
+ wsrep_store_threadvars(thd);
+
+ close_connection(thd, 0);
+
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+ DBUG_ASSERT(wsrep_running_threads > 0);
+ wsrep_running_threads--;
+
+ switch (thd_args->thread_type()) {
+ case WSREP_APPLIER_THREAD:
+ DBUG_ASSERT(wsrep_running_applier_threads > 0);
+ wsrep_running_applier_threads--;
+ break;
+ case WSREP_ROLLBACKER_THREAD:
+ DBUG_ASSERT(wsrep_running_rollbacker_threads > 0);
+ wsrep_running_rollbacker_threads--;
+ break;
+ default:
+ WSREP_ERROR("Incorrect wsrep thread type: %d", thd_args->thread_type());
+ break;
+ }
+
+ delete thd_args;
+ WSREP_DEBUG("wsrep running threads now: %lu", wsrep_running_threads);
+ mysql_cond_broadcast(&COND_wsrep_slave_threads);
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
+ /*
+ Note: We can't call THD destructor without crashing
+ if plugins have not been initialized. However, in most of the
+ cases this means that pre SE initialization SST failed and
+ we are going to exit anyway.
+ */
+ if (plugins_are_initialized)
+ {
+ net_end(&thd->net);
+ MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 1));
+ }
+ else
+ {
+ /*
+ TODO: lightweight cleanup to get rid of:
+ 'Error in my_thread_global_end(): 2 threads didn't exit'
+ at server shutdown
+ */
+ }
+
+ server_threads.erase(thd);
+ delete thd;
+ my_thread_end();
+ return(NULL);
+
+error:
+ WSREP_ERROR("Failed to create/initialize system thread");
+
+ /* Abort if its the first applier/rollbacker thread. */
+ if (!mysqld_server_initialized)
+ unireg_abort(1);
+ else
+ return NULL;
}
-my_bool wsrep_aborting_thd_contains(THD *thd)
+enum wsrep::streaming_context::fragment_unit wsrep_fragment_unit(ulong unit)
{
- mysql_mutex_assert_owner(&LOCK_wsrep_rollback);
- wsrep_aborting_thd_t abortees = wsrep_aborting_thd;
- while (abortees)
+ switch (unit)
{
- if (abortees->aborting_thd == thd)
- return true;
- abortees = abortees->next;
+ case WSREP_FRAG_BYTES: return wsrep::streaming_context::bytes;
+ case WSREP_FRAG_ROWS: return wsrep::streaming_context::row;
+ case WSREP_FRAG_STATEMENTS: return wsrep::streaming_context::statement;
+ default:
+ DBUG_ASSERT(0);
+ return wsrep::streaming_context::bytes;
}
- return false;
}
-void wsrep_aborting_thd_enqueue(THD *thd)
+bool THD::wsrep_parallel_slave_wait_for_prior_commit()
{
- mysql_mutex_assert_owner(&LOCK_wsrep_rollback);
- wsrep_aborting_thd_t aborting = (wsrep_aborting_thd_t)
- my_malloc(sizeof(struct wsrep_aborting_thd), MYF(0));
- aborting->aborting_thd = thd;
- aborting->next = wsrep_aborting_thd;
- wsrep_aborting_thd = aborting;
+ if (rgi_slave && rgi_slave->is_parallel_exec && wait_for_prior_commit())
+ {
+ return 1;
+ }
+ return 0;
}
-bool wsrep_node_is_donor()
+/***** callbacks for wsrep service ************/
+
+my_bool get_wsrep_recovery()
{
- return (WSREP_ON) ? (wsrep_config_state->get_status() == 2) : false;
+ return wsrep_recovery;
}
-bool wsrep_node_is_synced()
+bool wsrep_consistency_check(THD *thd)
{
- return (WSREP_ON) ? (wsrep_config_state->get_status() == 4) : false;
+ return thd->wsrep_consistency_check == CONSISTENCY_CHECK_RUNNING;
}
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h
index 39b6267299c..3fc0e397514 100644
--- a/sql/wsrep_mysqld.h
+++ b/sql/wsrep_mysqld.h
@@ -1,4 +1,4 @@
-/* Copyright 2008-2015 Codership Oy <http://www.codership.com>
+/* Copyright 2008-2021 Codership Oy <http://www.codership.com>
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
@@ -13,51 +13,36 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
-#include <wsrep.h>
-
#ifndef WSREP_MYSQLD_H
#define WSREP_MYSQLD_H
-#include <mysql/plugin.h>
-#include <mysql/service_wsrep.h>
+#include <wsrep.h>
#ifdef WITH_WSREP
+#include <mysql/plugin.h>
+#include "mysql/service_wsrep.h"
+
+#include <my_global.h>
+#include <my_pthread.h>
+#include "log.h"
+#include "mysqld.h"
+
typedef struct st_mysql_show_var SHOW_VAR;
#include <sql_priv.h>
-//#include "rpl_gtid.h"
-#include "../wsrep/wsrep_api.h"
#include "mdl.h"
-#include "mysqld.h"
#include "sql_table.h"
#include "wsrep_mysqld_c.h"
-#include <vector>
+
+#include "wsrep/provider.hpp"
+#include "wsrep/streaming_context.hpp"
+#include "wsrep_api.h"
#define WSREP_UNDEFINED_TRX_ID ULONGLONG_MAX
-class set_var;
class THD;
-enum wsrep_consistency_check_mode {
- NO_CONSISTENCY_CHECK,
- CONSISTENCY_CHECK_DECLARED,
- CONSISTENCY_CHECK_RUNNING,
-};
-
-struct wsrep_thd_shadow {
- ulonglong options;
- uint server_status;
- enum wsrep_exec_mode wsrep_exec_mode;
- Vio *vio;
- ulong tx_isolation;
- const char *db;
- size_t db_length;
- my_hrtime_t user_time;
- longlong row_count_func;
-};
-
// Global wsrep parameters
-extern wsrep_t* wsrep;
// MySQL wsrep options
extern const char* wsrep_provider;
@@ -71,24 +56,32 @@ extern const char* wsrep_data_home_dir;
extern const char* wsrep_dbug_option;
extern long wsrep_slave_threads;
extern int wsrep_slave_count_change;
+extern ulong wsrep_debug;
extern my_bool wsrep_convert_LOCK_to_trx;
extern ulong wsrep_retry_autocommit;
extern my_bool wsrep_auto_increment_control;
+extern my_bool wsrep_drupal_282555_workaround;
extern my_bool wsrep_incremental_data_collection;
extern const char* wsrep_start_position;
extern ulong wsrep_max_ws_size;
extern ulong wsrep_max_ws_rows;
extern const char* wsrep_notify_cmd;
-extern long wsrep_max_protocol_version;
-extern ulong wsrep_forced_binlog_format;
+extern my_bool wsrep_certify_nonPK;
+extern long int wsrep_protocol_version;
extern my_bool wsrep_desync;
extern ulong wsrep_reject_queries;
+extern my_bool wsrep_recovery;
extern my_bool wsrep_replicate_myisam;
+extern my_bool wsrep_log_conflicts;
extern ulong wsrep_mysql_replication_bundle;
+extern my_bool wsrep_load_data_splitting;
extern my_bool wsrep_restart_slave;
extern my_bool wsrep_restart_slave_activated;
extern my_bool wsrep_slave_FK_checks;
extern my_bool wsrep_slave_UK_checks;
+extern ulong wsrep_trx_fragment_unit;
+extern ulong wsrep_SR_store_type;
+extern uint wsrep_ignore_apply_errors;
extern ulong wsrep_running_threads;
extern ulong wsrep_running_applier_threads;
extern ulong wsrep_running_rollbacker_threads;
@@ -109,15 +102,34 @@ enum enum_wsrep_OSU_method {
};
enum enum_wsrep_sync_wait {
- WSREP_SYNC_WAIT_NONE = 0x0,
+ WSREP_SYNC_WAIT_NONE= 0x0,
// select, begin
- WSREP_SYNC_WAIT_BEFORE_READ = 0x1,
- WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE = 0x2,
- WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE = 0x4,
- WSREP_SYNC_WAIT_BEFORE_SHOW = 0x8,
- WSREP_SYNC_WAIT_MAX = 0xF
+ WSREP_SYNC_WAIT_BEFORE_READ= 0x1,
+ WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE= 0x2,
+ WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE= 0x4,
+ WSREP_SYNC_WAIT_BEFORE_SHOW= 0x8,
+ WSREP_SYNC_WAIT_MAX= 0xF
+};
+
+enum enum_wsrep_ignore_apply_error {
+ WSREP_IGNORE_ERRORS_NONE= 0x0,
+ WSREP_IGNORE_ERRORS_ON_RECONCILING_DDL= 0x1,
+ WSREP_IGNORE_ERRORS_ON_RECONCILING_DML= 0x2,
+ WSREP_IGNORE_ERRORS_ON_DDL= 0x4,
+ WSREP_IGNORE_ERRORS_MAX= 0x7
};
+// Streaming Replication
+#define WSREP_FRAG_BYTES 0
+#define WSREP_FRAG_ROWS 1
+#define WSREP_FRAG_STATEMENTS 2
+
+#define WSREP_SR_STORE_NONE 0
+#define WSREP_SR_STORE_TABLE 1
+
+extern const char *wsrep_fragment_units[];
+extern const char *wsrep_SR_store_types[];
+
// MySQL status variables
extern my_bool wsrep_connected;
extern my_bool wsrep_ready;
@@ -130,9 +142,19 @@ extern long long wsrep_local_bf_aborts;
extern const char* wsrep_provider_name;
extern const char* wsrep_provider_version;
extern const char* wsrep_provider_vendor;
+extern char* wsrep_provider_capabilities;
+extern char* wsrep_cluster_capabilities;
int wsrep_show_status(THD *thd, SHOW_VAR *var, void *buff,
system_status_var *status_var, enum_var_type scope);
+int wsrep_show_ready(THD *thd, SHOW_VAR *var, char *buff);
+void wsrep_free_status(THD *thd);
+void wsrep_update_cluster_state_uuid(const char* str);
+
+/* Filters out --wsrep-new-cluster oprtion from argv[]
+ * should be called in the very beginning of main() */
+void wsrep_filter_new_cluster (int* argc, char* argv[]);
+
int wsrep_init();
void wsrep_deinit(bool free_options);
@@ -148,19 +170,17 @@ bool wsrep_before_SE(); // initialize wsrep before storage
* @param before wsrep_before_SE() value */
void wsrep_init_startup(bool before);
+/* Recover streaming transactions from fragment storage */
+void wsrep_recover_sr_from_storage(THD *);
+
// Other wsrep global variables
extern my_bool wsrep_inited; // whether wsrep is initialized ?
-
-extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode);
-extern "C" void wsrep_thd_set_query_state(
- THD *thd, enum wsrep_query_state state);
-
-extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id);
-
+extern "C" void wsrep_fire_rollbacker(THD *thd);
extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd);
extern "C" time_t wsrep_thd_query_start(THD *thd);
-extern "C" query_id_t wsrep_thd_query_id(THD *thd);
+extern void wsrep_close_client_connections(my_bool wait_to_end,
+ THD *except_caller_thd= NULL);
extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd);
extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id);
@@ -168,77 +188,70 @@ extern int wsrep_wait_committing_connections_close(int wait_time);
extern void wsrep_close_applier(THD *thd);
extern void wsrep_wait_appliers_close(THD *thd);
extern void wsrep_close_applier_threads(int count);
-extern void wsrep_kill_mysql(THD *thd);
+
/* new defines */
extern void wsrep_stop_replication(THD *thd);
-extern bool wsrep_start_replication();
-extern bool wsrep_must_sync_wait(THD* thd, uint mask = WSREP_SYNC_WAIT_BEFORE_READ);
-extern bool wsrep_sync_wait(THD* thd, uint mask = WSREP_SYNC_WAIT_BEFORE_READ);
+extern bool wsrep_start_replication(const char *wsrep_cluster_address);
+extern void wsrep_shutdown_replication();
+extern bool wsrep_must_sync_wait (THD* thd, uint mask= WSREP_SYNC_WAIT_BEFORE_READ);
+extern bool wsrep_sync_wait (THD* thd, uint mask= WSREP_SYNC_WAIT_BEFORE_READ);
+extern bool wsrep_sync_wait (THD* thd, enum enum_sql_command command);
+extern enum wsrep::provider::status
+wsrep_sync_wait_upto (THD* thd, wsrep_gtid_t* upto, int timeout);
extern int wsrep_check_opts();
extern void wsrep_prepend_PATH (const char* path);
+extern bool wsrep_append_fk_parent_table(THD* thd, TABLE_LIST* table, wsrep::key_array* keys);
+extern bool wsrep_reload_ssl();
/* Other global variables */
extern wsrep_seqno_t wsrep_locked_seqno;
-#define WSREP_ON unlikely(global_system_variables.wsrep_on)
-
-#define WSREP(thd) \
- (WSREP_ON && thd->variables.wsrep_on)
-
-#define WSREP_CLIENT(thd) \
- (WSREP(thd) && thd->wsrep_client_thread)
-
-#define WSREP_EMULATE_BINLOG(thd) \
- (WSREP(thd) && wsrep_emulate_bin_log)
-
-#define WSREP_FORMAT(my_format) \
- ((wsrep_forced_binlog_format != BINLOG_FORMAT_UNSPEC) \
- ? wsrep_forced_binlog_format : (ulong)(my_format))
-
-// prefix all messages with "WSREP"
-void wsrep_log(void (*fun)(const char *, ...), const char *format, ...);
-#define WSREP_LOG(fun, ...) wsrep_log(fun, ## __VA_ARGS__)
-#define WSREP_LOG_CONFLICT_THD(thd, role) \
- WSREP_LOG(sql_print_information, \
- "%s: \n " \
- " THD: %lu, mode: %s, state: %s, conflict: %s, seqno: %lld\n " \
- " SQL: %s", \
- role, thd_get_thread_id(thd), wsrep_thd_exec_mode_str(thd), \
- wsrep_thd_query_state_str(thd), \
- wsrep_thd_conflict_state_str(thd), (long long)wsrep_thd_trx_seqno(thd), \
- wsrep_thd_query(thd) \
- );
-
-#define WSREP_LOG_CONFLICT(bf_thd, victim_thd, bf_abort) \
- if (wsrep_debug || wsrep_log_conflicts) \
- { \
- WSREP_LOG(sql_print_information, "cluster conflict due to %s for threads:",\
- (bf_abort) ? "high priority abort" : "certification failure" \
- ); \
- if (bf_thd != NULL) WSREP_LOG_CONFLICT_THD(bf_thd, "Winning thread"); \
- if (victim_thd) WSREP_LOG_CONFLICT_THD(victim_thd, "Victim thread"); \
- }
-
-#define WSREP_PROVIDER_EXISTS \
- (wsrep_provider && strncasecmp(wsrep_provider, WSREP_NONE, FN_REFLEN))
-
-#define WSREP_QUERY(thd) (thd->query())
+/* A wrapper function for MySQL log functions. The call will prefix
+ the log message with WSREP and forward the result buffer to fun. */
+void WSREP_LOG(void (*fun)(const char* fmt, ...), const char* fmt, ...);
-extern my_bool wsrep_ready_get();
-extern void wsrep_ready_wait();
+#define WSREP_SYNC_WAIT(thd_, before_) \
+ { if (WSREP_CLIENT(thd_) && \
+ wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
+
+#define WSREP_MYSQL_DB (char *)"mysql"
+
+#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
+ if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
+ goto wsrep_error_label;
-class Ha_trx_info;
-struct THD_TRANS;
-void wsrep_register_hton(THD* thd, bool all);
-void wsrep_brute_force_killer(THD *thd);
-int wsrep_hire_brute_force_killer(THD *thd, uint64_t trx_id);
+#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, fk_tables_) \
+ if (WSREP(thd) && wsrep_thd_is_local(thd) && \
+ wsrep_to_isolation_begin(thd, db_, table_, \
+ table_list_, alter_info_, fk_tables_))
-/* this is visible for client build so that innodb plugin gets this */
-typedef struct wsrep_aborting_thd {
- struct wsrep_aborting_thd *next;
- THD *aborting_thd;
-} *wsrep_aborting_thd_t;
+#define WSREP_TO_ISOLATION_END \
+ if ((WSREP(thd) && wsrep_thd_is_local_toi(thd)) || \
+ wsrep_thd_is_in_rsu(thd)) \
+ wsrep_to_isolation_end(thd);
+
+/*
+ Checks if lex->no_write_to_binlog is set for statements that use LOCAL or
+ NO_WRITE_TO_BINLOG.
+*/
+#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \
+ if (WSREP(thd) && !thd->lex->no_write_to_binlog \
+ && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
+ goto wsrep_error_label;
+
+
+#define WSREP_PROVIDER_EXISTS (WSREP_PROVIDER_EXISTS_)
+
+static inline bool wsrep_cluster_address_exists()
+{
+ if (mysqld_server_started)
+ mysql_mutex_assert_owner(&LOCK_global_system_variables);
+ return wsrep_cluster_address && wsrep_cluster_address[0];
+}
+
+extern my_bool wsrep_ready_get();
+extern void wsrep_ready_wait();
extern mysql_mutex_t LOCK_wsrep_ready;
extern mysql_cond_t COND_wsrep_ready;
@@ -246,24 +259,32 @@ extern mysql_mutex_t LOCK_wsrep_sst;
extern mysql_cond_t COND_wsrep_sst;
extern mysql_mutex_t LOCK_wsrep_sst_init;
extern mysql_cond_t COND_wsrep_sst_init;
-extern mysql_mutex_t LOCK_wsrep_rollback;
-extern mysql_cond_t COND_wsrep_rollback;
extern int wsrep_replaying;
extern mysql_mutex_t LOCK_wsrep_replaying;
extern mysql_cond_t COND_wsrep_replaying;
extern mysql_mutex_t LOCK_wsrep_slave_threads;
+extern mysql_cond_t COND_wsrep_slave_threads;
+extern mysql_mutex_t LOCK_wsrep_cluster_config;
extern mysql_mutex_t LOCK_wsrep_desync;
+extern mysql_mutex_t LOCK_wsrep_SR_pool;
+extern mysql_mutex_t LOCK_wsrep_SR_store;
extern mysql_mutex_t LOCK_wsrep_config_state;
-extern wsrep_aborting_thd_t wsrep_aborting_thd;
-extern my_bool wsrep_emulate_bin_log;
+extern mysql_mutex_t LOCK_wsrep_group_commit;
+extern mysql_mutex_t LOCK_wsrep_joiner_monitor;
+extern mysql_mutex_t LOCK_wsrep_donor_monitor;
+extern mysql_cond_t COND_wsrep_joiner_monitor;
+extern mysql_cond_t COND_wsrep_donor_monitor;
+
extern int wsrep_to_isolation;
#ifdef GTID_SUPPORT
extern rpl_sidno wsrep_sidno;
#endif /* GTID_SUPPORT */
extern my_bool wsrep_preordered_opt;
-extern handlerton *wsrep_hton;
#ifdef HAVE_PSI_INTERFACE
+
+extern PSI_cond_key key_COND_wsrep_thd;
+
extern PSI_mutex_key key_LOCK_wsrep_ready;
extern PSI_mutex_key key_COND_wsrep_ready;
extern PSI_mutex_key key_LOCK_wsrep_sst;
@@ -272,12 +293,19 @@ extern PSI_mutex_key key_LOCK_wsrep_sst_init;
extern PSI_cond_key key_COND_wsrep_sst_init;
extern PSI_mutex_key key_LOCK_wsrep_sst_thread;
extern PSI_cond_key key_COND_wsrep_sst_thread;
-extern PSI_mutex_key key_LOCK_wsrep_rollback;
-extern PSI_cond_key key_COND_wsrep_rollback;
extern PSI_mutex_key key_LOCK_wsrep_replaying;
extern PSI_cond_key key_COND_wsrep_replaying;
extern PSI_mutex_key key_LOCK_wsrep_slave_threads;
+extern PSI_cond_key key_COND_wsrep_slave_threads;
+extern PSI_mutex_key key_LOCK_wsrep_cluster_config;
extern PSI_mutex_key key_LOCK_wsrep_desync;
+extern PSI_mutex_key key_LOCK_wsrep_SR_pool;
+extern PSI_mutex_key key_LOCK_wsrep_SR_store;
+extern PSI_mutex_key key_LOCK_wsrep_global_seqno;
+extern PSI_mutex_key key_LOCK_wsrep_thd_queue;
+extern PSI_cond_key key_COND_wsrep_thd_queue;
+extern PSI_mutex_key key_LOCK_wsrep_joiner_monitor;
+extern PSI_mutex_key key_LOCK_wsrep_donor_monitor;
extern PSI_file_key key_file_wsrep_gra_log;
@@ -285,6 +313,8 @@ extern PSI_thread_key key_wsrep_sst_joiner;
extern PSI_thread_key key_wsrep_sst_donor;
extern PSI_thread_key key_wsrep_rollbacker;
extern PSI_thread_key key_wsrep_applier;
+extern PSI_thread_key key_wsrep_sst_joiner_monitor;
+extern PSI_thread_key key_wsrep_sst_donor_monitor;
#endif /* HAVE_PSI_INTERFACE */
@@ -292,100 +322,148 @@ struct TABLE_LIST;
class Alter_info;
int wsrep_to_isolation_begin(THD *thd, const char *db_, const char *table_,
const TABLE_LIST* table_list,
- Alter_info* alter_info = NULL);
+ Alter_info* alter_info= NULL, wsrep::key_array *fk_tables=NULL);
+
void wsrep_to_isolation_end(THD *thd);
-void wsrep_cleanup_transaction(THD *thd);
+
+bool wsrep_append_SR_keys(THD *thd);
int wsrep_to_buf_helper(
THD* thd, const char *query, uint query_len, uchar** buf, size_t* buf_len);
+int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len);
int wsrep_create_event_query(THD *thd, uchar** buf, size_t* buf_len);
-extern bool
-wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
+void wsrep_init_sidno(const wsrep_uuid_t&);
+bool wsrep_node_is_donor();
+bool wsrep_node_is_synced();
+
+void wsrep_init_SR();
+void wsrep_verify_SE_checkpoint(const wsrep_uuid_t& uuid, wsrep_seqno_t seqno);
+int wsrep_replay_from_SR_store(THD*, const wsrep_trx_meta_t&);
+
+class Log_event;
+int wsrep_ignored_error_code(Log_event* ev, int error);
+int wsrep_must_ignore_error(THD* thd);
+
+bool wsrep_replicate_GTID(THD* thd);
+
+typedef struct wsrep_key_arr
+{
+ wsrep_key_t* keys;
+ size_t keys_len;
+} wsrep_key_arr_t;
+bool wsrep_prepare_keys_for_isolation(THD* thd,
+ const char* db,
+ const char* table,
+ const TABLE_LIST* table_list,
+ wsrep_key_arr_t* ka);
+void wsrep_keys_free(wsrep_key_arr_t* key_arr);
+
+extern void
+wsrep_handle_mdl_conflict(MDL_context *requestor_ctx,
MDL_ticket *ticket,
const MDL_key *key);
-IO_CACHE * get_trans_log(THD * thd);
-bool wsrep_trans_cache_is_empty(THD *thd);
-void thd_binlog_flush_pending_rows_event(THD *thd, bool stmt_end);
-void thd_binlog_rollback_stmt(THD * thd);
-void thd_binlog_trx_reset(THD * thd);
enum wsrep_thread_type {
WSREP_APPLIER_THREAD=1,
WSREP_ROLLBACKER_THREAD=2
};
-typedef void (*wsrep_thd_processor_fun)(THD *);
-
-typedef struct {
- pthread_t thread_id;
- wsrep_thd_processor_fun processor;
- enum wsrep_thread_type thread_type;
-} wsrep_thread_args;
+typedef void (*wsrep_thd_processor_fun)(THD*, void *);
+class Wsrep_thd_args
+{
+ public:
+ Wsrep_thd_args(wsrep_thd_processor_fun fun,
+ wsrep_thread_type thread_type,
+ pthread_t thread_id)
+ :
+ fun_ (fun),
+ thread_type_ (thread_type),
+ thread_id_ (thread_id)
+ { }
+
+ wsrep_thd_processor_fun fun() { return fun_; }
+ pthread_t* thread_id() {return &thread_id_; }
+ enum wsrep_thread_type thread_type() {return thread_type_;}
+
+ private:
+
+ Wsrep_thd_args(const Wsrep_thd_args&);
+ Wsrep_thd_args& operator=(const Wsrep_thd_args&);
+
+ wsrep_thd_processor_fun fun_;
+ enum wsrep_thread_type thread_type_;
+ pthread_t thread_id_;
+};
-extern std::vector<wsrep_thread_args*> wsrep_thread_arg;
+void* start_wsrep_THD(void*);
-pthread_handler_t start_wsrep_THD(void *arg);
-int wsrep_wait_committing_connections_close(int wait_time);
-extern void wsrep_close_client_connections(my_bool wait_to_end,
- THD *except_caller_thd = NULL);
-void wsrep_close_applier(THD *thd);
-void wsrep_close_applier_threads(int count);
-void wsrep_wait_appliers_close(THD *thd);
-void wsrep_kill_mysql(THD *thd);
void wsrep_close_threads(THD *thd);
-void wsrep_copy_query(THD *thd);
bool wsrep_is_show_query(enum enum_sql_command command);
void wsrep_replay_transaction(THD *thd);
bool wsrep_create_like_table(THD* thd, TABLE_LIST* table,
TABLE_LIST* src_table,
- HA_CREATE_INFO *create_info);
+ HA_CREATE_INFO *create_info);
bool wsrep_node_is_donor();
bool wsrep_node_is_synced();
-typedef struct wsrep_key_arr
-{
- wsrep_key_t* keys;
- size_t keys_len;
-} wsrep_key_arr_t;
-bool wsrep_prepare_keys_for_isolation(THD* thd,
- const char* db,
- const char* table,
- const TABLE_LIST* table_list,
- wsrep_key_arr_t* ka);
-void wsrep_keys_free(wsrep_key_arr_t* key_arr);
-
-#define WSREP_BINLOG_FORMAT(my_format) \
- ((wsrep_forced_binlog_format != BINLOG_FORMAT_UNSPEC) ? \
- wsrep_forced_binlog_format : my_format)
-
-#else /* WITH_WSREP */
+/**
+ * Check if the wsrep provider (ie the Galera library) is capable of
+ * doing streaming replication.
+ * @return true if SR capable
+ */
+bool wsrep_provider_is_SR_capable();
+
+/**
+ * Initialize WSREP server instance.
+ *
+ * @return Zero on success, non-zero on error.
+ */
+int wsrep_init_server();
+
+/**
+ * Initialize WSREP globals. This should be done after server initialization
+ * is complete and the server has joined to the cluster.
+ *
+ */
+void wsrep_init_globals();
+
+/**
+ * Deinit and release WSREP resources.
+ */
+void wsrep_deinit_server();
+
+/**
+ * Convert streaming fragment unit (WSREP_FRAG_BYTES, WSREP_FRAG_ROWS...)
+ * to corresponding wsrep-lib fragment_unit
+ */
+enum wsrep::streaming_context::fragment_unit wsrep_fragment_unit(ulong unit);
+
+wsrep::key wsrep_prepare_key_for_toi(const char* db, const char* table,
+ enum wsrep::key::type type);
+
+#else /* !WITH_WSREP */
+
+/* These macros are needed to compile MariaDB without WSREP support
+ * (e.g. embedded) */
-#define WSREP(T) (0)
-#define WSREP_ON (0)
-#define WSREP_EMULATE_BINLOG(thd) (0)
-#define WSREP_CLIENT(thd) (0)
-#define WSREP_FORMAT(my_format) ((ulong)my_format)
#define WSREP_PROVIDER_EXISTS (0)
#define wsrep_emulate_bin_log (0)
#define wsrep_to_isolation (0)
-#define wsrep_init() (1)
-#define wsrep_prepend_PATH(X)
#define wsrep_before_SE() (0)
#define wsrep_init_startup(X)
-#define wsrep_must_sync_wait(...) (0)
-#define wsrep_sync_wait(...) (0)
-#define wsrep_to_isolation_begin(...) (0)
-#define wsrep_register_hton(...) do { } while(0)
#define wsrep_check_opts() (0)
-#define wsrep_stop_replication(X) do { } while(0)
-#define wsrep_inited (0)
-#define wsrep_deinit(X) do { } while(0)
-#define wsrep_recover() do { } while(0)
-#define wsrep_slave_threads (1)
-#define wsrep_replicate_myisam (0)
#define wsrep_thr_init() do {} while(0)
#define wsrep_thr_deinit() do {} while(0)
-#define wsrep_running_threads (0)
-#define WSREP_BINLOG_FORMAT(my_format) my_format
+#define wsrep_init_globals() do {} while(0)
+#define wsrep_create_appliers(X) do {} while(0)
+#define wsrep_cluster_address_exists() (false)
+#define WSREP_MYSQL_DB (0)
+#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) do { } while(0)
+#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, fk_tables_)
+#define WSREP_TO_ISOLATION_END
+#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
+#define WSREP_SYNC_WAIT(thd_, before_)
+
#endif /* WITH_WSREP */
+
#endif /* WSREP_MYSQLD_H */
diff --git a/sql/wsrep_notify.cc b/sql/wsrep_notify.cc
index ae85e4e7092..d2d08e92ae7 100644
--- a/sql/wsrep_notify.cc
+++ b/sql/wsrep_notify.cc
@@ -18,22 +18,8 @@
#include "wsrep_priv.h"
#include "wsrep_utils.h"
-
-static const char* _status_str(wsrep_member_status_t status)
-{
- switch (status)
- {
- case WSREP_MEMBER_UNDEFINED: return "Undefined";
- case WSREP_MEMBER_JOINER: return "Joiner";
- case WSREP_MEMBER_DONOR: return "Donor";
- case WSREP_MEMBER_JOINED: return "Joined";
- case WSREP_MEMBER_SYNCED: return "Synced";
- default: return "Error(?)";
- }
-}
-
-void wsrep_notify_status (wsrep_member_status_t status,
- const wsrep_view_info_t* view)
+void wsrep_notify_status(enum wsrep::server_state::state status,
+ const wsrep::view* view)
{
if (!wsrep_notify_cmd || 0 == strlen(wsrep_notify_cmd))
{
@@ -51,44 +37,37 @@ void wsrep_notify_status (wsrep_member_status_t status,
cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, "%s",
wsrep_notify_cmd);
- if (status >= WSREP_MEMBER_UNDEFINED && status < WSREP_MEMBER_ERROR)
- {
- cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, " --status %s",
- _status_str(status));
- }
- else
- {
- /* here we preserve provider error codes */
- cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off,
- " --status 'Error(%d)'", status);
- }
+ cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, " --status %s",
+ to_c_string(status));
- if (0 != view)
+ if (view != NULL)
{
- char uuid_str[40];
-
- wsrep_uuid_print (&view->state_id.uuid, uuid_str, sizeof(uuid_str));
+ std::ostringstream uuid;
+ uuid << view->state_id().id();
cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off,
- " --uuid %s", uuid_str);
+ " --uuid %s", uuid.str().c_str());
cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off,
- " --primary %s", view->view >= 0 ? "yes" : "no");
+ " --primary %s", view->view_seqno().get() >= 0 ? "yes" : "no");
cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off,
- " --index %d", view->my_idx);
+ " --index %zd", view->own_index());
- if (view->memb_num)
+ const std::vector<wsrep::view::member>& members(view->members());
+ if (members.size())
{
- cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, " --members");
-
- for (int i = 0; i < view->memb_num; i++)
- {
- wsrep_uuid_print (&view->members[i].id, uuid_str, sizeof(uuid_str));
- cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off,
- "%c%s/%s/%s", i > 0 ? ',' : ' ',
- uuid_str, view->members[i].name,
- view->members[i].incoming);
- }
+ cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, " --members");
+
+ for (unsigned int i= 0; i < members.size(); i++)
+ {
+ std::ostringstream id;
+ id << members[i].id();
+ cmd_off += snprintf(cmd_ptr + cmd_off, cmd_len - cmd_off,
+ "%c%s/%s/%s", i > 0 ? ',' : ' ',
+ id.str().c_str(),
+ members[i].name().c_str(),
+ members[i].incoming().c_str());
+ }
}
}
@@ -103,7 +82,7 @@ void wsrep_notify_status (wsrep_member_status_t status,
wsp::process p(cmd_ptr, "r", NULL);
p.wait();
- int err = p.error();
+ int err= p.error();
if (err)
{
diff --git a/sql/wsrep_on.h b/sql/wsrep_on.h
new file mode 100644
index 00000000000..f85fe3d5d0d
--- /dev/null
+++ b/sql/wsrep_on.h
@@ -0,0 +1,63 @@
+/* Copyright 2022 Codership Oy <http://www.codership.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+#ifndef WSREP_ON_H
+#define WSREP_ON_H
+
+#ifdef WITH_WSREP
+
+extern bool WSREP_ON_;
+extern bool WSREP_PROVIDER_EXISTS_;
+extern my_bool wsrep_emulate_bin_log;
+extern ulong wsrep_forced_binlog_format;
+
+#define WSREP_ON unlikely(WSREP_ON_)
+
+/* use xxxxxx_NNULL macros when thd pointer is guaranteed to be non-null to
+ * avoid compiler warnings (GCC 6 and later) */
+
+#define WSREP_NNULL(thd) \
+ (WSREP_PROVIDER_EXISTS_ && thd->variables.wsrep_on)
+
+#define WSREP(thd) \
+ (thd && WSREP_NNULL(thd))
+
+#define WSREP_CLIENT_NNULL(thd) \
+ (WSREP_NNULL(thd) && thd->wsrep_client_thread)
+
+#define WSREP_CLIENT(thd) \
+ (WSREP(thd) && thd->wsrep_client_thread)
+
+#define WSREP_EMULATE_BINLOG_NNULL(thd) \
+ (WSREP_NNULL(thd) && wsrep_emulate_bin_log)
+
+#define WSREP_EMULATE_BINLOG(thd) \
+ (WSREP(thd) && wsrep_emulate_bin_log)
+
+#define WSREP_BINLOG_FORMAT(my_format) \
+ ((wsrep_forced_binlog_format != BINLOG_FORMAT_UNSPEC) ? \
+ wsrep_forced_binlog_format : my_format)
+
+#else
+
+#define WSREP_ON false
+#define WSREP(T) (0)
+#define WSREP_NNULL(T) (0)
+#define WSREP_EMULATE_BINLOG(thd) (0)
+#define WSREP_EMULATE_BINLOG_NNULL(thd) (0)
+#define WSREP_BINLOG_FORMAT(my_format) ((ulong)my_format)
+
+#endif
+#endif
diff --git a/sql/wsrep_plugin.cc b/sql/wsrep_plugin.cc
new file mode 100644
index 00000000000..743b8a593b8
--- /dev/null
+++ b/sql/wsrep_plugin.cc
@@ -0,0 +1,53 @@
+/* Copyright 2016 Codership Oy <http://www.codership.com>
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include "wsrep_trans_observer.h"
+#include "wsrep_mysqld.h"
+
+#include <mysql/plugin.h>
+
+static int wsrep_plugin_init(void *p)
+{
+ WSREP_DEBUG("wsrep_plugin_init()");
+ return 0;
+}
+
+static int wsrep_plugin_deinit(void *p)
+{
+ WSREP_DEBUG("wsrep_plugin_deinit()");
+ return 0;
+}
+
+struct Mysql_replication wsrep_plugin= {
+ MYSQL_REPLICATION_INTERFACE_VERSION
+};
+
+maria_declare_plugin(wsrep)
+{
+ MYSQL_REPLICATION_PLUGIN,
+ &wsrep_plugin,
+ "wsrep",
+ "Codership Oy",
+ "Wsrep replication plugin",
+ PLUGIN_LICENSE_GPL,
+ wsrep_plugin_init,
+ wsrep_plugin_deinit,
+ 0x0100,
+ NULL, /* Status variables */
+ NULL, /* System variables */
+ "1.0", /* Version (string) */
+ MariaDB_PLUGIN_MATURITY_STABLE /* Maturity */
+}
+maria_declare_plugin_end;
diff --git a/sql/wsrep_priv.h b/sql/wsrep_priv.h
index e84ecfc5e2c..e88d3c862a0 100644
--- a/sql/wsrep_priv.h
+++ b/sql/wsrep_priv.h
@@ -19,37 +19,27 @@
#ifndef WSREP_PRIV_H
#define WSREP_PRIV_H
-#include "wsrep_mysqld.h"
-#include "../wsrep/wsrep_api.h"
-
-#include <log.h>
-#include <pthread.h>
-#include <cstdio>
+#include "wsrep_api.h"
+#include "wsrep/server_state.hpp"
my_bool wsrep_ready_set (my_bool x);
ssize_t wsrep_sst_prepare (void** msg);
wsrep_cb_status wsrep_sst_donate_cb (void* app_ctx,
void* recv_ctx,
- const void* msg, size_t msg_len,
+ const wsrep_buf_t* msg,
const wsrep_gtid_t* state_id,
- const char* state, size_t state_len,
+ const wsrep_buf_t* state,
bool bypass);
extern wsrep_uuid_t local_uuid;
extern wsrep_seqno_t local_seqno;
// a helper function
-bool wsrep_sst_received (wsrep_t* const wsrep,
- const wsrep_uuid_t& uuid,
- const wsrep_seqno_t seqno,
- const void* const state,
- const size_t state_len,
- const bool implicit);
-/*! SST thread signals init thread about sst completion */
-void wsrep_sst_complete(const wsrep_uuid_t*, wsrep_seqno_t, bool);
-
-void wsrep_notify_status (wsrep_member_status_t new_status,
- const wsrep_view_info_t* view = 0);
+bool wsrep_sst_received(THD*, const wsrep_uuid_t&, wsrep_seqno_t,
+ const void*, size_t);
+
+void wsrep_notify_status(enum wsrep::server_state::state status,
+ const wsrep::view* view= 0);
#endif /* WSREP_PRIV_H */
diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc
new file mode 100644
index 00000000000..7a49aef43b3
--- /dev/null
+++ b/sql/wsrep_schema.cc
@@ -0,0 +1,1466 @@
+/* Copyright (C) 2015-2021 Codership Oy <info@codership.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
+
+#include "mariadb.h"
+
+#include "table.h"
+#include "key.h"
+#include "sql_base.h"
+#include "sql_parse.h"
+#include "sql_update.h"
+#include "transaction.h"
+
+#include "mysql/service_wsrep.h"
+#include "wsrep_schema.h"
+#include "wsrep_applier.h"
+#include "wsrep_xid.h"
+#include "wsrep_binlog.h"
+#include "wsrep_high_priority_service.h"
+#include "wsrep_storage_service.h"
+#include "wsrep_thd.h"
+#include "wsrep_server_state.h"
+
+#include <string>
+#include <sstream>
+
+#define WSREP_SCHEMA "mysql"
+#define WSREP_STREAMING_TABLE "wsrep_streaming_log"
+#define WSREP_CLUSTER_TABLE "wsrep_cluster"
+#define WSREP_MEMBERS_TABLE "wsrep_cluster_members"
+
+const char* wsrep_sr_table_name_full= WSREP_SCHEMA "/" WSREP_STREAMING_TABLE;
+
+static const std::string wsrep_schema_str= WSREP_SCHEMA;
+static const std::string sr_table_str= WSREP_STREAMING_TABLE;
+static const std::string cluster_table_str= WSREP_CLUSTER_TABLE;
+static const std::string members_table_str= WSREP_MEMBERS_TABLE;
+
+static const std::string create_cluster_table_str=
+ "CREATE TABLE IF NOT EXISTS " + wsrep_schema_str + "." + cluster_table_str +
+ "("
+ "cluster_uuid CHAR(36) PRIMARY KEY,"
+ "view_id BIGINT NOT NULL,"
+ "view_seqno BIGINT NOT NULL,"
+ "protocol_version INT NOT NULL,"
+ "capabilities INT NOT NULL"
+ ") ENGINE=InnoDB STATS_PERSISTENT=0";
+
+static const std::string create_members_table_str=
+ "CREATE TABLE IF NOT EXISTS " + wsrep_schema_str + "." + members_table_str +
+ "("
+ "node_uuid CHAR(36) PRIMARY KEY,"
+ "cluster_uuid CHAR(36) NOT NULL,"
+ "node_name CHAR(32) NOT NULL,"
+ "node_incoming_address VARCHAR(256) NOT NULL"
+ ") ENGINE=InnoDB STATS_PERSISTENT=0";
+
+#ifdef WSREP_SCHEMA_MEMBERS_HISTORY
+static const std::string cluster_member_history_table_str= "wsrep_cluster_member_history";
+static const std::string create_members_history_table_str=
+ "CREATE TABLE IF NOT EXISTS " + wsrep_schema_str + "." + cluster_member_history_table_str +
+ "("
+ "node_uuid CHAR(36) PRIMARY KEY,"
+ "cluster_uuid CHAR(36) NOT NULL,"
+ "last_view_id BIGINT NOT NULL,"
+ "last_view_seqno BIGINT NOT NULL,"
+ "node_name CHAR(32) NOT NULL,"
+ "node_incoming_address VARCHAR(256) NOT NULL"
+ ") ENGINE=InnoDB STATS_PERSISTENT=0";
+#endif /* WSREP_SCHEMA_MEMBERS_HISTORY */
+
+static const std::string create_frag_table_str=
+ "CREATE TABLE IF NOT EXISTS " + wsrep_schema_str + "." + sr_table_str +
+ "("
+ "node_uuid CHAR(36), "
+ "trx_id BIGINT, "
+ "seqno BIGINT, "
+ "flags INT NOT NULL, "
+ "frag LONGBLOB NOT NULL, "
+ "PRIMARY KEY (node_uuid, trx_id, seqno)"
+ ") ENGINE=InnoDB STATS_PERSISTENT=0";
+
+static const std::string delete_from_cluster_table=
+ "DELETE FROM " + wsrep_schema_str + "." + cluster_table_str;
+
+static const std::string delete_from_members_table=
+ "DELETE FROM " + wsrep_schema_str + "." + members_table_str;
+
+/* For rolling upgrade we need to use ALTER. We do not want
+persistent statistics to be collected from these tables. */
+static const std::string alter_cluster_table=
+ "ALTER TABLE " + wsrep_schema_str + "." + cluster_table_str +
+ " STATS_PERSISTENT=0";
+
+static const std::string alter_members_table=
+ "ALTER TABLE " + wsrep_schema_str + "." + members_table_str +
+ " STATS_PERSISTENT=0";
+
+#ifdef WSREP_SCHEMA_MEMBERS_HISTORY
+static const std::string alter_members_history_table=
+ "ALTER TABLE " + wsrep_schema_str + "." + members_history_table_str +
+ " STATS_PERSISTENT=0";
+#endif
+
+static const std::string alter_frag_table=
+ "ALTER TABLE " + wsrep_schema_str + "." + sr_table_str +
+ " STATS_PERSISTENT=0";
+
+namespace Wsrep_schema_impl
+{
+
+class binlog_off
+{
+public:
+ binlog_off(THD* thd)
+ : m_thd(thd)
+ , m_option_bits(thd->variables.option_bits)
+ , m_sql_log_bin(thd->variables.sql_log_bin)
+ {
+ thd->variables.option_bits&= ~OPTION_BIN_LOG;
+ thd->variables.sql_log_bin= 0;
+ }
+ ~binlog_off()
+ {
+ m_thd->variables.option_bits= m_option_bits;
+ m_thd->variables.sql_log_bin= m_sql_log_bin;
+ }
+private:
+ THD* m_thd;
+ ulonglong m_option_bits;
+ my_bool m_sql_log_bin;
+};
+
+class wsrep_off
+{
+public:
+ wsrep_off(THD* thd)
+ : m_thd(thd)
+ , m_wsrep_on(thd->variables.wsrep_on)
+ {
+ thd->variables.wsrep_on= 0;
+ }
+ ~wsrep_off()
+ {
+ m_thd->variables.wsrep_on= m_wsrep_on;
+ }
+private:
+ THD* m_thd;
+ my_bool m_wsrep_on;
+};
+
+class thd_context_switch
+{
+public:
+ thd_context_switch(THD *orig_thd, THD *cur_thd)
+ : m_orig_thd(orig_thd)
+ , m_cur_thd(cur_thd)
+ {
+ wsrep_reset_threadvars(m_orig_thd);
+ wsrep_store_threadvars(m_cur_thd);
+ }
+ ~thd_context_switch()
+ {
+ wsrep_reset_threadvars(m_cur_thd);
+ wsrep_store_threadvars(m_orig_thd);
+ }
+private:
+ THD *m_orig_thd;
+ THD *m_cur_thd;
+};
+
+class sql_safe_updates
+{
+public:
+ sql_safe_updates(THD* thd)
+ : m_thd(thd)
+ , m_option_bits(thd->variables.option_bits)
+ {
+ thd->variables.option_bits&= ~OPTION_SAFE_UPDATES;
+ }
+ ~sql_safe_updates()
+ {
+ m_thd->variables.option_bits= m_option_bits;
+ }
+private:
+ THD* m_thd;
+ ulonglong m_option_bits;
+};
+
+static int execute_SQL(THD* thd, const char* sql, uint length) {
+ DBUG_ENTER("Wsrep_schema::execute_SQL()");
+ int err= 0;
+
+ PSI_statement_locker *parent_locker= thd->m_statement_psi;
+ Parser_state parser_state;
+
+ WSREP_DEBUG("SQL: %d %s thd: %lld", length, sql, (long long)thd->thread_id);
+
+ if (parser_state.init(thd, (char*)sql, length) == 0) {
+ thd->reset_for_next_command();
+ lex_start(thd);
+
+ thd->m_statement_psi= NULL;
+
+ thd->set_query((char*)sql, length);
+ thd->set_query_id(next_query_id());
+
+ mysql_parse(thd, (char*)sql, length, & parser_state, FALSE, FALSE);
+
+ if (thd->is_error()) {
+ WSREP_WARN("Wsrep_schema::execute_sql() failed, %d %s\nSQL: %s",
+ thd->get_stmt_da()->sql_errno(),
+ thd->get_stmt_da()->message(),
+ sql);
+ err= 1;
+ }
+ thd->m_statement_psi= parent_locker;
+ thd->end_statement();
+ thd->reset_query();
+ close_thread_tables(thd);
+ delete_explain_query(thd->lex);
+ }
+ else {
+ WSREP_WARN("SR init failure");
+ }
+ thd->cleanup_after_query();
+ DBUG_RETURN(err);
+}
+
+/*
+ Initialize thd for next "statement"
+ */
+static void init_stmt(THD* thd) {
+ thd->reset_for_next_command();
+}
+
+static void finish_stmt(THD* thd) {
+ trans_commit_stmt(thd);
+ close_thread_tables(thd);
+}
+
+static int open_table(THD* thd,
+ const LEX_CSTRING *schema_name,
+ const LEX_CSTRING *table_name,
+ enum thr_lock_type const lock_type,
+ TABLE** table) {
+ assert(table);
+ *table= NULL;
+
+ DBUG_ENTER("Wsrep_schema::open_table()");
+
+ TABLE_LIST tables;
+ uint flags= (MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK |
+ MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY |
+ MYSQL_OPEN_IGNORE_FLUSH |
+ MYSQL_LOCK_IGNORE_TIMEOUT);
+
+ tables.init_one_table(schema_name,
+ table_name,
+ NULL, lock_type);
+ thd->lex->query_tables_own_last= 0;
+
+ if (!open_n_lock_single_table(thd, &tables, tables.lock_type, flags)) {
+ close_thread_tables(thd);
+ DBUG_RETURN(1);
+ }
+
+ *table= tables.table;
+ (*table)->use_all_columns();
+
+ DBUG_RETURN(0);
+}
+
+
+static int open_for_write(THD* thd, const char* table_name, TABLE** table) {
+ LEX_CSTRING schema_str= { wsrep_schema_str.c_str(), wsrep_schema_str.length() };
+ LEX_CSTRING table_str= { table_name, strlen(table_name) };
+ if (Wsrep_schema_impl::open_table(thd, &schema_str, &table_str, TL_WRITE,
+ table)) {
+ // No need to log an error if the query was bf aborted,
+ // thd client will get ER_LOCK_DEADLOCK in the end.
+ const bool interrupted= thd->killed ||
+ (thd->is_error() &&
+ (thd->get_stmt_da()->sql_errno() == ER_QUERY_INTERRUPTED));
+ if (!interrupted) {
+ WSREP_ERROR("Failed to open table %s.%s for writing",
+ schema_str.str, table_name);
+ }
+ return 1;
+ }
+ empty_record(*table);
+ (*table)->use_all_columns();
+ restore_record(*table, s->default_values);
+ return 0;
+}
+
+static void store(TABLE* table, uint field, const Wsrep_id& id) {
+ assert(field < table->s->fields);
+ std::ostringstream os;
+ os << id;
+ table->field[field]->store(os.str().c_str(),
+ os.str().size(),
+ &my_charset_bin);
+}
+
+
+template <typename INTTYPE>
+static void store(TABLE* table, uint field, const INTTYPE val) {
+ assert(field < table->s->fields);
+ table->field[field]->store(val);
+}
+
+template <typename CHARTYPE>
+static void store(TABLE* table, uint field, const CHARTYPE* str, size_t str_len) {
+ assert(field < table->s->fields);
+ table->field[field]->store((const char*)str,
+ str_len,
+ &my_charset_bin);
+}
+
+static void store(TABLE* table, uint field, const std::string& str)
+{
+ store(table, field, str.c_str(), str.size());
+}
+
+static int update_or_insert(TABLE* table) {
+ DBUG_ENTER("Wsrep_schema::update_or_insert()");
+ int ret= 0;
+ char* key;
+ int error;
+
+ /*
+ Verify that the table has primary key defined.
+ */
+ if (table->s->primary_key >= MAX_KEY ||
+ !table->s->keys_in_use.is_set(table->s->primary_key)) {
+ WSREP_ERROR("No primary key for %s.%s",
+ table->s->db.str, table->s->table_name.str);
+ DBUG_RETURN(1);
+ }
+
+ /*
+ Find the record and update or insert a new one if not found.
+ */
+ if (!(key= (char*) my_safe_alloca(table->s->max_unique_length))) {
+ WSREP_ERROR("Error allocating %ud bytes for key",
+ table->s->max_unique_length);
+ DBUG_RETURN(1);
+ }
+
+ key_copy((uchar*) key, table->record[0],
+ table->key_info + table->s->primary_key, 0);
+
+ if ((error= table->file->ha_index_read_idx_map(table->record[1],
+ table->s->primary_key,
+ (uchar*) key,
+ HA_WHOLE_KEY,
+ HA_READ_KEY_EXACT))) {
+ /*
+ Row not found, insert a new one.
+ */
+ if ((error= table->file->ha_write_row(table->record[0]))) {
+ WSREP_ERROR("Error writing into %s.%s: %d",
+ table->s->db.str,
+ table->s->table_name.str,
+ error);
+ ret= 1;
+ }
+ }
+ else if (!records_are_comparable(table) || compare_record(table)) {
+ /*
+ Record has changed
+ */
+ if ((error= table->file->ha_update_row(table->record[1],
+ table->record[0])) &&
+ error != HA_ERR_RECORD_IS_THE_SAME) {
+ WSREP_ERROR("Error updating record in %s.%s: %d",
+ table->s->db.str,
+ table->s->table_name.str,
+ error);
+ ret= 1;
+ }
+ }
+
+ my_safe_afree(key, table->s->max_unique_length);
+
+ DBUG_RETURN(ret);
+}
+
+static int insert(TABLE* table) {
+ DBUG_ENTER("Wsrep_schema::insert()");
+ int ret= 0;
+ int error;
+
+ /*
+ Verify that the table has primary key defined.
+ */
+ if (table->s->primary_key >= MAX_KEY ||
+ !table->s->keys_in_use.is_set(table->s->primary_key)) {
+ WSREP_ERROR("No primary key for %s.%s",
+ table->s->db.str, table->s->table_name.str);
+ DBUG_RETURN(1);
+ }
+
+ if ((error= table->file->ha_write_row(table->record[0]))) {
+ WSREP_ERROR("Error writing into %s.%s: %d",
+ table->s->db.str,
+ table->s->table_name.str,
+ error);
+ ret= 1;
+ }
+
+ DBUG_RETURN(ret);
+}
+
+static int delete_row(TABLE* table) {
+ int error;
+ int retry= 3;
+
+ do {
+ error= table->file->ha_delete_row(table->record[0]);
+ retry--;
+ } while (error && retry);
+
+ if (error) {
+ WSREP_ERROR("Error deleting row from %s.%s: %d",
+ table->s->db.str,
+ table->s->table_name.str,
+ error);
+ return 1;
+ }
+ return 0;
+}
+
+static int open_for_read(THD* thd, const char* table_name, TABLE** table) {
+
+ LEX_CSTRING schema_str= { wsrep_schema_str.c_str(), wsrep_schema_str.length() };
+ LEX_CSTRING table_str= { table_name, strlen(table_name) };
+ if (Wsrep_schema_impl::open_table(thd, &schema_str, &table_str, TL_READ,
+ table)) {
+ WSREP_ERROR("Failed to open table %s.%s for reading",
+ schema_str.str, table_name);
+ return 1;
+ }
+ empty_record(*table);
+ (*table)->use_all_columns();
+ restore_record(*table, s->default_values);
+ return 0;
+}
+
+/*
+ Init table for sequential scan.
+
+ @return 0 in case of success, 1 in case of error.
+ */
+static int init_for_scan(TABLE* table) {
+ int error;
+ if ((error= table->file->ha_rnd_init(TRUE))) {
+ WSREP_ERROR("Failed to init table for scan: %d", error);
+ return 1;
+ }
+ return 0;
+}
+/*
+ Scan next record. For return codes see handler::ha_rnd_next()
+
+ @return 0 in case of success, error code in case of error
+ */
+static int next_record(TABLE* table) {
+ int error;
+ if ((error= table->file->ha_rnd_next(table->record[0])) &&
+ error != HA_ERR_END_OF_FILE) {
+ WSREP_ERROR("Failed to read next record: %d", error);
+ }
+ return error;
+}
+
+/*
+ End scan.
+
+ @return 0 in case of success, 1 in case of error.
+ */
+static int end_scan(TABLE* table) {
+ int error;
+ if ((error= table->file->ha_rnd_end())) {
+ WSREP_ERROR("Failed to end scan: %d", error);
+ return 1;
+ }
+ return 0;
+}
+
+static int scan(TABLE* table, uint field, wsrep::id& id)
+{
+ assert(field < table->s->fields);
+ String uuid_str;
+ (void)table->field[field]->val_str(&uuid_str);
+ id= wsrep::id(std::string(uuid_str.c_ptr(), uuid_str.length()));
+ return 0;
+}
+
+template <typename INTTYPE>
+static int scan(TABLE* table, uint field, INTTYPE& val)
+{
+ assert(field < table->s->fields);
+ val= table->field[field]->val_int();
+ return 0;
+}
+
+static int scan(TABLE* table, uint field, char* strbuf, uint strbuf_len)
+{
+ String str;
+ (void)table->field[field]->val_str(&str);
+ LEX_CSTRING tmp= str.lex_cstring();
+ uint len = tmp.length;
+ strncpy(strbuf, tmp.str, std::min(len, strbuf_len));
+ strbuf[strbuf_len - 1]= '\0';
+ return 0;
+}
+
+/*
+ Scan member
+ TODO: filter members by cluster UUID
+ */
+static int scan_member(TABLE* table,
+ const Wsrep_id& cluster_uuid,
+ std::vector<Wsrep_view::member>& members)
+{
+ Wsrep_id member_id;
+ char member_name[128]= { 0, };
+ char member_incoming[128]= { 0, };
+
+ if (scan(table, 0, member_id) ||
+ scan(table, 2, member_name, sizeof(member_name)) ||
+ scan(table, 3, member_incoming, sizeof(member_incoming))) {
+ return 1;
+ }
+
+ if (members.empty() == false) {
+ assert(members.rbegin()->id() < member_id);
+ }
+
+ try {
+ members.push_back(Wsrep_view::member(member_id,
+ member_name,
+ member_incoming));
+ }
+ catch (...) {
+ WSREP_ERROR("Caught exception while scanning members table");
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ Init table for index scan and retrieve first record
+
+ @return 0 in case of success, error code in case of error.
+ */
+static int init_for_index_scan(TABLE* table, const uchar* key,
+ key_part_map map) {
+ int error;
+ if ((error= table->file->ha_index_init(table->s->primary_key, true))) {
+ WSREP_ERROR("Failed to init table for index scan: %d", error);
+ return error;
+ }
+
+ error= table->file->ha_index_read_map(table->record[0],
+ key, map, HA_READ_KEY_EXACT);
+ switch(error) {
+ case 0:
+ case HA_ERR_END_OF_FILE:
+ case HA_ERR_KEY_NOT_FOUND:
+ case HA_ERR_ABORTED_BY_USER:
+ break;
+ case -1:
+ WSREP_DEBUG("init_for_index_scan interrupted");
+ break;
+ default:
+ WSREP_ERROR("init_for_index_scan failed to read first record, error %d", error);
+ }
+ return error;
+}
+
+/*
+ End index scan.
+
+ @return 0 in case of success, 1 in case of error.
+ */
+static int end_index_scan(TABLE* table) {
+ int error;
+ if (table->file->inited) {
+ if ((error= table->file->ha_index_end())) {
+ WSREP_ERROR("Failed to end scan: %d", error);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static void make_key(TABLE* table, uchar** key, key_part_map* map, int parts) {
+ uint prefix_length= 0;
+ KEY_PART_INFO* key_part= table->key_info->key_part;
+
+ for (int i=0; i < parts; i++)
+ prefix_length += key_part[i].store_length;
+
+ *map= make_prev_keypart_map(parts);
+
+ if (!(*key= (uchar *) my_malloc(prefix_length + 1, MYF(MY_WME))))
+ {
+ WSREP_ERROR("Failed to allocate memory for key prefix_length %u", prefix_length);
+ assert(0);
+ }
+
+ key_copy(*key, table->record[0], table->key_info, prefix_length);
+}
+
+} /* namespace Wsrep_schema_impl */
+
+
+Wsrep_schema::Wsrep_schema()
+{
+}
+
+Wsrep_schema::~Wsrep_schema()
+{ }
+
+static void wsrep_init_thd_for_schema(THD *thd)
+{
+ thd->security_ctx->skip_grants();
+ thd->system_thread= SYSTEM_THREAD_GENERIC;
+
+ thd->real_id=pthread_self(); // Keep purify happy
+
+ thd->prior_thr_create_utime= thd->start_utime= thd->thr_create_utime;
+
+ /* No Galera replication */
+ thd->variables.wsrep_on= 0;
+ /* No binlogging */
+ thd->variables.sql_log_bin= 0;
+ thd->variables.option_bits&= ~OPTION_BIN_LOG;
+ /* No safe updates */
+ thd->variables.option_bits&= ~OPTION_SAFE_UPDATES;
+ /* No general log */
+ thd->variables.option_bits|= OPTION_LOG_OFF;
+ /* Read committed isolation to avoid gap locking */
+ thd->variables.tx_isolation= ISO_READ_COMMITTED;
+ wsrep_assign_from_threadvars(thd);
+ wsrep_store_threadvars(thd);
+}
+
+int Wsrep_schema::init()
+{
+ DBUG_ENTER("Wsrep_schema::init()");
+ int ret;
+ THD* thd= new THD(next_thread_id());
+ if (!thd) {
+ WSREP_ERROR("Unable to get thd");
+ DBUG_RETURN(1);
+ }
+ thd->thread_stack= (char*)&thd;
+ wsrep_init_thd_for_schema(thd);
+
+ if (Wsrep_schema_impl::execute_SQL(thd, create_cluster_table_str.c_str(),
+ create_cluster_table_str.size()) ||
+ Wsrep_schema_impl::execute_SQL(thd, create_members_table_str.c_str(),
+ create_members_table_str.size()) ||
+#ifdef WSREP_SCHEMA_MEMBERS_HISTORY
+ Wsrep_schema_impl::execute_SQL(thd,
+ create_members_history_table_str.c_str(),
+ create_members_history_table_str.size()) ||
+ Wsrep_schema_impl::execute_SQL(thd,
+ alter_members_history_table.c_str(),
+ alter_members_history_table.size()) ||
+#endif /* WSREP_SCHEMA_MEMBERS_HISTORY */
+ Wsrep_schema_impl::execute_SQL(thd,
+ create_frag_table_str.c_str(),
+ create_frag_table_str.size()) ||
+ Wsrep_schema_impl::execute_SQL(thd,
+ alter_cluster_table.c_str(),
+ alter_cluster_table.size()) ||
+ Wsrep_schema_impl::execute_SQL(thd,
+ alter_members_table.c_str(),
+ alter_members_table.size()) ||
+ Wsrep_schema_impl::execute_SQL(thd,
+ alter_frag_table.c_str(),
+ alter_frag_table.size()))
+ {
+ ret= 1;
+ }
+ else
+ {
+ ret= 0;
+ }
+
+ delete thd;
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_schema::store_view(THD* thd, const Wsrep_view& view)
+{
+ DBUG_ENTER("Wsrep_schema::store_view()");
+ assert(view.status() == Wsrep_view::primary);
+ int ret= 1;
+ int error;
+ TABLE* cluster_table= 0;
+ TABLE* members_table= 0;
+#ifdef WSREP_SCHEMA_MEMBERS_HISTORY
+ TABLE* members_history_table= 0;
+#endif /* WSREP_SCHEMA_MEMBERS_HISTORY */
+
+ Wsrep_schema_impl::wsrep_off wsrep_off(thd);
+ Wsrep_schema_impl::binlog_off binlog_off(thd);
+ Wsrep_schema_impl::sql_safe_updates sql_safe_updates(thd);
+
+ /*
+ Clean up cluster table and members table.
+ */
+ if (Wsrep_schema_impl::execute_SQL(thd,
+ delete_from_cluster_table.c_str(),
+ delete_from_cluster_table.size()) ||
+ Wsrep_schema_impl::execute_SQL(thd,
+ delete_from_members_table.c_str(),
+ delete_from_members_table.size())) {
+ goto out;
+ }
+
+ /*
+ Store cluster view info
+ */
+ Wsrep_schema_impl::init_stmt(thd);
+ if (Wsrep_schema_impl::open_for_write(thd, cluster_table_str.c_str(), &cluster_table))
+ {
+ goto out;
+ }
+
+ Wsrep_schema_impl::store(cluster_table, 0, view.state_id().id());
+ Wsrep_schema_impl::store(cluster_table, 1, view.view_seqno().get());
+ Wsrep_schema_impl::store(cluster_table, 2, view.state_id().seqno().get());
+ Wsrep_schema_impl::store(cluster_table, 3, view.protocol_version());
+ Wsrep_schema_impl::store(cluster_table, 4, view.capabilities());
+
+ if ((error= Wsrep_schema_impl::update_or_insert(cluster_table)))
+ {
+ WSREP_ERROR("failed to write to cluster table: %d", error);
+ goto out;
+ }
+
+ Wsrep_schema_impl::finish_stmt(thd);
+
+ /*
+ Store info about current members
+ */
+ Wsrep_schema_impl::init_stmt(thd);
+ if (Wsrep_schema_impl::open_for_write(thd, members_table_str.c_str(),
+ &members_table))
+ {
+ WSREP_ERROR("failed to open wsrep.members table");
+ goto out;
+ }
+
+ for (size_t i= 0; i < view.members().size(); ++i)
+ {
+ Wsrep_schema_impl::store(members_table, 0, view.members()[i].id());
+ Wsrep_schema_impl::store(members_table, 1, view.state_id().id());
+ Wsrep_schema_impl::store(members_table, 2, view.members()[i].name());
+ Wsrep_schema_impl::store(members_table, 3, view.members()[i].incoming());
+ if ((error= Wsrep_schema_impl::update_or_insert(members_table)))
+ {
+ WSREP_ERROR("failed to write wsrep.members table: %d", error);
+ goto out;
+ }
+ }
+ Wsrep_schema_impl::finish_stmt(thd);
+
+#ifdef WSREP_SCHEMA_MEMBERS_HISTORY
+ /*
+ Store members history
+ */
+ Wsrep_schema_impl::init_stmt(thd);
+ if (Wsrep_schema_impl::open_for_write(thd, cluster_member_history.c_str(),
+ &members_history_table)) {
+ WSREP_ERROR("failed to open wsrep.members table");
+ goto out;
+ }
+
+ for (size_t i= 0; i < view.members().size(); ++i) {
+ Wsrep_schema_impl::store(members_history_table, 0, view.members()[i].id());
+ Wsrep_schema_impl::store(members_history_table, 1, view.state_id().id());
+ Wsrep_schema_impl::store(members_history_table, 2, view.view_seqno());
+ Wsrep_schema_impl::store(members_history_table, 3, view.state_id().seqno());
+ Wsrep_schema_impl::store(members_history_table, 4,
+ view.members()[i].name());
+ Wsrep_schema_impl::store(members_history_table, 5,
+ view.members()[i].incoming());
+ if ((error= Wsrep_schema_impl::update_or_insert(members_history_table))) {
+ WSREP_ERROR("failed to write wsrep_cluster_member_history table: %d", error);
+ goto out;
+ }
+ }
+ Wsrep_schema_impl::finish_stmt(thd);
+#endif /* WSREP_SCHEMA_MEMBERS_HISTORY */
+ ret= 0;
+ out:
+
+ DBUG_RETURN(ret);
+}
+
+Wsrep_view Wsrep_schema::restore_view(THD* thd, const Wsrep_id& own_id) const {
+ DBUG_ENTER("Wsrep_schema::restore_view()");
+
+ int ret= 1;
+ int error;
+
+ TABLE* cluster_table= 0;
+ bool end_cluster_scan= false;
+ TABLE* members_table= 0;
+ bool end_members_scan= false;
+
+ /* variables below need to be initialized in case cluster table is empty */
+ Wsrep_id cluster_uuid;
+ wsrep_seqno_t view_id= -1;
+ wsrep_seqno_t view_seqno= -1;
+ int my_idx= -1;
+ int proto_ver= 0;
+ wsrep_cap_t capabilities= 0;
+ std::vector<Wsrep_view::member> members;
+
+ // we don't want causal waits for reading non-replicated private data
+ int const wsrep_sync_wait_saved= thd->variables.wsrep_sync_wait;
+ thd->variables.wsrep_sync_wait= 0;
+
+ if (trans_begin(thd, MYSQL_START_TRANS_OPT_READ_ONLY)) {
+ WSREP_ERROR("wsrep_schema::restore_view(): Failed to start transaction");
+ goto out;
+ }
+
+ /*
+ Read cluster info from cluster table
+ */
+ Wsrep_schema_impl::init_stmt(thd);
+ if (Wsrep_schema_impl::open_for_read(thd, cluster_table_str.c_str(), &cluster_table) ||
+ Wsrep_schema_impl::init_for_scan(cluster_table)) {
+ goto out;
+ }
+
+ if (((error= Wsrep_schema_impl::next_record(cluster_table)) != 0 ||
+ Wsrep_schema_impl::scan(cluster_table, 0, cluster_uuid) ||
+ Wsrep_schema_impl::scan(cluster_table, 1, view_id) ||
+ Wsrep_schema_impl::scan(cluster_table, 2, view_seqno) ||
+ Wsrep_schema_impl::scan(cluster_table, 3, proto_ver) ||
+ Wsrep_schema_impl::scan(cluster_table, 4, capabilities)) &&
+ error != HA_ERR_END_OF_FILE) {
+ end_cluster_scan= true;
+ goto out;
+ }
+
+ if (Wsrep_schema_impl::end_scan(cluster_table)) {
+ goto out;
+ }
+ Wsrep_schema_impl::finish_stmt(thd);
+
+ /*
+ Read members from members table
+ */
+ Wsrep_schema_impl::init_stmt(thd);
+ if (Wsrep_schema_impl::open_for_read(thd, members_table_str.c_str(), &members_table) ||
+ Wsrep_schema_impl::init_for_scan(members_table)) {
+ goto out;
+ }
+ end_members_scan= true;
+
+ while (true) {
+ if ((error= Wsrep_schema_impl::next_record(members_table)) == 0) {
+ if (Wsrep_schema_impl::scan_member(members_table,
+ cluster_uuid,
+ members)) {
+ goto out;
+ }
+ }
+ else if (error == HA_ERR_END_OF_FILE) {
+ break;
+ }
+ else {
+ goto out;
+ }
+ }
+
+ end_members_scan= false;
+ if (Wsrep_schema_impl::end_scan(members_table)) {
+ goto out;
+ }
+ Wsrep_schema_impl::finish_stmt(thd);
+
+ if (own_id.is_undefined() == false) {
+ for (uint i= 0; i < members.size(); ++i) {
+ if (members[i].id() == own_id) {
+ my_idx= i;
+ break;
+ }
+ }
+ }
+
+ (void)trans_commit(thd);
+ ret= 0; /* Success*/
+ out:
+
+ if (end_cluster_scan) Wsrep_schema_impl::end_scan(cluster_table);
+ if (end_members_scan) Wsrep_schema_impl::end_scan(members_table);
+
+ if (0 != ret) {
+ trans_rollback_stmt(thd);
+ if (!trans_rollback(thd)) {
+ close_thread_tables(thd);
+ }
+ }
+ thd->release_transactional_locks();
+
+ thd->variables.wsrep_sync_wait= wsrep_sync_wait_saved;
+
+ if (0 == ret) {
+ Wsrep_view ret_view(
+ wsrep::gtid(cluster_uuid, Wsrep_seqno(view_seqno)),
+ Wsrep_seqno(view_id),
+ wsrep::view::primary,
+ capabilities,
+ my_idx,
+ proto_ver,
+ members
+ );
+
+ if (wsrep_debug) {
+ std::ostringstream os;
+ os << "Restored cluster view:\n" << ret_view;
+ WSREP_INFO("%s", os.str().c_str());
+ }
+ DBUG_RETURN(ret_view);
+ }
+ else
+ {
+ WSREP_ERROR("wsrep_schema::restore_view() failed.");
+ Wsrep_view ret_view;
+ DBUG_RETURN(ret_view);
+ }
+}
+
+int Wsrep_schema::append_fragment(THD* thd,
+ const wsrep::id& server_id,
+ wsrep::transaction_id transaction_id,
+ wsrep::seqno seqno,
+ int flags,
+ const wsrep::const_buffer& data)
+{
+ DBUG_ENTER("Wsrep_schema::append_fragment");
+ std::ostringstream os;
+ os << server_id;
+ WSREP_DEBUG("Append fragment(%llu) %s, %llu",
+ thd->thread_id,
+ os.str().c_str(),
+ transaction_id.get());
+ /* use private query table list for the duration of fragment storing,
+ populated query table list from "parent DML" may cause problems .e.g
+ for virtual column handling
+ */
+ Query_tables_list query_tables_list_backup;
+ thd->lex->reset_n_backup_query_tables_list(&query_tables_list_backup);
+
+ Wsrep_schema_impl::binlog_off binlog_off(thd);
+ Wsrep_schema_impl::sql_safe_updates sql_safe_updates(thd);
+ Wsrep_schema_impl::init_stmt(thd);
+
+ TABLE* frag_table= 0;
+ if (Wsrep_schema_impl::open_for_write(thd, sr_table_str.c_str(), &frag_table))
+ {
+ trans_rollback_stmt(thd);
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+ DBUG_RETURN(1);
+ }
+
+ Wsrep_schema_impl::store(frag_table, 0, server_id);
+ Wsrep_schema_impl::store(frag_table, 1, transaction_id.get());
+ Wsrep_schema_impl::store(frag_table, 2, seqno.get());
+ Wsrep_schema_impl::store(frag_table, 3, flags);
+ Wsrep_schema_impl::store(frag_table, 4, data.data(), data.size());
+
+ int error;
+ if ((error= Wsrep_schema_impl::insert(frag_table))) {
+ WSREP_ERROR("Failed to write to frag table: %d", error);
+ trans_rollback_stmt(thd);
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+ DBUG_RETURN(1);
+ }
+ Wsrep_schema_impl::finish_stmt(thd);
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+ DBUG_RETURN(0);
+}
+
+int Wsrep_schema::update_fragment_meta(THD* thd,
+ const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER("Wsrep_schema::update_fragment_meta");
+ std::ostringstream os;
+ os << ws_meta.server_id();
+ WSREP_DEBUG("update_frag_seqno(%llu) %s, %llu, seqno %lld",
+ thd->thread_id,
+ os.str().c_str(),
+ ws_meta.transaction_id().get(),
+ ws_meta.seqno().get());
+ DBUG_ASSERT(ws_meta.seqno().is_undefined() == false);
+
+ /* use private query table list for the duration of fragment storing,
+ populated query table list from "parent DML" may cause problems .e.g
+ for virtual column handling
+ */
+ Query_tables_list query_tables_list_backup;
+ thd->lex->reset_n_backup_query_tables_list(&query_tables_list_backup);
+
+ Wsrep_schema_impl::binlog_off binlog_off(thd);
+ Wsrep_schema_impl::sql_safe_updates sql_safe_updates(thd);
+ int error;
+ uchar *key=NULL;
+ key_part_map key_map= 0;
+ TABLE* frag_table= 0;
+
+ Wsrep_schema_impl::init_stmt(thd);
+ if (Wsrep_schema_impl::open_for_write(thd, sr_table_str.c_str(), &frag_table))
+ {
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+ DBUG_RETURN(1);
+ }
+
+ /* Find record with the given uuid, trx id, and seqno -1 */
+ Wsrep_schema_impl::store(frag_table, 0, ws_meta.server_id());
+ Wsrep_schema_impl::store(frag_table, 1, ws_meta.transaction_id().get());
+ Wsrep_schema_impl::store(frag_table, 2, -1);
+ Wsrep_schema_impl::make_key(frag_table, &key, &key_map, 3);
+
+ if ((error= Wsrep_schema_impl::init_for_index_scan(frag_table,
+ key, key_map)))
+ {
+ if (error == HA_ERR_END_OF_FILE || error == HA_ERR_KEY_NOT_FOUND)
+ {
+ WSREP_WARN("Record not found in %s.%s: %d",
+ frag_table->s->db.str,
+ frag_table->s->table_name.str,
+ error);
+ }
+ Wsrep_schema_impl::finish_stmt(thd);
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+ my_free(key);
+ DBUG_RETURN(1);
+ }
+
+ my_free(key);
+ /* Copy the original record to frag_table->record[1] */
+ store_record(frag_table, record[1]);
+
+ /* Store seqno in frag_table->record[0] and update the row */
+ Wsrep_schema_impl::store(frag_table, 2, ws_meta.seqno().get());
+ if ((error= frag_table->file->ha_update_row(frag_table->record[1],
+ frag_table->record[0]))) {
+ WSREP_ERROR("Error updating record in %s.%s: %d",
+ frag_table->s->db.str,
+ frag_table->s->table_name.str,
+ error);
+ Wsrep_schema_impl::finish_stmt(thd);
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+ DBUG_RETURN(1);
+ }
+
+ int ret= Wsrep_schema_impl::end_index_scan(frag_table);
+ Wsrep_schema_impl::finish_stmt(thd);
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+ DBUG_RETURN(ret);
+}
+
+static int remove_fragment(THD* thd,
+ TABLE* frag_table,
+ const wsrep::id& server_id,
+ wsrep::transaction_id transaction_id,
+ wsrep::seqno seqno)
+{
+ WSREP_DEBUG("remove_fragment(%llu) trx %llu, seqno %lld",
+ thd->thread_id,
+ transaction_id.get(),
+ seqno.get());
+ int ret= 0;
+ int error;
+ uchar *key= NULL;
+ key_part_map key_map= 0;
+
+ DBUG_ASSERT(server_id.is_undefined() == false);
+ DBUG_ASSERT(transaction_id.is_undefined() == false);
+ DBUG_ASSERT(seqno.is_undefined() == false);
+
+ /*
+ Remove record with the given uuid, trx id, and seqno.
+ Using a complete key here avoids gap locks.
+ */
+ Wsrep_schema_impl::store(frag_table, 0, server_id);
+ Wsrep_schema_impl::store(frag_table, 1, transaction_id.get());
+ Wsrep_schema_impl::store(frag_table, 2, seqno.get());
+ Wsrep_schema_impl::make_key(frag_table, &key, &key_map, 3);
+
+ if ((error= Wsrep_schema_impl::init_for_index_scan(frag_table,
+ key,
+ key_map)))
+ {
+ if (error == HA_ERR_END_OF_FILE || error == HA_ERR_KEY_NOT_FOUND)
+ {
+ WSREP_DEBUG("Record not found in %s.%s:trx %llu, seqno %lld, error %d",
+ frag_table->s->db.str,
+ frag_table->s->table_name.str,
+ transaction_id.get(),
+ seqno.get(),
+ error);
+ }
+ ret= error;
+ }
+ else if (Wsrep_schema_impl::delete_row(frag_table))
+ {
+ ret= 1;
+ }
+
+ if (key)
+ my_free(key);
+ Wsrep_schema_impl::end_index_scan(frag_table);
+ return ret;
+}
+
+int Wsrep_schema::remove_fragments(THD* thd,
+ const wsrep::id& server_id,
+ wsrep::transaction_id transaction_id,
+ const std::vector<wsrep::seqno>& fragments)
+{
+ DBUG_ENTER("Wsrep_schema::remove_fragments");
+ int ret= 0;
+
+ WSREP_DEBUG("Removing %zu fragments", fragments.size());
+ Wsrep_schema_impl::wsrep_off wsrep_off(thd);
+ Wsrep_schema_impl::binlog_off binlog_off(thd);
+ Wsrep_schema_impl::sql_safe_updates sql_safe_updates(thd);
+
+ Query_tables_list query_tables_list_backup;
+ Open_tables_backup open_tables_backup;
+ thd->lex->reset_n_backup_query_tables_list(&query_tables_list_backup);
+ thd->reset_n_backup_open_tables_state(&open_tables_backup);
+
+ TABLE* frag_table= 0;
+ if (Wsrep_schema_impl::open_for_write(thd, sr_table_str.c_str(), &frag_table))
+ {
+ ret= 1;
+ }
+ else
+ {
+ for (std::vector<wsrep::seqno>::const_iterator i= fragments.begin();
+ i != fragments.end(); ++i)
+ {
+ if (remove_fragment(thd,
+ frag_table,
+ server_id,
+ transaction_id, *i))
+ {
+ ret= 1;
+ break;
+ }
+ }
+ }
+ close_thread_tables(thd);
+ thd->restore_backup_open_tables_state(&open_tables_backup);
+ thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
+
+ if (thd->wsrep_cs().mode() == wsrep::client_state::m_local &&
+ !thd->in_multi_stmt_transaction_mode())
+ {
+ /*
+ The ugly part: Locally executing autocommit statement is
+ committing and it has removed a fragment from stable storage.
+ Now calling finish_stmt() will call trans_commit_stmt(), which will
+ actually commit the transaction, what we really don't want
+ to do at this point.
+
+ Doing nothing at this point seems to work ok, this block is
+ intentionally no-op and for documentation purposes only.
+ */
+ }
+ else
+ {
+ Wsrep_schema_impl::finish_stmt(thd);
+ }
+
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_schema::replay_transaction(THD* orig_thd,
+ Relay_log_info* rli,
+ const wsrep::ws_meta& ws_meta,
+ const std::vector<wsrep::seqno>& fragments)
+{
+ DBUG_ENTER("Wsrep_schema::replay_transaction");
+ DBUG_ASSERT(!fragments.empty());
+
+ THD thd(next_thread_id(), true);
+ thd.thread_stack= (orig_thd ? orig_thd->thread_stack :
+ (char*) &thd);
+ wsrep_assign_from_threadvars(&thd);
+
+ Wsrep_schema_impl::wsrep_off wsrep_off(&thd);
+ Wsrep_schema_impl::binlog_off binlog_off(&thd);
+ Wsrep_schema_impl::sql_safe_updates sql_safe_updates(&thd);
+ Wsrep_schema_impl::thd_context_switch thd_context_switch(orig_thd, &thd);
+
+ int ret= 1;
+ int error;
+ TABLE* frag_table= 0;
+ uchar *key=NULL;
+ key_part_map key_map= 0;
+
+ for (std::vector<wsrep::seqno>::const_iterator i= fragments.begin();
+ i != fragments.end(); ++i)
+ {
+ Wsrep_schema_impl::init_stmt(&thd);
+ if ((error= Wsrep_schema_impl::open_for_read(&thd, sr_table_str.c_str(), &frag_table)))
+ {
+ WSREP_WARN("Could not open SR table for read: %d", error);
+ Wsrep_schema_impl::finish_stmt(&thd);
+ DBUG_RETURN(1);
+ }
+
+ Wsrep_schema_impl::store(frag_table, 0, ws_meta.server_id());
+ Wsrep_schema_impl::store(frag_table, 1, ws_meta.transaction_id().get());
+ Wsrep_schema_impl::store(frag_table, 2, i->get());
+ Wsrep_schema_impl::make_key(frag_table, &key, &key_map, 3);
+
+ int error= Wsrep_schema_impl::init_for_index_scan(frag_table,
+ key,
+ key_map);
+ if (error)
+ {
+ WSREP_WARN("Failed to init streaming log table for index scan: %d",
+ error);
+ Wsrep_schema_impl::end_index_scan(frag_table);
+ ret= 1;
+ break;
+ }
+
+ int flags;
+ Wsrep_schema_impl::scan(frag_table, 3, flags);
+ WSREP_DEBUG("replay_fragment(%llu): seqno: %lld flags: %x",
+ ws_meta.transaction_id().get(),
+ i->get(),
+ flags);
+ String buf;
+ frag_table->field[4]->val_str(&buf);
+
+ {
+ Wsrep_schema_impl::thd_context_switch thd_context_switch(&thd, orig_thd);
+
+ ret= wsrep_apply_events(orig_thd, rli, buf.c_ptr_quick(), buf.length());
+ if (ret)
+ {
+ WSREP_WARN("Wsrep_schema::replay_transaction: failed to apply fragments");
+ break;
+ }
+ }
+
+ Wsrep_schema_impl::end_index_scan(frag_table);
+ Wsrep_schema_impl::finish_stmt(&thd);
+
+ Wsrep_schema_impl::init_stmt(&thd);
+
+ if ((error= Wsrep_schema_impl::open_for_write(&thd,
+ sr_table_str.c_str(),
+ &frag_table)))
+ {
+ WSREP_WARN("Could not open SR table for write: %d", error);
+ Wsrep_schema_impl::finish_stmt(&thd);
+ DBUG_RETURN(1);
+ }
+
+ error= Wsrep_schema_impl::init_for_index_scan(frag_table,
+ key,
+ key_map);
+ if (error)
+ {
+ WSREP_WARN("Failed to init streaming log table for index scan: %d",
+ error);
+ Wsrep_schema_impl::end_index_scan(frag_table);
+ ret= 1;
+ break;
+ }
+
+ error= Wsrep_schema_impl::delete_row(frag_table);
+
+ if (error)
+ {
+ WSREP_WARN("Could not delete row from streaming log table: %d", error);
+ Wsrep_schema_impl::end_index_scan(frag_table);
+ ret= 1;
+ break;
+ }
+ Wsrep_schema_impl::end_index_scan(frag_table);
+ Wsrep_schema_impl::finish_stmt(&thd);
+ my_free(key);
+ key= NULL;
+ }
+
+ if (key)
+ my_free(key);
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_schema::recover_sr_transactions(THD *orig_thd)
+{
+ DBUG_ENTER("Wsrep_schema::recover_sr_transactions");
+ THD storage_thd(next_thread_id(), true);
+ storage_thd.thread_stack= (orig_thd ? orig_thd->thread_stack :
+ (char*) &storage_thd);
+ wsrep_assign_from_threadvars(&storage_thd);
+ TABLE* frag_table= 0;
+ TABLE* cluster_table= 0;
+ Wsrep_storage_service storage_service(&storage_thd);
+ Wsrep_schema_impl::binlog_off binlog_off(&storage_thd);
+ Wsrep_schema_impl::wsrep_off wsrep_off(&storage_thd);
+ Wsrep_schema_impl::sql_safe_updates sql_safe_updates(&storage_thd);
+ Wsrep_schema_impl::thd_context_switch thd_context_switch(orig_thd,
+ &storage_thd);
+ Wsrep_server_state& server_state(Wsrep_server_state::instance());
+
+ int ret= 1;
+ int error;
+ wsrep::id cluster_id;
+
+ Wsrep_schema_impl::init_stmt(&storage_thd);
+ storage_thd.wsrep_skip_locking= FALSE;
+ if (Wsrep_schema_impl::open_for_read(&storage_thd,
+ cluster_table_str.c_str(),
+ &cluster_table) ||
+ Wsrep_schema_impl::init_for_scan(cluster_table))
+ {
+ Wsrep_schema_impl::finish_stmt(&storage_thd);
+ DBUG_RETURN(1);
+ }
+
+ if ((error= Wsrep_schema_impl::next_record(cluster_table)))
+ {
+ Wsrep_schema_impl::end_scan(cluster_table);
+ Wsrep_schema_impl::finish_stmt(&storage_thd);
+ trans_commit(&storage_thd);
+ if (error == HA_ERR_END_OF_FILE)
+ {
+ WSREP_INFO("Cluster table is empty, not recovering transactions");
+ DBUG_RETURN(0);
+ }
+ else
+ {
+ WSREP_ERROR("Failed to read cluster table: %d", error);
+ DBUG_RETURN(1);
+ }
+ }
+
+ Wsrep_schema_impl::scan(cluster_table, 0, cluster_id);
+ Wsrep_schema_impl::end_scan(cluster_table);
+ Wsrep_schema_impl::finish_stmt(&storage_thd);
+
+ std::ostringstream os;
+ os << cluster_id;
+ WSREP_INFO("Recovered cluster id %s", os.str().c_str());
+
+ storage_thd.wsrep_skip_locking= TRUE;
+ Wsrep_schema_impl::init_stmt(&storage_thd);
+
+ /*
+ Open the table for reading and writing so that fragments without
+ valid seqno can be deleted.
+ */
+ if (Wsrep_schema_impl::open_for_write(&storage_thd, sr_table_str.c_str(), &frag_table) ||
+ Wsrep_schema_impl::init_for_scan(frag_table))
+ {
+ WSREP_ERROR("Failed to open SR table for write");
+ goto out;
+ }
+
+ while (true)
+ {
+ if ((error= Wsrep_schema_impl::next_record(frag_table)) == 0)
+ {
+ wsrep::id server_id;
+ Wsrep_schema_impl::scan(frag_table, 0, server_id);
+ wsrep::client_id client_id;
+ unsigned long long transaction_id_ull;
+ Wsrep_schema_impl::scan(frag_table, 1, transaction_id_ull);
+ wsrep::transaction_id transaction_id(transaction_id_ull);
+ long long seqno_ll;
+ Wsrep_schema_impl::scan(frag_table, 2, seqno_ll);
+ wsrep::seqno seqno(seqno_ll);
+
+ /* This is possible if the server crashes between inserting the
+ fragment into table and updating the fragment seqno after
+ certification. */
+ if (seqno.is_undefined())
+ {
+ Wsrep_schema_impl::delete_row(frag_table);
+ continue;
+ }
+
+ wsrep::gtid gtid(cluster_id, seqno);
+ int flags;
+ Wsrep_schema_impl::scan(frag_table, 3, flags);
+ String data_str;
+
+ (void)frag_table->field[4]->val_str(&data_str);
+ wsrep::const_buffer data(data_str.c_ptr_quick(), data_str.length());
+ wsrep::ws_meta ws_meta(gtid,
+ wsrep::stid(server_id,
+ transaction_id,
+ client_id),
+ wsrep::seqno::undefined(),
+ flags);
+
+ wsrep::high_priority_service* applier;
+ if (!(applier= server_state.find_streaming_applier(server_id,
+ transaction_id)))
+ {
+ DBUG_ASSERT(wsrep::starts_transaction(flags));
+ applier = wsrep_create_streaming_applier(&storage_thd, "recovery");
+ server_state.start_streaming_applier(server_id, transaction_id,
+ applier);
+ applier->start_transaction(wsrep::ws_handle(transaction_id, 0),
+ ws_meta);
+ }
+ applier->store_globals();
+ wsrep::mutable_buffer unused;
+ applier->apply_write_set(ws_meta, data, unused);
+ applier->after_apply();
+ storage_service.store_globals();
+ }
+ else if (error == HA_ERR_END_OF_FILE)
+ {
+ ret= 0;
+ break;
+ }
+ else
+ {
+ WSREP_ERROR("SR table scan returned error %d", error);
+ break;
+ }
+ }
+ Wsrep_schema_impl::end_scan(frag_table);
+ Wsrep_schema_impl::finish_stmt(&storage_thd);
+ trans_commit(&storage_thd);
+ storage_thd.set_mysys_var(0);
+out:
+ DBUG_RETURN(ret);
+}
diff --git a/sql/wsrep_schema.h b/sql/wsrep_schema.h
new file mode 100644
index 00000000000..36e23998d19
--- /dev/null
+++ b/sql/wsrep_schema.h
@@ -0,0 +1,144 @@
+/* Copyright (C) 2015-2019 Codership Oy <info@codership.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
+
+
+#ifndef WSREP_SCHEMA_H
+#define WSREP_SCHEMA_H
+
+/* wsrep-lib */
+#include "wsrep_types.h"
+
+#include "mysqld.h"
+#include "wsrep_mysqld.h"
+
+/*
+ Forward decls
+*/
+class THD;
+class Relay_log_info;
+struct TABLE;
+struct TABLE_LIST;
+struct st_mysql_lex_string;
+typedef struct st_mysql_lex_string LEX_STRING;
+
+/** Name of the table in `wsrep_schema_str` used for storing streaming
+replication data. In an InnoDB full format, e.g. "database/tablename". */
+extern const char* wsrep_sr_table_name_full;
+
+class Wsrep_schema
+{
+ public:
+
+ Wsrep_schema();
+ ~Wsrep_schema();
+
+ /*
+ Initialize wsrep schema. Storage engines must be running before
+ calling this function.
+ */
+ int init();
+
+ /*
+ Store wsrep view info into wsrep schema.
+ */
+ int store_view(THD*, const Wsrep_view& view);
+
+ /*
+ Restore view info from stable storage.
+ */
+ Wsrep_view restore_view(THD* thd, const Wsrep_id& own_id) const;
+
+ /**
+ Append transaction fragment to fragment storage.
+ Transaction must have been started for THD before this call.
+ In order to make changes durable, transaction must be committed
+ separately after this call.
+
+ @param thd THD object
+ @param server_id Wsrep server identifier
+ @param transaction_id Transaction identifier
+ @param flags Flags for the fragment
+ @param data Fragment data buffer
+
+ @return Zero in case of success, non-zero on failure.
+ */
+ int append_fragment(THD* thd,
+ const wsrep::id& server_id,
+ wsrep::transaction_id transaction_id,
+ wsrep::seqno seqno,
+ int flags,
+ const wsrep::const_buffer& data);
+ /**
+ Update existing fragment meta data. The fragment must have been
+ inserted before using append_fragment().
+
+ @param thd THD object
+ @param ws_meta Wsrep meta data
+
+ @return Zero in case of success, non-zero on failure.
+ */
+ int update_fragment_meta(THD* thd,
+ const wsrep::ws_meta& ws_meta);
+
+ /**
+ Remove fragments from storage. This method must be called
+ inside active transaction. Fragment removal will be committed
+ once the transaction commits.
+
+ @param thd Pointer to THD object
+ @param server_id Identifier of the running server
+ @param transaction_id Identifier of the current transaction
+ @param fragments Vector of fragment seqnos to be removed
+ */
+ int remove_fragments(THD* thd,
+ const wsrep::id& server_id,
+ wsrep::transaction_id transaction_id,
+ const std::vector<wsrep::seqno>& fragments);
+
+ /**
+ Replay a transaction from stored fragments. The caller must have
+ started a transaction for a thd.
+
+ @param thd Pointer to THD object
+ @param ws_meta Write set meta data for commit fragment.
+ @param fragments Vector of fragments to be replayed
+
+ @return Zero on success, non-zero on failure.
+ */
+ int replay_transaction(THD* thd,
+ Relay_log_info* rli,
+ const wsrep::ws_meta& ws_meta,
+ const std::vector<wsrep::seqno>& fragments);
+
+ /**
+ Recover streaming transactions from SR table.
+ This method should be called after storage enignes are initialized.
+ It will scan SR table and replay found streaming transactions.
+
+ @param orig_thd The THD object of the calling thread.
+
+ @return Zero on success, non-zero on failure.
+ */
+ int recover_sr_transactions(THD* orig_thd);
+
+ private:
+ /* Non-copyable */
+ Wsrep_schema(const Wsrep_schema&);
+ Wsrep_schema& operator=(const Wsrep_schema&);
+};
+
+extern Wsrep_schema* wsrep_schema;
+
+#endif /* !WSREP_SCHEMA_H */
diff --git a/sql/wsrep_server_service.cc b/sql/wsrep_server_service.cc
new file mode 100644
index 00000000000..41778ef9420
--- /dev/null
+++ b/sql/wsrep_server_service.cc
@@ -0,0 +1,399 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#include "my_global.h"
+#include "wsrep_server_service.h"
+#include "wsrep_server_state.h"
+#include "wsrep_client_state.h"
+#include "wsrep_client_service.h"
+#include "wsrep_storage_service.h"
+#include "wsrep_high_priority_service.h"
+
+#include "wsrep_sst.h"
+#include "wsrep_xid.h"
+#include "wsrep_mysqld.h"
+#include "wsrep_schema.h"
+#include "wsrep_utils.h"
+#include "wsrep_thd.h"
+
+#include "log.h" /* sql_print_xxx() */
+#include "sql_class.h" /* system variables */
+#include "transaction.h" /* trans_xxx */
+#include "sql_base.h" /* close_thread_tables */
+#include "debug_sync.h"
+
+static void init_service_thd(THD* thd, char* thread_stack)
+{
+ thd->thread_stack= thread_stack;
+ thd->real_id= pthread_self();
+ thd->prior_thr_create_utime= thd->start_utime= microsecond_interval_timer();
+ thd->set_command(COM_SLEEP);
+ thd->reset_for_next_command(true);
+}
+
+Wsrep_storage_service*
+wsrep_create_storage_service(THD* orig_THD, const char* ctx)
+{
+ THD* thd= new THD(true, true);
+ init_service_thd(thd, orig_THD->thread_stack);
+ WSREP_DEBUG("Created storage service in %s context with thread id %llu",
+ ctx, thd->thread_id);
+ /* Use variables from the current thd attached to client_service.
+ This is because we need to be able to BF abort storage access
+ operations. */
+ wsrep_assign_from_threadvars(thd);
+ return new Wsrep_storage_service(thd);
+}
+
+wsrep::storage_service* Wsrep_server_service::storage_service(
+ wsrep::client_service& client_service)
+{
+ Wsrep_client_service& cs=
+ static_cast<Wsrep_client_service&>(client_service);
+ return wsrep_create_storage_service(cs.m_thd, "local");
+}
+
+wsrep::storage_service* Wsrep_server_service::storage_service(
+ wsrep::high_priority_service& high_priority_service)
+{
+ Wsrep_high_priority_service& hps=
+ static_cast<Wsrep_high_priority_service&>(high_priority_service);
+ return wsrep_create_storage_service(hps.m_thd, "high priority");
+}
+
+void Wsrep_server_service::release_storage_service(
+ wsrep::storage_service* storage_service)
+{
+ Wsrep_storage_service* ss=
+ static_cast<Wsrep_storage_service*>(storage_service);
+ THD* thd= ss->m_thd;
+ wsrep_reset_threadvars(thd);
+ delete ss;
+ delete thd;
+}
+
+Wsrep_applier_service*
+wsrep_create_streaming_applier(THD *orig_thd, const char *ctx)
+{
+ /* Reset variables to allow creating new variables in thread local
+ storage for new THD if needed. Note that reset must be done for
+ current_thd, as orig_thd may not be in effect. This may be the case when
+ streaming transaction is BF aborted and streaming applier
+ is created from BF aborter context. */
+ Wsrep_threadvars saved_threadvars(wsrep_save_threadvars());
+ wsrep_reset_threadvars(saved_threadvars.cur_thd);
+ THD *thd= 0;
+ Wsrep_applier_service *ret= 0;
+ if (!wsrep_create_threadvars() &&
+ (thd= new THD(next_thread_id(), true)))
+ {
+ init_service_thd(thd, orig_thd->thread_stack);
+ wsrep_assign_from_threadvars(thd);
+ WSREP_DEBUG("Created streaming applier service in %s context with "
+ "thread id %llu", ctx, thd->thread_id);
+ if (!(ret= new (std::nothrow) Wsrep_applier_service(thd)))
+ {
+ delete thd;
+ }
+ }
+ /* Restore original thread local storage state before returning. */
+ wsrep_restore_threadvars(saved_threadvars);
+ wsrep_store_threadvars(saved_threadvars.cur_thd);
+ return ret;
+}
+
+wsrep::high_priority_service*
+Wsrep_server_service::streaming_applier_service(
+ wsrep::client_service& orig_client_service)
+{
+ Wsrep_client_service& orig_cs=
+ static_cast<Wsrep_client_service&>(orig_client_service);
+ return wsrep_create_streaming_applier(orig_cs.m_thd, "local");
+}
+
+wsrep::high_priority_service*
+Wsrep_server_service::streaming_applier_service(
+ wsrep::high_priority_service& orig_high_priority_service)
+{
+ Wsrep_high_priority_service&
+ orig_hps(static_cast<Wsrep_high_priority_service&>(orig_high_priority_service));
+ return wsrep_create_streaming_applier(orig_hps.m_thd, "high priority");
+}
+
+void Wsrep_server_service::release_high_priority_service(wsrep::high_priority_service* high_priority_service)
+{
+ Wsrep_high_priority_service* hps=
+ static_cast<Wsrep_high_priority_service*>(high_priority_service);
+ THD* thd= hps->m_thd;
+ delete hps;
+ wsrep_store_threadvars(thd);
+ delete thd;
+ wsrep_delete_threadvars();
+}
+
+void Wsrep_server_service::background_rollback(wsrep::client_state& client_state)
+{
+ Wsrep_client_state& cs= static_cast<Wsrep_client_state&>(client_state);
+ wsrep_fire_rollbacker(cs.thd());
+}
+
+void Wsrep_server_service::bootstrap()
+{
+ wsrep::log_info()
+ << "Bootstrapping a new cluster, setting initial position to "
+ << wsrep::gtid::undefined();
+ wsrep_set_SE_checkpoint(wsrep::gtid::undefined());
+}
+
+void Wsrep_server_service::log_message(enum wsrep::log::level level,
+ const char* message)
+{
+ switch (level)
+ {
+ case wsrep::log::debug:
+ WSREP_DEBUG("%s", message);
+ break;
+ case wsrep::log::info:
+ WSREP_INFO("%s", message);
+ break;
+ case wsrep::log::warning:
+ WSREP_WARN("%s", message);
+ break;
+ case wsrep::log::error:
+ WSREP_ERROR("%s", message);
+ break;
+ case wsrep::log::unknown:
+ WSREP_UNKNOWN("%s", message);
+ break;
+ }
+}
+
+void Wsrep_server_service::log_view(
+ wsrep::high_priority_service* high_priority_service,
+ const wsrep::view& view)
+{
+ Wsrep_high_priority_service* applier=
+ static_cast<Wsrep_high_priority_service*>(high_priority_service);
+ /* Update global system variables */
+ mysql_mutex_lock(&LOCK_global_system_variables);
+ if (wsrep_auto_increment_control && view.own_index() >= 0)
+ {
+ global_system_variables.auto_increment_offset= view.own_index() + 1;
+ global_system_variables.auto_increment_increment= view.members().size();
+ wsrep_protocol_version= view.protocol_version();
+ }
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+
+ /* Update wsrep status variables */
+ mysql_mutex_lock(&LOCK_status);
+ wsrep_cluster_size= view.members().size();
+ wsrep_local_index= view.own_index();
+ std::ostringstream os;
+ os << view.state_id().id();
+ wsrep_update_cluster_state_uuid(os.str().c_str());
+ mysql_mutex_unlock(&LOCK_status);
+ wsrep_config_state->set(view);
+ wsrep_cluster_conf_id= view.view_seqno().get();
+
+ if (view.status() == wsrep::view::primary)
+ {
+ if (applier)
+ {
+ Wsrep_id id;
+ Wsrep_view prev_view= wsrep_schema->restore_view(applier->m_thd, id);
+ bool checkpoint_was_reset= false;
+ if (prev_view.state_id().id() != view.state_id().id())
+ {
+ WSREP_DEBUG("New cluster UUID was generated, resetting position info");
+ wsrep_set_SE_checkpoint(wsrep::gtid::undefined());
+ checkpoint_was_reset= true;
+ }
+
+ if (wsrep_debug)
+ {
+ std::ostringstream os;
+ os << "Storing cluster view:\n" << view;
+ WSREP_INFO("%s", os.str().c_str());
+ DBUG_ASSERT(prev_view.state_id().id() != view.state_id().id() ||
+ view.state_id().seqno().get() >= prev_view.state_id().seqno().get());
+ }
+
+ if (trans_begin(applier->m_thd, MYSQL_START_TRANS_OPT_READ_WRITE))
+ {
+ WSREP_WARN("Failed to start transaction for store view");
+ }
+ else
+ {
+ if (wsrep_schema->store_view(applier->m_thd, view))
+ {
+ WSREP_WARN("Failed to store view");
+ trans_rollback_stmt(applier->m_thd);
+ if (!trans_rollback(applier->m_thd))
+ {
+ close_thread_tables(applier->m_thd);
+ }
+ }
+ else
+ {
+ if (trans_commit(applier->m_thd))
+ {
+ WSREP_WARN("Failed to commit transaction for store view");
+ }
+ }
+ applier->m_thd->release_transactional_locks();
+ }
+
+ /*
+ Backwards compatibility: When running in mixed cluster with
+ Galera 3.x, the provider does not generate unique sequence numbers
+ for views. This condition can be checked by inspecting last
+ committed as returned by the provider. If the last_committed
+ matches to view state_id seqno, the cluster runs in backwards
+ compatibility mode and we skip setting the checkpoint for
+ view.
+ */
+ wsrep::seqno last_committed=
+ Wsrep_server_state::instance().provider().last_committed_gtid().seqno();
+ if (checkpoint_was_reset || last_committed != view.state_id().seqno())
+ {
+ wsrep_set_SE_checkpoint(view.state_id());
+ }
+ DBUG_ASSERT(wsrep_get_SE_checkpoint().id() == view.state_id().id());
+ }
+ else
+ {
+ WSREP_DEBUG("No applier in Wsrep_server_service::log_view(), "
+ "skipping write to wsrep_schema");
+ }
+ }
+}
+
+void Wsrep_server_service::recover_streaming_appliers(wsrep::client_service& cs)
+{
+ Wsrep_client_service& client_service= static_cast<Wsrep_client_service&>(cs);
+ wsrep_recover_sr_from_storage(client_service.m_thd);
+}
+
+void Wsrep_server_service::recover_streaming_appliers(
+ wsrep::high_priority_service& hs)
+{
+ Wsrep_high_priority_service& high_priority_service=
+ static_cast<Wsrep_high_priority_service&>(hs);
+ wsrep_recover_sr_from_storage(high_priority_service.m_thd);
+}
+
+wsrep::view Wsrep_server_service::get_view(wsrep::client_service& c,
+ const wsrep::id& own_id)
+{
+ Wsrep_client_service& cs(static_cast<Wsrep_client_service&>(c));
+ wsrep::view v(wsrep_schema->restore_view(cs.m_thd, own_id));
+ return v;
+}
+
+wsrep::gtid Wsrep_server_service::get_position(wsrep::client_service&)
+{
+ return wsrep_get_SE_checkpoint();
+}
+
+void Wsrep_server_service::set_position(wsrep::client_service& c WSREP_UNUSED,
+ const wsrep::gtid& gtid)
+{
+ Wsrep_client_service& cs WSREP_UNUSED (static_cast<Wsrep_client_service&>(c));
+ DBUG_ASSERT(cs.m_client_state.transaction().state()
+ == wsrep::transaction::s_aborted);
+ // Wait until all prior committers have finished.
+ wsrep::gtid wait_for(gtid.id(),
+ wsrep::seqno(gtid.seqno().get() - 1));
+ if (auto err = Wsrep_server_state::instance().provider()
+ .wait_for_gtid(wait_for, std::numeric_limits<int>::max()))
+ {
+ WSREP_WARN("Wait for gtid returned error %d while waiting for "
+ "prior transactions to commit before setting position", err);
+ }
+ wsrep_set_SE_checkpoint(gtid);
+}
+
+void Wsrep_server_service::log_state_change(
+ enum Wsrep_server_state::state prev_state,
+ enum Wsrep_server_state::state current_state)
+{
+ WSREP_INFO("Server status change %s -> %s",
+ wsrep::to_c_string(prev_state),
+ wsrep::to_c_string(current_state));
+ mysql_mutex_lock(&LOCK_status);
+ switch (current_state)
+ {
+ case Wsrep_server_state::s_synced:
+ wsrep_ready= TRUE;
+ WSREP_INFO("Synchronized with group, ready for connections");
+ /* fall through */
+ case Wsrep_server_state::s_joined:
+ case Wsrep_server_state::s_donor:
+ wsrep_cluster_status= "Primary";
+ break;
+ case Wsrep_server_state::s_connected:
+ wsrep_cluster_status= "non-Primary";
+ wsrep_ready= FALSE;
+ wsrep_connected= TRUE;
+ break;
+ case Wsrep_server_state::s_disconnected:
+ wsrep_ready= FALSE;
+ wsrep_connected= FALSE;
+ wsrep_cluster_status= "Disconnected";
+ break;
+ default:
+ wsrep_ready= FALSE;
+ wsrep_cluster_status= "non-Primary";
+ break;
+ }
+ mysql_mutex_unlock(&LOCK_status);
+ wsrep_config_state->set(current_state);
+}
+
+bool Wsrep_server_service::sst_before_init() const
+{
+ return wsrep_before_SE();
+}
+
+std::string Wsrep_server_service::sst_request()
+{
+ return wsrep_sst_prepare();
+}
+
+int Wsrep_server_service::start_sst(const std::string& sst_request,
+ const wsrep::gtid& gtid,
+ bool bypass)
+{
+ return wsrep_sst_donate(sst_request, gtid, bypass);
+}
+
+int Wsrep_server_service::wait_committing_transactions(int timeout)
+{
+ return wsrep_wait_committing_connections_close(timeout);
+}
+
+void Wsrep_server_service::debug_sync(const char* sync_point)
+{
+ DBUG_EXECUTE_IF(sync_point, {
+ std::stringstream dbug_action;
+ dbug_action << "now "
+ << "SIGNAL " << sync_point << "_reached "
+ << "WAIT_FOR " << sync_point << "_continue";
+ const std::string& action(dbug_action.str());
+ DBUG_ASSERT(!debug_sync_set_action(current_thd,
+ action.c_str(),
+ action.length()));
+ };);
+}
diff --git a/sql/wsrep_server_service.h b/sql/wsrep_server_service.h
new file mode 100644
index 00000000000..168e98206e3
--- /dev/null
+++ b/sql/wsrep_server_service.h
@@ -0,0 +1,101 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#ifndef WSREP_SERVER_SERVICE_H
+#define WSREP_SERVER_SERVICE_H
+
+/* wsrep-lib */
+#include "wsrep/server_service.hpp"
+#include "wsrep/exception.hpp" // not_impemented_error(), remove when finished
+#include "wsrep/storage_service.hpp"
+
+class Wsrep_server_state;
+
+
+/* wsrep::server_service interface implementation */
+class Wsrep_server_service : public wsrep::server_service
+{
+public:
+ Wsrep_server_service(Wsrep_server_state& server_state)
+ : m_server_state(server_state)
+ { }
+
+ wsrep::storage_service* storage_service(wsrep::client_service&);
+
+ wsrep::storage_service* storage_service(wsrep::high_priority_service&);
+
+ void release_storage_service(wsrep::storage_service*);
+
+ wsrep::high_priority_service*
+ streaming_applier_service(wsrep::client_service&);
+
+ wsrep::high_priority_service*
+ streaming_applier_service(wsrep::high_priority_service&);
+
+ void release_high_priority_service(wsrep::high_priority_service*);
+
+ void background_rollback(wsrep::client_state&);
+
+ void bootstrap();
+ void log_message(enum wsrep::log::level, const char*);
+
+ void log_dummy_write_set(wsrep::client_state&, const wsrep::ws_meta&)
+ { throw wsrep::not_implemented_error(); }
+
+ void log_view(wsrep::high_priority_service*, const wsrep::view&);
+
+ void recover_streaming_appliers(wsrep::client_service&);
+ void recover_streaming_appliers(wsrep::high_priority_service&);
+ wsrep::view get_view(wsrep::client_service&, const wsrep::id& own_id);
+
+ wsrep::gtid get_position(wsrep::client_service&);
+ void set_position(wsrep::client_service&, const wsrep::gtid&);
+
+ void log_state_change(enum wsrep::server_state::state,
+ enum wsrep::server_state::state);
+
+ bool sst_before_init() const;
+
+ std::string sst_request();
+ int start_sst(const std::string&, const wsrep::gtid&, bool);
+
+ int wait_committing_transactions(int);
+
+ void debug_sync(const char*);
+private:
+ Wsrep_server_state& m_server_state;
+};
+
+/**
+ Helper method to create new streaming applier.
+
+ @param orig_thd Original thd context to copy operation context from.
+ @param ctx Context string for debug logging.
+ */
+class Wsrep_applier_service;
+Wsrep_applier_service*
+wsrep_create_streaming_applier(THD *orig_thd, const char *ctx);
+
+/**
+ Helper method to create new storage service.
+
+ @param orig_thd Original thd context to copy operation context from.
+ @param ctx Context string for debug logging.
+*/
+class Wsrep_storage_service;
+Wsrep_storage_service*
+wsrep_create_storage_service(THD *orig_thd, const char *ctx);
+
+#endif /* WSREP_SERVER_SERVICE */
diff --git a/sql/wsrep_server_state.cc b/sql/wsrep_server_state.cc
new file mode 100644
index 00000000000..973850871b1
--- /dev/null
+++ b/sql/wsrep_server_state.cc
@@ -0,0 +1,85 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#include "my_global.h"
+#include "wsrep_api.h"
+#include "wsrep_server_state.h"
+#include "wsrep_binlog.h" /* init/deinit group commit */
+
+mysql_mutex_t LOCK_wsrep_server_state;
+mysql_cond_t COND_wsrep_server_state;
+
+#ifdef HAVE_PSI_INTERFACE
+PSI_mutex_key key_LOCK_wsrep_server_state;
+PSI_cond_key key_COND_wsrep_server_state;
+#endif
+
+Wsrep_server_state::Wsrep_server_state(const std::string& name,
+ const std::string& incoming_address,
+ const std::string& address,
+ const std::string& working_dir,
+ const wsrep::gtid& initial_position,
+ int max_protocol_version)
+ : wsrep::server_state(m_mutex,
+ m_cond,
+ m_service,
+ NULL,
+ name,
+ incoming_address,
+ address,
+ working_dir,
+ initial_position,
+ max_protocol_version,
+ wsrep::server_state::rm_sync)
+ , m_mutex(&LOCK_wsrep_server_state)
+ , m_cond(&COND_wsrep_server_state)
+ , m_service(*this)
+{ }
+
+Wsrep_server_state::~Wsrep_server_state()
+{ }
+
+void Wsrep_server_state::init_once(const std::string& name,
+ const std::string& incoming_address,
+ const std::string& address,
+ const std::string& working_dir,
+ const wsrep::gtid& initial_position,
+ int max_protocol_version)
+{
+ if (m_instance == 0)
+ {
+ mysql_mutex_init(key_LOCK_wsrep_server_state, &LOCK_wsrep_server_state,
+ MY_MUTEX_INIT_FAST);
+ mysql_cond_init(key_COND_wsrep_server_state, &COND_wsrep_server_state, 0);
+ m_instance = new Wsrep_server_state(name,
+ incoming_address,
+ address,
+ working_dir,
+ initial_position,
+ max_protocol_version);
+ }
+}
+
+void Wsrep_server_state::destroy()
+{
+
+ if (m_instance)
+ {
+ delete m_instance;
+ m_instance= 0;
+ mysql_mutex_destroy(&LOCK_wsrep_server_state);
+ mysql_cond_destroy(&COND_wsrep_server_state);
+ }
+}
diff --git a/sql/wsrep_server_state.h b/sql/wsrep_server_state.h
new file mode 100644
index 00000000000..1ef937300f6
--- /dev/null
+++ b/sql/wsrep_server_state.h
@@ -0,0 +1,74 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#ifndef WSREP_SERVER_STATE_H
+#define WSREP_SERVER_STATE_H
+
+/* wsrep-lib */
+#include "wsrep/server_state.hpp"
+#include "wsrep/provider.hpp"
+
+/* implementation */
+#include "wsrep_server_service.h"
+#include "wsrep_mutex.h"
+#include "wsrep_condition_variable.h"
+
+class Wsrep_server_state : public wsrep::server_state
+{
+public:
+ static void init_once(const std::string& name,
+ const std::string& incoming_address,
+ const std::string& address,
+ const std::string& working_dir,
+ const wsrep::gtid& initial_position,
+ int max_protocol_version);
+ static void destroy();
+
+ static Wsrep_server_state& instance()
+ {
+ return *m_instance;
+ }
+
+ static bool is_inited()
+ {
+ return (m_instance != NULL);
+ }
+
+ static wsrep::provider& get_provider()
+ {
+ return instance().provider();
+ }
+
+ static bool has_capability(int capability)
+ {
+ return (get_provider().capabilities() & capability);
+ }
+
+private:
+ Wsrep_server_state(const std::string& name,
+ const std::string& incoming_address,
+ const std::string& address,
+ const std::string& working_dir,
+ const wsrep::gtid& initial_position,
+ int max_protocol_version);
+ ~Wsrep_server_state();
+ Wsrep_mutex m_mutex;
+ Wsrep_condition_variable m_cond;
+ Wsrep_server_service m_service;
+ static Wsrep_server_state* m_instance;
+
+};
+
+#endif // WSREP_SERVER_STATE_H
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 504b5741c0f..a8642189bff 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -29,6 +29,9 @@
#include "wsrep_priv.h"
#include "wsrep_utils.h"
#include "wsrep_xid.h"
+#include "wsrep_thd.h"
+#include "wsrep_server_state.h"
+
#include <cstdio>
#include <cstdlib>
#include "debug_sync.h"
@@ -38,16 +41,136 @@
static char wsrep_defaults_file[FN_REFLEN * 2 + 10 + 30 +
sizeof(WSREP_SST_OPT_CONF) +
sizeof(WSREP_SST_OPT_CONF_SUFFIX) +
- sizeof(WSREP_SST_OPT_CONF_EXTRA)] = {0};
+ sizeof(WSREP_SST_OPT_CONF_EXTRA)]= {0};
-const char* wsrep_sst_method = WSREP_SST_DEFAULT;
-const char* wsrep_sst_receive_address = WSREP_SST_ADDRESS_AUTO;
-const char* wsrep_sst_donor = "";
-const char* wsrep_sst_auth = NULL;
+const char* wsrep_sst_method = WSREP_SST_DEFAULT;
+const char* wsrep_sst_receive_address= WSREP_SST_ADDRESS_AUTO;
+const char* wsrep_sst_donor = "";
+const char* wsrep_sst_auth = NULL;
// container for real auth string
-static const char* sst_auth_real = NULL;
-my_bool wsrep_sst_donor_rejects_queries = FALSE;
+static const char* sst_auth_real = NULL;
+my_bool wsrep_sst_donor_rejects_queries= FALSE;
+
+#define WSREP_EXTEND_TIMEOUT_INTERVAL 60
+#define WSREP_TIMEDWAIT_SECONDS 30
+
+bool sst_joiner_completed = false;
+bool sst_donor_completed = false;
+
+struct sst_thread_arg
+{
+ const char* cmd;
+ char** env;
+ char* ret_str;
+ int err;
+ mysql_mutex_t lock;
+ mysql_cond_t cond;
+
+ sst_thread_arg (const char* c, char** e)
+ : cmd(c), env(e), ret_str(0), err(-1)
+ {
+ mysql_mutex_init(key_LOCK_wsrep_sst_thread, &lock, MY_MUTEX_INIT_FAST);
+ mysql_cond_init(key_COND_wsrep_sst_thread, &cond, NULL);
+ }
+
+ ~sst_thread_arg()
+ {
+ mysql_cond_destroy (&cond);
+ mysql_mutex_unlock (&lock);
+ mysql_mutex_destroy (&lock);
+ }
+};
+
+static void wsrep_donor_monitor_end(void)
+{
+ mysql_mutex_lock(&LOCK_wsrep_donor_monitor);
+ sst_donor_completed= true;
+ mysql_cond_signal(&COND_wsrep_donor_monitor);
+ mysql_mutex_unlock(&LOCK_wsrep_donor_monitor);
+}
+
+static void wsrep_joiner_monitor_end(void)
+{
+ mysql_mutex_lock(&LOCK_wsrep_joiner_monitor);
+ sst_joiner_completed= true;
+ mysql_cond_signal(&COND_wsrep_joiner_monitor);
+ mysql_mutex_unlock(&LOCK_wsrep_joiner_monitor);
+}
+
+static void* wsrep_sst_donor_monitor_thread(void *arg __attribute__((unused)))
+{
+ int ret= 0;
+ unsigned long time_waited= 0;
+
+ mysql_mutex_lock(&LOCK_wsrep_donor_monitor);
+
+ WSREP_INFO("Donor monitor thread started to monitor");
+
+ wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can
+ // operate with wsrep_ready == OFF
+
+ while (!sst_donor_completed)
+ {
+ timespec ts;
+ set_timespec(ts, WSREP_TIMEDWAIT_SECONDS);
+ time_t start_time= time(NULL);
+ ret= mysql_cond_timedwait(&COND_wsrep_donor_monitor, &LOCK_wsrep_donor_monitor, &ts);
+ time_t end_time= time(NULL);
+ time_waited+= difftime(end_time, start_time);
+
+ if (ret == ETIMEDOUT && !sst_donor_completed)
+ {
+ WSREP_DEBUG("Donor waited %lu sec, extending systemd startup timeout as SST"
+ "is not completed",
+ time_waited);
+ service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
+ "WSREP state transfer ongoing...");
+ }
+ }
+
+ WSREP_INFO("Donor monitor thread ended with total time %lu sec", time_waited);
+ mysql_mutex_unlock(&LOCK_wsrep_donor_monitor);
+
+ return NULL;
+}
+
+static void* wsrep_sst_joiner_monitor_thread(void *arg __attribute__((unused)))
+{
+ int ret= 0;
+ unsigned long time_waited= 0;
+
+ mysql_mutex_lock(&LOCK_wsrep_joiner_monitor);
+
+ WSREP_INFO("Joiner monitor thread started to monitor");
+
+ wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can
+ // operate with wsrep_ready == OFF
+
+ while (!sst_joiner_completed)
+ {
+ timespec ts;
+ set_timespec(ts, WSREP_TIMEDWAIT_SECONDS);
+ time_t start_time= time(NULL);
+ ret= mysql_cond_timedwait(&COND_wsrep_joiner_monitor, &LOCK_wsrep_joiner_monitor, &ts);
+ time_t end_time= time(NULL);
+ time_waited+= difftime(end_time, start_time);
+
+ if (ret == ETIMEDOUT && !sst_joiner_completed)
+ {
+ WSREP_DEBUG("Joiner waited %lu sec, extending systemd startup timeout as SST"
+ "is not completed",
+ time_waited);
+ service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
+ "WSREP state transfer ongoing...");
+ }
+ }
+
+ WSREP_INFO("Joiner monitor thread ended with total time %lu sec", time_waited);
+ mysql_mutex_unlock(&LOCK_wsrep_joiner_monitor);
+
+ return NULL;
+}
bool wsrep_sst_method_check (sys_var *self, THD* thd, set_var* var)
{
@@ -63,7 +186,7 @@ bool wsrep_sst_method_check (sys_var *self, THD* thd, set_var* var)
return 0;
}
-static const char* data_home_dir = NULL;
+static const char* data_home_dir;
void wsrep_set_data_home_dir(const char *data_dir)
{
@@ -137,7 +260,7 @@ static bool sst_auth_real_set (const char* value)
{
// set sst_auth_real
if (sst_auth_real) { my_free((void *) sst_auth_real); }
- sst_auth_real = v;
+ sst_auth_real= v;
// mask wsrep_sst_auth
if (strlen(sst_auth_real))
@@ -184,6 +307,7 @@ bool wsrep_sst_donor_update (sys_var *self, THD* thd, enum_var_type type)
return 0;
}
+
bool wsrep_before_SE()
{
return (wsrep_provider != NULL
@@ -192,227 +316,114 @@ bool wsrep_before_SE()
&& strcmp (wsrep_sst_method, WSREP_SST_MYSQLDUMP));
}
-static bool sst_complete = false;
-static bool sst_needed = false;
-
-#define WSREP_EXTEND_TIMEOUT_INTERVAL 30
-#define WSREP_TIMEDWAIT_SECONDS 10
-
-void wsrep_sst_grab ()
-{
- WSREP_INFO("wsrep_sst_grab()");
- if (mysql_mutex_lock (&LOCK_wsrep_sst)) abort();
- sst_complete = false;
- mysql_mutex_unlock (&LOCK_wsrep_sst);
-}
-
-// Wait for end of SST
-bool wsrep_sst_wait ()
-{
- double total_wtime = 0;
-
- if (mysql_mutex_lock (&LOCK_wsrep_sst))
- abort();
-
- WSREP_INFO("Waiting for SST to complete.");
-
- while (!sst_complete)
- {
- struct timespec wtime;
- set_timespec(wtime, WSREP_TIMEDWAIT_SECONDS);
- time_t start_time = time(NULL);
- mysql_cond_timedwait (&COND_wsrep_sst, &LOCK_wsrep_sst, &wtime);
- time_t end_time = time(NULL);
-
- if (!sst_complete)
- {
- total_wtime += difftime(end_time, start_time);
- WSREP_DEBUG("Waiting for SST to complete. current seqno: %" PRId64 " waited %f secs.", local_seqno, total_wtime);
- service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
- "WSREP state transfer ongoing, current seqno: %" PRId64 " waited %f secs", local_seqno, total_wtime);
- }
- }
-
- if (local_seqno >= 0)
- {
- WSREP_INFO("SST complete, seqno: %lld", (long long) local_seqno);
- }
- else
- {
- WSREP_ERROR("SST failed: %d (%s)",
- int(-local_seqno), strerror(-local_seqno));
- }
-
- mysql_mutex_unlock (&LOCK_wsrep_sst);
-
- return (local_seqno >= 0);
-}
-
// Signal end of SST
-void wsrep_sst_complete (const wsrep_uuid_t* sst_uuid,
- wsrep_seqno_t sst_seqno,
- bool needed)
+static bool wsrep_sst_complete (THD* thd,
+ int const rcode,
+ wsrep::gtid const sst_gtid)
{
- if (mysql_mutex_lock (&LOCK_wsrep_sst)) abort();
- if (!sst_complete)
- {
- sst_complete = true;
- sst_needed = needed;
- local_uuid = *sst_uuid;
- local_seqno = sst_seqno;
- mysql_cond_signal (&COND_wsrep_sst);
+ Wsrep_client_service client_service(thd, thd->wsrep_cs());
+ Wsrep_server_state& server_state= Wsrep_server_state::instance();
+ enum wsrep::server_state::state state= server_state.state();
+ bool failed= false;
+ char start_pos_buf[FN_REFLEN];
+ ssize_t len= wsrep::print_to_c_str(sst_gtid, start_pos_buf, FN_REFLEN-1);
+ start_pos_buf[len]='\0';
+
+ // Do not call sst_received if we are not in joiner or
+ // initialized state on server. This is because it
+ // assumes we are on those states. Give error if we are
+ // in incorrect state.
+ if ((state == Wsrep_server_state::s_joiner ||
+ state == Wsrep_server_state::s_initialized))
+ {
+ Wsrep_server_state::instance().sst_received(client_service,
+ rcode);
+ WSREP_INFO("SST succeeded for position %s", start_pos_buf);
}
else
{
- /* This can happen when called from wsrep_synced_cb().
- At the moment there is no way to check there
- if main thread is still waiting for signal,
- so wsrep_sst_complete() is called from there
- each time wsrep_ready changes from FALSE -> TRUE.
- */
- WSREP_DEBUG("Nobody is waiting for SST.");
+ WSREP_ERROR("SST failed for position %s initialized %d server_state %s",
+ start_pos_buf,
+ server_state.is_initialized(),
+ wsrep::to_c_string(state));
+ failed= true;
}
- mysql_mutex_unlock (&LOCK_wsrep_sst);
+
+ wsrep_joiner_monitor_end();
+ return failed;
}
-/*
+ /*
If wsrep provider is loaded, inform that the new state snapshot
has been received. Also update the local checkpoint.
- @param wsrep [IN] wsrep handle
+ @param thd [IN]
@param uuid [IN] Initial state UUID
@param seqno [IN] Initial state sequence number
@param state [IN] Always NULL, also ignored by wsrep provider (?)
@param state_len [IN] Always 0, also ignored by wsrep provider (?)
- @param implicit [IN] Whether invoked implicitly due to SST
- (true) or explicitly because if change
- in wsrep_start_position by user (false).
- @return false Success
- true Error
-
+ @return true when successful, false if error
*/
-bool wsrep_sst_received (wsrep_t* const wsrep,
- const wsrep_uuid_t& uuid,
- const wsrep_seqno_t seqno,
- const void* const state,
- const size_t state_len,
- const bool implicit)
+bool wsrep_sst_received (THD* thd,
+ const wsrep_uuid_t& uuid,
+ wsrep_seqno_t const seqno,
+ const void* const state,
+ size_t const state_len)
{
+ bool error= false;
/*
To keep track of whether the local uuid:seqno should be updated. Also, note
that local state (uuid:seqno) is updated/checkpointed only after we get an
OK from wsrep provider. By doing so, the values remain consistent across
the server & wsrep provider.
*/
- bool do_update= false;
-
- // Get the locally stored uuid:seqno.
- if (wsrep_get_SE_checkpoint(local_uuid, local_seqno))
- {
- return true;
- }
-
- if (memcmp(&local_uuid, &uuid, sizeof(wsrep_uuid_t)) ||
- local_seqno < seqno || seqno < 0)
- {
- do_update= true;
- }
- else if (local_seqno > seqno)
- {
- WSREP_WARN("SST position can't be set in past. Requested: %lld, Current: "
- " %lld.", (long long)seqno, (long long)local_seqno);
/*
- If we are here because of SET command, simply return true (error) instead of
- aborting.
+ TODO: Handle backwards compatibility. WSREP API v25 does not have
+ wsrep schema.
*/
- if (implicit)
- {
- WSREP_WARN("Can't continue.");
- unireg_abort(1);
- }
- else
- {
- return true;
+ /*
+ Logical SST methods (mysqldump etc) don't update InnoDB sys header.
+ Reset the SE checkpoint before recovering view in order to avoid
+ sanity check failure.
+ */
+ wsrep::gtid const sst_gtid(wsrep::id(uuid.data, sizeof(uuid.data)),
+ wsrep::seqno(seqno));
+
+ if (!wsrep_before_SE()) {
+ wsrep_set_SE_checkpoint(wsrep::gtid::undefined());
+ wsrep_set_SE_checkpoint(sst_gtid);
}
- }
-
-#ifdef GTID_SUPPORT
- wsrep_init_sidno(uuid);
-#endif /* GTID_SUPPORT */
+ wsrep_verify_SE_checkpoint(uuid, seqno);
- if (wsrep)
- {
- int const rcode(seqno < 0 ? seqno : 0);
- wsrep_gtid_t const state_id= {uuid,
- (rcode ? WSREP_SEQNO_UNDEFINED : seqno)};
-
- wsrep_status_t ret= wsrep->sst_received(wsrep, &state_id, state,
- state_len, rcode);
-
- if (ret != WSREP_OK)
- {
- return true;
+ /*
+ Both wsrep_init_SR() and wsrep_recover_view() may use
+ wsrep thread pool. Restore original thd context before returning.
+ */
+ if (thd) {
+ wsrep_store_threadvars(thd);
+ }
+ else {
+ my_pthread_setspecific_ptr(THR_THD, NULL);
}
- }
- // Now is the good time to update the local state and checkpoint.
- if (do_update)
- {
- if (wsrep_set_SE_checkpoint(uuid, seqno))
+ /* During sst WSREP(thd) is not yet set for joiner. */
+ if (WSREP_ON)
{
- return true;
+ int const rcode(seqno < 0 ? seqno : 0);
+ error= wsrep_sst_complete(thd,rcode, sst_gtid);
}
- local_uuid= uuid;
- local_seqno= seqno;
- }
-
- return false;
+ return error;
}
-// Let applier threads to continue
-bool wsrep_sst_continue ()
-{
- if (sst_needed)
- {
- WSREP_INFO("Signalling provider to continue.");
- return wsrep_sst_received (wsrep, local_uuid, local_seqno, NULL, 0, true);
- }
- return false;
-}
-
-struct sst_thread_arg
-{
- const char* cmd;
- char** env;
- char* ret_str;
- int err;
- mysql_mutex_t lock;
- mysql_cond_t cond;
-
- sst_thread_arg (const char* c, char** e)
- : cmd(c), env(e), ret_str(0), err(-1)
- {
- mysql_mutex_init(key_LOCK_wsrep_sst_thread, &lock, MY_MUTEX_INIT_FAST);
- mysql_cond_init(key_COND_wsrep_sst_thread, &cond, NULL);
- }
-
- ~sst_thread_arg()
- {
- mysql_cond_destroy (&cond);
- mysql_mutex_unlock (&lock);
- mysql_mutex_destroy (&lock);
- }
-};
-
static int sst_scan_uuid_seqno (const char* str,
wsrep_uuid_t* uuid, wsrep_seqno_t* seqno)
{
- int offt = wsrep_uuid_scan (str, strlen(str), uuid);
+ int offt= wsrep_uuid_scan (str, strlen(str), uuid);
errno= 0; /* Reset the errno */
if (offt > 0 && strlen(str) > (unsigned int)offt && ':' == str[offt])
{
- *seqno = strtoll (str + offt + 1, NULL, 10);
+ *seqno= strtoll (str + offt + 1, NULL, 10);
if (*seqno != LLONG_MAX || errno != ERANGE)
{
return 0;
@@ -420,7 +431,7 @@ static int sst_scan_uuid_seqno (const char* str,
}
WSREP_ERROR("Failed to parse uuid:seqno pair: '%s'", str);
- return EINVAL;
+ return -EINVAL;
}
// get rid of trailing \n
@@ -430,8 +441,8 @@ static char* my_fgets (char* buf, size_t buf_len, FILE* stream)
if (ret)
{
- size_t len = strlen(ret);
- if (len > 0 && ret[len - 1] == '\n') ret[len - 1] = '\0';
+ size_t len= strlen(ret);
+ if (len > 0 && ret[len - 1] == '\n') ret[len - 1]= '\0';
}
return ret;
@@ -494,7 +505,8 @@ static int generate_binlog_index_opt_val(char** ret)
{
DBUG_ASSERT(ret);
*ret= NULL;
- if (opt_binlog_index_name) {
+ if (opt_binlog_index_name)
+ {
*ret= strcmp(opt_binlog_index_name, "0") ?
generate_name_value(WSREP_SST_OPT_BINLOG_INDEX,
opt_binlog_index_name) :
@@ -514,9 +526,10 @@ static void* sst_joiner_thread (void* a)
int err= 1;
{
- const char magic[] = "ready";
- const size_t magic_len = sizeof(magic) - 1;
- const size_t out_len = 512;
+ THD* thd;
+ const char magic[]= "ready";
+ const size_t magic_len= sizeof(magic) - 1;
+ const size_t out_len= 512;
char out[out_len];
WSREP_INFO("Running: '%s'", arg->cmd);
@@ -533,29 +546,31 @@ static void* sst_joiner_thread (void* a)
WSREP_ERROR("Failed to read '%s <addr>' from: %s\n\tRead: '%s'",
magic, arg->cmd, tmp);
proc.wait();
- if (proc.error()) err = proc.error();
+ if (proc.error()) err= proc.error();
}
else
{
- err = 0;
+ err= 0;
}
}
else
{
- err = proc.error();
+ err= proc.error();
WSREP_ERROR("Failed to execute: %s : %d (%s)",
arg->cmd, err, strerror(err));
}
- // signal sst_prepare thread with ret code,
- // it will go on sending SST request
+ /*
+ signal sst_prepare thread with ret code,
+ it will go on sending SST request
+ */
mysql_mutex_lock (&arg->lock);
if (!err)
{
- arg->ret_str = strdup (out + magic_len + 1);
- if (!arg->ret_str) err = ENOMEM;
+ arg->ret_str= strdup (out + magic_len + 1);
+ if (!arg->ret_str) err= ENOMEM;
}
- arg->err = -err;
+ arg->err= -err;
mysql_cond_signal (&arg->cond);
mysql_mutex_unlock (&arg->lock); //! @note arg is unusable after that.
@@ -563,20 +578,22 @@ static void* sst_joiner_thread (void* a)
* initializer thread to ensure single thread of
* shutdown. */
- wsrep_uuid_t ret_uuid = WSREP_UUID_UNDEFINED;
- wsrep_seqno_t ret_seqno = WSREP_SEQNO_UNDEFINED;
+ wsrep_uuid_t ret_uuid = WSREP_UUID_UNDEFINED;
+ wsrep_seqno_t ret_seqno= WSREP_SEQNO_UNDEFINED;
- // in case of successfull receiver start, wait for SST completion/end
- char* tmp = my_fgets (out, out_len, proc.pipe());
+ // in case of successfull receiver start, wait for SST
+ // completion/end
+ char* tmp= my_fgets (out, out_len, proc.pipe());
proc.wait();
+
err= EINVAL;
if (!tmp)
{
WSREP_ERROR("Failed to read uuid:seqno and wsrep_gtid_domain_id from "
"joiner script.");
- if (proc.error()) err = proc.error();
+ if (proc.error()) err= proc.error();
}
else
{
@@ -584,7 +601,14 @@ static void* sst_joiner_thread (void* a)
const char *pos= strchr(out, ' ');
if (!pos) {
- // There is no wsrep_gtid_domain_id (some older version SST script?).
+
+ if (wsrep_gtid_mode)
+ {
+ // There is no wsrep_gtid_domain_id (some older version SST script?).
+ WSREP_WARN("Did not find domain ID from SST script output '%s'. "
+ "Domain ID must be set manually to keep binlog consistent",
+ out);
+ }
err= sst_scan_uuid_seqno (out, &ret_uuid, &ret_seqno);
} else {
@@ -620,14 +644,60 @@ static void* sst_joiner_thread (void* a)
err:
+ wsrep::gtid ret_gtid;
+
if (err)
{
- ret_uuid= WSREP_UUID_UNDEFINED;
- ret_seqno= -err;
+ ret_gtid= wsrep::gtid::undefined();
+ }
+ else
+ {
+ ret_gtid= wsrep::gtid(wsrep::id(ret_uuid.data, sizeof(ret_uuid.data)),
+ wsrep::seqno(ret_seqno));
+ }
+
+ /*
+ Tell initializer thread that SST is complete
+ For that initialize a THD
+ */
+ if (my_thread_init())
+ {
+ WSREP_ERROR("my_thread_init() failed, can't signal end of SST. "
+ "Aborting.");
+ unireg_abort(1);
+ }
+
+ thd= new THD(next_thread_id());
+
+ if (!thd)
+ {
+ WSREP_ERROR("Failed to allocate THD to restore view from local state, "
+ "can't signal end of SST. Aborting.");
+ unireg_abort(1);
}
- // Tell initializer thread that SST is complete
- wsrep_sst_complete (&ret_uuid, ret_seqno, true);
+ thd->thread_stack= (char*) &thd;
+ thd->security_ctx->skip_grants();
+ thd->system_thread= SYSTEM_THREAD_GENERIC;
+ thd->real_id= pthread_self();
+
+ wsrep_assign_from_threadvars(thd);
+ wsrep_store_threadvars(thd);
+
+ /* */
+ thd->variables.wsrep_on = 0;
+ /* No binlogging */
+ thd->variables.sql_log_bin = 0;
+ thd->variables.option_bits &= ~OPTION_BIN_LOG;
+ /* No general log */
+ thd->variables.option_bits |= OPTION_LOG_OFF;
+ /* Read committed isolation to avoid gap locking */
+ thd->variables.tx_isolation= ISO_READ_COMMITTED;
+
+ wsrep_sst_complete (thd, -err, ret_gtid);
+
+ delete thd;
+ my_thread_end();
}
return NULL;
@@ -1043,29 +1113,47 @@ static ssize_t sst_prepare_other (const char* method,
}
}
- pthread_t tmp;
+ pthread_t tmp, monitor;
sst_thread_arg arg(cmd_str(), env());
+
mysql_mutex_lock (&arg.lock);
- ret = mysql_thread_create (key_wsrep_sst_joiner, &tmp, NULL, sst_joiner_thread, &arg);
+
+ ret = mysql_thread_create (key_wsrep_sst_joiner_monitor, &monitor, NULL, wsrep_sst_joiner_monitor_thread, NULL);
+
+ if (ret)
+ {
+ WSREP_ERROR("sst_prepare_other(): mysql_thread_create() failed: %d (%s)",
+ ret, strerror(ret));
+ return -ret;
+ }
+
+ sst_joiner_completed= false;
+
+ ret= mysql_thread_create (key_wsrep_sst_joiner, &tmp, NULL, sst_joiner_thread, &arg);
+
if (ret)
{
WSREP_ERROR("sst_prepare_other(): mysql_thread_create() failed: %d (%s)",
ret, strerror(ret));
+
+ pthread_detach(monitor);
return -ret;
}
+
mysql_cond_wait (&arg.cond, &arg.lock);
*addr_out= arg.ret_str;
if (!arg.err)
- ret = strlen(*addr_out);
+ ret= strlen(*addr_out);
else
{
assert (arg.err < 0);
- ret = arg.err;
+ ret= arg.err;
}
pthread_detach (tmp);
+ pthread_detach (monitor);
return ret;
}
@@ -1076,12 +1164,12 @@ extern uint mysqld_port;
static ssize_t sst_prepare_mysqldump (const char* addr_in,
const char** addr_out)
{
- ssize_t ret = strlen (addr_in);
+ ssize_t ret= strlen (addr_in);
if (!strrchr(addr_in, ':'))
{
- ssize_t s = ret + 7;
- char* tmp = (char*) malloc (s);
+ ssize_t s= ret + 7;
+ char* tmp= (char*) malloc (s);
if (tmp)
{
@@ -1092,7 +1180,7 @@ static ssize_t sst_prepare_mysqldump (const char* addr_in,
*addr_out= tmp;
return ret;
}
- if (ret > 0) /* buffer too short */ ret = -EMSGSIZE;
+ if (ret > 0) /* buffer too short */ ret= -EMSGSIZE;
free (tmp);
}
else {
@@ -1106,35 +1194,38 @@ static ssize_t sst_prepare_mysqldump (const char* addr_in,
*addr_out= addr_in;
}
+ pthread_t monitor;
+ ret = mysql_thread_create (key_wsrep_sst_joiner_monitor, &monitor, NULL, wsrep_sst_joiner_monitor_thread, NULL);
+
+ if (ret)
+ {
+ WSREP_ERROR("sst_prepare_other(): mysql_thread_create() failed: %d (%s)",
+ ret, strerror(ret));
+ return -ret;
+ }
+
+ sst_joiner_completed= false;
+ pthread_detach (monitor);
+
return ret;
}
-static bool SE_initialized = false;
-
-ssize_t wsrep_sst_prepare (void** msg)
+std::string wsrep_sst_prepare()
{
+ const ssize_t ip_max= 256;
+ char ip_buf[ip_max];
const char* addr_in= NULL;
const char* addr_out= NULL;
const char* method;
if (!strcmp(wsrep_sst_method, WSREP_SST_SKIP))
{
- ssize_t ret = strlen(WSREP_STATE_TRANSFER_TRIVIAL) + 1;
- *msg = strdup(WSREP_STATE_TRANSFER_TRIVIAL);
- if (!msg)
- {
- WSREP_ERROR("Could not allocate %zd bytes for state request", ret);
- unireg_abort(1);
- }
- return ret;
+ return WSREP_STATE_TRANSFER_TRIVIAL;
}
/*
Figure out SST receive address. Common for all SST methods.
*/
- char ip_buf[256];
- const ssize_t ip_max= sizeof(ip_buf);
-
wsp::Address* addr_in_parser= NULL;
// Attempt 1: wsrep_sst_receive_address
@@ -1164,7 +1255,7 @@ ssize_t wsrep_sst_prepare (void** msg)
{
WSREP_ERROR("Could not parse wsrep_node_address : %s",
wsrep_node_address);
- unireg_abort(1);
+ throw wsrep::runtime_error("Failed to prepare for SST. Unrecoverable");
}
}
// Attempt 3: Try to get the IP from the list of available interfaces.
@@ -1180,7 +1271,7 @@ ssize_t wsrep_sst_prepare (void** msg)
{
WSREP_ERROR("Failed to guess address to accept state transfer. "
"wsrep_sst_receive_address must be set manually.");
- unireg_abort(1);
+ throw wsrep::runtime_error("Could not prepare state transfer request");
}
}
@@ -1234,12 +1325,16 @@ ssize_t wsrep_sst_prepare (void** msg)
if (!strcmp(method, WSREP_SST_MYSQLDUMP))
{
addr_len= sst_prepare_mysqldump (addr_in, &addr_out);
- if (addr_len < 0) unireg_abort(1);
+ if (addr_len < 0)
+ {
+ throw wsrep::runtime_error("Could not prepare mysqldimp address");
+ }
}
else
{
/*! A heuristic workaround until we learn how to stop and start engines */
- if (SE_initialized)
+ if (Wsrep_server_state::instance().is_initialized() &&
+ Wsrep_server_state::instance().state() == Wsrep_server_state::s_joiner)
{
if (!strcmp(method, WSREP_SST_XTRABACKUP) ||
!strcmp(method, WSREP_SST_XTRABACKUPV2))
@@ -1258,8 +1353,7 @@ ssize_t wsrep_sst_prepare (void** msg)
"if other means of state transfer are unavailable. "
"In that case you will need to restart the server.",
method);
- *msg = 0;
- return 0;
+ return "";
}
addr_len = sst_prepare_other (method, sst_auth_real,
@@ -1268,37 +1362,28 @@ ssize_t wsrep_sst_prepare (void** msg)
{
WSREP_ERROR("Failed to prepare for '%s' SST. Unrecoverable.",
method);
- unireg_abort(1);
+ throw wsrep::runtime_error("Failed to prepare for SST. Unrecoverable");
}
}
- size_t const method_len(strlen(method));
- size_t const msg_len (method_len + addr_len + 2 /* + auth_len + 1*/);
+ std::string ret;
+ ret += method;
+ ret.push_back('\0');
+ ret += addr_out;
- *msg = malloc (msg_len);
- if (NULL != *msg) {
- char* const method_ptr(static_cast<char*>(*msg));
- strcpy (method_ptr, method);
- char* const addr_ptr(method_ptr + method_len + 1);
- strcpy (addr_ptr, addr_out);
-
- WSREP_DEBUG("Prepared SST request: %s|%s", method_ptr, addr_ptr);
- }
- else {
- WSREP_ERROR("Failed to allocate SST request of size %zu. Can't continue.",
- msg_len);
- unireg_abort(1);
- }
+ const char* method_ptr(ret.data());
+ const char* addr_ptr(ret.data() + strlen(method_ptr) + 1);
+ WSREP_DEBUG("Prepared SST request: %s|%s", method_ptr, addr_ptr);
if (addr_out != addr_in) /* malloc'ed */ free ((char*)addr_out);
- return msg_len;
+ return ret;
}
// helper method for donors
static int sst_run_shell (const char* cmd_str, char** env, int max_tries)
{
- int ret = 0;
+ int ret= 0;
for (int tries=1; tries <= max_tries; tries++)
{
@@ -1309,7 +1394,7 @@ static int sst_run_shell (const char* cmd_str, char** env, int max_tries)
proc.wait();
}
- if ((ret = proc.error()))
+ if ((ret= proc.error()))
{
WSREP_ERROR("Try %d/%d: '%s' failed: %d (%s)",
tries, max_tries, proc.cmd(), ret, strerror(ret));
@@ -1327,15 +1412,12 @@ static int sst_run_shell (const char* cmd_str, char** env, int max_tries)
static void sst_reject_queries(my_bool close_conn)
{
- wsrep_ready_set (FALSE); // this will be resotred when donor becomes synced
- WSREP_INFO("Rejecting client queries for the duration of SST.");
- if (TRUE == close_conn) wsrep_close_client_connections(FALSE);
+ WSREP_INFO("Rejecting client queries for the duration of SST.");
+ if (TRUE == close_conn) wsrep_close_client_connections(FALSE);
}
static int sst_donate_mysqldump (const char* addr,
- const wsrep_uuid_t* uuid,
- const char* uuid_str,
- wsrep_seqno_t seqno,
+ const wsrep::gtid& gtid,
bool bypass,
char** env) // carries auth info
{
@@ -1359,14 +1441,21 @@ static int sst_donate_mysqldump (const char* addr,
return -ENOMEM;
}
+ /*
+ we enable new client connections so that mysqldump donation can connect in,
+ but we reject local connections from modifyingcdata during SST, to keep
+ data intact
+ */
if (!bypass && wsrep_sst_donor_rejects_queries) sst_reject_queries(TRUE);
make_wsrep_defaults_file();
+ std::ostringstream uuid_oss;
+ uuid_oss << gtid.id();
int ret= snprintf (cmd_str(), cmd_len,
"wsrep_sst_mysqldump "
WSREP_SST_OPT_ADDR " '%s' "
- WSREP_SST_OPT_PORT " '%d' "
+ WSREP_SST_OPT_PORT " '%u' "
WSREP_SST_OPT_LPORT " '%u' "
WSREP_SST_OPT_SOCKET " '%s' "
"%s"
@@ -1374,8 +1463,9 @@ static int sst_donate_mysqldump (const char* addr,
WSREP_SST_OPT_GTID_DOMAIN_ID " '%d'"
"%s",
addr, port, mysqld_port, mysqld_unix_port,
- wsrep_defaults_file, uuid_str,
- (long long)seqno, wsrep_gtid_domain_id,
+ wsrep_defaults_file,
+ uuid_oss.str().c_str(), gtid.seqno().get(),
+ wsrep_gtid_domain_id,
bypass ? " " WSREP_SST_OPT_BYPASS : "");
if (ret < 0 || size_t(ret) >= cmd_len)
@@ -1391,16 +1481,17 @@ static int sst_donate_mysqldump (const char* addr,
ret= sst_run_shell (cmd_str(), env, 3);
- wsrep_gtid_t const state_id = { *uuid, (ret ? WSREP_SEQNO_UNDEFINED : seqno)};
-
- wsrep->sst_sent (wsrep, &state_id, ret);
+ wsrep::gtid sst_sent_gtid(ret == 0 ?
+ gtid :
+ wsrep::gtid(gtid.id(),
+ wsrep::seqno::undefined()));
+ Wsrep_server_state::instance().sst_sent(sst_sent_gtid, ret);
return ret;
}
wsrep_seqno_t wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
-
/*
Create a file under data directory.
*/
@@ -1449,7 +1540,6 @@ static int sst_create_file(const char *name, const char *content)
return err;
}
-
static int run_sql_command(THD *thd, const char *query)
{
thd->set_query((char *)query, strlen(query));
@@ -1493,9 +1583,9 @@ static int sst_flush_tables(THD* thd)
{
/* Do not use non-supported parser character sets */
WSREP_WARN("Current client character set is non-supported parser character set: %s", current_charset->csname);
- thd->variables.character_set_client = &my_charset_latin1;
+ thd->variables.character_set_client= &my_charset_latin1;
WSREP_WARN("For SST temporally setting character set to : %s",
- my_charset_latin1.csname);
+ my_charset_latin1.csname);
}
if (run_sql_command(thd, "FLUSH TABLES WITH READ LOCK"))
@@ -1516,7 +1606,7 @@ static int sst_flush_tables(THD* thd)
}
}
- thd->variables.character_set_client = current_charset;
+ thd->variables.character_set_client= current_charset;
if (err)
{
@@ -1544,10 +1634,44 @@ static int sst_flush_tables(THD* thd)
err= sst_create_file(flush_success, content);
if (err)
- {
WSREP_INFO("Creating file for flush_success failed %d",err);
- ha_disable_internal_writes(false);
+
+ const char base_name[]= "tables_flushed";
+ ssize_t const full_len= strlen(mysql_real_data_home) + strlen(base_name)+2;
+ char *real_name= (char*) malloc(full_len);
+ sprintf(real_name, "%s/%s", mysql_real_data_home, base_name);
+ char *tmp_name= (char*) malloc(full_len + 4);
+ sprintf(tmp_name, "%s.tmp", real_name);
+
+ FILE* file= fopen(tmp_name, "w+");
+ if (0 == file)
+ {
+ err= errno;
+ WSREP_ERROR("Failed to open '%s': %d (%s)", tmp_name, err,strerror(err));
+ }
+ else
+ {
+ Wsrep_server_state& server_state= Wsrep_server_state::instance();
+ std::ostringstream uuid_oss;
+
+ uuid_oss << server_state.current_view().state_id().id();
+
+ fprintf(file, "%s:%lld %u\n",
+ uuid_oss.str().c_str(), server_state.pause_seqno().get(),
+ wsrep_gtid_domain_id);
+ fsync(fileno(file));
+ fclose(file);
+ if (rename(tmp_name, real_name) == -1)
+ {
+ err= errno;
+ WSREP_ERROR("Failed to rename '%s' to '%s': %d (%s)",
+ tmp_name, real_name, err,strerror(err));
+ }
}
+ free(real_name);
+ free(tmp_name);
+ if (err)
+ ha_disable_internal_writes(false);
}
return err;
@@ -1576,11 +1700,11 @@ static void* sst_donor_thread (void* a)
wsp::thd thd(FALSE, true);
wsp::process proc(arg->cmd, "r", arg->env);
- err= proc.error();
+ err= -proc.error();
/* Inform server about SST script startup and release TO isolation */
mysql_mutex_lock (&arg->lock);
- arg->err = -err;
+ arg->err= -err;
mysql_cond_signal (&arg->cond);
mysql_mutex_unlock (&arg->lock); //! @note arg is unusable after that.
@@ -1646,6 +1770,7 @@ wait_signal:
else
{
WSREP_WARN("Received unknown signal: '%s'", out);
+ proc.wait();
}
}
else
@@ -1653,7 +1778,7 @@ wait_signal:
WSREP_ERROR("Failed to read from: %s", proc.cmd());
proc.wait();
}
- if (!err && proc.error()) err= proc.error();
+ if (!err && proc.error()) err= -proc.error();
}
else
{
@@ -1672,24 +1797,23 @@ wait_signal:
thd.ptr->global_read_lock.unlock_global_read_lock(thd.ptr);
}
- // signal to donor that SST is over
- struct wsrep_gtid const state_id = {
- ret_uuid, err ? WSREP_SEQNO_UNDEFINED : ret_seqno
- };
- wsrep->sst_sent (wsrep, &state_id, -err);
- proc.wait();
+ wsrep::gtid gtid(wsrep::id(ret_uuid.data, sizeof(ret_uuid.data)),
+ wsrep::seqno(err ? wsrep::seqno::undefined() :
+ wsrep::seqno(ret_seqno)));
- return NULL;
-}
+ Wsrep_server_state::instance().sst_sent(gtid, err);
+ proc.wait();
+ wsrep_donor_monitor_end();
+ return nullptr;
+}
-static int sst_donate_other (const char* method,
- const char* addr,
- const char* uuid,
- wsrep_seqno_t seqno,
- bool bypass,
- char** env) // carries auth info
+static int sst_donate_other (const char* method,
+ const char* addr,
+ const wsrep::gtid& gtid,
+ bool bypass,
+ char** env) // carries auth info
{
bool extra_args;
size_t const cmd_len= estimate_cmd_len(&extra_args);
@@ -1722,6 +1846,8 @@ static int sst_donate_other (const char* method,
make_wsrep_defaults_file();
+ std::ostringstream uuid_oss;
+ uuid_oss << gtid.id();
ret= snprintf (cmd_str(), cmd_len,
"wsrep_sst_%s "
WSREP_SST_OPT_ROLE " 'donor' "
@@ -1740,7 +1866,7 @@ static int sst_donate_other (const char* method,
0,
mysql_real_data_home,
wsrep_defaults_file,
- uuid, (long long) seqno, wsrep_gtid_domain_id,
+ uuid_oss.str().c_str(), gtid.seqno().get(), wsrep_gtid_domain_id,
binlog_opt_val, binlog_index_opt_val,
bypass ? " " WSREP_SST_OPT_BYPASS : "");
@@ -1760,14 +1886,18 @@ static int sst_donate_other (const char* method,
pthread_t tmp;
sst_thread_arg arg(cmd_str(), env);
+
mysql_mutex_lock (&arg.lock);
- ret = mysql_thread_create (key_wsrep_sst_donor, &tmp, NULL, sst_donor_thread, &arg);
+
+ ret= mysql_thread_create (key_wsrep_sst_donor, &tmp, NULL, sst_donor_thread, &arg);
+
if (ret)
{
WSREP_ERROR("sst_donate_other(): mysql_thread_create() failed: %d (%s)",
ret, strerror(ret));
return ret;
}
+
mysql_cond_wait (&arg.cond, &arg.lock);
WSREP_INFO("sst_donor_thread signaled with %d", arg.err);
@@ -1803,14 +1933,12 @@ static bool check_request_str(const char* const str,
return false;
}
-wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
- const void* msg, size_t msg_len,
- const wsrep_gtid_t* current_gtid,
- const char* state, size_t state_len,
- bool bypass)
+int wsrep_sst_donate(const std::string& msg,
+ const wsrep::gtid& current_gtid,
+ const bool bypass)
{
- const char* method = (char*)msg;
- size_t method_len = strlen (method);
+ const char* method= msg.data();
+ size_t method_len= strlen (method);
if (check_request_str(method, filename_char))
{
@@ -1818,7 +1946,7 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
return WSREP_CB_FAILURE;
}
- const char* data = method + method_len + 1;
+ const char* data= method + method_len + 1;
/* check for auth@addr separator */
const char* addr= strrchr(data, '@');
@@ -1840,13 +1968,6 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
return WSREP_CB_FAILURE;
}
- char uuid_str[37];
- wsrep_uuid_print (&current_gtid->uuid, uuid_str, sizeof(uuid_str));
-
- /* This will be reset when sync callback is called.
- * Should we set wsrep_ready to FALSE here too? */
- wsrep_config_state->set(WSREP_MEMBER_DONOR);
-
wsp::env env(NULL);
if (env.error())
{
@@ -1881,56 +2002,26 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
}
}
- if (!strcmp (WSREP_SST_MYSQLDUMP, method))
+ sst_donor_completed= false;
+ pthread_t monitor;
+
+ ret= mysql_thread_create (key_wsrep_sst_donor_monitor, &monitor, NULL, wsrep_sst_donor_monitor_thread, NULL);
+
+ if (ret)
{
- ret = sst_donate_mysqldump(addr, &current_gtid->uuid, uuid_str,
- current_gtid->seqno, bypass, env());
+ WSREP_ERROR("sst_donate: mysql_thread_create() failed: %d (%s)",
+ ret, strerror(ret));
+ return WSREP_CB_FAILURE;
}
- else
+
+ if (!strcmp (WSREP_SST_MYSQLDUMP, method))
{
- ret = sst_donate_other(method, addr, uuid_str,
- current_gtid->seqno, bypass, env());
+ ret= sst_donate_mysqldump(addr, current_gtid, bypass, env());
}
-
- return (ret >= 0 ? WSREP_CB_SUCCESS : WSREP_CB_FAILURE);
-}
-
-void wsrep_SE_init_grab()
-{
- if (mysql_mutex_lock (&LOCK_wsrep_sst_init)) abort();
-}
-
-void wsrep_SE_init_wait()
-{
- double total_wtime=0;
-
- while (SE_initialized == false)
+ else
{
- struct timespec wtime;
- set_timespec(wtime, WSREP_TIMEDWAIT_SECONDS);
- time_t start_time = time(NULL);
- mysql_cond_timedwait (&COND_wsrep_sst_init, &LOCK_wsrep_sst_init, &wtime);
- time_t end_time = time(NULL);
-
- if (!SE_initialized)
- {
- total_wtime += difftime(end_time, start_time);
- WSREP_DEBUG("Waiting for SST to complete. current seqno: %" PRId64 " waited %f secs.", local_seqno, total_wtime);
- service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
- "WSREP state transfer ongoing, current seqno: %" PRId64 " waited %f secs", local_seqno, total_wtime);
- }
+ ret= sst_donate_other(method, addr, current_gtid, bypass, env());
}
- mysql_mutex_unlock (&LOCK_wsrep_sst_init);
-}
-
-void wsrep_SE_init_done()
-{
- mysql_cond_signal (&COND_wsrep_sst_init);
- mysql_mutex_unlock (&LOCK_wsrep_sst_init);
-}
-
-void wsrep_SE_initialized()
-{
- SE_initialized = true;
+ return (ret >= 0 ? 0 : 1);
}
diff --git a/sql/wsrep_sst.h b/sql/wsrep_sst.h
index f2957e1db7a..462db7a159e 100644
--- a/sql/wsrep_sst.h
+++ b/sql/wsrep_sst.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013 Codership Oy <info@codership.com>
+/* Copyright (C) 2013-2018 Codership Oy <info@codership.com>
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
@@ -13,14 +13,14 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. */
-#include <my_config.h>
-
#ifndef WSREP_SST_H
#define WSREP_SST_H
-#ifdef WITH_WSREP
+#include <my_config.h>
-#include <mysql.h> // my_bool
+#include "wsrep/gtid.hpp"
+#include <my_global.h>
+#include <string>
#define WSREP_SST_OPT_ROLE "--role"
#define WSREP_SST_OPT_ADDR "--address"
@@ -79,11 +79,29 @@ extern void wsrep_SE_init_wait(); /*! wait for SE init to complete */
extern void wsrep_SE_init_done(); /*! signal that SE init is complte */
extern void wsrep_SE_initialized(); /*! mark SE initialization complete */
+/**
+ Return a string containing the state transfer request string.
+ Note that the string may contain a '\0' in the middle.
+*/
+std::string wsrep_sst_prepare();
+
+/**
+ Donate a SST.
+
+ @param request SST request string received from the joiner. Note that
+ the string may contain a '\0' in the middle.
+ @param gtid Current position of the donor
+ @param bypass If true, full SST is not needed. Joiner needs to be
+ notified that it can continue starting from gtid.
+ */
+int wsrep_sst_donate(const std::string& request,
+ const wsrep::gtid& gtid,
+ bool bypass);
+
#else
#define wsrep_SE_initialized() do { } while(0)
#define wsrep_SE_init_grab() do { } while(0)
#define wsrep_SE_init_done() do { } while(0)
#define wsrep_sst_continue() (0)
-#endif /* WITH_WSREP */
#endif /* WSREP_SST_H */
diff --git a/sql/wsrep_storage_service.cc b/sql/wsrep_storage_service.cc
new file mode 100644
index 00000000000..4885fd9f7e6
--- /dev/null
+++ b/sql/wsrep_storage_service.cc
@@ -0,0 +1,206 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#include "my_global.h"
+#include "wsrep_storage_service.h"
+#include "wsrep_trans_observer.h" /* wsrep_open() */
+#include "wsrep_schema.h"
+#include "wsrep_binlog.h"
+
+#include "sql_class.h"
+#include "mysqld.h" /* next_query_id() */
+#include "slave.h" /* opt_log_slave_updates() */
+#include "transaction.h" /* trans_commit(), trans_rollback() */
+
+/*
+ Temporarily enable wsrep on thd
+ */
+class Wsrep_on
+{
+public:
+ Wsrep_on(THD* thd)
+ : m_thd(thd)
+ , m_wsrep_on(thd->variables.wsrep_on)
+ {
+ thd->variables.wsrep_on= TRUE;
+ }
+ ~Wsrep_on()
+ {
+ m_thd->variables.wsrep_on= m_wsrep_on;
+ }
+private:
+ THD* m_thd;
+ my_bool m_wsrep_on;
+};
+
+Wsrep_storage_service::Wsrep_storage_service(THD* thd)
+ : wsrep::storage_service()
+ , wsrep::high_priority_context(thd->wsrep_cs())
+ , m_thd(thd)
+{
+ thd->security_ctx->skip_grants();
+ thd->system_thread= SYSTEM_THREAD_SLAVE_SQL;
+
+ /* No binlogging */
+
+ /* No general log */
+ thd->variables.option_bits |= OPTION_LOG_OFF;
+
+ /* Read committed isolation to avoid gap locking */
+ thd->variables.tx_isolation = ISO_READ_COMMITTED;
+
+ /* Keep wsrep on to enter commit ordering hooks */
+ thd->variables.wsrep_on= 1;
+ thd->wsrep_skip_locking= true;
+
+ wsrep_open(thd);
+ wsrep_before_command(thd);
+}
+
+Wsrep_storage_service::~Wsrep_storage_service()
+{
+ wsrep_after_command_ignore_result(m_thd);
+ wsrep_close(m_thd);
+ m_thd->wsrep_skip_locking= false;
+}
+
+int Wsrep_storage_service::start_transaction(const wsrep::ws_handle& ws_handle)
+{
+ DBUG_ENTER("Wsrep_storage_service::start_transaction");
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_PRINT("info", ("Wsrep_storage_service::start_transcation(%llu, %p)",
+ m_thd->thread_id, m_thd));
+ m_thd->set_wsrep_next_trx_id(ws_handle.transaction_id().get());
+ DBUG_RETURN(m_thd->wsrep_cs().start_transaction(
+ wsrep::transaction_id(m_thd->wsrep_next_trx_id())) ||
+ trans_begin(m_thd, MYSQL_START_TRANS_OPT_READ_WRITE));
+}
+
+void Wsrep_storage_service::adopt_transaction(const wsrep::transaction& transaction)
+{
+ DBUG_ENTER("Wsrep_Storage_server::adopt_transaction");
+ DBUG_ASSERT(m_thd == current_thd);
+ m_thd->wsrep_cs().adopt_transaction(transaction);
+ trans_begin(m_thd, MYSQL_START_TRANS_OPT_READ_WRITE);
+ DBUG_VOID_RETURN;
+}
+
+int Wsrep_storage_service::append_fragment(const wsrep::id& server_id,
+ wsrep::transaction_id transaction_id,
+ int flags,
+ const wsrep::const_buffer& data,
+ const wsrep::xid& xid WSREP_UNUSED)
+{
+ DBUG_ENTER("Wsrep_storage_service::append_fragment");
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_PRINT("info", ("Wsrep_storage_service::append_fragment(%llu, %p)",
+ m_thd->thread_id, m_thd));
+ int ret= wsrep_schema->append_fragment(m_thd,
+ server_id,
+ transaction_id,
+ wsrep::seqno(-1),
+ flags,
+ data);
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_storage_service::update_fragment_meta(const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER("Wsrep_storage_service::update_fragment_meta");
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_PRINT("info", ("Wsrep_storage_service::update_fragment_meta(%llu, %p)",
+ m_thd->thread_id, m_thd));
+ int ret= wsrep_schema->update_fragment_meta(m_thd, ws_meta);
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_storage_service::remove_fragments()
+{
+ DBUG_ENTER("Wsrep_storage_service::remove_fragments");
+ DBUG_ASSERT(m_thd == current_thd);
+
+ int ret= wsrep_schema->remove_fragments(m_thd,
+ m_thd->wsrep_trx().server_id(),
+ m_thd->wsrep_trx().id(),
+ m_thd->wsrep_sr().fragments());
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_storage_service::commit(const wsrep::ws_handle& ws_handle,
+ const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER("Wsrep_storage_service::commit");
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_PRINT("info", ("Wsrep_storage_service::commit(%llu, %p)",
+ m_thd->thread_id, m_thd));
+ WSREP_DEBUG("Storage service commit: %llu, %lld",
+ ws_meta.transaction_id().get(), ws_meta.seqno().get());
+ int ret= 0;
+ const bool is_ordered= !ws_meta.seqno().is_undefined();
+
+ if (is_ordered)
+ {
+ ret= m_thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, true);
+ }
+
+ ret= ret || trans_commit(m_thd);
+
+ if (!is_ordered)
+ {
+ /* Wsrep commit was not ordered so it does not go through commit time
+ hooks and remains active. Roll it back to make cleanup happen
+ in after_applying() call. */
+ m_thd->wsrep_cs().before_rollback();
+ m_thd->wsrep_cs().after_rollback();
+ }
+ else if (ret)
+ {
+ /* Commit failed, this probably means that the parent SR transaction
+ was BF aborted. Roll back out of order, the parent
+ transaction will release commit order after it has rolled back. */
+ m_thd->wsrep_cs().prepare_for_ordering(wsrep::ws_handle(),
+ wsrep::ws_meta(),
+ false);
+ trans_rollback(m_thd);
+ }
+ m_thd->wsrep_cs().after_applying();
+ m_thd->release_transactional_locks();
+ DBUG_RETURN(ret);
+}
+
+int Wsrep_storage_service::rollback(const wsrep::ws_handle& ws_handle,
+ const wsrep::ws_meta& ws_meta)
+{
+ DBUG_ENTER("Wsrep_storage_service::rollback");
+ DBUG_ASSERT(m_thd == current_thd);
+ DBUG_PRINT("info", ("Wsrep_storage_service::rollback(%llu, %p)",
+ m_thd->thread_id, m_thd));
+ int ret= (m_thd->wsrep_cs().prepare_for_ordering(
+ ws_handle, ws_meta, false) ||
+ trans_rollback(m_thd));
+ m_thd->wsrep_cs().after_applying();
+ m_thd->release_transactional_locks();
+ DBUG_RETURN(ret);
+}
+
+void Wsrep_storage_service::store_globals()
+{
+ wsrep_store_threadvars(m_thd);
+}
+
+void Wsrep_storage_service::reset_globals()
+{
+ wsrep_reset_threadvars(m_thd);
+}
diff --git a/sql/wsrep_storage_service.h b/sql/wsrep_storage_service.h
new file mode 100644
index 00000000000..f39543a89bc
--- /dev/null
+++ b/sql/wsrep_storage_service.h
@@ -0,0 +1,49 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+#ifndef WSREP_STORAGE_SERVICE_H
+#define WSREP_STORAGE_SERVICE_H
+
+#include "wsrep/storage_service.hpp"
+#include "wsrep/client_state.hpp"
+
+class THD;
+class Wsrep_server_service;
+class Wsrep_storage_service :
+ public wsrep::storage_service,
+ public wsrep::high_priority_context
+{
+public:
+ Wsrep_storage_service(THD*);
+ ~Wsrep_storage_service();
+ int start_transaction(const wsrep::ws_handle&);
+ void adopt_transaction(const wsrep::transaction&);
+ int append_fragment(const wsrep::id&,
+ wsrep::transaction_id,
+ int flags,
+ const wsrep::const_buffer&,
+ const wsrep::xid&);
+ int update_fragment_meta(const wsrep::ws_meta&);
+ int remove_fragments();
+ int commit(const wsrep::ws_handle&, const wsrep::ws_meta&);
+ int rollback(const wsrep::ws_handle&, const wsrep::ws_meta&);
+ void store_globals();
+ void reset_globals();
+private:
+ friend class Wsrep_server_service;
+ THD* m_thd;
+};
+
+#endif /* WSREP_STORAGE_SERVICE_H */
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index c9b3dc90d33..3a9384c7428 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -15,547 +15,87 @@
#include "mariadb.h"
#include "wsrep_thd.h"
+#include "wsrep_trans_observer.h"
+#include "wsrep_high_priority_service.h"
+#include "wsrep_storage_service.h"
+#include "wsrep_server_state.h"
#include "transaction.h"
#include "rpl_rli.h"
#include "log_event.h"
#include "sql_parse.h"
-//#include "global_threads.h" // LOCK_thread_count, etc.
-#include "sql_base.h" // close_thread_tables()
#include "mysqld.h" // start_wsrep_THD();
+#include "wsrep_applier.h" // start_wsrep_THD();
+#include "mysql/service_wsrep.h"
#include "debug_sync.h"
-
-#include "slave.h" // opt_log_slave_updates
-#include "rpl_filter.h"
+#include "slave.h"
#include "rpl_rli.h"
#include "rpl_mi.h"
-#if (__LP64__)
-static volatile int64 wsrep_bf_aborts_counter(0);
-#define WSREP_ATOMIC_LOAD_LONG my_atomic_load64
-#define WSREP_ATOMIC_ADD_LONG my_atomic_add64
-#else
-static volatile int32 wsrep_bf_aborts_counter(0);
-#define WSREP_ATOMIC_LOAD_LONG my_atomic_load32
-#define WSREP_ATOMIC_ADD_LONG my_atomic_add32
-#endif
+extern "C" pthread_key(struct st_my_thread_var*, THR_KEY_mysys);
+
+static Wsrep_thd_queue* wsrep_rollback_queue= 0;
+static Atomic_counter<uint64_t> wsrep_bf_aborts_counter;
+
int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope)
{
- wsrep_local_bf_aborts = WSREP_ATOMIC_LOAD_LONG(&wsrep_bf_aborts_counter);
- var->type = SHOW_LONGLONG;
- var->value = (char*)&wsrep_local_bf_aborts;
+ wsrep_local_bf_aborts= wsrep_bf_aborts_counter;
+ var->type= SHOW_LONGLONG;
+ var->value= (char*)&wsrep_local_bf_aborts;
return 0;
}
-/* must have (&thd->LOCK_thd_data) */
-void wsrep_client_rollback(THD *thd)
+static void wsrep_replication_process(THD *thd,
+ void* arg __attribute__((unused)))
{
- WSREP_DEBUG("client rollback due to BF abort for (%lld), query: %s",
- (longlong) thd->thread_id, thd->query());
-
- WSREP_ATOMIC_ADD_LONG(&wsrep_bf_aborts_counter, 1);
-
- thd->wsrep_conflict_state= ABORTING;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- trans_rollback(thd);
-
- if (thd->locked_tables_mode && thd->lock)
- {
- WSREP_DEBUG("unlocking tables for BF abort (%lld)",
- (longlong) thd->thread_id);
- thd->locked_tables_list.unlock_locked_tables(thd);
- thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
- }
-
- if (thd->global_read_lock.is_acquired())
- {
- WSREP_DEBUG("unlocking GRL for BF abort (%lld)",
- (longlong) thd->thread_id);
- thd->global_read_lock.unlock_global_read_lock(thd);
- }
-
- /* Release transactional metadata locks. */
- thd->release_transactional_locks();
-
- /* release explicit MDL locks */
- thd->mdl_context.release_explicit_locks();
-
- if (thd->get_binlog_table_maps())
- {
- WSREP_DEBUG("clearing binlog table map for BF abort (%lld)",
- (longlong) thd->thread_id);
- thd->clear_binlog_table_maps();
- }
- mysql_mutex_lock(&thd->LOCK_thd_data);
- thd->wsrep_conflict_state= ABORTED;
-}
-
-#define NUMBER_OF_FIELDS_TO_IDENTIFY_COORDINATOR 1
-#define NUMBER_OF_FIELDS_TO_IDENTIFY_WORKER 2
-
-static rpl_group_info* wsrep_relay_group_init(THD *thd, const char* log_fname)
-{
- Relay_log_info* rli= new Relay_log_info(false);
-
- WSREP_DEBUG("wsrep_relay_group_init %s", log_fname);
-
- if (!rli->relay_log.description_event_for_exec)
- {
- rli->relay_log.description_event_for_exec=
- new Format_description_log_event(4);
- }
-
- static LEX_CSTRING connection_name= { STRING_WITH_LEN("wsrep") };
-
- /*
- Master_info's constructor initializes rpl_filter by either an already
- constructed Rpl_filter object from global 'rpl_filters' list if the
- specified connection name is same, or it constructs a new Rpl_filter
- object and adds it to rpl_filters. This object is later destructed by
- Mater_info's destructor by looking it up based on connection name in
- rpl_filters list.
-
- However, since all Master_info objects created here would share same
- connection name ("wsrep"), destruction of any of the existing Master_info
- objects (in wsrep_return_from_bf_mode()) would free rpl_filter referenced
- by any/all existing Master_info objects.
-
- In order to avoid that, we have added a check in Master_info's destructor
- to not free the "wsrep" rpl_filter. It will eventually be freed by
- free_all_rpl_filters() when server terminates.
- */
- rli->mi = new Master_info(&connection_name, false);
-
- struct rpl_group_info *rgi= new rpl_group_info(rli);
- rgi->thd= rli->sql_driver_thd= thd;
+ DBUG_ENTER("wsrep_replication_process");
- if ((rgi->deferred_events_collecting= rli->mi->rpl_filter->is_on()))
- {
- rgi->deferred_events= new Deferred_log_events(rli);
- }
+ Wsrep_applier_service applier_service(thd);
- return rgi;
-}
+ WSREP_INFO("Starting applier thread %llu", thd->thread_id);
+ enum wsrep::provider::status
+ ret= Wsrep_server_state::get_provider().run_applier(&applier_service);
-static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow)
-{
- shadow->options = thd->variables.option_bits;
- shadow->server_status = thd->server_status;
- shadow->wsrep_exec_mode = thd->wsrep_exec_mode;
- shadow->vio = thd->net.vio;
-
- // Disable general logging on applier threads
- thd->variables.option_bits |= OPTION_LOG_OFF;
-
- /* enable binlogging regardless of log_slave_updates setting
- this is for ensuring that both local and applier transaction go through
- same commit ordering algorithm in group commit control
- */
- thd->variables.option_bits|= OPTION_BIN_LOG;
-
- if (!thd->wsrep_rgi) thd->wsrep_rgi= wsrep_relay_group_init(thd, "wsrep_relay");
-
- /* thd->system_thread_info.rpl_sql_info isn't initialized. */
- if (!thd->slave_thread)
- thd->system_thread_info.rpl_sql_info=
- new rpl_sql_thread_info(thd->wsrep_rgi->rli->mi->rpl_filter);
-
- thd->wsrep_exec_mode= REPL_RECV;
- thd->net.vio= 0;
- thd->clear_error();
-
- shadow->tx_isolation = thd->variables.tx_isolation;
- thd->variables.tx_isolation = ISO_READ_COMMITTED;
- thd->tx_isolation = ISO_READ_COMMITTED;
-
- shadow->db = thd->db.str;
- shadow->db_length = thd->db.length;
- shadow->user_time = thd->user_time;
- shadow->row_count_func= thd->get_row_count_func();
- thd->reset_db(&null_clex_str);
-}
+ WSREP_INFO("Applier thread exiting ret: %d thd: %llu", ret, thd->thread_id);
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+ wsrep_close_applier(thd);
+ mysql_cond_broadcast(&COND_wsrep_slave_threads);
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
-static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow)
-{
- LEX_CSTRING db= {shadow->db, shadow->db_length };
- thd->variables.option_bits = shadow->options;
- thd->server_status = shadow->server_status;
- thd->wsrep_exec_mode = shadow->wsrep_exec_mode;
- thd->net.vio = shadow->vio;
- thd->variables.tx_isolation = shadow->tx_isolation;
- thd->user_time = shadow->user_time;
- thd->reset_db(&db);
-
- if (!thd->slave_thread)
- delete thd->system_thread_info.rpl_sql_info;
delete thd->wsrep_rgi->rli->mi;
delete thd->wsrep_rgi->rli;
-
+
thd->wsrep_rgi->cleanup_after_session();
delete thd->wsrep_rgi;
- thd->wsrep_rgi = NULL;
- thd->set_row_count_func(shadow->row_count_func);
-}
-
-void wsrep_replay_sp_transaction(THD* thd)
-{
- DBUG_ENTER("wsrep_replay_sp_transaction");
- mysql_mutex_assert_owner(&thd->LOCK_thd_data);
- DBUG_ASSERT(thd->wsrep_conflict_state == MUST_REPLAY);
- DBUG_ASSERT(wsrep_thd_trx_seqno(thd) > 0);
-
- WSREP_DEBUG("replaying SP transaction %llu", thd->thread_id);
- close_thread_tables(thd);
- if (thd->locked_tables_mode && thd->lock)
- {
- WSREP_DEBUG("releasing table lock for replaying (%u)",
- thd->thread_id);
- thd->locked_tables_list.unlock_locked_tables(thd);
- thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
- }
- thd->release_transactional_locks();
+ thd->wsrep_rgi= NULL;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- THD *replay_thd= new THD(true);
- replay_thd->thread_stack= thd->thread_stack;
-
- struct wsrep_thd_shadow shadow;
- wsrep_prepare_bf_thd(replay_thd, &shadow);
- WSREP_DEBUG("replaying set for %p rgi %p", replay_thd, replay_thd->wsrep_rgi); replay_thd->wsrep_trx_meta= thd->wsrep_trx_meta;
- replay_thd->wsrep_ws_handle= thd->wsrep_ws_handle;
- replay_thd->wsrep_ws_handle.trx_id= WSREP_UNDEFINED_TRX_ID;
- replay_thd->wsrep_conflict_state= REPLAYING;
-
- replay_thd->variables.option_bits|= OPTION_BEGIN;
- replay_thd->server_status|= SERVER_STATUS_IN_TRANS;
-
- thd->reset_globals();
- replay_thd->store_globals();
- wsrep_status_t rcode= wsrep->replay_trx(wsrep,
- &replay_thd->wsrep_ws_handle,
- (void*) replay_thd);
-
- wsrep_return_from_bf_mode(replay_thd, &shadow);
- replay_thd->reset_globals();
- delete replay_thd;
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
-
- thd->store_globals();
-
- switch (rcode)
- {
- case WSREP_OK:
- {
- thd->wsrep_conflict_state= NO_CONFLICT;
- thd->killed= NOT_KILLED;
- wsrep_status_t rcode= wsrep->post_commit(wsrep, &thd->wsrep_ws_handle);
- if (rcode != WSREP_OK)
- {
- WSREP_WARN("Post commit failed for SP replay: thd: %u error: %d",
- thd->thread_id, rcode);
- }
- /* As replaying the transaction was successful, an error must not
- be returned to client, so we need to reset the error state of
- the diagnostics area */
- thd->get_stmt_da()->reset_diagnostics_area();
- break;
- }
- case WSREP_TRX_FAIL:
- {
- thd->wsrep_conflict_state= ABORTED;
- wsrep_status_t rcode= wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle);
- if (rcode != WSREP_OK)
- {
- WSREP_WARN("Post rollback failed for SP replay: thd: %u error: %d",
- thd->thread_id, rcode);
- }
- if (thd->get_stmt_da()->is_set())
- {
- thd->get_stmt_da()->reset_diagnostics_area();
- }
- my_error(ER_LOCK_DEADLOCK, MYF(0));
- break;
- }
- default:
- WSREP_ERROR("trx_replay failed for: %d, schema: %s, query: %s",
- rcode,
- (thd->db.str ? thd->db.str : "(null)"),
- WSREP_QUERY(thd));
- /* we're now in inconsistent state, must abort */
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- unireg_abort(1);
- break;
- }
-
- wsrep_cleanup_transaction(thd);
-
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- wsrep_replaying--;
- WSREP_DEBUG("replaying decreased: %d, thd: %u",
- wsrep_replaying, thd->thread_id);
- mysql_cond_broadcast(&COND_wsrep_replaying);
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
-
- DBUG_VOID_RETURN;
-}
-
-void wsrep_replay_transaction(THD *thd)
-{
- DBUG_ENTER("wsrep_replay_transaction");
- /* checking if BF trx must be replayed */
- if (thd->wsrep_conflict_state== MUST_REPLAY) {
- DBUG_ASSERT(wsrep_thd_trx_seqno(thd));
- if (thd->wsrep_exec_mode!= REPL_RECV) {
- if (thd->get_stmt_da()->is_sent())
- {
- WSREP_ERROR("replay issue, thd has reported status already");
- }
-
-
- /*
- PS reprepare observer should have been removed already.
- open_table() will fail if we have dangling observer here.
- */
- DBUG_ASSERT(thd->m_reprepare_observer == NULL);
-
- struct da_shadow
- {
- enum Diagnostics_area::enum_diagnostics_status status;
- ulonglong affected_rows;
- ulonglong last_insert_id;
- char message[MYSQL_ERRMSG_SIZE];
- };
- struct da_shadow da_status;
- da_status.status= thd->get_stmt_da()->status();
- if (da_status.status == Diagnostics_area::DA_OK)
- {
- da_status.affected_rows= thd->get_stmt_da()->affected_rows();
- da_status.last_insert_id= thd->get_stmt_da()->last_insert_id();
- strmake(da_status.message,
- thd->get_stmt_da()->message(),
- sizeof(da_status.message)-1);
- }
-
- thd->get_stmt_da()->reset_diagnostics_area();
-
- thd->wsrep_conflict_state= REPLAYING;
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-
- thd->reset_for_next_command();
- thd->reset_killed();
- close_thread_tables(thd);
- if (thd->locked_tables_mode && thd->lock)
- {
- WSREP_DEBUG("releasing table lock for replaying (%lld)",
- (longlong) thd->thread_id);
- thd->locked_tables_list.unlock_locked_tables(thd);
- thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
- }
- thd->release_transactional_locks();
- /*
- Replaying will call MYSQL_START_STATEMENT when handling
- BEGIN Query_log_event so end statement must be called before
- replaying.
- */
- MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
- thd->m_statement_psi= NULL;
- thd->m_digest= NULL;
- thd_proc_info(thd, "WSREP replaying trx");
- WSREP_DEBUG("replay trx: %s %lld",
- thd->query() ? thd->query() : "void",
- (long long)wsrep_thd_trx_seqno(thd));
- struct wsrep_thd_shadow shadow;
- wsrep_prepare_bf_thd(thd, &shadow);
-
- /* From trans_begin() */
- thd->variables.option_bits|= OPTION_BEGIN;
- thd->server_status|= SERVER_STATUS_IN_TRANS;
-
- /* Allow tests to block the replayer thread using the DBUG facilities */
-#ifdef ENABLED_DEBUG_SYNC
- DBUG_EXECUTE_IF("sync.wsrep_replay_cb",
- {
- const char act[]=
- "now "
- "SIGNAL sync.wsrep_replay_cb_reached "
- "WAIT_FOR signal.wsrep_replay_cb";
- DBUG_ASSERT(!debug_sync_set_action(thd,
- STRING_WITH_LEN(act)));
- };);
-#endif /* ENABLED_DEBUG_SYNC */
-
- int rcode = wsrep->replay_trx(wsrep,
- &thd->wsrep_ws_handle,
- (void *)thd);
-
- wsrep_return_from_bf_mode(thd, &shadow);
- if (thd->wsrep_conflict_state!= REPLAYING)
- WSREP_WARN("lost replaying mode: %d", thd->wsrep_conflict_state );
-
- mysql_mutex_lock(&thd->LOCK_thd_data);
-
- switch (rcode)
- {
- case WSREP_OK:
- thd->wsrep_conflict_state= NO_CONFLICT;
- wsrep->post_commit(wsrep, &thd->wsrep_ws_handle);
- WSREP_DEBUG("trx_replay successful for: %lld %lld",
- (longlong) thd->thread_id, (longlong) thd->real_id);
- if (thd->get_stmt_da()->is_sent())
- {
- WSREP_WARN("replay ok, thd has reported status");
- }
- else if (thd->get_stmt_da()->is_set())
- {
- if (thd->get_stmt_da()->status() != Diagnostics_area::DA_OK &&
- thd->get_stmt_da()->status() != Diagnostics_area::DA_OK_BULK)
- {
- WSREP_WARN("replay ok, thd has error status %d",
- thd->get_stmt_da()->status());
- }
- }
- else
- {
- if (da_status.status == Diagnostics_area::DA_OK)
- {
- my_ok(thd,
- da_status.affected_rows,
- da_status.last_insert_id,
- da_status.message);
- }
- else
- {
- my_ok(thd);
- }
- }
- break;
- case WSREP_TRX_FAIL:
- if (thd->get_stmt_da()->is_sent())
- {
- WSREP_ERROR("replay failed, thd has reported status");
- }
- else
- {
- WSREP_DEBUG("replay failed, rolling back");
- }
- thd->wsrep_conflict_state= ABORTED;
- wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle);
- break;
- default:
- WSREP_ERROR("trx_replay failed for: %d, schema: %s, query: %s",
- rcode, thd->get_db(),
- thd->query() ? thd->query() : "void");
- /* we're now in inconsistent state, must abort */
-
- /* http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/3962#sql/wsrep_thd.cc */
- mysql_mutex_unlock(&thd->LOCK_thd_data);
-
- unireg_abort(1);
- break;
- }
-
- wsrep_cleanup_transaction(thd);
-
- mysql_mutex_lock(&LOCK_wsrep_replaying);
- wsrep_replaying--;
- WSREP_DEBUG("replaying decreased: %d, thd: %lld",
- wsrep_replaying, (longlong) thd->thread_id);
- mysql_cond_broadcast(&COND_wsrep_replaying);
- mysql_mutex_unlock(&LOCK_wsrep_replaying);
- }
- }
- DBUG_VOID_RETURN;
-}
-
-static void wsrep_replication_process(THD *thd)
-{
- int rcode;
- DBUG_ENTER("wsrep_replication_process");
-
- struct wsrep_thd_shadow shadow;
- wsrep_prepare_bf_thd(thd, &shadow);
-
- /* From trans_begin() */
- thd->variables.option_bits|= OPTION_BEGIN;
- thd->server_status|= SERVER_STATUS_IN_TRANS;
-
- thd_proc_info(thd, "wsrep applier idle");
- rcode = wsrep->recv(wsrep, (void *)thd);
- DBUG_PRINT("wsrep",("wsrep_repl returned: %d", rcode));
-
- WSREP_INFO("applier thread exiting (code:%d)", rcode);
-
- switch (rcode) {
- case WSREP_OK:
- case WSREP_NOT_IMPLEMENTED:
- case WSREP_CONN_FAIL:
- /* provider does not support slave operations / disconnected from group,
- * just close applier thread */
- break;
- case WSREP_NODE_FAIL:
- /* data inconsistency => SST is needed */
- /* Note: we cannot just blindly restart replication here,
- * SST might require server restart if storage engines must be
- * initialized after SST */
- WSREP_ERROR("node consistency compromised, aborting");
- wsrep_kill_mysql(thd);
- break;
- case WSREP_WARNING:
- case WSREP_TRX_FAIL:
- case WSREP_TRX_MISSING:
- /* these suggests a bug in provider code */
- WSREP_WARN("bad return from recv() call: %d", rcode);
- /* Shut down this node. */
- /* fall through */
- case WSREP_FATAL:
- /* Cluster connectivity is lost.
- *
- * If applier was killed on purpose (KILL_CONNECTION), we
- * avoid mysql shutdown. This is because the killer will then handle
- * shutdown processing (or replication restarting)
- */
- if (thd->killed != KILL_CONNECTION)
- {
- wsrep_kill_mysql(thd);
- }
- break;
- }
-
- mysql_mutex_lock(&LOCK_thread_count);
- wsrep_close_applier(thd);
- mysql_cond_broadcast(&COND_thread_count);
- mysql_mutex_unlock(&LOCK_thread_count);
if(thd->has_thd_temporary_tables())
{
WSREP_WARN("Applier %lld has temporary tables at exit.",
thd->thread_id);
}
- wsrep_return_from_bf_mode(thd, &shadow);
DBUG_VOID_RETURN;
}
-static bool create_wsrep_THD(wsrep_thread_args* args, bool thread_count_lock)
+static bool create_wsrep_THD(Wsrep_thd_args* args, bool mutex_protected)
{
- if (!thread_count_lock)
- mysql_mutex_lock(&LOCK_thread_count);
+ if (!mutex_protected)
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
ulong old_wsrep_running_threads= wsrep_running_threads;
- DBUG_ASSERT(args->thread_type == WSREP_APPLIER_THREAD ||
- args->thread_type == WSREP_ROLLBACKER_THREAD);
+ DBUG_ASSERT(args->thread_type() == WSREP_APPLIER_THREAD ||
+ args->thread_type() == WSREP_ROLLBACKER_THREAD);
- bool res= mysql_thread_create(args->thread_type == WSREP_APPLIER_THREAD
+ bool res= mysql_thread_create(args->thread_type() == WSREP_APPLIER_THREAD
? key_wsrep_applier : key_wsrep_rollbacker,
- &args->thread_id, &connection_attrib,
+ args->thread_id(), &connection_attrib,
start_wsrep_THD, (void*)args);
if (res)
- {
WSREP_ERROR("Can't create wsrep thread");
- }
/*
if starting a thread on server startup, wait until the this thread's THD
@@ -566,48 +106,38 @@ static bool create_wsrep_THD(wsrep_thread_args* args, bool thread_count_lock)
{
while (old_wsrep_running_threads == wsrep_running_threads)
{
- mysql_cond_wait(&COND_thread_count, &LOCK_thread_count);
+ mysql_cond_wait(&COND_wsrep_slave_threads, &LOCK_wsrep_slave_threads);
}
}
- if (!thread_count_lock)
- mysql_mutex_unlock(&LOCK_thread_count);
+ if (!mutex_protected)
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
return res;
}
-bool wsrep_create_appliers(long threads, bool thread_count_lock)
+bool wsrep_create_appliers(long threads, bool mutex_protected)
{
- if (!wsrep_connected)
+ /* Dont' start slave threads if wsrep-provider or wsrep-cluster-address
+ is not set.
+ */
+ if (!WSREP_PROVIDER_EXISTS)
{
- /* see wsrep_replication_start() for the logic */
- if (wsrep_cluster_address && strlen(wsrep_cluster_address) &&
- wsrep_provider && strcasecmp(wsrep_provider, "none"))
- {
- WSREP_ERROR("Trying to launch slave threads before creating "
- "connection at '%s'", wsrep_cluster_address);
- }
- return true;
+ return false;
}
- long wsrep_threads= 0;
+ DBUG_ASSERT(wsrep_cluster_address[0]);
- while (wsrep_threads++ < threads) {
- wsrep_thread_args* arg;
+ long wsrep_threads=0;
- if((arg= (wsrep_thread_args*)my_malloc(sizeof(wsrep_thread_args), MYF(0))) == NULL)
- {
- WSREP_ERROR("Can't allocate memory for wsrep replication thread %ld\n", wsrep_threads);
- assert(0);
- }
-
- arg->thread_type= WSREP_APPLIER_THREAD;
- arg->processor= wsrep_replication_process;
-
- if (create_wsrep_THD(arg, thread_count_lock))
+ while (wsrep_threads++ < threads)
+ {
+ Wsrep_thd_args* args(new Wsrep_thd_args(wsrep_replication_process,
+ WSREP_APPLIER_THREAD,
+ pthread_self()));
+ if (create_wsrep_THD(args, mutex_protected))
{
- WSREP_ERROR("Can't create thread to manage wsrep replication");
- my_free(arg);
+ WSREP_WARN("Can't create thread to manage wsrep replication");
return true;
}
}
@@ -615,281 +145,345 @@ bool wsrep_create_appliers(long threads, bool thread_count_lock)
return false;
}
-static void wsrep_rollback_process(THD *thd)
+static void wsrep_remove_streaming_fragments(THD* thd, const char* ctx)
{
- DBUG_ENTER("wsrep_rollback_process");
+ wsrep::transaction_id transaction_id(thd->wsrep_trx().id());
+ Wsrep_storage_service* storage_service= wsrep_create_storage_service(thd, ctx);
+ storage_service->store_globals();
+ storage_service->adopt_transaction(thd->wsrep_trx());
+ storage_service->remove_fragments();
+ storage_service->commit(wsrep::ws_handle(transaction_id, 0),
+ wsrep::ws_meta());
+ Wsrep_server_state::instance().server_service()
+ .release_storage_service(storage_service);
+ wsrep_store_threadvars(thd);
+}
- mysql_mutex_lock(&LOCK_wsrep_rollback);
- wsrep_aborting_thd= NULL;
+static void wsrep_rollback_high_priority(THD *thd, THD *rollbacker)
+{
+ WSREP_DEBUG("Rollbacker aborting SR applier thd (%llu %lu)",
+ thd->thread_id, thd->real_id);
+ char* orig_thread_stack= thd->thread_stack;
+ thd->thread_stack= rollbacker->thread_stack;
+ DBUG_ASSERT(thd->wsrep_cs().mode() == Wsrep_client_state::m_high_priority);
+ /* Must be streaming and must have been removed from the
+ server state streaming appliers map. */
+ DBUG_ASSERT(thd->wsrep_trx().is_streaming());
+ DBUG_ASSERT(!Wsrep_server_state::instance().find_streaming_applier(
+ thd->wsrep_trx().server_id(),
+ thd->wsrep_trx().id()));
+ DBUG_ASSERT(thd->wsrep_applier_service);
+
+ /* Fragment removal should happen before rollback to make
+ the transaction non-observable in SR table after the rollback
+ completes. For correctness the order does not matter here,
+ but currently it is mandated by checks in some MTR tests. */
+ wsrep_remove_streaming_fragments(thd, "high priority");
+ thd->wsrep_applier_service->rollback(wsrep::ws_handle(),
+ wsrep::ws_meta());
+ thd->wsrep_applier_service->after_apply();
+ thd->thread_stack= orig_thread_stack;
+ WSREP_DEBUG("rollbacker aborted thd: (%llu %lu)",
+ thd->thread_id, thd->real_id);
+ /* Will free THD */
+ Wsrep_server_state::instance().server_service()
+ .release_high_priority_service(thd->wsrep_applier_service);
+}
- while (thd->killed == NOT_KILLED) {
- thd_proc_info(thd, "WSREP aborter idle");
- thd->mysys_var->current_mutex= &LOCK_wsrep_rollback;
- thd->mysys_var->current_cond= &COND_wsrep_rollback;
+static void wsrep_rollback_local(THD *thd, THD *rollbacker)
+{
+ WSREP_DEBUG("Rollbacker aborting local thd (%llu %lu)",
+ thd->thread_id, thd->real_id);
+ char* orig_thread_stack= thd->thread_stack;
+ thd->thread_stack= rollbacker->thread_stack;
+ if (thd->wsrep_trx().is_streaming())
+ {
+ wsrep_remove_streaming_fragments(thd, "local");
+ }
+ /* Set thd->event_scheduler.data temporarily to NULL to avoid
+ callbacks to threadpool wait_begin() during rollback. */
+ auto saved_esd= thd->event_scheduler.data;
+ thd->event_scheduler.data= 0;
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ /* prepare THD for rollback processing */
+ thd->reset_for_next_command();
+ thd->lex->sql_command= SQLCOM_ROLLBACK;
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ /* Perform a client rollback, restore globals and signal
+ the victim only when all the resources have been
+ released */
+ thd->wsrep_cs().client_service().bf_rollback();
+ wsrep_reset_threadvars(thd);
+ /* Assign saved event_scheduler.data back before letting
+ client to continue. */
+ thd->event_scheduler.data= saved_esd;
+ thd->thread_stack= orig_thread_stack;
+ thd->wsrep_cs().sync_rollback_complete();
+ WSREP_DEBUG("rollbacker aborted thd: (%llu %lu)",
+ thd->thread_id, thd->real_id);
+}
+
+static void wsrep_rollback_process(THD *rollbacker,
+ void *arg __attribute__((unused)))
+{
+ DBUG_ENTER("wsrep_rollback_process");
- mysql_cond_wait(&COND_wsrep_rollback,&LOCK_wsrep_rollback);
+ THD* thd= NULL;
+ DBUG_ASSERT(!wsrep_rollback_queue);
+ wsrep_rollback_queue= new Wsrep_thd_queue(rollbacker);
+ WSREP_INFO("Starting rollbacker thread %llu", rollbacker->thread_id);
- WSREP_DEBUG("WSREP rollback thread wakes for signal");
+ thd_proc_info(rollbacker, "wsrep aborter idle");
+ while ((thd= wsrep_rollback_queue->pop_front()) != NULL)
+ {
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ wsrep::client_state& cs(thd->wsrep_cs());
+ const wsrep::transaction& tx(cs.transaction());
+ if (tx.state() == wsrep::transaction::s_aborted)
+ {
+ WSREP_DEBUG("rollbacker thd already aborted: %llu state: %d",
+ (long long)thd->real_id,
+ tx.state());
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ continue;
+ }
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
- mysql_mutex_lock(&thd->mysys_var->mutex);
- thd_proc_info(thd, "WSREP aborter active");
- thd->mysys_var->current_mutex= 0;
- thd->mysys_var->current_cond= 0;
- mysql_mutex_unlock(&thd->mysys_var->mutex);
+ wsrep_reset_threadvars(rollbacker);
+ wsrep_store_threadvars(thd);
+ thd->wsrep_cs().acquire_ownership();
- /* check for false alarms */
- if (!wsrep_aborting_thd)
+ thd_proc_info(rollbacker, "wsrep aborter active");
+
+ /* Rollback methods below may free thd pointer. Do not try
+ to access it after method returns. */
+ if (wsrep_thd_is_applying(thd))
{
- WSREP_DEBUG("WSREP rollback thread has empty abort queue");
+ wsrep_rollback_high_priority(thd, rollbacker);
}
- /* process all entries in the queue */
- while (wsrep_aborting_thd) {
- THD *aborting;
- wsrep_aborting_thd_t next = wsrep_aborting_thd->next;
- aborting = wsrep_aborting_thd->aborting_thd;
- my_free(wsrep_aborting_thd);
- wsrep_aborting_thd= next;
- /*
- * must release mutex, appliers my want to add more
- * aborting thds in our work queue, while we rollback
- */
- mysql_mutex_unlock(&LOCK_wsrep_rollback);
-
- mysql_mutex_lock(&aborting->LOCK_thd_data);
- if (aborting->wsrep_conflict_state== ABORTED)
- {
- WSREP_DEBUG("WSREP, thd already aborted: %llu state: %d",
- (long long)aborting->real_id,
- aborting->wsrep_conflict_state);
-
- mysql_mutex_unlock(&aborting->LOCK_thd_data);
- mysql_mutex_lock(&LOCK_wsrep_rollback);
- continue;
- }
- aborting->wsrep_conflict_state= ABORTING;
-
- mysql_mutex_unlock(&aborting->LOCK_thd_data);
-
- set_current_thd(aborting);
- aborting->store_globals();
-
- mysql_mutex_lock(&aborting->LOCK_thd_data);
- wsrep_client_rollback(aborting);
- WSREP_DEBUG("WSREP rollbacker aborted thd: (%lld %lld)",
- (longlong) aborting->thread_id,
- (longlong) aborting->real_id);
- mysql_mutex_unlock(&aborting->LOCK_thd_data);
-
- set_current_thd(thd);
- thd->store_globals();
-
- mysql_mutex_lock(&LOCK_wsrep_rollback);
+ else
+ {
+ wsrep_rollback_local(thd, rollbacker);
}
+ wsrep_store_threadvars(rollbacker);
+ thd_proc_info(rollbacker, "wsrep aborter idle");
}
- mysql_mutex_unlock(&LOCK_wsrep_rollback);
- sql_print_information("WSREP: rollbacker thread exiting");
+ delete wsrep_rollback_queue;
+ wsrep_rollback_queue= NULL;
+
+ WSREP_INFO("rollbacker thread exiting %llu", rollbacker->thread_id);
+ DBUG_ASSERT(rollbacker->killed != NOT_KILLED);
DBUG_PRINT("wsrep",("wsrep rollbacker thread exiting"));
DBUG_VOID_RETURN;
}
void wsrep_create_rollbacker()
{
- if (wsrep_provider && strcasecmp(wsrep_provider, "none"))
- {
- wsrep_thread_args* arg;
- if((arg = (wsrep_thread_args*)my_malloc(sizeof(wsrep_thread_args), MYF(0))) == NULL) {
- WSREP_ERROR("Can't allocate memory for wsrep rollbacker thread\n");
- assert(0);
- }
-
- arg->thread_type = WSREP_ROLLBACKER_THREAD;
- arg->processor = wsrep_rollback_process;
-
- /* create rollbacker */
- if (create_wsrep_THD(arg, false)) {
- WSREP_WARN("Can't create thread to manage wsrep rollback");
- my_free(arg);
- return;
- }
- }
-}
-
-void wsrep_thd_set_PA_safe(void *thd_ptr, my_bool safe)
-{
- if (thd_ptr)
- {
- THD* thd = (THD*)thd_ptr;
- thd->wsrep_PA_safe = safe;
- }
+ DBUG_ASSERT(wsrep_cluster_address[0]);
+ Wsrep_thd_args* args(new Wsrep_thd_args(wsrep_rollback_process,
+ WSREP_ROLLBACKER_THREAD,
+ pthread_self()));
+
+ /* create rollbacker */
+ if (create_wsrep_THD(args, false))
+ WSREP_WARN("Can't create thread to manage wsrep rollback");
}
-enum wsrep_conflict_state wsrep_thd_conflict_state(THD *thd, my_bool sync)
-{
- enum wsrep_conflict_state state = NO_CONFLICT;
- if (thd)
- {
- if (sync) mysql_mutex_lock(&thd->LOCK_thd_data);
-
- state = thd->wsrep_conflict_state;
- if (sync) mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
- return state;
-}
+/*
+ Start async rollback process
-my_bool wsrep_thd_is_wsrep(THD *thd)
+ Asserts thd->LOCK_thd_data ownership
+ */
+void wsrep_fire_rollbacker(THD *thd)
{
- my_bool status = FALSE;
- if (thd)
+ DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_aborting);
+ DBUG_PRINT("wsrep",("enqueuing trx abort for %llu", thd->thread_id));
+ WSREP_DEBUG("enqueuing trx abort for (%llu)", thd->thread_id);
+ if (wsrep_rollback_queue->push_back(thd))
{
- status = (WSREP(thd) && WSREP_PROVIDER_EXISTS);
+ WSREP_WARN("duplicate thd %llu for rollbacker",
+ thd->thread_id);
}
- return status;
}
-my_bool wsrep_thd_is_BF(THD *thd, my_bool sync)
+
+int wsrep_abort_thd(THD *bf_thd_ptr, THD *victim_thd_ptr, my_bool signal)
{
- my_bool status = FALSE;
- if (thd)
- {
- // THD can be BF only if provider exists
- if (wsrep_thd_is_wsrep(thd))
- {
- if (sync)
- mysql_mutex_lock(&thd->LOCK_thd_data);
+ DBUG_ENTER("wsrep_abort_thd");
+ THD *victim_thd= (THD *) victim_thd_ptr;
+ THD *bf_thd= (THD *) bf_thd_ptr;
- status = ((thd->wsrep_exec_mode == REPL_RECV) ||
- (thd->wsrep_exec_mode == TOTAL_ORDER));
- if (sync)
- mysql_mutex_unlock(&thd->LOCK_thd_data);
- }
- }
- return status;
-}
+ mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
+ mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
-extern "C"
-my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync)
-{
- bool status = FALSE;
- if (thd_ptr)
+ /* Note that when you use RSU node is desynced from cluster, thus WSREP(thd)
+ might not be true.
+ */
+ if ((WSREP(bf_thd) ||
+ ((WSREP_ON || bf_thd->variables.wsrep_OSU_method == WSREP_OSU_RSU) &&
+ wsrep_thd_is_toi(bf_thd))) &&
+ victim_thd &&
+ !wsrep_thd_is_aborting(victim_thd))
{
- THD* thd = (THD*)thd_ptr;
- if (sync) mysql_mutex_lock(&thd->LOCK_thd_data);
-
- status = ((thd->wsrep_exec_mode == REPL_RECV) ||
- (thd->wsrep_exec_mode == TOTAL_ORDER) ||
- (thd->wsrep_exec_mode == LOCAL_COMMIT));
- if (sync) mysql_mutex_unlock(&thd->LOCK_thd_data);
+ WSREP_DEBUG("wsrep_abort_thd, by: %llu, victim: %llu", (bf_thd) ?
+ (long long)bf_thd->real_id : 0, (long long)victim_thd->real_id);
+ ha_abort_transaction(bf_thd, victim_thd, signal);
}
- return status;
-}
-
-extern "C"
-my_bool wsrep_thd_is_local(void *thd_ptr, my_bool sync)
-{
- bool status = FALSE;
- if (thd_ptr)
+ else
{
- THD* thd = (THD*)thd_ptr;
- if (sync) mysql_mutex_lock(&thd->LOCK_thd_data);
-
- status = (thd->wsrep_exec_mode == LOCAL_STATE);
- if (sync) mysql_mutex_unlock(&thd->LOCK_thd_data);
+ WSREP_DEBUG("wsrep_abort_thd not effective: %p %p", bf_thd, victim_thd);
+ wsrep_thd_UNLOCK(victim_thd);
}
- return status;
+
+ DBUG_RETURN(1);
}
-int wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr, my_bool signal)
+bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd)
{
- THD *victim_thd= (THD *) victim_thd_ptr;
- THD *bf_thd= (THD *) bf_thd_ptr;
- DBUG_ENTER("wsrep_abort_thd");
+ WSREP_LOG_THD(bf_thd, "BF aborter before");
+ WSREP_LOG_THD(victim_thd, "victim before");
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
- if ( (WSREP(bf_thd) ||
- ( (WSREP_ON || bf_thd->variables.wsrep_OSU_method == WSREP_OSU_RSU) &&
- bf_thd->wsrep_exec_mode == TOTAL_ORDER) ) &&
- victim_thd)
+ DBUG_EXECUTE_IF("sync.wsrep_bf_abort",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL sync.wsrep_bf_abort_reached "
+ "WAIT_FOR signal.wsrep_bf_abort";
+ DBUG_ASSERT(!debug_sync_set_action(bf_thd,
+ STRING_WITH_LEN(act)));
+ };);
+
+ if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active())
{
- if ((victim_thd->wsrep_conflict_state == MUST_ABORT) ||
- (victim_thd->wsrep_conflict_state == ABORTED) ||
- (victim_thd->wsrep_conflict_state == ABORTING))
+ WSREP_DEBUG("wsrep_bf_abort, BF abort for non active transaction");
+ switch (victim_thd->wsrep_trx().state())
{
- WSREP_DEBUG("wsrep_abort_thd called by %llu with victim %llu already "
- "aborted. Ignoring.",
- (bf_thd) ? (long long)bf_thd->real_id : 0,
- (long long)victim_thd->real_id);
- wsrep_thd_UNLOCK(victim_thd);
- DBUG_RETURN(1);
+ case wsrep::transaction::s_aborting: /* fall through */
+ case wsrep::transaction::s_aborted:
+ WSREP_DEBUG("victim thd is already aborted or in aborting state.");
+ return false;
+ default:
+ break;
}
+ /* Test: galera_create_table_as_select. Here we enter wsrep-lib
+ were LOCK_thd_data will be acquired, thus we need to release it.
+ However, we can still hold LOCK_thd_kill to protect from
+ disconnect or delete. */
+ mysql_mutex_unlock(&victim_thd->LOCK_thd_data);
+ wsrep_start_transaction(victim_thd, victim_thd->wsrep_next_trx_id());
+ mysql_mutex_lock(&victim_thd->LOCK_thd_data);
+ }
+
+ bool ret;
+ wsrep::seqno bf_seqno(bf_thd->wsrep_trx().ws_meta().seqno());
- WSREP_DEBUG("wsrep_abort_thd, by: %llu, victim: %llu", (bf_thd) ?
- (long long)bf_thd->real_id : 0, (long long)victim_thd->real_id);
- ha_abort_transaction(bf_thd, victim_thd, signal);
+ if (wsrep_thd_is_toi(bf_thd))
+ {
+ /* Here we enter wsrep-lib were LOCK_thd_data will be acquired,
+ thus we need to release it. However, we can still hold
+ LOCK_thd_kill to protect from disconnect or delete. */
+ mysql_mutex_unlock(&victim_thd->LOCK_thd_data);
+ ret= victim_thd->wsrep_cs().total_order_bf_abort(bf_seqno);
+ mysql_mutex_lock(&victim_thd->LOCK_thd_data);
}
else
{
- WSREP_DEBUG("wsrep_abort_thd not effective: %p %p", bf_thd, victim_thd);
+ /* Test: mysql-wsrep-features#165. Here we enter wsrep-lib
+ were LOCK_thd_data will be acquired and later LOCK_thd_kill
+ thus we need to release them. */
wsrep_thd_UNLOCK(victim_thd);
+ ret= victim_thd->wsrep_cs().bf_abort(bf_seqno);
+ wsrep_thd_LOCK(victim_thd);
}
-
- DBUG_RETURN(1);
+ if (ret)
+ {
+ wsrep_bf_aborts_counter++;
+ }
+ return ret;
}
-extern "C"
-int wsrep_thd_in_locking_session(void *thd_ptr)
+int wsrep_create_threadvars()
{
- if (thd_ptr && ((THD *)thd_ptr)->in_lock_tables) {
- return 1;
+ int ret= 0;
+ if (thread_handling == SCHEDULER_TYPES_COUNT)
+ {
+ /* Caller should have called wsrep_reset_threadvars() before this
+ method. */
+ DBUG_ASSERT(!pthread_getspecific(THR_KEY_mysys));
+ pthread_setspecific(THR_KEY_mysys, 0);
+ ret= my_thread_init();
}
- return 0;
+ return ret;
}
-bool wsrep_thd_has_explicit_locks(THD *thd)
+void wsrep_delete_threadvars()
{
- assert(thd);
- return thd->mdl_context.has_explicit_locks();
+ if (thread_handling == SCHEDULER_TYPES_COUNT)
+ {
+ /* The caller should have called wsrep_store_threadvars() before
+ this method. */
+ DBUG_ASSERT(pthread_getspecific(THR_KEY_mysys));
+ /* Reset psi state to avoid deallocating applier thread
+ psi_thread. */
+#ifdef HAVE_PSI_INTERFACE
+ PSI_thread *psi_thread= PSI_CALL_get_thread();
+ if (PSI_server)
+ {
+ PSI_server->set_thread(0);
+ }
+#endif /* HAVE_PSI_INTERFACE */
+ my_thread_end();
+ PSI_CALL_set_thread(psi_thread);
+ pthread_setspecific(THR_KEY_mysys, 0);
+ }
}
-my_bool wsrep_thd_is_applier(MYSQL_THD thd)
+void wsrep_assign_from_threadvars(THD *thd)
{
- my_bool is_applier= false;
-
- if (thd && thd->wsrep_applier)
- is_applier= true;
+ if (thread_handling == SCHEDULER_TYPES_COUNT)
+ {
+ st_my_thread_var *mysys_var= (st_my_thread_var *)pthread_getspecific(THR_KEY_mysys);
+ DBUG_ASSERT(mysys_var);
+ thd->set_mysys_var(mysys_var);
+ }
+}
- return (is_applier);
+Wsrep_threadvars wsrep_save_threadvars()
+{
+ return Wsrep_threadvars{
+ current_thd,
+ (st_my_thread_var*) pthread_getspecific(THR_KEY_mysys)
+ };
}
-void wsrep_set_load_multi_commit(THD *thd, bool split)
+void wsrep_restore_threadvars(const Wsrep_threadvars& globals)
{
- thd->wsrep_split_flag= split;
+ set_current_thd(globals.cur_thd);
+ pthread_setspecific(THR_KEY_mysys, globals.mysys_var);
}
-bool wsrep_is_load_multi_commit(THD *thd)
+int wsrep_store_threadvars(THD *thd)
{
- return thd->wsrep_split_flag;
+ if (thread_handling == SCHEDULER_TYPES_COUNT)
+ {
+ pthread_setspecific(THR_KEY_mysys, thd->mysys_var);
+ }
+ return thd->store_globals();
}
-void wsrep_report_bf_lock_wait(THD *thd,
- unsigned long long trx_id)
+void wsrep_reset_threadvars(THD *thd)
{
- if (thd)
+ if (thread_handling == SCHEDULER_TYPES_COUNT)
+ {
+ pthread_setspecific(THR_KEY_mysys, 0);
+ }
+ else
{
- WSREP_ERROR("Thread %s trx_id: %llu thread: %ld "
- "seqno: %lld query_state: %s conf_state: %s exec_mode: %s "
- "applier: %d query: %s",
- wsrep_thd_is_BF(thd, false) ? "BF" : "normal",
- trx_id,
- thd_get_thread_id(thd),
- wsrep_thd_trx_seqno(thd),
- wsrep_thd_query_state_str(thd),
- wsrep_thd_conflict_state_str(thd),
- wsrep_thd_exec_mode_str(thd),
- thd->wsrep_applier,
- wsrep_thd_query(thd));
+ thd->reset_globals();
}
}
diff --git a/sql/wsrep_thd.h b/sql/wsrep_thd.h
index 46bc08a466a..40e5ed98e9b 100644
--- a/sql/wsrep_thd.h
+++ b/sql/wsrep_thd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013 Codership Oy <info@codership.com>
+/* Copyright (C) 2013-2021 Codership Oy <info@codership.com>
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
@@ -13,46 +13,288 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. */
-#include <my_config.h>
-
#ifndef WSREP_THD_H
#define WSREP_THD_H
-#ifdef WITH_WSREP
+#include <my_config.h>
+#include "mysql/service_wsrep.h"
+#include "wsrep/client_state.hpp"
#include "sql_class.h"
+#include "wsrep_utils.h"
+#include <deque>
+class Wsrep_thd_queue
+{
+public:
+ Wsrep_thd_queue(THD* t) : thd(t)
+ {
+ mysql_mutex_init(key_LOCK_wsrep_thd_queue,
+ &LOCK_wsrep_thd_queue,
+ MY_MUTEX_INIT_FAST);
+ mysql_cond_init(key_COND_wsrep_thd_queue, &COND_wsrep_thd_queue, NULL);
+ }
+ ~Wsrep_thd_queue()
+ {
+ mysql_mutex_destroy(&LOCK_wsrep_thd_queue);
+ mysql_cond_destroy(&COND_wsrep_thd_queue);
+ }
+ bool push_back(THD* thd)
+ {
+ DBUG_ASSERT(thd);
+ wsp::auto_lock lock(&LOCK_wsrep_thd_queue);
+ std::deque<THD*>::iterator it = queue.begin();
+ while (it != queue.end())
+ {
+ if (*it == thd)
+ {
+ return true;
+ }
+ it++;
+ }
+ queue.push_back(thd);
+ mysql_cond_signal(&COND_wsrep_thd_queue);
+ return false;
+ }
+ THD* pop_front()
+ {
+ wsp::auto_lock lock(&LOCK_wsrep_thd_queue);
+ while (queue.empty())
+ {
+ if (thd->killed != NOT_KILLED)
+ return NULL;
+
+ thd->mysys_var->current_mutex= &LOCK_wsrep_thd_queue;
+ thd->mysys_var->current_cond= &COND_wsrep_thd_queue;
+
+ mysql_cond_wait(&COND_wsrep_thd_queue, &LOCK_wsrep_thd_queue);
+
+ thd->mysys_var->current_mutex= 0;
+ thd->mysys_var->current_cond= 0;
+ }
+ THD* ret= queue.front();
+ queue.pop_front();
+ return ret;
+ }
+private:
+ THD* thd;
+ std::deque<THD*> queue;
+ mysql_mutex_t LOCK_wsrep_thd_queue;
+ mysql_cond_t COND_wsrep_thd_queue;
+};
int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope);
-void wsrep_client_rollback(THD *thd);
-void wsrep_replay_sp_transaction(THD* thd);
-void wsrep_replay_transaction(THD *thd);
-bool wsrep_create_appliers(long threads, bool thread_count_lock=false);
+bool wsrep_create_appliers(long threads, bool mutex_protected=false);
void wsrep_create_rollbacker();
-int wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr,
- my_bool signal);
+bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd);
+int wsrep_abort_thd(THD *bf_thd_ptr, THD *victim_thd_ptr, my_bool signal);
/*
- PA = Parallel Applying (on the slave side)
+ Helper methods to deal with thread local storage.
+ The purpose of these methods is to hide the details of thread
+ local storage handling when operating with wsrep storage access
+ and streaming applier THDs
+
+ With one-thread-per-connection thread handling thread specific
+ variables are allocated when the thread is started and deallocated
+ before thread exits (my_thread_init(), my_thread_end()). However,
+ with pool-of-threads thread handling new thread specific variables
+ are allocated for each THD separately (see threadpool_add_connection()),
+ and the variables in thread local storage are assigned from
+ currently active thread (see thread_attach()). This must be taken into
+ account when storing/resetting thread local storage and when creating
+ streaming applier THDs.
+*/
+
+/**
+ Create new variables for thread local storage. With
+ one-thread-per-connection thread handling this is a no op,
+ with pool-of-threads new variables are created via my_thread_init().
+ It is assumed that the caller has called wsrep_reset_threadvars() to clear
+ the thread local storage before this call.
+
+ @return Zero in case of success, non-zero otherwise.
+*/
+int wsrep_create_threadvars();
+
+/**
+ Delete variables which were created by wsrep_create_threadvars().
+ The caller must store variables into thread local storage before
+ this call via wsrep_store_threadvars().
+*/
+void wsrep_delete_threadvars();
+
+/**
+ Assign variables from current thread local storage into THD.
+ This should be called for THDs whose lifetime is limited to single
+ thread execution or which may share the operation context with some
+ parent THD (e.g. storage access) and thus don't require separately
+ allocated globals.
+
+ With one-thread-per-connection thread handling this is a no-op,
+ with pool-of-threads the variables which are currently stored into
+ thread local storage are assigned to THD.
+*/
+void wsrep_assign_from_threadvars(THD *);
+
+/**
+ Helper struct to save variables from thread local storage.
+ */
+struct Wsrep_threadvars
+{
+ THD* cur_thd;
+ st_my_thread_var* mysys_var;
+};
+
+/**
+ Save variables from thread local storage into Wsrep_threadvars struct.
+ */
+Wsrep_threadvars wsrep_save_threadvars();
+
+/**
+ Restore variables into thread local storage from Wsrep_threadvars struct.
+*/
+void wsrep_restore_threadvars(const Wsrep_threadvars&);
+
+/**
+ Store variables into thread local storage.
*/
-extern void wsrep_thd_set_PA_safe(void *thd_ptr, my_bool safe);
-extern my_bool wsrep_thd_is_BF(THD *thd, my_bool sync);
-extern my_bool wsrep_thd_is_wsrep(void *thd_ptr);
+int wsrep_store_threadvars(THD *);
+
+/**
+ Reset thread local storage.
+*/
+void wsrep_reset_threadvars(THD *);
+
+/**
+ Helper functions to override error status
+
+ In many contexts it is desirable to mask the original error status
+ set for THD or it is necessary to change OK status to error.
+ This function implements the common logic for the most
+ of the cases.
+
+ Rules:
+ * If the diagnostics are has OK or EOF status, override it unconditionally
+ * If the error is either ER_ERROR_DURING_COMMIT or ER_LOCK_DEADLOCK
+ it is usually the correct error status to be returned to client,
+ so don't override those by default
+ */
+
+static inline void wsrep_override_error(THD *thd, uint error)
+{
+ DBUG_ASSERT(error != ER_ERROR_DURING_COMMIT);
+ Diagnostics_area *da= thd->get_stmt_da();
+ if (da->is_ok() ||
+ da->is_eof() ||
+ !da->is_set() ||
+ (da->is_error() &&
+ da->sql_errno() != error &&
+ da->sql_errno() != ER_ERROR_DURING_COMMIT &&
+ da->sql_errno() != ER_LOCK_DEADLOCK))
+ {
+ da->reset_diagnostics_area();
+ my_error(error, MYF(0));
+ }
+}
+
+/**
+ Override error with additional wsrep status.
+ */
+static inline void wsrep_override_error(THD *thd, uint error,
+ enum wsrep::provider::status status)
+{
+ Diagnostics_area *da= thd->get_stmt_da();
+ if (da->is_ok() ||
+ !da->is_set() ||
+ (da->is_error() &&
+ da->sql_errno() != error &&
+ da->sql_errno() != ER_ERROR_DURING_COMMIT &&
+ da->sql_errno() != ER_LOCK_DEADLOCK))
+ {
+ da->reset_diagnostics_area();
+ my_error(error, MYF(0), status);
+ }
+}
-enum wsrep_conflict_state wsrep_thd_conflict_state(void *thd_ptr, my_bool sync);
-extern "C" my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync);
-extern "C" my_bool wsrep_thd_is_local(void *thd_ptr, my_bool sync);
-extern "C" int wsrep_thd_in_locking_session(void *thd_ptr);
+static inline void wsrep_override_error(THD* thd,
+ wsrep::client_error ce,
+ enum wsrep::provider::status status)
+{
+ DBUG_ASSERT(ce != wsrep::e_success);
+ switch (ce)
+ {
+ case wsrep::e_error_during_commit:
+ wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, status);
+ break;
+ case wsrep::e_deadlock_error:
+ wsrep_override_error(thd, ER_LOCK_DEADLOCK);
+ break;
+ case wsrep::e_interrupted_error:
+ wsrep_override_error(thd, ER_QUERY_INTERRUPTED);
+ break;
+ case wsrep::e_size_exceeded_error:
+ wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, status);
+ break;
+ case wsrep::e_append_fragment_error:
+ /* TODO: Figure out better error number */
+ wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, status);
+ break;
+ case wsrep::e_not_supported_error:
+ wsrep_override_error(thd, ER_NOT_SUPPORTED_YET);
+ break;
+ case wsrep::e_timeout_error:
+ wsrep_override_error(thd, ER_LOCK_WAIT_TIMEOUT);
+ break;
+ default:
+ wsrep_override_error(thd, ER_UNKNOWN_ERROR);
+ break;
+ }
+}
-extern void wsrep_report_bf_lock_wait(THD *thd,
- unsigned long long trx_id);
+/**
+ Helper function to log THD wsrep context.
-#else /* WITH_WSREP */
+ @param thd Pointer to THD
+ @param message Optional message
+ @param function Function where the call was made from
+ */
+static inline void wsrep_log_thd(const THD *thd,
+ const char *message,
+ const char *function)
+{
+ WSREP_DEBUG("%s %s\n"
+ " thd: %llu thd_ptr: %p client_mode: %s client_state: %s trx_state: %s\n"
+ " next_trx_id: %lld trx_id: %lld seqno: %lld\n"
+ " is_streaming: %d fragments: %zu\n"
+ " sql_errno: %u message: %s\n"
+#define WSREP_THD_LOG_QUERIES
+#ifdef WSREP_THD_LOG_QUERIES
+ " command: %d query: %.72s"
+#endif /* WSREP_OBSERVER_LOG_QUERIES */
+ ,
+ function,
+ message ? message : "",
+ thd->thread_id,
+ thd,
+ wsrep_thd_client_mode_str(thd),
+ wsrep_thd_client_state_str(thd),
+ wsrep_thd_transaction_state_str(thd),
+ (long long)thd->wsrep_next_trx_id(),
+ (long long)thd->wsrep_trx_id(),
+ (long long)wsrep_thd_trx_seqno(thd),
+ thd->wsrep_trx().is_streaming(),
+ thd->wsrep_sr().fragments().size(),
+ (thd->get_stmt_da()->is_error() ? thd->get_stmt_da()->sql_errno() : 0),
+ (thd->get_stmt_da()->is_error() ? thd->get_stmt_da()->message() : "")
+#ifdef WSREP_THD_LOG_QUERIES
+ , thd->lex->sql_command,
+ wsrep_thd_query(thd)
+#endif /* WSREP_OBSERVER_LOG_QUERIES */
+ );
+}
-#define wsrep_thd_is_BF(T, S) (0)
-#define wsrep_abort_thd(X,Y,Z) do { } while(0)
-#define wsrep_create_appliers(T) do { } while(0)
+#define WSREP_LOG_THD(thd_, message_) wsrep_log_thd(thd_, message_, __FUNCTION__)
-#endif
#endif /* WSREP_THD_H */
diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h
new file mode 100644
index 00000000000..cde8163cf4f
--- /dev/null
+++ b/sql/wsrep_trans_observer.h
@@ -0,0 +1,567 @@
+/* Copyright 2016-2019 Codership Oy <http://www.codership.com>
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef WSREP_TRANS_OBSERVER_H
+#define WSREP_TRANS_OBSERVER_H
+
+#include "my_global.h"
+#include "mysql/service_wsrep.h"
+#include "wsrep_applier.h" /* wsrep_apply_error */
+#include "wsrep_xid.h"
+#include "wsrep_thd.h"
+#include "wsrep_binlog.h" /* register/deregister group commit */
+#include "my_dbug.h"
+
+class THD;
+
+/*
+ Return true if THD has active wsrep transaction.
+ */
+static inline bool wsrep_is_active(THD* thd)
+{
+ return (thd->wsrep_cs().state() != wsrep::client_state::s_none &&
+ thd->wsrep_cs().transaction().active());
+}
+
+/*
+ Return true if transaction is ordered.
+ */
+static inline bool wsrep_is_ordered(THD* thd)
+{
+ return thd->wsrep_trx().ordered();
+}
+
+/*
+ Return true if transaction has been BF aborted but has not been
+ rolled back yet.
+
+ It is required that the caller holds thd->LOCK_thd_data.
+*/
+static inline bool wsrep_must_abort(THD* thd)
+{
+ mysql_mutex_assert_owner(&thd->LOCK_thd_data);
+ return (thd->wsrep_trx().state() == wsrep::transaction::s_must_abort);
+}
+
+/*
+ Return true if the transaction must be replayed.
+ */
+static inline bool wsrep_must_replay(THD* thd)
+{
+ return (thd->wsrep_trx().state() == wsrep::transaction::s_must_replay);
+}
+/*
+ Return true if transaction has not been committed.
+
+ Note that we don't require thd->LOCK_thd_data here. Calling this method
+ makes sense only from codepaths which are past ordered_commit state
+ and the wsrep transaction is immune to BF aborts at that point.
+*/
+static inline bool wsrep_not_committed(THD* thd)
+{
+ return (thd->wsrep_trx().state() != wsrep::transaction::s_committed);
+}
+
+/*
+ Return true if THD is either committing a transaction or statement
+ is autocommit.
+ */
+static inline bool wsrep_is_real(THD* thd, bool all)
+{
+ return (all || thd->transaction.all.ha_list == 0);
+}
+
+/*
+ Check if a transaction has generated changes.
+ */
+static inline bool wsrep_has_changes(THD* thd)
+{
+ return (thd->wsrep_trx().is_empty() == false);
+}
+
+/*
+ Check if an active transaction has been BF aborted.
+ */
+static inline bool wsrep_is_bf_aborted(THD* thd)
+{
+ return (thd->wsrep_trx().active() && thd->wsrep_trx().bf_aborted());
+}
+
+static inline int wsrep_check_pk(THD* thd)
+{
+ if (!wsrep_certify_nonPK)
+ {
+ for (TABLE* table= thd->open_tables; table != NULL; table= table->next)
+ {
+ if (table->key_info == NULL || table->s->primary_key == MAX_KEY)
+ {
+ WSREP_DEBUG("No primary key found for table %s.%s",
+ table->s->db.str, table->s->table_name.str);
+ wsrep_override_error(thd, ER_LOCK_DEADLOCK);
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+static inline bool wsrep_streaming_enabled(THD* thd)
+{
+ return (thd->wsrep_sr().fragment_size() > 0);
+}
+
+/*
+ Return number of fragments succesfully certified for the
+ current statement.
+ */
+static inline size_t wsrep_fragments_certified_for_stmt(THD* thd)
+{
+ return thd->wsrep_trx().fragments_certified_for_statement();
+}
+
+static inline int wsrep_start_transaction(THD* thd, wsrep_trx_id_t trx_id)
+{
+ if (thd->wsrep_cs().state() != wsrep::client_state::s_none) {
+ if (wsrep_is_active(thd) == false)
+ return thd->wsrep_cs().start_transaction(wsrep::transaction_id(trx_id));
+ }
+ return 0;
+}
+
+/**/
+static inline int wsrep_start_trx_if_not_started(THD* thd)
+{
+ int ret= 0;
+ DBUG_ASSERT(thd->wsrep_next_trx_id() != WSREP_UNDEFINED_TRX_ID);
+ DBUG_ASSERT(thd->wsrep_cs().mode() == Wsrep_client_state::m_local);
+ if (thd->wsrep_trx().active() == false)
+ {
+ ret= wsrep_start_transaction(thd, thd->wsrep_next_trx_id());
+ }
+ return ret;
+}
+
+/*
+ Called after each row operation.
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_after_row_internal(THD* thd)
+{
+ if (thd->wsrep_cs().state() != wsrep::client_state::s_none &&
+ wsrep_thd_is_local(thd))
+ {
+ if (wsrep_check_pk(thd))
+ {
+ return 1;
+ }
+ else if (wsrep_streaming_enabled(thd))
+ {
+ return thd->wsrep_cs().after_row();
+ }
+ }
+ return 0;
+}
+
+/*
+ Helper method to determine whether commit time hooks
+ should be run for the transaction.
+
+ Commit hooks must be run in the following cases:
+ - The transaction is local and has generated write set and is committing.
+ - The transaction has been BF aborted
+ - Is running in high priority mode and is ordered. This can be replayer,
+ applier or storage access.
+ */
+static inline bool wsrep_run_commit_hook(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_run_commit_hook");
+ DBUG_PRINT("wsrep", ("Is_active: %d is_real %d has_changes %d is_applying %d "
+ "is_ordered: %d",
+ wsrep_is_active(thd), wsrep_is_real(thd, all),
+ wsrep_has_changes(thd), wsrep_thd_is_applying(thd),
+ wsrep_is_ordered(thd)));
+ /* Is MST commit or autocommit? */
+ bool ret= wsrep_is_active(thd) && wsrep_is_real(thd, all);
+ /* Do not commit if we are aborting */
+ ret= ret && (thd->wsrep_trx().state() != wsrep::transaction::s_aborting);
+ if (ret && !(wsrep_has_changes(thd) || /* Has generated write set */
+ /* Is high priority (replay, applier, storage) and the
+ transaction is scheduled for commit ordering */
+ (wsrep_thd_is_applying(thd) && wsrep_is_ordered(thd))))
+ {
+ mysql_mutex_lock(&thd->LOCK_thd_data);
+ DBUG_PRINT("wsrep", ("state: %s",
+ wsrep::to_c_string(thd->wsrep_trx().state())));
+ /* Transaction is local but has no changes, the commit hooks will
+ be skipped and the wsrep transaction is terminated in
+ wsrep_commit_empty() */
+ if (thd->wsrep_trx().state() == wsrep::transaction::s_executing)
+ {
+ ret= false;
+ }
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
+ }
+ DBUG_PRINT("wsrep", ("return: %d", ret));
+ DBUG_RETURN(ret);
+}
+
+/*
+ Called before the transaction is prepared.
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_before_prepare(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_before_prepare");
+ WSREP_DEBUG("wsrep_before_prepare: %d", wsrep_is_real(thd, all));
+ int ret= 0;
+ DBUG_ASSERT(wsrep_run_commit_hook(thd, all));
+ if ((ret= thd->wsrep_parallel_slave_wait_for_prior_commit()))
+ {
+ DBUG_RETURN(ret);
+ }
+ if ((ret= thd->wsrep_cs().before_prepare()) == 0)
+ {
+ DBUG_ASSERT(!thd->wsrep_trx().ws_meta().gtid().is_undefined());
+ wsrep_xid_init(&thd->wsrep_xid,
+ thd->wsrep_trx().ws_meta().gtid());
+ }
+ DBUG_RETURN(ret);
+}
+
+/*
+ Called after the transaction has been prepared.
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_after_prepare(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_after_prepare");
+ WSREP_DEBUG("wsrep_after_prepare: %d", wsrep_is_real(thd, all));
+ DBUG_ASSERT(wsrep_run_commit_hook(thd, all));
+ int ret= thd->wsrep_cs().after_prepare();
+ DBUG_ASSERT(ret == 0 || thd->wsrep_cs().current_error() ||
+ thd->wsrep_cs().transaction().state() == wsrep::transaction::s_must_replay);
+ DBUG_RETURN(ret);
+}
+
+/*
+ Called before the transaction is committed.
+
+ This function must be called from both client and
+ applier contexts before commit.
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_before_commit(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_before_commit");
+ WSREP_DEBUG("wsrep_before_commit: %d, %lld",
+ wsrep_is_real(thd, all),
+ (long long)wsrep_thd_trx_seqno(thd));
+ int ret= 0;
+ DBUG_ASSERT(wsrep_run_commit_hook(thd, all));
+ if ((ret= thd->wsrep_cs().before_commit()) == 0)
+ {
+ DBUG_ASSERT(!thd->wsrep_trx().ws_meta().gtid().is_undefined());
+ wsrep_xid_init(&thd->wsrep_xid,
+ thd->wsrep_trx().ws_meta().gtid());
+ wsrep_register_for_group_commit(thd);
+ }
+ DBUG_RETURN(ret);
+}
+
+/*
+ Called after the transaction has been ordered for commit.
+
+ This function must be called from both client and
+ applier contexts after the commit has been ordered.
+
+ @param thd Pointer to THD
+ @param all
+ @param err Error buffer in case of applying error
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_ordered_commit(THD* thd,
+ bool all,
+ const wsrep_apply_error&)
+{
+ DBUG_ENTER("wsrep_ordered_commit");
+ WSREP_DEBUG("wsrep_ordered_commit: %d", wsrep_is_real(thd, all));
+ DBUG_ASSERT(wsrep_run_commit_hook(thd, all));
+ DBUG_RETURN(thd->wsrep_cs().ordered_commit());
+}
+
+/*
+ Called after the transaction has been committed.
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_after_commit(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_after_commit");
+ WSREP_DEBUG("wsrep_after_commit: %d, %d, %lld, %d",
+ wsrep_is_real(thd, all),
+ wsrep_is_active(thd),
+ (long long)wsrep_thd_trx_seqno(thd),
+ wsrep_has_changes(thd));
+ DBUG_ASSERT(wsrep_run_commit_hook(thd, all));
+ int ret= 0;
+ if (thd->wsrep_trx().state() == wsrep::transaction::s_committing)
+ {
+ ret= thd->wsrep_cs().ordered_commit();
+ }
+ wsrep_unregister_from_group_commit(thd);
+ thd->wsrep_xid.null();
+ DBUG_RETURN(ret || thd->wsrep_cs().after_commit());
+}
+
+/*
+ Called before the transaction is rolled back.
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_before_rollback(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_before_rollback");
+ int ret= 0;
+ if (wsrep_is_active(thd))
+ {
+ if (!all && thd->in_active_multi_stmt_transaction())
+ {
+ if (wsrep_emulate_bin_log)
+ {
+ wsrep_thd_binlog_stmt_rollback(thd);
+ }
+
+ if (thd->wsrep_trx().is_streaming() &&
+ (wsrep_fragments_certified_for_stmt(thd) > 0))
+ {
+ /* Non-safe statement rollback during SR multi statement
+ transaction. A statement rollback is considered unsafe, if
+ the same statement has already replicated one or more fragments.
+ Self abort the transaction, the actual rollback and error
+ handling will be done in after statement phase. */
+ WSREP_DEBUG("statement rollback is not safe for streaming replication");
+ wsrep_thd_self_abort(thd);
+ ret= 0;
+ }
+ }
+ else if (wsrep_is_real(thd, all) &&
+ thd->wsrep_trx().state() != wsrep::transaction::s_aborted)
+ {
+ /* Real transaction rolling back and wsrep abort not completed
+ yet */
+ /* Reset XID so that it does not trigger writing serialization
+ history in InnoDB. This needs to be avoided because rollback
+ may happen out of order and replay may follow. */
+ thd->wsrep_xid.null();
+ ret= thd->wsrep_cs().before_rollback();
+ }
+ }
+ DBUG_RETURN(ret);
+}
+
+/*
+ Called after the transaction has been rolled back.
+
+ Return zero on succes, non-zero on failure.
+ */
+static inline int wsrep_after_rollback(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_after_rollback");
+ DBUG_RETURN((wsrep_is_real(thd, all) && wsrep_is_active(thd) &&
+ thd->wsrep_cs().transaction().state() !=
+ wsrep::transaction::s_aborted) ?
+ thd->wsrep_cs().after_rollback() : 0);
+}
+
+static inline int wsrep_before_statement(THD* thd)
+{
+ return (thd->wsrep_cs().state() != wsrep::client_state::s_none ?
+ thd->wsrep_cs().before_statement() : 0);
+}
+
+static inline
+int wsrep_after_statement(THD* thd)
+{
+ DBUG_ENTER("wsrep_after_statement");
+ WSREP_DEBUG("wsrep_after_statement for %lu client_state %s "
+ " client_mode %s trans_state %s",
+ thd_get_thread_id(thd),
+ wsrep::to_c_string(thd->wsrep_cs().state()),
+ wsrep::to_c_string(thd->wsrep_cs().mode()),
+ wsrep::to_c_string(thd->wsrep_cs().transaction().state()));
+ DBUG_RETURN((thd->wsrep_cs().state() != wsrep::client_state::s_none &&
+ thd->wsrep_cs().mode() == Wsrep_client_state::m_local) ?
+ thd->wsrep_cs().after_statement() : 0);
+}
+
+static inline void wsrep_after_apply(THD* thd)
+{
+ DBUG_ASSERT(wsrep_thd_is_applying(thd));
+ WSREP_DEBUG("wsrep_after_apply %lld", thd->thread_id);
+ thd->wsrep_cs().after_applying();
+}
+
+static inline void wsrep_open(THD* thd)
+{
+ DBUG_ENTER("wsrep_open");
+ if (WSREP_ON_)
+ {
+ /* WSREP_PROVIDER_EXISTS_ cannot be set if WSREP_ON_ is not set */
+ DBUG_ASSERT(WSREP_PROVIDER_EXISTS_);
+ thd->wsrep_cs().open(wsrep::client_id(thd->thread_id));
+ thd->wsrep_cs().debug_log_level(wsrep_debug);
+ if (!thd->wsrep_applier && thd->variables.wsrep_trx_fragment_size)
+ {
+ thd->wsrep_cs().enable_streaming(
+ wsrep_fragment_unit(thd->variables.wsrep_trx_fragment_unit),
+ size_t(thd->variables.wsrep_trx_fragment_size));
+ }
+ }
+ DBUG_VOID_RETURN;
+}
+
+static inline void wsrep_close(THD* thd)
+{
+ DBUG_ENTER("wsrep_close");
+ if (thd->wsrep_cs().state() != wsrep::client_state::s_none)
+ {
+ thd->wsrep_cs().close();
+ }
+ DBUG_VOID_RETURN;
+}
+
+static inline void wsrep_cleanup(THD* thd)
+{
+ DBUG_ENTER("wsrep_cleanup");
+ if (thd->wsrep_cs().state() != wsrep::client_state::s_none)
+ {
+ thd->wsrep_cs().cleanup();
+ }
+ DBUG_VOID_RETURN;
+}
+
+static inline void
+wsrep_wait_rollback_complete_and_acquire_ownership(THD *thd)
+{
+ DBUG_ENTER("wsrep_wait_rollback_complete_and_acquire_ownership");
+ if (thd->wsrep_cs().state() != wsrep::client_state::s_none)
+ {
+ thd->wsrep_cs().wait_rollback_complete_and_acquire_ownership();
+ }
+ DBUG_VOID_RETURN;
+}
+
+static inline int wsrep_before_command(THD* thd, bool keep_command_error)
+{
+ return (thd->wsrep_cs().state() != wsrep::client_state::s_none ?
+ thd->wsrep_cs().before_command(keep_command_error) : 0);
+}
+
+static inline int wsrep_before_command(THD* thd)
+{
+ return wsrep_before_command(thd, false);
+}
+
+/*
+ Called after each command.
+
+ Return zero on success, non-zero on failure.
+*/
+static inline void wsrep_after_command_before_result(THD* thd)
+{
+ if (thd->wsrep_cs().state() != wsrep::client_state::s_none)
+ {
+ thd->wsrep_cs().after_command_before_result();
+ }
+}
+
+static inline void wsrep_after_command_after_result(THD* thd)
+{
+ if (thd->wsrep_cs().state() != wsrep::client_state::s_none)
+ {
+ thd->wsrep_cs().after_command_after_result();
+ }
+}
+
+static inline void wsrep_after_command_ignore_result(THD* thd)
+{
+ wsrep_after_command_before_result(thd);
+ DBUG_ASSERT(!thd->wsrep_cs().current_error());
+ wsrep_after_command_after_result(thd);
+}
+
+static inline enum wsrep::client_error wsrep_current_error(THD* thd)
+{
+ return thd->wsrep_cs().current_error();
+}
+
+static inline enum wsrep::provider::status
+wsrep_current_error_status(THD* thd)
+{
+ return thd->wsrep_cs().current_error_status();
+}
+
+
+/*
+ Commit an empty transaction.
+
+ If the transaction is real and the wsrep transaction is still active,
+ the transaction did not generate any rows or keys and is committed
+ as empty. Here the wsrep transaction is rolled back and after statement
+ step is performed to leave the wsrep transaction in the state as it
+ never existed.
+*/
+static inline void wsrep_commit_empty(THD* thd, bool all)
+{
+ DBUG_ENTER("wsrep_commit_empty");
+ WSREP_DEBUG("wsrep_commit_empty(%llu)", thd->thread_id);
+ if (wsrep_is_real(thd, all) &&
+ wsrep_thd_is_local(thd) &&
+ thd->wsrep_trx().active() &&
+ thd->wsrep_trx().state() != wsrep::transaction::s_committed)
+ {
+ /* @todo CTAS with STATEMENT binlog format and empty result set
+ seems to be committing empty. Figure out why and try to fix
+ elsewhere. */
+ DBUG_ASSERT(!wsrep_has_changes(thd) ||
+ (thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
+ !thd->is_current_stmt_binlog_format_row()));
+ bool have_error= wsrep_current_error(thd);
+ int ret= wsrep_before_rollback(thd, all) ||
+ wsrep_after_rollback(thd, all) ||
+ wsrep_after_statement(thd);
+ /* The committing transaction was empty but it held some locks and
+ got BF aborted. As there were no certified changes in the
+ data, we ignore the deadlock error and rely on error reporting
+ by storage engine/server. */
+ if (!ret && !have_error && wsrep_current_error(thd))
+ {
+ DBUG_ASSERT(wsrep_current_error(thd) == wsrep::e_deadlock_error);
+ thd->wsrep_cs().reset_error();
+ }
+ if (ret)
+ {
+ WSREP_DEBUG("wsrep_commit_empty failed: %d", wsrep_current_error(thd));
+ }
+ }
+ DBUG_VOID_RETURN;
+}
+
+#endif /* WSREP_TRANS_OBSERVER */
diff --git a/sql/wsrep_types.h b/sql/wsrep_types.h
new file mode 100644
index 00000000000..9da00e305a7
--- /dev/null
+++ b/sql/wsrep_types.h
@@ -0,0 +1,29 @@
+/* Copyright 2018 Codership Oy <info@codership.com>
+
+ 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-1301 USA */
+
+/*
+ Wsrep typedefs to better conform to coding style.
+ */
+#ifndef WSREP_TYPES_H
+#define WSREP_TYPES_H
+
+#include "wsrep/seqno.hpp"
+#include "wsrep/view.hpp"
+
+typedef wsrep::id Wsrep_id;
+typedef wsrep::seqno Wsrep_seqno;
+typedef wsrep::view Wsrep_view;
+
+#endif /* WSREP_TYPES_H */
diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc
index ae8fb63ef34..4cf131fd974 100644
--- a/sql/wsrep_utils.cc
+++ b/sql/wsrep_utils.cc
@@ -21,8 +21,11 @@
#endif
#include "mariadb.h"
+#include "my_global.h"
+#include "wsrep_api.h"
#include "wsrep_utils.h"
#include "wsrep_mysqld.h"
+#include "wsrep_thd.h"
#include <sql_class.h>
@@ -47,7 +50,7 @@ static wsp::string wsrep_PATH;
void
wsrep_prepend_PATH (const char* path)
{
- int count = 0;
+ int count= 0;
while (environ[count])
{
@@ -72,7 +75,7 @@ wsrep_prepend_PATH (const char* path)
old_path + strlen("PATH="));
wsrep_PATH.set (new_path);
- environ[count] = new_path;
+ environ[count]= new_path;
}
else
{
@@ -93,28 +96,28 @@ namespace wsp
bool
env::ctor_common(char** e)
{
- env_ = static_cast<char**>(malloc((len_ + 1) * sizeof(char*)));
+ env_= static_cast<char**>(malloc((len_ + 1) * sizeof(char*)));
if (env_)
{
for (size_t i(0); i < len_; ++i)
{
assert(e[i]); // caller should make sure about len_
- env_[i] = strdup(e[i]);
+ env_[i]= strdup(e[i]);
if (!env_[i])
{
- errno_ = errno;
+ errno_= errno;
WSREP_ERROR("Failed to allocate env. var: %s", e[i]);
return true;
}
}
- env_[len_] = NULL;
+ env_[len_]= NULL;
return false;
}
else
{
- errno_ = errno;
+ errno_= errno;
WSREP_ERROR("Failed to allocate env. var vector of length: %zu", len_);
return true;
}
@@ -128,15 +131,15 @@ env::dtor()
/* don't need to go beyond the first NULL */
for (size_t i(0); env_[i] != NULL; ++i) { free(env_[i]); }
free(env_);
- env_ = NULL;
+ env_= NULL;
}
- len_ = 0;
+ len_= 0;
}
env::env(char** e)
: len_(0), env_(NULL), errno_(0)
{
- if (!e) { e = environ; }
+ if (!e) { e= environ; }
/* count the size of the vector */
while (e[len_]) { ++len_; }
@@ -154,21 +157,21 @@ env::~env() { dtor(); }
int
env::append(const char* val)
{
- char** tmp = static_cast<char**>(realloc(env_, (len_ + 2)*sizeof(char*)));
+ char** tmp= static_cast<char**>(realloc(env_, (len_ + 2)*sizeof(char*)));
if (tmp)
{
- env_ = tmp;
- env_[len_] = strdup(val);
+ env_= tmp;
+ env_[len_]= strdup(val);
if (env_[len_])
{
++len_;
- env_[len_] = NULL;
+ env_[len_]= NULL;
}
- else errno_ = errno;
+ else errno_= errno;
}
- else errno_ = errno;
+ else errno_= errno;
return errno_;
}
@@ -189,7 +192,7 @@ process::process (const char* cmd, const char* type, char** env)
if (0 == str_)
{
WSREP_ERROR ("Can't allocate command line of size: %zu", strlen(cmd));
- err_ = ENOMEM;
+ err_= ENOMEM;
return;
}
@@ -205,12 +208,12 @@ process::process (const char* cmd, const char* type, char** env)
return;
}
- if (NULL == env) { env = environ; } // default to global environment
+ if (NULL == env) { env= environ; } // default to global environment
- int pipe_fds[2] = { -1, };
+ int pipe_fds[2]= { -1, };
if (::pipe(pipe_fds))
{
- err_ = errno;
+ err_= errno;
WSREP_ERROR ("pipe() failed: %d (%s)", err_, strerror(err_));
return;
}
@@ -220,16 +223,16 @@ process::process (const char* cmd, const char* type, char** env)
int const child_end (parent_end == PIPE_READ ? PIPE_WRITE : PIPE_READ);
int const close_fd (parent_end == PIPE_READ ? STDOUT_FD : STDIN_FD);
- char* const pargv[4] = { strdup("sh"), strdup("-c"), strdup(str_), NULL };
+ char* const pargv[4]= { strdup("sh"), strdup("-c"), strdup(str_), NULL };
if (!(pargv[0] && pargv[1] && pargv[2]))
{
- err_ = ENOMEM;
+ err_= ENOMEM;
WSREP_ERROR ("Failed to allocate pargv[] array.");
goto cleanup_pipe;
}
posix_spawnattr_t attr;
- err_ = posix_spawnattr_init (&attr);
+ err_= posix_spawnattr_init (&attr);
if (err_)
{
WSREP_ERROR ("posix_spawnattr_init() failed: %d (%s)",
@@ -239,7 +242,7 @@ process::process (const char* cmd, const char* type, char** env)
/* make sure that no signlas are masked in child process */
sigset_t sigmask_empty; sigemptyset(&sigmask_empty);
- err_ = posix_spawnattr_setsigmask(&attr, &sigmask_empty);
+ err_= posix_spawnattr_setsigmask(&attr, &sigmask_empty);
if (err_)
{
WSREP_ERROR ("posix_spawnattr_setsigmask() failed: %d (%s)",
@@ -255,7 +258,7 @@ process::process (const char* cmd, const char* type, char** env)
sigaddset(&default_signals, SIGPIPE);
sigaddset(&default_signals, SIGTERM);
sigaddset(&default_signals, SIGCHLD);
- err_ = posix_spawnattr_setsigdefault(&attr, &default_signals);
+ err_= posix_spawnattr_setsigdefault(&attr, &default_signals);
if (err_)
{
WSREP_ERROR ("posix_spawnattr_setsigdefault() failed: %d (%s)",
@@ -263,7 +266,7 @@ process::process (const char* cmd, const char* type, char** env)
goto cleanup_attr;
}
- err_ = posix_spawnattr_setflags (&attr, POSIX_SPAWN_SETSIGDEF |
+ err_= posix_spawnattr_setflags (&attr, POSIX_SPAWN_SETSIGDEF |
POSIX_SPAWN_SETSIGMASK |
POSIX_SPAWN_USEVFORK);
if (err_)
@@ -274,7 +277,7 @@ process::process (const char* cmd, const char* type, char** env)
}
posix_spawn_file_actions_t fact;
- err_ = posix_spawn_file_actions_init (&fact);
+ err_= posix_spawn_file_actions_init (&fact);
if (err_)
{
WSREP_ERROR ("posix_spawn_file_actions_init() failed: %d (%s)",
@@ -283,7 +286,7 @@ process::process (const char* cmd, const char* type, char** env)
}
// close child's stdout|stdin depending on what we returning
- err_ = posix_spawn_file_actions_addclose (&fact, close_fd);
+ err_= posix_spawn_file_actions_addclose (&fact, close_fd);
if (err_)
{
WSREP_ERROR ("posix_spawn_file_actions_addclose() failed: %d (%s)",
@@ -292,7 +295,7 @@ process::process (const char* cmd, const char* type, char** env)
}
// substitute our pipe descriptor in place of the closed one
- err_ = posix_spawn_file_actions_adddup2 (&fact,
+ err_= posix_spawn_file_actions_adddup2 (&fact,
pipe_fds[child_end], close_fd);
if (err_)
{
@@ -301,30 +304,30 @@ process::process (const char* cmd, const char* type, char** env)
goto cleanup_fact;
}
- err_ = posix_spawnp (&pid_, pargv[0], &fact, &attr, pargv, env);
+ err_= posix_spawnp (&pid_, pargv[0], &fact, &attr, pargv, env);
if (err_)
{
WSREP_ERROR ("posix_spawnp(%s) failed: %d (%s)",
pargv[2], err_, strerror(err_));
- pid_ = 0; // just to make sure it was not messed up in the call
+ pid_= 0; // just to make sure it was not messed up in the call
goto cleanup_fact;
}
- io_ = fdopen (pipe_fds[parent_end], type);
+ io_= fdopen (pipe_fds[parent_end], type);
if (io_)
{
- pipe_fds[parent_end] = -1; // skip close on cleanup
+ pipe_fds[parent_end]= -1; // skip close on cleanup
}
else
{
- err_ = errno;
+ err_= errno;
WSREP_ERROR ("fdopen() failed: %d (%s)", err_, strerror(err_));
}
cleanup_fact:
int err; // to preserve err_ code
- err = posix_spawn_file_actions_destroy (&fact);
+ err= posix_spawn_file_actions_destroy (&fact);
if (err)
{
WSREP_ERROR ("posix_spawn_file_actions_destroy() failed: %d (%s)\n",
@@ -332,7 +335,7 @@ cleanup_fact:
}
cleanup_attr:
- err = posix_spawnattr_destroy (&attr);
+ err= posix_spawnattr_destroy (&attr);
if (err)
{
WSREP_ERROR ("posix_spawnattr_destroy() failed: %d (%s)",
@@ -360,7 +363,7 @@ process::~process ()
if (fclose (io_) == -1)
{
- err_ = errno;
+ err_= errno;
WSREP_ERROR("fclose() failed: %d (%s)", err_, strerror(err_));
}
}
@@ -376,34 +379,34 @@ process::wait ()
int status;
if (-1 == waitpid(pid_, &status, 0))
{
- err_ = errno; assert (err_);
+ err_= errno; assert (err_);
WSREP_ERROR("Waiting for process failed: %s, PID(%ld): %d (%s)",
str_, (long)pid_, err_, strerror (err_));
}
else
{ // command completed, check exit status
if (WIFEXITED (status)) {
- err_ = WEXITSTATUS (status);
+ err_= WEXITSTATUS (status);
}
else { // command didn't complete with exit()
WSREP_ERROR("Process was aborted.");
- err_ = errno ? errno : ECHILD;
+ err_= errno ? errno : ECHILD;
}
if (err_) {
switch (err_) /* Translate error codes to more meaningful */
{
- case 126: err_ = EACCES; break; /* Permission denied */
- case 127: err_ = ENOENT; break; /* No such file or directory */
- case 143: err_ = EINTR; break; /* Subprocess killed */
+ case 126: err_= EACCES; break; /* Permission denied */
+ case 127: err_= ENOENT; break; /* No such file or directory */
+ case 143: err_= EINTR; break; /* Subprocess killed */
}
WSREP_ERROR("Process completed with error: %s: %d (%s)",
str_, err_, strerror(err_));
}
- pid_ = 0;
+ pid_= 0;
if (io_) fclose (io_);
- io_ = NULL;
+ io_= NULL;
}
}
else {
@@ -419,9 +422,10 @@ thd::thd (my_bool won, bool system_thread) : init(), ptr(new THD(0))
if (ptr)
{
ptr->thread_stack= (char*) &ptr;
- ptr->store_globals();
+ wsrep_assign_from_threadvars(ptr);
+ wsrep_store_threadvars(ptr);
ptr->variables.option_bits&= ~OPTION_BIN_LOG; // disable binlog
- ptr->variables.wsrep_on = won;
+ ptr->variables.wsrep_on= won;
if (system_thread)
ptr->system_thread= SYSTEM_THREAD_GENERIC;
ptr->security_ctx->master_access= ~(ulong)0;
@@ -443,7 +447,7 @@ thd::~thd ()
/* Returns INADDR_NONE, INADDR_ANY, INADDR_LOOPBACK or something else */
unsigned int wsrep_check_ip (const char* const addr, bool *is_ipv6)
{
- unsigned int ret = INADDR_NONE;
+ unsigned int ret= INADDR_NONE;
struct addrinfo *res, hints;
memset (&hints, 0, sizeof(hints));
@@ -453,7 +457,7 @@ unsigned int wsrep_check_ip (const char* const addr, bool *is_ipv6)
*is_ipv6= false;
- int gai_ret = getaddrinfo(addr, NULL, &hints, &res);
+ int gai_ret= getaddrinfo(addr, NULL, &hints, &res);
if (0 == gai_ret)
{
if (AF_INET == res->ai_family) /* IPv4 */
@@ -490,7 +494,9 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len)
size_t ret= 0;
// Attempt 1: Try to get the IP from bind-address.
- if (my_bind_addr_str && my_bind_addr_str[0] != '\0')
+ // Skip if empty or bind-address=*
+ if (my_bind_addr_str && my_bind_addr_str[0] != '\0' &&
+ strcmp(my_bind_addr_str, "*") != 0)
{
bool unused;
unsigned int const ip_type= wsrep_check_ip(my_bind_addr_str, &unused);
@@ -541,7 +547,7 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len)
if (getifaddrs(&ifaddr) == 0)
{
- for (ifa= ifaddr; ifa != NULL; ifa = ifa->ifa_next)
+ for (ifa= ifaddr; ifa != NULL; ifa= ifa->ifa_next)
{
if (!ifa->ifa_addr)
continue;
diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h
index 1263feb0463..743e8d1fb70 100644
--- a/sql/wsrep_utils.h
+++ b/sql/wsrep_utils.h
@@ -175,52 +175,37 @@ private:
class Config_state
{
public:
- Config_state() : view_(), status_(WSREP_MEMBER_UNDEFINED)
+ Config_state() : view_(), status_(wsrep::server_state::s_disconnected)
{}
- void set(wsrep_member_status_t status, const wsrep_view_info_t* view)
+ void set(const wsrep::view& view)
{
- wsrep_notify_status(status, view);
+ wsrep_notify_status(status_, &view);
lock();
-
- status_= status;
- view_= *view;
- member_info_.clear();
-
- wsrep_member_info_t memb;
- for(int i= 0; i < view->memb_num; i ++)
- {
- memb= view->members[i];
- member_info_.append_val(memb);
- }
-
+ view_= view;
unlock();
}
- void set(wsrep_member_status_t status)
+ void set(enum wsrep::server_state::state status)
{
- wsrep_notify_status(status, 0);
+ wsrep_notify_status(status);
+
lock();
status_= status;
unlock();
}
- wsrep_view_info_t get_view_info() const
+ const wsrep::view& get_view_info() const
{
return view_;
}
- wsrep_member_status_t get_status() const
+ enum wsrep::server_state::state get_status() const
{
return status_;
}
- Dynamic_array<wsrep_member_info_t> * get_member_info()
- {
- return &member_info_;
- }
-
int lock()
{
return mysql_mutex_lock(&LOCK_wsrep_config_state);
@@ -232,9 +217,8 @@ public:
}
private:
- wsrep_view_info_t view_;
- wsrep_member_status_t status_;
- Dynamic_array<wsrep_member_info_t> member_info_;
+ wsrep::view view_;
+ enum wsrep::server_state::state status_;
};
} /* namespace wsp */
@@ -310,12 +294,23 @@ public:
string() : string_(0) {}
explicit string(size_t s) : string_(static_cast<char*>(malloc(s))) {}
char* operator()() { return string_; }
- void set(char* str) { if (string_) free (string_); string_ = str; }
+ void set(char* str) { if (string_) free (string_); string_= str; }
~string() { set (0); }
private:
char* string_;
};
+/* scope level lock */
+class auto_lock
+{
+public:
+ auto_lock(mysql_mutex_t* m) : m_(m) { mysql_mutex_lock(m_); }
+ ~auto_lock() { mysql_mutex_unlock(m_); }
+private:
+ mysql_mutex_t& operator =(mysql_mutex_t&);
+ mysql_mutex_t* const m_;
+};
+
#ifdef REMOVED
class lock
{
@@ -325,7 +320,7 @@ public:
lock (pthread_mutex_t* mtx) : mtx_(mtx)
{
- int err = pthread_mutex_lock (mtx_);
+ int err= pthread_mutex_lock (mtx_);
if (err)
{
@@ -336,7 +331,7 @@ public:
virtual ~lock ()
{
- int err = pthread_mutex_unlock (mtx_);
+ int err= pthread_mutex_unlock (mtx_);
if (err)
{
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index 413550935cb..8919715b188 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -1,4 +1,4 @@
-/* Copyright 2008-2015 Codership Oy <http://www.codership.com>
+/* Copyright 2008-2021 Codership Oy <http://www.codership.com>
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
@@ -25,6 +25,8 @@
#include <my_dir.h>
#include <cstdio>
#include <cstdlib>
+#include "wsrep_trans_observer.h"
+#include "wsrep_server_state.h"
ulong wsrep_reject_queries;
@@ -41,6 +43,60 @@ int wsrep_init_vars()
return 0;
}
+static int get_provider_option_value(const char* opts,
+ const char* opt_name,
+ ulong* opt_value)
+{
+ int ret= 1;
+ ulong opt_value_tmp;
+ char *opt_value_str, *s, *opts_copy= my_strdup(opts, MYF(MY_WME));
+
+ if ((opt_value_str= strstr(opts_copy, opt_name)) == NULL)
+ goto end;
+ opt_value_str= strtok_r(opt_value_str, "=", &s);
+ if (opt_value_str == NULL) goto end;
+ opt_value_str= strtok_r(NULL, ";", &s);
+ if (opt_value_str == NULL) goto end;
+
+ opt_value_tmp= strtoul(opt_value_str, NULL, 10);
+ if (errno == ERANGE) goto end;
+
+ *opt_value= opt_value_tmp;
+ ret= 0;
+
+end:
+ my_free(opts_copy);
+ return ret;
+}
+
+static bool refresh_provider_options()
+{
+ WSREP_DEBUG("refresh_provider_options: %s",
+ (wsrep_provider_options) ? wsrep_provider_options : "null");
+
+ try
+ {
+ std::string opts= Wsrep_server_state::instance().provider().options();
+ wsrep_provider_options_init(opts.c_str());
+ get_provider_option_value(wsrep_provider_options,
+ (char*)"repl.max_ws_size",
+ &wsrep_max_ws_size);
+ return false;
+ }
+ catch (...)
+ {
+ WSREP_ERROR("Failed to get provider options");
+ return true;
+ }
+}
+
+void wsrep_set_wsrep_on()
+{
+ WSREP_PROVIDER_EXISTS_= wsrep_provider &&
+ strncasecmp(wsrep_provider, WSREP_NONE, FN_REFLEN);
+ WSREP_ON_= global_system_variables.wsrep_on && WSREP_PROVIDER_EXISTS_;
+}
+
/* This is intentionally declared as a weak global symbol, so that
linking will succeed even if the server is built with a dynamically
linked InnoDB. */
@@ -49,9 +105,43 @@ struct handlerton* innodb_hton_ptr __attribute__((weak));
bool wsrep_on_update (sys_var *self, THD* thd, enum_var_type var_type)
{
- if (var_type == OPT_GLOBAL) {
- // FIXME: this variable probably should be changed only per session
- thd->variables.wsrep_on = global_system_variables.wsrep_on;
+ if (var_type == OPT_GLOBAL)
+ {
+ my_bool saved_wsrep_on= global_system_variables.wsrep_on;
+
+ thd->variables.wsrep_on= global_system_variables.wsrep_on;
+
+ // If wsrep has not been inited we need to do it now
+ if (global_system_variables.wsrep_on && wsrep_provider && !wsrep_inited)
+ {
+ // wsrep_init() rewrites provide if it fails
+ char* tmp= strdup(wsrep_provider);
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+
+ if (wsrep_init())
+ {
+ my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp, my_error, "wsrep_init failed");
+ //rcode= true;
+ saved_wsrep_on= false;
+ }
+
+ free(tmp);
+ mysql_mutex_lock(&LOCK_global_system_variables);
+ }
+
+ thd->variables.wsrep_on= global_system_variables.wsrep_on= saved_wsrep_on;
+ }
+
+ wsrep_set_wsrep_on();
+
+ if (var_type == OPT_GLOBAL)
+ {
+ if (thd->variables.wsrep_on &&
+ thd->wsrep_cs().state() == wsrep::client_state::s_none)
+ {
+ wsrep_open(thd);
+ wsrep_before_command(thd);
+ }
}
return false;
@@ -64,21 +154,62 @@ bool wsrep_on_check(sys_var *self, THD* thd, set_var* var)
if (check_has_super(self, thd, var))
return true;
- if (new_wsrep_on && innodb_hton_ptr && innodb_lock_schedule_algorithm != 0) {
- my_message(ER_WRONG_ARGUMENTS, " WSREP (galera) can't be enabled "
- "if innodb_lock_schedule_algorithm=VATS. Please configure"
- " innodb_lock_schedule_algorithm=FCFS and restart.", MYF(0));
+ if (new_wsrep_on)
+ {
+ if (innodb_hton_ptr && innodb_lock_schedule_algorithm != 0)
+ {
+ my_message(ER_WRONG_ARGUMENTS, " WSREP (galera) can't be enabled "
+ "if innodb_lock_schedule_algorithm=VATS. Please configure"
+ " innodb_lock_schedule_algorithm=FCFS and restart.", MYF(0));
+ return true;
+ }
+
+ if (!WSREP_PROVIDER_EXISTS)
+ {
+ my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) can't be enabled "
+ "if the wsrep_provider is unset or set to 'none'", MYF(0));
+ return true;
+ }
+
+ if (var->type == OPT_SESSION &&
+ !global_system_variables.wsrep_on)
+ {
+ my_message(ER_WRONG_ARGUMENTS,
+ "Can't enable @@session.wsrep_on, "
+ "while @@global.wsrep_on is disabled", MYF(0));
+ return true;
+ }
+ }
+
+ if (thd->in_active_multi_stmt_transaction())
+ {
+ my_error(ER_CANT_DO_THIS_DURING_AN_TRANSACTION, MYF(0));
return true;
}
+
+ if (var->type == OPT_GLOBAL)
+ {
+ /*
+ The global value is about to change. Cleanup
+ the transaction state and close the client
+ state. wsrep_on_update() will take care of
+ reopening it should wsrep_on be re-enabled.
+ */
+ if (global_system_variables.wsrep_on && !new_wsrep_on)
+ {
+ wsrep_commit_empty(thd, true);
+ wsrep_after_statement(thd);
+ wsrep_after_command_ignore_result(thd);
+ wsrep_close(thd);
+ wsrep_cleanup(thd);
+ }
+ }
+
return false;
}
bool wsrep_causal_reads_update (sys_var *self, THD* thd, enum_var_type var_type)
{
- // global setting should not affect session setting.
- // if (var_type == OPT_GLOBAL) {
- // thd->variables.wsrep_causal_reads = global_system_variables.wsrep_causal_reads;
- // }
if (thd->variables.wsrep_causal_reads) {
thd->variables.wsrep_sync_wait |= WSREP_SYNC_WAIT_BEFORE_READ;
} else {
@@ -97,15 +228,11 @@ bool wsrep_causal_reads_update (sys_var *self, THD* thd, enum_var_type var_type)
bool wsrep_sync_wait_update (sys_var* self, THD* thd, enum_var_type var_type)
{
- // global setting should not affect session setting.
- // if (var_type == OPT_GLOBAL) {
- // thd->variables.wsrep_sync_wait = global_system_variables.wsrep_sync_wait;
- // }
- thd->variables.wsrep_causal_reads = thd->variables.wsrep_sync_wait &
+ thd->variables.wsrep_causal_reads= thd->variables.wsrep_sync_wait &
WSREP_SYNC_WAIT_BEFORE_READ;
// update global settings too
- global_system_variables.wsrep_causal_reads = global_system_variables.wsrep_sync_wait &
+ global_system_variables.wsrep_causal_reads= global_system_variables.wsrep_sync_wait &
WSREP_SYNC_WAIT_BEFORE_READ;
return false;
@@ -127,7 +254,7 @@ bool wsrep_start_position_verify (const char* start_str)
ssize_t uuid_len;
// Check whether it has minimum acceptable length.
- start_len = strlen (start_str);
+ start_len= strlen (start_str);
if (start_len < 34)
return true;
@@ -135,7 +262,7 @@ bool wsrep_start_position_verify (const char* start_str)
Parse the input to check whether UUID length is acceptable
and seqno has been provided.
*/
- uuid_len = wsrep_uuid_scan (start_str, start_len, &uuid);
+ uuid_len= wsrep_uuid_scan (start_str, start_len, &uuid);
if (uuid_len < 0 || (start_len - uuid_len) < 2)
return true;
@@ -144,8 +271,11 @@ bool wsrep_start_position_verify (const char* start_str)
return true;
char* endptr;
- wsrep_seqno_t const seqno __attribute__((unused)) // to avoid GCC warnings
- (strtoll(&start_str[uuid_len + 1], &endptr, 10));
+ wsrep_seqno_t const seqno(strtoll(&start_str[uuid_len + 1], &endptr, 10));
+
+ // Do not allow seqno < -1
+ if (*endptr == '\0' && seqno < -1)
+ return true;
// Remaining string was seqno.
if (*endptr == '\0') return false;
@@ -155,20 +285,31 @@ bool wsrep_start_position_verify (const char* start_str)
static
-bool wsrep_set_local_position(const char* const value, size_t length,
- bool const sst)
+bool wsrep_set_local_position(THD* thd, const char* const value,
+ size_t length, bool const sst)
{
wsrep_uuid_t uuid;
- size_t const uuid_len = wsrep_uuid_scan(value, length, &uuid);
- wsrep_seqno_t const seqno = strtoll(value + uuid_len + 1, NULL, 10);
+ size_t const uuid_len= wsrep_uuid_scan(value, length, &uuid);
+ wsrep_seqno_t const seqno= strtoll(value + uuid_len + 1, NULL, 10);
+
+ char start_pos_buf[FN_REFLEN];
+ memcpy(start_pos_buf, value, length);
+ start_pos_buf[length]='\0';
+
+ // If both are same as WSREP_START_POSITION_ZERO just set local
+ if (!strcmp(start_pos_buf, WSREP_START_POSITION_ZERO) &&
+ !strcmp(wsrep_start_position, WSREP_START_POSITION_ZERO))
+ goto set;
+ else
+ WSREP_INFO("SST setting local position to %s current %s", start_pos_buf, wsrep_start_position);
+
+ if (sst)
+ return (wsrep_sst_received (thd, uuid, seqno, NULL, 0));
+
+set:
+ local_uuid= uuid;
+ local_seqno= seqno;
- if (sst) {
- return wsrep_sst_received (wsrep, uuid, seqno, NULL, 0, false);
- } else {
- // initialization
- local_uuid = uuid;
- local_seqno = seqno;
- }
return false;
}
@@ -185,19 +326,34 @@ bool wsrep_start_position_check (sys_var *self, THD* thd, set_var* var)
var->save_result.string_value.length);
start_pos_buf[var->save_result.string_value.length]= 0;
+
+ WSREP_DEBUG("SST wsrep_start_position check for new position %s old %s",
+ start_pos_buf, wsrep_start_position);
+
// Verify the format.
if (wsrep_start_position_verify(start_pos_buf)) return true;
+
+ // Give error if position is updated when wsrep is not enabled or
+ // provider is not loaded.
+ if ((!WSREP_ON || !Wsrep_server_state::instance().is_provider_loaded())
+ && strcmp(start_pos_buf, WSREP_START_POSITION_ZERO))
+ {
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "Cannot set 'wsrep_start_position' because "
+ "wsrep is switched off or provider is not loaded");
+ goto err;
+ }
+
/*
As part of further verification, we try to update the value and catch
- errors (if any).
+ errors (if any) only when value actually has been changed.
*/
- if (wsrep_set_local_position(var->save_result.string_value.str,
+ if (wsrep_set_local_position(thd, var->save_result.string_value.str,
var->save_result.string_value.length,
true))
- {
goto err;
- }
return false;
@@ -219,12 +375,12 @@ bool wsrep_start_position_init (const char* val)
{
if (NULL == val || wsrep_start_position_verify (val))
{
- WSREP_ERROR("Bad initial value for wsrep_start_position: %s",
+ WSREP_ERROR("Bad initial value for wsrep_start_position: %s",
(val ? val : ""));
return true;
}
- if (wsrep_set_local_position (val, strlen(val), false))
+ if (wsrep_set_local_position (NULL, val, strlen(val), false))
{
WSREP_ERROR("Failed to set initial wsep_start_position: %s", val);
return true;
@@ -233,55 +389,6 @@ bool wsrep_start_position_init (const char* val)
return false;
}
-static int get_provider_option_value(const char* opts,
- const char* opt_name,
- ulong* opt_value)
-{
- int ret= 1;
- ulong opt_value_tmp;
- char *opt_value_str, *s, *opts_copy= my_strdup(opts, MYF(MY_WME));
-
- if ((opt_value_str= strstr(opts_copy, opt_name)) == NULL)
- goto end;
- opt_value_str= strtok_r(opt_value_str, "=", &s);
- if (opt_value_str == NULL) goto end;
- opt_value_str= strtok_r(NULL, ";", &s);
- if (opt_value_str == NULL) goto end;
-
- opt_value_tmp= strtoul(opt_value_str, NULL, 10);
- if (errno == ERANGE) goto end;
-
- *opt_value= opt_value_tmp;
- ret= 0;
-
-end:
- my_free(opts_copy);
- return ret;
-}
-
-static bool refresh_provider_options()
-{
- DBUG_ASSERT(wsrep);
-
- WSREP_DEBUG("refresh_provider_options: %s",
- (wsrep_provider_options) ? wsrep_provider_options : "null");
- char* opts= wsrep->options_get(wsrep);
- if (opts)
- {
- wsrep_provider_options_init(opts);
- get_provider_option_value(wsrep_provider_options,
- (char*)"repl.max_ws_size",
- &wsrep_max_ws_size);
- free(opts);
- }
- else
- {
- WSREP_ERROR("Failed to get provider options");
- return true;
- }
- return false;
-}
-
static int wsrep_provider_verify (const char* provider_str)
{
MY_STAT f_stat;
@@ -302,6 +409,12 @@ static int wsrep_provider_verify (const char* provider_str)
{
return 1;
}
+
+ if (MY_S_ISDIR(f_stat.st_mode))
+ {
+ return 1;
+ }
+
return 0;
}
@@ -330,21 +443,24 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
{
bool rcode= false;
- bool wsrep_on_saved= thd->variables.wsrep_on;
- thd->variables.wsrep_on= false;
WSREP_DEBUG("wsrep_provider_update: %s", wsrep_provider);
- /* stop replication is heavy operation, and includes closing all client
+ /* stop replication is heavy operation, and includes closing all client
connections. Closing clients may need to get LOCK_global_system_variables
at least in MariaDB.
- Note: releasing LOCK_global_system_variables may cause race condition, if
+ Note: releasing LOCK_global_system_variables may cause race condition, if
there can be several concurrent clients changing wsrep_provider
*/
mysql_mutex_unlock(&LOCK_global_system_variables);
wsrep_stop_replication(thd);
- mysql_mutex_lock(&LOCK_global_system_variables);
+
+ /* provider status variables are allocated in provider library
+ and need to freed here, otherwise a dangling reference to
+ wsrep_status_vars would remain in THD
+ */
+ wsrep_free_status(thd);
if (wsrep_inited == 1)
wsrep_deinit(false);
@@ -355,25 +471,26 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
if (wsrep_init())
{
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp, my_error, "wsrep_init failed");
- rcode = true;
+ rcode= true;
}
free(tmp);
// we sure don't want to use old address with new provider
wsrep_cluster_address_init(NULL);
wsrep_provider_options_init(NULL);
+ if (!rcode)
+ refresh_provider_options();
- thd->variables.wsrep_on= wsrep_on_saved;
-
- refresh_provider_options();
+ wsrep_set_wsrep_on();
+ mysql_mutex_lock(&LOCK_global_system_variables);
return rcode;
}
void wsrep_provider_init (const char* value)
{
- WSREP_DEBUG("wsrep_provider_init: %s -> %s",
- (wsrep_provider) ? wsrep_provider : "null",
+ WSREP_DEBUG("wsrep_provider_init: %s -> %s",
+ (wsrep_provider) ? wsrep_provider : "null",
(value) ? value : "null");
if (NULL == value || wsrep_provider_verify (value))
{
@@ -383,12 +500,13 @@ void wsrep_provider_init (const char* value)
}
if (wsrep_provider) my_free((void *)wsrep_provider);
- wsrep_provider = my_strdup(value, MYF(0));
+ wsrep_provider= my_strdup(value, MYF(0));
+ wsrep_set_wsrep_on();
}
bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var)
{
- if (wsrep == NULL)
+ if (!WSREP_ON)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
@@ -398,22 +516,28 @@ bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var)
bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type)
{
- DBUG_ASSERT(wsrep);
- wsrep_status_t ret= wsrep->options_set(wsrep, wsrep_provider_options);
- if (ret != WSREP_OK)
+ if (wsrep_provider_options)
{
- WSREP_ERROR("Set options returned %d", ret);
- refresh_provider_options();
- return true;
+ enum wsrep::provider::status ret=
+ Wsrep_server_state::instance().provider().options(wsrep_provider_options);
+ if (ret)
+ {
+ WSREP_ERROR("Set options returned %d", ret);
+ goto err;
+ }
+
+ return refresh_provider_options();
}
- return refresh_provider_options();
+err:
+ refresh_provider_options();
+ return true;
}
void wsrep_provider_options_init(const char* value)
{
- if (wsrep_provider_options && wsrep_provider_options != value)
+ if (wsrep_provider_options && wsrep_provider_options != value)
my_free((void *)wsrep_provider_options);
- wsrep_provider_options = (value) ? my_strdup(value, MYF(0)) : NULL;
+ wsrep_provider_options= (value) ? my_strdup(value, MYF(0)) : NULL;
}
bool wsrep_reject_queries_update(sys_var *self, THD* thd, enum_var_type type)
@@ -438,6 +562,25 @@ bool wsrep_reject_queries_update(sys_var *self, THD* thd, enum_var_type type)
return false;
}
+bool wsrep_debug_update(sys_var *self, THD* thd, enum_var_type type)
+{
+ // Give warnings if wsrep_debug is set and wsrep is disabled or
+ // provider is not loaded, it will not have any effect
+ if ((!WSREP_ON || !Wsrep_server_state::instance().is_provider_loaded())
+ && wsrep_debug)
+ {
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "Setting 'wsrep_debug' has no effect because "
+ "wsrep is switched off");
+ wsrep_debug= 0;
+ }
+ else
+ Wsrep_server_state::instance().debug_log_level(wsrep_debug);
+
+ return false;
+}
+
static int wsrep_cluster_address_verify (const char* cluster_address_str)
{
/* There is no predefined address format, it depends on provider. */
@@ -467,53 +610,48 @@ bool wsrep_cluster_address_check (sys_var *self, THD* thd, set_var* var)
bool wsrep_cluster_address_update (sys_var *self, THD* thd, enum_var_type type)
{
- bool wsrep_on_saved;
-
- /* Do not proceed if wsrep provider is not loaded. */
- if (!wsrep)
+ if (!Wsrep_server_state::instance().is_provider_loaded())
{
- WSREP_INFO("wsrep provider is not loaded, can't re(start) replication.");
+ WSREP_INFO("WSREP (galera) provider is not loaded, can't re(start) replication.");
return false;
}
- wsrep_on_saved= thd->variables.wsrep_on;
- thd->variables.wsrep_on= false;
-
- /* stop replication is heavy operation, and includes closing all client
+ /* stop replication is heavy operation, and includes closing all client
connections. Closing clients may need to get LOCK_global_system_variables
at least in MariaDB.
-
- Note: releasing LOCK_global_system_variables may cause race condition, if
- there can be several concurrent clients changing wsrep_provider
*/
+ char *tmp= my_strdup(wsrep_cluster_address, MYF(MY_WME));
+ WSREP_DEBUG("wsrep_cluster_address_update: %s", wsrep_cluster_address);
mysql_mutex_unlock(&LOCK_global_system_variables);
- wsrep_stop_replication(thd);
- /*
- Unlock and lock LOCK_wsrep_slave_threads to maintain lock order & avoid
- any potential deadlock.
- */
- mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
- mysql_mutex_lock(&LOCK_global_system_variables);
- mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+ mysql_mutex_lock(&LOCK_wsrep_cluster_config);
+ wsrep_stop_replication(thd);
- if (wsrep_start_replication())
+ if (*tmp && wsrep_start_replication(tmp))
{
wsrep_create_rollbacker();
WSREP_DEBUG("Cluster address update creating %ld applier threads running %lu",
wsrep_slave_threads, wsrep_running_applier_threads);
wsrep_create_appliers(wsrep_slave_threads);
}
+ mysql_mutex_unlock(&LOCK_wsrep_cluster_config);
- thd->variables.wsrep_on= wsrep_on_saved;
+ mysql_mutex_lock(&LOCK_global_system_variables);
+ if (strcmp(tmp, wsrep_cluster_address))
+ {
+ my_free((void*)wsrep_cluster_address);
+ wsrep_cluster_address= tmp;
+ }
+ else
+ my_free(tmp);
return false;
}
void wsrep_cluster_address_init (const char* value)
{
- WSREP_DEBUG("wsrep_cluster_address_init: %s -> %s",
- (wsrep_cluster_address) ? wsrep_cluster_address : "null",
+ WSREP_DEBUG("wsrep_cluster_address_init: %s -> %s",
+ (wsrep_cluster_address) ? wsrep_cluster_address : "null",
(value) ? value : "null");
my_free((void*) wsrep_cluster_address);
@@ -590,7 +728,7 @@ void wsrep_node_address_init (const char* value)
if (wsrep_node_address && strcmp(wsrep_node_address, value))
my_free ((void*)wsrep_node_address);
- wsrep_node_address = (value) ? my_strdup(value, MYF(0)) : NULL;
+ wsrep_node_address= (value) ? my_strdup(value, MYF(0)) : NULL;
}
static void wsrep_slave_count_change_update ()
@@ -602,7 +740,12 @@ static void wsrep_slave_count_change_update ()
bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
{
- mysql_mutex_lock(&LOCK_thread_count);
+ if (!wsrep_cluster_address_exists())
+ return false;
+
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+ mysql_mutex_lock(&LOCK_global_system_variables);
bool res= false;
wsrep_slave_count_change_update();
@@ -615,14 +758,14 @@ bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
wsrep_slave_count_change = 0;
}
- mysql_mutex_unlock(&LOCK_thread_count);
+ mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
return res;
}
bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
{
- if (wsrep == NULL)
+ if (!WSREP_ON)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
@@ -647,17 +790,17 @@ bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
}
return false;
}
- wsrep_status_t ret(WSREP_WARNING);
+ int ret= 1;
if (new_wsrep_desync) {
- ret = wsrep->desync (wsrep);
- if (ret != WSREP_OK) {
- WSREP_WARN ("SET desync failed %d for schema: %s, query: %s",
- ret, thd->get_db(), thd->query());
+ ret= Wsrep_server_state::instance().provider().desync();
+ if (ret) {
+ WSREP_WARN ("SET desync failed %d for schema: %s, query: %s", ret,
+ thd->db.str, wsrep_thd_query(thd));
my_error (ER_CANNOT_USER, MYF(0), "'desync'", thd->query());
return true;
}
} else {
- ret = wsrep->resync (wsrep);
+ ret= Wsrep_server_state::instance().provider().resync();
if (ret != WSREP_OK) {
WSREP_WARN ("SET resync failed %d for schema: %s, query: %s", ret,
thd->get_db(), thd->query());
@@ -670,13 +813,102 @@ bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
{
- DBUG_ASSERT(wsrep);
+ return false;
+}
+
+bool wsrep_trx_fragment_size_check (sys_var *self, THD* thd, set_var* var)
+{
+ if (var->value == NULL) {
+ return false;
+ }
+
+ const ulong new_trx_fragment_size= var->value->val_uint();
+
+ if (!WSREP(thd) && new_trx_fragment_size > 0) {
+ push_warning (thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "Cannot set 'wsrep_trx_fragment_size' to a value other than "
+ "0 because wsrep is switched off.");
+ return true;
+ }
+
+ if (new_trx_fragment_size > 0 && !wsrep_provider_is_SR_capable()) {
+ push_warning (thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "Cannot set 'wsrep_trx_fragment_size' to a value other than "
+ "0 because the wsrep_provider does not support streaming "
+ "replication.");
+ return true;
+ }
+
+ if (wsrep_protocol_version < 4 && new_trx_fragment_size > 0) {
+ push_warning (thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "Cannot set 'wsrep_trx_fragment_size' to a value other than "
+ "0 because cluster is not yet operating in Galera 4 mode.");
+ return true;
+ }
+
+ return false;
+}
+
+bool wsrep_trx_fragment_size_update(sys_var* self, THD *thd, enum_var_type)
+{
+ WSREP_DEBUG("wsrep_trx_fragment_size_update: %llu",
+ thd->variables.wsrep_trx_fragment_size);
+
+ // Give error if wsrep_trx_fragment_size is set and wsrep is disabled or
+ // provider is not loaded
+ if (!WSREP_ON || !Wsrep_server_state::instance().is_provider_loaded())
+ {
+ push_warning (thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "Cannot set 'wsrep_trx_fragment_size' because "
+ "wsrep is switched off");
+ return true;
+ }
+
+ if (thd->variables.wsrep_trx_fragment_size)
+ {
+ return thd->wsrep_cs().enable_streaming(
+ wsrep_fragment_unit(thd->variables.wsrep_trx_fragment_unit),
+ size_t(thd->variables.wsrep_trx_fragment_size));
+ }
+ else
+ {
+ thd->wsrep_cs().disable_streaming();
+ return false;
+ }
+}
+
+bool wsrep_trx_fragment_unit_update(sys_var* self, THD *thd, enum_var_type)
+{
+ WSREP_DEBUG("wsrep_trx_fragment_unit_update: %lu",
+ thd->variables.wsrep_trx_fragment_unit);
+
+ // Give error if wsrep_trx_fragment_unit is set and wsrep is disabled or
+ // provider is not loaded
+ if (!WSREP_ON || !Wsrep_server_state::instance().is_provider_loaded())
+ {
+ push_warning (thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "Cannot set 'wsrep_trx_fragment_unit' because "
+ "wsrep is switched off");
+ return true;
+ }
+
+ if (thd->variables.wsrep_trx_fragment_size)
+ {
+ return thd->wsrep_cs().enable_streaming(
+ wsrep_fragment_unit(thd->variables.wsrep_trx_fragment_unit),
+ size_t(thd->variables.wsrep_trx_fragment_size));
+ }
return false;
}
bool wsrep_max_ws_size_check(sys_var *self, THD* thd, set_var* var)
{
- if (wsrep == NULL)
+ if (!WSREP_ON)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
@@ -684,36 +916,35 @@ bool wsrep_max_ws_size_check(sys_var *self, THD* thd, set_var* var)
return false;
}
-bool wsrep_max_ws_size_update (sys_var *self, THD *thd, enum_var_type)
+bool wsrep_max_ws_size_update(sys_var *self, THD *thd, enum_var_type)
{
- DBUG_ASSERT(wsrep);
-
char max_ws_size_opt[128];
my_snprintf(max_ws_size_opt, sizeof(max_ws_size_opt),
- "repl.max_ws_size=%lu", wsrep_max_ws_size);
- wsrep_status_t ret= wsrep->options_set(wsrep, max_ws_size_opt);
- if (ret != WSREP_OK)
+ "repl.max_ws_size=%d", wsrep_max_ws_size);
+ enum wsrep::provider::status ret= Wsrep_server_state::instance().provider().options(max_ws_size_opt);
+ if (ret)
{
WSREP_ERROR("Set options returned %d", ret);
- refresh_provider_options();
return true;
}
return refresh_provider_options();
}
+#if UNUSED /* eaec266eb16c (Sergei Golubchik 2014-09-28) */
static SHOW_VAR wsrep_status_vars[]=
{
{"connected", (char*) &wsrep_connected, SHOW_BOOL},
- {"ready", (char*) &wsrep_ready, SHOW_BOOL},
+ {"ready", (char*) &wsrep_show_ready, SHOW_FUNC},
{"cluster_state_uuid",(char*) &wsrep_cluster_state_uuid,SHOW_CHAR_PTR},
{"cluster_conf_id", (char*) &wsrep_cluster_conf_id, SHOW_LONGLONG},
{"cluster_status", (char*) &wsrep_cluster_status, SHOW_CHAR_PTR},
{"cluster_size", (char*) &wsrep_cluster_size, SHOW_LONG_NOFLUSH},
{"local_index", (char*) &wsrep_local_index, SHOW_LONG_NOFLUSH},
- {"local_bf_aborts", (char*) &wsrep_show_bf_aborts, SHOW_SIMPLE_FUNC},
+ {"local_bf_aborts", (char*) &wsrep_show_bf_aborts, SHOW_FUNC},
{"provider_name", (char*) &wsrep_provider_name, SHOW_CHAR_PTR},
{"provider_version", (char*) &wsrep_provider_version, SHOW_CHAR_PTR},
{"provider_vendor", (char*) &wsrep_provider_vendor, SHOW_CHAR_PTR},
+ {"provider_capabilities", (char*) &wsrep_provider_capabilities, SHOW_CHAR_PTR},
{"thread_count", (char*) &wsrep_running_threads, SHOW_LONG_NOFLUSH},
{"applier_thread_count", (char*)&wsrep_running_applier_threads, SHOW_LONG_NOFLUSH},
{"rollbacker_thread_count", (char *)&wsrep_running_rollbacker_threads, SHOW_LONG_NOFLUSH},
@@ -724,48 +955,93 @@ static int show_var_cmp(const void *var1, const void *var2)
return strcasecmp(((SHOW_VAR*)var1)->name, ((SHOW_VAR*)var2)->name);
}
-int wsrep_show_status (THD *thd, SHOW_VAR *var, void *buff,
- system_status_var *, enum_var_type scope)
+/*
+ * Status variables stuff below
+ */
+static inline void
+wsrep_assign_to_mysql (SHOW_VAR* mysql, wsrep_stats_var* wsrep_var)
+{
+ mysql->name= wsrep_var->name;
+ switch (wsrep_var->type) {
+ case WSREP_VAR_INT64:
+ mysql->value= (char*) &wsrep_var->value._int64;
+ mysql->type= SHOW_LONGLONG;
+ break;
+ case WSREP_VAR_STRING:
+ mysql->value= (char*) &wsrep_var->value._string;
+ mysql->type= SHOW_CHAR_PTR;
+ break;
+ case WSREP_VAR_DOUBLE:
+ mysql->value= (char*) &wsrep_var->value._double;
+ mysql->type= SHOW_DOUBLE;
+ break;
+ }
+}
+#endif /* UNUSED */
+
+#if DYNAMIC
+// somehow this mysql status thing works only with statically allocated arrays.
+static SHOW_VAR* mysql_status_vars= NULL;
+static int mysql_status_len= -1;
+#else
+static SHOW_VAR mysql_status_vars[512 + 1];
+static const int mysql_status_len= 512;
+#endif
+
+static void export_wsrep_status_to_mysql(THD* thd)
{
- uint i, maxi= SHOW_VAR_FUNC_BUFF_SIZE / sizeof(*var) - 1;
- SHOW_VAR *v= (SHOW_VAR *)buff;
+ int wsrep_status_len, i;
- var->type= SHOW_ARRAY;
- var->value= buff;
+ thd->wsrep_status_vars= Wsrep_server_state::instance().status();
- for (i=0; i < array_elements(wsrep_status_vars); i++)
- *v++= wsrep_status_vars[i];
+ wsrep_status_len= thd->wsrep_status_vars.size();
- DBUG_ASSERT(i < maxi);
+#if DYNAMIC
+ if (wsrep_status_len != mysql_status_len) {
+ void* tmp= realloc (mysql_status_vars,
+ (wsrep_status_len + 1) * sizeof(SHOW_VAR));
+ if (!tmp) {
- if (wsrep != NULL)
- {
- wsrep_stats_var* stats= wsrep->stats_get(wsrep);
- for (wsrep_stats_var *sv= stats;
- i < maxi && sv && sv->name; i++,
- sv++, v++)
- {
- v->name = thd->strdup(sv->name);
- switch (sv->type) {
- case WSREP_VAR_INT64:
- v->value = (char*)thd->memdup(&sv->value._integer64, sizeof(longlong));
- v->type = SHOW_LONGLONG;
- break;
- case WSREP_VAR_STRING:
- v->value = thd->strdup(sv->value._string);
- v->type = SHOW_CHAR;
- break;
- case WSREP_VAR_DOUBLE:
- v->value = (char*)thd->memdup(&sv->value._double, sizeof(double));
- v->type = SHOW_DOUBLE;
- break;
- }
+ sql_print_error ("Out of memory for wsrep status variables."
+ "Number of variables: %d", wsrep_status_len);
+ return;
}
- wsrep->stats_free(wsrep, stats);
+
+ mysql_status_len= wsrep_status_len;
+ mysql_status_vars= (SHOW_VAR*)tmp;
+ }
+ /* @TODO: fix this: */
+#else
+ if (mysql_status_len < wsrep_status_len) wsrep_status_len= mysql_status_len;
+#endif
+
+ for (i= 0; i < wsrep_status_len; i++)
+ {
+ mysql_status_vars[i].name= (char*)thd->wsrep_status_vars[i].name().c_str();
+ mysql_status_vars[i].value= (char*)thd->wsrep_status_vars[i].value().c_str();
+ mysql_status_vars[i].type= SHOW_CHAR;
}
- my_qsort(buff, i, sizeof(*v), show_var_cmp);
+ mysql_status_vars[wsrep_status_len].name = NullS;
+ mysql_status_vars[wsrep_status_len].value = NullS;
+ mysql_status_vars[wsrep_status_len].type = SHOW_LONG;
+}
- v->name= 0; // terminator
+int wsrep_show_status (THD *thd, SHOW_VAR *var, void *,
+ system_status_var *, enum_var_type)
+{
+ /* Note that we should allow show status like 'wsrep%' even
+ when WSREP(thd) is false. */
+ if (WSREP_ON)
+ {
+ export_wsrep_status_to_mysql(thd);
+ var->type= SHOW_ARRAY;
+ var->value= (char *) &mysql_status_vars;
+ }
return 0;
}
+
+void wsrep_free_status (THD* thd)
+{
+ thd->wsrep_status_vars.clear();
+}
diff --git a/sql/wsrep_var.h b/sql/wsrep_var.h
index 6258b5ab66f..b1b2932cdfe 100644
--- a/sql/wsrep_var.h
+++ b/sql/wsrep_var.h
@@ -13,11 +13,11 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. */
-#include <my_config.h>
-
#ifndef WSREP_VAR_H
#define WSREP_VAR_H
+#include <my_config.h>
+
#ifdef WITH_WSREP
#define WSREP_CLUSTER_NAME "my_wsrep_cluster"
@@ -35,6 +35,7 @@ class set_var;
class THD;
int wsrep_init_vars();
+void wsrep_set_wsrep_on();
#define CHECK_ARGS (sys_var *self, THD* thd, set_var *var)
#define UPDATE_ARGS (sys_var *self, THD* thd, enum_var_type type)
@@ -90,13 +91,20 @@ extern bool wsrep_slave_threads_update UPDATE_ARGS;
extern bool wsrep_desync_check CHECK_ARGS;
extern bool wsrep_desync_update UPDATE_ARGS;
+extern bool wsrep_trx_fragment_size_check CHECK_ARGS;
+extern bool wsrep_trx_fragment_size_update UPDATE_ARGS;
+
+extern bool wsrep_trx_fragment_unit_update UPDATE_ARGS;
+
extern bool wsrep_max_ws_size_check CHECK_ARGS;
extern bool wsrep_max_ws_size_update UPDATE_ARGS;
+
extern bool wsrep_reject_queries_update UPDATE_ARGS;
+extern bool wsrep_debug_update UPDATE_ARGS;
+
#else /* WITH_WSREP */
-#define WSREP_NONE
#define wsrep_provider_init(X)
#define wsrep_init_vars() (0)
#define wsrep_start_position_init(X)
diff --git a/sql/wsrep_xid.cc b/sql/wsrep_xid.cc
index 923abe53c6c..d8f6e013820 100644
--- a/sql/wsrep_xid.cc
+++ b/sql/wsrep_xid.cc
@@ -21,8 +21,9 @@
#include "sql_class.h"
#include "wsrep_mysqld.h" // for logging macros
-#include <algorithm> /* std::sort() */
+#include <mysql/service_wsrep.h>
+#include <algorithm> /* std::sort() */
/*
* WSREPXid
*/
@@ -36,20 +37,22 @@
#define WSREP_XID_SEQNO_OFFSET (WSREP_XID_UUID_OFFSET + sizeof(wsrep_uuid_t))
#define WSREP_XID_GTRID_LEN (WSREP_XID_SEQNO_OFFSET + sizeof(wsrep_seqno_t))
-void wsrep_xid_init(XID* xid, const wsrep_uuid_t& uuid, wsrep_seqno_t seqno)
+void wsrep_xid_init(XID* xid, const wsrep::gtid& wsgtid)
{
xid->formatID= 1;
xid->gtrid_length= WSREP_XID_GTRID_LEN;
xid->bqual_length= 0;
memset(xid->data, 0, sizeof(xid->data));
memcpy(xid->data, WSREP_XID_PREFIX, WSREP_XID_PREFIX_LEN);
- xid->data[WSREP_XID_VERSION_OFFSET] = WSREP_XID_VERSION_2;
- memcpy(xid->data + WSREP_XID_UUID_OFFSET, &uuid, sizeof(wsrep_uuid_t));
- int8store(xid->data + WSREP_XID_SEQNO_OFFSET,seqno);
+ xid->data[WSREP_XID_VERSION_OFFSET]= WSREP_XID_VERSION_2;
+ memcpy(xid->data + WSREP_XID_UUID_OFFSET, wsgtid.id().data(),sizeof(wsrep::id));
+ int8store(xid->data + WSREP_XID_SEQNO_OFFSET, wsgtid.seqno().get());
}
-int wsrep_is_wsrep_xid(const XID* xid)
+extern "C"
+int wsrep_is_wsrep_xid(const void* xid_ptr)
{
+ const XID* xid= static_cast<const XID*>(xid_ptr);
return (xid->formatID == 1 &&
xid->gtrid_length == WSREP_XID_GTRID_LEN &&
xid->bqual_length == 0 &&
@@ -58,33 +61,36 @@ int wsrep_is_wsrep_xid(const XID* xid)
xid->data[WSREP_XID_VERSION_OFFSET] == WSREP_XID_VERSION_2));
}
-const wsrep_uuid_t* wsrep_xid_uuid(const XID& xid)
+const unsigned char* wsrep_xid_uuid(const xid_t* xid)
{
- if (wsrep_is_wsrep_xid(&xid))
- return reinterpret_cast<const wsrep_uuid_t*>(xid.data
- + WSREP_XID_UUID_OFFSET);
+ DBUG_ASSERT(xid);
+ static wsrep::id const undefined;
+ if (wsrep_is_wsrep_xid(xid))
+ return reinterpret_cast<const unsigned char*>
+ (xid->data + WSREP_XID_UUID_OFFSET);
else
- return &WSREP_UUID_UNDEFINED;
+ return static_cast<const unsigned char*>(wsrep::id::undefined().data());
}
-const unsigned char* wsrep_xid_uuid(const xid_t* xid)
+const wsrep::id& wsrep_xid_uuid(const XID& xid)
{
- DBUG_ASSERT(xid);
- return wsrep_xid_uuid(*xid)->data;
+ compile_time_assert(sizeof(wsrep::id) == sizeof(wsrep_uuid_t));
+ return *reinterpret_cast<const wsrep::id*>(wsrep_xid_uuid(&xid));
}
-wsrep_seqno_t wsrep_xid_seqno(const XID& xid)
+long long wsrep_xid_seqno(const xid_t* xid)
{
- wsrep_seqno_t ret= WSREP_SEQNO_UNDEFINED;
- if (wsrep_is_wsrep_xid(&xid))
+ DBUG_ASSERT(xid);
+ long long ret= wsrep::seqno::undefined().get();
+ if (wsrep_is_wsrep_xid(xid))
{
- switch (xid.data[WSREP_XID_VERSION_OFFSET])
+ switch (xid->data[WSREP_XID_VERSION_OFFSET])
{
case WSREP_XID_VERSION_1:
- memcpy(&ret, xid.data + WSREP_XID_SEQNO_OFFSET, sizeof ret);
+ memcpy(&ret, xid->data + WSREP_XID_SEQNO_OFFSET, sizeof ret);
break;
case WSREP_XID_VERSION_2:
- ret= sint8korr(xid.data + WSREP_XID_SEQNO_OFFSET);
+ ret= sint8korr(xid->data + WSREP_XID_SEQNO_OFFSET);
break;
default:
break;
@@ -93,10 +99,9 @@ wsrep_seqno_t wsrep_xid_seqno(const XID& xid)
return ret;
}
-long long wsrep_xid_seqno(const xid_t* xid)
+wsrep::seqno wsrep_xid_seqno(const XID& xid)
{
- DBUG_ASSERT(xid);
- return wsrep_xid_seqno(*xid);
+ return wsrep::seqno(wsrep_xid_seqno(&xid));
}
static my_bool set_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg)
@@ -106,11 +111,11 @@ static my_bool set_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg)
if (hton->set_checkpoint)
{
- const wsrep_uuid_t* uuid(wsrep_xid_uuid(*xid));
- char uuid_str[40] = {0, };
- wsrep_uuid_print(uuid, uuid_str, sizeof(uuid_str));
+ const unsigned char* uuid= wsrep_xid_uuid(xid);
+ char uuid_str[40]= {0, };
+ wsrep_uuid_print((const wsrep_uuid_t*)uuid, uuid_str, sizeof(uuid_str));
WSREP_DEBUG("Set WSREPXid for InnoDB: %s:%lld",
- uuid_str, (long long)wsrep_xid_seqno(*xid));
+ uuid_str, (long long)wsrep_xid_seqno(xid));
hton->set_checkpoint(hton, xid);
}
return FALSE;
@@ -122,10 +127,10 @@ bool wsrep_set_SE_checkpoint(XID& xid)
&xid);
}
-bool wsrep_set_SE_checkpoint(const wsrep_uuid_t& uuid, wsrep_seqno_t seqno)
+bool wsrep_set_SE_checkpoint(const wsrep::gtid& wsgtid)
{
XID xid;
- wsrep_xid_init(&xid, uuid, seqno);
+ wsrep_xid_init(&xid, wsgtid);
return wsrep_set_SE_checkpoint(xid);
}
@@ -137,11 +142,12 @@ static my_bool get_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg)
if (hton->get_checkpoint)
{
hton->get_checkpoint(hton, xid);
- const wsrep_uuid_t* uuid(wsrep_xid_uuid(*xid));
- char uuid_str[40] = {0, };
- wsrep_uuid_print(uuid, uuid_str, sizeof(uuid_str));
+ wsrep_uuid_t uuid;
+ memcpy(&uuid, wsrep_xid_uuid(xid), sizeof(uuid));
+ char uuid_str[40]= {0, };
+ wsrep_uuid_print(&uuid, uuid_str, sizeof(uuid_str));
WSREP_DEBUG("Read WSREPXid from InnoDB: %s:%lld",
- uuid_str, (long long)wsrep_xid_seqno(*xid));
+ uuid_str, (long long)wsrep_xid_seqno(xid));
}
return FALSE;
}
@@ -152,34 +158,28 @@ bool wsrep_get_SE_checkpoint(XID& xid)
&xid);
}
-bool wsrep_get_SE_checkpoint(wsrep_uuid_t& uuid, wsrep_seqno_t& seqno)
+wsrep::gtid wsrep_get_SE_checkpoint()
{
- uuid= WSREP_UUID_UNDEFINED;
- seqno= WSREP_SEQNO_UNDEFINED;
-
XID xid;
xid.null();
if (wsrep_get_SE_checkpoint(xid))
{
- return true;
+ return wsrep::gtid();
}
if (xid.is_null())
{
- return false;
+ return wsrep::gtid();
}
if (!wsrep_is_wsrep_xid(&xid))
{
WSREP_WARN("Read non-wsrep XID from storage engines.");
- return false;
+ return wsrep::gtid();
}
- uuid= *wsrep_xid_uuid(xid);
- seqno= wsrep_xid_seqno(xid);
-
- return false;
+ return wsrep::gtid(wsrep_xid_uuid(xid),wsrep_xid_seqno(xid));
}
/*
@@ -196,7 +196,7 @@ struct Wsrep_xid_cmp
const bool right_is_wsrep= wsrep_is_wsrep_xid(&right);
if (left_is_wsrep && right_is_wsrep)
{
- return (wsrep_xid_seqno(left) < wsrep_xid_seqno(right));
+ return (wsrep_xid_seqno(&left) < wsrep_xid_seqno(&right));
}
else if (left_is_wsrep)
{
diff --git a/sql/wsrep_xid.h b/sql/wsrep_xid.h
index 30a28b44933..a1b9afc1817 100644
--- a/sql/wsrep_xid.h
+++ b/sql/wsrep_xid.h
@@ -20,17 +20,17 @@
#ifdef WITH_WSREP
-#include "../wsrep/wsrep_api.h"
+#include "wsrep/gtid.hpp"
#include "handler.h" // XID typedef
-void wsrep_xid_init(xid_t*, const wsrep_uuid_t&, wsrep_seqno_t);
-const wsrep_uuid_t* wsrep_xid_uuid(const XID&);
-wsrep_seqno_t wsrep_xid_seqno(const XID&);
+void wsrep_xid_init(xid_t*, const wsrep::gtid&);
+const wsrep::id& wsrep_xid_uuid(const XID&);
+wsrep::seqno wsrep_xid_seqno(const XID&);
+wsrep::gtid wsrep_get_SE_checkpoint();
+bool wsrep_set_SE_checkpoint(const wsrep::gtid& gtid);
//void wsrep_get_SE_checkpoint(XID&); /* uncomment if needed */
-bool wsrep_get_SE_checkpoint(wsrep_uuid_t&, wsrep_seqno_t&);
//void wsrep_set_SE_checkpoint(XID&); /* uncomment if needed */
-bool wsrep_set_SE_checkpoint(const wsrep_uuid_t&, wsrep_seqno_t);
void wsrep_sort_xid_array(XID *array, int len);
diff --git a/sql/xa.cc b/sql/xa.cc
new file mode 100644
index 00000000000..85fbe9358a3
--- /dev/null
+++ b/sql/xa.cc
@@ -0,0 +1,877 @@
+/*
+ Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, 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 Street, Fifth Floor, Boston, MA 02110-1301, USA
+*/
+
+#include "mariadb.h"
+#include "sql_class.h"
+#include "transaction.h"
+#include "my_cpu.h"
+
+
+/***************************************************************************
+ Handling of XA id cacheing
+***************************************************************************/
+enum xa_states { XA_ACTIVE= 0, XA_IDLE, XA_PREPARED, XA_ROLLBACK_ONLY };
+
+
+struct XID_cache_insert_element
+{
+ enum xa_states xa_state;
+ XID *xid;
+ XID_cache_element *xid_cache_element;
+
+ XID_cache_insert_element(enum xa_states xa_state_arg, XID *xid_arg):
+ xa_state(xa_state_arg), xid(xid_arg) {}
+};
+
+
+class XID_cache_element
+{
+ /*
+ m_state is used to prevent elements from being deleted while XA RECOVER
+ iterates xid cache and to prevent recovered elments from being acquired by
+ multiple threads.
+
+ bits 1..29 are reference counter
+ bit 30 is RECOVERED flag
+ bit 31 is ACQUIRED flag (thread owns this xid)
+ bit 32 is unused
+
+ Newly allocated and deleted elements have m_state set to 0.
+
+ On lock() m_state is atomically incremented. It also creates load-ACQUIRE
+ memory barrier to make sure m_state is actually updated before furhter
+ memory accesses. Attempting to lock an element that has neither ACQUIRED
+ nor RECOVERED flag set returns failure and further accesses to element
+ memory are forbidden.
+
+ On unlock() m_state is decremented. It also creates store-RELEASE memory
+ barrier to make sure m_state is actually updated after preceding memory
+ accesses.
+
+ ACQUIRED flag is set when thread registers it's xid or when thread acquires
+ recovered xid.
+
+ RECOVERED flag is set for elements found during crash recovery.
+
+ ACQUIRED and RECOVERED flags are cleared before element is deleted from
+ hash in a spin loop, after last reference is released.
+ */
+ std::atomic<int32_t> m_state;
+public:
+ static const int32 ACQUIRED= 1 << 30;
+ static const int32 RECOVERED= 1 << 29;
+ /* Error reported by the Resource Manager (RM) to the Transaction Manager. */
+ uint rm_error;
+ enum xa_states xa_state;
+ XID xid;
+ bool is_set(int32_t flag)
+ { return m_state.load(std::memory_order_relaxed) & flag; }
+ void set(int32_t flag)
+ {
+ DBUG_ASSERT(!is_set(ACQUIRED | RECOVERED));
+ m_state.fetch_add(flag, std::memory_order_relaxed);
+ }
+ bool lock()
+ {
+ int32_t old= m_state.fetch_add(1, std::memory_order_acquire);
+ if (old & (ACQUIRED | RECOVERED))
+ return true;
+ unlock();
+ return false;
+ }
+ void unlock()
+ { m_state.fetch_sub(1, std::memory_order_release); }
+ void mark_uninitialized()
+ {
+ int32_t old= ACQUIRED;
+ while (!m_state.compare_exchange_weak(old, 0,
+ std::memory_order_relaxed,
+ std::memory_order_relaxed))
+ {
+ old&= ACQUIRED | RECOVERED;
+ (void) LF_BACKOFF();
+ }
+ }
+ void acquired_to_recovered()
+ {
+ m_state.fetch_or(RECOVERED, std::memory_order_relaxed);
+ m_state.fetch_and(~ACQUIRED, std::memory_order_release);
+ }
+ bool acquire_recovered()
+ {
+ int32_t old= RECOVERED;
+ while (!m_state.compare_exchange_weak(old, ACQUIRED | RECOVERED,
+ std::memory_order_acquire,
+ std::memory_order_relaxed))
+ {
+ if (!(old & RECOVERED) || (old & ACQUIRED))
+ return false;
+ old= RECOVERED;
+ (void) LF_BACKOFF();
+ }
+ return true;
+ }
+ static void lf_hash_initializer(LF_HASH *hash __attribute__((unused)),
+ XID_cache_element *element,
+ XID_cache_insert_element *new_element)
+ {
+ DBUG_ASSERT(!element->is_set(ACQUIRED | RECOVERED));
+ element->rm_error= 0;
+ element->xa_state= new_element->xa_state;
+ element->xid.set(new_element->xid);
+ new_element->xid_cache_element= element;
+ }
+ static void lf_alloc_constructor(uchar *ptr)
+ {
+ XID_cache_element *element= (XID_cache_element*) (ptr + LF_HASH_OVERHEAD);
+ element->m_state= 0;
+ }
+ static void lf_alloc_destructor(uchar *ptr)
+ {
+ DBUG_ASSERT(!reinterpret_cast<XID_cache_element*>(ptr + LF_HASH_OVERHEAD)
+ ->is_set(ACQUIRED));
+ }
+ static uchar *key(const XID_cache_element *element, size_t *length,
+ my_bool not_used __attribute__((unused)))
+ {
+ *length= element->xid.key_length();
+ return element->xid.key();
+ }
+};
+
+
+static LF_HASH xid_cache;
+static bool xid_cache_inited;
+
+
+bool THD::fix_xid_hash_pins()
+{
+ if (!xid_hash_pins)
+ xid_hash_pins= lf_hash_get_pins(&xid_cache);
+ return !xid_hash_pins;
+}
+
+
+void XID_STATE::set_error(uint error)
+{
+ if (is_explicit_XA())
+ xid_cache_element->rm_error= error;
+}
+
+
+void XID_STATE::er_xaer_rmfail() const
+{
+ static const char *xa_state_names[]=
+ { "ACTIVE", "IDLE", "PREPARED", "ROLLBACK ONLY" };
+ my_error(ER_XAER_RMFAIL, MYF(0), is_explicit_XA() ?
+ xa_state_names[xid_cache_element->xa_state] : "NON-EXISTING");
+}
+
+
+/**
+ Check that XA transaction has an uncommitted work. Report an error
+ to the user in case when there is an uncommitted work for XA transaction.
+
+ @return result of check
+ @retval false XA transaction is NOT in state IDLE, PREPARED
+ or ROLLBACK_ONLY.
+ @retval true XA transaction is in state IDLE or PREPARED
+ or ROLLBACK_ONLY.
+*/
+
+bool XID_STATE::check_has_uncommitted_xa() const
+{
+ if (is_explicit_XA() && xid_cache_element->xa_state != XA_ACTIVE)
+ {
+ er_xaer_rmfail();
+ return true;
+ }
+ return false;
+}
+
+
+XID *XID_STATE::get_xid() const
+{
+ DBUG_ASSERT(is_explicit_XA());
+ return &xid_cache_element->xid;
+}
+
+
+void xid_cache_init()
+{
+ xid_cache_inited= true;
+ lf_hash_init(&xid_cache, sizeof(XID_cache_element), LF_HASH_UNIQUE, 0, 0,
+ (my_hash_get_key) XID_cache_element::key, &my_charset_bin);
+ xid_cache.alloc.constructor= XID_cache_element::lf_alloc_constructor;
+ xid_cache.alloc.destructor= XID_cache_element::lf_alloc_destructor;
+ xid_cache.initializer=
+ (lf_hash_initializer) XID_cache_element::lf_hash_initializer;
+}
+
+
+void xid_cache_free()
+{
+ if (xid_cache_inited)
+ {
+ lf_hash_destroy(&xid_cache);
+ xid_cache_inited= false;
+ }
+}
+
+
+/**
+ Find recovered XA transaction by XID.
+*/
+
+static XID_cache_element *xid_cache_search(THD *thd, XID *xid)
+{
+ DBUG_ASSERT(thd->xid_hash_pins);
+ XID_cache_element *element=
+ (XID_cache_element*) lf_hash_search(&xid_cache, thd->xid_hash_pins,
+ xid->key(), xid->key_length());
+ if (element)
+ {
+ if (!element->acquire_recovered())
+ element= 0;
+ lf_hash_search_unpin(thd->xid_hash_pins);
+ DEBUG_SYNC(thd, "xa_after_search");
+ }
+ return element;
+}
+
+
+bool xid_cache_insert(XID *xid)
+{
+ XID_cache_insert_element new_element(XA_PREPARED, xid);
+ LF_PINS *pins;
+
+ if (!(pins= lf_hash_get_pins(&xid_cache)))
+ return true;
+
+ int res= lf_hash_insert(&xid_cache, pins, &new_element);
+ switch (res)
+ {
+ case 0:
+ new_element.xid_cache_element->set(XID_cache_element::RECOVERED);
+ break;
+ case 1:
+ res= 0;
+ }
+ lf_hash_put_pins(pins);
+ return res;
+}
+
+
+bool xid_cache_insert(THD *thd, XID_STATE *xid_state, XID *xid)
+{
+ XID_cache_insert_element new_element(XA_ACTIVE, xid);
+
+ if (thd->fix_xid_hash_pins())
+ return true;
+
+ int res= lf_hash_insert(&xid_cache, thd->xid_hash_pins, &new_element);
+ switch (res)
+ {
+ case 0:
+ xid_state->xid_cache_element= new_element.xid_cache_element;
+ xid_state->xid_cache_element->set(XID_cache_element::ACQUIRED);
+ break;
+ case 1:
+ my_error(ER_XAER_DUPID, MYF(0));
+ }
+ return res;
+}
+
+
+static void xid_cache_delete(THD *thd, XID_cache_element *&element)
+{
+ DBUG_ASSERT(thd->xid_hash_pins);
+ element->mark_uninitialized();
+ lf_hash_delete(&xid_cache, thd->xid_hash_pins,
+ element->xid.key(), element->xid.key_length());
+}
+
+
+void xid_cache_delete(THD *thd, XID_STATE *xid_state)
+{
+ DBUG_ASSERT(xid_state->is_explicit_XA());
+ xid_cache_delete(thd, xid_state->xid_cache_element);
+ xid_state->xid_cache_element= 0;
+}
+
+
+struct xid_cache_iterate_arg
+{
+ my_hash_walk_action action;
+ void *argument;
+};
+
+static my_bool xid_cache_iterate_callback(XID_cache_element *element,
+ xid_cache_iterate_arg *arg)
+{
+ my_bool res= FALSE;
+ if (element->lock())
+ {
+ res= arg->action(element, arg->argument);
+ element->unlock();
+ }
+ return res;
+}
+
+static int xid_cache_iterate(THD *thd, my_hash_walk_action action, void *arg)
+{
+ xid_cache_iterate_arg argument= { action, arg };
+ return thd->fix_xid_hash_pins() ? -1 :
+ lf_hash_iterate(&xid_cache, thd->xid_hash_pins,
+ (my_hash_walk_action) xid_cache_iterate_callback,
+ &argument);
+}
+
+
+/**
+ Mark a XA transaction as rollback-only if the RM unilaterally
+ rolled back the transaction branch.
+
+ @note If a rollback was requested by the RM, this function sets
+ the appropriate rollback error code and transits the state
+ to XA_ROLLBACK_ONLY.
+
+ @return TRUE if transaction was rolled back or if the transaction
+ state is XA_ROLLBACK_ONLY. FALSE otherwise.
+*/
+static bool xa_trans_rolled_back(XID_cache_element *element)
+{
+ if (element->rm_error)
+ {
+ switch (element->rm_error) {
+ case ER_LOCK_WAIT_TIMEOUT:
+ my_error(ER_XA_RBTIMEOUT, MYF(0));
+ break;
+ case ER_LOCK_DEADLOCK:
+ my_error(ER_XA_RBDEADLOCK, MYF(0));
+ break;
+ default:
+ my_error(ER_XA_RBROLLBACK, MYF(0));
+ }
+ element->xa_state= XA_ROLLBACK_ONLY;
+ }
+
+ return element->xa_state == XA_ROLLBACK_ONLY;
+}
+
+
+/**
+ Rollback the active XA transaction.
+
+ @return TRUE if the rollback failed, FALSE otherwise.
+*/
+
+static bool xa_trans_force_rollback(THD *thd)
+{
+ bool rc= false;
+
+ if (ha_rollback_trans(thd, true))
+ {
+ my_error(ER_XAER_RMERR, MYF(0));
+ rc= true;
+ }
+
+ thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
+ thd->transaction.all.reset();
+ thd->server_status&=
+ ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
+ DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
+ xid_cache_delete(thd, &thd->transaction.xid_state);
+
+ trans_track_end_trx(thd);
+ thd->mdl_context.release_transactional_locks(thd);
+
+ return rc;
+}
+
+
+/**
+ Starts an XA transaction with the given xid value.
+
+ @param thd Current thread
+
+ @retval FALSE Success
+ @retval TRUE Failure
+*/
+
+bool trans_xa_start(THD *thd)
+{
+ DBUG_ENTER("trans_xa_start");
+
+ if (thd->transaction.xid_state.is_explicit_XA() &&
+ thd->transaction.xid_state.xid_cache_element->xa_state == XA_IDLE &&
+ thd->lex->xa_opt == XA_RESUME)
+ {
+ bool not_equal=
+ !thd->transaction.xid_state.xid_cache_element->xid.eq(thd->lex->xid);
+ if (not_equal)
+ my_error(ER_XAER_NOTA, MYF(0));
+ else
+ thd->transaction.xid_state.xid_cache_element->xa_state= XA_ACTIVE;
+ DBUG_RETURN(not_equal);
+ }
+
+ /* TODO: JOIN is not supported yet. */
+ if (thd->lex->xa_opt != XA_NONE)
+ my_error(ER_XAER_INVAL, MYF(0));
+ else if (thd->transaction.xid_state.is_explicit_XA())
+ thd->transaction.xid_state.er_xaer_rmfail();
+ else if (thd->locked_tables_mode || thd->in_active_multi_stmt_transaction())
+ my_error(ER_XAER_OUTSIDE, MYF(0));
+ else if (!trans_begin(thd))
+ {
+ if (xid_cache_insert(thd, &thd->transaction.xid_state, thd->lex->xid))
+ {
+ trans_rollback(thd);
+ DBUG_RETURN(true);
+ }
+ DBUG_RETURN(FALSE);
+ }
+
+ DBUG_RETURN(TRUE);
+}
+
+
+/**
+ Put a XA transaction in the IDLE state.
+
+ @param thd Current thread
+
+ @retval FALSE Success
+ @retval TRUE Failure
+*/
+
+bool trans_xa_end(THD *thd)
+{
+ DBUG_ENTER("trans_xa_end");
+
+ /* TODO: SUSPEND and FOR MIGRATE are not supported yet. */
+ if (thd->lex->xa_opt != XA_NONE)
+ my_error(ER_XAER_INVAL, MYF(0));
+ else if (!thd->transaction.xid_state.is_explicit_XA() ||
+ thd->transaction.xid_state.xid_cache_element->xa_state != XA_ACTIVE)
+ thd->transaction.xid_state.er_xaer_rmfail();
+ else if (!thd->transaction.xid_state.xid_cache_element->xid.eq(thd->lex->xid))
+ my_error(ER_XAER_NOTA, MYF(0));
+ else if (!xa_trans_rolled_back(thd->transaction.xid_state.xid_cache_element))
+ thd->transaction.xid_state.xid_cache_element->xa_state= XA_IDLE;
+
+ DBUG_RETURN(thd->is_error() ||
+ thd->transaction.xid_state.xid_cache_element->xa_state != XA_IDLE);
+}
+
+
+/**
+ Put a XA transaction in the PREPARED state.
+
+ @param thd Current thread
+
+ @retval FALSE Success
+ @retval TRUE Failure
+*/
+
+bool trans_xa_prepare(THD *thd)
+{
+ DBUG_ENTER("trans_xa_prepare");
+
+ if (!thd->transaction.xid_state.is_explicit_XA() ||
+ thd->transaction.xid_state.xid_cache_element->xa_state != XA_IDLE)
+ thd->transaction.xid_state.er_xaer_rmfail();
+ else if (!thd->transaction.xid_state.xid_cache_element->xid.eq(thd->lex->xid))
+ my_error(ER_XAER_NOTA, MYF(0));
+ else if (ha_prepare(thd))
+ {
+ xid_cache_delete(thd, &thd->transaction.xid_state);
+ my_error(ER_XA_RBROLLBACK, MYF(0));
+ }
+ else
+ thd->transaction.xid_state.xid_cache_element->xa_state= XA_PREPARED;
+
+ DBUG_RETURN(thd->is_error() ||
+ thd->transaction.xid_state.xid_cache_element->xa_state != XA_PREPARED);
+}
+
+
+/**
+ Commit and terminate the a XA transaction.
+ Transactional locks are released if transaction ended
+
+ @param thd Current thread
+
+ @retval FALSE Success
+ @retval TRUE Failure
+
+*/
+
+bool trans_xa_commit(THD *thd)
+{
+ bool res= TRUE;
+ DBUG_ENTER("trans_xa_commit");
+
+ if (!thd->transaction.xid_state.is_explicit_XA() ||
+ !thd->transaction.xid_state.xid_cache_element->xid.eq(thd->lex->xid))
+ {
+ if (thd->fix_xid_hash_pins())
+ {
+ my_error(ER_OUT_OF_RESOURCES, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+
+ if (auto xs= xid_cache_search(thd, thd->lex->xid))
+ {
+ res= xa_trans_rolled_back(xs);
+ ha_commit_or_rollback_by_xid(thd->lex->xid, !res);
+ xid_cache_delete(thd, xs);
+ }
+ else
+ my_error(ER_XAER_NOTA, MYF(0));
+ DBUG_RETURN(res);
+ }
+
+ if (xa_trans_rolled_back(thd->transaction.xid_state.xid_cache_element))
+ {
+ xa_trans_force_rollback(thd);
+ DBUG_RETURN(thd->is_error());
+ }
+ else if (thd->transaction.xid_state.xid_cache_element->xa_state == XA_IDLE &&
+ thd->lex->xa_opt == XA_ONE_PHASE)
+ {
+ int r= ha_commit_trans(thd, TRUE);
+ if ((res= MY_TEST(r)))
+ my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0));
+ }
+ else if (thd->transaction.xid_state.xid_cache_element->xa_state == XA_PREPARED &&
+ thd->lex->xa_opt == XA_NONE)
+ {
+ MDL_request mdl_request;
+
+ /*
+ Acquire metadata lock which will ensure that COMMIT is blocked
+ by active FLUSH TABLES WITH READ LOCK (and vice versa COMMIT in
+ progress blocks FTWRL).
+
+ We allow FLUSHer to COMMIT; we assume FLUSHer knows what it does.
+ */
+ mdl_request.init(MDL_key::BACKUP, "", "", MDL_BACKUP_COMMIT,
+ MDL_TRANSACTION);
+
+ if (thd->mdl_context.acquire_lock(&mdl_request,
+ thd->variables.lock_wait_timeout))
+ {
+ ha_rollback_trans(thd, TRUE);
+ my_error(ER_XAER_RMERR, MYF(0));
+ }
+ else
+ {
+ DEBUG_SYNC(thd, "trans_xa_commit_after_acquire_commit_lock");
+
+ res= MY_TEST(ha_commit_one_phase(thd, 1));
+ if (res)
+ my_error(ER_XAER_RMERR, MYF(0));
+ }
+ }
+ else
+ {
+ thd->transaction.xid_state.er_xaer_rmfail();
+ DBUG_RETURN(TRUE);
+ }
+
+ thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
+ thd->transaction.all.reset();
+ thd->server_status&=
+ ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
+ DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
+ xid_cache_delete(thd, &thd->transaction.xid_state);
+
+ trans_track_end_trx(thd);
+ thd->mdl_context.release_transactional_locks(thd);
+
+ DBUG_RETURN(res);
+}
+
+
+/**
+ Roll back and terminate a XA transaction.
+ Transactional locks are released if transaction ended
+
+ @param thd Current thread
+
+ @retval FALSE Success
+ @retval TRUE Failure
+*/
+
+bool trans_xa_rollback(THD *thd)
+{
+ DBUG_ENTER("trans_xa_rollback");
+
+ if (!thd->transaction.xid_state.is_explicit_XA() ||
+ !thd->transaction.xid_state.xid_cache_element->xid.eq(thd->lex->xid))
+ {
+ if (thd->fix_xid_hash_pins())
+ {
+ my_error(ER_OUT_OF_RESOURCES, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+
+ if (auto xs= xid_cache_search(thd, thd->lex->xid))
+ {
+ xa_trans_rolled_back(xs);
+ ha_commit_or_rollback_by_xid(thd->lex->xid, 0);
+ xid_cache_delete(thd, xs);
+ }
+ else
+ my_error(ER_XAER_NOTA, MYF(0));
+ DBUG_RETURN(thd->get_stmt_da()->is_error());
+ }
+
+ if (thd->transaction.xid_state.xid_cache_element->xa_state == XA_ACTIVE)
+ {
+ thd->transaction.xid_state.er_xaer_rmfail();
+ DBUG_RETURN(TRUE);
+ }
+ DBUG_RETURN(xa_trans_force_rollback(thd));
+}
+
+
+bool trans_xa_detach(THD *thd)
+{
+ DBUG_ASSERT(thd->transaction.xid_state.is_explicit_XA());
+#if 1
+ return xa_trans_force_rollback(thd);
+#else
+ if (thd->transaction.xid_state.xid_cache_element->xa_state != XA_PREPARED)
+ return xa_trans_force_rollback(thd);
+ thd->transaction.xid_state.xid_cache_element->acquired_to_recovered();
+ thd->transaction.xid_state.xid_cache_element= 0;
+ thd->transaction.cleanup();
+
+ Ha_trx_info *ha_info, *ha_info_next;
+ for (ha_info= thd->transaction.all.ha_list;
+ ha_info;
+ ha_info= ha_info_next)
+ {
+ ha_info_next= ha_info->next();
+ ha_info->reset(); /* keep it conveniently zero-filled */
+ }
+
+ thd->transaction.all.ha_list= 0;
+ thd->transaction.all.no_2pc= 0;
+ thd->server_status&= ~(SERVER_STATUS_IN_TRANS |
+ SERVER_STATUS_IN_TRANS_READONLY);
+ thd->mdl_context.release_transactional_locks(thd);
+
+ return false;
+#endif
+}
+
+
+/**
+ return the XID as it appears in the SQL function's arguments.
+ So this string can be passed to XA START, XA PREPARE etc...
+
+ @note
+ the 'buf' has to have space for at least SQL_XIDSIZE bytes.
+*/
+
+
+/*
+ 'a'..'z' 'A'..'Z', '0'..'9'
+ and '-' '_' ' ' symbols don't have to be
+ converted.
+*/
+
+static const char xid_needs_conv[128]=
+{
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,
+ 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,
+ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,
+ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
+};
+
+/*
+ The size of XID string representation in the form
+ 'gtrid', 'bqual', formatID
+ see xid_t::get_sql_string() for details.
+*/
+#define SQL_XIDSIZE (XIDDATASIZE * 2 + 8 + MY_INT64_NUM_DECIMAL_DIGITS)
+
+/* The 'buf' has to have space for at least SQL_XIDSIZE bytes. */
+static uint get_sql_xid(XID *xid, char *buf)
+{
+ int tot_len= xid->gtrid_length + xid->bqual_length;
+ int i;
+ const char *orig_buf= buf;
+
+ for (i=0; i<tot_len; i++)
+ {
+ uchar c= ((uchar *) xid->data)[i];
+ if (c >= 128 || xid_needs_conv[c])
+ break;
+ }
+
+ if (i >= tot_len)
+ {
+ /* No need to convert characters to hexadecimals. */
+ *buf++= '\'';
+ memcpy(buf, xid->data, xid->gtrid_length);
+ buf+= xid->gtrid_length;
+ *buf++= '\'';
+ if (xid->bqual_length > 0 || xid->formatID != 1)
+ {
+ *buf++= ',';
+ *buf++= '\'';
+ memcpy(buf, xid->data+xid->gtrid_length, xid->bqual_length);
+ buf+= xid->bqual_length;
+ *buf++= '\'';
+ }
+ }
+ else
+ {
+ *buf++= 'X';
+ *buf++= '\'';
+ for (i= 0; i < xid->gtrid_length; i++)
+ {
+ *buf++=_dig_vec_lower[((uchar*) xid->data)[i] >> 4];
+ *buf++=_dig_vec_lower[((uchar*) xid->data)[i] & 0x0f];
+ }
+ *buf++= '\'';
+ if (xid->bqual_length > 0 || xid->formatID != 1)
+ {
+ *buf++= ',';
+ *buf++= 'X';
+ *buf++= '\'';
+ for (; i < tot_len; i++)
+ {
+ *buf++=_dig_vec_lower[((uchar*) xid->data)[i] >> 4];
+ *buf++=_dig_vec_lower[((uchar*) xid->data)[i] & 0x0f];
+ }
+ *buf++= '\'';
+ }
+ }
+
+ if (xid->formatID != 1)
+ {
+ *buf++= ',';
+ buf+= my_longlong10_to_str_8bit(&my_charset_bin, buf,
+ MY_INT64_NUM_DECIMAL_DIGITS, -10, xid->formatID);
+ }
+
+ return (uint)(buf - orig_buf);
+}
+
+
+/**
+ return the list of XID's to a client, the same way SHOW commands do.
+
+ @note
+ I didn't find in XA specs that an RM cannot return the same XID twice,
+ so mysql_xa_recover does not filter XID's to ensure uniqueness.
+ It can be easily fixed later, if necessary.
+*/
+
+static my_bool xa_recover_callback(XID_cache_element *xs, Protocol *protocol,
+ char *data, uint data_len, CHARSET_INFO *data_cs)
+{
+ if (xs->xa_state == XA_PREPARED)
+ {
+ protocol->prepare_for_resend();
+ protocol->store_longlong((longlong) xs->xid.formatID, FALSE);
+ protocol->store_longlong((longlong) xs->xid.gtrid_length, FALSE);
+ protocol->store_longlong((longlong) xs->xid.bqual_length, FALSE);
+ protocol->store(data, data_len, data_cs);
+ if (protocol->write())
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+static my_bool xa_recover_callback_short(XID_cache_element *xs,
+ Protocol *protocol)
+{
+ return xa_recover_callback(xs, protocol, xs->xid.data,
+ xs->xid.gtrid_length + xs->xid.bqual_length, &my_charset_bin);
+}
+
+
+static my_bool xa_recover_callback_verbose(XID_cache_element *xs,
+ Protocol *protocol)
+{
+ char buf[SQL_XIDSIZE];
+ uint len= get_sql_xid(&xs->xid, buf);
+ return xa_recover_callback(xs, protocol, buf, len,
+ &my_charset_utf8_general_ci);
+}
+
+
+bool mysql_xa_recover(THD *thd)
+{
+ List<Item> field_list;
+ Protocol *protocol= thd->protocol;
+ MEM_ROOT *mem_root= thd->mem_root;
+ my_hash_walk_action action;
+ DBUG_ENTER("mysql_xa_recover");
+
+ field_list.push_back(new (mem_root)
+ Item_int(thd, "formatID", 0,
+ MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
+ field_list.push_back(new (mem_root)
+ Item_int(thd, "gtrid_length", 0,
+ MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
+ field_list.push_back(new (mem_root)
+ Item_int(thd, "bqual_length", 0,
+ MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
+ {
+ uint len;
+ CHARSET_INFO *cs;
+
+ if (thd->lex->verbose)
+ {
+ len= SQL_XIDSIZE;
+ cs= &my_charset_utf8_general_ci;
+ action= (my_hash_walk_action) xa_recover_callback_verbose;
+ }
+ else
+ {
+ len= XIDDATASIZE;
+ cs= &my_charset_bin;
+ action= (my_hash_walk_action) xa_recover_callback_short;
+ }
+
+ field_list.push_back(new (mem_root)
+ Item_empty_string(thd, "data", len, cs), mem_root);
+ }
+
+ if (protocol->send_result_set_metadata(&field_list,
+ Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
+ DBUG_RETURN(1);
+
+ if (xid_cache_iterate(thd, action, protocol))
+ DBUG_RETURN(1);
+ my_eof(thd);
+ DBUG_RETURN(0);
+}
diff --git a/sql/xa.h b/sql/xa.h
new file mode 100644
index 00000000000..7cf74efad35
--- /dev/null
+++ b/sql/xa.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, 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 Street, Fifth Floor, Boston, MA 02110-1301, USA
+*/
+
+
+class XID_cache_element;
+
+struct XID_STATE {
+ XID_cache_element *xid_cache_element;
+
+ bool check_has_uncommitted_xa() const;
+ bool is_explicit_XA() const { return xid_cache_element != 0; }
+ void set_error(uint error);
+ void er_xaer_rmfail() const;
+ XID *get_xid() const;
+};
+
+void xid_cache_init(void);
+void xid_cache_free(void);
+bool xid_cache_insert(XID *xid);
+bool xid_cache_insert(THD *thd, XID_STATE *xid_state, XID *xid);
+void xid_cache_delete(THD *thd, XID_STATE *xid_state);
+
+bool trans_xa_start(THD *thd);
+bool trans_xa_end(THD *thd);
+bool trans_xa_prepare(THD *thd);
+bool trans_xa_commit(THD *thd);
+bool trans_xa_rollback(THD *thd);
+bool trans_xa_detach(THD *thd);
+bool mysql_xa_recover(THD *thd);
diff --git a/storage/archive/azio.c b/storage/archive/azio.c
index 0f66b999c94..3529d875f72 100644
--- a/storage/archive/azio.c
+++ b/storage/archive/azio.c
@@ -866,7 +866,10 @@ int azclose (azio_stream *s)
if (s->mode == 'w')
{
if (do_flush(s, Z_FINISH) != Z_OK)
- return destroy(s);
+ {
+ destroy(s);
+ return Z_ERRNO;
+ }
putLong(s->file, s->crc);
putLong(s->file, (uLong)(s->in & 0xffffffff));
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index f540bbaa4f1..9526306a601 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -243,6 +243,20 @@ Archive_share::Archive_share()
}
+Archive_share::~Archive_share()
+{
+ DBUG_PRINT("ha_archive", ("~Archive_share: %p", this));
+ if (archive_write_open)
+ {
+ mysql_mutex_lock(&mutex);
+ (void) close_archive_writer(); // Will reset archive_write_open
+ mysql_mutex_unlock(&mutex);
+ }
+ thr_lock_delete(&lock);
+ mysql_mutex_destroy(&mutex);
+}
+
+
ha_archive::ha_archive(handlerton *hton, TABLE_SHARE *table_arg)
:handler(hton, table_arg), delayed_insert(0), bulk_insert(0)
{
@@ -371,7 +385,7 @@ int Archive_share::write_v1_metafile()
@return Length of packed row
*/
-unsigned int ha_archive::pack_row_v1(uchar *record)
+unsigned int ha_archive::pack_row_v1(const uchar *record)
{
uint *blob, *end;
uchar *pos;
@@ -676,7 +690,6 @@ int ha_archive::close(void)
if (azclose(&archive))
rc= 1;
}
-
DBUG_RETURN(rc);
}
@@ -802,7 +815,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
#endif /* HAVE_READLINK */
{
if (create_info->data_file_name)
- my_error(WARN_OPTION_IGNORED, MYF(ME_JUST_WARNING), "DATA DIRECTORY");
+ my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING), "DATA DIRECTORY");
fn_format(name_buff, name, "", ARZ,
MY_REPLACE_EXT | MY_UNPACK_FILENAME);
@@ -811,7 +824,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
/* Archive engine never uses INDEX DIRECTORY. */
if (create_info->index_file_name)
- my_error(WARN_OPTION_IGNORED, MYF(ME_JUST_WARNING), "INDEX DIRECTORY");
+ my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING), "INDEX DIRECTORY");
/*
There is a chance that the file was "discovered". In this case
@@ -868,7 +881,7 @@ error:
/*
This is where the actual row is written out.
*/
-int ha_archive::real_write_row(uchar *buf, azio_stream *writer)
+int ha_archive::real_write_row(const uchar *buf, azio_stream *writer)
{
my_off_t written;
unsigned int r_pack_length;
@@ -917,7 +930,7 @@ uint32 ha_archive::max_row_length(const uchar *record)
}
-unsigned int ha_archive::pack_row(uchar *record, azio_stream *writer)
+unsigned int ha_archive::pack_row(const uchar *record, azio_stream *writer)
{
uchar *ptr;
my_ptrdiff_t const rec_offset= record - table->record[0];
@@ -959,7 +972,7 @@ unsigned int ha_archive::pack_row(uchar *record, azio_stream *writer)
for implementing start_bulk_insert() is that we could skip
setting dirty to true each time.
*/
-int ha_archive::write_row(uchar *buf)
+int ha_archive::write_row(const uchar *buf)
{
int rc;
uchar *read_buf= NULL;
@@ -980,7 +993,7 @@ int ha_archive::write_row(uchar *buf)
if (table->next_number_field && record == table->record[0])
{
- KEY *mkey= &table->s->key_info[0]; // We only support one key right now
+ KEY *mkey= &table->key_info[0]; // We only support one key right now
update_auto_increment();
temp_auto= table->next_number_field->val_int();
@@ -1098,7 +1111,7 @@ int ha_archive::index_read_idx(uchar *buf, uint index, const uchar *key,
{
int rc;
bool found= 0;
- KEY *mkey= &table->s->key_info[index];
+ KEY *mkey= &table->key_info[index];
current_k_offset= mkey->key_part->offset;
current_key= key;
current_key_len= key_len;
@@ -1753,6 +1766,20 @@ void ha_archive::flush_and_clear_pending_writes()
}
+int ha_archive::extra(enum ha_extra_function operation)
+{
+ switch (operation) {
+ case HA_EXTRA_FLUSH:
+ mysql_mutex_lock(&share->mutex);
+ share->close_archive_writer();
+ mysql_mutex_unlock(&share->mutex);
+ break;
+ default:
+ break;
+ }
+ return 0;
+}
+
/*
This method tells us that a bulk insert operation is about to occur. We set
a flag which will keep write_row from saying that its data is dirty. This in
diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h
index a4911fe9e32..35291e469cd 100644
--- a/storage/archive/ha_archive.h
+++ b/storage/archive/ha_archive.h
@@ -46,19 +46,7 @@ public:
bool dirty; /* Flag for if a flush should occur */
bool crashed; /* Meta file is crashed */
Archive_share();
- ~Archive_share()
- {
- DBUG_PRINT("ha_archive", ("~Archive_share: %p",
- this));
- if (archive_write_open)
- {
- mysql_mutex_lock(&mutex);
- (void) close_archive_writer();
- mysql_mutex_unlock(&mutex);
- }
- thr_lock_delete(&lock);
- mysql_mutex_destroy(&mutex);
- }
+ virtual ~Archive_share();
int init_archive_writer();
void close_archive_writer();
int write_v1_metafile();
@@ -95,7 +83,7 @@ class ha_archive: public handler
void destroy_record_buffer(archive_record_buffer *r);
int frm_copy(azio_stream *src, azio_stream *dst);
int frm_compare(azio_stream *src);
- unsigned int pack_row_v1(uchar *record);
+ unsigned int pack_row_v1(const uchar *record);
public:
ha_archive(handlerton *hton, TABLE_SHARE *table_arg);
@@ -108,7 +96,7 @@ public:
return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_CAN_BIT_FIELD |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
HA_STATS_RECORDS_IS_EXACT | HA_CAN_EXPORT |
- HA_HAS_RECORDS | HA_CAN_REPAIR |
+ HA_HAS_RECORDS | HA_CAN_REPAIR | HA_SLOW_RND_POS |
HA_FILE_BASED | HA_CAN_INSERT_DELAYED | HA_CAN_GEOMETRY);
}
ulong index_flags(uint idx, uint part, bool all_parts) const
@@ -131,8 +119,8 @@ public:
int index_next(uchar * buf);
int open(const char *name, int mode, uint test_if_locked);
int close(void);
- int write_row(uchar * buf);
- int real_write_row(uchar *buf, azio_stream *writer);
+ int write_row(const uchar * buf);
+ int real_write_row(const uchar *buf, azio_stream *writer);
int truncate();
int rnd_init(bool scan=1);
int rnd_next(uchar *buf);
@@ -148,6 +136,7 @@ public:
int read_data_header(azio_stream *file_to_read);
void position(const uchar *record);
int info(uint);
+ int extra(enum ha_extra_function operation);
void update_create_info(HA_CREATE_INFO *create_info);
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
@@ -167,7 +156,7 @@ public:
uint32 max_row_length(const uchar *buf);
bool fix_rec_buff(unsigned int length);
int unpack_row(azio_stream *file_to_read, uchar *record);
- unsigned int pack_row(uchar *record, azio_stream *writer);
+ unsigned int pack_row(const uchar *record, azio_stream *writer);
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
int external_lock(THD *thd, int lock_type);
private:
diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc
index 3f770c7005e..1b64db142e0 100644
--- a/storage/blackhole/ha_blackhole.cc
+++ b/storage/blackhole/ha_blackhole.cc
@@ -117,7 +117,7 @@ const char *ha_blackhole::index_type(uint key_number)
HA_KEY_ALG_RTREE) ? "RTREE" : "BTREE");
}
-int ha_blackhole::write_row(uchar * buf)
+int ha_blackhole::write_row(const uchar * buf)
{
DBUG_ENTER("ha_blackhole::write_row");
DBUG_RETURN(table->next_number_field ? update_auto_increment() : 0);
diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h
index 9caa6e967d4..e827cd25bfc 100644
--- a/storage/blackhole/ha_blackhole.h
+++ b/storage/blackhole/ha_blackhole.h
@@ -56,7 +56,7 @@ public:
{
return(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
HA_BINLOG_STMT_CAPABLE | HA_BINLOG_ROW_CAPABLE |
- HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
+ HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | HA_CAN_ONLINE_BACKUPS |
HA_FILE_BASED | HA_CAN_GEOMETRY | HA_CAN_INSERT_DELAYED);
}
ulong index_flags(uint inx, uint part, bool all_parts) const
@@ -97,7 +97,7 @@ public:
THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
private:
- virtual int write_row(uchar *buf);
+ virtual int write_row(const uchar *buf);
virtual int update_row(const uchar *old_data, const uchar *new_data);
virtual int delete_row(const uchar *buf);
};
diff --git a/storage/cassandra/ha_cassandra.cc b/storage/cassandra/ha_cassandra.cc
index 56af4bfd40a..1d2331c1a5e 100644
--- a/storage/cassandra/ha_cassandra.cc
+++ b/storage/cassandra/ha_cassandra.cc
@@ -1931,7 +1931,7 @@ void ha_cassandra::free_dynamic_row(DYNAMIC_COLUMN_VALUE **vals,
*names= 0;
}
-int ha_cassandra::write_row(uchar *buf)
+int ha_cassandra::write_row(const uchar *buf)
{
MY_BITMAP *old_map;
int ires;
diff --git a/storage/cassandra/ha_cassandra.h b/storage/cassandra/ha_cassandra.h
index 9a44abc985f..a36d58fa4da 100644
--- a/storage/cassandra/ha_cassandra.h
+++ b/storage/cassandra/ha_cassandra.h
@@ -239,7 +239,7 @@ public:
int open(const char *name, int mode, uint test_if_locked);
int close(void);
- int write_row(uchar *buf);
+ int write_row(const uchar *buf);
int update_row(const uchar *old_data, const uchar *new_data);
int delete_row(const uchar *buf);
diff --git a/storage/connect/colblk.h b/storage/connect/colblk.h
index 03a467e9230..c9712f516b5 100644
--- a/storage/connect/colblk.h
+++ b/storage/connect/colblk.h
@@ -63,7 +63,7 @@ class DllExport COLBLK : public XOBJECT {
bool IsVirtual(void) {return Cdp->IsVirtual();}
bool IsNullable(void) {return Nullable;}
void SetNullable(bool b) {Nullable = b;}
-
+ void SetName(PSZ name_var) { Name= name_var; }
// Methods
virtual void Reset(void);
virtual bool Compare(PXOB xp);
diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc
index 7125973bae6..1a13dc71652 100644
--- a/storage/connect/connect.cc
+++ b/storage/connect/connect.cc
@@ -294,9 +294,16 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
/* its column blocks in mode write (required by XML tables). */
/*******************************************************************/
if (mode == MODE_UPDATE) {
- PTDBASE utp;
-
- if (!(utp = (PTDBASE)tdbp->Duplicate(g))) {
+ PTDB utp;
+
+ if (!(utp = tdbp->Duplicate(g))) {
+ /* If table type is of type virtual retrieve global parameter as it was.*/
+ if (tdbp->GetAmType() == TYPE_AM_VIR) {
+ if (tdbp->OpenDB(g)) {
+ printf("%s\n", g->Message);
+ throw 7;
+ }
+ }
snprintf(g->Message, sizeof(g->Message), MSG(INV_UPDT_TABLE), tdbp->GetName());
throw 4;
} // endif tp
@@ -591,7 +598,7 @@ int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort)
if (!tdbp->IsRemote()) {
// Make all the eventual indexes
- PTDBDOS tbxp = (PTDBDOS)tdbp;
+ PTDBASE tbxp = (PTDBASE)tdbp;
tbxp->ResetKindex(g, NULL);
tbxp->SetKey_Col(NULL);
rc = tbxp->ResetTableOpt(g, true, tbxp->GetDef()->Indexable() == 1);
@@ -644,6 +651,7 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted)
// return 0;
if (tdbp->GetKindex())
+ {
if (((XXBASE*)tdbp->GetKindex())->GetID() == id) {
tdbp->GetKindex()->Reset(); // Same index
return (tdbp->GetKindex()->IsMul()) ? 2 : 1;
@@ -651,6 +659,7 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted)
tdbp->GetKindex()->Close();
tdbp->SetKindex(NULL);
} // endif colp
+ }
for (xdp= dfp->GetIndx(); xdp; xdp= xdp->GetNext())
if (xdp->GetID() == id)
diff --git a/storage/connect/filamap.cpp b/storage/connect/filamap.cpp
index 1715cf7a204..1b38ab2ee57 100644
--- a/storage/connect/filamap.cpp
+++ b/storage/connect/filamap.cpp
@@ -354,7 +354,8 @@ int MAPFAM::ReadBuffer(PGLOBAL g)
if ((rc = GetNext(g)) != RC_OK)
return rc;
- case RC_NF:
+ /* falls through */
+ case RC_NF:
// Skip this record
if ((rc = SkipRecord(g, false)) != RC_OK)
return rc;
diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp
index 4c3ec10062b..b6c2bd3bdaa 100644
--- a/storage/connect/filamdbf.cpp
+++ b/storage/connect/filamdbf.cpp
@@ -936,6 +936,7 @@ int DBFFAM::DeleteRecords(PGLOBAL g, int irc)
if (irc == RC_OK) {
// T_Stream is the temporary stream or the table file stream itself
if (!T_Stream)
+ {
if (UseTemp) {
if (OpenTempFile(g))
return RC_FX;
@@ -945,7 +946,7 @@ int DBFFAM::DeleteRecords(PGLOBAL g, int irc)
} else
T_Stream = Stream;
-
+ }
*Tdbp->GetLine() = '*';
Modif++; // Modified line in Delete mode
} // endif irc
diff --git a/storage/connect/filamfix.cpp b/storage/connect/filamfix.cpp
index 1df247bd951..1964e752eb6 100644
--- a/storage/connect/filamfix.cpp
+++ b/storage/connect/filamfix.cpp
@@ -135,7 +135,7 @@ bool FIXFAM::AllocateBuffer(PGLOBAL g)
// The buffer must be prepared depending on column types
int n = 0;
bool b = false;
- PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
+ PDOSDEF defp __attribute__((unused))= (PDOSDEF)Tdbp->GetDef();
// PCOLDEF cdp;
PBINCOL colp;
diff --git a/storage/connect/filamgz.cpp b/storage/connect/filamgz.cpp
index 7e9597d6b75..34575c22e71 100644
--- a/storage/connect/filamgz.cpp
+++ b/storage/connect/filamgz.cpp
@@ -647,7 +647,7 @@ int ZBKFAM::WriteBuffer(PGLOBAL g)
int ZBKFAM::DeleteRecords(PGLOBAL g, int irc)
{
if (irc == RC_EF) {
- LPCSTR name = Tdbp->GetName();
+ LPCSTR name __attribute__((unused)) = Tdbp->GetName();
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
defp->SetBlock(0);
@@ -673,7 +673,7 @@ void ZBKFAM::CloseTableFile(PGLOBAL g, bool)
int rc = RC_OK;
if (Tdbp->GetMode() == MODE_INSERT) {
- LPCSTR name = Tdbp->GetName();
+ LPCSTR name __attribute__((unused))= Tdbp->GetName();
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
if (CurNum && !Closing) {
@@ -1021,6 +1021,7 @@ bool ZLBFAM::AllocateBuffer(PGLOBAL g)
#else
snprintf(g->Message, sizeof(g->Message), MSG(READ_ERROR), To_File, _strerror(NULL));
#endif
+ /* falls through */
case RC_NF:
return TRUE;
} // endswitch
@@ -1355,7 +1356,7 @@ void ZLBFAM::CloseTableFile(PGLOBAL g, bool)
int rc = RC_OK;
if (Tdbp->GetMode() == MODE_INSERT) {
- LPCSTR name = Tdbp->GetName();
+ LPCSTR name __attribute__((unused))= Tdbp->GetName();
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
// Closing is True if last Write was in error
diff --git a/storage/connect/filamtxt.cpp b/storage/connect/filamtxt.cpp
index 9ecc2293c48..7a5d16accb2 100644
--- a/storage/connect/filamtxt.cpp
+++ b/storage/connect/filamtxt.cpp
@@ -1548,13 +1548,14 @@ int BLKFAM::WriteBuffer(PGLOBAL g)
// T_Stream is the temporary stream or the table file stream itself
if (!T_Stream)
+ {
if (UseTemp /*&& Tdbp->GetMode() == MODE_UPDATE*/) {
if (OpenTempFile(g))
return RC_FX;
} else
T_Stream = Stream;
-
+ }
if (UseTemp) {
/*****************************************************************/
/* We are using a temporary file. Before writing the updated */
diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp
index f3e31895324..df889e9ab72 100644
--- a/storage/connect/filamvct.cpp
+++ b/storage/connect/filamvct.cpp
@@ -306,6 +306,7 @@ int VCTFAM::Cardinality(PGLOBAL g)
return 1;
if (Block < 0)
+ {
if (Split) {
// Separate column files and no pre setting of Block and Last
// This allows to see a table modified externally, but Block
@@ -351,7 +352,7 @@ int VCTFAM::Cardinality(PGLOBAL g)
return -1; // Error
} // endif split
-
+ }
return (Block) ? ((Block - 1) * Nrec + Last) : 0;
} // end of Cardinality
@@ -1168,7 +1169,7 @@ bool VCTFAM::ResetTableSize(PGLOBAL g, int block, int last)
if (!Header) {
// Update catalog values for Block and Last
PVCTDEF defp = (PVCTDEF)Tdbp->GetDef();
- LPCSTR name = Tdbp->GetName();
+ LPCSTR name __attribute__((unused))= Tdbp->GetName();
defp->SetBlock(Block);
defp->SetLast(Last);
@@ -4131,7 +4132,8 @@ bool BGVFAM::CleanUnusedSpace(PGLOBAL g)
} else {
int req;
- memset(To_Buf, 0, Buflen);
+ if (To_Buf)
+ memset(To_Buf, 0, Buflen);
for (n = Fpos - Tpos; n > 0; n -= req) {
/*****************************************************************/
diff --git a/storage/connect/filter.cpp b/storage/connect/filter.cpp
index bebfe276b3f..a3f75304a47 100644
--- a/storage/connect/filter.cpp
+++ b/storage/connect/filter.cpp
@@ -1220,15 +1220,19 @@ bool FILTER::Eval(PGLOBAL g)
int i; // n = 0;
//PSUBQ subp = NULL;
PARRAY ap = NULL;
- PDBUSER dup = PlgGetUser(g);
+ PDBUSER dup __attribute__((unused)) = PlgGetUser(g);
if (Opc <= OP_XX)
+ {
for (i = 0; i < 2; i++)
+ {
// Evaluate the object and eventually convert it.
if (Arg(i)->Eval(g))
return TRUE;
else if (Test[i].Conv)
Val(i)->SetValue_pval(Arg(i)->GetValue());
+ }
+ }
if (trace(1))
htrc(" Filter: op=%d type=%d %d B_T=%d %d val=%p %p\n",
diff --git a/storage/connect/fmdlex.c b/storage/connect/fmdlex.c
index 1fb2b3fee65..1bca2d4ec18 100644
--- a/storage/connect/fmdlex.c
+++ b/storage/connect/fmdlex.c
@@ -240,12 +240,11 @@ YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+#ifdef NOT_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
-static void yy_push_state YY_PROTO(( int new_state ));
-static void yy_pop_state YY_PROTO(( void ));
-static int yy_top_state YY_PROTO(( void ));
+#endif
static void *yy_flex_alloc YY_PROTO(( unsigned int ));
static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
@@ -267,11 +266,13 @@ extern char *yytext;
static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
#endif
+#ifdef NOT_USED
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
+#endif
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
@@ -1060,6 +1061,8 @@ register char *yy_bp;
}
+#ifdef NOT_USED
+
#ifdef __cplusplus
static int yyinput()
#else
@@ -1126,7 +1129,7 @@ static int input()
return c;
}
-
+#endif /* NOT_USED */
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
@@ -1266,6 +1269,7 @@ FILE *file;
}
+#ifdef NOT_USED
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
@@ -1297,7 +1301,6 @@ int new_state;
BEGIN(new_state);
}
-
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
@@ -1311,6 +1314,7 @@ static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
+#endif /* NOT_USED */
#ifdef YY_USE_PROTOS
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 7a40fbd74c7..4199270fc49 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -849,7 +849,7 @@ static int connect_init_func(void *p)
@brief
Plugin clean up
*/
-static int connect_done_func(void *)
+int connect_done_func(void *)
{
int error= 0;
PCONNECT pc, pn;
@@ -1774,10 +1774,7 @@ bool ha_connect::GetIndexOption(KEY *kp, PCSZ opname)
/****************************************************************************/
bool ha_connect::IsUnique(uint n)
{
- TABLE_SHARE *s= (table) ? table->s : NULL;
- KEY kp= s->key_info[n];
-
- return (kp.flags & 1) != 0;
+ return (table->key_info[n].flags & HA_NOSAME) != 0;
} // end of IsUnique
/****************************************************************************/
@@ -2047,7 +2044,7 @@ int ha_connect::OpenTable(PGLOBAL g, bool del)
k1= k2= 0;
n1= n2= 1; // 1 is space for final null character
- for (field= table->field; fp= *field; field++) {
+ for (field= table->field; (fp= *field); field++) {
if (bitmap_is_set(map, fp->field_index)) {
n1+= (fp->field_name.length + 1);
k1++;
@@ -2063,7 +2060,7 @@ int ha_connect::OpenTable(PGLOBAL g, bool del)
if (k1) {
p= c1= (char*)PlugSubAlloc(g, NULL, n1);
- for (field= table->field; fp= *field; field++)
+ for (field= table->field; (fp= *field); field++)
if (bitmap_is_set(map, fp->field_index)) {
strcpy(p, fp->field_name.str);
p+= (fp->field_name.length + 1);
@@ -2075,7 +2072,7 @@ int ha_connect::OpenTable(PGLOBAL g, bool del)
if (k2) {
p= c2= (char*)PlugSubAlloc(g, NULL, n2);
- for (field= table->field; fp= *field; field++)
+ for (field= table->field; (fp= *field); field++)
if (bitmap_is_set(ump, fp->field_index)) {
strcpy(p, fp->field_name.str);
@@ -2102,11 +2099,13 @@ int ha_connect::OpenTable(PGLOBAL g, bool del)
istable= true;
// strmake(tname, table_name, sizeof(tname)-1);
+#ifdef NOT_USED_VARIABLE
// We may be in a create index query
if (xmod == MODE_ANY && *tdbp->GetName() != '#') {
// The current indexes
PIXDEF oldpix= GetIndexInfo();
} // endif xmod
+#endif
} else
htrc("OpenTable: %s\n", g->Message);
@@ -2133,7 +2132,7 @@ bool ha_connect::CheckColumnList(PGLOBAL g)
MY_BITMAP *map= table->read_set;
try {
- for (field= table->field; fp= *field; field++)
+ for (field= table->field; (fp= *field); field++)
if (bitmap_is_set(map, fp->field_index)) {
if (!(colp= tdbp->ColDB(g, (PSZ)fp->field_name.str, 0))) {
snprintf(g->Message, sizeof(g->Message), "Column %s not found in %s",
@@ -2205,9 +2204,8 @@ int ha_connect::MakeRecord(char *buf)
DBUG_ENTER("ha_connect::MakeRecord");
if (trace(2))
- htrc("Maps: read=%08X write=%08X vcol=%08X defr=%08X defw=%08X\n",
+ htrc("Maps: read=%08X write=%08X defr=%08X defw=%08X\n",
*table->read_set->bitmap, *table->write_set->bitmap,
- (table->vcol_set) ? *table->vcol_set->bitmap : 0,
*table->def_read_set.bitmap, *table->def_write_set.bitmap);
// Avoid asserts in field::store() for columns that are not updated
@@ -2840,44 +2838,49 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
} else {
char buff[256];
String *res, tmp(buff, sizeof(buff), &my_charset_bin);
- Item_basic_constant *pval= (Item_basic_constant *)args[i];
PPARM pp= (PPARM)PlugSubAlloc(g, NULL, sizeof(PARM));
// IN and BETWEEN clauses should be col VOP list
if (!i && (ismul))
return NULL;
- switch (args[i]->real_type()) {
- case COND::STRING_ITEM:
- res= pval->val_str(&tmp);
- pp->Value= PlugSubAllocStr(g, NULL, res->ptr(), res->length());
- pp->Type= (pp->Value) ? TYPE_STRING : TYPE_ERROR;
- break;
- case COND::INT_ITEM:
- pp->Type= TYPE_INT;
- pp->Value= PlugSubAlloc(g, NULL, sizeof(int));
- *((int*)pp->Value)= (int)pval->val_int();
- break;
- case COND::DATE_ITEM:
- pp->Type= TYPE_DATE;
- pp->Value= PlugSubAlloc(g, NULL, sizeof(int));
- *((int*)pp->Value)= (int)pval->val_int_from_date();
- break;
- case COND::REAL_ITEM:
- pp->Type= TYPE_DOUBLE;
- pp->Value= PlugSubAlloc(g, NULL, sizeof(double));
- *((double*)pp->Value)= pval->val_real();
- break;
- case COND::DECIMAL_ITEM:
- pp->Type= TYPE_DOUBLE;
- pp->Value= PlugSubAlloc(g, NULL, sizeof(double));
- *((double*)pp->Value)= pval->val_real_from_decimal();
- break;
+ switch (args[i]->real_type()) {
+ case COND::CONST_ITEM:
+ {
+ Item *pval= (Item *)args[i];
+ switch (args[i]->cmp_type()) {
+ case STRING_RESULT:
+ res= pval->val_str(&tmp);
+ pp->Value= PlugSubAllocStr(g, NULL, res->ptr(), res->length());
+ pp->Type= (pp->Value) ? TYPE_STRING : TYPE_ERROR;
+ break;
+ case INT_RESULT:
+ pp->Type= TYPE_INT;
+ pp->Value= PlugSubAlloc(g, NULL, sizeof(int));
+ *((int*)pp->Value)= (int)pval->val_int();
+ break;
+ case TIME_RESULT:
+ pp->Type= TYPE_DATE;
+ pp->Value= PlugSubAlloc(g, NULL, sizeof(int));
+ *((int*)pp->Value)= (int) Temporal_hybrid(pval).to_longlong();
+ break;
+ case REAL_RESULT:
+ case DECIMAL_RESULT:
+ pp->Type= TYPE_DOUBLE;
+ pp->Value= PlugSubAlloc(g, NULL, sizeof(double));
+ *((double*)pp->Value)= pval->val_real();
+ break;
+ case ROW_RESULT:
+ DBUG_ASSERT(0);
+ return NULL;
+ }
+ }
+ break;
case COND::CACHE_ITEM: // Possible ???
case COND::NULL_ITEM: // TODO: handle this
default:
return NULL;
- } // endswitch type
+ } // endswitch type
if (trace(1))
htrc("Value type=%hd\n", pp->Type);
@@ -3127,16 +3130,12 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
} else {
char buff[256];
String *res, tmp(buff, sizeof(buff), &my_charset_bin);
- Item_basic_constant *pval= (Item_basic_constant *)args[i];
+ Item *pval= (Item *)args[i];
Item::Type type= args[i]->real_type();
switch (type) {
- case COND::STRING_ITEM:
- case COND::INT_ITEM:
- case COND::REAL_ITEM:
+ case COND::CONST_ITEM:
case COND::NULL_ITEM:
- case COND::DECIMAL_ITEM:
- case COND::DATE_ITEM:
case COND::CACHE_ITEM:
break;
default:
@@ -3172,14 +3171,14 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
strcat(s, "'}");
break;
} // endif ODBC
-
- // fall through
+ // fall through
case MYSQL_TYPE_DATE:
if (tty == TYPE_AM_ODBC) {
strcat(s, "{d '");
strcat(strncat(s, res->ptr(), res->length()), "'}");
break;
} // endif ODBC
+ // fall through
case MYSQL_TYPE_TIME:
if (tty == TYPE_AM_ODBC) {
@@ -3187,6 +3186,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
strcat(strncat(s, res->ptr(), res->length()), "'}");
break;
} // endif ODBC
+ // fall through
case MYSQL_TYPE_VARCHAR:
if (tty == TYPE_AM_ODBC && i) {
@@ -3676,7 +3676,7 @@ int ha_connect::close(void)
item_sum.cc, item_sum.cc, sql_acl.cc, sql_insert.cc,
sql_insert.cc, sql_select.cc, sql_table.cc, sql_udf.cc and sql_update.cc
*/
-int ha_connect::write_row(uchar *buf)
+int ha_connect::write_row(const uchar *buf)
{
int rc= 0;
PGLOBAL& g= xp->g;
@@ -4375,7 +4375,6 @@ int ha_connect::info(uint flag)
// tdbp must be available to get updated info
if (xp->CheckQuery(valid_query_id) || !tdbp) {
- PDBUSER dup= PlgGetUser(g);
if (xmod == MODE_ANY || xmod == MODE_ALTER) {
// Pure info, not a query
@@ -4670,12 +4669,14 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
// break;
case SQLCOM_DELETE_MULTI:
*cras= true;
+ // fall through
case SQLCOM_DELETE:
case SQLCOM_TRUNCATE:
newmode= MODE_DELETE;
break;
case SQLCOM_UPDATE_MULTI:
*cras= true;
+ // fall through
case SQLCOM_UPDATE:
newmode= MODE_UPDATE;
break;
@@ -4685,6 +4686,7 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
break;
case SQLCOM_FLUSH:
locked= 0;
+ // fall through
case SQLCOM_DROP_TABLE:
case SQLCOM_RENAME_TABLE:
newmode= MODE_ANY;
@@ -5614,7 +5616,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
PCSZ nsp= NULL, cls= NULL;
#endif // _WIN32
//int hdr, mxe;
- int port= 0, mxr= 0, rc= 0, mul= 0;
+ int port= 0, mxr __attribute__((unused)) = 0, rc= 0, mul= 0;
//PCSZ tabtyp= NULL;
#if defined(ODBC_SUPPORT)
POPARM sop= NULL;
@@ -5912,6 +5914,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
#endif // _WIN32
case TAB_PIVOT:
supfnc= FNC_NO;
+ // fall through
case TAB_PRX:
case TAB_TBL:
case TAB_XCL:
@@ -6161,7 +6164,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
} // endfor crp
} else {
- char *schem= NULL;
+ char *schem __attribute__((unused)) = NULL;
char *tn= NULL;
// Not a catalog table
@@ -7194,7 +7197,7 @@ ha_connect::check_if_supported_inplace_alter(TABLE *altered_table,
ALTER_DROP_PK_INDEX;
alter_table_operations inplace_offline_operations=
- ALTER_COLUMN_EQUAL_PACK_LENGTH |
+ ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE |
ALTER_COLUMN_NAME |
ALTER_COLUMN_DEFAULT |
ALTER_CHANGE_CREATE_OPTION |
@@ -7293,7 +7296,7 @@ ha_connect::check_if_supported_inplace_alter(TABLE *altered_table,
#if 0
uint table_changes= (ha_alter_info->handler_flags &
- ALTER_COLUMN_EQUAL_PACK_LENGTH) ?
+ ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE) ?
IS_EQUAL_PACK_LENGTH : IS_EQUAL_YES;
if (table->file->check_if_incompatible_data(create_info, table_changes)
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index 3f1ecc18af7..a3b120fcd0d 100644
--- a/storage/connect/ha_connect.h
+++ b/storage/connect/ha_connect.h
@@ -390,7 +390,7 @@ virtual int check(THD* thd, HA_CHECK_OPT* check_opt);
We implement this in ha_connect.cc. It's not an obligatory method;
skip it and and MySQL will treat it as not implemented.
*/
- int write_row(uchar *buf);
+ int write_row(const uchar *buf);
/** @brief
We implement this in ha_connect.cc. It's not an obligatory method;
@@ -551,3 +551,7 @@ public:
uint int_table_flags; // Inherited from MyISAM
bool enable_activate_all_index; // Inherited from MyISAM
}; // end of ha_connect class definition
+
+#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT)
+bool MongoEnabled(void);
+#endif // JAVA_SUPPORT || CMGO_SUPPORT
diff --git a/storage/connect/inihandl.cpp b/storage/connect/inihandl.cpp
index 7d8741ebfa3..de04fa91883 100644
--- a/storage/connect/inihandl.cpp
+++ b/storage/connect/inihandl.cpp
@@ -193,7 +193,7 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section )
secno++;
}
- for (key= section->key; key; key= key->next) {
+ for (key = section->key; key; key = key->next) {
if (key->name[0]) {
fprintf(file, "%s", SVP(key->name));
@@ -1340,6 +1340,7 @@ BOOL WritePrivateProfileSection(LPCSTR section,
* Note that when the buffer is big enough then the return value may be any
* value between 1 and len-1 (or len in Win95), including len-2.
*/
+#ifdef NOT_USED
static DWORD
GetPrivateProfileSectionNames(LPSTR buffer, DWORD size, LPCSTR filename)
{
@@ -1356,7 +1357,7 @@ GetPrivateProfileSectionNames(LPSTR buffer, DWORD size, LPCSTR filename)
LeaveCriticalSection(&PROFILE_CritSect);
return ret;
} // end of GetPrivateProfileSectionNames
-
+#endif
/************************************************************************
* Program to test the above
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp
index 755480b1608..2320c1c5b69 100644
--- a/storage/connect/json.cpp
+++ b/storage/connect/json.cpp
@@ -218,7 +218,7 @@ PJSON ParseJson(PGLOBAL g, char* s, size_t len, int* ptyp, bool* comma)
b = false;
break;
} // endif b
-
+ /* falls through */
default:
if (jsp)
jsp = jdp->ParseAsArray(g, i, pretty, ptyp);
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 2a209f67652..4d4606cce44 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -211,7 +211,7 @@ my_bool JSNX::ParseJpath(PGLOBAL g)
{
char *p, *p1 = NULL, *p2 = NULL, *pbuf = NULL;
int i;
- my_bool a, mul = false;
+ my_bool a;
if (Parsed)
return false; // Already done
@@ -335,6 +335,7 @@ void JSNX::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val)
break;
case TYPE_NULL:
vp->SetNull(true);
+ /* falls through */
default:
vp->Reset();
} // endswitch Type
@@ -425,7 +426,6 @@ PVAL JSNX::GetColumnValue(PGLOBAL g, PJSON row, int i)
/*********************************************************************************/
PJVAL JSNX::GetRowValue(PGLOBAL g, PJSON row, int i, my_bool b)
{
- my_bool expd = false;
PJAR arp;
PJVAL val = NULL;
@@ -846,7 +846,7 @@ my_bool JSNX::WriteValue(PGLOBAL g, PJVAL jvalp)
PSZ JSNX::Locate(PGLOBAL g, PJSON jsp, PJVAL jvp, int k)
{
PSZ str = NULL;
- my_bool b = false, err = true;
+ my_bool err = true;
g->Message[0] = 0;
@@ -968,7 +968,7 @@ my_bool JSNX::LocateValue(PGLOBAL g, PJVAL jvp)
PSZ JSNX::LocateAll(PGLOBAL g, PJSON jsp, PJVAL jvp, int mx)
{
PSZ str = NULL;
- my_bool b = false, err = true;
+ my_bool err = true;
PJPN jnp;
if (!jsp) {
@@ -1473,7 +1473,7 @@ static PBSON MakeBinResult(PGLOBAL g, UDF_ARGS *args, PJSON top, ulong len, int
bsnp->Pretty = pretty;
- if (bsnp->Filename = (char*)args->args[0]) {
+ if ((bsnp->Filename = (char*)args->args[0])) {
bsnp->Filename = MakePSZ(g, args, 0);
strncpy(bsnp->Msg, bsnp->Filename, BMX);
} else
@@ -1906,7 +1906,7 @@ char *GetJsonFile(PGLOBAL g, char *fn)
#endif
if (h == -1) {
- snprintf(g->Message, sizeof(g->Message), "Error %d opening %s", errno, fn);
+ snprintf(g->Message, sizeof(g->Message), "Error %d opening %-.1024s", errno, fn);
return NULL;
} // endif h
@@ -1918,7 +1918,7 @@ char *GetJsonFile(PGLOBAL g, char *fn)
if ((str = (char*)PlgDBSubAlloc(g, NULL, len + 1))) {
if ((n = read(h, str, len)) < 0) {
- snprintf(g->Message, sizeof(g->Message), "Error %d reading %d bytes from %s", errno, len, fn);
+ snprintf(g->Message, sizeof(g->Message), "Error %d reading %d bytes from %-.1024s", errno, len, fn);
return NULL;
} // endif n
@@ -3615,7 +3615,7 @@ char *jsonget_string(UDF_INIT *initid, UDF_ARGS *args, char *result,
} catch (int n) {
if (trace(1))
- htrc("Exception %d: %s\n", n, g->Message);
+ htrc("Exception %d: %-.256s\n", n, g->Message);
PUSH_WARNING(g->Message);
str = NULL;
@@ -3890,12 +3890,13 @@ my_bool jsonlocate_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
strcpy(message, "Third argument is not an integer (rank)");
return true;
} else if (args->arg_count > 3)
+ {
if (args->arg_type[3] != INT_RESULT) {
strcpy(message, "Fourth argument is not an integer (memory)");
return true;
} else
more += (ulong)*(longlong*)args->args[2];
-
+ }
CalcLen(args, false, reslen, memlen);
// TODO: calculate this
@@ -3973,7 +3974,7 @@ char *jsonlocate(UDF_INIT *initid, UDF_ARGS *args, char *result,
} catch (int n) {
if (trace(1))
- htrc("Exception %d: %s\n", n, g->Message);
+ htrc("Exception %d: %-.256s\n", n, g->Message);
PUSH_WARNING(g->Message);
*error = 1;
@@ -4017,12 +4018,13 @@ my_bool json_locate_all_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
strcpy(message, "Third argument is not an integer (Depth)");
return true;
} else if (args->arg_count > 3)
+ {
if (args->arg_type[3] != INT_RESULT) {
strcpy(message, "Fourth argument is not an integer (memory)");
return true;
} else
more += (ulong)*(longlong*)args->args[2];
-
+ }
CalcLen(args, false, reslen, memlen);
// TODO: calculate this
@@ -4098,7 +4100,7 @@ char *json_locate_all(UDF_INIT *initid, UDF_ARGS *args, char *result,
} catch (int n) {
if (trace(1))
- htrc("Exception %d: %s\n", n, g->Message);
+ htrc("Exception %d: %-.256s\n", n, g->Message);
PUSH_WARNING(g->Message);
*error = 1;
@@ -4372,7 +4374,7 @@ char *handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
} catch (int n) {
if (trace(1))
- htrc("Exception %d: %s\n", n, g->Message);
+ htrc("Exception %d: %-.256s\n", n, g->Message);
PUSH_WARNING(g->Message);
str = NULL;
@@ -5311,7 +5313,7 @@ char *jbin_object_delete(UDF_INIT *initid, UDF_ARGS *args, char *result,
PCSZ key;
PJOB jobp;
PJVAL jvp = MakeValue(g, args, 0, &top);
- PJSON jsp = jvp->GetJson();
+ PJSON jsp __attribute__((unused)) = jvp->GetJson();
if (CheckPath(g, args, top, jvp, 2))
PUSH_WARNING(g->Message);
@@ -6633,7 +6635,7 @@ long long countin(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *)
memcpy(str2, args->args[1], lg);
str2[lg] = 0;
- while (s = strstr(s, str2)) {
+ while ((s = strstr(s, str2))) {
n++;
s += lg;
} // endwhile
diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp
index aef7b551d65..d9305a59a3c 100644
--- a/storage/connect/libdoc.cpp
+++ b/storage/connect/libdoc.cpp
@@ -211,7 +211,7 @@ static xmlStrdupFunc Strdup;
void xmlMyFree(void *mem)
{
if (trace(1)) {
- htrc("%.4d Freeing at %p %s\n", ++m, mem, s);
+ htrc("%.4d Freeing at %p %-.256s\n", ++m, mem, s);
*s = 0;
} // endif trace
Free(mem);
@@ -221,7 +221,7 @@ void *xmlMyMalloc(size_t size)
{
void *p = Malloc(size);
if (trace(1)) {
- htrc("%.4d Allocating %.5d at %p %s\n", ++m, size, p, s);
+ htrc("%.4d Allocating %.5d at %p %-.256s\n", ++m, size, p, s);
*s = 0;
} // endif trace
return p;
@@ -231,7 +231,7 @@ void *xmlMyMallocAtomic(size_t size)
{
void *p = MallocA(size);
if (trace(1)) {
- htrc("%.4d Atom alloc %.5d at %p %s\n", ++m, size, p, s);
+ htrc("%.4d Atom alloc %.5d at %p %-.256s\n", ++m, size, p, s);
*s = 0;
} // endif trace
return p;
@@ -241,7 +241,7 @@ void *xmlMyRealloc(void *mem, size_t size)
{
void *p = Realloc(mem, size);
if (trace(1)) {
- htrc("%.4d ReAlloc %.5d to %p from %p %s\n", ++m, size, p, mem, s);
+ htrc("%.4d ReAlloc %.5d to %p from %p %-.256s\n", ++m, size, p, mem, s);
*s = 0;
} // endif trace
return p;
@@ -251,7 +251,7 @@ char *xmlMyStrdup(const char *str)
{
char *p = Strdup(str);
if (trace(1)) {
- htrc("%.4d Duplicating to %p from %p %s %s\n", ++m, p, str, str, s);
+ htrc("%.4d Duplicating to %p from %p %-.256s %-.256s\n", ++m, p, str, str, s);
*s = 0;
} // endif trace
return p;
@@ -448,7 +448,7 @@ bool LIBXMLDOC::NewDoc(PGLOBAL g, PCSZ ver)
void LIBXMLDOC::AddComment(PGLOBAL g, char *txtp)
{
if (trace(1))
- htrc("AddComment: %s\n", txtp);
+ htrc("AddComment: %-.256s\n", txtp);
xmlNodePtr cp = xmlNewDocComment(Docp, BAD_CAST txtp);
xmlAddChild((xmlNodePtr)Docp, cp);
@@ -476,7 +476,7 @@ PXNODE LIBXMLDOC::GetRoot(PGLOBAL g)
PXNODE LIBXMLDOC::NewRoot(PGLOBAL g, char *name)
{
if (trace(1))
- htrc("NewRoot: %s\n", name);
+ htrc("NewRoot: %-.256s\n", name);
xmlNodePtr root = xmlNewDocNode(Docp, NULL, BAD_CAST name, NULL);
@@ -494,7 +494,7 @@ PXNODE LIBXMLDOC::NewRoot(PGLOBAL g, char *name)
PXNODE LIBXMLDOC::NewPnode(PGLOBAL g, char *name)
{
if (trace(1))
- htrc("NewNode: %s\n", name);
+ htrc("NewNode: %-.256s\n", name);
xmlNodePtr nop;
@@ -535,7 +535,7 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn)
FILE *of;
if (trace(1))
- htrc("DumpDoc: %s\n", ofn);
+ htrc("DumpDoc: %-.256s\n", ofn);
if (!(of= global_fopen(g, MSGID_CANNOT_OPEN, ofn, "w")))
return -1;
@@ -554,8 +554,8 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn)
xmlNodePtr Rootp;
// Save the modified document
- fprintf(of, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", Encoding);
- fprintf(of, "<!-- Created by CONNECT %s -->\n", version);
+ fprintf(of, "<?xml version=\"1.0\" encoding=\"%-.256s\"?>\n", Encoding);
+ fprintf(of, "<!-- Created by CONNECT %-.256s -->\n", version);
if (!(Rootp = xmlDocGetRootElement(Docp)))
return 1;
@@ -631,7 +631,7 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
xmlNodeSetPtr nl;
if (trace(1))
- htrc("GetNodeList: %s np=%p\n", xp, np);
+ htrc("GetNodeList: %-.256s np=%p\n", xp, np);
if (!Ctxp) {
// Init Xpath
@@ -648,7 +648,7 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
strcpy(g->Message, MSG(XPATH_CNTX_ERR));
if (trace(1))
- htrc("Context error: %s\n", g->Message);
+ htrc("Context error: %-.256s\n", g->Message);
return NULL;
} // endif xpathCtx
@@ -656,7 +656,7 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
// Register namespaces from list (if any)
for (PNS nsp = Namespaces; nsp; nsp = nsp->Next) {
if (trace(1))
- htrc("Calling xmlXPathRegisterNs Prefix=%s Uri=%s\n",
+ htrc("Calling xmlXPathRegisterNs Prefix=%-.256s Uri=%-.512s\n",
nsp->Prefix, nsp->Uri);
if (xmlXPathRegisterNs(Ctxp, BAD_CAST nsp->Prefix,
@@ -664,7 +664,7 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
snprintf(g->Message, sizeof(g->Message), MSG(REGISTER_ERR), nsp->Prefix, nsp->Uri);
if (trace(1))
- htrc("Ns error: %s\n", g->Message);
+ htrc("Ns error: %-.256s\n", g->Message);
return NULL;
} // endif Registering
@@ -699,14 +699,14 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
Ctxp->node = np;
if (trace(1))
- htrc("Calling xmlXPathEval %s Ctxp=%p\n", xp, Ctxp);
+ htrc("Calling xmlXPathEval %-.256s Ctxp=%p\n", xp, Ctxp);
// Evaluate table xpath
if (!(Xop = xmlXPathEval(BAD_CAST xp, Ctxp))) {
snprintf(g->Message, sizeof(g->Message), MSG(XPATH_EVAL_ERR), xp);
if (trace(1))
- htrc("Path error: %s\n", g->Message);
+ htrc("Path error: %-.256s\n", g->Message);
return NULL;
} else
@@ -882,14 +882,14 @@ RCODE XML2NODE::GetContent(PGLOBAL g, char *buf, int len)
} // endif p1
} else {
- snprintf(g->Message, sizeof(g->Message), "Truncated %s content", Nodep->name);
+ snprintf(g->Message, sizeof(g->Message), "Truncated %-.256s content", Nodep->name);
rc = RC_INFO;
} // endif len
*p2 = 0;
if (trace(1))
- htrc("GetText buf='%s' len=%d\n", buf, len);
+ htrc("GetText buf='%-.256s' len=%d\n", buf, len);
xmlFree(Content);
Content = NULL;
@@ -897,7 +897,7 @@ RCODE XML2NODE::GetContent(PGLOBAL g, char *buf, int len)
*buf = '\0';
if (trace(1))
- htrc("GetContent: %s\n", buf);
+ htrc("GetContent: %-.256s\n", buf);
return rc;
} // end of GetContent
@@ -908,12 +908,12 @@ RCODE XML2NODE::GetContent(PGLOBAL g, char *buf, int len)
bool XML2NODE::SetContent(PGLOBAL g, char *txtp, int len)
{
if (trace(1))
- htrc("SetContent: %s\n", txtp);
+ htrc("SetContent: %-.256s\n", txtp);
xmlChar *buf = xmlEncodeEntitiesReentrant(Docp, BAD_CAST txtp);
if (trace(1))
- htrc("SetContent: %s -> %s\n", txtp, buf);
+ htrc("SetContent: %-.256s -> %-.256s\n", txtp, buf);
xmlNodeSetContent(Nodep, buf);
xmlFree(buf);
@@ -942,7 +942,7 @@ PXNODE XML2NODE::Clone(PGLOBAL g, PXNODE np)
PXLIST XML2NODE::GetChildElements(PGLOBAL g, char *xp, PXLIST lp)
{
if (trace(1))
- htrc("GetChildElements: %s\n", xp);
+ htrc("GetChildElements: %-.256s\n", xp);
return SelectNodes(g, (xp) ? xp : (char*)"*", lp);
} // end of GetChildElements
@@ -953,7 +953,7 @@ PXLIST XML2NODE::GetChildElements(PGLOBAL g, char *xp, PXLIST lp)
PXLIST XML2NODE::SelectNodes(PGLOBAL g, char *xp, PXLIST lp)
{
if (trace(1))
- htrc("SelectNodes: %s\n", xp);
+ htrc("SelectNodes: %-.256s\n", xp);
xmlNodeSetPtr nl = ((PXDOC2)Doc)->GetNodeList(g, Nodep, xp);
@@ -971,7 +971,7 @@ PXLIST XML2NODE::SelectNodes(PGLOBAL g, char *xp, PXLIST lp)
PXNODE XML2NODE::SelectSingleNode(PGLOBAL g, char *xp, PXNODE np)
{
if (trace(1))
- htrc("SelectSingleNode: %s\n", xp);
+ htrc("SelectSingleNode: %-.256s\n", xp);
xmlNodeSetPtr nl = ((PXDOC2)Doc)->GetNodeList(g, Nodep, xp);
@@ -995,7 +995,7 @@ PXATTR XML2NODE::GetAttribute(PGLOBAL g, char *name, PXATTR ap)
xmlAttrPtr atp;
if (trace(1))
- htrc("GetAttribute: %s\n", SVP(name));
+ htrc("GetAttribute: %-.256s\n", SVP(name));
if (name)
atp = xmlHasProp(Nodep, BAD_CAST name);
@@ -1024,7 +1024,7 @@ PXNODE XML2NODE::AddChildNode(PGLOBAL g, PCSZ name, PXNODE np)
char *p, *pn, *pf = NULL, *nmp = PlugDup(g, name);
if (trace(1))
- htrc("AddChildNode: %s\n", name);
+ htrc("AddChildNode: %-.256s\n", name);
// Is a prefix specified
if ((pn = strchr(nmp, ':'))) {
@@ -1075,7 +1075,7 @@ PXNODE XML2NODE::AddChildNode(PGLOBAL g, PCSZ name, PXNODE np)
PXATTR XML2NODE::AddProperty(PGLOBAL g, char *name, PXATTR ap)
{
if (trace(1))
- htrc("AddProperty: %s\n", name);
+ htrc("AddProperty: %-.256s\n", name);
xmlAttrPtr atp = xmlNewProp(Nodep, BAD_CAST name, NULL);
@@ -1098,7 +1098,7 @@ PXATTR XML2NODE::AddProperty(PGLOBAL g, char *name, PXATTR ap)
void XML2NODE::AddText(PGLOBAL g, PCSZ txtp)
{
if (trace(1))
- htrc("AddText: %s\n", txtp);
+ htrc("AddText: %-.256s\n", txtp);
// This is to avoid a blank line when inserting a new line
xmlNodePtr np = xmlGetLastChild(Nodep);
@@ -1158,7 +1158,7 @@ void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp)
err:
if (trace(1))
- htrc("DeleteChild: errmsg=%s\n", xerr->message);
+ htrc("DeleteChild: errmsg=%-.256s\n", xerr->message);
xmlResetError(xerr);
} // end of DeleteChild
@@ -1260,7 +1260,7 @@ RCODE XML2ATTR::GetText(PGLOBAL g, char *buf, int len)
if (strlen((char*)txt) >= (unsigned)len) {
memcpy(buf, txt, len - 1);
buf[len - 1] = 0;
- snprintf(g->Message, sizeof(g->Message), "Truncated %s content", Atrp->name);
+ snprintf(g->Message, sizeof(g->Message), "Truncated %-.256s content", Atrp->name);
rc = RC_INFO;
} else
strcpy(buf, (const char*)txt);
@@ -1270,7 +1270,7 @@ RCODE XML2ATTR::GetText(PGLOBAL g, char *buf, int len)
*buf = '\0';
if (trace(1))
- htrc("GetText: %s\n", buf);
+ htrc("GetText: %-.256s\n", buf);
return rc;
} // end of GetText
@@ -1281,7 +1281,7 @@ RCODE XML2ATTR::GetText(PGLOBAL g, char *buf, int len)
bool XML2ATTR::SetText(PGLOBAL g, char *txtp, int len)
{
if (trace(1))
- htrc("SetText: %s %d\n", txtp, len);
+ htrc("SetText: %-.256s %d\n", txtp, len);
xmlSetProp(Parent, Atrp->name, BAD_CAST txtp);
return false;
diff --git a/storage/connect/maputil.cpp b/storage/connect/maputil.cpp
index a03ac6cb36e..043a37f13d0 100644
--- a/storage/connect/maputil.cpp
+++ b/storage/connect/maputil.cpp
@@ -190,7 +190,7 @@ bool CloseMemMap(void *memory, size_t dwSize)
{
if (memory) {
// All this must be redesigned
- int rc = msync((char*)memory, dwSize, MS_SYNC);
+ int rc __attribute__((unused))= msync((char*)memory, dwSize, MS_SYNC);
return (munmap((char*)memory, dwSize) < 0) ? true : false;
} else
return false;
diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp
index e5ea1ac52ae..e0e69c61183 100644
--- a/storage/connect/myconn.cpp
+++ b/storage/connect/myconn.cpp
@@ -140,7 +140,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
PCSZ fmt;
char *fld, *colname, *chset, v, buf[128], uns[16], zero[16];
int i, n, nf = 0, ncol = sizeof(buftyp) / sizeof(int);
- int len, type, prec, rc, k = 0;
+ int len, type, prec, rc;
bool b;
PQRYRES qrp;
PCOLRES crp;
diff --git a/storage/connect/mysql-test/connect/r/general.result b/storage/connect/mysql-test/connect/r/general.result
index ed2c903145d..ef023b7c8d9 100644
--- a/storage/connect/mysql-test/connect/r/general.result
+++ b/storage/connect/mysql-test/connect/r/general.result
@@ -16,3 +16,17 @@ SELECT * FROM t1;
a
10
DROP TABLE t1;
+#
+# MDEV-23626: CONNECT VIR tables return inconsistent error for UPDATE
+#
+CREATE TABLE numbers
+ENGINE=CONNECT,
+TABLE_TYPE=VIR,
+BLOCK_SIZE=3;
+TRUNCATE TABLE numbers;
+ERROR HY000: Got error 174 'Virtual tables are read only' from CONNECT
+DELETE FROM numbers WHERE n = 1;
+ERROR HY000: Got error 174 'Virtual tables are read only' from CONNECT
+UPDATE numbers SET n = 10 WHERE n = 1;
+ERROR HY000: Got error 174 'Virtual tables are read only' from CONNECT
+DROP TABLE numbers;
diff --git a/storage/connect/mysql-test/connect/r/mysql_index.result b/storage/connect/mysql-test/connect/r/mysql_index.result
index dd1864529ca..e81caf671a4 100644
--- a/storage/connect/mysql-test/connect/r/mysql_index.result
+++ b/storage/connect/mysql-test/connect/r/mysql_index.result
@@ -45,10 +45,9 @@ id msg
SELECT * FROM t2 WHERE id IN (2,4) AND msg = 'Two';
id msg
2 Two
-SELECT * FROM t2 WHERE id > 3;
+SELECT * FROM t2 WHERE id > 4;
id msg
5 Cinq
-4 Four
6 Six
SELECT * FROM t2 WHERE id >= 3;
id msg
@@ -60,10 +59,9 @@ SELECT * FROM t2 WHERE id < 3;
id msg
1 Un
2 Two
-SELECT * FROM t2 WHERE id < 3 OR id > 4;
+SELECT * FROM t2 WHERE id < 2 OR id > 4;
id msg
1 Un
-2 Two
5 Cinq
6 Six
SELECT * FROM t2 WHERE id <= 3;
@@ -173,6 +171,9 @@ matricule nom prenom
5765 FOCH ROBERT
4080 FOCH SERGE
3368 MOGADOR ALAIN
+explain SELECT matricule, nom, prenom FROM t2 WHERE nom IN ('FOCH','MOGADOR');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range NP NP 18 NULL 4 Using where
SELECT matricule, nom, prenom FROM t2 WHERE nom = 'FOCH' OR nom = 'MOGADOR';
matricule nom prenom
1977 FOCH BERNADETTE
@@ -184,252 +185,252 @@ matricule nom prenom
3368 MOGADOR ALAIN
SELECT matricule, nom, prenom FROM t2 WHERE nom < 'ADDAX';
matricule nom prenom
-4552 ABBADIE MONIQUE
+1122 ACACIAS SERGE
+115 ACHILLE JACQUES
+1340 ABBE MICHELE
+1644 ACARDIE BEATE
+2728 ABOUT CATHERINE MARIE
+2945 ABBEVILLE PASCAL
307 ABBAYE ANNICK
+3395 ADAM JEAN CLAUDE
+398 ABREUVOIR JEAN LUC
+4038 ADAM JANICK
+4552 ABBADIE MONIQUE
+6124 ABELIAS DELIA
+6314 ABERDEN EVELYNE
+6399 ABEILLES RENE
6627 ABBAYE GERALD
7961 ABBE KATIA
-1340 ABBE MICHELE
-9270 ABBE SOPHIE
-2945 ABBEVILLE PASCAL
8596 ABEBERRY PATRICK
-6399 ABEILLES RENE
8673 ABEL JEAN PIERRE
-6124 ABELIAS DELIA
-6314 ABERDEN EVELYNE
895 ABORD CHANTAL
-2728 ABOUT CATHERINE MARIE
-398 ABREUVOIR JEAN LUC
-1122 ACACIAS SERGE
-1644 ACARDIE BEATE
-115 ACHILLE JACQUES
-4038 ADAM JANICK
-3395 ADAM JEAN CLAUDE
+9270 ABBE SOPHIE
SELECT matricule, nom, prenom FROM t2 WHERE nom <= 'ABEL';
matricule nom prenom
-4552 ABBADIE MONIQUE
+1340 ABBE MICHELE
+2945 ABBEVILLE PASCAL
307 ABBAYE ANNICK
+4552 ABBADIE MONIQUE
+6399 ABEILLES RENE
6627 ABBAYE GERALD
7961 ABBE KATIA
-1340 ABBE MICHELE
-9270 ABBE SOPHIE
-2945 ABBEVILLE PASCAL
8596 ABEBERRY PATRICK
-6399 ABEILLES RENE
8673 ABEL JEAN PIERRE
+9270 ABBE SOPHIE
SELECT matricule, nom, prenom FROM t2 WHERE nom > 'YVON';
matricule nom prenom
-9742 YZENGREMER MICHEL
-8738 ZILINA JEAN LOUIS
-5357 ZOLA BERNARD
-5441 ZOLA BRIGITTE
1325 ZOLA CHRISTINE
-4859 ZORI CATHERINE
4102 ZOUAVES ALAIN
-SELECT matricule, nom, prenom FROM t2 WHERE nom >= 'YVON';
-matricule nom prenom
-5389 YVON CAROLE
-9742 YZENGREMER MICHEL
-8738 ZILINA JEAN LOUIS
+4859 ZORI CATHERINE
5357 ZOLA BERNARD
5441 ZOLA BRIGITTE
+8738 ZILINA JEAN LOUIS
+9742 YZENGREMER MICHEL
+SELECT matricule, nom, prenom FROM t2 WHERE nom >= 'YVON';
+matricule nom prenom
1325 ZOLA CHRISTINE
-4859 ZORI CATHERINE
4102 ZOUAVES ALAIN
+4859 ZORI CATHERINE
+5357 ZOLA BERNARD
+5389 YVON CAROLE
+5441 ZOLA BRIGITTE
+8738 ZILINA JEAN LOUIS
+9742 YZENGREMER MICHEL
SELECT matricule, nom, prenom FROM t2 WHERE nom <= 'ABEL' OR nom > 'YVON';
matricule nom prenom
-4552 ABBADIE MONIQUE
+1325 ZOLA CHRISTINE
+1340 ABBE MICHELE
+2945 ABBEVILLE PASCAL
307 ABBAYE ANNICK
+4102 ZOUAVES ALAIN
+4552 ABBADIE MONIQUE
+4859 ZORI CATHERINE
+5357 ZOLA BERNARD
+5441 ZOLA BRIGITTE
+6399 ABEILLES RENE
6627 ABBAYE GERALD
7961 ABBE KATIA
-1340 ABBE MICHELE
-9270 ABBE SOPHIE
-2945 ABBEVILLE PASCAL
8596 ABEBERRY PATRICK
-6399 ABEILLES RENE
8673 ABEL JEAN PIERRE
-9742 YZENGREMER MICHEL
8738 ZILINA JEAN LOUIS
-5357 ZOLA BERNARD
-5441 ZOLA BRIGITTE
-1325 ZOLA CHRISTINE
-4859 ZORI CATHERINE
-4102 ZOUAVES ALAIN
+9270 ABBE SOPHIE
+9742 YZENGREMER MICHEL
SELECT matricule, nom, prenom FROM t2 WHERE nom > 'HELEN' AND nom < 'HEROS';
matricule nom prenom
-9096 HELENA PHILIPPE
+1291 HERMITAGE XAVIER
+2085 HEOL GUY PAUL
+2579 HERANDIERE PIERRE
+2673 HENNER LILIANE
3309 HELENE ISABELLE
-8365 HELIOTROPES LISE
+403 HERMITTE PHILIPPE
+4050 HERBILLON FRANCOIS
+4254 HENIN SERGE
4666 HELLEN PIERRE
5781 HELSINKI DANIELLE
-7626 HENIN PHILIPPE
-4254 HENIN SERGE
-2673 HENNER LILIANE
-9716 HENRI JACQUES
-2085 HEOL GUY PAUL
-2579 HERANDIERE PIERRE
+6185 HERMITTE FRANCOIS
7093 HERAULTS DANIEL
-4050 HERBILLON FRANCOIS
+7626 HENIN PHILIPPE
+8365 HELIOTROPES LISE
+9096 HELENA PHILIPPE
9231 HERBILLON MADELEINE
-1291 HERMITAGE XAVIER
-6185 HERMITTE FRANCOIS
-403 HERMITTE PHILIPPE
+9716 HENRI JACQUES
9749 HEROLD ISABELLE
SELECT matricule, nom, prenom FROM t2 WHERE nom BETWEEN 'HELEN' AND 'HEROS';
matricule nom prenom
-6199 HELEN MARTIAL
-9096 HELENA PHILIPPE
+1291 HERMITAGE XAVIER
+2085 HEOL GUY PAUL
+2579 HERANDIERE PIERRE
+2673 HENNER LILIANE
3309 HELENE ISABELLE
-8365 HELIOTROPES LISE
+403 HERMITTE PHILIPPE
+4050 HERBILLON FRANCOIS
+4254 HENIN SERGE
4666 HELLEN PIERRE
5781 HELSINKI DANIELLE
-7626 HENIN PHILIPPE
-4254 HENIN SERGE
-2673 HENNER LILIANE
-9716 HENRI JACQUES
-2085 HEOL GUY PAUL
-2579 HERANDIERE PIERRE
+6185 HERMITTE FRANCOIS
+6199 HELEN MARTIAL
7093 HERAULTS DANIEL
-4050 HERBILLON FRANCOIS
+7626 HENIN PHILIPPE
+8365 HELIOTROPES LISE
+8445 HEROS SYLVIE
+9096 HELENA PHILIPPE
9231 HERBILLON MADELEINE
-1291 HERMITAGE XAVIER
-6185 HERMITTE FRANCOIS
-403 HERMITTE PHILIPPE
+9716 HENRI JACQUES
9749 HEROLD ISABELLE
-8445 HEROS SYLVIE
SELECT matricule, nom, prenom FROM t2 WHERE nom BETWEEN 'HELEN' AND 'HEROS' AND prenom = 'PHILIPPE';
matricule nom prenom
-9096 HELENA PHILIPPE
-7626 HENIN PHILIPPE
403 HERMITTE PHILIPPE
+7626 HENIN PHILIPPE
+9096 HELENA PHILIPPE
SELECT matricule, nom, prenom FROM t2 ORDER BY nom LIMIT 10;
matricule nom prenom
+1340 ABBE MICHELE
+2945 ABBEVILLE PASCAL
+307 ABBAYE ANNICK
4552 ABBADIE MONIQUE
+6399 ABEILLES RENE
6627 ABBAYE GERALD
-307 ABBAYE ANNICK
7961 ABBE KATIA
-1340 ABBE MICHELE
-9270 ABBE SOPHIE
-2945 ABBEVILLE PASCAL
8596 ABEBERRY PATRICK
-6399 ABEILLES RENE
8673 ABEL JEAN PIERRE
+9270 ABBE SOPHIE
SELECT a.nom, a.prenom, b.nom FROM t1 a STRAIGHT_JOIN t2 b ON a.prenom = b.prenom WHERE a.nom = 'FOCH' AND a.nom != b.nom;
nom prenom nom
-FOCH SERGE ACACIAS
-FOCH ROBERT AGRIANT
-FOCH JOCELYNE ALEXIS
+FOCH BERNADETTE BERTIN
+FOCH BERNADETTE BOISSY
+FOCH BERNADETTE HUNTZIGER
+FOCH BERNADETTE LATECOERE
+FOCH BERNADETTE LEGER
+FOCH BERNADETTE MONTJUSTIN
+FOCH BERNADETTE ONZE
+FOCH BERNADETTE PALMAROLE
+FOCH BERNADETTE PLOUHARNEL
FOCH DENIS AMBOISE
-FOCH SERGE ANDALUCIA
-FOCH ROBERT ANNECY
-FOCH SERGE ARCACHON
-FOCH JOCELYNE AUGUSTE
-FOCH JOCELYNE BASSE
-FOCH SERGE BEACH
-FOCH FRANCK BEARN
-FOCH SERGE BELLES
FOCH DENIS BERARD
FOCH DENIS BERIN
-FOCH BERNADETTE BERTIN
FOCH DENIS BILLEHOU
FOCH DENIS BOILEAU
-FOCH BERNADETTE BOISSY
-FOCH ROBERT BONVIN
-FOCH SERGE BOUTON
-FOCH SERGE BREUIL
-FOCH SERGE CARREFOUR
-FOCH JOCELYNE CARRERE
-FOCH JOCELYNE CHAPELLE
-FOCH SERGE CHATEAU
-FOCH ROBERT CHENIER
-FOCH SERGE COLLETTE
FOCH DENIS CONNE
-FOCH SERGE COOLE
FOCH DENIS COULOUBRIER
FOCH DENIS COUTURIER
-FOCH ROBERT CURAT
-FOCH ROBERT DAUDET
-FOCH SERGE ECLUSE
-FOCH SERGE EGUILLON
FOCH DENIS EPINETTES
FOCH DENIS FIGOURNAS
-FOCH JOCELYNE FLEMING
-FOCH JOCELYNE GAMBADES
-FOCH ROBERT GIOTERAIE
-FOCH SERGE GOAS
-FOCH ROBERT GRAFFIANE
-FOCH SERGE GREFFIER
-FOCH ROBERT GUILLOTIERE
-FOCH SERGE HENIN
-FOCH BERNADETTE HUNTZIGER
-FOCH FRANCK ILLIERS
FOCH DENIS ISTANBUL
FOCH DENIS ITALIE
-FOCH SERGE JARDIN
+FOCH DENIS LACATE
+FOCH DENIS MAROLLES
+FOCH DENIS MONTELIER
+FOCH DENIS MONTILS
+FOCH DENIS POINTE
+FOCH DENIS PORTO
+FOCH DENIS REINOTS
+FOCH DENIS REMPART
+FOCH DENIS ROUSSIER
+FOCH DENIS TORTE
+FOCH DENIS TOULON
+FOCH DENIS VALMANTE
+FOCH FRANCK BEARN
+FOCH FRANCK ILLIERS
FOCH FRANCK JEANPIERRE
-FOCH JOCELYNE KENNEDY
FOCH FRANCK LABBE
-FOCH DENIS LACATE
FOCH FRANCK LACOMBE
-FOCH ROBERT LAMOTHE
-FOCH BERNADETTE LATECOERE
-FOCH BERNADETTE LEGER
-FOCH SERGE LEONIE
FOCH FRANCK LEROY
-FOCH SERGE LOZERE
-FOCH DENIS MAROLLES
-FOCH ROBERT MARRONIERS
-FOCH SERGE MARSAT
-FOCH SERGE MONTAGNE
FOCH FRANCK MONTALEIGNE
-FOCH DENIS MONTELIER
-FOCH DENIS MONTILS
-FOCH BERNADETTE MONTJUSTIN
-FOCH SERGE MORIZET
-FOCH ROBERT NIMES
-FOCH ROBERT NORD
-FOCH SERGE NOVEMBRE
-FOCH BERNADETTE ONZE
-FOCH SERGE ORANGERIE
FOCH FRANCK ORVEAU
-FOCH BERNADETTE PALMAROLE
+FOCH FRANCK PURPAN
+FOCH FRANCK ROCQUENCOURT
+FOCH FRANCK RUSSIE
+FOCH JOCELYNE ALEXIS
+FOCH JOCELYNE AUGUSTE
+FOCH JOCELYNE BASSE
+FOCH JOCELYNE CARRERE
+FOCH JOCELYNE CHAPELLE
+FOCH JOCELYNE FLEMING
+FOCH JOCELYNE GAMBADES
+FOCH JOCELYNE KENNEDY
FOCH JOCELYNE PEYBERT
+FOCH JOCELYNE PIED
+FOCH JOCELYNE PONTAROUX
+FOCH ROBERT AGRIANT
+FOCH ROBERT ANNECY
+FOCH ROBERT BONVIN
+FOCH ROBERT CHENIER
+FOCH ROBERT CURAT
+FOCH ROBERT DAUDET
+FOCH ROBERT GIOTERAIE
+FOCH ROBERT GRAFFIANE
+FOCH ROBERT GUILLOTIERE
+FOCH ROBERT LAMOTHE
+FOCH ROBERT MARRONIERS
+FOCH ROBERT NIMES
+FOCH ROBERT NORD
FOCH ROBERT PEYNIBLOU
FOCH ROBERT PIECE
-FOCH JOCELYNE PIED
FOCH ROBERT PLAGNE
-FOCH SERGE PLAISANCE
-FOCH BERNADETTE PLOUHARNEL
-FOCH DENIS POINTE
FOCH ROBERT POMMERY
-FOCH JOCELYNE PONTAROUX
-FOCH DENIS PORTO
FOCH ROBERT PRESIDENT
FOCH ROBERT PUJADE
-FOCH FRANCK PURPAN
FOCH ROBERT QUILICHINI
-FOCH DENIS REINOTS
-FOCH DENIS REMPART
-FOCH SERGE RESISTANCE
-FOCH SERGE RESTANQUES
FOCH ROBERT RIOU
-FOCH FRANCK ROCQUENCOURT
FOCH ROBERT ROLL
FOCH ROBERT ROSSA
-FOCH SERGE ROSSAYS
-FOCH DENIS ROUSSIER
-FOCH FRANCK RUSSIE
FOCH ROBERT SABLONS
-FOCH SERGE SARTRE
-FOCH SERGE SAVIGNAC
-FOCH SERGE SEGUR
FOCH ROBERT STRASBOURG
FOCH ROBERT TIRE
-FOCH DENIS TORTE
-FOCH DENIS TOULON
FOCH ROBERT TUBY
-FOCH DENIS VALMANTE
-FOCH SERGE VANOEL
FOCH ROBERT VIARMES
+FOCH SERGE ACACIAS
+FOCH SERGE ANDALUCIA
+FOCH SERGE ARCACHON
+FOCH SERGE BEACH
+FOCH SERGE BELLES
+FOCH SERGE BOUTON
+FOCH SERGE BREUIL
+FOCH SERGE CARREFOUR
+FOCH SERGE CHATEAU
+FOCH SERGE COLLETTE
+FOCH SERGE COOLE
+FOCH SERGE ECLUSE
+FOCH SERGE EGUILLON
+FOCH SERGE GOAS
+FOCH SERGE GREFFIER
+FOCH SERGE HENIN
+FOCH SERGE JARDIN
+FOCH SERGE LEONIE
+FOCH SERGE LOZERE
+FOCH SERGE MARSAT
+FOCH SERGE MONTAGNE
+FOCH SERGE MORIZET
+FOCH SERGE NOVEMBRE
+FOCH SERGE ORANGERIE
+FOCH SERGE PLAISANCE
+FOCH SERGE RESISTANCE
+FOCH SERGE RESTANQUES
+FOCH SERGE ROSSAYS
+FOCH SERGE SARTRE
+FOCH SERGE SAVIGNAC
+FOCH SERGE SEGUR
+FOCH SERGE VANOEL
FOCH SERGE WILSON
DROP TABLE t2;
DROP TABLE t1;
diff --git a/storage/connect/mysql-test/connect/r/part_file.result b/storage/connect/mysql-test/connect/r/part_file.result
index c679ed95062..3dabd946b50 100644
--- a/storage/connect/mysql-test/connect/r/part_file.result
+++ b/storage/connect/mysql-test/connect/r/part_file.result
@@ -145,14 +145,11 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
SELECT * FROM t1 WHERE id = 10;
rwid rnum prtn tbn fid id msg
1 1 2 t1 part2 10 ten
-EXPLAIN PARTITIONS SELECT * FROM t1 WHERE id >= 10;
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE id >= 40;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 2,3 range PRIMARY PRIMARY 4 NULL 7 Using where
-SELECT * FROM t1 WHERE id >= 10;
+1 SIMPLE t1 2,3 range PRIMARY PRIMARY 4 NULL 4 Using where
+SELECT * FROM t1 WHERE id >= 40;
rwid rnum prtn tbn fid id msg
-1 1 2 t1 part2 10 ten
-3 3 2 t1 part2 20 twenty
-4 4 2 t1 part2 35 thirty five
2 2 2 t1 part2 40 forty
1 1 3 t1 part3 60 sixty
3 3 3 t1 part3 72 seventy two
diff --git a/storage/connect/mysql-test/connect/r/xml2_mult.result b/storage/connect/mysql-test/connect/r/xml2_mult.result
index ac4cdea4e7f..0146baa89c0 100644
--- a/storage/connect/mysql-test/connect/r/xml2_mult.result
+++ b/storage/connect/mysql-test/connect/r/xml2_mult.result
@@ -74,6 +74,8 @@ Warnings:
Warning 1105 Truncated author content
# increase author size
ALTER TABLE bookstore MODIFY `author` VARCHAR(128) NOT NULL;
+Warnings:
+Warning 1105 This is an outward table, table data were not modified.
SELECT * FROM bookstore;
category title lang author year price
COOKING Everyday Italian en Giada De Laurentiis 2005 30.00
diff --git a/storage/connect/mysql-test/connect/r/xml_mult.result b/storage/connect/mysql-test/connect/r/xml_mult.result
index 427adf94313..9cdc36dea6b 100644
--- a/storage/connect/mysql-test/connect/r/xml_mult.result
+++ b/storage/connect/mysql-test/connect/r/xml_mult.result
@@ -72,6 +72,8 @@ Warnings:
Warning 1105 Truncated author content
# increase author size
ALTER TABLE bookstore MODIFY `author` VARCHAR(128) NOT NULL;
+Warnings:
+Warning 1105 This is an outward table, table data were not modified.
SELECT * FROM bookstore;
category title lang author year price
COOKING Everyday Italian en Giada De Laurentiis 2005 30.00
diff --git a/storage/connect/mysql-test/connect/t/general.test b/storage/connect/mysql-test/connect/t/general.test
index 34e5d4c7b6d..e2f228738cf 100644
--- a/storage/connect/mysql-test/connect/t/general.test
+++ b/storage/connect/mysql-test/connect/t/general.test
@@ -14,3 +14,20 @@ SELECT * FROM t1;
ALTER TABLE t1 TABLE_TYPE=NON_EXISTING;
SELECT * FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-23626: CONNECT VIR tables return inconsistent error for UPDATE
+--echo #
+
+CREATE TABLE numbers
+ENGINE=CONNECT,
+TABLE_TYPE=VIR,
+BLOCK_SIZE=3;
+
+--error ER_GET_ERRMSG
+TRUNCATE TABLE numbers;
+--error ER_GET_ERRMSG
+DELETE FROM numbers WHERE n = 1;
+--error ER_GET_ERRMSG
+UPDATE numbers SET n = 10 WHERE n = 1;
+DROP TABLE numbers;
diff --git a/storage/connect/mysql-test/connect/t/mysql_index.test b/storage/connect/mysql-test/connect/t/mysql_index.test
index 81fdcad9330..ebc4965e8e1 100644
--- a/storage/connect/mysql-test/connect/t/mysql_index.test
+++ b/storage/connect/mysql-test/connect/t/mysql_index.test
@@ -49,10 +49,10 @@ SELECT * FROM t2;
SELECT * FROM t2 WHERE id = 3;
SELECT * FROM t2 WHERE id IN (2,4);
SELECT * FROM t2 WHERE id IN (2,4) AND msg = 'Two';
-SELECT * FROM t2 WHERE id > 3;
+SELECT * FROM t2 WHERE id > 4;
SELECT * FROM t2 WHERE id >= 3;
SELECT * FROM t2 WHERE id < 3;
-SELECT * FROM t2 WHERE id < 3 OR id > 4;
+SELECT * FROM t2 WHERE id < 2 OR id > 4;
SELECT * FROM t2 WHERE id <= 3;
SELECT * FROM t2 WHERE id BETWEEN 3 AND 5;
SELECT * FROM t2 WHERE id > 2 AND id < 6;
@@ -111,16 +111,28 @@ CREATE TABLE t2
) ENGINE=CONNECT TABLE_TYPE=MYSQL CONNECTIOn='mysql://root@localhost/test/t1';
SELECT * FROM t2 limit 10;
SELECT matricule, nom, prenom FROM t2 WHERE nom IN ('FOCH','MOGADOR');
+--sorted_result
+explain SELECT matricule, nom, prenom FROM t2 WHERE nom IN ('FOCH','MOGADOR');
SELECT matricule, nom, prenom FROM t2 WHERE nom = 'FOCH' OR nom = 'MOGADOR';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom < 'ADDAX';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom <= 'ABEL';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom > 'YVON';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom >= 'YVON';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom <= 'ABEL' OR nom > 'YVON';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom > 'HELEN' AND nom < 'HEROS';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom BETWEEN 'HELEN' AND 'HEROS';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 WHERE nom BETWEEN 'HELEN' AND 'HEROS' AND prenom = 'PHILIPPE';
+--sorted_result
SELECT matricule, nom, prenom FROM t2 ORDER BY nom LIMIT 10;
+--sorted_result
SELECT a.nom, a.prenom, b.nom FROM t1 a STRAIGHT_JOIN t2 b ON a.prenom = b.prenom WHERE a.nom = 'FOCH' AND a.nom != b.nom;
DROP TABLE t2;
diff --git a/storage/connect/mysql-test/connect/t/part_file.test b/storage/connect/mysql-test/connect/t/part_file.test
index 8ee43a917ec..2e5127f03e5 100644
--- a/storage/connect/mysql-test/connect/t/part_file.test
+++ b/storage/connect/mysql-test/connect/t/part_file.test
@@ -82,8 +82,8 @@ SELECT * FROM t1;
SELECT * FROM t1 order by id;
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE id = 10;
SELECT * FROM t1 WHERE id = 10;
-EXPLAIN PARTITIONS SELECT * FROM t1 WHERE id >= 10;
-SELECT * FROM t1 WHERE id >= 10;
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE id >= 40;
+SELECT * FROM t1 WHERE id >= 40;
SELECT count(*) FROM t1 WHERE id < 10;
SELECT case when id < 10 then 1 when id < 50 then 2 else 3 end as pn, count(*) FROM t1 group by pn;
SELECT prtn, count(*) FROM t1 group by prtn;
diff --git a/storage/connect/myutil.cpp b/storage/connect/myutil.cpp
index 1c73ded5e05..c49db48bfb3 100644
--- a/storage/connect/myutil.cpp
+++ b/storage/connect/myutil.cpp
@@ -66,6 +66,7 @@ int MYSQLtoPLG(char *typname, char *var)
break;
case TPC_SKIP:
*var = 'K';
+ /* falls through */
default: // TPC_NO
type = TYPE_ERROR;
} // endswitch xconv
@@ -236,13 +237,14 @@ int MYSQLtoPLG(int mytype, char *var)
break;
case TPC_SKIP:
*var = 'K'; // Skip
+ /* falls through */
default: // TPC_NO
type = TYPE_ERROR;
} // endswitch xconv
return type;
} // endif var
-
+ /* falls through */
default:
type = TYPE_ERROR;
} // endswitch mytype
diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp
index 9f2a39c0379..c1534eb6c2a 100644
--- a/storage/connect/plgdbutl.cpp
+++ b/storage/connect/plgdbutl.cpp
@@ -430,6 +430,7 @@ char *ExtractFromPath(PGLOBAL g, char *pBuff, char *FileName, OPVAL op)
/* Because this function is only used for catalog name checking, */
/* it must be case insensitive. */
/***********************************************************************/
+#ifdef NOT_USED
static bool PlugCheckPattern(PGLOBAL g, LPCSTR string, LPCSTR pat)
{
if (pat && strlen(pat)) {
@@ -443,6 +444,7 @@ static bool PlugCheckPattern(PGLOBAL g, LPCSTR string, LPCSTR pat)
return true;
} // end of PlugCheckPattern
+#endif
/***********************************************************************/
/* PlugEvalLike: evaluates a LIKE clause. */
diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp
index 8700bc992c4..d131482ef94 100644
--- a/storage/connect/plugutil.cpp
+++ b/storage/connect/plugutil.cpp
@@ -147,7 +147,7 @@ PGLOBAL PlugInit(LPCSTR Language, size_t worksize)
PGLOBAL g;
if (trace(2))
- htrc("PlugInit: Language='%s'\n",
+ htrc("PlugInit: Language='%-.256s'\n",
((!Language) ? "Null" : (char*)Language));
try {
@@ -217,15 +217,15 @@ LPSTR PlugRemoveType(LPSTR pBuff, LPCSTR FileName)
_splitpath(FileName, drive, direc, fname, ftype);
if (trace(2)) {
- htrc("after _splitpath: FileName=%s\n", FileName);
- htrc("drive=%s dir=%s fname=%s ext=%s\n",
+ htrc("after _splitpath: FileName=%-.256s\n", FileName);
+ htrc("drive=%-.256s dir=%-.256s fname=%-.256s ext=%-.256s\n",
SVP(drive), direc, fname, ftype);
} // endif trace
_makepath(pBuff, drive, direc, fname, "");
if (trace(2))
- htrc("buff='%s'\n", pBuff);
+ htrc("buff='%-.256s'\n", pBuff);
return pBuff;
} // end of PlugRemoveType
@@ -257,7 +257,7 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
#endif
if (trace(2))
- htrc("prefix=%s fn=%s path=%s\n", prefix, FileName, defpath);
+ htrc("prefix=%-.256s fn=%-.256s path=%-.256s\n", prefix, FileName, defpath);
if (strlen(FileName) >= _MAX_PATH)
{
@@ -280,7 +280,7 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
if (*FileName == '~') {
if (_fullpath(pBuff, FileName, _MAX_PATH)) {
if (trace(2))
- htrc("pbuff='%s'\n", pBuff);
+ htrc("pbuff='%-.256s'\n", pBuff);
return pBuff;
} else
@@ -315,12 +315,12 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
_splitpath(tmpdir, defdrv, defdir, NULL, NULL);
if (trace(2)) {
- htrc("after _splitpath: FileName=%s\n", FileName);
+ htrc("after _splitpath: FileName=%-.256s\n", FileName);
#if defined(_WIN32)
- htrc("drive=%s dir=%s fname=%s ext=%s\n", drive, direc, fname, ftype);
- htrc("defdrv=%s defdir=%s\n", defdrv, defdir);
+ htrc("drive=%-.256s dir=%-.256s fname=%-.256s ext=%-.256s\n", drive, direc, fname, ftype);
+ htrc("defdrv=%-.256s defdir=%-.256s\n", defdrv, defdir);
#else
- htrc("dir=%s fname=%s ext=%s\n", direc, fname, ftype);
+ htrc("dir=%-.256s fname=%-.256s ext=%-.256s\n", direc, fname, ftype);
#endif
} // endif trace
@@ -342,11 +342,11 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
_makepath(newname, drive, direc, fname, ftype);
if (trace(2))
- htrc("newname='%s'\n", newname);
+ htrc("newname='%-.256s'\n", newname);
if (_fullpath(pBuff, newname, _MAX_PATH)) {
if (trace(2))
- htrc("pbuff='%s'\n", pBuff);
+ htrc("pbuff='%-.256s'\n", pBuff);
return pBuff;
} else
@@ -371,13 +371,13 @@ char *PlugReadMessage(PGLOBAL g, int mid, char *m)
PlugSetPath(msgfile, NULL, buff, msg_path);
if (!(mfile = fopen(msgfile, "rt"))) {
- sprintf(stmsg, "Fail to open message file %s", msgfile);
+ sprintf(stmsg, "Fail to open message file %-.256s", msgfile);
goto err;
} // endif mfile
for (;;)
if (!fgets(buff, 256, mfile)) {
- sprintf(stmsg, "Cannot get message %d %s", mid, SVP(m));
+ sprintf(stmsg, "Cannot get message %d %-.256s", mid, SVP(m));
goto fin;
} else
if (atoi(buff) == mid)
@@ -386,7 +386,7 @@ char *PlugReadMessage(PGLOBAL g, int mid, char *m)
if (sscanf(buff, " %*d %.31s \"%.255[^\"]", msgid, stmsg) < 2) {
// Old message file
if (!sscanf(buff, " %*d \"%.255[^\"]", stmsg)) {
- sprintf(stmsg, "Bad message file for %d %s", mid, SVP(m));
+ sprintf(stmsg, "Bad message file for %d %-.256s", mid, SVP(m));
goto fin;
} else
m = NULL;
@@ -493,7 +493,7 @@ bool AllocSarea(PGLOBAL g, size_t size)
if (g->Sarea) {
htrc("Work area of %zd allocated at %p\n", size, g->Sarea);
} else
- htrc("SareaAlloc: %s\n", g->Message);
+ htrc("SareaAlloc: %-.256s\n", g->Message);
} // endif trace
@@ -575,11 +575,11 @@ void *PlugSubAlloc(PGLOBAL g, void *memp, size_t size)
PCSZ pname = "Work";
snprintf(g->Message, sizeof(g->Message),
- "Not enough memory in %s area for request of %zd (used=%zd free=%zd)",
+ "Not enough memory in %-.256s area for request of %zu (used=%zu free=%zu)",
pname, size, pph->To_Free, pph->FreeBlk);
if (trace(1))
- htrc("PlugSubAlloc: %s\n", g->Message);
+ htrc("PlugSubAlloc: %-.256s\n", g->Message);
DoThrow(1234);
} /* endif size OS32 code */
diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp
index ce3e5696eb7..144d31735d6 100644
--- a/storage/connect/reldef.cpp
+++ b/storage/connect/reldef.cpp
@@ -354,8 +354,6 @@ RECFM TABDEF::GetTableFormat(const char* type)
bool TABDEF::Define(PGLOBAL g, PCATLG cat,
LPCSTR name, LPCSTR schema, LPCSTR am)
{
- int poff = 0;
-
Hc = ((MYCAT*)cat)->GetHandler();
Name = (PSZ)name;
Schema = (PSZ)Hc->GetDBName(schema);
@@ -434,6 +432,7 @@ int TABDEF::GetColCatInfo(PGLOBAL g)
case RECFM_CSV:
case RECFM_FMT:
nlg+= nof;
+ /* falls through */
case RECFM_DIR:
case RECFM_XML:
poff= loff + (pcf->Flags & U_VIRTUAL ? 0 : 1);
@@ -476,6 +475,7 @@ int TABDEF::GetColCatInfo(PGLOBAL g)
switch (trf ) {
case RECFM_VCT:
cdp->SetOffset(0); // Not to have shift
+ /* falls through */
case RECFM_BIN:
// BIN/VEC are packed by default
if (nof) {
diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp
index c721e30ce47..797b988b309 100644
--- a/storage/connect/tabdos.cpp
+++ b/storage/connect/tabdos.cpp
@@ -577,8 +577,6 @@ int TDBDOS::ResetTableOpt(PGLOBAL g, bool dop, bool dox)
MaxSize = -1; // Size must be recalculated
Cardinal = -1; // as well as Cardinality
- PTXF xp = Txfp;
-
To_Filter = NULL; // Disable filtering
//To_BlkIdx = NULL; // and index filtering
To_BlkFil = NULL; // and block filtering
@@ -650,7 +648,7 @@ int TDBDOS::MakeBlockValues(PGLOBAL g)
PDOSDEF defp = (PDOSDEF)To_Def;
PDOSCOL colp = NULL;
PDBUSER dup = PlgGetUser(g);
- PCATLG cat = defp->GetCat();
+ PCATLG cat __attribute__((unused))= defp->GetCat();
//void *memp = cat->GetDescp();
if ((nrec = defp->GetElemt()) < 2) {
@@ -1013,14 +1011,14 @@ bool TDBDOS::GetBlockValues(PGLOBAL g)
{
char filename[_MAX_PATH];
int i, lg, n[NZ];
- int nrec, block = 0, last = 0, allocblk = 0;
+ int nrec, block = 0, last = 0;
int len;
bool newblk = false;
size_t ndv, nbm, nbk, blk;
FILE *opfile;
PCOLDEF cdp;
PDOSDEF defp = (PDOSDEF)To_Def;
- PCATLG cat = defp->GetCat();
+ PCATLG cat __attribute__((unused))= defp->GetCat();
PDBUSER dup = PlgGetUser(g);
#if 0
@@ -1302,7 +1300,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
} // endif blk
- int i, op = filp->GetOpc(), opm = filp->GetOpm(), n = 0;
+ int i, op = filp->GetOpc(), opm = filp->GetOpm();
bool cnv[2];
PCOL colp;
PXOB arg[2] = {NULL,NULL};
@@ -1345,13 +1343,14 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
bfp = new(g) BLKSPCIN(g, this, op, opm, arg, Txfp->Nrec);
} else if (blk && Txfp->Nrec > 1 && colp->IsClustered())
+ {
// Clustered column and constant array
if (colp->GetClustered() == 2)
bfp = new(g) BLKFILIN2(g, this, op, opm, arg);
else
bfp = new(g) BLKFILIN(g, this, op, opm, arg);
-
- } // endif this
+ }
+ } // endif this
#if 0
} else if (filp->GetArgType(0) == TYPE_SCALF &&
@@ -1427,12 +1426,10 @@ PBF TDBDOS::CheckBlockFilari(PGLOBAL g, PXOB *arg, int op, bool *cnv)
//bool conv = false, xdb2 = false, ok = false, b[2];
//PXOB *xarg1, *xarg2 = NULL, xp[2];
int i, n = 0, type[2] = {0,0};
- bool conv = false, xdb2 = false, ok = false;
- PXOB *xarg2 = NULL, xp[2];
+ bool conv = false, xdb2 = false;
+ PXOB xp[2];
PCOL colp;
-//LSTVAL *vlp = NULL;
-//SFROW *sfr[2];
- PBF *fp = NULL, bfp = NULL;
+ PBF bfp = NULL;
for (i = 0; i < 2; i++) {
switch (arg[i]->GetType()) {
@@ -1663,7 +1660,7 @@ int TDBDOS::TestBlock(PGLOBAL g)
int TDBDOS::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
{
int k, n, rc = RC_OK;
- bool fixed, doit, sep, b = (pxdf != NULL);
+ bool fixed, doit, sep;
PCOL *keycols, colp;
PIXDEF xdp, sxp = NULL;
PKPDEF kdp;
@@ -2855,6 +2852,7 @@ bool DOSCOL::SetBitMap(PGLOBAL g)
bool DOSCOL::CheckSorted(PGLOBAL g)
{
if (Sorted)
+ {
if (OldVal) {
// Verify whether this column is sorted all right
if (OldVal->CompareValue(Value) > 0) {
@@ -2867,7 +2865,7 @@ bool DOSCOL::CheckSorted(PGLOBAL g)
} else
OldVal = AllocateValue(g, Value);
-
+ }
return false;
} // end of CheckSorted
diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp
index c408cf60c66..2e222201d1f 100644
--- a/storage/connect/tabext.cpp
+++ b/storage/connect/tabext.cpp
@@ -388,7 +388,6 @@ bool TDBEXT::MakeSQL(PGLOBAL g, bool cnt)
char *catp = NULL, buf[NAM_LEN * 3];
int len;
bool first = true;
- PTABLE tablep = To_Table;
PCOL colp;
if (Srcdef)
@@ -501,6 +500,7 @@ void TDBEXT::RemoveConst(PGLOBAL g, char *stmt)
int n, nc;
while ((p = strstr(stmt, "NAME_CONST")))
+ {
if ((n = sscanf(p, "%*[^,],%1024[^)])%n", val, &nc))) {
if (trace(33))
htrc("p=%s\nn=%d val=%s nc=%d\n", p, n, val, nc);
@@ -524,8 +524,8 @@ void TDBEXT::RemoveConst(PGLOBAL g, char *stmt)
} else
break;
-
- return;
+ }
+ return;
} // end of RemoveConst
/***********************************************************************/
diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp
index 56d3cc05547..6eb28f84bd0 100644
--- a/storage/connect/tabfmt.cpp
+++ b/storage/connect/tabfmt.cpp
@@ -1142,6 +1142,7 @@ int TDBCSV::CheckWrite(PGLOBAL g)
n += (Quoted > 2 ? 2 : 0);
else if (strchr(Field[i], Sep) || (Qot && *Field[i] == Qot)
|| Quoted > 1 || (Quoted == 1 && !Fldtyp[i]))
+ {
if (!Qot) {
snprintf(g->Message, sizeof(g->Message), MSG(SEP_IN_FIELD), i + 1);
return -1;
@@ -1154,7 +1155,7 @@ int TDBCSV::CheckWrite(PGLOBAL g)
n += 2; // Outside quotes
} // endif
-
+ }
if ((nlen += n) > maxlen) {
strcpy(g->Message, MSG(LINE_TOO_LONG));
return -1;
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp
index e3ad2f742d1..67eb5bbede0 100644
--- a/storage/connect/tabjson.cpp
+++ b/storage/connect/tabjson.cpp
@@ -260,14 +260,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetArrayValue(0) : NULL;
} else {
- if (!((tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0)))) {
- if (!mgo && !tdp->Uri) {
- snprintf(g->Message, sizeof(g->Message), "LRECL must be specified for pretty=%d", tdp->Pretty);
- return 0;
+ if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0)))
+ {
+ if (!mgo && !tdp->Uri) {
+ snprintf(g->Message, sizeof(g->Message), "LRECL must be specified for pretty=%d", tdp->Pretty);
+ return 0;
} else
tdp->Lrecl = 8192; // Should be enough
-
- } // endif Lrecl
+ }
tdp->Ending = GetIntegerTableOption(g, topt, "Ending", CRLF);
@@ -1613,6 +1613,7 @@ PSZ JSONCOL::GetJpath(PGLOBAL g, bool proj)
} // endif
for (p1 = p2 = mgopath; *p1; p1++)
+ {
if (i) { // Inside []
if (isdigit(*p1)) {
if (!proj)
@@ -1651,11 +1652,12 @@ PSZ JSONCOL::GetJpath(PGLOBAL g, bool proj)
Sgfy = true;
break;
} // endif p2
-
+ /* falls through */
default:
*p2++ = *p1;
break;
} // endswitch p1;
+ }
if (*(p2 - 1) == '.')
p2--;
@@ -2444,16 +2446,15 @@ int TDBJSON::Cardinality(PGLOBAL g)
{
if (!g)
return (Xcol || Multiple) ? 0 : 1;
- else if (Cardinal < 0) {
- if (!Multiple) {
- if (MakeDocument(g) == RC_OK)
- Cardinal = Doc->size();
-
- } else
- return 10;
-
- } // endif Cardinal
+ else if (Cardinal < 0)
+ {
+ if (!Multiple) {
+ if (MakeDocument(g) == RC_OK)
+ Cardinal = Doc->size();
+ } else
+ return 10;
+ }
return Cardinal;
} // end of Cardinality
diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp
index f3a8cf57bfc..fe68e12bc77 100644
--- a/storage/connect/tabmul.cpp
+++ b/storage/connect/tabmul.cpp
@@ -671,8 +671,8 @@ TDBDIR::TDBDIR(PSZ fpat) : TDBASE((PTABDEF)NULL)
/***********************************************************************/
char* TDBDIR::Path(PGLOBAL g)
{
- PCATLG cat = PlgGetCatalog(g);
- PTABDEF defp = (PTABDEF)To_Def;
+ PCATLG cat __attribute__((unused))= PlgGetCatalog(g);
+ PTABDEF defp = (PTABDEF)To_Def;
#if defined(_WIN32)
if (!*Drive) {
@@ -708,8 +708,9 @@ PCOL TDBDIR::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
int TDBDIR::GetMaxSize(PGLOBAL g)
{
if (MaxSize < 0) {
- int rc, n = -1;
+ int n = -1;
#if defined(_WIN32)
+ int rc;
// Start searching files in the target directory.
hSearch = FindFirstFile(Path(g), &FileData);
@@ -1041,12 +1042,13 @@ int TDBSDR::GetMaxSize(PGLOBAL g)
/***********************************************************************/
int TDBSDR::FindInDir(PGLOBAL g)
{
- int rc, n = 0;
+ int n = 0;
size_t m = strlen(Direc);
// Start searching files in the target directory.
#if defined(_WIN32)
HANDLE h;
+ int rc;
#if defined(PATHMATCHSPEC)
if (!*Drive)
diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp
index 9331e0e6faf..26381e347ae 100644
--- a/storage/connect/tabmysql.cpp
+++ b/storage/connect/tabmysql.cpp
@@ -1258,7 +1258,7 @@ MYSQLCOL::MYSQLCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PCSZ am)
MYSQLCOL::MYSQLCOL(MYSQL_FIELD *fld, PTDB tdbp, int i, PCSZ am)
: COLBLK(NULL, tdbp, i)
{
- const char *chset = get_charset_name(fld->charsetnr);
+//const char *chset = get_charset_name(fld->charsetnr);
//char v = (!strcmp(chset, "binary")) ? 'B' : 0;
char v = 0;
@@ -1399,6 +1399,7 @@ void MYSQLCOL::ReadColumn(PGLOBAL g)
/* If physical fetching of the line was deferred, do it now. */
/*********************************************************************/
if (!tdbp->Fetched)
+ {
if ((rc = tdbp->Myc.Fetch(g, tdbp->N)) != RC_OK) {
if (rc == RC_EF)
snprintf(g->Message, sizeof(g->Message), MSG(INV_DEF_READ), rc);
@@ -1406,7 +1407,7 @@ void MYSQLCOL::ReadColumn(PGLOBAL g)
throw 11;
} else
tdbp->Fetched = true;
-
+ }
if ((buf = ((PTDBMY)To_Tdb)->Myc.GetCharField(Rank))) {
if (trace(2))
htrc("MySQL ReadColumn: name=%s buf=%s\n", Name, buf);
diff --git a/storage/connect/taboccur.cpp b/storage/connect/taboccur.cpp
index 2a41f1747a2..fe5e6c44fbd 100644
--- a/storage/connect/taboccur.cpp
+++ b/storage/connect/taboccur.cpp
@@ -204,7 +204,7 @@ bool OcrSrcCols(PGLOBAL g, PQRYRES qrp, const char *col,
/**********************************************************************/
/* Replace the columns of the colist by the rank and occur columns. */
/**********************************************************************/
- for (i = 0, pcrp = &qrp->Colresp; crp = *pcrp; ) {
+ for (i = 0, pcrp = &qrp->Colresp; (crp = *pcrp); ) {
for (k = 0, pn = colist; k < m; k++, pn += (strlen(pn) + 1))
if (!stricmp(pn, crp->Name))
break;
@@ -452,8 +452,8 @@ bool TDBOCCUR::OpenDB(PGLOBAL g)
N = M = 0;
RowFlag = 0;
- if (Xcolp)
- Xcolp->Xreset();
+ if (Xcolp)
+ Xcolp->Xreset();
return Tdbp->OpenDB(g);
} // endif use
diff --git a/storage/connect/tabpivot.cpp b/storage/connect/tabpivot.cpp
index 5d1d4d2f05b..d700cff0e41 100644
--- a/storage/connect/tabpivot.cpp
+++ b/storage/connect/tabpivot.cpp
@@ -187,7 +187,7 @@ PQRYRES PIVAID::MakePivotColumns(PGLOBAL g)
} // endif picol
// Prepare the column list
- for (pcrp = &Qryp->Colresp; crp = *pcrp; )
+ for (pcrp = &Qryp->Colresp; (crp = *pcrp); )
if (SkipColumn(crp, skc)) {
// Ignore this column
*pcrp = crp->Next;
@@ -340,7 +340,7 @@ int PIVAID::Qcompare(int *i1, int *i2)
bool PIVOTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
{
char *p1, *p2;
- PHC hc = ((MYCAT*)Cat)->GetHandler();
+ PHC hc __attribute__((unused))= ((MYCAT*)Cat)->GetHandler();
if (PRXDEF::DefineAM(g, am, poff))
return TRUE;
@@ -748,7 +748,9 @@ int TDBPIVOT::ReadDB(PGLOBAL g)
colp->ReadColumn(g);
for (colp = Columns; colp; colp = colp->GetNext())
+ {
if (colp->GetAmType() == TYPE_AM_SRC)
+ {
if (FileStatus) {
if (((PSRCCOL)colp)->CompareLast()) {
newrow = (RowFlag) ? TRUE : FALSE;
@@ -757,7 +759,8 @@ int TDBPIVOT::ReadDB(PGLOBAL g)
} else
((PSRCCOL)colp)->SetColumn();
-
+ }
+ }
FileStatus = 1;
} // endif RowFlag
diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp
index 6727c457d4a..d8885b7f49d 100644
--- a/storage/connect/tabutil.cpp
+++ b/storage/connect/tabutil.cpp
@@ -708,7 +708,7 @@ bool PRXCOL::Init(PGLOBAL g, PTDB tp)
MODE mode = To_Tdb->GetMode();
// Needed for MYSQL subtables
- ((XCOLBLK*)Colp)->Name = Decode(g, Colp->GetName());
+ ((COLBLK*)Colp)->SetName(Decode(g, Colp->GetName()));
// May not have been done elsewhere
Colp->InitValue(g);
diff --git a/storage/connect/tabxcl.cpp b/storage/connect/tabxcl.cpp
index 87fa799d87e..5b1cf57cebb 100644
--- a/storage/connect/tabxcl.cpp
+++ b/storage/connect/tabxcl.cpp
@@ -274,7 +274,8 @@ void XCLCOL::ReadColumn(PGLOBAL g)
PSZ p;
// Trim left
- for (p = Cp; *p == ' '; p++) ;
+ for (p = Cp; *p == ' '; p++)
+ ;
if ((Cp = strchr(Cp, Sep)))
// Separator is found
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp
index b66e6b62ac8..6bc3209da59 100644
--- a/storage/connect/tabxml.cpp
+++ b/storage/connect/tabxml.cpp
@@ -228,8 +228,10 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
while (true) {
if (!vp->atp &&
- !(node = (vp->nl) ? vp->nl->GetItem(g, vp->k++, tdp->Usedom ? node : NULL)
- : NULL))
+ !(node = (vp->nl) ? vp->nl->GetItem(g, vp->k++, tdp->Usedom ?
+ node : NULL)
+ : NULL))
+ {
if (j) {
vp = lvlp[--j];
@@ -244,7 +246,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
continue;
} else
break;
-
+ }
xcol->Name[vp->n] = 0;
fmt[vp->m] = 0;
@@ -258,6 +260,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
switch (vp->atp->GetText(g, buf, sizeof(buf))) {
case RC_INFO:
PushWarning(g, txmp);
+ /* falls through */
case RC_OK:
strncat(fmt, "@", XLEN(fmt));
break;
@@ -318,6 +321,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
switch (node->GetContent(g, buf, sizeof(buf))) {
case RC_INFO:
PushWarning(g, txmp);
+ /* falls through */
case RC_OK:
xcol->Cbn = !strlen(buf);
break;
@@ -1284,6 +1288,7 @@ int TDBXML::ReadDB(PGLOBAL g)
bool TDBXML::CheckRow(PGLOBAL g, bool b)
{
if (NewRow && Mode == MODE_INSERT)
+ {
if (Rowname) {
TabNode->AddText(g, "\n\t");
RowNode = TabNode->AddChildNode(g, Rowname, RowNode);
@@ -1291,6 +1296,7 @@ bool TDBXML::CheckRow(PGLOBAL g, bool b)
strcpy(g->Message, MSG(NO_ROW_NODE));
return true;
} // endif Rowname
+ }
if (Colname && (NewRow || b))
Clist = RowNode->SelectNodes(g, Colname, Clist);
@@ -1542,11 +1548,13 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode)
// Analyze the Xpath for this column
for (i = 0, p = pbuf; (p2 = strchr(p, '/')); i++, p = p2 + 1) {
if (Tdbp->Mulnode && !strncmp(p, Tdbp->Mulnode, p2 - p))
+ {
if (!Tdbp->Xpand && mode) {
strcpy(g->Message, MSG(CONCAT_SUBNODE));
return true;
} else
Inod = i; // Index of multiple node
+ }
if (mode) {
// For Update or Insert the Xpath must be explicit
@@ -1793,10 +1801,12 @@ void XMLCOL::WriteColumn(PGLOBAL g)
break;
if (ColNode)
+ {
if (Type)
ValNode = ColNode->SelectSingleNode(g, Xname, Vxnp);
else
AttNode = ColNode->GetAttribute(g, Xname, Vxap);
+ }
if (TopNode || ValNode || AttNode)
break; // We found the good column
@@ -1813,6 +1823,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
/*********************************************************************/
if (ColNode == NULL) {
if (TopNode == NULL)
+ {
if (Tdbp->Clist) {
Tdbp->RowNode->AddText(g, "\n\t\t");
ColNode = Tdbp->RowNode->AddChildNode(g, Tdbp->Colname);
@@ -1820,7 +1831,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
TopNode = ColNode;
} else
TopNode = Tdbp->RowNode;
-
+ }
for (; k < Nod && TopNode; k++) {
if (!done) {
TopNode->AddText(g, "\n\t\t");
@@ -2035,6 +2046,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
} // endfor k
if (ColNode)
+ {
if (Inod == Nod) {
/***************************************************************/
/* The node value can be multiple. */
@@ -2052,11 +2064,13 @@ void XMULCOL::WriteColumn(PGLOBAL g)
ValNode = Nlx->GetItem(g, Tdbp->Nsub, Vxnp);
} else // Inod != Nod
+ {
if (Type)
ValNode = ColNode->SelectSingleNode(g, Xname, Vxnp);
else
AttNode = ColNode->GetAttribute(g, Xname, Vxap);
-
+ }
+ }
if (TopNode || ValNode || AttNode)
break; // We found the good column
else if (Tdbp->Clist)
@@ -2069,6 +2083,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
/*********************************************************************/
if (ColNode == NULL) {
if (TopNode == NULL)
+ {
if (Tdbp->Clist) {
Tdbp->RowNode->AddText(g, "\n\t\t");
ColNode = Tdbp->RowNode->AddChildNode(g, Tdbp->Colname);
@@ -2076,6 +2091,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
TopNode = ColNode;
} else
TopNode = Tdbp->RowNode;
+ }
for (; k < Nod && TopNode; k++) {
if (!done) {
diff --git a/storage/connect/user_connect.h b/storage/connect/user_connect.h
index 2670c5bcebc..53064e620f2 100644
--- a/storage/connect/user_connect.h
+++ b/storage/connect/user_connect.h
@@ -35,7 +35,7 @@
//typedef struct _global *PGLOBAL;
typedef class user_connect *PCONNECT;
typedef class ha_connect *PHC;
-static int connect_done_func(void *);
+int connect_done_func(void *);
/*****************************************************************************/
/* The CONNECT users. There should be one by connected users. */
diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp
index 95327b5d30f..7d7da5b6252 100644
--- a/storage/connect/valblk.cpp
+++ b/storage/connect/valblk.cpp
@@ -1130,7 +1130,7 @@ void STRBLK::SetValues(PVBLK pv, int k, int n)
CheckType(pv)
PSZ *sp = ((STRBLK*)pv)->Strp;
- for (register int i = k; i < n; i++)
+ for (int i = k; i < n; i++)
Strp[i] = (!pv->IsNull(i)) ? sp[i] : NULL;
} // end of SetValues
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp
index cc68c8694c7..9586f834b8f 100644
--- a/storage/connect/value.cpp
+++ b/storage/connect/value.cpp
@@ -2614,12 +2614,13 @@ bool DTVAL::MakeDate(PGLOBAL g, int *val, int nval)
// Pass g to have an error return or NULL to set invalid dates to 0
if (MakeTime(&datm))
+ {
if (g) {
strcpy(g->Message, MSG(BAD_DATETIME));
rc = true;
} else
Tval = 0;
-
+ }
return rc;
} // end of MakeDate
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index 9892bf889ce..cef4d8a47b3 100644
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -559,12 +559,14 @@ bool XINDEX::Make(PGLOBAL g, PIXDEF sxp)
// Check whether the unique index is unique indeed
if (!Mul)
+ {
if (Ndif < Num_K) {
strcpy(g->Message, MSG(INDEX_NOT_UNIQ));
brc = true;
goto err;
} else
PlgDBfree(Offset); // Not used anymore
+ }
// Restore kcp list
To_LastCol->Next = addcolp;
@@ -1209,7 +1211,7 @@ bool XINDEX::MapInit(PGLOBAL g)
PCOL colp;
PXCOL prev = NULL, kcp = NULL;
PDOSDEF defp = (PDOSDEF)Tdbp->To_Def;
- PDBUSER dup = PlgGetUser(g);
+ PDBUSER dup __attribute__((unused))= PlgGetUser(g);
/*********************************************************************/
/* Get the estimated table size. */
@@ -2043,11 +2045,12 @@ int XINDXS::Range(PGLOBAL g, int limit, bool incl)
k = FastFind();
if (k < Num_K || Op != OP_EQ)
+ {
if (limit)
n = (Mul) ? k : kp->Val_K;
else
n = (Mul) ? Pof[kp->Val_K + 1] - k : 1;
-
+ }
} else {
strcpy(g->Message, MSG(RANGE_NO_JOIN));
n = -1; // Logical error
diff --git a/storage/connect/zip.c b/storage/connect/zip.c
index 4bbe31ab7dd..52d63e108e7 100644
--- a/storage/connect/zip.c
+++ b/storage/connect/zip.c
@@ -28,6 +28,7 @@
#include <time.h>
#include "zlib.h"
#include "zip.h"
+#include "my_attribute.h"
#ifdef STDC
# include <stddef.h>
@@ -518,16 +519,16 @@ local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
break;
- for (i=(int)uReadSize-3; (i--)>0;)
+ for (i=(int)uReadSize-3; (i--)>0;) {
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
{
uPosFound = uReadPos+i;
break;
}
-
- if (uPosFound!=0)
- break;
+ }
+ if (uPosFound!=0)
+ break;
}
TRYFREE(buf);
return uPosFound;
@@ -1057,7 +1058,7 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename,
const void* extrafield_global, uInt size_extrafield_global,
const char* comment, int method, int level, int raw,
int windowBits,int memLevel, int strategy,
- const char* password, uLong crcForCrypting,
+ const char* password, uLong crcForCrypting __attribute__((unused)),
uLong versionMadeBy, uLong flagBase, int zip64)
{
zip64_internal* zi;
@@ -1066,11 +1067,10 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename,
uInt i;
int err = ZIP_OK;
-# ifdef NOCRYPT
- (crcForCrypting);
+#ifdef NOCRYPT
if (password != NULL)
return ZIP_PARAMERROR;
-# endif
+#endif
if (file == NULL)
return ZIP_PARAMERROR;
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 86b9d853424..6e7ee48d2eb 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -1003,7 +1003,7 @@ int ha_tina::close(void)
of the file and appends the data. In an error case it really should
just truncate to the original position (this is not done yet).
*/
-int ha_tina::write_row(uchar * buf)
+int ha_tina::write_row(const uchar * buf)
{
int size;
DBUG_ENTER("ha_tina::write_row");
@@ -1310,12 +1310,28 @@ int ha_tina::info(uint flag)
int ha_tina::extra(enum ha_extra_function operation)
{
DBUG_ENTER("ha_tina::extra");
- if (operation == HA_EXTRA_MARK_AS_LOG_TABLE)
- {
- mysql_mutex_lock(&share->mutex);
- share->is_log_table= TRUE;
- mysql_mutex_unlock(&share->mutex);
- }
+ switch (operation) {
+ case HA_EXTRA_MARK_AS_LOG_TABLE:
+ {
+ mysql_mutex_lock(&share->mutex);
+ share->is_log_table= TRUE;
+ mysql_mutex_unlock(&share->mutex);
+ }
+ break;
+ case HA_EXTRA_FLUSH:
+ mysql_mutex_lock(&share->mutex);
+ if (share->tina_write_opened)
+ {
+ (void)write_meta_file(share->meta_file, share->rows_recorded,
+ share->crashed ? TRUE :FALSE);
+ mysql_file_close(share->tina_write_filedes, MYF(0));
+ share->tina_write_opened= FALSE;
+ }
+ mysql_mutex_unlock(&share->mutex);
+ break;
+ default:
+ break;
+ }
DBUG_RETURN(0);
}
@@ -1384,7 +1400,7 @@ int ha_tina::rnd_end()
if (mysql_file_write(update_temp_file,
(uchar*) (file_buff->ptr() +
(write_begin - file_buff->start())),
- (size_t)write_length, MYF_RW))
+ (size_t)write_length, MYF(MY_WME+MY_NABP)))
goto error;
temp_file_length+= write_length;
}
@@ -1570,7 +1586,7 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
write_end= MY_MIN(file_buff->end(), current_position);
if ((write_end - write_begin) &&
(mysql_file_write(repair_file, (uchar*)file_buff->ptr(),
- (size_t) (write_end - write_begin), MYF_RW)))
+ (size_t) (write_end - write_begin), MYF(MY_WME+MY_NABP))))
DBUG_RETURN(-1);
write_begin= write_end;
diff --git a/storage/csv/ha_tina.h b/storage/csv/ha_tina.h
index da3a1b9ffe8..aae535c271e 100644
--- a/storage/csv/ha_tina.h
+++ b/storage/csv/ha_tina.h
@@ -107,7 +107,7 @@ public:
{
return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_NO_AUTO_INCREMENT |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_CAN_EXPORT |
- HA_CAN_REPAIR);
+ HA_CAN_REPAIR | HA_SLOW_RND_POS);
}
ulong index_flags(uint idx, uint part, bool all_parts) const
{
@@ -136,7 +136,7 @@ public:
int open(const char *name, int mode, uint open_options);
int close(void);
- int write_row(uchar * buf);
+ int write_row(const uchar * buf);
int update_row(const uchar * old_data, const uchar * new_data);
int delete_row(const uchar * buf);
int rnd_init(bool scan=1);
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index 8785281c242..fd7df7ee06f 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -398,7 +398,7 @@ int ha_example::close(void)
sql_insert.cc, sql_select.cc, sql_table.cc, sql_udf.cc and sql_update.cc
*/
-int ha_example::write_row(uchar *buf)
+int ha_example::write_row(const uchar *buf)
{
DBUG_ENTER("ha_example::write_row");
/*
diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h
index 52fb4ff3c1b..0a08e871461 100644
--- a/storage/example/ha_example.h
+++ b/storage/example/ha_example.h
@@ -180,7 +180,7 @@ public:
We implement this in ha_example.cc. It's not an obligatory method;
skip it and and MySQL will treat it as not implemented.
*/
- int write_row(uchar *buf);
+ int write_row(const uchar *buf);
/** @brief
We implement this in ha_example.cc. It's not an obligatory method;
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 0190ad80fca..00407730c31 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -1824,7 +1824,7 @@ bool ha_federated::append_stmt_insert(String *query)
sql_insert.cc, sql_select.cc, sql_table.cc, sql_udf.cc, and sql_update.cc.
*/
-int ha_federated::write_row(uchar *buf)
+int ha_federated::write_row(const uchar *buf)
{
char values_buffer[FEDERATED_QUERY_BUFFER_SIZE];
char insert_field_value_buffer[STRING_BUFFER_USUAL_SIZE];
diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h
index 0b34d66baa9..8d6c28556c4 100644
--- a/storage/federated/ha_federated.h
+++ b/storage/federated/ha_federated.h
@@ -146,6 +146,7 @@ public:
HA_NO_PREFIX_CHAR_KEYS | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
HA_NO_TRANSACTIONS /* until fixed by WL#2952 */ |
HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY |
+ HA_CAN_ONLINE_BACKUPS | HA_NON_COMPARABLE_ROWID |
HA_CAN_REPAIR);
}
/*
@@ -208,7 +209,7 @@ public:
void start_bulk_insert(ha_rows rows, uint flags);
int end_bulk_insert();
- int write_row(uchar *buf);
+ int write_row(const uchar *buf);
int update_row(const uchar *old_data, const uchar *new_data);
int delete_row(const uchar *buf);
int index_init(uint keynr, bool sorted);
@@ -237,6 +238,19 @@ public:
int rnd_next_int(uchar *buf);
int rnd_pos(uchar *buf, uchar *pos); //required
void position(const uchar *record); //required
+ /*
+ A ref is a pointer inside a local buffer. It is not comparable to
+ other ref's. This is never called as HA_NON_COMPARABLE_ROWID is set.
+ */
+ int cmp_ref(const uchar *ref1, const uchar *ref2)
+ {
+#ifdef NOT_YET
+ DBUG_ASSERT(0);
+ return 0;
+#else
+ return handler::cmp_ref(ref1,ref2); /* Works if table scan is used */
+#endif
+ }
int info(uint); //required
int extra(ha_extra_function operation);
diff --git a/storage/federatedx/TODO b/storage/federatedx/TODO
deleted file mode 100644
index 71330742f4e..00000000000
--- a/storage/federatedx/TODO
+++ /dev/null
@@ -1,30 +0,0 @@
-Features
-
-* Add Pushdown conditions
-* Add other network driver interfaces
-* Handle large result sets
-* Auto-discovery of tables on foreign data sources
-
-Bugs (http://bugs.mysql.com)
-
-20026 2006-05-23 FEDERATED lacks support for auto_increment_increment and auto_increment_offset
-20724 2006-06-27 FEDERATED does not honour SET INSERT_ID
-28269 2007-05-06 Any FEDERATED engine fails to quote reserved words for field names
-25509 2007-01-10 Federated: Failure with non-ASCII characters
-26697 2007-02-27 Every query to a federated table results in a full scan of MyISAM table.
-21360 2006-07-31 Microsoft Windows (Windows/Linux) mysqldump error on federated tables
-34189 2008-01-31 Any ALTER TABLE t1 ENGINE=FEDERATED CONNECTION='connectionString' on MyISAM fails
-31757 2007-10-22 Any Federated tables break replication Antony Curtis
-33953 2008-01-21 Any mysqld dies on search federated table using nullable index with < or <= operator
-34015 2008-01-23 Linux Problems with float fields using federated tables
-21583 2006-08-11 Linux (Linux) Federated table returns broken strings.
-33702 2008-01-05 Accessing a federated table with a non existing server returns random error code
-25512 2007-01-10 Federated: CREATE failures
-32426 2007-11-16 Any FEDERATED query returns corrupt results for ORDER BY on a TEXT field
-25510 2007-01-10 Federated: double trigger activation
-33250 2007-12-14 SELECT * FROM really_big_federated_table eats lots of virtual memory (OOM)
-14874 2005-11-11 Error 2013: Lost connection to MySQL server with Federated table
-25508 2007-01-10 Federated: Failure to Remove Partitioning
-27180 2007-03-15 #1030 - Got error 1 from storage engine with big tables
-33947 2008-01-20 Any Join on Federated tables with Unique index and IS NOT NULL crashes server
-30051 (fixed) CREATE TABLE does not connect and check existence of remote table
diff --git a/storage/federatedx/federatedx_pushdown.cc b/storage/federatedx/federatedx_pushdown.cc
new file mode 100644
index 00000000000..15b0b0d3d4e
--- /dev/null
+++ b/storage/federatedx/federatedx_pushdown.cc
@@ -0,0 +1,304 @@
+/*
+ Copyright (c) 2019 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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-1301 USA */
+
+/* !!! For inclusion into ha_federatedx.cc */
+
+
+/*
+ This is a quick a dirty implemention of the derived_handler and select_handler
+ interfaces to be used to push select queries and the queries specifying
+ derived tables into FEDERATEDX engine.
+ The functions
+ create_federatedx_derived_handler and
+ create_federatedx_select_handler
+ that return the corresponding interfaces for pushdown capabilities do
+ not check a lot of things. In particular they do not check that the tables
+ of the pushed queries belong to the same foreign server.
+
+ The implementation is provided purely for testing purposes.
+ The pushdown capabilities are enabled by turning on the plugin system
+ variable federated_pushdown:
+ set global federated_pushdown=1;
+*/
+
+
+static derived_handler*
+create_federatedx_derived_handler(THD* thd, TABLE_LIST *derived)
+{
+ if (!use_pushdown)
+ return 0;
+
+ ha_federatedx_derived_handler* handler = NULL;
+ handlerton *ht= 0;
+
+ SELECT_LEX_UNIT *unit= derived->derived;
+
+ for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select())
+ {
+ if (!(sl->join))
+ return 0;
+ for (TABLE_LIST *tbl= sl->join->tables_list; tbl; tbl= tbl->next_local)
+ {
+ if (!tbl->table)
+ return 0;
+ if (!ht)
+ ht= tbl->table->file->partition_ht();
+ else if (ht != tbl->table->file->partition_ht())
+ return 0;
+ }
+ }
+
+ handler= new ha_federatedx_derived_handler(thd, derived);
+
+ return handler;
+}
+
+
+/*
+ Implementation class of the derived_handler interface for FEDERATEDX:
+ class implementation
+*/
+
+ha_federatedx_derived_handler::ha_federatedx_derived_handler(THD *thd,
+ TABLE_LIST *dt)
+ : derived_handler(thd, federatedx_hton),
+ share(NULL), txn(NULL), iop(NULL), stored_result(NULL)
+{
+ derived= dt;
+}
+
+ha_federatedx_derived_handler::~ha_federatedx_derived_handler() {}
+
+int ha_federatedx_derived_handler::init_scan()
+{
+ THD *thd;
+ int rc= 0;
+
+ DBUG_ENTER("ha_federatedx_derived_handler::init_scan");
+
+ TABLE *table= derived->get_first_table()->table;
+ ha_federatedx *h= (ha_federatedx *) table->file;
+ iop= &h->io;
+ share= get_share(table->s->table_name.str, table);
+ thd= table->in_use;
+ txn= h->get_txn(thd);
+ if ((rc= txn->acquire(share, thd, TRUE, iop)))
+ DBUG_RETURN(rc);
+
+ if ((*iop)->query(derived->derived_spec.str, derived->derived_spec.length))
+ goto err;
+
+ stored_result= (*iop)->store_result();
+ if (!stored_result)
+ goto err;
+
+ DBUG_RETURN(0);
+
+err:
+ DBUG_RETURN(HA_FEDERATEDX_ERROR_WITH_REMOTE_SYSTEM);
+}
+
+int ha_federatedx_derived_handler::next_row()
+{
+ int rc;
+ FEDERATEDX_IO_ROW *row;
+ ulong *lengths;
+ Field **field;
+ int column= 0;
+ Time_zone *saved_time_zone= table->in_use->variables.time_zone;
+ DBUG_ENTER("ha_federatedx_derived_handler::next_row");
+
+ if ((rc= txn->acquire(share, table->in_use, TRUE, iop)))
+ DBUG_RETURN(rc);
+
+ if (!(row= (*iop)->fetch_row(stored_result)))
+ DBUG_RETURN(HA_ERR_END_OF_FILE);
+
+ /* Convert row to internal format */
+ table->in_use->variables.time_zone= UTC;
+ lengths= (*iop)->fetch_lengths(stored_result);
+
+ for (field= table->field; *field; field++, column++)
+ {
+ if ((*iop)->is_column_null(row, column))
+ (*field)->set_null();
+ else
+ {
+ (*field)->set_notnull();
+ (*field)->store((*iop)->get_column_data(row, column),
+ lengths[column], &my_charset_bin);
+ }
+ }
+ table->in_use->variables.time_zone= saved_time_zone;
+
+ DBUG_RETURN(rc);
+}
+
+int ha_federatedx_derived_handler::end_scan()
+{
+ DBUG_ENTER("ha_federatedx_derived_handler::end_scan");
+
+ (*iop)->free_result(stored_result);
+
+ free_share(txn, share);
+
+ DBUG_RETURN(0);
+}
+
+void ha_federatedx_derived_handler::print_error(int, unsigned long)
+{
+}
+
+
+static select_handler*
+create_federatedx_select_handler(THD* thd, SELECT_LEX *sel)
+{
+ if (!use_pushdown)
+ return 0;
+
+ ha_federatedx_select_handler* handler = NULL;
+ handlerton *ht= 0;
+
+ for (TABLE_LIST *tbl= thd->lex->query_tables; tbl; tbl= tbl->next_global)
+ {
+ if (!tbl->table)
+ return 0;
+ if (!ht)
+ ht= tbl->table->file->partition_ht();
+ else if (ht != tbl->table->file->partition_ht())
+ return 0;
+ }
+
+ /*
+ Currently, ha_federatedx_select_handler::init_scan just takes the
+ thd->query and sends it to the backend.
+ This obviously won't work if the SELECT uses an "INTO @var" or
+ "INTO OUTFILE". It is also unlikely to work if the select has some
+ other kind of side effect.
+ */
+ if (sel->uncacheable & UNCACHEABLE_SIDEEFFECT)
+ return NULL;
+
+ handler= new ha_federatedx_select_handler(thd, sel);
+
+ return handler;
+}
+
+/*
+ Implementation class of the select_handler interface for FEDERATEDX:
+ class implementation
+*/
+
+ha_federatedx_select_handler::ha_federatedx_select_handler(THD *thd,
+ SELECT_LEX *sel)
+ : select_handler(thd, federatedx_hton),
+ share(NULL), txn(NULL), iop(NULL), stored_result(NULL)
+{
+ select= sel;
+}
+
+ha_federatedx_select_handler::~ha_federatedx_select_handler() {}
+
+int ha_federatedx_select_handler::init_scan()
+{
+ int rc= 0;
+
+ DBUG_ENTER("ha_federatedx_select_handler::init_scan");
+
+ TABLE *table= 0;
+ for (TABLE_LIST *tbl= thd->lex->query_tables; tbl; tbl= tbl->next_global)
+ {
+ if (!tbl->table)
+ continue;
+ table= tbl->table;
+ break;
+ }
+ ha_federatedx *h= (ha_federatedx *) table->file;
+ iop= &h->io;
+ share= get_share(table->s->table_name.str, table);
+ txn= h->get_txn(thd);
+ if ((rc= txn->acquire(share, thd, TRUE, iop)))
+ DBUG_RETURN(rc);
+
+ if ((*iop)->query(thd->query(), thd->query_length()))
+ goto err;
+
+ stored_result= (*iop)->store_result();
+ if (!stored_result)
+ goto err;
+
+ DBUG_RETURN(0);
+
+err:
+ DBUG_RETURN(HA_FEDERATEDX_ERROR_WITH_REMOTE_SYSTEM);
+}
+
+int ha_federatedx_select_handler::next_row()
+{
+ int rc= 0;
+ FEDERATEDX_IO_ROW *row;
+ ulong *lengths;
+ Field **field;
+ int column= 0;
+ Time_zone *saved_time_zone= table->in_use->variables.time_zone;
+ DBUG_ENTER("ha_federatedx_select_handler::next_row");
+
+ if ((rc= txn->acquire(share, table->in_use, TRUE, iop)))
+ DBUG_RETURN(rc);
+
+ if (!(row= (*iop)->fetch_row(stored_result)))
+ DBUG_RETURN(HA_ERR_END_OF_FILE);
+
+ /* Convert row to internal format */
+ table->in_use->variables.time_zone= UTC;
+ lengths= (*iop)->fetch_lengths(stored_result);
+
+ for (field= table->field; *field; field++, column++)
+ {
+ if ((*iop)->is_column_null(row, column))
+ (*field)->set_null();
+ else
+ {
+ (*field)->set_notnull();
+ (*field)->store((*iop)->get_column_data(row, column),
+ lengths[column], &my_charset_bin);
+ }
+ }
+ table->in_use->variables.time_zone= saved_time_zone;
+
+ DBUG_RETURN(rc);
+}
+
+int ha_federatedx_select_handler::end_scan()
+{
+ DBUG_ENTER("ha_federatedx_derived_handler::end_scan");
+
+ free_tmp_table(thd, table);
+ table= 0;
+
+ (*iop)->free_result(stored_result);
+
+ free_share(txn, share);
+
+ DBUG_RETURN(0);
+}
+
+void ha_federatedx_select_handler::print_error(int error, myf error_flag)
+{
+ select_handler::print_error(error, error_flag);
+}
+
+
diff --git a/storage/federatedx/federatedx_pushdown.h b/storage/federatedx/federatedx_pushdown.h
new file mode 100644
index 00000000000..673abcfc68d
--- /dev/null
+++ b/storage/federatedx/federatedx_pushdown.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (c) 2019 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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-1301 USA */
+
+#include "derived_handler.h"
+#include "select_handler.h"
+
+/*
+ Implementation class of the derived_handler interface for FEDERATEDX:
+ class declaration
+*/
+
+class ha_federatedx_derived_handler: public derived_handler
+{
+private:
+ FEDERATEDX_SHARE *share;
+ federatedx_txn *txn;
+ federatedx_io **iop;
+ FEDERATEDX_IO_RESULT *stored_result;
+
+public:
+ ha_federatedx_derived_handler(THD* thd_arg, TABLE_LIST *tbl);
+ ~ha_federatedx_derived_handler();
+ int init_scan();
+ int next_row();
+ int end_scan();
+ void print_error(int, unsigned long);
+};
+
+
+/*
+ Implementation class of the select_handler interface for FEDERATEDX:
+ class declaration
+*/
+
+class ha_federatedx_select_handler: public select_handler
+{
+private:
+ FEDERATEDX_SHARE *share;
+ federatedx_txn *txn;
+ federatedx_io **iop;
+ FEDERATEDX_IO_RESULT *stored_result;
+
+public:
+ ha_federatedx_select_handler(THD* thd_arg, SELECT_LEX *sel);
+ ~ha_federatedx_select_handler();
+ int init_scan();
+ int next_row();
+ int end_scan();
+ void print_error(int, unsigned long);
+};
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index ddd6d932724..aa29c726d16 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -319,6 +319,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "sql_analyse.h" // append_escaped()
#include "sql_show.h" // append_identifier()
#include "tztime.h" // my_tz_find()
+#include "sql_select.h"
#ifdef I_AM_PARANOID
#define MIN_PORT 1023
@@ -401,6 +402,12 @@ static void init_federated_psi_keys(void)
#define init_federated_psi_keys() /* no-op */
#endif /* HAVE_PSI_INTERFACE */
+handlerton* federatedx_hton;
+
+static derived_handler*
+create_federatedx_derived_handler(THD* thd, TABLE_LIST *derived);
+static select_handler*
+create_federatedx_select_handler(THD* thd, SELECT_LEX *sel);
/*
Initialize the federatedx handler.
@@ -418,7 +425,7 @@ int federatedx_db_init(void *p)
{
DBUG_ENTER("federatedx_db_init");
init_federated_psi_keys();
- handlerton *federatedx_hton= (handlerton *)p;
+ federatedx_hton= (handlerton *)p;
federatedx_hton->state= SHOW_OPTION_YES;
/* Needed to work with old .frm files */
federatedx_hton->db_type= DB_TYPE_FEDERATED_DB;
@@ -432,6 +439,8 @@ int federatedx_db_init(void *p)
federatedx_hton->discover_table_structure= ha_federatedx::discover_assisted;
federatedx_hton->create= federatedx_create_handler;
federatedx_hton->flags= HTON_ALTER_NOT_SUPPORTED;
+ federatedx_hton->create_derived= create_federatedx_derived_handler;
+ federatedx_hton->create_select= create_federatedx_select_handler;
if (mysql_mutex_init(fe_key_mutex_federatedx,
&federatedx_mutex, MY_MUTEX_INIT_FAST))
@@ -1977,7 +1986,7 @@ bool ha_federatedx::append_stmt_insert(String *query)
sql_insert.cc, sql_select.cc, sql_table.cc, sql_udf.cc, and sql_update.cc.
*/
-int ha_federatedx::write_row(uchar *buf)
+int ha_federatedx::write_row(const uchar *buf)
{
char values_buffer[FEDERATEDX_QUERY_BUFFER_SIZE];
char insert_field_value_buffer[STRING_BUFFER_USUAL_SIZE];
@@ -3410,7 +3419,9 @@ int ha_federatedx::create(const char *name, TABLE *table_arg,
{
FEDERATEDX_SERVER server;
- fill_server(thd->mem_root, &server, &tmp_share, create_info->table_charset);
+ // It's possibly wrong to use alter_table_convert_to_charset here.
+ fill_server(thd->mem_root, &server, &tmp_share,
+ create_info->alter_table_convert_to_charset);
#ifndef DBUG_OFF
mysql_mutex_init(fe_key_mutex_FEDERATEDX_SERVER_mutex,
@@ -3687,6 +3698,13 @@ err1:
struct st_mysql_storage_engine federatedx_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
+my_bool use_pushdown;
+static MYSQL_SYSVAR_BOOL(pushdown, use_pushdown, 0,
+ "Use query fragments pushdown capabilities", NULL, NULL, FALSE);
+static struct st_mysql_sys_var* sysvars[]= { MYSQL_SYSVAR(pushdown), NULL };
+
+#include "federatedx_pushdown.cc"
+
maria_declare_plugin(federatedx)
{
MYSQL_STORAGE_ENGINE_PLUGIN,
@@ -3699,8 +3717,9 @@ maria_declare_plugin(federatedx)
federatedx_done, /* Plugin Deinit */
0x0201 /* 2.1 */,
NULL, /* status variables */
- NULL, /* system variables */
+ sysvars, /* system variables */
"2.1", /* string version */
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}
maria_declare_plugin_end;
+
diff --git a/storage/federatedx/ha_federatedx.h b/storage/federatedx/ha_federatedx.h
index 5357f02cca0..c9d80dd8282 100644
--- a/storage/federatedx/ha_federatedx.h
+++ b/storage/federatedx/ha_federatedx.h
@@ -1,3 +1,5 @@
+#ifndef HA_FEDERATEDX_INCLUDED
+#define HA_FEDERATEDX_INCLUDED
/*
Copyright (c) 2008, Patrick Galbraith
All rights reserved.
@@ -335,8 +337,8 @@ public:
return (HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED
| HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_CAN_REPAIR |
- HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
- HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY);
+ HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | HA_CAN_ONLINE_BACKUPS |
+ HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY | HA_NON_COMPARABLE_ROWID);
}
/*
This is a bitmap of flags that says how the storage engine
@@ -398,7 +400,7 @@ public:
void start_bulk_insert(ha_rows rows, uint flags);
int end_bulk_insert();
- int write_row(uchar *buf);
+ int write_row(const uchar *buf);
int update_row(const uchar *old_data, const uchar *new_data);
int delete_row(const uchar *buf);
int index_init(uint keynr, bool sorted);
@@ -426,6 +428,19 @@ public:
int rnd_next(uchar *buf); //required
int rnd_pos(uchar *buf, uchar *pos); //required
void position(const uchar *record); //required
+ /*
+ A ref is a pointer inside a local buffer. It is not comparable to
+ other ref's. This is never called as HA_NON_COMPARABLE_ROWID is set.
+ */
+ int cmp_ref(const uchar *ref1, const uchar *ref2)
+ {
+#ifdef NOT_YET
+ DBUG_ASSERT(0);
+ return 0;
+#else
+ return handler::cmp_ref(ref1,ref2); /* Works if table scan is used */
+#endif
+ }
int info(uint); //required
int extra(ha_extra_function operation);
@@ -447,6 +462,9 @@ public:
int external_lock(THD *thd, int lock_type);
int reset(void);
int free_result(void);
+
+ friend class ha_federatedx_derived_handler;
+ friend class ha_federatedx_select_handler;
};
extern const char ident_quote_char; // Character for quoting
@@ -462,3 +480,7 @@ extern federatedx_io *instantiate_io_mysql(MEM_ROOT *server_root,
FEDERATEDX_SERVER *server);
extern federatedx_io *instantiate_io_null(MEM_ROOT *server_root,
FEDERATEDX_SERVER *server);
+
+#include "federatedx_pushdown.h"
+
+#endif /* HA_FEDERATEDX_INCLUDED */
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 8a8e1f74e47..5107abdfdd2 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -224,7 +224,7 @@ void ha_heap::update_key_stats()
}
-int ha_heap::write_row(uchar * buf)
+int ha_heap::write_row(const uchar * buf)
{
int res;
if (table->next_number_field && buf == table->record[0])
diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h
index e3df6b95cbd..370906bd1f6 100644
--- a/storage/heap/ha_heap.h
+++ b/storage/heap/ha_heap.h
@@ -49,9 +49,9 @@ public:
{
return (HA_FAST_KEY_READ | HA_NO_BLOBS | HA_NULL_IN_KEY |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
- HA_CAN_SQL_HANDLER |
+ HA_CAN_SQL_HANDLER | HA_CAN_ONLINE_BACKUPS |
HA_REC_NOT_IN_SEQ | HA_CAN_INSERT_DELAYED | HA_NO_TRANSACTIONS |
- HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT);
+ HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT | HA_CAN_HASH_KEYS);
}
ulong index_flags(uint inx, uint part, bool all_parts) const
{
@@ -65,12 +65,13 @@ public:
double scan_time()
{ return (double) (stats.records+stats.deleted) / 20.0+10; }
double read_time(uint index, uint ranges, ha_rows rows)
- { return (double) rows / 20.0+1; }
-
+ { return (double) rows / 20.0+1; }
+ double keyread_time(uint index, uint ranges, ha_rows rows)
+ { return (double) rows / 20.0+1; }
int open(const char *name, int mode, uint test_if_locked);
int close(void);
void set_keys_for_scanning(void);
- int write_row(uchar * buf);
+ int write_row(const uchar * buf);
int update_row(const uchar * old_data, const uchar * new_data);
int delete_row(const uchar * buf);
virtual void get_auto_increment(ulonglong offset, ulonglong increment,
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index a7f2fd99f02..8a4fc0e79d9 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -114,7 +114,6 @@ SET(INNOBASE_SOURCES
row/row0purge.cc
row/row0row.cc
row/row0sel.cc
- row/row0trunc.cc
row/row0uins.cc
row/row0umod.cc
row/row0undo.cc
@@ -162,6 +161,8 @@ IF(NOT TARGET innobase)
RETURN()
ENDIF()
+ADD_DEFINITIONS(${SSL_DEFINES})
+
# A GCC bug causes crash when compiling these files on ARM64 with -O1+
# Compile them with -O0 as a workaround.
IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64"
@@ -176,7 +177,6 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64"
mtr/mtr0mtr.cc
row/row0merge.cc
row/row0mysql.cc
- row/row0trunc.cc
srv/srv0srv.cc
COMPILE_FLAGS "-O0"
)
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 2ef5495a510..67ac5e357f6 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -44,6 +44,8 @@ Created 6/2/1994 Heikki Tuuri
#include "dict0boot.h"
#include "row0sel.h" /* row_search_max_autoinc() */
+Atomic_counter<uint32_t> btr_validate_index_running;
+
/**************************************************************//**
Checks if the page in the cursor can be merged with given page.
If necessary, re-organize the merge_page.
@@ -57,15 +59,12 @@ btr_can_merge_with_page(
buf_block_t** merge_block, /*!< out: the merge block */
mtr_t* mtr); /*!< in: mini-transaction */
-/**************************************************************//**
-Report that an index page is corrupted. */
-void
-btr_corruption_report(
-/*==================*/
- const buf_block_t* block, /*!< in: corrupted block */
- const dict_index_t* index) /*!< in: index tree */
+/** Report that an index page is corrupted.
+@param[in] buffer block
+@param[in] index tree */
+void btr_corruption_report(const buf_block_t* block, const dict_index_t* index)
{
- ib::error()
+ ib::fatal()
<< "Flag mismatch in page " << block->page.id
<< " index " << index->name
<< " of table " << index->table->name;
@@ -226,7 +225,7 @@ btr_root_block_get(
buf_block_t* block = btr_block_get(
page_id_t(index->table->space_id, index->page),
- page_size_t(index->table->space->flags), mode,
+ index->table->space->zip_size(), mode,
index, mtr);
if (!block) {
@@ -357,7 +356,7 @@ btr_root_adjust_on_import(
page_zip_des_t* page_zip;
dict_table_t* table = index->table;
const page_id_t page_id(table->space_id, index->page);
- const page_size_t page_size(table->space->flags);
+ const ulint zip_size = table->space->zip_size();
DBUG_EXECUTE_IF("ib_import_trigger_corruption_3",
return(DB_CORRUPTION););
@@ -366,7 +365,7 @@ btr_root_adjust_on_import(
mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
- block = btr_block_get(page_id, page_size, RW_X_LATCH, index, &mtr);
+ block = btr_block_get(page_id, zip_size, RW_X_LATCH, index, &mtr);
page = buf_block_get_frame(block);
page_zip = buf_block_get_page_zip(block);
@@ -385,9 +384,21 @@ btr_root_adjust_on_import(
} else {
/* Check that the table flags and the tablespace
flags match. */
- err = (dict_tf_to_fsp_flags(table->flags)
- == table->space->flags)
- ? DB_SUCCESS : DB_CORRUPTION;
+ ulint tf = dict_tf_to_fsp_flags(table->flags);
+ ulint sf = table->space->flags;
+ sf &= ~FSP_FLAGS_MEM_MASK;
+ tf &= ~FSP_FLAGS_MEM_MASK;
+ if (fil_space_t::is_flags_equal(tf, sf)
+ || fil_space_t::is_flags_equal(sf, tf)) {
+ mutex_enter(&fil_system.mutex);
+ table->space->flags = (table->space->flags
+ & ~FSP_FLAGS_MEM_MASK)
+ | (tf & FSP_FLAGS_MEM_MASK);
+ mutex_exit(&fil_system.mutex);
+ err = DB_SUCCESS;
+ } else {
+ err = DB_CORRUPTION;
+ }
}
} else {
err = DB_SUCCESS;
@@ -427,7 +438,7 @@ btr_page_create(
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
if (page_zip) {
- page_create_zip(block, index, level, 0, NULL, mtr);
+ page_create_zip(block, index, level, 0, mtr);
} else {
page_create(block, mtr, dict_table_is_comp(index->table),
dict_index_is_spatial(index));
@@ -467,7 +478,7 @@ btr_page_alloc_for_ibuf(
new_block = buf_page_get(
page_id_t(index->table->space_id, node_addr.page),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_X_LATCH, mtr);
new_page = buf_block_get_frame(new_block);
@@ -751,21 +762,18 @@ void btr_page_free(dict_index_t* index, buf_block_t* block, mtr_t* mtr,
? PAGE_HEADER + PAGE_BTR_SEG_LEAF
: PAGE_HEADER + PAGE_BTR_SEG_TOP];
fseg_free_page(seg_header,
- index->table->space, block->page.id.page_no(), mtr);
+ index->table->space, block->page.id.page_no(),
+ !block->page.flush_observer, mtr);
/* The page was marked free in the allocation bitmap, but it
should remain exclusively latched until mtr_t::commit() or until it
is explicitly freed from the mini-transaction. */
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
- if (srv_immediate_scrub_data_uncompressed) {
- /* In MDEV-15528 this code must be removed and the
- check in buf_flush_init_for_writing() re-enabled. We
- should zero out the page after the redo log for this
- mini-transaction has been durably written. The log
- would include the 10.4 MLOG_INIT_FREE_PAGE record. */
- fsp_init_file_page(index->table->space, block, mtr);
- }
+ /* MDEV-15528 FIXME: Zero out the page after the redo log for
+ this mini-transaction has been durably written.
+ This must be done unconditionally if
+ srv_immediate_scrub_data_uncompressed is set. */
}
/**************************************************************//**
@@ -822,7 +830,7 @@ btr_node_ptr_get_child(
return btr_block_get(
page_id_t(index->table->space_id,
btr_node_ptr_get_child_page_no(node_ptr, offsets)),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_SX_LATCH, index, mtr);
}
@@ -1014,7 +1022,7 @@ static void btr_free_root(buf_block_t* block, mtr_t* mtr, bool invalidate)
/** Prepare to free a B-tree.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] index_id PAGE_INDEX_ID contents
@param[in,out] mtr mini-transaction
@return root block, to invoke btr_free_but_not_root() and btr_free_root()
@@ -1023,7 +1031,7 @@ static MY_ATTRIBUTE((warn_unused_result))
buf_block_t*
btr_free_root_check(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
index_id_t index_id,
mtr_t* mtr)
{
@@ -1031,7 +1039,7 @@ btr_free_root_check(
ut_ad(index_id != BTR_FREED_INDEX_ID);
buf_block_t* block = buf_page_get(
- page_id, page_size, RW_X_LATCH, mtr);
+ page_id, zip_size, RW_X_LATCH, mtr);
if (block) {
buf_block_dbg_add_level(block, SYNC_TREE_NODE);
@@ -1052,21 +1060,18 @@ btr_free_root_check(
/** Create the root node for a new index tree.
@param[in] type type of the index
-@param[in,out] space tablespace where created
@param[in] index_id index id
-@param[in] index index, or NULL when applying TRUNCATE
-log record during recovery
-@param[in] btr_redo_create_info used for applying TRUNCATE log
-@param[in] mtr mini-transaction handle
-record during recovery
-@return page number of the created root, FIL_NULL if did not succeed */
+@param[in,out] space tablespace where created
+@param[in] index index
+@param[in,out] mtr mini-transaction
+@return page number of the created root
+@retval FIL_NULL if did not succeed */
ulint
btr_create(
ulint type,
fil_space_t* space,
index_id_t index_id,
dict_index_t* index,
- const btr_create_t* btr_redo_create_info,
mtr_t* mtr)
{
buf_block_t* block;
@@ -1081,7 +1086,7 @@ btr_create(
(for an ibuf tree, not in the root, but on a separate ibuf header
page) */
- if (type & DICT_IBUF) {
+ if (UNIV_UNLIKELY(type & DICT_IBUF)) {
/* Allocate first the ibuf header page */
buf_block_t* ibuf_hdr_block = fseg_create(
space, IBUF_HEADER + IBUF_TREE_SEG_HEADER, mtr);
@@ -1112,8 +1117,7 @@ btr_create(
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
- flst_init(block->frame + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
- mtr);
+ flst_init(block, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, mtr);
} else {
block = fseg_create(space,
PAGE_HEADER + PAGE_BTR_SEG_TOP, mtr);
@@ -1143,44 +1147,11 @@ btr_create(
page_zip = buf_block_get_page_zip(block);
if (page_zip) {
- if (index != NULL) {
- page = page_create_zip(block, index, 0, 0, NULL, mtr);
- } else {
- /* Create a compressed index page when applying
- TRUNCATE log record during recovery */
- ut_ad(btr_redo_create_info != NULL);
-
- redo_page_compress_t page_comp_info;
-
- page_comp_info.type = type;
-
- page_comp_info.index_id = index_id;
-
- page_comp_info.n_fields =
- btr_redo_create_info->n_fields;
-
- page_comp_info.field_len =
- btr_redo_create_info->field_len;
-
- page_comp_info.fields = btr_redo_create_info->fields;
-
- page_comp_info.trx_id_pos =
- btr_redo_create_info->trx_id_pos;
-
- page = page_create_zip(block, NULL, 0, 0,
- &page_comp_info, mtr);
- }
+ page = page_create_zip(block, index, 0, 0, mtr);
} else {
- if (index != NULL) {
- page = page_create(block, mtr,
- dict_table_is_comp(index->table),
- dict_index_is_spatial(index));
- } else {
- ut_ad(btr_redo_create_info != NULL);
- page = page_create(
- block, mtr, btr_redo_create_info->format_flags,
- type == DICT_SPATIAL);
- }
+ page = page_create(block, mtr,
+ dict_table_is_comp(index->table),
+ dict_index_is_spatial(index));
/* Set the level of the new index page */
btr_page_set_level(page, NULL, 0, mtr);
}
@@ -1189,21 +1160,32 @@ btr_create(
btr_page_set_index_id(page, page_zip, index_id, mtr);
/* Set the next node and previous node fields */
- btr_page_set_next(page, page_zip, FIL_NULL, mtr);
- btr_page_set_prev(page, page_zip, FIL_NULL, mtr);
-
- /* We reset the free bits for the page to allow creation of several
- trees in the same mtr, otherwise the latch on a bitmap page would
- prevent it because of the latching order.
+ compile_time_assert(FIL_PAGE_NEXT == FIL_PAGE_PREV + 4);
+ compile_time_assert(FIL_NULL == 0xffffffff);
+#if MYSQL_VERSION_ID < 100500
+ if (UNIV_LIKELY_NULL(page_zip)) {
+ /* Avoid tripping the ut_a() in mlog_parse_nbytes()
+ when crash-downgrading to an earlier MariaDB 10.4 version. */
+ btr_page_set_next(page, page_zip, FIL_NULL, mtr);
+ btr_page_set_prev(page, page_zip, FIL_NULL, mtr);
+ } else {
+ mlog_memset(block, FIL_PAGE_PREV, 8, 0xff, mtr);
+ }
+#else
+ mlog_memset(block, FIL_PAGE_PREV, 8, 0xff, mtr);
+ if (UNIV_LIKELY_NULL(page_zip)) {
+ memset(page_zip->data + FIL_PAGE_PREV, 0xff, 8);
+ }
+#endif
- index will be NULL if we are recreating the table during recovery
- on behalf of TRUNCATE.
+ /* We reset the free bits for the page in a separate
+ mini-transaction to allow creation of several trees in the
+ same mtr, otherwise the latch on a bitmap page would prevent
+ it because of the latching order.
Note: Insert Buffering is disabled for temporary tables given that
most temporary tables are smaller in size and short-lived. */
- if (!(type & DICT_CLUSTERED)
- && (index == NULL || !index->table->is_temporary())) {
-
+ if (!(type & DICT_CLUSTERED) && !index->table->is_temporary()) {
ibuf_reset_free_bits(block);
}
@@ -1284,18 +1266,18 @@ top_loop:
/** Free a persistent index tree if it exists.
@param[in] page_id root page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] index_id PAGE_INDEX_ID contents
@param[in,out] mtr mini-transaction */
void
btr_free_if_exists(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
index_id_t index_id,
mtr_t* mtr)
{
buf_block_t* root = btr_free_root_check(
- page_id, page_size, index_id, mtr);
+ page_id, zip_size, index_id, mtr);
if (root == NULL) {
return;
@@ -1306,20 +1288,15 @@ btr_free_if_exists(
btr_free_root(root, mtr, true);
}
-/** Free an index tree in a temporary tablespace or during TRUNCATE TABLE.
-@param[in] page_id root page id
-@param[in] page_size page size */
-void
-btr_free(
- const page_id_t page_id,
- const page_size_t& page_size)
+/** Free an index tree in a temporary tablespace.
+@param[in] page_id root page id */
+void btr_free(const page_id_t page_id)
{
mtr_t mtr;
mtr.start();
mtr.set_log_mode(MTR_LOG_NO_REDO);
- buf_block_t* block = buf_page_get(
- page_id, page_size, RW_X_LATCH, &mtr);
+ buf_block_t* block = buf_page_get(page_id, 0, RW_X_LATCH, &mtr);
if (block) {
btr_free_but_not_root(block, MTR_LOG_NO_REDO);
@@ -1343,7 +1320,7 @@ btr_read_autoinc(dict_index_t* index)
ib_uint64_t autoinc;
if (buf_block_t* block = buf_page_get(
page_id_t(index->table->space_id, index->page),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_S_LATCH, &mtr)) {
autoinc = page_get_autoinc(block->frame);
} else {
@@ -1375,7 +1352,7 @@ btr_read_autoinc_with_fallback(const dict_table_t* table, unsigned col_no)
mtr.start();
buf_block_t* block = buf_page_get(
page_id_t(index->table->space_id, index->page),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_S_LATCH, &mtr);
ib_uint64_t autoinc = block ? page_get_autoinc(block->frame) : 0;
@@ -1420,7 +1397,7 @@ btr_write_autoinc(dict_index_t* index, ib_uint64_t autoinc, bool reset)
fil_space_t* space = index->table->space;
mtr.set_named_space(space);
page_set_autoinc(buf_page_get(page_id_t(space->id, index->page),
- page_size_t(space->flags),
+ space->zip_size(),
RW_SX_LATCH, &mtr),
index, autoinc, &mtr, reset);
mtr.commit();
@@ -1547,7 +1524,7 @@ btr_page_reorganize_low(
}
if (page_zip
- && !page_zip_compress(page_zip, page, index, z_level, NULL, mtr)) {
+ && !page_zip_compress(page_zip, page, index, z_level, mtr)) {
/* Restore the old page and exit. */
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
@@ -1573,11 +1550,6 @@ btr_page_reorganize_low(
goto func_exit;
}
- if (!recovery && !dict_table_is_locking_disabled(index->table)) {
- /* Update the record lock bitmaps */
- lock_move_reorganize_page(block, temp_block);
- }
-
data_size2 = page_get_data_size(page);
max_ins_size2 = page_get_max_insert_size_after_reorganize(page, 1);
@@ -1601,21 +1573,41 @@ btr_page_reorganize_low(
ut_ad(cursor->rec == page_get_infimum_rec(page));
}
-func_exit:
#ifdef UNIV_ZIP_DEBUG
ut_a(!page_zip || page_zip_validate(page_zip, page, index));
#endif /* UNIV_ZIP_DEBUG */
- if (!recovery && block->page.id.page_no() == index->page
- && fil_page_get_type(temp_page) == FIL_PAGE_TYPE_INSTANT) {
- /* Preserve the PAGE_INSTANT information. */
- ut_ad(!page_zip);
- ut_ad(index->is_instant());
- memcpy(FIL_PAGE_TYPE + page, FIL_PAGE_TYPE + temp_page, 2);
- memcpy(PAGE_HEADER + PAGE_INSTANT + page,
- PAGE_HEADER + PAGE_INSTANT + temp_page, 2);
+ if (!recovery) {
+ if (block->page.id.page_no() == index->page
+ && fil_page_get_type(temp_page) == FIL_PAGE_TYPE_INSTANT) {
+ /* Preserve the PAGE_INSTANT information. */
+ ut_ad(!page_zip);
+ ut_ad(index->is_instant());
+ memcpy(FIL_PAGE_TYPE + page,
+ FIL_PAGE_TYPE + temp_page, 2);
+ memcpy(PAGE_HEADER + PAGE_INSTANT + page,
+ PAGE_HEADER + PAGE_INSTANT + temp_page, 2);
+ if (!index->table->instant) {
+ } else if (page_is_comp(page)) {
+ memcpy(PAGE_NEW_INFIMUM + page,
+ PAGE_NEW_INFIMUM + temp_page, 8);
+ memcpy(PAGE_NEW_SUPREMUM + page,
+ PAGE_NEW_SUPREMUM + temp_page, 8);
+ } else {
+ memcpy(PAGE_OLD_INFIMUM + page,
+ PAGE_OLD_INFIMUM + temp_page, 8);
+ memcpy(PAGE_OLD_SUPREMUM + page,
+ PAGE_OLD_SUPREMUM + temp_page, 8);
+ }
+ }
+
+ if (!dict_table_is_locking_disabled(index->table)) {
+ /* Update the record lock bitmaps */
+ lock_move_reorganize_page(block, temp_block);
+ }
}
+func_exit:
buf_block_free(temp_block);
/* Restore logging mode */
@@ -1661,6 +1653,14 @@ func_exit:
mach_read_from_2(PAGE_HEADER + PAGE_INSTANT
+ page),
MLOG_2BYTES, mtr);
+ if (!index->table->instant) {
+ } else if (page_is_comp(page)) {
+ mlog_log_string(PAGE_NEW_INFIMUM + page, 8, mtr);
+ mlog_log_string(PAGE_NEW_SUPREMUM + page, 8, mtr);
+ } else {
+ mlog_log_string(PAGE_OLD_INFIMUM + page, 8, mtr);
+ mlog_log_string(PAGE_OLD_SUPREMUM + page, 8, mtr);
+ }
}
return(success);
@@ -1799,7 +1799,7 @@ btr_page_empty(
: 0;
if (page_zip) {
- page_create_zip(block, index, level, autoinc, NULL, mtr);
+ page_create_zip(block, index, level, autoinc, mtr);
} else {
page_create(block, mtr, dict_table_is_comp(index->table),
dict_index_is_spatial(index));
@@ -1811,6 +1811,65 @@ btr_page_empty(
}
}
+/** Write instant ALTER TABLE metadata to a root page.
+@param[in,out] root clustered index root page
+@param[in] index clustered index with instant ALTER TABLE
+@param[in,out] mtr mini-transaction */
+void btr_set_instant(buf_block_t* root, const dict_index_t& index, mtr_t* mtr)
+{
+ ut_ad(index.n_core_fields > 0);
+ ut_ad(index.n_core_fields < REC_MAX_N_FIELDS);
+ ut_ad(index.is_instant());
+ ut_ad(fil_page_get_type(root->frame) == FIL_PAGE_TYPE_INSTANT
+ || fil_page_get_type(root->frame) == FIL_PAGE_INDEX);
+ ut_ad(!page_has_siblings(root->frame));
+ ut_ad(root->page.id.page_no() == index.page);
+
+ rec_t* infimum = page_get_infimum_rec(root->frame);
+ rec_t* supremum = page_get_supremum_rec(root->frame);
+ byte* page_type = root->frame + FIL_PAGE_TYPE;
+ uint16_t i = page_header_get_field(root->frame, PAGE_INSTANT);
+
+ switch (mach_read_from_2(page_type)) {
+ case FIL_PAGE_TYPE_INSTANT:
+ ut_ad(page_get_instant(root->frame) == index.n_core_fields);
+ if (memcmp(infimum, "infimum", 8)
+ || memcmp(supremum, "supremum", 8)) {
+ ut_ad(index.table->instant);
+ ut_ad(!memcmp(infimum, field_ref_zero, 8));
+ ut_ad(!memcmp(supremum, field_ref_zero, 7));
+ /* The n_core_null_bytes only matters for
+ ROW_FORMAT=COMPACT and ROW_FORMAT=DYNAMIC tables. */
+ ut_ad(supremum[7] == index.n_core_null_bytes
+ || !index.table->not_redundant());
+ return;
+ }
+ break;
+ default:
+ ut_ad(!"wrong page type");
+ /* fall through */
+ case FIL_PAGE_INDEX:
+ ut_ad(!page_is_comp(root->frame)
+ || !page_get_instant(root->frame));
+ ut_ad(!memcmp(infimum, "infimum", 8));
+ ut_ad(!memcmp(supremum, "supremum", 8));
+ mlog_write_ulint(page_type, FIL_PAGE_TYPE_INSTANT,
+ MLOG_2BYTES, mtr);
+ ut_ad(i <= PAGE_NO_DIRECTION);
+ i |= index.n_core_fields << 3;
+ mlog_write_ulint(PAGE_HEADER + PAGE_INSTANT + root->frame, i,
+ MLOG_2BYTES, mtr);
+ break;
+ }
+
+ if (index.table->instant) {
+ mlog_memset(root, infimum - root->frame, 8, 0, mtr);
+ mlog_memset(root, supremum - root->frame, 7, 0, mtr);
+ mlog_write_ulint(&supremum[7], index.n_core_null_bytes,
+ MLOG_1BYTE, mtr);
+ }
+}
+
/*************************************************************//**
Makes tree one level higher by splitting the root, and inserts
the tuple. It is assumed that mtr contains an x-latch on the tree.
@@ -1894,8 +1953,23 @@ btr_root_raise_and_insert(
btr_page_create(new_block, new_page_zip, index, level, mtr);
/* Set the next node and previous node fields of new page */
- btr_page_set_next(new_page, new_page_zip, FIL_NULL, mtr);
- btr_page_set_prev(new_page, new_page_zip, FIL_NULL, mtr);
+ compile_time_assert(FIL_PAGE_NEXT == FIL_PAGE_PREV + 4);
+ compile_time_assert(FIL_NULL == 0xffffffff);
+#if MYSQL_VERSION_ID < 100500
+ if (UNIV_LIKELY_NULL(new_page_zip)) {
+ /* Avoid tripping the ut_a() in mlog_parse_nbytes()
+ when crash-downgrading to an earlier MariaDB 10.4 version. */
+ btr_page_set_next(new_page, new_page_zip, FIL_NULL, mtr);
+ btr_page_set_prev(new_page, new_page_zip, FIL_NULL, mtr);
+ } else {
+ mlog_memset(new_block, FIL_PAGE_PREV, 8, 0xff, mtr);
+ }
+#else
+ mlog_memset(new_block, FIL_PAGE_PREV, 8, 0xff, mtr);
+ if (UNIV_LIKELY_NULL(new_page_zip)) {
+ memset(new_page_zip->data + FIL_PAGE_PREV, 0xff, 8);
+ }
+#endif
/* Copy the records from root to the new page one by one. */
@@ -1996,11 +2070,7 @@ btr_root_raise_and_insert(
if (index->is_instant()) {
ut_ad(!root_page_zip);
- byte* page_type = root_block->frame + FIL_PAGE_TYPE;
- ut_ad(mach_read_from_2(page_type) == FIL_PAGE_INDEX);
- mlog_write_ulint(page_type, FIL_PAGE_TYPE_INSTANT,
- MLOG_2BYTES, mtr);
- page_set_instant(root_block->frame, index->n_core_fields, mtr);
+ btr_set_instant(root_block, *index, mtr);
}
ut_ad(!page_has_siblings(root));
@@ -2070,7 +2140,7 @@ rec_t* btr_page_get_split_rec_to_left(const btr_cur_t* cursor)
|| cursor->index->is_instant()
|| !(rec_get_info_bits(page_rec_get_next_const(
page_get_infimum_rec(page)),
- dict_table_is_comp(cursor->index->table))
+ cursor->index->table->not_redundant())
& REC_INFO_MIN_REC_FLAG));
const rec_t* infimum = page_get_infimum_rec(page);
@@ -2517,12 +2587,12 @@ btr_attach_half_pages(
/* for consistency, both blocks should be locked, before change */
if (prev_page_no != FIL_NULL && direction == FSP_DOWN) {
prev_block = btr_block_get(
- page_id_t(space, prev_page_no), block->page.size,
+ page_id_t(space, prev_page_no), block->zip_size(),
RW_X_LATCH, index, mtr);
}
if (next_page_no != FIL_NULL && direction != FSP_DOWN) {
next_block = btr_block_get(
- page_id_t(space, next_page_no), block->page.size,
+ page_id_t(space, next_page_no), block->zip_size(),
RW_X_LATCH, index, mtr);
}
@@ -2673,7 +2743,7 @@ btr_insert_into_right_sibling(
const ulint space = block->page.id.space();
next_block = btr_block_get(
- page_id_t(space, next_page_no), block->page.size,
+ page_id_t(space, next_page_no), block->zip_size(),
RW_X_LATCH, cursor->index, mtr);
next_page = buf_block_get_frame(next_block);
@@ -2699,7 +2769,7 @@ btr_insert_into_right_sibling(
if (rec == NULL) {
if (is_leaf
- && next_block->page.size.is_compressed()
+ && next_block->page.zip.ssize
&& !dict_index_is_clust(cursor->index)
&& !cursor->index->table->is_temporary()) {
/* Reset the IBUF_BITMAP_FREE bits, because
@@ -2747,7 +2817,7 @@ btr_insert_into_right_sibling(
/* Update the free bits of the B-tree page in the
insert buffer bitmap. */
- if (next_block->page.size.is_compressed()) {
+ if (next_block->page.zip.ssize) {
ibuf_update_free_bits_zip(next_block, mtr);
} else {
ibuf_update_free_bits_if_full(
@@ -3162,16 +3232,16 @@ func_exit:
return(rec);
}
-/** Removes a page from the level list of pages.
+/** Remove a page from the level list of pages.
@param[in] space space where removed
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] page page to remove
@param[in] index index tree
@param[in,out] mtr mini-transaction */
dberr_t
btr_level_list_remove_func(
ulint space,
- const page_size_t& page_size,
+ ulint zip_size,
page_t* page,
dict_index_t* index,
mtr_t* mtr)
@@ -3190,7 +3260,7 @@ btr_level_list_remove_func(
if (prev_page_no != FIL_NULL) {
buf_block_t* prev_block
= btr_block_get(page_id_t(space, prev_page_no),
- page_size, RW_X_LATCH, index, mtr);
+ zip_size, RW_X_LATCH, index, mtr);
page_t* prev_page
= buf_block_get_frame(prev_block);
@@ -3208,7 +3278,7 @@ btr_level_list_remove_func(
if (next_page_no != FIL_NULL) {
buf_block_t* next_block
= btr_block_get(
- page_id_t(space, next_page_no), page_size,
+ page_id_t(space, next_page_no), zip_size,
RW_X_LATCH, index, mtr);
if (!next_block) {
@@ -3419,12 +3489,7 @@ btr_lift_page_up(
if (index->is_instant()
&& father_block->page.id.page_no() == root_page_no) {
ut_ad(!father_page_zip);
- byte* page_type = father_block->frame + FIL_PAGE_TYPE;
- ut_ad(mach_read_from_2(page_type) == FIL_PAGE_INDEX);
- mlog_write_ulint(page_type, FIL_PAGE_TYPE_INSTANT,
- MLOG_2BYTES, mtr);
- page_set_instant(father_block->frame,
- index->n_core_fields, mtr);
+ btr_set_instant(father_block, *index, mtr);
}
page_level++;
@@ -3561,7 +3626,7 @@ btr_compress(
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
MONITOR_INC(MONITOR_INDEX_MERGE_ATTEMPTS);
@@ -3720,7 +3785,7 @@ retry:
/* Remove the page from the level list */
if (DB_SUCCESS != btr_level_list_remove(index->table->space_id,
- page_size, page, index,
+ zip_size, page, index,
mtr)) {
goto err_exit;
}
@@ -3853,7 +3918,8 @@ retry:
/* Remove the page from the level list */
if (DB_SUCCESS != btr_level_list_remove(index->table->space_id,
- page_size, page, index, mtr)) {
+ zip_size, page, index,
+ mtr)) {
goto err_exit;
}
@@ -3964,7 +4030,7 @@ retry:
committed mini-transaction, because in crash recovery,
the free bits could momentarily be set too high. */
- if (page_size.is_compressed()) {
+ if (zip_size) {
/* Because the free bits may be incremented
and we cannot update the insert buffer bitmap
in the same mini-transaction, the only safe
@@ -4024,7 +4090,7 @@ func_exit:
err_exit:
/* We play it safe and reset the free bits. */
- if (page_size.is_compressed()
+ if (zip_size
&& merge_page
&& page_is_leaf(merge_page)
&& !dict_index_is_clust(index)) {
@@ -4051,12 +4117,13 @@ btr_discard_only_page_on_level(
mtr_t* mtr) /*!< in: mtr */
{
ulint page_level = 0;
- trx_id_t max_trx_id;
ut_ad(!index->is_dummy);
/* Save the PAGE_MAX_TRX_ID from the leaf page. */
- max_trx_id = page_get_max_trx_id(buf_block_get_frame(block));
+ const trx_id_t max_trx_id = page_get_max_trx_id(block->frame);
+ const rec_t* r = page_rec_get_next(page_get_infimum_rec(block->frame));
+ ut_ad(rec_is_metadata(r, *index) == index->is_instant());
while (block->page.id.page_no() != dict_index_get_page(index)) {
btr_cur_t cursor;
@@ -4107,15 +4174,40 @@ btr_discard_only_page_on_level(
}
#endif /* UNIV_BTR_DEBUG */
+ mem_heap_t* heap = nullptr;
+ const rec_t* rec = nullptr;
+ rec_offs* offsets = nullptr;
+ if (index->table->instant) {
+ if (rec_is_alter_metadata(r, *index)) {
+ heap = mem_heap_create(srv_page_size);
+ offsets = rec_get_offsets(r, index, nullptr,
+ index->n_core_fields,
+ ULINT_UNDEFINED, &heap);
+ rec = rec_copy(mem_heap_alloc(heap,
+ rec_offs_size(offsets)),
+ r, offsets);
+ rec_offs_make_valid(rec, index, true, offsets);
+ }
+ }
+
btr_page_empty(block, buf_block_get_page_zip(block), index, 0, mtr);
ut_ad(page_is_leaf(buf_block_get_frame(block)));
/* btr_page_empty() is supposed to zero-initialize the field. */
ut_ad(!page_get_instant(block->frame));
if (index->is_primary()) {
- /* Concurrent access is prevented by the root_block->lock
- X-latch, so this should be safe. */
- index->remove_instant();
+ if (rec) {
+ DBUG_ASSERT(index->table->instant);
+ DBUG_ASSERT(rec_is_alter_metadata(rec, *index));
+ btr_set_instant(block, *index, mtr);
+ rec = page_cur_insert_rec_low(
+ page_get_infimum_rec(block->frame),
+ index, rec, offsets, mtr);
+ ut_ad(rec);
+ mem_heap_free(heap);
+ } else if (index->is_instant()) {
+ index->clear_instant_add();
+ }
} else if (!index->table->is_temporary()) {
/* We play it safe and reset the free bits for the root */
ibuf_reset_free_bits(block);
@@ -4171,12 +4263,12 @@ btr_discard_page(
left_page_no = btr_page_get_prev(buf_block_get_frame(block));
right_page_no = btr_page_get_next(buf_block_get_frame(block));
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
ut_d(bool parent_is_different = false);
if (left_page_no != FIL_NULL) {
merge_block = btr_block_get(
page_id_t(index->table->space_id, left_page_no),
- page_size, RW_X_LATCH, index, mtr);
+ zip_size, RW_X_LATCH, index, mtr);
merge_page = buf_block_get_frame(merge_block);
#ifdef UNIV_BTR_DEBUG
@@ -4192,7 +4284,7 @@ btr_discard_page(
} else if (right_page_no != FIL_NULL) {
merge_block = btr_block_get(
page_id_t(index->table->space_id, right_page_no),
- page_size, RW_X_LATCH, index, mtr);
+ zip_size, RW_X_LATCH, index, mtr);
merge_page = buf_block_get_frame(merge_block);
#ifdef UNIV_BTR_DEBUG
@@ -4235,7 +4327,7 @@ btr_discard_page(
/* Remove the page from the level list */
ut_a(DB_SUCCESS == btr_level_list_remove(index->table->space_id,
- page_size, page, index, mtr));
+ zip_size, page, index, mtr));
#ifdef UNIV_ZIP_DEBUG
{
@@ -4409,7 +4501,7 @@ btr_print_index(
mtr_commit(&mtr);
- ut_ad(btr_validate_index(index, 0, false));
+ ut_ad(btr_validate_index(index, 0));
}
#endif /* UNIV_BTR_PRINT */
@@ -4536,14 +4628,32 @@ btr_index_rec_validate(
return(FALSE);
}
+ const bool is_alter_metadata = page_is_leaf(page)
+ && !page_has_prev(page)
+ && index->is_primary() && index->table->instant
+ && rec == page_rec_get_next_const(page_get_infimum_rec(page));
+
+ if (is_alter_metadata
+ && !rec_is_alter_metadata(rec, page_is_comp(page))) {
+ btr_index_rec_validate_report(page, rec, index);
+
+ ib::error() << "First record is not ALTER TABLE metadata";
+ return FALSE;
+ }
+
if (!page_is_comp(page)) {
const ulint n_rec_fields = rec_get_n_fields_old(rec);
if (n_rec_fields == DICT_FLD__SYS_INDEXES__MERGE_THRESHOLD
&& index->id == DICT_INDEXES_ID) {
/* A record for older SYS_INDEXES table
(missing merge_threshold column) is acceptable. */
+ } else if (is_alter_metadata) {
+ if (n_rec_fields != ulint(index->n_fields) + 1) {
+ goto n_field_mismatch;
+ }
} else if (n_rec_fields < index->n_core_fields
|| n_rec_fields > index->n_fields) {
+n_field_mismatch:
btr_index_rec_validate_report(page, rec, index);
ib::error() << "Has " << rec_get_n_fields_old(rec)
@@ -4563,24 +4673,35 @@ btr_index_rec_validate(
offsets = rec_get_offsets(rec, index, offsets, page_is_leaf(page)
? index->n_core_fields : 0,
ULINT_UNDEFINED, &heap);
+ const dict_field_t* field = index->fields;
+ ut_ad(rec_offs_n_fields(offsets)
+ == ulint(index->n_fields) + is_alter_metadata);
- for (unsigned i = 0; i < index->n_fields; i++) {
- dict_field_t* field = dict_index_get_nth_field(index, i);
- ulint fixed_size = dict_col_get_fixed_size(
- dict_field_get_col(field),
- page_is_comp(page));
-
+ for (unsigned i = 0; i < rec_offs_n_fields(offsets); i++) {
rec_get_nth_field_offs(offsets, i, &len);
- if (rec_offs_nth_extern(offsets, i)) {
+ ulint fixed_size;
- const byte* data = rec_get_nth_field(
- rec, offsets, i, &len);
- len -= BTR_EXTERN_FIELD_REF_SIZE;
- ulint extern_len = mach_read_from_4(
- data + len + BTR_EXTERN_LEN + 4);
- if (fixed_size == extern_len) {
- continue;
+ if (is_alter_metadata && i == index->first_user_field()) {
+ fixed_size = FIELD_REF_SIZE;
+ if (len != FIELD_REF_SIZE
+ || !rec_offs_nth_extern(offsets, i)) {
+ goto len_mismatch;
+ }
+
+ continue;
+ } else {
+ fixed_size = dict_col_get_fixed_size(
+ field->col, page_is_comp(page));
+ if (rec_offs_nth_extern(offsets, i)) {
+ const byte* data = rec_get_nth_field(
+ rec, offsets, i, &len);
+ len -= BTR_EXTERN_FIELD_REF_SIZE;
+ ulint extern_len = mach_read_from_4(
+ data + len + BTR_EXTERN_LEN + 4);
+ if (fixed_size == extern_len) {
+ goto next_field;
+ }
}
}
@@ -4595,8 +4716,8 @@ btr_index_rec_validate(
&& (field->prefix_len
? len > field->prefix_len
: (fixed_size && len != fixed_size))) {
+len_mismatch:
btr_index_rec_validate_report(page, rec, index);
-
ib::error error;
error << "Field " << i << " len is " << len
@@ -4614,6 +4735,8 @@ btr_index_rec_validate(
}
return(FALSE);
}
+next_field:
+ field++;
}
#ifdef VIRTUAL_INDEX_DEBUG
@@ -4779,19 +4902,7 @@ btr_validate_level(
page = buf_block_get_frame(block);
fil_space_t* space = index->table->space;
- const page_size_t table_page_size(
- dict_table_page_size(index->table));
- const page_size_t space_page_size(space->flags);
-
- if (!table_page_size.equals_to(space_page_size)) {
-
- ib::warn() << "Flags mismatch: table=" << index->table->flags
- << ", tablespace=" << space->flags;
-
- mtr_commit(&mtr);
-
- return(false);
- }
+ const ulint zip_size = space->zip_size();
while (level != btr_page_get_level(page)) {
const rec_t* node_ptr;
@@ -4844,7 +4955,7 @@ btr_validate_level(
block = btr_block_get(
page_id_t(index->table->space_id,
left_page_no),
- table_page_size,
+ zip_size,
RW_SX_LATCH, index, &mtr);
page = buf_block_get_frame(block);
left_page_no = btr_page_get_prev(page);
@@ -4915,7 +5026,7 @@ loop:
right_block = btr_block_get(
page_id_t(index->table->space_id, right_page_no),
- table_page_size,
+ zip_size,
RW_SX_LATCH, index, &mtr);
right_page = buf_block_get_frame(right_block);
@@ -5095,14 +5206,14 @@ loop:
page_id_t(index->table
->space_id,
parent_right_page_no),
- table_page_size,
+ zip_size,
RW_SX_LATCH, index, &mtr);
}
right_block = btr_block_get(
page_id_t(index->table->space_id,
right_page_no),
- table_page_size,
+ zip_size,
RW_SX_LATCH, index, &mtr);
}
@@ -5180,21 +5291,21 @@ node_ptr_fails:
page_id_t(
index->table->space_id,
parent_right_page_no),
- table_page_size,
+ zip_size,
RW_SX_LATCH, index, &mtr);
}
} else if (parent_page_no != FIL_NULL) {
btr_block_get(
page_id_t(index->table->space_id,
parent_page_no),
- table_page_size,
+ zip_size,
RW_SX_LATCH, index, &mtr);
}
}
block = btr_block_get(
page_id_t(index->table->space_id, right_page_no),
- table_page_size,
+ zip_size,
RW_SX_LATCH, index, &mtr);
page = buf_block_get_frame(block);
@@ -5208,57 +5319,16 @@ node_ptr_fails:
}
/**************************************************************//**
-Do an index level validation of spaital index tree.
-@return true if no error found */
-static
-bool
-btr_validate_spatial_index(
-/*=======================*/
- dict_index_t* index, /*!< in: index */
- const trx_t* trx) /*!< in: transaction or NULL */
-{
-
- mtr_t mtr;
- bool ok = true;
-
- mtr.start();
-
- mtr_x_lock_index(index, &mtr);
-
- page_t* root = btr_root_get(index, &mtr);
- ulint n = btr_page_get_level(root);
-
-#ifdef UNIV_RTR_DEBUG
- fprintf(stderr, "R-tree level is %lu\n", n);
-#endif /* UNIV_RTR_DEBUG */
-
- for (ulint i = 0; i <= n; ++i) {
-#ifdef UNIV_RTR_DEBUG
- fprintf(stderr, "Level %lu:\n", n - i);
-#endif /* UNIV_RTR_DEBUG */
-
- if (!btr_validate_level(index, trx, n - i, true)) {
- ok = false;
- break;
- }
- }
-
- mtr.commit();
-
- return(ok);
-}
-
-/**************************************************************//**
Checks the consistency of an index tree.
@return DB_SUCCESS if ok, error code if not */
dberr_t
btr_validate_index(
/*===============*/
dict_index_t* index, /*!< in: index */
- const trx_t* trx, /*!< in: transaction or NULL */
- bool lockout)/*!< in: true if X-latch index is intended */
+ const trx_t* trx) /*!< in: transaction or NULL */
{
dberr_t err = DB_SUCCESS;
+ bool lockout = dict_index_is_spatial(index);
/* Full Text index are implemented by auxiliary tables,
not the B-tree */
@@ -5266,13 +5336,6 @@ btr_validate_index(
return(err);
}
- if (dict_index_is_spatial(index)) {
- if(!btr_validate_spatial_index(index, trx)) {
- err = DB_ERROR;
- }
- return(err);
- }
-
mtr_t mtr;
mtr_start(&mtr);
@@ -5288,13 +5351,13 @@ btr_validate_index(
page_t* root = btr_root_get(index, &mtr);
if (!root) {
- err = DB_CORRUPTION;
mtr_commit(&mtr);
- return err;
+ return DB_CORRUPTION;
}
ulint n = btr_page_get_level(root);
+ btr_validate_index_running++;
for (ulint i = 0; i <= n; ++i) {
if (!btr_validate_level(index, trx, n - i, lockout)) {
@@ -5303,6 +5366,14 @@ btr_validate_index(
}
mtr_commit(&mtr);
+ /* In theory we need release barrier here, so that
+ btr_validate_index_running decrement is guaranteed to
+ happen after latches are released.
+
+ Original code issued SEQ_CST on update and non-atomic
+ access on load. Which means it had broken synchronisation
+ as well. */
+ btr_validate_index_running--;
return(err);
}
@@ -5339,9 +5410,9 @@ btr_can_merge_with_page(
page = btr_cur_get_page(cursor);
const page_id_t page_id(index->table->space_id, page_no);
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
- mblock = btr_block_get(page_id, page_size, RW_X_LATCH, index, mtr);
+ mblock = btr_block_get(page_id, zip_size, RW_X_LATCH, index, mtr);
mpage = buf_block_get_frame(mblock);
n_recs = page_get_n_recs(page);
@@ -5357,7 +5428,7 @@ btr_can_merge_with_page(
/* If compression padding tells us that merging will result in
too packed up page i.e.: which is likely to cause compression
failure then don't merge the pages. */
- if (page_size.is_compressed() && page_is_leaf(mpage)
+ if (zip_size && page_is_leaf(mpage)
&& (page_get_data_size(mpage) + data_size
>= dict_index_zip_pad_optimal_page_size(index))) {
diff --git a/storage/innobase/btr/btr0bulk.cc b/storage/innobase/btr/btr0bulk.cc
index fdeba1e375b..5e0df4597f9 100644
--- a/storage/innobase/btr/btr0bulk.cc
+++ b/storage/innobase/btr/btr0bulk.cc
@@ -95,7 +95,7 @@ PageBulk::init()
if (new_page_zip) {
page_create_zip(new_block, m_index, m_level, 0,
- NULL, &m_mtr);
+ &m_mtr);
memset(FIL_PAGE_PREV + new_page, 0xff, 8);
page_zip_write_header(new_page_zip,
FIL_PAGE_PREV + new_page,
@@ -108,12 +108,12 @@ PageBulk::init()
} else {
ut_ad(!dict_index_is_spatial(m_index));
page_create(new_block, &m_mtr,
- dict_table_is_comp(m_index->table),
+ m_index->table->not_redundant(),
false);
- mlog_write_ulint(FIL_PAGE_PREV + new_page, FIL_NULL,
- MLOG_4BYTES, &m_mtr);
- mlog_write_ulint(FIL_PAGE_NEXT + new_page, FIL_NULL,
- MLOG_4BYTES, &m_mtr);
+ compile_time_assert(FIL_PAGE_NEXT
+ == FIL_PAGE_PREV + 4);
+ compile_time_assert(FIL_NULL == 0xffffffff);
+ mlog_memset(new_block, FIL_PAGE_PREV, 8, 0xff, &m_mtr);
mlog_write_ulint(PAGE_HEADER + PAGE_LEVEL + new_page,
m_level, MLOG_2BYTES, &m_mtr);
mlog_write_ull(PAGE_HEADER + PAGE_INDEX_ID + new_page,
@@ -122,7 +122,7 @@ PageBulk::init()
} else {
new_block = btr_block_get(
page_id_t(m_index->table->space_id, m_page_no),
- page_size_t(m_index->table->space->flags),
+ m_index->table->space->zip_size(),
RW_X_LATCH, m_index, &m_mtr);
new_page = buf_block_get_frame(new_block);
@@ -412,7 +412,7 @@ PageBulk::compress()
ut_ad(m_page_zip != NULL);
return(page_zip_compress(m_page_zip, m_page, m_index,
- page_zip_level, NULL, &m_mtr));
+ page_zip_level, &m_mtr));
}
/** Get node pointer
@@ -631,8 +631,9 @@ PageBulk::needExt(
const dtuple_t* tuple,
ulint rec_size)
{
- return(page_zip_rec_needs_ext(rec_size, m_is_comp,
- dtuple_get_n_fields(tuple), m_block->page.size));
+ return page_zip_rec_needs_ext(rec_size, m_is_comp,
+ dtuple_get_n_fields(tuple),
+ m_block->zip_size());
}
/** Store external record
@@ -708,7 +709,7 @@ PageBulk::latch()
__FILE__, __LINE__, &m_mtr)) {
m_block = buf_page_get_gen(page_id_t(m_index->table->space_id,
m_page_no),
- univ_page_size, RW_X_LATCH,
+ 0, RW_X_LATCH,
m_block, BUF_GET_IF_IN_POOL,
__FILE__, __LINE__, &m_mtr, &m_err);
@@ -1064,7 +1065,7 @@ BtrBulk::finish(dberr_t err)
ut_ad(last_page_no != FIL_NULL);
last_block = btr_block_get(
page_id_t(m_index->table->space_id, last_page_no),
- page_size_t(m_index->table->space->flags),
+ m_index->table->space->zip_size(),
RW_X_LATCH, m_index, &mtr);
first_rec = page_rec_get_next(
page_get_infimum_rec(last_block->frame));
@@ -1094,6 +1095,6 @@ BtrBulk::finish(dberr_t err)
ut_ad(!sync_check_iterate(dict_sync_check()));
ut_ad(err != DB_SUCCESS
- || btr_validate_index(m_index, NULL, false) == DB_SUCCESS);
+ || btr_validate_index(m_index, NULL) == DB_SUCCESS);
return(err);
}
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 95ac5db4e70..abb633b51b4 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -101,7 +101,7 @@ throughput clearly from about 100000. */
#define BTR_CUR_FINE_HISTORY_LENGTH 100000
/** Number of searches down the B-tree in btr_cur_search_to_nth_level(). */
-ulint btr_cur_n_non_sea;
+Atomic_counter<ulint> btr_cur_n_non_sea;
/** Old value of btr_cur_n_non_sea. Copied by
srv_refresh_innodb_monitor_stats(). Referenced by
srv_printf_innodb_monitor(). */
@@ -213,6 +213,7 @@ btr_rec_free_externally_stored_fields(
/** Latches the leaf page or pages requested.
@param[in] block leaf page where the search converged
@param[in] page_id page id of the leaf
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] latch_mode BTR_SEARCH_LEAF, ...
@param[in] cursor cursor
@param[in] mtr mini-transaction
@@ -221,7 +222,7 @@ btr_latch_leaves_t
btr_cur_latch_leaves(
buf_block_t* block,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint latch_mode,
btr_cur_t* cursor,
mtr_t* mtr)
@@ -252,7 +253,7 @@ btr_cur_latch_leaves(
mode = latch_mode == BTR_MODIFY_LEAF ? RW_X_LATCH : RW_S_LATCH;
latch_leaves.savepoints[1] = mtr_set_savepoint(mtr);
- get_block = btr_block_get(page_id, page_size, mode,
+ get_block = btr_block_get(page_id, zip_size, mode,
cursor->index, mtr);
latch_leaves.blocks[1] = get_block;
#ifdef UNIV_BTR_DEBUG
@@ -285,7 +286,7 @@ btr_cur_latch_leaves(
latch_leaves.savepoints[0] = mtr_set_savepoint(mtr);
get_block = btr_block_get(
page_id_t(page_id.space(), left_page_no),
- page_size, RW_X_LATCH, cursor->index, mtr);
+ zip_size, RW_X_LATCH, cursor->index, mtr);
latch_leaves.blocks[0] = get_block;
if (spatial) {
@@ -301,7 +302,7 @@ btr_cur_latch_leaves(
latch_leaves.savepoints[1] = mtr_set_savepoint(mtr);
get_block = btr_block_get(
- page_id, page_size, RW_X_LATCH, cursor->index, mtr);
+ page_id, zip_size, RW_X_LATCH, cursor->index, mtr);
latch_leaves.blocks[1] = get_block;
#ifdef UNIV_BTR_DEBUG
@@ -331,7 +332,7 @@ btr_cur_latch_leaves(
latch_leaves.savepoints[2] = mtr_set_savepoint(mtr);
get_block = btr_block_get(
page_id_t(page_id.space(), right_page_no),
- page_size, RW_X_LATCH, cursor->index, mtr);
+ zip_size, RW_X_LATCH, cursor->index, mtr);
latch_leaves.blocks[2] = get_block;
#ifdef UNIV_BTR_DEBUG
if (get_block) {
@@ -361,7 +362,7 @@ btr_cur_latch_leaves(
latch_leaves.savepoints[0] = mtr_set_savepoint(mtr);
get_block = btr_block_get(
page_id_t(page_id.space(), left_page_no),
- page_size, mode, cursor->index, mtr);
+ zip_size, mode, cursor->index, mtr);
latch_leaves.blocks[0] = get_block;
cursor->left_block = get_block;
#ifdef UNIV_BTR_DEBUG
@@ -373,7 +374,7 @@ btr_cur_latch_leaves(
}
latch_leaves.savepoints[1] = mtr_set_savepoint(mtr);
- get_block = btr_block_get(page_id, page_size, mode,
+ get_block = btr_block_get(page_id, zip_size, mode,
cursor->index, mtr);
latch_leaves.blocks[1] = get_block;
#ifdef UNIV_BTR_DEBUG
@@ -426,8 +427,12 @@ unreadable:
}
btr_cur_t cur;
+ /* Relax the assertion in rec_init_offsets(). */
+ ut_ad(!index->in_instant_init);
+ ut_d(index->in_instant_init = true);
dberr_t err = btr_cur_open_at_index_side(true, index, BTR_SEARCH_LEAF,
&cur, 0, mtr);
+ ut_d(index->in_instant_init = false);
if (err != DB_SUCCESS) {
index->table->corrupted = true;
return err;
@@ -461,8 +466,8 @@ unreadable:
return DB_CORRUPTION;
}
- if (info_bits != REC_INFO_MIN_REC_FLAG
- || (comp && rec_get_status(rec) != REC_STATUS_COLUMNS_ADDED)) {
+ if ((info_bits & ~REC_INFO_DELETED_FLAG) != REC_INFO_MIN_REC_FLAG
+ || (comp && rec_get_status(rec) != REC_STATUS_INSTANT)) {
incompatible:
ib::error() << "Table " << index->table->name
<< " contains unrecognizable instant ALTER metadata";
@@ -480,6 +485,117 @@ incompatible:
concurrent operations on the table, including table eviction
from the cache. */
+ if (info_bits & REC_INFO_DELETED_FLAG) {
+ /* This metadata record includes a BLOB that identifies
+ any dropped or reordered columns. */
+ ulint trx_id_offset = index->trx_id_offset;
+ /* If !index->trx_id_offset, the PRIMARY KEY contains
+ variable-length columns. For the metadata record,
+ variable-length columns should be written with zero
+ length. However, before MDEV-21088 was fixed, for
+ variable-length encoded PRIMARY KEY column of type
+ CHAR, we wrote more than zero bytes. That is why we
+ must determine the actual length of each PRIMARY KEY
+ column. The DB_TRX_ID will start right after any
+ PRIMARY KEY columns. */
+ ut_ad(index->n_uniq);
+
+ /* We cannot invoke rec_get_offsets() before
+ index->table->deserialise_columns(). Therefore,
+ we must duplicate some logic here. */
+ if (trx_id_offset) {
+ } else if (index->table->not_redundant()) {
+ /* The PRIMARY KEY contains variable-length columns.
+ For the metadata record, variable-length columns are
+ always written with zero length. The DB_TRX_ID will
+ start right after any fixed-length columns. */
+
+ /* OK, before MDEV-21088 was fixed, for
+ variable-length encoded PRIMARY KEY column of
+ type CHAR, we wrote more than zero bytes. In
+ order to allow affected tables to be accessed,
+ it would be nice to determine the actual
+ length of each PRIMARY KEY column. However, to
+ be able to do that, we should determine the
+ size of the null-bit bitmap in the metadata
+ record. And we cannot know that before reading
+ the metadata BLOB, whose starting point we are
+ trying to find here. (Although the PRIMARY KEY
+ columns cannot be NULL, we would have to know
+ where the lengths of variable-length PRIMARY KEY
+ columns start.)
+
+ So, unfortunately we cannot help users who
+ were affected by MDEV-21088 on a ROW_FORMAT=COMPACT
+ or ROW_FORMAT=DYNAMIC table. */
+
+ for (uint i = index->n_uniq; i--; ) {
+ trx_id_offset += index->fields[i].fixed_len;
+ }
+ } else if (rec_get_1byte_offs_flag(rec)) {
+ trx_id_offset = rec_1_get_field_end_info(
+ rec, index->n_uniq - 1);
+ ut_ad(!(trx_id_offset & REC_1BYTE_SQL_NULL_MASK));
+ trx_id_offset &= ~REC_1BYTE_SQL_NULL_MASK;
+ } else {
+ trx_id_offset = rec_2_get_field_end_info(
+ rec, index->n_uniq - 1);
+ ut_ad(!(trx_id_offset & REC_2BYTE_SQL_NULL_MASK));
+ trx_id_offset &= ~REC_2BYTE_SQL_NULL_MASK;
+ }
+
+ const byte* ptr = rec + trx_id_offset
+ + (DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN);
+
+ if (mach_read_from_4(ptr + BTR_EXTERN_LEN)) {
+ goto incompatible;
+ }
+
+ uint len = mach_read_from_4(ptr + BTR_EXTERN_LEN + 4);
+ if (!len
+ || mach_read_from_4(ptr + BTR_EXTERN_OFFSET)
+ != FIL_PAGE_DATA
+ || mach_read_from_4(ptr + BTR_EXTERN_SPACE_ID)
+ != space->id) {
+ goto incompatible;
+ }
+
+ buf_block_t* block = buf_page_get(
+ page_id_t(space->id,
+ mach_read_from_4(ptr + BTR_EXTERN_PAGE_NO)),
+ 0, RW_S_LATCH, mtr);
+ buf_block_dbg_add_level(block, SYNC_EXTERN_STORAGE);
+ if (fil_page_get_type(block->frame) != FIL_PAGE_TYPE_BLOB
+ || mach_read_from_4(&block->frame[FIL_PAGE_DATA
+ + BTR_BLOB_HDR_NEXT_PAGE_NO])
+ != FIL_NULL
+ || mach_read_from_4(&block->frame[FIL_PAGE_DATA
+ + BTR_BLOB_HDR_PART_LEN])
+ != len) {
+ goto incompatible;
+ }
+
+ /* The unused part of the BLOB page should be zero-filled. */
+ for (const byte* b = block->frame
+ + (FIL_PAGE_DATA + BTR_BLOB_HDR_SIZE) + len,
+ * const end = block->frame + srv_page_size
+ - BTR_EXTERN_LEN;
+ b < end; ) {
+ if (*b++) {
+ goto incompatible;
+ }
+ }
+
+ if (index->table->deserialise_columns(
+ &block->frame[FIL_PAGE_DATA + BTR_BLOB_HDR_SIZE],
+ len)) {
+ goto incompatible;
+ }
+
+ /* Proceed to initialize the default values of
+ any instantly added columns. */
+ }
+
mem_heap_t* heap = NULL;
rec_offs* offsets = rec_get_offsets(rec, index, NULL,
index->n_core_fields,
@@ -494,7 +610,8 @@ inconsistent:
record, it is also OK to perform READ UNCOMMITTED and
then ignore any extra fields, provided that
trx_sys.is_registered(DB_TRX_ID). */
- if (rec_offs_n_fields(offsets) > index->n_fields
+ if (rec_offs_n_fields(offsets)
+ > ulint(index->n_fields) + !!index->table->instant
&& !trx_sys.is_registered(current_trx(),
row_get_rec_trx_id(rec, index,
offsets))) {
@@ -502,10 +619,11 @@ inconsistent:
}
for (unsigned i = index->n_core_fields; i < index->n_fields; i++) {
- ulint len;
- const byte* data = rec_get_nth_field(rec, offsets, i, &len);
dict_col_t* col = index->fields[i].col;
- ut_ad(!col->is_instant());
+ const unsigned o = i + !!index->table->instant;
+ ulint len;
+ const byte* data = rec_get_nth_field(rec, offsets, o, &len);
+ ut_ad(!col->is_added());
ut_ad(!col->def_val.data);
col->def_val.len = len;
switch (len) {
@@ -516,7 +634,7 @@ inconsistent:
continue;
}
ut_ad(len != UNIV_SQL_DEFAULT);
- if (!rec_offs_nth_extern(offsets, i)) {
+ if (!rec_offs_nth_extern(offsets, o)) {
col->def_val.data = mem_heap_dup(
index->table->heap, data, len);
} else if (len < BTR_EXTERN_FIELD_REF_SIZE
@@ -528,7 +646,7 @@ inconsistent:
} else {
col->def_val.data = btr_copy_externally_stored_field(
&col->def_val.len, data,
- dict_table_page_size(index->table),
+ cur.page_cur.block->zip_size(),
len, index->table->heap);
}
}
@@ -597,30 +715,49 @@ bool btr_cur_instant_root_init(dict_index_t* index, const page_t* page)
const uint16_t n = page_get_instant(page);
- if (n < index->n_uniq + DATA_ROLL_PTR || n > index->n_fields) {
+ if (n < index->n_uniq + DATA_ROLL_PTR) {
/* The PRIMARY KEY (or hidden DB_ROW_ID) and
DB_TRX_ID,DB_ROLL_PTR columns must always be present
- as 'core' fields. All fields, including those for
- instantly added columns, must be present in the data
- dictionary. */
+ as 'core' fields. */
return true;
}
- if (memcmp(page_get_infimum_rec(page), "infimum", 8)
- || memcmp(page_get_supremum_rec(page), "supremum", 8)) {
- /* In a later format, these fields in a FIL_PAGE_TYPE_INSTANT
- root page could be repurposed for something else. */
+ if (n > REC_MAX_N_FIELDS) {
return true;
}
index->n_core_fields = n;
- ut_ad(!index->is_dummy);
- ut_d(index->is_dummy = true);
- index->n_core_null_bytes = n == index->n_fields
- ? UT_BITS_IN_BYTES(unsigned(index->n_nullable))
- : UT_BITS_IN_BYTES(index->get_n_nullable(n));
- ut_d(index->is_dummy = false);
- return false;
+
+ const rec_t* infimum = page_get_infimum_rec(page);
+ const rec_t* supremum = page_get_supremum_rec(page);
+
+ if (!memcmp(infimum, "infimum", 8)
+ && !memcmp(supremum, "supremum", 8)) {
+ if (n > index->n_fields) {
+ /* All fields, including those for instantly
+ added columns, must be present in the
+ data dictionary. */
+ return true;
+ }
+
+ ut_ad(!index->is_dummy);
+ ut_d(index->is_dummy = true);
+ index->n_core_null_bytes = UT_BITS_IN_BYTES(
+ index->get_n_nullable(n));
+ ut_d(index->is_dummy = false);
+ return false;
+ }
+
+ if (memcmp(infimum, field_ref_zero, 8)
+ || memcmp(supremum, field_ref_zero, 7)) {
+ /* The infimum and supremum records must either contain
+ the original strings, or they must be filled with zero
+ bytes, except for the bytes that we have repurposed. */
+ return true;
+ }
+
+ index->n_core_null_bytes = supremum[7];
+ return index->n_core_null_bytes > 128;
}
/** Optimistically latches the leaf page or pages requested.
@@ -674,9 +811,8 @@ btr_cur_optimistic_latch_leaves(
cursor->left_block = buf_page_get_gen(
page_id_t(cursor->index->table->space_id,
left_page_no),
- page_size_t(cursor->index->table->space
- ->flags),
- mode, NULL, BUF_GET_POSSIBLY_FREED,
+ cursor->index->table->space->zip_size(),
+ mode, nullptr, BUF_GET_POSSIBLY_FREED,
__FILE__, __LINE__, mtr, &err);
if (err == DB_DECRYPTION_FAILED) {
@@ -794,7 +930,7 @@ btr_cur_latch_for_root_leaf(
@param[in] lock_intention lock intention for the tree operation
@param[in] rec record (current node_ptr)
@param[in] rec_size size of the record or max size of node_ptr
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] mtr mtr
@return true if tree modification is needed */
static
@@ -805,7 +941,7 @@ btr_cur_will_modify_tree(
btr_intention_t lock_intention,
const rec_t* rec,
ulint rec_size,
- const page_size_t& page_size,
+ ulint zip_size,
mtr_t* mtr)
{
ut_ad(!page_is_leaf(page));
@@ -913,9 +1049,8 @@ btr_cur_will_modify_tree(
This is based on the worst case, and we could invoke
page_zip_available() on the block->page.zip. */
/* needs 2 records' space also for worst compress rate. */
- if (page_size.is_compressed()
- && page_zip_empty_size(index->n_fields,
- page_size.physical())
+ if (zip_size
+ && page_zip_empty_size(index->n_fields, zip_size)
<= rec_size * 2 + page_get_data_size(page)
+ page_dir_calc_reserved_space(n_recs + 2)) {
return(true);
@@ -1325,7 +1460,7 @@ btr_cur_search_to_nth_level_func(
}
# endif /* BTR_CUR_HASH_ADAPT */
#endif /* BTR_CUR_ADAPT */
- my_atomic_addlint(&btr_cur_n_non_sea, 1);
+ btr_cur_n_non_sea++;
/* If the hash search did not succeed, do binary search down the
tree */
@@ -1348,7 +1483,7 @@ btr_cur_search_to_nth_level_func(
Free blocks and read IO bandwidth should be prior
for them, when the history list is glowing huge. */
if (lock_intention == BTR_INTENTION_DELETE
- && trx_sys.history_size() > BTR_CUR_FINE_HISTORY_LENGTH
+ && trx_sys.rseg_history_len > BTR_CUR_FINE_HISTORY_LENGTH
&& buf_get_n_pending_read_ios()) {
x_latch_index:
mtr_x_lock_index(index, mtr);
@@ -1405,7 +1540,7 @@ x_latch_index:
page_cursor = btr_cur_get_page_cur(cursor);
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
/* Start with the root page. */
page_id_t page_id(index->table->space_id, index->page);
@@ -1488,7 +1623,7 @@ search_loop:
retry_page_get:
ut_ad(n_blocks < BTR_MAX_LEVELS);
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
- block = buf_page_get_gen(page_id, page_size, rw_latch, guess,
+ block = buf_page_get_gen(page_id, zip_size, rw_latch, guess,
buf_mode, file, line, mtr, &err);
tree_blocks[n_blocks] = block;
@@ -1524,7 +1659,7 @@ retry_page_get:
ut_ad(!dict_index_is_spatial(index));
if (ibuf_insert(IBUF_OP_INSERT, tuple, index,
- page_id, page_size, cursor->thr)) {
+ page_id, zip_size, cursor->thr)) {
cursor->flag = BTR_CUR_INSERT_TO_IBUF;
@@ -1537,7 +1672,7 @@ retry_page_get:
ut_ad(!dict_index_is_spatial(index));
if (ibuf_insert(IBUF_OP_DELETE_MARK, tuple,
- index, page_id, page_size,
+ index, page_id, zip_size,
cursor->thr)) {
cursor->flag = BTR_CUR_DEL_MARK_IBUF;
@@ -1557,7 +1692,7 @@ retry_page_get:
/* The record cannot be purged yet. */
cursor->flag = BTR_CUR_DELETE_REF;
} else if (ibuf_insert(IBUF_OP_DELETE, tuple,
- index, page_id, page_size,
+ index, page_id, zip_size,
cursor->thr)) {
/* The purge was buffered. */
@@ -1603,7 +1738,7 @@ retry_page_get:
= mtr_set_savepoint(mtr);
get_block = buf_page_get_gen(
page_id_t(page_id.space(), left_page_no),
- page_size, rw_latch, NULL, buf_mode,
+ zip_size, rw_latch, NULL, buf_mode,
file, line, mtr, &err);
prev_tree_blocks[prev_n_blocks] = get_block;
prev_n_blocks++;
@@ -1633,7 +1768,7 @@ retry_page_get:
tree_blocks[n_blocks]);
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
- block = buf_page_get_gen(page_id, page_size, rw_latch, NULL,
+ block = buf_page_get_gen(page_id, zip_size, rw_latch, NULL,
buf_mode, file, line, mtr, &err);
tree_blocks[n_blocks] = block;
@@ -1700,17 +1835,11 @@ retry_page_get:
if (dict_index_is_spatial(index)) {
ut_ad(cursor->rtr_info);
- node_seq_t seq_no = rtr_get_current_ssn_id(index);
-
/* If SSN in memory is not initialized, fetch
it from root page */
- if (seq_no < 1) {
- node_seq_t root_seq_no;
-
- root_seq_no = page_get_ssn_id(page);
- my_atomic_store32_explicit(
- &index->rtr_ssn, root_seq_no + 1,
- MY_MEMORY_ORDER_RELAXED);
+ if (!rtr_get_current_ssn_id(index)) {
+ /* FIXME: do this in dict_load_table_one() */
+ index->set_ssn(page_get_ssn_id(page) + 1);
}
/* Save the MBR */
@@ -1727,7 +1856,7 @@ retry_page_get:
if (rw_latch == RW_NO_LATCH) {
latch_leaves = btr_cur_latch_leaves(
- block, page_id, page_size, latch_mode,
+ block, page_id, zip_size, latch_mode,
cursor, mtr);
}
@@ -2091,7 +2220,7 @@ need_opposite_intention:
&& latch_mode == BTR_MODIFY_TREE
&& !btr_cur_will_modify_tree(
index, page, lock_intention, node_ptr,
- node_ptr_max_size, page_size, mtr)
+ node_ptr_max_size, zip_size, mtr)
&& !rtree_parent_modified) {
ut_ad(upper_rw_latch == RW_X_LATCH);
ut_ad(n_releases <= n_blocks);
@@ -2289,12 +2418,12 @@ need_opposite_intention:
if (latch_mode == BTR_CONT_MODIFY_TREE) {
child_block = btr_block_get(
- page_id, page_size, RW_X_LATCH,
+ page_id, zip_size, RW_X_LATCH,
index, mtr);
} else {
ut_ad(latch_mode == BTR_CONT_SEARCH_TREE);
child_block = btr_block_get(
- page_id, page_size, RW_SX_LATCH,
+ page_id, zip_size, RW_SX_LATCH,
index, mtr);
}
@@ -2349,9 +2478,10 @@ need_opposite_intention:
ut_ad(index->is_instant());
/* This may be a search tuple for
btr_pcur_restore_position(). */
- ut_ad(tuple->info_bits == REC_INFO_METADATA
- || tuple->info_bits == REC_INFO_MIN_REC_FLAG);
- } else if (rec_is_metadata(btr_cur_get_rec(cursor), index)) {
+ ut_ad(tuple->is_metadata()
+ || (tuple->is_metadata(tuple->info_bits
+ ^ REC_STATUS_INSTANT)));
+ } else if (rec_is_metadata(btr_cur_get_rec(cursor), *index)) {
/* Only user records belong in the adaptive
hash index. */
} else {
@@ -2478,7 +2608,7 @@ btr_cur_open_at_index_side_func(
Free blocks and read IO bandwidth should be prior
for them, when the history list is glowing huge. */
if (lock_intention == BTR_INTENTION_DELETE
- && trx_sys.history_size() > BTR_CUR_FINE_HISTORY_LENGTH
+ && trx_sys.rseg_history_len > BTR_CUR_FINE_HISTORY_LENGTH
&& buf_get_n_pending_read_ios()) {
mtr_x_lock_index(index, mtr);
} else {
@@ -2511,7 +2641,7 @@ btr_cur_open_at_index_side_func(
cursor->index = index;
page_id_t page_id(index->table->space_id, index->page);
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
if (root_leaf_rw_latch == RW_X_LATCH) {
node_ptr_max_size = btr_node_ptr_max_size(index);
@@ -2534,7 +2664,7 @@ btr_cur_open_at_index_side_func(
}
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
- block = buf_page_get_gen(page_id, page_size, rw_latch, NULL,
+ block = buf_page_get_gen(page_id, zip_size, rw_latch, NULL,
BUF_GET, file, line, mtr, &err);
ut_ad((block != NULL) == (err == DB_SUCCESS));
tree_blocks[n_blocks] = block;
@@ -2590,12 +2720,12 @@ btr_cur_open_at_index_side_func(
if (height == level) {
if (srv_read_only_mode) {
btr_cur_latch_leaves(
- block, page_id, page_size,
+ block, page_id, zip_size,
latch_mode, cursor, mtr);
} else if (height == 0) {
if (rw_latch == RW_NO_LATCH) {
btr_cur_latch_leaves(
- block, page_id, page_size,
+ block, page_id, zip_size,
latch_mode, cursor, mtr);
}
/* In versions <= 3.23.52 we had
@@ -2726,7 +2856,7 @@ btr_cur_open_at_index_side_func(
if (latch_mode == BTR_MODIFY_TREE
&& !btr_cur_will_modify_tree(
cursor->index, page, lock_intention, node_ptr,
- node_ptr_max_size, page_size, mtr)) {
+ node_ptr_max_size, zip_size, mtr)) {
ut_ad(upper_rw_latch == RW_X_LATCH);
ut_ad(n_releases <= n_blocks);
@@ -2823,7 +2953,7 @@ btr_cur_open_at_rnd_pos_func(
Free blocks and read IO bandwidth should be prior
for them, when the history list is glowing huge. */
if (lock_intention == BTR_INTENTION_DELETE
- && trx_sys.history_size() > BTR_CUR_FINE_HISTORY_LENGTH
+ && trx_sys.rseg_history_len > BTR_CUR_FINE_HISTORY_LENGTH
&& buf_get_n_pending_read_ios()) {
mtr_x_lock_index(index, mtr);
} else {
@@ -2868,7 +2998,7 @@ btr_cur_open_at_rnd_pos_func(
cursor->index = index;
page_id_t page_id(index->table->space_id, index->page);
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
dberr_t err = DB_SUCCESS;
if (root_leaf_rw_latch == RW_X_LATCH) {
@@ -2892,7 +3022,7 @@ btr_cur_open_at_rnd_pos_func(
}
tree_savepoints[n_blocks] = mtr_set_savepoint(mtr);
- block = buf_page_get_gen(page_id, page_size, rw_latch, NULL,
+ block = buf_page_get_gen(page_id, zip_size, rw_latch, NULL,
BUF_GET, file, line, mtr, &err);
tree_blocks[n_blocks] = block;
@@ -2945,7 +3075,7 @@ btr_cur_open_at_rnd_pos_func(
if (rw_latch == RW_NO_LATCH
|| srv_read_only_mode) {
btr_cur_latch_leaves(
- block, page_id, page_size,
+ block, page_id, zip_size,
latch_mode, cursor, mtr);
}
@@ -3021,7 +3151,7 @@ btr_cur_open_at_rnd_pos_func(
if (latch_mode == BTR_MODIFY_TREE
&& !btr_cur_will_modify_tree(
cursor->index, page, lock_intention, node_ptr,
- node_ptr_max_size, page_size, mtr)) {
+ node_ptr_max_size, zip_size, mtr)) {
ut_ad(upper_rw_latch == RW_X_LATCH);
ut_ad(n_releases <= n_blocks);
@@ -3219,8 +3349,11 @@ btr_cur_ins_lock_and_undo(
roll_ptr = roll_ptr_t(1) << ROLL_PTR_INSERT_FLAG_POS;
if (!(flags & BTR_KEEP_SYS_FLAG)) {
upd_sys:
- row_upd_index_entry_sys_field(entry, index,
- DATA_ROLL_PTR, roll_ptr);
+ dfield_t* r = dtuple_get_nth_field(
+ entry, index->db_roll_ptr());
+ ut_ad(r->len == DATA_ROLL_PTR_LEN);
+ trx_write_roll_ptr(static_cast<byte*>(r->data),
+ roll_ptr);
}
} else {
err = trx_undo_report_row_operation(thr, index, entry,
@@ -3252,12 +3385,12 @@ btr_cur_prefetch_siblings(
if (left_page_no != FIL_NULL) {
buf_read_page_background(
page_id_t(block->page.id.space(), left_page_no),
- block->page.size, false);
+ block->zip_size(), false);
}
if (right_page_no != FIL_NULL) {
buf_read_page_background(
page_id_t(block->page.id.space(), right_page_no),
- block->page.size, false);
+ block->zip_size(), false);
}
if (left_page_no != FIL_NULL
|| right_page_no != FIL_NULL) {
@@ -3324,23 +3457,27 @@ btr_cur_optimistic_insert(
|| (flags & BTR_CREATE_FLAG));
ut_ad(dtuple_check_typed(entry));
- const page_size_t& page_size = block->page.size;
-
#ifdef HAVE_valgrind
- if (page_size.is_compressed()) {
- MEM_CHECK_DEFINED(page, page_size.logical());
- MEM_CHECK_DEFINED(block->page.zip.data, page_size.physical());
+ if (block->page.zip.data) {
+ MEM_CHECK_DEFINED(page, srv_page_size);
+ MEM_CHECK_DEFINED(block->page.zip.data, block->zip_size());
}
#endif /* HAVE_valgrind */
leaf = page_is_leaf(page);
+ if (UNIV_UNLIKELY(entry->is_alter_metadata())) {
+ ut_ad(leaf);
+ goto convert_big_rec;
+ }
+
/* Calculate the record size when entry is converted to a record */
rec_size = rec_get_converted_size(index, entry, n_ext);
if (page_zip_rec_needs_ext(rec_size, page_is_comp(page),
- dtuple_get_n_fields(entry), page_size)) {
-
+ dtuple_get_n_fields(entry),
+ block->zip_size())) {
+convert_big_rec:
/* The record is so big that we have to store some fields
externally on separate database pages */
big_rec_vec = dtuple_convert_big_rec(index, 0, entry, &n_ext);
@@ -3353,7 +3490,7 @@ btr_cur_optimistic_insert(
rec_size = rec_get_converted_size(index, entry, n_ext);
}
- if (page_size.is_compressed() && page_zip_is_too_big(index, entry)) {
+ if (block->page.zip.data && page_zip_is_too_big(index, entry)) {
if (big_rec_vec != NULL) {
dtuple_convert_back_big_rec(index, entry, big_rec_vec);
}
@@ -3364,7 +3501,7 @@ btr_cur_optimistic_insert(
LIMIT_OPTIMISTIC_INSERT_DEBUG(page_get_n_recs(page),
goto fail);
- if (leaf && page_size.is_compressed()
+ if (block->page.zip.data && leaf
&& (page_get_data_size(page) + rec_size
>= dict_index_zip_pad_optimal_page_size(index))) {
/* If compression padding tells us that insertion will
@@ -3413,7 +3550,7 @@ fail_err:
we have to split the page to reserve enough free space for
future updates of records. */
- if (leaf && !page_size.is_compressed() && dict_index_is_clust(index)
+ if (leaf && !block->page.zip.data && dict_index_is_clust(index)
&& page_get_n_recs(page) >= 2
&& dict_index_get_space_reserve() + rec_size > max_size
&& (btr_page_get_split_rec_to_right(cursor, &dummy)
@@ -3478,7 +3615,7 @@ fail_err:
}
if (*rec) {
- } else if (page_size.is_compressed()) {
+ } else if (block->page.zip.data) {
ut_ad(!index->table->is_temporary());
/* Reset the IBUF_BITMAP_FREE bits, because
page_cur_tuple_insert() will have attempted page
@@ -3519,7 +3656,7 @@ fail_err:
} else if (index->disable_ahi) {
# endif
} else if (entry->info_bits & REC_INFO_MIN_REC_FLAG) {
- ut_ad(entry->info_bits == REC_INFO_METADATA);
+ ut_ad(entry->is_metadata());
ut_ad(index->is_instant());
ut_ad(flags == BTR_NO_LOCKING_FLAG);
} else {
@@ -3554,7 +3691,7 @@ fail_err:
committed mini-transaction, because in crash recovery,
the free bits could momentarily be set too high. */
- if (page_size.is_compressed()) {
+ if (block->page.zip.data) {
/* Update the bits in the same mini-transaction. */
ibuf_update_free_bits_zip(block, mtr);
} else {
@@ -3652,9 +3789,14 @@ btr_cur_pessimistic_insert(
}
if (page_zip_rec_needs_ext(rec_get_converted_size(index, entry, n_ext),
- dict_table_is_comp(index->table),
+ index->table->not_redundant(),
dtuple_get_n_fields(entry),
- dict_table_page_size(index->table))) {
+ btr_cur_get_block(cursor)->zip_size())
+ || UNIV_UNLIKELY(entry->is_alter_metadata()
+ && !dfield_is_ext(
+ dtuple_get_nth_field(
+ entry,
+ index->first_user_field())))) {
/* The record is so big that we have to store some fields
externally on separate database pages */
@@ -3724,7 +3866,7 @@ btr_cur_pessimistic_insert(
if (index->disable_ahi); else
# endif
if (entry->info_bits & REC_INFO_MIN_REC_FLAG) {
- ut_ad(entry->info_bits == REC_INFO_METADATA);
+ ut_ad(entry->is_metadata());
ut_ad(index->is_instant());
ut_ad(flags & BTR_NO_LOCKING_FLAG);
ut_ad(!(flags & BTR_CREATE_FLAG));
@@ -3809,6 +3951,50 @@ btr_cur_upd_lock_and_undo(
cmpl_info, rec, offsets, roll_ptr));
}
+/** Copy DB_TRX_ID,DB_ROLL_PTR to the redo log.
+@param[in] index clustered index
+@param[in] trx_id_t DB_TRX_ID
+@param[in] roll_ptr DB_ROLL_PTR
+@param[in,out] log_ptr redo log buffer
+@return current end of the redo log buffer */
+static byte*
+btr_cur_log_sys(
+ const dict_index_t* index,
+ trx_id_t trx_id,
+ roll_ptr_t roll_ptr,
+ byte* log_ptr)
+{
+ log_ptr += mach_write_compressed(log_ptr, index->db_trx_id());
+ /* Yes, we are writing DB_ROLL_PTR,DB_TRX_ID in reverse order,
+ after emitting the position of DB_TRX_ID in the index.
+ This is how row_upd_write_sys_vals_to_log()
+ originally worked, and it is part of the redo log format. */
+ trx_write_roll_ptr(log_ptr, roll_ptr);
+ log_ptr += DATA_ROLL_PTR_LEN;
+ log_ptr += mach_u64_write_compressed(log_ptr, trx_id);
+
+ return log_ptr;
+}
+
+/** Write DB_TRX_ID,DB_ROLL_PTR to a clustered index entry.
+@param[in,out] entry clustered index entry
+@param[in] index clustered index
+@param[in] trx_id DB_TRX_ID
+@param[in] roll_ptr DB_ROLL_PTR */
+static void btr_cur_write_sys(
+ dtuple_t* entry,
+ const dict_index_t* index,
+ trx_id_t trx_id,
+ roll_ptr_t roll_ptr)
+{
+ dfield_t* t = dtuple_get_nth_field(entry, index->db_trx_id());
+ ut_ad(t->len == DATA_TRX_ID_LEN);
+ trx_write_trx_id(static_cast<byte*>(t->data), trx_id);
+ dfield_t* r = dtuple_get_nth_field(entry, index->db_roll_ptr());
+ ut_ad(r->len == DATA_ROLL_PTR_LEN);
+ trx_write_roll_ptr(static_cast<byte*>(r->data), roll_ptr);
+}
+
/***********************************************************//**
Writes a redo log record of updating a record in-place. */
void
@@ -3848,8 +4034,7 @@ btr_cur_update_in_place_log(
log_ptr++;
if (dict_index_is_clust(index)) {
- log_ptr = row_upd_write_sys_vals_to_log(
- index, trx_id, roll_ptr, log_ptr, mtr);
+ log_ptr = btr_cur_log_sys(index, trx_id, roll_ptr, log_ptr);
} else {
/* Dummy system fields for a secondary index */
/* TRX_ID Position */
@@ -4204,6 +4389,72 @@ func_exit:
return(err);
}
+/** Trim a metadata record during the rollback of instant ALTER TABLE.
+@param[in] entry metadata tuple
+@param[in] index primary key
+@param[in] update update vector for the rollback */
+ATTRIBUTE_COLD
+static void btr_cur_trim_alter_metadata(dtuple_t* entry,
+ const dict_index_t* index,
+ const upd_t* update)
+{
+ ut_ad(index->is_instant());
+ ut_ad(update->is_alter_metadata());
+ ut_ad(entry->is_alter_metadata());
+
+ ut_ad(update->fields[0].field_no == index->first_user_field());
+ ut_ad(update->fields[0].new_val.ext);
+ ut_ad(update->fields[0].new_val.len == FIELD_REF_SIZE);
+ ut_ad(entry->n_fields - 1 == index->n_fields);
+
+ const byte* ptr = static_cast<const byte*>(
+ update->fields[0].new_val.data);
+ ut_ad(!mach_read_from_4(ptr + BTR_EXTERN_LEN));
+ ut_ad(mach_read_from_4(ptr + BTR_EXTERN_LEN + 4) > 4);
+ ut_ad(mach_read_from_4(ptr + BTR_EXTERN_OFFSET) == FIL_PAGE_DATA);
+ ut_ad(mach_read_from_4(ptr + BTR_EXTERN_SPACE_ID)
+ == index->table->space->id);
+
+ ulint n_fields = update->fields[1].field_no;
+ ut_ad(n_fields <= index->n_fields);
+ if (n_fields != index->n_uniq) {
+ ut_ad(n_fields
+ >= index->n_core_fields);
+ entry->n_fields = n_fields;
+ return;
+ }
+
+ /* This is based on dict_table_t::deserialise_columns()
+ and btr_cur_instant_init_low(). */
+ mtr_t mtr;
+ mtr.start();
+ buf_block_t* block = buf_page_get(
+ page_id_t(index->table->space->id,
+ mach_read_from_4(ptr + BTR_EXTERN_PAGE_NO)),
+ 0, RW_S_LATCH, &mtr);
+ buf_block_dbg_add_level(block, SYNC_EXTERN_STORAGE);
+ ut_ad(fil_page_get_type(block->frame) == FIL_PAGE_TYPE_BLOB);
+ ut_ad(mach_read_from_4(&block->frame[FIL_PAGE_DATA
+ + BTR_BLOB_HDR_NEXT_PAGE_NO])
+ == FIL_NULL);
+ ut_ad(mach_read_from_4(&block->frame[FIL_PAGE_DATA
+ + BTR_BLOB_HDR_PART_LEN])
+ == mach_read_from_4(ptr + BTR_EXTERN_LEN + 4));
+ n_fields = mach_read_from_4(
+ &block->frame[FIL_PAGE_DATA + BTR_BLOB_HDR_SIZE])
+ + index->first_user_field();
+ /* Rollback should not increase the number of fields. */
+ ut_ad(n_fields <= index->n_fields);
+ ut_ad(n_fields + 1 <= entry->n_fields);
+ /* dict_index_t::clear_instant_alter() cannot be invoked while
+ rollback of an instant ALTER TABLE transaction is in progress
+ for an is_alter_metadata() record. */
+ ut_ad(n_fields >= index->n_core_fields);
+
+ mtr.commit();
+ entry->n_fields = n_fields + 1;
+}
+
/** Trim an update tuple due to instant ADD COLUMN, if needed.
For normal records, the trailing instantly added fields that match
the initial default values are omitted.
@@ -4225,13 +4476,12 @@ btr_cur_trim(
const que_thr_t* thr)
{
if (!index->is_instant()) {
- } else if (UNIV_UNLIKELY(update->info_bits == REC_INFO_METADATA)) {
+ } else if (UNIV_UNLIKELY(update->is_metadata())) {
/* We are either updating a metadata record
- (instantly adding columns to a table where instant ADD was
+ (instant ALTER TABLE on a table where instant ALTER was
already executed) or rolling back such an operation. */
ut_ad(!upd_get_nth_field(update, 0)->orig_len);
- ut_ad(upd_get_nth_field(update, 0)->field_no
- > index->n_core_fields);
+ ut_ad(entry->is_metadata());
if (thr->graph->trx->in_rollback) {
/* This rollback can occur either as part of
@@ -4248,6 +4498,13 @@ btr_cur_trim(
first instantly added column logged by
innobase_add_instant_try(). */
ut_ad(update->n_fields > 2);
+ if (update->is_alter_metadata()) {
+ btr_cur_trim_alter_metadata(
+ entry, index, update);
+ return;
+ }
+ ut_ad(!entry->is_alter_metadata());
+
ulint n_fields = upd_get_nth_field(update, 0)
->field_no;
ut_ad(n_fields + 1 >= entry->n_fields);
@@ -4333,9 +4590,7 @@ btr_cur_optimistic_update(
|| thr_get_trx(thr) == trx_roll_crash_recv_trx);
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
- const bool is_metadata = update->info_bits == REC_INFO_METADATA;
-
- if (UNIV_LIKELY(!is_metadata)
+ if (UNIV_LIKELY(!update->is_metadata())
&& !row_upd_changes_field_size_or_external(index, *offsets,
update)) {
@@ -4362,6 +4617,10 @@ any_extern:
return(DB_OVERFLOW);
}
+ if (rec_is_metadata(rec, *index) && index->table->instant) {
+ goto any_extern;
+ }
+
for (i = 0; i < upd_get_n_fields(update); i++) {
if (dfield_is_ext(&upd_get_nth_field(update, i)->new_val)) {
@@ -4404,7 +4663,7 @@ any_extern:
if (page_zip_rec_needs_ext(new_rec_size, page_is_comp(page),
dict_index_get_n_fields(index),
- dict_table_page_size(index->table))) {
+ block->zip_size())) {
goto any_extern;
}
@@ -4418,10 +4677,10 @@ any_extern:
}
/* We limit max record size to 16k even for 64k page size. */
- if (new_rec_size >= COMPRESSED_REC_MAX_DATA_SIZE ||
- (!dict_table_is_comp(index->table)
- && new_rec_size >= REDUNDANT_REC_MAX_DATA_SIZE)) {
- err = DB_OVERFLOW;
+ if (new_rec_size >= COMPRESSED_REC_MAX_DATA_SIZE ||
+ (!dict_table_is_comp(index->table)
+ && new_rec_size >= REDUNDANT_REC_MAX_DATA_SIZE)) {
+ err = DB_OVERFLOW;
goto func_exit;
}
@@ -4494,8 +4753,8 @@ any_extern:
lock_rec_store_on_page_infimum(block, rec);
}
- if (UNIV_UNLIKELY(is_metadata)) {
- ut_ad(new_entry->info_bits == REC_INFO_METADATA);
+ if (UNIV_UNLIKELY(update->is_metadata())) {
+ ut_ad(new_entry->is_metadata());
ut_ad(index->is_instant());
/* This can be innobase_add_instant_try() performing a
subsequent instant ADD COLUMN, or its rollback by
@@ -4510,10 +4769,7 @@ any_extern:
page_cur_move_to_prev(page_cursor);
if (!(flags & BTR_KEEP_SYS_FLAG)) {
- row_upd_index_entry_sys_field(new_entry, index, DATA_ROLL_PTR,
- roll_ptr);
- row_upd_index_entry_sys_field(new_entry, index, DATA_TRX_ID,
- trx_id);
+ btr_cur_write_sys(new_entry, index, trx_id, roll_ptr);
}
/* There are no externally stored columns in new_entry */
@@ -4521,7 +4777,7 @@ any_extern:
cursor, new_entry, offsets, heap, 0/*n_ext*/, mtr);
ut_a(rec); /* <- We calculated above the insert would fit */
- if (UNIV_UNLIKELY(is_metadata)) {
+ if (UNIV_UNLIKELY(update->is_metadata())) {
/* We must empty the PAGE_FREE list, because if this
was a rollback, the shortened metadata record
would have too many fields, and we would be unable to
@@ -4586,7 +4842,8 @@ btr_cur_pess_upd_restore_supremum(
const page_id_t page_id(block->page.id.space(), prev_page_no);
ut_ad(prev_page_no != FIL_NULL);
- prev_block = buf_page_get_with_no_latch(page_id, block->page.size, mtr);
+ prev_block = buf_page_get_with_no_latch(page_id, block->zip_size(),
+ mtr);
#ifdef UNIV_BTR_DEBUG
ut_a(btr_page_get_next(prev_block->frame) == block->page.id.page_no());
#endif /* UNIV_BTR_DEBUG */
@@ -4710,8 +4967,24 @@ btr_cur_pessimistic_update(
rec = btr_cur_get_rec(cursor);
ut_ad(rec_offs_validate(rec, index, *offsets));
- dtuple_t* new_entry = row_rec_to_index_entry(
- rec, index, *offsets, entry_heap);
+ dtuple_t* new_entry;
+
+ const bool is_metadata = rec_is_metadata(rec, *index);
+
+ if (UNIV_UNLIKELY(is_metadata)) {
+ ut_ad(update->is_metadata());
+ ut_ad(flags & BTR_NO_LOCKING_FLAG);
+ ut_ad(index->is_instant());
+ new_entry = row_metadata_to_tuple(
+ rec, index, *offsets, entry_heap,
+ update->info_bits, !thr_get_trx(thr)->in_rollback);
+ ut_ad(new_entry->n_fields
+ == ulint(index->n_fields)
+ + update->is_alter_metadata());
+ } else {
+ new_entry = row_rec_to_index_entry(rec, index, *offsets,
+ entry_heap);
+ }
/* The page containing the clustered index record
corresponding to new_entry is latched in mtr. If the
@@ -4723,9 +4996,6 @@ btr_cur_pessimistic_update(
entry_heap);
btr_cur_trim(new_entry, index, update, thr);
- const bool is_metadata = new_entry->info_bits
- & REC_INFO_MIN_REC_FLAG;
-
/* We have to set appropriate extern storage bits in the new
record to be inserted: we have to remember which fields were such */
@@ -4751,14 +5021,17 @@ btr_cur_pessimistic_update(
index, rec, page_zip, *offsets, update, true, mtr);
}
- ulint n_ext = dtuple_get_n_ext(new_entry);
+ ulint n_ext = index->is_primary() ? dtuple_get_n_ext(new_entry) : 0;
if (page_zip_rec_needs_ext(
- rec_get_converted_size(index, new_entry, n_ext),
- page_is_comp(page),
- dict_index_get_n_fields(index),
- block->page.size)) {
-
+ rec_get_converted_size(index, new_entry, n_ext),
+ page_is_comp(page),
+ dict_index_get_n_fields(index),
+ block->zip_size())
+ || (UNIV_UNLIKELY(update->is_alter_metadata())
+ && !dfield_is_ext(dtuple_get_nth_field(
+ new_entry,
+ index->first_user_field())))) {
big_rec_vec = dtuple_convert_big_rec(index, update, new_entry, &n_ext);
if (UNIV_UNLIKELY(big_rec_vec == NULL)) {
@@ -4807,10 +5080,7 @@ btr_cur_pessimistic_update(
}
if (!(flags & BTR_KEEP_SYS_FLAG)) {
- row_upd_index_entry_sys_field(new_entry, index, DATA_ROLL_PTR,
- roll_ptr);
- row_upd_index_entry_sys_field(new_entry, index, DATA_TRX_ID,
- trx_id);
+ btr_cur_write_sys(new_entry, index, trx_id, roll_ptr);
}
if (!page_zip) {
@@ -4819,10 +5089,10 @@ btr_cur_pessimistic_update(
}
if (UNIV_UNLIKELY(is_metadata)) {
- ut_ad(new_entry->info_bits == REC_INFO_METADATA);
+ ut_ad(new_entry->is_metadata());
ut_ad(index->is_instant());
/* This can be innobase_add_instant_try() performing a
- subsequent instant ADD COLUMN, or its rollback by
+ subsequent instant ALTER TABLE, or its rollback by
row_undo_mod_clust_low(). */
ut_ad(flags & BTR_NO_LOCKING_FLAG);
} else {
@@ -4866,12 +5136,18 @@ btr_cur_pessimistic_update(
btr_page_reorganize(page_cursor, index, mtr);
rec = page_cursor->rec;
rec_offs_make_valid(rec, index, true, *offsets);
+ if (page_cursor->block->page.id.page_no()
+ == index->page) {
+ btr_set_instant(page_cursor->block, *index,
+ mtr);
+ }
} else if (!dict_table_is_locking_disabled(index->table)) {
lock_rec_restore_from_page_infimum(
btr_cur_get_block(cursor), rec, block);
}
- if (!rec_get_deleted_flag(rec, rec_offs_comp(*offsets))) {
+ if (!rec_get_deleted_flag(rec, rec_offs_comp(*offsets))
+ || rec_is_alter_metadata(rec, *index)) {
/* The new inserted record owns its possible externally
stored fields */
btr_cur_unmark_extern_fields(
@@ -5081,8 +5357,7 @@ btr_cur_del_mark_set_clust_rec_log(
*log_ptr++ = 0;
*log_ptr++ = 1;
- log_ptr = row_upd_write_sys_vals_to_log(
- index, trx_id, roll_ptr, log_ptr, mtr);
+ log_ptr = btr_cur_log_sys(index, trx_id, roll_ptr, log_ptr);
mach_write_to_2(log_ptr, page_offset(rec));
log_ptr += 2;
@@ -5530,42 +5805,41 @@ btr_cur_optimistic_delete_func(
if (UNIV_UNLIKELY(block->page.id.page_no() == cursor->index->page
&& page_get_n_recs(block->frame) == 1
+ (cursor->index->is_instant()
- && !rec_is_metadata(rec, cursor->index)))) {
+ && !rec_is_metadata(rec, *cursor->index)))) {
/* The whole index (and table) becomes logically empty.
Empty the whole page. That is, if we are deleting the
only user record, also delete the metadata record
- if one exists (it exists if and only if is_instant()).
+ if one exists for instant ADD COLUMN (not generic ALTER TABLE).
If we are deleting the metadata record and the
table becomes empty, clean up the whole page. */
dict_index_t* index = cursor->index;
+ const rec_t* first_rec = page_rec_get_next_const(
+ page_get_infimum_rec(block->frame));
ut_ad(!index->is_instant()
- || rec_is_metadata(
- page_rec_get_next_const(
- page_get_infimum_rec(block->frame)),
- index));
- if (UNIV_UNLIKELY(rec_get_info_bits(rec, page_rec_is_comp(rec))
- & REC_INFO_MIN_REC_FLAG)) {
- /* This should be rolling back instant ADD COLUMN.
- If this is a recovered transaction, then
- index->is_instant() will hold until the
- insert into SYS_COLUMNS is rolled back. */
- ut_ad(index->table->supports_instant());
- ut_ad(index->is_primary());
- } else {
- lock_update_delete(block, rec);
- }
- btr_page_empty(block, buf_block_get_page_zip(block),
- index, 0, mtr);
- page_cur_set_after_last(block, btr_cur_get_page_cur(cursor));
-
- if (index->is_primary()) {
- /* Concurrent access is prevented by
- root_block->lock X-latch, so this should be
- safe. */
- index->remove_instant();
+ || rec_is_metadata(first_rec, *index));
+ const bool is_metadata = rec_is_metadata(rec, *index);
+ /* We can remove the metadata when rolling back an
+ instant ALTER TABLE operation, or when deleting the
+ last user record on the page such that only metadata for
+ instant ADD COLUMN (not generic ALTER TABLE) remains. */
+ const bool empty_table = is_metadata
+ || !index->is_instant()
+ || (first_rec != rec
+ && rec_is_add_metadata(first_rec, *index));
+ if (UNIV_LIKELY(empty_table)) {
+ if (UNIV_LIKELY(!is_metadata)) {
+ lock_update_delete(block, rec);
+ }
+ btr_page_empty(block, buf_block_get_page_zip(block),
+ index, 0, mtr);
+ if (index->is_instant()) {
+ /* MDEV-17383: free metadata BLOBs! */
+ index->clear_instant_alter();
+ }
+ page_cur_set_after_last(block,
+ btr_cur_get_page_cur(cursor));
+ goto func_exit;
}
-
- goto func_exit;
}
{
@@ -5739,10 +6013,10 @@ btr_cur_pessimistic_delete(
bool min_mark_next_rec = false;
if (page_is_leaf(page)) {
- const bool is_metadata = rec_get_info_bits(
- rec, page_rec_is_comp(rec)) & REC_INFO_MIN_REC_FLAG;
+ const bool is_metadata = rec_is_metadata(
+ rec, page_rec_is_comp(rec));
if (UNIV_UNLIKELY(is_metadata)) {
- /* This should be rolling back instant ADD COLUMN.
+ /* This should be rolling back instant ALTER TABLE.
If this is a recovered transaction, then
index->is_instant() will hold until the
insert into SYS_COLUMNS is rolled back. */
@@ -5758,30 +6032,34 @@ btr_cur_pessimistic_delete(
goto discard_page;
}
} else if (page_get_n_recs(page) == 1
- + (index->is_instant()
- && !rec_is_metadata(rec, index))) {
+ + (index->is_instant() && !is_metadata)) {
/* The whole index (and table) becomes logically empty.
Empty the whole page. That is, if we are deleting the
only user record, also delete the metadata record
- if one exists (it exists if and only if is_instant()).
- If we are deleting the metadata record and the
+ if one exists for instant ADD COLUMN
+ (not generic ALTER TABLE).
+ If we are deleting the metadata record
+ (in the rollback of instant ALTER TABLE) and the
table becomes empty, clean up the whole page. */
+
+ const rec_t* first_rec = page_rec_get_next_const(
+ page_get_infimum_rec(page));
ut_ad(!index->is_instant()
- || rec_is_metadata(
- page_rec_get_next_const(
- page_get_infimum_rec(page)),
- index));
- btr_page_empty(block, page_zip, index, 0, mtr);
- page_cur_set_after_last(block,
- btr_cur_get_page_cur(cursor));
- if (index->is_primary()) {
- /* Concurrent access is prevented by
- index->lock and root_block->lock
- X-latch, so this should be safe. */
- index->remove_instant();
+ || rec_is_metadata(first_rec, *index));
+ if (is_metadata || !index->is_instant()
+ || (first_rec != rec
+ && rec_is_add_metadata(first_rec, *index))) {
+ btr_page_empty(block, page_zip, index, 0, mtr);
+ if (index->is_instant()) {
+ /* MDEV-17383: free metadata BLOBs! */
+ index->clear_instant_alter();
+ }
+ page_cur_set_after_last(
+ block,
+ btr_cur_get_page_cur(cursor));
+ ret = TRUE;
+ goto return_after_reservations;
}
- ret = TRUE;
- goto return_after_reservations;
}
if (UNIV_LIKELY(!is_metadata)) {
@@ -5883,7 +6161,7 @@ discard_page:
|| btr_cur_will_modify_tree(
index, page, BTR_INTENTION_DELETE, rec,
btr_node_ptr_max_size(index),
- block->page.size, mtr);
+ block->zip_size(), mtr);
page_cur_delete_rec(btr_cur_get_page_cur(cursor), index,
offsets, mtr);
@@ -6055,7 +6333,7 @@ btr_estimate_n_rows_in_range_on_level(
const fil_space_t* space = index->table->space;
page_id_t page_id(space->id, slot1->page_no);
- const page_size_t page_size(space->flags);
+ const ulint zip_size = space->zip_size();
level = slot1->page_level;
@@ -6072,7 +6350,7 @@ btr_estimate_n_rows_in_range_on_level(
attempting to read a page that is no longer part of
the B-tree. We pass BUF_GET_POSSIBLY_FREED in order to
silence a debug assertion about this. */
- block = buf_page_get_gen(page_id, page_size, RW_S_LATCH,
+ block = buf_page_get_gen(page_id, zip_size, RW_S_LATCH,
NULL, BUF_GET_POSSIBLY_FREED,
__FILE__, __LINE__, &mtr, &err);
@@ -7205,7 +7483,7 @@ struct btr_blob_log_check_t {
if (UNIV_UNLIKELY(m_op == BTR_STORE_INSERT_BULK)) {
m_pcur->btr_cur.page_cur.block = btr_block_get(
page_id_t(index->table->space_id, page_no),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_X_LATCH, index, m_mtr);
m_pcur->btr_cur.page_cur.rec
= m_pcur->btr_cur.page_cur.block->frame
@@ -7294,9 +7572,6 @@ btr_store_big_rec_extern_fields(
ut_ad(buf_block_get_frame(rec_block) == page_align(rec));
ut_a(dict_index_is_clust(index));
- ut_a(dict_table_page_size(index->table)
- .equals_to(rec_block->page.size));
-
btr_blob_log_check_t redo_log(pcur, btr_mtr, offsets, &rec_block,
&rec, op);
page_zip = buf_block_get_page_zip(rec_block);
@@ -7340,15 +7615,13 @@ btr_store_big_rec_extern_fields(
}
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
- const page_size_t page_size(dict_table_page_size(index->table));
-
/* Space available in compressed page to carry blob data */
- const ulint payload_size_zip = page_size.physical()
+ const ulint payload_size_zip = rec_block->physical_size()
- FIL_PAGE_DATA;
/* Space available in uncompressed page to carry blob data */
- const ulint payload_size = page_size.physical()
- - FIL_PAGE_DATA - BTR_BLOB_HDR_SIZE - FIL_PAGE_DATA_END;
+ const ulint payload_size = payload_size_zip
+ - (BTR_BLOB_HDR_SIZE + FIL_PAGE_DATA_END);
/* We have to create a file segment to the tablespace
for each field and put the pointer to the field in rec */
@@ -7402,7 +7675,7 @@ btr_store_big_rec_extern_fields(
mtr.set_flush_observer(btr_mtr->get_flush_observer());
buf_page_get(rec_block->page.id,
- rec_block->page.size, RW_X_LATCH, &mtr);
+ rec_block->zip_size(), RW_X_LATCH, &mtr);
if (prev_page_no == FIL_NULL) {
hint_page_no = 1 + rec_page_no;
@@ -7450,7 +7723,7 @@ btr_store_big_rec_extern_fields(
prev_block = buf_page_get(
page_id_t(space_id, prev_page_no),
- rec_block->page.size,
+ rec_block->zip_size(),
RW_X_LATCH, &mtr);
buf_block_dbg_add_level(prev_block,
@@ -7506,22 +7779,25 @@ btr_store_big_rec_extern_fields(
ut_a(err == Z_STREAM_END
|| c_stream.avail_out == 0);
- /* Write the "next BLOB page" pointer */
- mlog_write_ulint(page + FIL_PAGE_NEXT,
- FIL_NULL, MLOG_4BYTES, &mtr);
- /* Initialize the unused "prev page" pointer */
- mlog_write_ulint(page + FIL_PAGE_PREV,
- FIL_NULL, MLOG_4BYTES, &mtr);
-
- /* Zero out the unused part of the page. */
- memset(page + page_zip_get_size(page_zip)
- - c_stream.avail_out,
- 0, c_stream.avail_out);
+ compile_time_assert(FIL_PAGE_NEXT
+ == FIL_PAGE_PREV + 4);
+ compile_time_assert(FIL_NULL == 0xffffffff);
+ mlog_memset(block, FIL_PAGE_PREV, 8, 0xff,
+ &mtr);
mlog_log_string(page
+ FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
page_zip_get_size(page_zip)
- - FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
+ - FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+ - c_stream.avail_out,
&mtr);
+ /* Zero out the unused part of the page. */
+ if (c_stream.avail_out) {
+ mlog_memset(block,
+ page_zip_get_size(page_zip)
+ - c_stream.avail_out,
+ c_stream.avail_out,
+ 0, &mtr);
+ }
/* Copy the page to compressed storage,
because it will be flushed to disk
from there. */
@@ -7782,10 +8058,9 @@ btr_free_externally_stored_field(
ut_ad(space_id == index->table->space->id);
ut_ad(space_id == index->table->space_id);
- const page_size_t ext_page_size(dict_table_page_size(index->table));
- const page_size_t& rec_page_size(rec == NULL
- ? univ_page_size
- : ext_page_size);
+ const ulint ext_zip_size = index->table->space->zip_size();
+ const ulint rec_zip_size = rec ? ext_zip_size : 0;
+
if (rec == NULL) {
/* This is a call from row_purge_upd_exist_or_extern(). */
ut_ad(!page_zip);
@@ -7812,7 +8087,7 @@ btr_free_externally_stored_field(
#ifdef UNIV_DEBUG
rec_block =
#endif /* UNIV_DEBUG */
- buf_page_get(page_id, rec_page_size, RW_X_LATCH, &mtr);
+ buf_page_get(page_id, rec_zip_size, RW_X_LATCH, &mtr);
buf_block_dbg_add_level(rec_block, SYNC_NO_ORDER_CHECK);
page_no = mach_read_from_4(field_ref + BTR_EXTERN_PAGE_NO);
@@ -7838,13 +8113,13 @@ btr_free_externally_stored_field(
}
ext_block = buf_page_get(
- page_id_t(space_id, page_no), ext_page_size,
+ page_id_t(space_id, page_no), ext_zip_size,
RW_X_LATCH, &mtr);
buf_block_dbg_add_level(ext_block, SYNC_EXTERN_STORAGE);
page = buf_block_get_frame(ext_block);
- if (ext_page_size.is_compressed()) {
+ if (ext_zip_size) {
/* Note that page_zip will be NULL
in row_purge_upd_exist_or_extern(). */
switch (fil_page_get_type(page)) {
@@ -8013,7 +8288,7 @@ btr_copy_blob_prefix(
mtr_start(&mtr);
block = buf_page_get(page_id_t(space_id, page_no),
- univ_page_size, RW_S_LATCH, &mtr);
+ 0, RW_S_LATCH, &mtr);
buf_block_dbg_add_level(block, SYNC_EXTERN_STORAGE);
page = buf_block_get_frame(block);
@@ -8051,7 +8326,7 @@ by a lock or a page latch.
@param[out] buf the externally stored part of the field,
or a prefix of it
@param[in] len length of buf, in bytes
-@param[in] page_size compressed BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size
@param[in] space_id space id of the BLOB pages
@param[in] offset offset on the first BLOB page
@return number of bytes written to buf */
@@ -8060,7 +8335,7 @@ ulint
btr_copy_zblob_prefix(
byte* buf,
ulint len,
- const page_size_t& page_size,
+ ulint zip_size,
ulint space_id,
ulint page_no,
ulint offset)
@@ -8080,7 +8355,8 @@ btr_copy_zblob_prefix(
heap = mem_heap_create(40000);
page_zip_set_alloc(&d_stream, heap);
- ut_ad(page_size.is_compressed());
+ ut_ad(zip_size);
+ ut_ad(ut_is_2pow(zip_size));
ut_ad(space_id);
err = inflateInit(&d_stream);
@@ -8095,7 +8371,7 @@ btr_copy_zblob_prefix(
is being held on the clustered index record, or,
in row_merge_copy_blobs(), by an exclusive table lock. */
bpage = buf_page_get_zip(page_id_t(space_id, page_no),
- page_size);
+ zip_size);
if (UNIV_UNLIKELY(!bpage)) {
ib::error() << "Cannot load compressed BLOB "
@@ -8127,8 +8403,7 @@ btr_copy_zblob_prefix(
}
d_stream.next_in = bpage->zip.data + offset;
- d_stream.avail_in = static_cast<uInt>(page_size.physical()
- - offset);
+ d_stream.avail_in = uInt(zip_size - offset);
err = inflate(&d_stream, Z_NO_FLUSH);
switch (err) {
@@ -8198,7 +8473,7 @@ by a lock or a page latch.
@param[out] buf the externally stored part of the
field, or a prefix of it
@param[in] len length of buf, in bytes
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] space_id space id of the first BLOB page
@param[in] page_no page number of the first BLOB page
@param[in] offset offset on the first BLOB page
@@ -8208,7 +8483,7 @@ ulint
btr_copy_externally_stored_field_prefix_low(
byte* buf,
ulint len,
- const page_size_t& page_size,
+ ulint zip_size,
ulint space_id,
ulint page_no,
ulint offset)
@@ -8217,11 +8492,10 @@ btr_copy_externally_stored_field_prefix_low(
return(0);
}
- if (page_size.is_compressed()) {
- return(btr_copy_zblob_prefix(buf, len, page_size,
+ if (zip_size) {
+ return(btr_copy_zblob_prefix(buf, len, zip_size,
space_id, page_no, offset));
} else {
- ut_ad(page_size.equals_to(univ_page_size));
return(btr_copy_blob_prefix(buf, len, space_id,
page_no, offset));
}
@@ -8231,7 +8505,7 @@ btr_copy_externally_stored_field_prefix_low(
The clustered index record must be protected by a lock or a page latch.
@param[out] buf the field, or a prefix of it
@param[in] len length of buf, in bytes
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] data 'internally' stored part of the field
containing also the reference to the external part; must be protected by
a lock or a page latch
@@ -8242,7 +8516,7 @@ ulint
btr_copy_externally_stored_field_prefix(
byte* buf,
ulint len,
- const page_size_t& page_size,
+ ulint zip_size,
const byte* data,
ulint local_len)
{
@@ -8281,7 +8555,7 @@ btr_copy_externally_stored_field_prefix(
return(local_len
+ btr_copy_externally_stored_field_prefix_low(buf + local_len,
len - local_len,
- page_size,
+ zip_size,
space_id, page_no,
offset));
}
@@ -8292,7 +8566,7 @@ The clustered index record must be protected by a lock or a page latch.
@param[in] data 'internally' stored part of the field
containing also the reference to the external part; must be protected by
a lock or a page latch
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] local_len length of data
@param[in,out] heap mem heap
@return the whole field copied to heap */
@@ -8300,7 +8574,7 @@ byte*
btr_copy_externally_stored_field(
ulint* len,
const byte* data,
- const page_size_t& page_size,
+ ulint zip_size,
ulint local_len,
mem_heap_t* heap)
{
@@ -8331,7 +8605,7 @@ btr_copy_externally_stored_field(
*len = local_len
+ btr_copy_externally_stored_field_prefix_low(buf + local_len,
extern_len,
- page_size,
+ zip_size,
space_id,
page_no, offset);
@@ -8342,7 +8616,7 @@ btr_copy_externally_stored_field(
@param[in] rec record in a clustered index; must be
protected by a lock or a page latch
@param[in] offset array returned by rec_get_offsets()
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] no field number
@param[out] len length of the field
@param[in,out] heap mem heap
@@ -8351,7 +8625,7 @@ byte*
btr_rec_copy_externally_stored_field(
const rec_t* rec,
const rec_offs* offsets,
- const page_size_t& page_size,
+ ulint zip_size,
ulint no,
ulint* len,
mem_heap_t* heap)
@@ -8385,5 +8659,5 @@ btr_rec_copy_externally_stored_field(
}
return(btr_copy_externally_stored_field(len, data,
- page_size, local_len, heap));
+ zip_size, local_len, heap));
}
diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc
index 3fefd77041e..67076e7a515 100644
--- a/storage/innobase/btr/btr0defragment.cc
+++ b/storage/innobase/btr/btr0defragment.cc
@@ -62,14 +62,14 @@ UNIV_INTERN mysql_pfs_key_t btr_defragment_mutex_key;
/* Number of compression failures caused by defragmentation since server
start. */
-ulint btr_defragment_compression_failures = 0;
+Atomic_counter<ulint> btr_defragment_compression_failures;
/* Number of btr_defragment_n_pages calls that altered page but didn't
manage to release any page. */
-ulint btr_defragment_failures = 0;
+Atomic_counter<ulint> btr_defragment_failures;
/* Total number of btr_defragment_n_pages calls that altered page.
The difference between btr_defragment_count and btr_defragment_failures shows
the amount of effort wasted. */
-ulint btr_defragment_count = 0;
+Atomic_counter<ulint> btr_defragment_count;
/******************************************************************//**
Constructor for btr_defragment_item_t. */
@@ -163,7 +163,7 @@ btr_defragment_add_index(
// Load index rood page.
buf_block_t* block = btr_block_get(
page_id_t(index->table->space_id, index->page),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_NO_LATCH, index, &mtr);
page_t* page = NULL;
@@ -374,7 +374,7 @@ btr_defragment_merge_pages(
dict_index_t* index, /*!< in: index tree */
buf_block_t* from_block, /*!< in: origin of merge */
buf_block_t* to_block, /*!< in: destination of merge */
- const page_size_t page_size, /*!< in: page size of the block */
+ ulint zip_size, /*!< in: ROW_FORMAT=COMPRESSED size */
ulint reserved_space, /*!< in: space reserved for future
insert to avoid immediate page split */
ulint* max_data_size, /*!< in/out: max data size to
@@ -402,7 +402,7 @@ btr_defragment_merge_pages(
// Estimate how many records can be moved from the from_page to
// the to_page.
- if (page_size.is_compressed()) {
+ if (zip_size) {
ulint page_diff = srv_page_size - *max_data_size;
max_ins_size_to_use = (max_ins_size_to_use > page_diff)
? max_ins_size_to_use - page_diff : 0;
@@ -446,8 +446,7 @@ btr_defragment_merge_pages(
// n_recs_to_move number of records to to_page. We try to reduce
// the targeted data size on the to_page by
// BTR_DEFRAGMENT_PAGE_REDUCTION_STEP_SIZE and try again.
- my_atomic_addlint(
- &btr_defragment_compression_failures, 1);
+ btr_defragment_compression_failures++;
max_ins_size_to_use =
move_size > BTR_DEFRAGMENT_PAGE_REDUCTION_STEP_SIZE
? move_size - BTR_DEFRAGMENT_PAGE_REDUCTION_STEP_SIZE
@@ -471,7 +470,7 @@ btr_defragment_merge_pages(
// Set ibuf free bits if necessary.
if (!dict_index_is_clust(index)
&& page_is_leaf(to_page)) {
- if (page_size.is_compressed()) {
+ if (zip_size) {
ibuf_reset_free_bits(to_block);
} else {
ibuf_update_free_bits_if_full(
@@ -490,7 +489,7 @@ btr_defragment_merge_pages(
ut_a(DB_SUCCESS == btr_level_list_remove(
index->table->space_id,
- page_size, from_page, index, mtr));
+ zip_size, from_page, index, mtr));
btr_page_get_father(index, from_block, mtr, &parent);
btr_cur_node_ptr_delete(&parent, mtr);
/* btr_blob_dbg_remove(from_page, index,
@@ -577,7 +576,7 @@ btr_defragment_n_pages(
}
first_page = buf_block_get_frame(block);
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
/* 1. Load the pages and calculate the total data size. */
blocks[0] = block;
@@ -593,7 +592,7 @@ btr_defragment_n_pages(
}
blocks[i] = btr_block_get(page_id_t(index->table->space_id,
- page_no), page_size,
+ page_no), zip_size,
RW_X_LATCH, index, mtr);
}
@@ -619,7 +618,7 @@ btr_defragment_n_pages(
optimal_page_size = page_get_free_space_of_empty(
page_is_comp(first_page));
// For compressed pages, we take compression failures into account.
- if (page_size.is_compressed()) {
+ if (zip_size) {
ulint size = 0;
uint i = 0;
// We estimate the optimal data size of the index use samples of
@@ -662,7 +661,7 @@ btr_defragment_n_pages(
// Start from the second page.
for (uint i = 1; i < n_pages; i ++) {
buf_block_t* new_block = btr_defragment_merge_pages(
- index, blocks[i], current_block, page_size,
+ index, blocks[i], current_block, zip_size,
reserved_space, &max_data_size, heap, mtr);
if (new_block != current_block) {
n_defragmented ++;
@@ -671,11 +670,9 @@ btr_defragment_n_pages(
}
mem_heap_free(heap);
n_defragmented ++;
- my_atomic_addlint(
- &btr_defragment_count, 1);
+ btr_defragment_count++;
if (n_pages == n_defragmented) {
- my_atomic_addlint(
- &btr_defragment_failures, 1);
+ btr_defragment_failures++;
} else {
index->stat_defrag_n_pages_freed += (n_pages - n_defragmented);
}
diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc
index 53963caa023..c31db34186c 100644
--- a/storage/innobase/btr/btr0pcur.cc
+++ b/storage/innobase/btr/btr0pcur.cc
@@ -129,14 +129,13 @@ btr_pcur_store_position(
cursor->old_stored = true;
if (page_is_empty(block->frame)) {
- ut_ad(block->page.id.page_no() == index->page);
-empty_table:
/* It must be an empty index tree; NOTE that in this case
we do not store the modify_clock, but always do a search
if we restore the cursor position */
ut_a(!page_has_siblings(block->frame));
ut_ad(page_is_leaf(block->frame));
+ ut_ad(block->page.id.page_no() == index->page);
if (page_rec_is_supremum_low(offs)) {
cursor->rel_pos = BTR_PCUR_AFTER_LAST_IN_TREE;
@@ -152,21 +151,21 @@ before_first:
rec = page_rec_get_prev(rec);
ut_ad(!page_rec_is_infimum(rec));
-
- if (UNIV_UNLIKELY(rec_is_metadata(rec, index))) {
- /* The table may be empty such that it only
- contains a metadata record, in a leaf page
- that is not the root page. */
- ut_ad(index->is_primary());
- ut_ad(block->page.id.page_no() != index->page);
- goto empty_table;
+ if (UNIV_UNLIKELY(rec_is_metadata(rec, *index))) {
+ ut_ad(index->table->instant
+ || block->page.id.page_no() != index->page);
+ ut_ad(page_get_n_recs(block->frame) == 1);
+ ut_ad(page_is_leaf(block->frame));
+ ut_ad(!page_has_prev(block->frame));
+ cursor->rel_pos = BTR_PCUR_AFTER_LAST_IN_TREE;
+ return;
}
cursor->rel_pos = BTR_PCUR_AFTER;
} else if (page_rec_is_infimum_low(offs)) {
rec = page_rec_get_next(rec);
- if (rec_is_metadata(rec, index)) {
+ if (rec_is_metadata(rec, *index)) {
ut_ad(!page_has_prev(block->frame));
rec = page_rec_get_next(rec);
if (page_rec_is_supremum(rec)) {
@@ -179,10 +178,9 @@ before_first:
cursor->rel_pos = BTR_PCUR_ON;
}
- UNIV_PREFETCH_R(rec);
-
if (index->is_ibuf()) {
- cursor->old_n_fields = uint16(rec_get_n_fields_old(rec));
+ ut_ad(!index->table->not_redundant());
+ cursor->old_n_fields = uint16_t(rec_get_n_fields_old(rec));
} else {
cursor->old_n_fields = static_cast<uint16>(
dict_index_get_n_unique_in_tree(index));
@@ -201,7 +199,6 @@ before_first:
cursor->old_n_fields,
&cursor->old_rec_buf,
&cursor->buf_size);
-
cursor->block_when_stored.store(block);
/* Function try to check if block is S/X latch. */
@@ -522,7 +519,7 @@ btr_pcur_move_to_next_page(
next_block = btr_block_get(
page_id_t(block->page.id.space(), next_page_no),
- block->page.size, mode,
+ block->zip_size(), mode,
btr_pcur_get_btr_cur(cursor)->index, mtr);
if (UNIV_UNLIKELY(!next_block)) {
diff --git a/storage/innobase/btr/btr0scrub.cc b/storage/innobase/btr/btr0scrub.cc
index 74969e1f39a..c25d2e42555 100644
--- a/storage/innobase/btr/btr0scrub.cc
+++ b/storage/innobase/btr/btr0scrub.cc
@@ -119,13 +119,13 @@ btr_scrub_lock_dict_func(ulint space_id, bool lock_to_close_table,
time_t last = start;
/* FIXME: this is not the proper way of doing things. The
- dict_sys->mutex should not be held by any thread for longer
+ dict_sys.mutex should not be held by any thread for longer
than a few microseconds. It must not be held during I/O,
for example. So, what is the purpose for this busy-waiting?
This function should be rewritten as part of MDEV-8139:
Fix scrubbing tests. */
- while (mutex_enter_nowait(&(dict_sys->mutex))) {
+ while (mutex_enter_nowait(&dict_sys.mutex)) {
/* if we lock to close a table, we wait forever
* if we don't lock to close a table, we check if space
* is closing, and then instead give up
@@ -157,7 +157,7 @@ btr_scrub_lock_dict_func(ulint space_id, bool lock_to_close_table,
}
}
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
return true;
}
@@ -204,10 +204,10 @@ btr_scrub_table_close_for_thread(
/* If tablespace is not marked as stopping perform
the actual close. */
if (!space->is_stopping()) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* perform the actual closing */
btr_scrub_table_close(scrub_data->current_table);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
space->release();
}
@@ -431,10 +431,10 @@ btr_pessimistic_scrub(
}
/* read block variables */
- const ulint page_no = mach_read_from_4(page + FIL_PAGE_OFFSET);
+ const uint32_t page_no = mach_read_from_4(page + FIL_PAGE_OFFSET);
const uint32_t left_page_no = btr_page_get_prev(page);
const uint32_t right_page_no = btr_page_get_next(page);
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
/**
* When splitting page, we need X-latches on left/right brothers
@@ -449,16 +449,16 @@ btr_pessimistic_scrub(
*/
mtr->release_block_at_savepoint(scrub_data->savepoint, block);
- buf_block_t* get_block __attribute__((unused)) = btr_block_get(
+ btr_block_get(
page_id_t(index->table->space_id, left_page_no),
- page_size, RW_X_LATCH, index, mtr);
+ zip_size, RW_X_LATCH, index, mtr);
/**
* Refetch block and re-initialize page
*/
block = btr_block_get(
page_id_t(index->table->space_id, page_no),
- page_size, RW_X_LATCH, index, mtr);
+ zip_size, RW_X_LATCH, index, mtr);
page = buf_block_get_frame(block);
@@ -470,9 +470,9 @@ btr_pessimistic_scrub(
}
if (right_page_no != FIL_NULL) {
- buf_block_t* get_block __attribute__((unused))= btr_block_get(
+ btr_block_get(
page_id_t(index->table->space_id, right_page_no),
- page_size, RW_X_LATCH, index, mtr);
+ zip_size, RW_X_LATCH, index, mtr);
}
/* arguments to btr_page_split_and_insert */
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index 4b4bba9a941..131f8c13c27 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -289,18 +289,11 @@ void btr_search_sys_free()
/** Set index->ref_count = 0 on all indexes of a table.
@param[in,out] table table handler */
-static
-void
-btr_search_disable_ref_count(
- dict_table_t* table)
+static void btr_search_disable_ref_count(dict_table_t *table)
{
- dict_index_t* index;
-
- for (index = dict_table_get_first_index(table);
- index != NULL;
- index = dict_table_get_next_index(index)) {
- index->search_info->ref_count = 0;
- }
+ for (dict_index_t *index= dict_table_get_first_index(table); index;
+ index= dict_table_get_next_index(index))
+ index->search_info->ref_count= 0;
}
/** Lazily free detached metadata when removing the last reference. */
@@ -308,7 +301,7 @@ ATTRIBUTE_COLD static void btr_search_lazy_free(dict_index_t *index)
{
ut_ad(index->freed());
dict_table_t *table= index->table;
- mysql_mutex_lock(&table->autoinc_mutex);
+ table->autoinc_mutex.lock();
/* Perform the skipped steps of dict_index_remove_from_cache_low(). */
UT_LIST_REMOVE(table->freed_indexes, index);
@@ -319,13 +312,13 @@ ATTRIBUTE_COLD static void btr_search_lazy_free(dict_index_t *index)
!UT_LIST_GET_LEN(table->indexes))
{
ut_ad(!table->id);
- mysql_mutex_unlock(&table->autoinc_mutex);
- mysql_mutex_destroy(&table->autoinc_mutex);
+ table->autoinc_mutex.unlock();
+ table->autoinc_mutex.~mutex();
dict_mem_table_free(table);
return;
}
- mysql_mutex_unlock(&table->autoinc_mutex);
+ table->autoinc_mutex.unlock();
}
/** Clear the adaptive hash index on all pages in the buffer pool. */
@@ -390,12 +383,12 @@ void btr_search_disable()
{
dict_table_t* table;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
btr_search_x_lock_all();
if (!btr_search_enabled) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
btr_search_x_unlock_all();
return;
}
@@ -404,19 +397,19 @@ void btr_search_disable()
/* Clear the index->search_info->ref_count of every index in
the data dictionary cache. */
- for (table = UT_LIST_GET_FIRST(dict_sys->table_LRU); table;
+ for (table = UT_LIST_GET_FIRST(dict_sys.table_LRU); table;
table = UT_LIST_GET_NEXT(table_LRU, table)) {
btr_search_disable_ref_count(table);
}
- for (table = UT_LIST_GET_FIRST(dict_sys->table_non_LRU); table;
+ for (table = UT_LIST_GET_FIRST(dict_sys.table_non_LRU); table;
table = UT_LIST_GET_NEXT(table_LRU, table)) {
btr_search_disable_ref_count(table);
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
/* Set all block->index = NULL. */
buf_pool_clear_hash_index();
@@ -1138,7 +1131,7 @@ retry:
ut_ad(page_is_leaf(block->frame));
/* We must not dereference block->index here, because it could be freed
- if (index->table->n_ref_count == 0 && !mutex_own(&dict_sys->mutex)).
+ if (index->table->n_ref_count == 0 && !mutex_own(&dict_sys.mutex)).
Determine the ahi_slot based on the block contents. */
const index_id_t index_id
@@ -1210,7 +1203,7 @@ retry:
rec = page_get_infimum_rec(page);
rec = page_rec_get_next_low(rec, page_is_comp(page));
- if (rec_is_metadata(rec, index)) {
+ if (rec_is_metadata(rec, *index)) {
rec = page_rec_get_next_low(rec, page_is_comp(page));
}
@@ -1314,7 +1307,7 @@ void btr_search_drop_page_hash_when_freed(const page_id_t page_id)
are possibly holding, we cannot s-latch the page, but must
(recursively) x-latch it, even though we are only reading. */
- block = buf_page_get_gen(page_id, univ_page_size, RW_X_LATCH, NULL,
+ block = buf_page_get_gen(page_id, 0, RW_X_LATCH, NULL,
BUF_PEEK_IF_IN_POOL, __FILE__, __LINE__,
&mtr, &err);
@@ -1332,7 +1325,7 @@ void btr_search_drop_page_hash_when_freed(const page_id_t page_id)
be open, or we should be in the process of
dropping the table (preventing eviction). */
ut_ad(index->table->get_ref_count() > 0
- || mutex_own(&dict_sys->mutex));
+ || mutex_own(&dict_sys.mutex));
btr_search_drop_page_hash_index(block);
}
}
@@ -1430,7 +1423,7 @@ btr_search_build_page_hash_index(
rec = page_rec_get_next_const(page_get_infimum_rec(page));
- if (rec_is_metadata(rec, index)) {
+ if (rec_is_metadata(rec, *index)) {
rec = page_rec_get_next_const(rec);
if (!--n_recs) return;
}
@@ -1913,7 +1906,7 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
hash_table_t* table = NULL;
bool locked = false;
- if (!page_rec_is_infimum(rec) && !rec_is_metadata(rec, index)) {
+ if (!page_rec_is_infimum(rec) && !rec_is_metadata(rec, *index)) {
offsets = rec_get_offsets(
rec, index, offsets, index->n_core_fields,
btr_search_get_n_fields(n_fields, n_bytes), &heap);
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index eb57489172c..f688cf4f719 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -33,14 +33,11 @@ Created 11/5/1995 Heikki Tuuri
#include "mtr0types.h"
#include "mach0data.h"
-#include "page0size.h"
#include "buf0buf.h"
+#include "buf0checksum.h"
+#include "ut0crc32.h"
#include <string.h>
-#ifdef UNIV_NONINL
-#include "buf0buf.inl"
-#endif
-
#ifndef UNIV_INNOCHECKSUM
#include "mem0mem.h"
#include "btr0btr.h"
@@ -61,20 +58,15 @@ Created 11/5/1995 Heikki Tuuri
#include "log0recv.h"
#include "srv0mon.h"
#include "log0crypt.h"
+#include "fil0pagecompress.h"
+#include "fsp0pagecompress.h"
#endif /* !UNIV_INNOCHECKSUM */
#include "page0zip.h"
#include "sync0sync.h"
#include "buf0dump.h"
-#include <new>
#include <map>
#include <sstream>
#include "log.h"
-#ifndef UNIV_INNOCHECKSUM
-#include "fil0pagecompress.h"
-#include "fsp0pagecompress.h"
-#endif
-#include "ut0byte.h"
-#include <new>
#ifdef UNIV_LINUX
#include <stdlib.h>
@@ -134,6 +126,17 @@ struct set_numa_interleave_t
#include "snappy-c.h"
#endif
+#ifndef UNIV_INNOCHECKSUM
+buf_pool_t::io_buf_t::~io_buf_t()
+{
+ for (buf_tmp_buffer_t* s = slots, *e = slots + n_slots; s != e; s++) {
+ aligned_free(s->crypt_buf);
+ aligned_free(s->comp_buf);
+ }
+ ut_free(slots);
+}
+#endif /* !UNIV_INNOCHECKSUM */
+
/*
IMPLEMENTATION OF THE BUFFER POOL
=================================
@@ -398,16 +401,9 @@ on the io_type */
@return reserved buffer slot */
static buf_tmp_buffer_t* buf_pool_reserve_tmp_slot(buf_pool_t* buf_pool)
{
- for (ulint i = 0; i < buf_pool->tmp_arr->n_slots; i++) {
- buf_tmp_buffer_t* slot = &buf_pool->tmp_arr->slots[i];
- if (slot->acquire()) {
- return slot;
- }
- }
-
- /* We assume that free slot is found */
- ut_error;
- return NULL;
+ buf_tmp_buffer_t* slot = buf_pool->io_buf.reserve();
+ ut_a(slot);
+ return slot;
}
/** Reserve a buffer for encryption, decryption or decompression.
@@ -461,7 +457,7 @@ static bool buf_tmp_page_decrypt(byte* tmp_frame, byte* src_frame)
}
/* read space & lsn */
- uint header_len = FIL_PAGE_DATA;
+ uint header_len = FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION;
/* Copy FIL page header, it is not encrypted */
memcpy(tmp_frame, src_frame, header_len);
@@ -470,7 +466,7 @@ static bool buf_tmp_page_decrypt(byte* tmp_frame, byte* src_frame)
const byte* src = src_frame + header_len;
byte* dst = tmp_frame + header_len;
uint srclen = uint(srv_page_size)
- - header_len - FIL_PAGE_DATA_END;
+ - (header_len + FIL_PAGE_FCRC32_CHECKSUM);
ulint offset = mach_read_from_4(src_frame + FIL_PAGE_OFFSET);
if (!log_tmp_block_decrypt(src, srclen, dst,
@@ -478,9 +474,9 @@ static bool buf_tmp_page_decrypt(byte* tmp_frame, byte* src_frame)
return false;
}
- memcpy(tmp_frame + srv_page_size - FIL_PAGE_DATA_END,
- src_frame + srv_page_size - FIL_PAGE_DATA_END,
- FIL_PAGE_DATA_END);
+ memcpy(tmp_frame + srv_page_size - FIL_PAGE_FCRC32_CHECKSUM,
+ src_frame + srv_page_size - FIL_PAGE_FCRC32_CHECKSUM,
+ FIL_PAGE_FCRC32_CHECKSUM);
memcpy(src_frame, tmp_frame, srv_page_size);
srv_stats.pages_decrypted.inc();
@@ -500,7 +496,8 @@ static bool buf_page_decrypt_after_read(buf_page_t* bpage, fil_space_t* space)
byte* dst_frame = bpage->zip.data ? bpage->zip.data :
((buf_block_t*) bpage)->frame;
- bool page_compressed = fil_page_is_compressed(dst_frame);
+ bool page_compressed = space->is_compressed()
+ && buf_page_is_compressed(dst_frame, space->flags);
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
if (bpage->id.page_no() == 0) {
@@ -529,39 +526,42 @@ static bool buf_page_decrypt_after_read(buf_page_t* bpage, fil_space_t* space)
also for pages first compressed and then encrypted. */
buf_tmp_buffer_t* slot;
+ uint key_version = buf_page_get_key_version(dst_frame, space->flags);
- if (page_compressed) {
+ if (page_compressed && !key_version) {
/* the page we read is unencrypted */
/* Find free slot from temporary memory array */
decompress:
+ if (space->full_crc32()
+ && buf_page_is_corrupted(true, dst_frame, space->flags)) {
+ return false;
+ }
+
slot = buf_pool_reserve_tmp_slot(buf_pool);
/* For decompression, use crypt_buf. */
buf_tmp_reserve_crypt_buf(slot);
+
decompress_with_slot:
- ut_d(fil_page_type_validate(dst_frame));
+ ut_d(fil_page_type_validate(space, dst_frame));
- ulint write_size = fil_page_decompress(slot->crypt_buf,
- dst_frame);
+ ulint write_size = fil_page_decompress(
+ slot->crypt_buf, dst_frame, space->flags);
slot->release();
- ut_ad(!write_size || fil_page_type_validate(dst_frame));
+ ut_ad(!write_size || fil_page_type_validate(space, dst_frame));
ut_ad(space->pending_io());
return write_size != 0;
}
- if (space->crypt_data
- && mach_read_from_4(FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
- + dst_frame)) {
+ if (key_version && space->crypt_data) {
/* Verify encryption checksum before we even try to
decrypt. */
- if (!fil_space_verify_crypt_checksum(dst_frame, bpage->size)) {
+ if (!buf_page_verify_crypt_checksum(dst_frame, space->flags)) {
decrypt_failed:
ib::error() << "Encrypted page " << bpage->id
<< " in file " << space->chain.start->name
<< " looks corrupted; key_version="
- << mach_read_from_4(
- FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
- + dst_frame);
+ << key_version;
return false;
}
@@ -569,7 +569,7 @@ decrypt_failed:
slot = buf_pool_reserve_tmp_slot(buf_pool);
buf_tmp_reserve_crypt_buf(slot);
- ut_d(fil_page_type_validate(dst_frame));
+ ut_d(fil_page_type_validate(space, dst_frame));
/* decrypt using crypt_buf to dst_frame */
if (!fil_space_decrypt(space, slot->crypt_buf, dst_frame)) {
@@ -577,9 +577,10 @@ decrypt_failed:
goto decrypt_failed;
}
- ut_d(fil_page_type_validate(dst_frame));
+ ut_d(fil_page_type_validate(space, dst_frame));
- if (fil_page_is_compressed_encrypted(dst_frame)) {
+ if ((space->full_crc32() && page_compressed)
+ || fil_page_is_compressed_encrypted(dst_frame)) {
goto decompress_with_slot;
}
@@ -787,11 +788,7 @@ buf_page_is_checksum_valid_crc32(
return false;
}
- return checksum_field1 == crc32
-#ifdef INNODB_BUG_ENDIAN_CRC32
- || checksum_field1 == buf_calc_page_crc32(read_buf, true)
-#endif
- ;
+ return checksum_field1 == crc32;
}
/** Checks if the page is in innodb checksum format.
@@ -920,28 +917,44 @@ buf_page_is_checksum_valid_none(
&& checksum_field1 == BUF_NO_CHECKSUM_MAGIC);
}
-#ifdef INNODB_BUG_ENDIAN_CRC32
-/** Validate the CRC-32C checksum of a page.
-@param[in] page buffer page (srv_page_size bytes)
-@param[in] checksum CRC-32C checksum stored on page
-@return computed checksum */
-static uint32_t buf_page_check_crc32(const byte* page, uint32_t checksum)
+/** Checks whether the lsn present in the page is lesser than the
+peek current lsn.
+@param[in] check_lsn lsn to check
+@param[in] read_buf page. */
+static void buf_page_check_lsn(bool check_lsn, const byte* read_buf)
{
- uint32_t crc32 = buf_calc_page_crc32(page);
+#ifndef UNIV_INNOCHECKSUM
+ if (check_lsn && recv_lsn_checks_on) {
+ lsn_t current_lsn;
+ const lsn_t page_lsn
+ = mach_read_from_8(read_buf + FIL_PAGE_LSN);
- if (checksum != crc32) {
- crc32 = buf_calc_page_crc32(page, true);
- }
+ /* Since we are going to reset the page LSN during the import
+ phase it makes no sense to spam the log with error messages. */
+
+ if (log_peek_lsn(&current_lsn) && current_lsn < page_lsn) {
+
+ const ulint space_id = mach_read_from_4(
+ read_buf + FIL_PAGE_SPACE_ID);
+ const ulint page_no = mach_read_from_4(
+ read_buf + FIL_PAGE_OFFSET);
+
+ ib::error() << "Page " << page_id_t(space_id, page_no)
+ << " log sequence number " << page_lsn
+ << " is in the future! Current system"
+ << " log sequence number "
+ << current_lsn << ".";
- return crc32;
+ ib::error() << "Your database may be corrupt or"
+ " you may have copied the InnoDB"
+ " tablespace but not the InnoDB"
+ " log files. "
+ << FORCE_RECOVERY_MSG;
+
+ }
+ }
+#endif /* !UNIV_INNOCHECKSUM */
}
-#else /* INNODB_BUG_ENDIAN_CRC32 */
-/** Validate the CRC-32C checksum of a page.
-@param[in] page buffer page (srv_page_size bytes)
-@param[in] checksum CRC-32C checksum stored on page
-@return computed checksum */
-# define buf_page_check_crc32(page, checksum) buf_calc_page_crc32(page)
-#endif /* INNODB_BUG_ENDIAN_CRC32 */
/** Check if a buffer is all zeroes.
@@ -956,27 +969,60 @@ bool buf_is_zeroes(span<const byte> buf)
/** Check if a page is corrupt.
@param[in] check_lsn whether the LSN should be checked
@param[in] read_buf database page
-@param[in] page_size page size
-@param[in] space tablespace
+@param[in] fsp_flags tablespace flags
@return whether the page is corrupted */
bool
buf_page_is_corrupted(
bool check_lsn,
const byte* read_buf,
- const page_size_t& page_size,
-#ifndef UNIV_INNOCHECKSUM
- const fil_space_t* space)
-#else
- const void* space)
-#endif
+ ulint fsp_flags)
{
- ut_ad(page_size.logical() == srv_page_size);
#ifndef UNIV_INNOCHECKSUM
DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", return(true); );
#endif
+ if (fil_space_t::full_crc32(fsp_flags)) {
+ bool compressed = false, corrupted = false;
+ const uint size = buf_page_full_crc32_size(
+ read_buf, &compressed, &corrupted);
+ if (corrupted) {
+ return true;
+ }
+ const byte* end = read_buf + (size - FIL_PAGE_FCRC32_CHECKSUM);
+ uint crc32 = mach_read_from_4(end);
+
+ if (!crc32 && size == srv_page_size
+ && buf_is_zeroes(span<const byte>(read_buf, size))) {
+ return false;
+ }
+
+ DBUG_EXECUTE_IF(
+ "page_intermittent_checksum_mismatch", {
+ static int page_counter;
+ if (page_counter++ == 2) {
+ crc32++;
+ }
+ });
+
+ if (crc32 != ut_crc32(read_buf,
+ size - FIL_PAGE_FCRC32_CHECKSUM)) {
+ return true;
+ }
+ if (!compressed
+ && !mach_read_from_4(FIL_PAGE_FCRC32_KEY_VERSION
+ + read_buf)
+ && memcmp(read_buf + (FIL_PAGE_LSN + 4),
+ end - (FIL_PAGE_FCRC32_END_LSN
+ - FIL_PAGE_FCRC32_CHECKSUM), 4)) {
+ return true;
+ }
+
+ buf_page_check_lsn(check_lsn, read_buf);
+ return false;
+ }
+
size_t checksum_field1 = 0;
size_t checksum_field2 = 0;
-
+ const ulint zip_size = fil_space_t::zip_size(fsp_flags);
ulint page_type = mach_read_from_2(read_buf + FIL_PAGE_TYPE);
/* We can trust page type if page compression is set on tablespace
@@ -991,16 +1037,15 @@ buf_page_is_corrupted(
if ((page_type == FIL_PAGE_PAGE_COMPRESSED ||
page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED)
#ifndef UNIV_INNOCHECKSUM
- && space && FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)
+ && FSP_FLAGS_HAS_PAGE_COMPRESSION(fsp_flags)
#endif
) {
return(false);
}
- if (!page_size.is_compressed()
- && memcmp(read_buf + FIL_PAGE_LSN + 4,
- read_buf + page_size.logical()
- - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) {
+ if (!zip_size && memcmp(read_buf + FIL_PAGE_LSN + 4,
+ read_buf + srv_page_size
+ - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) {
/* Stored log sequence numbers at the start and the end
of page do not match */
@@ -1008,37 +1053,7 @@ buf_page_is_corrupted(
return(true);
}
-#ifndef UNIV_INNOCHECKSUM
- if (check_lsn && recv_lsn_checks_on) {
- lsn_t current_lsn;
- const lsn_t page_lsn
- = mach_read_from_8(read_buf + FIL_PAGE_LSN);
-
- /* Since we are going to reset the page LSN during the import
- phase it makes no sense to spam the log with error messages. */
-
- if (log_peek_lsn(&current_lsn) && current_lsn < page_lsn) {
-
- const ulint space_id = mach_read_from_4(
- read_buf + FIL_PAGE_SPACE_ID);
- const ulint page_no = mach_read_from_4(
- read_buf + FIL_PAGE_OFFSET);
-
- ib::error() << "Page " << page_id_t(space_id, page_no)
- << " log sequence number " << page_lsn
- << " is in the future! Current system"
- << " log sequence number "
- << current_lsn << ".";
-
- ib::error() << "Your database may be corrupt or"
- " you may have copied the InnoDB"
- " tablespace but not the InnoDB"
- " log files. "
- << FORCE_RECOVERY_MSG;
-
- }
- }
-#endif /* !UNIV_INNOCHECKSUM */
+ buf_page_check_lsn(check_lsn, read_buf);
/* Check whether the checksum fields have correct values */
@@ -1049,23 +1064,26 @@ buf_page_is_corrupted(
return(false);
}
- if (page_size.is_compressed()) {
- return(!page_zip_verify_checksum(read_buf,
- page_size.physical()));
+ if (zip_size) {
+ return !page_zip_verify_checksum(read_buf, zip_size);
}
checksum_field1 = mach_read_from_4(
read_buf + FIL_PAGE_SPACE_OR_CHKSUM);
checksum_field2 = mach_read_from_4(
- read_buf + page_size.logical() - FIL_PAGE_END_LSN_OLD_CHKSUM);
+ read_buf + srv_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM);
compile_time_assert(!(FIL_PAGE_LSN % 8));
/* A page filled with NUL bytes is considered not corrupted.
- The FIL_PAGE_FILE_FLUSH_LSN field may be written nonzero for
- the first page of the system tablespace.
- Ignore it for the system tablespace. */
+ Before MariaDB Server 10.1.25 (MDEV-12113) or 10.2.2 (or MySQL 5.7),
+ the FIL_PAGE_FILE_FLUSH_LSN field may have been written nonzero
+ for the first page of each file of the system tablespace.
+ We want to ignore it for the system tablespace, but because
+ we do not know the expected tablespace here, we ignore the
+ field for all data files, except for
+ innodb_checksum_algorithm=full_crc32 which we handled above. */
if (!checksum_field1 && !checksum_field2) {
/* Checksum fields can have valid value as zero.
If the page is not empty then do the checksum
@@ -1073,8 +1091,7 @@ buf_page_is_corrupted(
bool all_zeroes = true;
for (size_t i = 0; i < srv_page_size; i++) {
#ifndef UNIV_INNOCHECKSUM
- if (i == FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
- && (!space || !space->id)) {
+ if (i == FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) {
i += 8;
}
#endif
@@ -1090,6 +1107,7 @@ buf_page_is_corrupted(
}
switch (curr_algo) {
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
return !buf_page_is_checksum_valid_crc32(
read_buf, checksum_field1, checksum_field2);
@@ -1102,6 +1120,7 @@ buf_page_is_corrupted(
case SRV_CHECKSUM_ALGORITHM_NONE:
/* should have returned false earlier */
break;
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_CRC32:
case SRV_CHECKSUM_ALGORITHM_INNODB:
const uint32_t crc32 = buf_calc_page_crc32(read_buf);
@@ -1199,10 +1218,10 @@ buf_madvise_do_dump()
srv_log_buffer_size,
MADV_DODUMP);
}
- /* mirrors recv_sys_init() */
- if (recv_sys->buf)
+ /* mirrors recv_sys_t::create() */
+ if (recv_sys.buf)
{
- ret+= madvise(recv_sys->buf, recv_sys->len, MADV_DODUMP);
+ ret+= madvise(recv_sys.buf, recv_sys.len, MADV_DODUMP);
}
buf_pool_mutex_enter_all();
@@ -1234,12 +1253,12 @@ static inline byte hex_to_ascii(byte hex_digit)
/** Dump a page to stderr.
@param[in] read_buf database page
-@param[in] page_size page size */
+@param[in] zip_size compressed page size, or 0 */
ATTRIBUTE_COLD
-void buf_page_print(const byte *read_buf, const page_size_t &page_size)
+void buf_page_print(const byte *read_buf, ulint zip_size)
{
#ifndef UNIV_DEBUG
- const size_t size= page_size.physical();
+ const size_t size = zip_size ? zip_size : srv_page_size;
const byte * const end= read_buf + size;
sql_print_information("InnoDB: Page dump (%zu bytes):", size);
@@ -1302,7 +1321,7 @@ pfs_register_buffer_block(
: NULL;
# ifdef UNIV_DEBUG
- rwlock = &block->debug_latch;
+ rwlock = block->debug_latch;
ut_a(!rwlock->pfs_psi);
rwlock->pfs_psi = (PSI_server)
? PSI_server->init_rwlock(buf_block_debug_latch_key,
@@ -1358,6 +1377,7 @@ buf_block_init(
page_zip_des_init(&block->page.zip);
mutex_create(LATCH_ID_BUF_BLOCK_MUTEX, &block->mutex);
+ ut_d(block->debug_latch = (rw_lock_t *) ut_malloc_nokey(sizeof(rw_lock_t)));
#if defined PFS_SKIP_BUFFER_MUTEX_RWLOCK || defined PFS_GROUP_BUFFER_SYNC
/* If PFS_SKIP_BUFFER_MUTEX_RWLOCK is defined, skip registration
@@ -1369,7 +1389,7 @@ buf_block_init(
rw_lock_create(PFS_NOT_INSTRUMENTED, &block->lock, SYNC_LEVEL_VARYING);
- ut_d(rw_lock_create(PFS_NOT_INSTRUMENTED, &block->debug_latch,
+ ut_d(rw_lock_create(PFS_NOT_INSTRUMENTED, block->debug_latch,
SYNC_LEVEL_VARYING));
#else /* PFS_SKIP_BUFFER_MUTEX_RWLOCK || PFS_GROUP_BUFFER_SYNC */
@@ -1377,7 +1397,7 @@ buf_block_init(
rw_lock_create(buf_block_lock_key, &block->lock, SYNC_LEVEL_VARYING);
ut_d(rw_lock_create(buf_block_debug_latch_key,
- &block->debug_latch, SYNC_LEVEL_VARYING));
+ block->debug_latch, SYNC_LEVEL_VARYING));
#endif /* PFS_SKIP_BUFFER_MUTEX_RWLOCK || PFS_GROUP_BUFFER_SYNC */
@@ -1404,11 +1424,6 @@ buf_chunk_init(
/* Round down to a multiple of page size,
although it already should be. */
mem_size = ut_2pow_round<ulint>(mem_size, srv_page_size);
- /* Reserve space for the block descriptors. */
- mem_size += ut_2pow_round<ulint>((mem_size >> srv_page_size_shift)
- * (sizeof *block)
- + (srv_page_size - 1),
- srv_page_size);
DBUG_EXECUTE_IF("ib_buf_chunk_init_fails", return(NULL););
@@ -1587,7 +1602,7 @@ buf_chunk_not_freed(
== block->page.newest_modification);
ut_ad(block->page.oldest_modification == 0
|| block->page.oldest_modification
- == recv_sys->recovered_lsn
+ == recv_sys.recovered_lsn
|| srv_force_recovery
== SRV_FORCE_NO_LOG_REDO);
ut_ad(block->page.buf_fix_count == 0);
@@ -1636,6 +1651,16 @@ buf_pool_set_sizes(void)
buf_pool_mutex_exit_all();
}
+/** Free the synchronization objects of a buffer pool block descriptor
+@param[in,out] block buffer pool block descriptor */
+static void buf_block_free_mutexes(buf_block_t* block)
+{
+ mutex_free(&block->mutex);
+ rw_lock_free(&block->lock);
+ ut_d(rw_lock_free(block->debug_latch));
+ ut_d(ut_free(block->debug_latch));
+}
+
/********************************************************************//**
Initialize a buffer pool instance.
@return DB_SUCCESS if all goes well. */
@@ -1699,11 +1724,7 @@ buf_pool_init_instance(
buf_block_t* block = chunk->blocks;
for (i = chunk->size; i--; block++) {
- mutex_free(&block->mutex);
- rw_lock_free(&block->lock);
-
- ut_d(rw_lock_free(
- &block->debug_latch));
+ buf_block_free_mutexes(block);
}
buf_pool->allocator.deallocate_large_dodump(
@@ -1727,8 +1748,7 @@ buf_pool_init_instance(
ut_min(BUF_READ_AHEAD_PAGES,
ut_2_power_up(buf_pool->curr_size /
BUF_READ_AHEAD_PORTION));
- buf_pool->curr_pool_size = buf_pool->curr_size
- << srv_page_size_shift;
+ buf_pool->curr_pool_size = buf_pool_size;
buf_pool->old_size = buf_pool->curr_size;
buf_pool->n_chunks_new = buf_pool->n_chunks;
@@ -1783,12 +1803,9 @@ buf_pool_init_instance(
new(&buf_pool->single_scan_itr) LRUItr(buf_pool, &buf_pool->mutex);
/* Initialize the temporal memory array and slots */
- buf_pool->tmp_arr = (buf_tmp_array_t *)ut_malloc_nokey(sizeof(buf_tmp_array_t));
- memset(buf_pool->tmp_arr, 0, sizeof(buf_tmp_array_t));
- ulint n_slots = (srv_n_read_io_threads + srv_n_write_io_threads) * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD);
- buf_pool->tmp_arr->n_slots = n_slots;
- buf_pool->tmp_arr->slots = (buf_tmp_buffer_t*)ut_malloc_nokey(sizeof(buf_tmp_buffer_t) * n_slots);
- memset(buf_pool->tmp_arr->slots, 0, (sizeof(buf_tmp_buffer_t) * n_slots));
+ new(&buf_pool->io_buf) buf_pool_t::io_buf_t(
+ (srv_n_read_io_threads + srv_n_write_io_threads)
+ * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD));
buf_pool_mutex_exit(buf_pool);
@@ -1850,10 +1867,7 @@ buf_pool_free_instance(
buf_block_t* block = chunk->blocks;
for (ulint i = chunk->size; i--; block++) {
- mutex_free(&block->mutex);
- rw_lock_free(&block->lock);
-
- ut_d(rw_lock_free(&block->debug_latch));
+ buf_block_free_mutexes(block);
}
buf_pool->allocator.deallocate_large_dodump(
@@ -1869,26 +1883,7 @@ buf_pool_free_instance(
hash_table_free(buf_pool->page_hash);
hash_table_free(buf_pool->zip_hash);
- /* Free all used temporary slots */
- if (buf_pool->tmp_arr) {
- for(ulint i = 0; i < buf_pool->tmp_arr->n_slots; i++) {
- buf_tmp_buffer_t* slot = &(buf_pool->tmp_arr->slots[i]);
- if (slot && slot->crypt_buf) {
- aligned_free(slot->crypt_buf);
- slot->crypt_buf = NULL;
- }
-
- if (slot && slot->comp_buf) {
- aligned_free(slot->comp_buf);
- slot->comp_buf = NULL;
- }
- }
-
- ut_free(buf_pool->tmp_arr->slots);
- ut_free(buf_pool->tmp_arr);
- buf_pool->tmp_arr = NULL;
- }
-
+ buf_pool->io_buf.~io_buf_t();
buf_pool->allocator.~ut_allocator();
}
@@ -2511,12 +2506,12 @@ buf_pool_resize()
ut_ad(UT_LIST_GET_LEN(buf_pool->withdraw) == 0);
ut_ad(buf_pool->flush_rbt == NULL);
- buf_pool->curr_size = new_instance_size;
-
buf_pool->n_chunks_new =
(new_instance_size << srv_page_size_shift)
/ srv_buf_pool_chunk_unit;
+ buf_pool->curr_size = buf_pool->n_chunks_new * buf_pool->chunks->size;
+
buf_pool_mutex_exit(buf_pool);
}
#ifdef BTR_CUR_HASH_ADAPT
@@ -2719,11 +2714,7 @@ withdraw_retry:
for (ulint j = chunk->size;
j--; block++) {
- mutex_free(&block->mutex);
- rw_lock_free(&block->lock);
-
- ut_d(rw_lock_free(
- &block->debug_latch));
+ buf_block_free_mutexes(block);
}
buf_pool->allocator.deallocate_large_dodump(
@@ -2865,7 +2856,7 @@ calc_buf_pool_size:
ut_2_power_up(buf_pool->curr_size /
BUF_READ_AHEAD_PORTION));
buf_pool->curr_pool_size
- = buf_pool->curr_size << srv_page_size_shift;
+ = buf_pool->n_chunks * srv_buf_pool_chunk_unit;
curr_size += buf_pool->curr_pool_size;
buf_pool->old_size = buf_pool->curr_size;
}
@@ -2911,13 +2902,10 @@ calc_buf_pool_size:
buf_resize_status("Resizing also other hash tables.");
- /* normalize lock_sys */
srv_lock_table_size = 5
* (srv_buf_pool_size >> srv_page_size_shift);
lock_sys.resize(srv_lock_table_size);
-
- /* normalize dict_sys */
- dict_resize();
+ dict_sys.resize();
ib::info() << "Resized hash tables at lock_sys,"
#ifdef BTR_CUR_HASH_ADAPT
@@ -3229,7 +3217,7 @@ page_found:
}
/* Add to an existing watch. */
- buf_block_fix(bpage);
+ bpage->fix();
return(NULL);
}
@@ -3369,7 +3357,7 @@ void buf_pool_watch_unset(const page_id_t page_id)
increments buf_fix_count. */
bpage = buf_page_hash_get_low(buf_pool, page_id);
- if (buf_block_unfix(bpage) == 0
+ if (bpage->unfix() == 0
&& buf_pool_watch_is_sentinel(buf_pool, bpage)) {
buf_pool_watch_remove(buf_pool, bpage);
}
@@ -3536,12 +3524,9 @@ be implemented at a higher level. In other words, all possible
accesses to a given page through this function must be protected by
the same set of mutexes or latches.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size
@return pointer to the block */
-buf_page_t*
-buf_page_get_zip(
- const page_id_t page_id,
- const page_size_t& page_size)
+buf_page_t* buf_page_get_zip(const page_id_t page_id, ulint zip_size)
{
buf_page_t* bpage;
BPageMutex* block_mutex;
@@ -3550,6 +3535,8 @@ buf_page_get_zip(
ibool must_read;
buf_pool_t* buf_pool = buf_pool_get(page_id);
+ ut_ad(zip_size);
+ ut_ad(ut_is_2pow(zip_size));
buf_pool->stat.n_page_gets++;
for (;;) {
@@ -3567,7 +3554,7 @@ lookup:
/* Page not in buf_pool: needs to be read from file */
ut_ad(!hash_lock);
- dberr_t err = buf_read_page(page_id, page_size);
+ dberr_t err = buf_read_page(page_id, zip_size);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
ib::error() << "Reading compressed page " << page_id
@@ -3595,7 +3582,7 @@ err_exit:
switch (buf_page_get_state(bpage)) {
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
- buf_block_fix(bpage);
+ bpage->fix();
block_mutex = &buf_pool->zip_mutex;
goto got_block;
case BUF_BLOCK_FILE_PAGE:
@@ -3705,7 +3692,7 @@ buf_zip_decompress(
&& (!crypt_data->is_default_encryption()
|| srv_encrypt_tables);
- ut_ad(block->page.size.is_compressed());
+ ut_ad(block->zip_size());
ut_a(block->page.id.space() != 0);
if (UNIV_UNLIKELY(check && !page_zip_verify_checksum(frame, size))) {
@@ -3717,12 +3704,6 @@ buf_zip_decompress(
<< ", crc32: "
<< page_zip_calc_checksum(
frame, size, SRV_CHECKSUM_ALGORITHM_CRC32)
-#ifdef INNODB_BUG_ENDIAN_CRC32
- << "/"
- << page_zip_calc_checksum(
- frame, size, SRV_CHECKSUM_ALGORITHM_CRC32,
- true)
-#endif
<< " innodb: "
<< page_zip_calc_checksum(
frame, size, SRV_CHECKSUM_ALGORITHM_INNODB)
@@ -3730,7 +3711,6 @@ buf_zip_decompress(
<< page_zip_calc_checksum(
frame, size, SRV_CHECKSUM_ALGORITHM_NONE)
<< " (algorithm: " << srv_checksum_algorithm << ")";
-
goto err_exit;
}
@@ -3757,7 +3737,7 @@ buf_zip_decompress(
case FIL_PAGE_TYPE_ZBLOB:
case FIL_PAGE_TYPE_ZBLOB2:
/* Copy to uncompressed storage. */
- memcpy(block->frame, frame, block->page.size.physical());
+ memcpy(block->frame, frame, block->zip_size());
if (space) {
space->release_for_io();
}
@@ -3962,6 +3942,7 @@ done:
/** This is the low level function used to get access to a database page.
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
@@ -3969,11 +3950,12 @@ BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
@param[in] file file name
@param[in] line line where called
@param[in] mtr mini-transaction
+@param[out] err DB_SUCCESS or error code
@return pointer to the block or NULL */
buf_block_t*
buf_page_get_low(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint rw_latch,
buf_block_t* guess,
ulint mode,
@@ -4021,16 +4003,15 @@ buf_page_get_low(
case BUF_GET:
case BUF_GET_IF_IN_POOL_OR_WATCH:
case BUF_GET_POSSIBLY_FREED:
- bool found;
- const page_size_t& space_page_size
- = fil_space_get_page_size(page_id.space(), &found);
- ut_ad(found);
- ut_ad(page_size.equals_to(space_page_size));
+ fil_space_t* s = fil_space_acquire_for_io(page_id.space());
+ ut_ad(s);
+ ut_ad(s->zip_size() == zip_size);
+ s->release_for_io();
}
#endif /* UNIV_DEBUG */
ut_ad(!mtr || !ibuf_inside(mtr)
- || ibuf_page_low(page_id, page_size, FALSE, file, line, NULL));
+ || ibuf_page_low(page_id, zip_size, FALSE, file, line, NULL));
buf_pool->stat.n_page_gets++;
hash_lock = buf_page_hash_lock_get(buf_pool, page_id);
@@ -4103,10 +4084,10 @@ loop:
= buf_page_get_mutex(
&fix_block->page);
mutex_enter(fix_mutex);
- buf_block_fix(fix_block);
+ fix_block->fix();
mutex_exit(fix_mutex);
} else {
- buf_block_fix(fix_block);
+ fix_block->fix();
}
/* Now safe to release page_hash mutex */
@@ -4139,10 +4120,10 @@ loop:
corrupted, or if an encrypted page with a valid
checksum cannot be decypted. */
- dberr_t local_err = buf_read_page(page_id, page_size);
+ dberr_t local_err = buf_read_page(page_id, zip_size);
if (local_err == DB_SUCCESS) {
- buf_read_ahead_random(page_id, page_size,
+ buf_read_ahead_random(page_id, zip_size,
ibuf_inside(mtr));
retries = 0;
@@ -4222,18 +4203,20 @@ loop:
BPageMutex* fix_mutex = buf_page_get_mutex(
&fix_block->page);
mutex_enter(fix_mutex);
- buf_block_fix(fix_block);
+ fix_block->fix();
mutex_exit(fix_mutex);
} else {
- buf_block_fix(fix_block);
+ fix_block->fix();
}
/* Now safe to release page_hash mutex */
rw_lock_s_unlock(hash_lock);
got_block:
-
switch (mode) {
+ default:
+ ut_ad(block->zip_size() == zip_size);
+ break;
case BUF_GET_IF_IN_POOL:
case BUF_PEEK_IF_IN_POOL:
case BUF_EVICT_IF_IN_POOL:
@@ -4248,7 +4231,7 @@ got_block:
/* The page is being read to buffer pool,
but we cannot wait around for the read to
complete. */
- buf_block_unfix(fix_block);
+ fix_block->unfix();
return(NULL);
}
@@ -4264,7 +4247,7 @@ got_block:
/* This suggests that the page is being flushed.
Avoid returning reference to this page.
Instead wait for the flush action to complete. */
- buf_block_unfix(fix_block);
+ fix_block->unfix();
os_thread_sleep(WAIT_FOR_WRITE);
goto loop;
}
@@ -4273,7 +4256,7 @@ got_block:
evict_from_pool:
ut_ad(!fix_block->page.oldest_modification);
buf_pool_mutex_enter(buf_pool);
- buf_block_unfix(fix_block);
+ fix_block->unfix();
if (!buf_LRU_free_page(&fix_block->page, true)) {
ut_ad(0);
@@ -4292,7 +4275,7 @@ evict_from_pool:
adaptive hash index. There cannot be an
adaptive hash index for a compressed-only
page, so do not bother decompressing the page. */
- buf_block_unfix(fix_block);
+ fix_block->unfix();
return(NULL);
}
@@ -4306,7 +4289,7 @@ evict_from_pool:
/* This condition often occurs when the buffer
is not buffer-fixed, but I/O-fixed by
buf_page_init_for_read(). */
- buf_block_unfix(fix_block);
+ fix_block->unfix();
/* The block is buffer-fixed or I/O-fixed.
Try again later. */
@@ -4335,7 +4318,7 @@ evict_from_pool:
/* Buffer-fixing prevents the page_hash from changing. */
ut_ad(bpage == buf_page_hash_get_low(buf_pool, page_id));
- buf_block_unfix(fix_block);
+ fix_block->unfix();
buf_page_mutex_enter(block);
mutex_enter(&buf_pool->zip_mutex);
@@ -4424,7 +4407,7 @@ evict_from_pool:
buf_page_mutex_exit(fix_block);
--buf_pool->n_pend_unzip;
- buf_block_unfix(fix_block);
+ fix_block->unfix();
buf_pool_mutex_exit(buf_pool);
rw_lock_x_unlock(&fix_block->lock);
@@ -4437,7 +4420,7 @@ evict_from_pool:
if (!access_time && !recv_no_ibuf_operations) {
ibuf_merge_or_delete_for_page(
- block, page_id, page_size);
+ block, block->page.id, zip_size);
}
buf_pool_mutex_enter(buf_pool);
@@ -4483,7 +4466,7 @@ evict_from_pool:
buf_pool_mutex_enter(buf_pool);
- buf_block_unfix(fix_block);
+ fix_block->unfix();
/* Now we are only holding the buf_pool->mutex,
not block->mutex or hash_lock. Blocks cannot be
@@ -4542,7 +4525,7 @@ evict_from_pool:
buf_page_mutex_exit(fix_block);
- buf_block_fix(fix_block);
+ fix_block->fix();
/* Failed to evict the page; change it directly */
@@ -4560,7 +4543,7 @@ evict_from_pool:
if (!fsp_is_system_temporary(page_id.space())) {
ibool ret;
ret = rw_lock_s_lock_nowait(
- &fix_block->debug_latch, file, line);
+ fix_block->debug_latch, file, line);
ut_a(ret);
}
#endif /* UNIV_DEBUG */
@@ -4603,12 +4586,11 @@ evict_from_pool:
buf_wait_for_read(fix_block);
if (fix_block->page.id != page_id) {
-
- buf_block_unfix(fix_block);
+ fix_block->unfix();
#ifdef UNIV_DEBUG
if (!fsp_is_system_temporary(page_id.space())) {
- rw_lock_s_unlock(&fix_block->debug_latch);
+ rw_lock_s_unlock(fix_block->debug_latch);
}
#endif /* UNIV_DEBUG */
@@ -4625,7 +4607,7 @@ evict_from_pool:
/* In the case of a first access, try to apply linear
read-ahead */
- buf_read_ahead_linear(page_id, page_size, ibuf_inside(mtr));
+ buf_read_ahead_linear(page_id, zip_size, ibuf_inside(mtr));
}
ut_ad(!rw_lock_own_flagged(hash_lock,
@@ -4637,6 +4619,7 @@ evict_from_pool:
/** This is the general function used to get access to a database page.
It does page initialization and applies the buffered redo logs.
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
@@ -4649,7 +4632,7 @@ BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
buf_block_t*
buf_page_get_gen(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint rw_latch,
buf_block_t* guess,
ulint mode,
@@ -4658,15 +4641,15 @@ buf_page_get_gen(
mtr_t* mtr,
dberr_t* err)
{
- if (buf_block_t *block = recv_recovery_create_page(page_id))
+ if (buf_block_t *block= recv_recovery_create_page(page_id))
{
- buf_block_fix(block);
- ut_ad(rw_lock_s_lock_nowait(&block->debug_latch, file, line));
+ block->fix();
+ ut_ad(rw_lock_s_lock_nowait(block->debug_latch, file, line));
block= buf_page_mtr_lock(block, rw_latch, mtr, file, line);
return block;
}
- return buf_page_get_low(page_id, page_size, rw_latch,
+ return buf_page_get_low(page_id, zip_size, rw_latch,
guess, mode, file, line, mtr, err);
}
@@ -4713,7 +4696,7 @@ buf_page_optimistic_get(
buf_page_make_young_if_needed(&block->page);
ut_ad(!ibuf_inside(mtr)
- || ibuf_page(block->page.id, block->page.size, NULL));
+ || ibuf_page(block->page.id, block->zip_size(), NULL));
mtr_memo_type_t fix_type;
@@ -4767,7 +4750,7 @@ buf_page_optimistic_get(
if (!access_time) {
/* In the case of a first access, try to apply linear
read-ahead */
- buf_read_ahead_linear(block->page.id, block->page.size,
+ buf_read_ahead_linear(block->page.id, block->zip_size(),
ibuf_inside(mtr));
}
@@ -4993,13 +4976,14 @@ buf_page_init_low(
/** Inits a page to the buffer buf_pool.
@param[in,out] buf_pool buffer pool
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] block block to init */
static
void
buf_page_init(
buf_pool_t* buf_pool,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
buf_block_t* block)
{
buf_page_t* hash_page;
@@ -5036,7 +5020,7 @@ buf_page_init(
ut_a(buf_fix_count > 0);
- my_atomic_add32((int32*) &block->page.buf_fix_count, buf_fix_count);
+ block->page.buf_fix_count += buf_fix_count;
buf_pool_watch_remove(buf_pool, hash_page);
} else {
@@ -5049,14 +5033,11 @@ buf_page_init(
ut_d(block->page.in_page_hash = TRUE);
block->page.id = page_id;
- block->page.size.copy_from(page_size);
HASH_INSERT(buf_page_t, hash, buf_pool->page_hash,
page_id.fold(), &block->page);
- if (page_size.is_compressed()) {
- page_zip_set_size(&block->page.zip, page_size.physical());
- }
+ page_zip_set_size(&block->page.zip, zip_size);
}
/** Initialize a page for read to the buffer buf_pool. If the page is
@@ -5070,6 +5051,7 @@ and the lock released later.
@param[out] err DB_SUCCESS or DB_TABLESPACE_DELETED
@param[in] mode BUF_READ_IBUF_PAGES_ONLY, ...
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] unzip whether the uncompressed page is
requested (for ROW_FORMAT=COMPRESSED)
@return pointer to the block
@@ -5079,7 +5061,7 @@ buf_page_init_for_read(
dberr_t* err,
ulint mode,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
bool unzip)
{
buf_block_t* block;
@@ -5098,12 +5080,12 @@ buf_page_init_for_read(
if (mode == BUF_READ_IBUF_PAGES_ONLY) {
/* It is a read-ahead within an ibuf routine */
- ut_ad(!ibuf_bitmap_page(page_id, page_size));
+ ut_ad(!ibuf_bitmap_page(page_id, zip_size));
ibuf_mtr_start(&mtr);
- if (!recv_no_ibuf_operations &&
- !ibuf_page(page_id, page_size, &mtr)) {
+ if (!recv_no_ibuf_operations
+ && !ibuf_page(page_id, zip_size, &mtr)) {
ibuf_mtr_commit(&mtr);
@@ -5113,7 +5095,7 @@ buf_page_init_for_read(
ut_ad(mode == BUF_READ_ANY_PAGE);
}
- if (page_size.is_compressed() && !unzip && !recv_recovery_is_on()) {
+ if (zip_size && !unzip && !recv_recovery_is_on()) {
block = NULL;
} else {
block = buf_LRU_get_free_block(buf_pool);
@@ -5148,7 +5130,7 @@ buf_page_init_for_read(
ut_ad(buf_pool_from_bpage(bpage) == buf_pool);
- buf_page_init(buf_pool, page_id, page_size, block);
+ buf_page_init(buf_pool, page_id, zip_size, block);
/* Note: We are using the hash_lock for protection. This is
safe because no other thread can lookup the block from the
@@ -5172,7 +5154,7 @@ buf_page_init_for_read(
rw_lock_x_lock_gen(&block->lock, BUF_IO_READ);
- if (page_size.is_compressed()) {
+ if (zip_size) {
/* buf_pool->mutex may be released and
reacquired by buf_buddy_alloc(). Thus, we
must release block->mutex in order not to
@@ -5182,8 +5164,7 @@ buf_page_init_for_read(
been added to buf_pool->LRU and
buf_pool->page_hash. */
buf_page_mutex_exit(block);
- data = buf_buddy_alloc(buf_pool, page_size.physical(),
- &lru);
+ data = buf_buddy_alloc(buf_pool, zip_size, &lru);
buf_page_mutex_enter(block);
block->page.zip.data = (page_zip_t*) data;
@@ -5204,7 +5185,7 @@ buf_page_init_for_read(
control block (bpage), in order to avoid the
invocation of buf_buddy_relocate_block() on
uninitialized data. */
- data = buf_buddy_alloc(buf_pool, page_size.physical(), &lru);
+ data = buf_buddy_alloc(buf_pool, zip_size, &lru);
rw_lock_x_lock(hash_lock);
@@ -5222,8 +5203,7 @@ buf_page_init_for_read(
/* The block was added by some other thread. */
rw_lock_x_unlock(hash_lock);
watch_page = NULL;
- buf_buddy_free(buf_pool, data,
- page_size.physical());
+ buf_buddy_free(buf_pool, data, zip_size);
bpage = NULL;
goto func_exit;
@@ -5236,11 +5216,9 @@ buf_page_init_for_read(
bpage->buf_pool_index = buf_pool_index(buf_pool);
page_zip_des_init(&bpage->zip);
- page_zip_set_size(&bpage->zip, page_size.physical());
+ page_zip_set_size(&bpage->zip, zip_size);
bpage->zip.data = (page_zip_t*) data;
- bpage->size.copy_from(page_size);
-
mutex_enter(&buf_pool->zip_mutex);
buf_page_init_low(bpage);
@@ -5266,7 +5244,7 @@ buf_page_init_for_read(
ut_a(buf_fix_count > 0);
- my_atomic_add32((int32*) &bpage->buf_fix_count, buf_fix_count);
+ bpage->buf_fix_count += buf_fix_count;
ut_ad(buf_pool_watch_is_sentinel(buf_pool, watch_page));
buf_pool_watch_remove(buf_pool, watch_page);
@@ -5305,30 +5283,30 @@ func_exit:
return(bpage);
}
-/** Initializes a page to the buffer buf_pool. The page is usually not read
+/** Initialize a page in the buffer pool. The page is usually not read
from a file even if it cannot be found in the buffer buf_pool. This is one
of the functions which perform to a block a state transition NOT_USED =>
FILE_PAGE (the other is buf_page_get_gen).
@param[in] page_id page id
-@param[in] page_size page size
-@param[in] mtr mini-transaction
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in,out] mtr mini-transaction
@return pointer to the block, page bufferfixed */
buf_block_t*
buf_page_create(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
mtr_t* mtr)
{
buf_frame_t* frame;
buf_block_t* block;
- buf_block_t* free_block = NULL;
- buf_pool_t* buf_pool= buf_pool_get(page_id);
+ buf_pool_t* buf_pool = buf_pool_get(page_id);
rw_lock_t* hash_lock;
ut_ad(mtr->is_active());
- ut_ad(page_id.space() != 0 || !page_size.is_compressed());
+ ut_ad(page_id.space() != 0 || !zip_size);
loop:
- free_block = buf_LRU_get_free_block(buf_pool);
+ buf_block_t *free_block = buf_LRU_get_free_block(buf_pool);
+
buf_pool_mutex_enter(buf_pool);
hash_lock = buf_page_hash_lock_get(buf_pool, page_id);
@@ -5336,16 +5314,15 @@ loop:
block = (buf_block_t*) buf_page_hash_get_low(buf_pool, page_id);
- if (block
+ if (UNIV_LIKELY_NULL(block)
&& buf_page_in_file(&block->page)
&& !buf_pool_watch_is_sentinel(buf_pool, &block->page)) {
ut_d(block->page.file_page_was_freed = FALSE);
- buf_page_state page_state = buf_block_get_state(block);
bool have_x_latch = false;
#ifdef BTR_CUR_HASH_ADAPT
- const dict_index_t *drop_hash_entry= NULL;
+ const dict_index_t *drop_hash_entry= nullptr;
#endif
- switch (page_state) {
+ switch (const auto page_state= buf_block_get_state(block)) {
default:
ut_ad(0);
break;
@@ -5385,23 +5362,22 @@ loop:
free_block->page.state = BUF_BLOCK_FILE_PAGE;
mutex_exit(&buf_pool->zip_mutex);
free_block->lock_hash_val = lock_rec_hash(
- page_id.space(), page_id.page_no());
+ page_id.space(), page_id.page_no());
buf_unzip_LRU_add_block(free_block, false);
buf_page_free_descriptor(&block->page);
block = free_block;
- buf_block_fix(block);
+ buf_block_buf_fix_inc(block, __FILE__, __LINE__);
buf_page_mutex_exit(free_block);
- free_block = NULL;
+ free_block = nullptr;
break;
case BUF_BLOCK_FILE_PAGE:
have_x_latch = mtr->have_x_latch(*block);
if (!have_x_latch) {
- buf_block_fix(block);
- buf_page_mutex_enter(block);
+ buf_block_buf_fix_inc(block,
+ __FILE__, __LINE__);
while (buf_block_get_io_fix(block)
!= BUF_IO_NONE
|| block->page.buf_fix_count != 1) {
- buf_page_mutex_exit(block);
buf_pool_mutex_exit(buf_pool);
rw_lock_x_unlock(hash_lock);
@@ -5409,10 +5385,9 @@ loop:
buf_pool_mutex_enter(buf_pool);
rw_lock_x_lock(hash_lock);
- buf_page_mutex_enter(block);
}
+
rw_lock_x_lock(&block->lock);
- buf_page_mutex_exit(block);
}
#ifdef BTR_CUR_HASH_ADAPT
drop_hash_entry = block->index;
@@ -5426,23 +5401,17 @@ loop:
if (free_block) {
buf_block_free(free_block);
}
+
#ifdef BTR_CUR_HASH_ADAPT
- if (drop_hash_entry) {
+ if (UNIV_LIKELY_NULL(drop_hash_entry)) {
btr_search_drop_page_hash_index(block);
}
#endif /* BTR_CUR_HASH_ADAPT */
if (!have_x_latch) {
-#ifdef UNIV_DEBUG
- if (!fsp_is_system_temporary(page_id.space())) {
- rw_lock_s_lock_nowait(
- &block->debug_latch,
- __FILE__, __LINE__);
- }
-#endif /* UNIV_DEBUG */
-
mtr_memo_push(mtr, block, MTR_MEMO_PAGE_X_FIX);
}
+
return block;
}
@@ -5455,7 +5424,7 @@ loop:
buf_page_mutex_enter(block);
- buf_page_init(buf_pool, page_id, page_size, block);
+ buf_page_init(buf_pool, page_id, zip_size, block);
rw_lock_x_lock(&block->lock);
@@ -5467,7 +5436,7 @@ loop:
buf_block_buf_fix_inc(block, __FILE__, __LINE__);
buf_pool->stat.n_pages_created++;
- if (page_size.is_compressed()) {
+ if (zip_size) {
void* data;
bool lru;
@@ -5484,7 +5453,7 @@ loop:
the reacquisition of buf_pool->mutex. We also must
defer this operation until after the block descriptor
has been added to buf_pool->LRU and buf_pool->page_hash. */
- data = buf_buddy_alloc(buf_pool, page_size.physical(), &lru);
+ data = buf_buddy_alloc(buf_pool, zip_size, &lru);
buf_page_mutex_enter(block);
block->page.zip.data = (page_zip_t*) data;
@@ -5510,7 +5479,7 @@ loop:
/* Delete possible entries for the page from the insert buffer:
such can exist if the page belonged to an index which was dropped */
if (!recv_recovery_is_on()) {
- ibuf_merge_or_delete_for_page(NULL, page_id, page_size);
+ ibuf_merge_or_delete_for_page(NULL, page_id, zip_size);
}
frame = block->frame;
@@ -5527,6 +5496,9 @@ loop:
memset(frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8);
memset(frame + FIL_PAGE_LSN, 0, 8);
+ /* mark page as just allocated for check in
+ buf_flush_init_for_writing() */
+ ut_d(memset(frame + FIL_PAGE_SPACE_OR_CHKSUM, 0, 4));
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
ut_a(++buf_dbg_counter % 5771 || buf_validate());
@@ -5706,6 +5678,29 @@ buf_corrupt_page_release(buf_page_t* bpage, const fil_space_t* space)
buf_pool_mutex_exit(buf_pool);
}
+/** Check if the encrypted page is corrupted for the full crc32 format.
+@param[in] space_id page belongs to space id
+@param[in] dst_frame page
+@param[in] is_compressed compressed page
+@return true if page is corrupted or false if it isn't */
+static bool buf_page_full_crc32_is_corrupted(
+ ulint space_id,
+ const byte* dst_frame,
+ bool is_compressed)
+{
+ if (!is_compressed
+ && memcmp(dst_frame + FIL_PAGE_LSN + 4,
+ dst_frame + srv_page_size - FIL_PAGE_FCRC32_END_LSN, 4)) {
+ return true;
+ }
+
+ if (space_id != mach_read_from_4(dst_frame + FIL_PAGE_SPACE_ID)) {
+ return true;
+ }
+
+ return false;
+}
+
/** Check if page is maybe compressed, encrypted or both when we encounter
corrupted page. Note that we can't be 100% sure if page is corrupted
or decrypt/decompress just failed.
@@ -5724,6 +5719,7 @@ static dberr_t buf_page_check_corrupt(buf_page_t* bpage, fil_space_t* space)
byte* dst_frame = (bpage->zip.data) ? bpage->zip.data :
((buf_block_t*) bpage)->frame;
dberr_t err = DB_SUCCESS;
+ uint key_version = buf_page_get_key_version(dst_frame, space->flags);
/* In buf_decrypt_after_read we have either decrypted the page if
page post encryption checksum matches and used key_id is found
@@ -5731,15 +5727,23 @@ static dberr_t buf_page_check_corrupt(buf_page_t* bpage, fil_space_t* space)
not decrypted and it could be either encrypted and corrupted
or corrupted or good page. If we decrypted, there page could
still be corrupted if used key does not match. */
- const bool seems_encrypted = mach_read_from_4(
- dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION)
+ const bool seems_encrypted = !space->full_crc32() && key_version
&& space->crypt_data
&& space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED;
+ ut_ad(space->purpose != FIL_TYPE_TEMPORARY || space->full_crc32());
/* If traditional checksums match, we assume that page is
not anymore encrypted. */
- if (buf_page_is_corrupted(
- true, dst_frame, bpage->size, space)) {
+ if (space->full_crc32()
+ && !buf_is_zeroes(span<const byte>(dst_frame,
+ space->physical_size()))
+ && (key_version || space->is_compressed()
+ || space->purpose == FIL_TYPE_TEMPORARY)) {
+ if (buf_page_full_crc32_is_corrupted(
+ space->id, dst_frame, space->is_compressed())) {
+ err = DB_PAGE_CORRUPTED;
+ }
+ } else if (buf_page_is_corrupted(true, dst_frame, space->flags)) {
err = DB_PAGE_CORRUPTED;
}
@@ -5754,8 +5758,7 @@ static dberr_t buf_page_check_corrupt(buf_page_t* bpage, fil_space_t* space)
ib::info()
<< "However key management plugin or used key_version "
- << mach_read_from_4(dst_frame
- + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION)
+ << key_version
<< " is not found or"
" used encryption algorithm or method does not match.";
@@ -5800,7 +5803,7 @@ buf_page_io_complete(buf_page_t* bpage, bool dblwr, bool evict)
io_type = buf_page_get_io_fix(bpage);
ut_ad(io_type == BUF_IO_READ || io_type == BUF_IO_WRITE);
- ut_ad(bpage->size.is_compressed() == (bpage->zip.data != NULL));
+ ut_ad(!!bpage->zip.ssize == (bpage->zip.data != NULL));
ut_ad(uncompressed || bpage->zip.data);
if (io_type == BUF_IO_READ) {
@@ -5824,10 +5827,10 @@ buf_page_io_complete(buf_page_t* bpage, bool dblwr, bool evict)
}
if (bpage->zip.data && uncompressed) {
- my_atomic_addlint(&buf_pool->n_pend_unzip, 1);
+ buf_pool->n_pend_unzip++;
ibool ok = buf_zip_decompress((buf_block_t*) bpage,
FALSE);
- my_atomic_addlint(&buf_pool->n_pend_unzip, ulint(-1));
+ buf_pool->n_pend_unzip--;
if (!ok) {
ib::info() << "Page "
@@ -5854,13 +5857,26 @@ buf_page_io_complete(buf_page_t* bpage, bool dblwr, bool evict)
} else if (read_space_id == 0 && read_page_no == 0) {
/* This is likely an uninitialized page. */
- } else if ((bpage->id.space() != TRX_SYS_SPACE
+ } else if (((!space->full_crc32()
+ || bpage->id.space() != TRX_SYS_SPACE)
&& bpage->id.space() != read_space_id)
|| bpage->id.page_no() != read_page_no) {
- /* We did not compare space_id to read_space_id
- in the system tablespace, because the field
- was written as garbage before MySQL 4.1.1,
- which did not support innodb_file_per_table. */
+ /* We do not compare space_id to read_space_id
+ in the system tablespace unless space->full_crc32(),
+ because the field was written as garbage before
+ MySQL 4.1.1, which introduced support for
+ innodb_file_per_table. */
+
+ if (space->full_crc32()
+ && *reinterpret_cast<uint32_t*>
+ (&frame[FIL_PAGE_FCRC32_KEY_VERSION])
+ && space->crypt_data
+ && space->crypt_data->type
+ != CRYPT_SCHEME_UNENCRYPTED) {
+ ib::error() << "Cannot decrypt " << bpage->id;
+ err = DB_DECRYPTION_FAILED;
+ goto release_page;
+ }
ib::error() << "Space id and page no stored in "
"the page, read in are "
@@ -5901,7 +5917,7 @@ database_corrupted:
<< ". You may have to recover from "
<< "a backup.";
- buf_page_print(frame, bpage->size);
+ buf_page_print(frame, bpage->zip_size());
ib::info()
<< "It is also possible that your"
@@ -5938,6 +5954,7 @@ database_corrupted:
if (err == DB_PAGE_CORRUPTED
|| err == DB_DECRYPTION_FAILED) {
+release_page:
const page_id_t corrupt_page_id = bpage->id;
buf_corrupt_page_release(bpage, space);
@@ -5954,19 +5971,15 @@ database_corrupted:
recv_recover_page(bpage);
}
- /* If space is being truncated then avoid ibuf operation.
- During re-init we have already freed ibuf entries. */
if (uncompressed
&& !recv_no_ibuf_operations
&& (bpage->id.space() == 0
|| !is_predefined_tablespace(bpage->id.space()))
- && !srv_is_tablespace_truncated(bpage->id.space())
&& fil_page_get_type(frame) == FIL_PAGE_INDEX
&& page_is_leaf(frame)) {
-
ibuf_merge_or_delete_for_page(
- (buf_block_t*) bpage, bpage->id,
- bpage->size);
+ reinterpret_cast<buf_block_t*>(bpage),
+ bpage->id, bpage->zip_size());
}
space->release_for_io();
@@ -7060,6 +7073,21 @@ buf_all_freed(void)
return(TRUE);
}
+/** Verify that post encryption checksum match with the calculated checksum.
+This function should be called only if tablespace contains crypt data metadata.
+@param[in] page page frame
+@param[in] fsp_flags tablespace flags
+@return true if true if page is encrypted and OK, false otherwise */
+bool buf_page_verify_crypt_checksum(const byte* page, ulint fsp_flags)
+{
+ if (!fil_space_t::full_crc32(fsp_flags)) {
+ return fil_space_verify_crypt_checksum(
+ page, fil_space_t::zip_size(fsp_flags));
+ }
+
+ return !buf_page_is_corrupted(true, page, fsp_flags);
+}
+
/*********************************************************************//**
Checks that there currently are no pending i/o-operations for the buffer
pool.
@@ -7144,28 +7172,21 @@ static byte* buf_tmp_page_encrypt(
byte* src_frame,
byte* dst_frame)
{
- uint header_len = FIL_PAGE_DATA;
- /* FIL page header is not encrypted */
- memcpy(dst_frame, src_frame, header_len);
-
/* Calculate the start offset in a page */
- uint unencrypted_bytes = header_len + FIL_PAGE_DATA_END;
- uint srclen = srv_page_size - unencrypted_bytes;
- const byte* src = src_frame + header_len;
- byte* dst = dst_frame + header_len;
+ uint srclen = srv_page_size - (FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+ + FIL_PAGE_FCRC32_CHECKSUM);
+ const byte* src = src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION;
+ byte* dst = dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION;
+
+ memcpy(dst_frame, src_frame, FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
if (!log_tmp_block_encrypt(src, srclen, dst, (offset * srv_page_size),
true)) {
return NULL;
}
- memcpy(dst_frame + srv_page_size - FIL_PAGE_DATA_END,
- src_frame + srv_page_size - FIL_PAGE_DATA_END,
- FIL_PAGE_DATA_END);
-
- /* Handle post encryption checksum */
- mach_write_to_4(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 4,
- buf_calc_page_crc32(dst_frame));
+ const ulint payload = srv_page_size - FIL_PAGE_FCRC32_CHECKSUM;
+ mach_write_to_4(dst_frame + payload, ut_crc32(dst_frame, payload));
srv_stats.pages_encrypted.inc();
srv_stats.n_temp_blocks_encrypted.inc();
@@ -7181,7 +7202,7 @@ a page is written to disk.
(may be src_frame or an encrypted/compressed copy of it) */
UNIV_INTERN
byte*
-buf_page_encrypt_before_write(
+buf_page_encrypt(
fil_space_t* space,
buf_page_t* bpage,
byte* src_frame)
@@ -7189,7 +7210,7 @@ buf_page_encrypt_before_write(
ut_ad(space->id == bpage->id.space());
bpage->real_size = srv_page_size;
- fil_page_type_validate(src_frame);
+ ut_d(fil_page_type_validate(space, src_frame));
switch (bpage->id.page_no()) {
case 0:
@@ -7217,18 +7238,23 @@ buf_page_encrypt_before_write(
&& crypt_data->type != CRYPT_SCHEME_UNENCRYPTED
&& (!crypt_data->is_default_encryption()
|| srv_encrypt_tables);
-
- page_compressed = FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags);
+ page_compressed = space->is_compressed();
}
if (!encrypted && !page_compressed) {
/* No need to encrypt or page compress the page.
Clear key-version & crypt-checksum. */
- memset(src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8);
+ if (space->full_crc32()) {
+ memset(src_frame + FIL_PAGE_FCRC32_KEY_VERSION, 0, 4);
+ } else {
+ memset(src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
+ 0, 8);
+ }
+
return src_frame;
}
- ut_ad(!bpage->size.is_compressed() || !page_compressed);
+ ut_ad(!bpage->zip_size() || !page_compressed);
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
/* Find free slot from temporary memory array */
buf_tmp_buffer_t* slot = buf_pool_reserve_tmp_slot(buf_pool);
@@ -7237,6 +7263,19 @@ buf_page_encrypt_before_write(
buf_tmp_reserve_crypt_buf(slot);
byte *dst_frame = slot->crypt_buf;
+ const bool full_crc32 = space->full_crc32();
+
+ if (full_crc32) {
+ /* Write LSN for the full crc32 checksum before
+ encryption. Because lsn is one of the input for encryption. */
+ mach_write_to_8(src_frame + FIL_PAGE_LSN,
+ bpage->newest_modification);
+ if (!page_compressed) {
+ mach_write_to_4(
+ src_frame + srv_page_size - FIL_PAGE_FCRC32_END_LSN,
+ (ulint) bpage->newest_modification);
+ }
+ }
if (!page_compressed) {
not_compressed:
@@ -7256,26 +7295,38 @@ not_compressed:
bpage->real_size = srv_page_size;
slot->out_buf = dst_frame = tmp;
- ut_d(fil_page_type_validate(tmp));
+ ut_d(fil_page_type_validate(space, tmp));
} else {
ut_ad(space->purpose != FIL_TYPE_TEMPORARY);
/* First we compress the page content */
buf_tmp_reserve_compression_buf(slot);
byte* tmp = slot->comp_buf;
ulint out_len = fil_page_compress(
- src_frame, tmp,
- fsp_flags_get_page_compression_level(space->flags),
+ src_frame, tmp, space->flags,
fil_space_get_block_size(space, bpage->id.page_no()),
encrypted);
+
if (!out_len) {
goto not_compressed;
}
bpage->real_size = out_len;
+ if (full_crc32) {
+ ut_d(bool compressed = false);
+ out_len = buf_page_full_crc32_size(tmp,
+#ifdef UNIV_DEBUG
+ &compressed,
+#else
+ NULL,
+#endif
+ NULL);
+ ut_ad(compressed);
+ }
+
/* Workaround for MDEV-15527. */
memset(tmp + out_len, 0 , srv_page_size - out_len);
- ut_d(fil_page_type_validate(tmp));
+ ut_d(fil_page_type_validate(space, tmp));
if (encrypted) {
/* And then we encrypt the page content */
@@ -7286,10 +7337,17 @@ not_compressed:
dst_frame);
}
+ if (full_crc32) {
+ compile_time_assert(FIL_PAGE_FCRC32_CHECKSUM == 4);
+ mach_write_to_4(tmp + out_len - 4,
+ ut_crc32(tmp, out_len - 4));
+ ut_ad(!buf_page_is_corrupted(true, tmp, space->flags));
+ }
+
slot->out_buf = dst_frame = tmp;
}
- ut_d(fil_page_type_validate(dst_frame));
+ ut_d(fil_page_type_validate(space, dst_frame));
// return dst_frame which will be written
return dst_frame;
@@ -7303,7 +7361,7 @@ bool
buf_page_should_punch_hole(
const buf_page_t* bpage)
{
- return (bpage->real_size != bpage->size.physical());
+ return bpage->real_size != bpage->physical_size();
}
/**
@@ -7316,6 +7374,6 @@ buf_page_get_trim_length(
const buf_page_t* bpage,
ulint write_length)
{
- return (bpage->size.physical() - write_length);
+ return bpage->physical_size() - write_length;
}
#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/buf/buf0checksum.cc b/storage/innobase/buf/buf0checksum.cc
index 70ad5ed600b..2b2a74dd736 100644
--- a/storage/innobase/buf/buf0checksum.cc
+++ b/storage/innobase/buf/buf0checksum.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -39,35 +39,6 @@ ha_innodb.cc:12251: error: cannot convert 'srv_checksum_algorithm_t*' to
'long unsigned int*' in initialization */
ulong srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_INNODB;
-#ifdef INNODB_BUG_ENDIAN_CRC32
-/** Calculate the CRC32 checksum of a page. The value is stored to the page
-when it is written to a file and also checked for a match when reading from
-the file. Note that we must be careful to calculate the same value on all
-architectures.
-@param[in] page buffer page (srv_page_size bytes)
-@param[in] bug_endian whether to use big endian byteorder
-when converting byte strings to integers, for bug-compatibility with
-big-endian architecture running MySQL 5.6, MariaDB 10.0 or MariaDB 10.1
-@return CRC-32C */
-uint32_t buf_calc_page_crc32(const byte* page, bool bug_endian)
-{
- return bug_endian
- ? ut_crc32_legacy_big_endian(
- page + FIL_PAGE_OFFSET,
- FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
- - FIL_PAGE_OFFSET)
- ^ ut_crc32_legacy_big_endian(page + FIL_PAGE_DATA,
- srv_page_size
- - (FIL_PAGE_DATA
- + FIL_PAGE_END_LSN_OLD_CHKSUM))
- : ut_crc32(page + FIL_PAGE_OFFSET,
- FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
- - FIL_PAGE_OFFSET)
- ^ ut_crc32(page + FIL_PAGE_DATA,
- srv_page_size
- - (FIL_PAGE_DATA + FIL_PAGE_END_LSN_OLD_CHKSUM));
-}
-#else
/** Calculate the CRC32 checksum of a page. The value is stored to the page
when it is written to a file and also checked for a match when reading from
the file. Note that we must be careful to calculate the same value on all
@@ -88,7 +59,6 @@ uint32_t buf_calc_page_crc32(const byte* page)
srv_page_size
- (FIL_PAGE_DATA + FIL_PAGE_END_LSN_OLD_CHKSUM));
}
-#endif
/** Calculate a checksum which is stored to the page when it is written
to a file. Note that we must be careful to calculate the same value on
@@ -151,6 +121,10 @@ buf_checksum_algorithm_name(srv_checksum_algorithm_t algo)
return("none");
case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
return("strict_none");
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ return("full_crc32");
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ return("strict_full_crc32");
}
ut_error;
diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc
index 973f780c16a..baa702c6c74 100644
--- a/storage/innobase/buf/buf0dblwr.cc
+++ b/storage/innobase/buf/buf0dblwr.cc
@@ -87,7 +87,7 @@ buf_dblwr_get(
buf_block_t* block;
block = buf_page_get(page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
- univ_page_size, RW_X_LATCH, mtr);
+ 0, RW_X_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
@@ -206,9 +206,8 @@ start_again:
}
}
- trx_sys_block = buf_page_get(
- page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
- univ_page_size, RW_X_LATCH, &mtr);
+ trx_sys_block = buf_page_get(page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
+ 0, RW_X_LATCH, &mtr);
block2 = fseg_create(fil_system.sys_space,
TRX_SYS_DOUBLEWRITE + TRX_SYS_DOUBLEWRITE_FSEG,
@@ -373,7 +372,7 @@ buf_dblwr_init_or_load_pages(
byte* doublewrite;
byte* unaligned_read_buf;
ibool reset_space_ids = FALSE;
- recv_dblwr_t& recv_dblwr = recv_sys->dblwr;
+ recv_dblwr_t& recv_dblwr = recv_sys.dblwr;
/* We do the file i/o past the buffer pool */
@@ -478,6 +477,7 @@ buf_dblwr_init_or_load_pages(
page = buf;
for (ulint i = 0; i < TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 2; i++) {
+
if (reset_space_ids) {
ulint source_page_no;
@@ -534,11 +534,11 @@ buf_dblwr_init_or_load_pages(
void
buf_dblwr_process()
{
- ut_ad(recv_sys->parse_start_lsn);
+ ut_ad(recv_sys.parse_start_lsn);
ulint page_no_dblwr = 0;
byte* read_buf;
- recv_dblwr_t& recv_dblwr = recv_sys->dblwr;
+ recv_dblwr_t& recv_dblwr = recv_sys.dblwr;
if (!buf_dblwr) {
return;
@@ -563,7 +563,7 @@ buf_dblwr_process()
const ulint space_id = page_get_space_id(page);
const lsn_t lsn = mach_read_from_8(page + FIL_PAGE_LSN);
- if (recv_sys->parse_start_lsn > lsn) {
+ if (recv_sys.parse_start_lsn > lsn) {
/* Pages written before the checkpoint are
not useful for recovery. */
continue;
@@ -571,7 +571,7 @@ buf_dblwr_process()
const page_id_t page_id(space_id, page_no);
- if (recv_sys->scanned_lsn < lsn) {
+ if (recv_sys.scanned_lsn < lsn) {
ib::warn() << "Ignoring a doublewrite copy of page "
<< page_id
<< " with future log sequence number "
@@ -591,12 +591,9 @@ buf_dblwr_process()
if (UNIV_UNLIKELY(page_no >= space->size)) {
- /* Do not report the warning if the tablespace
- is scheduled for truncation or was truncated
- and we have parsed an MLOG_TRUNCATE record. */
- if (!srv_is_tablespace_truncated(space_id)
- && !srv_was_tablespace_truncated(space)
- && !srv_is_undo_tablespace(space_id)) {
+ /* Do not report the warning for undo
+ tablespaces, because they can be truncated in place. */
+ if (!srv_is_undo_tablespace(space_id)) {
ib::warn() << "A copy of page " << page_no
<< " in the doublewrite buffer slot "
<< page_no_dblwr
@@ -609,13 +606,13 @@ next_page:
continue;
}
- const page_size_t page_size(space->flags);
- ut_ad(!buf_is_zeroes(span<const byte>(page,
- page_size.physical())));
+ const ulint physical_size = space->physical_size();
+ const ulint zip_size = space->zip_size();
+ ut_ad(!buf_is_zeroes(span<const byte>(page, physical_size)));
/* We want to ensure that for partial reads the
unread portion of the page is NUL. */
- memset(read_buf, 0x0, page_size.physical());
+ memset(read_buf, 0x0, physical_size);
IORequest request;
@@ -624,8 +621,8 @@ next_page:
/* Read in the actual page from the file */
dberr_t err = fil_io(
request, true,
- page_id, page_size,
- 0, page_size.physical(), read_buf, NULL);
+ page_id, zip_size,
+ 0, physical_size, read_buf, NULL);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
ib::warn()
@@ -634,8 +631,7 @@ next_page:
<< "error: " << err;
}
- if (buf_is_zeroes(span<const byte>(read_buf,
- page_size.physical()))) {
+ if (buf_is_zeroes(span<const byte>(read_buf, physical_size))) {
/* We will check if the copy in the
doublewrite buffer is valid. If not, we will
ignore this page (there should be redo log
@@ -662,8 +658,8 @@ next_page:
IORequest write_request(IORequest::WRITE);
- fil_io(write_request, true, page_id, page_size,
- 0, page_size.physical(), page, NULL);
+ fil_io(write_request, true, page_id, zip_size,
+ 0, physical_size, page, nullptr);
ib::info() << "Recovered page " << page_id
<< " from the doublewrite buffer.";
@@ -768,40 +764,42 @@ buf_dblwr_update(
}
}
-/********************************************************************//**
-Check the LSN values on the page. */
-static
-void
-buf_dblwr_check_page_lsn(
-/*=====================*/
- const page_t* page) /*!< in: page to check */
+#ifdef UNIV_DEBUG
+/** Check the LSN values on the page.
+@param[in] page page to check
+@param[in] s tablespace */
+static void buf_dblwr_check_page_lsn(const page_t* page, const fil_space_t& s)
{
- ibool page_compressed = (mach_read_from_2(page+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED);
- uint key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
-
/* Ignore page compressed or encrypted pages */
- if (page_compressed || key_version) {
+ if (s.is_compressed()
+ || buf_page_get_key_version(page, s.flags)) {
return;
}
- if (memcmp(page + (FIL_PAGE_LSN + 4),
- page + (srv_page_size
- - FIL_PAGE_END_LSN_OLD_CHKSUM + 4),
- 4)) {
-
- const ulint lsn1 = mach_read_from_4(
- page + FIL_PAGE_LSN + 4);
- const ulint lsn2 = mach_read_from_4(
- page + srv_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM
- + 4);
-
- ib::error() << "The page to be written seems corrupt!"
+ const unsigned lsn1 = mach_read_from_4(page + FIL_PAGE_LSN + 4),
+ lsn2 = mach_read_from_4(page + srv_page_size
+ - (s.full_crc32()
+ ? FIL_PAGE_FCRC32_END_LSN
+ : FIL_PAGE_END_LSN_OLD_CHKSUM - 4));
+ if (UNIV_UNLIKELY(lsn1 != lsn2)) {
+ ib::error() << "The page to be written to "
+ << s.chain.start->name <<
+ " seems corrupt!"
" The low 4 bytes of LSN fields do not match"
" (" << lsn1 << " != " << lsn2 << ")!"
" Noticed in the buffer pool.";
}
}
+static void buf_dblwr_check_page_lsn(const buf_page_t& b, const byte* page)
+{
+ if (fil_space_t* space = fil_space_acquire_for_io(b.id.space())) {
+ buf_dblwr_check_page_lsn(page, *space);
+ space->release_for_io();
+ }
+}
+#endif /* UNIV_DEBUG */
+
/********************************************************************//**
Asserts when a corrupt block is find during writing out data to the
disk. */
@@ -811,7 +809,7 @@ buf_dblwr_assert_on_corrupt_block(
/*==============================*/
const buf_block_t* block) /*!< in: block to check */
{
- buf_page_print(block->frame, univ_page_size);
+ buf_page_print(block->frame);
ib::fatal() << "Apparent corruption of an index page "
<< block->page.id
@@ -897,14 +895,14 @@ buf_dblwr_write_block_to_datafile(
void * frame = buf_page_get_frame(bpage);
if (bpage->zip.data != NULL) {
- ut_ad(bpage->size.is_compressed());
+ ut_ad(bpage->zip_size());
- fil_io(request, sync, bpage->id, bpage->size, 0,
- bpage->size.physical(),
+ fil_io(request, sync, bpage->id, bpage->zip_size(), 0,
+ bpage->zip_size(),
(void*) frame,
(void*) bpage);
} else {
- ut_ad(!bpage->size.is_compressed());
+ ut_ad(!bpage->zip_size());
/* Our IO API is common for both reads and writes and is
therefore geared towards a non-const parameter. */
@@ -913,11 +911,10 @@ buf_dblwr_write_block_to_datafile(
const_cast<buf_page_t*>(bpage));
ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
- buf_dblwr_check_page_lsn(block->frame);
-
+ ut_d(buf_dblwr_check_page_lsn(block->page, block->frame));
fil_io(request,
- sync, bpage->id, bpage->size, 0, bpage->real_size,
- frame, block);
+ sync, bpage->id, bpage->zip_size(), 0, bpage->real_size,
+ frame, block);
}
}
@@ -990,9 +987,16 @@ try_again:
write_buf = buf_dblwr->write_buf;
- for (ulint len2 = 0, i = 0;
+ for (ulint
+#if defined(UNIV_DEBUG) || !defined(DBUG_OFF)
+ len2 = 0,
+#endif
+ i = 0;
i < buf_dblwr->first_free;
- len2 += srv_page_size, i++) {
+#if defined(UNIV_DEBUG) || !defined(DBUG_OFF)
+ len2 += srv_page_size,
+#endif
+ i++) {
const buf_block_t* block;
@@ -1008,10 +1012,7 @@ try_again:
/* Check that the actual page in the buffer pool is
not corrupt and the LSN values are sane. */
buf_dblwr_check_block(block);
-
- /* Check that the page as written to the doublewrite
- buffer has sane LSN values. */
- buf_dblwr_check_page_lsn(write_buf + len2);
+ ut_d(buf_dblwr_check_page_lsn(block->page, write_buf + len2));
}
/* Write out the first block of the doublewrite buffer */
@@ -1019,7 +1020,7 @@ try_again:
buf_dblwr->first_free) << srv_page_size_shift;
fil_io(IORequestWrite, true,
- page_id_t(TRX_SYS_SPACE, buf_dblwr->block1), univ_page_size,
+ page_id_t(TRX_SYS_SPACE, buf_dblwr->block1), 0,
0, len, (void*) write_buf, NULL);
if (buf_dblwr->first_free <= TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) {
@@ -1035,7 +1036,7 @@ try_again:
+ (TRX_SYS_DOUBLEWRITE_BLOCK_SIZE << srv_page_size_shift);
fil_io(IORequestWrite, true,
- page_id_t(TRX_SYS_SPACE, buf_dblwr->block2), univ_page_size,
+ page_id_t(TRX_SYS_SPACE, buf_dblwr->block2), 0,
0, len, (void*) write_buf, NULL);
flush:
@@ -1121,18 +1122,15 @@ try_again:
encryption and/or page compression */
void * frame = buf_page_get_frame(bpage);
- if (bpage->size.is_compressed()) {
- MEM_CHECK_DEFINED(bpage->zip.data, bpage->size.physical());
+ if (auto zip_size = bpage->zip_size()) {
+ MEM_CHECK_DEFINED(bpage->zip.data, zip_size);
/* Copy the compressed page and clear the rest. */
-
- memcpy(p, frame, bpage->size.physical());
-
- memset(p + bpage->size.physical(), 0x0,
- srv_page_size - bpage->size.physical());
+ memcpy(p, frame, zip_size);
+ memset(p + zip_size, 0x0, srv_page_size - zip_size);
} else {
ut_a(buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE);
- MEM_CHECK_DEFINED(frame, bpage->size.logical());
- memcpy(p, frame, bpage->size.logical());
+ MEM_CHECK_DEFINED(frame, srv_page_size);
+ memcpy(p, frame, srv_page_size);
}
buf_dblwr->buf_block_arr[buf_dblwr->first_free] = bpage;
@@ -1194,8 +1192,8 @@ buf_dblwr_write_single_page(
/* Check that the page as written to the doublewrite
buffer has sane LSN values. */
if (!bpage->zip.data) {
- buf_dblwr_check_page_lsn(
- ((buf_block_t*) bpage)->frame);
+ ut_d(buf_dblwr_check_page_lsn(
+ *bpage, ((buf_block_t*) bpage)->frame));
}
}
@@ -1254,18 +1252,18 @@ retry:
encryption and/or page compression */
void * frame = buf_page_get_frame(bpage);
- if (bpage->size.is_compressed()) {
+ if (auto zip_size = bpage->zip_size()) {
memcpy(buf_dblwr->write_buf + srv_page_size * i,
- frame, bpage->size.physical());
+ frame, zip_size);
memset(buf_dblwr->write_buf + srv_page_size * i
- + bpage->size.physical(), 0x0,
- srv_page_size - bpage->size.physical());
+ + zip_size, 0x0,
+ srv_page_size - zip_size);
fil_io(IORequestWrite,
true,
page_id_t(TRX_SYS_SPACE, offset),
- univ_page_size,
+ 0,
0,
srv_page_size,
(void *)(buf_dblwr->write_buf + srv_page_size * i),
@@ -1276,7 +1274,7 @@ retry:
fil_io(IORequestWrite,
true,
page_id_t(TRX_SYS_SPACE, offset),
- univ_page_size,
+ 0,
0,
srv_page_size,
(void*) frame,
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index eb7d085ba57..234fb8ef5f3 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -671,7 +671,7 @@ buf_load()
so all pages from a given tablespace are consecutive. */
ulint cur_space_id = BUF_DUMP_SPACE(dump[0]);
fil_space_t* space = fil_space_acquire_silent(cur_space_id);
- page_size_t page_size(space ? space->flags : 0);
+ ulint zip_size = space ? space->zip_size() : 0;
/* JAN: TODO: MySQL 5.7 PSI
#ifdef HAVE_PSI_STAGE_INTERFACE
@@ -702,9 +702,7 @@ buf_load()
space = fil_space_acquire_silent(cur_space_id);
if (space != NULL) {
- const page_size_t cur_page_size(
- space->flags);
- page_size.copy_from(cur_page_size);
+ zip_size = space->zip_size();
}
}
@@ -719,7 +717,7 @@ buf_load()
buf_read_page_background(
page_id_t(this_space_id, BUF_DUMP_PAGE(dump[i])),
- page_size, true);
+ zip_size, true);
if (i % 64 == 63) {
os_aio_simulated_wake_handler_threads();
@@ -821,7 +819,7 @@ DECLARE_THREAD(buf_dump_thread)(void*)
if (srv_buffer_pool_load_at_startup) {
#ifdef WITH_WSREP
- if (!wsrep_recovery) {
+ if (!get_wsrep_recovery()) {
#endif /* WITH_WSREP */
buf_load();
#ifdef WITH_WSREP
@@ -855,7 +853,7 @@ DECLARE_THREAD(buf_dump_thread)(void*)
"Dumping of buffer pool not started"
" as load was incomplete");
#ifdef WITH_WSREP
- } else if (wsrep_recovery) {
+ } else if (get_wsrep_recovery()) {
#endif /* WITH_WSREP */
} else {
buf_dump(FALSE/* do complete dump at shutdown */);
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 497b0f24e93..eee8ff0af4a 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -205,7 +205,7 @@ incr_flush_list_size_in_bytes(
{
ut_ad(buf_flush_list_mutex_own(buf_pool));
- buf_pool->stat.flush_list_bytes += block->page.size.physical();
+ buf_pool->stat.flush_list_bytes += block->physical_size();
ut_ad(buf_pool->stat.flush_list_bytes <= buf_pool->curr_pool_size);
}
@@ -421,120 +421,44 @@ buf_flush_insert_into_flush_list(
ut_ad(buf_page_mutex_own(block));
buf_flush_list_mutex_enter(buf_pool);
-
- ut_ad((UT_LIST_GET_FIRST(buf_pool->flush_list) == NULL)
- || (UT_LIST_GET_FIRST(buf_pool->flush_list)->oldest_modification
- <= lsn));
-
- /* If we are in the recovery then we need to update the flush
- red-black tree as well. */
- if (buf_pool->flush_rbt != NULL) {
- buf_flush_list_mutex_exit(buf_pool);
- buf_flush_insert_sorted_into_flush_list(buf_pool, block, lsn);
- return;
- }
-
- ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
- ut_ad(!block->page.in_flush_list);
-
- ut_d(block->page.in_flush_list = TRUE);
- block->page.oldest_modification = lsn;
-
- UT_LIST_ADD_FIRST(buf_pool->flush_list, &block->page);
-
- incr_flush_list_size_in_bytes(block, buf_pool);
-
- MEM_CHECK_DEFINED(block->page.size.is_compressed()
- ? block->page.zip.data : block->frame,
- block->page.size.physical());
-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
- ut_a(buf_flush_validate_skip(buf_pool));
-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
-
- buf_flush_list_mutex_exit(buf_pool);
-}
-
-/********************************************************************//**
-Inserts a modified block into the flush list in the right sorted position.
-This function is used by recovery, because there the modifications do not
-necessarily come in the order of lsn's. */
-void
-buf_flush_insert_sorted_into_flush_list(
-/*====================================*/
- buf_pool_t* buf_pool, /*!< in: buffer pool instance */
- buf_block_t* block, /*!< in/out: block which is modified */
- lsn_t lsn) /*!< in: oldest modification */
-{
- buf_page_t* prev_b;
- buf_page_t* b;
-
- ut_ad(srv_shutdown_state != SRV_SHUTDOWN_FLUSH_PHASE);
- ut_ad(!buf_pool_mutex_own(buf_pool));
- ut_ad(log_flush_order_mutex_own());
- ut_ad(buf_page_mutex_own(block));
- ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
-
- buf_flush_list_mutex_enter(buf_pool);
-
- /* The field in_LRU_list is protected by buf_pool->mutex, which
- we are not holding. However, while a block is in the flush
- list, it is dirty and cannot be discarded, not from the
- page_hash or from the LRU list. At most, the uncompressed
- page frame of a compressed block may be discarded or created
- (copying the block->page to or from a buf_page_t that is
- dynamically allocated from buf_buddy_alloc()). Because those
- transitions hold block->mutex and the flush list mutex (via
- buf_flush_relocate_on_flush_list()), there is no possibility
- of a race condition in the assertions below. */
- ut_ad(block->page.in_LRU_list);
- ut_ad(block->page.in_page_hash);
- /* buf_buddy_block_register() will take a block in the
- BUF_BLOCK_MEMORY state, not a file page. */
- ut_ad(!block->page.in_zip_hash);
-
ut_ad(!block->page.in_flush_list);
ut_d(block->page.in_flush_list = TRUE);
+ ut_ad(!block->page.oldest_modification);
block->page.oldest_modification = lsn;
-
- MEM_CHECK_DEFINED(block->page.size.is_compressed()
+ MEM_CHECK_DEFINED(block->page.zip.data
? block->page.zip.data : block->frame,
- block->page.size.physical());
-
- prev_b = NULL;
-
- /* For the most part when this function is called the flush_rbt
- should not be NULL. In a very rare boundary case it is possible
- that the flush_rbt has already been freed by the recovery thread
- before the last page was hooked up in the flush_list by the
- io-handler thread. In that case we'll just do a simple
- linear search in the else block. */
- if (buf_pool->flush_rbt != NULL) {
-
- prev_b = buf_flush_insert_in_flush_rbt(&block->page);
-
- } else {
-
- b = UT_LIST_GET_FIRST(buf_pool->flush_list);
-
- while (b != NULL && b->oldest_modification
- > block->page.oldest_modification) {
+ block->physical_size());
+ incr_flush_list_size_in_bytes(block, buf_pool);
- ut_ad(b->in_flush_list);
- prev_b = b;
- b = UT_LIST_GET_NEXT(list, b);
+ if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) {
+ ut_ad(srv_shutdown_state != SRV_SHUTDOWN_FLUSH_PHASE);
+ /* The field in_LRU_list is protected by buf_pool->mutex, which
+ we are not holding. However, while a block is in the flush
+ list, it is dirty and cannot be discarded, not from the
+ page_hash or from the LRU list. At most, the uncompressed
+ page frame of a compressed block may be discarded or created
+ (copying the block->page to or from a buf_page_t that is
+ dynamically allocated from buf_buddy_alloc()). Because those
+ transitions hold block->mutex and the flush list mutex (via
+ buf_flush_relocate_on_flush_list()), there is no possibility
+ of a race condition in the assertions below. */
+ ut_ad(block->page.in_LRU_list);
+ ut_ad(block->page.in_page_hash);
+ /* buf_buddy_block_register() will take a block in the
+ BUF_BLOCK_MEMORY state, not a file page. */
+ ut_ad(!block->page.in_zip_hash);
+
+ if (buf_page_t* prev_b =
+ buf_flush_insert_in_flush_rbt(&block->page)) {
+ UT_LIST_INSERT_AFTER(buf_pool->flush_list, prev_b, &block->page);
+ goto func_exit;
}
}
- if (prev_b == NULL) {
- UT_LIST_ADD_FIRST(buf_pool->flush_list, &block->page);
- } else {
- UT_LIST_INSERT_AFTER(buf_pool->flush_list, prev_b, &block->page);
- }
-
- incr_flush_list_size_in_bytes(block, buf_pool);
-
+ UT_LIST_ADD_FIRST(buf_pool->flush_list, &block->page);
+func_exit:
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
- ut_a(buf_flush_validate_low(buf_pool));
+ ut_a(buf_flush_validate_skip(buf_pool));
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
buf_flush_list_mutex_exit(buf_pool);
@@ -656,7 +580,7 @@ buf_flush_remove(
}
/* If the flush_rbt is active then delete from there as well. */
- if (buf_pool->flush_rbt != NULL) {
+ if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) {
buf_flush_delete_from_flush_rbt(bpage);
}
@@ -664,7 +588,7 @@ buf_flush_remove(
because we assert on in_flush_list in comparison function. */
ut_d(bpage->in_flush_list = FALSE);
- buf_pool->stat.flush_list_bytes -= bpage->size.physical();
+ buf_pool->stat.flush_list_bytes -= bpage->physical_size();
bpage->oldest_modification = 0;
@@ -724,7 +648,7 @@ buf_flush_relocate_on_flush_list(
/* If recovery is active we must swap the control blocks in
the flush_rbt as well. */
- if (buf_pool->flush_rbt != NULL) {
+ if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) {
buf_flush_delete_from_flush_rbt(bpage);
prev_b = buf_flush_insert_in_flush_rbt(dpage);
}
@@ -791,9 +715,9 @@ void buf_flush_write_complete(buf_page_t* bpage, bool dblwr)
/** Calculate the checksum of a page from compressed table and update
the page.
-@param[in,out] page page to update
-@param[in] size compressed page size
-@param[in] lsn LSN to stamp on the page */
+@param[in,out] page page to update
+@param[in] size compressed page size
+@param[in] lsn LSN to stamp on the page */
void
buf_flush_update_zip_checksum(
buf_frame_t* page,
@@ -810,31 +734,60 @@ buf_flush_update_zip_checksum(
mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, checksum);
}
+/** Assign the full crc32 checksum for non-compressed page.
+@param[in,out] page page to be updated */
+void buf_flush_assign_full_crc32_checksum(byte* page)
+{
+ ut_d(bool compressed = false);
+ ut_d(bool corrupted = false);
+ ut_d(const uint size = buf_page_full_crc32_size(page, &compressed,
+ &corrupted));
+ ut_ad(!compressed);
+ ut_ad(!corrupted);
+ ut_ad(size == uint(srv_page_size));
+ const ulint payload = srv_page_size - FIL_PAGE_FCRC32_CHECKSUM;
+ mach_write_to_4(page + payload, ut_crc32(page, payload));
+}
+
/** Initialize a page for writing to the tablespace.
-@param[in] block buffer block; NULL if bypassing the buffer pool
-@param[in,out] page page frame
-@param[in,out] page_zip_ compressed page, or NULL if uncompressed
-@param[in] newest_lsn newest modification LSN to the page */
+@param[in] block buffer block; NULL if bypassing
+ the buffer pool
+@param[in,out] page page frame
+@param[in,out] page_zip_ compressed page, or NULL if
+ uncompressed
+@param[in] newest_lsn newest modification LSN to the page
+@param[in] use_full_checksum whether tablespace uses full checksum */
void
buf_flush_init_for_writing(
const buf_block_t* block,
byte* page,
void* page_zip_,
- lsn_t newest_lsn)
+ lsn_t newest_lsn,
+ bool use_full_checksum)
{
+ if (block != NULL && block->frame != page) {
+ /* If page is encrypted in full crc32 format then
+ checksum stored already as a part of fil_encrypt_buf() */
+ ut_ad(use_full_checksum);
+ return;
+ }
+
ut_ad(block == NULL || block->frame == page);
ut_ad(block == NULL || page_zip_ == NULL
|| &block->page.zip == page_zip_);
ut_ad(!block || newest_lsn);
ut_ad(page);
-#if 0 /* MDEV-15528 TODO: reinstate this check */
- /* innodb_immediate_scrub_data_uncompressed=ON would cause
- fsp_init_file_page() to be called on freed pages, and thus
- cause them to be written as almost-all-zeroed.
- In MDEV-15528 we should change that implement an option to
- make freed pages appear all-zero, bypassing this code. */
- ut_ad(!newest_lsn || fil_page_get_type(page));
-#endif
+ /* Encryption key rotation procedure can write dummy log records to
+ update page's space id, what causes page LSN update, and we need some
+ additional check during recovery to be sure the page is freshly
+ allocated, see buf_page_create() to find such patterns */
+ ut_ad(fil_page_get_type(page)
+ || (!newest_lsn
+ || (mach_read_from_4(page + FIL_PAGE_SPACE_ID)
+ == block->page.id.space()
+ && mach_read_from_4(page + FIL_PAGE_PREV) == 0xffffffff
+ && mach_read_from_4(page + FIL_PAGE_NEXT) == 0xffffffff
+ && !mach_read_from_4(page + FIL_PAGE_SPACE_OR_CHKSUM))));
if (page_zip_) {
page_zip_des_t* page_zip;
@@ -879,8 +832,14 @@ buf_flush_init_for_writing(
/* Write the newest modification lsn to the page header and trailer */
mach_write_to_8(page + FIL_PAGE_LSN, newest_lsn);
- mach_write_to_8(page + srv_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM,
- newest_lsn);
+ if (use_full_checksum) {
+ mach_write_to_4(page + srv_page_size - FIL_PAGE_FCRC32_END_LSN,
+ static_cast<uint32_t>(newest_lsn));
+ return buf_flush_assign_full_crc32_checksum(page);
+ } else {
+ mach_write_to_8(page + srv_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM,
+ newest_lsn);
+ }
if (block && srv_page_size == 16384) {
/* The page type could be garbage in old files
@@ -958,6 +917,8 @@ buf_flush_init_for_writing(
be calculated after storing the new formula checksum. */
checksum = buf_calc_page_old_checksum(page);
break;
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
/* In other cases we write the same checksum to both fields. */
@@ -1000,7 +961,10 @@ buf_flush_write_block_low(
|| space->purpose == FIL_TYPE_TABLESPACE);
ut_ad((space->purpose == FIL_TYPE_TEMPORARY)
== (space == fil_system.temp_space));
+
page_t* frame = NULL;
+ const bool full_crc32 = space->full_crc32();
+
#ifdef UNIV_DEBUG
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
ut_ad(!buf_pool_mutex_own(buf_pool));
@@ -1040,8 +1004,7 @@ buf_flush_write_block_low(
break;
case BUF_BLOCK_ZIP_DIRTY:
frame = bpage->zip.data;
-
- buf_flush_update_zip_checksum(frame, bpage->size.physical(),
+ buf_flush_update_zip_checksum(frame, bpage->zip_size(),
bpage->newest_modification);
break;
case BUF_BLOCK_FILE_PAGE:
@@ -1050,15 +1013,23 @@ buf_flush_write_block_low(
frame = ((buf_block_t*) bpage)->frame;
}
+ byte* page = reinterpret_cast<const buf_block_t*>(bpage)->frame;
+
+ if (full_crc32) {
+ page = buf_page_encrypt(space, bpage, page);
+ frame = page;
+ }
+
buf_flush_init_for_writing(
- reinterpret_cast<const buf_block_t*>(bpage),
- reinterpret_cast<const buf_block_t*>(bpage)->frame,
+ reinterpret_cast<const buf_block_t*>(bpage), page,
bpage->zip.data ? &bpage->zip : NULL,
- bpage->newest_modification);
+ bpage->newest_modification, full_crc32);
break;
}
- frame = buf_page_encrypt_before_write(space, bpage, frame);
+ if (!full_crc32) {
+ frame = buf_page_encrypt(space, bpage, frame);
+ }
ut_ad(space->purpose == FIL_TYPE_TABLESPACE
|| space->atomic_write_supported);
@@ -1069,7 +1040,8 @@ buf_flush_write_block_low(
/* TODO: pass the tablespace to fil_io() */
fil_io(request,
- sync, bpage->id, bpage->size, 0, bpage->size.physical(),
+ sync, bpage->id, bpage->zip_size(), 0,
+ bpage->physical_size(),
frame, bpage);
} else {
ut_ad(!srv_read_only_mode);
@@ -1309,9 +1281,13 @@ buf_flush_try_neighbors(
buf_pool_t* buf_pool = buf_pool_get(page_id);
ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
+ fil_space_t* space = fil_space_acquire_for_io(page_id.space());
+ if (!space) {
+ return 0;
+ }
if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN
- || srv_flush_neighbors == 0) {
+ || !srv_flush_neighbors || !space->is_rotational()) {
/* If there is little space or neighbor flushing is
not enabled then just flush the victim. */
low = page_id.page_no();
@@ -1366,12 +1342,7 @@ buf_flush_try_neighbors(
}
}
- if (fil_space_t *s = fil_space_acquire_for_io(page_id.space())) {
- high = s->max_page_number_for_io(high);
- s->release_for_io();
- } else {
- return 0;
- }
+ high = space->max_page_number_for_io(high);
DBUG_PRINT("ib_buf", ("flush %u:%u..%u",
page_id.space(),
@@ -1447,6 +1418,8 @@ buf_flush_try_neighbors(
buf_pool_mutex_exit(buf_pool);
}
+ space->release_for_io();
+
if (count > 1) {
MONITOR_INC_VALUE_CUMULATIVE(
MONITOR_FLUSH_NEIGHBOR_TOTAL_PAGE,
@@ -3031,7 +3004,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)(void*)
" See the man page of setpriority().";
}
/* Signal that setpriority() has been attempted. */
- os_event_set(recv_sys->flush_end);
+ os_event_set(recv_sys.flush_end);
#endif /* UNIV_LINUX */
do {
@@ -3039,13 +3012,13 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)(void*)
ulint n_flushed_lru = 0;
ulint n_flushed_list = 0;
- os_event_wait(recv_sys->flush_start);
+ os_event_wait(recv_sys.flush_start);
if (!recv_writer_thread_active) {
break;
}
- switch (recv_sys->flush_type) {
+ switch (recv_sys.flush_type) {
case BUF_FLUSH_LRU:
/* Flush pages from end of LRU if required */
pc_request(0, LSN_MAX);
@@ -3066,8 +3039,8 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)(void*)
ut_ad(0);
}
- os_event_reset(recv_sys->flush_start);
- os_event_set(recv_sys->flush_end);
+ os_event_reset(recv_sys.flush_start);
+ os_event_set(recv_sys.flush_end);
} while (recv_writer_thread_active);
os_event_wait(buf_flush_event);
@@ -3552,7 +3525,7 @@ buf_flush_validate_low(
/* If we are in recovery mode i.e.: flush_rbt != NULL
then each block in the flush_list must also be present
in the flush_rbt. */
- if (buf_pool->flush_rbt != NULL) {
+ if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) {
rnode = rbt_first(buf_pool->flush_rbt);
}
@@ -3573,7 +3546,7 @@ buf_flush_validate_low(
|| buf_page_get_state(bpage) == BUF_BLOCK_REMOVE_HASH);
ut_a(om > 0);
- if (buf_pool->flush_rbt != NULL) {
+ if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) {
buf_page_t** prpage;
ut_a(rnode != NULL);
diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc
index d3bba9a1130..c85f9331580 100644
--- a/storage/innobase/buf/buf0lru.cc
+++ b/storage/innobase/buf/buf0lru.cc
@@ -168,7 +168,7 @@ incr_LRU_size_in_bytes(
{
ut_ad(buf_pool_mutex_own(buf_pool));
- buf_pool->stat.LRU_bytes += bpage->size.physical();
+ buf_pool->stat.LRU_bytes += bpage->physical_size();
ut_ad(buf_pool->stat.LRU_bytes <= buf_pool->curr_pool_size);
}
@@ -1232,7 +1232,7 @@ buf_LRU_remove_block(
UT_LIST_REMOVE(buf_pool->LRU, bpage);
ut_d(bpage->in_LRU_list = FALSE);
- buf_pool->stat.LRU_bytes -= bpage->size.physical();
+ buf_pool->stat.LRU_bytes -= bpage->physical_size();
buf_unzip_LRU_remove_block_if_needed(bpage);
@@ -1500,7 +1500,7 @@ func_exit:
? BUF_BLOCK_ZIP_DIRTY
: BUF_BLOCK_ZIP_PAGE;
- ut_ad(b->size.is_compressed());
+ ut_ad(b->zip_size());
/* The fields in_page_hash and in_LRU_list of
the to-be-freed block descriptor should have
@@ -1579,10 +1579,6 @@ func_exit:
page_zip_set_size(&bpage->zip, 0);
- bpage->size.copy_from(page_size_t(bpage->size.logical(),
- bpage->size.logical(),
- false));
-
mutex_exit(block_mutex);
/* Prevent buf_page_get_gen() from
@@ -1666,19 +1662,14 @@ buf_LRU_block_free_non_file_page(
buf_page_mutex_exit(block);
buf_pool_mutex_exit_forbid(buf_pool);
- ut_ad(block->page.size.is_compressed());
+ ut_ad(block->zip_size());
- buf_buddy_free(buf_pool, data, block->page.size.physical());
+ buf_buddy_free(buf_pool, data, block->zip_size());
buf_pool_mutex_exit_allow(buf_pool);
buf_page_mutex_enter(block);
page_zip_set_size(&block->page.zip, 0);
-
- block->page.size.copy_from(
- page_size_t(block->page.size.logical(),
- block->page.size.logical(),
- false));
}
if (buf_pool->curr_size < buf_pool->old_size
@@ -1749,7 +1740,7 @@ buf_LRU_block_remove_hashed(
const page_t* page = ((buf_block_t*) bpage)->frame;
ut_a(!zip || bpage->oldest_modification == 0);
- ut_ad(bpage->size.is_compressed());
+ ut_ad(bpage->zip_size());
switch (fil_page_get_type(page)) {
case FIL_PAGE_TYPE_ALLOCATED:
@@ -1764,7 +1755,7 @@ buf_LRU_block_remove_hashed(
to the compressed page, which will
be preserved. */
memcpy(bpage->zip.data, page,
- bpage->size.physical());
+ bpage->zip_size());
}
break;
case FIL_PAGE_TYPE_ZBLOB:
@@ -1781,14 +1772,13 @@ buf_LRU_block_remove_hashed(
default:
ib::error() << "The compressed page to be"
" evicted seems corrupt:";
- ut_print_buf(stderr, page,
- bpage->size.logical());
+ ut_print_buf(stderr, page, srv_page_size);
ib::error() << "Possibly older version of"
" the page:";
ut_print_buf(stderr, bpage->zip.data,
- bpage->size.physical());
+ bpage->zip_size());
putc('\n', stderr);
ut_error;
}
@@ -1798,10 +1788,7 @@ buf_LRU_block_remove_hashed(
/* fall through */
case BUF_BLOCK_ZIP_PAGE:
ut_a(bpage->oldest_modification == 0);
- if (bpage->size.is_compressed()) {
- MEM_CHECK_ADDRESSABLE(bpage->zip.data,
- bpage->size.physical());
- }
+ MEM_CHECK_ADDRESSABLE(bpage->zip.data, bpage->zip_size());
break;
case BUF_BLOCK_POOL_WATCH:
case BUF_BLOCK_ZIP_DIRTY:
@@ -1832,7 +1819,7 @@ buf_LRU_block_remove_hashed(
ut_ad(!bpage->in_flush_list);
ut_ad(!bpage->in_LRU_list);
ut_a(bpage->zip.data);
- ut_a(bpage->size.is_compressed());
+ ut_a(bpage->zip.ssize);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
UT_LIST_REMOVE(buf_pool->zip_clean, bpage);
@@ -1842,8 +1829,7 @@ buf_LRU_block_remove_hashed(
rw_lock_x_unlock(hash_lock);
buf_pool_mutex_exit_forbid(buf_pool);
- buf_buddy_free(buf_pool, bpage->zip.data,
- bpage->size.physical());
+ buf_buddy_free(buf_pool, bpage->zip.data, bpage->zip_size());
buf_pool_mutex_exit_allow(buf_pool);
buf_page_free_descriptor(bpage);
@@ -1889,16 +1875,11 @@ buf_LRU_block_remove_hashed(
ut_ad(!bpage->in_LRU_list);
buf_pool_mutex_exit_forbid(buf_pool);
- buf_buddy_free(buf_pool, data, bpage->size.physical());
+ buf_buddy_free(buf_pool, data, bpage->zip_size());
buf_pool_mutex_exit_allow(buf_pool);
page_zip_set_size(&bpage->zip, 0);
-
- bpage->size.copy_from(
- page_size_t(bpage->size.logical(),
- bpage->size.logical(),
- false));
}
return(true);
@@ -1957,7 +1938,7 @@ void buf_LRU_free_one_page(buf_page_t* bpage, page_id_t old_page_id)
rw_lock_x_lock(hash_lock);
- while (buf_block_get_fix(bpage) > 0) {
+ while (bpage->buf_fix_count > 0) {
/* Wait for other threads to release the fix count
before releasing the bpage from LRU list. */
}
@@ -2237,7 +2218,7 @@ buf_LRU_print_instance(
if (bpage->buf_fix_count) {
fprintf(stderr, "buffix count %u ",
- bpage->buf_fix_count);
+ uint32_t(bpage->buf_fix_count));
}
if (buf_page_get_io_fix(bpage)) {
@@ -2262,7 +2243,7 @@ buf_LRU_print_instance(
fprintf(stderr, "\ntype %u size " ULINTPF
" index id " IB_ID_FMT "\n",
fil_page_get_type(frame),
- bpage->size.physical(),
+ bpage->zip_size(),
btr_page_get_index_id(frame));
break;
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc
index 56817b59c36..1ea3070cbda 100644
--- a/storage/innobase/buf/buf0rea.cc
+++ b/storage/innobase/buf/buf0rea.cc
@@ -96,15 +96,14 @@ buffer buf_pool if it is not already there, in which case does nothing.
Sets the io_fix flag and sets an exclusive lock on the buffer frame. The
flag is cleared and the x-lock released by an i/o-handler thread.
-@param[out] err DB_SUCCESS, DB_TABLESPACE_DELETED or
- DB_TABLESPACE_TRUNCATED if we are trying
- to read from a non-existent tablespace, a
- tablespace which is just now being dropped,
- or a tablespace which is truncated
+@param[out] err DB_SUCCESS or DB_TABLESPACE_DELETED
+ if we are trying
+ to read from a non-existent tablespace
@param[in] sync true if synchronous aio is desired
@param[in] type IO type, SIMULATED, IGNORE_MISSING
@param[in] mode BUF_READ_IBUF_PAGES_ONLY, ...,
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] unzip true=request uncompressed page
@param[in] ignore_missing_space true=ignore missing space when reading
@return 1 if a read request was queued, 0 if the page already resided
@@ -119,7 +118,7 @@ buf_read_page_low(
ulint type,
ulint mode,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
bool unzip,
bool ignore_missing_space = false)
{
@@ -135,7 +134,7 @@ buf_read_page_low(
return(0);
}
- if (ibuf_bitmap_page(page_id, page_size) || trx_sys_hdr_page(page_id)) {
+ if (ibuf_bitmap_page(page_id, zip_size) || trx_sys_hdr_page(page_id)) {
/* Trx sys header is so low in the latching order that we play
safe and do not leave the i/o-completion to an asynchronous
@@ -150,7 +149,7 @@ buf_read_page_low(
or is being dropped; if we succeed in initing the page in the buffer
pool for read, then DISCARD cannot proceed until the read has
completed */
- bpage = buf_page_init_for_read(err, mode, page_id, page_size, unzip);
+ bpage = buf_page_init_for_read(err, mode, page_id, zip_size, unzip);
if (bpage == NULL) {
@@ -158,7 +157,7 @@ buf_read_page_low(
}
DBUG_LOG("ib_buf",
- "read page " << page_id << " size=" << page_size.physical()
+ "read page " << page_id << " zip_size=" << zip_size
<< " unzip=" << unzip << ',' << (sync ? "sync" : "async"));
ut_ad(buf_page_in_file(bpage));
@@ -169,7 +168,7 @@ buf_read_page_low(
void* dst;
- if (page_size.is_compressed()) {
+ if (zip_size) {
dst = bpage->zip.data;
} else {
ut_a(buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE);
@@ -180,7 +179,8 @@ buf_read_page_low(
IORequest request(type | IORequest::READ);
*err = fil_io(
- request, sync, page_id, page_size, 0, page_size.physical(),
+ request, sync, page_id, zip_size, 0,
+ zip_size ? zip_size : srv_page_size,
dst, bpage, ignore_missing_space);
if (sync) {
@@ -188,21 +188,9 @@ buf_read_page_low(
}
if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
- if (*err == DB_TABLESPACE_TRUNCATED) {
- /* Remove the page which is outside the
- truncated tablespace bounds when recovering
- from a crash happened during a truncation */
- buf_read_page_handle_error(bpage);
- if (recv_recovery_is_on()) {
- mutex_enter(&recv_sys->mutex);
- ut_ad(recv_sys->n_addrs > 0);
- recv_sys->n_addrs--;
- mutex_exit(&recv_sys->mutex);
- }
- return(0);
- } else if (IORequest::ignore_missing(type)
- || *err == DB_TABLESPACE_DELETED
- || *err == DB_IO_ERROR) {
+ if (IORequest::ignore_missing(type)
+ || *err == DB_TABLESPACE_DELETED
+ || *err == DB_IO_ERROR) {
buf_read_page_handle_error(bpage);
return(0);
}
@@ -234,16 +222,13 @@ performed by ibuf routines, a situation which could result in a deadlock if
the OS does not support asynchronous i/o.
@param[in] page_id page id of a page which the current thread
wants to access
-@param[in] page_size page size
-@param[in] inside_ibuf TRUE if we are inside ibuf routine
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in] ibuf whether we are inside ibuf routine
@return number of page read requests issued; NOTE that if we read ibuf
pages, it may happen that the page at the given page number does not
get read even if we return a positive value! */
ulint
-buf_read_ahead_random(
- const page_id_t page_id,
- const page_size_t& page_size,
- ibool inside_ibuf)
+buf_read_ahead_random(const page_id_t page_id, ulint zip_size, bool ibuf)
{
buf_pool_t* buf_pool = buf_pool_get(page_id);
ulint recent_blocks = 0;
@@ -265,7 +250,7 @@ buf_read_ahead_random(
return(0);
}
- if (ibuf_bitmap_page(page_id, page_size) || trx_sys_hdr_page(page_id)) {
+ if (ibuf_bitmap_page(page_id, zip_size) || trx_sys_hdr_page(page_id)) {
/* If it is an ibuf bitmap page or trx sys hdr, we do
no read-ahead, as that could break the ibuf page access
@@ -325,12 +310,7 @@ buf_read_ahead_random(
read_ahead:
/* Read all the suitable blocks within the area */
- if (inside_ibuf) {
- ibuf_mode = BUF_READ_IBUF_PAGES_ONLY;
- } else {
- ibuf_mode = BUF_READ_ANY_PAGE;
- }
-
+ ibuf_mode = ibuf ? BUF_READ_IBUF_PAGES_ONLY : BUF_READ_ANY_PAGE;
count = 0;
for (i = low; i < high; i++) {
@@ -339,16 +319,15 @@ read_ahead:
const page_id_t cur_page_id(page_id.space(), i);
- if (!ibuf_bitmap_page(cur_page_id, page_size)) {
+ if (!ibuf_bitmap_page(cur_page_id, zip_size)) {
count += buf_read_page_low(
&err, false,
IORequest::DO_NOT_WAKE,
ibuf_mode,
- cur_page_id, page_size, false);
+ cur_page_id, zip_size, false);
switch (err) {
case DB_SUCCESS:
- case DB_TABLESPACE_TRUNCATED:
case DB_ERROR:
break;
case DB_TABLESPACE_DELETED:
@@ -390,16 +369,13 @@ buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@retval DB_SUCCESS if the page was read and is not corrupted,
@retval DB_PAGE_CORRUPTED if page based on checksum check is corrupted,
@retval DB_DECRYPTION_FAILED if page post encryption checksum matches but
after decryption normal page checksum does not match.
@retval DB_TABLESPACE_DELETED if tablespace .ibd file is missing */
-dberr_t
-buf_read_page(
- const page_id_t page_id,
- const page_size_t& page_size)
+dberr_t buf_read_page(const page_id_t page_id, ulint zip_size)
{
ulint count;
dberr_t err = DB_SUCCESS;
@@ -412,7 +388,7 @@ buf_read_page(
count = buf_read_page_low(
&err, true,
- 0, BUF_READ_ANY_PAGE, page_id, page_size, false);
+ 0, BUF_READ_ANY_PAGE, page_id, zip_size, false);
srv_stats.buf_pool_reads.add(count);
@@ -432,13 +408,10 @@ buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] sync true if synchronous aio is desired */
void
-buf_read_page_background(
- const page_id_t page_id,
- const page_size_t& page_size,
- bool sync)
+buf_read_page_background(const page_id_t page_id, ulint zip_size, bool sync)
{
ulint count;
dberr_t err;
@@ -447,11 +420,10 @@ buf_read_page_background(
&err, sync,
IORequest::DO_NOT_WAKE | IORequest::IGNORE_MISSING,
BUF_READ_ANY_PAGE,
- page_id, page_size, false);
+ page_id, zip_size, false);
switch (err) {
case DB_SUCCESS:
- case DB_TABLESPACE_TRUNCATED:
case DB_ERROR:
break;
case DB_TABLESPACE_DELETED:
@@ -503,14 +475,11 @@ NOTE 3: the calling thread must want access to the page given: this rule is
set to prevent unintended read-aheads performed by ibuf routines, a situation
which could result in a deadlock if the OS does not support asynchronous io.
@param[in] page_id page id; see NOTE 3 above
-@param[in] page_size page size
-@param[in] inside_ibuf TRUE if we are inside ibuf routine
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in] ibuf whether if we are inside ibuf routine
@return number of page read requests issued */
ulint
-buf_read_ahead_linear(
- const page_id_t page_id,
- const page_size_t& page_size,
- ibool inside_ibuf)
+buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
{
buf_pool_t* buf_pool = buf_pool_get(page_id);
buf_page_t* bpage;
@@ -549,7 +518,7 @@ buf_read_ahead_linear(
return(0);
}
- if (ibuf_bitmap_page(page_id, page_size) || trx_sys_hdr_page(page_id)) {
+ if (ibuf_bitmap_page(page_id, zip_size) || trx_sys_hdr_page(page_id)) {
/* If it is an ibuf bitmap page or trx sys hdr, we do
no read-ahead, as that could break the ibuf page access
@@ -707,9 +676,7 @@ buf_read_ahead_linear(
/* If we got this far, read-ahead can be sensible: do it */
- ulint ibuf_mode;
-
- ibuf_mode = inside_ibuf ? BUF_READ_IBUF_PAGES_ONLY : BUF_READ_ANY_PAGE;
+ ulint ibuf_mode = ibuf ? BUF_READ_IBUF_PAGES_ONLY : BUF_READ_ANY_PAGE;
/* Since Windows XP seems to schedule the i/o handler thread
very eagerly, and consequently it does not wait for the
@@ -723,15 +690,14 @@ buf_read_ahead_linear(
const page_id_t cur_page_id(page_id.space(), i);
- if (!ibuf_bitmap_page(cur_page_id, page_size)) {
+ if (!ibuf_bitmap_page(cur_page_id, zip_size)) {
count += buf_read_page_low(
&err, false,
IORequest::DO_NOT_WAKE,
- ibuf_mode, cur_page_id, page_size, false);
+ ibuf_mode, cur_page_id, zip_size, false);
switch (err) {
case DB_SUCCESS:
- case DB_TABLESPACE_TRUNCATED:
case DB_TABLESPACE_DELETED:
case DB_ERROR:
break;
@@ -840,11 +806,11 @@ next:
sync && (i + 1 == n_stored),
0,
BUF_READ_ANY_PAGE, page_id,
- page_size_t(space->flags), true);
+ space->zip_size(),
+ true, true /* ignore_missing_space */);
switch(err) {
case DB_SUCCESS:
- case DB_TABLESPACE_TRUNCATED:
case DB_ERROR:
break;
case DB_TABLESPACE_DELETED:
@@ -896,7 +862,7 @@ buf_read_recv_pages(
fil_space_open_if_needed(space);
- const page_size_t page_size(space->flags);
+ const ulint zip_size = space->zip_size();
for (ulint i = 0; i < n_stored; i++) {
buf_pool_t* buf_pool;
@@ -933,13 +899,13 @@ buf_read_recv_pages(
&err, true,
0,
BUF_READ_ANY_PAGE,
- cur_page_id, page_size, true);
+ cur_page_id, zip_size, true);
} else {
buf_read_page_low(
&err, false,
IORequest::DO_NOT_WAKE,
BUF_READ_ANY_PAGE,
- cur_page_id, page_size, true);
+ cur_page_id, zip_size, true);
}
if (err == DB_DECRYPTION_FAILED || err == DB_PAGE_CORRUPTED) {
diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc
index 3e23cd6f662..fe849d8ae29 100644
--- a/storage/innobase/data/data0data.cc
+++ b/storage/innobase/data/data0data.cc
@@ -58,7 +58,12 @@ void dtuple_t::trim(const dict_index_t& index)
for (; i > index.n_core_fields; i--) {
const dfield_t* dfield = dtuple_get_nth_field(this, i - 1);
const dict_col_t* col = dict_index_get_nth_col(&index, i - 1);
- ut_ad(col->is_instant());
+
+ if (col->is_dropped()) {
+ continue;
+ }
+
+ ut_ad(col->is_added());
ulint len = dfield_get_len(dfield);
if (len != col->def_val.len) {
break;
@@ -573,7 +578,6 @@ dtuple_convert_big_rec(
mem_heap_t* heap;
big_rec_t* vector;
dfield_t* dfield;
- dict_field_t* ifield;
ulint size;
ulint n_fields;
ulint local_prefix_len;
@@ -582,7 +586,14 @@ dtuple_convert_big_rec(
return(NULL);
}
- const ulint local_len = index->table->get_overflow_field_local_len();
+ if (!index->table->space) {
+ return NULL;
+ }
+
+ ulint local_len = index->table->get_overflow_field_local_len();
+ const auto zip_size = index->table->space->zip_size();
+
+ ut_ad(index->n_uniq > 0);
ut_a(dtuple_check_typed_no_assert(entry));
@@ -605,24 +616,42 @@ dtuple_convert_big_rec(
stored externally */
n_fields = 0;
+ ulint longest_i;
+
+ const bool mblob = entry->is_alter_metadata();
+ ut_ad(entry->n_fields >= index->first_user_field() + mblob);
+ ut_ad(entry->n_fields - mblob <= index->n_fields);
+
+ if (mblob) {
+ longest_i = index->first_user_field();
+ dfield = dtuple_get_nth_field(entry, longest_i);
+ local_len = BTR_EXTERN_FIELD_REF_SIZE;
+ ut_ad(!dfield_is_ext(dfield));
+ goto ext_write;
+ }
+
+ if (!dict_table_has_atomic_blobs(index->table)) {
+ /* up to MySQL 5.1: store a 768-byte prefix locally */
+ local_len = BTR_EXTERN_FIELD_REF_SIZE
+ + DICT_ANTELOPE_MAX_INDEX_COL_LEN;
+ } else {
+ /* new-format table: do not store any BLOB prefix locally */
+ local_len = BTR_EXTERN_FIELD_REF_SIZE;
+ }
while (page_zip_rec_needs_ext(rec_get_converted_size(index, entry,
*n_ext),
- dict_table_is_comp(index->table),
+ index->table->not_redundant(),
dict_index_get_n_fields(index),
- dict_table_page_size(index->table))) {
-
- ulint i;
- ulint longest = 0;
- ulint longest_i = ULINT_MAX;
- byte* data;
-
- for (i = dict_index_get_n_unique_in_tree(index);
- i < dtuple_get_n_fields(entry); i++) {
+ zip_size)) {
+ longest_i = 0;
+ for (ulint i = index->first_user_field(), longest = 0;
+ i + mblob < entry->n_fields; i++) {
ulint savings;
+ dfield = dtuple_get_nth_field(entry, i + mblob);
- dfield = dtuple_get_nth_field(entry, i);
- ifield = dict_index_get_nth_field(index, i);
+ const dict_field_t* ifield = dict_index_get_nth_field(
+ index, i);
/* Skip fixed-length, NULL, externally stored,
or short columns */
@@ -657,14 +686,14 @@ dtuple_convert_big_rec(
goto skip_field;
}
- longest_i = i;
+ longest_i = i + mblob;
longest = savings;
skip_field:
continue;
}
- if (!longest) {
+ if (!longest_i) {
/* Cannot shorten more */
mem_heap_free(heap);
@@ -677,9 +706,8 @@ skip_field:
We store the first bytes locally to the record. Then
we can calculate all ordering fields in all indexes
from locally stored data. */
-
dfield = dtuple_get_nth_field(entry, longest_i);
- ifield = dict_index_get_nth_field(index, longest_i);
+ext_write:
local_prefix_len = local_len - BTR_EXTERN_FIELD_REF_SIZE;
vector->append(
@@ -690,7 +718,8 @@ skip_field:
+ local_prefix_len));
/* Allocate the locally stored part of the column. */
- data = static_cast<byte*>(mem_heap_alloc(heap, local_len));
+ byte* data = static_cast<byte*>(
+ mem_heap_alloc(heap, local_len));
/* Copy the local prefix. */
memcpy(data, dfield_get_data(dfield), local_prefix_len);
diff --git a/storage/innobase/data/data0type.cc b/storage/innobase/data/data0type.cc
index 896d1240340..b1952bcc2a4 100644
--- a/storage/innobase/data/data0type.cc
+++ b/storage/innobase/data/data0type.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -24,7 +24,8 @@ Data types
Created 1/16/1996 Heikki Tuuri
*******************************************************/
-#include "data0type.h"
+#include "dict0mem.h"
+#include "my_sys.h"
/** The DB_TRX_ID,DB_ROLL_PTR values for "no history is available" */
const byte reset_trx_id[DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN] = {
@@ -60,10 +61,10 @@ dtype_get_at_most_n_mbchars(
length is being determined */
{
ut_a(len_is_stored(data_len));
- ut_ad(!mbmaxlen || !(prefix_len % mbmaxlen));
+ ut_ad(!mbmaxlen || !(prefix_len % mbmaxlen) || !(prefix_len % 4));
if (mbminlen != mbmaxlen) {
- ut_a(!(prefix_len % mbmaxlen));
+ ut_a(!(prefix_len % mbmaxlen) || !(prefix_len % 4));
return(innobase_get_at_most_n_mbchars(
dtype_get_charset_coll(prtype),
prefix_len, data_len, str));
@@ -79,67 +80,6 @@ dtype_get_at_most_n_mbchars(
}
/*********************************************************************//**
-Checks if a data main type is a string type. Also a BLOB is considered a
-string type.
-@return TRUE if string type */
-ibool
-dtype_is_string_type(
-/*=================*/
- ulint mtype) /*!< in: InnoDB main data type code: DATA_CHAR, ... */
-{
- if (mtype <= DATA_BLOB
- || mtype == DATA_MYSQL
- || mtype == DATA_VARMYSQL) {
-
- return(TRUE);
- }
-
- return(FALSE);
-}
-
-/*********************************************************************//**
-Checks if a type is a binary string type. Note that for tables created with
-< 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For
-those DATA_BLOB columns this function currently returns FALSE.
-@return TRUE if binary string type */
-ibool
-dtype_is_binary_string_type(
-/*========================*/
- ulint mtype, /*!< in: main data type */
- ulint prtype) /*!< in: precise type */
-{
- if ((mtype == DATA_FIXBINARY)
- || (mtype == DATA_BINARY)
- || (mtype == DATA_BLOB && (prtype & DATA_BINARY_TYPE))) {
-
- return(TRUE);
- }
-
- return(FALSE);
-}
-
-/*********************************************************************//**
-Checks if a type is a non-binary string type. That is, dtype_is_string_type is
-TRUE and dtype_is_binary_string_type is FALSE. Note that for tables created
-with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
-For those DATA_BLOB columns this function currently returns TRUE.
-@return TRUE if non-binary string type */
-ibool
-dtype_is_non_binary_string_type(
-/*============================*/
- ulint mtype, /*!< in: main data type */
- ulint prtype) /*!< in: precise type */
-{
- if (dtype_is_string_type(mtype) == TRUE
- && dtype_is_binary_string_type(mtype, prtype) == FALSE) {
-
- return(TRUE);
- }
-
- return(FALSE);
-}
-
-/*********************************************************************//**
Validates a data type structure.
@return TRUE if ok */
ibool
diff --git a/storage/innobase/dict/dict0boot.cc b/storage/innobase/dict/dict0boot.cc
index 8df93b97936..29db56599e2 100644
--- a/storage/innobase/dict/dict0boot.cc
+++ b/storage/innobase/dict/dict0boot.cc
@@ -47,7 +47,7 @@ dict_hdr_get(
dict_hdr_t* header;
block = buf_page_get(page_id_t(DICT_HDR_SPACE, DICT_HDR_PAGE_NO),
- univ_page_size, RW_X_LATCH, mtr);
+ 0, RW_X_LATCH, mtr);
header = DICT_HDR + buf_block_get_frame(block);
buf_block_dbg_add_level(block, SYNC_DICT_HEADER);
@@ -64,52 +64,14 @@ dict_hdr_get_new_id(
(not assigned if NULL) */
index_id_t* index_id, /*!< out: index id
(not assigned if NULL) */
- ulint* space_id, /*!< out: space id
+ ulint* space_id) /*!< out: space id
(not assigned if NULL) */
- const dict_table_t* table, /*!< in: table */
- bool disable_redo) /*!< in: if true and table
- object is NULL
- then disable-redo */
{
dict_hdr_t* dict_hdr;
ib_id_t id;
mtr_t mtr;
mtr_start(&mtr);
- if (table) {
- if (table->is_temporary()) {
- mtr.set_log_mode(MTR_LOG_NO_REDO);
- }
- } else if (disable_redo) {
- /* In non-read-only mode we need to ensure that space-id header
- page is written to disk else if page is removed from buffer
- cache and re-loaded it would assign temporary tablespace id
- to another tablespace.
- This is not a case with read-only mode as there is no new object
- that is created except temporary tablespace. */
- mtr.set_log_mode(srv_read_only_mode
- ? MTR_LOG_NONE : MTR_LOG_NO_REDO);
- }
-
- /* Server started and let's say space-id = x
- - table created with file-per-table
- - space-id = x + 1
- - crash
- Case 1: If it was redo logged then we know that it will be
- restored to x + 1
- Case 2: if not redo-logged
- Header will have the old space-id = x
- This is OK because on restart there is no object with
- space id = x + 1
- Case 3:
- space-id = x (on start)
- space-id = x+1 (temp-table allocation) - no redo logging
- space-id = x+2 (non-temp-table allocation), this get's
- redo logged.
- If there is a crash there will be only 2 entries
- x (original) and x+2 (new) and disk hdr will be updated
- to reflect x + 2 entry.
- We cannot allocate the same space id to different objects. */
dict_hdr = dict_hdr_get(&mtr);
if (table_id) {
@@ -148,9 +110,9 @@ dict_hdr_flush_row_id(void)
row_id_t id;
mtr_t mtr;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
- id = dict_sys->row_id;
+ id = dict_sys.row_id;
mtr_start(&mtr);
@@ -210,7 +172,7 @@ dict_hdr_create(
/*--------------------------*/
root_page_no = btr_create(DICT_CLUSTERED | DICT_UNIQUE,
fil_system.sys_space, DICT_TABLES_ID,
- dict_ind_redundant, NULL, mtr);
+ dict_ind_redundant, mtr);
if (root_page_no == FIL_NULL) {
return(FALSE);
@@ -221,7 +183,7 @@ dict_hdr_create(
/*--------------------------*/
root_page_no = btr_create(DICT_UNIQUE,
fil_system.sys_space, DICT_TABLE_IDS_ID,
- dict_ind_redundant, NULL, mtr);
+ dict_ind_redundant, mtr);
if (root_page_no == FIL_NULL) {
return(FALSE);
@@ -232,7 +194,7 @@ dict_hdr_create(
/*--------------------------*/
root_page_no = btr_create(DICT_CLUSTERED | DICT_UNIQUE,
fil_system.sys_space, DICT_COLUMNS_ID,
- dict_ind_redundant, NULL, mtr);
+ dict_ind_redundant, mtr);
if (root_page_no == FIL_NULL) {
return(FALSE);
@@ -243,7 +205,7 @@ dict_hdr_create(
/*--------------------------*/
root_page_no = btr_create(DICT_CLUSTERED | DICT_UNIQUE,
fil_system.sys_space, DICT_INDEXES_ID,
- dict_ind_redundant, NULL, mtr);
+ dict_ind_redundant, mtr);
if (root_page_no == FIL_NULL) {
return(FALSE);
@@ -254,7 +216,7 @@ dict_hdr_create(
/*--------------------------*/
root_page_no = btr_create(DICT_CLUSTERED | DICT_UNIQUE,
fil_system.sys_space, DICT_FIELDS_ID,
- dict_ind_redundant, NULL, mtr);
+ dict_ind_redundant, mtr);
if (root_page_no == FIL_NULL) {
return(FALSE);
@@ -302,11 +264,11 @@ dict_boot(void)
mtr_start(&mtr);
/* Create the hash tables etc. */
- dict_init();
+ dict_sys.create();
heap = mem_heap_create(450);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* Get the dictionary header */
dict_hdr = dict_hdr_get(&mtr);
@@ -321,7 +283,7 @@ dict_boot(void)
..._MARGIN, it will immediately be updated to the disk-based
header. */
- dict_sys->row_id = DICT_HDR_ROW_ID_WRITE_MARGIN
+ dict_sys.row_id = DICT_HDR_ROW_ID_WRITE_MARGIN
+ ut_uint64_align_up(mach_read_from_8(dict_hdr + DICT_HDR_ROW_ID),
DICT_HDR_ROW_ID_WRITE_MARGIN);
@@ -350,7 +312,7 @@ dict_boot(void)
dict_table_add_system_columns(table, heap);
table->add_to_cache();
- dict_sys->sys_tables = table;
+ dict_sys.sys_tables = table;
mem_heap_empty(heap);
index = dict_mem_index_create(table, "CLUST_IND",
@@ -391,7 +353,7 @@ dict_boot(void)
dict_table_add_system_columns(table, heap);
table->add_to_cache();
- dict_sys->sys_columns = table;
+ dict_sys.sys_columns = table;
mem_heap_empty(heap);
index = dict_mem_index_create(table, "CLUST_IND",
@@ -434,7 +396,7 @@ dict_boot(void)
dict_table_get_nth_col(table, DICT_COL__SYS_INDEXES__MERGE_THRESHOLD)
->def_val.len = UNIV_SQL_NULL;
table->add_to_cache();
- dict_sys->sys_indexes = table;
+ dict_sys.sys_indexes = table;
mem_heap_empty(heap);
index = dict_mem_index_create(table, "CLUST_IND",
@@ -463,7 +425,7 @@ dict_boot(void)
dict_table_add_system_columns(table, heap);
table->add_to_cache();
- dict_sys->sys_fields = table;
+ dict_sys.sys_fields = table;
mem_heap_free(heap);
index = dict_mem_index_create(table, "CLUST_IND",
@@ -511,14 +473,14 @@ dict_boot(void)
if (err == DB_SUCCESS) {
/* Load definitions of other indexes on system tables */
- dict_load_sys_table(dict_sys->sys_tables);
- dict_load_sys_table(dict_sys->sys_columns);
- dict_load_sys_table(dict_sys->sys_indexes);
- dict_load_sys_table(dict_sys->sys_fields);
+ dict_load_sys_table(dict_sys.sys_tables);
+ dict_load_sys_table(dict_sys.sys_columns);
+ dict_load_sys_table(dict_sys.sys_indexes);
+ dict_load_sys_table(dict_sys.sys_fields);
}
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return(err);
}
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc
index f0754295aef..fbcacf9d6ff 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -58,7 +58,6 @@ dict_create_sys_tables_tuple(
which the memory for the built
tuple is allocated */
{
- dict_table_t* sys_tables;
dtuple_t* entry;
dfield_t* dfield;
byte* ptr;
@@ -69,11 +68,9 @@ dict_create_sys_tables_tuple(
ut_ad(heap);
ut_ad(table->n_cols >= DATA_N_SYS_COLS);
- sys_tables = dict_sys->sys_tables;
-
entry = dtuple_create(heap, 8 + DATA_N_SYS_COLS);
- dict_table_copy_types(entry, sys_tables);
+ dict_table_copy_types(entry, dict_sys.sys_tables);
/* 0: NAME -----------------------------*/
dfield = dtuple_get_nth_field(
@@ -171,7 +168,6 @@ dict_create_sys_columns_tuple(
which the memory for the built
tuple is allocated */
{
- dict_table_t* sys_columns;
dtuple_t* entry;
const dict_col_t* column;
dfield_t* dfield;
@@ -195,11 +191,9 @@ dict_create_sys_columns_tuple(
ut_ad(!column->is_virtual());
}
- sys_columns = dict_sys->sys_columns;
-
entry = dtuple_create(heap, 7 + DATA_N_SYS_COLS);
- dict_table_copy_types(entry, sys_columns);
+ dict_table_copy_types(entry, dict_sys.sys_columns);
/* 0: TABLE_ID -----------------------*/
dfield = dtuple_get_nth_field(entry, DICT_COL__SYS_COLUMNS__TABLE_ID);
@@ -290,7 +284,6 @@ dict_create_sys_virtual_tuple(
ulint b_col_n,
mem_heap_t* heap)
{
- dict_table_t* sys_virtual;
dtuple_t* entry;
const dict_col_t* base_column;
dfield_t* dfield;
@@ -303,12 +296,10 @@ dict_create_sys_virtual_tuple(
dict_v_col_t* v_col = dict_table_get_nth_v_col(table, v_col_n);
base_column = v_col->base_col[b_col_n];
- sys_virtual = dict_sys->sys_virtual;
-
entry = dtuple_create(heap, DICT_NUM_COLS__SYS_VIRTUAL
+ DATA_N_SYS_COLS);
- dict_table_copy_types(entry, sys_virtual);
+ dict_table_copy_types(entry, dict_sys.sys_virtual);
/* 0: TABLE_ID -----------------------*/
dfield = dtuple_get_nth_field(entry, DICT_COL__SYS_VIRTUAL__TABLE_ID);
@@ -352,12 +343,14 @@ dict_build_table_def_step(
que_thr_t* thr, /*!< in: query thread */
tab_node_t* node) /*!< in: table create node */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
dict_table_t* table = node->table;
+ trx_t* trx = thr_get_trx(thr);
ut_ad(!table->is_temporary());
ut_ad(!table->space);
ut_ad(table->space_id == ULINT_UNDEFINED);
- dict_table_assign_new_id(table, thr_get_trx(thr));
+ dict_hdr_get_new_id(&table->id, NULL, NULL);
+ trx->table_id = table->id;
/* Always set this bit for all new created tables */
DICT_TF2_FLAG_SET(table, DICT_TF2_FTS_AUX_HEX_NAME);
@@ -370,8 +363,6 @@ dict_build_table_def_step(
ut_ad(DICT_TF_GET_ZIP_SSIZE(table->flags) == 0
|| dict_table_has_atomic_blobs(table));
- trx_t* trx = thr_get_trx(thr);
- ut_ad(trx->table_id);
mtr_t mtr;
trx_undo_t* undo = trx->rsegs.m_redo.undo;
if (undo && !undo->table_id
@@ -399,7 +390,7 @@ dict_build_table_def_step(
}
/* Get a new tablespace ID */
ulint space_id;
- dict_hdr_get_new_id(NULL, NULL, &space_id, table, false);
+ dict_hdr_get_new_id(NULL, NULL, &space_id);
DBUG_EXECUTE_IF(
"ib_create_table_fail_out_of_space_ids",
@@ -486,24 +477,21 @@ dict_create_sys_indexes_tuple(
which the memory for the built
tuple is allocated */
{
- dict_table_t* sys_indexes;
dtuple_t* entry;
dfield_t* dfield;
byte* ptr;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_ad(index);
ut_ad(index->table->space || index->table->file_unreadable);
ut_ad(!index->table->space
|| index->table->space->id == index->table->space_id);
ut_ad(heap);
- sys_indexes = dict_sys->sys_indexes;
-
entry = dtuple_create(
heap, DICT_NUM_COLS__SYS_INDEXES + DATA_N_SYS_COLS);
- dict_table_copy_types(entry, sys_indexes);
+ dict_table_copy_types(entry, dict_sys.sys_indexes);
/* 0: TABLE_ID -----------------------*/
dfield = dtuple_get_nth_field(
@@ -607,7 +595,6 @@ dict_create_sys_fields_tuple(
which the memory for the built
tuple is allocated */
{
- dict_table_t* sys_fields;
dtuple_t* entry;
dict_field_t* field;
dfield_t* dfield;
@@ -627,11 +614,9 @@ dict_create_sys_fields_tuple(
field = dict_index_get_nth_field(index, fld_no);
- sys_fields = dict_sys->sys_fields;
-
entry = dtuple_create(heap, 3 + DATA_N_SYS_COLS);
- dict_table_copy_types(entry, sys_fields);
+ dict_table_copy_types(entry, dict_sys.sys_fields);
/* 0: INDEX_ID -----------------------*/
dfield = dtuple_get_nth_field(entry, DICT_COL__SYS_FIELDS__INDEX_ID);
@@ -726,7 +711,7 @@ dict_build_index_def_step(
dtuple_t* row;
trx_t* trx;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
trx = thr_get_trx(thr);
@@ -747,7 +732,7 @@ dict_build_index_def_step(
ut_ad((UT_LIST_GET_LEN(table->indexes) > 0)
|| dict_index_is_clust(index));
- dict_hdr_get_new_id(NULL, &index->id, NULL, table, false);
+ dict_hdr_get_new_id(NULL, &index->id, NULL);
/* Inherit the space id from the table; we store all indexes of a
table in the same tablespace */
@@ -777,7 +762,7 @@ dict_build_index_def(
dict_index_t* index, /*!< in/out: index */
trx_t* trx) /*!< in/out: InnoDB transaction handle */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
if (trx->table_id == 0) {
/* Record only the first table id. */
@@ -787,7 +772,7 @@ dict_build_index_def(
ut_ad((UT_LIST_GET_LEN(table->indexes) > 0)
|| dict_index_is_clust(index));
- dict_hdr_get_new_id(NULL, &index->id, NULL, table, false);
+ dict_hdr_get_new_id(NULL, &index->id, NULL);
/* Note that the index was created by this transaction. */
index->trx_id = trx->id;
@@ -823,15 +808,12 @@ dict_create_index_tree_step(
mtr_t mtr;
btr_pcur_t pcur;
dict_index_t* index;
- dict_table_t* sys_indexes;
dtuple_t* search_tuple;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
index = node->index;
- sys_indexes = dict_sys->sys_indexes;
-
if (index->type == DICT_FTS) {
/* FTS index does not need an index tree */
return(DB_SUCCESS);
@@ -845,7 +827,7 @@ dict_create_index_tree_step(
search_tuple = dict_create_search_tuple(node->ind_row, node->heap);
- btr_pcur_open(UT_LIST_GET_FIRST(sys_indexes->indexes),
+ btr_pcur_open(UT_LIST_GET_FIRST(dict_sys.sys_indexes->indexes),
search_tuple, PAGE_CUR_L, BTR_MODIFY_LEAF,
&pcur, &mtr);
@@ -861,7 +843,7 @@ dict_create_index_tree_step(
node->page_no = btr_create(
index->type, index->table->space,
- index->id, index, NULL, &mtr);
+ index->id, index, &mtr);
if (node->page_no == FIL_NULL) {
err = DB_OUT_OF_FILE_SPACE;
@@ -898,7 +880,7 @@ dict_create_index_tree_in_mem(
{
mtr_t mtr;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_ad(!(index->type & DICT_FTS));
mtr_start(&mtr);
@@ -910,7 +892,7 @@ dict_create_index_tree_in_mem(
ut_ad(!(index->table->flags2 & DICT_TF2_DISCARDED));
index->page = btr_create(index->type, index->table->space,
- index->id, index, NULL, &mtr);
+ index->id, index, &mtr);
mtr_commit(&mtr);
index->trx_id = trx->id;
@@ -922,16 +904,14 @@ dict_create_index_tree_in_mem(
@param[in,out] rec SYS_INDEXES record
@param[in,out] pcur persistent cursor on rec
@param[in,out] trx dictionary transaction
-@param[in,out] mtr mini-transaction
-@return whether freeing the B-tree was attempted */
-bool dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
+@param[in,out] mtr mini-transaction */
+void dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
{
- const byte* ptr;
- ulint len;
- ulint root_page_no;
+ byte* ptr;
+ ulint len;
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_a(!dict_table_is_comp(dict_sys->sys_indexes));
+ ut_ad(mutex_own(&dict_sys.mutex));
+ ut_a(!dict_table_is_comp(dict_sys.sys_indexes));
ptr = rec_get_nth_field_old(rec, DICT_FLD__SYS_INDEXES__PAGE_NO, &len);
@@ -939,15 +919,15 @@ bool dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
btr_pcur_store_position(pcur, mtr);
- root_page_no = mtr_read_ulint(ptr, MLOG_4BYTES, mtr);
+ const uint32_t root_page_no = mach_read_from_4(ptr);
if (root_page_no == FIL_NULL) {
/* The tree has already been freed */
-
- return(false);
+ return;
}
- mlog_write_ulint(const_cast<byte*>(ptr), FIL_NULL, MLOG_4BYTES, mtr);
+ compile_time_assert(FIL_NULL == 0xffffffff);
+ mlog_memset(ptr, 4, 0xff, mtr);
ptr = rec_get_nth_field_old(
rec, DICT_FLD__SYS_INDEXES__SPACE, &len);
@@ -960,7 +940,7 @@ bool dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
&& trx_get_dict_operation(trx) == TRX_DICT_OP_TABLE) {
/* We are about to delete the entire .ibd file;
do not bother to free pages inside it. */
- return false;
+ return;
}
ptr = rec_get_nth_field_old(
@@ -968,109 +948,16 @@ bool dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
ut_ad(len == 8);
- bool found;
- const page_size_t page_size(fil_space_get_page_size(space_id,
- &found));
-
- if (!found) {
- /* It is a single table tablespace and the .ibd file is
- missing: do nothing */
-
- return(false);
- }
-
- /* If tablespace is scheduled for truncate, do not try to drop
- the indexes in that tablespace. There is a truncate fixup action
- which will take care of it. */
- if (srv_is_tablespace_truncated(space_id)) {
- return(false);
- }
-
- btr_free_if_exists(page_id_t(space_id, root_page_no), page_size,
- mach_read_from_8(ptr), mtr);
-
- return(true);
-}
-
-/*******************************************************************//**
-Recreate the index tree associated with a row in SYS_INDEXES table.
-@return new root page number, or FIL_NULL on failure */
-ulint
-dict_recreate_index_tree(
-/*=====================*/
- const dict_table_t*
- table, /*!< in/out: the table the index belongs to */
- btr_pcur_t* pcur, /*!< in/out: persistent cursor pointing to
- record in the clustered index of
- SYS_INDEXES table. The cursor may be
- repositioned in this call. */
- mtr_t* mtr) /*!< in/out: mtr having the latch
- on the record page. */
-{
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_a(!dict_table_is_comp(dict_sys->sys_indexes));
- ut_ad(!table->space || table->space->id == table->space_id);
-
- ulint len;
- const rec_t* rec = btr_pcur_get_rec(pcur);
-
- const byte* ptr = rec_get_nth_field_old(
- rec, DICT_FLD__SYS_INDEXES__PAGE_NO, &len);
-
- ut_ad(len == 4);
-
- ut_ad(table->space_id == mach_read_from_4(
- rec_get_nth_field_old(rec, DICT_FLD__SYS_INDEXES__SPACE,
- &len)));
- ut_ad(len == 4);
-
- if (!table->space) {
- /* It is a single table tablespae and the .ibd file is
- missing: do nothing. */
-
- ib::warn()
- << "Trying to TRUNCATE a missing .ibd file of table "
- << table->name << "!";
-
- return(FIL_NULL);
- }
-
- ptr = rec_get_nth_field_old(rec, DICT_FLD__SYS_INDEXES__TYPE, &len);
- ut_ad(len == 4);
- ulint type = mach_read_from_4(ptr);
-
- ptr = rec_get_nth_field_old(rec, DICT_FLD__SYS_INDEXES__ID, &len);
- ut_ad(len == 8);
- index_id_t index_id = mach_read_from_8(ptr);
-
- /* We will need to commit the mini-transaction in order to avoid
- deadlocks in the btr_create() call, because otherwise we would
- be freeing and allocating pages in the same mini-transaction. */
- btr_pcur_store_position(pcur, mtr);
- mtr_commit(mtr);
-
- mtr_start(mtr);
- mtr->set_named_space(table->space);
- btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr);
-
- /* Find the index corresponding to this SYS_INDEXES record. */
- for (dict_index_t* index = UT_LIST_GET_FIRST(table->indexes);
- index != NULL;
- index = UT_LIST_GET_NEXT(indexes, index)) {
- if (index->id == index_id) {
- ulint root_page_no = (index->type & DICT_FTS)
- ? FIL_NULL
- : btr_create(type, table->space,
- index_id, index, NULL, mtr);
- index->page = unsigned(root_page_no);
- return root_page_no;
+ if (fil_space_t* s = fil_space_acquire_silent(space_id)) {
+ /* Ensure that the tablespace file exists
+ in order to avoid a crash in buf_page_get_gen(). */
+ if (s->size || fil_space_get_size(space_id)) {
+ btr_free_if_exists(page_id_t(space_id, root_page_no),
+ s->zip_size(),
+ mach_read_from_8(ptr), mtr);
}
+ s->release();
}
-
- ib::error() << "Failed to create index with index id " << index_id
- << " of table " << table->name;
-
- return(FIL_NULL);
}
/*********************************************************************//**
@@ -1099,15 +986,15 @@ tab_create_graph_create(
node->mode = mode;
node->key_id = key_id;
- node->tab_def = ins_node_create(INS_DIRECT, dict_sys->sys_tables,
+ node->tab_def = ins_node_create(INS_DIRECT, dict_sys.sys_tables,
heap);
node->tab_def->common.parent = node;
- node->col_def = ins_node_create(INS_DIRECT, dict_sys->sys_columns,
+ node->col_def = ins_node_create(INS_DIRECT, dict_sys.sys_columns,
heap);
node->col_def->common.parent = node;
- node->v_col_def = ins_node_create(INS_DIRECT, dict_sys->sys_virtual,
+ node->v_col_def = ins_node_create(INS_DIRECT, dict_sys.sys_virtual,
heap);
node->v_col_def->common.parent = node;
@@ -1146,11 +1033,11 @@ ind_create_graph_create(
node->heap = mem_heap_create(256);
node->ind_def = ins_node_create(INS_DIRECT,
- dict_sys->sys_indexes, heap);
+ dict_sys.sys_indexes, heap);
node->ind_def->common.parent = node;
node->field_def = ins_node_create(INS_DIRECT,
- dict_sys->sys_fields, heap);
+ dict_sys.sys_fields, heap);
node->field_def->common.parent = node;
return(node);
@@ -1169,7 +1056,7 @@ dict_create_table_step(
trx_t* trx;
ut_ad(thr);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
trx = thr_get_trx(thr);
@@ -1250,7 +1137,8 @@ dict_create_table_step(
ut_ad(node->col_no == v_col->v_pos);
dict_build_v_col_def_step(node);
- if (node->base_col_no < v_col->num_base - 1) {
+ if (node->base_col_no
+ < unsigned{v_col->num_base} - 1) {
/* move on to next base column */
node->base_col_no++;
} else {
@@ -1311,7 +1199,7 @@ dict_create_index_step(
trx_t* trx;
ut_ad(thr);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
trx = thr_get_trx(thr);
@@ -1472,7 +1360,7 @@ dict_check_if_system_table_exists(
ut_a(srv_get_active_thread_type() == SRV_NONE);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
sys_table = dict_table_get_low(tablename);
@@ -1490,7 +1378,7 @@ dict_check_if_system_table_exists(
dict_table_prevent_eviction(sys_table);
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return(error);
}
@@ -1658,9 +1546,9 @@ dict_create_or_check_sys_virtual()
"SYS_VIRTUAL", DICT_NUM_FIELDS__SYS_VIRTUAL + 1, 1);
if (err == DB_SUCCESS) {
- mutex_enter(&dict_sys->mutex);
- dict_sys->sys_virtual = dict_table_get_low("SYS_VIRTUAL");
- mutex_exit(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
+ dict_sys.sys_virtual = dict_table_get_low("SYS_VIRTUAL");
+ mutex_exit(&dict_sys.mutex);
return(DB_SUCCESS);
}
@@ -1733,9 +1621,9 @@ dict_create_or_check_sys_virtual()
dberr_t sys_virtual_err = dict_check_if_system_table_exists(
"SYS_VIRTUAL", DICT_NUM_FIELDS__SYS_VIRTUAL + 1, 1);
ut_a(sys_virtual_err == DB_SUCCESS);
- mutex_enter(&dict_sys->mutex);
- dict_sys->sys_virtual = dict_table_get_low("SYS_VIRTUAL");
- mutex_exit(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
+ dict_sys.sys_virtual = dict_table_get_low("SYS_VIRTUAL");
+ mutex_exit(&dict_sys.mutex);
return(err);
}
@@ -2132,7 +2020,7 @@ dict_create_add_foreigns_to_dictionary(
dict_foreign_t* foreign;
dberr_t error;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
if (NULL == dict_table_get_low("SYS_FOREIGN")) {
@@ -2142,6 +2030,8 @@ dict_create_add_foreigns_to_dictionary(
return(DB_ERROR);
}
+ error = DB_SUCCESS;
+
for (dict_foreign_set::const_iterator it = local_fk_set.begin();
it != local_fk_set.end();
++it) {
@@ -2153,12 +2043,11 @@ dict_create_add_foreigns_to_dictionary(
table->name.m_name, foreign, trx);
if (error != DB_SUCCESS) {
-
- return(error);
+ break;
}
}
- return(DB_SUCCESS);
+ return error;
}
/****************************************************************//**
@@ -2346,15 +2235,3 @@ dict_replace_tablespace_in_dictionary(
return(error);
}
-
-/** Assign a new table ID and put it into the table cache and the transaction.
-@param[in,out] table Table that needs an ID
-@param[in,out] trx Transaction */
-void
-dict_table_assign_new_id(
- dict_table_t* table,
- trx_t* trx)
-{
- dict_hdr_get_new_id(&table->id, NULL, NULL, table, false);
- trx->table_id = table->id;
-}
diff --git a/storage/innobase/dict/dict0defrag_bg.cc b/storage/innobase/dict/dict0defrag_bg.cc
index 7c6f5d75b5d..7e61e298ac6 100644
--- a/storage/innobase/dict/dict0defrag_bg.cc
+++ b/storage/innobase/dict/dict0defrag_bg.cc
@@ -151,7 +151,7 @@ dict_stats_defrag_pool_del(
{
ut_a((table && !index) || (!table && index));
ut_ad(!srv_read_only_mode);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
mutex_enter(&defrag_pool_mutex);
@@ -193,7 +193,7 @@ dict_stats_process_entry_from_defrag_pool()
dict_table_t* table;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* If the table is no longer cached, we've already lost the in
memory stats so there's nothing really to write to disk. */
@@ -208,11 +208,11 @@ dict_stats_process_entry_from_defrag_pool()
if (table) {
dict_table_close(table, TRUE, FALSE);
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return;
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
dict_stats_save_defrag_stats(index);
dict_table_close(table, FALSE, FALSE);
}
@@ -243,8 +243,7 @@ dict_stats_save_defrag_summary(
return DB_SUCCESS;
}
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
ret = dict_stats_save_index_stat(index, time(NULL), "n_pages_freed",
index->stat_defrag_n_pages_freed,
@@ -253,8 +252,7 @@ dict_stats_save_defrag_summary(
" last defragmentation run.",
NULL);
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
return (ret);
}
@@ -294,9 +292,7 @@ dict_stats_save_defrag_stats(
return DB_SUCCESS;
}
- rw_lock_x_lock(&dict_operation_lock);
-
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
ret = dict_stats_save_index_stat(index, now, "n_page_split",
index->stat_defrag_n_page_split,
NULL,
@@ -326,8 +322,6 @@ dict_stats_save_defrag_stats(
NULL);
end:
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
-
- return (ret);
+ dict_sys_unlock();
+ return ret;
}
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index eb0f10d55f4..178b7899af8 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -79,17 +79,7 @@ extern uint ibuf_debug;
#include <algorithm>
/** the dictionary system */
-dict_sys_t* dict_sys = NULL;
-
-/** @brief the data dictionary rw-latch protecting dict_sys
-
-table create, drop, etc. reserve this in X-mode; implicit or
-backround operations purge, rollback, foreign key checks reserve this
-in S-mode; we cannot trust that MySQL protects implicit or background
-operations a table drop since MySQL does not know of them; therefore
-we need this; NOTE: a transaction which reserves this must keep book
-on the mode in trx_t::dict_operation_lock_mode */
-rw_lock_t dict_operation_lock;
+dict_sys_t dict_sys;
/** Percentage of compression failures that are allowed in a single
round */
@@ -172,22 +162,6 @@ static
ibool
dict_lru_validate(void);
/*===================*/
-/**********************************************************************//**
-Check if table is in the dictionary table LRU list.
-@return TRUE if table found */
-static
-ibool
-dict_lru_find_table(
-/*================*/
- const dict_table_t* find_table); /*!< in: table to find */
-/**********************************************************************//**
-Check if a table exists in the dict table non-LRU list.
-@return TRUE if table found */
-static
-ibool
-dict_non_lru_find_table(
-/*====================*/
- const dict_table_t* find_table); /*!< in: table to find */
#endif /* UNIV_DEBUG */
/* Stream for storing detailed information about the latest foreign key
@@ -246,20 +220,24 @@ dict_get_db_name_len(
return ulint(s - name);
}
-/** Reserve the dictionary system mutex. */
-void
-dict_mutex_enter_for_mysql_func(const char *file, unsigned line)
+/** Open a persistent table.
+@param[in] table_id persistent table identifier
+@param[in] ignore_err errors to ignore
+@param[in] cached_only whether to skip loading
+@return persistent table
+@retval NULL if not found */
+static dict_table_t* dict_table_open_on_id_low(
+ table_id_t table_id,
+ dict_err_ignore_t ignore_err,
+ bool cached_only)
{
- mutex_enter_loc(&dict_sys->mutex, file, line);
-}
+ dict_table_t* table = dict_sys.get_table(table_id);
-/********************************************************************//**
-Releases the dictionary system mutex for MySQL. */
-void
-dict_mutex_exit_for_mysql(void)
-/*===========================*/
-{
- mutex_exit(&dict_sys->mutex);
+ if (!table && !cached_only) {
+ table = dict_load_table_on_id(table_id, ignore_err);
+ }
+
+ return table;
}
/**********************************************************************//**
@@ -272,7 +250,7 @@ dict_table_try_drop_aborted(
dict_table_t* table, /*!< in: table, or NULL if it
needs to be looked up again */
table_id_t table_id, /*!< in: table identifier */
- int32 ref_count) /*!< in: expected table->n_ref_count */
+ uint32_t ref_count) /*!< in: expected table->n_ref_count */
{
trx_t* trx;
@@ -305,7 +283,7 @@ dict_table_try_drop_aborted(
/**********************************************************************//**
When opening a table,
try to drop any indexes after an aborted index creation.
-Release the dict_sys->mutex. */
+Release the dict_sys.mutex. */
static
void
dict_table_try_drop_aborted_and_mutex_exit(
@@ -325,11 +303,11 @@ dict_table_try_drop_aborted_and_mutex_exit(
was aborted. */
table_id_t table_id = table->id;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
dict_table_try_drop_aborted(table, table_id, 1);
} else {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
}
@@ -345,10 +323,10 @@ dict_table_close(
index creation */
{
if (!dict_locked) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_a(table->get_ref_count() > 0);
const bool last_handle = table->release();
@@ -367,14 +345,7 @@ dict_table_close(
MONITOR_DEC(MONITOR_TABLE_REFERENCE);
ut_ad(dict_lru_validate());
-
-#ifdef UNIV_DEBUG
- if (table->can_be_evicted) {
- ut_ad(dict_lru_find_table(table));
- } else {
- ut_ad(dict_non_lru_find_table(table));
- }
-#endif /* UNIV_DEBUG */
+ ut_ad(dict_sys.find(table));
if (!dict_locked) {
table_id_t table_id = table->id;
@@ -382,7 +353,7 @@ dict_table_close(
&& table->drop_aborted
&& dict_table_get_first_index(table);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
/* dict_table_try_drop_aborted() can generate undo logs.
So it should be avoided after shutdown of background
@@ -395,9 +366,9 @@ dict_table_close(
/********************************************************************//**
Closes the only open handle to a table and drops a table while assuring
-that dict_sys->mutex is held the whole time. This assures that the table
+that dict_sys.mutex is held the whole time. This assures that the table
is not evicted after the close when the count of open handles goes to zero.
-Because dict_sys->mutex is held, we do not need to call
+Because dict_sys.mutex is held, we do not need to call
dict_table_prevent_eviction(). */
void
dict_table_close_and_drop(
@@ -407,8 +378,7 @@ dict_table_close_and_drop(
{
dberr_t err = DB_SUCCESS;
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
ut_ad(trx->dict_operation != TRX_DICT_OP_NONE);
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
@@ -595,25 +565,6 @@ dict_table_get_nth_v_col_mysql(
return(dict_table_get_nth_v_col(table, i));
}
-/********************************************************************//**
-Acquire the autoinc lock. */
-void
-dict_table_autoinc_lock(
-/*====================*/
- dict_table_t* table) /*!< in/out: table */
-{
- mysql_mutex_lock(&table->autoinc_mutex);
-}
-
-/** Acquire the zip_pad_mutex latch.
-@param[in,out] index the index whose zip_pad_mutex to acquire.*/
-static
-void
-dict_index_zip_pad_lock(
- dict_index_t* index)
-{
- mysql_mutex_lock(&index->zip_pad.mutex);
-}
/** Get all the FTS indexes on a table.
@param[in] table table
@@ -640,16 +591,6 @@ dict_table_get_all_fts_indexes(
return(ib_vector_size(indexes));
}
-/********************************************************************//**
-Release the autoinc lock. */
-void
-dict_table_autoinc_unlock(
-/*======================*/
- dict_table_t* table) /*!< in/out: table */
-{
- mysql_mutex_unlock(&table->autoinc_mutex);
-}
-
/** Looks for column n in an index.
@param[in] index index
@param[in] n column number
@@ -707,47 +648,29 @@ dict_index_get_nth_col_or_prefix_pos(
return(ULINT_UNDEFINED);
}
-/** Returns TRUE if the index contains a column or a prefix of that column.
-@param[in] index index
+/** Check if the index contains a column or a prefix of that column.
@param[in] n column number
@param[in] is_virtual whether it is a virtual col
-@return TRUE if contains the column or its prefix */
-bool
-dict_index_contains_col_or_prefix(
- const dict_index_t* index,
- ulint n,
- bool is_virtual)
+@return whether the index contains the column or its prefix */
+bool dict_index_t::contains_col_or_prefix(ulint n, bool is_virtual) const
{
- const dict_field_t* field;
- const dict_col_t* col;
- ulint pos;
- ulint n_fields;
+ ut_ad(magic_n == DICT_INDEX_MAGIC_N);
- ut_ad(index);
- ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
- if (dict_index_is_clust(index)) {
+ if (is_primary()) {
return(!is_virtual);
}
- if (is_virtual) {
- col = &dict_table_get_nth_v_col(index->table, n)->m_col;
- } else {
- col = dict_table_get_nth_col(index->table, n);
- }
-
- n_fields = dict_index_get_n_fields(index);
-
- for (pos = 0; pos < n_fields; pos++) {
- field = dict_index_get_nth_field(index, pos);
+ const dict_col_t* col = is_virtual
+ ? &dict_table_get_nth_v_col(table, n)->m_col
+ : dict_table_get_nth_col(table, n);
- if (col == field->col) {
-
- return(true);
+ for (ulint pos = 0; pos < n_fields; pos++) {
+ if (col == fields[pos].col) {
+ return true;
}
}
- return(false);
+ return false;
}
/********************************************************************//**
@@ -816,10 +739,10 @@ dict_table_open_on_id(
dict_table_t* table;
if (!dict_locked) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
table = dict_table_open_on_id_low(
table_id,
@@ -829,13 +752,7 @@ dict_table_open_on_id(
table_op == DICT_TABLE_OP_OPEN_ONLY_IF_CACHED);
if (table != NULL) {
-
- if (table->can_be_evicted) {
- dict_move_to_mru(table);
- }
-
- table->acquire();
-
+ dict_sys.acquire(table);
MONITOR_INC(MONITOR_TABLE_REFERENCE);
}
@@ -895,56 +812,46 @@ dict_table_col_in_clustered_key(
return(FALSE);
}
-/**********************************************************************//**
-Inits the data dictionary module. */
-void
-dict_init(void)
-/*===========*/
+/** Initialise the data dictionary cache. */
+void dict_sys_t::create()
{
- dict_sys = static_cast<dict_sys_t*>(ut_zalloc_nokey(sizeof(*dict_sys)));
+ ut_ad(this == &dict_sys);
+ ut_ad(!is_initialised());
+ m_initialised= true;
+ UT_LIST_INIT(table_LRU, &dict_table_t::table_LRU);
+ UT_LIST_INIT(table_non_LRU, &dict_table_t::table_LRU);
- UT_LIST_INIT(dict_sys->table_LRU, &dict_table_t::table_LRU);
- UT_LIST_INIT(dict_sys->table_non_LRU, &dict_table_t::table_LRU);
+ mutex_create(LATCH_ID_DICT_SYS, &mutex);
- mutex_create(LATCH_ID_DICT_SYS, &dict_sys->mutex);
+ const ulint hash_size = buf_pool_get_curr_size()
+ / (DICT_POOL_PER_TABLE_HASH * UNIV_WORD_SIZE);
- dict_sys->table_hash = hash_create(
- buf_pool_get_curr_size()
- / (DICT_POOL_PER_TABLE_HASH * UNIV_WORD_SIZE));
+ table_hash= hash_create(hash_size);
+ table_id_hash= hash_create(hash_size);
+ temp_id_hash= hash_create(hash_size);
- dict_sys->table_id_hash = hash_create(
- buf_pool_get_curr_size()
- / (DICT_POOL_PER_TABLE_HASH * UNIV_WORD_SIZE));
+ rw_lock_create(dict_operation_lock_key, &latch, SYNC_DICT_OPERATION);
- rw_lock_create(dict_operation_lock_key,
- &dict_operation_lock, SYNC_DICT_OPERATION);
+ if (!srv_read_only_mode)
+ {
+ dict_foreign_err_file= os_file_create_tmpfile();
+ ut_a(dict_foreign_err_file);
+ }
- if (!srv_read_only_mode) {
- dict_foreign_err_file = os_file_create_tmpfile();
- ut_a(dict_foreign_err_file);
- }
-
- mutex_create(LATCH_ID_DICT_FOREIGN_ERR, &dict_foreign_err_mutex);
+ mutex_create(LATCH_ID_DICT_FOREIGN_ERR, &dict_foreign_err_mutex);
}
-/**********************************************************************//**
-Move to the most recently used segment of the LRU list. */
-void
-dict_move_to_mru(
-/*=============*/
- dict_table_t* table) /*!< in: table to move to MRU */
+/** Acquire a reference to a cached table. */
+inline void dict_sys_t::acquire(dict_table_t* table)
{
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(dict_lru_validate());
- ut_ad(dict_lru_find_table(table));
-
- ut_a(table->can_be_evicted);
-
- UT_LIST_REMOVE(dict_sys->table_LRU, table);
-
- UT_LIST_ADD_FIRST(dict_sys->table_LRU, table);
-
- ut_ad(dict_lru_validate());
+ ut_ad(dict_sys.find(table));
+ if (table->can_be_evicted)
+ {
+ UT_LIST_REMOVE(dict_sys.table_LRU, table);
+ UT_LIST_ADD_FIRST(dict_sys.table_LRU, table);
+ }
+
+ table->acquire();
}
/**********************************************************************//**
@@ -970,11 +877,11 @@ dict_table_open_on_name(
DBUG_PRINT("dict_table_open_on_name", ("table: '%s'", table_name));
if (!dict_locked) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
ut_ad(table_name);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
table = dict_table_check_if_in_cache_low(table_name);
@@ -990,7 +897,7 @@ dict_table_open_on_name(
if (!(ignore_err & ~DICT_ERR_IGNORE_FK_NOKEY)
&& !table->is_readable()) {
/* Make life easy for drop table. */
- dict_table_prevent_eviction(table);
+ dict_sys.prevent_eviction(table);
if (table->corrupted) {
@@ -998,31 +905,22 @@ dict_table_open_on_name(
<< " is corrupted. Please "
"drop the table and recreate.";
if (!dict_locked) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
DBUG_RETURN(NULL);
}
- if (table->can_be_evicted) {
- dict_move_to_mru(table);
- }
-
- table->acquire();
+ dict_sys.acquire(table);
if (!dict_locked) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
DBUG_RETURN(table);
}
- if (table->can_be_evicted) {
- dict_move_to_mru(table);
- }
-
- table->acquire();
-
+ dict_sys.acquire(table);
MONITOR_INC(MONITOR_TABLE_REFERENCE);
}
@@ -1073,66 +971,64 @@ dict_table_add_system_columns(
}
/** Add the table definition to the data dictionary cache */
-void
-dict_table_t::add_to_cache()
+void dict_table_t::add_to_cache()
{
- ut_ad(dict_lru_validate());
- ut_ad(mutex_own(&dict_sys->mutex));
-
- mysql_mutex_init(0, &autoinc_mutex, NULL);
cached = TRUE;
- ulint fold = ut_fold_string(name.m_name);
- ulint id_fold = ut_fold_ull(id);
+ dict_sys.add(this);
+}
+
+/** Add a table definition to the data dictionary cache */
+inline void dict_sys_t::add(dict_table_t* table)
+{
+ ut_ad(!find(table));
+
+ ulint fold = ut_fold_string(table->name.m_name);
+
+ new (&table->autoinc_mutex) std::mutex();
/* Look for a table with the same name: error if such exists */
{
dict_table_t* table2;
- HASH_SEARCH(name_hash, dict_sys->table_hash, fold,
+ HASH_SEARCH(name_hash, table_hash, fold,
dict_table_t*, table2, ut_ad(table2->cached),
- !strcmp(table2->name.m_name, name.m_name));
+ !strcmp(table2->name.m_name, table->name.m_name));
ut_a(table2 == NULL);
#ifdef UNIV_DEBUG
/* Look for the same table pointer with a different name */
- HASH_SEARCH_ALL(name_hash, dict_sys->table_hash,
+ HASH_SEARCH_ALL(name_hash, table_hash,
dict_table_t*, table2, ut_ad(table2->cached),
- table2 == this);
+ table2 == table);
ut_ad(table2 == NULL);
#endif /* UNIV_DEBUG */
}
+ HASH_INSERT(dict_table_t, name_hash, table_hash, fold, table);
/* Look for a table with the same id: error if such exists */
+ hash_table_t* id_hash = table->is_temporary()
+ ? temp_id_hash : table_id_hash;
+ const ulint id_fold = ut_fold_ull(table->id);
{
dict_table_t* table2;
- HASH_SEARCH(id_hash, dict_sys->table_id_hash, id_fold,
+ HASH_SEARCH(id_hash, id_hash, id_fold,
dict_table_t*, table2, ut_ad(table2->cached),
- table2->id == id);
+ table2->id == table->id);
ut_a(table2 == NULL);
#ifdef UNIV_DEBUG
/* Look for the same table pointer with a different id */
- HASH_SEARCH_ALL(id_hash, dict_sys->table_id_hash,
+ HASH_SEARCH_ALL(id_hash, id_hash,
dict_table_t*, table2, ut_ad(table2->cached),
- table2 == this);
+ table2 == table);
ut_ad(table2 == NULL);
#endif /* UNIV_DEBUG */
- }
-
- /* Add table to hash table of tables */
- HASH_INSERT(dict_table_t, name_hash, dict_sys->table_hash, fold,
- this);
- /* Add table to hash table of tables based on table id */
- HASH_INSERT(dict_table_t, id_hash, dict_sys->table_id_hash, id_fold,
- this);
-
- if (can_be_evicted) {
- UT_LIST_ADD_FIRST(dict_sys->table_LRU, this);
- } else {
- UT_LIST_ADD_FIRST(dict_sys->table_non_LRU, this);
+ HASH_INSERT(dict_table_t, id_hash, id_hash, id_fold, table);
}
+ UT_LIST_ADD_FIRST(table->can_be_evicted ? table_LRU : table_non_LRU,
+ table);
ut_ad(dict_lru_validate());
}
@@ -1145,9 +1041,7 @@ dict_table_can_be_evicted(
/*======================*/
dict_table_t* table) /*!< in: table to test */
{
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
-
+ ut_d(dict_sys.assert_locked());
ut_a(table->can_be_evicted);
ut_a(table->foreign_set.empty());
ut_a(table->referenced_set.empty());
@@ -1221,7 +1115,7 @@ dict_index_t *dict_index_t::clone() const
(mem_heap_zalloc(heap, n_uniq * sizeof *stat_n_sample_sizes));
index->stat_n_non_null_key_vals= static_cast<ib_uint64_t*>
(mem_heap_zalloc(heap, n_uniq * sizeof *stat_n_non_null_key_vals));
- mysql_mutex_init(0, &index->zip_pad.mutex, NULL);
+ new (&index->zip_pad.mutex) std::mutex();
return index;
}
@@ -1233,7 +1127,7 @@ dict_index_t *dict_index_t::clone_if_needed()
return this;
dict_index_t *prev= UT_LIST_GET_PREV(indexes, this);
- mysql_mutex_lock(&table->autoinc_mutex);
+ table->autoinc_mutex.lock();
UT_LIST_REMOVE(table->indexes, this);
UT_LIST_ADD_LAST(table->freed_indexes, this);
dict_index_t *index= clone();
@@ -1242,7 +1136,7 @@ dict_index_t *dict_index_t::clone_if_needed()
UT_LIST_INSERT_AFTER(table->indexes, prev, index);
else
UT_LIST_ADD_FIRST(table->indexes, index);
- mysql_mutex_unlock(&table->autoinc_mutex);
+ table->autoinc_mutex.unlock();
return index;
}
#endif /* BTR_CUR_HASH_ADAPT */
@@ -1267,11 +1161,10 @@ dict_make_room_in_cache(
ut_a(pct_check > 0);
ut_a(pct_check <= 100);
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
ut_ad(dict_lru_validate());
- i = len = UT_LIST_GET_LEN(dict_sys->table_LRU);
+ i = len = UT_LIST_GET_LEN(dict_sys.table_LRU);
if (len < max_tables) {
return(0);
@@ -1285,7 +1178,7 @@ dict_make_room_in_cache(
/* Find a suitable candidate to evict from the cache. Don't scan the
entire LRU list. Only scan pct_check list entries. */
- for (table = UT_LIST_GET_LAST(dict_sys->table_LRU);
+ for (table = UT_LIST_GET_LAST(dict_sys.table_LRU);
table != NULL
&& i > check_up_to
&& (len - n_evicted) > max_tables;
@@ -1297,7 +1190,7 @@ dict_make_room_in_cache(
if (dict_table_can_be_evicted(table)) {
ut_ad(!table->fts);
- dict_table_remove_from_cache_low(table, TRUE);
+ dict_sys.remove(table, true);
++n_evicted;
}
@@ -1308,25 +1201,6 @@ dict_make_room_in_cache(
return(n_evicted);
}
-/**********************************************************************//**
-Move a table to the non-LRU list from the LRU list. */
-void
-dict_table_move_from_lru_to_non_lru(
-/*================================*/
- dict_table_t* table) /*!< in: table to move from LRU to non-LRU */
-{
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(dict_lru_find_table(table));
-
- ut_a(table->can_be_evicted);
-
- UT_LIST_REMOVE(dict_sys->table_LRU, table);
-
- UT_LIST_ADD_LAST(dict_sys->table_non_LRU, table);
-
- table->can_be_evicted = FALSE;
-}
-
/** Looks for an index with the given id given a table instance.
@param[in] table table instance
@param[in] id index id
@@ -1391,7 +1265,7 @@ dict_table_rename_in_cache(
char old_name[MAX_FULL_NAME_LEN + 1];
os_file_type_t ftype;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* store the old/current name to an automatic variable */
ut_a(strlen(table->name.m_name) < sizeof old_name);
@@ -1401,7 +1275,7 @@ dict_table_rename_in_cache(
/* Look for a table with the same name: error if such exists */
dict_table_t* table2;
- HASH_SEARCH(name_hash, dict_sys->table_hash, fold,
+ HASH_SEARCH(name_hash, dict_sys.table_hash, fold,
dict_table_t*, table2, ut_ad(table2->cached),
(ut_strcmp(table2->name.m_name, new_name) == 0));
DBUG_EXECUTE_IF("dict_table_rename_in_cache_failure",
@@ -1495,7 +1369,7 @@ dict_table_rename_in_cache(
}
/* Remove table from the hash tables of tables */
- HASH_DELETE(dict_table_t, name_hash, dict_sys->table_hash,
+ HASH_DELETE(dict_table_t, name_hash, dict_sys.table_hash,
ut_fold_string(old_name), table);
if (strlen(new_name) > strlen(table->name.m_name)) {
@@ -1510,7 +1384,7 @@ dict_table_rename_in_cache(
strcpy(table->name.m_name, new_name);
/* Add table to hash table of tables */
- HASH_INSERT(dict_table_t, name_hash, dict_sys->table_hash, fold,
+ HASH_INSERT(dict_table_t, name_hash, dict_sys.table_hash, fold,
table);
if (!rename_also_foreigns) {
@@ -1773,28 +1647,26 @@ dict_table_change_id_in_cache(
dict_table_t* table, /*!< in/out: table object already in cache */
table_id_t new_id) /*!< in: new id to set */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
+ ut_ad(!table->is_temporary());
/* Remove the table from the hash table of id's */
- HASH_DELETE(dict_table_t, id_hash, dict_sys->table_id_hash,
+ HASH_DELETE(dict_table_t, id_hash, dict_sys.table_id_hash,
ut_fold_ull(table->id), table);
table->id = new_id;
/* Add the table back to the hash table */
- HASH_INSERT(dict_table_t, id_hash, dict_sys->table_id_hash,
+ HASH_INSERT(dict_table_t, id_hash, dict_sys.table_id_hash,
ut_fold_ull(table->id), table);
}
-/**********************************************************************//**
-Removes a table object from the dictionary cache. */
-void
-dict_table_remove_from_cache_low(
-/*=============================*/
- dict_table_t* table, /*!< in, own: table */
- ibool lru_evict) /*!< in: TRUE if table being evicted
- to make room in the table LRU list */
+/** Evict a table definition from the InnoDB data dictionary cache.
+@param[in,out] table cached table definition to be evicted
+@param[in] lru whether this is part of least-recently-used eviction
+@param[in] keep whether to keep (not free) the object */
+void dict_sys_t::remove(dict_table_t* table, bool lru, bool keep)
{
dict_foreign_t* foreign;
dict_index_t* index;
@@ -1802,7 +1674,7 @@ dict_table_remove_from_cache_low(
ut_ad(dict_lru_validate());
ut_a(table->get_ref_count() == 0);
ut_a(table->n_rec_locks == 0);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(find(table));
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
/* Remove the foreign constraints from the cache */
@@ -1826,37 +1698,33 @@ dict_table_remove_from_cache_low(
index != NULL;
index = UT_LIST_GET_LAST(table->indexes)) {
- dict_index_remove_from_cache_low(table, index, lru_evict);
+ dict_index_remove_from_cache_low(table, index, lru);
}
/* Remove table from the hash tables of tables */
- HASH_DELETE(dict_table_t, name_hash, dict_sys->table_hash,
+ HASH_DELETE(dict_table_t, name_hash, table_hash,
ut_fold_string(table->name.m_name), table);
- HASH_DELETE(dict_table_t, id_hash, dict_sys->table_id_hash,
- ut_fold_ull(table->id), table);
+ hash_table_t* id_hash = table->is_temporary()
+ ? temp_id_hash : table_id_hash;
+ const ulint id_fold = ut_fold_ull(table->id);
+ HASH_DELETE(dict_table_t, id_hash, id_hash, id_fold, table);
/* Remove table from LRU or non-LRU list. */
if (table->can_be_evicted) {
- ut_ad(dict_lru_find_table(table));
- UT_LIST_REMOVE(dict_sys->table_LRU, table);
+ UT_LIST_REMOVE(table_LRU, table);
} else {
- ut_ad(dict_non_lru_find_table(table));
- UT_LIST_REMOVE(dict_sys->table_non_LRU, table);
+ UT_LIST_REMOVE(table_non_LRU, table);
}
- ut_ad(dict_lru_validate());
-
- if (lru_evict && table->drop_aborted) {
+ if (lru && table->drop_aborted) {
/* When evicting the table definition,
drop the orphan indexes from the data dictionary
and free the index pages. */
trx_t* trx = trx_create();
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
-
+ ut_d(dict_sys.assert_locked());
/* Mimic row_mysql_lock_data_dictionary(). */
trx->dict_operation_lock_mode = RW_X_LATCH;
@@ -1873,6 +1741,11 @@ dict_table_remove_from_cache_low(
UT_DELETE(table->vc_templ);
}
+ if (keep) {
+ table->autoinc_mutex.~mutex();
+ return;
+ }
+
#ifdef BTR_CUR_HASH_ADAPT
if (table->fts) {
fts_optimize_remove_table(table);
@@ -1880,33 +1753,23 @@ dict_table_remove_from_cache_low(
table->fts = NULL;
}
- mysql_mutex_lock(&table->autoinc_mutex);
+ table->autoinc_mutex.lock();
ulint freed = UT_LIST_GET_LEN(table->freed_indexes);
table->vc_templ = NULL;
table->id = 0;
- mysql_mutex_unlock(&table->autoinc_mutex);
+ table->autoinc_mutex.unlock();
if (UNIV_UNLIKELY(freed != 0)) {
return;
}
#endif /* BTR_CUR_HASH_ADAPT */
- mysql_mutex_destroy(&table->autoinc_mutex);
+ table->autoinc_mutex.~mutex();
dict_mem_table_free(table);
}
-/**********************************************************************//**
-Removes a table object from the dictionary cache. */
-void
-dict_table_remove_from_cache(
-/*=========================*/
- dict_table_t* table) /*!< in, own: table */
-{
- dict_table_remove_from_cache_low(table, FALSE);
-}
-
/****************************************************************//**
If the given column name is reserved for InnoDB system columns, return
TRUE.
@@ -1932,44 +1795,6 @@ dict_col_name_is_reserved(
return(FALSE);
}
-/** Clears the virtual column's index list before index is
-being freed.
-@param[in] index Index being freed */
-void dict_index_remove_from_v_col_list(dict_index_t* index)
-{
- /* Index is not completely formed */
- if (!index->cached) {
- return;
- }
- if (dict_index_has_virtual(index)) {
- const dict_col_t* col;
- const dict_v_col_t* vcol;
-
- for (ulint i = 0; i < dict_index_get_n_fields(index); i++) {
- col = dict_index_get_nth_col(index, i);
- if (col && col->is_virtual()) {
- vcol = reinterpret_cast<const dict_v_col_t*>(
- col);
- /* This could be NULL, when we do add
- virtual column, add index together. We do not
- need to track this virtual column's index */
- if (vcol->v_indexes == NULL) {
- continue;
- }
- dict_v_idx_list::iterator it;
- for (it = vcol->v_indexes->begin();
- it != vcol->v_indexes->end(); ++it) {
- dict_v_idx_t v_index = *it;
- if (v_index.index == index) {
- vcol->v_indexes->erase(it);
- break;
- }
- }
- }
- }
- }
-}
-
/** Adds an index to the dictionary cache, with possible indexing newly
added column.
@param[in,out] index index; NOTE! The index memory
@@ -1987,7 +1812,7 @@ dict_index_add_to_cache(
ulint n_ord;
ulint i;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_ad(index->n_def == index->n_fields);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(!dict_index_is_online_ddl(index));
@@ -2052,6 +1877,9 @@ dict_index_add_to_cache(
> field->col->max_prefix) {
/* Set the max_prefix value based on the
prefix_len. */
+ ut_ad(field->col->is_binary()
+ || field->prefix_len % field->col->mbmaxlen == 0
+ || field->prefix_len % 4 == 0);
field->col->max_prefix = field->prefix_len;
}
ut_ad(field->col->ord_part == 1);
@@ -2117,7 +1945,7 @@ dict_index_remove_from_cache_low(
ut_ad(table && index);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_ad(table->id);
#ifdef BTR_CUR_HASH_ADAPT
ut_ad(!index->freed());
@@ -2158,10 +1986,10 @@ dict_index_remove_from_cache_low(
zero. See also: dict_table_can_be_evicted() */
if (index->n_ahi_pages()) {
- mysql_mutex_lock(&table->autoinc_mutex);
+ table->autoinc_mutex.lock();
index->set_freed();
UT_LIST_ADD_LAST(table->freed_indexes, index);
- mysql_mutex_unlock(&table->autoinc_mutex);
+ table->autoinc_mutex.unlock();
return;
}
#endif /* BTR_CUR_HASH_ADAPT */
@@ -2199,7 +2027,7 @@ dict_index_find_cols(
const dict_table_t* table = index->table;
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
for (ulint i = 0; i < index->n_fields; i++) {
ulint j;
@@ -2297,18 +2125,8 @@ dict_index_add_col(
if (col->is_virtual()) {
dict_v_col_t* v_col = reinterpret_cast<dict_v_col_t*>(col);
-
- /* When v_col->v_indexes==NULL,
- ha_innobase::commit_inplace_alter_table(commit=true)
- will evict and reload the table definition, and
- v_col->v_indexes will not be NULL for the new table. */
- if (v_col->v_indexes != NULL) {
- /* Register the index with the virtual column index
- list */
- v_col->v_indexes->push_back(
- dict_v_idx_t(index, index->n_def));
- }
-
+ /* Register the index with the virtual column index list */
+ v_col->v_indexes.push_front(dict_v_idx_t(index, index->n_def));
col_name = dict_table_get_v_col_name_mysql(
table, dict_col_get_no(col));
} else {
@@ -2473,10 +2291,10 @@ dict_index_build_internal_clust(
ulint i;
ibool* indexed;
- ut_ad(dict_index_is_clust(index));
- ut_ad(!dict_index_is_ibuf(index));
+ ut_ad(index->is_primary());
+ ut_ad(!index->has_virtual());
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* Create a new index object with certainly enough fields */
new_index = dict_mem_index_create(index->table, index->name,
@@ -2628,7 +2446,7 @@ dict_index_build_internal_non_clust(
ut_ad(table && index);
ut_ad(!dict_index_is_clust(index));
ut_ad(!dict_index_is_ibuf(index));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* The clustered index should be the first in the list of indexes */
clust_index = UT_LIST_GET_FIRST(table->indexes);
@@ -2722,7 +2540,7 @@ dict_index_build_internal_fts(
dict_index_t* new_index;
ut_ad(index->type & DICT_FTS);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* Create a new index */
new_index = dict_mem_index_create(index->table, index->name,
@@ -2791,7 +2609,7 @@ dict_foreign_remove_from_cache(
/*===========================*/
dict_foreign_t* foreign) /*!< in, own: foreign constraint */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_a(foreign);
if (foreign->referenced_table != NULL) {
@@ -2816,7 +2634,7 @@ dict_foreign_find(
dict_table_t* table, /*!< in: table object */
dict_foreign_t* foreign) /*!< in: foreign constraint */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_ad(dict_foreign_set_validate(table->foreign_set));
ut_ad(dict_foreign_set_validate(table->referenced_set));
@@ -2870,7 +2688,7 @@ dict_foreign_find_index(
/*!< out: index where error
happened */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
if (error) {
*error = FK_INDEX_NOT_FOUND;
@@ -2968,7 +2786,7 @@ dict_foreign_add_to_cache(
DBUG_ENTER("dict_foreign_add_to_cache");
DBUG_PRINT("dict_foreign_add_to_cache", ("id: %s", foreign->id));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
for_table = dict_table_check_if_in_cache_low(
foreign->foreign_table_name_lookup);
@@ -3082,11 +2900,11 @@ dict_foreign_add_to_cache(
list. Otherwise it will be evicted from the cache. */
if (ref_table != NULL) {
- dict_table_prevent_eviction(ref_table);
+ dict_sys.prevent_eviction(ref_table);
}
if (for_table != NULL) {
- dict_table_prevent_eviction(for_table);
+ dict_sys.prevent_eviction(for_table);
}
ut_ad(dict_lru_validate());
@@ -3877,7 +3695,7 @@ dict_create_foreign_constraints_low(
char create_name[MAX_TABLE_NAME_LEN + 1];
ut_ad(!srv_read_only_mode);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
table = dict_table_get_low(name);
/* First check if we are actually doing an ALTER TABLE, and in that
@@ -4790,7 +4608,7 @@ dict_foreign_parse_drop_constraints(
ptr = str;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
loop:
ptr = dict_scan_to(ptr, "DROP");
@@ -4892,26 +4710,26 @@ syntax_error:
/**********************************************************************//**
Returns an index object if it is found in the dictionary cache.
-Assumes that dict_sys->mutex is already being held.
+Assumes that dict_sys.mutex is already being held.
@return index, NULL if not found */
dict_index_t*
dict_index_get_if_in_cache_low(
/*===========================*/
index_id_t index_id) /*!< in: index id */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
- for (dict_table_t *table= UT_LIST_GET_FIRST(dict_sys->table_LRU);
+ for (dict_table_t *table= UT_LIST_GET_FIRST(dict_sys.table_LRU);
table; table= UT_LIST_GET_NEXT(table_LRU, table))
if (dict_index_t *index= dict_table_find_index_on_id(table, index_id))
return index;
- for (dict_table_t *table = UT_LIST_GET_FIRST(dict_sys->table_non_LRU);
+ for (dict_table_t *table = UT_LIST_GET_FIRST(dict_sys.table_non_LRU);
table; table= UT_LIST_GET_NEXT(table_LRU, table))
if (dict_index_t *index= dict_table_find_index_on_id(table, index_id))
return index;
- return NULL;
+ return nullptr;
}
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
@@ -4925,15 +4743,15 @@ dict_index_get_if_in_cache(
{
dict_index_t* index;
- if (dict_sys == NULL) {
+ if (!dict_sys.is_initialised()) {
return(NULL);
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
index = dict_index_get_if_in_cache_low(index_id);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return(index);
}
@@ -5221,7 +5039,7 @@ dict_print_info_on_foreign_keys(
dict_foreign_t* foreign;
std::string str;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
for (dict_foreign_set::iterator it = table->foreign_set.begin();
it != table->foreign_set.end();
@@ -5288,12 +5106,12 @@ dict_print_info_on_foreign_keys(
}
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return str;
}
/** Given a space_id of a file-per-table tablespace, search the
-dict_sys->table_LRU list and return the dict_table_t* pointer for it.
+dict_sys.table_LRU list and return the dict_table_t* pointer for it.
@param space tablespace
@return table if found, NULL if not */
static
@@ -5306,13 +5124,13 @@ dict_find_single_table_by_space(const fil_space_t* space)
ut_ad(space->id > 0);
- if (dict_sys == NULL) {
+ if (!dict_sys.is_initialised()) {
/* This could happen when it's in redo processing. */
return(NULL);
}
- table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
- num_item = UT_LIST_GET_LEN(dict_sys->table_LRU);
+ table = UT_LIST_GET_FIRST(dict_sys.table_LRU);
+ num_item = UT_LIST_GET_LEN(dict_sys.table_LRU);
/* This function intentionally does not acquire mutex as it is used
by error handling code in deep call stack as last means to avoid
@@ -5386,9 +5204,9 @@ dict_set_corrupted(
row_mysql_lock_data_dictionary(trx);
}
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(!dict_table_is_comp(dict_sys->sys_tables));
- ut_ad(!dict_table_is_comp(dict_sys->sys_indexes));
+ ut_ad(mutex_own(&dict_sys.mutex));
+ ut_ad(!dict_table_is_comp(dict_sys.sys_tables));
+ ut_ad(!dict_table_is_comp(dict_sys.sys_indexes));
ut_ad(!sync_check_iterate(dict_sync_check()));
/* Mark the table as corrupted only if the clustered index
@@ -5416,7 +5234,7 @@ dict_set_corrupted(
mtr_start(&mtr);
index->type |= DICT_CORRUPT;
- sys_index = UT_LIST_GET_FIRST(dict_sys->sys_indexes->indexes);
+ sys_index = UT_LIST_GET_FIRST(dict_sys.sys_indexes->indexes);
/* Find the index row in SYS_INDEXES */
tuple = dtuple_create(heap, 2);
@@ -5476,9 +5294,9 @@ dict_set_corrupted_index_cache_only(
{
ut_ad(index != NULL);
ut_ad(index->table != NULL);
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(!dict_table_is_comp(dict_sys->sys_tables));
- ut_ad(!dict_table_is_comp(dict_sys->sys_indexes));
+ ut_ad(mutex_own(&dict_sys.mutex));
+ ut_ad(!dict_table_is_comp(dict_sys.sys_tables));
+ ut_ad(!dict_table_is_comp(dict_sys.sys_indexes));
/* Mark the table as corrupted only if the clustered index
is corrupted */
@@ -5507,11 +5325,10 @@ dict_index_set_merge_threshold(
btr_cur_t cursor;
ut_ad(index != NULL);
- ut_ad(!dict_table_is_comp(dict_sys->sys_tables));
- ut_ad(!dict_table_is_comp(dict_sys->sys_indexes));
+ ut_ad(!dict_table_is_comp(dict_sys.sys_tables));
+ ut_ad(!dict_table_is_comp(dict_sys.sys_indexes));
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&(dict_sys->mutex));
+ dict_sys_lock();
heap = mem_heap_create(sizeof(dtuple_t) + 2 * (sizeof(dfield_t)
+ sizeof(que_fork_t) + sizeof(upd_node_t)
@@ -5519,7 +5336,7 @@ dict_index_set_merge_threshold(
mtr_start(&mtr);
- sys_index = UT_LIST_GET_FIRST(dict_sys->sys_indexes->indexes);
+ sys_index = UT_LIST_GET_FIRST(dict_sys.sys_indexes->indexes);
/* Find the index row in SYS_INDEXES */
tuple = dtuple_create(heap, 2);
@@ -5559,8 +5376,7 @@ dict_index_set_merge_threshold(
mtr_commit(&mtr);
mem_heap_free(heap);
- mutex_exit(&(dict_sys->mutex));
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
}
#ifdef UNIV_DEBUG
@@ -5591,14 +5407,14 @@ void
dict_set_merge_threshold_all_debug(
uint merge_threshold_all)
{
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_set_merge_threshold_list_debug(
- &dict_sys->table_LRU, merge_threshold_all);
+ &dict_sys.table_LRU, merge_threshold_all);
dict_set_merge_threshold_list_debug(
- &dict_sys->table_non_LRU, merge_threshold_all);
+ &dict_sys.table_non_LRU, merge_threshold_all);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
#endif /* UNIV_DEBUG */
@@ -5744,7 +5560,7 @@ dict_table_check_for_dup_indexes(
const dict_index_t* index1;
const dict_index_t* index2;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* The primary index _must_ exist */
ut_a(UT_LIST_GET_LEN(table->indexes) > 0);
@@ -5821,7 +5637,7 @@ dict_table_schema_check(
dict_table_t* table;
ulint i;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
table = dict_table_get_low(req_schema->table_name);
@@ -6065,107 +5881,96 @@ dict_fs2utf8(
}
}
-/** Resize the hash tables besed on the current buffer pool size. */
-void
-dict_resize()
+/** Resize the hash tables based on the current buffer pool size. */
+void dict_sys_t::resize()
{
- dict_table_t* table;
-
- mutex_enter(&dict_sys->mutex);
-
- /* all table entries are in table_LRU and table_non_LRU lists */
- hash_table_free(dict_sys->table_hash);
- hash_table_free(dict_sys->table_id_hash);
-
- dict_sys->table_hash = hash_create(
- buf_pool_get_curr_size()
- / (DICT_POOL_PER_TABLE_HASH * UNIV_WORD_SIZE));
-
- dict_sys->table_id_hash = hash_create(
- buf_pool_get_curr_size()
- / (DICT_POOL_PER_TABLE_HASH * UNIV_WORD_SIZE));
-
- for (table = UT_LIST_GET_FIRST(dict_sys->table_LRU); table;
- table = UT_LIST_GET_NEXT(table_LRU, table)) {
- ulint fold = ut_fold_string(table->name.m_name);
- ulint id_fold = ut_fold_ull(table->id);
-
- HASH_INSERT(dict_table_t, name_hash, dict_sys->table_hash,
- fold, table);
-
- HASH_INSERT(dict_table_t, id_hash, dict_sys->table_id_hash,
- id_fold, table);
- }
-
- for (table = UT_LIST_GET_FIRST(dict_sys->table_non_LRU); table;
- table = UT_LIST_GET_NEXT(table_LRU, table)) {
- ulint fold = ut_fold_string(table->name.m_name);
- ulint id_fold = ut_fold_ull(table->id);
-
- HASH_INSERT(dict_table_t, name_hash, dict_sys->table_hash,
- fold, table);
-
- HASH_INSERT(dict_table_t, id_hash, dict_sys->table_id_hash,
- id_fold, table);
- }
-
- mutex_exit(&dict_sys->mutex);
+ ut_ad(this == &dict_sys);
+ ut_ad(is_initialised());
+ mutex_enter(&mutex);
+
+ /* all table entries are in table_LRU and table_non_LRU lists */
+ hash_table_free(table_hash);
+ hash_table_free(table_id_hash);
+ hash_table_free(temp_id_hash);
+
+ const ulint hash_size = buf_pool_get_curr_size()
+ / (DICT_POOL_PER_TABLE_HASH * UNIV_WORD_SIZE);
+ table_hash = hash_create(hash_size);
+ table_id_hash = hash_create(hash_size);
+ temp_id_hash = hash_create(hash_size);
+
+ for (dict_table_t* table= UT_LIST_GET_FIRST(table_LRU); table;
+ table= UT_LIST_GET_NEXT(table_LRU, table))
+ {
+ ut_ad(!table->is_temporary());
+ ulint fold= ut_fold_string(table->name.m_name);
+ ulint id_fold= ut_fold_ull(table->id);
+
+ HASH_INSERT(dict_table_t, name_hash, table_hash, fold, table);
+ HASH_INSERT(dict_table_t, id_hash, table_id_hash, id_fold, table);
+ }
+
+ for (dict_table_t* table = UT_LIST_GET_FIRST(table_non_LRU); table;
+ table = UT_LIST_GET_NEXT(table_LRU, table)) {
+ ulint fold = ut_fold_string(table->name.m_name);
+ ulint id_fold = ut_fold_ull(table->id);
+
+ HASH_INSERT(dict_table_t, name_hash, table_hash, fold, table);
+
+ hash_table_t* id_hash = table->is_temporary()
+ ? temp_id_hash : table_id_hash;
+
+ HASH_INSERT(dict_table_t, id_hash, id_hash, id_fold, table);
+ }
+
+ mutex_exit(&mutex);
}
-/**********************************************************************//**
-Closes the data dictionary module. */
-void
-dict_close(void)
-/*============*/
+/** Close the data dictionary cache on shutdown. */
+void dict_sys_t::close()
{
- if (dict_sys == NULL) {
- /* This should only happen if a failure occurred
- during redo log processing. */
- return;
- }
-
- /* Acquire only because it's a pre-condition. */
- mutex_enter(&dict_sys->mutex);
+ ut_ad(this == &dict_sys);
+ if (!is_initialised()) return;
- /* Free the hash elements. We don't remove them from the table
- because we are going to destroy the table anyway. */
- for (ulint i = 0; i < hash_get_n_cells(dict_sys->table_id_hash); i++) {
- dict_table_t* table;
+ mutex_enter(&mutex);
- table = static_cast<dict_table_t*>(
- HASH_GET_FIRST(dict_sys->table_hash, i));
-
- while (table) {
- dict_table_t* prev_table = table;
-
- table = static_cast<dict_table_t*>(
- HASH_GET_NEXT(name_hash, prev_table));
- ut_ad(prev_table->magic_n == DICT_TABLE_MAGIC_N);
- dict_table_remove_from_cache(prev_table);
- }
- }
+ /* Free the hash elements. We don't remove them from the table
+ because we are going to destroy the table anyway. */
+ for (ulint i = 0; i < hash_get_n_cells(table_hash); i++)
+ {
+ dict_table_t* table = static_cast<dict_table_t*>(HASH_GET_FIRST(table_hash,
+ i));
- hash_table_free(dict_sys->table_hash);
+ while (table)
+ {
+ dict_table_t* prev_table = table;
+ table = static_cast<dict_table_t*>(HASH_GET_NEXT(name_hash, prev_table));
+ dict_sys.remove(prev_table);
+ }
+ }
- /* The elements are the same instance as in dict_sys->table_hash,
- therefore we don't delete the individual elements. */
- hash_table_free(dict_sys->table_id_hash);
+ hash_table_free(table_hash);
- mutex_exit(&dict_sys->mutex);
- mutex_free(&dict_sys->mutex);
+ /* table_id_hash contains the same elements as in table_hash,
+ therefore we don't delete the individual elements. */
+ hash_table_free(table_id_hash);
- rw_lock_free(&dict_operation_lock);
+ /* No temporary tables should exist at this point. */
+ hash_table_free(temp_id_hash);
- mutex_free(&dict_foreign_err_mutex);
+ mutex_exit(&mutex);
+ mutex_free(&mutex);
+ rw_lock_free(&latch);
- if (dict_foreign_err_file) {
- fclose(dict_foreign_err_file);
- dict_foreign_err_file = NULL;
- }
+ mutex_free(&dict_foreign_err_mutex);
- ut_free(dict_sys);
+ if (dict_foreign_err_file)
+ {
+ fclose(dict_foreign_err_file);
+ dict_foreign_err_file = NULL;
+ }
- dict_sys = NULL;
+ m_initialised= false;
}
#ifdef UNIV_DEBUG
@@ -6179,16 +5984,16 @@ dict_lru_validate(void)
{
dict_table_t* table;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
- for (table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
+ for (table = UT_LIST_GET_FIRST(dict_sys.table_LRU);
table != NULL;
table = UT_LIST_GET_NEXT(table_LRU, table)) {
ut_a(table->can_be_evicted);
}
- for (table = UT_LIST_GET_FIRST(dict_sys->table_non_LRU);
+ for (table = UT_LIST_GET_FIRST(dict_sys.table_non_LRU);
table != NULL;
table = UT_LIST_GET_NEXT(table_LRU, table)) {
@@ -6197,62 +6002,6 @@ dict_lru_validate(void)
return(TRUE);
}
-
-/**********************************************************************//**
-Check if a table exists in the dict table LRU list.
-@return TRUE if table found in LRU list */
-static
-ibool
-dict_lru_find_table(
-/*================*/
- const dict_table_t* find_table) /*!< in: table to find */
-{
- dict_table_t* table;
-
- ut_ad(find_table != NULL);
- ut_ad(mutex_own(&dict_sys->mutex));
-
- for (table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
- table != NULL;
- table = UT_LIST_GET_NEXT(table_LRU, table)) {
-
- ut_a(table->can_be_evicted);
-
- if (table == find_table) {
- return(TRUE);
- }
- }
-
- return(FALSE);
-}
-
-/**********************************************************************//**
-Check if a table exists in the dict table non-LRU list.
-@return TRUE if table found in non-LRU list */
-static
-ibool
-dict_non_lru_find_table(
-/*====================*/
- const dict_table_t* find_table) /*!< in: table to find */
-{
- dict_table_t* table;
-
- ut_ad(find_table != NULL);
- ut_ad(mutex_own(&dict_sys->mutex));
-
- for (table = UT_LIST_GET_FIRST(dict_sys->table_non_LRU);
- table != NULL;
- table = UT_LIST_GET_NEXT(table_LRU, table)) {
-
- ut_a(!table->can_be_evicted);
-
- if (table == find_table) {
- return(TRUE);
- }
- }
-
- return(FALSE);
-}
#endif /* UNIV_DEBUG */
/*********************************************************************//**
Check an index to see whether its first fields are the columns in the array,
@@ -6380,6 +6129,7 @@ dict_index_zip_pad_update(
ulint fail_pct;
ut_ad(info);
+ ut_ad(info->pad % ZIP_PAD_INCR == 0);
total = info->success + info->failure;
@@ -6404,17 +6154,13 @@ dict_index_zip_pad_update(
if (fail_pct > zip_threshold) {
/* Compression failures are more then user defined
threshold. Increase the pad size to reduce chances of
- compression failures. */
- ut_ad(info->pad % ZIP_PAD_INCR == 0);
+ compression failures.
- /* Only do increment if it won't increase padding
+ Only do increment if it won't increase padding
beyond max pad size. */
if (info->pad + ZIP_PAD_INCR
< (srv_page_size * zip_pad_max) / 100) {
- /* Use atomics even though we have the mutex.
- This is to ensure that we are able to read
- info->pad atomically. */
- my_atomic_addlint(&info->pad, ZIP_PAD_INCR);
+ info->pad.fetch_add(ZIP_PAD_INCR);
MONITOR_INC(MONITOR_PAD_INCREMENTS);
}
@@ -6431,12 +6177,7 @@ dict_index_zip_pad_update(
padding. */
if (info->n_rounds >= ZIP_PAD_SUCCESSFUL_ROUND_LIMIT
&& info->pad > 0) {
-
- ut_ad(info->pad % ZIP_PAD_INCR == 0);
- /* Use atomics even though we have the mutex.
- This is to ensure that we are able to read
- info->pad atomically. */
- my_atomic_addlint(&info->pad, ulint(-ZIP_PAD_INCR));
+ info->pad.fetch_sub(ZIP_PAD_INCR);
info->n_rounds = 0;
@@ -6459,10 +6200,10 @@ dict_index_zip_success(
return;
}
- dict_index_zip_pad_lock(index);
+ index->zip_pad.mutex.lock();
++index->zip_pad.success;
dict_index_zip_pad_update(&index->zip_pad, zip_threshold);
- dict_index_zip_pad_unlock(index);
+ index->zip_pad.mutex.unlock();
}
/*********************************************************************//**
@@ -6479,10 +6220,10 @@ dict_index_zip_failure(
return;
}
- dict_index_zip_pad_lock(index);
+ index->zip_pad.mutex.lock();
++index->zip_pad.failure;
dict_index_zip_pad_update(&index->zip_pad, zip_threshold);
- dict_index_zip_pad_unlock(index);
+ index->zip_pad.mutex.unlock();
}
/*********************************************************************//**
@@ -6503,7 +6244,7 @@ dict_index_zip_pad_optimal_page_size(
return(srv_page_size);
}
- pad = my_atomic_loadlint(&index->zip_pad.pad);
+ pad = index->zip_pad.pad;
ut_ad(pad < srv_page_size);
sz = srv_page_size - pad;
@@ -6546,8 +6287,8 @@ ulint
dict_sys_get_size()
{
/* No mutex; this is a very crude approximation anyway */
- ulint size = UT_LIST_GET_LEN(dict_sys->table_LRU)
- + UT_LIST_GET_LEN(dict_sys->table_non_LRU);
+ ulint size = UT_LIST_GET_LEN(dict_sys.table_LRU)
+ + UT_LIST_GET_LEN(dict_sys.table_non_LRU);
size *= sizeof(dict_table_t)
+ sizeof(dict_index_t) * 2
+ (sizeof(dict_col_t) + sizeof(dict_field_t)) * 10
@@ -6557,17 +6298,6 @@ dict_sys_get_size()
return size;
}
-size_t
-dict_table_t::get_overflow_field_local_len() const
-{
- if (dict_table_has_atomic_blobs(this)) {
- /* new-format table: do not store any BLOB prefix locally */
- return BTR_EXTERN_FIELD_REF_SIZE;
- }
- /* up to MySQL 5.1: store a 768-byte prefix locally */
- return BTR_EXTERN_FIELD_REF_SIZE + DICT_ANTELOPE_MAX_INDEX_COL_LEN;
-}
-
bool dict_table_t::is_stats_table() const
{
return !strcmp(name.m_name, TABLE_STATS_NAME) ||
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc
index 0521a7e4446..1975e997cad 100644
--- a/storage/innobase/dict/dict0load.cc
+++ b/storage/innobase/dict/dict0load.cc
@@ -220,7 +220,7 @@ dict_get_first_table_name_in_db(
ulint len;
mtr_t mtr;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
heap = mem_heap_create(1000);
@@ -421,6 +421,8 @@ dict_process_sys_indexes_rec(
const char* err_msg;
byte* buf;
+ ut_d(index->is_dummy = true);
+ ut_d(index->in_instant_init = false);
buf = static_cast<byte*>(mem_heap_alloc(heap, 8));
/* Parse the record, and get "dict_index_t" struct filled */
@@ -801,7 +803,7 @@ dict_get_first_path(
char* filepath = NULL;
mem_heap_t* heap = mem_heap_create(1024);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
mtr_start(&mtr);
@@ -879,8 +881,7 @@ dict_update_filepath(
dberr_t err = DB_SUCCESS;
trx_t* trx;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
trx = trx_create();
trx->op_info = "update filepath";
@@ -947,8 +948,7 @@ dict_replace_tablespace_and_filepath(
DBUG_EXECUTE_IF("innodb_fail_to_update_tablespace_dict",
return(DB_INTERRUPTED););
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
ut_ad(filepath);
trx = trx_create();
@@ -982,7 +982,7 @@ dict_sys_tables_rec_check(
const byte* field;
ulint len;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
if (rec_get_deleted_flag(rec, 0)) {
return("delete-marked record in SYS_TABLES");
@@ -1304,7 +1304,8 @@ dict_sys_tables_rec_read(
high bit set in n_cols, and flags would be zero.
MySQL 4.1 was the first version to support innodb_file_per_table,
that is, *space_id != 0. */
- if (not_redundant || *space_id != 0 || *n_cols & DICT_N_COLS_COMPACT) {
+ if (not_redundant || *space_id != 0 || *n_cols & DICT_N_COLS_COMPACT
+ || fil_system.sys_space->full_crc32()) {
/* Get flags2 from SYS_TABLES.MIX_LEN */
field = rec_get_nth_field_old(
@@ -1345,8 +1346,7 @@ static ulint dict_check_sys_tables()
DBUG_ENTER("dict_check_sys_tables");
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
mtr_start(&mtr);
@@ -1483,15 +1483,13 @@ void dict_check_tablespaces_and_store_max_id()
DBUG_ENTER("dict_check_tablespaces_and_store_max_id");
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
/* Initialize the max space_id from sys header */
- mtr_start(&mtr);
- ulint max_space_id = mtr_read_ulint(
- dict_hdr_get(&mtr) + DICT_HDR_MAX_SPACE_ID,
- MLOG_4BYTES, &mtr);
- mtr_commit(&mtr);
+ mtr.start();
+ ulint max_space_id = mach_read_from_4(DICT_HDR_MAX_SPACE_ID
+ + dict_hdr_get(&mtr));
+ mtr.commit();
fil_set_max_space_id_if_bigger(max_space_id);
@@ -1501,8 +1499,7 @@ void dict_check_tablespaces_and_store_max_id()
max_space_id = dict_check_sys_tables();
fil_set_max_space_id_if_bigger(max_space_id);
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
DBUG_VOID_RETURN;
}
@@ -1785,7 +1782,7 @@ dict_load_columns(
mtr_t mtr;
ulint n_skipped = 0;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
mtr_start(&mtr);
@@ -1904,7 +1901,7 @@ dict_load_virtual_one_col(
mtr_t mtr;
ulint skipped = 0;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
if (v_col->num_base == 0) {
return;
@@ -1943,7 +1940,7 @@ dict_load_virtual_one_col(
btr_pcur_open_on_user_rec(sys_virtual_index, tuple, PAGE_CUR_GE,
BTR_SEARCH_LEAF, &pcur, &mtr);
- for (i = 0; i < v_col->num_base + skipped; i++) {
+ for (i = 0; i < unsigned{v_col->num_base} + skipped; i++) {
const char* err_msg;
ulint pos;
@@ -2137,7 +2134,7 @@ dict_load_fields(
mtr_t mtr;
dberr_t error;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
mtr_start(&mtr);
@@ -2368,7 +2365,7 @@ dict_load_indexes(
mtr_t mtr;
dberr_t error = DB_SUCCESS;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
mtr_start(&mtr);
@@ -2562,7 +2559,7 @@ corrupted:
goto corrupted;
} else if (dict_is_sys_table(table->id)
&& (dict_index_is_clust(index)
- || ((table == dict_sys->sys_tables)
+ || ((table == dict_sys.sys_tables)
&& !strcmp("ID_IND", index->name)))) {
/* The index was created in memory already at booting
@@ -2582,6 +2579,19 @@ corrupted:
!= DB_SUCCESS) {
goto func_exit;
}
+
+#ifdef UNIV_DEBUG
+ // The following assertion doesn't hold for FTS indexes
+ // as it may have prefix_len=1 with any charset
+ if (index->type != DICT_FTS) {
+ for (uint i = 0; i < index->n_fields; i++) {
+ dict_field_t &f = index->fields[i];
+ ut_ad(f.col->mbmaxlen == 0
+ || f.prefix_len
+ % f.col->mbmaxlen == 0);
+ }
+ }
+#endif /* UNIV_DEBUG */
}
next_rec:
btr_pcur_move_to_next_user_rec(&pcur, &mtr);
@@ -2665,7 +2675,7 @@ dict_save_data_dir_path(
dict_table_t* table, /*!< in/out: table */
const char* filepath) /*!< in: filepath of tablespace */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_a(DICT_TF_HAS_DATA_DIR(table->flags));
ut_a(!table->data_dir_path);
@@ -2692,7 +2702,7 @@ dict_save_data_dir_path(
/** Make sure the data_dir_path is saved in dict_table_t if DATA DIRECTORY
was used. Try to read it from the fil_system first, then from SYS_DATAFILES.
@param[in] table Table object
-@param[in] dict_mutex_own true if dict_sys->mutex is owned already */
+@param[in] dict_mutex_own true if dict_sys.mutex is owned already */
void
dict_get_and_save_data_dir_path(
dict_table_t* table,
@@ -2713,8 +2723,9 @@ dict_get_and_save_data_dir_path(
if (table->data_dir_path == NULL) {
/* Since we did not set the table data_dir_path,
unset the flag. This does not change SYS_DATAFILES
- or SYS_TABLES or FSP_FLAGS on the header page of the
- tablespace, but it makes dict_table_t consistent. */
+ or SYS_TABLES or FSP_SPACE_FLAGS on the header page
+ of the tablespace, but it makes dict_table_t
+ consistent. */
table->flags &= ~DICT_TF_MASK_DATA_DIR;
}
@@ -2743,7 +2754,7 @@ dict_table_t* dict_load_table(const char* name, dict_err_ignore_t ignore_err)
DBUG_ENTER("dict_load_table");
DBUG_PRINT("dict_load_table", ("loading table: '%s'", name));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
result = dict_table_check_if_in_cache_low(name);
@@ -2824,7 +2835,7 @@ dict_load_tablespace(
}
/* Try to open the tablespace. We set the 2nd param (fix_dict) to
- false because we do not have an x-lock on dict_operation_lock */
+ false because we do not have an x-lock on dict_sys.latch */
table->space = fil_ibd_open(
true, false, FIL_TYPE_TABLESPACE, table->space_id,
dict_tf_to_fsp_flags(table->flags),
@@ -2877,7 +2888,7 @@ dict_load_table_one(
DBUG_ENTER("dict_load_table_one");
DBUG_PRINT("dict_load_table_one", ("table: %s", name.m_name));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
heap = mem_heap_create(32000);
@@ -2976,7 +2987,7 @@ err_exit:
<< " failed, the table has"
" corrupted clustered indexes. Turn on"
" 'innodb_force_load_corrupted' to drop it";
- dict_table_remove_from_cache(table);
+ dict_sys.remove(table);
table = NULL;
goto func_exit;
} else {
@@ -2998,8 +3009,7 @@ corrupted:
dict_table_get_first_index(table)->page);
mtr.start();
buf_block_t* block = buf_page_get(
- page_id,
- dict_table_page_size(table),
+ page_id, table->space->zip_size(),
RW_S_LATCH, &mtr);
const bool corrupted = !block
|| page_get_space_id(block->frame)
@@ -3044,7 +3054,7 @@ corrupted:
" foreign key indexes. Turn off"
" 'foreign_key_checks' and try again.";
- dict_table_remove_from_cache(table);
+ dict_sys.remove(table);
table = NULL;
} else {
dict_mem_table_fill_foreign_vcol_set(table);
@@ -3060,7 +3070,7 @@ corrupted:
if (!srv_force_recovery
|| !index
|| !index->is_primary()) {
- dict_table_remove_from_cache(table);
+ dict_sys.remove(table);
table = NULL;
} else if (index->is_corrupted()
&& table->is_readable()) {
@@ -3093,7 +3103,7 @@ func_exit:
} else if (table->can_be_evicted) {
/* fts_optimize_thread is not started yet.
So make the table as non-evictable from cache. */
- dict_table_move_from_lru_to_non_lru(table);
+ dict_sys.prevent_eviction(table);
}
}
@@ -3125,7 +3135,7 @@ dict_load_table_on_id(
dict_table_t* table;
mtr_t mtr;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
table = NULL;
@@ -3136,7 +3146,7 @@ dict_load_table_on_id(
mtr_start(&mtr);
/*---------------------------------------------------*/
/* Get the secondary index based on ID for table SYS_TABLES */
- sys_tables = dict_sys->sys_tables;
+ sys_tables = dict_sys.sys_tables;
sys_table_ids = dict_table_get_next_index(
dict_table_get_first_index(sys_tables));
ut_ad(!dict_table_is_comp(sys_tables));
@@ -3210,7 +3220,7 @@ dict_load_sys_table(
{
mem_heap_t* heap;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
heap = mem_heap_create(1000);
@@ -3247,7 +3257,7 @@ dict_load_foreign_cols(
mtr_t mtr;
size_t id_len;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
id_len = strlen(foreign->id);
@@ -3394,7 +3404,7 @@ dict_load_foreign(
DBUG_PRINT("dict_load_foreign",
("id: '%s', check_recursive: %d", id, check_recursive));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
id_len = strlen(id);
@@ -3570,7 +3580,7 @@ dict_load_foreigns(
DBUG_ENTER("dict_load_foreigns");
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
sys_foreign = dict_table_get_low("SYS_FOREIGN");
@@ -3734,7 +3744,7 @@ dict_load_table_id_on_index_id(
bool found = false;
mtr_t mtr;
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* NOTE that the operation of this function is protected by
the dictionary mutex, and therefore no deadlocks can occur
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index 265642ef210..0bdb086a5b6 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -2,7 +2,7 @@
Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2021, MariaDB Corporation.
+Copyright (c) 2013, 2022, 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
@@ -37,6 +37,7 @@ Created 1/8/1996 Heikki Tuuri
#include "lock0lock.h"
#include "sync0sync.h"
#include "row0row.h"
+#include "sql_string.h"
#include <iostream>
#define DICT_HEAP_SIZE 100 /*!< initial memory heap size when
@@ -115,6 +116,14 @@ operator<<(
return(s << ut_get_name(NULL, table_name.m_name));
}
+bool dict_col_t::same_encoding(uint16_t a, uint16_t b)
+{
+ if (const CHARSET_INFO *acs= get_charset(a, MYF(MY_WME)))
+ if (const CHARSET_INFO *bcs= get_charset(b, MYF(MY_WME)))
+ return Charset(bcs).encoding_allows_reinterpret_as(acs);
+ return false;
+}
+
/** Create a table memory object.
@param name table name
@param space tablespace
@@ -173,6 +182,9 @@ dict_mem_table_create(
mem_heap_alloc(heap, table->n_cols * sizeof(dict_col_t)));
table->v_cols = static_cast<dict_v_col_t*>(
mem_heap_alloc(heap, n_v_cols * sizeof(*table->v_cols)));
+ for (ulint i = n_v_cols; i--; ) {
+ new (&table->v_cols[i]) dict_v_col_t();
+ }
table->autoinc_lock = static_cast<ib_lock_t*>(
mem_heap_alloc(heap, lock_get_size()));
@@ -184,8 +196,6 @@ dict_mem_table_create(
|| DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_ADD_DOC_ID)) {
table->fts = fts_create(table);
table->fts->cache = fts_cache_create(table);
- } else {
- table->fts = NULL;
}
new(&table->foreign_set) dict_foreign_set();
@@ -230,15 +240,10 @@ dict_mem_table_free(
/* Clean up virtual index info structures that are registered
with virtual columns */
for (ulint i = 0; i < table->n_v_def; i++) {
- dict_v_col_t* vcol
- = dict_table_get_nth_v_col(table, i);
-
- UT_DELETE(vcol->v_indexes);
+ dict_table_get_nth_v_col(table, i)->~dict_v_col_t();
}
- if (table->s_cols != NULL) {
- UT_DELETE(table->s_cols);
- }
+ UT_DELETE(table->s_cols);
mem_heap_free(table->heap);
}
@@ -417,7 +422,7 @@ dict_mem_table_add_v_col(
v_col->num_base = num_base;
/* Initialize the index list for virtual columns */
- v_col->v_indexes = UT_NEW_NOKEY(dict_v_idx_list());
+ ut_ad(v_col->v_indexes.empty());
return(v_col);
}
@@ -451,7 +456,7 @@ dict_mem_table_add_s_col(
}
s_col.num_base = num_base;
- table->s_cols->push_back(s_col);
+ table->s_cols->push_front(s_col);
}
/**********************************************************************//**
@@ -527,6 +532,14 @@ dict_mem_table_col_rename_low(
= dict_index_get_nth_field(
index, i);
+ ut_ad(!field->name
+ == field->col->is_dropped());
+ if (!field->name) {
+ /* dropped columns lack a name */
+ ut_ad(index->is_instant());
+ continue;
+ }
+
/* if is_virtual and that in field->col does
not match, continue */
if ((!is_virtual) !=
@@ -744,6 +757,7 @@ dict_mem_fill_column_struct(
column->mbmaxlen = mbmaxlen;
column->def_val.data = NULL;
column->def_val.len = UNIV_SQL_DEFAULT;
+ ut_ad(!column->is_dropped());
}
/**********************************************************************//**
@@ -772,16 +786,14 @@ dict_mem_index_create(
dict_mem_fill_index_struct(index, heap, index_name, type, n_fields);
- mysql_mutex_init(0, &index->zip_pad.mutex, NULL);
+ new (&index->zip_pad.mutex) std::mutex();
if (type & DICT_SPATIAL) {
- index->rtr_track = static_cast<rtr_info_track_t*>(
- mem_heap_alloc(
- heap,
- sizeof(*index->rtr_track)));
+ index->rtr_track = new
+ (mem_heap_alloc(heap, sizeof *index->rtr_track))
+ rtr_info_track_t();
mutex_create(LATCH_ID_RTR_ACTIVE_MUTEX,
&index->rtr_track->rtr_active_mutex);
- index->rtr_track->rtr_active = UT_NEW_NOKEY(rtr_info_active());
}
return(index);
@@ -889,11 +901,7 @@ dict_mem_fill_vcol_has_index(
continue;
}
- dict_v_idx_list::iterator it;
- for (it = v_col->v_indexes->begin();
- it != v_col->v_indexes->end(); ++it) {
- dict_v_idx_t v_idx = *it;
-
+ for (const auto& v_idx : v_col->v_indexes) {
if (v_idx.index != index) {
continue;
}
@@ -966,7 +974,7 @@ dict_mem_fill_vcol_set_for_base_col(
continue;
}
- for (ulint j = 0; j < v_col->num_base; j++) {
+ for (ulint j = 0; j < unsigned{v_col->num_base}; j++) {
if (strcmp(col_name, dict_table_get_col_name(
table,
v_col->base_col[j]->ind)) == 0) {
@@ -1087,24 +1095,18 @@ dict_mem_index_free(
ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- mysql_mutex_destroy(&index->zip_pad.mutex);
+ index->zip_pad.mutex.~mutex();
if (dict_index_is_spatial(index)) {
- rtr_info_active::iterator it;
- rtr_info_t* rtr_info;
-
- for (it = index->rtr_track->rtr_active->begin();
- it != index->rtr_track->rtr_active->end(); ++it) {
- rtr_info = *it;
-
+ for (auto& rtr_info : index->rtr_track->rtr_active) {
rtr_info->index = NULL;
}
mutex_destroy(&index->rtr_track->rtr_active_mutex);
- UT_DELETE(index->rtr_track->rtr_active);
+ index->rtr_track->~rtr_info_track_t();
}
- dict_index_remove_from_v_col_list(index);
+ index->detach_columns();
mem_heap_free(index->heap);
}
@@ -1209,293 +1211,130 @@ bool dict_foreign_t::affects_fulltext() const
return false;
}
-/** Adjust clustered index metadata for instant ADD COLUMN.
-@param[in] clustered index definition after instant ADD COLUMN */
-inline void dict_index_t::instant_add_field(const dict_index_t& instant)
+/** Reconstruct the clustered index fields.
+@return whether metadata is incorrect */
+inline bool dict_index_t::reconstruct_fields()
{
DBUG_ASSERT(is_primary());
- DBUG_ASSERT(instant.is_primary());
- DBUG_ASSERT(!instant.is_instant());
- DBUG_ASSERT(n_def == n_fields);
- DBUG_ASSERT(instant.n_def == instant.n_fields);
-
- DBUG_ASSERT(type == instant.type);
- DBUG_ASSERT(trx_id_offset == instant.trx_id_offset);
- DBUG_ASSERT(n_user_defined_cols == instant.n_user_defined_cols);
- DBUG_ASSERT(n_uniq == instant.n_uniq);
- DBUG_ASSERT(instant.n_fields > n_fields);
- DBUG_ASSERT(instant.n_def > n_def);
- DBUG_ASSERT(instant.n_nullable >= n_nullable);
- DBUG_ASSERT(instant.n_core_fields >= n_core_fields);
- DBUG_ASSERT(instant.n_core_null_bytes >= n_core_null_bytes);
-
- n_fields = instant.n_fields;
- n_def = instant.n_def;
- n_nullable = instant.n_nullable;
- fields = static_cast<dict_field_t*>(
- mem_heap_dup(heap, instant.fields, n_fields * sizeof *fields));
-
- ut_d(unsigned n_null = 0);
-
- for (unsigned i = 0; i < n_fields; i++) {
- DBUG_ASSERT(fields[i].same(instant.fields[i]));
- const dict_col_t* icol = instant.fields[i].col;
- DBUG_ASSERT(!icol->is_virtual());
- dict_col_t* col = fields[i].col = &table->cols[
- icol - instant.table->cols];
- fields[i].name = col->name(*table);
- ut_d(n_null += col->is_nullable());
- }
- ut_ad(n_null == n_nullable);
-}
+ const auto old_n_fields = n_fields;
-/** Adjust metadata for instant ADD COLUMN.
-@param[in] table table definition after instant ADD COLUMN */
-void dict_table_t::instant_add_column(const dict_table_t& table)
-{
- DBUG_ASSERT(!table.cached);
- DBUG_ASSERT(table.n_def == table.n_cols);
- DBUG_ASSERT(table.n_t_def == table.n_t_cols);
- DBUG_ASSERT(n_def == n_cols);
- DBUG_ASSERT(n_t_def == n_t_cols);
- DBUG_ASSERT(table.n_cols > n_cols);
- ut_ad(mutex_own(&dict_sys->mutex));
-
- const char* end = table.col_names;
- for (unsigned i = table.n_cols; i--; ) end += strlen(end) + 1;
-
- col_names = static_cast<char*>(
- mem_heap_dup(heap, table.col_names,
- ulint(end - table.col_names)));
- const dict_col_t* const old_cols = cols;
- const dict_col_t* const old_cols_end = cols + n_cols;
- cols = static_cast<dict_col_t*>(mem_heap_dup(heap, table.cols,
- table.n_cols
- * sizeof *cols));
-
- /* Preserve the default values of previously instantly
- added columns. */
- for (unsigned i = unsigned(n_cols) - DATA_N_SYS_COLS; i--; ) {
- cols[i].def_val = old_cols[i].def_val;
- }
+ n_fields += table->instant->n_dropped;
+ n_def += table->instant->n_dropped;
- /* Copy the new default values to this->heap. */
- for (unsigned i = n_cols; i < table.n_cols; i++) {
- dict_col_t& c = cols[i - DATA_N_SYS_COLS];
- DBUG_ASSERT(c.is_instant());
- if (c.def_val.len == 0) {
- c.def_val.data = field_ref_zero;
- } else if (const void*& d = c.def_val.data) {
- d = mem_heap_dup(heap, d, c.def_val.len);
- } else {
- DBUG_ASSERT(c.def_val.len == UNIV_SQL_NULL);
- }
- }
+ const unsigned n_first = first_user_field();
- const unsigned old_n_cols = n_cols;
- const unsigned n_add = unsigned(table.n_cols - n_cols);
-
- n_t_def += n_add;
- n_t_cols += n_add;
- n_cols = table.n_cols;
- n_def = n_cols;
-
- for (unsigned i = n_v_def; i--; ) {
- const dict_v_col_t& v = v_cols[i];
- for (ulint n = v.num_base; n--; ) {
- dict_col_t*& base = v.base_col[n];
- if (!base->is_virtual()) {
- DBUG_ASSERT(base >= old_cols);
- size_t n = size_t(base - old_cols);
- DBUG_ASSERT(n + DATA_N_SYS_COLS < old_n_cols);
- base = &cols[n];
+ dict_field_t* tfields = static_cast<dict_field_t*>(
+ mem_heap_zalloc(heap, n_fields * sizeof *fields));
+
+ memcpy(tfields, fields, n_first * sizeof *fields);
+
+ n_nullable = 0;
+ ulint n_core_null = 0;
+ const bool comp = dict_table_is_comp(table);
+ const auto* field_map_it = table->instant->field_map;
+ for (unsigned i = n_first, j = 0; i < n_fields; ) {
+ dict_field_t& f = tfields[i++];
+ auto c = *field_map_it++;
+ if (c.is_dropped()) {
+ f.col = &table->instant->dropped[j++];
+ DBUG_ASSERT(f.col->is_dropped());
+ f.fixed_len = dict_col_get_fixed_size(f.col, comp);
+ } else {
+ DBUG_ASSERT(!c.is_not_null());
+ const auto old = std::find_if(
+ fields + n_first, fields + old_n_fields,
+ [c](const dict_field_t& o)
+ { return o.col->ind == c.ind(); });
+
+ if (old >= fields + old_n_fields
+ || old->prefix_len
+ || old->col != &table->cols[c.ind()]) {
+ return true;
}
+
+ ut_ad(old >= &fields[n_first]);
+ f = *old;
}
- }
- dict_index_t* index = dict_table_get_first_index(this);
-
- index->instant_add_field(*dict_table_get_first_index(&table));
-
- while ((index = dict_table_get_next_index(index)) != NULL) {
- for (unsigned i = 0; i < index->n_fields; i++) {
- dict_field_t& field = index->fields[i];
- if (field.col < old_cols
- || field.col >= old_cols_end) {
- DBUG_ASSERT(field.col->is_virtual());
- } else {
- /* Secondary indexes may contain user
- columns and DB_ROW_ID (if there is
- GEN_CLUST_INDEX instead of PRIMARY KEY),
- but not DB_TRX_ID,DB_ROLL_PTR. */
- DBUG_ASSERT(field.col >= old_cols);
- size_t n = size_t(field.col - old_cols);
- DBUG_ASSERT(n + DATA_N_SYS_COLS <= old_n_cols);
- if (n + DATA_N_SYS_COLS >= old_n_cols) {
- /* Replace DB_ROW_ID */
- n += n_add;
- }
- field.col = &cols[n];
- DBUG_ASSERT(!field.col->is_virtual());
- field.name = field.col->name(*this);
- }
+ f.col->clear_instant();
+ if (f.col->is_nullable()) {
+ n_nullable++;
+ n_core_null += i <= n_core_fields;
}
}
+
+ fields = tfields;
+ n_core_null_bytes = UT_BITS_IN_BYTES(n_core_null);
+
+ return false;
}
-/** Roll back instant_add_column().
-@param[in] old_n_cols original n_cols
-@param[in] old_cols original cols
-@param[in] old_col_names original col_names */
-void
-dict_table_t::rollback_instant(
- unsigned old_n_cols,
- dict_col_t* old_cols,
- const char* old_col_names)
+/** Reconstruct dropped or reordered columns.
+@param[in] metadata data from serialise_columns()
+@param[in] len length of the metadata, in bytes
+@return whether parsing the metadata failed */
+bool dict_table_t::deserialise_columns(const byte* metadata, ulint len)
{
- ut_ad(mutex_own(&dict_sys->mutex));
- dict_index_t* index = indexes.start;
- /* index->is_instant() does not necessarily hold here, because
- the table may have been emptied */
- DBUG_ASSERT(old_n_cols >= DATA_N_SYS_COLS);
- DBUG_ASSERT(n_cols >= old_n_cols);
- DBUG_ASSERT(n_cols == n_def);
- DBUG_ASSERT(index->n_def == index->n_fields);
-
- const unsigned n_remove = n_cols - old_n_cols;
-
- for (unsigned i = index->n_fields - n_remove; i < index->n_fields;
- i++) {
- if (index->fields[i].col->is_nullable()) {
- index->n_nullable--;
- }
- }
+ DBUG_ASSERT(!instant);
- index->n_fields -= n_remove;
- index->n_def = index->n_fields;
- if (index->n_core_fields > index->n_fields) {
- index->n_core_fields = index->n_fields;
- index->n_core_null_bytes
- = UT_BITS_IN_BYTES(unsigned(index->n_nullable));
- }
+ unsigned num_non_pk_fields = mach_read_from_4(metadata);
+ metadata += 4;
- const dict_col_t* const new_cols = cols;
- const dict_col_t* const new_cols_end = cols + n_cols;
-
- cols = old_cols;
- col_names = old_col_names;
- n_cols = old_n_cols;
- n_def = old_n_cols;
- n_t_def -= n_remove;
- n_t_cols -= n_remove;
-
- for (unsigned i = n_v_def; i--; ) {
- const dict_v_col_t& v = v_cols[i];
- for (ulint n = v.num_base; n--; ) {
- dict_col_t*& base = v.base_col[n];
- if (!base->is_virtual()) {
- base = &cols[base - new_cols];
- }
- }
+ if (num_non_pk_fields >= REC_MAX_N_FIELDS - 3) {
+ return true;
}
- do {
- for (unsigned i = 0; i < index->n_fields; i++) {
- dict_field_t& field = index->fields[i];
- if (field.col < new_cols
- || field.col >= new_cols_end) {
- DBUG_ASSERT(field.col->is_virtual());
- } else {
- DBUG_ASSERT(field.col >= new_cols);
- size_t n = size_t(field.col - new_cols);
- DBUG_ASSERT(n <= n_cols);
- if (n + DATA_N_SYS_COLS >= n_cols) {
- n -= n_remove;
- }
- field.col = &cols[n];
- DBUG_ASSERT(!field.col->is_virtual());
- field.name = field.col->name(*this);
- }
- }
- } while ((index = dict_table_get_next_index(index)) != NULL);
-}
+ dict_index_t* index = UT_LIST_GET_FIRST(indexes);
-/** Trim the instantly added columns when an insert into SYS_COLUMNS
-is rolled back during ALTER TABLE or recovery.
-@param[in] n number of surviving non-system columns */
-void dict_table_t::rollback_instant(unsigned n)
-{
- ut_ad(mutex_own(&dict_sys->mutex));
- dict_index_t* index = indexes.start;
- DBUG_ASSERT(index->is_instant());
- DBUG_ASSERT(index->n_def == index->n_fields);
- DBUG_ASSERT(n_cols == n_def);
- DBUG_ASSERT(n >= index->n_uniq);
- DBUG_ASSERT(n_cols > n + DATA_N_SYS_COLS);
- const unsigned n_remove = n_cols - n - DATA_N_SYS_COLS;
-
- char* names = const_cast<char*>(dict_table_get_col_name(this, n));
- const char* sys = names;
- for (unsigned i = n_remove; i--; ) {
- sys += strlen(sys) + 1;
+ if (num_non_pk_fields < unsigned(index->n_fields)
+ - index->first_user_field()) {
+ return true;
}
- static const char system[] = "DB_ROW_ID\0DB_TRX_ID\0DB_ROLL_PTR";
- DBUG_ASSERT(!memcmp(sys, system, sizeof system));
- for (unsigned i = index->n_fields - n_remove; i < index->n_fields;
- i++) {
- if (index->fields[i].col->is_nullable()) {
- index->n_nullable--;
+
+ field_map_element_t* field_map = static_cast<field_map_element_t*>(
+ mem_heap_alloc(heap,
+ num_non_pk_fields * sizeof *field_map));
+
+ unsigned n_dropped_cols = 0;
+
+ for (unsigned i = 0; i < num_non_pk_fields; i++) {
+ auto c = field_map[i] = mach_read_from_2(metadata);
+ metadata += 2;
+
+ if (field_map[i].is_dropped()) {
+ if (c.ind() > DICT_MAX_FIXED_COL_LEN + 1) {
+ return true;
+ }
+ n_dropped_cols++;
+ } else if (c >= n_cols) {
+ return true;
}
}
- index->n_fields -= n_remove;
- index->n_def = index->n_fields;
- memmove(names, sys, sizeof system);
- memmove(cols + n, cols + n_cols - DATA_N_SYS_COLS,
- DATA_N_SYS_COLS * sizeof *cols);
- n_cols -= n_remove;
- n_def = n_cols;
- n_t_cols -= n_remove;
- n_t_def -= n_remove;
-
- for (unsigned i = DATA_N_SYS_COLS; i--; ) {
- cols[n_cols - i].ind--;
- }
- if (dict_index_is_auto_gen_clust(index)) {
- DBUG_ASSERT(index->n_uniq == 1);
- dict_field_t* field = index->fields;
- field->name = sys;
- field->col = dict_table_get_sys_col(this, DATA_ROW_ID);
- field++;
- field->name = sys + sizeof "DB_ROW_ID";
- field->col = dict_table_get_sys_col(this, DATA_TRX_ID);
- field++;
- field->name = sys + sizeof "DB_ROW_ID\0DB_TRX_ID";
- field->col = dict_table_get_sys_col(this, DATA_ROLL_PTR);
-
- /* Replace the DB_ROW_ID column in secondary indexes. */
- while ((index = dict_table_get_next_index(index)) != NULL) {
- field = &index->fields[index->n_fields - 1];
- DBUG_ASSERT(field->col->mtype == DATA_SYS);
- DBUG_ASSERT(field->col->prtype
- == DATA_NOT_NULL + DATA_TRX_ID);
- field->col--;
- field->name = sys;
+ dict_col_t* dropped_cols = static_cast<dict_col_t*>(mem_heap_zalloc(
+ heap, n_dropped_cols * sizeof(dict_col_t)));
+ instant = new (mem_heap_alloc(heap, sizeof *instant)) dict_instant_t();
+ instant->n_dropped = n_dropped_cols;
+ instant->dropped = dropped_cols;
+ instant->field_map = field_map;
+
+ dict_col_t* col = dropped_cols;
+ for (unsigned i = 0; i < num_non_pk_fields; i++) {
+ if (field_map[i].is_dropped()) {
+ auto fixed_len = field_map[i].ind();
+ DBUG_ASSERT(fixed_len <= DICT_MAX_FIXED_COL_LEN + 1);
+ (col++)->set_dropped(field_map[i].is_not_null(),
+ fixed_len == 1,
+ fixed_len > 1 ? fixed_len - 1
+ : 0);
}
-
- return;
}
+ DBUG_ASSERT(col == &dropped_cols[n_dropped_cols]);
- dict_field_t* field = &index->fields[index->n_uniq];
- field->name = sys + sizeof "DB_ROW_ID";
- field->col = dict_table_get_sys_col(this, DATA_TRX_ID);
- field++;
- field->name = sys + sizeof "DB_ROW_ID\0DB_TRX_ID";
- field->col = dict_table_get_sys_col(this, DATA_ROLL_PTR);
+ return UT_LIST_GET_FIRST(indexes)->reconstruct_fields();
}
-
/** Check if record in clustered index is historical row.
@param[in] rec clustered row
@param[in] offsets offsets
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index e36e2184e2d..c5ff0c56951 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -168,7 +168,7 @@ bool
dict_stats_persistent_storage_check(
/*================================*/
bool caller_has_dict_sys_mutex) /*!< in: true if the caller
- owns dict_sys->mutex */
+ owns dict_sys.mutex */
{
/* definition for the table TABLE_STATS_NAME */
dict_col_meta_t table_stats_columns[] = {
@@ -236,10 +236,10 @@ dict_stats_persistent_storage_check(
dberr_t ret;
if (!caller_has_dict_sys_mutex) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* first check table_stats */
ret = dict_table_schema_check(&table_stats_schema, errstr,
@@ -251,7 +251,7 @@ dict_stats_persistent_storage_check(
}
if (!caller_has_dict_sys_mutex) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
if (ret != DB_SUCCESS && ret != DB_STATS_DO_NOT_EXIST) {
@@ -284,8 +284,7 @@ dict_stats_exec_sql(
dberr_t err;
bool trx_started = false;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
if (!dict_stats_persistent_storage_check(true)) {
pars_info_free(pinfo);
@@ -512,7 +511,7 @@ dict_stats_empty_index(
{
ut_ad(!(index->type & DICT_FTS));
ut_ad(!dict_index_is_ibuf(index));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ulint n_uniq = index->n_uniq;
@@ -542,7 +541,7 @@ dict_stats_empty_table(
bool empty_defrag_stats)
/*!< in: whether to empty defrag stats */
{
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* Zero the stats members */
table->stat_n_rows = 0;
@@ -568,7 +567,7 @@ dict_stats_empty_table(
}
table->stat_initialized = TRUE;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
/*********************************************************************//**
@@ -667,7 +666,7 @@ dict_stats_copy(
to have the same statistics as if
the table was empty */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
dst->stats_last_recalc = src->stats_last_recalc;
dst->stat_n_rows = src->stat_n_rows;
@@ -784,7 +783,7 @@ dict_table_t*
dict_stats_snapshot_create(
dict_table_t* table)
{
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_stats_assert_initialized(table);
@@ -799,7 +798,7 @@ dict_stats_snapshot_create(
t->stats_sample_pages = table->stats_sample_pages;
t->stats_bg_flag = table->stats_bg_flag;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return(t);
}
@@ -838,14 +837,14 @@ dict_stats_update_transient_for_index(
Initialize some bogus index cardinality
statistics, so that the data can be queried in
various means, also via secondary indexes. */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_stats_empty_index(index, false);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
} else if (ibuf_debug && !dict_index_is_clust(index)) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_stats_empty_index(index, false);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
} else {
mtr_t mtr;
@@ -866,9 +865,9 @@ dict_stats_update_transient_for_index(
switch (size) {
case ULINT_UNDEFINED:
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_stats_empty_index(index, false);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return;
case 0:
/* The root node of the tree is a leaf */
@@ -885,8 +884,8 @@ dict_stats_update_transient_for_index(
index);
if (!stats.empty()) {
- ut_ad(!mutex_own(&dict_sys->mutex));
- mutex_enter(&dict_sys->mutex);
+ ut_ad(!mutex_own(&dict_sys.mutex));
+ mutex_enter(&dict_sys.mutex);
for (size_t i = 0; i < stats.size(); ++i) {
index->stat_n_diff_key_vals[i]
= stats[i].n_diff_key_vals;
@@ -895,7 +894,7 @@ dict_stats_update_transient_for_index(
index->stat_n_non_null_key_vals[i]
= stats[i].n_non_null_key_vals;
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
}
}
@@ -913,7 +912,7 @@ dict_stats_update_transient(
/*========================*/
dict_table_t* table) /*!< in/out: table */
{
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
dict_index_t* index;
ulint sum_of_index_sizes = 0;
@@ -946,9 +945,9 @@ dict_stats_update_transient(
if (dict_stats_should_ignore_index(index)
|| !index->is_readable()) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_stats_empty_index(index, false);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
continue;
}
@@ -957,7 +956,7 @@ dict_stats_update_transient(
sum_of_index_sizes += index->stat_index_size;
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
index = dict_table_get_first_index(table);
@@ -975,7 +974,7 @@ dict_stats_update_transient(
table->stat_initialized = TRUE;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
/* @{ Pseudo code about the relation between the following functions
@@ -1506,7 +1505,7 @@ dict_stats_analyze_index_below_cur(
page_id_t page_id(index->table->space_id,
btr_node_ptr_get_child_page_no(
rec, offsets_rec));
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
/* assume no external pages by default - in case we quit from this
function without analyzing any leaf pages */
@@ -1519,7 +1518,7 @@ dict_stats_analyze_index_below_cur(
dberr_t err = DB_SUCCESS;
- block = buf_page_get_gen(page_id, page_size, RW_S_LATCH,
+ block = buf_page_get_gen(page_id, zip_size, RW_S_LATCH,
NULL /* no guessed block */,
BUF_GET, __FILE__, __LINE__, &mtr, &err);
@@ -1934,7 +1933,7 @@ static index_stats_t dict_stats_analyze_index(dict_index_t* index)
DBUG_PRINT("info", ("index: %s, online status: %d", index->name(),
dict_index_get_online_status(index)));
- ut_ad(!mutex_own(&dict_sys->mutex)); // because this function is slow
+ ut_ad(!mutex_own(&dict_sys.mutex)); // because this function is slow
ut_ad(index->table->get_ref_count());
/* Disable update statistic for Rtree */
@@ -2006,14 +2005,14 @@ static index_stats_t dict_stats_analyze_index(dict_index_t* index)
mtr.commit();
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
for (ulint i = 0; i < n_uniq; i++) {
result.stats[i].n_diff_key_vals = index->stat_n_diff_key_vals[i];
result.stats[i].n_sample_sizes = total_pages;
result.stats[i].n_non_null_key_vals = index->stat_n_non_null_key_vals[i];
}
result.n_leaf_pages = index->stat_n_leaf_pages;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
DBUG_RETURN(result);
}
@@ -2247,13 +2246,13 @@ dict_stats_update_persistent(
}
ut_ad(!dict_index_is_ibuf(index));
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_stats_empty_index(index, false);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
index_stats_t stats = dict_stats_analyze_index(index);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
index->stat_index_size = stats.index_size;
index->stat_n_leaf_pages = stats.n_leaf_pages;
for (size_t i = 0; i < stats.stats.size(); ++i) {
@@ -2289,9 +2288,9 @@ dict_stats_update_persistent(
}
if (!(table->stats_bg_flag & BG_STAT_SHOULD_QUIT)) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
stats = dict_stats_analyze_index(index);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
index->stat_index_size = stats.index_size;
index->stat_n_leaf_pages = stats.n_leaf_pages;
@@ -2317,7 +2316,7 @@ dict_stats_update_persistent(
dict_stats_assert_initialized(table);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return(DB_SUCCESS);
}
@@ -2351,8 +2350,7 @@ dict_stats_save_index_stat(
char table_utf8[MAX_TABLE_UTF8_LEN];
ut_ad(!trx || trx->internal || trx->mysql_thd);
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
dict_fs2utf8(index->table->name.m_name, db_utf8, sizeof(db_utf8),
table_utf8, sizeof(table_utf8));
@@ -2485,8 +2483,7 @@ dict_stats_save(
table_utf8, sizeof(table_utf8));
const time_t now = time(NULL);
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
pinfo = pars_info_create();
@@ -2524,13 +2521,10 @@ dict_stats_save(
if (UNIV_UNLIKELY(ret != DB_SUCCESS)) {
ib::error() << "Cannot save table statistics for table "
<< table->name << ": " << ret;
-
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
-
+func_exit:
+ dict_sys_unlock();
dict_stats_snapshot_free(table);
-
- return(ret);
+ return ret;
}
trx_t* trx = trx_create();
@@ -2631,13 +2625,7 @@ dict_stats_save(
end:
trx->free();
-
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
-
- dict_stats_snapshot_free(table);
-
- return(ret);
+ goto func_exit;
}
/*********************************************************************//**
@@ -3004,7 +2992,7 @@ dict_stats_fetch_from_ps(
char db_utf8[MAX_DB_UTF8_LEN];
char table_utf8[MAX_TABLE_UTF8_LEN];
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
/* Initialize all stats to dummy values before fetching because if
the persistent storage contains incomplete stats (e.g. missing stats
@@ -3140,13 +3128,13 @@ dict_stats_update_for_index(
{
DBUG_ENTER("dict_stats_update_for_index");
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
if (dict_stats_is_persistent_enabled(index->table)) {
if (dict_stats_persistent_storage_check(false)) {
index_stats_t stats = dict_stats_analyze_index(index);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
index->stat_index_size = stats.index_size;
index->stat_n_leaf_pages = stats.n_leaf_pages;
for (size_t i = 0; i < stats.stats.size(); ++i) {
@@ -3159,7 +3147,7 @@ dict_stats_update_for_index(
}
index->table->stat_sum_of_other_index_sizes
+= index->stat_index_size;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
dict_stats_save(index->table, &index->id);
DBUG_VOID_RETURN;
@@ -3200,7 +3188,7 @@ dict_stats_update(
the persistent statistics
storage */
{
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
if (!table->is_readable()) {
return (dict_stats_report_error(table));
@@ -3335,7 +3323,7 @@ dict_stats_update(
switch (err) {
case DB_SUCCESS:
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* Pass reset_ignored_indexes=true as parameter
to dict_stats_copy. This will cause statictics
@@ -3344,7 +3332,7 @@ dict_stats_update(
dict_stats_assert_initialized(table);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
dict_stats_table_clone_free(t);
@@ -3428,7 +3416,7 @@ dict_stats_drop_index(
pars_info_t* pinfo;
dberr_t ret;
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
/* skip indexes whose table names do not contain a database name
e.g. if we are dropping an index from SYS_TABLES */
@@ -3448,8 +3436,7 @@ dict_stats_drop_index(
pars_info_add_str_literal(pinfo, "index_name", iname);
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
ret = dict_stats_exec_sql(
pinfo,
@@ -3461,8 +3448,7 @@ dict_stats_drop_index(
"index_name = :index_name;\n"
"END;\n", NULL);
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
if (ret == DB_STATS_DO_NOT_EXIST) {
ret = DB_SUCCESS;
@@ -3510,8 +3496,7 @@ dict_stats_delete_from_table_stats(
pars_info_t* pinfo;
dberr_t ret;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
pinfo = pars_info_create();
@@ -3546,8 +3531,7 @@ dict_stats_delete_from_index_stats(
pars_info_t* pinfo;
dberr_t ret;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
pinfo = pars_info_create();
@@ -3583,8 +3567,7 @@ dict_stats_drop_table(
char table_utf8[MAX_TABLE_UTF8_LEN];
dberr_t ret;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
/* skip tables that do not contain a database name
e.g. if we are dropping SYS_TABLES */
@@ -3659,8 +3642,7 @@ dict_stats_rename_table_in_table_stats(
pars_info_t* pinfo;
dberr_t ret;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
pinfo = pars_info_create();
@@ -3703,8 +3685,7 @@ dict_stats_rename_table_in_index_stats(
pars_info_t* pinfo;
dberr_t ret;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
pinfo = pars_info_create();
@@ -3747,9 +3728,6 @@ dict_stats_rename_table(
char new_table_utf8[MAX_TABLE_UTF8_LEN];
dberr_t ret;
- ut_ad(!rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(!mutex_own(&dict_sys->mutex));
-
/* skip innodb_table_stats and innodb_index_stats themselves */
if (strcmp(old_name, TABLE_STATS_NAME) == 0
|| strcmp(old_name, INDEX_STATS_NAME) == 0
@@ -3765,8 +3743,7 @@ dict_stats_rename_table(
dict_fs2utf8(new_name, new_db_utf8, sizeof(new_db_utf8),
new_table_utf8, sizeof(new_table_utf8));
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
ulint n_attempts = 0;
do {
@@ -3786,11 +3763,9 @@ dict_stats_rename_table(
}
if (ret != DB_SUCCESS) {
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
os_thread_sleep(200000 /* 0.2 sec */);
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
}
} while ((ret == DB_DEADLOCK
|| ret == DB_DUPLICATE_KEY
@@ -3818,8 +3793,7 @@ dict_stats_rename_table(
TABLE_STATS_NAME_PRINT,
new_db_utf8, new_table_utf8,
old_db_utf8, old_table_utf8);
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
return(ret);
}
/* else */
@@ -3842,19 +3816,16 @@ dict_stats_rename_table(
}
if (ret != DB_SUCCESS) {
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
os_thread_sleep(200000 /* 0.2 sec */);
- rw_lock_x_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ dict_sys_lock();
}
} while ((ret == DB_DEADLOCK
|| ret == DB_DUPLICATE_KEY
|| ret == DB_LOCK_WAIT_TIMEOUT)
&& n_attempts < 5);
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
if (ret != DB_SUCCESS) {
snprintf(errstr, errstr_sz,
@@ -3882,6 +3853,60 @@ dict_stats_rename_table(
return(ret);
}
+/*********************************************************************//**
+Renames an index in InnoDB persistent stats storage.
+This function creates its own transaction and commits it.
+@return DB_SUCCESS or error code. DB_STATS_DO_NOT_EXIST will be returned
+if the persistent stats do not exist. */
+dberr_t
+dict_stats_rename_index(
+/*====================*/
+ const dict_table_t* table, /*!< in: table whose index
+ is renamed */
+ const char* old_index_name, /*!< in: old index name */
+ const char* new_index_name) /*!< in: new index name */
+{
+ dict_sys_lock();
+
+ if (!dict_stats_persistent_storage_check(true)) {
+ dict_sys_unlock();
+ return(DB_STATS_DO_NOT_EXIST);
+ }
+
+ char dbname_utf8[MAX_DB_UTF8_LEN];
+ char tablename_utf8[MAX_TABLE_UTF8_LEN];
+
+ dict_fs2utf8(table->name.m_name, dbname_utf8, sizeof(dbname_utf8),
+ tablename_utf8, sizeof(tablename_utf8));
+
+ pars_info_t* pinfo;
+
+ pinfo = pars_info_create();
+
+ pars_info_add_str_literal(pinfo, "dbname_utf8", dbname_utf8);
+ pars_info_add_str_literal(pinfo, "tablename_utf8", tablename_utf8);
+ pars_info_add_str_literal(pinfo, "new_index_name", new_index_name);
+ pars_info_add_str_literal(pinfo, "old_index_name", old_index_name);
+
+ dberr_t ret;
+
+ ret = dict_stats_exec_sql(
+ pinfo,
+ "PROCEDURE RENAME_INDEX_IN_INDEX_STATS () IS\n"
+ "BEGIN\n"
+ "UPDATE \"" INDEX_STATS_NAME "\" SET\n"
+ "index_name = :new_index_name\n"
+ "WHERE\n"
+ "database_name = :dbname_utf8 AND\n"
+ "table_name = :tablename_utf8 AND\n"
+ "index_name = :old_index_name;\n"
+ "END;\n", NULL);
+
+ dict_sys_unlock();
+
+ return(ret);
+}
+
/* tests @{ */
#ifdef UNIV_ENABLE_UNIT_TEST_DICT_STATS
@@ -3927,7 +3952,7 @@ test_dict_table_schema_check()
/* prevent any data dictionary modifications while we are checking
the tables' structure */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* check that a valid table is reported as valid */
schema.n_cols = 7;
@@ -4003,7 +4028,7 @@ test_dict_table_schema_check()
test_dict_table_schema_check_end:
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
/* @} */
diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc
index 4abcf9cb09f..ab7e36d38df 100644
--- a/storage/innobase/dict/dict0stats_bg.cc
+++ b/storage/innobase/dict/dict0stats_bg.cc
@@ -36,12 +36,9 @@ Created Apr 25, 2012 Vasil Dimov
# include "mysql/service_wsrep.h"
# include "wsrep.h"
# include "log.h"
-# include "wsrep_mysqld.h"
-extern uint32 wsrep_sst_disable_writes;
-# define wsrep_sst_disable_writes \
- my_atomic_load32_explicit(&wsrep_sst_disable_writes, MY_MEMORY_ORDER_RELAXED)
+extern Atomic_relaxed<bool> wsrep_sst_disable_writes;
#else
-# define wsrep_sst_disable_writes false
+constexpr bool wsrep_sst_disable_writes= false;
#endif
#include <vector>
@@ -161,7 +158,7 @@ schedule new estimates for table and index statistics to be calculated.
void dict_stats_update_if_needed_func(dict_table_t *table)
#endif
{
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
if (UNIV_UNLIKELY(!table->stat_initialized)) {
/* The table may have been evicted from dict_sys
@@ -201,7 +198,7 @@ void dict_stats_update_if_needed_func(dict_table_t *table)
lock waits to be enqueued at head of waiting
queue. */
if (trx.is_wsrep()
- && !wsrep_thd_is_applier(trx.mysql_thd)
+ && !wsrep_thd_is_applying(trx.mysql_thd)
&& wsrep_thd_is_BF(trx.mysql_thd, 0)) {
WSREP_DEBUG("Avoiding background statistics"
" calculation for table %s.",
@@ -270,7 +267,7 @@ dict_stats_recalc_pool_del(
const dict_table_t* table) /*!< in: table to remove */
{
ut_ad(!srv_read_only_mode);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
mutex_enter(&recalc_pool_mutex);
@@ -298,7 +295,7 @@ and restore the lock before it exits.
The background stats thread is guaranteed not to start using the specified
table after this function returns and before the caller unlocks the data
dictionary because it sets the BG_STAT_IN_PROGRESS bit in table->stats_bg_flag
-under dict_sys->mutex. */
+under dict_sys.mutex. */
void
dict_stats_wait_bg_to_stop_using_table(
/*===================================*/
@@ -329,11 +326,11 @@ dict_stats_thread_init()
any level would do here)
2) from dict_stats_update_if_needed()
and released without latching anything else in between. We know
- that dict_sys->mutex (SYNC_DICT) is not acquired when
+ that dict_sys.mutex (SYNC_DICT) is not acquired when
dict_stats_update_if_needed() is called and it may be acquired
inside that function (thus a level <=SYNC_DICT would do).
- 3) from row_drop_table_for_mysql() after dict_sys->mutex (SYNC_DICT)
- and dict_operation_lock (SYNC_DICT_OPERATION) have been locked
+ 3) from row_drop_table_for_mysql() after dict_sys.mutex (SYNC_DICT)
+ and dict_sys.latch (SYNC_DICT_OPERATION) have been locked
(thus a level <SYNC_DICT && <SYNC_DICT_OPERATION would do)
So we choose SYNC_STATS_AUTO_RECALC to be about below SYNC_DICT. */
@@ -390,14 +387,14 @@ dict_stats_process_entry_from_recalc_pool()
dict_table_t* table;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
table = dict_table_open_on_id(table_id, TRUE, DICT_TABLE_OP_NORMAL);
if (table == NULL) {
/* table does not exist, must have been DROPped
after its id was enqueued */
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return;
}
@@ -405,13 +402,13 @@ dict_stats_process_entry_from_recalc_pool()
if (!fil_table_accessible(table)) {
dict_table_close(table, TRUE, FALSE);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return;
}
table->stats_bg_flag |= BG_STAT_IN_PROGRESS;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
/* time() could be expensive, the current function
is called once every time a table has been changed more than 10% and
@@ -434,13 +431,13 @@ dict_stats_process_entry_from_recalc_pool()
dict_stats_update(table, DICT_STATS_RECALC_PERSISTENT);
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
table->stats_bg_flag = BG_STAT_NONE;
dict_table_close(table, TRUE, FALSE);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
#ifdef UNIV_DEBUG
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index d20ea040e16..49cb8ee6024 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -23,16 +23,16 @@ Created Jonas Oreland Google
Modified Jan Lindström jan.lindstrom@mariadb.com
*******************************************************/
-#include "fil0fil.h"
+#include "fil0crypt.h"
#include "mtr0types.h"
#include "mach0data.h"
-#include "page0size.h"
#include "page0zip.h"
-#ifndef UNIV_INNOCHECKSUM
-#include "fil0crypt.h"
+#include "buf0checksum.h"
+#ifdef UNIV_INNOCHECKSUM
+# include "buf0buf.h"
+#else
#include "srv0srv.h"
#include "srv0start.h"
-#include "log0recv.h"
#include "mtr0mtr.h"
#include "mtr0log.h"
#include "ut0ut.h"
@@ -279,16 +279,14 @@ fil_space_merge_crypt_data(
}
/** Initialize encryption parameters from a tablespace header page.
-@param[in] page_size page size of the tablespace
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] page first page of the tablespace
@return crypt data from page 0
@retval NULL if not present or not valid */
-UNIV_INTERN
-fil_space_crypt_t*
-fil_space_read_crypt_data(const page_size_t& page_size, const byte* page)
+fil_space_crypt_t* fil_space_read_crypt_data(ulint zip_size, const byte* page)
{
const ulint offset = FSP_HEADER_OFFSET
- + fsp_header_get_encryption_offset(page_size);
+ + fsp_header_get_encryption_offset(zip_size);
if (memcmp(page + offset, CRYPT_MAGIC, MAGIC_SZ) != 0) {
/* Crypt data is not stored. */
@@ -367,7 +365,8 @@ fil_space_crypt_t::fill_page0(
{
const uint len = sizeof(iv);
const ulint offset = FSP_HEADER_OFFSET
- + fsp_header_get_encryption_offset(page_size_t(flags));
+ + fsp_header_get_encryption_offset(
+ fil_space_t::zip_size(flags));
page0_offset = offset;
memcpy(page + offset, CRYPT_MAGIC, MAGIC_SZ);
@@ -398,7 +397,7 @@ fil_space_crypt_t::write_page0(
ut_ad(this == space->crypt_data);
const uint len = sizeof(iv);
const ulint offset = FSP_HEADER_OFFSET
- + fsp_header_get_encryption_offset(page_size_t(space->flags));
+ + fsp_header_get_encryption_offset(space->zip_size());
page0_offset = offset;
/*
@@ -539,29 +538,27 @@ fil_parse_write_crypt_data(
return ptr;
}
-/** Encrypt a buffer.
-@param[in,out] crypt_data Crypt data
-@param[in] space space_id
-@param[in] offset Page offset
-@param[in] lsn Log sequence number
-@param[in] src_frame Page to encrypt
-@param[in] page_size Page size
-@param[in,out] dst_frame Output buffer
+/** Encrypt a buffer for non full checksum.
+@param[in,out] crypt_data Crypt data
+@param[in] space space_id
+@param[in] offset Page offset
+@param[in] lsn Log sequence number
+@param[in] src_frame Page to encrypt
+@param[in] zip_size ROW_FORMAT=COMPRESSED
+ page size, or 0
+@param[in,out] dst_frame Output buffer
@return encrypted buffer or NULL */
-UNIV_INTERN
-byte*
-fil_encrypt_buf(
+static byte* fil_encrypt_buf_for_non_full_checksum(
fil_space_crypt_t* crypt_data,
ulint space,
ulint offset,
lsn_t lsn,
const byte* src_frame,
- const page_size_t& page_size,
+ ulint zip_size,
byte* dst_frame)
{
- uint size = uint(page_size.physical());
+ uint size = uint(zip_size ? zip_size : srv_page_size);
uint key_version = fil_crypt_get_latest_key_version(crypt_data);
-
ut_a(key_version != ENCRYPTION_KEY_VERSION_INVALID);
ulint orig_page_type = mach_read_from_2(src_frame+FIL_PAGE_TYPE);
@@ -569,21 +566,21 @@ fil_encrypt_buf(
uint header_len = FIL_PAGE_DATA;
if (page_compressed) {
- header_len += (FIL_PAGE_COMPRESSED_SIZE + FIL_PAGE_COMPRESSION_METHOD_SIZE);
+ header_len += FIL_PAGE_ENCRYPT_COMP_METADATA_LEN;
}
/* FIL page header is not encrypted */
memcpy(dst_frame, src_frame, header_len);
-
- /* Store key version */
- mach_write_to_4(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, key_version);
+ mach_write_to_4(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
+ key_version);
/* Calculate the start offset in a page */
- uint unencrypted_bytes = header_len + FIL_PAGE_DATA_END;
- uint srclen = size - unencrypted_bytes;
- const byte* src = src_frame + header_len;
- byte* dst = dst_frame + header_len;
- uint32 dstlen = 0;
+ uint unencrypted_bytes = header_len + FIL_PAGE_DATA_END;
+ uint srclen = size - unencrypted_bytes;
+ const byte* src = src_frame + header_len;
+ byte* dst = dst_frame + header_len;
+ uint32 dstlen = 0;
+ ib_uint32_t checksum = 0;
if (page_compressed) {
srclen = mach_read_from_2(src_frame + FIL_PAGE_DATA);
@@ -601,30 +598,137 @@ fil_encrypt_buf(
to sector boundary is written. */
if (!page_compressed) {
/* FIL page trailer is also not encrypted */
- memcpy(dst_frame + page_size.physical() - FIL_PAGE_DATA_END,
- src_frame + page_size.physical() - FIL_PAGE_DATA_END,
+ memcpy(dst_frame + size - FIL_PAGE_DATA_END,
+ src_frame + size - FIL_PAGE_DATA_END,
FIL_PAGE_DATA_END);
} else {
/* Clean up rest of buffer */
memset(dst_frame+header_len+srclen, 0,
- page_size.physical() - (header_len + srclen));
+ size - (header_len + srclen));
}
- /* handle post encryption checksum */
- ib_uint32_t checksum = 0;
+ checksum = fil_crypt_calculate_checksum(zip_size, dst_frame);
- checksum = fil_crypt_calculate_checksum(page_size, dst_frame);
+ /* store the post-encryption checksum after the key-version */
+ mach_write_to_4(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 4,
+ checksum);
- // store the post-encryption checksum after the key-version
- mach_write_to_4(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 4, checksum);
+ ut_ad(fil_space_verify_crypt_checksum(dst_frame, zip_size));
- ut_ad(fil_space_verify_crypt_checksum(dst_frame, page_size));
+ srv_stats.pages_encrypted.inc();
+
+ return dst_frame;
+}
+
+/** Encrypt a buffer for full checksum format.
+@param[in,out] crypt_data Crypt data
+@param[in] space space_id
+@param[in] offset Page offset
+@param[in] lsn Log sequence number
+@param[in] src_frame Page to encrypt
+@param[in,out] dst_frame Output buffer
+@return encrypted buffer or NULL */
+static byte* fil_encrypt_buf_for_full_crc32(
+ fil_space_crypt_t* crypt_data,
+ ulint space,
+ ulint offset,
+ lsn_t lsn,
+ const byte* src_frame,
+ byte* dst_frame)
+{
+ uint key_version = fil_crypt_get_latest_key_version(crypt_data);
+ ut_d(bool corrupted = false);
+ const uint size = buf_page_full_crc32_size(src_frame, NULL,
+#ifdef UNIV_DEBUG
+ &corrupted
+#else
+ NULL
+#endif
+ );
+ ut_ad(!corrupted);
+ uint srclen = size - (FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+ + FIL_PAGE_FCRC32_CHECKSUM);
+ const byte* src = src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION;
+ byte* dst = dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION;
+ uint dstlen = 0;
+
+ ut_a(key_version != ENCRYPTION_KEY_VERSION_INVALID);
+
+ /* Till FIL_PAGE_LSN, page is not encrypted */
+ memcpy(dst_frame, src_frame, FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+
+ /* Write key version to the page. */
+ mach_write_to_4(dst_frame + FIL_PAGE_FCRC32_KEY_VERSION, key_version);
+
+ int rc = encryption_scheme_encrypt(src, srclen, dst, &dstlen,
+ crypt_data, key_version,
+ uint(space), uint(offset), lsn);
+ ut_a(rc == MY_AES_OK);
+ ut_a(dstlen == srclen);
+
+ const ulint payload = size - FIL_PAGE_FCRC32_CHECKSUM;
+ mach_write_to_4(dst_frame + payload, ut_crc32(dst_frame, payload));
+ /* Clean the rest of the buffer. FIXME: Punch holes when writing! */
+ memset(dst_frame + (payload + 4), 0, srv_page_size - (payload + 4));
srv_stats.pages_encrypted.inc();
return dst_frame;
}
+/** Encrypt a buffer.
+@param[in,out] crypt_data Crypt data
+@param[in] space space_id
+@param[in] offset Page offset
+@param[in] lsn Log sequence number
+@param[in] src_frame Page to encrypt
+@param[in] zip_size ROW_FORMAT=COMPRESSED
+ page size, or 0
+@param[in,out] dst_frame Output buffer
+@param[in] use_full_checksum full crc32 algo is used
+@return encrypted buffer or NULL */
+UNIV_INTERN
+byte*
+fil_encrypt_buf(
+ fil_space_crypt_t* crypt_data,
+ ulint space,
+ ulint offset,
+ lsn_t lsn,
+ const byte* src_frame,
+ ulint zip_size,
+ byte* dst_frame,
+ bool use_full_checksum)
+{
+ if (use_full_checksum) {
+ return fil_encrypt_buf_for_full_crc32(
+ crypt_data, space, offset,
+ lsn, src_frame, dst_frame);
+ }
+
+ return fil_encrypt_buf_for_non_full_checksum(
+ crypt_data, space, offset, lsn,
+ src_frame, zip_size, dst_frame);
+}
+
+/** Check whether these page types are allowed to encrypt.
+@param[in] space tablespace object
+@param[in] src_frame source page
+@return true if it is valid page type */
+static bool fil_space_encrypt_valid_page_type(
+ const fil_space_t* space,
+ byte* src_frame)
+{
+ switch (mach_read_from_2(src_frame+FIL_PAGE_TYPE)) {
+ case FIL_PAGE_RTREE:
+ return space->full_crc32();
+ case FIL_PAGE_TYPE_FSP_HDR:
+ case FIL_PAGE_TYPE_XDES:
+ return false;
+ }
+
+ return true;
+}
+
/******************************************************************
Encrypt a page
@@ -643,12 +747,7 @@ fil_space_encrypt(
byte* src_frame,
byte* dst_frame)
{
- switch (mach_read_from_2(src_frame+FIL_PAGE_TYPE)) {
- case FIL_PAGE_TYPE_FSP_HDR:
- case FIL_PAGE_TYPE_XDES:
- case FIL_PAGE_RTREE:
- /* File space header, extent descriptor or spatial index
- are not encrypted. */
+ if (!fil_space_encrypt_valid_page_type(space, src_frame)) {
return src_frame;
}
@@ -657,30 +756,95 @@ fil_space_encrypt(
}
ut_ad(space->pending_io());
+
return fil_encrypt_buf(space->crypt_data, space->id, offset, lsn,
- src_frame, page_size_t(space->flags),
- dst_frame);
+ src_frame, space->zip_size(),
+ dst_frame, space->full_crc32());
}
-/** Decrypt a page.
+/** Decrypt a page for full checksum format.
+@param[in] space space id
@param[in] crypt_data crypt_data
@param[in] tmp_frame Temporary buffer
-@param[in] page_size Page size
@param[in,out] src_frame Page to decrypt
@return DB_SUCCESS or error */
-UNIV_INTERN
-dberr_t
-fil_space_decrypt(
+static dberr_t fil_space_decrypt_full_crc32(
+ ulint space,
fil_space_crypt_t* crypt_data,
byte* tmp_frame,
- const page_size_t& page_size,
+ byte* src_frame)
+{
+ uint key_version = mach_read_from_4(
+ src_frame + FIL_PAGE_FCRC32_KEY_VERSION);
+ lsn_t lsn = mach_read_from_8(src_frame + FIL_PAGE_LSN);
+ uint offset = mach_read_from_4(src_frame + FIL_PAGE_OFFSET);
+
+ ut_a(key_version != ENCRYPTION_KEY_NOT_ENCRYPTED);
+
+ ut_ad(crypt_data);
+ ut_ad(crypt_data->is_encrypted());
+
+ memcpy(tmp_frame, src_frame, FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+
+ /* Calculate the offset where decryption starts */
+ const byte* src = src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION;
+ byte* dst = tmp_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION;
+ uint dstlen = 0;
+ bool corrupted = false;
+ uint size = buf_page_full_crc32_size(src_frame, NULL, &corrupted);
+ if (UNIV_UNLIKELY(corrupted)) {
+ return DB_DECRYPTION_FAILED;
+ }
+
+ uint srclen = size - (FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+ + FIL_PAGE_FCRC32_CHECKSUM);
+
+ int rc = encryption_scheme_decrypt(src, srclen, dst, &dstlen,
+ crypt_data, key_version,
+ (uint) space, offset, lsn);
+
+ if (rc != MY_AES_OK || dstlen != srclen) {
+ if (rc == -1) {
+ return DB_DECRYPTION_FAILED;
+ }
+
+ ib::fatal() << "Unable to decrypt data-block "
+ << " src: " << src << "srclen: "
+ << srclen << " buf: " << dst << "buflen: "
+ << dstlen << " return-code: " << rc
+ << " Can't continue!";
+ }
+
+ /* Copy only checksum part in the trailer */
+ memcpy(tmp_frame + srv_page_size - FIL_PAGE_FCRC32_CHECKSUM,
+ src_frame + srv_page_size - FIL_PAGE_FCRC32_CHECKSUM,
+ FIL_PAGE_FCRC32_CHECKSUM);
+
+ srv_stats.pages_decrypted.inc();
+
+ return DB_SUCCESS; /* page was decrypted */
+}
+
+/** Decrypt a page for non full checksum format.
+@param[in] crypt_data crypt_data
+@param[in] tmp_frame Temporary buffer
+@param[in] physical_size page size
+@param[in,out] src_frame Page to decrypt
+@return DB_SUCCESS or error */
+static dberr_t fil_space_decrypt_for_non_full_checksum(
+ fil_space_crypt_t* crypt_data,
+ byte* tmp_frame,
+ ulint physical_size,
byte* src_frame)
{
ulint page_type = mach_read_from_2(src_frame+FIL_PAGE_TYPE);
- uint key_version = mach_read_from_4(src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
- bool page_compressed = (page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
+ uint key_version = mach_read_from_4(
+ src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+ bool page_compressed = (page_type
+ == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
uint offset = mach_read_from_4(src_frame + FIL_PAGE_OFFSET);
- uint space = mach_read_from_4(src_frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+ uint space = mach_read_from_4(
+ src_frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
ib_uint64_t lsn = mach_read_from_8(src_frame + FIL_PAGE_LSN);
ut_a(key_version != ENCRYPTION_KEY_NOT_ENCRYPTED);
@@ -690,7 +854,7 @@ fil_space_decrypt(
uint header_len = FIL_PAGE_DATA;
if (page_compressed) {
- header_len += (FIL_PAGE_COMPRESSED_SIZE + FIL_PAGE_COMPRESSION_METHOD_SIZE);
+ header_len += FIL_PAGE_ENCRYPT_COMP_METADATA_LEN;
}
/* Copy FIL page header, it is not encrypted */
@@ -700,8 +864,7 @@ fil_space_decrypt(
const byte* src = src_frame + header_len;
byte* dst = tmp_frame + header_len;
uint32 dstlen = 0;
- uint srclen = uint(page_size.physical())
- - header_len - FIL_PAGE_DATA_END;
+ uint srclen = uint(physical_size) - header_len - FIL_PAGE_DATA_END;
if (page_compressed) {
srclen = mach_read_from_2(src_frame + FIL_PAGE_DATA);
@@ -732,8 +895,8 @@ fil_space_decrypt(
to sector boundary is written. */
if (!page_compressed) {
/* Copy FIL trailer */
- memcpy(tmp_frame + page_size.physical() - FIL_PAGE_DATA_END,
- src_frame + page_size.physical() - FIL_PAGE_DATA_END,
+ memcpy(tmp_frame + physical_size - FIL_PAGE_DATA_END,
+ src_frame + physical_size - FIL_PAGE_DATA_END,
FIL_PAGE_DATA_END);
}
@@ -742,6 +905,35 @@ fil_space_decrypt(
return DB_SUCCESS; /* page was decrypted */
}
+/** Decrypt a page.
+@param[in] space_id tablespace id
+@param[in] crypt_data crypt_data
+@param[in] tmp_frame Temporary buffer
+@param[in] physical_size page size
+@param[in] fsp_flags Tablespace flags
+@param[in,out] src_frame Page to decrypt
+@param[out] err DB_SUCCESS or DB_DECRYPTION_FAILED
+@return DB_SUCCESS or error */
+UNIV_INTERN
+dberr_t
+fil_space_decrypt(
+ ulint space_id,
+ fil_space_crypt_t* crypt_data,
+ byte* tmp_frame,
+ ulint physical_size,
+ ulint fsp_flags,
+ byte* src_frame)
+{
+ if (fil_space_t::full_crc32(fsp_flags)) {
+ return fil_space_decrypt_full_crc32(
+ space_id, crypt_data, tmp_frame, src_frame);
+ }
+
+ return fil_space_decrypt_for_non_full_checksum(crypt_data, tmp_frame,
+ physical_size,
+ src_frame);
+}
+
/**
Decrypt a page.
@param[in] space Tablespace
@@ -756,38 +948,36 @@ fil_space_decrypt(
byte* tmp_frame,
byte* src_frame)
{
- const page_size_t page_size(space->flags);
+ const ulint physical_size = space->physical_size();
ut_ad(space->crypt_data != NULL && space->crypt_data->is_encrypted());
ut_ad(space->pending_io());
- if (DB_SUCCESS != fil_space_decrypt(space->crypt_data, tmp_frame,
- page_size, src_frame)) {
- return NULL;
+ if (DB_SUCCESS != fil_space_decrypt(space->id, space->crypt_data,
+ tmp_frame, physical_size,
+ space->flags, src_frame)) {
+ return nullptr;
}
/* Copy the decrypted page back to page buffer, not
really any other options. */
- memcpy(src_frame, tmp_frame, page_size.physical());
+ memcpy(src_frame, tmp_frame, physical_size);
return src_frame;
}
-/******************************************************************
+/**
Calculate post encryption checksum
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] dst_frame Block where checksum is calculated
@return page checksum
not needed. */
-UNIV_INTERN
uint32_t
-fil_crypt_calculate_checksum(
- const page_size_t& page_size,
- const byte* dst_frame)
+fil_crypt_calculate_checksum(ulint zip_size, const byte* dst_frame)
{
/* For encrypted tables we use only crc32 and strict_crc32 */
- return page_size.is_compressed()
- ? page_zip_calc_checksum(dst_frame, page_size.physical(),
+ return zip_size
+ ? page_zip_calc_checksum(dst_frame, zip_size,
SRV_CHECKSUM_ALGORITHM_CRC32)
: buf_calc_page_crc32(dst_frame);
}
@@ -899,15 +1089,15 @@ fil_crypt_read_crypt_data(fil_space_t* space)
return;
}
- const page_size_t page_size(space->flags);
+ const ulint zip_size = space->zip_size();
mtr_t mtr;
mtr.start();
if (buf_block_t* block = buf_page_get(page_id_t(space->id, 0),
- page_size, RW_S_LATCH, &mtr)) {
+ zip_size, RW_S_LATCH, &mtr)) {
mutex_enter(&fil_system.mutex);
if (!space->crypt_data) {
space->crypt_data = fil_space_read_crypt_data(
- page_size, block->frame);
+ zip_size, block->frame);
}
mutex_exit(&fil_system.mutex);
}
@@ -978,7 +1168,7 @@ static bool fil_crypt_start_encrypting_space(fil_space_t* space)
/* 2 - get page 0 */
dberr_t err = DB_SUCCESS;
buf_block_t* block = buf_page_get_gen(
- page_id_t(space->id, 0), page_size_t(space->flags),
+ page_id_t(space->id, 0), space->zip_size(),
RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__,
&mtr, &err);
@@ -1704,7 +1894,7 @@ fil_crypt_get_page_throttle_func(
unsigned line)
{
fil_space_t* space = state->space;
- const page_size_t page_size = page_size_t(space->flags);
+ const ulint zip_size = space->zip_size();
const page_id_t page_id(space->id, offset);
ut_ad(space->referenced());
@@ -1715,7 +1905,7 @@ fil_crypt_get_page_throttle_func(
}
dberr_t err = DB_SUCCESS;
- buf_block_t* block = buf_page_get_gen(page_id, page_size, RW_X_LATCH,
+ buf_block_t* block = buf_page_get_gen(page_id, zip_size, RW_X_LATCH,
NULL,
BUF_PEEK_IF_IN_POOL, file, line,
mtr, &err);
@@ -1732,7 +1922,7 @@ fil_crypt_get_page_throttle_func(
state->crypt_stat.pages_read_from_disk++;
const ulonglong start = my_interval_timer();
- block = buf_page_get_gen(page_id, page_size,
+ block = buf_page_get_gen(page_id, zip_size,
RW_X_LATCH,
NULL, BUF_GET_POSSIBLY_FREED,
file, line, mtr, &err);
@@ -1865,7 +2055,7 @@ fil_crypt_rotate_page(
int needs_scrubbing = BTR_SCRUB_SKIP_PAGE;
lsn_t block_lsn = block->page.newest_modification;
byte* frame = buf_block_get_frame(block);
- uint kv = mach_read_from_4(frame+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+ uint kv = buf_page_get_key_version(frame, space->flags);
if (space->is_stopping()) {
/* The tablespace is closing (in DROP TABLE or
@@ -2109,7 +2299,7 @@ fil_crypt_flush_space(
dberr_t err;
if (buf_block_t* block = buf_page_get_gen(
- page_id_t(space->id, 0), page_size_t(space->flags),
+ page_id_t(space->id, 0), space->zip_size(),
RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, &mtr, &err)) {
mtr.set_named_space(space);
@@ -2688,12 +2878,14 @@ calculated checksum as if it does page could be valid unencrypted,
encrypted, or corrupted.
@param[in,out] page page frame (checksum is temporarily modified)
-@param[in] page_size page size
-@return whether the encrypted page is OK */
-bool
-fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@return true if page is encrypted AND OK, false otherwise */
+bool fil_space_verify_crypt_checksum(const byte* page, ulint zip_size)
{
- ut_ad(mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION));
+ if (ENCRYPTION_KEY_NOT_ENCRYPTED == mach_read_from_4(
+ page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION)) {
+ return false;
+ }
/* Compressed and encrypted pages do not have checksum. Assume not
corrupted. Page verification happens after decompression in
@@ -2711,24 +2903,14 @@ fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
page is not corrupted. */
switch (srv_checksum_algorithm_t(srv_checksum_algorithm)) {
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
- if (page_size.is_compressed()) {
+ if (zip_size) {
return checksum == page_zip_calc_checksum(
- page, page_size.physical(),
- SRV_CHECKSUM_ALGORITHM_CRC32)
-#ifdef INNODB_BUG_ENDIAN_CRC32
- || checksum == page_zip_calc_checksum(
- page, page_size.physical(),
- SRV_CHECKSUM_ALGORITHM_CRC32, true)
-#endif
- ;
+ page, zip_size, SRV_CHECKSUM_ALGORITHM_CRC32);
}
- return checksum == buf_calc_page_crc32(page)
-#ifdef INNODB_BUG_ENDIAN_CRC32
- || checksum == buf_calc_page_crc32(page, true)
-#endif
- ;
+ return checksum == buf_calc_page_crc32(page);
case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
/* Starting with MariaDB 10.1.25, 10.2.7, 10.3.1,
due to MDEV-12114, fil_crypt_calculate_checksum()
@@ -2743,27 +2925,20 @@ fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
Due to this, we must treat "strict_innodb" as "innodb". */
case SRV_CHECKSUM_ALGORITHM_INNODB:
case SRV_CHECKSUM_ALGORITHM_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
if (checksum == BUF_NO_CHECKSUM_MAGIC) {
return true;
}
- if (page_size.is_compressed()) {
+ if (zip_size) {
return checksum == page_zip_calc_checksum(
- page, page_size.physical(),
+ page, zip_size,
SRV_CHECKSUM_ALGORITHM_CRC32)
-#ifdef INNODB_BUG_ENDIAN_CRC32
- || checksum == page_zip_calc_checksum(
- page, page_size.physical(),
- SRV_CHECKSUM_ALGORITHM_CRC32, true)
-#endif
|| checksum == page_zip_calc_checksum(
- page, page_size.physical(),
+ page, zip_size,
SRV_CHECKSUM_ALGORITHM_INNODB);
}
return checksum == buf_calc_page_crc32(page)
-#ifdef INNODB_BUG_ENDIAN_CRC32
- || checksum == buf_calc_page_crc32(page, true)
-#endif
|| checksum == buf_calc_page_new_checksum(page);
}
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 5d9f80eda70..7a6a3656abb 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -42,7 +42,6 @@ Created 10/25/1995 Heikki Tuuri
#include "os0file.h"
#include "page0zip.h"
#include "row0mysql.h"
-#include "row0trunc.h"
#include "srv0start.h"
#include "trx0purge.h"
#include "buf0lru.h"
@@ -51,6 +50,11 @@ Created 10/25/1995 Heikki Tuuri
#include "sync0sync.h"
#include "buf0flu.h"
#include "os0api.h"
+#ifdef UNIV_LINUX
+# include <sys/types.h>
+# include <sys/sysmacros.h>
+# include <dirent.h>
+#endif
/** Tries to close a file in the LRU list. The caller must hold the fil_sys
mutex.
@@ -166,9 +170,6 @@ ulint fil_n_pending_log_flushes = 0;
/** Number of pending tablespace flushes */
ulint fil_n_pending_tablespace_flushes = 0;
-/** The null file address */
-const fil_addr_t fil_addr_null = {FIL_NULL, 0};
-
/** The tablespace memory cache. This variable is NULL before the module is
initialized. */
fil_system_t fil_system;
@@ -208,19 +209,11 @@ fil_validate_skip(void)
/*===================*/
{
/** The fil_validate() call skip counter. */
- static int fil_validate_count = FIL_VALIDATE_SKIP;
+ static Atomic_counter<uint32_t> fil_validate_count;
/* We want to reduce the call frequency of the costly fil_validate()
check in debug builds. */
- int count = my_atomic_add32_explicit(&fil_validate_count, -1,
- MY_MEMORY_ORDER_RELAXED);
- if (count > 0) {
- return(true);
- }
-
- my_atomic_store32_explicit(&fil_validate_count, FIL_VALIDATE_SKIP,
- MY_MEMORY_ORDER_RELAXED);
- return(fil_validate());
+ return (fil_validate_count++ % FIL_VALIDATE_SKIP) || fil_validate();
}
#endif /* UNIV_DEBUG */
@@ -273,7 +266,7 @@ fil_node_complete_io(fil_node_t* node, const IORequest& type);
blocks at the end of file are ignored: they are not taken into account when
calculating the byte offset within a space.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] byte_offset remainder of offset in bytes; in aio this
must be divisible by the OS block size
@param[in] len how many bytes to read; this must not cross a
@@ -286,12 +279,12 @@ UNIV_INLINE
dberr_t
fil_read(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint byte_offset,
ulint len,
void* buf)
{
- return(fil_io(IORequestRead, true, page_id, page_size,
+ return(fil_io(IORequestRead, true, page_id, zip_size,
byte_offset, len, buf, NULL));
}
@@ -299,7 +292,7 @@ fil_read(
blocks at the end of file are ignored: they are not taken into account when
calculating the byte offset within a space.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] byte_offset remainder of offset in bytes; in aio this
must be divisible by the OS block size
@param[in] len how many bytes to write; this must not cross
@@ -312,14 +305,14 @@ UNIV_INLINE
dberr_t
fil_write(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint byte_offset,
ulint len,
void* buf)
{
ut_ad(!srv_read_only_mode);
- return(fil_io(IORequestWrite, true, page_id, page_size,
+ return(fil_io(IORequestWrite, true, page_id, zip_size,
byte_offset, len, buf, NULL));
}
@@ -365,20 +358,6 @@ fil_space_get(
return(space);
}
-/** Note that the tablespace has been imported.
-Initially, purpose=FIL_TYPE_IMPORT so that no redo log is
-written while the space ID is being updated in each page. */
-void fil_space_t::set_imported()
-{
- ut_ad(purpose == FIL_TYPE_IMPORT);
- const fil_node_t* node = UT_LIST_GET_FIRST(chain);
- atomic_write_supported = node->atomic_write
- && srv_use_atomic_writes
- && my_test_if_atomic_write(node->handle,
- int(page_size_t(flags).physical()));
- purpose = FIL_TYPE_TABLESPACE;
-}
-
/**********************************************************************//**
Checks if all the file nodes in a space are flushed.
@return true if all are flushed */
@@ -404,6 +383,42 @@ fil_space_is_flushed(
return(true);
}
+/** Validate the compression algorithm for full crc32 format.
+@param[in] space tablespace object
+@return whether the compression algorithm support */
+static bool fil_comp_algo_validate(const fil_space_t* space)
+{
+ if (!space->full_crc32()) {
+ return true;
+ }
+
+ DBUG_EXECUTE_IF("fil_comp_algo_validate_fail",
+ return false;);
+
+ ulint comp_algo = space->get_compression_algo();
+ switch (comp_algo) {
+ case PAGE_UNCOMPRESSED:
+ case PAGE_ZLIB_ALGORITHM:
+#ifdef HAVE_LZ4
+ case PAGE_LZ4_ALGORITHM:
+#endif /* HAVE_LZ4 */
+#ifdef HAVE_LZO
+ case PAGE_LZO_ALGORITHM:
+#endif /* HAVE_LZO */
+#ifdef HAVE_LZMA
+ case PAGE_LZMA_ALGORITHM:
+#endif /* HAVE_LZMA */
+#ifdef HAVE_BZIP2
+ case PAGE_BZIP2_ALGORITHM:
+#endif /* HAVE_BZIP2 */
+#ifdef HAVE_SNAPPY
+ case PAGE_SNAPPY_ALGORITHM:
+#endif /* HAVE_SNAPPY */
+ return true;
+ }
+
+ return false;
+}
/** Append a file to the chain of files of a space.
@param[in] name file name of a file that is not open
@@ -455,111 +470,6 @@ fil_node_t* fil_space_t::add(const char* name, pfs_os_file_t handle,
return node;
}
-/** Read the first page of a data file.
-@param[in] first whether this is the very first read
-@return whether the page was found valid */
-bool fil_node_t::read_page0(bool first)
-{
- ut_ad(mutex_own(&fil_system.mutex));
- ut_a(space->purpose != FIL_TYPE_LOG);
- const page_size_t page_size(space->flags);
- const ulint psize = page_size.physical();
-
- os_offset_t size_bytes = os_file_get_size(handle);
- ut_a(size_bytes != (os_offset_t) -1);
- const ulint min_size = FIL_IBD_FILE_INITIAL_SIZE * psize;
-
- if (size_bytes < min_size) {
- ib::error() << "The size of the file " << name
- << " is only " << size_bytes
- << " bytes, should be at least " << min_size;
- return false;
- }
-
- byte* buf2 = static_cast<byte*>(ut_malloc_nokey(2 * psize));
-
- /* Align the memory for file i/o if we might have O_DIRECT set */
- byte* page = static_cast<byte*>(ut_align(buf2, psize));
- IORequest request(IORequest::READ);
- if (os_file_read(request, handle, page, 0, psize) != DB_SUCCESS) {
- ib::error() << "Unable to read first page of file " << name;
- ut_free(buf2);
- return false;
- }
- srv_stats.page0_read.add(1);
- const ulint space_id = fsp_header_get_space_id(page);
- ulint flags = fsp_header_get_flags(page);
- const ulint size = fsp_header_get_field(page, FSP_SIZE);
- const ulint free_limit = fsp_header_get_field(page, FSP_FREE_LIMIT);
- const ulint free_len = flst_get_len(FSP_HEADER_OFFSET + FSP_FREE
- + page);
- /* Try to read crypt_data from page 0 if it is not yet read. */
- if (!space->crypt_data) {
- space->crypt_data = fil_space_read_crypt_data(page_size, page);
- }
- ut_free(buf2);
-
- if (!fsp_flags_is_valid(flags, space->id)) {
- ulint cflags = fsp_flags_convert_from_101(flags);
- if (cflags == ULINT_UNDEFINED
- || (cflags ^ space->flags) & ~FSP_FLAGS_MEM_MASK) {
- ib::error()
- << "Expected tablespace flags "
- << ib::hex(space->flags)
- << " but found " << ib::hex(flags)
- << " in the file " << name;
- return false;
- }
-
- flags = cflags;
- }
-
- if (UNIV_UNLIKELY(space_id != space->id)) {
- ib::error() << "Expected tablespace id " << space->id
- << " but found " << space_id
- << " in the file " << name;
- return false;
- }
-
- if (first) {
- ut_ad(space->id != TRX_SYS_SPACE);
-
- /* Truncate the size to a multiple of extent size. */
- ulint mask = psize * FSP_EXTENT_SIZE - 1;
-
- if (size_bytes <= mask) {
- /* .ibd files start smaller than an
- extent size. Do not truncate valid data. */
- } else {
- size_bytes &= ~os_offset_t(mask);
- }
-
- this->size = ulint(size_bytes / psize);
- space->committed_size = space->size += this->size;
-
- if (block_size == 0) {
- block_size = os_file_get_block_size(handle, name);
- }
- } else if (space->id != TRX_SYS_SPACE || space->size_in_header) {
- /* If this is not the first-time open, do nothing.
- For the system tablespace, we always get invoked as
- first=false, so we detect the true first-time-open based
- on size_in_header and proceed to initialize the data. */
- return true;
- } else {
- /* Initialize the size of predefined tablespaces
- to FSP_SIZE. */
- space->committed_size = size;
- }
-
- ut_ad(space->free_limit == 0 || space->free_limit == free_limit);
- ut_ad(space->free_len == 0 || space->free_len == free_len);
- space->size_in_header = size;
- space->free_limit = free_limit;
- space->free_len = free_len;
- return true;
-}
-
/** Open a file node of a tablespace.
@param[in,out] node File node
@return false if the file can't be opened, otherwise true */
@@ -579,7 +489,8 @@ static bool fil_node_open_file(fil_node_t* node)
const bool first_time_open = node->size == 0;
ulint type;
- compile_time_assert(((UNIV_ZIP_SIZE_MIN >> 1) << 3) == 4096);
+ static_assert(((UNIV_ZIP_SIZE_MIN >> 1) << 3) == 4096,
+ "compatibility");
switch (FSP_FLAGS_GET_ZIP_SSIZE(space->flags)) {
case 1:
case 2:
@@ -592,8 +503,7 @@ static bool fil_node_open_file(fil_node_t* node)
if (first_time_open
|| (space->purpose == FIL_TYPE_TABLESPACE
&& node == UT_LIST_GET_FIRST(space->chain)
- && srv_startup_is_before_trx_rollback_phase
- && !undo::Truncate::was_tablespace_truncated(space->id))) {
+ && srv_startup_is_before_trx_rollback_phase)) {
/* We do not know the size of the file yet. */
retry:
node->handle = os_file_create(
@@ -621,10 +531,16 @@ retry:
}
if (!node->read_page0(first_time_open)) {
+fail:
os_file_close(node->handle);
node->handle = OS_FILE_CLOSED;
return false;
}
+
+ if (first_time_open && !fil_comp_algo_validate(space)) {
+ goto fail;
+ }
+
} else if (space->purpose == FIL_TYPE_LOG) {
node->handle = os_file_create(
innodb_log_file_key, node->name, OS_FILE_OPEN,
@@ -641,30 +557,6 @@ retry:
&success);
}
- if (space->purpose != FIL_TYPE_LOG) {
- /*
- For the temporary tablespace and during the
- non-redo-logged adjustments in
- IMPORT TABLESPACE, we do not care about
- the atomicity of writes.
-
- Atomic writes is supported if the file can be used
- with atomic_writes (not log file), O_DIRECT is
- used (tested in ha_innodb.cc) and the file is
- device and file system that supports atomic writes
- for the given block size
- */
- space->atomic_write_supported
- = space->purpose == FIL_TYPE_TEMPORARY
- || space->purpose == FIL_TYPE_IMPORT
- || (node->atomic_write
- && srv_use_atomic_writes
- && my_test_if_atomic_write(
- node->handle,
- int(page_size_t(space->flags)
- .physical())));
- }
-
ut_a(success);
ut_a(node->is_open());
@@ -927,14 +819,7 @@ fil_space_extend_must_retry(
ulint last_page_no = space->size;
const ulint file_start_page_no = last_page_no - node->size;
- /* Determine correct file block size */
- if (node->block_size == 0) {
- node->block_size = os_file_get_block_size(
- node->handle, node->name);
- }
-
- const page_size_t pageSize(space->flags);
- const ulint page_size = pageSize.physical();
+ const ulint page_size = space->physical_size();
/* fil_read_first_page() expects innodb_page_size bytes.
fil_node_open_file() expects at least 4 * innodb_page_size bytes.
@@ -948,7 +833,7 @@ fil_space_extend_must_retry(
os_offset_t(FIL_IBD_FILE_INITIAL_SIZE << srv_page_size_shift));
*success = os_file_set_size(node->name, node->handle, new_size,
- FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags));
+ space->is_compressed());
os_has_said_disk_full = *success;
if (*success) {
@@ -999,7 +884,6 @@ fil_space_extend_must_retry(
srv_tmp_space.set_last_file_size(pages_in_MiB);
return(false);
}
-
}
/** Reserves the fil_system.mutex and tries to make sure we can open at least one
@@ -1329,7 +1213,7 @@ fil_space_create(
fil_space_t* space;
ut_ad(fil_system.is_initialised());
- ut_ad(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK, id));
+ ut_ad(fil_space_t::is_valid_flags(flags & ~FSP_FLAGS_MEM_MASK, id));
ut_ad(purpose == FIL_TYPE_LOG
|| srv_page_size == UNIV_PAGE_SIZE_ORIG || flags != 0);
@@ -1552,22 +1436,18 @@ fil_space_get_space(
return(space);
}
-/** Set the recovered size of a tablespace in pages.
-@param id tablespace ID
-@param size recovered size in pages */
UNIV_INTERN
-void
-fil_space_set_recv_size(ulint id, ulint size)
+void fil_space_set_recv_size_and_flags(ulint id, ulint size, uint32_t flags)
{
- mutex_enter(&fil_system.mutex);
- ut_ad(size);
- ut_ad(id < SRV_LOG_SPACE_FIRST_ID);
-
- if (fil_space_t* space = fil_space_get_space(id)) {
- space->recv_size = size;
- }
-
- mutex_exit(&fil_system.mutex);
+ mutex_enter(&fil_system.mutex);
+ ut_ad(id < SRV_LOG_SPACE_FIRST_ID);
+
+ if (fil_space_t* space= fil_space_get_space(id))
+ {
+ if (size) space->recv_size= size;
+ if (flags != FSP_FLAGS_FCRC32_MASK_MARKER) space->flags= flags;
+ }
+ mutex_exit(&fil_system.mutex);
}
/*******************************************************************//**
@@ -1674,28 +1554,6 @@ void fil_space_t::close()
mutex_exit(&fil_system.mutex);
}
-/** Returns the page size of the space and whether it is compressed or not.
-The tablespace must be cached in the memory cache.
-@param[in] id space id
-@param[out] found true if tablespace was found
-@return page size */
-const page_size_t
-fil_space_get_page_size(
- ulint id,
- bool* found)
-{
- const ulint flags = fil_space_get_flags(id);
-
- if (flags == ULINT_UNDEFINED) {
- *found = false;
- return(univ_page_size);
- }
-
- *found = true;
-
- return(page_size_t(flags));
-}
-
void fil_system_t::create(ulint hash_size)
{
ut_ad(this == &fil_system);
@@ -1716,26 +1574,92 @@ void fil_system_t::create(ulint hash_size)
spaces = hash_create(hash_size);
fil_space_crypt_init();
+#ifdef UNIV_LINUX
+ ssd.clear();
+ char fn[sizeof(dirent::d_name)
+ + sizeof "/sys/block/" "/queue/rotational"];
+ const size_t sizeof_fnp = (sizeof fn) - sizeof "/sys/block";
+ memcpy(fn, "/sys/block/", sizeof "/sys/block");
+ char* fnp = &fn[sizeof "/sys/block"];
+
+ std::set<std::string> ssd_devices;
+ if (DIR* d = opendir("/sys/block")) {
+ while (struct dirent* e = readdir(d)) {
+ if (e->d_name[0] == '.') {
+ continue;
+ }
+ snprintf(fnp, sizeof_fnp, "%s/queue/rotational",
+ e->d_name);
+ int f = open(fn, O_RDONLY);
+ if (f == -1) {
+ continue;
+ }
+ char b[sizeof "4294967295:4294967295\n"];
+ ssize_t l = read(f, b, sizeof b);
+ ::close(f);
+ if (l != 2 || memcmp("0\n", b, 2)) {
+ continue;
+ }
+ snprintf(fnp, sizeof_fnp, "%s/dev", e->d_name);
+ f = open(fn, O_RDONLY);
+ if (f == -1) {
+ continue;
+ }
+ l = read(f, b, sizeof b);
+ ::close(f);
+ if (l <= 0 || b[l - 1] != '\n') {
+ continue;
+ }
+ b[l - 1] = '\0';
+ char* end = b;
+ unsigned long dev_major = strtoul(b, &end, 10);
+ if (b == end || *end != ':'
+ || dev_major != unsigned(dev_major)) {
+ continue;
+ }
+ char* c = end + 1;
+ unsigned long dev_minor = strtoul(c, &end, 10);
+ if (c == end || *end
+ || dev_minor != unsigned(dev_minor)) {
+ continue;
+ }
+ ssd.push_back(makedev(unsigned(dev_major),
+ unsigned(dev_minor)));
+ }
+ closedir(d);
+ }
+ /* fil_system_t::is_ssd() assumes the following */
+ ut_ad(makedev(0, 8) == 8);
+ ut_ad(makedev(0, 4) == 4);
+ ut_ad(makedev(0, 2) == 2);
+ ut_ad(makedev(0, 1) == 1);
+#endif
}
void fil_system_t::close()
{
- ut_ad(this == &fil_system);
- ut_a(!UT_LIST_GET_LEN(LRU));
- ut_a(unflushed_spaces.empty());
- ut_a(!UT_LIST_GET_LEN(space_list));
- ut_ad(!sys_space);
- ut_ad(!temp_space);
-
- if (is_initialised()) {
- m_initialised = false;
- hash_table_free(spaces);
- spaces = NULL;
- mutex_free(&mutex);
- fil_space_crypt_cleanup();
- }
-
- ut_ad(!spaces);
+ ut_ad(this == &fil_system);
+ ut_a(!UT_LIST_GET_LEN(LRU));
+ ut_a(unflushed_spaces.empty());
+ ut_a(!UT_LIST_GET_LEN(space_list));
+ ut_ad(!sys_space);
+ ut_ad(!temp_space);
+
+ if (is_initialised())
+ {
+ m_initialised= false;
+ hash_table_free(spaces);
+ spaces = nullptr;
+ mutex_free(&mutex);
+ fil_space_crypt_cleanup();
+ }
+
+ ut_ad(!spaces);
+
+#ifdef UNIV_LINUX
+ ssd.clear();
+ ssd.shrink_to_fit();
+#endif /* UNIV_LINUX */
}
/*******************************************************************//**
@@ -1944,13 +1868,19 @@ fil_write_flushed_lsn(
const page_id_t page_id(TRX_SYS_SPACE, 0);
- err = fil_read(page_id, univ_page_size, 0, srv_page_size,
- buf);
+ err = fil_read(page_id, 0, 0, srv_page_size, buf);
if (err == DB_SUCCESS) {
mach_write_to_8(buf + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, lsn);
- err = fil_write(page_id, univ_page_size, 0,
- srv_page_size, buf);
+
+ ulint fsp_flags = mach_read_from_4(
+ buf + FSP_HEADER_OFFSET + FSP_SPACE_FLAGS);
+
+ if (fil_space_t::full_crc32(fsp_flags)) {
+ buf_flush_assign_full_crc32_checksum(buf);
+ }
+
+ err = fil_write(page_id, 0, 0, srv_page_size, buf);
fil_flush_file_spaces(FIL_TYPE_TABLESPACE);
}
@@ -1964,10 +1894,8 @@ for concurrency control.
@param[in] id tablespace ID
@param[in] silent whether to silently ignore missing tablespaces
@return the tablespace
-@retval NULL if missing or being deleted or truncated */
-UNIV_INTERN
-fil_space_t*
-fil_space_acquire_low(ulint id, bool silent)
+@retval NULL if missing or being deleted */
+fil_space_t* fil_space_acquire_low(ulint id, bool silent)
{
fil_space_t* space;
@@ -2010,37 +1938,6 @@ fil_space_acquire_for_io(ulint id)
return(space);
}
-/********************************************************//**
-Creates the database directory for a table if it does not exist yet. */
-void
-fil_create_directory_for_tablename(
-/*===============================*/
- const char* name) /*!< in: name in the standard
- 'databasename/tablename' format */
-{
- const char* namend;
- char* path;
- ulint len;
-
- len = strlen(fil_path_to_mysql_datadir);
- namend = strchr(name, '/');
- ut_a(namend);
- path = static_cast<char*>(
- ut_malloc_nokey(len + ulint(namend - name) + 2));
-
- memcpy(path, fil_path_to_mysql_datadir, len);
- path[len] = '/';
- memcpy(path + len + 1, name, ulint(namend - name));
- path[len + ulint(namend - name) + 1] = 0;
-
- os_normalize_path(path);
-
- bool success = os_file_create_directory(path, false);
- ut_a(success);
-
- ut_free(path);
-}
-
/** Write a log record about an operation on a tablespace file.
@param[in] type MLOG_FILE_NAME or MLOG_FILE_DELETE
or MLOG_FILE_CREATE2 or MLOG_FILE_RENAME2
@@ -2065,7 +1962,7 @@ fil_op_write_log(
ulint len;
ut_ad(first_page_no == 0 || type == MLOG_FILE_CREATE2);
- ut_ad(fsp_flags_is_valid(flags, space_id));
+ ut_ad(fil_space_t::is_valid_flags(flags, space_id));
/* fil_name_parse() requires that there be at least one path
separator and that the file path end with ".ibd". */
@@ -2292,9 +2189,7 @@ enum fil_operation_t {
@param[in] space tablespace
@param[in] count number of attempts so far
@return 0 if no operations else count + 1. */
-static
-ulint
-fil_check_pending_ops(const fil_space_t* space, ulint count)
+static ulint fil_check_pending_ops(const fil_space_t* space, ulint count)
{
ut_ad(mutex_own(&fil_system.mutex));
@@ -2302,11 +2197,11 @@ fil_check_pending_ops(const fil_space_t* space, ulint count)
return 0;
}
- if (uint32_t n_pending_ops = space->referenced()) {
+ if (auto n_pending_ops = space->referenced()) {
/* Give a warning every 10 second, starting after 1 second */
if ((count % 500) == 50) {
- ib::warn() << "Trying to close/delete/truncate"
+ ib::warn() << "Trying to delete"
" tablespace '" << space->name
<< "' but there are " << n_pending_ops
<< " pending operations on it.";
@@ -2353,7 +2248,7 @@ fil_check_pending_io(
ut_a(!(*node)->being_extended);
if (count > 1000) {
- ib::warn() << "Trying to delete/close/truncate"
+ ib::warn() << "Trying to delete"
" tablespace '" << space->name
<< "' but there are "
<< space->n_pending_flushes
@@ -2981,6 +2876,9 @@ skip_second_rename:
return(success);
}
+/* FIXME: remove this! */
+IF_WIN(, bool os_is_sparse_file_supported(os_file_t fh));
+
/** Create a tablespace file.
@param[in] space_id Tablespace ID
@param[in] name Tablespace name in dbname/tablename format.
@@ -3009,14 +2907,12 @@ fil_ibd_create(
byte* page;
bool success;
bool has_data_dir = FSP_FLAGS_HAS_DATA_DIR(flags) != 0;
- fil_space_t* space = NULL;
- fil_space_crypt_t *crypt_data = NULL;
ut_ad(!is_system_tablespace(space_id));
ut_ad(!srv_read_only_mode);
ut_a(space_id < SRV_LOG_SPACE_FIRST_ID);
ut_a(size >= FIL_IBD_FILE_INITIAL_SIZE);
- ut_a(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK, space_id));
+ ut_a(fil_space_t::is_valid_flags(flags & ~FSP_FLAGS_MEM_MASK, space_id));
/* Create the subdirectories in the path, if they are
not there already. */
@@ -3026,7 +2922,8 @@ fil_ibd_create(
}
ulint type;
- compile_time_assert(((UNIV_ZIP_SIZE_MIN >> 1) << 3) == 4096);
+ static_assert(((UNIV_ZIP_SIZE_MIN >> 1) << 3) == 4096,
+ "compatibility");
switch (FSP_FLAGS_GET_ZIP_SSIZE(flags)) {
case 1:
case 2:
@@ -3039,10 +2936,7 @@ fil_ibd_create(
file = os_file_create(
innodb_data_file_key, path,
OS_FILE_CREATE | OS_FILE_ON_ERROR_NO_EXIT,
- OS_FILE_NORMAL,
- type,
- srv_read_only_mode,
- &success);
+ OS_FILE_NORMAL, type, srv_read_only_mode, &success);
if (!success) {
/* The following call will print an error message */
@@ -3066,7 +2960,8 @@ fil_ibd_create(
return NULL;
}
- const bool is_compressed = FSP_FLAGS_HAS_PAGE_COMPRESSION(flags);
+ const bool is_compressed = fil_space_t::is_compressed(flags);
+ bool punch_hole = is_compressed;
#ifdef _WIN32
if (is_compressed) {
@@ -3084,9 +2979,8 @@ err_exit:
return NULL;
}
- bool punch_hole = os_is_sparse_file_supported(file);
-
- ulint block_size = os_file_get_block_size(file, path);
+ /* FIXME: remove this */
+ IF_WIN(, punch_hole = punch_hole && os_is_sparse_file_supported(file));
/* We have to write the space id to the file immediately and flush the
file to disk. This is because in crash recovery we must be aware what
@@ -3103,16 +2997,21 @@ err_exit:
memset(page, '\0', srv_page_size);
- flags |= FSP_FLAGS_PAGE_SSIZE();
+ if (fil_space_t::full_crc32(flags)) {
+ flags |= FSP_FLAGS_FCRC32_PAGE_SSIZE();
+ } else {
+ flags |= FSP_FLAGS_PAGE_SSIZE();
+ }
+
fsp_header_init_fields(page, space_id, flags);
mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, space_id);
/* Create crypt data if the tablespace is either encrypted or user has
requested it to remain unencrypted. */
- if (mode == FIL_ENCRYPTION_ON || mode == FIL_ENCRYPTION_OFF ||
- srv_encrypt_tables) {
- crypt_data = fil_space_create_crypt_data(mode, key_id);
- }
+ fil_space_crypt_t *crypt_data = (mode != FIL_ENCRYPTION_DEFAULT
+ || srv_encrypt_tables)
+ ? fil_space_create_crypt_data(mode, key_id)
+ : NULL;
if (crypt_data) {
/* Write crypt data information in page0 while creating
@@ -3120,18 +3019,9 @@ err_exit:
crypt_data->fill_page0(flags, page);
}
- const page_size_t page_size(flags);
- IORequest request(IORequest::WRITE);
-
- if (!page_size.is_compressed()) {
-
- buf_flush_init_for_writing(NULL, page, NULL, 0);
-
- *err = os_file_write(
- request, path, file, page, 0, page_size.physical());
- } else {
+ if (ulint zip_size = fil_space_t::zip_size(flags)) {
page_zip_des_t page_zip;
- page_zip_set_size(&page_zip, page_size.physical());
+ page_zip_set_size(&page_zip, zip_size);
page_zip.data = page + srv_page_size;
#ifdef UNIV_DEBUG
page_zip.m_start =
@@ -3139,11 +3029,16 @@ err_exit:
page_zip.m_end = page_zip.m_nonempty =
page_zip.n_blobs = 0;
- buf_flush_init_for_writing(NULL, page, &page_zip, 0);
+ buf_flush_init_for_writing(NULL, page, &page_zip, 0, false);
*err = os_file_write(
- request, path, file, page_zip.data, 0,
- page_size.physical());
+ IORequestWrite, path, file, page_zip.data, 0, zip_size);
+ } else {
+ buf_flush_init_for_writing(NULL, page, NULL, 0,
+ fil_space_t::full_crc32(flags));
+
+ *err = os_file_write(
+ IORequestWrite, path, file, page, 0, srv_page_size);
}
ut_free(buf2);
@@ -3171,25 +3066,26 @@ err_exit:
}
}
- space = fil_space_create(name, space_id, flags, FIL_TYPE_TABLESPACE,
- crypt_data, mode);
+ fil_space_t* space = fil_space_create(name, space_id, flags,
+ FIL_TYPE_TABLESPACE,
+ crypt_data, mode);
if (!space) {
free(crypt_data);
*err = DB_ERROR;
} else {
- fil_node_t* file = space->add(path, OS_FILE_CLOSED, size,
+ space->punch_hole = punch_hole;
+ /* FIXME: Keep the file open! */
+ fil_node_t* node = space->add(path, OS_FILE_CLOSED, size,
false, true);
mtr_t mtr;
mtr.start();
fil_op_write_log(
- MLOG_FILE_CREATE2, space_id, 0, file->name,
+ MLOG_FILE_CREATE2, space_id, 0, node->name,
NULL, space->flags & ~FSP_FLAGS_MEM_MASK, &mtr);
- fil_name_write(space, 0, file, &mtr);
+ fil_name_write(space, 0, node, &mtr);
mtr.commit();
- file->block_size = block_size;
- space->punch_hole = punch_hole;
-
+ node->find_metadata(file);
*err = DB_SUCCESS;
}
@@ -3281,11 +3177,12 @@ fil_ibd_open(
ulint tablespaces_found = 0;
ulint valid_tablespaces_found = 0;
- ut_ad(!fix_dict || rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ if (fix_dict) {
+ ut_d(dict_sys.assert_locked());
+ ut_ad(!srv_read_only_mode);
+ ut_ad(srv_log_file_size != 0);
+ }
- ut_ad(!fix_dict || mutex_own(&dict_sys->mutex));
- ut_ad(!fix_dict || !srv_read_only_mode);
- ut_ad(!fix_dict || srv_log_file_size != 0);
ut_ad(fil_type_is_data(purpose));
/* Table flags can be ULINT_UNDEFINED if
@@ -3296,7 +3193,7 @@ corrupted:
return NULL;
}
- ut_ad(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK, id));
+ ut_ad(fil_space_t::is_valid_flags(flags & ~FSP_FLAGS_MEM_MASK, id));
df_default.init(tablename.m_name, flags);
df_dict.init(tablename.m_name, flags);
df_remote.init(tablename.m_name, flags);
@@ -3550,7 +3447,8 @@ skip_validate:
df_remote.get_first_page();
fil_space_crypt_t* crypt_data = first_page
- ? fil_space_read_crypt_data(page_size_t(flags), first_page)
+ ? fil_space_read_crypt_data(fil_space_t::zip_size(flags),
+ first_page)
: NULL;
fil_space_t* space = fil_space_create(
@@ -3885,14 +3783,15 @@ fil_ibd_load(
/* Adjust the memory-based flags that would normally be set by
dict_tf_to_fsp_flags(). In recovery, we have no data dictionary. */
ulint flags = file.flags();
- if (FSP_FLAGS_HAS_PAGE_COMPRESSION(flags)) {
+ if (fil_space_t::is_compressed(flags)) {
flags |= page_zip_level
<< FSP_FLAGS_MEM_COMPRESSION_LEVEL;
}
const byte* first_page = file.get_first_page();
fil_space_crypt_t* crypt_data = first_page
- ? fil_space_read_crypt_data(page_size_t(flags), first_page)
+ ? fil_space_read_crypt_data(fil_space_t::zip_size(flags),
+ first_page)
: NULL;
space = fil_space_create(
file.name(), space_id, flags, FIL_TYPE_TABLESPACE, crypt_data);
@@ -3913,41 +3812,6 @@ fil_ibd_load(
return(FIL_LOAD_OK);
}
-/***********************************************************************//**
-A fault-tolerant function that tries to read the next file name in the
-directory. We retry 100 times if os_file_readdir_next_file() returns -1. The
-idea is to read as much good data as we can and jump over bad data.
-@return 0 if ok, -1 if error even after the retries, 1 if at the end
-of the directory */
-int
-fil_file_readdir_next_file(
-/*=======================*/
- dberr_t* err, /*!< out: this is set to DB_ERROR if an error
- was encountered, otherwise not changed */
- const char* dirname,/*!< in: directory name or path */
- os_file_dir_t dir, /*!< in: directory stream */
- os_file_stat_t* info) /*!< in/out: buffer where the
- info is returned */
-{
- for (ulint i = 0; i < 100; i++) {
- int ret = os_file_readdir_next_file(dirname, dir, info);
-
- if (ret != -1) {
-
- return(ret);
- }
-
- ib::error() << "os_file_readdir_next_file() returned -1 in"
- " directory " << dirname
- << ", crash recovery may have failed"
- " for some .ibd files!";
-
- *err = DB_ERROR;
- }
-
- return(-1);
-}
-
/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations.
(Typically when upgrading from MariaDB 10.1.0..10.1.20.)
@param[in,out] space tablespace
@@ -3955,7 +3819,10 @@ fil_file_readdir_next_file(
void fsp_flags_try_adjust(fil_space_t* space, ulint flags)
{
ut_ad(!srv_read_only_mode);
- ut_ad(fsp_flags_is_valid(flags, space->id));
+ ut_ad(fil_space_t::is_valid_flags(flags, space->id));
+ if (space->full_crc32() || fil_space_t::full_crc32(flags)) {
+ return;
+ }
if (!space->size && (space->purpose != FIL_TYPE_TABLESPACE
|| !fil_space_get_size(space->id))) {
return;
@@ -3966,9 +3833,15 @@ void fsp_flags_try_adjust(fil_space_t* space, ulint flags)
mtr_t mtr;
mtr.start();
if (buf_block_t* b = buf_page_get(
- page_id_t(space->id, 0), page_size_t(flags),
+ page_id_t(space->id, 0), space->zip_size(),
RW_X_LATCH, &mtr)) {
ulint f = fsp_header_get_flags(b->frame);
+ if (fil_space_t::full_crc32(f)) {
+ goto func_exit;
+ }
+ if (fil_space_t::is_flags_equal(f, flags)) {
+ goto func_exit;
+ }
/* Suppress the message if only the DATA_DIR flag to differs. */
if ((f ^ flags) & ~(1U << FSP_FLAGS_POS_RESERVED)) {
ib::warn()
@@ -3977,13 +3850,11 @@ void fsp_flags_try_adjust(fil_space_t* space, ulint flags)
<< "' from " << ib::hex(f)
<< " to " << ib::hex(flags);
}
- if (f != flags) {
- mtr.set_named_space(space);
- mlog_write_ulint(FSP_HEADER_OFFSET
- + FSP_SPACE_FLAGS + b->frame,
- flags, MLOG_4BYTES, &mtr);
- }
+ mtr.set_named_space(space);
+ mlog_write_ulint(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS
+ + b->frame, flags, MLOG_4BYTES, &mtr);
}
+func_exit:
mtr.commit();
}
@@ -4005,7 +3876,11 @@ fil_space_for_table_exists_in_mem(
mutex_enter(&fil_system.mutex);
if (fil_space_t* space = fil_space_get_by_id(id)) {
- if ((space->flags ^ expected_flags) & ~FSP_FLAGS_MEM_MASK) {
+ ulint tf = expected_flags & ~FSP_FLAGS_MEM_MASK;
+ ulint sf = space->flags & ~FSP_FLAGS_MEM_MASK;
+
+ if (!fil_space_t::is_flags_equal(tf, sf)
+ && !fil_space_t::is_flags_equal(sf, tf)) {
goto func_exit;
}
@@ -4022,7 +3897,8 @@ fil_space_for_table_exists_in_mem(
/* Adjust the flags that are in FSP_FLAGS_MEM_MASK.
FSP_SPACE_FLAGS will not be written back here. */
- space->flags = expected_flags;
+ space->flags = (space->flags & ~FSP_FLAGS_MEM_MASK)
+ | (expected_flags & FSP_FLAGS_MEM_MASK);
mutex_exit(&fil_system.mutex);
if (!srv_read_only_mode) {
fsp_flags_try_adjust(space, expected_flags
@@ -4152,12 +4028,21 @@ static std::string fil_invalid_page_access_msg(size_t block_offset,
return ss.str();
}
+inline void IORequest::set_fil_node(fil_node_t* node)
+{
+ if (!node->space->punch_hole) {
+ clear_punch_hole();
+ }
+
+ m_fil_node = node;
+}
+
/** Reads or writes data. This operation could be asynchronous (aio).
@param[in,out] type IO context
@param[in] sync true if synchronous aio is desired
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] byte_offset remainder of offset in bytes; in aio this
must be divisible by the OS block size
@param[in] len how many bytes to read or write; this must
@@ -4169,14 +4054,14 @@ static std::string fil_invalid_page_access_msg(size_t block_offset,
@param[in] message message for aio handler if non-sync aio
used, else ignored
@param[in] ignore_missing_space true=ignore missing space duging read
-@return DB_SUCCESS, DB_TABLESPACE_DELETED or DB_TABLESPACE_TRUNCATED
+@return DB_SUCCESS, or DB_TABLESPACE_DELETED
if we are trying to do i/o on a tablespace which does not exist */
dberr_t
fil_io(
const IORequest& type,
bool sync,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint byte_offset,
ulint len,
void* buf,
@@ -4190,7 +4075,7 @@ fil_io(
ut_ad(len > 0);
ut_ad(byte_offset < srv_page_size);
- ut_ad(!page_size.is_compressed() || byte_offset == 0);
+ ut_ad(!zip_size || byte_offset == 0);
ut_ad(srv_page_size == 1UL << srv_page_size_shift);
compile_time_assert((1U << UNIV_PAGE_SIZE_SHIFT_MAX)
== UNIV_PAGE_SIZE_MAX);
@@ -4201,7 +4086,7 @@ fil_io(
/* ibuf bitmap pages must be read in the sync AIO mode: */
ut_ad(recv_no_ibuf_operations
|| req_type.is_write()
- || !ibuf_bitmap_page(page_id, page_size)
+ || !ibuf_bitmap_page(page_id, zip_size)
|| sync
|| req_type.is_log());
@@ -4217,7 +4102,7 @@ fil_io(
} else if (req_type.is_read()
&& !recv_no_ibuf_operations
- && ibuf_page(page_id, page_size, NULL)) {
+ && ibuf_page(page_id, zip_size, NULL)) {
mode = OS_AIO_IBUF;
@@ -4311,19 +4196,6 @@ fil_io(
break;
} else {
- if (space->id != TRX_SYS_SPACE
- && UT_LIST_GET_LEN(space->chain) == 1
- && (srv_is_tablespace_truncated(space->id)
- || srv_was_tablespace_truncated(space))
- && req_type.is_read()) {
-
- /* Handle page which is outside the truncated
- tablespace bounds when recovering from a crash
- happened during a truncation */
- mutex_exit(&fil_system.mutex);
- return(DB_TABLESPACE_TRUNCATED);
- }
-
cur_page_no -= node->size;
node = UT_LIST_GET_NEXT(chain, node);
@@ -4382,37 +4254,10 @@ fil_io(
/* Now we have made the changes in the data structures of fil_system */
mutex_exit(&fil_system.mutex);
- /* Calculate the low 32 bits and the high 32 bits of the file offset */
+ if (!zip_size) zip_size = srv_page_size;
- if (!page_size.is_compressed()) {
-
- offset = ((os_offset_t) cur_page_no
- << srv_page_size_shift) + byte_offset;
-
- ut_a(node->size - cur_page_no
- >= ((byte_offset + len + (srv_page_size - 1))
- >> srv_page_size_shift));
- } else {
- ulint size_shift;
-
- switch (page_size.physical()) {
- case 1024: size_shift = 10; break;
- case 2048: size_shift = 11; break;
- case 4096: size_shift = 12; break;
- case 8192: size_shift = 13; break;
- case 16384: size_shift = 14; break;
- case 32768: size_shift = 15; break;
- case 65536: size_shift = 16; break;
- default: ut_error;
- }
-
- offset = ((os_offset_t) cur_page_no << size_shift)
- + byte_offset;
-
- ut_a(node->size - cur_page_no
- >= (len + (page_size.physical() - 1))
- / page_size.physical());
- }
+ offset = os_offset_t(cur_page_no) * zip_size + byte_offset;
+ ut_ad(node->size - cur_page_no >= (len + (zip_size - 1)) / zip_size);
/* Do AIO */
@@ -4426,7 +4271,7 @@ fil_io(
ut_ad(!req_type.is_write()
|| page_id.space() == SRV_LOG_SPACE_FIRST_ID
|| !fil_is_user_tablespace_id(page_id.space())
- || offset == page_id.page_no() * page_size.physical());
+ || offset == page_id.page_no() * zip_size);
/* Queue the aio request */
dberr_t err = os_aio(
@@ -4546,7 +4391,7 @@ fil_aio_wait(
ut_ad(type.is_read());
if (recv_recovery_is_on() && !srv_force_recovery) {
- recv_sys->found_corrupt_fs = true;
+ recv_sys.found_corrupt_fs = true;
}
if (fil_space_t* space = fil_space_acquire_for_io(space_id)) {
@@ -4894,7 +4739,7 @@ fil_space_validate_for_mtr_commit(
/* We are serving mtr_commit(). While there is an active
mini-transaction, we should have !space->stop_new_ops. This is
guaranteed by meta-data locks or transactional locks, or
- dict_operation_lock (X-lock in DROP, S-lock in purge).
+ dict_sys.latch (X-lock in DROP, S-lock in purge).
However, a file I/O thread can invoke change buffer merge
while fil_check_pending_operations() is waiting for operations
@@ -5043,116 +4888,6 @@ fil_names_clear(
return(do_write);
}
-/** Truncate a single-table tablespace. The tablespace must be cached
-in the memory cache.
-@param space_id space id
-@param dir_path directory path
-@param tablename the table name in the usual
- databasename/tablename format of InnoDB
-@param flags tablespace flags
-@param trunc_to_default truncate to default size if tablespace
- is being newly re-initialized.
-@return DB_SUCCESS or error */
-dberr_t
-truncate_t::truncate(
-/*=================*/
- ulint space_id,
- const char* dir_path,
- const char* tablename,
- ulint flags,
- bool trunc_to_default)
-{
- dberr_t err = DB_SUCCESS;
- char* path;
-
- ut_a(!is_system_tablespace(space_id));
-
- if (FSP_FLAGS_HAS_DATA_DIR(flags)) {
- ut_ad(dir_path != NULL);
- path = fil_make_filepath(dir_path, tablename, IBD, true);
- } else {
- path = fil_make_filepath(NULL, tablename, IBD, false);
- }
-
- if (path == NULL) {
- return(DB_OUT_OF_MEMORY);
- }
-
- mutex_enter(&fil_system.mutex);
-
- fil_space_t* space = fil_space_get_by_id(space_id);
-
- /* The following code must change when InnoDB supports
- multiple datafiles per tablespace. */
- ut_a(UT_LIST_GET_LEN(space->chain) == 1);
-
- fil_node_t* node = UT_LIST_GET_FIRST(space->chain);
-
- if (trunc_to_default) {
- space->size = node->size = FIL_IBD_FILE_INITIAL_SIZE;
- }
-
- const bool already_open = node->is_open();
-
- if (!already_open) {
-
- bool ret;
-
- node->handle = os_file_create_simple_no_error_handling(
- innodb_data_file_key, path, OS_FILE_OPEN,
- OS_FILE_READ_WRITE,
- space->purpose != FIL_TYPE_TEMPORARY
- && srv_read_only_mode, &ret);
-
- if (!ret) {
- ib::error() << "Failed to open tablespace file "
- << path << ".";
-
- ut_free(path);
-
- return(DB_ERROR);
- }
-
- ut_a(node->is_open());
- }
-
- os_offset_t trunc_size = trunc_to_default
- ? FIL_IBD_FILE_INITIAL_SIZE
- : space->size;
-
- const bool success = os_file_truncate(
- path, node->handle, trunc_size << srv_page_size_shift);
-
- if (!success) {
- ib::error() << "Cannot truncate file " << path
- << " in TRUNCATE TABLESPACE.";
- err = DB_ERROR;
- }
-
- space->set_stopping(false);
-
- /* If we opened the file in this function, close it. */
- if (!already_open) {
- bool closed = os_file_close(node->handle);
-
- if (!closed) {
-
- ib::error() << "Failed to close tablespace file "
- << path << ".";
-
- err = DB_ERROR;
- } else {
- node->handle = OS_FILE_CLOSED;
- }
- }
-
- mutex_exit(&fil_system.mutex);
-
- ut_free(path);
-
- return(err);
-}
-
/* Unit Tests */
#ifdef UNIV_ENABLE_UNIT_TEST_MAKE_FILEPATH
#define MF fil_make_filepath
@@ -5229,26 +4964,3 @@ fil_space_get_block_size(const fil_space_t* space, unsigned offset)
return block_size;
}
-
-/**
-Get should we punch hole to tablespace.
-@param[in] node File node
-@return true, if punch hole should be tried, false if not. */
-bool
-fil_node_should_punch_hole(
- const fil_node_t* node)
-{
- return (node->space->punch_hole);
-}
-
-/**
-Set punch hole to tablespace to given value.
-@param[in] node File node
-@param[in] val value to be set. */
-void
-fil_space_set_punch_hole(
- fil_node_t* node,
- bool val)
-{
- node->space->punch_hole = val;
-}
diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc
index 7d034a194c9..21b148223f6 100644
--- a/storage/innobase/fil/fil0pagecompress.cc
+++ b/storage/innobase/fil/fil0pagecompress.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (C) 2013, 2020, MariaDB Corporation.
+Copyright (C) 2013, 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
@@ -72,45 +72,24 @@ Updated 14/02/2015
#include "snappy-c.h"
#endif
-/** Compress a page_compressed page before writing to a data file.
+/** Compress a page for the given compression algorithm.
@param[in] buf page to be compressed
@param[out] out_buf compressed page
-@param[in] level compression level
-@param[in] block_size file system block size
-@param[in] encrypted whether the page will be subsequently encrypted
-@return actual length of compressed page
-@retval 0 if the page was not compressed */
-ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
- ulint block_size, bool encrypted)
+@param[in] header_len header length of the page
+@param[in] comp_algo compression algorithm
+@param[in] comp_level compression level
+@return actual length of compressed page data
+@retval 0 if the page was not compressed */
+static ulint fil_page_compress_low(
+ const byte* buf,
+ byte* out_buf,
+ ulint header_len,
+ ulint comp_algo,
+ ulint comp_level)
{
- int comp_level = int(level);
- ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE;
- /* Cache to avoid change during function execution */
- ulint comp_method = innodb_compression_algorithm;
-
- if (encrypted) {
- header_len += FIL_PAGE_COMPRESSION_METHOD_SIZE;
- }
-
- /* Let's not compress file space header or
- extent descriptor */
- switch (fil_page_get_type(buf)) {
- case 0:
- case FIL_PAGE_TYPE_FSP_HDR:
- case FIL_PAGE_TYPE_XDES:
- case FIL_PAGE_PAGE_COMPRESSED:
- return 0;
- }
-
- /* If no compression level was provided to this table, use system
- default level */
- if (comp_level == 0) {
- comp_level = int(page_zip_level);
- }
-
ulint write_size = srv_page_size - header_len;
- switch (comp_method) {
+ switch (comp_algo) {
default:
ut_ad(!"unknown compression method");
/* fall through */
@@ -120,10 +99,9 @@ ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
{
ulong len = uLong(write_size);
if (Z_OK == compress2(
- out_buf + header_len, &len,
- buf, uLong(srv_page_size), comp_level)) {
- write_size = len;
- goto success;
+ out_buf + header_len, &len, buf,
+ uLong(srv_page_size), int(comp_level))) {
+ return len;
}
}
break;
@@ -141,10 +119,7 @@ ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
int(srv_page_size), int(write_size));
# endif
- if (write_size) {
- goto success;
- }
- break;
+ return write_size;
#endif /* HAVE_LZ4 */
#ifdef HAVE_LZO
case PAGE_LZO_ALGORITHM: {
@@ -155,8 +130,7 @@ ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
out_buf + header_len, &len,
out_buf + srv_page_size)
&& len <= write_size) {
- write_size = len;
- goto success;
+ return len;
}
break;
}
@@ -170,8 +144,7 @@ ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
buf, srv_page_size, out_buf + header_len,
&out_pos, write_size)
&& out_pos <= write_size) {
- write_size = out_pos;
- goto success;
+ return out_pos;
}
break;
}
@@ -187,8 +160,7 @@ ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
reinterpret_cast<const char*>(buf)),
unsigned(srv_page_size), 1, 0, 0)
&& len <= write_size) {
- write_size = len;
- goto success;
+ return len;
}
break;
}
@@ -204,42 +176,171 @@ ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
reinterpret_cast<char*>(out_buf) + header_len,
&len)
&& len <= write_size) {
- write_size = len;
- goto success;
+ return len;
}
break;
}
#endif /* HAVE_SNAPPY */
}
- srv_stats.pages_page_compression_error.inc();
return 0;
-success:
+}
+
+/** Compress a page_compressed page for full crc32 format.
+@param[in] buf page to be compressed
+@param[out] out_buf compressed page
+@param[in] flags tablespace flags
+@param[in] block_size file system block size
+@return actual length of compressed page
+@retval 0 if the page was not compressed */
+static ulint fil_page_compress_for_full_crc32(
+ const byte* buf,
+ byte* out_buf,
+ ulint flags,
+ ulint block_size,
+ bool encrypted)
+{
+ ulint comp_level = fsp_flags_get_page_compression_level(flags);
+
+ if (comp_level == 0) {
+ comp_level = page_zip_level;
+ }
+
+ const ulint header_len = FIL_PAGE_COMP_ALGO;
+
+ ulint write_size = fil_page_compress_low(
+ buf, out_buf, header_len,
+ fil_space_t::get_compression_algo(flags), comp_level);
+
+ if (write_size == 0) {
+fail:
+ srv_stats.pages_page_compression_error.inc();
+ return 0;
+ }
+
+ write_size += header_len;
+ const ulint actual_size = write_size;
+ /* Write the actual length of the data & page type
+ for full crc32 format. */
+ const bool lsb = fil_space_t::full_crc32_page_compressed_len(flags);
+ /* In the MSB, store the rounded-up page size. */
+ write_size = (write_size + lsb + (4 + 255)) & ~255;
+ if (write_size >= srv_page_size) {
+ goto fail;
+ }
+
+ /* Set up the page header */
+ memcpy(out_buf, buf, header_len);
+ out_buf[FIL_PAGE_TYPE] = 1U << (FIL_PAGE_COMPRESS_FCRC32_MARKER - 8);
+ out_buf[FIL_PAGE_TYPE + 1] = byte(write_size >> 8);
+ /* Clean up the buffer for the remaining write_size (except checksum) */
+ memset(out_buf + actual_size, 0, write_size - actual_size - 4);
+ if (lsb) {
+ /* Store the LSB */
+ out_buf[write_size - 5] = byte(actual_size + (1 + 4));
+ }
+
+ if (!block_size) {
+ block_size = 512;
+ }
+
+ ut_ad(write_size);
+ if (write_size & (block_size - 1)) {
+ size_t tmp = write_size;
+ write_size = (write_size + (block_size - 1))
+ & ~(block_size - 1);
+ memset(out_buf + tmp, 0, write_size - tmp);
+ }
+
+ srv_stats.page_compression_saved.add(srv_page_size - write_size);
+ srv_stats.pages_page_compressed.inc();
+
+ return write_size;
+}
+
+/** Compress a page_compressed page for non full crc32 format.
+@param[in] buf page to be compressed
+@param[out] out_buf compressed page
+@param[in] flags tablespace flags
+@param[in] block_size file system block size
+@param[in] encrypted whether the page will be subsequently encrypted
+@return actual length of compressed page
+@retval 0 if the page was not compressed */
+static ulint fil_page_compress_for_non_full_crc32(
+ const byte* buf,
+ byte* out_buf,
+ ulint flags,
+ ulint block_size,
+ bool encrypted)
+{
+ int comp_level = int(fsp_flags_get_page_compression_level(flags));
+ ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMP_METADATA_LEN;
+ /* Cache to avoid change during function execution */
+ ulint comp_algo = innodb_compression_algorithm;
+
+ if (encrypted) {
+ header_len += FIL_PAGE_ENCRYPT_COMP_ALGO;
+ }
+
+ /* If no compression level was provided to this table, use system
+ default level */
+ if (comp_level == 0) {
+ comp_level = int(page_zip_level);
+ }
+
+ ulint write_size = fil_page_compress_low(
+ buf, out_buf,
+ header_len, comp_algo, comp_level);
+
+ if (write_size == 0) {
+ srv_stats.pages_page_compression_error.inc();
+ return 0;
+ }
+
/* Set up the page header */
memcpy(out_buf, buf, FIL_PAGE_DATA);
/* Set up the checksum */
- mach_write_to_4(out_buf+FIL_PAGE_SPACE_OR_CHKSUM, BUF_NO_CHECKSUM_MAGIC);
+ mach_write_to_4(out_buf + FIL_PAGE_SPACE_OR_CHKSUM, BUF_NO_CHECKSUM_MAGIC);
/* Set up the compression algorithm */
- mach_write_to_8(out_buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, comp_method);
+ mach_write_to_8(out_buf + FIL_PAGE_COMP_ALGO, comp_algo);
if (encrypted) {
/* Set up the correct page type */
- mach_write_to_2(out_buf+FIL_PAGE_TYPE, FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
- mach_write_to_2(out_buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE, comp_method);
+ mach_write_to_2(out_buf + FIL_PAGE_TYPE,
+ FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
+
+ mach_write_to_2(out_buf + FIL_PAGE_DATA
+ + FIL_PAGE_ENCRYPT_COMP_ALGO, comp_algo);
} else {
/* Set up the correct page type */
- mach_write_to_2(out_buf+FIL_PAGE_TYPE, FIL_PAGE_PAGE_COMPRESSED);
+ mach_write_to_2(out_buf + FIL_PAGE_TYPE, FIL_PAGE_PAGE_COMPRESSED);
}
/* Set up the actual payload lenght */
- mach_write_to_2(out_buf+FIL_PAGE_DATA, write_size);
+ mach_write_to_2(out_buf + FIL_PAGE_DATA + FIL_PAGE_COMP_SIZE,
+ write_size);
+
+ ut_ad(fil_page_is_compressed(out_buf)
+ || fil_page_is_compressed_encrypted(out_buf));
+
+ ut_ad(mach_read_from_4(out_buf + FIL_PAGE_SPACE_OR_CHKSUM)
+ == BUF_NO_CHECKSUM_MAGIC);
+
+ ut_ad(mach_read_from_2(out_buf + FIL_PAGE_DATA + FIL_PAGE_COMP_SIZE)
+ == write_size);
+
+#ifdef UNIV_DEBUG
+ bool is_compressed = (mach_read_from_8(out_buf + FIL_PAGE_COMP_ALGO)
+ == (ulint) comp_algo);
- ut_ad(fil_page_is_compressed(out_buf) || fil_page_is_compressed_encrypted(out_buf));
- ut_ad(mach_read_from_4(out_buf+FIL_PAGE_SPACE_OR_CHKSUM) == BUF_NO_CHECKSUM_MAGIC);
- ut_ad(mach_read_from_2(out_buf+FIL_PAGE_DATA) == write_size);
- ut_ad(mach_read_from_8(out_buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) == (ulint)comp_method ||
- mach_read_from_2(out_buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE) == (ulint)comp_method);
+ bool is_encrypted_compressed =
+ (mach_read_from_2(out_buf + FIL_PAGE_DATA
+ + FIL_PAGE_ENCRYPT_COMP_ALGO)
+ == (ulint) comp_algo);
+#endif /* UNIV_DEBUG */
+
+ ut_ad(is_compressed || is_encrypted_compressed);
write_size+=header_len;
@@ -252,7 +353,8 @@ success:
/* Actual write needs to be alligned on block size */
if (write_size % block_size) {
size_t tmp = write_size;
- write_size = (size_t)ut_uint64_align_up((ib_uint64_t)write_size, block_size);
+ write_size = (size_t)ut_uint64_align_up(
+ (ib_uint64_t)write_size, block_size);
/* Clean up the end of buffer */
memset(out_buf+tmp, 0, write_size - tmp);
#ifdef UNIV_DEBUG
@@ -267,131 +369,246 @@ success:
return write_size;
}
-/** Decompress a page that may be subject to page_compressed compression.
-@param[in,out] tmp_buf temporary buffer (of innodb_page_size)
-@param[in,out] buf possibly compressed page buffer
-@return size of the compressed data
-@retval 0 if decompression failed
-@retval srv_page_size if the page was not compressed */
-ulint fil_page_decompress(byte* tmp_buf, byte* buf)
+/** Compress a page_compressed page before writing to a data file.
+@param[in] buf page to be compressed
+@param[out] out_buf compressed page
+@param[in] flags tablespace flags
+@param[in] block_size file system block size
+@param[in] encrypted whether the page will be subsequently encrypted
+@return actual length of compressed page
+@retval 0 if the page was not compressed */
+ulint fil_page_compress(
+ const byte* buf,
+ byte* out_buf,
+ ulint flags,
+ ulint block_size,
+ bool encrypted)
{
- const unsigned ptype = mach_read_from_2(buf+FIL_PAGE_TYPE);
- ulint header_len;
- uint64_t compression_alg;
- switch (ptype) {
- case FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED:
- header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE
- + FIL_PAGE_COMPRESSION_METHOD_SIZE;
- compression_alg = mach_read_from_2(
- FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE + buf);
- break;
- case FIL_PAGE_PAGE_COMPRESSED:
- header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE;
- compression_alg = mach_read_from_8(
- FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + buf);
- break;
- default:
- return srv_page_size;
- }
+ /* The full_crc32 page_compressed format assumes this. */
+ ut_ad(!(block_size & 255));
+ ut_ad(ut_is_2pow(block_size));
- if (mach_read_from_4(buf + FIL_PAGE_SPACE_OR_CHKSUM)
- != BUF_NO_CHECKSUM_MAGIC) {
+ /* Let's not compress file space header or
+ extent descriptor */
+ switch (fil_page_get_type(buf)) {
+ case 0:
+ case FIL_PAGE_TYPE_FSP_HDR:
+ case FIL_PAGE_TYPE_XDES:
+ case FIL_PAGE_PAGE_COMPRESSED:
return 0;
}
- ulint actual_size = mach_read_from_2(buf + FIL_PAGE_DATA);
-
- /* Check if payload size is corrupted */
- if (actual_size == 0 || actual_size > srv_page_size - header_len) {
- return 0;
+ if (fil_space_t::full_crc32(flags)) {
+ return fil_page_compress_for_full_crc32(
+ buf, out_buf, flags, block_size, encrypted);
}
- switch (compression_alg) {
+ return fil_page_compress_for_non_full_crc32(
+ buf, out_buf, flags, block_size, encrypted);
+}
+
+/** Decompress a page that may be subject to page_compressed compression.
+@param[in,out] tmp_buf temporary buffer (of innodb_page_size)
+@param[in,out] buf possibly compressed page buffer
+@param[in] comp_algo compression algorithm
+@param[in] header_len header length of the page
+@param[in] actual size actual size of the page
+@retval true if the page is decompressed or false */
+static bool fil_page_decompress_low(
+ byte* tmp_buf,
+ byte* buf,
+ ulint comp_algo,
+ ulint header_len,
+ ulint actual_size)
+{
+ switch (comp_algo) {
default:
ib::error() << "Unknown compression algorithm "
- << compression_alg;
- return 0;
+ << comp_algo;
+ return false;
case PAGE_ZLIB_ALGORITHM:
{
uLong len = srv_page_size;
- if (Z_OK == uncompress(tmp_buf, &len,
+ return (Z_OK == uncompress(tmp_buf, &len,
buf + header_len,
uLong(actual_size))
- && len == srv_page_size) {
- break;
- }
+ && len == srv_page_size);
}
- return 0;
#ifdef HAVE_LZ4
case PAGE_LZ4_ALGORITHM:
- if (LZ4_decompress_safe(reinterpret_cast<const char*>(buf)
- + header_len,
- reinterpret_cast<char*>(tmp_buf),
- actual_size, srv_page_size)
- == int(srv_page_size)) {
- break;
- }
- return 0;
+ return LZ4_decompress_safe(
+ reinterpret_cast<const char*>(buf) + header_len,
+ reinterpret_cast<char*>(tmp_buf),
+ actual_size, srv_page_size) == int(srv_page_size);
#endif /* HAVE_LZ4 */
#ifdef HAVE_LZO
- case PAGE_LZO_ALGORITHM: {
- lzo_uint len_lzo = srv_page_size;
- if (LZO_E_OK == lzo1x_decompress_safe(
- buf + header_len,
- actual_size, tmp_buf, &len_lzo, NULL)
- && len_lzo == srv_page_size) {
- break;
+ case PAGE_LZO_ALGORITHM:
+ {
+ lzo_uint len_lzo = srv_page_size;
+ return (LZO_E_OK == lzo1x_decompress_safe(
+ buf + header_len,
+ actual_size, tmp_buf, &len_lzo, NULL)
+ && len_lzo == srv_page_size);
}
- return 0;
- }
#endif /* HAVE_LZO */
#ifdef HAVE_LZMA
- case PAGE_LZMA_ALGORITHM: {
- size_t src_pos = 0;
- size_t dst_pos = 0;
- uint64_t memlimit = UINT64_MAX;
-
- if (LZMA_OK == lzma_stream_buffer_decode(
- &memlimit, 0, NULL, buf + header_len,
- &src_pos, actual_size, tmp_buf, &dst_pos,
- srv_page_size)
- && dst_pos == srv_page_size) {
- break;
+ case PAGE_LZMA_ALGORITHM:
+ {
+ size_t src_pos = 0;
+ size_t dst_pos = 0;
+ uint64_t memlimit = UINT64_MAX;
+
+ return LZMA_OK == lzma_stream_buffer_decode(
+ &memlimit, 0, NULL, buf + header_len,
+ &src_pos, actual_size, tmp_buf, &dst_pos,
+ srv_page_size)
+ && dst_pos == srv_page_size;
}
- return 0;
- }
#endif /* HAVE_LZMA */
#ifdef HAVE_BZIP2
- case PAGE_BZIP2_ALGORITHM: {
- unsigned int dst_pos = srv_page_size;
- if (BZ_OK == BZ2_bzBuffToBuffDecompress(
- reinterpret_cast<char*>(tmp_buf),
- &dst_pos,
- reinterpret_cast<char*>(buf) + header_len,
- actual_size, 1, 0)
- && dst_pos == srv_page_size) {
- break;
+ case PAGE_BZIP2_ALGORITHM:
+ {
+ unsigned int dst_pos = srv_page_size;
+ return BZ_OK == BZ2_bzBuffToBuffDecompress(
+ reinterpret_cast<char*>(tmp_buf),
+ &dst_pos,
+ reinterpret_cast<char*>(buf) + header_len,
+ actual_size, 1, 0)
+ && dst_pos == srv_page_size;
}
- return 0;
- }
#endif /* HAVE_BZIP2 */
#ifdef HAVE_SNAPPY
- case PAGE_SNAPPY_ALGORITHM: {
- size_t olen = srv_page_size;
-
- if (SNAPPY_OK == snappy_uncompress(
- reinterpret_cast<const char*>(buf) + header_len,
- actual_size,
- reinterpret_cast<char*>(tmp_buf), &olen)
- && olen == srv_page_size) {
- break;
+ case PAGE_SNAPPY_ALGORITHM:
+ {
+ size_t olen = srv_page_size;
+
+ return SNAPPY_OK == snappy_uncompress(
+ reinterpret_cast<const char*>(buf)
+ + header_len,
+ actual_size,
+ reinterpret_cast<char*>(tmp_buf), &olen)
+ && olen == srv_page_size;
}
+#endif /* HAVE_SNAPPY */
+ }
+
+ return false;
+}
+
+/** Decompress a page for full crc32 format.
+@param[in,out] tmp_buf temporary buffer (of innodb_page_size)
+@param[in,out] buf possibly compressed page buffer
+@param[in] flags tablespace flags
+@return size of the compressed data
+@retval 0 if decompression failed
+@retval srv_page_size if the page was not compressed */
+ulint fil_page_decompress_for_full_crc32(byte* tmp_buf, byte* buf, ulint flags)
+{
+ ut_ad(fil_space_t::full_crc32(flags));
+ bool compressed = false;
+ size_t size = buf_page_full_crc32_size(buf, &compressed, NULL);
+ if (!compressed) {
+ ut_ad(size == srv_page_size);
+ return size;
+ }
+
+ if (!fil_space_t::is_compressed(flags)) {
return 0;
}
-#endif /* HAVE_SNAPPY */
+
+ if (size >= srv_page_size) {
+ return 0;
+ }
+
+ if (fil_space_t::full_crc32_page_compressed_len(flags)) {
+ compile_time_assert(FIL_PAGE_FCRC32_CHECKSUM == 4);
+ if (size_t lsb = buf[size - 5]) {
+ size += lsb - 0x100;
+ }
+ size -= 5;
+ }
+
+ const size_t header_len = FIL_PAGE_COMP_ALGO;
+
+ if (!fil_page_decompress_low(tmp_buf, buf,
+ fil_space_t::get_compression_algo(flags),
+ header_len, size - header_len)) {
+ return 0;
+ }
+
+ srv_stats.pages_page_decompressed.inc();
+ memcpy(buf, tmp_buf, srv_page_size);
+ return size;
+}
+
+/** Decompress a page for non full crc32 format.
+@param[in,out] tmp_buf temporary buffer (of innodb_page_size)
+@param[in,out] buf possibly compressed page buffer
+@return size of the compressed data
+@retval 0 if decompression failed
+@retval srv_page_size if the page was not compressed */
+ulint fil_page_decompress_for_non_full_crc32(
+ byte* tmp_buf,
+ byte* buf)
+{
+ const unsigned ptype = mach_read_from_2(buf+FIL_PAGE_TYPE);
+ ulint header_len;
+ uint comp_algo;
+ switch (ptype) {
+ case FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED:
+ header_len= FIL_PAGE_DATA + FIL_PAGE_ENCRYPT_COMP_METADATA_LEN;
+ comp_algo = mach_read_from_2(
+ FIL_PAGE_DATA + FIL_PAGE_ENCRYPT_COMP_ALGO + buf);
+ break;
+ case FIL_PAGE_PAGE_COMPRESSED:
+ header_len = FIL_PAGE_DATA + FIL_PAGE_COMP_METADATA_LEN;
+ if (mach_read_from_6(FIL_PAGE_COMP_ALGO + buf)) {
+ return 0;
+ }
+ comp_algo = mach_read_from_2(FIL_PAGE_COMP_ALGO + 6 + buf);
+ break;
+ default:
+ return srv_page_size;
+ }
+
+ if (mach_read_from_4(buf + FIL_PAGE_SPACE_OR_CHKSUM)
+ != BUF_NO_CHECKSUM_MAGIC) {
+ return 0;
+ }
+
+ ulint actual_size = mach_read_from_2(buf + FIL_PAGE_DATA
+ + FIL_PAGE_COMP_SIZE);
+
+ /* Check if payload size is corrupted */
+ if (actual_size == 0 || actual_size > srv_page_size - header_len) {
+ return 0;
+ }
+
+ if (!fil_page_decompress_low(tmp_buf, buf, comp_algo, header_len,
+ actual_size)) {
+ return 0;
}
srv_stats.pages_page_decompressed.inc();
memcpy(buf, tmp_buf, srv_page_size);
return actual_size;
}
+
+/** Decompress a page that may be subject to page_compressed compression.
+@param[in,out] tmp_buf temporary buffer (of innodb_page_size)
+@param[in,out] buf possibly compressed page buffer
+@param[in] flags tablespace flags
+@return size of the compressed data
+@retval 0 if decompression failed
+@retval srv_page_size if the page was not compressed */
+ulint fil_page_decompress(
+ byte* tmp_buf,
+ byte* buf,
+ ulint flags)
+{
+ if (fil_space_t::full_crc32(flags)) {
+ return fil_page_decompress_for_full_crc32(tmp_buf, buf, flags);
+ }
+
+ return fil_page_decompress_for_non_full_crc32(tmp_buf, buf);
+}
diff --git a/storage/innobase/fsp/fsp0file.cc b/storage/innobase/fsp/fsp0file.cc
index 90ddca77549..1390915655c 100644
--- a/storage/innobase/fsp/fsp0file.cc
+++ b/storage/innobase/fsp/fsp0file.cc
@@ -343,7 +343,7 @@ Datafile::read_first_page(bool read_only_mode)
if (m_order == 0) {
m_space_id = fsp_header_get_space_id(m_first_page);
m_flags = fsp_header_get_flags(m_first_page);
- if (!fsp_flags_is_valid(m_flags, m_space_id)) {
+ if (!fil_space_t::is_valid_flags(m_flags, m_space_id)) {
ulint cflags = fsp_flags_convert_from_101(m_flags);
if (cflags == ULINT_UNDEFINED) {
ib::error()
@@ -356,8 +356,9 @@ Datafile::read_first_page(bool read_only_mode)
}
}
- const page_size_t ps(m_flags);
- if (ps.physical() > page_size) {
+ const size_t physical_size = fil_space_t::physical_size(m_flags);
+
+ if (physical_size > page_size) {
ib::error() << "File " << m_filepath
<< " should be longer than "
<< page_size << " bytes";
@@ -407,7 +408,9 @@ Datafile::validate_to_dd(ulint space_id, ulint flags)
/* Make sure the datafile we found matched the space ID.
If the datafile is a file-per-table tablespace then also match
the row format and zip page size. */
- if (m_space_id == space_id && m_flags == flags) {
+ if (m_space_id == space_id
+ && (fil_space_t::is_flags_equal(flags, m_flags)
+ || fil_space_t::is_flags_equal(m_flags, flags))) {
/* Datafile matches the tablespace expected. */
return(DB_SUCCESS);
}
@@ -537,19 +540,19 @@ err_exit:
}
}
- if (!fsp_flags_is_valid(m_flags, m_space_id)) {
+ if (!fil_space_t::is_valid_flags(m_flags, m_space_id)) {
/* Tablespace flags must be valid. */
error_txt = "Tablespace flags are invalid";
goto err_exit;
}
- const page_size_t page_size(m_flags);
+ ulint logical_size = fil_space_t::logical_size(m_flags);
- if (srv_page_size != page_size.logical()) {
+ if (srv_page_size != logical_size) {
/* Logical size must be innodb_page_size. */
ib::error()
<< "Data file '" << m_filepath << "' uses page size "
- << page_size.logical() << ", but the innodb_page_size"
+ << logical_size << ", but the innodb_page_size"
" start-up parameter is "
<< srv_page_size;
free_first_page();
@@ -567,7 +570,7 @@ err_exit:
goto err_exit;
}
- if (buf_page_is_corrupted(false, m_first_page, page_size)) {
+ if (buf_page_is_corrupted(false, m_first_page, m_flags)) {
/* Look for checksum and other corruptions. */
error_txt = "Checksum mismatch";
goto err_exit;
@@ -629,7 +632,6 @@ Datafile::find_space_id()
for (ulint page_size = UNIV_ZIP_SIZE_MIN;
page_size <= UNIV_PAGE_SIZE_MAX;
page_size <<= 1) {
-
/* map[space_id] = count of pages */
typedef std::map<
ulint,
@@ -657,6 +659,20 @@ Datafile::find_space_id()
byte* page = static_cast<byte*>(
ut_align(buf, UNIV_SECTOR_SIZE));
+ ulint fsp_flags;
+ /* provide dummy value if the first os_file_read() fails */
+ switch (srv_checksum_algorithm) {
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ fsp_flags = 1U << FSP_FLAGS_FCRC32_POS_MARKER
+ | FSP_FLAGS_FCRC32_PAGE_SSIZE()
+ | innodb_compression_algorithm
+ << FSP_FLAGS_FCRC32_POS_COMPRESSED_ALGO;
+ break;
+ default:
+ fsp_flags = 0;
+ }
+
for (ulint j = 0; j < page_count; ++j) {
dberr_t err;
@@ -674,33 +690,27 @@ Datafile::find_space_id()
continue;
}
+ if (j == 0) {
+ fsp_flags = mach_read_from_4(
+ page + FSP_HEADER_OFFSET + FSP_SPACE_FLAGS);
+ }
+
bool noncompressed_ok = false;
/* For noncompressed pages, the page size must be
equal to srv_page_size. */
- if (page_size == srv_page_size) {
+ if (page_size == srv_page_size
+ && !fil_space_t::zip_size(fsp_flags)) {
noncompressed_ok = !buf_page_is_corrupted(
- false, page, univ_page_size, NULL);
+ false, page, fsp_flags);
}
bool compressed_ok = false;
- /* file-per-table tablespaces can be compressed with
- the same physical and logical page size. General
- tablespaces must have different physical and logical
- page sizes in order to be compressed. For this check,
- assume the page is compressed if univ_page_size.
- logical() is equal to or less than 16k and the
- page_size we are checking is equal to or less than
- srv_page_size. */
if (srv_page_size <= UNIV_PAGE_SIZE_DEF
- && page_size <= srv_page_size) {
- const page_size_t compr_page_size(
- page_size, srv_page_size,
- true);
-
+ && page_size == fil_space_t::zip_size(fsp_flags)) {
compressed_ok = !buf_page_is_corrupted(
- false, page, compr_page_size, NULL);
+ false, page, fsp_flags);
}
if (noncompressed_ok || compressed_ok) {
@@ -769,7 +779,7 @@ Datafile::restore_from_doublewrite()
/* Find if double write buffer contains page_no of given space id. */
const page_id_t page_id(m_space_id, 0);
- const byte* page = recv_sys->dblwr.find_page(page_id);
+ const byte* page = recv_sys.dblwr.find_page(page_id);
if (!page) {
/* If the first page of the given user tablespace is not there
@@ -787,7 +797,7 @@ Datafile::restore_from_doublewrite()
ulint flags = mach_read_from_4(
FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page);
- if (!fsp_flags_is_valid(flags, m_space_id)) {
+ if (!fil_space_t::is_valid_flags(flags, m_space_id)) {
flags = fsp_flags_convert_from_101(flags);
/* recv_dblwr_t::validate_page() inside find_page()
checked this already. */
@@ -795,21 +805,21 @@ Datafile::restore_from_doublewrite()
/* The flags on the page should be converted later. */
}
- const page_size_t page_size(flags);
+ ulint physical_size = fil_space_t::physical_size(flags);
ut_a(page_get_page_no(page) == page_id.page_no());
ib::info() << "Restoring page " << page_id
<< " of datafile '" << m_filepath
<< "' from the doublewrite buffer. Writing "
- << page_size.physical() << " bytes into file '"
+ << physical_size << " bytes into file '"
<< m_filepath << "'";
IORequest request(IORequest::WRITE);
return(os_file_write(
request,
- m_filepath, m_handle, page, 0, page_size.physical())
+ m_filepath, m_handle, page, 0, physical_size)
!= DB_SUCCESS);
}
@@ -916,8 +926,9 @@ RemoteDatafile::create_link_file(
prev_filepath = read_link_file(link_filepath);
if (prev_filepath) {
- /* Truncate will call this with an existing
- link file which contains the same filepath. */
+ /* Truncate (starting with MySQL 5.6, probably no
+ longer since MariaDB Server 10.2.19) used to call this
+ with an existing link file which contains the same filepath. */
bool same = !strcmp(prev_filepath, filepath);
ut_free(prev_filepath);
if (same) {
diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc
index ba50483cee4..96a5396f119 100644
--- a/storage/innobase/fsp/fsp0fsp.cc
+++ b/storage/innobase/fsp/fsp0fsp.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2021, MariaDB Corporation.
+Copyright (c) 2017, 2022, 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
@@ -50,7 +50,6 @@ typedef ulint page_no_t;
/** Return an extent to the free list of a space.
@param[in,out] space tablespace
@param[in] offset page number in the extent
-@param[in] page_size page size
@param[in,out] mtr mini-transaction */
MY_ATTRIBUTE((nonnull))
static
@@ -58,7 +57,6 @@ void
fsp_free_extent(
fil_space_t* space,
page_no_t offset,
- const page_size_t& page_size,
mtr_t* mtr);
/********************************************************************//**
@@ -78,7 +76,6 @@ We think of the extent lists of the segment catenated in the order
FSEG_FULL -> FSEG_NOT_FULL -> FSEG_FREE.
@param[in] inode segment inode
@param[in] space tablespace
-@param[in] page_size page size
@param[in,out] mtr mini-transaction
@return the first extent descriptor, or NULL if none */
MY_ATTRIBUTE((nonnull, warn_unused_result))
@@ -87,7 +84,6 @@ xdes_t*
fseg_get_first_extent(
fseg_inode_t* inode,
const fil_space_t* space,
- const page_size_t& page_size,
mtr_t* mtr);
/** Put new extents to the free list if there are free extents above the free
@@ -111,7 +107,6 @@ fsp_fill_free_list(
This function implements the intelligent allocation strategy which tries
to minimize file space fragmentation.
@param[in,out] space tablespace
-@param[in] page_size page size
@param[in,out] seg_inode segment inode
@param[in] hint hint of which page would be desirable
@param[in] direction if the new page is needed because of
@@ -131,7 +126,6 @@ static
buf_block_t*
fseg_alloc_free_page_low(
fil_space_t* space,
- const page_size_t& page_size,
fseg_inode_t* seg_inode,
ulint hint,
byte direction,
@@ -145,24 +139,16 @@ fseg_alloc_free_page_low(
/** Gets a pointer to the space header and x-locks its page.
@param[in] space tablespace
-@param[in] page_size page size
@param[in,out] mtr mini-transaction
@return pointer to the space header, page x-locked */
-UNIV_INLINE
-fsp_header_t*
-fsp_get_space_header(
- const fil_space_t* space,
- const page_size_t& page_size,
- mtr_t* mtr)
+inline fsp_header_t* fsp_get_space_header(const fil_space_t* space, mtr_t* mtr)
{
buf_block_t* block;
fsp_header_t* header;
ut_ad(space->purpose != FIL_TYPE_LOG);
- ut_ad(!FSP_FLAGS_GET_ZIP_SSIZE(space->flags)
- == !page_size.is_compressed());
- block = buf_page_get(page_id_t(space->id, 0), page_size,
+ block = buf_page_get(page_id_t(space->id, 0), space->zip_size(),
RW_SX_LATCH, mtr);
header = FSP_HEADER_OFFSET + buf_block_get_frame(block);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
@@ -373,19 +359,10 @@ xdes_init(
xdes_t* descr, /*!< in: descriptor */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
- ulint i;
-
- ut_ad(descr && mtr);
- ut_ad(mtr_memo_contains_page(
- mtr, descr,
- MTR_MEMO_PAGE_SX_FIX | MTR_MEMO_PAGE_X_FIX));
- ut_ad((XDES_SIZE - XDES_BITMAP) % 4 == 0);
-
- for (i = XDES_BITMAP; i < XDES_SIZE; i += 4) {
- mlog_write_ulint(descr + i, 0xFFFFFFFFUL, MLOG_4BYTES, mtr);
- }
-
- xdes_set_state(descr, XDES_FREE, mtr);
+ ut_ad(mtr_memo_contains_page(mtr, descr, MTR_MEMO_PAGE_SX_FIX |
+ MTR_MEMO_PAGE_X_FIX));
+ mlog_memset(descr + XDES_BITMAP, XDES_SIZE - XDES_BITMAP, 0xff, mtr);
+ xdes_set_state(descr, XDES_FREE, mtr);
}
/** Get pointer to a the extent descriptor of a page.
@@ -432,9 +409,9 @@ xdes_get_descriptor_with_space_hdr(
return(NULL);
}
- const page_size_t page_size(space->flags);
+ const ulint zip_size = space->zip_size();
- descr_page_no = xdes_calc_descriptor_page(page_size, offset);
+ descr_page_no = xdes_calc_descriptor_page(zip_size, offset);
buf_block_t* block;
@@ -445,7 +422,7 @@ xdes_get_descriptor_with_space_hdr(
block = NULL;
} else {
block = buf_page_get(
- page_id_t(space->id, descr_page_no), page_size,
+ page_id_t(space->id, descr_page_no), zip_size,
RW_SX_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
@@ -458,7 +435,7 @@ xdes_get_descriptor_with_space_hdr(
}
return(descr_page + XDES_ARR_OFFSET
- + XDES_SIZE * xdes_calc_descriptor_index(page_size, offset));
+ + XDES_SIZE * xdes_calc_descriptor_index(zip_size, offset));
}
/** Get the extent descriptor of a page.
@@ -470,22 +447,17 @@ defined, as they are uninitialized above the free limit.
@param[in] space tablespace
@param[in] offset page offset; if equal to the free limit, we
try to add new extents to the space free list
-@param[in] page_size page size
@param[in,out] mtr mini-transaction
@return the extent descriptor */
MY_ATTRIBUTE((warn_unused_result))
static
xdes_t*
-xdes_get_descriptor(
- const fil_space_t* space,
- page_no_t offset,
- const page_size_t& page_size,
- mtr_t* mtr)
+xdes_get_descriptor(const fil_space_t* space, page_no_t offset, mtr_t* mtr)
{
buf_block_t* block;
fsp_header_t* sp_header;
- block = buf_page_get(page_id_t(space->id, 0), page_size,
+ block = buf_page_get(page_id_t(space->id, 0), space->zip_size(),
RW_SX_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
@@ -504,7 +476,6 @@ defined, as they are uninitialized above the free limit.
@param[in] space tablespace
@param[in] page descriptor page offset
@param[in] offset page offset
-@param[in] page_size page size
@param[in,out] mtr mini-transaction
@return the extent descriptor
@retval NULL if the descriptor is not available */
@@ -515,15 +486,16 @@ xdes_get_descriptor_const(
const fil_space_t* space,
page_no_t page,
page_no_t offset,
- const page_size_t& page_size,
mtr_t* mtr)
{
ut_ad(mtr_memo_contains(mtr, &space->latch, MTR_MEMO_S_LOCK));
ut_ad(offset < space->free_limit);
ut_ad(offset < space->size_in_header);
+ const ulint zip_size = space->zip_size();
+
if (buf_block_t* block = buf_page_get(page_id_t(space->id, page),
- page_size, RW_S_LATCH, mtr)) {
+ zip_size, RW_S_LATCH, mtr)) {
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
ut_ad(page != 0 || space->free_limit == mach_read_from_4(
@@ -534,7 +506,7 @@ xdes_get_descriptor_const(
+ block->frame));
return(block->frame + XDES_ARR_OFFSET + XDES_SIZE
- * xdes_calc_descriptor_index(page_size, offset));
+ * xdes_calc_descriptor_index(zip_size, offset));
}
return(NULL);
@@ -543,7 +515,6 @@ xdes_get_descriptor_const(
/** Get a pointer to the extent descriptor. The page where the
extent descriptor resides is x-locked.
@param[in] space tablespace
-@param[in] page_size page size
@param[in] lst_node file address of the list node
contained in the descriptor
@param[in,out] mtr mini-transaction
@@ -553,14 +524,13 @@ UNIV_INLINE
xdes_t*
xdes_lst_get_descriptor(
const fil_space_t* space,
- const page_size_t& page_size,
fil_addr_t lst_node,
mtr_t* mtr)
{
ut_ad(mtr_memo_contains(mtr, space, MTR_MEMO_SPACE_X_LOCK));
- ut_ad(page_size.equals_to(page_size_t(space->flags)));
- return(fut_get_ptr(space->id, page_size, lst_node, RW_SX_LATCH, mtr)
- - XDES_FLST_NODE);
+ return fut_get_ptr(space->id, space->zip_size(),
+ lst_node, RW_SX_LATCH, mtr)
+ - XDES_FLST_NODE;
}
/********************************************************************//**
@@ -617,9 +587,7 @@ void fil_space_t::modify_check(const mtr_t& mtr) const
case MTR_LOG_NO_REDO:
ut_ad(purpose == FIL_TYPE_TEMPORARY
|| purpose == FIL_TYPE_IMPORT
- || my_atomic_loadlint(&redo_skipped_count)
- || is_being_truncated
- || srv_is_tablespace_truncated(id));
+ || redo_skipped_count);
return;
case MTR_LOG_ALL:
/* We may only write redo log for a persistent
@@ -645,7 +613,7 @@ fsp_header_init_fields(
ulint flags) /*!< in: tablespace flags (FSP_SPACE_FLAGS) */
{
flags &= ~FSP_FLAGS_MEM_MASK;
- ut_a(fsp_flags_is_valid(flags, space_id));
+ ut_a(fil_space_t::is_valid_flags(flags, space_id));
mach_write_to_4(FSP_HEADER_OFFSET + FSP_SPACE_ID + page,
space_id);
@@ -659,11 +627,11 @@ fsp_header_init_fields(
@param[in,out] mtr mini-transaction */
void fsp_header_init(fil_space_t* space, ulint size, mtr_t* mtr)
{
- const page_id_t page_id(space->id, 0);
- const page_size_t page_size(space->flags);
+ const page_id_t page_id(space->id, 0);
+ const ulint zip_size = space->zip_size();
mtr_x_lock_space(space, mtr);
- buf_block_t* block = buf_page_create(page_id, page_size, mtr);
+ buf_block_t* block = buf_page_create(page_id, zip_size, mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
space->size_in_header = size;
@@ -679,23 +647,23 @@ void fsp_header_init(fil_space_t* space, ulint size, mtr_t* mtr)
mlog_write_ulint(FSP_HEADER_OFFSET + FSP_SPACE_ID + block->frame,
space->id, MLOG_4BYTES, mtr);
- mlog_write_ulint(FSP_HEADER_OFFSET + FSP_NOT_USED + block->frame, 0,
- MLOG_4BYTES, mtr);
+ ut_ad(0 == mach_read_from_4(FSP_HEADER_OFFSET + FSP_NOT_USED
+ + block->frame));
mlog_write_ulint(FSP_HEADER_OFFSET + FSP_SIZE + block->frame, size,
MLOG_4BYTES, mtr);
- mlog_write_ulint(FSP_HEADER_OFFSET + FSP_FREE_LIMIT + block->frame, 0,
- MLOG_4BYTES, mtr);
+ ut_ad(0 == mach_read_from_4(FSP_HEADER_OFFSET + FSP_FREE_LIMIT
+ + block->frame));
mlog_write_ulint(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + block->frame,
space->flags & ~FSP_FLAGS_MEM_MASK,
MLOG_4BYTES, mtr);
- mlog_write_ulint(FSP_HEADER_OFFSET + FSP_FRAG_N_USED + block->frame, 0,
- MLOG_4BYTES, mtr);
+ ut_ad(0 == mach_read_from_4(FSP_HEADER_OFFSET + FSP_FRAG_N_USED
+ + block->frame));
- flst_init(FSP_HEADER_OFFSET + FSP_FREE + block->frame, mtr);
- flst_init(FSP_HEADER_OFFSET + FSP_FREE_FRAG + block->frame, mtr);
- flst_init(FSP_HEADER_OFFSET + FSP_FULL_FRAG + block->frame, mtr);
- flst_init(FSP_HEADER_OFFSET + FSP_SEG_INODES_FULL + block->frame, mtr);
- flst_init(FSP_HEADER_OFFSET + FSP_SEG_INODES_FREE + block->frame, mtr);
+ flst_init(block, FSP_HEADER_OFFSET + FSP_FREE, mtr);
+ flst_init(block, FSP_HEADER_OFFSET + FSP_FREE_FRAG, mtr);
+ flst_init(block, FSP_HEADER_OFFSET + FSP_FULL_FRAG, mtr);
+ flst_init(block, FSP_HEADER_OFFSET + FSP_SEG_INODES_FULL, mtr);
+ flst_init(block, FSP_HEADER_OFFSET + FSP_SEG_INODES_FREE, mtr);
mlog_write_ull(FSP_HEADER_OFFSET + FSP_SEG_ID + block->frame, 1, mtr);
@@ -772,6 +740,44 @@ fsp_try_extend_data_file_with_pages(
return(success);
}
+/** Calculate the number of physical pages in an extent for this file.
+@param[in] physical_size page_size of the datafile
+@return number of pages in an extent for this file */
+inline ulint fsp_get_extent_size_in_pages(ulint physical_size)
+{
+ return (FSP_EXTENT_SIZE << srv_page_size_shift) / physical_size;
+}
+
+
+/** Calculate the number of pages to extend a datafile.
+We extend single-table tablespaces first one extent at a time,
+but 4 at a time for bigger tablespaces. It is not enough to extend always
+by one extent, because we need to add at least one extent to FSP_FREE.
+A single extent descriptor page will track many extents. And the extent
+that uses its extent descriptor page is put onto the FSP_FREE_FRAG list.
+Extents that do not use their extent descriptor page are added to FSP_FREE.
+The physical page size is used to determine how many extents are tracked
+on one extent descriptor page. See xdes_calc_descriptor_page().
+@param[in] physical_size page size in data file
+@param[in] size current number of pages in the datafile
+@return number of pages to extend the file. */
+static ulint fsp_get_pages_to_extend_ibd(ulint physical_size, ulint size)
+{
+ ulint extent_size = fsp_get_extent_size_in_pages(physical_size);
+ /* The threshold is set at 32MiB except when the physical page
+ size is small enough that it must be done sooner. */
+ ulint threshold = std::min(32 * extent_size, physical_size);
+
+ if (size >= threshold) {
+ /* Below in fsp_fill_free_list() we assume
+ that we add at most FSP_FREE_ADD extents at
+ a time */
+ extent_size *= FSP_FREE_ADD;
+ }
+
+ return extent_size;
+}
+
/** Try to extend the last data file of a tablespace if it is auto-extending.
@param[in,out] space tablespace
@param[in,out] header tablespace header
@@ -824,8 +830,7 @@ fsp_try_extend_data_file(fil_space_t* space, fsp_header_t* header, mtr_t* mtr)
size = mach_read_from_4(header + FSP_SIZE);
ut_ad(size == space->size_in_header);
- const page_size_t page_size(
- mach_read_from_4(header + FSP_SPACE_FLAGS));
+ const ulint ps = space->physical_size();
switch (space->id) {
case TRX_SYS_SPACE:
@@ -835,8 +840,7 @@ fsp_try_extend_data_file(fil_space_t* space, fsp_header_t* header, mtr_t* mtr)
size_increase = srv_tmp_space.get_increment();
break;
default:
- ulint extent_pages
- = fsp_get_extent_size_in_pages(page_size);
+ ulint extent_pages = fsp_get_extent_size_in_pages(ps);
if (size < extent_pages) {
/* Let us first extend the file to extent_size */
if (!fsp_try_extend_data_file_with_pages(
@@ -847,7 +851,7 @@ fsp_try_extend_data_file(fil_space_t* space, fsp_header_t* header, mtr_t* mtr)
size = extent_pages;
}
- size_increase = fsp_get_pages_to_extend_ibd(page_size, size);
+ size_increase = fsp_get_pages_to_extend_ibd(ps, size);
}
if (size_increase == 0) {
@@ -863,8 +867,7 @@ fsp_try_extend_data_file(fil_space_t* space, fsp_header_t* header, mtr_t* mtr)
space->size_in_header = space->id
? space->size
- : ut_2pow_round(space->size,
- (1024 * 1024) / page_size.physical());
+ : ut_2pow_round(space->size, (1024 * 1024) / ps);
mlog_write_ulint(
header + FSP_SIZE, space->size_in_header, MLOG_4BYTES, mtr);
@@ -872,47 +875,6 @@ fsp_try_extend_data_file(fil_space_t* space, fsp_header_t* header, mtr_t* mtr)
return(size_increase);
}
-/** Calculate the number of pages to extend a datafile.
-We extend single-table tablespaces first one extent at a time,
-but 4 at a time for bigger tablespaces. It is not enough to extend always
-by one extent, because we need to add at least one extent to FSP_FREE.
-A single extent descriptor page will track many extents. And the extent
-that uses its extent descriptor page is put onto the FSP_FREE_FRAG list.
-Extents that do not use their extent descriptor page are added to FSP_FREE.
-The physical page size is used to determine how many extents are tracked
-on one extent descriptor page. See xdes_calc_descriptor_page().
-@param[in] page_size page_size of the datafile
-@param[in] size current number of pages in the datafile
-@return number of pages to extend the file. */
-ulint
-fsp_get_pages_to_extend_ibd(
- const page_size_t& page_size,
- ulint size)
-{
- ulint size_increase; /* number of pages to extend this file */
- ulint extent_size; /* one megabyte, in pages */
- ulint threshold; /* The size of the tablespace (in number
- of pages) where we start allocating more
- than one extent at a time. */
-
- extent_size = fsp_get_extent_size_in_pages(page_size);
-
- /* The threshold is set at 32MiB except when the physical page
- size is small enough that it must be done sooner. */
- threshold = ut_min(32 * extent_size, page_size.physical());
-
- if (size < threshold) {
- size_increase = extent_size;
- } else {
- /* Below in fsp_fill_free_list() we assume
- that we add at most FSP_FREE_ADD extents at
- a time */
- size_increase = FSP_FREE_ADD * extent_size;
- }
-
- return(size_increase);
-}
-
/** Reset the page type.
Data files created before MySQL 5.1.48 may contain garbage in FIL_PAGE_TYPE.
In MySQL 3.23.53, only undo log pages and index pages were tagged.
@@ -963,7 +925,7 @@ fsp_fill_free_list(
ut_ad(size == space->size_in_header);
ut_ad(limit == space->free_limit);
- const page_size_t page_size(space->flags);
+ const ulint zip_size = space->zip_size();
if (size < limit + FSP_EXTENT_SIZE * FSP_FREE_ADD) {
bool skip_resize = init_space;
@@ -987,8 +949,8 @@ fsp_fill_free_list(
while ((init_space && i < 1)
|| ((i + FSP_EXTENT_SIZE <= size) && (count < FSP_FREE_ADD))) {
- bool init_xdes
- = (ut_2pow_remainder(i, page_size.physical()) == 0);
+ const bool init_xdes = 0
+ == ut_2pow_remainder(i, ulint(space->physical_size()));
space->free_limit = i + FSP_EXTENT_SIZE;
mlog_write_ulint(header + FSP_FREE_LIMIT, i + FSP_EXTENT_SIZE,
@@ -1006,7 +968,7 @@ fsp_fill_free_list(
const page_id_t page_id(space->id, i);
block = buf_page_create(
- page_id, page_size, mtr);
+ page_id, zip_size, mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
@@ -1023,20 +985,21 @@ fsp_fill_free_list(
i + FSP_IBUF_BITMAP_OFFSET);
block = buf_page_create(
- page_id, page_size, mtr);
+ page_id, zip_size, mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
fsp_init_file_page(space, block, mtr);
-
- ibuf_bitmap_page_init(block, mtr);
+ mlog_write_ulint(block->frame + FIL_PAGE_TYPE,
+ FIL_PAGE_IBUF_BITMAP,
+ MLOG_2BYTES, mtr);
}
}
buf_block_t* desc_block = NULL;
descr = xdes_get_descriptor_with_space_hdr(
header, space, i, mtr, init_space, &desc_block);
- if (desc_block != NULL) {
+ if (desc_block && !space->full_crc32()) {
fil_block_check_type(
*desc_block, FIL_PAGE_TYPE_XDES, mtr);
}
@@ -1073,7 +1036,6 @@ fsp_fill_free_list(
/** Allocates a new free extent.
@param[in,out] space tablespace
-@param[in] page_size page size
@param[in] hint hint of which extent would be desirable: any
page offset in the extent goes; the hint must not be > FSP_FREE_LIMIT
@param[in,out] mtr mini-transaction
@@ -1082,7 +1044,6 @@ static
xdes_t*
fsp_alloc_free_extent(
fil_space_t* space,
- const page_size_t& page_size,
ulint hint,
mtr_t* mtr)
{
@@ -1091,12 +1052,12 @@ fsp_alloc_free_extent(
xdes_t* descr;
buf_block_t* desc_block = NULL;
- header = fsp_get_space_header(space, page_size, mtr);
+ header = fsp_get_space_header(space, mtr);
descr = xdes_get_descriptor_with_space_hdr(
header, space, hint, mtr, false, &desc_block);
- if (desc_block != NULL) {
+ if (desc_block && !space->full_crc32()) {
fil_block_check_type(*desc_block, FIL_PAGE_TYPE_XDES, mtr);
}
@@ -1117,8 +1078,7 @@ fsp_alloc_free_extent(
return(NULL); /* No free extents left */
}
- descr = xdes_lst_get_descriptor(
- space, page_size, first, mtr);
+ descr = xdes_lst_get_descriptor(space, first, mtr);
}
flst_remove(header + FSP_FREE, descr + XDES_FLST_NODE, mtr);
@@ -1169,7 +1129,6 @@ not previously x-latched. It is assumed that the block has been
x-latched only by mtr, and freed in mtr in that case.
@param[in,out] space tablespace
@param[in] offset page number of the allocated page
-@param[in] page_size page size of the allocated page
@param[in,out] mtr mini-transaction of the allocation
@param[in,out] init_mtr mini-transaction for initializing the page
@return block, initialized if init_mtr==mtr
@@ -1179,25 +1138,17 @@ buf_block_t*
fsp_page_create(
fil_space_t* space,
page_no_t offset,
- const page_size_t& page_size,
mtr_t* mtr,
mtr_t* init_mtr)
{
- ut_ad(page_size.equals_to(page_size_t(space->flags)));
-
buf_block_t* block = buf_page_create(page_id_t(space->id, offset),
- page_size, init_mtr);
-
- ut_d(bool latched = mtr_memo_contains_flagged(mtr, block,
- MTR_MEMO_PAGE_X_FIX));
+ space->zip_size(), init_mtr);
if (init_mtr == mtr
|| rw_lock_get_x_lock_count(&block->lock) == 1) {
-
/* Initialize the page, unless it was already
- SX-latched in mtr. (In this case, we would want to
+ latched in mtr. (In this case, we would want to
allocate another page that has not been freed in mtr.) */
- ut_ad(init_mtr == mtr || !latched);
fsp_init_file_page(space, block, init_mtr);
}
@@ -1207,7 +1158,6 @@ fsp_page_create(
/** Allocates a single free page from a space.
The page is marked as used.
@param[in,out] space tablespace
-@param[in] page_size page size
@param[in] hint hint of which page would be desirable
@param[in,out] mtr mini-transaction
@param[in,out] init_mtr mini-transaction in which the page should be
@@ -1220,7 +1170,6 @@ static MY_ATTRIBUTE((warn_unused_result, nonnull))
buf_block_t*
fsp_alloc_free_page(
fil_space_t* space,
- const page_size_t& page_size,
ulint hint,
mtr_t* mtr,
mtr_t* init_mtr)
@@ -1232,7 +1181,7 @@ fsp_alloc_free_page(
const ulint space_id = space->id;
ut_d(space->modify_check(*mtr));
- header = fsp_get_space_header(space, page_size, mtr);
+ header = fsp_get_space_header(space, mtr);
/* Get the hinted descriptor */
descr = xdes_get_descriptor_with_space_hdr(header, space, hint, mtr);
@@ -1251,8 +1200,7 @@ fsp_alloc_free_page(
FREE_FRAG list. But we will allocate our page from the
the free extent anyway. */
- descr = fsp_alloc_free_extent(space, page_size,
- hint, mtr);
+ descr = fsp_alloc_free_extent(space, hint, mtr);
if (descr == NULL) {
/* No free space left */
@@ -1264,8 +1212,7 @@ fsp_alloc_free_page(
flst_add_last(header + FSP_FREE_FRAG,
descr + XDES_FLST_NODE, mtr);
} else {
- descr = xdes_lst_get_descriptor(space, page_size,
- first, mtr);
+ descr = xdes_lst_get_descriptor(space, first, mtr);
}
/* Reset the hint */
@@ -1313,22 +1260,17 @@ fsp_alloc_free_page(
}
fsp_alloc_from_free_frag(header, descr, free, mtr);
- return(fsp_page_create(space, page_no, page_size, mtr, init_mtr));
+ return fsp_page_create(space, page_no, mtr, init_mtr);
}
/** Frees a single page of a space.
The page is marked as free and clean.
@param[in,out] space tablespace
@param[in] offset page number
-@param[in] page_size page size
+@param[in] log whether to write MLOG_INIT_FREE_PAGE record
@param[in,out] mtr mini-transaction */
-static
-void
-fsp_free_page(
- fil_space_t* space,
- ulint offset,
- const page_size_t& page_size,
- mtr_t* mtr)
+static void fsp_free_page(fil_space_t* space, page_no_t offset,
+ bool log, mtr_t* mtr)
{
fsp_header_t* header;
xdes_t* descr;
@@ -1340,7 +1282,7 @@ fsp_free_page(
/* fprintf(stderr, "Freeing page %lu in space %lu\n", page, space); */
- header = fsp_get_space_header(space, page_size, mtr);
+ header = fsp_get_space_header(space, mtr);
descr = xdes_get_descriptor_with_space_hdr(
header, space, offset, mtr);
@@ -1382,14 +1324,24 @@ fsp_free_page(
return;
}
+ if (UNIV_UNLIKELY(!log)) {
+ /* The last page freed in BtrBulk::finish() must be
+ written with redo logging disabled for the page
+ itself. The modifications of the allocation data
+ structures are covered by redo log. */
+ } else if (byte* log_ptr = mlog_open(mtr, 11)) {
+ log_ptr = mlog_write_initial_log_record_low(
+ MLOG_INIT_FREE_PAGE, space->id, offset, log_ptr, mtr);
+ mlog_close(mtr, log_ptr);
+ }
+
const ulint bit = offset % FSP_EXTENT_SIZE;
xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr);
/* xdes_init() should have set all XDES_CLEAN_BIT */
ut_ad(xdes_get_bit(descr, XDES_CLEAN_BIT, bit));
- frag_n_used = mtr_read_ulint(header + FSP_FRAG_N_USED, MLOG_4BYTES,
- mtr);
+ frag_n_used = mach_read_from_4(header + FSP_FRAG_N_USED);
if (state == XDES_FULL_FRAG) {
/* The fragment was full: move it to another list */
flst_remove(header + FSP_FULL_FRAG, descr + XDES_FLST_NODE,
@@ -1410,29 +1362,22 @@ fsp_free_page(
/* The extent has become free: move it to another list */
flst_remove(header + FSP_FREE_FRAG, descr + XDES_FLST_NODE,
mtr);
- fsp_free_extent(space, offset, page_size, mtr);
+ fsp_free_extent(space, offset, mtr);
}
}
/** Return an extent to the free list of a space.
@param[in,out] space tablespace
@param[in] offset page number in the extent
-@param[in] page_size page size
@param[in,out] mtr mini-transaction */
-static
-void
-fsp_free_extent(
- fil_space_t* space,
- page_no_t offset,
- const page_size_t& page_size,
- mtr_t* mtr)
+static void fsp_free_extent(fil_space_t* space, page_no_t offset, mtr_t* mtr)
{
fsp_header_t* header;
xdes_t* descr;
ut_ad(mtr_memo_contains(mtr, space, MTR_MEMO_SPACE_X_LOCK));
- header = fsp_get_space_header(space, page_size, mtr);
+ header = fsp_get_space_header(space, mtr);
descr = xdes_get_descriptor_with_space_hdr(
header, space, offset, mtr);
@@ -1445,10 +1390,16 @@ fsp_free_extent(
space->free_len++;
}
+/** @return Number of segment inodes which fit on a single page */
+inline ulint FSP_SEG_INODES_PER_PAGE(ulint physical_size)
+{
+ return (physical_size - FSEG_ARR_OFFSET - 10) / FSEG_INODE_SIZE;
+}
+
/** Returns the nth inode slot on an inode page.
@param[in] page segment inode page
@param[in] i inode index on page
-@param[in] page_size page size
+@param[in] physical_size page size
@param[in,out] mtr mini-transaction
@return segment inode */
UNIV_INLINE
@@ -1456,10 +1407,10 @@ fseg_inode_t*
fsp_seg_inode_page_get_nth_inode(
page_t* page,
ulint i,
- const page_size_t& page_size,
+ ulint physical_size,
mtr_t* mtr)
{
- ut_ad(i < FSP_SEG_INODES_PER_PAGE(page_size));
+ ut_ad(i < FSP_SEG_INODES_PER_PAGE(physical_size));
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_SX_FIX));
return(page + FSEG_ARR_OFFSET + FSEG_INODE_SIZE * i);
@@ -1467,23 +1418,23 @@ fsp_seg_inode_page_get_nth_inode(
/** Looks for a used segment inode on a segment inode page.
@param[in] page segment inode page
-@param[in] page_size page size
+@param[in] physical_size page size
@param[in,out] mtr mini-transaction
@return segment inode index, or ULINT_UNDEFINED if not found */
static
ulint
fsp_seg_inode_page_find_used(
page_t* page,
- const page_size_t& page_size,
+ ulint physical_size,
mtr_t* mtr)
{
ulint i;
fseg_inode_t* inode;
- for (i = 0; i < FSP_SEG_INODES_PER_PAGE(page_size); i++) {
+ for (i = 0; i < FSP_SEG_INODES_PER_PAGE(physical_size); i++) {
inode = fsp_seg_inode_page_get_nth_inode(
- page, i, page_size, mtr);
+ page, i, physical_size, mtr);
if (mach_read_from_8(inode + FSEG_ID)) {
/* This is used */
@@ -1500,7 +1451,7 @@ fsp_seg_inode_page_find_used(
/** Looks for an unused segment inode on a segment inode page.
@param[in] page segment inode page
@param[in] i search forward starting from this index
-@param[in] page_size page size
+@param[in] physical_size page size
@param[in,out] mtr mini-transaction
@return segment inode index, or ULINT_UNDEFINED if not found */
static
@@ -1508,15 +1459,15 @@ ulint
fsp_seg_inode_page_find_free(
page_t* page,
ulint i,
- const page_size_t& page_size,
+ ulint physical_size,
mtr_t* mtr)
{
- for (; i < FSP_SEG_INODES_PER_PAGE(page_size); i++) {
+ for (; i < FSP_SEG_INODES_PER_PAGE(physical_size); i++) {
fseg_inode_t* inode;
inode = fsp_seg_inode_page_get_nth_inode(
- page, i, page_size, mtr);
+ page, i, physical_size, mtr);
if (!mach_read_from_8(inode + FSEG_ID)) {
/* This is unused */
@@ -1548,12 +1499,9 @@ fsp_alloc_seg_inode_page(
ut_ad(page_offset(space_header) == FSP_HEADER_OFFSET);
ut_ad(page_get_space_id(page_align(space_header)) == space->id);
- const page_size_t page_size(space->flags);
-
- block = fsp_alloc_free_page(space, page_size, 0, mtr, mtr);
-
- if (block == NULL) {
+ block = fsp_alloc_free_page(space, 0, mtr, mtr);
+ if (!block) {
return(false);
}
@@ -1565,7 +1513,7 @@ fsp_alloc_seg_inode_page(
#ifdef UNIV_DEBUG
const byte* inode = FSEG_ID + FSEG_ARR_OFFSET + block->frame;
- for (ulint i = FSP_SEG_INODES_PER_PAGE(page_size); i--;
+ for (ulint i = FSP_SEG_INODES_PER_PAGE(space->physical_size()); i--;
inode += FSEG_INODE_SIZE) {
ut_ad(!mach_read_from_8(inode));
}
@@ -1604,25 +1552,29 @@ fsp_alloc_seg_inode(
&& !fsp_alloc_seg_inode_page(space, space_header, mtr)) {
return(NULL);
}
- const page_size_t page_size(space->flags);
const page_id_t page_id(
space->id,
flst_get_first(space_header + FSP_SEG_INODES_FREE, mtr).page);
- block = buf_page_get(page_id, page_size, RW_SX_LATCH, mtr);
+ block = buf_page_get(page_id, space->zip_size(), RW_SX_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
- fil_block_check_type(*block, FIL_PAGE_INODE, mtr);
+ if (!space->full_crc32()) {
+ fil_block_check_type(*block, FIL_PAGE_INODE, mtr);
+ }
page = buf_block_get_frame(block);
- n = fsp_seg_inode_page_find_free(page, 0, page_size, mtr);
+ const ulint physical_size = space->physical_size();
+
+ n = fsp_seg_inode_page_find_free(page, 0, physical_size, mtr);
ut_a(n != ULINT_UNDEFINED);
- inode = fsp_seg_inode_page_get_nth_inode(page, n, page_size, mtr);
+ inode = fsp_seg_inode_page_get_nth_inode(page, n, physical_size, mtr);
if (ULINT_UNDEFINED == fsp_seg_inode_page_find_free(page, n + 1,
- page_size, mtr)) {
+ physical_size,
+ mtr)) {
/* There are no other unused headers left on the page: move it
to another list */
@@ -1640,14 +1592,10 @@ fsp_alloc_seg_inode(
/** Frees a file segment inode.
@param[in,out] space tablespace
-@param[in] page_size page size
@param[in,out] inode segment inode
@param[in,out] mtr mini-transaction */
-static
-void
-fsp_free_seg_inode(
+static void fsp_free_seg_inode(
fil_space_t* space,
- const page_size_t& page_size,
fseg_inode_t* inode,
mtr_t* mtr)
{
@@ -1658,12 +1606,14 @@ fsp_free_seg_inode(
page = page_align(inode);
- space_header = fsp_get_space_header(space, page_size, mtr);
+ space_header = fsp_get_space_header(space, mtr);
ut_ad(mach_read_from_4(inode + FSEG_MAGIC_N) == FSEG_MAGIC_N_VALUE);
+ const ulint physical_size = space->physical_size();
+
if (ULINT_UNDEFINED
- == fsp_seg_inode_page_find_free(page, 0, page_size, mtr)) {
+ == fsp_seg_inode_page_find_free(page, 0, physical_size, mtr)) {
/* Move the page to another list */
@@ -1678,21 +1628,21 @@ fsp_free_seg_inode(
mlog_write_ulint(inode + FSEG_MAGIC_N, 0xfa051ce3, MLOG_4BYTES, mtr);
if (ULINT_UNDEFINED
- == fsp_seg_inode_page_find_used(page, page_size, mtr)) {
+ == fsp_seg_inode_page_find_used(page, physical_size, mtr)) {
/* There are no other used headers left on the page: free it */
flst_remove(space_header + FSP_SEG_INODES_FREE,
page + FSEG_INODE_PAGE_NODE, mtr);
- fsp_free_page(space, page_get_page_no(page), page_size, mtr);
+ fsp_free_page(space, page_get_page_no(page), true, mtr);
}
}
/** Returns the file segment inode, page x-latched.
@param[in] header segment header
@param[in] space space id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] mtr mini-transaction
@param[out] block inode block, or NULL to ignore
@return segment inode, page x-latched; NULL if the inode is free */
@@ -1701,7 +1651,7 @@ fseg_inode_t*
fseg_inode_try_get(
fseg_header_t* header,
ulint space,
- const page_size_t& page_size,
+ ulint zip_size,
mtr_t* mtr,
buf_block_t** block)
{
@@ -1712,7 +1662,7 @@ fseg_inode_try_get(
inode_addr.boffset = mach_read_from_2(header + FSEG_HDR_OFFSET);
ut_ad(space == mach_read_from_4(header + FSEG_HDR_SPACE));
- inode = fut_get_ptr(space, page_size, inode_addr, RW_SX_LATCH, mtr,
+ inode = fut_get_ptr(space, zip_size, inode_addr, RW_SX_LATCH, mtr,
block);
if (UNIV_UNLIKELY(!mach_read_from_8(inode + FSEG_ID))) {
@@ -1729,7 +1679,7 @@ fseg_inode_try_get(
/** Returns the file segment inode, page x-latched.
@param[in] header segment header
@param[in] space space id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] mtr mini-transaction
@param[out] block inode block
@return segment inode, page x-latched */
@@ -1738,12 +1688,12 @@ fseg_inode_t*
fseg_inode_get(
fseg_header_t* header,
ulint space,
- const page_size_t& page_size,
+ ulint zip_size,
mtr_t* mtr,
buf_block_t** block = NULL)
{
fseg_inode_t* inode
- = fseg_inode_try_get(header, space, page_size, mtr, block);
+ = fseg_inode_try_get(header, space, zip_size, mtr, block);
ut_a(inode);
return(inode);
}
@@ -1885,7 +1835,6 @@ fseg_create(fil_space_t *space, ulint byte_offset, mtr_t *mtr,
ib_id_t seg_id;
fseg_header_t* header = 0; /* remove warning */
ulint n_reserved;
- ulint i;
bool reserved_extent = false;
DBUG_ENTER("fseg_create");
@@ -1896,21 +1845,24 @@ fseg_create(fil_space_t *space, ulint byte_offset, mtr_t *mtr,
<= srv_page_size - FIL_PAGE_DATA_END);
mtr_x_lock_space(space, mtr);
- const page_size_t page_size(space->flags);
ut_d(space->modify_check(*mtr));
if (block) {
header = byte_offset + buf_block_get_frame(block);
- const ulint type = block->page.id == page_id_t(TRX_SYS_SPACE,
- TRX_SYS_PAGE_NO)
- ? FIL_PAGE_TYPE_TRX_SYS
- : FIL_PAGE_TYPE_SYS;
+ ut_ad(block->page.id.space() == space->id);
- fil_block_check_type(*block, type, mtr);
+ if (!space->full_crc32()) {
+ fil_block_check_type(*block, block->page.id
+ == page_id_t(TRX_SYS_SPACE,
+ TRX_SYS_PAGE_NO)
+ ? FIL_PAGE_TYPE_TRX_SYS
+ : FIL_PAGE_TYPE_SYS,
+ mtr);
+ }
}
- space_header = fsp_get_space_header(space, page_size, mtr);
+ space_header = fsp_get_space_header(space, mtr);
inode_alloc:
inode = fsp_alloc_seg_inode(space, space_header, mtr);
@@ -1936,7 +1888,7 @@ reserve_extent:
}
if (inode) {
- fsp_free_seg_inode(space, page_size, inode, mtr);
+ fsp_free_seg_inode(space, inode, mtr);
}
goto funct_exit;
}
@@ -1947,9 +1899,8 @@ reserve_extent:
seg_id = mach_read_from_8(space_header + FSP_SEG_ID);
mlog_write_ull(space_header + FSP_SEG_ID, seg_id + 1, mtr);
-
mlog_write_ull(inode + FSEG_ID, seg_id, mtr);
- mlog_write_ulint(inode + FSEG_NOT_FULL_N_USED, 0, MLOG_4BYTES, mtr);
+ ut_ad(!mach_read_from_4(inode + FSEG_NOT_FULL_N_USED));
flst_init(inode + FSEG_FREE, mtr);
flst_init(inode + FSEG_NOT_FULL, mtr);
@@ -1957,25 +1908,22 @@ reserve_extent:
mlog_write_ulint(inode + FSEG_MAGIC_N, FSEG_MAGIC_N_VALUE,
MLOG_4BYTES, mtr);
- for (i = 0; i < FSEG_FRAG_ARR_N_SLOTS; i++) {
- fseg_set_nth_frag_page_no(inode, i, FIL_NULL, mtr);
- }
+ compile_time_assert(FSEG_FRAG_SLOT_SIZE == 4);
+ compile_time_assert(FIL_NULL == 0xffffffff);
+ mlog_memset(inode + FSEG_FRAG_ARR,
+ FSEG_FRAG_SLOT_SIZE * FSEG_FRAG_ARR_N_SLOTS, 0xff, mtr);
if (!block) {
page_alloc:
- block = fseg_alloc_free_page_low(space, page_size,
- inode, 0, FSP_UP,
+ block = fseg_alloc_free_page_low(space, inode, 0, FSP_UP,
mtr, mtr
#ifdef UNIV_DEBUG
, has_done_reservation
#endif /* UNIV_DEBUG */
);
- /* The allocation cannot fail if we have already reserved a
- space for the page. */
- ut_ad(!has_done_reservation || block != NULL);
-
if (block == NULL) {
+ ut_ad(!has_done_reservation);
goto reserve_extent;
}
@@ -2052,9 +2000,7 @@ fseg_n_reserved_pages(
space_id = page_get_space_id(page_align(header));
space = mtr_x_lock_space(space_id, mtr);
- const page_size_t page_size(space->flags);
-
- inode = fseg_inode_get(header, space_id, page_size, mtr);
+ inode = fseg_inode_get(header, space_id, space->zip_size(), mtr);
ret = fseg_n_reserved_pages_low(inode, used, mtr);
@@ -2067,7 +2013,6 @@ the free list is empty, and the extents can be allocated consecutively from
the hint onward.
@param[in] inode segment inode
@param[in] space tablespace
-@param[in] page_size page size
@param[in] hint hint which extent would be good as the first
extent
@param[in,out] mtr mini-transaction */
@@ -2076,7 +2021,6 @@ void
fseg_fill_free_list(
fseg_inode_t* inode,
fil_space_t* space,
- const page_size_t& page_size,
ulint hint,
mtr_t* mtr)
{
@@ -2106,7 +2050,7 @@ fseg_fill_free_list(
}
for (i = 0; i < FSEG_FREE_LIST_MAX_LEN; i++) {
- descr = xdes_get_descriptor(space, hint, page_size, mtr);
+ descr = xdes_get_descriptor(space, hint, mtr);
if ((descr == NULL)
|| (XDES_FREE != xdes_get_state(descr, mtr))) {
@@ -2116,7 +2060,7 @@ fseg_fill_free_list(
return;
}
- descr = fsp_alloc_free_extent(space, page_size, hint, mtr);
+ descr = fsp_alloc_free_extent(space, hint, mtr);
xdes_set_state(descr, XDES_FSEG, mtr);
@@ -2136,7 +2080,6 @@ NOTE that the extent returned still resides in the segment free list, it is
not yet taken off it!
@param[in] inode segment inode
@param[in,out] space tablespace
-@param[in] page_size page size
@param[in,out] mtr mini-transaction
@retval NULL if no page could be allocated
@retval block rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
@@ -2147,7 +2090,6 @@ xdes_t*
fseg_alloc_free_extent(
fseg_inode_t* inode,
fil_space_t* space,
- const page_size_t& page_size,
mtr_t* mtr)
{
xdes_t* descr;
@@ -2163,10 +2105,10 @@ fseg_alloc_free_extent(
first = flst_get_first(inode + FSEG_FREE, mtr);
- descr = xdes_lst_get_descriptor(space, page_size, first, mtr);
+ descr = xdes_lst_get_descriptor(space, first, mtr);
} else {
/* Segment free list was empty, allocate from space */
- descr = fsp_alloc_free_extent(space, page_size, 0, mtr);
+ descr = fsp_alloc_free_extent(space, 0, mtr);
if (descr == NULL) {
@@ -2180,7 +2122,7 @@ fseg_alloc_free_extent(
flst_add_last(inode + FSEG_FREE, descr + XDES_FLST_NODE, mtr);
/* Try to fill the segment free list */
- fseg_fill_free_list(inode, space, page_size,
+ fseg_fill_free_list(inode, space,
xdes_get_offset(descr) + FSP_EXTENT_SIZE,
mtr);
}
@@ -2192,7 +2134,6 @@ fseg_alloc_free_extent(
This function implements the intelligent allocation strategy which tries to
minimize file space fragmentation.
@param[in,out] space tablespace
-@param[in] page_size page size
@param[in,out] seg_inode segment inode
@param[in] hint hint of which page would be desirable
@param[in] direction if the new page is needed because of
@@ -2212,7 +2153,6 @@ static
buf_block_t*
fseg_alloc_free_page_low(
fil_space_t* space,
- const page_size_t& page_size,
fseg_inode_t* seg_inode,
ulint hint,
byte direction,
@@ -2246,7 +2186,7 @@ fseg_alloc_free_page_low(
reserved = fseg_n_reserved_pages_low(seg_inode, &used, mtr);
- space_header = fsp_get_space_header(space, page_size, mtr);
+ space_header = fsp_get_space_header(space, mtr);
descr = xdes_get_descriptor_with_space_hdr(space_header, space,
hint, mtr);
@@ -2255,7 +2195,7 @@ fseg_alloc_free_page_low(
hint */
/* The file space header page is always allocated. */
hint = 0;
- descr = xdes_get_descriptor(space, hint, page_size, mtr);
+ descr = xdes_get_descriptor(space, hint, mtr);
}
/* In the big if-else below we look for ret_page and ret_descr */
@@ -2282,7 +2222,7 @@ take_hinted_page:
=========================================================
the hinted page
===============*/
- ret_descr = fsp_alloc_free_extent(space, page_size, hint, mtr);
+ ret_descr = fsp_alloc_free_extent(space, hint, mtr);
ut_a(ret_descr == descr);
@@ -2292,7 +2232,7 @@ take_hinted_page:
ret_descr + XDES_FLST_NODE, mtr);
/* Try to fill the segment free list */
- fseg_fill_free_list(seg_inode, space, page_size,
+ fseg_fill_free_list(seg_inode, space,
hint + FSP_EXTENT_SIZE, mtr);
goto take_hinted_page;
/*-----------------------------------------------------------*/
@@ -2300,8 +2240,7 @@ take_hinted_page:
&& ((reserved - used) < reserved / FSEG_FILLFACTOR)
&& (used >= FSEG_FRAG_LIMIT)
&& (!!(ret_descr
- = fseg_alloc_free_extent(
- seg_inode, space, page_size, mtr)))) {
+ = fseg_alloc_free_extent(seg_inode, space, mtr)))) {
/* 3. We take any free extent (which was already assigned above
===============================================================
@@ -2347,8 +2286,7 @@ take_hinted_page:
return(NULL);
}
- ret_descr = xdes_lst_get_descriptor(space, page_size,
- first, mtr);
+ ret_descr = xdes_lst_get_descriptor(space, first, mtr);
ret_page = xdes_get_offset(ret_descr)
+ xdes_find_bit(ret_descr, XDES_FREE_BIT, TRUE,
0, mtr);
@@ -2358,11 +2296,11 @@ take_hinted_page:
/* 6. We allocate an individual page from the space
===================================================*/
buf_block_t* block = fsp_alloc_free_page(
- space, page_size, hint, mtr, init_mtr);
+ space, hint, mtr, init_mtr);
- ut_ad(!has_done_reservation || block != NULL);
+ ut_ad(!has_done_reservation || block);
- if (block != NULL) {
+ if (block) {
/* Put the page in the fragment page array of the
segment */
n = fseg_find_free_frag_page_slot(seg_inode, mtr);
@@ -2380,8 +2318,7 @@ take_hinted_page:
} else {
/* 7. We allocate a new extent and take its first page
======================================================*/
- ret_descr = fseg_alloc_free_extent(seg_inode,
- space, page_size, mtr);
+ ret_descr = fseg_alloc_free_extent(seg_inode, space, mtr);
if (ret_descr == NULL) {
ret_page = FIL_NULL;
@@ -2429,8 +2366,7 @@ got_hinted_page:
The extent is still in the appropriate list (FSEG_NOT_FULL
or FSEG_FREE), and the page is not yet marked as used. */
- ut_ad(xdes_get_descriptor(space, ret_page, page_size, mtr)
- == ret_descr);
+ ut_ad(xdes_get_descriptor(space, ret_page, mtr) == ret_descr);
ut_ad(xdes_mtr_get_bit(
ret_descr, XDES_FREE_BIT,
@@ -2439,7 +2375,7 @@ got_hinted_page:
fseg_mark_page_used(seg_inode, ret_page, ret_descr, mtr);
}
- return(fsp_page_create(space, ret_page, page_size, mtr, init_mtr));
+ return fsp_page_create(space, ret_page, mtr, init_mtr);
}
/**********************************************************************//**
@@ -2481,10 +2417,11 @@ fseg_alloc_free_page_general(
space_id = page_get_space_id(page_align(seg_header));
space = mtr_x_lock_space(space_id, mtr);
- const page_size_t page_size(space->flags);
-
- inode = fseg_inode_get(seg_header, space_id, page_size, mtr, &iblock);
- fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
+ inode = fseg_inode_get(seg_header, space_id, space->zip_size(),
+ mtr, &iblock);
+ if (!space->full_crc32()) {
+ fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
+ }
if (!has_done_reservation
&& !fsp_reserve_free_extents(&n_reserved, space, 2,
@@ -2492,7 +2429,7 @@ fseg_alloc_free_page_general(
return(NULL);
}
- block = fseg_alloc_free_page_low(space, page_size,
+ block = fseg_alloc_free_page_low(space,
inode, hint, direction,
mtr, init_mtr
#ifdef UNIV_DEBUG
@@ -2609,9 +2546,9 @@ fsp_reserve_free_extents(
*n_reserved = n_ext;
mtr_x_lock_space(space, mtr);
- const page_size_t page_size(space->flags);
+ const ulint physical_size = space->physical_size();
- space_header = fsp_get_space_header(space, page_size, mtr);
+ space_header = fsp_get_space_header(space, mtr);
try_again:
size = mach_read_from_4(space_header + FSP_SIZE);
ut_ad(size == space->size_in_header);
@@ -2626,8 +2563,7 @@ try_again:
n_free_list_ext = flst_get_len(space_header + FSP_FREE);
ut_ad(space->free_len == n_free_list_ext);
- free_limit = mtr_read_ulint(space_header + FSP_FREE_LIMIT,
- MLOG_4BYTES, mtr);
+ free_limit = mach_read_from_4(space_header + FSP_FREE_LIMIT);
ut_ad(space->free_limit == free_limit);
/* Below we play safe when counting free extents above the free limit:
@@ -2643,8 +2579,7 @@ try_again:
if (n_free_up > 0) {
n_free_up--;
- n_free_up -= n_free_up / (page_size.physical()
- / FSP_EXTENT_SIZE);
+ n_free_up -= n_free_up / (physical_size / FSP_EXTENT_SIZE);
}
n_free = n_free_list_ext + n_free_up;
@@ -2709,9 +2644,7 @@ fseg_mark_page_used(
ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE));
ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N)
== FSEG_MAGIC_N_VALUE);
-
- ut_ad(mtr_read_ulint(seg_inode + FSEG_ID, MLOG_4BYTES, mtr)
- == mtr_read_ulint(descr + XDES_ID, MLOG_4BYTES, mtr));
+ ut_ad(!memcmp(seg_inode + FSEG_ID, descr + XDES_ID, 4));
if (xdes_is_free(descr, mtr)) {
/* We move the extent from the free list to the
@@ -2728,8 +2661,7 @@ fseg_mark_page_used(
/* We mark the page as used */
xdes_set_bit(descr, XDES_FREE_BIT, page % FSP_EXTENT_SIZE, FALSE, mtr);
- not_full_n_used = mtr_read_ulint(seg_inode + FSEG_NOT_FULL_N_USED,
- MLOG_4BYTES, mtr);
+ not_full_n_used = mach_read_from_4(seg_inode + FSEG_NOT_FULL_N_USED);
not_full_n_used++;
mlog_write_ulint(seg_inode + FSEG_NOT_FULL_N_USED, not_full_n_used,
MLOG_4BYTES, mtr);
@@ -2751,7 +2683,7 @@ fseg_mark_page_used(
@param[in] seg_inode segment inode
@param[in,out] space tablespace
@param[in] offset page number
-@param[in] page_size page size
+@param[in] log whether to write MLOG_INIT_FREE_PAGE record
@param[in,out] mtr mini-transaction */
static
void
@@ -2759,7 +2691,7 @@ fseg_free_page_low(
fseg_inode_t* seg_inode,
fil_space_t* space,
page_no_t offset,
- const page_size_t& page_size,
+ bool log,
mtr_t* mtr)
{
xdes_t* descr;
@@ -2775,7 +2707,7 @@ fseg_free_page_low(
ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE));
ut_d(space->modify_check(*mtr));
- descr = xdes_get_descriptor(space, offset, page_size, mtr);
+ descr = xdes_get_descriptor(space, offset, mtr);
if (xdes_mtr_get_bit(descr, XDES_FREE_BIT,
offset % FSP_EXTENT_SIZE, mtr)) {
@@ -2792,19 +2724,19 @@ fseg_free_page_low(
if (state != XDES_FSEG) {
/* The page is in the fragment pages of the segment */
-
for (ulint i = 0;; i++) {
if (fseg_get_nth_frag_page_no(seg_inode, i, mtr)
- == offset) {
-
- fseg_set_nth_frag_page_no(seg_inode, i,
- FIL_NULL, mtr);
- break;
+ != offset) {
+ continue;
}
- }
- fsp_free_page(space, offset, page_size, mtr);
+ compile_time_assert(FIL_NULL == 0xffffffff);
+ mlog_memset(seg_inode + FSEG_FRAG_ARR
+ + i * FSEG_FRAG_SLOT_SIZE, 4, 0xff, mtr);
+ break;
+ }
+ fsp_free_page(space, offset, log, mtr);
return;
}
@@ -2828,8 +2760,7 @@ fseg_free_page_low(
<< FORCE_RECOVERY_MSG;
}
- not_full_n_used = mtr_read_ulint(seg_inode + FSEG_NOT_FULL_N_USED,
- MLOG_4BYTES, mtr);
+ not_full_n_used = mach_read_from_4(seg_inode + FSEG_NOT_FULL_N_USED);
if (xdes_is_full(descr, mtr)) {
/* The fragment is full: move it to another list */
flst_remove(seg_inode + FSEG_FULL,
@@ -2855,7 +2786,7 @@ fseg_free_page_low(
/* The extent has become free: free it to space */
flst_remove(seg_inode + FSEG_NOT_FULL,
descr + XDES_FLST_NODE, mtr);
- fsp_free_extent(space, offset, page_size, mtr);
+ fsp_free_extent(space, offset, mtr);
}
}
@@ -2863,28 +2794,32 @@ fseg_free_page_low(
@param[in,out] seg_header file segment header
@param[in,out] space tablespace
@param[in] offset page number
+@param[in] log whether to write MLOG_INIT_FREE_PAGE record
@param[in,out] mtr mini-transaction */
void
fseg_free_page(
fseg_header_t* seg_header,
fil_space_t* space,
ulint offset,
+ bool log,
mtr_t* mtr)
{
DBUG_ENTER("fseg_free_page");
fseg_inode_t* seg_inode;
buf_block_t* iblock;
mtr_x_lock_space(space, mtr);
- const page_size_t page_size(space->flags);
DBUG_LOG("fseg_free_page", "space_id: " << space->id
<< ", page_no: " << offset);
- seg_inode = fseg_inode_get(seg_header, space->id, page_size, mtr,
+ seg_inode = fseg_inode_get(seg_header, space->id, space->zip_size(),
+ mtr,
&iblock);
- fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
+ if (!space->full_crc32()) {
+ fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
+ }
- fseg_free_page_low(seg_inode, space, offset, page_size, mtr);
+ fseg_free_page_low(seg_inode, space, offset, log, mtr);
ut_d(buf_page_set_file_page_was_freed(page_id_t(space->id, offset)));
@@ -2900,8 +2835,8 @@ fseg_page_is_free(fil_space_t* space, unsigned page)
{
bool is_free;
mtr_t mtr;
- page_size_t page_size(space->flags);
- page_no_t dpage = xdes_calc_descriptor_page(page_size, page);
+ page_no_t dpage = xdes_calc_descriptor_page(space->zip_size(),
+ page);
mtr.start();
mtr_s_lock_space(space, &mtr);
@@ -2909,7 +2844,7 @@ fseg_page_is_free(fil_space_t* space, unsigned page)
if (page >= space->free_limit || page >= space->size_in_header) {
is_free = true;
} else if (const xdes_t* descr = xdes_get_descriptor_const(
- space, dpage, page, page_size, &mtr)) {
+ space, dpage, page, &mtr)) {
is_free = xdes_get_bit(descr, XDES_FREE_BIT,
page % FSP_EXTENT_SIZE);
} else {
@@ -2923,7 +2858,6 @@ fseg_page_is_free(fil_space_t* space, unsigned page)
/** Free an extent of a segment to the space free list.
@param[in,out] seg_inode segment inode
@param[in,out] space tablespace
-@param[in] page_size page size
@param[in] page page number in the extent
@param[in,out] mtr mini-transaction */
MY_ATTRIBUTE((nonnull))
@@ -2932,7 +2866,6 @@ void
fseg_free_extent(
fseg_inode_t* seg_inode,
fil_space_t* space,
- const page_size_t& page_size,
ulint page,
mtr_t* mtr)
{
@@ -2942,7 +2875,7 @@ fseg_free_extent(
ut_ad(mtr != NULL);
- descr = xdes_get_descriptor(space, page, page_size, mtr);
+ descr = xdes_get_descriptor(space, page, mtr);
ut_a(xdes_get_state(descr, mtr) == XDES_FSEG);
ut_a(!memcmp(descr + XDES_ID, seg_inode + FSEG_ID, 8));
@@ -2961,9 +2894,8 @@ fseg_free_extent(
flst_remove(seg_inode + FSEG_NOT_FULL,
descr + XDES_FLST_NODE, mtr);
- not_full_n_used = mtr_read_ulint(
- seg_inode + FSEG_NOT_FULL_N_USED, MLOG_4BYTES, mtr);
-
+ not_full_n_used = mach_read_from_4(FSEG_NOT_FULL_N_USED
+ + seg_inode);
descr_n_used = xdes_get_n_used(descr, mtr);
ut_a(not_full_n_used >= descr_n_used);
mlog_write_ulint(seg_inode + FSEG_NOT_FULL_N_USED,
@@ -2971,7 +2903,7 @@ fseg_free_extent(
MLOG_4BYTES, mtr);
}
- fsp_free_extent(space, page, page_size, mtr);
+ fsp_free_extent(space, page, mtr);
#ifdef UNIV_DEBUG
for (ulint i = 0; i < FSP_EXTENT_SIZE; i++) {
@@ -3009,9 +2941,8 @@ fseg_free_step(
header_page = page_get_page_no(page_align(header));
fil_space_t* space = mtr_x_lock_space(space_id, mtr);
- const page_size_t page_size(space->flags);
- descr = xdes_get_descriptor(space, header_page, page_size, mtr);
+ descr = xdes_get_descriptor(space, header_page, mtr);
/* Check that the header resides on a page which has not been
freed yet */
@@ -3019,8 +2950,8 @@ fseg_free_step(
ut_a(xdes_mtr_get_bit(descr, XDES_FREE_BIT,
header_page % FSP_EXTENT_SIZE, mtr) == FALSE);
buf_block_t* iblock;
-
- inode = fseg_inode_try_get(header, space_id, page_size, mtr, &iblock);
+ const ulint zip_size = space->zip_size();
+ inode = fseg_inode_try_get(header, space_id, zip_size, mtr, &iblock);
if (inode == NULL) {
ib::info() << "Double free of inode from "
@@ -3028,15 +2959,15 @@ fseg_free_step(
DBUG_RETURN(true);
}
- fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
- descr = fseg_get_first_extent(inode, space, page_size, mtr);
+ if (!space->full_crc32()) {
+ fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
+ }
+ descr = fseg_get_first_extent(inode, space, mtr);
if (descr != NULL) {
/* Free the extent held by the segment */
page = xdes_get_offset(descr);
-
- fseg_free_extent(inode, space, page_size, page, mtr);
-
+ fseg_free_extent(inode, space, page, mtr);
DBUG_RETURN(false);
}
@@ -3045,7 +2976,7 @@ fseg_free_step(
if (n == ULINT_UNDEFINED) {
/* Freeing completed: free the segment inode */
- fsp_free_seg_inode(space, page_size, inode, mtr);
+ fsp_free_seg_inode(space, inode, mtr);
DBUG_RETURN(true);
}
@@ -3053,13 +2984,13 @@ fseg_free_step(
fseg_free_page_low(
inode, space,
fseg_get_nth_frag_page_no(inode, n, mtr),
- page_size, mtr);
+ true, mtr);
n = fseg_find_last_used_frag_page_slot(inode, mtr);
if (n == ULINT_UNDEFINED) {
/* Freeing completed: free the segment inode */
- fsp_free_seg_inode(space, page_size, inode, mtr);
+ fsp_free_seg_inode(space, inode, mtr);
DBUG_RETURN(true);
}
@@ -3088,20 +3019,20 @@ fseg_free_step_not_header(
ut_ad(mtr->is_named_space(space_id));
fil_space_t* space = mtr_x_lock_space(space_id, mtr);
- const page_size_t page_size(space->flags);
buf_block_t* iblock;
- inode = fseg_inode_get(header, space_id, page_size, mtr, &iblock);
- fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
+ inode = fseg_inode_get(header, space_id, space->zip_size(), mtr,
+ &iblock);
+ if (!space->full_crc32()) {
+ fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
+ }
- descr = fseg_get_first_extent(inode, space, page_size, mtr);
+ descr = fseg_get_first_extent(inode, space, mtr);
if (descr != NULL) {
/* Free the extent held by the segment */
page = xdes_get_offset(descr);
-
- fseg_free_extent(inode, space, page_size, page, mtr);
-
+ fseg_free_extent(inode, space, page, mtr);
return false;
}
@@ -3114,12 +3045,10 @@ fseg_free_step_not_header(
page_no = fseg_get_nth_frag_page_no(inode, n, mtr);
if (page_no == page_get_page_no(page_align(header))) {
-
return true;
}
- fseg_free_page_low(inode, space, page_no, page_size, mtr);
-
+ fseg_free_page_low(inode, space, page_no, true, mtr);
return false;
}
@@ -3128,7 +3057,6 @@ We think of the extent lists of the segment catenated in the order
FSEG_FULL -> FSEG_NOT_FULL -> FSEG_FREE.
@param[in] inode segment inode
@param[in] space tablespace
-@param[in] page_size page size
@param[in,out] mtr mini-transaction
@return the first extent descriptor, or NULL if none */
MY_ATTRIBUTE((nonnull, warn_unused_result))
@@ -3137,7 +3065,6 @@ xdes_t*
fseg_get_first_extent(
fseg_inode_t* inode,
const fil_space_t* space,
- const page_size_t& page_size,
mtr_t* mtr)
{
fil_addr_t first;
@@ -3163,7 +3090,7 @@ fseg_get_first_extent(
ut_ad(first.page != FIL_NULL);
return(first.page == FIL_NULL ? NULL
- : xdes_lst_get_descriptor(space, page_size, first, mtr));
+ : xdes_lst_get_descriptor(space, first, mtr));
}
#ifdef UNIV_BTR_PRINT
@@ -3194,9 +3121,7 @@ fseg_print_low(
reserved = fseg_n_reserved_pages_low(inode, &used, mtr);
seg_id = mach_read_from_8(inode + FSEG_ID);
-
- n_used = mtr_read_ulint(inode + FSEG_NOT_FULL_N_USED,
- MLOG_4BYTES, mtr);
+ n_used = mach_read_from_4(inode + FSEG_NOT_FULL_N_USED);
n_frag = fseg_get_n_frag_pages(inode, mtr);
n_free = flst_get_len(inode + FSEG_FREE);
n_not_full = flst_get_len(inode + FSEG_NOT_FULL);
@@ -3227,32 +3152,20 @@ fseg_print(
space_id = page_get_space_id(page_align(header));
const fil_space_t* space = mtr_x_lock_space(space_id, mtr);
- const page_size_t page_size(space->flags);
- inode = fseg_inode_get(header, space_id, page_size, mtr);
+ inode = fseg_inode_get(header, space_id, space->zip_size(), mtr);
fseg_print_low(inode, mtr);
}
#endif /* UNIV_BTR_PRINT */
#ifdef UNIV_DEBUG
-/** Print the file segment header to the given output stream.
-@param[in] out the output stream into which the object is printed.
-@retval the output stream into which the object was printed. */
-std::ostream&
-fseg_header::to_stream(std::ostream& out) const
+std::ostream &fseg_header::to_stream(std::ostream &out) const
{
- const ulint space = mtr_read_ulint(m_header + FSEG_HDR_SPACE,
- MLOG_4BYTES, m_mtr);
- const ulint page_no = mtr_read_ulint(m_header + FSEG_HDR_PAGE_NO,
- MLOG_4BYTES, m_mtr);
-
- const ulint offset = mtr_read_ulint(m_header + FSEG_HDR_OFFSET,
- MLOG_2BYTES, m_mtr);
-
- out << "[fseg_header_t: space=" << space << ", page="
- << page_no << ", offset=" << offset << "]";
-
- return(out);
+ out << "[fseg_header_t: space="
+ << mach_read_from_4(m_header + FSEG_HDR_SPACE)
+ << ", page=" << mach_read_from_4(m_header + FSEG_HDR_PAGE_NO)
+ << ", offset=" << mach_read_from_2(m_header + FSEG_HDR_OFFSET) << "]";
+ return out;
}
#endif /* UNIV_DEBUG */
diff --git a/storage/innobase/fsp/fsp0space.cc b/storage/innobase/fsp/fsp0space.cc
index 757eeaf90ae..1ed4af86367 100644
--- a/storage/innobase/fsp/fsp0space.cc
+++ b/storage/innobase/fsp/fsp0space.cc
@@ -118,8 +118,20 @@ Tablespace::open_or_create(bool is_temp)
/* Create the tablespace entry for the multi-file
tablespace in the tablespace manager. */
+ ulint fsp_flags = 0;
+
+ switch (srv_checksum_algorithm) {
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ fsp_flags = (FSP_FLAGS_FCRC32_MASK_MARKER
+ | FSP_FLAGS_FCRC32_PAGE_SSIZE());
+ break;
+ default:
+ fsp_flags = FSP_FLAGS_PAGE_SSIZE();
+ }
+
space = fil_space_create(
- m_name, m_space_id, FSP_FLAGS_PAGE_SSIZE(),
+ m_name, m_space_id, fsp_flags,
is_temp
? FIL_TYPE_TEMPORARY : FIL_TYPE_TABLESPACE,
NULL);
diff --git a/storage/innobase/fsp/fsp0sysspace.cc b/storage/innobase/fsp/fsp0sysspace.cc
index 72fa8c28ebd..5fcf8ea4e51 100644
--- a/storage/innobase/fsp/fsp0sysspace.cc
+++ b/storage/innobase/fsp/fsp0sysspace.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2021, 2022, MariaDB Corporation.
+Copyright (c) 2016, 2022, 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
@@ -947,7 +947,7 @@ SysTablespace::open_or_create(
ut_ad(!fil_system.sys_space);
ut_ad(space_id() == TRX_SYS_SPACE);
space = fil_space_create(
- name(), TRX_SYS_SPACE, flags(),
+ name(), TRX_SYS_SPACE, it->flags(),
FIL_TYPE_TABLESPACE, NULL);
mutex_enter(&fil_system.mutex);
diff --git a/storage/innobase/fts/fts0config.cc b/storage/innobase/fts/fts0config.cc
index 1170519b543..f95159dc5b7 100644
--- a/storage/innobase/fts/fts0config.cc
+++ b/storage/innobase/fts/fts0config.cc
@@ -120,9 +120,9 @@ fts_config_get_value(
error = fts_eval_sql(trx, graph);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
que_graph_free(graph);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return(error);
}
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index b16bb6611b0..16766627505 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -53,26 +53,14 @@ by looking up the key word in the obsolete table names */
/** This is maximum FTS cache for each table and would be
a configurable variable */
-size_t fts_max_cache_size;
-
-static size_t fts_get_max_cache()
-{
-#if UNIV_WORD_SIZE == 4
- return my_atomic_load32_explicit(&fts_max_cache_size,
- MY_MEMORY_ORDER_RELAXED);
-#else
- return my_atomic_load64_explicit(
- reinterpret_cast<int64*>(&fts_max_cache_size),
- MY_MEMORY_ORDER_RELAXED);
-#endif
-}
+Atomic_relaxed<size_t> fts_max_cache_size;
/** Whether the total memory used for FTS cache is exhausted, and we will
need a sync to free some memory */
bool fts_need_sync = false;
/** Variable specifying the total memory allocated for FTS cache */
-size_t fts_max_total_cache_size;
+Atomic_relaxed<size_t> fts_max_total_cache_size;
/** This is FTS result cache limit for each query and would be
a configurable variable */
@@ -452,7 +440,7 @@ fts_load_user_stopword(
fts_stopword_t* stopword_info) /*!< in: Stopword info */
{
if (!fts->dict_locked) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
/* Validate the user table existence in the right format */
@@ -461,7 +449,7 @@ fts_load_user_stopword(
if (!stopword_info->charset) {
cleanup:
if (!fts->dict_locked) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
return ret;
@@ -900,7 +888,7 @@ fts_drop_index(
}
/****************************************************************//**
-Free the query graph but check whether dict_sys->mutex is already
+Free the query graph but check whether dict_sys.mutex is already
held */
void
fts_que_graph_free_check_lock(
@@ -922,15 +910,15 @@ fts_que_graph_free_check_lock(
}
if (!has_dict) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
que_graph_free(graph);
if (!has_dict) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
}
@@ -3168,15 +3156,10 @@ fts_fetch_doc_from_rec(
documents */
{
dict_index_t* index;
- dict_table_t* table;
const rec_t* clust_rec;
- ulint num_field;
const dict_field_t* ifield;
- const dict_col_t* col;
ulint clust_pos;
- ulint i;
ulint doc_len = 0;
- ulint processed_doc = 0;
st_mysql_ftparser* parser;
if (!get_doc) {
@@ -3184,19 +3167,15 @@ fts_fetch_doc_from_rec(
}
index = get_doc->index_cache->index;
- table = get_doc->index_cache->index->table;
parser = get_doc->index_cache->index->parser;
clust_rec = btr_pcur_get_rec(pcur);
ut_ad(!page_rec_is_comp(clust_rec)
|| rec_get_status(clust_rec) == REC_STATUS_ORDINARY);
- num_field = dict_index_get_n_fields(index);
-
- for (i = 0; i < num_field; i++) {
+ for (ulint i = 0; i < index->n_fields; i++) {
ifield = dict_index_get_nth_field(index, i);
- col = dict_field_get_col(ifield);
- clust_pos = dict_col_get_clust_pos(col, clust_index);
+ clust_pos = dict_col_get_clust_pos(ifield->col, clust_index);
if (!get_doc->index_cache->charset) {
get_doc->index_cache->charset = fts_get_charset(
@@ -3207,7 +3186,7 @@ fts_fetch_doc_from_rec(
doc->text.f_str =
btr_rec_copy_externally_stored_field(
clust_rec, offsets,
- dict_table_page_size(table),
+ btr_pcur_get_block(pcur)->zip_size(),
clust_pos, &doc->text.f_len,
static_cast<mem_heap_t*>(
doc->self_heap->arg));
@@ -3225,13 +3204,12 @@ fts_fetch_doc_from_rec(
continue;
}
- if (processed_doc == 0) {
+ if (!doc_len) {
fts_tokenize_document(doc, NULL, parser);
} else {
fts_tokenize_document_next(doc, doc_len, NULL, parser);
}
- processed_doc++;
doc_len += doc->text.f_len + 1;
}
}
@@ -3358,7 +3336,7 @@ fts_add_doc_from_tuple(
rw_lock_x_unlock(&table->fts->cache->lock);
- if (cache->total_size > fts_get_max_cache() / 5
+ if (cache->total_size > fts_max_cache_size / 5
|| fts_need_sync) {
fts_sync(cache->sync, true, false);
}
@@ -3523,7 +3501,7 @@ fts_add_doc_by_id(
&& (fts_need_sync
|| (cache->total_size
- cache->total_size_at_sync)
- > fts_get_max_cache() / 10);
+ > fts_max_cache_size / 10);
if (need_sync) {
cache->total_size_at_sync =
cache->total_size;
@@ -3595,8 +3573,7 @@ fts_read_ulint(
dfield_t* dfield = que_node_get_val(exp);
void* data = dfield_get_data(dfield);
- *value = static_cast<ulint>(mach_read_from_4(
- static_cast<const byte*>(data)));
+ *value = mach_read_from_4(static_cast<const byte*>(data));
return(TRUE);
}
@@ -3637,13 +3614,6 @@ fts_get_max_doc_id(
if (!page_is_empty(btr_pcur_get_page(&pcur))) {
const rec_t* rec = NULL;
- rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
- rec_offs* offsets = offsets_;
- mem_heap_t* heap = NULL;
- ulint len;
- const void* data;
-
- rec_offs_init(offsets_);
do {
rec = btr_pcur_get_rec(&pcur);
@@ -3653,19 +3623,11 @@ fts_get_max_doc_id(
}
} while (btr_pcur_move_to_prev(&pcur, &mtr));
- if (!rec) {
+ if (!rec || rec_is_metadata(rec, *index)) {
goto func_exit;
}
- ut_ad(!rec_is_metadata(rec, index));
- offsets = rec_get_offsets(
- rec, index, offsets, index->n_core_fields,
- ULINT_UNDEFINED, &heap);
-
- data = rec_get_nth_field(rec, offsets, 0, &len);
-
- doc_id = static_cast<doc_id_t>(fts_read_doc_id(
- static_cast<const byte*>(data)));
+ doc_id = fts_read_doc_id(rec);
}
func_exit:
@@ -4286,7 +4248,7 @@ fts_sync(
fts_sync_begin(sync);
begin_sync:
- fts_cache_size= fts_get_max_cache();
+ fts_cache_size= fts_max_cache_size;
if (cache->total_size > fts_cache_size) {
/* Avoid the case: sync never finish when
insert/update keeps comming. */
@@ -4321,7 +4283,7 @@ begin_sync:
}
if (!sync->unlock_cache
- && cache->total_size < fts_get_max_cache()) {
+ && cache->total_size < fts_max_cache_size) {
/* Reset the unlock cache if the value
is less than innodb_ft_cache_size */
sync->unlock_cache = true;
@@ -5143,50 +5105,23 @@ fts_get_doc_id_from_row(
}
/** Extract the doc id from the record that belongs to index.
-@param[in] table table
-@param[in] rec record contains FTS_DOC_ID
+@param[in] rec record containing FTS_DOC_ID
@param[in] index index of rec
-@param[in] heap heap memory
+@param[in] offsets rec_get_offsets(rec,index)
@return doc id that was extracted from rec */
doc_id_t
fts_get_doc_id_from_rec(
- dict_table_t* table,
const rec_t* rec,
const dict_index_t* index,
- mem_heap_t* heap)
-{
- ulint len;
- const byte* data;
- ulint col_no;
- doc_id_t doc_id = 0;
- rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
- rec_offs* offsets = offsets_;
- mem_heap_t* my_heap = heap;
-
- ut_a(table->fts->doc_col != ULINT_UNDEFINED);
-
- rec_offs_init(offsets_);
-
- offsets = rec_get_offsets(
- rec, index, offsets, index->n_core_fields,
- ULINT_UNDEFINED, &my_heap);
-
- col_no = dict_col_get_index_pos(
- &table->cols[table->fts->doc_col], index);
-
- ut_ad(col_no != ULINT_UNDEFINED);
-
- data = rec_get_nth_field(rec, offsets, col_no, &len);
-
- ut_a(len == 8);
- ut_ad(8 == sizeof(doc_id));
- doc_id = static_cast<doc_id_t>(mach_read_from_8(data));
-
- if (my_heap && !heap) {
- mem_heap_free(my_heap);
- }
-
- return(doc_id);
+ const rec_offs* offsets)
+{
+ ulint f = dict_col_get_index_pos(
+ &index->table->cols[index->table->fts->doc_col], index);
+ ulint len;
+ doc_id_t doc_id = mach_read_from_8(
+ rec_get_nth_field(rec, offsets, f, &len));
+ ut_ad(len == 8);
+ return doc_id;
}
/*********************************************************************//**
@@ -5847,7 +5782,7 @@ static void fts_check_orphaned_tables(fts_space_set_t& fts_space_set)
mtr.start();
btr_pcur_open_at_index_side(
- true, dict_table_get_first_index(dict_sys->sys_indexes),
+ true, dict_table_get_first_index(dict_sys.sys_indexes),
BTR_SEARCH_LEAF, &pcur, true, 0, &mtr);
do
@@ -6250,7 +6185,7 @@ fts_init_recover_doc(
doc.text.f_str = btr_copy_externally_stored_field(
&doc.text.f_len,
static_cast<byte*>(dfield_get_data(dfield)),
- dict_table_page_size(table), len,
+ table->space->zip_size(), len,
static_cast<mem_heap_t*>(doc.self_heap->arg));
} else {
doc.text.f_str = static_cast<byte*>(
@@ -6304,7 +6239,7 @@ fts_init_index(
fts_cache_t* cache = table->fts->cache;
bool need_init = false;
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
/* First check cache->get_docs is initialized */
if (!has_cache_lock) {
@@ -6369,66 +6304,11 @@ func_exit:
}
if (need_init) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* Register the table with the optimize thread. */
fts_optimize_add_table(table);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
return(TRUE);
}
-
-/** Check if the all the auxillary tables associated with FTS index are in
-consistent state. For now consistency is check only by ensuring
-index->page_no != FIL_NULL
-@param[out] base_table table has host fts index
-@param[in,out] trx trx handler */
-void
-fts_check_corrupt(
- dict_table_t* base_table,
- trx_t* trx)
-{
- bool sane = true;
- fts_table_t fts_table;
-
- /* Iterate over the common table and check for their sanity. */
- FTS_INIT_FTS_TABLE(&fts_table, NULL, FTS_COMMON_TABLE, base_table);
-
- for (ulint i = 0; fts_common_tables[i] != NULL && sane; ++i) {
-
- char table_name[MAX_FULL_NAME_LEN];
-
- fts_table.suffix = fts_common_tables[i];
- fts_get_table_name(&fts_table, table_name);
-
- dict_table_t* aux_table = dict_table_open_on_name(
- table_name, true, FALSE, DICT_ERR_IGNORE_NONE);
-
- if (aux_table == NULL) {
- dict_set_corrupted(
- dict_table_get_first_index(base_table),
- trx, "FTS_SANITY_CHECK");
- ut_ad(base_table->corrupted == TRUE);
- sane = false;
- continue;
- }
-
- for (dict_index_t* aux_table_index =
- UT_LIST_GET_FIRST(aux_table->indexes);
- aux_table_index != NULL;
- aux_table_index =
- UT_LIST_GET_NEXT(indexes, aux_table_index)) {
-
- /* Check if auxillary table needed for FTS is sane. */
- if (aux_table_index->page == FIL_NULL) {
- dict_set_corrupted(
- dict_table_get_first_index(base_table),
- trx, "FTS_SANITY_CHECK");
- ut_ad(base_table->corrupted == TRUE);
- sane = false;
- }
- }
-
- dict_table_close(aux_table, FALSE, FALSE);
- }
-}
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc
index d0ea888202e..bb8d9c13d68 100644
--- a/storage/innobase/fts/fts0opt.cc
+++ b/storage/innobase/fts/fts0opt.cc
@@ -40,11 +40,9 @@ Completed 2011/7/10 Sunny and Jimmy Yang
#include "wsrep.h"
#ifdef WITH_WSREP
-extern uint32 wsrep_sst_disable_writes;
-# define wsrep_sst_disable_writes \
- my_atomic_load32_explicit(&wsrep_sst_disable_writes, MY_MEMORY_ORDER_RELAXED)
+extern Atomic_relaxed<bool> wsrep_sst_disable_writes;
#else
-# define wsrep_sst_disable_writes false
+constexpr bool wsrep_sst_disable_writes= false;
#endif
/** The FTS optimize thread's work queue. */
@@ -1009,9 +1007,9 @@ fts_table_fetch_doc_ids(
error = fts_eval_sql(trx, graph);
fts_sql_commit(trx);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
que_graph_free(graph);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (error == DB_SUCCESS) {
ib_vector_sort(doc_ids->doc_ids, fts_doc_id_cmp);
@@ -2743,19 +2741,6 @@ static ulint fts_optimize_how_many()
return(n_tables);
}
-/** @return innodb_ft_total_cache_size */
-static size_t fts_get_max_total_cache_size()
-{
-#if UNIV_WORD_SIZE == 4
- return my_atomic_load32_explicit(
- &fts_max_total_cache_size, MY_MEMORY_ORDER_RELAXED);
-#else
- return my_atomic_load64_explicit((volatile int64 *)
- reinterpret_cast<int64*>(&fts_max_total_cache_size),
- MY_MEMORY_ORDER_RELAXED);
-#endif
-}
-
/**********************************************************************//**
Check if the total memory used by all FTS table exceeds the maximum limit.
@return true if a sync is needed, false otherwise */
@@ -2783,7 +2768,7 @@ static bool fts_is_sync_needed()
total_memory += slot->table->fts->cache->total_size;
}
- if (total_memory > fts_get_max_total_cache_size()) {
+ if (total_memory > fts_max_total_cache_size) {
return(true);
}
}
@@ -2979,8 +2964,8 @@ fts_optimize_init(void)
/* Add fts tables to fts_slots which could be skipped
during dict_load_table_one() because fts_optimize_thread
wasn't even started. */
- mutex_enter(&dict_sys->mutex);
- for (dict_table_t* table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
+ mutex_enter(&dict_sys.mutex);
+ for (dict_table_t* table = UT_LIST_GET_FIRST(dict_sys.table_LRU);
table != NULL;
table = UT_LIST_GET_NEXT(table_LRU, table)) {
if (!table->fts || !dict_table_has_fts_index(table)) {
@@ -2994,7 +2979,7 @@ fts_optimize_init(void)
fts_optimize_new_table(table);
table->fts->in_queue = true;
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
fts_opt_shutdown_event = os_event_create(0);
last_check_sync_time = time(NULL);
diff --git a/storage/innobase/fts/fts0que.cc b/storage/innobase/fts/fts0que.cc
index f7fc543e211..06311551cbe 100644
--- a/storage/innobase/fts/fts0que.cc
+++ b/storage/innobase/fts/fts0que.cc
@@ -209,7 +209,7 @@ struct fts_phrase_t {
distance(0),
charset(NULL),
heap(NULL),
- page_size(dict_table_page_size(table)),
+ zip_size(table->space->zip_size()),
proximity_pos(NULL),
parser(NULL)
{
@@ -233,8 +233,8 @@ struct fts_phrase_t {
/** Heap for word processing */
mem_heap_t* heap;
- /** Row page size */
- const page_size_t page_size;
+ /** ROW_FORMAT=COMPRESSED page size, or 0 */
+ const ulint zip_size;
/** Position info for proximity search verification. Records the
min and max position of words matched */
@@ -2031,7 +2031,7 @@ fts_query_fetch_document(
if (dfield_is_ext(dfield)) {
data = btr_copy_externally_stored_field(
- &cur_len, data, phrase->page_size,
+ &cur_len, data, phrase->zip_size,
dfield_get_len(dfield), phrase->heap);
} else {
cur_len = dfield_get_len(dfield);
diff --git a/storage/innobase/fts/fts0sql.cc b/storage/innobase/fts/fts0sql.cc
index ff9c8ebc5e8..09ec2d08324 100644
--- a/storage/innobase/fts/fts0sql.cc
+++ b/storage/innobase/fts/fts0sql.cc
@@ -86,14 +86,14 @@ fts_get_table_id(
/** Construct the name of an internal FTS table for the given table.
@param[in] fts_table metadata on fulltext-indexed table
-@param[in] dict_locked whether dict_sys->mutex is being held
+@param[in] dict_locked whether dict_sys.mutex is being held
@return the prefix, must be freed with ut_free() */
char* fts_get_table_name_prefix(const fts_table_t* fts_table)
{
char table_id[FTS_AUX_MIN_TABLE_ID_LENGTH];
const size_t table_id_len = size_t(fts_get_table_id(fts_table,
table_id)) + 1;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
/* Include the separator as well. */
const size_t dbname_len = fts_table->table->name.dblen() + 1;
ut_ad(dbname_len > 1);
@@ -101,7 +101,7 @@ char* fts_get_table_name_prefix(const fts_table_t* fts_table)
char* prefix_name = static_cast<char*>(
ut_malloc_nokey(prefix_name_len));
memcpy(prefix_name, fts_table->table->name.m_name, dbname_len);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
memcpy(prefix_name + dbname_len, "FTS_", 4);
memcpy(prefix_name + dbname_len + 4, table_id, table_id_len);
return prefix_name;
@@ -110,20 +110,20 @@ char* fts_get_table_name_prefix(const fts_table_t* fts_table)
/** Construct the name of an internal FTS table for the given table.
@param[in] fts_table metadata on fulltext-indexed table
@param[out] table_name a name up to MAX_FULL_NAME_LEN
-@param[in] dict_locked whether dict_sys->mutex is being held */
+@param[in] dict_locked whether dict_sys.mutex is being held */
void fts_get_table_name(const fts_table_t* fts_table, char* table_name,
bool dict_locked)
{
if (!dict_locked) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* Include the separator as well. */
const size_t dbname_len = fts_table->table->name.dblen() + 1;
ut_ad(dbname_len > 1);
memcpy(table_name, fts_table->table->name.m_name, dbname_len);
if (!dict_locked) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
memcpy(table_name += dbname_len, "FTS_", 4);
table_name += 4;
@@ -152,17 +152,17 @@ fts_parse_sql(
&& fts_table->table->fts->dict_locked);
if (!dict_locked) {
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
/* The InnoDB SQL parser is not re-entrant. */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
graph = pars_sql(info, str);
ut_a(graph);
if (!dict_locked) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
ut_free(str);
@@ -182,7 +182,7 @@ fts_parse_sql_no_dict_lock(
char* str;
que_t* graph;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
str = ut_str3cat(fts_sql_begin, sql, fts_sql_end);
diff --git a/storage/innobase/fut/fut0lst.cc b/storage/innobase/fut/fut0lst.cc
index 203820037e1..e9a4c3b8636 100644
--- a/storage/innobase/fut/fut0lst.cc
+++ b/storage/innobase/fut/fut0lst.cc
@@ -58,8 +58,8 @@ flst_add_to_empty(
flst_write_addr(base + FLST_LAST, node_addr, mtr);
/* Set prev and next fields of node to add */
- flst_write_addr(node + FLST_PREV, fil_addr_null, mtr);
- flst_write_addr(node + FLST_NEXT, fil_addr_null, mtr);
+ flst_zero_addr(node + FLST_PREV, mtr);
+ flst_zero_addr(node + FLST_NEXT, mtr);
/* Update len of base node */
mlog_write_ulint(base + FLST_LEN, 1, MLOG_4BYTES, mtr);
@@ -120,13 +120,11 @@ flst_add_last(
if (last_addr.page == node_addr.page) {
last_node = page_align(node) + last_addr.boffset;
} else {
- bool found;
- const page_size_t& page_size
- = fil_space_get_page_size(space, &found);
+ fil_space_t* s = fil_space_acquire_silent(space);
+ ulint zip_size = s ? s->zip_size() : 0;
+ if (s) s->release();
- ut_ad(found);
-
- last_node = fut_get_ptr(space, page_size, last_addr,
+ last_node = fut_get_ptr(space, zip_size, last_addr,
RW_SX_LATCH, mtr);
}
@@ -170,13 +168,11 @@ flst_add_first(
if (first_addr.page == node_addr.page) {
first_node = page_align(node) + first_addr.boffset;
} else {
- bool found;
- const page_size_t& page_size
- = fil_space_get_page_size(space, &found);
-
- ut_ad(found);
+ fil_space_t* s = fil_space_acquire_silent(space);
+ ulint zip_size = s ? s->zip_size() : 0;
+ if (s) s->release();
- first_node = fut_get_ptr(space, page_size, first_addr,
+ first_node = fut_get_ptr(space, zip_size, first_addr,
RW_SX_LATCH, mtr);
}
@@ -230,13 +226,11 @@ flst_insert_after(
if (!fil_addr_is_null(node3_addr)) {
/* Update prev field of node3 */
- bool found;
- const page_size_t& page_size
- = fil_space_get_page_size(space, &found);
-
- ut_ad(found);
+ fil_space_t* s = fil_space_acquire_silent(space);
+ ulint zip_size = s ? s->zip_size() : 0;
+ if (s) s->release();
- node3 = fut_get_ptr(space, page_size,
+ node3 = fut_get_ptr(space, zip_size,
node3_addr, RW_SX_LATCH, mtr);
flst_write_addr(node3 + FLST_PREV, node2_addr, mtr);
} else {
@@ -294,14 +288,12 @@ flst_insert_before(
flst_write_addr(node2 + FLST_NEXT, node3_addr, mtr);
if (!fil_addr_is_null(node1_addr)) {
- bool found;
- const page_size_t& page_size
- = fil_space_get_page_size(space, &found);
-
- ut_ad(found);
+ fil_space_t* s = fil_space_acquire_silent(space);
+ ulint zip_size = s ? s->zip_size() : 0;
+ if (s) s->release();
/* Update next field of node1 */
- node1 = fut_get_ptr(space, page_size, node1_addr,
+ node1 = fut_get_ptr(space, zip_size, node1_addr,
RW_SX_LATCH, mtr);
flst_write_addr(node1 + FLST_NEXT, node2_addr, mtr);
} else {
@@ -344,11 +336,9 @@ flst_remove(
buf_ptr_get_fsp_addr(node2, &space, &node2_addr);
- bool found;
- const page_size_t& page_size = fil_space_get_page_size(space,
- &found);
-
- ut_ad(found);
+ fil_space_t* s = fil_space_acquire_silent(space);
+ ulint zip_size = s ? s->zip_size() : 0;
+ if (s) s->release();
node1_addr = flst_get_prev_addr(node2, mtr);
node3_addr = flst_get_next_addr(node2, mtr);
@@ -361,7 +351,7 @@ flst_remove(
node1 = page_align(node2) + node1_addr.boffset;
} else {
- node1 = fut_get_ptr(space, page_size,
+ node1 = fut_get_ptr(space, zip_size,
node1_addr, RW_SX_LATCH, mtr);
}
@@ -380,7 +370,7 @@ flst_remove(
node3 = page_align(node2) + node3_addr.boffset;
} else {
- node3 = fut_get_ptr(space, page_size,
+ node3 = fut_get_ptr(space, zip_size,
node3_addr, RW_SX_LATCH, mtr);
}
@@ -431,11 +421,9 @@ flst_validate(
/* Find out the space id */
buf_ptr_get_fsp_addr(base, &space, &base_addr);
- bool found;
- const page_size_t& page_size = fil_space_get_page_size(space,
- &found);
-
- ut_ad(found);
+ fil_space_t* s = fil_space_acquire_silent(space);
+ ulint zip_size = s ? s->zip_size() : 0;
+ if (s) s->release();
len = flst_get_len(base);
node_addr = flst_get_first(base, mtr1);
@@ -443,7 +431,7 @@ flst_validate(
for (i = 0; i < len; i++) {
mtr_start(&mtr2);
- node = fut_get_ptr(space, page_size,
+ node = fut_get_ptr(space, zip_size,
node_addr, RW_SX_LATCH, &mtr2);
node_addr = flst_get_next_addr(node, &mtr2);
@@ -458,7 +446,7 @@ flst_validate(
for (i = 0; i < len; i++) {
mtr_start(&mtr2);
- node = fut_get_ptr(space, page_size,
+ node = fut_get_ptr(space, zip_size,
node_addr, RW_SX_LATCH, &mtr2);
node_addr = flst_get_prev_addr(node, &mtr2);
diff --git a/storage/innobase/gis/gis0rtree.cc b/storage/innobase/gis/gis0rtree.cc
index bbcf36b74fe..b7f8e924431 100644
--- a/storage/innobase/gis/gis0rtree.cc
+++ b/storage/innobase/gis/gis0rtree.cc
@@ -743,6 +743,8 @@ rtr_adjust_upper_level(
mem_heap_free(heap);
+ ut_ad(block->zip_size() == index->table->space->zip_size());
+
const uint32_t next_page_no = btr_page_get_next(page);
if (next_page_no != FIL_NULL) {
@@ -750,8 +752,8 @@ rtr_adjust_upper_level(
next_page_no);
buf_block_t* next_block = btr_block_get(
- next_page_id, dict_table_page_size(index->table),
- RW_X_LATCH, index, mtr);
+ next_page_id, block->zip_size(), RW_X_LATCH,
+ index, mtr);
#ifdef UNIV_BTR_DEBUG
ut_a(page_is_comp(next_block->frame) == page_is_comp(page));
ut_a(btr_page_get_prev(next_block->frame)
@@ -896,7 +898,7 @@ rtr_split_page_move_rec_list(
mtr_set_log_mode(mtr, log_mode);
if (!page_zip_compress(new_page_zip, new_page, index,
- page_zip_level, NULL, mtr)) {
+ page_zip_level, mtr)) {
ulint ret_pos;
/* Before trying to reorganize the page,
@@ -1847,7 +1849,7 @@ rtr_estimate_n_rows_in_range(
buf_block_t* block = btr_block_get(
page_id_t(index->table->space_id, index->page),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_S_LATCH, index, &mtr);
const page_t* page = buf_block_get_frame(block);
const unsigned n_recs = page_header_get_field(page, PAGE_N_RECS);
diff --git a/storage/innobase/gis/gis0sea.cc b/storage/innobase/gis/gis0sea.cc
index e5ba43faa0b..18f75e3d139 100644
--- a/storage/innobase/gis/gis0sea.cc
+++ b/storage/innobase/gis/gis0sea.cc
@@ -145,7 +145,7 @@ rtr_pcur_getnext_from_path(
| MTR_MEMO_X_LOCK));
}
- const page_size_t page_size(index->table->space->flags);
+ const ulint zip_size = index->table->space->zip_size();
/* Pop each node/page to be searched from "path" structure
and do a search on it. Please note, any pages that are in
@@ -269,7 +269,7 @@ rtr_pcur_getnext_from_path(
block = buf_page_get_gen(
page_id_t(index->table->space_id,
- next_rec.page_no), page_size,
+ next_rec.page_no), zip_size,
rw_latch, NULL, BUF_GET, __FILE__, __LINE__, mtr, &err);
if (block == NULL) {
@@ -424,7 +424,7 @@ rtr_pcur_getnext_from_path(
block,
page_id_t(index->table->space_id,
block->page.id.page_no()),
- page_size, BTR_MODIFY_TREE,
+ zip_size, BTR_MODIFY_TREE,
btr_cur, mtr);
}
@@ -971,7 +971,7 @@ rtr_create_rtr_info(
&rtr_info->rtr_path_mutex);
mutex_enter(&index->rtr_track->rtr_active_mutex);
- index->rtr_track->rtr_active->push_back(rtr_info);
+ index->rtr_track->rtr_active.push_front(rtr_info);
mutex_exit(&index->rtr_track->rtr_active_mutex);
return(rtr_info);
}
@@ -1044,7 +1044,7 @@ rtr_init_rtr_info(
rtr_info->index = index;
mutex_enter(&index->rtr_track->rtr_active_mutex);
- index->rtr_track->rtr_active->push_back(rtr_info);
+ index->rtr_track->rtr_active.push_front(rtr_info);
mutex_exit(&index->rtr_track->rtr_active_mutex);
}
@@ -1096,7 +1096,7 @@ rtr_clean_rtr_info(
}
if (index) {
- index->rtr_track->rtr_active->remove(rtr_info);
+ index->rtr_track->rtr_active.remove(rtr_info);
mutex_exit(&index->rtr_track->rtr_active_mutex);
}
@@ -1201,36 +1201,22 @@ rtr_check_discard_page(
the root page */
buf_block_t* block) /*!< in: block of page to be discarded */
{
- ulint pageno = block->page.id.page_no();
- rtr_info_t* rtr_info;
- rtr_info_active::iterator it;
+ const ulint pageno = block->page.id.page_no();
mutex_enter(&index->rtr_track->rtr_active_mutex);
- for (it = index->rtr_track->rtr_active->begin();
- it != index->rtr_track->rtr_active->end(); ++it) {
- rtr_info = *it;
- rtr_node_path_t::iterator rit;
- bool found = false;
-
+ for (const auto& rtr_info : index->rtr_track->rtr_active) {
if (cursor && rtr_info == cursor->rtr_info) {
continue;
}
mutex_enter(&rtr_info->rtr_path_mutex);
- for (rit = rtr_info->path->begin();
- rit != rtr_info->path->end(); ++rit) {
- node_visit_t node = *rit;
-
+ for (const node_visit_t& node : *rtr_info->path) {
if (node.page_no == pageno) {
- found = true;
+ rtr_rebuild_path(rtr_info, pageno);
break;
}
}
-
- if (found) {
- rtr_rebuild_path(rtr_info, pageno);
- }
mutex_exit(&rtr_info->rtr_path_mutex);
if (rtr_info->matches) {
@@ -1360,8 +1346,7 @@ rtr_cur_restore_position(
page_cur_t* page_cursor;
node_visit_t* node = rtr_get_parent_node(btr_cur, level, false);
node_seq_t path_ssn = node->seq_no;
- const page_size_t page_size(index->table->space->flags);
-
+ const ulint zip_size = index->table->space->zip_size();
ulint page_no = node->page_no;
heap = mem_heap_create(256);
@@ -1377,7 +1362,7 @@ search_again:
block = buf_page_get_gen(
page_id_t(index->table->space_id, page_no),
- page_size, RW_X_LATCH, NULL,
+ zip_size, RW_X_LATCH, NULL,
BUF_GET, __FILE__, __LINE__, mtr, &err);
ut_ad(block);
@@ -1577,14 +1562,13 @@ rtr_copy_buf(
matches->block.n_fields = block->n_fields;
matches->block.left_side = block->left_side;
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
- matches->block.n_pointers = block->n_pointers;
+ matches->block.n_pointers = 0;
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
matches->block.curr_n_fields = block->curr_n_fields;
matches->block.curr_left_side = block->curr_left_side;
matches->block.index = block->index;
#endif /* BTR_CUR_HASH_ADAPT */
- ut_d(matches->block.debug_latch = block->debug_latch);
-
+ ut_d(matches->block.debug_latch = NULL);
}
/****************************************************************//**
diff --git a/storage/innobase/ha/ha0ha.cc b/storage/innobase/ha/ha0ha.cc
index f7e3c53495b..8e8a3369b7c 100644
--- a/storage/innobase/ha/ha0ha.cc
+++ b/storage/innobase/ha/ha0ha.cc
@@ -245,11 +245,8 @@ ha_insert_for_fold_func(
buf_block_t* prev_block = prev_node->block;
ut_a(prev_block->frame
== page_align(prev_node->data));
- ut_a(my_atomic_addlint(&prev_block->n_pointers,
- ulint(-1))
- < MAX_N_POINTERS);
- ut_a(my_atomic_addlint(&block->n_pointers, 1)
- < MAX_N_POINTERS);
+ ut_a(prev_block->n_pointers-- < MAX_N_POINTERS);
+ ut_a(block->n_pointers++ < MAX_N_POINTERS);
}
prev_node->block = block;
@@ -280,8 +277,7 @@ ha_insert_for_fold_func(
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
if (table->adaptive) {
- ut_a(my_atomic_addlint(&block->n_pointers, 1)
- < MAX_N_POINTERS);
+ ut_a(block->n_pointers++ < MAX_N_POINTERS);
}
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
@@ -342,8 +338,7 @@ ha_delete_hash_node(
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
if (table->adaptive) {
ut_a(del_node->block->frame = page_align(del_node->data));
- ut_a(my_atomic_addlint(&del_node->block->n_pointers, ulint(-1))
- < MAX_N_POINTERS);
+ ut_a(del_node->block->n_pointers-- < MAX_N_POINTERS);
}
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
@@ -385,11 +380,8 @@ ha_search_and_update_if_found_func(
if (node) {
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
if (table->adaptive) {
- ut_a(my_atomic_addlint(&node->block->n_pointers,
- ulint(-1))
- < MAX_N_POINTERS);
- ut_a(my_atomic_addlint(&new_block->n_pointers, 1)
- < MAX_N_POINTERS);
+ ut_a(node->block->n_pointers-- < MAX_N_POINTERS);
+ ut_a(new_block->n_pointers++ < MAX_N_POINTERS);
}
node->block = new_block;
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 9ce1915b2cd..b8a80d02350 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -54,6 +54,8 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include <my_bitmap.h>
#include <mysql/service_thd_alloc.h>
#include <mysql/service_thd_wait.h>
+#include "field.h"
+#include "scope.h"
// MYSQL_PLUGIN_IMPORT extern my_bool lower_case_file_system;
// MYSQL_PLUGIN_IMPORT extern char mysql_unpacked_real_data_home[];
@@ -97,7 +99,6 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include "row0mysql.h"
#include "row0quiesce.h"
#include "row0sel.h"
-#include "row0trunc.h"
#include "row0upd.h"
#include "fil0crypt.h"
#include "srv0mon.h"
@@ -132,6 +133,9 @@ void close_thread_tables(THD* thd);
#define tdc_size 400
#endif
+#include <mysql/plugin.h>
+#include <mysql/service_wsrep.h>
+
#include "ha_innodb.h"
#include "i_s.h"
#include "sync0sync.h"
@@ -139,25 +143,10 @@ void close_thread_tables(THD* thd);
#include <string>
#include <sstream>
-#include <mysql/plugin.h>
-#include <mysql/service_wsrep.h>
-
#ifdef WITH_WSREP
#include "dict0priv.h"
#include <mysql/service_md5.h>
#include "wsrep_sst.h"
-
-static inline wsrep_ws_handle_t*
-wsrep_ws_handle(THD* thd, const trx_t* trx) {
- return wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd),
- (wsrep_trx_id_t)trx->id);
-}
-
-extern void wsrep_cleanup_transaction(THD *thd);
-static void wsrep_abort_transaction(handlerton*, THD *, THD *, my_bool);
-static void wsrep_fake_trx_id(handlerton* hton, THD *thd);
-static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid);
-static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid);
#endif /* WITH_WSREP */
/** to force correct commit order in binlog */
@@ -250,10 +239,10 @@ static void innodb_max_purge_lag_wait_update(THD *thd, st_mysql_sys_var *,
void *, const void *limit)
{
const uint l= *static_cast<const uint*>(limit);
- if (trx_sys.history_size() <= l)
+ if (trx_sys.rseg_history_len <= l)
return;
mysql_mutex_unlock(&LOCK_global_system_variables);
- while (trx_sys.history_size() > l)
+ while (trx_sys.rseg_history_len > l)
{
if (thd_kill_level(thd))
break;
@@ -285,7 +274,7 @@ is_partition(
/** Signal to shut down InnoDB (NULL if shutdown was signaled, or if
running in innodb_read_only mode, srv_read_only_mode) */
-st_my_thread_var *srv_running;
+std::atomic <st_my_thread_var *> srv_running;
/** Service thread that waits for the server shutdown and stops purge threads.
Purge workers have THDs that are needed to calculate virtual columns.
This THDs must be destroyed rather early in the server shutdown sequence.
@@ -313,20 +302,16 @@ thd_destructor_proxy(void *)
mysql_mutex_lock(&thd_destructor_mutex);
- my_atomic_storeptr_explicit(reinterpret_cast<void**>(&srv_running),
- myvar,
- MY_MEMORY_ORDER_RELAXED);
+ srv_running.store(myvar, std::memory_order_relaxed);
/* wait until the server wakes the THD to abort and die */
- while (!srv_running->abort)
+ while (!myvar->abort)
mysql_cond_wait(&thd_destructor_cond, &thd_destructor_mutex);
mysql_mutex_unlock(&thd_destructor_mutex);
- my_atomic_storeptr_explicit(reinterpret_cast<void**>(&srv_running),
- NULL,
- MY_MEMORY_ORDER_RELAXED);
+ srv_running.store(NULL, std::memory_order_relaxed);
while (srv_fast_shutdown == 0 &&
(trx_sys.any_active_transactions() ||
- (uint)thread_count > srv_n_purge_threads + 1)) {
+ THD_count::value() > srv_n_purge_threads + 1)) {
thd_proc_info(thd, "InnoDB slow shutdown wait");
os_thread_sleep(1000);
}
@@ -394,6 +379,8 @@ const char* innodb_checksum_algorithm_names[] = {
"strict_innodb",
"none",
"strict_none",
+ "full_crc32",
+ "strict_full_crc32",
NullS
};
@@ -493,7 +480,8 @@ static TYPELIB innodb_change_buffering_typelib = {
/** Allowed values of innodb_instant_alter_column_allowed */
const char* innodb_instant_alter_column_allowed_names[] = {
"never", /* compatible with MariaDB 5.5 to 10.2 */
- "add_last",/* allow instant ADD COLUMN */
+ "add_last",/* allow instant ADD COLUMN ... LAST */
+ "add_drop_reorder", /* allow instant ADD anywhere & DROP & reorder */
NullS
};
@@ -613,13 +601,11 @@ static PSI_cond_info all_innodb_conds[] = {
performance schema instrumented if "UNIV_PFS_MUTEX"
is defined */
static PSI_mutex_info all_innodb_mutexes[] = {
- PSI_KEY(autoinc_mutex),
# ifndef PFS_SKIP_BUFFER_MUTEX_RWLOCK
PSI_KEY(buffer_block_mutex),
# endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */
PSI_KEY(buf_pool_mutex),
PSI_KEY(buf_pool_zip_mutex),
- PSI_KEY(cache_last_read_mutex),
PSI_KEY(dict_foreign_err_mutex),
PSI_KEY(dict_sys_mutex),
PSI_KEY(recalc_pool_mutex),
@@ -664,7 +650,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
PSI_KEY(rtr_match_mutex),
PSI_KEY(rtr_path_mutex),
PSI_KEY(trx_sys_mutex),
- PSI_KEY(zip_pad_mutex)
};
# endif /* UNIV_PFS_MUTEX */
@@ -800,31 +785,13 @@ innodb_stopword_table_validate(
static
void innodb_ft_cache_size_update(THD*, st_mysql_sys_var*, void*, const void* save)
{
-#if UNIV_WORD_SIZE == 4
- my_atomic_store32_explicit(
- &fts_max_cache_size, *static_cast<const size_t*>(save),
- MY_MEMORY_ORDER_RELAXED);
-#else
- my_atomic_store64_explicit(
- reinterpret_cast<int64*>(&fts_max_cache_size),
- *static_cast<const size_t*>(save),
- MY_MEMORY_ORDER_RELAXED);
-#endif
+ fts_max_cache_size= *static_cast<const size_t*>(save);
}
static
void innodb_ft_total_cache_size_update(THD*, st_mysql_sys_var*, void*, const void* save)
{
-#if UNIV_WORD_SIZE == 4
- my_atomic_store32_explicit(
- &fts_max_total_cache_size, *static_cast<const size_t*>(save),
- MY_MEMORY_ORDER_RELAXED);
-#else
- my_atomic_store64_explicit(
- reinterpret_cast<int64*>(&fts_max_total_cache_size),
- *static_cast<const size_t*>(save),
- MY_MEMORY_ORDER_RELAXED);
-#endif
+ fts_max_total_cache_size= *static_cast<const size_t*>(save);
}
static bool is_mysql_datadir_path(const char *path);
@@ -1100,8 +1067,6 @@ static SHOW_VAR innodb_status_variables[]= {
(char*) &export_vars.innodb_pages_created, SHOW_LONG},
{"pages_read",
(char*) &export_vars.innodb_pages_read, SHOW_LONG},
- {"pages0_read",
- (char*) &export_vars.innodb_page0_read, SHOW_LONG},
{"pages_written",
(char*) &export_vars.innodb_pages_written, SHOW_LONG},
{"row_lock_current_waits",
@@ -1725,7 +1690,11 @@ static inline void innobase_srv_conc_enter_innodb(row_prebuilt_t *prebuilt)
trx_t* trx = prebuilt->trx;
#ifdef WITH_WSREP
- if (trx->is_wsrep() && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) return;
+ if (global_system_variables.wsrep_on &&
+ (wsrep_thd_is_applying(trx->mysql_thd)
+ || wsrep_thd_is_toi(trx->mysql_thd))) {
+ return;
+ }
#endif /* WITH_WSREP */
if (srv_thread_concurrency) {
@@ -1761,7 +1730,11 @@ static inline void innobase_srv_conc_exit_innodb(row_prebuilt_t *prebuilt)
trx_t* trx = prebuilt->trx;
#ifdef WITH_WSREP
- if (trx->is_wsrep() && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) return;
+ if (global_system_variables.wsrep_on &&
+ (wsrep_thd_is_applying(trx->mysql_thd)
+ || wsrep_thd_is_toi(trx->mysql_thd))) {
+ return;
+ }
#endif /* WITH_WSREP */
/* This is to avoid making an unnecessary function call. */
@@ -1885,7 +1858,7 @@ thd_to_trx_id(
return(thd_to_trx(thd)->id);
}
-uint32 wsrep_sst_disable_writes;
+Atomic_relaxed<bool> wsrep_sst_disable_writes;
static void sst_disable_innodb_writes()
{
@@ -1893,8 +1866,7 @@ static void sst_disable_innodb_writes()
fil_crypt_set_thread_cnt(0);
srv_n_fil_crypt_threads= old_count;
- my_atomic_store32_explicit(&wsrep_sst_disable_writes, true,
- MY_MEMORY_ORDER_RELAXED);
+ wsrep_sst_disable_writes= true;
purge_sys.stop();
/* We are holding a global MDL thanks to FLUSH TABLES WITH READ LOCK.
@@ -1923,8 +1895,7 @@ static void sst_enable_innodb_writes()
ut_ad(recv_no_log_write);
ut_d(recv_no_log_write= false);
purge_sys.resume();
- my_atomic_store32_explicit(&wsrep_sst_disable_writes, false,
- MY_MEMORY_ORDER_RELAXED);
+ wsrep_sst_disable_writes= false;
const uint old_count= srv_n_fil_crypt_threads;
srv_n_fil_crypt_threads= 0;
fil_crypt_set_thread_cnt(old_count);
@@ -1937,8 +1908,11 @@ static void innodb_disable_internal_writes(bool disable)
else
sst_enable_innodb_writes();
}
-#endif /* WITH_WSREP */
+static void wsrep_abort_transaction(handlerton*, THD *, THD *, my_bool);
+static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid);
+static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid);
+#endif /* WITH_WSREP */
/********************************************************************//**
Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth
time calls srv_active_wake_master_thread. This function should be used
@@ -2972,8 +2946,9 @@ ha_innobase::ha_innobase(
| HA_CAN_EXPORT
| HA_CAN_RTREEKEYS
| HA_CAN_TABLES_WITHOUT_ROLLBACK
+ | HA_CAN_ONLINE_BACKUPS
| HA_CONCURRENT_OPTIMIZE
- | (srv_force_primary_key ? HA_WANTS_PRIMARY_KEY : 0)
+ | (srv_force_primary_key ? HA_REQUIRE_PRIMARY_KEY : 0)
),
m_start_of_scan(),
m_mysql_has_locked()
@@ -3508,6 +3483,10 @@ ha_innobase::reset_template(void)
in ha_innobase::write_row(). */
m_prebuilt->template_type = ROW_MYSQL_NO_TEMPLATE;
}
+ if (m_prebuilt->pk_filter) {
+ m_prebuilt->pk_filter = NULL;
+ m_prebuilt->template_type = ROW_MYSQL_NO_TEMPLATE;
+ }
}
/*****************************************************************//**
@@ -3645,7 +3624,8 @@ static const char* deprecated_idle_flush_pct
static const char* deprecated_innodb_checksum_algorithm
= "Setting innodb_checksum_algorithm to values other than"
- " crc32 or strict_crc32 is UNSAFE and DEPRECATED."
+ " crc32, full_crc32, strict_crc32 or strict_full_crc32"
+ " is UNSAFE and DEPRECATED."
" These deprecated values will be disallowed in MariaDB 10.6.";
static ulong innodb_idle_flush_pct;
@@ -3683,6 +3663,8 @@ static void innodb_checksum_algorithm_update(THD *thd, st_mysql_sys_var*,
switch (srv_checksum_algorithm) {
case SRV_CHECKSUM_ALGORITHM_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
break;
default:
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
@@ -3971,13 +3953,18 @@ static int innodb_init_params()
DBUG_RETURN(HA_ERR_INITIALIZATION);
}
- /* This is the first time univ_page_size is used.
- It was initialized to 16k pages before srv_page_size was set */
- univ_page_size.copy_from(
- page_size_t(srv_page_size, srv_page_size, false));
-
srv_sys_space.set_space_id(TRX_SYS_SPACE);
- srv_sys_space.set_flags(FSP_FLAGS_PAGE_SSIZE());
+
+ switch (srv_checksum_algorithm) {
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ srv_sys_space.set_flags(FSP_FLAGS_FCRC32_MASK_MARKER
+ | FSP_FLAGS_FCRC32_PAGE_SSIZE());
+ break;
+ default:
+ srv_sys_space.set_flags(FSP_FLAGS_PAGE_SSIZE());
+ }
+
srv_sys_space.set_name("innodb_system");
srv_sys_space.set_path(srv_data_home);
@@ -3990,7 +3977,10 @@ static int innodb_init_params()
srv_tmp_space.set_name("innodb_temporary");
srv_tmp_space.set_path(srv_data_home);
- srv_tmp_space.set_flags(FSP_FLAGS_PAGE_SSIZE());
+
+ /* Temporary tablespace is in full crc32 format. */
+ srv_tmp_space.set_flags(FSP_FLAGS_FCRC32_MASK_MARKER
+ | FSP_FLAGS_FCRC32_PAGE_SSIZE());
if (!srv_tmp_space.parse_params(innobase_temp_data_file_path, false)) {
ib::error() << "Unable to parse innodb_temp_data_file_path="
@@ -4116,6 +4106,8 @@ static int innodb_init_params()
switch (srv_checksum_algorithm) {
case SRV_CHECKSUM_ALGORITHM_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
break;
default:
ib::warn() << deprecated_innodb_checksum_algorithm;
@@ -4282,13 +4274,13 @@ static int innodb_init(void* p)
innobase_hton->flags =
HTON_SUPPORTS_EXTENDED_KEYS | HTON_SUPPORTS_FOREIGN_KEYS |
HTON_NATIVE_SYS_VERSIONING |
+ HTON_WSREP_REPLICATION |
HTON_REQUIRES_CLOSE_AFTER_TRUNCATE;
#ifdef WITH_WSREP
innobase_hton->abort_transaction=wsrep_abort_transaction;
innobase_hton->set_checkpoint=innobase_wsrep_set_checkpoint;
innobase_hton->get_checkpoint=innobase_wsrep_get_checkpoint;
- innobase_hton->fake_trx_id=wsrep_fake_trx_id;
innobase_hton->disable_internal_writes=innodb_disable_internal_writes;
#endif /* WITH_WSREP */
@@ -4381,9 +4373,7 @@ static int innodb_init(void* p)
mysql_thread_create(thd_destructor_thread_key,
&thd_destructor_thread,
NULL, thd_destructor_proxy, NULL);
- while (!my_atomic_loadptr_explicit(reinterpret_cast<void**>
- (&srv_running),
- MY_MEMORY_ORDER_RELAXED))
+ while (!srv_running.load(std::memory_order_relaxed))
os_thread_sleep(20);
}
@@ -4408,9 +4398,6 @@ static int innodb_init(void* p)
}
#endif /* MYSQL_DYNAMIC_PLUGIN */
- /* Currently, monitor counter information are not persistent. */
- memset(monitor_set_tbl, 0, sizeof monitor_set_tbl);
-
memset(innodb_counter_value, 0, sizeof innodb_counter_value);
/* Do this as late as possible so server is fully starts up,
@@ -4462,11 +4449,7 @@ innobase_end(handlerton*, ha_panic_function)
}
}
- st_my_thread_var* r = reinterpret_cast<st_my_thread_var*>(
- my_atomic_loadptr_explicit(
- reinterpret_cast<void**>(&srv_running),
- MY_MEMORY_ORDER_RELAXED));
- if (r) {
+ if (auto r = srv_running.load(std::memory_order_relaxed)) {
ut_ad(!srv_read_only_mode);
if (!abort_loop) {
// may be UNINSTALL PLUGIN statement
@@ -4625,6 +4608,14 @@ innobase_commit_ordered_2(
trx->flush_log_later = true;
}
+#ifdef WITH_WSREP
+ /* If the transaction is not run in 2pc, we must assign wsrep
+ XID here in order to get it written in rollback segment. */
+ if (trx->is_wsrep()) {
+ thd_get_xid(thd, (MYSQL_XID*)trx->xid);
+ }
+#endif /* WITH_WSREP */
+
innobase_commit_low(trx);
if (!read_only) {
@@ -4826,6 +4817,15 @@ innobase_rollback(
dberr_t error;
+#ifdef WITH_WSREP
+ /* If trx was assigned wsrep XID in prepare phase and the
+ trx is being rolled back due to BF abort, clear XID in order
+ to avoid writing it to rollback segment out of order. The XID
+ will be reassigned when the transaction is replayed. */
+ if (trx->state != TRX_STATE_NOT_STARTED && wsrep_is_wsrep_xid(trx->xid)) {
+ trx->xid->null();
+ }
+#endif /* WITH_WSREP */
if (rollback_trx
|| !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) {
@@ -4862,7 +4862,8 @@ innobase_rollback_trx(
if (!trx->has_logged()) {
trx->will_lock = false;
#ifdef WITH_WSREP
- trx->wsrep = false;
+ trx->wsrep= false;
+ trx->lock.was_chosen_as_wsrep_victim= false;
#endif
DBUG_RETURN(0);
}
@@ -5227,33 +5228,30 @@ rollback_and_free:
DBUG_RETURN(0);
}
-UNIV_INTERN void lock_cancel_waiting_and_release(lock_t* lock);
+void lock_cancel_waiting_and_release(lock_t *lock);
/** Cancel any pending lock request associated with the current THD.
@sa THD::awake() @sa ha_kill_query() */
-static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
+static void innobase_kill_query(handlerton*, THD *thd, enum thd_kill_levels)
{
DBUG_ENTER("innobase_kill_query");
-#ifdef WITH_WSREP
- if (wsrep_thd_get_conflict_state(thd) != NO_CONFLICT)
- {
- /* if victim has been signaled by BF thread and/or aborting
- is already progressing, following query aborting is not necessary
- any more. */
- WSREP_DEBUG("Victim thread %ld bail out conflict_state %s query %s",
- thd_get_thread_id(thd),
- wsrep_thd_conflict_state_str(thd), wsrep_thd_query(thd));
- DBUG_VOID_RETURN;
- }
-#endif /* WITH_WSREP */
if (trx_t* trx= thd_to_trx(thd))
{
ut_ad(trx->mysql_thd == thd);
+#ifdef WITH_WSREP
+ if (wsrep_thd_is_aborting(thd) || trx->lock.was_chosen_as_wsrep_victim)
+ /* if victim has been signaled by BF thread and/or aborting is already
+ progressing, following query aborting is not necessary any more.
+ Also, BF thread should own trx mutex for the victim. */
+ DBUG_VOID_RETURN;
+#endif /* WITH_WSREP */
lock_mutex_enter();
if (lock_t *lock= trx->lock.wait_lock)
{
trx_mutex_enter(trx);
+ if (trx->is_wsrep() && wsrep_thd_is_aborting(thd))
+ trx->lock.was_chosen_as_deadlock_victim= TRUE;
lock_cancel_waiting_and_release(lock);
trx_mutex_exit(trx);
}
@@ -5352,17 +5350,6 @@ ha_innobase::index_type(
}
/****************************************************************//**
-Returns the table file name extension.
-@return file extension string */
-
-const char**
-ha_innobase::bas_ext() const
-/*========================*/
-{
- return(ha_innobase_exts);
-}
-
-/****************************************************************//**
Returns the operations supported for indexes.
@return flags of supported operations */
@@ -5377,24 +5364,21 @@ ha_innobase::index_flags(
return(0);
}
- ulong extra_flag= 0;
-
- if (table && key == table->s->primary_key) {
- extra_flag= HA_CLUSTERED_INDEX;
- }
-
- ulong flags = HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER
- | HA_READ_RANGE | HA_KEYREAD_ONLY
- | extra_flag
- | HA_DO_INDEX_COND_PUSHDOWN;
-
/* For spatial index, we don't support descending scan
and ICP so far. */
if (table_share->key_info[key].flags & HA_SPATIAL) {
- flags = HA_READ_NEXT | HA_READ_ORDER| HA_READ_RANGE
+ return HA_READ_NEXT | HA_READ_ORDER| HA_READ_RANGE
| HA_KEYREAD_ONLY | HA_KEY_SCAN_NOT_ROR;
}
+ ulong flags= key == table_share->primary_key
+ ? HA_CLUSTERED_INDEX : 0;
+
+ flags |= HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER
+ | HA_READ_RANGE | HA_KEYREAD_ONLY
+ | HA_DO_INDEX_COND_PUSHDOWN
+ | HA_DO_RANGE_FILTER_PUSHDOWN;
+
return(flags);
}
@@ -5461,7 +5445,7 @@ ha_innobase::keys_to_use_for_scanning()
/****************************************************************//**
Ensures that if there's a concurrent inplace ADD INDEX, being-indexed virtual
columns are computed. They are not marked as indexed in the old table, so the
-server won't add them to the vcol_set automatically */
+server won't add them to the read_set automatically */
void
ha_innobase::column_bitmaps_signal()
/*================================*/
@@ -5481,7 +5465,7 @@ ha_innobase::column_bitmaps_signal()
if (col->ord_part ||
(dict_index_is_online_ddl(clust_index) &&
row_log_col_is_indexed(clust_index, num_v))) {
- table->mark_virtual_col(table->vfield[j]);
+ table->mark_virtual_column_with_deps(table->vfield[j]);
}
num_v++;
}
@@ -5919,12 +5903,12 @@ innobase_build_v_templ(
ut_ad(n_v_col > 0);
if (!locked) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
if (s_templ->vtempl) {
if (!locked) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
DBUG_VOID_RETURN;
}
@@ -5945,9 +5929,8 @@ innobase_build_v_templ(
const dict_v_col_t* vcol = dict_table_get_nth_v_col(
ib_table, i);
- for (ulint j = 0; j < vcol->num_base; j++) {
- ulint col_no = vcol->base_col[j]->ind;
- marker[col_no] = true;
+ for (ulint j = vcol->num_base; j--; ) {
+ marker[vcol->base_col[j]->ind] = true;
}
}
@@ -5955,9 +5938,8 @@ innobase_build_v_templ(
for (ulint i = 0; i < add_v->n_v_col; i++) {
const dict_v_col_t* vcol = &add_v->v_col[i];
- for (ulint j = 0; j < vcol->num_base; j++) {
- ulint col_no = vcol->base_col[j]->ind;
- marker[col_no] = true;
+ for (ulint j = vcol->num_base; j--; ) {
+ marker[vcol->base_col[j]->ind] = true;
}
}
}
@@ -6032,7 +6014,7 @@ innobase_build_v_templ(
}
if (!locked) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
s_templ->db_name = table->s->db.str;
@@ -6169,7 +6151,7 @@ initialize_auto_increment(dict_table_t* table, const Field* field)
const unsigned col_no = innodb_col_no(field);
- dict_table_autoinc_lock(table);
+ table->autoinc_mutex.lock();
table->persistent_autoinc = 1
+ dict_table_get_nth_col_pos(table, col_no, NULL);
@@ -6177,7 +6159,7 @@ initialize_auto_increment(dict_table_t* table, const Field* field)
if (table->autoinc) {
/* Already initialized. Our caller checked
table->persistent_autoinc without
- dict_table_autoinc_lock(), and there might be multiple
+ autoinc_mutex protection, and there might be multiple
ha_innobase::open() executing concurrently. */
} else if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) {
/* If the recovery level is set so high that writes
@@ -6199,7 +6181,7 @@ initialize_auto_increment(dict_table_t* table, const Field* field)
innobase_get_int_col_max_value(field));
}
- dict_table_autoinc_unlock(table);
+ table->autoinc_mutex.unlock();
}
/** Open an InnoDB table
@@ -6209,6 +6191,14 @@ initialize_auto_increment(dict_table_t* table, const Field* field)
int
ha_innobase::open(const char* name, int, uint)
{
+ /* TODO: If trx_rollback_recovered(bool all=false) is ever
+ removed, the first-time open() must hold (or acquire and release)
+ a table lock that conflicts with trx_resurrect_table_locks(),
+ to ensure that any recovered incomplete ALTER TABLE will have been
+ rolled back. Otherwise, dict_table_t::instant could be cleared by
+ the rollback invoking dict_index_t::clear_instant_alter() while
+ open table handles exist in client connections. */
+
char norm_name[FN_REFLEN];
DBUG_ENTER("ha_innobase::open");
@@ -6234,7 +6224,6 @@ ha_innobase::open(const char* name, int, uint)
sql_print_error("Failed to open table %s.\n",
norm_name);
}
-no_such_table:
set_my_errno(ENOENT);
DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
@@ -6260,7 +6249,8 @@ no_such_table:
ib_table->file_unreadable = true;
ib_table->corrupted = true;
dict_table_close(ib_table, FALSE, FALSE);
- goto no_such_table;
+ set_my_errno(ENOENT);
+ DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
}
innobase_copy_frm_flags_from_table_share(ib_table, table->s);
@@ -6323,7 +6313,7 @@ no_such_table:
key_used_on_scan = m_primary_key;
if (ib_table->n_v_cols) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
if (ib_table->vc_templ == NULL) {
ib_table->vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t());
innobase_build_v_templ(
@@ -6331,7 +6321,7 @@ no_such_table:
true);
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
if (!check_index_consistency(table, ib_table)) {
@@ -7390,19 +7380,19 @@ static
const Field*
build_template_needs_field(
/*=======================*/
- ibool index_contains, /*!< in:
- dict_index_contains_col_or_prefix(
- index, i) */
- ibool read_just_key, /*!< in: TRUE when MySQL calls
+ bool index_contains, /*!< in:
+ dict_index_t::contains_col_or_prefix(
+ i) */
+ bool read_just_key, /*!< in: TRUE when MySQL calls
ha_innobase::extra with the
argument HA_EXTRA_KEYREAD; it is enough
to read just columns defined in
the index (i.e., no read of the
clustered index record necessary) */
- ibool fetch_all_in_key,
+ bool fetch_all_in_key,
/*!< in: true=fetch all fields in
the index */
- ibool fetch_primary_key_cols,
+ bool fetch_primary_key_cols,
/*!< in: true=fetch the
primary key columns */
dict_index_t* index, /*!< in: InnoDB index to use */
@@ -7464,11 +7454,11 @@ build_template_needs_field_in_icp(
bool is_virtual)
/*!< in: a virtual column or not */
{
- ut_ad(contains == dict_index_contains_col_or_prefix(index, i, is_virtual));
+ ut_ad(contains == index->contains_col_or_prefix(i, is_virtual));
return(index == prebuilt->index
? contains
- : dict_index_contains_col_or_prefix(prebuilt->index, i, is_virtual));
+ : prebuilt->index->contains_col_or_prefix(i, is_virtual));
}
/**************************************************************//**
@@ -7710,6 +7700,13 @@ ha_innobase::build_template(
/* Below we check column by column if we need to access
the clustered index. */
+ if (pushed_rowid_filter && rowid_filter_is_active) {
+ fetch_primary_key_cols = TRUE;
+ m_prebuilt->pk_filter = this;
+ } else {
+ m_prebuilt->pk_filter = NULL;
+ }
+
const bool skip_virtual = omits_virtual_cols(*table_share);
const ulint n_fields = table_share->fields;
@@ -7734,7 +7731,11 @@ ha_innobase::build_template(
ulint num_v = 0;
if (active_index != MAX_KEY
- && active_index == pushed_idx_cond_keyno) {
+ && active_index == pushed_idx_cond_keyno) {
+ m_prebuilt->idx_cond = this;
+ goto icp;
+ } else if (pushed_rowid_filter && rowid_filter_is_active) {
+icp:
/* Push down an index condition or an end_range check. */
for (ulint i = 0; i < n_fields; i++) {
const Field* field = table->field[i];
@@ -7743,9 +7744,8 @@ ha_innobase::build_template(
num_v++;
continue;
}
- ibool index_contains
- = dict_index_contains_col_or_prefix(
- index, is_v ? num_v : i - num_v, is_v);
+ bool index_contains = index->contains_col_or_prefix(
+ is_v ? num_v : i - num_v, is_v);
if (is_v && index_contains) {
m_prebuilt->n_template = 0;
num_v = 0;
@@ -7883,9 +7883,8 @@ ha_innobase::build_template(
continue;
}
- ibool index_contains
- = dict_index_contains_col_or_prefix(
- index, is_v ? num_v : i - num_v, is_v);
+ bool index_contains = index->contains_col_or_prefix(
+ is_v ? num_v : i - num_v, is_v);
if (!build_template_needs_field_in_icp(
index, m_prebuilt, index_contains,
@@ -7917,8 +7916,6 @@ ha_innobase::build_template(
}
}
}
-
- m_prebuilt->idx_cond = this;
} else {
no_icp:
/* No index condition pushdown */
@@ -7942,8 +7939,8 @@ no_icp:
cluster index. */
if (is_v
&& m_prebuilt->read_just_key
- && !dict_index_contains_col_or_prefix(
- m_prebuilt->index, num_v, true))
+ && !m_prebuilt->index->contains_col_or_prefix(
+ num_v, true))
{
/* Turn off ROW_MYSQL_WHOLE_ROW */
m_prebuilt->template_type =
@@ -7952,21 +7949,15 @@ no_icp:
continue;
}
} else {
- ibool contain;
-
- if (!is_v) {
- contain = dict_index_contains_col_or_prefix(
- index, i - num_v,
- false);
- } else if (skip_virtual
- || dict_index_is_clust(index)) {
+ if (is_v
+ && (skip_virtual || index->is_primary())) {
num_v++;
continue;
- } else {
- contain = dict_index_contains_col_or_prefix(
- index, num_v, true);
}
+ bool contain = index->contains_col_or_prefix(
+ is_v ? num_v: i - num_v, is_v);
+
field = build_template_needs_field(
contain,
m_prebuilt->read_just_key,
@@ -8024,7 +8015,7 @@ ha_innobase::innobase_lock_autoinc(void)
switch (innobase_autoinc_lock_mode) {
case AUTOINC_NO_LOCKING:
/* Acquire only the AUTOINC mutex. */
- dict_table_autoinc_lock(m_prebuilt->table);
+ m_prebuilt->table->autoinc_mutex.lock();
break;
case AUTOINC_NEW_STYLE_LOCKING:
@@ -8033,24 +8024,19 @@ ha_innobase::innobase_lock_autoinc(void)
transaction has already acquired the AUTOINC lock on
behalf of a LOAD FILE or INSERT ... SELECT etc. type of
statement. */
- if (thd_sql_command(m_user_thd) == SQLCOM_INSERT
- || thd_sql_command(m_user_thd) == SQLCOM_REPLACE
- || thd_sql_command(m_user_thd) == SQLCOM_END // RBR event
- ) {
-
+ switch (thd_sql_command(m_user_thd)) {
+ case SQLCOM_INSERT:
+ case SQLCOM_REPLACE:
+ case SQLCOM_END: // RBR event
/* Acquire the AUTOINC mutex. */
- dict_table_autoinc_lock(m_prebuilt->table);
-
+ m_prebuilt->table->autoinc_mutex.lock();
/* We need to check that another transaction isn't
already holding the AUTOINC lock on the table. */
- if (m_prebuilt->table->n_waiting_or_granted_auto_inc_locks) {
- /* Release the mutex to avoid deadlocks and
- fall back to old style locking. */
- dict_table_autoinc_unlock(m_prebuilt->table);
- } else {
+ if (!m_prebuilt->table->n_waiting_or_granted_auto_inc_locks) {
/* Do not fall back to old style locking. */
- break;
+ DBUG_RETURN(error);
}
+ m_prebuilt->table->autoinc_mutex.unlock();
}
/* Use old style locking. */
/* fall through */
@@ -8062,7 +8048,7 @@ ha_innobase::innobase_lock_autoinc(void)
if (error == DB_SUCCESS) {
/* Acquire the AUTOINC mutex. */
- dict_table_autoinc_lock(m_prebuilt->table);
+ m_prebuilt->table->autoinc_mutex.lock();
}
break;
@@ -8090,8 +8076,7 @@ ha_innobase::innobase_set_max_autoinc(
if (error == DB_SUCCESS) {
dict_table_autoinc_update_if_greater(m_prebuilt->table, auto_inc);
-
- dict_table_autoinc_unlock(m_prebuilt->table);
+ m_prebuilt->table->autoinc_mutex.unlock();
}
return(error);
@@ -8105,7 +8090,7 @@ handle.
int
ha_innobase::write_row(
/*===================*/
- uchar* record) /*!< in: a row in MySQL format */
+ const uchar* record) /*!< in: a row in MySQL format */
{
dberr_t error;
#ifdef WITH_WSREP
@@ -8130,16 +8115,6 @@ ha_innobase::write_row(
trx->will_lock = true;
}
-#ifdef WITH_WSREP
- if (trx->is_wsrep() && wsrep_is_load_multi_commit(m_user_thd))
- {
- /* Note that this transaction is still active. */
- trx_register_for_2pc(m_prebuilt->trx);
- /* We will need an IX lock on the destination table. */
- m_prebuilt->sql_stat_start = TRUE;
- }
-#endif /* WITH_WSREP */
-
ins_mode_t vers_set_fields;
/* Handling of Auto-Increment Columns. */
if (table->next_number_field && record == table->record[0]) {
@@ -8251,9 +8226,9 @@ ha_innobase::write_row(
"retrying insert: %s",
wsrep_thd_query(m_user_thd));
error= DB_SUCCESS;
- wsrep_thd_set_conflict_state(
- m_user_thd, MUST_ABORT);
- innobase_srv_conc_exit_innodb(m_prebuilt);
+ wsrep_thd_self_abort(m_user_thd);
+ innobase_srv_conc_exit_innodb(
+ m_prebuilt);
/* jump straight to func exit over
* later wsrep hooks */
goto func_exit;
@@ -8326,10 +8301,14 @@ report_error:
#ifdef WITH_WSREP
if (!error_result && trx->is_wsrep()
- && wsrep_thd_exec_mode(m_user_thd) == LOCAL_STATE
+ && wsrep_thd_is_local(m_user_thd)
+ && !wsrep_thd_ignore_table(m_user_thd)
&& !wsrep_consistency_check(m_user_thd)
- && !wsrep_thd_ignore_table(m_user_thd)) {
- if (wsrep_append_keys(m_user_thd, WSREP_KEY_EXCLUSIVE, record,
+ && (thd_sql_command(m_user_thd) != SQLCOM_CREATE_TABLE)
+ && (thd_sql_command(m_user_thd) != SQLCOM_LOAD ||
+ thd_binlog_format(m_user_thd) == BINLOG_FORMAT_ROW)) {
+ if (wsrep_append_keys(m_user_thd, WSREP_SERVICE_KEY_EXCLUSIVE,
+ record,
NULL)) {
DBUG_PRINT("wsrep", ("row key failed"));
error_result = HA_ERR_INTERNAL_ERROR;
@@ -9034,13 +9013,16 @@ func_exit:
innobase_active_small();
#ifdef WITH_WSREP
- if (error == DB_SUCCESS && trx->is_wsrep() &&
- wsrep_thd_exec_mode(m_user_thd) == LOCAL_STATE &&
- !wsrep_thd_ignore_table(m_user_thd)) {
+ if (error == DB_SUCCESS && trx->is_wsrep()
+ && wsrep_thd_is_local(m_user_thd)
+ && !wsrep_thd_ignore_table(m_user_thd)) {
DBUG_PRINT("wsrep", ("update row key"));
- if (wsrep_append_keys(m_user_thd, WSREP_KEY_EXCLUSIVE, old_row,
- new_row)) {
+ if (wsrep_append_keys(m_user_thd,
+ wsrep_protocol_version >= 4
+ ? WSREP_SERVICE_KEY_UPDATE
+ : WSREP_SERVICE_KEY_EXCLUSIVE,
+ old_row, new_row)){
WSREP_DEBUG("WSREP: UPDATE_ROW_KEY FAILED");
DBUG_PRINT("wsrep", ("row key failed"));
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
@@ -9098,10 +9080,11 @@ ha_innobase::delete_row(
#ifdef WITH_WSREP
if (error == DB_SUCCESS && trx->is_wsrep()
- && wsrep_thd_exec_mode(m_user_thd) == LOCAL_STATE
+ && wsrep_thd_is_local(m_user_thd)
&& !wsrep_thd_ignore_table(m_user_thd)) {
- if (wsrep_append_keys(m_user_thd, WSREP_KEY_EXCLUSIVE, record,
- NULL)) {
+ if (wsrep_append_keys(m_user_thd, WSREP_SERVICE_KEY_EXCLUSIVE,
+ record,
+ NULL)) {
DBUG_PRINT("wsrep", ("delete fail"));
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
}
@@ -9616,21 +9599,21 @@ ha_innobase::change_active_index(
}
}
} else {
- dtuple_set_n_fields(m_prebuilt->search_tuple,
- m_prebuilt->index->n_fields);
+ ulint n_fields = dict_index_get_n_unique_in_tree(
+ m_prebuilt->index);
+
+ dtuple_set_n_fields(m_prebuilt->search_tuple, n_fields);
dict_index_copy_types(
m_prebuilt->search_tuple, m_prebuilt->index,
- m_prebuilt->index->n_fields);
+ n_fields);
/* If it's FTS query and FTS_DOC_ID exists FTS_DOC_ID field is
always added to read_set. */
m_prebuilt->fts_doc_id_in_read_set = m_prebuilt->in_fts_query
&& m_prebuilt->read_just_key
- && dict_index_contains_col_or_prefix(
- m_prebuilt->index,
- m_prebuilt->table->fts->doc_col,
- false);
+ && m_prebuilt->index->contains_col_or_prefix(
+ m_prebuilt->table->fts->doc_col, false);
}
/* MySQL changes the active index for a handle also during some
@@ -10272,36 +10255,46 @@ next_record:
#ifdef WITH_WSREP
inline
const char*
-wsrep_key_type_to_str(wsrep_key_type type)
+wsrep_key_type_to_str(Wsrep_service_key_type type)
{
switch (type) {
- case WSREP_KEY_SHARED:
+ case WSREP_SERVICE_KEY_SHARED:
return "shared";
- case WSREP_KEY_SEMI:
- return "semi";
- case WSREP_KEY_EXCLUSIVE:
+ case WSREP_SERVICE_KEY_REFERENCE:
+ return "reference";
+ case WSREP_SERVICE_KEY_UPDATE:
+ return "update";
+ case WSREP_SERVICE_KEY_EXCLUSIVE:
return "exclusive";
};
return "unknown";
}
-ulint
+extern dberr_t
wsrep_append_foreign_key(
/*===========================*/
trx_t* trx, /*!< in: trx */
dict_foreign_t* foreign, /*!< in: foreign key constraint */
const rec_t* rec, /*!<in: clustered index record */
dict_index_t* index, /*!<in: clustered index */
- ibool referenced, /*!<in: is check for referenced table */
- wsrep_key_type key_type) /*!< in: access type of this key
- (shared, exclusive, semi...) */
+ bool referenced, /*!<in: is check for
+ referenced table */
+ upd_node_t* upd_node, /*<!in: update node */
+ bool pa_disable, /*<!in: disable parallel apply ?*/
+ Wsrep_service_key_type key_type) /*!< in: access type of this key
+ (shared, exclusive, reference...) */
{
- THD* thd = trx->mysql_thd;
+ ut_ad(trx->is_wsrep());
- if (!trx->is_wsrep() || wsrep_thd_exec_mode(thd) != LOCAL_STATE) {
+ if (!wsrep_thd_is_local(trx->mysql_thd))
return DB_SUCCESS;
+
+ if (upd_node && wsrep_protocol_version < 4) {
+ key_type = WSREP_SERVICE_KEY_SHARED;
}
+ THD* thd = trx->mysql_thd;
+
if (!foreign ||
(!foreign->referenced_table && !foreign->foreign_table)) {
WSREP_INFO("FK: %s missing in: %s",
@@ -10315,13 +10308,12 @@ wsrep_append_foreign_key(
ulint rcode = DB_SUCCESS;
char cache_key[513] = {'\0'};
int cache_key_len=0;
- bool const copy = true;
if ( !((referenced) ?
foreign->referenced_table : foreign->foreign_table)) {
WSREP_DEBUG("pulling %s table into cache",
(referenced) ? "referenced" : "foreign");
- mutex_enter(&(dict_sys->mutex));
+ mutex_enter(&dict_sys.mutex);
if (referenced) {
foreign->referenced_table =
@@ -10351,7 +10343,7 @@ wsrep_append_foreign_key(
TRUE, FALSE);
}
}
- mutex_exit(&(dict_sys->mutex));
+ mutex_exit(&dict_sys.mutex);
}
if ( !((referenced) ?
@@ -10359,8 +10351,7 @@ wsrep_append_foreign_key(
WSREP_WARN("FK: %s missing in query: %s",
(!foreign->referenced_table) ?
"referenced table" : "foreign table",
- (wsrep_thd_query(thd)) ?
- wsrep_thd_query(thd) : "void");
+ wsrep_thd_query(thd));
return DB_ERROR;
}
@@ -10391,11 +10382,11 @@ wsrep_append_foreign_key(
if (rcode != DB_SUCCESS) {
WSREP_ERROR(
"FK key set failed: " ULINTPF
- " (" ULINTPF " %s), index: %s %s, %s",
+ " (" ULINTPF "%s), index: %s %s, %s",
rcode, referenced, wsrep_key_type_to_str(key_type),
- index ? index->name() : "void index",
+ (index) ? index->name() : "void index",
(index && index->table) ? index->table->name.m_name :
- "void table",
+ "void table",
wsrep_thd_query(thd));
return DB_ERROR;
}
@@ -10411,7 +10402,7 @@ wsrep_append_foreign_key(
#ifdef WSREP_DEBUG_PRINT
ulint j;
fprintf(stderr, "FK parent key, table: %s %s len: %lu ",
- cache_key, (shared) ? "shared" : "exclusive", len+1);
+ cache_key, wsrep_key_type_to_str(key_type), len+1);
for (j=0; j<len+1; j++) {
fprintf(stderr, " %hhX, ", key[j]);
}
@@ -10430,37 +10421,32 @@ wsrep_append_foreign_key(
wsrep_buf_t wkey_part[3];
wsrep_key_t wkey = {wkey_part, 3};
- if (!wsrep_prepare_key(
+ if (!wsrep_prepare_key_for_innodb(
+ thd,
(const uchar*)cache_key,
cache_key_len + 1,
(const uchar*)key, len+1,
wkey_part,
(size_t*)&wkey.key_parts_num)) {
WSREP_WARN("key prepare failed for cascaded FK: %s",
- (wsrep_thd_query(thd)) ?
- wsrep_thd_query(thd) : "void");
+ wsrep_thd_query(thd));
return DB_ERROR;
}
- wsrep_t *wsrep= get_wsrep();
-
- rcode = (int)wsrep->append_key(
- wsrep,
- wsrep_ws_handle(thd, trx),
- &wkey,
- 1,
- key_type,
- copy);
+ rcode = wsrep_thd_append_key(thd, &wkey, 1, key_type);
if (rcode) {
- DBUG_PRINT("wsrep", ("row key failed: " ULINTPF, rcode));
WSREP_ERROR("Appending cascaded fk row key failed: %s, "
ULINTPF,
- (wsrep_thd_query(thd)) ?
- wsrep_thd_query(thd) : "void", rcode);
+ wsrep_thd_query(thd),
+ rcode);
return DB_ERROR;
}
+ if (pa_disable) {
+ wsrep_thd_set_PA_unsafe(trx->mysql_thd);
+ }
+
return DB_SUCCESS;
}
@@ -10472,17 +10458,19 @@ wsrep_append_key(
TABLE_SHARE *table_share,
const char* key,
uint16_t key_len,
- wsrep_key_type key_type /*!< in: access type of this key
+ Wsrep_service_key_type key_type /*!< in: access type of this key
(shared, exclusive, semi...) */
)
{
DBUG_ENTER("wsrep_append_key");
- bool const copy = true;
+ DBUG_PRINT("enter",
+ ("thd: %lu trx: %lld", thd_get_thread_id(thd),
+ (long long)trx->id));
#ifdef WSREP_DEBUG_PRINT
- fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s\n Query: %s ",
+ fprintf(stderr, "%s conn %lu, trx " TRX_ID_FMT ", keylen %d, key %s.%s\n",
wsrep_key_type_to_str(key_type),
- wsrep_thd_thread_id(thd), trx->id, key_len,
- table_share->table_name.str, wsrep_thd_query(thd));
+ thd_get_thread_id(thd), trx->id, key_len,
+ table_share->table_name.str, key);
for (int i=0; i<key_len; i++) {
fprintf(stderr, "%hhX, ", key[i]);
}
@@ -10491,7 +10479,8 @@ wsrep_append_key(
wsrep_buf_t wkey_part[3];
wsrep_key_t wkey = {wkey_part, 3};
- if (!wsrep_prepare_key(
+ if (!wsrep_prepare_key_for_innodb(
+ thd,
(const uchar*)table_share->table_cache_key.str,
table_share->table_cache_key.length,
(const uchar*)key, key_len,
@@ -10503,15 +10492,7 @@ wsrep_append_key(
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
}
- wsrep_t *wsrep= get_wsrep();
-
- int rcode = (int)wsrep->append_key(
- wsrep,
- wsrep_ws_handle(thd, trx),
- &wkey,
- 1,
- key_type,
- copy);
+ int rcode = wsrep_thd_append_key(thd, &wkey, 1, key_type);
if (rcode) {
DBUG_PRINT("wsrep", ("row key failed: %d", rcode));
WSREP_WARN("Appending row key failed: %s, %d",
@@ -10552,17 +10533,30 @@ int
ha_innobase::wsrep_append_keys(
/*===========================*/
THD *thd,
- wsrep_key_type key_type, /*!< in: access type of this key
- (shared, exclusive, semi...) */
+ Wsrep_service_key_type key_type, /*!< in: access type of this row
+ operation:
+ (shared, exclusive, reference...) */
const uchar* record0, /* in: row in MySQL format */
const uchar* record1) /* in: row in MySQL format */
{
+ /* Sanity check: newly inserted records should always be passed with
+ EXCLUSIVE key type, all the rest are expected to carry a pre-image
+ */
+ ut_a(record1 != NULL || key_type == WSREP_SERVICE_KEY_EXCLUSIVE);
+
int rcode;
DBUG_ENTER("wsrep_append_keys");
bool key_appended = false;
trx_t *trx = thd_to_trx(thd);
+#ifdef WSREP_DEBUG_PRINT
+ fprintf(stderr, "%s conn %lu, trx " TRX_ID_FMT ", table %s\nSQL: %s\n",
+ wsrep_key_type_to_str(key_type),
+ thd_get_thread_id(thd), trx->id,
+ table_share->table_name.str, wsrep_thd_query(thd));
+#endif
+
if (table_share && table_share->tmp_table != NO_TMP_TABLE) {
WSREP_DEBUG("skipping tmp table DML: THD: %lu tmp: %d SQL: %s",
thd_get_thread_id(thd),
@@ -10587,7 +10581,9 @@ ha_innobase::wsrep_append_keys(
thd, trx, table_share, keyval,
len, key_type);
- if (rcode) DBUG_RETURN(rcode);
+ if (rcode) {
+ DBUG_RETURN(rcode);
+ }
} else {
WSREP_DEBUG("NULL key skipped (proto 0): %s",
wsrep_thd_query(thd));
@@ -10601,68 +10597,91 @@ ha_innobase::wsrep_append_keys(
KEY* key_info = table->key_info + i;
if (key_info->flags & HA_NOSAME) {
hasPK = true;
+ break;
}
}
for (i=0; i<table->s->keys; ++i) {
- uint len;
- char keyval0[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
- char keyval1[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
- char* key0 = &keyval0[1];
- char* key1 = &keyval1[1];
KEY* key_info = table->key_info + i;
- ibool is_null;
dict_index_t* idx = innobase_get_index(i);
dict_table_t* tab = (idx) ? idx->table : NULL;
+ /* keyval[] shall contain an ordinal number at byte 0
+ and the actual key data shall be written at byte 1.
+ Hence the total data length is the key length + 1 */
+ char keyval0[WSREP_MAX_SUPPORTED_KEY_LENGTH+1]= {'\0'};
+ char keyval1[WSREP_MAX_SUPPORTED_KEY_LENGTH+1]= {'\0'};
keyval0[0] = (char)i;
keyval1[0] = (char)i;
+ char* key0 = &keyval0[1];
+ char* key1 = &keyval1[1];
if (!tab) {
WSREP_WARN("MariaDB-InnoDB key mismatch %s %s",
table->s->table_name.str,
key_info->name.str);
}
- /* !hasPK == table with no PK, must append all non-unique keys */
+ /* !hasPK == table with no PK,
+ must append all non-unique keys */
if (!hasPK || key_info->flags & HA_NOSAME ||
((tab &&
referenced_by_foreign_key2(tab, idx)) ||
(!tab && referenced_by_foreign_key()))) {
- len = wsrep_store_key_val_for_row(
+ ibool is_null0;
+ uint len0 = wsrep_store_key_val_for_row(
thd, table, i, key0,
WSREP_MAX_SUPPORTED_KEY_LENGTH,
- record0, &is_null);
- if (!is_null) {
- rcode = wsrep_append_key(
- thd, trx, table_share,
- keyval0, len+1, key_type);
- if (rcode) DBUG_RETURN(rcode);
-
- if (key_info->flags & HA_NOSAME ||
- key_type == WSREP_KEY_SHARED)
- key_appended = true;
- } else {
- WSREP_DEBUG("NULL key skipped: %s",
- wsrep_thd_query(thd));
- }
+ record0, &is_null0);
if (record1) {
- len = wsrep_store_key_val_for_row(
+ ibool is_null1;
+ uint len1 = wsrep_store_key_val_for_row(
thd, table, i, key1,
WSREP_MAX_SUPPORTED_KEY_LENGTH,
- record1, &is_null);
+ record1, &is_null1);
+
+ if (is_null0 != is_null1 ||
+ len0 != len1 ||
+ memcmp(key0, key1, len0)) {
+ /* This key has chaged. If it
+ is unique, this is an exclusive
+ operation -> upgrade key type */
+ if (key_info->flags & HA_NOSAME) {
+ key_type = WSREP_SERVICE_KEY_EXCLUSIVE;
+ }
- if (!is_null
- && memcmp(key0, key1, len)) {
- rcode = wsrep_append_key(
+ if (!is_null1) {
+ rcode = wsrep_append_key(
thd, trx, table_share,
- keyval1, len+1,
- key_type);
- if (rcode) DBUG_RETURN(rcode);
+ keyval1,
+ /* for len1+1 see keyval1
+ initialization comment */
+ len1+1, key_type);
+ if (rcode)
+ DBUG_RETURN(rcode);
+ }
}
}
+
+ if (!is_null0) {
+ rcode = wsrep_append_key(
+ thd, trx, table_share,
+ /* for len0+1 see keyval0
+ initialization comment */
+ keyval0, len0+1, key_type);
+ if (rcode)
+ DBUG_RETURN(rcode);
+
+ if (key_info->flags & HA_NOSAME ||
+ key_type == WSREP_SERVICE_KEY_SHARED||
+ key_type == WSREP_SERVICE_KEY_REFERENCE)
+ key_appended = true;
+ } else {
+ WSREP_DEBUG("NULL key skipped: %s",
+ wsrep_thd_query(thd));
+ }
}
}
}
@@ -10816,9 +10835,8 @@ prepare_vcol_for_base_setup(
ut_ad(col->base_col == NULL);
MY_BITMAP *old_read_set = field->table->read_set;
- MY_BITMAP *old_vcol_set = field->table->vcol_set;
- field->table->read_set = field->table->vcol_set = &field->table->tmp_set;
+ field->table->read_set = &field->table->tmp_set;
bitmap_clear_all(&field->table->tmp_set);
field->vcol_info->expr->walk(
@@ -10830,7 +10848,6 @@ prepare_vcol_for_base_setup(
* col->base_col)));
}
field->table->read_set= old_read_set;
- field->table->vcol_set= old_vcol_set;
}
@@ -11008,6 +11025,7 @@ create_table_info_t::create_table_def()
}
heap = mem_heap_create(1000);
+ auto _ = make_scope_exit([heap]() { mem_heap_free(heap); });
ut_d(bool have_vers_start = false);
ut_d(bool have_vers_end = false);
@@ -11017,10 +11035,10 @@ create_table_info_t::create_table_def()
ulint vers_row = 0;
if (m_form->versioned()) {
- if (i == m_form->s->row_start_field) {
+ if (i == m_form->s->vers.start_fieldno) {
vers_row = DATA_VERS_START;
ut_d(have_vers_start = true);
- } else if (i == m_form->s->row_end_field) {
+ } else if (i == m_form->s->vers.end_fieldno) {
vers_row = DATA_VERS_END;
ut_d(have_vers_end = true);
} else if (!(field->flags
@@ -11068,7 +11086,6 @@ create_table_info_t::create_table_def()
" must be below 256."
" Unsupported code " ULINTPF ".",
charset_no);
- mem_heap_free(heap);
dict_mem_table_free(table);
DBUG_RETURN(ER_CANT_CREATE_TABLE);
@@ -11099,7 +11116,6 @@ create_table_info_t::create_table_def()
field->field_name.str);
err_col:
dict_mem_table_free(table);
- mem_heap_free(heap);
ut_ad(trx_state_eq(m_trx, TRX_STATE_NOT_STARTED));
DBUG_RETURN(HA_ERR_GENERIC);
}
@@ -11166,7 +11182,7 @@ err_col:
}
/** Fill base columns for the stored column present in the list. */
- if (table->s_cols && table->s_cols->size()) {
+ if (table->s_cols && !table->s_cols->empty()) {
for (ulint i = 0; i < n_cols; i++) {
Field* field = m_form->field[i];
@@ -11207,9 +11223,8 @@ err_col:
"temporary table creation.");
}
- /* Get a new table ID. FIXME: Make this a private
- sequence, not shared with persistent tables! */
- dict_table_assign_new_id(table, m_trx);
+ m_trx->table_id = table->id
+ = dict_sys.get_temporary_table_id();
ut_ad(dict_tf_get_rec_format(table->flags)
!= REC_FORMAT_COMPRESSED);
table->space_id = SRV_TMP_SPACE_ID;
@@ -11228,8 +11243,6 @@ err_col:
DBUG_SUICIDE(););
}
- mem_heap_free(heap);
-
DBUG_EXECUTE_IF("ib_create_err_tablespace_exist",
err = DB_TABLESPACE_EXISTS;);
@@ -11387,6 +11400,8 @@ create_index(
prefix_len = 0;
}
+ ut_ad(prefix_len % field->charset()->mbmaxlen == 0);
+
field_lengths[i] = key_part->length;
if (!key_part->field->stored_in_db()) {
@@ -11461,7 +11476,7 @@ create_table_info_t::create_option_data_directory_is_valid()
}
/* Do not use DATA DIRECTORY with TEMPORARY TABLE. */
- if (m_create_info->options & HA_LEX_CREATE_TMP_TABLE) {
+ if (m_create_info->tmp_table()) {
push_warning(
m_thd, Sql_condition::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
@@ -11490,8 +11505,7 @@ create_table_info_t::create_options_are_invalid()
const char* ret = NULL;
enum row_type row_format = m_create_info->row_type;
- const bool is_temp
- = m_create_info->options & HA_LEX_CREATE_TMP_TABLE;
+ const bool is_temp = m_create_info->tmp_table();
ut_ad(m_thd != NULL);
@@ -11603,7 +11617,7 @@ create_table_info_t::create_options_are_invalid()
if (!m_create_info->data_file_name
|| !m_create_info->data_file_name[0]) {
} else if (!my_use_symdir) {
- my_error(WARN_OPTION_IGNORED, MYF(ME_JUST_WARNING),
+ my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING),
"DATA DIRECTORY");
} else if (!create_option_data_directory_is_valid()) {
ret = "DATA DIRECTORY";
@@ -11680,9 +11694,12 @@ create_table_info_t::check_table_options()
return "ENCRYPTION_KEY_ID";
}
- /* Currently we do not support encryption for spatial indexes.
+ /* We do not support encryption for spatial indexes,
+ except if innodb_checksum_algorithm=full_crc32.
Do not allow ENCRYPTED=YES if any SPATIAL INDEX exists. */
- if (options->encryption != FIL_ENCRYPTION_ON) {
+ if (options->encryption != FIL_ENCRYPTION_ON
+ || srv_checksum_algorithm
+ >= SRV_CHECKSUM_ALGORITHM_FULL_CRC32) {
break;
}
for (ulint i = 0; i < m_form->s->keys; i++) {
@@ -11856,7 +11873,7 @@ create_table_info_t::parse_table_name(
if (m_innodb_file_per_table
&& !mysqld_embedded
- && !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE)) {
+ && !m_create_info->tmp_table()) {
if ((name[1] == ':')
|| (name[0] == '\\' && name[1] == '\\')) {
@@ -11892,13 +11909,19 @@ create_table_info_t::parse_table_name(
}
if (m_create_info->index_file_name) {
- my_error(WARN_OPTION_IGNORED, ME_JUST_WARNING,
+ my_error(WARN_OPTION_IGNORED, ME_WARNING,
"INDEX DIRECTORY");
}
DBUG_RETURN(0);
}
+/** @return whether innodb_strict_mode is active */
+bool ha_innobase::is_innodb_strict_mode(THD *thd)
+{
+ return THDVAR(thd, strict_mode);
+}
+
/** Determine InnoDB table flags.
If strict_mode=OFF, this will adjust the flags to what should be assumed.
@retval true on success
@@ -11912,10 +11935,8 @@ bool create_table_info_t::innobase_table_flags()
enum row_type row_type;
rec_format_t innodb_row_format =
get_row_format(m_default_row_format);
- const bool is_temp
- = m_create_info->options & HA_LEX_CREATE_TMP_TABLE;
- bool zip_allowed
- = !is_temp;
+ const bool is_temp = m_create_info->tmp_table();
+ bool zip_allowed = !is_temp;
const ulint zip_ssize_max =
ut_min(static_cast<ulint>(UNIV_PAGE_SSIZE_MAX),
@@ -12322,9 +12343,8 @@ create_table_info_t::set_tablespace_type(
/* Ignore the current innodb-file-per-table setting if we are
creating a temporary table. */
- m_use_file_per_table =
- m_allow_file_per_table
- && !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE);
+ m_use_file_per_table = m_allow_file_per_table
+ && !m_create_info->tmp_table();
/* DATA DIRECTORY must have m_use_file_per_table but cannot be
used with TEMPORARY tables. */
@@ -12651,13 +12671,12 @@ dict_index_t::record_size_info_t dict_index_t::record_size_info() const
/* maximum allowed size of a node pointer record */
ulint page_ptr_max;
- const bool comp= dict_table_is_comp(table);
+ const bool comp= table->not_redundant();
/* table->space == NULL after DISCARD TABLESPACE */
- const page_size_t page_size(dict_tf_get_page_size(table->flags));
+ const ulint zip_size= dict_tf_get_zip_size(table->flags);
record_size_info_t result;
- if (page_size.is_compressed() &&
- page_size.physical() < univ_page_size.physical())
+ if (zip_size && zip_size < srv_page_size)
{
/* On a ROW_FORMAT=COMPRESSED page, two records must fit in the
uncompressed page modification log. On compressed pages
@@ -12668,7 +12687,7 @@ dict_index_t::record_size_info_t dict_index_t::record_size_info() const
an empty page, minus a byte for recoding the heap
number in the page modification log. The maximum
allowed node pointer size is half that. */
- result.max_leaf_size= page_zip_empty_size(n_fields, page_size.physical());
+ result.max_leaf_size= page_zip_empty_size(n_fields, zip_size);
if (result.max_leaf_size)
{
result.max_leaf_size--;
@@ -12841,11 +12860,15 @@ bool create_table_info_t::row_size_is_acceptable(
const size_t idx= info.get_first_overrun_field_index();
const dict_field_t *field= dict_index_get_nth_field(&index, idx);
+ ut_ad((!field->name) == field->col->is_dropped());
if (innodb_strict_mode || global_system_variables.log_warnings > 2)
{
- ib::error_or_warn(strict && innodb_strict_mode)
- << "Cannot add field " << field->name << " in table "
- << index.table->name << " because after adding it, the row size is "
+ ib::error_or_warn eow(strict && innodb_strict_mode);
+ if (field->name)
+ eow << "Cannot add field " << field->name << " in table ";
+ else
+ eow << "Cannot add an instantly dropped column in table ";
+ eow << index.table->name << " because after adding it, the row size is "
<< info.get_overrun_size()
<< " which is greater than maximum allowed size ("
<< info.max_leaf_size << " bytes) for a record on index leaf page.";
@@ -12902,9 +12925,9 @@ create_table_info_t::create_table_update_dict()
DBUG_RETURN(-1);
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
fts_optimize_add_table(innobase_table);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
if (const Field* ai = m_form->found_next_number_field) {
@@ -12916,7 +12939,7 @@ create_table_info_t::create_table_update_dict()
autoinc = 1;
}
- dict_table_autoinc_lock(innobase_table);
+ innobase_table->autoinc_mutex.lock();
dict_table_autoinc_initialize(innobase_table, autoinc);
if (innobase_table->is_temporary()) {
@@ -12941,7 +12964,7 @@ create_table_info_t::create_table_update_dict()
}
}
- dict_table_autoinc_unlock(innobase_table);
+ innobase_table->autoinc_mutex.unlock();
}
innobase_parse_hint_from_comment(m_thd, innobase_table, m_form->s);
@@ -13167,25 +13190,6 @@ ha_innobase::discard_or_import_tablespace(
err, m_prebuilt->table->flags, NULL));
}
- /* Evict and reload the table definition in order to invoke
- btr_cur_instant_init(). */
- table_id_t id = m_prebuilt->table->id;
- ut_ad(id);
- mutex_enter(&dict_sys->mutex);
- dict_table_close(m_prebuilt->table, TRUE, FALSE);
- dict_table_remove_from_cache(m_prebuilt->table);
- m_prebuilt->table = dict_table_open_on_id(id, TRUE,
- DICT_TABLE_OP_NORMAL);
- mutex_exit(&dict_sys->mutex);
- if (!m_prebuilt->table) {
- err = DB_TABLE_NOT_FOUND;
- } else {
- if (const Field* ai = table->found_next_number_field) {
- initialize_auto_increment(m_prebuilt->table, ai);
- }
- dict_stats_init(m_prebuilt->table);
- }
-
if (dict_stats_is_persistent_enabled(m_prebuilt->table)) {
dberr_t ret;
@@ -14217,7 +14221,7 @@ fsp_get_available_space_in_free_extents(const fil_space_t& space)
ulint n_free_up =
(size_in_header - space.free_limit) / FSP_EXTENT_SIZE;
- const ulint size = page_size_t(space.flags).physical();
+ const ulint size = space.physical_size();
if (n_free_up > 0) {
n_free_up--;
n_free_up -= n_free_up / (size / FSP_EXTENT_SIZE);
@@ -14258,7 +14262,7 @@ ha_innobase::info_low(
DEBUG_SYNC_C("ha_innobase_info_low");
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
/* If we are forcing recovery at a high level, we will suppress
statistics calculation on tables, because that may crash the
@@ -14310,10 +14314,10 @@ ha_innobase::info_low(
ret = dict_stats_update(ib_table, opt);
if (opt == DICT_STATS_RECALC_PERSISTENT) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
ib_table->stats_bg_flag
&= byte(~BG_STAT_SHOULD_QUIT);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
if (ret != DB_SUCCESS) {
@@ -14338,7 +14342,7 @@ ha_innobase::info_low(
ulint stat_clustered_index_size;
ulint stat_sum_of_other_index_sizes;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
ut_a(ib_table->stat_initialized);
@@ -14350,7 +14354,7 @@ ha_innobase::info_low(
stat_sum_of_other_index_sizes
= ib_table->stat_sum_of_other_index_sizes;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
/*
The MySQL optimizer seems to assume in a left join that n_rows
@@ -14386,8 +14390,7 @@ ha_innobase::info_low(
stats.records = (ha_rows) n_rows;
stats.deleted = 0;
if (fil_space_t* space = ib_table->space) {
- const ulint size = page_size_t(space->flags)
- .physical();
+ const ulint size = space->physical_size();
stats.data_file_length
= ulonglong(stat_clustered_index_size)
* size;
@@ -14455,7 +14458,6 @@ ha_innobase::info_low(
ib_push_frm_error(m_user_thd, ib_table, table, num_innodb_index, true);
}
-
snprintf(path, sizeof(path), "%s/%s%s",
mysql_data_home, table->s->normalized_path.str,
reg_ext);
@@ -14472,8 +14474,8 @@ ha_innobase::info_low(
}
struct Locking {
- Locking() { mutex_enter(&dict_sys->mutex); }
- ~Locking() { mutex_exit(&dict_sys->mutex); }
+ Locking() { mutex_enter(&dict_sys.mutex); }
+ ~Locking() { mutex_exit(&dict_sys.mutex); }
} locking;
ut_a(ib_table->stat_initialized);
@@ -14863,20 +14865,9 @@ ha_innobase::check(
if (!(check_opt->flags & T_QUICK)
&& !index->is_corrupted()) {
- /* Enlarge the fatal lock wait timeout during
- CHECK TABLE. */
- my_atomic_addlong(
- &srv_fatal_semaphore_wait_threshold,
- SRV_SEMAPHORE_WAIT_EXTENSION);
dberr_t err = btr_validate_index(
- index, m_prebuilt->trx, false);
-
- /* Restore the fatal lock wait timeout after
- CHECK TABLE. */
- my_atomic_addlong(
- &srv_fatal_semaphore_wait_threshold,
- -SRV_SEMAPHORE_WAIT_EXTENSION);
+ index, m_prebuilt->trx);
if (err != DB_SUCCESS) {
is_ok = false;
@@ -15167,7 +15158,7 @@ get_foreign_key_info(
dict_table_t* ref_table;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ref_table = dict_table_open_on_name(
foreign->referenced_table_name_lookup,
TRUE, FALSE, DICT_ERR_IGNORE_NONE);
@@ -15222,7 +15213,7 @@ ha_innobase::get_foreign_key_list(
m_prebuilt->trx->op_info = "getting list of foreign keys";
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
for (dict_foreign_set::iterator it
= m_prebuilt->table->foreign_set.begin();
@@ -15239,7 +15230,7 @@ ha_innobase::get_foreign_key_list(
}
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
m_prebuilt->trx->op_info = "";
@@ -15260,7 +15251,7 @@ ha_innobase::get_parent_foreign_key_list(
m_prebuilt->trx->op_info = "getting list of referencing foreign keys";
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
for (dict_foreign_set::iterator it
= m_prebuilt->table->referenced_set.begin();
@@ -15277,7 +15268,7 @@ ha_innobase::get_parent_foreign_key_list(
}
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
m_prebuilt->trx->op_info = "";
@@ -15294,161 +15285,6 @@ struct table_list_item {
const char* name;
};
-/** Structure to compare two st_tablename objects using their
-db and tablename. It is used in the ordering of cascade_fk_set.
-It returns true if the first argument precedes the second argument
-and false otherwise. */
-struct tablename_compare {
-
- bool operator()(const st_handler_tablename lhs,
- const st_handler_tablename rhs) const
- {
- int cmp = strcmp(lhs.db, rhs.db);
- if (cmp == 0) {
- cmp = strcmp(lhs.tablename, rhs.tablename);
- }
-
- return(cmp < 0);
- }
-};
-
-/** Get the table name and database name for the given table.
-@param[in,out] thd user thread handle
-@param[out] f_key_info pointer to table_name_info object
-@param[in] foreign foreign key constraint. */
-static
-void
-get_table_name_info(
- THD* thd,
- st_handler_tablename* f_key_info,
- const dict_foreign_t* foreign)
-{
-#define FILENAME_CHARSET_MBMAXLEN 5
- char tmp_buff[NAME_CHAR_LEN * FILENAME_CHARSET_MBMAXLEN + 1];
- char name_buff[NAME_CHAR_LEN * FILENAME_CHARSET_MBMAXLEN + 1];
- const char* ptr;
-
- size_t len = dict_get_db_name_len(
- foreign->referenced_table_name_lookup);
- ut_memcpy(tmp_buff, foreign->referenced_table_name_lookup, len);
- tmp_buff[len] = 0;
-
- ut_ad(len < sizeof(tmp_buff));
-
- len = filename_to_tablename(tmp_buff, name_buff, sizeof(name_buff));
- f_key_info->db = thd_strmake(thd, name_buff, len);
-
- ptr = dict_remove_db_name(foreign->referenced_table_name_lookup);
- len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
- f_key_info->tablename = thd_strmake(thd, name_buff, len);
-}
-
-/** Get the list of tables ordered by the dependency on the other tables using
-the 'CASCADE' foreign key constraint.
-@param[in,out] thd user thread handle
-@param[out] fk_table_list set of tables name info for the
- dependent table
-@retval 0 for success. */
-int
-ha_innobase::get_cascade_foreign_key_table_list(
- THD* thd,
- List<st_handler_tablename>* fk_table_list)
-{
- m_prebuilt->trx->op_info = "getting cascading foreign keys";
-
- std::list<table_list_item, ut_allocator<table_list_item> > table_list;
-
- typedef std::set<st_handler_tablename, tablename_compare,
- ut_allocator<st_handler_tablename> > cascade_fk_set;
-
- cascade_fk_set fk_set;
-
- mutex_enter(&dict_sys->mutex);
-
- /* Initialize the table_list with prebuilt->table name. */
- struct table_list_item item = {m_prebuilt->table,
- m_prebuilt->table->name.m_name};
-
- table_list.push_back(item);
-
- /* Get the parent table, grand parent table info from the
- table list by depth-first traversal. */
- do {
- const dict_table_t* parent_table;
- dict_table_t* parent = NULL;
- std::pair<cascade_fk_set::iterator,bool> ret;
-
- item = table_list.back();
- table_list.pop_back();
- parent_table = item.table;
-
- if (parent_table == NULL) {
-
- ut_ad(item.name != NULL);
-
- parent_table = parent = dict_table_open_on_name(
- item.name, TRUE, FALSE,
- DICT_ERR_IGNORE_NONE);
-
- if (parent_table == NULL) {
- /* foreign_key_checks is or was probably
- disabled; ignore the constraint */
- continue;
- }
- }
-
- for (dict_foreign_set::const_iterator it =
- parent_table->foreign_set.begin();
- it != parent_table->foreign_set.end(); ++it) {
-
- const dict_foreign_t* foreign = *it;
- st_handler_tablename f1;
-
- /* Skip the table if there is no
- cascading operation. */
- if (0 == (foreign->type
- & ~(DICT_FOREIGN_ON_DELETE_NO_ACTION
- | DICT_FOREIGN_ON_UPDATE_NO_ACTION))) {
- continue;
- }
-
- if (foreign->referenced_table_name_lookup != NULL) {
- get_table_name_info(thd, &f1, foreign);
- ret = fk_set.insert(f1);
-
- /* Ignore the table if it is already
- in the set. */
- if (!ret.second) {
- continue;
- }
-
- struct table_list_item item1 = {
- foreign->referenced_table,
- foreign->referenced_table_name_lookup};
-
- table_list.push_back(item1);
-
- st_handler_tablename* fk_table =
- (st_handler_tablename*) thd_memdup(
- thd, &f1, sizeof(*fk_table));
-
- fk_table_list->push_back(fk_table);
- }
- }
-
- if (parent != NULL) {
- dict_table_close(parent, true, false);
- }
-
- } while(!table_list.empty());
-
- mutex_exit(&dict_sys->mutex);
-
- m_prebuilt->trx->op_info = "";
-
- return(0);
-}
-
/*****************************************************************//**
Checks if ALTER TABLE may change the storage engine of the table.
Changing storage engines is not allowed for tables for which there
@@ -15580,10 +15416,6 @@ ha_innobase::extra(
case HA_EXTRA_END_ALTER_COPY:
m_prebuilt->table->skip_alter_undo = 0;
break;
- case HA_EXTRA_FAKE_START_STMT:
- trx_register_for_2pc(m_prebuilt->trx);
- m_prebuilt->sql_stat_start = true;
- break;
default:/* Do nothing */
;
}
@@ -15592,12 +15424,9 @@ ha_innobase::extra(
}
/**
-MySQL calls this method at the end of each statement. This method
-exists for readability only. ha_innobase::reset() doesn't give any
-clue about the method. */
-
+MySQL calls this method at the end of each statement */
int
-ha_innobase::end_stmt()
+ha_innobase::reset()
{
if (m_prebuilt->blob_heap) {
row_mysql_prebuilt_free_blob_heap(m_prebuilt);
@@ -15616,15 +15445,6 @@ ha_innobase::end_stmt()
return(0);
}
-/**
-MySQL calls this method at the end of each statement */
-
-int
-ha_innobase::reset()
-{
- return(end_stmt());
-}
-
/******************************************************************//**
MySQL calls this function at the start of each SQL statement inside LOCK
TABLES. Inside LOCK TABLES the ::external_lock method does not work to
@@ -15790,8 +15610,7 @@ ha_innobase::external_lock(
&& thd_sqlcom_can_generate_row_events(thd)) {
bool skip = false;
#ifdef WITH_WSREP
- skip = trx->is_wsrep()
- && wsrep_thd_exec_mode(thd) != LOCAL_STATE;
+ skip = trx->is_wsrep() && !wsrep_thd_is_local(thd);
#endif /* WITH_WSREP */
/* used by test case */
DBUG_EXECUTE_IF("no_innodb_binlog_errors", skip = true;);
@@ -16701,7 +16520,7 @@ ha_innobase::innobase_get_autoinc(
/* It should have been initialized during open. */
if (*value == 0) {
m_prebuilt->autoinc_error = DB_UNSUPPORTED;
- dict_table_autoinc_unlock(m_prebuilt->table);
+ m_prebuilt->table->autoinc_mutex.unlock();
}
}
@@ -16725,7 +16544,7 @@ ha_innobase::innobase_peek_autoinc(void)
innodb_table = m_prebuilt->table;
- dict_table_autoinc_lock(innodb_table);
+ innodb_table->autoinc_mutex.lock();
auto_inc = dict_table_autoinc_read(innodb_table);
@@ -16734,7 +16553,7 @@ ha_innobase::innobase_peek_autoinc(void)
" '" << innodb_table->name << "'";
}
- dict_table_autoinc_unlock(innodb_table);
+ innodb_table->autoinc_mutex.unlock();
return(auto_inc);
}
@@ -16841,7 +16660,7 @@ ha_innobase::get_auto_increment(
/* Out of range number. Let handler::update_auto_increment()
take care of this */
m_prebuilt->autoinc_last_value = 0;
- dict_table_autoinc_unlock(m_prebuilt->table);
+ m_prebuilt->table->autoinc_mutex.unlock();
*nb_reserved_values= 0;
return;
}
@@ -16884,7 +16703,7 @@ ha_innobase::get_auto_increment(
m_prebuilt->autoinc_offset = offset;
m_prebuilt->autoinc_increment = increment;
- dict_table_autoinc_unlock(m_prebuilt->table);
+ m_prebuilt->table->autoinc_mutex.unlock();
}
/*******************************************************************//**
@@ -17491,9 +17310,7 @@ fast_shutdown_validate(
uint new_val = *reinterpret_cast<uint*>(save);
if (srv_fast_shutdown && !new_val
- && !my_atomic_loadptr_explicit(reinterpret_cast<void**>
- (&srv_running),
- MY_MEMORY_ORDER_RELAXED)) {
+ && !srv_running.load(std::memory_order_relaxed)) {
return(1);
}
@@ -17720,7 +17537,7 @@ func_exit:
buf_block_t* block = buf_page_get(
page_id_t(space_id, srv_saved_page_number_debug),
- page_size_t(space->flags), RW_X_LATCH, &mtr);
+ space->zip_size(), RW_X_LATCH, &mtr);
if (block != NULL) {
byte* page = block->frame;
@@ -18864,235 +18681,67 @@ static struct st_mysql_storage_engine innobase_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
#ifdef WITH_WSREP
-static
-void
-wsrep_abort_slave_trx(
- THD* bf_thd,
- THD* victim_thd)
-{
- wsrep_seqno_t bf_seqno= wsrep_thd_trx_seqno(bf_thd);
- wsrep_seqno_t victim_seqno= wsrep_thd_trx_seqno(victim_thd);
- WSREP_ERROR("wsrep_abort_slave_trx: BF Aborter %s thread: %ld "
- "seqno: %lld query_state: %s conflict_state: %s "
- "exec mode %s query: %s",
- wsrep_thd_is_BF(bf_thd, false) ? "BF" : "normal",
- thd_get_thread_id(bf_thd),
- bf_seqno,
- wsrep_thd_query_state_str(bf_thd),
- wsrep_thd_conflict_state_str(bf_thd),
- wsrep_thd_exec_mode_str(bf_thd),
- wsrep_thd_query(bf_thd));
-
- WSREP_ERROR("wsrep_abort_slave_trx: Victim %s thread: %ld "
- "seqno: %lld query_state: %s conflict_state: %s "
- "exec mode %s query: %s",
- wsrep_thd_is_BF(victim_thd, false) ? "BF" : "normal",
- thd_get_thread_id(victim_thd),
- wsrep_thd_trx_seqno(victim_thd),
- wsrep_thd_query_state_str(victim_thd),
- wsrep_thd_conflict_state_str(victim_thd),
- wsrep_thd_exec_mode_str(victim_thd),
- wsrep_thd_query(victim_thd));
-
- WSREP_ERROR("Trx %lld tries to abort slave trx %lld. This could be "
- "caused by:\n\t"
- "1) unsupported configuration options combination, please check documentation.\n\t"
- "2) a bug in the code.\n\t"
- "3) a database corruption.\n Node consistency compromized, "
- "need to abort. Restart the node to resync with cluster.",
- (long long)bf_seqno, (long long)victim_seqno);
- abort();
-}
-
-/** This function is used to kill one transaction in BF. */
static
void
wsrep_kill_victim(
MYSQL_THD const bf_thd,
- const trx_t* const bf_trx,
MYSQL_THD thd,
trx_t* victim_trx,
my_bool signal)
{
- ut_ad(bf_thd);
- ut_ad(thd);
- ut_ad(victim_trx);
- ut_ad(lock_mutex_own());
- ut_ad(trx_mutex_own(victim_trx));
-
- DBUG_ENTER("wsrep_kill_victim");
-
- const int64_t bf_seqno= wsrep_thd_trx_seqno(bf_thd);
-
- if (wsrep_thd_query_state(thd) == QUERY_EXITING) {
- WSREP_DEBUG("kill trx EXITING for " TRX_ID_FMT,
- victim_trx->id);
- wsrep_thd_UNLOCK(thd);
- DBUG_VOID_RETURN;
- }
-
- if (wsrep_thd_exec_mode(thd) != LOCAL_STATE) {
- WSREP_DEBUG("withdraw for BF trx: " TRX_ID_FMT
- ", state: %s exec %s",
- victim_trx->id,
- wsrep_thd_conflict_state_str(thd),
- wsrep_thd_exec_mode_str(thd));
- }
-
- switch (wsrep_thd_get_conflict_state(thd)) {
- case NO_CONFLICT:
- /* This will cause any call to innobase_kill_query()
- for this thd to bail out. */
- wsrep_thd_set_conflict_state(thd, MUST_ABORT);
- break;
- case MUST_ABORT:
- WSREP_DEBUG("victim " TRX_ID_FMT " in MUST ABORT state",
- victim_trx->id);
- wsrep_thd_awake(thd, signal);
- wsrep_thd_UNLOCK(thd);
- DBUG_VOID_RETURN;
- break;
- case ABORTED:
- case ABORTING: // fall through
- default:
- WSREP_DEBUG("victim " TRX_ID_FMT " in state %s",
- victim_trx->id,
- wsrep_thd_conflict_state_str(thd));
- wsrep_thd_UNLOCK(thd);
- DBUG_VOID_RETURN;
- break;
- }
+ DBUG_ENTER("wsrep_kill_victim");
- switch (wsrep_thd_query_state(thd)) {
- case QUERY_COMMITTING:
- {
- enum wsrep_status rcode;
-
- WSREP_DEBUG("kill query for: %ld",
- thd_get_thread_id(thd));
- WSREP_DEBUG("kill trx QUERY_COMMITTING for " TRX_ID_FMT,
- victim_trx->id);
-
- if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
- wsrep_abort_slave_trx(bf_thd, thd);
- } else {
- wsrep_t *wsrep= get_wsrep();
- rcode = wsrep->abort_pre_commit(
- wsrep, bf_seqno,
- (wsrep_trx_id_t)wsrep_thd_ws_handle(thd)->trx_id
- );
-
- switch (rcode) {
- case WSREP_WARNING:
- WSREP_DEBUG("cancel commit warning: "
- TRX_ID_FMT,
- victim_trx->id);
- wsrep_thd_awake(thd, signal);
- wsrep_thd_UNLOCK(thd);
- DBUG_VOID_RETURN;
- break;
- case WSREP_OK:
- break;
- default:
- WSREP_ERROR(
- "cancel commit bad exit: %d "
- TRX_ID_FMT,
- rcode, victim_trx->id);
- /* unable to interrupt, must abort */
- /* note: kill_mysql() will block, if we cannot.
- * kill the lock holder first.
- */
- abort();
- break;
- }
- }
- wsrep_thd_awake(thd, signal);
- wsrep_thd_UNLOCK(thd);
- break;
- }
- case QUERY_EXEC:
- {
- /* it is possible that victim trx is itself waiting for some
- * other lock. We need to cancel this waiting
- */
- WSREP_DEBUG("kill trx QUERY_EXEC for " TRX_ID_FMT,
- victim_trx->id);
-
- if (victim_trx->lock.wait_lock) {
- WSREP_DEBUG("victim has wait flag: %ld",
- thd_get_thread_id(thd));
- lock_t* wait_lock = victim_trx->lock.wait_lock;
-
- if (wait_lock) {
- WSREP_DEBUG("canceling wait lock");
- victim_trx->lock.was_chosen_as_deadlock_victim= TRUE;
- lock_cancel_waiting_and_release(wait_lock);
- }
-
- wsrep_thd_awake(thd, signal);
- wsrep_thd_UNLOCK(thd);
- } else {
- /* abort currently executing query */
- WSREP_DEBUG("kill query for: %ld",
- thd_get_thread_id(thd));
+ /* Mark transaction as a victim for Galera abort */
+ victim_trx->lock.was_chosen_as_wsrep_victim= true;
+ if (wsrep_thd_set_wsrep_aborter(bf_thd, thd))
+ {
+ WSREP_DEBUG("innodb kill transaction skipped due to wsrep_aborter set");
+ wsrep_thd_UNLOCK(thd);
+ DBUG_VOID_RETURN;
+ }
- /* for BF thd, we need to prevent him from committing */
- if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
- wsrep_abort_slave_trx(bf_thd, thd);
- }
+ if (wsrep_thd_bf_abort(bf_thd, thd, signal))
+ {
+ lock_t* wait_lock= victim_trx->lock.wait_lock;
+ if (wait_lock)
+ {
+ DBUG_ASSERT(victim_trx->is_wsrep());
+ WSREP_DEBUG("victim has wait flag: %lu", thd_get_thread_id(thd));
+ victim_trx->lock.was_chosen_as_deadlock_victim= TRUE;
+ lock_cancel_waiting_and_release(wait_lock);
+ }
+ }
- /* Note that innobase_kill_query will take lock_mutex
- and trx_mutex */
- wsrep_thd_awake(thd, signal);
- wsrep_thd_UNLOCK(thd);
- }
- break;
- }
- case QUERY_IDLE:
- {
- WSREP_DEBUG("kill IDLE for " TRX_ID_FMT, victim_trx->id);
+ DBUG_VOID_RETURN;
+}
- if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
- WSREP_DEBUG("kill BF IDLE, seqno: %lld",
- wsrep_thd_trx_seqno(thd));
- wsrep_abort_slave_trx(bf_thd, thd);
- }
+/** This function is used to kill one transaction.
- /* This will lock thd from proceeding after net_read() and
- will cause any call to innobase_kill_query() for this
- thd to bail out. */
- wsrep_thd_set_conflict_state(thd, ABORTING);
- wsrep_lock_rollback();
+This transaction was open on this node (not-yet-committed), and a
+conflicting writeset from some other node that was being applied
+caused a locking conflict. First committed (from other node)
+wins, thus open transaction is rolled back. BF stands for
+brute-force: any transaction can get aborted by galera any time
+it is necessary.
- if (wsrep_aborting_thd_contains(thd)) {
- WSREP_WARN("duplicate thd aborter %lu",
- thd_get_thread_id(thd));
- } else {
- wsrep_aborting_thd_enqueue(thd);
- WSREP_DEBUG("enqueuing trx abort for (%lu)",
- thd_get_thread_id(thd));
- }
+This conflict can happen only when the replicated writeset (from
+other node) is being applied, not when it’s waiting in the queue.
+If our local transaction reached its COMMIT and this conflicting
+writeset was in the queue, then it should fail the local
+certification test instead.
- WSREP_DEBUG("signaling aborter");
- wsrep_unlock_rollback();
- wsrep_thd_UNLOCK(thd);
- break;
- }
- default:
- WSREP_WARN("bad wsrep query state: %d",
- wsrep_thd_query_state(thd));
- ut_error;
- }
- DBUG_VOID_RETURN;
-}
+A brute force abort is only triggered by a locking conflict
+between a writeset being applied by an applier thread (slave thread)
+and an open transaction on the node, not by a Galera writeset
+comparison as in the local certification failure.
-/*******************************************************************
-This function is used to kill one transaction in BF. */
+@param[in] bf_thd Brute force (BF) thread
+@param[in,out] victim_trx Vimtim trx to be killed
+@param[in] signal Should victim be signaled */
void
wsrep_innobase_kill_one_trx(
MYSQL_THD const bf_thd,
- const trx_t * const bf_trx,
trx_t *victim_trx,
my_bool signal)
{
@@ -19103,6 +18752,15 @@ wsrep_innobase_kill_one_trx(
DBUG_ENTER("wsrep_innobase_kill_one_trx");
THD *thd= (THD *) victim_trx->mysql_thd;
+ /* Note that bf_trx might not exist here e.g. on MDL conflict
+ case (test: galera_concurrent_ctas).*/
+ trx_t* bf_trx= (trx_t*)thd_to_trx(bf_thd);
+
+ if (!thd)
+ {
+ WSREP_WARN("no THD for trx: " TRX_ID_FMT, victim_trx->id);
+ DBUG_VOID_RETURN;
+ }
/* Here we need to lock THD::LOCK_thd_data to protect from
concurrent usage or disconnect or delete. */
@@ -19114,34 +18772,43 @@ wsrep_innobase_kill_one_trx(
WSREP_DEBUG("wsrep_innobase_kill_one_trx: Aborter %s "
"trx_id: " TRX_ID_FMT " thread: %ld "
- "seqno: %lld query_state: %s conflict_state: %s "
- "exec mode %s query: %s",
+ "seqno: %lld client_state: %s client_mode: %s "
+ "trx_state %s query: %s",
wsrep_thd_is_BF(bf_thd, false) ? "BF" : "normal",
bf_trx ? bf_trx->id : TRX_ID_MAX,
thd_get_thread_id(bf_thd),
wsrep_thd_trx_seqno(bf_thd),
- wsrep_thd_query_state_str(bf_thd),
- wsrep_thd_conflict_state_str(bf_thd),
- wsrep_thd_exec_mode_str(bf_thd),
+ wsrep_thd_client_state_str(bf_thd),
+ wsrep_thd_client_mode_str(bf_thd),
+ wsrep_thd_transaction_state_str(bf_thd),
wsrep_thd_query(bf_thd));
WSREP_DEBUG("wsrep_innobase_kill_one_trx: Victim %s "
"trx_id: " TRX_ID_FMT " thread: %ld "
- "seqno: %lld query_state: %s conflict_state: %s "
- "exec mode %s query: %s",
+ "seqno: %lld client_state: %s client_mode: %s "
+ "trx_state %s query: %s",
wsrep_thd_is_BF(thd, false) ? "BF" : "normal",
victim_trx->id,
thd_get_thread_id(thd),
wsrep_thd_trx_seqno(thd),
- wsrep_thd_query_state_str(thd),
- wsrep_thd_conflict_state_str(thd),
- wsrep_thd_exec_mode_str(thd),
+ wsrep_thd_client_state_str(thd),
+ wsrep_thd_client_mode_str(thd),
+ wsrep_thd_transaction_state_str(thd),
wsrep_thd_query(thd));
- wsrep_kill_victim(bf_thd, bf_trx, thd, victim_trx, signal);
+ wsrep_kill_victim(bf_thd, thd, victim_trx, signal);
DBUG_VOID_RETURN;
}
+/** This function forces the victim transaction to abort. Aborting the
+ transaction does NOT end it, it still has to be rolled back.
+
+ @param bf_thd brute force THD asking for the abort
+ @param victim_thd victim THD to be aborted
+
+ @return 0 victim was aborted
+ @return -1 victim thread was aborted (no transaction)
+*/
static
void
wsrep_abort_transaction(
@@ -19150,46 +18817,43 @@ wsrep_abort_transaction(
THD *victim_thd,
my_bool signal)
{
- DBUG_ENTER("wsrep_abort_transaction");
/* Note that victim thd is protected with
- THD::LOCK_thd_data here. */
+ THD::LOCK_thd_data and THD::LOCK_thd_kill here. */
trx_t* victim_trx= thd_to_trx(victim_thd);
trx_t* bf_trx= thd_to_trx(bf_thd);
-
WSREP_DEBUG("wsrep_abort_transaction: BF:"
- " thread %ld query_state %s conflict_state %s"
- " exec %s query %s trx " TRX_ID_FMT,
+ " thread %ld client_state %s client_mode %s"
+ " trans_state %s query %s trx " TRX_ID_FMT,
thd_get_thread_id(bf_thd),
- wsrep_thd_query_state_str(bf_thd),
- wsrep_thd_conflict_state_str(bf_thd),
- wsrep_thd_exec_mode_str(bf_thd),
+ wsrep_thd_client_state_str(bf_thd),
+ wsrep_thd_client_mode_str(bf_thd),
+ wsrep_thd_transaction_state_str(bf_thd),
wsrep_thd_query(bf_thd),
bf_trx ? bf_trx->id : 0);
WSREP_DEBUG("wsrep_abort_transaction: victim:"
- " thread %ld query_state %s conflict_state %s"
- " exec %s query %s trx " TRX_ID_FMT,
+ " thread %ld client_state %s client_mode %s"
+ " trans_state %s query %s trx " TRX_ID_FMT,
thd_get_thread_id(victim_thd),
- wsrep_thd_query_state_str(victim_thd),
- wsrep_thd_conflict_state_str(victim_thd),
- wsrep_thd_exec_mode_str(victim_thd),
+ wsrep_thd_client_state_str(victim_thd),
+ wsrep_thd_client_mode_str(victim_thd),
+ wsrep_thd_transaction_state_str(victim_thd),
wsrep_thd_query(victim_thd),
victim_trx ? victim_trx->id : 0);
- if (victim_trx) {
+ if (victim_trx)
+ {
lock_mutex_enter();
trx_mutex_enter(victim_trx);
- wsrep_kill_victim(bf_thd, bf_trx, victim_thd, victim_trx, signal);
+ wsrep_kill_victim(bf_thd, victim_thd, victim_trx, signal);
lock_mutex_exit();
trx_mutex_exit(victim_trx);
wsrep_srv_conc_cancel_wait(victim_trx);
- } else {
- wsrep_thd_set_conflict_state(victim_thd, MUST_ABORT);
- wsrep_thd_awake(victim_thd, signal);
- wsrep_thd_UNLOCK(victim_thd);
}
-
- DBUG_VOID_RETURN;
+ else
+ {
+ wsrep_thd_bf_abort(bf_thd, victim_thd, signal);
+ }
}
static
@@ -19222,15 +18886,6 @@ innobase_wsrep_get_checkpoint(
trx_rseg_read_wsrep_checkpoint(*xid);
return 0;
}
-
-static void wsrep_fake_trx_id(handlerton *, THD *thd)
-{
- trx_id_t trx_id = trx_sys.get_new_trx_id();
- WSREP_DEBUG("innodb fake trx id: " TRX_ID_FMT " thd: %s",
- trx_id, wsrep_thd_query(thd));
- wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id);
-}
-
#endif /* WITH_WSREP */
static void innodb_idle_flush_pct_update(THD *thd, st_mysql_sys_var *var,
@@ -19246,7 +18901,11 @@ static void innodb_idle_flush_pct_update(THD *thd, st_mysql_sys_var *var,
static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
PLUGIN_VAR_RQCMDARG,
"The algorithm InnoDB uses for page checksumming. Possible values are"
- " CRC32 (hardware accelerated if the CPU supports it)"
+ " FULL_CRC32"
+ " for new files, always use CRC-32C; for old, see CRC32 below;"
+ " STRICT_FULL_CRC32"
+ " for new files, always use CRC-32C; for old, see STRICT_CRC32 below;"
+ " CRC32"
" write crc32, allow any of the other checksums to match when reading;"
" STRICT_CRC32"
" write crc32, do not allow other algorithms to match when reading;"
@@ -19263,7 +18922,8 @@ static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
" write a constant magic number, do not allow values other than that"
" magic number when reading;"
" Files updated when this option is set to crc32 or strict_crc32 will"
- " not be readable by MariaDB versions older than 10.0.4",
+ " not be readable by MariaDB versions older than 10.0.4;"
+ " new files created with full_crc32 are readable by MariaDB 10.4.3+",
NULL, innodb_checksum_algorithm_update, SRV_CHECKSUM_ALGORITHM_CRC32,
&innodb_checksum_algorithm_typelib);
@@ -19308,7 +18968,7 @@ static MYSQL_SYSVAR_BOOL(stats_include_delete_marked,
static MYSQL_SYSVAR_ENUM(instant_alter_column_allowed,
innodb_instant_alter_column_allowed,
PLUGIN_VAR_RQCMDARG,
- "File format constraint for ALTER TABLE", NULL, NULL, 1/*add_last*/,
+ "File format constraint for ALTER TABLE", NULL, NULL, 2/*add_drop_reorder*/,
&innodb_instant_alter_column_allowed_typelib);
static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity,
@@ -19813,24 +19473,28 @@ static MYSQL_SYSVAR_STR(ft_aux_table, innodb_ft_aux_table,
#if UNIV_WORD_SIZE == 4
-static MYSQL_SYSVAR_SIZE_T(ft_cache_size, fts_max_cache_size,
+static MYSQL_SYSVAR_SIZE_T(ft_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_cache_size),
PLUGIN_VAR_RQCMDARG,
"InnoDB Fulltext search cache size in bytes",
NULL, innodb_ft_cache_size_update, 8000000, 1600000, 1U << 29, 0);
-static MYSQL_SYSVAR_SIZE_T(ft_total_cache_size, fts_max_total_cache_size,
+static MYSQL_SYSVAR_SIZE_T(ft_total_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_total_cache_size),
PLUGIN_VAR_RQCMDARG,
"Total memory allocated for InnoDB Fulltext Search cache",
NULL, innodb_ft_total_cache_size_update, 640000000, 32000000, 1600000000, 0);
#else
-static MYSQL_SYSVAR_SIZE_T(ft_cache_size, fts_max_cache_size,
+static MYSQL_SYSVAR_SIZE_T(ft_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_cache_size),
PLUGIN_VAR_RQCMDARG,
"InnoDB Fulltext search cache size in bytes",
NULL, innodb_ft_cache_size_update, 8000000, 1600000, 1ULL << 40, 0);
-static MYSQL_SYSVAR_SIZE_T(ft_total_cache_size, fts_max_total_cache_size,
+static MYSQL_SYSVAR_SIZE_T(ft_total_cache_size,
+ *reinterpret_cast<size_t*>(&fts_max_total_cache_size),
PLUGIN_VAR_RQCMDARG,
"Total memory allocated for InnoDB Fulltext Search cache",
NULL, innodb_ft_total_cache_size_update, 640000000, 32000000, 1ULL << 40, 0);
@@ -20786,20 +20450,6 @@ ha_innobase::multi_range_read_explain_info(
return m_ds_mrr.dsmrr_explain_info(mrr_mode, str, size);
}
-/**
-Index Condition Pushdown interface implementation */
-
-/*************************************************************//**
-InnoDB index push-down condition check
-@return ICP_NO_MATCH, ICP_MATCH, or ICP_OUT_OF_RANGE */
-ICP_RESULT
-innobase_index_cond(
-/*================*/
- void* file) /*!< in/out: pointer to ha_innobase */
-{
- return handler_index_cond_check(file);
-}
-
/** Parse the table file name into table name and database name.
@param[in] tbl_name InnoDB table name
@param[out] dbname database name buffer (NAME_LEN + 1 bytes)
@@ -20944,10 +20594,10 @@ static TABLE* innodb_find_table_for_vc(THD* thd, dict_table_t* table)
"SIGNAL got_no_such_table"))););
if (THDVAR(thd, background_thread)) {
- /* Purge thread acquires dict_operation_lock while
- processing undo log record. Release the dict_operation_lock
+ /* Purge thread acquires dict_sys.latch while
+ processing undo log record. Release it
before acquiring MDL on the table. */
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
return innodb_acquire_mdl(thd, table);
} else {
if (table->vc_templ->mysql_table_query_id
@@ -20993,9 +20643,9 @@ TABLE* innobase_init_vc_templ(dict_table_t* table)
DBUG_RETURN(NULL);
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
innobase_build_v_templ(mysql_table, table, table->vc_templ, NULL, true);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
DBUG_RETURN(mysql_table);
}
@@ -21145,9 +20795,9 @@ innobase_get_computed_value(
dfield_t* field;
ulint len;
- const page_size_t page_size = (old_table == NULL)
- ? dict_table_page_size(index->table)
- : dict_table_page_size(old_table);
+ const ulint zip_size = old_table
+ ? old_table->space->zip_size()
+ : dict_tf_get_zip_size(index->table->flags);
ulint ret = 0;
@@ -21174,7 +20824,7 @@ innobase_get_computed_value(
buf = rec_buf2;
}
- for (ulint i = 0; i < col->num_base; i++) {
+ for (ulint i = 0; i < unsigned{col->num_base}; i++) {
dict_col_t* base_col = col->base_col[i];
const dfield_t* row_field = NULL;
ulint col_no = base_col->ind;
@@ -21204,7 +20854,7 @@ innobase_get_computed_value(
}
data = btr_copy_externally_stored_field(
- &len, data, page_size,
+ &len, data, zip_size,
dfield_get_len(row_field), *local_heap);
}
@@ -21312,6 +20962,224 @@ ha_innobase::idx_cond_push(
DBUG_RETURN(NULL);
}
+
+/** Push a primary key filter.
+@param[in] pk_filter filter against which primary keys
+ are to be checked
+@retval false if pushed (always) */
+bool ha_innobase::rowid_filter_push(Rowid_filter* pk_filter)
+{
+ DBUG_ENTER("ha_innobase::rowid_filter_push");
+ DBUG_ASSERT(pk_filter != NULL);
+ pushed_rowid_filter= pk_filter;
+ DBUG_RETURN(false);
+}
+
+static bool is_part_of_a_key_prefix(const Field_longstr *field)
+{
+ const TABLE_SHARE *s= field->table->s;
+
+ for (uint i= 0; i < s->keys; i++)
+ {
+ const KEY &key= s->key_info[i];
+ for (uint j= 0; j < key.user_defined_key_parts; j++)
+ {
+ const KEY_PART_INFO &info= key.key_part[j];
+ // When field is a part of some key, a key part and field will have the
+ // same length. And their length will be different when only some prefix
+ // of a field is used as a key part. That's what we're looking for here.
+ if (info.field->field_index == field->field_index &&
+ info.length != field->field_length)
+ {
+ DBUG_ASSERT(info.length < field->field_length);
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+static bool
+is_part_of_a_primary_key(const Field* field)
+{
+ const TABLE_SHARE* s = field->table->s;
+
+ return s->primary_key != MAX_KEY
+ && field->part_of_key.is_set(s->primary_key);
+}
+
+bool ha_innobase::can_convert_string(const Field_string *field,
+ const Column_definition &new_type) const
+{
+ DBUG_ASSERT(!field->compression_method());
+ if (new_type.type_handler() != field->type_handler())
+ return false;
+
+ if (new_type.char_length != field->char_length())
+ return false;
+
+ const Charset field_cs(field->charset());
+
+ if (new_type.length != field->max_display_length() &&
+ (!m_prebuilt->table->not_redundant() ||
+ field_cs.mbminlen() == field_cs.mbmaxlen()))
+ return false;
+
+ if (new_type.charset != field->charset())
+ {
+ if (!field_cs.encoding_allows_reinterpret_as(new_type.charset))
+ return false;
+
+ if (!field_cs.eq_collation_specific_names(new_type.charset))
+ return !is_part_of_a_primary_key(field);
+
+ // Fully indexed case works instantly like
+ // Compare_keys::EqualButKeyPartLength. But prefix case isn't implemented.
+ if (is_part_of_a_key_prefix(field))
+ return false;
+
+ return true;
+ }
+
+ return true;
+}
+
+static bool
+supports_enlarging(const dict_table_t* table, const Field_varstring* field,
+ const Column_definition& new_type)
+{
+ return field->field_length <= 127 || new_type.length <= 255
+ || field->field_length > 255 || !table->not_redundant();
+}
+
+bool ha_innobase::can_convert_varstring(
+ const Field_varstring *field, const Column_definition &new_type) const
+{
+ if (new_type.length < field->field_length)
+ return false;
+
+ if (new_type.char_length < field->char_length())
+ return false;
+
+ if (!new_type.compression_method() != !field->compression_method())
+ return false;
+
+ if (new_type.type_handler() != field->type_handler())
+ return false;
+
+ if (new_type.charset != field->charset())
+ {
+ if (!supports_enlarging(m_prebuilt->table, field, new_type))
+ return false;
+
+ Charset field_cs(field->charset());
+ if (!field_cs.encoding_allows_reinterpret_as(new_type.charset))
+ return false;
+
+ if (!field_cs.eq_collation_specific_names(new_type.charset))
+ return !is_part_of_a_primary_key(field);
+
+ // Fully indexed case works instantly like
+ // Compare_keys::EqualButKeyPartLength. But prefix case isn't implemented.
+ if (is_part_of_a_key_prefix(field))
+ return false;
+
+ return true;
+ }
+
+ if (new_type.length != field->field_length)
+ {
+ if (!supports_enlarging(m_prebuilt->table, field, new_type))
+ return false;
+
+ return true;
+ }
+
+ return true;
+}
+
+static bool is_part_of_a_key(const Field_blob *field)
+{
+ const TABLE_SHARE *s= field->table->s;
+
+ for (uint i= 0; i < s->keys; i++)
+ {
+ const KEY &key= s->key_info[i];
+ for (uint j= 0; j < key.user_defined_key_parts; j++)
+ {
+ const KEY_PART_INFO &info= key.key_part[j];
+ if (info.field->field_index == field->field_index)
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool ha_innobase::can_convert_blob(const Field_blob *field,
+ const Column_definition &new_type) const
+{
+ if (new_type.type_handler() != field->type_handler())
+ return false;
+
+ if (!new_type.compression_method() != !field->compression_method())
+ return false;
+
+ if (new_type.pack_length != field->pack_length())
+ return false;
+
+ if (new_type.charset != field->charset())
+ {
+ Charset field_cs(field->charset());
+ if (!field_cs.encoding_allows_reinterpret_as(new_type.charset))
+ return false;
+
+ if (!field_cs.eq_collation_specific_names(new_type.charset))
+ return !is_part_of_a_key(field);
+
+ // Fully indexed case works instantly like
+ // Compare_keys::EqualButKeyPartLength. But prefix case isn't implemented.
+ if (is_part_of_a_key_prefix(field))
+ return false;
+
+ return true;
+ }
+
+ return true;
+}
+
+Compare_keys ha_innobase::compare_key_parts(
+ const Field &old_field, const Column_definition &new_field,
+ const KEY_PART_INFO &old_part, const KEY_PART_INFO &new_part) const
+{
+ const bool is_equal= old_field.is_equal(new_field);
+ const CHARSET_INFO *old_cs= old_field.charset();
+ const CHARSET_INFO *new_cs= new_field.charset;
+
+ if (!is_equal)
+ {
+ if (!old_field.can_be_converted_by_engine(new_field))
+ return Compare_keys::NotEqual;
+
+ if (!Charset(old_cs).eq_collation_specific_names(new_cs))
+ return Compare_keys::NotEqual;
+ }
+
+ if (old_part.length / old_cs->mbmaxlen != new_part.length / new_cs->mbmaxlen)
+ {
+ if (old_part.length != old_field.field_length)
+ return Compare_keys::NotEqual;
+
+ if (old_part.length >= new_part.length)
+ return Compare_keys::NotEqual;
+
+ return Compare_keys::EqualButKeyPartLength;
+ }
+
+ return Compare_keys::Equal;
+}
+
/******************************************************************//**
Use this when the args are passed to the format string from
errmsg-utf8.txt directly as is.
@@ -21347,10 +21215,10 @@ ib_senderrf(
switch (level) {
case IB_LOG_LEVEL_INFO:
- l = ME_JUST_INFO;
+ l = ME_NOTE;
break;
case IB_LOG_LEVEL_WARN:
- l = ME_JUST_WARNING;
+ l = ME_WARNING;
break;
default:
l = 0;
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index 9356b269fcc..97f62f4b398 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -16,10 +16,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
*****************************************************************************/
-
#ifdef WITH_WSREP
-# include <mysql/service_wsrep.h>
-# include "../../../wsrep/wsrep_api.h"
+#include "wsrep_api.h"
+#include <mysql/service_wsrep.h>
#endif /* WITH_WSREP */
#include "table.h"
@@ -52,42 +51,35 @@ struct ha_table_option_struct
uint encryption; /*!< DEFAULT, ON, OFF */
ulonglong encryption_key_id; /*!< encryption key id */
};
-/* JAN: TODO: MySQL 5.7 handler.h */
-struct st_handler_tablename
-{
- const char *db;
- const char *tablename;
-};
+
/** The class defining a handle to an Innodb table */
-class ha_innobase: public handler
+class ha_innobase final: public handler
{
public:
ha_innobase(handlerton* hton, TABLE_SHARE* table_arg);
- ~ha_innobase();
+ ~ha_innobase() override;
/** Get the row type from the storage engine. If this method returns
ROW_TYPE_NOT_USED, the information in HA_CREATE_INFO should be used. */
- enum row_type get_row_type() const;
-
- const char* table_type() const;
+ enum row_type get_row_type() const override;
- const char* index_type(uint key_number);
+ const char* table_type() const;
- const char** bas_ext() const;
+ const char* index_type(uint key_number) override;
- Table_flags table_flags() const;
+ Table_flags table_flags() const override;
- ulong index_flags(uint idx, uint part, bool all_parts) const;
+ ulong index_flags(uint idx, uint part, bool all_parts) const override;
- uint max_supported_keys() const;
+ uint max_supported_keys() const override;
- uint max_supported_key_length() const;
+ uint max_supported_key_length() const override;
- uint max_supported_key_part_length() const;
+ uint max_supported_key_part_length() const override;
- const key_map* keys_to_use_for_scanning();
+ const key_map* keys_to_use_for_scanning() override;
- void column_bitmaps_signal();
+ void column_bitmaps_signal() override;
/** Opens dictionary table object using table name. For partition, we need to
try alternative lower/upper case names to support moving data files across
@@ -103,95 +95,95 @@ public:
bool is_partition,
dict_err_ignore_t ignore_err);
- int open(const char *name, int mode, uint test_if_locked);
+ int open(const char *name, int mode, uint test_if_locked) override;
- handler* clone(const char *name, MEM_ROOT *mem_root);
+ handler* clone(const char *name, MEM_ROOT *mem_root) override;
- int close(void);
+ int close(void) override;
- double scan_time();
+ double scan_time() override;
- double read_time(uint index, uint ranges, ha_rows rows);
+ double read_time(uint index, uint ranges, ha_rows rows) override;
- int write_row(uchar * buf);
+ int write_row(const uchar * buf) override;
- int update_row(const uchar * old_data, const uchar * new_data);
+ int update_row(const uchar * old_data, const uchar * new_data) override;
- int delete_row(const uchar * buf);
+ int delete_row(const uchar * buf) override;
- bool was_semi_consistent_read();
+ bool was_semi_consistent_read() override;
- void try_semi_consistent_read(bool yes);
+ void try_semi_consistent_read(bool yes) override;
- void unlock_row();
+ void unlock_row() override;
- int index_init(uint index, bool sorted);
+ int index_init(uint index, bool sorted) override;
- int index_end();
+ int index_end() override;
int index_read(
uchar* buf,
const uchar* key,
uint key_len,
- ha_rkey_function find_flag);
+ ha_rkey_function find_flag) override;
- int index_read_last(uchar * buf, const uchar * key, uint key_len);
+ int index_read_last(uchar * buf, const uchar * key,
+ uint key_len) override;
- int index_next(uchar * buf);
+ int index_next(uchar * buf) override;
- int index_next_same(uchar * buf, const uchar *key, uint keylen);
+ int index_next_same(uchar * buf, const uchar * key,
+ uint keylen) override;
- int index_prev(uchar * buf);
+ int index_prev(uchar * buf) override;
- int index_first(uchar * buf);
+ int index_first(uchar * buf) override;
- int index_last(uchar * buf);
+ int index_last(uchar * buf) override;
/* Copy a cached MySQL row. If requested, also avoids
overwriting non-read columns. */
void copy_cached_row(uchar *to_rec, const uchar *from_rec,
uint rec_length);
- int rnd_init(bool scan);
+ int rnd_init(bool scan) override;
- int rnd_end();
+ int rnd_end() override;
- int rnd_next(uchar *buf);
+ int rnd_next(uchar *buf) override;
- int rnd_pos(uchar * buf, uchar *pos);
+ int rnd_pos(uchar * buf, uchar *pos) override;
- int ft_init();
- void ft_end() { rnd_end(); }
- FT_INFO *ft_init_ext(uint flags, uint inx, String* key);
- int ft_read(uchar* buf);
+ int ft_init() override;
+ void ft_end() override { rnd_end(); }
+ FT_INFO *ft_init_ext(uint flags, uint inx, String* key) override;
+ int ft_read(uchar* buf) override;
- void position(const uchar *record);
+ void position(const uchar *record) override;
- int info(uint);
+ int info(uint) override;
- int analyze(THD* thd,HA_CHECK_OPT* check_opt);
+ int analyze(THD* thd,HA_CHECK_OPT* check_opt) override;
- int optimize(THD* thd,HA_CHECK_OPT* check_opt);
+ int optimize(THD* thd,HA_CHECK_OPT* check_opt) override;
- int discard_or_import_tablespace(my_bool discard);
+ int discard_or_import_tablespace(my_bool discard) override;
- int extra(ha_extra_function operation);
+ int extra(ha_extra_function operation) override;
- int reset();
+ int reset() override;
- int external_lock(THD *thd, int lock_type);
+ int external_lock(THD *thd, int lock_type) override;
- int start_stmt(THD *thd, thr_lock_type lock_type);
-
- void position(uchar *record);
+ int start_stmt(THD *thd, thr_lock_type lock_type) override;
ha_rows records_in_range(
uint inx,
key_range* min_key,
- key_range* max_key);
+ key_range* max_key) override;
- ha_rows estimate_rows_upper_bound();
+ ha_rows estimate_rows_upper_bound() override;
- void update_create_info(HA_CREATE_INFO* create_info);
+ void update_create_info(HA_CREATE_INFO* create_info) override;
inline int create(
const char* name,
@@ -203,60 +195,54 @@ public:
int create(
const char* name,
TABLE* form,
- HA_CREATE_INFO* create_info);
-
- const char* check_table_options(THD *thd, TABLE* table,
- HA_CREATE_INFO* create_info, const bool use_tablespace, const ulint file_format);
+ HA_CREATE_INFO* create_info) override;
inline int delete_table(const char* name, enum_sql_command sqlcom);
- int truncate();
+ int truncate() override;
- int delete_table(const char *name);
+ int delete_table(const char *name) override;
- int rename_table(const char* from, const char* to);
+ int rename_table(const char* from, const char* to) override;
inline int defragment_table(const char* name);
- int check(THD* thd, HA_CHECK_OPT* check_opt);
+ int check(THD* thd, HA_CHECK_OPT* check_opt) override;
- char* get_foreign_key_create_info();
+ char* get_foreign_key_create_info() override;
- int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
+ int get_foreign_key_list(THD *thd,
+ List<FOREIGN_KEY_INFO> *f_key_list) override;
int get_parent_foreign_key_list(
THD* thd,
- List<FOREIGN_KEY_INFO>* f_key_list);
- int get_cascade_foreign_key_table_list(
- THD* thd,
- List<st_handler_tablename>* fk_table_list);
+ List<FOREIGN_KEY_INFO>* f_key_list) override;
+ bool can_switch_engines() override;
- bool can_switch_engines();
+ uint referenced_by_foreign_key() override;
- uint referenced_by_foreign_key();
+ void free_foreign_key_create_info(char* str) override;
- void free_foreign_key_create_info(char* str);
-
- uint lock_count(void) const;
+ uint lock_count(void) const override;
THR_LOCK_DATA** store_lock(
THD* thd,
THR_LOCK_DATA** to,
- thr_lock_type lock_type);
+ thr_lock_type lock_type) override;
- void init_table_handle_for_HANDLER();
+ void init_table_handle_for_HANDLER() override;
- virtual void get_auto_increment(
+ void get_auto_increment(
ulonglong offset,
ulonglong increment,
ulonglong nb_desired_values,
ulonglong* first_value,
- ulonglong* nb_reserved_values);
+ ulonglong* nb_reserved_values) override;
- virtual bool get_error_message(int error, String *buf);
+ bool get_error_message(int error, String *buf) override;
- virtual bool get_foreign_dup_key(char*, uint, char*, uint);
+ bool get_foreign_dup_key(char*, uint, char*, uint) override;
- uint8 table_cache_type();
+ uint8 table_cache_type() override;
/**
Ask handler about permission to cache table during query registration
@@ -266,11 +252,11 @@ public:
const char* table_key,
uint key_length,
qc_engine_callback* call_back,
- ulonglong* engine_data);
+ ulonglong* engine_data) override;
- bool primary_key_is_clustered();
+ bool primary_key_is_clustered() override;
- int cmp_ref(const uchar* ref1, const uchar* ref2);
+ int cmp_ref(const uchar* ref1, const uchar* ref2) override;
/** On-line ALTER TABLE interface @see handler0alter.cc @{ */
@@ -300,7 +286,7 @@ public:
enum_alter_inplace_result check_if_supported_inplace_alter(
TABLE* altered_table,
- Alter_inplace_info* ha_alter_info);
+ Alter_inplace_info* ha_alter_info) override;
/** Allows InnoDB to update internal structures with concurrent
writes blocked (provided that check_if_supported_inplace_alter()
@@ -316,7 +302,7 @@ public:
*/
bool prepare_inplace_alter_table(
TABLE* altered_table,
- Alter_inplace_info* ha_alter_info);
+ Alter_inplace_info* ha_alter_info) override;
/** Alter the table structure in-place with operations
specified using HA_ALTER_FLAGS and Alter_inplace_information.
@@ -332,7 +318,7 @@ public:
*/
bool inplace_alter_table(
TABLE* altered_table,
- Alter_inplace_info* ha_alter_info);
+ Alter_inplace_info* ha_alter_info) override;
/** Commit or rollback the changes made during
prepare_inplace_alter_table() and inplace_alter_table() inside
@@ -351,12 +337,12 @@ public:
bool commit_inplace_alter_table(
TABLE* altered_table,
Alter_inplace_info* ha_alter_info,
- bool commit);
+ bool commit) override;
/** @} */
bool check_if_incompatible_data(
HA_CREATE_INFO* info,
- uint table_changes);
+ uint table_changes) override;
/** @name Multi Range Read interface @{ */
@@ -371,11 +357,11 @@ public:
void* seq_init_param,
uint n_ranges,
uint mode,
- HANDLER_BUFFER* buf);
+ HANDLER_BUFFER* buf) override;
/** Process next multi range read @see DsMrr_impl::dsmrr_next
@param range_info */
- int multi_range_read_next(range_id_t *range_info);
+ int multi_range_read_next(range_id_t *range_info) override;
/** Initialize multi range read and get information.
@see ha_myisam::multi_range_read_info_const
@@ -394,7 +380,7 @@ public:
uint n_ranges,
uint* bufsz,
uint* flags,
- Cost_estimate* cost);
+ Cost_estimate* cost) override;
/** Initialize multi range read and get information.
@see DsMrr_impl::dsmrr_info
@@ -407,16 +393,16 @@ public:
@param cost */
ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys,
uint key_parts, uint* bufsz, uint* flags,
- Cost_estimate* cost);
+ Cost_estimate* cost) override;
int multi_range_read_explain_info(uint mrr_mode,
- char *str, size_t size);
+ char *str, size_t size) override;
/** Attempt to push down an index condition.
@param[in] keyno MySQL key number
@param[in] idx_cond Index condition to be checked
@return idx_cond if pushed; NULL if not pushed */
- Item* idx_cond_push(uint keyno, Item* idx_cond);
+ Item* idx_cond_push(uint keyno, Item* idx_cond) override;
/* @} */
/** Check if InnoDB is not storing virtual column metadata for a table.
@@ -427,13 +413,35 @@ public:
return s.frm_version<FRM_VER_EXPRESSSIONS && s.virtual_fields;
}
-protected:
- /**
- MySQL calls this method at the end of each statement. This method
- exists for readability only, called from reset(). The name reset()
- doesn't give any clue that it is called at the end of a statement. */
- int end_stmt();
+ /** Push a primary key filter.
+ @param[in] pk_filter filter against which primary keys
+ are to be checked
+ @retval false if pushed (always) */
+ bool rowid_filter_push(Rowid_filter *rowid_filter) override;
+
+ bool
+ can_convert_string(const Field_string* field,
+ const Column_definition& new_field) const override;
+ bool can_convert_varstring(
+ const Field_varstring* field,
+ const Column_definition& new_field) const override;
+ bool
+ can_convert_blob(const Field_blob* field,
+ const Column_definition& new_field) const override;
+
+ /** @return whether innodb_strict_mode is active */
+ static bool is_innodb_strict_mode(THD* thd);
+
+ /** @return whether innodb_strict_mode is active */
+ bool is_innodb_strict_mode()
+ { return is_innodb_strict_mode(m_user_thd); }
+ Compare_keys
+ compare_key_parts(const Field& old_field,
+ const Column_definition& new_field,
+ const KEY_PART_INFO& old_part,
+ const KEY_PART_INFO& new_part) const override;
+protected:
dberr_t innobase_get_autoinc(ulonglong* value);
dberr_t innobase_lock_autoinc();
ulonglong innobase_peek_autoinc();
@@ -451,12 +459,15 @@ protected:
/* @return true if it's necessary to switch current statement log
format from STATEMENT to ROW if binary log format is MIXED and
autoincrement values are changed in the statement */
- bool autoinc_lock_mode_stmt_unsafe() const;
+ bool autoinc_lock_mode_stmt_unsafe() const override;
dict_index_t* innobase_get_index(uint keynr);
#ifdef WITH_WSREP
- int wsrep_append_keys(THD *thd, wsrep_key_type key_type,
- const uchar* record0, const uchar* record1);
+ int wsrep_append_keys(
+ THD *thd,
+ Wsrep_service_key_type key_type,
+ const uchar* record0,
+ const uchar* record1);
#endif
/** Builds a 'template' to the prebuilt struct.
@@ -466,7 +477,7 @@ protected:
false if accessing individual fields is enough */
void build_template(bool whole_row);
- virtual int info_low(uint, bool);
+ int info_low(uint, bool);
/** The multi range read session object */
DsMrr_impl m_ds_mrr;
@@ -562,24 +573,6 @@ bool thd_is_strict_mode(const MYSQL_THD thd);
extern void mysql_bin_log_commit_pos(THD *thd, ulonglong *out_pos, const char **out_file);
struct trx_t;
-#ifdef WITH_WSREP
-//extern "C" int wsrep_trx_order_before(void *thd1, void *thd2);
-
-extern "C" bool wsrep_thd_is_wsrep_on(THD *thd);
-
-
-extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode);
-extern "C" void wsrep_thd_set_query_state(
- THD *thd, enum wsrep_query_state state);
-
-extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id);
-
-extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd);
-extern "C" time_t wsrep_thd_query_start(THD *thd);
-extern "C" query_id_t wsrep_thd_query_id(THD *thd);
-extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd);
-extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id);
-#endif
extern const struct _ft_vft ft_vft_result;
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 0cba7d953d1..82d945e6414 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2021, MariaDB Corporation.
+Copyright (c) 2013, 2022, 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
@@ -57,6 +57,8 @@ Smart ALTER TABLE
#include "ha_innodb.h"
#include "ut0stage.h"
#include "span.h"
+#include <thread>
+#include <sstream>
using st_::span;
/** File format constraint for ALTER TABLE */
@@ -109,10 +111,12 @@ static const alter_table_operations INNOBASE_INPLACE_IGNORE
| ALTER_PARTITIONED
| ALTER_COLUMN_COLUMN_FORMAT
| ALTER_COLUMN_STORAGE_TYPE
+ | ALTER_CONVERT_TO
| ALTER_VIRTUAL_GCOL_EXPR
| ALTER_DROP_CHECK_CONSTRAINT
| ALTER_RENAME
- | ALTER_COLUMN_INDEX_LENGTH;
+ | ALTER_COLUMN_INDEX_LENGTH
+ | ALTER_CHANGE_INDEX_COMMENT;
/** Operations on foreign key definitions (changing the schema only) */
static const alter_table_operations INNOBASE_FOREIGN_OPERATIONS
@@ -144,10 +148,740 @@ static const alter_table_operations INNOBASE_ALTER_INSTANT
| ALTER_COLUMN_NAME
| ALTER_ADD_VIRTUAL_COLUMN
| INNOBASE_FOREIGN_OPERATIONS
- | ALTER_COLUMN_EQUAL_PACK_LENGTH
+ | ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE
| ALTER_COLUMN_UNVERSIONED
+ | ALTER_RENAME_INDEX
| ALTER_DROP_VIRTUAL_COLUMN;
+/** Acquire a page latch on the possible metadata record,
+to prevent concurrent invocation of dict_index_t::clear_instant_alter()
+by purge when the table turns out to be empty.
+@param[in,out] index clustered index
+@param[in,out] mtr mini-transaction */
+static void instant_metadata_lock(dict_index_t& index, mtr_t& mtr)
+{
+ DBUG_ASSERT(index.is_primary());
+
+ if (!index.is_instant()) {
+ /* dict_index_t::clear_instant_alter() cannot be called.
+ No need for a latch. */
+ return;
+ }
+
+ btr_cur_t btr_cur;
+ btr_cur_open_at_index_side(true, &index, BTR_SEARCH_LEAF,
+ &btr_cur, 0, &mtr);
+ ut_ad(page_cur_is_before_first(btr_cur_get_page_cur(&btr_cur)));
+ ut_ad(page_is_leaf(btr_cur_get_page(&btr_cur)));
+ ut_ad(!page_has_prev(btr_cur_get_page(&btr_cur)));
+ ut_ad(!buf_block_get_page_zip(btr_cur_get_block(&btr_cur)));
+}
+
+/** Initialize instant->field_map.
+@param[in] table table definition to copy from */
+inline void dict_table_t::init_instant(const dict_table_t& table)
+{
+ const dict_index_t& oindex __attribute__((unused))= *table.indexes.start;
+ dict_index_t& index = *indexes.start;
+ const unsigned u = index.first_user_field();
+ DBUG_ASSERT(u == oindex.first_user_field());
+ DBUG_ASSERT(index.n_fields >= oindex.n_fields);
+
+ field_map_element_t* field_map_it = static_cast<field_map_element_t*>(
+ mem_heap_zalloc(heap, (index.n_fields - u)
+ * sizeof *field_map_it));
+ instant->field_map = field_map_it;
+
+ ut_d(unsigned n_drop = 0);
+ ut_d(unsigned n_nullable = 0);
+ for (unsigned i = u; i < index.n_fields; i++) {
+ auto& f = index.fields[i];
+ ut_d(n_nullable += f.col->is_nullable());
+
+ if (!f.col->is_dropped()) {
+ (*field_map_it++).set_ind(f.col->ind);
+ continue;
+ }
+
+ auto fixed_len = dict_col_get_fixed_size(
+ f.col, not_redundant());
+ field_map_it->set_dropped();
+ if (!f.col->is_nullable()) {
+ field_map_it->set_not_null();
+ }
+ field_map_it->set_ind(fixed_len
+ ? uint16_t(fixed_len + 1)
+ : DATA_BIG_COL(f.col));
+ field_map_it++;
+ ut_ad(f.col >= table.instant->dropped);
+ ut_ad(f.col < table.instant->dropped
+ + table.instant->n_dropped);
+ ut_d(n_drop++);
+ size_t d = f.col - table.instant->dropped;
+ ut_ad(f.col == &table.instant->dropped[d]);
+ ut_ad(d <= instant->n_dropped);
+ f.col = &instant->dropped[d];
+ }
+ ut_ad(n_drop == n_dropped());
+ ut_ad(field_map_it == &instant->field_map[index.n_fields - u]);
+ ut_ad(index.n_nullable == n_nullable);
+}
+
+/** Set is_instant() before instant_column().
+@param[in] old previous table definition
+@param[in] col_map map from old.cols[] and old.v_cols[] to this
+@param[out] first_alter_pos 0, or 1 + first changed column position */
+inline void dict_table_t::prepare_instant(const dict_table_t& old,
+ const ulint* col_map,
+ unsigned& first_alter_pos)
+{
+ DBUG_ASSERT(!is_instant());
+ DBUG_ASSERT(n_dropped() == 0);
+ DBUG_ASSERT(old.n_cols == old.n_def);
+ DBUG_ASSERT(n_cols == n_def);
+ DBUG_ASSERT(old.supports_instant());
+ DBUG_ASSERT(not_redundant() == old.not_redundant());
+ DBUG_ASSERT(DICT_TF_HAS_ATOMIC_BLOBS(flags)
+ == DICT_TF_HAS_ATOMIC_BLOBS(old.flags));
+ DBUG_ASSERT(!persistent_autoinc
+ || persistent_autoinc == old.persistent_autoinc);
+ /* supports_instant() does not necessarily hold here,
+ in case ROW_FORMAT=COMPRESSED according to the
+ MariaDB data dictionary, and ALTER_OPTIONS was not set.
+ If that is the case, the instant ALTER TABLE would keep
+ the InnoDB table in its current format. */
+
+ dict_index_t& oindex = *old.indexes.start;
+ dict_index_t& index = *indexes.start;
+ first_alter_pos = 0;
+
+ mtr_t mtr;
+ mtr.start();
+ /* Protect oindex.n_core_fields and others, so that
+ purge cannot invoke dict_index_t::clear_instant_alter(). */
+ instant_metadata_lock(oindex, mtr);
+
+ for (unsigned i = 0; i + DATA_N_SYS_COLS < old.n_cols; i++) {
+ if (col_map[i] != i) {
+ first_alter_pos = 1 + i;
+ goto add_metadata;
+ }
+ }
+
+ if (!old.instant) {
+ /* Columns were not dropped or reordered.
+ Therefore columns must have been added at the end,
+ or modified instantly in place. */
+ DBUG_ASSERT(index.n_fields >= oindex.n_fields);
+ DBUG_ASSERT(index.n_fields > oindex.n_fields
+ || !not_redundant());
+#ifdef UNIV_DEBUG
+ if (index.n_fields == oindex.n_fields) {
+ ut_ad(!not_redundant());
+ for (unsigned i = index.n_fields; i--; ) {
+ ut_ad(index.fields[i].col->same_format(
+ *oindex.fields[i].col));
+ }
+ }
+#endif
+set_core_fields:
+ index.n_core_fields = oindex.n_core_fields;
+ index.n_core_null_bytes = oindex.n_core_null_bytes;
+ } else {
+add_metadata:
+ const unsigned n_old_drop = old.n_dropped();
+ unsigned n_drop = n_old_drop;
+ for (unsigned i = old.n_cols; i--; ) {
+ if (col_map[i] == ULINT_UNDEFINED) {
+ DBUG_ASSERT(i + DATA_N_SYS_COLS
+ < uint(old.n_cols));
+ n_drop++;
+ }
+ }
+
+ instant = new (mem_heap_alloc(heap, sizeof(dict_instant_t)))
+ dict_instant_t();
+ instant->n_dropped = n_drop;
+ if (n_drop) {
+ instant->dropped
+ = static_cast<dict_col_t*>(
+ mem_heap_alloc(heap, n_drop
+ * sizeof(dict_col_t)));
+ if (n_old_drop) {
+ memcpy(instant->dropped, old.instant->dropped,
+ n_old_drop * sizeof(dict_col_t));
+ }
+ } else {
+ instant->dropped = NULL;
+ }
+
+ for (unsigned i = 0, d = n_old_drop; i < old.n_cols; i++) {
+ if (col_map[i] == ULINT_UNDEFINED) {
+ (new (&instant->dropped[d++])
+ dict_col_t(old.cols[i]))->set_dropped();
+ }
+ }
+#ifndef DBUG_OFF
+ for (unsigned i = 0; i < n_drop; i++) {
+ DBUG_ASSERT(instant->dropped[i].is_dropped());
+ }
+#endif
+ const uint n_fields = index.n_fields + n_dropped();
+
+ DBUG_ASSERT(n_fields >= oindex.n_fields);
+ dict_field_t* fields = static_cast<dict_field_t*>(
+ mem_heap_zalloc(heap, n_fields * sizeof *fields));
+ uint i = 0, j = 0, n_nullable = 0;
+ ut_d(uint core_null = 0);
+ for (; i < oindex.n_fields; i++) {
+ DBUG_ASSERT(j <= i);
+ dict_field_t&f = fields[i] = oindex.fields[i];
+ if (f.col->is_dropped()) {
+ /* The column has been instantly
+ dropped earlier. */
+ DBUG_ASSERT(f.col >= old.instant->dropped);
+ {
+ size_t d = f.col
+ - old.instant->dropped;
+ DBUG_ASSERT(d < n_old_drop);
+ DBUG_ASSERT(&old.instant->dropped[d]
+ == f.col);
+ DBUG_ASSERT(!f.name);
+ f.col = instant->dropped + d;
+ }
+ if (f.col->is_nullable()) {
+found_nullable:
+ n_nullable++;
+ ut_d(core_null
+ += i < oindex.n_core_fields);
+ }
+ continue;
+ }
+
+ const ulint col_ind = col_map[f.col->ind];
+ if (col_ind != ULINT_UNDEFINED) {
+ if (index.fields[j].col->ind != col_ind) {
+ /* The fields for instantly
+ added columns must be placed
+ last in the clustered index.
+ Keep pre-existing fields in
+ the same position. */
+ uint k;
+ for (k = j + 1; k < index.n_fields;
+ k++) {
+ if (index.fields[k].col->ind
+ == col_ind) {
+ goto found_j;
+ }
+ }
+ DBUG_ASSERT(!"no such col");
+found_j:
+ std::swap(index.fields[j],
+ index.fields[k]);
+ }
+ DBUG_ASSERT(index.fields[j].col->ind
+ == col_ind);
+ fields[i] = index.fields[j++];
+ DBUG_ASSERT(!fields[i].col->is_dropped());
+ DBUG_ASSERT(fields[i].name
+ == fields[i].col->name(*this));
+ if (fields[i].col->is_nullable()) {
+ goto found_nullable;
+ }
+ continue;
+ }
+
+ /* This column is being dropped. */
+ unsigned d = n_old_drop;
+ for (unsigned c = 0; c < f.col->ind; c++) {
+ d += col_map[c] == ULINT_UNDEFINED;
+ }
+ DBUG_ASSERT(d < n_drop);
+ f.col = &instant->dropped[d];
+ f.name = NULL;
+ if (f.col->is_nullable()) {
+ goto found_nullable;
+ }
+ }
+
+ /* In case of discarded tablespace, InnoDB can't
+ read the root page. So assign the null bytes based
+ on nullabled fields */
+ if (!oindex.table->space) {
+ oindex.n_core_null_bytes= UT_BITS_IN_BYTES(
+ unsigned(oindex.n_nullable));
+ }
+
+ /* The n_core_null_bytes only matters for
+ ROW_FORMAT=COMPACT and ROW_FORMAT=DYNAMIC tables. */
+ ut_ad(UT_BITS_IN_BYTES(core_null) == oindex.n_core_null_bytes
+ || !not_redundant());
+ DBUG_ASSERT(i >= oindex.n_core_fields);
+ DBUG_ASSERT(j <= i);
+ DBUG_ASSERT(n_fields - (i - j) == index.n_fields);
+ std::sort(index.fields + j, index.fields + index.n_fields,
+ [](const dict_field_t& a, const dict_field_t& b)
+ { return a.col->ind < b.col->ind; });
+ for (; i < n_fields; i++) {
+ fields[i] = index.fields[j++];
+ n_nullable += fields[i].col->is_nullable();
+ DBUG_ASSERT(!fields[i].col->is_dropped());
+ DBUG_ASSERT(fields[i].name
+ == fields[i].col->name(*this));
+ }
+ DBUG_ASSERT(j == index.n_fields);
+ index.n_fields = index.n_def = n_fields;
+ index.fields = fields;
+ DBUG_ASSERT(n_nullable >= index.n_nullable);
+ DBUG_ASSERT(n_nullable >= oindex.n_nullable);
+ index.n_nullable = n_nullable;
+ goto set_core_fields;
+ }
+
+ DBUG_ASSERT(n_cols + n_dropped() >= old.n_cols + old.n_dropped());
+ DBUG_ASSERT(n_dropped() >= old.n_dropped());
+ DBUG_ASSERT(index.n_core_fields == oindex.n_core_fields);
+ DBUG_ASSERT(index.n_core_null_bytes == oindex.n_core_null_bytes);
+ mtr.commit();
+}
+
+/** Adjust index metadata for instant ADD/DROP/reorder COLUMN.
+@param[in] clustered index definition after instant ALTER TABLE */
+inline void dict_index_t::instant_add_field(const dict_index_t& instant)
+{
+ DBUG_ASSERT(is_primary());
+ DBUG_ASSERT(instant.is_primary());
+ DBUG_ASSERT(!has_virtual());
+ DBUG_ASSERT(!instant.has_virtual());
+ DBUG_ASSERT(instant.n_core_fields <= instant.n_fields);
+ DBUG_ASSERT(n_def == n_fields);
+ DBUG_ASSERT(instant.n_def == instant.n_fields);
+ DBUG_ASSERT(type == instant.type);
+ DBUG_ASSERT(trx_id_offset == instant.trx_id_offset);
+ DBUG_ASSERT(n_user_defined_cols == instant.n_user_defined_cols);
+ DBUG_ASSERT(n_uniq == instant.n_uniq);
+ DBUG_ASSERT(instant.n_fields >= n_fields);
+ DBUG_ASSERT(instant.n_nullable >= n_nullable);
+ /* dict_table_t::prepare_instant() initialized n_core_fields
+ to be equal. However, after that purge could have emptied the
+ table and invoked dict_index_t::clear_instant_alter(). */
+ DBUG_ASSERT(instant.n_core_fields <= n_core_fields);
+ DBUG_ASSERT(instant.n_core_null_bytes <= n_core_null_bytes);
+ DBUG_ASSERT(instant.n_core_fields == n_core_fields
+ || (!is_instant() && instant.is_instant()));
+ DBUG_ASSERT(instant.n_core_null_bytes == n_core_null_bytes
+ || (!is_instant() && instant.is_instant()));
+
+ /* instant will have all fields (including ones for columns
+ that have been or are being instantly dropped) in the same position
+ as this index. Fields for any added columns are appended at the end. */
+#ifndef DBUG_OFF
+ for (unsigned i = 0; i < n_fields; i++) {
+ DBUG_ASSERT(fields[i].same(instant.fields[i]));
+ DBUG_ASSERT(instant.fields[i].col->same_format(*fields[i]
+ .col));
+ /* Instant conversion from NULL to NOT NULL is not allowed. */
+ DBUG_ASSERT(!fields[i].col->is_nullable()
+ || instant.fields[i].col->is_nullable());
+ DBUG_ASSERT(fields[i].col->is_nullable()
+ == instant.fields[i].col->is_nullable()
+ || !table->not_redundant());
+ }
+#endif
+ n_fields = instant.n_fields;
+ n_def = instant.n_def;
+ n_nullable = instant.n_nullable;
+ fields = static_cast<dict_field_t*>(
+ mem_heap_dup(heap, instant.fields, n_fields * sizeof *fields));
+
+ ut_d(unsigned n_null = 0);
+ ut_d(unsigned n_dropped = 0);
+
+ for (unsigned i = 0; i < n_fields; i++) {
+ const dict_col_t* icol = instant.fields[i].col;
+ dict_field_t& f = fields[i];
+ ut_d(n_null += icol->is_nullable());
+ DBUG_ASSERT(!icol->is_virtual());
+ if (icol->is_dropped()) {
+ ut_d(n_dropped++);
+ f.col->set_dropped();
+ f.name = NULL;
+ } else {
+ f.col = &table->cols[icol - instant.table->cols];
+ f.name = f.col->name(*table);
+ }
+ }
+
+ ut_ad(n_null == n_nullable);
+ ut_ad(n_dropped == instant.table->n_dropped());
+}
+
+/** Adjust table metadata for instant ADD/DROP/reorder COLUMN.
+@param[in] table altered table (with dropped columns)
+@param[in] col_map mapping from cols[] and v_cols[] to table
+@return whether the metadata record must be updated */
+inline bool dict_table_t::instant_column(const dict_table_t& table,
+ const ulint* col_map)
+{
+ DBUG_ASSERT(!table.cached);
+ DBUG_ASSERT(table.n_def == table.n_cols);
+ DBUG_ASSERT(table.n_t_def == table.n_t_cols);
+ DBUG_ASSERT(n_def == n_cols);
+ DBUG_ASSERT(n_t_def == n_t_cols);
+ DBUG_ASSERT(n_v_def == n_v_cols);
+ DBUG_ASSERT(table.n_v_def == table.n_v_cols);
+ DBUG_ASSERT(table.n_cols + table.n_dropped() >= n_cols + n_dropped());
+ DBUG_ASSERT(!table.persistent_autoinc
+ || persistent_autoinc == table.persistent_autoinc);
+ ut_ad(mutex_own(&dict_sys.mutex));
+
+ {
+ const char* end = table.col_names;
+ for (unsigned i = table.n_cols; i--; ) end += strlen(end) + 1;
+
+ col_names = static_cast<char*>(
+ mem_heap_dup(heap, table.col_names,
+ ulint(end - table.col_names)));
+ }
+ const dict_col_t* const old_cols = cols;
+ cols = static_cast<dict_col_t*>(mem_heap_dup(heap, table.cols,
+ table.n_cols
+ * sizeof *cols));
+
+ /* Preserve the default values of previously instantly added
+ columns, or copy the new default values to this->heap. */
+ for (ulint i = 0; i < ulint(table.n_cols); i++) {
+ dict_col_t& c = cols[i];
+
+ if (const dict_col_t* o = find(old_cols, col_map, n_cols, i)) {
+ c.def_val = o->def_val;
+ DBUG_ASSERT(!((c.prtype ^ o->prtype)
+ & ~(DATA_NOT_NULL | DATA_VERSIONED
+ | CHAR_COLL_MASK << 16
+ | DATA_LONG_TRUE_VARCHAR)));
+ DBUG_ASSERT(c.same_type(*o));
+ DBUG_ASSERT(c.len >= o->len);
+
+ if (o->vers_sys_start()) {
+ ut_ad(o->ind == vers_start);
+ vers_start = i;
+ } else if (o->vers_sys_end()) {
+ ut_ad(o->ind == vers_end);
+ vers_end = i;
+ }
+ continue;
+ }
+
+ DBUG_ASSERT(c.is_added());
+ if (c.def_val.len <= sizeof field_ref_zero
+ && (!c.def_val.len
+ || !memcmp(c.def_val.data, field_ref_zero,
+ c.def_val.len))) {
+ c.def_val.data = field_ref_zero;
+ } else if (const void*& d = c.def_val.data) {
+ d = mem_heap_dup(heap, d, c.def_val.len);
+ } else {
+ DBUG_ASSERT(c.def_val.len == UNIV_SQL_NULL);
+ }
+ }
+
+ n_t_def += table.n_cols - n_cols;
+ n_t_cols += table.n_cols - n_cols;
+ n_def = table.n_cols;
+
+ const dict_v_col_t* const old_v_cols = v_cols;
+
+ if (const char* end = table.v_col_names) {
+ for (unsigned i = table.n_v_cols; i--; ) {
+ end += strlen(end) + 1;
+ }
+
+ v_col_names = static_cast<char*>(
+ mem_heap_dup(heap, table.v_col_names,
+ ulint(end - table.v_col_names)));
+ v_cols = static_cast<dict_v_col_t*>(
+ mem_heap_alloc(heap, table.n_v_cols * sizeof(*v_cols)));
+ for (ulint i = table.n_v_cols; i--; ) {
+ new (&v_cols[i]) dict_v_col_t(table.v_cols[i]);
+ v_cols[i].v_indexes.clear();
+ }
+ } else {
+ ut_ad(table.n_v_cols == 0);
+ v_col_names = NULL;
+ v_cols = NULL;
+ }
+
+ n_t_def += table.n_v_cols - n_v_cols;
+ n_t_cols += table.n_v_cols - n_v_cols;
+ n_v_def = table.n_v_cols;
+
+ for (unsigned i = 0; i < n_v_def; i++) {
+ dict_v_col_t& v = v_cols[i];
+ DBUG_ASSERT(v.v_indexes.empty());
+ v.base_col = static_cast<dict_col_t**>(
+ mem_heap_dup(heap, v.base_col,
+ v.num_base * sizeof *v.base_col));
+
+ for (ulint n = v.num_base; n--; ) {
+ dict_col_t*& base = v.base_col[n];
+ if (base->is_virtual()) {
+ } else if (base >= table.cols
+ && base < table.cols + table.n_cols) {
+ /* The base column was instantly added. */
+ size_t c = base - table.cols;
+ DBUG_ASSERT(base == &table.cols[c]);
+ base = &cols[c];
+ } else {
+ DBUG_ASSERT(base >= old_cols);
+ size_t c = base - old_cols;
+ DBUG_ASSERT(c + DATA_N_SYS_COLS < n_cols);
+ DBUG_ASSERT(base == &old_cols[c]);
+ DBUG_ASSERT(col_map[c] + DATA_N_SYS_COLS
+ < n_cols);
+ base = &cols[col_map[c]];
+ }
+ }
+ }
+
+ dict_index_t* index = dict_table_get_first_index(this);
+ bool metadata_changed;
+ {
+ const dict_index_t& i = *dict_table_get_first_index(&table);
+ metadata_changed = i.n_fields > index->n_fields;
+ ut_ad(i.n_fields >= index->n_fields);
+ index->instant_add_field(i);
+ }
+
+ if (instant || table.instant) {
+ const auto old_instant = instant;
+ /* FIXME: add instant->heap, and transfer ownership here */
+ if (!instant) {
+ instant = new (mem_heap_zalloc(heap, sizeof *instant))
+ dict_instant_t();
+ goto dup_dropped;
+ } else if (n_dropped() < table.n_dropped()) {
+dup_dropped:
+ instant->dropped = static_cast<dict_col_t*>(
+ mem_heap_dup(heap, table.instant->dropped,
+ table.instant->n_dropped
+ * sizeof *instant->dropped));
+ instant->n_dropped = table.instant->n_dropped;
+ } else if (table.instant->n_dropped) {
+ memcpy(instant->dropped, table.instant->dropped,
+ table.instant->n_dropped
+ * sizeof *instant->dropped);
+ }
+
+ const field_map_element_t* field_map = old_instant
+ ? old_instant->field_map : NULL;
+
+ init_instant(table);
+
+ if (!metadata_changed) {
+ metadata_changed = !field_map
+ || memcmp(field_map,
+ instant->field_map,
+ (index->n_fields
+ - index->first_user_field())
+ * sizeof *field_map);
+ }
+ }
+
+ while ((index = dict_table_get_next_index(index)) != NULL) {
+ if (index->to_be_dropped) {
+ continue;
+ }
+ for (unsigned i = 0; i < index->n_fields; i++) {
+ dict_field_t& f = index->fields[i];
+ if (f.col >= table.cols
+ && f.col < table.cols + table.n_cols) {
+ /* This is an instantly added column
+ in a newly added index. */
+ DBUG_ASSERT(!f.col->is_virtual());
+ size_t c = f.col - table.cols;
+ DBUG_ASSERT(f.col == &table.cols[c]);
+ f.col = &cols[c];
+ } else if (f.col >= &table.v_cols->m_col
+ && f.col < &table.v_cols[n_v_cols].m_col) {
+ /* This is an instantly added virtual column
+ in a newly added index. */
+ DBUG_ASSERT(f.col->is_virtual());
+ size_t c = reinterpret_cast<dict_v_col_t*>(
+ f.col) - table.v_cols;
+ DBUG_ASSERT(f.col == &table.v_cols[c].m_col);
+ f.col = &v_cols[c].m_col;
+ } else if (f.col < old_cols
+ || f.col >= old_cols + n_cols) {
+ DBUG_ASSERT(f.col->is_virtual());
+ f.col = &v_cols[col_map[
+ reinterpret_cast<dict_v_col_t*>(
+ f.col)
+ - old_v_cols + n_cols]].m_col;
+ } else {
+ f.col = &cols[col_map[f.col - old_cols]];
+ DBUG_ASSERT(!f.col->is_virtual());
+ }
+ f.name = f.col->name(*this);
+ if (f.col->is_virtual()) {
+ dict_v_col_t* v_col = reinterpret_cast
+ <dict_v_col_t*>(f.col);
+ v_col->v_indexes.push_front(
+ dict_v_idx_t(index, i));
+ }
+ }
+ }
+
+ n_cols = table.n_cols;
+ n_v_cols = table.n_v_cols;
+ return metadata_changed;
+}
+
+/** Find the old column number for the given new column position.
+@param[in] col_map column map from old column to new column
+@param[in] pos new column position
+@param[in] n number of columns present in the column map
+@return old column position for the given new column position. */
+static ulint find_old_col_no(const ulint* col_map, ulint pos, ulint n)
+{
+ do {
+ ut_ad(n);
+ } while (col_map[--n] != pos);
+ return n;
+}
+
+/** Roll back instant_column().
+@param[in] old_n_cols original n_cols
+@param[in] old_cols original cols
+@param[in] old_col_names original col_names
+@param[in] old_instant original instant structure
+@param[in] old_fields original fields
+@param[in] old_n_fields original number of fields
+@param[in] old_n_core_fields original number of core fields
+@param[in] old_n_v_cols original n_v_cols
+@param[in] old_v_cols original v_cols
+@param[in] old_v_col_names original v_col_names
+@param[in] col_map column map */
+inline void dict_table_t::rollback_instant(
+ unsigned old_n_cols,
+ dict_col_t* old_cols,
+ const char* old_col_names,
+ dict_instant_t* old_instant,
+ dict_field_t* old_fields,
+ unsigned old_n_fields,
+ unsigned old_n_core_fields,
+ unsigned old_n_v_cols,
+ dict_v_col_t* old_v_cols,
+ const char* old_v_col_names,
+ const ulint* col_map)
+{
+ ut_d(dict_sys.assert_locked());
+
+ if (cols == old_cols) {
+ /* Alter fails before instant operation happens.
+ So there is no need to do rollback instant operation */
+ return;
+ }
+
+ dict_index_t* index = indexes.start;
+ mtr_t mtr;
+ mtr.start();
+ /* Prevent concurrent execution of dict_index_t::clear_instant_alter()
+ by acquiring a latch on the leftmost leaf page. */
+ instant_metadata_lock(*index, mtr);
+ /* index->is_instant() does not necessarily hold here, because
+ the table may have been emptied */
+ DBUG_ASSERT(old_n_cols >= DATA_N_SYS_COLS);
+ DBUG_ASSERT(n_cols == n_def);
+ DBUG_ASSERT(index->n_def == index->n_fields);
+ DBUG_ASSERT(index->n_core_fields <= index->n_fields);
+ DBUG_ASSERT(old_n_core_fields <= old_n_fields);
+ DBUG_ASSERT(instant || !old_instant);
+
+ instant = old_instant;
+
+ index->n_nullable = 0;
+
+ for (unsigned i = old_n_fields; i--; ) {
+ if (old_fields[i].col->is_nullable()) {
+ index->n_nullable++;
+ }
+ }
+
+ for (unsigned i = n_v_cols; i--; ) {
+ v_cols[i].~dict_v_col_t();
+ }
+
+ index->n_core_fields = (index->n_fields == index->n_core_fields)
+ ? old_n_fields
+ : old_n_core_fields;
+ index->n_def = index->n_fields = old_n_fields;
+ index->n_core_null_bytes = UT_BITS_IN_BYTES(
+ index->get_n_nullable(index->n_core_fields));
+
+ const dict_col_t* const new_cols = cols;
+ const dict_col_t* const new_cols_end __attribute__((unused)) = cols + n_cols;
+ const dict_v_col_t* const new_v_cols = v_cols;
+ const dict_v_col_t* const new_v_cols_end __attribute__((unused))= v_cols + n_v_cols;
+
+ cols = old_cols;
+ col_names = old_col_names;
+ v_cols = old_v_cols;
+ v_col_names = old_v_col_names;
+ n_def = n_cols = old_n_cols;
+ n_v_def = n_v_cols = old_n_v_cols;
+ n_t_def = n_t_cols = n_cols + n_v_cols;
+
+ if (versioned()) {
+ for (unsigned i = 0; i < n_cols; ++i) {
+ if (cols[i].vers_sys_start()) {
+ vers_start = i;
+ } else if (cols[i].vers_sys_end()) {
+ vers_end = i;
+ }
+ }
+ }
+
+ index->fields = old_fields;
+ mtr.commit();
+
+ while ((index = dict_table_get_next_index(index)) != NULL) {
+ if (index->to_be_dropped) {
+ /* instant_column() did not adjust these indexes. */
+ continue;
+ }
+
+ for (unsigned i = 0; i < index->n_fields; i++) {
+ dict_field_t& f = index->fields[i];
+ if (f.col->is_virtual()) {
+ DBUG_ASSERT(f.col >= &new_v_cols->m_col);
+ DBUG_ASSERT(f.col < &new_v_cols_end->m_col);
+ size_t n = size_t(
+ reinterpret_cast<dict_v_col_t*>(f.col)
+ - new_v_cols);
+ DBUG_ASSERT(n <= n_v_cols);
+
+ ulint old_col_no = find_old_col_no(
+ col_map + n_cols, n, n_v_cols);
+ DBUG_ASSERT(old_col_no <= n_v_cols);
+ f.col = &v_cols[old_col_no].m_col;
+ DBUG_ASSERT(f.col->is_virtual());
+ } else {
+ DBUG_ASSERT(f.col >= new_cols);
+ DBUG_ASSERT(f.col < new_cols_end);
+ size_t n = size_t(f.col - new_cols);
+ DBUG_ASSERT(n <= n_cols);
+
+ ulint old_col_no = find_old_col_no(col_map,
+ n, n_cols);
+ DBUG_ASSERT(old_col_no < n_cols);
+ f.col = &cols[old_col_no];
+ DBUG_ASSERT(!f.col->is_virtual());
+ }
+ f.name = f.col->name(*this);
+ }
+ }
+}
+
struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
{
/** Dummy query graph */
@@ -164,10 +898,6 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
dict_index_t** drop_index;
/** number of InnoDB indexes being dropped */
const ulint num_to_drop_index;
- /** InnoDB indexes being renamed */
- dict_index_t** rename;
- /** number of InnoDB indexes being renamed */
- const ulint num_to_rename;
/** InnoDB foreign key constraints being dropped */
dict_foreign_t** drop_fk;
/** number of InnoDB foreign key constraints being dropped */
@@ -186,7 +916,7 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
dict_table_t* old_table;
/** table where the indexes are being created or dropped */
dict_table_t* new_table;
- /** table definition for instant ADD COLUMN */
+ /** table definition for instant ADD/DROP/reorder COLUMN */
dict_table_t* instant_table;
/** mapping of old column numbers to new ones, or NULL */
const ulint* col_map;
@@ -220,7 +950,22 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
dict_col_t* const old_cols;
/** original column names of the table */
const char* const old_col_names;
-
+ /** original instantly dropped or reordered columns */
+ dict_instant_t* const old_instant;
+ /** original index fields */
+ dict_field_t* const old_fields;
+ /** size of old_fields */
+ const unsigned old_n_fields;
+ /** original old_table->n_core_fields */
+ const unsigned old_n_core_fields;
+ /** original number of virtual columns in the table */
+ const unsigned old_n_v_cols;
+ /** original virtual columns of the table */
+ dict_v_col_t* const old_v_cols;
+ /** original virtual column names of the table */
+ const char* const old_v_col_names;
+ /** 0, or 1 + first column whose position changes in instant ALTER */
+ unsigned first_alter_pos;
/** Allow non-null conversion.
(1) Alter ignore should allow the conversion
irrespective of sql mode.
@@ -234,8 +979,6 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
ha_innobase_inplace_ctx(row_prebuilt_t*& prebuilt_arg,
dict_index_t** drop_arg,
ulint num_to_drop_arg,
- dict_index_t** rename_arg,
- ulint num_to_rename_arg,
dict_foreign_t** drop_fk_arg,
ulint num_to_drop_fk_arg,
dict_foreign_t** add_fk_arg,
@@ -254,7 +997,6 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
prebuilt (prebuilt_arg),
add_index (0), add_key_numbers (0), num_to_add_index (0),
drop_index (drop_arg), num_to_drop_index (num_to_drop_arg),
- rename (rename_arg), num_to_rename (num_to_rename_arg),
drop_fk (drop_fk_arg), num_to_drop_fk (num_to_drop_fk_arg),
add_fk (add_fk_arg), num_to_add_fk (num_to_add_fk_arg),
online (online_arg), heap (heap_arg), trx (0),
@@ -277,6 +1019,15 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
old_n_cols(prebuilt_arg->table->n_cols),
old_cols(prebuilt_arg->table->cols),
old_col_names(prebuilt_arg->table->col_names),
+ old_instant(prebuilt_arg->table->instant),
+ old_fields(prebuilt_arg->table->indexes.start->fields),
+ old_n_fields(prebuilt_arg->table->indexes.start->n_fields),
+ old_n_core_fields(prebuilt_arg->table->indexes.start
+ ->n_core_fields),
+ old_n_v_cols(prebuilt_arg->table->n_v_cols),
+ old_v_cols(prebuilt_arg->table->v_cols),
+ old_v_col_names(prebuilt_arg->table->v_col_names),
+ first_alter_pos(0),
allow_not_null(allow_not_null_flag),
page_compression_level(page_compressed
? (page_compression_level_arg
@@ -310,6 +1061,9 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
rw_lock_free(&index->lock);
dict_mem_index_free(index);
}
+ for (unsigned i = old_n_v_cols; i--; ) {
+ old_v_cols[i].~dict_v_col_t();
+ }
if (instant_table->fts) {
fts_free(instant_table);
}
@@ -327,14 +1081,24 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
{
DBUG_ASSERT(need_rebuild());
DBUG_ASSERT(!is_instant());
- DBUG_ASSERT(old_table->n_cols == old_table->n_def);
- DBUG_ASSERT(new_table->n_cols == new_table->n_def);
DBUG_ASSERT(old_table->n_cols == old_n_cols);
- DBUG_ASSERT(new_table->n_cols > old_table->n_cols);
- instant_table = new_table;
+ instant_table = new_table;
new_table = old_table;
export_vars.innodb_instant_alter_column++;
+
+ instant_table->prepare_instant(*old_table, col_map,
+ first_alter_pos);
+ }
+
+ /** Adjust table metadata for instant ADD/DROP/reorder COLUMN.
+ @return whether the metadata record must be updated */
+ bool instant_column()
+ {
+ DBUG_ASSERT(is_instant());
+ DBUG_ASSERT(old_n_fields
+ == old_table->indexes.start->n_fields);
+ return old_table->instant_column(*instant_table, col_map);
}
/** Revert prepare_instant() if the transaction is rolled back. */
@@ -342,7 +1106,13 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
{
if (!is_instant()) return;
old_table->rollback_instant(old_n_cols,
- old_cols, old_col_names);
+ old_cols, old_col_names,
+ old_instant,
+ old_fields, old_n_fields,
+ old_n_core_fields,
+ old_n_v_cols, old_v_cols,
+ old_v_col_names,
+ col_map);
}
/** @return whether this is instant ALTER TABLE */
@@ -352,6 +1122,40 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
return instant_table;
}
+ /** Create an index table where indexes are ordered as follows:
+
+ IF a new primary key is defined for the table THEN
+
+ 1) New primary key
+ 2) The remaining keys in key_info
+
+ ELSE
+
+ 1) All new indexes in the order they arrive from MySQL
+
+ ENDIF
+
+ @return key definitions */
+ MY_ATTRIBUTE((nonnull, warn_unused_result, malloc))
+ inline index_def_t*
+ create_key_defs(
+ const Alter_inplace_info* ha_alter_info,
+ /*!< in: alter operation */
+ const TABLE* altered_table,
+ /*!< in: MySQL table that is being altered */
+ ulint& n_fts_add,
+ /*!< out: number of FTS indexes to be created */
+ ulint& fts_doc_id_col,
+ /*!< in: The column number for Doc ID */
+ bool& add_fts_doc_id,
+ /*!< in: whether we need to add new DOC ID
+ column for FTS index */
+ bool& add_fts_doc_idx,
+ /*!< in: whether we need to add new DOC ID
+ index for FTS index */
+ const TABLE* table);
+ /*!< in: MySQL table that is being altered */
+
/** Share context between partitions.
@param[in] ctx context from another partition of the table */
void set_shared_data(const inplace_alter_handler_ctx& ctx)
@@ -646,18 +1450,14 @@ check_v_col_in_order(
& ALTER_ADD_VIRTUAL_COLUMN) {
bool has_new = false;
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
-
- cf_it.rewind();
-
- while (const Create_field* new_field = cf_it++) {
- if (new_field->stored_in_db()) {
+ for (const Create_field& new_field :
+ ha_alter_info->alter_info->create_list) {
+ if (new_field.stored_in_db()) {
continue;
}
/* Found a new added virtual column. */
- if (!new_field->field) {
+ if (!new_field.field) {
has_new = true;
continue;
}
@@ -721,20 +1521,238 @@ check_v_col_in_order(
}
/** Determine if an instant operation is possible for altering columns.
+@param[in] ib_table InnoDB table definition
@param[in] ha_alter_info the ALTER TABLE operation
-@param[in] table table definition before ALTER TABLE */
+@param[in] table table definition before ALTER TABLE
+@param[in] altered_table table definition after ALTER TABLE
+@param[in] strict whether to ensure that user records fit */
static
bool
instant_alter_column_possible(
+ const dict_table_t& ib_table,
const Alter_inplace_info* ha_alter_info,
- const TABLE* table)
+ const TABLE* table,
+ const TABLE* altered_table,
+ bool strict)
{
+ const dict_index_t* const pk = ib_table.indexes.start;
+ ut_ad(pk->is_primary());
+ ut_ad(!pk->has_virtual());
+
+ if (ha_alter_info->handler_flags
+ & (ALTER_STORED_COLUMN_ORDER | ALTER_DROP_STORED_COLUMN
+ | ALTER_ADD_STORED_BASE_COLUMN)) {
+#if 1 // MDEV-17459: adjust fts_fetch_doc_from_rec() and friends; remove this
+ if (ib_table.fts || innobase_fulltext_exist(altered_table))
+ return false;
+#endif
+#if 1 // MDEV-17468: fix bugs with indexed virtual columns & remove this
+ for (const dict_index_t* index = ib_table.indexes.start;
+ index; index = index->indexes.next) {
+ if (index->has_virtual()) {
+ ut_ad(ib_table.n_v_cols
+ || index->is_corrupted());
+ return false;
+ }
+ }
+#endif
+ uint n_add = 0, n_nullable = 0, lenlen = 0;
+ const uint blob_prefix = dict_table_has_atomic_blobs(&ib_table)
+ ? 0
+ : REC_ANTELOPE_MAX_INDEX_COL_LEN;
+ const uint min_local_len = blob_prefix
+ ? blob_prefix + FIELD_REF_SIZE
+ : 2 * FIELD_REF_SIZE;
+ size_t min_size = 0, max_size = 0;
+ Field** af = altered_table->field;
+ Field** const end = altered_table->field
+ + altered_table->s->fields;
+ List_iterator_fast<Create_field> cf_it(
+ ha_alter_info->alter_info->create_list);
+
+ for (; af < end; af++) {
+ const Create_field* cf = cf_it++;
+ if (!(*af)->stored_in_db() || cf->field) {
+ /* Virtual or pre-existing column */
+ continue;
+ }
+ const bool nullable = (*af)->real_maybe_null();
+ const bool is_null = (*af)->is_real_null();
+ ut_ad(!is_null || nullable);
+ n_nullable += nullable;
+ n_add++;
+ uint l;
+ switch ((*af)->type()) {
+ case MYSQL_TYPE_VARCHAR:
+ l = reinterpret_cast<const Field_varstring*>
+ (*af)->get_length();
+ variable_length:
+ if (l >= min_local_len) {
+ max_size += blob_prefix
+ + FIELD_REF_SIZE;
+ if (!is_null) {
+ min_size += blob_prefix
+ + FIELD_REF_SIZE;
+ }
+ lenlen += 2;
+ } else {
+ if (!is_null) {
+ min_size += l;
+ }
+ l = (*af)->pack_length();
+ max_size += l;
+ lenlen += l > 255 ? 2 : 1;
+ }
+ break;
+ case MYSQL_TYPE_GEOMETRY:
+ case MYSQL_TYPE_TINY_BLOB:
+ case MYSQL_TYPE_MEDIUM_BLOB:
+ case MYSQL_TYPE_BLOB:
+ case MYSQL_TYPE_LONG_BLOB:
+ l = reinterpret_cast<const Field_blob*>
+ ((*af))->get_length();
+ goto variable_length;
+ default:
+ l = (*af)->pack_length();
+ if (l > 255 && ib_table.not_redundant()) {
+ goto variable_length;
+ }
+ max_size += l;
+ if (!is_null) {
+ min_size += l;
+ }
+ }
+ }
+
+ ulint n_fields = pk->n_fields + n_add;
+
+ if (n_fields >= REC_MAX_N_USER_FIELDS + DATA_N_SYS_COLS) {
+ return false;
+ }
+
+ if (pk->is_gen_clust()) {
+ min_size += DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN
+ + DATA_ROW_ID_LEN;
+ max_size += DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN
+ + DATA_ROW_ID_LEN;
+ } else {
+ min_size += DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN;
+ max_size += DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN;
+ }
+
+ uint i = pk->n_fields;
+ while (i-- > pk->n_core_fields) {
+ const dict_field_t& f = pk->fields[i];
+ if (f.col->is_nullable()) {
+ n_nullable++;
+ if (!f.col->is_dropped()
+ && f.col->def_val.data) {
+ goto instantly_added_column;
+ }
+ } else if (f.fixed_len
+ && (f.fixed_len <= 255
+ || !ib_table.not_redundant())) {
+ if (ib_table.not_redundant()
+ || !f.col->is_dropped()) {
+ min_size += f.fixed_len;
+ max_size += f.fixed_len;
+ }
+ } else if (f.col->is_dropped() || !f.col->is_added()) {
+ lenlen++;
+ goto set_max_size;
+ } else {
+instantly_added_column:
+ ut_ad(f.col->is_added());
+ if (f.col->def_val.len >= min_local_len) {
+ min_size += blob_prefix
+ + FIELD_REF_SIZE;
+ lenlen += 2;
+ } else {
+ min_size += f.col->def_val.len;
+ lenlen += f.col->def_val.len
+ > 255 ? 2 : 1;
+ }
+set_max_size:
+ if (f.fixed_len
+ && (f.fixed_len <= 255
+ || !ib_table.not_redundant())) {
+ max_size += f.fixed_len;
+ } else if (f.col->len >= min_local_len) {
+ max_size += blob_prefix
+ + FIELD_REF_SIZE;
+ } else {
+ max_size += f.col->len;
+ }
+ }
+ }
+
+ do {
+ const dict_field_t& f = pk->fields[i];
+ if (f.col->is_nullable()) {
+ n_nullable++;
+ } else if (f.fixed_len) {
+ min_size += f.fixed_len;
+ } else {
+ lenlen++;
+ }
+ } while (i--);
+
+ if (ib_table.instant
+ || (ha_alter_info->handler_flags
+ & (ALTER_STORED_COLUMN_ORDER
+ | ALTER_DROP_STORED_COLUMN))) {
+ n_fields++;
+ lenlen += 2;
+ min_size += FIELD_REF_SIZE;
+ }
+
+ if (ib_table.not_redundant()) {
+ min_size += REC_N_NEW_EXTRA_BYTES
+ + UT_BITS_IN_BYTES(n_nullable)
+ + lenlen;
+ } else {
+ min_size += (n_fields > 255 || min_size > 255)
+ ? n_fields * 2 : n_fields;
+ min_size += REC_N_OLD_EXTRA_BYTES;
+ }
+
+ if (page_zip_rec_needs_ext(min_size, ib_table.not_redundant(),
+ 0, 0)) {
+ return false;
+ }
+
+ if (strict && page_zip_rec_needs_ext(max_size,
+ ib_table.not_redundant(),
+ 0, 0)) {
+ return false;
+ }
+ }
// Making table system-versioned instantly is not implemented yet.
if (ha_alter_info->handler_flags & ALTER_ADD_SYSTEM_VERSIONING) {
return false;
}
- if (~ha_alter_info->handler_flags & ALTER_ADD_STORED_BASE_COLUMN) {
+ static constexpr alter_table_operations avoid_rebuild
+ = ALTER_ADD_STORED_BASE_COLUMN
+ | ALTER_DROP_STORED_COLUMN
+ | ALTER_STORED_COLUMN_ORDER
+ | ALTER_COLUMN_NULLABLE;
+
+ if (!(ha_alter_info->handler_flags & avoid_rebuild)) {
+ alter_table_operations flags = ha_alter_info->handler_flags
+ & ~avoid_rebuild;
+ /* None of the flags are set that we can handle
+ specially to avoid rebuild. In this case, we can
+ allow ALGORITHM=INSTANT, except if some requested
+ operation requires that the table be rebuilt. */
+ if (flags & INNOBASE_ALTER_REBUILD) {
+ return false;
+ }
+ if ((flags & ALTER_OPTIONS)
+ && alter_options_need_rebuild(ha_alter_info, table)) {
+ return false;
+ }
+ } else if (!ib_table.supports_instant()) {
return false;
}
@@ -757,12 +1775,64 @@ instant_alter_column_possible(
columns. */
if (ha_alter_info->handler_flags
& ((INNOBASE_ALTER_REBUILD | INNOBASE_ONLINE_CREATE)
- & ~ALTER_ADD_STORED_BASE_COLUMN & ~ALTER_OPTIONS)) {
+ & ~ALTER_DROP_STORED_COLUMN
+ & ~ALTER_STORED_COLUMN_ORDER
+ & ~ALTER_ADD_STORED_BASE_COLUMN
+ & ~ALTER_COLUMN_NULLABLE
+ & ~ALTER_OPTIONS)) {
return false;
}
- return !(ha_alter_info->handler_flags & ALTER_OPTIONS)
- || !alter_options_need_rebuild(ha_alter_info, table);
+ if ((ha_alter_info->handler_flags & ALTER_OPTIONS)
+ && alter_options_need_rebuild(ha_alter_info, table)) {
+ return false;
+ }
+
+ if (ha_alter_info->handler_flags & ALTER_COLUMN_NULLABLE) {
+ if (ib_table.not_redundant()) {
+ /* Instantaneous removal of NOT NULL is
+ only supported for ROW_FORMAT=REDUNDANT. */
+ return false;
+ }
+ if (ib_table.fts_doc_id_index
+ && !innobase_fulltext_exist(altered_table)) {
+ /* Removing hidden FTS_DOC_ID_INDEX(FTS_DOC_ID)
+ requires that the table be rebuilt. */
+ return false;
+ }
+
+ Field** af = altered_table->field;
+ Field** const end = altered_table->field
+ + altered_table->s->fields;
+ List_iterator_fast<Create_field> cf_it(
+ ha_alter_info->alter_info->create_list);
+ for (unsigned c = 0; af < end; af++) {
+ const Create_field* cf = cf_it++;
+ if (!cf->field || !(*af)->stored_in_db()) {
+ /* Ignore virtual or newly created
+ column */
+ continue;
+ }
+
+ const dict_col_t* col = dict_table_get_nth_col(
+ &ib_table, c++);
+
+ if (!col->ord_part || col->is_nullable()
+ || !(*af)->real_maybe_null()) {
+ continue;
+ }
+
+ /* The column would be changed from NOT NULL.
+ Ensure that it is not a clustered index key. */
+ for (auto i = pk->n_uniq; i--; ) {
+ if (pk->fields[i].col == col) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
}
/** Check whether the non-const default value for the field
@@ -893,10 +1963,15 @@ innobase_fts_check_doc_id_col(
}
/** Check whether the table is empty.
-@param[in] table table to be checked
+@param[in] table table to be checked
+@param[in] ignore_delete_marked Ignore the delete marked
+ flag record
@return true if table is empty */
-static bool innobase_table_is_empty(const dict_table_t *table)
+static bool innobase_table_is_empty(const dict_table_t *table,
+ bool ignore_delete_marked=true)
{
+ if (!table->space)
+ return false;
dict_index_t *clust_index= dict_table_get_first_index(table);
mtr_t mtr;
btr_pcur_t pcur;
@@ -909,7 +1984,7 @@ static bool innobase_table_is_empty(const dict_table_t *table)
btr_pcur_open_at_index_side(true, clust_index, BTR_SEARCH_LEAF,
&pcur, true, 0, &mtr);
btr_pcur_move_to_next_user_rec(&pcur, &mtr);
- if (!rec_is_metadata(btr_pcur_get_rec(&pcur), clust_index))
+ if (!rec_is_metadata(btr_pcur_get_rec(&pcur), *clust_index))
btr_pcur_move_to_prev_on_page(&pcur);
scan_leaf:
cur= btr_pcur_get_page_cur(&pcur);
@@ -927,7 +2002,7 @@ next_page:
next_page= false;
block= page_cur_get_block(cur);
block= btr_block_get(page_id_t(block->page.id.space(), next_page_no),
- block->page.size, BTR_SEARCH_LEAF, clust_index,
+ block->page.zip_size(), BTR_SEARCH_LEAF, clust_index,
&mtr);
btr_leaf_page_release(page_cur_get_block(cur), BTR_SEARCH_LEAF, &mtr);
page_cur_set_before_first(block, cur);
@@ -935,12 +2010,16 @@ next_page:
}
rec= page_cur_get_rec(cur);
- if (rec_get_deleted_flag(rec, dict_table_is_comp(table)));
- else if (!page_rec_is_supremum(rec))
+ if (rec_get_deleted_flag(rec, dict_table_is_comp(table)))
{
+ if (ignore_delete_marked)
+ goto scan_leaf;
+non_empty:
mtr.commit();
return false;
}
+ else if (!page_rec_is_supremum(rec))
+ goto non_empty;
else
{
next_page= true;
@@ -1042,10 +2121,13 @@ ha_innobase::check_if_supported_inplace_alter(
switch (innodb_instant_alter_column_allowed) {
case 0: /* never */
if ((ha_alter_info->handler_flags
- & ALTER_ADD_STORED_BASE_COLUMN)
+ & (ALTER_ADD_STORED_BASE_COLUMN
+ | ALTER_STORED_COLUMN_ORDER
+ | ALTER_DROP_STORED_COLUMN))
|| m_prebuilt->table->is_instant()) {
reason_rebuild =
"innodb_instant_alter_column_allowed=never";
+innodb_instant_alter_column_allowed_reason:
if (ha_alter_info->handler_flags
& ALTER_RECREATE_TABLE) {
reason_rebuild = NULL;
@@ -1057,6 +2139,14 @@ ha_innobase::check_if_supported_inplace_alter(
}
}
break;
+ case 1: /* add_last */
+ if ((ha_alter_info->handler_flags
+ & (ALTER_STORED_COLUMN_ORDER | ALTER_DROP_STORED_COLUMN))
+ || m_prebuilt->table->instant) {
+ reason_rebuild = "innodb_instant_atler_column_allowed="
+ "add_last";
+ goto innodb_instant_alter_column_allowed_reason;
+ }
}
switch (ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE) {
@@ -1169,55 +2259,16 @@ ha_innobase::check_if_supported_inplace_alter(
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
}
- bool add_drop_v_cols = false;
-
- /* If there is add or drop virtual columns, we will support operations
- with these 2 options alone with inplace interface for now */
-
- if (ha_alter_info->handler_flags
- & (ALTER_ADD_VIRTUAL_COLUMN
- | ALTER_DROP_VIRTUAL_COLUMN
- | ALTER_VIRTUAL_COLUMN_ORDER)) {
- ulonglong flags = ha_alter_info->handler_flags;
-
- /* TODO: uncomment the flags below, once we start to
- support them */
-
- flags &= ~(ALTER_ADD_VIRTUAL_COLUMN
- | ALTER_DROP_VIRTUAL_COLUMN
- | ALTER_VIRTUAL_COLUMN_ORDER
- | ALTER_VIRTUAL_GCOL_EXPR
- | ALTER_COLUMN_VCOL
- /*
- | ALTER_ADD_STORED_BASE_COLUMN
- | ALTER_DROP_STORED_COLUMN
- | ALTER_STORED_COLUMN_ORDER
- | ALTER_ADD_UNIQUE_INDEX
- */
- | ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX
- | ALTER_DROP_NON_UNIQUE_NON_PRIM_INDEX);
-
- if (flags != 0
- || IF_PARTITIONING((altered_table->s->partition_info_str
- && altered_table->s->partition_info_str_len), 0)
- || (!check_v_col_in_order(
- this->table, altered_table, ha_alter_info))) {
- ha_alter_info->unsupported_reason =
- MSG_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN;
- DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
- }
-
- add_drop_v_cols = true;
- }
+ const bool add_drop_v_cols = !!(ha_alter_info->handler_flags
+ & (ALTER_ADD_VIRTUAL_COLUMN
+ | ALTER_DROP_VIRTUAL_COLUMN
+ | ALTER_VIRTUAL_COLUMN_ORDER));
/* We should be able to do the operation in-place.
See if we can do it online (LOCK=NONE) or without rebuild. */
bool online = true, need_rebuild = false;
const uint fulltext_indexes = innobase_fulltext_exist(altered_table);
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
-
/* Fix the key parts. */
for (KEY* new_key = ha_alter_info->key_info_buffer;
new_key < ha_alter_info->key_info_buffer
@@ -1238,18 +2289,12 @@ ha_innobase::check_if_supported_inplace_alter(
key_part < (new_key->key_part
+ new_key->user_defined_key_parts);
key_part++) {
- const Create_field* new_field;
-
DBUG_ASSERT(key_part->fieldnr
< altered_table->s->fields);
- cf_it.rewind();
- for (uint fieldnr = 0; (new_field = cf_it++);
- fieldnr++) {
- if (fieldnr == key_part->fieldnr) {
- break;
- }
- }
+ const Create_field* new_field
+ = ha_alter_info->alter_info->create_list.elem(
+ key_part->fieldnr);
DBUG_ASSERT(new_field);
@@ -1265,7 +2310,16 @@ ha_innobase::check_if_supported_inplace_alter(
if (new_field->field) {
/* This is an existing column. */
- continue;
+
+ if (new_field->field->charset()
+ == key_part->field->charset()) {
+ continue;
+ }
+
+ ha_alter_info->unsupported_reason =
+ "Collation change on"
+ " an indexed column";
+ DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
}
/* This is an added column. */
@@ -1376,17 +2430,24 @@ ha_innobase::check_if_supported_inplace_alter(
DEFAULT value, ensure that the DEFAULT expression is a constant.
Also, in ADD COLUMN, for now we only support a
constant DEFAULT expression. */
- cf_it.rewind();
Field **af = altered_table->field;
- bool add_column_not_last = false;
- uint n_stored_cols = 0, n_add_cols = 0;
+ bool fts_need_rebuild = false;
+ need_rebuild = need_rebuild
+ || innobase_need_rebuild(ha_alter_info, table);
- while (Create_field* cf = cf_it++) {
- DBUG_ASSERT(cf->field
+ for (Create_field& cf : ha_alter_info->alter_info->create_list) {
+ DBUG_ASSERT(cf.field
|| (ha_alter_info->handler_flags
& ALTER_ADD_COLUMN));
- if (const Field* f = cf->field) {
+ if (const Field* f = cf.field) {
+ /* An AUTO_INCREMENT attribute can only
+ be added to an existing column by ALGORITHM=COPY,
+ but we can remove the attribute. */
+ ut_ad((MTYP_TYPENR((*af)->unireg_check)
+ != Field::NEXT_NUMBER)
+ || (MTYP_TYPENR(f->unireg_check)
+ == Field::NEXT_NUMBER));
if (!f->real_maybe_null() || (*af)->real_maybe_null())
goto next_column;
/* We are changing an existing column
@@ -1395,7 +2456,6 @@ ha_innobase::check_if_supported_inplace_alter(
& ALTER_COLUMN_NOT_NULLABLE);
/* Virtual columns are never NOT NULL. */
DBUG_ASSERT(f->stored_in_db());
-
switch ((*af)->type()) {
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_TIMESTAMP2:
@@ -1415,56 +2475,80 @@ ha_innobase::check_if_supported_inplace_alter(
break;
default:
/* For any other data type, NULL
- values are not converted.
- (An AUTO_INCREMENT attribute cannot
- be introduced to a column with
- ALGORITHM=INPLACE.) */
- ut_ad((MTYP_TYPENR((*af)->unireg_check)
- == Field::NEXT_NUMBER)
- == (MTYP_TYPENR(f->unireg_check)
- == Field::NEXT_NUMBER));
+ values are not converted. */
goto next_column;
}
ha_alter_info->unsupported_reason = my_get_err_msg(
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL);
- } else if (!is_non_const_value(*af)) {
-
- n_add_cols++;
-
- if (af < &altered_table->field[table_share->fields]) {
- add_column_not_last = true;
- }
-
- if (set_default_value(*af)) {
- goto next_column;
+ } else if (!is_non_const_value(*af)
+ && set_default_value(*af)) {
+ if (fulltext_indexes > 1
+ && !my_strcasecmp(system_charset_info,
+ (*af)->field_name.str,
+ FTS_DOC_ID_COL_NAME)) {
+ /* If a hidden FTS_DOC_ID column exists
+ (because of FULLTEXT INDEX), it cannot
+ be replaced with a user-created one
+ except when using ALGORITHM=COPY. */
+ ha_alter_info->unsupported_reason =
+ my_get_err_msg(ER_INNODB_FT_LIMIT);
+ DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
}
+ goto next_column;
}
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
next_column:
- n_stored_cols += (*af++)->stored_in_db();
+ af++;
}
- if (!add_column_not_last
- && uint(m_prebuilt->table->n_cols) - DATA_N_SYS_COLS + n_add_cols
- == n_stored_cols
- && m_prebuilt->table->supports_instant()
- && instant_alter_column_possible(ha_alter_info, table)) {
+ const bool supports_instant = instant_alter_column_possible(
+ *m_prebuilt->table, ha_alter_info, table, altered_table,
+ is_innodb_strict_mode());
+ if (add_drop_v_cols) {
+ ulonglong flags = ha_alter_info->handler_flags;
- DBUG_RETURN(HA_ALTER_INPLACE_INSTANT);
+ /* TODO: uncomment the flags below, once we start to
+ support them */
+
+ flags &= ~(ALTER_ADD_VIRTUAL_COLUMN
+ | ALTER_DROP_VIRTUAL_COLUMN
+ | ALTER_VIRTUAL_COLUMN_ORDER
+ | ALTER_VIRTUAL_GCOL_EXPR
+ | ALTER_COLUMN_VCOL
+ /*
+ | ALTER_ADD_STORED_BASE_COLUMN
+ | ALTER_DROP_STORED_COLUMN
+ | ALTER_STORED_COLUMN_ORDER
+ | ALTER_ADD_UNIQUE_INDEX
+ */
+ | ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX
+ | ALTER_DROP_NON_UNIQUE_NON_PRIM_INDEX);
+ if (supports_instant) {
+ flags &= ~(ALTER_DROP_STORED_COLUMN
+#if 0 /* MDEV-17468: remove check_v_col_in_order() and fix the code */
+ | ALTER_ADD_STORED_BASE_COLUMN
+#endif
+ | ALTER_STORED_COLUMN_ORDER);
+ }
+ if (flags != 0
+ || IF_PARTITIONING((altered_table->s->partition_info_str
+ && altered_table->s->partition_info_str_len), 0)
+ || (!check_v_col_in_order(
+ this->table, altered_table, ha_alter_info))) {
+ ha_alter_info->unsupported_reason =
+ MSG_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN;
+ DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
+ }
}
- if (!(ha_alter_info->handler_flags & ~(INNOBASE_ALTER_INSTANT
- | INNOBASE_INPLACE_IGNORE))) {
+ if (supports_instant && !(ha_alter_info->handler_flags
+ & INNOBASE_ALTER_NOREBUILD)) {
DBUG_RETURN(HA_ALTER_INPLACE_INSTANT);
}
- bool fts_need_rebuild = false;
- need_rebuild = need_rebuild
- || innobase_need_rebuild(ha_alter_info, table);
-
if (need_rebuild
&& (fulltext_indexes
|| innobase_spatial_exist(altered_table)
@@ -1571,7 +2655,7 @@ cannot_create_many_fulltext_index:
online = false;
}
- if (need_rebuild || fts_need_rebuild) {
+ if ((need_rebuild && !supports_instant) || fts_need_rebuild) {
ha_alter_info->handler_flags |= ALTER_RECREATE_TABLE;
DBUG_RETURN(online
? HA_ALTER_INPLACE_COPY_NO_LOCK
@@ -1615,7 +2699,7 @@ innobase_init_foreign(
ulint referenced_num_field) /*!< in: number of referenced
columns */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
if (constraint_name) {
ulint db_len;
@@ -1949,8 +3033,6 @@ innobase_get_foreign_key_info(
const trx_t* trx,
dict_s_col_list*s_cols)
{
- Key* key;
- Foreign_key* fk_key;
dict_table_t* referenced_table = NULL;
char* referenced_table_name = NULL;
ulint num_fk = 0;
@@ -1960,10 +3042,8 @@ innobase_get_foreign_key_info(
*n_add_fk = 0;
- List_iterator<Key> key_iterator(alter_info->key_list);
-
- while ((key=key_iterator++)) {
- if (key->type != Key::FOREIGN_KEY) {
+ for (Key& key : alter_info->key_list) {
+ if (key.type != Key::FOREIGN_KEY) {
continue;
}
@@ -1981,18 +3061,15 @@ innobase_get_foreign_key_info(
char db_name[MAX_DATABASE_NAME_LEN];
char tbl_name[MAX_TABLE_NAME_LEN];
- fk_key = static_cast<Foreign_key*>(key);
+ Foreign_key* fk_key = static_cast<Foreign_key*>(&key);
if (fk_key->columns.elements > 0) {
ulint i = 0;
- Key_part_spec* column;
- List_iterator<Key_part_spec> key_part_iterator(
- fk_key->columns);
/* Get all the foreign key column info for the
current table */
- while ((column = key_part_iterator++)) {
- column_names[i] = column->field_name.str;
+ for (const Key_part_spec& column : fk_key->columns) {
+ column_names[i] = column.field_name.str;
ut_ad(i < MAX_NUM_FK_COLUMNS);
i++;
}
@@ -2059,7 +3136,7 @@ innobase_get_foreign_key_info(
db_namep = &db_name[0];
}
#endif
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
referenced_table_name = dict_get_referenced_table(
table->name.m_name,
@@ -2077,7 +3154,7 @@ innobase_get_foreign_key_info(
referenced_table = NULL;);
if (!referenced_table && trx->check_foreigns) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
my_error(ER_FK_CANNOT_OPEN_PARENT,
MYF(0), tbl_namep);
@@ -2086,13 +3163,10 @@ innobase_get_foreign_key_info(
if (fk_key->ref_columns.elements > 0) {
ulint i = 0;
- Key_part_spec* column;
- List_iterator<Key_part_spec> key_part_iterator(
- fk_key->ref_columns);
- while ((column = key_part_iterator++)) {
+ for (Key_part_spec &column : fk_key->ref_columns) {
referenced_column_names[i] =
- column->field_name.str;
+ column.field_name.str;
ut_ad(i < MAX_NUM_FK_COLUMNS);
i++;
}
@@ -2113,7 +3187,7 @@ innobase_get_foreign_key_info(
/* Check whether there exist such
index in the the index create clause */
if (!referenced_index) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
my_error(ER_FK_NO_INDEX_PARENT, MYF(0),
fk_key->name.str
? fk_key->name.str : "",
@@ -2128,7 +3202,7 @@ innobase_get_foreign_key_info(
} else {
/* Not possible to add a foreign key without a
referenced column */
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
my_error(ER_CANNOT_ADD_FOREIGN, MYF(0), tbl_namep);
goto err_exit;
}
@@ -2139,7 +3213,7 @@ innobase_get_foreign_key_info(
num_col, referenced_table_name,
referenced_table, referenced_index,
referenced_column_names, referenced_num_col)) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
my_error(
ER_DUP_CONSTRAINT_NAME,
MYF(0),
@@ -2147,7 +3221,7 @@ innobase_get_foreign_key_info(
goto err_exit;
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
correct_option = innobase_set_foreign_key_option(
add_fk[num_fk], fk_key);
@@ -2427,9 +3501,9 @@ innobase_row_to_mysql(
}
}
if (table->vfield) {
- MY_BITMAP *old_vcol_set = tmp_use_all_columns(table, &table->vcol_set);
+ MY_BITMAP* old_read_set = tmp_use_all_columns(table, &table->read_set);
table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_READ);
- tmp_restore_column_map(&table->vcol_set, old_vcol_set);
+ tmp_restore_column_map(&table->read_set, old_read_set);
}
}
@@ -2504,7 +3578,6 @@ innobase_check_index_keys(
}
}
-
my_error(ER_WRONG_NAME_FOR_INDEX, MYF(0),
key.name.str);
return(ER_WRONG_NAME_FOR_INDEX);
@@ -2859,8 +3932,7 @@ innobase_fts_check_doc_id_index_in_def(
return(FTS_NOT_EXIST_DOC_ID_INDEX);
}
-/*******************************************************************//**
-Create an index table where indexes are ordered as follows:
+/** Create an index table where indexes are ordered as follows:
IF a new primary key is defined for the table THEN
@@ -2874,23 +3946,15 @@ ELSE
ENDIF
@return key definitions */
-static MY_ATTRIBUTE((nonnull, warn_unused_result, malloc))
-index_def_t*
-innobase_create_key_defs(
-/*=====================*/
- mem_heap_t* heap,
- /*!< in/out: memory heap where space for key
- definitions are allocated */
+MY_ATTRIBUTE((nonnull, warn_unused_result, malloc))
+inline index_def_t*
+ha_innobase_inplace_ctx::create_key_defs(
const Alter_inplace_info* ha_alter_info,
/*!< in: alter operation */
const TABLE* altered_table,
/*!< in: MySQL table that is being altered */
- ulint& n_add,
- /*!< in/out: number of indexes to be created */
ulint& n_fts_add,
/*!< out: number of FTS indexes to be created */
- bool got_default_clust,
- /*!< in: whether the table lacks a primary key */
ulint& fts_doc_id_col,
/*!< in: The column number for Doc ID */
bool& add_fts_doc_id,
@@ -2902,6 +3966,9 @@ innobase_create_key_defs(
const TABLE* table)
/*!< in: MySQL table that is being altered */
{
+ ulint& n_add = num_to_add_index;
+ const bool got_default_clust = new_table->indexes.start->is_gen_clust();
+
index_def_t* indexdef;
index_def_t* indexdefs;
bool new_primary;
@@ -2910,7 +3977,7 @@ innobase_create_key_defs(
const KEY*const key_info
= ha_alter_info->key_info_buffer;
- DBUG_ENTER("innobase_create_key_defs");
+ DBUG_ENTER("ha_innobase_inplace_ctx::create_key_defs");
DBUG_ASSERT(!add_fts_doc_id || add_fts_doc_idx);
DBUG_ASSERT(ha_alter_info->index_add_count == n_add);
@@ -3093,7 +4160,7 @@ online_retry_drop_indexes_low(
dict_table_t* table, /*!< in/out: table */
trx_t* trx) /*!< in/out: transaction */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
@@ -3130,9 +4197,9 @@ online_retry_drop_indexes(
trx->free();
}
- ut_d(mutex_enter(&dict_sys->mutex));
+ ut_d(mutex_enter(&dict_sys.mutex));
ut_d(dict_table_check_for_dup_indexes(table, CHECK_ALL_COMPLETE));
- ut_d(mutex_exit(&dict_sys->mutex));
+ ut_d(mutex_exit(&dict_sys.mutex));
ut_ad(!table->drop_aborted);
}
@@ -3207,7 +4274,7 @@ innobase_check_foreigns_low(
bool drop)
{
dict_foreign_t* foreign;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* Check if any FOREIGN KEY constraints are defined on this
column. */
@@ -3306,26 +4373,21 @@ innobase_check_foreigns(
dict_foreign_t** drop_fk,
ulint n_drop_fk)
{
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
-
for (Field** fp = old_table->field; *fp; fp++) {
- cf_it.rewind();
- const Create_field* new_field;
-
ut_ad(!(*fp)->real_maybe_null()
== !!((*fp)->flags & NOT_NULL_FLAG));
- while ((new_field = cf_it++)) {
- if (new_field->field == *fp) {
- break;
- }
- }
+ auto end = ha_alter_info->alter_info->create_list.end();
+ auto it = std::find_if(
+ ha_alter_info->alter_info->create_list.begin(), end,
+ [fp](const Create_field& field) {
+ return field.field == *fp;
+ });
- if (!new_field || (new_field->flags & NOT_NULL_FLAG)) {
+ if (it == end || (it->flags & NOT_NULL_FLAG)) {
if (innobase_check_foreigns_low(
user_table, drop_fk, n_drop_fk,
- (*fp)->field_name.str, !new_field)) {
+ (*fp)->field_name.str, it == end)) {
return(true);
}
}
@@ -3338,7 +4400,7 @@ innobase_check_foreigns(
@param[in,out] heap Memory heap where allocated
@param[out] dfield InnoDB data field to copy to
@param[in] field MySQL value for the column
-@param[in] old_field Old field or NULL if new col is added
+@param[in] old_field Old column if altering; NULL for ADD COLUMN
@param[in] comp nonzero if in compact format. */
static void innobase_build_col_map_add(
mem_heap_t* heap,
@@ -3357,14 +4419,13 @@ static void innobase_build_col_map_add(
return;
}
- ulint size = field->pack_length();
+ const Field& from = old_field ? *old_field : *field;
+ ulint size = from.pack_length();
byte* buf = static_cast<byte*>(mem_heap_alloc(heap, size));
- const byte* mysql_data = old_field ? old_field->ptr : field->ptr;
-
row_mysql_store_col_in_innobase_format(
- dfield, buf, true, mysql_data, size, comp);
+ dfield, buf, true, from.ptr, size, comp);
}
/** Construct the translation table for reordering, dropping or
@@ -3386,7 +4447,7 @@ innobase_build_col_map(
Alter_inplace_info* ha_alter_info,
const TABLE* altered_table,
const TABLE* table,
- const dict_table_t* new_table,
+ dict_table_t* new_table,
const dict_table_t* old_table,
dtuple_t* defaults,
mem_heap_t* heap)
@@ -3417,8 +4478,6 @@ innobase_build_col_map(
heap, (size_t(old_table->n_cols) + old_n_v_cols)
* sizeof *col_map));
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
uint i = 0;
uint num_v = 0;
@@ -3434,14 +4493,15 @@ innobase_build_col_map(
const bool omits_virtual = ha_innobase::omits_virtual_cols(*table->s);
- while (const Create_field* new_field = cf_it++) {
- bool is_v = !new_field->stored_in_db();
+ for (const Create_field& new_field :
+ ha_alter_info->alter_info->create_list) {
+ bool is_v = !new_field.stored_in_db();
ulint num_old_v = 0;
for (uint old_i = 0; table->field[old_i]; old_i++) {
const Field* field = table->field[old_i];
if (!field->stored_in_db()) {
- if (is_v && new_field->field == field) {
+ if (is_v && new_field.field == field) {
if (!omits_virtual) {
col_map[old_table->n_cols
+ num_v]
@@ -3454,7 +4514,7 @@ innobase_build_col_map(
continue;
}
- if (new_field->field == field) {
+ if (new_field.field == field) {
const Field* altered_field =
altered_table->field[i + num_v];
@@ -3471,16 +4531,25 @@ innobase_build_col_map(
}
col_map[old_i - num_old_v] = i;
+ if (old_table->versioned()
+ && altered_table->versioned()) {
+ if (old_i == old_table->vers_start) {
+ new_table->vers_start = i + num_v;
+ } else if (old_i == old_table->vers_end) {
+ new_table->vers_end = i + num_v;
+ }
+ }
goto found_col;
}
}
- ut_ad(!is_v);
- innobase_build_col_map_add(
- heap, dtuple_get_nth_field(defaults, i),
- altered_table->field[i + num_v],
- NULL,
- dict_table_is_comp(new_table));
+ if (!is_v) {
+ innobase_build_col_map_add(
+ heap, dtuple_get_nth_field(defaults, i),
+ altered_table->field[i + num_v],
+ NULL,
+ dict_table_is_comp(new_table));
+ }
found_col:
if (is_v) {
num_v++;
@@ -3597,21 +4666,20 @@ innobase_get_col_names(
mem_heap_zalloc(heap, user_table->n_def * sizeof *cols));
i = 0;
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
- while (const Create_field* new_field = cf_it++) {
+ for (const Create_field& new_field :
+ ha_alter_info->alter_info->create_list) {
ulint num_v = 0;
DBUG_ASSERT(i < altered_table->s->fields);
- if (!new_field->stored_in_db()) {
+ if (!new_field.stored_in_db()) {
continue;
}
for (uint old_i = 0; table->field[old_i]; old_i++) {
num_v += !table->field[old_i]->stored_in_db();
- if (new_field->field == table->field[old_i]) {
- cols[old_i - num_v] = new_field->field_name.str;
+ if (new_field.field == table->field[old_i]) {
+ cols[old_i - num_v] = new_field.field_name.str;
break;
}
}
@@ -3836,8 +4904,7 @@ innobase_update_gis_column_type(
DBUG_ASSERT(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
info = pars_info_create();
@@ -3949,62 +5016,35 @@ prepare_inplace_add_virtual(
{
ha_innobase_inplace_ctx* ctx;
ulint i = 0;
- ulint j = 0;
- const Create_field* new_field;
ctx = static_cast<ha_innobase_inplace_ctx*>
(ha_alter_info->handler_ctx);
- ctx->num_to_add_vcol = altered_table->s->fields
- + ctx->num_to_drop_vcol - table->s->fields;
+ ulint j = altered_table->s->virtual_fields + ctx->num_to_drop_vcol;
ctx->add_vcol = static_cast<dict_v_col_t*>(
- mem_heap_zalloc(ctx->heap, ctx->num_to_add_vcol
- * sizeof *ctx->add_vcol));
+ mem_heap_zalloc(ctx->heap, j * sizeof *ctx->add_vcol));
ctx->add_vcol_name = static_cast<const char**>(
- mem_heap_alloc(ctx->heap, ctx->num_to_add_vcol
- * sizeof *ctx->add_vcol_name));
-
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
+ mem_heap_alloc(ctx->heap, j * sizeof *ctx->add_vcol_name));
- while ((new_field = (cf_it++)) != NULL) {
- const Field* field = new_field->field;
- ulint old_i;
-
- for (old_i = 0; table->field[old_i]; old_i++) {
- const Field* n_field = table->field[old_i];
- if (field == n_field) {
- break;
- }
- }
+ j = 0;
- i++;
+ for (const Create_field& new_field :
+ ha_alter_info->alter_info->create_list) {
+ const Field* field = altered_table->field[i++];
- if (table->field[old_i]) {
+ if (new_field.field || field->stored_in_db()) {
continue;
}
- ut_ad(!field);
-
- ulint col_len;
ulint is_unsigned;
- ulint field_type;
ulint charset_no;
-
- field = altered_table->field[i - 1];
-
ulint col_type
= get_innobase_type_from_mysql_type(
&is_unsigned, field);
-
- if (field->stored_in_db()) {
- continue;
- }
-
- col_len = field->pack_length();
- field_type = (ulint) field->type();
+ ulint col_len = field->pack_length();
+ ulint field_type = (ulint) field->type();
if (!field->real_maybe_null()) {
field_type |= DATA_NOT_NULL;
@@ -4046,7 +5086,7 @@ prepare_inplace_add_virtual(
}
}
-
+ new (&ctx->add_vcol[j]) dict_v_col_t();
ctx->add_vcol[j].m_col.prtype = dtype_form_prtype(
field_type, charset_no);
@@ -4063,12 +5103,12 @@ prepare_inplace_add_virtual(
ctx->add_vcol[j].v_pos = ctx->old_table->n_v_cols
- ctx->num_to_drop_vcol + j;
- /* No need to track the list */
- ctx->add_vcol[j].v_indexes = NULL;
+ /* MDEV-17468: Do this on ctx->instant_table later */
innodb_base_col_setup(ctx->old_table, field, &ctx->add_vcol[j]);
j++;
}
+ ctx->num_to_add_vcol = j;
return(false);
}
@@ -4191,33 +5231,96 @@ prepare_inplace_drop_virtual(
@param[in] pos virtual column column no
@param[in] base_pos base column pos
@param[in] trx transaction
-@return DB_SUCCESS if successful, otherwise error code */
-static
-dberr_t
-innobase_insert_sys_virtual(
+@retval false on success
+@retval true on failure (my_error() will have been called) */
+static bool innobase_insert_sys_virtual(
const dict_table_t* table,
ulint pos,
ulint base_pos,
trx_t* trx)
{
pars_info_t* info = pars_info_create();
-
pars_info_add_ull_literal(info, "id", table->id);
+ pars_info_add_int4_literal(info, "pos", pos);
+ pars_info_add_int4_literal(info, "base_pos", base_pos);
+
+ if (DB_SUCCESS != que_eval_sql(
+ info,
+ "PROCEDURE P () IS\n"
+ "BEGIN\n"
+ "INSERT INTO SYS_VIRTUAL VALUES (:id, :pos, :base_pos);\n"
+ "END;\n",
+ FALSE, trx)) {
+ my_error(ER_INTERNAL_ERROR, MYF(0),
+ "InnoDB: ADD COLUMN...VIRTUAL");
+ return true;
+ }
+ return false;
+}
+
+/** Insert a record to the SYS_COLUMNS dictionary table.
+@param[in] table_id table id
+@param[in] pos position of the column
+@param[in] field_name field name
+@param[in] mtype main type
+@param[in] prtype precise type
+@param[in] len fixed length in bytes, or 0
+@param[in] n_base number of base columns of virtual columns, or 0
+@param[in] update whether to update instead of inserting
+@retval false on success
+@retval true on failure (my_error() will have been called) */
+static bool innodb_insert_sys_columns(
+ table_id_t table_id,
+ ulint pos,
+ const char* field_name,
+ ulint mtype,
+ ulint prtype,
+ ulint len,
+ ulint n_base,
+ trx_t* trx,
+ bool update = false)
+{
+ pars_info_t* info = pars_info_create();
+ pars_info_add_ull_literal(info, "id", table_id);
pars_info_add_int4_literal(info, "pos", pos);
+ pars_info_add_str_literal(info, "name", field_name);
+ pars_info_add_int4_literal(info, "mtype", mtype);
+ pars_info_add_int4_literal(info, "prtype", prtype);
+ pars_info_add_int4_literal(info, "len", len);
+ pars_info_add_int4_literal(info, "base", n_base);
+
+ if (update) {
+ if (DB_SUCCESS != que_eval_sql(
+ info,
+ "PROCEDURE UPD_COL () IS\n"
+ "BEGIN\n"
+ "UPDATE SYS_COLUMNS SET\n"
+ "NAME=:name, MTYPE=:mtype, PRTYPE=:prtype, "
+ "LEN=:len, PREC=:base\n"
+ "WHERE TABLE_ID=:id AND POS=:pos;\n"
+ "END;\n", FALSE, trx)) {
+ my_error(ER_INTERNAL_ERROR, MYF(0),
+ "InnoDB: Updating SYS_COLUMNS failed");
+ return true;
+ }
- pars_info_add_int4_literal(info, "base_pos", base_pos);
+ return false;
+ }
- dberr_t error = que_eval_sql(
- info,
- "PROCEDURE P () IS\n"
- "BEGIN\n"
- "INSERT INTO SYS_VIRTUAL VALUES"
- "(:id, :pos, :base_pos);\n"
- "END;\n",
- FALSE, trx);
+ if (DB_SUCCESS != que_eval_sql(
+ info,
+ "PROCEDURE ADD_COL () IS\n"
+ "BEGIN\n"
+ "INSERT INTO SYS_COLUMNS VALUES"
+ "(:id,:pos,:name,:mtype,:prtype,:len,:base);\n"
+ "END;\n", FALSE, trx)) {
+ my_error(ER_INTERNAL_ERROR, MYF(0),
+ "InnoDB: Insert into SYS_COLUMNS failed");
+ return true;
+ }
- return(error);
+ return false;
}
/** Update INNODB SYS_COLUMNS on new virtual columns
@@ -4225,10 +5328,9 @@ innobase_insert_sys_virtual(
@param[in] col_name column name
@param[in] vcol virtual column
@param[in] trx transaction
-@return DB_SUCCESS if successful, otherwise error code */
-static
-dberr_t
-innobase_add_one_virtual(
+@retval false on success
+@retval true on failure (my_error() will have been called) */
+static bool innobase_add_one_virtual(
const dict_table_t* table,
const char* col_name,
dict_v_col_t* vcol,
@@ -4236,67 +5338,41 @@ innobase_add_one_virtual(
{
ulint pos = dict_create_v_col_pos(vcol->v_pos,
vcol->m_col.ind);
- ulint mtype = vcol->m_col.mtype;
- ulint prtype = vcol->m_col.prtype;
- ulint len = vcol->m_col.len;
- pars_info_t* info = pars_info_create();
- pars_info_add_ull_literal(info, "id", table->id);
-
- pars_info_add_int4_literal(info, "pos", pos);
-
- pars_info_add_str_literal(info, "name", col_name);
- pars_info_add_int4_literal(info, "mtype", mtype);
- pars_info_add_int4_literal(info, "prtype", prtype);
- pars_info_add_int4_literal(info, "len", len);
- pars_info_add_int4_literal(info, "prec", vcol->num_base);
-
- dberr_t error = que_eval_sql(
- info,
- "PROCEDURE P () IS\n"
- "BEGIN\n"
- "INSERT INTO SYS_COLUMNS VALUES"
- "(:id, :pos, :name, :mtype, :prtype, :len, :prec);\n"
- "END;\n",
- FALSE, trx);
-
- if (error != DB_SUCCESS) {
- return(error);
+ if (innodb_insert_sys_columns(table->id, pos, col_name,
+ vcol->m_col.mtype, vcol->m_col.prtype,
+ vcol->m_col.len, vcol->num_base, trx)) {
+ return true;
}
- for (ulint i = 0; i < vcol->num_base; i++) {
- error = innobase_insert_sys_virtual(
- table, pos, vcol->base_col[i]->ind, trx);
- if (error != DB_SUCCESS) {
- return(error);
+ for (ulint i = 0; i < unsigned{vcol->num_base}; i++) {
+ if (innobase_insert_sys_virtual(
+ table, pos, vcol->base_col[i]->ind, trx)) {
+ return true;
}
}
- return(error);
+ return false;
}
/** Update SYS_TABLES.N_COLS in the data dictionary.
@param[in] user_table InnoDB table
-@param[in] n_cols the new value of SYS_TABLES.N_COLS
+@param[in] n the new value of SYS_TABLES.N_COLS
@param[in] trx transaction
@return whether the operation failed */
-static
-bool
-innodb_update_n_cols(const dict_table_t* table, ulint n_cols, trx_t* trx)
+static bool innodb_update_cols(const dict_table_t* table, ulint n, trx_t* trx)
{
pars_info_t* info = pars_info_create();
- pars_info_add_int4_literal(info, "n", n_cols);
+ pars_info_add_int4_literal(info, "n", n);
pars_info_add_ull_literal(info, "id", table->id);
- dberr_t err = que_eval_sql(info,
- "PROCEDURE UPDATE_N_COLS () IS\n"
- "BEGIN\n"
- "UPDATE SYS_TABLES SET N_COLS = :n"
- " WHERE ID = :id;\n"
- "END;\n", FALSE, trx);
-
- if (err != DB_SUCCESS) {
+ if (DB_SUCCESS != que_eval_sql(info,
+ "PROCEDURE UPDATE_N_COLS () IS\n"
+ "BEGIN\n"
+ "UPDATE SYS_TABLES SET N_COLS = :n"
+ " WHERE ID = :id;\n"
+ "END;\n", FALSE, trx)) {
my_error(ER_INTERNAL_ERROR, MYF(0),
"InnoDB: Updating SYS_TABLES.N_COLS failed");
return true;
@@ -4314,299 +5390,47 @@ innodb_update_n_cols(const dict_table_t* table, ulint n_cols, trx_t* trx)
static
bool
innobase_add_virtual_try(
- Alter_inplace_info* ha_alter_info,
- const dict_table_t* user_table,
- trx_t* trx)
+ const Alter_inplace_info* ha_alter_info,
+ const dict_table_t* user_table,
+ trx_t* trx)
{
- ha_innobase_inplace_ctx* ctx;
- dberr_t err = DB_SUCCESS;
-
- ctx = static_cast<ha_innobase_inplace_ctx*>(
+ ha_innobase_inplace_ctx* ctx = static_cast<ha_innobase_inplace_ctx*>(
ha_alter_info->handler_ctx);
for (ulint i = 0; i < ctx->num_to_add_vcol; i++) {
-
- err = innobase_add_one_virtual(
- user_table, ctx->add_vcol_name[i],
- &ctx->add_vcol[i], trx);
-
- if (err != DB_SUCCESS) {
- my_error(ER_INTERNAL_ERROR, MYF(0),
- "InnoDB: ADD COLUMN...VIRTUAL");
- return(true);
+ if (innobase_add_one_virtual(
+ user_table, ctx->add_vcol_name[i],
+ &ctx->add_vcol[i], trx)) {
+ return true;
}
}
-
- ulint n_col = unsigned(user_table->n_cols) - DATA_N_SYS_COLS;
- ulint n_v_col = unsigned(user_table->n_v_cols)
- + ctx->num_to_add_vcol - ctx->num_to_drop_vcol;
- ulint new_n = dict_table_encode_n_col(n_col, n_v_col)
- + (unsigned(user_table->flags & DICT_TF_COMPACT) << 31);
-
- return innodb_update_n_cols(user_table, new_n, trx);
+ return false;
}
-/** Insert into SYS_COLUMNS and insert/update the hidden metadata record
-for instant ADD COLUMN.
-@param[in,out] ctx ALTER TABLE context for the current partition
-@param[in] altered_table MySQL table that is being altered
-@param[in] table MySQL table as it is before the ALTER operation
-@param[in,out] trx dictionary transaction
-@retval true failure
-@retval false success */
-static
-bool
-innobase_add_instant_try(
- ha_innobase_inplace_ctx*ctx,
- const TABLE* altered_table,
- const TABLE* table,
- trx_t* trx)
+/** Delete metadata from SYS_COLUMNS and SYS_VIRTUAL.
+@param[in] id table id
+@param[in] pos first SYS_COLUMNS.POS
+@param[in,out] trx data dictionary transaction
+@retval true Failure
+@retval false Success. */
+static bool innobase_instant_drop_cols(table_id_t id, ulint pos, trx_t* trx)
{
- DBUG_ASSERT(!ctx->need_rebuild());
-
- if (!ctx->is_instant()) return false;
-
- DBUG_ASSERT(altered_table->s->fields > table->s->fields);
- DBUG_ASSERT(ctx->old_table->n_cols == ctx->old_n_cols);
-
- dict_table_t* user_table = ctx->old_table;
- user_table->instant_add_column(*ctx->instant_table);
- dict_index_t* index = dict_table_get_first_index(user_table);
- /* The table may have been emptied and may have lost its
- 'instant-add-ness' during this instant ADD COLUMN. */
-
- /* Construct a table row of default values for the stored columns. */
- dtuple_t* row = dtuple_create(ctx->heap, user_table->n_cols);
- dict_table_copy_types(row, user_table);
- Field** af = altered_table->field;
- Field** const end = altered_table->field + altered_table->s->fields;
-
- for (uint i = 0; af < end; af++) {
- if (!(*af)->stored_in_db()) {
- continue;
- }
-
- dict_col_t* col = dict_table_get_nth_col(user_table, i);
- DBUG_ASSERT(!strcmp((*af)->field_name.str,
- dict_table_get_col_name(user_table, i)));
-
- dfield_t* d = dtuple_get_nth_field(row, i);
-
- if (col->is_instant()) {
- dfield_set_data(d, col->def_val.data,
- col->def_val.len);
- } else if ((*af)->real_maybe_null()) {
- /* Store NULL for nullable 'core' columns. */
- dfield_set_null(d);
- } else {
- switch ((*af)->type()) {
- case MYSQL_TYPE_VARCHAR:
- case MYSQL_TYPE_GEOMETRY:
- case MYSQL_TYPE_TINY_BLOB:
- case MYSQL_TYPE_MEDIUM_BLOB:
- case MYSQL_TYPE_BLOB:
- case MYSQL_TYPE_LONG_BLOB:
- variable_length:
- /* Store the empty string for 'core'
- variable-length NOT NULL columns. */
- dfield_set_data(d, field_ref_zero, 0);
- break;
- case MYSQL_TYPE_STRING:
- if (col->mbminlen != col->mbmaxlen
- && dict_table_is_comp(user_table)) {
- goto variable_length;
- }
- /* fall through */
- default:
- /* For fixed-length NOT NULL 'core' columns,
- get a dummy default value from SQL. Note that
- we will preserve the old values of these
- columns when updating the metadata
- record, to avoid unnecessary updates. */
- ulint len = (*af)->pack_length();
- DBUG_ASSERT(d->type.mtype != DATA_INT
- || len <= 8);
- row_mysql_store_col_in_innobase_format(
- d, d->type.mtype == DATA_INT
- ? static_cast<byte*>(
- mem_heap_alloc(ctx->heap, len))
- : NULL, true, (*af)->ptr, len,
- dict_table_is_comp(user_table));
- }
- }
-
- if (i + DATA_N_SYS_COLS < ctx->old_n_cols) {
- i++;
- continue;
- }
-
- pars_info_t* info = pars_info_create();
- pars_info_add_ull_literal(info, "id", user_table->id);
- pars_info_add_int4_literal(info, "pos", i);
- pars_info_add_str_literal(info, "name", (*af)->field_name.str);
- pars_info_add_int4_literal(info, "mtype", d->type.mtype);
- pars_info_add_int4_literal(info, "prtype", d->type.prtype);
- pars_info_add_int4_literal(info, "len", d->type.len);
+ pars_info_t* info = pars_info_create();
+ pars_info_add_ull_literal(info, "id", id);
+ pars_info_add_int4_literal(info, "pos", pos);
- dberr_t err = que_eval_sql(
+ dberr_t err = que_eval_sql(
info,
- "PROCEDURE ADD_COL () IS\n"
+ "PROCEDURE DELETE_COL () IS\n"
"BEGIN\n"
- "INSERT INTO SYS_COLUMNS VALUES"
- "(:id,:pos,:name,:mtype,:prtype,:len,0);\n"
+ "DELETE FROM SYS_COLUMNS WHERE\n"
+ "TABLE_ID = :id AND POS >= :pos;\n"
+ "DELETE FROM SYS_VIRTUAL WHERE TABLE_ID = :id;\n"
"END;\n", FALSE, trx);
- if (err != DB_SUCCESS) {
- my_error(ER_INTERNAL_ERROR, MYF(0),
- "InnoDB: Insert into SYS_COLUMNS failed");
- return(true);
- }
-
- i++;
- }
-
- if (innodb_update_n_cols(user_table, dict_table_encode_n_col(
- unsigned(user_table->n_cols)
- - DATA_N_SYS_COLS,
- user_table->n_v_cols)
- | (user_table->flags & DICT_TF_COMPACT) << 31,
- trx)) {
- return true;
- }
-
- /* If the table has been discarded then change the metadata alone
- and make the index to non-instant format */
- if (!user_table->space) {
- index->remove_instant();
- return false;
- }
-
- unsigned i = unsigned(user_table->n_cols) - DATA_N_SYS_COLS;
- byte trx_id[DATA_TRX_ID_LEN], roll_ptr[DATA_ROLL_PTR_LEN];
- dfield_set_data(dtuple_get_nth_field(row, i++), field_ref_zero,
- DATA_ROW_ID_LEN);
- dfield_set_data(dtuple_get_nth_field(row, i++), trx_id, sizeof trx_id);
- dfield_set_data(dtuple_get_nth_field(row, i),roll_ptr,sizeof roll_ptr);
- DBUG_ASSERT(i + 1 == user_table->n_cols);
-
- trx_write_trx_id(trx_id, trx->id);
- /* The DB_ROLL_PTR will be assigned later, when allocating undo log.
- Silence a Valgrind warning in dtuple_validate() when
- row_ins_clust_index_entry_low() searches for the insert position. */
- memset(roll_ptr, 0, sizeof roll_ptr);
-
- dtuple_t* entry = row_build_index_entry(row, NULL, index, ctx->heap);
- entry->info_bits = REC_INFO_METADATA;
-
- mtr_t mtr;
- mtr.start();
- index->set_modified(mtr);
- btr_pcur_t pcur;
- btr_pcur_open_at_index_side(true, index, BTR_MODIFY_TREE, &pcur, true,
- 0, &mtr);
- ut_ad(btr_pcur_is_before_first_on_page(&pcur));
- btr_pcur_move_to_next_on_page(&pcur);
-
- buf_block_t* block = btr_pcur_get_block(&pcur);
- ut_ad(page_is_leaf(block->frame));
- ut_ad(!page_has_prev(block->frame));
- ut_ad(!buf_block_get_page_zip(block));
- const rec_t* rec = btr_pcur_get_rec(&pcur);
- que_thr_t* thr = pars_complete_graph_for_exec(
- NULL, trx, ctx->heap, NULL);
- const bool is_root = block->page.id.page_no() == index->page;
-
- dberr_t err;
- if (rec_is_metadata(rec, index)) {
- ut_ad(page_rec_is_user_rec(rec));
- if (is_root
- && !page_has_next(block->frame)
- && page_rec_is_last(rec, block->frame)) {
- goto empty_table;
- }
- /* Extend the record with the instantly added columns. */
- const unsigned n = user_table->n_cols - ctx->old_n_cols;
- /* Reserve room for DB_TRX_ID,DB_ROLL_PTR and any
- non-updated off-page columns in case they are moved off
- page as a result of the update. */
- upd_t* update = upd_create(index->n_fields, ctx->heap);
- update->n_fields = n;
- update->info_bits = REC_INFO_METADATA;
- /* Add the default values for instantly added columns */
- for (unsigned i = 0; i < n; i++) {
- upd_field_t* uf = upd_get_nth_field(update, i);
- unsigned f = index->n_fields - n + i;
- uf->field_no = f;
- uf->new_val = entry->fields[f];
- }
- rec_offs* offsets = NULL;
- mem_heap_t* offsets_heap = NULL;
- big_rec_t* big_rec;
- err = btr_cur_pessimistic_update(
- BTR_NO_LOCKING_FLAG | BTR_KEEP_POS_FLAG,
- btr_pcur_get_btr_cur(&pcur),
- &offsets, &offsets_heap, ctx->heap,
- &big_rec, update, UPD_NODE_NO_ORD_CHANGE,
- thr, trx->id, &mtr);
- if (big_rec) {
- if (err == DB_SUCCESS) {
- err = btr_store_big_rec_extern_fields(
- &pcur, offsets, big_rec, &mtr,
- BTR_STORE_UPDATE);
- }
-
- dtuple_big_rec_free(big_rec);
- }
- if (offsets_heap) {
- mem_heap_free(offsets_heap);
- }
- btr_pcur_close(&pcur);
- goto func_exit;
- } else if (is_root && page_rec_is_supremum(rec)) {
-empty_table:
- /* The table is empty. */
- ut_ad(fil_page_index_page_check(block->frame));
- ut_ad(!page_has_siblings(block->frame));
- ut_ad(block->page.id.page_no() == index->page);
- btr_page_empty(block, NULL, index, 0, &mtr);
- index->remove_instant();
- err = DB_SUCCESS;
- goto func_exit;
- }
-
- /* Convert the table to the instant ADD COLUMN format. */
- ut_ad(user_table->is_instant());
- mtr.commit();
- mtr.start();
- index->set_modified(mtr);
- if (page_t* root = btr_root_get(index, &mtr)) {
- if (fil_page_get_type(root) != FIL_PAGE_INDEX) {
- DBUG_ASSERT(!"wrong page type");
- goto err_exit;
- }
-
- DBUG_ASSERT(!page_is_comp(root) || !page_get_instant(root));
- mlog_write_ulint(root + FIL_PAGE_TYPE,
- FIL_PAGE_TYPE_INSTANT, MLOG_2BYTES,
- &mtr);
- page_set_instant(root, index->n_core_fields, &mtr);
- mtr.commit();
- mtr.start();
- index->set_modified(mtr);
- err = row_ins_clust_index_entry_low(
- BTR_NO_LOCKING_FLAG, BTR_MODIFY_TREE, index,
- index->n_uniq, entry, 0, thr);
- } else {
-err_exit:
- err = DB_CORRUPTION;
- }
-
-func_exit:
- mtr.commit();
-
if (err != DB_SUCCESS) {
- my_error_innodb(err, table->s->table_name.str,
- user_table->flags);
+ my_error(ER_INTERNAL_ERROR, MYF(0),
+ "InnoDB: DELETE from SYS_COLUMNS/SYS_VIRTUAL failed");
return true;
}
@@ -4784,9 +5608,9 @@ innobase_drop_one_virtual_sys_virtual(
static
bool
innobase_drop_virtual_try(
- Alter_inplace_info* ha_alter_info,
- const dict_table_t* user_table,
- trx_t* trx)
+ const Alter_inplace_info* ha_alter_info,
+ const dict_table_t* user_table,
+ trx_t* trx)
{
ha_innobase_inplace_ctx* ctx;
dberr_t err = DB_SUCCESS;
@@ -4819,14 +5643,477 @@ innobase_drop_virtual_try(
}
}
+ return false;
+}
+
+/** Serialise metadata of dropped or reordered columns.
+@param[in,out] heap memory heap for allocation
+@param[out] field data field with the metadata */
+inline
+void dict_table_t::serialise_columns(mem_heap_t* heap, dfield_t* field) const
+{
+ DBUG_ASSERT(instant);
+ const dict_index_t& index = *UT_LIST_GET_FIRST(indexes);
+ unsigned n_fixed = index.first_user_field();
+ unsigned num_non_pk_fields = index.n_fields - n_fixed;
- ulint n_col = unsigned(user_table->n_cols) - DATA_N_SYS_COLS;
- ulint n_v_col = unsigned(user_table->n_v_cols)
- - ctx->num_to_drop_vcol;
- ulint new_n = dict_table_encode_n_col(n_col, n_v_col)
- | ((user_table->flags & DICT_TF_COMPACT) << 31);
+ ulint len = 4 + num_non_pk_fields * 2;
- return innodb_update_n_cols(user_table, new_n, trx);
+ byte* data = static_cast<byte*>(mem_heap_alloc(heap, len));
+
+ dfield_set_data(field, data, len);
+
+ mach_write_to_4(data, num_non_pk_fields);
+
+ data += 4;
+
+ for (ulint i = n_fixed; i < index.n_fields; i++) {
+ mach_write_to_2(data, instant->field_map[i - n_fixed]);
+ data += 2;
+ }
+}
+
+/** Construct the metadata record for instant ALTER TABLE.
+@param[in] row dummy or default values for existing columns
+@param[in,out] heap memory heap for allocations
+@return metadata record */
+inline
+dtuple_t*
+dict_index_t::instant_metadata(const dtuple_t& row, mem_heap_t* heap) const
+{
+ ut_ad(is_primary());
+ dtuple_t* entry;
+
+ if (!table->instant) {
+ entry = row_build_index_entry(&row, NULL, this, heap);
+ entry->info_bits = REC_INFO_METADATA_ADD;
+ return entry;
+ }
+
+ entry = dtuple_create(heap, n_fields + 1);
+ entry->n_fields_cmp = n_uniq;
+ entry->info_bits = REC_INFO_METADATA_ALTER;
+
+ const dict_field_t* field = fields;
+
+ for (uint i = 0; i <= n_fields; i++, field++) {
+ dfield_t* dfield = dtuple_get_nth_field(entry, i);
+
+ if (i == first_user_field()) {
+ table->serialise_columns(heap, dfield);
+ dfield->type.metadata_blob_init();
+ field--;
+ continue;
+ }
+
+ ut_ad(!field->col->is_virtual());
+
+ if (field->col->is_dropped()) {
+ dict_col_copy_type(field->col, &dfield->type);
+ if (field->col->is_nullable()) {
+ dfield_set_null(dfield);
+ } else {
+ dfield_set_data(dfield, field_ref_zero,
+ field->fixed_len);
+ }
+ continue;
+ }
+
+ const dfield_t* s = dtuple_get_nth_field(&row, field->col->ind);
+ ut_ad(dict_col_type_assert_equal(field->col, &s->type));
+ *dfield = *s;
+
+ if (dfield_is_null(dfield)) {
+ continue;
+ }
+
+ if (dfield_is_ext(dfield)) {
+ ut_ad(i > first_user_field());
+ ut_ad(!field->prefix_len);
+ ut_ad(dfield->len >= FIELD_REF_SIZE);
+ dfield_set_len(dfield, dfield->len - FIELD_REF_SIZE);
+ }
+
+ if (!field->prefix_len) {
+ continue;
+ }
+
+ ut_ad(field->col->ord_part);
+ ut_ad(i < n_uniq);
+
+ ulint len = dtype_get_at_most_n_mbchars(
+ field->col->prtype,
+ field->col->mbminlen, field->col->mbmaxlen,
+ field->prefix_len, dfield->len,
+ static_cast<char*>(dfield_get_data(dfield)));
+ dfield_set_len(dfield, len);
+ }
+
+ return entry;
+}
+
+/** Insert or update SYS_COLUMNS and the hidden metadata record
+for instant ALTER TABLE.
+@param[in] ha_alter_info ALTER TABLE context
+@param[in,out] ctx ALTER TABLE context for the current partition
+@param[in] altered_table MySQL table that is being altered
+@param[in] table MySQL table as it is before the ALTER operation
+@param[in,out] trx dictionary transaction
+@retval true failure
+@retval false success */
+static bool innobase_instant_try(
+ const Alter_inplace_info* ha_alter_info,
+ ha_innobase_inplace_ctx* ctx,
+ const TABLE* altered_table,
+ const TABLE* table,
+ trx_t* trx)
+{
+ DBUG_ASSERT(!ctx->need_rebuild());
+ DBUG_ASSERT(ctx->is_instant());
+
+ dict_table_t* user_table = ctx->old_table;
+
+ dict_index_t* index = dict_table_get_first_index(user_table);
+ mtr_t mtr;
+ mtr.start();
+ /* Prevent purge from calling dict_index_t::clear_instant_add(),
+ to protect index->n_core_fields, index->table->instant and others
+ from changing during ctx->instant_column(). */
+ instant_metadata_lock(*index, mtr);
+ const unsigned n_old_fields = index->n_fields;
+ const dict_col_t* old_cols = user_table->cols;
+ DBUG_ASSERT(user_table->n_cols == ctx->old_n_cols);
+
+ const bool metadata_changed = ctx->instant_column();
+
+ DBUG_ASSERT(index->n_fields >= n_old_fields);
+ /* Release the page latch. Between this and the next
+ btr_pcur_open_at_index_side(), data fields such as
+ index->n_core_fields and index->table->instant could change,
+ but we would handle that in empty_table: below. */
+ mtr.commit();
+ /* The table may have been emptied and may have lost its
+ 'instantness' during this ALTER TABLE. */
+
+ /* Construct a table row of default values for the stored columns. */
+ dtuple_t* row = dtuple_create(ctx->heap, user_table->n_cols);
+ dict_table_copy_types(row, user_table);
+ Field** af = altered_table->field;
+ Field** const end = altered_table->field + altered_table->s->fields;
+ ut_d(List_iterator_fast<Create_field> cf_it(
+ ha_alter_info->alter_info->create_list));
+ if (ctx->first_alter_pos
+ && innobase_instant_drop_cols(user_table->id,
+ ctx->first_alter_pos - 1, trx)) {
+ return true;
+ }
+ for (uint i = 0; af < end; af++) {
+ if (!(*af)->stored_in_db()) {
+ ut_d(cf_it++);
+ continue;
+ }
+
+ const dict_col_t* old = dict_table_t::find(old_cols,
+ ctx->col_map,
+ ctx->old_n_cols, i);
+ DBUG_ASSERT(!old || i >= ctx->old_n_cols - DATA_N_SYS_COLS
+ || old->ind == i
+ || (ctx->first_alter_pos
+ && old->ind >= ctx->first_alter_pos - 1));
+
+ dfield_t* d = dtuple_get_nth_field(row, i);
+ const dict_col_t* col = dict_table_get_nth_col(user_table, i);
+ DBUG_ASSERT(!col->is_virtual());
+ DBUG_ASSERT(!col->is_dropped());
+ DBUG_ASSERT(col->mtype != DATA_SYS);
+ DBUG_ASSERT(!strcmp((*af)->field_name.str,
+ dict_table_get_col_name(user_table, i)));
+ DBUG_ASSERT(old || col->is_added());
+
+ ut_d(const Create_field* new_field = cf_it++);
+ /* new_field->field would point to an existing column.
+ If it is NULL, the column was added by this ALTER TABLE. */
+ ut_ad(!new_field->field == !old);
+
+ if (col->is_added()) {
+ dfield_set_data(d, col->def_val.data,
+ col->def_val.len);
+ } else if ((*af)->real_maybe_null()) {
+ /* Store NULL for nullable 'core' columns. */
+ dfield_set_null(d);
+ } else {
+ switch ((*af)->type()) {
+ case MYSQL_TYPE_VARCHAR:
+ case MYSQL_TYPE_GEOMETRY:
+ case MYSQL_TYPE_TINY_BLOB:
+ case MYSQL_TYPE_MEDIUM_BLOB:
+ case MYSQL_TYPE_BLOB:
+ case MYSQL_TYPE_LONG_BLOB:
+ variable_length:
+ /* Store the empty string for 'core'
+ variable-length NOT NULL columns. */
+ dfield_set_data(d, field_ref_zero, 0);
+ break;
+ case MYSQL_TYPE_STRING:
+ if (col->mbminlen != col->mbmaxlen
+ && user_table->not_redundant()) {
+ goto variable_length;
+ }
+ /* fall through */
+ default:
+ /* For fixed-length NOT NULL 'core' columns,
+ get a dummy default value from SQL. Note that
+ we will preserve the old values of these
+ columns when updating the metadata
+ record, to avoid unnecessary updates. */
+ ulint len = (*af)->pack_length();
+ DBUG_ASSERT(d->type.mtype != DATA_INT
+ || len <= 8);
+ row_mysql_store_col_in_innobase_format(
+ d, d->type.mtype == DATA_INT
+ ? static_cast<byte*>(
+ mem_heap_alloc(ctx->heap, len))
+ : NULL, true, (*af)->ptr, len,
+ dict_table_is_comp(user_table));
+ ut_ad(new_field->field->pack_length() == len);
+ }
+ }
+
+ bool update = old && (!ctx->first_alter_pos
+ || i < ctx->first_alter_pos - 1);
+ DBUG_ASSERT(!old || col->same_format(*old));
+ if (update
+ && old->prtype == d->type.prtype) {
+ /* The record is already present in SYS_COLUMNS. */
+ } else if (innodb_insert_sys_columns(user_table->id, i,
+ (*af)->field_name.str,
+ d->type.mtype,
+ d->type.prtype,
+ d->type.len, 0, trx,
+ update)) {
+ return true;
+ }
+
+ i++;
+ }
+
+ if (innodb_update_cols(user_table, dict_table_encode_n_col(
+ unsigned(user_table->n_cols)
+ - DATA_N_SYS_COLS,
+ user_table->n_v_cols)
+ | (user_table->flags & DICT_TF_COMPACT) << 31,
+ trx)) {
+ return true;
+ }
+
+ if (ctx->first_alter_pos) {
+add_all_virtual:
+ for (uint i = 0; i < user_table->n_v_cols; i++) {
+ if (innobase_add_one_virtual(
+ user_table,
+ dict_table_get_v_col_name(user_table, i),
+ &user_table->v_cols[i], trx)) {
+ return true;
+ }
+ }
+ } else if (ha_alter_info->handler_flags & ALTER_DROP_VIRTUAL_COLUMN) {
+ if (innobase_instant_drop_cols(user_table->id, 65536, trx)) {
+ return true;
+ }
+ goto add_all_virtual;
+ } else if ((ha_alter_info->handler_flags & ALTER_ADD_VIRTUAL_COLUMN)
+ && innobase_add_virtual_try(ha_alter_info, user_table,
+ trx)) {
+ return true;
+ }
+
+ if (!user_table->space) {
+ /* In case of ALTER TABLE...DISCARD TABLESPACE,
+ update only the metadata and transform the dictionary
+ cache entry to the canonical format. */
+ index->clear_instant_alter();
+ return false;
+ }
+
+ unsigned i = unsigned(user_table->n_cols) - DATA_N_SYS_COLS;
+ DBUG_ASSERT(i >= altered_table->s->stored_fields);
+ DBUG_ASSERT(i <= altered_table->s->stored_fields + 1);
+ if (i > altered_table->s->fields) {
+ const dict_col_t& fts_doc_id = user_table->cols[i - 1];
+ DBUG_ASSERT(!strcmp(fts_doc_id.name(*user_table),
+ FTS_DOC_ID_COL_NAME));
+ DBUG_ASSERT(!fts_doc_id.is_nullable());
+ DBUG_ASSERT(fts_doc_id.len == 8);
+ dfield_set_data(dtuple_get_nth_field(row, i - 1),
+ field_ref_zero, fts_doc_id.len);
+ }
+ byte trx_id[DATA_TRX_ID_LEN], roll_ptr[DATA_ROLL_PTR_LEN];
+ dfield_set_data(dtuple_get_nth_field(row, i++), field_ref_zero,
+ DATA_ROW_ID_LEN);
+ dfield_set_data(dtuple_get_nth_field(row, i++), trx_id, sizeof trx_id);
+ dfield_set_data(dtuple_get_nth_field(row, i),roll_ptr,sizeof roll_ptr);
+ DBUG_ASSERT(i + 1 == user_table->n_cols);
+
+ trx_write_trx_id(trx_id, trx->id);
+ /* The DB_ROLL_PTR will be assigned later, when allocating undo log.
+ Silence a Valgrind warning in dtuple_validate() when
+ row_ins_clust_index_entry_low() searches for the insert position. */
+ memset(roll_ptr, 0, sizeof roll_ptr);
+
+ dtuple_t* entry = index->instant_metadata(*row, ctx->heap);
+ mtr.start();
+ index->set_modified(mtr);
+ btr_pcur_t pcur;
+ btr_pcur_open_at_index_side(true, index, BTR_MODIFY_TREE, &pcur, true,
+ 0, &mtr);
+ ut_ad(btr_pcur_is_before_first_on_page(&pcur));
+ btr_pcur_move_to_next_on_page(&pcur);
+
+ buf_block_t* block = btr_pcur_get_block(&pcur);
+ ut_ad(page_is_leaf(block->frame));
+ ut_ad(!page_has_prev(block->frame));
+ ut_ad(!buf_block_get_page_zip(block));
+ const rec_t* rec = btr_pcur_get_rec(&pcur);
+ que_thr_t* thr = pars_complete_graph_for_exec(
+ NULL, trx, ctx->heap, NULL);
+ const bool is_root = block->page.id.page_no() == index->page;
+
+ dberr_t err = DB_SUCCESS;
+ if (rec_is_metadata(rec, *index)) {
+ ut_ad(page_rec_is_user_rec(rec));
+ if (is_root
+ && !rec_is_alter_metadata(rec, *index)
+ && !index->table->instant
+ && !page_has_next(block->frame)
+ && page_rec_is_last(rec, block->frame)) {
+ goto empty_table;
+ }
+
+ if (!metadata_changed) {
+ goto func_exit;
+ }
+
+ /* Ensure that the root page is in the correct format. */
+ buf_block_t* root = btr_root_block_get(index, RW_X_LATCH,
+ &mtr);
+ DBUG_ASSERT(root);
+ if (fil_page_get_type(root->frame) != FIL_PAGE_TYPE_INSTANT) {
+ DBUG_ASSERT(!"wrong page type");
+ err = DB_CORRUPTION;
+ goto func_exit;
+ }
+
+ btr_set_instant(root, *index, &mtr);
+
+ /* Extend the record with any added columns. */
+ uint n = uint(index->n_fields) - n_old_fields;
+ /* Reserve room for DB_TRX_ID,DB_ROLL_PTR and any
+ non-updated off-page columns in case they are moved off
+ page as a result of the update. */
+ const unsigned f = user_table->instant != NULL;
+ upd_t* update = upd_create(index->n_fields + f, ctx->heap);
+ update->n_fields = n + f;
+ update->info_bits = f
+ ? REC_INFO_METADATA_ALTER
+ : REC_INFO_METADATA_ADD;
+ if (f) {
+ upd_field_t* uf = upd_get_nth_field(update, 0);
+ uf->field_no = index->first_user_field();
+ uf->new_val = entry->fields[uf->field_no];
+ DBUG_ASSERT(!dfield_is_ext(&uf->new_val));
+ DBUG_ASSERT(!dfield_is_null(&uf->new_val));
+ }
+
+ /* Add the default values for instantly added columns */
+ unsigned j = f;
+
+ for (unsigned k = n_old_fields; k < index->n_fields; k++) {
+ upd_field_t* uf = upd_get_nth_field(update, j++);
+ uf->field_no = k + f;
+ uf->new_val = entry->fields[k + f];
+
+ ut_ad(j <= n + f);
+ }
+
+ ut_ad(j == n + f);
+
+ rec_offs* offsets = NULL;
+ mem_heap_t* offsets_heap = NULL;
+ big_rec_t* big_rec;
+ err = btr_cur_pessimistic_update(
+ BTR_NO_LOCKING_FLAG | BTR_KEEP_POS_FLAG,
+ btr_pcur_get_btr_cur(&pcur),
+ &offsets, &offsets_heap, ctx->heap,
+ &big_rec, update, UPD_NODE_NO_ORD_CHANGE,
+ thr, trx->id, &mtr);
+
+ offsets = rec_get_offsets(
+ btr_pcur_get_rec(&pcur), index, offsets,
+ index->n_core_fields, ULINT_UNDEFINED, &offsets_heap);
+ if (big_rec) {
+ if (err == DB_SUCCESS) {
+ err = btr_store_big_rec_extern_fields(
+ &pcur, offsets, big_rec, &mtr,
+ BTR_STORE_UPDATE);
+ }
+
+ dtuple_big_rec_free(big_rec);
+ }
+ if (offsets_heap) {
+ mem_heap_free(offsets_heap);
+ }
+ btr_pcur_close(&pcur);
+ goto func_exit;
+ } else if (is_root && page_rec_is_supremum(rec)
+ && !index->table->instant) {
+empty_table:
+ /* The table is empty. */
+ ut_ad(fil_page_index_page_check(block->frame));
+ ut_ad(!page_has_siblings(block->frame));
+ ut_ad(block->page.id.page_no() == index->page);
+ /* MDEV-17383: free metadata BLOBs! */
+ btr_page_empty(block, NULL, index, 0, &mtr);
+ if (index->is_instant()) {
+ index->clear_instant_add();
+ }
+ goto func_exit;
+ } else if (!user_table->is_instant()) {
+ ut_ad(!user_table->not_redundant());
+ goto func_exit;
+ }
+
+ /* Convert the table to the instant ALTER TABLE format. */
+ mtr.commit();
+ mtr.start();
+ index->set_modified(mtr);
+ if (buf_block_t* root = btr_root_block_get(index, RW_SX_LATCH, &mtr)) {
+ if (fil_page_get_type(root->frame) != FIL_PAGE_INDEX) {
+ DBUG_ASSERT(!"wrong page type");
+ goto err_exit;
+ }
+
+ btr_set_instant(root, *index, &mtr);
+ mtr.commit();
+ mtr.start();
+ index->set_modified(mtr);
+ err = row_ins_clust_index_entry_low(
+ BTR_NO_LOCKING_FLAG, BTR_MODIFY_TREE, index,
+ index->n_uniq, entry, 0, thr);
+ } else {
+err_exit:
+ err = DB_CORRUPTION;
+ }
+
+func_exit:
+ mtr.commit();
+
+ if (err != DB_SUCCESS) {
+ my_error_innodb(err, table->s->table_name.str,
+ user_table->flags);
+ return true;
+ }
+
+ return false;
}
/** Adjust the create index column number from "New table" to
@@ -4846,8 +6133,6 @@ innodb_v_adjust_idx_col(
ulint num_v_dropped,
index_def_t* index_def)
{
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
for (ulint i = 0; i < index_def->n_fields; i++) {
#ifdef UNIV_DEBUG
bool col_found = false;
@@ -4865,15 +6150,14 @@ innodb_v_adjust_idx_col(
const Field* field = NULL;
- cf_it.rewind();
-
/* Found the field in the new table */
- while (const Create_field* new_field = cf_it++) {
- if (new_field->stored_in_db()) {
+ for (const Create_field& new_field :
+ ha_alter_info->alter_info->create_list) {
+ if (new_field.stored_in_db()) {
continue;
}
- field = new_field->field;
+ field = new_field.field;
if (num_v == index_field->col_no) {
break;
@@ -5071,11 +6355,9 @@ prepare_inplace_alter_table_dict(
const char* path = thd_innodb_tmpdir(
ctx->prebuilt->trx->mysql_thd);
- index_defs = innobase_create_key_defs(
- ctx->heap, ha_alter_info, altered_table, ctx->num_to_add_index,
+ index_defs = ctx->create_key_defs(
+ ha_alter_info, altered_table,
num_fts_index,
- dict_index_is_auto_gen_clust(dict_table_get_first_index(
- ctx->new_table)),
fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx,
old_table);
@@ -5270,10 +6552,10 @@ new_clustered_failed:
}
if (altered_table->versioned()) {
- if (i == altered_table->s->row_start_field) {
+ if (i == altered_table->s->vers.start_fieldno) {
field_type |= DATA_VERS_START;
} else if (i ==
- altered_table->s->row_end_field) {
+ altered_table->s->vers.end_fieldno) {
field_type |= DATA_VERS_END;
} else if (!(field->flags
& VERS_UPDATE_UNVERSIONED_FLAG)) {
@@ -5465,26 +6747,19 @@ wrong_column_name:
== !!new_clustered);
}
- if (ctx->need_rebuild() && user_table->supports_instant()) {
- if (!instant_alter_column_possible(ha_alter_info, old_table)) {
- goto not_instant_add_column;
- }
-
- for (uint i = uint(ctx->old_table->n_cols) - DATA_N_SYS_COLS;
- i--; ) {
- if (ctx->col_map[i] != i) {
- goto not_instant_add_column;
- }
- }
-
- DBUG_ASSERT(ctx->new_table->n_cols > ctx->old_table->n_cols);
+ DBUG_ASSERT(!ctx->need_rebuild()
+ || !ctx->new_table->persistent_autoinc);
+ if (ctx->need_rebuild() && instant_alter_column_possible(
+ *user_table, ha_alter_info, old_table, altered_table,
+ ha_innobase::is_innodb_strict_mode(ctx->trx->mysql_thd))) {
for (uint a = 0; a < ctx->num_to_add_index; a++) {
ctx->add_index[a]->table = ctx->new_table;
error = dict_index_add_to_cache(
ctx->add_index[a], FIL_NULL, add_v);
ut_a(error == DB_SUCCESS);
}
+
DBUG_ASSERT(ha_alter_info->key_count
/* hidden GEN_CLUST_INDEX in InnoDB */
+ dict_index_is_auto_gen_clust(
@@ -5496,24 +6771,23 @@ wrong_column_name:
altered_table->key_info)
!= FTS_EXIST_DOC_ID_INDEX)
== ctx->num_to_add_index);
+
ctx->num_to_add_index = 0;
ctx->add_index = NULL;
uint i = 0; // index of stored columns ctx->new_table->cols[]
Field **af = altered_table->field;
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
-
- while (const Create_field* new_field = cf_it++) {
- DBUG_ASSERT(!new_field->field
+ for (const Create_field& new_field :
+ ha_alter_info->alter_info->create_list) {
+ DBUG_ASSERT(!new_field.field
|| std::find(old_table->field,
old_table->field
+ old_table->s->fields,
- new_field->field) !=
+ new_field.field) !=
old_table->field + old_table->s->fields);
- DBUG_ASSERT(new_field->field
- || !strcmp(new_field->field_name.str,
+ DBUG_ASSERT(new_field.field
+ || !strcmp(new_field.field_name.str,
(*af)->field_name.str));
if (!(*af)->stored_in_db()) {
@@ -5526,26 +6800,11 @@ wrong_column_name:
DBUG_ASSERT(!strcmp((*af)->field_name.str,
dict_table_get_col_name(ctx->new_table,
i)));
- DBUG_ASSERT(!col->is_instant());
+ DBUG_ASSERT(!col->is_added());
- if (new_field->field) {
- ut_d(const dict_col_t* old_col
- = dict_table_get_nth_col(user_table, i));
- ut_d(const dict_index_t* index
- = user_table->indexes.start);
- DBUG_SLOW_ASSERT(col->mtype == old_col->mtype);
- ut_ad(col->prtype == old_col->prtype
- || col->prtype
- == (old_col->prtype & ~DATA_VERSIONED));
- DBUG_SLOW_ASSERT(col->mbminlen
- == old_col->mbminlen);
- DBUG_SLOW_ASSERT(col->mbmaxlen
- == old_col->mbmaxlen);
- DBUG_SLOW_ASSERT(col->len >= old_col->len);
- DBUG_SLOW_ASSERT(old_col->is_instant()
- == (dict_col_get_clust_pos(
- old_col, index)
- >= index->n_core_fields));
+ if (new_field.field) {
+ /* This is a pre-existing column,
+ possibly at a different position. */
} else if ((*af)->is_real_null()) {
/* DEFAULT NULL */
col->def_val.len = UNIV_SQL_NULL;
@@ -5613,16 +6872,21 @@ wrong_column_name:
ctx->new_table, i),
FTS_DOC_ID_COL_NAME)));
+ if (altered_table->found_next_number_field) {
+ ctx->new_table->persistent_autoinc
+ = ctx->old_table->persistent_autoinc;
+ }
+
ctx->prepare_instant();
}
if (ctx->need_rebuild()) {
-not_instant_add_column:
DBUG_ASSERT(ctx->need_rebuild());
DBUG_ASSERT(!ctx->is_instant());
DBUG_ASSERT(num_fts_index <= 1);
DBUG_ASSERT(!ctx->online || num_fts_index == 0);
DBUG_ASSERT(!ctx->online
+ || !ha_alter_info->mdl_exclusive_after_prepare
|| ctx->add_autoinc == ULINT_UNDEFINED);
DBUG_ASSERT(!ctx->online
|| !innobase_need_rebuild(ha_alter_info, old_table)
@@ -5670,15 +6934,15 @@ not_instant_add_column:
before we can use it we need to open the
table. The new_table must be in the data
dictionary cache, because we are still holding
- the dict_sys->mutex. */
- ut_ad(mutex_own(&dict_sys->mutex));
+ the dict_sys.mutex. */
+ ut_ad(mutex_own(&dict_sys.mutex));
temp_table = dict_table_open_on_name(
ctx->new_table->name.m_name, TRUE, FALSE,
DICT_ERR_IGNORE_NONE);
ut_a(ctx->new_table == temp_table);
/* n_ref_count must be 1, because purge cannot
be executing on this very table as we are
- holding dict_operation_lock X-latch. */
+ holding dict_sys.latch X-latch. */
DBUG_ASSERT(ctx->new_table->get_ref_count() == 1);
DBUG_ASSERT(ctx->new_table->id != 0);
DBUG_ASSERT(ctx->new_table->id == ctx->trx->table_id);
@@ -5760,7 +7024,6 @@ error_handling_drop_uncached_1:
ut_ad(new_clust_index->n_core_null_bytes
== UT_BITS_IN_BYTES(new_clust_index->n_nullable));
- DBUG_ASSERT(!ctx->new_table->persistent_autoinc);
if (const Field* ai = altered_table->found_next_number_field) {
const unsigned col_no = innodb_col_no(ai);
@@ -5918,8 +7181,7 @@ error_handling_drop_uncached:
op_ok:
#endif /* UNIV_DEBUG */
ut_ad(ctx->trx->dict_operation_lock_mode == RW_X_LATCH);
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
DICT_TF2_FLAG_SET(ctx->new_table, DICT_TF2_FTS);
if (ctx->need_rebuild()) {
@@ -5942,7 +7204,7 @@ op_ok:
goto error_handling;
}
- trx_commit(ctx->trx);
+ ctx->trx->commit();
trx_start_for_ddl(ctx->trx, op);
if (!ctx->new_table->fts
@@ -5997,10 +7259,10 @@ error_handling:
case DB_SUCCESS:
ut_a(!dict_locked);
- ut_d(mutex_enter(&dict_sys->mutex));
+ ut_d(mutex_enter(&dict_sys.mutex));
ut_d(dict_table_check_for_dup_indexes(
user_table, CHECK_PARTIAL_OK));
- ut_d(mutex_exit(&dict_sys->mutex));
+ ut_d(mutex_exit(&dict_sys.mutex));
DBUG_RETURN(false);
case DB_TABLESPACE_EXISTS:
my_error(ER_TABLESPACE_EXISTS, MYF(0), "(unknown)");
@@ -6061,7 +7323,7 @@ error_handled:
trx_commit_for_mysql(ctx->trx);
/* n_ref_count must be 1, because purge cannot
be executing on this very table as we are
- holding dict_operation_lock X-latch. */
+ holding dict_sys.latch X-latch. */
ut_ad(!stats_wait || ctx->online
|| user_table->get_ref_count() == 1);
@@ -6193,6 +7455,122 @@ innobase_check_foreign_key_index(
return(false);
}
+/**
+Rename a given index in the InnoDB data dictionary.
+
+@param index index to rename
+@param new_name new name of the index
+@param[in,out] trx dict transaction to use, not going to be committed here
+
+@retval true Failure
+@retval false Success */
+static MY_ATTRIBUTE((warn_unused_result))
+bool
+rename_index_try(
+ const dict_index_t* index,
+ const char* new_name,
+ trx_t* trx)
+{
+ DBUG_ENTER("rename_index_try");
+ ut_d(dict_sys.assert_locked());
+ ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
+
+ pars_info_t* pinfo;
+ dberr_t err;
+
+ pinfo = pars_info_create();
+
+ pars_info_add_ull_literal(pinfo, "table_id", index->table->id);
+ pars_info_add_ull_literal(pinfo, "index_id", index->id);
+ pars_info_add_str_literal(pinfo, "new_name", new_name);
+
+ trx->op_info = "Renaming an index in SYS_INDEXES";
+
+ DBUG_EXECUTE_IF(
+ "ib_rename_index_fail1",
+ DBUG_SET("+d,innodb_report_deadlock");
+ );
+
+ err = que_eval_sql(
+ pinfo,
+ "PROCEDURE RENAME_INDEX_IN_SYS_INDEXES () IS\n"
+ "BEGIN\n"
+ "UPDATE SYS_INDEXES SET\n"
+ "NAME = :new_name\n"
+ "WHERE\n"
+ "ID = :index_id AND\n"
+ "TABLE_ID = :table_id;\n"
+ "END;\n",
+ FALSE, trx); /* pinfo is freed by que_eval_sql() */
+
+ DBUG_EXECUTE_IF(
+ "ib_rename_index_fail1",
+ DBUG_SET("-d,innodb_report_deadlock");
+ );
+
+ trx->op_info = "";
+
+ if (err != DB_SUCCESS) {
+ my_error_innodb(err, index->table->name.m_name, 0);
+ DBUG_RETURN(true);
+ }
+
+ DBUG_RETURN(false);
+}
+
+
+/**
+Rename a given index in the InnoDB data dictionary cache.
+
+@param[in,out] index index to rename
+@param new_name new index name
+*/
+static
+void
+innobase_rename_index_cache(dict_index_t* index, const char* new_name)
+{
+ DBUG_ENTER("innobase_rename_index_cache");
+ ut_d(dict_sys.assert_locked());
+
+ size_t old_name_len = strlen(index->name);
+ size_t new_name_len = strlen(new_name);
+
+ if (old_name_len < new_name_len) {
+ index->name = static_cast<char*>(
+ mem_heap_alloc(index->heap, new_name_len + 1));
+ }
+
+ memcpy(const_cast<char*>(index->name()), new_name, new_name_len + 1);
+
+ DBUG_VOID_RETURN;
+}
+
+
+/** Rename the index name in cache.
+@param[in] ctx alter context
+@param[in] ha_alter_info Data used during inplace alter. */
+static void
+innobase_rename_indexes_cache(const ha_innobase_inplace_ctx *ctx,
+ const Alter_inplace_info *ha_alter_info)
+{
+ DBUG_ASSERT(ha_alter_info->handler_flags & ALTER_RENAME_INDEX);
+
+ std::vector<std::pair<dict_index_t *, const char *>> rename_info;
+ rename_info.reserve(ha_alter_info->rename_keys.size());
+
+ for (const Alter_inplace_info::Rename_key_pair &pair :
+ ha_alter_info->rename_keys)
+ {
+ dict_index_t *index=
+ dict_table_get_index_on_name(ctx->old_table, pair.old_key->name.str);
+ ut_ad(index);
+
+ rename_info.emplace_back(index, pair.new_key->name.str);
+ }
+
+ for (const auto &pair : rename_info)
+ innobase_rename_index_cache(pair.first, pair.second);
+}
/** Fill the stored column information in s_cols list.
@param[in] altered_table mysql table object
@@ -6244,7 +7622,7 @@ alter_fill_stored_column(
s_col.num_base = num_base;
innodb_base_col_setup_for_stored(table, field, &s_col);
- (*s_cols)->push_back(s_col);
+ (*s_cols)->push_front(s_col);
}
}
@@ -6274,8 +7652,6 @@ ha_innobase::prepare_inplace_alter_table(
{
dict_index_t** drop_index; /*!< Index to be dropped */
ulint n_drop_index; /*!< Number of indexes to drop */
- dict_index_t** rename_index; /*!< Indexes to be dropped */
- ulint n_rename_index; /*!< Number of indexes to rename */
dict_foreign_t**drop_fk; /*!< Foreign key constraints to drop */
ulint n_drop_fk; /*!< Number of foreign keys to drop */
dict_foreign_t**add_fk = NULL; /*!< Foreign key constraints to drop */
@@ -6313,10 +7689,10 @@ ha_innobase::prepare_inplace_alter_table(
}
#endif /* UNIV_DEBUG */
- ut_d(mutex_enter(&dict_sys->mutex));
+ ut_d(mutex_enter(&dict_sys.mutex));
ut_d(dict_table_check_for_dup_indexes(
m_prebuilt->table, CHECK_ABORTED_OK));
- ut_d(mutex_exit(&dict_sys->mutex));
+ ut_d(mutex_exit(&dict_sys.mutex));
if (!(ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)) {
/* Nothing to do */
@@ -6324,6 +7700,20 @@ ha_innobase::prepare_inplace_alter_table(
DBUG_RETURN(false);
}
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (table->part_info == NULL) {
+#endif
+ /* Ignore the MDL downgrade when table is empty.
+ This optimization is disabled for partition table. */
+ ha_alter_info->mdl_exclusive_after_prepare =
+ innobase_table_is_empty(m_prebuilt->table, false);
+ if (ha_alter_info->online
+ && ha_alter_info->mdl_exclusive_after_prepare) {
+ ha_alter_info->online = false;
+ }
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ }
+#endif
indexed_table = m_prebuilt->table;
/* ALTER TABLE will not implicitly move a table from a single-table
@@ -6418,9 +7808,6 @@ err_exit_no_heap:
already contains. */
if (ha_alter_info->handler_flags
& ALTER_COLUMN_NAME) {
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
-
for (Field** fp = table->field; *fp; fp++) {
if (!((*fp)->flags & FIELD_IS_RENAMED)) {
continue;
@@ -6428,10 +7815,10 @@ err_exit_no_heap:
const char* name = 0;
- cf_it.rewind();
- while (Create_field* cf = cf_it++) {
- if (cf->field == *fp) {
- name = cf->field_name.str;
+ for (const Create_field& cf :
+ ha_alter_info->alter_info->create_list) {
+ if (cf.field == *fp) {
+ name = cf.field_name.str;
goto check_if_ok_to_rename;
}
}
@@ -6598,11 +7985,8 @@ check_if_ok_to_rename:
ha_alter_info->alter_info->drop_list.elements
* sizeof(dict_foreign_t*)));
- List_iterator<Alter_drop> drop_it(
- ha_alter_info->alter_info->drop_list);
-
- while (Alter_drop* drop = drop_it++) {
- if (drop->type != Alter_drop::FOREIGN_KEY) {
+ for (Alter_drop& drop : ha_alter_info->alter_info->drop_list) {
+ if (drop.type != Alter_drop::FOREIGN_KEY) {
continue;
}
@@ -6623,13 +8007,13 @@ check_if_ok_to_rename:
fid = fid ? fid + 1 : foreign->id;
if (!my_strcasecmp(system_charset_info,
- fid, drop->name)) {
+ fid, drop.name)) {
goto found_fk;
}
}
my_error(ER_CANT_DROP_FIELD_OR_KEY, MYF(0),
- drop->type_name(), drop->name);
+ drop.type_name(), drop.name);
goto err_exit;
found_fk:
for (ulint i = n_drop_fk; i--; ) {
@@ -6788,9 +8172,6 @@ check_if_can_drop_indexes:
}
}
- n_rename_index = 0;
- rename_index = NULL;
-
n_add_fk = 0;
if (ha_alter_info->handler_flags
@@ -6844,6 +8225,20 @@ err_exit:
}
}
+ if (ha_alter_info->handler_flags & ALTER_RENAME_INDEX) {
+ for (const Alter_inplace_info::Rename_key_pair& pair :
+ ha_alter_info->rename_keys) {
+ dict_index_t* index = dict_table_get_index_on_name(
+ indexed_table, pair.old_key->name.str);
+
+ if (!index || index->is_corrupted()) {
+ my_error(ER_INDEX_CORRUPT, MYF(0),
+ index->name());
+ goto err_exit;
+ }
+ }
+ }
+
const ha_table_option_struct& alt_opt=
*ha_alter_info->create_info->option_struct;
@@ -6859,7 +8254,6 @@ err_exit:
ctx = new ha_innobase_inplace_ctx(
m_prebuilt,
drop_index, n_drop_index,
- rename_index, n_rename_index,
drop_fk, n_drop_fk,
add_fk, n_add_fk,
ha_alter_info->online,
@@ -6952,21 +8346,20 @@ err_exit:
/* See if an AUTO_INCREMENT column was added. */
uint i = 0;
ulint num_v = 0;
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
- while (const Create_field* new_field = cf_it++) {
+ for (const Create_field& new_field :
+ ha_alter_info->alter_info->create_list) {
const Field* field;
DBUG_ASSERT(i < altered_table->s->fields);
for (uint old_i = 0; table->field[old_i]; old_i++) {
- if (new_field->field == table->field[old_i]) {
+ if (new_field.field == table->field[old_i]) {
goto found_col;
}
}
/* This is an added column. */
- DBUG_ASSERT(!new_field->field);
+ DBUG_ASSERT(!new_field.field);
DBUG_ASSERT(ha_alter_info->handler_flags
& ALTER_ADD_COLUMN);
@@ -6990,7 +8383,7 @@ err_exit:
autoinc_col_max_value = innobase_get_int_col_max_value(field);
}
found_col:
- num_v += !new_field->stored_in_db();
+ num_v += !new_field.stored_in_db();
i++;
}
@@ -7001,7 +8394,6 @@ found_col:
ha_alter_info->handler_ctx = new ha_innobase_inplace_ctx(
m_prebuilt,
drop_index, n_drop_index,
- rename_index, n_rename_index,
drop_fk, n_drop_fk, add_fk, n_add_fk,
ha_alter_info->online,
heap, m_prebuilt->table, col_names,
@@ -7035,16 +8427,14 @@ alter_templ_needs_rebuild(
const dict_table_t* table)
{
ulint i = 0;
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
for (Field** fp = altered_table->field; *fp; fp++, i++) {
- cf_it.rewind();
- while (const Create_field* cf = cf_it++) {
+ for (const Create_field& cf :
+ ha_alter_info->alter_info->create_list) {
for (ulint j=0; j < table->n_cols; j++) {
dict_col_t* cols
= dict_table_get_nth_col(table, j);
- if (cf->length > cols->len) {
+ if (cf.length > cols->len) {
return(true);
}
}
@@ -7102,14 +8492,15 @@ ha_innobase::inplace_alter_table(
bool rebuild_templ = false;
DBUG_ENTER("inplace_alter_table");
DBUG_ASSERT(!srv_read_only_mode);
-
ut_ad(!sync_check_iterate(sync_check()));
- ut_ad(!rw_lock_own_flagged(&dict_operation_lock,
+ ut_ad(!rw_lock_own_flagged(&dict_sys.latch,
RW_LOCK_FLAG_X | RW_LOCK_FLAG_S));
DEBUG_SYNC(m_user_thd, "innodb_inplace_alter_table_enter");
- if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA)) {
+ /* Ignore the inplace alter phase when table is empty */
+ if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA)
+ || ha_alter_info->mdl_exclusive_after_prepare) {
ok_exit:
DEBUG_SYNC(m_user_thd, "innodb_after_inplace_alter_table");
DBUG_RETURN(false);
@@ -7157,7 +8548,7 @@ ok_exit:
rebuild_templ
= ctx->need_rebuild()
|| ((ha_alter_info->handler_flags
- & ALTER_COLUMN_EQUAL_PACK_LENGTH)
+ & ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE)
&& alter_templ_needs_rebuild(
altered_table, ha_alter_info, ctx->new_table));
@@ -7252,10 +8643,10 @@ oom:
KEY* dup_key;
all_done:
case DB_SUCCESS:
- ut_d(mutex_enter(&dict_sys->mutex));
+ ut_d(mutex_enter(&dict_sys.mutex));
ut_d(dict_table_check_for_dup_indexes(
m_prebuilt->table, CHECK_PARTIAL_OK));
- ut_d(mutex_exit(&dict_sys->mutex));
+ ut_d(mutex_exit(&dict_sys.mutex));
/* prebuilt->table->n_ref_count can be anything here,
given that we hold at most a shared lock on the table. */
goto ok_exit;
@@ -7316,10 +8707,7 @@ innobase_online_rebuild_log_free(
dict_table_t* table)
{
dict_index_t* clust_index = dict_table_get_first_index(table);
-
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
-
+ ut_d(dict_sys.assert_locked());
rw_lock_x_lock(&clust_index->lock);
if (clust_index->online_log) {
@@ -7550,6 +8938,14 @@ func_exit:
row_mysql_unlock_data_dictionary(prebuilt->trx);
}
+
+ if (ctx->add_vcol) {
+ for (ulint i = 0; i < ctx->num_to_add_vcol; i++) {
+ ctx->add_vcol[i].~dict_v_col_t();
+ }
+ ctx->num_to_add_vcol = 0;
+ ctx->add_vcol = nullptr;
+ }
}
/* Reset dict_col_t::ord_part for those columns fail to be indexed,
@@ -7600,8 +8996,7 @@ innobase_drop_foreign_try(
DBUG_ASSERT(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
/* Drop the constraint from the data dictionary. */
static const char sql[] =
@@ -7637,7 +9032,6 @@ innobase_drop_foreign_try(
@param[in] ctx ALTER TABLE context
@param[in,out] trx Data dictionary transaction
@param[in] table_name Table name in MySQL
-@param[in] nth_col 0-based index of the column
@param[in] from old column name
@param[in] to new column name
@retval true Failure
@@ -7648,11 +9042,9 @@ innobase_rename_column_try(
const ha_innobase_inplace_ctx& ctx,
trx_t* trx,
const char* table_name,
- ulint nth_col,
const char* from,
const char* to)
{
- pars_info_t* info;
dberr_t error;
bool clust_has_prefixes = false;
@@ -7660,41 +9052,13 @@ innobase_rename_column_try(
DBUG_ASSERT(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
if (ctx.need_rebuild()) {
goto rename_foreign;
}
- info = pars_info_create();
-
- pars_info_add_ull_literal(info, "tableid", ctx.old_table->id);
- pars_info_add_int4_literal(info, "nth", nth_col);
- pars_info_add_str_literal(info, "new", to);
-
- trx->op_info = "renaming column in SYS_COLUMNS";
-
- error = que_eval_sql(
- info,
- "PROCEDURE RENAME_SYS_COLUMNS_PROC () IS\n"
- "BEGIN\n"
- "UPDATE SYS_COLUMNS SET NAME=:new\n"
- "WHERE TABLE_ID=:tableid\n"
- "AND POS=:nth;\n"
- "END;\n",
- FALSE, trx);
-
- DBUG_EXECUTE_IF("ib_rename_column_error",
- error = DB_OUT_OF_FILE_SPACE;);
-
- if (error != DB_SUCCESS) {
-err_exit:
- my_error_innodb(error, table_name, 0);
- trx->error_state = DB_SUCCESS;
- trx->op_info = "";
- DBUG_RETURN(true);
- }
+ error = DB_SUCCESS;
trx->op_info = "renaming column in SYS_FIELDS";
@@ -7712,19 +9076,16 @@ err_exit:
}
for (ulint i = 0; i < dict_index_get_n_fields(index); i++) {
- const dict_field_t* field
- = dict_index_get_nth_field(index, i);
- if (my_strcasecmp(system_charset_info, field->name,
- from)) {
+ const dict_field_t& f = index->fields[i];
+ DBUG_ASSERT(!f.name == f.col->is_dropped());
+
+ if (!f.name || my_strcasecmp(system_charset_info,
+ f.name, from)) {
continue;
}
- info = pars_info_create();
-
- ulint pos = i;
- if (has_prefixes) {
- pos = (pos << 16) + field->prefix_len;
- }
+ pars_info_t* info = pars_info_create();
+ ulint pos = has_prefixes ? i << 16 | f.prefix_len : i;
pars_info_add_ull_literal(info, "indexid", index->id);
pars_info_add_int4_literal(info, "nth", pos);
@@ -7739,13 +9100,15 @@ err_exit:
"AND POS=:nth;\n"
"END;\n",
FALSE, trx);
+ DBUG_EXECUTE_IF("ib_rename_column_error",
+ error = DB_OUT_OF_FILE_SPACE;);
if (error != DB_SUCCESS) {
goto err_exit;
}
if (!has_prefixes || !clust_has_prefixes
- || field->prefix_len) {
+ || f.prefix_len) {
continue;
}
@@ -7779,6 +9142,14 @@ err_exit:
}
}
+ if (error != DB_SUCCESS) {
+err_exit:
+ my_error_innodb(error, table_name, 0);
+ trx->error_state = DB_SUCCESS;
+ trx->op_info = "";
+ DBUG_RETURN(true);
+ }
+
rename_foreign:
trx->op_info = "renaming column in SYS_FOREIGN_COLS";
@@ -7807,7 +9178,7 @@ rename_foreign:
continue;
}
- info = pars_info_create();
+ pars_info_t* info = pars_info_create();
pars_info_add_str_literal(info, "id", foreign->id);
pars_info_add_int4_literal(info, "nth", i);
@@ -7849,7 +9220,7 @@ rename_foreign:
continue;
}
- info = pars_info_create();
+ pars_info_t* info = pars_info_create();
pars_info_add_str_literal(info, "id", foreign->id);
pars_info_add_int4_literal(info, "nth", i);
@@ -7904,34 +9275,24 @@ innobase_rename_columns_try(
trx_t* trx,
const char* table_name)
{
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
uint i = 0;
- ulint num_v = 0;
+ DBUG_ASSERT(ctx->need_rebuild());
DBUG_ASSERT(ha_alter_info->handler_flags
& ALTER_COLUMN_NAME);
for (Field** fp = table->field; *fp; fp++, i++) {
- const bool is_virtual = !(*fp)->stored_in_db();
if (!((*fp)->flags & FIELD_IS_RENAMED)) {
- goto processed_field;
+ continue;
}
- cf_it.rewind();
-
- while (Create_field* cf = cf_it++) {
- if (cf->field == *fp) {
- ulint col_n = is_virtual
- ? dict_create_v_col_pos(
- num_v, i)
- : i - num_v;
-
+ for (const Create_field& cf :
+ ha_alter_info->alter_info->create_list) {
+ if (cf.field == *fp) {
if (innobase_rename_column_try(
*ctx, trx, table_name,
- col_n,
- cf->field->field_name.str,
- cf->field_name.str)) {
+ cf.field->field_name.str,
+ cf.field_name.str)) {
return(true);
}
goto processed_field;
@@ -7940,73 +9301,105 @@ innobase_rename_columns_try(
ut_error;
processed_field:
- if (is_virtual) {
- num_v++;
- }
-
continue;
}
return(false);
}
+/** Convert field type and length to InnoDB format */
+static void get_type(const Field& f, ulint& prtype, ulint& mtype, ulint& len)
+{
+ mtype = get_innobase_type_from_mysql_type(&prtype, &f);
+ len = f.pack_length();
+ prtype |= f.type();
+ if (f.type() == MYSQL_TYPE_VARCHAR) {
+ auto l = static_cast<const Field_varstring&>(f).length_bytes;
+ len -= l;
+ if (l == 2) prtype |= DATA_LONG_TRUE_VARCHAR;
+ }
+ if (!f.real_maybe_null()) prtype |= DATA_NOT_NULL;
+ if (f.binary()) prtype |= DATA_BINARY_TYPE;
+ if (f.table->versioned()) {
+ if (&f == f.table->field[f.table->s->vers.start_fieldno]) {
+ prtype |= DATA_VERS_START;
+ } else if (&f == f.table->field[f.table->s->vers.end_fieldno]) {
+ prtype |= DATA_VERS_END;
+ } else if (!(f.flags & VERS_UPDATE_UNVERSIONED_FLAG)) {
+ prtype |= DATA_VERSIONED;
+ }
+ }
+ if (!f.stored_in_db()) prtype |= DATA_VIRTUAL;
+
+ if (dtype_is_string_type(mtype)) {
+ prtype |= ulint(f.charset()->number) << 16;
+ }
+}
+
/** Enlarge a column in the data dictionary tables.
-@param user_table InnoDB table that was being altered
+@param ctx In-place ALTER TABLE context
@param trx data dictionary transaction
@param table_name Table name in MySQL
-@param nth_col 0-based index of the column
-@param new_len new column length, in bytes
+@param pos 0-based index to user_table->cols[] or user_table->v_cols[]
+@param f new column
@param is_v if it's a virtual column
@retval true Failure
@retval false Success */
static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
-innobase_enlarge_column_try(
-/*========================*/
- const dict_table_t* user_table,
+innobase_rename_or_enlarge_column_try(
+ ha_innobase_inplace_ctx*ctx,
trx_t* trx,
const char* table_name,
- ulint nth_col,
- ulint new_len,
+ ulint pos,
+ const Field& f,
bool is_v)
{
- pars_info_t* info;
- dberr_t error;
-#ifdef UNIV_DEBUG
dict_col_t* col;
-#endif /* UNIV_DEBUG */
- dict_v_col_t* v_col;
- ulint pos;
+ dict_table_t* user_table = ctx->old_table;
- DBUG_ENTER("innobase_enlarge_column_try");
+ DBUG_ENTER("innobase_rename_or_enlarge_column_try");
+ DBUG_ASSERT(!ctx->need_rebuild());
DBUG_ASSERT(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
+
+ ulint n_base;
if (is_v) {
- v_col = dict_table_get_nth_v_col(user_table, nth_col);
+ dict_v_col_t* v_col= dict_table_get_nth_v_col(user_table, pos);
pos = dict_create_v_col_pos(v_col->v_pos, v_col->m_col.ind);
-#ifdef UNIV_DEBUG
col = &v_col->m_col;
-#endif /* UNIV_DEBUG */
+ n_base = v_col->num_base;
} else {
-#ifdef UNIV_DEBUG
- col = dict_table_get_nth_col(user_table, nth_col);
-#endif /* UNIV_DEBUG */
- pos = nth_col;
+ col = dict_table_get_nth_col(user_table, pos);
+ n_base = 0;
}
+ ulint prtype, mtype, len;
+ get_type(f, prtype, mtype, len);
+ DBUG_ASSERT(!dtype_is_string_type(col->mtype)
+ || col->mbminlen == f.charset()->mbminlen);
+ DBUG_ASSERT(col->len <= len);
+
#ifdef UNIV_DEBUG
- ut_ad(col->len < new_len);
- switch (col->mtype) {
+ ut_ad(col->mbminlen <= col->mbmaxlen);
+ switch (mtype) {
case DATA_MYSQL:
- /* NOTE: we could allow this when !(prtype & DATA_BINARY_TYPE)
- and ROW_FORMAT is not REDUNDANT and mbminlen<mbmaxlen.
- That is, we treat a UTF-8 CHAR(n) column somewhat like
- a VARCHAR. */
- ut_error;
+ if (!(prtype & DATA_BINARY_TYPE) || user_table->not_redundant()
+ || col->mbminlen != col->mbmaxlen) {
+ /* NOTE: we could allow this when !(prtype &
+ DATA_BINARY_TYPE) and ROW_FORMAT is not REDUNDANT and
+ mbminlen<mbmaxlen. That is, we treat a UTF-8 CHAR(n)
+ column somewhat like a VARCHAR. */
+ break;
+ }
+ /* fall through */
+ case DATA_FIXBINARY:
+ case DATA_CHAR:
+ ut_ad(col->len == len);
+ break;
case DATA_BINARY:
case DATA_VARCHAR:
case DATA_VARMYSQL:
@@ -8014,60 +9407,61 @@ innobase_enlarge_column_try(
case DATA_BLOB:
break;
default:
- ut_error;
+ ut_ad(!((col->prtype ^ prtype) & ~DATA_VERSIONED));
+ ut_ad(col->mtype == mtype);
+ ut_ad(col->len == len);
}
#endif /* UNIV_DEBUG */
- info = pars_info_create();
-
- pars_info_add_ull_literal(info, "tableid", user_table->id);
- pars_info_add_int4_literal(info, "nth", pos);
- pars_info_add_int4_literal(info, "new", new_len);
- trx->op_info = "resizing column in SYS_COLUMNS";
-
- error = que_eval_sql(
- info,
- "PROCEDURE RESIZE_SYS_COLUMNS_PROC () IS\n"
- "BEGIN\n"
- "UPDATE SYS_COLUMNS SET LEN=:new\n"
- "WHERE TABLE_ID=:tableid AND POS=:nth;\n"
- "END;\n",
- FALSE, trx);
+ const char* col_name = col->name(*user_table);
+ const bool same_name = !strcmp(col_name, f.field_name.str);
- DBUG_EXECUTE_IF("ib_resize_column_error",
- error = DB_OUT_OF_FILE_SPACE;);
-
- trx->op_info = "";
- trx->error_state = DB_SUCCESS;
-
- if (error != DB_SUCCESS) {
- my_error_innodb(error, table_name, 0);
+ if (!same_name
+ && innobase_rename_column_try(*ctx, trx, table_name,
+ col_name, f.field_name.str)) {
DBUG_RETURN(true);
}
- DBUG_RETURN(false);
+ if (same_name
+ && col->prtype == prtype && col->mtype == mtype
+ && col->len == len) {
+ DBUG_RETURN(false);
+ }
+
+ DBUG_RETURN(innodb_insert_sys_columns(user_table->id, pos,
+ f.field_name.str,
+ mtype, prtype, len,
+ n_base, trx, true));
}
-/** Enlarge columns in the data dictionary tables.
+/** Rename or enlarge columns in the data dictionary cache
+as part of commit_try_norebuild().
@param ha_alter_info Data used during in-place alter.
-@param table the TABLE
-@param user_table InnoDB table that was being altered
+@param ctx In-place ALTER TABLE context
+@param altered_table metadata after ALTER TABLE
+@param table metadata before ALTER TABLE
@param trx data dictionary transaction
@param table_name Table name in MySQL
@retval true Failure
@retval false Success */
static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
-innobase_enlarge_columns_try(
-/*=========================*/
+innobase_rename_or_enlarge_columns_try(
Alter_inplace_info* ha_alter_info,
+ ha_innobase_inplace_ctx*ctx,
+ const TABLE* altered_table,
const TABLE* table,
- const dict_table_t* user_table,
trx_t* trx,
const char* table_name)
{
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
+ DBUG_ENTER("innobase_rename_or_enlarge_columns_try");
+
+ if (!(ha_alter_info->handler_flags
+ & (ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE
+ | ALTER_COLUMN_NAME))) {
+ DBUG_RETURN(false);
+ }
+
ulint i = 0;
ulint num_v = 0;
@@ -8075,77 +9469,83 @@ innobase_enlarge_columns_try(
const bool is_v = !(*fp)->stored_in_db();
ulint idx = is_v ? num_v++ : i - num_v;
- cf_it.rewind();
- while (Create_field* cf = cf_it++) {
- if (cf->field == *fp) {
- if ((*fp)->is_equal(cf)
- == IS_EQUAL_PACK_LENGTH
- && innobase_enlarge_column_try(
- user_table, trx, table_name,
- idx, static_cast<ulint>(cf->length), is_v)) {
- return(true);
+ Field** af = altered_table->field;
+ for (const Create_field& cf :
+ ha_alter_info->alter_info->create_list) {
+ if (cf.field == *fp) {
+ if (innobase_rename_or_enlarge_column_try(
+ ctx, trx, table_name,
+ idx, **af, is_v)) {
+ DBUG_RETURN(true);
}
-
break;
}
+ af++;
}
}
- return(false);
+ DBUG_RETURN(false);
}
/** Rename or enlarge columns in the data dictionary cache
as part of commit_cache_norebuild().
@param ha_alter_info Data used during in-place alter.
-@param table the TABLE
+@param altered_table metadata after ALTER TABLE
+@param table metadata before ALTER TABLE
@param user_table InnoDB table that was being altered */
static MY_ATTRIBUTE((nonnull))
void
innobase_rename_or_enlarge_columns_cache(
/*=====================================*/
Alter_inplace_info* ha_alter_info,
+ const TABLE* altered_table,
const TABLE* table,
dict_table_t* user_table)
{
if (!(ha_alter_info->handler_flags
- & (ALTER_COLUMN_EQUAL_PACK_LENGTH
+ & (ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE
| ALTER_COLUMN_NAME))) {
return;
}
- List_iterator_fast<Create_field> cf_it(
- ha_alter_info->alter_info->create_list);
uint i = 0;
ulint num_v = 0;
for (Field** fp = table->field; *fp; fp++, i++) {
const bool is_virtual = !(*fp)->stored_in_db();
- cf_it.rewind();
- while (Create_field* cf = cf_it++) {
- if (cf->field != *fp) {
+ Field** af = altered_table->field;
+ for (Create_field& cf :
+ ha_alter_info->alter_info->create_list) {
+ if (cf.field != *fp) {
+ af++;
continue;
}
ulint col_n = is_virtual ? num_v : i - num_v;
-
- if ((*fp)->is_equal(cf) == IS_EQUAL_PACK_LENGTH) {
- if (is_virtual) {
- dict_table_get_nth_v_col(
- user_table, col_n)->m_col.len
- = cf->length;
- } else {
- dict_table_get_nth_col(
- user_table, col_n)->len
- = cf->length;
- }
- }
+ dict_col_t *col = is_virtual
+ ? &dict_table_get_nth_v_col(user_table, col_n)
+ ->m_col
+ : dict_table_get_nth_col(user_table, col_n);
+ const bool is_string= dtype_is_string_type(col->mtype);
+ DBUG_ASSERT(col->mbminlen
+ == (is_string
+ ? (*af)->charset()->mbminlen : 0));
+ ulint prtype, mtype, len;
+ get_type(**af, prtype, mtype, len);
+ DBUG_ASSERT(is_string == dtype_is_string_type(mtype));
+
+ col->prtype = prtype;
+ col->mtype = mtype;
+ col->len = len;
+ col->mbmaxlen = is_string
+ ? (*af)->charset()->mbmaxlen : 0;
if ((*fp)->flags & FIELD_IS_RENAMED) {
dict_mem_table_col_rename(
user_table, col_n,
- cf->field->field_name.str,
- cf->field_name.str, is_virtual);
+ cf.field->field_name.str,
+ (*af)->field_name.str, is_virtual);
}
break;
@@ -8385,7 +9785,7 @@ innobase_update_foreign_cache(
DBUG_ENTER("innobase_update_foreign_cache");
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
user_table = ctx->old_table;
@@ -8538,27 +9938,24 @@ vers_change_fields_try(
DBUG_ASSERT(ha_alter_info);
DBUG_ASSERT(ctx);
- List_iterator_fast<Create_field> it(
- ha_alter_info->alter_info->create_list);
-
- while (const Create_field* create_field = it++) {
- if (!create_field->field) {
+ for (const Create_field& create_field : ha_alter_info->alter_info->create_list) {
+ if (!create_field.field) {
continue;
}
- if (create_field->versioning
+ if (create_field.versioning
== Column_definition::VERSIONING_NOT_SET) {
continue;
}
const dict_table_t* new_table = ctx->new_table;
- const uint pos = innodb_col_no(create_field->field);
+ const uint pos = innodb_col_no(create_field.field);
const dict_col_t* col = dict_table_get_nth_col(new_table, pos);
DBUG_ASSERT(!col->vers_sys_start());
DBUG_ASSERT(!col->vers_sys_end());
ulint new_prtype
- = create_field->versioning
+ = create_field.versioning
== Column_definition::WITHOUT_VERSIONING
? col->prtype & ~DATA_VERSIONED
: col->prtype | DATA_VERSIONED;
@@ -8591,23 +9988,21 @@ vers_change_fields_cache(
DBUG_ASSERT(ctx);
DBUG_ASSERT(ha_alter_info->handler_flags & ALTER_COLUMN_UNVERSIONED);
- List_iterator_fast<Create_field> it(
- ha_alter_info->alter_info->create_list);
-
- while (const Create_field* create_field = it++) {
- if (!create_field->field || create_field->field->vcol_info) {
+ for (const Create_field& create_field :
+ ha_alter_info->alter_info->create_list) {
+ if (!create_field.field || create_field.field->vcol_info) {
continue;
}
dict_col_t* col = dict_table_get_nth_col(
- ctx->new_table, innodb_col_no(create_field->field));
+ ctx->new_table, innodb_col_no(create_field.field));
- if (create_field->versioning
+ if (create_field.versioning
== Column_definition::WITHOUT_VERSIONING) {
DBUG_ASSERT(!col->vers_sys_start());
DBUG_ASSERT(!col->vers_sys_end());
col->prtype &= ~DATA_VERSIONED;
- } else if (create_field->versioning
+ } else if (create_field.versioning
== Column_definition::WITH_VERSIONING) {
DBUG_ASSERT(!col->vers_sys_start());
@@ -8731,6 +10126,38 @@ commit_try_rebuild(
}
}
+/** Rename indexes in dictionary.
+@param[in] ctx alter info context
+@param[in] ha_alter_info Operation used during inplace alter
+@param[out] trx transaction to change the index name
+ in dictionary
+@return true if it failed to rename
+@return false if it is success. */
+static
+bool
+rename_indexes_try(
+ const ha_innobase_inplace_ctx* ctx,
+ const Alter_inplace_info* ha_alter_info,
+ trx_t* trx)
+{
+ DBUG_ASSERT(ha_alter_info->handler_flags & ALTER_RENAME_INDEX);
+
+ for (const Alter_inplace_info::Rename_key_pair& pair :
+ ha_alter_info->rename_keys) {
+ dict_index_t* index = dict_table_get_index_on_name(
+ ctx->old_table, pair.old_key->name.str);
+ // This was checked previously in
+ // ha_innobase::prepare_inplace_alter_table()
+ ut_ad(index);
+
+ if (rename_index_try(index, pair.new_key->name.str, trx)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
/** Apply the changes made during commit_try_rebuild(),
to the data dictionary cache and the file system.
@param ctx In-place ALTER TABLE context */
@@ -8766,8 +10193,7 @@ commit_cache_rebuild(
/** Set of column numbers */
typedef std::set<ulint, std::less<ulint>, ut_allocator<ulint> > col_set;
-/** Store the column number of the columns in a list belonging
-to indexes which are not being dropped.
+/** Collect (not instantly dropped) columns from dropped indexes
@param[in] ctx In-place ALTER TABLE context
@param[in, out] drop_col_list list which will be set, containing columns
which is part of index being dropped
@@ -8776,7 +10202,7 @@ to indexes which are not being dropped.
being dropped */
static
void
-get_col_list_to_be_dropped(
+collect_columns_from_dropped_indexes(
const ha_innobase_inplace_ctx* ctx,
col_set& drop_col_list,
col_set& drop_v_col_list)
@@ -8797,6 +10223,12 @@ get_col_list_to_be_dropped(
} else {
ulint col_no = dict_col_get_no(idx_col);
+ if (ctx->col_map
+ && ctx->col_map[col_no]
+ == ULINT_UNDEFINED) {
+ // this column was instantly dropped
+ continue;
+ }
drop_col_list.insert(col_no);
}
}
@@ -8883,7 +10315,7 @@ innobase_reload_table(THD *thd, dict_table_t *table,
{
char *tb_name= strdup(table->name.m_name);
dict_table_close(table, true, false);
- dict_table_remove_from_cache(table);
+ dict_sys.remove(table);
table= dict_table_open_on_name(tb_name, TRUE, TRUE,
DICT_ERR_IGNORE_FK_NOKEY);
@@ -9020,34 +10452,49 @@ commit_try_norebuild(
}
}
- if ((ha_alter_info->handler_flags
- & ALTER_COLUMN_NAME)
- && innobase_rename_columns_try(ha_alter_info, ctx, old_table,
- trx, table_name)) {
+ if (innobase_rename_or_enlarge_columns_try(ha_alter_info, ctx,
+ altered_table, old_table,
+ trx, table_name)) {
DBUG_RETURN(true);
}
- if ((ha_alter_info->handler_flags
- & ALTER_COLUMN_EQUAL_PACK_LENGTH)
- && innobase_enlarge_columns_try(ha_alter_info, old_table,
- ctx->old_table, trx, table_name)) {
+ if ((ha_alter_info->handler_flags & ALTER_RENAME_INDEX)
+ && rename_indexes_try(ctx, ha_alter_info, trx)) {
DBUG_RETURN(true);
}
- if ((ha_alter_info->handler_flags
- & ALTER_DROP_VIRTUAL_COLUMN)
- && innobase_drop_virtual_try(ha_alter_info, ctx->old_table, trx)) {
- DBUG_RETURN(true);
+ if (ctx->is_instant()) {
+ DBUG_RETURN(innobase_instant_try(ha_alter_info, ctx,
+ altered_table, old_table,
+ trx));
}
- if ((ha_alter_info->handler_flags
- & ALTER_ADD_VIRTUAL_COLUMN)
- && innobase_add_virtual_try(ha_alter_info, ctx->old_table, trx)) {
- DBUG_RETURN(true);
- }
+ if (ha_alter_info->handler_flags
+ & (ALTER_DROP_VIRTUAL_COLUMN | ALTER_ADD_VIRTUAL_COLUMN)) {
+ if ((ha_alter_info->handler_flags & ALTER_DROP_VIRTUAL_COLUMN)
+ && innobase_drop_virtual_try(ha_alter_info, ctx->old_table,
+ trx)) {
+ DBUG_RETURN(true);
+ }
- if (innobase_add_instant_try(ctx, altered_table, old_table, trx)) {
- DBUG_RETURN(true);
+ if ((ha_alter_info->handler_flags & ALTER_ADD_VIRTUAL_COLUMN)
+ && innobase_add_virtual_try(ha_alter_info, ctx->old_table,
+ trx)) {
+ DBUG_RETURN(true);
+ }
+
+ ulint n_col = unsigned(ctx->old_table->n_cols)
+ - DATA_N_SYS_COLS;
+ ulint n_v_col = unsigned(ctx->old_table->n_v_cols)
+ + ctx->num_to_add_vcol - ctx->num_to_drop_vcol;
+
+ if (innodb_update_cols(
+ ctx->old_table,
+ dict_table_encode_n_col(n_col, n_v_col)
+ | unsigned(ctx->old_table->flags & DICT_TF_COMPACT)
+ << 31, trx)) {
+ DBUG_RETURN(true);
+ }
}
DBUG_RETURN(false);
@@ -9057,6 +10504,7 @@ commit_try_norebuild(
after a successful commit_try_norebuild() call.
@param ha_alter_info algorithm=inplace context
@param ctx In-place ALTER TABLE context for the current partition
+@param altered_table the TABLE after the ALTER
@param table the TABLE before the ALTER
@param trx Data dictionary transaction
(will be started and committed, for DROP INDEX)
@@ -9067,6 +10515,7 @@ commit_cache_norebuild(
/*===================*/
Alter_inplace_info* ha_alter_info,
ha_innobase_inplace_ctx*ctx,
+ const TABLE* altered_table,
const TABLE* table,
trx_t* trx)
{
@@ -9089,11 +10538,17 @@ commit_cache_norebuild(
bool update = !(space->flags
& FSP_FLAGS_MASK_PAGE_COMPRESSION);
mutex_enter(&fil_system.mutex);
- space->flags = (~FSP_FLAGS_MASK_MEM_COMPRESSION_LEVEL
- & (space->flags
- | FSP_FLAGS_MASK_PAGE_COMPRESSION))
- | ctx->page_compression_level
+ space->flags &= ~FSP_FLAGS_MASK_MEM_COMPRESSION_LEVEL;
+ space->flags |= ctx->page_compression_level
<< FSP_FLAGS_MEM_COMPRESSION_LEVEL;
+ if (!space->full_crc32()) {
+ space->flags
+ |= FSP_FLAGS_MASK_PAGE_COMPRESSION;
+ } else if (!space->is_compressed()) {
+ space->flags
+ |= innodb_compression_algorithm
+ << FSP_FLAGS_FCRC32_POS_COMPRESSED_ALGO;
+ }
mutex_exit(&fil_system.mutex);
if (update) {
@@ -9111,7 +10566,7 @@ commit_cache_norebuild(
mtr.start();
if (buf_block_t* b = buf_page_get(
page_id_t(space->id, 0),
- page_size_t(space->flags),
+ space->zip_size(),
RW_X_LATCH, &mtr)) {
mtr.set_named_space(space);
mlog_write_ulint(
@@ -9128,25 +10583,21 @@ commit_cache_norebuild(
col_set drop_list;
col_set v_drop_list;
- col_set::const_iterator col_it;
/* Check if the column, part of an index to be dropped is part of any
other index which is not being dropped. If it so, then set the ord_part
of the column to 0. */
- get_col_list_to_be_dropped(ctx, drop_list, v_drop_list);
+ collect_columns_from_dropped_indexes(ctx, drop_list, v_drop_list);
- for (col_it = drop_list.begin(); col_it != drop_list.end(); ++col_it) {
- if (!check_col_exists_in_indexes(ctx->new_table,
- *col_it, false)) {
- ctx->new_table->cols[*col_it].ord_part = 0;
+ for (ulint col : drop_list) {
+ if (!check_col_exists_in_indexes(ctx->new_table, col, false)) {
+ ctx->new_table->cols[col].ord_part = 0;
}
}
- for (col_it = v_drop_list.begin();
- col_it != v_drop_list.end(); ++col_it) {
- if (!check_col_exists_in_indexes(ctx->new_table,
- *col_it, true)) {
- ctx->new_table->v_cols[*col_it].m_col.ord_part = 0;
+ for (ulint col : v_drop_list) {
+ if (!check_col_exists_in_indexes(ctx->new_table, col, true)) {
+ ctx->new_table->v_cols[col].m_col.ord_part = 0;
}
}
@@ -9215,13 +10666,57 @@ commit_cache_norebuild(
if (!ctx->is_instant()) {
innobase_rename_or_enlarge_columns_cache(
- ha_alter_info, table, ctx->new_table);
+ ha_alter_info, altered_table, table, ctx->new_table);
+ } else {
+ ut_ad(ctx->col_map);
+
+ if (fts_t* fts = ctx->new_table->fts) {
+ ut_ad(fts->doc_col != ULINT_UNDEFINED);
+ ut_ad(ctx->new_table->n_cols > DATA_N_SYS_COLS);
+ const ulint c = ctx->col_map[fts->doc_col];
+ ut_ad(c < ulint(ctx->new_table->n_cols)
+ - DATA_N_SYS_COLS);
+ ut_d(const dict_col_t& col = ctx->new_table->cols[c]);
+ ut_ad(!col.is_nullable());
+ ut_ad(!col.is_virtual());
+ ut_ad(!col.is_added());
+ ut_ad(col.prtype & DATA_UNSIGNED);
+ ut_ad(col.mtype == DATA_INT);
+ ut_ad(col.len == 8);
+ ut_ad(col.ord_part);
+ fts->doc_col = c;
+ }
+
+ if (ha_alter_info->handler_flags & ALTER_DROP_STORED_COLUMN) {
+ const dict_index_t* index = ctx->new_table->indexes.start;
+
+ for (const dict_field_t* f = index->fields,
+ * const end = f + index->n_fields;
+ f != end; f++) {
+ dict_col_t& c = *f->col;
+ if (c.is_dropped()) {
+ c.set_dropped(!c.is_nullable(),
+ DATA_LARGE_MTYPE(c.mtype)
+ || (!f->fixed_len
+ && c.len > 255),
+ f->fixed_len);
+ }
+ }
+ }
+
+ if (!ctx->instant_table->persistent_autoinc) {
+ ctx->new_table->persistent_autoinc = 0;
+ }
}
if (ha_alter_info->handler_flags & ALTER_COLUMN_UNVERSIONED) {
vers_change_fields_cache(ha_alter_info, ctx, table);
}
+ if (ha_alter_info->handler_flags & ALTER_RENAME_INDEX) {
+ innobase_rename_indexes_cache(ctx, ha_alter_info);
+ }
+
ctx->new_table->fts_doc_id_index
= ctx->new_table->fts
? dict_table_get_index_on_name(
@@ -9229,6 +10724,10 @@ commit_cache_norebuild(
: NULL;
DBUG_ASSERT((ctx->new_table->fts == NULL)
== (ctx->new_table->fts_doc_id_index == NULL));
+ if (table->found_next_number_field
+ && !altered_table->found_next_number_field) {
+ ctx->prebuilt->table->persistent_autoinc = 0;
+ }
DBUG_RETURN(found);
}
@@ -9260,7 +10759,7 @@ alter_stats_norebuild(
in a separate transaction from trx, because lock waits are not
allowed in a data dictionary transaction. (Lock waits are possible
on the statistics table, because it is directly accessible by users,
- not covered by the dict_operation_lock.)
+ not covered by the dict_sys.latch.)
Because the data dictionary changes were already committed, orphaned
rows may be left in the statistics table if the system crashes.
@@ -9291,6 +10790,62 @@ alter_stats_norebuild(
}
}
+ for (size_t i = 0; i < ha_alter_info->rename_keys.size(); i++) {
+ const Alter_inplace_info::Rename_key_pair& pair
+ = ha_alter_info->rename_keys[i];
+
+ std::stringstream ss;
+ ss << TEMP_FILE_PREFIX_INNODB << std::this_thread::get_id()
+ << i;
+ auto tmp_name = ss.str();
+
+ dberr_t err = dict_stats_rename_index(ctx->new_table,
+ pair.old_key->name.str,
+ tmp_name.c_str());
+
+ if (err != DB_SUCCESS) {
+ push_warning_printf(
+ thd,
+ Sql_condition::WARN_LEVEL_WARN,
+ ER_ERROR_ON_RENAME,
+ "Error renaming an index of table '%s'"
+ " from '%s' to '%s' in InnoDB persistent"
+ " statistics storage: %s",
+ ctx->new_table->name.m_name,
+ pair.old_key->name.str,
+ tmp_name.c_str(),
+ ut_strerr(err));
+ }
+ }
+
+ for (size_t i = 0; i < ha_alter_info->rename_keys.size(); i++) {
+ const Alter_inplace_info::Rename_key_pair& pair
+ = ha_alter_info->rename_keys[i];
+
+ std::stringstream ss;
+ ss << TEMP_FILE_PREFIX_INNODB << std::this_thread::get_id()
+ << i;
+ auto tmp_name = ss.str();
+
+ dberr_t err = dict_stats_rename_index(ctx->new_table,
+ tmp_name.c_str(),
+ pair.new_key->name.str);
+
+ if (err != DB_SUCCESS) {
+ push_warning_printf(
+ thd,
+ Sql_condition::WARN_LEVEL_WARN,
+ ER_ERROR_ON_RENAME,
+ "Error renaming an index of table '%s'"
+ " from '%s' to '%s' in InnoDB persistent"
+ " statistics storage: %s",
+ ctx->new_table->name.m_name,
+ tmp_name.c_str(),
+ pair.new_key->name.str,
+ ut_strerr(err));
+ }
+ }
+
for (i = 0; i < ctx->num_to_add_index; i++) {
dict_index_t* index = ctx->add_index[i];
DBUG_ASSERT(index->table == ctx->new_table);
@@ -9326,23 +10881,8 @@ alter_stats_rebuild(
DBUG_VOID_RETURN;
}
-#ifndef DBUG_OFF
- bool file_unreadable_orig = false;
-#endif /* DBUG_OFF */
-
- DBUG_EXECUTE_IF(
- "ib_rename_index_fail2",
- file_unreadable_orig = table->file_unreadable;
- table->file_unreadable = true;
- );
-
dberr_t ret = dict_stats_update(table, DICT_STATS_RECALC_PERSISTENT);
- DBUG_EXECUTE_IF(
- "ib_rename_index_fail2",
- table->file_unreadable = file_unreadable_orig;
- );
-
if (ret != DB_SUCCESS) {
push_warning_printf(
thd,
@@ -9512,7 +11052,15 @@ ha_innobase::commit_inplace_alter_table(
if (!(ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)) {
DBUG_ASSERT(!ctx0);
MONITOR_ATOMIC_DEC(MONITOR_PENDING_ALTER_TABLE);
- ha_alter_info->group_commit_ctx = NULL;
+ if (table->found_next_number_field
+ && !altered_table->found_next_number_field) {
+ m_prebuilt->table->persistent_autoinc = 0;
+ /* Don't reset ha_alter_info->group_commit_ctx to make
+ partitions engine to call this function for all
+ partitions. */
+ }
+ else
+ ha_alter_info->group_commit_ctx = NULL;
DBUG_RETURN(false);
}
@@ -9826,7 +11374,7 @@ ha_innobase::commit_inplace_alter_table(
logical sense the commit in the file-based
data structures happens here. */
- trx_commit_low(trx, &mtr);
+ trx->commit_low(&mtr);
}
/* If server crashes here, the dictionary in
@@ -9921,7 +11469,8 @@ foreign_fail:
bool fk_fail = innobase_update_foreign_cache(
ctx, m_user_thd) != DB_SUCCESS;
- if (!commit_cache_norebuild(ha_alter_info, ctx, table,
+ if (!commit_cache_norebuild(ha_alter_info, ctx,
+ altered_table, table,
trx)) {
fk_fail = true;
}
@@ -9992,13 +11541,26 @@ foreign_fail:
}
}
+ /* MDEV-17468: Avoid this at least when ctx->is_instant().
+ Currently dict_load_column_low() is the only place where
+ num_base for virtual columns is assigned to nonzero. */
if (ctx0->num_to_drop_vcol || ctx0->num_to_add_vcol
|| (ctx0->new_table->n_v_cols && !new_clustered
&& (ha_alter_info->alter_info->drop_list.elements
- || ha_alter_info->alter_info->create_list.elements))) {
+ || ha_alter_info->alter_info->create_list.elements))
+ || (ctx0->is_instant()
+ && m_prebuilt->table->n_v_cols
+ && ha_alter_info->handler_flags & ALTER_STORED_COLUMN_ORDER)) {
DBUG_ASSERT(ctx0->old_table->get_ref_count() == 1);
trx_commit_for_mysql(m_prebuilt->trx);
+ if (ctx0->is_instant()) {
+ for (unsigned i = ctx0->old_n_v_cols; i--; ) {
+ ctx0->old_v_cols[i].~dict_v_col_t();
+ }
+ const_cast<unsigned&>(ctx0->old_n_v_cols) = 0;
+ }
+
m_prebuilt->table = innobase_reload_table(m_user_thd,
m_prebuilt->table,
table->s->table_name);
@@ -10006,6 +11568,8 @@ foreign_fail:
row_mysql_unlock_data_dictionary(trx);
trx->free();
MONITOR_ATOMIC_DEC(MONITOR_PENDING_ALTER_TABLE);
+ /* There is no need to reset dict_table_t::persistent_autoinc
+ as the table is reloaded */
DBUG_RETURN(false);
}
@@ -10064,20 +11628,10 @@ foreign_fail:
DBUG_ASSERT(0 == strcmp(ctx->old_table->name.m_name,
ctx->tmp_name));
- DBUG_EXECUTE_IF(
- "ib_rename_index_fail3",
- DBUG_SET("+d,innodb_report_deadlock");
- );
-
dict_stats_try_drop_table(m_user_thd,
ctx->new_table->name,
table->s->table_name);
- DBUG_EXECUTE_IF(
- "ib_rename_index_fail3",
- DBUG_SET("-d,innodb_report_deadlock");
- );
-
DBUG_EXECUTE_IF("ib_ddl_crash_before_commit",
DBUG_SUICIDE(););
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 20297ce1d61..c0951ab7e01 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -1334,12 +1334,12 @@ i_s_cmp_per_index_fill_low(
RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name.str);
/* Create a snapshot of the stats so we do not bump into lock
- order violations with dict_sys->mutex below. */
+ order violations with dict_sys.mutex below. */
mutex_enter(&page_zip_stat_per_index_mutex);
page_zip_stat_per_index_t snap (page_zip_stat_per_index);
mutex_exit(&page_zip_stat_per_index_mutex);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
page_zip_stat_per_index_t::iterator iter;
ulint i;
@@ -1396,13 +1396,13 @@ i_s_cmp_per_index_fill_low(
contents of INFORMATION_SCHEMA.innodb_cmp_per_index being
inconsistent, but it is an acceptable compromise. */
if (i == 1000) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
i = 0;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (reset) {
page_zip_reset_stat_per_index();
@@ -2402,18 +2402,18 @@ i_s_fts_deleted_generic_fill(
/* Prevent DROP of the internal tables for fulltext indexes.
FIXME: acquire DDL-blocking MDL on the user table name! */
- rw_lock_s_lock(&dict_operation_lock);
+ rw_lock_s_lock(&dict_sys.latch);
user_table = dict_table_open_on_id(
innodb_ft_aux_table_id, FALSE, DICT_TABLE_OP_NORMAL);
if (!user_table) {
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
DBUG_RETURN(0);
} else if (!dict_table_has_fts_index(user_table)
|| !user_table->is_readable()) {
dict_table_close(user_table, FALSE, FALSE);
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
DBUG_RETURN(0);
}
@@ -2430,7 +2430,7 @@ i_s_fts_deleted_generic_fill(
dict_table_close(user_table, FALSE, FALSE);
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
trx->free();
@@ -2775,14 +2775,14 @@ i_s_fts_index_cache_fill(
/* Prevent DROP of the internal tables for fulltext indexes.
FIXME: acquire DDL-blocking MDL on the user table name! */
- rw_lock_s_lock(&dict_operation_lock);
+ rw_lock_s_lock(&dict_sys.latch);
user_table = dict_table_open_on_id(
innodb_ft_aux_table_id, FALSE, DICT_TABLE_OP_NORMAL);
if (!user_table) {
no_fts:
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
DBUG_RETURN(0);
}
@@ -2813,7 +2813,7 @@ no_fts:
rw_lock_s_unlock(&cache->lock);
dict_table_close(user_table, FALSE, FALSE);
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
DBUG_RETURN(ret);
}
@@ -2970,9 +2970,9 @@ i_s_fts_index_table_fill_selected(
}
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
que_graph_free(graph);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
trx->free();
@@ -3222,13 +3222,13 @@ i_s_fts_index_table_fill(
/* Prevent DROP of the internal tables for fulltext indexes.
FIXME: acquire DDL-blocking MDL on the user table name! */
- rw_lock_s_lock(&dict_operation_lock);
+ rw_lock_s_lock(&dict_sys.latch);
user_table = dict_table_open_on_id(
innodb_ft_aux_table_id, FALSE, DICT_TABLE_OP_NORMAL);
if (!user_table) {
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
DBUG_RETURN(0);
}
@@ -3248,7 +3248,7 @@ i_s_fts_index_table_fill(
dict_table_close(user_table, FALSE, FALSE);
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
ut_free(conv_str.f_str);
@@ -3371,14 +3371,14 @@ i_s_fts_config_fill(
/* Prevent DROP of the internal tables for fulltext indexes.
FIXME: acquire DDL-blocking MDL on the user table name! */
- rw_lock_s_lock(&dict_operation_lock);
+ rw_lock_s_lock(&dict_sys.latch);
user_table = dict_table_open_on_id(
innodb_ft_aux_table_id, FALSE, DICT_TABLE_OP_NORMAL);
if (!user_table) {
no_fts:
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
DBUG_RETURN(0);
}
@@ -3442,7 +3442,7 @@ no_fts:
dict_table_close(user_table, FALSE, FALSE);
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
trx->free();
@@ -4025,7 +4025,7 @@ i_s_innodb_buffer_page_fill(
if (page_info->page_type == I_S_PAGE_TYPE_INDEX) {
bool ret = false;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
const dict_index_t* index =
dict_index_get_if_in_cache_low(
@@ -4050,7 +4050,7 @@ i_s_innodb_buffer_page_fill(
system_charset_info);
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
OK(ret);
@@ -4628,7 +4628,7 @@ i_s_innodb_buf_page_lru_fill(
if (page_info->page_type == I_S_PAGE_TYPE_INDEX) {
bool ret = false;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
const dict_index_t* index =
dict_index_get_if_in_cache_low(
@@ -4653,7 +4653,7 @@ i_s_innodb_buf_page_lru_fill(
system_charset_info);
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
OK(ret);
@@ -4974,7 +4974,7 @@ i_s_dict_fill_sys_tables(
ulint compact = DICT_TF_GET_COMPACT(table->flags);
ulint atomic_blobs = DICT_TF_HAS_ATOMIC_BLOBS(
table->flags);
- const page_size_t& page_size = dict_tf_get_page_size(table->flags);
+ const ulint zip_size = dict_tf_get_zip_size(table->flags);
const char* row_format;
if (!compact) {
@@ -5003,10 +5003,7 @@ i_s_dict_fill_sys_tables(
OK(field_store_string(fields[SYS_TABLES_ROW_FORMAT], row_format));
- OK(fields[SYS_TABLES_ZIP_PAGE_SIZE]->store(
- page_size.is_compressed()
- ? page_size.physical()
- : 0, true));
+ OK(fields[SYS_TABLES_ZIP_PAGE_SIZE]->store(zip_size, true));
OK(field_store_string(fields[SYS_TABLES_SPACE_TYPE],
table->space_id ? "Single" : "System"));
@@ -5041,7 +5038,7 @@ i_s_sys_tables_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_startscan_system(&pcur, &mtr, SYS_TABLES);
@@ -5055,7 +5052,7 @@ i_s_sys_tables_fill_table(
err_msg = dict_process_sys_tables_rec_and_mtr_commit(
heap, rec, &table_rec, false, &mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_tables(thd, table_rec,
@@ -5073,13 +5070,13 @@ i_s_sys_tables_fill_table(
mem_heap_empty(heap);
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -5219,8 +5216,8 @@ i_s_dict_fill_sys_tablestats(
{
struct Locking
{
- Locking() { mutex_enter(&dict_sys->mutex); }
- ~Locking() { mutex_exit(&dict_sys->mutex); }
+ Locking() { mutex_enter(&dict_sys.mutex); }
+ ~Locking() { mutex_exit(&dict_sys.mutex); }
} locking;
if (table->stat_initialized) {
@@ -5289,8 +5286,8 @@ i_s_sys_tables_fill_table_stats(
}
heap = mem_heap_create(1000);
- rw_lock_s_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ rw_lock_s_lock(&dict_sys.latch);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_startscan_system(&pcur, &mtr, SYS_TABLES);
@@ -5305,7 +5302,7 @@ i_s_sys_tables_fill_table_stats(
heap, rec, &table_rec, true, &mtr);
ulint ref_count = table_rec ? table_rec->get_ref_count() : 0;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
DBUG_EXECUTE_IF("test_sys_tablestats", {
if (strcmp("test/t1", table_rec->name.m_name) == 0 ) {
@@ -5323,20 +5320,20 @@ i_s_sys_tables_fill_table_stats(
err_msg);
}
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
mem_heap_empty(heap);
/* Get the next record */
- rw_lock_s_lock(&dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
+ rw_lock_s_lock(&dict_sys.latch);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
- rw_lock_s_unlock(&dict_operation_lock);
+ mutex_exit(&dict_sys.mutex);
+ rw_lock_s_unlock(&dict_sys.latch);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -5528,7 +5525,7 @@ i_s_sys_indexes_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
/* Start scan the SYS_INDEXES table */
@@ -5550,7 +5547,7 @@ i_s_sys_indexes_fill_table(
space_id = space_id == 4 ? mach_read_from_4(field)
: ULINT_UNDEFINED;
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
if (int err = i_s_dict_fill_sys_indexes(
@@ -5568,13 +5565,13 @@ i_s_sys_indexes_fill_table(
mem_heap_empty(heap);
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -5745,7 +5742,7 @@ i_s_sys_columns_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_startscan_system(&pcur, &mtr, SYS_COLUMNS);
@@ -5763,7 +5760,7 @@ i_s_sys_columns_fill_table(
&nth_v_col);
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_columns(thd, table_id, col_name,
@@ -5778,13 +5775,13 @@ i_s_sys_columns_fill_table(
mem_heap_empty(heap);
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -5936,7 +5933,7 @@ i_s_sys_virtual_fill_table(
DBUG_RETURN(0);
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_startscan_system(&pcur, &mtr, SYS_VIRTUAL);
@@ -5952,7 +5949,7 @@ i_s_sys_virtual_fill_table(
&base_pos);
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_virtual(thd, table_id, pos, base_pos,
@@ -5964,13 +5961,13 @@ i_s_sys_virtual_fill_table(
}
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
DBUG_RETURN(0);
}
@@ -6118,7 +6115,7 @@ i_s_sys_fields_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
/* will save last index id so that we know whether we move to
@@ -6139,7 +6136,7 @@ i_s_sys_fields_fill_table(
&pos, &index_id, last_id);
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_fields(thd, index_id, &field_rec,
@@ -6154,13 +6151,13 @@ i_s_sys_fields_fill_table(
mem_heap_empty(heap);
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -6317,7 +6314,7 @@ i_s_sys_foreign_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_startscan_system(&pcur, &mtr, SYS_FOREIGN);
@@ -6331,7 +6328,7 @@ i_s_sys_foreign_fill_table(
err_msg = dict_process_sys_foreign_rec(heap, rec, &foreign_rec);
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_foreign(thd, &foreign_rec,
@@ -6346,12 +6343,12 @@ i_s_sys_foreign_fill_table(
/* Get the next record */
mtr_start(&mtr);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -6504,7 +6501,7 @@ i_s_sys_foreign_cols_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_startscan_system(&pcur, &mtr, SYS_FOREIGN_COLS);
@@ -6521,7 +6518,7 @@ i_s_sys_foreign_cols_fill_table(
heap, rec, &name, &for_col_name, &ref_col_name, &pos);
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_foreign_cols(
@@ -6536,13 +6533,13 @@ i_s_sys_foreign_cols_fill_table(
mem_heap_empty(heap);
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -6677,7 +6674,9 @@ i_s_dict_fill_sys_tablespaces(
DBUG_ENTER("i_s_dict_fill_sys_tablespaces");
- if (is_system_tablespace(space)) {
+ if (fil_space_t::full_crc32(flags)) {
+ row_format = NULL;
+ } else if (is_system_tablespace(space)) {
row_format = "Compact, Redundant or Dynamic";
} else if (FSP_FLAGS_GET_ZIP_SSIZE(flags)) {
row_format = "Compressed";
@@ -6701,7 +6700,7 @@ i_s_dict_fill_sys_tablespaces(
is_system_tablespace(space)
? "System" : "Single"));
- ulint cflags = fsp_flags_is_valid(flags, space)
+ ulint cflags = fil_space_t::is_valid_flags(flags, space)
? flags : fsp_flags_convert_from_101(flags);
if (cflags == ULINT_UNDEFINED) {
fields[SYS_TABLESPACES_PAGE_SIZE]->set_null();
@@ -6713,13 +6712,11 @@ i_s_dict_fill_sys_tablespaces(
DBUG_RETURN(0);
}
- const page_size_t page_size(cflags);
-
OK(fields[SYS_TABLESPACES_PAGE_SIZE]->store(
- page_size.logical(), true));
+ fil_space_t::logical_size(cflags), true));
OK(fields[SYS_TABLESPACES_ZIP_PAGE_SIZE]->store(
- page_size.physical(), true));
+ fil_space_t::physical_size(cflags), true));
size_t fs_block_size = 0;
os_file_size_t file;
@@ -6784,7 +6781,7 @@ i_s_sys_tablespaces_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
for (rec = dict_startscan_system(&pcur, &mtr, SYS_TABLESPACES);
@@ -6801,7 +6798,7 @@ i_s_sys_tablespaces_fill_table(
heap, rec, &space, &name, &flags);
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_tablespaces(
@@ -6816,12 +6813,12 @@ i_s_sys_tablespaces_fill_table(
mem_heap_empty(heap);
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -6962,7 +6959,7 @@ i_s_sys_datafiles_fill_table(
}
heap = mem_heap_create(1000);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_startscan_system(&pcur, &mtr, SYS_DATAFILES);
@@ -6977,7 +6974,7 @@ i_s_sys_datafiles_fill_table(
heap, rec, &space, &path);
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
if (!err_msg) {
i_s_dict_fill_sys_datafiles(
@@ -6991,13 +6988,13 @@ i_s_sys_datafiles_fill_table(
mem_heap_empty(heap);
/* Get the next record */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
mtr_start(&mtr);
rec = dict_getnext_system(&pcur, &mtr);
}
mtr_commit(&mtr);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
mem_heap_free(heap);
DBUG_RETURN(0);
@@ -7299,8 +7296,7 @@ static ST_FIELD_INFO innodb_tablespaces_scrubbing_fields_info[]=
{"NAME", MAX_FULL_NAME_LEN + 1, MYSQL_TYPE_STRING,
0, MY_I_S_MAYBE_NULL, "", SKIP_OPEN_TABLE},
#define TABLESPACES_SCRUBBING_COMPRESSED 2
- {"COMPRESSED", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG,
- 0, MY_I_S_UNSIGNED, "", SKIP_OPEN_TABLE},
+ {"COMPRESSED", 1, MYSQL_TYPE_LONG, 0, MY_I_S_UNSIGNED, "", SKIP_OPEN_TABLE},
#define TABLESPACES_SCRUBBING_LAST_SCRUB_COMPLETED 3
{"LAST_SCRUB_COMPLETED", 0, MYSQL_TYPE_DATETIME,
0, MY_I_S_MAYBE_NULL, "", SKIP_OPEN_TABLE},
@@ -7319,6 +7315,8 @@ static ST_FIELD_INFO innodb_tablespaces_scrubbing_fields_info[]=
{"CURRENT_SCRUB_MAX_PAGE_NUMBER", MY_INT64_NUM_DECIMAL_DIGITS,
MYSQL_TYPE_LONGLONG,
0, MY_I_S_UNSIGNED, "", SKIP_OPEN_TABLE},
+#define TABLESPACES_SCRUBBING_ON_SSD 8
+ {"ON_SSD", 1, MYSQL_TYPE_LONG, 0, MY_I_S_UNSIGNED, "", SKIP_OPEN_TABLE},
END_OF_ST_FIELD_INFO
};
@@ -7390,6 +7388,8 @@ i_s_dict_fill_tablespaces_scrubbing(
}
}
+ OK(fields[TABLESPACES_SCRUBBING_ON_SSD]->store(!space->is_rotational(),
+ true));
OK(schema_table_store_record(thd, table_to_fill));
DBUG_RETURN(0);
diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
index 65abacf3fd5..dbb19bec7a0 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.cc
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc
@@ -28,11 +28,9 @@ Created 7/19/1997 Heikki Tuuri
#include "sync0sync.h"
#include "btr0sea.h"
#ifdef WITH_WSREP
-extern uint32 wsrep_sst_disable_writes;
-# define wsrep_sst_disable_writes \
- my_atomic_load32_explicit(&wsrep_sst_disable_writes, MY_MEMORY_ORDER_RELAXED)
+extern Atomic_relaxed<bool> wsrep_sst_disable_writes;
#else
-# define wsrep_sst_disable_writes false
+constexpr bool wsrep_sst_disable_writes= false;
#endif
using st_::span;
@@ -342,7 +340,7 @@ ibuf_header_page_get(
block = buf_page_get(
page_id_t(IBUF_SPACE_ID, FSP_IBUF_HEADER_PAGE_NO),
- univ_page_size, RW_X_LATCH, mtr);
+ 0, RW_X_LATCH, mtr);
if (block) {
buf_block_dbg_add_level(block, SYNC_IBUF_HEADER);
@@ -372,7 +370,7 @@ ibuf_tree_root_get(
/* only segment list access is exclusive each other */
block = buf_page_get(
page_id_t(IBUF_SPACE_ID, FSP_IBUF_TREE_ROOT_PAGE_NO),
- univ_page_size, RW_SX_LATCH, mtr);
+ 0, RW_SX_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
@@ -483,7 +481,7 @@ ibuf_init_at_db_start(void)
block = buf_page_get(
page_id_t(IBUF_SPACE_ID, FSP_IBUF_TREE_ROOT_PAGE_NO),
- univ_page_size, RW_X_LATCH, &mtr);
+ 0, RW_X_LATCH, &mtr);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE);
@@ -548,13 +546,8 @@ ibuf_max_size_update(
}
-/*********************************************************************//**
-Initializes an ibuf bitmap page. */
-void
-ibuf_bitmap_page_init(
-/*==================*/
- buf_block_t* block, /*!< in: bitmap page */
- mtr_t* mtr) /*!< in: mtr */
+/** Apply MLOG_IBUF_BITMAP_INIT when crash-upgrading */
+ATTRIBUTE_COLD void ibuf_bitmap_init_apply(buf_block_t* block)
{
page_t* page;
ulint byte_offset;
@@ -565,65 +558,41 @@ ibuf_bitmap_page_init(
/* Write all zeros to the bitmap */
compile_time_assert(!(IBUF_BITS_PER_PAGE % 2));
- byte_offset = UT_BITS_IN_BYTES(block->page.size.physical()
+ byte_offset = UT_BITS_IN_BYTES(block->physical_size()
* IBUF_BITS_PER_PAGE);
memset(page + IBUF_BITMAP, 0, byte_offset);
-
- /* The remaining area (up to the page trailer) is uninitialized. */
- mlog_write_initial_log_record(page, MLOG_IBUF_BITMAP_INIT, mtr);
-}
-
-/*********************************************************************//**
-Parses a redo log record of an ibuf bitmap page init.
-@return end of log record or NULL */
-byte*
-ibuf_parse_bitmap_init(
-/*===================*/
- byte* ptr, /*!< in: buffer */
- byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
- buf_block_t* block, /*!< in: block or NULL */
- mtr_t* mtr) /*!< in: mtr or NULL */
-{
- ut_ad(ptr != NULL);
- ut_ad(end_ptr != NULL);
-
- if (block) {
- ibuf_bitmap_page_init(block, mtr);
- }
-
- return(ptr);
}
# ifdef UNIV_DEBUG
/** Gets the desired bits for a given page from a bitmap page.
@param[in] page bitmap page
@param[in] page_id page id whose bits to get
-@param[in] page_size page id whose bits to get
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] bit IBUF_BITMAP_FREE, IBUF_BITMAP_BUFFERED, ...
@param[in,out] mtr mini-transaction holding an x-latch on the
bitmap page
@return value of bits */
-# define ibuf_bitmap_page_get_bits(page, page_id, page_size, bit, mtr) \
- ibuf_bitmap_page_get_bits_low(page, page_id, page_size, \
+# define ibuf_bitmap_page_get_bits(page, page_id, zip_size, bit, mtr) \
+ ibuf_bitmap_page_get_bits_low(page, page_id, zip_size, \
MTR_MEMO_PAGE_X_FIX, mtr, bit)
# else /* UNIV_DEBUG */
/** Gets the desired bits for a given page from a bitmap page.
@param[in] page bitmap page
@param[in] page_id page id whose bits to get
-@param[in] page_size page id whose bits to get
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] bit IBUF_BITMAP_FREE, IBUF_BITMAP_BUFFERED, ...
@param[in,out] mtr mini-transaction holding an x-latch on the
bitmap page
@return value of bits */
-# define ibuf_bitmap_page_get_bits(page, page_id, page_size, bit, mtr) \
- ibuf_bitmap_page_get_bits_low(page, page_id, page_size, bit)
+# define ibuf_bitmap_page_get_bits(page, page_id, zip_size, bit, mtr) \
+ ibuf_bitmap_page_get_bits_low(page, page_id, zip_size, bit)
# endif /* UNIV_DEBUG */
/** Gets the desired bits for a given page from a bitmap page.
@param[in] page bitmap page
@param[in] page_id page id whose bits to get
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] latch_type MTR_MEMO_PAGE_X_FIX, MTR_MEMO_BUF_FIX, ...
@param[in,out] mtr mini-transaction holding latch_type on the
bitmap page
@@ -634,7 +603,7 @@ ulint
ibuf_bitmap_page_get_bits_low(
const page_t* page,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
#ifdef UNIV_DEBUG
ulint latch_type,
mtr_t* mtr,
@@ -645,12 +614,14 @@ ibuf_bitmap_page_get_bits_low(
ulint bit_offset;
ulint map_byte;
ulint value;
+ const ulint size = zip_size ? zip_size : srv_page_size;
+ ut_ad(ut_is_2pow(zip_size));
ut_ad(bit < IBUF_BITS_PER_PAGE);
compile_time_assert(!(IBUF_BITS_PER_PAGE % 2));
ut_ad(mtr_memo_contains_page(mtr, page, latch_type));
- bit_offset = (page_id.page_no() % page_size.physical())
+ bit_offset = (page_id.page_no() & (size - 1))
* IBUF_BITS_PER_PAGE + bit;
byte_offset = bit_offset / 8;
@@ -674,7 +645,7 @@ ibuf_bitmap_page_get_bits_low(
/** Sets the desired bit for a given page in a bitmap page.
@param[in,out] page bitmap page
@param[in] page_id page id whose bits to set
-@param[in] page_size page size
+@param[in] physical_size page size
@param[in] bit IBUF_BITMAP_FREE, IBUF_BITMAP_BUFFERED, ...
@param[in] val value to set
@param[in,out] mtr mtr containing an x-latch to the bitmap page */
@@ -683,7 +654,7 @@ void
ibuf_bitmap_page_set_bits(
page_t* page,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint physical_size,
ulint bit,
ulint val,
mtr_t* mtr)
@@ -697,7 +668,7 @@ ibuf_bitmap_page_set_bits(
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
ut_ad(mtr->is_named_space(page_id.space()));
- bit_offset = (page_id.page_no() % page_size.physical())
+ bit_offset = (page_id.page_no() % physical_size)
* IBUF_BITS_PER_PAGE + bit;
byte_offset = bit_offset / 8;
@@ -724,26 +695,20 @@ ibuf_bitmap_page_set_bits(
/** Calculates the bitmap page number for a given page number.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] size page size
@return the bitmap page id where the file page is mapped */
-UNIV_INLINE
-const page_id_t
-ibuf_bitmap_page_no_calc(
- const page_id_t page_id,
- const page_size_t& page_size)
+inline page_id_t ibuf_bitmap_page_no_calc(const page_id_t page_id, ulint size)
{
- ulint bitmap_page_no;
-
- bitmap_page_no = FSP_IBUF_BITMAP_OFFSET
- + (page_id.page_no() & ~(page_size.physical() - 1));
+ if (!size) size = srv_page_size;
- return(page_id_t(page_id.space(), bitmap_page_no));
+ return page_id_t(page_id.space(), FSP_IBUF_BITMAP_OFFSET
+ + (page_id.page_no() & ~(size - 1)));
}
/** Gets the ibuf bitmap page where the bits describing a given file page are
stored.
@param[in] page_id page id of the file page
-@param[in] page_size page size of the file page
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] file file name
@param[in] line line where called
@param[in,out] mtr mini-transaction
@@ -754,7 +719,7 @@ static
page_t*
ibuf_bitmap_get_map_page_func(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
const char* file,
unsigned line,
mtr_t* mtr)
@@ -762,8 +727,8 @@ ibuf_bitmap_get_map_page_func(
buf_block_t* block = NULL;
dberr_t err = DB_SUCCESS;
- block = buf_page_get_gen(ibuf_bitmap_page_no_calc(page_id, page_size),
- page_size, RW_X_LATCH, NULL, BUF_GET,
+ block = buf_page_get_gen(ibuf_bitmap_page_no_calc(page_id, zip_size),
+ zip_size, RW_X_LATCH, NULL, BUF_GET,
file, line, mtr, &err);
if (err != DB_SUCCESS) {
@@ -779,13 +744,13 @@ ibuf_bitmap_get_map_page_func(
/** Gets the ibuf bitmap page where the bits describing a given file page are
stored.
@param[in] page_id page id of the file page
-@param[in] page_size page size of the file page
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] mtr mini-transaction
@return bitmap page where the file page is mapped, that is, the bitmap
page containing the descriptor bits for the file page; the bitmap page
is x-latched */
-#define ibuf_bitmap_get_map_page(page_id, page_size, mtr) \
- ibuf_bitmap_get_map_page_func(page_id, page_size, \
+#define ibuf_bitmap_get_map_page(page_id, zip_size, mtr) \
+ ibuf_bitmap_get_map_page_func(page_id, zip_size, \
__FILE__, __LINE__, mtr)
/************************************************************************//**
@@ -819,14 +784,14 @@ ibuf_set_free_bits_low(
}
bitmap_page = ibuf_bitmap_get_map_page(block->page.id,
- block->page.size, mtr);
+ block->zip_size(), mtr);
#ifdef UNIV_IBUF_DEBUG
ut_a(val <= ibuf_index_page_calc_free(block));
#endif /* UNIV_IBUF_DEBUG */
ibuf_bitmap_page_set_bits(
- bitmap_page, block->page.id, block->page.size,
+ bitmap_page, block->page.id, block->physical_size(),
IBUF_BITMAP_FREE, val, mtr);
}
@@ -863,17 +828,14 @@ ibuf_set_free_bits_func(
block->page.id.space());
bitmap_page = ibuf_bitmap_get_map_page(block->page.id,
- block->page.size, &mtr);
+ block->zip_size(), &mtr);
switch (space->purpose) {
case FIL_TYPE_LOG:
ut_ad(0);
break;
case FIL_TYPE_TABLESPACE:
- /* Avoid logging while fixing up truncate of table. */
- if (!srv_is_tablespace_truncated(block->page.id.space())) {
- break;
- }
+ break;
/* fall through */
case FIL_TYPE_TEMPORARY:
case FIL_TYPE_IMPORT:
@@ -908,7 +870,7 @@ ibuf_set_free_bits_func(
#endif /* UNIV_IBUF_DEBUG */
ibuf_bitmap_page_set_bits(
- bitmap_page, block->page.id, block->page.size,
+ bitmap_page, block->page.id, block->physical_size(),
IBUF_BITMAP_FREE, val, &mtr);
mtr_commit(&mtr);
@@ -958,7 +920,7 @@ ibuf_update_free_bits_low(
ut_a(!buf_block_get_page_zip(block));
ut_ad(mtr->is_named_space(block->page.id.space()));
- before = ibuf_index_page_calc_free_bits(block->page.size.logical(),
+ before = ibuf_index_page_calc_free_bits(srv_page_size,
max_ins_size);
after = ibuf_index_page_calc_free(block);
@@ -993,10 +955,10 @@ ibuf_update_free_bits_zip(
buf_frame_t* frame = buf_block_get_frame(block);
ut_a(frame);
ut_a(page_is_leaf(frame));
- ut_a(block->page.size.is_compressed());
+ ut_a(block->zip_size());
bitmap_page = ibuf_bitmap_get_map_page(block->page.id,
- block->page.size, mtr);
+ block->zip_size(), mtr);
after = ibuf_index_page_calc_free_zip(block);
@@ -1010,7 +972,7 @@ ibuf_update_free_bits_zip(
}
ibuf_bitmap_page_set_bits(
- bitmap_page, block->page.id, block->page.size,
+ bitmap_page, block->page.id, block->physical_size(),
IBUF_BITMAP_FREE, after, mtr);
}
@@ -1042,23 +1004,19 @@ ibuf_update_free_bits_for_two_pages_low(
/** Returns TRUE if the page is one of the fixed address ibuf pages.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@return TRUE if a fixed address ibuf i/o page */
-UNIV_INLINE
-ibool
-ibuf_fixed_addr_page(
- const page_id_t page_id,
- const page_size_t& page_size)
+inline bool ibuf_fixed_addr_page(const page_id_t page_id, ulint zip_size)
{
return((page_id.space() == IBUF_SPACE_ID
&& page_id.page_no() == IBUF_TREE_ROOT_PAGE_NO)
- || ibuf_bitmap_page(page_id, page_size));
+ || ibuf_bitmap_page(page_id, zip_size));
}
/** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages.
Must not be called when recv_no_ibuf_operations==true.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] x_latch FALSE if relaxed check (avoid latching the
bitmap page)
@param[in] file file name
@@ -1067,12 +1025,12 @@ bitmap page)
bitmap page if the page is not one of the fixed address ibuf pages, or NULL,
in which case a new transaction is created.
@return TRUE if level 2 or level 3 page */
-ibool
+bool
ibuf_page_low(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
#ifdef UNIV_DEBUG
- ibool x_latch,
+ bool x_latch,
#endif /* UNIV_DEBUG */
const char* file,
unsigned line,
@@ -1085,12 +1043,10 @@ ibuf_page_low(
ut_ad(!recv_no_ibuf_operations);
ut_ad(x_latch || mtr == NULL);
- if (ibuf_fixed_addr_page(page_id, page_size)) {
-
- return(TRUE);
+ if (ibuf_fixed_addr_page(page_id, zip_size)) {
+ return(true);
} else if (page_id.space() != IBUF_SPACE_ID) {
-
- return(FALSE);
+ return(false);
}
compile_time_assert(IBUF_SPACE_ID == 0);
@@ -1113,14 +1069,14 @@ ibuf_page_low(
dberr_t err = DB_SUCCESS;
buf_block_t* block = buf_page_get_gen(
- ibuf_bitmap_page_no_calc(page_id, page_size),
- page_size, RW_NO_LATCH, NULL, BUF_GET_NO_LATCH,
- file, line, &local_mtr, &err);
+ ibuf_bitmap_page_no_calc(page_id, zip_size),
+ zip_size, RW_NO_LATCH, NULL, BUF_GET_NO_LATCH,
+ file, line, &local_mtr, &err);
bitmap_page = buf_block_get_frame(block);
ret = ibuf_bitmap_page_get_bits_low(
- bitmap_page, page_id, page_size,
+ bitmap_page, page_id, zip_size,
MTR_MEMO_BUF_FIX, &local_mtr, IBUF_BITMAP_IBUF);
mtr_commit(&local_mtr);
@@ -1133,10 +1089,10 @@ ibuf_page_low(
mtr_start(mtr);
}
- bitmap_page = ibuf_bitmap_get_map_page_func(page_id, page_size,
+ bitmap_page = ibuf_bitmap_get_map_page_func(page_id, zip_size,
file, line, mtr);
- ret = ibuf_bitmap_page_get_bits(bitmap_page, page_id, page_size,
+ ret = ibuf_bitmap_page_get_bits(bitmap_page, page_id, zip_size,
IBUF_BITMAP_IBUF, mtr);
if (mtr == &local_mtr) {
@@ -1379,32 +1335,26 @@ ibuf_rec_get_counter(
}
}
-/****************************************************************//**
-Add accumulated operation counts to a permanent array. Both arrays must be
-of size IBUF_OP_COUNT. */
-static
-void
-ibuf_add_ops(
-/*=========*/
- ulint* arr, /*!< in/out: array to modify */
- const ulint* ops) /*!< in: operation counts */
+/**
+ Add accumulated operation counts to a permanent array.
+ Both arrays must be of size IBUF_OP_COUNT.
+*/
+static void ibuf_add_ops(Atomic_counter<ulint> *out, const ulint *in)
{
- ulint i;
-
- for (i = 0; i < IBUF_OP_COUNT; i++) {
- my_atomic_addlint(&arr[i], ops[i]);
- }
+ for (auto i = 0; i < IBUF_OP_COUNT; i++)
+ out[i]+= in[i];
}
+
/****************************************************************//**
Print operation counts. The array must be of size IBUF_OP_COUNT. */
static
void
ibuf_print_ops(
/*===========*/
- const ulint* ops, /*!< in: operation counts */
- FILE* file) /*!< in: file where to print */
+ const Atomic_counter<ulint>* ops, /*!< in: operation counts */
+ FILE* file) /*!< in: file where to print */
{
static const char* op_names[] = {
"insert",
@@ -1417,7 +1367,7 @@ ibuf_print_ops(
for (i = 0; i < IBUF_OP_COUNT; i++) {
fprintf(file, "%s " ULINTPF "%s", op_names[i],
- ops[i], (i < (IBUF_OP_COUNT - 1)) ? ", " : "");
+ ulint{ops[i]}, (i < (IBUF_OP_COUNT - 1)) ? ", " : "");
}
putc('\n', file);
@@ -2015,11 +1965,11 @@ ibuf_add_free_page(void)
(level 2 page) */
const page_id_t page_id(IBUF_SPACE_ID, block->page.id.page_no());
- bitmap_page = ibuf_bitmap_get_map_page(page_id, univ_page_size, &mtr);
+ bitmap_page = ibuf_bitmap_get_map_page(page_id, 0, &mtr);
mutex_exit(&ibuf_mutex);
- ibuf_bitmap_page_set_bits(bitmap_page, page_id, univ_page_size,
+ ibuf_bitmap_page_set_bits(bitmap_page, page_id, srv_page_size,
IBUF_BITMAP_IBUF, TRUE, &mtr);
ibuf_mtr_commit(&mtr);
@@ -2090,7 +2040,7 @@ ibuf_remove_free_page(void)
compile_time_assert(IBUF_SPACE_ID == 0);
fseg_free_page(header_page + IBUF_HEADER + IBUF_TREE_SEG_HEADER,
- fil_system.sys_space, page_no, &mtr);
+ fil_system.sys_space, page_no, true, &mtr);
const page_id_t page_id(IBUF_SPACE_ID, page_no);
@@ -2108,7 +2058,7 @@ ibuf_remove_free_page(void)
{
buf_block_t* block;
- block = buf_page_get(page_id, univ_page_size, RW_X_LATCH, &mtr);
+ block = buf_page_get(page_id, 0, RW_X_LATCH, &mtr);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE);
@@ -2128,13 +2078,13 @@ ibuf_remove_free_page(void)
/* Set the bit indicating that this page is no more an ibuf tree page
(level 2 page) */
- bitmap_page = ibuf_bitmap_get_map_page(page_id, univ_page_size, &mtr);
+ bitmap_page = ibuf_bitmap_get_map_page(page_id, 0, &mtr);
mutex_exit(&ibuf_mutex);
ibuf_bitmap_page_set_bits(
- bitmap_page, page_id, univ_page_size, IBUF_BITMAP_IBUF, FALSE,
- &mtr);
+ bitmap_page, page_id, srv_page_size,
+ IBUF_BITMAP_IBUF, FALSE, &mtr);
ut_d(buf_page_set_file_page_was_freed(page_id));
@@ -2970,7 +2920,7 @@ ibuf_get_volume_buffered(
block = buf_page_get(
page_id_t(IBUF_SPACE_ID, prev_page_no),
- univ_page_size, RW_X_LATCH, mtr);
+ 0, RW_X_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE);
@@ -3042,7 +2992,7 @@ count_later:
block = buf_page_get(
page_id_t(IBUF_SPACE_ID, next_page_no),
- univ_page_size, RW_X_LATCH, mtr);
+ 0, RW_X_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE);
@@ -3255,6 +3205,24 @@ ibuf_get_entry_counter_func(
}
}
+
+/** Translates the ibuf free bits to the free space on a page in bytes.
+@param[in] physical_size page_size
+@param[in] bits value for ibuf bitmap bits
+@return maximum insert size after reorganize for the page */
+inline ulint
+ibuf_index_page_calc_free_from_bits(ulint physical_size, ulint bits)
+{
+ ut_ad(bits < 4);
+ ut_ad(physical_size > IBUF_PAGE_SIZE_PER_FREE_SPACE);
+
+ if (bits == 3) {
+ bits = 4;
+ }
+
+ return bits * physical_size / IBUF_PAGE_SIZE_PER_FREE_SPACE;
+}
+
/** Buffer an operation in the insert/delete buffer, instead of doing it
directly to the disk page, if this is possible.
@param[in] mode BTR_MODIFY_PREV or BTR_MODIFY_TREE
@@ -3266,7 +3234,7 @@ buffering
@param[in,out] index index where to insert; must not be unique
or clustered
@param[in] page_id page id where to insert
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] thr query thread
@return DB_SUCCESS, DB_STRONG_FAIL or other error */
static MY_ATTRIBUTE((warn_unused_result))
@@ -3279,7 +3247,7 @@ ibuf_insert_low(
ulint entry_size,
dict_index_t* index,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
que_thr_t* thr)
{
big_rec_t* dummy_big_rec;
@@ -3389,6 +3357,8 @@ ibuf_insert_low(
? &min_n_recs
: NULL, &mtr);
+ const ulint physical_size = zip_size ? zip_size : srv_page_size;
+
if (op == IBUF_OP_DELETE
&& (min_n_recs < 2 || buf_pool_watch_occurred(page_id))) {
/* The page could become empty after the record is
@@ -3430,8 +3400,7 @@ fail_exit:
ibuf_mtr_start(&bitmap_mtr);
index->set_modified(bitmap_mtr);
- bitmap_page = ibuf_bitmap_get_map_page(page_id, page_size,
- &bitmap_mtr);
+ bitmap_page = ibuf_bitmap_get_map_page(page_id, zip_size, &bitmap_mtr);
/* We check if the index page is suitable for buffered entries */
@@ -3445,11 +3414,12 @@ fail_exit:
if (op == IBUF_OP_INSERT) {
ulint bits = ibuf_bitmap_page_get_bits(
- bitmap_page, page_id, page_size, IBUF_BITMAP_FREE,
+ bitmap_page, page_id, physical_size, IBUF_BITMAP_FREE,
&bitmap_mtr);
if (buffered + entry_size + page_dir_calc_reserved_space(1)
- > ibuf_index_page_calc_free_from_bits(page_size, bits)) {
+ > ibuf_index_page_calc_free_from_bits(physical_size,
+ bits)) {
/* Release the bitmap page latch early. */
ibuf_mtr_commit(&bitmap_mtr);
@@ -3492,11 +3462,11 @@ fail_exit:
buffered entries for this index page, if the bit is not set yet */
old_bit_value = ibuf_bitmap_page_get_bits(
- bitmap_page, page_id, page_size,
+ bitmap_page, page_id, physical_size,
IBUF_BITMAP_BUFFERED, &bitmap_mtr);
if (!old_bit_value) {
- ibuf_bitmap_page_set_bits(bitmap_page, page_id, page_size,
+ ibuf_bitmap_page_set_bits(bitmap_page, page_id, physical_size,
IBUF_BITMAP_BUFFERED, TRUE,
&bitmap_mtr);
}
@@ -3590,23 +3560,23 @@ func_exit:
return(err);
}
-/** Buffer an operation in the insert/delete buffer, instead of doing it
-directly to the disk page, if this is possible. Does not do it if the index
+/** Buffer an operation in the change buffer, instead of applying it
+directly to the file page, if this is possible. Does not do it if the index
is clustered or unique.
@param[in] op operation type
@param[in] entry index entry to insert
@param[in,out] index index where to insert
@param[in] page_id page id where to insert
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] thr query thread
-@return TRUE if success */
-ibool
+@return true if success */
+bool
ibuf_insert(
ibuf_op_t op,
const dtuple_t* entry,
dict_index_t* index,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
que_thr_t* thr)
{
dberr_t err;
@@ -3634,7 +3604,7 @@ ibuf_insert(
case IBUF_USE_NONE:
case IBUF_USE_DELETE:
case IBUF_USE_DELETE_MARK:
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(false);
case IBUF_USE_INSERT:
case IBUF_USE_INSERT_DELETE_MARK:
case IBUF_USE_ALL:
@@ -3645,7 +3615,7 @@ ibuf_insert(
switch (use) {
case IBUF_USE_NONE:
case IBUF_USE_INSERT:
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(false);
case IBUF_USE_DELETE_MARK:
case IBUF_USE_DELETE:
case IBUF_USE_INSERT_DELETE_MARK:
@@ -3659,7 +3629,7 @@ ibuf_insert(
case IBUF_USE_NONE:
case IBUF_USE_INSERT:
case IBUF_USE_INSERT_DELETE_MARK:
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(false);
case IBUF_USE_DELETE_MARK:
case IBUF_USE_DELETE:
case IBUF_USE_ALL:
@@ -3699,7 +3669,7 @@ check_watch:
is being buffered, have this request executed
directly on the page in the buffer pool after the
buffered entries for this page have been merged. */
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(false);
}
}
@@ -3710,30 +3680,22 @@ skip_watch:
>= page_get_free_space_of_empty(dict_table_is_comp(index->table))
/ 2) {
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(false);
}
err = ibuf_insert_low(BTR_MODIFY_PREV, op, no_counter,
entry, entry_size,
- index, page_id, page_size, thr);
+ index, page_id, zip_size, thr);
if (err == DB_FAIL) {
err = ibuf_insert_low(BTR_MODIFY_TREE | BTR_LATCH_FOR_INSERT,
op, no_counter, entry, entry_size,
- index, page_id, page_size, thr);
+ index, page_id, zip_size, thr);
}
- if (err == DB_SUCCESS) {
-#ifdef UNIV_IBUF_DEBUG
- /* fprintf(stderr, "Ibuf insert for page no %lu of index %s\n",
- page_no, index->name); */
-#endif
- DBUG_RETURN(TRUE);
-
- } else {
- ut_a(err == DB_STRONG_FAIL || err == DB_TOO_BIG_RECORD);
+ ut_a(err == DB_SUCCESS || err == DB_STRONG_FAIL
+ || err == DB_TOO_BIG_RECORD);
- DBUG_RETURN(FALSE);
- }
+ DBUG_RETURN(err == DB_SUCCESS);
}
/********************************************************************//**
@@ -3797,13 +3759,13 @@ ibuf_insert_to_index_page_low(
"InnoDB: that table.\n", stderr);
bitmap_page = ibuf_bitmap_get_map_page(block->page.id,
- block->page.size, mtr);
+ block->zip_size(), mtr);
old_bits = ibuf_bitmap_page_get_bits(
- bitmap_page, block->page.id, block->page.size,
+ bitmap_page, block->page.id, block->zip_size(),
IBUF_BITMAP_FREE, mtr);
ib::error() << "page " << block->page.id << ", size "
- << block->page.size.physical() << ", bitmap bits " << old_bits;
+ << block->physical_size() << ", bitmap bits " << old_bits;
ib::error() << BUG_REPORT_MSG;
@@ -4364,14 +4326,11 @@ insert buffer. If the page is not read, but created in the buffer pool, this
function deletes its buffered entries from the insert buffer; there can
exist entries for such a page if the page belonged to an index which
subsequently was dropped.
-@param[in,out] block if page has been read from disk,
-pointer to the page x-latched, else NULL
-@param[in] page_id page id of the index page */
-void
-ibuf_merge_or_delete_for_page(
- buf_block_t* block,
- const page_id_t page_id,
- const page_size_t& page_size)
+@param block X-latched page to try to apply changes to, or NULL to discard
+@param page_id page identifier
+@param zip_size ROW_FORMAT=COMPRESSED page size, or 0 */
+void ibuf_merge_or_delete_for_page(buf_block_t *block, const page_id_t page_id,
+ ulint zip_size)
{
btr_pcur_t pcur;
#ifdef UNIV_IBUF_DEBUG
@@ -4395,8 +4354,10 @@ ibuf_merge_or_delete_for_page(
return;
}
- if (ibuf_fixed_addr_page(page_id, page_size)
- || fsp_descr_page(page_id, page_size)) {
+ const ulint physical_size = zip_size ? zip_size : srv_page_size;
+
+ if (ibuf_fixed_addr_page(page_id, physical_size)
+ || fsp_descr_page(page_id, physical_size)) {
return;
}
@@ -4405,18 +4366,17 @@ ibuf_merge_or_delete_for_page(
if (UNIV_UNLIKELY(!space)) {
block = NULL;
} else {
- page_t* bitmap_page = NULL;
ulint bitmap_bits = 0;
ibuf_mtr_start(&mtr);
- bitmap_page = ibuf_bitmap_get_map_page(
- page_id, page_size, &mtr);
+ page_t* bitmap_page = ibuf_bitmap_get_map_page(
+ page_id, zip_size, &mtr);
if (bitmap_page &&
fil_page_get_type(bitmap_page) != FIL_PAGE_TYPE_ALLOCATED) {
bitmap_bits = ibuf_bitmap_page_get_bits(
- bitmap_page, page_id, page_size,
+ bitmap_page, page_id, zip_size,
IBUF_BITMAP_BUFFERED, &mtr);
}
@@ -4664,23 +4624,23 @@ reset_bit:
if (space) {
page_t* bitmap_page;
- bitmap_page = ibuf_bitmap_get_map_page(page_id, page_size,
+ bitmap_page = ibuf_bitmap_get_map_page(page_id, zip_size,
&mtr);
ibuf_bitmap_page_set_bits(
- bitmap_page, page_id, page_size,
+ bitmap_page, page_id, physical_size,
IBUF_BITMAP_BUFFERED, FALSE, &mtr);
if (block != NULL) {
ulint old_bits = ibuf_bitmap_page_get_bits(
- bitmap_page, page_id, page_size,
+ bitmap_page, page_id, zip_size,
IBUF_BITMAP_FREE, &mtr);
ulint new_bits = ibuf_index_page_calc_free(block);
if (old_bits != new_bits) {
ibuf_bitmap_page_set_bits(
- bitmap_page, page_id, page_size,
+ bitmap_page, page_id, physical_size,
IBUF_BITMAP_FREE, new_bits, &mtr);
}
}
@@ -4695,20 +4655,15 @@ reset_bit:
btr_pcur_close(&pcur);
mem_heap_free(heap);
- my_atomic_addlint(&ibuf->n_merges, 1);
+ ibuf->n_merges++;
ibuf_add_ops(ibuf->n_merged_ops, mops);
ibuf_add_ops(ibuf->n_discarded_ops, dops);
}
-/*********************************************************************//**
-Deletes all entries in the insert buffer for a given space id. This is used
-in DISCARD TABLESPACE, IMPORT TABLESPACE, and 5.7 TRUNCATE TABLE recovery.
-NOTE: this does not update the page free bitmaps in the space. The space will
-become CORRUPT when you call this function! */
-void
-ibuf_delete_for_discarded_space(
-/*============================*/
- ulint space) /*!< in: space id */
+/** Delete all change buffer entries for a tablespace,
+in DISCARD TABLESPACE, IMPORT TABLESPACE, or crash recovery.
+@param[in] space missing or to-be-discarded tablespace */
+void ibuf_delete_for_discarded_space(ulint space)
{
mem_heap_t* heap;
btr_pcur_t pcur;
@@ -4823,7 +4778,7 @@ ibuf_print(
ibuf->size,
ibuf->free_list_len,
ibuf->seg_size,
- ibuf->n_merges);
+ ulint{ibuf->n_merges});
fputs("merged operations:\n ", file);
ibuf_print_ops(ibuf->n_merged_ops, file);
@@ -4843,7 +4798,9 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
ulint page_no;
ut_ad(trx->mysql_thd);
ut_ad(space->purpose == FIL_TYPE_IMPORT);
- const page_size_t page_size(space->flags);
+
+ const ulint zip_size = space->zip_size();
+ const ulint physical_size = space->physical_size();
/* fil_space_t::size and fil_space_t::free_limit would still be 0
at this point. So, we will have to read page 0. */
ut_ad(!space->free_limit);
@@ -4852,7 +4809,8 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
mtr_t mtr;
ulint size;
mtr.start();
- if (buf_block_t* sp = buf_page_get(page_id_t(space->id, 0), page_size,
+ if (buf_block_t* sp = buf_page_get(page_id_t(space->id, 0),
+ zip_size,
RW_S_LATCH, &mtr)) {
size = std::min(
mach_read_from_4(FSP_HEADER_OFFSET + FSP_FREE_LIMIT
@@ -4876,7 +4834,7 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
below page_no is measured in number of pages since the beginning of
the space, as usual. */
- for (page_no = 0; page_no < size; page_no += page_size.physical()) {
+ for (page_no = 0; page_no < size; page_no += physical_size) {
page_t* bitmap_page;
ulint i;
@@ -4892,7 +4850,7 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
ibuf_enter(&mtr);
bitmap_page = ibuf_bitmap_get_map_page(
- page_id_t(space->id, page_no), page_size, &mtr);
+ page_id_t(space->id, page_no), zip_size, &mtr);
if (!bitmap_page) {
mutex_exit(&ibuf_mutex);
@@ -4902,20 +4860,21 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
}
if (buf_is_zeroes(span<const byte>(bitmap_page,
- page_size.physical()))) {
+ physical_size))) {
/* This means we got all-zero page instead of
ibuf bitmap page. The subsequent page should be
all-zero pages. */
#ifdef UNIV_DEBUG
for (ulint curr_page = page_no + 1;
- curr_page < page_size.physical(); curr_page++) {
+ curr_page < physical_size; curr_page++) {
buf_block_t* block = buf_page_get(
page_id_t(space->id, curr_page),
- page_size, RW_S_LATCH, &mtr);
+ zip_size, RW_S_LATCH, &mtr);
page_t* page = buf_block_get_frame(block);
ut_ad(buf_is_zeroes(span<const byte>(
- page, page_size.physical())));
+ page,
+ physical_size)));
}
#endif /* UNIV_DEBUG */
ibuf_exit(&mtr);
@@ -4923,17 +4882,13 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
continue;
}
- for (i = FSP_IBUF_BITMAP_OFFSET + 1;
- i < page_size.physical();
- i++) {
-
+ for (i = FSP_IBUF_BITMAP_OFFSET + 1; i < physical_size; i++) {
const ulint offset = page_no + i;
-
const page_id_t cur_page_id(space->id, offset);
if (ibuf_bitmap_page_get_bits(
- bitmap_page, cur_page_id, page_size,
- IBUF_BITMAP_IBUF, &mtr)) {
+ bitmap_page, cur_page_id, zip_size,
+ IBUF_BITMAP_IBUF, &mtr)) {
mutex_exit(&ibuf_mutex);
ibuf_exit(&mtr);
@@ -4950,7 +4905,7 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
}
if (ibuf_bitmap_page_get_bits(
- bitmap_page, cur_page_id, page_size,
+ bitmap_page, cur_page_id, zip_size,
IBUF_BITMAP_BUFFERED, &mtr)) {
ib_errf(trx->mysql_thd,
@@ -4965,7 +4920,8 @@ dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
slightly corrupted tables can be
imported and dumped. Clear the bit. */
ibuf_bitmap_page_set_bits(
- bitmap_page, cur_page_id, page_size,
+ bitmap_page, cur_page_id,
+ physical_size,
IBUF_BITMAP_BUFFERED, FALSE, &mtr);
}
}
@@ -4995,18 +4951,18 @@ ibuf_set_bitmap_for_bulk_load(
free_val = ibuf_index_page_calc_free(block);
mtr_start(&mtr);
- mtr.set_named_space_id(block->page.id.space());
+ fil_space_t* space = mtr.set_named_space_id(block->page.id.space());
bitmap_page = ibuf_bitmap_get_map_page(block->page.id,
- block->page.size, &mtr);
+ space->zip_size(), &mtr);
free_val = reset ? 0 : ibuf_index_page_calc_free(block);
ibuf_bitmap_page_set_bits(
- bitmap_page, block->page.id, block->page.size,
+ bitmap_page, block->page.id, block->physical_size(),
IBUF_BITMAP_FREE, free_val, &mtr);
ibuf_bitmap_page_set_bits(
- bitmap_page, block->page.id, block->page.size,
+ bitmap_page, block->page.id, block->physical_size(),
IBUF_BITMAP_BUFFERED, FALSE, &mtr);
mtr_commit(&mtr);
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h
index 47d4a9e4478..ed64a92688a 100644
--- a/storage/innobase/include/btr0btr.h
+++ b/storage/innobase/include/btr0btr.h
@@ -2,7 +2,7 @@
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2014, 2019, MariaDB Corporation.
+Copyright (c) 2014, 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
@@ -173,24 +173,19 @@ record is in spatial index */
| BTR_LATCH_FOR_DELETE \
| BTR_MODIFY_EXTERNAL)))
-/**************************************************************//**
-Report that an index page is corrupted. */
-void
-btr_corruption_report(
-/*==================*/
- const buf_block_t* block, /*!< in: corrupted block */
- const dict_index_t* index) /*!< in: index tree */
- ATTRIBUTE_COLD __attribute__((nonnull));
+/** Report that an index page is corrupted.
+@param[in] buffer block
+@param[in] index tree */
+ATTRIBUTE_COLD ATTRIBUTE_NORETURN __attribute__((nonnull))
+void btr_corruption_report(const buf_block_t* block,const dict_index_t* index);
/** Assert that a B-tree page is not corrupted.
@param block buffer block containing a B-tree page
@param index the B-tree index */
-#define btr_assert_not_corrupted(block, index) \
- if ((ibool) !!page_is_comp(buf_block_get_frame(block)) \
- != dict_table_is_comp((index)->table)) { \
- btr_corruption_report(block, index); \
- ut_error; \
- }
+#define btr_assert_not_corrupted(block, index) \
+ if (!!page_is_comp(buf_block_get_frame(block)) \
+ != index->table->not_redundant()) \
+ btr_corruption_report(block, index)
/**************************************************************//**
Gets the root node of a tree and sx-latches it for segment access.
@@ -225,6 +220,7 @@ btr_height_get(
/** Gets a buffer page and declares its latching order level.
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] mode latch mode
@param[in] file file name
@param[in] line line where called
@@ -236,7 +232,7 @@ UNIV_INLINE
buf_block_t*
btr_block_get_func(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint mode,
const char* file,
unsigned line,
@@ -245,13 +241,13 @@ btr_block_get_func(
/** Gets a buffer page and declares its latching order level.
@param page_id tablespace/page identifier
-@param page_size page size
+@param zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param mode latch mode
@param index index tree, may be NULL if not the insert buffer tree
@param mtr mini-transaction handle
@return the block descriptor */
-# define btr_block_get(page_id, page_size, mode, index, mtr) \
- btr_block_get_func(page_id, page_size, mode, \
+# define btr_block_get(page_id, zip_size, mode, index, mtr) \
+ btr_block_get_func(page_id, zip_size, mode, \
__FILE__, __LINE__, (dict_index_t*)index, mtr)
/**************************************************************//**
Gets the index id field of a page.
@@ -327,40 +323,33 @@ btr_node_ptr_get_child_page_no(
@param[in] type type of the index
@param[in,out] space tablespace where created
@param[in] index_id index id
-@param[in] index index, or NULL when applying TRUNCATE
-log record during recovery
-@param[in] btr_redo_create_info used for applying TRUNCATE log
-@param[in] mtr mini-transaction handle
-record during recovery
-@return page number of the created root, FIL_NULL if did not succeed */
+@param[in] index index
+@param[in,out] mtr mini-transaction
+@return page number of the created root
+@retval FIL_NULL if did not succeed */
ulint
btr_create(
ulint type,
fil_space_t* space,
index_id_t index_id,
dict_index_t* index,
- const btr_create_t* btr_redo_create_info,
mtr_t* mtr);
/** Free a persistent index tree if it exists.
@param[in] page_id root page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] index_id PAGE_INDEX_ID contents
@param[in,out] mtr mini-transaction */
void
btr_free_if_exists(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
index_id_t index_id,
mtr_t* mtr);
-/** Free an index tree in a temporary tablespace or during TRUNCATE TABLE.
-@param[in] page_id root page id
-@param[in] page_size page size */
-void
-btr_free(
- const page_id_t page_id,
- const page_size_t& page_size);
+/** Free an index tree in a temporary tablespace.
+@param[in] page_id root page id */
+void btr_free(const page_id_t page_id);
/** Read the last used AUTO_INCREMENT value from PAGE_ROOT_AUTO_INC.
@param[in,out] index clustered index
@@ -390,6 +379,12 @@ void
btr_write_autoinc(dict_index_t* index, ib_uint64_t autoinc, bool reset = false)
MY_ATTRIBUTE((nonnull));
+/** Write instant ALTER TABLE metadata to a root page.
+@param[in,out] root clustered index root page
+@param[in] index clustered index with instant ALTER TABLE
+@param[in,out] mtr mini-transaction */
+void btr_set_instant(buf_block_t* root, const dict_index_t& index, mtr_t* mtr);
+
/*************************************************************//**
Makes tree one level higher by splitting the root, and inserts
the tuple. It is assumed that mtr contains an x-latch on the tree.
@@ -750,21 +745,24 @@ dberr_t
btr_validate_index(
/*===============*/
dict_index_t* index, /*!< in: index */
- const trx_t* trx, /*!< in: transaction or 0 */
- bool lockout)/*!< in: true if X-latch index is intended */
+ const trx_t* trx) /*!< in: transaction or 0 */
MY_ATTRIBUTE((warn_unused_result));
-/*************************************************************//**
-Removes a page from the level list of pages. */
-UNIV_INTERN
-MY_ATTRIBUTE((warn_unused_result)) dberr_t
+/** Remove a page from the level list of pages.
+@param[in] space space where removed
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in,out] page page to remove
+@param[in] index index tree
+@param[in,out] mtr mini-transaction */
+dberr_t
btr_level_list_remove_func(
-/*=======================*/
- ulint space, /*!< in: space where removed */
- const page_size_t& page_size,/*!< in: page size */
- page_t* page, /*!< in/out: page to remove */
- dict_index_t* index, /*!< in: index tree */
- mtr_t* mtr); /*!< in/out: mini-transaction */
+ ulint space,
+ ulint zip_size,
+ page_t* page,
+ dict_index_t* index,
+ mtr_t* mtr)
+ MY_ATTRIBUTE((warn_unused_result));
+
/*************************************************************//**
Removes a page from the level list of pages.
@param space in: space where removed
@@ -799,5 +797,6 @@ btr_lift_page_up(
/****************************************************************
Global variable controlling if scrubbing should be performed */
extern my_bool srv_immediate_scrub_data_uncompressed;
+extern Atomic_counter<uint32_t> btr_validate_index_running;
#endif
diff --git a/storage/innobase/include/btr0btr.inl b/storage/innobase/include/btr0btr.inl
index 49567979c98..d3827b7dc6f 100644
--- a/storage/innobase/include/btr0btr.inl
+++ b/storage/innobase/include/btr0btr.inl
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2017, MariaDB Corporation.
+Copyright (c) 2015, 2019, 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
@@ -31,6 +31,7 @@ Created 6/2/1994 Heikki Tuuri
/** Gets a buffer page and declares its latching order level.
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] mode latch mode
@param[in] file file name
@param[in] line line where called
@@ -42,7 +43,7 @@ UNIV_INLINE
buf_block_t*
btr_block_get_func(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint mode,
const char* file,
unsigned line,
@@ -53,7 +54,7 @@ btr_block_get_func(
dberr_t err=DB_SUCCESS;
block = buf_page_get_gen(
- page_id, page_size, mode, NULL, BUF_GET, file, line, mtr, &err);
+ page_id, zip_size, mode, NULL, BUF_GET, file, line, mtr, &err);
if (err == DB_DECRYPTION_FAILED) {
if (index && index->table) {
diff --git a/storage/innobase/include/btr0bulk.h b/storage/innobase/include/btr0bulk.h
index 7b2b5c7a5d7..b8428186383 100644
--- a/storage/innobase/include/btr0bulk.h
+++ b/storage/innobase/include/btr0bulk.h
@@ -292,8 +292,7 @@ public:
ut_ad(!dict_index_is_spatial(index));
#ifdef UNIV_DEBUG
if (m_flush_observer)
- my_atomic_addlint(&m_index->table->space->redo_skipped_count,
- 1);
+ m_index->table->space->redo_skipped_count++;
#endif /* UNIV_DEBUG */
}
@@ -302,8 +301,7 @@ public:
{
#ifdef UNIV_DEBUG
if (m_flush_observer)
- my_atomic_addlint(&m_index->table->space->redo_skipped_count,
- ulint(-1));
+ m_index->table->space->redo_skipped_count--;
#endif /* UNIV_DEBUG */
}
diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h
index db903df925c..0eb06a3bc99 100644
--- a/storage/innobase/include/btr0cur.h
+++ b/storage/innobase/include/btr0cur.h
@@ -744,11 +744,12 @@ btr_free_externally_stored_field(
ignored if rec == NULL */
bool rollback, /*!< in: performing rollback? */
mtr_t* local_mtr); /*!< in: mtr containing the latch */
+
/** Copies the prefix of an externally stored field of a record.
The clustered index record must be protected by a lock or a page latch.
@param[out] buf the field, or a prefix of it
@param[in] len length of buf, in bytes
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] data 'internally' stored part of the field
containing also the reference to the external part; must be protected by
a lock or a page latch
@@ -759,7 +760,7 @@ ulint
btr_copy_externally_stored_field_prefix(
byte* buf,
ulint len,
- const page_size_t& page_size,
+ ulint zip_size,
const byte* data,
ulint local_len);
@@ -769,7 +770,7 @@ The clustered index record must be protected by a lock or a page latch.
@param[in] data 'internally' stored part of the field
containing also the reference to the external part; must be protected by
a lock or a page latch
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] local_len length of data
@param[in,out] heap mem heap
@return the whole field copied to heap */
@@ -777,7 +778,7 @@ byte*
btr_copy_externally_stored_field(
ulint* len,
const byte* data,
- const page_size_t& page_size,
+ ulint zip_size,
ulint local_len,
mem_heap_t* heap);
@@ -785,7 +786,7 @@ btr_copy_externally_stored_field(
@param[in] rec record in a clustered index; must be
protected by a lock or a page latch
@param[in] offset array returned by rec_get_offsets()
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] no field number
@param[out] len length of the field
@param[in,out] heap mem heap
@@ -794,7 +795,7 @@ byte*
btr_rec_copy_externally_stored_field(
const rec_t* rec,
const rec_offs* offsets,
- const page_size_t& page_size,
+ ulint zip_size,
ulint no,
ulint* len,
mem_heap_t* heap);
@@ -825,6 +826,7 @@ btr_rec_set_deleted_flag(
/** Latches the leaf page or pages requested.
@param[in] block leaf page where the search converged
@param[in] page_id page id of the leaf
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] latch_mode BTR_SEARCH_LEAF, ...
@param[in] cursor cursor
@param[in] mtr mini-transaction
@@ -833,7 +835,7 @@ btr_latch_leaves_t
btr_cur_latch_leaves(
buf_block_t* block,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint latch_mode,
btr_cur_t* cursor,
mtr_t* mtr);
@@ -1036,7 +1038,7 @@ inherited external field. */
#define BTR_EXTERN_INHERITED_FLAG 64U
/** Number of searches down the B-tree in btr_cur_search_to_nth_level(). */
-extern ulint btr_cur_n_non_sea;
+extern Atomic_counter<ulint> btr_cur_n_non_sea;
/** Old value of btr_cur_n_non_sea. Copied by
srv_refresh_innodb_monitor_stats(). Referenced by
srv_printf_innodb_monitor(). */
diff --git a/storage/innobase/include/btr0defragment.h b/storage/innobase/include/btr0defragment.h
index d622c3c7c39..2b6b8f77c73 100644
--- a/storage/innobase/include/btr0defragment.h
+++ b/storage/innobase/include/btr0defragment.h
@@ -26,9 +26,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
#define BTR_DEFRAGMENT_MAX_N_PAGES 32
/** stats in btr_defragment */
-extern ulint btr_defragment_compression_failures;
-extern ulint btr_defragment_failures;
-extern ulint btr_defragment_count;
+extern Atomic_counter<ulint> btr_defragment_compression_failures;
+extern Atomic_counter<ulint> btr_defragment_failures;
+extern Atomic_counter<ulint> btr_defragment_count;
/** Item in the work queue for btr_degrament_thread. */
struct btr_defragment_item_t
diff --git a/storage/innobase/include/btr0types.h b/storage/innobase/include/btr0types.h
index 22e1ef11a68..83c374e2561 100644
--- a/storage/innobase/include/btr0types.h
+++ b/storage/innobase/include/btr0types.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2018, 2019, 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
@@ -27,7 +28,6 @@ Created 2/17/1996 Heikki Tuuri
#define btr0types_h
#include "page0types.h"
-#include "page0size.h"
#include "rem0types.h"
/** Persistent cursor */
@@ -49,41 +49,11 @@ extern ulong btr_ahi_parts;
/** The size of a reference to data stored on a different page.
The reference is stored at the end of the prefix of the field
in the index record. */
+#define FIELD_REF_SIZE 20U
#define BTR_EXTERN_FIELD_REF_SIZE FIELD_REF_SIZE
/** If the data don't exceed the size, the data are stored locally. */
#define BTR_EXTERN_LOCAL_STORED_MAX_SIZE \
(BTR_EXTERN_FIELD_REF_SIZE * 2)
-/** The information is used for creating a new index tree when
-applying TRUNCATE log record during recovery */
-struct btr_create_t {
-
- explicit btr_create_t(const byte* const ptr)
- :
- format_flags(),
- n_fields(),
- field_len(),
- fields(ptr),
- trx_id_pos(ULINT_UNDEFINED)
- {
- /* Do nothing */
- }
-
- /** Page format */
- ulint format_flags;
-
- /** Numbr of index fields */
- ulint n_fields;
-
- /** The length of the encoded meta-data */
- ulint field_len;
-
- /** Field meta-data, encoded. */
- const byte* const fields;
-
- /** Position of trx-id column. */
- ulint trx_id_pos;
-};
-
#endif
diff --git a/storage/innobase/include/buf0buddy.h b/storage/innobase/include/buf0buddy.h
index ac49b166033..63ec8cd0001 100644
--- a/storage/innobase/include/buf0buddy.h
+++ b/storage/innobase/include/buf0buddy.h
@@ -26,11 +26,6 @@ Created December 2006 by Marko Makela
#ifndef buf0buddy_h
#define buf0buddy_h
-#ifdef UNIV_MATERIALIZE
-# undef UNIV_INLINE
-# define UNIV_INLINE
-#endif
-
#include "buf0types.h"
/**********************************************************************//**
diff --git a/storage/innobase/include/buf0buddy.inl b/storage/innobase/include/buf0buddy.inl
index dad9cb668dd..39ab46d80dd 100644
--- a/storage/innobase/include/buf0buddy.inl
+++ b/storage/innobase/include/buf0buddy.inl
@@ -23,11 +23,6 @@ Binary buddy allocator for compressed pages
Created December 2006 by Marko Makela
*******************************************************/
-#ifdef UNIV_MATERIALIZE
-# undef UNIV_INLINE
-# define UNIV_INLINE
-#endif
-
#include "buf0buf.h"
#include "buf0buddy.h"
@@ -132,8 +127,3 @@ buf_buddy_free(
buf_buddy_free_low(buf_pool, buf, buf_buddy_get_slot(size));
}
-
-#ifdef UNIV_MATERIALIZE
-# undef UNIV_INLINE
-# define UNIV_INLINE UNIV_INLINE_ORIGINAL
-#endif
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 68506040e4a..e61e3e4c283 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -42,7 +42,6 @@ Created 11/5/1995 Heikki Tuuri
#include "os0proc.h"
#include "log0log.h"
#include "srv0srv.h"
-#include "my_atomic.h"
#include <ostream>
// Forward declaration
@@ -426,16 +425,14 @@ be implemented at a higher level. In other words, all possible
accesses to a given page through this function must be protected by
the same set of mutexes or latches.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size
@return pointer to the block */
-buf_page_t*
-buf_page_get_zip(
- const page_id_t page_id,
- const page_size_t& page_size);
+buf_page_t* buf_page_get_zip(const page_id_t page_id, ulint zip_size);
/** This is the general function used to get access to a database page.
It does page initialization and applies the buffered redo logs.
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
@@ -448,7 +445,7 @@ BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
buf_block_t*
buf_page_get_gen(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint rw_latch,
buf_block_t* guess,
ulint mode,
@@ -457,8 +454,9 @@ buf_page_get_gen(
mtr_t* mtr,
dberr_t* err);
-/** This is the low level function used to get access to a database page.
+/** Low level function used to get access to a database page.
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH
@param[in] guess guessed block or NULL
@param[in] mode BUF_GET, BUF_GET_IF_IN_POOL,
@@ -471,7 +469,7 @@ BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or BUF_GET_IF_IN_POOL_OR_WATCH
buf_block_t*
buf_page_get_low(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint rw_latch,
buf_block_t* guess,
ulint mode,
@@ -480,18 +478,18 @@ buf_page_get_low(
mtr_t* mtr,
dberr_t* err);
-/** Initializes a page to the buffer buf_pool. The page is usually not read
+/** Initialize a page in the buffer pool. The page is usually not read
from a file even if it cannot be found in the buffer buf_pool. This is one
of the functions which perform to a block a state transition NOT_USED =>
FILE_PAGE (the other is buf_page_get_gen).
@param[in] page_id page id
-@param[in] page_size page size
-@param[in] mtr mini-transaction
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in,out] mtr mini-transaction
@return pointer to the block, page bufferfixed */
buf_block_t*
buf_page_create(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
mtr_t* mtr);
/********************************************************************//**
@@ -627,33 +625,6 @@ buf_block_buf_fix_inc_func(
buf_block_t* block) /*!< in/out: block to bufferfix */
MY_ATTRIBUTE((nonnull));
-/** Increments the bufferfix count.
-@param[in,out] bpage block to bufferfix
-@return the count */
-UNIV_INLINE
-ulint
-buf_block_fix(buf_page_t* bpage);
-
-/** Increments the bufferfix count.
-@param[in,out] block block to bufferfix
-@return the count */
-UNIV_INLINE
-ulint
-buf_block_fix(buf_block_t* block);
-
-/** Decrements the bufferfix count.
-@param[in,out] bpage block to bufferunfix
-@return the remaining buffer-fix count */
-UNIV_INLINE
-ulint
-buf_block_unfix(buf_page_t* bpage);
-/** Decrements the bufferfix count.
-@param[in,out] block block to bufferunfix
-@return the remaining buffer-fix count */
-UNIV_INLINE
-ulint
-buf_block_unfix(buf_block_t* block);
-
# ifdef UNIV_DEBUG
/** Increments the bufferfix count.
@param[in,out] b block to bufferfix
@@ -713,19 +684,13 @@ buf_page_is_checksum_valid_none(
/** Check if a page is corrupt.
@param[in] check_lsn whether the LSN should be checked
@param[in] read_buf database page
-@param[in] page_size page size
-@param[in] space tablespace
+@param[in] fsp_flags tablespace flags
@return whether the page is corrupted */
bool
buf_page_is_corrupted(
bool check_lsn,
const byte* read_buf,
- const page_size_t& page_size,
-#ifndef UNIV_INNOCHECKSUM
- const fil_space_t* space = NULL)
-#else
- const void* space = NULL)
-#endif
+ ulint fsp_flags)
MY_ATTRIBUTE((warn_unused_result));
inline void *aligned_malloc(size_t size, size_t align)
@@ -749,6 +714,63 @@ inline void aligned_free(void *ptr)
#endif
}
+/** Read the key version from the page. In full crc32 format,
+key version is stored at {0-3th} bytes. In other format, it is
+stored in 26th position.
+@param[in] read_buf database page
+@param[in] fsp_flags tablespace flags
+@return key version of the page. */
+inline uint32_t buf_page_get_key_version(const byte* read_buf, ulint fsp_flags)
+{
+ return fil_space_t::full_crc32(fsp_flags)
+ ? mach_read_from_4(read_buf + FIL_PAGE_FCRC32_KEY_VERSION)
+ : mach_read_from_4(read_buf
+ + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+}
+
+/** Read the compression info from the page. In full crc32 format,
+compression info is at MSB of page type. In other format, it is
+stored in page type.
+@param[in] read_buf database page
+@param[in] fsp_flags tablespace flags
+@return true if page is compressed. */
+inline bool buf_page_is_compressed(const byte* read_buf, ulint fsp_flags)
+{
+ ulint page_type = mach_read_from_2(read_buf + FIL_PAGE_TYPE);
+ return fil_space_t::full_crc32(fsp_flags)
+ ? !!(page_type & 1U << FIL_PAGE_COMPRESS_FCRC32_MARKER)
+ : page_type == FIL_PAGE_PAGE_COMPRESSED;
+}
+
+/** Get the compressed or uncompressed size of a full_crc32 page.
+@param[in] buf page_compressed or uncompressed page
+@param[out] comp whether the page could be compressed
+@param[out] cr whether the page could be corrupted
+@return the payload size in the file page */
+inline uint buf_page_full_crc32_size(const byte* buf, bool* comp, bool* cr)
+{
+ uint t = mach_read_from_2(buf + FIL_PAGE_TYPE);
+ uint page_size = uint(srv_page_size);
+
+ if (!(t & 1U << FIL_PAGE_COMPRESS_FCRC32_MARKER)) {
+ return page_size;
+ }
+
+ t &= ~(1U << FIL_PAGE_COMPRESS_FCRC32_MARKER);
+ t <<= 8;
+
+ if (t < page_size) {
+ page_size = t;
+ if (comp) {
+ *comp = true;
+ }
+ } else if (cr) {
+ *cr = true;
+ }
+
+ return page_size;
+}
+
#ifndef UNIV_INNOCHECKSUM
/**********************************************************************//**
Gets the space id, page offset, and byte offset within page of a
@@ -810,10 +832,8 @@ buf_print(void);
/** Dump a page to stderr.
@param[in] read_buf database page
-@param[in] page_size page size */
-UNIV_INTERN
-void
-buf_page_print(const byte* read_buf, const page_size_t& page_size)
+@param[in] zip_size compressed page size, or 0 */
+void buf_page_print(const byte* read_buf, ulint zip_size = 0)
ATTRIBUTE_COLD __attribute__((nonnull));
/********************************************************************//**
Decompress a block.
@@ -1172,6 +1192,7 @@ and the lock released later.
@param[out] err DB_SUCCESS or DB_TABLESPACE_DELETED
@param[in] mode BUF_READ_IBUF_PAGES_ONLY, ...
@param[in] page_id page id
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] unzip whether the uncompressed page is
requested (for ROW_FORMAT=COMPRESSED)
@return pointer to the block
@@ -1181,7 +1202,7 @@ buf_page_init_for_read(
dberr_t* err,
ulint mode,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
bool unzip);
/** Complete a read or write request of a file page to or from the buffer pool.
@@ -1383,6 +1404,15 @@ ulint
buf_pool_size_align(
ulint size);
+/** Verify that post encryption checksum match with the calculated checksum.
+This function should be called only if tablespace contains crypt data metadata.
+@param[in] page page frame
+@param[in] fsp_flags tablespace flags
+@return true if page is encrypted and OK, false otherwise */
+bool buf_page_verify_crypt_checksum(
+ const byte* page,
+ ulint fsp_flags);
+
/** Calculate the checksum of a page from compressed table and update the
page.
@param[in,out] page page to update
@@ -1403,7 +1433,7 @@ a page is written to disk.
(may be src_frame or an encrypted/compressed copy of it) */
UNIV_INTERN
byte*
-buf_page_encrypt_before_write(
+buf_page_encrypt(
fil_space_t* space,
buf_page_t* bpage,
byte* src_frame);
@@ -1413,10 +1443,9 @@ buf_page_encrypt_before_write(
NOTE! The definition appears here only for other modules of this
directory (buf) to see it. Do not use from outside! */
-struct buf_tmp_buffer_t {
-private:
- int32 reserved; /*!< true if this slot is reserved
- */
+class buf_tmp_buffer_t {
+ /** whether this slot is reserved */
+ std::atomic<bool> reserved;
public:
byte* crypt_buf; /*!< for encryption the data needs to be
copied to a separate buffer before it's
@@ -1432,16 +1461,14 @@ public:
/** Release the slot */
void release()
{
- my_atomic_store32_explicit(&reserved, false,
- MY_MEMORY_ORDER_RELAXED);
+ reserved.store(false, std::memory_order_relaxed);
}
/** Acquire the slot
@return whether the slot was acquired */
bool acquire()
{
- return !my_atomic_fas32_explicit(&reserved, true,
- MY_MEMORY_ORDER_RELAXED);
+ return !reserved.exchange(true, std::memory_order_relaxed);
}
};
@@ -1467,11 +1494,8 @@ public:
buf_pool->page_hash or
buf_pool->zip_hash */
- /** Page size. Protected by buf_pool mutex. */
- page_size_t size;
-
/** Count of how manyfold this block is currently bufferfixed. */
- int32 buf_fix_count;
+ Atomic_counter<uint32_t> buf_fix_count;
/** type of pending I/O operation; also protected by
buf_pool->mutex for writes only */
@@ -1616,6 +1640,27 @@ public:
protected by buf_pool->zip_mutex
or buf_block_t::mutex. */
# endif /* UNIV_DEBUG */
+
+ void fix() { buf_fix_count++; }
+ uint32_t unfix()
+ {
+ uint32_t count= buf_fix_count--;
+ ut_ad(count != 0);
+ return count - 1;
+ }
+
+ /** @return the physical size, in bytes */
+ ulint physical_size() const
+ {
+ return zip.ssize ? (UNIV_ZIP_SIZE_MIN >> 1) << zip.ssize : srv_page_size;
+ }
+
+ /** @return the ROW_FORMAT=COMPRESSED physical size, in bytes
+ @retval 0 if not compressed */
+ ulint zip_size() const
+ {
+ return zip.ssize ? (UNIV_ZIP_SIZE_MIN >> 1) << zip.ssize : 0;
+ }
};
/** The buffer control block structure */
@@ -1722,20 +1767,20 @@ struct buf_block_t{
/* @{ */
# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
- ulint n_pointers; /*!< used in debugging: the number of
+ Atomic_counter<ulint>
+ n_pointers; /*!< used in debugging: the number of
pointers in the adaptive hash index
pointing to this frame;
protected by atomic memory access
or btr_search_own_all(). */
# define assert_block_ahi_empty(block) \
- ut_a(my_atomic_addlint(&(block)->n_pointers, 0) == 0)
+ ut_a((block)->n_pointers == 0)
# define assert_block_ahi_empty_on_init(block) do { \
MEM_MAKE_DEFINED(&(block)->n_pointers, sizeof (block)->n_pointers); \
assert_block_ahi_empty(block); \
} while (0)
# define assert_block_ahi_valid(block) \
- ut_a((block)->index \
- || my_atomic_loadlint(&(block)->n_pointers) == 0)
+ ut_a((block)->index || (block)->n_pointers == 0)
# else /* UNIV_AHI_DEBUG || UNIV_DEBUG */
# define assert_block_ahi_empty(block) /* nothing */
# define assert_block_ahi_empty_on_init(block) /* nothing */
@@ -1764,7 +1809,7 @@ struct buf_block_t{
# ifdef UNIV_DEBUG
/** @name Debug fields */
/* @{ */
- rw_lock_t debug_latch; /*!< in the debug version, each thread
+ rw_lock_t* debug_latch; /*!< in the debug version, each thread
which bufferfixes the block acquires
an s-latch here; so we can use the
debug utilities in sync0rw */
@@ -1776,6 +1821,16 @@ struct buf_block_t{
and accessed; we introduce this new
mutex in InnoDB-5.1 to relieve
contention on the buffer pool mutex */
+
+ void fix() { page.fix(); }
+ uint32_t unfix() { return page.unfix(); }
+
+ /** @return the physical size, in bytes */
+ ulint physical_size() const { return page.physical_size(); }
+
+ /** @return the ROW_FORMAT=COMPRESSED physical size, in bytes
+ @retval 0 if not compressed */
+ ulint zip_size() const { return page.zip_size(); }
};
/** Check if a buf_block_t object is in a valid state
@@ -1867,13 +1922,13 @@ public:
HazardPointer(buf_pool, mutex) {}
/** Destructor */
- virtual ~FlushHp() {}
+ ~FlushHp() override {}
/** Adjust the value of hp. This happens when some
other thread working on the same list attempts to
remove the hp from the list.
@param bpage buffer block to be compared */
- void adjust(const buf_page_t* bpage);
+ void adjust(const buf_page_t* bpage) override;
};
/** Class implementing buf_pool->LRU hazard pointer */
@@ -1888,13 +1943,13 @@ public:
HazardPointer(buf_pool, mutex) {}
/** Destructor */
- virtual ~LRUHp() {}
+ ~LRUHp() override {}
/** Adjust the value of hp. This happens when some
other thread working on the same list attempts to
remove the hp from the list.
@param bpage buffer block to be compared */
- void adjust(const buf_page_t* bpage);
+ void adjust(const buf_page_t* bpage) override;
};
/** Special purpose iterators to be used when scanning the LRU list.
@@ -1912,7 +1967,7 @@ public:
LRUHp(buf_pool, mutex) {}
/** Destructor */
- virtual ~LRUItr() {}
+ ~LRUItr() override {}
/** Selects from where to start a scan. If we have scanned
too deep into the LRU list it resets the value to the tail
@@ -1980,17 +2035,6 @@ struct buf_buddy_stat_t {
ib_uint64_t relocated_usec;
};
-/** @brief The temporary memory array structure.
-
-NOTE! The definition appears here only for other modules of this
-directory (buf) to see it. Do not use from outside! */
-
-typedef struct {
- ulint n_slots; /*!< Total number of slots */
- buf_tmp_buffer_t *slots; /*!< Pointer to the slots in the
- array */
-} buf_tmp_array_t;
-
/** @brief The buffer pool structure.
NOTE! The definition appears here only for other modules of this
@@ -2048,7 +2092,8 @@ struct buf_pool_t{
indexed by block->frame */
ulint n_pend_reads; /*!< number of pending read
operations */
- ulint n_pend_unzip; /*!< number of pending decompressions */
+ Atomic_counter<ulint>
+ n_pend_unzip; /*!< number of pending decompressions */
time_t last_printout_time;
/*!< when buf_print_io was last time
@@ -2189,25 +2234,53 @@ struct buf_pool_t{
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
UT_LIST_BASE_NODE_T(buf_buddy_free_t) zip_free[BUF_BUDDY_SIZES_MAX];
/*!< buddy free lists */
+#if BUF_BUDDY_LOW > UNIV_ZIP_SIZE_MIN
+# error "BUF_BUDDY_LOW > UNIV_ZIP_SIZE_MIN"
+#endif
+ /* @} */
buf_page_t* watch;
/*!< Sentinel records for buffer
pool watches. Protected by
buf_pool->mutex. */
- buf_tmp_array_t* tmp_arr;
- /*!< Array for temporal memory
- used in compression and encryption */
+ /** Temporary memory for page_compressed and encrypted I/O */
+ struct io_buf_t {
+ /** number of elements in slots[] */
+ const ulint n_slots;
+ /** array of slots */
+ buf_tmp_buffer_t* const slots;
+
+ io_buf_t() = delete;
+
+ /** Constructor */
+ explicit io_buf_t(ulint n_slots) :
+ n_slots(n_slots),
+ slots(static_cast<buf_tmp_buffer_t*>(
+ ut_malloc_nokey(n_slots
+ * sizeof *slots)))
+ {
+ memset((void*) slots, 0, n_slots * sizeof *slots);
+ }
+
+ ~io_buf_t();
+
+ /** Reserve a buffer */
+ buf_tmp_buffer_t* reserve()
+ {
+ for (buf_tmp_buffer_t* s = slots, *e = slots + n_slots;
+ s != e; s++) {
+ if (s->acquire()) return s;
+ }
+ return NULL;
+ }
+ } io_buf;
+
/** Determine if a pointer belongs to a buf_block_t.
It can be a pointer to the buf_block_t itself or a member of it.
@param ptr a pointer that will not be dereferenced
@return whether the ptr belongs to a buf_block_t struct */
inline bool is_block_field(const void *ptr) const;
-
-#if BUF_BUDDY_LOW > UNIV_ZIP_SIZE_MIN
-# error "BUF_BUDDY_LOW > UNIV_ZIP_SIZE_MIN"
-#endif
- /* @} */
};
/** Print the given buf_pool_t object.
diff --git a/storage/innobase/include/buf0buf.inl b/storage/innobase/include/buf0buf.inl
index cdb1bd401d5..ac50588c217 100644
--- a/storage/innobase/include/buf0buf.inl
+++ b/storage/innobase/include/buf0buf.inl
@@ -974,49 +974,6 @@ buf_block_get_modify_clock(
return(block->modify_clock);
}
-/** Increments the bufferfix count.
-@param[in,out] bpage block to bufferfix
-@return the count */
-UNIV_INLINE
-ulint
-buf_block_fix(buf_page_t* bpage)
-{
- return uint32(my_atomic_add32_explicit(
- &bpage->buf_fix_count, 1,
- MY_MEMORY_ORDER_RELAXED)) + 1;
-}
-
-/** Increments the bufferfix count.
-@param[in,out] block block to bufferfix
-@return the count */
-UNIV_INLINE
-ulint
-buf_block_fix(buf_block_t* block)
-{
- return buf_block_fix(&block->page);
-}
-
-/** Get the bufferfix count.
-@param[in] bpage block to bufferfix
-@return the count */
-UNIV_INLINE
-ulint
-buf_block_get_fix(buf_page_t* bpage)
-{
- return my_atomic_load32_explicit(&bpage->buf_fix_count,
- MY_MEMORY_ORDER_RELAXED);
-}
-
-/** Get the bufferfix count.
-@param[in] bpage block to bufferfix
-@return the count */
-UNIV_INLINE
-ulint
-buf_block_get_fix(buf_block_t* block)
-{
- return buf_block_get_fix(&block->page);
-}
-
/*******************************************************************//**
Increments the bufferfix count. */
UNIV_INLINE
@@ -1035,36 +992,12 @@ buf_block_buf_fix_inc_func(
threaded. */
if (!fsp_is_system_temporary(block->page.id.space())) {
ibool ret;
- ret = rw_lock_s_lock_nowait(&block->debug_latch, file, line);
+ ret = rw_lock_s_lock_nowait(block->debug_latch, file, line);
ut_a(ret);
}
#endif /* UNIV_DEBUG */
- buf_block_fix(block);
-}
-
-/** Decrements the bufferfix count.
-@param[in,out] bpage block to bufferunfix
-@return the remaining buffer-fix count */
-UNIV_INLINE
-ulint
-buf_block_unfix(buf_page_t* bpage)
-{
- uint32 count = uint32(my_atomic_add32_explicit(
- &bpage->buf_fix_count,
- -1, MY_MEMORY_ORDER_RELAXED));
- ut_ad(count != 0);
- return count - 1;
-}
-
-/** Decrements the bufferfix count.
-@param[in,out] block block to bufferunfix
-@return the remaining buffer-fix count */
-UNIV_INLINE
-ulint
-buf_block_unfix(buf_block_t* block)
-{
- return buf_block_unfix(&block->page);
+ block->fix();
}
/*******************************************************************//**
@@ -1080,11 +1013,11 @@ buf_block_buf_fix_dec(
Debug latch is not of much help if access to block is single
threaded. */
if (!fsp_is_system_temporary(block->page.id.space())) {
- rw_lock_s_unlock(&block->debug_latch);
+ rw_lock_s_unlock(block->debug_latch);
}
#endif /* UNIV_DEBUG */
- buf_block_unfix(block);
+ block->unfix();
}
/** Returns the buffer pool instance given a page id.
@@ -1325,14 +1258,14 @@ buf_page_release_zip(
is single threaded. */
buf_block_t* block = reinterpret_cast<buf_block_t*>(bpage);
if (!fsp_is_system_temporary(block->page.id.space())) {
- rw_lock_s_unlock(&block->debug_latch);
+ rw_lock_s_unlock(block->debug_latch);
}
}
#endif /* UNIV_DEBUG */
/* Fall through */
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
- buf_block_unfix(reinterpret_cast<buf_block_t*>(bpage));
+ reinterpret_cast<buf_block_t*>(bpage)->unfix();
return;
case BUF_BLOCK_POOL_WATCH:
@@ -1361,7 +1294,7 @@ buf_page_release_latch(
temporary. Debug latch is not of much help if access to block
is single threaded. */
if (!fsp_is_system_temporary(block->page.id.space())) {
- rw_lock_s_unlock(&block->debug_latch);
+ rw_lock_s_unlock(block->debug_latch);
}
#endif /* UNIV_DEBUG */
diff --git a/storage/innobase/include/buf0checksum.h b/storage/innobase/include/buf0checksum.h
index ce39e290ac7..8dc25f91d59 100644
--- a/storage/innobase/include/buf0checksum.h
+++ b/storage/innobase/include/buf0checksum.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -29,18 +29,6 @@ Created Aug 11, 2011 Vasil Dimov
#include "buf0types.h"
-#ifdef INNODB_BUG_ENDIAN_CRC32
-/** Calculate the CRC32 checksum of a page. The value is stored to the page
-when it is written to a file and also checked for a match when reading from
-the file. Note that we must be careful to calculate the same value on all
-architectures.
-@param[in] page buffer page (srv_page_size bytes)
-@param[in] bug_endian whether to use big endian byteorder
-when converting byte strings to integers, for bug-compatibility with
-big-endian architecture running MySQL 5.6, MariaDB 10.0 or MariaDB 10.1
-@return CRC-32C */
-uint32_t buf_calc_page_crc32(const byte* page, bool bug_endian = false);
-#else
/** Calculate the CRC32 checksum of a page. The value is stored to the page
when it is written to a file and also checked for a match when reading from
the file. Note that we must be careful to calculate the same value on all
@@ -48,7 +36,6 @@ architectures.
@param[in] page buffer page (srv_page_size bytes)
@return CRC-32C */
uint32_t buf_calc_page_crc32(const byte* page);
-#endif
/** Calculate a checksum which is stored to the page when it is written
to a file. Note that we must be careful to calculate the same value on
diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h
index a0d05dbe07e..aa9eb78b8ef 100644
--- a/storage/innobase/include/buf0flu.h
+++ b/storage/innobase/include/buf0flu.h
@@ -73,17 +73,24 @@ buf_flush_relocate_on_flush_list(
@param[in,out] bpage flushed page
@param[in] dblwr whether the doublewrite buffer was used */
void buf_flush_write_complete(buf_page_t* bpage, bool dblwr);
+
+/** Assign the full crc32 checksum for non-compressed page.
+@param[in,out] page page to be updated */
+void buf_flush_assign_full_crc32_checksum(byte* page);
+
/** Initialize a page for writing to the tablespace.
-@param[in] block buffer block; NULL if bypassing the buffer pool
-@param[in,out] page page frame
-@param[in,out] page_zip_ compressed page, or NULL if uncompressed
-@param[in] newest_lsn newest modification LSN to the page */
+@param[in] block buffer block; NULL if bypassing the buffer pool
+@param[in,out] page page frame
+@param[in,out] page_zip_ compressed page, or NULL if uncompressed
+@param[in] newest_lsn newest modification LSN to the page
+@param[in] use_full_checksum whether tablespace uses full checksum */
void
buf_flush_init_for_writing(
const buf_block_t* block,
byte* page,
void* page_zip_,
- lsn_t newest_lsn);
+ lsn_t newest_lsn,
+ bool use_full_checksum);
# if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
/********************************************************************//**
@@ -181,18 +188,6 @@ buf_flush_note_modification(
lsn_t end_lsn, /*!< in: end lsn of the last mtr in the
set of mtr's */
FlushObserver* observer); /*!< in: flush observer */
-
-/********************************************************************//**
-This function should be called when recovery has modified a buffer page. */
-UNIV_INLINE
-void
-buf_flush_recv_note_modification(
-/*=============================*/
- buf_block_t* block, /*!< in: block which is modified */
- lsn_t start_lsn, /*!< in: start lsn of the first mtr in a
- set of mtr's */
- lsn_t end_lsn); /*!< in: end lsn of the last mtr in the
- set of mtr's */
/********************************************************************//**
Returns TRUE if the file page block is immediately suitable for replacement,
i.e., transition FILE_PAGE => NOT_USED allowed.
diff --git a/storage/innobase/include/buf0flu.inl b/storage/innobase/include/buf0flu.inl
index 8d06a53c547..02f3d8ced57 100644
--- a/storage/innobase/include/buf0flu.inl
+++ b/storage/innobase/include/buf0flu.inl
@@ -38,17 +38,6 @@ buf_flush_insert_into_flush_list(
lsn_t lsn); /*!< in: oldest modification */
/********************************************************************//**
-Inserts a modified block into the flush list in the right sorted position.
-This function is used by recovery, because there the modifications do not
-necessarily come in the order of lsn's. */
-void
-buf_flush_insert_sorted_into_flush_list(
-/*====================================*/
- buf_pool_t* buf_pool, /*!< buffer pool instance */
- buf_block_t* block, /*!< in/out: block which is modified */
- lsn_t lsn); /*!< in: oldest modification */
-
-/********************************************************************//**
This function should be called at a mini-transaction commit, if a page was
modified in it. Puts the block to the list of modified blocks, if it is not
already in it. */
@@ -63,24 +52,11 @@ buf_flush_note_modification(
modified this block */
FlushObserver* observer) /*!< in: flush observer */
{
-#ifdef UNIV_DEBUG
- {
- /* Allow write to proceed to shared temporary tablespace
- in read-only mode. */
- ut_ad(!srv_read_only_mode
- || fsp_is_system_temporary(block->page.id.space()));
- ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
- ut_ad(block->page.buf_fix_count > 0);
-
- buf_pool_t* buf_pool = buf_pool_from_block(block);
-
- ut_ad(!buf_pool_mutex_own(buf_pool));
- ut_ad(!buf_flush_list_mutex_own(buf_pool));
- }
-#endif /* UNIV_DEBUG */
-
mutex_enter(&block->mutex);
-
+ ut_ad(!srv_read_only_mode
+ || fsp_is_system_temporary(block->page.id.space()));
+ ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
+ ut_ad(block->page.buf_fix_count > 0);
ut_ad(block->page.newest_modification <= end_lsn);
block->page.newest_modification = end_lsn;
@@ -98,52 +74,7 @@ buf_flush_note_modification(
ut_ad(block->page.oldest_modification <= start_lsn);
}
- buf_page_mutex_exit(block);
+ mutex_exit(&block->mutex);
srv_stats.buf_pool_write_requests.inc();
}
-
-/********************************************************************//**
-This function should be called when recovery has modified a buffer page. */
-UNIV_INLINE
-void
-buf_flush_recv_note_modification(
-/*=============================*/
- buf_block_t* block, /*!< in: block which is modified */
- lsn_t start_lsn, /*!< in: start lsn of the first mtr in a
- set of mtr's */
- lsn_t end_lsn) /*!< in: end lsn of the last mtr in the
- set of mtr's */
-{
-#ifdef UNIV_DEBUG
- {
- ut_ad(!srv_read_only_mode);
- ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
- ut_ad(block->page.buf_fix_count > 0);
-
- buf_pool_t* buf_pool = buf_pool_from_block(block);
-
- ut_ad(!buf_pool_mutex_own(buf_pool));
- ut_ad(!buf_flush_list_mutex_own(buf_pool));
-
- ut_ad(start_lsn != 0);
- ut_ad(block->page.newest_modification <= end_lsn);
- }
-#endif /* UNIV_DEBUG */
-
- buf_page_mutex_enter(block);
-
- block->page.newest_modification = end_lsn;
-
- if (!block->page.oldest_modification) {
- buf_pool_t* buf_pool = buf_pool_from_block(block);
-
- buf_flush_insert_sorted_into_flush_list(
- buf_pool, block, start_lsn);
- } else {
- ut_ad(block->page.oldest_modification <= start_lsn);
- }
-
- buf_page_mutex_exit(block);
-
-}
diff --git a/storage/innobase/include/buf0rea.h b/storage/innobase/include/buf0rea.h
index e590d818334..ff0ba474bb3 100644
--- a/storage/innobase/include/buf0rea.h
+++ b/storage/innobase/include/buf0rea.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2017, MariaDB Corporation.
+Copyright (c) 2015, 2019, 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
@@ -34,30 +34,23 @@ buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@retval DB_SUCCESS if the page was read and is not corrupted,
@retval DB_PAGE_CORRUPTED if page based on checksum check is corrupted,
@retval DB_DECRYPTION_FAILED if page post encryption checksum matches but
after decryption normal page checksum does not match.
@retval DB_TABLESPACE_DELETED if tablespace .ibd file is missing */
-dberr_t
-buf_read_page(
- const page_id_t page_id,
- const page_size_t& page_size);
+dberr_t buf_read_page(const page_id_t page_id, ulint zip_size);
-/********************************************************************//**
-High-level function which reads a page asynchronously from a file to the
+/** High-level function which reads a page asynchronously from a file to the
buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] sync true if synchronous aio is desired */
void
-buf_read_page_background(
- const page_id_t page_id,
- const page_size_t& page_size,
- bool sync);
+buf_read_page_background(const page_id_t page_id, ulint zip_size, bool sync);
/** Applies a random read-ahead in buf_pool if there are at least a threshold
value of accessed pages from the random read-ahead area. Does not read any
@@ -70,16 +63,13 @@ performed by ibuf routines, a situation which could result in a deadlock if
the OS does not support asynchronous i/o.
@param[in] page_id page id of a page which the current thread
wants to access
-@param[in] page_size page size
-@param[in] inside_ibuf TRUE if we are inside ibuf routine
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in] ibuf whether we are inside ibuf routine
@return number of page read requests issued; NOTE that if we read ibuf
pages, it may happen that the page at the given page number does not
get read even if we return a positive value! */
ulint
-buf_read_ahead_random(
- const page_id_t page_id,
- const page_size_t& page_size,
- ibool inside_ibuf);
+buf_read_ahead_random(const page_id_t page_id, ulint zip_size, bool ibuf);
/** Applies linear read-ahead if in the buf_pool the page is a border page of
a linear read-ahead area and all the pages in the area have been accessed.
@@ -104,14 +94,11 @@ NOTE 3: the calling thread must want access to the page given: this rule is
set to prevent unintended read-aheads performed by ibuf routines, a situation
which could result in a deadlock if the OS does not support asynchronous io.
@param[in] page_id page id; see NOTE 3 above
-@param[in] page_size page size
-@param[in] inside_ibuf TRUE if we are inside ibuf routine
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in] ibuf whether if we are inside ibuf routine
@return number of page read requests issued */
ulint
-buf_read_ahead_linear(
- const page_id_t page_id,
- const page_size_t& page_size,
- ibool inside_ibuf);
+buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf);
/********************************************************************//**
Issues read requests for pages which the ibuf module wants to read in, in
diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h
index bd5e26df47b..5532a524782 100644
--- a/storage/innobase/include/buf0types.h
+++ b/storage/innobase/include/buf0types.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2019, 2020, 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
@@ -82,8 +83,16 @@ enum srv_checksum_algorithm_t {
innodb when reading */
SRV_CHECKSUM_ALGORITHM_NONE, /*!< Write none, allow crc32,
innodb or none when reading */
- SRV_CHECKSUM_ALGORITHM_STRICT_NONE /*!< Write none, allow none
+ SRV_CHECKSUM_ALGORITHM_STRICT_NONE, /*!< Write none, allow none
when reading */
+
+ /** For new files, always compute CRC-32C for the whole page.
+ For old files, allow crc32, innodb or none when reading. */
+ SRV_CHECKSUM_ALGORITHM_FULL_CRC32,
+
+ /** For new files, always compute CRC-32C for the whole page.
+ For old files, allow crc32 when reading. */
+ SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32
};
inline
@@ -202,6 +211,12 @@ private:
const page_id_t page_id);
};
+/** A field reference full of zero, for use in assertions and checks,
+and dummy default values of instantly dropped columns.
+Initially, BLOB field references are set to zero, in
+dtuple_convert_big_rec(). */
+extern const byte field_ref_zero[UNIV_PAGE_SIZE_MAX];
+
#ifndef UNIV_INNOCHECKSUM
#include "ut0mutex.h"
diff --git a/storage/innobase/include/data0data.h b/storage/innobase/include/data0data.h
index 3adad3d925b..c2b8c3e00b6 100644
--- a/storage/innobase/include/data0data.h
+++ b/storage/innobase/include/data0data.h
@@ -543,6 +543,7 @@ struct dtuple_t {
inserted or updated.
@param[in] index index possibly with instantly added columns */
void trim(const dict_index_t& index);
+
bool vers_history_row() const
{
for (ulint i = 0; i < n_fields; i++) {
@@ -553,6 +554,33 @@ struct dtuple_t {
}
return false;
}
+
+ /**
+ @param info_bits the info_bits of a data tuple
+ @return whether this is a hidden metadata record
+ for instant ADD COLUMN or ALTER TABLE */
+ static bool is_alter_metadata(ulint info_bits)
+ {
+ return UNIV_UNLIKELY(info_bits == REC_INFO_METADATA_ALTER);
+ }
+
+ /**
+ @param info_bits the info_bits of a data tuple
+ @return whether this is a hidden metadata record
+ for instant ADD COLUMN or ALTER TABLE */
+ static bool is_metadata(ulint info_bits)
+ {
+ return UNIV_UNLIKELY((info_bits & ~REC_INFO_DELETED_FLAG)
+ == REC_INFO_METADATA_ADD);
+ }
+
+ /** @return whether this is a hidden metadata record
+ for instant ALTER TABLE (not only ADD COLUMN) */
+ bool is_alter_metadata() const { return is_alter_metadata(info_bits); }
+
+ /** @return whether this is a hidden metadata record
+ for instant ADD COLUMN or ALTER TABLE */
+ bool is_metadata() const { return is_metadata(info_bits); }
};
inline ulint dtuple_get_n_fields(const dtuple_t* tuple)
diff --git a/storage/innobase/include/data0type.h b/storage/innobase/include/data0type.h
index 4f7228b0280..3523a487d74 100644
--- a/storage/innobase/include/data0type.h
+++ b/storage/innobase/include/data0type.h
@@ -262,35 +262,31 @@ dtype_get_at_most_n_mbchars(
ulint data_len, /*!< in: length of str (in bytes) */
const char* str); /*!< in: the string whose prefix
length is being determined */
-/*********************************************************************//**
-Checks if a data main type is a string type. Also a BLOB is considered a
-string type.
-@return TRUE if string type */
-ibool
-dtype_is_string_type(
-/*=================*/
- ulint mtype); /*!< in: InnoDB main data type code: DATA_CHAR, ... */
-/*********************************************************************//**
-Checks if a type is a binary string type. Note that for tables created with
-< 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For
-those DATA_BLOB columns this function currently returns FALSE.
-@return TRUE if binary string type */
-ibool
-dtype_is_binary_string_type(
-/*========================*/
- ulint mtype, /*!< in: main data type */
- ulint prtype);/*!< in: precise type */
-/*********************************************************************//**
-Checks if a type is a non-binary string type. That is, dtype_is_string_type is
-TRUE and dtype_is_binary_string_type is FALSE. Note that for tables created
-with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
-For those DATA_BLOB columns this function currently returns TRUE.
-@return TRUE if non-binary string type */
-ibool
-dtype_is_non_binary_string_type(
-/*============================*/
- ulint mtype, /*!< in: main data type */
- ulint prtype);/*!< in: precise type */
+/** @return whether main type is a string type */
+inline bool dtype_is_string_type(ulint mtype)
+{
+ return mtype <= DATA_BLOB
+ || mtype == DATA_MYSQL || mtype == DATA_VARMYSQL;
+}
+
+/** @return whether a type is a binary string type */
+inline bool dtype_is_binary_string_type(ulint mtype, ulint prtype)
+{
+ /* Note that for tables created before MySQL 4.0.14,
+ we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
+ For those DATA_BLOB columns we return false. */
+
+ return mtype == DATA_FIXBINARY || mtype == DATA_BINARY
+ || (mtype == DATA_BLOB && (prtype & DATA_BINARY_TYPE));
+}
+
+/** @return whether a type is a non-binary string type */
+inline bool dtype_is_non_binary_string_type(ulint mtype, ulint prtype)
+{
+ return dtype_is_string_type(mtype)
+ && !dtype_is_binary_string_type(mtype, prtype);
+}
+
/*********************************************************************//**
Sets a data type structure. */
UNIV_INLINE
@@ -338,14 +334,15 @@ dtype_get_mblen(
multi-byte character */
ulint* mbmaxlen); /*!< out: maximum length of a
multi-byte character */
-/*********************************************************************//**
-Gets the MySQL charset-collation code for MySQL string types.
-@return MySQL charset-collation code */
-UNIV_INLINE
-ulint
-dtype_get_charset_coll(
-/*===================*/
- ulint prtype);/*!< in: precise data type */
+/**
+Get the charset-collation code for string types.
+@param prtype InnoDB precise type
+@return charset-collation code */
+inline uint16_t dtype_get_charset_coll(ulint prtype)
+{
+ return static_cast<uint16_t>(prtype >> 16) & CHAR_COLL_MASK;
+}
+
/** Form a precise type from the < 4.1.2 format precise type plus the
charset-collation code.
@param[in] old_prtype MySQL type code and the flags
@@ -554,11 +551,55 @@ struct dtype_t{
{
return (prtype & DATA_VERSIONED) == DATA_VERS_END;
}
+
+ /** Set the type of the BLOB in the hidden metadata record. */
+ void metadata_blob_init()
+ {
+ prtype = DATA_NOT_NULL;
+ mtype = DATA_BLOB;
+ len = 0;
+ mbminlen = 0;
+ mbmaxlen = 0;
+ }
};
/** The DB_TRX_ID,DB_ROLL_PTR values for "no history is available" */
extern const byte reset_trx_id[DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN];
+/** Info bit denoting the predefined minimum record: this bit is set
+if and only if the record is the first user record on a non-leaf
+B-tree page that is the leftmost page on its level
+(PAGE_LEVEL is nonzero and FIL_PAGE_PREV is FIL_NULL). */
+#define REC_INFO_MIN_REC_FLAG 0x10UL
+/** The delete-mark flag in info bits */
+#define REC_INFO_DELETED_FLAG 0x20UL
+
+/** Record status values for ROW_FORMAT=COMPACT,DYNAMIC,COMPRESSED */
+enum rec_comp_status_t {
+ /** User record (PAGE_LEVEL=0, heap>=PAGE_HEAP_NO_USER_LOW) */
+ REC_STATUS_ORDINARY = 0,
+ /** Node pointer record (PAGE_LEVEL>=0, heap>=PAGE_HEAP_NO_USER_LOW) */
+ REC_STATUS_NODE_PTR = 1,
+ /** The page infimum pseudo-record (heap=PAGE_HEAP_NO_INFIMUM) */
+ REC_STATUS_INFIMUM = 2,
+ /** The page supremum pseudo-record (heap=PAGE_HEAP_NO_SUPREMUM) */
+ REC_STATUS_SUPREMUM = 3,
+ /** Clustered index record that has been inserted or updated
+ after instant ADD COLUMN (more than dict_index_t::n_core_fields) */
+ REC_STATUS_INSTANT = 4
+};
+
+/** The dtuple_t::info_bits of the hidden metadata of instant ADD COLUMN.
+@see rec_is_metadata()
+@see rec_is_alter_metadata() */
+static const byte REC_INFO_METADATA_ADD
+ = REC_INFO_MIN_REC_FLAG | REC_STATUS_INSTANT;
+
+/** The dtuple_t::info_bits of the hidden metadata of instant ALTER TABLE.
+@see rec_is_metadata() */
+static const byte REC_INFO_METADATA_ALTER
+ = REC_INFO_METADATA_ADD | REC_INFO_DELETED_FLAG;
+
#include "data0type.inl"
#endif
diff --git a/storage/innobase/include/data0type.inl b/storage/innobase/include/data0type.inl
index f2c499716ce..037a71a9345 100644
--- a/storage/innobase/include/data0type.inl
+++ b/storage/innobase/include/data0type.inl
@@ -28,18 +28,6 @@ Created 1/16/1996 Heikki Tuuri
#include "ha_prototypes.h"
/*********************************************************************//**
-Gets the MySQL charset-collation code for MySQL string types.
-@return MySQL charset-collation code */
-UNIV_INLINE
-ulint
-dtype_get_charset_coll(
-/*===================*/
- ulint prtype) /*!< in: precise data type */
-{
- return((prtype >> 16) & CHAR_COLL_MASK);
-}
-
-/*********************************************************************//**
Determines if a MySQL string type is a subset of UTF-8. This function
may return false negatives, in case further character-set collation
codes are introduced in MySQL later.
diff --git a/storage/innobase/include/db0err.h b/storage/innobase/include/db0err.h
index 037821a89e7..51d116d5ede 100644
--- a/storage/innobase/include/db0err.h
+++ b/storage/innobase/include/db0err.h
@@ -136,8 +136,6 @@ enum dberr_t {
DB_FTS_TOO_MANY_WORDS_IN_PHRASE,
/*< Too many words in a phrase */
- DB_TABLESPACE_TRUNCATED, /*!< tablespace was truncated */
-
DB_DECRYPTION_FAILED, /* Tablespace encrypted and
decrypt operation failed because
of missing key management plugin,
diff --git a/storage/innobase/include/dict0boot.h b/storage/innobase/include/dict0boot.h
index 64a2a710e18..4daa1d23c4f 100644
--- a/storage/innobase/include/dict0boot.h
+++ b/storage/innobase/include/dict0boot.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2018, 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
@@ -50,12 +51,8 @@ dict_hdr_get_new_id(
(not assigned if NULL) */
index_id_t* index_id, /*!< out: index id
(not assigned if NULL) */
- ulint* space_id, /*!< out: space id
+ ulint* space_id); /*!< out: space id
(not assigned if NULL) */
- const dict_table_t* table, /*!< in: table */
- bool disable_redo); /*!< in: if true and table
- object is NULL
- then disable-redo */
/**********************************************************************//**
Writes the current value of the row id counter to the dictionary header file
page. */
@@ -124,13 +121,6 @@ dict_is_sys_table(
/* The following is a secondary index on SYS_TABLES */
#define DICT_TABLE_IDS_ID 5
-#define DICT_HDR_FIRST_ID 10 /* the ids for tables etc. start
- from this number, except for basic
- system tables and their above defined
- indexes; ibuf tables and indexes are
- assigned as the id the number
- DICT_IBUF_ID_MIN plus the space id */
-
/* The offset of the dictionary header on the page */
#define DICT_HDR FSEG_PAGE_DATA
diff --git a/storage/innobase/include/dict0boot.inl b/storage/innobase/include/dict0boot.inl
index dacfcd58b53..7b0a2fd0b86 100644
--- a/storage/innobase/include/dict0boot.inl
+++ b/storage/innobase/include/dict0boot.inl
@@ -33,18 +33,18 @@ dict_sys_get_new_row_id(void)
{
row_id_t id;
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
- id = dict_sys->row_id;
+ id = dict_sys.row_id;
if (0 == (id % DICT_HDR_ROW_ID_WRITE_MARGIN)) {
dict_hdr_flush_row_id();
}
- dict_sys->row_id++;
+ dict_sys.row_id++;
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
return(id);
}
diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h
index ed42058681f..e3c40c794e9 100644
--- a/storage/innobase/include/dict0crea.h
+++ b/storage/innobase/include/dict0crea.h
@@ -67,14 +67,6 @@ dict_create_table_step(
/*===================*/
que_thr_t* thr); /*!< in: query thread */
-/** Assign a new table ID and put it into the table cache and the transaction.
-@param[in,out] table Table that needs an ID
-@param[in,out] trx Transaction */
-void
-dict_table_assign_new_id(
- dict_table_t* table,
- trx_t* trx);
-
/***********************************************************//**
Creates an index. This is a high-level function used in SQL execution
graphs.
@@ -104,29 +96,12 @@ dict_create_index_tree(
dict_index_t* index, /*!< in/out: index */
const trx_t* trx); /*!< in: InnoDB transaction handle */
-/*******************************************************************//**
-Recreate the index tree associated with a row in SYS_INDEXES table.
-@return new root page number, or FIL_NULL on failure */
-ulint
-dict_recreate_index_tree(
-/*======================*/
- const dict_table_t* table, /*!< in: the table the index
- belongs to */
- btr_pcur_t* pcur, /*!< in/out: persistent cursor pointing
- to record in the clustered index of
- SYS_INDEXES table. The cursor may be
- repositioned in this call. */
- mtr_t* mtr); /*!< in: mtr having the latch
- on the record page. The mtr may be
- committed and restarted in this call. */
-
/** Drop the index tree associated with a row in SYS_INDEXES table.
@param[in,out] rec SYS_INDEXES record
@param[in,out] pcur persistent cursor on rec
@param[in,out] trx dictionary transaction
-@param[in,out] mtr mini-transaction
-@return whether freeing the B-tree was attempted */
-bool dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
+@param[in,out] mtr mini-transaction */
+void dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
MY_ATTRIBUTE((nonnull));
/***************************************************************//**
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index 93fcfc75ff5..f70297121fd 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -32,12 +32,13 @@ Created 1/8/1996 Heikki Tuuri
#include "dict0mem.h"
#include "fsp0fsp.h"
#include <deque>
-#include "dict0pagecompress.h"
extern bool innodb_table_stats_not_found;
extern bool innodb_index_stats_not_found;
-#include "sync0rw.h"
+/** the first table or index ID for other than hard-coded system tables */
+constexpr uint8_t DICT_HDR_FIRST_ID= 10;
+
/********************************************************************//**
Get the database name length in a table name.
@return database name length */
@@ -130,19 +131,14 @@ dict_table_close(
MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Closes the only open handle to a table and drops a table while assuring
-that dict_sys->mutex is held the whole time. This assures that the table
+that dict_sys.mutex is held the whole time. This assures that the table
is not evicted after the close when the count of open handles goes to zero.
-Because dict_sys->mutex is held, we do not need to call
-dict_table_prevent_eviction(). */
+Because dict_sys.mutex is held, we do not need to call prevent_eviction(). */
void
dict_table_close_and_drop(
/*======================*/
trx_t* trx, /*!< in: data dictionary transaction */
dict_table_t* table); /*!< in/out: table */
-/**********************************************************************//**
-Inits the data dictionary module. */
-void
-dict_init(void);
/*********************************************************************//**
Gets the minimum number of bytes per character.
@@ -287,13 +283,6 @@ dict_col_name_is_reserved(
/*======================*/
const char* name) /*!< in: column name */
MY_ATTRIBUTE((nonnull, warn_unused_result));
-/********************************************************************//**
-Acquire the autoinc lock. */
-void
-dict_table_autoinc_lock(
-/*====================*/
- dict_table_t* table) /*!< in/out: table */
- MY_ATTRIBUTE((nonnull));
/** Unconditionally set the AUTO_INCREMENT counter.
@param[in,out] table table or partition
@param[in] value next available AUTO_INCREMENT value */
@@ -302,7 +291,6 @@ UNIV_INLINE
void
dict_table_autoinc_initialize(dict_table_t* table, ib_uint64_t value)
{
- mysql_mutex_assert_owner(&table->autoinc_mutex);
table->autoinc = value;
}
@@ -315,7 +303,6 @@ UNIV_INLINE
ib_uint64_t
dict_table_autoinc_read(const dict_table_t* table)
{
- mysql_mutex_assert_owner(&table->autoinc_mutex);
return(table->autoinc);
}
@@ -329,8 +316,6 @@ UNIV_INLINE
bool
dict_table_autoinc_update_if_greater(dict_table_t* table, ib_uint64_t value)
{
- mysql_mutex_assert_owner(&table->autoinc_mutex);
-
if (value > table->autoinc) {
table->autoinc = value;
@@ -340,13 +325,6 @@ dict_table_autoinc_update_if_greater(dict_table_t* table, ib_uint64_t value)
return(false);
}
-/********************************************************************//**
-Release the autoinc lock. */
-void
-dict_table_autoinc_unlock(
-/*======================*/
- dict_table_t* table) /*!< in/out: table */
- MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Adds system columns to a table object. */
void
@@ -356,22 +334,6 @@ dict_table_add_system_columns(
mem_heap_t* heap) /*!< in: temporary heap */
MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
-Removes a table object from the dictionary cache. */
-void
-dict_table_remove_from_cache(
-/*=========================*/
- dict_table_t* table) /*!< in, own: table */
- MY_ATTRIBUTE((nonnull));
-/**********************************************************************//**
-Removes a table object from the dictionary cache. */
-void
-dict_table_remove_from_cache_low(
-/*=============================*/
- dict_table_t* table, /*!< in, own: table */
- ibool lru_evict) /*!< in: TRUE if table being evicted
- to make room in the table LRU list */
- MY_ATTRIBUTE((nonnull));
-/**********************************************************************//**
Renames a table object.
@return TRUE if success */
dberr_t
@@ -694,65 +656,14 @@ do { \
dict_table_skip_corrupt_index(index); \
} while (0)
-/********************************************************************//**
-Check whether the index is the clustered index.
-@return nonzero for clustered index, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_clust(
-/*================*/
- const dict_index_t* index) /*!< in: index */
- MY_ATTRIBUTE((warn_unused_result));
-
-/** Check if index is auto-generated clustered index.
-@param[in] index index
-
-@return true if index is auto-generated clustered index. */
-UNIV_INLINE
-bool
-dict_index_is_auto_gen_clust(
- const dict_index_t* index);
-
-/********************************************************************//**
-Check whether the index is unique.
-@return nonzero for unique index, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_unique(
-/*=================*/
- const dict_index_t* index) /*!< in: index */
- MY_ATTRIBUTE((warn_unused_result));
-/********************************************************************//**
-Check whether the index is a Spatial Index.
-@return nonzero for Spatial Index, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_spatial(
-/*==================*/
- const dict_index_t* index) /*!< in: index */
- MY_ATTRIBUTE((warn_unused_result));
-
+#define dict_index_is_clust(index) (index)->is_clust()
+#define dict_index_is_auto_gen_clust(index) (index)->is_gen_clust()
+#define dict_index_is_unique(index) (index)->is_unique()
+#define dict_index_is_spatial(index) (index)->is_spatial()
+#define dict_index_is_ibuf(index) (index)->is_ibuf()
+#define dict_index_is_sec_or_ibuf(index) !(index)->is_primary()
#define dict_index_has_virtual(index) (index)->has_virtual()
-/********************************************************************//**
-Check whether the index is the insert buffer tree.
-@return nonzero for insert buffer, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_ibuf(
-/*===============*/
- const dict_index_t* index) /*!< in: index */
- MY_ATTRIBUTE((warn_unused_result));
-/********************************************************************//**
-Check whether the index is a secondary index or the insert buffer tree.
-@return nonzero for insert buffer, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_sec_or_ibuf(
-/*======================*/
- const dict_index_t* index) /*!< in: index */
- MY_ATTRIBUTE((warn_unused_result));
-
/** Get all the FTS indexes on a table.
@param[in] table table
@param[out] indexes all FTS indexes on this table
@@ -908,15 +819,8 @@ dict_index_get_min_size(
/*====================*/
const dict_index_t* index) /*!< in: index */
MY_ATTRIBUTE((nonnull, warn_unused_result));
-/********************************************************************//**
-Check whether the table uses the compact page format.
-@return TRUE if table uses the compact page format */
-UNIV_INLINE
-bool
-dict_table_is_comp(
-/*===============*/
- const dict_table_t* table) /*!< in: table */
- MY_ATTRIBUTE((nonnull, warn_unused_result));
+
+#define dict_table_is_comp(table) (table)->not_redundant()
/** Determine if a table uses atomic BLOBs (no locally stored prefix).
@param[in] table InnoDB table
@@ -928,6 +832,18 @@ dict_table_has_atomic_blobs(const dict_table_t* table)
return(DICT_TF_HAS_ATOMIC_BLOBS(table->flags));
}
+/** @return potential max length stored inline for externally stored fields */
+inline size_t dict_table_t::get_overflow_field_local_len() const
+{
+ if (dict_table_has_atomic_blobs(this)) {
+ /* ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED: do not
+ store any BLOB prefix locally */
+ return BTR_EXTERN_FIELD_REF_SIZE;
+ }
+ /* up to MySQL 5.1: store a 768-byte prefix locally */
+ return BTR_EXTERN_FIELD_REF_SIZE + DICT_ANTELOPE_MAX_INDEX_COL_LEN;
+}
+
/** Set the various values in a dict_table_t::flags pointer.
@param[in,out] flags, Pointer to a 4 byte Table Flags
@param[in] format, File Format
@@ -962,36 +878,21 @@ ulint
dict_tf_to_fsp_flags(ulint table_flags)
MY_ATTRIBUTE((const));
-/** Extract the page size from table flags.
-@param[in] flags flags
-@return compressed page size, or 0 if not compressed */
-UNIV_INLINE
-const page_size_t
-dict_tf_get_page_size(
- ulint flags)
-MY_ATTRIBUTE((const));
-/** Get the table page size. */
-#define dict_table_page_size(table) page_size_t(table->space->flags)
+/** Extract the ROW_FORMAT=COMPRESSED page size from table flags.
+@param[in] flags flags
+@return ROW_FORMAT=COMPRESSED page size
+@retval 0 if not compressed */
+inline ulint dict_tf_get_zip_size(ulint flags)
+{
+ flags &= DICT_TF_MASK_ZIP_SSIZE;
+ return flags
+ ? (UNIV_ZIP_SIZE_MIN >> 1)
+ << (FSP_FLAGS_GET_ZIP_SSIZE(flags >> DICT_TF_POS_ZIP_SSIZE
+ << FSP_FLAGS_POS_ZIP_SSIZE))
+ : 0;
+}
-/*********************************************************************//**
-Obtain exclusive locks on all index trees of the table. This is to prevent
-accessing index trees while InnoDB is updating internal metadata for
-operations such as truncate tables. */
-UNIV_INLINE
-void
-dict_table_x_lock_indexes(
-/*======================*/
- dict_table_t* table) /*!< in: table */
- MY_ATTRIBUTE((nonnull));
-/*********************************************************************//**
-Release the exclusive locks on all index tree. */
-UNIV_INLINE
-void
-dict_table_x_unlock_indexes(
-/*========================*/
- dict_table_t* table) /*!< in: table */
- MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Checks if a column is in the ordering columns of the clustered index of a
table. Column prefixes are treated like whole columns.
@@ -1043,10 +944,6 @@ dict_make_room_in_cache(
ulint max_tables, /*!< in: max tables allowed in cache */
ulint pct_check); /*!< in: max percent to check */
-/** Clears the virtual column's index list before index is being freed.
-@param[in] index Index being freed */
-void dict_index_remove_from_v_col_list(dict_index_t* index);
-
/** Adds an index to the dictionary cache, with possible indexing newly
added column.
@param[in,out] index index; NOTE! The index memory
@@ -1192,21 +1089,6 @@ dict_index_get_nth_col_or_prefix_pos(
ulint* prefix_col_pos) /*!< out: col num if prefix
*/
__attribute__((warn_unused_result));
-
-/********************************************************************//**
-Returns TRUE if the index contains a column or a prefix of that column.
-@param[in] index index
-@param[in] n column number
-@param[in] is_virtual whether it is a virtual col
-@return TRUE if contains the column or its prefix */
-bool
-dict_index_contains_col_or_prefix(
-/*==============================*/
- const dict_index_t* index, /*!< in: index */
- ulint n, /*!< in: column number */
- bool is_virtual)
- /*!< in: whether it is a virtual col */
- MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Looks for a matching field in an index. The column has to be the same. The
column in index must be complete, or must contain a prefix longer than the
@@ -1231,16 +1113,6 @@ dict_table_get_nth_col_pos(
ulint n, /*!< in: column number */
ulint* prefix_col_pos) /*!< out: col num if prefix */
MY_ATTRIBUTE((nonnull(1), warn_unused_result));
-/********************************************************************//**
-Returns the position of a system column in an index.
-@return position, ULINT_UNDEFINED if not contained */
-UNIV_INLINE
-ulint
-dict_index_get_sys_col_pos(
-/*=======================*/
- const dict_index_t* index, /*!< in: index */
- ulint type) /*!< in: DATA_ROW_ID, ... */
- MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Adds a column to index. */
void
@@ -1274,7 +1146,7 @@ dict_field_get_col(
/**********************************************************************//**
Returns an index object if it is found in the dictionary cache.
-Assumes that dict_sys->mutex is already being held.
+Assumes that dict_sys.mutex is already being held.
@return index, NULL if not found */
dict_index_t*
dict_index_get_if_in_cache_low(
@@ -1422,18 +1294,9 @@ dict_index_calc_min_rec_len(
/*========================*/
const dict_index_t* index) /*!< in: index */
MY_ATTRIBUTE((nonnull, warn_unused_result));
-/** Reserve the dictionary system mutex. */
-void
-dict_mutex_enter_for_mysql_func(const char *file, unsigned line);
-#define dict_mutex_enter_for_mysql() \
- dict_mutex_enter_for_mysql_func(__FILE__, __LINE__)
-
-/********************************************************************//**
-Releases the dictionary system mutex for MySQL. */
-void
-dict_mutex_exit_for_mysql(void);
-/*===========================*/
+#define dict_mutex_enter_for_mysql() mutex_enter(&dict_sys.mutex)
+#define dict_mutex_exit_for_mysql() mutex_exit(&dict_sys.mutex)
/********************************************************************//**
Checks if the database name in two table names is the same.
@@ -1479,23 +1342,6 @@ dict_table_is_fts_column(
ulint col_no, /* in: col number to search for */
bool is_virtual)/*!< in: whether it is a virtual column */
MY_ATTRIBUTE((warn_unused_result));
-/**********************************************************************//**
-Prevent table eviction by moving a table to the non-LRU list from the
-LRU list if it is not already there. */
-UNIV_INLINE
-void
-dict_table_prevent_eviction(
-/*========================*/
- dict_table_t* table) /*!< in: table to prevent eviction */
- MY_ATTRIBUTE((nonnull));
-
-/**********************************************************************//**
-Move a table to the non LRU end of the LRU list. */
-void
-dict_table_move_from_lru_to_non_lru(
-/*================================*/
- dict_table_t* table) /*!< in: table to move from LRU to non-LRU */
- MY_ATTRIBUTE((nonnull));
/** Looks for an index with the given id given a table instance.
@param[in] table table instance
@@ -1507,14 +1353,6 @@ dict_table_find_index_on_id(
index_id_t id)
MY_ATTRIBUTE((nonnull(1)));
-/**********************************************************************//**
-Move to the most recently used segment of the LRU list. */
-void
-dict_move_to_mru(
-/*=============*/
- dict_table_t* table) /*!< in: table to move to MRU */
- MY_ATTRIBUTE((nonnull));
-
/** Maximum number of columns in a foreign key constraint. Please Note MySQL
has a much lower limit on the number of columns allowed in a foreign key
constraint */
@@ -1526,13 +1364,10 @@ extern FILE* dict_foreign_err_file;
extern ib_mutex_t dict_foreign_err_mutex; /* mutex protecting the
foreign key error messages */
-/** the dictionary system */
-extern dict_sys_t* dict_sys;
-/** the data dictionary rw-latch protecting dict_sys */
-extern rw_lock_t dict_operation_lock;
-
-/* Dictionary system struct */
-struct dict_sys_t{
+/** InnoDB data dictionary cache */
+class dict_sys_t
+{
+public:
DictSysMutex mutex; /*!< mutex protecting the data
dictionary; protects also the
disk-based dictionary system tables;
@@ -1540,6 +1375,15 @@ struct dict_sys_t{
and DROP TABLE, as well as reading
the dictionary data for a table from
system tables */
+ /** @brief the data dictionary rw-latch protecting dict_sys
+
+ Table create, drop, etc. reserve this in X-mode; implicit or
+ backround operations purge, rollback, foreign key checks reserve this
+ in S-mode; not all internal InnoDB operations are covered by MDL.
+
+ This latch also prevents lock waits when accessing the InnoDB
+ data dictionary tables. @see trx_t::dict_operation_lock_mode */
+ rw_lock_t latch;
row_id_t row_id; /*!< the next row id to assign;
NOTE that at a checkpoint this
must be written to the dict system
@@ -1548,8 +1392,8 @@ struct dict_sys_t{
the log records */
hash_table_t* table_hash; /*!< hash table of the tables, based
on name */
- hash_table_t* table_id_hash; /*!< hash table of the tables, based
- on id */
+ /** hash table of persistent table IDs */
+ hash_table_t* table_id_hash;
dict_table_t* sys_tables; /*!< SYS_TABLES table */
dict_table_t* sys_columns; /*!< SYS_COLUMNS table */
dict_table_t* sys_indexes; /*!< SYS_INDEXES table */
@@ -1563,8 +1407,145 @@ struct dict_sys_t{
UT_LIST_BASE_NODE_T(dict_table_t)
table_non_LRU; /*!< List of tables that can't be
evicted from the cache */
+private:
+ bool m_initialised;
+ /** the sequence of temporary table IDs */
+ std::atomic<table_id_t> temp_table_id;
+ /** hash table of temporary table IDs */
+ hash_table_t* temp_id_hash;
+public:
+ /** @return a new temporary table ID */
+ table_id_t get_temporary_table_id() {
+ return temp_table_id.fetch_add(1, std::memory_order_relaxed);
+ }
+
+ /** Look up a temporary table.
+ @param id temporary table ID
+ @return temporary table
+ @retval NULL if the table does not exist
+ (should only happen during the rollback of CREATE...SELECT) */
+ dict_table_t* get_temporary_table(table_id_t id)
+ {
+ ut_ad(mutex_own(&mutex));
+ dict_table_t* table;
+ ulint fold = ut_fold_ull(id);
+ HASH_SEARCH(id_hash, temp_id_hash, fold, dict_table_t*, table,
+ ut_ad(table->cached), table->id == id);
+ if (UNIV_LIKELY(table != NULL)) {
+ DBUG_ASSERT(table->is_temporary());
+ DBUG_ASSERT(table->id >= DICT_HDR_FIRST_ID);
+ table->acquire();
+ }
+ return table;
+ }
+
+ /** Look up a persistent table.
+ @param id table ID
+ @return table
+ @retval NULL if not cached */
+ dict_table_t* get_table(table_id_t id)
+ {
+ ut_ad(mutex_own(&mutex));
+ dict_table_t* table;
+ ulint fold = ut_fold_ull(id);
+ HASH_SEARCH(id_hash, table_id_hash, fold, dict_table_t*, table,
+ ut_ad(table->cached), table->id == id);
+ DBUG_ASSERT(!table || !table->is_temporary());
+ return table;
+ }
+
+ /**
+ Constructor. Further initialisation happens in create().
+ */
+
+ dict_sys_t() : m_initialised(false), temp_table_id(DICT_HDR_FIRST_ID) {}
+
+ bool is_initialised() const { return m_initialised; }
+
+ /** Initialise the data dictionary cache. */
+ void create();
+
+ /** Close the data dictionary cache on shutdown. */
+ void close();
+
+ /** Resize the hash tables based on the current buffer pool size. */
+ void resize();
+
+ /** Add a table definition to the data dictionary cache */
+ inline void add(dict_table_t* table);
+ /** Remove a table definition from the data dictionary cache.
+ @param[in,out] table cached table definition to be evicted
+ @param[in] lru whether this is part of least-recently-used evictiono
+ @param[in] keep whether to keep (not free) the object */
+ void remove(dict_table_t* table, bool lru = false, bool keep = false);
+
+#ifdef UNIV_DEBUG
+ /** Find a table */
+ template <bool in_lru> bool find(dict_table_t* table)
+ {
+ ut_ad(table);
+ ut_ad(table->can_be_evicted == in_lru);
+ ut_ad(mutex_own(&mutex));
+ for (const dict_table_t* t = UT_LIST_GET_FIRST(in_lru
+ ? table_LRU : table_non_LRU);
+ t; t = UT_LIST_GET_NEXT(table_LRU, t))
+ {
+ if (t == table) return true;
+ ut_ad(t->can_be_evicted == in_lru);
+ }
+ return false;
+ }
+ /** Find a table */
+ bool find(dict_table_t* table)
+ {
+ return table->can_be_evicted ? find<true>(table) : find<false>(table);
+ }
+#endif
+
+ /** Move a table to the non-LRU list from the LRU list. */
+ void prevent_eviction(dict_table_t* table)
+ {
+ ut_ad(find(table));
+ if (table->can_be_evicted)
+ {
+ table->can_be_evicted = FALSE;
+ UT_LIST_REMOVE(table_LRU, table);
+ UT_LIST_ADD_LAST(table_non_LRU, table);
+ }
+ }
+ /** Acquire a reference to a cached table. */
+ inline void acquire(dict_table_t* table);
+
+#ifdef UNIV_DEBUG
+ /** Assert that the data dictionary is locked */
+ void assert_locked()
+ {
+ ut_ad(mutex_own(&mutex));
+ ut_ad(rw_lock_own(&latch, RW_LOCK_X));
+ }
+#endif
+ /** Lock the data dictionary cache. */
+ void lock(const char* file, unsigned line)
+ {
+ rw_lock_x_lock_func(&latch, 0, file, line);
+ mutex_enter_loc(&mutex, file, line);
+ }
+
+ /** Unlock the data dictionary cache. */
+ void unlock()
+ {
+ mutex_exit(&mutex);
+ rw_lock_x_unlock(&latch);
+ }
};
+/** the data dictionary cache */
+extern dict_sys_t dict_sys;
+
+#define dict_table_prevent_eviction(table) dict_sys.prevent_eviction(table)
+#define dict_sys_lock() dict_sys.lock(__FILE__, __LINE__)
+#define dict_sys_unlock() dict_sys.unlock()
+
/** dummy index for ROW_FORMAT=REDUNDANT supremum and infimum records */
extern dict_index_t* dict_ind_redundant;
@@ -1648,16 +1629,6 @@ dict_fs2utf8(
size_t table_utf8_size)/*!< in: table_utf8 size */
MY_ATTRIBUTE((nonnull));
-/** Resize the hash tables besed on the current buffer pool size. */
-void
-dict_resize();
-
-/**********************************************************************//**
-Closes the data dictionary module. */
-void
-dict_close(void);
-/*============*/
-
/**********************************************************************//**
Check whether the table is corrupted.
@return nonzero for corrupted table, zero for valid tables */
diff --git a/storage/innobase/include/dict0dict.inl b/storage/innobase/include/dict0dict.inl
index 3b8808bf14c..d00f4f8f6a3 100644
--- a/storage/innobase/include/dict0dict.inl
+++ b/storage/innobase/include/dict0dict.inl
@@ -25,6 +25,7 @@ Created 1/8/1996 Heikki Tuuri
***********************************************************************/
#include "fsp0sysspace.h"
+#include "dict0pagecompress.h"
/*********************************************************************//**
Gets the minimum number of bytes per character.
@@ -241,83 +242,6 @@ dict_table_get_next_index(
#endif /* UNIV_DEBUG */
/********************************************************************//**
-Check whether the index is the clustered index.
-@return nonzero for clustered index, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_clust(
-/*================*/
- const dict_index_t* index) /*!< in: index */
-{
- ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- return(index->type & DICT_CLUSTERED);
-}
-
-/** Check if index is auto-generated clustered index.
-@param[in] index index
-
-@return true if index is auto-generated clustered index. */
-UNIV_INLINE
-bool
-dict_index_is_auto_gen_clust(
- const dict_index_t* index)
-{
- return(index->type == DICT_CLUSTERED);
-}
-
-/********************************************************************//**
-Check whether the index is unique.
-@return nonzero for unique index, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_unique(
-/*=================*/
- const dict_index_t* index) /*!< in: index */
-{
- ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- return(index->type & DICT_UNIQUE);
-}
-
-/********************************************************************//**
-Check whether the index is a Spatial Index.
-@return nonzero for Spatial Index, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_spatial(
-/*==================*/
- const dict_index_t* index) /*!< in: index */
-{
- ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- return ulint(UNIV_EXPECT(index->type & DICT_SPATIAL, 0));
-}
-
-/********************************************************************//**
-Check whether the index is the insert buffer tree.
-@return nonzero for insert buffer, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_ibuf(
-/*===============*/
- const dict_index_t* index) /*!< in: index */
-{
- ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- return(index->type & DICT_IBUF);
-}
-
-/********************************************************************//**
-Check whether the index is a secondary index or the insert buffer tree.
-@return nonzero for insert buffer, zero for other indexes */
-UNIV_INLINE
-ulint
-dict_index_is_sec_or_ibuf(
-/*======================*/
- const dict_index_t* index) /*!< in: index */
-{
- ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- return((index->type & (DICT_CLUSTERED | DICT_IBUF)) != DICT_CLUSTERED);
-}
-
-/********************************************************************//**
Gets the number of user-defined non-virtual columns in a table in the
dictionary cache.
@return number of user-defined (e.g., not ROW_ID) non-virtual
@@ -462,7 +386,8 @@ dict_table_get_nth_v_col(
ut_ad(table);
ut_ad(pos < table->n_v_def);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
- ut_ad(!table->v_cols[pos].m_col.is_instant());
+ ut_ad(!table->v_cols[pos].m_col.is_added());
+ ut_ad(!table->v_cols[pos].m_col.is_dropped());
return &table->v_cols[pos];
}
@@ -501,19 +426,6 @@ dict_table_get_sys_col_no(
return unsigned(table->n_cols) + (sys - DATA_N_SYS_COLS);
}
-/********************************************************************//**
-Check whether the table uses the compact page format.
-@return TRUE if table uses the compact page format */
-UNIV_INLINE
-bool
-dict_table_is_comp(
-/*===============*/
- const dict_table_t* table) /*!< in: table */
-{
- ut_ad(table);
- return (table->flags & DICT_TF_COMPACT) != 0;
-}
-
/************************************************************************
Check if the table has an FTS index. */
UNIV_INLINE
@@ -720,20 +632,34 @@ dict_tf_to_fsp_flags(ulint table_flags)
DBUG_EXECUTE_IF("dict_tf_to_fsp_flags_failure",
return(ULINT_UNDEFINED););
- /* Adjust bit zero. */
- fsp_flags = DICT_TF_HAS_ATOMIC_BLOBS(table_flags) ? 1 : 0;
+ /* No ROW_FORMAT=COMPRESSED for innodb_checksum_algorithm=full_crc32 */
+ if ((srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32
+ || srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_FULL_CRC32)
+ && !(table_flags & DICT_TF_MASK_ZIP_SSIZE)) {
+
+ fsp_flags = 1U << FSP_FLAGS_FCRC32_POS_MARKER
+ | FSP_FLAGS_FCRC32_PAGE_SSIZE();
+
+ if (page_compression_level) {
+ fsp_flags |= innodb_compression_algorithm
+ << FSP_FLAGS_FCRC32_POS_COMPRESSED_ALGO;
+ }
+ } else {
+ /* Adjust bit zero. */
+ fsp_flags = DICT_TF_HAS_ATOMIC_BLOBS(table_flags) ? 1 : 0;
- /* ZIP_SSIZE and ATOMIC_BLOBS are at the same position. */
- fsp_flags |= table_flags
- & (DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS);
+ /* ZIP_SSIZE and ATOMIC_BLOBS are at the same position. */
+ fsp_flags |= table_flags
+ & (DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS);
- fsp_flags |= FSP_FLAGS_PAGE_SSIZE();
+ fsp_flags |= FSP_FLAGS_PAGE_SSIZE();
- if (page_compression_level) {
- fsp_flags |= FSP_FLAGS_MASK_PAGE_COMPRESSION;
+ if (page_compression_level) {
+ fsp_flags |= FSP_FLAGS_MASK_PAGE_COMPRESSION;
+ }
}
- ut_a(fsp_flags_is_valid(fsp_flags, false));
+ ut_a(fil_space_t::is_valid_flags(fsp_flags, false));
if (DICT_TF_HAS_DATA_DIR(table_flags)) {
fsp_flags |= 1U << FSP_FLAGS_MEM_DATA_DIR;
@@ -779,52 +705,6 @@ dict_tf_to_sys_tables_type(
return(type);
}
-/** Extract the page size info from table flags.
-@param[in] flags flags
-@return a structure containing the compressed and uncompressed
-page sizes and a boolean indicating if the page is compressed. */
-UNIV_INLINE
-const page_size_t
-dict_tf_get_page_size(
- ulint flags)
-{
- const ulint zip_ssize = DICT_TF_GET_ZIP_SSIZE(flags);
-
- if (zip_ssize == 0) {
- return(univ_page_size);
- }
-
- const ulint zip_size = (UNIV_ZIP_SIZE_MIN >> 1) << zip_ssize;
-
- ut_ad(zip_size <= UNIV_ZIP_SIZE_MAX);
-
- return(page_size_t(zip_size, srv_page_size, true));
-}
-
-/*********************************************************************//**
-Obtain exclusive locks on all index trees of the table. This is to prevent
-accessing index trees while InnoDB is updating internal metadata for
-operations such as truncate tables. */
-UNIV_INLINE
-void
-dict_table_x_lock_indexes(
-/*======================*/
- dict_table_t* table) /*!< in: table */
-{
- ut_ad(mutex_own(&dict_sys->mutex));
-
- dict_index_t* clust_index = dict_table_get_first_index(table);
-
- /* Loop through each index of the table and lock them */
- for (dict_index_t* index = dict_table_get_next_index(clust_index);
- index != NULL;
- index = dict_table_get_next_index(index)) {
- rw_lock_x_lock(dict_index_get_lock(index));
- }
-
- rw_lock_x_lock(dict_index_get_lock(clust_index));
-}
-
/*********************************************************************//**
Returns true if the particular FTS index in the table is still syncing
in the background, false otherwise.
@@ -846,24 +726,6 @@ dict_fts_index_syncing(
}
return(false);
}
-/*********************************************************************//**
-Release the exclusive locks on all index tree. */
-UNIV_INLINE
-void
-dict_table_x_unlock_indexes(
-/*========================*/
- dict_table_t* table) /*!< in: table */
-{
- dict_index_t* index;
-
- ut_ad(mutex_own(&dict_sys->mutex));
-
- for (index = dict_table_get_first_index(table);
- index != NULL;
- index = dict_table_get_next_index(index)) {
- rw_lock_x_unlock(dict_index_get_lock(index));
- }
-}
/********************************************************************//**
Gets the number of fields in the internal representation of an index,
@@ -981,30 +843,6 @@ dict_index_get_nth_field(
}
#endif /* UNIV_DEBUG */
-/********************************************************************//**
-Returns the position of a system column in an index.
-@return position, ULINT_UNDEFINED if not contained */
-UNIV_INLINE
-ulint
-dict_index_get_sys_col_pos(
-/*=======================*/
- const dict_index_t* index, /*!< in: index */
- ulint type) /*!< in: DATA_ROW_ID, ... */
-{
- ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
- ut_ad(!dict_index_is_ibuf(index));
-
- if (dict_index_is_clust(index)) {
-
- return(dict_col_get_clust_pos(
- dict_table_get_sys_col(index->table, type),
- index));
- }
-
- return(dict_index_get_nth_col_pos(
- index, dict_table_get_sys_col_no(index->table, type), NULL));
-}
-
/*********************************************************************//**
Gets the field column.
@return field->col, pointer to the table column */
@@ -1235,9 +1073,7 @@ dict_table_is_fts_column(
index = (dict_index_t*) ib_vector_getp(indexes, i);
- if (dict_index_contains_col_or_prefix(
- index, col_no, is_virtual)) {
-
+ if (index->contains_col_or_prefix(col_no, is_virtual)) {
return(i);
}
}
@@ -1302,21 +1138,6 @@ dict_max_v_field_len_store_undo(
return(max_log_len);
}
-/**********************************************************************//**
-Prevent table eviction by moving a table to the non-LRU list from the
-LRU list if it is not already there. */
-UNIV_INLINE
-void
-dict_table_prevent_eviction(
-/*========================*/
- dict_table_t* table) /*!< in: table to prevent eviction */
-{
- ut_ad(mutex_own(&dict_sys->mutex));
- if (table->can_be_evicted) {
- dict_table_move_from_lru_to_non_lru(table);
- }
-}
-
/********************************************************************//**
Check whether the table is corrupted.
@return nonzero for corrupted table, zero for valid tables */
@@ -1360,8 +1181,8 @@ inline
void
dict_table_t::acquire()
{
- ut_ad(mutex_own(&dict_sys->mutex));
- my_atomic_add32_explicit(&n_ref_count, 1, MY_MEMORY_ORDER_RELAXED);
+ ut_ad(mutex_own(&dict_sys.mutex));
+ n_ref_count++;
}
/** Release the table handle.
@@ -1370,8 +1191,7 @@ inline
bool
dict_table_t::release()
{
- int32 n = my_atomic_add32_explicit(
- &n_ref_count, -1, MY_MEMORY_ORDER_RELAXED);
+ auto n = n_ref_count--;
ut_ad(n > 0);
return n == 1;
}
diff --git a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict0load.h
index aa3de6d0b17..afc017fd9d1 100644
--- a/storage/innobase/include/dict0load.h
+++ b/storage/innobase/include/dict0load.h
@@ -82,7 +82,7 @@ dict_get_first_table_name_in_db(
/** Make sure the data_file_name is saved in dict_table_t if needed.
Try to read it from the fil_system first, then from SYS_DATAFILES.
@param[in] table Table object
-@param[in] dict_mutex_own true if dict_sys->mutex is owned already */
+@param[in] dict_mutex_own true if dict_sys.mutex is owned already */
void
dict_get_and_save_data_dir_path(
dict_table_t* table,
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index bf7d9931bed..596800ee8d2 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -46,10 +46,12 @@ Created 1/8/1996 Heikki Tuuri
#include "gis0type.h"
#include "fil0fil.h"
#include "fil0crypt.h"
+#include <sql_const.h>
#include <set>
#include <algorithm>
#include <iterator>
#include <ostream>
+#include <mutex>
/* Forward declaration. */
struct ib_rbt_t;
@@ -575,6 +577,10 @@ struct dict_col_t{
this column. Our current max limit is
3072 (REC_VERSION_56_MAX_INDEX_COL_LEN)
bytes. */
+private:
+ /** Special value of ind for a dropped column */
+ static const unsigned DROPPED = 1023;
+public:
/** Detach a virtual column from an index.
@param index being-freed index */
@@ -590,7 +596,7 @@ struct dict_col_t{
} def_val;
/** Retrieve the column name.
- @param[in] table the table of this column */
+ @param table the table of this column */
const char *name(const dict_table_t &table) const;
/** @return whether this is a virtual column */
@@ -605,7 +611,8 @@ struct dict_col_t{
ut_ad(mtype == DATA_INT || mtype == DATA_FIXBINARY);
return mtype == DATA_INT;
}
- /** @return whether this is system versioned */
+ /** @return whether this user column (not row_start, row_end)
+ has System Versioning property */
bool is_versioned() const { return !(~prtype & DATA_VERSIONED); }
/** @return whether this is the system version start */
bool vers_sys_start() const
@@ -619,29 +626,119 @@ struct dict_col_t{
}
/** @return whether this is an instantly-added column */
- bool is_instant() const
+ bool is_added() const
{
DBUG_ASSERT(def_val.len != UNIV_SQL_DEFAULT || !def_val.data);
return def_val.len != UNIV_SQL_DEFAULT;
}
+ /** Flag the column instantly dropped */
+ void set_dropped() { ind = DROPPED; }
+ /** Flag the column instantly dropped.
+ @param not_null whether the column was NOT NULL
+ @param len2 whether the length exceeds 255 bytes
+ @param fixed_len the fixed length in bytes, or 0 */
+ void set_dropped(bool not_null, bool len2, unsigned fixed)
+ {
+ DBUG_ASSERT(!len2 || !fixed);
+ prtype= not_null ? DATA_NOT_NULL | DATA_BINARY_TYPE : DATA_BINARY_TYPE;
+ if (fixed)
+ {
+ mtype= DATA_FIXBINARY;
+ len= fixed;
+ }
+ else
+ {
+ mtype= DATA_BINARY;
+ len= len2 ? 65535 : 255;
+ }
+ mbminlen= mbmaxlen= 0;
+ ind= DROPPED;
+ ord_part= 0;
+ max_prefix= 0;
+ }
+ /** @return whether the column was instantly dropped */
+ bool is_dropped() const { return ind == DROPPED; }
+ /** @return whether the column was instantly dropped
+ @param index the clustered index */
+ inline bool is_dropped(const dict_index_t &index) const;
+
/** Get the default value of an instantly-added column.
@param[out] len value length (in bytes), or UNIV_SQL_NULL
@return default value
@retval NULL if the default value is SQL NULL (len=UNIV_SQL_NULL) */
const byte *instant_value(ulint *len) const
{
- DBUG_ASSERT(is_instant());
+ DBUG_ASSERT(is_added());
*len= def_val.len;
return static_cast<const byte*>(def_val.data);
}
/** Remove the 'instant ADD' status of the column */
- void remove_instant()
+ void clear_instant()
{
- DBUG_ASSERT(is_instant());
def_val.len= UNIV_SQL_DEFAULT;
def_val.data= NULL;
}
+
+ /** @return whether two columns have compatible data type encoding */
+ bool same_type(const dict_col_t &other) const
+ {
+ if (mtype != other.mtype)
+ {
+ /* For latin1_swedish_ci, DATA_CHAR and DATA_VARCHAR
+ will be used instead of DATA_MYSQL and DATA_VARMYSQL.
+ As long as mtype,prtype are being written to InnoDB
+ data dictionary tables, we cannot simplify this. */
+ switch (mtype) {
+ default:
+ return false;
+ case DATA_VARCHAR:
+ if (other.mtype != DATA_VARMYSQL)
+ return false;
+ goto check_encoding;
+ case DATA_VARMYSQL:
+ if (other.mtype != DATA_VARCHAR)
+ return false;
+ goto check_encoding;
+ case DATA_CHAR:
+ if (other.mtype != DATA_MYSQL)
+ return false;
+ goto check_encoding;
+ case DATA_MYSQL:
+ if (other.mtype != DATA_CHAR)
+ return false;
+ goto check_encoding;
+ }
+ }
+ else if (dtype_is_string_type(mtype))
+ {
+ check_encoding:
+ const uint16_t cset= dtype_get_charset_coll(prtype);
+ const uint16_t ocset= dtype_get_charset_coll(other.prtype);
+ return cset == ocset || dict_col_t::same_encoding(cset, ocset);
+ }
+
+ return true;
+ }
+
+ /** @return whether two collations codes have the same character encoding */
+ static bool same_encoding(uint16_t a, uint16_t b);
+
+ /** Determine if the columns have the same format
+ except for is_nullable() and is_versioned().
+ @param other column to compare to
+ @return whether the columns have the same format */
+ bool same_format(const dict_col_t &other) const
+ {
+ return same_type(other) && len >= other.len &&
+ mbminlen == other.mbminlen && mbmaxlen >= other.mbmaxlen &&
+ !((prtype ^ other.prtype) & ~(DATA_NOT_NULL | DATA_VERSIONED |
+ CHAR_COLL_MASK << 16 |
+ DATA_LONG_TRUE_VARCHAR));
+ }
+
+ /** @return whether the column values are comparable by memcmp() */
+ bool is_binary() const { return prtype & DATA_BINARY_TYPE; }
};
/** Index information put in a list of virtual column structure. Index
@@ -658,9 +755,6 @@ struct dict_v_idx_t {
: index(index), nth_field(nth_field) {}
};
-/** Index list to put in dict_v_col_t */
-typedef std::list<dict_v_idx_t, ut_allocator<dict_v_idx_t> > dict_v_idx_list;
-
/** Data structure for a virtual column in a table */
struct dict_v_col_t{
/** column structure */
@@ -670,15 +764,35 @@ struct dict_v_col_t{
dict_col_t** base_col;
/** number of base column */
- ulint num_base;
+ unsigned num_base:10;
/** column pos in table */
- ulint v_pos;
+ unsigned v_pos:10;
- /** Virtual index list, and column position in the index,
- the allocated memory is not from table->heap */
- dict_v_idx_list* v_indexes;
+ /** Virtual index list, and column position in the index */
+ std::forward_list<dict_v_idx_t, ut_allocator<dict_v_idx_t> >
+ v_indexes;
+ /** Detach the column from an index.
+ @param index index to be detached from */
+ void detach(const dict_index_t &index)
+ {
+ if (v_indexes.empty()) return;
+ auto i= v_indexes.before_begin();
+ do {
+ auto prev = i++;
+ if (i == v_indexes.end())
+ {
+ return;
+ }
+ if (i->index == &index)
+ {
+ v_indexes.erase_after(prev);
+ return;
+ }
+ }
+ while (i != v_indexes.end());
+ }
};
/** Data structure for newly added virtual column in a index.
@@ -735,7 +849,8 @@ struct dict_s_col_t {
};
/** list to put stored column for create_table_info_t */
-typedef std::list<dict_s_col_t, ut_allocator<dict_s_col_t> > dict_s_col_list;
+typedef std::forward_list<dict_s_col_t, ut_allocator<dict_s_col_t> >
+dict_s_col_list;
/** @brief DICT_ANTELOPE_MAX_INDEX_COL_LEN is measured in bytes and
is the maximum indexed column length (or indexed prefix length) in
@@ -843,8 +958,11 @@ extern ulong zip_pad_max;
an uncompressed page should be left as padding to avoid compression
failures. This estimate is based on a self-adapting heuristic. */
struct zip_pad_info_t {
- mysql_mutex_t mutex; /*!< mutex protecting the info */
- ulint pad; /*!< number of bytes used as pad */
+ /** Dummy assignment operator for dict_index_t::clone() */
+ zip_pad_info_t &operator=(const zip_pad_info_t&) { return *this; }
+ std::mutex mutex; /*!< mutex protecting the info */
+ Atomic_relaxed<ulint>
+ pad; /*!< number of bytes used as pad */
ulint success;/*!< successful compression ops during
current round */
ulint failure;/*!< failed compression ops during
@@ -863,7 +981,7 @@ const char innobase_index_reserve_name[] = "GEN_CLUST_INDEX";
/** Data structure for an index. Most fields will be
initialized to 0, NULL or FALSE in dict_mem_index_create(). */
-struct dict_index_t{
+struct dict_index_t {
index_id_t id; /*!< id of the index */
mem_heap_t* heap; /*!< memory heap */
id_name_t name; /*!< index name */
@@ -925,13 +1043,13 @@ struct dict_index_t{
dictionary cache */
unsigned to_be_dropped:1;
/*!< TRUE if the index is to be dropped;
- protected by dict_operation_lock */
+ protected by dict_sys.latch */
unsigned online_status:2;
/*!< enum online_index_status.
Transitions from ONLINE_INDEX_COMPLETE (to
ONLINE_INDEX_CREATION) are protected
- by dict_operation_lock and
- dict_sys->mutex. Other changes are
+ by dict_sys.latch and
+ dict_sys.mutex. Other changes are
protected by index->lock. */
unsigned uncommitted:1;
/*!< a flag that is set for secondary indexes
@@ -941,6 +1059,8 @@ struct dict_index_t{
#ifdef UNIV_DEBUG
/** whether this is a dummy index object */
bool is_dummy;
+ /** whether btr_cur_instant_init() is in progress */
+ bool in_instant_init;
uint32_t magic_n;/*!< magic number */
/** Value of dict_index_t::magic_n */
# define DICT_INDEX_MAGIC_N 76789786
@@ -1019,8 +1139,14 @@ struct dict_index_t{
/* in which slot the next sample should be
saved. */
/* @} */
- /** R-tree split sequence number */
- volatile int32 rtr_ssn;
+private:
+ /** R-tree split sequence number */
+ Atomic_relaxed<node_seq_t> rtr_ssn;
+public:
+ void set_ssn(node_seq_t ssn) { rtr_ssn= ssn; }
+ node_seq_t assign_ssn() { return rtr_ssn.fetch_add(1) + 1; }
+ node_seq_t ssn() const { return rtr_ssn; }
+
rtr_info_track_t*
rtr_track;/*!< tracking all R-Tree search cursors */
trx_id_t trx_id; /*!< id of the transaction that created this
@@ -1060,7 +1186,7 @@ struct dict_index_t{
page cannot be read or decrypted */
inline bool is_readable() const;
- /** @return whether instant ADD COLUMN is in effect */
+ /** @return whether instant ALTER TABLE is in effect */
inline bool is_instant() const;
/** @return whether the index is the primary key index
@@ -1089,23 +1215,18 @@ struct dict_index_t{
bool has_virtual() const { return type & DICT_VIRTUAL; }
/** @return the position of DB_TRX_ID */
- uint16_t db_trx_id() const {
+ unsigned db_trx_id() const {
DBUG_ASSERT(is_primary());
DBUG_ASSERT(n_uniq);
+ DBUG_ASSERT(n_uniq <= MAX_REF_PARTS);
return n_uniq;
}
/** @return the position of DB_ROLL_PTR */
- uint16_t db_roll_ptr() const
- {
- return static_cast<uint16_t>(db_trx_id() + 1);
- }
+ unsigned db_roll_ptr() const { return db_trx_id() + 1; }
/** @return the offset of the metadata BLOB field,
or the first user field after the PRIMARY KEY,DB_TRX_ID,DB_ROLL_PTR */
- uint16_t first_user_field() const
- {
- return static_cast<uint16_t>(db_trx_id() + 2);
- }
+ unsigned first_user_field() const { return db_trx_id() + 2; }
/** @return whether the index is corrupted */
inline bool is_corrupted() const;
@@ -1113,7 +1234,7 @@ struct dict_index_t{
/** Detach the virtual columns from the index that is to be removed. */
void detach_columns()
{
- if (!has_virtual())
+ if (!has_virtual() || !cached)
return;
for (unsigned i= 0; i < n_fields; i++)
{
@@ -1154,24 +1275,20 @@ struct dict_index_t{
return fields[n].col->instant_value(len);
}
- /** Adjust clustered index metadata for instant ADD COLUMN.
- @param[in] clustered index definition after instant ADD COLUMN */
- void instant_add_field(const dict_index_t& instant);
-
- /** Remove the 'instant ADD' status of a clustered index.
- Protected by index root page x-latch or table X-lock. */
- void remove_instant()
- {
- DBUG_ASSERT(is_primary());
- if (!is_instant()) {
- return;
- }
- for (unsigned i = n_core_fields; i < n_fields; i++) {
- fields[i].col->remove_instant();
- }
- n_core_fields = n_fields;
- n_core_null_bytes = UT_BITS_IN_BYTES(unsigned(n_nullable));
- }
+ /** Adjust index metadata for instant ADD/DROP/reorder COLUMN.
+ @param[in] clustered index definition after instant ALTER TABLE */
+ inline void instant_add_field(const dict_index_t& instant);
+ /** Remove instant ADD COLUMN metadata. */
+ inline void clear_instant_add();
+ /** Remove instant ALTER TABLE metadata. */
+ inline void clear_instant_alter();
+
+ /** Construct the metadata record for instant ALTER TABLE.
+ @param[in] row dummy or default values for existing columns
+ @param[in,out] heap memory heap for allocations
+ @return metadata record */
+ inline dtuple_t*
+ instant_metadata(const dtuple_t& row, mem_heap_t* heap) const;
/** Check if record in clustered index is historical row.
@param[in] rec clustered row
@@ -1192,24 +1309,28 @@ struct dict_index_t{
@param n_vcol number of virtual columns to be added */
void assign_new_v_col(ulint n_vcol)
{
- new_vcol_info= static_cast<dict_add_v_col_info*>(
- mem_heap_zalloc(heap, sizeof *new_vcol_info));
+ new_vcol_info= static_cast<dict_add_v_col_info*>
+ (mem_heap_zalloc(heap, sizeof *new_vcol_info));
new_vcol_info->n_v_col= n_vcol;
}
/* @return whether index has new virtual column */
- bool has_new_v_col() const
- {
- return new_vcol_info != NULL;
- }
+ bool has_new_v_col() const { return new_vcol_info; }
/* @return number of newly added virtual column */
ulint get_new_n_vcol() const
- {
- if (new_vcol_info)
- return new_vcol_info->n_v_col;
- return 0;
- }
+ { return new_vcol_info ? new_vcol_info->n_v_col : 0; }
+
+ /** Reconstruct the clustered index fields.
+ @return whether metadata is incorrect */
+ inline bool reconstruct_fields();
+
+ /** Check if the index contains a column or a prefix of that column.
+ @param[in] n column number
+ @param[in] is_virtual whether it is a virtual col
+ @return whether the index contains the column or its prefix */
+ bool contains_col_or_prefix(ulint n, bool is_virtual) const
+ MY_ATTRIBUTE((warn_unused_result));
#ifdef BTR_CUR_HASH_ADAPT
/** @return a clone of this */
@@ -1290,20 +1411,8 @@ struct dict_index_t{
@param index being-freed index */
inline void dict_col_t::detach(const dict_index_t &index)
{
- ut_ad(is_virtual());
-
- if (dict_v_idx_list *v_indexes= reinterpret_cast<const dict_v_col_t*>(this)
- ->v_indexes)
- {
- for (dict_v_idx_list::iterator i= v_indexes->begin();
- i != v_indexes->end(); i++)
- {
- if (i->index == &index) {
- v_indexes->erase(i);
- return;
- }
- }
- }
+ if (is_virtual())
+ reinterpret_cast<dict_v_col_t*>(this)->detach(index);
}
/** The status of online index creation */
@@ -1622,6 +1731,64 @@ struct dict_vcol_templ_t {
dict_vcol_templ_t() : vtempl(0), mysql_table_query_id(~0ULL) {}
};
+/** Metadata on clustered index fields starting from first_user_field() */
+class field_map_element_t
+{
+ /** Number of bits for representing a column number */
+ static constexpr uint16_t IND_BITS = 10;
+
+ /** Set if the column of the field has been instantly dropped */
+ static constexpr uint16_t DROPPED = 1U << (IND_BITS + 5);
+
+ /** Set if the column was dropped and originally declared NOT NULL */
+ static constexpr uint16_t NOT_NULL = 1U << (IND_BITS + 4);
+
+ /** Column index (if !(data & DROPPED)): table->cols[data & IND],
+ or field length (if (data & DROPPED)):
+ (data & IND) = 0 if variable-length with max_len < 256 bytes;
+ (data & IND) = 1 if variable-length with max_len > 255 bytes;
+ (data & IND) = 1 + L otherwise, with L=fixed length of the column */
+ static constexpr uint16_t IND = (1U << IND_BITS) - 1;
+
+ /** Field metadata */
+ uint16_t data;
+
+ void clear_not_null() { data &= ~NOT_NULL; }
+public:
+ bool is_dropped() const { return data & DROPPED; }
+ void set_dropped() { data |= DROPPED; }
+ bool is_not_null() const { return data & NOT_NULL; }
+ void set_not_null() { ut_ad(is_dropped()); data |= NOT_NULL; }
+ uint16_t ind() const { return data & IND; }
+ void set_ind(uint16_t i)
+ {
+ DBUG_ASSERT(i <= IND);
+ DBUG_ASSERT(!ind());
+ data |= i;
+ }
+ field_map_element_t& operator= (uint16_t value)
+ {
+ data = value;
+ return *this;
+ }
+ operator uint16_t() { return data; }
+};
+
+static_assert(sizeof(field_map_element_t) == 2,
+ "Size mismatch for a persistent data item!");
+
+/** Instantly dropped or reordered columns */
+struct dict_instant_t
+{
+ /** Number of dropped columns */
+ unsigned n_dropped;
+ /** Dropped columns */
+ dict_col_t* dropped;
+ /** Map of clustered index non-PK fields[i - first_user_field()]
+ to table columns */
+ field_map_element_t* field_map;
+};
+
/** These are used when MySQL FRM and InnoDB data dictionary are
in inconsistent state. */
typedef enum {
@@ -1640,11 +1807,7 @@ struct dict_table_t {
/** Get reference count.
@return current value of n_ref_count */
- inline int32 get_ref_count()
- {
- return my_atomic_load32_explicit(&n_ref_count,
- MY_MEMORY_ORDER_RELAXED);
- }
+ inline uint32_t get_ref_count() const { return n_ref_count; }
/** Acquire the table handle. */
inline void acquire();
@@ -1664,6 +1827,9 @@ struct dict_table_t {
return flags2 & DICT_TF2_TEMPORARY;
}
+ /** @return whether the table is not in ROW_FORMAT=REDUNDANT */
+ bool not_redundant() const { return flags & DICT_TF_COMPACT; }
+
/** @return whether this table is readable
@retval true normally
@retval false if this is a single-table tablespace
@@ -1682,35 +1848,92 @@ struct dict_table_t {
return strstr(name, "/" TEMP_FILE_PREFIX) != NULL;
}
- /** @return whether instant ADD COLUMN is in effect */
+ /** @return whether instant ALTER TABLE is in effect */
bool is_instant() const
{
return(UT_LIST_GET_FIRST(indexes)->is_instant());
}
- /** @return whether the table supports instant ADD COLUMN */
+ /** @return whether the table supports instant ALTER TABLE */
bool supports_instant() const
{
return(!(flags & DICT_TF_MASK_ZIP_SSIZE));
}
- /** Adjust metadata for instant ADD COLUMN.
- @param[in] table table definition after instant ADD COLUMN */
- void instant_add_column(const dict_table_t& table);
+ /** @return the number of instantly dropped columns */
+ unsigned n_dropped() const { return instant ? instant->n_dropped : 0; }
+
+ /** Look up an old column.
+ @param[in] cols the old columns of the table
+ @param[in] col_map map from old table columns to altered ones
+ @param[in] n_cols number of old columns
+ @param[in] i the number of the new column
+ @return old column
+ @retval NULL if column i was added to the table */
+ static const dict_col_t* find(const dict_col_t* cols,
+ const ulint* col_map, ulint n_cols,
+ ulint i)
+ {
+ for (ulint o = n_cols; o--; ) {
+ if (col_map[o] == i) {
+ return &cols[o];
+ }
+ }
+ return NULL;
+ }
- /** Roll back instant_add_column().
- @param[in] old_n_cols original n_cols
- @param[in] old_cols original cols
- @param[in] old_col_names original col_names */
- void rollback_instant(
+ /** Serialise metadata of dropped or reordered columns.
+ @param[in,out] heap memory heap for allocation
+ @param[out] field data field with the metadata */
+ inline void serialise_columns(mem_heap_t* heap, dfield_t* field) const;
+
+ /** Reconstruct dropped or reordered columns.
+ @param[in] metadata data from serialise_columns()
+ @param[in] len length of the metadata, in bytes
+ @return whether parsing the metadata failed */
+ bool deserialise_columns(const byte* metadata, ulint len);
+
+ /** Set is_instant() before instant_column().
+ @param[in] old previous table definition
+ @param[in] col_map map from old.cols[]
+ and old.v_cols[] to this
+ @param[out] first_alter_pos 0, or
+ 1 + first changed column position */
+ inline void prepare_instant(const dict_table_t& old,
+ const ulint* col_map,
+ unsigned& first_alter_pos);
+
+ /** Adjust table metadata for instant ADD/DROP/reorder COLUMN.
+ @param[in] table table on which prepare_instant() was invoked
+ @param[in] col_map mapping from cols[] and v_cols[] to table
+ @return whether the metadata record must be updated */
+ inline bool instant_column(const dict_table_t& table,
+ const ulint* col_map);
+
+ /** Roll back instant_column().
+ @param[in] old_n_cols original n_cols
+ @param[in] old_cols original cols
+ @param[in] old_col_names original col_names
+ @param[in] old_instant original instant structure
+ @param[in] old_fields original fields
+ @param[in] old_n_fields original number of fields
+ @param[in] old_n_core_fields original number of core fields
+ @param[in] old_n_v_cols original n_v_cols
+ @param[in] old_v_cols original v_cols
+ @param[in] old_v_col_names original v_col_names
+ @param[in] col_map column map */
+ inline void rollback_instant(
unsigned old_n_cols,
dict_col_t* old_cols,
- const char* old_col_names);
-
- /** Trim the instantly added columns when an insert into SYS_COLUMNS
- is rolled back during ALTER TABLE or recovery.
- @param[in] n number of surviving non-system columns */
- void rollback_instant(unsigned n);
+ const char* old_col_names,
+ dict_instant_t* old_instant,
+ dict_field_t* old_fields,
+ unsigned old_n_fields,
+ unsigned old_n_core_fields,
+ unsigned old_n_v_cols,
+ dict_v_col_t* old_v_cols,
+ const char* old_v_col_names,
+ const ulint* col_map);
/** Add the table definition to the data dictionary cache */
void add_to_cache();
@@ -1728,23 +1951,28 @@ struct dict_table_t {
void inc_fk_checks()
{
#ifdef UNIV_DEBUG
- lint fk_checks= (lint)
+ int32_t fk_checks=
#endif
- my_atomic_addlint(&n_foreign_key_checks_running, 1);
+ n_foreign_key_checks_running++;
ut_ad(fk_checks >= 0);
}
void dec_fk_checks()
{
#ifdef UNIV_DEBUG
- lint fk_checks= (lint)
+ int32_t fk_checks=
#endif
- my_atomic_addlint(&n_foreign_key_checks_running, ulint(-1));
+ n_foreign_key_checks_running--;
ut_ad(fk_checks > 0);
}
/** For overflow fields returns potential max length stored inline */
- size_t get_overflow_field_local_len() const;
+ inline size_t get_overflow_field_local_len() const;
+private:
+ /** Initialize instant->field_map.
+ @param[in] table table definition to copy from */
+ inline void init_instant(const dict_table_t& table);
+public:
/** Id of the table. */
table_id_t id;
/** Hash chain node. */
@@ -1803,8 +2031,7 @@ struct dict_table_t {
/** TRUE if the table is to be dropped, but not yet actually dropped
(could in the background drop list). It is turned on at the beginning
of row_drop_table_for_mysql() and turned off just before we start to
- update system tables for the drop. It is protected by
- dict_operation_lock. */
+ update system tables for the drop. It is protected by dict_sys.latch. */
unsigned to_be_dropped:1;
/** Number of non-virtual columns defined so far. */
@@ -1854,6 +2081,9 @@ struct dict_table_t {
reason s_cols is a part of dict_table_t */
dict_s_col_list* s_cols;
+ /** Instantly dropped or reordered columns, or NULL if none */
+ dict_instant_t* instant;
+
/** Column names packed in a character string
"name1\0name2\0...nameN\0". Until the string contains n_cols, it will
be allocated from a temporary heap. The final string will be allocated
@@ -1904,7 +2134,7 @@ struct dict_table_t {
/** Count of how many foreign key check operations are currently being
performed on the table. We cannot drop the table while there are
foreign key checks running on it. */
- ulint n_foreign_key_checks_running;
+ Atomic_counter<int32_t> n_foreign_key_checks_running;
/** Transactions whose view low limit is greater than this number are
not allowed to store to the MySQL query cache or retrieve from it.
@@ -1925,7 +2155,7 @@ struct dict_table_t {
dict_foreign_set referenced_set;
/** Statistics for query optimization. Mostly protected by
- dict_sys->mutex. @{ */
+ dict_sys.mutex. @{ */
/** TRUE if statistics have been calculated the first time after
database startup or table creation. */
@@ -2007,7 +2237,7 @@ struct dict_table_t {
/** The state of the background stats thread wrt this table.
See BG_STAT_NONE, BG_STAT_IN_PROGRESS and BG_STAT_SHOULD_QUIT.
- Writes are covered by dict_sys->mutex. Dirty reads are possible. */
+ Writes are covered by dict_sys.mutex. Dirty reads are possible. */
#define BG_SCRUB_IN_PROGRESS ((byte)(1 << 2))
/*!< BG_SCRUB_IN_PROGRESS is set in
@@ -2023,7 +2253,7 @@ struct dict_table_t {
/** The state of the background stats thread wrt this table.
See BG_STAT_NONE, BG_STAT_IN_PROGRESS and BG_STAT_SHOULD_QUIT.
- Writes are covered by dict_sys->mutex. Dirty reads are possible. */
+ Writes are covered by dict_sys.mutex. Dirty reads are possible. */
byte stats_bg_flag;
bool stats_error_printed;
@@ -2050,7 +2280,7 @@ struct dict_table_t {
lock_t* autoinc_lock;
/** Mutex protecting the autoinc counter and freed_indexes. */
- mysql_mutex_t autoinc_mutex;
+ std::mutex autoinc_mutex;
/** Autoinc counter value to give to the next inserted row. */
ib_uint64_t autoinc;
@@ -2085,7 +2315,7 @@ private:
/** Count of how many handles are opened to this table. Dropping of the
table is NOT allowed until this count gets to zero. MySQL does NOT
itself check the number of open handles at DROP. */
- int32 n_ref_count;
+ Atomic_counter<uint32_t> n_ref_count;
public:
/** List of locks on the table. Protected by lock_sys.mutex. */
@@ -2137,12 +2367,15 @@ inline bool dict_index_t::is_readable() const { return table->is_readable(); }
inline bool dict_index_t::is_instant() const
{
ut_ad(n_core_fields > 0);
- ut_ad(n_core_fields <= n_fields);
+ ut_ad(n_core_fields <= n_fields || table->n_dropped());
ut_ad(n_core_fields == n_fields
|| (type & ~(DICT_UNIQUE | DICT_CORRUPT)) == DICT_CLUSTERED);
ut_ad(n_core_fields == n_fields || table->supports_instant());
ut_ad(n_core_fields == n_fields || !table->is_temporary());
- return(n_core_fields != n_fields);
+ ut_ad(!table->instant || !table->is_temporary());
+
+ return n_core_fields != n_fields
+ || (is_primary() && table->instant);
}
inline bool dict_index_t::is_corrupted() const
@@ -2152,6 +2385,81 @@ inline bool dict_index_t::is_corrupted() const
|| (table && table->corrupted));
}
+inline void dict_index_t::clear_instant_add()
+{
+ DBUG_ASSERT(is_primary());
+ DBUG_ASSERT(is_instant());
+ DBUG_ASSERT(!table->instant);
+ for (unsigned i = n_core_fields; i < n_fields; i++) {
+ fields[i].col->clear_instant();
+ }
+ n_core_fields = n_fields;
+ n_core_null_bytes = UT_BITS_IN_BYTES(unsigned(n_nullable));
+}
+
+inline void dict_index_t::clear_instant_alter()
+{
+ DBUG_ASSERT(is_primary());
+ DBUG_ASSERT(n_fields == n_def);
+
+ if (!table->instant) {
+ if (is_instant()) {
+ clear_instant_add();
+ }
+ return;
+ }
+
+#ifndef DBUG_OFF
+ for (unsigned i = first_user_field(); i--; ) {
+ DBUG_ASSERT(!fields[i].col->is_dropped());
+ DBUG_ASSERT(!fields[i].col->is_nullable());
+ }
+#endif
+ const dict_col_t* ai_col = table->persistent_autoinc
+ ? fields[table->persistent_autoinc - 1].col
+ : NULL;
+ dict_field_t* const begin = &fields[first_user_field()];
+ dict_field_t* end = &fields[n_fields];
+
+ for (dict_field_t* d = begin; d < end; ) {
+ /* Move fields for dropped columns to the end. */
+ if (!d->col->is_dropped()) {
+ d++;
+ } else {
+ if (d->col->is_nullable()) {
+ n_nullable--;
+ }
+
+ std::swap(*d, *--end);
+ }
+ }
+
+ DBUG_ASSERT(&fields[n_fields - table->n_dropped()] == end);
+ n_core_fields = n_fields = n_def = end - fields;
+ n_core_null_bytes = UT_BITS_IN_BYTES(n_nullable);
+ std::sort(begin, end, [](const dict_field_t& a, const dict_field_t& b)
+ { return a.col->ind < b.col->ind; });
+ table->instant = NULL;
+ if (ai_col) {
+ auto a = std::find_if(fields, end,
+ [ai_col](const dict_field_t& f)
+ { return f.col == ai_col; });
+ table->persistent_autoinc = (a == end) ? 0 : 1 + (a - fields);
+ }
+}
+
+/** @return whether the column was instantly dropped
+@param[in] index the clustered index */
+inline bool dict_col_t::is_dropped(const dict_index_t& index) const
+{
+ DBUG_ASSERT(index.is_primary());
+ DBUG_ASSERT(!is_dropped() == !index.table->instant);
+ DBUG_ASSERT(!is_dropped() || (this >= index.table->instant->dropped
+ && this < index.table->instant->dropped
+ + index.table->instant->n_dropped));
+ return is_dropped();
+}
+
/*******************************************************************//**
Initialise the table lock list. */
void
@@ -2172,16 +2480,6 @@ struct dict_foreign_add_to_referenced_table {
}
};
-/** Release the zip_pad_mutex of a given index.
-@param[in,out] index index whose zip_pad_mutex is to be released */
-inline
-void
-dict_index_zip_pad_unlock(
- dict_index_t* index)
-{
- mysql_mutex_unlock(&index->zip_pad.mutex);
-}
-
/** Check whether the col is used in spatial index or regular index.
@param[in] col column to check
@return spatial status */
diff --git a/storage/innobase/include/dict0priv.h b/storage/innobase/include/dict0priv.h
index bcdd614b02d..bef0ddad0aa 100644
--- a/storage/innobase/include/dict0priv.h
+++ b/storage/innobase/include/dict0priv.h
@@ -45,18 +45,6 @@ dict_table_check_if_in_cache_low(
/*=============================*/
const char* table_name); /*!< in: table name */
-/**********************************************************************//**
-Returns a table object based on table id.
-@return table, NULL if does not exist */
-UNIV_INLINE
-dict_table_t*
-dict_table_open_on_id_low(
-/*=====================*/
- table_id_t table_id, /*!< in: table id */
- dict_err_ignore_t ignore_err, /*!< in: errors to ignore
- when loading the table */
- ibool open_only_if_in_cache);
-
#include "dict0priv.inl"
#endif /* dict0priv.h */
diff --git a/storage/innobase/include/dict0priv.inl b/storage/innobase/include/dict0priv.inl
index 7b584c7e1cb..ff645378175 100644
--- a/storage/innobase/include/dict0priv.inl
+++ b/storage/innobase/include/dict0priv.inl
@@ -25,7 +25,6 @@ Created Wed 13 Oct 2010 16:10:14 EST Sunny Bains
#include "dict0dict.h"
#include "dict0load.h"
-#include "dict0priv.h"
/**********************************************************************//**
Gets a table; loads it to the dictionary cache if necessary. A low-level
@@ -40,7 +39,7 @@ dict_table_get_low(
dict_table_t* table;
ut_ad(table_name);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
table = dict_table_check_if_in_cache_low(table_name);
@@ -64,40 +63,6 @@ dict_table_get_low(
}
/**********************************************************************//**
-Returns a table object based on table id.
-@return table, NULL if does not exist */
-UNIV_INLINE
-dict_table_t*
-dict_table_open_on_id_low(
-/*======================*/
- table_id_t table_id, /*!< in: table id */
- dict_err_ignore_t ignore_err, /*!< in: errors to ignore
- when loading the table */
- ibool open_only_if_in_cache)
-{
- dict_table_t* table;
- ulint fold;
-
- ut_ad(mutex_own(&dict_sys->mutex));
-
- /* Look for the table name in the hash table */
- fold = ut_fold_ull(table_id);
-
- HASH_SEARCH(id_hash, dict_sys->table_id_hash, fold,
- dict_table_t*, table, ut_ad(table->cached),
- table->id == table_id);
- if (table == NULL && !open_only_if_in_cache) {
- table = dict_load_table_on_id(table_id, ignore_err);
- }
-
- ut_ad(!table || table->cached);
-
- /* TODO: should get the type information from MySQL */
-
- return(table);
-}
-
-/**********************************************************************//**
Checks if a table is in the dictionary cache.
@return table, NULL if not found */
UNIV_INLINE
@@ -114,12 +79,12 @@ dict_table_check_if_in_cache_low(
("table: '%s'", table_name));
ut_ad(table_name);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
/* Look for the table name in the hash table */
table_fold = ut_fold_string(table_name);
- HASH_SEARCH(name_hash, dict_sys->table_hash, table_fold,
+ HASH_SEARCH(name_hash, dict_sys.table_hash, table_fold,
dict_table_t*, table, ut_ad(table->cached),
!strcmp(table->name.m_name, table_name));
DBUG_RETURN(table);
diff --git a/storage/innobase/include/dict0stats.h b/storage/innobase/include/dict0stats.h
index 639c4043f02..dccb354f803 100644
--- a/storage/innobase/include/dict0stats.h
+++ b/storage/innobase/include/dict0stats.h
@@ -187,6 +187,19 @@ dict_stats_rename_table(
char* errstr, /*!< out: error string if != DB_SUCCESS
is returned */
size_t errstr_sz); /*!< in: errstr size */
+/*********************************************************************//**
+Renames an index in InnoDB persistent stats storage.
+This function creates its own transaction and commits it.
+@return DB_SUCCESS or error code. DB_STATS_DO_NOT_EXIST will be returned
+if the persistent stats do not exist. */
+dberr_t
+dict_stats_rename_index(
+/*====================*/
+ const dict_table_t* table, /*!< in: table whose index
+ is renamed */
+ const char* old_index_name, /*!< in: old index name */
+ const char* new_index_name) /*!< in: new index name */
+ __attribute__((warn_unused_result));
/** Save an individual index's statistic into the persistent statistics
storage.
diff --git a/storage/innobase/include/dict0stats.inl b/storage/innobase/include/dict0stats.inl
index b1c0a421dd5..d4e23ecb0a4 100644
--- a/storage/innobase/include/dict0stats.inl
+++ b/storage/innobase/include/dict0stats.inl
@@ -75,7 +75,7 @@ dict_stats_is_persistent_enabled(const dict_table_t* table)
+ dict_stats_update(DICT_STATS_RECALC_TRANSIENT) on a table that has
just been PS-enabled.
This is acceptable. Avoiding this would mean that we would have to
- protect the ::stat_persistent with dict_sys->mutex like the
+ protect the stat_persistent with dict_sys.mutex like the
other ::stat_ members which would be too big performance penalty,
especially when this function is called from
dict_stats_update_if_needed(). */
@@ -148,7 +148,7 @@ dict_stats_init(
/*============*/
dict_table_t* table) /*!< in/out: table */
{
- ut_ad(!mutex_own(&dict_sys->mutex));
+ ut_ad(!mutex_own(&dict_sys.mutex));
if (table->stat_initialized) {
return;
@@ -174,7 +174,7 @@ dict_stats_deinit(
/*==============*/
dict_table_t* table) /*!< in/out: table */
{
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
ut_a(table->get_ref_count() == 0);
diff --git a/storage/innobase/include/dict0stats_bg.h b/storage/innobase/include/dict0stats_bg.h
index 66b98629033..526139643d1 100644
--- a/storage/innobase/include/dict0stats_bg.h
+++ b/storage/innobase/include/dict0stats_bg.h
@@ -72,7 +72,7 @@ dict_stats_stop_bg(
dict_table_t* table) /*!< in/out: table */
{
ut_ad(!srv_read_only_mode);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
if (!(table->stats_bg_flag & BG_STAT_IN_PROGRESS)) {
return(true);
@@ -90,7 +90,7 @@ and restore the lock before it exits.
The background stats thread is guaranteed not to start using the specified
table after this function returns and before the caller unlocks the data
dictionary because it sets the BG_STAT_IN_PROGRESS bit in table->stats_bg_flag
-under dict_sys->mutex. */
+under dict_sys.mutex. */
void
dict_stats_wait_bg_to_stop_using_table(
/*===================================*/
diff --git a/storage/innobase/include/dict0types.h b/storage/innobase/include/dict0types.h
index e9265849651..76ffef236a1 100644
--- a/storage/innobase/include/dict0types.h
+++ b/storage/innobase/include/dict0types.h
@@ -30,7 +30,6 @@ Created 1/8/1996 Heikki Tuuri
#include <ut0mutex.h>
#include <rem0types.h>
-struct dict_sys_t;
struct dict_col_t;
struct dict_field_t;
struct dict_index_t;
diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h
index c5c97bb3c02..4182b0a7c9d 100644
--- a/storage/innobase/include/fil0crypt.h
+++ b/storage/innobase/include/fil0crypt.h
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (C) 2013, 2015, Google Inc. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, 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
@@ -26,11 +26,9 @@ Created 04/01/2015 Jan Lindström
#ifndef fil0crypt_h
#define fil0crypt_h
-#ifndef UNIV_INNOCHECKSUM
#include "os0event.h"
#include "my_crypt.h"
#include "fil0fil.h"
-#endif /*! UNIV_INNOCHECKSUM */
/**
* Magic pattern in start of crypt data on page 0
@@ -281,13 +279,11 @@ fil_space_merge_crypt_data(
const fil_space_crypt_t* src);
/** Initialize encryption parameters from a tablespace header page.
-@param[in] page_size page size of the tablespace
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] page first page of the tablespace
@return crypt data from page 0
@retval NULL if not present or not valid */
-UNIV_INTERN
-fil_space_crypt_t*
-fil_space_read_crypt_data(const page_size_t& page_size, const byte* page)
+fil_space_crypt_t* fil_space_read_crypt_data(ulint zip_size, const byte* page)
MY_ATTRIBUTE((nonnull, warn_unused_result));
/**
@@ -313,14 +309,16 @@ fil_parse_write_crypt_data(
MY_ATTRIBUTE((warn_unused_result));
/** Encrypt a buffer.
-@param[in,out] crypt_data Crypt data
-@param[in] space space_id
-@param[in] offset Page offset
-@param[in] lsn Log sequence number
-@param[in] src_frame Page to encrypt
-@param[in] page_size Page size
-@param[in,out] dst_frame Output buffer
+@param[in,out] crypt_data Crypt data
+@param[in] space space_id
+@param[in] offset Page offset
+@param[in] lsn Log sequence number
+@param[in] src_frame Page to encrypt
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in,out] dst_frame Output buffer
+@param[in] use_full_checksum full crc32 algo is used
@return encrypted buffer or NULL */
+UNIV_INTERN
byte*
fil_encrypt_buf(
fil_space_crypt_t* crypt_data,
@@ -328,8 +326,9 @@ fil_encrypt_buf(
ulint offset,
lsn_t lsn,
const byte* src_frame,
- const page_size_t& page_size,
- byte* dst_frame)
+ ulint zip_size,
+ byte* dst_frame,
+ bool use_full_checksum)
MY_ATTRIBUTE((warn_unused_result));
/**
@@ -351,19 +350,23 @@ fil_space_encrypt(
byte* dst_frame)
MY_ATTRIBUTE((warn_unused_result));
-/**
-Decrypt a page.
-@param[in,out] crypt_data crypt_data
+
+/** Decrypt a page.
+@param]in] space_id space id
+@param[in] crypt_data crypt_data
@param[in] tmp_frame Temporary buffer
-@param[in] page_size Page size
+@param[in] physical_size page size
+@param[in] fsp_flags Tablespace flags
@param[in,out] src_frame Page to decrypt
@return DB_SUCCESS or error */
UNIV_INTERN
dberr_t
fil_space_decrypt(
+ ulint space_id,
fil_space_crypt_t* crypt_data,
byte* tmp_frame,
- const page_size_t& page_size,
+ ulint physical_size,
+ ulint fsp_flags,
byte* src_frame);
/******************************************************************
@@ -381,17 +384,14 @@ fil_space_decrypt(
byte* src_frame)
MY_ATTRIBUTE((warn_unused_result));
-/******************************************************************
+/**
Calculate post encryption checksum
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] dst_frame Block where checksum is calculated
-@return page checksum or BUF_NO_CHECKSUM_MAGIC
+@return page checksum
not needed. */
-UNIV_INTERN
uint32_t
-fil_crypt_calculate_checksum(
- const page_size_t& page_size,
- const byte* dst_frame)
+fil_crypt_calculate_checksum(ulint zip_size, const byte* dst_frame)
MY_ATTRIBUTE((warn_unused_result));
/*********************************************************************
@@ -489,10 +489,9 @@ calculated checksum as if it does page could be valid unencrypted,
encrypted, or corrupted.
@param[in,out] page page frame (checksum is temporarily modified)
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@return true if page is encrypted AND OK, false otherwise */
-bool
-fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
+bool fil_space_verify_crypt_checksum(const byte* page, ulint zip_size)
MY_ATTRIBUTE((warn_unused_result));
/** Add the tablespace to the rotation list if
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index a1ba4a23525..dac2443276d 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -27,12 +27,16 @@ Created 10/25/1995 Heikki Tuuri
#ifndef fil0fil_h
#define fil0fil_h
+#include "fsp0types.h"
+
#ifndef UNIV_INNOCHECKSUM
#include "log0recv.h"
#include "dict0types.h"
-#include "page0size.h"
#include "ilist.h"
+#ifdef UNIV_LINUX
+# include <set>
+#endif
struct unflushed_spaces_tag_t;
struct rotation_list_tag_t;
@@ -41,8 +45,6 @@ struct rotation_list_tag_t;
extern my_bool srv_use_doublewrite_buf;
extern struct buf_dblwr_t* buf_dblwr;
class page_id_t;
-struct trx_t;
-class truncate_t;
/** Structure containing encryption specification */
struct fil_space_crypt_t;
@@ -76,10 +78,17 @@ fil_type_is_data(
struct fil_node_t;
+#endif
+
/** Tablespace or log data space */
+#ifndef UNIV_INNOCHECKSUM
struct fil_space_t : ilist_node<unflushed_spaces_tag_t>,
ilist_node<rotation_list_tag_t>
+#else
+struct fil_space_t
+#endif
{
+#ifndef UNIV_INNOCHECKSUM
ulint id; /*!< space id */
hash_node_t hash; /*!< hash chain node */
char* name; /*!< Tablespace name */
@@ -96,11 +105,9 @@ struct fil_space_t : ilist_node<unflushed_spaces_tag_t>,
/** whether undo tablespace truncation is in progress */
bool is_being_truncated;
#ifdef UNIV_DEBUG
- ulint redo_skipped_count;
- /*!< reference count for operations who want
- to skip redo log in the file space in order
- to make modify_check() pass.
- Uses my_atomic_loadlint() and friends. */
+ /** reference count for operations who want to skip redo log in the
+ file space in order to make modify_check() pass. */
+ Atomic_counter<ulint> redo_skipped_count;
#endif
fil_type_t purpose;/*!< purpose */
UT_LIST_BASE_NODE_T(fil_node_t) chain;
@@ -119,11 +126,7 @@ struct fil_space_t : ilist_node<unflushed_spaces_tag_t>,
0 if no size change was read from the redo log,
or if the size change was implemented */
/** the committed size of the tablespace in pages */
- ulint committed_size;
- ulint flags; /*!< FSP_SPACE_FLAGS and FSP_FLAGS_MEM_ flags;
- see fsp0types.h,
- fsp_flags_is_valid(),
- page_size_t(ulint) (constructor) */
+ Atomic_relaxed<ulint> committed_size;
ulint n_reserved_extents;
/*!< number of reserved free extents for
ongoing operations like B-tree page split */
@@ -139,22 +142,20 @@ private:
The tablespace cannot be dropped while this is nonzero, or while
fil_node_t::n_pending is nonzero.
- The most significant bit contains the STOP_NEW_OPS flag.
-
- Protected by my_atomic. */
- int32 n_pending_ops;
+ The most significant bit contains the STOP_NEW_OPS flag. */
+ Atomic_relaxed<size_t> n_pending_ops;
/** Flag in n_pending_ops that indicates that the tablespace is being
deleted, and no further operations should be performed */
- static const int32 STOP_NEW_OPS= 1 << 31;
+ static const size_t STOP_NEW_OPS= ~(~size_t(0) >> 1);
public:
/** Number of pending block read or write operations
(when a write is imminent or a read has recently completed).
The tablespace object cannot be freed while this is nonzero,
but it can be detached from fil_system.
Note that fil_node_t::n_pending tracks actual pending I/O requests.
- Protected by fil_system.mutex and my_atomic_loadlint() and friends. */
- ulint n_pending_ios;
+ Protected by fil_system.mutex and std::atomic. */
+ std::atomic<ulint> n_pending_ios;
rw_lock_t latch; /*!< latch protecting the file space storage
allocation */
UT_LIST_NODE_T(fil_space_t) named_spaces;
@@ -254,7 +255,10 @@ public:
/** Note that the tablespace has been imported.
Initially, purpose=FIL_TYPE_IMPORT so that no redo log is
written while the space ID is being updated in each page. */
- void set_imported();
+ inline void set_imported();
+
+ /** @return whether the storage device is rotational (HDD, not SSD) */
+ inline bool is_rotational() const;
/** Open each file. Only invoked on fil_system.temp_space.
@return whether all files were opened */
@@ -262,50 +266,27 @@ public:
/** Close each file. Only invoked on fil_system.temp_space. */
void close();
- /** @return whether the tablespace is about to be dropped or is referenced */
- int32 is_stopping_or_referenced()
- {
- return my_atomic_load32(&n_pending_ops);
- }
-
- /** @return whether the tablespace is about to be dropped or is referenced */
- int32 is_stopping_or_referenced() const
- {
- return const_cast<fil_space_t*>(this)->is_stopping_or_referenced();
- }
-
/** @return whether the tablespace is about to be dropped */
- bool is_stopping() const
- {
- return is_stopping_or_referenced() & STOP_NEW_OPS;
- }
+ bool is_stopping() const { return n_pending_ops & STOP_NEW_OPS; }
/** @return number of references being held */
- int32 referenced() const
- {
- return is_stopping_or_referenced() & ~STOP_NEW_OPS;
- }
+ size_t referenced() const { return n_pending_ops & ~STOP_NEW_OPS; }
/** Note that operations on the tablespace must stop or can resume */
void set_stopping(bool stopping)
{
- /* Note: starting with 10.4 this should be std::atomic::fetch_xor() */
- int32 n= stopping ? 0 : STOP_NEW_OPS;
- while (!my_atomic_cas32_strong_explicit(&n_pending_ops, &n,
- n ^ STOP_NEW_OPS,
- MY_MEMORY_ORDER_ACQUIRE,
- MY_MEMORY_ORDER_RELAXED))
- ut_ad(!(n & STOP_NEW_OPS) == stopping);
+ ut_d(auto n=) n_pending_ops.fetch_xor(STOP_NEW_OPS);
+ ut_ad(!(n & STOP_NEW_OPS) == stopping);
}
MY_ATTRIBUTE((warn_unused_result))
/** @return whether a tablespace reference was successfully acquired */
bool acquire()
{
- int32 n= 0;
- while (!my_atomic_cas32_strong_explicit(&n_pending_ops, &n, n + 1,
- MY_MEMORY_ORDER_ACQUIRE,
- MY_MEMORY_ORDER_RELAXED))
+ size_t n= 0;
+ while (!n_pending_ops.compare_exchange_strong(n, n + 1,
+ std::memory_order_acquire,
+ std::memory_order_relaxed))
if (UNIV_UNLIKELY(n & STOP_NEW_OPS))
return false;
return true;
@@ -314,28 +295,294 @@ public:
@return whether this was the last reference */
bool release()
{
- int32 n= my_atomic_add32(&n_pending_ops, -1);
+ auto n= n_pending_ops.fetch_sub(1);
ut_ad(n & ~STOP_NEW_OPS);
return (n & ~STOP_NEW_OPS) == 1;
}
-
/** Acquire a tablespace reference for I/O. */
- void acquire_for_io() { my_atomic_addlint(&n_pending_ios, 1); }
+ void acquire_for_io() { n_pending_ios++; }
/** Release a tablespace reference for I/O. */
- void release_for_io()
+ void release_for_io() { ut_d(auto n=) n_pending_ios--; ut_ad(n); }
+ /** @return whether I/O is pending */
+ bool pending_io() const { return n_pending_ios; }
+#endif /* !UNIV_INNOCHECKSUM */
+ /** FSP_SPACE_FLAGS and FSP_FLAGS_MEM_ flags;
+ check fsp0types.h to more info about flags. */
+ ulint flags;
+
+ /** Determine if full_crc32 is used for a data file
+ @param[in] flags tablespace flags (FSP_SPACE_FLAGS)
+ @return whether the full_crc32 algorithm is active */
+ static bool full_crc32(ulint flags) {
+ return flags & FSP_FLAGS_FCRC32_MASK_MARKER;
+ }
+ /** Determine if full_crc32 is used along with compression */
+ static bool is_full_crc32_compressed(ulint flags)
{
- ut_d(ulint n=) my_atomic_addlint(&n_pending_ios, ulint(-1));
- ut_ad(n);
+ if (full_crc32(flags))
+ {
+ ulint algo= FSP_FLAGS_FCRC32_GET_COMPRESSED_ALGO(flags);
+ DBUG_ASSERT(algo <= PAGE_ALGORITHM_LAST);
+ return algo > 0;
+ }
+
+ return false;
}
- /** @return whether I/O is pending */
- bool pending_io() { return my_atomic_loadlint(&n_pending_ios); }
- /** @return whether I/O is pending */
- bool pending_io() const
+ /** @return whether innodb_checksum_algorithm=full_crc32 is active */
+ bool full_crc32() const { return full_crc32(flags); }
+ /** Determine the logical page size.
+ @param flags tablespace flags (FSP_FLAGS)
+ @return the logical page size
+ @retval 0 if the flags are invalid */
+ static unsigned logical_size(ulint flags) {
+
+ ulint page_ssize = 0;
+
+ if (full_crc32(flags)) {
+ page_ssize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags);
+ } else {
+ page_ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
+ }
+
+ switch (page_ssize) {
+ case 3: return 4096;
+ case 4: return 8192;
+ case 5:
+ { ut_ad(full_crc32(flags)); return 16384; }
+ case 0:
+ { ut_ad(!full_crc32(flags)); return 16384; }
+ case 6: return 32768;
+ case 7: return 65536;
+ default: return 0;
+ }
+ }
+ /** Determine the ROW_FORMAT=COMPRESSED page size.
+ @param flags tablespace flags (FSP_FLAGS)
+ @return the ROW_FORMAT=COMPRESSED page size
+ @retval 0 if ROW_FORMAT=COMPRESSED is not used */
+ static unsigned zip_size(ulint flags) {
+
+ if (full_crc32(flags)) {
+ return 0;
+ }
+
+ ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(flags);
+ return zip_ssize
+ ? (UNIV_ZIP_SIZE_MIN >> 1) << zip_ssize : 0;
+ }
+ /** Determine the physical page size.
+ @param flags tablespace flags (FSP_FLAGS)
+ @return the physical page size */
+ static unsigned physical_size(ulint flags) {
+
+ if (full_crc32(flags)) {
+ return logical_size(flags);
+ }
+
+ ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(flags);
+ return zip_ssize
+ ? (UNIV_ZIP_SIZE_MIN >> 1) << zip_ssize
+ : unsigned(srv_page_size);
+ }
+ /** @return the ROW_FORMAT=COMPRESSED page size
+ @retval 0 if ROW_FORMAT=COMPRESSED is not used */
+ unsigned zip_size() const { return zip_size(flags); }
+ /** @return the physical page size */
+ unsigned physical_size() const { return physical_size(flags); }
+ /** Check whether the compression enabled in tablespace.
+ @param[in] flags tablespace flags */
+ static bool is_compressed(ulint flags)
{
- return const_cast<fil_space_t*>(this)->pending_io();
+ return is_full_crc32_compressed(flags)
+ || FSP_FLAGS_HAS_PAGE_COMPRESSION(flags);
}
+ /** @return whether the compression enabled for the tablespace. */
+ bool is_compressed() const { return is_compressed(flags); }
+
+ /** Get the compression algorithm for full crc32 format.
+ @param[in] flags tablespace flags
+ @return algorithm type of tablespace */
+ static ulint get_compression_algo(ulint flags)
+ {
+ return full_crc32(flags)
+ ? FSP_FLAGS_FCRC32_GET_COMPRESSED_ALGO(flags)
+ : 0;
+ }
+ /** @return the page_compressed algorithm
+ @retval 0 if not page_compressed */
+ ulint get_compression_algo() const {
+ return fil_space_t::get_compression_algo(flags);
+ }
+ /** Determine if the page_compressed page contains an extra byte
+ for exact compressed stream length
+ @param[in] flags tablespace flags
+ @return whether the extra byte is needed */
+ static bool full_crc32_page_compressed_len(ulint flags)
+ {
+ DBUG_ASSERT(full_crc32(flags));
+ switch (get_compression_algo(flags)) {
+ case PAGE_LZ4_ALGORITHM:
+ case PAGE_LZO_ALGORITHM:
+ case PAGE_SNAPPY_ALGORITHM:
+ return true;
+ }
+ return false;
+ }
+
+ /** Whether the full checksum matches with non full checksum flags.
+ @param[in] flags flags present
+ @param[in] expected expected flags
+ @return true if it is equivalent */
+ static bool is_flags_full_crc32_equal(ulint flags, ulint expected)
+ {
+ ut_ad(full_crc32(flags));
+ ulint fcrc32_psize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags);
+
+ if (full_crc32(expected)) {
+ /* The data file may have been created with a
+ different innodb_compression_algorithm. But
+ we only support one innodb_page_size for all files. */
+ return fcrc32_psize
+ == FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(expected);
+ }
+
+ ulint non_fcrc32_psize = FSP_FLAGS_GET_PAGE_SSIZE(expected);
+
+ if (!non_fcrc32_psize) {
+ if (fcrc32_psize != 5) {
+ return false;
+ }
+ } else if (fcrc32_psize != non_fcrc32_psize) {
+ return false;
+ }
+
+ return true;
+ }
+ /** Whether old tablespace flags match full_crc32 flags.
+ @param[in] flags flags present
+ @param[in] expected expected flags
+ @return true if it is equivalent */
+ static bool is_flags_non_full_crc32_equal(ulint flags, ulint expected)
+ {
+ ut_ad(!full_crc32(flags));
+
+ if (!full_crc32(expected)) {
+ return false;
+ }
+
+ ulint non_fcrc32_psize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
+ ulint fcrc32_psize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(
+ expected);
+
+ if (!non_fcrc32_psize) {
+ if (fcrc32_psize != 5) {
+ return false;
+ }
+ } else if (fcrc32_psize != non_fcrc32_psize) {
+ return false;
+ }
+
+ return true;
+ }
+ /** Whether both fsp flags are equivalent */
+ static bool is_flags_equal(ulint flags, ulint expected)
+ {
+ if (!((flags ^ expected) & ~(1U << FSP_FLAGS_POS_RESERVED))) {
+ return true;
+ }
+
+ return full_crc32(flags)
+ ? is_flags_full_crc32_equal(flags, expected)
+ : is_flags_non_full_crc32_equal(flags, expected);
+ }
+ /** Validate the tablespace flags for full crc32 format.
+ @param[in] flags the content of FSP_SPACE_FLAGS
+ @return whether the flags are correct in full crc32 format */
+ static bool is_fcrc32_valid_flags(ulint flags)
+ {
+ ut_ad(flags & FSP_FLAGS_FCRC32_MASK_MARKER);
+ const ulint page_ssize = physical_size(flags);
+ if (page_ssize < 3 || page_ssize & 8) {
+ return false;
+ }
+
+ flags >>= FSP_FLAGS_FCRC32_POS_COMPRESSED_ALGO;
+
+ return flags <= PAGE_ALGORITHM_LAST;
+ }
+ /** Validate the tablespace flags.
+ @param[in] flags content of FSP_SPACE_FLAGS
+ @param[in] is_ibd whether this is an .ibd file
+ (not system tablespace)
+ @return whether the flags are correct. */
+ static bool is_valid_flags(ulint flags, bool is_ibd)
+ {
+ DBUG_EXECUTE_IF("fsp_flags_is_valid_failure",
+ return false;);
+
+ if (full_crc32(flags)) {
+ return is_fcrc32_valid_flags(flags);
+ }
+
+ if (flags == 0) {
+ return true;
+ }
+
+ if (flags & ~FSP_FLAGS_MASK) {
+ return false;
+ }
+
+ if ((flags & (FSP_FLAGS_MASK_POST_ANTELOPE
+ | FSP_FLAGS_MASK_ATOMIC_BLOBS))
+ == FSP_FLAGS_MASK_ATOMIC_BLOBS) {
+ /* If the "atomic blobs" flag (indicating
+ ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED) flag
+ is set, then the "post Antelope"
+ (ROW_FORMAT!=REDUNDANT) flag must also be set. */
+ return false;
+ }
+
+ /* Bits 10..14 should be 0b0000d where d is the DATA_DIR flag
+ of MySQL 5.6 and MariaDB 10.0, which we ignore.
+ In the buggy FSP_SPACE_FLAGS written by MariaDB 10.1.0 to 10.1.20,
+ bits 10..14 would be nonzero 0bsssaa where sss is
+ nonzero PAGE_SSIZE (3, 4, 6, or 7)
+ and aa is ATOMIC_WRITES (not 0b11). */
+ if (FSP_FLAGS_GET_RESERVED(flags) & ~1U) {
+ return false;
+ }
+
+ const ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
+ if (ssize == 1 || ssize == 2 || ssize == 5 || ssize & 8) {
+ /* the page_size is not between 4k and 64k;
+ 16k should be encoded as 0, not 5 */
+ return false;
+ }
+
+ const ulint zssize = FSP_FLAGS_GET_ZIP_SSIZE(flags);
+ if (zssize == 0) {
+ /* not ROW_FORMAT=COMPRESSED */
+ } else if (zssize > (ssize ? ssize : 5)) {
+ /* Invalid KEY_BLOCK_SIZE */
+ return false;
+ } else if (~flags & (FSP_FLAGS_MASK_POST_ANTELOPE
+ | FSP_FLAGS_MASK_ATOMIC_BLOBS)) {
+ /* both these flags should be set for
+ ROW_FORMAT=COMPRESSED */
+ return false;
+ }
+
+ /* The flags do look valid. But, avoid misinterpreting
+ buggy MariaDB 10.1 format flags for
+ PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL={0,2,3}
+ as valid-looking PAGE_SSIZE if this is known to be
+ an .ibd file and we are using the default innodb_page_size=16k. */
+ return(ssize == 0 || !is_ibd
+ || srv_page_size != UNIV_PAGE_SIZE_ORIG);
+ }
};
+#ifndef UNIV_INNOCHECKSUM
/** Value of fil_space_t::magic_n */
#define FIL_SPACE_MAGIC_N 89472
@@ -349,6 +596,8 @@ struct fil_node_t {
pfs_os_file_t handle;
/** whether the file actually is a raw device or disk partition */
bool is_raw_disk;
+ /** whether the file is on non-rotational media (SSD) */
+ bool on_ssd;
/** size of the file in database pages (0 if not known yet);
the possible last incomplete megabyte may be ignored
if space->id == 0 */
@@ -391,6 +640,14 @@ struct fil_node_t {
@return whether the page was found valid */
bool read_page0(bool first);
+ /** Determine some file metadata when creating or reading the file.
+ @param file the file that is being created, or OS_FILE_CLOSED */
+ void find_metadata(os_file_t file = OS_FILE_CLOSED
+#ifndef _WIN32
+ , struct stat* statbuf = NULL
+#endif
+ );
+
/** Close the file handle. */
void close();
};
@@ -398,6 +655,24 @@ struct fil_node_t {
/** Value of fil_node_t::magic_n */
#define FIL_NODE_MAGIC_N 89389
+inline void fil_space_t::set_imported()
+{
+ ut_ad(purpose == FIL_TYPE_IMPORT);
+ purpose = FIL_TYPE_TABLESPACE;
+ UT_LIST_GET_FIRST(chain)->find_metadata();
+}
+
+inline bool fil_space_t::is_rotational() const
+{
+ for (const fil_node_t* node = UT_LIST_GET_FIRST(chain);
+ node != NULL; node = UT_LIST_GET_NEXT(chain, node)) {
+ if (!node->on_ssd) {
+ return true;
+ }
+ }
+ return false;
+}
+
/** Common InnoDB file extensions */
enum ib_extention {
NO_EXT = 0,
@@ -436,19 +711,12 @@ typedef byte fil_faddr_t; /*!< 'type' definition in C: an address
#define FIL_ADDR_BYTE 4U /* then comes 2-byte byte offset within page*/
#define FIL_ADDR_SIZE 6U /* address size is 6 bytes */
-#ifndef UNIV_INNOCHECKSUM
-
/** File space address */
struct fil_addr_t {
ulint page; /*!< page number within a space */
ulint boffset; /*!< byte offset within the page */
};
-/** The null file address */
-extern const fil_addr_t fil_addr_null;
-
-#endif /* !UNIV_INNOCHECKSUM */
-
/** The byte offsets on a file page for various variables @{ */
#define FIL_PAGE_SPACE_OR_CHKSUM 0 /*!< in < MySQL-4.0.14 space id the
page belongs to (== 0) but in later
@@ -489,19 +757,19 @@ extern const fil_addr_t fil_addr_null;
MySQL/InnoDB 5.1.7 or later, the
contents of this field is valid
for all uncompressed pages. */
-#define FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION 26U /*!< for the first page
- in a system tablespace data file
- (ibdata*, not *.ibd): the file has
- been flushed to disk at least up
- to this lsn
- for other pages: a 32-bit key version
- used to encrypt the page + 32-bit checksum
- or 64 bits of zero if no encryption
- */
+
+/** For the first page in a system tablespace data file(ibdata*, not *.ibd):
+the file has been flushed to disk at least up to this lsn
+For other pages: 32-bit key version used to encrypt the page + 32-bit checksum
+or 64 bites of zero if no encryption */
+#define FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION 26U
/** This overloads FIL_PAGE_FILE_FLUSH_LSN for RTREE Split Sequence Number */
#define FIL_RTREE_SPLIT_SEQ_NUM FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+/** Start of the page_compressed content */
+#define FIL_PAGE_COMP_ALGO FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+
/** starting from 4.1.x this contains the space id of the page */
#define FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID 34U
@@ -509,25 +777,45 @@ extern const fil_addr_t fil_addr_null;
#define FIL_PAGE_DATA 38U /*!< start of the data on the page */
-/* Following are used when page compression is used */
-#define FIL_PAGE_COMPRESSED_SIZE 2 /*!< Number of bytes used to store
- actual payload data size on
- compressed pages. */
-#define FIL_PAGE_COMPRESSION_METHOD_SIZE 2
- /*!< Number of bytes used to store
- actual compression method. */
+/** 32-bit key version used to encrypt the page in full_crc32 format.
+For non-encrypted page, it contains 0. */
+#define FIL_PAGE_FCRC32_KEY_VERSION 0
+
+/** page_compressed without innodb_checksum_algorithm=full_crc32 @{ */
+/** Number of bytes used to store actual payload data size on
+page_compressed pages when not using full_crc32. */
+#define FIL_PAGE_COMP_SIZE 0
+
+/** Number of bytes for FIL_PAGE_COMP_SIZE */
+#define FIL_PAGE_COMP_METADATA_LEN 2
+
+/** Number of bytes used to store actual compression method
+for encrypted tables when not using full_crc32. */
+#define FIL_PAGE_ENCRYPT_COMP_ALGO 2
+
+/** Extra header size for encrypted page_compressed pages when
+not using full_crc32 */
+#define FIL_PAGE_ENCRYPT_COMP_METADATA_LEN 4
/* @} */
+
/** File page trailer @{ */
#define FIL_PAGE_END_LSN_OLD_CHKSUM 8 /*!< the low 4 bytes of this are used
to store the page checksum, the
last 4 bytes should be identical
to the last 4 bytes of FIL_PAGE_LSN */
#define FIL_PAGE_DATA_END 8 /*!< size of the page trailer */
+
+/** Store the last 4 bytes of FIL_PAGE_LSN */
+#define FIL_PAGE_FCRC32_END_LSN 8
+
+/** Store crc32 checksum at the end of the page */
+#define FIL_PAGE_FCRC32_CHECKSUM 4
/* @} */
/** File page types (values of FIL_PAGE_TYPE) @{ */
-#define FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED 37401 /*!< Page is compressed and
- then encrypted */
+/** page_compressed, encrypted=YES (not used for full_crc32) */
+#define FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED 37401
+/** page_compressed (not used for full_crc32) */
#define FIL_PAGE_PAGE_COMPRESSED 34354 /*!< page compressed page */
#define FIL_PAGE_INDEX 17855 /*!< B-tree node */
#define FIL_PAGE_RTREE 17854 /*!< R-tree node (SPATIAL INDEX) */
@@ -560,6 +848,12 @@ extern const fil_addr_t fil_addr_null;
Note: FIL_PAGE_TYPE_INSTANT maps to the same as FIL_PAGE_INDEX. */
#define FIL_PAGE_TYPE_LAST FIL_PAGE_TYPE_UNKNOWN
/*!< Last page type */
+/** Set in FIL_PAGE_TYPE if for full_crc32 pages in page_compressed format.
+If the flag is set, then the following holds for the remaining bits
+of FIL_PAGE_TYPE:
+Bits 0..7 will contain the compressed page size in bytes.
+Bits 8..14 are reserved and must be 0. */
+#define FIL_PAGE_COMPRESS_FCRC32_MARKER 15
/* @} */
/** @return whether the page type is B-tree or R-tree index */
@@ -644,6 +938,22 @@ struct fil_system_t {
private:
bool m_initialised;
+#ifdef UNIV_LINUX
+ /** available block devices that reside on non-rotational storage */
+ std::vector<dev_t> ssd;
+public:
+ /** @return whether a file system device is on non-rotational storage */
+ bool is_ssd(dev_t dev) const
+ {
+ /* Linux seems to allow up to 15 partitions per block device.
+ If the detected ssd carries "partition number 0" (it is the whole device),
+ compare the candidate file system number without the partition number. */
+ for (const auto s : ssd)
+ if (dev == s || (dev & ~15U) == s)
+ return true;
+ return false;
+ }
+#endif
public:
ib_mutex_t mutex; /*!< The mutex protecting the cache */
fil_space_t* sys_space; /*!< The innodb_system tablespace */
@@ -756,11 +1066,12 @@ fil_space_free(
bool x_latched);
/** Set the recovered size of a tablespace in pages.
-@param id tablespace ID
-@param size recovered size in pages */
+@param id tablespace ID
+@param size recovered size in pages
+@param flags tablespace flags */
UNIV_INTERN
-void
-fil_space_set_recv_size(ulint id, ulint size);
+void fil_space_set_recv_size_and_flags(ulint id, ulint size, uint32_t flags);
+
/*******************************************************************//**
Returns the size of the space in pages. The tablespace must be cached in the
memory cache.
@@ -778,16 +1089,6 @@ fil_space_get_flags(
/*================*/
ulint id); /*!< in: space id */
-/** Returns the page size of the space and whether it is compressed or not.
-The tablespace must be cached in the memory cache.
-@param[in] id space id
-@param[out] found true if tablespace was found
-@return page size */
-const page_size_t
-fil_space_get_page_size(
- ulint id,
- bool* found);
-
/*******************************************************************//**
Opens all log files and system tablespace data files. They stay open until the
database server shutdown. This should be called at a server startup after the
@@ -832,10 +1133,8 @@ for concurrency control.
@param[in] id tablespace ID
@param[in] silent whether to silently ignore missing tablespaces
@return the tablespace
-@retval NULL if missing or being deleted or truncated */
-UNIV_INTERN
-fil_space_t*
-fil_space_acquire_low(ulint id, bool silent)
+@retval NULL if missing or being deleted */
+fil_space_t* fil_space_acquire_low(ulint id, bool silent)
MY_ATTRIBUTE((warn_unused_result));
/** Acquire a tablespace when it could be dropped concurrently.
@@ -872,13 +1171,6 @@ when it could be dropped concurrently.
fil_space_t*
fil_space_acquire_for_io(ulint id);
-/********************************************************//**
-Creates the database directory for a table if it does not exist yet. */
-void
-fil_create_directory_for_tablename(
-/*===============================*/
- const char* name); /*!< in: name in the standard
- 'databasename/tablename' format */
/** Replay a file rename operation if possible.
@param[in] space_id tablespace identifier
@param[in] first_page_no first page number in the file
@@ -1043,21 +1335,6 @@ fil_ibd_load(
MY_ATTRIBUTE((warn_unused_result));
-/***********************************************************************//**
-A fault-tolerant function that tries to read the next file name in the
-directory. We retry 100 times if os_file_readdir_next_file() returns -1. The
-idea is to read as much good data as we can and jump over bad data.
-@return 0 if ok, -1 if error even after the retries, 1 if at the end
-of the directory */
-int
-fil_file_readdir_next_file(
-/*=======================*/
- dberr_t* err, /*!< out: this is set to DB_ERROR if an error
- was encountered, otherwise not changed */
- const char* dirname,/*!< in: directory name or path */
- os_file_dir_t dir, /*!< in: directory stream */
- os_file_stat_t* info); /*!< in/out: buffer where the
- info is returned */
/** Determine if a matching tablespace exists in the InnoDB tablespace
memory cache. Note that if we have not done a crash recovery at the database
startup, there may be many tablespaces which are not yet in the memory cache.
@@ -1086,7 +1363,7 @@ fil_space_extend(
@param[in] type IO context
@param[in] sync true if synchronous aio is desired
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] byte_offset remainder of offset in bytes; in aio this
must be divisible by the OS block size
@param[in] len how many bytes to read or write; this must
@@ -1098,14 +1375,14 @@ fil_space_extend(
@param[in] message message for aio handler if non-sync aio
used, else ignored
@param[in] ignore_missing_space true=ignore missing space during read
-@return DB_SUCCESS, DB_TABLESPACE_DELETED or DB_TABLESPACE_TRUNCATED
+@return DB_SUCCESS, or DB_TABLESPACE_DELETED
if we are trying to do i/o on a tablespace which does not exist */
dberr_t
fil_io(
const IORequest& type,
bool sync,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
ulint byte_offset,
ulint len,
void* buf,
diff --git a/storage/innobase/include/fil0fil.inl b/storage/innobase/include/fil0fil.inl
index 31466f38546..24e4157d1f3 100644
--- a/storage/innobase/include/fil0fil.inl
+++ b/storage/innobase/include/fil0fil.inl
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, 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
@@ -75,17 +75,25 @@ fil_get_page_type_name(
}
}
-/****************************************************************//**
-Validate page type.
+#ifdef UNIV_DEBUG
+/** Validate page type.
+@param[in] space Tablespace object
+@param[in] page page to validate
@return true if valid, false if not */
UNIV_INLINE
bool
fil_page_type_validate(
- const byte* page) /*!< in: page */
+ fil_space_t* space,
+ const byte* page)
{
-#ifdef UNIV_DEBUG
ulint page_type = mach_read_from_2(page + FIL_PAGE_TYPE);
+ if ((page_type & 1U << FIL_PAGE_COMPRESS_FCRC32_MARKER)
+ && space->full_crc32()
+ && space->is_compressed()) {
+ return true;
+ }
+
/* Validate page type */
if (!((page_type == FIL_PAGE_PAGE_COMPRESSED ||
page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED ||
@@ -106,25 +114,31 @@ fil_page_type_validate(
page_type == FIL_PAGE_TYPE_ZBLOB2 ||
page_type == FIL_PAGE_TYPE_UNKNOWN))) {
- ulint space = mach_read_from_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+ ulint space_id = mach_read_from_4(
+ page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+
ulint offset = mach_read_from_4(page + FIL_PAGE_OFFSET);
- fil_system_enter();
- fil_space_t* rspace = fil_space_get_by_id(space);
- fil_system_exit();
+
+ ulint key_version = mach_read_from_4(
+ page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+
+ if (space && space->full_crc32()) {
+ key_version = mach_read_from_4(
+ page + FIL_PAGE_FCRC32_KEY_VERSION);
+ }
/* Dump out the page info */
- ib::fatal() << "Page " << space << ":" << offset
- << " name " << (rspace ? rspace->name : "???")
+ ib::fatal() << "Page " << space_id << ":" << offset
+ << " name " << (space ? space->name : "???")
<< " page_type " << page_type
- << " key_version "
- << mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION)
+ << " key_version " << key_version
<< " lsn " << mach_read_from_8(page + FIL_PAGE_LSN)
<< " compressed_len " << mach_read_from_2(page + FIL_PAGE_DATA);
return false;
}
-#endif /* UNIV_DEBUG */
return true;
}
+#endif /* UNIV_DEBUG */
#endif /* fil0fil_ic */
diff --git a/storage/innobase/include/fil0pagecompress.h b/storage/innobase/include/fil0pagecompress.h
index 545e05da769..c513a94c799 100644
--- a/storage/innobase/include/fil0pagecompress.h
+++ b/storage/innobase/include/fil0pagecompress.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (C) 2013, 2018 MariaDB Corporation.
+Copyright (C) 2013, 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
@@ -33,21 +33,29 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
/** Compress a page_compressed page before writing to a data file.
@param[in] buf page to be compressed
@param[out] out_buf compressed page
-@param[in] level compression level
+@param[in] flags tablespace flags
@param[in] block_size file system block size
@param[in] encrypted whether the page will be subsequently encrypted
@return actual length of compressed page
@retval 0 if the page was not compressed */
-ulint fil_page_compress(const byte* buf, byte* out_buf, ulint level,
- ulint block_size, bool encrypted)
+ulint fil_page_compress(
+ const byte* buf,
+ byte* out_buf,
+ ulint flags,
+ ulint block_size,
+ bool encrypted)
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Decompress a page that may be subject to page_compressed compression.
@param[in,out] tmp_buf temporary buffer (of innodb_page_size)
@param[in,out] buf compressed page buffer
+@param[in] flags tablespace flags
@return size of the compressed data
@retval 0 if decompression failed
@retval srv_page_size if the page was not compressed */
-ulint fil_page_decompress(byte* tmp_buf, byte* buf)
+ulint fil_page_decompress(
+ byte* tmp_buf,
+ byte* buf,
+ ulint flags)
MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif
diff --git a/storage/innobase/include/fsp0file.h b/storage/innobase/include/fsp0file.h
index 8c5b24fbadb..15485769429 100644
--- a/storage/innobase/include/fsp0file.h
+++ b/storage/innobase/include/fsp0file.h
@@ -504,13 +504,13 @@ public:
/* No op - base constructor is called. */
}
- ~RemoteDatafile()
+ ~RemoteDatafile() override
{
shutdown();
}
/** Release the resources. */
- void shutdown();
+ void shutdown() override;
/** Get the link filepath.
@return m_link_filepath */
@@ -532,7 +532,7 @@ public:
in read-only mode so that it can be validated.
@param[in] strict whether to issue error messages
@return DB_SUCCESS or error code */
- dberr_t open_read_only(bool strict);
+ dberr_t open_read_only(bool strict) override;
/** Opens a handle to the file linked to in an InnoDB Symbolic Link
file in read-write mode so that it can be restored from doublewrite
@@ -540,7 +540,7 @@ public:
@param[in] read_only_mode If true, then readonly mode checks
are enforced.
@return DB_SUCCESS or error code */
- dberr_t open_read_write(bool read_only_mode)
+ dberr_t open_read_write(bool read_only_mode) override
MY_ATTRIBUTE((warn_unused_result));
/******************************************************************
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index eff1b4ab4ae..16d3274e481 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -28,15 +28,15 @@ Created 12/18/1995 Heikki Tuuri
#define fsp0fsp_h
#include "fsp0types.h"
+#include "fut0lst.h"
+#include "ut0byte.h"
#ifndef UNIV_INNOCHECKSUM
-
-#include "fut0lst.h"
#include "mtr0mtr.h"
#include "page0types.h"
#include "rem0types.h"
-#include "ut0byte.h"
-
+#else
+# include "mach0data.h"
#endif /* !UNIV_INNOCHECKSUM */
/** @return the PAGE_SSIZE flags for the current innodb_page_size */
@@ -45,6 +45,12 @@ Created 12/18/1995 Heikki Tuuri
0U : (srv_page_size_shift - UNIV_ZIP_SIZE_SHIFT_MIN + 1) \
<< FSP_FLAGS_POS_PAGE_SSIZE)
+/** @return the PAGE_SSIZE flags for the current innodb_page_size in
+full checksum format */
+#define FSP_FLAGS_FCRC32_PAGE_SSIZE() \
+ ((srv_page_size_shift - UNIV_ZIP_SIZE_SHIFT_MIN + 1) \
+ << FSP_FLAGS_FCRC32_POS_PAGE_SSIZE)
+
/* @defgroup Compatibility macros for MariaDB 10.1.0 through 10.1.20;
see the table in fsp0types.h @{ */
/** Zero relative shift position of the PAGE_COMPRESSION field */
@@ -201,11 +207,6 @@ typedef byte fseg_inode_t;
(16 + 3 * FLST_BASE_NODE_SIZE \
+ FSEG_FRAG_ARR_N_SLOTS * FSEG_FRAG_SLOT_SIZE)
-#define FSP_SEG_INODES_PER_PAGE(page_size) \
- ((page_size.physical() - FSEG_ARR_OFFSET - 10) / FSEG_INODE_SIZE)
- /* Number of segment inodes which fit on a
- single page */
-
#define FSEG_MAGIC_N_VALUE 97937874
#define FSEG_FILLFACTOR 8 /* If this value is x, then if
@@ -290,33 +291,6 @@ the extent are free and which contain old tuple version to clean. */
#ifndef UNIV_INNOCHECKSUM
/* @} */
-/** Calculate the number of pages to extend a datafile.
-We extend single-table tablespaces first one extent at a time,
-but 4 at a time for bigger tablespaces. It is not enough to extend always
-by one extent, because we need to add at least one extent to FSP_FREE.
-A single extent descriptor page will track many extents. And the extent
-that uses its extent descriptor page is put onto the FSP_FREE_FRAG list.
-Extents that do not use their extent descriptor page are added to FSP_FREE.
-The physical page size is used to determine how many extents are tracked
-on one extent descriptor page. See xdes_calc_descriptor_page().
-@param[in] page_size page_size of the datafile
-@param[in] size current number of pages in the datafile
-@return number of pages to extend the file. */
-ulint
-fsp_get_pages_to_extend_ibd(
- const page_size_t& page_size,
- ulint size);
-
-/** Calculate the number of physical pages in an extent for this file.
-@param[in] page_size page_size of the datafile
-@return number of pages in an extent for this file. */
-UNIV_INLINE
-ulint
-fsp_get_extent_size_in_pages(const page_size_t& page_size)
-{
- return (FSP_EXTENT_SIZE << srv_page_size_shift) / page_size.physical();
-}
-
/**********************************************************************//**
Reads the space id from the first page of a tablespace.
@return space id, ULINT UNDEFINED if error */
@@ -347,13 +321,15 @@ fsp_header_get_flags(const page_t* page)
}
/** Get the byte offset of encryption information in page 0.
-@param[in] ps page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@return byte offset relative to FSP_HEADER_OFFSET */
inline MY_ATTRIBUTE((pure, warn_unused_result))
-ulint
-fsp_header_get_encryption_offset(const page_size_t& ps)
+ulint fsp_header_get_encryption_offset(ulint zip_size)
{
- return XDES_ARR_OFFSET + XDES_SIZE * ps.physical() / FSP_EXTENT_SIZE;
+ return zip_size
+ ? XDES_ARR_OFFSET + XDES_SIZE * zip_size / FSP_EXTENT_SIZE
+ : XDES_ARR_OFFSET + (XDES_SIZE << srv_page_size_shift)
+ / FSP_EXTENT_SIZE;
}
/** Check the encryption key from the first page of a tablespace.
@@ -504,12 +480,14 @@ fsp_reserve_free_extents(
@param[in,out] seg_header file segment header
@param[in,out] space tablespace
@param[in] offset page number
+@param[in] log whether to write MLOG_INIT_FREE_PAGE record
@param[in,out] mtr mini-transaction */
void
fseg_free_page(
fseg_header_t* seg_header,
fil_space_t* space,
ulint offset,
+ bool log,
mtr_t* mtr);
/** Determine whether a page is free.
@param[in,out] space tablespace
@@ -583,13 +561,12 @@ fil_block_check_type(
/** Checks if a page address is an extent descriptor page address.
@param[in] page_id page id
-@param[in] page_size page size
-@return TRUE if a descriptor page */
-UNIV_INLINE
-ibool
-fsp_descr_page(
- const page_id_t page_id,
- const page_size_t& page_size);
+@param[in] physical_size page size
+@return whether a descriptor page */
+inline bool fsp_descr_page(const page_id_t page_id, ulint physical_size)
+{
+ return (page_id.page_no() & (physical_size - 1)) == FSP_XDES_OFFSET;
+}
/** Initialize a file page whose prior contents should be ignored.
@param[in,out] block buffer pool block */
@@ -636,7 +613,7 @@ fsp_flags_convert_from_101(ulint flags)
{
DBUG_EXECUTE_IF("fsp_flags_is_valid_failure",
return(ULINT_UNDEFINED););
- if (flags == 0) {
+ if (flags == 0 || fil_space_t::full_crc32(flags)) {
return(flags);
}
@@ -731,7 +708,7 @@ fsp_flags_convert_from_101(ulint flags)
flags = ((flags & 0x3f) | ssize << FSP_FLAGS_POS_PAGE_SSIZE
| FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags)
<< FSP_FLAGS_POS_PAGE_COMPRESSION);
- ut_ad(fsp_flags_is_valid(flags, false));
+ ut_ad(fil_space_t::is_valid_flags(flags, false));
return(flags);
}
@@ -745,7 +722,7 @@ bool
fsp_flags_match(ulint expected, ulint actual)
{
expected &= ~FSP_FLAGS_MEM_MASK;
- ut_ad(fsp_flags_is_valid(expected, false));
+ ut_ad(fil_space_t::is_valid_flags(expected, false));
if (actual == expected) {
return(true);
@@ -755,16 +732,6 @@ fsp_flags_match(ulint expected, ulint actual)
return(actual == expected);
}
-/** Calculates the descriptor index within a descriptor page.
-@param[in] page_size page size
-@param[in] offset page offset
-@return descriptor index */
-UNIV_INLINE
-ulint
-xdes_calc_descriptor_index(
- const page_size_t& page_size,
- ulint offset);
-
/**********************************************************************//**
Gets a descriptor bit of a page.
@return TRUE if free */
@@ -777,15 +744,42 @@ xdes_get_bit(
ulint offset);/*!< in: page offset within extent:
0 ... FSP_EXTENT_SIZE - 1 */
-/** Calculates the page where the descriptor of a page resides.
-@param[in] page_size page size
+/** Determine the descriptor index within a descriptor page.
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@param[in] offset page offset
+@return descriptor index */
+inline ulint xdes_calc_descriptor_index(ulint zip_size, ulint offset)
+{
+ return ut_2pow_remainder<ulint>(offset,
+ zip_size ? zip_size : srv_page_size)
+ / FSP_EXTENT_SIZE;
+}
+
+/** Determine the descriptor page number for a page.
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] offset page offset
@return descriptor page offset */
-UNIV_INLINE
-ulint
-xdes_calc_descriptor_page(
- const page_size_t& page_size,
- ulint offset);
+inline ulint xdes_calc_descriptor_page(ulint zip_size, ulint offset)
+{
+ compile_time_assert(UNIV_PAGE_SIZE_MAX > XDES_ARR_OFFSET
+ + (UNIV_PAGE_SIZE_MAX / FSP_EXTENT_SIZE_MAX)
+ * XDES_SIZE_MAX);
+ compile_time_assert(UNIV_PAGE_SIZE_MIN > XDES_ARR_OFFSET
+ + (UNIV_PAGE_SIZE_MIN / FSP_EXTENT_SIZE_MIN)
+ * XDES_SIZE_MIN);
+
+ ut_ad(srv_page_size > XDES_ARR_OFFSET
+ + (srv_page_size / FSP_EXTENT_SIZE)
+ * XDES_SIZE);
+ ut_ad(UNIV_ZIP_SIZE_MIN > XDES_ARR_OFFSET
+ + (UNIV_ZIP_SIZE_MIN / FSP_EXTENT_SIZE)
+ * XDES_SIZE);
+ ut_ad(!zip_size
+ || zip_size > XDES_ARR_OFFSET
+ + (zip_size / FSP_EXTENT_SIZE) * XDES_SIZE);
+ return ut_2pow_round<ulint>(offset,
+ zip_size ? zip_size : srv_page_size);
+}
#endif /* UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/include/fsp0fsp.inl b/storage/innobase/include/fsp0fsp.inl
index 9f28aacaff5..31b9d8c5dbe 100644
--- a/storage/innobase/include/fsp0fsp.inl
+++ b/storage/innobase/include/fsp0fsp.inl
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2017, MariaDB Corporation.
+Copyright (c) 2013, 2019, 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
@@ -24,37 +24,6 @@ File space management
Created 12/18/1995 Heikki Tuuri
*******************************************************/
-#ifndef UNIV_INNOCHECKSUM
-
-/** Checks if a page address is an extent descriptor page address.
-@param[in] page_id page id
-@param[in] page_size page size
-@return TRUE if a descriptor page */
-UNIV_INLINE
-ibool
-fsp_descr_page(
- const page_id_t page_id,
- const page_size_t& page_size)
-{
- return((page_id.page_no() & (page_size.physical() - 1))
- == FSP_XDES_OFFSET);
-}
-
-/** Calculates the descriptor index within a descriptor page.
-@param[in] page_size page size
-@param[in] offset page offset
-@return descriptor index */
-UNIV_INLINE
-ulint
-xdes_calc_descriptor_index(
- const page_size_t& page_size,
- ulint offset)
-{
- return(ut_2pow_remainder(offset, page_size.physical())
- / FSP_EXTENT_SIZE);
-}
-#endif /*!UNIV_INNOCHECKSUM */
-
/**********************************************************************//**
Gets a descriptor bit of a page.
@return TRUE if free */
@@ -75,44 +44,5 @@ xdes_get_bit(
ulint bit_index = index % 8;
ulint byte_index = index / 8;
- return(ut_bit_get_nth(
- mach_read_ulint(descr + XDES_BITMAP + byte_index,
- MLOG_1BYTE),
- bit_index));
-}
-
-#ifndef UNIV_INNOCHECKSUM
-/** Calculates the page where the descriptor of a page resides.
-@param[in] page_size page size
-@param[in] offset page offset
-@return descriptor page offset */
-UNIV_INLINE
-ulint
-xdes_calc_descriptor_page(
- const page_size_t& page_size,
- ulint offset)
-{
- compile_time_assert(UNIV_PAGE_SIZE_MAX > XDES_ARR_OFFSET
- + (UNIV_PAGE_SIZE_MAX / FSP_EXTENT_SIZE_MAX)
- * XDES_SIZE_MAX);
- compile_time_assert(UNIV_PAGE_SIZE_MIN > XDES_ARR_OFFSET
- + (UNIV_PAGE_SIZE_MIN / FSP_EXTENT_SIZE_MIN)
- * XDES_SIZE_MIN);
-
- ut_ad(srv_page_size > XDES_ARR_OFFSET
- + (srv_page_size / FSP_EXTENT_SIZE)
- * XDES_SIZE);
- ut_ad(UNIV_ZIP_SIZE_MIN > XDES_ARR_OFFSET
- + (UNIV_ZIP_SIZE_MIN / FSP_EXTENT_SIZE)
- * XDES_SIZE);
-
-#ifdef UNIV_DEBUG
- if (page_size.is_compressed()) {
- ut_a(page_size.physical() > XDES_ARR_OFFSET
- + (page_size.physical() / FSP_EXTENT_SIZE) * XDES_SIZE);
- }
-#endif /* UNIV_DEBUG */
-
- return(ut_2pow_round(offset, page_size.physical()));
+ return ut_bit_get_nth(descr[XDES_BITMAP + byte_index], bit_index);
}
-#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/include/fsp0pagecompress.h b/storage/innobase/include/fsp0pagecompress.h
index f16b7d29bc0..34a132582c6 100644
--- a/storage/innobase/include/fsp0pagecompress.h
+++ b/storage/innobase/include/fsp0pagecompress.h
@@ -27,17 +27,6 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
#ifndef fsp0pagecompress_h
#define fsp0pagecompress_h
-/* Supported page compression methods */
-
-#define PAGE_UNCOMPRESSED 0
-#define PAGE_ZLIB_ALGORITHM 1
-#define PAGE_LZ4_ALGORITHM 2
-#define PAGE_LZO_ALGORITHM 3
-#define PAGE_LZMA_ALGORITHM 4
-#define PAGE_BZIP2_ALGORITHM 5
-#define PAGE_SNAPPY_ALGORITHM 6
-#define PAGE_ALGORITHM_LAST PAGE_SNAPPY_ALGORITHM
-
/**********************************************************************//**
Reads the page compression level from the first page of a tablespace.
@return page compression level, or 0 if uncompressed */
diff --git a/storage/innobase/include/fsp0space.h b/storage/innobase/include/fsp0space.h
index 5bd70e4f80d..632c65e14cc 100644
--- a/storage/innobase/include/fsp0space.h
+++ b/storage/innobase/include/fsp0space.h
@@ -127,7 +127,7 @@ public:
@param[in] fsp_flags tablespace flags */
void set_flags(ulint fsp_flags)
{
- ut_ad(fsp_flags_is_valid(fsp_flags, false));
+ ut_ad(fil_space_t::is_valid_flags(fsp_flags, false));
m_flags = fsp_flags;
}
diff --git a/storage/innobase/include/fsp0sysspace.h b/storage/innobase/include/fsp0sysspace.h
index d3a79ec23a9..bcb8dd5e5e9 100644
--- a/storage/innobase/include/fsp0sysspace.h
+++ b/storage/innobase/include/fsp0sysspace.h
@@ -49,7 +49,7 @@ public:
/* No op */
}
- ~SysTablespace()
+ ~SysTablespace() override
{
shutdown();
}
diff --git a/storage/innobase/include/fsp0types.h b/storage/innobase/include/fsp0types.h
index 5c77b62723a..69c5346a4f9 100644
--- a/storage/innobase/include/fsp0types.h
+++ b/storage/innobase/include/fsp0types.h
@@ -27,10 +27,6 @@ Created May 26, 2009 Vasil Dimov
#ifndef fsp0types_h
#define fsp0types_h
-#include "univ.i"
-
-#ifndef UNIV_INNOCHECKSUM
-
/** The fil_space_t::id of the redo log. All persistent tablespaces
have a smaller fil_space_t::id. */
#define SRV_LOG_SPACE_FIRST_ID 0xFFFFFFF0U
@@ -39,6 +35,16 @@ have a smaller fil_space_t::id. */
#include "ut0byte.h"
+/* Possible values of innodb_compression_algorithm */
+#define PAGE_UNCOMPRESSED 0
+#define PAGE_ZLIB_ALGORITHM 1
+#define PAGE_LZ4_ALGORITHM 2
+#define PAGE_LZO_ALGORITHM 3
+#define PAGE_LZMA_ALGORITHM 4
+#define PAGE_BZIP2_ALGORITHM 5
+#define PAGE_SNAPPY_ALGORITHM 6
+#define PAGE_ALGORITHM_LAST PAGE_SNAPPY_ALGORITHM
+
/** @name Flags for inserting records in order
If records are inserted in order, there are the following
flags to tell this (their type is made byte for the compiler
@@ -50,7 +56,6 @@ fseg_alloc_free_page) */
#define FSP_NO_DIR ((byte)113) /*!< no order */
/* @} */
-#endif /* !UNIV_INNOCHECKSUM */
/** File space extent size in pages
page size | file space extent size
----------+-----------------------
@@ -73,7 +78,6 @@ page size | file space extent size
offset */
#define FSEG_PAGE_DATA FIL_PAGE_DATA
-#ifndef UNIV_INNOCHECKSUM
/** @name File segment header
The file segment header points to the inode describing the file segment. */
/* @{ */
@@ -88,6 +92,7 @@ typedef byte fseg_header_t;
header, in bytes */
/* @} */
+#ifndef UNIV_INNOCHECKSUM
#ifdef UNIV_DEBUG
struct mtr_t;
@@ -224,6 +229,15 @@ to ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT. */
/** A mask of all the known/used bits in FSP_SPACE_FLAGS */
#define FSP_FLAGS_MASK (~(~0U << FSP_FLAGS_WIDTH))
+/** Number of flag bits used to indicate the tablespace page size */
+#define FSP_FLAGS_FCRC32_WIDTH_PAGE_SSIZE 4
+
+/** Marker to indicate whether tablespace is in full checksum format. */
+#define FSP_FLAGS_FCRC32_WIDTH_MARKER 1
+
+/** Stores the compressed algo for full checksum format. */
+#define FSP_FLAGS_FCRC32_WIDTH_COMPRESSED_ALGO 3
+
/* FSP_SPACE_FLAGS position and name in MySQL 5.6/MariaDB 10.0 or older
and MariaDB 10.1.20 or older MariaDB 10.1 and in MariaDB 10.1.21
or newer.
@@ -286,6 +300,19 @@ these are only used in MySQL 5.7 and used for compatibility. */
#define FSP_FLAGS_POS_PAGE_COMPRESSION (FSP_FLAGS_POS_RESERVED \
+ FSP_FLAGS_WIDTH_RESERVED)
+/** Zero relative shift position of the PAGE_SIZE field
+in full crc32 format */
+#define FSP_FLAGS_FCRC32_POS_PAGE_SSIZE 0
+
+/** Zero relative shift position of the MARKER field in full crc32 format. */
+#define FSP_FLAGS_FCRC32_POS_MARKER (FSP_FLAGS_FCRC32_POS_PAGE_SSIZE \
+ + FSP_FLAGS_FCRC32_WIDTH_PAGE_SSIZE)
+
+/** Zero relative shift position of the compressed algorithm stored
+in full crc32 format. */
+#define FSP_FLAGS_FCRC32_POS_COMPRESSED_ALGO (FSP_FLAGS_FCRC32_POS_MARKER \
+ + FSP_FLAGS_FCRC32_WIDTH_MARKER)
+
/** Bit mask of the POST_ANTELOPE field */
#define FSP_FLAGS_MASK_POST_ANTELOPE \
((~(~0U << FSP_FLAGS_WIDTH_POST_ANTELOPE)) \
@@ -315,6 +342,21 @@ these are only used in MySQL 5.7 and used for compatibility. */
#define FSP_FLAGS_MASK_MEM_COMPRESSION_LEVEL \
(15U << FSP_FLAGS_MEM_COMPRESSION_LEVEL)
+/** Bit mask of the PAGE_SIZE field in full crc32 format */
+#define FSP_FLAGS_FCRC32_MASK_PAGE_SSIZE \
+ ((~(~0U << FSP_FLAGS_FCRC32_WIDTH_PAGE_SSIZE)) \
+ << FSP_FLAGS_FCRC32_POS_PAGE_SSIZE)
+
+/** Bit mask of the MARKER field in full crc32 format */
+#define FSP_FLAGS_FCRC32_MASK_MARKER \
+ ((~(~0U << FSP_FLAGS_FCRC32_WIDTH_MARKER)) \
+ << FSP_FLAGS_FCRC32_POS_MARKER)
+
+/** Bit mask of the COMPRESSED ALGO field in full crc32 format */
+#define FSP_FLAGS_FCRC32_MASK_COMPRESSED_ALGO \
+ ((~(~0U << FSP_FLAGS_FCRC32_WIDTH_COMPRESSED_ALGO)) \
+ << FSP_FLAGS_FCRC32_POS_COMPRESSED_ALGO)
+
/** Return the value of the POST_ANTELOPE field */
#define FSP_FLAGS_GET_POST_ANTELOPE(flags) \
((flags & FSP_FLAGS_MASK_POST_ANTELOPE) \
@@ -339,10 +381,14 @@ these are only used in MySQL 5.7 and used for compatibility. */
#define FSP_FLAGS_HAS_PAGE_COMPRESSION(flags) \
((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION) \
>> FSP_FLAGS_POS_PAGE_COMPRESSION)
-
-/** Return the contents of the UNUSED bits */
-#define FSP_FLAGS_GET_UNUSED(flags) \
- (flags >> FSP_FLAGS_POS_UNUSED)
+/** @return the PAGE_SSIZE flags in full crc32 format */
+#define FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags) \
+ ((flags & FSP_FLAGS_FCRC32_MASK_PAGE_SSIZE) \
+ >> FSP_FLAGS_FCRC32_POS_PAGE_SSIZE)
+/** @return the COMPRESSED_ALGO flags in full crc32 format */
+#define FSP_FLAGS_FCRC32_GET_COMPRESSED_ALGO(flags) \
+ ((flags & FSP_FLAGS_FCRC32_MASK_COMPRESSED_ALGO) \
+ >> FSP_FLAGS_FCRC32_POS_COMPRESSED_ALGO)
/** @return the value of the DATA_DIR field */
#define FSP_FLAGS_HAS_DATA_DIR(flags) \
@@ -354,67 +400,4 @@ these are only used in MySQL 5.7 and used for compatibility. */
/* @} */
-/** Validate the tablespace flags, which are stored in the
-tablespace header at offset FSP_SPACE_FLAGS.
-@param[in] flags the contents of FSP_SPACE_FLAGS
-@param[in] is_ibd whether this is an .ibd file (not system tablespace)
-@return whether the flags are correct (not in the buggy 10.1) format */
-MY_ATTRIBUTE((warn_unused_result, const))
-UNIV_INLINE
-bool
-fsp_flags_is_valid(ulint flags, bool is_ibd)
-{
- DBUG_EXECUTE_IF("fsp_flags_is_valid_failure",
- return(false););
- if (flags == 0) {
- return(true);
- }
- if (flags & ~FSP_FLAGS_MASK) {
- return(false);
- }
- if ((flags & (FSP_FLAGS_MASK_POST_ANTELOPE | FSP_FLAGS_MASK_ATOMIC_BLOBS))
- == FSP_FLAGS_MASK_ATOMIC_BLOBS) {
- /* If the "atomic blobs" flag (indicating
- ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED) flag
- is set, then the "post Antelope" (ROW_FORMAT!=REDUNDANT) flag
- must also be set. */
- return(false);
- }
- /* Bits 10..14 should be 0b0000d where d is the DATA_DIR flag
- of MySQL 5.6 and MariaDB 10.0, which we ignore.
- In the buggy FSP_SPACE_FLAGS written by MariaDB 10.1.0 to 10.1.20,
- bits 10..14 would be nonzero 0bsssaa where sss is
- nonzero PAGE_SSIZE (3, 4, 6, or 7)
- and aa is ATOMIC_WRITES (not 0b11). */
- if (FSP_FLAGS_GET_RESERVED(flags) & ~1U) {
- return(false);
- }
-
- const ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
- if (ssize == 1 || ssize == 2 || ssize == 5 || ssize & 8) {
- /* the page_size is not between 4k and 64k;
- 16k should be encoded as 0, not 5 */
- return(false);
- }
- const ulint zssize = FSP_FLAGS_GET_ZIP_SSIZE(flags);
- if (zssize == 0) {
- /* not ROW_FORMAT=COMPRESSED */
- } else if (zssize > (ssize ? ssize : 5)) {
- /* invalid KEY_BLOCK_SIZE */
- return(false);
- } else if (~flags & (FSP_FLAGS_MASK_POST_ANTELOPE
- | FSP_FLAGS_MASK_ATOMIC_BLOBS)) {
- /* both these flags should be set for
- ROW_FORMAT=COMPRESSED */
- return(false);
- }
-
- /* The flags do look valid. But, avoid misinterpreting
- buggy MariaDB 10.1 format flags for
- PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL={0,2,3}
- as valid-looking PAGE_SSIZE if this is known to be
- an .ibd file and we are using the default innodb_page_size=16k. */
- return(ssize == 0 || !is_ibd || srv_page_size != UNIV_PAGE_SIZE_ORIG);
-}
-
#endif /* fsp0types_h */
diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h
index 326734c84c9..d3cfa5b23df 100644
--- a/storage/innobase/include/fts0fts.h
+++ b/storage/innobase/include/fts0fts.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2020, MariaDB Corporation.
+Copyright (c) 2016, 2022, 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
@@ -315,7 +315,7 @@ public:
/** Whether the ADDED table record sync-ed after crash recovery */
unsigned added_synced:1;
- /** Whether the table holds dict_sys->mutex */
+ /** Whether the table holds dict_sys.mutex */
unsigned dict_locked:1;
/** Work queue for scheduling jobs for the FTS 'Add' thread, or NULL
@@ -352,10 +352,10 @@ struct fts_stopword_t;
extern const char* fts_default_stopword[];
/** Variable specifying the maximum FTS cache size for each table */
-extern size_t fts_max_cache_size;
+extern Atomic_relaxed<size_t> fts_max_cache_size;
/** Variable specifying the total memory allocated for FTS cache */
-extern size_t fts_max_total_cache_size;
+extern Atomic_relaxed<size_t> fts_max_total_cache_size;
/** Variable specifying the FTS result cache limit for each query */
extern size_t fts_result_cache_limit;
@@ -372,9 +372,9 @@ extern bool fts_need_sync;
#define fts_que_graph_free(graph) \
do { \
- mutex_enter(&dict_sys->mutex); \
+ mutex_enter(&dict_sys.mutex); \
que_graph_free(graph); \
- mutex_exit(&dict_sys->mutex); \
+ mutex_exit(&dict_sys.mutex); \
} while (0)
/******************************************************************//**
@@ -561,17 +561,15 @@ fts_get_doc_id_from_row(
want to extract.*/
/** Extract the doc id from the record that belongs to index.
-@param[in] table table
-@param[in] rec record contains FTS_DOC_ID
+@param[in] rec record containing FTS_DOC_ID
@param[in] index index of rec
-@param[in] heap heap memory
+@param[in] offsets rec_get_offsets(rec,index)
@return doc id that was extracted from rec */
doc_id_t
fts_get_doc_id_from_rec(
- dict_table_t* table,
- const rec_t* rec,
- const dict_index_t* index,
- mem_heap_t* heap);
+ const rec_t* rec,
+ const dict_index_t* index,
+ const rec_offs* offsets);
/** Add new fts doc id to the update vector.
@param[in] table the table that contains the FTS index.
@@ -725,7 +723,7 @@ FTS auxiliary INDEX table and clear the cache at the end.
dberr_t fts_sync_table(dict_table_t* table, bool wait = true);
/****************************************************************//**
-Free the query graph but check whether dict_sys->mutex is already
+Free the query graph but check whether dict_sys.mutex is already
held */
void
fts_que_graph_free_check_lock(
@@ -916,16 +914,6 @@ fts_check_cached_index(
/*===================*/
dict_table_t* table); /*!< in: Table where indexes are dropped */
-/** Check if the all the auxillary tables associated with FTS index are in
-consistent state. For now consistency is check only by ensuring
-index->page_no != FIL_NULL
-@param[out] base_table table has host fts index
-@param[in,out] trx trx handler */
-void
-fts_check_corrupt(
- dict_table_t* base_table,
- trx_t* trx);
-
/** Fetch the document from tuple, tokenize the text data and
insert the text data into fts auxiliary table and
its cache. Moreover this tuple fields doesn't contain any information
diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h
index 5fd19ed099b..5517f05f1b6 100644
--- a/storage/innobase/include/fts0priv.h
+++ b/storage/innobase/include/fts0priv.h
@@ -135,7 +135,7 @@ fts_eval_sql(
/** Construct the name of an internal FTS table for the given table.
@param[in] fts_table metadata on fulltext-indexed table
@param[out] table_name a name up to MAX_FULL_NAME_LEN
-@param[in] dict_locked whether dict_sys->mutex is being held */
+@param[in] dict_locked whether dict_sys.mutex is being held */
void fts_get_table_name(const fts_table_t* fts_table, char* table_name,
bool dict_locked = false)
MY_ATTRIBUTE((nonnull));
@@ -486,7 +486,7 @@ fts_get_table_id(
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Construct the name of an internal FTS table for the given table.
@param[in] fts_table metadata on fulltext-indexed table
-@param[in] dict_locked whether dict_sys->mutex is being held
+@param[in] dict_locked whether dict_sys.mutex is being held
@return the prefix, must be freed with ut_free() */
char* fts_get_table_name_prefix(const fts_table_t* fts_table)
MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
diff --git a/storage/innobase/include/fut0fut.h b/storage/innobase/include/fut0fut.h
index 8f00eb74470..a52fc256efa 100644
--- a/storage/innobase/include/fut0fut.h
+++ b/storage/innobase/include/fut0fut.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -27,12 +28,11 @@ Created 12/13/1995 Heikki Tuuri
#ifndef fut0fut_h
#define fut0fut_h
-#include "fil0fil.h"
#include "mtr0mtr.h"
/** Gets a pointer to a file address and latches the page.
@param[in] space space id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] addr file address
@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_SX_LATCH
@param[out] ptr_block file page
@@ -43,13 +43,32 @@ UNIV_INLINE
byte*
fut_get_ptr(
ulint space,
- const page_size_t& page_size,
+ ulint zip_size,
fil_addr_t addr,
rw_lock_type_t rw_latch,
mtr_t* mtr,
buf_block_t** ptr_block = NULL)
- MY_ATTRIBUTE((warn_unused_result));
+{
+ buf_block_t* block;
+ byte* ptr = NULL;
-#include "fut0fut.inl"
+ ut_ad(addr.boffset < srv_page_size);
+ ut_ad((rw_latch == RW_S_LATCH)
+ || (rw_latch == RW_X_LATCH)
+ || (rw_latch == RW_SX_LATCH));
+
+ block = buf_page_get(page_id_t(space, addr.page), zip_size,
+ rw_latch, mtr);
+
+ ptr = buf_block_get_frame(block) + addr.boffset;
+
+ buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
+
+ if (ptr_block != NULL) {
+ *ptr_block = block;
+ }
+
+ return(ptr);
+}
#endif /* fut0fut_h */
diff --git a/storage/innobase/include/fut0fut.inl b/storage/innobase/include/fut0fut.inl
deleted file mode 100644
index b5c1e15e059..00000000000
--- a/storage/innobase/include/fut0fut.inl
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-*****************************************************************************/
-
-/******************************************************************//**
-@file include/fut0fut.ic
-File-based utilities
-
-Created 12/13/1995 Heikki Tuuri
-***********************************************************************/
-
-#include "sync0rw.h"
-#include "buf0buf.h"
-
-/** Gets a pointer to a file address and latches the page.
-@param[in] space space id
-@param[in] page_size page size
-@param[in] addr file address
-@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_SX_LATCH
-@param[in,out] mtr mini-transaction
-@param[out] ptr_block file page
-@return pointer to a byte in (*ptr_block)->frame; the *ptr_block is
-bufferfixed and latched */
-UNIV_INLINE
-byte*
-fut_get_ptr(
- ulint space,
- const page_size_t& page_size,
- fil_addr_t addr,
- rw_lock_type_t rw_latch,
- mtr_t* mtr,
- buf_block_t** ptr_block)
-{
- buf_block_t* block;
- byte* ptr = NULL;
-
- ut_ad(addr.boffset < srv_page_size);
- ut_ad((rw_latch == RW_S_LATCH)
- || (rw_latch == RW_X_LATCH)
- || (rw_latch == RW_SX_LATCH));
-
- block = buf_page_get(page_id_t(space, addr.page), page_size,
- rw_latch, mtr);
-
- ptr = buf_block_get_frame(block) + addr.boffset;
-
- buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
-
- if (ptr_block != NULL) {
- *ptr_block = block;
- }
-
- return(ptr);
-}
diff --git a/storage/innobase/include/fut0lst.h b/storage/innobase/include/fut0lst.h
index 9ffc4f8955d..0782781b8df 100644
--- a/storage/innobase/include/fut0lst.h
+++ b/storage/innobase/include/fut0lst.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2018, 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
@@ -26,11 +27,11 @@ Created 11/28/1995 Heikki Tuuri
#ifndef fut0lst_h
#define fut0lst_h
-#ifndef UNIV_INNOCHECKSUM
-
-#include "fil0fil.h"
-#include "mtr0mtr.h"
-
+#ifdef UNIV_INNOCHECKSUM
+# include "fil0fil.h"
+#else
+#include "fut0fut.h"
+#include "mtr0log.h"
/* The C 'types' of base node and list node: these should be used to
write self-documenting code. Of course, the sizeof macro cannot be
@@ -39,14 +40,59 @@ applied to these types! */
typedef byte flst_base_node_t;
typedef byte flst_node_t;
-/* The physical size of a list base node in bytes */
-#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
#endif /* !UNIV_INNOCHECKSUM */
+/* The physical size of a list base node in bytes */
+#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
/* The physical size of a list node in bytes */
#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)
#ifndef UNIV_INNOCHECKSUM
+/* We define the field offsets of a node for the list */
+#define FLST_PREV 0 /* 6-byte address of the previous list element;
+ the page part of address is FIL_NULL, if no
+ previous element */
+#define FLST_NEXT FIL_ADDR_SIZE /* 6-byte address of the next
+ list element; the page part of address
+ is FIL_NULL, if no next element */
+
+/* We define the field offsets of a base node for the list */
+#define FLST_LEN 0 /* 32-bit list length field */
+#define FLST_FIRST 4 /* 6-byte address of the first element
+ of the list; undefined if empty list */
+#define FLST_LAST (4 + FIL_ADDR_SIZE) /* 6-byte address of the
+ last element of the list; undefined
+ if empty list */
+
+/** Initialize a zero-initialized list base node.
+@param[in,out] block file page
+@param[in] ofs byte offset of the list base node
+@param[in,out] mtr mini-transaction */
+inline void flst_init(buf_block_t* block, uint16_t ofs, mtr_t* mtr)
+{
+ ut_ad(0 == mach_read_from_2(FLST_LEN + ofs + block->frame));
+ ut_ad(0 == mach_read_from_2(FLST_FIRST + FIL_ADDR_BYTE + ofs
+ + block->frame));
+ ut_ad(0 == mach_read_from_2(FLST_LAST + FIL_ADDR_BYTE + ofs
+ + block->frame));
+ compile_time_assert(FIL_NULL == 0xffU * 0x1010101U);
+ mlog_memset(block, FLST_FIRST + FIL_ADDR_PAGE + ofs, 4, 0xff, mtr);
+ mlog_memset(block, FLST_LAST + FIL_ADDR_PAGE + ofs, 4, 0xff, mtr);
+}
+
+/** Write a null file address.
+@param[in,out] faddr file address to be zeroed otu
+@param[in,out] mtr mini-transaction */
+inline void flst_zero_addr(fil_faddr_t* faddr, mtr_t* mtr)
+{
+ if (mach_read_from_4(faddr + FIL_ADDR_PAGE) != FIL_NULL) {
+ mlog_memset(faddr + FIL_ADDR_PAGE, 4, 0xff, mtr);
+ }
+ if (mach_read_from_2(faddr + FIL_ADDR_BYTE)) {
+ mlog_write_ulint(faddr + FIL_ADDR_BYTE, 0, MLOG_2BYTES, mtr);
+ }
+}
+
/********************************************************************//**
Initializes a list base node. */
UNIV_INLINE
@@ -83,7 +129,7 @@ flst_remove(
@param[in] base base node
@return length */
UNIV_INLINE
-ulint
+uint32_t
flst_get_len(
const flst_base_node_t* base);
/********************************************************************//**
diff --git a/storage/innobase/include/fut0lst.inl b/storage/innobase/include/fut0lst.inl
index 00bb3fe8e9c..ec4181b2c93 100644
--- a/storage/innobase/include/fut0lst.inl
+++ b/storage/innobase/include/fut0lst.inl
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -23,26 +24,8 @@ File-based list utilities
Created 11/28/1995 Heikki Tuuri
***********************************************************************/
-#include "fut0fut.h"
-#include "mtr0log.h"
#include "buf0buf.h"
-/* We define the field offsets of a node for the list */
-#define FLST_PREV 0 /* 6-byte address of the previous list element;
- the page part of address is FIL_NULL, if no
- previous element */
-#define FLST_NEXT FIL_ADDR_SIZE /* 6-byte address of the next
- list element; the page part of address
- is FIL_NULL, if no next element */
-
-/* We define the field offsets of a base node for the list */
-#define FLST_LEN 0 /* 32-bit list length field */
-#define FLST_FIRST 4 /* 6-byte address of the first element
- of the list; undefined if empty list */
-#define FLST_LAST (4 + FIL_ADDR_SIZE) /* 6-byte address of the
- last element of the list; undefined
- if empty list */
-
/********************************************************************//**
Writes a file address. */
UNIV_INLINE
@@ -79,9 +62,8 @@ flst_read_addr(
ut_ad(faddr && mtr);
- addr.page = mtr_read_ulint(faddr + FIL_ADDR_PAGE, MLOG_4BYTES, mtr);
- addr.boffset = mtr_read_ulint(faddr + FIL_ADDR_BYTE, MLOG_2BYTES,
- mtr);
+ addr.page = mach_read_from_4(faddr + FIL_ADDR_PAGE);
+ addr.boffset = mach_read_from_2(faddr + FIL_ADDR_BYTE);
ut_a(addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA);
ut_a(ut_align_offset(faddr, srv_page_size) >= FIL_PAGE_DATA);
return(addr);
@@ -100,16 +82,18 @@ flst_init(
MTR_MEMO_PAGE_X_FIX
| MTR_MEMO_PAGE_SX_FIX));
- mlog_write_ulint(base + FLST_LEN, 0, MLOG_4BYTES, mtr);
- flst_write_addr(base + FLST_FIRST, fil_addr_null, mtr);
- flst_write_addr(base + FLST_LAST, fil_addr_null, mtr);
+ if (mach_read_from_4(base + FLST_LEN)) {
+ mlog_write_ulint(base + FLST_LEN, 0, MLOG_4BYTES, mtr);
+ }
+ flst_zero_addr(base + FLST_FIRST, mtr);
+ flst_zero_addr(base + FLST_LAST, mtr);
}
/** Get the length of a list.
@param[in] base base node
@return length */
UNIV_INLINE
-ulint
+uint32_t
flst_get_len(
const flst_base_node_t* base)
{
diff --git a/storage/innobase/include/gis0rtree.h b/storage/innobase/include/gis0rtree.h
index f79eac6fc3e..b4646cd357b 100644
--- a/storage/innobase/include/gis0rtree.h
+++ b/storage/innobase/include/gis0rtree.h
@@ -191,23 +191,8 @@ rtr_non_leaf_insert_stack_push(
double mbr_inc); /*!< in: MBR needs to be
enlarged */
-/*****************************************************************//**
-Allocates a new Split Sequence Number.
-@return new SSN id */
-UNIV_INLINE
-node_seq_t
-rtr_get_new_ssn_id(
-/*===============*/
- dict_index_t* index); /*!< in: the index struct */
-
-/*****************************************************************//**
-Get the current Split Sequence Number.
-@return current SSN id */
-UNIV_INLINE
-node_seq_t
-rtr_get_current_ssn_id(
-/*===================*/
- dict_index_t* index); /*!< in/out: the index struct */
+#define rtr_get_new_ssn_id(index) (index)->assign_ssn()
+#define rtr_get_current_ssn_id(index) (index)->ssn()
/********************************************************************//**
Create a RTree search info structure */
diff --git a/storage/innobase/include/gis0rtree.inl b/storage/innobase/include/gis0rtree.inl
index 89676fb2386..c829f0de255 100644
--- a/storage/innobase/include/gis0rtree.inl
+++ b/storage/innobase/include/gis0rtree.inl
@@ -124,31 +124,6 @@ rtr_non_leaf_stack_push(
#endif /* RTR_SEARCH_DIAGNOSTIC */
}
-/*****************************************************************//**
-Allocates a new Split Sequence Number.
-@return new SSN id */
-UNIV_INLINE
-node_seq_t
-rtr_get_new_ssn_id(
-/*===============*/
- dict_index_t* index) /*!< in/out: the index struct */
-{
- node_seq_t ssn= my_atomic_add32_explicit(&index->rtr_ssn, 1,
- MY_MEMORY_ORDER_RELAXED);
- return ssn + 1;
-}
-/*****************************************************************//**
-Get the current Split Sequence Number.
-@return current SSN id */
-UNIV_INLINE
-node_seq_t
-rtr_get_current_ssn_id(
-/*===================*/
- dict_index_t* index) /*!< in: index struct */
-{
- return my_atomic_load32_explicit(&index->rtr_ssn, MY_MEMORY_ORDER_RELAXED);
-}
-
/*********************************************************************//**
Sets pointer to the data and length in a field. */
UNIV_INLINE
diff --git a/storage/innobase/include/gis0type.h b/storage/innobase/include/gis0type.h
index c5ea817c6bf..a1e0a878cb2 100644
--- a/storage/innobase/include/gis0type.h
+++ b/storage/innobase/include/gis0type.h
@@ -35,7 +35,7 @@ Created 2013/03/27 Jimmy Yang
#include "gis0geo.h"
#include <vector>
-#include <list>
+#include <forward_list>
/* Node Sequence Number. Only updated when page splits */
typedef ib_uint32_t node_seq_t;
@@ -133,15 +133,14 @@ typedef struct rtr_info{
/*!< current search mode */
} rtr_info_t;
-typedef std::list<rtr_info_t*, ut_allocator<rtr_info_t*> > rtr_info_active;
-
-/* Tracking structure for all onoging search for an index */
-typedef struct rtr_info_track {
- rtr_info_active* rtr_active; /*!< Active search info */
- ib_mutex_t rtr_active_mutex;
+/* Tracking structure for all ongoing search for an index */
+struct rtr_info_track_t {
+ /** Active search info */
+ std::forward_list<rtr_info_t*, ut_allocator<rtr_info_t*> > rtr_active;
+ ib_mutex_t rtr_active_mutex;
/*!< mutex to protect
rtr_active */
-} rtr_info_track_t;
+};
/* This is to record the record movement between pages. Used for corresponding
lock movement */
diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h
index 84268a05ade..c5971bc75aa 100644
--- a/storage/innobase/include/ha_prototypes.h
+++ b/storage/innobase/include/ha_prototypes.h
@@ -231,10 +231,11 @@ innobase_casedn_str(
#ifdef WITH_WSREP
void
-wsrep_innobase_kill_one_trx(MYSQL_THD const thd_ptr,
- const trx_t * const bf_trx,
- trx_t *victim_trx,
- my_bool signal);
+wsrep_innobase_kill_one_trx(
+ THD* bf_thd,
+ trx_t *victim_trx,
+ my_bool signal);
+
ulint wsrep_innobase_mysql_sort(int mysql_type, uint charset_number,
unsigned char* str, unsigned int str_length,
unsigned int buf_length);
@@ -511,18 +512,6 @@ normalize_table_name_c_low(
const char* name, /*!< in: table name string */
ibool set_lower_case); /*!< in: TRUE if we want to set
name to lower case */
-/*************************************************************//**
-InnoDB index push-down condition check defined in ha_innodb.cc
-@return ICP_NO_MATCH, ICP_MATCH, or ICP_OUT_OF_RANGE */
-
-#include <my_compare.h>
-
-ICP_RESULT
-innobase_index_cond(
-/*================*/
- void* file) /*!< in/out: pointer to ha_innobase */
- MY_ATTRIBUTE((warn_unused_result));
-
/** Update the system variable with the given value of the InnoDB
buffer pool size.
@param[in] buf_pool_size given value of buffer pool size.*/
diff --git a/storage/innobase/include/ib0mutex.h b/storage/innobase/include/ib0mutex.h
index e496c65e46a..ce0e911dbb4 100644
--- a/storage/innobase/include/ib0mutex.h
+++ b/storage/innobase/include/ib0mutex.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, 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
@@ -29,13 +29,12 @@ Created 2013-03-26 Sunny Bains.
#ifndef ib0mutex_h
#define ib0mutex_h
-#include "my_atomic.h"
#include "my_cpu.h"
#include "os0event.h"
#include "sync0arr.h"
/** OS mutex for tracking lock/unlock for debugging */
-template <template <typename> class Policy = NoPolicy>
+template <template <typename> class Policy>
struct OSTrackMutex {
typedef Policy<OSTrackMutex> MutexPolicy;
@@ -152,7 +151,7 @@ private:
#include <sys/syscall.h>
/** Mutex implementation that used the Linux futex. */
-template <template <typename> class Policy = NoPolicy>
+template <template <typename> class Policy>
struct TTASFutexMutex {
typedef Policy<TTASFutexMutex> MutexPolicy;
@@ -167,21 +166,24 @@ struct TTASFutexMutex {
~TTASFutexMutex()
{
- ut_a(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(m_lock_word.load(std::memory_order_relaxed)
+ == MUTEX_STATE_UNLOCKED);
}
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised. */
void init(latch_id_t, const char*, uint32_t) UNIV_NOTHROW
{
- ut_a(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(m_lock_word.load(std::memory_order_relaxed)
+ == MUTEX_STATE_UNLOCKED);
}
/** Destroy the mutex. */
void destroy() UNIV_NOTHROW
{
/* The destructor can be called at shutdown. */
- ut_a(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(m_lock_word.load(std::memory_order_relaxed)
+ == MUTEX_STATE_UNLOCKED);
}
/** Acquire the mutex.
@@ -202,9 +204,8 @@ struct TTASFutexMutex {
}
for (n_waits= 0;; n_waits++) {
- if (my_atomic_fas32_explicit(&m_lock_word,
- MUTEX_STATE_WAITERS,
- MY_MEMORY_ORDER_ACQUIRE)
+ if (m_lock_word.exchange(MUTEX_STATE_WAITERS,
+ std::memory_order_acquire)
== MUTEX_STATE_UNLOCKED) {
break;
}
@@ -220,9 +221,8 @@ struct TTASFutexMutex {
/** Release the mutex. */
void exit() UNIV_NOTHROW
{
- if (my_atomic_fas32_explicit(&m_lock_word,
- MUTEX_STATE_UNLOCKED,
- MY_MEMORY_ORDER_RELEASE)
+ if (m_lock_word.exchange(MUTEX_STATE_UNLOCKED,
+ std::memory_order_release)
== MUTEX_STATE_WAITERS) {
syscall(SYS_futex, &m_lock_word, FUTEX_WAKE_PRIVATE,
1, 0, 0, 0);
@@ -234,10 +234,11 @@ struct TTASFutexMutex {
bool try_lock() UNIV_NOTHROW
{
int32 oldval = MUTEX_STATE_UNLOCKED;
- return(my_atomic_cas32_strong_explicit(&m_lock_word, &oldval,
- MUTEX_STATE_LOCKED,
- MY_MEMORY_ORDER_ACQUIRE,
- MY_MEMORY_ORDER_RELAXED));
+ return m_lock_word.compare_exchange_strong(
+ oldval,
+ MUTEX_STATE_LOCKED,
+ std::memory_order_acquire,
+ std::memory_order_relaxed);
}
/** @return non-const version of the policy */
@@ -257,12 +258,12 @@ private:
/** lock_word is the target of the atomic test-and-set instruction
when atomic operations are enabled. */
- int32 m_lock_word;
+ std::atomic<int32> m_lock_word;
};
#endif /* HAVE_IB_LINUX_FUTEX */
-template <template <typename> class Policy = NoPolicy>
+template <template <typename> class Policy>
struct TTASMutex {
typedef Policy<TTASMutex> MutexPolicy;
@@ -277,40 +278,45 @@ struct TTASMutex {
~TTASMutex()
{
- ut_ad(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(m_lock_word.load(std::memory_order_relaxed)
+ == MUTEX_STATE_UNLOCKED);
}
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised. */
void init(latch_id_t) UNIV_NOTHROW
{
- ut_ad(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(m_lock_word.load(std::memory_order_relaxed)
+ == MUTEX_STATE_UNLOCKED);
}
/** Destroy the mutex. */
void destroy() UNIV_NOTHROW
{
/* The destructor can be called at shutdown. */
- ut_ad(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(m_lock_word.load(std::memory_order_relaxed)
+ == MUTEX_STATE_UNLOCKED);
}
/** Try and lock the mutex.
@return true on success */
bool try_lock() UNIV_NOTHROW
{
- int32 oldval = MUTEX_STATE_UNLOCKED;
- return(my_atomic_cas32_strong_explicit(&m_lock_word, &oldval,
- MUTEX_STATE_LOCKED,
- MY_MEMORY_ORDER_ACQUIRE,
- MY_MEMORY_ORDER_RELAXED));
+ uint32_t oldval = MUTEX_STATE_UNLOCKED;
+ return m_lock_word.compare_exchange_strong(
+ oldval,
+ MUTEX_STATE_LOCKED,
+ std::memory_order_acquire,
+ std::memory_order_relaxed);
}
/** Release the mutex. */
void exit() UNIV_NOTHROW
{
- ut_ad(m_lock_word == MUTEX_STATE_LOCKED);
- my_atomic_store32_explicit(&m_lock_word, MUTEX_STATE_UNLOCKED,
- MY_MEMORY_ORDER_RELEASE);
+ ut_ad(m_lock_word.load(std::memory_order_relaxed)
+ == MUTEX_STATE_LOCKED);
+ m_lock_word.store(MUTEX_STATE_UNLOCKED,
+ std::memory_order_release);
}
/** Acquire the mutex.
@@ -353,12 +359,11 @@ private:
/** Policy data */
MutexPolicy m_policy;
- /** lock_word is the target of the atomic test-and-set instruction
- when atomic operations are enabled. */
- int32 m_lock_word;
+ /** mutex state */
+ std::atomic<uint32_t> m_lock_word;
};
-template <template <typename> class Policy = NoPolicy>
+template <template <typename> class Policy>
struct TTASEventMutex {
typedef Policy<TTASEventMutex> MutexPolicy;
@@ -376,7 +381,7 @@ struct TTASEventMutex {
~TTASEventMutex()
UNIV_NOTHROW
{
- ut_ad(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(state() == MUTEX_STATE_UNLOCKED);
}
/** Called when the mutex is "created". Note: Not from the constructor
@@ -385,7 +390,7 @@ struct TTASEventMutex {
void init(latch_id_t id, const char*, uint32_t) UNIV_NOTHROW
{
ut_a(m_event == 0);
- ut_a(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(state() == MUTEX_STATE_UNLOCKED);
m_event = os_event_create(sync_latch_get_name(id));
}
@@ -396,7 +401,7 @@ struct TTASEventMutex {
void destroy()
UNIV_NOTHROW
{
- ut_ad(m_lock_word == MUTEX_STATE_UNLOCKED);
+ ut_ad(state() == MUTEX_STATE_UNLOCKED);
/* We have to free the event before InnoDB shuts down. */
os_event_destroy(m_event);
@@ -408,20 +413,20 @@ struct TTASEventMutex {
bool try_lock()
UNIV_NOTHROW
{
- int32 oldval = MUTEX_STATE_UNLOCKED;
- return(my_atomic_cas32_strong_explicit(&m_lock_word, &oldval,
- MUTEX_STATE_LOCKED,
- MY_MEMORY_ORDER_ACQUIRE,
- MY_MEMORY_ORDER_RELAXED));
+ uint32_t oldval = MUTEX_STATE_UNLOCKED;
+ return m_lock_word.compare_exchange_strong(
+ oldval,
+ MUTEX_STATE_LOCKED,
+ std::memory_order_acquire,
+ std::memory_order_relaxed);
}
/** Release the mutex. */
void exit()
UNIV_NOTHROW
{
- if (my_atomic_fas32_explicit(&m_lock_word,
- MUTEX_STATE_UNLOCKED,
- MY_MEMORY_ORDER_RELEASE)
+ if (m_lock_word.exchange(MUTEX_STATE_UNLOCKED,
+ std::memory_order_release)
== MUTEX_STATE_WAITERS) {
os_event_set(m_event);
sync_array_object_signalled();
@@ -459,11 +464,12 @@ struct TTASEventMutex {
: SYNC_MUTEX,
filename, line, &cell);
- int32 oldval = MUTEX_STATE_LOCKED;
- my_atomic_cas32_strong_explicit(&m_lock_word, &oldval,
- MUTEX_STATE_WAITERS,
- MY_MEMORY_ORDER_RELAXED,
- MY_MEMORY_ORDER_RELAXED);
+ uint32_t oldval = MUTEX_STATE_LOCKED;
+ m_lock_word.compare_exchange_strong(
+ oldval,
+ MUTEX_STATE_WAITERS,
+ std::memory_order_relaxed,
+ std::memory_order_relaxed);
if (oldval == MUTEX_STATE_UNLOCKED) {
sync_array_free_cell(sync_arr, cell);
@@ -482,9 +488,7 @@ struct TTASEventMutex {
int32 state() const
UNIV_NOTHROW
{
- return(my_atomic_load32_explicit(const_cast<int32*>
- (&m_lock_word),
- MY_MEMORY_ORDER_RELAXED));
+ return m_lock_word.load(std::memory_order_relaxed);
}
/** The event that the mutex will wait in sync0arr.cc
@@ -514,9 +518,8 @@ private:
TTASEventMutex(const TTASEventMutex&);
TTASEventMutex& operator=(const TTASEventMutex&);
- /** lock_word is the target of the atomic test-and-set instruction
- when atomic operations are enabled. */
- int32 m_lock_word;
+ /** mutex state */
+ std::atomic<uint32_t> m_lock_word;
/** Used by sync0arr.cc for the wait queue */
os_event_t m_event;
@@ -530,7 +533,6 @@ with the Performance Schema instrumentation. */
template <typename MutexImpl>
struct PolicyMutex
{
- typedef MutexImpl MutexType;
typedef typename MutexImpl::MutexPolicy Policy;
PolicyMutex() UNIV_NOTHROW : m_impl()
@@ -561,7 +563,7 @@ struct PolicyMutex
pfs_exit();
#endif /* UNIV_PFS_MUTEX */
- policy().release(m_impl);
+ ut_d(policy().context.release(m_impl));
m_impl.exit();
}
@@ -587,11 +589,11 @@ struct PolicyMutex
locker = pfs_begin_lock(&state, name, line);
#endif /* UNIV_PFS_MUTEX */
- policy().enter(m_impl, name, line);
+ ut_d(policy().context.enter(m_impl, name, line));
m_impl.enter(n_spins, n_delay, name, line);
- policy().locked(m_impl, name, line);
+ ut_d(policy().context.locked(m_impl, name, line));
#ifdef UNIV_PFS_MUTEX
pfs_end(locker, 0);
#endif /* UNIV_PFS_MUTEX */
@@ -620,9 +622,9 @@ struct PolicyMutex
if (ret == 0) {
- policy().enter(m_impl, name, line);
+ ut_d(policy().context.enter(m_impl, name, line));
- policy().locked(m_impl, name, line);
+ ut_d(policy().context.locked(m_impl, name, line));
}
#ifdef UNIV_PFS_MUTEX
@@ -636,7 +638,7 @@ struct PolicyMutex
/** @return true if the thread owns the mutex. */
bool is_owned() const UNIV_NOTHROW
{
- return(policy().is_owned());
+ return(policy().context.is_owned());
}
#endif /* UNIV_DEBUG */
@@ -658,6 +660,7 @@ struct PolicyMutex
m_impl.init(id, filename, line);
policy().init(m_impl, id, filename, line);
+ ut_d(policy().context.init(id));
}
/** Free resources (if any) */
@@ -668,6 +671,7 @@ struct PolicyMutex
#endif /* UNIV_PFS_MUTEX */
m_impl.destroy();
policy().destroy();
+ ut_d(policy().context.destroy());
}
/** Required for os_event_t */
diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h
index f9d9ab27549..73f7054c9fb 100644
--- a/storage/innobase/include/ibuf0ibuf.h
+++ b/storage/innobase/include/ibuf0ibuf.h
@@ -119,13 +119,6 @@ ibuf_mtr_commit(
/*============*/
mtr_t* mtr) /*!< in/out: mini-transaction */
MY_ATTRIBUTE((nonnull));
-/*********************************************************************//**
-Initializes an ibuf bitmap page. */
-void
-ibuf_bitmap_page_init(
-/*==================*/
- buf_block_t* block, /*!< in: bitmap page */
- mtr_t* mtr); /*!< in: mtr */
/************************************************************************//**
Resets the free bits of the page in the ibuf bitmap. This is done in a
separate mini-transaction, hence this operation does not restrict
@@ -241,18 +234,19 @@ ibuf_inside(
/** Checks if a page address is an ibuf bitmap page (level 3 page) address.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@return TRUE if a bitmap page */
-UNIV_INLINE
-ibool
-ibuf_bitmap_page(
- const page_id_t page_id,
- const page_size_t& page_size);
+inline bool ibuf_bitmap_page(const page_id_t page_id, ulint zip_size)
+{
+ ut_ad(ut_is_2pow(zip_size));
+ ulint size = zip_size ? zip_size : srv_page_size;
+ return (page_id.page_no() & (size - 1)) == FSP_IBUF_BITMAP_OFFSET;
+}
/** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages.
Must not be called when recv_no_ibuf_operations==true.
@param[in] page_id page id
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] x_latch FALSE if relaxed check (avoid latching the
bitmap page)
@param[in] file file name
@@ -260,13 +254,13 @@ bitmap page)
@param[in,out] mtr mtr which will contain an x-latch to the
bitmap page if the page is not one of the fixed address ibuf pages, or NULL,
in which case a new transaction is created.
-@return TRUE if level 2 or level 3 page */
-ibool
+@return true if level 2 or level 3 page */
+bool
ibuf_page_low(
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
#ifdef UNIV_DEBUG
- ibool x_latch,
+ bool x_latch,
#endif /* UNIV_DEBUG */
const char* file,
unsigned line,
@@ -278,22 +272,22 @@ ibuf_page_low(
/** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages.
Must not be called when recv_no_ibuf_operations==true.
@param[in] page_id tablespace/page identifier
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] mtr mini-transaction or NULL
@return TRUE if level 2 or level 3 page */
-# define ibuf_page(page_id, page_size, mtr) \
- ibuf_page_low(page_id, page_size, TRUE, __FILE__, __LINE__, mtr)
+# define ibuf_page(page_id, zip_size, mtr) \
+ ibuf_page_low(page_id, zip_size, true, __FILE__, __LINE__, mtr)
#else /* UVIV_DEBUG */
/** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages.
Must not be called when recv_no_ibuf_operations==true.
@param[in] page_id tablespace/page identifier
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] mtr mini-transaction or NULL
@return TRUE if level 2 or level 3 page */
-# define ibuf_page(page_id, page_size, mtr) \
- ibuf_page_low(page_id, page_size, __FILE__, __LINE__, mtr)
+# define ibuf_page(page_id, zip_size, mtr) \
+ ibuf_page_low(page_id, zip_size, __FILE__, __LINE__, mtr)
#endif /* UVIV_DEBUG */
/***********************************************************************//**
@@ -304,23 +298,23 @@ void
ibuf_free_excess_pages(void);
/*========================*/
-/** Buffer an operation in the insert/delete buffer, instead of doing it
-directly to the disk page, if this is possible. Does not do it if the index
+/** Buffer an operation in the change buffer, instead of applying it
+directly to the file page, if this is possible. Does not do it if the index
is clustered or unique.
@param[in] op operation type
@param[in] entry index entry to insert
@param[in,out] index index where to insert
@param[in] page_id page id where to insert
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] thr query thread
-@return TRUE if success */
-ibool
+@return true if success */
+bool
ibuf_insert(
ibuf_op_t op,
const dtuple_t* entry,
dict_index_t* index,
const page_id_t page_id,
- const page_size_t& page_size,
+ ulint zip_size,
que_thr_t* thr);
/**
@@ -337,24 +331,17 @@ insert buffer. If the page is not read, but created in the buffer pool, this
function deletes its buffered entries from the insert buffer; there can
exist entries for such a page if the page belonged to an index which
subsequently was dropped.
-@param[in,out] block if page has been read from disk,
-pointer to the page x-latched, else NULL
-@param[in] page_id page id of the index page */
-void
-ibuf_merge_or_delete_for_page(
- buf_block_t* block,
- const page_id_t page_id,
- const page_size_t& page_size);
+@param block X-latched page to try to apply changes to, or NULL to discard
+@param page_id page identifier
+@param zip_size ROW_FORMAT=COMPRESSED page size, or 0 */
+void ibuf_merge_or_delete_for_page(buf_block_t *block, const page_id_t page_id,
+ ulint zip_size);
+
+/** Delete all change buffer entries for a tablespace,
+in DISCARD TABLESPACE, IMPORT TABLESPACE, or crash recovery.
+@param[in] space missing or to-be-discarded tablespace */
+void ibuf_delete_for_discarded_space(ulint space);
-/*********************************************************************//**
-Deletes all entries in the insert buffer for a given space id. This is used
-in DISCARD TABLESPACE and IMPORT TABLESPACE.
-NOTE: this does not update the page free bitmaps in the space. The space will
-become CORRUPT when you call this function! */
-void
-ibuf_delete_for_discarded_space(
-/*============================*/
- ulint space); /*!< in: space id */
/** Contract the change buffer by reading pages to the buffer pool.
@param[in] full If true, do a full contraction based
on PCT_IO(100). If false, the size of contract batch is determined
@@ -374,16 +361,8 @@ ibuf_merge_space(
/*=============*/
ulint space); /*!< in: space id */
-/*********************************************************************//**
-Parses a redo log record of an ibuf bitmap page init.
-@return end of log record or NULL */
-byte*
-ibuf_parse_bitmap_init(
-/*===================*/
- byte* ptr, /*!< in: buffer */
- byte* end_ptr,/*!< in: buffer end */
- buf_block_t* block, /*!< in: block or NULL */
- mtr_t* mtr); /*!< in: mtr or NULL */
+/** Apply MLOG_IBUF_BITMAP_INIT when crash-upgrading */
+ATTRIBUTE_COLD void ibuf_bitmap_init_apply(buf_block_t* block);
/******************************************************************//**
Looks if the insert buffer is empty.
diff --git a/storage/innobase/include/ibuf0ibuf.inl b/storage/innobase/include/ibuf0ibuf.inl
index b3e04ee1661..db8c122c0f7 100644
--- a/storage/innobase/include/ibuf0ibuf.inl
+++ b/storage/innobase/include/ibuf0ibuf.inl
@@ -78,11 +78,12 @@ struct ibuf_t{
ulint height; /*!< tree height */
dict_index_t* index; /*!< insert buffer index */
- ulint n_merges; /*!< number of pages merged */
- ulint n_merged_ops[IBUF_OP_COUNT];
+ /** number of pages merged */
+ Atomic_counter<ulint> n_merges;
+ Atomic_counter<ulint> n_merged_ops[IBUF_OP_COUNT];
/*!< number of operations of each type
merged to index pages */
- ulint n_discarded_ops[IBUF_OP_COUNT];
+ Atomic_counter<ulint> n_discarded_ops[IBUF_OP_COUNT];
/*!< number of operations of each type
discarded without merging due to the
tablespace being deleted or the
@@ -149,20 +150,6 @@ ibuf_inside(
return(mtr->is_inside_ibuf());
}
-/** Checks if a page address is an ibuf bitmap page (level 3 page) address.
-@param[in] page_id page id
-@param[in] page_size page size
-@return TRUE if a bitmap page */
-UNIV_INLINE
-ibool
-ibuf_bitmap_page(
- const page_id_t page_id,
- const page_size_t& page_size)
-{
- return((page_id.page_no() & (page_size.physical() - 1))
- == FSP_IBUF_BITMAP_OFFSET);
-}
-
/** Translates the free space on a page to a value in the ibuf bitmap.
@param[in] page_size page size in bytes
@param[in] max_ins_size maximum insert size after reorganize for
@@ -191,29 +178,6 @@ ibuf_index_page_calc_free_bits(
return(n);
}
-/** Translates the ibuf free bits to the free space on a page in bytes.
-@param[in] page_size page_size
-@param[in] bits value for ibuf bitmap bits
-@return maximum insert size after reorganize for the page */
-UNIV_INLINE
-ulint
-ibuf_index_page_calc_free_from_bits(
- const page_size_t& page_size,
- ulint bits)
-{
- ut_ad(bits < 4);
- ut_ad(!page_size.is_compressed()
- || page_size.physical() > IBUF_PAGE_SIZE_PER_FREE_SPACE);
-
- if (bits == 3) {
- return(4 * page_size.physical()
- / IBUF_PAGE_SIZE_PER_FREE_SPACE);
- }
-
- return(bits * (page_size.physical()
- / IBUF_PAGE_SIZE_PER_FREE_SPACE));
-}
-
/*********************************************************************//**
Translates the free space on a compressed page to a value in the ibuf bitmap.
@return value for ibuf bitmap bits */
@@ -227,7 +191,7 @@ ibuf_index_page_calc_free_zip(
const page_zip_des_t* page_zip;
lint zip_max_ins;
- ut_ad(block->page.size.is_compressed());
+ ut_ad(block->page.zip.data);
/* Consider the maximum insert size on the uncompressed page
without reorganizing the page. We must not assume anything
@@ -250,7 +214,7 @@ ibuf_index_page_calc_free_zip(
max_ins_size = (ulint) zip_max_ins;
}
- return(ibuf_index_page_calc_free_bits(block->page.size.physical(),
+ return(ibuf_index_page_calc_free_bits(block->physical_size(),
max_ins_size));
}
@@ -263,14 +227,14 @@ ibuf_index_page_calc_free(
/*======================*/
const buf_block_t* block) /*!< in: buffer block */
{
- if (!block->page.size.is_compressed()) {
+ if (!block->page.zip.data) {
ulint max_ins_size;
max_ins_size = page_get_max_insert_size_after_reorganize(
buf_block_get_frame(block), 1);
return(ibuf_index_page_calc_free_bits(
- block->page.size.physical(), max_ins_size));
+ block->physical_size(), max_ins_size));
} else {
return(ibuf_index_page_calc_free_zip(block));
}
@@ -311,12 +275,12 @@ ibuf_update_free_bits_if_full(
ut_ad(buf_block_get_page_zip(block) == NULL);
before = ibuf_index_page_calc_free_bits(
- block->page.size.physical(), max_ins_size);
+ srv_page_size, max_ins_size);
if (max_ins_size >= increase) {
compile_time_assert(ULINT32_UNDEFINED > UNIV_PAGE_SIZE_MAX);
after = ibuf_index_page_calc_free_bits(
- block->page.size.physical(), max_ins_size - increase);
+ srv_page_size, max_ins_size - increase);
#ifdef UNIV_IBUF_DEBUG
ut_a(after <= ibuf_index_page_calc_free(block));
#endif
diff --git a/storage/innobase/include/log0crypt.h b/storage/innobase/include/log0crypt.h
index 7a14b022e66..8d26ccb2ba3 100644
--- a/storage/innobase/include/log0crypt.h
+++ b/storage/innobase/include/log0crypt.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (C) 2013, 2015, Google Inc. All Rights Reserved.
-Copyright (C) 2014, 2017, MariaDB Corporation. All Rights Reserved.
+Copyright (C) 2014, 2018, 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
@@ -73,14 +73,23 @@ UNIV_INTERN
bool
log_crypt_read_checkpoint_buf(const byte* buf);
+/** log_crypt() operation code */
+enum log_crypt_t {
+ /** encrypt a log block without rotating key */
+ LOG_ENCRYPT,
+ /** decrypt a log block */
+ LOG_DECRYPT,
+ /** attempt to rotate the key, and encrypt a log block */
+ LOG_ENCRYPT_ROTATE_KEY
+};
+
/** Encrypt or decrypt log blocks.
@param[in,out] buf log blocks to encrypt or decrypt
@param[in] lsn log sequence number of the start of the buffer
@param[in] size size of the buffer, in bytes
-@param[in] decrypt whether to decrypt instead of encrypting */
-UNIV_INTERN
-void
-log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt = false);
+@param[in] op whether to decrypt, encrypt, or rotate key and encrypt
+@return whether the operation succeeded (encrypt always does) */
+bool log_crypt(byte* buf, lsn_t lsn, ulint size, log_crypt_t op = LOG_ENCRYPT);
/** Encrypt or decrypt a temporary file block.
@param[in] src block to encrypt or decrypt
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
index c15aa656e5e..477bb0a1d05 100644
--- a/storage/innobase/include/log0log.h
+++ b/storage/innobase/include/log0log.h
@@ -158,19 +158,16 @@ bool
log_set_capacity(ulonglong file_size)
MY_ATTRIBUTE((warn_unused_result));
-/******************************************************//**
-This function is called, e.g., when a transaction wants to commit. It checks
-that the log has been written to the log file up to the last log entry written
-by the transaction. If there is a flush running, it waits and checks if the
-flush flushed enough. If not, starts a new flush. */
-void
-log_write_up_to(
-/*============*/
- lsn_t lsn, /*!< in: log sequence number up to which
- the log should be written, LSN_MAX if not specified */
- bool flush_to_disk);
- /*!< in: true if we want the written log
- also to be flushed to disk */
+/** Ensure that the log has been written to the log file up to a given
+log entry (such as that of a transaction commit). Start a new write, or
+wait and check if an already running write is covering the request.
+@param[in] lsn log sequence number that should be
+included in the redo log file write
+@param[in] flush_to_disk whether the written log should also
+be flushed to the file system
+@param[in] rotate_key whether to rotate the encryption key */
+void log_write_up_to(lsn_t lsn, bool flush_to_disk, bool rotate_key = false);
+
/** write to the log file up to the last log entry.
@param[in] sync whether we want the written log
also to be flushed to disk. */
@@ -392,13 +389,14 @@ extern my_bool innodb_log_checksums;
#define LOG_BLOCK_HDR_SIZE 12 /* size of the log block header in
bytes */
-/* Offsets of a log block trailer from the end of the block */
+#define LOG_BLOCK_KEY 4 /* encryption key version
+ before LOG_BLOCK_CHECKSUM;
+ in log_t::FORMAT_ENC_10_4 only */
#define LOG_BLOCK_CHECKSUM 4 /* 4 byte checksum of the log block
contents; in InnoDB versions
< 3.23.52 this did not contain the
checksum but the same value as
- .._HDR_NO */
-#define LOG_BLOCK_TRL_SIZE 4 /* trailer size in bytes */
+ LOG_BLOCK_HDR_NO */
/** Offsets inside the checkpoint pages (redo log format version 1) @{ */
/** Checkpoint number */
@@ -449,25 +447,6 @@ or the MySQL version that created the redo log file. */
IB_TO_STR(MYSQL_VERSION_MINOR) "." \
IB_TO_STR(MYSQL_VERSION_PATCH)
-/** The original (not version-tagged) InnoDB redo log format */
-#define LOG_HEADER_FORMAT_3_23 0
-/** The MySQL 5.7.9/MariaDB 10.2.2 log format */
-#define LOG_HEADER_FORMAT_10_2 1
-/** The MariaDB 10.3.2 log format.
-To prevent crash-downgrade to earlier 10.2 due to the inability to
-roll back a retroactively introduced TRX_UNDO_RENAME_TABLE undo log record,
-MariaDB 10.2.18 and later will use the 10.3 format, but LOG_HEADER_SUBFORMAT
-1 instead of 0. MariaDB 10.3 will use subformat 0 (5.7-style TRUNCATE) or 2
-(MDEV-13564 backup-friendly TRUNCATE). */
-#define LOG_HEADER_FORMAT_10_3 103
-/** The redo log format identifier corresponding to the current format version.
-Stored in LOG_HEADER_FORMAT. */
-#define LOG_HEADER_FORMAT_CURRENT LOG_HEADER_FORMAT_10_3
-/** Future MariaDB 10.4 log format */
-#define LOG_HEADER_FORMAT_10_4 104
-/** Encrypted MariaDB redo log */
-#define LOG_HEADER_FORMAT_ENCRYPTED (1U<<31)
-
/* @} */
#define LOG_CHECKPOINT_1 OS_FILE_LOG_BLOCK_SIZE
@@ -492,6 +471,24 @@ typedef ib_mutex_t FlushOrderMutex;
/** Redo log buffer */
struct log_t{
+ /** The original (not version-tagged) InnoDB redo log format */
+ static constexpr uint32_t FORMAT_3_23 = 0;
+ /** The MySQL 5.7.9/MariaDB 10.2.2 log format */
+ static constexpr uint32_t FORMAT_10_2 = 1;
+ /** The MariaDB 10.3.2 log format.
+ To prevent crash-downgrade to earlier 10.2 due to the inability to
+ roll back a retroactively introduced TRX_UNDO_RENAME_TABLE undo log record,
+ MariaDB 10.2.18 and later will use the 10.3 format, but LOG_HEADER_SUBFORMAT
+ 1 instead of 0. MariaDB 10.3 will use subformat 0 (5.7-style TRUNCATE) or 2
+ (MDEV-13564 backup-friendly TRUNCATE). */
+ static constexpr uint32_t FORMAT_10_3 = 103;
+ /** The MariaDB 10.4.0 log format. */
+ static constexpr uint32_t FORMAT_10_4 = 104;
+ /** Encrypted MariaDB redo log */
+ static constexpr uint32_t FORMAT_ENCRYPTED = 1U << 31;
+ /** The MariaDB 10.4.0 log format (only with innodb_encrypt_log=ON) */
+ static constexpr uint32_t FORMAT_ENC_10_4 = FORMAT_10_4 | FORMAT_ENCRYPTED;
+
MY_ALIGNED(CACHE_LINE_SIZE)
lsn_t lsn; /*!< log sequence number */
ulong buf_free; /*!< first free offset within the log
@@ -532,7 +529,7 @@ struct log_t{
struct files {
/** number of files */
ulint n_files;
- /** format of the redo log: e.g., LOG_HEADER_FORMAT_CURRENT */
+ /** format of the redo log: e.g., FORMAT_10_4 */
uint32_t format;
/** redo log subformat: 0 with separately logged TRUNCATE,
2 with fully redo-logged TRUNCATE (1 in MariaDB 10.2) */
@@ -550,7 +547,7 @@ struct log_t{
lsn_t scanned_lsn;
/** @return whether the redo log is encrypted */
- bool is_encrypted() const { return format & LOG_HEADER_FORMAT_ENCRYPTED; }
+ bool is_encrypted() const { return format & FORMAT_ENCRYPTED; }
/** @return capacity in bytes */
lsn_t capacity() const{ return (file_size - LOG_FILE_HDR_SIZE) * n_files; }
/** Calculate the offset of a log sequence number.
@@ -685,11 +682,34 @@ public:
/** @return whether the redo log is encrypted */
bool is_encrypted() const { return(log.is_encrypted()); }
- bool is_initialised() { return m_initialised; }
+ bool is_initialised() const { return m_initialised; }
/** Complete an asynchronous checkpoint write. */
void complete_checkpoint();
+ /** @return the log block header + trailer size */
+ unsigned framing_size() const
+ {
+ return log.format == FORMAT_ENC_10_4
+ ? LOG_BLOCK_HDR_SIZE + LOG_BLOCK_KEY + LOG_BLOCK_CHECKSUM
+ : LOG_BLOCK_HDR_SIZE + LOG_BLOCK_CHECKSUM;
+ }
+ /** @return the log block payload size */
+ unsigned payload_size() const
+ {
+ return log.format == FORMAT_ENC_10_4
+ ? OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_HDR_SIZE - LOG_BLOCK_CHECKSUM -
+ LOG_BLOCK_KEY
+ : OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_HDR_SIZE - LOG_BLOCK_CHECKSUM;
+ }
+ /** @return the log block trailer offset */
+ unsigned trailer_offset() const
+ {
+ return log.format == FORMAT_ENC_10_4
+ ? OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_CHECKSUM - LOG_BLOCK_KEY
+ : OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_CHECKSUM;
+ }
+
/** Initialise the redo log subsystem. */
void create();
diff --git a/storage/innobase/include/log0log.inl b/storage/innobase/include/log0log.inl
index be28fee7b8e..8dfd86d3078 100644
--- a/storage/innobase/include/log0log.inl
+++ b/storage/innobase/include/log0log.inl
@@ -205,7 +205,7 @@ log_block_calc_checksum_format_0(
sum = 1;
sh = 0;
- for (i = 0; i < OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE; i++) {
+ for (i = 0; i < OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_CHECKSUM; i++) {
ulint b = (ulint) block[i];
sum &= 0x7FFFFFFFUL;
sum += b;
@@ -227,7 +227,7 @@ ulint
log_block_calc_checksum_crc32(
const byte* block)
{
- return(ut_crc32(block, OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE));
+ return ut_crc32(block, OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_CHECKSUM);
}
/************************************************************//**
@@ -319,7 +319,7 @@ log_reserve_and_write_fast(
#endif /* UNIV_LOG_LSN_DEBUG */
+ log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE;
- if (data_len >= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE) {
+ if (data_len >= log_sys.trailer_offset()) {
/* The string does not fit within the current log block
or the log block would become full */
@@ -464,9 +464,9 @@ log_free_check(void)
#ifdef UNIV_DEBUG
static const latch_level_t latches[] = {
- SYNC_DICT, /* dict_sys->mutex during
+ SYNC_DICT, /* dict_sys.mutex during
commit_try_rebuild() */
- SYNC_DICT_OPERATION, /* dict_operation_lock X-latch during
+ SYNC_DICT_OPERATION, /* dict_sys.latch X-latch during
commit_try_rebuild() */
SYNC_FTS_CACHE, /* fts_cache_t::lock */
SYNC_INDEX_TREE /* index->lock */
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h
index b8a96a9e431..716bc12b5d1 100644
--- a/storage/innobase/include/log0recv.h
+++ b/storage/innobase/include/log0recv.h
@@ -33,8 +33,7 @@ Created 9/20/1997 Heikki Tuuri
#include "log0log.h"
#include "mtr0types.h"
-#include <list>
-#include <vector>
+#include <deque>
/** Is recv_writer_thread active? */
extern bool recv_writer_thread_active;
@@ -49,7 +48,7 @@ dberr_t
recv_find_max_checkpoint(ulint* max_field)
MY_ATTRIBUTE((nonnull, warn_unused_result));
-/** Reduces recv_sys->n_addrs for the corrupted page.
+/** Reduces recv_sys.n_addrs for the corrupted page.
This function should called when srv_force_recovery > 0.
@param[in] page_id page id of the corrupted page */
void recv_recover_corrupt_page(page_id_t page_id);
@@ -74,17 +73,6 @@ Initiates the rollback of active transactions. */
void
recv_recovery_rollback_active(void);
/*===============================*/
-/** Clean up after recv_sys_init() */
-void
-recv_sys_close();
-/** Initialize the redo log recovery subsystem. */
-void
-recv_sys_init();
-/********************************************************//**
-Frees the recovery system. */
-void
-recv_sys_debug_free(void);
-/*=====================*/
/********************************************************//**
Reset the state of the recovery system variables. */
@@ -110,7 +98,7 @@ enum store_t {
/** Adds data from a new log block to the parsing buffer of recv_sys if
-recv_sys->parse_start_lsn is non-zero.
+recv_sys.parse_start_lsn is non-zero.
@param[in] log_block log block to add
@param[in] scanned_lsn lsn of how far we were able to find
data in this log block
@@ -140,10 +128,6 @@ corresponding to MLOG_INDEX_LOAD.
*/
extern void (*log_optimized_ddl_op)(ulint space_id);
-/** Report backup-unfriendly TRUNCATE operation (with separate log file),
-corresponding to MLOG_TRUNCATE. */
-extern void (*log_truncate)();
-
/** Report an operation to create, delete, or rename a file during backup.
@param[in] space_id tablespace identifier
@param[in] flags tablespace flags (NULL if not create)
@@ -184,7 +168,7 @@ struct recv_t{
struct recv_dblwr_t
{
/** Add a page frame to the doublewrite recovery buffer. */
- void add(byte *page) { pages.push_back(page); }
+ void add(byte *page) { pages.push_front(page); }
/** Validate the page.
@param page_id page identifier
@@ -206,7 +190,7 @@ struct recv_dblwr_t
byte* find_page(const page_id_t page_id, const fil_space_t *space= NULL,
byte *tmp_buf= NULL);
- typedef std::list<byte*, ut_allocator<byte*> > list;
+ typedef std::deque<byte*, ut_allocator<byte*> > list;
/** Recovered doublewrite buffer page frames */
list pages;
@@ -227,14 +211,11 @@ struct recv_sys_t{
buf_flush_t flush_type;/*!< type of the flush request.
BUF_FLUSH_LRU: flush end of LRU, keeping free blocks.
BUF_FLUSH_LIST: flush all of blocks. */
- ibool apply_log_recs;
- /*!< this is TRUE when log rec application to
- pages is allowed; this flag tells the
- i/o-handler if it should do log record
- application */
- ibool apply_batch_on;
- /*!< this is TRUE when a log rec application
- batch is running */
+ /** whether recv_recover_page(), invoked from buf_page_io_complete(),
+ should apply log records*/
+ bool apply_log_recs;
+ /** whether recv_apply_hashed_log_recs() is running */
+ bool apply_batch_on;
byte* buf; /*!< buffer for parsing log records */
size_t buf_size; /*!< size of buf */
ulint len; /*!< amount of data in buf */
@@ -288,6 +269,32 @@ struct recv_sys_t{
/** Lastly added LSN to the hash table of log records. */
lsn_t last_stored_lsn;
+ /** Initialize the redo log recovery subsystem. */
+ void create();
+
+ /** Free most recovery data structures. */
+ void debug_free();
+
+ /** Clean up after create() */
+ void close();
+
+ bool is_initialised() const { return buf_size != 0; }
+
+ /** Store a redo log record for applying.
+ @param type record type
+ @param space tablespace identifier
+ @param page_no page number
+ @param body record body
+ @param rec_end end of record
+ @param lsn start LSN of the mini-transaction
+ @param end_lsn end LSN of the mini-transaction */
+ inline void add(mlog_id_t type, ulint space, ulint page_no,
+ byte* body, byte* rec_end, lsn_t lsn,
+ lsn_t end_lsn);
+
+ /** Empty a fully processed set of stored redo log records. */
+ inline void empty();
+
/** Determine whether redo log recovery progress should be reported.
@param[in] time the current time
@return whether progress should be reported
@@ -304,7 +311,7 @@ struct recv_sys_t{
};
/** The recovery system */
-extern recv_sys_t* recv_sys;
+extern recv_sys_t recv_sys;
/** TRUE when applying redo log records during crash recovery; FALSE
otherwise. Note that this is FALSE while a background thread is
diff --git a/storage/innobase/include/mach0data.h b/storage/innobase/include/mach0data.h
index 27f3b986776..d160ddbcb9e 100644
--- a/storage/innobase/include/mach0data.h
+++ b/storage/innobase/include/mach0data.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -29,11 +29,10 @@ Created 11/28/1995 Heikki Tuuri
#define mach0data_h
#include "univ.i"
+#include "mtr0types.h"
#ifndef UNIV_INNOCHECKSUM
-#include "mtr0types.h"
-
/* The data and all fields are always stored in a database file
in the same format: ascii, big-endian, ... .
All data in the files MUST be accessed using the functions in this
@@ -390,17 +389,6 @@ mach_write_ulonglong(
#endif /* !UNIV_INNOCHECKSUM */
-/** Read 1 to 4 bytes from a file page buffered in the buffer pool.
-@param[in] ptr pointer where to read
-@param[in] type MLOG_1BYTE, MLOG_2BYTES, or MLOG_4BYTES
-@return value read */
-UNIV_INLINE
-ulint
-mach_read_ulint(
- const byte* ptr,
- mlog_id_t type)
- MY_ATTRIBUTE((warn_unused_result));
-
#include "mach0data.inl"
#endif
diff --git a/storage/innobase/include/mach0data.inl b/storage/innobase/include/mach0data.inl
index 408044292a5..80bd925d70b 100644
--- a/storage/innobase/include/mach0data.inl
+++ b/storage/innobase/include/mach0data.inl
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -866,28 +866,3 @@ mach_write_ulonglong(
}
#endif /* !UNIV_INNOCHECKSUM */
-
-/** Read 1 to 4 bytes from a file page buffered in the buffer pool.
-@param[in] ptr pointer where to read
-@param[in] type MLOG_1BYTE, MLOG_2BYTES, or MLOG_4BYTES
-@return value read */
-UNIV_INLINE
-ulint
-mach_read_ulint(
- const byte* ptr,
- mlog_id_t type)
-{
- switch (type) {
- case MLOG_1BYTE:
- return(mach_read_from_1(ptr));
- case MLOG_2BYTES:
- return(mach_read_from_2(ptr));
- case MLOG_4BYTES:
- return(mach_read_from_4(ptr));
- default:
- break;
- }
-
- ut_error;
- return(0);
-}
diff --git a/storage/innobase/include/mtr0log.h b/storage/innobase/include/mtr0log.h
index 99348b26165..d8060d106d6 100644
--- a/storage/innobase/include/mtr0log.h
+++ b/storage/innobase/include/mtr0log.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2018, 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
@@ -71,6 +72,23 @@ mlog_log_string(
byte* ptr, /*!< in: pointer written to */
ulint len, /*!< in: string length */
mtr_t* mtr); /*!< in: mini-transaction handle */
+
+/** Initialize a string of bytes.
+@param[in,out] b buffer page
+@param[in] ofs byte offset from block->frame
+@param[in] len length of the data to write
+@param[in] val the data byte to write
+@param[in,out] mtr mini-transaction */
+void
+mlog_memset(buf_block_t* b, ulint ofs, ulint len, byte val, mtr_t* mtr);
+
+/** Initialize a string of bytes.
+@param[in,out] byte byte address
+@param[in] len length of the data to write
+@param[in] val the data byte to write
+@param[in,out] mtr mini-transaction */
+void mlog_memset(byte* b, ulint len, byte val, mtr_t* mtr);
+
/********************************************************//**
Writes initial part of a log record consisting of one-byte item
type and four-byte space and page numbers. */
@@ -180,7 +198,7 @@ mlog_parse_initial_log_record(
ulint* space, /*!< out: space id */
ulint* page_no);/*!< out: page number */
/********************************************************//**
-Parses a log record written by mlog_write_ulint or mlog_write_ull.
+Parses a log record written by mlog_write_ulint, mlog_write_ull, mlog_memset.
@return parsed record end, NULL if not a complete record */
byte*
mlog_parse_nbytes(
diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h
index 1ff695f0ddb..f8a15aef7f9 100644
--- a/storage/innobase/include/mtr0mtr.h
+++ b/storage/innobase/include/mtr0mtr.h
@@ -54,10 +54,6 @@ savepoint. */
@return old mode */
#define mtr_set_log_mode(m, d) (m)->set_log_mode((d))
-/** Read 1 - 4 bytes from a file page buffered in the buffer pool.
-@return value read */
-#define mtr_read_ulint(p, t, m) (m)->read_ulint((p), (t))
-
/** Release an object in the memo stack.
@return true if released */
#define mtr_memo_release(m, o, t) \
@@ -243,13 +239,6 @@ struct mtr_t {
bool is_named_space(const fil_space_t* space) const;
#endif /* UNIV_DEBUG */
- /** Read 1 - 4 bytes from a file page buffered in the buffer pool.
- @param ptr pointer from where to read
- @param type) MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES
- @return value read */
- inline ulint read_ulint(const byte* ptr, mlog_id_t type) const
- MY_ATTRIBUTE((warn_unused_result));
-
/** Acquire a tablespace X-latch.
@param[in] space_id tablespace ID
@param[in] file file name from where called
diff --git a/storage/innobase/include/mtr0mtr.inl b/storage/innobase/include/mtr0mtr.inl
index 3714d4bce06..c35de2bcbf9 100644
--- a/storage/innobase/include/mtr0mtr.inl
+++ b/storage/innobase/include/mtr0mtr.inl
@@ -172,7 +172,7 @@ mtr_t::release_block_at_savepoint(
buf_page_release_latch(block, slot->type);
- buf_block_unfix(reinterpret_cast<buf_block_t*>(block));
+ reinterpret_cast<buf_block_t*>(block)->unfix();
slot->object = NULL;
}
@@ -227,21 +227,3 @@ mtr_t::set_log_mode(mtr_log_t mode)
ut_ad(0);
return(old_mode);
}
-
-/**
-Reads 1 - 4 bytes from a file page buffered in the buffer pool.
-@return value read */
-
-ulint
-mtr_t::read_ulint(const byte* ptr, mlog_id_t type) const
-{
- ut_ad(is_active());
-
- ut_ad(memo_contains_page_flagged(
- ptr,
- MTR_MEMO_PAGE_S_FIX
- | MTR_MEMO_PAGE_X_FIX
- | MTR_MEMO_PAGE_SX_FIX));
-
- return(mach_read_ulint(ptr, type));
-}
diff --git a/storage/innobase/include/mtr0types.h b/storage/innobase/include/mtr0types.h
index 25406fa6aee..2d49cc4f5e2 100644
--- a/storage/innobase/include/mtr0types.h
+++ b/storage/innobase/include/mtr0types.h
@@ -120,7 +120,7 @@ enum mlog_id_t {
/** mark an index record as the predefined minimum record */
MLOG_REC_MIN_MARK = 26,
- /** initialize an ibuf bitmap page */
+ /** initialize an ibuf bitmap page (used in MariaDB 10.2 and 10.3) */
MLOG_IBUF_BITMAP_INIT = 27,
#ifdef UNIV_LOG_LSN_DEBUG
@@ -218,7 +218,8 @@ enum mlog_id_t {
/** initialize a file page */
MLOG_INIT_FILE_PAGE2 = 59,
- /** Table is being truncated. (Marked only for file-per-table) */
+ /** Table is being truncated. (Was used in 10.2 and 10.3;
+ not supported for crash-upgrade to 10.4 or later.) */
MLOG_TRUNCATE = 60,
/** notify that an index tree is being loaded without writing
@@ -229,8 +230,14 @@ enum mlog_id_t {
of a ROW_FORMAT=COMPRESSED table */
MLOG_ZIP_WRITE_TRX_ID = 62,
+ /** initialize a page with a string of identical bytes */
+ MLOG_MEMSET = 63,
+
+ /** Zero-fill a page that is not allocated. */
+ MLOG_INIT_FREE_PAGE = 64,
+
/** biggest value (used in assertions) */
- MLOG_BIGGEST_TYPE = MLOG_ZIP_WRITE_TRX_ID,
+ MLOG_BIGGEST_TYPE = MLOG_INIT_FREE_PAGE,
/** log record for writing/updating crypt data of
a tablespace */
diff --git a/storage/innobase/include/os0api.h b/storage/innobase/include/os0api.h
index 6f42d968c8e..3be7c0afaa4 100644
--- a/storage/innobase/include/os0api.h
+++ b/storage/innobase/include/os0api.h
@@ -1,6 +1,6 @@
/***********************************************************************
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -54,22 +54,4 @@ buf_page_get_trim_length(
ulint write_length)
MY_ATTRIBUTE((warn_unused_result));
-/**
-Get should we punch hole to tablespace.
-@param[in] space Tablespace
-@return true, if punch hole should be tried, false if not. */
-bool
-fil_node_should_punch_hole(
- const fil_node_t* node)
- MY_ATTRIBUTE((warn_unused_result));
-
-/**
-Set punch hole to tablespace to given value.
-@param[in] space Tablespace
-@param[in] val value to be set. */
-void
-fil_space_set_punch_hole(
- fil_node_t* node,
- bool val);
-
#endif /* OS_API_H */
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index 159a4789f17..646f964df7f 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -36,7 +36,7 @@ Created 10/21/1995 Heikki Tuuri
#ifndef os0file_h
#define os0file_h
-#include "page0size.h"
+#include "fsp0types.h"
#include "os0api.h"
#ifndef _WIN32
@@ -45,6 +45,8 @@ Created 10/21/1995 Heikki Tuuri
#include <time.h>
#endif /* !_WIN32 */
+#include "my_counter.h"
+
/** File node of a tablespace or the log data space */
struct fil_node_t;
struct fil_space_t;
@@ -56,8 +58,6 @@ typedef ib_uint64_t os_offset_t;
#ifdef _WIN32
-typedef HANDLE os_file_dir_t; /*!< directory stream */
-
/** We define always WIN_ASYNC_IO, and check at run-time whether
the OS actually supports it: Win 95 does not, NT does. */
# define WIN_ASYNC_IO
@@ -71,8 +71,6 @@ typedef HANDLE os_file_t;
#else /* _WIN32 */
-typedef DIR* os_file_dir_t; /*!< directory stream */
-
/** File handle */
typedef int os_file_t;
@@ -360,17 +358,8 @@ public:
/** Set the pointer to file node for IO
@param[in] node File node */
- void set_fil_node(fil_node_t* node)
- {
- if (node && !fil_node_should_punch_hole(node)) {
- clear_punch_hole();
- }
+ inline void set_fil_node(fil_node_t* node);
- m_fil_node = node;
- }
-
- /** Compare two requests
- @reutrn true if the are equal */
bool operator==(const IORequest& rhs) const
{
return(m_type == rhs.m_type);
@@ -414,17 +403,7 @@ public:
: 0);
}
- bool should_punch_hole() const {
- return (m_fil_node ?
- fil_node_should_punch_hole(m_fil_node)
- : false);
- }
-
- void space_no_punch_hole() const {
- if (m_fil_node) {
- fil_space_set_punch_hole(m_fil_node, false);
- }
- }
+ inline bool should_punch_hole() const;
/** Free storage space associated with a section of the file.
@param[in] fh Open file handle
@@ -478,7 +457,7 @@ or write, causing a bottleneck for parallelism. */
static const ulint OS_AIO_SYNC = 24;
/* @} */
-extern ulint os_n_file_reads;
+extern Atomic_counter<ulint> os_n_file_reads;
extern ulint os_n_file_writes;
extern ulint os_n_fsyncs;
@@ -532,43 +511,6 @@ parameter (--tmpdir).
FILE*
os_file_create_tmpfile();
-/** The os_file_opendir() function opens a directory stream corresponding to the
-directory named by the dirname argument. The directory stream is positioned
-at the first entry. In both Unix and Windows we automatically skip the '.'
-and '..' items at the start of the directory listing.
-
-@param[in] dirname directory name; it must not contain a trailing
- '\' or '/'
-@param[in] is_fatal true if we should treat an error as a fatal
- error; if we try to open symlinks then we do
- not wish a fatal error if it happens not to be
- a directory
-@return directory stream, NULL if error */
-os_file_dir_t
-os_file_opendir(
- const char* dirname,
- bool is_fatal);
-
-/**
-Closes a directory stream.
-@param[in] dir directory stream
-@return 0 if success, -1 if failure */
-int
-os_file_closedir(
- os_file_dir_t dir);
-
-/** This function returns information of the next file in the directory. We jump
-over the '.' and '..' entries in the directory.
-@param[in] dirname directory name or path
-@param[in] dir directory stream
-@param[out] info buffer where the info is returned
-@return 0 if ok, -1 if error, 1 if at the end of the directory */
-int
-os_file_readdir_next_file(
- const char* dirname,
- os_file_dir_t dir,
- os_file_stat_t* info);
-
/**
This function attempts to create a directory named pathname. The new directory
gets default permissions. On Unix, the permissions are (0770 & ~umask). If the
@@ -1593,19 +1535,6 @@ os_file_change_size_win32(
#endif /*_WIN32 */
-/** Check if the file system supports sparse files.
-
-Warning: On POSIX systems we try and punch a hole from offset 0 to
-the system configured page size. This should only be called on an empty
-file.
-
-@param[in] fh File handle for the file - if opened
-@return true if the file system supports sparse files */
-bool
-os_is_sparse_file_supported(
- os_file_t fh)
- MY_ATTRIBUTE((warn_unused_result));
-
/** Free storage space associated with a section of the file.
@param[in] fh Open file handle
@param[in] off Starting offset (SEEK_SET)
@@ -1645,16 +1574,6 @@ is_absolute_path(
return(false);
}
-/***********************************************************************//**
-Try to get number of bytes per sector from file system.
-@return file block size */
-UNIV_INTERN
-ulint
-os_file_get_block_size(
-/*===================*/
- os_file_t file, /*!< in: handle to a file */
- const char* name); /*!< in: file name */
-
#include "os0file.inl"
#endif /* os0file_h */
diff --git a/storage/innobase/include/os0proc.h b/storage/innobase/include/os0proc.h
index 9b0b3cbf628..d8952a56cc9 100644
--- a/storage/innobase/include/os0proc.h
+++ b/storage/innobase/include/os0proc.h
@@ -40,7 +40,7 @@ typedef unsigned long int os_process_id_t;
/** The total amount of memory currently allocated from the operating
system with os_mem_alloc_large(). */
-extern ulint os_total_large_mem_allocated;
+extern Atomic_counter<ulint> os_total_large_mem_allocated;
/** Converts the current process id to a number.
@return process id as a number */
diff --git a/storage/innobase/include/os0thread.h b/storage/innobase/include/os0thread.h
index d99bc841de9..67ee3097274 100644
--- a/storage/innobase/include/os0thread.h
+++ b/storage/innobase/include/os0thread.h
@@ -73,7 +73,7 @@ typedef unsigned int mysql_pfs_key_t;
#endif /* HAVE_PSI_INTERFACE */
/** Number of threads active. */
-extern ulint os_thread_count;
+extern Atomic_counter<ulint> os_thread_count;
/***************************************************************//**
Compares two thread ids for equality.
diff --git a/storage/innobase/include/page0cur.inl b/storage/innobase/include/page0cur.inl
index 7896aa64792..e53f6d8f463 100644
--- a/storage/innobase/include/page0cur.inl
+++ b/storage/innobase/include/page0cur.inl
@@ -24,12 +24,7 @@ The page cursor
Created 10/4/1994 Heikki Tuuri
*************************************************************************/
-#include "page0page.h"
-#include "buf0types.h"
-
#ifdef UNIV_DEBUG
-# include "rem0cmp.h"
-
/*********************************************************//**
Gets pointer to the page frame where the cursor is positioned.
@return page */
@@ -281,6 +276,7 @@ page_cur_tuple_insert(
page_is_leaf(cursor->block->frame)
? index->n_core_fields : 0,
ULINT_UNDEFINED, heap);
+ ut_ad(size == rec_offs_size(*offsets));
if (buf_block_get_page_zip(cursor->block)) {
rec = page_cur_insert_rec_zip(
diff --git a/storage/innobase/include/page0page.h b/storage/innobase/include/page0page.h
index 5bf0db58092..e80a9a050fe 100644
--- a/storage/innobase/include/page0page.h
+++ b/storage/innobase/include/page0page.h
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2020, MariaDB Corporation.
+Copyright (c) 2013, 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
@@ -27,29 +27,23 @@ Created 2/2/1994 Heikki Tuuri
#define page0page_h
#include "page0types.h"
-#ifndef UNIV_INNOCHECKSUM
+#include "fsp0fsp.h"
#include "fil0fil.h"
#include "buf0buf.h"
-#include "data0data.h"
-#include "dict0dict.h"
-#include "rem0types.h"
#include "rem0rec.h"
-#endif /* !UNIV_INNOCHECKSUM*/
-#include "fsp0fsp.h"
#ifndef UNIV_INNOCHECKSUM
+#include "dict0dict.h"
+#include "data0data.h"
#include "mtr0mtr.h"
-#ifdef UNIV_MATERIALIZE
-#undef UNIV_INLINE
-#define UNIV_INLINE
-#endif
-
/* PAGE HEADER
===========
Index page header starts at the first offset left free by the FIL-module */
typedef byte page_header_t;
+#else
+# include "mach0data.h"
#endif /* !UNIV_INNOCHECKSUM */
#define PAGE_HEADER FSEG_PAGE_DATA /* index page header starts at this
@@ -164,12 +158,12 @@ Otherwise written as 0. @see PAGE_ROOT_AUTO_INC */
not necessarily collation order;
this record may have been deleted */
-/* Directions of cursor movement */
-#define PAGE_LEFT 1
-#define PAGE_RIGHT 2
-#define PAGE_SAME_REC 3
-#define PAGE_SAME_PAGE 4
-#define PAGE_NO_DIRECTION 5
+/* Directions of cursor movement (stored in PAGE_DIRECTION field) */
+constexpr uint16_t PAGE_LEFT= 1;
+constexpr uint16_t PAGE_RIGHT= 2;
+constexpr uint16_t PAGE_SAME_REC= 3;
+constexpr uint16_t PAGE_SAME_PAGE= 4;
+constexpr uint16_t PAGE_NO_DIRECTION= 5;
#ifndef UNIV_INNOCHECKSUM
@@ -576,7 +570,7 @@ page_get_middle_rec(
Gets the page number.
@return page number */
UNIV_INLINE
-ulint
+uint32_t
page_get_page_no(
/*=============*/
const page_t* page); /*!< in: page */
@@ -585,7 +579,7 @@ page_get_page_no(
Gets the tablespace identifier.
@return space id */
UNIV_INLINE
-ulint
+uint32_t
page_get_space_id(
/*==============*/
const page_t* page); /*!< in: page */
@@ -999,13 +993,6 @@ page_get_direction(const page_t* page)
inline
uint16_t
page_get_instant(const page_t* page);
-/** Assign the PAGE_INSTANT field.
-@param[in,out] page clustered index root page
-@param[in] n original number of clustered index fields
-@param[in,out] mtr mini-transaction */
-inline
-void
-page_set_instant(page_t* page, unsigned n, mtr_t* mtr);
/**********************************************************//**
Create an uncompressed B-tree index page.
@@ -1027,16 +1014,10 @@ page_create_zip(
buf_block_t* block, /*!< in/out: a buffer frame
where the page is created */
dict_index_t* index, /*!< in: the index of the
- page, or NULL when applying
- TRUNCATE log
- record during recovery */
+ page */
ulint level, /*!< in: the B-tree level of
the page */
trx_id_t max_trx_id, /*!< in: PAGE_MAX_TRX_ID */
- const redo_page_compress_t* page_comp_info,
- /*!< in: used for applying
- TRUNCATE log
- record during recovery */
mtr_t* mtr); /*!< in/out: mini-transaction
handle */
/**********************************************************//**
@@ -1324,11 +1305,6 @@ const rec_t*
page_find_rec_max_not_deleted(
const page_t* page);
-#ifdef UNIV_MATERIALIZE
-#undef UNIV_INLINE
-#define UNIV_INLINE UNIV_INLINE_ORIGINAL
-#endif
-
#endif /* !UNIV_INNOCHECKSUM */
#include "page0page.inl"
diff --git a/storage/innobase/include/page0page.inl b/storage/innobase/include/page0page.inl
index d1bf382c1d5..04e850ea301 100644
--- a/storage/innobase/include/page0page.inl
+++ b/storage/innobase/include/page0page.inl
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2020, MariaDB Corporation.
+Copyright (c) 2016, 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
@@ -29,18 +29,10 @@ Created 2/2/1994 Heikki Tuuri
#ifndef UNIV_INNOCHECKSUM
#include "mach0data.h"
-#ifdef UNIV_DEBUG
-# include "log0recv.h"
-#endif /* !UNIV_DEBUG */
#include "rem0cmp.h"
#include "mtr0log.h"
#include "page0zip.h"
-#ifdef UNIV_MATERIALIZE
-#undef UNIV_INLINE
-#define UNIV_INLINE
-#endif
-
/*************************************************************//**
Returns the max trx id field value. */
UNIV_INLINE
@@ -429,7 +421,7 @@ page_get_middle_rec(
Gets the page number.
@return page number */
UNIV_INLINE
-ulint
+uint32_t
page_get_page_no(
/*=============*/
const page_t* page) /*!< in: page */
@@ -443,7 +435,7 @@ page_get_page_no(
Gets the tablespace identifier.
@return space id */
UNIV_INLINE
-ulint
+uint32_t
page_get_space_id(
/*==============*/
const page_t* page) /*!< in: page */
@@ -1101,31 +1093,8 @@ page_get_instant(const page_t* page)
break;
}
#endif /* UNIV_DEBUG */
- return(i >> 3);
-}
-
-/** Assign the PAGE_INSTANT field.
-@param[in,out] page clustered index root page
-@param[in] n original number of clustered index fields
-@param[in,out] mtr mini-transaction */
-inline
-void
-page_set_instant(page_t* page, unsigned n, mtr_t* mtr)
-{
- ut_ad(fil_page_get_type(page) == FIL_PAGE_TYPE_INSTANT);
- ut_ad(n > 0);
- ut_ad(n < REC_MAX_N_FIELDS);
- uint16_t i = page_header_get_field(page, PAGE_INSTANT);
- ut_ad(i <= PAGE_NO_DIRECTION);
- i |= n << 3;
- mlog_write_ulint(PAGE_HEADER + PAGE_INSTANT + page, i,
- MLOG_2BYTES, mtr);
+ return static_cast<uint16_t>(i >> 3); /* i / 8 */
}
#endif /* !UNIV_INNOCHECKSUM */
-#ifdef UNIV_MATERIALIZE
-#undef UNIV_INLINE
-#define UNIV_INLINE UNIV_INLINE_ORIGINAL
-#endif
-
#endif
diff --git a/storage/innobase/include/page0size.h b/storage/innobase/include/page0size.h
deleted file mode 100644
index ca1e704eda1..00000000000
--- a/storage/innobase/include/page0size.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 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 Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-*****************************************************************************/
-
-/**************************************************//**
-@file include/page0size.h
-A class describing a page size.
-
-Created Nov 14, 2013 Vasil Dimov
-*******************************************************/
-
-#ifndef page0size_t
-#define page0size_t
-
-#include "fsp0types.h"
-
-#define FIELD_REF_SIZE 20U
-
-/** A BLOB field reference full of zero, for use in assertions and
-tests.Initially, BLOB field references are set to zero, in
-dtuple_convert_big_rec(). */
-extern const byte field_ref_zero[UNIV_PAGE_SIZE_MAX];
-
-#define PAGE_SIZE_T_SIZE_BITS 17
-
-/** Page size descriptor. Contains the physical and logical page size, as well
-as whether the page is compressed or not. */
-class page_size_t {
-public:
- /** Constructor from (physical, logical, is_compressed).
- @param[in] physical physical (on-disk/zipped) page size
- @param[in] logical logical (in-memory/unzipped) page size
- @param[in] is_compressed whether the page is compressed */
- page_size_t(ulint physical, ulint logical, bool is_compressed)
- {
- if (physical == 0) {
- physical = UNIV_PAGE_SIZE_ORIG;
- }
- if (logical == 0) {
- logical = UNIV_PAGE_SIZE_ORIG;
- }
-
- m_physical = static_cast<unsigned>(physical);
- m_logical = static_cast<unsigned>(logical);
- m_is_compressed = static_cast<unsigned>(is_compressed);
-
- ut_ad(physical <= (1 << PAGE_SIZE_T_SIZE_BITS));
- ut_ad(logical <= (1 << PAGE_SIZE_T_SIZE_BITS));
-
- ut_ad(ut_is_2pow(physical));
- ut_ad(ut_is_2pow(logical));
-
- ut_ad(logical <= UNIV_PAGE_SIZE_MAX);
- ut_ad(logical >= physical);
- ut_ad(!is_compressed || physical <= UNIV_ZIP_SIZE_MAX);
- }
-
- /** Constructor from (fsp_flags).
- @param[in] fsp_flags filespace flags */
- explicit page_size_t(ulint fsp_flags)
- {
- ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(fsp_flags);
-
- /* If the logical page size is zero in fsp_flags, then use the
- legacy 16k page size. */
- ssize = (0 == ssize) ? UNIV_PAGE_SSIZE_ORIG : ssize;
-
- /* Convert from a 'log2 minus 9' to a page size in bytes. */
- const unsigned size = ((UNIV_ZIP_SIZE_MIN >> 1) << ssize);
-
- ut_ad(size <= UNIV_PAGE_SIZE_MAX);
- ut_ad(size <= (1 << PAGE_SIZE_T_SIZE_BITS));
-
- m_logical = size;
-
- ssize = FSP_FLAGS_GET_ZIP_SSIZE(fsp_flags);
-
- /* If the fsp_flags have zero in the zip_ssize field, then it means
- that the tablespace does not have compressed pages and the physical
- page size is the same as the logical page size. */
- if (ssize == 0) {
- m_is_compressed = false;
- m_physical = m_logical;
- } else {
- m_is_compressed = true;
-
- /* Convert from a 'log2 minus 9' to a page size
- in bytes. */
- const unsigned phy
- = ((UNIV_ZIP_SIZE_MIN >> 1) << ssize);
-
- ut_ad(phy <= UNIV_ZIP_SIZE_MAX);
- ut_ad(phy <= (1 << PAGE_SIZE_T_SIZE_BITS));
-
- m_physical = phy;
- }
- }
-
- /** Retrieve the physical page size (on-disk).
- @return physical page size in bytes */
- inline ulint physical() const
- {
- ut_ad(m_physical > 0);
-
- return(m_physical);
- }
-
- /** Retrieve the logical page size (in-memory).
- @return logical page size in bytes */
- inline ulint logical() const
- {
- ut_ad(m_logical > 0);
- return(m_logical);
- }
-
- /** Check whether the page is compressed on disk.
- @return true if compressed */
- inline bool is_compressed() const
- {
- return(m_is_compressed);
- }
-
- /** Copy the values from a given page_size_t object.
- @param[in] src page size object whose values to fetch */
- inline void copy_from(const page_size_t& src)
- {
- *this = src;
- }
-
- /** Check if a given page_size_t object is equal to the current one.
- @param[in] a page_size_t object to compare
- @return true if equal */
- inline bool equals_to(const page_size_t& a) const
- {
- return(a.physical() == m_physical
- && a.logical() == m_logical
- && a.is_compressed() == m_is_compressed);
- }
-
-private:
-
- /* For non compressed tablespaces, physical page size is equal to
- the logical page size and the data is stored in buf_page_t::frame
- (and is also always equal to univ_page_size (--innodb-page-size=)).
-
- For compressed tablespaces, physical page size is the compressed
- page size as stored on disk and in buf_page_t::zip::data. The logical
- page size is the uncompressed page size in memory - the size of
- buf_page_t::frame (currently also always equal to univ_page_size
- (--innodb-page-size=)). */
-
- /** Physical page size. */
- unsigned m_physical:PAGE_SIZE_T_SIZE_BITS;
-
- /** Logical page size. */
- unsigned m_logical:PAGE_SIZE_T_SIZE_BITS;
-
- /** Flag designating whether the physical page is compressed, which is
- true IFF the whole tablespace where the page belongs is compressed. */
- unsigned m_is_compressed:1;
-};
-
-/* Overloading the global output operator to conveniently print an object
-of type the page_size_t.
-@param[in,out] out the output stream
-@param[in] obj an object of type page_size_t to be printed
-@retval the output stream */
-inline
-std::ostream&
-operator<<(
- std::ostream& out,
- const page_size_t& obj)
-{
- out << "[page size: physical=" << obj.physical()
- << ", logical=" << obj.logical()
- << ", compressed=" << obj.is_compressed() << "]";
- return(out);
-}
-
-extern page_size_t univ_page_size;
-
-#endif /* page0size_t */
diff --git a/storage/innobase/include/page0types.h b/storage/innobase/include/page0types.h
index 0fcaebd0e43..14ccc2eae36 100644
--- a/storage/innobase/include/page0types.h
+++ b/storage/innobase/include/page0types.h
@@ -84,18 +84,6 @@ enum page_cur_mode_t {
PAGE_CUR_RTREE_GET_FATHER = 14
};
-
-/** The information used for compressing a page when applying
-TRUNCATE log record during recovery */
-struct redo_page_compress_t {
- ulint type; /*!< index type */
- index_id_t index_id; /*!< index id */
- ulint n_fields; /*!< number of index fields */
- ulint field_len; /*!< the length of index field */
- const byte* fields; /*!< index field information */
- ulint trx_id_pos; /*!< position of trx-id column. */
-};
-
/** Compressed page descriptor */
struct page_zip_des_t
{
diff --git a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0zip.h
index de734f67444..4c2c88e6de0 100644
--- a/storage/innobase/include/page0zip.h
+++ b/storage/innobase/include/page0zip.h
@@ -28,28 +28,11 @@ Created June 2005 by Marko Makela
#ifndef page0zip_h
#define page0zip_h
-#ifdef UNIV_MATERIALIZE
-# undef UNIV_INLINE
-# define UNIV_INLINE
-#endif
-
-#ifdef UNIV_INNOCHECKSUM
-#include "buf0buf.h"
-#include "ut0crc32.h"
-#include "buf0checksum.h"
-#include "mach0data.h"
-#include "zlib.h"
-#endif /* UNIV_INNOCHECKSUM */
+#include "buf0types.h"
#ifndef UNIV_INNOCHECKSUM
#include "mtr0types.h"
#include "page0types.h"
-#endif /* !UNIV_INNOCHECKSUM */
-
-#include "buf0types.h"
-#include "rem0types.h"
-
-#ifndef UNIV_INNOCHECKSUM
#include "dict0types.h"
#include "srv0srv.h"
#include "trx0types.h"
@@ -103,15 +86,10 @@ page_zip_set_size(
@param[in] comp nonzero=compact format
@param[in] n_fields number of fields in the record; ignored if
tablespace is not compressed
-@param[in] page_size page size
-@return FALSE if the entire record can be stored locally on the page */
-UNIV_INLINE
-ibool
-page_zip_rec_needs_ext(
- ulint rec_size,
- ulint comp,
- ulint n_fields,
- const page_size_t& page_size)
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@return false if the entire record can be stored locally on the page */
+inline bool page_zip_rec_needs_ext(ulint rec_size, ulint comp, ulint n_fields,
+ ulint zip_size)
MY_ATTRIBUTE((warn_unused_result));
/**********************************************************************//**
@@ -164,10 +142,6 @@ page_zip_compress(
dict_index_t* index, /*!< in: index of the B-tree
node */
ulint level, /*!< in: commpression level */
- const redo_page_compress_t* page_comp_info,
- /*!< in: used for applying
- TRUNCATE log
- record during recovery */
mtr_t* mtr); /*!< in/out: mini-transaction,
or NULL */
@@ -516,12 +490,7 @@ uint32_t
page_zip_calc_checksum(
const void* data,
ulint size,
- srv_checksum_algorithm_t algo
-#ifdef INNODB_BUG_ENDIAN_CRC32
- /** for crc32, use the big-endian bug-compatible crc32 variant */
- , bool use_legacy_big_endian = false
-#endif
-);
+ srv_checksum_algorithm_t algo);
/** Validate the checksum on a ROW_FORMAT=COMPRESSED page.
@param data ROW_FORMAT=COMPRESSED page
@@ -562,11 +531,6 @@ void
page_zip_reset_stat_per_index();
/*===========================*/
-#ifdef UNIV_MATERIALIZE
-# undef UNIV_INLINE
-# define UNIV_INLINE UNIV_INLINE_ORIGINAL
-#endif
-
#include "page0zip.inl"
#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/include/page0zip.inl b/storage/innobase/include/page0zip.inl
index 4e4ccdb492f..337debd30e9 100644
--- a/storage/innobase/include/page0zip.inl
+++ b/storage/innobase/include/page0zip.inl
@@ -2,7 +2,7 @@
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -25,11 +25,6 @@ Compressed page interface
Created June 2005 by Marko Makela
*******************************************************/
-#ifdef UNIV_MATERIALIZE
-# undef UNIV_INLINE
-# define UNIV_INLINE
-#endif
-
#include "page0zip.h"
#include "mtr0log.h"
#include "page0page.h"
@@ -154,22 +149,17 @@ page_zip_set_size(
@param[in] comp nonzero=compact format
@param[in] n_fields number of fields in the record; ignored if
tablespace is not compressed
-@param[in] page_size page size
-@return FALSE if the entire record can be stored locally on the page */
-UNIV_INLINE
-ibool
-page_zip_rec_needs_ext(
- ulint rec_size,
- ulint comp,
- ulint n_fields,
- const page_size_t& page_size)
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
+@return false if the entire record can be stored locally on the page */
+inline bool page_zip_rec_needs_ext(ulint rec_size, ulint comp, ulint n_fields,
+ ulint zip_size)
{
/* FIXME: row size check is this function seems to be the most correct.
Put it in a separate function and use in more places of InnoDB */
ut_ad(rec_size
> ulint(comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
- ut_ad(comp || !page_size.is_compressed());
+ ut_ad(comp || !zip_size);
#if UNIV_PAGE_SIZE_MAX > COMPRESSED_REC_MAX_DATA_SIZE
if (comp ? rec_size >= COMPRESSED_REC_MAX_DATA_SIZE :
@@ -178,7 +168,7 @@ page_zip_rec_needs_ext(
}
#endif
- if (page_size.is_compressed()) {
+ if (zip_size) {
ut_ad(comp);
/* On a compressed page, there is a two-byte entry in
the dense page directory for every record. But there
@@ -187,7 +177,7 @@ page_zip_rec_needs_ext(
the encoded heap number. Check also the available space
on the uncompressed page. */
return(rec_size - (REC_N_NEW_EXTRA_BYTES - 2 - 1)
- >= page_zip_empty_size(n_fields, page_size.physical())
+ >= page_zip_empty_size(n_fields, zip_size)
|| rec_size >= page_get_free_space_of_empty(TRUE) / 2);
}
@@ -417,7 +407,7 @@ page_zip_parse_compress_no_data(
was successful. Crash in this case. */
if (page
- && !page_zip_compress(page_zip, page, index, level, NULL, NULL)) {
+ && !page_zip_compress(page_zip, page, index, level, NULL)) {
ut_error;
}
@@ -440,8 +430,3 @@ page_zip_reset_stat_per_index()
mutex_exit(&page_zip_stat_per_index_mutex);
}
-
-#ifdef UNIV_MATERIALIZE
-# undef UNIV_INLINE
-# define UNIV_INLINE UNIV_INLINE_ORIGINAL
-#endif
diff --git a/storage/innobase/include/que0que.h b/storage/innobase/include/que0que.h
index 7c51403e7d2..594219bd5d9 100644
--- a/storage/innobase/include/que0que.h
+++ b/storage/innobase/include/que0que.h
@@ -284,9 +284,9 @@ que_eval_sql(
/*=========*/
pars_info_t* info, /*!< in: info struct, or NULL */
const char* sql, /*!< in: SQL string */
- ibool reserve_dict_mutex,
- /*!< in: if TRUE, acquire/release
- dict_sys->mutex around call to pars_sql. */
+ bool reserve_dict_mutex,
+ /*!< in: whether to acquire/release
+ dict_sys.mutex around call to pars_sql. */
trx_t* trx); /*!< in: trx */
/**********************************************************************//**
diff --git a/storage/innobase/include/read0types.h b/storage/innobase/include/read0types.h
index c0faf84cfbe..48575feda10 100644
--- a/storage/innobase/include/read0types.h
+++ b/storage/innobase/include/read0types.h
@@ -66,7 +66,14 @@ class ReadView
Close view:
READ_VIEW_STATE_OPEN -> READ_VIEW_STATE_CLOSED
*/
- int32_t m_state;
+ std::atomic<uint32_t> m_state;
+
+
+ /** m_state getter for ReadView owner thread */
+ uint32_t state() const
+ {
+ return m_state.load(std::memory_order_relaxed);
+ }
public:
@@ -134,35 +141,36 @@ loop:
Closes the view.
View becomes not visible to purge thread.
+
+ This method is intended to be called by ReadView owner thread, thus
+ m_state cannot change.
*/
void close()
{
- ut_ad(m_state == READ_VIEW_STATE_CLOSED ||
- m_state == READ_VIEW_STATE_OPEN);
- if (m_state == READ_VIEW_STATE_OPEN)
- my_atomic_store32_explicit(&m_state, READ_VIEW_STATE_CLOSED,
- MY_MEMORY_ORDER_RELAXED);
+ ut_ad(state() == READ_VIEW_STATE_CLOSED ||
+ state() == READ_VIEW_STATE_OPEN);
+ m_state.store(READ_VIEW_STATE_CLOSED, std::memory_order_relaxed);
}
/** m_state getter for trx_sys::clone_oldest_view() trx_sys::size(). */
- int32_t get_state() const
+ uint32_t get_state() const
{
- return my_atomic_load32_explicit(const_cast<int32*>(&m_state),
- MY_MEMORY_ORDER_ACQUIRE);
+ return m_state.load(std::memory_order_acquire);
}
/**
Returns true if view is open.
- Only used by view owner thread, thus we can omit atomic operations.
+ This method is intended to be called by ReadView owner thread, thus
+ m_state cannot change.
*/
bool is_open() const
{
- ut_ad(m_state == READ_VIEW_STATE_OPEN ||
- m_state == READ_VIEW_STATE_CLOSED);
- return m_state == READ_VIEW_STATE_OPEN;
+ ut_ad(state() == READ_VIEW_STATE_OPEN ||
+ state() == READ_VIEW_STATE_CLOSED);
+ return state() == READ_VIEW_STATE_OPEN;
}
diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h
index 5f725c0ba49..23956dcb068 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -38,15 +38,6 @@ Created 5/30/1994 Heikki Tuuri
#include <ostream>
#include <sstream>
-/* Info bit denoting the predefined minimum record: this bit is set
-if and only if the record is the first user record on a non-leaf
-B-tree page that is the leftmost page on its level
-(PAGE_LEVEL is nonzero and FIL_PAGE_PREV is FIL_NULL). */
-#define REC_INFO_MIN_REC_FLAG 0x10UL
-/* The deleted flag in info bits */
-#define REC_INFO_DELETED_FLAG 0x20UL /* when bit is set to 1, it means the
- record has been delete marked */
-
/* Number of extra bytes in an old-style record,
in addition to the data and the offsets */
#define REC_N_OLD_EXTRA_BYTES 6
@@ -54,26 +45,6 @@ in addition to the data and the offsets */
in addition to the data and the offsets */
#define REC_N_NEW_EXTRA_BYTES 5
-/** Record status values for ROW_FORMAT=COMPACT,DYNAMIC,COMPRESSED */
-enum rec_comp_status_t {
- /** User record (PAGE_LEVEL=0, heap>=PAGE_HEAP_NO_USER_LOW) */
- REC_STATUS_ORDINARY = 0,
- /** Node pointer record (PAGE_LEVEL>=0, heap>=PAGE_HEAP_NO_USER_LOW) */
- REC_STATUS_NODE_PTR = 1,
- /** The page infimum pseudo-record (heap=PAGE_HEAP_NO_INFIMUM) */
- REC_STATUS_INFIMUM = 2,
- /** The page supremum pseudo-record (heap=PAGE_HEAP_NO_SUPREMUM) */
- REC_STATUS_SUPREMUM = 3,
- /** Clustered index record that has been inserted or updated
- after instant ADD COLUMN (more than dict_index_t::n_core_fields) */
- REC_STATUS_COLUMNS_ADDED = 4
-};
-
-/** The dtuple_t::info_bits of the metadata pseudo-record.
-@see rec_is_metadata() */
-static const byte REC_INFO_METADATA
- = REC_INFO_MIN_REC_FLAG | REC_STATUS_COLUMNS_ADDED;
-
#define REC_NEW_STATUS 3 /* This is single byte bit-field */
#define REC_NEW_STATUS_MASK 0x7UL
#define REC_NEW_STATUS_SHIFT 0
@@ -336,7 +307,7 @@ rec_comp_status_t
rec_get_status(const rec_t* rec)
{
byte bits = rec[-REC_NEW_STATUS] & REC_NEW_STATUS_MASK;
- ut_ad(bits <= REC_STATUS_COLUMNS_ADDED);
+ ut_ad(bits <= REC_STATUS_INSTANT);
return static_cast<rec_comp_status_t>(bits);
}
@@ -347,12 +318,12 @@ inline
void
rec_set_status(rec_t* rec, byte bits)
{
- ut_ad(bits <= REC_STATUS_COLUMNS_ADDED);
+ ut_ad(bits <= REC_STATUS_INSTANT);
rec[-REC_NEW_STATUS] = (rec[-REC_NEW_STATUS] & ~REC_NEW_STATUS_MASK)
| bits;
}
-/** Get the length of added field count in a REC_STATUS_COLUMNS_ADDED record.
+/** Get the length of added field count in a REC_STATUS_INSTANT record.
@param[in] n_add_field number of added fields, minus one
@return storage size of the field count, in bytes */
inline unsigned rec_get_n_add_field_len(ulint n_add_field)
@@ -361,8 +332,26 @@ inline unsigned rec_get_n_add_field_len(ulint n_add_field)
return n_add_field < 0x80 ? 1 : 2;
}
-/** Set the added field count in a REC_STATUS_COLUMNS_ADDED record.
-@param[in,out] header variable header of a REC_STATUS_COLUMNS_ADDED record
+/** Get the added field count in a REC_STATUS_INSTANT record.
+@param[in,out] header variable header of a REC_STATUS_INSTANT record
+@return number of added fields */
+inline unsigned rec_get_n_add_field(const byte*& header)
+{
+ unsigned n_fields_add = *--header;
+ if (n_fields_add < 0x80) {
+ ut_ad(rec_get_n_add_field_len(n_fields_add) == 1);
+ return n_fields_add;
+ }
+
+ n_fields_add &= 0x7f;
+ n_fields_add |= unsigned(*--header) << 7;
+ ut_ad(n_fields_add < REC_MAX_N_FIELDS);
+ ut_ad(rec_get_n_add_field_len(n_fields_add) == 2);
+ return n_fields_add;
+}
+
+/** Set the added field count in a REC_STATUS_INSTANT record.
+@param[in,out] header variable header of a REC_STATUS_INSTANT record
@param[in] n_add number of added fields, minus 1
@return record header before the number of added fields */
inline void rec_set_n_add_field(byte*& header, ulint n_add)
@@ -799,20 +788,89 @@ inline ulint rec_offs_comp(const rec_offs *offsets)
}
/** Determine if the record is the metadata pseudo-record
-in the clustered index.
+in the clustered index for instant ADD COLUMN or ALTER TABLE.
+@param[in] rec leaf page record
+@param[in] comp 0 if ROW_FORMAT=REDUNDANT, else nonzero
+@return whether the record is the metadata pseudo-record */
+inline bool rec_is_metadata(const rec_t* rec, ulint comp)
+{
+ bool is = !!(rec_get_info_bits(rec, comp) & REC_INFO_MIN_REC_FLAG);
+ ut_ad(!is || !comp || rec_get_status(rec) == REC_STATUS_INSTANT);
+ return is;
+}
+
+/** Determine if the record is the metadata pseudo-record
+in the clustered index for instant ADD COLUMN or ALTER TABLE.
@param[in] rec leaf page record
@param[in] index index of the record
@return whether the record is the metadata pseudo-record */
-inline bool rec_is_metadata(const rec_t* rec, const dict_index_t* index)
+inline bool rec_is_metadata(const rec_t* rec, const dict_index_t& index)
+{
+ bool is = rec_is_metadata(rec, dict_table_is_comp(index.table));
+ ut_ad(!is || index.is_instant());
+ return is;
+}
+
+/** Determine if the record is the metadata pseudo-record
+in the clustered index for instant ADD COLUMN (not other ALTER TABLE).
+@param[in] rec leaf page record
+@param[in] comp 0 if ROW_FORMAT=REDUNDANT, else nonzero
+@return whether the record is the metadata pseudo-record */
+inline bool rec_is_add_metadata(const rec_t* rec, ulint comp)
{
- bool is = rec_get_info_bits(rec, dict_table_is_comp(index->table))
- & REC_INFO_MIN_REC_FLAG;
- ut_ad(!is || index->is_instant());
- ut_ad(!is || !dict_table_is_comp(index->table)
- || rec_get_status(rec) == REC_STATUS_COLUMNS_ADDED);
+ bool is = rec_get_info_bits(rec, comp) == REC_INFO_MIN_REC_FLAG;
+ ut_ad(!is || !comp || rec_get_status(rec) == REC_STATUS_INSTANT);
return is;
}
+/** Determine if the record is the metadata pseudo-record
+in the clustered index for instant ADD COLUMN (not other ALTER TABLE).
+@param[in] rec leaf page record
+@param[in] index index of the record
+@return whether the record is the metadata pseudo-record */
+inline bool rec_is_add_metadata(const rec_t* rec, const dict_index_t& index)
+{
+ bool is = rec_is_add_metadata(rec, dict_table_is_comp(index.table));
+ ut_ad(!is || index.is_instant());
+ return is;
+}
+
+/** Determine if the record is the metadata pseudo-record
+in the clustered index for instant ALTER TABLE (not plain ADD COLUMN).
+@param[in] rec leaf page record
+@param[in] comp 0 if ROW_FORMAT=REDUNDANT, else nonzero
+@return whether the record is the ALTER TABLE metadata pseudo-record */
+inline bool rec_is_alter_metadata(const rec_t* rec, ulint comp)
+{
+ bool is = !(~rec_get_info_bits(rec, comp)
+ & (REC_INFO_MIN_REC_FLAG | REC_INFO_DELETED_FLAG));
+ ut_ad(!is || rec_is_metadata(rec, comp));
+ return is;
+}
+
+/** Determine if the record is the metadata pseudo-record
+in the clustered index for instant ALTER TABLE (not plain ADD COLUMN).
+@param[in] rec leaf page record
+@param[in] index index of the record
+@return whether the record is the ALTER TABLE metadata pseudo-record */
+inline bool rec_is_alter_metadata(const rec_t* rec, const dict_index_t& index)
+{
+ bool is = rec_is_alter_metadata(rec, dict_table_is_comp(index.table));
+ ut_ad(!is || index.is_dummy || index.is_instant());
+ return is;
+}
+
+/** Determine if a record is delete-marked (not a metadata pseudo-record).
+@param[in] rec record
+@param[in] comp nonzero if ROW_FORMAT!=REDUNDANT
+@return whether the record is a delete-marked user record */
+inline bool rec_is_delete_marked(const rec_t* rec, ulint comp)
+{
+ return (rec_get_info_bits(rec, comp)
+ & (REC_INFO_MIN_REC_FLAG | REC_INFO_DELETED_FLAG))
+ == REC_INFO_DELETED_FLAG;
+}
+
/** Get the nth field from an index.
@param[in] rec index record
@param[in] index index
@@ -976,11 +1034,12 @@ rec_copy(
const rec_offs* offsets);
/** Determine the size of a data tuple prefix in a temporary file.
+@tparam redundant_temp whether to use the ROW_FORMAT=REDUNDANT format
@param[in] index clustered or secondary index
@param[in] fields data fields
@param[in] n_fields number of data fields
@param[out] extra record header size
-@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED
+@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
@return total size, in bytes */
template<bool redundant_temp>
ulint
@@ -998,7 +1057,7 @@ rec_get_converted_size_temp(
@param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets)
@param[in] n_core number of core fields (index->n_core_fields)
@param[in] def_val default values for non-core fields
-@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED */
+@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void
rec_init_offsets_temp(
const rec_t* rec,
@@ -1021,12 +1080,12 @@ rec_init_offsets_temp(
MY_ATTRIBUTE((nonnull));
/** Convert a data tuple prefix to the temporary file format.
+@tparam redundant_temp whether to use the ROW_FORMAT=REDUNDANT format
@param[out] rec record in temporary file format
@param[in] index clustered or secondary index
@param[in] fields data fields
@param[in] n_fields number of data fields
-@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED
-*/
+@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
template<bool redundant_temp>
void
rec_convert_dtuple_to_temp(
@@ -1090,21 +1149,20 @@ rec_get_converted_size_comp_prefix(
ulint n_fields,/*!< in: number of data fields */
ulint* extra) /*!< out: extra size */
MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)));
-/**********************************************************//**
-Determines the size of a data tuple in ROW_FORMAT=COMPACT.
+
+/** Determine the size of a record in ROW_FORMAT=COMPACT.
+@param[in] index record descriptor. dict_table_is_comp()
+ is assumed to hold, even if it doesn't
+@param[in] tuple logical record
+@param[out] extra extra size
@return total size */
ulint
rec_get_converted_size_comp(
-/*========================*/
- const dict_index_t* index, /*!< in: record descriptor;
- dict_table_is_comp() is
- assumed to hold, even if
- it does not */
- rec_comp_status_t status, /*!< in: status bits of the record */
- const dfield_t* fields, /*!< in: array of data fields */
- ulint n_fields,/*!< in: number of data fields */
- ulint* extra) /*!< out: extra size */
- MY_ATTRIBUTE((nonnull(1,3)));
+ const dict_index_t* index,
+ const dtuple_t* tuple,
+ ulint* extra)
+ MY_ATTRIBUTE((nonnull(1,2)));
+
/**********************************************************//**
The following function returns the size of a data tuple when converted to
a physical record.
@@ -1285,7 +1343,7 @@ public:
}
/** Destructor */
- virtual ~rec_printer() {}
+ ~rec_printer() override {}
private:
/** Copy constructor */
diff --git a/storage/innobase/include/rem0rec.inl b/storage/innobase/include/rem0rec.inl
index 48898b1f916..6cecd9f1f08 100644
--- a/storage/innobase/include/rem0rec.inl
+++ b/storage/innobase/include/rem0rec.inl
@@ -67,7 +67,7 @@ most significant bytes and bits are written below less significant.
001=REC_STATUS_NODE_PTR
010=REC_STATUS_INFIMUM
011=REC_STATUS_SUPREMUM
- 100=REC_STATUS_COLUMNS_ADDED
+ 100=REC_STATUS_INSTANT
1xx=reserved
5 bits heap number
4 8 bits heap number
@@ -451,7 +451,7 @@ rec_get_n_fields(
}
switch (rec_get_status(rec)) {
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
case REC_STATUS_ORDINARY:
return(dict_index_get_n_fields(index));
case REC_STATUS_NODE_PTR:
@@ -547,19 +547,6 @@ rec_set_n_owned_new(
}
}
-#ifdef UNIV_DEBUG
-/** Check if the info bits are valid.
-@param[in] bits info bits to check
-@return true if valid */
-inline
-bool
-rec_info_bits_valid(
- ulint bits)
-{
- return(0 == (bits & ~(REC_INFO_DELETED_FLAG | REC_INFO_MIN_REC_FLAG)));
-}
-#endif /* UNIV_DEBUG */
-
/******************************************************//**
The following function is used to retrieve the info bits of a record.
@return info bits */
@@ -573,7 +560,6 @@ rec_get_info_bits(
const ulint val = rec_get_bit_field_1(
rec, comp ? REC_NEW_INFO_BITS : REC_OLD_INFO_BITS,
REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT);
- ut_ad(rec_info_bits_valid(val));
return(val);
}
@@ -586,7 +572,6 @@ rec_set_info_bits_old(
rec_t* rec, /*!< in: old-style physical record */
ulint bits) /*!< in: info bits */
{
- ut_ad(rec_info_bits_valid(bits));
rec_set_bit_field_1(rec, bits, REC_OLD_INFO_BITS,
REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT);
}
@@ -599,7 +584,6 @@ rec_set_info_bits_new(
rec_t* rec, /*!< in/out: new-style physical record */
ulint bits) /*!< in: info bits */
{
- ut_ad(rec_info_bits_valid(bits));
rec_set_bit_field_1(rec, bits, REC_NEW_INFO_BITS,
REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT);
}
@@ -1388,24 +1372,20 @@ rec_get_converted_size(
} else if (index->table->id == DICT_INDEXES_ID) {
/* The column SYS_INDEXES.MERGE_THRESHOLD was
instantly added in MariaDB 10.2.2 (MySQL 5.7). */
+ ut_ad(!index->table->is_temporary());
ut_ad(index->n_fields == DICT_NUM_FIELDS__SYS_INDEXES);
ut_ad(dtuple->n_fields == DICT_NUM_FIELDS__SYS_INDEXES
|| dtuple->n_fields
== DICT_FLD__SYS_INDEXES__MERGE_THRESHOLD);
} else {
ut_ad(dtuple->n_fields >= index->n_core_fields);
- ut_ad(dtuple->n_fields <= index->n_fields);
+ ut_ad(dtuple->n_fields <= index->n_fields
+ || dtuple->is_alter_metadata());
}
#endif
if (dict_table_is_comp(index->table)) {
- return(rec_get_converted_size_comp(
- index,
- static_cast<rec_comp_status_t>(
- dtuple->info_bits
- & REC_NEW_STATUS_MASK),
- dtuple->fields,
- dtuple->n_fields, NULL));
+ return rec_get_converted_size_comp(index, dtuple, NULL);
}
data_size = dtuple_get_data_size(dtuple, 0);
diff --git a/storage/innobase/include/row0ext.h b/storage/innobase/include/row0ext.h
index b3665e665dc..78886332aa6 100644
--- a/storage/innobase/include/row0ext.h
+++ b/storage/innobase/include/row0ext.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -29,7 +30,7 @@ Created September 2006 Marko Makela
#include "data0types.h"
#include "mem0mem.h"
#include "dict0types.h"
-#include "page0size.h"
+#include "fsp0types.h"
#include "row0types.h"
/********************************************************************//**
@@ -43,7 +44,7 @@ row_ext_create(
in the InnoDB table object, as reported by
dict_col_get_no(); NOT relative to the records
in the clustered index */
- ulint flags, /*!< in: table->flags */
+ const dict_table_t& table, /*!< in: table */
const dtuple_t* tuple, /*!< in: data tuple containing the field
references of the externally stored
columns; must be indexed by col_no;
@@ -91,9 +92,7 @@ struct row_ext_t{
REC_ANTELOPE_MAX_INDEX_COL_LEN or
REC_VERSION_56_MAX_INDEX_COL_LEN depending
on row format */
- page_size_t page_size;
- /*!< page size of the externally stored
- columns */
+ ulint zip_size;/*!< ROW_FORMAT=COMPRESSED page size, or 0 */
ulint len[1]; /*!< prefix lengths; 0 if not cached */
};
diff --git a/storage/innobase/include/row0ftsort.h b/storage/innobase/include/row0ftsort.h
index 3a65e1c58da..0189bb7a4ff 100644
--- a/storage/innobase/include/row0ftsort.h
+++ b/storage/innobase/include/row0ftsort.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, 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
@@ -60,8 +60,8 @@ struct fts_psort_t;
struct fts_psort_common_t {
row_merge_dup_t* dup; /*!< descriptor of FTS index */
dict_table_t* new_table; /*!< source table */
- /* Old table page size */
- page_size_t old_page_size;
+ /** Old table page size */
+ ulint old_zip_size;
trx_t* trx; /*!< transaction */
fts_psort_t* all_info; /*!< all parallel sort info */
os_event_t sort_event; /*!< sort event */
@@ -199,19 +199,19 @@ row_merge_create_fts_sort_index(
@param[in] new_table table where indexes are created
@param[in] opt_doc_id_size whether to use 4 bytes instead of 8 bytes
integer to store Doc ID during sort
-@param[in] old_page_size page size of the old table during alter
+@param[in] old_zip_size page size of the old table during alter
@param[out] psort parallel sort info to be instantiated
@param[out] merge parallel merge info to be instantiated
-@return TRUE if all successful */
-ibool
+@return true if all successful */
+bool
row_fts_psort_info_init(
- trx_t* trx,
- row_merge_dup_t* dup,
- const dict_table_t* new_table,
- ibool opt_doc_id_size,
- const page_size_t old_page_size,
- fts_psort_t** psort,
- fts_psort_t** merge)
+ trx_t* trx,
+ row_merge_dup_t*dup,
+ dict_table_t* new_table,
+ bool opt_doc_id_size,
+ ulint old_zip_size,
+ fts_psort_t** psort,
+ fts_psort_t** merge)
MY_ATTRIBUTE((nonnull));
/********************************************************************//**
diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h
index 0f7e61cea4b..35826e2f4d5 100644
--- a/storage/innobase/include/row0log.h
+++ b/storage/innobase/include/row0log.h
@@ -36,7 +36,7 @@ Created 2011-05-26 Marko Makela
class ut_stage_alter_t;
-extern ulint onlineddl_rowlog_rows;
+extern Atomic_counter<ulint> onlineddl_rowlog_rows;
extern ulint onlineddl_rowlog_pct_used;
extern ulint onlineddl_pct_progress;
diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h
index 3e5a7a77333..51afbedd649 100644
--- a/storage/innobase/include/row0mysql.h
+++ b/storage/innobase/include/row0mysql.h
@@ -43,6 +43,7 @@ Created 9/17/2000 Heikki Tuuri
extern ibool row_rollback_on_timeout;
struct row_prebuilt_t;
+class ha_innobase;
/*******************************************************************//**
Frees the blob heap in prebuilt when no longer needed. */
@@ -417,7 +418,7 @@ will remain locked.
@param[in] create_failed true=create table failed
because e.g. foreign key column
@param[in] nonatomic Whether it is permitted to release
- and reacquire dict_operation_lock
+ and reacquire dict_sys.latch
@return error code */
dberr_t
row_drop_table_for_mysql(
@@ -777,10 +778,14 @@ struct row_prebuilt_t {
store it here so that we can return
it to MySQL */
/*----------------------*/
- void* idx_cond; /*!< In ICP, pointer to a ha_innobase,
- passed to innobase_index_cond().
- NULL if index condition pushdown is
- not used. */
+
+ /** Argument of handler_rowid_filter_check(),
+ or NULL if no PRIMARY KEY filter is pushed */
+ ha_innobase* pk_filter;
+
+ /** Argument to handler_index_cond_check(),
+ or NULL if no index condition pushdown (ICP) is used. */
+ ha_innobase* idx_cond;
ulint idx_cond_n_cols;/*!< Number of fields in idx_cond_cols.
0 if and only if idx_cond == NULL. */
/*----------------------*/
diff --git a/storage/innobase/include/row0row.h b/storage/innobase/include/row0row.h
index 67e5fb981d2..1e0fdc65238 100644
--- a/storage/innobase/include/row0row.h
+++ b/storage/innobase/include/row0row.h
@@ -74,6 +74,7 @@ row_get_rec_roll_ptr(
#define ROW_BUILD_FOR_PURGE 1 /*!< build row for purge. */
#define ROW_BUILD_FOR_UNDO 2 /*!< build row for undo. */
#define ROW_BUILD_FOR_INSERT 3 /*!< build row for insert. */
+
/*****************************************************************//**
When an insert or purge to a table is performed, this function builds
the entry to be inserted into or purged from an index on the table.
@@ -223,6 +224,24 @@ row_rec_to_index_entry(
mem_heap_t* heap) /*!< in: memory heap from which
the memory needed is allocated */
MY_ATTRIBUTE((warn_unused_result));
+
+/** Convert a metadata record to a data tuple.
+@param[in] rec metadata record
+@param[in] index clustered index after instant ALTER TABLE
+@param[in] offsets rec_get_offsets(rec)
+@param[in,out] heap memory heap for allocations
+@param[in] info_bits the info_bits after an update
+@param[in] pad whether to pad to index->n_fields */
+dtuple_t*
+row_metadata_to_tuple(
+ const rec_t* rec,
+ const dict_index_t* index,
+ const rec_offs* offsets,
+ mem_heap_t* heap,
+ ulint info_bits,
+ bool pad)
+ MY_ATTRIBUTE((nonnull,warn_unused_result));
+
/*******************************************************************//**
Builds from a secondary index record a row reference with which we can
search the clustered index record.
diff --git a/storage/innobase/include/row0row.inl b/storage/innobase/include/row0row.inl
index 18e6959e6f3..e89adb581f4 100644
--- a/storage/innobase/include/row0row.inl
+++ b/storage/innobase/include/row0row.inl
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2018, 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
@@ -39,16 +39,12 @@ row_get_trx_id_offset(
const dict_index_t* index, /*!< in: clustered index */
const rec_offs* offsets)/*!< in: record offsets */
{
- ulint pos;
ulint offset;
ulint len;
- ut_ad(dict_index_is_clust(index));
ut_ad(rec_offs_validate(NULL, index, offsets));
- pos = dict_index_get_sys_col_pos(index, DATA_TRX_ID);
-
- offset = rec_get_nth_field_offs(offsets, pos, &len);
+ offset = rec_get_nth_field_offs(offsets, index->db_trx_id(), &len);
ut_ad(len == DATA_TRX_ID_LEN);
diff --git a/storage/innobase/include/row0trunc.h b/storage/innobase/include/row0trunc.h
deleted file mode 100644
index c5f89f7cfdb..00000000000
--- a/storage/innobase/include/row0trunc.h
+++ /dev/null
@@ -1,416 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, 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 Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-*****************************************************************************/
-
-/**************************************************//**
-@file include/row0trunc.h
-TRUNCATE implementation
-
-Created 2013-04-25 Krunal Bauskar
-*******************************************************/
-
-#ifndef row0trunc_h
-#define row0trunc_h
-
-#include "row0mysql.h"
-#include "dict0boot.h"
-#include "fil0fil.h"
-#include "srv0start.h"
-
-#include <vector>
-
-/** The information of TRUNCATE log record.
-This class handles the recovery stage of TRUNCATE table. */
-class truncate_t {
-
-public:
- /**
- Constructor
-
- @param old_table_id old table id assigned to table before truncate
- @param new_table_id new table id that will be assigned to table
- after truncate
- @param dir_path directory path */
- truncate_t(
- table_id_t old_table_id,
- table_id_t new_table_id,
- const char* dir_path);
-
- /**
- Constructor
-
- @param log_file_name parse the log file during recovery to populate
- information related to table to truncate */
- truncate_t(const char* log_file_name);
-
- /**
- Consturctor
-
- @param space_id space in which table reisde
- @param name table name
- @param tablespace_flags tablespace flags use for recreating tablespace
- @param log_flags page format flag
- @param recv_lsn lsn of redo log record. */
- truncate_t(
- ulint space_id,
- const char* name,
- ulint tablespace_flags,
- ulint log_flags,
- lsn_t recv_lsn);
-
- /** Destructor */
- ~truncate_t();
-
- /** The index information of MLOG_FILE_TRUNCATE redo record */
- struct index_t {
-
- /* Default copy constructor and destructor should be OK. */
-
- index_t();
-
- /**
- Set the truncate log values for a compressed table.
- @return DB_CORRUPTION or error code */
- dberr_t set(const dict_index_t* index);
-
- typedef std::vector<byte, ut_allocator<byte> > fields_t;
-
- /** Index id */
- index_id_t m_id;
-
- /** Index type */
- ulint m_type;
-
- /** Root Page Number */
- ulint m_root_page_no;
-
- /** New Root Page Number.
- Note: This field is not persisted to TRUNCATE log but used
- during truncate table fix-up for updating SYS_XXXX tables. */
- ulint m_new_root_page_no;
-
- /** Number of index fields */
- ulint m_n_fields;
-
- /** DATA_TRX_ID column position. */
- ulint m_trx_id_pos;
-
- /** Compressed table field meta data, encode by
- page_zip_fields_encode. Empty for non-compressed tables.
- Should be NUL terminated. */
- fields_t m_fields;
- };
-
- /**
- @return the directory path, can be NULL */
- const char* get_dir_path() const
- {
- return(m_dir_path);
- }
-
- /**
- Register index information
-
- @param index index information logged as part of truncate log. */
- void add(index_t& index)
- {
- m_indexes.push_back(index);
- }
-
- /**
- Add table to truncate post recovery.
-
- @param ptr table information need to complete truncate of table. */
- static void add(truncate_t* ptr)
- {
- s_tables.push_back(ptr);
- }
-
- /**
- Clear registered index vector */
- void clear()
- {
- m_indexes.clear();
- }
-
- /**
- @return old table id of the table to truncate */
- table_id_t old_table_id() const
- {
- return(m_old_table_id);
- }
-
- /**
- @return new table id of the table to truncate */
- table_id_t new_table_id() const
- {
- return(m_new_table_id);
- }
-
- /**
- Update root page number in SYS_XXXX tables.
-
- @param trx transaction object
- @param table_id table id for which information needs to
- be updated.
- @param reserve_dict_mutex if TRUE, acquire/release
- dict_sys->mutex around call to pars_sql.
- @param mark_index_corrupted if true, then mark index corrupted
- @return DB_SUCCESS or error code */
- dberr_t update_root_page_no(
- trx_t* trx,
- table_id_t table_id,
- ibool reserve_dict_mutex,
- bool mark_index_corrupted) const;
-
- /** Create an index for a table.
- @param[in] table_name table name, for which to create
- the index
- @param[in,out] space tablespace
- @param[in] index_type type of index to truncate
- @param[in] index_id id of index to truncate
- @param[in] btr_redo_create_info control info for ::btr_create()
- @param[in,out] mtr mini-transaction covering the
- create index
- @return root page no or FIL_NULL on failure */
- inline ulint create_index(
- const char* table_name,
- fil_space_t* space,
- ulint index_type,
- index_id_t index_id,
- const btr_create_t& btr_redo_create_info,
- mtr_t* mtr) const;
-
- /** Create the indexes for a table
- @param[in] table_name table name, for which to create the
- indexes
- @param[in,out] space tablespace
- @param[in] format_flags page format flags
- @return DB_SUCCESS or error code. */
- inline dberr_t create_indexes(
- const char* table_name,
- fil_space_t* space,
- ulint format_flags);
-
- /** Check if index has been modified since TRUNCATE log snapshot
- was recorded.
- @param[in] space tablespace
- @param[in] root_page_no index root page number
- @return true if modified else false */
- inline bool is_index_modified_since_logged(
- const fil_space_t* space,
- ulint root_page_no) const;
-
- /** Drop indexes for a table.
- @param[in,out] space tablespace
- @return DB_SUCCESS or error code. */
- void drop_indexes(fil_space_t* space) const;
-
- /**
- Parses log record during recovery
- @param start_ptr buffer containing log body to parse
- @param end_ptr buffer end
-
- @return DB_SUCCESS or error code */
- dberr_t parse(
- byte* start_ptr,
- const byte* end_ptr);
-
- /** Parse MLOG_TRUNCATE log record from REDO log file during recovery.
- @param[in,out] start_ptr buffer containing log body to parse
- @param[in] end_ptr buffer end
- @param[in] space_id tablespace identifier
- @return parsed upto or NULL. */
- static byte* parse_redo_entry(
- byte* start_ptr,
- const byte* end_ptr,
- ulint space_id);
-
- /**
- Write a log record for truncating a single-table tablespace.
-
- @param start_ptr buffer to write log record
- @param end_ptr buffer end
- @param space_id space id
- @param tablename the table name in the usual
- databasename/tablename format of InnoDB
- @param flags tablespace flags
- @param format_flags page format
- @param lsn lsn while logging */
- dberr_t write(
- byte* start_ptr,
- byte* end_ptr,
- ulint space_id,
- const char* tablename,
- ulint flags,
- ulint format_flags,
- lsn_t lsn) const;
-
- /**
- @return number of indexes parsed from the truncate log record */
- size_t indexes() const;
-
- /**
- Truncate a single-table tablespace. The tablespace must be cached
- in the memory cache.
-
- Note: This is defined in fil0fil.cc because it needs to access some
- types that are local to that file.
-
- @param space_id space id
- @param dir_path directory path
- @param tablename the table name in the usual
- databasename/tablename format of InnoDB
- @param flags tablespace flags
- @param default_size if true, truncate to default size if tablespace
- is being newly re-initialized.
- @return DB_SUCCESS or error */
- static dberr_t truncate(
- ulint space_id,
- const char* dir_path,
- const char* tablename,
- ulint flags,
- bool default_size);
-
- /**
- Fix the table truncate by applying information parsed from TRUNCATE log.
- Fix-up includes re-creating table (drop and re-create indexes)
- @return error code or DB_SUCCESS */
- static dberr_t fixup_tables_in_system_tablespace();
-
- /**
- Fix the table truncate by applying information parsed from TRUNCATE log.
- Fix-up includes re-creating tablespace.
- @return error code or DB_SUCCESS */
- static dberr_t fixup_tables_in_non_system_tablespace();
-
- /**
- Check whether a tablespace was truncated during recovery
- @param space_id tablespace id to check
- @return true if the tablespace was truncated */
- static bool is_tablespace_truncated(ulint space_id);
-
- /** Was tablespace truncated (on crash before checkpoint).
- If the MLOG_TRUNCATE redo-record is still available then tablespace
- was truncated and checkpoint is yet to happen.
- @param[in] space_id tablespace id to check.
- @return true if tablespace was truncated. */
- static bool was_tablespace_truncated(ulint space_id);
-
- /** Get the lsn associated with space.
- @param[in] space_id tablespace id to check.
- @return associated lsn. */
- static lsn_t get_truncated_tablespace_init_lsn(ulint space_id);
-
-private:
- typedef std::vector<index_t, ut_allocator<index_t> > indexes_t;
-
- /** Space ID of tablespace */
- ulint m_space_id;
-
- /** ID of table that is being truncated. */
- table_id_t m_old_table_id;
-
- /** New ID that will be assigned to table on truncation. */
- table_id_t m_new_table_id;
-
- /** Data dir path of tablespace */
- char* m_dir_path;
-
- /** Table name */
- char* m_tablename;
-
- /** Tablespace Flags */
- ulint m_tablespace_flags;
-
- /** Format flags (log flags; stored in page-no field of header) */
- ulint m_format_flags;
-
- /** Index meta-data */
- indexes_t m_indexes;
-
- /** LSN of TRUNCATE log record. */
- lsn_t m_log_lsn;
-
- /** Log file name. */
- char* m_log_file_name;
-
- /** Encryption information of the table */
- fil_encryption_t m_encryption;
- uint32_t m_key_id;
-
- /** Vector of tables to truncate. */
- typedef std::vector<truncate_t*, ut_allocator<truncate_t*> >
- tables_t;
-
- /** Information about tables to truncate post recovery */
- static tables_t s_tables;
-
- /** Information about truncated table
- This is case when truncate is complete but checkpoint hasn't. */
- typedef std::map<ulint, lsn_t> truncated_tables_t;
- static truncated_tables_t s_truncated_tables;
-
-public:
- /** If true then fix-up of table is active and so while creating
- index instead of grabbing information from dict_index_t, grab it
- from parsed truncate log record. */
- static bool s_fix_up_active;
-};
-
-/**
-Parse truncate log file. */
-class TruncateLogParser {
-
-public:
-
- /**
- Scan and Parse truncate log files.
-
- @param dir_path look for log directory in following path
- @return DB_SUCCESS or error code. */
- static dberr_t scan_and_parse(
- const char* dir_path);
-
-private:
- typedef std::vector<char*, ut_allocator<char*> >
- trunc_log_files_t;
-
-private:
- /**
- Scan to find out truncate log file from the given directory path.
-
- @param dir_path look for log directory in following path.
- @param log_files cache to hold truncate log file name found.
- @return DB_SUCCESS or error code. */
- static dberr_t scan(
- const char* dir_path,
- trunc_log_files_t& log_files);
-
- /**
- Parse the log file and populate table to truncate information.
- (Add this table to truncate information to central vector that is then
- used by truncate fix-up routine to fix-up truncate action of the table.)
-
- @param log_file_name log file to parse
- @return DB_SUCCESS or error code. */
- static dberr_t parse(
- const char* log_file_name);
-};
-
-#endif /* row0trunc_h */
diff --git a/storage/innobase/include/row0types.h b/storage/innobase/include/row0types.h
index 5f1e46c6a4d..048b161b884 100644
--- a/storage/innobase/include/row0types.h
+++ b/storage/innobase/include/row0types.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2020, 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
@@ -24,8 +24,8 @@ Row operation global types
Created 12/27/1996 Heikki Tuuri
*******************************************************/
-#ifndef row0types_h
-#define row0types_h
+#pragma once
+#include "buf0types.h"
struct plan_t;
@@ -146,5 +146,3 @@ public:
return first_use;
}
};
-
-#endif
diff --git a/storage/innobase/include/row0undo.h b/storage/innobase/include/row0undo.h
index a18d154c132..4357a908ca3 100644
--- a/storage/innobase/include/row0undo.h
+++ b/storage/innobase/include/row0undo.h
@@ -82,17 +82,20 @@ that index record. */
enum undo_exec {
UNDO_NODE_FETCH_NEXT = 1, /*!< we should fetch the next
undo log record */
- UNDO_NODE_INSERT, /*!< undo a fresh insert of a
- row to a table */
- UNDO_NODE_MODIFY /*!< undo a modify operation
- (DELETE or UPDATE) on a row
- of a table */
+ /** rollback an insert into persistent table */
+ UNDO_INSERT_PERSISTENT,
+ /** rollback an update (or delete) in a persistent table */
+ UNDO_UPDATE_PERSISTENT,
+ /** rollback an insert into temporary table */
+ UNDO_INSERT_TEMPORARY,
+ /** rollback an update (or delete) in a temporary table */
+ UNDO_UPDATE_TEMPORARY,
};
/** Undo node structure */
struct undo_node_t{
que_common_t common; /*!< node type: QUE_NODE_UNDO */
- enum undo_exec state; /*!< node execution state */
+ undo_exec state; /*!< rollback execution state */
trx_t* trx; /*!< trx for which undo is done */
roll_ptr_t roll_ptr;/*!< roll pointer to undo log record */
trx_undo_rec_t* undo_rec;/*!< undo log record */
diff --git a/storage/innobase/include/row0upd.h b/storage/innobase/include/row0upd.h
index c0139ee7911..2615bf55a04 100644
--- a/storage/innobase/include/row0upd.h
+++ b/storage/innobase/include/row0upd.h
@@ -101,19 +101,6 @@ upd_get_field_by_field_no(
bool is_virtual) /*!< in: if it is a virtual column */
MY_ATTRIBUTE((warn_unused_result));
/*********************************************************************//**
-Writes into the redo log the values of trx id and roll ptr and enough info
-to determine their positions within a clustered index record.
-@return new pointer to mlog */
-byte*
-row_upd_write_sys_vals_to_log(
-/*==========================*/
- dict_index_t* index, /*!< in: clustered index */
- trx_id_t trx_id, /*!< in: transaction id */
- roll_ptr_t roll_ptr,/*!< in: roll ptr of the undo log record */
- byte* log_ptr,/*!< pointer to a buffer of size > 20 opened
- in mlog */
- mtr_t* mtr); /*!< in: mtr */
-/*********************************************************************//**
Updates the trx id and roll ptr field in a clustered index record when
a row is updated or marked deleted. */
UNIV_INLINE
@@ -128,18 +115,6 @@ row_upd_rec_sys_fields(
const trx_t* trx, /*!< in: transaction */
roll_ptr_t roll_ptr);/*!< in: DB_ROLL_PTR to the undo log */
/*********************************************************************//**
-Sets the trx id or roll ptr field of a clustered index entry. */
-void
-row_upd_index_entry_sys_field(
-/*==========================*/
- dtuple_t* entry, /*!< in/out: index entry, where the memory
- buffers for sys fields are already allocated:
- the function just copies the new values to
- them */
- dict_index_t* index, /*!< in: clustered index */
- ulint type, /*!< in: DATA_TRX_ID or DATA_ROLL_PTR */
- ib_uint64_t val); /*!< in: value to write */
-/*********************************************************************//**
Creates an update node for a query graph.
@return own: update node */
upd_node_t*
@@ -501,6 +476,14 @@ struct upd_t{
return false;
}
+ /** @return whether this is for a hidden metadata record
+ for instant ALTER TABLE */
+ bool is_metadata() const { return dtuple_t::is_metadata(info_bits); }
+ /** @return whether this is for a hidden metadata record
+ for instant ALTER TABLE (not only ADD COLUMN) */
+ bool is_alter_metadata() const
+ { return dtuple_t::is_alter_metadata(info_bits); }
+
#ifdef UNIV_DEBUG
bool validate() const
{
@@ -514,7 +497,6 @@ struct upd_t{
return(true);
}
#endif // UNIV_DEBUG
-
};
/** Kinds of update operation */
diff --git a/storage/innobase/include/row0upd.inl b/storage/innobase/include/row0upd.inl
index e1368a14e63..fffb7650da3 100644
--- a/storage/innobase/include/row0upd.inl
+++ b/storage/innobase/include/row0upd.inl
@@ -167,13 +167,13 @@ row_upd_rec_sys_fields(
const trx_t* trx, /*!< in: transaction */
roll_ptr_t roll_ptr)/*!< in: DB_ROLL_PTR to the undo log */
{
- ut_ad(dict_index_is_clust(index));
+ ut_ad(index->is_primary());
ut_ad(rec_offs_validate(rec, index, offsets));
- if (page_zip) {
- ulint pos = dict_index_get_sys_col_pos(index, DATA_TRX_ID);
+ if (UNIV_LIKELY_NULL(page_zip)) {
page_zip_write_trx_id_and_roll_ptr(page_zip, rec, offsets,
- pos, trx->id, roll_ptr);
+ index->db_trx_id(),
+ trx->id, roll_ptr);
} else {
ulint offset = index->trx_id_offset;
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h
index 1a825c419dd..524d4d46368 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -37,6 +37,8 @@ Created 12/15/2009 Jimmy Yang
#endif /* __STDC_LIMIT_MACROS */
#include <stdint.h>
+#include "my_atomic.h"
+#include "my_atomic_wrapper.h"
/** Possible status values for "mon_status" in "struct monitor_value" */
enum monitor_running_status {
@@ -175,7 +177,6 @@ enum monitor_id_t {
MONITOR_OVLD_PAGE_CREATED,
MONITOR_OVLD_PAGES_WRITTEN,
MONITOR_OVLD_PAGES_READ,
- MONITOR_OVLD_PAGES0_READ,
MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS,
MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS_AVOIDED,
MONITOR_OVLD_BYTE_READ,
@@ -298,7 +299,6 @@ enum monitor_id_t {
MONITOR_TRX_COMMIT_UNDO,
MONITOR_TRX_ROLLBACK,
MONITOR_TRX_ROLLBACK_SAVEPOINT,
- MONITOR_TRX_ROLLBACK_ACTIVE,
MONITOR_TRX_ACTIVE,
MONITOR_RSEG_HISTORY_LEN,
MONITOR_NUM_UNDO_SLOT_USED,
@@ -496,23 +496,23 @@ enum mon_option_t {
/** This "monitor_set_tbl" is a bitmap records whether a particular monitor
counter has been turned on or off */
-extern ulint monitor_set_tbl[(NUM_MONITOR + NUM_BITS_ULINT - 1) /
- NUM_BITS_ULINT];
+extern Atomic_relaxed<ulint>
+ monitor_set_tbl[(NUM_MONITOR + NUM_BITS_ULINT - 1) / NUM_BITS_ULINT];
/** Macros to turn on/off the control bit in monitor_set_tbl for a monitor
counter option. */
-#define MONITOR_ON(monitor) \
- (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] |= \
- (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT)))
+#define MONITOR_ON(monitor) \
+ (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT].fetch_or( \
+ (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT))))
-#define MONITOR_OFF(monitor) \
- (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] &= \
- ~(ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT)))
+#define MONITOR_OFF(monitor) \
+ (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT].fetch_and( \
+ ~(ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT))))
/** Check whether the requested monitor is turned on/off */
-#define MONITOR_IS_ON(monitor) \
- (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] & \
- (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT)))
+#define MONITOR_IS_ON(monitor) \
+ (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] & \
+ (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT)))
/** The actual monitor counter array that records each monintor counter
value */
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index f9d3701ec0b..6d9d162e78e 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -47,7 +47,6 @@ Created 10/10/1995 Heikki Tuuri
#include "que0types.h"
#include "trx0types.h"
#include "srv0conc.h"
-#include "buf0checksum.h"
#include "fil0fil.h"
#include "mysql/psi/mysql_stage.h"
@@ -140,7 +139,8 @@ struct srv_stats_t
ulint_ctr_1_t n_lock_wait_count;
/** Number of threads currently waiting on database locks */
- simple_atomic_counter<> n_lock_wait_current_count;
+ MY_ALIGNED(CACHE_LINE_SIZE) Atomic_counter<ulint>
+ n_lock_wait_current_count;
/** Number of rows read. */
ulint_ctr_64_t n_rows_read;
@@ -172,9 +172,6 @@ struct srv_stats_t
/** Number of times prefix optimization avoided triggering cluster lookup */
ulint_ctr_64_t n_sec_rec_cluster_reads_avoided;
- /** Number of times page 0 is read from tablespace */
- ulint_ctr_64_t page0_read;
-
/** Number of encryption_get_latest_key_version calls */
ulint_ctr_64_t n_key_requests;
@@ -439,7 +436,7 @@ extern uint srv_fast_shutdown; /*!< If this is 1, do not do a
/** Signal to shut down InnoDB (NULL if shutdown was signaled, or if
running in innodb_read_only mode, srv_read_only_mode) */
-extern st_my_thread_var *srv_running;
+extern std::atomic<st_my_thread_var *> srv_running;
extern ibool srv_innodb_status;
@@ -547,7 +544,6 @@ extern uint srv_sys_space_size_debug;
extern bool srv_log_files_created;
#endif /* UNIV_DEBUG */
-#define SRV_SEMAPHORE_WAIT_EXTENSION 7200
extern ulint srv_dml_needed_delay;
#define SRV_MAX_N_IO_THREADS 130
@@ -908,23 +904,6 @@ srv_purge_wakeup();
/** Shut down the purge threads. */
void srv_purge_shutdown();
-/** Check if tablespace is being truncated.
-(Ignore system-tablespace as we don't re-create the tablespace
-and so some of the action that are suppressed by this function
-for independent tablespace are not applicable to system-tablespace).
-@param space_id space_id to check for truncate action
-@return true if being truncated, false if not being
- truncated or tablespace is system-tablespace. */
-bool
-srv_is_tablespace_truncated(ulint space_id);
-
-/** Check if tablespace was truncated.
-@param[in] space space object to check for truncate action
-@return true if tablespace was truncated and we still have an active
-MLOG_TRUNCATE REDO log record. */
-bool
-srv_was_tablespace_truncated(const fil_space_t* space);
-
#ifdef UNIV_DEBUG
/** Disables master thread. It's used by:
SET GLOBAL innodb_master_thread_disabled_debug = 1 (0).
@@ -979,7 +958,6 @@ struct export_var_t{
ulint innodb_page_size; /*!< srv_page_size */
ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */
ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read*/
- ulint innodb_page0_read; /*!< srv_stats.page0_read */
ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */
ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */
ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */
diff --git a/storage/innobase/include/sync0arr.inl b/storage/innobase/include/sync0arr.inl
index 9163d5b6614..962226b4934 100644
--- a/storage/innobase/include/sync0arr.inl
+++ b/storage/innobase/include/sync0arr.inl
@@ -44,8 +44,7 @@ sync_array_get()
return(sync_wait_array[0]);
}
- return(sync_wait_array[default_indexer_t<>::get_rnd_index()
- % sync_array_size]);
+ return(sync_wait_array[get_rnd_value() % sync_array_size]);
}
/******************************************************************//**
diff --git a/storage/innobase/include/sync0policy.h b/storage/innobase/include/sync0policy.h
index 4e85bae5a3e..94f49ff628c 100644
--- a/storage/innobase/include/sync0policy.h
+++ b/storage/innobase/include/sync0policy.h
@@ -30,247 +30,176 @@ Created 2012-08-21 Sunny Bains.
#include "ut0rnd.h"
#include "os0thread.h"
#include "srv0mon.h"
+#include "sync0debug.h"
#ifdef UNIV_DEBUG
-# define MUTEX_MAGIC_N 979585UL
-
-template <typename Mutex>
-class MutexDebug {
-public:
-
- /** For passing context to SyncDebug */
- struct Context : public latch_t {
-
- /** Constructor */
- Context()
- :
- m_mutex(),
- m_filename(),
- m_line(),
- m_thread_id(ULINT_UNDEFINED)
- {
- /* No op */
- }
-
- /** Create the context for SyncDebug
- @param[in] id ID of the latch to track */
- Context(latch_id_t id)
- :
- latch_t(id)
- {
- ut_ad(id != LATCH_ID_NONE);
- }
-
- /** Set to locked state
- @param[in] mutex The mutex to acquire
- @param[in] filename File name from where to acquire
- @param[in] line Line number in filename */
- void locked(
- const Mutex* mutex,
- const char* filename,
- unsigned line)
- UNIV_NOTHROW
- {
- m_mutex = mutex;
-
- my_atomic_storelint(&m_thread_id,
- ulint(os_thread_get_curr_id()));
-
- m_filename = filename;
-
- m_line = line;
- }
-
- /** Reset to unlock state */
- void release()
- UNIV_NOTHROW
- {
- m_mutex = NULL;
-
- my_atomic_storelint(&m_thread_id, ULINT_UNDEFINED);
-
- m_filename = NULL;
-
- m_line = 0;
- }
-
- /** Print information about the latch
- @return the string representation */
- virtual std::string to_string() const
- UNIV_NOTHROW
- {
- std::ostringstream msg;
-
- msg << m_mutex->policy().to_string();
-
- if (m_thread_id != ULINT_UNDEFINED) {
-
- msg << " addr: " << m_mutex
- << " acquired: " << locked_from().c_str();
-
- } else {
- msg << "Not locked";
- }
-
- return(msg.str());
- }
-
- /** @return the name of the file and line number in the file
- from where the mutex was acquired "filename:line" */
- virtual std::string locked_from() const
- {
- std::ostringstream msg;
-
- msg << sync_basename(m_filename) << ":" << m_line;
-
- return(std::string(msg.str()));
- }
-
- /** Mutex to check for lock order violation */
- const Mutex* m_mutex;
-
- /** Filename from where enter was called */
- const char* m_filename;
-
- /** Line mumber in filename */
- unsigned m_line;
-
- /** Thread ID of the thread that own(ed) the mutex */
- ulint m_thread_id;
- };
-
- /** Constructor. */
- MutexDebug()
- :
- m_magic_n(),
- m_context()
- UNIV_NOTHROW
- {
- /* No op */
- }
-
- /* Destructor */
- virtual ~MutexDebug() { }
-
- /** Mutex is being destroyed. */
- void destroy() UNIV_NOTHROW
- {
- ut_ad((ulint)my_atomic_loadlint(&m_context.m_thread_id) == ULINT_UNDEFINED);
-
- m_magic_n = 0;
-
- m_context.m_thread_id = 0;
- }
-
- /** Called when the mutex is "created". Note: Not from the constructor
- but when the mutex is initialised.
- @param[in] id Mutex ID */
- void init(latch_id_t id) UNIV_NOTHROW;
-
- /** Called when an attempt is made to lock the mutex
- @param[in] mutex Mutex instance to be locked
- @param[in] filename Filename from where it was called
- @param[in] line Line number from where it was called */
- void enter(
- const Mutex* mutex,
- const char* filename,
- unsigned line)
- UNIV_NOTHROW;
-
- /** Called when the mutex is locked
- @param[in] mutex Mutex instance that was locked
- @param[in] filename Filename from where it was called
- @param[in] line Line number from where it was called */
- void locked(
- const Mutex* mutex,
- const char* filename,
- unsigned line)
- UNIV_NOTHROW;
-
- /** Called when the mutex is released
- @param[in] mutx Mutex that was released */
- void release(const Mutex* mutex)
- UNIV_NOTHROW;
-
- /** @return true if thread owns the mutex */
- bool is_owned() const UNIV_NOTHROW
- {
- return(os_thread_eq(
- (os_thread_id_t)my_atomic_loadlint(&m_context.m_thread_id),
- os_thread_get_curr_id()));
- }
-
- /** @return the name of the file from the mutex was acquired */
- const char* get_enter_filename() const
- UNIV_NOTHROW
- {
- return(m_context.m_filename);
- }
-
- /** @return the name of the file from the mutex was acquired */
- unsigned get_enter_line() const
- UNIV_NOTHROW
- {
- return(m_context.m_line);
- }
-
- /** @return id of the thread that was trying to acquire the mutex */
- os_thread_id_t get_thread_id() const
- UNIV_NOTHROW
- {
- return((os_thread_id_t)my_atomic_loadlint(&m_context.m_thread_id));
- }
+template <typename Mutex> class MutexDebug: public latch_t
+{
+ /** Mutex to check for lock order violation */
+ const Mutex *m_mutex;
+ /** Filename from where enter was called */
+ const char *m_filename;
+ /** Line mumber in filename */
+ unsigned m_line;
+ /** Thread ID of the thread that owns the mutex */
+ os_thread_id_t m_thread_id;
+ /** Mutex protecting the above members */
+ mutable OSMutex m_debug_mutex;
+
+
+ void set(const Mutex *mutex, const char *filename, unsigned line,
+ os_thread_id_t thread_id)
+ {
+ m_debug_mutex.enter();
+ m_mutex= mutex;
+ m_filename= filename;
+ m_line= line;
+ m_thread_id= thread_id;
+ m_debug_mutex.exit();
+ }
+
+
+ const MutexDebug get() const
+ {
+ MutexDebug ret;
+ m_debug_mutex.enter();
+ ret.m_mutex= m_mutex;
+ ret.m_filename= m_filename;
+ ret.m_line= m_line;
+ ret.m_thread_id= m_thread_id;
+ m_debug_mutex.exit();
+ return ret;
+ }
+
+
+ /**
+ Called either when mutex is locked or destroyed. Thus members are protected
+ from concurrent modification.
+ */
+ void assert_clean_context()
+ {
+ ut_ad(!m_mutex);
+ ut_ad(!m_filename);
+ ut_ad(!m_line);
+ ut_ad(m_thread_id == os_thread_id_t(ULINT_UNDEFINED));
+ }
- /** Magic number to check for memory corruption. */
- ulint m_magic_n;
- /** Latch state of the mutex owner */
- Context m_context;
+public:
+ /**
+ Called when the mutex is "created". Note: Not from the constructor
+ but when the mutex is initialised.
+ @param[in] id Mutex ID
+ */
+ void init(latch_id_t id)
+ {
+ ut_ad(id != LATCH_ID_NONE);
+ m_id= id;
+ m_debug_mutex.init();
+ set(0, 0, 0, os_thread_id_t(ULINT_UNDEFINED));
+ }
+
+
+ /** Mutex is being destroyed. */
+ void destroy()
+ {
+ assert_clean_context();
+ m_debug_mutex.destroy();
+ }
+
+
+ /**
+ Called when an attempt is made to lock the mutex
+ @param[in] mutex Mutex instance to be locked
+ @param[in] filename Filename from where it was called
+ @param[in] line Line number from where it was called
+ */
+ void enter(const Mutex &mutex, const char *filename, unsigned line)
+ {
+ MutexDebug context;
+ ut_ad(!is_owned());
+ context.init(m_id);
+ context.set(&mutex, filename, line, os_thread_get_curr_id());
+ /* Check for latch order violation. */
+ sync_check_lock_validate(&context);
+ context.set(0, 0, 0, os_thread_id_t(ULINT_UNDEFINED));
+ context.destroy();
+ }
+
+
+ /**
+ Called when the mutex is locked
+ @param[in] mutex Mutex instance that was locked
+ @param[in] filename Filename from where it was called
+ @param[in] line Line number from where it was called
+ */
+ void locked(const Mutex &mutex, const char *filename, unsigned line)
+ {
+ assert_clean_context();
+ set(&mutex, filename, line, os_thread_get_curr_id());
+ sync_check_lock_granted(this);
+ }
+
+
+ /**
+ Called when the mutex is released
+ @param[in] mutex Mutex that was released
+ */
+ void release(const Mutex &mutex)
+ {
+ ut_ad(is_owned());
+ set(0, 0, 0, os_thread_id_t(ULINT_UNDEFINED));
+ sync_check_unlock(this);
+ }
+
+
+ /** @return true if thread owns the mutex */
+ bool is_owned() const
+ {
+ return os_thread_eq(get_thread_id(), os_thread_get_curr_id());
+ }
+
+
+ /** @return the name of the file from the mutex was acquired */
+ const char* get_enter_filename() const { return get().m_filename; }
+
+
+ /** @return the name of the file from the mutex was acquired */
+ unsigned get_enter_line() const { return get().m_line; }
+
+
+ /** @return id of the thread that was trying to acquire the mutex */
+ os_thread_id_t get_thread_id() const { return get().m_thread_id; }
+
+
+ /**
+ Print information about the latch
+ @return the string representation
+ */
+ virtual std::string to_string() const
+ {
+ std::ostringstream msg;
+ const MutexDebug ctx= get();
+
+ msg << m_mutex->policy().to_string();
+ if (ctx.m_mutex)
+ msg << " addr: " << ctx.m_mutex << " acquired: "
+ << sync_basename(ctx.get_enter_filename()) << ":"
+ << ctx.get_enter_line();
+ else
+ msg << "Not locked";
+
+ return(msg.str());
+ }
};
#endif /* UNIV_DEBUG */
-/* Do nothing */
-template <typename Mutex>
-struct NoPolicy {
- /** Default constructor. */
- NoPolicy() { }
-
- void init(const Mutex&, latch_id_t, const char*, uint32_t)
- UNIV_NOTHROW { }
- void destroy() UNIV_NOTHROW { }
- void enter(const Mutex&, const char*, unsigned) UNIV_NOTHROW { }
- void add(uint32_t, uint32_t) UNIV_NOTHROW { }
- void locked(const Mutex&, const char*, ulint) UNIV_NOTHROW { }
- void release(const Mutex&) UNIV_NOTHROW { }
- std::string to_string() const { return(""); };
- latch_id_t get_id() const;
-};
-
/** Collect the metrics per mutex instance, no aggregation. */
template <typename Mutex>
struct GenericPolicy
-#ifdef UNIV_DEBUG
-: public MutexDebug<Mutex>
-#endif /* UNIV_DEBUG */
{
public:
- typedef Mutex MutexType;
-
- /** Constructor. */
- GenericPolicy()
- UNIV_NOTHROW
- :
-#ifdef UNIV_DEBUG
- MutexDebug<MutexType>(),
-#endif /* UNIV_DEBUG */
- m_count(),
- m_id()
- { }
-
- /** Destructor */
- ~GenericPolicy() { }
-
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] id Mutex ID
@@ -292,8 +221,6 @@ public:
meta.get_counter()->single_register(&m_count);
sync_file_created_register(this, filename, uint16_t(line));
-
- ut_d(MutexDebug<MutexType>::init(m_id));
}
/** Called when the mutex is destroyed. */
@@ -305,8 +232,6 @@ public:
meta.get_counter()->single_deregister(&m_count);
sync_file_created_deregister(this);
-
- ut_d(MutexDebug<MutexType>::destroy());
}
/** Called after a successful mutex acquire.
@@ -332,40 +257,6 @@ public:
++m_count.m_calls;
}
- /** Called when an attempt is made to lock the mutex
- @param[in] mutex Mutex instance to be locked
- @param[in] filename Filename from where it was called
- @param[in] line Line number from where it was called */
- void enter(
- const MutexType& mutex,
- const char* filename,
- unsigned line)
- UNIV_NOTHROW
- {
- ut_d(MutexDebug<MutexType>::enter(&mutex, filename, line));
- }
-
- /** Called when the mutex is locked
- @param[in] mutex Mutex instance that is locked
- @param[in] filename Filename from where it was called
- @param[in] line Line number from where it was called */
- void locked(
- const MutexType& mutex,
- const char* filename,
- unsigned line)
- UNIV_NOTHROW
- {
- ut_d(MutexDebug<MutexType>::locked(&mutex, filename, line));
- }
-
- /** Called when the mutex is released
- @param[in] mutex Mutex instance that is released */
- void release(const MutexType& mutex)
- UNIV_NOTHROW
- {
- ut_d(MutexDebug<MutexType>::release(&mutex));
- }
-
/** Print the information about the latch
@return the string representation */
std::string print() const
@@ -378,14 +269,18 @@ public:
return(m_id);
}
- /** @return the string representation */
- std::string to_string() const;
-private:
- typedef latch_meta_t::CounterType Counter;
+ /** @return the string representation */
+ std::string to_string() const
+ { return sync_mutex_to_string(get_id(), sync_file_created_get(this)); }
- /** The user visible counters, registered with the meta-data. */
- Counter::Count m_count;
+#ifdef UNIV_DEBUG
+ MutexDebug<Mutex> context;
+#endif
+
+private:
+ /** The user visible counters, registered with the meta-data. */
+ latch_meta_t::CounterType::Count m_count;
/** Latch meta data ID */
latch_id_t m_id;
@@ -395,29 +290,8 @@ private:
too many of them to count individually. */
template <typename Mutex>
class BlockMutexPolicy
-#ifdef UNIV_DEBUG
-: public MutexDebug<Mutex>
-#endif /* UNIV_DEBUG */
{
public:
- typedef Mutex MutexType;
- typedef typename latch_meta_t::CounterType::Count Count;
-
- /** Default constructor. */
- BlockMutexPolicy()
- :
-#ifdef UNIV_DEBUG
- MutexDebug<MutexType>(),
-#endif /* UNIV_DEBUG */
- m_count(),
- m_id()
- {
- /* Do nothing */
- }
-
- /** Destructor */
- ~BlockMutexPolicy() { }
-
/** Called when the mutex is "created". Note: Not from the constructor
but when the mutex is initialised.
@param[in] id Mutex ID */
@@ -436,8 +310,6 @@ public:
ut_ad(meta.get_id() == id);
m_count = meta.get_counter()->sum_register();
-
- ut_d(MutexDebug<MutexType>::init(m_id));
}
/** Called when the mutex is destroyed. */
@@ -445,7 +317,6 @@ public:
UNIV_NOTHROW
{
m_count = NULL;
- ut_d(MutexDebug<MutexType>::destroy());
}
/** Called after a successful mutex acquire.
@@ -469,40 +340,6 @@ public:
++m_count->m_calls;
}
- /** Called when the mutex is locked
- @param[in] mutex Mutex instance that is locked
- @param[in] filename Filename from where it was called
- @param[in] line Line number from where it was called */
- void locked(
- const MutexType& mutex,
- const char* filename,
- unsigned line)
- UNIV_NOTHROW
- {
- ut_d(MutexDebug<MutexType>::locked(&mutex, filename, line));
- }
-
- /** Called when the mutex is released
- @param[in] mutex Mutex instance that is released */
- void release(const MutexType& mutex)
- UNIV_NOTHROW
- {
- ut_d(MutexDebug<MutexType>::release(&mutex));
- }
-
- /** Called when an attempt is made to lock the mutex
- @param[in] mutex Mutex instance to be locked
- @param[in] filename Filename from where it was called
- @param[in] line Line number from where it was called */
- void enter(
- const MutexType& mutex,
- const char* filename,
- unsigned line)
- UNIV_NOTHROW
- {
- ut_d(MutexDebug<MutexType>::enter(&mutex, filename, line));
- }
-
/** Print the information about the latch
@return the string representation */
std::string print() const
@@ -514,19 +351,26 @@ public:
return(m_id);
}
- /** @return the string representation */
- std::string to_string() const;
-private:
- typedef latch_meta_t::CounterType Counter;
+ /**
+ I don't think it makes sense to keep track of the file name
+ and line number for each block mutex. Too much of overhead. Use the
+ latch id to figure out the location from the source.
+
+ @return the string representation
+ */
+ std::string to_string() const
+ { return(sync_mutex_to_string(get_id(), "buf0buf.cc:0")); }
+
+#ifdef UNIV_DEBUG
+ MutexDebug<Mutex> context;
+#endif
- /** The user visible counters, registered with the meta-data. */
- Counter::Count* m_count;
+private:
+ /** The user visible counters, registered with the meta-data. */
+ latch_meta_t::CounterType::Count *m_count;
/** Latch meta data ID */
latch_id_t m_id;
};
-
-#include "sync0policy.inl"
-
#endif /* sync0policy_h */
diff --git a/storage/innobase/include/sync0policy.inl b/storage/innobase/include/sync0policy.inl
deleted file mode 100644
index e7aeb2e16bb..00000000000
--- a/storage/innobase/include/sync0policy.inl
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 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 Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-*****************************************************************************/
-
-/******************************************************************//**
-@file include/sync0policy.ic
-Policy for mutexes.
-
-Created 2012-08-21 Sunny Bains.
-***********************************************************************/
-
-#include "sync0debug.h"
-
-template <typename Mutex>
-std::string GenericPolicy<Mutex>::to_string() const
-{
- return(sync_mutex_to_string(get_id(), sync_file_created_get(this)));
-}
-
-template <typename Mutex>
-std::string BlockMutexPolicy<Mutex>::to_string() const
-{
- /* I don't think it makes sense to keep track of the file name
- and line number for each block mutex. Too much of overhead. Use the
- latch id to figure out the location from the source. */
- return(sync_mutex_to_string(get_id(), "buf0buf.cc:0"));
-}
-
-#ifdef UNIV_DEBUG
-
-template <typename Mutex>
-void MutexDebug<Mutex>::init(latch_id_t id)
- UNIV_NOTHROW
-{
- m_context.m_id = id;
-
- m_context.release();
-
- m_magic_n = MUTEX_MAGIC_N;
-}
-
-template <typename Mutex>
-void MutexDebug<Mutex>::enter(
- const Mutex* mutex,
- const char* name,
- unsigned line)
- UNIV_NOTHROW
-{
- ut_ad(!is_owned());
-
- Context context(m_context.get_id());
-
- context.locked(mutex, name, line);
-
- /* Check for latch order violation. */
-
- sync_check_lock_validate(&context);
-}
-
-template <typename Mutex>
-void MutexDebug<Mutex>::locked(
- const Mutex* mutex,
- const char* name,
- unsigned line)
- UNIV_NOTHROW
-{
- ut_ad(!is_owned());
- ut_ad(m_context.m_thread_id == ULINT_UNDEFINED);
-
- m_context.locked(mutex, name, line);
-
- sync_check_lock_granted(&m_context);
-}
-
-template <typename Mutex>
-void MutexDebug<Mutex>::release(const Mutex*)
- UNIV_NOTHROW
-{
- ut_ad(is_owned());
-
- m_context.release();
-
- sync_check_unlock(&m_context);
-}
-
-#endif /* UNIV_DEBUG */
diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h
index c56d4c2ce6d..87d123fc7a9 100644
--- a/storage/innobase/include/sync0rw.h
+++ b/storage/innobase/include/sync0rw.h
@@ -568,11 +568,11 @@ struct rw_lock_t
: public latch_t
#endif /* UNIV_DEBUG */
{
- /** Holds the state of the lock. */
- int32_t lock_word;
+ /** Holds the state of the lock. */
+ Atomic_relaxed<int32_t> lock_word;
- /** 1: there are waiters */
- int32_t waiters;
+ /** 0=no waiters, 1=waiters for X or SX lock exist */
+ Atomic_relaxed<uint32_t> waiters;
/** number of granted SX locks. */
volatile ulint sx_recursive;
@@ -619,8 +619,7 @@ struct rw_lock_t
#endif /* UNIV_PFS_RWLOCK */
#ifdef UNIV_DEBUG
- virtual std::string to_string() const;
- virtual std::string locked_from() const;
+ std::string to_string() const override;
/** In the debug version: pointer to the debug info list of the lock */
UT_LIST_BASE_NODE_T(rw_lock_debug_t) debug_list;
@@ -628,7 +627,6 @@ struct rw_lock_t
/** Level in the global latching order. */
latch_level_t level;
#endif /* UNIV_DEBUG */
-
};
#ifdef UNIV_DEBUG
/** The structure for storing debug info of an rw-lock. All access to this
diff --git a/storage/innobase/include/sync0rw.inl b/storage/innobase/include/sync0rw.inl
index 15f8ff3fe62..603e902d01c 100644
--- a/storage/innobase/include/sync0rw.inl
+++ b/storage/innobase/include/sync0rw.inl
@@ -2,7 +2,7 @@
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -77,8 +77,7 @@ rw_lock_get_writer(
/*===============*/
const rw_lock_t* lock) /*!< in: rw-lock */
{
- int32_t lock_word = my_atomic_load32_explicit(const_cast<int32_t*>(&lock->lock_word),
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_word = lock->lock_word;
ut_ad(lock_word <= X_LOCK_DECR);
if (lock_word > X_LOCK_HALF_DECR) {
@@ -110,8 +109,7 @@ rw_lock_get_reader_count(
/*=====================*/
const rw_lock_t* lock) /*!< in: rw-lock */
{
- int32_t lock_word = my_atomic_load32_explicit(const_cast<int32_t*>(&lock->lock_word),
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_word = lock->lock_word;
ut_ad(lock_word <= X_LOCK_DECR);
if (lock_word > X_LOCK_HALF_DECR) {
@@ -147,8 +145,7 @@ rw_lock_get_x_lock_count(
/*=====================*/
const rw_lock_t* lock) /*!< in: rw-lock */
{
- int32_t lock_copy = my_atomic_load32_explicit(const_cast<int32_t*>(&lock->lock_word),
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_copy = lock->lock_word;
ut_ad(lock_copy <= X_LOCK_DECR);
if (lock_copy == 0 || lock_copy == -X_LOCK_HALF_DECR) {
@@ -181,8 +178,7 @@ rw_lock_get_sx_lock_count(
const rw_lock_t* lock) /*!< in: rw-lock */
{
#ifdef UNIV_DEBUG
- int32_t lock_copy = my_atomic_load32_explicit(const_cast<int32_t*>(&lock->lock_word),
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_copy = lock->lock_word;
ut_ad(lock_copy <= X_LOCK_DECR);
@@ -213,14 +209,15 @@ rw_lock_lock_word_decr(
int32_t amount, /*!< in: amount to decrement */
int32_t threshold) /*!< in: threshold of judgement */
{
- int32_t lock_copy = my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_copy = lock->lock_word;
+
while (lock_copy > threshold) {
- if (my_atomic_cas32_strong_explicit(&lock->lock_word,
- &lock_copy,
- lock_copy - amount,
- MY_MEMORY_ORDER_ACQUIRE,
- MY_MEMORY_ORDER_RELAXED)) {
+ if (lock->lock_word.compare_exchange_strong(
+ lock_copy,
+ lock_copy - amount,
+ std::memory_order_acquire,
+ std::memory_order_relaxed)) {
+
return(true);
}
}
@@ -304,9 +301,9 @@ rw_lock_x_lock_func_nowait(
{
int32_t oldval = X_LOCK_DECR;
- if (my_atomic_cas32_strong_explicit(&lock->lock_word, &oldval, 0,
- MY_MEMORY_ORDER_ACQUIRE,
- MY_MEMORY_ORDER_RELAXED)) {
+ if (lock->lock_word.compare_exchange_strong(oldval, 0,
+ std::memory_order_acquire,
+ std::memory_order_relaxed)) {
lock->writer_thread = os_thread_get_curr_id();
} else if (os_thread_eq(lock->writer_thread, os_thread_get_curr_id())) {
@@ -316,12 +313,12 @@ rw_lock_x_lock_func_nowait(
observe consistent values. */
if (oldval == 0 || oldval == -X_LOCK_HALF_DECR) {
/* There are 1 x-locks */
- my_atomic_add32_explicit(&lock->lock_word, -X_LOCK_DECR,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_sub(X_LOCK_DECR,
+ std::memory_order_relaxed);
} else if (oldval <= -X_LOCK_DECR) {
/* There are 2 or more x-locks */
- my_atomic_add32_explicit(&lock->lock_word, -1,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_sub(1,
+ std::memory_order_relaxed);
/* Watch for too many recursive locks */
ut_ad(oldval < 1);
} else {
@@ -355,27 +352,21 @@ rw_lock_s_unlock_func(
#endif /* UNIV_DEBUG */
rw_lock_t* lock) /*!< in/out: rw-lock */
{
-#ifdef UNIV_DEBUG
- int32_t dbg_lock_word = my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED);
- ut_ad(dbg_lock_word > -X_LOCK_DECR);
- ut_ad(dbg_lock_word != 0);
- ut_ad(dbg_lock_word < X_LOCK_DECR);
-#endif
-
ut_d(rw_lock_remove_debug_info(lock, pass, RW_LOCK_S));
/* Increment lock_word to indicate 1 less reader */
- int32_t lock_word = my_atomic_add32_explicit(&lock->lock_word, 1,
- MY_MEMORY_ORDER_RELEASE) + 1;
- if (lock_word == 0 || lock_word == -X_LOCK_HALF_DECR) {
+ int32_t lock_word = lock->lock_word.fetch_add(
+ 1, std::memory_order_release);
+ if (lock_word == -1 || lock_word == -X_LOCK_HALF_DECR - 1) {
/* wait_ex waiter exists. It may not be asleep, but we signal
anyway. We do not wake other waiters, because they can't
exist without wait_ex waiter and wait_ex waiter goes first.*/
os_event_set(lock->wait_ex_event);
sync_array_object_signalled();
-
+ } else {
+ ut_ad(lock_word > -X_LOCK_DECR);
+ ut_ad(lock_word < X_LOCK_DECR);
}
ut_ad(rw_lock_validate(lock));
@@ -393,11 +384,7 @@ rw_lock_x_unlock_func(
#endif /* UNIV_DEBUG */
rw_lock_t* lock) /*!< in/out: rw-lock */
{
- int32_t lock_word = my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED);
-
- ut_ad(lock_word == 0 || lock_word == -X_LOCK_HALF_DECR
- || lock_word <= -X_LOCK_DECR);
+ int32_t lock_word = lock->lock_word;
if (lock_word == 0) {
/* Last caller in a possible recursive chain. */
@@ -411,31 +398,27 @@ rw_lock_x_unlock_func(
ACQ_REL due to...
RELEASE: we release rw-lock
ACQUIRE: we want waiters to be loaded after lock_word is stored */
- my_atomic_add32_explicit(&lock->lock_word, X_LOCK_DECR,
- MY_MEMORY_ORDER_ACQ_REL);
+ lock->lock_word.fetch_add(X_LOCK_DECR,
+ std::memory_order_acq_rel);
/* This no longer has an X-lock but it may still have
an SX-lock. So it is now free for S-locks by other threads.
We need to signal read/write waiters.
We do not need to signal wait_ex waiters, since they cannot
exist when there is a writer. */
- if (my_atomic_load32_explicit(&lock->waiters,
- MY_MEMORY_ORDER_RELAXED)) {
- my_atomic_store32_explicit(&lock->waiters, 0,
- MY_MEMORY_ORDER_RELAXED);
+ if (lock->waiters) {
+ lock->waiters = 0;
os_event_set(lock->event);
sync_array_object_signalled();
}
} else if (lock_word == -X_LOCK_DECR
|| lock_word == -(X_LOCK_DECR + X_LOCK_HALF_DECR)) {
/* There are 2 x-locks */
- my_atomic_add32_explicit(&lock->lock_word, X_LOCK_DECR,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_add(X_LOCK_DECR);
} else {
/* There are more than 2 x-locks. */
ut_ad(lock_word < -X_LOCK_DECR);
- my_atomic_add32_explicit(&lock->lock_word, 1,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_add(1);
}
ut_ad(rw_lock_validate(lock));
@@ -461,8 +444,7 @@ rw_lock_sx_unlock_func(
ut_d(rw_lock_remove_debug_info(lock, pass, RW_LOCK_SX));
if (lock->sx_recursive == 0) {
- int32_t lock_word = my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_word = lock->lock_word;
/* Last caller in a possible recursive chain. */
if (lock_word > 0) {
lock->writer_thread = 0;
@@ -472,17 +454,15 @@ rw_lock_sx_unlock_func(
ACQ_REL due to...
RELEASE: we release rw-lock
ACQUIRE: we want waiters to be loaded after lock_word is stored */
- my_atomic_add32_explicit(&lock->lock_word, X_LOCK_HALF_DECR,
- MY_MEMORY_ORDER_ACQ_REL);
+ lock->lock_word.fetch_add(X_LOCK_HALF_DECR,
+ std::memory_order_acq_rel);
/* Lock is now free. May have to signal read/write
waiters. We do not need to signal wait_ex waiters,
since they cannot exist when there is an sx-lock
holder. */
- if (my_atomic_load32_explicit(&lock->waiters,
- MY_MEMORY_ORDER_RELAXED)) {
- my_atomic_store32_explicit(&lock->waiters, 0,
- MY_MEMORY_ORDER_RELAXED);
+ if (lock->waiters) {
+ lock->waiters = 0;
os_event_set(lock->event);
sync_array_object_signalled();
}
@@ -490,8 +470,7 @@ rw_lock_sx_unlock_func(
/* still has x-lock */
ut_ad(lock_word == -X_LOCK_HALF_DECR ||
lock_word <= -(X_LOCK_DECR + X_LOCK_HALF_DECR));
- my_atomic_add32_explicit(&lock->lock_word, X_LOCK_HALF_DECR,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_add(X_LOCK_HALF_DECR);
}
}
diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h
index 469ff05cce9..0cd41a807c6 100644
--- a/storage/innobase/include/sync0sync.h
+++ b/storage/innobase/include/sync0sync.h
@@ -50,11 +50,9 @@ instrumentation due to their large number of instances. */
#ifdef UNIV_PFS_MUTEX
/* Key defines to register InnoDB mutexes with performance schema */
-extern mysql_pfs_key_t autoinc_mutex_key;
extern mysql_pfs_key_t buffer_block_mutex_key;
extern mysql_pfs_key_t buf_pool_mutex_key;
extern mysql_pfs_key_t buf_pool_zip_mutex_key;
-extern mysql_pfs_key_t cache_last_read_mutex_key;
extern mysql_pfs_key_t dict_foreign_err_mutex_key;
extern mysql_pfs_key_t dict_sys_mutex_key;
extern mysql_pfs_key_t fil_system_mutex_key;
@@ -102,7 +100,6 @@ extern mysql_pfs_key_t event_mutex_key;
extern mysql_pfs_key_t event_manager_mutex_key;
extern mysql_pfs_key_t sync_array_mutex_key;
extern mysql_pfs_key_t thread_mutex_key;
-extern mysql_pfs_key_t zip_pad_mutex_key;
extern mysql_pfs_key_t row_drop_list_mutex_key;
extern mysql_pfs_key_t rw_trx_hash_element_mutex_key;
#endif /* UNIV_PFS_MUTEX */
diff --git a/storage/innobase/include/sync0types.h b/storage/innobase/include/sync0types.h
index 29a256d9e42..b0510e82524 100644
--- a/storage/innobase/include/sync0types.h
+++ b/storage/innobase/include/sync0types.h
@@ -28,7 +28,6 @@ Created 9/5/1995 Heikki Tuuri
#define sync0types_h
#include <vector>
-#include <my_atomic.h>
#include "ut0new.h"
@@ -251,14 +250,11 @@ enum latch_level_t {
SYNC_IBUF_HEADER,
SYNC_DICT_HEADER,
SYNC_STATS_AUTO_RECALC,
- SYNC_DICT_AUTOINC_MUTEX,
SYNC_DICT,
SYNC_FTS_CACHE,
SYNC_DICT_OPERATION,
- SYNC_TRX_I_S_LAST_READ,
-
SYNC_TRX_I_S_RWLOCK,
SYNC_RECV_WRITER,
@@ -280,11 +276,9 @@ enum latch_level_t {
up its meta-data. See sync0debug.c. */
enum latch_id_t {
LATCH_ID_NONE = 0,
- LATCH_ID_AUTOINC,
LATCH_ID_BUF_BLOCK_MUTEX,
LATCH_ID_BUF_POOL,
LATCH_ID_BUF_POOL_ZIP,
- LATCH_ID_CACHE_LAST_READ,
LATCH_ID_DICT_FOREIGN_ERR,
LATCH_ID_DICT_SYS,
LATCH_ID_FILE_FORMAT_MAX,
@@ -330,7 +324,6 @@ enum latch_id_t {
LATCH_ID_EVENT_MANAGER,
LATCH_ID_EVENT_MUTEX,
LATCH_ID_SYNC_ARRAY_MUTEX,
- LATCH_ID_ZIP_PAD_MUTEX,
LATCH_ID_OS_AIO_READ_MUTEX,
LATCH_ID_OS_AIO_WRITE_MUTEX,
LATCH_ID_OS_AIO_LOG_MUTEX,
@@ -993,9 +986,6 @@ struct latch_t {
@return the string representation */
virtual std::string to_string() const = 0;
- /** @return "filename:line" from where the latch was last locked */
- virtual std::string locked_from() const = 0;
-
/** @return the latch level */
latch_level_t get_level() const
UNIV_NOTHROW
@@ -1036,7 +1026,7 @@ struct sync_checker : public sync_check_functor_t
/** Check the latching constraints
@param[in] level The level held by the thread
@return whether a latch violation was detected */
- bool operator()(const latch_level_t level) const
+ bool operator()(const latch_level_t level) const override
{
if (some_allowed) {
switch (level) {
@@ -1080,7 +1070,7 @@ struct sync_allowed_latches : public sync_check_functor_t {
@param[in] latch The latch level to check
@return true if there is a latch violation */
- bool operator()(const latch_level_t level) const
+ bool operator()(const latch_level_t level) const override
{
return(std::find(begin, end, level) == end);
}
@@ -1111,51 +1101,6 @@ enum rw_lock_flag_t {
#endif /* UNIV_INNOCHECKSUM */
-static inline ulint my_atomic_addlint(ulint *A, ulint B)
-{
-#ifdef _WIN64
- return ulint(my_atomic_add64((volatile int64*)A, B));
-#else
- return ulint(my_atomic_addlong(A, B));
-#endif
-}
-
-static inline ulint my_atomic_loadlint(const ulint *A)
-{
-#ifdef _WIN64
- return ulint(my_atomic_load64((volatile int64*)A));
-#else
- return ulint(my_atomic_loadlong(A));
-#endif
-}
-
-static inline lint my_atomic_addlint(volatile lint *A, lint B)
-{
-#ifdef _WIN64
- return my_atomic_add64((volatile int64*)A, B);
-#else
- return my_atomic_addlong(A, B);
-#endif
-}
-
-static inline lint my_atomic_loadlint(const lint *A)
-{
-#ifdef _WIN64
- return lint(my_atomic_load64((volatile int64*)A));
-#else
- return my_atomic_loadlong(A);
-#endif
-}
-
-static inline void my_atomic_storelint(ulint *A, ulint B)
-{
-#ifdef _WIN64
- my_atomic_store64((volatile int64*)A, B);
-#else
- my_atomic_storelong(A, B);
-#endif
-}
-
/** Simple non-atomic counter aligned to CACHE_LINE_SIZE
@tparam Type the integer type of the counter */
template <typename Type>
@@ -1178,28 +1123,4 @@ private:
/** The counter */
Type m_counter;
};
-
-/** Simple atomic counter aligned to CACHE_LINE_SIZE
-@tparam Type lint or ulint */
-template <typename Type = ulint>
-struct MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) simple_atomic_counter
-{
- /** Increment the counter */
- Type inc() { return add(1); }
- /** Decrement the counter */
- Type dec() { return add(Type(~0)); }
-
- /** Add to the counter
- @param[in] i amount to be added
- @return the value of the counter before adding */
- Type add(Type i) { return my_atomic_addlint(&m_counter, i); }
-
- /** @return the value of the counter (non-atomic access)! */
- operator Type() const { return m_counter; }
-
-private:
- /** The counter */
- Type m_counter;
-};
-
#endif /* sync0types_h */
diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h
index 40721c34675..a5a27555f5d 100644
--- a/storage/innobase/include/trx0purge.h
+++ b/storage/innobase/include/trx0purge.h
@@ -78,7 +78,8 @@ public:
typedef trx_rsegs_t::iterator iterator;
typedef trx_rsegs_t::const_iterator const_iterator;
- TrxUndoRsegs() : trx_no(0), m_rsegs() {}
+ TrxUndoRsegs() {}
+
/** Constructor */
TrxUndoRsegs(trx_rseg_t& rseg)
: trx_no(rseg.last_trx_no()), m_rsegs(1, &rseg) {}
@@ -105,10 +106,10 @@ public:
}
/** Copy of trx_rseg_t::last_trx_no() */
- trx_id_t trx_no;
+ trx_id_t trx_no= 0;
private:
/** Rollback segments of a transaction, scheduled for purge. */
- trx_rsegs_t m_rsegs;
+ trx_rsegs_t m_rsegs{};
};
typedef std::priority_queue<
@@ -136,202 +137,6 @@ private:
TrxUndoRsegs::const_iterator m_iter;
};
-/* Namespace to hold all the related functions and variables need for truncate
-of undo tablespace. */
-namespace undo {
-
- typedef std::vector<ulint> undo_spaces_t;
- typedef std::vector<trx_rseg_t*> rseg_for_trunc_t;
-
- /** Mark completion of undo truncate action by writing magic number to
- the log file and then removing it from the disk.
- If we are going to remove it from disk then why write magic number ?
- This is to safeguard from unlink (file-system) anomalies that will keep
- the link to the file even after unlink action is successfull and
- ref-count = 0.
- @param[in] space_id id of the undo tablespace to truncate.*/
- void done(ulint space_id);
-
- /** Check if TRUNCATE_DDL_LOG file exist.
- @param[in] space_id id of the undo tablespace.
- @return true if exist else false. */
- bool is_log_present(ulint space_id);
-
- /** Track UNDO tablespace mark for truncate. */
- class Truncate {
- public:
- void create()
- {
- m_undo_for_trunc = ULINT_UNDEFINED;
- m_scan_start = 1;
- m_purge_rseg_truncate_frequency =
- ulint(srv_purge_rseg_truncate_frequency);
- }
-
- /** Clear the cached rollback segment. Normally done
- when purge is about to shutdown. */
- void clear()
- {
- reset();
- rseg_for_trunc_t temp;
- m_rseg_for_trunc.swap(temp);
- }
-
- /** Is tablespace selected for truncate.
- @return true if undo tablespace is marked for truncate */
- bool is_marked() const
- {
- return(!(m_undo_for_trunc == ULINT_UNDEFINED));
- }
-
- /** Mark the tablespace for truncate.
- @param[in] undo_id tablespace for truncate. */
- void mark(ulint undo_id)
- {
- m_undo_for_trunc = undo_id;
-
- m_scan_start = (undo_id + 1)
- % (srv_undo_tablespaces_active + 1);
- if (m_scan_start == 0) {
- /* Note: UNDO tablespace ids starts from 1. */
- m_scan_start = 1;
- }
-
- /* We found an UNDO-tablespace to truncate so set the
- local purge rseg truncate frequency to 1. This will help
- accelerate the purge action and in turn truncate. */
- m_purge_rseg_truncate_frequency = 1;
- }
-
- /** Get the tablespace marked for truncate.
- @return tablespace id marked for truncate. */
- ulint get_marked_space_id() const
- {
- return(m_undo_for_trunc);
- }
-
- /** Add rseg to truncate vector.
- @param[in,out] rseg rseg for truncate */
- void add_rseg_to_trunc(trx_rseg_t* rseg)
- {
- m_rseg_for_trunc.push_back(rseg);
- }
-
- /** Get number of rsegs registered for truncate.
- @return return number of rseg that belongs to tablespace mark
- for truncate. */
- ulint rsegs_size() const
- {
- return(m_rseg_for_trunc.size());
- }
-
- /** Get ith registered rseg.
- @param[in] id index of rseg to get.
- @return reference to registered rseg. */
- trx_rseg_t* get_ith_rseg(ulint id)
- {
- ut_ad(id < m_rseg_for_trunc.size());
- return(m_rseg_for_trunc.at(id));
- }
-
- /** Reset for next rseg truncate. */
- void reset()
- {
- m_undo_for_trunc = ULINT_UNDEFINED;
- m_rseg_for_trunc.clear();
-
- /* Sync with global value as we are done with
- truncate now. */
- m_purge_rseg_truncate_frequency = static_cast<ulint>(
- srv_purge_rseg_truncate_frequency);
- }
-
- /** Get the tablespace id to start scanning from.
- @return id of UNDO tablespace to start scanning from. */
- ulint get_scan_start() const
- {
- return(m_scan_start);
- }
-
- /** Check if the tablespace needs fix-up (based on presence of
- DDL truncate log)
- @param space_id space id of the undo tablespace to check
- @return true if fix up is needed else false */
- bool needs_fix_up(ulint space_id) const
- {
- return(is_log_present(space_id));
- }
-
- /** Add undo tablespace to truncate vector.
- @param[in] space_id space id of tablespace to
- truncate */
- static void add_space_to_trunc_list(ulint space_id)
- {
- s_spaces_to_truncate.push_back(space_id);
- }
-
- /** Clear the truncate vector. */
- static void clear_trunc_list()
- {
- s_spaces_to_truncate.clear();
- }
-
- /** Is tablespace marked for truncate.
- @param[in] space_id space id to check
- @return true if marked for truncate, else false. */
- static bool is_tablespace_truncated(ulint space_id)
- {
- return(std::find(s_spaces_to_truncate.begin(),
- s_spaces_to_truncate.end(), space_id)
- != s_spaces_to_truncate.end());
- }
-
- /** Was a tablespace truncated at startup
- @param[in] space_id space id to check
- @return whether space_id was truncated at startup */
- static bool was_tablespace_truncated(ulint space_id)
- {
- return(std::find(s_fix_up_spaces.begin(),
- s_fix_up_spaces.end(),
- space_id)
- != s_fix_up_spaces.end());
- }
-
- /** Get local rseg purge truncate frequency
- @return rseg purge truncate frequency. */
- ulint get_rseg_truncate_frequency() const
- {
- return(m_purge_rseg_truncate_frequency);
- }
-
- private:
- /** UNDO tablespace is mark for truncate. */
- ulint m_undo_for_trunc;
-
- /** rseg that resides in UNDO tablespace is marked for
- truncate. */
- rseg_for_trunc_t m_rseg_for_trunc;
-
- /** Start scanning for UNDO tablespace from this space_id.
- This is to avoid bias selection of one tablespace always. */
- ulint m_scan_start;
-
- /** Rollback segment(s) purge frequency. This is local
- value maintained along with global value. It is set to global
- value on start but when tablespace is marked for truncate it
- is updated to 1 and then minimum value among 2 is used by
- purge action. */
- ulint m_purge_rseg_truncate_frequency;
-
- /** List of UNDO tablespace(s) to truncate. */
- static undo_spaces_t s_spaces_to_truncate;
- public:
- /** Undo tablespaces that were truncated at startup */
- static undo_spaces_t s_fix_up_spaces;
- }; /* class Truncate */
-
-}; /* namespace undo */
-
/** The control structure used in the purge operation */
class purge_sys_t
{
@@ -344,22 +149,19 @@ public:
MY_ALIGNED(CACHE_LINE_SIZE)
rw_lock_t latch;
private:
- /** whether purge is enabled; protected by latch and my_atomic */
- int32_t m_enabled;
+ /** whether purge is enabled; protected by latch and std::atomic */
+ std::atomic<bool> m_enabled;
/** number of pending stop() calls without resume() */
- int32_t m_paused;
+ Atomic_counter<int32_t> m_paused;
public:
que_t* query; /*!< The query graph which will do the
parallelized purge operation */
MY_ALIGNED(CACHE_LINE_SIZE)
ReadView view; /*!< The purge will not remove undo logs
which are >= this view (purge view) */
- /** Total number of tasks submitted by srv_purge_coordinator_thread.
- Not accessed by other threads. */
- ulint n_submitted;
- /** Number of completed tasks. Accessed by srv_purge_coordinator
- and srv_worker_thread by my_atomic. */
- ulint n_completed;
+ /** Number of not completed tasks. Accessed by srv_purge_coordinator
+ and srv_worker_thread by std::atomic. */
+ std::atomic<ulint> n_tasks;
/** Iterator to the undo log records of committed transactions */
struct iterator
@@ -409,9 +211,14 @@ public:
by the pq_mutex */
PQMutex pq_mutex; /*!< Mutex protecting purge_queue */
- undo::Truncate undo_trunc; /*!< Track UNDO tablespace marked
- for truncate. */
-
+ /** Undo tablespace file truncation (only accessed by the
+ srv_purge_coordinator_thread) */
+ struct {
+ /** The undo tablespace that is currently being truncated */
+ fil_space_t* current;
+ /** The undo tablespace that was last truncated */
+ fil_space_t* last;
+ } truncate;
/**
Constructor.
@@ -420,7 +227,7 @@ public:
uninitialised. Real initialisation happens in create().
*/
- purge_sys_t() : event(NULL), m_enabled(false) {}
+ purge_sys_t() : event(NULL), m_enabled(false), n_tasks(0) {}
/** Create the instance */
@@ -430,39 +237,24 @@ public:
void close();
/** @return whether purge is enabled */
- bool enabled()
- {
- return my_atomic_load32_explicit(&m_enabled, MY_MEMORY_ORDER_RELAXED);
- }
- /** @return whether purge is enabled */
- bool enabled_latched()
- {
- ut_ad(rw_lock_own_flagged(&latch, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S));
- return bool(m_enabled);
- }
+ bool enabled() { return m_enabled.load(std::memory_order_relaxed); }
/** @return whether the purge coordinator is paused */
bool paused()
- { return my_atomic_load32_explicit(&m_paused, MY_MEMORY_ORDER_RELAXED); }
- /** @return whether the purge coordinator is paused */
- bool paused_latched()
- {
- ut_ad(rw_lock_own_flagged(&latch, RW_LOCK_FLAG_X | RW_LOCK_FLAG_S));
- return m_paused != 0;
- }
+ { return m_paused != 0; }
/** Enable purge at startup. Not protected by latch; the main thread
will wait for purge_sys.enabled() in srv_start() */
void coordinator_startup()
{
ut_ad(!enabled());
- my_atomic_store32_explicit(&m_enabled, true, MY_MEMORY_ORDER_RELAXED);
+ m_enabled.store(true, std::memory_order_relaxed);
}
/** Disable purge at shutdown */
void coordinator_shutdown()
{
ut_ad(enabled());
- my_atomic_store32_explicit(&m_enabled, false, MY_MEMORY_ORDER_RELAXED);
+ m_enabled.store(false, std::memory_order_relaxed);
}
/** @return whether the purge coordinator thread is active */
diff --git a/storage/innobase/include/trx0roll.h b/storage/innobase/include/trx0roll.h
index a23b57ccc3e..d9ea6c19d11 100644
--- a/storage/innobase/include/trx0roll.h
+++ b/storage/innobase/include/trx0roll.h
@@ -42,16 +42,6 @@ trx_savept_take(
/*============*/
trx_t* trx); /*!< in: transaction */
-/** Get the last undo log record of a transaction (for rollback).
-@param[in,out] trx transaction
-@param[out] roll_ptr DB_ROLL_PTR to the undo record
-@param[in,out] heap memory heap for allocation
-@return undo log record copied to heap
-@retval NULL if none left or the roll_limit (savepoint) was reached */
-trx_undo_rec_t*
-trx_roll_pop_top_rec_of_trx(trx_t* trx, roll_ptr_t* roll_ptr, mem_heap_t* heap)
- MY_ATTRIBUTE((nonnull, warn_unused_result));
-
/** Report progress when rolling back a row of a recovered transaction. */
void trx_roll_report_progress();
/*******************************************************************//**
diff --git a/storage/innobase/include/trx0rseg.inl b/storage/innobase/include/trx0rseg.inl
index 687a1d5b8d8..0cff8fa1f5c 100644
--- a/storage/innobase/include/trx0rseg.inl
+++ b/storage/innobase/include/trx0rseg.inl
@@ -41,7 +41,7 @@ trx_rsegf_get(fil_space_t* space, ulint page_no, mtr_t* mtr)
|| !srv_was_started);
buf_block_t* block = buf_page_get(page_id_t(space->id, page_no),
- univ_page_size, RW_X_LATCH, mtr);
+ 0, RW_X_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_RSEG_HEADER);
@@ -67,8 +67,7 @@ trx_rsegf_get_new(
|| !srv_was_started);
ut_ad(space <= TRX_SYS_MAX_UNDO_SPACES || space == SRV_TMP_SPACE_ID);
- block = buf_page_get(
- page_id_t(space, page_no), univ_page_size, RW_X_LATCH, mtr);
+ block = buf_page_get(page_id_t(space, page_no), 0, RW_X_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_RSEG_HEADER_NEW);
diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h
index c06afb927cb..246af942419 100644
--- a/storage/innobase/include/trx0sys.h
+++ b/storage/innobase/include/trx0sys.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2021, MariaDB Corporation.
+Copyright (c) 2017, 2022, 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
@@ -68,17 +68,12 @@ trx_sys_rseg_find_free(const buf_block_t* sys_header);
@param[in] rw whether to lock the page for writing
@return the TRX_SYS page
@retval NULL if the page cannot be read */
-inline
-buf_block_t*
-trx_sysf_get(mtr_t* mtr, bool rw = true)
+inline buf_block_t *trx_sysf_get(mtr_t* mtr, bool rw= true)
{
- buf_block_t* block = buf_page_get(
- page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
- univ_page_size, rw ? RW_X_LATCH : RW_S_LATCH, mtr);
- if (block) {
- buf_block_dbg_add_level(block, SYNC_TRX_SYS_HEADER);
- }
- return block;
+ buf_block_t* block = buf_page_get(page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
+ 0, rw ? RW_X_LATCH : RW_S_LATCH, mtr);
+ ut_d(if (block) buf_block_dbg_add_level(block, SYNC_TRX_SYS_HEADER);)
+ return block;
}
#ifdef UNIV_DEBUG
@@ -199,14 +194,13 @@ trx_sysf_rseg_get_space(const buf_block_t* sys_header, ulint rseg_id)
@param[in] sys_header TRX_SYS page
@param[in] rseg_id rollback segment identifier
@return undo page number */
-inline
-uint32_t
-trx_sysf_rseg_get_page_no(const buf_block_t* sys_header, ulint rseg_id)
+inline uint32_t
+trx_sysf_rseg_get_page_no(const buf_block_t *sys_header, ulint rseg_id)
{
- ut_ad(rseg_id < TRX_SYS_N_RSEGS);
- return mach_read_from_4(TRX_SYS + TRX_SYS_RSEGS + TRX_SYS_RSEG_PAGE_NO
- + rseg_id * TRX_SYS_RSEG_SLOT_SIZE
- + sys_header->frame);
+ ut_ad(rseg_id < TRX_SYS_N_RSEGS);
+ return mach_read_from_4(TRX_SYS + TRX_SYS_RSEGS + TRX_SYS_RSEG_PAGE_NO +
+ rseg_id * TRX_SYS_RSEG_SLOT_SIZE +
+ sys_header->frame);
}
/** Maximum length of MySQL binlog file name, in bytes.
@@ -343,9 +337,9 @@ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID. */
/*-------------------------------------------------------------*/
/** Contents of TRX_SYS_DOUBLEWRITE_MAGIC */
-#define TRX_SYS_DOUBLEWRITE_MAGIC_N 536853855
+constexpr uint32_t TRX_SYS_DOUBLEWRITE_MAGIC_N= 536853855;
/** Contents of TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED */
-#define TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED_N 1783657386
+constexpr uint32_t TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED_N= 1783657386;
/** Size of the doublewrite block in pages */
#define TRX_SYS_DOUBLEWRITE_BLOCK_SIZE FSP_EXTENT_SIZE
@@ -368,7 +362,7 @@ struct rw_trx_hash_element_t
trx_id_t id; /* lf_hash_init() relies on this to be first in the struct */
- trx_id_t no;
+ Atomic_counter<trx_id_t> no;
trx_t *trx;
ib_mutex_t mutex;
};
@@ -715,11 +709,7 @@ public:
because it may change even before this method returns.
*/
- uint32_t size()
- {
- return uint32_t(my_atomic_load32_explicit(&hash.count,
- MY_MEMORY_ORDER_RELAXED));
- }
+ uint32_t size() { return uint32_t(lf_hash_size(&hash)); }
/**
@@ -801,7 +791,7 @@ class trx_sys_t
The smallest number not yet assigned as a transaction id or transaction
number. Accessed and updated with atomic operations.
*/
- MY_ALIGNED(CACHE_LINE_SIZE) trx_id_t m_max_trx_id;
+ MY_ALIGNED(CACHE_LINE_SIZE) Atomic_counter<trx_id_t> m_max_trx_id;
/**
@@ -812,17 +802,17 @@ class trx_sys_t
@sa assign_new_trx_no()
@sa snapshot_ids()
*/
- MY_ALIGNED(CACHE_LINE_SIZE) trx_id_t m_rw_trx_hash_version;
+ MY_ALIGNED(CACHE_LINE_SIZE) std::atomic<trx_id_t> m_rw_trx_hash_version;
+ bool m_initialised;
+
+public:
/**
TRX_RSEG_HISTORY list length (number of committed transactions to purge)
*/
- MY_ALIGNED(CACHE_LINE_SIZE) int32 rseg_history_len;
-
- bool m_initialised;
+ MY_ALIGNED(CACHE_LINE_SIZE) Atomic_counter<size_t> rseg_history_len;
-public:
/** Mutex protecting trx_list. */
MY_ALIGNED(CACHE_LINE_SIZE) mutable TrxSysMutex mutex;
@@ -900,9 +890,7 @@ public:
trx_id_t get_max_trx_id()
{
- return static_cast<trx_id_t>
- (my_atomic_load64_explicit(reinterpret_cast<int64*>(&m_max_trx_id),
- MY_MEMORY_ORDER_RELAXED));
+ return m_max_trx_id;
}
@@ -944,9 +932,7 @@ public:
void assign_new_trx_no(trx_t *trx)
{
trx->no= get_new_trx_id_no_refresh();
- my_atomic_store64_explicit(reinterpret_cast<int64*>
- (&trx->rw_trx_hash_element->no),
- trx->no, MY_MEMORY_ORDER_RELAXED);
+ trx->rw_trx_hash_element->no= trx->no;
refresh_rw_trx_hash_version();
}
@@ -997,7 +983,8 @@ public:
/** Initialiser for m_max_trx_id and m_rw_trx_hash_version. */
void init_max_trx_id(trx_id_t value)
{
- m_max_trx_id= m_rw_trx_hash_version= value;
+ m_max_trx_id= value;
+ m_rw_trx_hash_version.store(value, std::memory_order_relaxed);
}
@@ -1119,22 +1106,6 @@ public:
return count;
}
- /** @return number of committed transactions waiting for purge */
- uint32 history_size() const
- {
- return uint32(my_atomic_load32(&const_cast<trx_sys_t*>(this)
- ->rseg_history_len));
- }
- /** Add to the TRX_RSEG_HISTORY length (on database startup). */
- void history_add(int32 len)
- {
- my_atomic_add32(&rseg_history_len, len);
- }
- /** Register a committed transaction. */
- void history_insert() { history_add(1); }
- /** Note that a committed transaction was purged. */
- void history_remove() { history_add(-1); }
-
private:
static my_bool get_min_trx_id_callback(rw_trx_hash_element_t *element,
trx_id_t *id)
@@ -1165,8 +1136,7 @@ private:
{
if (element->id < arg->m_id)
{
- trx_id_t no= static_cast<trx_id_t>(my_atomic_load64_explicit(
- reinterpret_cast<int64*>(&element->no), MY_MEMORY_ORDER_RELAXED));
+ trx_id_t no= element->no;
arg->m_ids->push_back(element->id);
if (no < arg->m_no)
arg->m_no= no;
@@ -1178,18 +1148,14 @@ private:
/** Getter for m_rw_trx_hash_version, must issue ACQUIRE memory barrier. */
trx_id_t get_rw_trx_hash_version()
{
- return static_cast<trx_id_t>
- (my_atomic_load64_explicit(reinterpret_cast<int64*>
- (&m_rw_trx_hash_version),
- MY_MEMORY_ORDER_ACQUIRE));
+ return m_rw_trx_hash_version.load(std::memory_order_acquire);
}
/** Increments m_rw_trx_hash_version, must issue RELEASE memory barrier. */
void refresh_rw_trx_hash_version()
{
- my_atomic_add64_explicit(reinterpret_cast<int64*>(&m_rw_trx_hash_version),
- 1, MY_MEMORY_ORDER_RELEASE);
+ m_rw_trx_hash_version.fetch_add(1, std::memory_order_release);
}
@@ -1208,8 +1174,7 @@ private:
trx_id_t get_new_trx_id_no_refresh()
{
- return static_cast<trx_id_t>(my_atomic_add64_explicit(
- reinterpret_cast<int64*>(&m_max_trx_id), 1, MY_MEMORY_ORDER_RELAXED));
+ return m_max_trx_id++;
}
};
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index d75095ed048..b84f458374e 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -172,17 +172,6 @@ trx_start_for_ddl_low(
trx_start_for_ddl_low((t), (o))
#endif /* UNIV_DEBUG */
-/****************************************************************//**
-Commits a transaction. */
-void
-trx_commit(
-/*=======*/
- trx_t* trx); /*!< in/out: transaction */
-
-/** Commit a transaction and a mini-transaction.
-@param[in,out] trx transaction
-@param[in,out] mtr mini-transaction (NULL if no modifications) */
-void trx_commit_low(trx_t* trx, mtr_t* mtr);
/**********************************************************************//**
Does the transaction commit for MySQL.
@return DB_SUCCESS or error number */
@@ -467,6 +456,11 @@ struct trx_lock_t {
lock_sys.mutex. Otherwise, this may
only be modified by the thread that is
serving the running transaction. */
+#ifdef WITH_WSREP
+ bool was_chosen_as_wsrep_victim;
+ /*!< high priority wsrep thread has
+ marked this trx to abort */
+#endif /* WITH_WSREP */
/** Pre-allocated record locks */
struct {
@@ -493,6 +487,9 @@ struct trx_lock_t {
lock_list table_locks; /*!< All table locks requested by this
transaction, including AUTOINC locks */
+ /** List of pending trx_t::evict_table() */
+ UT_LIST_BASE_NODE_T(dict_table_t) evicted_tables;
+
bool cancel; /*!< true if the transaction is being
rolled back either via deadlock
detection or due to lock timeout. The
@@ -583,7 +580,7 @@ with exactly one user transaction. There are some exceptions to this:
* For DDL operations, a subtransaction is allocated that modifies the
data dictionary tables. Lock waits and deadlocks are prevented by
-acquiring the dict_operation_lock before starting the subtransaction
+acquiring the dict_sys.latch before starting the subtransaction
and releasing it after committing the subtransaction.
* The purge system uses a special transaction that is not associated
@@ -655,7 +652,7 @@ private:
that it is no longer "active".
*/
- int32_t n_ref;
+ Atomic_counter<int32_t> n_ref;
public:
@@ -798,10 +795,10 @@ public:
defer flush of the logs to disk
until after we release the
mutex. */
- bool must_flush_log_later;/*!< this flag is set to TRUE in
- trx_commit() if flush_log_later was
- TRUE, and there were modifications by
- the transaction; in that case we must
+ bool must_flush_log_later;/*!< set in commit()
+ if flush_log_later was
+ set and redo log was written;
+ in that case we will
flush the log in
trx_commit_complete_for_mysql() */
ulint duplicates; /*!< TRX_DUP_IGNORE | TRX_DUP_REPLACE */
@@ -821,8 +818,8 @@ public:
ib_uint32_t dict_operation_lock_mode;
/*!< 0, RW_S_LATCH, or RW_X_LATCH:
the latch mode trx currently holds
- on dict_operation_lock. Protected
- by dict_operation_lock. */
+ on dict_sys.latch. Protected
+ by dict_sys.latch. */
/** wall-clock time of the latest transition to TRX_STATE_ACTIVE;
used for diagnostic purposes only */
@@ -1006,19 +1003,32 @@ public:
/** Release any explicit locks of a committing transaction. */
inline void release_locks();
+ /** Evict a table definition due to the rollback of ALTER TABLE.
+ @param[in] table_id table identifier */
+ void evict_table(table_id_t table_id);
+
+private:
+ /** Mark a transaction committed in the main memory data structures. */
+ inline void commit_in_memory(const mtr_t *mtr);
+public:
+ /** Commit the transaction. */
+ void commit();
+
+ /** Commit the transaction in a mini-transaction.
+ @param mtr mini-transaction (if there are any persistent modifications) */
+ void commit_low(mtr_t *mtr= nullptr);
+
- bool is_referenced()
- {
- return my_atomic_load32_explicit(&n_ref, MY_MEMORY_ORDER_RELAXED) > 0;
- }
+
+ bool is_referenced() const { return n_ref > 0; }
void reference()
{
#ifdef UNIV_DEBUG
- int32_t old_n_ref=
+ auto old_n_ref=
#endif
- my_atomic_add32_explicit(&n_ref, 1, MY_MEMORY_ORDER_RELAXED);
+ n_ref++;
ut_ad(old_n_ref >= 0);
}
@@ -1026,9 +1036,9 @@ public:
void release_reference()
{
#ifdef UNIV_DEBUG
- int32_t old_n_ref=
+ auto old_n_ref=
#endif
- my_atomic_add32_explicit(&n_ref, -1, MY_MEMORY_ORDER_RELAXED);
+ n_ref--;
ut_ad(old_n_ref > 0);
}
@@ -1045,16 +1055,21 @@ public:
ut_ad(state == TRX_STATE_NOT_STARTED);
ut_ad(!id);
ut_ad(!has_logged());
- ut_ad(!const_cast<trx_t*>(this)->is_referenced());
+ ut_ad(!is_referenced());
ut_ad(!is_wsrep());
+#ifdef WITH_WSREP
+ ut_ad(!lock.was_chosen_as_wsrep_victim);
+#endif
ut_ad(!read_view.is_open());
ut_ad(!lock.wait_thr);
ut_ad(UT_LIST_GET_LEN(lock.trx_locks) == 0);
ut_ad(lock.table_locks.empty());
ut_ad(!autoinc_locks || ib_vector_is_empty(autoinc_locks));
+ ut_ad(UT_LIST_GET_LEN(lock.evicted_tables) == 0);
ut_ad(dict_operation == TRX_DICT_OP_NONE);
}
+
/** @return whether this is a non-locking autocommit transaction */
bool is_autocommit_non_locking() const { return auto_commit && !will_lock; }
diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h
index 356f6cb09e1..55b73f45faa 100644
--- a/storage/innobase/include/trx0undo.h
+++ b/storage/innobase/include/trx0undo.h
@@ -79,27 +79,22 @@ trx_undo_trx_id_is_insert(
/*======================*/
const byte* trx_id) /*!< in: DB_TRX_ID, followed by DB_ROLL_PTR */
MY_ATTRIBUTE((warn_unused_result));
-/*****************************************************************//**
-Writes a roll ptr to an index page. In case that the size changes in
-some future version, this function should be used instead of
-mach_write_... */
-UNIV_INLINE
-void
-trx_write_roll_ptr(
-/*===============*/
- byte* ptr, /*!< in: pointer to memory where
- written */
- roll_ptr_t roll_ptr); /*!< in: roll ptr */
-/*****************************************************************//**
-Reads a roll ptr from an index page. In case that the roll ptr size
-changes in some future version, this function should be used instead of
-mach_read_...
+/** Write DB_ROLL_PTR.
+@param[out] ptr buffer
+@param[in] roll_ptr DB_ROLL_PTR value */
+inline void trx_write_roll_ptr(byte* ptr, roll_ptr_t roll_ptr)
+{
+ compile_time_assert(DATA_ROLL_PTR_LEN == 7);
+ mach_write_to_7(ptr, roll_ptr);
+}
+/** Read DB_ROLL_PTR.
+@param[in] ptr buffer
@return roll ptr */
-UNIV_INLINE
-roll_ptr_t
-trx_read_roll_ptr(
-/*==============*/
- const byte* ptr); /*!< in: pointer to memory from where to read */
+inline roll_ptr_t trx_read_roll_ptr(const byte* ptr)
+{
+ compile_time_assert(DATA_ROLL_PTR_LEN == 7);
+ return mach_read_from_7(ptr);
+}
/** Gets an undo log page and x-latches it.
@param[in] page_id page id
@@ -185,9 +180,7 @@ trx_undo_free_last_page(trx_undo_t* undo, mtr_t* mtr)
@param[in,out] undo undo log
@param[in] limit all undo logs after this limit will be discarded
@param[in] is_temp whether this is temporary undo log */
-void
-trx_undo_truncate_end(trx_undo_t* undo, undo_no_t limit, bool is_temp)
- MY_ATTRIBUTE((nonnull));
+void trx_undo_truncate_end(trx_undo_t& undo, undo_no_t limit, bool is_temp);
/** Truncate the head of an undo log.
NOTE that only whole pages are freed; the header page is not
@@ -244,14 +237,10 @@ trx_undo_set_state_at_finish(
@param[in,out] trx transaction
@param[in,out] undo undo log
@param[in] rollback false=XA PREPARE, true=XA ROLLBACK
-@param[in,out] mtr mini-transaction
-@return undo log segment header page, x-latched */
-page_t*
-trx_undo_set_state_at_prepare(
- trx_t* trx,
- trx_undo_t* undo,
- bool rollback,
- mtr_t* mtr);
+@param[in,out] mtr mini-transaction */
+void trx_undo_set_state_at_prepare(trx_t *trx, trx_undo_t *undo, bool rollback,
+ mtr_t *mtr)
+ MY_ATTRIBUTE((nonnull));
/** Free temporary undo log after commit or rollback.
The information is not needed after a commit or rollback, therefore
@@ -308,21 +297,17 @@ trx_undo_mem_create_at_db_start(trx_rseg_t *rseg, ulint id, uint32_t page_no,
#endif /* !UNIV_INNOCHECKSUM */
-/* Types of an undo log segment */
-#define TRX_UNDO_INSERT 1 /* contains undo entries for inserts */
-#define TRX_UNDO_UPDATE 2 /* contains undo entries for updates
- and delete markings: in short,
- modifys (the name 'UPDATE' is a
- historical relic) */
-/* States of an undo log segment */
-#define TRX_UNDO_ACTIVE 1 /* contains an undo log of an active
- transaction */
-#define TRX_UNDO_CACHED 2 /* cached for quick reuse */
-#define TRX_UNDO_TO_PURGE 4 /* update undo segment will not be
- reused: it can be freed in purge when
- all undo data in it is removed */
-#define TRX_UNDO_PREPARED 5 /* contains an undo log of an
- prepared transaction */
+/** the only rollback segment type since MariaDB 10.3.1 */
+constexpr uint16_t TRX_UNDO_UPDATE= 2;
+/* TRX_UNDO_STATE values of an undo log segment */
+/** contains an undo log of an active transaction */
+constexpr uint16_t TRX_UNDO_ACTIVE = 1;
+/** cached for quick reuse */
+constexpr uint16_t TRX_UNDO_CACHED = 2;
+/** can be freed in purge when all undo data in it is removed */
+constexpr uint16_t TRX_UNDO_TO_PURGE = 4;
+/** contains an undo log of a prepared transaction */
+constexpr uint16_t TRX_UNDO_PREPARED = 5;
#ifndef UNIV_INNOCHECKSUM
diff --git a/storage/innobase/include/trx0undo.inl b/storage/innobase/include/trx0undo.inl
index 19697c6054c..6d1ec16869e 100644
--- a/storage/innobase/include/trx0undo.inl
+++ b/storage/innobase/include/trx0undo.inl
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -103,37 +103,6 @@ trx_undo_trx_id_is_insert(
return bool(trx_id[DATA_TRX_ID_LEN] >> 7);
}
-/*****************************************************************//**
-Writes a roll ptr to an index page. In case that the size changes in
-some future version, this function should be used instead of
-mach_write_... */
-UNIV_INLINE
-void
-trx_write_roll_ptr(
-/*===============*/
- byte* ptr, /*!< in: pointer to memory where
- written */
- roll_ptr_t roll_ptr) /*!< in: roll ptr */
-{
- compile_time_assert(DATA_ROLL_PTR_LEN == 7);
- mach_write_to_7(ptr, roll_ptr);
-}
-
-/*****************************************************************//**
-Reads a roll ptr from an index page. In case that the roll ptr size
-changes in some future version, this function should be used instead of
-mach_read_...
-@return roll ptr */
-UNIV_INLINE
-roll_ptr_t
-trx_read_roll_ptr(
-/*==============*/
- const byte* ptr) /*!< in: pointer to memory from where to read */
-{
- compile_time_assert(DATA_ROLL_PTR_LEN == 7);
- return(mach_read_from_7(ptr));
-}
-
/** Gets an undo log page and x-latches it.
@param[in] page_id page id
@param[in,out] mtr mini-transaction
@@ -142,8 +111,7 @@ UNIV_INLINE
page_t*
trx_undo_page_get(const page_id_t page_id, mtr_t* mtr)
{
- buf_block_t* block = buf_page_get(page_id, univ_page_size,
- RW_X_LATCH, mtr);
+ buf_block_t* block = buf_page_get(page_id, 0, RW_X_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE);
@@ -158,8 +126,7 @@ UNIV_INLINE
page_t*
trx_undo_page_get_s_latched(const page_id_t page_id, mtr_t* mtr)
{
- buf_block_t* block = buf_page_get(page_id, univ_page_size,
- RW_S_LATCH, mtr);
+ buf_block_t* block = buf_page_get(page_id, 0, RW_S_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE);
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 8de24b1faa0..ddb27c107ff 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -77,6 +77,7 @@ used throughout InnoDB but do not include too much themselves. They
support cross-platform development and expose comonly used SQL names. */
#include <my_global.h>
+#include "my_counter.h"
/* JAN: TODO: missing 5.7 header */
#ifdef HAVE_MY_THREAD_H
diff --git a/storage/innobase/include/ut0counter.h b/storage/innobase/include/ut0counter.h
index a04a674751c..646a5f367c2 100644
--- a/storage/innobase/include/ut0counter.h
+++ b/storage/innobase/include/ut0counter.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -30,7 +30,6 @@ Created 2012/04/12 by Sunny Bains
#include "os0thread.h"
#include "my_rdtsc.h"
-#include "my_atomic.h"
/** CPU cache line size */
#ifdef CPU_LEVEL1_DCACHE_LINESIZE
@@ -42,120 +41,85 @@ Created 2012/04/12 by Sunny Bains
/** Default number of slots to use in ib_counter_t */
#define IB_N_SLOTS 64
-/** Get the offset into the counter array. */
-template <typename Type, int N>
-struct generic_indexer_t {
- /** @return offset within m_counter */
- static size_t offset(size_t index) UNIV_NOTHROW
- {
- return(((index % N) + 1) * (CACHE_LINE_SIZE / sizeof(Type)));
- }
-};
+/** Use the result of my_timer_cycles(), which mainly uses RDTSC for cycles
+as a random value. See the comments for my_timer_cycles() */
+/** @return result from RDTSC or similar functions. */
+static inline size_t
+get_rnd_value()
+{
+ size_t c = static_cast<size_t>(my_timer_cycles());
+
+ if (c != 0) {
+ return c;
+ }
-/** Use the result of my_timer_cycles(), which mainly uses RDTSC for cycles,
-to index into the counter array. See the comments for my_timer_cycles() */
-template <typename Type=ulint, int N=1>
-struct counter_indexer_t : public generic_indexer_t<Type, N> {
- /** @return result from RDTSC or similar functions. */
- static size_t get_rnd_index() UNIV_NOTHROW
- {
- size_t c = static_cast<size_t>(my_timer_cycles());
-
- if (c != 0) {
- return(c);
- } else {
- /* We may go here if my_timer_cycles() returns 0,
- so we have to have the plan B for the counter. */
+ /* We may go here if my_timer_cycles() returns 0,
+ so we have to have the plan B for the counter. */
#if !defined(_WIN32)
- return(size_t(os_thread_get_curr_id()));
+ return (size_t)os_thread_get_curr_id();
#else
- LARGE_INTEGER cnt;
- QueryPerformanceCounter(&cnt);
+ LARGE_INTEGER cnt;
+ QueryPerformanceCounter(&cnt);
- return(static_cast<size_t>(cnt.QuadPart));
+ return static_cast<size_t>(cnt.QuadPart);
#endif /* !_WIN32 */
- }
- }
+}
- /** @return a random offset to the array */
- static size_t get_rnd_offset() UNIV_NOTHROW
- {
- return(generic_indexer_t<Type, N>::offset(get_rnd_index()));
- }
-};
-
-#define default_indexer_t counter_indexer_t
-
-/** Class for using fuzzy counters. The counter is relaxed atomic
+/** Class for using fuzzy counters. The counter is multi-instance relaxed atomic
so the results are not guaranteed to be 100% accurate but close
enough. Creates an array of counters and separates each element by the
CACHE_LINE_SIZE bytes */
-template <
- typename Type,
- int N = IB_N_SLOTS,
- template<typename, int> class Indexer = default_indexer_t>
-struct MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_t
-{
+template <typename Type, int N = IB_N_SLOTS>
+struct ib_counter_t {
/** Increment the counter by 1. */
- void inc() UNIV_NOTHROW { add(1); }
+ void inc() { add(1); }
/** Increment the counter by 1.
@param[in] index a reasonably thread-unique identifier */
- void inc(size_t index) UNIV_NOTHROW { add(index, 1); }
+ void inc(size_t index) { add(index, 1); }
/** Add to the counter.
@param[in] n amount to be added */
- void add(Type n) UNIV_NOTHROW { add(m_policy.get_rnd_offset(), n); }
+ void add(Type n) { add(get_rnd_value(), n); }
/** Add to the counter.
@param[in] index a reasonably thread-unique identifier
@param[in] n amount to be added */
- void add(size_t index, Type n) UNIV_NOTHROW {
- size_t i = m_policy.offset(index);
-
- ut_ad(i < UT_ARR_SIZE(m_counter));
-
- if (sizeof(Type) == 8) {
- my_atomic_add64_explicit(
- reinterpret_cast<int64*>(&m_counter[i]),
- static_cast<int64>(n), MY_MEMORY_ORDER_RELAXED);
- } else if (sizeof(Type) == 4) {
- my_atomic_add32_explicit(
- reinterpret_cast<int32*>(&m_counter[i]),
- static_cast<int32>(n), MY_MEMORY_ORDER_RELAXED);
- }
- compile_time_assert(sizeof(Type) == 8 || sizeof(Type) == 4);
+ void add(size_t index, Type n) {
+ index = index % N;
+
+ ut_ad(index < UT_ARR_SIZE(m_counter));
+
+ m_counter[index].value.fetch_add(n, std::memory_order_relaxed);
}
- /* @return total value - not 100% accurate, since it is relaxed atomic. */
- operator Type() const UNIV_NOTHROW {
+ /* @return total value - not 100% accurate, since it is relaxed atomic*/
+ operator Type() const {
Type total = 0;
- for (size_t i = 0; i < N; ++i) {
- if (sizeof(Type) == 8) {
- total += static_cast<
- Type>(my_atomic_load64_explicit(
- reinterpret_cast<int64*>(const_cast<Type*>(
- &m_counter[m_policy.offset(i)])),
- MY_MEMORY_ORDER_RELAXED));
- } else if (sizeof(Type) == 4) {
- total += static_cast<
- Type>(my_atomic_load32_explicit(
- reinterpret_cast<int32*>(const_cast<Type*>(
- &m_counter[m_policy.offset(i)])),
- MY_MEMORY_ORDER_RELAXED));
- }
+ for (const auto &counter : m_counter) {
+ total += counter.value.load(std::memory_order_relaxed);
}
return(total);
}
private:
- /** Indexer into the array */
- Indexer<Type, N>m_policy;
-
- /** Slot 0 is unused. */
- Type m_counter[(N + 1) * (CACHE_LINE_SIZE / sizeof(Type))];
+ /** Atomic which occupies whole CPU cache line.
+ Note: We rely on the default constructor of std::atomic and
+ do not explicitly initialize the contents. This works for us,
+ because ib_counter_t is only intended for usage with global
+ memory that is allocated from the .bss and thus guaranteed to
+ be zero-initialized by the run-time environment.
+ @see srv_stats
+ @see rw_lock_stats */
+ struct ib_counter_element_t {
+ MY_ALIGNED(CACHE_LINE_SIZE) std::atomic<Type> value;
+ };
+ static_assert(sizeof(ib_counter_element_t) == CACHE_LINE_SIZE, "");
+
+ /** Array of counter elements */
+ MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_element_t m_counter[N];
};
#endif /* ut0counter_h */
diff --git a/storage/innobase/include/ut0crc32.h b/storage/innobase/include/ut0crc32.h
index 68af6882155..f2c1b7e82b6 100644
--- a/storage/innobase/include/ut0crc32.h
+++ b/storage/innobase/include/ut0crc32.h
@@ -47,12 +47,6 @@ typedef uint32_t (*ut_crc32_func_t)(const byte* ptr, ulint len);
/** Pointer to CRC32 calculation function. */
extern ut_crc32_func_t ut_crc32;
-#ifdef INNODB_BUG_ENDIAN_CRC32
-/** Pointer to CRC32 calculation function, which uses big-endian byte order
-when converting byte strings to integers internally. */
-extern uint32_t ut_crc32_legacy_big_endian(const byte* buf, ulint len);
-#endif /* INNODB_BUG_ENDIAN_CRC32 */
-
/** Text description of CRC32 implementation */
extern const char* ut_crc32_implementation;
diff --git a/storage/innobase/include/ut0mutex.h b/storage/innobase/include/ut0mutex.h
index 5375be0ed71..e1b6d129b9d 100644
--- a/storage/innobase/include/ut0mutex.h
+++ b/storage/innobase/include/ut0mutex.h
@@ -38,8 +38,6 @@ Created 2012-03-24 Sunny Bains.
@param[in] T The resulting typedef alias */
#define UT_MUTEX_TYPE(M, P, T) typedef PolicyMutex<M<P> > T;
-typedef OSMutex EventMutex;
-
# ifdef HAVE_IB_LINUX_FUTEX
UT_MUTEX_TYPE(TTASFutexMutex, GenericPolicy, FutexMutex);
UT_MUTEX_TYPE(TTASFutexMutex, BlockMutexPolicy, BlockFutexMutex);
diff --git a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h
index d2b43a12550..dba8d3f1a06 100644
--- a/storage/innobase/include/ut0rnd.h
+++ b/storage/innobase/include/ut0rnd.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2019, MariaDB Corporation.
+Copyright (c) 2019, 2020, 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
@@ -32,7 +32,7 @@ Created 1/20/1994 Heikki Tuuri
#ifndef UNIV_INNOCHECKSUM
/** Seed value of ut_rnd_gen() */
-extern int32 ut_rnd_current;
+extern std::atomic<uint32_t> ut_rnd_current;
/** @return a pseudo-random 32-bit number */
inline uint32_t ut_rnd_gen()
@@ -45,8 +45,7 @@ inline uint32_t ut_rnd_gen()
x^19+x^18+x^14+x^13+x^11+x^10+x^9+x^8+x^6+1 */
const uint32_t crc32c= 0x1edc6f41;
- uint32_t rnd= my_atomic_load32_explicit(&ut_rnd_current,
- MY_MEMORY_ORDER_RELAXED);
+ uint32_t rnd= ut_rnd_current.load(std::memory_order_relaxed);
if (UNIV_UNLIKELY(rnd == 0))
{
@@ -61,7 +60,7 @@ inline uint32_t ut_rnd_gen()
rnd^= crc32c;
}
- my_atomic_store32_explicit(&ut_rnd_current, rnd, MY_MEMORY_ORDER_RELAXED);
+ ut_rnd_current.store(rnd, std::memory_order_relaxed);
return rnd;
}
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index 823ed885330..7031fc47f6a 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -46,7 +46,6 @@ Created 1/20/1994 Heikki Tuuri
#include <stdarg.h>
#include <string>
-#include <my_atomic.h>
/** Index name prefix in fast index creation, as a string constant */
#define TEMP_INDEX_PREFIX_STR "\377"
@@ -146,12 +145,6 @@ ut_2_power_up(
ulint n) /*!< in: number != 0 */
MY_ATTRIBUTE((const));
-/** Determine how many bytes (groups of 8 bits) are needed to
-store the given number of bits.
-@param b in: bits
-@return number of bytes (octets) needed to represent b */
-#define UT_BITS_IN_BYTES(b) (((b) + 7) / 8)
-
/**********************************************************//**
Returns the number of milliseconds since some epoch. The
value may wrap around. It should only be used for heuristic
@@ -162,6 +155,12 @@ ut_time_ms(void);
/*============*/
#endif /* !UNIV_INNOCHECKSUM */
+/** Determine how many bytes (groups of 8 bits) are needed to
+store the given number of bits.
+@param b in: bits
+@return number of bytes (octets) needed to represent b */
+#define UT_BITS_IN_BYTES(b) (((b) + 7) >> 3)
+
/** Determines if a number is zero or a power of two.
@param[in] n number
@return nonzero if n is zero or a power of two; zero otherwise */
diff --git a/storage/innobase/innodb.cmake b/storage/innobase/innodb.cmake
index 833793b65c1..dede8e8d3cd 100644
--- a/storage/innobase/innodb.cmake
+++ b/storage/innobase/innodb.cmake
@@ -33,7 +33,6 @@ MYSQL_CHECK_LZMA()
MYSQL_CHECK_BZIP2()
MYSQL_CHECK_SNAPPY()
MYSQL_CHECK_NUMA()
-TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
@@ -127,12 +126,6 @@ ADD_FEATURE_INFO(INNODB_AHI WITH_INNODB_AHI "InnoDB Adaptive Hash Index")
ADD_FEATURE_INFO(INNODB_ROOT_GUESS WITH_INNODB_ROOT_GUESS
"Cache index root block descriptors in InnoDB")
-OPTION(WITH_INNODB_BUG_ENDIAN_CRC32 "Weaken innodb_checksum_algorithm=crc32 by supporting upgrade from big-endian systems running 5.6/10.0/10.1" ${IS_BIG_ENDIAN})
-IF(WITH_INNODB_BUG_ENDIAN_CRC32)
- ADD_DEFINITIONS(-DINNODB_BUG_ENDIAN_CRC32)
-ENDIF()
-ADD_FEATURE_INFO(INNODB_BUG_ENDIAN_CRC32 WITH_INNODB_BUG_ENDIAN_CRC32 "Big endian weaker CRC32 to support upgrade from big-endian systems running 5.6/10.0/10.1")
-
OPTION(WITH_INNODB_EXTRA_DEBUG "Enable extra InnoDB debug checks" OFF)
IF(WITH_INNODB_EXTRA_DEBUG)
ADD_DEFINITIONS(-DUNIV_ZIP_DEBUG)
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 2fd2ef94365..a5ac7de0a92 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -329,7 +329,7 @@ lock_report_trx_id_insanity(
trx_id_t max_trx_id) /*!< in: trx_sys.get_max_trx_id() */
{
ut_ad(rec_offs_validate(rec, index, offsets));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
ib::error()
<< "Transaction id " << ib::hex(trx_id)
@@ -352,7 +352,7 @@ lock_check_trx_id_sanity(
const rec_offs* offsets) /*!< in: rec_get_offsets(rec, index) */
{
ut_ad(rec_offs_validate(rec, index, offsets));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
trx_id_t max_trx_id= trx_sys.get_max_trx_id();
ut_ad(max_trx_id || srv_force_recovery >= SRV_FORCE_NO_UNDO_LOG_SCAN);
@@ -381,7 +381,7 @@ lock_clust_rec_cons_read_sees(
ut_ad(dict_index_is_clust(index));
ut_ad(page_rec_is_user_rec(rec));
ut_ad(rec_offs_validate(rec, index, offsets));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
/* Temp-tables are not shared across connections and multiple
transactions from different connections cannot simultaneously
@@ -420,7 +420,7 @@ lock_sec_rec_cons_read_sees(
{
ut_ad(page_rec_is_user_rec(rec));
ut_ad(!index->is_primary());
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
/* NOTE that we might call this function while holding the search
system latch. */
@@ -688,9 +688,10 @@ static void wsrep_assert_no_bf_bf_wait(const lock_t *lock, const trx_t *trx)
we can keep trx waiting for the lock. If conflicting
transaction is already aborting or rolling back for replaying
we can also let new transaction waiting. */
- if (wsrep_trx_order_before(lock_trx->mysql_thd, trx->mysql_thd)
- || wsrep_trx_is_aborting(lock_trx->mysql_thd))
+ if (wsrep_thd_order_before(lock_trx->mysql_thd, trx->mysql_thd)
+ || wsrep_thd_is_aborting(lock_trx->mysql_thd)) {
return;
+ }
mtr_t mtr;
@@ -1122,19 +1123,15 @@ static void wsrep_kill_victim(const trx_t * const trx, const lock_t *lock)
|| lock_trx->lock.was_chosen_as_deadlock_victim)
return;
- my_bool bf_other = wsrep_thd_is_BF(lock_trx->mysql_thd, FALSE);
-
- if (!bf_other
- || wsrep_trx_order_before(trx->mysql_thd,
- lock_trx->mysql_thd)) {
-
+ if (!wsrep_thd_is_BF(lock_trx->mysql_thd, FALSE)
+ || wsrep_thd_order_before(trx->mysql_thd, lock_trx->mysql_thd)) {
if (lock_trx->lock.que_state == TRX_QUE_LOCK_WAIT) {
if (UNIV_UNLIKELY(wsrep_debug))
WSREP_INFO("BF victim waiting");
/* cannot release lock, until our lock
is in the queue*/
} else {
- wsrep_innobase_kill_one_trx(trx->mysql_thd, trx,
+ wsrep_innobase_kill_one_trx(trx->mysql_thd,
lock_trx, true);
}
}
@@ -1210,7 +1207,7 @@ lock_sec_rec_some_has_impl(
ut_ad(!dict_index_is_clust(index));
ut_ad(page_rec_is_user_rec(rec));
ut_ad(rec_offs_validate(rec, index, offsets));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
max_trx_id = page_get_max_trx_id(page);
@@ -1314,7 +1311,7 @@ wsrep_print_wait_locks(
static void check_trx_state(const trx_t *trx)
{
ut_ad(!trx->auto_commit || trx->will_lock);
- const trx_state_t state= trx->state;
+ const auto state= trx->state;
ut_ad(state == TRX_STATE_ACTIVE ||
state == TRX_STATE_PREPARED_RECOVERED ||
state == TRX_STATE_PREPARED ||
@@ -1432,7 +1429,7 @@ lock_rec_create_low(
lock_t *prev = NULL;
while (hash && wsrep_thd_is_BF(hash->trx->mysql_thd, FALSE)
- && wsrep_trx_order_before(hash->trx->mysql_thd,
+ && wsrep_thd_order_before(hash->trx->mysql_thd,
trx->mysql_thd)) {
prev = hash;
hash = (lock_t *)hash->hash;
@@ -1823,7 +1820,7 @@ lock_rec_add_to_queue(
= lock_rec_other_has_expl_req(
mode, block, false, heap_no, trx);
#ifdef WITH_WSREP
- if (UNIV_UNLIKELY(other_lock && trx->is_wsrep())) {
+ if (UNIV_LIKELY_NULL(other_lock) && trx->is_wsrep()) {
/* Only BF transaction may be granted lock
before other conflicting lock request. */
if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)
@@ -4226,6 +4223,7 @@ lock_check_dict_lock(
const lock_t* lock) /*!< in: lock to check */
{
if (lock_get_type_low(lock) == LOCK_REC) {
+ ut_ad(!lock->index->table->is_temporary());
/* Check if the transcation locked a record
in a system table in X mode. It should have set
@@ -4239,9 +4237,8 @@ lock_check_dict_lock(
} else {
ut_ad(lock_get_type_low(lock) & LOCK_TABLE);
- const dict_table_t* table;
-
- table = lock->un_member.tab_lock.table;
+ const dict_table_t* table = lock->un_member.tab_lock.table;
+ ut_ad(!table->is_temporary());
/* Check if the transcation locked a system table
in IX mode. It should have set the dict_op code
@@ -4264,14 +4261,13 @@ void lock_release(trx_t* trx)
std::set<table_id_t> to_evict;
if (innodb_evict_tables_on_commit_debug && !trx->is_recovered)
# if 1 /* if dict_stats_exec_sql() were not playing dirty tricks */
- if (!mutex_own(&dict_sys->mutex))
+ if (!mutex_own(&dict_sys.mutex))
# else /* this would be more proper way to do it */
if (!trx->dict_operation_lock_mode && !trx->dict_operation)
# endif
- for (trx_mod_tables_t::const_iterator it= trx->mod_tables.begin();
- it != trx->mod_tables.end(); ++it)
- if (!it->first->is_temporary())
- to_evict.insert(it->first->id);
+ for (const auto& p : trx->mod_tables)
+ if (!p.first->is_temporary())
+ to_evict.emplace(p.first->id);
#endif
ulint count = 0;
trx_id_t max_trx_id = trx_sys.get_max_trx_id();
@@ -4326,20 +4322,19 @@ void lock_release(trx_t* trx)
if (to_evict.empty()) {
return;
}
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
lock_mutex_enter();
- for (std::set<table_id_t>::const_iterator i = to_evict.begin();
- i != to_evict.end(); ++i) {
+ for (table_id_t id : to_evict) {
if (dict_table_t *table = dict_table_open_on_id(
- *i, TRUE, DICT_TABLE_OP_OPEN_ONLY_IF_CACHED)) {
+ id, TRUE, DICT_TABLE_OP_OPEN_ONLY_IF_CACHED)) {
if (!table->get_ref_count()
&& !UT_LIST_GET_LEN(table->locks)) {
- dict_table_remove_from_cache_low(table, true);
+ dict_sys.remove(table, true);
}
}
}
lock_mutex_exit();
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
#endif
}
@@ -4607,14 +4602,14 @@ lock_print_info_summary(
fprintf(file,
"Purge done for trx's n:o < " TRX_ID_FMT
" undo n:o < " TRX_ID_FMT " state: %s\n"
- "History list length %u\n",
+ "History list length %zu\n",
purge_sys.tail.trx_no,
purge_sys.tail.undo_no,
purge_sys.enabled()
? (purge_sys.running() ? "running"
: purge_sys.paused() ? "stopped" : "running but idle")
: "disabled",
- trx_sys.history_size());
+ size_t{trx_sys.rseg_history_len});
#ifdef PRINT_NUM_OF_LOCK_STRUCTS
fprintf(file,
@@ -5156,7 +5151,7 @@ lock_rec_block_validate(
block = buf_page_get_gen(
page_id_t(space_id, page_no),
- page_size_t(space->flags),
+ space->zip_size(),
RW_X_LATCH, NULL,
BUF_GET_POSSIBLY_FREED,
__FILE__, __LINE__, &mtr, &err);
@@ -5289,7 +5284,7 @@ lock_rec_insert_check_and_lock(
trx_t* trx = thr_get_trx(thr);
const rec_t* next_rec = page_rec_get_next_const(rec);
ulint heap_no = page_rec_get_heap_no(next_rec);
- ut_ad(!rec_is_metadata(next_rec, index));
+ ut_ad(!rec_is_metadata(next_rec, *index));
lock_mutex_enter();
/* Because this code is invoked for a running transaction by
@@ -5418,7 +5413,7 @@ lock_rec_convert_impl_to_expl_for_trx(
{
ut_ad(trx->is_referenced());
ut_ad(page_rec_is_leaf(rec));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
DEBUG_SYNC_C("before_lock_rec_convert_impl_to_expl_for_trx");
lock_mutex_enter();
@@ -5551,7 +5546,7 @@ lock_rec_convert_impl_to_expl(
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(!page_rec_is_comp(rec) == !rec_offs_comp(offsets));
ut_ad(page_rec_is_leaf(rec));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
if (dict_index_is_clust(index)) {
trx_id_t trx_id;
@@ -5628,7 +5623,7 @@ lock_clust_rec_modify_check_and_lock(
return(DB_SUCCESS);
}
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
ut_ad(!index->table->is_temporary());
heap_no = rec_offs_comp(offsets)
@@ -5684,7 +5679,7 @@ lock_sec_rec_modify_check_and_lock(
ut_ad(block->frame == page_align(rec));
ut_ad(mtr->is_named_space(index->table->space));
ut_ad(page_rec_is_leaf(rec));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
if (flags & BTR_NO_LOCKING_FLAG) {
@@ -5796,7 +5791,7 @@ lock_sec_rec_read_check_and_lock(
return(DB_SUCCESS);
}
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
heap_no = page_rec_get_heap_no(rec);
/* Some transaction may have an implicit x-lock on the record only
@@ -5876,7 +5871,7 @@ lock_clust_rec_read_check_and_lock(
|| gap_mode == LOCK_REC_NOT_GAP);
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(page_rec_is_leaf(rec));
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
if ((flags & BTR_NO_LOCKING_FLAG)
|| srv_read_only_mode
@@ -6148,10 +6143,8 @@ lock_get_table_id(
/*==============*/
const lock_t* lock) /*!< in: lock */
{
- dict_table_t* table;
-
- table = lock_get_table(lock);
-
+ dict_table_t* table = lock_get_table(lock);
+ ut_ad(!table->is_temporary());
return(table->id);
}
@@ -6328,6 +6321,12 @@ lock_trx_handle_wait(
/*=================*/
trx_t* trx) /*!< in/out: trx lock state */
{
+#ifdef WITH_WSREP
+ /* We already own mutexes */
+ if (trx->lock.was_chosen_as_wsrep_victim) {
+ return lock_trx_handle_wait_low(trx);
+ }
+#endif /* WITH_WSREP */
lock_mutex_enter();
trx_mutex_enter(trx);
dberr_t err = lock_trx_handle_wait_low(trx);
@@ -6932,6 +6931,11 @@ DeadlockChecker::trx_rollback()
trx_t* trx = m_wait_lock->trx;
print("*** WE ROLL BACK TRANSACTION (1)\n");
+#ifdef WITH_WSREP
+ if (trx->is_wsrep() && wsrep_thd_is_SR(trx->mysql_thd)) {
+ wsrep_handle_SR_rollback(m_start->mysql_thd, trx->mysql_thd);
+ }
+#endif
trx_mutex_enter(trx);
@@ -7019,6 +7023,12 @@ DeadlockChecker::check_and_resolve(const lock_t* lock, trx_t* trx)
if (victim_trx != NULL) {
print("*** WE ROLL BACK TRANSACTION (2)\n");
+#ifdef WITH_WSREP
+ if (trx->is_wsrep() && wsrep_thd_is_SR(trx->mysql_thd)) {
+ wsrep_handle_SR_rollback(trx->mysql_thd,
+ victim_trx->mysql_thd);
+ }
+#endif
lock_deadlock_found = true;
}
diff --git a/storage/innobase/lock/lock0wait.cc b/storage/innobase/lock/lock0wait.cc
index 550a9b6474d..5eb03f668b3 100644
--- a/storage/innobase/lock/lock0wait.cc
+++ b/storage/innobase/lock/lock0wait.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2020, MariaDB Corporation.
+Copyright (c) 2014, 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
@@ -203,8 +203,9 @@ wsrep_is_BF_lock_timeout(
<< " query: " << wsrep_thd_query(trx->mysql_thd);
return was_wait;
- } else
+ } else {
return false;
+ }
}
#endif /* WITH_WSREP */
@@ -272,7 +273,7 @@ lock_wait_suspend_thread(
if (thr->lock_state == QUE_THR_LOCK_ROW) {
srv_stats.n_lock_wait_count.inc();
- srv_stats.n_lock_wait_current_count.inc();
+ srv_stats.n_lock_wait_current_count++;
start_time = my_interval_timer();
}
@@ -375,7 +376,7 @@ lock_wait_suspend_thread(
thd_storage_lock_wait(trx->mysql_thd, diff_time);
}
- srv_stats.n_lock_wait_current_count.dec();
+ srv_stats.n_lock_wait_current_count--;
DBUG_EXECUTE_IF("lock_instrument_slow_query_log",
os_thread_sleep(1000););
diff --git a/storage/innobase/log/log0crypt.cc b/storage/innobase/log/log0crypt.cc
index 6ee31eced1b..36cfe259526 100644
--- a/storage/innobase/log/log0crypt.cc
+++ b/storage/innobase/log/log0crypt.cc
@@ -39,10 +39,9 @@ my_bool srv_encrypt_log;
/** Redo log encryption key ID */
#define LOG_DEFAULT_ENCRYPTION_KEY 1
-typedef union {
- uint32_t words[MY_AES_BLOCK_SIZE / sizeof(uint32_t)];
+struct aes_block_t {
byte bytes[MY_AES_BLOCK_SIZE];
-} aes_block_t;
+};
struct crypt_info_t {
ulint checkpoint_no; /*!< checkpoint no; 32 bits */
@@ -85,19 +84,65 @@ log_block_get_start_lsn(
return start_lsn;
}
+/** Generate crypt key from crypt msg.
+@param[in,out] info encryption key
+@param[in] upgrade whether to use the key in MariaDB 10.1 format
+@return whether the operation was successful */
+static bool init_crypt_key(crypt_info_t* info, bool upgrade = false)
+{
+ byte mysqld_key[MY_AES_MAX_KEY_LENGTH];
+ uint keylen = sizeof mysqld_key;
+
+ compile_time_assert(16 == sizeof info->crypt_key.bytes);
+ compile_time_assert(16 == MY_AES_BLOCK_SIZE);
+
+ if (uint rc = encryption_key_get(LOG_DEFAULT_ENCRYPTION_KEY,
+ info->key_version, mysqld_key,
+ &keylen)) {
+ ib::error()
+ << "Obtaining redo log encryption key version "
+ << info->key_version << " failed (" << rc
+ << "). Maybe the key or the required encryption "
+ "key management plugin was not found.";
+ info->key_version = ENCRYPTION_KEY_VERSION_INVALID;
+ return false;
+ }
+
+ if (upgrade) {
+ while (keylen < sizeof mysqld_key) {
+ mysqld_key[keylen++] = 0;
+ }
+ }
+
+ uint dst_len;
+ int err= my_aes_crypt(MY_AES_ECB,
+ ENCRYPTION_FLAG_NOPAD | ENCRYPTION_FLAG_ENCRYPT,
+ info->crypt_msg.bytes, MY_AES_BLOCK_SIZE,
+ info->crypt_key.bytes, &dst_len,
+ mysqld_key, keylen, NULL, 0);
+
+ if (err != MY_AES_OK || dst_len != MY_AES_BLOCK_SIZE) {
+ ib::error() << "Getting redo log crypto key failed: err = "
+ << err << ", len = " << dst_len;
+ info->key_version = ENCRYPTION_KEY_VERSION_INVALID;
+ return false;
+ }
+
+ return true;
+}
+
/** Encrypt or decrypt log blocks.
@param[in,out] buf log blocks to encrypt or decrypt
@param[in] lsn log sequence number of the start of the buffer
@param[in] size size of the buffer, in bytes
-@param[in] decrypt whether to decrypt instead of encrypting */
-UNIV_INTERN
-void
-log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt)
+@param[in] op whether to decrypt, encrypt, or rotate key and encrypt
+@return whether the operation succeeded (encrypt always does) */
+bool log_crypt(byte* buf, lsn_t lsn, ulint size, log_crypt_t op)
{
ut_ad(size % OS_FILE_LOG_BLOCK_SIZE == 0);
+ ut_ad(ulint(buf) % OS_FILE_LOG_BLOCK_SIZE == 0);
ut_a(info.key_version);
- uint dst_len;
uint32_t aes_ctr_iv[MY_AES_BLOCK_SIZE / sizeof(uint32_t)];
compile_time_assert(sizeof(uint32_t) == 4);
@@ -106,7 +151,8 @@ log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt)
for (const byte* const end = buf + size; buf != end;
buf += OS_FILE_LOG_BLOCK_SIZE, lsn += OS_FILE_LOG_BLOCK_SIZE) {
- uint32_t dst[(OS_FILE_LOG_BLOCK_SIZE - LOG_CRYPT_HDR_SIZE)
+ uint32_t dst[(OS_FILE_LOG_BLOCK_SIZE - LOG_CRYPT_HDR_SIZE
+ - LOG_BLOCK_CHECKSUM)
/ sizeof(uint32_t)];
/* The log block number is not encrypted. */
@@ -126,66 +172,61 @@ log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt)
ut_ad(log_block_get_start_lsn(lsn,
log_block_get_hdr_no(buf))
== lsn);
+ byte* key_ver = &buf[OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_KEY
+ - LOG_BLOCK_CHECKSUM];
+ const uint dst_size
+ = log_sys.log.format == log_t::FORMAT_ENC_10_4
+ ? sizeof dst - LOG_BLOCK_KEY
+ : sizeof dst;
+ if (log_sys.log.format == log_t::FORMAT_ENC_10_4) {
+ const uint key_version = info.key_version;
+ switch (op) {
+ case LOG_ENCRYPT_ROTATE_KEY:
+ info.key_version
+ = encryption_key_get_latest_version(
+ LOG_DEFAULT_ENCRYPTION_KEY);
+ if (key_version != info.key_version
+ && !init_crypt_key(&info)) {
+ info.key_version = key_version;
+ }
+ /* fall through */
+ case LOG_ENCRYPT:
+ mach_write_to_4(key_ver, info.key_version);
+ break;
+ case LOG_DECRYPT:
+ info.key_version = mach_read_from_4(key_ver);
+ if (key_version != info.key_version
+ && !init_crypt_key(&info)) {
+ return false;
+ }
+ }
+#ifndef DBUG_OFF
+ if (key_version != info.key_version) {
+ DBUG_PRINT("ib_log", ("key_version: %x -> %x",
+ key_version,
+ info.key_version));
+ }
+#endif /* !DBUG_OFF */
+ }
+ ut_ad(LOG_CRYPT_HDR_SIZE + dst_size
+ == log_sys.trailer_offset());
+
+ uint dst_len;
int rc = encryption_crypt(
- buf + LOG_CRYPT_HDR_SIZE, sizeof dst,
+ buf + LOG_CRYPT_HDR_SIZE, dst_size,
reinterpret_cast<byte*>(dst), &dst_len,
const_cast<byte*>(info.crypt_key.bytes),
- sizeof info.crypt_key,
+ MY_AES_BLOCK_SIZE,
reinterpret_cast<byte*>(aes_ctr_iv), sizeof aes_ctr_iv,
- decrypt
+ op == LOG_DECRYPT
? ENCRYPTION_FLAG_DECRYPT | ENCRYPTION_FLAG_NOPAD
: ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD,
LOG_DEFAULT_ENCRYPTION_KEY,
info.key_version);
-
ut_a(rc == MY_AES_OK);
- ut_a(dst_len == sizeof dst);
- memcpy(buf + LOG_CRYPT_HDR_SIZE, dst, sizeof dst);
- }
-}
-
-/** Generate crypt key from crypt msg.
-@param[in,out] info encryption key
-@param[in] upgrade whether to use the key in MariaDB 10.1 format
-@return whether the operation was successful */
-static bool init_crypt_key(crypt_info_t* info, bool upgrade = false)
-{
- byte mysqld_key[MY_AES_MAX_KEY_LENGTH];
- uint keylen = sizeof mysqld_key;
-
- compile_time_assert(16 == sizeof info->crypt_key);
-
- if (uint rc = encryption_key_get(LOG_DEFAULT_ENCRYPTION_KEY,
- info->key_version, mysqld_key,
- &keylen)) {
- ib::error()
- << "Obtaining redo log encryption key version "
- << info->key_version << " failed (" << rc
- << "). Maybe the key or the required encryption "
- "key management plugin was not found.";
- info->key_version = ENCRYPTION_KEY_VERSION_INVALID;
- return false;
- }
-
- if (upgrade) {
- while (keylen < sizeof mysqld_key) {
- mysqld_key[keylen++] = 0;
- }
- }
-
- uint dst_len;
- int err= my_aes_crypt(MY_AES_ECB,
- ENCRYPTION_FLAG_NOPAD | ENCRYPTION_FLAG_ENCRYPT,
- info->crypt_msg.bytes, sizeof info->crypt_msg,
- info->crypt_key.bytes, &dst_len,
- mysqld_key, keylen, NULL, 0);
-
- if (err != MY_AES_OK || dst_len != MY_AES_BLOCK_SIZE) {
- ib::error() << "Getting redo log crypto key failed: err = "
- << err << ", len = " << dst_len;
- info->key_version = ENCRYPTION_KEY_VERSION_INVALID;
- return false;
+ ut_a(dst_len == dst_size);
+ memcpy(buf + LOG_CRYPT_HDR_SIZE, dst, dst_size);
}
return true;
@@ -249,7 +290,7 @@ log_crypt_101_read_checkpoint(const byte* buf)
infos_used++;
info.checkpoint_no = checkpoint_no;
info.key_version = mach_read_from_4(buf + 4);
- memcpy(info.crypt_msg.bytes, buf + 8, sizeof info.crypt_msg);
+ memcpy(info.crypt_msg.bytes, buf + 8, MY_AES_BLOCK_SIZE);
memcpy(info.crypt_nonce.bytes, buf + 24,
sizeof info.crypt_nonce);
@@ -337,13 +378,14 @@ void
log_crypt_write_checkpoint_buf(byte* buf)
{
ut_ad(info.key_version);
- compile_time_assert(16 == sizeof info.crypt_msg);
+ compile_time_assert(16 == sizeof info.crypt_msg.bytes);
+ compile_time_assert(16 == MY_AES_BLOCK_SIZE);
compile_time_assert(LOG_CHECKPOINT_CRYPT_MESSAGE
- LOG_CHECKPOINT_CRYPT_NONCE
== sizeof info.crypt_nonce);
memcpy(buf + LOG_CHECKPOINT_CRYPT_MESSAGE, info.crypt_msg.bytes,
- sizeof info.crypt_msg);
+ MY_AES_BLOCK_SIZE);
memcpy(buf + LOG_CHECKPOINT_CRYPT_NONCE, info.crypt_nonce.bytes,
sizeof info.crypt_nonce);
mach_write_to_4(buf + LOG_CHECKPOINT_CRYPT_KEY, info.key_version);
@@ -362,13 +404,14 @@ log_crypt_read_checkpoint_buf(const byte* buf)
#if MY_AES_BLOCK_SIZE != 16
# error "MY_AES_BLOCK_SIZE != 16; redo log checkpoint format affected"
#endif
- compile_time_assert(16 == sizeof info.crypt_msg);
+ compile_time_assert(16 == sizeof info.crypt_msg.bytes);
+ compile_time_assert(16 == MY_AES_BLOCK_SIZE);
compile_time_assert(LOG_CHECKPOINT_CRYPT_MESSAGE
- LOG_CHECKPOINT_CRYPT_NONCE
== sizeof info.crypt_nonce);
memcpy(info.crypt_msg.bytes, buf + LOG_CHECKPOINT_CRYPT_MESSAGE,
- sizeof info.crypt_msg);
+ MY_AES_BLOCK_SIZE);
memcpy(info.crypt_nonce.bytes, buf + LOG_CHECKPOINT_CRYPT_NONCE,
sizeof info.crypt_nonce);
@@ -398,8 +441,7 @@ log_tmp_block_encrypt(
int rc = encryption_crypt(
src, uint(size), dst, &dst_len,
- const_cast<byte*>(info.crypt_key.bytes),
- uint(sizeof info.crypt_key),
+ const_cast<byte*>(info.crypt_key.bytes), MY_AES_BLOCK_SIZE,
reinterpret_cast<byte*>(iv), uint(sizeof iv),
encrypt
? ENCRYPTION_FLAG_ENCRYPT|ENCRYPTION_FLAG_NOPAD
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index afd4fa278ea..bf75b3b7c86 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -211,9 +211,9 @@ log_calculate_actual_len(
{
ut_ad(log_mutex_own());
+ const ulint framing_size = log_sys.framing_size();
/* actual length stored per block */
- const ulint len_per_blk = OS_FILE_LOG_BLOCK_SIZE
- - (LOG_BLOCK_HDR_SIZE + LOG_BLOCK_TRL_SIZE);
+ const ulint len_per_blk = OS_FILE_LOG_BLOCK_SIZE - framing_size;
/* actual data length in last block already written */
ulint extra_len = (log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE);
@@ -222,8 +222,7 @@ log_calculate_actual_len(
extra_len -= LOG_BLOCK_HDR_SIZE;
/* total extra length for block header and trailer */
- extra_len = ((len + extra_len) / len_per_blk)
- * (LOG_BLOCK_HDR_SIZE + LOG_BLOCK_TRL_SIZE);
+ extra_len = ((len + extra_len) / len_per_blk) * framing_size;
return(len + extra_len);
}
@@ -341,26 +340,24 @@ log_write_low(
ulint str_len) /*!< in: string length */
{
ulint len;
- ulint data_len;
- byte* log_block;
ut_ad(log_mutex_own());
+ const ulint trailer_offset = log_sys.trailer_offset();
part_loop:
/* Calculate a part length */
- data_len = (log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE) + str_len;
+ ulint data_len = (log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE) + str_len;
- if (data_len <= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE) {
+ if (data_len <= trailer_offset) {
/* The string fits within the current log block */
len = str_len;
} else {
- data_len = OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE;
+ data_len = trailer_offset;
- len = OS_FILE_LOG_BLOCK_SIZE
- - (log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE)
- - LOG_BLOCK_TRL_SIZE;
+ len = trailer_offset
+ - log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE;
}
memcpy(log_sys.buf + log_sys.buf_free, str, len);
@@ -368,18 +365,18 @@ part_loop:
str_len -= len;
str = str + len;
- log_block = static_cast<byte*>(
+ byte* log_block = static_cast<byte*>(
ut_align_down(log_sys.buf + log_sys.buf_free,
OS_FILE_LOG_BLOCK_SIZE));
log_block_set_data_len(log_block, data_len);
- if (data_len == OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE) {
+ if (data_len == trailer_offset) {
/* This block became full */
log_block_set_data_len(log_block, OS_FILE_LOG_BLOCK_SIZE);
log_block_set_checkpoint_no(log_block,
log_sys.next_checkpoint_no);
- len += LOG_BLOCK_HDR_SIZE + LOG_BLOCK_TRL_SIZE;
+ len += log_sys.framing_size();
log_sys.lsn += len;
@@ -605,9 +602,7 @@ void log_t::files::create(ulint n_files)
ut_ad(log_sys.is_initialised());
this->n_files= n_files;
- format= srv_encrypt_log
- ? LOG_HEADER_FORMAT_CURRENT | LOG_HEADER_FORMAT_ENCRYPTED
- : LOG_HEADER_FORMAT_CURRENT;
+ format= srv_encrypt_log ? log_t::FORMAT_ENC_10_4 : log_t::FORMAT_10_4;
subformat= 2;
file_size= srv_log_file_size;
lsn= LOG_START_LSN;
@@ -629,8 +624,8 @@ log_file_header_flush(
ut_ad(log_write_mutex_own());
ut_ad(!recv_no_log_write);
ut_a(nth_file < log_sys.log.n_files);
- ut_ad((log_sys.log.format & ~LOG_HEADER_FORMAT_ENCRYPTED)
- == LOG_HEADER_FORMAT_CURRENT);
+ ut_ad(log_sys.log.format == log_t::FORMAT_10_4
+ || log_sys.log.format == log_t::FORMAT_ENC_10_4);
// man 2 open suggests this buffer to be aligned by 512 for O_DIRECT
MY_ALIGNED(OS_FILE_LOG_BLOCK_SIZE)
@@ -659,7 +654,7 @@ log_file_header_flush(
fil_io(IORequestLogWrite, true,
page_id_t(SRV_LOG_SPACE_FIRST_ID, page_no),
- univ_page_size,
+ 0,
ulint(dest_offset & (srv_page_size - 1)),
OS_FILE_LOG_BLOCK_SIZE, buf, NULL);
@@ -779,7 +774,7 @@ loop:
fil_io(IORequestLogWrite, true,
page_id_t(SRV_LOG_SPACE_FIRST_ID, page_no),
- univ_page_size,
+ 0,
ulint(next_offset & (srv_page_size - 1)), write_len, buf, NULL);
srv_stats.os_log_pending_writes.dec();
@@ -850,11 +845,9 @@ wait and check if an already running write is covering the request.
@param[in] lsn log sequence number that should be
included in the redo log file write
@param[in] flush_to_disk whether the written log should also
-be flushed to the file system */
-void
-log_write_up_to(
- lsn_t lsn,
- bool flush_to_disk)
+be flushed to the file system
+@param[in] rotate_key whether to rotate the encryption key */
+void log_write_up_to(lsn_t lsn, bool flush_to_disk, bool rotate_key)
{
#ifdef UNIV_DEBUG
ulint loop_count = 0;
@@ -863,6 +856,7 @@ log_write_up_to(
lsn_t write_lsn;
ut_ad(!srv_read_only_mode);
+ ut_ad(!rotate_key || flush_to_disk);
if (recv_no_ibuf_operations) {
/* Recovery is running and no operations on the log files are
@@ -1008,7 +1002,8 @@ loop:
if (log_sys.is_encrypted()) {
log_crypt(write_buf + area_start, log_sys.write_lsn,
- area_end - area_start);
+ area_end - area_start,
+ rotate_key ? LOG_ENCRYPT_ROTATE_KEY : LOG_ENCRYPT);
}
/* Do the write to the log files */
@@ -1352,7 +1347,7 @@ log_group_checkpoint(lsn_t end_lsn)
fil_io(IORequestLogWrite, false,
page_id_t(SRV_LOG_SPACE_FIRST_ID, 0),
- univ_page_size,
+ 0,
(log_sys.next_checkpoint_no & 1)
? LOG_CHECKPOINT_2 : LOG_CHECKPOINT_1,
OS_FILE_LOG_BLOCK_SIZE,
@@ -1372,7 +1367,7 @@ void log_header_read(ulint header)
fil_io(IORequestLogRead, true,
page_id_t(SRV_LOG_SPACE_FIRST_ID,
header >> srv_page_size_shift),
- univ_page_size, header & (srv_page_size - 1),
+ 0, header & (srv_page_size - 1),
OS_FILE_LOG_BLOCK_SIZE, log_sys.checkpoint_buf, NULL);
}
@@ -1465,14 +1460,13 @@ bool log_checkpoint(bool sync)
ut_ad(oldest_lsn >= log_sys.last_checkpoint_lsn);
const lsn_t age = oldest_lsn - log_sys.last_checkpoint_lsn;
- if (age > SIZE_OF_MLOG_CHECKPOINT
- + LOG_BLOCK_HDR_SIZE + LOG_BLOCK_CHECKSUM) {
+ if (age > SIZE_OF_MLOG_CHECKPOINT + log_sys.framing_size()) {
/* Some log has been written since the previous checkpoint. */
} else if (age > SIZE_OF_MLOG_CHECKPOINT
&& !((log_sys.log.calc_lsn_offset(oldest_lsn)
^ log_sys.log.calc_lsn_offset(
log_sys.last_checkpoint_lsn))
- & ~lsn_t(OS_FILE_LOG_BLOCK_SIZE - 1))) {
+ & ~lsn_t{OS_FILE_LOG_BLOCK_SIZE - 1})) {
/* Some log has been written to the same log block. */
} else if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) {
/* MariaDB 10.3 startup expects the redo log file to be
@@ -1512,7 +1506,7 @@ bool log_checkpoint(bool sync)
log_mutex_exit();
- log_write_up_to(flush_lsn, true);
+ log_write_up_to(flush_lsn, true, true);
log_mutex_enter();
@@ -1698,11 +1692,11 @@ loop:
} else {
ut_ad(!srv_dict_stats_thread_active);
}
- if (recv_sys && recv_sys->flush_start) {
+ if (recv_sys.flush_start) {
/* This is in case recv_writer_thread was never
started, or buf_flush_page_cleaner_coordinator
failed to notice its termination. */
- os_event_set(recv_sys->flush_start);
+ os_event_set(recv_sys.flush_start);
}
}
#define COUNT_INTERVAL 600U
@@ -2043,7 +2037,7 @@ void log_t::close()
if (!srv_read_only_mode && srv_scrub_log)
os_event_destroy(log_scrub_event);
- recv_sys_close();
+ recv_sys.close();
}
/******************************************************//**
@@ -2063,13 +2057,9 @@ log_pad_current_log_block(void)
/* We retrieve lsn only because otherwise gcc crashed on HP-UX */
lsn = log_reserve_and_open(OS_FILE_LOG_BLOCK_SIZE);
- pad_length = OS_FILE_LOG_BLOCK_SIZE
- - (log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE)
- - LOG_BLOCK_TRL_SIZE;
- if (pad_length
- == (OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_HDR_SIZE
- - LOG_BLOCK_TRL_SIZE)) {
-
+ pad_length = log_sys.trailer_offset()
+ - log_sys.buf_free % OS_FILE_LOG_BLOCK_SIZE;
+ if (pad_length == log_sys.payload_size()) {
pad_length = 0;
}
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index d8b7bd2ce85..4359fb6b308 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -51,7 +51,6 @@ Created 9/20/1997 Heikki Tuuri
#include "trx0undo.h"
#include "trx0rec.h"
#include "fil0fil.h"
-#include "row0trunc.h"
#include "buf0rea.h"
#include "srv0srv.h"
#include "srv0start.h"
@@ -67,7 +66,7 @@ this must be less than srv_page_size as it is stored in the buffer pool */
#define RECV_READ_AHEAD_AREA 32
/** The recovery system */
-recv_sys_t* recv_sys;
+recv_sys_t recv_sys;
/** TRUE when applying redo log records during crash recovery; FALSE
otherwise. Note that this is FALSE while a background thread is
rolling back incomplete transactions. */
@@ -145,16 +144,21 @@ struct file_name_t {
fil_status status;
/** FSP_SIZE of tablespace */
- ulint size;
+ ulint size = 0;
/** the log sequence number of the last observed MLOG_INDEX_LOAD
record for the tablespace */
- lsn_t enable_lsn;
+ lsn_t enable_lsn = 0;
+
+ /** Dummy flags before they have been read from the .ibd file */
+ static constexpr uint32_t initial_flags = FSP_FLAGS_FCRC32_MASK_MARKER;
+ /** FSP_SPACE_FLAGS of tablespace */
+ uint32_t flags = initial_flags;
/** Constructor */
- file_name_t(std::string name_, bool deleted) :
- name(name_), space(NULL), status(deleted ? DELETED: NORMAL),
- size(0), enable_lsn(0) {}
+ file_name_t(std::string name_, bool deleted)
+ : name(std::move(name_)), space(NULL),
+ status(deleted ? DELETED: NORMAL) {}
/** Report a MLOG_INDEX_LOAD operation, meaning that
mlog_init for any earlier LSN must be skipped.
@@ -211,10 +215,6 @@ corresponding to MLOG_INDEX_LOAD.
*/
void (*log_optimized_ddl_op)(ulint space_id);
-/** Report backup-unfriendly TRUNCATE operation (with separate log file),
-corresponding to MLOG_TRUNCATE. */
-void (*log_truncate)();
-
/** Report an operation to create, delete, or rename a file during backup.
@param[in] space_id tablespace identifier
@param[in] flags tablespace flags (NULL if not create)
@@ -250,7 +250,7 @@ private:
ut_allocator<std::pair<const page_id_t, init> > >
map;
/** Map of page initialization operations.
- FIXME: Merge this to recv_sys->addr_hash! */
+ FIXME: Merge this to recv_sys.addr_hash! */
map inits;
public:
/** Record that a page will be initialized by the redo log.
@@ -259,7 +259,7 @@ public:
@param[in] lsn log sequence number */
void add(ulint space, ulint page_no, lsn_t lsn)
{
- ut_ad(mutex_own(&recv_sys->mutex));
+ ut_ad(mutex_own(&recv_sys.mutex));
const init init = { lsn, false };
std::pair<map::iterator, bool> p = inits.insert(
map::value_type(page_id_t(space, page_no), init));
@@ -274,20 +274,20 @@ public:
@param[in] page_id page id
@param[in,out] init initialize log or load log
@return the latest page initialization;
- not valid after releasing recv_sys->mutex. */
+ not valid after releasing recv_sys.mutex. */
init& last(page_id_t page_id)
{
- ut_ad(mutex_own(&recv_sys->mutex));
+ ut_ad(mutex_own(&recv_sys.mutex));
return inits.find(page_id)->second;
}
/** At the end of each recovery batch, reset the 'created' flags. */
void reset()
{
- ut_ad(mutex_own(&recv_sys->mutex));
+ ut_ad(mutex_own(&recv_sys.mutex));
ut_ad(recv_no_ibuf_operations);
- for (map::iterator i= inits.begin(); i != inits.end(); i++) {
- i->second.created = false;
+ for (map::value_type& i : inits) {
+ i.second.created = false;
}
}
@@ -305,25 +305,25 @@ public:
@param[in,out] mtr dummy mini-transaction */
void ibuf_merge(mtr_t& mtr)
{
- ut_ad(mutex_own(&recv_sys->mutex));
+ ut_ad(mutex_own(&recv_sys.mutex));
ut_ad(!recv_no_ibuf_operations);
mtr.start();
- for (map::const_iterator i= inits.begin(); i != inits.end();
- i++) {
- if (!i->second.created) {
+ for (const map::value_type& i : inits) {
+ if (!i.second.created) {
continue;
}
if (buf_block_t* block = buf_page_get_low(
- i->first, univ_page_size, RW_X_LATCH, NULL,
+ i.first, 0, RW_X_LATCH, NULL,
BUF_GET_IF_IN_POOL, __FILE__, __LINE__,
&mtr, NULL)) {
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
ibuf_merge_or_delete_for_page(
- block, i->first, block->page.size);
+ block, i.first,
+ block->zip_size());
mtr.commit();
mtr.start();
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
}
}
@@ -347,10 +347,10 @@ static void recv_addr_trim(ulint space_id, unsigned pages, lsn_t lsn)
DBUG_LOG("ib_log",
"discarding log beyond end of tablespace "
<< page_id_t(space_id, pages) << " before LSN " << lsn);
- ut_ad(mutex_own(&recv_sys->mutex));
- for (ulint i = recv_sys->addr_hash->n_cells; i--; ) {
+ ut_ad(mutex_own(&recv_sys.mutex));
+ for (ulint i = recv_sys.addr_hash->n_cells; i--; ) {
hash_cell_t* const cell = hash_get_nth_cell(
- recv_sys->addr_hash, i);
+ recv_sys.addr_hash, i);
for (recv_addr_t* addr = static_cast<recv_addr_t*>(cell->node),
*next;
addr; addr = next) {
@@ -444,21 +444,25 @@ fil_name_process(
case FIL_LOAD_OK:
ut_ad(space != NULL);
- if (f.space == NULL || f.space == space) {
-
- if (f.size && f.space == NULL) {
- fil_space_set_recv_size(space->id, f.size);
+ if (!f.space) {
+ if (f.size
+ || f.flags != f.initial_flags) {
+ fil_space_set_recv_size_and_flags(
+ space->id, f.size, f.flags);
}
- f.name = fname.name;
f.space = space;
+ goto same_space;
+ } else if (f.space == space) {
+same_space:
+ f.name = fname.name;
f.status = file_name_t::NORMAL;
} else {
ib::error() << "Tablespace " << space_id
<< " has been found in two places: '"
<< f.name << "' and '" << name << "'."
" You must delete one of them.";
- recv_sys->found_corrupt_fs = true;
+ recv_sys.found_corrupt_fs = true;
}
break;
@@ -481,7 +485,7 @@ fil_name_process(
forcing recovery. */
ib::info()
- << "At LSN: " << recv_sys->recovered_lsn
+ << "At LSN: " << recv_sys.recovered_lsn
<< ": unable to open file " << name
<< " for tablespace " << space_id;
}
@@ -510,7 +514,7 @@ fil_name_process(
" disk is broken, and you cannot"
" remove the .ibd file, you can set"
" --innodb_force_recovery.";
- recv_sys->found_corrupt_fs = true;
+ recv_sys.found_corrupt_fs = true;
break;
}
@@ -526,8 +530,7 @@ fil_name_process(
/** Parse or process a MLOG_FILE_* record.
@param[in] ptr redo log record
@param[in] end end of the redo log buffer
-@param[in] space_id the tablespace ID
-@param[in] first_page_no first page number in the file
+@param[in] page_id first page number in the file
@param[in] type MLOG_FILE_NAME or MLOG_FILE_DELETE
or MLOG_FILE_CREATE2 or MLOG_FILE_RENAME2
@param[in] apply whether to apply the record
@@ -538,8 +541,7 @@ byte*
fil_name_parse(
byte* ptr,
const byte* end,
- ulint space_id,
- ulint first_page_no,
+ const page_id_t page_id,
mlog_id_t type,
bool apply)
{
@@ -563,9 +565,9 @@ fil_name_parse(
/* MLOG_FILE_* records should only be written for
user-created tablespaces. The name must be long enough
and end in .ibd. */
- bool corrupt = is_predefined_tablespace(space_id)
+ bool corrupt = is_predefined_tablespace(page_id.space())
|| len < sizeof "/a.ibd\0"
- || (!first_page_no != !memcmp(ptr + len - 5, DOT_IBD, 5));
+ || (!page_id.page_no() != !memcmp(ptr + len - 5, DOT_IBD, 5));
if (!corrupt && !memchr(ptr, OS_PATH_SEPARATOR, len)) {
if (byte* c = static_cast<byte*>
@@ -591,37 +593,38 @@ fil_name_parse(
case MLOG_FILE_NAME:
if (UNIV_UNLIKELY(corrupt)) {
ib::error() << "MLOG_FILE_NAME incorrect:" << ptr;
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
break;
}
fil_name_process(
- reinterpret_cast<char*>(ptr), len, space_id, false);
+ reinterpret_cast<char*>(ptr), len, page_id.space(),
+ false);
break;
case MLOG_FILE_DELETE:
if (UNIV_UNLIKELY(corrupt)) {
ib::error() << "MLOG_FILE_DELETE incorrect:" << ptr;
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
break;
}
- fil_name_process(
- reinterpret_cast<char*>(ptr), len, space_id, true);
+ fil_name_process(reinterpret_cast<char*>(ptr), len,
+ page_id.space(), true);
/* fall through */
case MLOG_FILE_CREATE2:
- if (first_page_no) {
- ut_ad(first_page_no
+ if (page_id.page_no()) {
+ ut_ad(page_id.page_no()
== SRV_UNDO_TABLESPACE_SIZE_IN_PAGES);
- ut_a(srv_is_undo_tablespace(space_id));
+ ut_a(srv_is_undo_tablespace(page_id.space()));
compile_time_assert(
- UT_ARR_SIZE(recv_sys->truncated_undo_spaces)
+ UT_ARR_SIZE(recv_sys.truncated_undo_spaces)
== TRX_SYS_MAX_UNDO_SPACES);
- recv_sys_t::trunc& t = recv_sys->truncated_undo_spaces[
- space_id - srv_undo_space_id_start];
- t.lsn = recv_sys->recovered_lsn;
- t.pages = uint32_t(first_page_no);
+ recv_sys_t::trunc& t = recv_sys.truncated_undo_spaces[
+ page_id.space() - srv_undo_space_id_start];
+ t.lsn = recv_sys.recovered_lsn;
+ t.pages = uint32_t(page_id.page_no());
} else if (log_file_op) {
- log_file_op(space_id,
+ log_file_op(page_id.space(),
type == MLOG_FILE_CREATE2 ? ptr - 4 : NULL,
ptr, len, NULL, 0);
}
@@ -629,7 +632,7 @@ fil_name_parse(
case MLOG_FILE_RENAME2:
if (UNIV_UNLIKELY(corrupt)) {
ib::error() << "MLOG_FILE_RENAME2 incorrect:" << ptr;
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
}
/* The new name follows the old name. */
@@ -671,19 +674,19 @@ fil_name_parse(
if (UNIV_UNLIKELY(corrupt)) {
ib::error() << "MLOG_FILE_RENAME2 new_name incorrect:" << ptr
<< " new_name: " << new_name;
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
break;
}
fil_name_process(
reinterpret_cast<char*>(ptr), len,
- space_id, false);
+ page_id.space(), false);
fil_name_process(
reinterpret_cast<char*>(new_name), new_len,
- space_id, false);
+ page_id.space(), false);
if (log_file_op) {
- log_file_op(space_id, NULL,
+ log_file_op(page_id.space(), NULL,
ptr, len, new_name, new_len);
}
@@ -691,50 +694,51 @@ fil_name_parse(
break;
}
if (!fil_op_replay_rename(
- space_id, first_page_no,
+ page_id.space(), page_id.page_no(),
reinterpret_cast<const char*>(ptr),
reinterpret_cast<const char*>(new_name))) {
- recv_sys->found_corrupt_fs = true;
+ recv_sys.found_corrupt_fs = true;
}
}
return(end_ptr);
}
-/** Clean up after recv_sys_init() */
-void
-recv_sys_close()
+/** Clean up after recv_sys_t::create() */
+void recv_sys_t::close()
{
- if (recv_sys != NULL) {
- recv_sys->dblwr.pages.clear();
+ ut_ad(this == &recv_sys);
+ ut_ad(!recv_writer_thread_active);
- if (recv_sys->addr_hash != NULL) {
- hash_table_free(recv_sys->addr_hash);
- }
+ if (is_initialised()) {
+ dblwr.pages.clear();
- if (recv_sys->heap != NULL) {
- mem_heap_free(recv_sys->heap);
+ if (addr_hash) {
+ hash_table_free(addr_hash);
+ addr_hash = NULL;
}
- if (recv_sys->flush_start != NULL) {
- os_event_destroy(recv_sys->flush_start);
+ if (heap) {
+ mem_heap_free(heap);
+ heap = NULL;
}
- if (recv_sys->flush_end != NULL) {
- os_event_destroy(recv_sys->flush_end);
+ if (flush_start) {
+ os_event_destroy(flush_start);
}
- if (recv_sys->buf != NULL) {
- ut_free_dodump(recv_sys->buf, recv_sys->buf_size);
+ if (flush_end) {
+ os_event_destroy(flush_end);
}
- ut_ad(!recv_writer_thread_active);
- mutex_free(&recv_sys->writer_mutex);
-
- mutex_free(&recv_sys->mutex);
+ if (buf) {
+ ut_free_dodump(buf, buf_size);
+ buf = NULL;
+ }
- ut_free(recv_sys);
- recv_sys = NULL;
+ buf_size = 0;
+ mutex_free(&writer_mutex);
+ mutex_free(&mutex);
}
recv_spaces.clear();
@@ -788,20 +792,20 @@ DECLARE_THREAD(recv_writer_thread)(
int64_t sig_count = os_event_reset(buf_flush_event);
os_event_wait_time_low(buf_flush_event, 100000, sig_count);
- mutex_enter(&recv_sys->writer_mutex);
+ mutex_enter(&recv_sys.writer_mutex);
if (!recv_recovery_is_on()) {
- mutex_exit(&recv_sys->writer_mutex);
+ mutex_exit(&recv_sys.writer_mutex);
break;
}
/* Flush pages from end of LRU if required */
- os_event_reset(recv_sys->flush_end);
- recv_sys->flush_type = BUF_FLUSH_LRU;
- os_event_set(recv_sys->flush_start);
- os_event_wait(recv_sys->flush_end);
+ os_event_reset(recv_sys.flush_end);
+ recv_sys.flush_type = BUF_FLUSH_LRU;
+ os_event_set(recv_sys.flush_start);
+ os_event_wait(recv_sys.flush_end);
- mutex_exit(&recv_sys->writer_mutex);
+ mutex_exit(&recv_sys.writer_mutex);
}
recv_writer_thread_active = false;
@@ -816,75 +820,83 @@ DECLARE_THREAD(recv_writer_thread)(
}
/** Initialize the redo log recovery subsystem. */
-void
-recv_sys_init()
+void recv_sys_t::create()
{
- ut_ad(recv_sys == NULL);
-
- recv_sys = static_cast<recv_sys_t*>(ut_zalloc_nokey(sizeof(*recv_sys)));
+ ut_ad(this == &recv_sys);
+ ut_ad(!is_initialised());
+ ut_ad(!flush_start);
+ ut_ad(!flush_end);
+ mutex_create(LATCH_ID_RECV_SYS, &mutex);
+ mutex_create(LATCH_ID_RECV_WRITER, &writer_mutex);
- mutex_create(LATCH_ID_RECV_SYS, &recv_sys->mutex);
- mutex_create(LATCH_ID_RECV_WRITER, &recv_sys->writer_mutex);
-
- recv_sys->heap = mem_heap_create_typed(256, MEM_HEAP_FOR_RECV_SYS);
+ heap = mem_heap_create_typed(256, MEM_HEAP_FOR_RECV_SYS);
if (!srv_read_only_mode) {
- recv_sys->flush_start = os_event_create(0);
- recv_sys->flush_end = os_event_create(0);
+ flush_start = os_event_create(0);
+ flush_end = os_event_create(0);
}
- recv_sys->buf = static_cast<byte*>(
- ut_malloc_dontdump(RECV_PARSING_BUF_SIZE));
- recv_sys->buf_size = RECV_PARSING_BUF_SIZE;
-
- recv_sys->addr_hash = hash_create(buf_pool_get_curr_size() / 512);
- recv_sys->progress_time = time(NULL);
+ flush_type = BUF_FLUSH_LRU;
+ apply_log_recs = false;
+ apply_batch_on = false;
+
+ buf = static_cast<byte*>(ut_malloc_dontdump(RECV_PARSING_BUF_SIZE));
+ buf_size = RECV_PARSING_BUF_SIZE;
+ len = 0;
+ parse_start_lsn = 0;
+ scanned_lsn = 0;
+ scanned_checkpoint_no = 0;
+ recovered_offset = 0;
+ recovered_lsn = 0;
+ found_corrupt_log = false;
+ found_corrupt_fs = false;
+ mlog_checkpoint_lsn = 0;
+
+ addr_hash = hash_create(buf_pool_get_curr_size() / 512);
+ n_addrs = 0;
+ progress_time = time(NULL);
recv_max_page_lsn = 0;
- /* Call the constructor for recv_sys_t::dblwr member */
- new (&recv_sys->dblwr) recv_dblwr_t();
+ memset(truncated_undo_spaces, 0, sizeof truncated_undo_spaces);
+ last_stored_lsn = 0;
}
-/** Empty a fully processed hash table. */
-static
-void
-recv_sys_empty_hash()
+/** Empty a fully processed set of stored redo log records. */
+inline void recv_sys_t::empty()
{
- ut_ad(mutex_own(&(recv_sys->mutex)));
- ut_a(recv_sys->n_addrs == 0);
+ ut_ad(mutex_own(&mutex));
+ ut_a(n_addrs == 0);
- hash_table_free(recv_sys->addr_hash);
- mem_heap_empty(recv_sys->heap);
+ hash_table_free(addr_hash);
+ mem_heap_empty(heap);
- recv_sys->addr_hash = hash_create(buf_pool_get_curr_size() / 512);
+ addr_hash = hash_create(buf_pool_get_curr_size() / 512);
}
-/********************************************************//**
-Frees the recovery system. */
-void
-recv_sys_debug_free(void)
-/*=====================*/
+/** Free most recovery data structures. */
+void recv_sys_t::debug_free()
{
- mutex_enter(&(recv_sys->mutex));
+ ut_ad(this == &recv_sys);
+ ut_ad(is_initialised());
+ mutex_enter(&mutex);
- hash_table_free(recv_sys->addr_hash);
- mem_heap_free(recv_sys->heap);
- ut_free_dodump(recv_sys->buf, recv_sys->buf_size);
+ hash_table_free(addr_hash);
+ mem_heap_free(heap);
+ ut_free_dodump(buf, buf_size);
- recv_sys->buf_size = 0;
- recv_sys->buf = NULL;
- recv_sys->heap = NULL;
- recv_sys->addr_hash = NULL;
+ buf = NULL;
+ heap = NULL;
+ addr_hash = NULL;
/* wake page cleaner up to progress */
if (!srv_read_only_mode) {
ut_ad(!recv_recovery_is_on());
ut_ad(!recv_writer_thread_active);
os_event_reset(buf_flush_event);
- os_event_set(recv_sys->flush_start);
+ os_event_set(flush_start);
}
- mutex_exit(&(recv_sys->mutex));
+ mutex_exit(&mutex);
}
/** Read a log segment to log_sys.buf.
@@ -925,7 +937,7 @@ loop:
fil_io(IORequestLogRead, true,
page_id_t(SRV_LOG_SPACE_FIRST_ID, page_no),
- univ_page_size,
+ 0,
ulint(source_offset & (srv_page_size - 1)),
len, buf, NULL);
@@ -970,22 +982,24 @@ fail:
goto fail;
}
- if (is_encrypted()) {
- log_crypt(buf, *start_lsn,
- OS_FILE_LOG_BLOCK_SIZE, true);
+ if (is_encrypted()
+ && !log_crypt(buf, *start_lsn,
+ OS_FILE_LOG_BLOCK_SIZE,
+ LOG_DECRYPT)) {
+ goto fail;
}
}
ulint dl = log_block_get_data_len(buf);
if (dl < LOG_BLOCK_HDR_SIZE
- || (dl > OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE
- && dl != OS_FILE_LOG_BLOCK_SIZE)) {
- recv_sys->found_corrupt_log = true;
+ || (dl != OS_FILE_LOG_BLOCK_SIZE
+ && dl > log_sys.trailer_offset())) {
+ recv_sys.found_corrupt_log = true;
goto fail;
}
}
- if (recv_sys->report(time(NULL))) {
+ if (recv_sys.report(time(NULL))) {
ib::info() << "Read redo log up to LSN=" << *start_lsn;
service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
"Read redo log up to LSN=" LSN_PF,
@@ -1010,7 +1024,7 @@ static
void
recv_synchronize_groups()
{
- const lsn_t recovered_lsn = recv_sys->recovered_lsn;
+ const lsn_t recovered_lsn = recv_sys.recovered_lsn;
/* Read the last recovered log block to the recovery system buffer:
the block is always incomplete */
@@ -1142,7 +1156,7 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt)
fil_io(IORequestLogRead, true,
page_id_t(SRV_LOG_SPACE_FIRST_ID, page_no),
- univ_page_size,
+ 0,
ulint((source_offset & ~(OS_FILE_LOG_BLOCK_SIZE - 1))
& (srv_page_size - 1)),
OS_FILE_LOG_BLOCK_SIZE, buf, NULL);
@@ -1169,9 +1183,9 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt)
/* Mark the redo log for upgrading. */
srv_log_file_size = 0;
- recv_sys->parse_start_lsn = recv_sys->recovered_lsn
- = recv_sys->scanned_lsn
- = recv_sys->mlog_checkpoint_lsn = lsn;
+ recv_sys.parse_start_lsn = recv_sys.recovered_lsn
+ = recv_sys.scanned_lsn
+ = recv_sys.mlog_checkpoint_lsn = lsn;
log_sys.last_checkpoint_lsn = log_sys.next_checkpoint_lsn
= log_sys.lsn = log_sys.write_lsn
= log_sys.current_flush_lsn = log_sys.flushed_to_disk_lsn
@@ -1180,55 +1194,6 @@ static dberr_t recv_log_format_0_recover(lsn_t lsn, bool crypt)
return(DB_SUCCESS);
}
-/** Determine if a redo log from MariaDB 10.4 is clean.
-@return error code
-@retval DB_SUCCESS if the redo log is clean
-@retval DB_CORRUPTION if the redo log is corrupted
-@retval DB_ERROR if the redo log is not empty */
-static dberr_t recv_log_recover_10_4()
-{
- ut_ad(!log_sys.is_encrypted());
- const lsn_t lsn = log_sys.log.get_lsn();
- const lsn_t source_offset = log_sys.log.calc_lsn_offset(lsn);
- const ulint page_no
- = (ulint) (source_offset / univ_page_size.physical());
- byte* buf = log_sys.buf;
-
- fil_io(IORequestLogRead, true,
- page_id_t(SRV_LOG_SPACE_FIRST_ID, page_no),
- univ_page_size,
- (ulint) ((source_offset & ~(OS_FILE_LOG_BLOCK_SIZE - 1))
- % univ_page_size.physical()),
- OS_FILE_LOG_BLOCK_SIZE, buf, NULL);
-
- const ulint cksum = log_block_get_checksum(buf);
-
- if (cksum != LOG_NO_CHECKSUM_MAGIC
- && cksum != log_block_calc_checksum_crc32(buf)) {
- return DB_CORRUPTION;
- }
-
- /* On a clean shutdown, the redo log will be logically empty
- after the checkpoint lsn. */
-
- if (log_block_get_data_len(buf)
- != (source_offset & (OS_FILE_LOG_BLOCK_SIZE - 1))) {
- return DB_ERROR;
- }
-
- /* Mark the redo log for downgrading. */
- srv_log_file_size = 0;
- recv_sys->parse_start_lsn = recv_sys->recovered_lsn
- = recv_sys->scanned_lsn
- = recv_sys->mlog_checkpoint_lsn = lsn;
- log_sys.last_checkpoint_lsn = log_sys.next_checkpoint_lsn
- = log_sys.lsn = log_sys.write_lsn
- = log_sys.current_flush_lsn = log_sys.flushed_to_disk_lsn
- = lsn;
- log_sys.next_checkpoint_no = 0;
- return DB_SUCCESS;
-}
-
/** Find the latest checkpoint in the log header.
@param[out] max_field LOG_CHECKPOINT_1 or LOG_CHECKPOINT_2
@return error code or DB_SUCCESS */
@@ -1249,10 +1214,10 @@ recv_find_max_checkpoint(ulint* max_field)
/* Check the header page checksum. There was no
checksum in the first redo log format (version 0). */
log_sys.log.format = mach_read_from_4(buf + LOG_HEADER_FORMAT);
- log_sys.log.subformat = log_sys.log.format != LOG_HEADER_FORMAT_3_23
+ log_sys.log.subformat = log_sys.log.format != log_t::FORMAT_3_23
? mach_read_from_4(buf + LOG_HEADER_SUBFORMAT)
: 0;
- if (log_sys.log.format != LOG_HEADER_FORMAT_3_23
+ if (log_sys.log.format != log_t::FORMAT_3_23
&& !recv_check_log_header_checksum(buf)) {
ib::error() << "Invalid redo log header checksum.";
return(DB_CORRUPTION);
@@ -1265,15 +1230,14 @@ recv_find_max_checkpoint(ulint* max_field)
creator[LOG_HEADER_CREATOR_END - LOG_HEADER_CREATOR] = 0;
switch (log_sys.log.format) {
- case LOG_HEADER_FORMAT_3_23:
+ case log_t::FORMAT_3_23:
return(recv_find_max_checkpoint_0(max_field));
- case LOG_HEADER_FORMAT_10_2:
- case LOG_HEADER_FORMAT_10_2 | LOG_HEADER_FORMAT_ENCRYPTED:
- case LOG_HEADER_FORMAT_CURRENT:
- case LOG_HEADER_FORMAT_CURRENT | LOG_HEADER_FORMAT_ENCRYPTED:
- case LOG_HEADER_FORMAT_10_4:
- /* We can only parse the unencrypted LOG_HEADER_FORMAT_10_4.
- The encrypted format uses a larger redo log block trailer. */
+ case log_t::FORMAT_10_2:
+ case log_t::FORMAT_10_2 | log_t::FORMAT_ENCRYPTED:
+ case log_t::FORMAT_10_3:
+ case log_t::FORMAT_10_3 | log_t::FORMAT_ENCRYPTED:
+ case log_t::FORMAT_10_4:
+ case log_t::FORMAT_10_4 | log_t::FORMAT_ENCRYPTED:
break;
default:
ib::error() << "Unsupported redo log format."
@@ -1338,19 +1302,7 @@ recv_find_max_checkpoint(ulint* max_field)
return(DB_ERROR);
}
- if (log_sys.log.format == LOG_HEADER_FORMAT_10_4) {
- dberr_t err = recv_log_recover_10_4();
- if (err != DB_SUCCESS) {
- ib::error()
- << "Downgrade after a crash is not supported."
- " The redo log was created with " << creator
- << (err == DB_ERROR
- ? "." : ", and it appears corrupted.");
- }
- return err;
- }
-
- return DB_SUCCESS;
+ return(DB_SUCCESS);
}
/** Try to parse a single log record body and also applies it if
@@ -1358,8 +1310,7 @@ specified.
@param[in] type redo log entry type
@param[in] ptr redo log record body
@param[in] end_ptr end of buffer
-@param[in] space_id tablespace identifier
-@param[in] page_no page number
+@param[in] page_id page identifier
@param[in] apply whether to apply the record
@param[in,out] block buffer block, or NULL if
a page log record should not be applied
@@ -1373,14 +1324,13 @@ recv_parse_or_apply_log_rec_body(
mlog_id_t type,
byte* ptr,
byte* end_ptr,
- ulint space_id,
- ulint page_no,
+ const page_id_t page_id,
bool apply,
buf_block_t* block,
mtr_t* mtr)
{
ut_ad(!block == !mtr);
- ut_ad(!apply || recv_sys->mlog_checkpoint_lsn != 0);
+ ut_ad(!apply || recv_sys.mlog_checkpoint_lsn);
switch (type) {
case MLOG_FILE_NAME:
@@ -1390,22 +1340,17 @@ recv_parse_or_apply_log_rec_body(
ut_ad(block == NULL);
/* Collect the file names when parsing the log,
before applying any log records. */
- return(fil_name_parse(ptr, end_ptr, space_id, page_no, type,
- apply));
+ return fil_name_parse(ptr, end_ptr, page_id, type, apply);
case MLOG_INDEX_LOAD:
if (end_ptr < ptr + 8) {
return(NULL);
}
return(ptr + 8);
case MLOG_TRUNCATE:
- if (log_truncate) {
- ut_ad(srv_operation != SRV_OPERATION_NORMAL);
- log_truncate();
- recv_sys->found_corrupt_fs = true;
- return NULL;
- }
- return(truncate_t::parse_redo_entry(ptr, end_ptr, space_id));
-
+ ib::error() << "Cannot crash-upgrade from "
+ "old-style TRUNCATE TABLE";
+ recv_sys.found_corrupt_log = true;
+ return NULL;
default:
break;
}
@@ -1424,23 +1369,22 @@ recv_parse_or_apply_log_rec_body(
page_zip = buf_block_get_page_zip(block);
ut_d(page_type = fil_page_get_type(page));
} else if (apply
- && !is_predefined_tablespace(space_id)
- && recv_spaces.find(space_id) == recv_spaces.end()) {
- if (recv_sys->recovered_lsn < recv_sys->mlog_checkpoint_lsn) {
+ && !is_predefined_tablespace(page_id.space())
+ && recv_spaces.find(page_id.space()) == recv_spaces.end()) {
+ if (recv_sys.recovered_lsn < recv_sys.mlog_checkpoint_lsn) {
/* We have not seen all records between the
checkpoint and MLOG_CHECKPOINT. There should be
a MLOG_FILE_DELETE for this tablespace later. */
recv_spaces.insert(
- std::make_pair(space_id,
+ std::make_pair(page_id.space(),
file_name_t("", false)));
goto parse_log;
}
ib::error() << "Missing MLOG_FILE_NAME or MLOG_FILE_DELETE"
- " for redo log record " << type << " (page "
- << space_id << ":" << page_no << ") at "
- << recv_sys->recovered_lsn << ".";
- recv_sys->found_corrupt_log = true;
+ " for redo log record " << type << page_id << " at "
+ << recv_sys.recovered_lsn << ".";
+ recv_sys.found_corrupt_log = true;
return(NULL);
} else {
parse_log:
@@ -1459,6 +1403,7 @@ parse_log:
break;
#endif /* UNIV_LOG_LSN_DEBUG */
case MLOG_1BYTE: case MLOG_2BYTES: case MLOG_4BYTES: case MLOG_8BYTES:
+ case MLOG_MEMSET:
#ifdef UNIV_DEBUG
if (page && page_type == FIL_PAGE_TYPE_ALLOCATED
&& end_ptr >= ptr + 2) {
@@ -1481,7 +1426,8 @@ parse_log:
redo log been written with something
older than InnoDB Plugin 1.0.4. */
ut_ad(offs == FIL_PAGE_TYPE
- || srv_is_undo_tablespace(space_id)
+ || srv_is_undo_tablespace(
+ page_id.space())
|| offs == IBUF_TREE_SEG_HEADER
+ IBUF_HEADER + FSEG_HDR_OFFSET
|| offs == PAGE_BTR_IBUF_FREE_LIST
@@ -1507,7 +1453,8 @@ parse_log:
ut_ad(0
/* fil_crypt_rotate_page() writes this */
|| offs == FIL_PAGE_SPACE_ID
- || srv_is_undo_tablespace(space_id)
+ || srv_is_undo_tablespace(
+ page_id.space())
|| offs == IBUF_TREE_SEG_HEADER
+ IBUF_HEADER + FSEG_HDR_SPACE
|| offs == IBUF_TREE_SEG_HEADER
@@ -1539,7 +1486,7 @@ parse_log:
#endif /* UNIV_DEBUG */
ptr = mlog_parse_nbytes(type, ptr, end_ptr, page, page_zip);
if (ptr != NULL && page != NULL
- && page_no == 0 && type == MLOG_4BYTES) {
+ && page_id.page_no() == 0 && type == MLOG_4BYTES) {
ulint offs = mach_read_from_2(old_ptr);
switch (offs) {
fil_space_t* space;
@@ -1550,7 +1497,7 @@ parse_log:
case FSP_HEADER_OFFSET + FSP_SIZE:
case FSP_HEADER_OFFSET + FSP_FREE_LIMIT:
case FSP_HEADER_OFFSET + FSP_FREE + FLST_LEN:
- space = fil_space_get(space_id);
+ space = fil_space_get(page_id.space());
ut_a(space != NULL);
val = mach_read_from_4(page + offs);
@@ -1726,12 +1673,17 @@ parse_log:
break;
case MLOG_IBUF_BITMAP_INIT:
/* Allow anything in page_type when creating a page. */
- ptr = ibuf_parse_bitmap_init(ptr, end_ptr, block, mtr);
+ if (block) ibuf_bitmap_init_apply(block);
break;
case MLOG_INIT_FILE_PAGE2:
/* Allow anything in page_type when creating a page. */
if (block) fsp_apply_init_file_page(block);
break;
+ case MLOG_INIT_FREE_PAGE:
+ /* The page can be zero-filled and its previous
+ contents can be ignored. We do not write or apply
+ this record yet. */
+ break;
case MLOG_WRITE_STRING:
ptr = mlog_parse_string(ptr, end_ptr, page, page_zip);
break;
@@ -1775,7 +1727,7 @@ parse_log:
ptr = const_cast<byte*>(fil_parse_write_crypt_data(ptr, end_ptr, &err));
if (err != DB_SUCCESS) {
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
}
break;
default:
@@ -1783,7 +1735,7 @@ parse_log:
ib::error() << "Incorrect log record type "
<< ib::hex(unsigned(type));
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
}
if (index) {
@@ -1821,7 +1773,7 @@ recv_hash(
ulint space, /*!< in: space */
ulint page_no)/*!< in: page number */
{
- return(hash_calc_hash(recv_fold(space, page_no), recv_sys->addr_hash));
+ return(hash_calc_hash(recv_fold(space, page_no), recv_sys.addr_hash));
}
/*********************************************************************//**
@@ -1834,12 +1786,12 @@ recv_get_fil_addr_struct(
ulint space, /*!< in: space id */
ulint page_no)/*!< in: page number */
{
- ut_ad(mutex_own(&recv_sys->mutex));
+ ut_ad(mutex_own(&recv_sys.mutex));
recv_addr_t* recv_addr;
for (recv_addr = static_cast<recv_addr_t*>(
- HASH_GET_FIRST(recv_sys->addr_hash,
+ HASH_GET_FIRST(recv_sys.addr_hash,
recv_hash(space, page_no)));
recv_addr != 0;
recv_addr = static_cast<recv_addr_t*>(
@@ -1855,26 +1807,18 @@ recv_get_fil_addr_struct(
return(NULL);
}
-/*******************************************************************//**
-Adds a new log record to the hash table of log records. */
-static
-void
-recv_add_to_hash_table(
-/*===================*/
- mlog_id_t type, /*!< in: log record type */
- ulint space, /*!< in: space id */
- ulint page_no, /*!< in: page number */
- byte* body, /*!< in: log record body */
- byte* rec_end, /*!< in: log record end */
- lsn_t start_lsn, /*!< in: start lsn of the mtr */
- lsn_t end_lsn) /*!< in: end lsn of the mtr */
+/** Store a redo log record for applying.
+@param type record type
+@param space tablespace identifier
+@param page_no page number
+@param body record body
+@param rec_end end of record
+@param lsn start LSN of the mini-transaction
+@param end_lsn end LSN of the mini-transaction */
+inline void recv_sys_t::add(mlog_id_t type, ulint space, ulint page_no,
+ byte* body, byte* rec_end, lsn_t lsn,
+ lsn_t end_lsn)
{
- recv_t* recv;
- ulint len;
- recv_data_t* recv_data;
- recv_data_t** prev_field;
- recv_addr_t* recv_addr;
-
ut_ad(type != MLOG_FILE_DELETE);
ut_ad(type != MLOG_FILE_CREATE2);
ut_ad(type != MLOG_FILE_RENAME2);
@@ -1884,21 +1828,18 @@ recv_add_to_hash_table(
ut_ad(type != MLOG_INDEX_LOAD);
ut_ad(type != MLOG_TRUNCATE);
- len = ulint(rec_end - body);
-
- recv = static_cast<recv_t*>(
- mem_heap_alloc(recv_sys->heap, sizeof(recv_t)));
+ recv_t* recv= static_cast<recv_t*>(mem_heap_alloc(heap, sizeof *recv));
recv->type = type;
recv->len = ulint(rec_end - body);
- recv->start_lsn = start_lsn;
+ recv->start_lsn = lsn;
recv->end_lsn = end_lsn;
- recv_addr = recv_get_fil_addr_struct(space, page_no);
+ recv_addr_t* recv_addr = recv_get_fil_addr_struct(space, page_no);
if (recv_addr == NULL) {
recv_addr = static_cast<recv_addr_t*>(
- mem_heap_alloc(recv_sys->heap, sizeof(recv_addr_t)));
+ mem_heap_alloc(heap, sizeof(recv_addr_t)));
recv_addr->space = space;
recv_addr->page_no = page_no;
@@ -1906,50 +1847,49 @@ recv_add_to_hash_table(
UT_LIST_INIT(recv_addr->rec_list, &recv_t::rec_list);
- HASH_INSERT(recv_addr_t, addr_hash, recv_sys->addr_hash,
+ HASH_INSERT(recv_addr_t, addr_hash, addr_hash,
recv_fold(space, page_no), recv_addr);
- recv_sys->n_addrs++;
+ n_addrs++;
}
switch (type) {
case MLOG_INIT_FILE_PAGE2:
case MLOG_ZIP_PAGE_COMPRESS:
+ case MLOG_INIT_FREE_PAGE:
/* Ignore any earlier redo log records for this page. */
ut_ad(recv_addr->state == RECV_NOT_PROCESSED
|| recv_addr->state == RECV_WILL_NOT_READ);
recv_addr->state = RECV_WILL_NOT_READ;
- mlog_init.add(space, page_no, start_lsn);
+ mlog_init.add(space, page_no, lsn);
default:
break;
}
UT_LIST_ADD_LAST(recv_addr->rec_list, recv);
- prev_field = &(recv->data);
+ recv_data_t** prev_field = &recv->data;
/* Store the log record body in chunks of less than srv_page_size:
- recv_sys->heap grows into the buffer pool, and bigger chunks could not
+ heap grows into the buffer pool, and bigger chunks could not
be allocated */
while (rec_end > body) {
+ ulint rec_len = ulint(rec_end - body);
- len = ulint(rec_end - body);
-
- if (len > RECV_DATA_BLOCK_SIZE) {
- len = RECV_DATA_BLOCK_SIZE;
+ if (rec_len > RECV_DATA_BLOCK_SIZE) {
+ rec_len = RECV_DATA_BLOCK_SIZE;
}
- recv_data = static_cast<recv_data_t*>(
- mem_heap_alloc(recv_sys->heap,
- sizeof(recv_data_t) + len));
+ recv_data_t* recv_data = static_cast<recv_data_t*>(
+ mem_heap_alloc(heap, sizeof(recv_data_t) + rec_len));
*prev_field = recv_data;
- memcpy(recv_data + 1, body, len);
+ memcpy(recv_data + 1, body, rec_len);
- prev_field = &(recv_data->next);
+ prev_field = &recv_data->next;
- body += len;
+ body += rec_len;
}
*prev_field = NULL;
@@ -1992,18 +1932,21 @@ lsn of a log record.
@param[in,out] block buffer pool page
@param[in,out] mtr mini-transaction
@param[in,out] recv_addr recovery address
-@param[in] init_lsn the initial LSN where to start recovery */
+@param[in,out] init page initialization operation, or NULL */
static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
- recv_addr_t* recv_addr, lsn_t init_lsn = 0)
+ recv_addr_t* recv_addr,
+ mlog_init_t::init* init = NULL)
{
page_t* page;
page_zip_des_t* page_zip;
- ut_ad(mutex_own(&recv_sys->mutex));
- ut_ad(recv_sys->apply_log_recs);
+ ut_ad(mutex_own(&recv_sys.mutex));
+ ut_ad(recv_sys.apply_log_recs);
ut_ad(recv_needed_recovery);
ut_ad(recv_addr->state != RECV_BEING_PROCESSED);
ut_ad(recv_addr->state != RECV_PROCESSED);
+ ut_ad(!init || init->created);
+ ut_ad(!init || init->lsn);
if (UNIV_UNLIKELY(srv_print_verbose_log == 2)) {
fprintf(stderr, "Applying log to page %u:%u\n",
@@ -2013,7 +1956,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
DBUG_LOG("ib_log", "Applying log to page " << block->page.id);
recv_addr->state = RECV_BEING_PROCESSED;
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
page = block->frame;
page_zip = buf_block_get_page_zip(block);
@@ -2025,19 +1968,9 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
page_lsn = mach_read_from_8(page + FIL_PAGE_LSN);
}
+ bool free_page = false;
lsn_t start_lsn = 0, end_lsn = 0;
- fil_space_t* space;
-
- if (srv_is_tablespace_truncated(recv_addr->space)) {
- /* The table will be truncated after applying
- normal redo log records. */
- goto skip_log;
- }
-
- space = fil_space_acquire(recv_addr->space);
- if (!space) {
- goto skip_log;
- }
+ const lsn_t init_lsn = init ? init->lsn : 0;
for (recv_t* recv = UT_LIST_GET_FIRST(recv_addr->rec_list);
recv; recv = UT_LIST_GET_NEXT(rec_list, recv)) {
@@ -2057,18 +1990,11 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
<< get_mlog_string(recv->type)
<< " LSN " << recv->start_lsn << " < "
<< init_lsn);
- } else if (srv_was_tablespace_truncated(space)
- && recv->start_lsn
- < truncate_t::get_truncated_tablespace_init_lsn(
- recv_addr->space)) {
- /* If per-table tablespace was truncated and
- there exist REDO records before truncate that
- are to be applied as part of recovery
- (checkpoint didn't happen since truncate was
- done) skip such records using lsn check as
- they may not stand valid post truncate. */
} else {
- if (!start_lsn) {
+ if (recv->type == MLOG_INIT_FREE_PAGE) {
+ /* This does not really modify the page. */
+ free_page = true;
+ } else if (!start_lsn) {
start_lsn = recv->start_lsn;
}
@@ -2099,8 +2025,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
recv_parse_or_apply_log_rec_body(
recv->type, buf, buf + recv->len,
- block->page.id.space(),
- block->page.id.page_no(), true, block, &mtr);
+ block->page.id, true, block, &mtr);
end_lsn = recv->start_lsn + recv->len;
mach_write_to_8(FIL_PAGE_LSN + page, end_lsn);
@@ -2119,9 +2044,6 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
}
}
- space->release();
-
-skip_log:
#ifdef UNIV_ZIP_DEBUG
ut_ad(!fil_page_index_page_check(page)
|| !page_zip
@@ -2130,8 +2052,15 @@ skip_log:
if (start_lsn) {
log_flush_order_mutex_enter();
- buf_flush_recv_note_modification(block, start_lsn, end_lsn);
+ buf_flush_note_modification(block, start_lsn, end_lsn, NULL);
log_flush_order_mutex_exit();
+ } else if (free_page && init) {
+ /* There have been no operations than MLOG_INIT_FREE_PAGE.
+ Any buffered changes must not be merged. A subsequent
+ buf_page_create() from a user thread should discard
+ any buffered changes. */
+ init->created = false;
+ ut_ad(!mtr.has_modifications());
}
/* Make sure that committing mtr does not change the modification
@@ -2142,7 +2071,7 @@ skip_log:
time_t now = time(NULL);
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
if (recv_max_page_lsn < page_lsn) {
recv_max_page_lsn = page_lsn;
@@ -2151,9 +2080,9 @@ skip_log:
ut_ad(recv_addr->state == RECV_BEING_PROCESSED);
recv_addr->state = RECV_PROCESSED;
- ut_a(recv_sys->n_addrs > 0);
- if (ulint n = --recv_sys->n_addrs) {
- if (recv_sys->report(now)) {
+ ut_a(recv_sys.n_addrs > 0);
+ if (ulint n = --recv_sys.n_addrs) {
+ if (recv_sys.report(now)) {
ib::info() << "To recover: " << n << " pages from log";
service_manager_extend_timeout(
INNODB_EXTEND_TIMEOUT_INTERVAL, "To recover: " ULINTPF " pages from log", n);
@@ -2161,15 +2090,15 @@ skip_log:
}
}
-/** Reduces recv_sys->n_addrs for the corrupted page.
+/** Reduces recv_sys.n_addrs for the corrupted page.
This function should called when srv_force_recovery > 0.
@param[in] page_id page id of the corrupted page */
void recv_recover_corrupt_page(page_id_t page_id)
{
ut_ad(srv_force_recovery);
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
- if (!recv_sys->apply_log_recs) {
+ if (!recv_sys.apply_log_recs) {
} else if (recv_addr_t* recv_addr = recv_get_fil_addr_struct(
page_id.space(), page_id.page_no())) {
switch (recv_addr->state) {
@@ -2181,12 +2110,12 @@ void recv_recover_corrupt_page(page_id_t page_id)
break;
default:
recv_addr->state = RECV_PROCESSED;
- ut_ad(recv_sys->n_addrs);
- recv_sys->n_addrs--;
+ ut_ad(recv_sys.n_addrs);
+ recv_sys.n_addrs--;
}
}
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
}
/** Apply any buffered redo log to a page that was just read from a data file.
@@ -2211,8 +2140,8 @@ void recv_recover_page(buf_page_t* bpage)
__FILE__, __LINE__, &mtr);
ut_a(success);
- mutex_enter(&recv_sys->mutex);
- if (!recv_sys->apply_log_recs) {
+ mutex_enter(&recv_sys.mutex);
+ if (!recv_sys.apply_log_recs) {
} else if (recv_addr_t* recv_addr = recv_get_fil_addr_struct(
bpage->id.space(), bpage->id.page_no())) {
switch (recv_addr->state) {
@@ -2227,7 +2156,7 @@ void recv_recover_page(buf_page_t* bpage)
mtr.commit();
func_exit:
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
ut_ad(mtr.has_committed());
}
@@ -2253,10 +2182,10 @@ static void recv_read_in_area(const page_id_t page_id)
}
}
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
buf_read_recv_pages(FALSE, page_id.space(), page_nos,
ulint(p - page_nos));
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
}
/** This is another low level function for the recovery system
@@ -2279,12 +2208,12 @@ static buf_block_t* recv_recovery_create_page_low(const page_id_t page_id,
<< " < " << i.lsn);
recv_addr->state= RECV_PROCESSED;
ignore:
- ut_a(recv_sys->n_addrs);
- recv_sys->n_addrs--;
+ ut_a(recv_sys.n_addrs);
+ recv_sys.n_addrs--;
return NULL;
}
- fil_space_t *space= fil_space_acquire(recv_addr->space);
+ fil_space_t *space= fil_space_acquire_for_io(recv_addr->space);
if (!space)
{
recv_addr->state= RECV_PROCESSED;
@@ -2294,7 +2223,7 @@ ignore:
if (space->enable_lsn)
{
init_fail:
- space->release();
+ space->release_for_io();
recv_addr->state= RECV_NOT_PROCESSED;
return NULL;
}
@@ -2314,8 +2243,7 @@ init_fail:
mtr.start();
mtr.set_log_mode(MTR_LOG_NONE);
- buf_block_t *block= buf_page_create(page_id, page_size_t(space->flags),
- &mtr);
+ buf_block_t *block= buf_page_create(page_id, space->zip_size(), &mtr);
if (recv_addr->state == RECV_PROCESSED)
/* The page happened to exist in the buffer pool, or it was
just being read in. Before buf_page_get_with_no_latch() returned,
@@ -2325,11 +2253,11 @@ init_fail:
{
i.created= true;
buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
- recv_recover_page(block, mtr, recv_addr, i.lsn);
+ recv_recover_page(block, mtr, recv_addr, &i);
ut_ad(mtr.has_committed());
}
- space->release();
+ space->release_for_io();
return block;
}
@@ -2339,15 +2267,13 @@ to create a page which has buffered intialized redo log records.
@return whether the page creation successfully */
buf_block_t* recv_recovery_create_page_low(const page_id_t page_id)
{
- buf_block_t* block= NULL;
- mutex_enter(&recv_sys->mutex);
+ buf_block_t* block= nullptr;
+ mutex_enter(&recv_sys.mutex);
recv_addr_t* recv_addr= recv_get_fil_addr_struct(page_id.space(),
page_id.page_no());
if (recv_addr && recv_addr->state == RECV_WILL_NOT_READ)
- {
block= recv_recovery_create_page_low(page_id, recv_addr);
- }
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
return block;
}
@@ -2359,18 +2285,18 @@ void recv_apply_hashed_log_recs(bool last_batch)
ut_ad(srv_operation == SRV_OPERATION_NORMAL
|| is_mariabackup_restore_or_export());
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
- while (recv_sys->apply_batch_on) {
- bool abort = recv_sys->found_corrupt_log;
- mutex_exit(&recv_sys->mutex);
+ while (recv_sys.apply_batch_on) {
+ bool abort = recv_sys.found_corrupt_log;
+ mutex_exit(&recv_sys.mutex);
if (abort) {
return;
}
os_thread_sleep(500000);
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
}
ut_ad(!last_batch == log_mutex_own());
@@ -2378,7 +2304,18 @@ void recv_apply_hashed_log_recs(bool last_batch)
recv_no_ibuf_operations
= !last_batch || is_mariabackup_restore_or_export();
- if (ulint n = recv_sys->n_addrs) {
+ if (ulint n = recv_sys.n_addrs) {
+ if (!log_sys.log.subformat && !srv_force_recovery
+ && srv_undo_tablespaces_open) {
+ ib::error() << "Recovery of separately logged"
+ " TRUNCATE operations is no longer supported."
+ " Set innodb_force_recovery=1"
+ " if no *trunc.log files exist";
+ recv_sys.found_corrupt_log = true;
+ mutex_exit(&recv_sys.mutex);
+ return;
+ }
+
const char* msg = last_batch
? "Starting final batch to recover "
: "Starting a batch to recover ";
@@ -2386,11 +2323,11 @@ void recv_apply_hashed_log_recs(bool last_batch)
sd_notifyf(0, "STATUS=%s" ULINTPF " pages from redo log",
msg, n);
}
- recv_sys->apply_log_recs = TRUE;
- recv_sys->apply_batch_on = TRUE;
+ recv_sys.apply_log_recs = true;
+ recv_sys.apply_batch_on = true;
for (ulint id = srv_undo_tablespaces_open; id--; ) {
- recv_sys_t::trunc& t = recv_sys->truncated_undo_spaces[id];
+ recv_sys_t::trunc& t = recv_sys.truncated_undo_spaces[id];
if (t.lsn) {
recv_addr_trim(id + srv_undo_space_id_start, t.pages,
t.lsn);
@@ -2399,16 +2336,16 @@ void recv_apply_hashed_log_recs(bool last_batch)
mtr_t mtr;
- for (ulint i = 0; i < hash_get_n_cells(recv_sys->addr_hash); i++) {
+ for (ulint i = 0; i < hash_get_n_cells(recv_sys.addr_hash); i++) {
for (recv_addr_t* recv_addr = static_cast<recv_addr_t*>(
- HASH_GET_FIRST(recv_sys->addr_hash, i));
+ HASH_GET_FIRST(recv_sys.addr_hash, i));
recv_addr;
recv_addr = static_cast<recv_addr_t*>(
HASH_GET_NEXT(addr_hash, recv_addr))) {
if (!UT_LIST_GET_LEN(recv_addr->rec_list)) {
ignore:
- ut_a(recv_sys->n_addrs);
- recv_sys->n_addrs--;
+ ut_a(recv_sys.n_addrs);
+ recv_sys.n_addrs--;
continue;
}
@@ -2424,13 +2361,6 @@ ignore:
break;
}
- if (srv_is_tablespace_truncated(recv_addr->space)) {
- /* Avoid applying REDO log for the tablespace
- that is schedule for TRUNCATE. */
- recv_addr->state = RECV_DISCARDED;
- goto ignore;
- }
-
const page_id_t page_id(recv_addr->space,
recv_addr->page_no);
@@ -2439,8 +2369,7 @@ apply:
mtr.start();
mtr.set_log_mode(MTR_LOG_NONE);
if (buf_block_t* block = buf_page_get_low(
- page_id, univ_page_size,
- RW_X_LATCH, NULL,
+ page_id, 0, RW_X_LATCH, NULL,
BUF_GET_IF_IN_POOL,
__FILE__, __LINE__, &mtr, NULL)) {
buf_block_dbg_add_level(
@@ -2461,16 +2390,16 @@ apply:
/* Wait until all the pages have been processed */
- while (recv_sys->n_addrs || buf_get_n_pending_read_ios()) {
- const bool abort = recv_sys->found_corrupt_log
- || recv_sys->found_corrupt_fs;
+ while (recv_sys.n_addrs || buf_get_n_pending_read_ios()) {
+ const bool abort = recv_sys.found_corrupt_log
+ || recv_sys.found_corrupt_fs;
- if (recv_sys->found_corrupt_fs && !srv_force_recovery) {
+ if (recv_sys.found_corrupt_fs && !srv_force_recovery) {
ib::info() << "Set innodb_force_recovery=1"
" to ignore corrupted pages.";
}
- mutex_exit(&(recv_sys->mutex));
+ mutex_exit(&(recv_sys.mutex));
if (abort) {
return;
@@ -2478,47 +2407,85 @@ apply:
os_thread_sleep(500000);
- mutex_enter(&(recv_sys->mutex));
+ mutex_enter(&(recv_sys.mutex));
}
if (!last_batch) {
/* Flush all the file pages to disk and invalidate them in
the buffer pool */
- mutex_exit(&(recv_sys->mutex));
+ mutex_exit(&(recv_sys.mutex));
log_mutex_exit();
/* Stop the recv_writer thread from issuing any LRU
flush batches. */
- mutex_enter(&recv_sys->writer_mutex);
+ mutex_enter(&recv_sys.writer_mutex);
/* Wait for any currently run batch to end. */
buf_flush_wait_LRU_batch_end();
- os_event_reset(recv_sys->flush_end);
- recv_sys->flush_type = BUF_FLUSH_LIST;
- os_event_set(recv_sys->flush_start);
- os_event_wait(recv_sys->flush_end);
+ os_event_reset(recv_sys.flush_end);
+ recv_sys.flush_type = BUF_FLUSH_LIST;
+ os_event_set(recv_sys.flush_start);
+ os_event_wait(recv_sys.flush_end);
buf_pool_invalidate();
/* Allow batches from recv_writer thread. */
- mutex_exit(&recv_sys->writer_mutex);
+ mutex_exit(&recv_sys.writer_mutex);
log_mutex_enter();
- mutex_enter(&(recv_sys->mutex));
+ mutex_enter(&(recv_sys.mutex));
mlog_init.reset();
} else if (!recv_no_ibuf_operations) {
/* We skipped this in buf_page_create(). */
mlog_init.ibuf_merge(mtr);
}
- recv_sys->apply_log_recs = FALSE;
- recv_sys->apply_batch_on = FALSE;
+ recv_sys.apply_log_recs = false;
+ recv_sys.apply_batch_on = false;
- recv_sys_empty_hash();
+ recv_sys.empty();
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
+}
+
+/** Parse the redo log to set the space recovery size and flags
+@param[in] ptr pointer to parsing redo buffer
+@param[in] end_ptr end of the parsing redo buffer
+@param[in] space tablespace id */
+static
+void recv_parse_set_size_and_flags(const byte *ptr, byte *end_ptr,
+ ulint space)
+{
+ switch (const uint16_t offset= mach_read_from_2(ptr))
+ {
+ default:
+ break;
+ case FSP_HEADER_OFFSET + FSP_SIZE:
+ case FSP_HEADER_OFFSET + FSP_SPACE_FLAGS:
+ ptr += 2;
+ ulint val= mach_parse_compressed(&ptr, end_ptr);
+ recv_spaces_t::iterator it= recv_spaces.find(space);
+
+ ut_ad(!recv_sys.mlog_checkpoint_lsn || space == TRX_SYS_SPACE ||
+ srv_is_undo_tablespace(space) || it != recv_spaces.end());
+
+ if (offset == FSP_HEADER_OFFSET + FSP_SIZE)
+ fil_space_set_recv_size_and_flags(
+ space, val, FSP_FLAGS_FCRC32_MASK_MARKER);
+ else
+ fil_space_set_recv_size_and_flags(
+ space, 0, static_cast<uint32_t>(val));
+
+ if (it == recv_spaces.end() || it->second.space)
+ return;
+
+ if (offset == FSP_HEADER_OFFSET + FSP_SIZE)
+ it->second.size= val;
+ else
+ it->second.flags= static_cast<uint32_t>(val);
+ }
}
/** Tries to parse a single log record.
@@ -2564,7 +2531,7 @@ recv_parse_log_rec(
if (new_ptr != NULL) {
const lsn_t lsn = static_cast<lsn_t>(
*space) << 32 | *page_no;
- ut_a(lsn == recv_sys->recovered_lsn);
+ ut_a(lsn == recv_sys.recovered_lsn);
}
*type = MLOG_LSN;
@@ -2585,7 +2552,7 @@ recv_parse_log_rec(
case MLOG_CHECKPOINT | MLOG_SINGLE_REC_FLAG:
ib::error() << "Incorrect log record type "
<< ib::hex(unsigned(*ptr));
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
return(0);
}
@@ -2600,31 +2567,15 @@ recv_parse_log_rec(
const byte* old_ptr = new_ptr;
new_ptr = recv_parse_or_apply_log_rec_body(
- *type, new_ptr, end_ptr, *space, *page_no, apply, NULL, NULL);
+ *type, new_ptr, end_ptr, page_id_t(*space, *page_no), apply,
+ NULL, NULL);
if (UNIV_UNLIKELY(new_ptr == NULL)) {
return(0);
}
- if (*page_no == 0 && *type == MLOG_4BYTES
- && apply
- && mach_read_from_2(old_ptr) == FSP_HEADER_OFFSET + FSP_SIZE) {
- old_ptr += 2;
-
- ulint size = mach_parse_compressed(&old_ptr, end_ptr);
-
- recv_spaces_t::iterator it = recv_spaces.find(*space);
-
- ut_ad(!recv_sys->mlog_checkpoint_lsn
- || *space == TRX_SYS_SPACE
- || srv_is_undo_tablespace(*space)
- || it != recv_spaces.end());
-
- if (it != recv_spaces.end() && !it->second.space) {
- it->second.size = size;
- }
-
- fil_space_set_recv_size(*space, size);
+ if (*page_no == 0 && *type == MLOG_4BYTES && apply) {
+ recv_parse_set_size_and_flags(old_ptr, end_ptr, *space);
}
return ulint(new_ptr - ptr);
@@ -2640,17 +2591,12 @@ recv_calc_lsn_on_data_add(
ib_uint64_t len) /*!< in: this many bytes of data is
added, log block headers not included */
{
- ulint frag_len;
- ib_uint64_t lsn_len;
-
- frag_len = (lsn % OS_FILE_LOG_BLOCK_SIZE) - LOG_BLOCK_HDR_SIZE;
- ut_ad(frag_len < OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_HDR_SIZE
- - LOG_BLOCK_TRL_SIZE);
- lsn_len = len;
- lsn_len += (lsn_len + frag_len)
- / (OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_HDR_SIZE
- - LOG_BLOCK_TRL_SIZE)
- * (LOG_BLOCK_HDR_SIZE + LOG_BLOCK_TRL_SIZE);
+ unsigned frag_len = (lsn % OS_FILE_LOG_BLOCK_SIZE) - LOG_BLOCK_HDR_SIZE;
+ unsigned payload_size = log_sys.payload_size();
+ ut_ad(frag_len < payload_size);
+ lsn_t lsn_len = len;
+ lsn_len += (lsn_len + frag_len) / payload_size
+ * (OS_FILE_LOG_BLOCK_SIZE - payload_size);
return(lsn + lsn_len);
}
@@ -2673,29 +2619,28 @@ recv_report_corrupt_log(
ib::error() <<
"############### CORRUPT LOG RECORD FOUND ##################";
- const ulint ptr_offset = ulint(ptr - recv_sys->buf);
+ const ulint ptr_offset = ulint(ptr - recv_sys.buf);
ib::info() << "Log record type " << type << ", page " << space << ":"
<< page_no << ". Log parsing proceeded successfully up to "
- << recv_sys->recovered_lsn << ". Previous log record type "
- << recv_previous_parsed_rec_type
- << ", is multi "
+ << recv_sys.recovered_lsn << ". Previous log record type "
+ << recv_previous_parsed_rec_type << ", is multi "
<< recv_previous_parsed_rec_is_multi << " Recv offset "
<< ptr_offset << ", prev "
<< recv_previous_parsed_rec_offset;
- ut_ad(ptr <= recv_sys->buf + recv_sys->len);
+ ut_ad(ptr <= recv_sys.buf + recv_sys.len);
const ulint limit = 100;
const ulint prev_offset = std::min(recv_previous_parsed_rec_offset,
ptr_offset);
const ulint before = std::min(prev_offset, limit);
- const ulint after = std::min(recv_sys->len - ptr_offset, limit);
+ const ulint after = std::min(recv_sys.len - ptr_offset, limit);
ib::info() << "Hex dump starting " << before << " bytes before and"
" ending " << after << " bytes after the corrupted record:";
- const byte* start = recv_sys->buf + prev_offset - before;
+ const byte* start = recv_sys.buf + prev_offset - before;
ut_print_buf(stderr, start, ulint(ptr - start) + after);
putc('\n', stderr);
@@ -2737,17 +2682,16 @@ of buffer pool. Store last_stored_lsn if it is not in last phase
read redo logs. */
static bool recv_sys_heap_check(store_t* store, ulint available_mem)
{
- if (*store != STORE_NO
- && mem_heap_get_size(recv_sys->heap) >= available_mem)
+ if (*store != STORE_NO && mem_heap_get_size(recv_sys.heap) >= available_mem)
{
if (*store == STORE_YES)
- recv_sys->last_stored_lsn= recv_sys->recovered_lsn;
+ recv_sys.last_stored_lsn= recv_sys.recovered_lsn;
*store= STORE_NO;
DBUG_PRINT("ib_log",("Ran out of memory and last "
"stored lsn " LSN_PF " last stored offset "
- ULINTPF "\n",recv_sys->recovered_lsn,
- recv_sys->recovered_offset));
+ ULINTPF "\n",
+ recv_sys.recovered_lsn, recv_sys.recovered_offset));
return true;
}
@@ -2778,12 +2722,12 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t* store,
const bool last_phase = (*store == STORE_IF_EXISTS);
ut_ad(log_mutex_own());
- ut_ad(mutex_own(&recv_sys->mutex));
- ut_ad(recv_sys->parse_start_lsn != 0);
+ ut_ad(mutex_own(&recv_sys.mutex));
+ ut_ad(recv_sys.parse_start_lsn != 0);
loop:
- ptr = recv_sys->buf + recv_sys->recovered_offset;
+ ptr = recv_sys.buf + recv_sys.recovered_offset;
- end_ptr = recv_sys->buf + recv_sys->len;
+ end_ptr = recv_sys.buf + recv_sys.len;
if (ptr == end_ptr) {
@@ -2811,7 +2755,7 @@ loop:
if (single_rec) {
/* The mtr did not modify multiple pages */
- old_lsn = recv_sys->recovered_lsn;
+ old_lsn = recv_sys.recovered_lsn;
/* Try to parse a log record, fetching its type, space id,
page no, and a pointer to the body of the log record */
@@ -2819,12 +2763,12 @@ loop:
len = recv_parse_log_rec(&type, ptr, end_ptr, &space,
&page_no, apply, &body);
- if (UNIV_UNLIKELY(recv_sys->found_corrupt_log)) {
+ if (UNIV_UNLIKELY(recv_sys.found_corrupt_log)) {
recv_report_corrupt_log(ptr, type, space, page_no);
return(true);
}
- if (UNIV_UNLIKELY(recv_sys->found_corrupt_fs)) {
+ if (UNIV_UNLIKELY(recv_sys.found_corrupt_fs)) {
return(true);
}
@@ -2834,7 +2778,7 @@ loop:
new_recovered_lsn = recv_calc_lsn_on_data_add(old_lsn, len);
- if (new_recovered_lsn > recv_sys->scanned_lsn) {
+ if (new_recovered_lsn > recv_sys.scanned_lsn) {
/* The log record filled a log block, and we require
that also the next log block should have been scanned
in */
@@ -2843,11 +2787,11 @@ loop:
}
recv_previous_parsed_rec_type = type;
- recv_previous_parsed_rec_offset = recv_sys->recovered_offset;
+ recv_previous_parsed_rec_offset = recv_sys.recovered_offset;
recv_previous_parsed_rec_is_multi = 0;
- recv_sys->recovered_offset += len;
- recv_sys->recovered_lsn = new_recovered_lsn;
+ recv_sys.recovered_offset += len;
+ recv_sys.recovered_lsn = new_recovered_lsn;
switch (type) {
lsn_t lsn;
@@ -2863,9 +2807,9 @@ loop:
"MLOG_CHECKPOINT(" LSN_PF ") %s at "
LSN_PF "\n", lsn,
lsn != checkpoint_lsn ? "ignored"
- : recv_sys->mlog_checkpoint_lsn
+ : recv_sys.mlog_checkpoint_lsn
? "reread" : "read",
- recv_sys->recovered_lsn);
+ recv_sys.recovered_lsn);
}
DBUG_PRINT("ib_log",
@@ -2873,19 +2817,19 @@ loop:
LSN_PF,
lsn,
lsn != checkpoint_lsn ? "ignored"
- : recv_sys->mlog_checkpoint_lsn
+ : recv_sys.mlog_checkpoint_lsn
? "reread" : "read",
- recv_sys->recovered_lsn));
+ recv_sys.recovered_lsn));
if (lsn == checkpoint_lsn) {
- if (recv_sys->mlog_checkpoint_lsn) {
+ if (recv_sys.mlog_checkpoint_lsn) {
/* There can be multiple
MLOG_CHECKPOINT lsn for the
same checkpoint. */
break;
}
- recv_sys->mlog_checkpoint_lsn
- = recv_sys->recovered_lsn;
+ recv_sys.mlog_checkpoint_lsn
+ = recv_sys.recovered_lsn;
return(true);
}
break;
@@ -2907,10 +2851,10 @@ loop:
}
/* fall through */
case STORE_YES:
- recv_add_to_hash_table(
+ recv_sys.add(
type, space, page_no, body,
ptr + len, old_lsn,
- recv_sys->recovered_lsn);
+ recv_sys.recovered_lsn);
}
/* fall through */
case MLOG_INDEX_LOAD:
@@ -2947,7 +2891,7 @@ loop:
&type, ptr, end_ptr, &space, &page_no,
false, &body);
- if (UNIV_UNLIKELY(recv_sys->found_corrupt_log)) {
+ if (UNIV_UNLIKELY(recv_sys.found_corrupt_log)) {
corrupted_log:
recv_report_corrupt_log(
ptr, type, space, page_no);
@@ -2957,11 +2901,11 @@ corrupted_log:
if (ptr == end_ptr) {
} else if (type == MLOG_CHECKPOINT
|| (*ptr & MLOG_SINGLE_REC_FLAG)) {
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
goto corrupted_log;
}
- if (recv_sys->found_corrupt_fs) {
+ if (recv_sys.found_corrupt_fs) {
return(true);
}
@@ -2971,7 +2915,7 @@ corrupted_log:
recv_previous_parsed_rec_type = type;
recv_previous_parsed_rec_offset
- = recv_sys->recovered_offset + total_len;
+ = recv_sys.recovered_offset + total_len;
recv_previous_parsed_rec_is_multi = 1;
/* MLOG_FILE_NAME redo log records doesn't make changes
@@ -2984,10 +2928,10 @@ corrupted_log:
if (only_mlog_file) {
new_recovered_lsn = recv_calc_lsn_on_data_add(
- recv_sys->recovered_lsn, len);
+ recv_sys.recovered_lsn, len);
mlog_rec_len += len;
- recv_sys->recovered_offset += len;
- recv_sys->recovered_lsn = new_recovered_lsn;
+ recv_sys.recovered_offset += len;
+ recv_sys.recovered_lsn = new_recovered_lsn;
}
total_len += len;
@@ -3001,7 +2945,7 @@ corrupted_log:
": multi-log end"
" total_len " ULINTPF
" n=" ULINTPF,
- recv_sys->recovered_lsn,
+ recv_sys.recovered_lsn,
total_len, n_recs));
total_len -= mlog_rec_len;
break;
@@ -3011,14 +2955,14 @@ corrupted_log:
("scan " LSN_PF ": multi-log rec %s"
" len " ULINTPF
" page " ULINTPF ":" ULINTPF,
- recv_sys->recovered_lsn,
+ recv_sys.recovered_lsn,
get_mlog_string(type), len, space, page_no));
}
new_recovered_lsn = recv_calc_lsn_on_data_add(
- recv_sys->recovered_lsn, total_len);
+ recv_sys.recovered_lsn, total_len);
- if (new_recovered_lsn > recv_sys->scanned_lsn) {
+ if (new_recovered_lsn > recv_sys.scanned_lsn) {
/* The log record filled a log block, and we require
that also the next log block should have been scanned
in */
@@ -3028,10 +2972,10 @@ corrupted_log:
/* Add all the records to the hash table */
- ptr = recv_sys->buf + recv_sys->recovered_offset;
+ ptr = recv_sys.buf + recv_sys.recovered_offset;
for (;;) {
- old_lsn = recv_sys->recovered_lsn;
+ old_lsn = recv_sys.recovered_lsn;
/* This will apply MLOG_FILE_ records. We
had to skip them in the first scan, because we
did not know if the mini-transaction was
@@ -3040,21 +2984,21 @@ corrupted_log:
&type, ptr, end_ptr, &space, &page_no,
apply, &body);
- if (UNIV_UNLIKELY(recv_sys->found_corrupt_log)
+ if (UNIV_UNLIKELY(recv_sys.found_corrupt_log)
&& !recv_report_corrupt_log(
ptr, type, space, page_no)) {
return(true);
}
- if (UNIV_UNLIKELY(recv_sys->found_corrupt_fs)) {
+ if (UNIV_UNLIKELY(recv_sys.found_corrupt_fs)) {
return(true);
}
ut_a(len != 0);
ut_a(!(*ptr & MLOG_SINGLE_REC_FLAG));
- recv_sys->recovered_offset += len;
- recv_sys->recovered_lsn
+ recv_sys.recovered_offset += len;
+ recv_sys.recovered_lsn
= recv_calc_lsn_on_data_add(old_lsn, len);
switch (type) {
@@ -3091,7 +3035,7 @@ corrupted_log:
}
/* fall through */
case STORE_YES:
- recv_add_to_hash_table(
+ recv_sys.add(
type, space, page_no,
body, ptr + len,
old_lsn,
@@ -3107,7 +3051,7 @@ corrupted_log:
}
/** Adds data from a new log block to the parsing buffer of recv_sys if
-recv_sys->parse_start_lsn is non-zero.
+recv_sys.parse_start_lsn is non-zero.
@param[in] log_block log block to add
@param[in] scanned_lsn lsn of how far we were able to find
data in this log block
@@ -3119,9 +3063,9 @@ bool recv_sys_add_to_parsing_buf(const byte* log_block, lsn_t scanned_lsn)
ulint start_offset;
ulint end_offset;
- ut_ad(scanned_lsn >= recv_sys->scanned_lsn);
+ ut_ad(scanned_lsn >= recv_sys.scanned_lsn);
- if (!recv_sys->parse_start_lsn) {
+ if (!recv_sys.parse_start_lsn) {
/* Cannot start parsing yet because no start point for
it found */
return(false);
@@ -3129,18 +3073,18 @@ bool recv_sys_add_to_parsing_buf(const byte* log_block, lsn_t scanned_lsn)
data_len = log_block_get_data_len(log_block);
- if (recv_sys->parse_start_lsn >= scanned_lsn) {
+ if (recv_sys.parse_start_lsn >= scanned_lsn) {
return(false);
- } else if (recv_sys->scanned_lsn >= scanned_lsn) {
+ } else if (recv_sys.scanned_lsn >= scanned_lsn) {
return(false);
- } else if (recv_sys->parse_start_lsn > recv_sys->scanned_lsn) {
- more_len = (ulint) (scanned_lsn - recv_sys->parse_start_lsn);
+ } else if (recv_sys.parse_start_lsn > recv_sys.scanned_lsn) {
+ more_len = (ulint) (scanned_lsn - recv_sys.parse_start_lsn);
} else {
- more_len = (ulint) (scanned_lsn - recv_sys->scanned_lsn);
+ more_len = (ulint) (scanned_lsn - recv_sys.scanned_lsn);
}
if (more_len == 0) {
@@ -3155,21 +3099,17 @@ bool recv_sys_add_to_parsing_buf(const byte* log_block, lsn_t scanned_lsn)
start_offset = LOG_BLOCK_HDR_SIZE;
}
- end_offset = data_len;
-
- if (end_offset > OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE) {
- end_offset = OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE;
- }
+ end_offset = std::min<ulint>(data_len, log_sys.trailer_offset());
ut_ad(start_offset <= end_offset);
if (start_offset < end_offset) {
- ut_memcpy(recv_sys->buf + recv_sys->len,
+ ut_memcpy(recv_sys.buf + recv_sys.len,
log_block + start_offset, end_offset - start_offset);
- recv_sys->len += end_offset - start_offset;
+ recv_sys.len += end_offset - start_offset;
- ut_a(recv_sys->len <= RECV_PARSING_BUF_SIZE);
+ ut_a(recv_sys.len <= RECV_PARSING_BUF_SIZE);
}
return(true);
@@ -3178,13 +3118,12 @@ bool recv_sys_add_to_parsing_buf(const byte* log_block, lsn_t scanned_lsn)
/** Moves the parsing buffer data left to the buffer start. */
void recv_sys_justify_left_parsing_buf()
{
- memmove(recv_sys->buf,
- recv_sys->buf + recv_sys->recovered_offset,
- recv_sys->len - recv_sys->recovered_offset);
+ memmove(recv_sys.buf, recv_sys.buf + recv_sys.recovered_offset,
+ recv_sys.len - recv_sys.recovered_offset);
- recv_sys->len -= recv_sys->recovered_offset;
+ recv_sys.len -= recv_sys.recovered_offset;
- recv_sys->recovered_offset = 0;
+ recv_sys.recovered_offset = 0;
}
/** Scan redo log from a buffer and stores new log data to the parsing buffer.
@@ -3219,7 +3158,7 @@ static bool recv_scan_log_recs(
bool finished = false;
ulint data_len;
bool more_data = false;
- bool apply = recv_sys->mlog_checkpoint_lsn != 0;
+ bool apply = recv_sys.mlog_checkpoint_lsn != 0;
ulint recv_parsing_buf_size = RECV_PARSING_BUF_SIZE;
const bool last_phase = (*store_to_hash == STORE_IF_EXISTS);
ut_ad(start_lsn % OS_FILE_LOG_BLOCK_SIZE == 0);
@@ -3246,10 +3185,10 @@ static bool recv_scan_log_recs(
data_len = log_block_get_data_len(log_block);
- if (scanned_lsn + data_len > recv_sys->scanned_lsn
+ if (scanned_lsn + data_len > recv_sys.scanned_lsn
&& log_block_get_checkpoint_no(log_block)
- < recv_sys->scanned_checkpoint_no
- && (recv_sys->scanned_checkpoint_no
+ < recv_sys.scanned_checkpoint_no
+ && (recv_sys.scanned_checkpoint_no
- log_block_get_checkpoint_no(log_block)
> 0x80000000UL)) {
@@ -3259,16 +3198,16 @@ static bool recv_scan_log_recs(
break;
}
- if (!recv_sys->parse_start_lsn
+ if (!recv_sys.parse_start_lsn
&& (log_block_get_first_rec_group(log_block) > 0)) {
/* We found a point from which to start the parsing
of log records */
- recv_sys->parse_start_lsn = scanned_lsn
+ recv_sys.parse_start_lsn = scanned_lsn
+ log_block_get_first_rec_group(log_block);
- recv_sys->scanned_lsn = recv_sys->parse_start_lsn;
- recv_sys->recovered_lsn = recv_sys->parse_start_lsn;
+ recv_sys.scanned_lsn = recv_sys.parse_start_lsn;
+ recv_sys.recovered_lsn = recv_sys.parse_start_lsn;
}
scanned_lsn += data_len;
@@ -3279,17 +3218,17 @@ static bool recv_scan_log_recs(
&& checkpoint_lsn == mach_read_from_8(LOG_BLOCK_HDR_SIZE
+ 1 + log_block)) {
/* The redo log is logically empty. */
- ut_ad(recv_sys->mlog_checkpoint_lsn == 0
- || recv_sys->mlog_checkpoint_lsn
+ ut_ad(recv_sys.mlog_checkpoint_lsn == 0
+ || recv_sys.mlog_checkpoint_lsn
== checkpoint_lsn);
- recv_sys->mlog_checkpoint_lsn = checkpoint_lsn;
+ recv_sys.mlog_checkpoint_lsn = checkpoint_lsn;
DBUG_PRINT("ib_log", ("found empty log; LSN=" LSN_PF,
scanned_lsn));
finished = true;
break;
}
- if (scanned_lsn > recv_sys->scanned_lsn) {
+ if (scanned_lsn > recv_sys.scanned_lsn) {
ut_ad(!srv_log_files_created);
if (!recv_needed_recovery) {
recv_needed_recovery = true;
@@ -3302,7 +3241,7 @@ static bool recv_scan_log_recs(
ib::info() << "Starting crash recovery from"
" checkpoint LSN="
- << recv_sys->scanned_lsn;
+ << recv_sys.scanned_lsn;
}
/* We were able to find more log data: add it to the
@@ -3315,12 +3254,12 @@ static bool recv_scan_log_recs(
= (70 * 1024);
);
- if (recv_sys->len + 4 * OS_FILE_LOG_BLOCK_SIZE
+ if (recv_sys.len + 4 * OS_FILE_LOG_BLOCK_SIZE
>= recv_parsing_buf_size) {
ib::error() << "Log parsing buffer overflow."
" Recovery may have failed!";
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
if (!srv_force_recovery) {
ib::error()
@@ -3328,20 +3267,20 @@ static bool recv_scan_log_recs(
" to ignore this error.";
return(true);
}
- } else if (!recv_sys->found_corrupt_log) {
+ } else if (!recv_sys.found_corrupt_log) {
more_data = recv_sys_add_to_parsing_buf(
log_block, scanned_lsn);
}
- recv_sys->scanned_lsn = scanned_lsn;
- recv_sys->scanned_checkpoint_no
+ recv_sys.scanned_lsn = scanned_lsn;
+ recv_sys.scanned_checkpoint_no
= log_block_get_checkpoint_no(log_block);
}
/* During last phase of scanning, there can be redo logs
- left in recv_sys->buf to parse & store it in recv_sys->heap */
+ left in recv_sys.buf to parse & store it in recv_sys.heap */
if (last_phase
- && recv_sys->recovered_lsn < recv_sys->scanned_lsn) {
+ && recv_sys.recovered_lsn < recv_sys.scanned_lsn) {
more_data = true;
}
@@ -3356,38 +3295,38 @@ static bool recv_scan_log_recs(
*group_scanned_lsn = scanned_lsn;
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
- if (more_data && !recv_sys->found_corrupt_log) {
+ if (more_data && !recv_sys.found_corrupt_log) {
/* Try to parse more log records */
if (recv_parse_log_recs(checkpoint_lsn,
store_to_hash, available_mem,
apply)) {
- ut_ad(recv_sys->found_corrupt_log
- || recv_sys->found_corrupt_fs
- || recv_sys->mlog_checkpoint_lsn
- == recv_sys->recovered_lsn);
+ ut_ad(recv_sys.found_corrupt_log
+ || recv_sys.found_corrupt_fs
+ || recv_sys.mlog_checkpoint_lsn
+ == recv_sys.recovered_lsn);
finished = true;
goto func_exit;
}
recv_sys_heap_check(store_to_hash, available_mem);
- if (recv_sys->recovered_offset > recv_parsing_buf_size / 4) {
+ if (recv_sys.recovered_offset > recv_parsing_buf_size / 4) {
/* Move parsing buffer data to the buffer start */
recv_sys_justify_left_parsing_buf();
}
/* Need to re-parse the redo log which're stored
- in recv_sys->buf */
+ in recv_sys.buf */
if (last_phase && *store_to_hash == STORE_NO) {
finished = false;
}
}
func_exit:
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
return(finished);
}
@@ -3407,28 +3346,28 @@ recv_group_scan_log_recs(
bool last_phase)
{
DBUG_ENTER("recv_group_scan_log_recs");
- DBUG_ASSERT(!last_phase || recv_sys->mlog_checkpoint_lsn > 0);
+ DBUG_ASSERT(!last_phase || recv_sys.mlog_checkpoint_lsn > 0);
- mutex_enter(&recv_sys->mutex);
- recv_sys->len = 0;
- recv_sys->recovered_offset = 0;
- recv_sys->n_addrs = 0;
- recv_sys_empty_hash();
+ mutex_enter(&recv_sys.mutex);
+ recv_sys.len = 0;
+ recv_sys.recovered_offset = 0;
+ recv_sys.n_addrs = 0;
+ recv_sys.empty();
srv_start_lsn = *contiguous_lsn;
- recv_sys->parse_start_lsn = *contiguous_lsn;
- recv_sys->scanned_lsn = *contiguous_lsn;
- recv_sys->recovered_lsn = *contiguous_lsn;
- recv_sys->scanned_checkpoint_no = 0;
+ recv_sys.parse_start_lsn = *contiguous_lsn;
+ recv_sys.scanned_lsn = *contiguous_lsn;
+ recv_sys.recovered_lsn = *contiguous_lsn;
+ recv_sys.scanned_checkpoint_no = 0;
recv_previous_parsed_rec_type = MLOG_SINGLE_REC_FLAG;
recv_previous_parsed_rec_offset = 0;
recv_previous_parsed_rec_is_multi = 0;
ut_ad(recv_max_page_lsn == 0);
ut_ad(last_phase || !recv_writer_thread_active);
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
lsn_t start_lsn;
lsn_t end_lsn;
- store_t store_to_hash = recv_sys->mlog_checkpoint_lsn == 0
+ store_t store_to_hash = recv_sys.mlog_checkpoint_lsn == 0
? STORE_NO : (last_phase ? STORE_IF_EXISTS : STORE_YES);
ulint available_mem = (buf_pool_get_n_pages() * 2 / 3)
<< srv_page_size_shift;
@@ -3445,7 +3384,7 @@ recv_group_scan_log_recs(
finished the redo log scan. */
recv_apply_hashed_log_recs(false);
/* Rescan the redo logs from last stored lsn */
- end_lsn = recv_sys->recovered_lsn;
+ end_lsn = recv_sys.recovered_lsn;
}
start_lsn = ut_uint64_align_down(end_lsn,
@@ -3459,7 +3398,7 @@ recv_group_scan_log_recs(
start_lsn, end_lsn,
contiguous_lsn, &log_sys.log.scanned_lsn));
- if (recv_sys->found_corrupt_log || recv_sys->found_corrupt_fs) {
+ if (recv_sys.found_corrupt_log || recv_sys.found_corrupt_fs) {
DBUG_RETURN(false);
}
@@ -3479,10 +3418,13 @@ dberr_t
recv_init_missing_space(dberr_t err, const recv_spaces_t::const_iterator& i)
{
if (is_mariabackup_restore_or_export()) {
- ib::warn() << "Tablespace " << i->first << " was not"
- " found at " << i->second.name << " when"
- " restoring a (partial?) backup. All redo log"
- " for this file will be ignored!";
+ if (i->second.name.find(TEMP_TABLE_PATH_PREFIX)
+ != std::string::npos) {
+ ib::warn() << "Tablespace " << i->first << " was not"
+ " found at " << i->second.name << " when"
+ " restoring a (partial?) backup. All redo log"
+ " for this file will be ignored!";
+ }
return(err);
}
@@ -3518,9 +3460,9 @@ recv_validate_tablespace(bool rescan, bool& missing_tablespace)
{
dberr_t err = DB_SUCCESS;
- for (ulint h = 0; h < hash_get_n_cells(recv_sys->addr_hash); h++) {
+ for (ulint h = 0; h < hash_get_n_cells(recv_sys.addr_hash); h++) {
for (recv_addr_t* recv_addr = static_cast<recv_addr_t*>(
- HASH_GET_FIRST(recv_sys->addr_hash, h));
+ HASH_GET_FIRST(recv_sys.addr_hash, h));
recv_addr != 0;
recv_addr = static_cast<recv_addr_t*>(
HASH_GET_NEXT(addr_hash, recv_addr))) {
@@ -3553,21 +3495,19 @@ recv_validate_tablespace(bool rescan, bool& missing_tablespace)
return(err);
}
- /* When rescan is not needed then recv_sys->addr_hash will have
- all space id belongs to redo log. If rescan is needed and
- innodb_force_recovery > 0 then InnoDB can ignore missing tablespace. */
- for (recv_spaces_t::iterator i = recv_spaces.begin();
- i != recv_spaces.end(); i++) {
-
- if (UNIV_LIKELY(i->second.status != file_name_t::MISSING)) {
+ /* When rescan is not needed, recv_sys.addr_hash will contain the
+ entire redo log. If rescan is needed or innodb_force_recovery
+ is set, we can ignore missing tablespaces. */
+ for (const recv_spaces_t::value_type& rs : recv_spaces) {
+ if (UNIV_LIKELY(rs.second.status != file_name_t::MISSING)) {
continue;
}
missing_tablespace = true;
if (srv_force_recovery > 0) {
- ib::warn() << "Tablespace " << i->first
- <<" was not found at " << i->second.name
+ ib::warn() << "Tablespace " << rs.first
+ <<" was not found at " << rs.second.name
<<", and innodb_force_recovery was set."
<<" All redo log for this tablespace"
<<" will be ignored!";
@@ -3575,9 +3515,9 @@ recv_validate_tablespace(bool rescan, bool& missing_tablespace)
}
if (!rescan) {
- ib::info() << "Tablespace " << i->first
+ ib::info() << "Tablespace " << rs.first
<< " was not found at '"
- << i->second.name << "', but there"
+ << rs.second.name << "', but there"
<<" were no modifications either.";
}
}
@@ -3602,33 +3542,34 @@ recv_init_crash_recovery_spaces(bool rescan, bool& missing_tablespace)
ut_ad(!srv_read_only_mode);
ut_ad(recv_needed_recovery);
- for (recv_spaces_t::iterator i = recv_spaces.begin();
- i != recv_spaces.end(); i++) {
- ut_ad(!is_predefined_tablespace(i->first));
- ut_ad(i->second.status != file_name_t::DELETED || !i->second.space);
+ for (recv_spaces_t::value_type& rs : recv_spaces) {
+ ut_ad(!is_predefined_tablespace(rs.first));
+ ut_ad(rs.second.status != file_name_t::DELETED
+ || !rs.second.space);
- if (i->second.status == file_name_t::DELETED) {
+ if (rs.second.status == file_name_t::DELETED) {
/* The tablespace was deleted,
so we can ignore any redo log for it. */
flag_deleted = true;
- } else if (i->second.space != NULL) {
+ } else if (rs.second.space != NULL) {
/* The tablespace was found, and there
are some redo log records for it. */
- fil_names_dirty(i->second.space);
- i->second.space->enable_lsn = i->second.enable_lsn;
- } else if (i->second.name == "") {
+ fil_names_dirty(rs.second.space);
+ rs.second.space->enable_lsn = rs.second.enable_lsn;
+ } else if (rs.second.name == "") {
ib::error() << "Missing MLOG_FILE_NAME"
" or MLOG_FILE_DELETE"
" before MLOG_CHECKPOINT for tablespace "
- << i->first;
- recv_sys->found_corrupt_log = true;
+ << rs.first;
+ recv_sys.found_corrupt_log = true;
return(DB_CORRUPTION);
} else {
- i->second.status = file_name_t::MISSING;
+ rs.second.status = file_name_t::MISSING;
flag_deleted = true;
}
- ut_ad(i->second.status == file_name_t::DELETED || i->second.name != "");
+ ut_ad(rs.second.status == file_name_t::DELETED
+ || rs.second.name != "");
}
if (flag_deleted) {
@@ -3676,7 +3617,7 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
if (err != DB_SUCCESS) {
- srv_start_lsn = recv_sys->recovered_lsn = log_sys.lsn;
+ srv_start_lsn = recv_sys.recovered_lsn = log_sys.lsn;
log_mutex_exit();
return(err);
}
@@ -3691,14 +3632,14 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
/* Start reading the log from the checkpoint lsn. The variable
contiguous_lsn contains an lsn up to which the log is known to
be contiguously written. */
- recv_sys->mlog_checkpoint_lsn = 0;
+ recv_sys.mlog_checkpoint_lsn = 0;
ut_ad(RECV_SCAN_SIZE <= srv_log_buffer_size);
const lsn_t end_lsn = mach_read_from_8(
buf + LOG_CHECKPOINT_END_LSN);
- ut_ad(recv_sys->n_addrs == 0);
+ ut_ad(recv_sys.n_addrs == 0);
contiguous_lsn = checkpoint_lsn;
switch (log_sys.log.format) {
case 0:
@@ -3713,7 +3654,7 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
contiguous_lsn = end_lsn;
break;
}
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
log_mutex_exit();
return(DB_ERROR);
}
@@ -3721,21 +3662,21 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
/* Look for MLOG_CHECKPOINT. */
recv_group_scan_log_recs(checkpoint_lsn, &contiguous_lsn, false);
/* The first scan should not have stored or applied any records. */
- ut_ad(recv_sys->n_addrs == 0);
- ut_ad(!recv_sys->found_corrupt_fs);
+ ut_ad(recv_sys.n_addrs == 0);
+ ut_ad(!recv_sys.found_corrupt_fs);
if (srv_read_only_mode && recv_needed_recovery) {
log_mutex_exit();
return(DB_READ_ONLY);
}
- if (recv_sys->found_corrupt_log && !srv_force_recovery) {
+ if (recv_sys.found_corrupt_log && !srv_force_recovery) {
log_mutex_exit();
ib::warn() << "Log scan aborted at LSN " << contiguous_lsn;
return(DB_ERROR);
}
- if (recv_sys->mlog_checkpoint_lsn == 0) {
+ if (recv_sys.mlog_checkpoint_lsn == 0) {
lsn_t scan_lsn = log_sys.log.scanned_lsn;
if (!srv_read_only_mode && scan_lsn != checkpoint_lsn) {
log_mutex_exit();
@@ -3756,8 +3697,8 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
rescan = recv_group_scan_log_recs(
checkpoint_lsn, &contiguous_lsn, false);
- if ((recv_sys->found_corrupt_log && !srv_force_recovery)
- || recv_sys->found_corrupt_fs) {
+ if ((recv_sys.found_corrupt_log && !srv_force_recovery)
+ || recv_sys.found_corrupt_fs) {
log_mutex_exit();
return(DB_ERROR);
}
@@ -3768,7 +3709,7 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
user about recovery: */
if (flush_lsn == checkpoint_lsn + SIZE_OF_MLOG_CHECKPOINT
- && recv_sys->mlog_checkpoint_lsn == checkpoint_lsn) {
+ && recv_sys.mlog_checkpoint_lsn == checkpoint_lsn) {
/* The redo log is logically empty. */
} else if (checkpoint_lsn != flush_lsn) {
ut_ad(!srv_log_files_created);
@@ -3800,7 +3741,7 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
}
}
- log_sys.lsn = recv_sys->recovered_lsn;
+ log_sys.lsn = recv_sys.recovered_lsn;
if (recv_needed_recovery) {
bool missing_tablespace = false;
@@ -3823,17 +3764,17 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
DBUG_PRINT("ib_log", ("Rescan of redo log to validate "
"the missing tablespace. Scan "
"from last stored LSN " LSN_PF,
- recv_sys->last_stored_lsn));
+ recv_sys.last_stored_lsn));
- lsn_t recent_stored_lsn = recv_sys->last_stored_lsn;
+ lsn_t recent_stored_lsn = recv_sys.last_stored_lsn;
rescan = recv_group_scan_log_recs(
checkpoint_lsn, &recent_stored_lsn, false);
- ut_ad(!recv_sys->found_corrupt_fs);
+ ut_ad(!recv_sys.found_corrupt_fs);
missing_tablespace = false;
- err = recv_sys->found_corrupt_log
+ err = recv_sys.found_corrupt_log
? DB_ERROR
: recv_validate_tablespace(
rescan, missing_tablespace);
@@ -3846,7 +3787,7 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
rescan = true;
}
- recv_sys->parse_start_lsn = checkpoint_lsn;
+ recv_sys.parse_start_lsn = checkpoint_lsn;
if (srv_operation == SRV_OPERATION_NORMAL) {
buf_dblwr_process();
@@ -3865,15 +3806,15 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
recv_group_scan_log_recs(
checkpoint_lsn, &contiguous_lsn, true);
- if ((recv_sys->found_corrupt_log
+ if ((recv_sys.found_corrupt_log
&& !srv_force_recovery)
- || recv_sys->found_corrupt_fs) {
+ || recv_sys.found_corrupt_fs) {
log_mutex_exit();
return(DB_ERROR);
}
}
} else {
- ut_ad(!rescan || recv_sys->n_addrs == 0);
+ ut_ad(!rescan || recv_sys.n_addrs == 0);
}
if (log_sys.log.scanned_lsn < checkpoint_lsn
@@ -3887,11 +3828,11 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
" database is now corrupt!";
}
- if (recv_sys->recovered_lsn < checkpoint_lsn) {
+ if (recv_sys.recovered_lsn < checkpoint_lsn) {
log_mutex_exit();
ib::error() << "Recovered only to lsn:"
- << recv_sys->recovered_lsn << " checkpoint_lsn: " << checkpoint_lsn;
+ << recv_sys.recovered_lsn << " checkpoint_lsn: " << checkpoint_lsn;
return(DB_ERROR);
}
@@ -3902,9 +3843,9 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
recv_synchronize_groups();
if (!recv_needed_recovery) {
- ut_a(checkpoint_lsn == recv_sys->recovered_lsn);
+ ut_a(checkpoint_lsn == recv_sys.recovered_lsn);
} else {
- srv_start_lsn = recv_sys->recovered_lsn;
+ srv_start_lsn = recv_sys.recovered_lsn;
}
log_sys.buf_free = ulong(log_sys.lsn % OS_FILE_LOG_BLOCK_SIZE);
@@ -3926,13 +3867,13 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
log_sys.next_checkpoint_no = ++checkpoint_no;
- mutex_enter(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
- recv_sys->apply_log_recs = TRUE;
+ recv_sys.apply_log_recs = true;
recv_no_ibuf_operations = is_mariabackup_restore_or_export();
ut_d(recv_no_log_write = recv_no_ibuf_operations);
- mutex_exit(&recv_sys->mutex);
+ mutex_exit(&recv_sys.mutex);
log_mutex_exit();
@@ -3953,7 +3894,7 @@ recv_recovery_from_checkpoint_finish(void)
required because it grabs various mutexes and we want to
ensure that when we enable sync_order_checks there is no
mutex currently held by any thread. */
- mutex_enter(&recv_sys->writer_mutex);
+ mutex_enter(&recv_sys.writer_mutex);
/* Free the resources of the recovery system */
recv_recovery_on = false;
@@ -3963,7 +3904,7 @@ recv_recovery_from_checkpoint_finish(void)
in progress batches to finish. */
buf_flush_wait_LRU_batch_end();
- mutex_exit(&recv_sys->writer_mutex);
+ mutex_exit(&recv_sys.writer_mutex);
ulint count = 0;
while (recv_writer_thread_active) {
@@ -3976,7 +3917,7 @@ recv_recovery_from_checkpoint_finish(void)
}
}
- recv_sys_debug_free();
+ recv_sys.debug_free();
/* Free up the flush_rbt. */
buf_flush_free_flush_rbt();
@@ -4027,7 +3968,7 @@ bool recv_dblwr_t::validate_page(const page_id_t page_id,
if (page_id.page_no() == 0)
{
ulint flags= fsp_header_get_flags(page);
- if (!fsp_flags_is_valid(flags, page_id.space()))
+ if (!fil_space_t::is_valid_flags(flags, page_id.space()))
{
ulint cflags= fsp_flags_convert_from_101(flags);
if (cflags == ULINT_UNDEFINED)
@@ -4041,47 +3982,49 @@ bool recv_dblwr_t::validate_page(const page_id_t page_id,
}
/* Page 0 is never page_compressed or encrypted. */
- return !buf_page_is_corrupted(true, page, page_size_t(flags));
+ return !buf_page_is_corrupted(true, page, flags);
}
ut_ad(tmp_buf);
byte *tmp_frame= tmp_buf;
byte *tmp_page= tmp_buf + srv_page_size;
const uint16_t page_type= mach_read_from_2(page + FIL_PAGE_TYPE);
- const page_size_t page_size(space->flags);
const bool expect_encrypted= space->crypt_data &&
space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED;
+ if (space->full_crc32())
+ return !buf_page_is_corrupted(true, page, space->flags);
+
if (expect_encrypted &&
mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION))
{
- if (!fil_space_verify_crypt_checksum(page, page_size))
+ if (!fil_space_verify_crypt_checksum(page, space->zip_size()))
return false;
if (page_type != FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED)
return true;
- if (page_size.is_compressed())
+ if (space->zip_size())
return false;
- memcpy(tmp_page, page, page_size.physical());
+ memcpy(tmp_page, page, space->physical_size());
if (!fil_space_decrypt(space, tmp_frame, tmp_page))
return false;
}
switch (page_type) {
case FIL_PAGE_PAGE_COMPRESSED:
- memcpy(tmp_page, page, page_size.physical());
+ memcpy(tmp_page, page, space->physical_size());
/* fall through */
case FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED:
- if (page_size.is_compressed())
+ if (space->zip_size())
return false; /* ROW_FORMAT=COMPRESSED cannot be page_compressed */
- ulint decomp= fil_page_decompress(tmp_frame, tmp_page);
+ ulint decomp= fil_page_decompress(tmp_frame, tmp_page, space->flags);
if (!decomp)
return false; /* decompression failed */
if (decomp == srv_page_size)
return false; /* the page was not compressed (invalid page type) */
- return !buf_page_is_corrupted(true, tmp_page, page_size, space);
+ return !buf_page_is_corrupted(true, tmp_page, space->flags);
}
- return !buf_page_is_corrupted(true, page, page_size, space);
+ return !buf_page_is_corrupted(true, page, space->flags);
}
byte *recv_dblwr_t::find_page(const page_id_t page_id,
@@ -4090,9 +4033,8 @@ byte *recv_dblwr_t::find_page(const page_id_t page_id,
byte *result= NULL;
lsn_t max_lsn= 0;
- for (list::const_iterator i = pages.begin(); i != pages.end(); ++i)
+ for (byte *page : pages)
{
- byte *page= *i;
if (page_get_page_no(page) != page_id.page_no() ||
page_get_space_id(page) != page_id.space())
continue;
@@ -4279,6 +4221,12 @@ static const char* get_mlog_string(mlog_id_t type)
case MLOG_TRUNCATE:
return("MLOG_TRUNCATE");
+ case MLOG_MEMSET:
+ return("MLOG_MEMSET");
+
+ case MLOG_INIT_FREE_PAGE:
+ return("MLOG_INIT_FREE_PAGE");
+
case MLOG_FILE_WRITE_CRYPT_DATA:
return("MLOG_FILE_WRITE_CRYPT_DATA");
}
diff --git a/storage/innobase/mtr/mtr0log.cc b/storage/innobase/mtr/mtr0log.cc
index 714bd4435dc..da7088dd7d9 100644
--- a/storage/innobase/mtr/mtr0log.cc
+++ b/storage/innobase/mtr/mtr0log.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -100,7 +100,7 @@ mlog_parse_initial_log_record(
*type = mlog_id_t(*ptr & ~MLOG_SINGLE_REC_FLAG);
if (UNIV_UNLIKELY(*type > MLOG_BIGGEST_TYPE
&& !EXTRA_CHECK_MLOG_NUMBER(*type))) {
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
return NULL;
}
@@ -121,7 +121,7 @@ mlog_parse_initial_log_record(
}
/********************************************************//**
-Parses a log record written by mlog_write_ulint or mlog_write_ull.
+Parses a log record written by mlog_write_ulint, mlog_write_ull, mlog_memset.
@return parsed record end, NULL if not a complete record or a corrupt record */
byte*
mlog_parse_nbytes(
@@ -137,29 +137,46 @@ mlog_parse_nbytes(
ulint val;
ib_uint64_t dval;
- ut_a(type <= MLOG_8BYTES);
+ ut_ad(type <= MLOG_8BYTES || type == MLOG_MEMSET);
ut_a(!page || !page_zip
+ || type == MLOG_MEMSET
|| !fil_page_index_page_check(page));
if (end_ptr < ptr + 2) {
-
- return(NULL);
+ return NULL;
}
offset = mach_read_from_2(ptr);
ptr += 2;
- if (offset >= srv_page_size) {
- recv_sys->found_corrupt_log = TRUE;
-
- return(NULL);
+ if (UNIV_UNLIKELY(offset >= srv_page_size)) {
+ goto corrupt;
}
- if (type == MLOG_8BYTES) {
+ switch (type) {
+ case MLOG_MEMSET:
+ if (end_ptr < ptr + 3) {
+ return NULL;
+ }
+ val = mach_read_from_2(ptr);
+ ptr += 2;
+ if (UNIV_UNLIKELY(offset + val > srv_page_size)) {
+ goto corrupt;
+ }
+ if (page) {
+ memset(page + offset, *ptr, val);
+ if (page_zip) {
+ ut_ad(offset + val <= PAGE_DATA
+ || !fil_page_index_page_check(page));
+ memset(static_cast<page_zip_des_t*>(page_zip)
+ ->data + offset, *ptr, val);
+ }
+ }
+ return const_cast<byte*>(++ptr);
+ case MLOG_8BYTES:
dval = mach_u64_parse_compressed(&ptr, end_ptr);
if (ptr == NULL) {
-
- return(NULL);
+ return NULL;
}
if (page) {
@@ -171,14 +188,13 @@ mlog_parse_nbytes(
mach_write_to_8(page + offset, dval);
}
- return(const_cast<byte*>(ptr));
+ return const_cast<byte*>(ptr);
+ default:
+ val = mach_parse_compressed(&ptr, end_ptr);
}
- val = mach_parse_compressed(&ptr, end_ptr);
-
if (ptr == NULL) {
-
- return(NULL);
+ return NULL;
}
switch (type) {
@@ -221,11 +237,11 @@ mlog_parse_nbytes(
break;
default:
corrupt:
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = true;
ptr = NULL;
}
- return(const_cast<byte*>(ptr));
+ return const_cast<byte*>(ptr);
}
/********************************************************//**
@@ -388,7 +404,7 @@ mlog_parse_string(
ptr += 2;
if (offset >= srv_page_size || len + offset > srv_page_size) {
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -409,6 +425,72 @@ mlog_parse_string(
return(ptr + len);
}
+/** Initialize a string of bytes.
+@param[in,out] b buffer page
+@param[in] ofs byte offset from block->frame
+@param[in] len length of the data to write
+@param[in] val the data byte to write
+@param[in,out] mtr mini-transaction */
+void
+mlog_memset(buf_block_t* b, ulint ofs, ulint len, byte val, mtr_t* mtr)
+{
+ ut_ad(len);
+ ut_ad(ofs <= ulint(srv_page_size));
+ ut_ad(ofs + len <= ulint(srv_page_size));
+ memset(ofs + b->frame, val, len);
+
+ mtr->set_modified();
+ switch (mtr->get_log_mode()) {
+ case MTR_LOG_NONE:
+ case MTR_LOG_NO_REDO:
+ return;
+ case MTR_LOG_SHORT_INSERTS:
+ ut_ad(0);
+ /* fall through */
+ case MTR_LOG_ALL:
+ break;
+ }
+
+ byte* l = mtr->get_log()->open(11 + 2 + 2 + 1);
+ l = mlog_write_initial_log_record_low(
+ MLOG_MEMSET, b->page.id.space(), b->page.id.page_no(), l, mtr);
+ mach_write_to_2(l, ofs);
+ mach_write_to_2(l + 2, len);
+ l[4] = val;
+ mlog_close(mtr, l + 5);
+}
+
+/** Initialize a string of bytes.
+@param[in,out] byte byte address
+@param[in] len length of the data to write
+@param[in] val the data byte to write
+@param[in,out] mtr mini-transaction */
+void mlog_memset(byte* b, ulint len, byte val, mtr_t* mtr)
+{
+ ut_ad(len);
+ ut_ad(page_offset(b) + len <= ulint(srv_page_size));
+ memset(b, val, len);
+
+ mtr->set_modified();
+ switch (mtr->get_log_mode()) {
+ case MTR_LOG_NONE:
+ case MTR_LOG_NO_REDO:
+ return;
+ case MTR_LOG_SHORT_INSERTS:
+ ut_ad(0);
+ /* fall through */
+ case MTR_LOG_ALL:
+ break;
+ }
+
+ byte* l = mtr->get_log()->open(11 + 2 + 2 + 1);
+ l = mlog_write_initial_log_record_fast(b, MLOG_MEMSET, l, mtr);
+ mach_write_to_2(l, page_offset(b));
+ mach_write_to_2(l + 2, len);
+ l[4] = val;
+ mlog_close(mtr, l + 5);
+}
+
/********************************************************//**
Opens a buffer for mlog, writes the initial log record and,
if needed, the field lengths of an index.
@@ -562,7 +644,7 @@ mlog_parse_index(
n_core_fields = mach_read_from_2(ptr);
if (!n_core_fields || n_core_fields > n) {
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index d1885da83f4..b6e6055bbc4 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -28,9 +28,9 @@ Created 11/26/1995 Heikki Tuuri
#include "buf0buf.h"
#include "buf0flu.h"
+#include "fsp0sysspace.h"
#include "page0types.h"
#include "mtr0log.h"
-#include "row0trunc.h"
#include "log0recv.h"
/** Iterate over a memo block in reverse. */
@@ -167,7 +167,7 @@ struct FindPage
slot->object);
if (m_ptr < block->frame
- || m_ptr >= block->frame + block->page.size.logical()) {
+ || m_ptr >= block->frame + srv_page_size) {
return(true);
}
@@ -234,7 +234,7 @@ static void memo_slot_release(mtr_memo_slot_t *slot)
case MTR_MEMO_PAGE_X_FIX:
buf_block_t *block= reinterpret_cast<buf_block_t*>(slot->object);
buf_page_release_latch(block, slot->type);
- buf_block_unfix(block);
+ block->unfix();
break;
}
slot->object= NULL;
@@ -277,7 +277,7 @@ struct ReleaseLatches {
case MTR_MEMO_PAGE_X_FIX:
buf_block_t *block= reinterpret_cast<buf_block_t*>(slot->object);
buf_page_release_latch(block, slot->type);
- buf_block_unfix(block);
+ block->unfix();
break;
}
slot->object= NULL;
@@ -661,8 +661,7 @@ mtr_t::x_lock_space(ulint space_id, const char* file, unsigned line)
ut_ad(get_log_mode() != MTR_LOG_NO_REDO
|| space->purpose == FIL_TYPE_TEMPORARY
|| space->purpose == FIL_TYPE_IMPORT
- || my_atomic_loadlint(&space->redo_skipped_count) > 0
- || srv_is_tablespace_truncated(space->id));
+ || space->redo_skipped_count > 0);
}
ut_ad(space);
diff --git a/storage/innobase/os/os0event.cc b/storage/innobase/os/os0event.cc
index f1d7b2ed337..0676ba5f6c1 100644
--- a/storage/innobase/os/os0event.cc
+++ b/storage/innobase/os/os0event.cc
@@ -218,7 +218,7 @@ private:
int64_t signal_count; /*!< this is incremented
each time the event becomes
signaled */
- mutable EventMutex mutex; /*!< this mutex protects
+ mutable OSMutex mutex; /*!< this mutex protects
the next fields */
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 4d6a82d0fe8..d31a7d29380 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -38,14 +38,14 @@ Created 10/21/1995 Heikki Tuuri
#include "sql_const.h"
#ifdef UNIV_LINUX
-#include <sys/types.h>
-#include <sys/stat.h>
+# include <sys/types.h>
+# include <sys/stat.h>
#endif
#include "srv0srv.h"
#include "srv0start.h"
#include "fil0fil.h"
-#include "srv0srv.h"
+#include "fsp0fsp.h"
#ifdef HAVE_LINUX_UNISTD_H
#include "unistd.h"
#endif
@@ -70,18 +70,14 @@ Created 10/21/1995 Heikki Tuuri
# endif
#endif
-#if defined(UNIV_LINUX) && defined(HAVE_SYS_STATVFS_H)
-#include <sys/statvfs.h>
-#endif
-
-#if defined(UNIV_LINUX) && defined(HAVE_LINUX_FALLOC_H)
-#include <linux/falloc.h>
-#endif
-
#ifdef _WIN32
#include <winioctl.h>
+#else
+// my_test_if_atomic_write()
+#include <my_sys.h>
#endif
+
/** Insert buffer segment id */
static const ulint IO_IBUF_SEGMENT = 0;
@@ -672,7 +668,7 @@ static ulint os_aio_n_segments = ULINT_UNDEFINED;
wait until a batch of new read requests have been posted */
static bool os_aio_recommend_sleep_for_read_threads;
-ulint os_n_file_reads;
+Atomic_counter<ulint> os_n_file_reads;
static ulint os_bytes_read_since_printout;
ulint os_n_file_writes;
ulint os_n_fsyncs;
@@ -815,108 +811,6 @@ os_win32_device_io_control(
#endif
-/***********************************************************************//**
-Try to get number of bytes per sector from file system.
-@return file block size */
-UNIV_INTERN
-ulint
-os_file_get_block_size(
-/*===================*/
- os_file_t file, /*!< in: handle to a file */
- const char* name) /*!< in: file name */
-{
- ulint fblock_size = 512;
-
-#if defined(UNIV_LINUX)
- struct stat local_stat;
- int err;
-
- err = fstat((int)file, &local_stat);
-
- if (err != 0) {
- os_file_handle_error_no_exit(name, "fstat()", FALSE);
- } else {
- fblock_size = local_stat.st_blksize;
- }
-#endif /* UNIV_LINUX */
-#ifdef _WIN32
-
- fblock_size = 0;
- BOOL result = false;
- size_t len = 0;
- // Open volume for this file, find out it "physical bytes per sector"
-
- HANDLE volume_handle = INVALID_HANDLE_VALUE;
- char volume[MAX_PATH + 4]="\\\\.\\"; // Special prefix required for volume names.
- if (!GetVolumePathName(name , volume + 4, MAX_PATH)) {
- os_file_handle_error_no_exit(name,
- "GetVolumePathName()", FALSE);
- goto end;
- }
-
- len = strlen(volume);
- if (volume[len - 1] == '\\') {
- // Trim trailing backslash from volume name.
- volume[len - 1] = 0;
- }
-
- volume_handle = CreateFile(volume, FILE_READ_ATTRIBUTES,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- 0, OPEN_EXISTING, 0, 0);
-
- if (volume_handle == INVALID_HANDLE_VALUE) {
- if (GetLastError() != ERROR_ACCESS_DENIED) {
- os_file_handle_error_no_exit(volume,
- "CreateFile()", FALSE);
- }
- goto end;
- }
-
- DWORD tmp;
- STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR disk_alignment;
-
- STORAGE_PROPERTY_QUERY storage_query;
- memset(&storage_query, 0, sizeof(storage_query));
- storage_query.PropertyId = StorageAccessAlignmentProperty;
- storage_query.QueryType = PropertyStandardQuery;
-
- result = os_win32_device_io_control(volume_handle,
- IOCTL_STORAGE_QUERY_PROPERTY,
- &storage_query,
- sizeof(storage_query),
- &disk_alignment,
- sizeof(disk_alignment),
- &tmp);
-
- if (!result) {
- DWORD err = GetLastError();
- if (err != ERROR_INVALID_FUNCTION && err != ERROR_NOT_SUPPORTED) {
- os_file_handle_error_no_exit(volume,
- "DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY)", FALSE);
- }
- goto end;
- }
-
- fblock_size = disk_alignment.BytesPerPhysicalSector;
-
-end:
- if (volume_handle != INVALID_HANDLE_VALUE) {
- CloseHandle(volume_handle);
- }
-#endif /* _WIN32 */
-
- /* Currently we support file block size up to 4Kb */
- if (fblock_size > 4096 || fblock_size < 512) {
- if (fblock_size < 512) {
- fblock_size = 512;
- } else {
- fblock_size = 4096;
- }
- }
-
- return fblock_size;
-}
-
#ifdef WIN_ASYNC_IO
/** This function is only used in Windows asynchronous i/o.
Waits for an aio operation to complete. This function is used to wait the
@@ -1078,15 +972,8 @@ os_aio_validate_skip()
/** Try os_aio_validate() every this many times */
# define OS_AIO_VALIDATE_SKIP 13
- static int os_aio_validate_count;
-
- if (my_atomic_add32_explicit(&os_aio_validate_count, -1,
- MY_MEMORY_ORDER_RELAXED)
- % OS_AIO_VALIDATE_SKIP) {
- return true;
- }
-
- return(os_aio_validate());
+ static Atomic_counter<uint32_t> os_aio_validate_count;
+ return (os_aio_validate_count++ % OS_AIO_VALIDATE_SKIP) || os_aio_validate();
}
#endif /* UNIV_DEBUG */
@@ -2773,133 +2660,6 @@ os_file_create_directory(
return(true);
}
-/**
-The os_file_opendir() function opens a directory stream corresponding to the
-directory named by the dirname argument. The directory stream is positioned
-at the first entry. In both Unix and Windows we automatically skip the '.'
-and '..' items at the start of the directory listing.
-@param[in] dirname directory name; it must not contain a trailing
- '\' or '/'
-@param[in] is_fatal true if we should treat an error as a fatal
- error; if we try to open symlinks then we do
- not wish a fatal error if it happens not to be
- a directory
-@return directory stream, NULL if error */
-os_file_dir_t
-os_file_opendir(
- const char* dirname,
- bool error_is_fatal)
-{
- os_file_dir_t dir;
- dir = opendir(dirname);
-
- if (dir == NULL && error_is_fatal) {
- os_file_handle_error(dirname, "opendir");
- }
-
- return(dir);
-}
-
-/** Closes a directory stream.
-@param[in] dir directory stream
-@return 0 if success, -1 if failure */
-int
-os_file_closedir(
- os_file_dir_t dir)
-{
- int ret = closedir(dir);
-
- if (ret != 0) {
- os_file_handle_error_no_exit(NULL, "closedir", false);
- }
-
- return(ret);
-}
-
-/** This function returns information of the next file in the directory. We jump
-over the '.' and '..' entries in the directory.
-@param[in] dirname directory name or path
-@param[in] dir directory stream
-@param[out] info buffer where the info is returned
-@return 0 if ok, -1 if error, 1 if at the end of the directory */
-int
-os_file_readdir_next_file(
- const char* dirname,
- os_file_dir_t dir,
- os_file_stat_t* info)
-{
- struct dirent* ent;
- char* full_path;
- int ret;
- struct stat statinfo;
-
-next_file:
-
- ent = readdir(dir);
-
- if (ent == NULL) {
-
- return(1);
- }
-
- ut_a(strlen(ent->d_name) < OS_FILE_MAX_PATH);
-
- if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
-
- goto next_file;
- }
-
- strcpy(info->name, ent->d_name);
-
- full_path = static_cast<char*>(
- ut_malloc_nokey(strlen(dirname) + strlen(ent->d_name) + 10));
-
- sprintf(full_path, "%s/%s", dirname, ent->d_name);
-
- ret = stat(full_path, &statinfo);
-
- if (ret) {
-
- if (errno == ENOENT) {
- /* readdir() returned a file that does not exist,
- it must have been deleted in the meantime. Do what
- would have happened if the file was deleted before
- readdir() - ignore and go to the next entry.
- If this is the last entry then info->name will still
- contain the name of the deleted file when this
- function returns, but this is not an issue since the
- caller shouldn't be looking at info when end of
- directory is returned. */
-
- ut_free(full_path);
-
- goto next_file;
- }
-
- os_file_handle_error_no_exit(full_path, "stat", false);
-
- ut_free(full_path);
-
- return(-1);
- }
-
- info->size = statinfo.st_size;
-
- if (S_ISDIR(statinfo.st_mode)) {
- info->type = OS_FILE_TYPE_DIR;
- } else if (S_ISLNK(statinfo.st_mode)) {
- info->type = OS_FILE_TYPE_LINK;
- } else if (S_ISREG(statinfo.st_mode)) {
- info->type = OS_FILE_TYPE_FILE;
- } else {
- info->type = OS_FILE_TYPE_UNKNOWN;
- }
-
- ut_free(full_path);
-
- return(0);
-}
-
/** NOTE! Use the corresponding macro os_file_create(), not directly
this function!
Opens an existing file or creates a new.
@@ -3538,8 +3298,6 @@ static WinIoInit win_io_init;
/** Free storage space associated with a section of the file.
@param[in] fh Open file handle
-@param[in] page_size Tablespace page size
-@param[in] block_size File system block size
@param[in] off Starting offset (SEEK_SET)
@param[in] len Size of the hole
@return 0 on success or errno */
@@ -3909,154 +3667,6 @@ os_file_create_directory(
return(true);
}
-/** The os_file_opendir() function opens a directory stream corresponding to the
-directory named by the dirname argument. The directory stream is positioned
-at the first entry. In both Unix and Windows we automatically skip the '.'
-and '..' items at the start of the directory listing.
-@param[in] dirname directory name; it must not contain a trailing
- '\' or '/'
-@param[in] is_fatal true if we should treat an error as a fatal
- error; if we try to open symlinks then we do
- not wish a fatal error if it happens not to
- be a directory
-@return directory stream, NULL if error */
-os_file_dir_t
-os_file_opendir(
- const char* dirname,
- bool error_is_fatal)
-{
- os_file_dir_t dir;
- LPWIN32_FIND_DATA lpFindFileData;
- char path[OS_FILE_MAX_PATH + 3];
-
- ut_a(strlen(dirname) < OS_FILE_MAX_PATH);
-
- strcpy(path, dirname);
- strcpy(path + strlen(path), "\\*");
-
- /* Note that in Windows opening the 'directory stream' also retrieves
- the first entry in the directory. Since it is '.', that is no problem,
- as we will skip over the '.' and '..' entries anyway. */
-
- lpFindFileData = static_cast<LPWIN32_FIND_DATA>(
- ut_malloc_nokey(sizeof(WIN32_FIND_DATA)));
-
- dir = FindFirstFile((LPCTSTR) path, lpFindFileData);
-
- ut_free(lpFindFileData);
-
- if (dir == INVALID_HANDLE_VALUE) {
-
- if (error_is_fatal) {
- os_file_handle_error(dirname, "opendir");
- }
-
- return(NULL);
- }
-
- return(dir);
-}
-
-/** Closes a directory stream.
-@param[in] dir directory stream
-@return 0 if success, -1 if failure */
-int
-os_file_closedir(
- os_file_dir_t dir)
-{
- BOOL ret;
-
- ret = FindClose(dir);
-
- if (!ret) {
- os_file_handle_error_no_exit(NULL, "closedir", false);
-
- return(-1);
- }
-
- return(0);
-}
-
-/** This function returns information of the next file in the directory. We
-jump over the '.' and '..' entries in the directory.
-@param[in] dirname directory name or path
-@param[in] dir directory stream
-@param[out] info buffer where the info is returned
-@return 0 if ok, -1 if error, 1 if at the end of the directory */
-int
-os_file_readdir_next_file(
- const char* dirname,
- os_file_dir_t dir,
- os_file_stat_t* info)
-{
- BOOL ret;
- int status;
- WIN32_FIND_DATA find_data;
-
-next_file:
-
- ret = FindNextFile(dir, &find_data);
-
- if (ret > 0) {
-
- const char* name;
-
- name = static_cast<const char*>(find_data.cFileName);
-
- ut_a(strlen(name) < OS_FILE_MAX_PATH);
-
- if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) {
-
- goto next_file;
- }
-
- strcpy(info->name, name);
-
- info->size = find_data.nFileSizeHigh;
- info->size <<= 32;
- info->size |= find_data.nFileSizeLow;
-
- if (find_data.dwFileAttributes
- & FILE_ATTRIBUTE_REPARSE_POINT) {
-
- /* TODO: test Windows symlinks */
- /* TODO: MySQL has apparently its own symlink
- implementation in Windows, dbname.sym can
- redirect a database directory:
- REFMAN "windows-symbolic-links.html" */
-
- info->type = OS_FILE_TYPE_LINK;
-
- } else if (find_data.dwFileAttributes
- & FILE_ATTRIBUTE_DIRECTORY) {
-
- info->type = OS_FILE_TYPE_DIR;
-
- } else {
-
- /* It is probably safest to assume that all other
- file types are normal. Better to check them rather
- than blindly skip them. */
-
- info->type = OS_FILE_TYPE_FILE;
- }
-
- status = 0;
-
- } else if (GetLastError() == ERROR_NO_MORE_FILES) {
-
- status = 1;
-
- } else {
-
- os_file_handle_error_no_exit(NULL, "readdir_next_file", false);
-
- status = -1;
- }
-
- return(status);
-}
-
/** Check that IO of specific size is possible for the file
opened with FILE_FLAG_NO_BUFFERING.
@@ -5251,6 +4861,34 @@ short_warning:
#endif /* _WIN32 */
+/** Check if the file system supports sparse files.
+@param fh file handle
+@return true if the file system supports sparse files */
+IF_WIN(static,) bool os_is_sparse_file_supported(os_file_t fh)
+{
+ /* In this debugging mode, we act as if punch hole is supported,
+ then we skip any calls to actually punch a hole. In this way,
+ Transparent Page Compression is still being tested. */
+ DBUG_EXECUTE_IF("ignore_punch_hole",
+ return(true);
+ );
+
+#ifdef _WIN32
+ FILE_ATTRIBUTE_TAG_INFO info;
+ if (GetFileInformationByHandleEx(fh, FileAttributeTagInfo,
+ &info, (DWORD)sizeof(info))) {
+ if (info.FileAttributes != INVALID_FILE_ATTRIBUTES) {
+ return (info.FileAttributes & FILE_ATTRIBUTE_SPARSE_FILE) != 0;
+ }
+ }
+ return false;
+#else
+ /* We don't know the FS block size, use the sector size. The FS
+ will do the magic. */
+ return DB_SUCCESS == os_file_punch_hole_posix(fh, 0, srv_page_size);
+#endif /* _WIN32 */
+}
+
/** Extend a file.
On Windows, extending a file allocates blocks for the file,
@@ -5509,15 +5147,16 @@ os_file_punch_hole(
os_offset_t off,
os_offset_t len)
{
- dberr_t err;
-
#ifdef _WIN32
- err = os_file_punch_hole_win32(fh, off, len);
+ return os_file_punch_hole_win32(fh, off, len);
#else
- err = os_file_punch_hole_posix(fh, off, len);
+ return os_file_punch_hole_posix(fh, off, len);
#endif /* _WIN32 */
+}
- return (err);
+inline bool IORequest::should_punch_hole() const
+{
+ return m_fil_node && m_fil_node->space->punch_hole;
}
/** Free storage space associated with a section of the file.
@@ -5557,7 +5196,9 @@ IORequest::punch_hole(os_file_t fh, os_offset_t off, ulint len)
/* If punch hole is not supported,
set space so that it is not used. */
if (err == DB_IO_NO_PUNCH_HOLE) {
- space_no_punch_hole();
+ if (m_fil_node) {
+ m_fil_node->space->punch_hole = false;
+ }
err = DB_SUCCESS;
}
}
@@ -5565,43 +5206,6 @@ IORequest::punch_hole(os_file_t fh, os_offset_t off, ulint len)
return (err);
}
-/** Check if the file system supports sparse files.
-
-Warning: On POSIX systems we try and punch a hole from offset 0 to
-the system configured page size. This should only be called on an empty
-file.
-@param[in] fh File handle for the file - if opened
-@return true if the file system supports sparse files */
-bool
-os_is_sparse_file_supported(os_file_t fh)
-{
- /* In this debugging mode, we act as if punch hole is supported,
- then we skip any calls to actually punch a hole. In this way,
- Transparent Page Compression is still being tested. */
- DBUG_EXECUTE_IF("ignore_punch_hole",
- return(true);
- );
-
-#ifdef _WIN32
- FILE_ATTRIBUTE_TAG_INFO info;
- if (GetFileInformationByHandleEx(fh, FileAttributeTagInfo,
- &info, (DWORD)sizeof(info))) {
- if (info.FileAttributes != INVALID_FILE_ATTRIBUTES) {
- return (info.FileAttributes & FILE_ATTRIBUTE_SPARSE_FILE) != 0;
- }
- }
- return false;
-#else
- dberr_t err;
-
- /* We don't know the FS block size, use the sector size. The FS
- will do the magic. */
- err = os_file_punch_hole_posix(fh, 0, srv_page_size);
-
- return(err == DB_SUCCESS);
-#endif /* _WIN32 */
-}
-
/*
Get file system block size, by path.
@@ -5631,7 +5235,6 @@ size_t os_file_get_fs_block_size(const char *path)
return 0;
}
-
/** This function returns information about the specified file
@param[in] path pathname of the file
@param[out] stat_info information of a file in a directory
@@ -7518,7 +7121,7 @@ os_aio_print(FILE* file)
ULINTPF " OS fsyncs\n",
fil_n_pending_log_flushes,
fil_n_pending_tablespace_flushes,
- os_n_file_reads,
+ ulint{os_n_file_reads},
os_n_file_writes,
os_n_fsyncs);
@@ -7662,6 +7265,357 @@ os_file_set_umask(ulint umask)
os_innodb_umask = umask;
}
+#ifdef _WIN32
+
+/* Checks whether physical drive is on SSD.*/
+static bool is_drive_on_ssd(DWORD nr)
+{
+ char physical_drive_path[32];
+ snprintf(physical_drive_path, sizeof(physical_drive_path),
+ "\\\\.\\PhysicalDrive%lu", nr);
+
+ HANDLE h= CreateFile(physical_drive_path, 0,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr);
+ if (h == INVALID_HANDLE_VALUE)
+ return false;
+
+ DEVICE_SEEK_PENALTY_DESCRIPTOR seek_penalty;
+ STORAGE_PROPERTY_QUERY storage_query{};
+ storage_query.PropertyId= StorageDeviceSeekPenaltyProperty;
+ storage_query.QueryType= PropertyStandardQuery;
+
+ bool on_ssd= false;
+ DWORD bytes_written;
+ if (DeviceIoControl(h, IOCTL_STORAGE_QUERY_PROPERTY, &storage_query,
+ sizeof storage_query, &seek_penalty, sizeof seek_penalty,
+ &bytes_written, nullptr))
+ {
+ on_ssd= !seek_penalty.IncursSeekPenalty;
+ }
+ else
+ {
+ on_ssd= false;
+ }
+ CloseHandle(h);
+ return on_ssd;
+}
+
+/*
+ Checks whether volume is on SSD, by checking all physical drives
+ in that volume.
+*/
+static bool is_volume_on_ssd(const char *volume_mount_point)
+{
+ char volume_name[MAX_PATH];
+
+ if (!GetVolumeNameForVolumeMountPoint(volume_mount_point, volume_name,
+ array_elements(volume_name)))
+ {
+ /* This can fail, e.g if file is on network share */
+ return false;
+ }
+
+ /* Chomp last backslash, this is needed to open volume.*/
+ size_t length= strlen(volume_name);
+ if (length && volume_name[length - 1] == '\\')
+ volume_name[length - 1]= 0;
+
+ /* Open volume handle */
+ HANDLE volume_handle= CreateFile(
+ volume_name, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr);
+
+ if (volume_handle == INVALID_HANDLE_VALUE)
+ return false;
+
+ /*
+ Enumerate all volume extends, check whether all of them are on SSD
+ */
+
+ /* Anticipate common case where there is only one extent.*/
+ VOLUME_DISK_EXTENTS single_extent;
+
+ /* But also have a place to manage allocated data.*/
+ std::unique_ptr<BYTE[]> lifetime;
+
+ DWORD bytes_written;
+ VOLUME_DISK_EXTENTS *extents= nullptr;
+ if (DeviceIoControl(volume_handle, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
+ nullptr, 0, &single_extent, sizeof(single_extent),
+ &bytes_written, nullptr))
+ {
+ /* Worked on the first try. Use the preallocated buffer.*/
+ extents= &single_extent;
+ }
+ else
+ {
+ VOLUME_DISK_EXTENTS *last_query= &single_extent;
+ while (GetLastError() == ERROR_MORE_DATA)
+ {
+ DWORD extentCount= last_query->NumberOfDiskExtents;
+ DWORD allocatedSize=
+ FIELD_OFFSET(VOLUME_DISK_EXTENTS, Extents[extentCount]);
+ lifetime.reset(new BYTE[allocatedSize]);
+ last_query= (VOLUME_DISK_EXTENTS *) lifetime.get();
+ if (DeviceIoControl(volume_handle, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
+ nullptr, 0, last_query, allocatedSize,
+ &bytes_written, nullptr))
+ {
+ extents= last_query;
+ break;
+ }
+ }
+ }
+ CloseHandle(volume_handle);
+ if (!extents)
+ return false;
+
+ for (DWORD i= 0; i < extents->NumberOfDiskExtents; i++)
+ if (!is_drive_on_ssd(extents->Extents[i].DiskNumber))
+ return false;
+
+ return true;
+}
+
+#include <unordered_map>
+static bool is_file_on_ssd(char *file_path)
+{
+ /* Cache of volume_path => volume_info, protected by rwlock.*/
+ static std::unordered_map<std::string, bool> cache;
+ static SRWLOCK lock= SRWLOCK_INIT;
+
+ /* Preset result, in case something fails, e.g we're on network drive.*/
+ char volume_path[MAX_PATH];
+ if (!GetVolumePathName(file_path, volume_path, array_elements(volume_path)))
+ return false;
+
+ /* Try cached volume info first.*/
+ std::string volume_path_str(volume_path);
+ bool found;
+ bool result;
+ AcquireSRWLockShared(&lock);
+ auto e= cache.find(volume_path_str);
+ if ((found= e != cache.end()))
+ result= e->second;
+ ReleaseSRWLockShared(&lock);
+
+ if (found)
+ return result;
+
+ result= is_volume_on_ssd(volume_path);
+
+ /* Update cache */
+ AcquireSRWLockExclusive(&lock);
+ cache[volume_path_str]= result;
+ ReleaseSRWLockExclusive(&lock);
+ return result;
+}
+
+#endif
+
+/** Determine some file metadata when creating or reading the file.
+@param file the file that is being created, or OS_FILE_CLOSED */
+void fil_node_t::find_metadata(os_file_t file
+#ifndef _WIN32
+ , struct stat* statbuf
+#endif
+ )
+{
+ if (file == OS_FILE_CLOSED) {
+ file = handle;
+ ut_ad(is_open());
+ }
+
+#ifdef _WIN32 /* FIXME: make this unconditional */
+ if (space->punch_hole) {
+ space->punch_hole = os_is_sparse_file_supported(file);
+ }
+#endif
+
+ /*
+ For the temporary tablespace and during the
+ non-redo-logged adjustments in
+ IMPORT TABLESPACE, we do not care about
+ the atomicity of writes.
+
+ Atomic writes is supported if the file can be used
+ with atomic_writes (not log file), O_DIRECT is
+ used (tested in ha_innodb.cc) and the file is
+ device and file system that supports atomic writes
+ for the given block size.
+ */
+ space->atomic_write_supported = space->purpose == FIL_TYPE_TEMPORARY
+ || space->purpose == FIL_TYPE_IMPORT;
+#ifdef _WIN32
+ on_ssd = is_file_on_ssd(name);
+ FILE_STORAGE_INFO info;
+ if (GetFileInformationByHandleEx(
+ file, FileStorageInfo, &info, sizeof(info))) {
+ block_size = info.PhysicalBytesPerSectorForAtomicity;
+ } else {
+ block_size = 512;
+ }
+#else
+ struct stat sbuf;
+ if (!statbuf && !fstat(file, &sbuf)) {
+ statbuf = &sbuf;
+ }
+ if (statbuf) {
+ block_size = statbuf->st_blksize;
+ }
+ on_ssd = space->atomic_write_supported
+# ifdef UNIV_LINUX
+ || (statbuf && fil_system.is_ssd(statbuf->st_dev))
+# endif
+ ;
+#endif
+ if (!space->atomic_write_supported) {
+ space->atomic_write_supported = atomic_write
+ && srv_use_atomic_writes
+#ifndef _WIN32
+ && my_test_if_atomic_write(file,
+ space->physical_size())
+#else
+ /* On Windows, all single sector writes are atomic,
+ as per WriteFile() documentation on MSDN.
+ We also require SSD for atomic writes, eventhough
+ technically it is not necessary- the reason is that
+ on hard disks, we still want the benefit from
+ (non-atomic) neighbor page flushing in the buffer
+ pool code. */
+ && srv_page_size == block_size
+ && on_ssd
+#endif
+ ;
+ }
+}
+
+/** Read the first page of a data file.
+@param[in] first whether this is the very first read
+@return whether the page was found valid */
+bool fil_node_t::read_page0(bool first)
+{
+ ut_ad(mutex_own(&fil_system.mutex));
+ ut_a(space->purpose != FIL_TYPE_LOG);
+ const ulint psize = space->physical_size();
+#ifndef _WIN32
+ struct stat statbuf;
+ if (fstat(handle, &statbuf)) {
+ return false;
+ }
+ os_offset_t size_bytes = statbuf.st_size;
+#else
+ os_offset_t size_bytes = os_file_get_size(handle);
+ ut_a(size_bytes != (os_offset_t) -1);
+#endif
+ const ulint min_size = FIL_IBD_FILE_INITIAL_SIZE * psize;
+
+ if (size_bytes < min_size) {
+ ib::error() << "The size of the file " << name
+ << " is only " << size_bytes
+ << " bytes, should be at least " << min_size;
+ return false;
+ }
+
+ byte* buf2 = static_cast<byte*>(ut_malloc_nokey(2 * psize));
+
+ /* Align the memory for file i/o if we might have O_DIRECT set */
+ byte* page = static_cast<byte*>(ut_align(buf2, psize));
+ IORequest request(IORequest::READ);
+ if (os_file_read(request, handle, page, 0, psize) != DB_SUCCESS) {
+ ib::error() << "Unable to read first page of file " << name;
+ ut_free(buf2);
+ return false;
+ }
+ const ulint space_id = fsp_header_get_space_id(page);
+ ulint flags = fsp_header_get_flags(page);
+ const ulint size = fsp_header_get_field(page, FSP_SIZE);
+ const ulint free_limit = fsp_header_get_field(page, FSP_FREE_LIMIT);
+ const ulint free_len = flst_get_len(FSP_HEADER_OFFSET + FSP_FREE
+ + page);
+ if (!fil_space_t::is_valid_flags(flags, space->id)) {
+ ulint cflags = fsp_flags_convert_from_101(flags);
+ if (cflags == ULINT_UNDEFINED) {
+invalid:
+ ib::error()
+ << "Expected tablespace flags "
+ << ib::hex(space->flags)
+ << " but found " << ib::hex(flags)
+ << " in the file " << name;
+ ut_free(buf2);
+ return false;
+ }
+
+ ulint cf = cflags & ~FSP_FLAGS_MEM_MASK;
+ ulint sf = space->flags & ~FSP_FLAGS_MEM_MASK;
+
+ if (!fil_space_t::is_flags_equal(cf, sf)
+ && !fil_space_t::is_flags_equal(sf, cf)) {
+ goto invalid;
+ }
+
+ flags = cflags;
+ }
+
+ ut_ad(!(flags & FSP_FLAGS_MEM_MASK));
+
+ /* Try to read crypt_data from page 0 if it is not yet read. */
+ if (!space->crypt_data) {
+ space->crypt_data = fil_space_read_crypt_data(
+ fil_space_t::zip_size(flags), page);
+ }
+ ut_free(buf2);
+
+ if (UNIV_UNLIKELY(space_id != space->id)) {
+ ib::error() << "Expected tablespace id " << space->id
+ << " but found " << space_id
+ << " in the file " << name;
+ return false;
+ }
+
+ if (first) {
+ ut_ad(space->id != TRX_SYS_SPACE);
+#ifdef UNIV_LINUX
+ find_metadata(handle, &statbuf);
+#else
+ find_metadata();
+#endif
+
+ /* Truncate the size to a multiple of extent size. */
+ ulint mask = psize * FSP_EXTENT_SIZE - 1;
+
+ if (size_bytes <= mask) {
+ /* .ibd files start smaller than an
+ extent size. Do not truncate valid data. */
+ } else {
+ size_bytes &= ~os_offset_t(mask);
+ }
+
+ space->flags = (space->flags & FSP_FLAGS_MEM_MASK) | flags;
+
+ this->size = ulint(size_bytes / psize);
+ space->committed_size = space->size += this->size;
+ } else if (space->id != TRX_SYS_SPACE || space->size_in_header) {
+ /* If this is not the first-time open, do nothing.
+ For the system tablespace, we always get invoked as
+ first=false, so we detect the true first-time-open based
+ on size_in_header and proceed to initialize the data. */
+ return true;
+ } else {
+ /* Initialize the size of predefined tablespaces
+ to FSP_SIZE. */
+ space->committed_size = size;
+ }
+
+ ut_ad(space->free_limit == 0 || space->free_limit == free_limit);
+ ut_ad(space->free_len == 0 || space->free_len == free_len);
+ space->size_in_header = size;
+ space->free_limit = free_limit;
+ space->free_len = free_len;
+ return true;
+}
+
#else
#include "univ.i"
#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/os/os0proc.cc b/storage/innobase/os/os0proc.cc
index 5d0e53bcd82..d22b6ffe887 100644
--- a/storage/innobase/os/os0proc.cc
+++ b/storage/innobase/os/os0proc.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2019, MariaDB Corporation.
+Copyright (c) 2019, 2020, 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
@@ -41,7 +41,7 @@ MAP_ANON but MAP_ANON is marked as deprecated */
/** The total amount of memory currently allocated from the operating
system with os_mem_alloc_large(). */
-ulint os_total_large_mem_allocated = 0;
+Atomic_counter<ulint> os_total_large_mem_allocated;
/** Converts the current process id to a number.
@return process id as a number */
@@ -99,9 +99,7 @@ os_mem_alloc_large(
if (ptr) {
*n = size;
- my_atomic_addlint(
- &os_total_large_mem_allocated, size);
-
+ os_total_large_mem_allocated += size;
MEM_UNDEFINED(ptr, size);
return(ptr);
}
@@ -124,8 +122,7 @@ skip:
ib::info() << "VirtualAlloc(" << size << " bytes) failed;"
" Windows error " << GetLastError();
} else {
- my_atomic_addlint(
- &os_total_large_mem_allocated, size);
+ os_total_large_mem_allocated += size;
MEM_UNDEFINED(ptr, size);
}
#else
@@ -140,8 +137,7 @@ skip:
" errno " << errno;
ptr = NULL;
} else {
- my_atomic_addlint(
- &os_total_large_mem_allocated, size);
+ os_total_large_mem_allocated += size;
MEM_UNDEFINED(ptr, size);
}
#endif
@@ -168,8 +164,7 @@ os_mem_free_large(
#ifdef HAVE_LINUX_LARGE_PAGES
if (my_use_large_pages && opt_large_page_size && !shmdt(ptr)) {
- my_atomic_addlint(
- &os_total_large_mem_allocated, -size);
+ os_total_large_mem_allocated -= size;
return;
}
#endif /* HAVE_LINUX_LARGE_PAGES */
@@ -180,8 +175,7 @@ os_mem_free_large(
ib::error() << "VirtualFree(" << ptr << ", " << size
<< ") failed; Windows error " << GetLastError();
} else {
- my_atomic_addlint(
- &os_total_large_mem_allocated, -lint(size));
+ os_total_large_mem_allocated -= size;
}
#elif !defined OS_MAP_ANON
ut_free(ptr);
@@ -194,8 +188,7 @@ os_mem_free_large(
ib::error() << "munmap(" << ptr << ", " << size << ") failed;"
" errno " << errno;
} else {
- my_atomic_addlint(
- &os_total_large_mem_allocated, -size);
+ os_total_large_mem_allocated -= size;
}
#endif
}
diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc
index 0c97ebccc1b..bb5da7df7c4 100644
--- a/storage/innobase/os/os0thread.cc
+++ b/storage/innobase/os/os0thread.cc
@@ -28,7 +28,7 @@ Created 9/8/1995 Heikki Tuuri
#include "srv0srv.h"
/** Number of threads active. */
-ulint os_thread_count;
+Atomic_counter<ulint> os_thread_count;
/***************************************************************//**
Compares two thread ids for equality.
@@ -118,7 +118,7 @@ os_thread_create_func(
CloseHandle(handle);
- my_atomic_addlint(&os_thread_count, 1);
+ os_thread_count++;
return((os_thread_t)new_thread_id);
#else /* _WIN32 else */
@@ -133,7 +133,7 @@ os_thread_create_func(
abort();
}
- my_atomic_addlint(&os_thread_count, 1);
+ os_thread_count++;
ret = pthread_create(&new_thread_id, &attr, func, arg);
@@ -188,7 +188,7 @@ os_thread_exit(bool detach)
pfs_delete_thread();
#endif
- my_atomic_addlint(&os_thread_count, ulint(-1));
+ os_thread_count--;
#ifdef _WIN32
ExitThread(0);
diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc
index a90195a1b67..22a3907d298 100644
--- a/storage/innobase/page/page0cur.cc
+++ b/storage/innobase/page/page0cur.cc
@@ -703,7 +703,7 @@ up_slot_match:
& REC_INFO_MIN_REC_FLAG)) {
ut_ad(!page_has_prev(page_align(mid_rec)));
ut_ad(!page_rec_is_leaf(mid_rec)
- || rec_is_metadata(mid_rec, index));
+ || rec_is_metadata(mid_rec, *index));
cmp = 1;
goto low_rec_match;
}
@@ -1029,7 +1029,7 @@ page_cur_parse_insert_rec(
if (offset >= srv_page_size) {
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -1043,7 +1043,7 @@ page_cur_parse_insert_rec(
}
if (end_seg_len >= srv_page_size << 1) {
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -1380,7 +1380,7 @@ use_heap:
switch (rec_get_status(current_rec)) {
case REC_STATUS_ORDINARY:
case REC_STATUS_NODE_PTR:
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
case REC_STATUS_INFIMUM:
break;
case REC_STATUS_SUPREMUM:
@@ -1389,7 +1389,7 @@ use_heap:
switch (rec_get_status(insert_rec)) {
case REC_STATUS_ORDINARY:
case REC_STATUS_NODE_PTR:
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
break;
case REC_STATUS_INFIMUM:
case REC_STATUS_SUPREMUM:
@@ -1576,7 +1576,7 @@ page_cur_insert_rec_zip(
get rid of the modification log. */
page_create_zip(page_cur_get_block(cursor), index,
page_header_get_field(page, PAGE_LEVEL),
- 0, NULL, mtr);
+ 0, mtr);
ut_ad(!page_header_get_ptr(page, PAGE_FREE));
if (page_zip_available(
@@ -1651,7 +1651,7 @@ page_cur_insert_rec_zip(
if (!log_compressed) {
if (page_zip_compress(
page_zip, page, index,
- level, NULL, NULL)) {
+ level, NULL)) {
page_cur_insert_rec_write_log(
insert_rec, rec_size,
cursor->rec, index, mtr);
@@ -1798,17 +1798,11 @@ too_small:
columns of free_rec, in case it will not be
overwritten by insert_rec. */
- ulint trx_id_col;
ulint trx_id_offs;
ulint len;
- trx_id_col = dict_index_get_sys_col_pos(index,
- DATA_TRX_ID);
- ut_ad(trx_id_col > 0);
- ut_ad(trx_id_col != ULINT_UNDEFINED);
-
- trx_id_offs = rec_get_nth_field_offs(foffsets,
- trx_id_col, &len);
+ trx_id_offs = rec_get_nth_field_offs(
+ foffsets, index->db_trx_id(), &len);
ut_ad(len == DATA_TRX_ID_LEN);
if (DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN + trx_id_offs
@@ -1824,7 +1818,7 @@ too_small:
ut_ad(free_rec + trx_id_offs + DATA_TRX_ID_LEN
== rec_get_nth_field(free_rec, foffsets,
- trx_id_col + 1, &len));
+ index->db_roll_ptr(), &len));
ut_ad(len == DATA_ROLL_PTR_LEN);
}
@@ -2275,7 +2269,7 @@ page_cur_parse_delete_rec(
ptr += 2;
if (UNIV_UNLIKELY(offset >= srv_page_size)) {
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
return NULL;
}
@@ -2350,7 +2344,8 @@ page_cur_delete_rec(
/* The record must not be the supremum or infimum record. */
ut_ad(page_rec_is_user_rec(current_rec));
- if (page_get_n_recs(page) == 1 && !recv_recovery_is_on()) {
+ if (page_get_n_recs(page) == 1 && !recv_recovery_is_on()
+ && !rec_is_alter_metadata(current_rec, *index)) {
/* Empty the page, unless we are applying the redo log
during crash recovery. During normal operation, the
page_create_empty() gets logged as one of MLOG_PAGE_CREATE,
diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc
index d69fdc7a202..fc33b38beda 100644
--- a/storage/innobase/page/page0page.cc
+++ b/storage/innobase/page/page0page.cc
@@ -29,8 +29,8 @@ Created 2/2/1994 Heikki Tuuri
#include "page0cur.h"
#include "page0zip.h"
#include "buf0buf.h"
+#include "buf0checksum.h"
#include "btr0btr.h"
-#include "row0trunc.h"
#include "srv0srv.h"
#include "lock0lock.h"
#include "fut0lst.h"
@@ -412,28 +412,19 @@ page_create_zip(
buf_block_t* block, /*!< in/out: a buffer frame
where the page is created */
dict_index_t* index, /*!< in: the index of the
- page, or NULL when applying
- TRUNCATE log
- record during recovery */
+ page */
ulint level, /*!< in: the B-tree level
of the page */
trx_id_t max_trx_id, /*!< in: PAGE_MAX_TRX_ID */
- const redo_page_compress_t* page_comp_info,
- /*!< in: used for applying
- TRUNCATE log
- record during recovery */
mtr_t* mtr) /*!< in/out: mini-transaction
handle */
{
page_t* page;
page_zip_des_t* page_zip = buf_block_get_page_zip(block);
- bool is_spatial;
ut_ad(block);
ut_ad(page_zip);
- ut_ad(index == NULL || dict_table_is_comp(index->table));
- is_spatial = index ? dict_index_is_spatial(index)
- : page_comp_info->type & DICT_SPATIAL;
+ ut_ad(dict_table_is_comp(index->table));
/* PAGE_MAX_TRX_ID or PAGE_ROOT_AUTO_INC are always 0 for
temporary tables. */
@@ -451,22 +442,11 @@ page_create_zip(
|| !dict_index_is_sec_or_ibuf(index)
|| index->table->is_temporary());
- page = page_create_low(block, TRUE, is_spatial);
+ page = page_create_low(block, TRUE, dict_index_is_spatial(index));
mach_write_to_2(PAGE_HEADER + PAGE_LEVEL + page, level);
mach_write_to_8(PAGE_HEADER + PAGE_MAX_TRX_ID + page, max_trx_id);
- if (truncate_t::s_fix_up_active) {
- /* Compress the index page created when applying
- TRUNCATE log during recovery */
- if (!page_zip_compress(page_zip, page, index, page_zip_level,
- page_comp_info, NULL)) {
- /* The compression of a newly created
- page should always succeed. */
- ut_error;
- }
-
- } else if (!page_zip_compress(page_zip, page, index,
- page_zip_level, NULL, mtr)) {
+ if (!page_zip_compress(page_zip, page, index, page_zip_level, mtr)) {
/* The compression of a newly created
page should always succeed. */
ut_error;
@@ -512,7 +492,7 @@ page_create_empty(
ut_ad(!index->table->is_temporary());
page_create_zip(block, index,
page_header_get_field(page, PAGE_LEVEL),
- max_trx_id, NULL, mtr);
+ max_trx_id, mtr);
} else {
page_create(block, mtr, page_is_comp(page),
dict_index_is_spatial(index));
@@ -688,11 +668,8 @@ page_copy_rec_list_end(
if (new_page_zip) {
mtr_set_log_mode(mtr, log_mode);
- if (!page_zip_compress(new_page_zip,
- new_page,
- index,
- page_zip_level,
- NULL, mtr)) {
+ if (!page_zip_compress(new_page_zip, new_page, index,
+ page_zip_level, mtr)) {
/* Before trying to reorganize the page,
store the number of preceding records on the page. */
ulint ret_pos
@@ -857,7 +834,7 @@ page_copy_rec_list_start(
goto zip_reorganize;);
if (!page_zip_compress(new_page_zip, new_page, index,
- page_zip_level, NULL, mtr)) {
+ page_zip_level, mtr)) {
ulint ret_pos;
#ifndef DBUG_OFF
zip_reorganize:
@@ -1798,6 +1775,7 @@ page_print_list(
count = 0;
for (;;) {
offsets = rec_get_offsets(cur.rec, index, offsets,
+ page_rec_is_leaf(cur.rec),
ULINT_UNDEFINED, &heap);
page_rec_print(cur.rec, offsets);
@@ -1820,6 +1798,7 @@ page_print_list(
if (count + pr_n >= n_recs) {
offsets = rec_get_offsets(cur.rec, index, offsets,
+ page_rec_is_leaf(cur.rec),
ULINT_UNDEFINED, &heap);
page_rec_print(cur.rec, offsets);
}
@@ -2522,15 +2501,13 @@ wrong_page_type:
ib::error() << "REC_INFO_MIN_REC_FLAG "
"is set in a leaf-page record";
ret = false;
- } else if (info_bits & REC_INFO_DELETED_FLAG) {
- /* If this were a 10.4 metadata
- record for index->table->instant
- we should not get here in 10.3, because
- the metadata record should not have
- been recognized by
- btr_cur_instant_init_low(). */
- ib::error() << "Metadata record "
- "is delete-marked";
+ } else if (!(info_bits & REC_INFO_DELETED_FLAG)
+ != !index->table->instant) {
+ ib::error() << (index->table->instant
+ ? "Metadata record "
+ "is not delete-marked"
+ : "Metadata record "
+ "is delete-marked");
ret = false;
}
} else if (!page_has_prev(page)
@@ -2550,7 +2527,7 @@ wrong_page_type:
&& status != REC_STATUS_NODE_PTR
&& status != REC_STATUS_INFIMUM
&& status != REC_STATUS_SUPREMUM
- && status != REC_STATUS_COLUMNS_ADDED) {
+ && status != REC_STATUS_INSTANT) {
ib::error() << "impossible record status "
<< status;
ret = false;
@@ -2576,7 +2553,7 @@ wrong_page_type:
ret = false;
}
} else if (!index->is_instant()
- && status == REC_STATUS_COLUMNS_ADDED) {
+ && status == REC_STATUS_INSTANT) {
ib::error() << "instantly added record in a "
"non-instant index";
ret = false;
diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc
index 7a86d825aeb..73d9b0d1fcd 100644
--- a/storage/innobase/page/page0zip.cc
+++ b/storage/innobase/page/page0zip.cc
@@ -25,8 +25,12 @@ Compressed page interface
Created June 2005 by Marko Makela
*******************************************************/
-#include "page0size.h"
#include "page0zip.h"
+#include "fsp0types.h"
+#include "page0page.h"
+#include "buf0checksum.h"
+#include "ut0crc32.h"
+#include "zlib.h"
#include "span.h"
using st_::span;
@@ -34,28 +38,21 @@ using st_::span;
/** A BLOB field reference full of zero, for use in assertions and tests.
Initially, BLOB field references are set to zero, in
dtuple_convert_big_rec(). */
+alignas(UNIV_PAGE_SIZE_MIN)
const byte field_ref_zero[UNIV_PAGE_SIZE_MAX] = { 0, };
#ifndef UNIV_INNOCHECKSUM
-#include "page0page.h"
#include "mtr0log.h"
#include "dict0dict.h"
#include "btr0cur.h"
-#include "page0types.h"
#include "log0recv.h"
#include "row0row.h"
-#include "row0trunc.h"
-#include "zlib.h"
-#include "buf0buf.h"
-#include "buf0types.h"
-#include "buf0checksum.h"
#include "btr0sea.h"
#include "dict0boot.h"
#include "lock0lock.h"
#include "srv0srv.h"
#include "buf0lru.h"
#include "srv0mon.h"
-#include "ut0crc32.h"
#include <map>
#include <algorithm>
@@ -104,7 +101,7 @@ Compare at most sizeof(field_ref_zero) bytes.
@param s in: size of the memory block, in bytes */
#define ASSERT_ZERO(b, s) \
ut_ad(!memcmp(b, field_ref_zero, \
- ut_min(static_cast<size_t>(s), sizeof field_ref_zero)));
+ std::min<size_t>(s, sizeof field_ref_zero)));
/** Assert that a BLOB pointer is filled with zero bytes.
@param b in: BLOB pointer */
#define ASSERT_ZERO_BLOB(b) \
@@ -176,18 +173,17 @@ page_zip_is_too_big(
const dict_index_t* index,
const dtuple_t* entry)
{
- const page_size_t& page_size =
- dict_table_page_size(index->table);
+ const ulint zip_size = index->table->space->zip_size();
/* Estimate the free space of an empty compressed page.
Subtract one byte for the encoded heap_no in the
modification log. */
ulint free_space_zip = page_zip_empty_size(
- index->n_fields, page_size.physical());
+ index->n_fields, zip_size);
ulint n_uniq = dict_index_get_n_unique_in_tree(index);
ut_ad(dict_table_is_comp(index->table));
- ut_ad(page_size.is_compressed());
+ ut_ad(zip_size);
if (free_space_zip == 0) {
return(true);
@@ -1246,17 +1242,11 @@ page_zip_compress(
dict_index_t* index, /*!< in: index of the B-tree
node */
ulint level, /*!< in: commpression level */
- const redo_page_compress_t* page_comp_info,
- /*!< in: used for applying
- TRUNCATE log
- record during recovery */
mtr_t* mtr) /*!< in/out: mini-transaction,
or NULL */
{
z_stream c_stream;
int err;
- ulint n_fields; /* number of index fields
- needed */
byte* fields; /*!< index field information */
byte* buf; /*!< compressed payload of the
page */
@@ -1271,7 +1261,6 @@ page_zip_compress(
ulint n_blobs = 0;
byte* storage; /* storage of uncompressed
columns */
- index_id_t ind_id;
const ulonglong ns = my_interval_timer();
#ifdef PAGE_ZIP_COMPRESS_DBG
FILE* logfile = NULL;
@@ -1286,10 +1275,8 @@ page_zip_compress(
ut_a(fil_page_index_page_check(page));
ut_ad(page_simple_validate_new((page_t*) page));
ut_ad(page_zip_simple_validate(page_zip));
- ut_ad(!index
- || (index
- && dict_table_is_comp(index->table)
- && !dict_index_is_ibuf(index)));
+ ut_ad(dict_table_is_comp(index->table));
+ ut_ad(!dict_index_is_ibuf(index));
MEM_CHECK_DEFINED(page, srv_page_size);
@@ -1309,18 +1296,10 @@ page_zip_compress(
== PAGE_NEW_SUPREMUM);
}
- if (truncate_t::s_fix_up_active) {
- ut_ad(page_comp_info != NULL);
- n_fields = page_comp_info->n_fields;
- ind_id = page_comp_info->index_id;
- } else {
- if (page_is_leaf(page)) {
- n_fields = dict_index_get_n_fields(index);
- } else {
- n_fields = dict_index_get_n_unique_in_tree_nonleaf(index);
- }
- ind_id = index->id;
- }
+ const ulint n_fields = page_is_leaf(page)
+ ? dict_index_get_n_fields(index)
+ : dict_index_get_n_unique_in_tree_nonleaf(index);
+ index_id_t ind_id = index->id;
/* The dense directory excludes the infimum and supremum records. */
n_dense = ulint(page_dir_get_n_heap(page)) - PAGE_HEAP_NO_USER_LOW;
@@ -1404,20 +1383,8 @@ page_zip_compress(
/* Dense page directory and uncompressed columns, if any */
if (page_is_leaf(page)) {
- if ((index && dict_index_is_clust(index))
- || (page_comp_info
- && (page_comp_info->type & DICT_CLUSTERED))) {
-
- if (index) {
- trx_id_col = dict_index_get_sys_col_pos(
- index, DATA_TRX_ID);
- ut_ad(trx_id_col > 0);
- ut_ad(trx_id_col != ULINT_UNDEFINED);
- } else if (page_comp_info
- && (page_comp_info->type
- & DICT_CLUSTERED)) {
- trx_id_col = page_comp_info->trx_id_pos;
- }
+ if (dict_index_is_clust(index)) {
+ trx_id_col = index->db_trx_id();
slot_size = PAGE_ZIP_DIR_SLOT_SIZE
+ DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN;
@@ -1425,10 +1392,6 @@ page_zip_compress(
} else {
/* Signal the absence of trx_id
in page_zip_fields_encode() */
- if (index) {
- ut_ad(dict_index_get_sys_col_pos(
- index, DATA_TRX_ID) == ULINT_UNDEFINED);
- }
trx_id_col = 0;
slot_size = PAGE_ZIP_DIR_SLOT_SIZE;
}
@@ -1442,19 +1405,9 @@ page_zip_compress(
goto zlib_error;
}
- c_stream.avail_out -= static_cast<uInt>(n_dense * slot_size);
- if (truncate_t::s_fix_up_active) {
- ut_ad(page_comp_info != NULL);
- c_stream.avail_in = static_cast<uInt>(
- page_comp_info->field_len);
- for (ulint i = 0; i < page_comp_info->field_len; i++) {
- fields[i] = page_comp_info->fields[i];
- }
- } else {
- c_stream.avail_in = static_cast<uInt>(
- page_zip_fields_encode(
- n_fields, index, trx_id_col, fields));
- }
+ c_stream.avail_out -= uInt(n_dense * slot_size);
+ c_stream.avail_in = uInt(page_zip_fields_encode(n_fields, index,
+ trx_id_col, fields));
c_stream.next_in = fields;
if (UNIV_LIKELY(!trx_id_col)) {
@@ -1610,7 +1563,7 @@ err_exit:
mutex_exit(&page_zip_stat_per_index_mutex);
}
- if (page_is_leaf(page) && !truncate_t::s_fix_up_active) {
+ if (page_is_leaf(page)) {
dict_index_zip_success(index);
}
@@ -1627,7 +1580,7 @@ page_zip_fields_free(
{
if (index) {
dict_table_t* table = index->table;
- mysql_mutex_destroy(&index->zip_pad.mutex);
+ index->zip_pad.mutex.~mutex();
mem_heap_free(index->heap);
dict_mem_table_free(table);
@@ -2142,6 +2095,10 @@ page_zip_apply_log(
rec_get_offsets_reverse(data, index,
hs & REC_STATUS_NODE_PTR,
offsets);
+ /* Silence a debug assertion in rec_offs_make_valid().
+ This will be overwritten in page_zip_set_extra_bytes(),
+ called by page_zip_decompress_low(). */
+ ut_d(rec[-REC_NEW_INFO_BITS] = 0);
rec_offs_make_valid(rec, index, n_core != 0, offsets);
/* Copy the extra bytes (backwards). */
@@ -3758,29 +3715,25 @@ page_zip_write_rec(
ulint len;
if (dict_index_is_clust(index)) {
- ulint trx_id_col;
-
- trx_id_col = dict_index_get_sys_col_pos(index,
- DATA_TRX_ID);
- ut_ad(trx_id_col != ULINT_UNDEFINED);
-
/* Store separately trx_id, roll_ptr and
the BTR_EXTERN_FIELD_REF of each BLOB column. */
if (rec_offs_any_extern(offsets)) {
data = page_zip_write_rec_ext(
page_zip, page,
rec, index, offsets, create,
- trx_id_col, heap_no, storage, data);
+ index->db_trx_id(), heap_no,
+ storage, data);
} else {
/* Locate trx_id and roll_ptr. */
const byte* src
= rec_get_nth_field(rec, offsets,
- trx_id_col, &len);
+ index->db_trx_id(),
+ &len);
ut_ad(len == DATA_TRX_ID_LEN);
ut_ad(src + DATA_TRX_ID_LEN
== rec_get_nth_field(
rec, offsets,
- trx_id_col + 1, &len));
+ index->db_roll_ptr(), &len));
ut_ad(len == DATA_ROLL_PTR_LEN);
/* Log the preceding fields. */
@@ -3808,8 +3761,6 @@ page_zip_write_rec(
} else {
/* Leaf page of a secondary index:
no externally stored columns */
- ut_ad(dict_index_get_sys_col_pos(index, DATA_TRX_ID)
- == ULINT_UNDEFINED);
ut_ad(!rec_offs_any_extern(offsets));
/* Log the entire record. */
@@ -3883,7 +3834,7 @@ page_zip_parse_write_blob_ptr(
|| offset >= srv_page_size
|| z_offset >= srv_page_size) {
corrupt:
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -4025,7 +3976,7 @@ page_zip_parse_write_node_ptr(
|| offset >= srv_page_size
|| z_offset >= srv_page_size) {
corrupt:
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -4240,7 +4191,7 @@ page_zip_parse_write_trx_id(
|| offset >= srv_page_size
|| z_offset >= srv_page_size) {
corrupt:
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -4657,7 +4608,7 @@ page_zip_parse_write_header(
if (len == 0 || offset + len >= PAGE_DATA) {
corrupt:
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -4793,9 +4744,7 @@ page_zip_reorganize(
/* Restore logging. */
mtr_set_log_mode(mtr, log_mode);
- if (!page_zip_compress(page_zip, page, index,
- page_zip_level, NULL, mtr)) {
-
+ if (!page_zip_compress(page_zip, page, index, page_zip_level, mtr)) {
buf_block_free(temp_block);
return(FALSE);
}
@@ -4937,7 +4886,7 @@ byte* page_zip_parse_compress(const byte* ptr, const byte* end_ptr,
if (!page_zip || page_zip_get_size(page_zip) < size
|| block->page.id.page_no() < 3) {
corrupt:
- recv_sys->found_corrupt_log = TRUE;
+ recv_sys.found_corrupt_log = TRUE;
return(NULL);
}
@@ -4976,12 +4925,7 @@ uint32_t
page_zip_calc_checksum(
const void* data,
ulint size,
- srv_checksum_algorithm_t algo
-#ifdef INNODB_BUG_ENDIAN_CRC32
- /** for crc32, use the big-endian bug-compatible crc32 variant */
- , bool use_legacy_big_endian
-#endif
-)
+ srv_checksum_algorithm_t algo)
{
uLong adler;
const Bytef* s = static_cast<const byte*>(data);
@@ -4990,22 +4934,11 @@ page_zip_calc_checksum(
and FIL_PAGE_FILE_FLUSH_LSN from the checksum. */
switch (algo) {
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
ut_ad(size > FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
-#ifdef INNODB_BUG_ENDIAN_CRC32
- if (use_legacy_big_endian) {
- return ut_crc32_legacy_big_endian(s + FIL_PAGE_OFFSET,
- FIL_PAGE_LSN
- - FIL_PAGE_OFFSET)
- ^ ut_crc32_legacy_big_endian(
- s + FIL_PAGE_TYPE, 2)
- ^ ut_crc32_legacy_big_endian(
- s + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID,
- size
- - FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
- }
-#endif
return ut_crc32(s + FIL_PAGE_OFFSET,
FIL_PAGE_LSN - FIL_PAGE_OFFSET)
^ ut_crc32(s + FIL_PAGE_TYPE, 2)
@@ -5088,40 +5021,26 @@ bool page_zip_verify_checksum(const byte *data, size_t size)
}
switch (curr_algo) {
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
-#ifdef INNODB_BUG_ENDIAN_CRC32
- return stored == page_zip_calc_checksum(data, size, curr_algo,
- true);
-#endif
- /* fall through */
case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB:
case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
return FALSE;
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
case SRV_CHECKSUM_ALGORITHM_CRC32:
if (stored == BUF_NO_CHECKSUM_MAGIC) {
return(TRUE);
}
- return
-#ifdef INNODB_BUG_ENDIAN_CRC32
- stored == page_zip_calc_checksum(data, size, curr_algo,
- true) ||
-#endif
- stored == page_zip_calc_checksum(
- data, size, SRV_CHECKSUM_ALGORITHM_INNODB);
+ return stored == page_zip_calc_checksum(
+ data, size, SRV_CHECKSUM_ALGORITHM_INNODB);
case SRV_CHECKSUM_ALGORITHM_INNODB:
if (stored == BUF_NO_CHECKSUM_MAGIC) {
return TRUE;
}
return stored == page_zip_calc_checksum(
- data, size, SRV_CHECKSUM_ALGORITHM_CRC32)
-#ifdef INNODB_BUG_ENDIAN_CRC32
- || stored == page_zip_calc_checksum(
- data, size,
- SRV_CHECKSUM_ALGORITHM_CRC32, true)
-#endif
- ;
+ data, size, SRV_CHECKSUM_ALGORITHM_CRC32);
case SRV_CHECKSUM_ALGORITHM_NONE:
return TRUE;
}
diff --git a/storage/innobase/pars/pars0pars.cc b/storage/innobase/pars/pars0pars.cc
index 7ac42ec8f44..9f1aae9aa07 100644
--- a/storage/innobase/pars/pars0pars.cc
+++ b/storage/innobase/pars/pars0pars.cc
@@ -1987,7 +1987,7 @@ pars_sql(
heap = mem_heap_create(16000);
/* Currently, the parser is not reentrant: */
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
pars_sym_tab_global = sym_tab_create(heap);
diff --git a/storage/innobase/pars/pars0sym.cc b/storage/innobase/pars/pars0sym.cc
index 6e416d7b635..5e4c0e0f6e0 100644
--- a/storage/innobase/pars/pars0sym.cc
+++ b/storage/innobase/pars/pars0sym.cc
@@ -67,7 +67,7 @@ sym_tab_free_private(
sym_node_t* sym;
func_node_t* func;
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_ad(mutex_own(&dict_sys.mutex));
for (sym = UT_LIST_GET_FIRST(sym_tab->sym_list);
sym != NULL;
diff --git a/storage/innobase/que/que0que.cc b/storage/innobase/que/que0que.cc
index 67da45a64e4..e98d50ea0fc 100644
--- a/storage/innobase/que/que0que.cc
+++ b/storage/innobase/que/que0que.cc
@@ -1184,9 +1184,9 @@ que_eval_sql(
/*=========*/
pars_info_t* info, /*!< in: info struct, or NULL */
const char* sql, /*!< in: SQL string */
- ibool reserve_dict_mutex,
- /*!< in: if TRUE, acquire/release
- dict_sys->mutex around call to pars_sql. */
+ bool reserve_dict_mutex,
+ /*!< in: whether to acquire/release
+ dict_sys.mutex around call to pars_sql. */
trx_t* trx) /*!< in: trx */
{
que_thr_t* thr;
@@ -1198,13 +1198,13 @@ que_eval_sql(
ut_a(trx->error_state == DB_SUCCESS);
if (reserve_dict_mutex) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
graph = pars_sql(info, sql);
if (reserve_dict_mutex) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
graph->trx = trx;
@@ -1217,13 +1217,13 @@ que_eval_sql(
que_run_threads(thr);
if (reserve_dict_mutex) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
que_graph_free(graph);
if (reserve_dict_mutex) {
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
DBUG_RETURN(trx->error_state);
diff --git a/storage/innobase/read/read0read.cc b/storage/innobase/read/read0read.cc
index e84e7d33aaf..9ad2eaa1ebe 100644
--- a/storage/innobase/read/read0read.cc
+++ b/storage/innobase/read/read0read.cc
@@ -200,7 +200,7 @@ inline void ReadView::snapshot(trx_t *trx)
void ReadView::open(trx_t *trx)
{
ut_ad(this == &trx->read_view);
- switch (m_state)
+ switch (state())
{
case READ_VIEW_STATE_OPEN:
ut_ad(!srv_read_only_mode);
@@ -254,8 +254,7 @@ void ReadView::open(trx_t *trx)
*/
mutex_enter(&trx_sys.mutex);
mutex_exit(&trx_sys.mutex);
- my_atomic_store32_explicit(&m_state, READ_VIEW_STATE_SNAPSHOT,
- MY_MEMORY_ORDER_RELAXED);
+ m_state.store(READ_VIEW_STATE_SNAPSHOT, std::memory_order_relaxed);
break;
default:
ut_ad(0);
@@ -264,8 +263,7 @@ void ReadView::open(trx_t *trx)
snapshot(trx);
reopen:
m_creator_trx_id= trx->id;
- my_atomic_store32_explicit(&m_state, READ_VIEW_STATE_OPEN,
- MY_MEMORY_ORDER_RELEASE);
+ m_state.store(READ_VIEW_STATE_OPEN, std::memory_order_release);
}
@@ -284,7 +282,7 @@ void trx_sys_t::clone_oldest_view()
for (const trx_t *trx= UT_LIST_GET_FIRST(trx_list); trx;
trx= UT_LIST_GET_NEXT(trx_list, trx))
{
- int32_t state;
+ uint32_t state;
while ((state= trx->read_view.get_state()) == READ_VIEW_STATE_SNAPSHOT)
ut_delay(1);
diff --git a/storage/innobase/rem/rem0cmp.cc b/storage/innobase/rem/rem0cmp.cc
index 35cd24f06d3..e4248ed4ca4 100644
--- a/storage/innobase/rem/rem0cmp.cc
+++ b/storage/innobase/rem/rem0cmp.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2020, MariaDB Corporation.
+Copyright (c) 2020, 2022, 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
@@ -49,49 +49,25 @@ At the present, the comparison functions return 0 in the case,
where two records disagree only in the way that one
has more fields than the other. */
-/** Compare two data fields.
-@param[in] prtype precise type
-@param[in] a data field
-@param[in] a_length length of a, in bytes (not UNIV_SQL_NULL)
-@param[in] b data field
-@param[in] b_length length of b, in bytes (not UNIV_SQL_NULL)
-@return positive, 0, negative, if a is greater, equal, less than b,
-respectively */
-UNIV_INLINE
-int
-innobase_mysql_cmp(
- ulint prtype,
- const byte* a,
- unsigned int a_length,
- const byte* b,
- unsigned int b_length)
+#ifndef DBUG_OFF
+/** @return whether a data type is compatible with strnncoll() functions */
+static bool is_strnncoll_compatible(ulint type)
{
-#ifdef UNIV_DEBUG
- switch (prtype & DATA_MYSQL_TYPE_MASK) {
- case MYSQL_TYPE_BIT:
- case MYSQL_TYPE_STRING:
- case MYSQL_TYPE_VAR_STRING:
- case MYSQL_TYPE_TINY_BLOB:
- case MYSQL_TYPE_MEDIUM_BLOB:
- case MYSQL_TYPE_BLOB:
- case MYSQL_TYPE_LONG_BLOB:
- case MYSQL_TYPE_VARCHAR:
- break;
- default:
- ut_error;
- }
-#endif /* UNIV_DEBUG */
-
- uint cs_num = (uint) dtype_get_charset_coll(prtype);
-
- if (CHARSET_INFO* cs = get_charset(cs_num, MYF(MY_WME))) {
- return(cs->coll->strnncollsp(
- cs, a, a_length, b, b_length));
- }
-
- ib::fatal() << "Unable to find charset-collation " << cs_num;
- return(0);
+ switch (type) {
+ case MYSQL_TYPE_BIT:
+ case MYSQL_TYPE_STRING:
+ case MYSQL_TYPE_VAR_STRING:
+ case MYSQL_TYPE_TINY_BLOB:
+ case MYSQL_TYPE_MEDIUM_BLOB:
+ case MYSQL_TYPE_BLOB:
+ case MYSQL_TYPE_LONG_BLOB:
+ case MYSQL_TYPE_VARCHAR:
+ return true;
+ default:
+ return false;
+ }
}
+#endif /* DBUG_OFF */
/*************************************************************//**
Returns TRUE if two columns are equal for comparison purposes.
@@ -224,7 +200,6 @@ static
int
cmp_geometry_field(
/*===============*/
- ulint prtype, /*!< in: precise type */
const byte* a, /*!< in: data field */
unsigned int a_length, /*!< in: data field length,
not UNIV_SQL_NULL */
@@ -235,8 +210,6 @@ cmp_geometry_field(
double x1, x2;
double y1, y2;
- ut_ad(prtype & DATA_GIS_MBR);
-
if (a_length < sizeof(double) || b_length < sizeof(double)) {
return(0);
}
@@ -297,8 +270,7 @@ cmp_gis_field(
not UNIV_SQL_NULL */
{
if (mode == PAGE_CUR_MBR_EQUAL) {
- return cmp_geometry_field(DATA_GIS_MBR,
- a, a_length, b, b_length);
+ return cmp_geometry_field(a, a_length, b, b_length);
} else {
return rtree_key_cmp(mode, a, int(a_length), b, int(b_length));
}
@@ -313,70 +285,52 @@ cmp_gis_field(
@param[in] b_length length of b, in bytes (not UNIV_SQL_NULL)
@return positive, 0, negative, if a is greater, equal, less than b,
respectively */
-static
-int
-cmp_whole_field(
- ulint mtype,
- ulint prtype,
- const byte* a,
- unsigned int a_length,
- const byte* b,
- unsigned int b_length)
+static int cmp_whole_field(ulint mtype, ulint prtype,
+ const byte *a, unsigned a_length,
+ const byte *b, unsigned b_length)
{
- float f_1;
- float f_2;
- double d_1;
- double d_2;
-
- switch (mtype) {
- case DATA_DECIMAL:
- return(cmp_decimal(a, a_length, b, b_length));
- case DATA_DOUBLE:
- d_1 = mach_double_read(a);
- d_2 = mach_double_read(b);
-
- if (d_1 > d_2) {
- return(1);
- } else if (d_2 > d_1) {
- return(-1);
- }
-
- return(0);
-
- case DATA_FLOAT:
- f_1 = mach_float_read(a);
- f_2 = mach_float_read(b);
-
- if (f_1 > f_2) {
- return(1);
- } else if (f_2 > f_1) {
- return(-1);
- }
-
- return(0);
- case DATA_VARCHAR:
- case DATA_CHAR:
- return(my_charset_latin1.coll->strnncollsp(
- &my_charset_latin1,
- a, a_length, b, b_length));
- case DATA_BLOB:
- if (prtype & DATA_BINARY_TYPE) {
- ib::error() << "Comparing a binary BLOB"
- " using a character set collation!";
- ut_ad(0);
- }
- /* fall through */
- case DATA_VARMYSQL:
- case DATA_MYSQL:
- return(innobase_mysql_cmp(prtype,
- a, a_length, b, b_length));
- case DATA_GEOMETRY:
- return cmp_geometry_field(prtype, a, a_length, b, b_length);
- default:
- ib::fatal() << "Unknown data type number " << mtype;
- }
-
- return(0);
+ switch (mtype) {
+ default:
+ ib::fatal() << "Unknown data type number " << mtype;
+ return 0;
+ case DATA_DECIMAL:
+ return cmp_decimal(a, a_length, b, b_length);
+ case DATA_DOUBLE:
+ {
+ const double af= mach_double_read(a), bf= mach_double_read(b);
+ return af > bf ? 1 : bf > af ? -1 : 0;
+ }
+ case DATA_FLOAT:
+ {
+ const float af= mach_float_read(a), bf= mach_float_read(b);
+ return af > bf ? 1 : bf > af ? -1 : 0;
+ }
+ case DATA_VARCHAR:
+ case DATA_CHAR:
+ /* latin1_swedish_ci is treated as a special case in InnoDB.
+ Because it is a fixed-length encoding (mbminlen=mbmaxlen=1),
+ non-NULL CHAR(n) values will always occupy n bytes and we
+ can invoke strnncollsp() instead of strnncollsp_nchars(). */
+ return my_charset_latin1.coll->strnncollsp(&my_charset_latin1,
+ a, a_length, b, b_length);
+ case DATA_BLOB:
+ ut_ad(!(prtype & DATA_BINARY_TYPE)); /* our only caller tested this */
+ /* fall through */
+ case DATA_VARMYSQL:
+ DBUG_ASSERT(is_strnncoll_compatible(prtype & DATA_MYSQL_TYPE_MASK));
+ if (CHARSET_INFO *cs= get_charset(dtype_get_charset_coll(prtype),
+ MYF(MY_WME)))
+ return cs->coll->strnncollsp(cs, a, a_length, b, b_length);
+ break;
+ case DATA_MYSQL:
+ DBUG_ASSERT(is_strnncoll_compatible(prtype & DATA_MYSQL_TYPE_MASK));
+ if (CHARSET_INFO *cs= get_charset(dtype_get_charset_coll(prtype),
+ MYF(MY_WME)))
+ return cs->coll->strnncollsp_nchars(cs, a, a_length, b, b_length,
+ std::max(a_length, b_length));
+ }
+
+ ib::fatal() << "Unable to find charset-collation for " << prtype;
}
/** Compare two data fields.
@@ -433,9 +387,8 @@ cmp_data(
ut_ad(prtype & DATA_BINARY_TYPE);
pad = ULINT_UNDEFINED;
if (prtype & DATA_GIS_MBR) {
- return(cmp_whole_field(mtype, prtype,
- data1, (unsigned) len1,
- data2, (unsigned) len2));
+ return(cmp_geometry_field(data1, (unsigned) len1,
+ data2, (unsigned) len2));
}
break;
case DATA_BLOB:
@@ -798,7 +751,7 @@ cmp_dtuple_rec_with_match_bytes(
& rec_get_info_bits(rec, rec_offs_comp(offsets)))) {
ut_ad(page_rec_is_first(rec, page_align(rec)));
ut_ad(!page_has_prev(page_align(rec)));
- ut_ad(rec_is_metadata(rec, index));
+ ut_ad(rec_is_metadata(rec, *index));
return 1;
}
diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc
index 221e1f46b4f..08682304410 100644
--- a/storage/innobase/rem/rem0rec.cc
+++ b/storage/innobase/rem/rem0rec.cc
@@ -170,7 +170,7 @@ rec_get_n_extern_new(
ut_ad(!index->table->supports_instant() || index->is_dummy);
ut_ad(!index->is_instant());
ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY
- || rec_get_status(rec) == REC_STATUS_COLUMNS_ADDED);
+ || rec_get_status(rec) == REC_STATUS_INSTANT);
ut_ad(n == ULINT_UNDEFINED || n <= dict_index_get_n_fields(index));
if (n == ULINT_UNDEFINED) {
@@ -232,40 +232,24 @@ rec_get_n_extern_new(
return(n_extern);
}
-/** Get the added field count in a REC_STATUS_COLUMNS_ADDED record.
-@param[in,out] header variable header of a REC_STATUS_COLUMNS_ADDED record
-@return number of added fields */
-static inline unsigned rec_get_n_add_field(const byte*& header)
-{
- unsigned n_fields_add = *--header;
- if (n_fields_add < 0x80) {
- ut_ad(rec_get_n_add_field_len(n_fields_add) == 1);
- return n_fields_add;
- }
-
- n_fields_add &= 0x7f;
- n_fields_add |= unsigned(*--header) << 7;
- ut_ad(n_fields_add < REC_MAX_N_FIELDS);
- ut_ad(rec_get_n_add_field_len(n_fields_add) == 2);
- return n_fields_add;
-}
-
/** Format of a leaf-page ROW_FORMAT!=REDUNDANT record */
enum rec_leaf_format {
/** Temporary file record */
REC_LEAF_TEMP,
- /** Temporary file record, with added columns
- (REC_STATUS_COLUMNS_ADDED) */
- REC_LEAF_TEMP_COLUMNS_ADDED,
+ /** Temporary file record, with added columns (REC_STATUS_INSTANT) */
+ REC_LEAF_TEMP_INSTANT,
/** Normal (REC_STATUS_ORDINARY) */
REC_LEAF_ORDINARY,
- /** With added columns (REC_STATUS_COLUMNS_ADDED) */
- REC_LEAF_COLUMNS_ADDED
+ /** With add or drop columns (REC_STATUS_INSTANT) */
+ REC_LEAF_INSTANT
};
/** Determine the offset to each field in a leaf-page record
in ROW_FORMAT=COMPACT,DYNAMIC,COMPRESSED.
This is a special case of rec_init_offsets() and rec_get_offsets_func().
+@tparam mblob whether the record includes a metadata BLOB
+@tparam redundant_temp whether the record belongs to a temporary file
+ of a ROW_FORMAT=REDUNDANT table
@param[in] rec leaf-page record
@param[in] index the index that the record belongs in
@param[in] n_core number of core fields (index->n_core_fields)
@@ -273,6 +257,7 @@ This is a special case of rec_init_offsets() and rec_get_offsets_func().
NULL to refer to index->fields[].col->def_val
@param[in,out] offsets offsets, with valid rec_offs_n_fields(offsets)
@param[in] format record format */
+template<bool mblob = false, bool redundant_temp = false>
static inline
void
rec_init_offsets_comp_ordinary(
@@ -294,16 +279,38 @@ rec_init_offsets_comp_ordinary(
ut_ad(index->n_core_fields >= n_core);
ut_ad(index->n_fields >= index->n_core_fields);
ut_ad(index->n_core_null_bytes <= UT_BITS_IN_BYTES(index->n_nullable));
- ut_ad(format == REC_LEAF_TEMP || format == REC_LEAF_TEMP_COLUMNS_ADDED
+ ut_ad(format == REC_LEAF_TEMP || format == REC_LEAF_TEMP_INSTANT
|| dict_table_is_comp(index->table));
- ut_ad(format != REC_LEAF_TEMP_COLUMNS_ADDED
+ ut_ad(format != REC_LEAF_TEMP_INSTANT
|| index->n_fields == rec_offs_n_fields(offsets));
ut_d(ulint n_null= 0);
const unsigned n_core_null_bytes = UNIV_UNLIKELY(index->n_core_fields
- != n_core)
+ != n_core)
? UT_BITS_IN_BYTES(unsigned(index->get_n_nullable(n_core)))
- : index->n_core_null_bytes;
+ : (redundant_temp
+ ? UT_BITS_IN_BYTES(index->n_nullable)
+ : index->n_core_null_bytes);
+
+ if (mblob) {
+ ut_ad(index->is_dummy || index->table->instant);
+ ut_ad(index->is_dummy || index->is_instant());
+ ut_ad(rec_offs_n_fields(offsets)
+ <= ulint(index->n_fields) + 1);
+ ut_ad(!def_val);
+ ut_ad(format == REC_LEAF_INSTANT);
+ nulls -= REC_N_NEW_EXTRA_BYTES;
+ n_fields = n_core + 1 + rec_get_n_add_field(nulls);
+ ut_ad(n_fields <= ulint(index->n_fields) + 1);
+ const ulint n_nullable = index->get_n_nullable(n_fields - 1);
+ const ulint n_null_bytes = UT_BITS_IN_BYTES(n_nullable);
+ ut_d(n_null = n_nullable);
+ ut_ad(n_null <= index->n_nullable);
+ ut_ad(n_null_bytes >= n_core_null_bytes
+ || n_core < index->n_core_fields);
+ lens = --nulls - n_null_bytes;
+ goto start;
+ }
switch (format) {
case REC_LEAF_TEMP:
@@ -318,17 +325,15 @@ rec_init_offsets_comp_ordinary(
ordinary:
lens = --nulls - n_core_null_bytes;
- ut_d(n_null = std::min(n_core_null_bytes * 8U,
- index->n_nullable));
+ ut_d(n_null = std::min<uint>(n_core_null_bytes * 8U,
+ index->n_nullable));
break;
- case REC_LEAF_COLUMNS_ADDED:
- /* We would have !index->is_instant() when rolling back
- an instant ADD COLUMN operation. */
+ case REC_LEAF_INSTANT:
nulls -= REC_N_NEW_EXTRA_BYTES;
ut_ad(index->is_instant());
/* fall through */
- case REC_LEAF_TEMP_COLUMNS_ADDED:
- n_fields = n_core + 1 + rec_get_n_add_field(nulls);
+ case REC_LEAF_TEMP_INSTANT:
+ n_fields = n_core + rec_get_n_add_field(nulls) + 1;
ut_ad(n_fields <= index->n_fields);
const ulint n_nullable = index->get_n_nullable(n_fields);
const ulint n_null_bytes = UT_BITS_IN_BYTES(n_nullable);
@@ -339,6 +344,7 @@ ordinary:
lens = --nulls - n_null_bytes;
}
+start:
#ifdef UNIV_DEBUG
/* We cannot invoke rec_offs_make_valid() if format==REC_LEAF_TEMP.
Similarly, rec_offs_validate() will fail in that case, because
@@ -348,17 +354,26 @@ ordinary:
#endif /* UNIV_DEBUG */
/* read the lengths of fields 0..n_fields */
+ rec_offs len;
ulint i = 0;
- do {
- const dict_field_t* field
- = dict_index_get_nth_field(index, i);
- const dict_col_t* col
- = dict_field_get_col(field);
- rec_offs len;
+ const dict_field_t* field = index->fields;
- /* set default value flag */
- if (i < n_fields) {
- } else if (def_val) {
+ do {
+ if (mblob) {
+ if (i == index->first_user_field()) {
+ offs += FIELD_REF_SIZE;
+ len = combine(offs, STORED_OFFPAGE);
+ any |= REC_OFFS_EXTERNAL;
+ field--;
+ continue;
+ } else if (i >= n_fields) {
+ len = combine(offs, DEFAULT);
+ any |= REC_OFFS_DEFAULT;
+ continue;
+ }
+ } else if (i < n_fields) {
+ /* The field is present, and will be covered below. */
+ } else if (!mblob && def_val) {
const dict_col_t::def_t& d = def_val[i - n_core];
if (!d.data) {
len = combine(offs, SQL_NULL);
@@ -368,7 +383,7 @@ ordinary:
any |= REC_OFFS_DEFAULT;
}
- goto resolved;
+ continue;
} else {
ulint dlen;
if (!index->instant_field_value(i, &dlen)) {
@@ -379,10 +394,12 @@ ordinary:
any |= REC_OFFS_DEFAULT;
}
- goto resolved;
+ continue;
}
- if (!(col->prtype & DATA_NOT_NULL)) {
+ const dict_col_t* col = field->col;
+
+ if (col->is_nullable()) {
/* nullable field => read the null flag */
ut_ad(n_null--);
@@ -398,7 +415,7 @@ ordinary:
the length to zero and enable the
SQL NULL flag in offsets[]. */
len = combine(offs, SQL_NULL);
- goto resolved;
+ continue;
}
null_mask <<= 1;
}
@@ -429,16 +446,15 @@ ordinary:
len = offs;
}
- goto resolved;
+ continue;
}
len = offs += len;
} else {
len = offs += field->fixed_len;
}
-resolved:
- rec_offs_base(offsets)[i + 1] = len;
- } while (++i < rec_offs_n_fields(offsets));
+ } while (field++, rec_offs_base(offsets)[++i] = len,
+ i < rec_offs_n_fields(offsets));
*rec_offs_base(offsets)
= static_cast<rec_offs>(rec - (lens + 1)) | REC_OFFS_COMPACT | any;
@@ -457,7 +473,10 @@ rec_offs_make_valid(
bool leaf,
rec_offs* offsets)
{
- ut_ad(rec_offs_n_fields(offsets)
+ const bool is_alter_metadata = leaf
+ && rec_is_alter_metadata(rec, *index);
+ ut_ad(is_alter_metadata
+ || rec_offs_n_fields(offsets)
<= (leaf
? dict_index_get_n_fields(index)
: dict_index_get_n_unique_in_tree_nonleaf(index) + 1)
@@ -475,7 +494,8 @@ rec_offs_make_valid(
|| n >= rec_offs_n_fields(offsets));
for (; n < rec_offs_n_fields(offsets); n++) {
ut_ad(leaf);
- ut_ad(get_type(rec_offs_base(offsets)[1 + n]) == DEFAULT);
+ ut_ad(is_alter_metadata
+ || get_type(rec_offs_base(offsets)[1 + n]) == DEFAULT);
}
memcpy(&offsets[RECORD_OFFSET], &rec, sizeof(rec));
memcpy(&offsets[INDEX_OFFSET], &index, sizeof(index));
@@ -515,14 +535,18 @@ rec_offs_validate(
}
}
if (index) {
- ulint max_n_fields;
ut_ad(!memcmp(&index, &offsets[INDEX_OFFSET], sizeof(index)));
- max_n_fields = ut_max(
+ ulint max_n_fields = std::max(
dict_index_get_n_fields(index),
dict_index_get_n_unique_in_tree(index) + 1);
if (comp && rec) {
switch (rec_get_status(rec)) {
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
+ ut_ad(index->is_instant() || index->is_dummy);
+ ut_ad(max_n_fields == index->n_fields);
+ max_n_fields += index->table->instant
+ || index->is_dummy;
+ break;
case REC_STATUS_ORDINARY:
break;
case REC_STATUS_NODE_PTR:
@@ -536,14 +560,19 @@ rec_offs_validate(
default:
ut_error;
}
+ } else if (max_n_fields == index->n_fields
+ && (index->is_dummy
+ || (index->is_instant()
+ && index->table->instant))) {
+ max_n_fields++;
}
/* index->n_def == 0 for dummy indexes if !comp */
- ut_a(!comp || index->n_def);
- ut_a(!index->n_def || i <= max_n_fields);
+ ut_ad(!comp || index->n_def);
+ ut_ad(!index->n_def || i <= max_n_fields);
}
while (i--) {
ulint curr = get_value(rec_offs_base(offsets)[1 + i]);
- ut_a(curr <= last);
+ ut_ad(curr <= last);
last = curr;
}
return(TRUE);
@@ -577,7 +606,13 @@ rec_init_offsets(
ulint i = 0;
rec_offs offs;
- ut_ad(index->n_core_null_bytes <= UT_BITS_IN_BYTES(index->n_nullable));
+ /* This assertion was relaxed for the btr_cur_open_at_index_side()
+ call in btr_cur_instant_init_low(). We cannot invoke
+ index->is_instant(), because the same assertion would fail there
+ until btr_cur_instant_init_low() has invoked
+ dict_table_t::deserialise_columns(). */
+ ut_ad(index->n_core_null_bytes <= UT_BITS_IN_BYTES(index->n_nullable)
+ || index->in_instant_init);
ut_d(memcpy(&offsets[RECORD_OFFSET], &rec, sizeof(rec)));
ut_d(memcpy(&offsets[INDEX_OFFSET], &index, sizeof(index)));
ut_ad(index->n_fields >= n_core);
@@ -605,12 +640,12 @@ rec_init_offsets(
= dict_index_get_n_unique_in_tree_nonleaf(
index);
break;
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
ut_ad(index->is_instant());
rec_init_offsets_comp_ordinary(rec, index, offsets,
n_core,
NULL,
- REC_LEAF_COLUMNS_ADDED);
+ REC_LEAF_INSTANT);
return;
case REC_STATUS_ORDINARY:
rec_init_offsets_comp_ordinary(rec, index, offsets,
@@ -791,17 +826,26 @@ rec_get_offsets_func(
{
ulint n;
ulint size;
+ bool alter_metadata = false;
ut_ad(index->n_core_fields >= n_core);
- ut_ad(index->n_fields >= index->n_core_fields);
+ /* This assertion was relaxed for the btr_cur_open_at_index_side()
+ call in btr_cur_instant_init_low(). We cannot invoke
+ index->is_instant(), because the same assertion would fail there
+ until btr_cur_instant_init_low() has invoked
+ dict_table_t::deserialise_columns(). */
+ ut_ad(index->n_fields >= index->n_core_fields
+ || index->in_instant_init);
if (dict_table_is_comp(index->table)) {
switch (UNIV_EXPECT(rec_get_status(rec),
REC_STATUS_ORDINARY)) {
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
+ alter_metadata = rec_is_alter_metadata(rec, true);
+ /* fall through */
case REC_STATUS_ORDINARY:
ut_ad(n_core);
- n = dict_index_get_n_fields(index);
+ n = dict_index_get_n_fields(index) + alter_metadata;
break;
case REC_STATUS_NODE_PTR:
/* Node pointer records consist of the
@@ -845,7 +889,8 @@ rec_get_offsets_func(
|| dict_index_is_ibuf(index)
|| n == n_fields /* btr_pcur_restore_position() */
|| (n + (index->id == DICT_INDEXES_ID)
- >= n_core && n <= index->n_fields));
+ >= n_core && n <= index->n_fields
+ + unsigned(rec_is_alter_metadata(rec, false))));
if (is_user_rec && n_core && n < index->n_fields) {
ut_ad(!index->is_dummy);
@@ -875,8 +920,25 @@ rec_get_offsets_func(
}
rec_offs_set_n_fields(offsets, n);
- rec_init_offsets(rec, index, n_core, offsets);
- return(offsets);
+
+ if (UNIV_UNLIKELY(alter_metadata) && index->table->not_redundant()) {
+#ifdef UNIV_DEBUG
+ memcpy(&offsets[RECORD_OFFSET], &rec, sizeof rec);
+ memcpy(&offsets[INDEX_OFFSET], &index, sizeof index);
+#endif /* UNIV_DEBUG */
+ ut_ad(n_core);
+ ut_ad(index->is_dummy || index->table->instant);
+ ut_ad(index->is_dummy || index->is_instant());
+ ut_ad(rec_offs_n_fields(offsets)
+ <= ulint(index->n_fields) + 1);
+ rec_init_offsets_comp_ordinary<true>(rec, index, offsets,
+ index->n_core_fields,
+ nullptr,
+ REC_LEAF_INSTANT);
+ } else {
+ rec_init_offsets(rec, index, n_core, offsets);
+ }
+ return offsets;
}
/******************************************************//**
@@ -1050,40 +1112,48 @@ rec_get_nth_field_offs_old(
return(os);
}
-/**********************************************************//**
-Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
+/** Determine the size of a data tuple prefix in ROW_FORMAT=COMPACT.
+@tparam mblob whether the record includes a metadata BLOB
+@tparam redundant_temp whether to use the ROW_FORMAT=REDUNDANT format
+@param[in] index record descriptor; dict_table_is_comp()
+ is assumed to hold, even if it doesn't
+@param[in] dfield array of data fields
+@param[in] n_fields number of data fields
+@param[out] extra extra size
+@param[in] status status flags
+@param[in] temp whether this is a temporary file record
@return total size */
-template<bool redundant_temp>
-MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)))
+template<bool mblob = false, bool redundant_temp = false>
static inline
ulint
rec_get_converted_size_comp_prefix_low(
-/*===================================*/
- const dict_index_t* index, /*!< in: record descriptor;
- dict_table_is_comp() is
- assumed to hold, even if
- it does not */
- const dfield_t* fields, /*!< in: array of data fields */
- ulint n_fields,/*!< in: number of data fields */
- ulint* extra, /*!< out: extra size */
- rec_comp_status_t status, /*!< in: status flags */
- bool temp) /*!< in: whether this is a
- temporary file record */
+ const dict_index_t* index,
+ const dfield_t* dfield,
+ ulint n_fields,
+ ulint* extra,
+ rec_comp_status_t status,
+ bool temp)
{
ulint extra_size = temp ? 0 : REC_N_NEW_EXTRA_BYTES;
- ulint data_size;
- ulint i;
ut_ad(n_fields > 0);
- ut_ad(n_fields <= dict_index_get_n_fields(index));
+ ut_ad(n_fields <= dict_index_get_n_fields(index) + mblob);
ut_d(ulint n_null = index->n_nullable);
ut_ad(status == REC_STATUS_ORDINARY || status == REC_STATUS_NODE_PTR
- || status == REC_STATUS_COLUMNS_ADDED);
+ || status == REC_STATUS_INSTANT);
unsigned n_core_fields = redundant_temp
? row_log_get_n_core_fields(index)
: index->n_core_fields;
- if (status == REC_STATUS_COLUMNS_ADDED
- && (!temp || n_fields > n_core_fields)) {
+ if (mblob) {
+ ut_ad(index->table->instant);
+ ut_ad(!redundant_temp && index->is_instant());
+ ut_ad(status == REC_STATUS_INSTANT);
+ ut_ad(n_fields == ulint(index->n_fields) + 1);
+ extra_size += UT_BITS_IN_BYTES(index->n_nullable)
+ + rec_get_n_add_field_len(n_fields - 1
+ - n_core_fields);
+ } else if (status == REC_STATUS_INSTANT
+ && (!temp || n_fields > n_core_fields)) {
if (!redundant_temp) { ut_ad(index->is_instant()); }
ut_ad(UT_BITS_IN_BYTES(n_null) >= index->n_core_null_bytes);
extra_size += UT_BITS_IN_BYTES(index->get_n_nullable(n_fields))
@@ -1091,10 +1161,12 @@ rec_get_converted_size_comp_prefix_low(
- n_core_fields);
} else {
ut_ad(n_fields <= n_core_fields);
- extra_size += index->n_core_null_bytes;
+ extra_size += redundant_temp
+ ? UT_BITS_IN_BYTES(index->n_nullable)
+ : index->n_core_null_bytes;
}
- data_size = 0;
+ ulint data_size = 0;
if (temp && dict_table_is_comp(index->table)) {
/* No need to do adjust fixed_len=0. We only need to
@@ -1102,46 +1174,53 @@ rec_get_converted_size_comp_prefix_low(
temp = false;
}
+ const dfield_t* const end = dfield + n_fields;
/* read the lengths of fields 0..n */
- for (i = 0; i < n_fields; i++) {
- const dict_field_t* field;
- ulint len;
- ulint fixed_len;
- const dict_col_t* col;
+ for (ulint i = 0; dfield < end; i++, dfield++) {
+ if (mblob && i == index->first_user_field()) {
+ data_size += FIELD_REF_SIZE;
+ if (++dfield == end) {
+ ut_ad(i == index->n_fields);
+ break;
+ }
+ }
- field = dict_index_get_nth_field(index, i);
- len = dfield_get_len(&fields[i]);
- col = dict_field_get_col(field);
+ ulint len = dfield_get_len(dfield);
+ const dict_field_t* field = dict_index_get_nth_field(index, i);
#ifdef UNIV_DEBUG
- const dtype_t* type = dfield_get_type(&fields[i]);
if (dict_index_is_spatial(index)) {
- if (DATA_GEOMETRY_MTYPE(col->mtype) && i == 0) {
- ut_ad(type->prtype & DATA_GIS_MBR);
+ if (DATA_GEOMETRY_MTYPE(field->col->mtype) && i == 0) {
+ ut_ad(dfield->type.prtype & DATA_GIS_MBR);
} else {
- ut_ad(type->mtype == DATA_SYS_CHILD
- || dict_col_type_assert_equal(col, type));
+ ut_ad(dfield->type.mtype == DATA_SYS_CHILD
+ || dict_col_type_assert_equal(
+ field->col, &dfield->type));
}
} else {
- ut_ad(dict_col_type_assert_equal(col, type));
+ ut_ad(field->col->is_dropped()
+ || dict_col_type_assert_equal(field->col,
+ &dfield->type));
}
#endif
/* All NULLable fields must be included in the n_null count. */
- ut_ad((col->prtype & DATA_NOT_NULL) || n_null--);
+ ut_ad(!field->col->is_nullable() || n_null--);
- if (dfield_is_null(&fields[i])) {
+ if (dfield_is_null(dfield)) {
/* No length is stored for NULL fields. */
- ut_ad(!(col->prtype & DATA_NOT_NULL));
+ ut_ad(field->col->is_nullable());
continue;
}
- ut_ad(len <= col->len || DATA_LARGE_MTYPE(col->mtype)
- || (col->len == 0 && col->mtype == DATA_VARCHAR));
+ ut_ad(len <= field->col->len
+ || DATA_LARGE_MTYPE(field->col->mtype)
+ || (field->col->len == 0
+ && field->col->mtype == DATA_VARCHAR));
- fixed_len = field->fixed_len;
+ ulint fixed_len = field->fixed_len;
if (temp && fixed_len
- && !dict_col_get_fixed_size(col, temp)) {
+ && !dict_col_get_fixed_size(field->col, temp)) {
fixed_len = 0;
}
/* If the maximum length of a variable-length field
@@ -1156,25 +1235,27 @@ rec_get_converted_size_comp_prefix_low(
ut_ad(len <= fixed_len);
if (dict_index_is_spatial(index)) {
- ut_ad(type->mtype == DATA_SYS_CHILD
- || !col->mbmaxlen
- || len >= col->mbminlen
- * fixed_len / col->mbmaxlen);
+ ut_ad(dfield->type.mtype == DATA_SYS_CHILD
+ || !field->col->mbmaxlen
+ || len >= field->col->mbminlen
+ * fixed_len / field->col->mbmaxlen);
} else {
- ut_ad(type->mtype != DATA_SYS_CHILD);
- ut_ad(!col->mbmaxlen
- || len >= col->mbminlen
- * fixed_len / col->mbmaxlen);
+ ut_ad(dfield->type.mtype != DATA_SYS_CHILD);
+
+ ut_ad(field->col->is_dropped()
+ || !field->col->mbmaxlen
+ || len >= field->col->mbminlen
+ * fixed_len / field->col->mbmaxlen);
}
/* dict_index_add_col() should guarantee this */
ut_ad(!field->prefix_len
|| fixed_len == field->prefix_len);
#endif /* UNIV_DEBUG */
- } else if (dfield_is_ext(&fields[i])) {
- ut_ad(DATA_BIG_COL(col));
+ } else if (dfield_is_ext(dfield)) {
+ ut_ad(DATA_BIG_COL(field->col));
extra_size += 2;
- } else if (len < 128 || !DATA_BIG_COL(col)) {
+ } else if (len < 128 || !DATA_BIG_COL(field->col)) {
extra_size++;
} else {
/* For variable-length columns, we look up the
@@ -1205,48 +1286,56 @@ rec_get_converted_size_comp_prefix(
ulint* extra) /*!< out: extra size */
{
ut_ad(dict_table_is_comp(index->table));
- return(rec_get_converted_size_comp_prefix_low<false>(
+ return(rec_get_converted_size_comp_prefix_low(
index, fields, n_fields, extra,
REC_STATUS_ORDINARY, false));
}
-/**********************************************************//**
-Determines the size of a data tuple in ROW_FORMAT=COMPACT.
+/** Determine the size of a record in ROW_FORMAT=COMPACT.
+@param[in] index record descriptor. dict_table_is_comp()
+ is assumed to hold, even if it doesn't
+@param[in] tuple logical record
+@param[out] extra extra size
@return total size */
ulint
rec_get_converted_size_comp(
-/*========================*/
- const dict_index_t* index, /*!< in: record descriptor;
- dict_table_is_comp() is
- assumed to hold, even if
- it does not */
- rec_comp_status_t status, /*!< in: status bits of the record */
- const dfield_t* fields, /*!< in: array of data fields */
- ulint n_fields,/*!< in: number of data fields */
- ulint* extra) /*!< out: extra size */
+ const dict_index_t* index,
+ const dtuple_t* tuple,
+ ulint* extra)
{
- ut_ad(n_fields > 0);
+ ut_ad(tuple->n_fields > 0);
+
+ rec_comp_status_t status = rec_comp_status_t(tuple->info_bits
+ & REC_NEW_STATUS_MASK);
switch (UNIV_EXPECT(status, REC_STATUS_ORDINARY)) {
case REC_STATUS_ORDINARY:
- if (n_fields > index->n_core_fields) {
+ ut_ad(!tuple->is_metadata());
+ if (tuple->n_fields > index->n_core_fields) {
ut_ad(index->is_instant());
- status = REC_STATUS_COLUMNS_ADDED;
+ status = REC_STATUS_INSTANT;
}
/* fall through */
- case REC_STATUS_COLUMNS_ADDED:
- ut_ad(n_fields >= index->n_core_fields);
- ut_ad(n_fields <= index->n_fields);
- return rec_get_converted_size_comp_prefix_low<false>(
- index, fields, n_fields, extra, status, false);
+ case REC_STATUS_INSTANT:
+ ut_ad(tuple->n_fields >= index->n_core_fields);
+ if (tuple->is_alter_metadata()) {
+ return rec_get_converted_size_comp_prefix_low<true>(
+ index, tuple->fields, tuple->n_fields,
+ extra, status, false);
+ }
+ ut_ad(tuple->n_fields <= index->n_fields);
+ return rec_get_converted_size_comp_prefix_low(
+ index, tuple->fields, tuple->n_fields,
+ extra, status, false);
case REC_STATUS_NODE_PTR:
- n_fields--;
- ut_ad(n_fields == dict_index_get_n_unique_in_tree_nonleaf(
- index));
- ut_ad(dfield_get_len(&fields[n_fields]) == REC_NODE_PTR_SIZE);
+ ut_ad(tuple->n_fields - 1
+ == dict_index_get_n_unique_in_tree_nonleaf(index));
+ ut_ad(dfield_get_len(&tuple->fields[tuple->n_fields - 1])
+ == REC_NODE_PTR_SIZE);
return REC_NODE_PTR_SIZE /* child page number */
- + rec_get_converted_size_comp_prefix_low<false>(
- index, fields, n_fields, extra, status, false);
+ + rec_get_converted_size_comp_prefix_low(
+ index, tuple->fields, tuple->n_fields - 1,
+ extra, status, false);
case REC_STATUS_INFIMUM:
case REC_STATUS_SUPREMUM:
/* not supported */
@@ -1377,8 +1466,9 @@ rec_convert_dtuple_to_rec_old(
/* If the data is not SQL null, store it */
len = dfield_get_len(field);
- memcpy(rec + end_offset,
- dfield_get_data(field), len);
+ if (len)
+ memcpy(rec + end_offset,
+ dfield_get_data(field), len);
end_offset += len;
ored_offset = end_offset;
@@ -1405,8 +1495,9 @@ rec_convert_dtuple_to_rec_old(
/* If the data is not SQL null, store it */
len = dfield_get_len(field);
- memcpy(rec + end_offset,
- dfield_get_data(field), len);
+ if (len)
+ memcpy(rec + end_offset,
+ dfield_get_data(field), len);
end_offset += len;
ored_offset = end_offset;
@@ -1424,34 +1515,31 @@ rec_convert_dtuple_to_rec_old(
}
/** Convert a data tuple into a ROW_FORMAT=COMPACT record.
+@tparam mblob whether the record includes a metadata BLOB
+@tparam redundant_temp whether to use the ROW_FORMAT=REDUNDANT format
@param[out] rec converted record
@param[in] index index
-@param[in] fields data fields to convert
+@param[in] field data fields to convert
@param[in] n_fields number of data fields
@param[in] status rec_get_status(rec)
@param[in] temp whether to use the format for temporary files
in index creation */
-template<bool redundant_temp>
+template<bool mblob = false, bool redundant_temp = false>
static inline
void
rec_convert_dtuple_to_rec_comp(
rec_t* rec,
const dict_index_t* index,
- const dfield_t* fields,
+ const dfield_t* field,
ulint n_fields,
rec_comp_status_t status,
bool temp)
{
- const dfield_t* field;
- const dtype_t* type;
byte* end;
byte* nulls = temp
? rec - 1 : rec - (REC_N_NEW_EXTRA_BYTES + 1);
byte* UNINIT_VAR(lens);
- ulint len;
- ulint i;
ulint UNINIT_VAR(n_node_ptr_field);
- ulint fixed_len;
ulint null_mask = 1;
const ulint n_core_fields = redundant_temp
? row_log_get_n_core_fields(index)
@@ -1462,8 +1550,21 @@ rec_convert_dtuple_to_rec_comp(
ut_d(ulint n_null = index->n_nullable);
+ if (mblob) {
+ ut_ad(!temp);
+ ut_ad(index->table->instant);
+ ut_ad(!redundant_temp && index->is_instant());
+ ut_ad(status == REC_STATUS_INSTANT);
+ ut_ad(n_fields == ulint(index->n_fields) + 1);
+ rec_set_n_add_field(nulls, n_fields - 1 - n_core_fields);
+ rec_set_heap_no_new(rec, PAGE_HEAP_NO_USER_LOW);
+ rec_set_status(rec, REC_STATUS_INSTANT);
+ n_node_ptr_field = ULINT_UNDEFINED;
+ lens = nulls - UT_BITS_IN_BYTES(index->n_nullable);
+ goto start;
+ }
switch (status) {
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
if (!redundant_temp) { ut_ad(index->is_instant()); }
ut_ad(n_fields > n_core_fields);
rec_set_n_add_field(nulls, n_fields - 1 - n_core_fields);
@@ -1474,17 +1575,20 @@ rec_convert_dtuple_to_rec_comp(
rec_set_heap_no_new(rec, PAGE_HEAP_NO_USER_LOW);
rec_set_status(rec, n_fields == n_core_fields
? REC_STATUS_ORDINARY
- : REC_STATUS_COLUMNS_ADDED);
- } if (dict_table_is_comp(index->table)) {
+ : REC_STATUS_INSTANT);
+ }
+
+ if (dict_table_is_comp(index->table)) {
/* No need to do adjust fixed_len=0. We only
need to adjust it for ROW_FORMAT=REDUNDANT. */
temp = false;
}
n_node_ptr_field = ULINT_UNDEFINED;
+
lens = nulls - (index->is_instant()
? UT_BITS_IN_BYTES(index->get_n_nullable(
- n_fields))
+ n_fields))
: UT_BITS_IN_BYTES(
unsigned(index->n_nullable)));
break;
@@ -1494,8 +1598,8 @@ rec_convert_dtuple_to_rec_comp(
rec_set_status(rec, status);
ut_ad(n_fields
== dict_index_get_n_unique_in_tree_nonleaf(index) + 1);
- ut_d(n_null = std::min<unsigned>(index->n_core_null_bytes * 8U,
- index->n_nullable));
+ ut_d(n_null = std::min<uint>(index->n_core_null_bytes * 8U,
+ index->n_nullable));
n_node_ptr_field = n_fields - 1;
lens = nulls - index->n_core_null_bytes;
break;
@@ -1505,30 +1609,37 @@ rec_convert_dtuple_to_rec_comp(
return;
}
+start:
end = rec;
/* clear the SQL-null flags */
memset(lens + 1, 0, ulint(nulls - lens));
+ const dfield_t* const fend = field + n_fields;
/* Store the data and the offsets */
-
- for (i = 0; i < n_fields; i++) {
- const dict_field_t* ifield;
- dict_col_t* col = NULL;
-
- field = &fields[i];
-
- type = dfield_get_type(field);
- len = dfield_get_len(field);
-
- if (UNIV_UNLIKELY(i == n_node_ptr_field)) {
- ut_ad(dtype_get_prtype(type) & DATA_NOT_NULL);
+ for (ulint i = 0; field < fend; i++, field++) {
+ ulint len = dfield_get_len(field);
+
+ if (mblob) {
+ if (i == index->first_user_field()) {
+ ut_ad(len == FIELD_REF_SIZE);
+ ut_ad(dfield_is_ext(field));
+ memcpy(end, dfield_get_data(field), len);
+ end += len;
+ if (++field == fend) {
+ ut_ad(i == index->n_fields);
+ break;
+ }
+ len = dfield_get_len(field);
+ }
+ } else if (UNIV_UNLIKELY(i == n_node_ptr_field)) {
+ ut_ad(field->type.prtype & DATA_NOT_NULL);
ut_ad(len == REC_NODE_PTR_SIZE);
memcpy(end, dfield_get_data(field), len);
end += REC_NODE_PTR_SIZE;
break;
}
- if (!(dtype_get_prtype(type) & DATA_NOT_NULL)) {
+ if (!(field->type.prtype & DATA_NOT_NULL)) {
/* nullable field */
ut_ad(n_null--);
@@ -1551,11 +1662,12 @@ rec_convert_dtuple_to_rec_comp(
/* only nullable fields can be null */
ut_ad(!dfield_is_null(field));
- ifield = dict_index_get_nth_field(index, i);
- fixed_len = ifield->fixed_len;
- col = ifield->col;
+ const dict_field_t* ifield
+ = dict_index_get_nth_field(index, i);
+ ulint fixed_len = ifield->fixed_len;
+
if (temp && fixed_len
- && !dict_col_get_fixed_size(col, temp)) {
+ && !dict_col_get_fixed_size(ifield->col, temp)) {
fixed_len = 0;
}
@@ -1567,23 +1679,23 @@ rec_convert_dtuple_to_rec_comp(
it is 128 or more, or when the field is stored externally. */
if (fixed_len) {
ut_ad(len <= fixed_len);
- ut_ad(!col->mbmaxlen
- || len >= col->mbminlen
- * fixed_len / col->mbmaxlen);
+ ut_ad(!ifield->col->mbmaxlen
+ || len >= ifield->col->mbminlen
+ * fixed_len / ifield->col->mbmaxlen);
ut_ad(!dfield_is_ext(field));
} else if (dfield_is_ext(field)) {
- ut_ad(DATA_BIG_COL(col));
+ ut_ad(DATA_BIG_COL(ifield->col));
ut_ad(len <= REC_ANTELOPE_MAX_INDEX_COL_LEN
- + BTR_EXTERN_FIELD_REF_SIZE);
+ + BTR_EXTERN_FIELD_REF_SIZE);
*lens-- = (byte) (len >> 8) | 0xc0;
*lens-- = (byte) len;
} else {
- ut_ad(len <= dtype_get_len(type)
- || DATA_LARGE_MTYPE(dtype_get_mtype(type))
+ ut_ad(len <= field->type.len
+ || DATA_LARGE_MTYPE(field->type.mtype)
|| !strcmp(index->name,
FTS_INDEX_TABLE_IND_NAME));
if (len < 128 || !DATA_BIG_LEN_MTYPE(
- dtype_get_len(type), dtype_get_mtype(type))) {
+ field->type.len, field->type.mtype)) {
*lens-- = (byte) len;
} else {
@@ -1616,24 +1728,37 @@ rec_convert_dtuple_to_rec_new(
ut_ad(!(dtuple->info_bits
& ~(REC_NEW_STATUS_MASK | REC_INFO_DELETED_FLAG
| REC_INFO_MIN_REC_FLAG)));
- rec_comp_status_t status = static_cast<rec_comp_status_t>(
- dtuple->info_bits & REC_NEW_STATUS_MASK);
- if (status == REC_STATUS_ORDINARY
- && dtuple->n_fields > index->n_core_fields) {
- ut_ad(index->is_instant());
- status = REC_STATUS_COLUMNS_ADDED;
- }
ulint extra_size;
- rec_get_converted_size_comp(
- index, status, dtuple->fields, dtuple->n_fields, &extra_size);
- rec_t* rec = buf + extra_size;
+ if (UNIV_UNLIKELY(dtuple->is_alter_metadata())) {
+ ut_ad((dtuple->info_bits & REC_NEW_STATUS_MASK)
+ == REC_STATUS_INSTANT);
+ rec_get_converted_size_comp_prefix_low<true>(
+ index, dtuple->fields, dtuple->n_fields,
+ &extra_size, REC_STATUS_INSTANT, false);
+ buf += extra_size;
+ rec_convert_dtuple_to_rec_comp<true>(
+ buf, index, dtuple->fields, dtuple->n_fields,
+ REC_STATUS_INSTANT, false);
+ } else {
+ rec_get_converted_size_comp(index, dtuple, &extra_size);
+ buf += extra_size;
+ rec_comp_status_t status = rec_comp_status_t(
+ dtuple->info_bits & REC_NEW_STATUS_MASK);
+ if (status == REC_STATUS_ORDINARY
+ && dtuple->n_fields > index->n_core_fields) {
+ ut_ad(index->is_instant());
+ status = REC_STATUS_INSTANT;
+ }
- rec_convert_dtuple_to_rec_comp<false>(
- rec, index, dtuple->fields, dtuple->n_fields, status, false);
- rec_set_info_bits_new(rec, dtuple->info_bits & ~REC_NEW_STATUS_MASK);
- return(rec);
+ rec_convert_dtuple_to_rec_comp(
+ buf, index, dtuple->fields, dtuple->n_fields,
+ status, false);
+ }
+
+ rec_set_info_bits_new(buf, dtuple->info_bits & ~REC_NEW_STATUS_MASK);
+ return buf;
}
/*********************************************************//**
@@ -1668,11 +1793,12 @@ rec_convert_dtuple_to_rec(
}
/** Determine the size of a data tuple prefix in a temporary file.
+@tparam redundant_temp whether to use the ROW_FORMAT=REDUNDANT format
@param[in] index clustered or secondary index
@param[in] fields data fields
@param[in] n_fields number of data fields
@param[out] extra record header size
-@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED
+@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
@return total size, in bytes */
template<bool redundant_temp>
ulint
@@ -1683,7 +1809,7 @@ rec_get_converted_size_temp(
ulint* extra,
rec_comp_status_t status)
{
- return rec_get_converted_size_comp_prefix_low<redundant_temp>(
+ return rec_get_converted_size_comp_prefix_low<false,redundant_temp>(
index, fields, n_fields, extra, status, true);
}
@@ -1701,7 +1827,7 @@ template ulint rec_get_converted_size_temp<true>(
@param[in,out] offsets offsets to the fields; in: rec_offs_n_fields(offsets)
@param[in] n_core number of core fields (index->n_core_fields)
@param[in] def_val default values for non-core fields
-@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED */
+@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT */
void
rec_init_offsets_temp(
const rec_t* rec,
@@ -1712,15 +1838,24 @@ rec_init_offsets_temp(
rec_comp_status_t status)
{
ut_ad(status == REC_STATUS_ORDINARY
- || status == REC_STATUS_COLUMNS_ADDED);
+ || status == REC_STATUS_INSTANT);
/* The table may have been converted to plain format
if it was emptied during an ALTER TABLE operation. */
ut_ad(index->n_core_fields == n_core || !index->is_instant());
ut_ad(index->n_core_fields >= n_core);
- rec_init_offsets_comp_ordinary(rec, index, offsets, n_core, def_val,
- status == REC_STATUS_COLUMNS_ADDED
- ? REC_LEAF_TEMP_COLUMNS_ADDED
- : REC_LEAF_TEMP);
+ if (index->table->not_redundant()) {
+ rec_init_offsets_comp_ordinary(
+ rec, index, offsets, n_core, def_val,
+ status == REC_STATUS_INSTANT
+ ? REC_LEAF_TEMP_INSTANT
+ : REC_LEAF_TEMP);
+ } else {
+ rec_init_offsets_comp_ordinary<false, true>(
+ rec, index, offsets, n_core, def_val,
+ status == REC_STATUS_INSTANT
+ ? REC_LEAF_TEMP_INSTANT
+ : REC_LEAF_TEMP);
+ }
}
/** Determine the offset to each field in temporary file.
@@ -1735,9 +1870,15 @@ rec_init_offsets_temp(
rec_offs* offsets)
{
ut_ad(!index->is_instant());
- rec_init_offsets_comp_ordinary(rec, index, offsets,
- index->n_core_fields, NULL,
- REC_LEAF_TEMP);
+ if (index->table->not_redundant()) {
+ rec_init_offsets_comp_ordinary(
+ rec, index, offsets,
+ index->n_core_fields, NULL, REC_LEAF_TEMP);
+ } else {
+ rec_init_offsets_comp_ordinary<false, true>(
+ rec, index, offsets,
+ index->n_core_fields, NULL, REC_LEAF_TEMP);
+ }
}
/** Convert a data tuple prefix to the temporary file format.
@@ -1745,7 +1886,7 @@ rec_init_offsets_temp(
@param[in] index clustered or secondary index
@param[in] fields data fields
@param[in] n_fields number of data fields
-@param[in] status REC_STATUS_ORDINARY or REC_STATUS_COLUMNS_ADDED
+@param[in] status REC_STATUS_ORDINARY or REC_STATUS_INSTANT
*/
template<bool redundant_temp>
void
@@ -1756,7 +1897,7 @@ rec_convert_dtuple_to_temp(
ulint n_fields,
rec_comp_status_t status)
{
- rec_convert_dtuple_to_rec_comp<redundant_temp>(
+ rec_convert_dtuple_to_rec_comp<false,redundant_temp>(
rec, index, fields, n_fields, status, true);
}
@@ -1927,13 +2068,15 @@ rec_copy_prefix_to_buf(
ut_ad(n_fields
<= dict_index_get_n_unique_in_tree_nonleaf(index));
break;
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
/* We would have !index->is_instant() when rolling back
an instant ADD COLUMN operation. */
ut_ad(index->is_instant() || page_rec_is_metadata(rec));
+ ut_ad(n_fields <= index->first_user_field());
nulls++;
const ulint n_rec = ulint(index->n_core_fields) + 1
- + rec_get_n_add_field(nulls);
+ + rec_get_n_add_field(nulls)
+ - rec_is_alter_metadata(rec, true);
instant_omit = ulint(&rec[-REC_N_NEW_EXTRA_BYTES] - nulls);
ut_ad(instant_omit == 1 || instant_omit == 2);
nullf = nulls;
@@ -2022,7 +2165,7 @@ rec_copy_prefix_to_buf(
/* copy the fixed-size header and the record prefix */
memcpy(b - REC_N_NEW_EXTRA_BYTES, rec - REC_N_NEW_EXTRA_BYTES,
prefix_len + REC_N_NEW_EXTRA_BYTES);
- ut_ad(rec_get_status(b) == REC_STATUS_COLUMNS_ADDED);
+ ut_ad(rec_get_status(b) == REC_STATUS_INSTANT);
rec_set_status(b, REC_STATUS_ORDINARY);
return b;
} else {
@@ -2542,8 +2685,6 @@ rec_get_trx_id(
const rec_t* rec,
const dict_index_t* index)
{
- ulint trx_id_col
- = dict_index_get_sys_col_pos(index, DATA_TRX_ID);
const byte* trx_id;
ulint len;
mem_heap_t* heap = NULL;
@@ -2551,15 +2692,10 @@ rec_get_trx_id(
rec_offs_init(offsets_);
rec_offs* offsets = offsets_;
- ut_ad(trx_id_col <= MAX_REF_PARTS);
- ut_ad(dict_index_is_clust(index));
- ut_ad(trx_id_col > 0);
- ut_ad(trx_id_col != ULINT_UNDEFINED);
-
offsets = rec_get_offsets(rec, index, offsets, index->n_core_fields,
- trx_id_col + 1, &heap);
+ index->db_trx_id() + 1, &heap);
- trx_id = rec_get_nth_field(rec, offsets, trx_id_col, &len);
+ trx_id = rec_get_nth_field(rec, offsets, index->db_trx_id(), &len);
ut_ad(len == DATA_TRX_ID_LEN);
diff --git a/storage/innobase/row/row0ext.cc b/storage/innobase/row/row0ext.cc
index 5892cbf31fe..b7a627603d9 100644
--- a/storage/innobase/row/row0ext.cc
+++ b/storage/innobase/row/row0ext.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2020, MariaDB Corporation.
+Copyright (c) 2019, 2020, 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
@@ -30,14 +30,14 @@ Created September 2006 Marko Makela
/** Fills the column prefix cache of an externally stored column.
@param[in,out] ext column prefix cache
@param[in] i index of ext->ext[]
-@param[in] page_size page size
+@param[in] space tablespace
@param[in] dfield data field */
static
void
row_ext_cache_fill(
row_ext_t* ext,
ulint i,
- const page_size_t& page_size,
+ fil_space_t* space,
const dfield_t* dfield)
{
const byte* field = static_cast<const byte*>(
@@ -76,7 +76,8 @@ row_ext_cache_fill(
crashed during the execution of
btr_free_externally_stored_field(). */
ext->len[i] = btr_copy_externally_stored_field_prefix(
- buf, ext->max_len, page_size, field, f_len);
+ buf, ext->max_len, ext->zip_size,
+ field, f_len);
}
}
}
@@ -92,7 +93,7 @@ row_ext_create(
in the InnoDB table object, as reported by
dict_col_get_no(); NOT relative to the records
in the clustered index */
- ulint flags, /*!< in: table->flags */
+ const dict_table_t& table, /*!< in: table */
const dtuple_t* tuple, /*!< in: data tuple containing the field
references of the externally stored
columns; must be indexed by col_no;
@@ -101,31 +102,30 @@ row_ext_create(
to prevent deletion (rollback or purge). */
mem_heap_t* heap) /*!< in: heap where created */
{
- ulint i;
- const page_size_t& page_size = dict_tf_get_page_size(flags);
-
- row_ext_t* ret;
+ if (!table.space) {
+ return NULL;
+ }
ut_ad(n_ext > 0);
- ret = static_cast<row_ext_t*>(
+ row_ext_t* ret = static_cast<row_ext_t*>(
mem_heap_alloc(heap,
(sizeof *ret) + (n_ext - 1) * sizeof ret->len));
ret->n_ext = n_ext;
ret->ext = ext;
- ret->max_len = DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(flags);
- ret->page_size.copy_from(page_size);
+ ret->max_len = DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(table.flags);
+ ret->zip_size = dict_tf_get_zip_size(table.flags);
ret->buf = static_cast<byte*>(
mem_heap_alloc(heap, n_ext * ret->max_len));
/* Fetch the BLOB prefixes */
- for (i = 0; i < n_ext; i++) {
+ for (ulint i = 0; i < n_ext; i++) {
const dfield_t* dfield;
dfield = dtuple_get_nth_field(tuple, ext[i]);
- row_ext_cache_fill(ret, i, page_size, dfield);
+ row_ext_cache_fill(ret, i, table.space, dfield);
}
return(ret);
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc
index b45b5d171ff..8d1dbad22cb 100644
--- a/storage/innobase/row/row0ftsort.cc
+++ b/storage/innobase/row/row0ftsort.cc
@@ -163,22 +163,22 @@ row_merge_create_fts_sort_index(
/** Initialize FTS parallel sort structures.
@param[in] trx transaction
@param[in,out] dup descriptor of FTS index being created
-@param[in] new_table table where indexes are created
+@param[in,out] new_table table where indexes are created
@param[in] opt_doc_id_size whether to use 4 bytes instead of 8 bytes
integer to store Doc ID during sort
-@param[in] old_page_size page size of the old table during alter
+@param[in] old_zip_size page size of the old table during alter
@param[out] psort parallel sort info to be instantiated
@param[out] merge parallel merge info to be instantiated
-@return TRUE if all successful */
-ibool
+@return true if all successful */
+bool
row_fts_psort_info_init(
- trx_t* trx,
- row_merge_dup_t* dup,
- const dict_table_t* new_table,
- ibool opt_doc_id_size,
- const page_size_t old_page_size,
- fts_psort_t** psort,
- fts_psort_t** merge)
+ trx_t* trx,
+ row_merge_dup_t*dup,
+ dict_table_t* new_table,
+ bool opt_doc_id_size,
+ ulint old_zip_size,
+ fts_psort_t** psort,
+ fts_psort_t** merge)
{
ulint i;
ulint j;
@@ -188,6 +188,7 @@ row_fts_psort_info_init(
ulint block_size;
ibool ret = TRUE;
bool encrypted = false;
+ ut_ad(ut_is_2pow(old_zip_size));
block_size = 3 * srv_sort_buf_size;
@@ -210,8 +211,8 @@ row_fts_psort_info_init(
}
common_info->dup = dup;
- common_info->new_table = (dict_table_t*) new_table;
- common_info->old_page_size = old_page_size;
+ common_info->new_table = new_table;
+ common_info->old_zip_size = old_zip_size;
common_info->trx = trx;
common_info->all_info = psort_info;
common_info->sort_event = os_event_create(0);
@@ -804,8 +805,7 @@ DECLARE_THREAD(fts_parallel_tokenization)(
block = psort_info->merge_block;
crypt_block = psort_info->crypt_block;
- const page_size_t old_page_size =
- psort_info->psort_common->old_page_size;
+ const ulint zip_size = psort_info->psort_common->old_zip_size;
row_merge_fts_get_next_doc_item(psort_info, &doc_item);
@@ -835,7 +835,7 @@ loop:
doc.text.f_str =
btr_copy_externally_stored_field(
&doc.text.f_len, data,
- old_page_size, data_len, blob_heap);
+ zip_size, data_len, blob_heap);
} else {
doc.text.f_str = data;
doc.text.f_len = data_len;
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index db4c22b4969..9399fe15349 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -40,6 +40,7 @@ Created 2012-02-08 by Sunny Bains.
#include "row0quiesce.h"
#include "fil0pagecompress.h"
#include "trx0undo.h"
+#include "row0row.h"
#ifdef HAVE_LZO
#include "lzo/lzo1x.h"
#endif
@@ -47,16 +48,20 @@ Created 2012-02-08 by Sunny Bains.
#include "snappy-c.h"
#endif
+#include "scope.h"
+
#include <vector>
#ifdef HAVE_MY_AES_H
#include <my_aes.h>
#endif
+using st_::span;
+
/** The size of the buffer to use for IO.
@param n physical page size
@return number of pages */
-#define IO_BUFFER_SIZE(n) ((1024 * 1024) / n)
+#define IO_BUFFER_SIZE(n) ((1024 * 1024) / (n))
/** For gathering stats on records during phase I */
struct row_stats_t {
@@ -118,7 +123,7 @@ struct row_import {
m_hostname(NULL),
m_table_name(NULL),
m_autoinc(0),
- m_page_size(0, 0, false),
+ m_zip_size(0),
m_flags(0),
m_n_cols(0),
m_cols(NULL),
@@ -188,6 +193,9 @@ struct row_import {
dberr_t match_schema(
THD* thd) UNIV_NOTHROW;
+ dberr_t match_flags(THD *thd) const ;
+
+
dict_table_t* m_table; /*!< Table instance */
ulint m_version; /*!< Version of config file */
@@ -199,7 +207,8 @@ struct row_import {
ib_uint64_t m_autoinc; /*!< Next autoinc value */
- page_size_t m_page_size; /*!< Tablespace page size */
+ ulint m_zip_size; /*!< ROW_FORMAT=COMPRESSED
+ page size, or 0 */
ulint m_flags; /*!< Table flags */
@@ -372,7 +381,7 @@ public:
@param trx covering transaction */
AbstractCallback(trx_t* trx, ulint space_id)
:
- m_page_size(0, 0, false),
+ m_zip_size(0),
m_trx(trx),
m_space(space_id),
m_xdes(),
@@ -396,7 +405,7 @@ public:
/** @return true if compressed table. */
bool is_compressed_table() const UNIV_NOTHROW
{
- return(get_page_size().is_compressed());
+ return get_zip_size();
}
/** @return the tablespace flags */
@@ -416,7 +425,11 @@ public:
m_filepath = filename;
}
- const page_size_t& get_page_size() const { return m_page_size; }
+ ulint get_zip_size() const { return m_zip_size; }
+ ulint physical_size() const
+ {
+ return m_zip_size ? m_zip_size : srv_page_size;
+ }
const char* filename() const { return m_filepath; }
@@ -459,7 +472,7 @@ protected:
{
ulint offset;
- offset = xdes_calc_descriptor_index(get_page_size(), page_no);
+ offset = xdes_calc_descriptor_index(get_zip_size(), page_no);
return(page + XDES_ARR_OFFSET + XDES_SIZE * offset);
}
@@ -481,15 +494,12 @@ protected:
UT_DELETE_ARRAY(m_xdes);
m_xdes = NULL;
- ulint state;
- const xdes_t* xdesc = page + XDES_ARR_OFFSET;
-
- state = mach_read_ulint(xdesc + XDES_STATE, MLOG_4BYTES);
+ if (mach_read_from_4(XDES_ARR_OFFSET + XDES_STATE + page)
+ != XDES_FREE) {
+ const ulint physical_size = m_zip_size
+ ? m_zip_size : srv_page_size;
- if (state != XDES_FREE) {
-
- m_xdes = UT_NEW_ARRAY_NOKEY(xdes_t,
- m_page_size.physical());
+ m_xdes = UT_NEW_ARRAY_NOKEY(xdes_t, physical_size);
/* Trigger OOM */
DBUG_EXECUTE_IF(
@@ -502,7 +512,7 @@ protected:
return(DB_OUT_OF_MEMORY);
}
- memcpy(m_xdes, page, m_page_size.physical());
+ memcpy(m_xdes, page, physical_size);
}
return(DB_SUCCESS);
@@ -513,7 +523,7 @@ protected:
@return true if the page is marked as free */
bool is_free(ulint page_no) const UNIV_NOTHROW
{
- ut_a(xdes_calc_descriptor_page(get_page_size(), page_no)
+ ut_a(xdes_calc_descriptor_page(get_zip_size(), page_no)
== m_xdes_page_no);
if (m_xdes != 0) {
@@ -528,8 +538,8 @@ protected:
}
protected:
- /** The tablespace page size. */
- page_size_t m_page_size;
+ /** The ROW_FORMAT=COMPRESSED page size, or 0. */
+ ulint m_zip_size;
/** File handle to the tablespace */
pfs_os_file_t m_file;
@@ -568,11 +578,9 @@ AbstractCallback::init(
const page_t* page = block->frame;
m_space_flags = fsp_header_get_flags(page);
- if (!fsp_flags_is_valid(m_space_flags, true)) {
+ if (!fil_space_t::is_valid_flags(m_space_flags, true)) {
ulint cflags = fsp_flags_convert_from_101(m_space_flags);
if (cflags == ULINT_UNDEFINED) {
- ib::error() << "Invalid FSP_SPACE_FLAGS="
- << ib::hex(m_space_flags);
return(DB_CORRUPTION);
}
m_space_flags = cflags;
@@ -580,21 +588,23 @@ AbstractCallback::init(
/* Clear the DATA_DIR flag, which is basically garbage. */
m_space_flags &= ~(1U << FSP_FLAGS_POS_RESERVED);
- m_page_size.copy_from(page_size_t(m_space_flags));
+ m_zip_size = fil_space_t::zip_size(m_space_flags);
+ const ulint logical_size = fil_space_t::logical_size(m_space_flags);
+ const ulint physical_size = fil_space_t::physical_size(m_space_flags);
- if (!is_compressed_table() && !m_page_size.equals_to(univ_page_size)) {
+ if (logical_size != srv_page_size) {
- ib::error() << "Page size " << m_page_size.physical()
+ ib::error() << "Page size " << logical_size
<< " of ibd file is not the same as the server page"
" size " << srv_page_size;
return(DB_CORRUPTION);
- } else if (file_size % m_page_size.physical() != 0) {
+ } else if (file_size & (physical_size - 1)) {
ib::error() << "File size " << file_size << " is not a"
" multiple of the page size "
- << m_page_size.physical();
+ << physical_size;
return(DB_CORRUPTION);
}
@@ -652,19 +662,19 @@ struct FetchIndexRootPages : public AbstractCallback {
m_table(table), m_index(0, 0) UNIV_NOTHROW { }
/** Destructor */
- virtual ~FetchIndexRootPages() UNIV_NOTHROW { }
+ ~FetchIndexRootPages() UNIV_NOTHROW override { }
/** Fetch the clustered index root page in the tablespace
@param iter Tablespace iterator
@param block Block to use for IO
@retval DB_SUCCESS or error code */
dberr_t run(const fil_iterator_t& iter,
- buf_block_t* block) UNIV_NOTHROW;
+ buf_block_t* block) UNIV_NOTHROW override;
/** Called for each block as it is read from the file.
@param block block to convert, it is not from the buffer pool.
@retval DB_SUCCESS or error code. */
- dberr_t operator()(buf_block_t* block) UNIV_NOTHROW;
+ dberr_t operator()(buf_block_t* block) UNIV_NOTHROW override;
/** Update the import configuration that will be used to import
the tablespace. */
@@ -704,6 +714,14 @@ dberr_t FetchIndexRootPages::operator()(buf_block_t* block) UNIV_NOTHROW
return(DB_CORRUPTION);
}
+ if (!page_is_comp(block->frame) !=
+ !dict_table_is_comp(m_table)) {
+ ib_errf(m_trx->mysql_thd, IB_LOG_LEVEL_ERROR,
+ ER_TABLE_SCHEMA_MISMATCH,
+ "ROW_FORMAT mismatch");
+ return DB_CORRUPTION;
+ }
+
return DB_SUCCESS;
}
@@ -714,7 +732,7 @@ dberr_t
FetchIndexRootPages::build_row_import(row_import* cfg) const UNIV_NOTHROW
{
ut_a(cfg->m_table == m_table);
- cfg->m_page_size.copy_from(m_page_size);
+ cfg->m_zip_size = m_zip_size;
cfg->m_n_indexes = 1;
if (cfg->m_n_indexes == 0) {
@@ -818,14 +836,15 @@ public:
rec_offs_init(m_offsets_);
}
- virtual ~PageConverter() UNIV_NOTHROW
+ ~PageConverter() UNIV_NOTHROW override
{
if (m_heap != 0) {
mem_heap_free(m_heap);
}
}
- dberr_t run(const fil_iterator_t& iter, buf_block_t* block) UNIV_NOTHROW
+ dberr_t run(const fil_iterator_t& iter,
+ buf_block_t* block) UNIV_NOTHROW override
{
return fil_iterate(iter, block, *this);
}
@@ -833,7 +852,8 @@ public:
/** Called for each block as it is read from the file.
@param block block to convert, it is not from the buffer pool.
@retval DB_SUCCESS or error code. */
- dberr_t operator()(buf_block_t* block) UNIV_NOTHROW;
+ dberr_t operator()(buf_block_t* block) UNIV_NOTHROW override;
+
private:
/** Update the page, set the space id, max trx id and index id.
@param block block read from file
@@ -1087,7 +1107,8 @@ row_import::match_index_columns(
for (ulint i = 0; i < index->n_fields; ++i, ++field, ++cfg_field) {
- if (strcmp(field->name(), cfg_field->name()) != 0) {
+ if (field->name() && cfg_field->name()
+ && strcmp(field->name(), cfg_field->name()) != 0) {
ib_errf(thd, IB_LOG_LEVEL_ERROR,
ER_TABLE_SCHEMA_MISMATCH,
"Index field name %s doesn't match"
@@ -1256,6 +1277,61 @@ row_import::match_table_columns(
return(err);
}
+dberr_t row_import::match_flags(THD *thd) const
+{
+ ulint mismatch= (m_table->flags ^ m_flags) & ~DICT_TF_MASK_DATA_DIR;
+ if (!mismatch)
+ return DB_SUCCESS;
+
+ const char *msg;
+ if (mismatch & DICT_TF_MASK_ZIP_SSIZE)
+ {
+ if ((m_table->flags & DICT_TF_MASK_ZIP_SSIZE) &&
+ (m_flags & DICT_TF_MASK_ZIP_SSIZE))
+ {
+ switch (m_flags & DICT_TF_MASK_ZIP_SSIZE) {
+ case 0U << DICT_TF_POS_ZIP_SSIZE:
+ goto uncompressed;
+ case 1U << DICT_TF_POS_ZIP_SSIZE:
+ msg= "ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1";
+ break;
+ case 2U << DICT_TF_POS_ZIP_SSIZE:
+ msg= "ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2";
+ break;
+ case 3U << DICT_TF_POS_ZIP_SSIZE:
+ msg= "ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4";
+ break;
+ case 4U << DICT_TF_POS_ZIP_SSIZE:
+ msg= "ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8";
+ break;
+ case 5U << DICT_TF_POS_ZIP_SSIZE:
+ msg= "ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16";
+ break;
+ default:
+ msg= "strange KEY_BLOCK_SIZE";
+ }
+ }
+ else if (m_flags & DICT_TF_MASK_ZIP_SSIZE)
+ msg= "ROW_FORMAT=COMPRESSED";
+ else
+ goto uncompressed;
+ }
+ else
+ {
+ uncompressed:
+ msg= (m_flags & DICT_TF_MASK_ATOMIC_BLOBS) ? "ROW_FORMAT=DYNAMIC"
+ : (m_flags & DICT_TF_MASK_COMPACT) ? "ROW_FORMAT=COMPACT"
+ : "ROW_FORMAT=REDUNDANT";
+ }
+
+ ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
+ "Table flags don't match, server table has 0x%x and the meta-data "
+ "file has 0x%zx; .cfg file uses %s",
+ m_table->flags, m_flags, msg);
+
+ return DB_ERROR;
+}
+
/** Check if the table (and index) schema that was read from the .cfg file
matches the in memory table definition.
@param thd MySQL session variable
@@ -1266,60 +1342,7 @@ row_import::match_schema(
{
/* Do some simple checks. */
- if (ulint mismatch = (m_table->flags ^ m_flags)
- & ~DICT_TF_MASK_DATA_DIR) {
- const char* msg;
- if (mismatch & DICT_TF_MASK_ZIP_SSIZE) {
- if ((m_table->flags & DICT_TF_MASK_ZIP_SSIZE)
- && (m_flags & DICT_TF_MASK_ZIP_SSIZE)) {
- switch (m_flags & DICT_TF_MASK_ZIP_SSIZE) {
- case 0U << DICT_TF_POS_ZIP_SSIZE:
- goto uncompressed;
- case 1U << DICT_TF_POS_ZIP_SSIZE:
- msg = "ROW_FORMAT=COMPRESSED"
- " KEY_BLOCK_SIZE=1";
- break;
- case 2U << DICT_TF_POS_ZIP_SSIZE:
- msg = "ROW_FORMAT=COMPRESSED"
- " KEY_BLOCK_SIZE=2";
- break;
- case 3U << DICT_TF_POS_ZIP_SSIZE:
- msg = "ROW_FORMAT=COMPRESSED"
- " KEY_BLOCK_SIZE=4";
- break;
- case 4U << DICT_TF_POS_ZIP_SSIZE:
- msg = "ROW_FORMAT=COMPRESSED"
- " KEY_BLOCK_SIZE=8";
- break;
- case 5U << DICT_TF_POS_ZIP_SSIZE:
- msg = "ROW_FORMAT=COMPRESSED"
- " KEY_BLOCK_SIZE=16";
- break;
- default:
- msg = "strange KEY_BLOCK_SIZE";
- }
- } else if (m_flags & DICT_TF_MASK_ZIP_SSIZE) {
- msg = "ROW_FORMAT=COMPRESSED";
- } else {
- goto uncompressed;
- }
- } else {
-uncompressed:
- msg = (m_flags & DICT_TF_MASK_ATOMIC_BLOBS)
- ? "ROW_FORMAT=DYNAMIC"
- : (m_flags & DICT_TF_MASK_COMPACT)
- ? "ROW_FORMAT=COMPACT"
- : "ROW_FORMAT=REDUNDANT";
- }
-
- ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
- "Table flags don't match, server table has 0x%x"
- " and the meta-data file has 0x" ULINTPFx ";"
- " .cfg file uses %s",
- m_table->flags, m_flags, msg);
-
- return(DB_ERROR);
- } else if (UT_LIST_GET_LEN(m_table->indexes) != m_n_indexes) {
+ if (UT_LIST_GET_LEN(m_table->indexes) != m_n_indexes) {
/* If the number of indexes don't match then it is better
to abort the IMPORT. It is easy for the user to create a
@@ -1493,7 +1516,7 @@ IndexPurge::open() UNIV_NOTHROW
btr_pcur_open_at_index_side(
true, m_index, BTR_MODIFY_LEAF, &m_pcur, true, 0, &m_mtr);
btr_pcur_move_to_next_user_rec(&m_pcur, &m_mtr);
- if (rec_is_metadata(btr_pcur_get_rec(&m_pcur), m_index)) {
+ if (rec_is_metadata(btr_pcur_get_rec(&m_pcur), *m_index)) {
ut_ad(btr_pcur_is_on_user_rec(&m_pcur));
/* Skip the metadata pseudo-record. */
} else {
@@ -1572,7 +1595,7 @@ IndexPurge::next() UNIV_NOTHROW
dict_index_t* index = m_pcur.btr_cur.index;
buf_block_t* next_block = btr_block_get(
page_id_t(block->page.id.space(), next_page),
- block->page.size, BTR_MODIFY_LEAF, index,
+ block->zip_size(), BTR_MODIFY_LEAF, index,
&m_mtr);
if (UNIV_UNLIKELY(!next_block
@@ -1933,23 +1956,7 @@ PageConverter::update_index_page(
if (dict_index_is_clust(m_index->m_srv_index)) {
dict_index_t* index = const_cast<dict_index_t*>(
m_index->m_srv_index);
- if (block->page.id.page_no() == index->page) {
- /* Preserve the PAGE_ROOT_AUTO_INC. */
- if (index->table->supports_instant()) {
- if (btr_cur_instant_root_init(index, page)) {
- return(DB_CORRUPTION);
- }
-
- /* Provisionally set all instantly
- added columns to be DEFAULT NULL. */
- for (unsigned i = index->n_core_fields;
- i < index->n_fields; i++) {
- dict_col_t* col = index->fields[i].col;
- col->def_val.len = UNIV_SQL_NULL;
- col->def_val.data = NULL;
- }
- }
- } else {
+ if (block->page.id.page_no() != index->page) {
/* Clear PAGE_MAX_TRX_ID so that it can be
used for other purposes in the future. IMPORT
in MySQL 5.6, 5.7 and MariaDB 10.0 and 10.1
@@ -2097,27 +2104,30 @@ dberr_t PageConverter::operator()(buf_block_t* block) UNIV_NOTHROW
/* If we already had an old page with matching number
in the buffer pool, evict it now, because
we no longer evict the pages on DISCARD TABLESPACE. */
- buf_page_get_gen(block->page.id, get_page_size(),
+ buf_page_get_gen(block->page.id, get_zip_size(),
RW_NO_LATCH, NULL, BUF_EVICT_IF_IN_POOL,
__FILE__, __LINE__, NULL, NULL);
ulint page_type;
- dberr_t err = update_page(block, page_type);
- if (err != DB_SUCCESS) return err;
+ if (dberr_t err = update_page(block, page_type)) {
+ return err;
+ }
+
+ const bool full_crc32 = fil_space_t::full_crc32(get_space_flags());
if (!block->page.zip.data) {
buf_flush_init_for_writing(
- NULL, block->frame, NULL, m_current_lsn);
+ NULL, block->frame, NULL, m_current_lsn, full_crc32);
} else if (fil_page_type_is_index(page_type)) {
buf_flush_init_for_writing(
NULL, block->page.zip.data, &block->page.zip,
- m_current_lsn);
+ m_current_lsn, full_crc32);
} else {
/* Calculate and update the checksum of non-index
pages for ROW_FORMAT=COMPRESSED tables. */
buf_flush_update_zip_checksum(
- block->page.zip.data, get_page_size().physical(),
+ block->page.zip.data, block->zip_size(),
m_current_lsn);
}
@@ -2341,17 +2351,15 @@ row_import_adjust_root_pages_of_secondary_indexes(
}
/*****************************************************************//**
-Ensure that dict_sys->row_id exceeds SELECT MAX(DB_ROW_ID).
-@return error code */
-static MY_ATTRIBUTE((nonnull, warn_unused_result))
-dberr_t
+Ensure that dict_sys.row_id exceeds SELECT MAX(DB_ROW_ID). */
+MY_ATTRIBUTE((nonnull)) static
+void
row_import_set_sys_max_row_id(
/*==========================*/
row_prebuilt_t* prebuilt, /*!< in/out: prebuilt from
handler */
const dict_table_t* table) /*!< in: table to import */
{
- dberr_t err;
const rec_t* rec;
mtr_t mtr;
btr_pcur_t pcur;
@@ -2359,7 +2367,8 @@ row_import_set_sys_max_row_id(
dict_index_t* index;
index = dict_table_get_first_index(table);
- ut_a(dict_index_is_clust(index));
+ ut_ad(index->is_primary());
+ ut_ad(dict_index_is_auto_gen_clust(index));
mtr_start(&mtr);
@@ -2380,72 +2389,29 @@ row_import_set_sys_max_row_id(
/* Check for empty table. */
if (page_rec_is_infimum(rec)) {
/* The table is empty. */
- err = DB_SUCCESS;
- } else if (rec_is_metadata(rec, index)) {
+ } else if (rec_is_metadata(rec, *index)) {
/* The clustered index contains the metadata record only,
that is, the table is empty. */
- err = DB_SUCCESS;
} else {
- ulint len;
- const byte* field;
- mem_heap_t* heap = NULL;
- rec_offs offsets_[1 + REC_OFFS_HEADER_SIZE];
- rec_offs* offsets;
-
- rec_offs_init(offsets_);
-
- offsets = rec_get_offsets(
- rec, index, offsets_, index->n_core_fields,
- ULINT_UNDEFINED, &heap);
-
- field = rec_get_nth_field(
- rec, offsets,
- dict_index_get_sys_col_pos(index, DATA_ROW_ID),
- &len);
-
- if (len == DATA_ROW_ID_LEN) {
- row_id = mach_read_from_6(field);
- err = DB_SUCCESS;
- } else {
- err = DB_CORRUPTION;
- }
-
- if (heap != NULL) {
- mem_heap_free(heap);
- }
+ row_id = mach_read_from_6(rec);
}
btr_pcur_close(&pcur);
mtr_commit(&mtr);
- DBUG_EXECUTE_IF("ib_import_set_max_rowid_failure",
- err = DB_CORRUPTION;);
-
- if (err != DB_SUCCESS) {
- ib_errf(prebuilt->trx->mysql_thd,
- IB_LOG_LEVEL_WARN,
- ER_INNODB_INDEX_CORRUPT,
- "Index `%s` corruption detected, invalid DB_ROW_ID"
- " in index.", index->name());
-
- return(err);
-
- } else if (row_id > 0) {
-
+ if (row_id) {
/* Update the system row id if the imported index row id is
greater than the max system row id. */
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
- if (row_id >= dict_sys->row_id) {
- dict_sys->row_id = row_id + 1;
+ if (row_id >= dict_sys.row_id) {
+ dict_sys.row_id = row_id + 1;
dict_hdr_flush_row_id();
}
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
}
-
- return(DB_SUCCESS);
}
/*****************************************************************//**
@@ -3065,10 +3031,7 @@ row_import_read_v1(
cfg->m_flags = mach_read_from_4(ptr);
ptr += sizeof(ib_uint32_t);
- cfg->m_page_size.copy_from(dict_tf_get_page_size(cfg->m_flags));
-
- ut_a(logical_page_size == cfg->m_page_size.logical());
-
+ cfg->m_zip_size = dict_tf_get_zip_size(cfg->m_flags);
cfg->m_n_cols = mach_read_from_4(ptr);
if (!dict_tf_is_valid(cfg->m_flags)) {
@@ -3130,6 +3093,373 @@ row_import_read_meta_data(
return(DB_ERROR);
}
+#define BTR_BLOB_HDR_PART_LEN 0 /*!< BLOB part len on this page */
+#define BTR_BLOB_HDR_NEXT_PAGE_NO 4 /*!< next BLOB part page no,
+ FIL_NULL if none */
+#define BTR_BLOB_HDR_SIZE 8 /*!< Size of a BLOB part header, in bytes */
+
+/* decrypt and decompress page if needed */
+static dberr_t decrypt_decompress(fil_space_crypt_t *space_crypt,
+ size_t space_flags, span<byte> page,
+ size_t space_id, byte *page_compress_buf)
+{
+ auto *data= page.data();
+
+ if (space_crypt && space_crypt->should_encrypt())
+ {
+ if (!buf_page_verify_crypt_checksum(data, space_flags))
+ return DB_CORRUPTION;
+
+ if (dberr_t err= fil_space_decrypt(space_id, space_crypt, data,
+ page.size(), space_flags, data))
+ return err;
+ }
+ else if (fil_page_is_compressed_encrypted(data))
+ return DB_CORRUPTION;
+
+ const bool is_full_crc32_compressed=
+ fil_space_t::is_full_crc32_compressed(space_flags);
+
+ const bool page_actually_compressed=
+ (is_full_crc32_compressed &&
+ buf_page_is_compressed(data, space_flags)) ||
+ fil_page_is_compressed_encrypted(data) || fil_page_is_compressed(data);
+
+ if (page_actually_compressed)
+ {
+ if (!is_full_crc32_compressed && !fil_space_t::is_compressed(space_flags))
+ return DB_CORRUPTION;
+
+ auto compress_length=
+ fil_page_decompress(page_compress_buf, data, space_flags);
+ ut_ad(compress_length != srv_page_size);
+
+ if (compress_length == 0)
+ return DB_CORRUPTION;
+ }
+
+ return DB_SUCCESS;
+}
+
+static size_t get_buf_size()
+{
+ return srv_page_size
+#ifdef HAVE_LZO
+ + LZO1X_1_15_MEM_COMPRESS
+#elif defined HAVE_SNAPPY
+ + snappy_max_compressed_length(srv_page_size)
+#endif
+ ;
+}
+
+/* find, parse instant metadata, performing variaous checks,
+and apply it to dict_table_t
+@return DB_SUCCESS or some error */
+static dberr_t handle_instant_metadata(dict_table_t *table,
+ const row_import &cfg)
+{
+ dict_get_and_save_data_dir_path(table, false);
+
+ char *filepath;
+ if (DICT_TF_HAS_DATA_DIR(table->flags))
+ {
+ ut_a(table->data_dir_path);
+
+ filepath=
+ fil_make_filepath(table->data_dir_path, table->name.m_name, IBD, true);
+ }
+ else
+ filepath= fil_make_filepath(nullptr, table->name.m_name, IBD, false);
+
+ if (!filepath)
+ return DB_OUT_OF_MEMORY;
+
+ SCOPE_EXIT([filepath]() { ut_free(filepath); });
+
+ bool success;
+ auto file= os_file_create_simple_no_error_handling(
+ innodb_data_file_key, filepath, OS_FILE_OPEN, OS_FILE_READ_WRITE, false,
+ &success);
+ if (!success)
+ return DB_IO_ERROR;
+
+ if (os_file_get_size(file) < srv_page_size * 4)
+ return DB_CORRUPTION;
+
+ SCOPE_EXIT([&file]() { os_file_close(file); });
+
+ std::unique_ptr<byte[], decltype(&aligned_free)> first_page(
+ static_cast<byte *>(aligned_malloc(srv_page_size, srv_page_size)),
+ &aligned_free);
+
+ if (dberr_t err= os_file_read_no_error_handling(IORequest(IORequest::READ),
+ file, first_page.get(), 0,
+ srv_page_size, nullptr))
+ return err;
+
+ auto space_flags= fsp_header_get_flags(first_page.get());
+
+ if (!fil_space_t::is_valid_flags(space_flags, true))
+ {
+ auto cflags= fsp_flags_convert_from_101(space_flags);
+ if (cflags == ULINT_UNDEFINED)
+ {
+ ib::error() << "Invalid FSP_SPACE_FLAGS=" << ib::hex(space_flags);
+ return DB_CORRUPTION;
+ }
+ space_flags= cflags;
+ }
+
+ if (!cfg.m_missing)
+ {
+ if (dberr_t err= cfg.match_flags(current_thd))
+ return err;
+ }
+
+ const unsigned zip_size= fil_space_t::zip_size(space_flags);
+ const unsigned physical_size= zip_size ? zip_size : unsigned(srv_page_size);
+ ut_ad(physical_size <= UNIV_PAGE_SIZE_MAX);
+ const uint32_t space_id= page_get_space_id(first_page.get());
+
+ auto *space_crypt= fil_space_read_crypt_data(zip_size, first_page.get());
+ SCOPE_EXIT([&space_crypt]() {
+ if (space_crypt)
+ fil_space_destroy_crypt_data(&space_crypt);
+ });
+
+ std::unique_ptr<byte[], decltype(&aligned_free)> page(
+ static_cast<byte *>(
+ aligned_malloc(UNIV_PAGE_SIZE_MAX, UNIV_PAGE_SIZE_MAX)),
+ &aligned_free);
+
+ if (dberr_t err= os_file_read_no_error_handling(
+ IORequest(IORequest::READ), file, page.get(), 3 * physical_size,
+ physical_size, nullptr))
+ return err;
+
+ std::unique_ptr<byte[]> page_compress_buf(new byte[get_buf_size()]);
+
+ if (dberr_t err=
+ decrypt_decompress(space_crypt, space_flags,
+ {page.get(), static_cast<size_t>(physical_size)},
+ space_id, page_compress_buf.get()))
+ return err;
+
+ if (table->supports_instant())
+ {
+ dict_index_t *index= dict_table_get_first_index(table);
+
+ auto tmp1= table->space_id;
+ table->space_id= page_get_space_id(page.get());
+ SCOPE_EXIT([tmp1, table]() { table->space_id= tmp1; });
+
+ auto tmp2= index->page;
+ index->page= page_get_page_no(page.get());
+ SCOPE_EXIT([tmp2, index]() { index->page= tmp2; });
+
+ if (!page_is_comp(page.get()) != !dict_table_is_comp(table))
+ {
+ ib_errf(current_thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
+ "ROW_FORMAT mismatch");
+ return DB_CORRUPTION;
+ }
+
+ if (btr_cur_instant_root_init(index, page.get()))
+ return DB_ERROR;
+
+ ut_ad(index->n_core_null_bytes != dict_index_t::NO_CORE_NULL_BYTES);
+
+ if (fil_page_get_type(page.get()) == FIL_PAGE_INDEX)
+ {
+ ut_ad(!index->is_instant());
+ return DB_SUCCESS;
+ }
+
+ mem_heap_t *heap= NULL;
+ SCOPE_EXIT([&heap]() {
+ if (heap)
+ mem_heap_free(heap);
+ });
+
+ while (btr_page_get_level(page.get()) != 0)
+ {
+ const rec_t *rec= page_rec_get_next(page_get_infimum_rec(page.get()));
+
+ /* Relax the assertion in rec_init_offsets(). */
+ ut_ad(!index->in_instant_init);
+ ut_d(index->in_instant_init= true);
+ rec_offs *offsets=
+ rec_get_offsets(rec, index, nullptr, 0, ULINT_UNDEFINED, &heap);
+ ut_d(index->in_instant_init= false);
+
+ uint64_t child_page_no= btr_node_ptr_get_child_page_no(rec, offsets);
+
+ if (dberr_t err= os_file_read_no_error_handling(
+ IORequest(IORequest::READ), file, page.get(),
+ child_page_no * physical_size, physical_size, nullptr))
+ return err;
+
+ if (dberr_t err= decrypt_decompress(
+ space_crypt, space_flags,
+ {page.get(), static_cast<size_t>(physical_size)}, space_id,
+ page_compress_buf.get()))
+ return err;
+ }
+
+ const auto *rec= page_rec_get_next(page_get_infimum_rec(page.get()));
+ const auto comp= dict_table_is_comp(index->table);
+ const auto info_bits= rec_get_info_bits(rec, comp);
+
+ if (page_rec_is_supremum(rec) || !(info_bits & REC_INFO_MIN_REC_FLAG))
+ {
+ ib::error() << "Table " << index->table->name
+ << " is missing instant ALTER metadata";
+ index->table->corrupted= true;
+ return DB_CORRUPTION;
+ }
+
+ if ((info_bits & ~REC_INFO_DELETED_FLAG) != REC_INFO_MIN_REC_FLAG ||
+ (comp && rec_get_status(rec) != REC_STATUS_INSTANT))
+ {
+ incompatible:
+ ib::error() << "Table " << index->table->name
+ << " contains unrecognizable instant ALTER metadata";
+ index->table->corrupted= true;
+ return DB_CORRUPTION;
+ }
+
+ if (info_bits & REC_INFO_DELETED_FLAG)
+ {
+ ulint trx_id_offset= index->trx_id_offset;
+ ut_ad(index->n_uniq);
+
+ if (trx_id_offset)
+ {
+ }
+ else if (index->table->not_redundant())
+ {
+
+ for (uint i= index->n_uniq; i--;)
+ trx_id_offset+= index->fields[i].fixed_len;
+ }
+ else if (rec_get_1byte_offs_flag(rec))
+ {
+ trx_id_offset= rec_1_get_field_end_info(rec, index->n_uniq - 1);
+ ut_ad(!(trx_id_offset & REC_1BYTE_SQL_NULL_MASK));
+ trx_id_offset&= ~REC_1BYTE_SQL_NULL_MASK;
+ }
+ else
+ {
+ trx_id_offset= rec_2_get_field_end_info(rec, index->n_uniq - 1);
+ ut_ad(!(trx_id_offset & REC_2BYTE_SQL_NULL_MASK));
+ trx_id_offset&= ~REC_2BYTE_SQL_NULL_MASK;
+ }
+
+ const byte *ptr=
+ rec + trx_id_offset + (DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN);
+
+ if (mach_read_from_4(ptr + BTR_EXTERN_LEN))
+ goto incompatible;
+
+ uint len= mach_read_from_4(ptr + BTR_EXTERN_LEN + 4);
+ if (!len || mach_read_from_4(ptr + BTR_EXTERN_OFFSET) != FIL_PAGE_DATA)
+ goto incompatible;
+
+ std::unique_ptr<byte[], decltype(&aligned_free)> second_page(
+ static_cast<byte *>(aligned_malloc(physical_size, physical_size)),
+ &aligned_free);
+
+ if (dberr_t err= os_file_read_no_error_handling(
+ IORequest(IORequest::READ), file, second_page.get(),
+ mach_read_from_4(ptr + BTR_EXTERN_PAGE_NO) * physical_size,
+ srv_page_size, nullptr))
+ return err;
+
+ if (dberr_t err= decrypt_decompress(
+ space_crypt, space_flags,
+ {second_page.get(), static_cast<size_t>(physical_size)},
+ space_id, page_compress_buf.get()))
+ return err;
+
+ if (fil_page_get_type(second_page.get()) != FIL_PAGE_TYPE_BLOB ||
+ mach_read_from_4(
+ &second_page[FIL_PAGE_DATA + BTR_BLOB_HDR_NEXT_PAGE_NO]) !=
+ FIL_NULL ||
+ mach_read_from_4(
+ &second_page[FIL_PAGE_DATA + BTR_BLOB_HDR_PART_LEN]) != len)
+ goto incompatible;
+
+ /* The unused part of the BLOB page should be zero-filled. */
+ for (const byte *
+ b= second_page.get() + (FIL_PAGE_DATA + BTR_BLOB_HDR_SIZE) +
+ len,
+ *const end= second_page.get() + srv_page_size - BTR_EXTERN_LEN;
+ b < end;)
+ {
+ if (*b++)
+ goto incompatible;
+ }
+
+ if (index->table->deserialise_columns(
+ &second_page[FIL_PAGE_DATA + BTR_BLOB_HDR_SIZE], len))
+ goto incompatible;
+ }
+
+ rec_offs *offsets= rec_get_offsets(
+ rec, index, nullptr, index->n_core_fields, ULINT_UNDEFINED, &heap);
+ if (rec_offs_any_default(offsets))
+ {
+ inconsistent:
+ goto incompatible;
+ }
+
+ /* In fact, because we only ever append fields to the metadata
+ record, it is also OK to perform READ UNCOMMITTED and
+ then ignore any extra fields, provided that
+ trx_sys.is_registered(DB_TRX_ID). */
+ if (rec_offs_n_fields(offsets) >
+ ulint(index->n_fields) + !!index->table->instant &&
+ !trx_sys.is_registered(current_trx(),
+ row_get_rec_trx_id(rec, index, offsets)))
+ goto inconsistent;
+
+ for (unsigned i= index->n_core_fields; i < index->n_fields; i++)
+ {
+ dict_col_t *col= index->fields[i].col;
+ const unsigned o= i + !!index->table->instant;
+ ulint len;
+ const byte *data= rec_get_nth_field(rec, offsets, o, &len);
+ ut_ad(!col->is_added());
+ ut_ad(!col->def_val.data);
+ col->def_val.len= len;
+ switch (len) {
+ case UNIV_SQL_NULL:
+ continue;
+ case 0:
+ col->def_val.data= field_ref_zero;
+ continue;
+ }
+ ut_ad(len != UNIV_SQL_DEFAULT);
+ if (!rec_offs_nth_extern(offsets, o))
+ col->def_val.data= mem_heap_dup(index->table->heap, data, len);
+ else if (len < BTR_EXTERN_FIELD_REF_SIZE ||
+ !memcmp(data + len - BTR_EXTERN_FIELD_REF_SIZE, field_ref_zero,
+ BTR_EXTERN_FIELD_REF_SIZE))
+ {
+ col->def_val.len= UNIV_SQL_DEFAULT;
+ goto inconsistent;
+ }
+ else
+ {
+ col->def_val.data= btr_copy_externally_stored_field(
+ &col->def_val.len, data, srv_page_size, len, index->table->heap);
+ }
+ }
+ }
+
+ return DB_SUCCESS;
+}
+
/**
Read the contents of the <tablename>.cfg file.
@return DB_SUCCESS or error code. */
@@ -3379,26 +3709,30 @@ dberr_t row_import_update_discarded_flag(trx_t* trx, table_id_t table_id,
/** InnoDB writes page by page when there is page compressed
tablespace involved. It does help to save the disk space when
punch hole is enabled
-@param iter Tablespace iterator
+@param iter Tablespace iterator
+@param full_crc32 whether the file is in the full_crc32 format
@param write_request Request to write into the file
-@param offset offset of the file to be written
-@param writeptr buffer to be written
-@param n_bytes number of bytes to be written
-@param try_punch_only Try the range punch only because the
- current range is full of empty pages
+@param offset offset of the file to be written
+@param writeptr buffer to be written
+@param n_bytes number of bytes to be written
+@param try_punch_only Try the range punch only because the
+ current range is full of empty pages
@return DB_SUCCESS */
static
dberr_t fil_import_compress_fwrite(const fil_iterator_t &iter,
+ bool full_crc32,
const IORequest &write_request,
os_offset_t offset,
const byte *writeptr,
ulint n_bytes,
- bool try_punch_only=false)
+ bool try_punch_only= false)
{
- dberr_t err= os_file_punch_hole(iter.file, offset, n_bytes);
- if (err != DB_SUCCESS || try_punch_only)
+ if (dberr_t err= os_file_punch_hole(iter.file, offset, n_bytes))
return err;
+ if (try_punch_only)
+ return DB_SUCCESS;
+
for (ulint j= 0; j < n_bytes; j+= srv_page_size)
{
/* Read the original data length from block and
@@ -3408,36 +3742,37 @@ dberr_t fil_import_compress_fwrite(const fil_iterator_t &iter,
if (j || offset)
{
n_write_bytes= mach_read_from_2(writeptr + j + FIL_PAGE_DATA);
- const unsigned ptype= mach_read_from_2(writeptr + j + FIL_PAGE_TYPE);
+ const unsigned ptype= mach_read_from_2(writeptr + j + FIL_PAGE_TYPE);
/* Ignore the empty page */
if (ptype == 0 && n_write_bytes == 0)
continue;
- n_write_bytes+= FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE;
- if (ptype == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED)
- n_write_bytes+= FIL_PAGE_COMPRESSION_METHOD_SIZE;
+ if (full_crc32)
+ n_write_bytes= buf_page_full_crc32_size(writeptr + j,
+ nullptr, nullptr);
+ else
+ {
+ n_write_bytes+= ptype == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED
+ ? FIL_PAGE_DATA + FIL_PAGE_ENCRYPT_COMP_METADATA_LEN
+ : FIL_PAGE_DATA + FIL_PAGE_COMP_METADATA_LEN;
+ }
}
- err= os_file_write(write_request, iter.filepath, iter.file,
- writeptr + j, offset + j, n_write_bytes);
- if (err != DB_SUCCESS)
- break;
+ if (dberr_t err= os_file_write(write_request, iter.filepath, iter.file,
+ writeptr + j, offset + j, n_write_bytes))
+ return err;
}
- return err;
+ return DB_SUCCESS;
}
dberr_t FetchIndexRootPages::run(const fil_iterator_t& iter,
- buf_block_t* block) UNIV_NOTHROW
+ buf_block_t* block) UNIV_NOTHROW
{
- const ulint size= get_page_size().physical();
- const ulint buf_size = srv_page_size
-#ifdef HAVE_LZO
- + LZO1X_1_15_MEM_COMPRESS
-#elif defined HAVE_SNAPPY
- + snappy_max_compressed_length(srv_page_size)
-#endif
- ;
- byte* page_compress_buf = static_cast<byte*>(malloc(buf_size));
+ const unsigned zip_size= fil_space_t::zip_size(m_space_flags);
+ const unsigned size= zip_size ? zip_size : unsigned(srv_page_size);
+ byte* page_compress_buf= static_cast<byte*>(malloc(get_buf_size()));
+ const bool full_crc32 = fil_space_t::full_crc32(m_space_flags);
+ bool skip_checksum_check = false;
ut_ad(!srv_read_only_mode);
if (!page_compress_buf)
@@ -3476,38 +3811,47 @@ page_corrupted:
goto func_exit;
}
- page_compressed= fil_page_is_compressed_encrypted(readptr) ||
- fil_page_is_compressed(readptr);
+ page_compressed=
+ (full_crc32 && fil_space_t::is_compressed(m_space_flags) &&
+ buf_page_is_compressed(readptr, m_space_flags)) ||
+ (fil_page_is_compressed_encrypted(readptr) ||
+ fil_page_is_compressed(readptr));
if (page_compressed && block->page.zip.data)
goto page_corrupted;
if (encrypted)
{
- if (!fil_space_verify_crypt_checksum(readptr, get_page_size()))
+ if (!buf_page_verify_crypt_checksum(readptr, m_space_flags))
goto page_corrupted;
if (ENCRYPTION_KEY_NOT_ENCRYPTED ==
- mach_read_from_4(readptr + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION))
+ buf_page_get_key_version(readptr, m_space_flags))
goto page_corrupted;
- if ((err = fil_space_decrypt(iter.crypt_data, readptr,
- get_page_size(), readptr)))
+ if ((err= fil_space_decrypt(get_space_id(), iter.crypt_data, readptr, size,
+ m_space_flags, readptr)))
goto func_exit;
}
+ /* For full_crc32 format, skip checksum check
+ after decryption. */
+ skip_checksum_check= full_crc32 && encrypted;
+
if (page_compressed)
{
- ulint compress_length = fil_page_decompress(page_compress_buf, readptr);
+ ulint compress_length= fil_page_decompress(page_compress_buf,
+ readptr,
+ m_space_flags);
ut_ad(compress_length != srv_page_size);
if (compress_length == 0)
goto page_corrupted;
}
- else if (buf_page_is_corrupted(
- false, readptr, get_page_size(), NULL))
+ else if (!skip_checksum_check
+ && buf_page_is_corrupted(false, readptr, m_space_flags))
goto page_corrupted;
- err = this->operator()(block);
+ err= this->operator()(block);
func_exit:
free(page_compress_buf);
return err;
@@ -3519,30 +3863,27 @@ static dberr_t fil_iterate(
AbstractCallback& callback)
{
os_offset_t offset;
- const ulint size = callback.get_page_size().physical();
+ const ulint size = callback.physical_size();
ulint n_bytes = iter.n_io_buffers * size;
- const ulint buf_size = srv_page_size
-#ifdef HAVE_LZO
- + LZO1X_1_15_MEM_COMPRESS
-#elif defined HAVE_SNAPPY
- + snappy_max_compressed_length(srv_page_size)
-#endif
- ;
- byte* page_compress_buf = static_cast<byte*>(malloc(buf_size));
+ byte* page_compress_buf= static_cast<byte*>(malloc(get_buf_size()));
ut_ad(!srv_read_only_mode);
if (!page_compress_buf) {
return DB_OUT_OF_MEMORY;
}
+ ulint actual_space_id = 0;
+ const bool full_crc32 = fil_space_t::full_crc32(
+ callback.get_space_flags());
+
/* TODO: For ROW_FORMAT=COMPRESSED tables we do a lot of useless
copying for non-index pages. Unfortunately, it is
required by buf_zip_decompress() */
dberr_t err = DB_SUCCESS;
bool page_compressed = false;
bool punch_hole = true;
- IORequest write_request(IORequest::WRITE);
+ const IORequest write_request(IORequest::WRITE);
for (offset = iter.start; offset < iter.end; offset += n_bytes) {
if (callback.is_interrupted()) {
@@ -3596,15 +3937,10 @@ static dberr_t fil_iterate(
byte* src = readptr + i * size;
const ulint page_no = page_get_page_no(src);
if (!page_no && block->page.id.page_no()) {
- const ulint* b = reinterpret_cast<const ulint*>
- (src);
- const ulint* const e = b + size / sizeof *b;
- do {
- if (*b++) {
- goto page_corrupted;
- }
- } while (b != e);
-
+ if (!buf_is_zeroes(span<const byte>(src,
+ size))) {
+ goto page_corrupted;
+ }
/* Proceed to the next page,
because this one is all zero. */
continue;
@@ -3620,8 +3956,19 @@ page_corrupted:
goto func_exit;
}
- page_compressed= fil_page_is_compressed_encrypted(src)
- || fil_page_is_compressed(src);
+ if (block->page.id.page_no() == 0) {
+ actual_space_id = mach_read_from_4(
+ src + FIL_PAGE_SPACE_ID);
+ }
+
+ page_compressed =
+ (full_crc32
+ && fil_space_t::is_compressed(
+ callback.get_space_flags())
+ && buf_page_is_compressed(
+ src, callback.get_space_flags()))
+ || (fil_page_is_compressed_encrypted(src)
+ || fil_page_is_compressed(src));
if (page_compressed && block->page.zip.data) {
goto page_corrupted;
@@ -3630,11 +3977,11 @@ page_corrupted:
bool decrypted = false;
byte* dst = io_buffer + i * size;
bool frame_changed = false;
+ uint key_version = buf_page_get_key_version(
+ src, callback.get_space_flags());
if (!encrypted) {
- } else if (!mach_read_from_4(
- FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
- + src)) {
+ } else if (!key_version) {
if (block->page.id.page_no() == 0
&& block->page.zip.data) {
block->page.zip.data = src;
@@ -3648,14 +3995,17 @@ page_corrupted:
memcpy(dst, src, size);
}
} else {
- if (!fil_space_verify_crypt_checksum(
- src, callback.get_page_size())) {
+ if (!buf_page_verify_crypt_checksum(
+ src, callback.get_space_flags())) {
goto page_corrupted;
}
if ((err = fil_space_decrypt(
+ actual_space_id,
iter.crypt_data, dst,
- callback.get_page_size(), src))) {
+ callback.physical_size(),
+ callback.get_space_flags(),
+ src))) {
goto func_exit;
}
@@ -3663,21 +4013,27 @@ page_corrupted:
updated = true;
}
+ /* For full_crc32 format, skip checksum check
+ after decryption. */
+ bool skip_checksum_check = full_crc32 && encrypted;
+
/* If the original page is page_compressed, we need
to decompress it before adjusting further. */
if (page_compressed) {
ulint compress_length = fil_page_decompress(
- page_compress_buf, dst);
+ page_compress_buf, dst,
+ callback.get_space_flags());
ut_ad(compress_length != srv_page_size);
if (compress_length == 0) {
goto page_corrupted;
}
updated = true;
- } else if (buf_page_is_corrupted(
+ } else if (!skip_checksum_check
+ && buf_page_is_corrupted(
false,
encrypted && !frame_changed
? dst : src,
- callback.get_page_size(), NULL)) {
+ callback.get_space_flags())) {
goto page_corrupted;
}
@@ -3740,7 +4096,7 @@ page_corrupted:
if (ulint len = fil_page_compress(
src,
page_compress_buf,
- 0,/* FIXME: compression level */
+ callback.get_space_flags(),
512,/* FIXME: proper block size */
encrypted)) {
/* FIXME: remove memcpy() */
@@ -3753,12 +4109,14 @@ page_corrupted:
/* Encrypt the page if encryption was used. */
if (encrypted && decrypted) {
byte *dest = writeptr + i * size;
+
byte* tmp = fil_encrypt_buf(
iter.crypt_data,
block->page.id.space(),
block->page.id.page_no(),
mach_read_from_8(src + FIL_PAGE_LSN),
- src, callback.get_page_size(), dest);
+ src, block->zip_size(), dest,
+ full_crc32);
if (tmp == src) {
/* TODO: remove unnecessary memcpy's */
@@ -3768,12 +4126,32 @@ page_corrupted:
updated = true;
}
+
+ /* Write checksum for the compressed full crc32 page.*/
+ if (full_crc32 && page_compressed) {
+ ut_ad(updated);
+ byte* dest = writeptr + i * size;
+ ut_d(bool comp = false);
+ ut_d(bool corrupt = false);
+ ulint size = buf_page_full_crc32_size(
+ dest,
+#ifdef UNIV_DEBUG
+ &comp, &corrupt
+#else
+ NULL, NULL
+#endif
+ );
+ ut_ad(!comp == (size == srv_page_size));
+ ut_ad(!corrupt);
+ mach_write_to_4(dest + (size - 4),
+ ut_crc32(dest, size - 4));
+ }
}
if (page_compressed && punch_hole) {
err = fil_import_compress_fwrite(
- iter, write_request, offset, writeptr, n_bytes,
- !updated);
+ iter, full_crc32, write_request, offset,
+ writeptr, n_bytes, !updated);
if (err != DB_SUCCESS) {
punch_hole = false;
@@ -3893,10 +4271,8 @@ fil_tablespace_iterate(
if (err == DB_SUCCESS) {
block->page.id = page_id_t(callback.get_space_id(), 0);
- block->page.size.copy_from(callback.get_page_size());
- if (block->page.size.is_compressed()) {
- page_zip_set_size(&block->page.zip,
- callback.get_page_size().physical());
+ if (ulint zip_size = callback.get_zip_size()) {
+ page_zip_set_size(&block->page.zip, zip_size);
/* ROW_FORMAT=COMPRESSED is not optimised for block IO
for now. We do the IMPORT page by page. */
n_io_buffers = 1;
@@ -3906,7 +4282,7 @@ fil_tablespace_iterate(
/* read (optional) crypt data */
iter.crypt_data = fil_space_read_crypt_data(
- callback.get_page_size(), page);
+ callback.get_zip_size(), page);
/* If tablespace is encrypted, it needs extra buffers */
if (iter.crypt_data && n_io_buffers > 1) {
@@ -4047,7 +4423,7 @@ row_import_for_mysql(
/* Prevent DDL operations while we are checking. */
- rw_lock_s_lock_func(&dict_operation_lock, 0, __FILE__, __LINE__);
+ rw_lock_s_lock(&dict_sys.latch);
row_import cfg;
@@ -4058,6 +4434,11 @@ row_import_for_mysql(
if (err == DB_SUCCESS) {
+ if (dberr_t err = handle_instant_metadata(table, cfg)) {
+ rw_lock_s_unlock(&dict_sys.latch);
+ return row_import_error(prebuilt, trx, err);
+ }
+
/* We have a schema file, try and match it with our
data dictionary. */
@@ -4072,14 +4453,14 @@ row_import_for_mysql(
autoinc = cfg.m_autoinc;
}
- rw_lock_s_unlock_gen(&dict_operation_lock, 0);
+ rw_lock_s_unlock(&dict_sys.latch);
DBUG_EXECUTE_IF("ib_import_set_index_root_failure",
err = DB_TOO_MANY_CONCURRENT_TRXS;);
} else if (cfg.m_missing) {
- rw_lock_s_unlock_gen(&dict_operation_lock, 0);
+ rw_lock_s_unlock(&dict_sys.latch);
/* We don't have a schema file, we will have to discover
the index root pages from the .ibd file and skip the schema
@@ -4087,7 +4468,7 @@ row_import_for_mysql(
ut_a(err == DB_FAIL);
- cfg.m_page_size.copy_from(univ_page_size);
+ cfg.m_zip_size = 0;
if (UT_LIST_GET_LEN(table->indexes) > 1) {
ib_errf(trx->mysql_thd, IB_LOG_LEVEL_ERROR,
@@ -4102,7 +4483,7 @@ row_import_for_mysql(
FetchIndexRootPages fetchIndexRootPages(table, trx);
err = fil_tablespace_iterate(
- table, IO_BUFFER_SIZE(cfg.m_page_size.physical()),
+ table, IO_BUFFER_SIZE(srv_page_size),
fetchIndexRootPages);
if (err == DB_SUCCESS) {
@@ -4115,13 +4496,22 @@ row_import_for_mysql(
if (err == DB_SUCCESS) {
err = cfg.set_root_by_heuristic();
+
+ if (err == DB_SUCCESS) {
+ if (dberr_t err =
+ handle_instant_metadata(table,
+ cfg)) {
+ return row_import_error(
+ prebuilt, trx, err);
+ }
+ }
}
}
space_flags = fetchIndexRootPages.get_space_flags();
} else {
- rw_lock_s_unlock_gen(&dict_operation_lock, 0);
+ rw_lock_s_unlock(&dict_sys.latch);
}
if (err != DB_SUCCESS) {
@@ -4140,7 +4530,8 @@ row_import_for_mysql(
/* Set the IO buffer size in pages. */
err = fil_tablespace_iterate(
- table, IO_BUFFER_SIZE(cfg.m_page_size.physical()), converter);
+ table, IO_BUFFER_SIZE(cfg.m_zip_size ? cfg.m_zip_size
+ : srv_page_size), converter);
DBUG_EXECUTE_IF("ib_import_reset_space_and_lsn_failure",
err = DB_TOO_MANY_CONCURRENT_TRXS;);
@@ -4208,7 +4599,7 @@ row_import_for_mysql(
/* Open the tablespace so that we can access via the buffer pool.
We set the 2nd param (fix_dict = true) here because we already
- have an x-lock on dict_operation_lock and dict_sys->mutex.
+ have an x-lock on dict_sys.latch and dict_sys.mutex.
The tablespace is initially opened as a temporary one, because
we will not be writing any redo log for it before we have invoked
fil_space_t::set_imported() to declare it a persistent tablespace. */
@@ -4303,12 +4694,7 @@ row_import_for_mysql(
any DB_ROW_ID stored in the table. */
if (prebuilt->clust_index_was_generated) {
-
- err = row_import_set_sys_max_row_id(prebuilt, table);
-
- if (err != DB_SUCCESS) {
- return(row_import_error(prebuilt, trx, err));
- }
+ row_import_set_sys_max_row_id(prebuilt, table);
}
ib::info() << "Phase III - Flush changes to disk";
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 82ecc02f2ec..eab4925c875 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -44,11 +44,9 @@ Created 4/20/1996 Heikki Tuuri
#include "buf0lru.h"
#include "fts0fts.h"
#include "fts0types.h"
-
#ifdef WITH_WSREP
+#include <wsrep.h>
#include <mysql/service_wsrep.h>
-#include "../../../wsrep/wsrep_api.h"
-#include "wsrep_mysqld_c.h"
#endif /* WITH_WSREP */
/*************************************************************************
@@ -970,11 +968,13 @@ row_ins_foreign_fill_virtual(
#ifdef WITH_WSREP
dberr_t wsrep_append_foreign_key(trx_t *trx,
- dict_foreign_t* foreign,
- const rec_t* clust_rec,
- dict_index_t* clust_index,
- ibool referenced,
- enum wsrep_key_type key_type);
+ dict_foreign_t* foreign,
+ const rec_t* clust_rec,
+ dict_index_t* clust_index,
+ bool referenced,
+ upd_node_t* upd_node,
+ bool pa_disable,
+ Wsrep_service_key_type key_type);
#endif /* WITH_WSREP */
/*********************************************************************//**
@@ -1197,8 +1197,11 @@ row_ins_foreign_check_on_constraint(
}
if (table->fts) {
- doc_id = fts_get_doc_id_from_rec(table, clust_rec,
- clust_index, tmp_heap);
+ doc_id = fts_get_doc_id_from_rec(
+ clust_rec, clust_index,
+ rec_get_offsets(clust_rec, clust_index, NULL,
+ clust_index->n_core_fields,
+ ULINT_UNDEFINED, &tmp_heap));
}
if (node->is_delete
@@ -1322,11 +1325,13 @@ row_ins_foreign_check_on_constraint(
}
#ifdef WITH_WSREP
- err = wsrep_append_foreign_key(trx, foreign, clust_rec, clust_index,
- FALSE, WSREP_KEY_EXCLUSIVE);
- if (err != DB_SUCCESS) {
- ib::info() << "WSREP: foreign key append failed: " << err;
- goto nonstandard_exit_func;
+ if (trx->is_wsrep()) {
+ err = wsrep_append_foreign_key(trx, foreign, clust_rec, clust_index,
+ false, NULL, true,
+ WSREP_SERVICE_KEY_EXCLUSIVE);
+ if (err != DB_SUCCESS) {
+ goto nonstandard_exit_func;
+ }
}
#endif /* WITH_WSREP */
mtr_commit(mtr);
@@ -1441,7 +1446,7 @@ row_ins_set_exclusive_rec_lock(
/***************************************************************//**
Checks if foreign key constraint fails for an index entry. Sets shared locks
which lock either the success or the failure of the constraint. NOTE that
-the caller must have a shared latch on dict_operation_lock.
+the caller must have a shared latch on dict_sys.latch.
@return DB_SUCCESS, DB_NO_REFERENCED_ROW, or DB_ROW_IS_REFERENCED */
dberr_t
row_ins_check_foreign_constraint(
@@ -1482,7 +1487,7 @@ row_ins_check_foreign_constraint(
upd_node= NULL;
#endif /* WITH_WSREP */
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_S));
+ ut_ad(rw_lock_own(&dict_sys.latch, RW_LOCK_S));
err = DB_SUCCESS;
@@ -1722,35 +1727,16 @@ row_ins_check_foreign_constraint(
if (check_ref) {
err = DB_SUCCESS;
#ifdef WITH_WSREP
- if (!trx->is_wsrep()) {
- goto end_scan;
- }
- enum wsrep_key_type key_type;
- if (upd_node != NULL) {
- key_type = WSREP_KEY_SHARED;
- } else {
- switch (wsrep_certification_rules) {
- default:
- case WSREP_CERTIFICATION_RULES_STRICT:
- key_type = WSREP_KEY_EXCLUSIVE;
- break;
- case WSREP_CERTIFICATION_RULES_OPTIMIZED:
- key_type = WSREP_KEY_SEMI;
- break;
- }
- }
-
- err = wsrep_append_foreign_key(
- trx,
- foreign,
- rec,
- check_index,
- check_ref,
- key_type);
-
- if (err != DB_SUCCESS) {
- fprintf(stderr,
- "WSREP: foreign key append failed: %d\n", err);
+ if (trx->is_wsrep()) {
+ err = wsrep_append_foreign_key(
+ thr_get_trx(thr),
+ foreign,
+ rec,
+ check_index,
+ check_ref,
+ upd_node,
+ false,
+ WSREP_SERVICE_KEY_REFERENCE);
}
#endif /* WITH_WSREP */
goto end_scan;
@@ -1888,8 +1874,14 @@ bool row_ins_foreign_index_entry(dict_foreign_t *foreign,
{
for (ulint j= 0; j < index->n_fields; j++)
{
- const char *col_name= dict_table_get_col_name(
- index->table, dict_index_get_nth_col_no(index, j));
+ const dict_col_t *col= dict_index_get_nth_col(index, j);
+
+ /* A clustered index may contain instantly dropped columns,
+ which must be skipped. */
+ if (col->is_dropped())
+ continue;
+
+ const char *col_name= dict_table_get_col_name(index->table, col->ind);
if (0 == innobase_strcasecmp(col_name, foreign->foreign_col_names[i]))
{
dfield_copy(&ref_entry->fields[i], &entry->fields[j]);
@@ -1987,7 +1979,7 @@ row_ins_check_foreign_constraints(
}
/* NOTE that if the thread ends up waiting for a lock
- we will release dict_operation_lock temporarily!
+ we will release dict_sys.latch temporarily!
But the counter on the table protects the referenced
table from being dropped while the check is running. */
@@ -2607,25 +2599,32 @@ row_ins_clust_index_entry_low(
} else {
index->set_modified(mtr);
- if (mode == BTR_MODIFY_LEAF
- && dict_index_is_online_ddl(index)) {
- mode = BTR_MODIFY_LEAF_ALREADY_S_LATCHED;
- mtr_s_lock_index(index, &mtr);
- }
+ if (UNIV_UNLIKELY(entry->is_metadata())) {
+ ut_ad(index->is_instant());
+ ut_ad(!dict_index_is_online_ddl(index));
+ ut_ad(mode == BTR_MODIFY_TREE);
+ } else {
+ if (mode == BTR_MODIFY_LEAF
+ && dict_index_is_online_ddl(index)) {
+ mode = BTR_MODIFY_LEAF_ALREADY_S_LATCHED;
+ mtr_s_lock_index(index, &mtr);
+ }
- if (unsigned ai = index->table->persistent_autoinc) {
- /* Prepare to persist the AUTO_INCREMENT value
- from the index entry to PAGE_ROOT_AUTO_INC. */
- const dfield_t* dfield = dtuple_get_nth_field(
- entry, ai - 1);
- auto_inc = dfield_is_null(dfield)
- ? 0
- : row_parse_int(static_cast<const byte*>(
+ if (unsigned ai = index->table->persistent_autoinc) {
+ /* Prepare to persist the AUTO_INCREMENT value
+ from the index entry to PAGE_ROOT_AUTO_INC. */
+ const dfield_t* dfield = dtuple_get_nth_field(
+ entry, ai - 1);
+ if (!dfield_is_null(dfield)) {
+ auto_inc = row_parse_int(
+ static_cast<const byte*>(
dfield->data),
dfield->len,
dfield->type.mtype,
dfield->type.prtype
& DATA_UNSIGNED);
+ }
+ }
}
}
@@ -2655,35 +2654,25 @@ row_ins_clust_index_entry_low(
#endif /* UNIV_DEBUG */
if (UNIV_UNLIKELY(entry->info_bits != 0)) {
- ut_ad(entry->info_bits == REC_INFO_METADATA);
+ ut_ad(entry->is_metadata());
ut_ad(flags == BTR_NO_LOCKING_FLAG);
ut_ad(index->is_instant());
ut_ad(!dict_index_is_online_ddl(index));
const rec_t* rec = btr_cur_get_rec(cursor);
- switch (rec_get_info_bits(rec, page_rec_is_comp(rec))
- & (REC_INFO_MIN_REC_FLAG | REC_INFO_DELETED_FLAG)) {
- case REC_INFO_MIN_REC_FLAG:
+ if (rec_get_info_bits(rec, page_rec_is_comp(rec))
+ & REC_INFO_MIN_REC_FLAG) {
thr_get_trx(thr)->error_info = index;
err = DB_DUPLICATE_KEY;
goto err_exit;
- case REC_INFO_MIN_REC_FLAG | REC_INFO_DELETED_FLAG:
- /* The metadata record never carries the delete-mark
- in MariaDB Server 10.3.
- If a table loses its 'instantness', it happens
- by the rollback of this first-time insert, or
- by a call to btr_page_empty() on the root page
- when the table becomes empty. */
- err = DB_CORRUPTION;
- goto err_exit;
- default:
- ut_ad(!row_ins_must_modify_rec(cursor));
- goto do_insert;
}
+
+ ut_ad(!row_ins_must_modify_rec(cursor));
+ goto do_insert;
}
- if (rec_is_metadata(btr_cur_get_rec(cursor), index)) {
+ if (rec_is_metadata(btr_cur_get_rec(cursor), *index)) {
goto do_insert;
}
@@ -3047,9 +3036,9 @@ row_ins_sec_index_entry_low(
if (!index->is_committed()) {
ut_ad(!thr_get_trx(thr)
->dict_operation_lock_mode);
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_set_corrupted_index_cache_only(index);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
/* Do not return any error to the
caller. The duplicate will be reported
by ALTER TABLE or CREATE UNIQUE INDEX.
@@ -3193,9 +3182,27 @@ row_ins_clust_index_entry(
n_uniq = dict_index_is_unique(index) ? index->n_uniq : 0;
+#ifdef WITH_WSREP
+ const bool skip_locking
+ = wsrep_thd_skip_locking(thr_get_trx(thr)->mysql_thd);
+ ulint flags = index->table->no_rollback() ? BTR_NO_ROLLBACK
+ : (index->table->is_temporary() || skip_locking)
+ ? BTR_NO_LOCKING_FLAG : 0;
+#ifdef UNIV_DEBUG
+ if (skip_locking && strcmp(wsrep_get_sr_table_name(),
+ index->table->name.m_name)) {
+ WSREP_ERROR("Record locking is disabled in this thread, "
+ "but the table being modified is not "
+ "`%s`: `%s`.", wsrep_get_sr_table_name(),
+ index->table->name.m_name);
+ ut_error;
+ }
+#endif /* UNIV_DEBUG */
+#else
ulint flags = index->table->no_rollback() ? BTR_NO_ROLLBACK
: index->table->is_temporary()
? BTR_NO_LOCKING_FLAG : 0;
+#endif /* WITH_WSREP */
const ulint orig_n_fields = entry->n_fields;
/* For intermediate table during copy alter table,
@@ -3414,6 +3421,24 @@ row_ins_index_entry_set_vals(
ut_ad(dtuple_get_n_fields(row)
== dict_table_get_n_cols(index->table));
row_field = dtuple_get_nth_v_field(row, v_col->v_pos);
+ } else if (col->is_dropped()) {
+ ut_ad(index->is_primary());
+
+ if (!(col->prtype & DATA_NOT_NULL)) {
+ field->data = NULL;
+ field->len = UNIV_SQL_NULL;
+ field->type.prtype = DATA_BINARY_TYPE;
+ } else {
+ ut_ad(col->len <= sizeof field_ref_zero);
+ ut_ad(ind_field->fixed_len <= col->len);
+ dfield_set_data(field, field_ref_zero,
+ ind_field->fixed_len);
+ field->type.prtype = DATA_NOT_NULL;
+ }
+
+ field->type.mtype = col->len
+ ? DATA_FIXBINARY : DATA_BINARY;
+ continue;
} else {
row_field = dtuple_get_nth_field(
row, ind_field->col->ind);
@@ -3423,7 +3448,7 @@ row_ins_index_entry_set_vals(
/* Check column prefix indexes */
if (ind_field != NULL && ind_field->prefix_len > 0
- && dfield_get_len(row_field) != UNIV_SQL_NULL) {
+ && len != UNIV_SQL_NULL) {
const dict_col_t* col
= dict_field_get_col(ind_field);
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index 6095d72bb86..c0396c33cc4 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -42,7 +42,7 @@ Created 2011-05-26 Marko Makela
#include <algorithm>
#include <map>
-ulint onlineddl_rowlog_rows;
+Atomic_counter<ulint> onlineddl_rowlog_rows;
ulint onlineddl_rowlog_pct_used;
ulint onlineddl_pct_progress;
@@ -293,7 +293,8 @@ row_log_block_allocate(
);
log_buf.block = ut_allocator<byte>(mem_key_row_log_buf)
- .allocate_large(srv_sort_buf_size, &log_buf.block_pfx);
+ .allocate_large(srv_sort_buf_size,
+ &log_buf.block_pfx);
if (log_buf.block == NULL) {
DBUG_RETURN(false);
@@ -313,7 +314,8 @@ row_log_block_free(
DBUG_ENTER("row_log_block_free");
if (log_buf.block != NULL) {
ut_allocator<byte>(mem_key_row_log_buf).deallocate_large(
- log_buf.block, &log_buf.block_pfx, log_buf.size);
+ log_buf.block, &log_buf.block_pfx,
+ log_buf.size);
log_buf.block = NULL;
}
DBUG_VOID_RETURN;
@@ -607,7 +609,7 @@ write_failed:
err_exit:
mutex_exit(&log->mutex);
- my_atomic_addlint(&onlineddl_rowlog_rows, 1);
+ onlineddl_rowlog_rows++;
/* 10000 means 100.00%, 4525 means 45.25% */
onlineddl_rowlog_pct_used = static_cast<ulint>((log->tail.total * 10000) / srv_online_max_size);
}
@@ -685,9 +687,9 @@ row_log_table_delete(
fields of the record. */
heap = mem_heap_create(
DATA_TRX_ID_LEN
- + DTUPLE_EST_ALLOC(unsigned(new_index->n_uniq) + 2));
- old_pk = tuple = dtuple_create(
- heap, unsigned(new_index->n_uniq) + 2);
+ + DTUPLE_EST_ALLOC(new_index->first_user_field()));
+ old_pk = tuple = dtuple_create(heap,
+ new_index->first_user_field());
dict_index_copy_types(tuple, new_index, tuple->n_fields);
dtuple_set_n_fields_cmp(tuple, new_index->n_uniq);
@@ -852,7 +854,7 @@ row_log_table_low_redundant(
const bool is_instant = index->online_log->is_instant(index);
rec_comp_status_t status = is_instant
- ? REC_STATUS_COLUMNS_ADDED : REC_STATUS_ORDINARY;
+ ? REC_STATUS_INSTANT : REC_STATUS_ORDINARY;
size = rec_get_converted_size_temp<true>(
index, tuple->fields, tuple->n_fields, &extra_size, status);
@@ -906,7 +908,7 @@ row_log_table_low_redundant(
*b++ = static_cast<byte>(extra_size);
}
- if (status == REC_STATUS_COLUMNS_ADDED) {
+ if (status == REC_STATUS_INSTANT) {
ut_ad(is_instant);
if (n_fields <= index->online_log->n_core_fields) {
status = REC_STATUS_ORDINARY;
@@ -972,7 +974,7 @@ row_log_table_low(
ut_ad(!"wrong page type");
}
#endif /* UNIV_DEBUG */
- ut_ad(!rec_is_metadata(rec, index));
+ ut_ad(!rec_is_metadata(rec, *index));
ut_ad(page_rec_is_leaf(rec));
ut_ad(!page_is_comp(page_align(rec)) == !rec_offs_comp(offsets));
/* old_pk=row_log_table_get_pk() [not needed in INSERT] is a prefix
@@ -995,7 +997,7 @@ row_log_table_low(
ut_ad(page_is_comp(page_align(rec)));
ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY
- || rec_get_status(rec) == REC_STATUS_COLUMNS_ADDED);
+ || rec_get_status(rec) == REC_STATUS_INSTANT);
const ulint omit_size = REC_N_NEW_EXTRA_BYTES;
@@ -1069,7 +1071,7 @@ row_log_table_low(
if (is_instant) {
*b++ = fake_extra_size
- ? REC_STATUS_COLUMNS_ADDED
+ ? REC_STATUS_INSTANT
: rec_get_status(rec);
} else {
ut_ad(rec_get_status(rec) == REC_STATUS_ORDINARY);
@@ -1136,13 +1138,14 @@ row_log_table_get_pk_old_col(
/** Maps an old table column of a PRIMARY KEY column.
@param[in] ifield clustered index field in the new table (after
ALTER TABLE)
+@param[in] index the clustered index of ifield
@param[in,out] dfield clustered index tuple field in the new table
@param[in,out] heap memory heap for allocating dfield contents
@param[in] rec clustered index leaf page record in the old
table
@param[in] offsets rec_get_offsets(rec)
@param[in] i rec field corresponding to col
-@param[in] page_size page size of the old table
+@param[in] zip_size ROW_FORMAT=COMPRESSED size of the old table
@param[in] max_len maximum length of dfield
@param[in] log row log for the table
@retval DB_INVALID_NULL if a NULL value is encountered
@@ -1151,12 +1154,13 @@ static
dberr_t
row_log_table_get_pk_col(
const dict_field_t* ifield,
+ const dict_index_t* index,
dfield_t* dfield,
mem_heap_t* heap,
const rec_t* rec,
const rec_offs* offsets,
ulint i,
- const page_size_t& page_size,
+ ulint zip_size,
ulint max_len,
const row_log_t* log)
{
@@ -1200,7 +1204,7 @@ row_log_table_get_pk_col(
mem_heap_alloc(heap, field_len));
len = btr_copy_externally_stored_field_prefix(
- blob_field, field_len, page_size, field, len);
+ blob_field, field_len, zip_size, field, len);
if (len >= max_len + 1) {
return(DB_TOO_BIG_INDEX_COL);
}
@@ -1251,20 +1255,17 @@ row_log_table_get_pk(
ulint trx_id_offs = index->trx_id_offset;
if (!trx_id_offs) {
- ulint pos = dict_index_get_sys_col_pos(
- index, DATA_TRX_ID);
ulint len;
- ut_ad(pos > 0);
if (!offsets) {
offsets = rec_get_offsets(
- rec, index, NULL,
+ rec, index, nullptr,
index->n_core_fields,
- pos + 1, heap);
+ index->db_trx_id() + 1, heap);
}
trx_id_offs = rec_get_nth_field_offs(
- offsets, pos, &len);
+ offsets, index->db_trx_id(), &len);
ut_ad(len == DATA_TRX_ID_LEN);
}
@@ -1309,7 +1310,7 @@ row_log_table_get_pk(
}
if (!offsets) {
- offsets = rec_get_offsets(rec, index, NULL,
+ offsets = rec_get_offsets(rec, index, nullptr,
index->n_core_fields,
ULINT_UNDEFINED, heap);
}
@@ -1320,8 +1321,7 @@ row_log_table_get_pk(
const ulint max_len = DICT_MAX_FIELD_LEN_BY_FORMAT(new_table);
- const page_size_t& page_size
- = dict_table_page_size(index->table);
+ const ulint zip_size = index->table->space->zip_size();
for (ulint new_i = 0; new_i < new_n_uniq; new_i++) {
dict_field_t* ifield;
@@ -1347,8 +1347,9 @@ row_log_table_get_pk(
}
log->error = row_log_table_get_pk_col(
- ifield, dfield, *heap,
- rec, offsets, i, page_size, max_len, log);
+ ifield, new_index, dfield, *heap,
+ rec, offsets, i, zip_size, max_len,
+ log);
if (log->error != DB_SUCCESS) {
err_exit:
@@ -1568,11 +1569,17 @@ row_log_table_apply_convert_mrec(
const dict_col_t* col
= dict_field_get_col(ind_field);
+ if (col->is_dropped()) {
+ /* the column was instantly dropped earlier */
+ ut_ad(index->table->instant);
+ continue;
+ }
+
ulint col_no
= log->col_map[dict_col_get_no(col)];
if (col_no == ULINT_UNDEFINED) {
- /* dropped column */
+ /* the column is being dropped now */
continue;
}
@@ -1609,7 +1616,7 @@ row_log_table_apply_convert_mrec(
data = btr_rec_copy_externally_stored_field(
mrec, offsets,
- dict_table_page_size(index->table),
+ index->table->space->zip_size(),
i, &len, heap);
ut_a(data);
dfield_set_data(dfield, data, len);
@@ -1647,12 +1654,12 @@ blob_done:
/* See if any columns were changed to NULL or NOT NULL. */
const dict_col_t* new_col
= dict_table_get_nth_col(log->table, col_no);
- ut_ad(new_col->mtype == col->mtype);
+ ut_ad(new_col->same_format(*col));
/* Assert that prtype matches except for nullability. */
- ut_ad(!((new_col->prtype ^ col->prtype) & ~DATA_NOT_NULL));
ut_ad(!((new_col->prtype ^ dfield_get_type(dfield)->prtype)
- & ~DATA_NOT_NULL));
+ & ~(DATA_NOT_NULL | DATA_VERSIONED
+ | CHAR_COLL_MASK << 16 | DATA_LONG_TRUE_VARCHAR)));
if (new_col->prtype == col->prtype) {
continue;
@@ -1931,8 +1938,7 @@ row_log_table_apply_delete(
btr_pcur_t pcur;
rec_offs* offsets;
- ut_ad(rec_offs_n_fields(moffsets)
- == dict_index_get_n_unique(index) + 2);
+ ut_ad(rec_offs_n_fields(moffsets) == index->first_user_field());
ut_ad(!rec_offs_any_extern(moffsets));
/* Convert the row to a search tuple. */
@@ -1982,7 +1988,7 @@ all_done:
return(DB_SUCCESS);
}
- offsets = rec_get_offsets(btr_pcur_get_rec(&pcur), index, NULL,
+ offsets = rec_get_offsets(btr_pcur_get_rec(&pcur), index, nullptr,
index->n_core_fields,
ULINT_UNDEFINED, &offsets_heap);
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
@@ -2181,7 +2187,7 @@ func_exit_committed:
/* Prepare to update (or delete) the record. */
rec_offs* cur_offsets = rec_get_offsets(
- btr_pcur_get_rec(&pcur), index, NULL, index->n_core_fields,
+ btr_pcur_get_rec(&pcur), index, nullptr, index->n_core_fields,
ULINT_UNDEFINED, &offsets_heap);
if (!log->same_pk) {
@@ -2500,8 +2506,7 @@ row_log_table_apply_op(
/* The ROW_T_DELETE record was converted by
rec_convert_dtuple_to_temp() using new_index. */
ut_ad(!new_index->is_instant());
- rec_offs_set_n_fields(offsets,
- unsigned(new_index->n_uniq) + 2);
+ rec_offs_set_n_fields(offsets, new_index->first_user_field());
rec_init_offsets_temp(mrec, new_index, offsets);
next_mrec = mrec + rec_offs_data_size(offsets);
if (next_mrec > mrec_end) {
@@ -2593,7 +2598,7 @@ row_log_table_apply_op(
rec_convert_dtuple_to_temp() using new_index. */
ut_ad(!new_index->is_instant());
rec_offs_set_n_fields(offsets,
- unsigned(new_index->n_uniq) + 2);
+ new_index->first_user_field());
rec_init_offsets_temp(mrec, new_index, offsets);
next_mrec = mrec + rec_offs_data_size(offsets);
@@ -2603,13 +2608,12 @@ row_log_table_apply_op(
/* Copy the PRIMARY KEY fields and
DB_TRX_ID, DB_ROLL_PTR from mrec to old_pk. */
- old_pk = dtuple_create(
- heap, unsigned(new_index->n_uniq) + 2);
+ old_pk = dtuple_create(heap,
+ new_index->first_user_field());
dict_index_copy_types(old_pk, new_index,
old_pk->n_fields);
- for (ulint i = 0;
- i < dict_index_get_n_unique(new_index) + 2;
+ for (ulint i = 0; i < new_index->first_user_field();
i++) {
const void* field;
ulint len;
@@ -2691,8 +2695,8 @@ ulint
row_log_progress_inc_per_block()
{
/* We must increment the progress once per page (as in
- univ_page_size, usually 16KiB). One block here is srv_sort_buf_size
- (usually 1MiB). */
+ srv_page_size, default = innodb_page_size=16KiB).
+ One block here is srv_sort_buf_size (usually 1MiB). */
const ulint pages_per_block = std::max<ulint>(
ulint(srv_sort_buf_size >> srv_page_size_shift), 1);
@@ -2760,8 +2764,8 @@ row_log_table_apply_ops(
dict_index_t* new_index = dict_table_get_first_index(
new_table);
const ulint i = 1 + REC_OFFS_HEADER_SIZE
- + ut_max(dict_index_get_n_fields(index),
- dict_index_get_n_unique(new_index) + 2);
+ + std::max<ulint>(index->n_fields,
+ new_index->first_user_field());
const ulint new_trx_id_col = dict_col_get_clust_pos(
dict_table_get_sys_col(new_table, DATA_TRX_ID), new_index);
trx_t* trx = thr_get_trx(thr);
@@ -3122,7 +3126,7 @@ row_log_table_apply(
stage->begin_phase_log_table();
- ut_ad(!rw_lock_own(&dict_operation_lock, RW_LOCK_S));
+ ut_ad(!rw_lock_own(&dict_sys.latch, RW_LOCK_S));
clust_index = dict_table_get_first_index(old_table);
if (clust_index->online_log->n_rows == 0) {
@@ -3220,7 +3224,8 @@ row_log_allocate(
log->head.total = 0;
log->path = path;
log->n_core_fields = index->n_core_fields;
- ut_ad(!table || log->is_instant(index) == index->is_instant());
+ ut_ad(!table || log->is_instant(index)
+ == (index->n_core_fields < index->n_fields));
log->allow_not_null = allow_not_null;
log->old_table = old_table;
log->n_rows = 0;
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 31e323d423c..d96edb019b6 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -435,7 +435,7 @@ row_merge_buf_redundant_convert(
const dfield_t* row_field,
dfield_t* field,
ulint len,
- const page_size_t& page_size,
+ ulint zip_size,
mem_heap_t* heap)
{
ut_ad(field->type.mbminlen == 1);
@@ -455,7 +455,7 @@ row_merge_buf_redundant_convert(
field_ref_zero, BTR_EXTERN_FIELD_REF_SIZE));
byte* data = btr_copy_externally_stored_field(
- &ext_len, field_data, page_size, field_len, heap);
+ &ext_len, field_data, zip_size, field_len, heap);
ut_ad(ext_len < len);
@@ -698,13 +698,13 @@ error:
if (conv_heap != NULL) {
row_merge_buf_redundant_convert(
row_field, field, col->len,
- dict_table_page_size(old_table),
+ old_table->space->zip_size(),
conv_heap);
} else {
/* Field length mismatch should not
happen when rebuilding redundant row
format table. */
- ut_ad(dict_table_is_comp(index->table));
+ ut_ad(index->table->not_redundant());
}
}
}
@@ -1846,7 +1846,7 @@ row_merge_read_clustered_index(
btr_pcur_open_at_index_side(
true, clust_index, BTR_SEARCH_LEAF, &pcur, true, 0, &mtr);
btr_pcur_move_to_next_user_rec(&pcur, &mtr);
- if (rec_is_metadata(btr_pcur_get_rec(&pcur), clust_index)) {
+ if (rec_is_metadata(btr_pcur_get_rec(&pcur), *clust_index)) {
ut_ad(btr_pcur_is_on_user_rec(&pcur));
/* Skip the metadata pseudo-record. */
} else {
@@ -1961,8 +1961,7 @@ row_merge_read_clustered_index(
goto scan_next;
}
- if (my_atomic_load32_explicit(&clust_index->lock.waiters,
- MY_MEMORY_ORDER_RELAXED)) {
+ if (clust_index->lock.waiters) {
/* There are waiters on the clustered
index tree lock, likely the purge
thread. Store and restore the cursor
@@ -2020,7 +2019,7 @@ end_of_index:
block = btr_block_get(
page_id_t(block->page.id.space(),
next_page_no),
- block->page.size,
+ block->zip_size(),
BTR_SEARCH_LEAF,
clust_index, &mtr);
@@ -3430,7 +3429,7 @@ void
row_merge_copy_blobs(
const mrec_t* mrec,
const rec_offs* offsets,
- const page_size_t& page_size,
+ ulint zip_size,
dtuple_t* tuple,
mem_heap_t* heap)
{
@@ -3468,10 +3467,10 @@ row_merge_copy_blobs(
BTR_EXTERN_FIELD_REF_SIZE));
data = btr_copy_externally_stored_field(
- &len, field_data, page_size, field_len, heap);
+ &len, field_data, zip_size, field_len, heap);
} else {
data = btr_rec_copy_externally_stored_field(
- mrec, offsets, page_size, i, &len, heap);
+ mrec, offsets, zip_size, i, &len, heap);
}
/* Because we have locked the table, any records
@@ -3663,8 +3662,7 @@ row_merge_insert_index_tuples(
row_log_table_blob_alloc() and
row_log_table_blob_free(). */
row_merge_copy_blobs(
- mrec, offsets,
- dict_table_page_size(old_table),
+ mrec, offsets, old_table->space->zip_size(),
dtuple, tuple_heap);
}
@@ -3747,10 +3745,9 @@ row_merge_drop_index_dict(
pars_info_t* info;
ut_ad(!srv_read_only_mode);
- ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
info = pars_info_create();
pars_info_add_ull_literal(info, "indexid", index_id);
@@ -3810,17 +3807,16 @@ row_merge_drop_indexes_dict(
pars_info_t* info;
ut_ad(!srv_read_only_mode);
- ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
/* It is possible that table->n_ref_count > 1 when
locked=TRUE. In this case, all code that should have an open
handle to the table be waiting for the next statement to execute,
or waiting for a meta-data lock.
- A concurrent purge will be prevented by dict_operation_lock. */
+ A concurrent purge will be prevented by dict_sys.latch. */
info = pars_info_create();
pars_info_add_ull_literal(info, "tableid", table_id);
@@ -3863,10 +3859,9 @@ row_merge_drop_indexes(
dict_index_t* next_index;
ut_ad(!srv_read_only_mode);
- ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
index = dict_table_get_first_index(table);
ut_ad(dict_index_is_clust(index));
@@ -3880,7 +3875,7 @@ row_merge_drop_indexes(
handle to the table be waiting for the next statement to execute,
or waiting for a meta-data lock.
- A concurrent purge will be prevented by dict_operation_lock. */
+ A concurrent purge will be prevented by dict_sys.latch. */
if (!locked && (table->get_ref_count() > 1
|| table->has_lock_other_than(alter_trx))) {
@@ -3952,7 +3947,7 @@ row_merge_drop_indexes(
rw_lock_x_unlock(dict_index_get_lock(index));
DEBUG_SYNC_C("merge_drop_index_after_abort");
- /* covered by dict_sys->mutex */
+ /* covered by dict_sys.mutex */
MONITOR_INC(MONITOR_BACKGROUND_DROP_INDEX);
/* fall through */
case ONLINE_INDEX_ABORTED:
@@ -4016,7 +4011,7 @@ row_merge_drop_indexes(
break;
case ONLINE_INDEX_ABORTED:
case ONLINE_INDEX_ABORTED_DROPPED:
- /* covered by dict_sys->mutex */
+ /* covered by dict_sys.mutex */
MONITOR_DEC(MONITOR_BACKGROUND_DROP_INDEX);
}
@@ -4323,7 +4318,7 @@ row_merge_rename_tables_dict(
ut_ad(!srv_read_only_mode);
ut_ad(old_table != new_table);
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_TABLE
|| trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
@@ -4697,7 +4692,7 @@ row_merge_build_indexes(
created */
if (!row_fts_psort_info_init(
trx, dup, new_table, opt_doc_id_size,
- dict_table_page_size(old_table),
+ old_table->space->zip_size(),
&psort_info, &merge_info)) {
error = DB_CORRUPTION;
goto func_exit;
@@ -5009,7 +5004,8 @@ func_exit:
alloc.deallocate_large(block, &block_pfx, block_size);
if (crypt_block) {
- alloc.deallocate_large(crypt_block, &crypt_pfx, block_size);
+ alloc.deallocate_large(crypt_block, &crypt_pfx,
+ block_size);
}
DICT_TF2_FLAG_UNSET(new_table, DICT_TF2_FTS_ADD_DOC_ID);
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index e79264d3fb8..84964970ad0 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -34,7 +34,6 @@ Created 9/17/2000 Heikki Tuuri
#include "btr0sea.h"
#include "dict0boot.h"
#include "dict0crea.h"
-#include <sql_const.h>
#include "dict0dict.h"
#include "dict0load.h"
#include "dict0priv.h"
@@ -71,12 +70,6 @@ Created 9/17/2000 Heikki Tuuri
#include <deque>
#include <vector>
-#ifdef WITH_WSREP
-#include "mysql/service_wsrep.h"
-#include "wsrep.h"
-#include "log.h"
-#include "wsrep_mysqld.h"
-#endif
/** Provide optional 4.x backwards compatibility for 5.0 and above */
ibool row_rollback_on_timeout = FALSE;
@@ -101,25 +94,6 @@ static ib_mutex_t row_drop_list_mutex;
/** Flag: has row_mysql_drop_list been initialized? */
static bool row_mysql_drop_list_inited;
-/*******************************************************************//**
-Determine if the given name is a name reserved for MySQL system tables.
-@return TRUE if name is a MySQL system table name */
-static
-ibool
-row_mysql_is_system_table(
-/*======================*/
- const char* name)
-{
- if (strncmp(name, "mysql/", 6) != 0) {
-
- return(FALSE);
- }
-
- return(0 == strcmp(name + 6, "host")
- || 0 == strcmp(name + 6, "user")
- || 0 == strcmp(name + 6, "db"));
-}
-
#ifdef UNIV_DEBUG
/** Wait for the background drop list to become empty. */
void
@@ -327,6 +301,7 @@ row_mysql_read_geometry(
ulint col_len) /*!< in: MySQL format length */
{
byte* data;
+ ut_ad(col_len > 8);
*len = mach_read_from_n_little_endian(ref, col_len - 8);
@@ -827,7 +802,8 @@ row_create_prebuilt(
clust_index = dict_table_get_first_index(table);
/* Make sure that search_tuple is long enough for clustered index */
- ut_a(2 * dict_table_get_n_cols(table) >= clust_index->n_fields);
+ ut_a(2 * unsigned(table->n_cols) >= unsigned(clust_index->n_fields)
+ - clust_index->table->n_dropped());
ref_len = dict_index_get_n_unique(clust_index);
@@ -1503,7 +1479,7 @@ error_exit:
srv_stats.n_rows_inserted.inc(size_t(trx->id));
}
- /* Not protected by dict_sys->mutex for performance
+ /* Not protected by dict_sys.mutex for performance
reasons, we would rather get garbage in stat_n_rows (which is
just an estimate anyway) than protecting the following code
with a latch. */
@@ -1872,7 +1848,7 @@ row_update_for_mysql(row_prebuilt_t* prebuilt)
ut_ad(is_delete == (node->is_delete == PLAIN_DELETE));
if (is_delete) {
- /* Not protected by dict_sys->mutex for performance
+ /* Not protected by dict_sys.mutex for performance
reasons, we would rather get garbage in stat_n_rows (which is
just an estimate anyway) than protecting the following code
with a latch. */
@@ -2059,7 +2035,7 @@ row_mysql_freeze_data_dictionary_func(
{
ut_a(trx->dict_operation_lock_mode == 0);
- rw_lock_s_lock_inline(&dict_operation_lock, 0, file, line);
+ rw_lock_s_lock_inline(&dict_sys.latch, 0, file, line);
trx->dict_operation_lock_mode = RW_S_LATCH;
}
@@ -2075,7 +2051,7 @@ row_mysql_unfreeze_data_dictionary(
ut_a(trx->dict_operation_lock_mode == RW_S_LATCH);
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
trx->dict_operation_lock_mode = 0;
}
@@ -2106,7 +2082,7 @@ static dberr_t row_update_vers_insert(que_thr_t* thr, upd_node_t* node)
dfield_t* row_end;
char row_end_data[8];
dict_table_t* table = node->table;
- page_size_t page_size= dict_table_page_size(table);
+ const unsigned zip_size = table->space->zip_size();
ut_ad(table->versioned());
dtuple_t* row;
@@ -2151,7 +2127,7 @@ static dberr_t row_update_vers_insert(que_thr_t* thr, upd_node_t* node)
BTR_EXTERN_FIELD_REF_SIZE));
byte *data = btr_copy_externally_stored_field(
- &ext_len, field_data, page_size, field_len,
+ &ext_len, field_data, zip_size, field_len,
node->historical_heap);
dfield_set_data(dst, data, ext_len);
}
@@ -2274,8 +2250,7 @@ row_update_cascade_for_mysql(
bool stats;
if (node->is_delete == PLAIN_DELETE) {
- /* Not protected by
- dict_sys->mutex for
+ /* Not protected by dict_sys.mutex for
performance reasons, we would rather
get garbage in stat_n_rows (which is
just an estimate anyway) than
@@ -2316,14 +2291,8 @@ row_mysql_lock_data_dictionary_func(
{
ut_a(trx->dict_operation_lock_mode == 0
|| trx->dict_operation_lock_mode == RW_X_LATCH);
-
- /* Serialize data dictionary operations with dictionary mutex:
- no deadlocks or lock waits can occur then in these operations */
-
- rw_lock_x_lock_inline(&dict_operation_lock, 0, file, line);
+ dict_sys.lock(file, line);
trx->dict_operation_lock_mode = RW_X_LATCH;
-
- mutex_enter(&dict_sys->mutex);
}
/*********************************************************************//**
@@ -2334,16 +2303,9 @@ row_mysql_unlock_data_dictionary(
trx_t* trx) /*!< in/out: transaction */
{
ut_ad(lock_trx_has_sys_table_locks(trx) == NULL);
-
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
-
- /* Serialize data dictionary operations with dictionary mutex:
- no deadlocks can occur then in these operations */
-
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(&dict_operation_lock);
-
trx->dict_operation_lock_mode = 0;
+ dict_sys.unlock();
}
/*********************************************************************//**
@@ -2365,31 +2327,17 @@ row_create_table_for_mysql(
que_thr_t* thr;
dberr_t err;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
DBUG_EXECUTE_IF(
"ib_create_table_fail_at_start_of_row_create_table_for_mysql",
- goto err_exit;
- );
-
- trx->op_info = "creating table";
-
- if (row_mysql_is_system_table(table->name.m_name)) {
-
- ib::error() << "Trying to create a MySQL system table "
- << table->name << " of type InnoDB. MySQL system"
- " tables must be of the MyISAM type!";
-#ifndef DBUG_OFF
-err_exit:
-#endif /* !DBUG_OFF */
dict_mem_table_free(table);
-
trx->op_info = "";
+ return DB_ERROR;
+ );
- return(DB_ERROR);
- }
+ trx->op_info = "creating table";
trx_start_if_not_started_xa(trx, true);
@@ -2506,8 +2454,7 @@ row_create_index_for_mysql(
ulint len;
dict_table_t* table = index->table;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
+ ut_d(dict_sys.assert_locked());
for (i = 0; i < index->n_def; i++) {
/* Check that prefix_len and actual length
@@ -2753,7 +2700,7 @@ row_mysql_drop_garbage_tables()
mtr.start();
btr_pcur_open_at_index_side(
- true, dict_table_get_first_index(dict_sys->sys_tables),
+ true, dict_table_get_first_index(dict_sys.sys_tables),
BTR_SEARCH_LEAF, &pcur, true, 0, &mtr);
for (;;) {
@@ -2863,11 +2810,15 @@ row_mysql_table_id_reassign(
dberr_t err;
pars_info_t* info = pars_info_create();
- dict_hdr_get_new_id(new_id, NULL, NULL, table, false);
+ dict_hdr_get_new_id(new_id, NULL, NULL);
pars_info_add_ull_literal(info, "old_id", table->id);
pars_info_add_ull_literal(info, "new_id", *new_id);
+ /* Note: This cannot be rolled back. Rollback would see the
+ UPDATE SYS_INDEXES as two operations: DELETE and INSERT.
+ It would invoke btr_free_if_exists() when rolling back the
+ INSERT, effectively dropping all indexes of the table. */
err = que_eval_sql(
info,
"PROCEDURE RENUMBER_TABLE_PROC () IS\n"
@@ -3097,7 +3048,7 @@ row_discard_tablespace(
dict_table_change_id_in_cache(table, new_id);
dict_index_t* index = UT_LIST_GET_FIRST(table->indexes);
- if (index) index->remove_instant();
+ if (index) index->clear_instant_alter();
/* Reset the root page numbers. */
for (; index; index = UT_LIST_GET_NEXT(indexes, index)) {
@@ -3167,6 +3118,12 @@ row_discard_tablespace_for_mysql(
err = row_discard_tablespace_foreign_key_checks(trx, table);
if (err == DB_SUCCESS) {
+ /* Note: This cannot be rolled back.
+ Rollback would see the UPDATE SYS_INDEXES
+ as two operations: DELETE and INSERT.
+ It would invoke btr_free_if_exists()
+ when rolling back the INSERT, effectively
+ dropping all indexes of the table. */
err = row_discard_tablespace(trx, table);
}
@@ -3299,7 +3256,7 @@ row_drop_table_from_cache(
is going to be destroyed below. */
trx->mod_tables.erase(table);
- dict_table_remove_from_cache(table);
+ dict_sys.remove(table);
if (dict_load_table(tablename, DICT_ERR_IGNORE_FK_NOKEY)) {
ib::error() << "Not able to remove table "
@@ -3321,7 +3278,7 @@ will remain locked.
@param[in] create_failed true=create table failed
because e.g. foreign key column
@param[in] nonatomic Whether it is permitted to release
- and reacquire dict_operation_lock
+ and reacquire dict_sys.latch
@return error code or DB_SUCCESS */
dberr_t
row_drop_table_for_mysql(
@@ -3360,8 +3317,7 @@ row_drop_table_for_mysql(
nonatomic = true;
}
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
+ ut_d(dict_sys.assert_locked());
table = dict_table_open_on_name(
name, TRUE, FALSE,
@@ -3385,15 +3341,14 @@ row_drop_table_for_mysql(
for (dict_index_t* index = dict_table_get_first_index(table);
index != NULL;
index = dict_table_get_next_index(index)) {
- btr_free(page_id_t(SRV_TMP_SPACE_ID, index->page),
- univ_page_size);
+ btr_free(page_id_t(SRV_TMP_SPACE_ID, index->page));
}
/* Remove the pointer to this table object from the list
of modified tables by the transaction because the object
is going to be destroyed below. */
trx->mod_tables.erase(table);
table->release();
- dict_table_remove_from_cache(table);
+ dict_sys.remove(table);
err = DB_SUCCESS;
goto funct_exit_all_freed;
}
@@ -4027,8 +3982,8 @@ loop:
/* The dict_table_t object must not be accessed before
dict_table_open() or after dict_table_close(). But this is OK
- if we are holding, the dict_sys->mutex. */
- ut_ad(mutex_own(&dict_sys->mutex));
+ if we are holding, the dict_sys.mutex. */
+ ut_ad(mutex_own(&dict_sys.mutex));
/* Disable statistics on the found table. */
if (!dict_stats_stop_bg(table)) {
@@ -4186,14 +4141,6 @@ row_rename_table_for_mysql(
if (high_level_read_only) {
return(DB_READ_ONLY);
-
- } else if (row_mysql_is_system_table(new_name)) {
-
- ib::error() << "Trying to create a MySQL system table "
- << new_name << " of type InnoDB. MySQL system tables"
- " must be of the MyISAM type!";
-
- goto funct_exit;
}
trx->op_info = "renaming table";
diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc
index e46d515e8c2..d61dc2c2280 100644
--- a/storage/innobase/row/row0purge.cc
+++ b/storage/innobase/row/row0purge.cc
@@ -105,33 +105,33 @@ row_purge_remove_clust_if_poss_low(
purge_node_t* node, /*!< in/out: row purge node */
ulint mode) /*!< in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */
{
- dict_index_t* index;
- bool success = true;
- mtr_t mtr;
- rec_t* rec;
- mem_heap_t* heap = NULL;
- rec_offs* offsets;
- rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
- rec_offs_init(offsets_);
-
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_S)
+ ut_ad(rw_lock_own(&dict_sys.latch, RW_LOCK_S)
|| node->vcol_info.is_used());
- index = dict_table_get_first_index(node->table);
+ dict_index_t* index = dict_table_get_first_index(node->table);
log_free_check();
- mtr_start(&mtr);
- index->set_modified(mtr);
+
+ mtr_t mtr;
+ mtr.start();
if (!row_purge_reposition_pcur(mode, node, &mtr)) {
/* The record was already removed. */
- goto func_exit;
+ mtr.commit();
+ return true;
}
- rec = btr_pcur_get_rec(&node->pcur);
+ ut_d(const bool was_instant = !!index->table->instant);
+ index->set_modified(mtr);
- offsets = rec_get_offsets(rec, index, offsets_, index->n_core_fields,
- ULINT_UNDEFINED, &heap);
+ rec_t* rec = btr_pcur_get_rec(&node->pcur);
+ rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
+ rec_offs_init(offsets_);
+ mem_heap_t* heap = NULL;
+ rec_offs* offsets = rec_get_offsets(rec, index, offsets_,
+ index->n_core_fields,
+ ULINT_UNDEFINED, &heap);
+ bool success = true;
if (node->roll_ptr != row_get_rec_roll_ptr(rec, index, offsets)) {
/* Someone else has modified the record later: do not remove */
@@ -164,6 +164,10 @@ row_purge_remove_clust_if_poss_low(
}
}
+ /* Prove that dict_index_t::clear_instant_alter() was
+ not called with index->table->instant != NULL. */
+ ut_ad(!was_instant || index->table->instant);
+
func_exit:
if (heap) {
mem_heap_free(heap);
@@ -790,7 +794,7 @@ whose old history can no longer be observed.
@param[in,out] mtr mini-transaction (will be started and committed) */
static void row_purge_reset_trx_id(purge_node_t* node, mtr_t* mtr)
{
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_S)
+ ut_ad(rw_lock_own(&dict_sys.latch, RW_LOCK_S)
|| node->vcol_info.is_used());
/* Reset DB_TRX_ID, DB_ROLL_PTR for old records. */
mtr->start();
@@ -824,8 +828,9 @@ static void row_purge_reset_trx_id(purge_node_t* node, mtr_t* mtr)
became purgeable) */
if (node->roll_ptr
== row_get_rec_roll_ptr(rec, index, offsets)) {
- ut_ad(!rec_get_deleted_flag(rec,
- rec_offs_comp(offsets)));
+ ut_ad(!rec_get_deleted_flag(
+ rec, rec_offs_comp(offsets))
+ || rec_is_alter_metadata(rec, *index));
DBUG_LOG("purge", "reset DB_TRX_ID="
<< ib::hex(row_get_rec_trx_id(
rec, index, offsets)));
@@ -867,7 +872,7 @@ row_purge_upd_exist_or_extern_func(
{
mem_heap_t* heap;
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_S)
+ ut_ad(rw_lock_own(&dict_sys.latch, RW_LOCK_S)
|| node->vcol_info.is_used());
ut_ad(!node->table->skip_alter_undo);
@@ -975,7 +980,7 @@ skip_secondaries:
block = buf_page_get(
page_id_t(rseg->space->id, page_no),
- univ_page_size, RW_X_LATCH, &mtr);
+ 0, RW_X_LATCH, &mtr);
buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE);
@@ -1066,7 +1071,7 @@ row_purge_parse_undo_rec(
for this row */
try_again:
- rw_lock_s_lock_inline(&dict_operation_lock, 0, __FILE__, __LINE__);
+ rw_lock_s_lock_inline(&dict_sys.latch, 0, __FILE__, __LINE__);
node->table = dict_table_open_on_id(
table_id, FALSE, DICT_TABLE_OP_NORMAL);
@@ -1097,7 +1102,7 @@ try_again:
if (!mysqld_server_started) {
dict_table_close(node->table, FALSE, FALSE);
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) {
return(false);
}
@@ -1127,7 +1132,7 @@ inaccessible:
dict_table_close(node->table, FALSE, FALSE);
node->table = NULL;
err_exit:
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
node->skip(table_id, trx_id);
return(false);
}
@@ -1262,10 +1267,10 @@ row_purge(
node, undo_rec, thr, updated_extern);
if (!node->vcol_info.is_used()) {
- rw_lock_s_unlock(&dict_operation_lock);
+ rw_lock_s_unlock(&dict_sys.latch);
}
- ut_ad(!rw_lock_own(&dict_operation_lock, RW_LOCK_S));
+ ut_ad(!rw_lock_own(&dict_sys.latch, RW_LOCK_S));
if (purged
|| srv_shutdown_state > SRV_SHUTDOWN_INITIATED
diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc
index 94a372bd046..41240a73365 100644
--- a/storage/innobase/row/row0quiesce.cc
+++ b/storage/innobase/row/row0quiesce.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2020, 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
@@ -70,17 +70,16 @@ row_quiesce_write_index_fields(
return(DB_IO_ERROR);
}
+ const char* field_name = field->name ? field->name : "";
/* Include the NUL byte in the length. */
- ib_uint32_t len = static_cast<ib_uint32_t>(strlen(field->name) + 1);
- ut_a(len > 1);
-
+ ib_uint32_t len = static_cast<ib_uint32_t>(strlen(field_name) + 1);
mach_write_to_4(row, len);
DBUG_EXECUTE_IF("ib_export_io_write_failure_10",
close(fileno(file)););
if (fwrite(row, 1, sizeof(len), file) != sizeof(len)
- || fwrite(field->name, 1, len, file) != len) {
+ || fwrite(field_name, 1, len, file) != len) {
ib_senderrf(
thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR,
@@ -669,9 +668,17 @@ row_quiesce_set_state(
" FTS auxiliary tables will not be flushed.");
}
+ dict_index_t* clust_index = dict_table_get_first_index(table);
+
row_mysql_lock_data_dictionary(trx);
- dict_table_x_lock_indexes(table);
+ for (dict_index_t* index = dict_table_get_next_index(clust_index);
+ index != NULL;
+ index = dict_table_get_next_index(index)) {
+ rw_lock_x_lock(&index->lock);
+ }
+
+ rw_lock_x_lock(&clust_index->lock);
switch (state) {
case QUIESCE_START:
@@ -688,7 +695,11 @@ row_quiesce_set_state(
table->quiesce = state;
- dict_table_x_unlock_indexes(table);
+ for (dict_index_t* index = dict_table_get_first_index(table);
+ index != NULL;
+ index = dict_table_get_next_index(index)) {
+ rw_lock_x_unlock(&index->lock);
+ }
row_mysql_unlock_data_dictionary(trx);
diff --git a/storage/innobase/row/row0row.cc b/storage/innobase/row/row0row.cc
index 6f34c9fcc9b..f0e5385be85 100644
--- a/storage/innobase/row/row0row.cc
+++ b/storage/innobase/row/row0row.cc
@@ -62,6 +62,10 @@ static bool row_build_spatial_index_key(
ulint flag,
mem_heap_t* heap)
{
+ if (dfield2->type.mtype == DATA_MISSING) {
+ return false;
+ }
+
double* mbr;
dfield_copy(dfield, dfield2);
@@ -92,6 +96,7 @@ static bool row_build_spatial_index_key(
if (!dfield_is_ext(dfield2)) {
dptr = static_cast<const byte*>(dfield_get_data(dfield2));
dlen = dfield_get_len(dfield2);
+ ut_ad(dptr != &data_error);
goto write_mbr;
}
@@ -152,7 +157,7 @@ static bool row_build_spatial_index_key(
temp_heap = mem_heap_create(1000);
dptr = btr_copy_externally_stored_field(
- &dlen, dptr, ext ? ext->page_size : page_size_t(space->flags),
+ &dlen, dptr, ext ? ext->zip_size : space->zip_size(),
flen, temp_heap);
write_mbr:
@@ -198,7 +203,7 @@ row_build_index_entry_low(
{
dtuple_t* entry;
ulint entry_len;
- ulint i;
+ ulint i = 0;
ulint num_v = 0;
entry_len = dict_index_get_n_fields(index);
@@ -218,77 +223,73 @@ row_build_index_entry_low(
} else {
dtuple_set_n_fields_cmp(
entry, dict_index_get_n_unique_in_tree(index));
- }
+ if (dict_index_is_spatial(index)) {
+ /* Set the MBR field */
+ if (!row_build_spatial_index_key(
+ index, ext,
+ dtuple_get_nth_field(entry, 0),
+ dtuple_get_nth_field(
+ row,
+ dict_index_get_nth_field(index, i)
+ ->col->ind), flag, heap)) {
+ return NULL;
+ }
- for (i = 0; i < entry_len + num_v; i++) {
- const dict_field_t* ind_field = NULL;
- const dict_col_t* col;
- ulint col_no = 0;
- dfield_t* dfield;
- const dfield_t* dfield2;
- ulint len;
-
- if (i >= entry_len) {
- /* This is to insert new rows to cluster index */
- ut_ad(dict_index_is_clust(index)
- && flag == ROW_BUILD_FOR_INSERT);
- dfield = dtuple_get_nth_v_field(entry, i - entry_len);
- col = &dict_table_get_nth_v_col(
- index->table, i - entry_len)->m_col;
+ i = 1;
+ }
+ }
- } else {
- ind_field = dict_index_get_nth_field(index, i);
- col = ind_field->col;
- col_no = dict_col_get_no(col);
- dfield = dtuple_get_nth_field(entry, i);
+ for (; i < entry_len; i++) {
+ const dict_field_t& f = index->fields[i];
+ dfield_t* dfield = dtuple_get_nth_field(entry, i);
+
+ if (f.col->is_dropped()) {
+ ut_ad(index->is_primary());
+ ut_ad(index->is_instant());
+ ut_ad(!f.col->is_virtual());
+ dict_col_copy_type(f.col, &dfield->type);
+ if (f.col->is_nullable()) {
+ dfield_set_null(dfield);
+ } else {
+ dfield_set_data(dfield, field_ref_zero,
+ f.fixed_len);
+ }
+ continue;
}
- compile_time_assert(DATA_MISSING == 0);
+ const dfield_t* dfield2;
- if (col->is_virtual()) {
- const dict_v_col_t* v_col
- = reinterpret_cast<const dict_v_col_t*>(col);
+ if (f.col->is_virtual()) {
+ const dict_v_col_t* v_col
+ = reinterpret_cast<const dict_v_col_t*>(f.col);
ut_ad(v_col->v_pos < dtuple_get_n_v_fields(row));
dfield2 = dtuple_get_nth_v_field(row, v_col->v_pos);
ut_ad(dfield_is_null(dfield2) ||
dfield_get_len(dfield2) == 0 || dfield2->data);
+ ut_ad(!dfield_is_ext(dfield2));
+ if (UNIV_UNLIKELY(dfield2->type.mtype
+ == DATA_MISSING)) {
+ ut_ad(flag == ROW_BUILD_FOR_PURGE);
+ return(NULL);
+ }
} else {
- dfield2 = dtuple_get_nth_field(row, col_no);
- ut_ad(dfield_get_type(dfield2)->mtype == DATA_MISSING
- || (!(dfield_get_type(dfield2)->prtype
- & DATA_VIRTUAL)));
- }
-
- if (UNIV_UNLIKELY(dfield_get_type(dfield2)->mtype
- == DATA_MISSING)) {
- /* The field has not been initialized in the row.
- This should be from trx_undo_rec_get_partial_row(). */
- return(NULL);
- }
-
-#ifdef UNIV_DEBUG
- if (dfield_get_type(dfield2)->prtype & DATA_VIRTUAL
- && dict_index_is_clust(index)) {
- ut_ad(flag == ROW_BUILD_FOR_INSERT);
- }
-#endif /* UNIV_DEBUG */
-
- /* Special handle spatial index, set the first field
- which is for store MBR. */
- if (dict_index_is_spatial(index) && i == 0) {
- if (!row_build_spatial_index_key(
- index, ext, dfield, dfield2, flag, heap)) {
- return NULL;
+ dfield2 = dtuple_get_nth_field(row, f.col->ind);
+ if (UNIV_UNLIKELY(dfield2->type.mtype
+ == DATA_MISSING)) {
+ /* The field has not been initialized in
+ the row. This should be from
+ trx_undo_rec_get_partial_row(). */
+ return(NULL);
}
- continue;
+ ut_ad(!(dfield2->type.prtype & DATA_VIRTUAL));
}
- len = dfield_get_len(dfield2);
+ compile_time_assert(DATA_MISSING == 0);
- dfield_copy(dfield, dfield2);
+ *dfield = *dfield2;
if (dfield_is_null(dfield)) {
continue;
@@ -296,14 +297,15 @@ row_build_index_entry_low(
ut_ad(!(index->type & DICT_FTS));
- if ((!ind_field || ind_field->prefix_len == 0)
+ ulint len = dfield_get_len(dfield);
+
+ if (f.prefix_len == 0
&& (!dfield_is_ext(dfield)
|| dict_index_is_clust(index))) {
- /* The dfield_copy() above suffices for
+ /* The *dfield = *dfield2 above suffices for
columns that are stored in-page, or for
clustered index record columns that are not
- part of a column prefix in the PRIMARY KEY,
- or for virtaul columns in cluster index record. */
+ part of a column prefix in the PRIMARY KEY. */
continue;
}
@@ -314,11 +316,11 @@ row_build_index_entry_low(
index record with an off-page column is when it is a
column prefix index. If atomic_blobs, also fully
indexed long columns may be stored off-page. */
- ut_ad(col->ord_part);
+ ut_ad(f.col->ord_part);
- if (ext && !col->is_virtual()) {
+ if (ext && !f.col->is_virtual()) {
/* See if the column is stored externally. */
- const byte* buf = row_ext_lookup(ext, col_no,
+ const byte* buf = row_ext_lookup(ext, f.col->ind,
&len);
if (UNIV_LIKELY_NULL(buf)) {
if (UNIV_UNLIKELY(buf == field_ref_zero)) {
@@ -327,7 +329,7 @@ row_build_index_entry_low(
dfield_set_data(dfield, buf, len);
}
- if (ind_field->prefix_len == 0) {
+ if (f.prefix_len == 0) {
/* If ROW_FORMAT=DYNAMIC or
ROW_FORMAT=COMPRESSED, we can have a
secondary index on an entire column
@@ -354,16 +356,33 @@ row_build_index_entry_low(
}
/* If a column prefix index, take only the prefix. */
- if (ind_field->prefix_len) {
+ if (f.prefix_len) {
len = dtype_get_at_most_n_mbchars(
- col->prtype, col->mbminlen, col->mbmaxlen,
- ind_field->prefix_len, len,
+ f.col->prtype,
+ f.col->mbminlen, f.col->mbmaxlen,
+ f.prefix_len, len,
static_cast<char*>(dfield_get_data(dfield)));
dfield_set_len(dfield, len);
}
}
- return(entry);
+ for (i = num_v; i--; ) {
+ ut_ad(index->is_primary());
+ ut_ad(flag == ROW_BUILD_FOR_INSERT);
+ dfield_t* dfield = dtuple_get_nth_v_field(entry, i);
+ const dict_v_col_t* v_col = dict_table_get_nth_v_col(
+ index->table, i);
+ ut_ad(!v_col->m_col.is_dropped());
+ ut_ad(v_col->v_pos < dtuple_get_n_v_fields(row));
+ const dfield_t* dfield2 = dtuple_get_nth_v_field(
+ row, v_col->v_pos);
+ ut_ad(dfield_is_null(dfield2) ||
+ dfield_get_len(dfield2) == 0 || dfield2->data);
+ ut_ad(dfield2->type.mtype != DATA_MISSING);
+ *dfield = *dfield2;
+ }
+
+ return entry;
}
/** An inverse function to row_build_index_entry. Builds a row from a
@@ -501,11 +520,23 @@ row_build_low(
j = 0;
+ const dict_field_t* ind_field = index->fields;
+
for (ulint i = 0; i < rec_offs_n_fields(offsets); i++) {
- const dict_field_t* ind_field
- = dict_index_get_nth_field(index, i);
+ if (i == index->first_user_field()
+ && rec_is_alter_metadata(rec, *index)) {
+ ut_ad(rec_offs_nth_extern(offsets, i));
+ ut_d(ulint len);
+ ut_d(rec_get_nth_field_offs(offsets, i, &len));
+ ut_ad(len == FIELD_REF_SIZE);
+ continue;
+ }
+
+ ut_ad(ind_field < &index->fields[index->n_fields]);
+
+ const dict_col_t* col = dict_field_get_col(ind_field);
- if (ind_field->prefix_len) {
+ if ((ind_field++)->prefix_len) {
/* Column prefixes can only occur in key
fields, which cannot be stored externally. For
a column prefix, there should also be the full
@@ -515,10 +546,11 @@ row_build_low(
continue;
}
- const dict_col_t* col
- = dict_field_get_col(ind_field);
- ulint col_no
- = dict_col_get_no(col);
+ if (col->is_dropped()) {
+ continue;
+ }
+
+ ulint col_no = dict_col_get_no(col);
if (col_map) {
col_no = col_map[col_no];
@@ -530,6 +562,7 @@ row_build_low(
}
dfield_t* dfield = dtuple_get_nth_field(row, col_no);
+
const void* field = rec_get_nth_field(
copy, offsets, i, &len);
if (len == UNIV_SQL_DEFAULT) {
@@ -569,7 +602,7 @@ row_build_low(
row_log_table_delete(). */
} else if (j) {
- *ext = row_ext_create(j, ext_cols, index->table->flags, row,
+ *ext = row_ext_create(j, ext_cols, *index->table, row,
heap);
} else {
*ext = NULL;
@@ -673,57 +706,83 @@ row_build_w_add_vcol(
}
/** Convert an index record to a data tuple.
-@tparam def whether the index->instant_field_value() needs to be accessed
-@param[in] rec index record
-@param[in] index index
-@param[in] offsets rec_get_offsets(rec, index)
-@param[out] n_ext number of externally stored columns
-@param[in,out] heap memory heap for allocations
+@tparam metadata whether the index->instant_field_value() needs to be accessed
+@tparam mblob 1 if rec_is_alter_metadata();
+2 if we want converted metadata corresponding to info_bits
+@param[in] rec index record
+@param[in] index index
+@param[in] offsets rec_get_offsets(rec, index)
+@param[out] n_ext number of externally stored columns
+@param[in,out] heap memory heap for allocations
+@param[in] info_bits (only used if mblob=2)
+@param[in] pad (only used if mblob=2)
@return index entry built; does not set info_bits, and the data fields
in the entry will point directly to rec */
-template<bool def>
+template<bool metadata, int mblob = 0>
static inline
dtuple_t*
row_rec_to_index_entry_impl(
const rec_t* rec,
const dict_index_t* index,
const rec_offs* offsets,
- mem_heap_t* heap)
+ mem_heap_t* heap,
+ ulint info_bits = 0,
+ bool pad = false)
{
- dtuple_t* entry;
- dfield_t* dfield;
- ulint i;
- const byte* field;
- ulint len;
- ulint rec_len;
-
ut_ad(rec != NULL);
ut_ad(heap != NULL);
ut_ad(index != NULL);
- ut_ad(def || !rec_offs_any_default(offsets));
-
+ ut_ad(!mblob || index->is_primary());
+ ut_ad(!mblob || !index->table->is_temporary());
+ ut_ad(!mblob || !dict_index_is_spatial(index));
+ compile_time_assert(!mblob || metadata);
+ compile_time_assert(mblob <= 2);
/* Because this function may be invoked by row0merge.cc
on a record whose header is in different format, the check
rec_offs_validate(rec, index, offsets) must be avoided here. */
- rec_len = rec_offs_n_fields(offsets);
-
- entry = dtuple_create(heap, rec_len);
+ const bool got = mblob == 2 && rec_is_alter_metadata(rec, *index);
+ ulint rec_len = rec_offs_n_fields(offsets);
+ if (mblob == 2) {
+ ut_ad(info_bits == REC_INFO_METADATA_ALTER
+ || info_bits == REC_INFO_METADATA_ADD);
+ ut_ad(rec_len <= ulint(index->n_fields + got));
+ if (pad) {
+ rec_len = ulint(index->n_fields)
+ + (info_bits == REC_INFO_METADATA_ALTER);
+ } else if (!got && info_bits == REC_INFO_METADATA_ALTER) {
+ rec_len++;
+ }
+ } else {
+ ut_ad(info_bits == 0);
+ ut_ad(!pad);
+ }
+ dtuple_t* entry = dtuple_create(heap, rec_len);
+ dfield_t* dfield = entry->fields;
dtuple_set_n_fields_cmp(entry,
dict_index_get_n_unique_in_tree(index));
- ut_ad(rec_len == dict_index_get_n_fields(index)
+ ut_ad(mblob == 2
+ || rec_len == dict_index_get_n_fields(index) + uint(mblob == 1)
/* a record for older SYS_INDEXES table
(missing merge_threshold column) is acceptable. */
- || (index->table->id == DICT_INDEXES_ID
+ || (!index->table->is_temporary()
+ && index->table->id == DICT_INDEXES_ID
&& rec_len == dict_index_get_n_fields(index) - 1));
- dict_index_copy_types(entry, index, rec_len);
-
- for (i = 0; i < rec_len; i++) {
+ ulint i;
+ for (i = 0; i < (mblob ? index->first_user_field() : rec_len);
+ i++, dfield++) {
+ dict_col_copy_type(dict_index_get_nth_col(index, i),
+ &dfield->type);
+ if (!mblob
+ && dict_index_is_spatial(index)
+ && DATA_GEOMETRY_MTYPE(dfield->type.mtype)) {
+ dfield->type.prtype |= DATA_GIS_MBR;
+ }
- dfield = dtuple_get_nth_field(entry, i);
- field = def
+ ulint len;
+ const byte* field = metadata
? rec_get_nth_cfield(rec, index, offsets, i, &len)
: rec_get_nth_field(rec, offsets, i, &len);
@@ -734,8 +793,74 @@ row_rec_to_index_entry_impl(
}
}
+ if (mblob) {
+ ulint len;
+ const byte* field;
+ ulint j = i;
+
+ if (mblob == 2) {
+ const bool want = info_bits == REC_INFO_METADATA_ALTER;
+ if (got == want) {
+ if (got) {
+ goto copy_metadata;
+ }
+ } else {
+ if (want) {
+ /* Allocate a placeholder for
+ adding metadata in an update. */
+ len = FIELD_REF_SIZE;
+ field = static_cast<byte*>(
+ mem_heap_zalloc(heap, len));
+ /* In reality there is one fewer
+ field present in the record. */
+ rec_len--;
+ goto init_metadata;
+ }
+
+ /* Skip the undesired metadata blob
+ (for example, when rolling back an
+ instant ALTER TABLE). */
+ i++;
+ }
+ goto copy_user_fields;
+ }
+copy_metadata:
+ ut_ad(rec_offs_nth_extern(offsets, i));
+ field = rec_get_nth_field(rec, offsets, i++, &len);
+init_metadata:
+ dfield->type.metadata_blob_init();
+ ut_ad(len == FIELD_REF_SIZE);
+ dfield_set_data(dfield, field, len);
+ dfield_set_ext(dfield++);
+copy_user_fields:
+ for (; i < rec_len; i++, dfield++) {
+ dict_col_copy_type(dict_index_get_nth_col(index, j++),
+ &dfield->type);
+ if (mblob == 2 && pad
+ && i >= rec_offs_n_fields(offsets)) {
+ field = index->instant_field_value(j - 1,
+ &len);
+ dfield_set_data(dfield, field, len);
+ continue;
+ }
+
+ field = rec_get_nth_field(rec, offsets, i, &len);
+ dfield_set_data(dfield, field, len);
+
+ if (rec_offs_nth_extern(offsets, i)) {
+ dfield_set_ext(dfield);
+ }
+ }
+ }
+
+ if (mblob == 2) {
+ ulint n_fields = ulint(dfield - entry->fields);
+ ut_ad(entry->n_fields >= n_fields);
+ entry->n_fields = n_fields;
+ }
+ ut_ad(dfield == entry->fields + entry->n_fields);
ut_ad(dtuple_check_typed(entry));
- return(entry);
+ return entry;
}
/** Convert an index record to a data tuple.
@@ -766,25 +891,26 @@ row_rec_to_index_entry(
mem_heap_t* heap) /*!< in: memory heap from which
the memory needed is allocated */
{
- dtuple_t* entry;
- byte* buf;
- const rec_t* copy_rec;
-
ut_ad(rec != NULL);
ut_ad(heap != NULL);
ut_ad(index != NULL);
ut_ad(rec_offs_validate(rec, index, offsets));
/* Take a copy of rec to heap */
- buf = static_cast<byte*>(
- mem_heap_alloc(heap, rec_offs_size(offsets)));
-
- copy_rec = rec_copy(buf, rec, offsets);
+ const rec_t* copy_rec = rec_copy(
+ static_cast<byte*>(mem_heap_alloc(heap,
+ rec_offs_size(offsets))),
+ rec, offsets);
rec_offs_make_valid(copy_rec, index, true,
const_cast<rec_offs*>(offsets));
- entry = row_rec_to_index_entry_impl<true>(
- copy_rec, index, offsets, heap);
+
+ dtuple_t* entry = rec_is_alter_metadata(copy_rec, *index)
+ ? row_rec_to_index_entry_impl<true,1>(
+ copy_rec, index, offsets, heap)
+ : row_rec_to_index_entry_impl<true>(
+ copy_rec, index, offsets, heap);
+
rec_offs_make_valid(rec, index, true,
const_cast<rec_offs*>(offsets));
@@ -794,6 +920,49 @@ row_rec_to_index_entry(
return(entry);
}
+/** Convert a metadata record to a data tuple.
+@param[in] rec metadata record
+@param[in] index clustered index after instant ALTER TABLE
+@param[in] offsets rec_get_offsets(rec)
+@param[in,out] heap memory heap for allocations
+@param[in] info_bits the info_bits after an update
+@param[in] pad whether to pad to index->n_fields */
+dtuple_t*
+row_metadata_to_tuple(
+ const rec_t* rec,
+ const dict_index_t* index,
+ const rec_offs* offsets,
+ mem_heap_t* heap,
+ ulint info_bits,
+ bool pad)
+{
+ ut_ad(info_bits == REC_INFO_METADATA_ALTER
+ || info_bits == REC_INFO_METADATA_ADD);
+ ut_ad(rec_is_metadata(rec, *index));
+ ut_ad(rec_offs_validate(rec, index, offsets));
+
+ const rec_t* copy_rec = rec_copy(
+ static_cast<byte*>(mem_heap_alloc(heap,
+ rec_offs_size(offsets))),
+ rec, offsets);
+
+ rec_offs_make_valid(copy_rec, index, true,
+ const_cast<rec_offs*>(offsets));
+
+ dtuple_t* entry = info_bits == REC_INFO_METADATA_ALTER
+ || rec_is_alter_metadata(copy_rec, *index)
+ ? row_rec_to_index_entry_impl<true,2>(
+ copy_rec, index, offsets, heap, info_bits, pad)
+ : row_rec_to_index_entry_impl<true>(
+ copy_rec, index, offsets, heap);
+
+ rec_offs_make_valid(rec, index, true,
+ const_cast<rec_offs*>(offsets));
+
+ dtuple_set_info_bits(entry, info_bits);
+ return entry;
+}
+
/*******************************************************************//**
Builds from a secondary index record a row reference with which we can
search the clustered index record.
@@ -1026,7 +1195,7 @@ row_search_on_row_ref(
index = dict_table_get_first_index(table);
if (UNIV_UNLIKELY(ref->info_bits != 0)) {
- ut_ad(ref->info_bits == REC_INFO_METADATA);
+ ut_ad(ref->is_metadata());
ut_ad(ref->n_fields <= index->n_uniq);
if (btr_pcur_open_at_index_side(
true, index, mode, pcur, true, 0, mtr)
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index c718a53db61..781769dbf04 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -54,6 +54,9 @@ Created 12/19/1997 Heikki Tuuri
#include "buf0lru.h"
#include "srv0srv.h"
#include "srv0mon.h"
+#ifdef WITH_WSREP
+#include "mysql/service_wsrep.h" /* For wsrep_thd_skip_locking */
+#endif
/* Maximum number of rows to prefetch; MySQL interface has another parameter */
#define SEL_MAX_N_PREFETCH 16
@@ -124,7 +127,7 @@ row_sel_sec_rec_is_for_blob(
len = btr_copy_externally_stored_field_prefix(
buf, prefix_len ? prefix_len : sizeof buf,
- page_size_t(table->space->flags),
+ table->space->zip_size(),
clust_field, clust_len);
if (len == 0) {
@@ -193,7 +196,7 @@ err_exit:
if (rec_offs_nth_extern(clust_offs, clust_pos))
{
clust_field= btr_copy_externally_stored_field(
- &clust_len, clust_field, dict_table_page_size(sec_index->table),
+ &clust_len, clust_field, sec_index->table->space->zip_size(),
clust_len, heap);
if (clust_field == NULL)
{
@@ -589,7 +592,7 @@ row_sel_fetch_columns(
data = btr_rec_copy_externally_stored_field(
rec, offsets,
- dict_table_page_size(index->table),
+ index->table->space->zip_size(),
field_no, &len, heap);
/* data == NULL means that the
@@ -1195,7 +1198,7 @@ re_scan:
cur_block = buf_page_get_gen(
page_id_t(index->table->space_id, page_no),
- page_size_t(index->table->space->flags),
+ index->table->space->zip_size(),
RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, mtr, &err);
} else {
@@ -1545,7 +1548,7 @@ row_sel_try_search_shortcut(
const rec_t* rec = btr_pcur_get_rec(&(plan->pcur));
- if (!page_rec_is_user_rec(rec) || rec_is_metadata(rec, index)) {
+ if (!page_rec_is_user_rec(rec) || rec_is_metadata(rec, *index)) {
retry:
return(SEL_RETRY);
}
@@ -1838,7 +1841,7 @@ skip_lock:
goto next_rec;
}
- if (rec_is_metadata(rec, index)) {
+ if (rec_is_metadata(rec, *index)) {
/* Skip the metadata pseudo-record. */
cost_counter++;
goto next_rec;
@@ -2746,44 +2749,6 @@ row_sel_convert_mysql_key_to_innobase(
}
/**************************************************************//**
-Stores the row id to the prebuilt struct. */
-static
-void
-row_sel_store_row_id_to_prebuilt(
-/*=============================*/
- row_prebuilt_t* prebuilt, /*!< in/out: prebuilt */
- const rec_t* index_rec, /*!< in: record */
- const dict_index_t* index, /*!< in: index of the record */
- const rec_offs* offsets) /*!< in: rec_get_offsets
- (index_rec, index) */
-{
- const byte* data;
- ulint len;
-
- ut_ad(rec_offs_validate(index_rec, index, offsets));
-
- data = rec_get_nth_field(
- index_rec, offsets,
- dict_index_get_sys_col_pos(index, DATA_ROW_ID), &len);
-
- if (UNIV_UNLIKELY(len != DATA_ROW_ID_LEN)) {
-
- ib::error() << "Row id field is wrong length " << len << " in"
- " index " << index->name
- << " of table " << index->table->name
- << ", Field number "
- << dict_index_get_sys_col_pos(index, DATA_ROW_ID)
- << ", record:";
-
- rec_print_new(stderr, index_rec, offsets);
- putc('\n', stderr);
- ut_error;
- }
-
- ut_memcpy(prebuilt->row_id, data, len);
-}
-
-/**************************************************************//**
Stores a non-SQL-NULL field in the MySQL format. The counterpart of this
function is row_mysql_store_col_in_innobase_format() in row0mysql.cc. */
void
@@ -2797,7 +2762,6 @@ row_sel_field_store_in_mysql_format_func(
const byte* data,
ulint len)
{
- byte* ptr;
#ifdef UNIV_DEBUG
const dict_field_t* field
= templ->is_virtual
@@ -2809,31 +2773,10 @@ row_sel_field_store_in_mysql_format_func(
MEM_CHECK_ADDRESSABLE(dest, templ->mysql_col_len);
MEM_UNDEFINED(dest, templ->mysql_col_len);
+ byte* pad = dest + len;
+
switch (templ->type) {
const byte* field_end;
- byte* pad;
- case DATA_INT:
- /* Convert integer data from Innobase to a little-endian
- format, sign bit restored to normal */
-
- ptr = dest + len;
-
- for (;;) {
- ptr--;
- *ptr = *data;
- if (ptr == dest) {
- break;
- }
- data++;
- }
-
- if (!templ->is_unsigned) {
- dest[len - 1] = (byte) (dest[len - 1] ^ 128);
- }
-
- ut_ad(templ->mysql_col_len == len);
- break;
-
case DATA_VARCHAR:
case DATA_VARMYSQL:
case DATA_BINARY:
@@ -2857,7 +2800,14 @@ row_sel_field_store_in_mysql_format_func(
/* Pad with trailing spaces. */
- pad = dest + len;
+ if (pad == field_end) {
+ break;
+ }
+
+ if (UNIV_UNLIKELY(templ->type == DATA_FIXBINARY)) {
+ memset(pad, 0, field_end - pad);
+ break;
+ }
ut_ad(templ->mbminlen <= templ->mbmaxlen);
@@ -2934,7 +2884,7 @@ row_sel_field_store_in_mysql_format_func(
done in row0mysql.cc, function
row_mysql_store_col_in_innobase_format(). */
- memset(dest + len, 0x20, templ->mysql_col_len - len);
+ memset(pad, 0x20, templ->mysql_col_len - len);
}
break;
@@ -2951,13 +2901,24 @@ row_sel_field_store_in_mysql_format_func(
case DATA_FLOAT:
case DATA_DOUBLE:
case DATA_DECIMAL:
- /* Above are the valid column types for MySQL data. */
#endif /* UNIV_DEBUG */
ut_ad((templ->is_virtual && !field)
|| (field && field->prefix_len
? field->prefix_len == len
: templ->mysql_col_len == len));
memcpy(dest, data, len);
+ break;
+
+ case DATA_INT:
+ /* Convert InnoDB big-endian integer to little-endian
+ format, sign bit restored to 2's complement form */
+ DBUG_ASSERT(templ->mysql_col_len == len);
+
+ byte* ptr = pad;
+ do *--ptr = *data++; while (ptr != dest);
+ if (!templ->is_unsigned) {
+ pad[-1] ^= 0x80;
+ }
}
}
@@ -3021,8 +2982,7 @@ row_sel_store_mysql_field(
causes an assert */
data = btr_rec_copy_externally_stored_field(
- rec, offsets,
- dict_table_page_size(prebuilt->table),
+ rec, offsets, prebuilt->table->space->zip_size(),
field_no, &len, heap);
if (UNIV_UNLIKELY(!data)) {
@@ -3151,17 +3111,16 @@ static bool row_sel_store_mysql_rec(
const mysql_row_templ_t*templ = &prebuilt->mysql_template[i];
if (templ->is_virtual && dict_index_is_clust(index)) {
- /* Virtual columns are never declared NOT NULL. */
- ut_ad(templ->mysql_null_bit_mask);
-
/* Skip virtual columns if it is not a covered
search or virtual key read is not requested. */
if (!rec_clust
|| !prebuilt->index->has_virtual()
|| !prebuilt->read_just_key) {
/* Initialize the NULL bit. */
- mysql_rec[templ->mysql_null_byte_offset]
- |= (byte) templ->mysql_null_bit_mask;
+ if (templ->mysql_null_bit_mask) {
+ mysql_rec[templ->mysql_null_byte_offset]
+ |= (byte) templ->mysql_null_bit_mask;
+ }
continue;
}
@@ -3206,8 +3165,9 @@ static bool row_sel_store_mysql_rec(
= rec_clust
? templ->clust_rec_field_no
: templ->rec_field_no;
- /* We should never deliver column prefixes to MySQL,
- except for evaluating innobase_index_cond(). */
+ /* We should never deliver column prefixes to the SQL layer,
+ except for evaluating handler_index_cond_check()
+ or handler_rowid_filter_check(). */
/* ...actually, we do want to do this in order to
support the prefix query optimization.
@@ -3233,7 +3193,7 @@ static bool row_sel_store_mysql_rec(
if (dict_index_is_clust(index)
|| prebuilt->fts_doc_id_in_read_set) {
prebuilt->fts_doc_id = fts_get_doc_id_from_rec(
- prebuilt->table, rec, index, NULL);
+ rec, index, offsets);
}
}
@@ -3290,7 +3250,7 @@ class Row_sel_get_clust_rec_for_mysql
{
rec_offs vers_offs[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS];
rec_offs_init(vers_offs);
- mem_heap_t *heap= NULL;
+ mem_heap_t *heap= nullptr;
ut_ad(rec_offs_validate(cached_clust_rec, index, offsets));
ut_ad(index->first_user_field() <= rec_offs_n_fields(offsets));
@@ -3298,7 +3258,7 @@ class Row_sel_get_clust_rec_for_mysql
index->n_core_fields,
index->db_trx_id(), &heap));
ut_ad(!heap);
- for (unsigned n= index->db_trx_id(); n--; )
+ for (auto n= index->db_trx_id(); n--; )
{
const dict_col_t *col= dict_index_get_nth_col(index, n);
ulint len1, len2;
@@ -3427,7 +3387,7 @@ Row_sel_get_clust_rec_for_mysql::operator()(
and is it not unsafe to use RW_NO_LATCH here? */
buf_block_t* block = buf_page_get_gen(
btr_pcur_get_block(prebuilt->pcur)->page.id,
- dict_table_page_size(sec_index->table),
+ btr_pcur_get_block(prebuilt->pcur)->zip_size(),
RW_NO_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, mtr, &err);
mem_heap_t* heap = mem_heap_create(256);
@@ -3665,7 +3625,7 @@ static bool sel_restore_position_for_mysql(bool *same_user_rec,
next:
if (btr_pcur_move_to_next(pcur, mtr)
&& rec_is_metadata(btr_pcur_get_rec(pcur),
- pcur->btr_cur.index)) {
+ *pcur->btr_cur.index)) {
btr_pcur_move_to_next(pcur, mtr);
}
@@ -3681,7 +3641,7 @@ next:
prev:
if (btr_pcur_is_on_user_rec(pcur) && !moves_up
&& !rec_is_metadata(btr_pcur_get_rec(pcur),
- pcur->btr_cur.index)) {
+ *pcur->btr_cur.index)) {
btr_pcur_move_to_prev(pcur, mtr);
}
return true;
@@ -3917,7 +3877,7 @@ row_sel_enqueue_cache_row_for_mysql(
/* For non ICP code path the row should already exist in the
next fetch cache slot. */
- if (prebuilt->idx_cond != NULL) {
+ if (prebuilt->pk_filter || prebuilt->idx_cond) {
byte* dest = row_sel_fetch_last_buf(prebuilt);
ut_memcpy(dest, mysql_rec, prebuilt->mysql_row_len);
@@ -3958,7 +3918,7 @@ row_sel_try_search_shortcut_for_mysql(
BTR_SEARCH_LEAF, pcur, ahi_latch, mtr);
rec = btr_pcur_get_rec(pcur);
- if (!page_rec_is_user_rec(rec) || rec_is_metadata(rec, index)) {
+ if (!page_rec_is_user_rec(rec) || rec_is_metadata(rec, *index)) {
retry:
rw_lock_s_unlock(ahi_latch);
return(SEL_RETRY);
@@ -4001,9 +3961,9 @@ exhausted:
/*********************************************************************//**
Check a pushed-down index condition.
-@return ICP_ABORTED_BY_USER, ICP_NO_MATCH, ICP_MATCH, or ICP_OUT_OF_RANGE */
+@return CHECK_ABORTED_BY_USER, CHECK_NEG, CHECK_POS, or CHECK_OUT_OF_RANGE */
static
-ICP_RESULT
+check_result_t
row_search_idx_cond_check(
/*======================*/
byte* mysql_rec, /*!< out: record
@@ -4015,17 +3975,18 @@ row_search_idx_cond_check(
const rec_t* rec, /*!< in: InnoDB record */
const rec_offs* offsets) /*!< in: rec_get_offsets() */
{
- ICP_RESULT result;
ulint i;
ut_ad(rec_offs_validate(rec, prebuilt->index, offsets));
if (!prebuilt->idx_cond) {
- return(ICP_MATCH);
+ if (!handler_rowid_filter_is_active(prebuilt->pk_filter)) {
+ return(CHECK_POS);
+ }
+ } else {
+ MONITOR_INC(MONITOR_ICP_ATTEMPTS);
}
- MONITOR_INC(MONITOR_ICP_ATTEMPTS);
-
/* Convert to MySQL format those fields that are needed for
evaluating the index condition. */
@@ -4045,7 +4006,7 @@ row_search_idx_cond_check(
rec, prebuilt->index, offsets,
templ->icp_rec_field_no,
templ)) {
- return(ICP_NO_MATCH);
+ return(CHECK_NEG);
}
}
@@ -4055,9 +4016,40 @@ row_search_idx_cond_check(
index, if the case of the column has been updated in
the past, or a record has been deleted and a record
inserted in a different case. */
- result = innobase_index_cond(prebuilt->idx_cond);
+ check_result_t result = prebuilt->idx_cond
+ ? handler_index_cond_check(prebuilt->idx_cond)
+ : CHECK_POS;
+
switch (result) {
- case ICP_MATCH:
+ case CHECK_POS:
+ if (handler_rowid_filter_is_active(prebuilt->pk_filter)) {
+ ut_ad(!prebuilt->index->is_primary());
+ if (prebuilt->clust_index_was_generated) {
+ ulint len;
+ dict_index_t* index = prebuilt->index;
+ const byte* data = rec_get_nth_field(
+ rec, offsets, index->n_fields - 1,
+ &len);
+ ut_ad(dict_index_get_nth_col(index,
+ index->n_fields - 1)
+ ->prtype == (DATA_ROW_ID | DATA_NOT_NULL));
+ ut_ad(len == DATA_ROW_ID_LEN);
+ memcpy(prebuilt->row_id, data, DATA_ROW_ID_LEN);
+ }
+ result = handler_rowid_filter_check(prebuilt->pk_filter);
+ switch (result) {
+ case CHECK_NEG:
+ MONITOR_INC(MONITOR_ICP_NO_MATCH);
+ return(result);
+ case CHECK_OUT_OF_RANGE:
+ MONITOR_INC(MONITOR_ICP_OUT_OF_RANGE);
+ return(result);
+ case CHECK_POS:
+ break;
+ default:
+ return(result);
+ }
+ }
/* Convert the remaining fields to MySQL format.
If this is a secondary index record, we must defer
this until we have fetched the clustered index record. */
@@ -4067,19 +4059,19 @@ row_search_idx_cond_check(
mysql_rec, prebuilt, rec, NULL, false,
prebuilt->index, offsets)) {
ut_ad(dict_index_is_clust(prebuilt->index));
- return(ICP_NO_MATCH);
+ return(CHECK_NEG);
}
}
MONITOR_INC(MONITOR_ICP_MATCH);
return(result);
- case ICP_NO_MATCH:
+ case CHECK_NEG:
MONITOR_INC(MONITOR_ICP_NO_MATCH);
return(result);
- case ICP_OUT_OF_RANGE:
+ case CHECK_OUT_OF_RANGE:
MONITOR_INC(MONITOR_ICP_OUT_OF_RANGE);
return(result);
- case ICP_ERROR:
- case ICP_ABORTED_BY_USER:
+ case CHECK_ERROR:
+ case CHECK_ABORTED_BY_USER:
return(result);
}
@@ -4517,19 +4509,19 @@ row_search_mvcc(
mtr.commit(). */
ut_ad(!rec_get_deleted_flag(rec, comp));
- if (prebuilt->idx_cond) {
+ if (prebuilt->pk_filter || prebuilt->idx_cond) {
switch (row_search_idx_cond_check(
buf, prebuilt,
rec, offsets)) {
- case ICP_ABORTED_BY_USER:
- mtr_commit(&mtr);
+ case CHECK_ABORTED_BY_USER:
err = DB_INTERRUPTED;
+ mtr.commit();
goto func_exit;
- case ICP_ERROR:
- case ICP_NO_MATCH:
- case ICP_OUT_OF_RANGE:
+ case CHECK_NEG:
+ case CHECK_OUT_OF_RANGE:
+ case CHECK_ERROR:
goto shortcut_mismatch;
- case ICP_MATCH:
+ case CHECK_POS:
goto shortcut_match;
}
}
@@ -4613,6 +4605,13 @@ row_search_mvcc(
set_also_gap_locks = FALSE;
}
+#ifdef WITH_WSREP
+ else if (wsrep_thd_skip_locking(trx->mysql_thd)) {
+ ut_ad(!strcmp(wsrep_get_sr_table_name(),
+ prebuilt->table->name.m_name));
+ set_also_gap_locks = FALSE;
+ }
+#endif /* WITH_WSREP */
/* Note that if the search mode was GE or G, then the cursor
naturally moves upward (in fetch next) in alphabetical order,
@@ -5302,16 +5301,16 @@ no_gap_lock:
index entry. */
switch (row_search_idx_cond_check(
buf, prebuilt, rec, offsets)) {
- case ICP_NO_MATCH:
+ case CHECK_NEG:
goto next_rec;
- case ICP_ABORTED_BY_USER:
+ case CHECK_ABORTED_BY_USER:
err = DB_INTERRUPTED;
goto idx_cond_failed;
- case ICP_OUT_OF_RANGE:
- case ICP_ERROR:
+ case CHECK_OUT_OF_RANGE:
+ case CHECK_ERROR:
err = DB_RECORD_NOT_FOUND;
goto idx_cond_failed;
- case ICP_MATCH:
+ case CHECK_POS:
goto requires_clust_rec;
}
@@ -5361,19 +5360,19 @@ locks_ok_del_marked:
/* Check if the record matches the index condition. */
switch (row_search_idx_cond_check(buf, prebuilt, rec, offsets)) {
- case ICP_NO_MATCH:
+ case CHECK_NEG:
if (did_semi_consistent_read) {
row_unlock_for_mysql(prebuilt, TRUE);
}
goto next_rec;
- case ICP_ABORTED_BY_USER:
+ case CHECK_ABORTED_BY_USER:
err = DB_INTERRUPTED;
goto idx_cond_failed;
- case ICP_OUT_OF_RANGE:
- case ICP_ERROR:
+ case CHECK_OUT_OF_RANGE:
+ case CHECK_ERROR:
err = DB_RECORD_NOT_FOUND;
goto idx_cond_failed;
- case ICP_MATCH:
+ case CHECK_POS:
break;
}
@@ -5458,7 +5457,7 @@ requires_clust_rec:
result_rec = clust_rec;
ut_ad(rec_offs_validate(result_rec, clust_index, offsets));
- if (prebuilt->idx_cond) {
+ if (prebuilt->pk_filter || prebuilt->idx_cond) {
/* Convert the record to MySQL format. We were
unable to do this in row_search_idx_cond_check(),
because the condition is on the secondary index
@@ -5518,8 +5517,7 @@ use_covering_index:
/* We only convert from InnoDB row format to MySQL row
format when ICP is disabled. */
- if (!prebuilt->idx_cond) {
-
+ if (!prebuilt->pk_filter && !prebuilt->idx_cond) {
/* We use next_buf to track the allocation of buffers
where we store and enqueue the buffers for our
pre-fetch optimisation.
@@ -5591,7 +5589,7 @@ use_covering_index:
rec_offs_size(offsets));
mach_write_to_4(buf,
rec_offs_extra_size(offsets) + 4);
- } else if (!prebuilt->idx_cond) {
+ } else if (!prebuilt->pk_filter && !prebuilt->idx_cond) {
/* The record was not yet converted to MySQL format. */
if (!row_sel_store_mysql_rec(
buf, prebuilt, result_rec, vrow,
@@ -5610,11 +5608,19 @@ use_covering_index:
}
}
- if (prebuilt->clust_index_was_generated) {
- row_sel_store_row_id_to_prebuilt(
- prebuilt, result_rec,
- result_rec == rec ? index : clust_index,
- offsets);
+ if (!prebuilt->clust_index_was_generated) {
+ } else if (result_rec != rec || index->is_primary()) {
+ memcpy(prebuilt->row_id, result_rec, DATA_ROW_ID_LEN);
+ } else {
+ ulint len;
+ const byte* data = rec_get_nth_field(
+ result_rec, offsets, index->n_fields - 1,
+ &len);
+ ut_ad(dict_index_get_nth_col(index,
+ index->n_fields - 1)
+ ->prtype == (DATA_ROW_ID | DATA_NOT_NULL));
+ ut_ad(len == DATA_ROW_ID_LEN);
+ memcpy(prebuilt->row_id, data, DATA_ROW_ID_LEN);
}
}
@@ -5835,8 +5841,7 @@ normal_return:
DEBUG_SYNC_C("row_search_for_mysql_before_return");
- if (prebuilt->idx_cond != 0) {
-
+ if (prebuilt->pk_filter || prebuilt->idx_cond) {
/* When ICP is active we don't write to the MySQL buffer
directly, only to buffers that are enqueued in the pre-fetch
queue. We need to dequeue the first buffer and copy the contents
diff --git a/storage/innobase/row/row0trunc.cc b/storage/innobase/row/row0trunc.cc
deleted file mode 100644
index ee024e73b53..00000000000
--- a/storage/innobase/row/row0trunc.cc
+++ /dev/null
@@ -1,1742 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2013, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2020, 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 Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-*****************************************************************************/
-
-/**************************************************//**
-@file row/row0trunc.cc
-TRUNCATE implementation
-
-Created 2013-04-12 Sunny Bains
-*******************************************************/
-
-#include "row0trunc.h"
-#include "btr0sea.h"
-#include "pars0pars.h"
-#include "btr0pcur.h"
-#include "dict0crea.h"
-#include "dict0stats.h"
-#include "dict0stats_bg.h"
-#include "lock0lock.h"
-#include "fts0fts.h"
-#include "ibuf0ibuf.h"
-#include "os0file.h"
-#include "que0que.h"
-#include "trx0undo.h"
-
-/* FIXME: For temporary tables, use a simple approach of btr_free()
-and btr_create() of each index tree. */
-
-/* FIXME: For persistent tables, remove this code in MDEV-11655
-and use a combination of the transactional DDL log to make atomic the
-low-level operations ha_innobase::delete_table(), ha_innobase::create(). */
-
-bool truncate_t::s_fix_up_active = false;
-truncate_t::tables_t truncate_t::s_tables;
-truncate_t::truncated_tables_t truncate_t::s_truncated_tables;
-
-/**
-Iterator over the the raw records in an index, doesn't support MVCC. */
-class IndexIterator {
-
-public:
- /**
- Iterate over an indexes records
- @param index index to iterate over */
- explicit IndexIterator(dict_index_t* index)
- :
- m_index(index)
- {
- /* Do nothing */
- }
-
- /**
- Search for key. Position the cursor on a record GE key.
- @return DB_SUCCESS or error code. */
- dberr_t search(dtuple_t& key, bool noredo)
- {
- mtr_start(&m_mtr);
-
- if (noredo) {
- mtr_set_log_mode(&m_mtr, MTR_LOG_NO_REDO);
- }
-
- btr_pcur_open_on_user_rec(
- m_index,
- &key,
- PAGE_CUR_GE,
- BTR_MODIFY_LEAF,
- &m_pcur, &m_mtr);
-
- return(DB_SUCCESS);
- }
-
- /**
- Iterate over all the records
- @return DB_SUCCESS or error code */
- template <typename Callback>
- dberr_t for_each(Callback& callback)
- {
- dberr_t err = DB_SUCCESS;
-
- for (;;) {
-
- if (!btr_pcur_is_on_user_rec(&m_pcur)
- || !callback.match(&m_pcur)) {
-
- /* The end of of the index has been reached. */
- err = DB_END_OF_INDEX;
- break;
- }
-
- rec_t* rec = btr_pcur_get_rec(&m_pcur);
-
- if (!rec_get_deleted_flag(rec, FALSE)) {
-
- err = callback(&m_mtr, &m_pcur);
-
- if (err != DB_SUCCESS) {
- break;
- }
- }
-
- btr_pcur_move_to_next_user_rec(&m_pcur, &m_mtr);
- }
-
- btr_pcur_close(&m_pcur);
- mtr_commit(&m_mtr);
-
- return(err == DB_END_OF_INDEX ? DB_SUCCESS : err);
- }
-
-private:
- // Disable copying
- IndexIterator(const IndexIterator&);
- IndexIterator& operator=(const IndexIterator&);
-
-private:
- mtr_t m_mtr;
- btr_pcur_t m_pcur;
- dict_index_t* m_index;
-};
-
-/** SysIndex table iterator, iterate over records for a table. */
-class SysIndexIterator {
-
-public:
- /**
- Iterate over all the records that match the table id.
- @return DB_SUCCESS or error code */
- template <typename Callback>
- dberr_t for_each(Callback& callback) const
- {
- dict_index_t* sys_index;
- byte buf[DTUPLE_EST_ALLOC(1)];
- dtuple_t* tuple =
- dtuple_create_from_mem(buf, sizeof(buf), 1, 0);
- dfield_t* dfield = dtuple_get_nth_field(tuple, 0);
-
- dfield_set_data(
- dfield,
- callback.table_id(),
- sizeof(*callback.table_id()));
-
- sys_index = dict_table_get_first_index(dict_sys->sys_indexes);
-
- dict_index_copy_types(tuple, sys_index, 1);
-
- IndexIterator iterator(sys_index);
-
- /* Search on the table id and position the cursor
- on GE table_id. */
- iterator.search(*tuple, callback.get_logging_status());
-
- return(iterator.for_each(callback));
- }
-};
-
-/** Generic callback abstract class. */
-class Callback
-{
-
-public:
- /**
- Constructor
- @param table_id id of the table being operated.
- @param noredo if true turn off logging. */
- Callback(table_id_t table_id, bool noredo)
- :
- m_id(),
- m_noredo(noredo)
- {
- /* Convert to storage byte order. */
- mach_write_to_8(&m_id, table_id);
- }
-
- /**
- Destructor */
- virtual ~Callback()
- {
- /* Do nothing */
- }
-
- /**
- @param pcur persistent cursor used for iteration
- @return true if the table id column matches. */
- bool match(btr_pcur_t* pcur) const
- {
- ulint len;
- const byte* field;
- rec_t* rec = btr_pcur_get_rec(pcur);
-
- field = rec_get_nth_field_old(
- rec, DICT_FLD__SYS_INDEXES__TABLE_ID, &len);
-
- ut_ad(len == 8);
-
- return(memcmp(&m_id, field, len) == 0);
- }
-
- /**
- @return pointer to table id storage format buffer */
- const table_id_t* table_id() const
- {
- return(&m_id);
- }
-
- /**
- @return return if logging needs to be turned off. */
- bool get_logging_status() const
- {
- return(m_noredo);
- }
-
-protected:
- // Disably copying
- Callback(const Callback&);
- Callback& operator=(const Callback&);
-
-protected:
- /** Table id in storage format */
- table_id_t m_id;
-
- /** Turn off logging. */
- const bool m_noredo;
-};
-
-/**
-Scan to find out truncate log file from the given directory path.
-
-@param dir_path look for log directory in following path.
-@param log_files cache to hold truncate log file name found.
-@return DB_SUCCESS or error code. */
-dberr_t
-TruncateLogParser::scan(
- const char* dir_path,
- trunc_log_files_t& log_files)
-{
- os_file_dir_t dir;
- os_file_stat_t fileinfo;
- dberr_t err = DB_SUCCESS;
- const ulint dir_len = strlen(dir_path);
-
- /* Scan and look out for the truncate log files. */
- dir = os_file_opendir(dir_path, true);
- if (dir == NULL) {
- return(DB_IO_ERROR);
- }
-
- while (fil_file_readdir_next_file(
- &err, dir_path, dir, &fileinfo) == 0) {
-
- const size_t nm_len = strlen(fileinfo.name);
-
- if (fileinfo.type == OS_FILE_TYPE_FILE
- && nm_len > sizeof "ib_trunc.log"
- && (0 == strncmp(fileinfo.name + nm_len
- - ((sizeof "trunc.log") - 1),
- "trunc.log", (sizeof "trunc.log") - 1))
- && (0 == strncmp(fileinfo.name, "ib_", 3))) {
-
- if (fileinfo.size == 0) {
- /* Truncate log not written. Remove the file. */
- os_file_delete(
- innodb_log_file_key, fileinfo.name);
- continue;
- }
-
- /* Construct file name by appending directory path */
- ulint sz = dir_len + 22 + 22 + sizeof "ib_trunc.log";
- char* log_file_name = UT_NEW_ARRAY_NOKEY(char, sz);
- if (log_file_name == NULL) {
- err = DB_OUT_OF_MEMORY;
- break;
- }
-
- memcpy(log_file_name, dir_path, dir_len);
- char* e = log_file_name + dir_len;
- if (e[-1] != OS_PATH_SEPARATOR) {
- *e++ = OS_PATH_SEPARATOR;
- }
- strcpy(e, fileinfo.name);
- log_files.push_back(log_file_name);
- }
- }
-
- os_file_closedir(dir);
-
- return(err);
-}
-
-/**
-Parse the log file and populate table to truncate information.
-(Add this table to truncate information to central vector that is then
- used by truncate fix-up routine to fix-up truncate action of the table.)
-
-@param log_file_name log file to parse
-@return DB_SUCCESS or error code. */
-dberr_t
-TruncateLogParser::parse(
- const char* log_file_name)
-{
- dberr_t err = DB_SUCCESS;
- truncate_t* truncate = NULL;
-
- /* Open the file and read magic-number to findout if truncate action
- was completed. */
- bool ret;
- os_file_t handle = os_file_create_simple(
- innodb_log_file_key, log_file_name,
- OS_FILE_OPEN, OS_FILE_READ_ONLY, srv_read_only_mode, &ret);
- if (!ret) {
- ib::error() << "Error opening truncate log file: "
- << log_file_name;
- return(DB_IO_ERROR);
- }
-
- ulint sz = srv_page_size;
- void* buf = ut_zalloc_nokey(sz + srv_page_size);
- if (buf == 0) {
- os_file_close(handle);
- return(DB_OUT_OF_MEMORY);
- }
-
- IORequest request(IORequest::READ);
-
- /* Align the memory for file i/o if we might have O_DIRECT set*/
- byte* log_buf = static_cast<byte*>(ut_align(buf, srv_page_size));
-
- do {
- err = os_file_read(request, handle, log_buf, 0, sz);
-
- if (err != DB_SUCCESS) {
- os_file_close(handle);
- break;
- }
-
- if (mach_read_from_4(log_buf) == 32743712) {
-
- /* Truncate action completed. Avoid parsing the file. */
- os_file_close(handle);
-
- os_file_delete(innodb_log_file_key, log_file_name);
- break;
- }
-
- if (truncate == NULL) {
- truncate = UT_NEW_NOKEY(truncate_t(log_file_name));
- if (truncate == NULL) {
- os_file_close(handle);
- err = DB_OUT_OF_MEMORY;
- break;
- }
- }
-
- err = truncate->parse(log_buf + 4, log_buf + sz - 4);
-
- if (err != DB_SUCCESS) {
-
- ut_ad(err == DB_FAIL);
-
- ut_free(buf);
- buf = 0;
-
- sz *= 2;
-
- buf = ut_zalloc_nokey(sz + srv_page_size);
-
- if (buf == 0) {
- os_file_close(handle);
- err = DB_OUT_OF_MEMORY;
- UT_DELETE(truncate);
- truncate = NULL;
- break;
- }
-
- log_buf = static_cast<byte*>(
- ut_align(buf, srv_page_size));
- }
- } while (err != DB_SUCCESS);
-
- ut_free(buf);
-
- if (err == DB_SUCCESS && truncate != NULL) {
- truncate_t::add(truncate);
- os_file_close(handle);
- }
-
- return(err);
-}
-
-/**
-Scan and Parse truncate log files.
-
-@param dir_path look for log directory in following path
-@return DB_SUCCESS or error code. */
-dberr_t
-TruncateLogParser::scan_and_parse(
- const char* dir_path)
-{
- dberr_t err;
- trunc_log_files_t log_files;
-
- /* Scan and trace all the truncate log files. */
- err = TruncateLogParser::scan(dir_path, log_files);
-
- /* Parse truncate lof files if scan was successful. */
- if (err == DB_SUCCESS) {
-
- for (ulint i = 0;
- i < log_files.size() && err == DB_SUCCESS;
- i++) {
- err = TruncateLogParser::parse(log_files[i]);
- }
- }
-
- trunc_log_files_t::const_iterator end = log_files.end();
- for (trunc_log_files_t::const_iterator it = log_files.begin();
- it != end;
- ++it) {
- if (*it != NULL) {
- UT_DELETE_ARRAY(*it);
- }
- }
- log_files.clear();
-
- return(err);
-}
-
-/** Check for presence of table-id in SYS_XXXX tables. */
-class TableLocator : public Callback {
-
-public:
- /**
- Constructor
- @param table_id table_id to look for */
- explicit TableLocator(table_id_t table_id)
- :
- Callback(table_id, false),
- m_table_found()
- {
- /* No op */
- }
-
- /**
- @return true if table is found */
- bool is_table_found() const
- {
- return(m_table_found);
- }
-
- /**
- Look for table-id in SYS_XXXX tables without loading the table.
-
- @param pcur persistent cursor used for reading
- @return DB_SUCCESS */
- dberr_t operator()(mtr_t*, btr_pcur_t*)
- {
- m_table_found = true;
- return(DB_SUCCESS);
- }
-
-private:
- /** Set to true if table is present */
- bool m_table_found;
-};
-
-/**
-Update system table to reflect new table id.
-@param old_table_id old table id
-@param new_table_id new table id
-@param reserve_dict_mutex if TRUE, acquire/release
- dict_sys->mutex around call to pars_sql.
-@param trx transaction
-@return error code or DB_SUCCESS */
-static MY_ATTRIBUTE((warn_unused_result))
-dberr_t
-row_truncate_update_table_id(
- table_id_t old_table_id,
- table_id_t new_table_id,
- ibool reserve_dict_mutex,
- trx_t* trx)
-{
- pars_info_t* info = NULL;
- dberr_t err = DB_SUCCESS;
-
- /* Scan the SYS_XXXX table and update to reflect new table-id. */
- info = pars_info_create();
- pars_info_add_ull_literal(info, "old_id", old_table_id);
- pars_info_add_ull_literal(info, "new_id", new_table_id);
-
- err = que_eval_sql(
- info,
- "PROCEDURE RENUMBER_TABLE_ID_PROC () IS\n"
- "BEGIN\n"
- "UPDATE SYS_TABLES"
- " SET ID = :new_id\n"
- " WHERE ID = :old_id;\n"
- "UPDATE SYS_COLUMNS SET TABLE_ID = :new_id\n"
- " WHERE TABLE_ID = :old_id;\n"
- "UPDATE SYS_INDEXES"
- " SET TABLE_ID = :new_id\n"
- " WHERE TABLE_ID = :old_id;\n"
- "UPDATE SYS_VIRTUAL"
- " SET TABLE_ID = :new_id\n"
- " WHERE TABLE_ID = :old_id;\n"
- "END;\n", reserve_dict_mutex, trx);
-
- return(err);
-}
-
-/**
-Get the table id to truncate.
-@param truncate_t old/new table id of table to truncate
-@return table_id_t table_id to use in SYS_XXXX table update. */
-static MY_ATTRIBUTE((warn_unused_result))
-table_id_t
-row_truncate_get_trunc_table_id(
- const truncate_t& truncate)
-{
- TableLocator tableLocator(truncate.old_table_id());
-
- SysIndexIterator().for_each(tableLocator);
-
- return(tableLocator.is_table_found() ?
- truncate.old_table_id(): truncate.new_table_id());
-}
-
-/**
-Update system table to reflect new table id and root page number.
-@param truncate_t old/new table id of table to truncate
- and updated root_page_no of indexes.
-@param new_table_id new table id
-@param reserve_dict_mutex if TRUE, acquire/release
- dict_sys->mutex around call to pars_sql.
-@param mark_index_corrupted if true, then mark index corrupted.
-@return error code or DB_SUCCESS */
-static MY_ATTRIBUTE((warn_unused_result))
-dberr_t
-row_truncate_update_sys_tables_during_fix_up(
- const truncate_t& truncate,
- table_id_t new_table_id,
- ibool reserve_dict_mutex,
- bool mark_index_corrupted)
-{
- trx_t* trx = trx_create();
-
- trx_set_dict_operation(trx, TRX_DICT_OP_TABLE);
-
- table_id_t table_id = row_truncate_get_trunc_table_id(truncate);
-
- /* Step-1: Update the root-page-no */
-
- dberr_t err;
-
- err = truncate.update_root_page_no(
- trx, table_id, reserve_dict_mutex, mark_index_corrupted);
-
- if (err != DB_SUCCESS) {
- return(err);
- }
-
- /* Step-2: Update table-id. */
-
- err = row_truncate_update_table_id(
- table_id, new_table_id, reserve_dict_mutex, trx);
-
- if (err == DB_SUCCESS) {
- dict_mutex_enter_for_mysql();
-
- /* Remove the table with old table_id from cache. */
- dict_table_t* old_table = dict_table_open_on_id(
- table_id, true, DICT_TABLE_OP_NORMAL);
-
- if (old_table != NULL) {
- dict_table_close(old_table, true, false);
- dict_table_remove_from_cache(old_table);
- }
-
- /* Open table with new table_id and set table as
- corrupted if it has FTS index. */
-
- dict_table_t* table = dict_table_open_on_id(
- new_table_id, true, DICT_TABLE_OP_NORMAL);
- ut_ad(table->id == new_table_id);
-
- bool has_internal_doc_id =
- dict_table_has_fts_index(table)
- || DICT_TF2_FLAG_IS_SET(
- table, DICT_TF2_FTS_HAS_DOC_ID);
-
- if (has_internal_doc_id) {
- trx->dict_operation_lock_mode = RW_X_LATCH;
- fts_check_corrupt(table, trx);
- trx->dict_operation_lock_mode = 0;
- }
-
- dict_table_close(table, true, false);
- dict_mutex_exit_for_mysql();
- }
-
- trx_commit_for_mysql(trx);
- trx->free();
-
- return(err);
-}
-
-/********************************************************//**
-Recreates table indexes by applying
-TRUNCATE log record during recovery.
-@return DB_SUCCESS or error code */
-static
-dberr_t
-fil_recreate_table(
-/*===============*/
- ulint format_flags, /*!< in: page format */
- const char* name, /*!< in: table name */
- truncate_t& truncate) /*!< in: The information of
- TRUNCATE log record */
-{
- ut_ad(!truncate_t::s_fix_up_active);
- truncate_t::s_fix_up_active = true;
-
- /* Step-1: Scan for active indexes from REDO logs and drop
- all the indexes using low level function that take root_page_no
- and space-id. */
- truncate.drop_indexes(fil_system.sys_space);
-
- /* Step-2: Scan for active indexes and re-create them. */
- dberr_t err = truncate.create_indexes(
- name, fil_system.sys_space, format_flags);
- if (err != DB_SUCCESS) {
- ib::info() << "Recovery failed for TRUNCATE TABLE '"
- << name << "' within the system tablespace";
- }
-
- truncate_t::s_fix_up_active = false;
-
- return(err);
-}
-
-/********************************************************//**
-Recreates the tablespace and table indexes by applying
-TRUNCATE log record during recovery.
-@return DB_SUCCESS or error code */
-static
-dberr_t
-fil_recreate_tablespace(
-/*====================*/
- ulint space_id, /*!< in: space id */
- ulint format_flags, /*!< in: page format */
- ulint flags, /*!< in: tablespace flags */
- const char* name, /*!< in: table name */
- truncate_t& truncate, /*!< in: The information of
- TRUNCATE log record */
- lsn_t recv_lsn) /*!< in: the end LSN of
- the log record */
-{
- dberr_t err = DB_SUCCESS;
- mtr_t mtr;
-
- ut_ad(!truncate_t::s_fix_up_active);
- truncate_t::s_fix_up_active = true;
-
- /* Step-1: Invalidate buffer pool pages belonging to the tablespace
- to re-create. */
- buf_LRU_flush_or_remove_pages(space_id, NULL);
-
- /* Remove all insert buffer entries for the tablespace */
- ibuf_delete_for_discarded_space(space_id);
-
- /* Step-2: truncate tablespace (reset the size back to original or
- default size) of tablespace. */
- err = truncate.truncate(
- space_id, truncate.get_dir_path(), name, flags, true);
-
- if (err != DB_SUCCESS) {
-
- ib::info() << "Cannot access .ibd file for table '"
- << name << "' with tablespace " << space_id
- << " while truncating";
- return(DB_ERROR);
- }
-
- fil_space_t* space = fil_space_acquire(space_id);
- if (!space) {
- ib::info() << "Missing .ibd file for table '" << name
- << "' with tablespace " << space_id;
- return(DB_ERROR);
- }
-
- const page_size_t page_size(space->flags);
-
- /* Step-3: Initialize Header. */
- if (page_size.is_compressed()) {
- byte* buf;
- page_t* page;
-
- buf = static_cast<byte*>(
- ut_zalloc_nokey(3U << srv_page_size_shift));
-
- /* Align the memory for file i/o */
- page = static_cast<byte*>(ut_align(buf, srv_page_size));
-
- flags |= FSP_FLAGS_PAGE_SSIZE();
-
- fsp_header_init_fields(page, space_id, flags);
-
- mach_write_to_4(
- page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, space_id);
-
- page_zip_des_t page_zip;
- page_zip_set_size(&page_zip, page_size.physical());
- page_zip.data = page + srv_page_size;
-
-#ifdef UNIV_DEBUG
- page_zip.m_start =
-#endif /* UNIV_DEBUG */
- page_zip.m_end = page_zip.m_nonempty = page_zip.n_blobs = 0;
- buf_flush_init_for_writing(NULL, page, &page_zip, 0);
-
- err = fil_io(IORequestWrite, true, page_id_t(space_id, 0),
- page_size, 0, page_size.physical(), page_zip.data,
- NULL);
-
- ut_free(buf);
-
- if (err != DB_SUCCESS) {
- ib::info() << "Failed to clean header of the"
- " table '" << name << "' with tablespace "
- << space_id;
- goto func_exit;
- }
- }
-
- mtr_start(&mtr);
- /* Don't log the operation while fixing up table truncate operation
- as crash at this level can still be sustained with recovery restarting
- from last checkpoint. */
- mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
-
- /* Initialize the first extent descriptor page and
- the second bitmap page for the new tablespace. */
- fsp_header_init(space, FIL_IBD_FILE_INITIAL_SIZE, &mtr);
- mtr_commit(&mtr);
-
- /* Step-4: Re-Create Indexes to newly re-created tablespace.
- This operation will restore tablespace back to what it was
- when it was created during CREATE TABLE. */
- err = truncate.create_indexes(name, space, format_flags);
- if (err != DB_SUCCESS) {
- goto func_exit;
- }
-
- /* Step-5: Write new created pages into ibd file handle and
- flush it to disk for the tablespace, in case i/o-handler thread
- deletes the bitmap page from buffer. */
- mtr_start(&mtr);
-
- mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
-
- for (ulint page_no = 0;
- page_no < UT_LIST_GET_FIRST(space->chain)->size; ++page_no) {
-
- const page_id_t cur_page_id(space_id, page_no);
-
- buf_block_t* block = buf_page_get(cur_page_id, page_size,
- RW_X_LATCH, &mtr);
-
- byte* page = buf_block_get_frame(block);
-
- if (!FSP_FLAGS_GET_ZIP_SSIZE(flags)) {
- ut_ad(!page_size.is_compressed());
-
- buf_flush_init_for_writing(
- block, page, NULL, recv_lsn);
-
- err = fil_io(IORequestWrite, true, cur_page_id,
- page_size, 0, srv_page_size, page, NULL);
- } else {
- ut_ad(page_size.is_compressed());
-
- /* We don't want to rewrite empty pages. */
-
- if (fil_page_get_type(page) != 0) {
- page_zip_des_t* page_zip =
- buf_block_get_page_zip(block);
-
- buf_flush_init_for_writing(
- block, page, page_zip, recv_lsn);
-
- err = fil_io(IORequestWrite, true,
- cur_page_id,
- page_size, 0,
- page_size.physical(),
- page_zip->data, NULL);
- } else {
-#ifdef UNIV_DEBUG
- const byte* data = block->page.zip.data;
-
- /* Make sure that the page is really empty */
- for (ulint i = 0;
- i < page_size.physical();
- ++i) {
-
- ut_a(data[i] == 0);
- }
-#endif /* UNIV_DEBUG */
- }
- }
-
- if (err != DB_SUCCESS) {
- ib::info() << "Cannot write page " << page_no
- << " into a .ibd file for table '"
- << name << "' with tablespace " << space_id;
- }
- }
-
- mtr_commit(&mtr);
-
- truncate_t::s_fix_up_active = false;
-func_exit:
- space->release();
- return(err);
-}
-
-/**
-Fix the table truncate by applying information parsed from TRUNCATE log.
-Fix-up includes re-creating table (drop and re-create indexes)
-@return error code or DB_SUCCESS */
-dberr_t
-truncate_t::fixup_tables_in_system_tablespace()
-{
- dberr_t err = DB_SUCCESS;
-
- /* Using the info cached during REDO log scan phase fix the
- table truncate. */
-
- for (tables_t::iterator it = s_tables.begin();
- it != s_tables.end();) {
-
- if ((*it)->m_space_id == TRX_SYS_SPACE) {
- /* Step-1: Drop and re-create indexes. */
- ib::info() << "Completing truncate for table with "
- "id (" << (*it)->m_old_table_id << ") "
- "residing in the system tablespace.";
-
- err = fil_recreate_table(
- (*it)->m_format_flags,
- (*it)->m_tablename,
- **it);
-
- /* Step-2: Update the SYS_XXXX tables to reflect
- this new table_id and root_page_no. */
- table_id_t new_id;
-
- dict_hdr_get_new_id(&new_id, NULL, NULL, NULL, true);
-
- err = row_truncate_update_sys_tables_during_fix_up(
- **it, new_id, TRUE,
- (err == DB_SUCCESS) ? false : true);
-
- if (err != DB_SUCCESS) {
- break;
- }
-
- os_file_delete(
- innodb_log_file_key, (*it)->m_log_file_name);
- UT_DELETE(*it);
- it = s_tables.erase(it);
- } else {
- ++it;
- }
- }
-
- /* Also clear the map used to track tablespace truncated. */
- s_truncated_tables.clear();
-
- return(err);
-}
-
-/**
-Fix the table truncate by applying information parsed from TRUNCATE log.
-Fix-up includes re-creating tablespace.
-@return error code or DB_SUCCESS */
-dberr_t
-truncate_t::fixup_tables_in_non_system_tablespace()
-{
- dberr_t err = DB_SUCCESS;
-
- /* Using the info cached during REDO log scan phase fix the
- table truncate. */
- tables_t::iterator end = s_tables.end();
-
- for (tables_t::iterator it = s_tables.begin(); it != end; ++it) {
-
- /* All tables in the system tablespace have already been
- done and erased from this list. */
- ut_a((*it)->m_space_id != TRX_SYS_SPACE);
-
- /* Drop tablespace, drop indexes and re-create indexes. */
-
- ib::info() << "Completing truncate for table with "
- "id (" << (*it)->m_old_table_id << ") "
- "residing in file-per-table tablespace with "
- "id (" << (*it)->m_space_id << ")";
-
- fil_space_t* space = fil_space_get((*it)->m_space_id);
-
- if (!space) {
- /* Create the database directory for name,
- if it does not exist yet */
- fil_create_directory_for_tablename(
- (*it)->m_tablename);
-
- space = fil_ibd_create((*it)->m_space_id,
- (*it)->m_tablename,
- (*it)->m_dir_path,
- (*it)->m_tablespace_flags,
- FIL_IBD_FILE_INITIAL_SIZE,
- (*it)->m_encryption,
- (*it)->m_key_id, &err);
- if (!space) {
- /* If checkpoint is not yet done
- and table is dropped and then we might
- still have REDO entries for this table
- which are INVALID. Ignore them. */
- ib::warn() << "Failed to create"
- " tablespace for "
- << (*it)->m_space_id
- << " space-id";
- err = DB_ERROR;
- break;
- }
- }
-
- err = fil_recreate_tablespace(
- (*it)->m_space_id,
- (*it)->m_format_flags,
- (*it)->m_tablespace_flags,
- (*it)->m_tablename,
- **it, log_get_lsn());
-
- /* Step-2: Update the SYS_XXXX tables to reflect new
- table-id and root_page_no. */
- table_id_t new_id;
-
- dict_hdr_get_new_id(&new_id, NULL, NULL, NULL, true);
-
- err = row_truncate_update_sys_tables_during_fix_up(
- **it, new_id, TRUE, (err == DB_SUCCESS) ? false : true);
-
- if (err != DB_SUCCESS) {
- break;
- }
- }
-
- if (err == DB_SUCCESS && s_tables.size() > 0) {
-
- log_make_checkpoint();
- }
-
- for (ulint i = 0; i < s_tables.size(); ++i) {
- os_file_delete(
- innodb_log_file_key, s_tables[i]->m_log_file_name);
- UT_DELETE(s_tables[i]);
- }
-
- s_tables.clear();
-
- return(err);
-}
-
-/**
-Constructor
-
-@param old_table_id old table id assigned to table before truncate
-@param new_table_id new table id that will be assigned to table
- after truncate
-@param dir_path directory path */
-
-truncate_t::truncate_t(
- table_id_t old_table_id,
- table_id_t new_table_id,
- const char* dir_path)
- :
- m_space_id(),
- m_old_table_id(old_table_id),
- m_new_table_id(new_table_id),
- m_dir_path(),
- m_tablename(),
- m_tablespace_flags(),
- m_format_flags(),
- m_indexes(),
- m_log_lsn(),
- m_log_file_name(),
- /* JAN: TODO: Encryption */
- m_encryption(FIL_ENCRYPTION_DEFAULT),
- m_key_id(FIL_DEFAULT_ENCRYPTION_KEY)
-{
- if (dir_path != NULL) {
- m_dir_path = mem_strdup(dir_path);
- }
-}
-
-/**
-Consturctor
-
-@param log_file_name parse the log file during recovery to populate
- information related to table to truncate */
-truncate_t::truncate_t(
- const char* log_file_name)
- :
- m_space_id(),
- m_old_table_id(),
- m_new_table_id(),
- m_dir_path(),
- m_tablename(),
- m_tablespace_flags(),
- m_format_flags(),
- m_indexes(),
- m_log_lsn(),
- m_log_file_name(),
- /* JAN: TODO: Encryption */
- m_encryption(FIL_ENCRYPTION_DEFAULT),
- m_key_id(FIL_DEFAULT_ENCRYPTION_KEY)
-
-{
- m_log_file_name = mem_strdup(log_file_name);
- if (m_log_file_name == NULL) {
- ib::fatal() << "Failed creating truncate_t; out of memory";
- }
-}
-
-/** Constructor */
-
-truncate_t::index_t::index_t()
- :
- m_id(),
- m_type(),
- m_root_page_no(FIL_NULL),
- m_new_root_page_no(FIL_NULL),
- m_n_fields(),
- m_trx_id_pos(ULINT_UNDEFINED),
- m_fields()
-{
- /* Do nothing */
-}
-
-/** Destructor */
-
-truncate_t::~truncate_t()
-{
- if (m_dir_path != NULL) {
- ut_free(m_dir_path);
- m_dir_path = NULL;
- }
-
- if (m_tablename != NULL) {
- ut_free(m_tablename);
- m_tablename = NULL;
- }
-
- if (m_log_file_name != NULL) {
- ut_free(m_log_file_name);
- m_log_file_name = NULL;
- }
-
- m_indexes.clear();
-}
-
-/**
-@return number of indexes parsed from the log record */
-
-size_t
-truncate_t::indexes() const
-{
- return(m_indexes.size());
-}
-
-/**
-Update root page number in SYS_XXXX tables.
-
-@param trx transaction object
-@param table_id table id for which information needs to
- be updated.
-@param reserve_dict_mutex if TRUE, acquire/release
- dict_sys->mutex around call to pars_sql.
-@param mark_index_corrupted if true, then mark index corrupted.
-@return DB_SUCCESS or error code */
-
-dberr_t
-truncate_t::update_root_page_no(
- trx_t* trx,
- table_id_t table_id,
- ibool reserve_dict_mutex,
- bool mark_index_corrupted) const
-{
- indexes_t::const_iterator end = m_indexes.end();
-
- dberr_t err = DB_SUCCESS;
-
- for (indexes_t::const_iterator it = m_indexes.begin();
- it != end;
- ++it) {
-
- pars_info_t* info = pars_info_create();
-
- pars_info_add_int4_literal(
- info, "page_no", it->m_new_root_page_no);
-
- pars_info_add_ull_literal(info, "table_id", table_id);
-
- pars_info_add_ull_literal(
- info, "index_id",
- (mark_index_corrupted ? IB_ID_MAX : it->m_id));
-
- err = que_eval_sql(
- info,
- "PROCEDURE RENUMBER_IDX_PAGE_NO_PROC () IS\n"
- "BEGIN\n"
- "UPDATE SYS_INDEXES"
- " SET PAGE_NO = :page_no\n"
- " WHERE TABLE_ID = :table_id"
- " AND ID = :index_id;\n"
- "END;\n", reserve_dict_mutex, trx);
-
- if (err != DB_SUCCESS) {
- break;
- }
- }
-
- return(err);
-}
-
-/**
-Check whether a tablespace was truncated during recovery
-@param space_id tablespace id to check
-@return true if the tablespace was truncated */
-
-bool
-truncate_t::is_tablespace_truncated(ulint space_id)
-{
- tables_t::iterator end = s_tables.end();
-
- for (tables_t::iterator it = s_tables.begin(); it != end; ++it) {
-
- if ((*it)->m_space_id == space_id) {
-
- return(true);
- }
- }
-
- return(false);
-}
-
-/** Was tablespace truncated (on crash before checkpoint).
-If the MLOG_TRUNCATE redo-record is still available then tablespace
-was truncated and checkpoint is yet to happen.
-@param[in] space_id tablespace id to check.
-@return true if tablespace is was truncated. */
-bool
-truncate_t::was_tablespace_truncated(ulint space_id)
-{
- return(s_truncated_tables.find(space_id) != s_truncated_tables.end());
-}
-
-/** Get the lsn associated with space.
-@param[in] space_id tablespace id to check.
-@return associated lsn. */
-lsn_t
-truncate_t::get_truncated_tablespace_init_lsn(ulint space_id)
-{
- ut_ad(was_tablespace_truncated(space_id));
-
- return(s_truncated_tables.find(space_id)->second);
-}
-
-/**
-Parses log record during recovery
-@param start_ptr buffer containing log body to parse
-@param end_ptr buffer end
-
-@return DB_SUCCESS or error code */
-
-dberr_t
-truncate_t::parse(
- byte* start_ptr,
- const byte* end_ptr)
-{
- /* Parse lsn, space-id, format-flags and tablespace-flags. */
- if (end_ptr < start_ptr + (8 + 4 + 4 + 4)) {
- return(DB_FAIL);
- }
-
- m_log_lsn = mach_read_from_8(start_ptr);
- start_ptr += 8;
-
- m_space_id = mach_read_from_4(start_ptr);
- start_ptr += 4;
-
- m_format_flags = mach_read_from_4(start_ptr);
- start_ptr += 4;
-
- m_tablespace_flags = mach_read_from_4(start_ptr);
- start_ptr += 4;
-
- /* Parse table-name. */
- if (end_ptr < start_ptr + (2)) {
- return(DB_FAIL);
- }
-
- ulint n_tablename_len = mach_read_from_2(start_ptr);
- start_ptr += 2;
-
- if (n_tablename_len > 0) {
- if (end_ptr < start_ptr + n_tablename_len) {
- return(DB_FAIL);
- }
- m_tablename = mem_strdup(reinterpret_cast<char*>(start_ptr));
- ut_ad(m_tablename[n_tablename_len - 1] == 0);
- start_ptr += n_tablename_len;
- }
-
-
- /* Parse and read old/new table-id, number of indexes */
- if (end_ptr < start_ptr + (8 + 8 + 2 + 2)) {
- return(DB_FAIL);
- }
-
- ut_ad(m_indexes.empty());
-
- m_old_table_id = mach_read_from_8(start_ptr);
- start_ptr += 8;
-
- m_new_table_id = mach_read_from_8(start_ptr);
- start_ptr += 8;
-
- ulint n_indexes = mach_read_from_2(start_ptr);
- start_ptr += 2;
-
- /* Parse the remote directory from TRUNCATE log record */
- {
- ulint n_tabledirpath_len = mach_read_from_2(start_ptr);
- start_ptr += 2;
-
- if (end_ptr < start_ptr + n_tabledirpath_len) {
- return(DB_FAIL);
- }
-
- if (n_tabledirpath_len > 0) {
-
- m_dir_path = mem_strdup(reinterpret_cast<char*>(start_ptr));
- ut_ad(m_dir_path[n_tabledirpath_len - 1] == 0);
- start_ptr += n_tabledirpath_len;
- }
- }
-
- /* Parse index ids and types from TRUNCATE log record */
- for (ulint i = 0; i < n_indexes; ++i) {
- index_t index;
-
- if (end_ptr < start_ptr + (8 + 4 + 4 + 4)) {
- return(DB_FAIL);
- }
-
- index.m_id = mach_read_from_8(start_ptr);
- start_ptr += 8;
-
- index.m_type = mach_read_from_4(start_ptr);
- start_ptr += 4;
-
- index.m_root_page_no = mach_read_from_4(start_ptr);
- start_ptr += 4;
-
- index.m_trx_id_pos = mach_read_from_4(start_ptr);
- start_ptr += 4;
-
- if (!(index.m_type & DICT_FTS)) {
- m_indexes.push_back(index);
- }
- }
-
- ut_ad(!m_indexes.empty());
-
- if (FSP_FLAGS_GET_ZIP_SSIZE(m_tablespace_flags)) {
-
- /* Parse the number of index fields from TRUNCATE log record */
- for (ulint i = 0; i < m_indexes.size(); ++i) {
-
- if (end_ptr < start_ptr + (2 + 2)) {
- return(DB_FAIL);
- }
-
- m_indexes[i].m_n_fields = mach_read_from_2(start_ptr);
- start_ptr += 2;
-
- ulint len = mach_read_from_2(start_ptr);
- start_ptr += 2;
-
- if (end_ptr < start_ptr + len) {
- return(DB_FAIL);
- }
-
- index_t& index = m_indexes[i];
-
- /* Should be NUL terminated. */
- ut_ad((start_ptr)[len - 1] == 0);
-
- index_t::fields_t::iterator end;
-
- end = index.m_fields.end();
-
- index.m_fields.insert(
- end, start_ptr, &(start_ptr)[len]);
-
- start_ptr += len;
- }
- }
-
- return(DB_SUCCESS);
-}
-
-/** Parse log record from REDO log file during recovery.
-@param[in,out] start_ptr buffer containing log body to parse
-@param[in] end_ptr buffer end
-@param[in] space_id tablespace identifier
-@return parsed upto or NULL. */
-byte*
-truncate_t::parse_redo_entry(
- byte* start_ptr,
- const byte* end_ptr,
- ulint space_id)
-{
- lsn_t lsn;
-
- /* Parse space-id, lsn */
- if (end_ptr < (start_ptr + 8)) {
- return(NULL);
- }
-
- lsn = mach_read_from_8(start_ptr);
- start_ptr += 8;
-
- /* Tablespace can't exist in both state.
- (scheduled-for-truncate, was-truncated). */
- if (!is_tablespace_truncated(space_id)) {
-
- truncated_tables_t::iterator it =
- s_truncated_tables.find(space_id);
-
- if (it == s_truncated_tables.end()) {
- s_truncated_tables.insert(
- std::pair<ulint, lsn_t>(space_id, lsn));
- } else {
- it->second = lsn;
- }
- }
-
- return(start_ptr);
-}
-
-/**
-Set the truncate log values for a compressed table.
-@param index index from which recreate infoormation needs to be extracted
-@return DB_SUCCESS or error code */
-
-dberr_t
-truncate_t::index_t::set(
- const dict_index_t* index)
-{
- /* Get trx-id column position (set only for clustered index) */
- if (dict_index_is_clust(index)) {
- m_trx_id_pos = dict_index_get_sys_col_pos(index, DATA_TRX_ID);
- ut_ad(m_trx_id_pos > 0);
- ut_ad(m_trx_id_pos != ULINT_UNDEFINED);
- } else {
- m_trx_id_pos = 0;
- }
-
- /* Original logic set this field differently if page is not leaf.
- For truncate case this being first page to get created it is
- always a leaf page and so we don't need that condition here. */
- m_n_fields = dict_index_get_n_fields(index);
-
- /* See requirements of page_zip_fields_encode for size. */
- ulint encoded_buf_size = (m_n_fields + 1) * 2;
- byte* encoded_buf = UT_NEW_ARRAY_NOKEY(byte, encoded_buf_size);
-
- if (encoded_buf == NULL) {
- return(DB_OUT_OF_MEMORY);
- }
-
- ulint len = page_zip_fields_encode(
- m_n_fields, index, m_trx_id_pos, encoded_buf);
- ut_a(len <= encoded_buf_size);
-
- /* Append the encoded fields data. */
- m_fields.insert(m_fields.end(), &encoded_buf[0], &encoded_buf[len]);
-
- /* NUL terminate the encoded data */
- m_fields.push_back(0);
-
- UT_DELETE_ARRAY(encoded_buf);
-
- return(DB_SUCCESS);
-}
-
-/** Create an index for a table.
-@param[in] table_name table name, for which to create
-the index
-@param[in] space tablespace
-@param[in] page_size page size of the .ibd file
-@param[in] index_type type of index to truncate
-@param[in] index_id id of index to truncate
-@param[in] btr_redo_create_info control info for ::btr_create()
-@param[in,out] mtr mini-transaction covering the
-create index
-@return root page no or FIL_NULL on failure */
-inline ulint
-truncate_t::create_index(
- const char* table_name,
- fil_space_t* space,
- ulint index_type,
- index_id_t index_id,
- const btr_create_t& btr_redo_create_info,
- mtr_t* mtr) const
-{
- ulint root_page_no = btr_create(
- index_type, space, index_id,
- NULL, &btr_redo_create_info, mtr);
-
- if (root_page_no == FIL_NULL) {
-
- ib::info() << "innodb_force_recovery was set to "
- << srv_force_recovery << ". Continuing crash recovery"
- " even though we failed to create index " << index_id
- << " for compressed table '" << table_name << "' with"
- " file " << space->chain.start->name;
- }
-
- return(root_page_no);
-}
-
-/** Check if index has been modified since TRUNCATE log snapshot
-was recorded.
-@param[in] space tablespace
-@param[in] root_page_no index root page number
-@return true if modified else false */
-inline
-bool
-truncate_t::is_index_modified_since_logged(
- const fil_space_t* space,
- ulint root_page_no) const
-{
- dberr_t err;
- mtr_t mtr;
-
- mtr_start(&mtr);
-
- /* Root page could be in free state if truncate crashed after drop_index
- and page was not allocated for any other object. */
- buf_block_t* block= buf_page_get_gen(
- page_id_t(space->id, root_page_no), page_size_t(space->flags),
- RW_X_LATCH, NULL,
- BUF_GET_POSSIBLY_FREED, __FILE__, __LINE__, &mtr, &err);
- if (!block) return true;
-
- page_t* root = buf_block_get_frame(block);
-
-#ifdef UNIV_DEBUG
- /* If the root page has been freed as part of truncate drop_index action
- and not yet allocated for any object still the pagelsn > snapshot lsn */
- if (block->page.file_page_was_freed) {
- ut_ad(mach_read_from_8(root + FIL_PAGE_LSN) > m_log_lsn);
- }
-#endif /* UNIV_DEBUG */
-
- lsn_t page_lsn = mach_read_from_8(root + FIL_PAGE_LSN);
-
- mtr_commit(&mtr);
-
- if (page_lsn > m_log_lsn) {
- return(true);
- }
-
- return(false);
-}
-
-/** Drop indexes for a table.
-@param[in,out] space tablespace */
-void truncate_t::drop_indexes(fil_space_t* space) const
-{
- mtr_t mtr;
-
- indexes_t::const_iterator end = m_indexes.end();
- const page_size_t page_size(space->flags);
-
- for (indexes_t::const_iterator it = m_indexes.begin();
- it != end;
- ++it) {
-
- ulint root_page_no = it->m_root_page_no;
-
- if (is_index_modified_since_logged(space, root_page_no)) {
- /* Page has been modified since TRUNCATE log snapshot
- was recorded so not safe to drop the index. */
- continue;
- }
-
- mtr_start(&mtr);
-
- if (space->id != TRX_SYS_SPACE) {
- /* Do not log changes for single-table
- tablespaces, we are in recovery mode. */
- mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
- }
-
- if (root_page_no != FIL_NULL) {
- const page_id_t root_page_id(space->id, root_page_no);
-
- btr_free_if_exists(
- root_page_id, page_size, it->m_id, &mtr);
- }
-
- /* If tree is already freed then we might return immediately
- in which case we need to release the lock we have acquired
- on root_page. */
- mtr_commit(&mtr);
- }
-}
-
-
-/** Create the indexes for a table
-@param[in] table_name table name, for which to create the indexes
-@param[in,out] space tablespace
-@param[in] format_flags page format flags
-@return DB_SUCCESS or error code. */
-inline dberr_t
-truncate_t::create_indexes(
- const char* table_name,
- fil_space_t* space,
- ulint format_flags)
-{
- mtr_t mtr;
-
- mtr_start(&mtr);
-
- if (space->id != TRX_SYS_SPACE) {
- /* Do not log changes for single-table tablespaces, we
- are in recovery mode. */
- mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
- }
-
- /* Create all new index trees with table format, index ids, index
- types, number of index fields and index field information taken
- out from the TRUNCATE log record. */
-
- ulint root_page_no = FIL_NULL;
- indexes_t::iterator end = m_indexes.end();
- for (indexes_t::iterator it = m_indexes.begin();
- it != end;
- ++it) {
-
- btr_create_t btr_redo_create_info(
- FSP_FLAGS_GET_ZIP_SSIZE(space->flags)
- ? &it->m_fields[0] : NULL);
-
- btr_redo_create_info.format_flags = format_flags;
-
- if (FSP_FLAGS_GET_ZIP_SSIZE(space->flags)) {
-
- btr_redo_create_info.n_fields = it->m_n_fields;
- /* Skip the NUL appended field */
- btr_redo_create_info.field_len =
- it->m_fields.size() - 1;
- btr_redo_create_info.trx_id_pos = it->m_trx_id_pos;
- }
-
- root_page_no = create_index(
- table_name, space, it->m_type, it->m_id,
- btr_redo_create_info, &mtr);
-
- if (root_page_no == FIL_NULL) {
- break;
- }
-
- it->m_new_root_page_no = root_page_no;
- }
-
- mtr_commit(&mtr);
-
- return(root_page_no == FIL_NULL ? DB_ERROR : DB_SUCCESS);
-}
-
-/**
-Write a TRUNCATE log record for fixing up table if truncate crashes.
-@param start_ptr buffer to write log record
-@param end_ptr buffer end
-@param space_id space id
-@param tablename the table name in the usual databasename/tablename
- format of InnoDB
-@param flags tablespace flags
-@param format_flags page format
-@param lsn lsn while logging
-@return DB_SUCCESS or error code */
-
-dberr_t
-truncate_t::write(
- byte* start_ptr,
- byte* end_ptr,
- ulint space_id,
- const char* tablename,
- ulint flags,
- ulint format_flags,
- lsn_t lsn) const
-{
- if (end_ptr < start_ptr) {
- return(DB_FAIL);
- }
-
- /* LSN, Type, Space-ID, format-flag (also know as log_flag.
- Stored in page_no field), tablespace flags */
- if (end_ptr < (start_ptr + (8 + 4 + 4 + 4))) {
- return(DB_FAIL);
- }
-
- mach_write_to_8(start_ptr, lsn);
- start_ptr += 8;
-
- mach_write_to_4(start_ptr, space_id);
- start_ptr += 4;
-
- mach_write_to_4(start_ptr, format_flags);
- start_ptr += 4;
-
- mach_write_to_4(start_ptr, flags);
- start_ptr += 4;
-
- /* Name of the table. */
- /* Include the NUL in the log record. */
- ulint len = strlen(tablename) + 1;
- if (end_ptr < (start_ptr + (len + 2))) {
- return(DB_FAIL);
- }
-
- mach_write_to_2(start_ptr, len);
- start_ptr += 2;
-
- memcpy(start_ptr, tablename, len - 1);
- start_ptr += len;
-
- DBUG_EXECUTE_IF("ib_trunc_crash_while_writing_redo_log",
- DBUG_SUICIDE(););
-
- /* Old/New Table-ID, Number of Indexes and Tablespace dir-path-name. */
- /* Write the remote directory of the table into mtr log */
- len = m_dir_path != NULL ? strlen(m_dir_path) + 1 : 0;
- if (end_ptr < (start_ptr + (len + 8 + 8 + 2 + 2))) {
- return(DB_FAIL);
- }
-
- /* Write out old-table-id. */
- mach_write_to_8(start_ptr, m_old_table_id);
- start_ptr += 8;
-
- /* Write out new-table-id. */
- mach_write_to_8(start_ptr, m_new_table_id);
- start_ptr += 8;
-
- /* Write out the number of indexes. */
- mach_write_to_2(start_ptr, m_indexes.size());
- start_ptr += 2;
-
- /* Write the length (NUL included) of the .ibd path. */
- mach_write_to_2(start_ptr, len);
- start_ptr += 2;
-
- if (m_dir_path != NULL) {
- memcpy(start_ptr, m_dir_path, len - 1);
- start_ptr += len;
- }
-
- /* Indexes information (id, type) */
- /* Write index ids, type, root-page-no into mtr log */
- for (ulint i = 0; i < m_indexes.size(); ++i) {
-
- if (end_ptr < (start_ptr + (8 + 4 + 4 + 4))) {
- return(DB_FAIL);
- }
-
- mach_write_to_8(start_ptr, m_indexes[i].m_id);
- start_ptr += 8;
-
- mach_write_to_4(start_ptr, m_indexes[i].m_type);
- start_ptr += 4;
-
- mach_write_to_4(start_ptr, m_indexes[i].m_root_page_no);
- start_ptr += 4;
-
- mach_write_to_4(start_ptr, m_indexes[i].m_trx_id_pos);
- start_ptr += 4;
- }
-
- /* If tablespace compressed then field info of each index. */
- if (FSP_FLAGS_GET_ZIP_SSIZE(flags)) {
-
- for (ulint i = 0; i < m_indexes.size(); ++i) {
-
- ulint len = m_indexes[i].m_fields.size();
- if (end_ptr < (start_ptr + (len + 2 + 2))) {
- return(DB_FAIL);
- }
-
- mach_write_to_2(
- start_ptr, m_indexes[i].m_n_fields);
- start_ptr += 2;
-
- mach_write_to_2(start_ptr, len);
- start_ptr += 2;
-
- const byte* ptr = &m_indexes[i].m_fields[0];
- memcpy(start_ptr, ptr, len - 1);
- start_ptr += len;
- }
- }
-
- return(DB_SUCCESS);
-}
diff --git a/storage/innobase/row/row0uins.cc b/storage/innobase/row/row0uins.cc
index bf5c4e9b603..6e3fb31808d 100644
--- a/storage/innobase/row/row0uins.cc
+++ b/storage/innobase/row/row0uins.cc
@@ -65,23 +65,34 @@ row_undo_ins_remove_clust_rec(
/*==========================*/
undo_node_t* node) /*!< in: undo node */
{
- btr_cur_t* btr_cur;
dberr_t err;
ulint n_tries = 0;
mtr_t mtr;
dict_index_t* index = node->pcur.btr_cur.index;
bool online;
- ut_ad(dict_index_is_clust(index));
+ ut_ad(index->is_primary());
ut_ad(node->trx->in_rollback);
mtr.start();
if (index->table->is_temporary()) {
ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
mtr.set_log_mode(MTR_LOG_NO_REDO);
+ ut_ad(!dict_index_is_online_ddl(index));
+ ut_ad(index->table->id >= DICT_HDR_FIRST_ID);
+ online = false;
} else {
index->set_modified(mtr);
ut_ad(lock_table_has_locks(index->table));
+ online = dict_index_is_online_ddl(index);
+ if (online) {
+ ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
+ ut_ad(node->trx->dict_operation_lock_mode
+ != RW_X_LATCH);
+ ut_ad(node->table->id != DICT_INDEXES_ID);
+ ut_ad(node->table->id != DICT_COLUMNS_ID);
+ mtr_s_lock_index(index, &mtr);
+ }
}
/* This is similar to row_undo_mod_clust(). The DDL thread may
@@ -90,105 +101,72 @@ row_undo_ins_remove_clust_rec(
purged. However, we can log the removal out of sync with the
B-tree modification. */
- online = dict_index_is_online_ddl(index);
- if (online) {
- ut_ad(node->trx->dict_operation_lock_mode
- != RW_X_LATCH);
- ut_ad(node->table->id != DICT_INDEXES_ID);
- mtr_s_lock_index(index, &mtr);
- }
-
ut_a(btr_pcur_restore_position(
online
? BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED
- : BTR_MODIFY_LEAF, &node->pcur, &mtr) == btr_pcur_t::SAME_ALL);
+ : (node->rec_type == TRX_UNDO_INSERT_METADATA)
+ ? BTR_MODIFY_TREE : BTR_MODIFY_LEAF, &node->pcur, &mtr)
+ == btr_pcur_t::SAME_ALL);
- btr_cur = btr_pcur_get_btr_cur(&node->pcur);
+ rec_t* rec = btr_pcur_get_rec(&node->pcur);
- ut_ad(rec_get_trx_id(btr_cur_get_rec(btr_cur), btr_cur->index)
- == node->trx->id || node->table->is_temporary());
- ut_ad(!rec_get_deleted_flag(
- btr_cur_get_rec(btr_cur),
- dict_table_is_comp(btr_cur->index->table)));
+ ut_ad(rec_get_trx_id(rec, index) == node->trx->id
+ || node->table->is_temporary());
+ ut_ad(!rec_get_deleted_flag(rec, index->table->not_redundant())
+ || rec_is_alter_metadata(rec, index->table->not_redundant()));
+ ut_ad(rec_is_metadata(rec, index->table->not_redundant())
+ == (node->rec_type == TRX_UNDO_INSERT_METADATA));
if (online && dict_index_is_online_ddl(index)) {
- const rec_t* rec = btr_cur_get_rec(btr_cur);
mem_heap_t* heap = NULL;
const rec_offs* offsets = rec_get_offsets(
rec, index, NULL, index->n_core_fields,
ULINT_UNDEFINED, &heap);
row_log_table_delete(rec, index, offsets, NULL);
mem_heap_free(heap);
- }
-
- switch (node->table->id) {
- case DICT_INDEXES_ID:
- ut_ad(!online);
- ut_ad(node->trx->dict_operation_lock_mode == RW_X_LATCH);
- ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
-
- dict_drop_index_tree(
- btr_pcur_get_rec(&node->pcur), &node->pcur, node->trx,
- &mtr);
-
- mtr.commit();
+ } else {
+ switch (node->table->id) {
+ case DICT_INDEXES_ID:
+ ut_ad(!online);
+ ut_ad(node->trx->dict_operation_lock_mode
+ == RW_X_LATCH);
+ ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
- mtr.start();
+ dict_drop_index_tree(rec, &node->pcur, node->trx,
+ &mtr);
+ mtr.commit();
- ut_a(btr_pcur_restore_position(
- BTR_MODIFY_LEAF, &node->pcur, &mtr)
- == btr_pcur_t::SAME_ALL);
- break;
- case DICT_COLUMNS_ID:
- /* This is rolling back an INSERT into SYS_COLUMNS.
- If it was part of an instant ADD COLUMN operation, we
- must modify the table definition. At this point, any
- corresponding operation to the metadata record will have
- been rolled back. */
- ut_ad(!online);
- ut_ad(node->trx->dict_operation_lock_mode == RW_X_LATCH);
- ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
- const rec_t* rec = btr_pcur_get_rec(&node->pcur);
- if (rec_get_n_fields_old(rec)
- != DICT_NUM_FIELDS__SYS_COLUMNS) {
- break;
- }
- ulint len;
- const byte* data = rec_get_nth_field_old(
- rec, DICT_FLD__SYS_COLUMNS__TABLE_ID, &len);
- if (len != 8) {
+ mtr.start();
+ ut_a(btr_pcur_restore_position(
+ BTR_MODIFY_LEAF, &node->pcur, &mtr)
+ == btr_pcur_t::SAME_ALL);
break;
+ case DICT_COLUMNS_ID:
+ /* This is rolling back an INSERT into SYS_COLUMNS.
+ If it was part of an instant ALTER TABLE operation, we
+ must evict the table definition, so that it can be
+ reloaded after the dictionary operation has been
+ completed. At this point, any corresponding operation
+ to the metadata record will have been rolled back. */
+ ut_ad(!online);
+ ut_ad(node->trx->dict_operation_lock_mode
+ == RW_X_LATCH);
+ ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
+ if (rec_get_n_fields_old(rec)
+ != DICT_NUM_FIELDS__SYS_COLUMNS) {
+ break;
+ }
+ ulint len;
+ const byte* data = rec_get_nth_field_old(
+ rec, DICT_FLD__SYS_COLUMNS__TABLE_ID, &len);
+ if (len != 8) {
+ break;
+ }
+ node->trx->evict_table(mach_read_from_8(data));
}
- const table_id_t table_id = mach_read_from_8(data);
- data = rec_get_nth_field_old(rec, DICT_FLD__SYS_COLUMNS__POS,
- &len);
- if (len != 4) {
- break;
- }
- const unsigned pos = mach_read_from_4(data);
- if (pos == 0 || pos >= (1U << 16)) {
- break;
- }
- dict_table_t* table = dict_table_open_on_id(
- table_id, true, DICT_TABLE_OP_OPEN_ONLY_IF_CACHED);
- if (!table) {
- break;
- }
-
- dict_index_t* index = dict_table_get_first_index(table);
-
- if (index && index->is_instant()
- && DATA_N_SYS_COLS + 1 + pos == table->n_cols) {
- /* This is the rollback of an instant ADD COLUMN.
- Remove the column from the dictionary cache,
- but keep the system columns. */
- table->rollback_instant(pos);
- }
-
- dict_table_close(table, true, false);
}
- if (btr_cur_optimistic_delete(btr_cur, 0, &mtr)) {
+ if (btr_cur_optimistic_delete(&node->pcur.btr_cur, 0, &mtr)) {
err = DB_SUCCESS;
goto func_exit;
}
@@ -205,7 +183,8 @@ retry:
ut_a(btr_pcur_restore_position(BTR_MODIFY_TREE | BTR_LATCH_FOR_DELETE,
&node->pcur, &mtr) == btr_pcur_t::SAME_ALL);
- btr_cur_pessimistic_delete(&err, FALSE, btr_cur, 0, true, &mtr);
+ btr_cur_pessimistic_delete(&err, FALSE, &node->pcur.btr_cur, 0, true,
+ &mtr);
/* The delete operation may fail if we have little
file space left: TODO: easiest to crash the database
@@ -224,29 +203,34 @@ retry:
}
func_exit:
- btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
if (err == DB_SUCCESS && node->rec_type == TRX_UNDO_INSERT_METADATA) {
/* When rolling back the very first instant ADD COLUMN
operation, reset the root page to the basic state. */
ut_ad(!index->table->is_temporary());
- mtr.start();
if (page_t* root = btr_root_get(index, &mtr)) {
byte* page_type = root + FIL_PAGE_TYPE;
ut_ad(mach_read_from_2(page_type)
== FIL_PAGE_TYPE_INSTANT
|| mach_read_from_2(page_type)
== FIL_PAGE_INDEX);
- index->set_modified(mtr);
mlog_write_ulint(page_type, FIL_PAGE_INDEX,
MLOG_2BYTES, &mtr);
byte* instant = PAGE_INSTANT + PAGE_HEADER + root;
mlog_write_ulint(instant,
page_ptr_get_direction(instant + 1),
MLOG_2BYTES, &mtr);
+ rec_t* infimum = page_get_infimum_rec(root);
+ rec_t* supremum = page_get_supremum_rec(root);
+ static const byte str[8 + 8] = "supremuminfimum";
+ if (memcmp(infimum, str + 8, 8)
+ || memcmp(supremum, str, 8)) {
+ mlog_write_string(infimum, str + 8, 8, &mtr);
+ mlog_write_string(supremum, str, 8, &mtr);
+ }
}
- mtr.commit();
}
+ btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
return(err);
}
@@ -378,14 +362,10 @@ retry:
return(err);
}
-/***********************************************************//**
-Parses the row reference and other info in a fresh insert undo record. */
-static
-void
-row_undo_ins_parse_undo_rec(
-/*========================*/
- undo_node_t* node, /*!< in/out: row undo node */
- ibool dict_locked) /*!< in: TRUE if own dict_sys->mutex */
+/** Parse an insert undo record.
+@param[in,out] node row rollback state
+@param[in] dict_locked whether the data dictionary cache is locked */
+static bool row_undo_ins_parse_undo_rec(undo_node_t* node, bool dict_locked)
{
dict_index_t* clust_index;
byte* ptr;
@@ -394,18 +374,28 @@ row_undo_ins_parse_undo_rec(
ulint dummy;
bool dummy_extern;
- ut_ad(node);
+ ut_ad(node->state == UNDO_INSERT_PERSISTENT
+ || node->state == UNDO_INSERT_TEMPORARY);
+ ut_ad(node->trx->in_rollback);
+ ut_ad(trx_undo_roll_ptr_is_insert(node->roll_ptr));
ptr = trx_undo_rec_get_pars(node->undo_rec, &node->rec_type, &dummy,
&dummy_extern, &undo_no, &table_id);
node->update = NULL;
- node->table = dict_table_open_on_id(
- table_id, dict_locked, DICT_TABLE_OP_NORMAL);
+ if (node->state == UNDO_INSERT_PERSISTENT) {
+ node->table = dict_table_open_on_id(table_id, dict_locked,
+ DICT_TABLE_OP_NORMAL);
+ } else if (!dict_locked) {
+ mutex_enter(&dict_sys.mutex);
+ node->table = dict_sys.get_temporary_table(table_id);
+ mutex_exit(&dict_sys.mutex);
+ } else {
+ node->table = dict_sys.get_temporary_table(table_id);
+ }
- /* Skip the UNDO if we can't find the table or the .ibd file. */
- if (UNIV_UNLIKELY(node->table == NULL)) {
- return;
+ if (!node->table) {
+ return false;
}
switch (node->rec_type) {
@@ -444,6 +434,7 @@ close_table:
connection, instead of doing this rollback. */
dict_table_close(node->table, dict_locked, FALSE);
node->table = NULL;
+ return false;
} else {
ut_ad(!node->table->skip_alter_undo);
clust_index = dict_table_get_first_index(node->table);
@@ -461,7 +452,7 @@ close_table:
after we wrote the undo log record. */
goto close_table;
}
- return;
+ return true;
}
if (!row_undo_search_clust_to_pcur(node)) {
@@ -482,6 +473,8 @@ close_table:
goto close_table;
}
}
+
+ return true;
}
/***************************************************************//**
@@ -558,18 +551,10 @@ row_undo_ins(
que_thr_t* thr) /*!< in: query thread */
{
dberr_t err;
- ibool dict_locked;
+ bool dict_locked = node->trx->dict_operation_lock_mode == RW_X_LATCH;
- ut_ad(node->state == UNDO_NODE_INSERT);
- ut_ad(node->trx->in_rollback);
- ut_ad(trx_undo_roll_ptr_is_insert(node->roll_ptr));
-
- dict_locked = node->trx->dict_operation_lock_mode == RW_X_LATCH;
-
- row_undo_ins_parse_undo_rec(node, dict_locked);
-
- if (node->table == NULL) {
- return(DB_SUCCESS);
+ if (!row_undo_ins_parse_undo_rec(node, dict_locked)) {
+ return DB_SUCCESS;
}
/* Iterate over all the indexes and undo the insert.*/
@@ -593,30 +578,23 @@ row_undo_ins(
break;
}
- /* fall through */
- case TRX_UNDO_INSERT_METADATA:
log_free_check();
if (node->table->id == DICT_INDEXES_ID) {
- ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
-
+ ut_ad(!node->table->is_temporary());
if (!dict_locked) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
}
- }
-
- // FIXME: We need to update the dict_index_t::space and
- // page number fields too.
- err = row_undo_ins_remove_clust_rec(node);
-
- if (node->table->id == DICT_INDEXES_ID
- && !dict_locked) {
-
- mutex_exit(&dict_sys->mutex);
+ err = row_undo_ins_remove_clust_rec(node);
+ if (!dict_locked) {
+ mutex_exit(&dict_sys.mutex);
+ }
+ } else {
+ err = row_undo_ins_remove_clust_rec(node);
}
if (err == DB_SUCCESS && node->table->stat_initialized) {
- /* Not protected by dict_sys->mutex for
+ /* Not protected by dict_sys.mutex for
performance reasons, we would rather get garbage
in stat_n_rows (which is just an estimate anyway)
than protecting the following code with a latch. */
@@ -625,13 +603,19 @@ row_undo_ins(
/* Do not attempt to update statistics when
executing ROLLBACK in the InnoDB SQL
interpreter, because in that case we would
- already be holding dict_sys->mutex, which
+ already be holding dict_sys.mutex, which
would be acquired when updating statistics. */
if (!dict_locked) {
dict_stats_update_if_needed(node->table,
*node->trx);
}
}
+ break;
+
+ case TRX_UNDO_INSERT_METADATA:
+ log_free_check();
+ ut_ad(!node->table->is_temporary());
+ err = row_undo_ins_remove_clust_rec(node);
}
dict_table_close(node->table, dict_locked, FALSE);
diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc
index cf32ea914c0..9f08c92a4e5 100644
--- a/storage/innobase/row/row0umod.cc
+++ b/storage/innobase/row/row0umod.cc
@@ -107,6 +107,9 @@ row_undo_mod_clust_low(
btr_cur_get_index(btr_cur))
== thr_get_trx(thr)->id
|| btr_cur_get_index(btr_cur)->table->is_temporary());
+ ut_ad(node->ref != &trx_undo_metadata
+ || node->update->info_bits == REC_INFO_METADATA_ADD
+ || node->update->info_bits == REC_INFO_METADATA_ALTER);
if (mode != BTR_MODIFY_LEAF
&& dict_index_is_online_ddl(btr_cur_get_index(btr_cur))) {
@@ -127,6 +130,7 @@ row_undo_mod_clust_low(
btr_cur, offsets, offsets_heap,
node->update, node->cmpl_info,
thr, thr_get_trx(thr)->id, mtr);
+ ut_ad(err != DB_SUCCESS || node->ref != &trx_undo_metadata);
} else {
big_rec_t* dummy_big_rec;
@@ -139,6 +143,52 @@ row_undo_mod_clust_low(
node->cmpl_info, thr, thr_get_trx(thr)->id, mtr);
ut_a(!dummy_big_rec);
+
+ static const byte
+ INFIMUM[8] = {'i','n','f','i','m','u','m',0},
+ SUPREMUM[8] = {'s','u','p','r','e','m','u','m'};
+
+ if (err == DB_SUCCESS
+ && node->ref == &trx_undo_metadata
+ && btr_cur_get_index(btr_cur)->table->instant
+ && node->update->info_bits == REC_INFO_METADATA_ADD) {
+ if (page_t* root = btr_root_get(
+ btr_cur_get_index(btr_cur), mtr)) {
+ byte* infimum;
+ byte *supremum;
+ if (page_is_comp(root)) {
+ infimum = PAGE_NEW_INFIMUM + root;
+ supremum = PAGE_NEW_SUPREMUM + root;
+ } else {
+ infimum = PAGE_OLD_INFIMUM + root;
+ supremum = PAGE_OLD_SUPREMUM + root;
+ }
+
+ ut_ad(!memcmp(infimum, INFIMUM, 8)
+ == !memcmp(supremum, SUPREMUM, 8));
+
+ if (memcmp(infimum, INFIMUM, 8)) {
+ mlog_write_string(infimum, INFIMUM,
+ 8, mtr);
+ mlog_write_string(supremum, SUPREMUM,
+ 8, mtr);
+ }
+ }
+ }
+ }
+
+ if (err == DB_SUCCESS
+ && btr_cur_get_index(btr_cur)->table->id == DICT_COLUMNS_ID) {
+ /* This is rolling back an UPDATE or DELETE on SYS_COLUMNS.
+ If it was part of an instant ALTER TABLE operation, we
+ must evict the table definition, so that it can be
+ reloaded after the dictionary operation has been
+ completed. At this point, any corresponding operation
+ to the metadata record will have been rolled back. */
+ const dfield_t& table_id = *dtuple_get_nth_field(node->row, 0);
+ ut_ad(dfield_get_len(&table_id) == 8);
+ node->trx->evict_table(mach_read_from_8(static_cast<byte*>(
+ table_id.data)));
}
return(err);
@@ -218,7 +268,7 @@ row_undo_mod_clust(
ut_ad(thr_get_trx(thr) == node->trx);
ut_ad(node->trx->dict_operation_lock_mode);
ut_ad(node->trx->in_rollback);
- ut_ad(rw_lock_own_flagged(&dict_operation_lock,
+ ut_ad(rw_lock_own_flagged(&dict_sys.latch,
RW_LOCK_FLAG_X | RW_LOCK_FLAG_S));
log_free_check();
@@ -276,7 +326,7 @@ row_undo_mod_clust(
}
/* Online rebuild cannot be initiated while we are holding
- dict_operation_lock and index->lock. (It can be aborted.) */
+ dict_sys.latch and index->lock. (It can be aborted.) */
ut_ad(online || !dict_index_is_online_ddl(index));
if (err == DB_SUCCESS && online) {
@@ -401,23 +451,49 @@ row_undo_mod_clust(
goto mtr_commit_exit;
}
+ ulint trx_id_offset = index->trx_id_offset;
ulint trx_id_pos = index->n_uniq ? index->n_uniq : 1;
- ut_ad(index->n_uniq <= MAX_REF_PARTS);
- /* Reserve enough offsets for the PRIMARY KEY and 2 columns
- so that we can access DB_TRX_ID, DB_ROLL_PTR. */
+ /* Reserve enough offsets for the PRIMARY KEY and
+ 2 columns so that we can access DB_TRX_ID, DB_ROLL_PTR. */
rec_offs offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
- rec_offs_init(offsets_);
- offsets = rec_get_offsets(
- rec, index, offsets_, index->n_core_fields,
- trx_id_pos + 2, &heap);
- ulint len;
- ulint trx_id_offset = rec_get_nth_field_offs(
- offsets, trx_id_pos, &len);
- ut_ad(len == DATA_TRX_ID_LEN);
+ if (trx_id_offset) {
+#ifdef UNIV_DEBUG
+ ut_ad(rec_offs_validate(NULL, index, offsets));
+ if (buf_block_get_page_zip(
+ btr_pcur_get_block(&node->pcur))) {
+ /* Below, page_zip_write_trx_id_and_roll_ptr()
+ needs offsets to access DB_TRX_ID,DB_ROLL_PTR.
+ We already computed offsets for possibly
+ another record in the clustered index.
+ Because the PRIMARY KEY is fixed-length,
+ the offsets for the PRIMARY KEY and
+ DB_TRX_ID,DB_ROLL_PTR are still valid.
+ Silence the rec_offs_validate() assertion. */
+ rec_offs_make_valid(rec, index, true, offsets);
+ }
+#endif
+ } else if (rec_is_metadata(rec, *index)) {
+ ut_ad(!buf_block_get_page_zip(btr_pcur_get_block(
+ &node->pcur)));
+ for (unsigned i = index->first_user_field(); i--; ) {
+ trx_id_offset += index->fields[i].fixed_len;
+ }
+ } else {
+ ut_ad(index->n_uniq <= MAX_REF_PARTS);
+ rec_offs_init(offsets_);
+ offsets = rec_get_offsets(rec, index, offsets_,
+ index->n_core_fields,
+ trx_id_pos + 2, &heap);
+ ulint len;
+ trx_id_offset = rec_get_nth_field_offs(
+ offsets, trx_id_pos, &len);
+ ut_ad(len == DATA_TRX_ID_LEN);
+ }
if (trx_read_trx_id(rec + trx_id_offset) == node->new_trx_id) {
ut_ad(!rec_get_deleted_flag(
- rec, dict_table_is_comp(node->table)));
+ rec, dict_table_is_comp(node->table))
+ || rec_is_alter_metadata(rec, *index));
index->set_modified(mtr);
if (page_zip_des_t* page_zip = buf_block_get_page_zip(
btr_pcur_get_block(&node->pcur))) {
@@ -439,8 +515,6 @@ mtr_commit_exit:
btr_pcur_commit_specify_mtr(pcur, &mtr);
func_exit:
- node->state = UNDO_NODE_FETCH_NEXT;
-
if (offsets_heap) {
mem_heap_free(offsets_heap);
}
@@ -792,7 +866,7 @@ try_again:
offsets_heap = NULL;
offsets = rec_get_offsets(
btr_cur_get_rec(btr_cur),
- index, NULL, index->n_core_fields, ULINT_UNDEFINED,
+ index, nullptr, index->n_core_fields, ULINT_UNDEFINED,
&offsets_heap);
update = row_upd_build_sec_rec_difference_binary(
btr_cur_get_rec(btr_cur), index, offsets, entry, heap);
@@ -852,9 +926,9 @@ row_undo_mod_sec_flag_corrupted(
on the data dictionary during normal rollback,
we can only mark the index corrupted in the
data dictionary cache. TODO: fix this somehow.*/
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_set_corrupted_index_cache_only(index);
- mutex_exit(&dict_sys->mutex);
+ mutex_exit(&dict_sys.mutex);
break;
default:
ut_ad(0);
@@ -1141,14 +1215,10 @@ row_undo_mod_upd_exist_sec(
return(err);
}
-/***********************************************************//**
-Parses the row reference and other info in a modify undo log record. */
-static MY_ATTRIBUTE((nonnull))
-void
-row_undo_mod_parse_undo_rec(
-/*========================*/
- undo_node_t* node, /*!< in: row undo node */
- ibool dict_locked) /*!< in: TRUE if own dict_sys->mutex */
+/** Parse an update undo record.
+@param[in,out] node row rollback state
+@param[in] dict_locked whether the data dictionary cache is locked */
+static bool row_undo_mod_parse_undo_rec(undo_node_t* node, bool dict_locked)
{
dict_index_t* clust_index;
byte* ptr;
@@ -1161,19 +1231,28 @@ row_undo_mod_parse_undo_rec(
ulint cmpl_info;
bool dummy_extern;
+ ut_ad(node->state == UNDO_UPDATE_PERSISTENT
+ || node->state == UNDO_UPDATE_TEMPORARY);
+ ut_ad(node->trx->in_rollback);
+ ut_ad(!trx_undo_roll_ptr_is_insert(node->roll_ptr));
+
ptr = trx_undo_rec_get_pars(node->undo_rec, &type, &cmpl_info,
&dummy_extern, &undo_no, &table_id);
node->rec_type = type;
- node->table = dict_table_open_on_id(
- table_id, dict_locked, DICT_TABLE_OP_NORMAL);
-
- /* TODO: other fixes associated with DROP TABLE + rollback in the
- same table by another user */
+ if (node->state == UNDO_UPDATE_PERSISTENT) {
+ node->table = dict_table_open_on_id(table_id, dict_locked,
+ DICT_TABLE_OP_NORMAL);
+ } else if (!dict_locked) {
+ mutex_enter(&dict_sys.mutex);
+ node->table = dict_sys.get_temporary_table(table_id);
+ mutex_exit(&dict_sys.mutex);
+ } else {
+ node->table = dict_sys.get_temporary_table(table_id);
+ }
- if (node->table == NULL) {
- /* Table was dropped */
- return;
+ if (!node->table) {
+ return false;
}
ut_ad(!node->table->skip_alter_undo);
@@ -1191,7 +1270,7 @@ close_table:
connection, instead of doing this rollback. */
dict_table_close(node->table, dict_locked, FALSE);
node->table = NULL;
- return;
+ return false;
}
clust_index = dict_table_get_first_index(node->table);
@@ -1210,16 +1289,21 @@ close_table:
ut_ad(!node->ref->info_bits);
if (node->update->info_bits & REC_INFO_MIN_REC_FLAG) {
- /* This must be an undo log record for a subsequent
- instant ALTER TABLE, extending the metadata record. */
- ut_ad(clust_index->is_instant());
- if (node->update->info_bits != REC_INFO_MIN_REC_FLAG) {
+ if ((node->update->info_bits & ~REC_INFO_DELETED_FLAG)
+ != REC_INFO_MIN_REC_FLAG) {
ut_ad(!"wrong info_bits in undo log record");
goto close_table;
}
- node->update->info_bits = REC_INFO_METADATA;
- const_cast<dtuple_t*>(node->ref)->info_bits
- = REC_INFO_METADATA;
+ /* This must be an undo log record for a subsequent
+ instant ALTER TABLE, extending the metadata record. */
+ ut_ad(clust_index->is_instant());
+ ut_ad(clust_index->table->instant
+ || !(node->update->info_bits & REC_INFO_DELETED_FLAG));
+ node->ref = &trx_undo_metadata;
+ node->update->info_bits = (node->update->info_bits
+ & REC_INFO_DELETED_FLAG)
+ ? REC_INFO_METADATA_ALTER
+ : REC_INFO_METADATA_ADD;
}
if (!row_undo_search_clust_to_pcur(node)) {
@@ -1251,12 +1335,14 @@ close_table:
}
/* Extract indexed virtual columns from undo log */
- if (node->table->n_v_cols) {
+ if (node->ref != &trx_undo_metadata && node->table->n_v_cols) {
row_upd_replace_vcol(node->row, node->table,
node->update, false, node->undo_row,
(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)
? NULL : ptr);
}
+
+ return true;
}
/***********************************************************//**
@@ -1269,34 +1355,19 @@ row_undo_mod(
que_thr_t* thr) /*!< in: query thread */
{
dberr_t err;
- ibool dict_locked;
-
- ut_ad(node != NULL);
- ut_ad(thr != NULL);
- ut_ad(node->state == UNDO_NODE_MODIFY);
- ut_ad(node->trx->in_rollback);
- ut_ad(!trx_undo_roll_ptr_is_insert(node->roll_ptr));
-
- dict_locked = thr_get_trx(thr)->dict_operation_lock_mode == RW_X_LATCH;
-
ut_ad(thr_get_trx(thr) == node->trx);
+ const bool dict_locked = node->trx->dict_operation_lock_mode
+ == RW_X_LATCH;
- row_undo_mod_parse_undo_rec(node, dict_locked);
-
- if (node->table == NULL) {
- /* It is already undone, or will be undone by another query
- thread, or table was dropped */
-
- node->state = UNDO_NODE_FETCH_NEXT;
-
- return(DB_SUCCESS);
+ if (!row_undo_mod_parse_undo_rec(node, dict_locked)) {
+ return DB_SUCCESS;
}
node->index = dict_table_get_first_index(node->table);
ut_ad(dict_index_is_clust(node->index));
if (node->ref->info_bits) {
- ut_ad(node->ref->info_bits == REC_INFO_METADATA);
+ ut_ad(node->ref->is_metadata());
goto rollback_clust;
}
@@ -1347,7 +1418,7 @@ rollback_clust:
/* Do not attempt to update statistics when
executing ROLLBACK in the InnoDB SQL
interpreter, because in that case we would
- already be holding dict_sys->mutex, which
+ already be holding dict_sys.mutex, which
would be acquired when updating statistics. */
if (update_statistics && !dict_locked) {
dict_stats_update_if_needed(node->table,
diff --git a/storage/innobase/row/row0undo.cc b/storage/innobase/row/row0undo.cc
index b8be086e875..a226bf443f9 100644
--- a/storage/innobase/row/row0undo.cc
+++ b/storage/innobase/row/row0undo.cc
@@ -219,7 +219,8 @@ row_undo_search_clust_to_pcur(
log, first mark them DATA_MISSING. So we will know if the
value gets updated */
if (node->table->n_v_cols
- && node->state != UNDO_NODE_INSERT
+ && (node->state == UNDO_UPDATE_PERSISTENT
+ || node->state == UNDO_UPDATE_TEMPORARY)
&& !(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
for (ulint i = 0;
i < dict_table_get_n_v_cols(node->table); i++) {
@@ -229,13 +230,15 @@ row_undo_search_clust_to_pcur(
}
if (node->rec_type == TRX_UNDO_UPD_EXIST_REC) {
- ut_ad(node->row->info_bits == REC_INFO_MIN_REC_FLAG
+ ut_ad((node->row->info_bits & ~REC_INFO_DELETED_FLAG)
+ == REC_INFO_MIN_REC_FLAG
|| node->row->info_bits == 0);
node->undo_row = dtuple_copy(node->row, node->heap);
row_upd_replace(node->undo_row, &node->undo_ext,
clust_index, node->update, node->heap);
} else {
- ut_ad((node->row->info_bits == REC_INFO_MIN_REC_FLAG)
+ ut_ad(((node->row->info_bits & ~REC_INFO_DELETED_FLAG)
+ == REC_INFO_MIN_REC_FLAG)
== (node->rec_type == TRX_UNDO_INSERT_METADATA));
node->undo_row = NULL;
node->undo_ext = NULL;
@@ -253,6 +256,136 @@ func_exit:
return(found);
}
+/** Try to truncate the undo logs.
+@param[in,out] trx transaction */
+static void row_undo_try_truncate(trx_t* trx)
+{
+ if (trx_undo_t* undo = trx->rsegs.m_redo.undo) {
+ ut_ad(undo->rseg == trx->rsegs.m_redo.rseg);
+ trx_undo_truncate_end(*undo, trx->undo_no, false);
+ }
+
+ if (trx_undo_t* undo = trx->rsegs.m_noredo.undo) {
+ ut_ad(undo->rseg == trx->rsegs.m_noredo.rseg);
+ trx_undo_truncate_end(*undo, trx->undo_no, true);
+ }
+}
+
+/** Get the latest undo log record for rollback.
+@param[in,out] node rollback context
+@return whether an undo log record was fetched */
+static bool row_undo_rec_get(undo_node_t* node)
+{
+ trx_t* trx = node->trx;
+
+ if (trx->pages_undone) {
+ trx->pages_undone = 0;
+ row_undo_try_truncate(trx);
+ }
+
+ trx_undo_t* undo = NULL;
+ trx_undo_t* update = trx->rsegs.m_redo.undo;
+ trx_undo_t* temp = trx->rsegs.m_noredo.undo;
+ const undo_no_t limit = trx->roll_limit;
+
+ ut_ad(!update || !temp || update->empty() || temp->empty()
+ || update->top_undo_no != temp->top_undo_no);
+
+ if (update && !update->empty() && update->top_undo_no >= limit) {
+ if (!undo) {
+ undo = update;
+ } else if (undo->top_undo_no < update->top_undo_no) {
+ undo = update;
+ }
+ }
+
+ if (temp && !temp->empty() && temp->top_undo_no >= limit) {
+ if (!undo) {
+ undo = temp;
+ } else if (undo->top_undo_no < temp->top_undo_no) {
+ undo = temp;
+ }
+ }
+
+ if (undo == NULL) {
+ row_undo_try_truncate(trx);
+ /* Mark any ROLLBACK TO SAVEPOINT completed, so that
+ if the transaction object is committed and reused
+ later, we will default to a full ROLLBACK. */
+ trx->roll_limit = 0;
+ trx->in_rollback = false;
+ return false;
+ }
+
+ ut_ad(!undo->empty());
+ ut_ad(limit <= undo->top_undo_no);
+
+ node->roll_ptr = trx_undo_build_roll_ptr(
+ false, undo->rseg->id, undo->top_page_no, undo->top_offset);
+
+ mtr_t mtr;
+ mtr.start();
+
+ page_t* undo_page = trx_undo_page_get_s_latched(
+ page_id_t(undo->rseg->space->id, undo->top_page_no), &mtr);
+
+ ulint offset = undo->top_offset;
+
+ trx_undo_rec_t* prev_rec = trx_undo_get_prev_rec(
+ undo_page + offset, undo->hdr_page_no, undo->hdr_offset,
+ true, &mtr);
+
+ if (prev_rec == NULL) {
+ undo->top_undo_no = IB_ID_MAX;
+ ut_ad(undo->empty());
+ } else {
+ page_t* prev_rec_page = page_align(prev_rec);
+
+ if (prev_rec_page != undo_page) {
+
+ trx->pages_undone++;
+ }
+
+ undo->top_page_no = page_get_page_no(prev_rec_page);
+ undo->top_offset = ulint(prev_rec - prev_rec_page);
+ undo->top_undo_no = trx_undo_rec_get_undo_no(prev_rec);
+ ut_ad(!undo->empty());
+ }
+
+ {
+ const trx_undo_rec_t* undo_rec = undo_page + offset;
+ node->undo_rec = trx_undo_rec_copy(undo_rec, node->heap);
+ }
+
+ mtr.commit();
+
+ switch (trx_undo_rec_get_type(node->undo_rec)) {
+ case TRX_UNDO_INSERT_METADATA:
+ /* This record type was introduced in MDEV-11369
+ instant ADD COLUMN, which was implemented after
+ MDEV-12288 removed the insert_undo log. There is no
+ instant ADD COLUMN for temporary tables. Therefore,
+ this record can only be present in the main undo log. */
+ /* fall through */
+ case TRX_UNDO_RENAME_TABLE:
+ ut_ad(undo == update);
+ /* fall through */
+ case TRX_UNDO_INSERT_REC:
+ node->roll_ptr |= 1ULL << ROLL_PTR_INSERT_FLAG_POS;
+ node->state = undo == temp
+ ? UNDO_INSERT_TEMPORARY : UNDO_INSERT_PERSISTENT;
+ break;
+ default:
+ node->state = undo == temp
+ ? UNDO_UPDATE_TEMPORARY : UNDO_UPDATE_PERSISTENT;
+ break;
+ }
+
+ trx->undo_no = node->undo_no = trx_undo_rec_get_undo_no(
+ node->undo_rec);
+ return true;
+}
+
/***********************************************************//**
Fetches an undo log record and does the undo for the recorded operation.
If none left, or a partial rollback completed, returns control to the
@@ -265,47 +398,41 @@ row_undo(
undo_node_t* node, /*!< in: row undo node */
que_thr_t* thr) /*!< in: query thread */
{
- trx_t* trx = node->trx;
- ut_ad(trx->in_rollback);
-
- if (node->state == UNDO_NODE_FETCH_NEXT) {
-
- node->undo_rec = trx_roll_pop_top_rec_of_trx(
- trx, &node->roll_ptr, node->heap);
-
- if (!node->undo_rec) {
- /* Rollback completed for this query thread */
- thr->run_node = que_node_get_parent(node);
- return(DB_SUCCESS);
- }
+ ut_ad(node->trx->in_rollback);
- node->undo_no = trx_undo_rec_get_undo_no(node->undo_rec);
- node->state = trx_undo_roll_ptr_is_insert(node->roll_ptr)
- ? UNDO_NODE_INSERT : UNDO_NODE_MODIFY;
+ if (node->state == UNDO_NODE_FETCH_NEXT && !row_undo_rec_get(node)) {
+ /* Rollback completed for this query thread */
+ thr->run_node = que_node_get_parent(node);
+ return DB_SUCCESS;
}
- /* Prevent DROP TABLE etc. while we are rolling back this row.
- If we are doing a TABLE CREATE or some other dictionary operation,
- then we already have dict_operation_lock locked in x-mode. Do not
- try to lock again, because that would cause a hang. */
-
- const bool locked_data_dict = (trx->dict_operation_lock_mode == 0);
-
- if (locked_data_dict) {
+ /* Prevent prepare_inplace_alter_table_dict() from adding
+ dict_table_t::indexes while we are processing the record.
+ Recovered transactions are not protected by MDL, and the
+ secondary index creation is not protected by table locks
+ for online operation. (A table lock would only be acquired
+ when committing the ALTER TABLE operation.) */
+ trx_t* trx = node->trx;
+ const bool locked_data_dict = !trx->dict_operation_lock_mode;
+ if (UNIV_UNLIKELY(locked_data_dict)) {
row_mysql_freeze_data_dictionary(trx);
}
dberr_t err;
- if (node->state == UNDO_NODE_INSERT) {
-
+ switch (node->state) {
+ case UNDO_INSERT_PERSISTENT:
+ case UNDO_INSERT_TEMPORARY:
err = row_undo_ins(node, thr);
-
- node->state = UNDO_NODE_FETCH_NEXT;
- } else {
- ut_ad(node->state == UNDO_NODE_MODIFY);
+ break;
+ case UNDO_UPDATE_PERSISTENT:
+ case UNDO_UPDATE_TEMPORARY:
err = row_undo_mod(node, thr);
+ break;
+ default:
+ ut_ad(!"wrong state");
+ err = DB_CORRUPTION;
}
if (locked_data_dict) {
@@ -313,7 +440,7 @@ row_undo(
row_mysql_unfreeze_data_dictionary(trx);
}
- /* Do some cleanup */
+ node->state = UNDO_NODE_FETCH_NEXT;
btr_pcur_close(&(node->pcur));
mem_heap_empty(node->heap);
diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc
index cadfc181916..193a728e502 100644
--- a/storage/innobase/row/row0upd.cc
+++ b/storage/innobase/row/row0upd.cc
@@ -127,7 +127,7 @@ row_upd_changes_first_fields_binary(
Checks if index currently is mentioned as a referenced index in a foreign
key constraint.
-NOTE that since we do not hold dict_operation_lock when leaving the
+NOTE that since we do not hold dict_sys.latch when leaving the
function, it may be that the referencing table has been dropped when
we leave this function: this function is only for heuristic use!
@@ -291,7 +291,7 @@ row_upd_check_references_constraints(
}
/* NOTE that if the thread ends up waiting for a lock
- we will release dict_operation_lock temporarily!
+ we will release dict_sys.latch temporarily!
But the inc_fk_checks() protects foreign_table from
being dropped while the check is running. */
@@ -397,7 +397,7 @@ wsrep_row_upd_check_foreign_constraints(
}
/* NOTE that if the thread ends up waiting for a lock
- we will release dict_operation_lock temporarily!
+ we will release dict_sys.latch temporarily!
But the counter on the table protects 'foreign' from
being dropped while the check is running. */
@@ -495,39 +495,6 @@ row_upd_rec_sys_fields_in_recovery(
}
}
-/*********************************************************************//**
-Sets the trx id or roll ptr field of a clustered index entry. */
-void
-row_upd_index_entry_sys_field(
-/*==========================*/
- dtuple_t* entry, /*!< in/out: index entry, where the memory
- buffers for sys fields are already allocated:
- the function just copies the new values to
- them */
- dict_index_t* index, /*!< in: clustered index */
- ulint type, /*!< in: DATA_TRX_ID or DATA_ROLL_PTR */
- ib_uint64_t val) /*!< in: value to write */
-{
- dfield_t* dfield;
- byte* field;
- ulint pos;
-
- ut_ad(dict_index_is_clust(index));
-
- pos = dict_index_get_sys_col_pos(index, type);
-
- dfield = dtuple_get_nth_field(entry, pos);
- field = static_cast<byte*>(dfield_get_data(dfield));
-
- if (type == DATA_TRX_ID) {
- ut_ad(val > 0 || index->table->is_temporary());
- trx_write_trx_id(field, val);
- } else {
- ut_ad(type == DATA_ROLL_PTR);
- trx_write_roll_ptr(field, val);
- }
-}
-
/***********************************************************//**
Returns TRUE if row update changes size of some field in index or if some
field to be updated is stored externally in rec or update.
@@ -680,7 +647,7 @@ row_upd_rec_in_place(
switch (rec_get_status(rec)) {
case REC_STATUS_ORDINARY:
break;
- case REC_STATUS_COLUMNS_ADDED:
+ case REC_STATUS_INSTANT:
ut_ad(index->is_instant());
break;
case REC_STATUS_NODE_PTR:
@@ -731,35 +698,6 @@ row_upd_rec_in_place(
}
/*********************************************************************//**
-Writes into the redo log the values of trx id and roll ptr and enough info
-to determine their positions within a clustered index record.
-@return new pointer to mlog */
-byte*
-row_upd_write_sys_vals_to_log(
-/*==========================*/
- dict_index_t* index, /*!< in: clustered index */
- trx_id_t trx_id, /*!< in: transaction id */
- roll_ptr_t roll_ptr,/*!< in: roll ptr of the undo log record */
- byte* log_ptr,/*!< pointer to a buffer of size > 20 opened
- in mlog */
- mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in: mtr */
-{
- ut_ad(dict_index_is_clust(index));
- ut_ad(mtr);
-
- log_ptr += mach_write_compressed(log_ptr,
- dict_index_get_sys_col_pos(
- index, DATA_TRX_ID));
-
- trx_write_roll_ptr(log_ptr, roll_ptr);
- log_ptr += DATA_ROLL_PTR_LEN;
-
- log_ptr += mach_u64_write_compressed(log_ptr, trx_id);
-
- return(log_ptr);
-}
-
-/*********************************************************************//**
Parses the log data of system field values.
@return log data end or NULL */
byte*
@@ -1052,7 +990,6 @@ row_upd_build_difference_binary(
ulint len;
upd_t* update;
ulint n_diff;
- ulint trx_id_pos;
rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
const ulint n_v_fld = dtuple_get_n_v_fields(entry);
rec_offs_init(offsets_);
@@ -1067,10 +1004,6 @@ row_upd_build_difference_binary(
n_diff = 0;
- trx_id_pos = dict_index_get_sys_col_pos(index, DATA_TRX_ID);
- ut_ad(dict_index_get_sys_col_pos(index, DATA_ROLL_PTR)
- == trx_id_pos + 1);
-
if (!offsets) {
offsets = rec_get_offsets(rec, index, offsets_,
index->n_core_fields,
@@ -1086,16 +1019,9 @@ row_upd_build_difference_binary(
/* NOTE: we compare the fields as binary strings!
(No collation) */
- if (no_sys) {
- /* TRX_ID */
- if (i == trx_id_pos) {
- continue;
- }
-
- /* DB_ROLL_PTR */
- if (i == trx_id_pos + 1) {
- continue;
- }
+ if (no_sys && (i == index->db_trx_id()
+ || i == index->db_roll_ptr())) {
+ continue;
}
if (!dfield_is_ext(dfield)
@@ -1189,7 +1115,7 @@ of the column and must not be poisoned with the new values.
@param[in] data 'internally' stored part of the field
containing also the reference to the external part
@param[in] local_len length of data, in bytes
-@param[in] page_size BLOB page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] len input - length of prefix to
fetch; output: fetched length of the prefix
@param[in,out] heap heap where to allocate
@@ -1201,14 +1127,14 @@ byte*
row_upd_ext_fetch(
const byte* data,
ulint local_len,
- const page_size_t& page_size,
+ ulint zip_size,
ulint* len,
mem_heap_t* heap)
{
byte* buf = static_cast<byte*>(mem_heap_alloc(heap, *len));
*len = btr_copy_externally_stored_field_prefix(
- buf, *len, page_size, data, local_len);
+ buf, *len, zip_size, data, local_len);
return *len ? buf : NULL;
}
@@ -1221,7 +1147,7 @@ the given index entry field.
@param[in] uf update field
@param[in,out] heap memory heap for allocating and copying
the new value
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@return whether the previous version was built successfully */
MY_ATTRIBUTE((nonnull, warn_unused_result))
static
@@ -1232,7 +1158,7 @@ row_upd_index_replace_new_col_val(
const dict_col_t* col,
const upd_field_t* uf,
mem_heap_t* heap,
- const page_size_t& page_size)
+ ulint zip_size)
{
ulint len;
const byte* data;
@@ -1256,7 +1182,7 @@ row_upd_index_replace_new_col_val(
len = field->prefix_len;
- data = row_upd_ext_fetch(data, l, page_size,
+ data = row_upd_ext_fetch(data, l, zip_size,
&len, heap);
if (UNIV_UNLIKELY(!data)) {
return false;
@@ -1317,6 +1243,60 @@ row_upd_index_replace_new_col_val(
return true;
}
+/** Apply an update vector to an metadata entry.
+@param[in,out] entry clustered index metadata record to be updated
+@param[in] index index of the entry
+@param[in] update update vector built for the entry
+@param[in,out] heap memory heap for copying off-page columns */
+static
+void
+row_upd_index_replace_metadata(
+ dtuple_t* entry,
+ const dict_index_t* index,
+ const upd_t* update,
+ mem_heap_t* heap)
+{
+ ut_ad(!index->table->skip_alter_undo);
+ ut_ad(update->is_alter_metadata());
+ ut_ad(entry->info_bits == update->info_bits);
+ ut_ad(entry->n_fields == ulint(index->n_fields) + 1);
+ const ulint zip_size = index->table->space->zip_size();
+ const ulint first = index->first_user_field();
+ ut_d(bool found_mblob = false);
+
+ for (ulint i = upd_get_n_fields(update); i--; ) {
+ const upd_field_t* uf = upd_get_nth_field(update, i);
+ ut_ad(!upd_fld_is_virtual_col(uf));
+ ut_ad(uf->field_no >= first - 2);
+ ulint f = uf->field_no;
+ dfield_t* dfield = dtuple_get_nth_field(entry, f);
+
+ if (f == first) {
+ ut_d(found_mblob = true);
+ ut_ad(!dfield_is_null(&uf->new_val));
+ ut_ad(dfield_is_ext(dfield));
+ ut_ad(dfield_get_len(dfield) == FIELD_REF_SIZE);
+ ut_ad(!dfield_is_null(dfield));
+ dfield_set_data(dfield, uf->new_val.data,
+ uf->new_val.len);
+ if (dfield_is_ext(&uf->new_val)) {
+ dfield_set_ext(dfield);
+ }
+ continue;
+ }
+
+ f -= f > first;
+ const dict_field_t* field = dict_index_get_nth_field(index, f);
+ if (!row_upd_index_replace_new_col_val(dfield, field,
+ field->col,
+ uf, heap, zip_size)) {
+ ut_error;
+ }
+ }
+
+ ut_ad(found_mblob);
+}
+
/** Apply an update vector to an index entry.
@param[in,out] entry index entry to be updated; the clustered index record
must be covered by a lock or a page latch to prevent
@@ -1332,8 +1312,14 @@ row_upd_index_replace_new_col_vals_index_pos(
mem_heap_t* heap)
{
ut_ad(!index->table->skip_alter_undo);
+ ut_ad(!entry->is_metadata() || entry->info_bits == update->info_bits);
- const page_size_t& page_size = dict_table_page_size(index->table);
+ if (UNIV_UNLIKELY(entry->is_alter_metadata())) {
+ row_upd_index_replace_metadata(entry, index, update, heap);
+ return;
+ }
+
+ const ulint zip_size = index->table->space->zip_size();
dtuple_set_info_bits(entry, update->info_bits);
@@ -1359,7 +1345,7 @@ row_upd_index_replace_new_col_vals_index_pos(
if (uf && UNIV_UNLIKELY(!row_upd_index_replace_new_col_val(
dtuple_get_nth_field(entry, i),
field, col, uf, heap,
- page_size))) {
+ zip_size))) {
ut_error;
}
}
@@ -1378,7 +1364,7 @@ row_upd_index_replace_new_col_vals(dtuple_t *entry, const dict_index_t &index,
const upd_t *update, mem_heap_t *heap)
{
ut_ad(index.is_primary());
- const page_size_t& page_size= dict_table_page_size(index.table);
+ const ulint zip_size= index.table->space->zip_size();
ut_ad(!index.table->skip_alter_undo);
dtuple_set_info_bits(entry, update->info_bits);
@@ -1402,7 +1388,7 @@ row_upd_index_replace_new_col_vals(dtuple_t *entry, const dict_index_t &index,
continue;
if (!row_upd_index_replace_new_col_val(dtuple_get_nth_field(entry, i),
- field, col, uf, heap, page_size))
+ field, col, uf, heap, zip_size))
return false;
}
@@ -1628,8 +1614,7 @@ row_upd_replace(
}
if (n_ext_cols) {
- *ext = row_ext_create(n_ext_cols, ext_cols, table->flags, row,
- heap);
+ *ext = row_ext_create(n_ext_cols, ext_cols, *table, row, heap);
} else {
*ext = NULL;
}
@@ -1737,11 +1722,9 @@ row_upd_changes_ord_field_binary_func(
mem_heap_t* temp_heap = NULL;
const dfield_t* new_field = &upd_field->new_val;
- const page_size_t page_size
- = (ext != NULL)
- ? ext->page_size
- : dict_table_page_size(
- index->table);
+ const ulint zip_size = ext
+ ? ext->zip_size
+ : index->table->space->zip_size();
ut_ad(dfield->data != NULL
&& dfield->len > GEO_DATA_HEADER_SIZE);
@@ -1758,7 +1741,7 @@ row_upd_changes_ord_field_binary_func(
dptr = btr_copy_externally_stored_field(
&dlen, dptr,
- page_size,
+ zip_size,
flen,
temp_heap);
} else {
@@ -1821,7 +1804,7 @@ row_upd_changes_ord_field_binary_func(
dptr = btr_copy_externally_stored_field(
&dlen, dptr,
- page_size,
+ zip_size,
flen,
temp_heap);
} else {
@@ -2434,7 +2417,7 @@ row_upd_sec_index_entry(
#ifdef UNIV_DEBUG
mtr_commit(&mtr);
mtr_start(&mtr);
- ut_ad(btr_validate_index(index, 0, false) == DB_SUCCESS);
+ ut_ad(btr_validate_index(index, 0) == DB_SUCCESS);
ut_ad(0);
#endif /* UNIV_DEBUG */
break;
@@ -2585,10 +2568,10 @@ row_upd_sec_step(
}
#ifdef UNIV_DEBUG
-# define row_upd_clust_rec_by_insert_inherit(rec,offsets,entry,update) \
- row_upd_clust_rec_by_insert_inherit_func(rec,offsets,entry,update)
+# define row_upd_clust_rec_by_insert_inherit(rec,index,offsets,entry,update) \
+ row_upd_clust_rec_by_insert_inherit_func(rec,index,offsets,entry,update)
#else /* UNIV_DEBUG */
-# define row_upd_clust_rec_by_insert_inherit(rec,offsets,entry,update) \
+# define row_upd_clust_rec_by_insert_inherit(rec,index,offsets,entry,update) \
row_upd_clust_rec_by_insert_inherit_func(rec,entry,update)
#endif /* UNIV_DEBUG */
/*******************************************************************//**
@@ -2603,6 +2586,7 @@ row_upd_clust_rec_by_insert_inherit_func(
/*=====================================*/
const rec_t* rec, /*!< in: old record, or NULL */
#ifdef UNIV_DEBUG
+ dict_index_t* index, /*!< in: index, or NULL */
const rec_offs* offsets,/*!< in: rec_get_offsets(rec), or NULL */
#endif /* UNIV_DEBUG */
dtuple_t* entry, /*!< in/out: updated entry to be
@@ -2613,6 +2597,8 @@ row_upd_clust_rec_by_insert_inherit_func(
ulint i;
ut_ad(!rec == !offsets);
+ ut_ad(!rec == !index);
+ ut_ad(!rec || rec_offs_validate(rec, index, offsets));
ut_ad(!rec || rec_offs_any_extern(offsets));
for (i = 0; i < dtuple_get_n_fields(entry); i++) {
@@ -2623,6 +2609,9 @@ row_upd_clust_rec_by_insert_inherit_func(
ut_ad(!offsets
|| !rec_offs_nth_extern(offsets, i)
== !dfield_is_ext(dfield)
+ || (!dict_index_get_nth_field(index, i)->name
+ && !dfield_is_ext(dfield)
+ && (dfield_is_null(dfield) || dfield->len == 0))
|| upd_get_field_by_field_no(update, i, false));
if (!dfield_is_ext(dfield)
|| upd_get_field_by_field_no(update, i, false)) {
@@ -2724,7 +2713,11 @@ row_upd_clust_rec_by_insert(
if (index->is_instant()) entry->trim(*index);
ut_ad(dtuple_get_info_bits(entry) == 0);
- row_upd_index_entry_sys_field(entry, index, DATA_TRX_ID, trx->id);
+ {
+ dfield_t* t = dtuple_get_nth_field(entry, index->db_trx_id());
+ ut_ad(t->len == DATA_TRX_ID_LEN);
+ trx_write_trx_id(static_cast<byte*>(t->data), trx->id);
+ }
switch (node->state) {
default:
@@ -2733,7 +2726,7 @@ row_upd_clust_rec_by_insert(
/* A lock wait occurred in row_ins_clust_index_entry() in
the previous invocation of this function. */
row_upd_clust_rec_by_insert_inherit(
- NULL, NULL, entry, node->update);
+ NULL, NULL, NULL, entry, node->update);
break;
case UPD_NODE_UPDATE_CLUSTERED:
/* This is the first invocation of the function where
@@ -2772,7 +2765,8 @@ row_upd_clust_rec_by_insert(
if (rec_offs_any_extern(offsets)) {
if (row_upd_clust_rec_by_insert_inherit(
- rec, offsets, entry, node->update)) {
+ rec, index, offsets,
+ entry, node->update)) {
/* The blobs are disowned here, expecting the
insert down below to inherit them. But if the
insert fails, then this disown will be undone
diff --git a/storage/innobase/srv/srv0conc.cc b/storage/innobase/srv/srv0conc.cc
index 10caa0193a7..ed02fc5c396 100644
--- a/storage/innobase/srv/srv0conc.cc
+++ b/storage/innobase/srv/srv0conc.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2020, MariaDB Corporation.
+Copyright (c) 2015, 2021, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -44,6 +44,8 @@ Created 2011/04/18 Sunny Bains
#include "dict0dict.h"
#include <mysql/service_thd_wait.h>
#include <mysql/service_wsrep.h>
+#include "wsrep.h"
+#include "log.h"
/** Number of times a thread is allowed to enter InnoDB within the same
SQL query after it has once got the ticket. */
@@ -67,14 +69,12 @@ ulong srv_thread_concurrency = 0;
/** Variables tracking the active and waiting threads. */
struct srv_conc_t {
- char pad[CACHE_LINE_SIZE - (sizeof(ulint) + sizeof(lint))];
-
/** Number of transactions that have declared_to_be_inside_innodb */
- ulint n_active;
+ MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) Atomic_counter<ulint> n_active;
/** Number of OS threads waiting in the FIFO for permission to
enter InnoDB */
- ulint n_waiting;
+ MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) Atomic_counter<ulint> n_waiting;
};
/* Control variables for tracking concurrency. */
@@ -120,11 +120,15 @@ srv_conc_enter_innodb_with_atomics(
for (;;) {
ulint sleep_in_us;
#ifdef WITH_WSREP
- if (trx->is_wsrep() && wsrep_trx_is_aborting(trx->mysql_thd)) {
- if (UNIV_UNLIKELY(wsrep_debug)) {
- ib::info() <<
- "srv_conc_enter due to MUST_ABORT";
+ /* We need to take `thd->LOCK_thd_data` to check WSREP thread state */
+ if (trx->is_wsrep()) {
+ wsrep_thd_LOCK(trx->mysql_thd);
+
+ if (wsrep_thd_is_aborting(trx->mysql_thd)) {
+ WSREP_DEBUG("srv_conc_enter due to MUST_ABORT for"
+ TRX_ID_FMT, trx->id);
}
+ wsrep_thd_UNLOCK(trx->mysql_thd);
srv_conc_force_enter_innodb(trx);
return;
}
@@ -132,8 +136,7 @@ srv_conc_enter_innodb_with_atomics(
if (srv_thread_concurrency == 0) {
if (notified_mysql) {
- my_atomic_addlint(&srv_conc.n_waiting,
- ulint(-1));
+ srv_conc.n_waiting--;
thd_wait_end(trx->mysql_thd);
}
@@ -141,19 +144,14 @@ srv_conc_enter_innodb_with_atomics(
}
if (srv_conc.n_active < srv_thread_concurrency) {
- ulint n_active;
/* Check if there are any free tickets. */
- n_active = my_atomic_addlint(
- &srv_conc.n_active, 1) + 1;
-
- if (n_active <= srv_thread_concurrency) {
+ if (srv_conc.n_active++ < srv_thread_concurrency) {
srv_enter_innodb_with_tickets(trx);
if (notified_mysql) {
- my_atomic_addlint(&srv_conc.n_waiting,
- ulint(-1));
+ srv_conc.n_waiting--;
thd_wait_end(trx->mysql_thd);
}
@@ -175,11 +173,11 @@ srv_conc_enter_innodb_with_atomics(
/* Since there were no free seats, we relinquish
the overbooked ticket. */
- my_atomic_addlint(&srv_conc.n_active, ulint(-1));
+ srv_conc.n_active--;
}
if (!notified_mysql) {
- my_atomic_addlint(&srv_conc.n_waiting, 1);
+ srv_conc.n_waiting++;
thd_wait_begin(trx->mysql_thd, THD_WAIT_USER_LOCK);
@@ -223,7 +221,7 @@ srv_conc_exit_innodb_with_atomics(
trx->n_tickets_to_enter_innodb = 0;
trx->declared_to_be_inside_innodb = FALSE;
- my_atomic_addlint(&srv_conc.n_active, ulint(-1));
+ srv_conc.n_active--;
}
/*********************************************************************//**
@@ -257,7 +255,7 @@ srv_conc_force_enter_innodb(
return;
}
- (void) my_atomic_addlint(&srv_conc.n_active, 1);
+ srv_conc.n_active++;
trx->n_tickets_to_enter_innodb = 1;
trx->declared_to_be_inside_innodb = TRUE;
diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc
index 39f495c4ced..97ea562140c 100644
--- a/storage/innobase/srv/srv0mon.cc
+++ b/storage/innobase/srv/srv0mon.cc
@@ -286,12 +286,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_READ},
- {"buffer_pages0_read", "buffer",
- "Number of page 0 read (innodb_pages0_read)",
- static_cast<monitor_type_t>(
- MONITOR_EXISTING | MONITOR_DEFAULT_ON),
- MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES0_READ},
-
{"buffer_index_sec_rec_cluster_reads", "buffer",
"Number of secondary record reads triggered cluster read",
static_cast<monitor_type_t>(
@@ -790,11 +784,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_TRX_ROLLBACK_SAVEPOINT},
- {"trx_rollback_active", "transaction",
- "Number of resurrected active transactions rolled back",
- MONITOR_NONE,
- MONITOR_DEFAULT_START, MONITOR_TRX_ROLLBACK_ACTIVE},
-
{"trx_active_transactions", "transaction",
"Number of active transactions",
MONITOR_NONE,
@@ -1423,8 +1412,8 @@ monitor_value_t innodb_counter_value[NUM_MONITOR];
/* monitor_set_tbl is used to record and determine whether a monitor
has been turned on/off. */
-ulint monitor_set_tbl[(NUM_MONITOR + NUM_BITS_ULINT
- - 1) / NUM_BITS_ULINT];
+Atomic_relaxed<ulint>
+ monitor_set_tbl[(NUM_MONITOR + NUM_BITS_ULINT - 1) / NUM_BITS_ULINT];
/****************************************************************//**
Get a monitor's "monitor_info" by its monitor id (index into the
@@ -1726,11 +1715,6 @@ srv_mon_process_existing_counter(
value = stat.n_pages_read;
break;
- /* innodb_pages0_read */
- case MONITOR_OVLD_PAGES0_READ:
- value = srv_stats.page0_read;
- break;
-
/* Number of times secondary index lookup triggered cluster lookup */
case MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS:
value = srv_stats.n_sec_rec_cluster_reads;
@@ -1933,7 +1917,7 @@ srv_mon_process_existing_counter(
break;
case MONITOR_RSEG_HISTORY_LEN:
- value = trx_sys.history_size();
+ value = trx_sys.rseg_history_len;
break;
case MONITOR_RSEG_CUR_SIZE:
@@ -2030,7 +2014,7 @@ srv_mon_process_existing_counter(
#endif /* BTR_CUR_HASH_ADAPT */
case MONITOR_OVLD_ADAPTIVE_HASH_SEARCH_BTREE:
- value = my_atomic_loadlint(&btr_cur_n_non_sea);
+ value = btr_cur_n_non_sea;
break;
case MONITOR_OVLD_PAGE_COMPRESS_SAVED:
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 9f02e31277b..47e0fe13053 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -59,7 +59,6 @@ Created 10/8/1995 Heikki Tuuri
#include "pars0pars.h"
#include "que0que.h"
#include "row0mysql.h"
-#include "row0trunc.h"
#include "row0log.h"
#include "srv0mon.h"
#include "srv0srv.h"
@@ -76,11 +75,6 @@ Created 10/8/1995 Heikki Tuuri
#include "btr0scrub.h"
#include <my_service_manager.h>
-
-#ifdef WITH_WSREP
-extern int wsrep_debug;
-extern int wsrep_trx_is_aborting(void *thd_ptr);
-#endif
/* The following is the maximum allowed duration of a lock wait. */
UNIV_INTERN ulong srv_fatal_semaphore_wait_threshold = DEFAULT_SRV_FATAL_SEMAPHORE_TIMEOUT;
@@ -199,8 +193,6 @@ ulong srv_page_size_shift;
/** innodb_log_write_ahead_size */
ulong srv_log_write_ahead_size;
-page_size_t univ_page_size(0, 0, false);
-
/** innodb_adaptive_flushing; try to flush dirty pages so as to avoid
IO bursts at the checkpoints. */
my_bool srv_adaptive_flushing;
@@ -490,10 +482,6 @@ UNIV_INTERN ulong srv_buf_dump_status_frequency;
mutex_enter(&srv_sys.mutex); \
} while (0)
-/** Test if the system mutex is owned. */
-#define srv_sys_mutex_own() (mutex_own(&srv_sys.mutex) \
- && !srv_read_only_mode)
-
/** Release the system mutex. */
#define srv_sys_mutex_exit() do { \
mutex_exit(&srv_sys.mutex); \
@@ -590,11 +578,12 @@ struct srv_sys_t{
sys_threads[]->event are
covered by srv_sys_t::mutex */
- ulint n_threads_active[SRV_MASTER + 1];
+ Atomic_counter<ulint>
+ n_threads_active[SRV_MASTER + 1];
/*!< number of threads active
in a thread class; protected
- by both my_atomic_addlint()
- and mutex */
+ by both std::atomic and
+ mutex */
srv_stats_t::ulint_ctr_1_t
activity_count; /*!< For tracking server
@@ -606,7 +595,7 @@ static srv_sys_t srv_sys;
/** @return whether the purge coordinator thread is active */
bool purge_sys_t::running()
{
- return my_atomic_loadlint(&srv_sys.n_threads_active[SRV_PURGE]);
+ return srv_sys.n_threads_active[SRV_PURGE];
}
/** Event to signal srv_monitor_thread. Not protected by a mutex.
@@ -809,7 +798,7 @@ srv_reserve_slot(
ut_ad(srv_slot_get_type(slot) == type);
- my_atomic_addlint(&srv_sys.n_threads_active[type], 1);
+ srv_sys.n_threads_active[type]++;
srv_sys_mutex_exit();
@@ -826,7 +815,7 @@ srv_suspend_thread_low(
srv_slot_t* slot) /*!< in/out: thread slot */
{
ut_ad(!srv_read_only_mode);
- ut_ad(srv_sys_mutex_own());
+ ut_ad(mutex_own(&srv_sys.mutex));
ut_ad(slot->in_use);
@@ -856,8 +845,7 @@ srv_suspend_thread_low(
ut_a(!slot->suspended);
slot->suspended = TRUE;
- if (lint(my_atomic_addlint(&srv_sys.n_threads_active[type], ulint(-1)))
- < 0) {
+ if (srv_sys.n_threads_active[type]-- == 0) {
ut_error;
}
@@ -914,7 +902,7 @@ srv_resume_thread(srv_slot_t* slot, int64_t sig_count = 0, bool wait = true,
ut_ad(slot->suspended);
slot->suspended = FALSE;
- my_atomic_addlint(&srv_sys.n_threads_active[slot->type], 1);
+ srv_sys.n_threads_active[slot->type]++;
srv_sys_mutex_exit();
return(timeout);
}
@@ -1135,7 +1123,7 @@ srv_refresh_innodb_monitor_stats(void)
#ifdef BTR_CUR_HASH_ADAPT
btr_cur_n_sea_old = btr_cur_n_sea;
#endif /* BTR_CUR_HASH_ADAPT */
- btr_cur_n_non_sea_old = my_atomic_loadlint(&btr_cur_n_non_sea);
+ btr_cur_n_non_sea_old = btr_cur_n_non_sea;
log_refresh_stats();
@@ -1296,16 +1284,16 @@ srv_printf_innodb_monitor(
"%.2f hash searches/s, %.2f non-hash searches/s\n",
(btr_cur_n_sea - btr_cur_n_sea_old)
/ time_elapsed,
- (my_atomic_loadlint(&btr_cur_n_non_sea) - btr_cur_n_non_sea_old)
+ (btr_cur_n_non_sea - btr_cur_n_non_sea_old)
/ time_elapsed);
btr_cur_n_sea_old = btr_cur_n_sea;
#else /* BTR_CUR_HASH_ADAPT */
fprintf(file,
"%.2f non-hash searches/s\n",
- (my_atomic_loadlint(&btr_cur_n_non_sea) - btr_cur_n_non_sea_old)
+ (btr_cur_n_non_sea - btr_cur_n_non_sea_old)
/ time_elapsed);
#endif /* BTR_CUR_HASH_ADAPT */
- btr_cur_n_non_sea_old = my_atomic_loadlint(&btr_cur_n_non_sea);
+ btr_cur_n_non_sea_old = btr_cur_n_non_sea;
fputs("---\n"
"LOG\n"
@@ -1318,7 +1306,7 @@ srv_printf_innodb_monitor(
fprintf(file,
"Total large memory allocated " ULINTPF "\n"
"Dictionary memory allocated " ULINTPF "\n",
- os_total_large_mem_allocated,
+ ulint{os_total_large_mem_allocated},
dict_sys_get_size());
buf_print_io(file);
@@ -1525,7 +1513,6 @@ srv_export_innodb_status(void)
export_vars.innodb_pages_created = stat.n_pages_created;
export_vars.innodb_pages_read = stat.n_pages_read;
- export_vars.innodb_page0_read = srv_stats.page0_read;
export_vars.innodb_pages_written = stat.n_pages_written;
@@ -1889,11 +1876,11 @@ void
srv_active_wake_master_thread_low()
{
ut_ad(!srv_read_only_mode);
- ut_ad(!srv_sys_mutex_own());
+ ut_ad(!mutex_own(&srv_sys.mutex));
srv_inc_activity_count();
- if (my_atomic_loadlint(&srv_sys.n_threads_active[SRV_MASTER]) == 0) {
+ if (srv_sys.n_threads_active[SRV_MASTER] == 0) {
srv_slot_t* slot;
srv_sys_mutex_enter();
@@ -1915,11 +1902,12 @@ srv_active_wake_master_thread_low()
void
srv_wake_purge_thread_if_not_active()
{
- ut_ad(!srv_sys_mutex_own());
+ ut_ad(!srv_read_only_mode);
+ ut_ad(!mutex_own(&srv_sys.mutex));
if (purge_sys.enabled() && !purge_sys.paused()
- && !my_atomic_loadlint(&srv_sys.n_threads_active[SRV_PURGE])
- && trx_sys.history_size()) {
+ && !srv_sys.n_threads_active[SRV_PURGE]
+ && trx_sys.rseg_history_len) {
srv_release_threads(SRV_PURGE, 1);
}
@@ -1987,16 +1975,12 @@ srv_master_evict_from_table_cache(
{
ulint n_tables_evicted = 0;
- rw_lock_x_lock(&dict_operation_lock);
-
- dict_mutex_enter_for_mysql();
+ dict_sys_lock();
n_tables_evicted = dict_make_room_in_cache(
innobase_get_table_cache_size(), pct_check);
- dict_mutex_exit_for_mysql();
-
- rw_lock_x_unlock(&dict_operation_lock);
+ dict_sys_unlock();
return(n_tables_evicted);
}
@@ -2391,10 +2375,6 @@ loop:
srv_suspend_thread(slot);
- /* DO NOT CHANGE THIS STRING. innobase_start_or_create_for_mysql()
- waits for database activity to die down when converting < 4.1.x
- databases, and relies on this string being exactly as it is. InnoDB
- manual also mentions this string in several places. */
srv_main_thread_op_info = "waiting for server activity";
srv_resume_thread(slot);
@@ -2413,7 +2393,7 @@ static bool srv_purge_should_exit()
return true;
/* Slow shutdown was requested. */
- if (const ulint history_size= trx_sys.history_size())
+ if (const size_t history_size= trx_sys.rseg_history_len)
{
static time_t progress_time;
time_t now= time(NULL);
@@ -2450,7 +2430,7 @@ static bool srv_task_execute(ut_d(srv_slot_t *slot))
mutex_exit(&srv_sys.tasks_mutex);
ut_d(thr->thread_slot = slot);
que_run_threads(thr);
- my_atomic_addlint(&purge_sys.n_completed, 1);
+ purge_sys.n_tasks.fetch_sub(1, std::memory_order_release);
return true;
}
@@ -2493,7 +2473,7 @@ DECLARE_THREAD(srv_worker_thread)(
#endif
ut_a(srv_n_purge_threads > 1);
- ut_a(ulong(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER]))
+ ut_a(ulong(srv_sys.n_threads_active[SRV_WORKER])
< srv_n_purge_threads);
/* We need to ensure that the worker threads exit after the
@@ -2536,17 +2516,17 @@ DECLARE_THREAD(srv_worker_thread)(
/** Do the actual purge operation.
@param[in,out] n_total_purged total number of purged pages
@return length of history list before the last purge batch. */
-static ulint srv_do_purge(ulint* n_total_purged
+static size_t srv_do_purge(ulint* n_total_purged
#ifdef UNIV_DEBUG
- , srv_slot_t* slot /*!< purge coordinator */
+ , srv_slot_t* slot /*!< purge coordinator */
#endif
- )
+ )
{
ulint n_pages_purged;
static ulint count = 0;
static ulint n_use_threads = 0;
- static ulint rseg_history_len = 0;
+ static size_t rseg_history_len = 0;
ulint old_activity_count = srv_get_activity_count();
const ulint n_threads = srv_n_purge_threads;
@@ -2564,7 +2544,7 @@ static ulint srv_do_purge(ulint* n_total_purged
}
do {
- if (trx_sys.history_size() > rseg_history_len
+ if (trx_sys.rseg_history_len > rseg_history_len
|| (srv_max_purge_lag > 0
&& rseg_history_len > srv_max_purge_lag)) {
@@ -2593,20 +2573,14 @@ static ulint srv_do_purge(ulint* n_total_purged
ut_a(n_use_threads <= n_threads);
/* Take a snapshot of the history list before purge. */
- if (!(rseg_history_len = trx_sys.history_size())) {
+ if (!(rseg_history_len = trx_sys.rseg_history_len)) {
break;
}
- ulint undo_trunc_freq =
- purge_sys.undo_trunc.get_rseg_truncate_frequency();
-
- ulint rseg_truncate_frequency = ut_min(
- static_cast<ulint>(srv_purge_rseg_truncate_frequency),
- undo_trunc_freq);
-
n_pages_purged = trx_purge(
n_use_threads,
- (++count % rseg_truncate_frequency) == 0
+ !(++count % srv_purge_rseg_truncate_frequency)
+ || purge_sys.truncate.current
|| (srv_shutdown_state != SRV_SHUTDOWN_NONE
&& srv_fast_shutdown == 0)
#ifdef UNIV_DEBUG
@@ -2632,7 +2606,7 @@ srv_purge_coordinator_suspend(
/*==========================*/
srv_slot_t* slot, /*!< in/out: Purge coordinator
thread slot */
- ulint rseg_history_len) /*!< in: history list length
+ size_t rseg_history_len) /*!< in: history list length
before last purge */
{
ut_ad(!srv_read_only_mode);
@@ -2649,7 +2623,7 @@ srv_purge_coordinator_suspend(
/* We don't wait right away on the the non-timed wait because
we want to signal the thread that wants to suspend purge. */
const bool wait = stop
- || rseg_history_len <= trx_sys.history_size();
+ || rseg_history_len <= trx_sys.rseg_history_len;
const bool timeout = srv_resume_thread(
slot, sig_count, wait,
stop ? 0 : SRV_PURGE_MAX_TIMEOUT);
@@ -2659,12 +2633,12 @@ srv_purge_coordinator_suspend(
rw_lock_x_lock(&purge_sys.latch);
stop = srv_shutdown_state <= SRV_SHUTDOWN_INITIATED
- && purge_sys.paused_latched();
+ && purge_sys.paused();
if (!stop) {
if (timeout
&& rseg_history_len < 5000
- && rseg_history_len == trx_sys.history_size()) {
+ && rseg_history_len == trx_sys.rseg_history_len) {
/* No new records were added since the
wait started. Simply wait for new
records. The magic number 5000 is an
@@ -2723,7 +2697,7 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
rw_lock_create(PFS_NOT_INSTRUMENTED, &slot->debug_sync_lock,
SYNC_NO_ORDER_CHECK);
#endif
- ulint rseg_history_len = trx_sys.history_size();
+ size_t rseg_history_len = trx_sys.rseg_history_len;
do {
/* If there are no records to purge or the last
@@ -2758,11 +2732,6 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
/* Note that we are shutting down. */
rw_lock_x_lock(&purge_sys.latch);
purge_sys.coordinator_shutdown();
-
- /* If there are any pending undo-tablespace truncate then clear
- it off as we plan to shutdown the purge thread. */
- purge_sys.undo_trunc.clear();
-
/* Ensure that the wait in purge_sys_t::stop() will terminate. */
os_event_set(purge_sys.event);
@@ -2854,9 +2823,7 @@ srv_purge_wakeup()
srv_release_threads(SRV_WORKER, n_workers);
}
- } while (!my_atomic_loadptr_explicit(reinterpret_cast<void**>
- (&srv_running),
- MY_MEMORY_ORDER_RELAXED)
+ } while (!srv_running.load(std::memory_order_relaxed)
&& (srv_sys.n_threads_active[SRV_WORKER]
|| srv_sys.n_threads_active[SRV_PURGE]));
}
@@ -2870,41 +2837,6 @@ void srv_purge_shutdown()
} while (srv_sys.sys_threads[SRV_PURGE_SLOT].in_use);
}
-/** Check if tablespace is being truncated.
-(Ignore system-tablespace as we don't re-create the tablespace
-and so some of the action that are suppressed by this function
-for independent tablespace are not applicable to system-tablespace).
-@param space_id space_id to check for truncate action
-@return true if being truncated, false if not being
- truncated or tablespace is system-tablespace. */
-bool
-srv_is_tablespace_truncated(ulint space_id)
-{
- if (is_system_tablespace(space_id)) {
- return(false);
- }
-
- return(truncate_t::is_tablespace_truncated(space_id)
- || undo::Truncate::is_tablespace_truncated(space_id));
-
-}
-
-/** Check if tablespace was truncated.
-@param[in] space space object to check for truncate action
-@return true if tablespace was truncated and we still have an active
-MLOG_TRUNCATE REDO log record. */
-bool
-srv_was_tablespace_truncated(const fil_space_t* space)
-{
- if (space == NULL) {
- ut_ad(0);
- return(false);
- }
-
- return (!is_system_tablespace(space->id)
- && truncate_t::was_tablespace_truncated(space->id));
-}
-
#ifdef UNIV_DEBUG
static ulint get_first_slot(srv_thread_type type)
{
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 1578440e46d..00864234380 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -73,7 +73,6 @@ Created 2/16/1996 Heikki Tuuri
#include "srv0start.h"
#include "srv0srv.h"
#include "btr0defragment.h"
-#include "row0trunc.h"
#include "mysql/service_wsrep.h" /* wsrep_recovery */
#include "trx0rseg.h"
#include "os0proc.h"
@@ -96,7 +95,6 @@ Created 2/16/1996 Heikki Tuuri
#include "row0upd.h"
#include "row0row.h"
#include "row0mysql.h"
-#include "row0trunc.h"
#include "btr0pcur.h"
#include "os0event.h"
#include "zlib.h"
@@ -681,9 +679,19 @@ static bool srv_undo_tablespace_open(const char* name, ulint space_id,
fil_set_max_space_id_if_bigger(space_id);
- fil_space_t* space = fil_space_create(
- undo_name, space_id, FSP_FLAGS_PAGE_SSIZE(),
- FIL_TYPE_TABLESPACE, NULL);
+ ulint fsp_flags;
+ switch (srv_checksum_algorithm) {
+ case SRV_CHECKSUM_ALGORITHM_FULL_CRC32:
+ case SRV_CHECKSUM_ALGORITHM_STRICT_FULL_CRC32:
+ fsp_flags = (FSP_FLAGS_FCRC32_MASK_MARKER
+ | FSP_FLAGS_FCRC32_PAGE_SSIZE());
+ break;
+ default:
+ fsp_flags = FSP_FLAGS_PAGE_SSIZE();
+ }
+
+ fil_space_t* space = fil_space_create(undo_name, space_id, fsp_flags,
+ FIL_TYPE_TABLESPACE, NULL);
ut_a(fil_validate());
ut_a(space);
@@ -787,8 +795,6 @@ srv_check_undo_redo_logs_exists()
return(DB_SUCCESS);
}
-undo::undo_spaces_t undo::Truncate::s_fix_up_spaces;
-
/** Open the configured number of dedicated undo tablespaces.
@param[in] create_new_db whether the database is being initialized
@return DB_SUCCESS or error code */
@@ -870,47 +876,9 @@ srv_undo_tablespaces_init(bool create_new_db)
prev_space_id = srv_undo_space_id_start - 1;
break;
case SRV_OPERATION_NORMAL:
- if (create_new_db) {
- break;
- }
- /* fall through */
case SRV_OPERATION_RESTORE_ROLLBACK_XA:
case SRV_OPERATION_RESTORE:
case SRV_OPERATION_RESTORE_EXPORT:
- ut_ad(!create_new_db);
-
- /* Check if any of the UNDO tablespace needs fix-up because
- server crashed while truncate was active on UNDO tablespace.*/
- for (i = 0; i < n_undo_tablespaces; ++i) {
-
- undo::Truncate undo_trunc;
-
- if (undo_trunc.needs_fix_up(undo_tablespace_ids[i])) {
-
- char name[OS_FILE_MAX_PATH];
-
- snprintf(name, sizeof(name),
- "%s%cundo%03zu",
- srv_undo_dir, OS_PATH_SEPARATOR,
- undo_tablespace_ids[i]);
-
- os_file_delete(innodb_data_file_key, name);
-
- err = srv_undo_tablespace_create(
- name,
- SRV_UNDO_TABLESPACE_SIZE_IN_PAGES);
-
- if (err != DB_SUCCESS) {
- ib::error() << "Could not fix-up undo "
- " tablespace truncate '"
- << name << "'.";
- return(err);
- }
-
- undo::Truncate::s_fix_up_spaces.push_back(
- undo_tablespace_ids[i]);
- }
- }
break;
}
@@ -1015,67 +983,6 @@ srv_undo_tablespaces_init(bool create_new_db)
}
}
- if (!undo::Truncate::s_fix_up_spaces.empty()) {
-
- /* Step-1: Initialize the tablespace header and rsegs header. */
- mtr_t mtr;
-
- mtr_start(&mtr);
- /* Turn off REDO logging. We are in server start mode and fixing
- UNDO tablespace even before REDO log is read. Let's say we
- do REDO logging here then this REDO log record will be applied
- as part of the current recovery process. We surely don't need
- that as this is fix-up action parallel to REDO logging. */
- mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO);
- buf_block_t* sys_header = trx_sysf_get(&mtr);
- if (!sys_header) {
- mtr.commit();
- return DB_CORRUPTION;
- }
-
- const trx_id_t max_trx_id = trx_sys.get_max_trx_id();
-
- for (undo::undo_spaces_t::const_iterator it
- = undo::Truncate::s_fix_up_spaces.begin();
- it != undo::Truncate::s_fix_up_spaces.end();
- ++it) {
-
- undo::Truncate::add_space_to_trunc_list(*it);
-
- fil_space_t* space = fil_space_get(*it);
-
- fsp_header_init(space,
- SRV_UNDO_TABLESPACE_SIZE_IN_PAGES,
- &mtr);
-
- for (ulint i = 0; i < TRX_SYS_N_RSEGS; i++) {
- if (trx_sysf_rseg_get_space(sys_header, i)
- == *it) {
- trx_rseg_header_create(
- space, i, max_trx_id,
- sys_header, &mtr);
- }
- }
-
- undo::Truncate::clear_trunc_list();
- }
- mtr_commit(&mtr);
-
- /* Step-2: Flush the dirty pages from the buffer pool. */
- for (undo::undo_spaces_t::const_iterator it
- = undo::Truncate::s_fix_up_spaces.begin();
- it != undo::Truncate::s_fix_up_spaces.end();
- ++it) {
- FlushObserver dummy(fil_system.sys_space, NULL, NULL);
- buf_LRU_flush_or_remove_pages(TRX_SYS_SPACE, &dummy);
- FlushObserver dummy2(fil_space_get(*it), NULL, NULL);
- buf_LRU_flush_or_remove_pages(*it, &dummy2);
-
- /* Remove the truncate redo log file. */
- undo::done(*it);
- }
- }
-
return(DB_SUCCESS);
}
@@ -1206,11 +1113,11 @@ srv_shutdown_all_bg_threads()
ut_ad(!srv_read_only_mode);
/* e. Exit the i/o threads */
- if (recv_sys->flush_start != NULL) {
- os_event_set(recv_sys->flush_start);
+ if (recv_sys.flush_start != NULL) {
+ os_event_set(recv_sys.flush_start);
}
- if (recv_sys->flush_end != NULL) {
- os_event_set(recv_sys->flush_end);
+ if (recv_sys.flush_end != NULL) {
+ os_event_set(recv_sys.flush_end);
}
os_event_set(buf_flush_event);
@@ -1304,9 +1211,7 @@ srv_prepare_to_delete_redo_log_files(
ulint pending_io = 0;
ulint count = 0;
- if ((log_sys.log.format & ~LOG_HEADER_FORMAT_ENCRYPTED)
- != LOG_HEADER_FORMAT_CURRENT
- || log_sys.log.subformat != 2) {
+ if (log_sys.log.subformat != 2) {
srv_log_file_size = 0;
}
@@ -1325,12 +1230,10 @@ srv_prepare_to_delete_redo_log_files(
{
ib::info info;
- if (srv_log_file_size == 0) {
- info << ((log_sys.log.format
- & ~LOG_HEADER_FORMAT_ENCRYPTED)
- != LOG_HEADER_FORMAT_10_4
- ? "Upgrading redo log: "
- : "Downgrading redo log: ");
+ if (srv_log_file_size == 0
+ || (log_sys.log.format & ~log_t::FORMAT_ENCRYPTED)
+ != log_t::FORMAT_10_4) {
+ info << "Upgrading redo log: ";
} else if (n_files != srv_n_log_files
|| srv_log_file_size
!= srv_log_file_size_requested) {
@@ -1640,7 +1543,7 @@ dberr_t srv_start(bool create_new_db)
#endif /* UNIV_DEBUG */
log_sys.create();
- recv_sys_init();
+ recv_sys.create();
lock_sys.create(srv_lock_table_size);
/* Create i/o-handler threads: */
@@ -1668,7 +1571,7 @@ dberr_t srv_start(bool create_new_db)
#ifdef UNIV_LINUX
/* Wait for the setpriority() call to finish. */
- os_event_wait(recv_sys->flush_end);
+ os_event_wait(recv_sys.flush_end);
#endif /* UNIV_LINUX */
srv_start_state_set(SRV_START_STATE_IO);
}
@@ -1682,7 +1585,7 @@ dberr_t srv_start(bool create_new_db)
if (err != DB_SUCCESS) {
return(srv_init_abort(DB_ERROR));
}
- recv_sys_debug_free();
+ recv_sys.debug_free();
}
/* Open or create the data files. */
@@ -1927,7 +1830,7 @@ files_checked:
ulint ibuf_root = btr_create(
DICT_CLUSTERED | DICT_IBUF, fil_system.sys_space,
- DICT_IBUF_ID_MIN, dict_ind_redundant, NULL, &mtr);
+ DICT_IBUF_ID_MIN, dict_ind_redundant, &mtr);
mtr_commit(&mtr);
@@ -1970,28 +1873,20 @@ files_checked:
return(srv_init_abort(err));
}
} else {
- /* Invalidate the buffer pool to ensure that we reread
- the page that we read above, during recovery.
- Note that this is not as heavy weight as it seems. At
- this point there will be only ONE page in the buf_LRU
- and there must be no page in the buf_flush list. */
- buf_pool_invalidate();
+ /* Work around the bug that we were performing a dirty read of
+ at least the TRX_SYS page into the buffer pool above, without
+ reading or applying any redo logs.
- /* Scan and locate truncate log files. Parsed located files
- and add table to truncate information to central vector for
- truncate fix-up action post recovery. */
- err = TruncateLogParser::scan_and_parse(srv_log_group_home_dir);
- if (err != DB_SUCCESS) {
-
- return(srv_init_abort(DB_ERROR));
- }
+ MDEV-19229 FIXME: Remove the dirty reads and this call.
+ Add an assertion that the buffer pool is empty. */
+ buf_pool_invalidate();
/* We always try to do a recovery, even if the database had
been shut down normally: this is the normal startup path */
err = recv_recovery_from_checkpoint_start(flushed_lsn);
- recv_sys->dblwr.pages.clear();
+ recv_sys.dblwr.pages.clear();
if (err != DB_SUCCESS) {
return(srv_init_abort(err));
@@ -2027,8 +1922,8 @@ files_checked:
recv_apply_hashed_log_recs(true);
- if (recv_sys->found_corrupt_log
- || recv_sys->found_corrupt_fs) {
+ if (recv_sys.found_corrupt_log
+ || recv_sys.found_corrupt_fs) {
return(srv_init_abort(DB_CORRUPTION));
}
@@ -2053,7 +1948,7 @@ files_checked:
mtr.x_lock_space(fil_system.sys_space,
__FILE__, __LINE__);
buf_block_t* block = buf_page_get(
- page_id_t(0, 0), univ_page_size,
+ page_id_t(0, 0), 0,
RW_SX_LATCH, &mtr);
ulint size = mach_read_from_4(
FSP_HEADER_OFFSET + FSP_SIZE
@@ -2077,8 +1972,7 @@ files_checked:
#ifdef UNIV_DEBUG
{
mtr.start();
- buf_block_t* block = buf_page_get(page_id_t(0, 0),
- univ_page_size,
+ buf_block_t* block = buf_page_get(page_id_t(0, 0), 0,
RW_S_LATCH, &mtr);
ut_ad(mach_read_from_4(FSP_SIZE + FSP_HEADER_OFFSET
+ block->frame)
@@ -2170,9 +2064,8 @@ files_checked:
&& srv_n_log_files_found == srv_n_log_files
&& log_sys.log.format
== (srv_encrypt_log
- ? LOG_HEADER_FORMAT_CURRENT
- | LOG_HEADER_FORMAT_ENCRYPTED
- : LOG_HEADER_FORMAT_CURRENT)
+ ? log_t::FORMAT_ENC_10_4
+ : log_t::FORMAT_10_4)
&& log_sys.log.subformat == 2) {
/* No need to add or remove encryption,
upgrade, downgrade, or resize. */
@@ -2231,8 +2124,9 @@ files_checked:
}
/* Validate a few system page types that were left
- uninitialized by older versions of MySQL. */
- if (!high_level_read_only) {
+ uninitialized before MySQL or MariaDB 5.5. */
+ if (!high_level_read_only
+ && !fil_system.sys_space->full_crc32()) {
buf_block_t* block;
mtr.start();
/* Bitmap page types will be reset in
@@ -2240,24 +2134,24 @@ files_checked:
block = buf_page_get(
page_id_t(IBUF_SPACE_ID,
FSP_IBUF_HEADER_PAGE_NO),
- univ_page_size, RW_X_LATCH, &mtr);
+ 0, RW_X_LATCH, &mtr);
fil_block_check_type(*block, FIL_PAGE_TYPE_SYS, &mtr);
/* Already MySQL 3.23.53 initialized
FSP_IBUF_TREE_ROOT_PAGE_NO to
FIL_PAGE_INDEX. No need to reset that one. */
block = buf_page_get(
page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
- univ_page_size, RW_X_LATCH, &mtr);
+ 0, RW_X_LATCH, &mtr);
fil_block_check_type(*block, FIL_PAGE_TYPE_TRX_SYS,
&mtr);
block = buf_page_get(
page_id_t(TRX_SYS_SPACE,
FSP_FIRST_RSEG_PAGE_NO),
- univ_page_size, RW_X_LATCH, &mtr);
+ 0, RW_X_LATCH, &mtr);
fil_block_check_type(*block, FIL_PAGE_TYPE_SYS, &mtr);
block = buf_page_get(
page_id_t(TRX_SYS_SPACE, FSP_DICT_HDR_PAGE_NO),
- univ_page_size, RW_X_LATCH, &mtr);
+ 0, RW_X_LATCH, &mtr);
fil_block_check_type(*block, FIL_PAGE_TYPE_SYS, &mtr);
mtr.commit();
}
@@ -2267,17 +2161,18 @@ files_checked:
The data dictionary latch should guarantee that there is at
most one data dictionary transaction active at a time. */
if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
+ /* If the following call is ever removed, the
+ first-time ha_innobase::open() must hold (or
+ acquire and release) a table lock that
+ conflicts with trx_resurrect_table_locks(), to
+ ensure that any recovered incomplete ALTER TABLE
+ will have been rolled back. Otherwise,
+ dict_table_t::instant could be cleared by rollback
+ invoking dict_index_t::clear_instant_alter() while
+ open table handles exist in client connections. */
trx_rollback_recovered(false);
}
- /* Fix-up truncate of tables in the system tablespace
- if server crashed while truncate was active. The non-
- system tables are done after tablespace discovery. Do
- this now because this procedure assumes that no pages
- have changed since redo recovery. Tablespace discovery
- can do updates to pages in the system tablespace.*/
- err = truncate_t::fixup_tables_in_system_tablespace();
-
if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
/* Open or Create SYS_TABLESPACES and SYS_DATAFILES
so that tablespace names and other metadata can be
@@ -2304,10 +2199,6 @@ files_checked:
dict_check_tablespaces_and_store_max_id();
}
- /* Fix-up truncate of table if server crashed while truncate
- was active. */
- err = truncate_t::fixup_tables_in_non_system_tablespace();
-
if (err != DB_SUCCESS) {
return(srv_init_abort(err));
}
@@ -2499,7 +2390,7 @@ skip_monitors:
Create the dump/load thread only when not running with
--wsrep-recover.
*/
- if (!wsrep_recovery) {
+ if (!get_wsrep_recovery()) {
#endif /* WITH_WSREP */
/* Create the buffer pool dump/load thread */
@@ -2558,9 +2449,7 @@ void srv_shutdown_bg_undo_sources()
/** Shut down InnoDB. */
void innodb_shutdown()
{
- ut_ad(!my_atomic_loadptr_explicit(reinterpret_cast<void**>
- (&srv_running),
- MY_MEMORY_ORDER_RELAXED));
+ ut_ad(!srv_running.load(std::memory_order_relaxed));
ut_ad(!srv_undo_sources);
switch (srv_operation) {
@@ -2604,7 +2493,7 @@ void innodb_shutdown()
}
ut_ad(dict_stats_event || !srv_was_started || srv_read_only_mode);
- ut_ad(dict_sys || !srv_was_started);
+ ut_ad(dict_sys.is_initialised() || !srv_was_started);
ut_ad(trx_sys.is_initialised() || !srv_was_started);
ut_ad(buf_dblwr || !srv_was_started || srv_read_only_mode
|| srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO);
@@ -2633,7 +2522,7 @@ void innodb_shutdown()
and closing the data dictionary. */
#ifdef BTR_CUR_HASH_ADAPT
- if (dict_sys) {
+ if (dict_sys.is_initialised()) {
btr_search_disable();
}
#endif /* BTR_CUR_HASH_ADAPT */
@@ -2654,7 +2543,7 @@ void innodb_shutdown()
mutex_free(&srv_misc_tmpfile_mutex);
}
- dict_close();
+ dict_sys.close();
btr_search_sys_free();
/* 3. Free all InnoDB's own mutexes and the os_fast_mutexes inside
@@ -2667,7 +2556,7 @@ void innodb_shutdown()
/* 4. Free all allocated memory */
pars_lexer_close();
- recv_sys_close();
+ recv_sys.close();
ut_ad(buf_pool_ptr || !srv_was_started);
if (buf_pool_ptr) {
diff --git a/storage/innobase/sync/sync0arr.cc b/storage/innobase/sync/sync0arr.cc
index 2f9f0a49986..8f8ba52c584 100644
--- a/storage/innobase/sync/sync0arr.cc
+++ b/storage/innobase/sync/sync0arr.cc
@@ -76,8 +76,8 @@ keep the global wait array for the sake of diagnostics and also to avoid
infinite wait The error_monitor thread scans the global wait array to signal
any waiting threads who have missed the signal. */
-typedef SyncArrayMutex::MutexType WaitMutex;
-typedef BlockSyncArrayMutex::MutexType BlockWaitMutex;
+typedef TTASEventMutex<GenericPolicy> WaitMutex;
+typedef TTASEventMutex<BlockMutexPolicy> BlockWaitMutex;
/** The latch types that use the sync array. */
union sync_object_t {
@@ -501,7 +501,7 @@ sync_array_cell_print(
WaitMutex* mutex = cell->latch.mutex;
const WaitMutex::MutexPolicy& policy = mutex->policy();
#ifdef UNIV_DEBUG
- const char* name = policy.get_enter_filename();
+ const char* name = policy.context.get_enter_filename();
if (name == NULL) {
/* The mutex might have been released. */
name = "NULL";
@@ -520,7 +520,7 @@ sync_array_cell_print(
mutex->state()
#ifdef UNIV_DEBUG
,name,
- policy.get_enter_line()
+ policy.context.get_enter_line()
#endif /* UNIV_DEBUG */
);
}
@@ -530,7 +530,7 @@ sync_array_cell_print(
const BlockWaitMutex::MutexPolicy& policy =
mutex->policy();
#ifdef UNIV_DEBUG
- const char* name = policy.get_enter_filename();
+ const char* name = policy.context.get_enter_filename();
if (name == NULL) {
/* The mutex might have been released. */
name = "NULL";
@@ -548,7 +548,7 @@ sync_array_cell_print(
(ulong) mutex->state()
#ifdef UNIV_DEBUG
,name,
- (ulong) policy.get_enter_line()
+ (ulong) policy.context.get_enter_line()
#endif /* UNIV_DEBUG */
);
} else if (type == RW_LOCK_X
@@ -593,8 +593,8 @@ sync_array_cell_print(
#endif
"\n",
rw_lock_get_reader_count(rwlock),
- my_atomic_load32_explicit(&rwlock->waiters, MY_MEMORY_ORDER_RELAXED),
- my_atomic_load32_explicit(&rwlock->lock_word, MY_MEMORY_ORDER_RELAXED),
+ uint32_t{rwlock->waiters},
+ int32_t{rwlock->lock_word},
innobase_basename(rwlock->last_x_file_name),
rwlock->last_x_line
#if 0 /* JAN: TODO: FIX LATER */
@@ -740,7 +740,7 @@ sync_array_detect_deadlock(
const WaitMutex::MutexPolicy& policy = mutex->policy();
if (mutex->state() != MUTEX_STATE_UNLOCKED) {
- thread = policy.get_thread_id();
+ thread = policy.context.get_thread_id();
/* Note that mutex->thread_id above may be
also OS_THREAD_ID_UNDEFINED, because the
@@ -755,7 +755,7 @@ sync_array_detect_deadlock(
if (ret) {
const char* name;
- name = policy.get_enter_filename();
+ name = policy.context.get_enter_filename();
if (name == NULL) {
/* The mutex might have been
@@ -767,7 +767,7 @@ sync_array_detect_deadlock(
<< "Mutex " << mutex << " owned by"
" thread " << os_thread_pf(thread)
<< " file " << name << " line "
- << policy.get_enter_line();
+ << policy.context.get_enter_line();
sync_array_cell_print(stderr, cell);
@@ -787,7 +787,7 @@ sync_array_detect_deadlock(
mutex->policy();
if (mutex->state() != MUTEX_STATE_UNLOCKED) {
- thread = policy.get_thread_id();
+ thread = policy.context.get_thread_id();
/* Note that mutex->thread_id above may be
also OS_THREAD_ID_UNDEFINED, because the
@@ -802,7 +802,7 @@ sync_array_detect_deadlock(
if (ret) {
const char* name;
- name = policy.get_enter_filename();
+ name = policy.context.get_enter_filename();
if (name == NULL) {
/* The mutex might have been
@@ -814,7 +814,7 @@ sync_array_detect_deadlock(
<< "Mutex " << mutex << " owned by"
" thread " << os_thread_pf(thread)
<< " file " << name << " line "
- << policy.get_enter_line();
+ << policy.context.get_enter_line();
return(true);
@@ -972,7 +972,7 @@ sync_array_print_long_waits_low(
ulint i;
/* For huge tables, skip the check during CHECK TABLE etc... */
- if (fatal_timeout > SRV_SEMAPHORE_WAIT_EXTENSION) {
+ if (btr_validate_index_running) {
return(false);
}
@@ -1382,9 +1382,9 @@ sync_arr_fill_sys_semphore_waits_table(
//fields[SYS_SEMAPHORE_WAITS_HOLDER_LINE]->set_notnull();
OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_READERS], rw_lock_get_reader_count(rwlock)));
OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_WAITERS_FLAG],
- my_atomic_load32_explicit(&rwlock->waiters, MY_MEMORY_ORDER_RELAXED)));
+ rwlock->waiters));
OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_LOCK_WORD],
- my_atomic_load32_explicit(&rwlock->lock_word, MY_MEMORY_ORDER_RELAXED)));
+ rwlock->lock_word));
OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_FILE], innobase_basename(rwlock->last_x_file_name)));
OK(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE]->store(rwlock->last_x_line, true));
fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE]->set_notnull();
diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc
index 7444fb7f4fb..6f99eec8c07 100644
--- a/storage/innobase/sync/sync0debug.cc
+++ b/storage/innobase/sync/sync0debug.cc
@@ -494,11 +494,9 @@ LatchDebug::LatchDebug()
LEVEL_MAP_INSERT(SYNC_IBUF_HEADER);
LEVEL_MAP_INSERT(SYNC_DICT_HEADER);
LEVEL_MAP_INSERT(SYNC_STATS_AUTO_RECALC);
- LEVEL_MAP_INSERT(SYNC_DICT_AUTOINC_MUTEX);
LEVEL_MAP_INSERT(SYNC_DICT);
LEVEL_MAP_INSERT(SYNC_FTS_CACHE);
LEVEL_MAP_INSERT(SYNC_DICT_OPERATION);
- LEVEL_MAP_INSERT(SYNC_TRX_I_S_LAST_READ);
LEVEL_MAP_INSERT(SYNC_TRX_I_S_RWLOCK);
LEVEL_MAP_INSERT(SYNC_RECV_WRITER);
LEVEL_MAP_INSERT(SYNC_LEVEL_VARYING);
@@ -752,11 +750,9 @@ LatchDebug::check_order(
case SYNC_NOREDO_RSEG:
case SYNC_PURGE_LATCH:
case SYNC_PURGE_QUEUE:
- case SYNC_DICT_AUTOINC_MUTEX:
case SYNC_DICT_OPERATION:
case SYNC_DICT_HEADER:
case SYNC_TRX_I_S_RWLOCK:
- case SYNC_TRX_I_S_LAST_READ:
case SYNC_IBUF_MUTEX:
case SYNC_INDEX_ONLINE_LOG:
case SYNC_STATS_AUTO_RECALC:
@@ -1245,8 +1241,6 @@ sync_latch_meta_init()
/* The latches should be ordered on latch_id_t. So that we can
index directly into the vector to update and fetch meta-data. */
- LATCH_ADD_MUTEX(AUTOINC, SYNC_DICT_AUTOINC_MUTEX, autoinc_mutex_key);
-
#if defined PFS_SKIP_BUFFER_MUTEX_RWLOCK || defined PFS_GROUP_BUFFER_SYNC
LATCH_ADD_MUTEX(BUF_BLOCK_MUTEX, SYNC_BUF_BLOCK, PFS_NOT_INSTRUMENTED);
#else
@@ -1258,9 +1252,6 @@ sync_latch_meta_init()
LATCH_ADD_MUTEX(BUF_POOL_ZIP, SYNC_BUF_BLOCK, buf_pool_zip_mutex_key);
- LATCH_ADD_MUTEX(CACHE_LAST_READ, SYNC_TRX_I_S_LAST_READ,
- cache_last_read_mutex_key);
-
LATCH_ADD_MUTEX(DICT_FOREIGN_ERR, SYNC_NO_ORDER_CHECK,
dict_foreign_err_mutex_key);
@@ -1377,8 +1368,6 @@ sync_latch_meta_init()
LATCH_ADD_MUTEX(SYNC_ARRAY_MUTEX, SYNC_NO_ORDER_CHECK,
sync_array_mutex_key);
- LATCH_ADD_MUTEX(ZIP_PAD_MUTEX, SYNC_NO_ORDER_CHECK, zip_pad_mutex_key);
-
LATCH_ADD_MUTEX(OS_AIO_READ_MUTEX, SYNC_NO_ORDER_CHECK,
PFS_NOT_INSTRUMENTED);
diff --git a/storage/innobase/sync/sync0rw.cc b/storage/innobase/sync/sync0rw.cc
index 8ebfd27e7aa..9f9453e20b5 100644
--- a/storage/innobase/sync/sync0rw.cc
+++ b/storage/innobase/sync/sync0rw.cc
@@ -202,9 +202,6 @@ rw_lock_create_func(
new(lock) rw_lock_t();
#endif /* UNIV_DEBUG */
- /* If this is the very first time a synchronization object is
- created, then the following call initializes the sync system. */
-
lock->lock_word = X_LOCK_DECR;
lock->waiters = 0;
@@ -238,9 +235,7 @@ rw_lock_create_func(
lock->is_block_lock = 0;
mutex_enter(&rw_lock_list_mutex);
-
UT_LIST_ADD_FIRST(rw_lock_list, lock);
-
mutex_exit(&rw_lock_list_mutex);
}
@@ -254,8 +249,7 @@ rw_lock_free_func(
rw_lock_t* lock) /*!< in/out: rw-lock */
{
ut_ad(rw_lock_validate(lock));
- ut_a(my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED) == X_LOCK_DECR);
+ ut_a(lock->lock_word == X_LOCK_DECR);
mutex_enter(&rw_lock_list_mutex);
@@ -300,8 +294,7 @@ lock_loop:
HMT_low();
ulint j = i;
while (i < srv_n_spin_wait_rounds &&
- my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED) <= 0) {
+ lock->lock_word <= 0) {
ut_delay(srv_spin_wait_delay);
i++;
}
@@ -341,7 +334,7 @@ lock_loop:
/* Set waiters before checking lock_word to ensure wake-up
signal is sent. This may lead to some unnecessary signals. */
- my_atomic_fas32_explicit(&lock->waiters, 1, MY_MEMORY_ORDER_ACQUIRE);
+ lock->waiters.exchange(1, std::memory_order_acquire);
if (rw_lock_s_lock_low(lock, pass, file_name, line)) {
@@ -419,10 +412,10 @@ rw_lock_x_lock_wait_func(
sync_array_t* sync_arr;
int64_t count_os_wait = 0;
- ut_ad(my_atomic_load32_explicit(&lock->lock_word, MY_MEMORY_ORDER_RELAXED) <= threshold);
+ ut_ad(lock->lock_word <= threshold);
HMT_low();
- while (my_atomic_load32_explicit(&lock->lock_word, MY_MEMORY_ORDER_RELAXED) < threshold) {
+ while (lock->lock_word < threshold) {
ut_delay(srv_spin_wait_delay);
if (i < srv_n_spin_wait_rounds) {
@@ -441,8 +434,7 @@ rw_lock_x_lock_wait_func(
i = 0;
/* Check lock_word to ensure wake-up isn't missed.*/
- if (my_atomic_load32_explicit(&lock->lock_word, MY_MEMORY_ORDER_RELAXED) < threshold) {
-
+ if (lock->lock_word < threshold) {
++count_os_wait;
/* Add debug info as it is needed to detect possible
@@ -531,18 +523,15 @@ rw_lock_x_lock_low(
file_name, line);
} else {
- int32_t lock_word = my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_word = lock->lock_word;
/* At least one X lock by this thread already
exists. Add another. */
if (lock_word == 0
|| lock_word == -X_LOCK_HALF_DECR) {
- my_atomic_add32_explicit(&lock->lock_word, -X_LOCK_DECR,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_sub(X_LOCK_DECR);
} else {
ut_ad(lock_word <= -X_LOCK_DECR);
- my_atomic_add32_explicit(&lock->lock_word, -1,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_sub(1);
}
}
@@ -614,10 +603,10 @@ rw_lock_sx_lock_low(
read and write to the lock_word. */
#ifdef UNIV_DEBUG
- int32_t lock_word =
+ auto lock_word =
#endif
- my_atomic_add32_explicit(&lock->lock_word, -X_LOCK_HALF_DECR,
- MY_MEMORY_ORDER_RELAXED);
+ lock->lock_word.fetch_sub(X_LOCK_HALF_DECR,
+ std::memory_order_relaxed);
ut_ad((lock_word == 0)
|| ((lock_word <= -X_LOCK_DECR)
@@ -692,7 +681,7 @@ lock_loop:
HMT_low();
ulint j = i;
while (i < srv_n_spin_wait_rounds
- && my_atomic_load32_explicit(&lock->lock_word, MY_MEMORY_ORDER_RELAXED) <= X_LOCK_HALF_DECR) {
+ && lock->lock_word <= X_LOCK_HALF_DECR) {
ut_delay(srv_spin_wait_delay);
i++;
}
@@ -717,7 +706,7 @@ lock_loop:
/* Waiters must be set before checking lock_word, to ensure signal
is sent. This could lead to a few unnecessary wake-up signals. */
- my_atomic_fas32_explicit(&lock->waiters, 1, MY_MEMORY_ORDER_ACQUIRE);
+ lock->waiters.exchange(1, std::memory_order_acquire);
if (rw_lock_x_lock_low(lock, pass, file_name, line)) {
sync_array_free_cell(sync_arr, cell);
@@ -797,7 +786,7 @@ lock_loop:
/* Spin waiting for the lock_word to become free */
ulint j = i;
while (i < srv_n_spin_wait_rounds
- && my_atomic_load32_explicit(&lock->lock_word, MY_MEMORY_ORDER_RELAXED) <= X_LOCK_HALF_DECR) {
+ && lock->lock_word <= X_LOCK_HALF_DECR) {
ut_delay(srv_spin_wait_delay);
i++;
}
@@ -821,7 +810,7 @@ lock_loop:
/* Waiters must be set before checking lock_word, to ensure signal
is sent. This could lead to a few unnecessary wake-up signals. */
- my_atomic_fas32_explicit(&lock->waiters, 1, MY_MEMORY_ORDER_ACQUIRE);
+ lock->waiters.exchange(1, std::memory_order_acquire);
if (rw_lock_sx_lock_low(lock, pass, file_name, line)) {
@@ -859,15 +848,11 @@ rw_lock_validate(
/*=============*/
const rw_lock_t* lock) /*!< in: rw-lock */
{
- int32_t lock_word;
-
ut_ad(lock);
- lock_word = my_atomic_load32_explicit(const_cast<int32_t*>(&lock->lock_word),
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_word = lock->lock_word;
- ut_ad(my_atomic_load32_explicit(const_cast<int32_t*>(&lock->waiters),
- MY_MEMORY_ORDER_RELAXED) < 2);
+ ut_ad(lock->waiters < 2);
ut_ad(lock_word > -(2 * X_LOCK_DECR));
ut_ad(lock_word <= X_LOCK_DECR);
@@ -930,8 +915,7 @@ rw_lock_add_debug_info(
rw_lock_debug_mutex_exit();
if (pass == 0 && lock_type != RW_LOCK_X_WAIT) {
- int32_t lock_word = my_atomic_load32_explicit(&lock->lock_word,
- MY_MEMORY_ORDER_RELAXED);
+ int32_t lock_word = lock->lock_word;
/* Recursive x while holding SX
(lock_type == RW_LOCK_X && lock_word == -X_LOCK_HALF_DECR)
@@ -1117,11 +1101,11 @@ rw_lock_list_print_info(
count++;
- if (my_atomic_load32_explicit(const_cast<int32_t*>(&lock->lock_word), MY_MEMORY_ORDER_RELAXED) != X_LOCK_DECR) {
+ if (lock->lock_word != X_LOCK_DECR) {
fprintf(file, "RW-LOCK: %p ", (void*) lock);
- if (int32_t waiters= my_atomic_load32_explicit(const_cast<int32_t*>(&lock->waiters), MY_MEMORY_ORDER_RELAXED)) {
+ if (int32_t waiters= lock->waiters) {
fprintf(file, " (%d waiters)\n", waiters);
} else {
putc('\n', file);
@@ -1185,10 +1169,10 @@ rw_lock_debug_print(
fprintf(f, "\n");
}
-/** Print where it was locked from
+/** Print the rw-lock information.
@return the string representation */
std::string
-rw_lock_t::locked_from() const
+rw_lock_t::to_string() const
{
/* Note: For X locks it can be locked form multiple places because
the same thread can call X lock recursively. */
@@ -1198,6 +1182,11 @@ rw_lock_t::locked_from() const
ut_ad(rw_lock_validate(this));
+ msg << "RW-LATCH: "
+ << "thread id " << os_thread_pf(os_thread_get_curr_id())
+ << " addr: " << this
+ << " Locked from: ";
+
rw_lock_debug_mutex_enter();
for (rw_lock_debug_t* info = UT_LIST_GET_FIRST(debug_list);
@@ -1220,19 +1209,4 @@ rw_lock_t::locked_from() const
return(msg.str());
}
-
-/** Print the rw-lock information.
-@return the string representation */
-std::string
-rw_lock_t::to_string() const
-{
- std::ostringstream msg;
-
- msg << "RW-LATCH: "
- << "thread id " << os_thread_pf(os_thread_get_curr_id())
- << " addr: " << this
- << " Locked from: " << locked_from().c_str();
-
- return(msg.str());
-}
#endif /* UNIV_DEBUG */
diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc
index 2b68152d686..7ccde7373a7 100644
--- a/storage/innobase/sync/sync0sync.cc
+++ b/storage/innobase/sync/sync0sync.cc
@@ -35,12 +35,9 @@ Created 9/5/1995 Heikki Tuuri
#include "sync0sync.h"
#ifdef UNIV_PFS_MUTEX
-/* Key to register autoinc_mutex with performance schema */
-mysql_pfs_key_t autoinc_mutex_key;
mysql_pfs_key_t buffer_block_mutex_key;
mysql_pfs_key_t buf_pool_mutex_key;
mysql_pfs_key_t buf_pool_zip_mutex_key;
-mysql_pfs_key_t cache_last_read_mutex_key;
mysql_pfs_key_t dict_foreign_err_mutex_key;
mysql_pfs_key_t dict_sys_mutex_key;
mysql_pfs_key_t fil_system_mutex_key;
@@ -88,7 +85,6 @@ mysql_pfs_key_t event_mutex_key;
mysql_pfs_key_t event_manager_mutex_key;
mysql_pfs_key_t sync_array_mutex_key;
mysql_pfs_key_t thread_mutex_key;
-mysql_pfs_key_t zip_pad_mutex_key;
mysql_pfs_key_t row_drop_list_mutex_key;
mysql_pfs_key_t rw_trx_hash_element_mutex_key;
#endif /* UNIV_PFS_MUTEX */
diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc
index 951770e5bb7..c648acdf575 100644
--- a/storage/innobase/trx/trx0i_s.cc
+++ b/storage/innobase/trx/trx0i_s.cc
@@ -141,12 +141,9 @@ struct i_s_table_cache_t {
struct trx_i_s_cache_t {
rw_lock_t rw_lock; /*!< read-write lock protecting
the rest of this structure */
- ulonglong last_read; /*!< last time the cache was read;
+ Atomic_relaxed<ulonglong> last_read;
+ /*!< last time the cache was read;
measured in nanoseconds */
- ib_mutex_t last_read_mutex;/*!< mutex protecting the
- last_read member - it is updated
- inside a shared lock of the
- rw_lock member */
i_s_table_cache_t innodb_trx; /*!< innodb_trx table */
i_s_table_cache_t innodb_locks; /*!< innodb_locks table */
i_s_table_cache_t innodb_lock_waits;/*!< innodb_lock_waits table */
@@ -1191,8 +1188,7 @@ Checks if the cache can safely be updated.
@return whether the cache can be updated */
static bool can_cache_be_updated(trx_i_s_cache_t* cache)
{
- /* Here we read cache->last_read without acquiring its mutex
- because last_read is only updated when a shared rw lock on the
+ /* cache->last_read is only updated when a shared rw lock on the
whole cache is being held (see trx_i_s_cache_end_read()) and
we are currently holding an exclusive rw lock on the cache.
So it is not possible for last_read to be updated while we are
@@ -1235,7 +1231,7 @@ static void fetch_data_into_cache_low(trx_i_s_cache_t *cache, const trx_t *trx)
#ifdef UNIV_DEBUG
{
- const trx_state_t state= trx->state;
+ const auto state= trx->state;
if (trx->is_autocommit_non_locking())
{
@@ -1352,8 +1348,6 @@ trx_i_s_cache_init(
release lock mutex
release trx_i_s_cache_t::rw_lock
acquire trx_i_s_cache_t::rw_lock, S
- acquire trx_i_s_cache_t::last_read_mutex
- release trx_i_s_cache_t::last_read_mutex
release trx_i_s_cache_t::rw_lock */
rw_lock_create(trx_i_s_cache_lock_key, &cache->rw_lock,
@@ -1361,8 +1355,6 @@ trx_i_s_cache_init(
cache->last_read = 0;
- mutex_create(LATCH_ID_CACHE_LAST_READ, &cache->last_read_mutex);
-
table_cache_init(&cache->innodb_trx, sizeof(i_s_trx_row_t));
table_cache_init(&cache->innodb_locks, sizeof(i_s_locks_row_t));
table_cache_init(&cache->innodb_lock_waits,
@@ -1386,7 +1378,6 @@ trx_i_s_cache_free(
trx_i_s_cache_t* cache) /*!< in, own: cache to free */
{
rw_lock_free(&cache->rw_lock);
- mutex_free(&cache->last_read_mutex);
hash_table_free(cache->locks_hash);
ha_storage_free(cache->storage);
@@ -1412,14 +1403,7 @@ trx_i_s_cache_end_read(
/*===================*/
trx_i_s_cache_t* cache) /*!< in: cache */
{
- ut_ad(rw_lock_own(&cache->rw_lock, RW_LOCK_S));
-
- /* update cache last read time */
- const ulonglong now = my_interval_timer();
- mutex_enter(&cache->last_read_mutex);
- cache->last_read = now;
- mutex_exit(&cache->last_read_mutex);
-
+ cache->last_read = my_interval_timer();
rw_lock_s_unlock(&cache->rw_lock);
}
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index 208f400c8a3..3f2f3626bf2 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -166,8 +166,6 @@ void purge_sys_t::create()
ut_ad(event);
m_paused= 0;
query= purge_graph_build();
- n_submitted= 0;
- n_completed= 0;
next_stored= false;
rseg= NULL;
page_no= 0;
@@ -176,7 +174,8 @@ void purge_sys_t::create()
hdr_offset= 0;
rw_lock_create(trx_purge_latch_key, &latch, SYNC_PURGE_LATCH);
mutex_create(LATCH_ID_PURGE_SYS_PQ, &pq_mutex);
- undo_trunc.create();
+ truncate.current= NULL;
+ truncate.last= NULL;
}
/** Close the purge subsystem on shutdown. */
@@ -185,7 +184,8 @@ void purge_sys_t::close()
ut_ad(this == &purge_sys);
if (!event) return;
- m_enabled= false;
+ ut_ad(!enabled());
+ ut_ad(n_tasks.load(std::memory_order_relaxed) == 0);
trx_t* trx = query->trx;
que_graph_free(query);
ut_ad(!trx->id);
@@ -306,7 +306,7 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
rseg->needs_purge = true;
}
- trx_sys.history_insert();
+ trx_sys.rseg_history_len++;
if (undo->state == TRX_UNDO_CACHED) {
UT_LIST_ADD_FIRST(rseg->undo_cached, undo);
@@ -332,7 +332,7 @@ trx_purge_remove_log_hdr(
{
flst_remove(rseg_hdr + TRX_RSEG_HISTORY,
log_hdr + TRX_UNDO_HISTORY_NODE, mtr);
- trx_sys.history_remove();
+ trx_sys.rseg_history_len--;
}
/** Free an undo log segment, and remove the header from the history list.
@@ -502,308 +502,22 @@ func_exit:
goto loop;
}
-/** UNDO log truncate logger. Needed to track state of truncate during crash.
-An auxiliary redo log file undo_<space_id>_trunc.log will created while the
-truncate of the UNDO is in progress. This file is required during recovery
-to complete the truncate. */
-
-namespace undo {
- /** Magic Number to indicate truncate action is complete. */
- static const ib_uint32_t s_magic = 76845412;
-
- /** Populate log file name based on space_id
- @param[in] space_id id of the undo tablespace.
- @return DB_SUCCESS or error code */
- static dberr_t populate_log_file_name(
- ulint space_id,
- char*& log_file_name)
- {
- static const char s_log_prefix[] = "undo_";
- static const char s_log_ext[] = "trunc.log";
-
- ulint log_file_name_sz = strlen(srv_log_group_home_dir)
- + (22 - 1 /* NUL */
- + sizeof s_log_prefix + sizeof s_log_ext);
-
- log_file_name = new (std::nothrow) char[log_file_name_sz];
- if (log_file_name == 0) {
- return(DB_OUT_OF_MEMORY);
- }
-
- memset(log_file_name, 0, log_file_name_sz);
-
- strcpy(log_file_name, srv_log_group_home_dir);
- ulint log_file_name_len = strlen(log_file_name);
-
- if (log_file_name[log_file_name_len - 1]
- != OS_PATH_SEPARATOR) {
-
- log_file_name[log_file_name_len]
- = OS_PATH_SEPARATOR;
- log_file_name_len = strlen(log_file_name);
- }
-
- snprintf(log_file_name + log_file_name_len,
- log_file_name_sz - log_file_name_len,
- "%s" ULINTPF "_%s", s_log_prefix,
- space_id, s_log_ext);
-
- return(DB_SUCCESS);
- }
-
- /** Mark completion of undo truncate action by writing magic number to
- the log file and then removing it from the disk.
- If we are going to remove it from disk then why write magic number ?
- This is to safeguard from unlink (file-system) anomalies that will keep
- the link to the file even after unlink action is successfull and
- ref-count = 0.
- @param[in] space_id id of the undo tablespace to truncate.*/
- void done(
- ulint space_id)
- {
- dberr_t err;
- char* log_file_name;
-
- /* Step-1: Create the log file name using the pre-decided
- prefix/suffix and table id of undo tablepsace to truncate. */
- err = populate_log_file_name(space_id, log_file_name);
- if (err != DB_SUCCESS) {
- return;
- }
-
- /* Step-2: Open log file and write magic number to
- indicate done phase. */
- bool ret;
- os_file_t handle =
- os_file_create_simple_no_error_handling(
- innodb_log_file_key, log_file_name,
- OS_FILE_OPEN, OS_FILE_READ_WRITE,
- srv_read_only_mode, &ret);
-
- if (!ret) {
- os_file_delete(innodb_log_file_key, log_file_name);
- delete[] log_file_name;
- return;
- }
-
- ulint sz = srv_page_size;
- void* buf = ut_zalloc_nokey(sz + srv_page_size);
- if (buf == NULL) {
- os_file_close(handle);
- os_file_delete(innodb_log_file_key, log_file_name);
- delete[] log_file_name;
- return;
- }
-
- byte* log_buf = static_cast<byte*>(
- ut_align(buf, srv_page_size));
-
- mach_write_to_4(log_buf, undo::s_magic);
-
- IORequest request(IORequest::WRITE);
-
- err = os_file_write(
- request, log_file_name, handle, log_buf, 0, sz);
-
- ut_ad(err == DB_SUCCESS);
-
- os_file_flush(handle);
- os_file_close(handle);
-
- ut_free(buf);
- os_file_delete(innodb_log_file_key, log_file_name);
- delete[] log_file_name;
- }
-
- /** Check if TRUNCATE_DDL_LOG file exist.
- @param[in] space_id id of the undo tablespace.
- @return true if exist else false. */
- bool is_log_present(
- ulint space_id)
- {
- dberr_t err;
- char* log_file_name;
-
- /* Step-1: Populate log file name. */
- err = populate_log_file_name(space_id, log_file_name);
- if (err != DB_SUCCESS) {
- return(false);
- }
-
- /* Step-2: Check for existence of the file. */
- bool exist;
- os_file_type_t type;
- os_file_status(log_file_name, &exist, &type);
-
- /* Step-3: If file exists, check it for presence of magic
- number. If found, then delete the file and report file
- doesn't exist as presence of magic number suggest that
- truncate action was complete. */
-
- if (exist) {
- bool ret;
- os_file_t handle =
- os_file_create_simple_no_error_handling(
- innodb_log_file_key, log_file_name,
- OS_FILE_OPEN, OS_FILE_READ_WRITE,
- srv_read_only_mode, &ret);
- if (!ret) {
- os_file_delete(innodb_log_file_key,
- log_file_name);
- delete[] log_file_name;
- return(false);
- }
-
- ulint sz = srv_page_size;
- void* buf = ut_zalloc_nokey(sz + srv_page_size);
- if (buf == NULL) {
- os_file_close(handle);
- os_file_delete(innodb_log_file_key,
- log_file_name);
- delete[] log_file_name;
- return(false);
- }
-
- byte* log_buf = static_cast<byte*>(
- ut_align(buf, srv_page_size));
-
- IORequest request(IORequest::READ);
-
- dberr_t err;
-
- err = os_file_read(request, handle, log_buf, 0, sz);
-
- os_file_close(handle);
-
- if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
- ib::info()
- << "Unable to read '"
- << log_file_name << "' : "
- << err;
-
- os_file_delete(
- innodb_log_file_key, log_file_name);
-
- ut_free(buf);
-
- delete[] log_file_name;
-
- return(false);
- }
-
- ulint magic_no = mach_read_from_4(log_buf);
-
- ut_free(buf);
-
- if (magic_no == undo::s_magic) {
- /* Found magic number. */
- os_file_delete(innodb_log_file_key,
- log_file_name);
- delete[] log_file_name;
- return(false);
- }
- }
-
- delete[] log_file_name;
-
- return(exist);
- }
-};
-
-/** Iterate over all the UNDO tablespaces and check if any of the UNDO
-tablespace qualifies for TRUNCATE (size > threshold).
-@param[in,out] undo_trunc undo truncate tracker */
-static
-void
-trx_purge_mark_undo_for_truncate(
- undo::Truncate* undo_trunc)
-{
- /* Step-1: If UNDO Tablespace
- - already marked for truncate (OR)
- - truncate disabled
- return immediately else search for qualifying tablespace. */
- if (undo_trunc->is_marked() || !srv_undo_log_truncate) {
- return;
- }
-
- /* Step-2: Validation/Qualification checks
- a. At-least 2 UNDO tablespaces so even if one UNDO tablespace
- is being truncated server can continue to operate.
- b. At-least 2 persistent UNDO logs (besides the default rseg-0)
- b. At-least 1 UNDO tablespace size > threshold. */
- if (srv_undo_tablespaces_active < 2 || srv_undo_logs < 3) {
- return;
- }
-
- /* Avoid bias selection and so start the scan from immediate next
- of last selected UNDO tablespace for truncate. */
- ulint space_id = undo_trunc->get_scan_start();
-
- for (ulint i = 1; i <= srv_undo_tablespaces_active; i++) {
-
- if (fil_space_get_size(space_id)
- > (srv_max_undo_log_size >> srv_page_size_shift)) {
- /* Tablespace qualifies for truncate. */
- undo_trunc->mark(space_id);
- undo::Truncate::add_space_to_trunc_list(space_id);
- break;
- }
-
- space_id = ((space_id + 1) % (srv_undo_tablespaces_active + 1));
- if (space_id == 0) {
- /* Note: UNDO tablespace ids starts from 1. */
- ++space_id;
- }
- }
-
- /* Couldn't make any selection. */
- if (!undo_trunc->is_marked()) {
- return;
- }
-
- DBUG_LOG("undo",
- "marking for truncate UNDO tablespace "
- << undo_trunc->get_marked_space_id());
-
- /* Step-3: Iterate over all the rsegs of selected UNDO tablespace
- and mark them temporarily unavailable for allocation.*/
- for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
- if (trx_rseg_t* rseg = trx_sys.rseg_array[i]) {
- ut_ad(rseg->is_persistent());
- if (rseg->space->id
- == undo_trunc->get_marked_space_id()) {
-
- /* Once set this rseg will not be allocated
- to new booting transaction but we will wait
- for existing active transaction to finish. */
- rseg->skip_allocation = true;
- undo_trunc->add_rseg_to_trunc(rseg);
- }
- }
- }
-}
-
-undo::undo_spaces_t undo::Truncate::s_spaces_to_truncate;
-
/** Cleanse purge queue to remove the rseg that reside in undo-tablespace
marked for truncate.
-@param[in,out] undo_trunc undo truncate tracker */
-static
-void
-trx_purge_cleanse_purge_queue(
- undo::Truncate* undo_trunc)
+@param[in] space undo tablespace being truncated */
+static void trx_purge_cleanse_purge_queue(const fil_space_t& space)
{
- mutex_enter(&purge_sys.pq_mutex);
typedef std::vector<TrxUndoRsegs> purge_elem_list_t;
purge_elem_list_t purge_elem_list;
+ mutex_enter(&purge_sys.pq_mutex);
+
/* Remove rseg instances that are in the purge queue before we start
truncate of corresponding UNDO truncate. */
while (!purge_sys.purge_queue.empty()) {
purge_elem_list.push_back(purge_sys.purge_queue.top());
purge_sys.purge_queue.pop();
}
- ut_ad(purge_sys.purge_queue.empty());
for (purge_elem_list_t::iterator it = purge_elem_list.begin();
it != purge_elem_list.end();
@@ -812,9 +526,7 @@ trx_purge_cleanse_purge_queue(
for (TrxUndoRsegs::iterator it2 = it->begin();
it2 != it->end();
++it2) {
-
- if ((*it2)->space->id
- == undo_trunc->get_marked_space_id()) {
+ if ((*it2)->space == &space) {
it->erase(it2);
break;
}
@@ -824,260 +536,265 @@ trx_purge_cleanse_purge_queue(
purge_sys.purge_queue.push(*it);
}
}
+
mutex_exit(&purge_sys.pq_mutex);
}
-/** Iterate over selected UNDO tablespace and check if all the rsegs
-that resides in the tablespace are free.
-@param[in] limit truncate_limit
-@param[in,out] undo_trunc undo truncate tracker */
-static
-void
-trx_purge_initiate_truncate(
- const purge_sys_t::iterator& limit,
- undo::Truncate* undo_trunc)
+/**
+Removes unnecessary history data from rollback segments. NOTE that when this
+function is called, the caller must not have any latches on undo log pages!
+*/
+static void trx_purge_truncate_history()
{
- /* Step-1: Early check to findout if any of the the UNDO tablespace
- is marked for truncate. */
- if (!undo_trunc->is_marked()) {
- /* No tablespace marked for truncate yet. */
- return;
- }
-
- /* Step-2: Scan over each rseg and ensure that it doesn't hold any
- active undo records. */
- bool all_free = true;
-
- for (ulint i = 0; i < undo_trunc->rsegs_size() && all_free; ++i) {
-
- trx_rseg_t* rseg = undo_trunc->get_ith_rseg(i);
+ ut_ad(purge_sys.head <= purge_sys.tail);
+ purge_sys_t::iterator& head = purge_sys.head.trx_no
+ ? purge_sys.head : purge_sys.tail;
- mutex_enter(&rseg->mutex);
+ if (head.trx_no >= purge_sys.view.low_limit_no()) {
+ /* This is sometimes necessary. TODO: find out why. */
+ head.trx_no = purge_sys.view.low_limit_no();
+ head.undo_no = 0;
+ }
- if (rseg->trx_ref_count > 0) {
- /* This rseg is still being held by an active
- transaction. */
- all_free = false;
- mutex_exit(&rseg->mutex);
- continue;
+ for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
+ if (trx_rseg_t* rseg = trx_sys.rseg_array[i]) {
+ ut_ad(rseg->id == i);
+ trx_purge_truncate_rseg_history(*rseg, head);
}
+ }
- ut_ad(rseg->trx_ref_count == 0);
- ut_ad(rseg->skip_allocation);
-
- ulint size_of_rsegs = rseg->curr_size;
-
- if (size_of_rsegs == 1) {
- mutex_exit(&rseg->mutex);
- continue;
- } else {
-
- /* There could be cached undo segment. Check if records
- in these segments can be purged. Normal purge history
- will not touch these cached segment. */
- ulint cached_undo_size = 0;
+ if (srv_undo_tablespaces_active < 2) {
+ return;
+ }
- for (trx_undo_t* undo =
- UT_LIST_GET_FIRST(rseg->undo_cached);
- undo != NULL && all_free;
- undo = UT_LIST_GET_NEXT(undo_list, undo)) {
+ while (srv_undo_log_truncate && srv_undo_logs >= 3) {
+ if (!purge_sys.truncate.current) {
+ const ulint threshold = ulint(srv_max_undo_log_size
+ >> srv_page_size_shift);
+ for (ulint i = purge_sys.truncate.last
+ ? purge_sys.truncate.last->id
+ - srv_undo_space_id_start
+ : 0, j = i;; ) {
+ ulint space_id = srv_undo_space_id_start + i;
+ ut_ad(srv_is_undo_tablespace(space_id));
+
+ if (fil_space_get_size(space_id)
+ > threshold) {
+ purge_sys.truncate.current
+ = fil_space_get(space_id);
+ break;
+ }
- if (limit.trx_no < undo->trx_id) {
- all_free = false;
- } else {
- cached_undo_size += undo->size;
+ ++i;
+ i %= srv_undo_tablespaces_active;
+ if (i == j) {
+ break;
}
}
+ }
- ut_ad(size_of_rsegs >= (cached_undo_size + 1));
+ if (!purge_sys.truncate.current) {
+ return;
+ }
- if (size_of_rsegs > (cached_undo_size + 1)) {
- /* There are pages besides cached pages that
- still hold active data. */
- all_free = false;
+ fil_space_t& space = *purge_sys.truncate.current;
+ /* Undo tablespace always are a single file. */
+ ut_a(UT_LIST_GET_LEN(space.chain) == 1);
+ fil_node_t* file = UT_LIST_GET_FIRST(space.chain);
+ /* The undo tablespace files are never closed. */
+ ut_ad(file->is_open());
+
+ DBUG_LOG("undo", "marking for truncate: " << file->name);
+
+ for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
+ if (trx_rseg_t* rseg = trx_sys.rseg_array[i]) {
+ ut_ad(rseg->is_persistent());
+ if (rseg->space == &space) {
+ /* Once set, this rseg will
+ not be allocated to subsequent
+ transactions, but we will wait
+ for existing active
+ transactions to finish. */
+ rseg->skip_allocation = true;
+ }
}
}
- mutex_exit(&rseg->mutex);
- }
-
- if (!all_free) {
- /* rseg still holds active data.*/
- return;
- }
-
-
- /* Step-3: Start the actual truncate.
- a. Remove rseg instance if added to purge queue before we
- initiate truncate.
- b. Execute actual truncate */
-
- const ulint space_id = undo_trunc->get_marked_space_id();
-
- ib::info() << "Truncating UNDO tablespace " << space_id;
-
- trx_purge_cleanse_purge_queue(undo_trunc);
-
- ut_a(srv_is_undo_tablespace(space_id));
-
- fil_space_t* space = fil_space_get(space_id);
-
- if (!space) {
-not_found:
- ib::error() << "Failed to find UNDO tablespace " << space_id;
- return;
- }
-
- /* Flush all to-be-discarded pages of the tablespace.
-
- During truncation, we do not want any writes to the
- to-be-discarded area, because we must set the space->size
- early in order to have deterministic page allocation.
-
- If a log checkpoint was completed at LSN earlier than our
- mini-transaction commit and the server was killed, then
- discarding the to-be-trimmed pages without flushing would
- break crash recovery. So, we cannot avoid the write. */
- {
- FlushObserver observer(
- space,
- UT_LIST_GET_FIRST(purge_sys.query->thrs)->graph->trx,
- NULL);
- buf_LRU_flush_or_remove_pages(space_id, &observer);
- }
-
- log_free_check();
+ for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
+ trx_rseg_t* rseg = trx_sys.rseg_array[i];
+ if (!rseg || rseg->space != &space) {
+ continue;
+ }
+ mutex_enter(&rseg->mutex);
+ ut_ad(rseg->skip_allocation);
+ if (rseg->trx_ref_count) {
+not_free:
+ mutex_exit(&rseg->mutex);
+ return;
+ }
- /* Adjust the tablespace metadata. */
- space = fil_truncate_prepare(space_id);
+ if (rseg->curr_size != 1) {
+ /* Check if all segments are
+ cached and safe to remove. */
+ ulint cached = 0;
+
+ for (trx_undo_t* undo = UT_LIST_GET_FIRST(
+ rseg->undo_cached);
+ undo;
+ undo = UT_LIST_GET_NEXT(undo_list,
+ undo)) {
+ if (head.trx_no < undo->trx_id) {
+ goto not_free;
+ } else {
+ cached += undo->size;
+ }
+ }
- if (!space) {
- goto not_found;
- }
+ ut_ad(rseg->curr_size > cached);
- /* Undo tablespace always are a single file. */
- ut_a(UT_LIST_GET_LEN(space->chain) == 1);
- fil_node_t* file = UT_LIST_GET_FIRST(space->chain);
- /* The undo tablespace files are never closed. */
- ut_ad(file->is_open());
+ if (rseg->curr_size > cached + 1) {
+ goto not_free;
+ }
+ }
- /* Re-initialize tablespace, in a single mini-transaction. */
- mtr_t mtr;
- const ulint size = SRV_UNDO_TABLESPACE_SIZE_IN_PAGES;
- mtr.start();
- mtr_x_lock_space(space, &mtr);
- fil_truncate_log(space, size, &mtr);
- fsp_header_init(space, size, &mtr);
- mutex_enter(&fil_system.mutex);
- space->size = file->size = size;
- mutex_exit(&fil_system.mutex);
-
- buf_block_t* sys_header = trx_sysf_get(&mtr);
-
- for (ulint i = 0; i < undo_trunc->rsegs_size(); ++i) {
- trx_rseg_t* rseg = undo_trunc->get_ith_rseg(i);
- buf_block_t* rblock = trx_rseg_header_create(
- space, rseg->id, trx_sys.get_max_trx_id(),
- sys_header, &mtr);
- ut_ad(rblock);
- rseg->page_no = rblock ? rblock->page.id.page_no() : FIL_NULL;
-
- /* Before re-initialization ensure that we free the existing
- structure. There can't be any active transactions. */
- ut_a(UT_LIST_GET_LEN(rseg->undo_list) == 0);
-
- trx_undo_t* next_undo;
-
- for (trx_undo_t* undo = UT_LIST_GET_FIRST(rseg->undo_cached);
- undo != NULL;
- undo = next_undo) {
-
- next_undo = UT_LIST_GET_NEXT(undo_list, undo);
- UT_LIST_REMOVE(rseg->undo_cached, undo);
- MONITOR_DEC(MONITOR_NUM_UNDO_SLOT_CACHED);
- ut_free(undo);
+ mutex_exit(&rseg->mutex);
}
- UT_LIST_INIT(rseg->undo_list, &trx_undo_t::undo_list);
- UT_LIST_INIT(rseg->undo_cached, &trx_undo_t::undo_list);
-
- /* These were written by trx_rseg_header_create(). */
- ut_ad(!mach_read_from_4(TRX_RSEG + TRX_RSEG_FORMAT
- + rblock->frame));
- ut_ad(!mach_read_from_4(TRX_RSEG + TRX_RSEG_HISTORY_SIZE
- + rblock->frame));
-
- /* Initialize the undo log lists according to the rseg header */
- rseg->curr_size = 1;
- rseg->trx_ref_count = 0;
- rseg->last_page_no = FIL_NULL;
- rseg->last_commit_and_offset = 0;
- rseg->needs_purge = false;
- }
-
- mtr.commit_shrink(*space);
-
- /* No mutex; this is only updated by the purge coordinator. */
- export_vars.innodb_undo_truncations++;
+ ib::info() << "Truncating " << file->name;
+ trx_purge_cleanse_purge_queue(space);
+
+ /* Flush all to-be-discarded pages of the tablespace.
+
+ During truncation, we do not want any writes to the
+ to-be-discarded area, because we must set the space.size
+ early in order to have deterministic page allocation.
+
+ If a log checkpoint was completed at LSN earlier than our
+ mini-transaction commit and the server was killed, then
+ discarding the to-be-trimmed pages without flushing would
+ break crash recovery. So, we cannot avoid the write. */
+ {
+ FlushObserver observer(
+ purge_sys.truncate.current,
+ UT_LIST_GET_FIRST(purge_sys.query->thrs)
+ ->graph->trx,
+ NULL);
+ buf_LRU_flush_or_remove_pages(space.id, &observer);
+ }
- if (purge_sys.rseg && purge_sys.rseg->last_page_no == FIL_NULL) {
- /* If purge_sys.rseg is pointing to rseg that was recently
- truncated then move to next rseg element.
- Note: Ideally purge_sys.rseg should be NULL because purge
- should complete processing of all the records but there is
- purge_batch_size that can force the purge loop to exit before
- all the records are purged and in this case purge_sys.rseg
- could point to a valid rseg waiting for next purge cycle. */
- purge_sys.next_stored = false;
- purge_sys.rseg = NULL;
- }
+ log_free_check();
- DBUG_EXECUTE_IF("ib_undo_trunc",
- ib::info() << "ib_undo_trunc";
- log_write_up_to(LSN_MAX, true);
- DBUG_SUICIDE(););
+ /* Adjust the tablespace metadata. */
+ if (!fil_truncate_prepare(space.id)) {
+ ib::error() << "Failed to find UNDO tablespace "
+ << file->name;
+ return;
+ }
- /* Completed truncate. Now it is safe to re-use the tablespace. */
- for (ulint i = 0; i < undo_trunc->rsegs_size(); ++i) {
- trx_rseg_t* rseg = undo_trunc->get_ith_rseg(i);
- rseg->skip_allocation = false;
- }
+ /* Re-initialize tablespace, in a single mini-transaction. */
+ mtr_t mtr;
+ const ulint size = SRV_UNDO_TABLESPACE_SIZE_IN_PAGES;
+ mtr.start();
+ mtr_x_lock_space(purge_sys.truncate.current, &mtr);
+ fil_truncate_log(purge_sys.truncate.current, size, &mtr);
+ fsp_header_init(purge_sys.truncate.current, size, &mtr);
+ mutex_enter(&fil_system.mutex);
+ purge_sys.truncate.current->size = file->size = size;
+ mutex_exit(&fil_system.mutex);
+
+ buf_block_t* sys_header = trx_sysf_get(&mtr);
+
+ for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
+ trx_rseg_t* rseg = trx_sys.rseg_array[i];
+ if (!rseg || rseg->space != &space) {
+ continue;
+ }
- ib::info() << "Truncated UNDO tablespace " << space_id;
+ ut_ad(rseg->is_persistent());
+ ut_d(const ulint old_page = rseg->page_no);
+
+ buf_block_t* rblock = trx_rseg_header_create(
+ purge_sys.truncate.current,
+ rseg->id, trx_sys.get_max_trx_id(),
+ sys_header, &mtr);
+ ut_ad(rblock);
+ rseg->page_no = rblock
+ ? rblock->page.id.page_no() : FIL_NULL;
+ ut_ad(old_page == rseg->page_no);
+
+ /* Before re-initialization ensure that we
+ free the existing structure. There can't be
+ any active transactions. */
+ ut_a(UT_LIST_GET_LEN(rseg->undo_list) == 0);
+
+ trx_undo_t* next_undo;
+
+ for (trx_undo_t* undo = UT_LIST_GET_FIRST(
+ rseg->undo_cached);
+ undo; undo = next_undo) {
+
+ next_undo = UT_LIST_GET_NEXT(undo_list, undo);
+ UT_LIST_REMOVE(rseg->undo_cached, undo);
+ MONITOR_DEC(MONITOR_NUM_UNDO_SLOT_CACHED);
+ ut_free(undo);
+ }
- undo_trunc->reset();
- undo::Truncate::clear_trunc_list();
-}
+ UT_LIST_INIT(rseg->undo_list,
+ &trx_undo_t::undo_list);
+ UT_LIST_INIT(rseg->undo_cached,
+ &trx_undo_t::undo_list);
+
+ /* These were written by trx_rseg_header_create(). */
+ ut_ad(!mach_read_from_4(TRX_RSEG + TRX_RSEG_FORMAT
+ + rblock->frame));
+ ut_ad(!mach_read_from_4(TRX_RSEG + TRX_RSEG_HISTORY_SIZE
+ + rblock->frame));
+
+ /* Initialize the undo log lists according to
+ the rseg header */
+ rseg->curr_size = 1;
+ rseg->trx_ref_count = 0;
+ rseg->last_page_no = FIL_NULL;
+ rseg->last_commit_and_offset = 0;
+ rseg->needs_purge = false;
+ }
-/**
-Removes unnecessary history data from rollback segments. NOTE that when this
-function is called, the caller must not have any latches on undo log pages!
-*/
-static void trx_purge_truncate_history()
-{
- ut_ad(purge_sys.head <= purge_sys.tail);
- purge_sys_t::iterator& head = purge_sys.head.trx_no
- ? purge_sys.head : purge_sys.tail;
+ mtr.commit_shrink(space);
+ /* No mutex; this is only updated by the purge coordinator. */
+ export_vars.innodb_undo_truncations++;
+
+ if (purge_sys.rseg
+ && purge_sys.rseg->last_page_no == FIL_NULL) {
+ /* If purge_sys.rseg is pointing to rseg that
+ was recently truncated then move to next rseg
+ element. Note: Ideally purge_sys.rseg should
+ be NULL because purge should complete
+ processing of all the records but there is
+ purge_batch_size that can force the purge loop
+ to exit before all the records are purged and
+ in this case purge_sys.rseg could point to a
+ valid rseg waiting for next purge cycle. */
+ purge_sys.next_stored = false;
+ purge_sys.rseg = NULL;
+ }
- if (head.trx_no >= purge_sys.view.low_limit_no()) {
- /* This is sometimes necessary. TODO: find out why. */
- head.trx_no = purge_sys.view.low_limit_no();
- head.undo_no = 0;
- }
+ DBUG_EXECUTE_IF("ib_undo_trunc",
+ ib::info() << "ib_undo_trunc";
+ log_write_up_to(LSN_MAX, true);
+ DBUG_SUICIDE(););
- for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
- if (trx_rseg_t* rseg = trx_sys.rseg_array[i]) {
- ut_ad(rseg->id == i);
- trx_purge_truncate_rseg_history(*rseg, head);
+ for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
+ if (trx_rseg_t* rseg = trx_sys.rseg_array[i]) {
+ ut_ad(rseg->is_persistent());
+ if (rseg->space == &space) {
+ rseg->skip_allocation = false;
+ }
+ }
}
- }
- /* UNDO tablespace truncate. We will try to truncate as much as we
- can (greedy approach). This will ensure when the server is idle we
- try and truncate all the UNDO tablespaces. */
- for (ulint i = srv_undo_tablespaces_active; i--; ) {
- trx_purge_mark_undo_for_truncate(&purge_sys.undo_trunc);
- trx_purge_initiate_truncate(head, &purge_sys.undo_trunc);
+ ib::info() << "Truncated " << file->name;
+ purge_sys.truncate.last = purge_sys.truncate.current;
+ purge_sys.truncate.current = NULL;
}
}
@@ -1488,7 +1205,7 @@ trx_purge_dml_delay(void)
if (srv_max_purge_lag > 0) {
float ratio;
- ratio = float(trx_sys.history_size()) / srv_max_purge_lag;
+ ratio = float(trx_sys.rseg_history_len) / srv_max_purge_lag;
if (ratio > 1.0) {
/* If the history list length exceeds the
@@ -1514,8 +1231,7 @@ void
trx_purge_wait_for_workers_to_complete()
{
/* Ensure that the work queue empties out. */
- while (my_atomic_loadlint(&purge_sys.n_completed)
- != purge_sys.n_submitted) {
+ while (purge_sys.n_tasks.load(std::memory_order_acquire)) {
if (srv_get_task_queue_length() > 0) {
srv_release_threads(SRV_WORKER, 1);
@@ -1551,9 +1267,8 @@ trx_purge(
srv_dml_needed_delay = trx_purge_dml_delay();
- /* The number of tasks submitted should be completed. */
- ut_a(purge_sys.n_submitted
- == my_atomic_loadlint(&purge_sys.n_completed));
+ /* All submitted tasks should be completed. */
+ ut_ad(purge_sys.n_tasks.load(std::memory_order_relaxed) == 0);
rw_lock_x_lock(&purge_sys.latch);
trx_sys.clone_oldest_view();
@@ -1567,7 +1282,7 @@ trx_purge(
/* Fetch the UNDO recs that need to be purged. */
n_pages_handled = trx_purge_attach_undo_recs(n_purge_threads);
- purge_sys.n_submitted += n_purge_threads;
+ purge_sys.n_tasks.store(n_purge_threads - 1, std::memory_order_relaxed);
/* Submit tasks to workers queue if using multi-threaded purge. */
for (ulint i = n_purge_threads; --i; ) {
@@ -1581,14 +1296,9 @@ trx_purge(
ut_d(thr->thread_slot = slot);
que_run_threads(thr);
- my_atomic_addlint(&purge_sys.n_completed, 1);
-
- if (n_purge_threads > 1) {
- trx_purge_wait_for_workers_to_complete();
- }
+ trx_purge_wait_for_workers_to_complete();
- ut_a(purge_sys.n_submitted
- == my_atomic_loadlint(&purge_sys.n_completed));
+ ut_ad(purge_sys.n_tasks.load(std::memory_order_relaxed) == 0);
if (truncate) {
trx_purge_truncate_history();
@@ -1605,7 +1315,7 @@ void purge_sys_t::stop()
{
rw_lock_x_lock(&latch);
- if (!enabled_latched())
+ if (!enabled())
{
/* Shutdown must have been initiated during FLUSH TABLES FOR EXPORT. */
ut_ad(!srv_undo_sources);
@@ -1615,7 +1325,7 @@ void purge_sys_t::stop()
ut_ad(srv_n_purge_threads > 0);
- if (0 == my_atomic_add32_explicit(&m_paused, 1, MY_MEMORY_ORDER_RELAXED))
+ if (m_paused++ == 0)
{
/* We need to wakeup the purge thread in case it is suspended, so
that it can acknowledge the state change. */
@@ -1649,8 +1359,7 @@ void purge_sys_t::resume()
return;
}
- int32_t paused= my_atomic_add32_explicit(&m_paused, -1,
- MY_MEMORY_ORDER_RELAXED);
+ int32_t paused= m_paused--;
ut_a(paused);
if (paused == 1)
diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc
index d7ec2a38f19..4ef7a043104 100644
--- a/storage/innobase/trx/trx0rec.cc
+++ b/storage/innobase/trx/trx0rec.cc
@@ -39,9 +39,11 @@ Created 3/26/1996 Heikki Tuuri
#include "row0row.h"
#include "row0mysql.h"
-/** The search tuple corresponding to TRX_UNDO_INSERT_METADATA */
+/** The search tuple corresponding to TRX_UNDO_INSERT_METADATA. */
const dtuple_t trx_undo_metadata = {
- REC_INFO_METADATA, 0, 0,
+ /* This also works for REC_INFO_METADATA_ALTER, because the
+ delete-mark (REC_INFO_DELETED_FLAG) is ignored when searching. */
+ REC_INFO_METADATA_ADD, 0, 0,
NULL, 0, NULL
#ifdef UNIV_DEBUG
, DATA_TUPLE_MAGIC_N
@@ -141,8 +143,8 @@ trx_undo_parse_add_undo_rec(
}
/** Calculate the free space left for extending an undo log record.
-@param block undo log page
-@param ptr current end of the undo page
+@param undo_block undo log page
+@param ptr current end of the undo page
@return bytes left */
static ulint trx_undo_left(const buf_block_t *undo_block, const byte *ptr)
{
@@ -176,9 +178,6 @@ trx_undo_page_set_next_prev_and_add(
that points to the next free
offset value within undo_page.*/
- ut_ad(ptr > undo_block->frame);
- ut_ad(ptr < undo_block->frame + srv_page_size);
-
if (UNIV_UNLIKELY(trx_undo_left(undo_block, ptr) < 2)) {
return(0);
}
@@ -231,21 +230,35 @@ trx_undo_log_v_idx(
{
ut_ad(pos < table->n_v_def);
dict_v_col_t* vcol = dict_table_get_nth_v_col(table, pos);
-
- ulint n_idx = vcol->v_indexes->size();
byte* old_ptr;
- ut_ad(n_idx > 0);
+ ut_ad(!vcol->v_indexes.empty());
- /* Size to reserve, max 5 bytes for each index id and position, plus
- 5 bytes for num of indexes, 2 bytes for write total length.
- 1 byte for undo log record format version marker */
- ulint size = n_idx * (5 + 5) + 5 + 2 + (first_v_col ? 1 : 0);
+ ulint size = first_v_col ? 1 + 2 : 2;
+ const ulint avail = trx_undo_left(undo_block, ptr);
- if (trx_undo_left(undo_block, ptr) < size) {
+ /* The mach_write_compressed(ptr, flen) in
+ trx_undo_page_report_modify() will consume additional 1 to 5 bytes. */
+ if (avail < size + 5) {
return(NULL);
}
+ ulint n_idx = 0;
+ for (const auto& v_index : vcol->v_indexes) {
+ n_idx++;
+ /* FIXME: index->id is 64 bits! */
+ size += mach_get_compressed_size(uint32_t(v_index.index->id));
+ size += mach_get_compressed_size(v_index.nth_field);
+ }
+
+ size += mach_get_compressed_size(n_idx);
+
+ if (avail < size + 5) {
+ return(NULL);
+ }
+
+ ut_d(const byte* orig_ptr = ptr);
+
if (first_v_col) {
/* write the version marker */
mach_write_to_1(ptr, VIRTUAL_COL_UNDO_FORMAT_1);
@@ -259,18 +272,16 @@ trx_undo_log_v_idx(
ptr += mach_write_compressed(ptr, n_idx);
- dict_v_idx_list::iterator it;
-
- for (it = vcol->v_indexes->begin();
- it != vcol->v_indexes->end(); ++it) {
- dict_v_idx_t v_index = *it;
-
+ for (const auto& v_index : vcol->v_indexes) {
ptr += mach_write_compressed(
- ptr, static_cast<ulint>(v_index.index->id));
+ /* FIXME: index->id is 64 bits! */
+ ptr, uint32_t(v_index.index->id));
ptr += mach_write_compressed(ptr, v_index.nth_field);
}
+ ut_ad(orig_ptr + size == ptr);
+
mach_write_to_2(old_ptr, ulint(ptr - old_ptr));
return(ptr);
@@ -488,8 +499,6 @@ trx_undo_page_report_insert(
+ undo_block->frame);
ptr = undo_block->frame + first_free;
- ut_ad(first_free <= srv_page_size);
-
if (trx_undo_left(undo_block, ptr) < 2 + 1 + 11 + 11) {
/* Not enough space for writing the general parameters */
return(0);
@@ -506,7 +515,7 @@ trx_undo_page_report_insert(
/* Store then the fields required to uniquely determine the record
to be inserted in the clustered index */
if (UNIV_UNLIKELY(clust_entry->info_bits != 0)) {
- ut_ad(clust_entry->info_bits == REC_INFO_METADATA);
+ ut_ad(clust_entry->is_metadata());
ut_ad(index->is_instant());
ut_ad(undo_block->frame[first_free + 2]
== TRX_UNDO_INSERT_REC);
@@ -719,7 +728,7 @@ trx_undo_rec_skip_row_ref(
log of an update or delete marking of a clustered index record.
@param[out] ext_buf buffer to hold the prefix data and BLOB pointer
@param[in] prefix_len prefix size to store in the undo log
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] field an externally stored column
@param[in,out] len input: length of field; output: used length of
ext_buf
@@ -729,13 +738,13 @@ byte*
trx_undo_page_fetch_ext(
byte* ext_buf,
ulint prefix_len,
- const page_size_t& page_size,
+ ulint zip_size,
const byte* field,
ulint* len)
{
/* Fetch the BLOB. */
ulint ext_len = btr_copy_externally_stored_field_prefix(
- ext_buf, prefix_len, page_size, field, *len);
+ ext_buf, prefix_len, zip_size, field, *len);
/* BLOBs should always be nonempty. */
ut_a(ext_len);
/* Append the BLOB pointer to the prefix. */
@@ -753,7 +762,7 @@ available
size, or NULL when should not fetch a longer
prefix
@param[in] prefix_len prefix size to store in the undo log
-@param[in] page_size page size
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in,out] field the locally stored part of the externally
stored column
@param[in,out] len length of field, in bytes
@@ -766,7 +775,7 @@ trx_undo_page_report_modify_ext(
byte* ptr,
byte* ext_buf,
ulint prefix_len,
- const page_size_t& page_size,
+ ulint zip_size,
const byte** field,
ulint* len,
spatial_status_t spatial_status)
@@ -808,7 +817,7 @@ trx_undo_page_report_modify_ext(
ptr += mach_write_compressed(ptr, *len);
*field = trx_undo_page_fetch_ext(ext_buf, prefix_len,
- page_size, *field, len);
+ zip_size, *field, len);
ptr += mach_write_compressed(ptr, *len + spatial_len);
} else {
@@ -821,7 +830,7 @@ trx_undo_page_report_modify_ext(
/** Get MBR from a Geometry column stored externally
@param[out] mbr MBR to fill
-@param[in] pagesize table pagesize
+@param[in] zip_size ROW_FORMAT=COMPRESSED page size, or 0
@param[in] field field contain the geometry data
@param[in,out] len length of field, in bytes
*/
@@ -829,17 +838,17 @@ static
void
trx_undo_get_mbr_from_ext(
/*======================*/
- double* mbr,
- const page_size_t& page_size,
- const byte* field,
- ulint* len)
+ double* mbr,
+ ulint zip_size,
+ const byte* field,
+ ulint* len)
{
uchar* dptr = NULL;
ulint dlen;
mem_heap_t* heap = mem_heap_create(100);
dptr = btr_copy_externally_stored_field(
- &dlen, field, page_size, *len, heap);
+ &dlen, field, zip_size, *len, heap);
if (dlen <= GEO_DATA_HEADER_SIZE) {
for (uint i = 0; i < SPDIMS; ++i) {
@@ -896,8 +905,6 @@ trx_undo_page_report_modify(
+ undo_block->frame);
ptr = undo_block->frame + first_free;
- ut_ad(first_free <= srv_page_size);
-
if (trx_undo_left(undo_block, ptr) < 50) {
/* NOTE: the value 50 must be big enough so that the general
fields written below fit on the undo log page */
@@ -923,9 +930,9 @@ trx_undo_page_report_modify(
/* Store first some general parameters to the undo log */
if (!update) {
- ut_ad(!rec_get_deleted_flag(rec, dict_table_is_comp(table)));
+ ut_ad(!rec_is_delete_marked(rec, dict_table_is_comp(table)));
type_cmpl = TRX_UNDO_DEL_MARK_REC;
- } else if (rec_get_deleted_flag(rec, dict_table_is_comp(table))) {
+ } else if (rec_is_delete_marked(rec, dict_table_is_comp(table))) {
/* In delete-marked records, DB_TRX_ID must
always refer to an existing update_undo log record. */
ut_ad(row_get_rec_trx_id(rec, index, offsets));
@@ -954,9 +961,7 @@ trx_undo_page_report_modify(
*ptr++ = (byte) rec_get_info_bits(rec, dict_table_is_comp(table));
/* Store the values of the system columns */
- field = rec_get_nth_field(rec, offsets,
- dict_index_get_sys_col_pos(
- index, DATA_TRX_ID), &flen);
+ field = rec_get_nth_field(rec, offsets, index->db_trx_id(), &flen);
ut_ad(flen == DATA_TRX_ID_LEN);
trx_id = trx_read_trx_id(field);
@@ -970,9 +975,7 @@ trx_undo_page_report_modify(
}
ptr += mach_u64_write_compressed(ptr, trx_id);
- field = rec_get_nth_field(rec, offsets,
- dict_index_get_sys_col_pos(
- index, DATA_ROLL_PTR), &flen);
+ field = rec_get_nth_field(rec, offsets, index->db_roll_ptr(), &flen);
ut_ad(flen == DATA_ROLL_PTR_LEN);
ut_ad(memcmp(field, field_ref_zero, DATA_ROLL_PTR_LEN));
@@ -1033,45 +1036,60 @@ trx_undo_page_report_modify(
on them */
if (upd_fld_is_virtual_col(fld)
&& dict_table_get_nth_v_col(
- table, pos)->v_indexes->empty()) {
+ table, pos)->v_indexes.empty()) {
n_updated--;
}
}
}
+ i = 0;
+
+ if (UNIV_UNLIKELY(update->is_alter_metadata())) {
+ ut_ad(update->n_fields >= 1);
+ ut_ad(!upd_fld_is_virtual_col(&update->fields[0]));
+ ut_ad(update->fields[0].field_no
+ == index->first_user_field());
+ ut_ad(!dfield_is_ext(&update->fields[0].new_val));
+ ut_ad(!dfield_is_null(&update->fields[0].new_val));
+ /* The instant ADD COLUMN metadata record does not
+ contain the BLOB. Do not write anything for it. */
+ i = !rec_is_alter_metadata(rec, *index);
+ n_updated -= i;
+ }
+
ptr += mach_write_compressed(ptr, n_updated);
- for (i = 0; i < upd_get_n_fields(update); i++) {
+ for (; i < upd_get_n_fields(update); i++) {
+ if (trx_undo_left(undo_block, ptr) < 5) {
+ return 0;
+ }
+
upd_field_t* fld = upd_get_nth_field(update, i);
bool is_virtual = upd_fld_is_virtual_col(fld);
ulint max_v_log_len = 0;
- ulint pos = fld->field_no;
-
- /* Write field number to undo log */
- if (trx_undo_left(undo_block, ptr) < 5) {
- return(0);
- }
+ ulint pos = fld->field_no;
+ const dict_col_t* col = NULL;
if (is_virtual) {
/* Skip the non-indexed column, during
an online alter table */
if (dict_index_is_online_ddl(index)
&& dict_table_get_nth_v_col(
- table, pos)->v_indexes->empty()) {
+ table, pos)->v_indexes.empty()) {
continue;
}
/* add REC_MAX_N_FIELDS to mark this
is a virtual col */
- pos += REC_MAX_N_FIELDS;
- }
+ ptr += mach_write_compressed(
+ ptr, pos + REC_MAX_N_FIELDS);
- ptr += mach_write_compressed(ptr, pos);
+ if (trx_undo_left(undo_block, ptr) < 15) {
+ return 0;
+ }
- /* Save the old value of field */
- if (is_virtual) {
ut_ad(fld->field_no < table->n_v_def);
ptr = trx_undo_log_v_idx(undo_block, table,
@@ -1096,36 +1114,87 @@ trx_undo_page_report_modify(
flen = ut_min(
flen, max_v_log_len);
}
+
+ goto store_len;
+ }
+
+ if (UNIV_UNLIKELY(update->is_metadata())) {
+ ut_ad(pos >= index->first_user_field());
+ ut_ad(rec_is_metadata(rec, *index));
+
+ if (rec_is_alter_metadata(rec, *index)) {
+ ut_ad(update->is_alter_metadata());
+
+ field = rec_offs_n_fields(offsets)
+ > pos
+ && !rec_offs_nth_default(
+ offsets, pos)
+ ? rec_get_nth_field(
+ rec, offsets,
+ pos, &flen)
+ : index->instant_field_value(
+ pos - 1, &flen);
+
+ if (pos == index->first_user_field()) {
+ ut_ad(rec_offs_nth_extern(
+ offsets, pos));
+ ut_ad(flen == FIELD_REF_SIZE);
+ goto write_field;
+ }
+ col = dict_index_get_nth_col(index,
+ pos - 1);
+ } else if (!update->is_alter_metadata()) {
+ goto get_field;
+ } else {
+ /* We are converting an ADD COLUMN
+ metadata record to an ALTER TABLE
+ metadata record, with BLOB. Subtract
+ the missing metadata BLOB field. */
+ ut_ad(pos > index->first_user_field());
+ --pos;
+ goto get_field;
+ }
} else {
+get_field:
+ col = dict_index_get_nth_col(index, pos);
field = rec_get_nth_cfield(
rec, index, offsets, pos, &flen);
}
+write_field:
+ /* Write field number to undo log */
+ ptr += mach_write_compressed(ptr, pos);
if (trx_undo_left(undo_block, ptr) < 15) {
- return(0);
+ return 0;
}
- if (!is_virtual && rec_offs_nth_extern(offsets, pos)) {
- const dict_col_t* col
- = dict_index_get_nth_col(index, pos);
- ulint prefix_len
- = dict_max_field_len_store_undo(
- table, col);
+ if (rec_offs_n_fields(offsets) > pos
+ && rec_offs_nth_extern(offsets, pos)) {
+ ut_ad(col || pos == index->first_user_field());
+ ut_ad(col || update->is_alter_metadata());
+ ut_ad(col
+ || rec_is_alter_metadata(rec, *index));
+ ulint prefix_len = col
+ ? dict_max_field_len_store_undo(
+ table, col)
+ : 0;
ut_ad(prefix_len + BTR_EXTERN_FIELD_REF_SIZE
<= sizeof ext_buf);
ptr = trx_undo_page_report_modify_ext(
ptr,
- col->ord_part
+ col
+ && col->ord_part
&& !ignore_prefix
&& flen < REC_ANTELOPE_MAX_INDEX_COL_LEN
? ext_buf : NULL, prefix_len,
- dict_table_page_size(table),
+ table->space->zip_size(),
&field, &flen, SPATIAL_UNKNOWN);
*type_cmpl_ptr |= TRX_UNDO_UPD_EXTERN;
} else {
+store_len:
ptr += mach_write_compressed(ptr, flen);
}
@@ -1274,6 +1343,8 @@ trx_undo_page_report_modify(
table, col);
ut_a(prefix_len < sizeof ext_buf);
+ const ulint zip_size
+ = table->space->zip_size();
/* If there is a spatial index on it,
log its MBR */
@@ -1282,9 +1353,7 @@ trx_undo_page_report_modify(
col->mtype));
trx_undo_get_mbr_from_ext(
- mbr,
- dict_table_page_size(
- table),
+ mbr, zip_size,
field, &flen);
}
@@ -1293,7 +1362,7 @@ trx_undo_page_report_modify(
flen < REC_ANTELOPE_MAX_INDEX_COL_LEN
&& !ignore_prefix
? ext_buf : NULL, prefix_len,
- dict_table_page_size(table),
+ zip_size,
&field, &flen,
spatial_status);
} else {
@@ -1490,7 +1559,6 @@ trx_undo_update_rec_get_update(
upd_t* update;
ulint n_fields;
byte* buf;
- ulint i;
bool first_v_col = true;
bool is_undo_log = true;
ulint n_skip_field = 0;
@@ -1503,7 +1571,7 @@ trx_undo_update_rec_get_update(
n_fields = 0;
}
- update = upd_create(n_fields + 2, heap);
+ *upd = update = upd_create(n_fields + 2, heap);
update->info_bits = info_bits;
@@ -1515,9 +1583,7 @@ trx_undo_update_rec_get_update(
mach_write_to_6(buf, trx_id);
- upd_field_set_field_no(upd_field,
- dict_index_get_sys_col_pos(index, DATA_TRX_ID),
- index);
+ upd_field_set_field_no(upd_field, index->db_trx_id(), index);
dfield_set_data(&(upd_field->new_val), buf, DATA_TRX_ID_LEN);
upd_field = upd_get_nth_field(update, n_fields + 1);
@@ -1526,25 +1592,20 @@ trx_undo_update_rec_get_update(
trx_write_roll_ptr(buf, roll_ptr);
- upd_field_set_field_no(
- upd_field, dict_index_get_sys_col_pos(index, DATA_ROLL_PTR),
- index);
+ upd_field_set_field_no(upd_field, index->db_roll_ptr(), index);
dfield_set_data(&(upd_field->new_val), buf, DATA_ROLL_PTR_LEN);
/* Store then the updated ordinary columns to the update vector */
- for (i = 0; i < n_fields; i++) {
-
+ for (ulint i = 0; i < n_fields; i++) {
const byte* field;
ulint len;
- ulint field_no;
ulint orig_len;
- bool is_virtual;
upd_field = upd_get_nth_field(update, i);
- field_no = mach_read_next_compressed(&ptr);
+ ulint field_no = mach_read_next_compressed(&ptr);
- is_virtual = (field_no >= REC_MAX_N_FIELDS);
+ const bool is_virtual = (field_no >= REC_MAX_N_FIELDS);
if (is_virtual) {
/* If new version, we need to check index list to figure
@@ -1567,15 +1628,63 @@ trx_undo_update_rec_get_update(
}
upd_field_set_v_field_no(upd_field, field_no, index);
+ } else if (UNIV_UNLIKELY((update->info_bits
+ & ~REC_INFO_DELETED_FLAG)
+ == REC_INFO_MIN_REC_FLAG)) {
+ ut_ad(type == TRX_UNDO_UPD_EXIST_REC);
+ const ulint uf = index->first_user_field();
+ ut_ad(field_no >= uf);
+
+ if (update->info_bits != REC_INFO_MIN_REC_FLAG) {
+ /* Generic instant ALTER TABLE */
+ if (field_no == uf) {
+ upd_field->new_val.type
+ .metadata_blob_init();
+ } else if (field_no >= index->n_fields) {
+ /* This is reachable during
+ purge if the table was emptied
+ and converted to the canonical
+ format on a later ALTER TABLE.
+ In this case,
+ row_purge_upd_exist_or_extern()
+ would only be interested in
+ freeing any BLOBs that were
+ updated, that is, the metadata
+ BLOB above. Other BLOBs in
+ the metadata record are never
+ updated; they are for the
+ initial DEFAULT values of the
+ instantly added columns, and
+ they will never change.
+
+ Note: if the table becomes
+ empty during ROLLBACK or is
+ empty during subsequent ALTER
+ TABLE, and btr_page_empty() is
+ called to re-create the root
+ page without the metadata
+ record, in that case we should
+ only free the latest version
+ of BLOBs in the record,
+ which purge would never touch. */
+ field_no = REC_MAX_N_FIELDS;
+ n_skip_field++;
+ } else {
+ dict_col_copy_type(
+ dict_index_get_nth_col(
+ index, field_no - 1),
+ &upd_field->new_val.type);
+ }
+ } else {
+ /* Instant ADD COLUMN...LAST */
+ dict_col_copy_type(
+ dict_index_get_nth_col(index,
+ field_no),
+ &upd_field->new_val.type);
+ }
+ upd_field->field_no = field_no;
} else if (field_no < index->n_fields) {
upd_field_set_field_no(upd_field, field_no, index);
- } else if (update->info_bits == REC_INFO_MIN_REC_FLAG
- && index->is_instant()) {
- /* This must be a rollback of a subsequent
- instant ADD COLUMN operation. This will be
- detected and handled by btr_cur_trim(). */
- upd_field->field_no = field_no;
- upd_field->orig_len = 0;
} else {
ib::error() << "Trying to access update undo rec"
" field " << field_no
@@ -1608,6 +1717,12 @@ trx_undo_update_rec_get_update(
dfield_set_ext(&upd_field->new_val);
}
+ ut_ad(update->info_bits != (REC_INFO_DELETED_FLAG
+ | REC_INFO_MIN_REC_FLAG)
+ || field_no != index->first_user_field()
+ || (upd_field->new_val.ext
+ && upd_field->new_val.len == FIELD_REF_SIZE));
+
if (is_virtual) {
upd_field->old_v_val = static_cast<dfield_t*>(
mem_heap_alloc(
@@ -1625,31 +1740,23 @@ trx_undo_update_rec_get_update(
}
}
- /* In rare scenario, we could have skipped virtual column (as they
- are dropped. We will regenerate a update vector and skip them */
- if (n_skip_field > 0) {
- ulint n = 0;
- ut_ad(n_skip_field <= n_fields);
+ /* We may have to skip dropped indexed virtual columns.
+ Also, we may have to trim the update vector of a metadata record
+ if dict_index_t::clear_instant_alter() was invoked on the table
+ later, and the number of fields no longer matches. */
- upd_t* new_update = upd_create(
- n_fields + 2 - n_skip_field, heap);
+ if (n_skip_field) {
+ upd_field_t* d = upd_get_nth_field(update, 0);
+ const upd_field_t* const end = d + n_fields + 2;
- for (i = 0; i < n_fields + 2; i++) {
- upd_field = upd_get_nth_field(update, i);
-
- if (upd_field->field_no == REC_MAX_N_FIELDS) {
- continue;
+ for (const upd_field_t* s = d; s != end; s++) {
+ if (s->field_no != REC_MAX_N_FIELDS) {
+ *d++ = *s;
}
-
- upd_field_t* new_upd_field
- = upd_get_nth_field(new_update, n);
- *new_upd_field = *upd_field;
- n++;
}
- ut_ad(n == n_fields + 2 - n_skip_field);
- *upd = new_update;
- } else {
- *upd = update;
+
+ ut_ad(d + n_skip_field == end);
+ update->n_fields = d - upd_get_nth_field(update, 0);
}
return(const_cast<byte*>(ptr));
@@ -1704,8 +1811,11 @@ trx_undo_rec_get_partial_row(
if (uf->old_v_val) {
continue;
}
- ulint c = dict_index_get_nth_col(index, uf->field_no)->ind;
- *dtuple_get_nth_field(*row, c) = uf->new_val;
+ const dict_col_t& c = *dict_index_get_nth_col(index,
+ uf->field_no);
+ if (!c.is_dropped()) {
+ *dtuple_get_nth_field(*row, c.ind) = uf->new_val;
+ }
}
end_ptr = ptr + mach_read_from_2(ptr);
@@ -1716,7 +1826,6 @@ trx_undo_rec_get_partial_row(
const byte* field;
ulint field_no;
const dict_col_t* col;
- ulint col_no;
ulint len;
ulint orig_len;
bool is_virtual;
@@ -1744,15 +1853,18 @@ trx_undo_rec_get_partial_row(
dict_v_col_t* vcol = dict_table_get_nth_v_col(
index->table, field_no);
col = &vcol->m_col;
- col_no = dict_col_get_no(col);
dfield = dtuple_get_nth_v_field(*row, vcol->v_pos);
dict_col_copy_type(
&vcol->m_col,
dfield_get_type(dfield));
} else {
col = dict_index_get_nth_col(index, field_no);
- col_no = dict_col_get_no(col);
- dfield = dtuple_get_nth_field(*row, col_no);
+
+ if (col->is_dropped()) {
+ continue;
+ }
+
+ dfield = dtuple_get_nth_field(*row, col->ind);
ut_ad(dfield->type.mtype == DATA_MISSING
|| dict_col_type_assert_equal(col,
&dfield->type));
@@ -1760,9 +1872,7 @@ trx_undo_rec_get_partial_row(
|| dfield->len == len
|| (len != UNIV_SQL_NULL
&& len >= UNIV_EXTERN_STORAGE_FIELD));
- dict_col_copy_type(
- dict_table_get_nth_col(index->table, col_no),
- dfield_get_type(dfield));
+ dict_col_copy_type(col, dfield_get_type(dfield));
}
dfield_set_data(dfield, field, len);
@@ -2384,7 +2494,8 @@ trx_undo_prev_version_build(
}
/* Get number of externally stored columns in updated record */
- const ulint n_ext = dtuple_get_n_ext(entry);
+ const ulint n_ext = index->is_primary()
+ ? dtuple_get_n_ext(entry) : 0;
buf = static_cast<byte*>(mem_heap_alloc(
heap, rec_get_converted_size(index, entry, n_ext)));
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc
index 4792d03db4b..841827b0709 100644
--- a/storage/innobase/trx/trx0roll.cc
+++ b/storage/innobase/trx/trx0roll.cc
@@ -44,10 +44,6 @@ Created 3/26/1996 Heikki Tuuri
#include "trx0trx.h"
#include "trx0undo.h"
-/** This many pages must be undone before a truncate is tried within
-rollback */
-static const ulint TRX_ROLL_TRUNC_THRESHOLD = 1;
-
/** true if trx_rollback_all_recovered() thread is active */
bool trx_rollback_is_active;
@@ -63,7 +59,7 @@ static bool trx_rollback_finish(trx_t* trx)
trx->mod_tables.clear();
bool finished = trx->error_state == DB_SUCCESS;
if (UNIV_LIKELY(finished)) {
- trx_commit(trx);
+ trx->commit();
} else {
ut_a(trx->error_state == DB_INTERRUPTED);
ut_ad(srv_shutdown_state != SRV_SHUTDOWN_NONE);
@@ -82,7 +78,7 @@ static bool trx_rollback_finish(trx_t* trx)
ut_free(undo);
undo = NULL;
}
- trx_commit_low(trx, NULL);
+ trx->commit_low();
}
trx->lock.que_state = TRX_QUE_RUNNING;
@@ -181,6 +177,11 @@ trx_rollback_to_savepoint(
partial rollback requested, or NULL for
complete rollback */
{
+#ifdef WITH_WSREP
+ if (!savept && trx->is_wsrep() && wsrep_thd_is_SR(trx->mysql_thd)) {
+ wsrep_handle_SR_rollback(NULL, trx->mysql_thd);
+ }
+#endif /* WITH_WSREP */
ut_ad(!trx_mutex_own(trx));
trx_start_if_not_started_xa(trx, true);
@@ -228,7 +229,8 @@ dberr_t trx_rollback_for_mysql(trx_t* trx)
trx->will_lock = false;
ut_ad(trx->mysql_thd);
#ifdef WITH_WSREP
- trx->wsrep = false;
+ trx->wsrep= false;
+ trx->lock.was_chosen_as_wsrep_victim= false;
#endif
return(DB_SUCCESS);
@@ -446,11 +448,8 @@ trx_rollback_to_savepoint_for_mysql_low(
trx_mark_sql_stat_end(trx);
trx->op_info = "";
-
#ifdef WITH_WSREP
- if (trx->is_wsrep()) {
- trx->lock.was_chosen_as_deadlock_victim = false;
- }
+ trx->lock.was_chosen_as_wsrep_victim = false;
#endif
return(err);
}
@@ -711,9 +710,9 @@ static my_bool trx_roll_count_callback(rw_trx_hash_element_t *element,
void trx_roll_report_progress()
{
time_t now = time(NULL);
- mutex_enter(&recv_sys->mutex);
- bool report = recv_sys->report(now);
- mutex_exit(&recv_sys->mutex);
+ mutex_enter(&recv_sys.mutex);
+ bool report = recv_sys.report(now);
+ mutex_exit(&recv_sys.mutex);
if (report) {
trx_roll_count_callback_arg arg;
@@ -874,153 +873,6 @@ DECLARE_THREAD(trx_rollback_all_recovered)(void*)
OS_THREAD_DUMMY_RETURN;
}
-/** Try to truncate the undo logs.
-@param[in,out] trx transaction */
-static
-void
-trx_roll_try_truncate(trx_t* trx)
-{
- trx->pages_undone = 0;
-
- undo_no_t undo_no = trx->undo_no;
-
- if (trx_undo_t* undo = trx->rsegs.m_redo.undo) {
- ut_ad(undo->rseg == trx->rsegs.m_redo.rseg);
- mutex_enter(&undo->rseg->mutex);
- trx_undo_truncate_end(undo, undo_no, false);
- mutex_exit(&undo->rseg->mutex);
- }
-
- if (trx_undo_t* undo = trx->rsegs.m_noredo.undo) {
- ut_ad(undo->rseg == trx->rsegs.m_noredo.rseg);
- mutex_enter(&undo->rseg->mutex);
- trx_undo_truncate_end(undo, undo_no, true);
- mutex_exit(&undo->rseg->mutex);
- }
-}
-
-/***********************************************************************//**
-Pops the topmost undo log record in a single undo log and updates the info
-about the topmost record in the undo log memory struct.
-@return undo log record, the page s-latched */
-static
-trx_undo_rec_t*
-trx_roll_pop_top_rec(
-/*=================*/
- trx_t* trx, /*!< in: transaction */
- trx_undo_t* undo, /*!< in: undo log */
- mtr_t* mtr) /*!< in: mtr */
-{
- page_t* undo_page = trx_undo_page_get_s_latched(
- page_id_t(undo->rseg->space->id, undo->top_page_no), mtr);
-
- ulint offset = undo->top_offset;
-
- trx_undo_rec_t* prev_rec = trx_undo_get_prev_rec(
- undo_page + offset, undo->hdr_page_no, undo->hdr_offset,
- true, mtr);
-
- if (prev_rec == NULL) {
- undo->top_undo_no = IB_ID_MAX;
- ut_ad(undo->empty());
- } else {
- page_t* prev_rec_page = page_align(prev_rec);
-
- if (prev_rec_page != undo_page) {
-
- trx->pages_undone++;
- }
-
- undo->top_page_no = page_get_page_no(prev_rec_page);
- undo->top_offset = ulint(prev_rec - prev_rec_page);
- undo->top_undo_no = trx_undo_rec_get_undo_no(prev_rec);
- ut_ad(!undo->empty());
- }
-
- return(undo_page + offset);
-}
-
-/** Get the last undo log record of a transaction (for rollback).
-@param[in,out] trx transaction
-@param[out] roll_ptr DB_ROLL_PTR to the undo record
-@param[in,out] heap memory heap for allocation
-@return undo log record copied to heap
-@retval NULL if none left or the roll_limit (savepoint) was reached */
-trx_undo_rec_t*
-trx_roll_pop_top_rec_of_trx(trx_t* trx, roll_ptr_t* roll_ptr, mem_heap_t* heap)
-{
- if (trx->pages_undone >= TRX_ROLL_TRUNC_THRESHOLD) {
- trx_roll_try_truncate(trx);
- }
-
- trx_undo_t* undo = NULL;
- trx_undo_t* update = trx->rsegs.m_redo.undo;
- trx_undo_t* temp = trx->rsegs.m_noredo.undo;
- const undo_no_t limit = trx->roll_limit;
-
- ut_ad(!update || !temp || update->empty() || temp->empty()
- || update->top_undo_no != temp->top_undo_no);
-
- if (update && !update->empty() && update->top_undo_no >= limit) {
- if (!undo) {
- undo = update;
- } else if (undo->top_undo_no < update->top_undo_no) {
- undo = update;
- }
- }
-
- if (temp && !temp->empty() && temp->top_undo_no >= limit) {
- if (!undo) {
- undo = temp;
- } else if (undo->top_undo_no < temp->top_undo_no) {
- undo = temp;
- }
- }
-
- if (undo == NULL) {
- trx_roll_try_truncate(trx);
- /* Mark any ROLLBACK TO SAVEPOINT completed, so that
- if the transaction object is committed and reused
- later, we will default to a full ROLLBACK. */
- trx->roll_limit = 0;
- trx->in_rollback = false;
- return(NULL);
- }
-
- ut_ad(!undo->empty());
- ut_ad(limit <= undo->top_undo_no);
-
- *roll_ptr = trx_undo_build_roll_ptr(
- false, undo->rseg->id, undo->top_page_no, undo->top_offset);
-
- mtr_t mtr;
- mtr.start();
-
- trx_undo_rec_t* undo_rec = trx_roll_pop_top_rec(trx, undo, &mtr);
- const undo_no_t undo_no = trx_undo_rec_get_undo_no(undo_rec);
- switch (trx_undo_rec_get_type(undo_rec)) {
- case TRX_UNDO_INSERT_METADATA:
- /* This record type was introduced in MDEV-11369
- instant ADD COLUMN, which was implemented after
- MDEV-12288 removed the insert_undo log. There is no
- instant ADD COLUMN for temporary tables. Therefore,
- this record can only be present in the main undo log. */
- /* fall through */
- case TRX_UNDO_RENAME_TABLE:
- ut_ad(undo == update);
- /* fall through */
- case TRX_UNDO_INSERT_REC:
- *roll_ptr |= 1ULL << ROLL_PTR_INSERT_FLAG_POS;
- }
-
- trx->undo_no = undo_no;
-
- trx_undo_rec_t* undo_rec_copy = trx_undo_rec_copy(undo_rec, heap);
- mtr.commit();
-
- return(undo_rec_copy);
-}
-
/****************************************************************//**
Builds an undo 'query' graph for a transaction. The actual rollback is
performed by executing this query graph like a query subprocedure call.
diff --git a/storage/innobase/trx/trx0rseg.cc b/storage/innobase/trx/trx0rseg.cc
index 0ae11390f0b..49b93541620 100644
--- a/storage/innobase/trx/trx0rseg.cc
+++ b/storage/innobase/trx/trx0rseg.cc
@@ -53,6 +53,10 @@ trx_rseg_write_wsrep_checkpoint(
const XID* xid,
mtr_t* mtr)
{
+ DBUG_ASSERT(xid->gtrid_length >= 0);
+ DBUG_ASSERT(xid->bqual_length >= 0);
+ DBUG_ASSERT(xid->gtrid_length + xid->bqual_length < XIDDATASIZE);
+
mlog_write_ulint(TRX_RSEG_WSREP_XID_FORMAT + rseg_header,
uint32_t(xid->formatID),
MLOG_4BYTES, mtr);
@@ -65,9 +69,15 @@ trx_rseg_write_wsrep_checkpoint(
uint32_t(xid->bqual_length),
MLOG_4BYTES, mtr);
+ const ulint xid_length = static_cast<ulint>(xid->gtrid_length
+ + xid->bqual_length);
mlog_write_string(TRX_RSEG_WSREP_XID_DATA + rseg_header,
reinterpret_cast<const byte*>(xid->data),
- XIDDATASIZE, mtr);
+ xid_length, mtr);
+ if (UNIV_LIKELY(xid_length < XIDDATASIZE)) {
+ mlog_memset(TRX_RSEG_WSREP_XID_DATA + rseg_header + xid_length,
+ XIDDATASIZE - xid_length, 0, mtr);
+ }
}
/** Update the WSREP XID information in rollback segment header.
@@ -106,8 +116,9 @@ trx_rseg_clear_wsrep_checkpoint(
trx_rsegf_t* rseg_header,
mtr_t* mtr)
{
- mlog_write_ulint(TRX_RSEG_WSREP_XID_FORMAT + rseg_header,
- 0, MLOG_4BYTES, mtr);
+ mlog_memset(rseg_header + TRX_RSEG_WSREP_XID_INFO,
+ TRX_RSEG_WSREP_XID_DATA + XIDDATASIZE
+ - TRX_RSEG_WSREP_XID_INFO, 0, mtr);
}
static void
@@ -275,12 +286,10 @@ void trx_rseg_format_upgrade(trx_rsegf_t* rseg_header, mtr_t* mtr)
mlog_write_ulint(rseg_format, 0, MLOG_4BYTES, mtr);
/* Clear also possible garbage at the end of the page. Old
InnoDB versions did not initialize unused parts of pages. */
- byte* b = rseg_header + TRX_RSEG_MAX_TRX_ID + 8;
- ulint len = srv_page_size
- - (FIL_PAGE_DATA_END
- + TRX_RSEG + TRX_RSEG_MAX_TRX_ID + 8);
- memset(b, 0, len);
- mlog_log_string(b, len, mtr);
+ mlog_memset(TRX_RSEG_MAX_TRX_ID + 8 + rseg_header,
+ srv_page_size
+ - (FIL_PAGE_DATA_END
+ + TRX_RSEG + TRX_RSEG_MAX_TRX_ID + 8), 0, mtr);
}
/** Create a rollback segment header.
@@ -314,28 +323,24 @@ trx_rseg_header_create(
buf_block_dbg_add_level(block, SYNC_RSEG_HEADER_NEW);
- mlog_write_ulint(TRX_RSEG + TRX_RSEG_FORMAT + block->frame, 0,
- MLOG_4BYTES, mtr);
+ ut_ad(0 == mach_read_from_4(TRX_RSEG_FORMAT + TRX_RSEG
+ + block->frame));
+ ut_ad(0 == mach_read_from_4(TRX_RSEG_HISTORY_SIZE + TRX_RSEG
+ + block->frame));
+ ut_ad(0 == mach_read_from_4(TRX_RSEG_MAX_TRX_ID + TRX_RSEG
+ + block->frame));
/* Initialize the history list */
-
- mlog_write_ulint(TRX_RSEG + TRX_RSEG_HISTORY_SIZE + block->frame, 0,
- MLOG_4BYTES, mtr);
-
if (max_trx_id) {
mlog_write_ull(TRX_RSEG + TRX_RSEG_MAX_TRX_ID + block->frame,
max_trx_id, mtr);
}
- flst_init(TRX_RSEG + TRX_RSEG_HISTORY + block->frame, mtr);
- trx_rsegf_t* rsegf = TRX_RSEG + block->frame;
+ flst_init(block, TRX_RSEG_HISTORY + TRX_RSEG, mtr);
/* Reset the undo log slots */
- for (ulint i = 0; i < TRX_RSEG_N_SLOTS; i++) {
- /* This is generating a lot of redo log. MariaDB 10.4
- introduced MLOG_MEMSET to reduce the redo log volume. */
- trx_rsegf_set_nth_undo(rsegf, i, FIL_NULL, mtr);
- }
+ mlog_memset(block, TRX_RSEG_UNDO_SLOTS + TRX_RSEG,
+ TRX_RSEG_N_SLOTS * 4, 0xff, mtr);
if (sys_header) {
/* Add the rollback segment info to the free slot in
@@ -449,8 +454,7 @@ static dberr_t trx_rseg_mem_restore(trx_rseg_t *rseg, trx_id_t &max_trx_id,
/* This is based on trx_rsegf_get_new().
We need to access buf_block_t. */
buf_block_t *block = buf_page_get(
- page_id_t(rseg->space->id, rseg->page_no),
- univ_page_size, RW_S_LATCH, mtr);
+ page_id_t(rseg->space->id, rseg->page_no), 0, RW_S_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_RSEG_HEADER_NEW);
const trx_rsegf_t* rseg_header = TRX_RSEG + block->frame;
@@ -502,8 +506,8 @@ static dberr_t trx_rseg_mem_restore(trx_rseg_t *rseg, trx_id_t &max_trx_id,
return err;
}
- if (ulint len = flst_get_len(rseg_header + TRX_RSEG_HISTORY)) {
- trx_sys.history_add(int32(len));
+ if (auto len = flst_get_len(rseg_header + TRX_RSEG_HISTORY)) {
+ trx_sys.rseg_history_len += len;
fil_addr_t node_addr = trx_purge_get_log_from_hist(
flst_get_last(rseg_header + TRX_RSEG_HISTORY, mtr));
@@ -659,10 +663,8 @@ dberr_t trx_rseg_array_init()
/* Finally, clear WSREP XID in TRX_SYS page. */
const buf_block_t* sys = trx_sysf_get(&mtr);
- mlog_write_ulint(TRX_SYS + TRX_SYS_WSREP_XID_INFO +
- + TRX_SYS_WSREP_XID_MAGIC_N_FLD + sys->frame,
- 0, MLOG_4BYTES, &mtr);
-
+ mlog_memset(TRX_SYS + TRX_SYS_WSREP_XID_INFO + sys->frame,
+ TRX_SYS_WSREP_XID_LEN, 0, &mtr);
mtr.commit();
}
#endif
diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc
index 0b1f72412f6..22ed8d0c1cb 100644
--- a/storage/innobase/trx/trx0sys.cc
+++ b/storage/innobase/trx/trx0sys.cc
@@ -189,10 +189,9 @@ trx_sysf_create(
ut_a(ptr <= page + (srv_page_size - FIL_PAGE_DATA_END));
/* Initialize all of the page. This part used to be uninitialized. */
- memset(ptr, 0, srv_page_size - FIL_PAGE_DATA_END + size_t(page - ptr));
-
- mlog_log_string(TRX_SYS + page, srv_page_size - FIL_PAGE_DATA_END
- - TRX_SYS, mtr);
+ mlog_memset(block, ptr - page,
+ srv_page_size - FIL_PAGE_DATA_END + size_t(page - ptr),
+ 0, mtr);
/* Create the first rollback segment in the SYSTEM tablespace */
slot_no = trx_sys_rseg_find_free(block);
@@ -212,7 +211,7 @@ trx_sys_t::create()
m_initialised = true;
mutex_create(LATCH_ID_TRX_SYS, &mutex);
UT_LIST_INIT(trx_list, &trx_t::trx_list);
- my_atomic_store32(&rseg_history_len, 0);
+ rseg_history_len= 0;
rw_trx_hash.init();
}
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index b2cfbd9b4e3..038cf9be825 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -205,6 +205,9 @@ struct TrxFactory {
lock_trx_lock_list_init(&trx->lock.trx_locks);
+ UT_LIST_INIT(trx->lock.evicted_tables,
+ &dict_table_t::table_LRU);
+
UT_LIST_INIT(
trx->trx_savepoints,
&trx_named_savept_t::trx_savepoints);
@@ -238,6 +241,7 @@ struct TrxFactory {
}
ut_a(UT_LIST_GET_LEN(trx->lock.trx_locks) == 0);
+ ut_ad(UT_LIST_GET_LEN(trx->lock.evicted_tables) == 0);
UT_DELETE(trx->xid);
ut_free(trx->detailed_error);
@@ -352,7 +356,6 @@ trx_t *trx_create()
/* We just got trx from pool, it should be non locking */
ut_ad(!trx->will_lock);
- ut_ad(trx->state == TRX_STATE_NOT_STARTED);
ut_ad(!trx->rw_trx_hash_pins);
DBUG_LOG("trx", "Create: " << trx);
@@ -367,9 +370,10 @@ trx_t *trx_create()
ut_ad(trx->lock.n_rec_locks == 0);
ut_ad(trx->lock.table_cached == 0);
ut_ad(trx->lock.rec_cached == 0);
+ ut_ad(UT_LIST_GET_LEN(trx->lock.evicted_tables) == 0);
#ifdef WITH_WSREP
- trx->wsrep_event = NULL;
+ trx->wsrep_event= NULL;
ut_ad(!trx->wsrep_UK_scan);
#endif /* WITH_WSREP */
@@ -633,10 +637,10 @@ trx_resurrect_table_locks(
if (dict_table_t* table = dict_table_open_on_id(
*i, FALSE, DICT_TABLE_OP_LOAD_TABLESPACE)) {
if (!table->is_readable()) {
- mutex_enter(&dict_sys->mutex);
+ mutex_enter(&dict_sys.mutex);
dict_table_close(table, TRUE, FALSE);
- dict_table_remove_from_cache(table);
- mutex_exit(&dict_sys->mutex);
+ dict_sys.remove(table);
+ mutex_exit(&dict_sys.mutex);
continue;
}
@@ -826,14 +830,9 @@ static trx_rseg_t* trx_assign_rseg_low()
/* Choose a rollback segment evenly distributed between 0 and
innodb_undo_logs-1 in a round-robin fashion, skipping those
- undo tablespaces that are scheduled for truncation.
-
- Because rseg_slot is not protected by atomics or any mutex, race
- conditions are possible, meaning that multiple transactions
- that start modifications concurrently will write their undo
- log to the same rollback segment. */
- static ulong rseg_slot;
- ulint slot = rseg_slot++ % srv_undo_logs;
+ undo tablespaces that are scheduled for truncation. */
+ static Atomic_counter<unsigned> rseg_slot;
+ ulong slot = ulong{rseg_slot++} % srv_undo_logs;
trx_rseg_t* rseg;
#ifdef UNIV_DEBUG
@@ -924,11 +923,8 @@ trx_rseg_t *trx_t::assign_temp_rseg()
compile_time_assert(ut_is_2pow(TRX_SYS_N_RSEGS));
/* Choose a temporary rollback segment between 0 and 127
- in a round-robin fashion. Because rseg_slot is not protected by
- atomics or any mutex, race conditions are possible, meaning that
- multiple transactions that start modifications concurrently
- will write their undo log to the same rollback segment. */
- static ulong rseg_slot;
+ in a round-robin fashion. */
+ static Atomic_counter<unsigned> rseg_slot;
trx_rseg_t* rseg = trx_sys.temp_rsegs[
rseg_slot++ & (TRX_SYS_N_RSEGS - 1)];
ut_ad(!rseg->is_persistent());
@@ -1270,281 +1266,280 @@ trx_update_mod_tables_timestamp(
trx->mod_tables.clear();
}
-/****************************************************************//**
-Commits a transaction in memory. */
-static
-void
-trx_commit_in_memory(
-/*=================*/
- trx_t* trx, /*!< in/out: transaction */
- const mtr_t* mtr) /*!< in: mini-transaction of
- trx_write_serialisation_history(), or NULL if
- the transaction did not modify anything */
+/** Evict a table definition due to the rollback of ALTER TABLE.
+@param[in] table_id table identifier */
+void trx_t::evict_table(table_id_t table_id)
{
- trx->must_flush_log_later = false;
- trx->read_view.close();
-
- if (trx->is_autocommit_non_locking()) {
- ut_ad(trx->id == 0);
- ut_ad(trx->read_only);
- ut_ad(!trx->will_lock);
- ut_a(!trx->is_recovered);
- ut_ad(trx->rsegs.m_redo.rseg == NULL);
- ut_ad(trx->mysql_thd);
- ut_ad(trx->state == TRX_STATE_ACTIVE);
-
- /* Note: We are asserting without holding the lock mutex. But
- that is OK because this transaction is not waiting and cannot
- be rolled back and no new locks can (or should) be added
- because it is flagged as a non-locking read-only transaction. */
-
- ut_a(UT_LIST_GET_LEN(trx->lock.trx_locks) == 0);
-
- /* This state change is not protected by any mutex, therefore
- there is an inherent race here around state transition during
- printouts. We ignore this race for the sake of efficiency.
- However, the trx_sys_t::mutex will protect the trx_t instance
- and it cannot be removed from the trx_list and freed
- without first acquiring the trx_sys_t::mutex. */
-
- MONITOR_INC(MONITOR_TRX_NL_RO_COMMIT);
-
- DBUG_LOG("trx", "Autocommit in memory: " << trx);
- trx->state = TRX_STATE_NOT_STARTED;
- } else {
-#ifdef UNIV_DEBUG
- if (!UT_LIST_GET_LEN(trx->lock.trx_locks)) {
- for (lock_list::iterator it
- = trx->lock.table_locks.begin();
- it != trx->lock.table_locks.end();
- it++) {
- ut_ad(!*it);
- }
- }
-#endif /* UNIV_DEBUG */
- trx->commit_state();
+ ut_ad(in_rollback);
- if (trx->id) {
- trx_sys.deregister_rw(trx);
-
- /* Wait for any implicit-to-explicit lock
- conversions to cease, so that there will be no
- race condition in lock_release(). */
- while (UNIV_UNLIKELY(trx->is_referenced())) {
- ut_delay(srv_spin_wait_delay);
- }
- } else {
- ut_ad(trx->read_only || !trx->rsegs.m_redo.rseg);
- }
+ dict_table_t* table = dict_table_open_on_id(
+ table_id, true, DICT_TABLE_OP_OPEN_ONLY_IF_CACHED);
+ if (!table) {
+ return;
+ }
- if (trx->read_only || !trx->rsegs.m_redo.rseg) {
- MONITOR_INC(MONITOR_TRX_RO_COMMIT);
- } else {
- trx_update_mod_tables_timestamp(trx);
- MONITOR_INC(MONITOR_TRX_RW_COMMIT);
- trx->is_recovered = false;
- }
+ if (!table->release()) {
+ /* This must be a DDL operation that is being rolled
+ back in an active connection. */
+ ut_a(table->get_ref_count() == 1);
+ ut_ad(!is_recovered);
+ ut_ad(mysql_thd);
+ return;
+ }
- trx->release_locks();
- trx->id = 0;
- DEBUG_SYNC_C("after_trx_committed_in_memory");
+ /* This table should only be locked by this transaction, if at all. */
+ ut_ad(UT_LIST_GET_LEN(table->locks) <= 1);
+ const bool locked = UT_LIST_GET_LEN(table->locks);
+ ut_ad(!locked || UT_LIST_GET_FIRST(table->locks)->trx == this);
+ dict_sys.remove(table, true, locked);
+ if (locked) {
+ UT_LIST_ADD_FIRST(lock.evicted_tables, table);
}
+}
- ut_ad(!trx->rsegs.m_redo.undo);
+/** Mark a transaction committed in the main memory data structures. */
+inline void trx_t::commit_in_memory(const mtr_t *mtr)
+{
+ must_flush_log_later= false;
+ read_view.close();
- if (mtr != NULL) {
- if (trx_undo_t*& undo = trx->rsegs.m_noredo.undo) {
- ut_ad(undo->rseg == trx->rsegs.m_noredo.rseg);
- trx_undo_commit_cleanup(undo);
- undo = NULL;
- }
+ if (is_autocommit_non_locking())
+ {
+ ut_ad(id == 0);
+ ut_ad(read_only);
+ ut_ad(!will_lock);
+ ut_a(!is_recovered);
+ ut_ad(!rsegs.m_redo.rseg);
+ ut_ad(mysql_thd);
+ ut_ad(state == TRX_STATE_ACTIVE);
+
+ /* Note: We are asserting without holding the lock mutex. But
+ that is OK because this transaction is not waiting and cannot
+ be rolled back and no new locks can (or should) be added
+ because it is flagged as a non-locking read-only transaction. */
+ ut_a(UT_LIST_GET_LEN(lock.trx_locks) == 0);
+
+ /* This state change is not protected by any mutex, therefore
+ there is an inherent race here around state transition during
+ printouts. We ignore this race for the sake of efficiency.
+ However, the trx_sys_t::mutex will protect the trx_t instance
+ and it cannot be removed from the trx_list and freed
+ without first acquiring the trx_sys_t::mutex. */
+ state= TRX_STATE_NOT_STARTED;
+
+ MONITOR_INC(MONITOR_TRX_NL_RO_COMMIT);
+
+ DBUG_LOG("trx", "Autocommit in memory: " << this);
+ }
+ else
+ {
+#ifdef UNIV_DEBUG
+ if (!UT_LIST_GET_LEN(lock.trx_locks))
+ for (auto l : lock.table_locks)
+ ut_ad(!l);
+#endif /* UNIV_DEBUG */
+ commit_state();
- /* NOTE that we could possibly make a group commit more
- efficient here: call os_thread_yield here to allow also other
- trxs to come to commit! */
+ if (id)
+ {
+ trx_sys.deregister_rw(this);
- /*-------------------------------------*/
+ /* Wait for any implicit-to-explicit lock conversions to cease,
+ so that there will be no race condition in lock_release(). */
+ while (UNIV_UNLIKELY(is_referenced()))
+ ut_delay(srv_spin_wait_delay);
+ }
+ else
+ ut_ad(read_only || !rsegs.m_redo.rseg);
- /* Depending on the my.cnf options, we may now write the log
- buffer to the log files, making the transaction durable if
- the OS does not crash. We may also flush the log files to
- disk, making the transaction durable also at an OS crash or a
- power outage.
+ if (read_only || !rsegs.m_redo.rseg)
+ {
+ MONITOR_INC(MONITOR_TRX_RO_COMMIT);
+ }
+ else
+ {
+ trx_update_mod_tables_timestamp(this);
+ MONITOR_INC(MONITOR_TRX_RW_COMMIT);
+ is_recovered= false;
+ }
- The idea in InnoDB's group commit is that a group of
- transactions gather behind a trx doing a physical disk write
- to log files, and when that physical write has been completed,
- one of those transactions does a write which commits the whole
- group. Note that this group commit will only bring benefit if
- there are > 2 users in the database. Then at least 2 users can
- gather behind one doing the physical log write to disk.
+ release_locks();
+ id= 0;
+ DEBUG_SYNC_C("after_trx_committed_in_memory");
- If we are calling trx_commit() under prepare_commit_mutex, we
- will delay possible log write and flush to a separate function
- trx_commit_complete_for_mysql(), which is only called when the
- thread has released the mutex. This is to make the
- group commit algorithm to work. Otherwise, the prepare_commit
- mutex would serialize all commits and prevent a group of
- transactions from gathering. */
-
- lsn_t lsn = mtr->commit_lsn();
-
- if (lsn == 0) {
- /* Nothing to be done. */
- } else if (trx->flush_log_later) {
- /* Do nothing yet */
- trx->must_flush_log_later = true;
- } else if (srv_flush_log_at_trx_commit == 0) {
- /* Do nothing */
- } else {
- trx_flush_log_if_needed(lsn, trx);
- }
+ while (dict_table_t *table= UT_LIST_GET_FIRST(lock.evicted_tables))
+ {
+ UT_LIST_REMOVE(lock.evicted_tables, table);
+ dict_mem_table_free(table);
+ }
+ }
- trx->commit_lsn = lsn;
+ ut_ad(!rsegs.m_redo.undo);
+ ut_ad(UT_LIST_GET_LEN(lock.evicted_tables) == 0);
- /* Tell server some activity has happened, since the trx
- does changes something. Background utility threads like
- master thread, purge thread or page_cleaner thread might
- have some work to do. */
- srv_active_wake_master_thread();
- }
+ if (mtr)
+ {
+ if (trx_undo_t *&undo= rsegs.m_noredo.undo)
+ {
+ ut_ad(undo->rseg == rsegs.m_noredo.rseg);
+ trx_undo_commit_cleanup(undo);
+ undo= nullptr;
+ }
- ut_ad(!trx->rsegs.m_noredo.undo);
+ /* NOTE that we could possibly make a group commit more efficient
+ here: call os_thread_yield here to allow also other trxs to come
+ to commit! */
+
+ /*-------------------------------------*/
+
+ /* Depending on the my.cnf options, we may now write the log
+ buffer to the log files, making the transaction durable if the OS
+ does not crash. We may also flush the log files to disk, making
+ the transaction durable also at an OS crash or a power outage.
+
+ The idea in InnoDB's group commit is that a group of transactions
+ gather behind a trx doing a physical disk write to log files, and
+ when that physical write has been completed, one of those
+ transactions does a write which commits the whole group. Note that
+ this group commit will only bring benefit if there are > 2 users
+ in the database. Then at least 2 users can gather behind one doing
+ the physical log write to disk.
+
+ If we are calling trx_t::commit() under prepare_commit_mutex, we
+ will delay possible log write and flush to a separate function
+ trx_commit_complete_for_mysql(), which is only called when the
+ thread has released the mutex. This is to make the group commit
+ algorithm to work. Otherwise, the prepare_commit mutex would
+ serialize all commits and prevent a group of transactions from
+ gathering. */
+
+ commit_lsn= mtr->commit_lsn();
+ if (!commit_lsn)
+ /* Nothing to be done. */;
+ else if (flush_log_later)
+ /* Do nothing yet */
+ must_flush_log_later= true;
+ else if (srv_flush_log_at_trx_commit)
+ trx_flush_log_if_needed(commit_lsn, this);
+
+ /* Tell server some activity has happened, since the trx does
+ changes something. Background utility threads like master thread,
+ purge thread or page_cleaner thread might have some work to do. */
+ srv_active_wake_master_thread();
+ }
- /* Only after trx_undo_commit_cleanup() it is safe to release
- our rseg reference. */
- if (trx_rseg_t* rseg = trx->rsegs.m_redo.rseg) {
- mutex_enter(&rseg->mutex);
- ut_ad(rseg->trx_ref_count > 0);
- --rseg->trx_ref_count;
- mutex_exit(&rseg->mutex);
- }
+ ut_ad(!rsegs.m_noredo.undo);
- /* Free all savepoints, starting from the first. */
- trx_named_savept_t* savep = UT_LIST_GET_FIRST(trx->trx_savepoints);
+ /* Only after trx_undo_commit_cleanup() it is safe to release
+ our rseg reference. */
+ if (trx_rseg_t *rseg= rsegs.m_redo.rseg)
+ {
+ mutex_enter(&rseg->mutex);
+ ut_ad(rseg->trx_ref_count > 0);
+ --rseg->trx_ref_count;
+ mutex_exit(&rseg->mutex);
+ }
- trx_roll_savepoints_free(trx, savep);
+ /* Free all savepoints, starting from the first. */
+ trx_named_savept_t *savep= UT_LIST_GET_FIRST(trx_savepoints);
- if (trx->fts_trx != NULL) {
- trx_finalize_for_fts(trx, trx->undo_no != 0);
- }
+ trx_roll_savepoints_free(this, savep);
- trx_mutex_enter(trx);
- trx->dict_operation = TRX_DICT_OP_NONE;
- trx->lock.was_chosen_as_deadlock_victim = false;
+ if (fts_trx)
+ trx_finalize_for_fts(this, undo_no != 0);
- DBUG_LOG("trx", "Commit in memory: " << trx);
- trx->state = TRX_STATE_NOT_STARTED;
#ifdef WITH_WSREP
- trx->wsrep = false;
-#endif
-
- trx->assert_freed();
+ /* Serialization history has been written and the transaction is
+ committed in memory, which makes this commit ordered. Release commit
+ order critical section. */
+ if (wsrep)
+ {
+ wsrep= false;
+ wsrep_commit_ordered(mysql_thd);
+ }
+ lock.was_chosen_as_wsrep_victim= false;
+#endif /* WITH_WSREP */
+ trx_mutex_enter(this);
+ dict_operation= TRX_DICT_OP_NONE;
- trx_init(trx);
+ DBUG_LOG("trx", "Commit in memory: " << this);
+ state= TRX_STATE_NOT_STARTED;
- trx_mutex_exit(trx);
+ assert_freed();
+ trx_init(this);
+ trx_mutex_exit(this);
- ut_a(trx->error_state == DB_SUCCESS);
- srv_wake_purge_thread_if_not_active();
+ ut_a(error_state == DB_SUCCESS);
+ if (!srv_read_only_mode)
+ srv_wake_purge_thread_if_not_active();
}
-/** Commit a transaction and a mini-transaction.
-@param[in,out] trx transaction
-@param[in,out] mtr mini-transaction (NULL if no modifications) */
-void trx_commit_low(trx_t* trx, mtr_t* mtr)
+/** Commit the transaction in a mini-transaction.
+@param mtr mini-transaction (if there are any persistent modifications) */
+void trx_t::commit_low(mtr_t *mtr)
{
- ut_ad(!mtr || mtr->is_active());
- ut_d(bool aborted = trx->in_rollback
- && trx->error_state == DB_DEADLOCK);
- ut_ad(!mtr == (aborted || !trx->has_logged()));
- ut_ad(!mtr || !aborted);
-
- /* undo_no is non-zero if we're doing the final commit. */
- if (trx->fts_trx != NULL && trx->undo_no != 0) {
- ut_a(!trx->is_autocommit_non_locking());
-
- /* FTS-FIXME: Temporarily tolerate DB_DUPLICATE_KEY
- instead of dying. This is a possible scenario if there
- is a crash between insert to DELETED table committing
- and transaction committing. The fix would be able to
- return error from this function */
- if (dberr_t error = fts_commit(trx)) {
- ut_a(error == DB_DUPLICATE_KEY);
- }
- }
+ ut_ad(!mtr || mtr->is_active());
+ ut_d(bool aborted = in_rollback && error_state == DB_DEADLOCK);
+ ut_ad(!mtr == (aborted || !has_logged()));
+ ut_ad(!mtr || !aborted);
+
+ /* undo_no is non-zero if we're doing the final commit. */
+ if (fts_trx && undo_no)
+ {
+ ut_a(!is_autocommit_non_locking());
+ /* FTS-FIXME: Temporarily tolerate DB_DUPLICATE_KEY instead of
+ dying. This is a possible scenario if there is a crash between
+ insert to DELETED table committing and transaction committing. The
+ fix would be able to return error from this function */
+ if (dberr_t error= fts_commit(this))
+ ut_a(error == DB_DUPLICATE_KEY);
+ }
#ifndef DBUG_OFF
- const bool debug_sync = trx->mysql_thd && trx->has_logged_persistent();
+ const bool debug_sync= mysql_thd && has_logged_persistent();
#endif
- if (mtr != NULL) {
- trx_write_serialisation_history(trx, mtr);
-
- /* The following call commits the mini-transaction, making the
- whole transaction committed in the file-based world, at this
- log sequence number. The transaction becomes 'durable' when
- we write the log to disk, but in the logical sense the commit
- in the file-based data structures (undo logs etc.) happens
- here.
-
- NOTE that transaction numbers, which are assigned only to
- transactions with an update undo log, do not necessarily come
- in exactly the same order as commit lsn's, if the transactions
- have different rollback segments. To get exactly the same
- order we should hold the kernel mutex up to this point,
- adding to the contention of the kernel mutex. However, if
- a transaction T2 is able to see modifications made by
- a transaction T1, T2 will always get a bigger transaction
- number and a bigger commit lsn than T1. */
-
- /*--------------*/
- mtr_commit(mtr);
-
- DBUG_EXECUTE_IF("ib_crash_during_trx_commit_in_mem",
- if (trx->has_logged()) {
- log_write_up_to(mtr->commit_lsn(),
- true);
- DBUG_SUICIDE();
- });
- /*--------------*/
- }
+ if (mtr)
+ {
+ trx_write_serialisation_history(this, mtr);
+
+ /* The following call commits the mini-transaction, making the
+ whole transaction committed in the file-based world, at this log
+ sequence number. The transaction becomes 'durable' when we write
+ the log to disk, but in the logical sense the commit in the
+ file-based data structures (undo logs etc.) happens here.
+
+ NOTE that transaction numbers, which are assigned only to
+ transactions with an update undo log, do not necessarily come in
+ exactly the same order as commit lsn's, if the transactions have
+ different rollback segments. To get exactly the same order we
+ should hold the kernel mutex up to this point, adding to the
+ contention of the kernel mutex. However, if a transaction T2 is
+ able to see modifications made by a transaction T1, T2 will always
+ get a bigger transaction number and a bigger commit lsn than T1. */
+
+ mtr->commit();
+ }
#ifndef DBUG_OFF
- /* In case of this function is called from a stack executing
- THD::release_resources -> ...
- innobase_connection_close() ->
- trx_rollback_for_mysql... -> .
- mysql's thd does not seem to have
- thd->debug_sync_control defined any longer. However the stack
- is possible only with a prepared trx not updating any data.
- */
- if (debug_sync) {
- DEBUG_SYNC_C("before_trx_state_committed_in_memory");
- }
+ if (debug_sync)
+ DEBUG_SYNC_C("before_trx_state_committed_in_memory");
#endif
- trx_commit_in_memory(trx, mtr);
+ commit_in_memory(mtr);
}
-/****************************************************************//**
-Commits a transaction. */
-void
-trx_commit(
-/*=======*/
- trx_t* trx) /*!< in/out: transaction */
-{
- mtr_t* mtr;
- mtr_t local_mtr;
- if (trx->has_logged()) {
- mtr = &local_mtr;
- mtr->start();
- } else {
-
- mtr = NULL;
- }
+void trx_t::commit()
+{
+ mtr_t *mtr= nullptr;
+ mtr_t local_mtr;
- trx_commit_low(trx, mtr);
+ if (has_logged())
+ {
+ mtr= &local_mtr;
+ local_mtr.start();
+ }
+ commit_low(mtr);
}
/****************************************************************//**
@@ -1637,11 +1632,8 @@ trx_commit_step(
trx_commit_or_rollback_prepare(trx);
trx->lock.que_state = TRX_QUE_COMMITTING;
-
- trx_commit(trx);
-
+ trx->commit();
ut_ad(trx->lock.wait_thr == NULL);
-
trx->lock.que_state = TRX_QUE_RUNNING;
thr = NULL;
@@ -1679,9 +1671,7 @@ trx_commit_for_mysql(
case TRX_STATE_PREPARED:
case TRX_STATE_PREPARED_RECOVERED:
trx->op_info = "committing";
-
- trx_commit(trx);
-
+ trx->commit();
MONITOR_DEC(MONITOR_TRX_ACTIVE);
trx->op_info = "";
return(DB_SUCCESS);
@@ -2159,7 +2149,7 @@ static my_bool trx_get_trx_by_xid_callback(rw_trx_hash_element_t *element,
transaction needs a valid trx->xid for
invoking trx_sys_update_wsrep_checkpoint(). */
if (!wsrep_is_wsrep_xid(trx->xid))
-#endif
+#endif /* WITH_WSREP */
/* Invalidate the XID, so that subsequent calls will not find it. */
trx->xid->null();
arg->trx= trx;
diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc
index 6edc16e48be..8768b934dba 100644
--- a/storage/innobase/trx/trx0undo.cc
+++ b/storage/innobase/trx/trx0undo.cc
@@ -188,7 +188,7 @@ trx_undo_get_prev_rec_from_prev_page(
space = page_get_space_id(undo_page);
buf_block_t* block = buf_page_get(
- page_id_t(space, prev_page_no), univ_page_size,
+ page_id_t(space, prev_page_no), 0,
shared ? RW_S_LATCH : RW_X_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE);
@@ -389,7 +389,7 @@ trx_undo_parse_page_init(const byte* ptr, const byte* end_ptr, page_t* page)
const ulint type = *ptr++;
if (type > TRX_UNDO_UPDATE) {
- recv_sys->found_corrupt_log = true;
+ recv_sys.found_corrupt_log = true;
} else if (page) {
/* Starting with MDEV-12288 in MariaDB 10.3.1, we use
type=0 for the combined insert/update undo log
@@ -435,8 +435,7 @@ trx_undo_parse_page_header_reuse(
the space on the page */
ut_ad(mach_read_from_2(TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE
- + undo_page)
- == TRX_UNDO_INSERT);
+ + undo_page) == 1);
byte* page_hdr = undo_page + TRX_UNDO_PAGE_HDR;
mach_write_to_2(page_hdr + TRX_UNDO_PAGE_START, new_free);
@@ -664,6 +663,10 @@ trx_undo_write_xid(
const XID* xid, /*!< in: X/Open XA Transaction Identification */
mtr_t* mtr) /*!< in: mtr */
{
+ DBUG_ASSERT(xid->gtrid_length >= 0);
+ DBUG_ASSERT(xid->bqual_length >= 0);
+ DBUG_ASSERT(xid->gtrid_length + xid->bqual_length < XIDDATASIZE);
+
mlog_write_ulint(log_hdr + TRX_UNDO_XA_FORMAT,
static_cast<ulint>(xid->formatID),
MLOG_4BYTES, mtr);
@@ -675,10 +678,15 @@ trx_undo_write_xid(
mlog_write_ulint(log_hdr + TRX_UNDO_XA_BQUAL_LEN,
static_cast<ulint>(xid->bqual_length),
MLOG_4BYTES, mtr);
-
+ const ulint xid_length = static_cast<ulint>(xid->gtrid_length
+ + xid->bqual_length);
mlog_write_string(log_hdr + TRX_UNDO_XA_XID,
reinterpret_cast<const byte*>(xid->data),
- XIDDATASIZE, mtr);
+ xid_length, mtr);
+ if (UNIV_LIKELY(xid_length < XIDDATASIZE)) {
+ mlog_memset(log_hdr + TRX_UNDO_XA_XID + xid_length,
+ XIDDATASIZE - xid_length, 0, mtr);
+ }
}
/********************************************************************//**
@@ -846,7 +854,7 @@ trx_undo_free_page(
TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE + undo_page, mtr);
fseg_free_page(TRX_UNDO_SEG_HDR + TRX_UNDO_FSEG_HEADER + header_page,
- rseg->space, page_no, mtr);
+ rseg->space, page_no, true, mtr);
const fil_addr_t last_addr = flst_get_last(
TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST + header_page, mtr);
@@ -885,54 +893,55 @@ trx_undo_free_last_page(trx_undo_t* undo, mtr_t* mtr)
@param[in,out] undo undo log
@param[in] limit all undo logs after this limit will be discarded
@param[in] is_temp whether this is temporary undo log */
-void
-trx_undo_truncate_end(trx_undo_t* undo, undo_no_t limit, bool is_temp)
+void trx_undo_truncate_end(trx_undo_t& undo, undo_no_t limit, bool is_temp)
{
- ut_ad(mutex_own(&undo->rseg->mutex));
- ut_ad(is_temp == !undo->rseg->is_persistent());
+ mtr_t mtr;
+ ut_ad(is_temp == !undo.rseg->is_persistent());
for (;;) {
- mtr_t mtr;
mtr.start();
if (is_temp) {
mtr.set_log_mode(MTR_LOG_NO_REDO);
}
trx_undo_rec_t* trunc_here = NULL;
+ mutex_enter(&undo.rseg->mutex);
page_t* undo_page = trx_undo_page_get(
- page_id_t(undo->rseg->space->id, undo->last_page_no),
+ page_id_t(undo.rseg->space->id, undo.last_page_no),
&mtr);
trx_undo_rec_t* rec = trx_undo_page_get_last_rec(
- undo_page, undo->hdr_page_no, undo->hdr_offset);
+ undo_page, undo.hdr_page_no, undo.hdr_offset);
while (rec) {
- if (trx_undo_rec_get_undo_no(rec) >= limit) {
- /* Truncate at least this record off, maybe
- more */
- trunc_here = rec;
- } else {
- goto function_exit;
+ if (trx_undo_rec_get_undo_no(rec) < limit) {
+ goto func_exit;
}
+ /* Truncate at least this record off, maybe more */
+ trunc_here = rec;
rec = trx_undo_page_get_prev_rec(rec,
- undo->hdr_page_no,
- undo->hdr_offset);
+ undo.hdr_page_no,
+ undo.hdr_offset);
}
- if (undo->last_page_no == undo->hdr_page_no) {
-function_exit:
- if (trunc_here) {
- mlog_write_ulint(undo_page + TRX_UNDO_PAGE_HDR
- + TRX_UNDO_PAGE_FREE,
- ulint(trunc_here - undo_page),
- MLOG_2BYTES, &mtr);
- }
-
+ if (undo.last_page_no != undo.hdr_page_no) {
+ trx_undo_free_last_page(&undo, &mtr);
+ mutex_exit(&undo.rseg->mutex);
mtr.commit();
- return;
+ continue;
+ }
+
+func_exit:
+ mutex_exit(&undo.rseg->mutex);
+
+ if (trunc_here) {
+ mlog_write_ulint(undo_page + TRX_UNDO_PAGE_HDR
+ + TRX_UNDO_PAGE_FREE,
+ ulint(trunc_here - undo_page),
+ MLOG_2BYTES, &mtr);
}
- trx_undo_free_last_page(undo, &mtr);
mtr.commit();
+ return;
}
}
@@ -1085,7 +1094,7 @@ corrupted_type:
type);
corrupted:
mtr.commit();
- return NULL;
+ return nullptr;
}
uint16_t offset = mach_read_from_2(TRX_UNDO_SEG_HDR + TRX_UNDO_LAST_LOG
@@ -1364,7 +1373,7 @@ trx_undo_reuse_cached(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** pundo,
buf_block_t* block = buf_page_get(page_id_t(undo->rseg->space->id,
undo->hdr_page_no),
- univ_page_size, RW_X_LATCH, mtr);
+ 0, RW_X_LATCH, mtr);
if (!block) {
return NULL;
}
@@ -1382,7 +1391,7 @@ trx_undo_reuse_cached(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** pundo,
if (ut_d(ulint type =) UNIV_UNLIKELY(
mach_read_from_2(TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE
+ block->frame))) {
- ut_ad(type == TRX_UNDO_INSERT || type == TRX_UNDO_UPDATE);
+ ut_ad(type == 1 || type == 2);
mlog_write_ulint(TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE
+ block->frame, 0, MLOG_2BYTES, mtr);
}
@@ -1432,7 +1441,7 @@ trx_undo_assign(trx_t* trx, dberr_t* err, mtr_t* mtr)
if (undo) {
return buf_page_get_gen(
page_id_t(undo->rseg->space->id, undo->last_page_no),
- univ_page_size, RW_X_LATCH, undo->guess_block,
+ 0, RW_X_LATCH, undo->guess_block,
BUF_GET, __FILE__, __LINE__, mtr, err);
}
@@ -1486,7 +1495,7 @@ trx_undo_assign_low(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo,
if (*undo) {
return buf_page_get_gen(
page_id_t(rseg->space->id, (*undo)->last_page_no),
- univ_page_size, RW_X_LATCH, (*undo)->guess_block,
+ 0, RW_X_LATCH, (*undo)->guess_block,
BUF_GET, __FILE__, __LINE__, mtr, err);
}
@@ -1558,9 +1567,8 @@ trx_undo_set_state_at_finish(
@param[in,out] trx transaction
@param[in,out] undo undo log
@param[in] rollback false=XA PREPARE, true=XA ROLLBACK
-@param[in,out] mtr mini-transaction
-@return undo log segment header page, x-latched */
-page_t*
+@param[in,out] mtr mini-transaction */
+void
trx_undo_set_state_at_prepare(
trx_t* trx,
trx_undo_t* undo,
@@ -1572,8 +1580,6 @@ trx_undo_set_state_at_prepare(
page_t* undo_page;
ulint offset;
- ut_ad(trx && undo && mtr);
-
ut_a(undo->id < TRX_RSEG_N_SLOTS);
undo_page = trx_undo_page_get(
@@ -1585,7 +1591,7 @@ trx_undo_set_state_at_prepare(
ut_ad(undo->state == TRX_UNDO_PREPARED);
mlog_write_ulint(seg_hdr + TRX_UNDO_STATE, TRX_UNDO_ACTIVE,
MLOG_2BYTES, mtr);
- return(undo_page);
+ return;
}
/*------------------------------*/
@@ -1604,8 +1610,6 @@ trx_undo_set_state_at_prepare(
TRUE, MLOG_1BYTE, mtr);
trx_undo_write_xid(undo_header, &undo->xid, mtr);
-
- return(undo_page);
}
/** Free temporary undo log after commit or rollback.
diff --git a/storage/innobase/ut/ut0crc32.cc b/storage/innobase/ut/ut0crc32.cc
index 2c8aa3afe4d..bb2c530a174 100644
--- a/storage/innobase/ut/ut0crc32.cc
+++ b/storage/innobase/ut/ut0crc32.cc
@@ -474,34 +474,6 @@ ut_crc32_64_sw(
*len -= 8;
}
-#ifdef INNODB_BUG_ENDIAN_CRC32
-/** Calculate CRC32 over 64-bit byte string using a software implementation.
-The byte string is converted to a 64-bit integer using big endian byte order.
-@param[in,out] crc crc32 checksum so far when this function is called,
-when the function ends it will contain the new checksum
-@param[in,out] data data to be checksummed, the pointer will be advanced
-with 8 bytes
-@param[in,out] len remaining bytes, it will be decremented with 8 */
-inline
-void
-ut_crc32_64_legacy_big_endian_sw(
- uint32_t* crc,
- const byte** data,
- ulint* len)
-{
- uint64_t data_int = *reinterpret_cast<const uint64_t*>(*data);
-
-#ifndef WORDS_BIGENDIAN
- data_int = ut_crc32_swap_byteorder(data_int);
-#endif /* WORDS_BIGENDIAN */
-
- *crc = ut_crc32_64_low_sw(*crc, data_int);
-
- *data += 8;
- *len -= 8;
-}
-#endif /* INNODB_BUG_ENDIAN_CRC32 */
-
/** Calculates CRC32 in software, without using CPU instructions.
@param[in] buf data over which to calculate CRC32
@param[in] len data length
@@ -552,57 +524,6 @@ ut_crc32_sw(
return(~crc);
}
-#ifdef INNODB_BUG_ENDIAN_CRC32
-/** Calculates CRC32 in software, without using CPU instructions.
-This function uses big endian byte ordering when converting byte sequence to
-integers.
-@param[in] buf data over which to calculate CRC32
-@param[in] len data length
-@return CRC-32C (polynomial 0x11EDC6F41) */
-uint32_t ut_crc32_legacy_big_endian(const byte* buf, ulint len)
-{
- uint32_t crc = 0xFFFFFFFFU;
-
- ut_a(ut_crc32_slice8_table_initialized);
-
- /* Calculate byte-by-byte up to an 8-byte aligned address. After
- this consume the input 8-bytes at a time. */
- while (len > 0 && (reinterpret_cast<uintptr_t>(buf) & 7) != 0) {
- ut_crc32_8_sw(&crc, &buf, &len);
- }
-
- while (len >= 128) {
- /* This call is repeated 16 times. 16 * 8 = 128. */
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- }
-
- while (len >= 8) {
- ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len);
- }
-
- while (len > 0) {
- ut_crc32_8_sw(&crc, &buf, &len);
- }
-
- return(~crc);
-}
-#endif /* INNODB_BUG_ENDIAN_CRC32 */
-
/********************************************************************//**
Initializes the data structures used by ut_crc32*(). Does not do any
allocations, would not hurt if called twice, but would be pointless. */
@@ -625,9 +546,6 @@ ut_crc32_init()
if (features_ecx & 1 << 20) {
ut_crc32 = ut_crc32_hw;
-#ifdef INNODB_BUG_ENDIAN_CRC32
- ut_crc32_legacy_big_endian = ut_crc32_legacy_big_endian_hw;
-#endif /* INNODB_BUG_ENDIAN_CRC32 */
ut_crc32_implementation = "Using SSE2 crc32 instructions";
}
#endif
diff --git a/storage/innobase/ut/ut0new.cc b/storage/innobase/ut/ut0new.cc
index 2a372ca9f63..f47a5112fd7 100644
--- a/storage/innobase/ut/ut0new.cc
+++ b/storage/innobase/ut/ut0new.cc
@@ -147,7 +147,6 @@ ut_new_boot()
"row0merge",
"row0mysql",
"row0sel",
- "row0trunc",
"srv0conc",
"srv0srv",
"srv0start",
diff --git a/storage/innobase/ut/ut0rnd.cc b/storage/innobase/ut/ut0rnd.cc
index 8265121ef2e..a2e569514cb 100644
--- a/storage/innobase/ut/ut0rnd.cc
+++ b/storage/innobase/ut/ut0rnd.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2019, MariaDB Corporation.
+Copyright (c) 2019, 2020, 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
@@ -27,7 +27,7 @@ Created 5/11/1994 Heikki Tuuri
#include "ut0rnd.h"
/** Seed value of ut_rnd_gen() */
-int32 ut_rnd_current;
+std::atomic<uint32_t> ut_rnd_current;
/** These random numbers are used in ut_find_prime */
/*@{*/
diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc
index 8a4e1151101..a119a995a70 100644
--- a/storage/innobase/ut/ut0ut.cc
+++ b/storage/innobase/ut/ut0ut.cc
@@ -418,8 +418,6 @@ ut_strerr(
return("Tablespace already exists");
case DB_TABLESPACE_DELETED:
return("Tablespace deleted or being deleted");
- case DB_TABLESPACE_TRUNCATED:
- return("Tablespace was truncated");
case DB_TABLESPACE_NOT_FOUND:
return("Tablespace not found");
case DB_LOCK_TABLE_FULL:
diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt
index 2c46492c93e..248f7cbe177 100644
--- a/storage/maria/CMakeLists.txt
+++ b/storage/maria/CMakeLists.txt
@@ -47,7 +47,7 @@ SET(ARIA_SOURCES ma_init.c ma_open.c ma_extra.c ma_info.c ma_rkey.c
ma_checkpoint.c ma_recovery.c ma_commit.c ma_pagecrc.c
ha_maria.h maria_def.h ma_recovery_util.c ma_servicethread.c
ma_norec.c
- ma_crypt.c
+ ma_crypt.c ma_backup.c
)
IF(APPLE)
@@ -56,7 +56,8 @@ IF(APPLE)
ENDIF()
MYSQL_ADD_PLUGIN(aria ${ARIA_SOURCES}
- STORAGE_ENGINE STATIC_ONLY DEFAULT
+ STORAGE_ENGINE
+ MANDATORY
RECOMPILE_FOR_EMBEDDED)
IF(NOT WITH_ARIA_STORAGE_ENGINE)
@@ -97,7 +98,12 @@ IF(WITH_UNIT_TESTS)
ADD_EXECUTABLE(ma_sp_test ma_sp_test.c)
TARGET_LINK_LIBRARIES(ma_sp_test aria)
+
+ ADD_EXECUTABLE(test_ma_backup test_ma_backup.c)
+ TARGET_LINK_LIBRARIES(test_ma_backup aria)
+
ADD_SUBDIRECTORY(unittest)
+
ENDIF()
IF (MSVC)
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index d43d98821be..0c9db691ca5 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -152,10 +152,11 @@ static void update_log_file_size(MYSQL_THD thd,
struct st_mysql_sys_var *var,
void *var_ptr, const void *save);
+/* The 4096 is there because of MariaDB privilege tables */
static MYSQL_SYSVAR_ULONG(block_size, maria_block_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Block size to be used for Aria index pages.", 0, 0,
- MARIA_KEY_BLOCK_LENGTH, MARIA_MIN_KEY_BLOCK_LENGTH,
+ MARIA_KEY_BLOCK_LENGTH, 4096,
MARIA_MAX_KEY_BLOCK_LENGTH, MARIA_MIN_KEY_BLOCK_LENGTH);
static MYSQL_SYSVAR_ULONG(checkpoint_interval, checkpoint_interval,
@@ -390,6 +391,10 @@ static void init_aria_psi_keys(void)
#define init_aria_psi_keys() /* no-op */
#endif /* HAVE_PSI_INTERFACE */
+const char *MA_CHECK_INFO= "info";
+const char *MA_CHECK_WARNING= "warning";
+const char *MA_CHECK_ERROR= "error";
+
/*****************************************************************************
** MARIA tables
*****************************************************************************/
@@ -402,6 +407,20 @@ static handler *maria_create_handler(handlerton *hton,
}
+static void _ma_check_print(HA_CHECK *param, const char* msg_type,
+ const char *msgbuf)
+{
+ if (msg_type == MA_CHECK_INFO)
+ sql_print_information("%s.%s: %s", param->db_name, param->table_name,
+ msgbuf);
+ else if (msg_type == MA_CHECK_WARNING)
+ sql_print_warning("%s.%s: %s", param->db_name, param->table_name,
+ msgbuf);
+ else
+ sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+}
+
+
// collect errors printed by maria_check routines
static void _ma_check_print_msg(HA_CHECK *param, const char *msg_type,
@@ -423,16 +442,21 @@ static void _ma_check_print_msg(HA_CHECK *param, const char *msg_type,
if (!thd->vio_ok())
{
- sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+ _ma_check_print(param, msg_type, msgbuf);
return;
}
if (param->testflag &
(T_CREATE_MISSING_KEYS | T_SAFE_REPAIR | T_AUTO_REPAIR))
{
- my_message(ER_NOT_KEYFILE, msgbuf, MYF(MY_WME));
+ myf flag= 0;
+ if (msg_type == MA_CHECK_INFO)
+ flag= ME_NOTE;
+ else if (msg_type == MA_CHECK_WARNING)
+ flag= ME_WARNING;
+ my_message(ER_NOT_KEYFILE, msgbuf, MYF(flag));
if (thd->variables.log_warnings > 2)
- sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+ _ma_check_print(param, msg_type, msgbuf);
return;
}
length= (uint) (strxmov(name, param->db_name, ".", param->table_name,
@@ -454,7 +478,7 @@ static void _ma_check_print_msg(HA_CHECK *param, const char *msg_type,
sql_print_error("Failed on my_net_write, writing to stderr instead: %s.%s: %s\n",
param->db_name, param->table_name, msgbuf);
else if (thd->variables.log_warnings > 2)
- sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+ _ma_check_print(param, msg_type, msgbuf);
return;
}
@@ -530,6 +554,11 @@ static int table2maria(TABLE *table_arg, data_file_type row_type,
if (!table_arg->field[field->field_index]->stored_in_db())
{
my_free(*recinfo_out);
+ if (table_arg->s->long_unique_table)
+ {
+ my_error(ER_TOO_LONG_KEY, MYF(0), table_arg->file->max_key_length());
+ DBUG_RETURN(HA_ERR_INDEX_COL_TOO_LONG);
+ }
my_error(ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN, MYF(0));
DBUG_RETURN(HA_ERR_UNSUPPORTED);
}
@@ -887,7 +916,7 @@ void _ma_check_print_error(HA_CHECK *param, const char *fmt, ...)
if (param->testflag & T_SUPPRESS_ERR_HANDLING)
DBUG_VOID_RETURN;
va_start(args, fmt);
- _ma_check_print_msg(param, "error", fmt, args);
+ _ma_check_print_msg(param, MA_CHECK_ERROR, fmt, args);
va_end(args);
DBUG_VOID_RETURN;
}
@@ -898,7 +927,7 @@ void _ma_check_print_info(HA_CHECK *param, const char *fmt, ...)
va_list args;
DBUG_ENTER("_ma_check_print_info");
va_start(args, fmt);
- _ma_check_print_msg(param, "info", fmt, args);
+ _ma_check_print_msg(param, MA_CHECK_INFO, fmt, args);
va_end(args);
DBUG_VOID_RETURN;
}
@@ -911,7 +940,7 @@ void _ma_check_print_warning(HA_CHECK *param, const char *fmt, ...)
param->warning_printed= 1;
param->out_flag |= O_DATA_LOST;
va_start(args, fmt);
- _ma_check_print_msg(param, "warning", fmt, args);
+ _ma_check_print_msg(param, MA_CHECK_WARNING, fmt, args);
va_end(args);
DBUG_VOID_RETURN;
}
@@ -1001,7 +1030,7 @@ int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
HA_CAN_VIRTUAL_COLUMNS | HA_CAN_EXPORT |
HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT |
HA_CAN_TABLES_WITHOUT_ROLLBACK),
-can_enable_indexes(1), bulk_insert_single_undo(BULK_INSERT_NONE)
+can_enable_indexes(0), bulk_insert_single_undo(BULK_INSERT_NONE)
{}
@@ -1016,6 +1045,8 @@ handler *ha_maria::clone(const char *name __attribute__((unused)),
new_handler->file->state= file->state;
/* maria_create_trn_for_mysql() is never called for clone() tables */
new_handler->file->trn= file->trn;
+ DBUG_ASSERT(new_handler->file->trn_prev == 0 &&
+ new_handler->file->trn_next == 0);
}
return new_handler;
}
@@ -1161,6 +1192,14 @@ int ha_maria::open(const char *name, int mode, uint test_if_locked)
int_table_flags |= HA_HAS_NEW_CHECKSUM;
/*
+ We can only do online backup on transactional tables with checksum.
+ Checksums are needed to avoid half writes.
+ */
+ if (file->s->options & HA_OPTION_PAGE_CHECKSUM &&
+ file->s->base.born_transactional)
+ int_table_flags |= HA_CAN_ONLINE_BACKUPS;
+
+ /*
For static size rows, tell MariaDB that we will access all bytes
in the record when writing it. This signals MariaDB to initialize
the full row to ensure we don't get any errors from valgrind and
@@ -1196,12 +1235,14 @@ int ha_maria::close(void)
MARIA_HA *tmp= file;
if (!tmp)
return 0;
+ DBUG_ASSERT(file->trn == 0 || file->trn == &dummy_transaction_object);
+ DBUG_ASSERT(file->trn_next == 0 && file->trn_prev == 0);
file= 0;
return maria_close(tmp);
}
-int ha_maria::write_row(uchar * buf)
+int ha_maria::write_row(const uchar * buf)
{
/*
If we have an auto_increment column and we are writing a changed row
@@ -1312,6 +1353,16 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt)
mysql_mutex_unlock(&share->intern_lock);
info(HA_STATUS_NO_LOCK | HA_STATUS_TIME | HA_STATUS_VARIABLE |
HA_STATUS_CONST);
+
+ /*
+ Write a 'table is ok' message to error log if table is ok and
+ we have written to error log that table was getting checked
+ */
+ if (!error && !(table->db_stat & HA_READ_ONLY) &&
+ !maria_is_crashed(file) && thd->error_printed_to_log &&
+ (param->warning_printed || param->error_printed ||
+ param->note_printed))
+ _ma_check_print_info(param, "Table is fixed");
}
}
else if (!maria_is_crashed(file) && !thd->killed)
@@ -1322,7 +1373,10 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt)
/* Reset trn, that may have been set by repair */
if (old_trn && old_trn != file->trn)
+ {
+ DBUG_ASSERT(old_trn->used_instances == 0);
_ma_set_trn_for_table(file, old_trn);
+ }
thd_proc_info(thd, old_proc_info);
thd_progress_end(thd);
return error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK;
@@ -2046,6 +2100,7 @@ void ha_maria::start_bulk_insert(ha_rows rows, uint flags)
DBUG_ENTER("ha_maria::start_bulk_insert");
THD *thd= table->in_use;
MARIA_SHARE *share= file->s;
+ bool index_disabled= 0;
DBUG_PRINT("info", ("start_bulk_insert: rows %lu", (ulong) rows));
/* don't enable row cache if too few rows */
@@ -2109,12 +2164,39 @@ void ha_maria::start_bulk_insert(ha_rows rows, uint flags)
{
/* Internal table; If we get a duplicate something is very wrong */
file->update|= HA_STATE_CHANGED;
+ index_disabled= share->base.keys > 0;
maria_clear_all_keys_active(file->s->state.key_map);
}
else
{
my_bool all_keys= MY_TEST(flags & HA_CREATE_UNIQUE_INDEX_BY_SORT);
- maria_disable_indexes_for_rebuild(file, rows, all_keys);
+ /*
+ Deactivate all indexes that can be recreated fast.
+ These include packed keys on which sorting will use more temporary
+ space than the max allowed file length or for which the unpacked keys
+ will take much more space than packed keys.
+ Note that 'rows' may be zero for the case when we don't know how many
+ rows we will put into the file.
+ */
+ MARIA_SHARE *share= file->s;
+ MARIA_KEYDEF *key=share->keyinfo;
+ uint i;
+
+ DBUG_ASSERT(share->state.state.records == 0 &&
+ (!rows || rows >= MARIA_MIN_ROWS_TO_DISABLE_INDEXES));
+ for (i=0 ; i < share->base.keys ; i++,key++)
+ {
+ if (!(key->flag & (HA_SPATIAL | HA_AUTO_KEY | HA_RTREE_INDEX)) &&
+ ! maria_too_big_key_for_sort(key,rows) && share->base.auto_key != i+1 &&
+ (all_keys || !(key->flag & HA_NOSAME)) &&
+ table->key_info[i].algorithm != HA_KEY_ALG_LONG_HASH)
+ {
+ maria_clear_key_active(share->state.key_map, i);
+ index_disabled= 1;
+ file->update|= HA_STATE_CHANGED;
+ file->create_unique_index_by_sort= all_keys;
+ }
+ }
}
if (share->now_transactional)
{
@@ -2140,6 +2222,7 @@ void ha_maria::start_bulk_insert(ha_rows rows, uint flags)
rows);
}
}
+ can_enable_indexes= index_disabled;
DBUG_VOID_RETURN;
}
@@ -2178,7 +2261,6 @@ int ha_maria::end_bulk_insert()
if (bulk_insert_single_undo != BULK_INSERT_NONE)
{
- DBUG_ASSERT(can_enable_indexes);
/*
Table was transactional just before start_bulk_insert().
No need to flush pages if we did a repair (which already flushed).
@@ -2189,6 +2271,7 @@ int ha_maria::end_bulk_insert()
first_error= first_error ? first_error : error;
bulk_insert_single_undo= BULK_INSERT_NONE; // Safety
}
+ can_enable_indexes= 0;
DBUG_RETURN(first_error);
}
@@ -2549,14 +2632,20 @@ int ha_maria::extra(enum ha_extra_function operation)
operation == HA_EXTRA_PREPARE_FOR_FORCED_CLOSE))
{
THD *thd= table->in_use;
- TRN *trn= THD_TRN;
- _ma_set_tmp_trn_for_table(file, trn);
+ file->trn= THD_TRN;
}
DBUG_ASSERT(file->s->base.born_transactional || file->trn == 0 ||
file->trn == &dummy_transaction_object);
tmp= maria_extra(file, operation, 0);
- file->trn= old_trn; // Reset trn if was used
+ /*
+ Restore trn if it was changed above.
+ Note that table could be removed from trn->used_tables and
+ trn->used_instances if trn was set and some of the above operations
+ was used. This is ok as the table should not be part of any transaction
+ after this and thus doesn't need to be part of any of the above lists.
+ */
+ file->trn= old_trn;
return tmp;
}
@@ -2796,9 +2885,10 @@ static void reset_thd_trn(THD *thd, MARIA_HA *first_table)
{
DBUG_ENTER("reset_thd_trn");
THD_TRN= NULL;
- for (MARIA_HA *table= first_table; table ;
- table= table->trn_next)
+ MARIA_HA *next;
+ for (MARIA_HA *table= first_table; table ; table= next)
{
+ next= table->trn_next;
_ma_reset_trn_for_table(table);
/*
@@ -2815,6 +2905,10 @@ static void reset_thd_trn(THD *thd, MARIA_HA *first_table)
DBUG_VOID_RETURN;
}
+bool ha_maria::has_active_transaction(THD *thd)
+{
+ return (maria_hton && THD_TRN);
+}
/**
Performs an implicit commit of the Maria transaction and creates a new
@@ -2858,9 +2952,11 @@ int ha_maria::implicit_commit(THD *thd, bool new_trn)
DBUG_RETURN(0);
}
+ /* Prepare to move used_instances and locked tables to new TRN object */
locked_tables= trnman_has_locked_tables(trn);
+ trnman_reset_locked_tables(trn, 0);
+ relink_trn_used_instances(&used_tables, trn);
- used_tables= (MARIA_HA*) trn->used_instances;
error= 0;
if (unlikely(ma_commit(trn)))
error= 1;
@@ -3282,6 +3378,7 @@ static int maria_commit(handlerton *hton __attribute__ ((unused)),
MARIA_HA *used_instances= (MARIA_HA*) trn->used_instances;
DBUG_ENTER("maria_commit");
+ DBUG_ASSERT(trnman_has_locked_tables(trn) == 0);
trnman_reset_locked_tables(trn, 0);
trnman_set_flags(trn, trnman_get_flags(trn) & ~TRN_STATE_INFO_LOGGED);
@@ -3300,9 +3397,12 @@ static int maria_rollback(handlerton *hton __attribute__ ((unused)),
{
TRN *trn= THD_TRN;
DBUG_ENTER("maria_rollback");
+
+ DBUG_ASSERT(trnman_has_locked_tables(trn) == 0);
trnman_reset_locked_tables(trn, 0);
/* statement or transaction ? */
- if ((thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && !all)
+ if ((thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) &&
+ !all)
{
trnman_rollback_statement(trn);
DBUG_RETURN(0); // end of statement
@@ -3336,6 +3436,21 @@ int maria_checkpoint_state(handlerton *hton, bool disabled)
}
+/*
+ Handle backup calls
+*/
+
+void maria_prepare_for_backup()
+{
+ translog_disable_purge();
+}
+
+void maria_end_backup()
+{
+ translog_enable_purge();
+}
+
+
#define SHOW_MSG_LEN (FN_REFLEN + 20)
/**
@@ -3458,7 +3573,7 @@ static int mark_recovery_start(const char* log_dir)
int res;
DBUG_ENTER("mark_recovery_start");
if (!(maria_recover_options & HA_RECOVER_ANY))
- ma_message_no_user(ME_JUST_WARNING, "Please consider using option"
+ ma_message_no_user(ME_WARNING, "Please consider using option"
" --aria-recover-options[=...] to automatically check and"
" repair tables when logs are removed by option"
" --aria-force-start-after-recovery-failures=#");
@@ -3476,7 +3591,7 @@ static int mark_recovery_start(const char* log_dir)
" recovery from logs",
(res ? "failed to remove some" : "removed all"),
recovery_failures);
- ma_message_no_user((res ? 0 : ME_JUST_WARNING), msg);
+ ma_message_no_user((res ? 0 : ME_WARNING), msg);
}
else
res= ma_control_file_write_and_force(last_checkpoint_lsn, last_logno,
@@ -3536,6 +3651,9 @@ static int ha_maria_init(void *p)
#endif
maria_hton->flush_logs= maria_flush_logs;
maria_hton->show_status= maria_show_status;
+ maria_hton->prepare_for_backup= maria_prepare_for_backup;
+ maria_hton->end_backup= maria_end_backup;
+
/* TODO: decide if we support Maria being used for log tables */
maria_hton->flags= HTON_CAN_RECREATE | HTON_SUPPORT_LOG_TABLES;
bzero(maria_log_pagecache, sizeof(*maria_log_pagecache));
@@ -3564,7 +3682,10 @@ static int ha_maria_init(void *p)
maria_assert_if_crashed_table= debug_assert_if_crashed_table;
if (res)
+ {
maria_hton= 0;
+ maria_panic(HA_PANIC_CLOSE);
+ }
ma_killed= ma_killed_in_mariadb;
@@ -3937,8 +4058,8 @@ maria_declare_plugin(aria)
MYSQL_STORAGE_ENGINE_PLUGIN,
&maria_storage_engine,
"Aria",
- "Monty Program Ab",
- "Crash-safe tables with MyISAM heritage",
+ "MariaDB Corporation Ab",
+ "Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables",
PLUGIN_LICENSE_GPL,
ha_maria_init, /* Plugin Init */
NULL, /* Plugin Deinit */
diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h
index 48af840d86b..73f3576a34e 100644
--- a/storage/maria/ha_maria.h
+++ b/storage/maria/ha_maria.h
@@ -32,7 +32,7 @@
#define HA_RECOVER_QUICK 8 /* Don't check rows in data file */
C_MODE_START
-ICP_RESULT index_cond_func_maria(void *arg);
+check_result_t index_cond_func_maria(void *arg);
C_MODE_END
extern TYPELIB maria_recover_typelib;
@@ -73,7 +73,7 @@ public:
int open(const char *name, int mode, uint test_if_locked);
int close(void);
- int write_row(uchar * buf);
+ int write_row(const uchar * buf);
int update_row(const uchar * old_data, const uchar * new_data);
int delete_row(const uchar * buf);
int index_read_map(uchar * buf, const uchar * key, key_part_map keypart_map,
@@ -165,6 +165,7 @@ public:
{
return file;
}
+ static bool has_active_transaction(THD *thd);
static int implicit_commit(THD *thd, bool new_trn);
/**
* Multi Range Read interface
@@ -187,7 +188,7 @@ public:
int find_unique_row(uchar *record, uint unique_idx);
private:
DsMrr_impl ds_mrr;
- friend ICP_RESULT index_cond_func_maria(void *arg);
+ friend check_result_t index_cond_func_maria(void *arg);
friend void reset_thd_trn(THD *thd);
};
diff --git a/storage/maria/lockman.c b/storage/maria/lockman.c
index 590935967af..916b70b8344 100644
--- a/storage/maria/lockman.c
+++ b/storage/maria/lockman.c
@@ -109,6 +109,7 @@
#include <my_sys.h>
#include <my_bit.h>
#include <lf.h>
+#include "my_cpu.h"
#include "lockman.h"
/*
diff --git a/storage/maria/ma_backup.c b/storage/maria/ma_backup.c
new file mode 100644
index 00000000000..8f20209c48a
--- /dev/null
+++ b/storage/maria/ma_backup.c
@@ -0,0 +1,281 @@
+/* Copyright (C) 2018 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+/* Code for doing backups of Aria tables */
+
+#include "maria_def.h"
+#include "ma_blockrec.h" /* PAGE_SUFFIX_SIZE */
+#include "ma_checkpoint.h"
+#include <aria_backup.h>
+
+static uchar *_ma_base_info_read(uchar *ptr, MARIA_BASE_INFO *base);
+
+/**
+ @brief Get capabilites for an Aria table
+
+ @param kfile key file (.MAI)
+ @param cap Capabilities are stored here
+
+ @return 0 ok
+ @return X errno
+*/
+
+int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap)
+{
+ MARIA_SHARE share;
+ int error= 0;
+ uint head_length= sizeof(share.state.header), base_pos;
+ uint aligned_bit_blocks;
+ size_t info_length;
+ uchar *disc_cache;
+ DBUG_ENTER("aria_get_capabilities");
+
+ bzero(cap, sizeof(*cap));
+ if (my_pread(kfile,share.state.header.file_version, head_length, 0,
+ MYF(MY_NABP)))
+ DBUG_RETURN(HA_ERR_NOT_A_TABLE);
+
+ if (memcmp(share.state.header.file_version, maria_file_magic, 4))
+ DBUG_RETURN(HA_ERR_NOT_A_TABLE);
+
+ share.options= mi_uint2korr(share.state.header.options);
+
+ info_length= mi_uint2korr(share.state.header.header_length);
+ base_pos= mi_uint2korr(share.state.header.base_pos);
+
+ /*
+ Allocate space for header information and for data that is too
+ big to keep on stack
+ */
+ if (!(disc_cache= my_malloc(info_length, MYF(MY_WME))))
+ DBUG_RETURN(ENOMEM);
+
+ if (my_pread(kfile, disc_cache, info_length, 0L, MYF(MY_NABP)))
+ {
+ error= my_errno;
+ goto err;
+ }
+ _ma_base_info_read(disc_cache + base_pos, &share.base);
+ cap->transactional= share.base.born_transactional;
+ cap->checksum= MY_TEST(share.options & HA_OPTION_PAGE_CHECKSUM);
+ cap->online_backup_safe= cap->transactional && cap->checksum;
+ cap->header_size= share.base.keystart;
+ cap->keypage_header= ((share.base.born_transactional ?
+ LSN_STORE_SIZE + TRANSID_SIZE :
+ 0) + KEYPAGE_KEYID_SIZE + KEYPAGE_FLAG_SIZE +
+ KEYPAGE_USED_SIZE);
+ cap->block_size= share.base.block_size;
+
+ if (share.state.header.data_file_type == BLOCK_RECORD)
+ {
+ /* Calulate how man pages the row bitmap covers. From _ma_bitmap_init() */
+ aligned_bit_blocks= (cap->block_size - PAGE_SUFFIX_SIZE) / 6;
+ /*
+ In each 6 bytes, we have 6*8/3 = 16 pages covered
+ The +1 is to add the bitmap page, as this doesn't have to be covered
+ */
+ cap->bitmap_pages_covered= aligned_bit_blocks * 16 + 1;
+ }
+
+ /* Do a check that that we got things right */
+ if (share.state.header.data_file_type != BLOCK_RECORD &&
+ cap->online_backup_safe)
+ error= HA_ERR_NOT_A_TABLE;
+
+err:
+ my_free(disc_cache);
+ DBUG_RETURN(error);
+} /* maria_get_capabilities */
+
+
+/*
+ This is a copy of my_base_info_read from ma_open().
+ The base information will never change (something may be added
+ last, but not relevant for maria_get_capabilities), so it's safe to
+ copy it here.
+
+ The copy is done to avoid linking in the fill Aria library just
+ because maria_backup uses maria_get_capabilities()
+*/
+
+
+static uchar *_ma_base_info_read(uchar *ptr, MARIA_BASE_INFO *base)
+{
+ bmove(base->uuid, ptr, MY_UUID_SIZE); ptr+= MY_UUID_SIZE;
+ base->keystart= mi_sizekorr(ptr); ptr+= 8;
+ base->max_data_file_length= mi_sizekorr(ptr); ptr+= 8;
+ base->max_key_file_length= mi_sizekorr(ptr); ptr+= 8;
+ base->records= (ha_rows) mi_sizekorr(ptr); ptr+= 8;
+ base->reloc= (ha_rows) mi_sizekorr(ptr); ptr+= 8;
+ base->mean_row_length= mi_uint4korr(ptr); ptr+= 4;
+ base->reclength= mi_uint4korr(ptr); ptr+= 4;
+ base->pack_reclength= mi_uint4korr(ptr); ptr+= 4;
+ base->min_pack_length= mi_uint4korr(ptr); ptr+= 4;
+ base->max_pack_length= mi_uint4korr(ptr); ptr+= 4;
+ base->min_block_length= mi_uint4korr(ptr); ptr+= 4;
+ base->fields= mi_uint2korr(ptr); ptr+= 2;
+ base->fixed_not_null_fields= mi_uint2korr(ptr); ptr+= 2;
+ base->fixed_not_null_fields_length= mi_uint2korr(ptr);ptr+= 2;
+ base->max_field_lengths= mi_uint2korr(ptr); ptr+= 2;
+ base->pack_fields= mi_uint2korr(ptr); ptr+= 2;
+ base->extra_options= mi_uint2korr(ptr); ptr+= 2;
+ base->null_bytes= mi_uint2korr(ptr); ptr+= 2;
+ base->original_null_bytes= mi_uint2korr(ptr); ptr+= 2;
+ base->field_offsets= mi_uint2korr(ptr); ptr+= 2;
+ base->language= mi_uint2korr(ptr); ptr+= 2;
+ base->block_size= mi_uint2korr(ptr); ptr+= 2;
+
+ base->rec_reflength= *ptr++;
+ base->key_reflength= *ptr++;
+ base->keys= *ptr++;
+ base->auto_key= *ptr++;
+ base->born_transactional= *ptr++;
+ ptr++;
+ base->pack_bytes= mi_uint2korr(ptr); ptr+= 2;
+ base->blobs= mi_uint2korr(ptr); ptr+= 2;
+ base->max_key_block_length= mi_uint2korr(ptr); ptr+= 2;
+ base->max_key_length= mi_uint2korr(ptr); ptr+= 2;
+ base->extra_alloc_bytes= mi_uint2korr(ptr); ptr+= 2;
+ base->extra_alloc_procent= *ptr++;
+ ptr+= 16;
+ return ptr;
+}
+
+
+/**
+ @brief Copy an index block with re-read if checksum doesn't match
+
+ @param dfile data file (.MAD)
+ @param cap aria capabilities from aria_get_capabilities
+ @param block block number to read (0, 1, 2, 3...)
+ @param buffer read data to this buffer
+ @param bytes_read number of bytes actually read (in case of end of file)
+
+ @return 0 ok
+ @return HA_ERR_END_OF_FILE ; End of file
+ @return # error number
+*/
+
+#define MAX_RETRY 10
+
+int aria_read_index(File kfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block,
+ uchar *buffer)
+{
+ MARIA_SHARE share;
+ int retry= 0;
+ DBUG_ENTER("aria_read_index");
+
+ share.keypage_header= cap->keypage_header;
+ share.block_size= cap->block_size;
+ do
+ {
+ int error;
+ size_t length;
+ if ((length= my_pread(kfile, buffer, cap->block_size,
+ block * cap->block_size, MYF(0))) != cap->block_size)
+ {
+ if (length == 0)
+ DBUG_RETURN(HA_ERR_END_OF_FILE);
+ if (length == (size_t) -1)
+ DBUG_RETURN(my_errno ? my_errno : -1);
+ /* Assume we got a half read; Do a re-read */
+ }
+ /* If not transactional or key file header, there are no checksums */
+ if (!cap->online_backup_safe ||
+ block < cap->header_size/ cap->block_size)
+ DBUG_RETURN(length == cap->block_size ? 0 : HA_ERR_CRASHED);
+
+ if (length == cap->block_size)
+ {
+ length= _ma_get_page_used(&share, buffer);
+ if (length > cap->block_size - CRC_SIZE)
+ DBUG_RETURN(HA_ERR_CRASHED);
+ error= maria_page_crc_check(buffer, block, &share,
+ MARIA_NO_CRC_NORMAL_PAGE,
+ (int) length);
+ if (error != HA_ERR_WRONG_CRC)
+ DBUG_RETURN(error);
+ }
+ my_sleep(100000); /* Sleep 0.1 seconds */
+ } while (retry < MAX_RETRY);
+ DBUG_RETURN(HA_ERR_WRONG_CRC);
+}
+
+
+/**
+ @brief Copy a data block with re-read if checksum doesn't match
+
+ @param dfile data file (.MAD)
+ @param cap aria capabilities from aria_get_capabilities
+ @param block block number to read (0, 1, 2, 3...)
+ @param buffer read data to this buffer
+ @param bytes_read number of bytes actually read (in case of end of file)
+
+ @return 0 ok
+ @return HA_ERR_END_OF_FILE ; End of file
+ @return # error number
+*/
+
+int aria_read_data(File dfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block,
+ uchar *buffer, size_t *bytes_read)
+{
+ MARIA_SHARE share;
+ int retry= 0;
+ DBUG_ENTER("aria_read_data");
+
+ share.keypage_header= cap->keypage_header;
+ share.block_size= cap->block_size;
+
+ if (!cap->online_backup_safe)
+ {
+ *bytes_read= my_pread(dfile, buffer, cap->block_size,
+ block * cap->block_size, MY_WME);
+ if (*bytes_read == 0)
+ DBUG_RETURN(HA_ERR_END_OF_FILE);
+ DBUG_RETURN(*bytes_read > 0 ? 0 : (my_errno ? my_errno : -1));
+ }
+
+ *bytes_read= cap->block_size;
+ do
+ {
+ int error;
+ size_t length;
+ if ((length= my_pread(dfile, buffer, cap->block_size,
+ block * cap->block_size, MYF(0))) != cap->block_size)
+ {
+ if (length == 0)
+ DBUG_RETURN(HA_ERR_END_OF_FILE);
+ if (length == (size_t) -1)
+ DBUG_RETURN(my_errno ? my_errno : -1);
+ }
+
+ /* If not transactional or key file header, there are no checksums */
+ if (!cap->online_backup_safe)
+ DBUG_RETURN(length == cap->block_size ? 0 : HA_ERR_CRASHED);
+
+ if (length == cap->block_size)
+ {
+ error= maria_page_crc_check(buffer, block, &share,
+ ((block % cap->bitmap_pages_covered) == 0 ?
+ MARIA_NO_CRC_BITMAP_PAGE :
+ MARIA_NO_CRC_NORMAL_PAGE),
+ share.block_size - CRC_SIZE);
+ if (error != HA_ERR_WRONG_CRC)
+ DBUG_RETURN(error);
+ }
+ my_sleep(100000); /* Sleep 0.1 seconds */
+ } while (retry < MAX_RETRY);
+ DBUG_RETURN(HA_ERR_WRONG_CRC);
+}
diff --git a/storage/maria/ma_bitmap.c b/storage/maria/ma_bitmap.c
index fadf04861fa..4f3a2ae5f89 100644
--- a/storage/maria/ma_bitmap.c
+++ b/storage/maria/ma_bitmap.c
@@ -232,15 +232,16 @@ my_bool _ma_bitmap_init(MARIA_SHARE *share, File file,
uint max_page_size;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
uint size= share->block_size;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
pgcache_page_no_t first_bitmap_with_space;
#ifndef DBUG_OFF
/* We want to have a copy of the bitmap to be able to print differences */
size*= 2;
#endif
- if (((bitmap->map= (uchar*) my_malloc(size, MYF(MY_WME))) == NULL) ||
+ if (((bitmap->map= (uchar*) my_malloc(size, flag)) == NULL) ||
my_init_dynamic_array(&bitmap->pinned_pages,
- sizeof(MARIA_PINNED_PAGE), 1, 1, MYF(0)))
+ sizeof(MARIA_PINNED_PAGE), 1, 1, flag))
return 1;
bitmap->share= share;
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index 2fe2f13f17c..667cc26758d 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -485,10 +485,11 @@ my_bool _ma_init_block_record(MARIA_HA *info)
{
MARIA_ROW *row= &info->cur_row, *new_row= &info->new_row;
MARIA_SHARE *share= info->s;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
uint default_extents;
DBUG_ENTER("_ma_init_block_record");
- if (!my_multi_malloc(MY_WME,
+ if (!my_multi_malloc(flag,
&row->empty_bits, share->base.pack_bytes,
&row->field_lengths,
share->base.max_field_lengths + 2,
@@ -527,13 +528,12 @@ my_bool _ma_init_block_record(MARIA_HA *info)
FULL_PAGE_SIZE(share) /
BLOB_SEGMENT_MIN_SIZE));
- if (my_init_dynamic_array(&info->bitmap_blocks,
- sizeof(MARIA_BITMAP_BLOCK), default_extents,
- 64, MYF(0)))
+ if (my_init_dynamic_array(&info->bitmap_blocks, sizeof(MARIA_BITMAP_BLOCK),
+ default_extents, 64, flag))
goto err;
info->cur_row.extents_buffer_length= default_extents * ROW_EXTENT_SIZE;
if (!(info->cur_row.extents= my_malloc(info->cur_row.extents_buffer_length,
- MYF(MY_WME))))
+ flag)))
goto err;
info->row_base_length= share->base_length;
@@ -2598,7 +2598,8 @@ static my_bool free_full_page_range(MARIA_HA *info, pgcache_page_no_t page,
@param record Record we should write
@param row Statistics about record (calculated by
calc_record_size())
- @param map_blocks On which pages the record should be stored
+ @param bitmap_blocks On which pages the record should be stored
+ @param head_block_is_read 1 if head block existed. 0 if new block.
@param row_pos Position on head page where to put head part of
record
@param undo_lsn <> LSN_ERROR if we are executing an UNDO
@@ -2641,6 +2642,7 @@ static my_bool write_block_record(MARIA_HA *info,
LSN lsn;
my_off_t position;
uint save_my_errno;
+ myf myflag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("write_block_record");
head_block= bitmap_blocks->block;
@@ -2707,7 +2709,7 @@ static my_bool write_block_record(MARIA_HA *info,
for every data segment we want to store.
*/
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
- row->head_length))
+ row->head_length, myflag))
DBUG_RETURN(1);
tmp_data_used= 0; /* Either 0 or last used uchar in 'data' */
@@ -4717,6 +4719,7 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
MARIA_EXTENT_CURSOR extent;
MARIA_COLUMNDEF *column, *end_column;
MARIA_ROW *cur_row= &info->cur_row;
+ myf myflag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("_ma_read_block_record2");
start_of_data= data;
@@ -4762,7 +4765,7 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
if (cur_row->extents_buffer_length < row_extent_size &&
_ma_alloc_buffer(&cur_row->extents,
&cur_row->extents_buffer_length,
- row_extent_size))
+ row_extent_size, myflag))
DBUG_RETURN(my_errno);
memcpy(cur_row->extents, data, ROW_EXTENT_SIZE);
data+= ROW_EXTENT_SIZE;
@@ -4943,7 +4946,7 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
cur_row->blob_length= blob_lengths;
DBUG_PRINT("info", ("Total blob length: %lu", blob_lengths));
if (_ma_alloc_buffer(&info->blob_buff, &info->blob_buff_size,
- blob_lengths))
+ blob_lengths, myflag))
DBUG_RETURN(my_errno);
blob_buffer= info->blob_buff;
}
@@ -5049,6 +5052,7 @@ static my_bool read_row_extent_info(MARIA_HA *info, uchar *buff,
uint flag, row_extents, row_extents_size;
uint field_lengths __attribute__ ((unused));
uchar *extents, *end;
+ myf myflag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("read_row_extent_info");
if (!(data= get_record_position(share, buff,
@@ -5072,7 +5076,7 @@ static my_bool read_row_extent_info(MARIA_HA *info, uchar *buff,
if (info->cur_row.extents_buffer_length < row_extents_size &&
_ma_alloc_buffer(&info->cur_row.extents,
&info->cur_row.extents_buffer_length,
- row_extents_size))
+ row_extents_size, myflag))
DBUG_RETURN(1);
memcpy(info->cur_row.extents, data, ROW_EXTENT_SIZE);
data+= ROW_EXTENT_SIZE;
@@ -5243,6 +5247,7 @@ my_bool _ma_cmp_block_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
my_bool _ma_scan_init_block_record(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("_ma_scan_init_block_record");
DBUG_ASSERT(info->dfile.file == share->bitmap.file.file);
@@ -5252,7 +5257,7 @@ my_bool _ma_scan_init_block_record(MARIA_HA *info)
*/
if (!(info->scan.bitmap_buff ||
((info->scan.bitmap_buff=
- (uchar *) my_malloc(share->block_size * 2, MYF(MY_WME))))))
+ (uchar *) my_malloc(share->block_size * 2, flag)))))
DBUG_RETURN(1);
info->scan.page_buff= info->scan.bitmap_buff + share->block_size;
info->scan.bitmap_end= info->scan.bitmap_buff + share->bitmap.max_total_size;
@@ -6374,16 +6379,19 @@ uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn,
pin_method= PAGECACHE_PIN_LEFT_PINNED;
share->pagecache->readwrite_flags&= ~MY_WME;
+ share->silence_encryption_errors= 1;
buff= pagecache_read(share->pagecache, &info->dfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link);
share->pagecache->readwrite_flags= share->pagecache->org_readwrite_flags;
+ share->silence_encryption_errors= 0;
if (!buff)
{
/* Skip errors when reading outside of file and uninitialized pages */
if (!new_page || (my_errno != HA_ERR_FILE_TOO_SHORT &&
- my_errno != HA_ERR_WRONG_CRC))
+ my_errno != HA_ERR_WRONG_CRC &&
+ my_errno != HA_ERR_DECRYPTION_FAILED))
{
DBUG_PRINT("error", ("Error %d when reading page", (int) my_errno));
goto err;
@@ -6875,6 +6883,7 @@ uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info,
else
{
share->pagecache->readwrite_flags&= ~MY_WME;
+ share->silence_encryption_errors= 1;
buff= pagecache_read(share->pagecache,
&info->dfile,
page, 0, 0,
@@ -6882,10 +6891,12 @@ uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info,
PAGECACHE_LOCK_WRITE, &page_link.link);
share->pagecache->readwrite_flags= share->pagecache->
org_readwrite_flags;
+ share->silence_encryption_errors= 0;
if (!buff)
{
if (my_errno != HA_ERR_FILE_TOO_SHORT &&
- my_errno != HA_ERR_WRONG_CRC)
+ my_errno != HA_ERR_WRONG_CRC &&
+ my_errno != HA_ERR_DECRYPTION_FAILED)
{
/* If not read outside of file */
pagecache_unlock_by_link(share->pagecache, page_link.link,
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index 8cf2e79e970..98f9c49b9fa 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -164,6 +164,9 @@ int maria_chk_status(HA_CHECK *param, MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
+ /* Protection for HA_EXTRA_FLUSH */
+ mysql_mutex_lock(&share->intern_lock);
+
if (maria_is_crashed_on_repair(info))
_ma_check_print_warning(param,
"Table is marked as crashed and last repair failed");
@@ -186,6 +189,9 @@ int maria_chk_status(HA_CHECK *param, MARIA_HA *info)
if (param->testflag & T_UPDATE_STATE)
param->warning_printed=save;
}
+
+ mysql_mutex_unlock(&share->intern_lock);
+
if (share->state.create_trid > param->max_trid)
{
param->wrong_trd_printed= 1; /* Force should run zerofill */
@@ -1265,6 +1271,7 @@ static int check_dynamic_record(HA_CHECK *param, MARIA_HA *info, int extend,
ulong UNINIT_VAR(left_length);
uint b_type;
char llbuff[22],llbuff2[22],llbuff3[22];
+ myf myflag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("check_dynamic_record");
pos= 0;
@@ -1372,7 +1379,7 @@ static int check_dynamic_record(HA_CHECK *param, MARIA_HA *info, int extend,
{
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
block_info.rec_len +
- share->base.extra_rec_buff_size))
+ share->base.extra_rec_buff_size, myflag))
{
_ma_check_print_error(param,
@@ -2548,6 +2555,9 @@ static int maria_drop_all_indexes(HA_CHECK *param, MARIA_HA *info,
DBUG_PRINT("repair", ("declared all indexes disabled"));
}
+ /* Flush obsolete index data from key cache */
+ _ma_flush_table_files(info, MARIA_FLUSH_INDEX,
+ FLUSH_IGNORE_CHANGED, FLUSH_IGNORE_CHANGED);
/* Clear index root block pointers. */
for (i= 0; i < share->base.keys; i++)
state->key_root[i]= HA_OFFSET_ERROR;
@@ -2685,7 +2695,7 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info,
(uchar *) my_malloc((uint)
share->base.default_rec_buff_size, MYF(0))) ||
_ma_alloc_buffer(&sort_param.rec_buff, &sort_param.rec_buff_size,
- share->base.default_rec_buff_size))
+ share->base.default_rec_buff_size, MYF(0)))
{
_ma_check_print_error(param, "Not enough memory for extra record");
goto err;
@@ -3773,7 +3783,7 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
(uchar*) my_malloc((size_t) share->base.default_rec_buff_size,
MYF(0))) ||
_ma_alloc_buffer(&sort_param.rec_buff, &sort_param.rec_buff_size,
- share->base.default_rec_buff_size))
+ share->base.default_rec_buff_size, MYF(0)))
{
_ma_check_print_error(param, "Not enough memory for extra record");
goto err;
@@ -4418,7 +4428,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
sort_param[i].record= (((uchar *)(sort_param+share->base.keys))+
(share->base.pack_reclength * i));
if (_ma_alloc_buffer(&sort_param[i].rec_buff, &sort_param[i].rec_buff_size,
- share->base.default_rec_buff_size))
+ share->base.default_rec_buff_size, MYF(0)))
{
_ma_check_print_error(param,"Not enough memory!");
goto err;
@@ -4921,7 +4931,8 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
DBUG_RETURN(-1);
}
/* Retry only if wrong record, not if disk error */
- if (flag != HA_ERR_WRONG_IN_RECORD && flag != HA_ERR_WRONG_CRC)
+ if (flag != HA_ERR_WRONG_IN_RECORD && flag != HA_ERR_WRONG_CRC &&
+ flag != HA_ERR_DECRYPTION_FAILED)
{
retry_if_quick(sort_param, flag);
DBUG_RETURN(flag);
@@ -5150,7 +5161,7 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
if (_ma_alloc_buffer(&sort_param->rec_buff,
&sort_param->rec_buff_size,
block_info.rec_len +
- share->base.extra_rec_buff_size))
+ share->base.extra_rec_buff_size, MYF(0)))
{
if (param->max_record_length >= block_info.rec_len)
@@ -6454,7 +6465,7 @@ static ha_checksum maria_byte_checksum(const uchar *buf, uint length)
return crc;
}
-static my_bool maria_too_big_key_for_sort(MARIA_KEYDEF *key, ha_rows rows)
+my_bool maria_too_big_key_for_sort(MARIA_KEYDEF *key, ha_rows rows)
{
uint key_maxlength=key->maxlength;
if (key->flag & HA_FULLTEXT)
@@ -6470,38 +6481,6 @@ static my_bool maria_too_big_key_for_sort(MARIA_KEYDEF *key, ha_rows rows)
}
/*
- Deactivate all indexes that can be recreated fast.
- These include packed keys on which sorting will use more temporary
- space than the max allowed file length or for which the unpacked keys
- will take much more space than packed keys.
- Note that 'rows' may be zero for the case when we don't know how many
- rows we will put into the file.
- */
-
-void maria_disable_indexes_for_rebuild(MARIA_HA *info, ha_rows rows,
- my_bool all_keys)
-{
- MARIA_SHARE *share= info->s;
- MARIA_KEYDEF *key=share->keyinfo;
- uint i;
-
- DBUG_ASSERT(share->state.state.records == 0 &&
- (!rows || rows >= MARIA_MIN_ROWS_TO_DISABLE_INDEXES));
- for (i=0 ; i < share->base.keys ; i++,key++)
- {
- if (!(key->flag & (HA_SPATIAL | HA_AUTO_KEY | HA_RTREE_INDEX)) &&
- ! maria_too_big_key_for_sort(key,rows) && share->base.auto_key != i+1 &&
- (all_keys || !(key->flag & HA_NOSAME)))
- {
- maria_clear_key_active(share->state.key_map, i);
- info->update|= HA_STATE_CHANGED;
- info->create_unique_index_by_sort= all_keys;
- }
- }
-}
-
-
-/*
Return TRUE if we can use repair by sorting
One can set the force argument to force to use sorting
even if the temporary file would be quite big!
@@ -6763,7 +6742,8 @@ read_next_page:
PAGECACHE_READ_UNKNOWN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0)))
{
- if (my_errno == HA_ERR_WRONG_CRC)
+ if (my_errno == HA_ERR_WRONG_CRC ||
+ my_errno == HA_ERR_DECRYPTION_FAILED)
{
/*
Don't give errors for zero filled blocks. These can
diff --git a/storage/maria/ma_checkpoint.h b/storage/maria/ma_checkpoint.h
index b306268ba5a..c719c3cfff7 100644
--- a/storage/maria/ma_checkpoint.h
+++ b/storage/maria/ma_checkpoint.h
@@ -84,8 +84,8 @@ static inline LSN lsn_read_non_atomic_32(const volatile LSN *x)
prints a message from a task not connected to any user (checkpoint
and recovery for example).
- @param level 0 if error, ME_JUST_WARNING if warning,
- ME_JUST_INFO if info
+ @param level 0 if error, ME_WARNING if warning,
+ ME_NOTE if info
@param sentence text to write
*/
#define ma_message_no_user(level, sentence) \
diff --git a/storage/maria/ma_control_file.c b/storage/maria/ma_control_file.c
index 423497c3aeb..d619a58ff29 100644
--- a/storage/maria/ma_control_file.c
+++ b/storage/maria/ma_control_file.c
@@ -531,7 +531,7 @@ int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg,
"Control file must be from a newer version; zero-ing out %u"
" unknown bytes in control file at offset %u", zeroed,
cf_changeable_size + cf_create_time_size);
- ma_message_no_user(ME_JUST_WARNING, msg);
+ ma_message_no_user(ME_WARNING, msg);
}
else
{
@@ -608,4 +608,124 @@ my_bool ma_control_file_inited(void)
return (control_file_fd >= 0);
}
+/**
+ Print content of aria_log_control file
+*/
+
+my_bool print_aria_log_control()
+{
+ uchar buffer[CF_MAX_SIZE];
+ char name[FN_REFLEN], uuid_str[MY_UUID_STRING_LENGTH+1];
+ const char *errmsg;
+ uint new_cf_create_time_size, new_cf_changeable_size;
+ my_off_t file_size;
+ ulong logno;
+ ulonglong trid,checkpoint_lsn;
+ int open_flags= O_BINARY | /*O_DIRECT |*/ O_RDWR | O_CLOEXEC;
+ int error= CONTROL_FILE_UNKNOWN_ERROR;
+ uint recovery_fails;
+ File file;
+ DBUG_ENTER("ma_control_file_open");
+
+ if (fn_format(name, CONTROL_FILE_BASE_NAME,
+ maria_data_root, "", MYF(MY_WME)) == NullS)
+ DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR);
+
+ if ((file= mysql_file_open(key_file_control, name,
+ open_flags, MYF(MY_WME))) < 0)
+ {
+ errmsg= "Can't open file";
+ goto err;
+ }
+
+ file_size= mysql_file_seek(file, 0, SEEK_END, MYF(MY_WME));
+ if (file_size == MY_FILEPOS_ERROR)
+ {
+ errmsg= "Can't read size";
+ goto err;
+ }
+ if (file_size < CF_MIN_SIZE)
+ {
+ /*
+ Given that normally we write only a sector and it's atomic, the only
+ possibility for a file to be of too short size is if we crashed at the
+ very first startup, between file creation and file write. Quite unlikely
+ (and can be made even more unlikely by doing this: create a temp file,
+ write it, and then rename it to be the control file).
+ What's more likely is if someone forgot to restore the control file,
+ just did a "touch control" to try to get Maria to start, or if the
+ disk/filesystem has a problem.
+ So let's be rigid.
+ */
+ error= CONTROL_FILE_TOO_SMALL;
+ errmsg= "Size of control file is smaller than expected";
+ goto err;
+ }
+
+ /* Check if control file is unexpectedly big */
+ if (file_size > CF_MAX_SIZE)
+ {
+ error= CONTROL_FILE_TOO_BIG;
+ errmsg= "File size bigger than expected";
+ goto err;
+ }
+
+ if (mysql_file_pread(file, buffer, (size_t)file_size, 0, MYF(MY_FNABP)))
+ {
+ errmsg= "Can't read file";
+ goto err;
+ }
+
+ if (memcmp(buffer + CF_MAGIC_STRING_OFFSET,
+ CF_MAGIC_STRING, CF_MAGIC_STRING_SIZE))
+ {
+ error= CONTROL_FILE_BAD_MAGIC_STRING;
+ errmsg= "Missing valid id at start of file. File is not a valid aria control file";
+ goto err;
+ }
+
+ printf("Aria file version: %u\n", buffer[CF_VERSION_OFFSET]);
+
+ new_cf_create_time_size= uint2korr(buffer + CF_CREATE_TIME_SIZE_OFFSET);
+ new_cf_changeable_size= uint2korr(buffer + CF_CHANGEABLE_SIZE_OFFSET);
+
+ if (new_cf_create_time_size < CF_MIN_CREATE_TIME_TOTAL_SIZE ||
+ new_cf_changeable_size < CF_MIN_CHANGEABLE_TOTAL_SIZE ||
+ new_cf_create_time_size + new_cf_changeable_size != file_size)
+ {
+ error= CONTROL_FILE_INCONSISTENT_INFORMATION;
+ errmsg= "Sizes stored in control file are inconsistent";
+ goto err;
+ }
+ checkpoint_lsn= lsn_korr(buffer + new_cf_create_time_size +
+ CF_LSN_OFFSET);
+ logno= uint4korr(buffer + new_cf_create_time_size + CF_FILENO_OFFSET);
+ my_uuid2str(buffer + CF_UUID_OFFSET, uuid_str);
+ uuid_str[MY_UUID_STRING_LENGTH]= 0;
+
+ printf("Block size: %u\n", uint2korr(buffer + CF_BLOCKSIZE_OFFSET));
+ printf("maria_uuid: %s\n", uuid_str);
+ printf("last_checkpoint_lsn: " LSN_FMT "\n", LSN_IN_PARTS(checkpoint_lsn));
+ printf("last_log_number: %lu\n", (ulong) logno);
+ if (new_cf_changeable_size >= (CF_MAX_TRID_OFFSET + CF_MAX_TRID_SIZE))
+ {
+ trid= transid_korr(buffer + new_cf_create_time_size + CF_MAX_TRID_OFFSET);
+ printf("trid: %llu\n", (ulonglong) trid);
+ }
+ if (new_cf_changeable_size >= (CF_RECOV_FAIL_OFFSET + CF_RECOV_FAIL_SIZE))
+ {
+ recovery_fails=
+ (buffer + new_cf_create_time_size + CF_RECOV_FAIL_OFFSET)[0];
+ printf("recovery_failuers: %u\n", recovery_fails);
+ }
+
+ DBUG_RETURN(0);
+
+err:
+ my_printf_error(HA_ERR_INITIALIZATION,
+ "Got error '%s' when trying to use aria control file "
+ "'%s'", 0, errmsg, name);
+ DBUG_RETURN(error);
+}
+
#endif /* EXTRACT_DEFINITIONS */
diff --git a/storage/maria/ma_control_file.h b/storage/maria/ma_control_file.h
index 6bc3faca959..535b0c71e64 100644
--- a/storage/maria/ma_control_file.h
+++ b/storage/maria/ma_control_file.h
@@ -70,5 +70,6 @@ int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg,
uint8 recovery_failures_arg);
int ma_control_file_end(void);
my_bool ma_control_file_inited(void);
+my_bool print_aria_log_control(void);
C_MODE_END
#endif
diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c
index ffc38c8d12f..8ef3249c2e4 100644
--- a/storage/maria/ma_create.c
+++ b/storage/maria/ma_create.c
@@ -64,10 +64,10 @@ int maria_create(const char *name, enum data_file_type datafile_type,
uint uniques, MARIA_UNIQUEDEF *uniquedefs,
MARIA_CREATE_INFO *ci,uint flags)
{
- register uint i,j;
+ uint i,j;
File UNINIT_VAR(dfile), UNINIT_VAR(file);
int errpos,save_errno, create_mode= O_RDWR | O_TRUNC, res;
- myf create_flag;
+ myf create_flag, common_flag= MY_WME, sync_dir= 0;
uint length,max_key_length,packed,pack_bytes,pointer,real_length_diff,
key_length,info_length,key_segs,options,min_key_length,
base_pos,long_varchar_count,
@@ -93,7 +93,6 @@ int maria_create(const char *name, enum data_file_type datafile_type,
MARIA_CREATE_INFO tmp_create_info;
my_bool tmp_table= FALSE; /* cache for presence of HA_OPTION_TMP_TABLE */
my_bool forced_packed;
- myf sync_dir= 0;
uchar *log_data= NULL;
my_bool encrypted= maria_encrypt_tables && datafile_type == BLOCK_RECORD;
my_bool insert_order= MY_TEST(flags & HA_PRESERVE_INSERT_ORDER);
@@ -104,6 +103,9 @@ int maria_create(const char *name, enum data_file_type datafile_type,
DBUG_ASSERT(maria_inited);
+ if (flags & HA_CREATE_TMP_TABLE)
+ common_flag|= MY_THREAD_SPECIFIC;
+
if (!ci)
{
bzero((char*) &tmp_create_info,sizeof(tmp_create_info));
@@ -148,7 +150,7 @@ int maria_create(const char *name, enum data_file_type datafile_type,
(double*) my_malloc((keys + uniques)*HA_MAX_KEY_SEG*sizeof(double) +
(keys + uniques)*HA_MAX_KEY_SEG*sizeof(ulong) +
sizeof(uint16) * columns,
- MYF(MY_WME | MY_ZEROFILL))))
+ MYF(common_flag | MY_ZEROFILL))))
DBUG_RETURN(my_errno);
nulls_per_key_part= (ulong*) (rec_per_key_part +
(keys + uniques) * HA_MAX_KEY_SEG);
@@ -827,6 +829,11 @@ int maria_create(const char *name, enum data_file_type datafile_type,
*/
share.state.skip_redo_lsn= share.state.is_of_horizon=
share.state.create_rename_lsn= LSN_MAX;
+ /*
+ We have to mark the table as not movable as the table will contain the
+ maria_uuid and create_rename_lsn
+ */
+ share.state.changed|= STATE_NOT_MOVABLE;
}
if (datafile_type == DYNAMIC_RECORD)
@@ -919,7 +926,7 @@ int maria_create(const char *name, enum data_file_type datafile_type,
if ((file= mysql_file_create_with_symlink(key_file_kfile, klinkname_ptr,
kfilename, 0, create_mode,
- MYF(MY_WME|create_flag))) < 0)
+ MYF(common_flag|create_flag))) < 0)
goto err;
errpos=1;
@@ -1022,7 +1029,7 @@ int maria_create(const char *name, enum data_file_type datafile_type,
MARIA_COLUMNDEF **col_order, **pos;
if (!(col_order= (MARIA_COLUMNDEF**) my_malloc(share.base.fields *
sizeof(MARIA_COLUMNDEF*),
- MYF(MY_WME))))
+ common_flag)))
goto err;
for (column= columndef, pos= col_order ;
column != end_column ;
@@ -1201,8 +1208,8 @@ int maria_create(const char *name, enum data_file_type datafile_type,
}
if ((dfile=
mysql_file_create_with_symlink(key_file_dfile, dlinkname_ptr,
- dfilename, 0, create_mode,
- MYF(MY_WME | create_flag | sync_dir))) < 0)
+ dfilename, 0, create_mode,
+ MYF(common_flag | create_flag | sync_dir))) < 0)
goto err;
errpos=3;
@@ -1446,6 +1453,7 @@ int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid,
uchar buf[LSN_STORE_SIZE * 3], *ptr;
uchar trid_buff[8];
File file= share->kfile.file;
+ DBUG_ENTER("_ma_update_state_lsns_sub");
DBUG_ASSERT(file >= 0);
if (lsn == LSN_IMPOSSIBLE)
@@ -1464,7 +1472,7 @@ int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid,
0].length,
sizeof(log_array)/sizeof(log_array[0]),
log_array, NULL, NULL)))
- return res;
+ DBUG_RETURN(res);
}
for (ptr= buf; ptr < (buf + sizeof(buf)); ptr+= LSN_STORE_SIZE)
@@ -1497,13 +1505,13 @@ int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid,
}
else
lsn_store(buf, share->state.create_rename_lsn);
- return (my_pwrite(file, buf, sizeof(buf),
- sizeof(share->state.header) +
- MARIA_FILE_CREATE_RENAME_LSN_OFFSET, MYF(MY_NABP)) ||
- my_pwrite(file, trid_buff, sizeof(trid_buff),
- sizeof(share->state.header) +
- MARIA_FILE_CREATE_TRID_OFFSET, MYF(MY_NABP)) ||
- (do_sync && mysql_file_sync(file, MYF(0))));
+ DBUG_RETURN(my_pwrite(file, buf, sizeof(buf),
+ sizeof(share->state.header) +
+ MARIA_FILE_CREATE_RENAME_LSN_OFFSET, MYF(MY_NABP)) ||
+ my_pwrite(file, trid_buff, sizeof(trid_buff),
+ sizeof(share->state.header) +
+ MARIA_FILE_CREATE_TRID_OFFSET, MYF(MY_NABP)) ||
+ (do_sync && mysql_file_sync(file, MYF(0))));
}
#if defined(_MSC_VER) && (_MSC_VER == 1310)
#pragma optimize("",on)
diff --git a/storage/maria/ma_crypt.c b/storage/maria/ma_crypt.c
index 79e41f979ec..33cf72b0b1e 100644
--- a/storage/maria/ma_crypt.c
+++ b/storage/maria/ma_crypt.c
@@ -156,7 +156,7 @@ ma_crypt_read(MARIA_SHARE* share, uchar *buff)
{
my_printf_error(HA_ERR_UNSUPPORTED,
"Unsupported crypt scheme! type: %d iv_length: %d\n",
- MYF(ME_FATALERROR|ME_NOREFRESH),
+ MYF(ME_FATAL|ME_ERROR_LOG),
type, iv_length);
return 0;
}
@@ -268,7 +268,7 @@ static my_bool ma_crypt_data_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
return 1;
}
- if (!share->now_transactional)
+ if (!share->base.born_transactional)
{
/* store a random number instead of LSN (for counter block) */
store_rand_lsn(args->page);
@@ -345,7 +345,14 @@ static my_bool ma_crypt_index_post_read_hook(int res,
const uint block_size= share->block_size;
const uint page_used= _ma_get_page_used(share, args->page);
- if (res == 0 && page_used <= block_size - CRC_SIZE)
+ if (res ||
+ page_used < share->keypage_header ||
+ page_used >= block_size - CRC_SIZE)
+ {
+ res= 1;
+ my_errno= HA_ERR_DECRYPTION_FAILED;
+ }
+ else
{
const uchar *src= args->page;
uchar* dst= args->crypt_buf;
@@ -392,7 +399,7 @@ static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
return 1;
}
- if (!share->now_transactional)
+ if (!share->base.born_transactional)
{
/* store a random number instead of LSN (for counter block) */
store_rand_lsn(args->page);
@@ -464,7 +471,7 @@ static int ma_encrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data,
my_errno= HA_ERR_DECRYPTION_FAILED;
my_printf_error(HA_ERR_DECRYPTION_FAILED,
"Unknown key id %u. Can't continue!",
- MYF(ME_FATALERROR|ME_NOREFRESH),
+ MYF(ME_FATAL|ME_ERROR_LOG),
crypt_data->scheme.key_id);
return 1;
}
@@ -481,7 +488,7 @@ static int ma_encrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data,
my_errno= HA_ERR_DECRYPTION_FAILED;
my_printf_error(HA_ERR_DECRYPTION_FAILED,
"failed to encrypt '%s' rc: %d dstlen: %u size: %u\n",
- MYF(ME_FATALERROR|ME_NOREFRESH),
+ MYF(ME_FATAL|ME_ERROR_LOG),
share->open_file_name.str, rc, dstlen, size);
return 1;
}
@@ -506,10 +513,11 @@ static int ma_decrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data,
if (! (rc == MY_AES_OK && dstlen == size))
{
my_errno= HA_ERR_DECRYPTION_FAILED;
- my_printf_error(HA_ERR_DECRYPTION_FAILED,
- "failed to decrypt '%s' rc: %d dstlen: %u size: %u\n",
- MYF(ME_FATALERROR|ME_NOREFRESH),
- share->open_file_name.str, rc, dstlen, size);
+ if (!share->silence_encryption_errors)
+ my_printf_error(HA_ERR_DECRYPTION_FAILED,
+ "failed to decrypt '%s' rc: %d dstlen: %u size: %u\n",
+ MYF(ME_FATAL|ME_ERROR_LOG),
+ share->open_file_name.str, rc, dstlen, size);
return 1;
}
return 0;
diff --git a/storage/maria/ma_dynrec.c b/storage/maria/ma_dynrec.c
index ae6fc57c114..829e5b5cd02 100644
--- a/storage/maria/ma_dynrec.c
+++ b/storage/maria/ma_dynrec.c
@@ -1477,6 +1477,8 @@ int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf,
File file;
uchar *UNINIT_VAR(to);
uint UNINIT_VAR(left_length);
+ MARIA_SHARE *share= info->s;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("_ma_read_dynamic_record");
if (filepos == HA_OFFSET_ERROR)
@@ -1507,13 +1509,13 @@ int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf,
if (block_of_record++ == 0) /* First block */
{
info->cur_row.total_length= block_info.rec_len;
- if (block_info.rec_len > (uint) info->s->base.max_pack_length)
+ if (block_info.rec_len > (uint) share->base.max_pack_length)
goto panic;
- if (info->s->base.blobs)
+ if (share->base.blobs)
{
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
block_info.rec_len +
- info->s->base.extra_rec_buff_size))
+ share->base.extra_rec_buff_size, flag))
goto err;
}
to= info->rec_buff;
@@ -1549,7 +1551,7 @@ int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf,
there is no equivalent without seeking. We are at the right
position already. :(
*/
- if (info->s->file_read(info, to, block_info.data_len,
+ if (share->file_read(info, to, block_info.data_len,
filepos, MYF(MY_NABP)))
goto panic;
left_length-=block_info.data_len;
@@ -1769,6 +1771,7 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
uchar *UNINIT_VAR(to);
MARIA_BLOCK_INFO block_info;
MARIA_SHARE *share= info->s;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("_ma_read_rnd_dynamic_record");
#ifdef MARIA_EXTERNAL_LOCKING
@@ -1859,7 +1862,7 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
{
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
block_info.rec_len +
- info->s->base.extra_rec_buff_size))
+ share->base.extra_rec_buff_size, flag))
goto err;
}
to= info->rec_buff;
diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c
index 9abcab81107..fe2a4c9b8ac 100644
--- a/storage/maria/ma_extra.c
+++ b/storage/maria/ma_extra.c
@@ -424,7 +424,11 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
error= _ma_flush_table_files(info, MARIA_FLUSH_DATA | MARIA_FLUSH_INDEX,
FLUSH_KEEP, FLUSH_KEEP);
+ mysql_mutex_lock(&share->intern_lock);
+ /* Tell maria_lock_database() that we locked the intern_lock mutex */
+ info->intern_lock_locked= 1;
_ma_decrement_open_count(info, 1);
+ info->intern_lock_locked= 0;
if (share->not_flushed)
{
share->not_flushed= 0;
@@ -437,6 +441,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
_ma_set_fatal_error(share, HA_ERR_CRASHED);
}
}
+ mysql_mutex_unlock(&share->intern_lock);
break;
case HA_EXTRA_NORMAL: /* Theese isn't in use */
info->quick_mode= 0;
@@ -534,6 +539,7 @@ int maria_reset(MARIA_HA *info)
{
int error= 0;
MARIA_SHARE *share= info->s;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("maria_reset");
/*
Free buffers and reset the following flags:
@@ -554,13 +560,13 @@ int maria_reset(MARIA_HA *info)
{
info->rec_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
- share->base.default_rec_buff_size);
+ share->base.default_rec_buff_size, flag);
}
if (info->blob_buff_size > MARIA_SMALL_BLOB_BUFFER)
{
info->blob_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->blob_buff, &info->blob_buff_size,
- MARIA_SMALL_BLOB_BUFFER);
+ MARIA_SMALL_BLOB_BUFFER, flag);
}
}
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
diff --git a/storage/maria/ma_info.c b/storage/maria/ma_info.c
index 01ae4f56efd..6d40f804880 100644
--- a/storage/maria/ma_info.c
+++ b/storage/maria/ma_info.c
@@ -148,6 +148,6 @@ void _ma_report_error(int errcode, const LEX_STRING *name)
}
}
- my_error(errcode, MYF(ME_NOREFRESH), file_name);
+ my_error(errcode, MYF(ME_ERROR_LOG), file_name);
DBUG_VOID_RETURN;
}
diff --git a/storage/maria/ma_init.c b/storage/maria/ma_init.c
index e3d55cdb1ec..12d39db806a 100644
--- a/storage/maria/ma_init.c
+++ b/storage/maria/ma_init.c
@@ -148,7 +148,7 @@ my_bool maria_upgrade()
my_message(HA_ERR_INITIALIZATION,
"Found old style Maria log files; "
"Converting them to Aria names",
- MYF(ME_JUST_INFO));
+ MYF(ME_NOTE));
for (i= 0; i < dir->number_of_files; i++)
{
diff --git a/storage/maria/ma_key.c b/storage/maria/ma_key.c
index 9e804a1e9dc..5061f3d0143 100644
--- a/storage/maria/ma_key.c
+++ b/storage/maria/ma_key.c
@@ -666,20 +666,20 @@ int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
will look for column values there)
RETURN
- ICP_ERROR Error ; my_errno set to HA_ERR_CRASHED
- ICP_NO_MATCH Index condition is not satisfied, continue scanning
- ICP_MATCH Index condition is satisfied
- ICP_OUT_OF_RANGE Index condition is not satisfied, end the scan.
+ CHECK_ERROR Error ; my_errno set to HA_ERR_CRASHED
+ CHECK_NEG Index condition is not satisfied, continue scanning
+ CHECK_POS Index condition is satisfied
+ CHECK_OUT_OF_RANGE Index condition is not satisfied, end the scan.
my_errno set to HA_ERR_END_OF_FILE
- info->cur_row.lastpos is set to HA_OFFSET_ERROR in case of ICP_ERROR or
- ICP_OUT_OF_RANGE to indicate that we don't have any active row.
+ info->cur_row.lastpos is set to HA_OFFSET_ERROR in case of CHECK_ERROR or
+ CHECK_OUT_OF_RANGE to indicate that we don't have any active row.
*/
-ICP_RESULT ma_check_index_cond(register MARIA_HA *info, uint keynr,
- uchar *record)
+check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr,
+ uchar *record)
{
- ICP_RESULT res= ICP_MATCH;
+ check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (_ma_put_key_in_record(info, keynr, FALSE, record))
@@ -688,10 +688,10 @@ ICP_RESULT ma_check_index_cond(register MARIA_HA *info, uint keynr,
maria_print_error(info->s, HA_ERR_CRASHED);
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
- res= ICP_ERROR;
+ res= CHECK_ERROR;
}
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
- ICP_OUT_OF_RANGE)
+ CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
diff --git a/storage/maria/ma_key_recover.c b/storage/maria/ma_key_recover.c
index afa69fce444..2f28ec8d175 100644
--- a/storage/maria/ma_key_recover.c
+++ b/storage/maria/ma_key_recover.c
@@ -767,7 +767,8 @@ uint _ma_apply_redo_index_new_page(MARIA_HA *info, LSN lsn,
&page_link.link)))
{
if (my_errno != HA_ERR_FILE_TOO_SHORT &&
- my_errno != HA_ERR_WRONG_CRC)
+ my_errno != HA_ERR_WRONG_CRC &&
+ my_errno != HA_ERR_DECRYPTION_FAILED)
{
result= 1;
goto err;
diff --git a/storage/maria/ma_locking.c b/storage/maria/ma_locking.c
index a8cf936c873..200a728626f 100644
--- a/storage/maria/ma_locking.c
+++ b/storage/maria/ma_locking.c
@@ -47,7 +47,8 @@ int maria_lock_database(MARIA_HA *info, int lock_type)
}
error=0;
- mysql_mutex_lock(&share->intern_lock);
+ if (!info->intern_lock_locked)
+ mysql_mutex_lock(&share->intern_lock);
if (share->kfile.file >= 0) /* May only be false on windows */
{
switch (lock_type) {
@@ -234,7 +235,8 @@ int maria_lock_database(MARIA_HA *info, int lock_type)
}
}
#endif
- mysql_mutex_unlock(&share->intern_lock);
+ if (!info->intern_lock_locked)
+ mysql_mutex_unlock(&share->intern_lock);
DBUG_RETURN(error);
} /* maria_lock_database */
@@ -454,7 +456,7 @@ int _ma_mark_file_changed_now(register MARIA_SHARE *share)
}
/* Set uuid of file if not yet set (zerofilled file) */
if (share->base.born_transactional &&
- !(share->state.changed & STATE_NOT_MOVABLE))
+ !(share->state.org_changed & STATE_NOT_MOVABLE))
{
/* Lock table to current installation */
if (_ma_set_uuid(share, 0) ||
@@ -464,6 +466,7 @@ int _ma_mark_file_changed_now(register MARIA_SHARE *share)
TRUE, TRUE)))
goto err;
share->state.changed|= STATE_NOT_MOVABLE;
+ share->state.org_changed|= STATE_NOT_MOVABLE;
}
}
error= 0;
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index 7e4fb5a8263..e2d8114c712 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -60,6 +60,8 @@ static mysql_cond_t COND_soft_sync;
static MA_SERVICE_THREAD_CONTROL soft_sync_control=
{0, FALSE, FALSE, &LOCK_soft_sync, &COND_soft_sync};
+uint log_purge_disabled= 0;
+
/* transaction log file descriptor */
typedef struct st_translog_file
@@ -468,7 +470,6 @@ static ulonglong flush_start= 0;
#define TRANSLOG_CLSN_LEN_BITS 0xC0 /* Mask to get compressed LSN length */
-#include <my_atomic.h>
/* an array that maps id of a MARIA_SHARE to this MARIA_SHARE */
static MARIA_SHARE **id_to_share= NULL;
@@ -3624,6 +3625,7 @@ my_bool translog_init_with_table(const char *directory,
translog_syncs= 0;
flush_start= 0;
id_to_share= NULL;
+ log_purge_disabled= 0;
log_descriptor.directory_fd= -1;
log_descriptor.is_everything_flushed= 1;
@@ -8699,7 +8701,7 @@ my_bool translog_purge(TRANSLOG_ADDRESS low)
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
translog_close_log_file(file);
}
- if (log_purge_type == TRANSLOG_PURGE_IMMIDIATE)
+ if (log_purge_type == TRANSLOG_PURGE_IMMIDIATE && ! log_purge_disabled)
{
char path[FN_REFLEN], *file_name;
file_name= translog_filename_by_fileno(i, path);
@@ -8752,7 +8754,7 @@ my_bool translog_purge_at_flush()
mysql_mutex_lock(&log_descriptor.purger_lock);
- if (unlikely(log_descriptor.min_need_file == 0))
+ if (unlikely(log_descriptor.min_need_file == 0 || log_purge_disabled))
{
DBUG_PRINT("info", ("No info about min need file => exit"));
mysql_mutex_unlock(&log_descriptor.purger_lock);
@@ -8926,20 +8928,23 @@ void translog_hard_group_commit(my_bool mode)
void translog_sync()
{
- uint32 max= get_current_logfile()->number;
- uint32 min;
DBUG_ENTER("ma_translog_sync");
- min= soft_sync_min;
- if (!min)
- min= max;
+ /* The following is only true if initalization of translog succeded */
+ if (log_descriptor.open_files.elements != 0)
+ {
+ uint32 max= get_current_logfile()->number;
+ uint32 min;
- translog_sync_files(min, max, sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS);
+ min= soft_sync_min;
+ if (!min)
+ min= max;
+ translog_sync_files(min, max, sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS);
+ }
DBUG_VOID_RETURN;
}
-
/**
@brief set rate for group commit
@@ -9316,3 +9321,22 @@ void dump_page(uchar *buffer, File handler)
}
dump_datapage(buffer, handler);
}
+
+
+/*
+ Handle backup calls
+*/
+
+void translog_disable_purge()
+{
+ mysql_mutex_lock(&log_descriptor.purger_lock);
+ log_purge_disabled++;
+ mysql_mutex_unlock(&log_descriptor.purger_lock);
+}
+
+void translog_enable_purge()
+{
+ mysql_mutex_lock(&log_descriptor.purger_lock);
+ log_purge_disabled--;
+ mysql_mutex_unlock(&log_descriptor.purger_lock);
+}
diff --git a/storage/maria/ma_loghandler.h b/storage/maria/ma_loghandler.h
index b236fdc7ebe..3e5c58a8053 100644
--- a/storage/maria/ma_loghandler.h
+++ b/storage/maria/ma_loghandler.h
@@ -367,6 +367,8 @@ extern void dump_page(uchar *buffer, File handler);
extern my_bool translog_log_debug_info(TRN *trn,
enum translog_debug_info_type type,
uchar *info, size_t length);
+extern void translog_disable_purge(void);
+extern void translog_enable_purge(void);
enum enum_translog_status
{
@@ -522,6 +524,7 @@ typedef enum
} enum_maria_translog_purge_type;
extern ulong log_purge_type;
extern ulong log_file_size;
+extern uint log_purge_disabled; /* For backup */
typedef enum
{
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c
index 3fa0e4293a6..06183c72895 100644
--- a/storage/maria/ma_open.c
+++ b/storage/maria/ma_open.c
@@ -39,7 +39,7 @@ static void maria_scan_end_dummy(MARIA_HA *info);
static my_bool maria_once_init_dummy(MARIA_SHARE *, File);
static my_bool maria_once_end_dummy(MARIA_SHARE *);
static uchar *_ma_base_info_read(uchar *ptr, MARIA_BASE_INFO *base);
-static uchar *_ma_state_info_read(uchar *ptr, MARIA_STATE_INFO *state);
+static uchar *_ma_state_info_read(uchar *, MARIA_STATE_INFO *, myf);
#define get_next_element(to,pos,size) { memcpy((char*) to,pos,(size_t) size); \
pos+=size;}
@@ -98,6 +98,7 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share,
uint errpos;
MARIA_HA info,*m_info;
my_bitmap_map *changed_fields_bitmap;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("maria_clone_internal");
errpos= 0;
@@ -115,7 +116,7 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share,
errpos= 5;
/* alloc and set up private structure parts */
- if (!my_multi_malloc(MY_WME,
+ if (!my_multi_malloc(flag,
&m_info,sizeof(MARIA_HA),
&info.blobs,sizeof(MARIA_BLOB)*share->base.blobs,
&info.buff,(share->base.max_key_block_length*2+
@@ -163,10 +164,9 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share,
goto err;
/* The following should be big enough for all pinning purposes */
- if (my_init_dynamic_array(&info.pinned_pages,
- sizeof(MARIA_PINNED_PAGE),
+ if (my_init_dynamic_array(&info.pinned_pages, sizeof(MARIA_PINNED_PAGE),
MY_MAX(share->base.blobs*2 + 4,
- MARIA_MAX_TREE_LEVELS*3), 16, MYF(0)))
+ MARIA_MAX_TREE_LEVELS*3), 16, flag))
goto err;
@@ -202,7 +202,7 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share,
/* Allocate buffer for one record */
/* prerequisites: info->rec_buffer == 0 && info->rec_buff_size == 0 */
if (_ma_alloc_buffer(&info.rec_buff, &info.rec_buff_size,
- share->base.default_rec_buff_size))
+ share->base.default_rec_buff_size, flag))
goto err;
bzero(info.rec_buff, share->base.default_rec_buff_size);
@@ -265,6 +265,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
uint i,j,len,errpos,head_length,base_pos,keys, realpath_err,
key_parts,base_key_parts,unique_key_parts,fulltext_keys,uniques;
uint internal_table= MY_TEST(open_flags & HA_OPEN_INTERNAL_TABLE);
+ myf common_flag= open_flags & HA_OPEN_TMP_TABLE ? MY_THREAD_SPECIFIC : 0;
uint file_version;
size_t info_length;
char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN],
@@ -322,13 +323,13 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
DEBUG_SYNC_C("mi_open_kfile");
if ((kfile=mysql_file_open(key_file_kfile, name_buff,
(open_mode=O_RDWR) | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
- MYF(MY_NOSYMLINKS))) < 0)
+ MYF(common_flag | MY_NOSYMLINKS))) < 0)
{
if ((errno != EROFS && errno != EACCES) ||
mode != O_RDONLY ||
(kfile=mysql_file_open(key_file_kfile, name_buff,
(open_mode=O_RDONLY) | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
- MYF(MY_NOSYMLINKS))) < 0)
+ MYF(common_flag | MY_NOSYMLINKS))) < 0)
goto err;
}
share->mode=open_mode;
@@ -393,7 +394,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
Allocate space for header information and for data that is too
big to keep on stack
*/
- if (!(disk_cache= my_malloc(info_length+128, MYF(MY_WME))))
+ if (!(disk_cache= my_malloc(info_length+128, MYF(MY_WME | common_flag))))
{
my_errno=ENOMEM;
goto err;
@@ -420,7 +421,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
}
share->state_diff_length=len-MARIA_STATE_INFO_SIZE;
- if (!_ma_state_info_read(disk_cache, &share->state))
+ if (!_ma_state_info_read(disk_cache, &share->state, common_flag))
goto err;
len= mi_uint2korr(share->state.header.base_info_length);
if (len != MARIA_BASE_INFO_SIZE)
@@ -440,6 +441,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
share->state.state_length=base_pos;
/* For newly opened tables we reset the error-has-been-printed flag */
share->state.changed&= ~STATE_CRASHED_PRINTED;
+ share->state.org_changed= share->state.changed;
if (!(open_flags & HA_OPEN_FOR_REPAIR) &&
((share->state.changed & STATE_CRASHED_FLAGS) ||
@@ -460,13 +462,13 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
/*
A transactional table is not usable on this system if:
- share->state.create_trid > trnman_get_max_trid()
- - Critical as trid as stored releativel to create_trid.
+ - Critical as trid as stored releative to create_trid.
- uuid is different
STATE_NOT_MOVABLE is reset when a table is zerofilled
(has no LSN's and no trids)
- We can ignore testing uuid if STATE_NOT_MOVABLE is set, as in this
+ We can ignore testing uuid if STATE_NOT_MOVABLE is not set, as in this
case the uuid will be set in _ma_mark_file_changed().
*/
if (share->base.born_transactional &&
@@ -560,12 +562,10 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
share->index_file_name.length= strlen(index_name);
share->data_file_name.length= strlen(data_name);
share->open_file_name.length= strlen(name);
- if (!my_multi_malloc(MY_WME,
+ if (!my_multi_malloc(MYF(MY_WME | common_flag),
&share,sizeof(*share),
- &rec_per_key_part,
- sizeof(double) * key_parts,
- &nulls_per_key_part,
- sizeof(long)* key_parts,
+ &rec_per_key_part, sizeof(double) * key_parts,
+ &nulls_per_key_part, sizeof(long)* key_parts,
&share->keyinfo,keys*sizeof(MARIA_KEYDEF),
&share->uniqueinfo,uniques*sizeof(MARIA_UNIQUEDEF),
&share->keyparts,
@@ -787,17 +787,27 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
share->state.is_of_horizon) > 0) ||
!LSN_VALID(share->state.skip_redo_lsn) ||
(cmp_translog_addr(share->state.create_rename_lsn,
- share->state.skip_redo_lsn) > 0)) &&
- !(open_flags & HA_OPEN_FOR_REPAIR))
+ share->state.skip_redo_lsn) > 0)))
{
- /*
- If in Recovery, it will not work. If LSN is invalid and not
- LSN_NEEDS_NEW_STATE_LSNS, header must be corrupted.
- In both cases, must repair.
- */
- my_errno=((share->state.changed & STATE_CRASHED_ON_REPAIR) ?
- HA_ERR_CRASHED_ON_REPAIR : HA_ERR_CRASHED_ON_USAGE);
- goto err;
+ if (!(open_flags & HA_OPEN_FOR_REPAIR))
+ {
+ /*
+ If in Recovery, it will not work. If LSN is invalid and not
+ LSN_NEEDS_NEW_STATE_LSNS, header must be corrupted.
+ In both cases, must repair.
+ */
+ my_errno=((share->state.changed & STATE_CRASHED_ON_REPAIR) ?
+ HA_ERR_CRASHED_ON_REPAIR : HA_ERR_CRASHED_ON_USAGE);
+ goto err;
+ }
+ else
+ {
+ /*
+ Open in repair mode. Ensure that we mark the table crashed, so
+ that we run auto_repair on it
+ */
+ maria_mark_crashed_share(share);
+ }
}
else if (!(open_flags & HA_OPEN_FOR_REPAIR))
{
@@ -872,9 +882,9 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
share->options|= HA_OPTION_READ_ONLY_DATA;
share->is_log_table= FALSE;
- if (open_flags & HA_OPEN_TMP_TABLE ||
- (share->options & HA_OPTION_TMP_TABLE))
+ if (open_flags & HA_OPEN_TMP_TABLE || share->options & HA_OPTION_TMP_TABLE)
{
+ common_flag|= MY_THREAD_SPECIFIC;
share->options|= HA_OPTION_TMP_TABLE;
share->temporary= share->delay_key_write= 1;
share->write_flag=MYF(MY_NABP);
@@ -1102,13 +1112,13 @@ err:
*/
my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size,
- size_t new_size)
+ size_t new_size, myf flag)
{
if (*old_size < new_size)
{
uchar *addr;
if (!(addr= (uchar*) my_realloc(*old_addr, new_size,
- MYF(MY_ALLOW_ZERO_PTR))))
+ MYF(MY_ALLOW_ZERO_PTR | flag))))
return 1;
*old_addr= addr;
*old_size= new_size;
@@ -1487,7 +1497,7 @@ uint _ma_state_info_write_sub(File file, MARIA_STATE_INFO *state, uint pWrite)
}
-static uchar *_ma_state_info_read(uchar *ptr, MARIA_STATE_INFO *state)
+static uchar *_ma_state_info_read(uchar *ptr, MARIA_STATE_INFO *state, myf flag)
{
uint i,keys,key_parts;
DBUG_ENTER("_ma_state_info_read");
@@ -1499,7 +1509,7 @@ static uchar *_ma_state_info_read(uchar *ptr, MARIA_STATE_INFO *state)
/* Allocate memory for key parts if not already done */
if (!state->rec_per_key_part &&
- !my_multi_malloc(MY_WME,
+ !my_multi_malloc(MYF(MY_WME | flag),
&state->rec_per_key_part,
sizeof(*state->rec_per_key_part) * key_parts,
&state->nulls_per_key_part,
@@ -1944,6 +1954,8 @@ void _ma_set_index_pagecache_callbacks(PAGECACHE_FILE *file,
int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share)
{
myf flags= MY_WME | (share->mode & O_NOFOLLOW ? MY_NOSYMLINKS : 0);
+ if (share->temporary)
+ flags|= MY_THREAD_SPECIFIC;
DEBUG_SYNC_C("mi_open_datafile");
info->dfile.file= share->bitmap.file.file=
mysql_file_open(key_file_dfile, share->data_file_name.str,
diff --git a/storage/maria/ma_packrec.c b/storage/maria/ma_packrec.c
index e42e9300d14..d1c30a57146 100644
--- a/storage/maria/ma_packrec.c
+++ b/storage/maria/ma_packrec.c
@@ -1413,10 +1413,12 @@ uint _ma_pack_get_block_info(MARIA_HA *maria, MARIA_BIT_BUFF *bit_buff,
{
uchar *header= info->header;
uint head_length,UNINIT_VAR(ref_length);
+ MARIA_SHARE *share= maria->s;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
if (file >= 0)
{
- ref_length=maria->s->pack.ref_length;
+ ref_length=share->pack.ref_length;
/*
We can't use my_pread() here because _ma_read_rnd_pack_record assumes
position is ok
@@ -1426,11 +1428,11 @@ uint _ma_pack_get_block_info(MARIA_HA *maria, MARIA_BIT_BUFF *bit_buff,
return BLOCK_FATAL_ERROR;
DBUG_DUMP("header", header, ref_length);
}
- head_length= read_pack_length((uint) maria->s->pack.version, header,
+ head_length= read_pack_length((uint) share->pack.version, header,
&info->rec_len);
- if (maria->s->base.blobs)
+ if (share->base.blobs)
{
- head_length+= read_pack_length((uint) maria->s->pack.version,
+ head_length+= read_pack_length((uint) share->pack.version,
header + head_length, &info->blob_len);
/*
Ensure that the record buffer is big enough for the compressed
@@ -1439,7 +1441,7 @@ uint _ma_pack_get_block_info(MARIA_HA *maria, MARIA_BIT_BUFF *bit_buff,
*/
if (_ma_alloc_buffer(rec_buff_p, rec_buff_size_p,
info->rec_len + info->blob_len +
- maria->s->base.extra_rec_buff_size))
+ share->base.extra_rec_buff_size, flag))
return BLOCK_FATAL_ERROR; /* not enough memory */
bit_buff->blob_pos= *rec_buff_p + info->rec_len;
bit_buff->blob_end= bit_buff->blob_pos + info->blob_len;
@@ -1580,15 +1582,18 @@ _ma_mempack_get_block_info(MARIA_HA *maria,
size_t *rec_buff_size_p,
uchar *header)
{
- header+= read_pack_length((uint) maria->s->pack.version, header,
+ MARIA_SHARE *share= maria->s;
+ myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
+
+ header+= read_pack_length((uint) share->pack.version, header,
&info->rec_len);
- if (maria->s->base.blobs)
+ if (share->base.blobs)
{
- header+= read_pack_length((uint) maria->s->pack.version, header,
+ header+= read_pack_length((uint) share->pack.version, header,
&info->blob_len);
/* _ma_alloc_rec_buff sets my_errno on error */
if (_ma_alloc_buffer(rec_buff_p, rec_buff_size_p,
- info->blob_len + maria->s->base.extra_rec_buff_size))
+ info->blob_len + share->base.extra_rec_buff_size, flag))
return 0; /* not enough memory */
bit_buff->blob_pos= *rec_buff_p;
bit_buff->blob_end= *rec_buff_p + info->blob_len;
diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c
index f486d8c704f..e411cfbd54c 100644
--- a/storage/maria/ma_pagecache.c
+++ b/storage/maria/ma_pagecache.c
@@ -152,7 +152,7 @@ struct st_pagecache_hash_link
/* simple states of a block */
#define PCBLOCK_ERROR 1 /* an error occurred when performing disk i/o */
-#define PCBLOCK_READ 2 /* the is page in the block buffer */
+#define PCBLOCK_READ 2 /* there is an active page in the block buffer */
/*
A tread is reading the data to the page.
@@ -3431,6 +3431,7 @@ restart:
*/
if (reg_request)
unreg_request(pagecache, block, 1);
+ dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_PRINT("info", ("restarting..."));
goto restart;
@@ -3707,6 +3708,7 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
DBUG_ASSERT((block->status &
(PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0);
+ /* This lock is deleted in pagecache_delete_internal() called below */
inc_counter_for_resize_op(pagecache);
/*
make_lock_and_pin() can't fail here, because we are keeping pin on the
@@ -3851,6 +3853,7 @@ restart:
*/
if (pin == PAGECACHE_PIN)
unreg_request(pagecache, block, 1);
+ dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_PRINT("info", ("restarting..."));
goto restart;
diff --git a/storage/maria/ma_pagecrc.c b/storage/maria/ma_pagecrc.c
index c0d535d2e9d..8da6369011c 100644
--- a/storage/maria/ma_pagecrc.c
+++ b/storage/maria/ma_pagecrc.c
@@ -54,11 +54,11 @@ static uint32 maria_page_crc(uint32 start, uchar *data, uint length)
@retval 1 Error
*/
-static my_bool maria_page_crc_check(uchar *page,
- pgcache_page_no_t page_no,
- MARIA_SHARE *share,
- uint32 no_crc_val,
- int data_length)
+my_bool maria_page_crc_check(uchar *page,
+ pgcache_page_no_t page_no,
+ MARIA_SHARE *share,
+ uint32 no_crc_val,
+ int data_length)
{
uint32 crc= uint4korr(page + share->block_size - CRC_SIZE), new_crc;
my_bool res;
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c
index 6cc5b423720..be8a9fe8b2a 100644
--- a/storage/maria/ma_recovery.c
+++ b/storage/maria/ma_recovery.c
@@ -183,7 +183,7 @@ void maria_recover_error_handler_hook(uint error, const char *str,
static void print_preamble()
{
- ma_message_no_user(ME_JUST_INFO, "starting recovery");
+ ma_message_no_user(ME_NOTE, "starting recovery");
}
@@ -523,7 +523,7 @@ end:
}
if (!error)
{
- ma_message_no_user(ME_JUST_INFO, "recovery done");
+ ma_message_no_user(ME_NOTE, "recovery done");
maria_recovery_changed_data= 1;
}
}
@@ -1381,6 +1381,7 @@ static int new_table(uint16 sid, const char *name, LSN lsn_of_file_id)
silently pass in the "info == NULL" test below.
*/
tprint(tracef, ", record is corrupted");
+ eprint(tracef, "\n***WARNING: %s may be corrupted", name ? name : "NULL");
info= NULL;
recovery_warnings++;
goto end;
@@ -1393,7 +1394,11 @@ static int new_table(uint16 sid, const char *name, LSN lsn_of_file_id)
" or its header is so corrupted that we cannot open it;"
" we skip it");
if (my_errno != ENOENT)
+ {
recovery_found_crashed_tables++;
+ eprint(tracef, "\n***WARNING: %s could not be opened: Error: %d",
+ name ? name : "NULL", (int) my_errno);
+ }
error= 0;
goto end;
}
@@ -1422,6 +1427,7 @@ static int new_table(uint16 sid, const char *name, LSN lsn_of_file_id)
not transactional table
*/
tprint(tracef, ", is not transactional. Ignoring open request");
+ eprint(tracef, "\n***WARNING: '%s' may be crashed", name);
error= -1;
recovery_warnings++;
goto end;
@@ -1469,6 +1475,8 @@ static int new_table(uint16 sid, const char *name, LSN lsn_of_file_id)
(kfile_len == MY_FILEPOS_ERROR))
{
tprint(tracef, ", length unknown\n");
+ eprint(tracef, "\n***WARNING: Can't read length of file '%s'",
+ share->open_file_name.str);
recovery_warnings++;
goto end;
}
@@ -3599,7 +3607,12 @@ void _ma_tmp_disable_logging_for_table(MARIA_HA *info,
should be now. info->trn may be NULL in maria_chk.
*/
if (info->trn == NULL)
+ {
info->trn= &dummy_transaction_object;
+ info->trn_next= 0;
+ info->trn_prev= 0;
+ }
+
DBUG_ASSERT(info->trn->rec_lsn == LSN_IMPOSSIBLE);
share->page_type= PAGECACHE_PLAIN_PAGE;
/* Functions below will pick up now_transactional and change callbacks */
diff --git a/storage/maria/ma_rkey.c b/storage/maria/ma_rkey.c
index d19caaf6137..b48b0fc0c6b 100644
--- a/storage/maria/ma_rkey.c
+++ b/storage/maria/ma_rkey.c
@@ -34,7 +34,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data,
HA_KEYSEG *last_used_keyseg;
uint32 nextflag;
MARIA_KEY key;
- ICP_RESULT icp_res= ICP_MATCH;
+ check_result_t check= CHECK_POS;
DBUG_ENTER("maria_rkey");
DBUG_PRINT("enter", ("base:%p buf:%p inx: %d search_flag: %d",
info, buf, inx, search_flag));
@@ -115,7 +115,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data,
not satisfied with an out-of-range condition.
*/
if ((*share->row_is_visible)(info) &&
- ((icp_res= ma_check_index_cond(info, inx, buf)) != ICP_NO_MATCH))
+ ((check= ma_check_index_cond(info, inx, buf)) != CHECK_NEG))
break;
/* The key references a concurrently inserted record. */
@@ -174,7 +174,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data,
}
} while (!(*share->row_is_visible)(info) ||
- ((icp_res= ma_check_index_cond(info, inx, buf)) == 0));
+ ((check= ma_check_index_cond(info, inx, buf)) == 0));
}
else
{
@@ -186,7 +186,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data,
if (info->cur_row.lastpos == HA_OFFSET_ERROR)
{
- if (icp_res == ICP_OUT_OF_RANGE)
+ if (check == CHECK_OUT_OF_RANGE)
{
/* We don't want HA_ERR_END_OF_FILE in this particular case */
my_errno= HA_ERR_KEY_NOT_FOUND;
diff --git a/storage/maria/ma_rnext.c b/storage/maria/ma_rnext.c
index 5ea90a242fc..6fd6f89139f 100644
--- a/storage/maria/ma_rnext.c
+++ b/storage/maria/ma_rnext.c
@@ -30,7 +30,7 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx)
uint flag;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo;
- ICP_RESULT icp_res= ICP_MATCH;
+ check_result_t check= CHECK_POS;
uint update_mask= HA_STATE_NEXT_FOUND;
DBUG_ENTER("maria_rnext");
@@ -107,7 +107,7 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx)
if (!error)
{
while (!(*share->row_is_visible)(info) ||
- ((icp_res= ma_check_index_cond(info, inx, buf)) == ICP_NO_MATCH))
+ ((check= ma_check_index_cond(info, inx, buf)) == CHECK_NEG))
{
/*
If we are at the last key on the key page, allow writers to
@@ -135,7 +135,7 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx)
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->update|= update_mask;
- if (error || icp_res != ICP_MATCH)
+ if (error || check != CHECK_POS)
{
fast_ma_writeinfo(info);
if (my_errno == HA_ERR_KEY_NOT_FOUND)
diff --git a/storage/maria/ma_rnext_same.c b/storage/maria/ma_rnext_same.c
index b07967ca9e9..19a950d31bb 100644
--- a/storage/maria/ma_rnext_same.c
+++ b/storage/maria/ma_rnext_same.c
@@ -30,7 +30,7 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf)
int error;
uint inx,not_used[2];
MARIA_KEYDEF *keyinfo;
- ICP_RESULT icp_res= ICP_MATCH;
+ check_result_t check= CHECK_POS;
DBUG_ENTER("maria_rnext_same");
if ((int) (inx= info->lastinx) < 0 ||
@@ -92,7 +92,7 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf)
}
/* Skip rows that are inserted by other threads since we got a lock */
if ((info->s->row_is_visible)(info) &&
- ((icp_res= ma_check_index_cond(info, inx, buf)) != ICP_NO_MATCH))
+ ((check= ma_check_index_cond(info, inx, buf)) != CHECK_NEG))
break;
}
}
@@ -102,7 +102,7 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf)
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->update|= HA_STATE_NEXT_FOUND | HA_STATE_RNEXT_SAME;
- if (error || icp_res != ICP_MATCH)
+ if (error || check != CHECK_POS)
{
fast_ma_writeinfo(info);
if (my_errno == HA_ERR_KEY_NOT_FOUND)
diff --git a/storage/maria/ma_rprev.c b/storage/maria/ma_rprev.c
index eebc8cba0c7..15010d962bb 100644
--- a/storage/maria/ma_rprev.c
+++ b/storage/maria/ma_rprev.c
@@ -28,7 +28,7 @@ int maria_rprev(MARIA_HA *info, uchar *buf, int inx)
register uint flag;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo;
- ICP_RESULT icp_res= ICP_MATCH;
+ check_result_t check= CHECK_POS;
DBUG_ENTER("maria_rprev");
if ((inx = _ma_check_index(info,inx)) < 0)
@@ -58,7 +58,7 @@ int maria_rprev(MARIA_HA *info, uchar *buf, int inx)
{
my_off_t cur_keypage= info->last_keypage;
while (!(*share->row_is_visible)(info) ||
- ((icp_res= ma_check_index_cond(info, inx, buf)) == ICP_NO_MATCH))
+ ((check= ma_check_index_cond(info, inx, buf)) == CHECK_NEG))
{
/*
If we are at the last (i.e. first?) key on the key page,
@@ -86,7 +86,7 @@ int maria_rprev(MARIA_HA *info, uchar *buf, int inx)
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->update|= HA_STATE_PREV_FOUND;
- if (error || icp_res != ICP_MATCH)
+ if (error || check != CHECK_POS)
{
fast_ma_writeinfo(info);
if (my_errno == HA_ERR_KEY_NOT_FOUND)
diff --git a/storage/maria/ma_sort.c b/storage/maria/ma_sort.c
index e68d099576d..4dc6472bd15 100644
--- a/storage/maria/ma_sort.c
+++ b/storage/maria/ma_sort.c
@@ -30,13 +30,11 @@
/* static variables */
#undef MIN_SORT_MEMORY
-#undef MYF_RW
#undef DISK_BUFFER_SIZE
#define MERGEBUFF 15
#define MERGEBUFF2 31
#define MIN_SORT_MEMORY (4096-MALLOC_OVERHEAD)
-#define MYF_RW MYF(MY_NABP | MY_WME | MY_WAIT_IF_FULL)
#define DISK_BUFFER_SIZE (IO_SIZE*128)
/* How many keys we can keep in memory */
diff --git a/storage/maria/ma_state.c b/storage/maria/ma_state.c
index 2514e74ec34..2eff64ec7cd 100644
--- a/storage/maria/ma_state.c
+++ b/storage/maria/ma_state.c
@@ -30,6 +30,7 @@
#include "maria_def.h"
#include "trnman.h"
+#include "ma_trnman.h"
#include "ma_blockrec.h"
/**
@@ -571,8 +572,6 @@ void _ma_remove_table_from_trnman(MARIA_HA *info)
MARIA_SHARE *share= info->s;
TRN *trn= info->trn;
MARIA_USED_TABLES *tables, **prev;
- MARIA_HA *handler, **prev_file;
- uint unlinked= 0;
DBUG_ENTER("_ma_remove_table_from_trnman");
DBUG_PRINT("enter", ("trn: %p used_tables: %p share: %p in_trans: %d",
trn, trn->used_tables, share, share->in_trans));
@@ -604,29 +603,9 @@ void _ma_remove_table_from_trnman(MARIA_HA *info)
DBUG_PRINT("warning", ("share: %p where not in used_tables_list", share));
}
- /* unlink all instances of the table from used_instances */
- prev_file= (MARIA_HA**) &trn->used_instances;
- while ((handler= *prev_file))
- {
- if (handler->s == share)
- {
- unlinked++;
- *prev_file= handler->trn_next; /* Remove instance */
- }
- else
- prev_file= &handler->trn_next; /* Continue with next instance */
- }
+ /* Reset trn and remove table from used_instances */
+ _ma_reset_trn_for_table(info);
- DBUG_PRINT("note", ("unlinked tables: %u", unlinked));
- if (!unlinked)
- {
- /*
- This can only happens in case of rename of intermediate table as
- part of alter table
- */
- DBUG_PRINT("warning", ("table: %p where not in used_instances", info));
- }
- info->trn= 0; /* Not part of trans anymore */
DBUG_VOID_RETURN;
}
diff --git a/storage/maria/ma_test2.c b/storage/maria/ma_test2.c
index c7143d141b8..6a25ac8a363 100644
--- a/storage/maria/ma_test2.c
+++ b/storage/maria/ma_test2.c
@@ -1086,6 +1086,11 @@ static void get_options(int argc, char **argv)
fprintf(stderr,"record count must be >= 10 (if testflag > 2)\n");
exit(1);
}
+ if (recant <= 1)
+ {
+ fprintf(stderr,"record count must be >= 2\n");
+ exit(1);
+ }
break;
case 'e': /* maria_block_length */
case 'E':
diff --git a/storage/maria/ma_trnman.h b/storage/maria/ma_trnman.h
index 06e6a88304f..87e34e9da0b 100644
--- a/storage/maria/ma_trnman.h
+++ b/storage/maria/ma_trnman.h
@@ -18,7 +18,7 @@
/**
Sets table's trn and prints debug information
- Links table into used_instances if new_trn is not 0
+ Links table into new_trn->used_instances
@param tbl MARIA_HA of table
@param newtrn what to put into tbl->trn
@@ -34,7 +34,10 @@ static inline void _ma_set_trn_for_table(MARIA_HA *tbl, TRN *newtrn)
tbl->trn= newtrn;
/* Link into used list */
+ if (newtrn->used_instances)
+ ((MARIA_HA*) newtrn->used_instances)->trn_prev= &tbl->trn_next;
tbl->trn_next= (MARIA_HA*) newtrn->used_instances;
+ tbl->trn_prev= (MARIA_HA**) &newtrn->used_instances;
newtrn->used_instances= tbl;
}
@@ -49,6 +52,8 @@ static inline void _ma_set_tmp_trn_for_table(MARIA_HA *tbl, TRN *newtrn)
DBUG_PRINT("info",("table: %p trn: %p -> %p",
tbl, tbl->trn, newtrn));
tbl->trn= newtrn;
+ tbl->trn_prev= 0;
+ tbl->trn_next= 0; /* To avoid assert in ha_maria::close() */
}
@@ -59,7 +64,36 @@ static inline void _ma_set_tmp_trn_for_table(MARIA_HA *tbl, TRN *newtrn)
static inline void _ma_reset_trn_for_table(MARIA_HA *tbl)
{
DBUG_PRINT("info",("table: %p trn: %p -> NULL", tbl, tbl->trn));
+
+ /* The following is only false if tbl->trn == &dummy_transaction_object */
+ if (tbl->trn_prev)
+ {
+ if (tbl->trn_next)
+ tbl->trn_next->trn_prev= tbl->trn_prev;
+ *tbl->trn_prev= tbl->trn_next;
+ tbl->trn_prev= 0;
+ tbl->trn_next= 0;
+ }
tbl->trn= 0;
}
+
+/*
+ Take over the used_instances link from a trn object
+ Reset the link in the trn object
+*/
+
+static inline void relink_trn_used_instances(MARIA_HA **used_tables, TRN *trn)
+{
+ if (likely(*used_tables= (MARIA_HA*) trn->used_instances))
+ {
+ /* Check that first back link is correct */
+ DBUG_ASSERT((*used_tables)->trn_prev == (MARIA_HA **)&trn->used_instances);
+
+ /* Fix back link to point to new base for the list */
+ (*used_tables)->trn_prev= used_tables;
+ trn->used_instances= 0;
+ }
+}
+
#endif /* _ma_trnman_h */
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index 33097e9ee2f..88486bca246 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -83,7 +83,7 @@ my_bool _ma_write_abort_default(MARIA_HA *info __attribute__((unused)))
/* Write new record to a table */
-int maria_write(MARIA_HA *info, uchar *record)
+int maria_write(MARIA_HA *info, const uchar *record)
{
MARIA_SHARE *share= info->s;
uint i;
diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c
index 85cdaa06701..2f130de1c7a 100644
--- a/storage/maria/maria_chk.c
+++ b/storage/maria/maria_chk.c
@@ -487,7 +487,7 @@ static void usage(void)
--ignore-control-file Don't open the control file. Only use this if you\n\
are sure the tables are not in use by another\n\
program!\n\
- --require-control-file Abort if we can't find/read the maria_log_control\n\
+ --require-control-file Abort if we can't find/read the aria_log_control\n\
file\n\
-s, --silent Only print errors. One can use two -s to make\n\
maria_chk very silent.\n\
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index 382e3cbe2ba..80c57ad9a0e 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -177,6 +177,7 @@ typedef struct st_maria_state_info
uint sortkey; /* sorted by this key (not used) */
uint open_count;
uint changed; /* Changed since maria_chk */
+ uint org_changed; /* Changed since open */
/**
Birthday of the table: no record in the log before this LSN should ever
be applied to the table. Updated when created, renamed, explicitly
@@ -501,6 +502,7 @@ typedef struct st_maria_share
my_bool key_del_used; /* != 0 if key_del is locked */
my_bool deleting; /* we are going to delete this table */
my_bool redo_error_given; /* Used during recovery */
+ my_bool silence_encryption_errors; /* Used during recovery */
THR_LOCK lock;
void (*lock_restore_status)(void *);
/**
@@ -605,7 +607,7 @@ struct st_maria_handler
{
MARIA_SHARE *s; /* Shared between open:s */
struct st_ma_transaction *trn; /* Pointer to active transaction */
- struct st_maria_handler *trn_next;
+ struct st_maria_handler *trn_next,**trn_prev;
MARIA_STATUS_INFO *state, state_save;
MARIA_STATUS_INFO *state_start; /* State at start of transaction */
MARIA_USED_TABLES *used_tables;
@@ -690,6 +692,7 @@ struct st_maria_handler
uint16 last_used_keyseg; /* For MARIAMRG */
uint8 key_del_used; /* != 0 if key_del is used */
my_bool was_locked; /* Was locked in panic */
+ my_bool intern_lock_locked; /* locked in ma_extra() */
my_bool append_insert_at_end; /* Set if concurrent insert */
my_bool quick_mode;
my_bool in_check_table; /* We are running check tables */
@@ -1197,7 +1200,7 @@ extern my_bool _ma_read_cache(MARIA_HA *, IO_CACHE *info, uchar *buff,
uint re_read_if_possibly);
extern ulonglong ma_retrieve_auto_increment(const uchar *key, uint8 key_type);
extern my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size,
- size_t new_size);
+ size_t new_size, myf flag);
extern size_t _ma_rec_unpack(MARIA_HA *info, uchar *to, uchar *from,
size_t reclength);
extern my_bool _ma_rec_check(MARIA_HA *info, const uchar *record,
@@ -1419,6 +1422,9 @@ extern my_bool maria_page_crc_check_bitmap(int, PAGECACHE_IO_HOOK_ARGS *args);
extern my_bool maria_page_crc_check_data(int, PAGECACHE_IO_HOOK_ARGS *args);
extern my_bool maria_page_crc_check_index(int, PAGECACHE_IO_HOOK_ARGS *args);
extern my_bool maria_page_crc_check_none(int, PAGECACHE_IO_HOOK_ARGS *args);
+extern my_bool maria_page_crc_check(uchar *page, pgcache_page_no_t page_no,
+ MARIA_SHARE *share, uint32 no_crc_val,
+ int data_length);
extern my_bool maria_page_filler_set_bitmap(PAGECACHE_IO_HOOK_ARGS *args);
extern my_bool maria_page_filler_set_normal(PAGECACHE_IO_HOOK_ARGS *args);
extern my_bool maria_page_filler_set_none(PAGECACHE_IO_HOOK_ARGS *args);
@@ -1429,7 +1435,7 @@ extern my_bool maria_flush_log_for_page_none(PAGECACHE_IO_HOOK_ARGS *args);
extern PAGECACHE *maria_log_pagecache;
extern void ma_set_index_cond_func(MARIA_HA *info, index_cond_func_t func,
void *func_arg);
-ICP_RESULT ma_check_index_cond(MARIA_HA *info, uint keynr, uchar *record);
+check_result_t ma_check_index_cond(MARIA_HA *info, uint keynr, uchar *record);
extern my_bool ma_yield_and_check_if_killed(MARIA_HA *info, int inx);
extern my_bool ma_killed_standalone(MARIA_HA *);
diff --git a/storage/maria/maria_pack.c b/storage/maria/maria_pack.c
index 3e9d002ea43..24438f49c41 100644
--- a/storage/maria/maria_pack.c
+++ b/storage/maria/maria_pack.c
@@ -20,6 +20,8 @@
#endif
#include "maria_def.h"
+#include "trnman_public.h"
+#include "trnman.h"
#include <queues.h>
#include <my_tree.h>
#include "mysys_err.h"
@@ -30,13 +32,16 @@
#define __GNU_LIBRARY__ /* Skip warnings in getopt.h */
#endif
#include <my_getopt.h>
-#include <assert.h>
+#include <my_handler_errors.h>
#if SIZEOF_LONG_LONG > 4
#define BITS_SAVED 64
#else
#define BITS_SAVED 32
#endif
+#ifndef MAX_INTERNAL_TRID
+#define MAX_INTERNAL_TRID 0xffffffffffffLL
+#endif
#define IS_OFFSET ((uint) 32768) /* Bit if offset or char in tree */
#define HEAD_LENGTH 32
@@ -178,11 +183,6 @@ static void fakebigcodes(HUFF_COUNTS *huff_counts, HUFF_COUNTS *end_count);
static int fakecmp(my_off_t **count1, my_off_t **count2);
#endif
-
-static int error_on_write=0,test_only=0,verbose=0,silent=0,
- write_loop=0,force_pack=0, isamchk_neaded=0;
-static int tmpfile_createflag=O_RDWR | O_TRUNC | O_EXCL;
-static my_bool backup, opt_wait;
/*
tree_buff_length is somewhat arbitrary. The bigger it is the better
the chance to win in terms of compression factor. On the other hand,
@@ -190,6 +190,12 @@ static my_bool backup, opt_wait;
is coded with 16 bits in the header. Hence the limit is 2**16 - 1.
*/
static uint tree_buff_length= 65536 - MALLOC_OVERHEAD;
+
+static int error_on_write=0,test_only=0,verbose=0,silent=0,
+ write_loop=0,force_pack=0, isamchk_neaded=0;
+static int tmpfile_createflag=O_RDWR | O_TRUNC | O_EXCL;
+static my_bool backup, opt_wait;
+static my_bool opt_ignore_control_file, opt_require_control_file;
static char tmp_dir[FN_REFLEN]={0},*join_table;
static my_off_t intervall_length;
static ha_checksum glob_crc;
@@ -199,19 +205,52 @@ static HUFF_COUNTS *global_count;
static char zero_string[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
static const char *load_default_groups[]= { "ariapack",0 };
- /* The main program */
+/*
+ Register handler error messages for usage with my_error()
+
+ NOTES
+ This is safe to call multiple times as my_error_register()
+ will ignore calls to register already registered error numbers.
+*/
+
+static const char **get_handler_error_messages(int e __attribute__((unused)))
+{
+ return handler_error_messages;
+}
+
+
+/* The main program */
int main(int argc, char **argv)
{
int error,ok;
PACK_MRG_INFO merge;
char **default_argv;
+ my_bool no_control_file= 0;
MY_INIT(argv[0]);
+ maria_data_root= (char *)".";
load_defaults_or_exit("my", load_default_groups, &argc, &argv);
default_argv= argv;
get_options(&argc,&argv);
+ my_error_register(get_handler_error_messages, HA_ERR_FIRST,
+ HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
+
+ if (!opt_ignore_control_file &&
+ (no_control_file= ma_control_file_open(FALSE,
+ (opt_require_control_file ||
+ !silent))) &&
+ opt_require_control_file)
+ {
+ error= 1;
+ goto end;
+ }
maria_init();
+ if (no_control_file || force_pack)
+ {
+ /* Assume that all rows exists */
+ trnman_init(MAX_INTERNAL_TRID-16);
+ }
error=ok=isamchk_neaded=0;
if (join_table)
@@ -239,9 +278,13 @@ int main(int argc, char **argv)
}
if (ok && isamchk_neaded && !silent)
puts("Remember to run aria_chk -rq on compressed tables");
+
+end:
fflush(stdout);
fflush(stderr);
free_defaults(default_argv);
+ my_error_unregister(HA_ERR_FIRST,
+ HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
maria_end();
my_end(verbose ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
exit(error ? 2 : 0);
@@ -263,17 +306,29 @@ static struct my_option my_long_options[] =
{"character-sets-dir", OPT_CHARSETS_DIR_MP,
"Directory where character sets are.", (char**) &charsets_dir,
(char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"datadir", 'h',
+ "Path for control file (and logs if --logdir not used).",
+ &maria_data_root, 0, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f',
"Force packing of table even if it gets bigger or if tempfile exists.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ { "ignore-control-file", 0,
+ "Ignore the control file",
+ (uchar**)&opt_ignore_control_file, 0, 0, GET_BOOL, NO_ARG,
+ 0, 0, 0, 0, 0, 0},
{"join", 'j',
"Join all given tables into 'new_table_name'. All tables MUST have identical layouts.",
&join_table, &join_table, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
0, 0, 0},
{"help", '?', "Display this help and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ { "require-control-file", 0,
+ "Abort if cannot find control file",
+ (uchar**)&opt_require_control_file, 0, 0, GET_BOOL, NO_ARG,
+ 0, 0, 0, 0, 0, 0},
{"silent", 's', "Be more silent.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"tmpdir", 'T', "Use temporary directory to store temporary table.",
@@ -396,6 +451,47 @@ static void get_options(int *argc,char ***argv)
}
+static void print_error(int error, const char *filename)
+{
+ switch (error) {
+ case HA_ERR_CRASHED:
+ fprintf(stderr, "'%s' doesn't have a correct index definition. You need to recreate it before you can do a repair",filename);
+ break;
+ case HA_ERR_NOT_A_TABLE:
+ fprintf(stderr, "'%s' is not a Aria table",filename);
+ break;
+ case HA_ERR_CRASHED_ON_USAGE:
+ fprintf(stderr, "'%s' is marked as crashed",filename);
+ break;
+ case HA_ERR_CRASHED_ON_REPAIR:
+ fprintf(stderr, "'%s' is marked as crashed after last repair",filename);
+ break;
+ case HA_ERR_OLD_FILE:
+ fprintf(stderr, "'%s' has transactions newer than registered in control file. If this is ok, please re-run with --ignore-control-file", filename);
+ break;
+ case HA_ERR_NEW_FILE:
+ fprintf(stderr, "'%s' uses new features not supported by this version of the Aria library", filename);
+ break;
+ case HA_ERR_END_OF_FILE:
+ fprintf(stderr, "Couldn't read complete header from '%s'", filename);
+ break;
+ case EAGAIN:
+ fprintf(stderr, "'%s' is locked. Use -w to wait until unlocked",filename);
+ break;
+ case ENOENT:
+ fprintf(stderr, "File '%s' doesn't exist",filename);
+ break;
+ case EACCES:
+ fprintf(stderr, "You don't have permission to use '%s'", filename);
+ break;
+ default:
+ fprintf(stderr, "%d when opening Aria table '%s'", error, filename);
+ break;
+ }
+ fputc('\n',stderr);
+}
+
+
static MARIA_HA *open_maria_file(char *name,int mode)
{
MARIA_HA *isam_file;
@@ -403,10 +499,10 @@ static MARIA_HA *open_maria_file(char *name,int mode)
DBUG_ENTER("open_maria_file");
if (!(isam_file=maria_open(name, mode, HA_OPEN_IGNORE_MOVED_STATE |
- (opt_wait ? HA_OPEN_WAIT_IF_LOCKED :
- HA_OPEN_ABORT_IF_LOCKED))))
+ (opt_wait ? HA_OPEN_WAIT_IF_LOCKED :
+ HA_OPEN_ABORT_IF_LOCKED))))
{
- fprintf(stderr, "%s gave error %d on open\n", name, my_errno);
+ print_error(my_errno, name);
DBUG_RETURN(0);
}
share=isam_file->s;
diff --git a/storage/maria/maria_read_log.c b/storage/maria/maria_read_log.c
index d9b5be30105..59d5c8abce8 100644
--- a/storage/maria/maria_read_log.c
+++ b/storage/maria/maria_read_log.c
@@ -31,6 +31,7 @@ const char *default_dbug_option= "d:t:o,/tmp/aria_read_log.trace";
#endif /* DBUG_OFF */
static my_bool opt_display_only, opt_apply, opt_apply_undo, opt_silent;
static my_bool opt_check;
+static my_bool opt_print_aria_log_control;
static const char *opt_tmpdir;
static ulong opt_translog_buffer_size;
static ulonglong opt_page_buffer_size;
@@ -59,6 +60,12 @@ int main(int argc, char **argv)
goto err;
}
maria_block_size= 0; /* Use block size from file */
+ if (opt_print_aria_log_control)
+ {
+ if (print_aria_log_control())
+ goto err;
+ goto end;
+ }
/* we don't want to create a control file, it MUST exist */
if (ma_control_file_open(FALSE, TRUE))
{
@@ -209,6 +216,10 @@ static struct my_option my_long_options[] =
&opt_page_buffer_size, &opt_page_buffer_size, 0,
GET_ULL, REQUIRED_ARG, PAGE_BUFFER_INIT,
PAGE_BUFFER_INIT, SIZE_T_MAX, MALLOC_OVERHEAD, (long) IO_SIZE, 0},
+ { "print-log-control-file", 'l',
+ "Print the content of the aria_log_control_file",
+ &opt_print_aria_log_control, &opt_print_aria_log_control, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ "start-from-lsn", 'o', "Start reading log from this lsn",
&opt_start_from_lsn, &opt_start_from_lsn,
0, GET_ULL, REQUIRED_ARG, 0, 0, ~(longlong) 0, 0, 0, 0 },
@@ -249,7 +260,7 @@ static struct my_option my_long_options[] =
static void print_version(void)
{
- printf("%s Ver 1.3 for %s on %s\n",
+ printf("%s Ver 1.4 for %s on %s\n",
my_progname_short, SYSTEM_TYPE, MACHINE_TYPE);
}
@@ -261,7 +272,7 @@ static void usage(void)
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
puts("and you are welcome to modify and redistribute it under the GPL license\n");
- puts("Display and apply log records from a Aria transaction log");
+ puts("Display or apply log records from a Aria transaction log");
puts("found in the current directory (for now)");
#ifndef IDENTICAL_PAGES_AFTER_RECOVERY
puts("\nNote: Aria is compiled without -DIDENTICAL_PAGES_AFTER_RECOVERY\n"
@@ -269,8 +280,13 @@ static void usage(void)
"files created during normal execution. This should be ok, except for\n"
"test scripts that tries to compare files before and after recovery.");
#endif
- printf("\nUsage: %s OPTIONS\n", my_progname_short);
- puts("You need to use one of -d or -a");
+ printf("\nUsage: %s OPTIONS [-d | -a] -h `aria_log_directory`\n",
+ my_progname_short);
+ printf("or\n");
+ printf("Usage: %s OPTIONS -h `aria_log_directory` "
+ "--print-aria-log-control\n\n",
+ my_progname_short);
+
my_print_help(my_long_options);
print_defaults("my", load_default_groups);
my_print_variables(my_long_options);
@@ -339,12 +355,12 @@ static void get_options(int *argc,char ***argv)
need_help= 1;
fprintf(stderr, "Too many arguments given\n");
}
- if ((opt_display_only + opt_apply) != 1)
+ if ((opt_display_only + opt_apply + opt_print_aria_log_control) != 1)
{
need_help= 1;
fprintf(stderr,
- "You must use one and only one of the options 'display-only' or "
- "'apply'\n");
+ "You must use one and only one of the options 'display-only', \n"
+ "'print-log-control-file' and 'apply'\n");
}
if (need_help)
diff --git a/storage/maria/maria_rename.sh b/storage/maria/maria_rename.sh
deleted file mode 100755
index fb20e47e635..00000000000
--- a/storage/maria/maria_rename.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-replace myisam maria MYISAM MARIA MyISAM MARIA -- mysql-test/t/*maria*test mysql-test/r/*maria*result
-
-FILES=`echo sql/ha_maria.{cc,h} include/maria*h storage/maria/*.{c,h}`
-
-replace myisam maria MYISAM MARIA MyISAM MARIA myisam.h maria.h myisamdef.h maria_def.h mi_ maria_ ft_ maria_ft_ "Copyright (C) 2000" "Copyright (C) 2006" MI_ISAMINFO MARIA_INFO MI_CREATE_INFO MARIA_CREATE_INFO maria_isam_ maria_ MI_INFO MARIA_HA MI_ MARIA_ MARIACHK MARIA_CHK rt_index.h ma_rt_index.h rtree_ maria_rtree rt_key.h ma_rt_key.h rt_mbr.h ma_rt_mbr.h -- $FILES
-
-replace check_table_is_closed _ma_check_table_is_closed test_if_reopen _ma_test_if_reopen my_n_base_info_read maria_n_base_info_read update_auto_increment _ma_update_auto_increment save_pack_length _ma_save_packlength calc_pack_length _ma_calc_pack_length -- $FILES
-
-replace mi_ ma_ ft_ ma_ft_ rt_ ma_rt_ myisam maria myisamchk maria_chk myisampack maria_pack myisamlog maria_log -- storage/maria/Makefile.am
-
-#
-# Restore wrong replaces
-#
-
-replace maria_sint1korr mi_sint1korr maria_uint1korr mi_uint1korr maria_sint2korr mi_sint2korr maria_sint3korr mi_sint3korr maria_sint4korr mi_sint4korr maria_sint8korr mi_sint8korr maria_uint2korr mi_uint2korr maria_uint3korr mi_uint3korr maria_uint4korr mi_uint4korr maria_uint5korr mi_uint5korr maria_uint6korr mi_uint6korr maria_uint7korr mi_uint7korr maria_uint8korr mi_uint8korr maria_int1store mi_int1store maria_int2store mi_int2store maria_int3store mi_int3store maria_int4store mi_int4store maria_int5store mi_int5store maria_int6store mi_int6store maria_int7store mi_int7store maria_int8store mi_int8store maria_float4store mi_float4store maria_float4get mi_float4get maria_float8store mi_float8store maria_float8get mi_float8get maria_rowstore mi_rowstore maria_rowkorr mi_rowkorr maria_sizestore mi_sizestore maria_sizekorr mi_sizekorr _maria_maria_ _maria MARIA_MAX_POSSIBLE_KEY HA_MAX_POSSIBLE_KEY MARIA_MAX_KEY_BUFF HA_MAX_KEY_BUFF MARIA_MAX_KEY_SEG HA_MAX_KEY_SEG maria_ft_sintXkorr ft_sintXkorr maria_ft_intXstore ft_intXstore maria_ft_boolean_syntax ft_boolean_syntax maria_ft_min_word_len ft_min_word_len maria_ft_max_word_len ft_max_word_len -- $FILES
diff --git a/storage/maria/test_ma_backup.c b/storage/maria/test_ma_backup.c
new file mode 100644
index 00000000000..241763ecd32
--- /dev/null
+++ b/storage/maria/test_ma_backup.c
@@ -0,0 +1,444 @@
+/* Copyright (C) 2018, 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 Street, Fifth Floor, Boston, MA 02111-1301 USA */
+
+/* Code for doing backups of Aria tables */
+
+/******************************************************************************
+ Testing ma_backup interface
+ Table creation code is taken from ma_test1
+******************************************************************************/
+
+#define ROWS_IN_TEST 100000
+
+#include "maria_def.h"
+#include "ma_blockrec.h" /* PAGE_SUFFIX_SIZE */
+#include "ma_checkpoint.h"
+#include <aria_backup.h>
+
+static int silent;
+static int create_test_table(const char *table_name, int stage);
+static int copy_table(const char *table_name, int stage);
+static void create_record(uchar *record,uint rownr);
+
+int main(int argc __attribute__((unused)), char *argv[])
+{
+ int error= 1;
+ int i;
+ char buff[FN_REFLEN];
+#ifdef SAFE_MUTEX
+ safe_mutex_deadlock_detector= 1;
+#endif
+ MY_INIT(argv[0]);
+ maria_data_root= (char *)".";
+
+ /* Maria requires that we always have a page cache */
+ if (maria_init() ||
+ (init_pagecache(maria_pagecache, maria_block_size * 2000, 0, 0,
+ maria_block_size, 0, MY_WME) == 0) ||
+ ma_control_file_open(TRUE, TRUE) ||
+ (init_pagecache(maria_log_pagecache,
+ TRANSLOG_PAGECACHE_SIZE, 0, 0,
+ TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) ||
+ translog_init(maria_data_root, TRANSLOG_FILE_SIZE,
+ 0, 0, maria_log_pagecache,
+ TRANSLOG_DEFAULT_FLAGS, 0) ||
+ (trnman_init(0) || ma_checkpoint_init(0)))
+ {
+ fprintf(stderr, "Error in initialization\n");
+ exit(1);
+ }
+ init_thr_lock();
+
+ fn_format(buff, "test_copy", maria_data_root, "", MYF(0));
+
+ for (i= 0; i < 5 ; i++)
+ {
+ printf("Stage: %d\n", i);
+ fflush(stdout);
+ if (create_test_table(buff, i))
+ goto err;
+ if (copy_table(buff, i))
+ goto err;
+ }
+ error= 0;
+ printf("test ok\n");
+err:
+ if (error)
+ fprintf(stderr, "Test %i failed\n", i);
+ maria_end();
+ my_uuid_end();
+ my_end(MY_CHECK_ERROR);
+ exit(error);
+}
+
+
+/**
+ Example of how to read an Aria table
+*/
+
+static int copy_table(const char *table_name, int stage)
+{
+ char old_name[FN_REFLEN];
+ uchar *copy_buffer= 0;
+ ARIA_TABLE_CAPABILITIES cap;
+ ulonglong block;
+ File org_file= -1;
+ int error= 1;
+
+ strxmov(old_name, table_name, ".MAI", NullS);
+
+ if ((org_file= my_open(old_name,
+ O_RDONLY | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
+ MYF(MY_WME))) < 0)
+ goto err;
+ if ((error= aria_get_capabilities(org_file, &cap)))
+ {
+ fprintf(stderr, "aria_get_capabilities failed: %d\n", error);
+ goto err;
+ }
+
+ printf("- Capabilities read. oneline_backup_safe: %d\n",
+ cap.online_backup_safe);
+ printf("- Copying index file\n");
+
+ copy_buffer= my_malloc(cap.block_size, MYF(0));
+ for (block= 0 ; ; block++)
+ {
+ if ((error= aria_read_index(org_file, &cap, block, copy_buffer) ==
+ HA_ERR_END_OF_FILE))
+ break;
+ if (error)
+ {
+ fprintf(stderr, "aria_read_index failed: %d\n", error);
+ goto err;
+ }
+ }
+ my_close(org_file, MYF(MY_WME));
+
+
+ printf("- Copying data file\n");
+ strxmov(old_name, table_name, ".MAD", NullS);
+ if ((org_file= my_open(old_name, O_RDONLY | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
+ MYF(MY_WME))) < 0)
+ goto err;
+
+ for (block= 0 ; ; block++)
+ {
+ size_t length;
+ if ((error= aria_read_data(org_file, &cap, block, copy_buffer,
+ &length) == HA_ERR_END_OF_FILE))
+ break;
+ if (error)
+ {
+ fprintf(stderr, "aria_read_index failed: %d\n", error);
+ goto err;
+ }
+ }
+ error= 0;
+
+err:
+ my_free(copy_buffer);
+ if (org_file >= 0)
+ my_close(org_file, MYF(MY_WME));
+ if (error)
+ fprintf(stderr, "Failed in copy_table stage: %d\n", stage);
+ return error;
+}
+
+
+/* Code extracted from ma_test1.c */
+#define MAX_REC_LENGTH 1024
+
+static MARIA_COLUMNDEF recinfo[4];
+static MARIA_KEYDEF keyinfo[10];
+static HA_KEYSEG keyseg[10];
+static HA_KEYSEG uniqueseg[10];
+
+
+/**
+ Create a test table and fill it with some data
+*/
+
+static int create_test_table(const char *table_name, int type_of_table)
+{
+ MARIA_HA *file;
+ int i,error,uniques=0;
+ int key_field=FIELD_SKIP_PRESPACE,extra_field=FIELD_SKIP_ENDSPACE;
+ int key_type=HA_KEYTYPE_NUM;
+ int create_flag=0;
+ uint pack_seg=0, pack_keys= 0;
+ uint key_length;
+ uchar record[MAX_REC_LENGTH];
+ MARIA_UNIQUEDEF uniquedef;
+ MARIA_CREATE_INFO create_info;
+ enum data_file_type record_type= DYNAMIC_RECORD;
+ my_bool null_fields= 0, unique_key= 0;
+ my_bool opt_unique= 0;
+ my_bool transactional= 0;
+
+ key_length= 12;
+ switch (type_of_table) {
+ case 0:
+ break;
+ case 1:
+ create_flag|= HA_CREATE_CHECKSUM | HA_CREATE_PAGE_CHECKSUM;
+ break;
+ case 2: /* transactional */
+ create_flag|= HA_CREATE_CHECKSUM | HA_CREATE_PAGE_CHECKSUM;
+ record_type= BLOCK_RECORD;
+ transactional= 1;
+ break;
+ case 3: /* transactional */
+ create_flag|= HA_CREATE_CHECKSUM | HA_CREATE_PAGE_CHECKSUM;
+ record_type= BLOCK_RECORD;
+ transactional= 1;
+ key_field=FIELD_VARCHAR; /* varchar keys */
+ extra_field= FIELD_VARCHAR;
+ key_type= HA_KEYTYPE_VARTEXT1;
+ pack_seg|= HA_VAR_LENGTH_PART;
+ null_fields= 1;
+ break;
+ case 4: /* transactional */
+ create_flag|= HA_CREATE_CHECKSUM | HA_CREATE_PAGE_CHECKSUM;
+ record_type= BLOCK_RECORD;
+ transactional= 1;
+ key_field=FIELD_BLOB; /* blob key */
+ extra_field= FIELD_BLOB;
+ pack_seg|= HA_BLOB_PART;
+ key_type= HA_KEYTYPE_VARTEXT1;
+ break;
+ }
+
+
+ bzero((char*) recinfo,sizeof(recinfo));
+ bzero((char*) &create_info,sizeof(create_info));
+
+ /* First define 2 columns */
+ create_info.null_bytes= 1;
+ recinfo[0].type= key_field;
+ recinfo[0].length= (key_field == FIELD_BLOB ? 4+portable_sizeof_char_ptr :
+ key_length);
+ if (key_field == FIELD_VARCHAR)
+ recinfo[0].length+= HA_VARCHAR_PACKLENGTH(key_length);
+ recinfo[1].type=extra_field;
+ recinfo[1].length= (extra_field == FIELD_BLOB ? 4 + portable_sizeof_char_ptr : 24);
+ if (extra_field == FIELD_VARCHAR)
+ recinfo[1].length+= HA_VARCHAR_PACKLENGTH(recinfo[1].length);
+ recinfo[1].null_bit= null_fields ? 2 : 0;
+
+ if (opt_unique)
+ {
+ recinfo[2].type=FIELD_CHECK;
+ recinfo[2].length=MARIA_UNIQUE_HASH_LENGTH;
+ }
+
+ if (key_type == HA_KEYTYPE_VARTEXT1 &&
+ key_length > 255)
+ key_type= HA_KEYTYPE_VARTEXT2;
+
+ /* Define a key over the first column */
+ keyinfo[0].seg=keyseg;
+ keyinfo[0].keysegs=1;
+ keyinfo[0].block_length= 0; /* Default block length */
+ keyinfo[0].key_alg=HA_KEY_ALG_BTREE;
+ keyinfo[0].seg[0].type= key_type;
+ keyinfo[0].seg[0].flag= pack_seg;
+ keyinfo[0].seg[0].start=1;
+ keyinfo[0].seg[0].length=key_length;
+ keyinfo[0].seg[0].null_bit= null_fields ? 2 : 0;
+ keyinfo[0].seg[0].null_pos=0;
+ keyinfo[0].seg[0].language= default_charset_info->number;
+ if (pack_seg & HA_BLOB_PART)
+ {
+ keyinfo[0].seg[0].bit_start=4; /* Length of blob length */
+ }
+ keyinfo[0].flag = (uint8) (pack_keys | unique_key);
+
+ if (opt_unique)
+ {
+ uint start;
+ uniques=1;
+ bzero((char*) &uniquedef,sizeof(uniquedef));
+ bzero((char*) uniqueseg,sizeof(uniqueseg));
+ uniquedef.seg=uniqueseg;
+ uniquedef.keysegs=2;
+
+ /* Make a unique over all columns (except first NULL fields) */
+ for (i=0, start=1 ; i < 2 ; i++)
+ {
+ uniqueseg[i].start=start;
+ start+=recinfo[i].length;
+ uniqueseg[i].length=recinfo[i].length;
+ uniqueseg[i].language= default_charset_info->number;
+ }
+ uniqueseg[0].type= key_type;
+ uniqueseg[0].null_bit= null_fields ? 2 : 0;
+ uniqueseg[1].type= HA_KEYTYPE_TEXT;
+ if (extra_field == FIELD_BLOB)
+ {
+ uniqueseg[1].length=0; /* The whole blob */
+ uniqueseg[1].bit_start=4; /* long blob */
+ uniqueseg[1].flag|= HA_BLOB_PART;
+ }
+ else if (extra_field == FIELD_VARCHAR)
+ {
+ uniqueseg[1].flag|= HA_VAR_LENGTH_PART;
+ uniqueseg[1].type= (HA_VARCHAR_PACKLENGTH(recinfo[1].length-1) == 1 ?
+ HA_KEYTYPE_VARTEXT1 : HA_KEYTYPE_VARTEXT2);
+ }
+ }
+ else
+ uniques=0;
+
+ if (!silent)
+ printf("- Creating Aria file\n");
+ create_info.max_rows= 0;
+ create_info.transactional= transactional;
+ if (maria_create(table_name, record_type, 1, keyinfo,2+opt_unique,recinfo,
+ uniques, &uniquedef, &create_info,
+ create_flag))
+ goto err;
+ if (!(file=maria_open(table_name,2,HA_OPEN_ABORT_IF_LOCKED)))
+ goto err;
+ if (!silent)
+ printf("- Writing key:s\n");
+
+ if (maria_begin(file))
+ goto err;
+ my_errno=0;
+ for (i= 0 ; i < ROWS_IN_TEST ; i++)
+ {
+ create_record(record,i);
+ if ((error=maria_write(file,record)))
+ goto err;
+ }
+
+ if (maria_commit(file) | maria_close(file))
+ goto err;
+ printf("- Data copied\n");
+ return 0;
+
+err:
+ printf("got error: %3d when using maria-database\n",my_errno);
+ return 1; /* skip warning */
+}
+
+
+static void create_key_part(uchar *key,uint rownr)
+{
+ if (keyinfo[0].seg[0].type == HA_KEYTYPE_NUM)
+ {
+ sprintf((char*) key,"%*d",keyinfo[0].seg[0].length,rownr);
+ }
+ else if (keyinfo[0].seg[0].type == HA_KEYTYPE_VARTEXT1 ||
+ keyinfo[0].seg[0].type == HA_KEYTYPE_VARTEXT2)
+ { /* Alpha record */
+ /* Create a key that may be easily packed */
+ bfill(key,keyinfo[0].seg[0].length,rownr < 10 ? 'A' : 'B');
+ sprintf((char*) key+keyinfo[0].seg[0].length-2,"%-2d",rownr % 100);
+ if ((rownr & 7) == 0)
+ {
+ /* Change the key to force a unpack of the next key */
+ bfill(key+3,keyinfo[0].seg[0].length-5,rownr < 10 ? 'a' : 'b');
+ }
+ }
+ else
+ { /* Alpha record */
+ if (keyinfo[0].seg[0].flag & HA_SPACE_PACK)
+ sprintf((char*) key,"%-*d",keyinfo[0].seg[0].length,rownr);
+ else
+ {
+ /* Create a key that may be easily packed */
+ bfill(key,keyinfo[0].seg[0].length,rownr < 10 ? 'A' : 'B');
+ sprintf((char*) key+keyinfo[0].seg[0].length-2,"%-2d",rownr % 100);
+ if ((rownr & 7) == 0)
+ {
+ /* Change the key to force a unpack of the next key */
+ key[1]= (rownr < 10 ? 'a' : 'b');
+ }
+ }
+ }
+}
+
+
+static uchar blob_key[MAX_REC_LENGTH];
+static uchar blob_record[MAX_REC_LENGTH+20*20];
+
+
+static void create_record(uchar *record,uint rownr)
+{
+ uchar *pos;
+ bzero((char*) record,MAX_REC_LENGTH);
+ record[0]=1; /* delete marker */
+ if (rownr == 0 && keyinfo[0].seg[0].null_bit)
+ record[0]|=keyinfo[0].seg[0].null_bit; /* Null key */
+
+ pos=record+1;
+ if (recinfo[0].type == FIELD_BLOB)
+ {
+ size_t tmp;
+ uchar *ptr;
+ create_key_part(blob_key,rownr);
+ tmp=strlen((char*) blob_key);
+ int4store(pos,tmp);
+ ptr=blob_key;
+ memcpy(pos+4,&ptr,sizeof(char*));
+ pos+=recinfo[0].length;
+ }
+ else if (recinfo[0].type == FIELD_VARCHAR)
+ {
+ size_t tmp, pack_length= HA_VARCHAR_PACKLENGTH(recinfo[0].length-1);
+ create_key_part(pos+pack_length,rownr);
+ tmp= strlen((char*) pos+pack_length);
+ if (pack_length == 1)
+ *(uchar*) pos= (uchar) tmp;
+ else
+ int2store(pos,tmp);
+ pos+= recinfo[0].length;
+ }
+ else
+ {
+ create_key_part(pos,rownr);
+ pos+=recinfo[0].length;
+ }
+ if (recinfo[1].type == FIELD_BLOB)
+ {
+ size_t tmp;
+ uchar *ptr;;
+ sprintf((char*) blob_record,"... row: %d", rownr);
+ strappend((char*) blob_record, rownr % MAX_REC_LENGTH,'x');
+ tmp=strlen((char*) blob_record);
+ int4store(pos,tmp);
+ ptr=blob_record;
+ memcpy(pos+4,&ptr,sizeof(char*));
+ }
+ else if (recinfo[1].type == FIELD_VARCHAR)
+ {
+ size_t tmp, pack_length= HA_VARCHAR_PACKLENGTH(recinfo[1].length-1);
+ sprintf((char*) pos+pack_length, "... row: %d", rownr);
+ tmp= strlen((char*) pos+pack_length);
+ if (pack_length == 1)
+ *pos= (uchar) tmp;
+ else
+ int2store(pos,tmp);
+ }
+ else
+ {
+ sprintf((char*) pos,"... row: %d", rownr);
+ strappend((char*) pos,recinfo[1].length,' ');
+ }
+}
+
+#include "ma_check_standalone.h"
diff --git a/storage/maria/trnman.c b/storage/maria/trnman.c
index 85a87e928b9..6bc83a9ba88 100644
--- a/storage/maria/trnman.c
+++ b/storage/maria/trnman.c
@@ -413,6 +413,7 @@ my_bool trnman_end_trn(TRN *trn, my_bool commit)
/* if a rollback, all UNDO records should have been executed */
DBUG_ASSERT(commit || trn->undo_lsn == 0);
DBUG_ASSERT(trn != &dummy_transaction_object);
+ DBUG_ASSERT(trn->locked_tables == 0 && trn->used_instances == 0);
DBUG_PRINT("info", ("mysql_mutex_lock LOCK_trn_list"));
mysql_mutex_lock(&LOCK_trn_list);
@@ -529,6 +530,8 @@ static void trnman_free_trn(TRN *trn)
*/
union { TRN *trn; void *v; } tmp;
+ DBUG_ASSERT(trn != &dummy_transaction_object);
+
mysql_mutex_lock(&trn->state_lock);
trn->short_id= 0;
mysql_mutex_unlock(&trn->state_lock);
diff --git a/storage/maria/unittest/lockman-t.c b/storage/maria/unittest/lockman-t.c
index 669fd9ecc72..222618acf89 100644
--- a/storage/maria/unittest/lockman-t.c
+++ b/storage/maria/unittest/lockman-t.c
@@ -23,7 +23,6 @@
#include <my_global.h>
#include <my_sys.h>
-#include <my_atomic.h>
#include <lf.h>
#include "../lockman.h"
diff --git a/storage/maria/unittest/lockman1-t.c b/storage/maria/unittest/lockman1-t.c
index 2a3cb291e3d..986ac73e2f5 100644
--- a/storage/maria/unittest/lockman1-t.c
+++ b/storage/maria/unittest/lockman1-t.c
@@ -23,7 +23,6 @@
#include <my_global.h>
#include <my_sys.h>
-#include <my_atomic.h>
#include <lf.h>
#include "../lockman.h"
#include "../tablockman.h"
diff --git a/storage/maria/unittest/lockman2-t.c b/storage/maria/unittest/lockman2-t.c
index ee3e2d2bd6b..7f9ed3cc50e 100644
--- a/storage/maria/unittest/lockman2-t.c
+++ b/storage/maria/unittest/lockman2-t.c
@@ -23,7 +23,6 @@
#include <my_global.h>
#include <my_sys.h>
-#include <my_atomic.h>
#include <lf.h>
#include "../tablockman.h"
diff --git a/storage/maria/unittest/ma_test_all-t b/storage/maria/unittest/ma_test_all-t
index 18b26a7bd45..8858649fb5d 100755
--- a/storage/maria/unittest/ma_test_all-t
+++ b/storage/maria/unittest/ma_test_all-t
@@ -749,9 +749,10 @@ Options
--help Show this help and exit.
--abort-on-error Abort at once in case of error.
--number-of-tests Print the total number of tests and exit.
---run-tests=... Test number(s) that should be run. You can give just
- one number or a range. For example 45..89. To run a specific
- test alone, for example test 215, use --run-tests=215..215
+--run-tests=... Test range that should be run. You can give just
+ one number, to start tests from this test, or a range.
+ For example 45..89. To run a specific test alone,
+ for example test 215, use --run-tests=215..215
Use this option with caution, because some of the tests
might depend on previous ones.
--start-from=... Alias for --run-tests
diff --git a/storage/maria/unittest/ma_test_recovery.expected b/storage/maria/unittest/ma_test_recovery.expected
index 6aaff86e6cf..38e8e4d8e93 100644
--- a/storage/maria/unittest/ma_test_recovery.expected
+++ b/storage/maria/unittest/ma_test_recovery.expected
@@ -70,7 +70,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -79,7 +79,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -88,7 +88,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -99,7 +99,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -108,7 +108,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -117,7 +117,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -167,7 +167,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -176,7 +176,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -185,7 +185,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -196,7 +196,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -205,7 +205,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -214,7 +214,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -264,7 +264,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -273,7 +273,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -282,7 +282,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -293,7 +293,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -302,7 +302,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -311,7 +311,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -361,7 +361,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -370,7 +370,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -379,7 +379,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -390,7 +390,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -399,7 +399,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -408,7 +408,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -458,7 +458,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -467,7 +467,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -476,7 +476,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -487,7 +487,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -496,7 +496,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -505,7 +505,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -555,7 +555,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -564,7 +564,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -573,7 +573,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -584,7 +584,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -593,7 +593,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -602,7 +602,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -652,7 +652,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -661,7 +661,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -670,7 +670,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -681,7 +681,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -690,7 +690,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -699,7 +699,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -749,7 +749,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -758,7 +758,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -767,7 +767,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -778,7 +778,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -787,7 +787,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -796,7 +796,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -846,7 +846,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -855,7 +855,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -864,7 +864,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -875,7 +875,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -884,7 +884,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -893,7 +893,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -943,7 +943,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -952,7 +952,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -961,7 +961,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -972,7 +972,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -981,7 +981,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -990,7 +990,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1040,7 +1040,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1049,7 +1049,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1058,7 +1058,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1069,7 +1069,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1078,7 +1078,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1087,7 +1087,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1137,7 +1137,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1146,7 +1146,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1155,7 +1155,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1166,7 +1166,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1175,7 +1175,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1184,7 +1184,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1234,7 +1234,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1243,7 +1243,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1252,7 +1252,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1263,7 +1263,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1272,7 +1272,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1281,7 +1281,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1331,7 +1331,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1340,7 +1340,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1349,7 +1349,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1360,7 +1360,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1369,7 +1369,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1378,7 +1378,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1428,7 +1428,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1437,7 +1437,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1446,7 +1446,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1457,7 +1457,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1466,7 +1466,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1475,7 +1475,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1525,7 +1525,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1534,7 +1534,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1543,7 +1543,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1554,7 +1554,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1563,7 +1563,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
@@ -1572,7 +1572,7 @@ applying log
Differences in aria_chk -dvv, recovery not yet perfect !
========DIFF START=======
7c7
-< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled,movable
+< Status: checked,analyzed,optimized keys,sorted index pages,zerofilled
---
> Status: changed
========DIFF END=======
diff --git a/storage/maria/unittest/trnman-t.c b/storage/maria/unittest/trnman-t.c
index 00e84cb2456..3d19116dbbc 100644
--- a/storage/maria/unittest/trnman-t.c
+++ b/storage/maria/unittest/trnman-t.c
@@ -17,7 +17,6 @@
#include <my_global.h>
#include <my_sys.h>
-#include <my_atomic.h>
#include <lf.h>
#include <m_string.h>
#include "../trnman.h"
diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt
index d57cb500eba..af4a9daa4c6 100644
--- a/storage/mroonga/CMakeLists.txt
+++ b/storage/mroonga/CMakeLists.txt
@@ -360,12 +360,7 @@ else()
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-parameter")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated")
- if(("${MYSQL_VARIANT}" STREQUAL "MariaDB") OR
- ("${MYSQL_VARIANT}" STREQUAL "MySQL" AND
- ${MYSQL_VERSION} VERSION_LESS "5.7.0"))
- MY_CHECK_AND_SET_COMPILER_FLAG("-fno-exceptions")
- MY_CHECK_AND_SET_COMPILER_FLAG("-fno-rtti")
- endif()
+ MY_CHECK_AND_SET_COMPILER_FLAG("-fno-exceptions")
MY_CHECK_AND_SET_COMPILER_FLAG("-felide-constructors")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough")
endif()
diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp
index c2bff4dd56b..fdca803ad96 100644
--- a/storage/mroonga/ha_mroonga.cpp
+++ b/storage/mroonga/ha_mroonga.cpp
@@ -193,7 +193,7 @@ static mysql_mutex_t *mrn_LOCK_open;
#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P)
# define MRN_LEX_GET_TABLE_LIST(lex) (lex)->select_lex->table_list.first
#else
-# define MRN_LEX_GET_TABLE_LIST(lex) (lex)->select_lex.table_list.first
+# define MRN_LEX_GET_TABLE_LIST(lex) (lex)->first_select_lex()->table_list.first
#endif
#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P)
@@ -550,9 +550,6 @@ static const char *mrn_inspect_extra_function(enum ha_extra_function operation)
case HA_EXTRA_END_ALTER_COPY:
inspected = "HA_EXTRA_END_ALTER_COPY";
break;
- case HA_EXTRA_FAKE_START_STMT:
- inspected = "HA_EXTRA_FAKE_START_STMT";
- break;
#ifdef MRN_HAVE_HA_EXTRA_EXPORT
case HA_EXTRA_EXPORT:
inspected = "HA_EXTRA_EXPORT";
@@ -2856,6 +2853,7 @@ ulonglong ha_mroonga::wrapper_table_flags() const
#ifdef HA_CAN_VIRTUAL_COLUMNS
table_flags |= HA_CAN_VIRTUAL_COLUMNS;
#endif
+ table_flags |= HA_CAN_HASH_KEYS;
DBUG_RETURN(table_flags);
}
@@ -2891,6 +2889,7 @@ ulonglong ha_mroonga::storage_table_flags() const
#ifdef HA_CAN_VIRTUAL_COLUMNS
flags |= HA_CAN_VIRTUAL_COLUMNS;
#endif
+ flags |= HA_CAN_HASH_KEYS;
DBUG_RETURN(flags);
}
@@ -5850,7 +5849,7 @@ bool ha_mroonga::wrapper_have_target_index()
DBUG_RETURN(have_target_index);
}
-int ha_mroonga::wrapper_write_row(uchar *buf)
+int ha_mroonga::wrapper_write_row(const uchar *buf)
{
int error = 0;
THD *thd = ha_thd();
@@ -5879,7 +5878,7 @@ int ha_mroonga::wrapper_write_row(uchar *buf)
DBUG_RETURN(error);
}
-int ha_mroonga::wrapper_write_row_index(uchar *buf)
+int ha_mroonga::wrapper_write_row_index(const uchar *buf)
{
MRN_DBUG_ENTER_METHOD();
@@ -5966,7 +5965,7 @@ err:
DBUG_RETURN(error);
}
-int ha_mroonga::storage_write_row(uchar *buf)
+int ha_mroonga::storage_write_row(const uchar *buf)
{
MRN_DBUG_ENTER_METHOD();
int error = 0;
@@ -6229,7 +6228,7 @@ err:
DBUG_RETURN(error);
}
-int ha_mroonga::storage_write_row_multiple_column_index(uchar *buf,
+int ha_mroonga::storage_write_row_multiple_column_index(const uchar *buf,
grn_id record_id,
KEY *key_info,
grn_obj *index_column)
@@ -6266,7 +6265,7 @@ int ha_mroonga::storage_write_row_multiple_column_index(uchar *buf,
DBUG_RETURN(error);
}
-int ha_mroonga::storage_write_row_multiple_column_indexes(uchar *buf,
+int ha_mroonga::storage_write_row_multiple_column_indexes(const uchar *buf,
grn_id record_id)
{
MRN_DBUG_ENTER_METHOD();
@@ -6378,7 +6377,7 @@ int ha_mroonga::storage_write_row_unique_index(const uchar *buf,
DBUG_RETURN(0);
}
-int ha_mroonga::storage_write_row_unique_indexes(uchar *buf)
+int ha_mroonga::storage_write_row_unique_indexes(const uchar *buf)
{
int error = 0;
uint i;
@@ -6441,7 +6440,7 @@ err:
DBUG_RETURN(error);
}
-int ha_mroonga::write_row(uchar *buf)
+int ha_mroonga::write_row(const uchar *buf)
{
MRN_DBUG_ENTER_METHOD();
int error = 0;
@@ -10576,7 +10575,7 @@ int ha_mroonga::generic_store_bulk_time(Field *field, grn_obj *buf)
bool truncated = false;
Field_time *time_field = (Field_time *)field;
MYSQL_TIME mysql_time;
- time_field->get_time(&mysql_time);
+ time_field->get_date(&mysql_time, Time::Options(current_thd));
mrn::TimeConverter time_converter;
long long int time = time_converter.mysql_time_to_grn_time(&mysql_time,
&truncated);
@@ -10596,7 +10595,7 @@ int ha_mroonga::generic_store_bulk_datetime(Field *field, grn_obj *buf)
bool truncated = false;
Field_datetime *datetime_field = (Field_datetime *)field;
MYSQL_TIME mysql_time;
- datetime_field->get_time(&mysql_time);
+ datetime_field->get_date(&mysql_time, Time::Options(current_thd));
mrn::TimeConverter time_converter;
long long int time = time_converter.mysql_time_to_grn_time(&mysql_time,
&truncated);
@@ -10657,7 +10656,7 @@ int ha_mroonga::generic_store_bulk_datetime2(Field *field, grn_obj *buf)
bool truncated = false;
Field_datetimef *datetimef_field = (Field_datetimef *)field;
MYSQL_TIME mysql_time;
- datetimef_field->get_time(&mysql_time);
+ datetimef_field->get_date(&mysql_time, Time::Options(current_thd));
mrn::TimeConverter time_converter;
long long int time = time_converter.mysql_time_to_grn_time(&mysql_time,
&truncated);
@@ -10682,7 +10681,7 @@ int ha_mroonga::generic_store_bulk_time2(Field *field, grn_obj *buf)
int error = 0;
bool truncated = false;
MYSQL_TIME mysql_time;
- field->get_time(&mysql_time);
+ field->get_date(&mysql_time, Time::Options(current_thd));
mrn::TimeConverter time_converter;
long long int time = time_converter.mysql_time_to_grn_time(&mysql_time,
&truncated);
@@ -10707,7 +10706,7 @@ int ha_mroonga::generic_store_bulk_new_date(Field *field, grn_obj *buf)
bool truncated = false;
Field_newdate *newdate_field = (Field_newdate *)field;
MYSQL_TIME mysql_date;
- newdate_field->get_time(&mysql_date);
+ newdate_field->get_date(&mysql_date, Time::Options(current_thd));
mrn::TimeConverter time_converter;
long long int time = time_converter.mysql_time_to_grn_time(&mysql_date,
&truncated);
@@ -11617,14 +11616,14 @@ int ha_mroonga::storage_encode_key_timestamp(Field *field, const uchar *key,
} else {
Field_timestamp_hires *timestamp_hires_field =
(Field_timestamp_hires *)field;
- uint fuzzy_date = 0;
uchar *ptr_backup = field->ptr;
uchar *null_ptr_backup = field->null_ptr;
TABLE *table_backup = field->table;
field->ptr = (uchar *)key;
field->null_ptr = (uchar *)(key - 1);
field->table = table;
- timestamp_hires_field->get_date(&mysql_time, fuzzy_date);
+ Temporal::Options opt(TIME_CONV_NONE, current_thd);
+ timestamp_hires_field->get_date(&mysql_time, opt);
field->ptr = ptr_backup;
field->null_ptr = null_ptr_backup;
field->table = table_backup;
@@ -11675,12 +11674,12 @@ int ha_mroonga::storage_encode_key_time(Field *field, const uchar *key,
mysql_time.time_type = MYSQL_TIMESTAMP_TIME;
} else {
Field_time_hires *time_hires_field = (Field_time_hires *)field;
- uint fuzzy_date = 0;
uchar *ptr_backup = field->ptr;
uchar *null_ptr_backup = field->null_ptr;
field->ptr = (uchar *)key;
field->null_ptr = (uchar *)(key - 1);
- time_hires_field->get_date(&mysql_time, fuzzy_date);
+ Temporal::Options opt(TIME_CONV_NONE, current_thd);
+ time_hires_field->get_date(&mysql_time, opt);
field->ptr = ptr_backup;
field->null_ptr = null_ptr_backup;
}
@@ -11749,12 +11748,12 @@ int ha_mroonga::storage_encode_key_datetime(Field *field, const uchar *key,
if (field->decimals() > 0) {
Field_datetime_hires *datetime_hires_field = (Field_datetime_hires *)field;
MYSQL_TIME mysql_time;
- uint fuzzy_date = 0;
uchar *ptr_backup = field->ptr;
uchar *null_ptr_backup = field->null_ptr;
field->ptr = (uchar *)key;
field->null_ptr = (uchar *)(key - 1);
- datetime_hires_field->get_date(&mysql_time, fuzzy_date);
+ Temporal::Options opt(TIME_CONV_NONE, current_thd);
+ datetime_hires_field->get_date(&mysql_time, opt);
field->ptr = ptr_backup;
field->null_ptr = null_ptr_backup;
mrn::TimeConverter time_converter;
diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp
index f2fb2bfe8e7..7736ac52dba 100644
--- a/storage/mroonga/ha_mroonga.hpp
+++ b/storage/mroonga/ha_mroonga.hpp
@@ -451,7 +451,7 @@ public:
int extra_opt(enum ha_extra_function operation, ulong cache_size) mrn_override;
int delete_table(const char *name) mrn_override;
- int write_row(uchar *buf) mrn_override;
+ int write_row(const uchar *buf) mrn_override;
int update_row(const uchar *old_data, const uchar *new_data) mrn_override;
int delete_row(const uchar *buf) mrn_override;
@@ -908,20 +908,20 @@ private:
int storage_end_bulk_insert();
bool wrapper_is_target_index(KEY *key_info);
bool wrapper_have_target_index();
- int wrapper_write_row(uchar *buf);
- int wrapper_write_row_index(uchar *buf);
- int storage_write_row(uchar *buf);
- int storage_write_row_multiple_column_index(uchar *buf,
+ int wrapper_write_row(const uchar *buf);
+ int wrapper_write_row_index(const uchar *buf);
+ int storage_write_row(const uchar *buf);
+ int storage_write_row_multiple_column_index(const uchar *buf,
grn_id record_id,
KEY *key_info,
grn_obj *index_column);
- int storage_write_row_multiple_column_indexes(uchar *buf, grn_id record_id);
+ int storage_write_row_multiple_column_indexes(const uchar *buf, grn_id record_id);
int storage_write_row_unique_index(const uchar *buf,
KEY *key_info,
grn_obj *index_table,
grn_obj *index_column,
grn_id *key_id);
- int storage_write_row_unique_indexes(uchar *buf);
+ int storage_write_row_unique_indexes(const uchar *buf);
int wrapper_get_record_id(uchar *data, grn_id *record_id,
const char *context);
int wrapper_update_row(const uchar *old_data, const uchar *new_data);
diff --git a/storage/mroonga/lib/mrn_condition_converter.cpp b/storage/mroonga/lib/mrn_condition_converter.cpp
index b85070a0d6d..761dfc72ade 100644
--- a/storage/mroonga/lib/mrn_condition_converter.cpp
+++ b/storage/mroonga/lib/mrn_condition_converter.cpp
@@ -179,17 +179,17 @@ namespace mrn {
NormalizedType normalized_type = normalize_field_type(field_type);
switch (normalized_type) {
case STRING_TYPE:
- if (value_item->type() == Item::STRING_ITEM &&
+ if (value_item->is_of_type(Item::CONST_ITEM, STRING_RESULT) &&
func_type == Item_func::EQ_FUNC) {
convertable = have_index(field_item, GRN_OP_EQUAL);
}
break;
case INT_TYPE:
if (field_type == MYSQL_TYPE_ENUM) {
- convertable = (value_item->type() == Item::STRING_ITEM ||
- value_item->type() == Item::INT_ITEM);
+ convertable = value_item->is_of_type(Item::CONST_ITEM, STRING_RESULT) ||
+ value_item->is_of_type(Item::CONST_ITEM, INT_RESULT);
} else {
- convertable = value_item->type() == Item::INT_ITEM;
+ convertable = value_item->is_of_type(Item::CONST_ITEM, INT_RESULT);
}
break;
case TIME_TYPE:
@@ -215,14 +215,14 @@ namespace mrn {
NormalizedType normalized_type = normalize_field_type(field_type);
switch (normalized_type) {
case STRING_TYPE:
- if (min_item->type() == Item::STRING_ITEM &&
- max_item->type() == Item::STRING_ITEM) {
+ if (min_item->is_of_type(Item::CONST_ITEM, STRING_RESULT) &&
+ max_item->is_of_type(Item::CONST_ITEM, STRING_RESULT)) {
convertable = have_index(field_item, GRN_OP_LESS);
}
break;
case INT_TYPE:
- if (min_item->type() == Item::INT_ITEM &&
- max_item->type() == Item::INT_ITEM) {
+ if (min_item->is_of_type(Item::CONST_ITEM, INT_RESULT) &&
+ max_item->is_of_type(Item::CONST_ITEM, INT_RESULT)) {
convertable = have_index(field_item, GRN_OP_LESS);
}
break;
@@ -258,8 +258,11 @@ namespace mrn {
Item *real_value_item = value_item->real_item();
switch (field_item->field->type()) {
case MYSQL_TYPE_TIME:
- error = real_value_item->get_time(mysql_time);
+ {
+ THD *thd= current_thd;
+ error= real_value_item->get_date(thd, mysql_time, Time::Options(thd));
break;
+ }
case MYSQL_TYPE_YEAR:
mysql_time->year = static_cast<int>(value_item->val_int());
mysql_time->month = 1;
@@ -273,9 +276,13 @@ namespace mrn {
error = false;
break;
default:
- error = real_value_item->get_date(mysql_time, TIME_FUZZY_DATE);
+ {
+ THD *thd= current_thd;
+ Datetime::Options opt(TIME_FUZZY_DATES, thd);
+ error = real_value_item->get_date(thd, mysql_time, opt);
break;
}
+ }
DBUG_RETURN(error);
}
@@ -587,7 +594,7 @@ namespace mrn {
case INT_TYPE:
grn_obj_reinit(ctx_, &value_, GRN_DB_INT64, 0);
if (field_type == MYSQL_TYPE_ENUM) {
- if (const_item->type() == Item::STRING_ITEM) {
+ if (const_item->is_of_type(Item::CONST_ITEM, STRING_RESULT)) {
String *string;
string = const_item->val_str(NULL);
Field_enum *enum_field = static_cast<Field_enum *>(field_item->field);
diff --git a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
index 5536eecb255..73639685d0e 100644
--- a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
+++ b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
@@ -675,7 +675,8 @@ namespace mrn {
&normalized, &normalized_length, NULL);
uint16 new_blob_data_length;
if (normalized_length <= UINT_MAX16) {
- memcpy(grn_key, normalized, normalized_length);
+ if (normalized_length)
+ memcpy(grn_key, normalized, normalized_length);
if (normalized_length < *mysql_key_size) {
memset(grn_key + normalized_length,
'\0', *mysql_key_size - normalized_length);
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result
index 9af4a4fedcc..c4b1dbf7141 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result
@@ -9,6 +9,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30;
COUNT(*)
3
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result
index d5c033083cc..4eba1922134 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result
@@ -9,6 +9,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6);
SELECT COUNT(*) FROM users WHERE age > 29;
COUNT(*)
2
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result
index 59b812d1484..4de49651b81 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result
@@ -9,6 +9,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6);
SELECT COUNT(*) FROM users WHERE age >= 29;
COUNT(*)
3
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result
index b5e4fc1c3de..a57a3b8fa6f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result
@@ -9,6 +9,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE age < 29;
COUNT(*)
2
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result
index f062fe0092b..c770b63daf8 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result
@@ -9,6 +9,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE age <= 29;
COUNT(*)
3
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result
index a1a123e7d5f..199edf9d758 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result
@@ -14,5 +14,5 @@ COUNT(*)
2
SHOW STATUS LIKE 'mroonga_count_skip';
Variable_name Value
-Mroonga_count_skip 2
+Mroonga_count_skip 0
DROP TABLE users;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result
index 68a0575ab97..26c8b6a9d94 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result
@@ -8,6 +8,7 @@ INSERT INTO users (id) VALUES (2);
INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
+INSERT INTO users (id) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4;
COUNT(*)
3
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result
index 3ae04a0246f..fe9de9e631d 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result
@@ -8,6 +8,7 @@ INSERT INTO users (id) VALUES (2);
INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
+INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4);
SELECT COUNT(*) FROM users WHERE id > 3;
COUNT(*)
2
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result
index 0f0643110f0..2fa5213ea49 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result
@@ -8,6 +8,7 @@ INSERT INTO users (id) VALUES (2);
INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
+INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4);
SELECT COUNT(*) FROM users WHERE id >= 3;
COUNT(*)
3
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result
index 64761c9565d..1b253a8edc6 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result
@@ -13,5 +13,5 @@ COUNT(*)
4
SHOW STATUS LIKE 'mroonga_count_skip';
Variable_name Value
-Mroonga_count_skip 1
+Mroonga_count_skip 0
DROP TABLE users;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result
index e2d8a8de493..d318a654c6c 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result
@@ -6,6 +6,7 @@ INDEX (id)
INSERT INTO ids VALUES (1);
INSERT INTO ids VALUES (2);
INSERT INTO ids VALUES (3);
+INSERT INTO ids VALUES (4),(5),(6),(7);
DELETE FROM ids WHERE id < 2;
SET mroonga_max_n_records_for_estimate = 1;
EXPLAIN SELECT * FROM ids WHERE id > 0;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test
index c3fb2bec507..76675fdeb76 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test
@@ -32,6 +32,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test
index 4b814e494f9..fb5c336cd4c 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test
@@ -32,6 +32,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6);
SELECT COUNT(*) FROM users WHERE age > 29;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test
index f26ed636b5a..c897d8d88de 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test
@@ -32,6 +32,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6);
SELECT COUNT(*) FROM users WHERE age >= 29;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test
index 0a7be348bd5..f03156d545b 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test
@@ -32,6 +32,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE age < 29;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test
index 190d242d932..20863705bf4 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test
@@ -32,6 +32,7 @@ INSERT INTO users (age) VALUES (28);
INSERT INTO users (age) VALUES (29);
INSERT INTO users (age) VALUES (30);
INSERT INTO users (age) VALUES (31);
+INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE age <= 29;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test
index 73754afda63..25d6c734fe1 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test
@@ -31,6 +31,7 @@ INSERT INTO users (id) VALUES (2);
INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
+INSERT INTO users (id) VALUES (32),(33),(34),(35),(36),(37);
SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test
index 44ba5ead9f2..f91cf19310f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test
@@ -31,9 +31,9 @@ INSERT INTO users (id) VALUES (2);
INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
+INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4);
SELECT COUNT(*) FROM users WHERE id > 3;
-
SHOW STATUS LIKE 'mroonga_count_skip';
DROP TABLE users;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test
index 8d442692950..dd374012257 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test
@@ -31,6 +31,7 @@ INSERT INTO users (id) VALUES (2);
INSERT INTO users (id) VALUES (3);
INSERT INTO users (id) VALUES (4);
INSERT INTO users (id) VALUES (5);
+INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4);
SELECT COUNT(*) FROM users WHERE id >= 3;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test
index d67a832ad95..79c75308c9f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test
@@ -29,6 +29,7 @@ CREATE TABLE ids (
INSERT INTO ids VALUES (1);
INSERT INTO ids VALUES (2);
INSERT INTO ids VALUES (3);
+INSERT INTO ids VALUES (4),(5),(6),(7);
DELETE FROM ids WHERE id < 2;
diff --git a/storage/mroonga/vendor/groonga/lib/alloc.c b/storage/mroonga/vendor/groonga/lib/alloc.c
index 2e28431595a..5e556b83712 100644
--- a/storage/mroonga/vendor/groonga/lib/alloc.c
+++ b/storage/mroonga/vendor/groonga/lib/alloc.c
@@ -310,13 +310,13 @@ grn_alloc_info_free(grn_ctx *ctx)
}
#endif /* USE_MEMORY_DEBUG */
-#define GRN_CTX_SEGMENT_SIZE (1<<22)
+#define GRN_CTX_SEGMENT_SIZE (1U <<22)
#define GRN_CTX_SEGMENT_MASK (GRN_CTX_SEGMENT_SIZE - 1)
-#define GRN_CTX_SEGMENT_WORD (1<<31)
-#define GRN_CTX_SEGMENT_VLEN (1<<30)
-#define GRN_CTX_SEGMENT_LIFO (1<<29)
-#define GRN_CTX_SEGMENT_DIRTY (1<<28)
+#define GRN_CTX_SEGMENT_WORD (1U <<31)
+#define GRN_CTX_SEGMENT_VLEN (1U <<30)
+#define GRN_CTX_SEGMENT_LIFO (1U <<29)
+#define GRN_CTX_SEGMENT_DIRTY (1U <<28)
void
grn_alloc_init_ctx_impl(grn_ctx *ctx)
@@ -400,8 +400,8 @@ grn_ctx_alloc(grn_ctx *ctx, size_t size, int flags,
header[0] = i;
header[1] = (int32_t) size;
} else {
- i = ctx->impl->currseg;
- mi = &ctx->impl->segs[i];
+ if ((i = ctx->impl->currseg) >= 0)
+ mi = &ctx->impl->segs[i];
if (i < 0 || size + mi->nref > GRN_CTX_SEGMENT_SIZE) {
for (i = 0, mi = ctx->impl->segs;; i++, mi++) {
if (i >= GRN_CTX_N_SEGMENTS) {
diff --git a/storage/mroonga/vendor/groonga/lib/db.c b/storage/mroonga/vendor/groonga/lib/db.c
index f3769f9aa4c..418335aaf00 100644
--- a/storage/mroonga/vendor/groonga/lib/db.c
+++ b/storage/mroonga/vendor/groonga/lib/db.c
@@ -12494,7 +12494,7 @@ grn_db_init_builtin_types(grn_ctx *ctx)
GRN_OBJ_KEY_VAR_SIZE, 1 << 16);
if (!obj || DB_OBJ(obj)->id != GRN_DB_TEXT) { return GRN_FILE_CORRUPT; }
obj = deftype(ctx, "LongText",
- GRN_OBJ_KEY_VAR_SIZE, 1 << 31);
+ GRN_OBJ_KEY_VAR_SIZE, 1U << 31);
if (!obj || DB_OBJ(obj)->id != GRN_DB_LONG_TEXT) { return GRN_FILE_CORRUPT; }
obj = deftype(ctx, "TokyoGeoPoint",
GRN_OBJ_KEY_GEO_POINT, sizeof(grn_geo_point));
diff --git a/storage/mroonga/vendor/groonga/lib/ii.c b/storage/mroonga/vendor/groonga/lib/ii.c
index cd5559e6958..2abd074796c 100644
--- a/storage/mroonga/vendor/groonga/lib/ii.c
+++ b/storage/mroonga/vendor/groonga/lib/ii.c
@@ -4315,7 +4315,7 @@ grn_ii_remove(grn_ctx *ctx, const char *path)
if (!path || strlen(path) > PATH_MAX - 4) { return GRN_INVALID_ARGUMENT; }
if ((rc = grn_io_remove(ctx, path))) { goto exit; }
grn_snprintf(buffer, PATH_MAX, PATH_MAX,
- "%s.c", path);
+ "%-.256s.c", path);
rc = grn_io_remove(ctx, buffer);
exit :
return rc;
@@ -4331,12 +4331,12 @@ grn_ii_truncate(grn_ctx *ctx, grn_ii *ii)
uint32_t flags;
if ((io_segpath = grn_io_path(ii->seg)) && *io_segpath != '\0') {
if (!(segpath = GRN_STRDUP(io_segpath))) {
- ERR(GRN_NO_MEMORY_AVAILABLE, "cannot duplicate path: <%s>", io_segpath);
+ ERR(GRN_NO_MEMORY_AVAILABLE, "cannot duplicate path: <%-.256s>", io_segpath);
return GRN_NO_MEMORY_AVAILABLE;
}
if ((io_chunkpath = grn_io_path(ii->chunk)) && *io_chunkpath != '\0') {
if (!(chunkpath = GRN_STRDUP(io_chunkpath))) {
- ERR(GRN_NO_MEMORY_AVAILABLE, "cannot duplicate path: <%s>", io_chunkpath);
+ ERR(GRN_NO_MEMORY_AVAILABLE, "cannot duplicate path: <%-.256s>", io_chunkpath);
return GRN_NO_MEMORY_AVAILABLE;
}
} else {
@@ -5144,7 +5144,7 @@ grn_ii_cursor_set_min(grn_ctx *ctx, grn_ii_cursor *c, grn_id min)
c->stat |= CHUNK_USED;
GRN_LOG(ctx, GRN_LOG_DEBUG,
"[ii][cursor][min] skip: %p: min(%u->%u): chunk(%u->%u): "
- "chunk-used(%s->%s)",
+ "chunk-used(%-.256s->%-.256s)",
c,
old_min, min,
old_chunk, c->curr_chunk,
@@ -5205,7 +5205,7 @@ grn_ii_cursor_next_internal(grn_ctx *ctx, grn_ii_cursor *c,
}
GRN_TEXT_PUTC(ctx, &buf, ')');
GRN_TEXT_PUTC(ctx, &buf, '\0');
- GRN_LOG(ctx, GRN_LOG_DEBUG, "posting(%d):%s", count, GRN_TEXT_VALUE(&buf));
+ GRN_LOG(ctx, GRN_LOG_DEBUG, "posting(%d):%-.256s", count, GRN_TEXT_VALUE(&buf));
GRN_OBJ_FIN(ctx, &buf);
}
*/
@@ -6451,7 +6451,7 @@ grn_ii_column_update(grn_ctx *ctx, grn_ii *ii, grn_id rid, unsigned int section,
ERR(GRN_INVALID_ARGUMENT,
"[ii][column][update][new] invalid object: "
"<%.*s>: "
- "<%s>(%#x)",
+ "<%-.256s>(%#x)",
name_size, name,
grn_obj_type_to_string(type),
type);
@@ -6564,7 +6564,7 @@ grn_ii_column_update(grn_ctx *ctx, grn_ii *ii, grn_id rid, unsigned int section,
ERR(GRN_INVALID_ARGUMENT,
"[ii][column][update][old] invalid object: "
"<%.*s>: "
- "<%s>(%#x)",
+ "<%-.256s>(%#x)",
name_size, name,
grn_obj_type_to_string(type),
type);
@@ -7833,7 +7833,7 @@ grn_ii_select_cursor_open(grn_ctx *ctx,
default :
ERR(GRN_INVALID_ARGUMENT,
"[ii][select][cursor][open] "
- "EXACT, FUZZY, NEAR and NEAR2 are only supported mode: %s",
+ "EXACT, FUZZY, NEAR and NEAR2 are only supported mode: %-.256s",
grn_operator_to_string(mode));
break;
}
@@ -7841,7 +7841,7 @@ grn_ii_select_cursor_open(grn_ctx *ctx,
cursor = GRN_CALLOC(sizeof(grn_ii_select_cursor));
if (!cursor) {
ERR(ctx->rc,
- "[ii][select][cursor][open] failed to allocate cursor: %s",
+ "[ii][select][cursor][open] failed to allocate cursor: %-.256s",
ctx->errbuf);
return NULL;
}
@@ -7851,7 +7851,7 @@ grn_ii_select_cursor_open(grn_ctx *ctx,
if (!(cursor->tis = GRN_MALLOC(sizeof(token_info *) * string_len * 2))) {
ERR(ctx->rc,
- "[ii][select][cursor][open] failed to allocate token info container: %s",
+ "[ii][select][cursor][open] failed to allocate token info container: %-.256s",
ctx->errbuf);
GRN_FREE(cursor);
return NULL;
@@ -7891,7 +7891,7 @@ grn_ii_select_cursor_open(grn_ctx *ctx,
case GRN_OP_NEAR :
if (!(cursor->bt = bt_open(ctx, cursor->n_tis))) {
ERR(ctx->rc,
- "[ii][select][cursor][open] failed to allocate btree: %s",
+ "[ii][select][cursor][open] failed to allocate btree: %-.256s",
ctx->errbuf);
grn_ii_select_cursor_close(ctx, cursor);
return NULL;
@@ -8114,7 +8114,7 @@ grn_ii_parse_regexp_query(grn_ctx *ctx,
if (char_len == 0) {
GRN_OBJ_FIN(ctx, &buffer);
ERR(GRN_INVALID_ARGUMENT,
- "%s invalid encoding character: <%.*s|%#x|>",
+ "%-.256s invalid encoding character: <%.*s|%#x|>",
log_tag,
(int)(current - string), string,
*current);
@@ -8515,7 +8515,7 @@ grn_ii_select_sequential_search(grn_ctx *ctx,
onig_error_code_to_str(message, onig_result, error_info);
GRN_LOG(ctx, GRN_LOG_WARNING,
"[ii][select][sequential] "
- "failed to create regular expression object: %s",
+ "failed to create regular expression object: %-.256s",
message);
processed = GRN_FALSE;
}
@@ -10148,7 +10148,7 @@ grn_ii_buffer_open(grn_ctx *ctx, grn_ii *ii,
ii_buffer->block_buf = GRN_MALLOCN(grn_id, II_BUFFER_BLOCK_SIZE);
if (ii_buffer->block_buf) {
grn_snprintf(ii_buffer->tmpfpath, PATH_MAX, PATH_MAX,
- "%sXXXXXX", grn_io_path(ii->seg));
+ "%-.256sXXXXXX", grn_io_path(ii->seg));
ii_buffer->block_buf_size = II_BUFFER_BLOCK_SIZE;
ii_buffer->tmpfd = grn_mkstemp(ii_buffer->tmpfpath);
if (ii_buffer->tmpfd != -1) {
@@ -10161,7 +10161,7 @@ grn_ii_buffer_open(grn_ctx *ctx, grn_ii *ii,
}
return ii_buffer;
} else {
- SERR("failed grn_mkstemp(%s)",
+ SERR("failed grn_mkstemp(%-.256s)",
ii_buffer->tmpfpath);
}
GRN_FREE(ii_buffer->block_buf);
@@ -10308,7 +10308,7 @@ grn_ii_buffer_commit(grn_ctx *ctx, grn_ii_buffer *ii_buffer)
ii_buffer->tmpfpath,
O_RDONLY | GRN_OPEN_FLAG_BINARY);
if (ii_buffer->tmpfd == -1) {
- ERRNO_ERR("failed to open path: <%s>", ii_buffer->tmpfpath);
+ ERRNO_ERR("failed to open path: <%-.256s>", ii_buffer->tmpfpath);
return ctx->rc;
}
{
@@ -10358,10 +10358,10 @@ grn_ii_buffer_commit(grn_ctx *ctx, grn_ii_buffer *ii_buffer)
grn_close(ii_buffer->tmpfd);
if (grn_unlink(ii_buffer->tmpfpath) == 0) {
GRN_LOG(ctx, GRN_LOG_INFO,
- "[ii][buffer][commit] removed temporary path: <%s>",
+ "[ii][buffer][commit] removed temporary path: <%-.256s>",
ii_buffer->tmpfpath);
} else {
- ERRNO_ERR("[ii][buffer][commit] failed to remove temporary path: <%s>",
+ ERRNO_ERR("[ii][buffer][commit] failed to remove temporary path: <%-.256s>",
ii_buffer->tmpfpath);
}
ii_buffer->tmpfd = -1;
@@ -10385,10 +10385,10 @@ grn_ii_buffer_close(grn_ctx *ctx, grn_ii_buffer *ii_buffer)
grn_close(ii_buffer->tmpfd);
if (grn_unlink(ii_buffer->tmpfpath) == 0) {
GRN_LOG(ctx, GRN_LOG_INFO,
- "[ii][buffer][close] removed temporary path: <%s>",
+ "[ii][buffer][close] removed temporary path: <%-.256s>",
ii_buffer->tmpfpath);
} else {
- ERRNO_ERR("[ii][buffer][close] failed to remove temporary path: <%s>",
+ ERRNO_ERR("[ii][buffer][close] failed to remove temporary path: <%-.256s>",
ii_buffer->tmpfpath);
}
}
@@ -11468,10 +11468,10 @@ grn_ii_builder_fin(grn_ctx *ctx, grn_ii_builder *builder)
grn_close(builder->fd);
if (grn_unlink(builder->path) == 0) {
GRN_LOG(ctx, GRN_LOG_INFO,
- "[ii][builder][fin] removed path: <%s>",
+ "[ii][builder][fin] removed path: <%-.256s>",
builder->path);
} else {
- ERRNO_ERR("[ii][builder][fin] failed to remove path: <%s>",
+ ERRNO_ERR("[ii][builder][fin] failed to remove path: <%-.256s>",
builder->path);
}
}
@@ -11779,10 +11779,10 @@ static grn_rc
grn_ii_builder_create_file(grn_ctx *ctx, grn_ii_builder *builder)
{
grn_snprintf(builder->path, PATH_MAX, PATH_MAX,
- "%sXXXXXX", grn_io_path(builder->ii->seg));
+ "%-.256sXXXXXX", grn_io_path(builder->ii->seg));
builder->fd = grn_mkstemp(builder->path);
if (builder->fd == -1) {
- SERR("failed to create a temporary file: path = \"%s\"",
+ SERR("failed to create a temporary file: path = \"%-.256s\"",
builder->path);
return ctx->rc;
}
diff --git a/storage/mroonga/vendor/groonga/lib/pat.c b/storage/mroonga/vendor/groonga/lib/pat.c
index 642173e2fdc..01f6108fbd0 100644
--- a/storage/mroonga/vendor/groonga/lib/pat.c
+++ b/storage/mroonga/vendor/groonga/lib/pat.c
@@ -899,7 +899,7 @@ chop(grn_ctx *ctx, grn_pat *pat, const char **key, const char *end, uint32_t *lk
case GRN_OBJ_KEY_FLOAT :\
if ((size) == sizeof(int64_t)) {\
int64_t v = *(int64_t *)(key);\
- v ^= ((v >> 63)|(1LL << 63));\
+ v ^= ((v >> 63)|(1ULL << 63));\
grn_hton((keybuf), &v, (size));\
}\
break;\
@@ -924,7 +924,7 @@ chop(grn_ctx *ctx, grn_pat *pat, const char **key, const char *end, uint32_t *lk
if ((size) == sizeof(int64_t)) {\
int64_t v;\
grn_hton(&v, (key), (size));\
- *((int64_t *)(keybuf)) = v ^ (((v^(1LL<<63))>> 63)|(1LL<<63)); \
+ *((int64_t *)(keybuf)) = v ^ ((((int64_t)(v^(1ULL<<63)))>> 63)|(1ULL<<63)); \
}\
break;\
}\
diff --git a/storage/mroonga/vendor/groonga/lib/proc/proc_select.c b/storage/mroonga/vendor/groonga/lib/proc/proc_select.c
index 605fd42239f..1f2a5005401 100644
--- a/storage/mroonga/vendor/groonga/lib/proc/proc_select.c
+++ b/storage/mroonga/vendor/groonga/lib/proc/proc_select.c
@@ -2989,7 +2989,8 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
char *cp = cache_key;
#define PUT_CACHE_KEY(string) \
- grn_memcpy(cp, (string).value, (string).length); \
+ if ((string).value) \
+ grn_memcpy(cp, (string).value, (string).length); \
cp += (string).length; \
*cp++ = '\0'
diff --git a/storage/mroonga/vendor/groonga/lib/str.c b/storage/mroonga/vendor/groonga/lib/str.c
index 6b2d17769ca..4f0a3a98699 100644
--- a/storage/mroonga/vendor/groonga/lib/str.c
+++ b/storage/mroonga/vendor/groonga/lib/str.c
@@ -46,7 +46,7 @@ grn_str_charlen_utf8(grn_ctx *ctx, const unsigned char *str, const unsigned char
if (*str & 0x80) {
int i;
int len;
- GRN_BIT_SCAN_REV(~(*str << 24), len);
+ GRN_BIT_SCAN_REV(~(((uint) *str) << 24), len);
len = 31 - len;
if ((unsigned int)(len - 2) >= 3) { /* (len == 1 || len >= 5) */
GRN_LOG(ctx, GRN_LOG_WARNING,
@@ -1963,7 +1963,8 @@ grn_bulk_write(grn_ctx *ctx, grn_obj *buf, const char *str, unsigned int len)
if ((rc = grn_bulk_resize(ctx, buf, GRN_BULK_VSIZE(buf) + len))) { return rc; }
}
curr = GRN_BULK_CURR(buf);
- grn_memcpy(curr, str, len);
+ if (str)
+ grn_memcpy(curr, str, len);
GRN_BULK_INCR_LEN(buf, len);
return rc;
}
diff --git a/storage/mroonga/vendor/groonga/vendor/plugins/CMakeLists.txt b/storage/mroonga/vendor/groonga/vendor/plugins/CMakeLists.txt
index e4428b577f8..199baee8e86 100644
--- a/storage/mroonga/vendor/groonga/vendor/plugins/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/vendor/plugins/CMakeLists.txt
@@ -15,11 +15,12 @@
file(GLOB
PLUGIN_CMAKE_LISTS_LIST
+ RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/*/CMakeLists.txt")
if(PLUGIN_CMAKE_LISTS_LIST)
foreach(PLUGIN_CMAKE_LISTS "${PLUGIN_CMAKE_LISTS_LIST}")
string(REGEX REPLACE
- "(^${CMAKE_CURRENT_SOURCE_DIR}/+|/+CMakeLists\\.txt$)" ""
+ "(/+CMakeLists\\.txt$)" ""
PLUGIN_DIR
"${PLUGIN_CMAKE_LISTS}")
add_subdirectory("${PLUGIN_DIR}")
diff --git a/storage/myisam/TODO b/storage/myisam/TODO
deleted file mode 100644
index cad9486e1bb..00000000000
--- a/storage/myisam/TODO
+++ /dev/null
@@ -1,7 +0,0 @@
-TODO:
-
-- Let packisam find the optimal way to store keys.
-- kill when using 'myisamchk' should remove all temporary files.
-- Text search index
- (Sergei A. Golub is working on this)
-- Add '%' packed to myisamchk for compressed tables with blobs.
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index d43ba828957..231165adace 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -96,6 +96,10 @@ static MYSQL_THDVAR_ENUM(stats_method, PLUGIN_VAR_RQCMDARG,
"and NULLS_IGNORED", NULL, NULL,
MI_STATS_METHOD_NULLS_NOT_EQUAL, &myisam_stats_method_typelib);
+const char *MI_CHECK_INFO= "info";
+const char *MI_CHECK_WARNING= "warning";
+const char *MI_CHECK_ERROR= "error";
+
#ifndef DBUG_OFF
/**
Causes the thread to wait in a spin lock for a query kill signal.
@@ -130,6 +134,20 @@ static handler *myisam_create_handler(handlerton *hton,
return new (mem_root) ha_myisam(hton, table);
}
+
+static void mi_check_print(HA_CHECK *param, const char* msg_type,
+ const char *msgbuf)
+{
+ if (msg_type == MI_CHECK_INFO)
+ sql_print_information("%s.%s: %s", param->db_name, param->table_name,
+ msgbuf);
+ else if (msg_type == MI_CHECK_WARNING)
+ sql_print_warning("%s.%s: %s", param->db_name, param->table_name,
+ msgbuf);
+ else
+ sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+}
+
// collect errors printed by mi_check routines
static void mi_check_print_msg(HA_CHECK *param, const char* msg_type,
@@ -151,16 +169,21 @@ static void mi_check_print_msg(HA_CHECK *param, const char* msg_type,
if (!thd->vio_ok())
{
- sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+ mi_check_print(param, msg_type, msgbuf);
return;
}
if (param->testflag & (T_CREATE_MISSING_KEYS | T_SAFE_REPAIR |
T_AUTO_REPAIR))
{
- my_message(ER_NOT_KEYFILE, msgbuf, MYF(MY_WME));
+ myf flag= 0;
+ if (msg_type == MI_CHECK_INFO)
+ flag= ME_NOTE;
+ else if (msg_type == MI_CHECK_WARNING)
+ flag= ME_WARNING;
+ my_message(ER_NOT_KEYFILE, msgbuf, MYF(flag));
if (thd->variables.log_warnings > 2 && ! thd->log_all_errors)
- sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+ mi_check_print(param, msg_type, msgbuf);
return;
}
length=(uint) (strxmov(name, param->db_name,".",param->table_name,NullS) -
@@ -185,7 +208,7 @@ static void mi_check_print_msg(HA_CHECK *param, const char* msg_type,
sql_print_error("Failed on my_net_write, writing to stderr instead: %s\n",
msgbuf);
else if (thd->variables.log_warnings > 2)
- sql_print_error("%s.%s: %s", param->db_name, param->table_name, msgbuf);
+ mi_check_print(param, msg_type, msgbuf);
if (param->need_print_msg_lock)
mysql_mutex_unlock(&param->print_msg_mutex);
@@ -592,7 +615,7 @@ void mi_check_print_error(HA_CHECK *param, const char *fmt,...)
return;
va_list args;
va_start(args, fmt);
- mi_check_print_msg(param, "error", fmt, args);
+ mi_check_print_msg(param, MI_CHECK_ERROR, fmt, args);
va_end(args);
}
@@ -600,7 +623,7 @@ void mi_check_print_info(HA_CHECK *param, const char *fmt,...)
{
va_list args;
va_start(args, fmt);
- mi_check_print_msg(param, "info", fmt, args);
+ mi_check_print_msg(param, MI_CHECK_INFO, fmt, args);
param->note_printed= 1;
va_end(args);
}
@@ -611,7 +634,7 @@ void mi_check_print_warning(HA_CHECK *param, const char *fmt,...)
param->out_flag|= O_DATA_LOST;
va_list args;
va_start(args, fmt);
- mi_check_print_msg(param, "warning", fmt, args);
+ mi_check_print_msg(param, MI_CHECK_WARNING, fmt, args);
va_end(args);
}
@@ -665,6 +688,8 @@ my_bool mi_killed_in_mariadb(MI_INFO *info)
static int compute_vcols(MI_INFO *info, uchar *record, int keynum)
{
+ /* This mutex is needed for parallel repair */
+ mysql_mutex_lock(&info->s->intern_lock);
TABLE *table= (TABLE*)(info->external_ref);
table->move_fields(table->field, record, table->field[0]->record_ptr());
if (keynum == -1) // update all vcols
@@ -672,6 +697,7 @@ static int compute_vcols(MI_INFO *info, uchar *record, int keynum)
int error= table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_READ);
if (table->update_virtual_fields(table->file, VCOL_UPDATE_INDEXED))
error= 1;
+ mysql_mutex_unlock(&info->s->intern_lock);
return error;
}
// update only one key
@@ -680,9 +706,10 @@ static int compute_vcols(MI_INFO *info, uchar *record, int keynum)
for (; kp < end; kp++)
{
Field *f= table->field[kp->fieldnr - 1];
- if (f->vcol_info)
+ if (f->vcol_info && !f->vcol_info->stored_in_db)
table->update_virtual_field(f);
}
+ mysql_mutex_unlock(&info->s->intern_lock);
return 0;
}
@@ -699,7 +726,7 @@ ha_myisam::ha_myisam(handlerton *hton, TABLE_SHARE *table_arg)
HA_CAN_INSERT_DELAYED | HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS |
HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT | HA_CAN_REPAIR |
HA_CAN_TABLES_WITHOUT_ROLLBACK),
- can_enable_indexes(1)
+ can_enable_indexes(0)
{}
handler *ha_myisam::clone(const char *name __attribute__((unused)),
@@ -747,7 +774,8 @@ ulong ha_myisam::index_flags(uint inx, uint part, bool all_parts) const
else
{
flags= HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE |
- HA_READ_ORDER | HA_KEYREAD_ONLY | HA_DO_INDEX_COND_PUSHDOWN;
+ HA_READ_ORDER | HA_KEYREAD_ONLY | HA_DO_INDEX_COND_PUSHDOWN |
+ HA_DO_RANGE_FILTER_PUSHDOWN;
}
return flags;
}
@@ -911,7 +939,7 @@ int ha_myisam::close(void)
return mi_close(tmp);
}
-int ha_myisam::write_row(uchar *buf)
+int ha_myisam::write_row(const uchar *buf)
{
/*
If we have an auto_increment column and we are writing a changed row
@@ -932,7 +960,7 @@ void ha_myisam::setup_vcols_for_repair(HA_CHECK *param)
if (!table->vfield)
return;
- if (file->s->base.reclength == file->s->vreclength)
+ if (file->s->base.reclength == file->s->vreclength)
{
bool indexed_vcols= false;
ulong new_vreclength= file->s->vreclength;
@@ -940,7 +968,8 @@ void ha_myisam::setup_vcols_for_repair(HA_CHECK *param)
{
if (!(*vf)->stored_in_db())
{
- uint vf_end= (*vf)->offset(table->record[0]) + (*vf)->pack_length_in_rec();
+ uint vf_end= ((*vf)->offset(table->record[0]) +
+ (*vf)->pack_length_in_rec());
set_if_bigger(new_vreclength, vf_end);
indexed_vcols|= ((*vf)->flags & PART_KEY_FLAG) != 0;
}
@@ -953,14 +982,14 @@ void ha_myisam::setup_vcols_for_repair(HA_CHECK *param)
!table->s->stored_fields);
param->fix_record= compute_vcols;
table->use_all_columns();
- table->vcol_set= &table->s->all_set;
}
void ha_myisam::restore_vcos_after_repair()
{
if (file->s->base.reclength < file->s->vreclength)
{
- table->move_fields(table->field, table->record[0], table->field[0]->record_ptr());
+ table->move_fields(table->field, table->record[0],
+ table->field[0]->record_ptr());
table->default_column_bitmaps();
}
}
@@ -1044,6 +1073,15 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
mysql_mutex_unlock(&share->intern_lock);
info(HA_STATUS_NO_LOCK | HA_STATUS_TIME | HA_STATUS_VARIABLE |
HA_STATUS_CONST);
+ /*
+ Write a 'table is ok' message to error log if table is ok and
+ we have written to error log that table was getting checked
+ */
+ if (!error && !(table->db_stat & HA_READ_ONLY) &&
+ !mi_is_crashed(file) && thd->error_printed_to_log &&
+ (param->warning_printed || param->error_printed ||
+ param->note_printed))
+ mi_check_print_info(param, "Table is fixed");
}
}
else if (!mi_is_crashed(file) && !thd->killed)
@@ -1692,6 +1730,7 @@ void ha_myisam::start_bulk_insert(ha_rows rows, uint flags)
THD *thd= table->in_use;
ulong size= MY_MIN(thd->variables.read_buff_size,
(ulong) (table->s->avg_row_length*rows));
+ bool index_disabled= 0;
DBUG_PRINT("info",("start_bulk_insert: rows %lu size %lu",
(ulong) rows, size));
@@ -1715,21 +1754,54 @@ void ha_myisam::start_bulk_insert(ha_rows rows, uint flags)
if (file->open_flag & HA_OPEN_INTERNAL_TABLE)
{
file->update|= HA_STATE_CHANGED;
+ index_disabled= file->s->base.keys > 0;
mi_clear_all_keys_active(file->s->state.key_map);
}
else
{
my_bool all_keys= MY_TEST(flags & HA_CREATE_UNIQUE_INDEX_BY_SORT);
- mi_disable_indexes_for_rebuild(file, rows, all_keys);
+ MYISAM_SHARE *share=file->s;
+ MI_KEYDEF *key=share->keyinfo;
+ uint i;
+ /*
+ Deactivate all indexes that can be recreated fast.
+ These include packed keys on which sorting will use more temporary
+ space than the max allowed file length or for which the unpacked keys
+ will take much more space than packed keys.
+ Note that 'rows' may be zero for the case when we don't know how many
+ rows we will put into the file.
+ Long Unique Index (HA_KEY_ALG_LONG_HASH) will not be disabled because
+ there unique property is enforced at the time of ha_write_row
+ (check_duplicate_long_entries). So we need active index at the time of
+ insert.
+ */
+ DBUG_ASSERT(file->state->records == 0 &&
+ (!rows || rows >= MI_MIN_ROWS_TO_DISABLE_INDEXES));
+ for (i=0 ; i < share->base.keys ; i++,key++)
+ {
+ if (!(key->flag & (HA_SPATIAL | HA_AUTO_KEY)) &&
+ ! mi_too_big_key_for_sort(key,rows) && file->s->base.auto_key != i+1 &&
+ (all_keys || !(key->flag & HA_NOSAME)) &&
+ table->key_info[i].algorithm != HA_KEY_ALG_LONG_HASH)
+ {
+ mi_clear_key_active(share->state.key_map, i);
+ index_disabled= 1;
+ file->update|= HA_STATE_CHANGED;
+ file->create_unique_index_by_sort= all_keys;
+ }
+ }
}
}
else
+ {
if (!file->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT))
{
mi_init_bulk_insert(file, (size_t) thd->variables.bulk_insert_buff_size,
rows);
}
+ }
+ can_enable_indexes= index_disabled;
DBUG_VOID_RETURN;
}
@@ -1781,6 +1853,7 @@ int ha_myisam::end_bulk_insert()
file->s->state.changed&= ~(STATE_CRASHED|STATE_CRASHED_ON_REPAIR);
}
}
+ can_enable_indexes= 0;
}
DBUG_PRINT("exit", ("first_error: %d", first_error));
DBUG_RETURN(first_error);
@@ -1818,7 +1891,7 @@ bool ha_myisam::check_and_repair(THD *thd)
sql_print_information("Making backup of index file %s with extension '%s'",
file->s->index_file_name, buff);
mi_make_backup_of_index(file, check_opt.start_time,
- MYF(MY_WME | ME_JUST_WARNING));
+ MYF(MY_WME | ME_WARNING));
}
check_opt.flags=
(((myisam_recover_options &
@@ -1856,6 +1929,9 @@ int ha_myisam::index_init(uint idx, bool sorted)
active_index=idx;
if (pushed_idx_cond_keyno == idx)
mi_set_index_cond_func(file, handler_index_cond_check, this);
+ if (pushed_rowid_filter)
+ mi_set_rowid_filter_func(file, handler_rowid_filter_check,
+ handler_rowid_filter_is_active, this);
return 0;
}
@@ -1867,6 +1943,7 @@ int ha_myisam::index_end()
//pushed_idx_cond_keyno= MAX_KEY;
mi_set_index_cond_func(file, NULL, 0);
in_range_check_pushed_down= FALSE;
+ mi_set_rowid_filter_func(file, NULL, NULL, 0);
ds_mrr.dsmrr_close();
#if !defined(DBUG_OFF) && defined(SQL_SELECT_FIXED_FOR_UPDATE)
file->update&= ~HA_STATE_AKTIV; // Forget active row
@@ -1902,6 +1979,9 @@ int ha_myisam::index_read_idx_map(uchar *buf, uint index, const uchar *key,
end_range= NULL;
if (index == pushed_idx_cond_keyno)
mi_set_index_cond_func(file, handler_index_cond_check, this);
+ if (pushed_rowid_filter)
+ mi_set_rowid_filter_func(file, handler_rowid_filter_check,
+ handler_rowid_filter_is_active, this);
res= mi_rkey(file, buf, index, key, keypart_map, find_flag);
mi_set_index_cond_func(file, NULL, 0);
return res;
@@ -2562,6 +2642,14 @@ Item *ha_myisam::idx_cond_push(uint keyno_arg, Item* idx_cond_arg)
return NULL;
}
+bool ha_myisam::rowid_filter_push(Rowid_filter* rowid_filter)
+{
+ pushed_rowid_filter= rowid_filter;
+ mi_set_rowid_filter_func(file, handler_rowid_filter_check,
+ handler_rowid_filter_is_active, this);
+ return false;
+}
+
struct st_mysql_storage_engine myisam_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
@@ -2652,7 +2740,7 @@ my_bool ha_myisam::register_query_cache_table(THD *thd, const char *table_name,
If the table size is unknown the SELECT statement can't be cached.
- When concurrent inserts are disabled at table open, mi_open()
+ When concurrent inserts are disabled at table open, mi_ondopen()
does not assign a get_status() function. In this case the local
("current") status is never updated. We would wrongly think that
we cannot cache the statement.
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index c6e26cf0030..70c99a617f6 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -38,7 +38,7 @@ extern const char *myisam_recover_names[];
extern ulonglong myisam_recover_options;
C_MODE_START
-ICP_RESULT index_cond_func_myisam(void *arg);
+check_result_t index_cond_func_myisam(void *arg);
C_MODE_END
class ha_myisam: public handler
@@ -69,7 +69,7 @@ class ha_myisam: public handler
void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share);
int open(const char *name, int mode, uint test_if_locked);
int close(void);
- int write_row(uchar * buf);
+ int write_row(const uchar * buf);
int update_row(const uchar * old_data, const uchar * new_data);
int delete_row(const uchar * buf);
int index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map,
@@ -171,7 +171,9 @@ public:
/* Index condition pushdown implementation */
Item *idx_cond_push(uint keyno, Item* idx_cond);
+ bool rowid_filter_push(Rowid_filter* rowid_filter);
+
private:
DsMrr_impl ds_mrr;
- friend ICP_RESULT index_cond_func_myisam(void *arg);
+ friend check_result_t index_cond_func_myisam(void *arg);
};
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index 9b4067ffa0c..3822a929fcf 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -99,6 +99,9 @@ int chk_status(HA_CHECK *param, register MI_INFO *info)
{
MYISAM_SHARE *share=info->s;
+ /* Protection for HA_EXTRA_FLUSH */
+ mysql_mutex_lock(&share->intern_lock);
+
if (mi_is_crashed_on_repair(info))
mi_check_print_warning(param,
"Table is marked as crashed and last repair failed");
@@ -118,6 +121,7 @@ int chk_status(HA_CHECK *param, register MI_INFO *info)
if (param->testflag & T_UPDATE_STATE)
param->warning_printed=save;
}
+ mysql_mutex_unlock(&share->intern_lock);
return 0;
}
@@ -4673,7 +4677,7 @@ static ha_checksum mi_byte_checksum(const uchar *buf, uint length)
return crc;
}
-static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows)
+my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows)
{
uint key_maxlength=key->maxlength;
if (key->flag & HA_FULLTEXT)
@@ -4688,38 +4692,6 @@ static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows)
}
/*
- Deactivate all indexes that can be recreated fast.
- These include packed keys on which sorting will use more temporary
- space than the max allowed file length or for which the unpacked keys
- will take much more space than packed keys.
- Note that 'rows' may be zero for the case when we don't know how many
- rows we will put into the file.
- */
-
-void mi_disable_indexes_for_rebuild(MI_INFO *info, ha_rows rows,
- my_bool all_keys)
-{
- MYISAM_SHARE *share=info->s;
- MI_KEYDEF *key=share->keyinfo;
- uint i;
-
- DBUG_ASSERT(info->state->records == 0 &&
- (!rows || rows >= MI_MIN_ROWS_TO_DISABLE_INDEXES));
- for (i=0 ; i < share->base.keys ; i++,key++)
- {
- if (!(key->flag & (HA_SPATIAL | HA_AUTO_KEY)) &&
- ! mi_too_big_key_for_sort(key,rows) && info->s->base.auto_key != i+1 &&
- (all_keys || !(key->flag & HA_NOSAME)))
- {
- mi_clear_key_active(share->state.key_map, i);
- info->update|= HA_STATE_CHANGED;
- info->create_unique_index_by_sort= all_keys;
- }
- }
-}
-
-
-/*
Return TRUE if we can use repair by sorting
One can set the force argument to force to use sorting
even if the temporary file would be quite big!
@@ -4789,7 +4761,7 @@ static int replace_data_file(HA_CHECK *param, MI_INFO *info, File new_file)
my_create_backup_name(buff, "", param->backup_time);
my_printf_error(ER_GET_ERRMSG,
"Making backup of data file %s with extension '%s'",
- MYF(ME_JUST_INFO | ME_NOREFRESH), share->data_file_name,
+ MYF(ME_NOTE | ME_ERROR_LOG), share->data_file_name,
buff);
}
diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c
index 07592ced5db..67cb714e7bf 100644
--- a/storage/myisam/mi_extra.c
+++ b/storage/myisam/mi_extra.c
@@ -331,7 +331,11 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
if (!share->temporary)
flush_key_blocks(share->key_cache, share->kfile, &share->dirty_part_map,
FLUSH_KEEP);
+ mysql_mutex_lock(&share->intern_lock);
+ /* Tell mi_lock_database() that we locked the intern_lock mutex */
+ info->intern_lock_locked= 1;
_mi_decrement_open_count(info);
+ info->intern_lock_locked= 0;
if (share->not_flushed)
{
share->not_flushed=0;
@@ -348,6 +352,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
}
if (share->base.blobs)
mi_alloc_rec_buff(info, -1, &info->rec_buff);
+ mysql_mutex_unlock(&share->intern_lock);
break;
case HA_EXTRA_NORMAL: /* These aren't in use */
info->quick_mode=0;
@@ -417,6 +422,16 @@ void mi_set_index_cond_func(MI_INFO *info, index_cond_func_t func,
info->index_cond_func_arg= func_arg;
}
+void mi_set_rowid_filter_func(MI_INFO *info,
+ rowid_filter_func_t check_func,
+ rowid_filter_is_active_func_t is_active_func,
+ void *func_arg)
+{
+ info->rowid_filter_func= check_func;
+ info->rowid_filter_is_active_func= is_active_func;
+ info->rowid_filter_func_arg= func_arg;
+}
+
/*
Start/Stop Inserting Duplicates Into a Table, WL#1648.
*/
diff --git a/storage/myisam/mi_info.c b/storage/myisam/mi_info.c
index 29d2283bc85..50cb5439472 100644
--- a/storage/myisam/mi_info.c
+++ b/storage/myisam/mi_info.c
@@ -127,7 +127,7 @@ void mi_report_error(int errcode, const char *file_name)
if ((lgt= strlen(file_name)) > 64)
file_name+= lgt - 64;
- my_error(errcode, MYF(ME_NOREFRESH), file_name);
+ my_error(errcode, MYF(ME_ERROR_LOG), file_name);
DBUG_VOID_RETURN;
}
diff --git a/storage/myisam/mi_key.c b/storage/myisam/mi_key.c
index 64eedde5f6d..7d263d9fc7b 100644
--- a/storage/myisam/mi_key.c
+++ b/storage/myisam/mi_key.c
@@ -493,45 +493,91 @@ int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf)
}
+static
+int mi_unpack_index_tuple(MI_INFO *info, uint keynr, uchar *record)
+{
+ if (_mi_put_key_in_record(info, keynr, FALSE, record))
+ {
+ /* Impossible case; Can only happen if bug in code */
+ mi_print_error(info->s, HA_ERR_CRASHED);
+ info->lastpos= HA_OFFSET_ERROR; /* No active record */
+ my_errno= HA_ERR_CRASHED;
+ return 1;
+ }
+ return 0;
+}
+
+
+static int mi_check_rowid_filter_is_active(MI_INFO *info)
+{
+ if (info->rowid_filter_is_active_func == NULL)
+ return 0;
+ return info->rowid_filter_is_active_func(info->rowid_filter_func_arg);
+}
+
+
/*
- Save current key tuple to record and call index condition check function
+ Check the current index tuple: Check ICP condition and/or Rowid Filter
SYNOPSIS
- mi_check_index_cond()
+ mi_check_index_tuple()
info MyISAM handler
keynr Index we're running a scan on
record Record buffer to use (it is assumed that index check function
will look for column values there)
RETURN
- ICP_ERROR Error
- ICP_NO_MATCH Index condition is not satisfied, continue scanning
- ICP_MATCH Index condition is satisfied
- ICP_OUT_OF_RANGE Index condition is not satisfied, end the scan.
+ Check result according to check_result_t definition
*/
-ICP_RESULT mi_check_index_cond(register MI_INFO *info, uint keynr,
- uchar *record)
+check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record)
{
- ICP_RESULT res;
- if (_mi_put_key_in_record(info, keynr, FALSE, record))
+ int need_unpack= TRUE;
+ check_result_t res= CHECK_POS;
+
+ if (info->index_cond_func)
{
- /* Impossible case; Can only happen if bug in code */
- mi_print_error(info->s, HA_ERR_CRASHED);
- info->lastpos= HA_OFFSET_ERROR; /* No active record */
- my_errno= HA_ERR_CRASHED;
- res= ICP_ERROR;
+ if (mi_unpack_index_tuple(info, keynr, record))
+ res= CHECK_ERROR;
+ else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
+ CHECK_OUT_OF_RANGE)
+ {
+ /* We got beyond the end of scanned range */
+ info->lastpos= HA_OFFSET_ERROR; /* No active record */
+ my_errno= HA_ERR_END_OF_FILE;
+ }
+
+ /*
+ If we got an error, out-of-range condition, or ICP condition computed to
+ FALSE - we don't need to check the Rowid Filter.
+ */
+ if (res != CHECK_POS)
+ return res;
+
+ need_unpack= FALSE;
}
- else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
- ICP_OUT_OF_RANGE)
+
+ /* Check the Rowid Filter, if present */
+ if (mi_check_rowid_filter_is_active(info))
{
- /* We got beyond the end of scanned range */
- info->lastpos= HA_OFFSET_ERROR; /* No active record */
- my_errno= HA_ERR_END_OF_FILE;
+ /* Unpack the index tuple if we haven't done it already */
+ if (need_unpack && mi_unpack_index_tuple(info, keynr, record))
+ res= CHECK_ERROR;
+ else
+ {
+ if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) ==
+ CHECK_OUT_OF_RANGE)
+ {
+ /* We got beyond the end of scanned range */
+ info->lastpos= HA_OFFSET_ERROR; /* No active record */
+ my_errno= HA_ERR_END_OF_FILE;
+ }
+ }
}
return res;
}
+
/*
Retrieve auto_increment info
diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c
index 55185b67535..713ba0a3851 100644
--- a/storage/myisam/mi_locking.c
+++ b/storage/myisam/mi_locking.c
@@ -53,7 +53,8 @@ int mi_lock_database(MI_INFO *info, int lock_type)
error= 0;
DBUG_EXECUTE_IF ("mi_lock_database_failure", error= EINVAL;);
- mysql_mutex_lock(&share->intern_lock);
+ if (!info->intern_lock_locked)
+ mysql_mutex_lock(&share->intern_lock);
if (share->kfile >= 0) /* May only be false on windows */
{
switch (lock_type) {
@@ -261,7 +262,8 @@ int mi_lock_database(MI_INFO *info, int lock_type)
}
}
#endif
- mysql_mutex_unlock(&share->intern_lock);
+ if (!info->intern_lock_locked)
+ mysql_mutex_unlock(&share->intern_lock);
if (mark_crashed)
mi_mark_crashed(info);
DBUG_RETURN(error);
diff --git a/storage/myisam/mi_range.c b/storage/myisam/mi_range.c
index de76c4cee93..7292f3c83b8 100644
--- a/storage/myisam/mi_range.c
+++ b/storage/myisam/mi_range.c
@@ -1,5 +1,6 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates
+ Copyright (c) 2010, 2020, 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
@@ -22,9 +23,10 @@
#include "myisamdef.h"
#include "rt_index.h"
-static ha_rows _mi_record_pos(MI_INFO *, const uchar *, key_part_map,
- enum ha_rkey_function);
-static double _mi_search_pos(MI_INFO *,MI_KEYDEF *,uchar *, uint,uint,my_off_t);
+static double _mi_record_pos(MI_INFO *, const uchar *, key_part_map,
+ enum ha_rkey_function);
+static double _mi_search_pos(MI_INFO *,MI_KEYDEF *,uchar *, uint,uint,
+ my_off_t,my_bool);
static uint _mi_keynr(MI_INFO *info,MI_KEYDEF *,uchar *, uchar *,uint *);
/*
@@ -48,7 +50,8 @@ static uint _mi_keynr(MI_INFO *info,MI_KEYDEF *,uchar *, uchar *,uint *);
ha_rows mi_records_in_range(MI_INFO *info, int inx,
key_range *min_key, key_range *max_key)
{
- ha_rows start_pos,end_pos,res;
+ ha_rows res;
+ double start_pos,end_pos,diff;
DBUG_ENTER("mi_records_in_range");
if ((inx = _mi_check_index(info,inx)) < 0)
@@ -94,16 +97,27 @@ ha_rows mi_records_in_range(MI_INFO *info, int inx,
#endif
case HA_KEY_ALG_BTREE:
default:
- start_pos= (min_key ? _mi_record_pos(info, min_key->key,
- min_key->keypart_map, min_key->flag)
- : (ha_rows) 0);
+ start_pos= (min_key ?_mi_record_pos(info, min_key->key,
+ min_key->keypart_map, min_key->flag)
+ : (double) 0);
end_pos= (max_key ? _mi_record_pos(info, max_key->key,
max_key->keypart_map, max_key->flag)
- : info->state->records + (ha_rows) 1);
+ : (double) info->state->records);
res= (end_pos < start_pos ? (ha_rows) 0 :
- (end_pos == start_pos ? (ha_rows) 1 : end_pos-start_pos));
- if (start_pos == HA_POS_ERROR || end_pos == HA_POS_ERROR)
+ (end_pos == start_pos ? (ha_rows) 1 : (ha_rows) (end_pos-start_pos)));
+ if (start_pos == (double) HA_POS_ERROR || end_pos == (double) HA_POS_ERROR)
res=HA_POS_ERROR;
+ else
+ {
+ diff= end_pos - start_pos;
+ if (diff >= 0)
+ {
+ if (!(res= (ha_rows) (diff + 0.5)))
+ res= 1;
+ }
+ else
+ res= 0;
+ }
}
if (info->s->concurrent_insert)
@@ -115,11 +129,25 @@ ha_rows mi_records_in_range(MI_INFO *info, int inx,
}
- /* Find relative position (in records) for key in index-tree */
+/*
+ To find an approximate relative position of a key tuple among all index
+ key tuples would not be hard if we considered B-trees where all key
+ tuples were contained only in leaf nodes. If we consider a B-tree where
+ key tuples are stored also in non-leaf nodes we have to convert such
+ tree into the tree of the first type. The transformation procedure is
+ simple: the key tuple k goes alter the last key tuple in the most right
+ sub-tree pointer to which is coupled with k. As a result of this
+ transformation each leaf node except the most right one in the tree will
+ contain one extra key tuple following those originally belonging to
+ the leaf.
+*/
+
+
+/* Find relative position (in records) for key in index-tree */
-static ha_rows _mi_record_pos(MI_INFO *info, const uchar *key,
- key_part_map keypart_map,
- enum ha_rkey_function search_flag)
+static double _mi_record_pos(MI_INFO *info, const uchar *key,
+ key_part_map keypart_map,
+ enum ha_rkey_function search_flag)
{
uint inx=(uint) info->lastinx, nextflag, key_len;
MI_KEYDEF *keyinfo=info->s->keyinfo+inx;
@@ -175,13 +203,13 @@ static ha_rows _mi_record_pos(MI_INFO *info, const uchar *key,
*/
pos=_mi_search_pos(info,keyinfo,key_buff,key_len,
nextflag | SEARCH_SAVE_BUFF | SEARCH_UPDATE,
- info->s->state.key_root[inx]);
+ info->s->state.key_root[inx], TRUE);
if (pos >= 0.0)
{
- DBUG_PRINT("exit",("pos: %ld",(ulong) (pos*info->state->records)));
- DBUG_RETURN((ulong) (pos*info->state->records+0.5));
+ DBUG_PRINT("exit",("pos: %g",(pos*info->state->records)));
+ DBUG_RETURN(pos*info->state->records);
}
- DBUG_RETURN(HA_POS_ERROR);
+ DBUG_RETURN((double) (HA_POS_ERROR));
}
@@ -191,7 +219,7 @@ static ha_rows _mi_record_pos(MI_INFO *info, const uchar *key,
static double _mi_search_pos(register MI_INFO *info,
register MI_KEYDEF *keyinfo,
uchar *key, uint key_len, uint nextflag,
- register my_off_t pos)
+ register my_off_t pos, my_bool last_in_level)
{
int flag;
uint nod_flag,keynr,UNINIT_VAR(max_keynr);
@@ -222,7 +250,8 @@ static double _mi_search_pos(register MI_INFO *info,
if (flag > 0 && ! nod_flag)
offset= 1.0;
else if ((offset=_mi_search_pos(info,keyinfo,key,key_len,nextflag,
- _mi_kpos(nod_flag,keypos))) < 0)
+ _mi_kpos(nod_flag,keypos),
+ last_in_level && after_key)) < 0)
DBUG_RETURN(offset);
}
else
@@ -241,13 +270,15 @@ static double _mi_search_pos(register MI_INFO *info,
Matches keynr + [0-1]
*/
if ((offset=_mi_search_pos(info,keyinfo,key,key_len,SEARCH_FIND,
- _mi_kpos(nod_flag,keypos))) < 0)
+ _mi_kpos(nod_flag,keypos),
+ last_in_level && after_key)) < 0)
DBUG_RETURN(offset); /* Read error */
}
}
DBUG_PRINT("info",("keynr: %d offset: %g max_keynr: %d nod: %d flag: %d",
keynr,offset,max_keynr,nod_flag,flag));
- DBUG_RETURN((keynr+offset)/(max_keynr+1));
+ DBUG_RETURN((keynr+offset-MY_TEST(!nod_flag))/
+ (max_keynr+MY_TEST(nod_flag || !last_in_level)));
err:
DBUG_PRINT("exit",("Error: %d",my_errno));
DBUG_RETURN (-1.0);
diff --git a/storage/myisam/mi_rkey.c b/storage/myisam/mi_rkey.c
index 897138e4f62..bf6f3ef852c 100644
--- a/storage/myisam/mi_rkey.c
+++ b/storage/myisam/mi_rkey.c
@@ -30,7 +30,7 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
MI_KEYDEF *keyinfo;
HA_KEYSEG *last_used_keyseg;
uint pack_key_length, use_key_length, nextflag;
- ICP_RESULT res= ICP_NO_MATCH;
+ check_result_t res= CHECK_NEG;
DBUG_ENTER("mi_rkey");
DBUG_PRINT("enter", ("base: %p buf: %p inx: %d search_flag: %d",
info, buf, inx, search_flag));
@@ -119,8 +119,7 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
while ((info->lastpos >= info->state->data_file_length &&
(search_flag != HA_READ_KEY_EXACT ||
last_used_keyseg != keyinfo->seg + keyinfo->keysegs)) ||
- (info->index_cond_func &&
- (res= mi_check_index_cond(info, inx, buf)) == ICP_NO_MATCH))
+ (res= mi_check_index_tuple(info, inx, buf)) == CHECK_NEG)
{
uint not_used[2];
/*
@@ -160,12 +159,12 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
/* Aborted by user */
DBUG_ASSERT(info->lastpos == HA_OFFSET_ERROR &&
my_errno == HA_ERR_ABORTED_BY_USER);
- res= ICP_ERROR;
+ res= CHECK_ERROR;
buf= 0; /* Fast abort */
break;
}
}
- if (res == ICP_OUT_OF_RANGE)
+ if (res == CHECK_OUT_OF_RANGE)
{
/* Change error from HA_ERR_END_OF_FILE */
DBUG_ASSERT(info->lastpos == HA_OFFSET_ERROR);
diff --git a/storage/myisam/mi_rnext.c b/storage/myisam/mi_rnext.c
index 4b4e1893a61..7124c102f82 100644
--- a/storage/myisam/mi_rnext.c
+++ b/storage/myisam/mi_rnext.c
@@ -28,7 +28,7 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx)
{
int error,changed;
uint flag;
- ICP_RESULT icp_res= ICP_MATCH;
+ check_result_t check= CHECK_POS;
uint update_mask= HA_STATE_NEXT_FOUND;
DBUG_ENTER("mi_rnext");
@@ -101,8 +101,7 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx)
{
while ((info->s->concurrent_insert &&
info->lastpos >= info->state->data_file_length) ||
- (info->index_cond_func &&
- (icp_res= mi_check_index_cond(info, inx, buf)) == ICP_NO_MATCH))
+ (check= mi_check_index_tuple(info, inx, buf)) == CHECK_NEG)
{
/*
If we are at the last key on the key page, allow writers to
@@ -135,7 +134,7 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx)
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->update|= update_mask;
- if (error || icp_res != ICP_MATCH)
+ if (error || check != CHECK_POS)
{
fast_mi_writeinfo(info);
if (my_errno == HA_ERR_KEY_NOT_FOUND)
diff --git a/storage/myisam/mi_rnext_same.c b/storage/myisam/mi_rnext_same.c
index ed9e3c55b2f..480b54f742c 100644
--- a/storage/myisam/mi_rnext_same.c
+++ b/storage/myisam/mi_rnext_same.c
@@ -30,7 +30,7 @@ int mi_rnext_same(MI_INFO *info, uchar *buf)
int error;
uint inx,not_used[2];
MI_KEYDEF *keyinfo;
- ICP_RESULT icp_res= ICP_MATCH;
+ check_result_t check= CHECK_POS;
DBUG_ENTER("mi_rnext_same");
if ((int) (inx=info->lastinx) < 0 || info->lastpos == HA_OFFSET_ERROR)
@@ -94,8 +94,7 @@ int mi_rnext_same(MI_INFO *info, uchar *buf)
- rows that don't match index condition
*/
if (info->lastpos < info->state->data_file_length &&
- (!info->index_cond_func ||
- (icp_res= mi_check_index_cond(info, inx, buf)) != ICP_NO_MATCH))
+ (check= mi_check_index_tuple(info, inx, buf)) != CHECK_NEG)
break;
}
}
@@ -107,7 +106,7 @@ int mi_rnext_same(MI_INFO *info, uchar *buf)
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->update|= HA_STATE_NEXT_FOUND | HA_STATE_RNEXT_SAME;
- if (error || icp_res != ICP_MATCH)
+ if (error || check != CHECK_POS)
{
fast_mi_writeinfo(info);
if (my_errno == HA_ERR_KEY_NOT_FOUND)
diff --git a/storage/myisam/mi_rprev.c b/storage/myisam/mi_rprev.c
index 765f8a5d79f..698e3b5957f 100644
--- a/storage/myisam/mi_rprev.c
+++ b/storage/myisam/mi_rprev.c
@@ -28,7 +28,7 @@ int mi_rprev(MI_INFO *info, uchar *buf, int inx)
int error,changed;
register uint flag;
MYISAM_SHARE *share=info->s;
- ICP_RESULT icp_res= ICP_MATCH;
+ check_result_t check= CHECK_POS;
DBUG_ENTER("mi_rprev");
if ((inx = _mi_check_index(info,inx)) < 0)
@@ -58,8 +58,7 @@ int mi_rprev(MI_INFO *info, uchar *buf, int inx)
my_off_t cur_keypage= info->last_keypage;
while ((share->concurrent_insert &&
info->lastpos >= info->state->data_file_length) ||
- (info->index_cond_func &&
- (icp_res= mi_check_index_cond(info, inx, buf)) == ICP_NO_MATCH))
+ (check= mi_check_index_tuple(info, inx, buf)) == CHECK_NEG)
{
/*
If we are at the last (i.e. first?) key on the key page,
@@ -93,7 +92,7 @@ int mi_rprev(MI_INFO *info, uchar *buf, int inx)
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->update|= HA_STATE_PREV_FOUND;
- if (error || icp_res != ICP_MATCH)
+ if (error || check != CHECK_POS)
{
fast_mi_writeinfo(info);
if (my_errno == HA_ERR_KEY_NOT_FOUND)
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index f08dea77354..7345ab1604d 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -40,7 +40,7 @@ int _mi_ck_write_btree(register MI_INFO *info, uint keynr,uchar *key,
/* Write new record to database */
-int mi_write(MI_INFO *info, uchar *record)
+int mi_write(MI_INFO *info, const uchar *record)
{
MYISAM_SHARE *share=info->s;
uint i;
diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h
index d02d2d78c5d..06de992d6de 100644
--- a/storage/myisam/myisamdef.h
+++ b/storage/myisam/myisamdef.h
@@ -296,6 +296,7 @@ struct st_myisam_info
uint preload_buff_size; /* When preloading indexes */
myf lock_wait; /* is 0 or MY_SHORT_WAIT */
my_bool was_locked; /* Was locked in panic */
+ my_bool intern_lock_locked; /* locked in mi_extra() */
my_bool append_insert_at_end; /* Set if concurrent insert */
my_bool quick_mode;
/* If info->buff can't be used for rnext */
@@ -305,6 +306,9 @@ struct st_myisam_info
my_bool create_unique_index_by_sort;
index_cond_func_t index_cond_func; /* Index condition function */
void *index_cond_func_arg; /* parameter for the func */
+ rowid_filter_func_t rowid_filter_func; /* rowid filter check function */
+ rowid_filter_is_active_func_t rowid_filter_is_active_func; /* is activefunction */
+ void *rowid_filter_func_arg; /* parameter for the func */
THR_LOCK_DATA lock;
uchar *rtree_recursion_state; /* For RTREE */
int rtree_recursion_depth;
@@ -711,8 +715,6 @@ void mi_restore_status(void *param);
void mi_copy_status(void *to, void *from);
my_bool mi_check_status(void *param);
void mi_fix_status(MI_INFO *org_table, MI_INFO *new_table);
-void mi_disable_indexes_for_rebuild(MI_INFO *info, ha_rows rows,
- my_bool all_keys);
extern MI_INFO *test_if_reopen(char *filename);
my_bool check_table_is_closed(const char *name, const char *where);
int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share);
@@ -723,15 +725,20 @@ my_bool mi_dynmap_file(MI_INFO *info, my_off_t size);
int mi_munmap_file(MI_INFO *info);
void mi_remap_file(MI_INFO *info, my_off_t size);
-ICP_RESULT mi_check_index_cond(MI_INFO *info, uint keynr, uchar *record);
+check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record);
+
/* Functions needed by mi_check */
int killed_ptr(HA_CHECK *param);
void mi_check_print_error(HA_CHECK *param, const char *fmt, ...);
void mi_check_print_warning(HA_CHECK *param, const char *fmt, ...);
void mi_check_print_info(HA_CHECK *param, const char *fmt, ...);
pthread_handler_t thr_find_all_keys(void *arg);
-extern void mi_set_index_cond_func(MI_INFO *info, index_cond_func_t func,
+extern void mi_set_index_cond_func(MI_INFO *info, index_cond_func_t check_func,
void *func_arg);
+extern void mi_set_rowid_filter_func(MI_INFO *info,
+ rowid_filter_func_t check_func,
+ rowid_filter_is_active_func_t is_active_func,
+ void *func_arg);
int flush_blocks(HA_CHECK *param, KEY_CACHE *key_cache, File file,
ulonglong *dirty_part_map);
diff --git a/storage/myisam/myisamlog.c b/storage/myisam/myisamlog.c
index 8e8b75817c0..9bef2be929f 100644
--- a/storage/myisam/myisamlog.c
+++ b/storage/myisam/myisamlog.c
@@ -750,7 +750,8 @@ static int test_when_accessed (struct file_info *key,
}
-static int file_info_free(void* arg, TREE_FREE mode, void *unused)
+static int file_info_free(void* arg, TREE_FREE mode __attribute__((unused)),
+ void *unused __attribute__((unused)))
{
struct file_info *fileinfo= arg;
DBUG_ENTER("file_info_free");
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 5d122cb9d97..8a0ca759871 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -1952,7 +1952,7 @@ static void make_traverse_code_tree(HUFF_TREE *huff_tree,
{
chr=element->a.leaf.element_nr;
huff_tree->code_len[chr]= (uchar) (8 * sizeof(ulonglong) - size);
- huff_tree->code[chr]= (code >> size);
+ huff_tree->code[chr]= (size == 8 * sizeof(ulonglong)) ? 0 : (code >> size);
if (huff_tree->height < 8 * sizeof(ulonglong) - size)
huff_tree->height= 8 * sizeof(ulonglong) - size;
}
@@ -2148,7 +2148,7 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
*/
if (!(packed_tree=(uint*) my_alloca(sizeof(uint)*length*2)))
{
- my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATALERROR),
+ my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL),
sizeof(uint)*length*2);
return 0;
}
@@ -2943,12 +2943,15 @@ static void flush_bits(void)
ulonglong bit_buffer;
bits= file_buffer.bits & ~7;
- bit_buffer= file_buffer.bitbucket >> bits;
- bits= BITS_SAVED - bits;
- while (bits > 0)
+ if (bits != BITS_SAVED)
{
- bits-= 8;
- *file_buffer.pos++= (uchar) (bit_buffer >> bits);
+ bit_buffer= file_buffer.bitbucket >> bits;
+ bits= BITS_SAVED - bits;
+ while (bits > 0)
+ {
+ bits-= 8;
+ *file_buffer.pos++= (uchar) (bit_buffer >> bits);
+ }
}
if (file_buffer.pos >= file_buffer.end)
(void) flush_buffer(~ (ulong) 0);
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index 13b8f17ea0f..e586543363b 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -28,12 +28,10 @@
/* static variables */
-#undef MYF_RW
#undef DISK_BUFFER_SIZE
#define MERGEBUFF 15
#define MERGEBUFF2 31
-#define MYF_RW MYF(MY_NABP | MY_WME | MY_WAIT_IF_FULL)
#define DISK_BUFFER_SIZE (IO_SIZE*128)
/* How many keys we can keep in memory */
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index 8f5e65084ce..14036a31b8c 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -1088,7 +1088,7 @@ int ha_myisammrg::close(void)
DBUG_RETURN(rc);
}
-int ha_myisammrg::write_row(uchar * buf)
+int ha_myisammrg::write_row(const uchar * buf)
{
DBUG_ENTER("ha_myisammrg::write_row");
DBUG_ASSERT(this->file->children_attached);
diff --git a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h
index 7cb2b0f1993..b7cbd6c7d12 100644
--- a/storage/myisammrg/ha_myisammrg.h
+++ b/storage/myisammrg/ha_myisammrg.h
@@ -111,7 +111,7 @@ public:
int detach_children(void);
virtual handler *clone(const char *name, MEM_ROOT *mem_root);
int close(void);
- int write_row(uchar * buf);
+ int write_row(const uchar * buf);
int update_row(const uchar * old_data, const uchar * new_data);
int delete_row(const uchar * buf);
int index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map,
diff --git a/storage/myisammrg/myrg_write.c b/storage/myisammrg/myrg_write.c
index eb496911a52..e511d60d634 100644
--- a/storage/myisammrg/myrg_write.c
+++ b/storage/myisammrg/myrg_write.c
@@ -18,7 +18,7 @@
#include "myrg_def.h"
-int myrg_write(register MYRG_INFO *info, uchar *rec)
+int myrg_write(register MYRG_INFO *info, const uchar *rec)
{
/* [phi] MERGE_WRITE_DISABLED is handled by the else case */
if (info->merge_insert_method == MERGE_INSERT_TO_FIRST)
diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt
index a85e5f2fcb6..e725f9712ea 100644
--- a/storage/oqgraph/CMakeLists.txt
+++ b/storage/oqgraph/CMakeLists.txt
@@ -7,7 +7,7 @@ allows you to handle hierarchies (tree structures) and complex graphs
It is intended to be used for retrieving hierarchical information, such as those used for graphs,
routes or social relationships, in plain SQL." PARENT_SCOPE)
-FUNCTION(CHECK_OQGRAPH)
+MACRO(CHECK_OQGRAPH)
MESSAGE(STATUS "Configuring OQGraph")
FIND_PACKAGE(Boost 1.40.0)
SET_PACKAGE_PROPERTIES(Boost PROPERTIES
@@ -32,27 +32,8 @@ IF(NOT Judy_FOUND)
RETURN()
ENDIF()
INCLUDE_DIRECTORIES(${Judy_INCLUDE_DIR})
-
-IF(MSVC)
-# # lp:756966 OQGRAPH on Win64 does not compile
-# IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
-# SET(OQGRAPH_OK 0 CACHE INTERNAL "")
-# ELSE()
- SET(OQGRAPH_OK 1 CACHE INTERNAL "")
-# ENDIF()
-ELSE()
-# See if that works. On old gcc it'll fail because of -fno-rtti
-SET(CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIRS}")
-CHECK_CXX_SOURCE_COMPILES(
-"
-#define BOOST_NO_RTTI 1
-#define BOOST_NO_TYPEID 1
-#include <boost/config.hpp>
-#include <boost/property_map/property_map.hpp>
-int main() { return 0; }
-" OQGRAPH_OK)
-ENDIF()
-ENDFUNCTION()
+SET(OQGRAPH_OK 1)
+ENDMACRO()
IF(PLUGIN_OQGRAPH STREQUAL "NO")
RETURN()
@@ -76,7 +57,7 @@ IF(MSVC)
ADD_DEFINITIONS(-DJU_WIN)
ELSE(MSVC)
# Fix lp bug 1221555 with -fpermissive, so that errors in gcc 4.7 become warnings for the time being
- STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+ STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing -fpermissive")
ENDIF(MSVC)
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc
index 398f48a80ac..e0e81f7cddc 100644
--- a/storage/oqgraph/ha_oqgraph.cc
+++ b/storage/oqgraph/ha_oqgraph.cc
@@ -799,7 +799,7 @@ void ha_oqgraph::update_key_stats()
}
-int ha_oqgraph::write_row(byte * buf)
+int ha_oqgraph::write_row(const byte * buf)
{
return HA_ERR_TABLE_READONLY;
}
@@ -1211,7 +1211,7 @@ ha_rows ha_oqgraph::records_in_range(uint inx, key_range *min_key,
min_key->flag != HA_READ_KEY_EXACT ||
max_key->flag != HA_READ_AFTER_KEY)
{
- if (min_key->length == key->key_part[0].store_length && !key->key_part[0].field->is_null()) /* ensure select * from x where latch is null is consistent with no latch */
+ if (min_key && min_key->length == key->key_part[0].store_length && !key->key_part[0].field->is_null()) /* ensure select * from x where latch is null is consistent with no latch */
{
// If latch is not null and equals 0, return # nodes
diff --git a/storage/oqgraph/ha_oqgraph.h b/storage/oqgraph/ha_oqgraph.h
index d0ac8d7e18c..0c0af6def97 100644
--- a/storage/oqgraph/ha_oqgraph.h
+++ b/storage/oqgraph/ha_oqgraph.h
@@ -83,7 +83,7 @@ public:
int open(const char *name, int mode, uint test_if_locked);
int close(void);
- int write_row(byte * buf);
+ int write_row(const byte * buf);
int update_row(const uchar * old_data, const uchar * new_data);
int delete_row(const byte * buf);
int index_read(byte * buf, const byte * key,
diff --git a/storage/oqgraph/oqgraph_thunk.cc b/storage/oqgraph/oqgraph_thunk.cc
index 5d3f03beaf8..bd577ecfc12 100644
--- a/storage/oqgraph/oqgraph_thunk.cc
+++ b/storage/oqgraph/oqgraph_thunk.cc
@@ -109,7 +109,7 @@ const std::string& oqgraph3::cursor::record_position() const
if (_graph->_cursor->_index >= 0)
{
key_copy((uchar*) _graph->_cursor->_key.data(), table.record[0],
- table.s->key_info + _index, table.s->key_info[_index].key_length, true);
+ table.key_info + _index, table.key_info[_index].key_length, true);
}
_graph->_stale= false;
@@ -184,7 +184,7 @@ int oqgraph3::cursor::restore_position()
if (int rc= table.file->ha_index_read_map(
table.record[0], (const uchar*) _key.data(),
(key_part_map)(1 << _parts) - 1,
- table.s->key_info[_index].user_defined_key_parts == _parts ?
+ table.key_info[_index].user_defined_key_parts == _parts ?
HA_READ_KEY_EXACT : HA_READ_KEY_OR_NEXT))
{
table.file->ha_index_end();
@@ -368,7 +368,7 @@ int oqgraph3::cursor::seek_to(
if (!destid)
{
int i= 0;
- for( ::KEY *key_info= table.s->key_info,
+ for( ::KEY *key_info= table.key_info,
*key_end= key_info + table.s->keys;
key_info < key_end; ++key_info, ++i)
{
@@ -399,7 +399,7 @@ int oqgraph3::cursor::seek_to(
else if (!origid)
{
int i= 0;
- for( ::KEY *key_info= table.s->key_info,
+ for( ::KEY *key_info= table.key_info,
*key_end= key_info + table.s->keys;
key_info < key_end; ++key_info, ++i)
{
@@ -430,7 +430,7 @@ int oqgraph3::cursor::seek_to(
else
{
int i= 0;
- for( ::KEY *key_info= table.s->key_info,
+ for( ::KEY *key_info= table.key_info,
*key_end= key_info + table.s->keys;
key_info < key_end; ++key_info, ++i)
{
@@ -485,7 +485,7 @@ int oqgraph3::cursor::seek_to(
if (int rc= table.file->ha_index_read_map(
table.record[0], (uchar*) _key.data(),
(key_part_map) ((1U << _parts) - 1),
- table.s->key_info[_index].user_defined_key_parts == _parts ?
+ table.key_info[_index].user_defined_key_parts == _parts ?
HA_READ_KEY_EXACT : HA_READ_KEY_OR_NEXT))
{
table.file->ha_index_end();
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 0754bb5a7e7..8860046fa26 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -27,7 +27,6 @@
#include "sql_plugin.h"
#include "my_pthread.h"
-#include "my_atomic.h"
#include "ha_perfschema.h"
#include "pfs_engine_table.h"
#include "pfs_column_values.h"
@@ -258,7 +257,7 @@ int ha_perfschema::close(void)
DBUG_RETURN(0);
}
-int ha_perfschema::write_row(uchar *buf)
+int ha_perfschema::write_row(const uchar *buf)
{
int result;
diff --git a/storage/perfschema/ha_perfschema.h b/storage/perfschema/ha_perfschema.h
index dd57ff31088..18ac035831d 100644
--- a/storage/perfschema/ha_perfschema.h
+++ b/storage/perfschema/ha_perfschema.h
@@ -127,7 +127,7 @@ public:
@param buf the row to write
@return 0 on success
*/
- int write_row(uchar *buf);
+ int write_row(const uchar *buf);
void use_hidden_primary_key();
diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc
index 46937d00ecf..acab0e73a3d 100644
--- a/storage/perfschema/pfs_engine_table.cc
+++ b/storage/perfschema/pfs_engine_table.cc
@@ -185,7 +185,7 @@ ha_rows PFS_engine_table_share::get_row_count(void) const
return m_records;
}
-int PFS_engine_table_share::write_row(TABLE *table, unsigned char *buf,
+int PFS_engine_table_share::write_row(TABLE *table, const unsigned char *buf,
Field **fields) const
{
if (m_write_row == NULL)
@@ -1233,11 +1233,11 @@ bool pfs_show_status(handlerton *hton, THD *thd,
break;
case 141:
name= "(filename_hash).count";
- size= filename_hash.count;
+ size= pfs_filename_hash.count;
break;
case 142:
name= "(filename_hash).size";
- size= filename_hash.size;
+ size= pfs_filename_hash.size;
break;
case 143:
name= "(host_hash).count";
diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h
index 52ad203db24..03a2b6a9d28 100644
--- a/storage/perfschema/pfs_engine_table.h
+++ b/storage/perfschema/pfs_engine_table.h
@@ -207,7 +207,7 @@ protected:
typedef PFS_engine_table* (*pfs_open_table_t)(void);
/** Callback to write a row. */
typedef int (*pfs_write_row_t)(TABLE *table,
- unsigned char *buf, Field **fields);
+ const unsigned char *buf, Field **fields);
/** Callback to delete all rows. */
typedef int (*pfs_delete_all_rows_t)(void);
/** Callback to get a row count. */
@@ -224,7 +224,7 @@ struct PFS_engine_table_share
/** Get the row count. */
ha_rows get_row_count(void) const;
/** Write a row. */
- int write_row(TABLE *table, unsigned char *buf, Field **fields) const;
+ int write_row(TABLE *table, const unsigned char *buf, Field **fields) const;
/** Table name. */
LEX_STRING m_name;
diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc
index ca9e0385021..fd8da77fe40 100644
--- a/storage/perfschema/pfs_instr.cc
+++ b/storage/perfschema/pfs_instr.cc
@@ -143,7 +143,7 @@ PFS_thread *thread_array= NULL;
File instrumentation instances array.
@sa file_max
@sa file_lost
- @sa filename_hash
+ @sa pfs_filename_hash
*/
PFS_file *file_array= NULL;
@@ -189,8 +189,8 @@ static unsigned char *history_stmts_digest_token_array= NULL;
static char *thread_session_connect_attrs_array= NULL;
/** Hash table for instrumented files. */
-LF_HASH filename_hash;
-/** True if filename_hash is initialized. */
+LF_HASH pfs_filename_hash;
+/** True if pfs_filename_hash is initialized. */
static bool filename_hash_inited= false;
/**
@@ -586,7 +586,7 @@ int init_file_hash(void)
{
if ((! filename_hash_inited) && (file_max > 0))
{
- lf_hash_init(&filename_hash, sizeof(PFS_file*), LF_HASH_UNIQUE,
+ lf_hash_init(&pfs_filename_hash, sizeof(PFS_file*), LF_HASH_UNIQUE,
0, 0, filename_hash_get_key, &my_charset_bin);
/* filename_hash.size= file_max; */
filename_hash_inited= true;
@@ -599,7 +599,7 @@ void cleanup_file_hash(void)
{
if (filename_hash_inited)
{
- lf_hash_destroy(&filename_hash);
+ lf_hash_destroy(&pfs_filename_hash);
filename_hash_inited= false;
}
}
@@ -1186,7 +1186,7 @@ void destroy_thread(PFS_thread *pfs)
}
/**
- Get the hash pins for @filename_hash.
+ Get the hash pins for @pfs_filename_hash.
@param thread The running thread.
@returns The LF_HASH pins for the thread.
*/
@@ -1196,7 +1196,7 @@ LF_PINS* get_filename_hash_pins(PFS_thread *thread)
{
if (! filename_hash_inited)
return NULL;
- thread->m_filename_hash_pins= lf_hash_get_pins(&filename_hash);
+ thread->m_filename_hash_pins= lf_hash_get_pins(&pfs_filename_hash);
}
return thread->m_filename_hash_pins;
}
@@ -1314,7 +1314,7 @@ find_or_create_file(PFS_thread *thread, PFS_file_class *klass,
search:
entry= reinterpret_cast<PFS_file**>
- (lf_hash_search(&filename_hash, pins,
+ (lf_hash_search(&pfs_filename_hash, pins,
normalized_filename, normalized_length));
if (entry && (entry != MY_ERRPTR))
{
@@ -1359,7 +1359,7 @@ search:
pfs->m_identity= (const void *)pfs;
int res;
- res= lf_hash_insert(&filename_hash, thread->m_filename_hash_pins,
+ res= lf_hash_insert(&pfs_filename_hash, thread->m_filename_hash_pins,
&pfs);
if (likely(res == 0))
{
@@ -1426,7 +1426,7 @@ void destroy_file(PFS_thread *thread, PFS_file *pfs)
LF_PINS *pins= get_filename_hash_pins(thread);
DBUG_ASSERT(pins != NULL);
- lf_hash_delete(&filename_hash, pins,
+ lf_hash_delete(&pfs_filename_hash, pins,
pfs->m_filename, pfs->m_filename_length);
if (klass->is_singleton())
klass->m_singleton= NULL;
diff --git a/storage/perfschema/pfs_instr.h b/storage/perfschema/pfs_instr.h
index 81bc52d1d75..a5ff3b4a17d 100644
--- a/storage/perfschema/pfs_instr.h
+++ b/storage/perfschema/pfs_instr.h
@@ -698,7 +698,7 @@ void update_socket_derived_flags();
/** Update derived flags for all instruments. */
void update_instruments_derived_flags();
-extern LF_HASH filename_hash;
+extern LF_HASH pfs_filename_hash;
/** @} */
#endif
diff --git a/storage/perfschema/pfs_server.h b/storage/perfschema/pfs_server.h
index 3457a91d376..9f904e6545b 100644
--- a/storage/perfschema/pfs_server.h
+++ b/storage/perfschema/pfs_server.h
@@ -35,7 +35,7 @@
#define PFS_MAX_RWLOCK_CLASS 40
#endif
#ifndef PFS_MAX_COND_CLASS
- #define PFS_MAX_COND_CLASS 80
+ #define PFS_MAX_COND_CLASS 90
#endif
#ifndef PFS_MAX_THREAD_CLASS
#define PFS_MAX_THREAD_CLASS 50
diff --git a/storage/perfschema/table_setup_actors.cc b/storage/perfschema/table_setup_actors.cc
index 3ebccc8283f..bc56f8e8714 100644
--- a/storage/perfschema/table_setup_actors.cc
+++ b/storage/perfschema/table_setup_actors.cc
@@ -59,7 +59,7 @@ PFS_engine_table* table_setup_actors::create()
return new table_setup_actors();
}
-int table_setup_actors::write_row(TABLE *table, unsigned char *buf,
+int table_setup_actors::write_row(TABLE *table, const unsigned char *buf,
Field **fields)
{
Field *f;
diff --git a/storage/perfschema/table_setup_actors.h b/storage/perfschema/table_setup_actors.h
index 748c57850b0..6bfc480a9c5 100644
--- a/storage/perfschema/table_setup_actors.h
+++ b/storage/perfschema/table_setup_actors.h
@@ -62,7 +62,7 @@ public:
static PFS_engine_table_share m_share;
/** Table builder. */
static PFS_engine_table* create();
- static int write_row(TABLE *table, unsigned char *buf, Field **fields);
+ static int write_row(TABLE *table, const unsigned char *buf, Field **fields);
static int delete_all_rows();
static ha_rows get_row_count();
diff --git a/storage/perfschema/table_setup_objects.cc b/storage/perfschema/table_setup_objects.cc
index 4d6f6f6e2cd..00ef7f329f3 100644
--- a/storage/perfschema/table_setup_objects.cc
+++ b/storage/perfschema/table_setup_objects.cc
@@ -73,7 +73,7 @@ PFS_engine_table* table_setup_objects::create(void)
return new table_setup_objects();
}
-int table_setup_objects::write_row(TABLE *table, unsigned char *buf,
+int table_setup_objects::write_row(TABLE *table, const unsigned char *buf,
Field **fields)
{
int result;
diff --git a/storage/perfschema/table_setup_objects.h b/storage/perfschema/table_setup_objects.h
index 560346c577f..570acc865ad 100644
--- a/storage/perfschema/table_setup_objects.h
+++ b/storage/perfschema/table_setup_objects.h
@@ -65,7 +65,7 @@ public:
static PFS_engine_table_share m_share;
/** Table builder. */
static PFS_engine_table* create();
- static int write_row(TABLE *table, unsigned char *buf, Field **fields);
+ static int write_row(TABLE *table, const unsigned char *buf, Field **fields);
static int delete_all_rows();
static ha_rows get_row_count();
diff --git a/storage/perfschema/unittest/pfs_server_stubs.cc b/storage/perfschema/unittest/pfs_server_stubs.cc
index db1600faf9f..0cabce37e51 100644
--- a/storage/perfschema/unittest/pfs_server_stubs.cc
+++ b/storage/perfschema/unittest/pfs_server_stubs.cc
@@ -31,8 +31,6 @@
struct sql_digest_storage;
-volatile bool ready_to_exit= false;
-
uint lower_case_table_names= 0;
CHARSET_INFO *files_charset_info= NULL;
CHARSET_INFO *system_charset_info= NULL;
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index 0eca862aaa8..de0f7a111fc 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -214,26 +214,6 @@ TARGET_LINK_LIBRARIES(rocksdb_aux_lib ${ATOMIC_EXTRA_LIBS})
TARGET_LINK_LIBRARIES(rocksdb rocksdb_aux_lib)
-IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-
- # MARIAROCKS_NOT_YET: Add -frtti flag when compiling RocksDB files.
- # TODO: is this the right way to do this?
- # - SQL layer and storage/rocksdb/*.cc are compiled with -fnortti
- # - RocksDB files are compiled with "-fnortti ... -frtti"
- # - This causes RocksDB headers to be compiled with different settings:
- # = with RTTI when compiling RocksDB
- # = without RTTI when compiling storage/rocksdb/*.cc
- #
- # (facebook/mysql-5.6 just compiles everything without -f*rtti, which means
- # everything is compiled with -frtti)
- #
- # (also had to add -frtti above, because something that event_listener.cc
- # includes requires it. So, now everything in MariaRocks is compiled with
- # -frtti)
- set_source_files_properties(event_listener.cc rdb_cf_options.cc rdb_sst_info.cc
- PROPERTIES COMPILE_FLAGS -frtti)
-ENDIF()
-
CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU)
IF(HAVE_SCHED_GETCPU)
ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1)
@@ -278,9 +258,6 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/myrocks_hotbackup.py
${CMAKE_CURRENT_BINARY_DIR}/myrocks_hotbackup @ONLY)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/myrocks_hotbackup COMPONENT rocksdb-engine)
-IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- SET_TARGET_PROPERTIES(rocksdb_tools sst_dump mysql_ldb PROPERTIES COMPILE_FLAGS "-frtti -Wno-error")
-ENDIF()
IF(MSVC)
# RocksDB, the storage engine, overdoes "const" by adding
# additional const qualifiers to parameters of the overriden virtual functions
@@ -293,6 +270,8 @@ IF(MSVC)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
ENDIF()
+ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ SET_TARGET_PROPERTIES(rocksdb_tools sst_dump mysql_ldb PROPERTIES COMPILE_FLAGS "-Wno-error")
ENDIF()
IF(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/.git)
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
index 0587e1ab2d3..e23862ee659 100644
--- a/storage/rocksdb/build_rocksdb.cmake
+++ b/storage/rocksdb/build_rocksdb.cmake
@@ -502,5 +502,5 @@ list(APPEND SOURCES ${CMAKE_CURRENT_BINARY_DIR}/build_version.cc)
ADD_CONVENIENCE_LIBRARY(rocksdblib ${SOURCES})
target_link_libraries(rocksdblib ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -frtti -Wno-error")
+ set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -Wno-error")
endif()
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index c38964680b1..ce9bb7d49e2 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -7237,7 +7237,7 @@ int ha_rocksdb::create_cfs(
tbl_def_arg->full_tablename().c_str(),
table_arg->key_info[i].key_part[part].field->field_name.str);
- my_error(ER_INTERNAL_ERROR, MYF(ME_JUST_WARNING), buf);
+ my_error(ER_INTERNAL_ERROR, MYF(ME_WARNING), buf);
}
}
}
@@ -8718,17 +8718,18 @@ int ha_rocksdb::find_icp_matching_index_rec(const bool move_forward,
return err;
}
- const enum icp_result icp_status= handler_index_cond_check(this);
- if (icp_status == ICP_NO_MATCH) {
+ const check_result_t icp_status= handler_index_cond_check(this);
+ if (icp_status == CHECK_NEG) {
rocksdb_smart_next(!move_forward, m_scan_it);
continue; /* Get the next (or prev) index tuple */
}
- else if (icp_status == ICP_OUT_OF_RANGE || icp_status == ICP_ABORTED_BY_USER) {
+ else if (icp_status == CHECK_OUT_OF_RANGE ||
+ icp_status == CHECK_ABORTED_BY_USER) {
/* We have walked out of range we are scanning */
table->status = STATUS_NOT_FOUND;
return HA_ERR_END_OF_FILE;
}
- else /* icp_status == ICP_MATCH */
+ else /* icp_status == CHECK_POS */
{
/* Index Condition is satisfied. We have rc==0, proceed to fetch the
* row. */
@@ -8788,7 +8789,7 @@ int ha_rocksdb::check(THD *const thd, HA_CHECK_OPT *const check_opt) {
int res;
// NO_LINT_DEBUG
sql_print_verbose_info("CHECKTABLE %s: Checking index %s", table_name,
- table->key_info[keyno].name);
+ table->key_info[keyno].name.str);
while (1) {
if (!rows) {
res = index_first(table->record[0]);
@@ -9576,7 +9577,7 @@ const std::string ha_rocksdb::get_table_comment(const TABLE *const table_arg) {
HA_EXIT_SUCCESS OK
other HA_ERR error code (can be SE-specific)
*/
-int ha_rocksdb::write_row(uchar *const buf) {
+int ha_rocksdb::write_row(const uchar *const buf) {
DBUG_ENTER_FUNC();
DBUG_ASSERT(buf != nullptr);
@@ -11014,11 +11015,15 @@ int ha_rocksdb::info(uint flag) {
stats.records += m_table_handler->m_mtcache_count;
stats.data_file_length += m_table_handler->m_mtcache_size;
}
+
+ // Do like InnoDB does. stats.records=0 confuses the optimizer
+ if (stats.records == 0 && !(flag & (HA_STATUS_TIME | HA_STATUS_OPEN))) {
+ stats.records++;
+ }
}
- if (rocksdb_debug_optimizer_n_rows > 0) {
+ if (rocksdb_debug_optimizer_n_rows > 0)
stats.records = rocksdb_debug_optimizer_n_rows;
- }
if (stats.records != 0) {
stats.mean_rec_length = stats.data_file_length / stats.records;
diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h
index 758ca71fc95..766b04ac7d2 100644
--- a/storage/rocksdb/ha_rocksdb.h
+++ b/storage/rocksdb/ha_rocksdb.h
@@ -638,7 +638,7 @@ public:
MY_ATTRIBUTE((__warn_unused_result__));
int close(void) override MY_ATTRIBUTE((__warn_unused_result__));
- int write_row(uchar *const buf) override
+ int write_row(const uchar *const buf) override
MY_ATTRIBUTE((__warn_unused_result__));
int update_row(const uchar *const old_data, const uchar *const new_data) override
MY_ATTRIBUTE((__warn_unused_result__));
@@ -737,6 +737,7 @@ public:
const TABLE *old_table_arg, const Rdb_tbl_def *old_tbl_def_arg) const
MY_ATTRIBUTE((__nonnull__));
+ using handler::compare_key_parts;
int compare_key_parts(const KEY *const old_key,
const KEY *const new_key) const
MY_ATTRIBUTE((__nonnull__, __warn_unused_result__));
diff --git a/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc b/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc
index da16e1c9c3b..6e427f26fd6 100644
--- a/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc
+++ b/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc
@@ -6,6 +6,7 @@
--source include/have_direct_io.inc
--echo Checking direct reads
+--let $restart_noprint=2
--let $_mysqld_option=$io_option
--source include/restart_mysqld_with_option.inc
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result
index 3ba0f30a22d..20f84dd5563 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result
@@ -391,33 +391,46 @@ set global rocksdb_force_flush_memtable_now=1;
ALTER TABLE t1 ADD INDEX kj(j), ALGORITHM=INPLACE;
larger
1
+# restart
larger
1
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
larger
1
+# restart
larger
1
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select 1300 < 1300 * 1.5 as "same";
same
@@ -478,6 +491,7 @@ INSERT INTO t1 (a, b) VALUES (4, 20);
set global rocksdb_force_flush_memtable_now=1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX in t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result b/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result
index a8d5c07072c..96d25b2e669 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result
@@ -62,6 +62,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -171,6 +172,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -254,6 +256,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) YES NULL
b char(8) YES NULL
+# restart
INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (36,'foo');
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key_with_sk.result b/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key_with_sk.result
index 5d947603ec5..27722b23927 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key_with_sk.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key_with_sk.result
@@ -63,6 +63,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -147,6 +148,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -228,6 +230,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -311,6 +314,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -401,6 +405,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -484,6 +489,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -568,6 +574,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -747,6 +754,7 @@ a b
123 bbb
321 ccc
321 ccc
+# restart
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
@@ -788,6 +796,7 @@ t1 CREATE TABLE `t1` (
`i` int(11) NOT NULL AUTO_INCREMENT,
KEY `i` (`i`)
) ENGINE=ROCKSDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
+# restart
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result b/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result
index b666a17c81c..3459b6f189b 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result
@@ -5,26 +5,32 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, a INT(11), b CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 VALUES (3,3,'c');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t2 VALUES (1,4,'d');
ANALYZE NO_WRITE_TO_BINLOG TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
INSERT INTO t1 VALUES (4,5,'e');
INSERT INTO t2 VALUES (2,6,'f');
ANALYZE LOCAL TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
DROP TABLE t1, t2;
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT(11), KEY(a)) ENGINE=rocksdb;
INSERT INTO t1 VALUES (1,1),(2,2),(3,4),(4,7);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1 VALUES (5,8),(6,10),(7,11),(8,12);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
#
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_secondary.result b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_secondary.result
index 100bc5fd638..c6dcb023e06 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_secondary.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_secondary.result
@@ -6,6 +6,7 @@ pk a
3 1
2 2
1 3
+# restart
INSERT INTO t1 (pk) VALUES (4);
SELECT * FROM t1;
pk a
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread_2.result b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread_2.result
index a14ffdec2e3..6bd6cea97de 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread_2.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread_2.result
@@ -92,5 +92,7 @@ disconnect con2;
disconnect con1;
disconnect con0;
SELECT * FROM t1 ORDER BY pk INTO OUTFILE <output_file>;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
All pk values matched their expected values
DROP TABLE t1;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter3.result b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter3.result
index f3c4fdf1040..d447b480f44 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter3.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter3.result
@@ -1,3 +1,4 @@
+# restart
CREATE TABLE `linktable` (
`id1` bigint(20) unsigned NOT NULL DEFAULT '0',
`id1_type` int(10) unsigned NOT NULL DEFAULT '0',
@@ -92,6 +93,7 @@ select case when variable_value-@c = 0 then 'true' else 'false' end from informa
case when variable_value-@c = 0 then 'true' else 'false' end
true
DROP TABLE linktable;
+# restart
#
# bloom filter prefix is 20 byte
# Create a key which is longer than that, so that we see that
@@ -116,6 +118,7 @@ insert into t1 values (10,1,1,0x12FFFFFFFFFF,1);
insert into t1 values (11,1,1,0x12FFFFFFFFFF,1);
insert into t1 values (20,2,2,0x12FFFFFFFFFF,1);
insert into t1 values (21,2,2,0x12FFFFFFFFFF,1);
+# restart
explain
select * from t1 where kp0=1 and kp1=1 and kp2=0x12FFFFFFFFFF order by kp3 desc;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter4.result b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter4.result
index 1f4d1a641a2..c4a1c5f4668 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter4.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter4.result
@@ -20,6 +20,8 @@ END IF;
SET id1_cond = id1_cond + 1;
END WHILE;
END//
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
"Skipping bloom filter"
SET session rocksdb_skip_bloom_filter_on_read=1;
CALL select_test();
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result
index 98db48d772f..b8a98efa55e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result
@@ -45,8 +45,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SHOW TABLE STATUS WHERE name LIKE 't%';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
@@ -73,5 +76,6 @@ count(b)
2500000
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
test.bulk_load.tmp
+# restart
disconnect other;
DROP TABLE t1, t2, t3;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result
index 4ea8cbccc1e..995da9e88eb 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result
@@ -86,6 +86,7 @@ INSERT INTO t1 VALUES(51479+0.333333333,1);
DROP TABLE t1;
SET @@global.table_open_cache=@orig_table_open_cache;
FOUND 1 /RocksDB: Error [0-9]+ finalizing bulk load while closing handler/ in rocksdb.bulk_load_errors.3.err
+# restart
CREATE TABLE t1 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB;
CREATE TABLE t2 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB;
SET rocksdb_bulk_load=1;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result
index d894e2e371a..56b1a8322cc 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result
@@ -45,8 +45,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SHOW TABLE STATUS WHERE name LIKE 't%';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
@@ -73,5 +76,6 @@ count(b)
2500000
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
test.bulk_load.tmp
+# restart
disconnect other;
DROP TABLE t1, t2, t3;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result
index 90402a87005..1a260c69fa3 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result
@@ -45,8 +45,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SHOW TABLE STATUS WHERE name LIKE 't%';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
@@ -73,5 +76,6 @@ count(b)
2500000
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
test.bulk_load.tmp
+# restart
disconnect other;
DROP TABLE t1, t2, t3;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result
index 5a5a334a71f..e216fb1cc45 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result
@@ -45,8 +45,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SHOW TABLE STATUS WHERE name LIKE 't%';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
@@ -73,5 +76,6 @@ count(b)
2500000
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
test.bulk_load.tmp
+# restart
disconnect other;
DROP TABLE t1, t2, t3;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result
index 65b20296127..63d07a25961 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result
@@ -77,8 +77,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SHOW TABLE STATUS WHERE name LIKE 't%';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result
index aa97afb9b72..a6e0793f5d1 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result
@@ -77,8 +77,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N
t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SHOW TABLE STATUS WHERE name LIKE 't%';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result b/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result
index d037c636a16..dcaca8b72bc 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result
@@ -1,3 +1,5 @@
+# restart
+set use_stat_tables= 'COMPLEMENTARY';
CREATE TABLE t0 (id int PRIMARY KEY, a int, INDEX ix_a (a)) engine=rocksdb;
insert into t0 values (0, 0),(1, 1),(2, 2),(3, 3),(4, 4),
(5, 4),(6, 4),(7, 4),(8, 4),(9, 4);
@@ -66,6 +68,7 @@ SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema
table_name table_rows
t1 100000
restarting...
+# restart
show index in t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 id A 100000 NULL NULL LSMTREE
@@ -88,6 +91,7 @@ ENGINE=ROCKSDB;
SET GLOBAL rocksdb_force_flush_memtable_now = 1;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
cardinality of the columns after 'a' must be equal to the cardinality of column 'a'
SELECT CARDINALITY INTO @c FROM information_schema.statistics WHERE TABLE_NAME='t2' AND INDEX_NAME='c' AND COLUMN_NAME='a';
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/compression_zstd.result b/storage/rocksdb/mysql-test/rocksdb/r/compression_zstd.result
index 62a6dbbdaca..2c1cab7fcac 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/compression_zstd.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/compression_zstd.result
@@ -1,2 +1,3 @@
+# restart: --rocksdb_default_cf_options=compression_per_level=kZSTDNotFinalCompression;compression_opts=-14:4:0;
create table t (id int primary key) engine=rocksdb;
drop table t;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
index 01fa9dac7fd..88a62028be9 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
@@ -20,7 +20,7 @@ set @tmp1=@@rocksdb_verify_row_debug_checksums;
set rocksdb_verify_row_debug_checksums=1;
set session debug_dbug= "+d,myrocks_simulate_bad_row_read1";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read1";
set rocksdb_verify_row_debug_checksums=@tmp1;
select * from t1 where pk=1;
@@ -28,11 +28,11 @@ pk col1
1 1
set session debug_dbug= "+d,myrocks_simulate_bad_row_read2";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read2";
set session debug_dbug= "+d,myrocks_simulate_bad_row_read3";
select * from t1 where pk=1;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read3";
insert into t1 values(4,'0123456789');
select * from t1;
@@ -56,7 +56,7 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
create table t2 (
@@ -69,6 +69,6 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
-ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB
+ERROR HY000: Got error 204 'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result b/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result
index dfa5c5b2590..668f7e8f47e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result
@@ -57,6 +57,7 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`),
KEY `kc` (`c`)
) ENGINE=ROCKSDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
+# restart
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -117,6 +118,7 @@ SHOW INDEX IN t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 a A 0 NULL NULL LSMTREE
t1 0 kc 1 c A 0 NULL NULL YES LSMTREE
+# restart
INSERT INTO t1 (b,c) VALUES (1,2);
INSERT INTO t1 (b,c) VALUES (3,4);
INSERT INTO t1 (b,c) VALUES (5,6);
@@ -139,6 +141,7 @@ INSERT INTO t1 (col1,col2,col3) VALUES (1,2,3);
ALTER TABLE t1 ADD KEY idx ( col1, col2 );
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 DROP COLUMN col2;
ALTER TABLE t1 DROP COLUMN col3;
@@ -148,6 +151,7 @@ INSERT INTO t1 (col1,col2,col3) VALUES (1,2,3);
ALTER TABLE t1 ADD KEY idx ( col1, col2 );
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 DROP COLUMN col2;
ALTER TABLE t1 DROP COLUMN col3;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/drop_table2.result b/storage/rocksdb/mysql-test/rocksdb/r/drop_table2.result
index fad2939d206..aec4138c722 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/drop_table2.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/drop_table2.result
@@ -10,6 +10,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found");
set global rocksdb_compact_cf = 'cf1';
set global rocksdb_compact_cf = 'rev:cf2';
set global rocksdb_signal_drop_index_thread = 1;
+# restart
CREATE TABLE t1 (
a int not null,
b int not null,
@@ -38,10 +39,12 @@ DELETE FROM t1;
DELETE FROM t2;
DELETE FROM t3;
DELETE FROM t4;
+# restart
DELETE FROM t1;
DELETE FROM t4;
DELETE FROM t1;
DELETE FROM t4;
+# restart
CREATE TABLE t5 (
a int not null,
b int not null,
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/drop_table3.result b/storage/rocksdb/mysql-test/rocksdb/r/drop_table3.result
index 7a33fa83cb4..954e6079bba 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/drop_table3.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/drop_table3.result
@@ -6,6 +6,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found");
set global rocksdb_compact_cf = 'cf1';
set global rocksdb_compact_cf = 'rev:cf2';
set global rocksdb_signal_drop_index_thread = 1;
+# restart
CREATE TABLE t1 (
a int not null,
b int not null,
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result b/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result
index e6a3dee961c..6507aa43ae1 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result
@@ -42,6 +42,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table if exists t2;
create table t2 (
@@ -70,6 +71,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
drop table if exists t3;
create table t3 (
@@ -132,37 +134,38 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain select a1, min(a2) from t1 group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 63 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by
explain select a1, max(a2) from t1 group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 65 NULL 63 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 65 NULL 5 Using index for group-by
explain select a1, min(a2), max(a2) from t1 group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 63 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by
explain select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by
explain select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by
explain select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 # NULL # Using index for group-by
explain select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 63 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by
explain select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by
explain select min(a2) from t1 group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 63 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by
explain select a2, min(c), max(c) from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by
select a1, min(a2) from t1 group by a1;
a1 min(a2)
a a
@@ -289,37 +292,37 @@ b i421 l421
b m422 p422
explain select a1,a2,b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1, max(c) from t1 where a1 in ('a','b','d') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t2 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -681,97 +684,97 @@ d p422
# So the following results are not very meaningful, but are still kept here
explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 5 Using where; Using index for group-by
explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a' or a2 = 'b') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b' or b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a' or a2 = 'b') and (b = 'b' or b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 5 Using where; Using index for group-by
explain select a1,max(c),min(c) from t1 where (a2 = 'a' or a2 = 'b') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b' or b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 126 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (b = 'b' or b = 'a') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 126 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (b = 'b' or b = 'a') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 126 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,a2, max(c) from t1 where (b = 'b' or b = 'a') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 63 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a' or a2 = 'b') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b' or b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 63 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,max(c),min(c) from t2 where (a2 = 'a' or a2 = 'b') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b' or b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 126 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t2 where (b = 'b' or b = 'a') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 126 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t2 where (b = 'b' or b = 'a') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 126 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
explain select a1,a2, max(c) from t2 where (b = 'b' or b = 'a') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range NULL idx_t3_1 6 NULL 63 Using where; Using index for group-by
+1 SIMPLE t3 range NULL idx_t3_1 6 NULL 4 Using where; Using index for group-by
explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a' or a2 = 'b') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index NULL idx_t3_1 10 NULL 1000 Using where; Using index
+1 SIMPLE t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b' or b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index NULL idx_t3_1 10 NULL 1000 Using where; Using index
+1 SIMPLE t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index
explain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 range NULL idx_t3_1 6 NULL 63 Using where; Using index for group-by
+1 SIMPLE t3 range NULL idx_t3_1 6 NULL 4 Using where; Using index for group-by
explain select a1,max(c),min(c) from t3 where (a2 = 'a' or a2 = 'b') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index NULL idx_t3_1 10 NULL 1000 Using where; Using index
+1 SIMPLE t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index
explain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b' or b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t3 index NULL idx_t3_1 10 NULL 1000 Using where; Using index
+1 SIMPLE t3 index NULL idx_t3_1 10 NULL 192 Using where; Using index
select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
a1 a2 b max(c) min(c)
a a b h112 e112
@@ -1014,25 +1017,25 @@ b h212 a211
c h312 a311
explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 63 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t2 where (a2 = 'a' or a2 = 'b') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 63 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 6 Using where; Using index for group-by
explain select a1,a2,b,max(c) from t2 where (a2 = 'a' or a2 = 'b') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 126 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
explain select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 126 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 126 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
a1 a2 b min(c)
a a NULL a777
@@ -1070,49 +1073,49 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 147 NULL # Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c between 'b111' and 'g112') or (c between 'd000' and 'i110') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -1579,36 +1582,36 @@ explain select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c = t1.c )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 1000 Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func 1
-2 MATERIALIZED t2 index NULL idx_t2_1 163 NULL 1000 Using index
+2 MATERIALIZED t2 index NULL idx_t2_1 163 NULL 164 Using index
explain select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c > 'b1' )
group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL idx_t1_1 163 NULL 1000 Using index
-2 SUBQUERY t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using index
+2 SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by
@@ -1713,25 +1716,25 @@ select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') grou
a1 a2 b min(c)
explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121' or c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 146 NULL # Using where; Using index for group-by
explain select a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using where; Using index for group-by
explain select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
@@ -1740,7 +1743,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
explain select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 146 NULL # Using where; Using index for group-by
select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
a1 a2 b
a a b
@@ -1788,50 +1791,50 @@ select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1
a1 a2 b
explain select distinct a1,a2,b from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using index for group-by
explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain extended select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 501 100.00 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select distinct `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where `test`.`t1`.`b` = 'a' and `test`.`t1`.`c` = 'i121' and `test`.`t1`.`a2` >= 'b'
explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select distinct b from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'b';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 5 Using where; Using index for group-by
explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'e';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 5 Using where; Using index for group-by
explain select distinct a1,a2,b from t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using index for group-by
explain select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using where; Using index for group-by
explain extended select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 501 100.00 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 83 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select distinct `test`.`t2`.`a1` AS `a1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where `test`.`t2`.`b` = 'a' and `test`.`t2`.`c` = 'i121' and `test`.`t2`.`a2` >= 'b'
explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 146 NULL # Using where; Using index for group-by
explain select distinct b from t2 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_2 146 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_2 146 NULL 164 Using where; Using index
explain select distinct a1 from t2 where a1 in ('a', 'd') and a2 = 'b';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 129 NULL 63 Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 129 NULL 6 Using where; Using index for group-by
explain select distinct a1 from t2 where a1 in ('a', 'd') and a2 = 'e';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 129 NULL 63 Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 129 NULL 6 Using where; Using index for group-by
select distinct a1,a2,b from t1;
a1 a2 b
a a a
@@ -1960,46 +1963,46 @@ c e
d e
explain select distinct a1,a2,b from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using index for group-by
explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by
explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by; Using temporary; Using filesort
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using where; Using index for group-by; Using temporary; Using filesort
explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'b' group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 5 Using where; Using index for group-by
explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'e' group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 5 Using where; Using index for group-by
explain select distinct a1,a2,b from t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using index for group-by
explain select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using where; Using index for group-by
explain select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 146 NULL # Using where; Using index for group-by
explain select distinct b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by; Using temporary; Using filesort
+1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using where; Using index for group-by; Using temporary; Using filesort
explain select distinct a1 from t2 where a1 in ('a', 'd') and a2 = 'b' group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 129 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 129 NULL # Using where; Using index for group-by
explain select distinct a1 from t2 where a1 in ('a', 'd') and a2 = 'e' group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 129 NULL # Using where; Using index for group-by
+1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_2 129 NULL # Using where; Using index for group-by
select distinct a1,a2,b from t1;
a1 a2 b
a a a
@@ -2082,21 +2085,21 @@ select distinct a1 from t2 where a1 in ('a', 'd') and a2 = 'e' group by a1;
a1
explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 501 Using where; Using index for group-by (scanning)
+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by
explain extended select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 100.00 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 17 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`) AS `count(distinct a1,a2,b)` from `test`.`t1` where `test`.`t1`.`b` = 'c' and `test`.`t1`.`a1` > 'a' and `test`.`t1`.`a2` > 'a'
explain select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
explain extended select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 100.00 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 17 100.00 Using where; Using index for group-by
Warnings:
Note 1003 select 98 + count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`) AS `98 + count(distinct a1,a2,b)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' and `test`.`t1`.`a2` > 'a'
select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
@@ -2116,19 +2119,19 @@ select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a');
104
explain select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select concat(a1,min(c)),b from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select concat(a1,min(c)),b,max(c) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select concat(a1,a2),b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 251 Using where; Using index for group-by
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 126 Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using index for group-by
select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b;
a1 a2 b concat(min(c), max(c))
a a a a111d111
@@ -2197,83 +2200,83 @@ concat(ord(min(b)),ord(max(b))) min(b) max(b)
9798 a b
explain select a1,a2,b,d,min(c),max(c) from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 1000
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128
explain select a1,a2,b,d from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 1000
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128
explain extended select a1,a2,min(b),max(b) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 1000 100.00 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 128 99.22 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,min(`test`.`t1`.`b`) AS `min(b)`,max(`test`.`t1`.`b`) AS `max(b)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`
explain extended select a1,a2,b,min(c),max(c) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 130 NULL 1000 100.00 Using where
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 130 NULL 128 75.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,min(`test`.`t1`.`c`) AS `min(c)`,max(`test`.`t1`.`c`) AS `max(c)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain extended select a1,a2,b,c from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b,c;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 1000 100.00 Using where
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 128 75.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`,`test`.`t1`.`c`
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b < 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b < 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b <= 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b <= 'b' and b >= 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain extended select a1,a2,b from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 1000 100.00 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 128 99.22 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
a1 a2 min(b) c
a a a a111
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b = 'a') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,min(c),max(c) from t2
where (c > 'a000') and (c <= 'd999') and (c like '_8__') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1, a2, b, c, min(d), max(d) from t1 group by a1,a2,b,c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 1000
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128
explain select a1,a2,count(a2) from t1 group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 1000 Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using index
explain extended select a1,a2,count(a2) from t1 where (a1 > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1000 100.00 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 128 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,count(`test`.`t1`.`a2`) AS `count(a2)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain extended select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1000 100.00 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 128 100.00 Using where; Using index
Warnings:
Note 1003 select sum(ord(`test`.`t1`.`a1`)) AS `sum(ord(a1))` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'a' or b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'a' or b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain select distinct(a1) from t1 where ord(a2) = 98;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL idx_t1_2 147 NULL 1000 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index
select distinct(a1) from t1 where ord(a2) = 98;
a1
a
@@ -2282,7 +2285,7 @@ c
d
explain select a1 from t1 where a2 = 'b' group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using where; Using index for group-by
select a1 from t1 where a2 = 'b' group by a1;
a1
a
@@ -2291,7 +2294,7 @@ c
d
explain select distinct a1 from t1 where a2 = 'b';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using where; Using index for group-by
select distinct a1 from t1 where a2 = 'b';
a1
a
@@ -2463,10 +2466,11 @@ CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b), KEY b (b)) engine=RocksDB;
INSERT INTO t1 VALUES (1,1),(1,2),(1,0),(1,3);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,b PRIMARY 8 NULL 501 Using where; Using index for group-by
+1 SIMPLE t1 range PRIMARY,b PRIMARY 8 NULL 2 Using where; Using index for group-by
SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
MAX(b) a
1 1
@@ -2477,10 +2481,11 @@ CREATE TABLE t2 (a int, b int, c int, PRIMARY KEY (a,b,c)) engine=RocksDB;
INSERT INTO t2 SELECT a,b,b FROM t1;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range PRIMARY PRIMARY 12 NULL 251 Using where; Using index for group-by
+1 SIMPLE t2 range PRIMARY PRIMARY 12 NULL 2 Using where; Using index for group-by
SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
MIN(c)
2
@@ -2490,10 +2495,11 @@ INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 6 Using index for group-by
FLUSH STATUS;
SELECT max(b), a FROM t1 GROUP BY a;
max(b) a
@@ -2508,7 +2514,7 @@ Handler_read_next 0
Handler_read_retry 0
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 6 Using index for group-by
FLUSH STATUS;
CREATE TABLE t2 engine=RocksDB SELECT max(b), a FROM t1 GROUP BY a;
SHOW STATUS LIKE 'handler_read__e%';
@@ -2544,54 +2550,54 @@ Handler_read_retry 0
EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
(SELECT max(b), a FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range NULL a 5 NULL 251 Using index for group-by
-2 UNION t1 range NULL a 5 NULL 251 Using index for group-by
+1 PRIMARY t1 range NULL a 5 NULL 6 Using index for group-by
+2 UNION t1 range NULL a 5 NULL 6 Using index for group-by
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1 AS t1_outer;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer index NULL a 10 NULL 1000 Using index
-2 SUBQUERY t1 range NULL a 5 NULL 251 Using index for group-by
+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1 range a a 5 NULL 6 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer index NULL a 10 NULL 1000 Using index
-2 SUBQUERY t1 index NULL a 10 NULL 1000 Using index
+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer index NULL a 10 NULL 1000 Using index
-2 SUBQUERY t1 range NULL a 5 NULL 251 Using index for group-by
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+2 SUBQUERY t1 range a a 5 NULL 6 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 251
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 4 Using index
-2 MATERIALIZED t1 range NULL a 5 NULL 251 Using index for group-by
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 6
+1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 3 Using index
+2 MATERIALIZED t1 range a a 5 NULL 6 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer range NULL a 5 NULL 251 Using index for group-by
-2 SUBQUERY t1 range NULL a 5 NULL 251 Using index for group-by
+1 PRIMARY t1_outer range NULL a 5 NULL 6 Using index for group-by
+2 SUBQUERY t1 range a a 5 NULL 6 Using where; Using index for group-by
EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
AND t1_outer1.b = t1_outer2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer1 ref a a 5 const 4 Using where; Using index
-1 PRIMARY t1_outer2 index NULL a 10 NULL 1000 Using where; Using index; Using join buffer (flat, BNL join)
-2 SUBQUERY t1 range NULL a 5 NULL 251 Using index for group-by
+1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index
+1 PRIMARY t1_outer1 ref a a 10 const,test.t1_outer2.b 1 Using where; Using index
+2 SUBQUERY t1 range a a 5 NULL 6 Using where; Using index for group-by
EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer2 index NULL a 10 NULL 1000 Using index
-2 SUBQUERY t1_outer index NULL a 10 NULL 1000 Using index
-3 SUBQUERY t1 range NULL a 5 NULL 251 Using index for group-by
+1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1_outer index NULL a 10 NULL 15 Using index
+3 SUBQUERY t1 range a a 5 NULL 6 Using where; Using index for group-by
CREATE TABLE t3 LIKE t1;
FLUSH STATUS;
INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
+Handler_read_key 13
Handler_read_next 0
Handler_read_retry 0
DELETE FROM t3;
@@ -2626,10 +2632,11 @@ INSERT INTO t1 VALUES
(4), (2), (1), (2), (2), (4), (1), (4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT DISTINCT(a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx 5 NULL 501 Using index for group-by
+1 SIMPLE t1 range NULL idx 5 NULL 4 Using index for group-by
SELECT DISTINCT(a) FROM t1;
a
1
@@ -2637,7 +2644,7 @@ a
4
EXPLAIN SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx 5 NULL 501 Using index for group-by
+1 SIMPLE t1 range NULL idx 5 NULL 4 Using index for group-by
SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
a
1
@@ -2650,11 +2657,12 @@ INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
a MIN(b) MAX(b)
4 1 3
@@ -2665,7 +2673,7 @@ CREATE INDEX break_it ON t1 (a, b);
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL break_it 10 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL break_it 10 NULL 4 Using index for group-by
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
a MIN(b) MAX(b)
1 1 3
@@ -2675,7 +2683,7 @@ a MIN(b) MAX(b)
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL break_it 10 NULL 251 Using index for group-by; Using temporary; Using filesort
+1 SIMPLE t1 range NULL break_it 10 NULL 4 Using index for group-by; Using temporary; Using filesort
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
a MIN(b) MAX(b)
4 1 3
@@ -2685,7 +2693,7 @@ a MIN(b) MAX(b)
EXPLAIN
SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL break_it 10 NULL 1000 Using index
+1 SIMPLE t1 index NULL break_it 10 NULL 12 Using index
SELECT a, MIN(b), MAX(b), AVG(b) FROM t1 GROUP BY a ORDER BY a DESC;
a MIN(b) MAX(b) AVG(b)
4 1 3 2.0000
@@ -2706,6 +2714,7 @@ insert into t1 (a,b) values
insert into t1 (a,b) select a, max(b)+1 from t1 where a = 0 group by a;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select * from t1;
a b
@@ -2768,7 +2777,7 @@ a b
3 13
explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ref PRIMARY,index PRIMARY 4 const 15 100.00 Using index; Using temporary
+1 SIMPLE t1 ref PRIMARY,index PRIMARY 4 const 15 6.67 Using index; Using temporary
Warnings:
Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,max(`test`.`t1`.`b`) + 1 AS `max(b)+1` from `test`.`t1` where `test`.`t1`.`a` = 0 group by `test`.`t1`.`a`
drop table t1;
@@ -2780,10 +2789,11 @@ INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a,b,c+1,d FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT DISTINCT c FROM t1 WHERE d=4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL foo 10 NULL 63 Using where; Using index for group-by
+1 SIMPLE t1 range NULL foo 10 NULL 3 Using where; Using index for group-by
SELECT DISTINCT c FROM t1 WHERE d=4;
c
1
@@ -2799,13 +2809,14 @@ INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
# test MIN
#should use range with index for group by
EXPLAIN
SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range NULL a 10 NULL 251 Using where; Using index for group-by
+1 SIMPLE t range NULL a 10 NULL 2 Using where; Using index for group-by
#should return 1 row
SELECT a, MIN(b) FROM t WHERE b <> 0 GROUP BY a;
a MIN(b)
@@ -2815,7 +2826,7 @@ a MIN(b)
EXPLAIN
SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range NULL a 10 NULL 251 Using where; Using index for group-by
+1 SIMPLE t range NULL a 10 NULL 2 Using where; Using index for group-by
#should return 1 row
SELECT a, MAX(b) FROM t WHERE b <> 1 GROUP BY a;
a MAX(b)
@@ -2826,7 +2837,7 @@ INSERT INTO t SELECT a, 2 FROM t;
EXPLAIN
SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range NULL a 10 NULL 251 Using where; Using index for group-by
+1 SIMPLE t range NULL a 10 NULL 2 Using where; Using index for group-by
#should return 1 row
SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
a MAX(b)
@@ -2841,6 +2852,7 @@ INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
INSERT INTO t SELECT * FROM t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
SELECT a, MAX(b) FROM t WHERE 0=b+0 GROUP BY a;
a MAX(b)
@@ -2862,6 +2874,7 @@ CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL, KEY (b)) engine=RocksDB;
INSERT INTO t1 VALUES(1,1),(2,1);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT 1 AS c, b FROM t1 WHERE b IN (1,2) GROUP BY c, b;
c b
@@ -2880,6 +2893,7 @@ CREATE TABLE t1 ( a INT, KEY (a) ) engine=RocksDB;
INSERT INTO t1 VALUES (1), (2), (3);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN
SELECT MIN( a ) FROM t1 WHERE a = NULL;
@@ -2940,7 +2954,7 @@ NULL
EXPLAIN
SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0);
id select_type table type possible_keys key key_len ref rows Extra
-x x x x x x x x x Using where; Using index
+x x x x x x x x x Impossible WHERE noticed after reading const tables
x x x x x x x x x Using where; Using index
SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0);
MIN( a )
@@ -2955,6 +2969,7 @@ NULL
INSERT INTO t1 VALUES (NULL), (NULL);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN
SELECT MIN( a ) FROM t1 WHERE a = NULL;
@@ -3015,7 +3030,7 @@ NULL
EXPLAIN
SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0);
id select_type table type possible_keys key key_len ref rows Extra
-x x x x x x x x x Using where; Using index
+x x x x x x x x x Impossible WHERE noticed after reading const tables
x x x x x x x x x Using where; Using index
SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0);
MIN( a )
@@ -3033,6 +3048,7 @@ CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY) engine=RocksDB;
INSERT INTO t1 VALUES (1), (2), (3);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
#
# NULL-safe operator test disabled for non-NULL indexed columns.
@@ -3097,7 +3113,7 @@ NULL
EXPLAIN
SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0);
id select_type table type possible_keys key key_len ref rows Extra
-x x x x x x x x x Using where; Using index
+x x x x x x x x x Impossible WHERE noticed after reading const tables
x x x x x x x x x Using where; Using index
SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0);
MIN( a )
@@ -3133,6 +3149,7 @@ INSERT INTO t1 SELECT a, b + 4, 1 FROM t1;
INSERT INTO t1 SELECT a + 1, b, 1 FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE t2 (a INT, b INT, c INT, d INT, e INT, f INT, KEY (a,b,c)) engine=RocksDB;
INSERT INTO t2 VALUES (1,1,1,1,1,1), (1,2,1,1,1,1), (1,3,1,1,1,1),
@@ -3141,48 +3158,49 @@ INSERT INTO t2 SELECT a, b + 4, c,d,e,f FROM t2;
INSERT INTO t2 SELECT a + 1, b, c,d,e,f FROM t2;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a) FROM t1;
COUNT(DISTINCT a)
2
EXPLAIN SELECT COUNT(DISTINCT a,b) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 501 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT a,b) FROM t1;
COUNT(DISTINCT a,b)
16
EXPLAIN SELECT COUNT(DISTINCT b,a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 501 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT b,a) FROM t1;
COUNT(DISTINCT b,a)
16
EXPLAIN SELECT COUNT(DISTINCT b) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 1000 Using index
+1 SIMPLE t1 index NULL a 10 NULL 16 Using index
SELECT COUNT(DISTINCT b) FROM t1;
COUNT(DISTINCT b)
8
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a;
COUNT(DISTINCT a)
1
1
EXPLAIN SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 501 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a;
COUNT(DISTINCT b)
8
8
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 1000 Using index; Using filesort
+1 SIMPLE t1 index NULL a 10 NULL 16 Using index; Using filesort
SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b;
COUNT(DISTINCT a)
2
@@ -3195,94 +3213,94 @@ COUNT(DISTINCT a)
2
EXPLAIN SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 1000 Using index
+1 SIMPLE t1 index NULL a 10 NULL 16 Using index
SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
COUNT(DISTINCT a)
2
EXPLAIN SELECT COUNT(DISTINCT a, b + 0) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 1000 Using index
+1 SIMPLE t1 index NULL a 10 NULL 16 Using index
SELECT COUNT(DISTINCT a, b + 0) FROM t1;
COUNT(DISTINCT a, b + 0)
16
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL a 10 NULL 1000 Using index
+1 SIMPLE t1 index NULL a 10 NULL 16 Using index
SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10;
COUNT(DISTINCT a)
2
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16
SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10;
COUNT(DISTINCT a)
2
EXPLAIN SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10;
1
1
EXPLAIN SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 10 NULL 501 Using index for group-by
+1 SIMPLE t1 range NULL a 10 NULL 17 Using index for group-by
SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1;
1
1
1
EXPLAIN SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1_1 index NULL a 10 NULL 1000 Using index; Using temporary; Using filesort
-1 SIMPLE t1_2 index NULL a 10 NULL 1000 Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t1_1 index NULL a 10 NULL 16 Using index; Using temporary; Using filesort
+1 SIMPLE t1_2 index NULL a 10 NULL 16 Using index; Using join buffer (flat, BNL join)
SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a;
COUNT(DISTINCT t1_1.a)
1
1
EXPLAIN SELECT COUNT(DISTINCT a), 12 FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 251 Using index for group-by
+1 SIMPLE t1 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a), 12 FROM t1;
COUNT(DISTINCT a) 12
2 12
EXPLAIN SELECT COUNT(DISTINCT a, b, c) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 501 Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT a, b, c) FROM t2;
COUNT(DISTINCT a, b, c)
16
EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 5 NULL 126 Using index for group-by
+1 SIMPLE t2 range NULL a 5 NULL 3 Using index for group-by
SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2;
COUNT(DISTINCT a) SUM(DISTINCT a) AVG(DISTINCT a)
2 3 1.5000
EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t2 ALL NULL NULL NULL NULL 16
SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2;
COUNT(DISTINCT a) SUM(DISTINCT a) AVG(DISTINCT f)
2 3 1.0000
EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 10 NULL 251 Using index for group-by
+1 SIMPLE t2 range NULL a 10 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2;
COUNT(DISTINCT a, b) COUNT(DISTINCT b, a)
16 16
EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t2 ALL NULL NULL NULL NULL 16
SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2;
COUNT(DISTINCT a, b) COUNT(DISTINCT b, f)
16 8
EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1000
+1 SIMPLE t2 ALL NULL NULL NULL NULL 16
SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2;
COUNT(DISTINCT a, b) COUNT(DISTINCT b, d)
16 8
EXPLAIN SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 501 Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 17 Using index for group-by
SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c;
a c COUNT(DISTINCT c, a, b)
1 1 1
@@ -3304,41 +3322,41 @@ a c COUNT(DISTINCT c, a, b)
EXPLAIN SELECT COUNT(DISTINCT c, a, b) FROM t2
WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range a a 15 NULL 501 Using where; Using index for group-by
+1 SIMPLE t2 range a a 15 NULL 17 Using where; Using index for group-by
SELECT COUNT(DISTINCT c, a, b) FROM t2
WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c;
COUNT(DISTINCT c, a, b)
EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 WHERE a = 5
GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref a a 5 const 1000 Using where; Using index
+1 SIMPLE t2 ref a a 5 const 16 Using where; Using index
SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 WHERE a = 5
GROUP BY b;
COUNT(DISTINCT b) SUM(DISTINCT b)
EXPLAIN SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 10 NULL 251 Using index for group-by
+1 SIMPLE t2 range NULL a 10 NULL 17 Using index for group-by
SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
a COUNT(DISTINCT b) SUM(DISTINCT b)
1 8 36
2 8 36
EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 10 NULL 251 Using index for group-by
+1 SIMPLE t2 range NULL a 10 NULL 17 Using index for group-by
SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
COUNT(DISTINCT b) SUM(DISTINCT b)
8 36
8 36
EXPLAIN SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 Using where
+1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where
SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42;
COUNT(DISTINCT a, b)
0
EXPLAIN SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2
WHERE b = 13 AND c = 42 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 126 Using where; Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 3 Using where; Using index for group-by
SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2
WHERE b = 13 AND c = 42 GROUP BY a;
a COUNT(DISTINCT a) SUM(DISTINCT a)
@@ -3346,20 +3364,20 @@ a COUNT(DISTINCT a) SUM(DISTINCT a)
# the second part of count(..) is defined by a constant predicate
EXPLAIN SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL a 15 NULL 1000 Using where; Using index
+1 SIMPLE t2 index NULL a 15 NULL 16 Using where; Using index
SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42;
COUNT(DISTINCT a, b) SUM(DISTINCT a)
0 NULL
EXPLAIN SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL a 15 NULL 1000 Using index
+1 SIMPLE t2 index NULL a 15 NULL 16 Using index
SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
SUM(DISTINCT a) MAX(b)
1 8
2 8
EXPLAIN SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL a 15 NULL 501 Using index for group-by
+1 SIMPLE t2 range NULL a 15 NULL 17 Using index for group-by
SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
42 * (a + c + COUNT(DISTINCT c, a, b))
126
@@ -3380,7 +3398,7 @@ SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
168
EXPLAIN SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL a 15 NULL 1000 Using index
+1 SIMPLE t2 index NULL a 15 NULL 16 Using index
SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
(SUM(DISTINCT a) + MAX(b))
9
@@ -3400,6 +3418,7 @@ insert into t1 values(1,'A'),(1 , 'B'), (1, 'C'), (2, 'A'),
(3, 'A'), (3, 'B'), (3, 'C'), (3, 'D');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
f1 COUNT(DISTINCT f2)
@@ -3408,7 +3427,7 @@ f1 COUNT(DISTINCT f2)
3 4
explain SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 5 NULL 1000 Using index
+1 SIMPLE t1 index NULL PRIMARY 5 NULL 8 Using index
drop table t1;
# End of test#50539.
#
@@ -3419,9 +3438,11 @@ CREATE TABLE t (a INT, b INT, KEY(a,b)) engine=RocksDB;
INSERT INTO t VALUES (1,1), (2,2), (3,3), (4,4), (1,0), (3,2), (4,5);
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
a SUM(DISTINCT a) MIN(b)
@@ -3431,7 +3452,7 @@ a SUM(DISTINCT a) MIN(b)
4 4 4
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t index NULL a 10 NULL 1000 Using index
+1 SIMPLE t index NULL a 10 NULL 7 Using index
SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
a SUM(DISTINCT a) MAX(b)
1 1 1
@@ -3440,7 +3461,7 @@ a SUM(DISTINCT a) MAX(b)
4 4 5
EXPLAIN SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t index NULL a 10 NULL 1000 Using index
+1 SIMPLE t index NULL a 10 NULL 7 Using index
SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
a MAX(b)
1 1
@@ -3449,13 +3470,13 @@ a MAX(b)
4 5
EXPLAIN SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t index NULL a 10 NULL 1000 Using index
+1 SIMPLE t index NULL a 10 NULL 7 Using index
SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
SUM(DISTINCT a) MIN(b) MAX(b)
10 0 5
EXPLAIN SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t index NULL a 10 NULL 1000 Using index
+1 SIMPLE t index NULL a 10 NULL 7 Using index
SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
a SUM(DISTINCT a) MIN(b) MAX(b)
1 1 0 1
@@ -3464,7 +3485,7 @@ a SUM(DISTINCT a) MIN(b) MAX(b)
4 4 4 5
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t index NULL a 10 NULL 1000 Using index
+1 SIMPLE t index NULL a 10 NULL 7 Using index
DROP TABLE t;
#
# Bug#18109609: LOOSE INDEX SCAN IS NOT USED WHEN IT SHOULD
@@ -3480,10 +3501,11 @@ INSERT INTO t1(c1,c2) VALUES
(4,14), (4,15), (4,16), (4,17), (4,18), (4,19), (4,20),(5,5);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT MAX(c2), c1 FROM t1 WHERE c1 = 4 GROUP BY c1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref c1 c1 5 const 1000 Using index
+1 SIMPLE t1 ref c1 c1 5 const 28 Using index
FLUSH STATUS;
SELECT MAX(c2), c1 FROM t1 WHERE c1 = 4 GROUP BY c1;
MAX(c2) c1
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result
index 7fb9055083b..7c4f57b61bd 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result
@@ -28,6 +28,7 @@ insert into t1 values (1, 100, 100), (1, 200, 200), (1, 300, 300);
set global rocksdb_force_flush_memtable_now=1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 where key1 = 1;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb2.result b/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb2.result
index 4603e049724..efe4eaf2141 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb2.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb2.result
@@ -23,10 +23,11 @@ INDEX i8(key8)
);
analyze table t0;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
explain select * from t0 where key1 < 3 or key1 > 1020;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 range i1 i1 4 NULL 4 Using index condition; Using where
+1 SIMPLE t0 range i1 i1 4 NULL 4 Using index condition
explain
select * from t0 where key1 < 3 or key2 > 1020;
id select_type table type possible_keys key key_len ref rows Extra
@@ -286,7 +287,7 @@ id select_type table type possible_keys key key_len ref rows Extra
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
explain select * from (select * from t1 where key1 = 3 or key2 =3) as Z where key8 >5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range i1,i2,i8 i8 4 NULL 2 Using index condition; Using where
+1 SIMPLE t1 index_merge i1,i2,i8 i1,i2 4,4 NULL 4 Using union(i1,i2); Using where
create table t3 like t0;
insert into t3 select * from t0;
alter table t3 add key9 int not null, add index i9(key9);
@@ -826,6 +827,7 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select key1a, key1b, key2a, key2b, key3a, key3b from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1;
count(*)
@@ -1330,7 +1332,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,pktail2ok key1 4 const 2 Using where
explain select * from t1 where (pktail2ok=1 and pk1< 50000) or key1=10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok PRIMARY,key1 4,4 NULL ROWS Using union(PRIMARY,key1); Using where
+1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok pktail2ok,key1 8,4 NULL ROWS Using sort_union(pktail2ok,key1); Using where
explain select * from t1 where pktail3bad=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,pktail3bad EITHER_KEY 4 const ROWS Using where
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result b/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
index a7679e7cc3e..769c600cdaf 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
@@ -54,7 +54,6 @@ buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL N
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created)
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written)
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read)
-buffer_pages0_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of page 0 read (innodb_pages0_read)
buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read
buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads avoided triggering cluster read
buffer_data_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Amount of data read in bytes (innodb_data_reads)
@@ -163,7 +162,6 @@ trx_nl_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL N
trx_commits_insert_update transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions committed with inserts and updates
trx_rollbacks transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions rolled back
trx_rollbacks_savepoint transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions rolled back to savepoint
-trx_rollback_active transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of resurrected active transactions rolled back
trx_active_transactions transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of active transactions
trx_rseg_history_len transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Length of the TRX_RSEG_HISTORY list
trx_undo_slots_used transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of undo slots used
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/issue884.result b/storage/rocksdb/mysql-test/rocksdb/r/issue884.result
index acfaca96d68..60c9674516a 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/issue884.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/issue884.result
@@ -18,6 +18,7 @@ key n (n),
key d (d, a)
) engine = rocksdb default charset = latin1;
Table Op Msg_type Msg_text
+test.test analyze status Engine-independent statistics collected
test.test analyze status OK
explain
select * from test where d = 10 and a = 10 and b = 2;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/max_open_files.result b/storage/rocksdb/mysql-test/rocksdb/r/max_open_files.result
index 5d34f4e9640..d3aac194bc4 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/max_open_files.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/max_open_files.result
@@ -19,3 +19,4 @@ SELECT @@global.rocksdb_max_open_files;
SELECT FLOOR(@@global.open_files_limit / 2) = @@global.rocksdb_max_open_files;
FLOOR(@@global.open_files_limit / 2) = @@global.rocksdb_max_open_files
1
+# restart
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/misc.result b/storage/rocksdb/mysql-test/rocksdb/r/misc.result
index 6087928b80f..b2e5d04f6f8 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/misc.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/misc.result
@@ -46,6 +46,8 @@ db User NULL NULL
event db NULL NULL
event name NULL NULL
func name NULL NULL
+global_priv Host NULL NULL
+global_priv User NULL NULL
gtid_slave_pos domain_id NULL NULL
gtid_slave_pos sub_id NULL NULL
help_category help_category_id NULL NULL
@@ -56,8 +58,6 @@ help_relation help_keyword_id NULL NULL
help_relation help_topic_id NULL NULL
help_topic help_topic_id NULL NULL
help_topic name NULL NULL
-host Db NULL NULL
-host Host NULL NULL
index_stats db_name NULL NULL
index_stats index_name NULL NULL
index_stats prefix_arity NULL NULL
@@ -92,5 +92,3 @@ time_zone_transition Time_zone_id NULL NULL
time_zone_transition Transition_time NULL NULL
time_zone_transition_type Time_zone_id NULL NULL
time_zone_transition_type Transition_type_id NULL NULL
-user Host NULL NULL
-user User NULL NULL
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/no_merge_sort.result b/storage/rocksdb/mysql-test/rocksdb/r/no_merge_sort.result
index 3a631d2925b..6ea13872033 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/no_merge_sort.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/no_merge_sort.result
@@ -1,63 +1,123 @@
Warnings:
Note 1051 Unknown table 'test.ti_nk'
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
skip_merge_sort
true
DROP TABLE ti_nk;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/partition.result b/storage/rocksdb/mysql-test/rocksdb/r/partition.result
index 1ba966e9e07..a7f2a6112c1 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/partition.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/partition.result
@@ -46,6 +46,7 @@ CREATE TABLE t1 (i INT, j INT, k INT, PRIMARY KEY (i)) ENGINE = ROCKSDB PARTITIO
Table Op Msg_type Msg_text
test.t1 optimize status OK
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
Table Op Msg_type Msg_text
test.t1 repair status OK
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result b/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result
index 89ebe760384..ce3d7d9147e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result
@@ -1,3 +1,4 @@
+# restart
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
i INT,
@@ -144,7 +145,7 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` >= 500 and `test`.`t1`.`b` <= 500
explain extended select * from t1 where a< 750 and b> 500 and b< 750;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range ka,kb ka 5 NULL 1000 100.00 Using index condition; Using where
+1 SIMPLE t1 range ka,kb ka 5 NULL 1000 5.00 Using index condition; Using where
Warnings:
Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` < 750 and `test`.`t1`.`b` > 500 and `test`.`t1`.`b` < 750
drop index ka on t1;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
index a70f1d15d6b..4f0d68845a3 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
@@ -1406,6 +1406,7 @@ create table t1 (i int primary key auto_increment) engine=RocksDB;
insert into t1 values (null);
insert into t1 values (null);
SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK = @ORIG_PAUSE_BACKGROUND_WORK;
+# restart
SET @ORIG_PAUSE_BACKGROUND_WORK = @@ROCKSDB_PAUSE_BACKGROUND_WORK;
SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK = 1;
insert into t1 values (null);
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_options.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_options.result
index 6c3d85b760c..80b6301a07c 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_options.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_options.result
@@ -7,6 +7,7 @@ primary key (a) comment 'z') engine=rocksdb;
insert into t1 values (1);
insert into t2 values (2);
insert into t3 values (2);
+# restart
Default options for all column families:
@@ -32,6 +33,7 @@ z WRITE_BUFFER_SIZE 12582912
__system__ MAX_BYTES_FOR_LEVEL_MULTIPLIER 10.000000
__system__ TARGET_FILE_SIZE_BASE 1048576
__system__ WRITE_BUFFER_SIZE 12582912
+# restart: --rocksdb_override_cf_options=cf1={write_buffer_size=8m;target_file_size_base=2m};cf2={write_buffer_size=16m;max_bytes_for_level_multiplier=8};z={target_file_size_base=4m};
Individualized options for column families:
@@ -57,5 +59,6 @@ z WRITE_BUFFER_SIZE 12582912
__system__ MAX_BYTES_FOR_LEVEL_MULTIPLIER 10.000000
__system__ TARGET_FILE_SIZE_BASE 1048576
__system__ WRITE_BUFFER_SIZE 12582912
+# restart: --rocksdb_override_cf_options=cf1={write_buffer_size=8m;target_file_size_base=2m};cf2={write_buffer_size=16m;max_bytes_for_level_multiplier=8};z={target_file_size_base=4m};
drop table t1,t2,t3;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result
index ed226f0d8ba..32bb70a7464 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result
@@ -350,6 +350,8 @@ cf_name
another_cf_for_p5
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze Warning Engine-independent statistics are not collected for column 'col5'
test.t2 analyze status OK
EXPLAIN PARTITIONS SELECT * FROM t2 WHERE col3 = 0x4 AND col2 = 0x34567;
id select_type table partitions type possible_keys key key_len ref rows Extra
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result
index aae6de12f6a..e4b757ef3b0 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result
@@ -125,4 +125,5 @@ set session debug_dbug= "-d,myrocks_simulate_bad_key_checksum1";
set @@global.rocksdb_store_row_debug_checksums=@save_rocksdb_store_row_debug_checksums;
set @@global.rocksdb_verify_row_debug_checksums=@save_rocksdb_verify_row_debug_checksums;
set @@global.rocksdb_checksums_pct=@save_rocksdb_checksums_pct;
+# restart
drop table t2,t3,t4;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result
index 2fde11c2a08..70bef39eceb 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result
@@ -131,6 +131,7 @@ DROP DATABASE db3;
CREATE TABLE t1 (a INT) ENGINE=RocksDB PARTITION BY HASH(a) PARTITIONS 2;
INSERT INTO t1 (a) VALUES (1),(2);
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+# restart
SELECT 1;
1
1
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result
index a925c21e188..bcda9341f1f 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result
@@ -1,13 +1,14 @@
create table t1 (id1 bigint, id2 bigint, c1 bigint, c2 bigint, c3 bigint, c4 bigint, c5 bigint, c6 bigint, c7 bigint, primary key (id1, id2), index i(c1, c2));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1;
count(*)
10000
explain select c1 from t1 where c1 > 5 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range i i 9 NULL # Using where; Using index
+1 SIMPLE t1 index i i 18 NULL # Using where; Using index
drop table t1;
#
# MDEV-17414: MyROCKS order desc limit 1 fails
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/select.result b/storage/rocksdb/mysql-test/rocksdb/r/select.result
index fc3825d5377..7ea43adc9ea 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/select.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/select.result
@@ -115,6 +115,8 @@ SELECT t1.a, t2.b FROM t2, t1 WHERE t1.a = t2.a ORDER BY t2.b, t1.a
INTO OUTFILE '<DATADIR>/select.out'
CHARACTER SET utf8
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '''';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
200,'bar'
200,'bar'
100,'foobar'
@@ -126,8 +128,12 @@ INTO DUMPFILE '<DATADIR>/select.dump';
ERROR 42000: Result consisted of more than one row
SELECT t1.*, t2.* FROM t1, t2 ORDER BY t2.b, t1.a, t2.a, t1.b, t1.pk, t2.pk LIMIT 1
INTO DUMPFILE '<DATADIR>/select.dump';
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
1z2200bar3
SELECT MIN(a), MAX(a) FROM t1 INTO @min, @max;
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT @min, @max;
@min @max
1 200
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result b/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result
index d95549be4c1..139d323bb1a 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result
@@ -114,6 +114,7 @@ from information_schema.tables
where table_schema=database() and table_name='t1';
select sleep(2);
sleep(2) 0
+# restart
select
create_time=(select create_time from t2) /* should not change */,
update_time
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/skip_validate_tmp_table.result b/storage/rocksdb/mysql-test/rocksdb/r/skip_validate_tmp_table.result
index 92906f22b1e..d67c4cbbbc7 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/skip_validate_tmp_table.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/skip_validate_tmp_table.result
@@ -1,4 +1,5 @@
create table t1 (pk int primary key) engine=rocksdb;
+# restart
show tables;
Tables_in_test
#mysql50#t1#sql-test
@@ -11,6 +12,7 @@ show tables;
Tables_in_test
#mysql50#t1#sql-test
t2
+# restart
show tables;
Tables_in_test
create table t2 (pk int primary key) engine=rocksdb;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/statistics.result b/storage/rocksdb/mysql-test/rocksdb/r/statistics.result
index 579c4adc11d..1d0993527c9 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/statistics.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/statistics.result
@@ -37,6 +37,7 @@ table_name data_length>0 index_length>0
t1 1 1
t2 1 1
t3 1 1
+# restart
SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = DATABASE();
table_name table_rows
t1 1000
@@ -49,8 +50,11 @@ t2 1 1
t3 1 1
analyze table t1,t2,t3,t4,t5;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
test.t4 analyze Error Table 'test.t4' doesn't exist
test.t4 analyze status Operation failed
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/truncate_table3.result b/storage/rocksdb/mysql-test/rocksdb/r/truncate_table3.result
index eda560fefdb..7c5631a2c97 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/truncate_table3.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/truncate_table3.result
@@ -6,6 +6,7 @@ call mtr.add_suppression("Column family 'rev:cf2' not found");
set global rocksdb_compact_cf = 'cf1';
set global rocksdb_compact_cf = 'rev:cf2';
set global rocksdb_signal_drop_index_thread = 1;
+# restart
CREATE TABLE t1 (
a int not null,
b int not null,
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_char_indexes.result b/storage/rocksdb/mysql-test/rocksdb/r/type_char_indexes.result
index e8b913288c5..3a99e6a1ac8 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_char_indexes.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_char_indexes.result
@@ -45,7 +45,7 @@ t1 1 v16 1 v16 A 500 NULL NULL YES LSMTREE
INSERT INTO t1 (c,c20,v16,v128,pk) VALUES ('a','char1','varchar1a','varchar1b','1'),('a','char2','varchar2a','varchar2b','2'),('b','char3','varchar1a','varchar1b','3'),('c','char4','varchar3a','varchar3b','4');
EXPLAIN SELECT SUBSTRING(v16,0,3) FROM t1 WHERE v16 LIKE 'varchar%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index v16 v16 19 NULL # Using where; Using index
+1 SIMPLE t1 range v16 v16 19 NULL # Using where; Using index
SELECT SUBSTRING(v16,7,3) FROM t1 WHERE v16 LIKE 'varchar%';
SUBSTRING(v16,7,3)
r1a
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_date_time_indexes.result b/storage/rocksdb/mysql-test/rocksdb/r/type_date_time_indexes.result
index 120d0d81b55..77d07035a96 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_date_time_indexes.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_date_time_indexes.result
@@ -62,7 +62,7 @@ INSERT INTO t1 (d,dt,ts,t,y,pk) VALUES
(DATE(@tm),@tm,TIMESTAMP(@tm),TIME(@tm),YEAR(@tm),'12:05:00');
EXPLAIN SELECT ts FROM t1 WHERE ts > NOW();
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ts ts 5 NULL # Using where; Using index
+1 SIMPLE t1 range ts ts 5 NULL # Using where; Using index
SELECT ts FROM t1 WHERE ts > NOW();
ts
EXPLAIN SELECT ts FROM t1 USE INDEX () WHERE ts > NOW();
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result b/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result
index 3a8cf9ed21a..668a927669a 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result
@@ -25,6 +25,7 @@ insert into t1 select pk+10000, 9.0, 9.0, 'extra-data' from t1;
insert into t1 select pk+100000, 9.0, 9.0, 'extra-data' from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# The following can't use index-only:
explain select * from t1 where col1 between -8 and 8;
@@ -34,7 +35,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain
select col1, col2 from t1 where col1 between -8 and 8;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 6 NULL # Using where; Using index
+1 SIMPLE t1 range key1 key1 3 NULL # Using where; Using index
select col1, col2 from t1 where col1 between -8 and 8;
col1 col2
0.3 2.5
@@ -46,7 +47,7 @@ insert into t1 values (10, -8.4, NULL, 'row2-with-null');
explain
select col1, col2 from t1 force index(key1) where col1 is null or col1 < -7;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 6 NULL # Using where; Using index
+1 SIMPLE t1 range key1 key1 3 NULL # Using where; Using index
select col1, col2 from t1 force index(key1) where col1 is null or col1 < -7;
col1 col2
NULL 0.9
@@ -88,11 +89,12 @@ insert into t1 select pk+10000, col1+20000, col2+20000, 'extra-data' from t1;
insert into t1 select pk+100000, col1+20000, col2+20000, 'extra-data' from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain
select col1, col2 from t1 force index(key1) where col1 between -800 and 800;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index key1 key1 14 NULL # Using where; Using index
+1 SIMPLE t1 range key1 key1 7 NULL # Using where; Using index
select col1, col2 from t1 force index(key1) where col1 between -800 and 800;
col1 col2
-700.002000 100.006000
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
index ec5dc214b80..745cfa5991e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result
@@ -191,6 +191,7 @@ insert into t1 values (2, 'a', 'a');
insert into t1 values (3, 'a \t', 'a-tab');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Must show 'using index' for latin1_bin and utf8_bin:
explain
@@ -306,6 +307,7 @@ insert into t1 values (2, 'a', 'a');
insert into t1 values (3, 'a \t', 'a-tab');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Must show 'using index' for latin1_bin and utf8_bin:
explain
@@ -421,6 +423,7 @@ insert into t1 values (2, 'a', 'a');
insert into t1 values (3, 'a \t', 'a-tab');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Must show 'using index' for latin1_bin and utf8_bin:
explain
@@ -536,6 +539,7 @@ insert into t1 values (2, 'a', 'a');
insert into t1 values (3, 'a \t', 'a-tab');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Must show 'using index' for latin1_bin and utf8_bin:
explain
@@ -651,6 +655,7 @@ insert into t1 values (2, 'a', 'a');
insert into t1 values (3, 'a \t', 'a-tab');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Must show 'using index' for latin1_bin and utf8_bin:
explain
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/use_direct_reads_writes.result b/storage/rocksdb/mysql-test/rocksdb/r/use_direct_reads_writes.result
index e8456457cdd..eda49c58d7e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/use_direct_reads_writes.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/use_direct_reads_writes.result
@@ -5,10 +5,13 @@ select plugin_name, plugin_type from information_schema.plugins where plugin_nam
plugin_name plugin_type
ROCKSDB STORAGE ENGINE
Checking direct reads
+# restart
FOUND 1 /enable both use_direct_reads/ in use_direct_reads_writes.err
Checking direct writes
+# restart
FOUND 1 /enable both use_direct_io_for_flush_and_compaction/ in use_direct_reads_writes.err
Checking rocksdb_flush_log_at_trx_commit
+# restart
FOUND 1 /rocksdb_flush_log_at_trx_commit needs to be/ in use_direct_reads_writes.err
Validate flush_log settings when direct writes is enabled
set global rocksdb_flush_log_at_trx_commit=0;
@@ -16,3 +19,4 @@ set global rocksdb_flush_log_at_trx_commit=1;
ERROR 42000: Variable 'rocksdb_flush_log_at_trx_commit' can't be set to the value of '1'
set global rocksdb_flush_log_at_trx_commit=2;
ERROR 42000: Variable 'rocksdb_flush_log_at_trx_commit' can't be set to the value of '2'
+# restart
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/xa.result b/storage/rocksdb/mysql-test/rocksdb/r/xa.result
index 30cfe94e0b7..12ae2b474b6 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/xa.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/xa.result
@@ -18,6 +18,7 @@ XA PREPARE 'xa2';
connection default;
SELECT * FROM t1;
a
+# restart
connect con3,localhost,root,,test;
XA RECOVER;
formatID gtrid_length bqual_length data
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption.test b/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption.test
index 67b2d5f96d7..e084b57fbda 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption.test
@@ -1,6 +1,8 @@
--source include/have_rocksdb.inc
--source include/not_valgrind.inc
+--let $restart_noprint=2
+
--echo #
--echo # Test how MyRocks behaves when RocksDB reports corrupted data.
--echo #
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test
index b17548063d9..99e28f3b55e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test
@@ -3,6 +3,8 @@
--source include/have_log_bin.inc
--source include/not_valgrind.inc
+--let $restart_noprint=2
+
--echo #
--echo # Testing upgrading from server without merges for auto_increment
--echo # to new server with such support.
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test b/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test
index 21e4b49e560..1dcb176e4fa 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test
@@ -2,6 +2,8 @@
--source include/restart_mysqld.inc
+set use_stat_tables= 'COMPLEMENTARY';
+
# Test memtable cardinality statistics
CREATE TABLE t0 (id int PRIMARY KEY, a int, INDEX ix_a (a)) engine=rocksdb;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
index 9b4dbd3c20d..11c9c08c36e 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
+++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
@@ -94,3 +94,4 @@ information_schema: MDEV-14372: unstable testcase
mysqlbinlog_gtid_skip_empty_trans_rocksdb : MariaRocks: requires GTIDs
drop_table: Hangs on shutdown
add_index_inplace: not stable result
+rocksdb_range2 : result difference, update after MDEV-16746 is fixed
diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result b/storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result
index 9c20fea97ae..a1e501f78f4 100644
--- a/storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result
+++ b/storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result
@@ -2,6 +2,7 @@ include/master-slave.inc
[connection master]
connection server_2;
include/stop_slave.inc
+SET GLOBAL gtid_cleanup_batch_size = 999999999;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET sql_log_bin=0;
CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos;
@@ -41,6 +42,8 @@ a
1
SELECT * FROM mysql.gtid_slave_pos ORDER BY sub_id;
domain_id sub_id server_id seq_no
+0 1 1 1
+0 2 1 2
0 3 1 3
0 4 1 4
SELECT * FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
@@ -121,6 +124,21 @@ Transactions_multi_engine 6
DELETE FROM t1 WHERE a >= 100;
DELETE FROM t2 WHERE a >= 100;
DELETE FROM t3 WHERE a >= 100;
+connection server_1;
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos;
+COUNT(*)>=10
+1
+SELECT COUNT(*)>=10 FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
+UNION ALL SELECT * FROM mysql.gtid_slave_pos_innodb_redundant) inner_select;
+COUNT(*)>=10
+1
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos_rocksdb;
+COUNT(*)>=10
+1
+SET GLOBAL gtid_cleanup_batch_size = 3;
connection server_2;
include/stop_slave.inc
SET sql_log_bin=0;
diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test b/storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test
index 3892277e248..845f155877a 100644
--- a/storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test
+++ b/storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test
@@ -4,6 +4,12 @@
--connection server_2
--source include/stop_slave.inc
+
+# Set GTID cleanup limit high enough that cleanup will not run and we
+# can rely on consistent table output in .result.
+--let $old_gtid_cleanup_batch_size=`SELECT @@GLOBAL.gtid_cleanup_batch_size`
+SET GLOBAL gtid_cleanup_batch_size = 999999999;
+
CHANGE MASTER TO master_use_gtid=slave_pos;
SET sql_log_bin=0;
CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos;
@@ -89,6 +95,82 @@ DELETE FROM t2 WHERE a >= 100;
DELETE FROM t3 WHERE a >= 100;
+# Create a bunch more GTIDs in mysql.gtid_slave_pos* tables to test with.
+--connection server_1
+--disable_query_log
+let $i=10;
+while ($i) {
+ eval INSERT INTO t1 VALUES (300+$i);
+ eval INSERT INTO t2 VALUES (300+$i);
+ eval INSERT INTO t3 VALUES (300+$i);
+ dec $i;
+}
+--enable_query_log
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+
+# Check that we have many rows in mysql.gtid_slave_pos now (since
+# @@gtid_cleanup_batch_size was set to a huge value). No need to check
+# for an exact number, since that will require changing .result if
+# anything changes prior to this point, and we just need to know that
+# we have still have some data in the tables to make the following
+# test effective.
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos;
+SELECT COUNT(*)>=10 FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
+ UNION ALL SELECT * FROM mysql.gtid_slave_pos_innodb_redundant) inner_select;
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos_rocksdb;
+
+# Check that old GTID rows will be deleted when batch delete size is
+# set reasonably. Old row deletion is not 100% deterministic (by design), so
+# we must wait for it to occur, but it should occur eventually.
+SET GLOBAL gtid_cleanup_batch_size = 3;
+let $i=40;
+--disable_query_log
+--let $keep_include_silent=1
+while ($i) {
+ let N=`SELECT 1+($i MOD 3)`;
+ --connection server_1
+ eval UPDATE t$N SET a=a+1 WHERE a=(SELECT MAX(a) FROM t$N);
+ --source include/save_master_gtid.inc
+ --connection server_2
+ --source include/sync_with_master_gtid.inc
+ let $j=50;
+ while ($j) {
+ let $is_done=`SELECT SUM(a)=1 FROM (
+ SELECT COUNT(*) AS a FROM mysql.gtid_slave_pos
+ UNION ALL
+ SELECT COUNT(*) AS a FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
+ UNION ALL SELECT * FROM mysql.gtid_slave_pos_innodb_redundant) inner_select
+ UNION ALL
+ SELECT COUNT(*) AS a FROM mysql.gtid_slave_pos_rocksdb) outer_select`;
+ if ($is_done) {
+ let $j=0;
+ }
+ if (!$is_done) {
+ real_sleep 0.1;
+ dec $j;
+ }
+ }
+ dec $i;
+ if ($is_done) {
+ let $i=0;
+ }
+}
+--enable_query_log
+--let $keep_include_silent=0
+if (!$is_done) {
+ --echo Timed out waiting for mysql.gtid_slave_pos* tables to be cleaned up
+}
+
+--disable_query_log
+DELETE FROM t1 WHERE a >= 100;
+DELETE FROM t2 WHERE a >= 100;
+DELETE FROM t3 WHERE a >= 100;
+--enable_query_log
+
+
# Test status variables Rpl_transactions_multi_engine and Transactions_gtid_foreign_engine.
# Have mysql.gtid_slave_pos* for myisam and innodb but not rocksdb.
--connection server_2
@@ -223,6 +305,9 @@ SHOW STATUS LIKE "%transactions%engine";
SET sql_log_bin=0;
DROP TABLE mysql.gtid_slave_pos_innodb;
SET sql_log_bin=1;
+--disable_query_log
+eval SET GLOBAL gtid_cleanup_batch_size = $old_gtid_cleanup_batch_size;
+--enable_query_log
--connection server_1
DROP TABLE t1;
diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc
index 3453cb0064e..cad6833e466 100644
--- a/storage/rocksdb/rdb_datadic.cc
+++ b/storage/rocksdb/rdb_datadic.cc
@@ -266,8 +266,9 @@ int Rdb_key_field_iterator::next() {
bool covered_column = true;
if (m_covered_bitmap != nullptr &&
m_field->real_type() == MYSQL_TYPE_VARCHAR && !m_fpi->m_covered) {
+ uint tmp= m_curr_bitmap_pos++;
covered_column = m_curr_bitmap_pos < MAX_REF_PARTS &&
- bitmap_is_set(m_covered_bitmap, m_curr_bitmap_pos++);
+ bitmap_is_set(m_covered_bitmap, tmp);
}
if (m_fpi->m_unpack_func && covered_column) {
diff --git a/storage/sequence/mysql-test/sequence/simple.result b/storage/sequence/mysql-test/sequence/simple.result
index ea94e91b1ba..d921b80bf0f 100644
--- a/storage/sequence/mysql-test/sequence/simple.result
+++ b/storage/sequence/mysql-test/sequence/simple.result
@@ -124,9 +124,9 @@ Tables_in_test
explain select * from seq_1_to_15_step_2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE seq_1_to_15_step_2 index NULL PRIMARY 8 NULL 8 Using index
-explain select * from seq_1_to_15_step_2 where seq > 4;
+explain select * from seq_1_to_15_step_2 where seq > 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE seq_1_to_15_step_2 range PRIMARY PRIMARY 8 NULL 6 Using where; Using index
+1 SIMPLE seq_1_to_15_step_2 range PRIMARY PRIMARY 8 NULL 3 Using where; Using index
explain select * from seq_1_to_15_step_2 where seq between 4 and 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE seq_1_to_15_step_2 range PRIMARY PRIMARY 8 NULL 3 Using where; Using index
diff --git a/storage/sequence/mysql-test/sequence/simple.test b/storage/sequence/mysql-test/sequence/simple.test
index fbf2b0ebc66..00d2464cf08 100644
--- a/storage/sequence/mysql-test/sequence/simple.test
+++ b/storage/sequence/mysql-test/sequence/simple.test
@@ -52,7 +52,7 @@ show open tables from test;
show tables;
# row estimates
explain select * from seq_1_to_15_step_2;
-explain select * from seq_1_to_15_step_2 where seq > 4;
+explain select * from seq_1_to_15_step_2 where seq > 10;
explain select * from seq_1_to_15_step_2 where seq between 4 and 9;
explain select * from seq_1_to_15_step_2 where seq between 20 and 30;
explain select * from seq_1_to_15_step_2 where seq between 4 and 6;
diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc
index 0e5ba383caf..f2bc24c47d4 100644
--- a/storage/sphinx/ha_sphinx.cc
+++ b/storage/sphinx/ha_sphinx.cc
@@ -2319,7 +2319,7 @@ int ha_sphinx::extra ( enum ha_extra_function op )
}
-int ha_sphinx::write_row ( byte * )
+int ha_sphinx::write_row ( const byte * )
{
SPH_ENTER_METHOD();
if ( !m_pShare || !m_pShare->m_bSphinxQL )
@@ -2749,7 +2749,9 @@ const Item * ha_sphinx::cond_push ( const Item *cond )
if ( !m_pShare->m_bSphinxQL )
{
// on non-QL tables, intercept query=value condition for SELECT
- if (!( args[0]->type()==Item::FIELD_ITEM && args[1]->type()==Item::STRING_ITEM ))
+ if (!( args[0]->type()==Item::FIELD_ITEM &&
+ args[1]->is_of_type(Item::CONST_ITEM,
+ STRING_RESULT)))
break;
Item_field * pField = (Item_field *) args[0];
@@ -2765,7 +2767,9 @@ const Item * ha_sphinx::cond_push ( const Item *cond )
} else
{
- if (!( args[0]->type()==Item::FIELD_ITEM && args[1]->type()==Item::INT_ITEM ))
+ if (!( args[0]->type()==Item::FIELD_ITEM &&
+ args[1]->is_of_type(Item::CONST_ITEM,
+ INT_RESULT)))
break;
// on QL tables, intercept id=value condition for DELETE
diff --git a/storage/sphinx/ha_sphinx.h b/storage/sphinx/ha_sphinx.h
index 8e6af908aab..decd88bad5a 100644
--- a/storage/sphinx/ha_sphinx.h
+++ b/storage/sphinx/ha_sphinx.h
@@ -85,7 +85,7 @@ public:
int open ( const char * name, int mode, uint test_if_locked );
int close ();
- int write_row ( byte * buf );
+ int write_row ( const byte * buf );
int update_row ( const byte * old_data, const byte * new_data );
int delete_row ( const byte * buf );
int extra ( enum ha_extra_function op );
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index 6559e28c970..559b315118f 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -116,7 +117,7 @@ ha_spider::ha_spider(
use_fields = FALSE;
#endif
use_pre_call = FALSE;
- use_pre_records = FALSE;
+ use_pre_action = FALSE;
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
do_direct_update = FALSE;
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -228,7 +229,7 @@ ha_spider::ha_spider(
use_fields = FALSE;
#endif
use_pre_call = FALSE;
- use_pre_records = FALSE;
+ use_pre_action = FALSE;
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
do_direct_update = FALSE;
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -1801,7 +1802,7 @@ int ha_spider::reset()
low_priority = FALSE;
high_priority = FALSE;
use_pre_call = FALSE;
- use_pre_records = FALSE;
+ use_pre_action = FALSE;
pre_bitmap_checked = FALSE;
bulk_insert = FALSE;
clone_bitmap_init = FALSE;
@@ -1827,6 +1828,7 @@ int ha_spider::reset()
multi_range_keys = NULL;
}
#endif
+ multi_range_num = 0;
ft_handler = NULL;
ft_current = NULL;
ft_count = 0;
@@ -4419,6 +4421,64 @@ int ha_spider::read_range_next()
DBUG_RETURN(check_ha_range_eof());
}
+void ha_spider::reset_no_where_cond()
+{
+ uint roop_count;
+ DBUG_ENTER("ha_spider::reset_no_where_cond");
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
+ if (sql_kinds & (SPIDER_SQL_KIND_SQL | SPIDER_SQL_KIND_HANDLER))
+ {
+#endif
+ for (roop_count = 0; roop_count < share->use_sql_dbton_count; roop_count++)
+ {
+ dbton_handler[share->use_sql_dbton_ids[roop_count]]->no_where_cond =
+ FALSE;
+ }
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
+ }
+ if (sql_kinds & SPIDER_SQL_KIND_HS)
+ {
+ for (roop_count = 0; roop_count < share->use_hs_dbton_count; roop_count++)
+ {
+ dbton_handler[share->use_hs_dbton_ids[roop_count]]->no_where_cond =
+ FALSE;
+ }
+ }
+#endif
+ DBUG_VOID_RETURN;
+}
+
+bool ha_spider::check_no_where_cond()
+{
+ uint roop_count;
+ DBUG_ENTER("ha_spider::check_no_where_cond");
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
+ if (sql_kinds & (SPIDER_SQL_KIND_SQL | SPIDER_SQL_KIND_HANDLER))
+ {
+#endif
+ for (roop_count = 0; roop_count < share->use_sql_dbton_count; roop_count++)
+ {
+ if (dbton_handler[share->use_sql_dbton_ids[roop_count]]->no_where_cond)
+ {
+ DBUG_RETURN(TRUE);
+ }
+ }
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
+ }
+ if (sql_kinds & SPIDER_SQL_KIND_HS)
+ {
+ for (roop_count = 0; roop_count < share->use_hs_dbton_count; roop_count++)
+ {
+ if (dbton_handler[share->use_hs_dbton_ids[roop_count]]->no_where_cond)
+ {
+ DBUG_RETURN(TRUE);
+ }
+ }
+ }
+#endif
+ DBUG_RETURN(FALSE);
+}
+
#ifdef HA_MRR_USE_DEFAULT_IMPL
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
ha_rows ha_spider::multi_range_read_info_const(
@@ -4562,6 +4622,7 @@ int ha_spider::multi_range_read_init(
DBUG_PRINT("info",("spider n_ranges=%u", n_ranges));
multi_range_num = n_ranges;
mrr_have_range = FALSE;
+ reset_no_where_cond();
DBUG_RETURN(
handler::multi_range_read_init(
seq,
@@ -5048,6 +5109,10 @@ int ha_spider::read_multi_range_first_internal(
result_list.current = result_list.current->prev;
}
}
+ if (check_no_where_cond())
+ {
+ DBUG_RETURN(check_error_mode_eof(0));
+ }
set_where_to_pos_sql(SPIDER_SQL_TYPE_SELECT_SQL);
set_where_to_pos_sql(SPIDER_SQL_TYPE_HANDLER);
}
@@ -5523,6 +5588,15 @@ int ha_spider::read_multi_range_first_internal(
DBUG_PRINT("info",("spider range_res8=%d", range_res));
}
#endif
+ if (check_no_where_cond())
+ {
+#ifdef HA_MRR_USE_DEFAULT_IMPL
+ range_res = 1;
+#else
+ multi_range_curr = multi_range_end;
+#endif
+ break;
+ }
}
#ifdef HA_MRR_USE_DEFAULT_IMPL
while (!range_res);
@@ -5951,6 +6025,10 @@ int ha_spider::read_multi_range_first_internal(
} else
DBUG_RETURN(error_num);
}
+ if (check_no_where_cond())
+ {
+ DBUG_RETURN(check_error_mode_eof(0));
+ }
multi_range_cnt = 0;
if ((error_num = reset_sql_sql(
SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
@@ -6172,6 +6250,10 @@ int ha_spider::read_multi_range_next(
#ifdef HA_MRR_USE_DEFAULT_IMPL
DBUG_PRINT("info",("spider range_res2=%d", range_res));
#endif
+ if (check_no_where_cond())
+ {
+ DBUG_RETURN(check_error_mode_eof(0));
+ }
set_where_to_pos_sql(SPIDER_SQL_TYPE_SELECT_SQL);
set_where_to_pos_sql(SPIDER_SQL_TYPE_HANDLER);
result_list.limit_num =
@@ -6606,6 +6688,10 @@ int ha_spider::read_multi_range_next(
#endif
)
DBUG_RETURN(error_num);
+ if (check_no_where_cond())
+ {
+ DBUG_RETURN(check_error_mode_eof(0));
+ }
spider_db_free_one_result_for_start_next(this);
spider_first_split_read_param(this);
#ifndef WITHOUT_SPIDER_BG_SEARCH
@@ -7428,6 +7514,10 @@ int ha_spider::read_multi_range_next(
} else
DBUG_RETURN(error_num);
}
+ if (check_no_where_cond())
+ {
+ DBUG_RETURN(check_error_mode_eof(0));
+ }
multi_range_cnt = 0;
if ((error_num = reset_sql_sql(
SPIDER_SQL_TYPE_SELECT_SQL | SPIDER_SQL_TYPE_HANDLER)))
@@ -8920,22 +9010,24 @@ int ha_spider::info(
}
if (flag & HA_STATUS_TIME)
- stats.update_time = (ulong) share->update_time;
+ stats.update_time = (ulong) share->stat.update_time;
if (flag & (HA_STATUS_CONST | HA_STATUS_VARIABLE))
{
- stats.max_data_file_length = share->max_data_file_length;
- stats.create_time = (ulong) share->create_time;
+ stats.max_data_file_length = share->stat.max_data_file_length;
+ stats.create_time = share->stat.create_time;
stats.block_size = spider_param_block_size(thd);
}
if (flag & HA_STATUS_VARIABLE)
{
- stats.data_file_length = share->data_file_length;
- stats.index_file_length = share->index_file_length;
- stats.records = share->records;
- stats.mean_rec_length = share->mean_rec_length;
- stats.check_time = (ulong) share->check_time;
+ stats.data_file_length = share->stat.data_file_length;
+ stats.index_file_length = share->stat.index_file_length;
+ stats.records = share->stat.records;
+ stats.mean_rec_length = share->stat.mean_rec_length;
+ stats.check_time = share->stat.check_time;
if (stats.records <= 1 /* && (flag & HA_STATUS_NO_LOCK) */ )
stats.records = 2;
+ stats.checksum = share->stat.checksum;
+ stats.checksum_null = share->stat.checksum_null;
}
if (flag & HA_STATUS_AUTO)
{
@@ -9174,7 +9266,7 @@ ha_rows ha_spider::records_in_range(
key_part_map tgt_key_part_map;
KEY_PART_INFO *key_part;
Field *field = NULL;
- double rows = (double) share->records;
+ double rows = (double) share->stat.records;
double weight, rate;
DBUG_PRINT("info",("spider rows1=%f", rows));
if (start_key)
@@ -9483,11 +9575,12 @@ int ha_spider::pre_records()
result_list.casual_read[search_link_idx] =
spider_param_casual_read(thd, share->casual_read);
}
- if ((error_num = spider_db_show_records(this, search_link_idx, TRUE)))
+ if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_RECORDS, this,
+ search_link_idx, TRUE)))
{
DBUG_RETURN(check_error_mode(error_num));
}
- use_pre_records = TRUE;
+ use_pre_action = TRUE;
DBUG_RETURN(0);
}
@@ -9499,14 +9592,14 @@ ha_rows ha_spider::records()
DBUG_PRINT("info",("spider this=%p", this));
if (sql_command == SQLCOM_ALTER_TABLE)
{
- use_pre_records = FALSE;
+ use_pre_action = FALSE;
DBUG_RETURN(0);
}
if (!(share->additional_table_flags & HA_HAS_RECORDS) && !this->result_list.direct_limit_offset)
{
DBUG_RETURN(handler::records());
}
- if (!use_pre_records && !this->result_list.direct_limit_offset)
+ if (!use_pre_action && !this->result_list.direct_limit_offset)
{
THD *thd = trx->thd;
if (
@@ -9517,17 +9610,84 @@ ha_rows ha_spider::records()
spider_param_casual_read(thd, share->casual_read);
}
}
- if ((error_num = spider_db_show_records(this, search_link_idx, FALSE)))
+ if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_RECORDS, this,
+ search_link_idx, FALSE)))
{
- use_pre_records = FALSE;
+ use_pre_action = FALSE;
check_error_mode(error_num);
DBUG_RETURN(HA_POS_ERROR);
}
- use_pre_records = FALSE;
- share->records = table_rows;
+ use_pre_action = FALSE;
+ share->stat.records = table_rows;
DBUG_RETURN(table_rows);
}
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+int ha_spider::pre_calculate_checksum()
+{
+ int error_num;
+ backup_error_status();
+ DBUG_ENTER("ha_spider::pre_calculate_checksum");
+ DBUG_PRINT("info",("spider this=%p", this));
+ THD *thd = trx->thd;
+ if (
+ spider_param_sync_autocommit(thd) &&
+ (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
+ ) {
+ result_list.casual_read[search_link_idx] =
+ spider_param_casual_read(thd, share->casual_read);
+ }
+ action_flags = T_EXTEND;
+ if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, this,
+ search_link_idx, TRUE)))
+ {
+ DBUG_RETURN(check_error_mode(error_num));
+ }
+ use_pre_action = TRUE;
+ DBUG_RETURN(0);
+}
+
+int ha_spider::calculate_checksum()
+{
+ int error_num;
+ backup_error_status();
+ DBUG_ENTER("ha_spider::calculate_checksum");
+ DBUG_PRINT("info",("spider this=%p", this));
+ if (!use_pre_action && !this->result_list.direct_limit_offset)
+ {
+ THD *thd = trx->thd;
+ if (
+ spider_param_sync_autocommit(thd) &&
+ (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
+ ) {
+ result_list.casual_read[search_link_idx] =
+ spider_param_casual_read(thd, share->casual_read);
+ }
+ }
+ action_flags = T_EXTEND;
+ if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, this,
+ search_link_idx, FALSE)))
+ {
+ use_pre_action = FALSE;
+ DBUG_RETURN(check_error_mode(error_num));
+ }
+ use_pre_action = FALSE;
+ if (checksum_null)
+ {
+ share->stat.checksum_null = TRUE;
+ share->stat.checksum = 0;
+ stats.checksum_null = TRUE;
+ stats.checksum = 0;
+ } else {
+ share->stat.checksum_null = FALSE;
+ share->stat.checksum = (ha_checksum) checksum_val;
+ stats.checksum_null = FALSE;
+ stats.checksum = (ha_checksum) checksum_val;
+ }
+ DBUG_RETURN(0);
+}
+#endif
+
const char *ha_spider::table_type() const
{
DBUG_ENTER("ha_spider::table_type");
@@ -9556,8 +9716,8 @@ ulonglong ha_spider::table_flags() const
HA_BINLOG_ROW_CAPABLE |
HA_BINLOG_STMT_CAPABLE |
HA_PARTIAL_COLUMN_READ |
-#ifdef HA_CMP_REF_IS_EXPENSIVE
- HA_CMP_REF_IS_EXPENSIVE |
+#ifdef HA_SLOW_CMP_REF
+ HA_SLOW_CMP_REF |
#endif
#ifdef SPIDER_ENGINE_CONDITION_PUSHDOWN_IS_ALWAYS_ON
HA_CAN_TABLE_CONDITION_PUSHDOWN |
@@ -9587,7 +9747,7 @@ ulonglong ha_spider::table_flags() const
const char *ha_spider::index_type(
uint key_number
) {
- KEY *key_info = &table->s->key_info[key_number];
+ KEY *key_info = &table->key_info[key_number];
DBUG_ENTER("ha_spider::index_type");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_PRINT("info",("spider flags=%ld", key_info->flags));
@@ -9866,6 +10026,7 @@ void ha_spider::start_bulk_insert(
bulk_insert = TRUE;
bulk_size = -1;
store_last_insert_id = 0;
+ bzero(&copy_info, sizeof(copy_info));
DBUG_VOID_RETURN;
}
@@ -9878,13 +10039,13 @@ int ha_spider::end_bulk_insert()
bulk_insert = FALSE;
if (bulk_size == -1)
DBUG_RETURN(0);
- if ((error_num = spider_db_bulk_insert(this, table, TRUE)))
+ if ((error_num = spider_db_bulk_insert(this, table, &copy_info, TRUE)))
DBUG_RETURN(check_error_mode(error_num));
DBUG_RETURN(0);
}
int ha_spider::write_row(
- uchar *buf
+ const uchar *buf
) {
int error_num;
THD *thd = ha_thd();
@@ -10012,7 +10173,7 @@ int ha_spider::write_row(
else
bulk_size = 0;
}
- if ((error_num = spider_db_bulk_insert(this, table, FALSE)))
+ if ((error_num = spider_db_bulk_insert(this, table, &copy_info, FALSE)))
DBUG_RETURN(check_error_mode(error_num));
#ifdef HA_CAN_BULK_ACCESS
@@ -10637,7 +10798,8 @@ int ha_spider::direct_update_rows(
uint range_count,
bool sorted,
uchar *new_data,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
) {
int error_num;
THD *thd = ha_thd();
@@ -10664,17 +10826,17 @@ int ha_spider::direct_update_rows(
if (is_bulk_access_clone)
{
bulk_access_pre_called = FALSE;
- DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows));
+ DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows, found_rows));
}
DBUG_RETURN(bulk_access_link_exec_tgt->spider->ha_direct_update_rows(
- ranges, range_count, sorted, new_data, update_rows));
+ ranges, range_count, sorted, new_data, update_rows, found_rows));
}
#endif
if (
(active_index != MAX_KEY && (error_num = index_handler_init())) ||
(active_index == MAX_KEY && (error_num = rnd_handler_init())) ||
(error_num = spider_db_direct_update(this, table, ranges, range_count,
- update_rows))
+ update_rows, found_rows))
)
DBUG_RETURN(check_error_mode(error_num));
@@ -10682,14 +10844,15 @@ int ha_spider::direct_update_rows(
if (bulk_access_executing && is_bulk_access_clone)
{
bulk_req_exec();
- DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows));
+ DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows, found_rows));
}
#endif
DBUG_RETURN(0);
}
#else
int ha_spider::direct_update_rows(
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
) {
int error_num;
THD *thd = ha_thd();
@@ -10716,16 +10879,16 @@ int ha_spider::direct_update_rows(
if (is_bulk_access_clone)
{
bulk_access_pre_called = FALSE;
- DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows));
+ DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows, found_rows));
}
DBUG_RETURN(bulk_access_link_exec_tgt->spider->ha_direct_update_rows(
- update_rows));
+ update_rows, found_rows));
}
#endif
if (
(active_index != MAX_KEY && (error_num = index_handler_init())) ||
(active_index == MAX_KEY && (error_num = rnd_handler_init())) ||
- (error_num = spider_db_direct_update(this, table, update_rows))
+ (error_num = spider_db_direct_update(this, table, update_rows, found_rows))
)
DBUG_RETURN(check_error_mode(error_num));
@@ -10733,7 +10896,7 @@ int ha_spider::direct_update_rows(
if (bulk_access_executing && is_bulk_access_clone)
{
bulk_req_exec();
- DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows));
+ DBUG_RETURN(spider_db_bulk_direct_update(this, update_rows, found_rows));
}
#endif
DBUG_RETURN(0);
@@ -10747,21 +10910,23 @@ int ha_spider::pre_direct_update_rows(
uint range_count,
bool sorted,
uchar *new_data,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
) {
DBUG_ENTER("ha_spider::pre_direct_update_rows");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_RETURN(bulk_access_link_current->spider->ha_direct_update_rows(ranges,
- range_count, sorted, new_data, update_rows));
+ range_count, sorted, new_data, update_rows, found_rows));
}
#else
int ha_spider::pre_direct_update_rows()
{
uint update_rows;
+ uint found_rows;
DBUG_ENTER("ha_spider::pre_direct_update_rows");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_RETURN(bulk_access_link_current->spider->ha_direct_update_rows(
- &update_rows));
+ &update_rows, &found_rows));
}
#endif
#endif
@@ -11336,8 +11501,9 @@ double ha_spider::scan_time()
DBUG_ENTER("ha_spider::scan_time");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_PRINT("info",("spider scan_time = %.6f",
- share->scan_rate * share->records * share->mean_rec_length + 2));
- DBUG_RETURN(share->scan_rate * share->records * share->mean_rec_length + 2);
+ share->scan_rate * share->stat.records * share->stat.mean_rec_length + 2));
+ DBUG_RETURN(share->scan_rate * share->stat.records *
+ share->stat.mean_rec_length + 2);
}
double ha_spider::read_time(
@@ -11350,14 +11516,14 @@ double ha_spider::read_time(
if (keyread)
{
DBUG_PRINT("info",("spider read_time(keyread) = %.6f",
- share->read_rate * table->s->key_info[index].key_length *
+ share->read_rate * table->key_info[index].key_length *
rows / 2 + 2));
- DBUG_RETURN(share->read_rate * table->s->key_info[index].key_length *
+ DBUG_RETURN(share->read_rate * table->key_info[index].key_length *
rows / 2 + 2);
} else {
DBUG_PRINT("info",("spider read_time = %.6f",
- share->read_rate * share->mean_rec_length * rows + 2));
- DBUG_RETURN(share->read_rate * share->mean_rec_length * rows + 2);
+ share->read_rate * share->stat.mean_rec_length * rows + 2));
+ DBUG_RETURN(share->read_rate * share->stat.mean_rec_length * rows + 2);
}
}
diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h
index 811da1f00d3..543b92629da 100644
--- a/storage/spider/ha_spider.h
+++ b/storage/spider/ha_spider.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -169,7 +170,7 @@ public:
bool low_priority;
bool high_priority;
bool use_pre_call;
- bool use_pre_records;
+ bool use_pre_action;
bool pre_bitmap_checked;
enum thr_lock_type lock_type;
int lock_mode;
@@ -242,6 +243,11 @@ public:
SPIDER_ITEM_HLD *direct_aggregate_item_current;
#endif
ha_rows table_rows;
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ ha_checksum checksum_val;
+ bool checksum_null;
+ uint action_flags;
+#endif
/* for fulltext search */
bool ft_init_and_first;
@@ -348,6 +354,8 @@ public:
bool sorted
);
int read_range_next();
+ void reset_no_where_cond();
+ bool check_no_where_cond();
#ifdef HA_MRR_USE_DEFAULT_IMPL
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
ha_rows multi_range_read_info_const(
@@ -511,6 +519,10 @@ public:
int check_crd();
int pre_records();
ha_rows records();
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ int pre_calculate_checksum();
+ int calculate_checksum();
+#endif
const char *table_type() const;
ulonglong table_flags() const;
const char *index_type(
@@ -557,7 +569,7 @@ public:
#endif
int end_bulk_insert();
int write_row(
- uchar *buf
+ const uchar *buf
);
#ifdef HA_CAN_BULK_ACCESS
int pre_write_row(
@@ -674,20 +686,22 @@ public:
#endif
#endif
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS_WITH_HS
- inline int direct_update_rows(ha_rows *update_rows)
+ inline int direct_update_rows(ha_rows *update_rows, ha_rows *found_rows)
{
- return direct_update_rows(NULL, 0, FALSE, NULL, update_rows);
+ return direct_update_rows(NULL, 0, FALSE, NULL, update_rows, found_rows);
}
int direct_update_rows(
KEY_MULTI_RANGE *ranges,
uint range_count,
bool sorted,
uchar *new_data,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_row
);
#else
int direct_update_rows(
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_row
);
#endif
#ifdef HA_CAN_BULK_ACCESS
@@ -695,15 +709,18 @@ public:
inline int pre_direct_update_rows()
{
ha_rows update_rows;
+ ha_rows found_rows;
- return pre_direct_update_rows(NULL, 0, FALSE, NULL, &update_rows);
+ return pre_direct_update_rows(NULL, 0, FALSE, NULL, &update_rows,
+ &found_rows);
}
int pre_direct_update_rows(
KEY_MULTI_RANGE *ranges,
uint range_count,
bool sorted,
uchar *new_data,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_row
);
#else
int pre_direct_update_rows();
diff --git a/storage/spider/mysql-test/spider/bugfix/disabled.def b/storage/spider/mysql-test/spider/bugfix/disabled.def
new file mode 100644
index 00000000000..e19ea07b76b
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/disabled.def
@@ -0,0 +1 @@
+wait_timeout : MDEV-26045
diff --git a/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc b/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc
index bf2d9163b9a..123410380ab 100644
--- a/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc
+++ b/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc
@@ -21,7 +21,7 @@ let $CHILD2_1_CREATE_TABLES=
let $CHILD2_1_SELECT_TABLES=
SELECT pkey FROM tbl_a ORDER BY pkey;
let $CHILD2_1_SELECT_ARGUMENT1=
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
--connection master_1
set @old_spider_quick_mode= @@spider_quick_mode;
set session spider_quick_mode= 3;
diff --git a/storage/spider/mysql-test/spider/bugfix/include/cp932_column_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/cp932_column_deinit.inc
new file mode 100644
index 00000000000..930cde889a4
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/cp932_column_deinit.inc
@@ -0,0 +1,13 @@
+--connection master_1
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/cp932_column_init.inc b/storage/spider/mysql-test/spider/bugfix/include/cp932_column_init.inc
new file mode 100644
index 00000000000..ba412b567f8
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/cp932_column_init.inc
@@ -0,0 +1,29 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ txt_utf8 char(8) NOT NULL,
+ txt_cp932 char(8) NOT NULL COLLATE cp932_japanese_ci,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE DEFAULT CHARACTER SET utf8;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey, txt_utf8, txt_cp932 FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%update %';
+--connection master_1
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
diff --git a/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_deinit.inc
new file mode 100644
index 00000000000..4ea789feae8
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_deinit.inc
@@ -0,0 +1,13 @@
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--connection master_1
+set session binlog_format= @old_binlog_format;
+--connection slave1_1
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../include/deinit_spider.inc
+--source ../t/slave_test_deinit.inc
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_init.inc b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_init.inc
new file mode 100644
index 00000000000..f2f8635f9e3
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_init.inc
@@ -0,0 +1,24 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--source ../t/slave_test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey, f FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%delete %';
+--connection slave1_1
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../include/init_spider.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--connection master_1
+set @old_binlog_format= @@binlog_format;
+set session binlog_format= 'ROW';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_deinit.inc
new file mode 100644
index 00000000000..4fd217a5676
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_deinit.inc
@@ -0,0 +1,4 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--source delete_with_float_column_deinit.inc
diff --git a/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_init.inc b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_init.inc
new file mode 100644
index 00000000000..9d3961491e6
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mariadb_init.inc
@@ -0,0 +1,14 @@
+--source delete_with_float_column_init.inc
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1", wrapper "mariadb"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ f float DEFAULT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
diff --git a/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_deinit.inc
new file mode 100644
index 00000000000..4fd217a5676
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_deinit.inc
@@ -0,0 +1,4 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--source delete_with_float_column_deinit.inc
diff --git a/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_init.inc b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_init.inc
new file mode 100644
index 00000000000..d98f3c12397
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/delete_with_float_column_mysql_init.inc
@@ -0,0 +1,16 @@
+--source delete_with_float_column_init.inc
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1", wrapper "mysql"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a $STR_SEMICOLON
+ DROP FUNCTION to_float;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ f float DEFAULT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET $STR_SEMICOLON
+ CREATE FUNCTION to_float(a decimal(20,6)) RETURNS float RETURN cast(a as double);
diff --git a/storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_deinit.inc
new file mode 100644
index 00000000000..27682e43441
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_deinit.inc
@@ -0,0 +1,9 @@
+--connection child2_1
+DROP USER tu@'%';
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_init.inc b/storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_init.inc
new file mode 100644
index 00000000000..c87af2d02e4
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/direct_sql_with_comma_pwd_init.inc
@@ -0,0 +1,11 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+let $DIRECT_SQL_COMMAND=
+ SELECT spider_direct_sql('SELECT 22', 'tmp_a', 'srv "s_2_1", database "test", password "pass,1234", user "tu"');
+--connection child2_1
+GRANT ALL ON *.* TO tu@'%' IDENTIFIED BY 'pass,1234';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_deinit.inc
new file mode 100644
index 00000000000..9d255152dd8
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_deinit.inc
@@ -0,0 +1,14 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP
+--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP
+--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_init.inc b/storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_init.inc
new file mode 100644
index 00000000000..ac60580f463
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/group_by_order_by_limit_init.inc
@@ -0,0 +1,54 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+if (!$HAVE_PARTITION)
+{
+ --source group_by_order_by_limit_deinit.inc
+ --enable_result_log
+ --enable_query_log
+ --enable_warnings
+ skip Test requires partitioning;
+}
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a"'
+ PARTITION BY KEY(pkey) (
+ PARTITION pt1 COMMENT='srv "s_2_1"',
+ PARTITION pt2 COMMENT='srv "s_2_2"'
+ );
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ PRIMARY KEY (pkey),
+ KEY idx1 (skey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES
+let $CHILD2_2_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES
+let $CHILD2_2_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ PRIMARY KEY (pkey),
+ KEY idx1 (skey)
+ ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
+--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES
+let $CHILD2_2_SELECT_TABLES=
+ SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+let $CHILD2_2_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/mdev_22246_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/mdev_22246_deinit.inc
new file mode 100644
index 00000000000..9d255152dd8
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/mdev_22246_deinit.inc
@@ -0,0 +1,14 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP
+--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP
+--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/mdev_22246_init.inc b/storage/spider/mysql-test/spider/bugfix/include/mdev_22246_init.inc
new file mode 100644
index 00000000000..48226ba2811
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/mdev_22246_init.inc
@@ -0,0 +1,48 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+if (!$HAVE_PARTITION)
+{
+ --source group_by_order_by_limit_deinit.inc
+ --enable_result_log
+ --enable_query_log
+ --enable_warnings
+ skip Test requires partitioning;
+}
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a"'
+ PARTITION BY HASH(id) (
+ PARTITION pt1 COMMENT='srv "s_2_1"',
+ PARTITION pt2 COMMENT='srv "s_2_2"'
+ );
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ id bigint NOT NULL,
+ node text,
+ PRIMARY KEY (id)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT * FROM tbl_a ORDER BY id;
+--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES
+let $CHILD2_2_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES
+let $CHILD2_2_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ id bigint NOT NULL,
+ node text,
+ PRIMARY KEY (id)
+ ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
+--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES
+let $CHILD2_2_SELECT_TABLES=
+ SELECT * FROM tbl_a ORDER BY id;
diff --git a/storage/spider/mysql-test/spider/bugfix/include/mdev_22265_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/mdev_22265_deinit.inc
new file mode 100644
index 00000000000..ecb5622af14
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/mdev_22265_deinit.inc
@@ -0,0 +1,7 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/mdev_22265_init.inc b/storage/spider/mysql-test/spider/bugfix/include/mdev_22265_init.inc
new file mode 100644
index 00000000000..6cf6b0c1f41
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/mdev_22265_init.inc
@@ -0,0 +1,7 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_deinit.inc
new file mode 100644
index 00000000000..76b7582abfe
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_deinit.inc
@@ -0,0 +1,11 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_init.inc b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_init.inc
new file mode 100644
index 00000000000..da6778de504
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_insert_init.inc
@@ -0,0 +1,27 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ skey int NOT NULL,
+ dt date NOT NULL,
+ tm time NOT NULL,
+ PRIMARY KEY (skey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT skey, dt, tm FROM tbl_a ORDER BY skey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%replace %';
+--let $MASTER_1_SET_COMMAND=set session spider_direct_dup_insert=1 $STR_SEMICOLON
diff --git a/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_deinit.inc
new file mode 100644
index 00000000000..76b7582abfe
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_deinit.inc
@@ -0,0 +1,11 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_init.inc b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_init.inc
new file mode 100644
index 00000000000..884ef74c47e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/return_found_rows_update_init.inc
@@ -0,0 +1,26 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ skey int NOT NULL,
+ dt date NOT NULL,
+ tm time NOT NULL,
+ KEY idx1 (skey,dt)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT skey, dt, tm FROM tbl_a ORDER BY skey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%update %';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/same_server_link_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_deinit.inc
new file mode 100644
index 00000000000..a4e8a10db19
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_deinit.inc
@@ -0,0 +1,11 @@
+--connection master_1
+set global spider_same_server_link= @old_global_spider_same_server_link;
+set session spider_same_server_link= @old_session_spider_same_server_link;
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/same_server_link_init.inc b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_init.inc
new file mode 100644
index 00000000000..2c8150c905d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_init.inc
@@ -0,0 +1,15 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_b", host "127.0.0.1", port "$MASTER_1_MYPORT", user "root"';
+--connection master_1
+set @old_global_spider_same_server_link= @@global.spider_same_server_link;
+set @old_session_spider_same_server_link= @@session.spider_same_server_link;
+set global spider_same_server_link= 0;
+set session spider_same_server_link= 0;
diff --git a/storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_deinit.inc
new file mode 100644
index 00000000000..76b7582abfe
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_deinit.inc
@@ -0,0 +1,11 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_init.inc b/storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_init.inc
new file mode 100644
index 00000000000..37bf690c066
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/select_with_backquote_init.inc
@@ -0,0 +1,25 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ txt_utf8 char(8) NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE DEFAULT CHARACTER SET utf8;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey, txt_utf8 FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_deinit.inc
new file mode 100644
index 00000000000..5ac67cdf783
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_deinit.inc
@@ -0,0 +1,10 @@
+--connection slave1_1
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../include/deinit_spider.inc
+--source ../t/slave_test_deinit.inc
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_init.inc b/storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_init.inc
new file mode 100644
index 00000000000..052d6ebb2eb
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/slave_transaction_retry_errors_5digit_init.inc
@@ -0,0 +1,10 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--source ../t/slave_test_init.inc
+--connection slave1_1
+--source ../include/init_spider.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_deinit.inc
new file mode 100644
index 00000000000..01645e85f32
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_deinit.inc
@@ -0,0 +1,12 @@
+--connection master_1
+alter table mysql.spider_table_sts add column checksum bigint unsigned default null after update_time;
+DROP DATABASE IF EXISTS auto_test_local;
+
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_init.inc b/storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_init.inc
new file mode 100644
index 00000000000..1e438812af7
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/spider_table_sts_init.inc
@@ -0,0 +1,13 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", host "127.0.0.1", port "$MASTER_1_MYPORT", user "root"';
+--connection master_1
+alter table mysql.spider_table_sts drop column checksum;
+insert into mysql.spider_table_sts values ('auto_test_local', 'tbl_a', 0, 0, 0, 0, 0, '2019-01-01 00:00:00', '2019-01-01 00:00:00', '2019-01-01 00:00:00');
diff --git a/storage/spider/mysql-test/spider/bugfix/include/sql_mode_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_deinit.inc
new file mode 100644
index 00000000000..07f4d39a184
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_deinit.inc
@@ -0,0 +1,13 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--connection master_1
+set session sql_mode= @old_sql_mode;
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/sql_mode_init.inc b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_init.inc
new file mode 100644
index 00000000000..65e2f9102e7
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_init.inc
@@ -0,0 +1,40 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $SQL_MODES= real_as_float,pipes_as_concat,ansi_quotes,ignore_space,ignore_bad_table_options,only_full_group_by,no_unsigned_subtraction,no_dir_in_create,postgresql,oracle,mssql,db2,maxdb,no_key_options,no_table_options,no_field_options,mysql323,mysql40,ansi,no_auto_value_on_zero,no_backslash_escapes,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,traditional,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length
+if (`SELECT IF(STRCMP('$SERVER_NAME', 'MariaDB') = 0, 1, 0)`)
+{
+ if (`SELECT IF($SERVER_MAJOR_VERSION = 10, 1, 0)`)
+ {
+ if (`SELECT IF($SERVER_MINOR_VERSION >= 3, 1, 0)`)
+ {
+ --let $SQL_MODES= $SQL_MODES,empty_string_is_null,simultaneous_assignment
+ }
+ if (`SELECT IF($SERVER_MINOR_VERSION >= 4, 1, 0)`)
+ {
+ --let $SQL_MODES= $SQL_MODES,time_round_fractional
+ }
+ }
+}
+--connection master_1
+set @old_sql_mode= @@sql_mode;
+eval set session sql_mode= '$SQL_MODES';
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%sql_mode%';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_deinit.inc
new file mode 100644
index 00000000000..0dbff811c95
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_deinit.inc
@@ -0,0 +1 @@
+--source sql_mode_deinit.inc
diff --git a/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_init.inc b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_init.inc
new file mode 100644
index 00000000000..8e03b94b160
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mariadb_init.inc
@@ -0,0 +1,3 @@
+--source sql_mode_init.inc
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1", wrapper "mariadb"';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_deinit.inc
new file mode 100644
index 00000000000..0dbff811c95
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_deinit.inc
@@ -0,0 +1 @@
+--source sql_mode_deinit.inc
diff --git a/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_init.inc b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_init.inc
new file mode 100644
index 00000000000..2cdd56bc689
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/sql_mode_mysql_init.inc
@@ -0,0 +1,3 @@
+--source sql_mode_init.inc
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1", wrapper "mysql"';
diff --git a/storage/spider/mysql-test/spider/bugfix/include/wait_timeout_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/wait_timeout_deinit.inc
new file mode 100644
index 00000000000..e66247c89c5
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/wait_timeout_deinit.inc
@@ -0,0 +1,18 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP
+--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP
+--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP
+--connection child2_1
+set global wait_timeout= @old_wait_timeout;
+--connection child2_2
+set global wait_timeout= @old_wait_timeout;
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/wait_timeout_init.inc b/storage/spider/mysql-test/spider/bugfix/include/wait_timeout_init.inc
new file mode 100644
index 00000000000..d56d7a20940
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/wait_timeout_init.inc
@@ -0,0 +1,56 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+if (!$HAVE_PARTITION)
+{
+ --source wait_timeout_deinit.inc
+ --enable_result_log
+ --enable_query_log
+ --enable_warnings
+ skip Test requires partitioning;
+}
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a"'
+ PARTITION BY KEY(pkey) (
+ PARTITION pt1 COMMENT='srv "s_2_1"',
+ PARTITION pt2 COMMENT='srv "s_2_2"'
+ );
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
+--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES
+let $CHILD2_2_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES
+let $CHILD2_2_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
+--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES
+let $CHILD2_2_SELECT_TABLES=
+ SELECT pkey FROM tbl_a ORDER BY pkey;
+let $CHILD2_2_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
+--connection child2_1
+set @old_wait_timeout= @@wait_timeout;
+set global wait_timeout= 1;
+--connection child2_2
+set @old_wait_timeout= @@wait_timeout;
+set global wait_timeout= 1;
diff --git a/storage/spider/mysql-test/spider/bugfix/include/xa_cmd_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/xa_cmd_deinit.inc
new file mode 100644
index 00000000000..76b7582abfe
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/xa_cmd_deinit.inc
@@ -0,0 +1,11 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/include/xa_cmd_init.inc b/storage/spider/mysql-test/spider/bugfix/include/xa_cmd_init.inc
new file mode 100644
index 00000000000..5c607bd1ff5
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/include/xa_cmd_init.inc
@@ -0,0 +1,24 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
diff --git a/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result b/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result
index eae4895411e..bd423d934f5 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result
@@ -44,10 +44,10 @@ CHECKSUM TABLE tbl_a EXTENDED;
Table Checksum
auto_test_local.tbl_a 1061386331
connection child2_1;
-SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
argument
-select `pkey` from `auto_test_remote`.`tbl_a`
-SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+checksum table `auto_test_remote`.`tbl_a` extended
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
0
diff --git a/storage/spider/mysql-test/spider/bugfix/r/cp932_column.result b/storage/spider/mysql-test/spider/bugfix/r/cp932_column.result
new file mode 100644
index 00000000000..30b333c5008
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/cp932_column.result
@@ -0,0 +1,84 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18992
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+txt_utf8 char(8) NOT NULL,
+txt_cp932 char(8) NOT NULL COLLATE cp932_japanese_ci,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE DEFAULT CHARACTER SET utf8 MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,txt_utf8,txt_cp932) VALUES (0,'',''),(1,'',''),(2,'',''),(3,'',''),(4,'',''),(5,'',''),(6,'',''),(7,'',''),(8,'',''),(9,'','');
+FLUSH TABLES;
+
+test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SET NAMES cp932;
+INSERT INTO tbl_a (pkey,txt_utf8,txt_cp932) VALUES (10,'','’†‘');
+INSERT INTO tbl_a (pkey,txt_utf8,txt_cp932) VALUES (0,'','') ON DUPLICATE KEY UPDATE txt_cp932 = '’†‘';
+UPDATE tbl_a SET txt_cp932 = '’†‘' WHERE pkey = 2;
+SET NAMES utf8;
+connection child2_1;
+SET NAMES cp932;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%update %';
+argument
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`txt_utf8`,`txt_cp932`)values(10,'',_cp932'\\x92\\x86\\x8D\\x91')
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`txt_utf8`,`txt_cp932`)values(0,'',_cp932'') on duplicate key update `txt_cp932` = _cp932'\x92\x86\x8D\x91'
+update `auto_test_remote`.`tbl_a` set `txt_cp932` = _cp932'\x92\x86\x8D\x91' where (`pkey` = 2)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%update %'
+SELECT pkey, txt_utf8, txt_cp932 FROM tbl_a ORDER BY pkey;
+pkey txt_utf8 txt_cp932
+0 ’†‘
+1
+2 ’†‘
+3
+4
+5
+6
+7
+8
+9
+10 ’†‘
+SET NAMES utf8;
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mariadb.result b/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mariadb.result
new file mode 100644
index 00000000000..d9fb00a09fc
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mariadb.result
@@ -0,0 +1,85 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+for slave1_1
+connection slave1_1;
+connection master_1;
+set @old_binlog_format= @@binlog_format;
+set session binlog_format= 'ROW';
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection slave1_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+connection slave1_1;
+connection master_1;
+SET SESSION sql_log_bin= 0;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+f float DEFAULT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+SET SESSION sql_log_bin= 1;
+connection slave1_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+f float DEFAULT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+connection master_1;
+INSERT INTO tbl_a (pkey, f) VALUES (0,NULL);
+INSERT INTO tbl_a (pkey, f) VALUES (1,0.671437);
+DELETE FROM tbl_a WHERE pkey = 0;
+DELETE FROM tbl_a WHERE pkey = 1;
+connection slave1_1;
+connection master_1;
+SET SESSION sql_log_bin= 0;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%delete %';
+argument
+delete from `auto_test_remote`.`tbl_a` where `pkey` = 0 and `f` is null limit 1
+delete from `auto_test_remote`.`tbl_a` where `pkey` = 1 and `f` = cast(0.671437 as float) limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%delete %'
+SELECT pkey, f FROM tbl_a ORDER BY pkey;
+pkey f
+connection slave1_1;
+SELECT pkey, f FROM tbl_a ORDER BY pkey;
+pkey f
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection slave1_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session binlog_format= @old_binlog_format;
+connection slave1_1;
+for slave1_1
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mysql.result b/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mysql.result
new file mode 100644
index 00000000000..9b11de7cff6
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mysql.result
@@ -0,0 +1,85 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+for slave1_1
+connection slave1_1;
+connection master_1;
+set @old_binlog_format= @@binlog_format;
+set session binlog_format= 'ROW';
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection slave1_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+connection slave1_1;
+connection master_1;
+SET SESSION sql_log_bin= 0;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+f float DEFAULT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+SET SESSION sql_log_bin= 1;
+connection slave1_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+f float DEFAULT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+connection master_1;
+INSERT INTO tbl_a (pkey, f) VALUES (0,NULL);
+INSERT INTO tbl_a (pkey, f) VALUES (1,0.671437);
+DELETE FROM tbl_a WHERE pkey = 0;
+DELETE FROM tbl_a WHERE pkey = 1;
+connection slave1_1;
+connection master_1;
+SET SESSION sql_log_bin= 0;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%delete %';
+argument
+delete from `auto_test_remote`.`tbl_a` where `pkey` = 0 and `f` is null limit 1
+delete from `auto_test_remote`.`tbl_a` where `pkey` = 1 and `f` = /* create function to_float(a decimal(20,6)) returns float return a */ to_float(0.671437) limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%delete %'
+SELECT pkey, f FROM tbl_a ORDER BY pkey;
+pkey f
+connection slave1_1;
+SELECT pkey, f FROM tbl_a ORDER BY pkey;
+pkey f
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection slave1_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session binlog_format= @old_binlog_format;
+connection slave1_1;
+for slave1_1
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/direct_sql_with_comma_pwd.result b/storage/spider/mysql-test/spider/bugfix/r/direct_sql_with_comma_pwd.result
new file mode 100644
index 00000000000..b485d645619
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/direct_sql_with_comma_pwd.result
@@ -0,0 +1,37 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection child2_1;
+GRANT ALL ON *.* TO tu@'%' IDENTIFIED BY 'pass,1234';
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+CREATE TEMPORARY TABLE tmp_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE2
+SELECT spider_direct_sql('SELECT 22', 'tmp_a', 'srv "s_2_1", database "test", password "pass,1234", user "tu"');
+spider_direct_sql('SELECT 22', 'tmp_a', 'srv "s_2_1", database "test", password "pass,1234", user "tu"')
+1
+SELECT pkey FROM tmp_a;
+pkey
+22
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP USER tu@'%';
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/group_by_order_by_limit.result b/storage/spider/mysql-test/spider/bugfix/r/group_by_order_by_limit.result
new file mode 100644
index 00000000000..8a2bcb73537
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/group_by_order_by_limit.result
@@ -0,0 +1,117 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-16520
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+skey int NOT NULL,
+PRIMARY KEY (pkey),
+KEY idx1 (skey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,skey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_a (pkey,skey) VALUES (10,10),(11,11),(12,12),(13,13),(14,14),(15,15),(16,16),(17,17),(18,18),(19,19);
+INSERT INTO tbl_a (pkey,skey) VALUES (20,5),(21,6),(22,7),(23,8),(24,9),(25,10),(26,11),(27,12),(28,13),(29,14);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT skey, count(*) cnt FROM tbl_a GROUP BY skey ORDER BY cnt DESC, skey DESC LIMIT 5;
+skey cnt
+14 2
+13 2
+12 2
+11 2
+10 2
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+argument
+select count(0),`skey` from `auto_test_remote`.`tbl_a` group by `skey` order by `skey`
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+pkey skey
+1 1
+3 3
+5 5
+7 7
+9 9
+11 11
+13 13
+15 15
+17 17
+19 19
+21 6
+23 8
+25 10
+27 12
+29 14
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+argument
+select count(0),`skey` from `auto_test_remote2`.`tbl_a` group by `skey` order by `skey`
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+pkey skey
+0 0
+2 2
+4 4
+6 6
+8 8
+10 10
+12 12
+14 14
+16 16
+18 18
+20 5
+22 7
+24 9
+26 11
+28 13
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_21884.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_21884.result
index 921744f7f76..d5ba9b1e64a 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/mdev_21884.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_21884.result
@@ -72,11 +72,8 @@ connection child2_1;
SET NAMES utf8;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select `a`,`b` from `auto_test_remote`.`ta_r3` where `a` = 11 order by `b`
-select `a`,`b` from `auto_test_remote`.`ta_r3` where `a` = 12 order by `b`
-select `a`,`b` from `auto_test_remote`.`ta_r3` where `a` = 13 order by `b`
-select `a`,`b` from `auto_test_remote`.`ta_r3` where `a` = 14 order by `b`
-select `a`,`b` from `auto_test_remote`.`ta_r3` where `a` = 15 order by `b`
+select `a`,`b` from `auto_test_remote`.`ta_r2` order by `a`,`b`
+select `a`,`b` from `auto_test_remote`.`ta_r3` order by `a`,`b`
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT a, b, c FROM ta_r2 ORDER BY a ;
SELECT a, b, c FROM ta_r3 ORDER BY a;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_22246.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_22246.result
new file mode 100644
index 00000000000..749c750e018
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_22246.result
@@ -0,0 +1,79 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-22246
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+id bigint NOT NULL,
+node text,
+PRIMARY KEY (id)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (id,node) VALUES (1,'DB-G0'),(2,'DB-G1');
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT * FROM tbl_a;
+id node
+2 DB-G1
+1 DB-G0
+SELECT * FROM tbl_a WHERE id != 0;
+id node
+2 DB-G1
+1 DB-G0
+connection child2_1;
+SELECT * FROM tbl_a ORDER BY id;
+id node
+2 DB-G1
+connection child2_2;
+SELECT * FROM tbl_a ORDER BY id;
+id node
+1 DB-G0
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_22265.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_22265.result
new file mode 100644
index 00000000000..0331943a878
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_22265.result
@@ -0,0 +1,23 @@
+for master_1
+for child2
+for child3
+
+this test is for MDEV-22265
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+create table
+connection master_1;
+create table t2345678911234567892123456789312345678941234567895123(id int) ENGINE=SPIDER DEFAULT CHARSET=latin1 COMMENT='host "h114", user "spider", password "spider", port "3306", database "test32738"';
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+for master_1
+for child2
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_24343.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_24343.result
new file mode 100644
index 00000000000..1d154daa8ec
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_24343.result
@@ -0,0 +1,75 @@
+#
+# MDEV-24343 Spider Left join failed Unknown column 't0.ID' in 'on clause'
+#
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection child2_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`first_name` varchar(255) DEFAULT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `tbl_a` VALUES (1,'RICHARD'), (2,'STEPHANE'), (3,'ALAIN');
+CREATE TABLE `tbl_b` (
+`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`last_name` varchar(255) DEFAULT NULL,
+PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `tbl_b` VALUES (1,'DEMONGEOT'),(2,'VAROQUI');
+CREATE TABLE `tbl_c` (
+`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`surname` varchar(255) DEFAULT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `tbl_c` VALUES (1,'CON'),(2,'MOYEN'),(3,'MOYEN2');
+SELECT * from tbl_b JOIN tbl_c ON tbl_b.id = tbl_c.id LEFT OUTER JOIN tbl_a ON tbl_a.id = tbl_b.id;
+id last_name id surname id first_name
+1 DEMONGEOT 1 CON 1 RICHARD
+2 VAROQUI 2 MOYEN 2 STEPHANE
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+CREATE TABLE tbl_a (
+`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`first_name` varchar(255) DEFAULT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a"'
+PARTITION BY LIST COLUMNS(`id`) (
+PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+CREATE TABLE `tbl_b` (
+`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`last_name` varchar(255) DEFAULT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_b"'
+PARTITION BY LIST COLUMNS(`id`) (
+PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+CREATE TABLE `tbl_c` (
+`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`surname` varchar(255) DEFAULT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_c"'
+PARTITION BY LIST COLUMNS(`id`) (
+PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+SELECT * from tbl_b JOIN tbl_c ON tbl_b.id = tbl_c.id LEFT OUTER JOIN tbl_a ON tbl_a.id = tbl_b.id;
+id last_name id surname id first_name
+1 DEMONGEOT 1 CON 1 RICHARD
+2 VAROQUI 2 MOYEN 2 STEPHANE
+connection master_1;
+DROP DATABASE auto_test_local;
+connection child2_1;
+DROP DATABASE auto_test_remote;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_26013.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_26013.result
new file mode 100644
index 00000000000..3af1f7df0a7
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_26013.result
@@ -0,0 +1,42 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+MDEV-26013 distinct not work properly in some cases for spider tables
+
+connection child2_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+`a`int,
+`b`int,
+PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+insert into `tbl_a` VALUES (1,999), (2,999);
+connection master_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+`a`int,
+`b`int,
+PRIMARY KEY (`a`)
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a"' PARTITION BY LIST COLUMNS(`a`) (
+PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+connection master_1;
+SELECT distinct b FROM tbl_a WHERE b=999;
+b
+999
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result
new file mode 100644
index 00000000000..8a3d9da1dc4
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result
@@ -0,0 +1,21 @@
+#
+# MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) ||
+# ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) &&
+# ((unsigned long) old_end & (pagesize - 1)) == 0)' failed,
+# Assertion `str.alloced_length() >= str.length() + data_len' failed
+#
+for master_1
+for child2
+for child3
+connection master_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (a FLOAT) ENGINE=SPIDER;
+INSERT INTO tbl_a VALUES
+(0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE),
+(0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE);
+ERROR HY000: Unable to connect to foreign data source: localhost
+DROP DATABASE auto_test_remote;
+for master_1
+for child2
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/return_found_rows_insert.result b/storage/spider/mysql-test/spider/bugfix/r/return_found_rows_insert.result
new file mode 100644
index 00000000000..2ddec02ef81
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/return_found_rows_insert.result
@@ -0,0 +1,179 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-18973
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+skey int NOT NULL,
+dt date NOT NULL,
+tm time NOT NULL,
+PRIMARY KEY (skey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2012-01-01', '12:00:00'),(1, '2012-02-01', '12:00:00'),(2, '2012-03-01', '12:00:00'),(3, '2012-04-01', '12:00:00'),(4, '2012-05-01', '12:00:00'),(5, '2012-06-01', '12:00:00'),(6, '2012-07-01', '12:00:00'),(7, '2012-08-01', '12:00:00'),(8, '2012-09-01', '12:00:00'),(9, '2012-10-01', '12:00:00');
+FLUSH TABLES;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "MASTER_1_SET_COMMAND INSERT IGNORE INTO tbl_a (skey, dt, tm) VALUES (0, '2013-01-01', '13:00:00'),(2, '2013-02-01', '13:00:00'),(4, '2013-03-01', '13:00:00'),(7, '2013-04-01', '13:00:00'),(8, '2013-05-01', '13:00:00'),(10, '2013-06-01', '13:00:00'),(11, '2013-07-01', '13:00:00'),(12, '2013-08-01', '13:00:00'),(13, '2013-09-01', '13:00:00'),(14, '2013-10-01', '13:00:00')" auto_test_local
+--------------
+set session spider_direct_dup_insert=1
+--------------
+
+Query OK, 0 rows affected
+
+--------------
+INSERT IGNORE INTO tbl_a (skey, dt, tm) VALUES (0, '2013-01-01', '13:00:00'),(2, '2013-02-01', '13:00:00'),(4, '2013-03-01', '13:00:00'),(7, '2013-04-01', '13:00:00'),(8, '2013-05-01', '13:00:00'),(10, '2013-06-01', '13:00:00'),(11, '2013-07-01', '13:00:00'),(12, '2013-08-01', '13:00:00'),(13, '2013-09-01', '13:00:00'),(14, '2013-10-01', '13:00:00')
+--------------
+
+Query OK, 5 rows affected
+Records: 10 Duplicates: 5 Warnings: 0
+
+Bye
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%replace %';
+argument
+insert ignore into `auto_test_remote`.`tbl_a`(`skey`,`dt`,`tm`)values(0,_latin1'2013-01-01',_latin1'13:00:00'),(2,_latin1'2013-02-01',_latin1'13:00:00'),(4,_latin1'2013-03-01',_latin1'13:00:00'),(7,_latin1'2013-04-01',_latin1'13:00:00'),(8,_latin1'2013-05-01',_latin1'13:00:00'),(10,_latin1'2013-06-01',_latin1'13:00:00'),(11,_latin1'2013-07-01',_latin1'13:00:00'),(12,_latin1'2013-08-01',_latin1'13:00:00'),(13,_latin1'2013-09-01',_latin1'13:00:00'),(14,_latin1'2013-10-01',_latin1'13:00:00')
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%replace %'
+SELECT skey, dt, tm FROM tbl_a ORDER BY skey;
+skey dt tm
+0 2012-01-01 12:00:00
+1 2012-02-01 12:00:00
+2 2012-03-01 12:00:00
+3 2012-04-01 12:00:00
+4 2012-05-01 12:00:00
+5 2012-06-01 12:00:00
+6 2012-07-01 12:00:00
+7 2012-08-01 12:00:00
+8 2012-09-01 12:00:00
+9 2012-10-01 12:00:00
+10 2013-06-01 13:00:00
+11 2013-07-01 13:00:00
+12 2013-08-01 13:00:00
+13 2013-09-01 13:00:00
+14 2013-10-01 13:00:00
+TRUNCATE TABLE mysql.general_log;
+MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "MASTER_1_SET_COMMAND REPLACE INTO tbl_a (skey, dt, tm) VALUES (1, '2012-02-01', '12:00:00'),(3, '2012-12-01', '11:00:00'),(8, '2012-11-30', '11:00:00'),(9, '2012-11-29', '11:00:00'),(10, '2012-11-28', '11:00:00'),(15, '2012-11-27', '11:00:00'),(16, '2012-11-26', '11:00:00'),(17, '2012-11-25', '11:00:00'),(18, '2012-11-24', '11:00:00'),(19, '2012-11-23', '11:00:00')" auto_test_local
+--------------
+set session spider_direct_dup_insert=1
+--------------
+
+Query OK, 0 rows affected
+
+--------------
+REPLACE INTO tbl_a (skey, dt, tm) VALUES (1, '2012-02-01', '12:00:00'),(3, '2012-12-01', '11:00:00'),(8, '2012-11-30', '11:00:00'),(9, '2012-11-29', '11:00:00'),(10, '2012-11-28', '11:00:00'),(15, '2012-11-27', '11:00:00'),(16, '2012-11-26', '11:00:00'),(17, '2012-11-25', '11:00:00'),(18, '2012-11-24', '11:00:00'),(19, '2012-11-23', '11:00:00')
+--------------
+
+Query OK, 14 rows affected
+Records: 10 Duplicates: 4 Warnings: 0
+
+Bye
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%replace %';
+argument
+replace into `auto_test_remote`.`tbl_a`(`skey`,`dt`,`tm`)values(1,_latin1'2012-02-01',_latin1'12:00:00'),(3,_latin1'2012-12-01',_latin1'11:00:00'),(8,_latin1'2012-11-30',_latin1'11:00:00'),(9,_latin1'2012-11-29',_latin1'11:00:00'),(10,_latin1'2012-11-28',_latin1'11:00:00'),(15,_latin1'2012-11-27',_latin1'11:00:00'),(16,_latin1'2012-11-26',_latin1'11:00:00'),(17,_latin1'2012-11-25',_latin1'11:00:00'),(18,_latin1'2012-11-24',_latin1'11:00:00'),(19,_latin1'2012-11-23',_latin1'11:00:00')
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%replace %'
+SELECT skey, dt, tm FROM tbl_a ORDER BY skey;
+skey dt tm
+0 2012-01-01 12:00:00
+1 2012-02-01 12:00:00
+2 2012-03-01 12:00:00
+3 2012-12-01 11:00:00
+4 2012-05-01 12:00:00
+5 2012-06-01 12:00:00
+6 2012-07-01 12:00:00
+7 2012-08-01 12:00:00
+8 2012-11-30 11:00:00
+9 2012-11-29 11:00:00
+10 2012-11-28 11:00:00
+11 2013-07-01 13:00:00
+12 2013-08-01 13:00:00
+13 2013-09-01 13:00:00
+14 2013-10-01 13:00:00
+15 2012-11-27 11:00:00
+16 2012-11-26 11:00:00
+17 2012-11-25 11:00:00
+18 2012-11-24 11:00:00
+19 2012-11-23 11:00:00
+TRUNCATE TABLE mysql.general_log;
+MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "MASTER_1_SET_COMMAND INSERT INTO tbl_a (skey, dt, tm) VALUES (1, '2012-11-01', '11:00:00'),(3, '2012-12-01', '11:00:00'),(11, '2012-11-30', '11:00:00'),(15, '2012-11-29', '11:00:00'),(16, '2012-11-28', '11:00:00'),(20, '2012-11-27', '11:00:00'),(21, '2012-11-26', '11:00:00'),(22, '2012-11-25', '11:00:00'),(23, '2012-11-24', '11:00:00'),(24, '2012-11-23', '11:00:00') ON DUPLICATE KEY UPDATE dt=VALUE(dt), tm=VALUE(tm)" auto_test_local
+--------------
+set session spider_direct_dup_insert=1
+--------------
+
+Query OK, 0 rows affected
+
+--------------
+INSERT INTO tbl_a (skey, dt, tm) VALUES (1, '2012-11-01', '11:00:00'),(3, '2012-12-01', '11:00:00'),(11, '2012-11-30', '11:00:00'),(15, '2012-11-29', '11:00:00'),(16, '2012-11-28', '11:00:00'),(20, '2012-11-27', '11:00:00'),(21, '2012-11-26', '11:00:00'),(22, '2012-11-25', '11:00:00'),(23, '2012-11-24', '11:00:00'),(24, '2012-11-23', '11:00:00') ON DUPLICATE KEY UPDATE dt=VALUE(dt), tm=VALUE(tm)
+--------------
+
+Query OK, 13 rows affected
+Records: 10 Duplicates: 4 Warnings: 0
+
+Bye
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%replace %';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`skey`,`dt`,`tm`)values(1,_latin1'2012-11-01',_latin1'11:00:00'),(3,_latin1'2012-12-01',_latin1'11:00:00'),(11,_latin1'2012-11-30',_latin1'11:00:00'),(15,_latin1'2012-11-29',_latin1'11:00:00'),(16,_latin1'2012-11-28',_latin1'11:00:00'),(20,_latin1'2012-11-27',_latin1'11:00:00'),(21,_latin1'2012-11-26',_latin1'11:00:00'),(22,_latin1'2012-11-25',_latin1'11:00:00'),(23,_latin1'2012-11-24',_latin1'11:00:00'),(24,_latin1'2012-11-23',_latin1'11:00:00') on duplicate key update `dt` = values(`dt`),`tm` = values(`tm`)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %' OR argument LIKE '%replace %'
+SELECT skey, dt, tm FROM tbl_a ORDER BY skey;
+skey dt tm
+0 2012-01-01 12:00:00
+1 2012-11-01 11:00:00
+2 2012-03-01 12:00:00
+3 2012-12-01 11:00:00
+4 2012-05-01 12:00:00
+5 2012-06-01 12:00:00
+6 2012-07-01 12:00:00
+7 2012-08-01 12:00:00
+8 2012-11-30 11:00:00
+9 2012-11-29 11:00:00
+10 2012-11-28 11:00:00
+11 2012-11-30 11:00:00
+12 2013-08-01 13:00:00
+13 2013-09-01 13:00:00
+14 2013-10-01 13:00:00
+15 2012-11-29 11:00:00
+16 2012-11-28 11:00:00
+17 2012-11-25 11:00:00
+18 2012-11-24 11:00:00
+19 2012-11-23 11:00:00
+20 2012-11-27 11:00:00
+21 2012-11-26 11:00:00
+22 2012-11-25 11:00:00
+23 2012-11-24 11:00:00
+24 2012-11-23 11:00:00
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/return_found_rows_update.result b/storage/spider/mysql-test/spider/bugfix/r/return_found_rows_update.result
new file mode 100644
index 00000000000..cd5423ed272
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/return_found_rows_update.result
@@ -0,0 +1,99 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-18973
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+skey int NOT NULL,
+dt date NOT NULL,
+tm time NOT NULL,
+KEY idx1 (skey,dt)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2012-01-01', '12:00:00'),(1, '2012-02-01', '12:00:00'),(2, '2012-03-01', '12:00:00'),(3, '2012-04-01', '12:00:00'),(4, '2012-05-01', '12:00:00'),(5, '2012-06-01', '12:00:00'),(6, '2012-07-01', '12:00:00'),(7, '2012-08-01', '12:00:00'),(8, '2012-09-01', '12:00:00'),(9, '2012-10-01', '12:00:00');
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2013-01-01', '13:00:00'),(1, '2013-02-01', '13:00:00'),(2, '2013-03-01', '13:00:00'),(3, '2013-04-01', '13:00:00'),(4, '2013-05-01', '13:00:00'),(5, '2013-06-01', '13:00:00'),(6, '2013-07-01', '13:00:00'),(7, '2013-08-01', '13:00:00'),(8, '2013-09-01', '13:00:00'),(9, '2013-10-01', '13:00:00');
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2012-11-01', '11:00:00'),(1, '2012-12-01', '11:00:00'),(2, '2012-11-30', '11:00:00'),(3, '2012-11-29', '11:00:00'),(4, '2012-11-28', '11:00:00'),(5, '2012-11-27', '11:00:00'),(6, '2012-11-26', '11:00:00'),(7, '2012-11-25', '11:00:00'),(8, '2012-11-24', '11:00:00'),(9, '2012-11-23', '11:00:00');
+FLUSH TABLES;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "UPDATE tbl_a SET tm = '12:00:00' WHERE skey = 0" auto_test_local
+--------------
+UPDATE tbl_a SET tm = '12:00:00' WHERE skey = 0
+--------------
+
+Query OK, 2 rows affected
+Rows matched: 3 Changed: 2 Warnings: 0
+
+Bye
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%update %';
+argument
+update `auto_test_remote`.`tbl_a` set `tm` = _latin1'12:00:00' where (`skey` = 0)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%update %'
+SELECT skey, dt, tm FROM tbl_a ORDER BY skey;
+skey dt tm
+0 2012-01-01 12:00:00
+0 2013-01-01 12:00:00
+0 2012-11-01 12:00:00
+1 2012-12-01 11:00:00
+1 2013-02-01 13:00:00
+1 2012-02-01 12:00:00
+2 2013-03-01 13:00:00
+2 2012-11-30 11:00:00
+2 2012-03-01 12:00:00
+3 2012-11-29 11:00:00
+3 2013-04-01 13:00:00
+3 2012-04-01 12:00:00
+4 2012-11-28 11:00:00
+4 2012-05-01 12:00:00
+4 2013-05-01 13:00:00
+5 2012-11-27 11:00:00
+5 2012-06-01 12:00:00
+5 2013-06-01 13:00:00
+6 2013-07-01 13:00:00
+6 2012-11-26 11:00:00
+6 2012-07-01 12:00:00
+7 2012-11-25 11:00:00
+7 2012-08-01 12:00:00
+7 2013-08-01 13:00:00
+8 2012-09-01 12:00:00
+8 2013-09-01 13:00:00
+8 2012-11-24 11:00:00
+9 2012-10-01 12:00:00
+9 2013-10-01 13:00:00
+9 2012-11-23 11:00:00
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/same_server_link.result b/storage/spider/mysql-test/spider/bugfix/r/same_server_link.result
new file mode 100644
index 00000000000..1f4177568a7
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/same_server_link.result
@@ -0,0 +1,42 @@
+for master_1
+for child2
+for child3
+connection master_1;
+set @old_global_spider_same_server_link= @@global.spider_same_server_link;
+set @old_session_spider_same_server_link= @@session.spider_same_server_link;
+set global spider_same_server_link= 0;
+set session spider_same_server_link= 0;
+
+this test is for MDEV-6268
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+create table
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+CREATE TABLE tbl_b (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+
+select test 1
+connection master_1;
+INSERT INTO tbl_a VALUES(1);
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection master_1;
+set global spider_same_server_link= @old_global_spider_same_server_link;
+set session spider_same_server_link= @old_session_spider_same_server_link;
+for master_1
+for child2
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/select_with_backquote.result b/storage/spider/mysql-test/spider/bugfix/r/select_with_backquote.result
new file mode 100644
index 00000000000..52f8c98bf98
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/select_with_backquote.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-17204
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+txt_utf8 char(8) NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE DEFAULT CHARACTER SET utf8 MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,txt_utf8) VALUES (0,'01234567'),(1,'12345678'),(2,'23456789'),(3,'34567890'),(4,'45678901'),(5,'56789012'),(6,'67890123'),(7,'78901234'),(8,'89012345'),(9,'90123456');
+FLUSH TABLES;
+
+test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SET NAMES utf8;
+SELECT `pkey`, LEFT(`txt_utf8`, 4) FROM `auto_test_local`.`tbl_a` ORDER BY LEFT(`txt_utf8`, 4) LIMIT 3;
+pkey LEFT(`txt_utf8`, 4)
+0 0123
+1 1234
+2 2345
+connection child2_1;
+SET NAMES utf8;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+argument
+select t0.`pkey` `pkey`,(left(t0.`txt_utf8` , 4)) `LEFT(``txt_utf8``, 4)` from `auto_test_remote`.`tbl_a` t0 order by `LEFT(``txt_utf8``, 4)` limit 3
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+SELECT pkey, txt_utf8 FROM tbl_a ORDER BY pkey;
+pkey txt_utf8
+0 01234567
+1 12345678
+2 23456789
+3 34567890
+4 45678901
+5 56789012
+6 67890123
+7 78901234
+8 89012345
+9 90123456
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/slave_transaction_retry_errors_5digit.result b/storage/spider/mysql-test/spider/bugfix/r/slave_transaction_retry_errors_5digit.result
new file mode 100644
index 00000000000..f2cab6b0a95
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/slave_transaction_retry_errors_5digit.result
@@ -0,0 +1,22 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+for slave1_1
+
+connection slave1_1;
+SHOW VARIABLES LIKE 'slave_transaction_retry_errors';
+Variable_name Value
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701,10000,20000,30000
+connection slave1_1;
+for slave1_1
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result b/storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result
index 06581a604a2..d7a0c1044a7 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result
@@ -50,7 +50,7 @@ SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %';
argument
set session time_zone = '+00:00'
SET NAMES utf8
-set session transaction isolation level read committed;set session autocommit = 1;start transaction
+set session transaction isolation level read committed;set session autocommit = 1;set session wait_timeout = 604800;set session sql_mode = 'strict_trans_tables,error_for_division_by_zero,no_auto_create_user,no_engine_substitution';start transaction
SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
diff --git a/storage/spider/mysql-test/spider/bugfix/r/spider_table_sts.result b/storage/spider/mysql-test/spider/bugfix/r/spider_table_sts.result
new file mode 100644
index 00000000000..f915cc951b1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/spider_table_sts.result
@@ -0,0 +1,38 @@
+for master_1
+for child2
+for child3
+connection master_1;
+alter table mysql.spider_table_sts drop column checksum;
+insert into mysql.spider_table_sts values ('auto_test_local', 'tbl_a', 0, 0, 0, 0, 0, '2019-01-01 00:00:00', '2019-01-01 00:00:00', '2019-01-01 00:00:00');
+
+this test is for MDEV-19842
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+create table
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+
+select test 1
+connection master_1;
+SELECT pkey FROM tbl_a;
+ERROR HY000: System table spider_table_sts is different version
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+ERROR HY000: System table spider_table_sts is different version
+connection master_1;
+alter table mysql.spider_table_sts add column checksum bigint unsigned default null after update_time;
+DROP DATABASE IF EXISTS auto_test_local;
+for master_1
+for child2
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/sql_mode_mariadb.result b/storage/spider/mysql-test/spider/bugfix/r/sql_mode_mariadb.result
new file mode 100644
index 00000000000..5048fbb423c
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/sql_mode_mariadb.result
@@ -0,0 +1,83 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_sql_mode= @@sql_mode;
+set session sql_mode= 'real_as_float,pipes_as_concat,ansi_quotes,ignore_space,ignore_bad_table_options,only_full_group_by,no_unsigned_subtraction,no_dir_in_create,postgresql,oracle,mssql,db2,maxdb,no_key_options,no_table_options,no_field_options,mysql323,mysql40,ansi,no_auto_value_on_zero,no_backslash_escapes,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,traditional,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length,empty_string_is_null,simultaneous_assignment,time_round_fractional';
+
+this test is for MDEV-16508
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+select test
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT * FROM tbl_a ORDER BY pkey;
+pkey
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%sql_mode%';
+argument
+set session transaction isolation level repeatable read;set session autocommit = 1;set session sql_log_off = 0;set session wait_timeout = 604800;set session sql_mode = 'real_as_float,ignore_bad_table_options,no_unsigned_subtraction,no_dir_in_create,no_auto_value_on_zero,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length,empty_string_is_null,simultaneous_assignment,time_round_fractional';set session time_zone = '+00:00';start transaction
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%sql_mode%'
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session sql_mode= @old_sql_mode;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/sql_mode_mysql.result b/storage/spider/mysql-test/spider/bugfix/r/sql_mode_mysql.result
new file mode 100644
index 00000000000..08f9a6007aa
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/sql_mode_mysql.result
@@ -0,0 +1,83 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_sql_mode= @@sql_mode;
+set session sql_mode= 'real_as_float,pipes_as_concat,ansi_quotes,ignore_space,ignore_bad_table_options,only_full_group_by,no_unsigned_subtraction,no_dir_in_create,postgresql,oracle,mssql,db2,maxdb,no_key_options,no_table_options,no_field_options,mysql323,mysql40,ansi,no_auto_value_on_zero,no_backslash_escapes,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,traditional,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length,empty_string_is_null,simultaneous_assignment,time_round_fractional';
+
+this test is for MDEV-16508
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+select test
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT * FROM tbl_a ORDER BY pkey;
+pkey
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%sql_mode%';
+argument
+set session transaction isolation level repeatable read;set session autocommit = 1;set session sql_log_off = 0;set session wait_timeout = 604800;set session sql_mode = 'real_as_float,ignore_bad_table_options,no_unsigned_subtraction,no_dir_in_create,no_auto_value_on_zero,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length';set session time_zone = '+00:00';start transaction
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%sql_mode%'
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session sql_mode= @old_sql_mode;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/wait_timeout.result b/storage/spider/mysql-test/spider/bugfix/r/wait_timeout.result
new file mode 100644
index 00000000000..ec9534f7592
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/wait_timeout.result
@@ -0,0 +1,130 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection child2_1;
+set @old_wait_timeout= @@wait_timeout;
+set global wait_timeout= 1;
+connection child2_2;
+set @old_wait_timeout= @@wait_timeout;
+set global wait_timeout= 1;
+
+this test is for MDEV-16530
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_1_2;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+connection child2_2_2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a READ;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+INSERT INTO tbl_a SELECT pkey + 30 FROM tbl_a ORDER BY pkey;
+connection child2_1_2;
+SELECT SLEEP(2);
+SLEEP(2)
+0
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
+argument
+insert into `auto_test_remote`.`tbl_a`(`pkey`)values(31),(33),(35),(37),(39),(41),(43),(45),(47),(49),(51),(53),(55),(57),(59)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'
+connection child2_2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
+argument
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'
+connection child2_1;
+UNLOCK TABLES;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+1
+3
+5
+7
+9
+11
+13
+15
+17
+19
+21
+23
+25
+27
+29
+connection child2_2;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+2
+4
+6
+8
+10
+12
+14
+16
+18
+20
+22
+24
+26
+28
+connection master_1;
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection child2_1;
+set global wait_timeout= @old_wait_timeout;
+connection child2_2;
+set global wait_timeout= @old_wait_timeout;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/r/xa_cmd.result b/storage/spider/mysql-test/spider/bugfix/r/xa_cmd.result
new file mode 100644
index 00000000000..846dc6c737b
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/xa_cmd.result
@@ -0,0 +1,68 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-19794
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+XA START 'test';
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+XA END 'test';
+XA PREPARE 'test';
+XA COMMIT 'test';
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %';
+argument
+insert into `auto_test_remote`.`tbl_a`(`pkey`)values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%insert %'
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/cp932_column.cnf b/storage/spider/mysql-test/spider/bugfix/t/cp932_column.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/cp932_column.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/cp932_column.test b/storage/spider/mysql-test/spider/bugfix/t/cp932_column.test
new file mode 100644
index 00000000000..8bd0d40cb60
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/cp932_column.test
@@ -0,0 +1,80 @@
+--source ../include/cp932_column_init.inc
+--echo
+--echo this test is for MDEV-18992
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ txt_utf8 char(8) NOT NULL,
+ txt_cp932 char(8) NOT NULL COLLATE cp932_japanese_ci,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE DEFAULT CHARACTER SET utf8 MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ txt_utf8 char(8) NOT NULL,
+ txt_cp932 char(8) NOT NULL COLLATE cp932_japanese_ci,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE DEFAULT CHARACTER SET utf8 $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey,txt_utf8,txt_cp932) VALUES (0,'',''),(1,'',''),(2,'',''),(3,'',''),(4,'',''),(5,'',''),(6,'',''),(7,'',''),(8,'',''),(9,'','');
+FLUSH TABLES;
+
+--echo
+--echo test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SET NAMES cp932;
+INSERT INTO tbl_a (pkey,txt_utf8,txt_cp932) VALUES (10,'','’†‘');
+INSERT INTO tbl_a (pkey,txt_utf8,txt_cp932) VALUES (0,'','') ON DUPLICATE KEY UPDATE txt_cp932 = '’†‘';
+UPDATE tbl_a SET txt_cp932 = '’†‘' WHERE pkey = 2;
+SET NAMES utf8;
+
+--connection child2_1
+SET NAMES cp932;
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+SET NAMES utf8;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/cp932_column_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc
new file mode 100644
index 00000000000..349808824e7
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc
@@ -0,0 +1,100 @@
+--echo
+--echo drop and create databases
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection slave1_1
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+--disable_ps_protocol
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_ps_protocol
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+save_master_pos;
+
+--connection slave1_1
+sync_with_master;
+
+--connection master_1
+SET SESSION sql_log_bin= 0;
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ f float DEFAULT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ f float DEFAULT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE2 $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+SET SESSION sql_log_bin= 1;
+
+--connection slave1_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ f float DEFAULT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ f float DEFAULT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+
+--connection master_1
+INSERT INTO tbl_a (pkey, f) VALUES (0,NULL);
+INSERT INTO tbl_a (pkey, f) VALUES (1,0.671437);
+DELETE FROM tbl_a WHERE pkey = 0;
+DELETE FROM tbl_a WHERE pkey = 1;
+save_master_pos;
+
+--connection slave1_1
+sync_with_master;
+
+--connection master_1
+SET SESSION sql_log_bin= 0;
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--connection slave1_1
+SELECT pkey, f FROM tbl_a ORDER BY pkey;
+
+--echo
+--echo deinit
+--disable_warnings
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection slave1_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.cnf b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.cnf
new file mode 100644
index 00000000000..45019d6c537
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_4_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.test b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.test
new file mode 100644
index 00000000000..ce1a09d6287
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mariadb.test
@@ -0,0 +1,5 @@
+--source ../include/delete_with_float_column_mariadb_init.inc
+--source delete_with_float_column.inc
+--source ../include/delete_with_float_column_mariadb_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.cnf b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.cnf
new file mode 100644
index 00000000000..45019d6c537
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_4_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.test b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.test
new file mode 100644
index 00000000000..c687f947a91
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column_mysql.test
@@ -0,0 +1,5 @@
+--source ../include/delete_with_float_column_mysql_init.inc
+--source delete_with_float_column.inc
+--source ../include/delete_with_float_column_mysql_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.cnf b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test
new file mode 100644
index 00000000000..0b7d51190a7
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test
@@ -0,0 +1,35 @@
+--source ../include/direct_sql_with_comma_pwd_init.inc
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+--enable_warnings
+
+--disable_query_log
+echo CREATE TEMPORARY TABLE tmp_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE2;
+eval CREATE TEMPORARY TABLE tmp_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE2;
+--enable_query_log
+
+eval $DIRECT_SQL_COMMAND;
+SELECT pkey FROM tmp_a;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--enable_warnings
+--source ../include/direct_sql_with_comma_pwd_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.cnf b/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.cnf
new file mode 100644
index 00000000000..e0ffb99c38e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_2_2.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test b/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test
new file mode 100644
index 00000000000..f1de6d5d25f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test
@@ -0,0 +1,97 @@
+--source ../include/group_by_order_by_limit_init.inc
+--echo
+--echo this test is for MDEV-16520
+--echo
+--echo drop and create databases
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+--connection child2_2
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+--disable_query_log
+echo CHILD2_2_CREATE_TABLES;
+eval $CHILD2_2_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ PRIMARY KEY (pkey),
+ KEY idx1 (skey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ PRIMARY KEY (pkey),
+ KEY idx1 (skey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey,skey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_a (pkey,skey) VALUES (10,10),(11,11),(12,12),(13,13),(14,14),(15,15),(16,16),(17,17),(18,18),(19,19);
+INSERT INTO tbl_a (pkey,skey) VALUES (20,5),(21,6),(22,7),(23,8),(24,9),(25,10),(26,11),(27,12),(28,13),(29,14);
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SELECT skey, count(*) cnt FROM tbl_a GROUP BY skey ORDER BY cnt DESC, skey DESC LIMIT 5;
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--connection child2_2
+eval $CHILD2_2_SELECT_ARGUMENT1;
+eval $CHILD2_2_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--connection child2_2
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/group_by_order_by_limit_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_22246.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_22246.cnf
new file mode 100644
index 00000000000..e0ffb99c38e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_22246.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_2_2.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_22246.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_22246.test
new file mode 100644
index 00000000000..63b04c14e11
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_22246.test
@@ -0,0 +1,92 @@
+--source ../include/mdev_22246_init.inc
+--echo
+--echo this test is for MDEV-22246
+--echo
+--echo drop and create databases
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+--connection child2_2
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+--disable_query_log
+echo CHILD2_2_CREATE_TABLES;
+eval $CHILD2_2_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ id bigint NOT NULL,
+ node text,
+ PRIMARY KEY (id)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ id bigint NOT NULL,
+ node text,
+ PRIMARY KEY (id)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (id,node) VALUES (1,'DB-G0'),(2,'DB-G1');
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SELECT * FROM tbl_a;
+SELECT * FROM tbl_a WHERE id != 0;
+
+--connection child2_1
+eval $CHILD2_1_SELECT_TABLES;
+
+--connection child2_2
+eval $CHILD2_2_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--connection child2_2
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/mdev_22246_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_22265.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_22265.cnf
new file mode 100644
index 00000000000..b0853e32654
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_22265.cnf
@@ -0,0 +1,2 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_22265.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_22265.test
new file mode 100644
index 00000000000..0dcb103133b
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_22265.test
@@ -0,0 +1,28 @@
+--source ../include/mdev_22265_init.inc
+--echo
+--echo this test is for MDEV-22265
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+--enable_warnings
+
+--echo
+--echo create table
+--connection master_1
+create table t2345678911234567892123456789312345678941234567895123(id int) ENGINE=SPIDER DEFAULT CHARSET=latin1 COMMENT='host "h114", user "spider", password "spider", port "3306", database "test32738"';
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--enable_warnings
+--source ../include/mdev_22265_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_24343.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_24343.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_24343.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_24343.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_24343.test
new file mode 100644
index 00000000000..5756cbac993
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_24343.test
@@ -0,0 +1,84 @@
+--echo #
+--echo # MDEV-24343 Spider Left join failed Unknown column 't0.ID' in 'on clause'
+--echo #
+
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+
+--connection child2_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `first_name` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+INSERT INTO `tbl_a` VALUES (1,'RICHARD'), (2,'STEPHANE'), (3,'ALAIN');
+
+eval CREATE TABLE `tbl_b` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `last_name` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`ID`)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+INSERT INTO `tbl_b` VALUES (1,'DEMONGEOT'),(2,'VAROQUI');
+
+eval CREATE TABLE `tbl_c` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `surname` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+INSERT INTO `tbl_c` VALUES (1,'CON'),(2,'MOYEN'),(3,'MOYEN2');
+
+SELECT * from tbl_b JOIN tbl_c ON tbl_b.id = tbl_c.id LEFT OUTER JOIN tbl_a ON tbl_a.id = tbl_b.id;
+
+--connection master_1
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+eval CREATE TABLE tbl_a (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `first_name` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a"'
+PARTITION BY LIST COLUMNS(`id`) (
+ PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+
+eval CREATE TABLE `tbl_b` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `last_name` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_b"'
+PARTITION BY LIST COLUMNS(`id`) (
+ PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+
+eval CREATE TABLE `tbl_c` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `surname` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_c"'
+PARTITION BY LIST COLUMNS(`id`) (
+ PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+
+SELECT * from tbl_b JOIN tbl_c ON tbl_b.id = tbl_c.id LEFT OUTER JOIN tbl_a ON tbl_a.id = tbl_b.id;
+
+--connection master_1
+DROP DATABASE auto_test_local;
+
+--connection child2_1
+DROP DATABASE auto_test_remote;
+
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_26013.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_26013.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_26013.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_26013.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_26013.test
new file mode 100644
index 00000000000..e31041c3bf1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_26013.test
@@ -0,0 +1,51 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+
+--echo
+--echo MDEV-26013 distinct not work properly in some cases for spider tables
+--echo
+
+--connection child2_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ `a`int,
+ `b`int,
+ PRIMARY KEY (`a`)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+insert into `tbl_a` VALUES (1,999), (2,999);
+
+--connection master_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ `a`int,
+ `b`int,
+ PRIMARY KEY (`a`)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a"' PARTITION BY LIST COLUMNS(`a`) (
+ PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+
+--connection master_1
+SELECT distinct b FROM tbl_a WHERE b=999;
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_remote;
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf
new file mode 100644
index 00000000000..b0853e32654
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf
@@ -0,0 +1,2 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test
new file mode 100644
index 00000000000..9d3922b2c48
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test
@@ -0,0 +1,31 @@
+--echo #
+--echo # MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) ||
+--echo # ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) &&
+--echo # ((unsigned long) old_end & (pagesize - 1)) == 0)' failed,
+--echo # Assertion `str.alloced_length() >= str.length() + data_len' failed
+--echo #
+
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+
+--connection master_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+CREATE TABLE tbl_a (a FLOAT) ENGINE=SPIDER;
+
+--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
+INSERT INTO tbl_a VALUES
+ (0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE),
+ (0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE);
+
+DROP DATABASE auto_test_remote;
+
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
diff --git a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.cnf b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test
new file mode 100644
index 00000000000..2beb9d9d7e4
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test
@@ -0,0 +1,98 @@
+--source ../include/return_found_rows_insert_init.inc
+--echo
+--echo this test is for MDEV-18973
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ skey int NOT NULL,
+ dt date NOT NULL,
+ tm time NOT NULL,
+ PRIMARY KEY (skey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ skey int NOT NULL,
+ dt date NOT NULL,
+ tm time NOT NULL,
+ PRIMARY KEY (skey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2012-01-01', '12:00:00'),(1, '2012-02-01', '12:00:00'),(2, '2012-03-01', '12:00:00'),(3, '2012-04-01', '12:00:00'),(4, '2012-05-01', '12:00:00'),(5, '2012-06-01', '12:00:00'),(6, '2012-07-01', '12:00:00'),(7, '2012-08-01', '12:00:00'),(8, '2012-09-01', '12:00:00'),(9, '2012-10-01', '12:00:00');
+FLUSH TABLES;
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--disable_query_log
+echo MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "MASTER_1_SET_COMMAND INSERT IGNORE INTO tbl_a (skey, dt, tm) VALUES (0, '2013-01-01', '13:00:00'),(2, '2013-02-01', '13:00:00'),(4, '2013-03-01', '13:00:00'),(7, '2013-04-01', '13:00:00'),(8, '2013-05-01', '13:00:00'),(10, '2013-06-01', '13:00:00'),(11, '2013-07-01', '13:00:00'),(12, '2013-08-01', '13:00:00'),(13, '2013-09-01', '13:00:00'),(14, '2013-10-01', '13:00:00')" auto_test_local;
+exec $MYSQL -v -v -u root -h localhost -P $MASTER_1_MYPORT -S $MASTER_1_MYSOCK -e "$MASTER_1_SET_COMMAND INSERT IGNORE INTO tbl_a (skey, dt, tm) VALUES (0, '2013-01-01', '13:00:00'),(2, '2013-02-01', '13:00:00'),(4, '2013-03-01', '13:00:00'),(7, '2013-04-01', '13:00:00'),(8, '2013-05-01', '13:00:00'),(10, '2013-06-01', '13:00:00'),(11, '2013-07-01', '13:00:00'),(12, '2013-08-01', '13:00:00'),(13, '2013-09-01', '13:00:00'),(14, '2013-10-01', '13:00:00')" auto_test_local;
+--enable_query_log
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+TRUNCATE TABLE mysql.general_log;
+
+--disable_query_log
+echo MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "MASTER_1_SET_COMMAND REPLACE INTO tbl_a (skey, dt, tm) VALUES (1, '2012-02-01', '12:00:00'),(3, '2012-12-01', '11:00:00'),(8, '2012-11-30', '11:00:00'),(9, '2012-11-29', '11:00:00'),(10, '2012-11-28', '11:00:00'),(15, '2012-11-27', '11:00:00'),(16, '2012-11-26', '11:00:00'),(17, '2012-11-25', '11:00:00'),(18, '2012-11-24', '11:00:00'),(19, '2012-11-23', '11:00:00')" auto_test_local;
+exec $MYSQL -v -v -u root -h localhost -P $MASTER_1_MYPORT -S $MASTER_1_MYSOCK -e "$MASTER_1_SET_COMMAND REPLACE INTO tbl_a (skey, dt, tm) VALUES (1, '2012-02-01', '12:00:00'),(3, '2012-12-01', '11:00:00'),(8, '2012-11-30', '11:00:00'),(9, '2012-11-29', '11:00:00'),(10, '2012-11-28', '11:00:00'),(15, '2012-11-27', '11:00:00'),(16, '2012-11-26', '11:00:00'),(17, '2012-11-25', '11:00:00'),(18, '2012-11-24', '11:00:00'),(19, '2012-11-23', '11:00:00')" auto_test_local;
+--enable_query_log
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+TRUNCATE TABLE mysql.general_log;
+
+--disable_query_log
+echo MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "MASTER_1_SET_COMMAND INSERT INTO tbl_a (skey, dt, tm) VALUES (1, '2012-11-01', '11:00:00'),(3, '2012-12-01', '11:00:00'),(11, '2012-11-30', '11:00:00'),(15, '2012-11-29', '11:00:00'),(16, '2012-11-28', '11:00:00'),(20, '2012-11-27', '11:00:00'),(21, '2012-11-26', '11:00:00'),(22, '2012-11-25', '11:00:00'),(23, '2012-11-24', '11:00:00'),(24, '2012-11-23', '11:00:00') ON DUPLICATE KEY UPDATE dt=VALUE(dt), tm=VALUE(tm)" auto_test_local;
+exec $MYSQL -v -v -u root -h localhost -P $MASTER_1_MYPORT -S $MASTER_1_MYSOCK -e "$MASTER_1_SET_COMMAND INSERT INTO tbl_a (skey, dt, tm) VALUES (1, '2012-11-01', '11:00:00'),(3, '2012-12-01', '11:00:00'),(11, '2012-11-30', '11:00:00'),(15, '2012-11-29', '11:00:00'),(16, '2012-11-28', '11:00:00'),(20, '2012-11-27', '11:00:00'),(21, '2012-11-26', '11:00:00'),(22, '2012-11-25', '11:00:00'),(23, '2012-11-24', '11:00:00'),(24, '2012-11-23', '11:00:00') ON DUPLICATE KEY UPDATE dt=VALUE(dt), tm=VALUE(tm)" auto_test_local;
+--enable_query_log
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/return_found_rows_insert_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.cnf b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test
new file mode 100644
index 00000000000..50d9f345dfb
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test
@@ -0,0 +1,78 @@
+--source ../include/return_found_rows_update_init.inc
+--echo
+--echo this test is for MDEV-18973
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ skey int NOT NULL,
+ dt date NOT NULL,
+ tm time NOT NULL,
+ KEY idx1 (skey,dt)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ skey int NOT NULL,
+ dt date NOT NULL,
+ tm time NOT NULL,
+ KEY idx1 (skey,dt)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2012-01-01', '12:00:00'),(1, '2012-02-01', '12:00:00'),(2, '2012-03-01', '12:00:00'),(3, '2012-04-01', '12:00:00'),(4, '2012-05-01', '12:00:00'),(5, '2012-06-01', '12:00:00'),(6, '2012-07-01', '12:00:00'),(7, '2012-08-01', '12:00:00'),(8, '2012-09-01', '12:00:00'),(9, '2012-10-01', '12:00:00');
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2013-01-01', '13:00:00'),(1, '2013-02-01', '13:00:00'),(2, '2013-03-01', '13:00:00'),(3, '2013-04-01', '13:00:00'),(4, '2013-05-01', '13:00:00'),(5, '2013-06-01', '13:00:00'),(6, '2013-07-01', '13:00:00'),(7, '2013-08-01', '13:00:00'),(8, '2013-09-01', '13:00:00'),(9, '2013-10-01', '13:00:00');
+INSERT INTO tbl_a (skey, dt, tm) VALUES (0, '2012-11-01', '11:00:00'),(1, '2012-12-01', '11:00:00'),(2, '2012-11-30', '11:00:00'),(3, '2012-11-29', '11:00:00'),(4, '2012-11-28', '11:00:00'),(5, '2012-11-27', '11:00:00'),(6, '2012-11-26', '11:00:00'),(7, '2012-11-25', '11:00:00'),(8, '2012-11-24', '11:00:00'),(9, '2012-11-23', '11:00:00');
+FLUSH TABLES;
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--disable_query_log
+echo MYSQL -v -v -u root -h localhost -P MASTER_1_MYPORT -S MASTER_1_MYSOCK -e "UPDATE tbl_a SET tm = '12:00:00' WHERE skey = 0" auto_test_local;
+exec $MYSQL -v -v -u root -h localhost --default-character-set=latin1 -P $MASTER_1_MYPORT -S $MASTER_1_MYSOCK -e "UPDATE tbl_a SET tm = '12:00:00' WHERE skey = 0" auto_test_local;
+--enable_query_log
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/return_found_rows_update_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/same_server_link.cnf b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.cnf
new file mode 100644
index 00000000000..b0853e32654
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.cnf
@@ -0,0 +1,2 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/same_server_link.test b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.test
new file mode 100644
index 00000000000..1468f00cd1c
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.test
@@ -0,0 +1,55 @@
+--source ../include/same_server_link_init.inc
+--echo
+--echo this test is for MDEV-6268
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+--enable_warnings
+
+--echo
+--echo create table
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+echo CREATE TABLE tbl_b (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_b (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE2 $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+
+--echo
+--echo select test 1
+
+--connection master_1
+--disable_result_log
+--error 12720
+INSERT INTO tbl_a VALUES(1);
+--enable_result_log
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--enable_warnings
+--source ../include/same_server_link_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.cnf b/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test b/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test
new file mode 100644
index 00000000000..4c4d687cf89
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test
@@ -0,0 +1,74 @@
+--source ../include/select_with_backquote_init.inc
+--echo
+--echo this test is for MDEV-17204
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ txt_utf8 char(8) NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE DEFAULT CHARACTER SET utf8 MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ txt_utf8 char(8) NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE DEFAULT CHARACTER SET utf8 $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey,txt_utf8) VALUES (0,'01234567'),(1,'12345678'),(2,'23456789'),(3,'34567890'),(4,'45678901'),(5,'56789012'),(6,'67890123'),(7,'78901234'),(8,'89012345'),(9,'90123456');
+FLUSH TABLES;
+
+--echo
+--echo test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SET NAMES utf8;
+SELECT `pkey`, LEFT(`txt_utf8`, 4) FROM `auto_test_local`.`tbl_a` ORDER BY LEFT(`txt_utf8`, 4) LIMIT 3;
+
+--connection child2_1
+SET NAMES utf8;
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/select_with_backquote_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.cnf b/storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.cnf
new file mode 100644
index 00000000000..c861d27b01d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.cnf
@@ -0,0 +1,6 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_4_1.cnf
+[mysqld.4.1]
+slave_transaction_retry_errors="10000,20000,30000"
diff --git a/storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.test b/storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.test
new file mode 100644
index 00000000000..fc91a43eeb0
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/slave_transaction_retry_errors_5digit.test
@@ -0,0 +1,9 @@
+--source ../include/slave_transaction_retry_errors_5digit_init.inc
+--echo
+
+--connection slave1_1
+SHOW VARIABLES LIKE 'slave_transaction_retry_errors';
+
+--source ../include/slave_transaction_retry_errors_5digit_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.cnf b/storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.cnf
new file mode 100644
index 00000000000..b0853e32654
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.cnf
@@ -0,0 +1,2 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.test b/storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.test
new file mode 100644
index 00000000000..7213017505b
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/spider_table_sts.test
@@ -0,0 +1,46 @@
+--source ../include/spider_table_sts_init.inc
+--echo
+--echo this test is for MDEV-19842
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+--enable_warnings
+
+--echo
+--echo create table
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+
+--echo
+--echo select test 1
+
+--connection master_1
+--error 12609
+SELECT pkey FROM tbl_a;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+--error 12609
+DROP DATABASE IF EXISTS auto_test_local;
+
+--enable_warnings
+--source ../include/spider_table_sts_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc b/storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc
new file mode 100644
index 00000000000..ae7c15c5081
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc
@@ -0,0 +1,65 @@
+--echo
+--echo this test is for MDEV-16508
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+--echo
+--echo select test
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SELECT * FROM tbl_a ORDER BY pkey;
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.cnf b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.test b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.test
new file mode 100644
index 00000000000..c63514d22f0
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mariadb.test
@@ -0,0 +1,5 @@
+--source ../include/sql_mode_mariadb_init.inc
+--source sql_mode.inc
+--source ../include/sql_mode_mariadb_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.cnf b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.test b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.test
new file mode 100644
index 00000000000..3a0f8d20da3
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/sql_mode_mysql.test
@@ -0,0 +1,5 @@
+--source ../include/sql_mode_mysql_init.inc
+--source sql_mode.inc
+--source ../include/sql_mode_mysql_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/wait_timeout.cnf b/storage/spider/mysql-test/spider/bugfix/t/wait_timeout.cnf
new file mode 100644
index 00000000000..e0ffb99c38e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/wait_timeout.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_2_2.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/wait_timeout.test b/storage/spider/mysql-test/spider/bugfix/t/wait_timeout.test
new file mode 100644
index 00000000000..8da6e8fe314
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/wait_timeout.test
@@ -0,0 +1,109 @@
+--source ../include/wait_timeout_init.inc
+--echo
+--echo this test is for MDEV-16530
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--connection child2_1_2
+USE auto_test_remote;
+
+--connection child2_2
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+--connection child2_2_2
+USE auto_test_remote2;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+--disable_query_log
+echo CHILD2_2_CREATE_TABLES;
+eval $CHILD2_2_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a READ;
+
+--connection child2_2
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+send_eval INSERT INTO tbl_a SELECT pkey + 30 FROM tbl_a ORDER BY pkey;
+
+--connection child2_1_2
+SELECT SLEEP(2);
+eval $CHILD2_1_SELECT_ARGUMENT1;
+
+--connection child2_2_2
+eval $CHILD2_2_SELECT_ARGUMENT1;
+
+--connection child2_1
+UNLOCK TABLES;
+eval $CHILD2_1_SELECT_TABLES;
+
+--connection child2_2
+eval $CHILD2_2_SELECT_TABLES;
+
+--connection master_1
+reap;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--connection child2_2
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/wait_timeout_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.cnf b/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.cnf
new file mode 100644
index 00000000000..05dfd8a0bce
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test b/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test
new file mode 100644
index 00000000000..9ae528071e3
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test
@@ -0,0 +1,69 @@
+--source ../include/xa_cmd_init.inc
+--echo
+--echo this test is for MDEV-19794
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+XA START 'test';
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+XA END 'test';
+XA PREPARE 'test';
+XA COMMIT 'test';
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/xa_cmd_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc
new file mode 100644
index 00000000000..52b0625ed9a
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc
@@ -0,0 +1,16 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP
+--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP
+--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP
+--connection master_1
+set session spider_bgs_mode= @old_spider_bgs_mode;
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc
new file mode 100644
index 00000000000..799bd983393
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc
@@ -0,0 +1 @@
+--source checksum_table_parallel_deinit.inc
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc
new file mode 100644
index 00000000000..f17a532d53b
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc
@@ -0,0 +1,2 @@
+--source checksum_table_parallel_init.inc
+--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a EXTENDED
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc
new file mode 100644
index 00000000000..7aab82515a0
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc
@@ -0,0 +1,53 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+if (!$HAVE_PARTITION)
+{
+ --source checksum_table_parallel_deinit.inc
+ --enable_result_log
+ --enable_query_log
+ --enable_warnings
+ skip Test requires partitioning;
+}
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a"'
+ PARTITION BY KEY(pkey) (
+ PARTITION pt1 COMMENT='srv "s_2_1"',
+ PARTITION pt2 COMMENT='srv "s_2_2"'
+ );
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES
+let $CHILD2_2_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES
+let $CHILD2_2_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
+--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES
+let $CHILD2_2_SELECT_TABLES=
+ SELECT pkey FROM tbl_a ORDER BY pkey;
+let $CHILD2_2_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+--connection master_1
+set @old_spider_bgs_mode= @@spider_bgs_mode;
+set session spider_bgs_mode= 1;
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc
new file mode 100644
index 00000000000..799bd983393
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc
@@ -0,0 +1 @@
+--source checksum_table_parallel_deinit.inc
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc
new file mode 100644
index 00000000000..230b6432a01
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc
@@ -0,0 +1,2 @@
+--source checksum_table_parallel_init.inc
+--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc
new file mode 100644
index 00000000000..799bd983393
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc
@@ -0,0 +1 @@
+--source checksum_table_parallel_deinit.inc
diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc
new file mode 100644
index 00000000000..66f6ecbe0ef
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc
@@ -0,0 +1,2 @@
+--source checksum_table_parallel_init.inc
+--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a QUICK
diff --git a/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_deinit.inc b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_deinit.inc
new file mode 100644
index 00000000000..5ac67cdf783
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_deinit.inc
@@ -0,0 +1,10 @@
+--connection slave1_1
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../include/deinit_spider.inc
+--source ../t/slave_test_deinit.inc
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_init.inc b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_init.inc
new file mode 100644
index 00000000000..052d6ebb2eb
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/include/slave_transaction_retry_errors_init.inc
@@ -0,0 +1,10 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--source ../t/slave_test_init.inc
+--connection slave1_1
+--source ../include/init_spider.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/feature/my.cnf b/storage/spider/mysql-test/spider/feature/my.cnf
new file mode 100644
index 00000000000..b7f76a630cc
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my.cnf
@@ -0,0 +1,2 @@
+!include include/default_mysqld.cnf
+!include my_1_1.cnf
diff --git a/storage/spider/mysql-test/spider/feature/my_1_1.cnf b/storage/spider/mysql-test/spider/feature/my_1_1.cnf
new file mode 100644
index 00000000000..5f17295d895
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_1_1.cnf
@@ -0,0 +1,44 @@
+[mysqld.1.1]
+log-bin= master-bin
+loose_handlersocket_port= 20000
+loose_handlersocket_port_wr= 20001
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+loose_partition= 1
+
+[ENV]
+USE_GEOMETRY_TEST= 1
+USE_FULLTEXT_TEST= 1
+USE_HA_TEST= 1
+USE_GENERAL_LOG= 1
+USE_REPLICATION= 1
+MASTER_1_MYPORT= @mysqld.1.1.port
+MASTER_1_HSRPORT= 20000
+MASTER_1_HSWPORT= 20001
+MASTER_1_MYSOCK= @mysqld.1.1.socket
+MASTER_1_ENGINE_TYPE= Spider
+#MASTER_1_ENGINE_TYPE= MyISAM
+MASTER_1_ENGINE= ENGINE=Spider
+MASTER_1_CHARSET= DEFAULT CHARSET=utf8
+MASTER_1_ENGINE2= ENGINE=MyISAM
+MASTER_1_CHARSET2= DEFAULT CHARSET=utf8
+MASTER_1_CHARSET3= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
+
+STR_SEMICOLON= ;
+
+#The followings are set in include/init_xxx.inc files
+# MASTER_1_COMMENT_2_1
+# MASTER_1_COMMENT2_2_1
+# MASTER_1_COMMENT3_2_1
+# MASTER_1_COMMENT4_2_1
+# MASTER_1_COMMENT5_2_1
+# MASTER_1_COMMENT_P_2_1
diff --git a/storage/spider/mysql-test/spider/feature/my_2_1.cnf b/storage/spider/mysql-test/spider/feature/my_2_1.cnf
new file mode 100644
index 00000000000..24161645607
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_2_1.cnf
@@ -0,0 +1,56 @@
+[mysqld.2.1]
+loose_handlersocket_port= 20002
+loose_handlersocket_port_wr= 20003
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+
+[ENV]
+USE_CHILD_GROUP2= 1
+OUTPUT_CHILD_GROUP2= 0
+CHILD2_1_MYPORT= @mysqld.2.1.port
+CHILD2_1_HSRPORT= 20002
+CHILD2_1_HSWPORT= 20003
+CHILD2_1_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_ENGINE_TYPE= InnoDB
+CHILD2_1_ENGINE= ENGINE=InnoDB
+CHILD2_1_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_1_CHARSET2= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
+CHILD2_1_FT_MYPORT= @mysqld.2.1.port
+CHILD2_1_FT_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_FT_ENGINE_TYPE= MyISAM
+CHILD2_1_FT_ENGINE= ENGINE=MyISAM
+CHILD2_1_FT_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_1_GM_MYPORT= @mysqld.2.1.port
+CHILD2_1_GM_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_GM_ENGINE_TYPE= MyISAM
+CHILD2_1_GM_ENGINE= ENGINE=MyISAM
+CHILD2_1_GM_CHARSET= DEFAULT CHARSET=utf8
+
+#The followings are set in include/init_xxx.inc files
+# CHILD2_1_DROP_TABLES
+# CHILD2_1_CREATE_TABLES
+# CHILD2_1_SELECT_TABLES
+# CHILD2_1_DROP_TABLES2
+# CHILD2_1_CREATE_TABLES2
+# CHILD2_1_SELECT_TABLES2
+# CHILD2_1_DROP_TABLES3
+# CHILD2_1_CREATE_TABLES3
+# CHILD2_1_SELECT_TABLES3
+# CHILD2_1_DROP_TABLES4
+# CHILD2_1_CREATE_TABLES4
+# CHILD2_1_SELECT_TABLES4
+# CHILD2_1_DROP_TABLES5
+# CHILD2_1_CREATE_TABLES5
+# CHILD2_1_SELECT_TABLES5
+# CHILD2_1_DROP_TABLES6
+# CHILD2_1_CREATE_TABLES6
+# CHILD2_1_SELECT_TABLES6
diff --git a/storage/spider/mysql-test/spider/feature/my_2_2.cnf b/storage/spider/mysql-test/spider/feature/my_2_2.cnf
new file mode 100644
index 00000000000..2d3c2a89a7d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_2_2.cnf
@@ -0,0 +1,38 @@
+[mysqld.2.2]
+loose_handlersocket_port= 20004
+loose_handlersocket_port_wr= 20005
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+
+[ENV]
+CHILD2_2_MYPORT= @mysqld.2.2.port
+CHILD2_2_HSRPORT= 20004
+CHILD2_2_HSWPORT= 20005
+CHILD2_2_MYSOCK= @mysqld.2.2.socket
+CHILD2_2_ENGINE_TYPE= InnoDB
+CHILD2_2_ENGINE= ENGINE=InnoDB
+CHILD2_2_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_2_FT_MYPORT= @mysqld.2.2.port
+CHILD2_2_FT_MYSOCK= @mysqld.2.2.socket
+CHILD2_2_FT_ENGINE_TYPE= MyISAM
+CHILD2_2_FT_ENGINE= ENGINE=MyISAM
+CHILD2_2_FT_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_2_GM_MYPORT= @mysqld.2.2.port
+CHILD2_2_GM_MYSOCK= @mysqld.2.2.socket
+CHILD2_2_GM_ENGINE_TYPE= MyISAM
+CHILD2_2_GM_ENGINE= ENGINE=MyISAM
+CHILD2_2_GM_CHARSET= DEFAULT CHARSET=utf8
+
+#The followings are set in include/init_xxx.inc files
+# CHILD2_2_DROP_TABLES
+# CHILD2_2_CREATE_TABLES
+# CHILD2_2_SELECT_TABLES
diff --git a/storage/spider/mysql-test/spider/feature/my_2_3.cnf b/storage/spider/mysql-test/spider/feature/my_2_3.cnf
new file mode 100644
index 00000000000..024da651e0c
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_2_3.cnf
@@ -0,0 +1,8 @@
+[mysqld.2.3]
+
+[ENV]
+CHILD2_3_MYPORT= @mysqld.2.3.port
+CHILD2_3_MYSOCK= @mysqld.2.3.socket
+CHILD2_3_ENGINE_TYPE= InnoDB
+CHILD2_3_ENGINE= ENGINE=InnoDB
+CHILD2_3_CHARSET= DEFAULT CHARSET=utf8
diff --git a/storage/spider/mysql-test/spider/feature/my_3_1.cnf b/storage/spider/mysql-test/spider/feature/my_3_1.cnf
new file mode 100644
index 00000000000..fad21607789
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_3_1.cnf
@@ -0,0 +1,11 @@
+[mysqld.3.1]
+loose_partition= 1
+
+[ENV]
+USE_CHILD_GROUP3= 1
+OUTPUT_CHILD_GROUP3= 0
+CHILD3_1_MYPORT= @mysqld.3.1.port
+CHILD3_1_MYSOCK= @mysqld.3.1.socket
+CHILD3_1_ENGINE_TYPE= InnoDB
+CHILD3_1_ENGINE= ENGINE=InnoDB
+CHILD3_1_CHARSET= DEFAULT CHARSET=utf8
diff --git a/storage/spider/mysql-test/spider/feature/my_3_2.cnf b/storage/spider/mysql-test/spider/feature/my_3_2.cnf
new file mode 100644
index 00000000000..6f027b6f525
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_3_2.cnf
@@ -0,0 +1,9 @@
+[mysqld.3.2]
+loose_partition= 1
+
+[ENV]
+CHILD3_2_MYPORT= @mysqld.3.2.port
+CHILD3_2_MYSOCK= @mysqld.3.2.socket
+CHILD3_2_ENGINE_TYPE= InnoDB
+CHILD3_2_ENGINE= ENGINE=InnoDB
+CHILD3_2_CHARSET= DEFAULT CHARSET=utf8
diff --git a/storage/spider/mysql-test/spider/feature/my_3_3.cnf b/storage/spider/mysql-test/spider/feature/my_3_3.cnf
new file mode 100644
index 00000000000..fbb33694738
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_3_3.cnf
@@ -0,0 +1,9 @@
+[mysqld.3.3]
+loose_partition= 1
+
+[ENV]
+CHILD3_3_MYPORT= @mysqld.3.3.port
+CHILD3_3_MYSOCK= @mysqld.3.3.socket
+CHILD3_3_ENGINE_TYPE= InnoDB
+CHILD3_3_ENGINE= ENGINE=InnoDB
+CHILD3_3_CHARSET= DEFAULT CHARSET=utf8
diff --git a/storage/spider/mysql-test/spider/feature/my_4_1.cnf b/storage/spider/mysql-test/spider/feature/my_4_1.cnf
new file mode 100644
index 00000000000..d1812a48b68
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/my_4_1.cnf
@@ -0,0 +1,9 @@
+[mysqld.4.1]
+loose_partition= 1
+
+[ENV]
+SLAVE1_1_MYPORT= @mysqld.4.1.port
+SLAVE1_1_MYSOCK= @mysqld.4.1.socket
+SLAVE1_1_ENGINE_TYPE= MyISAM
+SLAVE1_1_ENGINE= ENGINE=MyISAM
+SLAVE1_1_CHARSET= DEFAULT CHARSET=utf8
diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result
new file mode 100644
index 00000000000..34587052181
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result
@@ -0,0 +1,130 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_bgs_mode= @@spider_bgs_mode;
+set session spider_bgs_mode= 1;
+
+this test is for MDEV-16967
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_1_2;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+connection child2_2_2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+connection master_1;
+CHECKSUM TABLE tbl_a EXTENDED;
+connection child2_1_2;
+SELECT SLEEP(1);
+SLEEP(1)
+0
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+argument
+checksum table `auto_test_remote`.`tbl_a` extended
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
+connection child2_2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+argument
+checksum table `auto_test_remote2`.`tbl_a` extended
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
+connection child2_1;
+UNLOCK TABLES;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+1
+3
+5
+7
+9
+11
+13
+15
+17
+19
+21
+23
+25
+27
+29
+connection child2_2;
+UNLOCK TABLES;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+2
+4
+6
+8
+10
+12
+14
+16
+18
+20
+22
+24
+26
+28
+connection master_1;
+Table Checksum
+auto_test_local.tbl_a 1061386331
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_bgs_mode= @old_spider_bgs_mode;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result
new file mode 100644
index 00000000000..4e44bd4cc73
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result
@@ -0,0 +1,128 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_bgs_mode= @@spider_bgs_mode;
+set session spider_bgs_mode= 1;
+
+this test is for MDEV-16967
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_1_2;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+connection child2_2_2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+connection master_1;
+CHECKSUM TABLE tbl_a;
+connection child2_1_2;
+SELECT SLEEP(1);
+SLEEP(1)
+0
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+argument
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
+connection child2_2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+argument
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
+connection child2_1;
+UNLOCK TABLES;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+1
+3
+5
+7
+9
+11
+13
+15
+17
+19
+21
+23
+25
+27
+29
+connection child2_2;
+UNLOCK TABLES;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+2
+4
+6
+8
+10
+12
+14
+16
+18
+20
+22
+24
+26
+28
+connection master_1;
+Table Checksum
+auto_test_local.tbl_a NULL
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_bgs_mode= @old_spider_bgs_mode;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result
new file mode 100644
index 00000000000..b2c55b34130
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result
@@ -0,0 +1,128 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_bgs_mode= @@spider_bgs_mode;
+set session spider_bgs_mode= 1;
+
+this test is for MDEV-16967
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_1_2;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+connection child2_2_2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+connection master_1;
+CHECKSUM TABLE tbl_a QUICK;
+connection child2_1_2;
+SELECT SLEEP(1);
+SLEEP(1)
+0
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+argument
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
+connection child2_2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
+argument
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
+connection child2_1;
+UNLOCK TABLES;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+1
+3
+5
+7
+9
+11
+13
+15
+17
+19
+21
+23
+25
+27
+29
+connection child2_2;
+UNLOCK TABLES;
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+2
+4
+6
+8
+10
+12
+14
+16
+18
+20
+22
+24
+26
+28
+connection master_1;
+Table Checksum
+auto_test_local.tbl_a NULL
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_bgs_mode= @old_spider_bgs_mode;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result b/storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result
new file mode 100644
index 00000000000..0a147c0356a
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result
@@ -0,0 +1,22 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+for slave1_1
+
+connection slave1_1;
+SHOW VARIABLES LIKE 'slave_transaction_retry_errors';
+Variable_name Value
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701
+connection slave1_1;
+for slave1_1
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/feature/suite.opt b/storage/spider/mysql-test/spider/feature/suite.opt
new file mode 100644
index 00000000000..672a3b37d4f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/suite.opt
@@ -0,0 +1 @@
+--loose-innodb --loose-skip-performance-schema
diff --git a/storage/spider/mysql-test/spider/feature/suite.pm b/storage/spider/mysql-test/spider/feature/suite.pm
new file mode 100644
index 00000000000..171fa6c4f01
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/suite.pm
@@ -0,0 +1,11 @@
+package My::Suite::Spider;
+
+@ISA = qw(My::Suite);
+
+return "No Spider engine" unless $ENV{HA_SPIDER_SO};
+return "Not run for embedded server" if $::opt_embedded_server;
+
+sub is_default { 1 }
+
+bless { };
+
diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc
new file mode 100644
index 00000000000..13e5053d64c
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc
@@ -0,0 +1,107 @@
+--echo
+--echo this test is for MDEV-16967
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--connection child2_1_2
+USE auto_test_remote;
+
+--connection child2_2
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+--connection child2_2_2
+USE auto_test_remote2;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+--disable_query_log
+echo CHILD2_2_CREATE_TABLES;
+eval $CHILD2_2_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+
+--connection child2_2
+TRUNCATE TABLE mysql.general_log;
+LOCK TABLE tbl_a WRITE;
+
+--connection master_1
+send_eval $MASTER_1_CHECKSUM_TABLE;
+
+--connection child2_1_2
+SELECT SLEEP(1);
+eval $CHILD2_1_SELECT_ARGUMENT1;
+
+--connection child2_2_2
+eval $CHILD2_2_SELECT_ARGUMENT1;
+
+--connection child2_1
+UNLOCK TABLES;
+eval $CHILD2_1_SELECT_TABLES;
+
+--connection child2_2
+UNLOCK TABLES;
+eval $CHILD2_2_SELECT_TABLES;
+
+--connection master_1
+reap;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--connection child2_2
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf
new file mode 100644
index 00000000000..e0ffb99c38e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_2_2.cnf
diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test
new file mode 100644
index 00000000000..871e1e868ad
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test
@@ -0,0 +1,5 @@
+--source ../include/checksum_table_parallel_extended_init.inc
+--source checksum_table_parallel.inc
+--source ../include/checksum_table_parallel_extended_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf
new file mode 100644
index 00000000000..e0ffb99c38e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_2_2.cnf
diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test
new file mode 100644
index 00000000000..0352d598df6
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test
@@ -0,0 +1,5 @@
+--source ../include/checksum_table_parallel_no_opt_init.inc
+--source checksum_table_parallel.inc
+--source ../include/checksum_table_parallel_no_opt_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf
new file mode 100644
index 00000000000..e0ffb99c38e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_2_2.cnf
diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test
new file mode 100644
index 00000000000..f08f782e7c0
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test
@@ -0,0 +1,5 @@
+--source ../include/checksum_table_parallel_quick_init.inc
+--source checksum_table_parallel.inc
+--source ../include/checksum_table_parallel_quick_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.cnf b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.cnf
new file mode 100644
index 00000000000..45019d6c537
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
+!include ../my_4_1.cnf
diff --git a/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.test b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.test
new file mode 100644
index 00000000000..436bc3fb761
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/slave_transaction_retry_errors.test
@@ -0,0 +1,9 @@
+--source ../include/slave_transaction_retry_errors_init.inc
+--echo
+
+--connection slave1_1
+SHOW VARIABLES LIKE 'slave_transaction_retry_errors';
+
+--source ../include/slave_transaction_retry_errors_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_deinit.inc b/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_deinit.inc
index d551f5a4af3..7db871c700f 100644
--- a/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_deinit.inc
+++ b/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_deinit.inc
@@ -1,5 +1,3 @@
---let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
---let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
--let $OUTPUT_CHILD_GROUP2= $OUTPUT_CHILD_GROUP2_BACKUP
diff --git a/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc b/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc
index 9ec61a1cb77..0bb12d8f874 100644
--- a/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc
+++ b/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc
@@ -21,7 +21,7 @@ let $CHILD2_1_CREATE_TABLES=
let $CHILD2_1_SELECT_TABLES=
SELECT pkey FROM tbl_a ORDER BY pkey;
let $CHILD2_1_SELECT_ARGUMENT1=
- SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
--let $OUTPUT_CHILD_GROUP2_BACKUP= $OUTPUT_CHILD_GROUP2
--let $OUTPUT_CHILD_GROUP2= 1
--let $USE_GENERAL_LOG_BACKUP= $USE_GENERAL_LOG
diff --git a/storage/spider/mysql-test/spider/include/deinit_spider.inc b/storage/spider/mysql-test/spider/include/deinit_spider.inc
index 3609551e169..51cc075edaa 100644
--- a/storage/spider/mysql-test/spider/include/deinit_spider.inc
+++ b/storage/spider/mysql-test/spider/include/deinit_spider.inc
@@ -1,8 +1,39 @@
-DROP FUNCTION spider_direct_sql;
-DROP FUNCTION spider_bg_direct_sql;
-DROP FUNCTION spider_ping_table;
-DROP FUNCTION spider_copy_tables;
+let $SERVER_NAME=
+ `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(version(), '-', 2), '-', -1)`;
+let $SERVER_MAJOR_VERSION=
+ `SELECT SUBSTRING_INDEX(version(), '.', 1)`;
+let $SERVER_MINOR_VERSION=
+ `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(version(), '.', 2), '.', -1)`;
+let $PLUGIN_VERSION=
+ `SELECT SUBSTRING_INDEX(plugin_version, '.', 1)
+ FROM information_schema.plugins
+ WHERE plugin_name = 'SPIDER'`;
+if (`SELECT IF($PLUGIN_VERSION = 3, 1, 0)`)
+{
+ let $HAS_REWRITE=
+ `SELECT IF (STRCMP('$SERVER_NAME', 'MariaDB') = 0,
+ IF ($SERVER_MAJOR_VERSION = 10,
+ IF ($SERVER_MINOR_VERSION < 4, 0, 1),
+ IF ($SERVER_MAJOR_VERSION < 10, 0, 1)),
+ 0)`;
+ let $HAS_REWRITE= 0;
+ if ($HAS_REWRITE)
+ {
+ DROP FUNCTION spider_flush_rewrite_cache;
+ UNINSTALL PLUGIN spider_rewrite;
+ DROP TABLE IF EXISTS mysql.spider_rewrite_tables;
+ DROP TABLE IF EXISTS mysql.spider_rewrite_table_tables;
+ DROP TABLE IF EXISTS mysql.spider_rewrite_table_partitions;
+ DROP TABLE IF EXISTS mysql.spider_rewrite_table_subpartitions;
+ DROP TABLE IF EXISTS mysql.spider_rewritten_tables;
+ }
+}
DROP FUNCTION spider_flush_table_mon_cache;
+DROP FUNCTION spider_copy_tables;
+DROP FUNCTION spider_ping_table;
+DROP FUNCTION spider_bg_direct_sql;
+DROP FUNCTION spider_direct_sql;
+UNINSTALL PLUGIN spider_alloc_mem;
UNINSTALL PLUGIN spider;
DROP TABLE IF EXISTS mysql.spider_xa;
DROP TABLE IF EXISTS mysql.spider_xa_member;
@@ -13,9 +44,57 @@ DROP TABLE IF EXISTS mysql.spider_link_failed_log;
DROP TABLE IF EXISTS mysql.spider_table_position_for_recovery;
DROP TABLE IF EXISTS mysql.spider_table_sts;
DROP TABLE IF EXISTS mysql.spider_table_crd;
-DROP SERVER s_2_1;
-DROP SERVER s_2_2;
-DROP SERVER s_2_3;
-DROP SERVER s_3_1;
-DROP SERVER s_3_2;
-DROP SERVER s_3_3;
+if ($VERSION_COMPILE_OS_WIN)
+{
+ if ($CHILD2_1_MYPORT)
+ {
+ DROP SERVER s_2_1;
+ }
+ if ($CHILD2_2_MYPORT)
+ {
+ DROP SERVER s_2_2;
+ }
+ if ($CHILD2_3_MYPORT)
+ {
+ DROP SERVER s_2_3;
+ }
+ if ($CHILD3_1_MYPORT)
+ {
+ DROP SERVER s_3_1;
+ }
+ if ($CHILD3_2_MYPORT)
+ {
+ DROP SERVER s_3_2;
+ }
+ if ($CHILD2_3_MYPORT)
+ {
+ DROP SERVER s_3_3;
+ }
+}
+if (!$VERSION_COMPILE_OS_WIN)
+{
+ if ($CHILD2_1_MYSOCK)
+ {
+ DROP SERVER s_2_1;
+ }
+ if ($CHILD2_2_MYSOCK)
+ {
+ DROP SERVER s_2_2;
+ }
+ if ($CHILD2_3_MYSOCK)
+ {
+ DROP SERVER s_2_3;
+ }
+ if ($CHILD3_1_MYSOCK)
+ {
+ DROP SERVER s_3_1;
+ }
+ if ($CHILD3_2_MYSOCK)
+ {
+ DROP SERVER s_3_2;
+ }
+ if ($CHILD3_3_MYSOCK)
+ {
+ DROP SERVER s_3_3;
+ }
+}
diff --git a/storage/spider/mysql-test/spider/include/init_spider.inc b/storage/spider/mysql-test/spider/include/init_spider.inc
index 1da1ec970b5..69d1fae425e 100644
--- a/storage/spider/mysql-test/spider/include/init_spider.inc
+++ b/storage/spider/mysql-test/spider/include/init_spider.inc
@@ -3,104 +3,130 @@ let $VERSION_COMPILE_OS_WIN=
if ($VERSION_COMPILE_OS_WIN)
{
INSTALL PLUGIN spider SONAME 'ha_spider.dll';
- CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.dll';
- CREATE AGGREGATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.dll';
- CREATE FUNCTION spider_ping_table RETURNS INT SONAME 'ha_spider.dll';
- CREATE FUNCTION spider_copy_tables RETURNS INT SONAME 'ha_spider.dll';
- CREATE FUNCTION spider_flush_table_mon_cache RETURNS INT SONAME 'ha_spider.dll';
- eval CREATE SERVER s_2_1 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_remote',
- USER 'root',
- PASSWORD '',
- PORT $CHILD2_1_MYPORT
- );
- eval CREATE SERVER s_2_2 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_remote2',
- USER 'root',
- PASSWORD '',
- PORT $CHILD2_2_MYPORT
- );
- eval CREATE SERVER s_2_3 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_remote3',
- USER 'root',
- PASSWORD '',
- PORT $CHILD2_3_MYPORT
- );
- eval CREATE SERVER s_3_1 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_local',
- USER 'root',
- PASSWORD '',
- PORT $CHILD3_1_MYPORT
- );
- eval CREATE SERVER s_3_2 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_local',
- USER 'root',
- PASSWORD '',
- PORT $CHILD3_2_MYPORT
- );
- eval CREATE SERVER s_3_3 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_local',
- USER 'root',
- PASSWORD '',
- PORT $CHILD2_3_MYPORT
- );
+ if ($CHILD2_1_MYPORT)
+ {
+ eval CREATE SERVER s_2_1 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_remote',
+ USER 'root',
+ PASSWORD '',
+ PORT $CHILD2_1_MYPORT
+ );
+ }
+ if ($CHILD2_2_MYPORT)
+ {
+ eval CREATE SERVER s_2_2 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_remote2',
+ USER 'root',
+ PASSWORD '',
+ PORT $CHILD2_2_MYPORT
+ );
+ }
+ if ($CHILD2_3_MYPORT)
+ {
+ eval CREATE SERVER s_2_3 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_remote3',
+ USER 'root',
+ PASSWORD '',
+ PORT $CHILD2_3_MYPORT
+ );
+ }
+ if ($CHILD3_1_MYPORT)
+ {
+ eval CREATE SERVER s_3_1 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_local',
+ USER 'root',
+ PASSWORD '',
+ PORT $CHILD3_1_MYPORT
+ );
+ }
+ if ($CHILD3_2_MYPORT)
+ {
+ eval CREATE SERVER s_3_2 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_local',
+ USER 'root',
+ PASSWORD '',
+ PORT $CHILD3_2_MYPORT
+ );
+ }
+ if ($CHILD2_3_MYPORT)
+ {
+ eval CREATE SERVER s_3_3 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_local',
+ USER 'root',
+ PASSWORD '',
+ PORT $CHILD2_3_MYPORT
+ );
+ }
}
if (!$VERSION_COMPILE_OS_WIN)
{
INSTALL PLUGIN spider SONAME 'ha_spider.so';
- CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.so';
- CREATE AGGREGATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
- CREATE FUNCTION spider_ping_table RETURNS INT SONAME 'ha_spider.so';
- CREATE FUNCTION spider_copy_tables RETURNS INT SONAME 'ha_spider.so';
- CREATE FUNCTION spider_flush_table_mon_cache RETURNS INT SONAME 'ha_spider.so';
- eval CREATE SERVER s_2_1 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_remote',
- USER 'root',
- PASSWORD '',
- SOCKET '$CHILD2_1_MYSOCK'
- );
- eval CREATE SERVER s_2_2 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_remote2',
- USER 'root',
- PASSWORD '',
- SOCKET '$CHILD2_2_MYSOCK'
- );
- eval CREATE SERVER s_2_3 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_remote3',
- USER 'root',
- PASSWORD '',
- SOCKET '$CHILD2_3_MYSOCK'
- );
- eval CREATE SERVER s_3_1 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_local',
- USER 'root',
- PASSWORD '',
- SOCKET '$CHILD3_1_MYSOCK'
- );
- eval CREATE SERVER s_3_2 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_local',
- USER 'root',
- PASSWORD '',
- SOCKET '$CHILD3_2_MYSOCK'
- );
- eval CREATE SERVER s_3_3 FOREIGN DATA WRAPPER mysql OPTIONS (
- HOST 'localhost',
- DATABASE 'auto_test_local',
- USER 'root',
- PASSWORD '',
- SOCKET '$CHILD3_3_MYSOCK'
- );
+ if ($CHILD2_1_MYSOCK)
+ {
+ eval CREATE SERVER s_2_1 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_remote',
+ USER 'root',
+ PASSWORD '',
+ SOCKET '$CHILD2_1_MYSOCK'
+ );
+ }
+ if ($CHILD2_2_MYSOCK)
+ {
+ eval CREATE SERVER s_2_2 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_remote2',
+ USER 'root',
+ PASSWORD '',
+ SOCKET '$CHILD2_2_MYSOCK'
+ );
+ }
+ if ($CHILD2_3_MYSOCK)
+ {
+ eval CREATE SERVER s_2_3 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_remote3',
+ USER 'root',
+ PASSWORD '',
+ SOCKET '$CHILD2_3_MYSOCK'
+ );
+ }
+ if ($CHILD3_1_MYSOCK)
+ {
+ eval CREATE SERVER s_3_1 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_local',
+ USER 'root',
+ PASSWORD '',
+ SOCKET '$CHILD3_1_MYSOCK'
+ );
+ }
+ if ($CHILD3_2_MYSOCK)
+ {
+ eval CREATE SERVER s_3_2 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_local',
+ USER 'root',
+ PASSWORD '',
+ SOCKET '$CHILD3_2_MYSOCK'
+ );
+ }
+ if ($CHILD3_3_MYSOCK)
+ {
+ eval CREATE SERVER s_3_3 FOREIGN DATA WRAPPER mysql OPTIONS (
+ HOST 'localhost',
+ DATABASE 'auto_test_local',
+ USER 'root',
+ PASSWORD '',
+ SOCKET '$CHILD3_3_MYSOCK'
+ );
+ }
}
let $SERVER_NAME=
@@ -113,313 +139,34 @@ let $PLUGIN_VERSION=
`SELECT SUBSTRING_INDEX(plugin_version, '.', 1)
FROM information_schema.plugins
WHERE plugin_name = 'SPIDER'`;
-
-if (`SELECT IF($PLUGIN_VERSION = 1, 1, 0)`)
-{
- DROP TABLE IF EXISTS mysql.spider_xa;
- CREATE TABLE mysql.spider_xa(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data char(128) charset binary not null default '',
- status char(8) not null default '',
- PRIMARY KEY (data, format_id, gtrid_length),
- KEY idx1 (status)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_xa_member;
- CREATE TABLE mysql.spider_xa_member(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data char(128) charset binary not null default '',
- scheme char(64) not null default '',
- host char(64) not null default '',
- port char(5) not null default '',
- socket char(64) not null default '',
- username char(64) not null default '',
- password char(64) not null default '',
- PRIMARY KEY (data, format_id, gtrid_length, host, port, socket)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_tables;
- CREATE TABLE mysql.spider_tables(
- db_name char(64) not null default '',
- table_name char(64) not null default '',
- priority bigint not null default 0,
- server char(64) default null,
- scheme char(64) default null,
- host char(64) default null,
- port char(5) default null,
- socket char(64) default null,
- username char(64) default null,
- password char(64) default null,
- tgt_db_name char(64) default null,
- tgt_table_name char(64) default null,
- PRIMARY KEY (db_name, table_name),
- KEY idx1 (priority)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-}
-if (`SELECT IF($PLUGIN_VERSION = 2, 1, 0)`)
-{
- DROP TABLE IF EXISTS mysql.spider_xa;
- CREATE TABLE mysql.spider_xa(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data char(128) charset binary not null default '',
- status char(8) not null default '',
- PRIMARY KEY (data, format_id, gtrid_length),
- KEY idx1 (status)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_xa_member;
- CREATE TABLE mysql.spider_xa_member(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data char(128) charset binary not null default '',
- scheme char(64) not null default '',
- host char(64) not null default '',
- port char(5) not null default '',
- socket char(64) not null default '',
- username char(64) not null default '',
- password char(64) not null default '',
- ssl_ca char(64) default null,
- ssl_capath char(64) default null,
- ssl_cert char(64) default null,
- ssl_cipher char(64) default null,
- ssl_key char(64) default null,
- ssl_verify_server_cert tinyint not null default 0,
- default_file char(64) default null,
- default_group char(64) default null,
- PRIMARY KEY (data, format_id, gtrid_length, host, port, socket)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_tables;
- CREATE TABLE mysql.spider_tables(
- db_name char(64) not null default '',
- table_name char(64) not null default '',
- link_id int not null default 0,
- priority bigint not null default 0,
- server char(64) default null,
- scheme char(64) default null,
- host char(64) default null,
- port char(5) default null,
- socket char(64) default null,
- username char(64) default null,
- password char(64) default null,
- ssl_ca char(64) default null,
- ssl_capath char(64) default null,
- ssl_cert char(64) default null,
- ssl_cipher char(64) default null,
- ssl_key char(64) default null,
- ssl_verify_server_cert tinyint not null default 0,
- default_file char(64) default null,
- default_group char(64) default null,
- tgt_db_name char(64) default null,
- tgt_table_name char(64) default null,
- link_status tinyint not null default 1,
- PRIMARY KEY (db_name, table_name, link_id),
- KEY idx1 (priority)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_link_mon_servers;
- CREATE TABLE mysql.spider_link_mon_servers(
- db_name char(64) not null default '',
- table_name char(64) not null default '',
- link_id char(5) not null default '',
- sid int not null default 0,
- server char(64) default null,
- scheme char(64) default null,
- host char(64) default null,
- port char(5) default null,
- socket char(64) default null,
- username char(64) default null,
- password char(64) default null,
- ssl_ca char(64) default null,
- ssl_capath char(64) default null,
- ssl_cert char(64) default null,
- ssl_cipher char(64) default null,
- ssl_key char(64) default null,
- ssl_verify_server_cert tinyint not null default 0,
- default_file char(64) default null,
- default_group char(64) default null,
- PRIMARY KEY (db_name, table_name, link_id, sid)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_link_failed_log;
- CREATE TABLE mysql.spider_link_failed_log(
- db_name char(64) not null default '',
- table_name char(64) not null default '',
- link_id int not null default 0,
- failed_time timestamp not null default current_timestamp
- ) ENGINE=MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-}
if (`SELECT IF($PLUGIN_VERSION = 3, 1, 0)`)
{
- let $ENGINE_NAME=
+ let $HAS_REWRITE=
`SELECT IF (STRCMP('$SERVER_NAME', 'MariaDB') = 0,
IF ($SERVER_MAJOR_VERSION = 10,
- IF ($SERVER_MINOR_VERSION < 4, 'MyISAM',
- 'Aria transactional=1'),
- IF ($SERVER_MAJOR_VERSION < 10, 'MyISAM',
- 'Aria transactional=1')),
- 'MyISAM')`;
- DROP TABLE IF EXISTS mysql.spider_xa;
- eval
- CREATE TABLE mysql.spider_xa(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data binary(128) not null default '',
- status char(8) not null default '',
- PRIMARY KEY (data, format_id, gtrid_length),
- KEY idx1 (status)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_xa_member;
- eval
- CREATE TABLE mysql.spider_xa_member(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data binary(128) not null default '',
- scheme char(64) not null default '',
- host char(64) not null default '',
- port char(5) not null default '',
- socket text not null default '',
- username char(64) not null default '',
- password char(64) not null default '',
- ssl_ca text default null,
- ssl_capath text default null,
- ssl_cert text default null,
- ssl_cipher char(64) default null,
- ssl_key text default null,
- ssl_verify_server_cert tinyint not null default 0,
- default_file text default null,
- default_group char(64) default null,
- KEY idx1 (data, format_id, gtrid_length, host)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_xa_failed_log;
- eval
- CREATE TABLE mysql.spider_xa_failed_log(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data binary(128) not null default '',
- scheme char(64) not null default '',
- host char(64) not null default '',
- port char(5) not null default '',
- socket text not null,
- username char(64) not null default '',
- password char(64) not null default '',
- ssl_ca text,
- ssl_capath text,
- ssl_cert text,
- ssl_cipher char(64) default null,
- ssl_key text,
- ssl_verify_server_cert tinyint not null default 0,
- default_file text,
- default_group char(64) default null,
- thread_id int default null,
- status char(8) not null default '',
- failed_time timestamp not null default current_timestamp,
- key idx1 (data, format_id, gtrid_length, host)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_tables;
- eval
- CREATE TABLE mysql.spider_tables(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- link_id int not null default 0,
- priority bigint not null default 0,
- server char(64) default null,
- scheme char(64) default null,
- host char(64) default null,
- port char(5) default null,
- socket text default null,
- username char(64) default null,
- password char(64) default null,
- ssl_ca text default null,
- ssl_capath text default null,
- ssl_cert text default null,
- ssl_cipher char(64) default null,
- ssl_key text default null,
- ssl_verify_server_cert tinyint not null default 0,
- monitoring_binlog_pos_at_failing tinyint not null default 0,
- default_file text default null,
- default_group char(64) default null,
- tgt_db_name char(64) default null,
- tgt_table_name char(64) default null,
- link_status tinyint not null default 1,
- block_status tinyint not null default 0,
- static_link_id char(64) default null,
- PRIMARY KEY (db_name, table_name, link_id),
- KEY idx1 (priority),
- UNIQUE KEY uidx1 (db_name, table_name, static_link_id)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_link_mon_servers;
- eval
- CREATE TABLE mysql.spider_link_mon_servers(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- link_id char(64) not null default '',
- sid int unsigned not null default 0,
- server char(64) default null,
- scheme char(64) default null,
- host char(64) default null,
- port char(5) default null,
- socket text default null,
- username char(64) default null,
- password char(64) default null,
- ssl_ca text default null,
- ssl_capath text default null,
- ssl_cert text default null,
- ssl_cipher char(64) default null,
- ssl_key text default null,
- ssl_verify_server_cert tinyint not null default 0,
- default_file text default null,
- default_group char(64) default null,
- PRIMARY KEY (db_name, table_name, link_id, sid)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_link_failed_log;
- eval
- CREATE TABLE mysql.spider_link_failed_log(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- link_id char(64) not null default '',
- failed_time timestamp not null default current_timestamp
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_table_position_for_recovery;
- eval
- CREATE TABLE mysql.spider_table_position_for_recovery(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- failed_link_id int not null default 0,
- source_link_id int not null default 0,
- file text,
- position text,
- gtid text,
- primary key (db_name, table_name, failed_link_id, source_link_id)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_table_sts;
- eval
- CREATE TABLE mysql.spider_table_sts(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- data_file_length bigint unsigned not null default 0,
- max_data_file_length bigint unsigned not null default 0,
- index_file_length bigint unsigned not null default 0,
- records bigint unsigned not null default 0,
- mean_rec_length bigint unsigned not null default 0,
- check_time datetime not null default '0000-00-00 00:00:00',
- create_time datetime not null default '0000-00-00 00:00:00',
- update_time datetime not null default '0000-00-00 00:00:00',
- primary key (db_name, table_name)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
- DROP TABLE IF EXISTS mysql.spider_table_crd;
- eval
- CREATE TABLE mysql.spider_table_crd(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- key_seq int unsigned not null default 0,
- cardinality bigint not null default 0,
- primary key (db_name, table_name, key_seq)
- ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+ IF ($SERVER_MINOR_VERSION < 4, 0, 1),
+ IF ($SERVER_MAJOR_VERSION < 10, 0, 1)),
+ 0)`;
+ let $HAS_REWRITE= 0;
+ if ($HAS_REWRITE)
+ {
+ let $PLUGIN_NAME= spider_flush_rewrite_cache;
+ let $PLUGIN_EXIST=
+ `SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
+ while (!$PLUGIN_EXIST)
+ {
+ let $PLUGIN_EXIST=
+ `SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
+ }
+ }
+}
+let $PLUGIN_NAME= spider_flush_table_mon_cache;
+let $PLUGIN_EXIST=
+ `SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
+while (!$PLUGIN_EXIST)
+{
+ let $PLUGIN_EXIST=
+ `SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
}
SET spider_internal_sql_log_off= 0;
diff --git a/storage/spider/mysql-test/spider/r/basic_sql.result b/storage/spider/mysql-test/spider/r/basic_sql.result
index 94a09fc317b..2443f3488bd 100644
--- a/storage/spider/mysql-test/spider/r/basic_sql.result
+++ b/storage/spider/mysql-test/spider/r/basic_sql.result
@@ -717,6 +717,16 @@ TRUNCATE TABLE ta_l;
connection master_1;
SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
a b date_format(c, '%Y-%m-%d %H:%i:%s')
+connection master_1;
+create table t2345678911234567892123456789312345678941234567895123234234(id int) ENGINE=SPIDER
+COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"';
+drop table t2345678911234567892123456789312345678941234567895123234234;
+#
+# MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes
+#
+create table mdev_26139 (id int) ENGINE=SPIDER
+COMMENT="host '192.168.21.1', user 'spider', password 'password', database 'test'";
+drop table mdev_26139;
deinit
connection master_1;
diff --git a/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result b/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result
index ee8e1f056f3..2fe86099bc2 100644
--- a/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result
+++ b/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result
@@ -45,10 +45,10 @@ CHECKSUM TABLE tbl_a EXTENDED;
Table Checksum
auto_test_local.tbl_a 1061386331
connection child2_1;
-SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %';
argument
-select `pkey` from `auto_test_remote`.`tbl_a`
-SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+checksum table `auto_test_remote`.`tbl_a` extended
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
0
diff --git a/storage/spider/mysql-test/spider/r/direct_join.result b/storage/spider/mysql-test/spider/r/direct_join.result
index 0a76c3246f9..36728ad5d45 100644
--- a/storage/spider/mysql-test/spider/r/direct_join.result
+++ b/storage/spider/mysql-test/spider/r/direct_join.result
@@ -76,7 +76,7 @@ a b c
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select t0.`b` `b`,t0.`a` `a`,t2.`b` `b`,t2.`c` `c` from `auto_test_remote`.`ta_r` t0,`auto_test_remote`.`ta_r_3` t1,`auto_test_remote`.`ta_r_int` t2 where ((t0.`a` = t1.`a`) and (t2.`a` = t1.`a`)) order by t0.`b` desc limit 1,2
+select t0.`b` `b`,t0.`a` `a`,t2.`b` `b`,t2.`c` `c` from `auto_test_remote`.`ta_r` t0 join `auto_test_remote`.`ta_r_3` t1 join `auto_test_remote`.`ta_r_int` t2 where ((t0.`a` = t1.`a`) and (t2.`a` = t1.`a`)) order by t0.`b` desc limit 1,2
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a;
a b date_format(c, '%Y-%m-%d %H:%i:%s')
@@ -167,7 +167,7 @@ connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
select `id`,`hr_status`,`region_code`,`region` from `auto_test_remote`.`tbl_person` where `id` = '24FC3F0A5119432BAE13DD65AABAA39C' and `region` = 510411
-select `person_id`,`diseaseKind_id` from `auto_test_remote`.`tbl_ncd_cm_person` where ((`diseaseKind_id` = '52A0328740914BCE86ED10A4D2521816'))
+select count(0) `count(0)` from `auto_test_remote`.`tbl_ncd_cm_person` t0 where ((t0.`person_id` = '24FC3F0A5119432BAE13DD65AABAA39C') and (t0.`diseaseKind_id` = '52A0328740914BCE86ED10A4D2521816'))
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT * FROM tbl_person;
id hr_status region_code region
diff --git a/storage/spider/mysql-test/spider/r/direct_join_using.result b/storage/spider/mysql-test/spider/r/direct_join_using.result
index 66ae1503f9f..93df7b8cd3f 100644
--- a/storage/spider/mysql-test/spider/r/direct_join_using.result
+++ b/storage/spider/mysql-test/spider/r/direct_join_using.result
@@ -79,7 +79,7 @@ a b c
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select t0.`b` `b`,t0.`a` `a`,t2.`b` `b`,t2.`c` `c` from `auto_test_remote`.`ta_r` t0,`auto_test_remote`.`ta_r_3` t1,`auto_test_remote`.`ta_r_int` t2 where ((t0.`a` = t1.`a`) and (t2.`a` = t1.`a`)) order by t0.`b` desc
+select t0.`b` `b`,t0.`a` `a`,t2.`b` `b`,t2.`c` `c` from `auto_test_remote`.`ta_r` t0 join `auto_test_remote`.`ta_r_3` t1 join `auto_test_remote`.`ta_r_int` t2 where ((t0.`a` = t1.`a`) and (t2.`a` = t1.`a`)) order by t0.`b` desc
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a;
a b date_format(c, '%Y-%m-%d %H:%i:%s')
diff --git a/storage/spider/mysql-test/spider/r/partition_fulltext.result b/storage/spider/mysql-test/spider/r/partition_fulltext.result
index 3289473b905..6c001d25444 100644
--- a/storage/spider/mysql-test/spider/r/partition_fulltext.result
+++ b/storage/spider/mysql-test/spider/r/partition_fulltext.result
@@ -71,7 +71,7 @@ pkey words
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select match(`words`)against('+ghi' in boolean mode),`pkey`,`words` from `auto_test_remote`.`tbl_a` where match(`words`)against('+ghi' in boolean mode) and (match(`words`)against('+ghi' in boolean mode))
+select match(`words`)against('+ghi' in boolean mode),`pkey`,`words` from `auto_test_remote`.`tbl_a` where match(`words`)against('+ghi' in boolean mode) and (match(`words`)against(_latin1'+ghi' in boolean mode))
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
@@ -80,7 +80,7 @@ pkey
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select match(`words`)against('+ghi' in boolean mode),`pkey`,`words` from `auto_test_remote2`.`tbl_a` where match(`words`)against('+ghi' in boolean mode) and (match(`words`)against('+ghi' in boolean mode))
+select match(`words`)against('+ghi' in boolean mode),`pkey`,`words` from `auto_test_remote2`.`tbl_a` where match(`words`)against('+ghi' in boolean mode) and (match(`words`)against(_latin1'+ghi' in boolean mode))
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
@@ -91,7 +91,7 @@ pkey
connection child2_3;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select match(`words`)against('+ghi' in boolean mode),`pkey`,`words` from `auto_test_remote3`.`tbl_a` where match(`words`)against('+ghi' in boolean mode) and (match(`words`)against('+ghi' in boolean mode))
+select match(`words`)against('+ghi' in boolean mode),`pkey`,`words` from `auto_test_remote3`.`tbl_a` where match(`words`)against('+ghi' in boolean mode) and (match(`words`)against(_latin1'+ghi' in boolean mode))
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
diff --git a/storage/spider/mysql-test/spider/r/show_system_tables.result b/storage/spider/mysql-test/spider/r/show_system_tables.result
index 831d4578efe..67411862e00 100644
--- a/storage/spider/mysql-test/spider/r/show_system_tables.result
+++ b/storage/spider/mysql-test/spider/r/show_system_tables.result
@@ -13,15 +13,15 @@ connection master_1;
SELECT table_name, engine FROM information_schema.tables
WHERE table_schema = 'mysql' AND table_name like '%spider_%';
table_name engine
-spider_link_failed_log MyISAM
-spider_link_mon_servers MyISAM
-spider_table_crd MyISAM
-spider_table_position_for_recovery MyISAM
-spider_table_sts MyISAM
-spider_tables MyISAM
-spider_xa MyISAM
-spider_xa_failed_log MyISAM
-spider_xa_member MyISAM
+spider_link_failed_log Aria
+spider_link_mon_servers Aria
+spider_table_crd Aria
+spider_table_position_for_recovery Aria
+spider_table_sts Aria
+spider_tables Aria
+spider_xa Aria
+spider_xa_failed_log Aria
+spider_xa_member Aria
deinit
for master_1
diff --git a/storage/spider/mysql-test/spider/r/slave_trx_isolation.result b/storage/spider/mysql-test/spider/r/slave_trx_isolation.result
index 7d9ba40cab3..e68b4a2c82d 100644
--- a/storage/spider/mysql-test/spider/r/slave_trx_isolation.result
+++ b/storage/spider/mysql-test/spider/r/slave_trx_isolation.result
@@ -53,7 +53,7 @@ SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %';
argument
set session time_zone = '+00:00'
SET NAMES utf8
-set session transaction isolation level read committed;set session autocommit = 1;start transaction
+set session transaction isolation level read committed;set session autocommit = 1;set session wait_timeout = 604800;set session sql_mode = 'strict_trans_tables,error_for_division_by_zero,no_auto_create_user,no_engine_substitution';start transaction
SELECT argument FROM mysql.general_log WHERE argument LIKE '%set %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
diff --git a/storage/spider/mysql-test/spider/r/timestamp.result b/storage/spider/mysql-test/spider/r/timestamp.result
index 4e4badccc41..2993c08c5db 100644
--- a/storage/spider/mysql-test/spider/r/timestamp.result
+++ b/storage/spider/mysql-test/spider/r/timestamp.result
@@ -252,11 +252,11 @@ col_a col_dt col_ts unix_timestamp(col_ts)
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > '2017-12-31 23:00:00')
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` < '2018-10-28 01:30:00')
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where ('2018-10-28 01:30:00' > t0.`col_ts`)
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` between '2018-10-28 00:30:00' and '2018-10-28 01:30:00')
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where ((t0.`col_ts` >= '2018-10-28 00:30:00') and (t0.`col_ts` <= '2018-10-28 01:30:00'))
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > _latin1'2017-12-31 23:00:00')
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` < _latin1'2018-10-28 01:30:00')
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (_latin1'2018-10-28 01:30:00' > t0.`col_ts`)
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` between _latin1'2018-10-28 00:30:00' and _latin1'2018-10-28 01:30:00')
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where ((t0.`col_ts` >= _latin1'2018-10-28 00:30:00') and (t0.`col_ts` <= _latin1'2018-10-28 01:30:00'))
select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > '2018-03-25 01:00:00')
select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > '1970-01-01 00:00:01')
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
@@ -339,11 +339,11 @@ col_a col_dt col_ts unix_timestamp(col_ts)
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > '2017-12-31 23:00:00')
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` < '2018-10-28 01:30:00')
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where ('2018-10-28 01:30:00' > t0.`col_ts`)
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` between '2018-10-28 00:30:00' and '2018-10-28 01:30:00')
-select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where ((t0.`col_ts` >= '2018-10-28 00:30:00') and (t0.`col_ts` <= '2018-10-28 01:30:00'))
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > _latin1'2017-12-31 23:00:00')
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` < _latin1'2018-10-28 01:30:00')
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (_latin1'2018-10-28 01:30:00' > t0.`col_ts`)
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` between _latin1'2018-10-28 00:30:00' and _latin1'2018-10-28 01:30:00')
+select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where ((t0.`col_ts` >= _latin1'2018-10-28 00:30:00') and (t0.`col_ts` <= _latin1'2018-10-28 01:30:00'))
select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > '2018-03-25 01:00:00')
select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0 where (t0.`col_ts` > '1970-01-01 00:00:01')
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_deinit.inc b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_deinit.inc
new file mode 100644
index 00000000000..ad30aac5d6e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_deinit.inc
@@ -0,0 +1,12 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $MASTER_1_COMMENT_2_1_2= $MASTER_1_COMMENT_2_1_2_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_init.inc b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_init.inc
new file mode 100644
index 00000000000..695d46101ae
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_key_init.inc
@@ -0,0 +1,36 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $MASTER_1_COMMENT_2_1_2_BACKUP= $MASTER_1_COMMENT_2_1_2
+let $MASTER_1_COMMENT_2_1_2=
+ COMMENT='table "tbl_b", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a $STR_SEMICOLON
+ DROP TABLE IF EXISTS tbl_b;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ akey int NOT NULL,
+ val int NOT NULL,
+ KEY idx1 (akey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET $STR_SEMICOLON
+ CREATE TABLE tbl_b (
+ bkey int NOT NULL,
+ akey int NOT NULL,
+ PRIMARY KEY (bkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT akey, val FROM tbl_a ORDER BY akey $STR_SEMICOLON
+ SELECT bkey, akey FROM tbl_b ORDER BY bkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' $STR_SEMICOLON
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%';
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_deinit.inc b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_deinit.inc
new file mode 100644
index 00000000000..ad30aac5d6e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_deinit.inc
@@ -0,0 +1,12 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $MASTER_1_COMMENT_2_1_2= $MASTER_1_COMMENT_2_1_2_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_init.inc b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_init.inc
new file mode 100644
index 00000000000..e364489c05f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/direct_join_by_pkey_pkey_init.inc
@@ -0,0 +1,36 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $MASTER_1_COMMENT_2_1_2_BACKUP= $MASTER_1_COMMENT_2_1_2
+let $MASTER_1_COMMENT_2_1_2=
+ COMMENT='table "tbl_b", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a $STR_SEMICOLON
+ DROP TABLE IF EXISTS tbl_b;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ akey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (akey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET $STR_SEMICOLON
+ CREATE TABLE tbl_b (
+ bkey int NOT NULL,
+ akey int NOT NULL,
+ PRIMARY KEY (bkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT akey, val FROM tbl_a ORDER BY akey $STR_SEMICOLON
+ SELECT bkey, akey FROM tbl_b ORDER BY bkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' $STR_SEMICOLON
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%';
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_deinit.inc b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_deinit.inc
new file mode 100644
index 00000000000..f1899d1576a
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_deinit.inc
@@ -0,0 +1,3 @@
+--connection master_1
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+--source load_data_deinit.inc
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_init.inc b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_init.inc
new file mode 100644
index 00000000000..24f0dc9820e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_init.inc
@@ -0,0 +1,4 @@
+--source load_data_init.inc
+--connection master_1
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_deinit.inc b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_deinit.inc
new file mode 100644
index 00000000000..f1899d1576a
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_deinit.inc
@@ -0,0 +1,3 @@
+--connection master_1
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+--source load_data_deinit.inc
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_init.inc b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_init.inc
new file mode 100644
index 00000000000..50ef8d47696
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_init.inc
@@ -0,0 +1,4 @@
+--source load_data_init.inc
+--connection master_1
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/load_data_deinit.inc b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_deinit.inc
new file mode 100644
index 00000000000..f8405973768
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_deinit.inc
@@ -0,0 +1,11 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/regression/e1121/include/load_data_init.inc b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_init.inc
new file mode 100644
index 00000000000..5f4104382dc
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/include/load_data_init.inc
@@ -0,0 +1,25 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey, val FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
diff --git a/storage/spider/mysql-test/spider/regression/e1121/my.cnf b/storage/spider/mysql-test/spider/regression/e1121/my.cnf
new file mode 100644
index 00000000000..47558d85fc6
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/my.cnf
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include my_1_1.cnf
+!include my_2_1.cnf
diff --git a/storage/spider/mysql-test/spider/regression/e1121/my_1_1.cnf b/storage/spider/mysql-test/spider/regression/e1121/my_1_1.cnf
new file mode 100644
index 00000000000..5f17295d895
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/my_1_1.cnf
@@ -0,0 +1,44 @@
+[mysqld.1.1]
+log-bin= master-bin
+loose_handlersocket_port= 20000
+loose_handlersocket_port_wr= 20001
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+loose_partition= 1
+
+[ENV]
+USE_GEOMETRY_TEST= 1
+USE_FULLTEXT_TEST= 1
+USE_HA_TEST= 1
+USE_GENERAL_LOG= 1
+USE_REPLICATION= 1
+MASTER_1_MYPORT= @mysqld.1.1.port
+MASTER_1_HSRPORT= 20000
+MASTER_1_HSWPORT= 20001
+MASTER_1_MYSOCK= @mysqld.1.1.socket
+MASTER_1_ENGINE_TYPE= Spider
+#MASTER_1_ENGINE_TYPE= MyISAM
+MASTER_1_ENGINE= ENGINE=Spider
+MASTER_1_CHARSET= DEFAULT CHARSET=utf8
+MASTER_1_ENGINE2= ENGINE=MyISAM
+MASTER_1_CHARSET2= DEFAULT CHARSET=utf8
+MASTER_1_CHARSET3= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
+
+STR_SEMICOLON= ;
+
+#The followings are set in include/init_xxx.inc files
+# MASTER_1_COMMENT_2_1
+# MASTER_1_COMMENT2_2_1
+# MASTER_1_COMMENT3_2_1
+# MASTER_1_COMMENT4_2_1
+# MASTER_1_COMMENT5_2_1
+# MASTER_1_COMMENT_P_2_1
diff --git a/storage/spider/mysql-test/spider/regression/e1121/my_2_1.cnf b/storage/spider/mysql-test/spider/regression/e1121/my_2_1.cnf
new file mode 100644
index 00000000000..24161645607
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/my_2_1.cnf
@@ -0,0 +1,56 @@
+[mysqld.2.1]
+loose_handlersocket_port= 20002
+loose_handlersocket_port_wr= 20003
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+
+[ENV]
+USE_CHILD_GROUP2= 1
+OUTPUT_CHILD_GROUP2= 0
+CHILD2_1_MYPORT= @mysqld.2.1.port
+CHILD2_1_HSRPORT= 20002
+CHILD2_1_HSWPORT= 20003
+CHILD2_1_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_ENGINE_TYPE= InnoDB
+CHILD2_1_ENGINE= ENGINE=InnoDB
+CHILD2_1_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_1_CHARSET2= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
+CHILD2_1_FT_MYPORT= @mysqld.2.1.port
+CHILD2_1_FT_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_FT_ENGINE_TYPE= MyISAM
+CHILD2_1_FT_ENGINE= ENGINE=MyISAM
+CHILD2_1_FT_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_1_GM_MYPORT= @mysqld.2.1.port
+CHILD2_1_GM_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_GM_ENGINE_TYPE= MyISAM
+CHILD2_1_GM_ENGINE= ENGINE=MyISAM
+CHILD2_1_GM_CHARSET= DEFAULT CHARSET=utf8
+
+#The followings are set in include/init_xxx.inc files
+# CHILD2_1_DROP_TABLES
+# CHILD2_1_CREATE_TABLES
+# CHILD2_1_SELECT_TABLES
+# CHILD2_1_DROP_TABLES2
+# CHILD2_1_CREATE_TABLES2
+# CHILD2_1_SELECT_TABLES2
+# CHILD2_1_DROP_TABLES3
+# CHILD2_1_CREATE_TABLES3
+# CHILD2_1_SELECT_TABLES3
+# CHILD2_1_DROP_TABLES4
+# CHILD2_1_CREATE_TABLES4
+# CHILD2_1_SELECT_TABLES4
+# CHILD2_1_DROP_TABLES5
+# CHILD2_1_CREATE_TABLES5
+# CHILD2_1_SELECT_TABLES5
+# CHILD2_1_DROP_TABLES6
+# CHILD2_1_CREATE_TABLES6
+# CHILD2_1_SELECT_TABLES6
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_key.result b/storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_key.result
new file mode 100644
index 00000000000..4b04b71aee2
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_key.result
@@ -0,0 +1,94 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-18995
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+akey int NOT NULL,
+val int NOT NULL,
+KEY idx1 (akey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+CREATE TABLE tbl_b (
+bkey int NOT NULL,
+akey int NOT NULL,
+PRIMARY KEY (bkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1_2
+INSERT INTO tbl_a (akey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),(7,2),(8,1),(9,0);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
+val akey
+4 4
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' ;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%';
+argument
+select t0.`val` `val`,t0.`akey` `akey` from `auto_test_remote`.`tbl_a` t0 where (t0.`akey` = '4')
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' ;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%'
+argument
+select `bkey`,`akey` from `auto_test_remote`.`tbl_b` where `bkey` = 5
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' ;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%'
+SELECT akey, val FROM tbl_a ORDER BY akey ;
+SELECT bkey, akey FROM tbl_b ORDER BY bkey;
+akey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+bkey akey
+0 0
+1 1
+2 2
+3 3
+4 4
+5 4
+6 3
+7 2
+8 1
+9 0
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_pkey.result b/storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_pkey.result
new file mode 100644
index 00000000000..9a75cc691fe
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/direct_join_by_pkey_pkey.result
@@ -0,0 +1,94 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-18995
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+akey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (akey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+CREATE TABLE tbl_b (
+bkey int NOT NULL,
+akey int NOT NULL,
+PRIMARY KEY (bkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1_2
+INSERT INTO tbl_a (akey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),(7,2),(8,1),(9,0);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
+val akey
+4 4
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' ;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%';
+argument
+select `akey`,`val` from `auto_test_remote`.`tbl_a` where `akey` = 4
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' ;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%'
+argument
+select `bkey`,`akey` from `auto_test_remote`.`tbl_b` where `bkey` = 5
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%' ;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_b`%'
+SELECT akey, val FROM tbl_a ORDER BY akey ;
+SELECT bkey, akey FROM tbl_b ORDER BY bkey;
+akey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+bkey akey
+0 0
+1 1
+2 2
+3 3
+4 4
+5 4
+6 3
+7 2
+8 1
+9 0
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi0.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi0.result
new file mode 100644
index 00000000000..2244b176b31
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi0.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi1.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi1.result
new file mode 100644
index 00000000000..6d0d29cd4bd
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi1.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi0.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi0.result
new file mode 100644
index 00000000000..1bdd1470faa
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi0.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+Warnings:
+Warning 1062 Duplicate entry '0' for key 'PRIMARY'
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
+Warning 1062 Duplicate entry '4' for key 'PRIMARY'
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
+Warning 1062 Duplicate entry '6' for key 'PRIMARY'
+Warning 1062 Duplicate entry '7' for key 'PRIMARY'
+Warning 1062 Duplicate entry '8' for key 'PRIMARY'
+Warning 1062 Duplicate entry '9' for key 'PRIMARY'
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+1 2
+2 3
+3 4
+4 5
+5 6
+6 7
+7 8
+8 9
+9 10
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi1.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi1.result
new file mode 100644
index 00000000000..4d64840e85d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi1.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+1 2
+2 3
+3 4
+4 5
+5 6
+6 7
+7 8
+8 9
+9 10
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi0.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi0.result
new file mode 100644
index 00000000000..9156c838e09
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi0.result
@@ -0,0 +1,84 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi1.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi1.result
new file mode 100644
index 00000000000..761ce71dc02
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi1.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi0.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi0.result
new file mode 100644
index 00000000000..81d0fdbf785
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi0.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+Warnings:
+Warning 1062 Duplicate entry '0' for key 'PRIMARY'
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
+Warning 1062 Duplicate entry '4' for key 'PRIMARY'
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
+Warning 1062 Duplicate entry '6' for key 'PRIMARY'
+Warning 1062 Duplicate entry '7' for key 'PRIMARY'
+Warning 1062 Duplicate entry '8' for key 'PRIMARY'
+Warning 1062 Duplicate entry '9' for key 'PRIMARY'
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+1 2
+2 3
+3 4
+4 5
+5 6
+6 7
+7 8
+8 9
+9 10
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi1.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi1.result
new file mode 100644
index 00000000000..737cccc42cb
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi1.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+1 2
+2 3
+3 4
+4 5
+5 6
+6 7
+7 8
+8 9
+9 10
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi0.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi0.result
new file mode 100644
index 00000000000..7d8fb034544
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi0.result
@@ -0,0 +1,104 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 0 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 2 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 4 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 6 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 8 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi1.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi1.result
new file mode 100644
index 00000000000..f3e272c1cd1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi1.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi0.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi0.result
new file mode 100644
index 00000000000..3ce058a9fc8
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi0.result
@@ -0,0 +1,104 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 0 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 2 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 4 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 6 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 8 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi1.result b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi1.result
new file mode 100644
index 00000000000..86124b9c5c6
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi1.result
@@ -0,0 +1,75 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/suite.opt b/storage/spider/mysql-test/spider/regression/e1121/suite.opt
new file mode 100644
index 00000000000..672a3b37d4f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/suite.opt
@@ -0,0 +1 @@
+--loose-innodb --loose-skip-performance-schema
diff --git a/storage/spider/mysql-test/spider/regression/e1121/suite.pm b/storage/spider/mysql-test/spider/regression/e1121/suite.pm
new file mode 100644
index 00000000000..171fa6c4f01
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/suite.pm
@@ -0,0 +1,11 @@
+package My::Suite::Spider;
+
+@ISA = qw(My::Suite);
+
+return "No Spider engine" unless $ENV{HA_SPIDER_SO};
+return "Not run for embedded server" if $::opt_embedded_server;
+
+sub is_default { 1 }
+
+bless { };
+
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test
new file mode 100644
index 00000000000..39b5b5535bb
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test
@@ -0,0 +1,86 @@
+--source ../include/direct_join_by_pkey_key_init.inc
+--echo
+--echo this test is for MDEV-18995
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+--disable_ps_protocol
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_ps_protocol
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ akey int NOT NULL,
+ val int NOT NULL,
+ KEY idx1 (akey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ akey int NOT NULL,
+ val int NOT NULL,
+ KEY idx1 (akey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+echo CREATE TABLE tbl_b (
+ bkey int NOT NULL,
+ akey int NOT NULL,
+ PRIMARY KEY (bkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1_2;
+eval CREATE TABLE tbl_b (
+ bkey int NOT NULL,
+ akey int NOT NULL,
+ PRIMARY KEY (bkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1_2;
+--enable_query_log
+INSERT INTO tbl_a (akey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),(7,2),(8,1),(9,0);
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
+
+--connection child2_1
+--disable_ps_protocol
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+--enable_ps_protocol
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/direct_join_by_pkey_key_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test
new file mode 100644
index 00000000000..652f7d15177
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test
@@ -0,0 +1,86 @@
+--source ../include/direct_join_by_pkey_pkey_init.inc
+--echo
+--echo this test is for MDEV-18995
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+--disable_ps_protocol
+eval $CHILD2_1_CREATE_TABLES;
+--enable_ps_protocol
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ akey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (akey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ akey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (akey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+echo CREATE TABLE tbl_b (
+ bkey int NOT NULL,
+ akey int NOT NULL,
+ PRIMARY KEY (bkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1_2;
+eval CREATE TABLE tbl_b (
+ bkey int NOT NULL,
+ akey int NOT NULL,
+ PRIMARY KEY (bkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1_2;
+--enable_query_log
+INSERT INTO tbl_a (akey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),(7,2),(8,1),(9,0);
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
+
+--connection child2_1
+--disable_ps_protocol
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+--enable_ps_protocol
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/direct_join_by_pkey_pkey_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc b/storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc
new file mode 100644
index 00000000000..8c1aa4e651f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc
@@ -0,0 +1,76 @@
+--echo
+--echo this test is for MDEV-18987
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+--disable_query_log
+--echo SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+eval SELECT pkey,val INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+--enable_query_log
+eval $COMMAND_BEFORE_LOAD_DATA;
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+--echo LOAD DATA $OPTION_LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a;
+eval LOAD DATA $OPTION_LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a;
+--enable_query_log
+--remove_file $MYSQLTEST_VARDIR/tmp/spider_outfile.tsv
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi0.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi0.test
new file mode 100644
index 00000000000..d43a944d5e1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL=
+--let OPTION_WORD=
+--source load_data.inc
+--source ../include/load_data_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi1.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi1.test
new file mode 100644
index 00000000000..a73d1ef03b2
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL=
+--let OPTION_WORD=
+--source load_data.inc
+--source ../include/load_data_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi0.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi0.test
new file mode 100644
index 00000000000..6fee83e7b43
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= IGNORE
+--source load_data.inc
+--source ../include/load_data_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi1.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi1.test
new file mode 100644
index 00000000000..1c8827911b2
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= IGNORE
+--source load_data.inc
+--source ../include/load_data_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi0.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi0.test
new file mode 100644
index 00000000000..dadd02245ba
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD=
+--source load_data.inc
+--source ../include/load_data_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi1.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi1.test
new file mode 100644
index 00000000000..95b065050b5
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD=
+--source load_data.inc
+--source ../include/load_data_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi0.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi0.test
new file mode 100644
index 00000000000..2243f8924a8
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= IGNORE
+--source load_data.inc
+--source ../include/load_data_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi1.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi1.test
new file mode 100644
index 00000000000..2ab7307e3af
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= IGNORE
+--source load_data.inc
+--source ../include/load_data_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi0.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi0.test
new file mode 100644
index 00000000000..1821a9ef730
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= REPLACE
+--source load_data.inc
+--source ../include/load_data_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi1.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi1.test
new file mode 100644
index 00000000000..3d53feca372
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= REPLACE
+--source load_data.inc
+--source ../include/load_data_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi0.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi0.test
new file mode 100644
index 00000000000..4bc402a40f1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= REPLACE
+--source load_data.inc
+--source ../include/load_data_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi1.test b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi1.test
new file mode 100644
index 00000000000..9dafd24a15e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= REPLACE
+--source load_data.inc
+--source ../include/load_data_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_deinit.inc b/storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_deinit.inc
new file mode 100644
index 00000000000..2248eef3650
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_deinit.inc
@@ -0,0 +1,14 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP
+--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP
+--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_init.inc b/storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_init.inc
new file mode 100644
index 00000000000..a6945218fab
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/group_by_order_by_limit_ok_init.inc
@@ -0,0 +1,54 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+if (!$HAVE_PARTITION)
+{
+ --source group_by_order_by_limit_ok_deinit.inc
+ --enable_result_log
+ --enable_query_log
+ --enable_warnings
+ skip Test requires partitioning;
+}
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a"'
+ PARTITION BY KEY(skey) (
+ PARTITION pt1 COMMENT='srv "s_2_1"',
+ PARTITION pt2 COMMENT='srv "s_2_2"'
+ );
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ KEY idx1 (pkey),
+ KEY idx2 (skey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES
+let $CHILD2_2_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES
+let $CHILD2_2_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ KEY idx1 (pkey),
+ KEY idx2 (skey)
+ ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
+--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES
+let $CHILD2_2_SELECT_TABLES=
+ SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+let $CHILD2_2_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_deinit.inc b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_deinit.inc
new file mode 100644
index 00000000000..c41917340b0
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_deinit.inc
@@ -0,0 +1,3 @@
+--connection master_1
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+--source load_data_part_deinit.inc
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_init.inc b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_init.inc
new file mode 100644
index 00000000000..8e69f52cc58
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_init.inc
@@ -0,0 +1,4 @@
+--source load_data_part_init.inc
+--connection master_1
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_deinit.inc b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_deinit.inc
new file mode 100644
index 00000000000..c41917340b0
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_deinit.inc
@@ -0,0 +1,3 @@
+--connection master_1
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+--source load_data_part_deinit.inc
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_init.inc b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_init.inc
new file mode 100644
index 00000000000..b9194ccd51c
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_init.inc
@@ -0,0 +1,4 @@
+--source load_data_part_init.inc
+--connection master_1
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_deinit.inc b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_deinit.inc
new file mode 100644
index 00000000000..2248eef3650
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_deinit.inc
@@ -0,0 +1,14 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP
+--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP
+--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_init.inc b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_init.inc
new file mode 100644
index 00000000000..42a0ea72539
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_init.inc
@@ -0,0 +1,52 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+if (!$HAVE_PARTITION)
+{
+ --source load_data_part_deinit.inc
+ --enable_result_log
+ --enable_query_log
+ --enable_warnings
+ skip Test requires partitioning;
+}
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+ COMMENT='table "tbl_a"'
+ PARTITION BY KEY(pkey) (
+ PARTITION pt1 COMMENT='srv "s_2_1"',
+ PARTITION pt2 COMMENT='srv "s_2_2"'
+ );
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+ SELECT pkey, val FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES
+let $CHILD2_2_DROP_TABLES=
+ DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES
+let $CHILD2_2_CREATE_TABLES=
+ CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (pkey)
+ ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET;
+--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES
+let $CHILD2_2_SELECT_TABLES=
+ SELECT pkey, val FROM tbl_a ORDER BY pkey;
+let $CHILD2_2_SELECT_ARGUMENT1=
+ SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
diff --git a/storage/spider/mysql-test/spider/regression/e112122/my.cnf b/storage/spider/mysql-test/spider/regression/e112122/my.cnf
new file mode 100644
index 00000000000..6610e4cfd98
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/my.cnf
@@ -0,0 +1,4 @@
+!include include/default_mysqld.cnf
+!include my_1_1.cnf
+!include my_2_1.cnf
+!include my_2_2.cnf
diff --git a/storage/spider/mysql-test/spider/regression/e112122/my_1_1.cnf b/storage/spider/mysql-test/spider/regression/e112122/my_1_1.cnf
new file mode 100644
index 00000000000..5f17295d895
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/my_1_1.cnf
@@ -0,0 +1,44 @@
+[mysqld.1.1]
+log-bin= master-bin
+loose_handlersocket_port= 20000
+loose_handlersocket_port_wr= 20001
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+loose_partition= 1
+
+[ENV]
+USE_GEOMETRY_TEST= 1
+USE_FULLTEXT_TEST= 1
+USE_HA_TEST= 1
+USE_GENERAL_LOG= 1
+USE_REPLICATION= 1
+MASTER_1_MYPORT= @mysqld.1.1.port
+MASTER_1_HSRPORT= 20000
+MASTER_1_HSWPORT= 20001
+MASTER_1_MYSOCK= @mysqld.1.1.socket
+MASTER_1_ENGINE_TYPE= Spider
+#MASTER_1_ENGINE_TYPE= MyISAM
+MASTER_1_ENGINE= ENGINE=Spider
+MASTER_1_CHARSET= DEFAULT CHARSET=utf8
+MASTER_1_ENGINE2= ENGINE=MyISAM
+MASTER_1_CHARSET2= DEFAULT CHARSET=utf8
+MASTER_1_CHARSET3= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
+
+STR_SEMICOLON= ;
+
+#The followings are set in include/init_xxx.inc files
+# MASTER_1_COMMENT_2_1
+# MASTER_1_COMMENT2_2_1
+# MASTER_1_COMMENT3_2_1
+# MASTER_1_COMMENT4_2_1
+# MASTER_1_COMMENT5_2_1
+# MASTER_1_COMMENT_P_2_1
diff --git a/storage/spider/mysql-test/spider/regression/e112122/my_2_1.cnf b/storage/spider/mysql-test/spider/regression/e112122/my_2_1.cnf
new file mode 100644
index 00000000000..24161645607
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/my_2_1.cnf
@@ -0,0 +1,56 @@
+[mysqld.2.1]
+loose_handlersocket_port= 20002
+loose_handlersocket_port_wr= 20003
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+
+[ENV]
+USE_CHILD_GROUP2= 1
+OUTPUT_CHILD_GROUP2= 0
+CHILD2_1_MYPORT= @mysqld.2.1.port
+CHILD2_1_HSRPORT= 20002
+CHILD2_1_HSWPORT= 20003
+CHILD2_1_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_ENGINE_TYPE= InnoDB
+CHILD2_1_ENGINE= ENGINE=InnoDB
+CHILD2_1_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_1_CHARSET2= DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
+CHILD2_1_FT_MYPORT= @mysqld.2.1.port
+CHILD2_1_FT_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_FT_ENGINE_TYPE= MyISAM
+CHILD2_1_FT_ENGINE= ENGINE=MyISAM
+CHILD2_1_FT_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_1_GM_MYPORT= @mysqld.2.1.port
+CHILD2_1_GM_MYSOCK= @mysqld.2.1.socket
+CHILD2_1_GM_ENGINE_TYPE= MyISAM
+CHILD2_1_GM_ENGINE= ENGINE=MyISAM
+CHILD2_1_GM_CHARSET= DEFAULT CHARSET=utf8
+
+#The followings are set in include/init_xxx.inc files
+# CHILD2_1_DROP_TABLES
+# CHILD2_1_CREATE_TABLES
+# CHILD2_1_SELECT_TABLES
+# CHILD2_1_DROP_TABLES2
+# CHILD2_1_CREATE_TABLES2
+# CHILD2_1_SELECT_TABLES2
+# CHILD2_1_DROP_TABLES3
+# CHILD2_1_CREATE_TABLES3
+# CHILD2_1_SELECT_TABLES3
+# CHILD2_1_DROP_TABLES4
+# CHILD2_1_CREATE_TABLES4
+# CHILD2_1_SELECT_TABLES4
+# CHILD2_1_DROP_TABLES5
+# CHILD2_1_CREATE_TABLES5
+# CHILD2_1_SELECT_TABLES5
+# CHILD2_1_DROP_TABLES6
+# CHILD2_1_CREATE_TABLES6
+# CHILD2_1_SELECT_TABLES6
diff --git a/storage/spider/mysql-test/spider/regression/e112122/my_2_2.cnf b/storage/spider/mysql-test/spider/regression/e112122/my_2_2.cnf
new file mode 100644
index 00000000000..2d3c2a89a7d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/my_2_2.cnf
@@ -0,0 +1,38 @@
+[mysqld.2.2]
+loose_handlersocket_port= 20004
+loose_handlersocket_port_wr= 20005
+loose_handlersocket_threads= 2
+loose_handlersocket_threads_wr= 1
+loose_handlersocket_support_merge_table= 0
+loose_handlersocket_direct_update_mode= 2
+loose_handlersocket_unlimited_boundary= 65536
+loose_handlersocket_bulk_insert= 0
+loose_handlersocket_bulk_insert_timeout= 0
+loose_handlersocket_general_log= 1
+loose_handlersocket_timeout= 30
+loose_handlersocket_close_table_interval=2
+open_files_limit= 4096
+
+[ENV]
+CHILD2_2_MYPORT= @mysqld.2.2.port
+CHILD2_2_HSRPORT= 20004
+CHILD2_2_HSWPORT= 20005
+CHILD2_2_MYSOCK= @mysqld.2.2.socket
+CHILD2_2_ENGINE_TYPE= InnoDB
+CHILD2_2_ENGINE= ENGINE=InnoDB
+CHILD2_2_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_2_FT_MYPORT= @mysqld.2.2.port
+CHILD2_2_FT_MYSOCK= @mysqld.2.2.socket
+CHILD2_2_FT_ENGINE_TYPE= MyISAM
+CHILD2_2_FT_ENGINE= ENGINE=MyISAM
+CHILD2_2_FT_CHARSET= DEFAULT CHARSET=utf8
+CHILD2_2_GM_MYPORT= @mysqld.2.2.port
+CHILD2_2_GM_MYSOCK= @mysqld.2.2.socket
+CHILD2_2_GM_ENGINE_TYPE= MyISAM
+CHILD2_2_GM_ENGINE= ENGINE=MyISAM
+CHILD2_2_GM_CHARSET= DEFAULT CHARSET=utf8
+
+#The followings are set in include/init_xxx.inc files
+# CHILD2_2_DROP_TABLES
+# CHILD2_2_CREATE_TABLES
+# CHILD2_2_SELECT_TABLES
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/group_by_order_by_limit_ok.result b/storage/spider/mysql-test/spider/regression/e112122/r/group_by_order_by_limit_ok.result
new file mode 100644
index 00000000000..96746e09b8d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/group_by_order_by_limit_ok.result
@@ -0,0 +1,117 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-18988
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+skey int NOT NULL,
+KEY idx1 (pkey),
+KEY idx2 (skey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,skey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_a (pkey,skey) VALUES (10,10),(11,11),(12,12),(13,13),(14,14),(15,15),(16,16),(17,17),(18,18),(19,19);
+INSERT INTO tbl_a (pkey,skey) VALUES (20,5),(21,6),(22,7),(23,8),(24,9),(25,10),(26,11),(27,12),(28,13),(29,14);
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT skey, count(*) cnt FROM tbl_a GROUP BY skey ORDER BY cnt DESC, skey DESC LIMIT 5;
+skey cnt
+14 2
+13 2
+12 2
+11 2
+10 2
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+argument
+select count(0),`skey` from `auto_test_remote`.`tbl_a` group by `skey` order by count(0) desc,`skey` desc limit 5
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+pkey skey
+1 1
+3 3
+5 5
+7 7
+9 9
+11 11
+13 13
+15 15
+17 17
+19 19
+20 5
+22 7
+24 9
+26 11
+28 13
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+argument
+select count(0),`skey` from `auto_test_remote2`.`tbl_a` group by `skey` order by count(0) desc,`skey` desc limit 5
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+SELECT pkey, skey FROM tbl_a ORDER BY pkey;
+pkey skey
+0 0
+2 2
+4 4
+6 6
+8 8
+10 10
+12 12
+14 14
+16 16
+18 18
+21 6
+23 8
+25 10
+27 12
+29 14
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi0.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi0.result
new file mode 100644
index 00000000000..23753239054
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi0.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi1.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi1.result
new file mode 100644
index 00000000000..c30a5c037a7
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi1.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi0.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi0.result
new file mode 100644
index 00000000000..0071042cd58
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi0.result
@@ -0,0 +1,114 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+Warnings:
+Warning 1062 Duplicate entry '0' for key 'PRIMARY'
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
+Warning 1062 Duplicate entry '4' for key 'PRIMARY'
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
+Warning 1062 Duplicate entry '6' for key 'PRIMARY'
+Warning 1062 Duplicate entry '7' for key 'PRIMARY'
+Warning 1062 Duplicate entry '8' for key 'PRIMARY'
+Warning 1062 Duplicate entry '9' for key 'PRIMARY'
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 2
+3 4
+5 6
+7 8
+9 10
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+2 3
+4 5
+6 7
+8 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi1.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi1.result
new file mode 100644
index 00000000000..9f2e8dec535
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi1.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 2
+3 4
+5 6
+7 8
+9 10
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+2 3
+4 5
+6 7
+8 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi0.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi0.result
new file mode 100644
index 00000000000..7ec2b5b0b9e
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi0.result
@@ -0,0 +1,103 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi1.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi1.result
new file mode 100644
index 00000000000..f908ce1c1d5
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi1.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+TRUNCATE tbl_a;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi0.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi0.result
new file mode 100644
index 00000000000..c0a8f653fee
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi0.result
@@ -0,0 +1,114 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+Warnings:
+Warning 1062 Duplicate entry '0' for key 'PRIMARY'
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
+Warning 1062 Duplicate entry '4' for key 'PRIMARY'
+Warning 1062 Duplicate entry '5' for key 'PRIMARY'
+Warning 1062 Duplicate entry '6' for key 'PRIMARY'
+Warning 1062 Duplicate entry '7' for key 'PRIMARY'
+Warning 1062 Duplicate entry '8' for key 'PRIMARY'
+Warning 1062 Duplicate entry '9' for key 'PRIMARY'
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 2
+3 4
+5 6
+7 8
+9 10
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
+insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+2 3
+4 5
+6 7
+8 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi1.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi1.result
new file mode 100644
index 00000000000..619dd789d9a
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi1.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 2
+3 4
+5 6
+7 8
+9 10
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert high_priority ignore into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 1
+2 3
+4 5
+6 7
+8 9
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi0.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi0.result
new file mode 100644
index 00000000000..e12e380bb93
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi0.result
@@ -0,0 +1,123 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 0 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 2 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 4 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 6 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 8 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi1.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi1.result
new file mode 100644
index 00000000000..d367cbfd0ad
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi1.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+replace into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi0.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi0.result
new file mode 100644
index 00000000000..039a8dd4fad
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi0.result
@@ -0,0 +1,123 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 0;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
+insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
+select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
+update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 0 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 2 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 4 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 6 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
+insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
+select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 8 for update
+update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi1.result b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi1.result
new file mode 100644
index 00000000000..c8155be9910
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi1.result
@@ -0,0 +1,95 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+connection master_1;
+set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
+set session spider_direct_dup_insert= 1;
+
+this test is for MDEV-18987
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+connection child2_2;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+CHILD2_2_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+val int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+UPDATE tbl_a SET val = val + 1;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection child2_2;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+1 1
+3 3
+5 5
+7 7
+9 9
+connection child2_2;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
+argument
+replace into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
+SELECT pkey, val FROM tbl_a ORDER BY pkey;
+pkey val
+0 0
+2 2
+4 4
+6 6
+8 8
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+connection child2_2;
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+connection master_1;
+set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/suite.opt b/storage/spider/mysql-test/spider/regression/e112122/suite.opt
new file mode 100644
index 00000000000..672a3b37d4f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/suite.opt
@@ -0,0 +1 @@
+--loose-innodb --loose-skip-performance-schema
diff --git a/storage/spider/mysql-test/spider/regression/e112122/suite.pm b/storage/spider/mysql-test/spider/regression/e112122/suite.pm
new file mode 100644
index 00000000000..171fa6c4f01
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/suite.pm
@@ -0,0 +1,11 @@
+package My::Suite::Spider;
+
+@ISA = qw(My::Suite);
+
+return "No Spider engine" unless $ENV{HA_SPIDER_SO};
+return "Not run for embedded server" if $::opt_embedded_server;
+
+sub is_default { 1 }
+
+bless { };
+
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test b/storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test
new file mode 100644
index 00000000000..2a70098ed1b
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test
@@ -0,0 +1,97 @@
+--source ../include/group_by_order_by_limit_ok_init.inc
+--echo
+--echo this test is for MDEV-18988
+--echo
+--echo drop and create databases
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+--connection child2_2
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+--disable_query_log
+echo CHILD2_2_CREATE_TABLES;
+eval $CHILD2_2_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ KEY idx1 (pkey),
+ KEY idx2 (skey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ skey int NOT NULL,
+ KEY idx1 (pkey),
+ KEY idx2 (skey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey,skey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO tbl_a (pkey,skey) VALUES (10,10),(11,11),(12,12),(13,13),(14,14),(15,15),(16,16),(17,17),(18,18),(19,19);
+INSERT INTO tbl_a (pkey,skey) VALUES (20,5),(21,6),(22,7),(23,8),(24,9),(25,10),(26,11),(27,12),(28,13),(29,14);
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SELECT skey, count(*) cnt FROM tbl_a GROUP BY skey ORDER BY cnt DESC, skey DESC LIMIT 5;
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--connection child2_2
+eval $CHILD2_2_SELECT_ARGUMENT1;
+eval $CHILD2_2_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--connection child2_2
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/group_by_order_by_limit_ok_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc
new file mode 100644
index 00000000000..e66550f9a90
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc
@@ -0,0 +1,100 @@
+--echo
+--echo this test is for MDEV-18987
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+--connection child2_2
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote2;
+USE auto_test_remote2;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+--disable_query_log
+echo CHILD2_2_CREATE_TABLES;
+eval $CHILD2_2_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+ pkey int NOT NULL,
+ val int NOT NULL,
+ PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+--disable_query_log
+--echo SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+eval SELECT pkey,val INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
+--enable_query_log
+eval $COMMAND_BEFORE_LOAD_DATA;
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection child2_2
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+--echo LOAD DATA $OPTION_LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a;
+eval LOAD DATA $OPTION_LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a;
+--enable_query_log
+--remove_file $MYSQLTEST_VARDIR/tmp/spider_outfile.tsv
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--connection child2_2
+eval $CHILD2_2_SELECT_ARGUMENT1;
+eval $CHILD2_2_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--connection child2_2
+DROP DATABASE IF EXISTS auto_test_remote2;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi0.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi0.test
new file mode 100644
index 00000000000..b78529095a4
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL=
+--let OPTION_WORD=
+--source load_data_part.inc
+--source ../include/load_data_part_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi1.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi1.test
new file mode 100644
index 00000000000..a2540077639
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL=
+--let OPTION_WORD=
+--source load_data_part.inc
+--source ../include/load_data_part_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi0.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi0.test
new file mode 100644
index 00000000000..a6fb58d69d1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= IGNORE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi1.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi1.test
new file mode 100644
index 00000000000..b9f75894c60
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= IGNORE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi0.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi0.test
new file mode 100644
index 00000000000..f44f7ae936d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD=
+--source load_data_part.inc
+--source ../include/load_data_part_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi1.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi1.test
new file mode 100644
index 00000000000..4c806096ad1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= TRUNCATE tbl_a
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD=
+--source load_data_part.inc
+--source ../include/load_data_part_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi0.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi0.test
new file mode 100644
index 00000000000..179bab5b4aa
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= IGNORE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi1.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi1.test
new file mode 100644
index 00000000000..cd7d8215b7a
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= IGNORE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi0.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi0.test
new file mode 100644
index 00000000000..5df3f420e09
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= REPLACE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi1.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi1.test
new file mode 100644
index 00000000000..bf3c7c93be8
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL= LOCAL
+--let OPTION_WORD= REPLACE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi0.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi0.test
new file mode 100644
index 00000000000..910b7e813da
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi0.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi0_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= REPLACE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi0_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi1.test b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi1.test
new file mode 100644
index 00000000000..fc84bf14487
--- /dev/null
+++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi1.test
@@ -0,0 +1,8 @@
+--source ../include/load_data_part_ddi1_init.inc
+--let COMMAND_BEFORE_LOAD_DATA= UPDATE tbl_a SET val = val + 1
+--let OPTION_LOCAL=
+--let OPTION_WORD= REPLACE
+--source load_data_part.inc
+--source ../include/load_data_part_ddi1_deinit.inc
+--echo
+--echo end of test
diff --git a/storage/spider/mysql-test/spider/t/basic_sql.test b/storage/spider/mysql-test/spider/t/basic_sql.test
index 5bb040047fc..1298b10f19a 100644
--- a/storage/spider/mysql-test/spider/t/basic_sql.test
+++ b/storage/spider/mysql-test/spider/t/basic_sql.test
@@ -2677,6 +2677,18 @@ if ($USE_CHILD_GROUP2)
--connection master_1
SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
+--connection master_1
+create table t2345678911234567892123456789312345678941234567895123234234(id int) ENGINE=SPIDER
+ COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"';
+drop table t2345678911234567892123456789312345678941234567895123234234;
+
+--echo #
+--echo # MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes
+--echo #
+create table mdev_26139 (id int) ENGINE=SPIDER
+ COMMENT="host '192.168.21.1', user 'spider', password 'password', database 'test'";
+drop table mdev_26139;
+
--echo
--echo deinit
--disable_warnings
@@ -2689,6 +2701,7 @@ if ($USE_CHILD_GROUP2)
--connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2;
}
+
--disable_query_log
--disable_result_log
--source test_deinit.inc
diff --git a/storage/spider/mysql-test/spider/t/connect_child2_1.inc b/storage/spider/mysql-test/spider/t/connect_child2_1.inc
index cd9b0c9ca9b..15e26031527 100644
--- a/storage/spider/mysql-test/spider/t/connect_child2_1.inc
+++ b/storage/spider/mysql-test/spider/t/connect_child2_1.inc
@@ -1 +1,2 @@
--connect (child2_1, localhost, root, , , $CHILD2_1_MYPORT, $CHILD2_1_MYSOCK)
+--connect (child2_1_2, localhost, root, , , $CHILD2_1_MYPORT, $CHILD2_1_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/t/connect_child2_2.inc b/storage/spider/mysql-test/spider/t/connect_child2_2.inc
index e145f66b630..75a50821ea7 100644
--- a/storage/spider/mysql-test/spider/t/connect_child2_2.inc
+++ b/storage/spider/mysql-test/spider/t/connect_child2_2.inc
@@ -1 +1,2 @@
--connect (child2_2, localhost, root, , , $CHILD2_2_MYPORT, $CHILD2_2_MYSOCK)
+--connect (child2_2_2, localhost, root, , , $CHILD2_2_MYPORT, $CHILD2_2_MYSOCK)
diff --git a/storage/spider/mysql-test/spider/t/test_deinit.inc b/storage/spider/mysql-test/spider/t/test_deinit.inc
index 989bde26d3c..5a82b43ce0f 100644
--- a/storage/spider/mysql-test/spider/t/test_deinit.inc
+++ b/storage/spider/mysql-test/spider/t/test_deinit.inc
@@ -10,10 +10,12 @@ if ($USE_CHILD_GROUP2)
--connection child2_1
--source ../include/deinit_child2_1.inc
--disconnect child2_1
+ --disconnect child2_1_2
--echo child2_2
--connection child2_2
--source ../include/deinit_child2_2.inc
--disconnect child2_2
+ --disconnect child2_2_2
--echo child2_3
--connection child2_3
--source ../include/deinit_child2_3.inc
diff --git a/storage/spider/scripts/install_spider.sql b/storage/spider/scripts/install_spider.sql
index f52c78e496d..403bd99fd68 100644
--- a/storage/spider/scripts/install_spider.sql
+++ b/storage/spider/scripts/install_spider.sql
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2018 Kentoku Shiba
+# Copyright (C) 2010-2019 Kentoku Shiba
#
# 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
@@ -13,482 +13,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
-# This SQL script creates system tables for SPIDER
-# or fixes incompatibilities if ones already exist.
-
--- Create system tables if not exist
-create table if not exists mysql.spider_xa(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data char(128) charset binary not null default '',
- status char(8) not null default '',
- primary key (data, format_id, gtrid_length),
- key idx1 (status)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_xa_member(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data char(128) charset binary not null default '',
- scheme char(64) not null default '',
- host char(64) not null default '',
- port char(5) not null default '',
- socket text not null,
- username char(64) not null default '',
- password char(64) not null default '',
- ssl_ca text,
- ssl_capath text,
- ssl_cert text,
- ssl_cipher char(64) default null,
- ssl_key text,
- ssl_verify_server_cert tinyint not null default 0,
- default_file text,
- default_group char(64) default null,
- key idx1 (data, format_id, gtrid_length, host)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_xa_failed_log(
- format_id int not null default 0,
- gtrid_length int not null default 0,
- bqual_length int not null default 0,
- data char(128) charset binary not null default '',
- scheme char(64) not null default '',
- host char(64) not null default '',
- port char(5) not null default '',
- socket text not null,
- username char(64) not null default '',
- password char(64) not null default '',
- ssl_ca text,
- ssl_capath text,
- ssl_cert text,
- ssl_cipher char(64) default null,
- ssl_key text,
- ssl_verify_server_cert tinyint not null default 0,
- default_file text,
- default_group char(64) default null,
- thread_id int default null,
- status char(8) not null default '',
- failed_time timestamp not null default current_timestamp,
- key idx1 (data, format_id, gtrid_length, host)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_tables(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- link_id int not null default 0,
- priority bigint not null default 0,
- server char(64) default null,
- scheme char(64) default null,
- host char(64) default null,
- port char(5) default null,
- socket text,
- username char(64) default null,
- password char(64) default null,
- ssl_ca text,
- ssl_capath text,
- ssl_cert text,
- ssl_cipher char(64) default null,
- ssl_key text,
- ssl_verify_server_cert tinyint not null default 0,
- monitoring_binlog_pos_at_failing tinyint not null default 0,
- default_file text,
- default_group char(64) default null,
- tgt_db_name char(64) default null,
- tgt_table_name char(64) default null,
- link_status tinyint not null default 1,
- block_status tinyint not null default 0,
- static_link_id char(64) default null,
- primary key (db_name, table_name, link_id),
- key idx1 (priority),
- unique key uidx1 (db_name, table_name, static_link_id)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_link_mon_servers(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- link_id char(64) not null default '',
- sid int unsigned not null default 0,
- server char(64) default null,
- scheme char(64) default null,
- host char(64) default null,
- port char(5) default null,
- socket text,
- username char(64) default null,
- password char(64) default null,
- ssl_ca text,
- ssl_capath text,
- ssl_cert text,
- ssl_cipher char(64) default null,
- ssl_key text,
- ssl_verify_server_cert tinyint not null default 0,
- default_file text,
- default_group char(64) default null,
- primary key (db_name, table_name, link_id, sid)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_link_failed_log(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- link_id char(64) not null default '',
- failed_time timestamp not null default current_timestamp
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_table_position_for_recovery(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- failed_link_id int not null default 0,
- source_link_id int not null default 0,
- file text,
- position text,
- gtid text,
- primary key (db_name, table_name, failed_link_id, source_link_id)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_table_sts(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- data_file_length bigint unsigned not null default 0,
- max_data_file_length bigint unsigned not null default 0,
- index_file_length bigint unsigned not null default 0,
- records bigint unsigned not null default 0,
- mean_rec_length bigint unsigned not null default 0,
- check_time datetime not null default '0000-00-00 00:00:00',
- create_time datetime not null default '0000-00-00 00:00:00',
- update_time datetime not null default '0000-00-00 00:00:00',
- primary key (db_name, table_name)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-create table if not exists mysql.spider_table_crd(
- db_name char(64) not null default '',
- table_name char(199) not null default '',
- key_seq int unsigned not null default 0,
- cardinality bigint not null default 0,
- primary key (db_name, table_name, key_seq)
-) engine=MyISAM default charset=utf8 collate=utf8_bin;
-
--- If tables already exist and their definition differ from the latest ones,
--- we fix them here.
-drop procedure if exists mysql.spider_fix_one_table;
-drop procedure if exists mysql.spider_fix_system_tables;
-delimiter //
-create procedure mysql.spider_fix_one_table
- (tab_name char(255) charset utf8 collate utf8_bin,
- test_col_name char(255) charset utf8 collate utf8_bin,
- _sql text charset utf8 collate utf8_bin)
-begin
- set @col_exists := 0;
- select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = tab_name
- AND COLUMN_NAME = test_col_name;
- if @col_exists = 0 then
- select @stmt := _sql;
- prepare sp_stmt1 from @stmt;
- execute sp_stmt1;
- end if;
-end;//
-
-create procedure mysql.spider_fix_system_tables()
-begin
- select substring_index(substring_index(version(), '-', 2), '-', -1)
- into @server_name;
- select substring_index(version(), '.', 1)
- into @server_major_version;
- select substring_index(substring_index(version(), '.', 2), '.', -1)
- into @server_minor_version;
-
- -- Fix for 0.5
- call mysql.spider_fix_one_table('spider_tables', 'server',
- 'alter table mysql.spider_tables
- add server char(64) default null,
- add scheme char(64) default null,
- add host char(64) default null,
- add port char(5) default null,
- add socket char(64) default null,
- add username char(64) default null,
- add password char(64) default null,
- add tgt_db_name char(64) default null,
- add tgt_table_name char(64) default null');
-
- -- Fix for version 0.17
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_xa'
- AND COLUMN_NAME = 'data';
- if @col_type != 'binary(128)' then
- alter table mysql.spider_xa modify data binary(128) not null default '';
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_xa_member'
- AND COLUMN_NAME = 'data';
- if @col_type != 'binary(128)' then
- alter table mysql.spider_xa_member modify data binary(128) not null default '';
- end if;
-
- -- Fix for version 2.7
- call mysql.spider_fix_one_table('spider_tables', 'link_id',
- 'alter table mysql.spider_tables
- add column link_id int not null default 0 after table_name,
- drop primary key,
- add primary key (db_name, table_name, link_id)');
-
- -- Fix for version 2.8
- call mysql.spider_fix_one_table('spider_tables', 'link_status',
- 'alter table mysql.spider_tables
- add column link_status tinyint not null default 1');
-
- -- Fix for version 2.10
- call mysql.spider_fix_one_table('spider_xa_member', 'ssl_ca',
- 'alter table mysql.spider_xa_member
- add column ssl_ca char(64) default null after password,
- add column ssl_capath char(64) default null after ssl_ca,
- add column ssl_cert char(64) default null after ssl_capath,
- add column ssl_cipher char(64) default null after ssl_cert,
- add column ssl_key char(64) default null after ssl_cipher,
- add column ssl_verify_server_cert tinyint not null default 0 after ssl_key,
- add column default_file char(64) default null after ssl_verify_server_cert,
- add column default_group char(64) default null after default_file');
- call mysql.spider_fix_one_table('spider_tables', 'ssl_ca',
- 'alter table mysql.spider_tables
- add column ssl_ca char(64) default null after password,
- add column ssl_capath char(64) default null after ssl_ca,
- add column ssl_cert char(64) default null after ssl_capath,
- add column ssl_cipher char(64) default null after ssl_cert,
- add column ssl_key char(64) default null after ssl_cipher,
- add column ssl_verify_server_cert tinyint not null default 0 after ssl_key,
- add column default_file char(64) default null after ssl_verify_server_cert,
- add column default_group char(64) default null after default_file');
- call mysql.spider_fix_one_table('spider_link_mon_servers', 'ssl_ca',
- 'alter table mysql.spider_link_mon_servers
- add column ssl_ca char(64) default null after password,
- add column ssl_capath char(64) default null after ssl_ca,
- add column ssl_cert char(64) default null after ssl_capath,
- add column ssl_cipher char(64) default null after ssl_cert,
- add column ssl_key char(64) default null after ssl_cipher,
- add column ssl_verify_server_cert tinyint not null default 0 after ssl_key,
- add column default_file char(64) default null after ssl_verify_server_cert,
- add column default_group char(64) default null after default_file');
-
- -- Fix for version 2.25
- -- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- -- where TABLE_SCHEMA = 'mysql'
- -- AND TABLE_NAME = 'spider_link_mon_servers'
- -- AND COLUMN_NAME = 'link_id';
- -- if @col_type != 'char(5)' then
- -- alter table mysql.spider_link_mon_servers
- -- modify link_id char(5) not null default '';
- -- end if;
-
- -- Fix for version 2.28
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_mon_servers'
- AND COLUMN_NAME = 'sid';
- if @col_type != 'int(10) unsigned' then
- alter table mysql.spider_link_mon_servers
- modify sid int unsigned not null default 0;
- end if;
-
- -- Fix for version 3.1
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_xa_member'
- AND COLUMN_NAME = 'socket';
- if @col_type = 'char(64)' then
- alter table mysql.spider_xa_member
- drop primary key,
- add index idx1 (data, format_id, gtrid_length, host),
- modify socket text not null,
- modify ssl_ca text,
- modify ssl_capath text,
- modify ssl_cert text,
- modify ssl_key text,
- modify default_file text;
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_tables'
- AND COLUMN_NAME = 'socket';
- if @col_type = 'char(64)' then
- alter table mysql.spider_tables
- modify socket text,
- modify ssl_ca text,
- modify ssl_capath text,
- modify ssl_cert text,
- modify ssl_key text,
- modify default_file text;
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_mon_servers'
- AND COLUMN_NAME = 'socket';
- if @col_type = 'char(64)' then
- alter table mysql.spider_link_mon_servers
- modify socket text,
- modify ssl_ca text,
- modify ssl_capath text,
- modify ssl_cert text,
- modify ssl_key text,
- modify default_file text;
- end if;
-
- -- Fix for version 3.3.0
- call mysql.spider_fix_one_table('spider_tables',
- 'monitoring_binlog_pos_at_failing',
- 'alter table mysql.spider_tables
- add monitoring_binlog_pos_at_failing tinyint not null default 0 after ssl_verify_server_cert');
-
- -- Fix for version 3.3.6
- call mysql.spider_fix_one_table('spider_tables', 'block_status',
- 'alter table mysql.spider_tables
- add column block_status tinyint not null default 0 after link_status');
- call mysql.spider_fix_one_table('spider_tables', 'static_link_id',
- 'alter table mysql.spider_tables
- add column static_link_id char(64) default null after block_status,
- add unique index uidx1 (db_name, table_name, static_link_id)');
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_mon_servers'
- AND COLUMN_NAME = 'link_id';
- if @col_type != 'char(64)' then
- alter table mysql.spider_link_mon_servers
- modify link_id char(64) not null default '';
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_failed_log'
- AND COLUMN_NAME = 'link_id';
- if @col_type != 'char(64)' then
- alter table mysql.spider_link_failed_log
- modify link_id char(64) not null default '';
- end if;
-
- -- Fix for version 3.3.10
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_tables'
- AND COLUMN_NAME = 'table_name';
- if @col_type != 'char(199)' then
- alter table mysql.spider_tables
- modify table_name char(199) not null default '';
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_mon_servers'
- AND COLUMN_NAME = 'table_name';
- if @col_type != 'char(199)' then
- alter table mysql.spider_link_mon_servers
- modify table_name char(199) not null default '';
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_failed_log'
- AND COLUMN_NAME = 'table_name';
- if @col_type != 'char(199)' then
- alter table mysql.spider_link_failed_log
- modify table_name char(199) not null default '';
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_table_position_for_recovery'
- AND COLUMN_NAME = 'table_name';
- if @col_type != 'char(199)' then
- alter table mysql.spider_table_position_for_recovery
- modify table_name char(199) not null default '';
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_table_sts'
- AND COLUMN_NAME = 'table_name';
- if @col_type != 'char(199)' then
- alter table mysql.spider_table_sts
- modify table_name char(199) not null default '';
- end if;
- select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_table_crd'
- AND COLUMN_NAME = 'table_name';
- if @col_type != 'char(199)' then
- alter table mysql.spider_table_crd
- modify table_name char(199) not null default '';
- end if;
-
- -- Fix for MariaDB 10.4: Crash-Safe system tables
- if @server_name = 'MariaDB' and
- (
- @server_major_version > 10 or
- (
- @server_major_version = 10 and
- @server_minor_version >= 4
- )
- )
- then
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_failed_log';
- if @engine_name != 'Aria' then
- alter table mysql.spider_link_failed_log
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_link_mon_servers';
- if @engine_name != 'Aria' then
- alter table mysql.spider_link_mon_servers
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_table_crd';
- if @engine_name != 'Aria' then
- alter table mysql.spider_table_crd
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_table_position_for_recovery';
- if @engine_name != 'Aria' then
- alter table mysql.spider_table_position_for_recovery
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_table_sts';
- if @engine_name != 'Aria' then
- alter table mysql.spider_table_sts
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_tables';
- if @engine_name != 'Aria' then
- alter table mysql.spider_tables
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_xa';
- if @engine_name != 'Aria' then
- alter table mysql.spider_xa
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_xa_failed_log';
- if @engine_name != 'Aria' then
- alter table mysql.spider_xa_failed_log
- engine=Aria transactional=1;
- end if;
- select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES
- where TABLE_SCHEMA = 'mysql'
- AND TABLE_NAME = 'spider_xa_member';
- if @engine_name != 'Aria' then
- alter table mysql.spider_xa_member
- engine=Aria transactional=1;
- end if;
- end if;
-end;//
-delimiter ;
-call mysql.spider_fix_system_tables;
-drop procedure mysql.spider_fix_one_table;
-drop procedure mysql.spider_fix_system_tables;
-
--- Install a plugin and UDFs
drop procedure if exists mysql.spider_plugin_installer;
delimiter //
create procedure mysql.spider_plugin_installer()
@@ -512,71 +36,6 @@ begin
install plugin spider soname 'ha_spider.dll';
end if;
end if;
- set @have_spider_i_s_alloc_mem_plugin := 0;
- select @have_spider_i_s_alloc_mem_plugin := 1 from INFORMATION_SCHEMA.plugins where PLUGIN_NAME = 'SPIDER_ALLOC_MEM';
- set @have_spider_alloc_mem_plugin := 0;
- select @have_spider_alloc_mem_plugin := 1 from mysql.plugin where name = 'spider_alloc_mem';
- if @have_spider_i_s_alloc_mem_plugin = 0 then
- if @have_spider_alloc_mem_plugin = 1 then
- -- spider_alloc_mem plugin is present in mysql.plugin but not in
- -- information_schema.plugins. Remove spider_alloc_mem plugin entry
- -- in mysql.plugin first.
- delete from mysql.plugin where name = 'spider_alloc_mem';
- end if;
- -- Install spider_alloc_mem plugin
- if @win_plugin = 0 then
- install plugin spider_alloc_mem soname 'ha_spider.so';
- else
- install plugin spider_alloc_mem soname 'ha_spider.dll';
- end if;
- end if;
- set @have_spider_direct_sql_udf := 0;
- select @have_spider_direct_sql_udf := 1 from mysql.func where name = 'spider_direct_sql';
- if @have_spider_direct_sql_udf = 0 then
- if @win_plugin = 0 then
- create function spider_direct_sql returns int soname 'ha_spider.so';
- else
- create function spider_direct_sql returns int soname 'ha_spider.dll';
- end if;
- end if;
- set @have_spider_bg_direct_sql_udf := 0;
- select @have_spider_bg_direct_sql_udf := 1 from mysql.func where name = 'spider_bg_direct_sql';
- if @have_spider_bg_direct_sql_udf = 0 then
- if @win_plugin = 0 then
- create aggregate function spider_bg_direct_sql returns int soname 'ha_spider.so';
- else
- create aggregate function spider_bg_direct_sql returns int soname 'ha_spider.dll';
- end if;
- end if;
- set @have_spider_ping_table_udf := 0;
- select @have_spider_ping_table_udf := 1 from mysql.func where name = 'spider_ping_table';
- if @have_spider_ping_table_udf = 0 then
- if @win_plugin = 0 then
- create function spider_ping_table returns int soname 'ha_spider.so';
- else
- create function spider_ping_table returns int soname 'ha_spider.dll';
- end if;
- end if;
- set @have_spider_copy_tables_udf := 0;
- select @have_spider_copy_tables_udf := 1 from mysql.func where name = 'spider_copy_tables';
- if @have_spider_copy_tables_udf = 0 then
- if @win_plugin = 0 then
- create function spider_copy_tables returns int soname 'ha_spider.so';
- else
- create function spider_copy_tables returns int soname 'ha_spider.dll';
- end if;
- end if;
-
- set @have_spider_flush_table_mon_cache_udf := 0;
- select @have_spider_flush_table_mon_cache_udf := 1 from mysql.func where name = 'spider_flush_table_mon_cache';
- if @have_spider_flush_table_mon_cache_udf = 0 then
- if @win_plugin = 0 then
- create function spider_flush_table_mon_cache returns int soname 'ha_spider.so';
- else
- create function spider_flush_table_mon_cache returns int soname 'ha_spider.dll';
- end if;
- end if;
-
end;//
delimiter ;
call mysql.spider_plugin_installer;
diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc
index e7e48b40add..1e973493ba8 100644
--- a/storage/spider/spd_conn.cc
+++ b/storage/spider/spd_conn.cc
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019, 2020, 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
@@ -91,6 +92,9 @@ extern PSI_thread_key spd_key_thd_bg_mon;
/* UTC time zone for timestamp columns */
extern Time_zone *UTC;
+extern sql_mode_t full_sql_mode;
+extern sql_mode_t pushdown_sql_mode;
+
HASH spider_open_connections;
uint spider_open_connections_id;
HASH spider_ipport_conns;
@@ -148,6 +152,8 @@ int spider_reset_conn_setted_parameter(
DBUG_ENTER("spider_reset_conn_setted_parameter");
conn->autocommit = spider_param_remote_autocommit();
conn->sql_log_off = spider_param_remote_sql_log_off();
+ conn->wait_timeout = spider_param_remote_wait_timeout(thd);
+ conn->sql_mode = full_sql_mode + 1;
if (thd && spider_param_remote_time_zone())
{
int tz_length = strlen(spider_param_remote_time_zone());
@@ -1428,6 +1434,32 @@ void spider_conn_queue_sql_log_off(
DBUG_VOID_RETURN;
}
+void spider_conn_queue_wait_timeout(
+ SPIDER_CONN *conn,
+ int wait_timeout
+) {
+ DBUG_ENTER("spider_conn_queue_wait_timeout");
+ DBUG_PRINT("info", ("spider conn=%p", conn));
+ if (wait_timeout > 0)
+ {
+ conn->queued_wait_timeout = TRUE;
+ conn->queued_wait_timeout_val = wait_timeout;
+ }
+ DBUG_VOID_RETURN;
+}
+
+void spider_conn_queue_sql_mode(
+ SPIDER_CONN *conn,
+ sql_mode_t sql_mode
+) {
+ DBUG_ENTER("spider_conn_queue_sql_mode");
+ DBUG_PRINT("info", ("spider conn=%p", conn));
+ DBUG_ASSERT(!(sql_mode & ~full_sql_mode));
+ conn->queued_sql_mode = TRUE;
+ conn->queued_sql_mode_val = (sql_mode & pushdown_sql_mode);
+ DBUG_VOID_RETURN;
+}
+
void spider_conn_queue_time_zone(
SPIDER_CONN *conn,
Time_zone *time_zone
@@ -1483,6 +1515,8 @@ void spider_conn_clear_queue(
conn->queued_semi_trx_isolation = FALSE;
conn->queued_autocommit = FALSE;
conn->queued_sql_log_off = FALSE;
+ conn->queued_wait_timeout = FALSE;
+ conn->queued_sql_mode = FALSE;
conn->queued_time_zone = FALSE;
conn->queued_trx_start = FALSE;
conn->queued_xa_start = FALSE;
@@ -2824,23 +2858,20 @@ void *spider_bg_conn_action(
{
switch (conn->bg_simple_action)
{
- case SPIDER_BG_SIMPLE_CONNECT:
+ case SPIDER_SIMPLE_CONNECT:
conn->db_conn->bg_connect();
break;
- case SPIDER_BG_SIMPLE_DISCONNECT:
+ case SPIDER_SIMPLE_DISCONNECT:
conn->db_conn->bg_disconnect();
break;
- case SPIDER_BG_SIMPLE_RECORDS:
- DBUG_PRINT("info",("spider bg simple records"));
+ default:
spider = (ha_spider*) conn->bg_target;
*conn->bg_error_num =
- spider->dbton_handler[conn->dbton_id]->
- show_records(conn->link_idx);
- break;
- default:
+ spider_db_simple_action(conn->bg_simple_action,
+ spider->dbton_handler[conn->dbton_id], conn->link_idx);
break;
}
- conn->bg_simple_action = SPIDER_BG_SIMPLE_NO_ACTION;
+ conn->bg_simple_action = SPIDER_SIMPLE_NO_ACTION;
if (conn->bg_caller_wait)
{
pthread_mutex_lock(&conn->bg_conn_sync_mutex);
@@ -4556,17 +4587,18 @@ SPIDER_IP_PORT_CONN* spider_create_ipport_conn(SPIDER_CONN *conn)
goto err_malloc_key;
}
- ret->key = (char *) my_malloc(ret->key_len, MY_ZEROFILL | MY_WME);
+ ret->key = (char *) my_malloc(ret->key_len + conn->tgt_host_length + 1,
+ MY_ZEROFILL | MY_WME);
if (!ret->key) {
pthread_cond_destroy(&ret->cond);
pthread_mutex_destroy(&ret->mutex);
goto err_malloc_key;
}
+ ret->remote_ip_str = ret->key + ret->key_len;
memcpy(ret->key, conn->conn_key, ret->key_len);
- strncpy(ret->remote_ip_str, conn->tgt_host, sizeof(ret->remote_ip_str));
- ret->remote_ip_str[sizeof ret->remote_ip_str - 1] = '\0';
+ memcpy(ret->remote_ip_str, conn->tgt_host, conn->tgt_host_length);
ret->remote_port = conn->tgt_port;
ret->conn_id = conn->conn_id;
ret->ip_port_count = 1; // init
diff --git a/storage/spider/spd_conn.h b/storage/spider/spd_conn.h
index a066da6a5ea..1612593a1cb 100644
--- a/storage/spider/spd_conn.h
+++ b/storage/spider/spd_conn.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -17,10 +18,13 @@
#define SPIDER_LOCK_MODE_SHARED 1
#define SPIDER_LOCK_MODE_EXCLUSIVE 2
-#define SPIDER_BG_SIMPLE_NO_ACTION 0
-#define SPIDER_BG_SIMPLE_CONNECT 1
-#define SPIDER_BG_SIMPLE_DISCONNECT 2
-#define SPIDER_BG_SIMPLE_RECORDS 3
+#define SPIDER_SIMPLE_NO_ACTION 0
+#define SPIDER_SIMPLE_CONNECT 1
+#define SPIDER_SIMPLE_DISCONNECT 2
+#define SPIDER_SIMPLE_RECORDS 3
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+#define SPIDER_SIMPLE_CHECKSUM_TABLE 4
+#endif
uchar *spider_conn_get_key(
SPIDER_CONN *conn,
@@ -132,6 +136,16 @@ void spider_conn_queue_sql_log_off(
bool sql_log_off
);
+void spider_conn_queue_wait_timeout(
+ SPIDER_CONN *conn,
+ int wait_timeout
+);
+
+void spider_conn_queue_sql_mode(
+ SPIDER_CONN *conn,
+ sql_mode_t sql_mode
+);
+
void spider_conn_queue_time_zone(
SPIDER_CONN *conn,
Time_zone *time_zone
diff --git a/storage/spider/spd_copy_tables.cc b/storage/spider/spd_copy_tables.cc
index 13c53220b16..319b02462b1 100644
--- a/storage/spider/spd_copy_tables.cc
+++ b/storage/spider/spd_copy_tables.cc
@@ -216,7 +216,7 @@ int spider_udf_parse_copy_tables_param(
) {
int error_num = 0;
char *param_string = NULL;
- char *sprit_ptr[2];
+ char *sprit_ptr;
char *tmp_ptr, *tmp_ptr2, *start_ptr;
int title_length;
SPIDER_PARAM_STRING_PARSE param_string_parse;
@@ -243,23 +243,17 @@ int spider_udf_parse_copy_tables_param(
}
DBUG_PRINT("info",("spider param_string=%s", param_string));
- sprit_ptr[0] = param_string;
+ sprit_ptr = param_string;
param_string_parse.init(param_string, ER_SPIDER_INVALID_UDF_PARAM_NUM);
- while (sprit_ptr[0])
+ while (sprit_ptr)
{
- if ((sprit_ptr[1] = strchr(sprit_ptr[0], ',')))
- {
- *sprit_ptr[1] = '\0';
- sprit_ptr[1]++;
- }
- tmp_ptr = sprit_ptr[0];
- sprit_ptr[0] = sprit_ptr[1];
+ tmp_ptr = sprit_ptr;
while (*tmp_ptr == ' ' || *tmp_ptr == '\r' ||
*tmp_ptr == '\n' || *tmp_ptr == '\t')
tmp_ptr++;
if (*tmp_ptr == '\0')
- continue;
+ break;
title_length = 0;
start_ptr = tmp_ptr;
@@ -272,6 +266,11 @@ int spider_udf_parse_copy_tables_param(
start_ptr++;
}
param_string_parse.set_param_title(tmp_ptr, tmp_ptr + title_length);
+ if ((error_num = param_string_parse.get_next_parameter_head(
+ start_ptr, &sprit_ptr)))
+ {
+ goto error;
+ }
switch (title_length)
{
diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc
index 5a8c7492654..2af430101ca 100644
--- a/storage/spider/spd_db_conn.cc
+++ b/storage/spider/spd_db_conn.cc
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019, 2022, 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
@@ -361,6 +362,20 @@ int spider_db_conn_queue_action(
append_sql_log_off(&sql_str, conn->queued_sql_log_off_val))
) ||
(
+ conn->queued_wait_timeout &&
+ conn->queued_wait_timeout_val != conn->wait_timeout &&
+ conn->db_conn->set_wait_timeout_in_bulk_sql() &&
+ (error_num = spider_dbton[conn->dbton_id].db_util->
+ append_wait_timeout(&sql_str, conn->queued_wait_timeout_val))
+ ) ||
+ (
+ conn->queued_sql_mode &&
+ conn->queued_sql_mode_val != conn->sql_mode &&
+ conn->db_conn->set_sql_mode_in_bulk_sql() &&
+ (error_num = spider_dbton[conn->dbton_id].db_util->
+ append_sql_mode(&sql_str, conn->queued_sql_mode_val))
+ ) ||
+ (
conn->queued_time_zone &&
conn->queued_time_zone_val != conn->time_zone &&
conn->db_conn->set_time_zone_in_bulk_sql() &&
@@ -433,6 +448,24 @@ int spider_db_conn_queue_action(
DBUG_RETURN(error_num);
}
if (
+ conn->queued_wait_timeout &&
+ conn->queued_wait_timeout_val != conn->wait_timeout &&
+ !conn->db_conn->set_wait_timeout_in_bulk_sql() &&
+ (error_num = spider_dbton[conn->dbton_id].db_util->
+ append_wait_timeout(&sql_str, conn->queued_wait_timeout_val))
+ ) {
+ DBUG_RETURN(error_num);
+ }
+ if (
+ conn->queued_sql_mode &&
+ conn->queued_sql_mode_val != conn->sql_mode &&
+ !conn->db_conn->set_sql_mode_in_bulk_sql() &&
+ (error_num = spider_dbton[conn->dbton_id].db_util->
+ append_sql_mode(&sql_str, conn->queued_sql_mode_val))
+ ) {
+ DBUG_RETURN(error_num);
+ }
+ if (
conn->queued_time_zone &&
conn->queued_time_zone_val != conn->time_zone &&
!conn->db_conn->set_time_zone_in_bulk_sql() &&
@@ -499,6 +532,20 @@ int spider_db_conn_queue_action(
conn->trx_isolation));
}
+ if (
+ conn->queued_wait_timeout &&
+ conn->queued_wait_timeout_val != conn->wait_timeout
+ ) {
+ conn->wait_timeout = conn->queued_wait_timeout_val;
+ }
+
+ if (
+ conn->queued_sql_mode &&
+ conn->queued_sql_mode_val != conn->sql_mode
+ ) {
+ conn->sql_mode = conn->queued_sql_mode_val;
+ }
+
if (conn->queued_autocommit)
{
if (conn->queued_autocommit_val && conn->autocommit != 1)
@@ -1353,7 +1400,7 @@ int spider_db_append_name_with_quote_str(
) {
DBUG_ENTER("spider_db_append_name_with_quote_str");
DBUG_RETURN(spider_db_append_name_with_quote_str_internal(
- str, name, strlen(name), dbton_id));
+ str, name, strlen(name), system_charset_info, dbton_id));
}
int spider_db_append_name_with_quote_str(
@@ -1363,13 +1410,25 @@ int spider_db_append_name_with_quote_str(
) {
DBUG_ENTER("spider_db_append_name_with_quote_str");
DBUG_RETURN(spider_db_append_name_with_quote_str_internal(
- str, name.str, name.length, dbton_id));
+ str, name.str, name.length, system_charset_info, dbton_id));
+}
+
+int spider_db_append_name_with_quote_str_internal(
+ spider_string *str,
+ const char *name,
+ int length,
+ uint dbton_id
+) {
+ DBUG_ENTER("spider_db_append_name_with_quote_str_internal");
+ DBUG_RETURN(spider_db_append_name_with_quote_str_internal(
+ str, name, length, system_charset_info, dbton_id));
}
int spider_db_append_name_with_quote_str_internal(
spider_string *str,
const char *name,
int length,
+ CHARSET_INFO *cs,
uint dbton_id
) {
int error_num;
@@ -1380,9 +1439,9 @@ int spider_db_append_name_with_quote_str_internal(
{
head_code = *name;
#ifdef SPIDER_HAS_MY_CHARLEN
- if ((length = my_charlen(system_charset_info, name, name_end)) < 1)
+ if ((length = my_charlen(cs, name, name_end)) < 1)
#else
- if (!(length = my_mbcharlen(system_charset_info, (uchar) head_code)))
+ if (!(length = my_mbcharlen(cs, (uchar) head_code)))
#endif
{
my_message(ER_SPIDER_WRONG_CHARACTER_IN_NAME_NUM,
@@ -1399,7 +1458,7 @@ int spider_db_append_name_with_quote_str_internal(
DBUG_RETURN(error_num);
}
} else {
- if (str->append(name, length, system_charset_info))
+ if (str->append(name, length, cs))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
}
@@ -1619,6 +1678,7 @@ int spider_db_append_key_where_internal(
int key_count;
uint length;
uint store_length;
+ uint current_pos = str->length();
const uchar *ptr, *another_ptr;
const key_range *use_key, *another_key;
KEY_PART_INFO *key_part;
@@ -1762,6 +1822,7 @@ int spider_db_append_key_where_internal(
key_part++,
key_count++
) {
+ DBUG_PRINT("info", ("spider tgt_key_part_map=%lu", tgt_key_part_map));
store_length = key_part->store_length;
field = key_part->field;
key_name_length = dbton_share->get_column_name_length(field->field_index);
@@ -1787,7 +1848,6 @@ int spider_db_append_key_where_internal(
#endif
}
} else {
- DBUG_PRINT("info", ("spider tgt_key_part_map=%lu", tgt_key_part_map));
if (tgt_key_part_map > 1)
key_eq = TRUE;
else
@@ -1797,7 +1857,8 @@ int spider_db_append_key_where_internal(
(key_eq && use_key == start_key) ||
(!key_eq && start_key_part_map)
) {
- bool tgt_final = (use_key == start_key && tgt_key_part_map == 1);
+ bool tgt_final = (use_key == start_key &&
+ (tgt_key_part_map == 1 || !end_key_part_map));
ptr = start_key->key + length;
if (
(error_num = dbton_hdl->append_is_null_part(sql_type, key_part,
@@ -1841,10 +1902,23 @@ int spider_db_append_key_where_internal(
if (use_key == start_key)
{
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_EQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -1902,16 +1976,29 @@ int spider_db_append_key_where_internal(
if (use_key == start_key)
{
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (tgt_key_part_map == 1 || !end_key_part_map)
{
if (str->reserve(SPIDER_SQL_EQUAL_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
}
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_EQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -1968,16 +2055,29 @@ int spider_db_append_key_where_internal(
if (use_key == start_key)
{
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (tgt_key_part_map == 1 || !end_key_part_map)
{
if (str->reserve(SPIDER_SQL_GT_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_GT_STR, SPIDER_SQL_GT_LEN);
}
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_GT_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_GT_STR, SPIDER_SQL_GT_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -2035,16 +2135,29 @@ int spider_db_append_key_where_internal(
if (use_key == start_key)
{
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (tgt_key_part_map == 1 || !end_key_part_map)
{
if (str->reserve(SPIDER_SQL_LT_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
}
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_LT_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -2100,17 +2213,31 @@ int spider_db_append_key_where_internal(
if (use_key == start_key)
{
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (tgt_key_part_map == 1 || !end_key_part_map)
{
if (str->reserve(SPIDER_SQL_LTEQUAL_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_LTEQUAL_STR,
SPIDER_SQL_LTEQUAL_LEN);
}
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_LTEQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_LTEQUAL_STR,
+ SPIDER_SQL_LTEQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -2238,17 +2365,31 @@ int spider_db_append_key_where_internal(
if (use_key == start_key)
{
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (tgt_key_part_map == 1 || !end_key_part_map)
{
if (str->reserve(SPIDER_SQL_GTEQUAL_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_GTEQUAL_STR,
SPIDER_SQL_GTEQUAL_LEN);
}
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_GTEQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_GTEQUAL_STR,
+ SPIDER_SQL_GTEQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -2279,12 +2420,14 @@ int spider_db_append_key_where_internal(
str_part2->q_append(SPIDER_SQL_AND_STR,
SPIDER_SQL_AND_LEN);
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
if (use_key == start_key)
{
if (str_part->reserve(SPIDER_SQL_COMMA_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str_part->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
}
+#endif
}
}
@@ -2339,17 +2482,23 @@ int spider_db_append_key_where_internal(
if (use_key == end_key)
{
-/*
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
{
if (str->reserve(SPIDER_SQL_EQUAL_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
-*/
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE, share->access_charset))
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#endif
}
}
} else {
@@ -2397,16 +2546,29 @@ int spider_db_append_key_where_internal(
if (use_key == end_key)
{
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (tgt_key_part_map == 1 || !start_key_part_map)
{
if (str->reserve(SPIDER_SQL_LT_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
}
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_LT_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_LT_STR, SPIDER_SQL_LT_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr,
+ false, share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
break;
@@ -2442,17 +2604,31 @@ int spider_db_append_key_where_internal(
if (use_key == end_key)
{
- if (tgt_key_part_map == 1)
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
+ if (tgt_key_part_map == 1 || !start_key_part_map)
{
if (str->reserve(SPIDER_SQL_LTEQUAL_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_LTEQUAL_STR,
SPIDER_SQL_LTEQUAL_LEN);
}
- if (spider_dbton[dbton_id].db_util->append_column_value(
- spider, str_part, field, ptr, FALSE,
- share->access_charset))
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr, false,
+ share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_LTEQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_LTEQUAL_STR,
+ SPIDER_SQL_LTEQUAL_LEN);
+ if (spider_dbton[dbton_id].db_util->
+ append_column_value(spider, str_part, field, ptr,
+ false, share->access_charset))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+#endif
}
}
break;
@@ -2470,12 +2646,14 @@ int spider_db_append_key_where_internal(
str_part2->q_append(SPIDER_SQL_AND_STR,
SPIDER_SQL_AND_LEN);
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
if (use_key == end_key)
{
if (str_part->reserve(SPIDER_SQL_COMMA_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str_part->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
}
+#endif
}
}
if (use_both && (!start_key_part_map || !end_key_part_map))
@@ -2489,6 +2667,11 @@ int spider_db_append_key_where_internal(
DBUG_RETURN(error_num);
end:
+ if (spider->multi_range_num && current_pos == str->length())
+ {
+ DBUG_PRINT("info", ("spider no key where condition"));
+ dbton_hdl->no_where_cond = TRUE;
+ }
/* use condition */
if (dbton_hdl->append_condition_part(NULL, 0, sql_type, FALSE))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
@@ -2533,6 +2716,22 @@ int spider_db_append_key_where(
DBUG_RETURN(0);
}
+int spider_db_append_charset_name_before_string(
+ spider_string *str,
+ CHARSET_INFO *cs
+) {
+ const char *csname = cs->csname;
+ uint csname_length = strlen(csname);
+ DBUG_ENTER("spider_db_append_charset_name_before_string");
+ if (str->reserve(SPIDER_SQL_UNDERSCORE_LEN + csname_length))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_UNDERSCORE_STR, SPIDER_SQL_UNDERSCORE_LEN);
+ str->q_append(csname, csname_length);
+ DBUG_RETURN(0);
+}
+
#ifdef HANDLER_HAS_DIRECT_AGGREGATE
int spider_db_refetch_for_item_sum_funcs(
ha_spider *spider
@@ -5708,7 +5907,39 @@ int spider_db_show_table_status(
DBUG_RETURN(error_num);
}
-int spider_db_show_records(
+int spider_db_simple_action(
+ uint simple_action,
+ spider_db_handler *db_handler,
+ int link_idx
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_simple_action");
+ switch (simple_action)
+ {
+ case SPIDER_SIMPLE_RECORDS:
+ DBUG_PRINT("info",("spider simple records"));
+ error_num = db_handler->show_records(
+ link_idx
+ );
+ break;
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ case SPIDER_SIMPLE_CHECKSUM_TABLE:
+ DBUG_PRINT("info",("spider simple checksum_table"));
+ error_num = db_handler->checksum_table(
+ link_idx
+ );
+ break;
+#endif
+ default:
+ DBUG_ASSERT(0);
+ error_num = HA_ERR_CRASHED;
+ break;
+ }
+ DBUG_RETURN(error_num);
+}
+
+int spider_db_simple_action(
+ uint simple_action,
ha_spider *spider,
int link_idx,
bool pre_call
@@ -5716,7 +5947,7 @@ int spider_db_show_records(
int error_num;
THD *thd = spider->trx->thd;
SPIDER_CONN *conn;
- DBUG_ENTER("spider_db_show_records");
+ DBUG_ENTER("spider_db_simple_action");
if (pre_call)
{
if (spider_param_bgs_mode(thd, spider->share->bgs_mode))
@@ -5729,18 +5960,20 @@ int spider_db_show_records(
conn = spider->conns[link_idx];
if (!(error_num = spider_create_conn_thread(conn)))
{
- spider_bg_conn_simple_action(conn, SPIDER_BG_SIMPLE_RECORDS, FALSE,
+ spider_bg_conn_simple_action(conn, simple_action, FALSE,
spider, link_idx, (int *) &spider->result_list.bgs_error);
}
} else {
conn = spider->conns[link_idx];
- error_num = spider->dbton_handler[conn->dbton_id]->show_records(
+ error_num = spider_db_simple_action(
+ simple_action,
+ spider->dbton_handler[conn->dbton_id],
link_idx
);
}
} else {
conn = spider->conns[link_idx];
- if (spider->use_pre_records)
+ if (spider->use_pre_action)
{
if (spider_param_bgs_mode(thd, spider->share->bgs_mode))
{
@@ -5754,7 +5987,9 @@ int spider_db_show_records(
error_num = 0;
}
} else {
- error_num = spider->dbton_handler[conn->dbton_id]->show_records(
+ error_num = spider_db_simple_action(
+ simple_action,
+ spider->dbton_handler[conn->dbton_id],
link_idx
);
}
@@ -5782,7 +6017,7 @@ void spider_db_set_cardinarity(
{
key_part = &key_info->key_part[roop_count2];
field = key_part->field;
- rec_per_key = (ha_rows) share->records /
+ rec_per_key = (ha_rows) share->stat.records /
share->cardinality[field->field_index];
if (rec_per_key > ~(ulong) 0)
key_info->rec_per_key[roop_count2] = ~(ulong) 0;
@@ -5927,6 +6162,7 @@ int spider_db_bulk_insert_init(
int spider_db_bulk_insert(
ha_spider *spider,
TABLE *table,
+ ha_copy_info *copy_info,
bool bulk_end
) {
int error_num, first_insert_link_idx = -1;
@@ -5971,6 +6207,7 @@ int spider_db_bulk_insert(
if (!spider->is_bulk_access_clone)
{
#endif
+ bool insert_info = FALSE;
for (
roop_count2 = spider_conn_link_idx_next(share->link_statuses,
spider->conn_link_idx, -1, share->link_count,
@@ -6107,6 +6344,11 @@ int spider_db_bulk_insert(
DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
conn->mta_conn_mutex_lock_already = FALSE;
conn->mta_conn_mutex_unlock_later = FALSE;
+ if (!insert_info && copy_info)
+ {
+ insert_info =
+ conn->db_conn->inserted_info(dbton_handler, copy_info);
+ }
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
if (conn->conn_kind != SPIDER_CONN_KIND_MYSQL)
{
@@ -6904,7 +7146,8 @@ int spider_db_direct_update(
TABLE *table,
KEY_MULTI_RANGE *ranges,
uint range_count,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
) {
int error_num, roop_count;
SPIDER_SHARE *share = spider->share;
@@ -7189,6 +7432,8 @@ int spider_db_direct_update(
{
*update_rows = spider->conns[roop_count]->db_conn->affected_rows();
DBUG_PRINT("info", ("spider update_rows = %llu", *update_rows));
+ *found_rows = spider->conns[roop_count]->db_conn->matched_rows();
+ DBUG_PRINT("info", ("spider found_rows = %llu", *found_rows));
counted = TRUE;
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -7210,6 +7455,8 @@ int spider_db_direct_update(
{
*update_rows = conn->db_conn->affected_rows();
DBUG_PRINT("info", ("spider update_rows = %llu", *update_rows));
+ *found_rows = conn->db_conn->matched_rows();
+ DBUG_PRINT("info", ("spider found_rows = %llu", *found_rows));
counted = TRUE;
}
result->free_result();
@@ -7251,7 +7498,8 @@ int spider_db_direct_update(
int spider_db_direct_update(
ha_spider *spider,
TABLE *table,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
) {
int error_num, roop_count;
SPIDER_SHARE *share = spider->share;
@@ -7456,6 +7704,8 @@ int spider_db_direct_update(
{
*update_rows = spider->conns[roop_count]->db_conn->affected_rows();
DBUG_PRINT("info", ("spider update_rows = %llu", *update_rows));
+ *found_rows = spider->conns[roop_count]->db_conn->matched_rows();
+ DBUG_PRINT("info", ("spider found_rows = %llu", *found_rows));
counted = TRUE;
}
DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
@@ -7477,7 +7727,8 @@ int spider_db_direct_update(
#ifdef HA_CAN_BULK_ACCESS
int spider_db_bulk_direct_update(
ha_spider *spider,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
) {
int error_num = 0, roop_count, tmp_error_num;
SPIDER_SHARE *share = spider->share;
@@ -7525,6 +7776,8 @@ int spider_db_bulk_direct_update(
{
*update_rows = spider->conns[roop_count]->db_conn->affected_rows();
DBUG_PRINT("info", ("spider update_rows = %llu", *update_rows));
+ *found_rows = spider->conns[roop_count]->db_conn->matched_rows();
+ DBUG_PRINT("info", ("spider found_rows = %llu", *found_rows));
counted = TRUE;
}
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -7546,6 +7799,8 @@ int spider_db_bulk_direct_update(
{
*update_rows = conn->db_conn->affected_rows();
DBUG_PRINT("info", ("spider update_rows = %llu", *update_rows));
+ *found_rows = conn->db_conn->matched_rows();
+ DBUG_PRINT("info", ("spider found_rows = %llu", *found_rows));
counted = TRUE;
}
result->free_result();
@@ -9087,32 +9342,56 @@ int spider_db_open_item_ident(
Field *field = item_ident->cached_table->table->field[
item_ident->cached_field_index];
DBUG_PRINT("info",("spider use cached_field_index"));
- if (!use_fields)
+ DBUG_PRINT("info",("spider const_table=%s",
+ field->table->const_table ? "TRUE" : "FALSE"));
+ if (field->table->const_table)
{
- if (!(field = spider->field_exchange(field)))
- DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
if (str)
{
- if ((error_num = share->dbton_share[dbton_id]->
- append_column_name_with_alias(str, field->field_index,
- alias, alias_length)))
- DBUG_RETURN(error_num);
+ String str_value;
+ String *tmp_str;
+ tmp_str = field->val_str(&str_value);
+ if (!tmp_str)
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN * 2 +
+ tmp_str->length() * 2))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ str->append_escape_string(tmp_str->ptr(), tmp_str->length());
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
}
} else {
- if (str)
+ if (!use_fields)
{
- SPIDER_FIELD_CHAIN *field_chain = fields->get_next_field_chain();
- SPIDER_FIELD_HOLDER *field_holder = field_chain->field_holder;
- spider = field_holder->spider;
- share = spider->share;
- if ((error_num = share->dbton_share[dbton_id]->
- append_column_name_with_alias(str, field->field_index,
- field_holder->alias->ptr(), field_holder->alias->length())))
- DBUG_RETURN(error_num);
+ if (!(field = spider->field_exchange(field)))
+ DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
+ if (str)
+ {
+ if ((error_num = share->dbton_share[dbton_id]->
+ append_column_name_with_alias(str, field->field_index,
+ alias, alias_length)))
+ DBUG_RETURN(error_num);
+ }
} else {
- if ((error_num = fields->add_field(field)))
+ if (str)
{
- DBUG_RETURN(error_num);
+ SPIDER_FIELD_CHAIN *field_chain = fields->get_next_field_chain();
+ SPIDER_FIELD_HOLDER *field_holder = field_chain->field_holder;
+ spider = field_holder->spider;
+ share = spider->share;
+ if ((error_num = share->dbton_share[dbton_id]->
+ append_column_name_with_alias(str, field->field_index,
+ field_holder->alias->ptr(), field_holder->alias->length())))
+ DBUG_RETURN(error_num);
+ } else {
+ if ((error_num = fields->add_field(field)))
+ {
+ DBUG_RETURN(error_num);
+ }
}
}
}
@@ -9139,10 +9418,11 @@ int spider_db_open_item_ident(
str->q_append(alias, alias_length);
#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if ((error_num = spider_dbton[dbton_id].db_util->
- append_name(str, item_ident->field_name.str, field_name_length)))
+ append_escaped_name(str, item_ident->field_name.str,
+ field_name_length)))
#else
if ((error_num = spider_dbton[dbton_id].db_util->
- append_name(str, item_ident->field_name, field_name_length)))
+ append_escaped_name(str, item_ident->field_name, field_name_length)))
#endif
{
DBUG_RETURN(error_num);
@@ -9153,11 +9433,11 @@ int spider_db_open_item_ident(
str->q_append(alias, alias_length);
#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
if ((error_num = spider_dbton[dbton_id].db_util->
- append_name_with_charset(str, item_ident->field_name.str,
+ append_escaped_name_with_charset(str, item_ident->field_name.str,
field_name_length, system_charset_info)))
#else
if ((error_num = spider_dbton[dbton_id].db_util->
- append_name_with_charset(str, item_ident->field_name,
+ append_escaped_name_with_charset(str, item_ident->field_name,
field_name_length, system_charset_info)))
#endif
{
@@ -9182,46 +9462,72 @@ int spider_db_open_item_field(
Field *field = item_field->field;
SPIDER_SHARE *share = spider->share;
DBUG_ENTER("spider_db_open_item_field");
- if (field && !field->table->const_table)
+ if (field)
{
DBUG_PRINT("info",("spider field=%p", field));
DBUG_PRINT("info",("spider db=%s", field->table->s->db.str));
- DBUG_PRINT("info",("spider table_name=%s", field->table->s->table_name.str));
- DBUG_PRINT("info",("spider tmp_table=%u", field->table->s->tmp_table));
- if (field->table->s->tmp_table != INTERNAL_TMP_TABLE)
+ DBUG_PRINT("info",("spider table_name=%s",
+ field->table->s->table_name.str));
+ DBUG_PRINT("info",("spider const_table=%s",
+ field->table->const_table ? "TRUE" : "FALSE"));
+ if (field->table->const_table)
{
- if (!use_fields)
+ if (str)
{
- if (!(field = spider->field_exchange(field)))
- DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
- if (str)
+ String str_value;
+ String *tmp_str;
+ tmp_str = field->val_str(&str_value);
+ if (!tmp_str)
{
- if ((error_num = share->dbton_share[dbton_id]->
- append_column_name_with_alias(str, field->field_index,
- alias, alias_length)))
- DBUG_RETURN(error_num);
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
- DBUG_RETURN(0);
- } else {
- if (str)
+ if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN * 2 +
+ tmp_str->length() * 2))
{
- SPIDER_FIELD_CHAIN *field_chain = fields->get_next_field_chain();
- SPIDER_FIELD_HOLDER *field_holder = field_chain->field_holder;
- spider = field_holder->spider;
- share = spider->share;
- field = spider->field_exchange(field);
- DBUG_ASSERT(field);
- if ((error_num = share->dbton_share[dbton_id]->
- append_column_name_with_alias(str, field->field_index,
- field_holder->alias->ptr(), field_holder->alias->length())))
- DBUG_RETURN(error_num);
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ str->append_escape_string(tmp_str->ptr(), tmp_str->length());
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ }
+ DBUG_RETURN(0);
+ } else {
+ DBUG_PRINT("info",("spider tmp_table=%u", field->table->s->tmp_table));
+ if (field->table->s->tmp_table != INTERNAL_TMP_TABLE)
+ {
+ if (!use_fields)
+ {
+ if (!(field = spider->field_exchange(field)))
+ DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
+ if (str)
+ {
+ if ((error_num = share->dbton_share[dbton_id]->
+ append_column_name_with_alias(str, field->field_index,
+ alias, alias_length)))
+ DBUG_RETURN(error_num);
+ }
+ DBUG_RETURN(0);
} else {
- if ((error_num = fields->add_field(field)))
+ if (str)
{
- DBUG_RETURN(error_num);
+ SPIDER_FIELD_CHAIN *field_chain = fields->get_next_field_chain();
+ SPIDER_FIELD_HOLDER *field_holder = field_chain->field_holder;
+ spider = field_holder->spider;
+ share = spider->share;
+ field = spider->field_exchange(field);
+ DBUG_ASSERT(field);
+ if ((error_num = share->dbton_share[dbton_id]->
+ append_column_name_with_alias(str, field->field_index,
+ field_holder->alias->ptr(), field_holder->alias->length())))
+ DBUG_RETURN(error_num);
+ } else {
+ if ((error_num = fields->add_field(field)))
+ {
+ DBUG_RETURN(error_num);
+ }
}
+ DBUG_RETURN(0);
}
- DBUG_RETURN(0);
}
}
}
@@ -9417,6 +9723,14 @@ int spider_db_open_item_string(
goto end;
}
}
+ if (str->charset() != tmp_str2->charset())
+ {
+ if ((error_num = spider_db_append_charset_name_before_string(str,
+ tmp_str2->charset())))
+ {
+ goto end;
+ }
+ }
if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN * 2 +
tmp_str2->length() * 2))
{
@@ -9426,7 +9740,8 @@ int spider_db_open_item_string(
if (!thd)
tmp_str.mem_calc();
str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
- str->append_escape_string(tmp_str2->ptr(), tmp_str2->length());
+ str->append_escape_string(tmp_str2->ptr(), tmp_str2->length(),
+ tmp_str2->charset());
if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN))
{
error_num = HA_ERR_OUT_OF_MEM;
diff --git a/storage/spider/spd_db_conn.h b/storage/spider/spd_db_conn.h
index 8fbca8ff0aa..2abe62fc001 100644
--- a/storage/spider/spd_db_conn.h
+++ b/storage/spider/spd_db_conn.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -435,6 +436,14 @@ int spider_db_append_name_with_quote_str_internal(
uint dbton_id
);
+int spider_db_append_name_with_quote_str_internal(
+ spider_string *str,
+ const char *name,
+ int length,
+ CHARSET_INFO *cs,
+ uint dbton_id
+);
+
int spider_db_append_select(
ha_spider *spider
);
@@ -478,6 +487,11 @@ int spider_db_append_key_where(
ha_spider *spider
);
+int spider_db_append_charset_name_before_string(
+ spider_string *str,
+ CHARSET_INFO *cs
+);
+
#ifdef HANDLER_HAS_DIRECT_AGGREGATE
int spider_db_refetch_for_item_sum_funcs(
ha_spider *spider
@@ -698,7 +712,14 @@ int spider_db_show_table_status(
uint flag
);
-int spider_db_show_records(
+int spider_db_simple_action(
+ uint simple_action,
+ spider_db_handler *db_handler,
+ int link_idx
+);
+
+int spider_db_simple_action(
+ uint simple_action,
ha_spider *spider,
int link_idx,
bool pre_call
@@ -731,6 +752,7 @@ int spider_db_bulk_insert_init(
int spider_db_bulk_insert(
ha_spider *spider,
TABLE *table,
+ ha_copy_info *copy_info,
bool bulk_end
);
@@ -774,13 +796,15 @@ int spider_db_direct_update(
TABLE *table,
KEY_MULTI_RANGE *ranges,
uint range_count,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
);
#else
int spider_db_direct_update(
ha_spider *spider,
TABLE *table,
- ha_rows *update_rows
+ ha_rows *update_rows,
+ ha_rows *found_rows
);
#endif
#endif
diff --git a/storage/spider/spd_db_handlersocket.cc b/storage/spider/spd_db_handlersocket.cc
index 1e42838f40a..b8e4c0e705a 100644
--- a/storage/spider/spd_db_handlersocket.cc
+++ b/storage/spider/spd_db_handlersocket.cc
@@ -740,15 +740,7 @@ SPIDER_DB_ROW *spider_db_handlersocket_result::fetch_row_from_tmp_table(
int spider_db_handlersocket_result::fetch_table_status(
int mode,
- ha_rows &records,
- ulong &mean_rec_length,
- ulonglong &data_file_length,
- ulonglong &max_data_file_length,
- ulonglong &index_file_length,
- ulonglong &auto_increment_value,
- time_t &create_time,
- time_t &update_time,
- time_t &check_time
+ ha_statistics &stat
) {
DBUG_ENTER("spider_db_handlersocket_result::fetch_table_status");
DBUG_PRINT("info",("spider this=%p", this));
@@ -1663,6 +1655,22 @@ uint spider_db_handlersocket::affected_rows()
DBUG_RETURN((uint) my_strtoll10(hs_row->begin(), (char**) NULL, &error_num));
}
+uint spider_db_handlersocket::matched_rows()
+{
+ DBUG_ENTER("spider_db_handlersocket::matched_rows");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(0);
+}
+
+bool spider_db_handlersocket::inserted_info(
+ spider_db_handler *handler,
+ ha_copy_info *copy_info
+) {
+ DBUG_ENTER("spider_db_handlersocket::inserted_info");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(FALSE);
+}
+
ulonglong spider_db_handlersocket::last_insert_id()
{
DBUG_ENTER("spider_db_handlersocket::last_insert_id");
@@ -1839,6 +1847,40 @@ int spider_db_handlersocket::set_sql_log_off(
DBUG_RETURN(0);
}
+bool spider_db_handlersocket::set_wait_timeout_in_bulk_sql()
+{
+ DBUG_ENTER("spider_db_handlersocket::set_wait_timeout_in_bulk_sql");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(FALSE);
+}
+
+int spider_db_handlersocket::set_wait_timeout(
+ int wait_timeout,
+ int *need_mon
+) {
+ DBUG_ENTER("spider_db_handlersocket::set_wait_timeout");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
+bool spider_db_handlersocket::set_sql_mode_in_bulk_sql()
+{
+ DBUG_ENTER("spider_db_handlersocket::set_sql_mode_in_bulk_sql");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(FALSE);
+}
+
+int spider_db_handlersocket::set_sql_mode(
+ sql_mode_t sql_mode,
+ int *need_mon
+) {
+ DBUG_ENTER("spider_db_handlersocket::set_sql_mode");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
bool spider_db_handlersocket::set_time_zone_in_bulk_sql()
{
DBUG_ENTER("spider_db_handlersocket::set_time_zone_in_bulk_sql");
@@ -2478,6 +2520,57 @@ int spider_db_handlersocket_util::append_name_with_charset(
DBUG_RETURN(0);
}
+int spider_db_handlersocket_util::append_escaped_name(
+ spider_string *str,
+ const char *name,
+ uint name_length
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_handlersocket_util::append_name");
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN * 2 + name_length * 2))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ if ((error_num = spider_db_append_name_with_quote_str_internal(
+ str, name, name_length, dbton_id)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ DBUG_RETURN(0);
+}
+
+int spider_db_handlersocket_util::append_escaped_name_with_charset(
+ spider_string *str,
+ const char *name,
+ uint name_length,
+ CHARSET_INFO *name_charset
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_handlersocket_util::append_name_with_charset");
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN * 2 + name_length * 2))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ if ((error_num = spider_db_append_name_with_quote_str_internal(
+ str, name, name_length, name_charset, dbton_id)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ DBUG_RETURN(0);
+}
+
bool spider_db_handlersocket_util::is_name_quote(
const char head_code
) {
@@ -2675,6 +2768,26 @@ int spider_db_handlersocket_util::append_sql_log_off(
DBUG_RETURN(0);
}
+int spider_db_handlersocket_util::append_wait_timeout(
+ spider_string *str,
+ int wait_timeout
+) {
+ DBUG_ENTER("spider_db_handlersocket_util::append_wait_timeout");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
+int spider_db_handlersocket_util::append_sql_mode(
+ spider_string *str,
+ sql_mode_t sql_mode
+) {
+ DBUG_ENTER("spider_db_handlersocket_util::append_sql_mode");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
int spider_db_handlersocket_util::append_time_zone(
spider_string *str,
Time_zone *time_zone
@@ -5145,7 +5258,7 @@ int spider_handlersocket_handler::append_open_handler(
share->tgt_dbs[spider->conn_link_idx[link_idx]],
share->tgt_table_names[spider->conn_link_idx[link_idx]],
spider->active_index < MAX_KEY ?
- table->s->key_info[spider->active_index].name :
+ table->key_info[spider->active_index].name :
"0",
str->c_ptr_safe(),
&request_key
@@ -5786,15 +5899,7 @@ int spider_handlersocket_handler::show_table_status(
DBUG_ENTER("spider_handlersocket_show_table_status");
res.fetch_table_status(
sts_mode,
- share->records,
- share->mean_rec_length,
- share->data_file_length,
- share->max_data_file_length,
- share->index_file_length,
- auto_increment_value,
- share->create_time,
- share->update_time,
- share->check_time
+ share->stat
);
if (auto_increment_value > share->lgtm_tblhnd_share->auto_increment_value)
{
diff --git a/storage/spider/spd_db_handlersocket.h b/storage/spider/spd_db_handlersocket.h
index d1b59386cbe..19a4a391ed6 100644
--- a/storage/spider/spd_db_handlersocket.h
+++ b/storage/spider/spd_db_handlersocket.h
@@ -34,6 +34,17 @@ public:
uint name_length,
CHARSET_INFO *name_charset
);
+ int append_escaped_name(
+ spider_string *str,
+ const char *name,
+ uint name_length
+ );
+ int append_escaped_name_with_charset(
+ spider_string *str,
+ const char *name,
+ uint name_length,
+ CHARSET_INFO *name_charset
+ );
bool is_name_quote(
const char head_code
);
@@ -59,6 +70,14 @@ public:
spider_string *str,
bool sql_log_off
);
+ int append_wait_timeout(
+ spider_string *str,
+ int wait_timeout
+ );
+ int append_sql_mode(
+ spider_string *str,
+ sql_mode_t sql_mode
+ );
int append_time_zone(
spider_string *str,
Time_zone *time_zone
@@ -211,15 +230,7 @@ public:
);
int fetch_table_status(
int mode,
- ha_rows &records,
- ulong &mean_rec_length,
- ulonglong &data_file_length,
- ulonglong &max_data_file_length,
- ulonglong &index_file_length,
- ulonglong &auto_increment_value,
- time_t &create_time,
- time_t &update_time,
- time_t &check_time
+ ha_statistics &stat
);
int fetch_table_records(
int mode,
@@ -324,6 +335,11 @@ public:
);
int next_result();
uint affected_rows();
+ uint matched_rows();
+ bool inserted_info(
+ spider_db_handler *handler,
+ spider_copy_info *copy_info
+ );
ulonglong last_insert_id();
int set_character_set(
const char *csname
@@ -380,6 +396,16 @@ public:
bool sql_log_off,
int *need_mon
);
+ bool set_wait_timeout_in_bulk_sql();
+ int set_wait_timeout(
+ int wait_timeout,
+ int *need_mon
+ );
+ bool set_sql_mode_in_bulk_sql();
+ int set_sql_mode(
+ sql_mode_t sql_mode,
+ int *need_mon
+ );
bool set_time_zone_in_bulk_sql();
int set_time_zone(
Time_zone *time_zone,
diff --git a/storage/spider/spd_db_include.cc b/storage/spider/spd_db_include.cc
index 2910aa97690..7f600142187 100644
--- a/storage/spider/spd_db_include.cc
+++ b/storage/spider/spd_db_include.cc
@@ -41,6 +41,16 @@ spider_db_result::spider_db_result(
DBUG_VOID_RETURN;
}
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+int spider_db_result::fetch_table_checksum(
+ ha_spider *spider
+) {
+ DBUG_ENTER("spider_db_result::fetch_table_checksum");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(0);
+}
+#endif
+
spider_db_conn::spider_db_conn(
SPIDER_CONN *in_conn
) : conn(in_conn), dbton_id(in_conn->dbton_id)
@@ -49,3 +59,20 @@ spider_db_conn::spider_db_conn(
DBUG_PRINT("info",("spider this=%p", this));
DBUG_VOID_RETURN;
}
+
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+bool spider_db_share::checksum_support()
+{
+ DBUG_ENTER("spider_db_share::checksum_support");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(FALSE);
+}
+
+int spider_db_handler::checksum_table(
+ int link_idx
+) {
+ DBUG_ENTER("spider_db_handler::checksum_table");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(0);
+}
+#endif
diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h
index 823f0a9c9fc..71403212445 100644
--- a/storage/spider/spd_db_include.h
+++ b/storage/spider/spd_db_include.h
@@ -159,6 +159,8 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_SQL_MBR_DISJOINT_LEN (sizeof(SPIDER_SQL_MBR_DISJOINT_STR) - 1)
#define SPIDER_SQL_NOT_BETWEEN_STR "not between"
#define SPIDER_SQL_NOT_BETWEEN_LEN (sizeof(SPIDER_SQL_NOT_BETWEEN_STR) - 1)
+#define SPIDER_SQL_TO_FLOAT_STR "/* create function to_float(a decimal(20,6)) returns float return a */ to_float("
+#define SPIDER_SQL_TO_FLOAT_LEN (sizeof(SPIDER_SQL_TO_FLOAT_STR) - 1)
#define SPIDER_SQL_IN_STR "in("
#define SPIDER_SQL_IN_LEN (sizeof(SPIDER_SQL_IN_STR) - 1)
#define SPIDER_SQL_NOT_IN_STR "not in("
@@ -185,6 +187,8 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_SQL_AS_TIME_LEN (sizeof(SPIDER_SQL_AS_TIME_STR) - 1)
#define SPIDER_SQL_AS_BINARY_STR " as binary"
#define SPIDER_SQL_AS_BINARY_LEN (sizeof(SPIDER_SQL_AS_BINARY_STR) - 1)
+#define SPIDER_SQL_AS_FLOAT_STR " as float"
+#define SPIDER_SQL_AS_FLOAT_LEN (sizeof(SPIDER_SQL_AS_FLOAT_STR) - 1)
#define SPIDER_SQL_IS_TRUE_STR " is true"
#define SPIDER_SQL_IS_TRUE_LEN (sizeof(SPIDER_SQL_IS_TRUE_STR) - 1)
#define SPIDER_SQL_IS_NOT_TRUE_STR " is not true"
@@ -255,6 +259,7 @@ typedef struct st_spider_transaction SPIDER_TRX;
typedef struct st_spider_share SPIDER_SHARE;
class ha_spider;
class spider_db_copy_table;
+class spider_db_handler;
class spider_string
{
@@ -537,6 +542,11 @@ public:
const char *st,
uint len
);
+ void append_escape_string(
+ const char *st,
+ uint len,
+ CHARSET_INFO *cs
+ );
bool append_for_single_quote(
const char *st,
uint len
@@ -816,6 +826,17 @@ public:
uint name_length,
CHARSET_INFO *name_charset
) = 0;
+ virtual int append_escaped_name(
+ spider_string *str,
+ const char *name,
+ uint name_length
+ ) = 0;
+ virtual int append_escaped_name_with_charset(
+ spider_string *str,
+ const char *name,
+ uint name_length,
+ CHARSET_INFO *name_charset
+ ) = 0;
virtual bool is_name_quote(
const char head_code
) = 0;
@@ -838,6 +859,14 @@ public:
spider_string *str,
bool sql_log_off
) = 0;
+ virtual int append_wait_timeout(
+ spider_string *str,
+ int wait_timeout
+ ) = 0;
+ virtual int append_sql_mode(
+ spider_string *str,
+ sql_mode_t sql_mode
+ ) = 0;
virtual int append_time_zone(
spider_string *str,
Time_zone *time_zone
@@ -980,20 +1009,17 @@ public:
) = 0;
virtual int fetch_table_status(
int mode,
- ha_rows &records,
- ulong &mean_rec_length,
- ulonglong &data_file_length,
- ulonglong &max_data_file_length,
- ulonglong &index_file_length,
- ulonglong &auto_increment_value,
- time_t &create_time,
- time_t &update_time,
- time_t &check_time
+ ha_statistics &stat
) = 0;
virtual int fetch_table_records(
int mode,
ha_rows &records
) = 0;
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ virtual int fetch_table_checksum(
+ ha_spider *spider
+ );
+#endif
virtual int fetch_table_cardinality(
int mode,
TABLE *table,
@@ -1081,6 +1107,11 @@ public:
) = 0;
virtual int next_result() = 0;
virtual uint affected_rows() = 0;
+ virtual uint matched_rows() = 0;
+ virtual bool inserted_info(
+ spider_db_handler *handler,
+ ha_copy_info *copy_info
+ ) = 0;
virtual ulonglong last_insert_id() = 0;
virtual int set_character_set(
const char *csname
@@ -1137,6 +1168,16 @@ public:
bool sql_log_off,
int *need_mon
) = 0;
+ virtual bool set_wait_timeout_in_bulk_sql() = 0;
+ virtual int set_wait_timeout(
+ int wait_timeout,
+ int *need_mon
+ ) = 0;
+ virtual bool set_sql_mode_in_bulk_sql() = 0;
+ virtual int set_sql_mode(
+ sql_mode_t sql_mode,
+ int *need_mon
+ ) = 0;
virtual bool set_time_zone_in_bulk_sql() = 0;
virtual int set_time_zone(
Time_zone *time_zone,
@@ -1263,6 +1304,9 @@ public:
spider_string *str
) = 0;
#endif
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ virtual bool checksum_support();
+#endif
};
class spider_db_handler
@@ -1280,6 +1324,7 @@ public:
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
#endif
+ bool no_where_cond;
spider_db_handler(ha_spider *spider, spider_db_share *db_share) :
dbton_id(db_share->dbton_id), spider(spider), db_share(db_share),
first_link_idx(-1) {}
@@ -1631,6 +1676,11 @@ public:
virtual int show_records(
int link_idx
) = 0;
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ virtual int checksum_table(
+ int link_idx
+ );
+#endif
virtual int show_last_insert_id(
int link_idx,
ulonglong &last_insert_id
diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc
index 5f6107e66a0..4f587c8b6ac 100644
--- a/storage/spider/spd_db_mysql.cc
+++ b/storage/spider/spd_db_mysql.cc
@@ -56,6 +56,8 @@ extern HASH spider_open_connections;
extern HASH spider_ipport_conns;
extern SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
extern const char spider_dig_upper[];
+extern const char **spd_mysqld_unix_port;
+extern uint *spd_mysqld_port;
spider_db_mysql_util spider_db_mysql_utility;
spider_db_mariadb_util spider_db_mariadb_utility;
@@ -88,6 +90,12 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR;
#define SPIDER_SQL_SQL_LOG_ON_STR "set session sql_log_off = 1"
#define SPIDER_SQL_SQL_LOG_ON_LEN sizeof(SPIDER_SQL_SQL_LOG_ON_STR) - 1
+#define SPIDER_SQL_WAIT_TIMEOUT_STR "set session wait_timeout = "
+#define SPIDER_SQL_WAIT_TIMEOUT_LEN sizeof(SPIDER_SQL_WAIT_TIMEOUT_STR) - 1
+
+#define SPIDER_SQL_SQL_MODE_STR "set session sql_mode = '"
+#define SPIDER_SQL_SQL_MODE_LEN sizeof(SPIDER_SQL_SQL_MODE_STR) - 1
+
#define SPIDER_SQL_TIME_ZONE_STR "set session time_zone = '"
#define SPIDER_SQL_TIME_ZONE_LEN sizeof(SPIDER_SQL_TIME_ZONE_STR) - 1
@@ -123,7 +131,7 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR;
#define SPIDER_SQL_SHOW_TABLE_STATUS_STR "show table status from "
#define SPIDER_SQL_SHOW_TABLE_STATUS_LEN sizeof(SPIDER_SQL_SHOW_TABLE_STATUS_STR) - 1
-#define SPIDER_SQL_SELECT_TABLES_STATUS_STR "select `table_rows`,`avg_row_length`,`data_length`,`max_data_length`,`index_length`,`auto_increment`,`create_time`,`update_time`,`check_time` from `information_schema`.`tables` where `table_schema` = "
+#define SPIDER_SQL_SELECT_TABLES_STATUS_STR "select `table_rows`,`avg_row_length`,`data_length`,`max_data_length`,`index_length`,`auto_increment`,`create_time`,`update_time`,`check_time`,`checksum` from `information_schema`.`tables` where `table_schema` = "
#define SPIDER_SQL_SELECT_TABLES_STATUS_LEN sizeof(SPIDER_SQL_SELECT_TABLES_STATUS_STR) - 1
#define SPIDER_SQL_SHOW_WARNINGS_STR "show warnings"
#define SPIDER_SQL_SHOW_WARNINGS_LEN sizeof(SPIDER_SQL_SHOW_WARNINGS_STR) - 1
@@ -151,6 +159,15 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR;
#define SPIDER_SQL_USING_HASH_LEN sizeof(SPIDER_SQL_USING_HASH_STR) - 1
#endif
+#define SPIDER_SQL_SHOW_RECORDS_RECORDS_POS 0
+#define SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS 8
+
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+#define SPIDER_SQL_CHECKSUM_CHECKSUM_POS 1
+#define SPIDER_SQL_CHECKSUM_TABLE_STR "checksum table "
+#define SPIDER_SQL_CHECKSUM_TABLE_LEN (sizeof(SPIDER_SQL_CHECKSUM_TABLE_STR) - 1)
+#endif
+
#define SPIDER_SQL_LIKE_STR " like "
#define SPIDER_SQL_LIKE_LEN (sizeof(SPIDER_SQL_LIKE_STR) - 1)
#define SPIDER_SQL_LIMIT1_STR " limit 1"
@@ -167,6 +184,11 @@ static uchar SPIDER_SQL_LINESTRING_HEAD_STR[] =
{0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00};
#define SPIDER_SQL_LINESTRING_HEAD_LEN sizeof(SPIDER_SQL_LINESTRING_HEAD_STR)
+#define SPIDER_SQL_DIRECT_INSERT_KIND_INSERT 0
+#define SPIDER_SQL_DIRECT_INSERT_KIND_REPLACE 1
+#define SPIDER_SQL_DIRECT_INSERT_KIND_IGNORE 2
+#define SPIDER_SQL_DIRECT_INSERT_KIND_DUP_UPDATE 3
+
static const char *spider_db_table_lock_str[] =
{
" read local,",
@@ -784,15 +806,7 @@ SPIDER_DB_ROW *spider_db_mbase_result::fetch_row_from_tmp_table(
int spider_db_mbase_result::fetch_table_status(
int mode,
- ha_rows &records,
- ulong &mean_rec_length,
- ulonglong &data_file_length,
- ulonglong &max_data_file_length,
- ulonglong &index_file_length,
- ulonglong &auto_increment_value,
- time_t &create_time,
- time_t &update_time,
- time_t &check_time
+ ha_statistics &stat
) {
int error_num;
MYSQL_ROW mysql_row;
@@ -831,47 +845,47 @@ int spider_db_mbase_result::fetch_table_status(
}
if (mysql_row[4])
- records =
+ stat.records =
(ha_rows) my_strtoll10(mysql_row[4], (char**) NULL, &error_num);
else
- records = (ha_rows) 0;
+ stat.records = (ha_rows) 0;
DBUG_PRINT("info",
- ("spider records=%lld", records));
+ ("spider records=%lld", stat.records));
if (mysql_row[5])
- mean_rec_length =
+ stat.mean_rec_length =
(ulong) my_strtoll10(mysql_row[5], (char**) NULL, &error_num);
else
- mean_rec_length = 0;
+ stat.mean_rec_length = 0;
DBUG_PRINT("info",
- ("spider mean_rec_length=%lu", mean_rec_length));
+ ("spider mean_rec_length=%lu", stat.mean_rec_length));
if (mysql_row[6])
- data_file_length =
+ stat.data_file_length =
(ulonglong) my_strtoll10(mysql_row[6], (char**) NULL, &error_num);
else
- data_file_length = 0;
+ stat.data_file_length = 0;
DBUG_PRINT("info",
- ("spider data_file_length=%lld", data_file_length));
+ ("spider data_file_length=%lld", stat.data_file_length));
if (mysql_row[7])
- max_data_file_length =
+ stat.max_data_file_length =
(ulonglong) my_strtoll10(mysql_row[7], (char**) NULL, &error_num);
else
- max_data_file_length = 0;
+ stat.max_data_file_length = 0;
DBUG_PRINT("info",
- ("spider max_data_file_length=%lld", max_data_file_length));
+ ("spider max_data_file_length=%lld", stat.max_data_file_length));
if (mysql_row[8])
- index_file_length =
+ stat.index_file_length =
(ulonglong) my_strtoll10(mysql_row[8], (char**) NULL, &error_num);
else
- index_file_length = 0;
+ stat.index_file_length = 0;
DBUG_PRINT("info",
- ("spider index_file_length=%lld", index_file_length));
+ ("spider index_file_length=%lld", stat.index_file_length));
if (mysql_row[10])
- auto_increment_value =
+ stat.auto_increment_value =
(ulonglong) my_strtoll10(mysql_row[10], (char**) NULL, &error_num);
else
- auto_increment_value = 1;
+ stat.auto_increment_value = 1;
DBUG_PRINT("info",
- ("spider auto_increment_value=%lld", auto_increment_value));
+ ("spider auto_increment_value=%lld", stat.auto_increment_value));
if (mysql_row[11])
{
#ifdef SPIDER_HAS_TIME_STATUS
@@ -880,19 +894,19 @@ int spider_db_mbase_result::fetch_table_status(
SPIDER_str_to_datetime(mysql_row[11], strlen(mysql_row[11]),
&mysql_time, 0, &time_status);
#ifdef MARIADB_BASE_VERSION
- create_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- create_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
} else
- create_time = (time_t) 0;
+ stat.create_time = (time_t) 0;
#ifndef DBUG_OFF
{
struct tm *ts, tmp_ts;
char buf[80];
- ts = localtime_r(&create_time, &tmp_ts);
+ ts = localtime_r(&stat.create_time, &tmp_ts);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts);
DBUG_PRINT("info",("spider create_time=%s", buf));
}
@@ -905,19 +919,19 @@ int spider_db_mbase_result::fetch_table_status(
SPIDER_str_to_datetime(mysql_row[12], strlen(mysql_row[12]),
&mysql_time, 0, &time_status);
#ifdef MARIADB_BASE_VERSION
- update_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- update_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
} else
- update_time = (time_t) 0;
+ stat.update_time = (time_t) 0;
#ifndef DBUG_OFF
{
struct tm *ts, tmp_ts;
char buf[80];
- ts = localtime_r(&update_time, &tmp_ts);
+ ts = localtime_r(&stat.update_time, &tmp_ts);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts);
DBUG_PRINT("info",("spider update_time=%s", buf));
}
@@ -930,66 +944,77 @@ int spider_db_mbase_result::fetch_table_status(
SPIDER_str_to_datetime(mysql_row[13], strlen(mysql_row[13]),
&mysql_time, 0, &time_status);
#ifdef MARIADB_BASE_VERSION
- check_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- check_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
} else
- check_time = (time_t) 0;
+ stat.check_time = (time_t) 0;
#ifndef DBUG_OFF
{
struct tm *ts, tmp_ts;
char buf[80];
- ts = localtime_r(&check_time, &tmp_ts);
+ ts = localtime_r(&stat.check_time, &tmp_ts);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts);
DBUG_PRINT("info",("spider check_time=%s", buf));
}
#endif
+ if (mysql_row[15])
+ {
+ stat.checksum_null = FALSE;
+ stat.checksum =
+ (ha_checksum) my_strtoll10(mysql_row[15], (char**) NULL, &error_num);
+ DBUG_PRINT("info", ("spider checksum=%lu", (ulong) stat.checksum));
+ } else {
+ stat.checksum_null = TRUE;
+ stat.checksum = (ha_checksum) 0;
+ DBUG_PRINT("info", ("spider checksum is null"));
+ }
} else {
if (mysql_row[0])
- records =
+ stat.records =
(ha_rows) my_strtoll10(mysql_row[0], (char**) NULL, &error_num);
else
- records = (ha_rows) 0;
+ stat.records = (ha_rows) 0;
DBUG_PRINT("info",
- ("spider records=%lld", records));
+ ("spider records=%lld", stat.records));
if (mysql_row[1])
- mean_rec_length =
+ stat.mean_rec_length =
(ulong) my_strtoll10(mysql_row[1], (char**) NULL, &error_num);
else
- mean_rec_length = 0;
+ stat.mean_rec_length = 0;
DBUG_PRINT("info",
- ("spider mean_rec_length=%lu", mean_rec_length));
+ ("spider mean_rec_length=%lu", stat.mean_rec_length));
if (mysql_row[2])
- data_file_length =
+ stat.data_file_length =
(ulonglong) my_strtoll10(mysql_row[2], (char**) NULL, &error_num);
else
- data_file_length = 0;
+ stat.data_file_length = 0;
DBUG_PRINT("info",
- ("spider data_file_length=%lld", data_file_length));
+ ("spider data_file_length=%lld", stat.data_file_length));
if (mysql_row[3])
- max_data_file_length =
+ stat.max_data_file_length =
(ulonglong) my_strtoll10(mysql_row[3], (char**) NULL, &error_num);
else
- max_data_file_length = 0;
+ stat.max_data_file_length = 0;
DBUG_PRINT("info",
- ("spider max_data_file_length=%lld", max_data_file_length));
+ ("spider max_data_file_length=%lld", stat.max_data_file_length));
if (mysql_row[4])
- index_file_length =
+ stat.index_file_length =
(ulonglong) my_strtoll10(mysql_row[4], (char**) NULL, &error_num);
else
- index_file_length = 0;
+ stat.index_file_length = 0;
DBUG_PRINT("info",
- ("spider index_file_length=%lld", index_file_length));
+ ("spider index_file_length=%lld", stat.index_file_length));
if (mysql_row[5])
- auto_increment_value =
+ stat.auto_increment_value =
(ulonglong) my_strtoll10(mysql_row[5], (char**) NULL, &error_num);
else
- auto_increment_value = 1;
+ stat.auto_increment_value = 1;
DBUG_PRINT("info",
- ("spider auto_increment_value=%lld", auto_increment_value));
+ ("spider auto_increment_value=%lld", stat.auto_increment_value));
if (mysql_row[6])
{
#ifdef SPIDER_HAS_TIME_STATUS
@@ -998,19 +1023,19 @@ int spider_db_mbase_result::fetch_table_status(
SPIDER_str_to_datetime(mysql_row[6], strlen(mysql_row[6]),
&mysql_time, 0, &time_status);
#ifdef MARIADB_BASE_VERSION
- create_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- create_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.create_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
} else
- create_time = (time_t) 0;
+ stat.create_time = (time_t) 0;
#ifndef DBUG_OFF
{
struct tm *ts, tmp_ts;
char buf[80];
- ts = localtime_r(&create_time, &tmp_ts);
+ ts = localtime_r(&stat.create_time, &tmp_ts);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts);
DBUG_PRINT("info",("spider create_time=%s", buf));
}
@@ -1023,19 +1048,19 @@ int spider_db_mbase_result::fetch_table_status(
SPIDER_str_to_datetime(mysql_row[7], strlen(mysql_row[7]),
&mysql_time, 0, &time_status);
#ifdef MARIADB_BASE_VERSION
- update_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- update_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.update_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
} else
- update_time = (time_t) 0;
+ stat.update_time = (time_t) 0;
#ifndef DBUG_OFF
{
struct tm *ts, tmp_ts;
char buf[80];
- ts = localtime_r(&update_time, &tmp_ts);
+ ts = localtime_r(&stat.update_time, &tmp_ts);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts);
DBUG_PRINT("info",("spider update_time=%s", buf));
}
@@ -1048,34 +1073,46 @@ int spider_db_mbase_result::fetch_table_status(
SPIDER_str_to_datetime(mysql_row[8], strlen(mysql_row[8]),
&mysql_time, 0, &time_status);
#ifdef MARIADB_BASE_VERSION
- check_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- check_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat.check_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
} else
- check_time = (time_t) 0;
+ stat.check_time = (time_t) 0;
#ifndef DBUG_OFF
{
struct tm *ts, tmp_ts;
char buf[80];
- ts = localtime_r(&check_time, &tmp_ts);
+ ts = localtime_r(&stat.check_time, &tmp_ts);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts);
DBUG_PRINT("info",("spider check_time=%s", buf));
}
#endif
+ if (mysql_row[9])
+ {
+ stat.checksum_null = FALSE;
+ stat.checksum =
+ (ha_checksum) my_strtoll10(mysql_row[9], (char**) NULL, &error_num);
+ DBUG_PRINT("info", ("spider checksum=%lu", (ulong) stat.checksum));
+ } else {
+ stat.checksum_null = TRUE;
+ stat.checksum = (ha_checksum) 0;
+ DBUG_PRINT("info", ("spider checksum is null"));
+ }
}
DBUG_RETURN(0);
}
-int spider_db_mbase_result::fetch_table_records(
- int mode,
- ha_rows &records
+int spider_db_mbase_result::fetch_simple_action(
+ uint simple_action,
+ uint position,
+ void *param
) {
int error_num;
MYSQL_ROW mysql_row;
- DBUG_ENTER("spider_db_mbase_result::fetch_table_records");
+ DBUG_ENTER("spider_db_mbase_result::fetch_simple_action");
DBUG_PRINT("info",("spider this=%p", this));
if (!(mysql_row = mysql_fetch_row(db_result)))
{
@@ -1088,32 +1125,78 @@ int spider_db_mbase_result::fetch_table_records(
}
DBUG_RETURN(ER_QUERY_ON_FOREIGN_DATA_SOURCE);
}
- if (mode == 1)
+ if (num_fields() <= position)
{
- if (mysql_row[0])
- {
- records =
- (ha_rows) my_strtoll10(mysql_row[0], (char**) NULL, &error_num);
- } else
- records = (ha_rows) 0;
- DBUG_PRINT("info",
- ("spider records=%lld", records));
- } else {
- if (num_fields() != 10)
+ DBUG_RETURN(ER_QUERY_ON_FOREIGN_DATA_SOURCE);
+ }
+ switch (simple_action)
+ {
+ case SPIDER_SIMPLE_RECORDS:
{
- DBUG_RETURN(ER_QUERY_ON_FOREIGN_DATA_SOURCE);
+ ha_rows *records = (ha_rows *) param;
+ if (mysql_row[position])
+ {
+ *records =
+ (ha_rows) my_strtoll10(mysql_row[position], (char**) NULL,
+ &error_num);
+ } else {
+ *records = (ha_rows) 0;
+ }
+ DBUG_PRINT("info", ("spider records=%lld", *records));
+ break;
}
-
- if (mysql_row[8])
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ case SPIDER_SIMPLE_CHECKSUM_TABLE:
{
- records =
- (ha_rows) my_strtoll10(mysql_row[8], (char**) NULL, &error_num);
- } else
- records = 0;
+ ha_spider *spider = (ha_spider *) param;
+ if (mysql_row[position])
+ {
+ spider->checksum_val =
+ (ha_checksum) my_strtoll10(mysql_row[position], (char**) NULL,
+ &error_num);
+ DBUG_PRINT("info", ("spider checksum=%llu", (ulonglong)spider->checksum_val));
+ spider->checksum_null = FALSE;
+ } else {
+ spider->checksum_null = TRUE;
+ DBUG_PRINT("info", ("spider checksum is null"));
+ }
+ break;
+ }
+#endif
+ default:
+ DBUG_ASSERT(0);
+ break;
}
DBUG_RETURN(0);
}
+int spider_db_mbase_result::fetch_table_records(
+ int mode,
+ ha_rows &records
+) {
+ DBUG_ENTER("spider_db_mbase_result::fetch_table_records");
+ DBUG_PRINT("info",("spider this=%p", this));
+ if (mode == 1)
+ {
+ DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_RECORDS,
+ SPIDER_SQL_SHOW_RECORDS_RECORDS_POS, &records));
+ } else {
+ DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_RECORDS,
+ SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS, &records));
+ }
+}
+
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+int spider_db_mbase_result::fetch_table_checksum(
+ ha_spider *spider
+) {
+ DBUG_ENTER("spider_db_mbase_result::fetch_table_checksum");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE,
+ SPIDER_SQL_CHECKSUM_CHECKSUM_POS, spider));
+}
+#endif
+
int spider_db_mbase_result::fetch_table_cardinality(
int mode,
TABLE *table,
@@ -1897,6 +1980,30 @@ int spider_db_mbase::connect(
conn->tgt_default_group);
}
+ if (!spider_param_same_server_link(thd))
+ {
+ if (!strcmp(tgt_host, my_localhost))
+ {
+ if (!strcmp(tgt_socket, *spd_mysqld_unix_port))
+ {
+ my_printf_error(ER_SPIDER_SAME_SERVER_LINK_NUM,
+ ER_SPIDER_SAME_SERVER_LINK_STR1, MYF(0),
+ tgt_host, tgt_socket);
+ DBUG_RETURN(ER_SPIDER_SAME_SERVER_LINK_NUM);
+ }
+ } else if (!strcmp(tgt_host, "127.0.0.1") ||
+ !strcmp(tgt_host, glob_hostname))
+ {
+ if (tgt_port == (long) *spd_mysqld_port)
+ {
+ my_printf_error(ER_SPIDER_SAME_SERVER_LINK_NUM,
+ ER_SPIDER_SAME_SERVER_LINK_STR2, MYF(0),
+ tgt_host, tgt_port);
+ DBUG_RETURN(ER_SPIDER_SAME_SERVER_LINK_NUM);
+ }
+ }
+ }
+
if (connect_mutex)
pthread_mutex_lock(&spider_open_conn_mutex);
/* tgt_db not use */
@@ -2325,6 +2432,81 @@ uint spider_db_mbase::affected_rows()
DBUG_RETURN((uint) last_used_con->affected_rows);
}
+uint spider_db_mbase::matched_rows()
+{
+ MYSQL *last_used_con;
+ DBUG_ENTER("spider_db_mysql::matched_rows");
+ DBUG_PRINT("info", ("spider this=%p", this));
+#if MYSQL_VERSION_ID < 50500
+ last_used_con = db_conn->last_used_con;
+#else
+ last_used_con = db_conn;
+#endif
+ /* Rows matched: 65 Changed: 65 Warnings: 0 */
+ const char *info = last_used_con->info;
+ if (!info)
+ DBUG_RETURN(0);
+ DBUG_PRINT("info", ("spider info=%s", info));
+ const char *begin = strstr(info, "Rows matched: ");
+ if (!begin)
+ DBUG_RETURN(0);
+ DBUG_RETURN(atoi(begin + strlen("Rows matched: ")));
+}
+
+bool spider_db_mbase::inserted_info(
+ spider_db_handler *handler,
+ ha_copy_info *copy_info
+) {
+ MYSQL *last_used_con;
+ uchar direct_insert_kind =
+ ((spider_mbase_handler *) handler)->direct_insert_kind;
+ DBUG_ENTER("spider_db_mysql::inserted_info");
+ DBUG_PRINT("info", ("spider this=%p", this));
+ if (direct_insert_kind == SPIDER_SQL_DIRECT_INSERT_KIND_INSERT)
+ {
+ DBUG_RETURN(TRUE);
+ }
+#if MYSQL_VERSION_ID < 50500
+ last_used_con = db_conn->last_used_con;
+#else
+ last_used_con = db_conn;
+#endif
+ /* Records: 10 Duplicates: 4 Warnings: 0 */
+ const char *info = last_used_con->info;
+ if (!info)
+ DBUG_RETURN(FALSE);
+ DBUG_PRINT("info", ("spider info=%s", info));
+ const char *begin = strstr(info, "Records: ");
+ if (!begin)
+ DBUG_RETURN(FALSE);
+ begin += strlen("Records: ");
+ uint records = atoi(begin);
+ begin = strstr(begin, "Duplicates: ");
+ if (!begin)
+ DBUG_RETURN(FALSE);
+ uint duplicates = atoi(begin + strlen("Duplicates: "));
+ copy_info->records+= records;
+ switch (direct_insert_kind)
+ {
+ case SPIDER_SQL_DIRECT_INSERT_KIND_IGNORE:
+ copy_info->copied+= duplicates;
+ break;
+ case SPIDER_SQL_DIRECT_INSERT_KIND_REPLACE:
+ copy_info->copied+= records;
+ copy_info->deleted+= duplicates;
+ break;
+ case SPIDER_SQL_DIRECT_INSERT_KIND_DUP_UPDATE:
+ copy_info->touched+= (last_used_con->affected_rows - (duplicates * 2));
+ copy_info->copied+= (last_used_con->affected_rows - duplicates);
+ copy_info->updated+= duplicates;
+ break;
+ default:
+ DBUG_ASSERT(0);
+ DBUG_RETURN(FALSE);
+ }
+ DBUG_RETURN(TRUE);
+}
+
ulonglong spider_db_mbase::last_insert_id()
{
MYSQL *last_used_con;
@@ -2977,6 +3159,126 @@ int spider_db_mbase::set_sql_log_off(
DBUG_RETURN(0);
}
+bool spider_db_mbase::set_wait_timeout_in_bulk_sql()
+{
+ DBUG_ENTER("spider_db_mbase::set_wait_timeout_in_bulk_sql");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(TRUE);
+}
+
+int spider_db_mbase::set_wait_timeout(
+ int wait_timeout,
+ int *need_mon
+) {
+ char sql_buf[MAX_FIELD_WIDTH];
+ char timeout_str[SPIDER_SQL_INT_LEN];
+ int timeout_str_length;
+ spider_string sql_str(sql_buf, sizeof(sql_buf), &my_charset_bin);
+ DBUG_ENTER("spider_db_mbase::set_wait_timeout");
+ DBUG_PRINT("info",("spider this=%p", this));
+ sql_str.init_calc_mem(264);
+ sql_str.length(0);
+ timeout_str_length =
+ my_sprintf(timeout_str, (timeout_str, "%d", wait_timeout));
+ if (sql_str.reserve(SPIDER_SQL_WAIT_TIMEOUT_LEN + timeout_str_length))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ sql_str.q_append(SPIDER_SQL_WAIT_TIMEOUT_STR, SPIDER_SQL_WAIT_TIMEOUT_LEN);
+ sql_str.q_append(timeout_str, timeout_str_length);
+ pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
+ pthread_mutex_lock(&conn->mta_conn_mutex);
+ SPIDER_SET_FILE_POS(&conn->mta_conn_mutex_file_pos);
+ conn->need_mon = need_mon;
+ DBUG_ASSERT(!conn->mta_conn_mutex_lock_already);
+ DBUG_ASSERT(!conn->mta_conn_mutex_unlock_later);
+ conn->mta_conn_mutex_lock_already = TRUE;
+ conn->mta_conn_mutex_unlock_later = TRUE;
+ if (spider_db_query(
+ conn,
+ sql_str.ptr(),
+ sql_str.length(),
+ -1,
+ need_mon)
+ ) {
+ DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
+ DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
+ conn->mta_conn_mutex_lock_already = FALSE;
+ conn->mta_conn_mutex_unlock_later = FALSE;
+ DBUG_RETURN(spider_db_errorno(conn));
+ }
+ DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
+ DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
+ conn->mta_conn_mutex_lock_already = FALSE;
+ conn->mta_conn_mutex_unlock_later = FALSE;
+ SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
+ pthread_mutex_unlock(&conn->mta_conn_mutex);
+ DBUG_RETURN(0);
+}
+
+bool spider_db_mbase::set_sql_mode_in_bulk_sql()
+{
+ DBUG_ENTER("spider_db_mbase::set_sql_mode_in_bulk_sql");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(TRUE);
+}
+
+int spider_db_mbase::set_sql_mode(
+ sql_mode_t sql_mode,
+ int *need_mon
+) {
+ int error_num;
+ char sql_buf[MAX_FIELD_WIDTH];
+ spider_string sql_str(sql_buf, sizeof(sql_buf), &my_charset_bin);
+ DBUG_ENTER("spider_db_mbase::set_sql_mode");
+ DBUG_PRINT("info",("spider this=%p", this));
+ sql_str.init_calc_mem(265);
+ sql_str.length(0);
+ if (sql_str.reserve(SPIDER_SQL_SQL_MODE_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ sql_str.q_append(SPIDER_SQL_SQL_MODE_STR, SPIDER_SQL_SQL_MODE_LEN);
+ if ((error_num = spider_db_mbase_utility->append_sql_mode_internal(&sql_str, sql_mode)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (sql_str.length() > SPIDER_SQL_SQL_MODE_LEN)
+ {
+ sql_str.length(sql_str.length() - SPIDER_SQL_COMMA_LEN);
+ } else {
+ if (sql_str.reserve(SPIDER_SQL_VALUE_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ }
+ sql_str.q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
+ pthread_mutex_lock(&conn->mta_conn_mutex);
+ SPIDER_SET_FILE_POS(&conn->mta_conn_mutex_file_pos);
+ conn->need_mon = need_mon;
+ DBUG_ASSERT(!conn->mta_conn_mutex_lock_already);
+ DBUG_ASSERT(!conn->mta_conn_mutex_unlock_later);
+ conn->mta_conn_mutex_lock_already = TRUE;
+ conn->mta_conn_mutex_unlock_later = TRUE;
+ if (spider_db_query(
+ conn,
+ sql_str.ptr(),
+ sql_str.length(),
+ -1,
+ need_mon)
+ ) {
+ DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
+ DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
+ conn->mta_conn_mutex_lock_already = FALSE;
+ conn->mta_conn_mutex_unlock_later = FALSE;
+ DBUG_RETURN(spider_db_errorno(conn));
+ }
+ DBUG_ASSERT(conn->mta_conn_mutex_lock_already);
+ DBUG_ASSERT(conn->mta_conn_mutex_unlock_later);
+ conn->mta_conn_mutex_lock_already = FALSE;
+ conn->mta_conn_mutex_unlock_later = FALSE;
+ SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
+ pthread_mutex_unlock(&conn->mta_conn_mutex);
+ DBUG_RETURN(0);
+}
+
bool spider_db_mbase::set_time_zone_in_bulk_sql()
{
DBUG_ENTER("spider_db_mbase::set_time_zone_in_bulk_sql");
@@ -3556,10 +3858,10 @@ void spider_db_mbase::set_dup_key_idx(
key_name_length = spider->share->tgt_pk_names_lengths[all_link_idx];
} else {
#ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name
- key_name = table->s->key_info[roop_count].name.str;
- key_name_length = table->s->key_info[roop_count].name.length;
+ key_name = table->key_info[roop_count].name.str;
+ key_name_length = table->key_info[roop_count].name.length;
#else
- key_name = table->s->key_info[roop_count].name;
+ key_name = table->key_info[roop_count].name;
key_name_length = strlen(key_name);
#endif
}
@@ -3662,6 +3964,57 @@ int spider_db_mbase_util::append_name_with_charset(
DBUG_RETURN(0);
}
+int spider_db_mbase_util::append_escaped_name(
+ spider_string *str,
+ const char *name,
+ uint name_length
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_mbase_util::append_name");
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN * 2 + name_length * 2))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ if ((error_num = spider_db_append_name_with_quote_str_internal(
+ str, name, name_length, dbton_id)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ DBUG_RETURN(0);
+}
+
+int spider_db_mbase_util::append_escaped_name_with_charset(
+ spider_string *str,
+ const char *name,
+ uint name_length,
+ CHARSET_INFO *name_charset
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_mbase_util::append_name_with_charset");
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN * 2 + name_length * 2))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ if ((error_num = spider_db_append_name_with_quote_str_internal(
+ str, name, name_length, name_charset, dbton_id)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ DBUG_RETURN(0);
+}
+
bool spider_db_mbase_util::is_name_quote(
const char head_code
) {
@@ -3680,19 +4033,22 @@ int spider_db_mbase_util::append_escaped_name_quote(
DBUG_RETURN(0);
}
-int spider_db_mbase_util::append_column_value(ha_spider *spider,
- spider_string *str, Field *field,
- const uchar *new_ptr,
- bool is_like,
- CHARSET_INFO *access_charset)
+int spider_db_mariadb_util::append_column_value(ha_spider *spider,
+ spider_string *str,
+ Field *field,
+ const uchar *new_ptr,
+ bool is_like,
+ CHARSET_INFO *access_charset)
{
+ bool float_value = FALSE;
+ int error_num;
char buf[MAX_FIELD_WIDTH];
- spider_string tmp_str(buf, MAX_FIELD_WIDTH, &my_charset_bin);
+ spider_string tmp_str(buf, MAX_FIELD_WIDTH, field->charset());
String *ptr;
uint length;
THD *thd = field->table->in_use;
Time_zone *saved_time_zone = thd->variables.time_zone;
- DBUG_ENTER("spider_db_mbase_util::append_column_value");
+ DBUG_ENTER("spider_db_mariadb_util::append_column_value");
tmp_str.init_calc_mem(113);
thd->variables.time_zone = UTC;
@@ -3705,7 +4061,7 @@ int spider_db_mbase_util::append_column_value(ha_spider *spider,
) {
length = uint2korr(new_ptr);
tmp_str.set_quick((char *) new_ptr + HA_KEY_BLOB_LENGTH, length,
- &my_charset_bin);
+ field->charset());
ptr = tmp_str.get_str();
} else if (field->type() == MYSQL_TYPE_GEOMETRY)
{
@@ -3736,6 +4092,10 @@ int spider_db_mbase_util::append_column_value(ha_spider *spider,
} else {
ptr = field->val_str(tmp_str.get_str());
tmp_str.mem_calc();
+ if (field->type() == MYSQL_TYPE_FLOAT)
+ {
+ float_value = TRUE;
+ }
}
thd->variables.time_zone = saved_time_zone;
@@ -3746,6 +4106,14 @@ int spider_db_mbase_util::append_column_value(ha_spider *spider,
if (field->result_type() == STRING_RESULT)
{
DBUG_PRINT("info", ("spider STRING_RESULT"));
+ if (str->charset() != field->charset())
+ {
+ if ((error_num = spider_db_append_charset_name_before_string(str,
+ field->charset())))
+ {
+ DBUG_RETURN(error_num);
+ }
+ }
if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
@@ -3756,7 +4124,7 @@ int spider_db_mbase_util::append_column_value(ha_spider *spider,
) {
DBUG_PRINT("info", ("spider append_escaped"));
char buf2[MAX_FIELD_WIDTH];
- spider_string tmp_str2(buf2, MAX_FIELD_WIDTH, access_charset);
+ spider_string tmp_str2(buf2, MAX_FIELD_WIDTH, field->charset());
tmp_str2.init_calc_mem(114);
tmp_str2.length(0);
if (
@@ -3776,17 +4144,262 @@ int spider_db_mbase_util::append_column_value(ha_spider *spider,
str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
} else if (field->str_needs_quotes())
{
+ if (str->charset() != field->charset())
+ {
+ if ((error_num = spider_db_append_charset_name_before_string(str,
+ field->charset())))
+ {
+ DBUG_RETURN(error_num);
+ }
+ }
if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN * 2 + ptr->length() * 2 + 2))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
append_escaped_util(str, ptr);
str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ } else if (float_value)
+ {
+ if (str->reserve(SPIDER_SQL_CAST_LEN + ptr->length() +
+ SPIDER_SQL_AS_FLOAT_LEN + SPIDER_SQL_CLOSE_PAREN_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_CAST_STR, SPIDER_SQL_CAST_LEN);
+ str->q_append(ptr->ptr(), ptr->length());
+ str->q_append(SPIDER_SQL_AS_FLOAT_STR, SPIDER_SQL_AS_FLOAT_LEN);
+ str->q_append(SPIDER_SQL_CLOSE_PAREN_STR, SPIDER_SQL_CLOSE_PAREN_LEN);
} else if (str->append(*ptr))
+ {
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
DBUG_RETURN(0);
}
+int spider_db_mysql_util::append_column_value(
+ ha_spider *spider,
+ spider_string *str,
+ Field *field,
+ const uchar *new_ptr,
+ bool is_like,
+ CHARSET_INFO *access_charset
+) {
+ bool float_value = FALSE;
+ int error_num;
+ char buf[MAX_FIELD_WIDTH];
+ spider_string tmp_str(buf, MAX_FIELD_WIDTH, field->charset());
+ String *ptr;
+ uint length;
+ THD *thd = field->table->in_use;
+ Time_zone *saved_time_zone = thd->variables.time_zone;
+ DBUG_ENTER("spider_db_mysql_util::append_column_value");
+ tmp_str.init_calc_mem(266);
+
+ thd->variables.time_zone = UTC;
+
+ if (new_ptr)
+ {
+ if (
+ field->type() == MYSQL_TYPE_BLOB ||
+ field->real_type() == MYSQL_TYPE_VARCHAR
+ ) {
+ length = uint2korr(new_ptr);
+ tmp_str.set_quick((char *) new_ptr + HA_KEY_BLOB_LENGTH, length,
+ field->charset());
+ ptr = tmp_str.get_str();
+ } else if (field->type() == MYSQL_TYPE_GEOMETRY)
+ {
+/*
+ uint mlength = SIZEOF_STORED_DOUBLE, lcnt;
+ uchar *dest = (uchar *) buf;
+ const uchar *source;
+ for (lcnt = 0; lcnt < 4; lcnt++)
+ {
+ mlength = SIZEOF_STORED_DOUBLE;
+ source = new_ptr + mlength + SIZEOF_STORED_DOUBLE * lcnt;
+ while (mlength--)
+ *dest++ = *--source;
+ }
+ tmp_str.length(SIZEOF_STORED_DOUBLE * lcnt);
+*/
+#ifndef DBUG_OFF
+ double xmin, xmax, ymin, ymax;
+/*
+ float8store(buf,xmin);
+ float8store(buf+8,xmax);
+ float8store(buf+16,ymin);
+ float8store(buf+24,ymax);
+ memcpy(&xmin,new_ptr,sizeof(xmin));
+ memcpy(&xmax,new_ptr + 8,sizeof(xmax));
+ memcpy(&ymin,new_ptr + 16,sizeof(ymin));
+ memcpy(&ymax,new_ptr + 24,sizeof(ymax));
+ float8get(xmin, buf);
+ float8get(xmax, buf + 8);
+ float8get(ymin, buf + 16);
+ float8get(ymax, buf + 24);
+ DBUG_PRINT("info", ("spider geo is %f %f %f %f",
+ xmin, xmax, ymin, ymax));
+ DBUG_PRINT("info", ("spider geo is %.14g %.14g %.14g %.14g",
+ xmin, xmax, ymin, ymax));
+*/
+ float8get(xmin, new_ptr);
+ float8get(xmax, new_ptr + 8);
+ float8get(ymin, new_ptr + 16);
+ float8get(ymax, new_ptr + 24);
+ DBUG_PRINT("info", ("spider geo is %f %f %f %f",
+ xmin, xmax, ymin, ymax));
+/*
+ float8get(xmin, new_ptr + SIZEOF_STORED_DOUBLE * 4);
+ float8get(xmax, new_ptr + SIZEOF_STORED_DOUBLE * 5);
+ float8get(ymin, new_ptr + SIZEOF_STORED_DOUBLE * 6);
+ float8get(ymax, new_ptr + SIZEOF_STORED_DOUBLE * 7);
+ DBUG_PRINT("info", ("spider geo is %f %f %f %f",
+ xmin, xmax, ymin, ymax));
+ float8get(xmin, new_ptr + SIZEOF_STORED_DOUBLE * 8);
+ float8get(xmax, new_ptr + SIZEOF_STORED_DOUBLE * 9);
+ float8get(ymin, new_ptr + SIZEOF_STORED_DOUBLE * 10);
+ float8get(ymax, new_ptr + SIZEOF_STORED_DOUBLE * 11);
+ DBUG_PRINT("info", ("spider geo is %f %f %f %f",
+ xmin, xmax, ymin, ymax));
+ float8get(xmin, new_ptr + SIZEOF_STORED_DOUBLE * 12);
+ float8get(xmax, new_ptr + SIZEOF_STORED_DOUBLE * 13);
+ float8get(ymin, new_ptr + SIZEOF_STORED_DOUBLE * 14);
+ float8get(ymax, new_ptr + SIZEOF_STORED_DOUBLE * 15);
+ DBUG_PRINT("info", ("spider geo is %f %f %f %f",
+ xmin, xmax, ymin, ymax));
+*/
+#endif
+/*
+ tmp_str.set_quick((char *) new_ptr, SIZEOF_STORED_DOUBLE * 4,
+ &my_charset_bin);
+*/
+ tmp_str.length(0);
+ tmp_str.q_append((char *) SPIDER_SQL_LINESTRING_HEAD_STR,
+ SPIDER_SQL_LINESTRING_HEAD_LEN);
+ tmp_str.q_append((char *) new_ptr, SIZEOF_STORED_DOUBLE);
+ tmp_str.q_append((char *) new_ptr + SIZEOF_STORED_DOUBLE * 2,
+ SIZEOF_STORED_DOUBLE);
+ tmp_str.q_append((char *) new_ptr + SIZEOF_STORED_DOUBLE,
+ SIZEOF_STORED_DOUBLE);
+ tmp_str.q_append((char *) new_ptr + SIZEOF_STORED_DOUBLE * 3,
+ SIZEOF_STORED_DOUBLE);
+ ptr = tmp_str.get_str();
+ } else {
+ ptr = field->val_str(tmp_str.get_str(), new_ptr);
+ tmp_str.mem_calc();
+ }
+ } else {
+ ptr = field->val_str(tmp_str.get_str());
+ tmp_str.mem_calc();
+ if (field->type() == MYSQL_TYPE_FLOAT)
+ {
+ float_value = TRUE;
+ }
+ }
+
+ thd->variables.time_zone = saved_time_zone;
+
+ DBUG_PRINT("info", ("spider field->type() is %d", field->type()));
+ DBUG_PRINT("info", ("spider ptr->length() is %d", ptr->length()));
+/*
+ if (
+ field->type() == MYSQL_TYPE_BIT ||
+ (field->type() >= MYSQL_TYPE_TINY_BLOB &&
+ field->type() <= MYSQL_TYPE_BLOB)
+ ) {
+ uchar *hex_ptr = (uchar *) ptr->ptr(), *end_ptr;
+ char *str_ptr;
+ DBUG_PRINT("info", ("spider HEX"));
+ if (str->reserve(SPIDER_SQL_HEX_LEN + ptr->length() * 2))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_HEX_STR, SPIDER_SQL_HEX_LEN);
+ str_ptr = (char *) str->ptr() + str->length();
+ for (end_ptr = hex_ptr + ptr->length(); hex_ptr < end_ptr; hex_ptr++)
+ {
+ *str_ptr++ = spider_dig_upper[(*hex_ptr) >> 4];
+ *str_ptr++ = spider_dig_upper[(*hex_ptr) & 0x0F];
+ }
+ str->length(str->length() + ptr->length() * 2);
+ } else
+*/
+ if (field->result_type() == STRING_RESULT)
+ {
+ DBUG_PRINT("info", ("spider STRING_RESULT"));
+ if (str->charset() != field->charset())
+ {
+ if ((error_num = spider_db_append_charset_name_before_string(str,
+ field->charset())))
+ {
+ DBUG_RETURN(error_num);
+ }
+ }
+ if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ if (
+ field->type() == MYSQL_TYPE_VARCHAR ||
+ (field->type() >= MYSQL_TYPE_ENUM &&
+ field->type() <= MYSQL_TYPE_GEOMETRY)
+ ) {
+ DBUG_PRINT("info", ("spider append_escaped"));
+ char buf2[MAX_FIELD_WIDTH];
+ spider_string tmp_str2(buf2, MAX_FIELD_WIDTH, field->charset());
+ tmp_str2.init_calc_mem(267);
+ tmp_str2.length(0);
+ if (
+ tmp_str2.append(ptr->ptr(), ptr->length(), field->charset()) ||
+ str->reserve(tmp_str2.length() * 2) ||
+ append_escaped_util(str, tmp_str2.get_str())
+ )
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (is_like &&
+ str->append(SPIDER_SQL_PERCENT_STR, SPIDER_SQL_PERCENT_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ } else if (str->append(*ptr))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ } else if (field->str_needs_quotes())
+ {
+ if (str->charset() != field->charset())
+ {
+ if ((error_num = spider_db_append_charset_name_before_string(str,
+ field->charset())))
+ {
+ DBUG_RETURN(error_num);
+ }
+ }
+ if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN * 2 + ptr->length() * 2 + 2))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ append_escaped_util(str, ptr);
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ } else if (float_value)
+ {
+ if (str->reserve(SPIDER_SQL_TO_FLOAT_LEN + ptr->length() +
+ SPIDER_SQL_CLOSE_PAREN_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_TO_FLOAT_STR, SPIDER_SQL_TO_FLOAT_LEN);
+ str->q_append(ptr->ptr(), ptr->length());
+ str->q_append(SPIDER_SQL_CLOSE_PAREN_STR, SPIDER_SQL_CLOSE_PAREN_LEN);
+ } else if (str->append(*ptr))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ DBUG_RETURN(0);
+}
+
+int spider_db_mbase_util::append_column_value(ha_spider *, spider_string *,
+ Field *, const uchar *, bool,
+ CHARSET_INFO *)
+{
+ MY_ASSERT_UNREACHABLE();
+ return 0;
+}
+
int spider_db_mbase_util::append_from_with_alias(
spider_string *str,
const char **table_names,
@@ -3902,6 +4515,885 @@ int spider_db_mbase_util::append_sql_log_off(
DBUG_RETURN(0);
}
+int spider_db_mbase_util::append_wait_timeout(
+ spider_string *str,
+ int wait_timeout
+) {
+ char timeout_str[SPIDER_SQL_INT_LEN];
+ int timeout_str_length;
+ DBUG_ENTER("spider_db_mbase_util::append_wait_timeout");
+ DBUG_PRINT("info",("spider this=%p", this));
+ timeout_str_length =
+ my_sprintf(timeout_str, (timeout_str, "%d", wait_timeout));
+ if (str->reserve(SPIDER_SQL_SEMICOLON_LEN + SPIDER_SQL_WAIT_TIMEOUT_LEN +
+ timeout_str_length))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ if (str->length())
+ {
+ str->q_append(SPIDER_SQL_SEMICOLON_STR, SPIDER_SQL_SEMICOLON_LEN);
+ }
+ str->q_append(SPIDER_SQL_WAIT_TIMEOUT_STR, SPIDER_SQL_WAIT_TIMEOUT_LEN);
+ str->q_append(timeout_str, timeout_str_length);
+ DBUG_RETURN(0);
+}
+
+#define SPIDER_REAL_AS_FLOAT_STR "real_as_float"
+#define SPIDER_REAL_AS_FLOAT_LEN (sizeof(SPIDER_REAL_AS_FLOAT_STR) - 1)
+#define SPIDER_PIPES_AS_CONCAT_STR "pipes_as_concat"
+#define SPIDER_PIPES_AS_CONCAT_LEN (sizeof(SPIDER_PIPES_AS_CONCAT_STR) - 1)
+#define SPIDER_ANSI_QUOTES_STR "ansi_quotes"
+#define SPIDER_ANSI_QUOTES_LEN (sizeof(SPIDER_ANSI_QUOTES_STR) - 1)
+#define SPIDER_IGNORE_SPACE_STR "ignore_space"
+#define SPIDER_IGNORE_SPACE_LEN (sizeof(SPIDER_IGNORE_SPACE_STR) - 1)
+#define SPIDER_IGNORE_BAD_TABLE_OPTIONS_STR "ignore_bad_table_options"
+#define SPIDER_IGNORE_BAD_TABLE_OPTIONS_LEN (sizeof(SPIDER_IGNORE_BAD_TABLE_OPTIONS_STR) - 1)
+#define SPIDER_ONLY_FULL_GROUP_BY_STR "only_full_group_by"
+#define SPIDER_ONLY_FULL_GROUP_BY_LEN (sizeof(SPIDER_ONLY_FULL_GROUP_BY_STR) - 1)
+#define SPIDER_NO_UNSIGNED_SUBTRACTION_STR "no_unsigned_subtraction"
+#define SPIDER_NO_UNSIGNED_SUBTRACTION_LEN (sizeof(SPIDER_NO_UNSIGNED_SUBTRACTION_STR) - 1)
+#define SPIDER_NO_DIR_IN_CREATE_STR "no_dir_in_create"
+#define SPIDER_NO_DIR_IN_CREATE_LEN (sizeof(SPIDER_NO_DIR_IN_CREATE_STR) - 1)
+#define SPIDER_POSTGRESQL_STR "postgresql"
+#define SPIDER_POSTGRESQL_LEN (sizeof(SPIDER_POSTGRESQL_STR) - 1)
+#define SPIDER_ORACLE_STR "oracle"
+#define SPIDER_ORACLE_LEN (sizeof(SPIDER_ORACLE_STR) - 1)
+#define SPIDER_MSSQL_STR "mssql"
+#define SPIDER_MSSQL_LEN (sizeof(SPIDER_MSSQL_STR) - 1)
+#define SPIDER_DB2_STR "db2"
+#define SPIDER_DB2_LEN (sizeof(SPIDER_DB2_STR) - 1)
+#define SPIDER_MAXDB_STR "maxdb"
+#define SPIDER_MAXDB_LEN (sizeof(SPIDER_MAXDB_STR) - 1)
+#define SPIDER_NO_KEY_OPTIONS_STR "no_key_options"
+#define SPIDER_NO_KEY_OPTIONS_LEN (sizeof(SPIDER_NO_KEY_OPTIONS_STR) - 1)
+#define SPIDER_NO_TABLE_OPTIONS_STR "no_table_options"
+#define SPIDER_NO_TABLE_OPTIONS_LEN (sizeof(SPIDER_NO_TABLE_OPTIONS_STR) - 1)
+#define SPIDER_NO_FIELD_OPTIONS_STR "no_field_options"
+#define SPIDER_NO_FIELD_OPTIONS_LEN (sizeof(SPIDER_NO_FIELD_OPTIONS_STR) - 1)
+#define SPIDER_MYSQL323_STR "mysql323"
+#define SPIDER_MYSQL323_LEN (sizeof(SPIDER_MYSQL323_STR) - 1)
+#define SPIDER_MYSQL40_STR "mysql40"
+#define SPIDER_MYSQL40_LEN (sizeof(SPIDER_MYSQL40_STR) - 1)
+#define SPIDER_ANSI_STR "ansi"
+#define SPIDER_ANSI_LEN (sizeof(SPIDER_ANSI_STR) - 1)
+#define SPIDER_NO_AUTO_VALUE_ON_ZERO_STR "no_auto_value_on_zero"
+#define SPIDER_NO_AUTO_VALUE_ON_ZERO_LEN (sizeof(SPIDER_NO_AUTO_VALUE_ON_ZERO_STR) - 1)
+#define SPIDER_NO_BACKSLASH_ESCAPES_STR "no_backslash_escapes"
+#define SPIDER_NO_BACKSLASH_ESCAPES_LEN (sizeof(SPIDER_NO_BACKSLASH_ESCAPES_STR) - 1)
+#define SPIDER_STRICT_TRANS_TABLES_STR "strict_trans_tables"
+#define SPIDER_STRICT_TRANS_TABLES_LEN (sizeof(SPIDER_STRICT_TRANS_TABLES_STR) - 1)
+#define SPIDER_STRICT_ALL_TABLES_STR "strict_all_tables"
+#define SPIDER_STRICT_ALL_TABLES_LEN (sizeof(SPIDER_STRICT_ALL_TABLES_STR) - 1)
+#define SPIDER_NO_ZERO_IN_DATE_STR "no_zero_in_date"
+#define SPIDER_NO_ZERO_IN_DATE_LEN (sizeof(SPIDER_NO_ZERO_IN_DATE_STR) - 1)
+#define SPIDER_NO_ZERO_DATE_STR "no_zero_date"
+#define SPIDER_NO_ZERO_DATE_LEN (sizeof(SPIDER_NO_ZERO_DATE_STR) - 1)
+#define SPIDER_INVALID_DATES_STR "allow_invalid_dates"
+#define SPIDER_INVALID_DATES_LEN (sizeof(SPIDER_INVALID_DATES_STR) - 1)
+#define SPIDER_ERROR_FOR_DIVISION_BY_ZERO_STR "error_for_division_by_zero"
+#define SPIDER_ERROR_FOR_DIVISION_BY_ZERO_LEN (sizeof(SPIDER_ERROR_FOR_DIVISION_BY_ZERO_STR) - 1)
+#define SPIDER_TRADITIONAL_STR "traditional"
+#define SPIDER_TRADITIONAL_LEN (sizeof(SPIDER_TRADITIONAL_STR) - 1)
+#define SPIDER_NO_AUTO_CREATE_USER_STR "no_auto_create_user"
+#define SPIDER_NO_AUTO_CREATE_USER_LEN (sizeof(SPIDER_NO_AUTO_CREATE_USER_STR) - 1)
+#define SPIDER_HIGH_NOT_PRECEDENCE_STR "high_not_precedence"
+#define SPIDER_HIGH_NOT_PRECEDENCE_LEN (sizeof(SPIDER_HIGH_NOT_PRECEDENCE_STR) - 1)
+#define SPIDER_NO_ENGINE_SUBSTITUTION_STR "no_engine_substitution"
+#define SPIDER_NO_ENGINE_SUBSTITUTION_LEN (sizeof(SPIDER_NO_ENGINE_SUBSTITUTION_STR) - 1)
+#define SPIDER_PAD_CHAR_TO_FULL_LENGTH_STR "pad_char_to_full_length"
+#define SPIDER_PAD_CHAR_TO_FULL_LENGTH_LEN (sizeof(SPIDER_PAD_CHAR_TO_FULL_LENGTH_STR) - 1)
+#define SPIDER_EMPTY_STRING_IS_NULL_STR "empty_string_is_null"
+#define SPIDER_EMPTY_STRING_IS_NULL_LEN (sizeof(SPIDER_EMPTY_STRING_IS_NULL_STR) - 1)
+#define SPIDER_SIMULTANEOUS_ASSIGNMENT_STR "simultaneous_assignment"
+#define SPIDER_SIMULTANEOUS_ASSIGNMENT_LEN (sizeof(SPIDER_SIMULTANEOUS_ASSIGNMENT_STR) - 1)
+#define SPIDER_TIME_ROUND_FRACTIONAL_STR "time_round_fractional"
+#define SPIDER_TIME_ROUND_FRACTIONAL_LEN (sizeof(SPIDER_TIME_ROUND_FRACTIONAL_STR) - 1)
+
+sql_mode_t full_sql_mode =
+#ifdef MODE_REAL_AS_FLOAT
+ MODE_REAL_AS_FLOAT |
+#endif
+#ifdef MODE_PIPES_AS_CONCAT
+ MODE_PIPES_AS_CONCAT |
+#endif
+#ifdef MODE_ANSI_QUOTES
+ MODE_ANSI_QUOTES |
+#endif
+#ifdef MODE_IGNORE_SPACE
+ MODE_IGNORE_SPACE |
+#endif
+#ifdef MODE_IGNORE_BAD_TABLE_OPTIONS
+ MODE_IGNORE_BAD_TABLE_OPTIONS |
+#endif
+#ifdef MODE_ONLY_FULL_GROUP_BY
+ MODE_ONLY_FULL_GROUP_BY |
+#endif
+#ifdef MODE_NO_UNSIGNED_SUBTRACTION
+ MODE_NO_UNSIGNED_SUBTRACTION |
+#endif
+#ifdef MODE_NO_DIR_IN_CREATE
+ MODE_NO_DIR_IN_CREATE |
+#endif
+#ifdef MODE_POSTGRESQL
+ MODE_POSTGRESQL |
+#endif
+#ifdef MODE_ORACLE
+ MODE_ORACLE |
+#endif
+#ifdef MODE_MSSQL
+ MODE_MSSQL |
+#endif
+#ifdef MODE_DB2
+ MODE_DB2 |
+#endif
+#ifdef MODE_MAXDB
+ MODE_MAXDB |
+#endif
+#ifdef MODE_NO_KEY_OPTIONS
+ MODE_NO_KEY_OPTIONS |
+#endif
+#ifdef MODE_NO_TABLE_OPTIONS
+ MODE_NO_TABLE_OPTIONS |
+#endif
+#ifdef MODE_NO_FIELD_OPTIONS
+ MODE_NO_FIELD_OPTIONS |
+#endif
+#ifdef MODE_MYSQL323
+ MODE_MYSQL323 |
+#endif
+#ifdef MODE_MYSQL40
+ MODE_MYSQL40 |
+#endif
+#ifdef MODE_ANSI
+ MODE_ANSI |
+#endif
+#ifdef MODE_NO_AUTO_VALUE_ON_ZERO
+ MODE_NO_AUTO_VALUE_ON_ZERO |
+#endif
+#ifdef MODE_NO_BACKSLASH_ESCAPES
+ MODE_NO_BACKSLASH_ESCAPES |
+#endif
+#ifdef MODE_STRICT_TRANS_TABLES
+ MODE_STRICT_TRANS_TABLES |
+#endif
+#ifdef MODE_STRICT_ALL_TABLES
+ MODE_STRICT_ALL_TABLES |
+#endif
+#ifdef MODE_NO_ZERO_IN_DATE
+ MODE_NO_ZERO_IN_DATE |
+#endif
+#ifdef MODE_NO_ZERO_DATE
+ MODE_NO_ZERO_DATE |
+#endif
+#ifdef MODE_INVALID_DATES
+ MODE_INVALID_DATES |
+#endif
+#ifdef MODE_ERROR_FOR_DIVISION_BY_ZERO
+ MODE_ERROR_FOR_DIVISION_BY_ZERO |
+#endif
+#ifdef MODE_TRADITIONAL
+ MODE_TRADITIONAL |
+#endif
+#ifdef MODE_NO_AUTO_CREATE_USER
+ MODE_NO_AUTO_CREATE_USER |
+#endif
+#ifdef MODE_HIGH_NOT_PRECEDENCE
+ MODE_HIGH_NOT_PRECEDENCE |
+#endif
+#ifdef MODE_NO_ENGINE_SUBSTITUTION
+ MODE_NO_ENGINE_SUBSTITUTION |
+#endif
+#ifdef MODE_PAD_CHAR_TO_FULL_LENGTH
+ MODE_PAD_CHAR_TO_FULL_LENGTH |
+#endif
+#ifdef MODE_EMPTY_STRING_IS_NULL
+ MODE_EMPTY_STRING_IS_NULL |
+#endif
+#ifdef MODE_SIMULTANEOUS_ASSIGNMENT
+ MODE_SIMULTANEOUS_ASSIGNMENT |
+#endif
+#ifdef MODE_TIME_ROUND_FRACTIONAL
+ MODE_TIME_ROUND_FRACTIONAL |
+#endif
+ 0;
+
+#ifdef MODE_REAL_AS_FLOAT
+/* pushdown */
+#define SPIDER_SQL_MODE_REAL_AS_FLOAT
+#endif
+#ifdef MODE_PIPES_AS_CONCAT
+/* no pushdown */
+#endif
+#ifdef MODE_ANSI_QUOTES
+/* no pushdown */
+#endif
+#ifdef MODE_IGNORE_SPACE
+/* no pushdown */
+#endif
+#ifdef MODE_IGNORE_BAD_TABLE_OPTIONS
+/* pushdown */
+#define SPIDER_SQL_MODE_IGNORE_BAD_TABLE_OPTIONS
+#endif
+#ifdef MODE_ONLY_FULL_GROUP_BY
+/* no pushdown */
+#endif
+#ifdef MODE_NO_UNSIGNED_SUBTRACTION
+/* pushdown */
+#define SPIDER_SQL_MODE_NO_UNSIGNED_SUBTRACTION
+#endif
+#ifdef MODE_NO_DIR_IN_CREATE
+/* pushdown */
+#define SPIDER_SQL_MODE_NO_DIR_IN_CREATE
+#endif
+#ifdef MODE_POSTGRESQL
+/* no pushdown */
+#endif
+#ifdef MODE_ORACLE
+/* no pushdown */
+#endif
+#ifdef MODE_MSSQL
+/* no pushdown */
+#endif
+#ifdef MODE_DB2
+/* no pushdown */
+#endif
+#ifdef MODE_MAXDB
+/* no pushdown */
+#endif
+#ifdef MODE_NO_KEY_OPTIONS
+/* no pushdown */
+#endif
+#ifdef MODE_NO_TABLE_OPTIONS
+/* no pushdown */
+#endif
+#ifdef MODE_NO_FIELD_OPTIONS
+/* no pushdown */
+#endif
+#ifdef MODE_MYSQL323
+/* no pushdown */
+#endif
+#ifdef MODE_MYSQL40
+/* no pushdown */
+#endif
+#ifdef MODE_ANSI
+/* no pushdown */
+#endif
+#ifdef MODE_NO_AUTO_VALUE_ON_ZERO
+/* pushdown */
+#define SPIDER_SQL_MODE_NO_AUTO_VALUE_ON_ZERO
+#endif
+#ifdef MODE_NO_BACKSLASH_ESCAPES
+/* no pushdown */
+#endif
+#ifdef MODE_STRICT_TRANS_TABLES
+/* pushdown */
+#define SPIDER_SQL_MODE_STRICT_TRANS_TABLES
+#endif
+#ifdef MODE_STRICT_ALL_TABLES
+/* pushdown */
+#define SPIDER_SQL_MODE_STRICT_ALL_TABLES
+#endif
+#ifdef MODE_NO_ZERO_IN_DATE
+/* pushdown */
+#define SPIDER_SQL_MODE_NO_ZERO_IN_DATE
+#endif
+#ifdef MODE_NO_ZERO_DATE
+/* pushdown */
+#define SPIDER_SQL_MODE_NO_ZERO_DATE
+#endif
+#ifdef MODE_INVALID_DATES
+/* pushdown */
+#define SPIDER_SQL_MODE_INVALID_DATES
+#endif
+#ifdef MODE_ERROR_FOR_DIVISION_BY_ZERO
+/* pushdown */
+#define SPIDER_SQL_MODE_ERROR_FOR_DIVISION_BY_ZERO
+#endif
+#ifdef MODE_TRADITIONAL
+/* no pushdown */
+#endif
+#ifdef MODE_NO_AUTO_CREATE_USER
+/* pushdown */
+#define SPIDER_SQL_MODE_NO_AUTO_CREATE_USER
+#endif
+#ifdef MODE_HIGH_NOT_PRECEDENCE
+/* pushdown */
+#define SPIDER_SQL_MODE_HIGH_NOT_PRECEDENCE
+#endif
+#ifdef MODE_NO_ENGINE_SUBSTITUTION
+/* pushdown */
+#define SPIDER_SQL_MODE_NO_ENGINE_SUBSTITUTION
+#endif
+#ifdef MODE_PAD_CHAR_TO_FULL_LENGTH
+/* pushdown */
+#define SPIDER_SQL_MODE_PAD_CHAR_TO_FULL_LENGTH
+#endif
+#ifdef MODE_EMPTY_STRING_IS_NULL
+/* pushdown */
+#define SPIDER_SQL_MODE_EMPTY_STRING_IS_NULL
+#endif
+#ifdef MODE_SIMULTANEOUS_ASSIGNMENT
+/* pushdown */
+#define SPIDER_SQL_MODE_SIMULTANEOUS_ASSIGNMENT
+#endif
+#ifdef MODE_TIME_ROUND_FRACTIONAL
+/* pushdown */
+#define SPIDER_SQL_MODE_TIME_ROUND_FRACTIONAL
+#endif
+
+sql_mode_t pushdown_sql_mode =
+#ifdef SPIDER_SQL_MODE_REAL_AS_FLOAT
+ MODE_REAL_AS_FLOAT |
+#endif
+#ifdef SPIDER_SQL_MODE_PIPES_AS_CONCAT
+ MODE_PIPES_AS_CONCAT |
+#endif
+#ifdef SPIDER_SQL_MODE_ANSI_QUOTES
+ MODE_ANSI_QUOTES |
+#endif
+#ifdef SPIDER_SQL_MODE_IGNORE_SPACE
+ MODE_IGNORE_SPACE |
+#endif
+#ifdef SPIDER_SQL_MODE_IGNORE_BAD_TABLE_OPTIONS
+ MODE_IGNORE_BAD_TABLE_OPTIONS |
+#endif
+#ifdef SPIDER_SQL_MODE_ONLY_FULL_GROUP_BY
+ MODE_ONLY_FULL_GROUP_BY |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_UNSIGNED_SUBTRACTION
+ MODE_NO_UNSIGNED_SUBTRACTION |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_DIR_IN_CREATE
+ MODE_NO_DIR_IN_CREATE |
+#endif
+#ifdef SPIDER_SQL_MODE_POSTGRESQL
+ MODE_POSTGRESQL |
+#endif
+#ifdef SPIDER_SQL_MODE_ORACLE
+ MODE_ORACLE |
+#endif
+#ifdef SPIDER_SQL_MODE_MSSQL
+ MODE_MSSQL |
+#endif
+#ifdef SPIDER_SQL_MODE_DB2
+ MODE_DB2 |
+#endif
+#ifdef SPIDER_SQL_MODE_MAXDB
+ MODE_MAXDB |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_KEY_OPTIONS
+ MODE_NO_KEY_OPTIONS |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_TABLE_OPTIONS
+ MODE_NO_TABLE_OPTIONS |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_FIELD_OPTIONS
+ MODE_NO_FIELD_OPTIONS |
+#endif
+#ifdef SPIDER_SQL_MODE_MYSQL323
+ MODE_MYSQL323 |
+#endif
+#ifdef SPIDER_SQL_MODE_MYSQL40
+ MODE_MYSQL40 |
+#endif
+#ifdef SPIDER_SQL_MODE_ANSI
+ MODE_ANSI |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_AUTO_VALUE_ON_ZERO
+ MODE_NO_AUTO_VALUE_ON_ZERO |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_BACKSLASH_ESCAPES
+ MODE_NO_BACKSLASH_ESCAPES |
+#endif
+#ifdef SPIDER_SQL_MODE_STRICT_TRANS_TABLES
+ MODE_STRICT_TRANS_TABLES |
+#endif
+#ifdef SPIDER_SQL_MODE_STRICT_ALL_TABLES
+ MODE_STRICT_ALL_TABLES |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_ZERO_IN_DATE
+ MODE_NO_ZERO_IN_DATE |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_ZERO_DATE
+ MODE_NO_ZERO_DATE |
+#endif
+#ifdef SPIDER_SQL_MODE_INVALID_DATES
+ MODE_INVALID_DATES |
+#endif
+#ifdef SPIDER_SQL_MODE_ERROR_FOR_DIVISION_BY_ZERO
+ MODE_ERROR_FOR_DIVISION_BY_ZERO |
+#endif
+#ifdef SPIDER_SQL_MODE_TRADITIONAL
+ MODE_TRADITIONAL |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_AUTO_CREATE_USER
+ MODE_NO_AUTO_CREATE_USER |
+#endif
+#ifdef SPIDER_SQL_MODE_HIGH_NOT_PRECEDENCE
+ MODE_HIGH_NOT_PRECEDENCE |
+#endif
+#ifdef SPIDER_SQL_MODE_NO_ENGINE_SUBSTITUTION
+ MODE_NO_ENGINE_SUBSTITUTION |
+#endif
+#ifdef SPIDER_SQL_MODE_PAD_CHAR_TO_FULL_LENGTH
+ MODE_PAD_CHAR_TO_FULL_LENGTH |
+#endif
+#ifdef SPIDER_SQL_MODE_EMPTY_STRING_IS_NULL
+ MODE_EMPTY_STRING_IS_NULL |
+#endif
+#ifdef SPIDER_SQL_MODE_SIMULTANEOUS_ASSIGNMENT
+ MODE_SIMULTANEOUS_ASSIGNMENT |
+#endif
+#ifdef SPIDER_SQL_MODE_TIME_ROUND_FRACTIONAL
+ MODE_TIME_ROUND_FRACTIONAL |
+#endif
+ 0;
+
+int spider_db_mbase_util::append_sql_mode_internal(
+ spider_string *str,
+ sql_mode_t sql_mode
+) {
+ DBUG_ENTER("spider_db_mbase_util::append_sql_mode_internal");
+ DBUG_PRINT("info",("spider this=%p", this));
+#ifdef SPIDER_SQL_MODE_REAL_AS_FLOAT
+ if (sql_mode & MODE_REAL_AS_FLOAT)
+ {
+ if (str->reserve(SPIDER_REAL_AS_FLOAT_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_REAL_AS_FLOAT_STR, SPIDER_REAL_AS_FLOAT_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_PIPES_AS_CONCAT
+ if (sql_mode & MODE_PIPES_AS_CONCAT)
+ {
+ if (str->reserve(SPIDER_PIPES_AS_CONCAT_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_PIPES_AS_CONCAT_STR, SPIDER_PIPES_AS_CONCAT_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_ANSI_QUOTES
+ if (sql_mode & MODE_ANSI_QUOTES)
+ {
+ if (str->reserve(SPIDER_ANSI_QUOTES_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_ANSI_QUOTES_STR, SPIDER_ANSI_QUOTES_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_IGNORE_SPACE
+ if (sql_mode & MODE_IGNORE_SPACE)
+ {
+ if (str->reserve(SPIDER_IGNORE_SPACE_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_IGNORE_SPACE_STR, SPIDER_IGNORE_SPACE_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_IGNORE_BAD_TABLE_OPTIONS
+ if (sql_mode & MODE_IGNORE_BAD_TABLE_OPTIONS)
+ {
+ if (str->reserve(SPIDER_IGNORE_BAD_TABLE_OPTIONS_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_IGNORE_BAD_TABLE_OPTIONS_STR, SPIDER_IGNORE_BAD_TABLE_OPTIONS_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_ONLY_FULL_GROUP_BY
+ if (sql_mode & MODE_ONLY_FULL_GROUP_BY)
+ {
+ if (str->reserve(SPIDER_ONLY_FULL_GROUP_BY_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_ONLY_FULL_GROUP_BY_STR, SPIDER_ONLY_FULL_GROUP_BY_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_UNSIGNED_SUBTRACTION
+ if (sql_mode & MODE_NO_UNSIGNED_SUBTRACTION)
+ {
+ if (str->reserve(SPIDER_NO_UNSIGNED_SUBTRACTION_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_UNSIGNED_SUBTRACTION_STR, SPIDER_NO_UNSIGNED_SUBTRACTION_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_DIR_IN_CREATE
+ if (sql_mode & MODE_NO_DIR_IN_CREATE)
+ {
+ if (str->reserve(SPIDER_NO_DIR_IN_CREATE_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_DIR_IN_CREATE_STR, SPIDER_NO_DIR_IN_CREATE_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_POSTGRESQL
+ if (sql_mode & MODE_POSTGRESQL)
+ {
+ if (str->reserve(SPIDER_POSTGRESQL_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_POSTGRESQL_STR, SPIDER_POSTGRESQL_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_ORACLE
+ if (sql_mode & MODE_ORACLE)
+ {
+ if (str->reserve(SPIDER_ORACLE_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_ORACLE_STR, SPIDER_ORACLE_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_MSSQL
+ if (sql_mode & MODE_MSSQL)
+ {
+ if (str->reserve(SPIDER_MSSQL_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_MSSQL_STR, SPIDER_MSSQL_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_DB2
+ if (sql_mode & MODE_DB2)
+ {
+ if (str->reserve(SPIDER_DB2_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_DB2_STR, SPIDER_DB2_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_MAXDB
+ if (sql_mode & MODE_MAXDB)
+ {
+ if (str->reserve(SPIDER_MAXDB_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_MAXDB_STR, SPIDER_MAXDB_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_KEY_OPTIONS
+ if (sql_mode & MODE_NO_KEY_OPTIONS)
+ {
+ if (str->reserve(SPIDER_NO_KEY_OPTIONS_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_KEY_OPTIONS_STR, SPIDER_NO_KEY_OPTIONS_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_TABLE_OPTIONS
+ if (sql_mode & MODE_NO_TABLE_OPTIONS)
+ {
+ if (str->reserve(SPIDER_NO_TABLE_OPTIONS_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_TABLE_OPTIONS_STR, SPIDER_NO_TABLE_OPTIONS_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_FIELD_OPTIONS
+ if (sql_mode & MODE_NO_FIELD_OPTIONS)
+ {
+ if (str->reserve(SPIDER_NO_FIELD_OPTIONS_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_FIELD_OPTIONS_STR, SPIDER_NO_FIELD_OPTIONS_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_MYSQL323
+ if (sql_mode & MODE_MYSQL323)
+ {
+ if (str->reserve(SPIDER_MYSQL323_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_MYSQL323_STR, SPIDER_MYSQL323_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_MYSQL40
+ if (sql_mode & MODE_MYSQL40)
+ {
+ if (str->reserve(SPIDER_MYSQL40_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_MYSQL40_STR, SPIDER_MYSQL40_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_ANSI
+ if (sql_mode & MODE_ANSI)
+ {
+ if (str->reserve(SPIDER_ANSI_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_ANSI_STR, SPIDER_ANSI_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_AUTO_VALUE_ON_ZERO
+ if (sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO)
+ {
+ if (str->reserve(SPIDER_NO_AUTO_VALUE_ON_ZERO_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_AUTO_VALUE_ON_ZERO_STR, SPIDER_NO_AUTO_VALUE_ON_ZERO_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_BACKSLASH_ESCAPES
+ if (sql_mode & MODE_NO_BACKSLASH_ESCAPES)
+ {
+ if (str->reserve(SPIDER_NO_BACKSLASH_ESCAPES_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_BACKSLASH_ESCAPES_STR, SPIDER_NO_BACKSLASH_ESCAPES_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_STRICT_TRANS_TABLES
+ if (sql_mode & MODE_STRICT_TRANS_TABLES)
+ {
+ if (str->reserve(SPIDER_STRICT_TRANS_TABLES_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_STRICT_TRANS_TABLES_STR, SPIDER_STRICT_TRANS_TABLES_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_STRICT_ALL_TABLES
+ if (sql_mode & MODE_STRICT_ALL_TABLES)
+ {
+ if (str->reserve(SPIDER_STRICT_ALL_TABLES_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_STRICT_ALL_TABLES_STR, SPIDER_STRICT_ALL_TABLES_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_ZERO_IN_DATE
+ if (sql_mode & MODE_NO_ZERO_IN_DATE)
+ {
+ if (str->reserve(SPIDER_NO_ZERO_IN_DATE_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_ZERO_IN_DATE_STR, SPIDER_NO_ZERO_IN_DATE_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_ZERO_DATE
+ if (sql_mode & MODE_NO_ZERO_DATE)
+ {
+ if (str->reserve(SPIDER_NO_ZERO_DATE_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_ZERO_DATE_STR, SPIDER_NO_ZERO_DATE_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_INVALID_DATES
+ if (sql_mode & MODE_INVALID_DATES)
+ {
+ if (str->reserve(SPIDER_INVALID_DATES_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_INVALID_DATES_STR, SPIDER_INVALID_DATES_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_ERROR_FOR_DIVISION_BY_ZERO
+ if (sql_mode & MODE_ERROR_FOR_DIVISION_BY_ZERO)
+ {
+ if (str->reserve(SPIDER_ERROR_FOR_DIVISION_BY_ZERO_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_ERROR_FOR_DIVISION_BY_ZERO_STR, SPIDER_ERROR_FOR_DIVISION_BY_ZERO_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_TRADITIONAL
+ if (sql_mode & MODE_TRADITIONAL)
+ {
+ if (str->reserve(SPIDER_TRADITIONAL_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_TRADITIONAL_STR, SPIDER_TRADITIONAL_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_AUTO_CREATE_USER
+ if (sql_mode & MODE_NO_AUTO_CREATE_USER)
+ {
+ if (str->reserve(SPIDER_NO_AUTO_CREATE_USER_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_AUTO_CREATE_USER_STR, SPIDER_NO_AUTO_CREATE_USER_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_HIGH_NOT_PRECEDENCE
+ if (sql_mode & MODE_HIGH_NOT_PRECEDENCE)
+ {
+ if (str->reserve(SPIDER_HIGH_NOT_PRECEDENCE_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_HIGH_NOT_PRECEDENCE_STR, SPIDER_HIGH_NOT_PRECEDENCE_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_NO_ENGINE_SUBSTITUTION
+ if (sql_mode & MODE_NO_ENGINE_SUBSTITUTION)
+ {
+ if (str->reserve(SPIDER_NO_ENGINE_SUBSTITUTION_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_NO_ENGINE_SUBSTITUTION_STR, SPIDER_NO_ENGINE_SUBSTITUTION_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_PAD_CHAR_TO_FULL_LENGTH
+ if (sql_mode & MODE_PAD_CHAR_TO_FULL_LENGTH)
+ {
+ if (str->reserve(SPIDER_PAD_CHAR_TO_FULL_LENGTH_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_PAD_CHAR_TO_FULL_LENGTH_STR, SPIDER_PAD_CHAR_TO_FULL_LENGTH_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+ DBUG_RETURN(0);
+}
+
+int spider_db_mariadb_util::append_sql_mode_internal(
+ spider_string *str,
+ sql_mode_t sql_mode
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_mbase_util::append_sql_mode_internal");
+ DBUG_PRINT("info",("spider this=%p", this));
+ if ((error_num = spider_db_mbase_util::append_sql_mode_internal(
+ str, sql_mode)))
+ {
+ DBUG_RETURN(error_num);
+ }
+#ifdef SPIDER_SQL_MODE_EMPTY_STRING_IS_NULL
+ if (sql_mode & MODE_EMPTY_STRING_IS_NULL)
+ {
+ if (str->reserve(SPIDER_EMPTY_STRING_IS_NULL_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_EMPTY_STRING_IS_NULL_STR, SPIDER_EMPTY_STRING_IS_NULL_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_SIMULTANEOUS_ASSIGNMENT
+ if (sql_mode & MODE_SIMULTANEOUS_ASSIGNMENT)
+ {
+ if (str->reserve(SPIDER_SIMULTANEOUS_ASSIGNMENT_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SIMULTANEOUS_ASSIGNMENT_STR, SPIDER_SIMULTANEOUS_ASSIGNMENT_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+#ifdef SPIDER_SQL_MODE_TIME_ROUND_FRACTIONAL
+ if (sql_mode & MODE_TIME_ROUND_FRACTIONAL)
+ {
+ if (str->reserve(SPIDER_TIME_ROUND_FRACTIONAL_LEN + SPIDER_SQL_COMMA_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_TIME_ROUND_FRACTIONAL_STR, SPIDER_TIME_ROUND_FRACTIONAL_LEN);
+ str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ }
+#endif
+ DBUG_RETURN(0);
+}
+
+int spider_db_mbase_util::append_sql_mode(
+ spider_string *str,
+ sql_mode_t sql_mode
+) {
+ int error_num;
+ uint length;
+ DBUG_ENTER("spider_db_mbase_util::append_sql_mode");
+ DBUG_PRINT("info",("spider this=%p", this));
+ if (str->reserve(SPIDER_SQL_SEMICOLON_LEN + SPIDER_SQL_SQL_MODE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ if (str->length())
+ {
+ str->q_append(SPIDER_SQL_SEMICOLON_STR, SPIDER_SQL_SEMICOLON_LEN);
+ }
+ str->q_append(SPIDER_SQL_SQL_MODE_STR, SPIDER_SQL_SQL_MODE_LEN);
+ length = str->length();
+ if ((error_num = append_sql_mode_internal(str, sql_mode)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (str->length() > length)
+ {
+ str->length(str->length() - SPIDER_SQL_COMMA_LEN);
+ } else {
+ if (str->reserve(SPIDER_SQL_VALUE_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ }
+ str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
+ DBUG_RETURN(0);
+}
+
int spider_db_mbase_util::append_time_zone(
spider_string *str,
Time_zone *time_zone
@@ -4121,7 +5613,7 @@ int spider_db_mbase_util::open_item_func(
Item *item_tmp = item_list[1];
if (str)
{
- if (item_tmp->type() == Item::STRING_ITEM)
+ if (item_tmp->is_of_type(Item::CONST_ITEM, STRING_RESULT))
{
/* 1. append 'TRIM(BOTH ' */
if (str->reserve(SPIDER_SQL_TRIM_LEN + SPIDER_SQL_OPEN_PAREN_LEN +
@@ -4168,7 +5660,7 @@ int spider_db_mbase_util::open_item_func(
Item *item_tmp = item_list[1];
if (str)
{
- if (item_tmp->type() == Item::STRING_ITEM)
+ if (item_tmp->is_of_type(Item::CONST_ITEM, STRING_RESULT))
{
/* 1. append 'TRIM(LEADING ' or 'TRIM(TRAILING ' */
if (func_name[0] == 'l' || func_name[0] == 'L')
@@ -5022,9 +6514,10 @@ int spider_db_mbase_util::open_item_func(
}
break;
case Item_func::LIKE_FUNC:
+#ifdef SPIDER_LIKE_FUNC_HAS_GET_NEGATED
if (str)
{
- if (((Item_func_like *)item_func)->negated)
+ if (((Item_func_like *)item_func)->get_negated())
{
func_name = SPIDER_SQL_NOT_LIKE_STR;
func_name_length = SPIDER_SQL_NOT_LIKE_LEN;
@@ -5036,6 +6529,9 @@ int spider_db_mbase_util::open_item_func(
}
}
break;
+#else
+ DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
+#endif
case Item_func::CASE_SEARCHED_FUNC:
case Item_func::CASE_SIMPLE_FUNC:
#ifdef ITEM_FUNC_CASE_PARAMS_ARE_PUBLIC
@@ -5470,25 +6966,13 @@ int spider_db_mbase_util::append_table(
} else if (*current_pos > 0 && !first)
{
DBUG_PRINT("info",("spider no condition"));
- if (top_down)
+ if (str)
{
- if (str)
+ if (str->reserve(SPIDER_SQL_JOIN_LEN))
{
- if (str->reserve(SPIDER_SQL_JOIN_LEN))
- {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- str->q_append(SPIDER_SQL_JOIN_STR, SPIDER_SQL_JOIN_LEN);
- }
- } else {
- if (str)
- {
- if (str->reserve(SPIDER_SQL_COMMA_LEN))
- {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
+ str->q_append(SPIDER_SQL_JOIN_STR, SPIDER_SQL_JOIN_LEN);
}
}
@@ -7033,6 +8517,15 @@ int spider_mbase_share::discover_table_structure(
}
#endif
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+bool spider_mbase_share::checksum_support()
+{
+ DBUG_ENTER("spider_mbase_share::checksum_support");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(TRUE);
+}
+#endif
+
spider_mbase_handler::spider_mbase_handler(
ha_spider *spider,
spider_mbase_share *db_share,
@@ -7158,10 +8651,12 @@ int spider_mbase_handler::init()
}
sql.set_charset(share->access_charset);
sql_part.set_charset(share->access_charset);
+ sql_part2.set_charset(share->access_charset);
ha_sql.set_charset(share->access_charset);
insert_sql.set_charset(share->access_charset);
update_sql.set_charset(share->access_charset);
tmp_sql.set_charset(share->access_charset);
+ dup_update_sql.set_charset(share->access_charset);
upd_tmp_tbl_prm.init();
upd_tmp_tbl_prm.field_count = 1;
if (!(link_for_hash = (SPIDER_LINK_FOR_HASH *)
@@ -7810,7 +9305,7 @@ int spider_mbase_handler::append_insert_for_recovery(
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
insert_sql->q_append(SPIDER_SQL_NULL_STR, SPIDER_SQL_NULL_LEN);
} else {
- if (spider_db_mysql_utility.append_column_value(spider, insert_sql,
+ if (spider_db_mbase_utility->append_column_value(spider, insert_sql,
*field, NULL, false,
share->access_charset) ||
insert_sql->reserve(SPIDER_SQL_COMMA_LEN))
@@ -7963,6 +9458,7 @@ int spider_mbase_handler::append_insert(
int link_idx
) {
DBUG_ENTER("spider_mbase_handler::append_insert");
+ direct_insert_kind = SPIDER_SQL_DIRECT_INSERT_KIND_INSERT;
if (
(
spider->write_can_replace ||
@@ -7972,6 +9468,7 @@ int spider_mbase_handler::append_insert(
) &&
spider->direct_dup_insert
) {
+ direct_insert_kind = SPIDER_SQL_DIRECT_INSERT_KIND_REPLACE;
if (str->reserve(SPIDER_SQL_REPLACE_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_REPLACE_STR, SPIDER_SQL_REPLACE_LEN);
@@ -8010,6 +9507,7 @@ int spider_mbase_handler::append_insert(
spider->sql_command != SQLCOM_REPLACE &&
spider->sql_command != SQLCOM_REPLACE_SELECT
) {
+ direct_insert_kind = SPIDER_SQL_DIRECT_INSERT_KIND_IGNORE;
if (str->reserve(SPIDER_SQL_SQL_IGNORE_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_SQL_IGNORE_STR, SPIDER_SQL_SQL_IGNORE_LEN);
@@ -8202,7 +9700,7 @@ int spider_mbase_handler::append_update_set(
#ifndef DBUG_OFF
MY_BITMAP *tmp_map = dbug_tmp_use_all_columns(table, &table->read_set);
#endif
- if (spider_db_mysql_utility.append_column_value(
+ if (spider_db_mbase_utility->append_column_value(
spider, str, *fields, NULL, FALSE, share->access_charset) ||
str->reserve(SPIDER_SQL_COMMA_LEN))
{
@@ -9004,7 +10502,7 @@ int spider_mbase_handler::append_key_column_values(
if (error_num > 0)
DBUG_RETURN(error_num);
} else {
- if (spider_db_mysql_utility.append_column_value(
+ if (spider_db_mbase_utility->append_column_value(
spider, str, field, ptr, FALSE, share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
@@ -9085,7 +10583,7 @@ int spider_mbase_handler::append_key_column_values_with_name(
if (error_num > 0)
DBUG_RETURN(error_num);
} else {
- if (spider_db_mysql_utility.append_column_value(
+ if (spider_db_mbase_utility->append_column_value(
spider, str, field, ptr, FALSE, share->access_charset))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
@@ -9224,6 +10722,7 @@ int spider_mbase_handler::append_is_null(
key->flag == HA_READ_KEY_EXACT ||
key->flag == HA_READ_KEY_OR_NEXT
) {
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
if (tgt_final)
{
if (str->reserve(SPIDER_SQL_EQUAL_LEN))
@@ -9234,11 +10733,23 @@ int spider_mbase_handler::append_is_null(
if (str->reserve(SPIDER_SQL_NULL_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_NULL_STR, SPIDER_SQL_NULL_LEN);
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ if (str->reserve(SPIDER_SQL_EQUAL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
+ str = str_part;
+ if (str->reserve(SPIDER_SQL_NULL_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_NULL_STR, SPIDER_SQL_NULL_LEN);
+ }
+#endif
} else {
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
{
str = str_part;
- /* first index column */
str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
ha_next_pos = str->length();
if (str->reserve(SPIDER_SQL_FIRST_LEN))
@@ -9255,6 +10766,19 @@ int spider_mbase_handler::append_is_null(
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_NULL_STR, SPIDER_SQL_NULL_LEN);
}
+#else
+ if (str_part->length() == SPIDER_SQL_OPEN_PAREN_LEN)
+ {
+ str = str_part;
+ /* first index column */
+ str->length(str->length() - SPIDER_SQL_OPEN_PAREN_LEN);
+ ha_next_pos = str->length();
+ if (str->reserve(SPIDER_SQL_FIRST_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_FIRST_STR, SPIDER_SQL_FIRST_LEN);
+ spider->result_list.ha_read_kind = 1;
+ }
+#endif
}
str = str_part2;
}
@@ -9336,7 +10860,9 @@ int spider_mbase_handler::append_where_terminator(
} else {
str_part2->length(str_part2->length() - SPIDER_SQL_AND_LEN);
+#ifdef SPIDER_HANDLER_SUPPORT_MULTIPLE_KEY_PARTS
str_part->length(str_part->length() - SPIDER_SQL_COMMA_LEN);
+#endif
if (!result_list->ha_read_kind)
str_part->q_append(SPIDER_SQL_CLOSE_PAREN_STR,
SPIDER_SQL_CLOSE_PAREN_LEN);
@@ -9495,7 +11021,7 @@ int spider_mbase_handler::append_update_where(
mysql_share->append_column_name(str, (*field)->field_index);
str->q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
(*field)->move_field_offset(ptr_diff);
- if (spider_db_mysql_utility.append_column_value(
+ if (spider_db_mbase_utility->append_column_value(
spider, str, *field, NULL, FALSE, share->access_charset) ||
str->reserve(SPIDER_SQL_AND_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
@@ -10839,6 +12365,7 @@ int spider_mbase_handler::append_insert_terminator(
dup_update_sql.length()
) {
DBUG_PRINT("info",("spider add duplicate key update"));
+ direct_insert_kind = SPIDER_SQL_DIRECT_INSERT_KIND_DUP_UPDATE;
str->length(str->length() - SPIDER_SQL_COMMA_LEN);
if (str->reserve(SPIDER_SQL_DUPLICATE_KEY_UPDATE_LEN +
dup_update_sql.length()))
@@ -10928,7 +12455,7 @@ int spider_mbase_handler::append_insert_values(
}
str->q_append(SPIDER_SQL_NULL_STR, SPIDER_SQL_NULL_LEN);
} else {
- if (spider_db_mysql_utility.append_column_value(
+ if (spider_db_mbase_utility->append_column_value(
spider, str, *field, NULL, FALSE, share->access_charset) ||
str->reserve(SPIDER_SQL_COMMA_LEN))
{
@@ -12521,16 +14048,9 @@ int spider_mbase_handler::show_table_status(
pthread_mutex_unlock(&conn->mta_conn_mutex);
error_num = res->fetch_table_status(
sts_mode,
- share->records,
- share->mean_rec_length,
- share->data_file_length,
- share->max_data_file_length,
- share->index_file_length,
- auto_increment_value,
- share->create_time,
- share->update_time,
- share->check_time
+ share->stat
);
+ auto_increment_value = share->stat.auto_increment_value;
res->free_result();
delete res;
if (error_num)
@@ -12672,16 +14192,9 @@ int spider_mbase_handler::show_table_status(
pthread_mutex_unlock(&conn->mta_conn_mutex);
error_num = res->fetch_table_status(
sts_mode,
- share->records,
- share->mean_rec_length,
- share->data_file_length,
- share->max_data_file_length,
- share->index_file_length,
- auto_increment_value,
- share->create_time,
- share->update_time,
- share->check_time
+ share->stat
);
+ auto_increment_value = share->stat.auto_increment_value;
res->free_result();
delete res;
if (error_num)
@@ -12710,11 +14223,11 @@ int spider_mbase_handler::show_table_status(
}
if (share->static_records_for_status != -1)
{
- share->records = (ha_rows) share->static_records_for_status;
+ share->stat.records = (ha_rows) share->static_records_for_status;
}
if (share->static_mean_rec_length != -1)
{
- share->mean_rec_length = (ulong) share->static_mean_rec_length;
+ share->stat.mean_rec_length = (ulong) share->static_mean_rec_length;
}
if (auto_increment_value > share->lgtm_tblhnd_share->auto_increment_value)
{
@@ -13048,7 +14561,8 @@ int spider_mbase_handler::show_index(
DBUG_RETURN(0);
}
-int spider_mbase_handler::show_records(
+int spider_mbase_handler::simple_action(
+ uint simple_action,
int link_idx
) {
int error_num;
@@ -13056,7 +14570,49 @@ int spider_mbase_handler::show_records(
SPIDER_DB_RESULT *res;
SPIDER_SHARE *share = spider->share;
uint pos = spider->conn_link_idx[link_idx];
- DBUG_ENTER("spider_mbase_handler::show_records");
+ spider_string *str = NULL;
+ DBUG_ENTER("spider_mbase_handler::simple_action");
+ switch (simple_action)
+ {
+ case SPIDER_SIMPLE_RECORDS:
+ DBUG_PRINT("info",("spider simple records"));
+ str = &mysql_share->show_records[pos];
+ break;
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ case SPIDER_SIMPLE_CHECKSUM_TABLE:
+ DBUG_PRINT("info",("spider simple checksum_table"));
+ str = &spider->result_list.sqls[link_idx];
+ str->length(0);
+ if (str->reserve(
+ SPIDER_SQL_CHECKSUM_TABLE_LEN +
+ mysql_share->db_nm_max_length +
+ SPIDER_SQL_DOT_LEN +
+ mysql_share->table_nm_max_length +
+ /* SPIDER_SQL_NAME_QUOTE_LEN */ 4 +
+ ((spider->action_flags & T_QUICK) ? SPIDER_SQL_SQL_QUICK_LEN : 0) +
+ ((spider->action_flags & T_EXTEND) ? SPIDER_SQL_SQL_EXTENDED_LEN : 0)
+ ))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_CHECKSUM_TABLE_STR,
+ SPIDER_SQL_CHECKSUM_TABLE_LEN);
+ mysql_share->append_table_name(str, pos);
+ if (spider->action_flags & T_QUICK)
+ {
+ str->q_append(SPIDER_SQL_SQL_QUICK_STR, SPIDER_SQL_SQL_QUICK_LEN);
+ }
+ if (spider->action_flags & T_EXTEND)
+ {
+ str->q_append(SPIDER_SQL_SQL_EXTENDED_STR,
+ SPIDER_SQL_SQL_EXTENDED_LEN);
+ }
+ break;
+#endif
+ default:
+ DBUG_ASSERT(0);
+ DBUG_RETURN(0);
+ }
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
pthread_mutex_lock(&conn->mta_conn_mutex);
SPIDER_SET_FILE_POS(&conn->mta_conn_mutex_file_pos);
@@ -13072,8 +14628,8 @@ int spider_mbase_handler::show_records(
(
spider_db_query(
conn,
- mysql_share->show_records[pos].ptr(),
- mysql_share->show_records[pos].length(),
+ str->ptr(),
+ str->length(),
-1,
&spider->need_mons[link_idx]) &&
(error_num = spider_db_errorno(conn))
@@ -13110,8 +14666,8 @@ int spider_mbase_handler::show_records(
share);
if (spider_db_query(
conn,
- mysql_share->show_records[pos].ptr(),
- mysql_share->show_records[pos].length(),
+ str->ptr(),
+ str->length(),
-1,
&spider->need_mons[link_idx])
) {
@@ -13168,10 +14724,22 @@ int spider_mbase_handler::show_records(
conn->mta_conn_mutex_unlock_later = FALSE;
SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos);
pthread_mutex_unlock(&conn->mta_conn_mutex);
- error_num = res->fetch_table_records(
- 1,
- spider->table_rows
- );
+ switch (simple_action)
+ {
+ case SPIDER_SIMPLE_RECORDS:
+ DBUG_PRINT("info",("spider simple records"));
+ error_num = res->fetch_table_records(1, spider->table_rows);
+ break;
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ case SPIDER_SIMPLE_CHECKSUM_TABLE:
+ DBUG_PRINT("info",("spider simple checksum_table"));
+ error_num = res->fetch_table_checksum(spider);
+ break;
+#endif
+ default:
+ DBUG_ASSERT(0);
+ break;
+ }
res->free_result();
delete res;
if (error_num)
@@ -13179,10 +14747,34 @@ int spider_mbase_handler::show_records(
DBUG_PRINT("info", ("spider error_num=%d 7", error_num));
DBUG_RETURN(error_num);
}
+ DBUG_RETURN(0);
+}
+
+int spider_mbase_handler::show_records(
+ int link_idx
+) {
+ int error_num;
+ DBUG_ENTER("spider_mbase_handler::show_records");
+ error_num = simple_action(SPIDER_SIMPLE_RECORDS, link_idx);
+ if (error_num)
+ {
+ DBUG_PRINT("info", ("spider error_num=%d", error_num));
+ DBUG_RETURN(error_num);
+ }
spider->trx->direct_aggregate_count++;
DBUG_RETURN(0);
}
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+int spider_mbase_handler::checksum_table(
+ int link_idx
+) {
+ DBUG_ENTER("spider_mbase_handler::checksum_table");
+ DBUG_RETURN(simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, link_idx));
+ DBUG_RETURN(0);
+}
+#endif
+
int spider_mbase_handler::show_last_insert_id(
int link_idx,
ulonglong &last_insert_id
@@ -14320,7 +15912,7 @@ int spider_mbase_handler::append_list_item_select(
))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_SPACE_STR, SPIDER_SQL_SPACE_LEN);
- if ((error_num = spider_db_mbase_utility->append_name(str,
+ if ((error_num = spider_db_mbase_utility->append_escaped_name(str,
item_name, length)))
{
DBUG_RETURN(error_num);
diff --git a/storage/spider/spd_db_mysql.h b/storage/spider/spd_db_mysql.h
index 4d5327b7533..d0be89c0b51 100644
--- a/storage/spider/spd_db_mysql.h
+++ b/storage/spider/spd_db_mysql.h
@@ -22,22 +22,33 @@ public:
spider_string *str,
const char *name,
uint name_length
- );
+ ) override;
int append_name_with_charset(
spider_string *str,
const char *name,
uint name_length,
CHARSET_INFO *name_charset
- );
+ ) override;
+ int append_escaped_name(
+ spider_string *str,
+ const char *name,
+ uint name_length
+ ) override;
+ int append_escaped_name_with_charset(
+ spider_string *str,
+ const char *name,
+ uint name_length,
+ CHARSET_INFO *name_charset
+ ) override;
bool is_name_quote(
const char head_code
- );
+ ) override;
int append_escaped_name_quote(
spider_string *str
- );
+ ) override;
int append_column_value(ha_spider *spider, spider_string *str, Field *field,
const uchar *new_ptr, bool is_like,
- CHARSET_INFO *access_charset);
+ CHARSET_INFO *access_charset) override;
int append_from_with_alias(
spider_string *str,
const char **table_names,
@@ -51,29 +62,41 @@ public:
int append_trx_isolation(
spider_string *str,
int trx_isolation
- );
+ ) override;
int append_autocommit(
spider_string *str,
bool autocommit
- );
+ ) override;
int append_sql_log_off(
spider_string *str,
bool sql_log_off
+ ) override;
+ int append_wait_timeout(
+ spider_string *str,
+ int wait_timeout
+ ) override;
+ virtual int append_sql_mode_internal(
+ spider_string *str,
+ sql_mode_t sql_mode
);
+ int append_sql_mode(
+ spider_string *str,
+ sql_mode_t sql_mode
+ ) override;
int append_time_zone(
spider_string *str,
Time_zone *time_zone
- );
+ ) override;
int append_start_transaction(
spider_string *str
- );
+ ) override;
int append_xa_start(
spider_string *str,
XID *xid
- );
+ ) override;
int append_lock_table_head(
spider_string *str
- );
+ ) override;
int append_lock_table_body(
spider_string *str,
const char *db_name,
@@ -83,13 +106,13 @@ public:
uint table_name_length,
CHARSET_INFO *table_name_charset,
int lock_type
- );
+ ) override;
int append_lock_table_tail(
spider_string *str
- );
+ ) override;
int append_unlock_table(
spider_string *str
- );
+ ) override;
int open_item_func(
Item_func *item_func,
ha_spider *spider,
@@ -98,7 +121,7 @@ public:
uint alias_length,
bool use_fields,
spider_fields *fields
- );
+ ) override;
#ifdef HANDLER_HAS_DIRECT_AGGREGATE
int open_item_sum_func(
Item_sum *item_sum,
@@ -108,12 +131,12 @@ public:
uint alias_length,
bool use_fields,
spider_fields *fields
- );
+ ) override;
#endif
int append_escaped_util(
spider_string *to,
String *from
- );
+ ) override;
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
int append_table(
ha_spider *spider,
@@ -155,18 +178,18 @@ public:
spider_string *str,
TABLE_LIST *table_list,
uint table_count
- );
+ ) override;
int reappend_tables(
spider_fields *fields,
SPIDER_LINK_IDX_CHAIN *link_idx_chain,
spider_string *str
- );
+ ) override;
int append_where(
spider_string *str
- );
+ ) override;
int append_having(
spider_string *str
- );
+ ) override;
#endif
};
@@ -175,6 +198,14 @@ class spider_db_mysql_util: public spider_db_mbase_util
public:
spider_db_mysql_util();
~spider_db_mysql_util();
+ int append_column_value(
+ ha_spider *spider,
+ spider_string *str,
+ Field *field,
+ const uchar *new_ptr,
+ bool is_like,
+ CHARSET_INFO *access_charset
+ ) override;
};
class spider_db_mariadb_util: public spider_db_mbase_util
@@ -182,6 +213,18 @@ class spider_db_mariadb_util: public spider_db_mbase_util
public:
spider_db_mariadb_util();
~spider_db_mariadb_util();
+ int append_sql_mode_internal(
+ spider_string *str,
+ sql_mode_t sql_mode
+ ) override;
+ int append_column_value(
+ ha_spider *spider,
+ spider_string *str,
+ Field *field,
+ const uchar *new_ptr,
+ bool is_like,
+ CHARSET_INFO *access_charset
+ ) override;
};
class spider_db_mbase_row: public spider_db_row
@@ -263,20 +306,22 @@ public:
);
int fetch_table_status(
int mode,
- ha_rows &records,
- ulong &mean_rec_length,
- ulonglong &data_file_length,
- ulonglong &max_data_file_length,
- ulonglong &index_file_length,
- ulonglong &auto_increment_value,
- time_t &create_time,
- time_t &update_time,
- time_t &check_time
+ ha_statistics &stat
+ );
+ int fetch_simple_action(
+ uint simple_action,
+ uint position,
+ void *param
);
int fetch_table_records(
int mode,
ha_rows &records
);
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ int fetch_table_checksum(
+ ha_spider *spider
+ );
+#endif
int fetch_table_cardinality(
int mode,
TABLE *table,
@@ -406,6 +451,11 @@ public:
);
int next_result();
uint affected_rows();
+ uint matched_rows();
+ bool inserted_info(
+ spider_db_handler *handler,
+ ha_copy_info *copy_info
+ );
ulonglong last_insert_id();
int set_character_set(
const char *csname
@@ -462,6 +512,16 @@ public:
bool sql_log_off,
int *need_mon
);
+ bool set_wait_timeout_in_bulk_sql();
+ int set_wait_timeout(
+ int wait_timeout,
+ int *need_mon
+ );
+ bool set_sql_mode_in_bulk_sql();
+ int set_sql_mode(
+ sql_mode_t sql_mode,
+ int *need_mon
+ );
bool set_time_zone_in_bulk_sql();
int set_time_zone(
Time_zone *time_zone,
@@ -656,6 +716,9 @@ public:
spider_string *str
);
#endif
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ bool checksum_support();
+#endif
protected:
int create_table_names_str();
void free_table_names_str();
@@ -741,6 +804,7 @@ public:
spider_mbase_share *mysql_share;
SPIDER_LINK_FOR_HASH *link_for_hash;
uchar *minimum_select_bitmap;
+ uchar direct_insert_kind;
spider_mbase_handler(
ha_spider *spider,
spider_mbase_share *share,
@@ -1435,9 +1499,18 @@ public:
int link_idx,
int crd_mode
);
+ int simple_action(
+ uint simple_action,
+ int link_idx
+ );
int show_records(
int link_idx
);
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ int checksum_table(
+ int link_idx
+ );
+#endif
int show_last_insert_id(
int link_idx,
ulonglong &last_insert_id
diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc
index b7e8100e480..b7561ccb96e 100644
--- a/storage/spider/spd_db_oracle.cc
+++ b/storage/spider/spd_db_oracle.cc
@@ -927,30 +927,22 @@ SPIDER_DB_ROW *spider_db_oracle_result::fetch_row_from_tmp_table(
int spider_db_oracle_result::fetch_table_status(
int mode,
- ha_rows &records,
- ulong &mean_rec_length,
- ulonglong &data_file_length,
- ulonglong &max_data_file_length,
- ulonglong &index_file_length,
- ulonglong &auto_increment_value,
- time_t &create_time,
- time_t &update_time,
- time_t &check_time
+ ha_statistics &stat
) {
DBUG_ENTER("spider_db_oracle_result::fetch_table_status");
DBUG_PRINT("info",("spider this=%p", this));
/* TODO: develop later */
- records = 2;
- mean_rec_length = 65535;
- data_file_length = 65535;
- max_data_file_length = 65535;
- index_file_length = 65535;
+ stat.records = 2;
+ stat.mean_rec_length = 65535;
+ stat.data_file_length = 65535;
+ stat.max_data_file_length = 65535;
+ stat.index_file_length = 65535;
/*
auto_increment_value = 0;
*/
- create_time = (time_t) 0;
- update_time = (time_t) 0;
- check_time = (time_t) 0;
+ stat.create_time = (time_t) 0;
+ stat.update_time = (time_t) 0;
+ stat.check_time = (time_t) 0;
DBUG_RETURN(0);
}
@@ -1349,7 +1341,7 @@ int spider_db_oracle::connect(
this->connect_retry_interval = connect_retry_interval;
if ((error_num = spider_create_conn_thread(conn)))
DBUG_RETURN(error_num);
- spider_bg_conn_simple_action(conn, SPIDER_BG_SIMPLE_CONNECT, TRUE, NULL,
+ spider_bg_conn_simple_action(conn, SPIDER_SIMPLE_CONNECT, TRUE, NULL,
0, NULL);
if (stored_error_num)
@@ -1440,7 +1432,7 @@ void spider_db_oracle::disconnect()
DBUG_PRINT("info",("spider this=%p", this));
if (!conn->bg_init)
DBUG_VOID_RETURN;
- spider_bg_conn_simple_action(conn, SPIDER_BG_SIMPLE_DISCONNECT, TRUE, NULL,
+ spider_bg_conn_simple_action(conn, SPIDER_SIMPLE_DISCONNECT, TRUE, NULL,
0, NULL);
DBUG_VOID_RETURN;
}
@@ -1739,6 +1731,22 @@ uint spider_db_oracle::affected_rows()
DBUG_RETURN(update_rows);
}
+uint spider_db_oracle::matched_rows()
+{
+ DBUG_ENTER("spider_db_oracle::matched_rows");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(0);
+}
+
+bool spider_db_oracle::inserted_info(
+ spider_db_handler *handler,
+ ha_copy_info *copy_info
+) {
+ DBUG_ENTER("spider_db_oracle::inserted_info");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(FALSE);
+}
+
ulonglong spider_db_oracle::last_insert_id()
{
DBUG_ENTER("spider_db_oracle::last_insert_id");
@@ -2174,6 +2182,40 @@ int spider_db_oracle::set_sql_log_off(
DBUG_RETURN(0);
}
+bool spider_db_oracle::set_wait_timeout_in_bulk_sql()
+{
+ DBUG_ENTER("spider_db_oracle::set_wait_timeout_in_bulk_sql");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(FALSE);
+}
+
+int spider_db_oracle::set_wait_timeout(
+ int wait_timeout,
+ int *need_mon
+) {
+ DBUG_ENTER("spider_db_oracle::set_wait_timeout");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
+bool spider_db_oracle::set_sql_mode_in_bulk_sql()
+{
+ DBUG_ENTER("spider_db_oracle::set_sql_mode_in_bulk_sql");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_RETURN(FALSE);
+}
+
+int spider_db_oracle::set_sql_mode(
+ sql_mode_t sql_mode,
+ int *need_mon
+) {
+ DBUG_ENTER("spider_db_oracle::set_sql_mode");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
bool spider_db_oracle::set_time_zone_in_bulk_sql()
{
DBUG_ENTER("spider_db_oracle::set_time_zone_in_bulk_sql");
@@ -2589,6 +2631,57 @@ int spider_db_oracle_util::append_name_with_charset(
DBUG_RETURN(0);
}
+int spider_db_oracle_util::append_escaped_name(
+ spider_string *str,
+ const char *name,
+ uint name_length
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_oracle_util::append_name");
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN * 2 + name_length * 2))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ if ((error_num = spider_db_append_name_with_quote_str_internal(
+ str, name, name_length, dbton_id)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ DBUG_RETURN(0);
+}
+
+int spider_db_oracle_util::append_escaped_name_with_charset(
+ spider_string *str,
+ const char *name,
+ uint name_length,
+ CHARSET_INFO *name_charset
+) {
+ int error_num;
+ DBUG_ENTER("spider_db_oracle_util::append_name_with_charset");
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN * 2 + name_length * 2))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ if ((error_num = spider_db_append_name_with_quote_str_internal(
+ str, name, name_length, name_charset, dbton_id)))
+ {
+ DBUG_RETURN(error_num);
+ }
+ if (str->reserve(SPIDER_SQL_NAME_QUOTE_LEN))
+ {
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ }
+ str->q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
+ DBUG_RETURN(0);
+}
+
bool spider_db_oracle_util::is_name_quote(
const char head_code
) {
@@ -2880,6 +2973,26 @@ int spider_db_oracle_util::append_sql_log_off(
DBUG_RETURN(0);
}
+int spider_db_oracle_util::append_wait_timeout(
+ spider_string *str,
+ int wait_timeout
+) {
+ DBUG_ENTER("spider_db_oracle_util::append_wait_timeout");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
+int spider_db_oracle_util::append_sql_mode(
+ spider_string *str,
+ sql_mode_t sql_mode
+) {
+ DBUG_ENTER("spider_db_oracle_util::append_sql_mode");
+ DBUG_PRINT("info",("spider this=%p", this));
+ /* nothing to do */
+ DBUG_RETURN(0);
+}
+
int spider_db_oracle_util::append_time_zone(
spider_string *str,
Time_zone *time_zone
@@ -4086,13 +4199,31 @@ int spider_db_oracle_util::open_item_func(
case Item_func::LE_FUNC:
case Item_func::GE_FUNC:
case Item_func::GT_FUNC:
- case Item_func::LIKE_FUNC:
if (str)
{
func_name = (char*) item_func->func_name();
func_name_length = strlen(func_name);
}
break;
+ case Item_func::LIKE_FUNC:
+#ifdef SPIDER_LIKE_FUNC_HAS_GET_NEGATED
+ if (str)
+ {
+ if (((Item_func_like *)item_func)->get_negated())
+ {
+ func_name = SPIDER_SQL_NOT_LIKE_STR;
+ func_name_length = SPIDER_SQL_NOT_LIKE_LEN;
+ }
+ else
+ {
+ func_name = (char*)item_func->func_name();
+ func_name_length = strlen(func_name);
+ }
+ }
+ break;
+#else
+ DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
+#endif
default:
THD *thd = spider->trx->thd;
SPIDER_SHARE *share = spider->share;
@@ -5450,10 +5581,12 @@ int spider_oracle_handler::init()
}
sql.set_charset(share->access_charset);
sql_part.set_charset(share->access_charset);
+ sql_part2.set_charset(share->access_charset);
ha_sql.set_charset(share->access_charset);
insert_sql.set_charset(share->access_charset);
update_sql.set_charset(share->access_charset);
tmp_sql.set_charset(share->access_charset);
+ dup_update_sql.set_charset(share->access_charset);
upd_tmp_tbl_prm.init();
upd_tmp_tbl_prm.field_count = 1;
if (!(link_for_hash = (SPIDER_LINK_FOR_HASH *)
@@ -11060,15 +11193,15 @@ int spider_oracle_handler::show_table_status(
if (sts_mode == 1)
{
- if (!share->records)
- share->records = 10000;
- share->mean_rec_length = 65535;
- share->data_file_length = 65535;
- share->max_data_file_length = 65535;
- share->index_file_length = 65535;
- share->create_time = (time_t) 0;
- share->update_time = (time_t) 0;
- share->check_time = (time_t) 0;
+ if (!share->stat.records)
+ share->stat.records = 10000;
+ share->stat.mean_rec_length = 65535;
+ share->stat.data_file_length = 65535;
+ share->stat.max_data_file_length = 65535;
+ share->stat.index_file_length = 65535;
+ share->stat.create_time = (time_t) 0;
+ share->stat.update_time = (time_t) 0;
+ share->stat.check_time = (time_t) 0;
} else {
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
pthread_mutex_lock(&conn->mta_conn_mutex);
@@ -11167,16 +11300,9 @@ int spider_oracle_handler::show_table_status(
pthread_mutex_unlock(&conn->mta_conn_mutex);
error_num = res->fetch_table_status(
sts_mode,
- share->records,
- share->mean_rec_length,
- share->data_file_length,
- share->max_data_file_length,
- share->index_file_length,
- auto_increment_value,
- share->create_time,
- share->update_time,
- share->check_time
+ share->stat
);
+ auto_increment_value = share->stat.auto_increment_value;
res->free_result();
delete res;
if (error_num)
@@ -12774,7 +12900,7 @@ int spider_oracle_handler::append_list_item_select(
))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_SPACE_STR, SPIDER_SQL_SPACE_LEN);
- if ((error_num = spider_db_oracle_utility.append_name(str,
+ if ((error_num = spider_db_oracle_utility.append_escaped_name(str,
item_name, length)))
{
DBUG_RETURN(error_num);
diff --git a/storage/spider/spd_db_oracle.h b/storage/spider/spd_db_oracle.h
index 28836f9e340..ebdc23a9bfa 100644
--- a/storage/spider/spd_db_oracle.h
+++ b/storage/spider/spd_db_oracle.h
@@ -32,6 +32,17 @@ public:
uint name_length,
CHARSET_INFO *name_charset
);
+ int append_escaped_name(
+ spider_string *str,
+ const char *name,
+ uint name_length
+ );
+ int append_escaped_name_with_charset(
+ spider_string *str,
+ const char *name,
+ uint name_length,
+ CHARSET_INFO *name_charset
+ );
bool is_name_quote(
const char head_code
);
@@ -67,6 +78,14 @@ public:
spider_string *str,
bool sql_log_off
);
+ int append_wait_timeout(
+ spider_string *str,
+ int wait_timeout
+ );
+ int append_sql_mode(
+ spider_string *str,
+ sql_mode_t sql_mode
+ );
int append_time_zone(
spider_string *str,
Time_zone *time_zone
@@ -235,15 +254,7 @@ public:
);
int fetch_table_status(
int mode,
- ha_rows &records,
- ulong &mean_rec_length,
- ulonglong &data_file_length,
- ulonglong &max_data_file_length,
- ulonglong &index_file_length,
- ulonglong &auto_increment_value,
- time_t &create_time,
- time_t &update_time,
- time_t &check_time
+ ha_statistics &stat
);
int fetch_table_records(
int mode,
@@ -374,6 +385,11 @@ public:
);
int next_result();
uint affected_rows();
+ uint matched_rows();
+ bool inserted_info(
+ spider_db_handler *handler,
+ ha_copy_info *copy_info
+ );
ulonglong last_insert_id();
int set_character_set(
const char *csname
@@ -430,6 +446,16 @@ public:
bool sql_log_off,
int *need_mon
);
+ bool set_wait_timeout_in_bulk_sql();
+ int set_wait_timeout(
+ int wait_timeout,
+ int *need_mon
+ );
+ bool set_sql_mode_in_bulk_sql();
+ int set_sql_mode(
+ sql_mode_t sql_mode,
+ int *need_mon
+ );
bool set_time_zone_in_bulk_sql();
int set_time_zone(
Time_zone *time_zone,
diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc
index 7237d0877a7..09f23046455 100644
--- a/storage/spider/spd_direct_sql.cc
+++ b/storage/spider/spd_direct_sql.cc
@@ -1115,7 +1115,7 @@ int spider_udf_parse_direct_sql_param(
) {
int error_num = 0, roop_count;
char *param_string = NULL;
- char *sprit_ptr[2];
+ char *sprit_ptr;
char *tmp_ptr, *tmp_ptr2, *start_ptr;
int title_length;
SPIDER_PARAM_STRING_PARSE param_string_parse;
@@ -1154,23 +1154,17 @@ int spider_udf_parse_direct_sql_param(
}
DBUG_PRINT("info",("spider param_string=%s", param_string));
- sprit_ptr[0] = param_string;
+ sprit_ptr = param_string;
param_string_parse.init(param_string, ER_SPIDER_INVALID_UDF_PARAM_NUM);
- while (sprit_ptr[0])
+ while (sprit_ptr)
{
- if ((sprit_ptr[1] = strchr(sprit_ptr[0], ',')))
- {
- *sprit_ptr[1] = '\0';
- sprit_ptr[1]++;
- }
- tmp_ptr = sprit_ptr[0];
- sprit_ptr[0] = sprit_ptr[1];
+ tmp_ptr = sprit_ptr;
while (*tmp_ptr == ' ' || *tmp_ptr == '\r' ||
*tmp_ptr == '\n' || *tmp_ptr == '\t')
tmp_ptr++;
if (*tmp_ptr == '\0')
- continue;
+ break;
title_length = 0;
start_ptr = tmp_ptr;
@@ -1183,6 +1177,11 @@ int spider_udf_parse_direct_sql_param(
start_ptr++;
}
param_string_parse.set_param_title(tmp_ptr, tmp_ptr + title_length);
+ if ((error_num = param_string_parse.get_next_parameter_head(
+ start_ptr, &sprit_ptr)))
+ {
+ goto error;
+ }
switch (title_length)
{
diff --git a/storage/spider/spd_environ.h b/storage/spider/spd_environ.h
index ded2927482b..728cc7e1781 100644
--- a/storage/spider/spd_environ.h
+++ b/storage/spider/spd_environ.h
@@ -50,5 +50,7 @@
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100400
#define SPIDER_USE_CONST_ITEM_FOR_STRING_INT_REAL_DECIMAL_DATE_ITEM
#define SPIDER_SQL_CACHE_IS_IN_LEX
+#define SPIDER_LIKE_FUNC_HAS_GET_NEGATED
+#define HA_HAS_CHECKSUM_EXTENDED
#endif
#endif /* SPD_ENVIRON_INCLUDED */
diff --git a/storage/spider/spd_err.h b/storage/spider/spd_err.h
index a80d903bd6e..9889fcfa7fb 100644
--- a/storage/spider/spd_err.h
+++ b/storage/spider/spd_err.h
@@ -124,6 +124,9 @@
#define ER_SPIDER_CON_COUNT_ERROR_STR "Too many connections between spider and remote"
#define ER_SPIDER_TABLE_OPEN_TIMEOUT_NUM 12714
#define ER_SPIDER_TABLE_OPEN_TIMEOUT_STR "Table %s.%s open timeout"
+#define ER_SPIDER_SAME_SERVER_LINK_NUM 12720
+#define ER_SPIDER_SAME_SERVER_LINK_STR1 "Host:%s and Socket:%s aim self server. Please change spider_same_server_link parameter if this link is required."
+#define ER_SPIDER_SAME_SERVER_LINK_STR2 "Host:%s and Port:%ld aim self server. Please change spider_same_server_link parameter if this link is required."
#define ER_SPIDER_COND_SKIP_NUM 12801
#define ER_SPIDER_UNKNOWN_NUM 12500
diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h
index 6f1c8f853d0..81d812280d7 100644
--- a/storage/spider/spd_include.h
+++ b/storage/spider/spd_include.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -13,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
-#define SPIDER_DETAIL_VERSION "3.3.14"
+#define SPIDER_DETAIL_VERSION "3.3.15"
#define SPIDER_HEX_VERSION 0x0303
#if MYSQL_VERSION_ID < 50500
@@ -264,7 +265,7 @@ const char SPIDER_empty_string = "";
#define SPIDER_TMP_SHARE_LONG_COUNT 19
#define SPIDER_TMP_SHARE_LONGLONG_COUNT 3
-#define SPIDER_MEM_CALC_LIST_NUM 257
+#define SPIDER_MEM_CALC_LIST_NUM 268
#define SPIDER_CONN_META_BUF_LEN 64
#define SPIDER_BACKUP_DASTATUS \
@@ -296,6 +297,8 @@ typedef struct st_spider_thread
volatile bool killed;
volatile bool thd_wait;
volatile bool first_free_wait;
+ volatile bool init_command;
+ volatile int error;
pthread_t thread;
pthread_cond_t cond;
pthread_mutex_t mutex;
@@ -453,6 +456,8 @@ typedef struct st_spider_conn
bool disable_reconnect;
int autocommit;
int sql_log_off;
+ int wait_timeout;
+ sql_mode_t sql_mode;
THD *thd;
void *another_ha_first;
void *another_ha_last;
@@ -559,8 +564,10 @@ typedef struct st_spider_conn
bool queued_ping;
bool queued_trx_isolation;
bool queued_semi_trx_isolation;
+ bool queued_wait_timeout;
bool queued_autocommit;
bool queued_sql_log_off;
+ bool queued_sql_mode;
bool queued_time_zone;
bool queued_trx_start;
bool queued_xa_start;
@@ -571,8 +578,10 @@ typedef struct st_spider_conn
int queued_ping_link_idx;
int queued_trx_isolation_val;
int queued_semi_trx_isolation_val;
+ int queued_wait_timeout_val;
bool queued_autocommit_val;
bool queued_sql_log_off_val;
+ sql_mode_t queued_sql_mode_val;
Time_zone *queued_time_zone_val;
XID *queued_xa_start_xid;
@@ -656,15 +665,7 @@ typedef struct st_spider_patition_share
volatile bool crd_init;
volatile time_t sts_get_time;
volatile time_t crd_get_time;
- ulonglong data_file_length;
- ulonglong max_data_file_length;
- ulonglong index_file_length;
- ulonglong auto_increment_value;
- ha_rows records;
- ulong mean_rec_length;
- time_t check_time;
- time_t create_time;
- time_t update_time;
+ ha_statistics stat;
longlong *cardinality;
/*
@@ -891,17 +892,7 @@ typedef struct st_spider_share
volatile bool auto_increment_init;
volatile ulonglong auto_increment_lclval;
*/
- ulonglong data_file_length;
- ulonglong max_data_file_length;
- ulonglong index_file_length;
-/*
- ulonglong auto_increment_value;
-*/
- ha_rows records;
- ulong mean_rec_length;
- time_t check_time;
- time_t create_time;
- time_t update_time;
+ ha_statistics stat;
longlong static_records_for_status;
longlong static_mean_rec_length;
@@ -1464,7 +1455,7 @@ typedef struct st_spider_ip_port_conn {
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
my_hash_value_type key_hash_value;
#endif
- char remote_ip_str[SPIDER_CONN_META_BUF_LEN];
+ char *remote_ip_str;
long remote_port;
ulong ip_port_count;
volatile ulong waiting_count;
diff --git a/storage/spider/spd_init_query.h b/storage/spider/spd_init_query.h
new file mode 100644
index 00000000000..4c58f8d80a4
--- /dev/null
+++ b/storage/spider/spd_init_query.h
@@ -0,0 +1,782 @@
+/* Copyright (C) 2010-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ This SQL script creates system tables for SPIDER
+ or fixes incompatibilities if ones already exist.
+*/
+
+static LEX_STRING spider_init_queries[] = {
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_xa("
+ " format_id int not null default 0,"
+ " gtrid_length int not null default 0,"
+ " bqual_length int not null default 0,"
+ " data char(128) charset binary not null default '',"
+ " status char(8) not null default '',"
+ " primary key (data, format_id, gtrid_length),"
+ " key idx1 (status)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_xa_member("
+ " format_id int not null default 0,"
+ " gtrid_length int not null default 0,"
+ " bqual_length int not null default 0,"
+ " data char(128) charset binary not null default '',"
+ " scheme char(64) not null default '',"
+ " host char(64) not null default '',"
+ " port char(5) not null default '',"
+ " socket text not null,"
+ " username char(64) not null default '',"
+ " password char(64) not null default '',"
+ " ssl_ca text,"
+ " ssl_capath text,"
+ " ssl_cert text,"
+ " ssl_cipher char(64) default null,"
+ " ssl_key text,"
+ " ssl_verify_server_cert tinyint not null default 0,"
+ " default_file text,"
+ " default_group char(64) default null,"
+ " key idx1 (data, format_id, gtrid_length, host)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_xa_failed_log("
+ " format_id int not null default 0,"
+ " gtrid_length int not null default 0,"
+ " bqual_length int not null default 0,"
+ " data char(128) charset binary not null default '',"
+ " scheme char(64) not null default '',"
+ " host char(64) not null default '',"
+ " port char(5) not null default '',"
+ " socket text not null,"
+ " username char(64) not null default '',"
+ " password char(64) not null default '',"
+ " ssl_ca text,"
+ " ssl_capath text,"
+ " ssl_cert text,"
+ " ssl_cipher char(64) default null,"
+ " ssl_key text,"
+ " ssl_verify_server_cert tinyint not null default 0,"
+ " default_file text,"
+ " default_group char(64) default null,"
+ " thread_id int default null,"
+ " status char(8) not null default '',"
+ " failed_time timestamp not null default current_timestamp,"
+ " key idx1 (data, format_id, gtrid_length, host)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_tables("
+ " db_name char(64) not null default '',"
+ " table_name char(199) not null default '',"
+ " link_id int not null default 0,"
+ " priority bigint not null default 0,"
+ " server char(64) default null,"
+ " scheme char(64) default null,"
+ " host char(64) default null,"
+ " port char(5) default null,"
+ " socket text,"
+ " username char(64) default null,"
+ " password char(64) default null,"
+ " ssl_ca text,"
+ " ssl_capath text,"
+ " ssl_cert text,"
+ " ssl_cipher char(64) default null,"
+ " ssl_key text,"
+ " ssl_verify_server_cert tinyint not null default 0,"
+ " monitoring_binlog_pos_at_failing tinyint not null default 0,"
+ " default_file text,"
+ " default_group char(64) default null,"
+ " tgt_db_name char(64) default null,"
+ " tgt_table_name char(64) default null,"
+ " link_status tinyint not null default 1,"
+ " block_status tinyint not null default 0,"
+ " static_link_id char(64) default null,"
+ " primary key (db_name, table_name, link_id),"
+ " key idx1 (priority),"
+ " unique key uidx1 (db_name, table_name, static_link_id)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_link_mon_servers("
+ " db_name char(64) not null default '',"
+ " table_name char(199) not null default '',"
+ " link_id char(64) not null default '',"
+ " sid int unsigned not null default 0,"
+ " server char(64) default null,"
+ " scheme char(64) default null,"
+ " host char(64) default null,"
+ " port char(5) default null,"
+ " socket text,"
+ " username char(64) default null,"
+ " password char(64) default null,"
+ " ssl_ca text,"
+ " ssl_capath text,"
+ " ssl_cert text,"
+ " ssl_cipher char(64) default null,"
+ " ssl_key text,"
+ " ssl_verify_server_cert tinyint not null default 0,"
+ " default_file text,"
+ " default_group char(64) default null,"
+ " primary key (db_name, table_name, link_id, sid)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_link_failed_log("
+ " db_name char(64) not null default '',"
+ " table_name char(199) not null default '',"
+ " link_id char(64) not null default '',"
+ " failed_time timestamp not null default current_timestamp"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_table_position_for_recovery("
+ " db_name char(64) not null default '',"
+ " table_name char(199) not null default '',"
+ " failed_link_id int not null default 0,"
+ " source_link_id int not null default 0,"
+ " file text,"
+ " position text,"
+ " gtid text,"
+ " primary key (db_name, table_name, failed_link_id, source_link_id)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_table_sts("
+ " db_name char(64) not null default '',"
+ " table_name char(199) not null default '',"
+ " data_file_length bigint unsigned not null default 0,"
+ " max_data_file_length bigint unsigned not null default 0,"
+ " index_file_length bigint unsigned not null default 0,"
+ " records bigint unsigned not null default 0,"
+ " mean_rec_length bigint unsigned not null default 0,"
+ " check_time datetime not null default '0000-00-00 00:00:00',"
+ " create_time datetime not null default '0000-00-00 00:00:00',"
+ " update_time datetime not null default '0000-00-00 00:00:00',"
+ " checksum bigint unsigned default null,"
+ " primary key (db_name, table_name)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+ {C_STRING_WITH_LEN(
+ "create table if not exists mysql.spider_table_crd("
+ " db_name char(64) not null default '',"
+ " table_name char(199) not null default '',"
+ " key_seq int unsigned not null default 0,"
+ " cardinality bigint not null default 0,"
+ " primary key (db_name, table_name, key_seq)"
+ ") engine=MyISAM default charset=utf8 collate=utf8_bin"
+ )},
+/*
+ If tables already exist and their definition differ
+ from the latest ones, we fix them here.
+*/
+ {C_STRING_WITH_LEN(
+ "drop procedure if exists mysql.spider_fix_one_table"
+ )},
+ {C_STRING_WITH_LEN(
+ "drop procedure if exists mysql.spider_fix_system_tables"
+ )},
+ {C_STRING_WITH_LEN(
+ "create procedure mysql.spider_fix_one_table"
+ " (tab_name char(255) charset utf8 collate utf8_bin,"
+ " test_col_name char(255) charset utf8 collate utf8_bin,"
+ " _sql text charset utf8 collate utf8_bin)"
+ "begin"
+ " set @col_exists := 0;"
+ " select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = tab_name"
+ " AND COLUMN_NAME = test_col_name;"
+ " if @col_exists = 0 then"
+ " select @stmt := _sql;"
+ " prepare sp_stmt1 from @stmt;"
+ " execute sp_stmt1;"
+ " end if;"
+ "end;"
+ )},
+ {C_STRING_WITH_LEN(
+ "create procedure mysql.spider_fix_system_tables()"
+ "begin"
+ " select substring_index(substring_index(version(), '-', 2), '-', -1)"
+ " into @server_name;"
+ " select substring_index(version(), '.', 1)"
+ " into @server_major_version;"
+ " select substring_index(substring_index(version(), '.', 2), '.', -1)"
+ " into @server_minor_version;"
+/*
+ Fix for 0.5
+*/
+ " call mysql.spider_fix_one_table('spider_tables', 'server',"
+ " 'alter table mysql.spider_tables"
+ " add server char(64) default null,"
+ " add scheme char(64) default null,"
+ " add host char(64) default null,"
+ " add port char(5) default null,"
+ " add socket char(64) default null,"
+ " add username char(64) default null,"
+ " add password char(64) default null,"
+ " add tgt_db_name char(64) default null,"
+ " add tgt_table_name char(64) default null');"
+/*
+ Fix for version 0.17
+*/
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_xa'"
+ " AND COLUMN_NAME = 'data';"
+ " if @col_type != 'binary(128)' then"
+ " alter table mysql.spider_xa"
+ " modify data binary(128) not null default '';"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_xa_member'"
+ " AND COLUMN_NAME = 'data';"
+ " if @col_type != 'binary(128)' then"
+ " alter table mysql.spider_xa_member"
+ " modify data binary(128) not null default '';"
+ " end if;"
+/*
+ Fix for version 2.7
+*/
+ " call mysql.spider_fix_one_table('spider_tables', 'link_id',"
+ " 'alter table mysql.spider_tables"
+ " add column link_id int not null default 0 after table_name,"
+ " drop primary key,"
+ " add primary key (db_name, table_name, link_id)');"
+/*
+ Fix for version 2.8
+*/
+ " call mysql.spider_fix_one_table('spider_tables', 'link_status',"
+ " 'alter table mysql.spider_tables"
+ " add column link_status tinyint not null default 1');"
+/*
+ Fix for version 2.10
+*/
+ " call mysql.spider_fix_one_table('spider_xa_member', 'ssl_ca',"
+ " 'alter table mysql.spider_xa_member"
+ " add column ssl_ca char(64) default null after password,"
+ " add column ssl_capath char(64) default null after ssl_ca,"
+ " add column ssl_cert char(64) default null after ssl_capath,"
+ " add column ssl_cipher char(64) default null after ssl_cert,"
+ " add column ssl_key char(64) default null after ssl_cipher,"
+ " add column ssl_verify_server_cert tinyint not null default 0"
+ " after ssl_key,"
+ " add column default_file char(64) default null"
+ " after ssl_verify_server_cert,"
+ " add column default_group char(64) default null after default_file');"
+ " call mysql.spider_fix_one_table('spider_tables', 'ssl_ca',"
+ " 'alter table mysql.spider_tables"
+ " add column ssl_ca char(64) default null after password,"
+ " add column ssl_capath char(64) default null after ssl_ca,"
+ " add column ssl_cert char(64) default null after ssl_capath,"
+ " add column ssl_cipher char(64) default null after ssl_cert,"
+ " add column ssl_key char(64) default null after ssl_cipher,"
+ " add column ssl_verify_server_cert tinyint not null default 0"
+ " after ssl_key,"
+ " add column default_file char(64) default null"
+ " after ssl_verify_server_cert,"
+ " add column default_group char(64) default null after default_file');"
+ " call mysql.spider_fix_one_table('spider_link_mon_servers', 'ssl_ca',"
+ " 'alter table mysql.spider_link_mon_servers"
+ " add column ssl_ca char(64) default null after password,"
+ " add column ssl_capath char(64) default null after ssl_ca,"
+ " add column ssl_cert char(64) default null after ssl_capath,"
+ " add column ssl_cipher char(64) default null after ssl_cert,"
+ " add column ssl_key char(64) default null after ssl_cipher,"
+ " add column ssl_verify_server_cert tinyint not null default 0"
+ " after ssl_key,"
+ " add column default_file char(64) default null"
+ " after ssl_verify_server_cert,"
+ " add column default_group char(64) default null after default_file');"
+/*
+ Fix for version 2.28
+*/
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_mon_servers'"
+ " AND COLUMN_NAME = 'sid';"
+ " if @col_type != 'int(10) unsigned' then"
+ " alter table mysql.spider_link_mon_servers"
+ " modify sid int unsigned not null default 0;"
+ " end if;"
+/*
+ Fix for version 3.1
+*/
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_xa_member'"
+ " AND COLUMN_NAME = 'socket';"
+ " if @col_type = 'char(64)' then"
+ " alter table mysql.spider_xa_member"
+ " drop primary key,"
+ " add index idx1 (data, format_id, gtrid_length, host),"
+ " modify socket text not null,"
+ " modify ssl_ca text,"
+ " modify ssl_capath text,"
+ " modify ssl_cert text,"
+ " modify ssl_key text,"
+ " modify default_file text;"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_tables'"
+ " AND COLUMN_NAME = 'socket';"
+ " if @col_type = 'char(64)' then"
+ " alter table mysql.spider_tables"
+ " modify socket text,"
+ " modify ssl_ca text,"
+ " modify ssl_capath text,"
+ " modify ssl_cert text,"
+ " modify ssl_key text,"
+ " modify default_file text;"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_mon_servers'"
+ " AND COLUMN_NAME = 'socket';"
+ " if @col_type = 'char(64)' then"
+ " alter table mysql.spider_link_mon_servers"
+ " modify socket text,"
+ " modify ssl_ca text,"
+ " modify ssl_capath text,"
+ " modify ssl_cert text,"
+ " modify ssl_key text,"
+ " modify default_file text;"
+ " end if;"
+/*
+ Fix for version 3.3.0
+*/
+ " call mysql.spider_fix_one_table('spider_tables',"
+ " 'monitoring_binlog_pos_at_failing',"
+ " 'alter table mysql.spider_tables"
+ " add monitoring_binlog_pos_at_failing tinyint not null default 0"
+ " after ssl_verify_server_cert');"
+/*
+ Fix for version 3.3.6
+*/
+ " call mysql.spider_fix_one_table('spider_tables', 'block_status',"
+ " 'alter table mysql.spider_tables"
+ " add column block_status tinyint not null default 0"
+ " after link_status');"
+ " call mysql.spider_fix_one_table('spider_tables', 'static_link_id',"
+ " 'alter table mysql.spider_tables"
+ " add column static_link_id char(64) default null after block_status,"
+ " add unique index uidx1 (db_name, table_name, static_link_id)');"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_mon_servers'"
+ " AND COLUMN_NAME = 'link_id';"
+ " if @col_type != 'char(64)' then"
+ " alter table mysql.spider_link_mon_servers"
+ " modify link_id char(64) not null default '';"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_failed_log'"
+ " AND COLUMN_NAME = 'link_id';"
+ " if @col_type != 'char(64)' then"
+ " alter table mysql.spider_link_failed_log"
+ " modify link_id char(64) not null default '';"
+ " end if;"
+/*
+ Fix for version 3.3.10
+*/
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_tables'"
+ " AND COLUMN_NAME = 'table_name';"
+ " if @col_type != 'char(199)' then"
+ " alter table mysql.spider_tables"
+ " modify table_name char(199) not null default '';"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_mon_servers'"
+ " AND COLUMN_NAME = 'table_name';"
+ " if @col_type != 'char(199)' then"
+ " alter table mysql.spider_link_mon_servers"
+ " modify table_name char(199) not null default '';"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_failed_log'"
+ " AND COLUMN_NAME = 'table_name';"
+ " if @col_type != 'char(199)' then"
+ " alter table mysql.spider_link_failed_log"
+ " modify table_name char(199) not null default '';"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_table_position_for_recovery'"
+ " AND COLUMN_NAME = 'table_name';"
+ " if @col_type != 'char(199)' then"
+ " alter table mysql.spider_table_position_for_recovery"
+ " modify table_name char(199) not null default '';"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_table_sts'"
+ " AND COLUMN_NAME = 'table_name';"
+ " if @col_type != 'char(199)' then"
+ " alter table mysql.spider_table_sts"
+ " modify table_name char(199) not null default '';"
+ " end if;"
+ " select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_table_crd'"
+ " AND COLUMN_NAME = 'table_name';"
+ " if @col_type != 'char(199)' then"
+ " alter table mysql.spider_table_crd"
+ " modify table_name char(199) not null default '';"
+ " end if;"
+/*
+ Fix for version 3.3.15
+*/
+ " call mysql.spider_fix_one_table('spider_table_sts', 'checksum',"
+ " 'alter table mysql.spider_table_sts"
+ " add column checksum bigint unsigned default null after update_time');"
+/*
+ Fix for MariaDB 10.4: Crash-Safe system tables
+*/
+ " if @server_name = 'MariaDB' and"
+ " ("
+ " @server_major_version > 10 or"
+ " ("
+ " @server_major_version = 10 and"
+ " @server_minor_version >= 4"
+ " )"
+ " )"
+ " then"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_failed_log';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_link_failed_log"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_link_mon_servers';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_link_mon_servers"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_table_crd';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_table_crd"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_table_position_for_recovery';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_table_position_for_recovery"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_table_sts';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_table_sts"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_tables';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_tables"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_xa';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_xa"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_xa_failed_log';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_xa_failed_log"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES"
+ " where TABLE_SCHEMA = 'mysql'"
+ " AND TABLE_NAME = 'spider_xa_member';"
+ " if @engine_name != 'Aria' then"
+ " alter table mysql.spider_xa_member"
+ " engine=Aria transactional=1;"
+ " end if;"
+ " end if;"
+ " if @server_name = 'MariaDB' and"
+ " ("
+ " @server_major_version > 10 or"
+ " ("
+ " @server_major_version = 10 and"
+ " @server_minor_version >= 6"
+ " )"
+ " )"
+ " then"
+ " /* table for ddl pushdown */"
+ " create table if not exists mysql.spider_rewrite_tables("
+ " table_id bigint unsigned not null auto_increment,"
+ " db_name char(64) not null default '',"
+ " table_name char(64) not null default '',"
+ " primary key (table_id),"
+ " unique uk1(db_name, table_name)"
+ " ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin;"
+ " create table if not exists mysql.spider_rewrite_table_tables("
+ " table_id bigint unsigned not null,"
+ " partition_id bigint unsigned not null auto_increment,"
+ " partition_method varchar(18) default '',"
+ " partition_expression varchar(64) default '',"
+ " subpartition_method varchar(12) default '',"
+ " subpartition_expression varchar(64) default '',"
+ " connection_str text not null default '',"
+ " comment_str text not null default '',"
+ " primary key (table_id, partition_id),"
+ " unique uk1(table_id, partition_method, partition_expression,"
+ " subpartition_method, subpartition_expression)"
+ " ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin;"
+ " create table if not exists mysql.spider_rewrite_table_partitions("
+ " table_id bigint unsigned not null,"
+ " partition_id bigint unsigned not null,"
+ " partition_ordinal_position bigint unsigned not null auto_increment,"
+ " partition_name varchar(64) not null default '',"
+ " partition_description varchar(64) not null default '',"
+ " connection_str text not null default '',"
+ " comment_str text not null default '',"
+ " primary key (table_id, partition_id, partition_ordinal_position),"
+ " unique key uk1 (table_id, partition_id, partition_name)"
+ " ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin;"
+ " create table if not exists mysql.spider_rewrite_table_subpartitions("
+ " table_id bigint unsigned not null,"
+ " partition_id bigint unsigned not null,"
+ " partition_ordinal_position bigint unsigned not null,"
+ " subpartition_ordinal_position bigint unsigned not null"
+ " auto_increment,"
+ " subpartition_name varchar(64) not null default '',"
+ " subpartition_description varchar(64) not null default '',"
+ " connection_str text not null default '',"
+ " comment_str text not null default '',"
+ " primary key (table_id, partition_id, partition_ordinal_position,"
+ " subpartition_ordinal_position),"
+ " unique key uk1 (table_id, partition_id, partition_ordinal_position,"
+ " subpartition_name)"
+ " ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin;"
+ " create table if not exists mysql.spider_rewritten_tables("
+ " db_name char(64) not null,"
+ " table_name char(64) not null,"
+ " table_id bigint unsigned not null,"
+ " partition_id bigint unsigned not null,"
+ " primary key (db_name, table_name, table_id, partition_id)"
+ " ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin;"
+ " end if;"
+ "end;"
+ )},
+ {C_STRING_WITH_LEN(
+ "call mysql.spider_fix_system_tables"
+ )},
+ {C_STRING_WITH_LEN(
+ "drop procedure mysql.spider_fix_one_table"
+ )},
+ {C_STRING_WITH_LEN(
+ "drop procedure mysql.spider_fix_system_tables"
+ )},
+/*
+ Install a plugin and UDFs
+*/
+ {C_STRING_WITH_LEN(
+ "drop procedure if exists mysql.spider_plugin_installer"
+ )},
+ {C_STRING_WITH_LEN(
+ "create procedure mysql.spider_plugin_installer()"
+ "begin"
+ " set @win_plugin := IF(@@version_compile_os like 'Win%', 1, 0);"
+/*
+ Install spider plugin
+*/
+/*
+ " set @have_spider_i_s_plugin := 0;"
+ " select @have_spider_i_s_plugin := 1 from INFORMATION_SCHEMA.plugins"
+ " where PLUGIN_NAME = 'SPIDER';"
+ " set @have_spider_plugin := 0;"
+ " select @have_spider_plugin := 1 from mysql.plugin"
+ " where name = 'spider';"
+ " if @have_spider_i_s_plugin = 0 then"
+ " if @have_spider_plugin = 1 then"
+ " / *"
+ " spider plugin is present in mysql.plugin but not in"
+ " information_schema.plugins. Remove spider plugin entry"
+ " in mysql.plugin first."
+ " * /"
+ " delete from mysql.plugin where name = 'spider';"
+ " end if;"
+ " if @win_plugin = 0 then "
+ " install plugin spider soname 'ha_spider.so';"
+ " else"
+ " install plugin spider soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+*/
+/*
+ Install spider_alloc_mem plugin
+*/
+ " set @have_spider_i_s_alloc_mem_plugin := 0;"
+ " select @have_spider_i_s_alloc_mem_plugin := 1"
+ " from INFORMATION_SCHEMA.plugins"
+ " where PLUGIN_NAME = 'SPIDER_ALLOC_MEM';"
+ " set @have_spider_alloc_mem_plugin := 0;"
+ " select @have_spider_alloc_mem_plugin := 1 from mysql.plugin"
+ " where name = 'spider_alloc_mem';"
+ " if @have_spider_i_s_alloc_mem_plugin = 0 then"
+ " if @have_spider_alloc_mem_plugin = 1 then"
+ " /*"
+ " spider_alloc_mem plugin is present in mysql.plugin but not in"
+ " information_schema.plugins. Remove spider_alloc_mem plugin entry"
+ " in mysql.plugin first."
+ " */"
+ " delete from mysql.plugin where name = 'spider_alloc_mem';"
+ " end if;"
+ " if @win_plugin = 0 then "
+ " install plugin spider_alloc_mem soname 'ha_spider.so';"
+ " else"
+ " install plugin spider_alloc_mem soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " set @have_spider_direct_sql_udf := 0;"
+ " select @have_spider_direct_sql_udf := 1 from mysql.func"
+ " where name = 'spider_direct_sql';"
+ " if @have_spider_direct_sql_udf = 0 then"
+ " if @win_plugin = 0 then "
+ " create function spider_direct_sql returns int"
+ " soname 'ha_spider.so';"
+ " else"
+ " create function spider_direct_sql returns int"
+ " soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " set @have_spider_bg_direct_sql_udf := 0;"
+ " select @have_spider_bg_direct_sql_udf := 1 from mysql.func"
+ " where name = 'spider_bg_direct_sql';"
+ " if @have_spider_bg_direct_sql_udf = 0 then"
+ " if @win_plugin = 0 then "
+ " create aggregate function spider_bg_direct_sql returns int"
+ " soname 'ha_spider.so';"
+ " else"
+ " create aggregate function spider_bg_direct_sql returns int"
+ " soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " set @have_spider_ping_table_udf := 0;"
+ " select @have_spider_ping_table_udf := 1 from mysql.func"
+ " where name = 'spider_ping_table';"
+ " if @have_spider_ping_table_udf = 0 then"
+ " if @win_plugin = 0 then "
+ " create function spider_ping_table returns int"
+ " soname 'ha_spider.so';"
+ " else"
+ " create function spider_ping_table returns int"
+ " soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " set @have_spider_copy_tables_udf := 0;"
+ " select @have_spider_copy_tables_udf := 1 from mysql.func"
+ " where name = 'spider_copy_tables';"
+ " if @have_spider_copy_tables_udf = 0 then"
+ " if @win_plugin = 0 then "
+ " create function spider_copy_tables returns int"
+ " soname 'ha_spider.so';"
+ " else"
+ " create function spider_copy_tables returns int"
+ " soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " set @have_spider_flush_table_mon_cache_udf := 0;"
+ " select @have_spider_flush_table_mon_cache_udf := 1 from mysql.func"
+ " where name = 'spider_flush_table_mon_cache';"
+ " if @have_spider_flush_table_mon_cache_udf = 0 then"
+ " if @win_plugin = 0 then "
+ " create function spider_flush_table_mon_cache returns int"
+ " soname 'ha_spider.so';"
+ " else"
+ " create function spider_flush_table_mon_cache returns int"
+ " soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " if @server_name = 'MariaDB' and"
+ " ("
+ " @server_major_version > 10 or"
+ " ("
+ " @server_major_version = 10 and"
+ " @server_minor_version >= 6"
+ " )"
+ " )"
+ " then"
+/*
+ Install spider_rewrite plugin
+*/
+ " set @have_spider_i_s_rewrite_plugin := 0;"
+ " select @have_spider_i_s_rewrite_plugin := 1"
+ " from INFORMATION_SCHEMA.plugins"
+ " where PLUGIN_NAME = 'SPIDER_REWRITE';"
+ " set @have_spider_rewrite_plugin := 0;"
+ " select @have_spider_rewrite_plugin := 1 from mysql.plugin"
+ " where name = 'spider_rewrite';"
+ " if @have_spider_i_s_rewrite_plugin = 0 then"
+ " if @have_spider_rewrite_plugin = 1 then"
+ " /*"
+ " spider_rewrite plugin is present in mysql.plugin but not in"
+ " information_schema.plugins. Remove spider_rewrite plugin entry"
+ " in mysql.plugin first."
+ " */"
+ " delete from mysql.plugin where name = 'spider_rewrite';"
+ " end if;"
+ " if @win_plugin = 0 then "
+ " install plugin spider_rewrite soname 'ha_spider.so';"
+ " else"
+ " install plugin spider_rewrite soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " set @have_spider_flush_rewrite_cache_udf := 0;"
+ " select @have_spider_flush_rewrite_cache_udf := 1 from mysql.func"
+ " where name = 'spider_flush_rewrite_cache';"
+ " if @have_spider_flush_rewrite_cache_udf = 0 then"
+ " if @win_plugin = 0 then "
+ " create function spider_flush_rewrite_cache returns int"
+ " soname 'ha_spider.so';"
+ " else"
+ " create function spider_flush_rewrite_cache returns int"
+ " soname 'ha_spider.dll';"
+ " end if;"
+ " end if;"
+ " end if;"
+ "end;"
+ )},
+ {C_STRING_WITH_LEN(
+ "call mysql.spider_plugin_installer"
+ )},
+ {C_STRING_WITH_LEN(
+ "drop procedure mysql.spider_plugin_installer"
+ )},
+ {C_STRING_WITH_LEN("")}
+};
diff --git a/storage/spider/spd_malloc.cc b/storage/spider/spd_malloc.cc
index 2b5a5002c23..40b37ff4377 100644
--- a/storage/spider/spd_malloc.cc
+++ b/storage/spider/spd_malloc.cc
@@ -1,4 +1,5 @@
-/* Copyright (C) 2012-2017 Kentoku Shiba
+/* Copyright (C) 2012-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -1126,6 +1127,7 @@ void spider_string::q_append(
) {
DBUG_ENTER("spider_string::q_append");
DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_ASSERT(str.alloced_length() >= str.length() + data_len);
str.q_append(data, data_len);
DBUG_VOID_RETURN;
}
@@ -1238,6 +1240,21 @@ void spider_string::append_escape_string(
DBUG_VOID_RETURN;
}
+void spider_string::append_escape_string(
+ const char *st,
+ uint len,
+ CHARSET_INFO *cs
+) {
+ DBUG_ENTER("spider_string::append_escape_string");
+ DBUG_PRINT("info",("spider this=%p", this));
+ DBUG_ASSERT(mem_calc_inited);
+ DBUG_ASSERT((!current_alloc_mem && !str.is_alloced()) ||
+ current_alloc_mem == str.alloced_length());
+ str.length(str.length() + escape_string_for_mysql(
+ cs, (char *) str.ptr() + str.length(), 0, st, len));
+ DBUG_VOID_RETURN;
+}
+
bool spider_string::append_for_single_quote(
const char *st,
uint len
diff --git a/storage/spider/spd_malloc.h b/storage/spider/spd_malloc.h
index abbeb58d71c..9e97e039e04 100644
--- a/storage/spider/spd_malloc.h
+++ b/storage/spider/spd_malloc.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2012-2014 Kentoku Shiba
+/* Copyright (C) 2012-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -19,7 +20,7 @@
#define spider_bulk_malloc(A,B,C,...) \
spider_bulk_alloc_mem(A,B,__func__,__FILE__,__LINE__,C,__VA_ARGS__)
#define spider_current_trx \
- (current_thd ? ((SPIDER_TRX *) thd_get_ha_data(current_thd, spider_hton_ptr)) : NULL)
+ (current_thd && spider_hton_ptr->slot != HA_SLOT_UNDEF ? ((SPIDER_TRX *) thd_get_ha_data(current_thd, spider_hton_ptr)) : NULL)
#define init_calc_mem(A) init_mem_calc(A,__func__,__FILE__,__LINE__)
diff --git a/storage/spider/spd_param.cc b/storage/spider/spd_param.cc
index 8e56cae89a8..81540a1ef91 100644
--- a/storage/spider/spd_param.cc
+++ b/storage/spider/spd_param.cc
@@ -3355,6 +3355,76 @@ int spider_param_slave_trx_isolation()
DBUG_RETURN(spider_slave_trx_isolation);
}
+/*
+ -1 :not set
+ 0-:seconds of timeout
+ */
+static MYSQL_THDVAR_INT(
+ remote_wait_timeout, /* name */
+ PLUGIN_VAR_RQCMDARG, /* opt */
+ "Wait timeout on remote server", /* comment */
+ NULL, /* check */
+ NULL, /* update */
+ -1, /* def */
+ -1, /* min */
+ 2147483647, /* max */
+ 0 /* blk */
+);
+
+int spider_param_remote_wait_timeout(
+ THD *thd
+) {
+ DBUG_ENTER("spider_param_remote_wait_timeout");
+ if (likely(thd))
+ DBUG_RETURN(THDVAR(thd, remote_wait_timeout));
+ DBUG_RETURN(-1);
+}
+
+/*
+ -1 :not set
+ 0-:seconds of timeout
+ */
+static MYSQL_THDVAR_INT(
+ wait_timeout, /* name */
+ PLUGIN_VAR_RQCMDARG, /* opt */
+ "Wait timeout of setting to remote server", /* comment */
+ NULL, /* check */
+ NULL, /* update */
+ 604800, /* def */
+ -1, /* min */
+ 2147483647, /* max */
+ 0 /* blk */
+);
+
+int spider_param_wait_timeout(
+ THD *thd
+) {
+ DBUG_ENTER("spider_param_wait_timeout");
+ if (likely(thd))
+ DBUG_RETURN(THDVAR(thd, wait_timeout));
+ DBUG_RETURN(604800);
+}
+
+/*
+ FALSE: no sync
+ TRUE: sync
+ */
+static MYSQL_THDVAR_BOOL(
+ sync_sql_mode, /* name */
+ PLUGIN_VAR_OPCMDARG, /* opt */
+ "Sync sql_mode", /* comment */
+ NULL, /* check */
+ NULL, /* update */
+ TRUE /* def */
+);
+
+bool spider_param_sync_sql_mode(
+ THD *thd
+) {
+ DBUG_ENTER("spider_param_sync_sql_mode");
+ DBUG_RETURN(THDVAR(thd, sync_sql_mode));
+}
+
static struct st_mysql_storage_engine spider_storage_engine =
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
@@ -3505,6 +3575,9 @@ static struct st_mysql_sys_var* spider_system_variables[] = {
MYSQL_SYSVAR(table_crd_thread_count),
#endif
MYSQL_SYSVAR(slave_trx_isolation),
+ MYSQL_SYSVAR(remote_wait_timeout),
+ MYSQL_SYSVAR(wait_timeout),
+ MYSQL_SYSVAR(sync_sql_mode),
NULL
};
diff --git a/storage/spider/spd_param.h b/storage/spider/spd_param.h
index 4318515dd72..9ffb9e8c278 100644
--- a/storage/spider/spd_param.h
+++ b/storage/spider/spd_param.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -421,3 +422,12 @@ uint spider_param_table_sts_thread_count();
uint spider_param_table_crd_thread_count();
#endif
int spider_param_slave_trx_isolation();
+int spider_param_remote_wait_timeout(
+ THD *thd
+);
+int spider_param_wait_timeout(
+ THD *thd
+);
+bool spider_param_sync_sql_mode(
+ THD *thd
+);
diff --git a/storage/spider/spd_sys_table.cc b/storage/spider/spd_sys_table.cc
index bc0a06e3076..6128a0137b1 100644
--- a/storage/spider/spd_sys_table.cc
+++ b/storage/spider/spd_sys_table.cc
@@ -229,85 +229,264 @@ TABLE *spider_open_sys_table(
}
}
#endif
- if (table_name_length == SPIDER_SYS_XA_TABLE_NAME_LEN)
+ switch (table_name_length)
{
- if (
- !memcmp(table_name,
- SPIDER_SYS_XA_TABLE_NAME_STR, SPIDER_SYS_XA_TABLE_NAME_LEN) &&
- table->s->fields != SPIDER_SYS_XA_COL_CNT
- ) {
- spider_close_sys_table(thd, table, open_tables_backup, need_lock);
- table = NULL;
- my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
- ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
- SPIDER_SYS_XA_TABLE_NAME_STR);
- *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
- goto error_col_num_chk;
- }
- } else if (table_name_length == SPIDER_SYS_XA_MEMBER_TABLE_NAME_LEN)
- {
- if (
- !memcmp(table_name,
- SPIDER_SYS_XA_MEMBER_TABLE_NAME_STR,
- SPIDER_SYS_XA_MEMBER_TABLE_NAME_LEN) &&
- table->s->fields != SPIDER_SYS_XA_MEMBER_COL_CNT
- ) {
- spider_close_sys_table(thd, table, open_tables_backup, need_lock);
- table = NULL;
- my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
- ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
- SPIDER_SYS_XA_MEMBER_TABLE_NAME_STR);
- *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
- goto error_col_num_chk;
- }
- } else if (table_name_length == SPIDER_SYS_TABLES_TABLE_NAME_LEN)
- {
- if (
- !memcmp(table_name,
- SPIDER_SYS_TABLES_TABLE_NAME_STR,
- SPIDER_SYS_TABLES_TABLE_NAME_LEN) &&
- table->s->fields != SPIDER_SYS_TABLES_COL_CNT
- ) {
- spider_close_sys_table(thd, table, open_tables_backup, need_lock);
- table = NULL;
- my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
- ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
- SPIDER_SYS_TABLES_TABLE_NAME_STR);
- *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
- goto error_col_num_chk;
- }
- } else if (table_name_length == SPIDER_SYS_LINK_MON_TABLE_NAME_LEN)
- {
- if (
- !memcmp(table_name,
- SPIDER_SYS_LINK_MON_TABLE_NAME_STR,
- SPIDER_SYS_LINK_MON_TABLE_NAME_LEN) &&
- table->s->fields != SPIDER_SYS_LINK_MON_TABLE_COL_CNT
- ) {
- spider_close_sys_table(thd, table, open_tables_backup, need_lock);
- table = NULL;
- my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
- ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
- SPIDER_SYS_LINK_MON_TABLE_NAME_STR);
- *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
- goto error_col_num_chk;
- }
- } else if (table_name_length == SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_LEN)
- {
- if (
- !memcmp(table_name,
- SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_STR,
- SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_LEN) &&
- table->s->fields != SPIDER_SYS_POS_FOR_RECOVERY_TABLE_COL_CNT
- ) {
- spider_close_sys_table(thd, table, open_tables_backup, need_lock);
- table = NULL;
- my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
- ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
- SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_STR);
- *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
- goto error_col_num_chk;
- }
+ case 9:
+ if (!memcmp(table_name, SPIDER_SYS_XA_TABLE_NAME_STR,
+ SPIDER_SYS_XA_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_XA"));
+ if (table->s->fields != SPIDER_SYS_XA_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_XA_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 13:
+ if (!memcmp(table_name, SPIDER_SYS_TABLES_TABLE_NAME_STR,
+ SPIDER_SYS_TABLES_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_TABLES"));
+ if (table->s->fields != SPIDER_SYS_TABLES_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_TABLES_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 16:
+ if (!memcmp(table_name, SPIDER_SYS_XA_MEMBER_TABLE_NAME_STR,
+ SPIDER_SYS_XA_MEMBER_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_XA_MEMBER"));
+ if (table->s->fields != SPIDER_SYS_XA_MEMBER_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_XA_MEMBER_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ if (!memcmp(table_name, SPIDER_SYS_TABLE_STS_TABLE_NAME_STR,
+ SPIDER_SYS_TABLE_STS_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_TABLE_STS"));
+ if (table->s->fields != SPIDER_SYS_TABLE_STS_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_TABLE_STS_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ if (!memcmp(table_name, SPIDER_SYS_TABLE_CRD_TABLE_NAME_STR,
+ SPIDER_SYS_TABLE_CRD_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_TABLE_CRD"));
+ if (table->s->fields != SPIDER_SYS_TABLE_CRD_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_TABLE_CRD_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 20:
+ if (!memcmp(table_name, SPIDER_SYS_XA_FAILED_TABLE_NAME_STR,
+ SPIDER_SYS_XA_FAILED_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_XA_FAILED"));
+ if (table->s->fields != SPIDER_SYS_XA_FAILED_TABLE_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_XA_FAILED_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 21:
+ if (!memcmp(table_name, SPIDER_SYS_RW_TBLS_TABLE_NAME_STR,
+ SPIDER_SYS_RW_TBLS_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_RW_TBLS"));
+ if (table->s->fields != SPIDER_SYS_RW_TBLS_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_RW_TBLS_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 22:
+ if (!memcmp(table_name, SPIDER_SYS_LINK_FAILED_TABLE_NAME_STR,
+ SPIDER_SYS_LINK_FAILED_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_LINK_FAILED"));
+ if (table->s->fields != SPIDER_SYS_LINK_FAILED_TABLE_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_LINK_FAILED_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 23:
+ if (!memcmp(table_name, SPIDER_SYS_LINK_MON_TABLE_NAME_STR,
+ SPIDER_SYS_LINK_MON_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_LINK_MON"));
+ if (table->s->fields != SPIDER_SYS_LINK_MON_TABLE_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_LINK_MON_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ if (!memcmp(table_name, SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR,
+ SPIDER_SYS_RWN_TBLS_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_RWN_TBLS"));
+ if (table->s->fields != SPIDER_SYS_RWN_TBLS_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 27:
+ if (!memcmp(table_name, SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR,
+ SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_RW_TBL_TBLS"));
+ if (table->s->fields != SPIDER_SYS_RW_TBL_TBLS_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 31:
+ if (!memcmp(table_name, SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR,
+ SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_RW_TBL_PTTS"));
+ if (table->s->fields != SPIDER_SYS_RW_TBL_PTTS_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ case 34:
+ if (!memcmp(table_name, SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_STR,
+ SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_POS_FOR_RECOVERY"));
+ if (table->s->fields != SPIDER_SYS_POS_FOR_RECOVERY_TABLE_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ if (!memcmp(table_name, SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR,
+ SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_LEN))
+ {
+ DBUG_PRINT("info",("spider checking for SYS_RW_TBL_SPTTS"));
+ if (table->s->fields != SPIDER_SYS_RW_TBL_SPTTS_COL_CNT)
+ {
+ spider_close_sys_table(thd, table, open_tables_backup, need_lock);
+ table = NULL;
+ my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
+ ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
+ SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR);
+ *error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
+ goto error_col_num_chk;
+ }
+ break;
+ }
+ DBUG_ASSERT(0);
+ break;
+ default:
+ DBUG_ASSERT(0);
+ break;
}
DBUG_RETURN(table);
@@ -1240,28 +1419,29 @@ void spider_store_binlog_pos_gtid(
void spider_store_table_sts_info(
TABLE *table,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time
+ ha_statistics *stat
) {
MYSQL_TIME mysql_time;
DBUG_ENTER("spider_store_table_sts_info");
- table->field[2]->store((longlong) *data_file_length, TRUE);
- table->field[3]->store((longlong) *max_data_file_length, TRUE);
- table->field[4]->store((longlong) *index_file_length, TRUE);
- table->field[5]->store((longlong) *records, TRUE);
- table->field[6]->store((longlong) *mean_rec_length, TRUE);
- spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) *check_time);
+ table->field[2]->store((longlong) stat->data_file_length, TRUE);
+ table->field[3]->store((longlong) stat->max_data_file_length, TRUE);
+ table->field[4]->store((longlong) stat->index_file_length, TRUE);
+ table->field[5]->store((longlong) stat->records, TRUE);
+ table->field[6]->store((longlong) stat->mean_rec_length, TRUE);
+ spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) stat->check_time);
table->field[7]->store_time(&mysql_time);
- spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) *create_time);
+ spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) stat->create_time);
table->field[8]->store_time(&mysql_time);
- spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) *update_time);
+ spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) stat->update_time);
table->field[9]->store_time(&mysql_time);
+ if (stat->checksum_null)
+ {
+ table->field[10]->set_null();
+ table->field[10]->reset();
+ } else {
+ table->field[10]->set_notnull();
+ table->field[10]->store((longlong) stat->checksum, TRUE);
+ }
DBUG_VOID_RETURN;
}
@@ -1386,14 +1566,7 @@ int spider_insert_or_update_table_sts(
TABLE *table,
const char *name,
uint name_length,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time
+ ha_statistics *stat
) {
int error_num;
char table_key[MAX_KEY_LENGTH];
@@ -1402,14 +1575,7 @@ int spider_insert_or_update_table_sts(
spider_store_tables_name(table, name, name_length);
spider_store_table_sts_info(
table,
- data_file_length,
- max_data_file_length,
- index_file_length,
- records,
- mean_rec_length,
- check_time,
- create_time,
- update_time
+ stat
);
if ((error_num = spider_check_sys_table_for_update_all_columns(table, table_key)))
@@ -2427,6 +2593,7 @@ int spider_get_sys_tables_static_link_id(
) {
int error_num = 0;
DBUG_ENTER("spider_get_sys_tables_static_link_id");
+ *static_link_id = NULL;
if (
!table->field[24]->is_null() &&
(*static_link_id = get_field(mem_root, table->field[24]))
@@ -2441,14 +2608,7 @@ int spider_get_sys_tables_static_link_id(
void spider_get_sys_table_sts_info(
TABLE *table,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time
+ ha_statistics *stat
) {
MYSQL_TIME mysql_time;
#ifdef MARIADB_BASE_VERSION
@@ -2458,35 +2618,43 @@ void spider_get_sys_table_sts_info(
#endif
long not_used_long;
DBUG_ENTER("spider_get_sys_table_sts_info");
- *data_file_length = (ulonglong) table->field[2]->val_int();
- *max_data_file_length = (ulonglong) table->field[3]->val_int();
- *index_file_length = (ulonglong) table->field[4]->val_int();
- *records = (ha_rows) table->field[5]->val_int();
- *mean_rec_length = (ulong) table->field[6]->val_int();
+ stat->data_file_length = (ulonglong) table->field[2]->val_int();
+ stat->max_data_file_length = (ulonglong) table->field[3]->val_int();
+ stat->index_file_length = (ulonglong) table->field[4]->val_int();
+ stat->records = (ha_rows) table->field[5]->val_int();
+ stat->mean_rec_length = (ulong) table->field[6]->val_int();
table->field[7]->get_date(&mysql_time, SPIDER_date_mode_t(0));
#ifdef MARIADB_BASE_VERSION
- *check_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat->check_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- *check_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat->check_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
table->field[8]->get_date(&mysql_time, SPIDER_date_mode_t(0));
#ifdef MARIADB_BASE_VERSION
- *create_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat->create_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- *create_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat->create_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
table->field[9]->get_date(&mysql_time, SPIDER_date_mode_t(0));
#ifdef MARIADB_BASE_VERSION
- *update_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat->update_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_uint);
#else
- *update_time = (time_t) my_system_gmt_sec(&mysql_time,
+ stat->update_time = (time_t) my_system_gmt_sec(&mysql_time,
&not_used_long, &not_used_my_bool);
#endif
+ if (table->field[10]->is_null())
+ {
+ stat->checksum_null = TRUE;
+ stat->checksum = 0;
+ } else {
+ stat->checksum_null = FALSE;
+ stat->checksum = (ha_checksum) table->field[10]->val_int();
+ }
DBUG_VOID_RETURN;
}
@@ -2907,14 +3075,7 @@ int spider_sys_insert_or_update_table_sts(
THD *thd,
const char *name,
uint name_length,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time,
+ ha_statistics *stat,
bool need_lock
) {
int error_num;
@@ -2937,14 +3098,7 @@ int spider_sys_insert_or_update_table_sts(
table_sts,
name,
name_length,
- data_file_length,
- max_data_file_length,
- index_file_length,
- records,
- mean_rec_length,
- check_time,
- create_time,
- update_time
+ stat
)))
goto error;
spider_close_sys_table(thd, table_sts, &open_tables_backup, need_lock);
@@ -3079,14 +3233,7 @@ int spider_sys_get_table_sts(
THD *thd,
const char *name,
uint name_length,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time,
+ ha_statistics *stat,
bool need_lock
) {
int error_num;
@@ -3119,14 +3266,7 @@ int spider_sys_get_table_sts(
} else {
spider_get_sys_table_sts_info(
table_sts,
- data_file_length,
- max_data_file_length,
- index_file_length,
- records,
- mean_rec_length,
- check_time,
- create_time,
- update_time
+ stat
);
}
diff --git a/storage/spider/spd_sys_table.h b/storage/spider/spd_sys_table.h
index 9e2d54c3e28..df933ec61b8 100644
--- a/storage/spider/spd_sys_table.h
+++ b/storage/spider/spd_sys_table.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -14,23 +15,33 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#define SPIDER_SYS_XA_TABLE_NAME_STR "spider_xa"
-#define SPIDER_SYS_XA_TABLE_NAME_LEN (sizeof(SPIDER_SYS_XA_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_XA_TABLE_NAME_LEN 9
#define SPIDER_SYS_XA_MEMBER_TABLE_NAME_STR "spider_xa_member"
-#define SPIDER_SYS_XA_MEMBER_TABLE_NAME_LEN (sizeof(SPIDER_SYS_XA_MEMBER_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_XA_MEMBER_TABLE_NAME_LEN 16
#define SPIDER_SYS_TABLES_TABLE_NAME_STR "spider_tables"
-#define SPIDER_SYS_TABLES_TABLE_NAME_LEN (sizeof(SPIDER_SYS_TABLES_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_TABLES_TABLE_NAME_LEN 13
#define SPIDER_SYS_LINK_MON_TABLE_NAME_STR "spider_link_mon_servers"
-#define SPIDER_SYS_LINK_MON_TABLE_NAME_LEN (sizeof(SPIDER_SYS_LINK_MON_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_LINK_MON_TABLE_NAME_LEN 23
#define SPIDER_SYS_LINK_FAILED_TABLE_NAME_STR "spider_link_failed_log"
-#define SPIDER_SYS_LINK_FAILED_TABLE_NAME_LEN (sizeof(SPIDER_SYS_LINK_FAILED_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_LINK_FAILED_TABLE_NAME_LEN 22
#define SPIDER_SYS_XA_FAILED_TABLE_NAME_STR "spider_xa_failed_log"
-#define SPIDER_SYS_XA_FAILED_TABLE_NAME_LEN (sizeof(SPIDER_SYS_XA_FAILED_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_XA_FAILED_TABLE_NAME_LEN 20
#define SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_STR "spider_table_position_for_recovery"
-#define SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_LEN (sizeof(SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_POS_FOR_RECOVERY_TABLE_NAME_LEN 34
#define SPIDER_SYS_TABLE_STS_TABLE_NAME_STR "spider_table_sts"
-#define SPIDER_SYS_TABLE_STS_TABLE_NAME_LEN (sizeof(SPIDER_SYS_TABLE_STS_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_TABLE_STS_TABLE_NAME_LEN 16
#define SPIDER_SYS_TABLE_CRD_TABLE_NAME_STR "spider_table_crd"
-#define SPIDER_SYS_TABLE_CRD_TABLE_NAME_LEN (sizeof(SPIDER_SYS_TABLE_CRD_TABLE_NAME_STR) - 1)
+#define SPIDER_SYS_TABLE_CRD_TABLE_NAME_LEN 16
+#define SPIDER_SYS_RW_TBLS_TABLE_NAME_STR "spider_rewrite_tables"
+#define SPIDER_SYS_RW_TBLS_TABLE_NAME_LEN 21
+#define SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR "spider_rewrite_table_tables"
+#define SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_LEN 27
+#define SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR "spider_rewrite_table_partitions"
+#define SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_LEN 31
+#define SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR "spider_rewrite_table_subpartitions"
+#define SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_LEN 34
+#define SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR "spider_rewritten_tables"
+#define SPIDER_SYS_RWN_TBLS_TABLE_NAME_LEN 23
#define SPIDER_SYS_XA_PREPARED_STR "PREPARED"
#define SPIDER_SYS_XA_NOT_YET_STR "NOT YET"
@@ -47,11 +58,18 @@
#define SPIDER_SYS_TABLES_IDX1_COL_CNT 1
#define SPIDER_SYS_TABLES_UIDX1_COL_CNT 3
#define SPIDER_SYS_LINK_MON_TABLE_COL_CNT 19
+#define SPIDER_SYS_LINK_FAILED_TABLE_COL_CNT 4
+#define SPIDER_SYS_XA_FAILED_TABLE_COL_CNT 21
#define SPIDER_SYS_POS_FOR_RECOVERY_TABLE_COL_CNT 7
-#define SPIDER_SYS_TABLE_STS_COL_CNT 10
+#define SPIDER_SYS_TABLE_STS_COL_CNT 11
#define SPIDER_SYS_TABLE_STS_PK_COL_CNT 2
#define SPIDER_SYS_TABLE_CRD_COL_CNT 4
#define SPIDER_SYS_TABLE_CRD_PK_COL_CNT 3
+#define SPIDER_SYS_RW_TBLS_COL_CNT 3
+#define SPIDER_SYS_RW_TBL_TBLS_COL_CNT 8
+#define SPIDER_SYS_RW_TBL_PTTS_COL_CNT 7
+#define SPIDER_SYS_RW_TBL_SPTTS_COL_CNT 8
+#define SPIDER_SYS_RWN_TBLS_COL_CNT 4
#define SPIDER_SYS_LINK_MON_TABLE_DB_NAME_SIZE 64
#define SPIDER_SYS_LINK_MON_TABLE_TABLE_NAME_SIZE 64
@@ -289,14 +307,7 @@ void spider_store_binlog_pos_gtid(
void spider_store_table_sts_info(
TABLE *table,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time
+ ha_statistics *stat
);
void spider_store_table_crd_info(
@@ -330,14 +341,7 @@ int spider_insert_or_update_table_sts(
TABLE *table,
const char *name,
uint name_length,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time
+ ha_statistics *stat
);
int spider_insert_or_update_table_crd(
@@ -493,14 +497,7 @@ int spider_get_sys_tables_static_link_id(
void spider_get_sys_table_sts_info(
TABLE *table,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time
+ ha_statistics *stat
);
void spider_get_sys_table_crd_info(
@@ -564,14 +561,7 @@ int spider_sys_insert_or_update_table_sts(
THD *thd,
const char *name,
uint name_length,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time,
+ ha_statistics *stat,
bool need_lock
);
@@ -602,14 +592,7 @@ int spider_sys_get_table_sts(
THD *thd,
const char *name,
uint name_length,
- ulonglong *data_file_length,
- ulonglong *max_data_file_length,
- ulonglong *index_file_length,
- ha_rows *records,
- ulong *mean_rec_length,
- time_t *check_time,
- time_t *create_time,
- time_t *update_time,
+ ha_statistics *stat,
bool need_lock
);
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index b7538677339..7a00061e3a2 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -29,6 +30,7 @@
#include "sql_servers.h"
#include "sql_select.h"
#include "tztime.h"
+#include "sql_parse.h"
#endif
#include "spd_err.h"
#include "spd_param.h"
@@ -44,6 +46,7 @@
#include "spd_direct_sql.h"
#include "spd_malloc.h"
#include "spd_group_by_handler.h"
+#include "spd_init_query.h"
/* Background thread management */
#ifdef SPIDER_HAS_NEXT_THREAD_ID
@@ -122,8 +125,13 @@ HASH *spd_db_att_xid_cache;
struct charset_info_st *spd_charset_utf8_bin;
const char **spd_defaults_extra_file;
const char **spd_defaults_file;
+const char **spd_mysqld_unix_port;
+uint *spd_mysqld_port;
bool volatile *spd_abort_loop;
Time_zone *spd_tz_system;
+static int *spd_mysqld_server_started;
+static pthread_mutex_t *spd_LOCK_server_started;
+static pthread_cond_t *spd_COND_server_started;
extern long spider_conn_mutex_id;
handlerton *spider_hton_ptr;
SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
@@ -1970,7 +1978,7 @@ int spider_parse_connect_info(
) {
int error_num = 0;
char *connect_string = NULL;
- char *sprit_ptr[2];
+ char *sprit_ptr;
char *tmp_ptr, *tmp_ptr2, *start_ptr;
int roop_count;
int title_length;
@@ -2162,23 +2170,17 @@ int spider_parse_connect_info(
break;
}
- sprit_ptr[0] = connect_string;
+ sprit_ptr = connect_string;
connect_string_parse.init(connect_string, ER_SPIDER_INVALID_CONNECT_INFO_NUM);
- while (sprit_ptr[0])
+ while (sprit_ptr)
{
- if ((sprit_ptr[1] = strchr(sprit_ptr[0], ',')))
- {
- *sprit_ptr[1] = '\0';
- sprit_ptr[1]++;
- }
- tmp_ptr = sprit_ptr[0];
- sprit_ptr[0] = sprit_ptr[1];
+ tmp_ptr = sprit_ptr;
while (*tmp_ptr == ' ' || *tmp_ptr == '\r' ||
*tmp_ptr == '\n' || *tmp_ptr == '\t')
tmp_ptr++;
if (*tmp_ptr == '\0')
- continue;
+ break;
title_length = 0;
start_ptr = tmp_ptr;
@@ -2191,6 +2193,11 @@ int spider_parse_connect_info(
start_ptr++;
}
connect_string_parse.set_param_title(tmp_ptr, tmp_ptr + title_length);
+ if ((error_num = connect_string_parse.get_next_parameter_head(
+ start_ptr, &sprit_ptr)))
+ {
+ goto error;
+ }
switch (title_length)
{
@@ -3541,7 +3548,8 @@ int spider_set_connect_info_default(
if (!share->tgt_table_names[roop_count] && table_share)
{
DBUG_PRINT("info",("spider create default tgt_table_names"));
- share->tgt_table_names_lengths[roop_count] = share->table_name_length;
+ share->tgt_table_names_lengths[roop_count] =
+ table_share->table_name.length;
if (
!(share->tgt_table_names[roop_count] = spider_create_table_name_string(
table_share->table_name.str,
@@ -4372,6 +4380,9 @@ SPIDER_SHARE *spider_create_share(
uchar *tmp_cardinality_upd, *tmp_table_mon_mutex_bitmap;
char buf[MAX_FIELD_WIDTH], *buf_pos;
char link_idx_str[SPIDER_SQL_INT_LEN];
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ bool checksum_support = TRUE;
+#endif
DBUG_ENTER("spider_create_share");
length = (uint) strlen(table_name);
bitmap_size = spider_bitmap_size(table_share->fields);
@@ -4530,8 +4541,24 @@ SPIDER_SHARE *spider_create_share(
{
goto error_init_dbton;
}
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ if (
+ spider_dbton[roop_count].db_access_type == SPIDER_DB_ACCESS_TYPE_SQL &&
+ !share->dbton_share[roop_count]->checksum_support()
+ ) {
+ checksum_support = FALSE;
+ }
+#endif
}
}
+#ifdef HA_HAS_CHECKSUM_EXTENDED
+ if (checksum_support)
+ {
+ share->additional_table_flags |=
+ HA_HAS_OLD_CHECKSUM |
+ HA_HAS_NEW_CHECKSUM;
+ }
+#endif
DBUG_RETURN(share);
/*
@@ -4997,8 +5024,7 @@ SPIDER_SHARE *spider_get_share(
share->init_error = TRUE;
share->init_error_time = (time_t) time((time_t*) 0);
share->init = TRUE;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_conn_keys;
}
if (
@@ -5045,8 +5071,7 @@ SPIDER_SHARE *spider_get_share(
share->init_error = TRUE;
share->init_error_time = (time_t) time((time_t*) 0);
share->init = TRUE;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
spider->conns[roop_count]->error_mode &= spider->error_mode;
}
@@ -5064,8 +5089,7 @@ SPIDER_SHARE *spider_get_share(
share->init_error = TRUE;
share->init_error_time = (time_t) time((time_t*) 0);
share->init = TRUE;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
char *table_name = db + table_share->db.length + 1;
memcpy(db, table_share->db.str, table_share->db.length);
@@ -5080,16 +5104,14 @@ SPIDER_SHARE *spider_get_share(
share->init_error = TRUE;
share->init_error_time = (time_t) time((time_t*) 0);
share->init = TRUE;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
} else if (search_link_idx == -2)
{
*error_num = HA_ERR_OUT_OF_MEM;
share->init_error = TRUE;
share->init_error_time = (time_t) time((time_t*) 0);
share->init = TRUE;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
spider->search_link_idx = search_link_idx;
@@ -5146,8 +5168,7 @@ SPIDER_SHARE *spider_get_share(
share->init = TRUE;
pthread_mutex_unlock(&share->crd_mutex);
pthread_mutex_unlock(&share->sts_mutex);
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
}
@@ -5156,28 +5177,48 @@ SPIDER_SHARE *spider_get_share(
!same_server_link ||
load_sts_at_startup
) &&
- spider_get_sts(share, spider->search_link_idx, tmp_time,
+ (*error_num = spider_get_sts(share, spider->search_link_idx, tmp_time,
spider, sts_interval, sts_mode,
#ifdef WITH_PARTITION_STORAGE_ENGINE
sts_sync,
#endif
- 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO)
+ 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO))
) {
- thd->clear_error();
+ if (*error_num != ER_SPIDER_SYS_TABLE_VERSION_NUM)
+ {
+ thd->clear_error();
+ } else {
+ pthread_mutex_unlock(&share->crd_mutex);
+ pthread_mutex_unlock(&share->sts_mutex);
+ share->init_error = TRUE;
+ share->init_error_time = (time_t) time((time_t*) 0);
+ share->init = TRUE;
+ goto error_after_alloc_dbton_handler;
+ }
}
if (
(
!same_server_link ||
load_crd_at_startup
) &&
- spider_get_crd(share, spider->search_link_idx, tmp_time,
+ (*error_num = spider_get_crd(share, spider->search_link_idx, tmp_time,
spider, table, crd_interval, crd_mode,
#ifdef WITH_PARTITION_STORAGE_ENGINE
crd_sync,
#endif
- 1)
+ 1))
) {
- thd->clear_error();
+ if (*error_num != ER_SPIDER_SYS_TABLE_VERSION_NUM)
+ {
+ thd->clear_error();
+ } else {
+ pthread_mutex_unlock(&share->crd_mutex);
+ pthread_mutex_unlock(&share->sts_mutex);
+ share->init_error = TRUE;
+ share->init_error_time = (time_t) time((time_t*) 0);
+ share->init = TRUE;
+ goto error_after_alloc_dbton_handler;
+ }
}
pthread_mutex_unlock(&share->crd_mutex);
pthread_mutex_unlock(&share->sts_mutex);
@@ -5514,7 +5555,7 @@ SPIDER_SHARE *spider_get_share(
spider->dbton_handler[dbton_id] = NULL;
}
}
- goto error_but_no_delete;
+ goto error_after_alloc_conn_keys;
}
if (
@@ -5558,8 +5599,7 @@ SPIDER_SHARE *spider_get_share(
FALSE
);
}
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
spider->conns[roop_count]->error_mode &= spider->error_mode;
}
@@ -5574,8 +5614,7 @@ SPIDER_SHARE *spider_get_share(
if (!db)
{
*error_num = HA_ERR_OUT_OF_MEM;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
char *table_name = db + table_share->db.length + 1;
memcpy(db, table_share->db.str, table_share->db.length);
@@ -5587,13 +5626,11 @@ SPIDER_SHARE *spider_get_share(
ER_SPIDER_ALL_LINKS_FAILED_STR, MYF(0), db, table_name);
my_afree(db);
*error_num = ER_SPIDER_ALL_LINKS_FAILED_NUM;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
} else if (search_link_idx == -2)
{
*error_num = HA_ERR_OUT_OF_MEM;
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
spider->search_link_idx = search_link_idx;
@@ -5652,8 +5689,7 @@ SPIDER_SHARE *spider_get_share(
spider_init_error_table->init_error_msg, MYF(0));
pthread_mutex_unlock(&share->crd_mutex);
pthread_mutex_unlock(&share->sts_mutex);
- spider_free_share(share);
- goto error_but_no_delete;
+ goto error_after_alloc_dbton_handler;
}
}
@@ -5662,28 +5698,42 @@ SPIDER_SHARE *spider_get_share(
!same_server_link ||
load_sts_at_startup
) &&
- spider_get_sts(share, spider->search_link_idx,
+ (*error_num = spider_get_sts(share, spider->search_link_idx,
tmp_time, spider, sts_interval, sts_mode,
#ifdef WITH_PARTITION_STORAGE_ENGINE
sts_sync,
#endif
- 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO)
+ 1, HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO))
) {
- thd->clear_error();
+ if (*error_num != ER_SPIDER_SYS_TABLE_VERSION_NUM)
+ {
+ thd->clear_error();
+ } else {
+ pthread_mutex_unlock(&share->crd_mutex);
+ pthread_mutex_unlock(&share->sts_mutex);
+ goto error_after_alloc_dbton_handler;
+ }
}
if (
(
!same_server_link ||
load_crd_at_startup
) &&
- spider_get_crd(share, spider->search_link_idx,
+ (*error_num = spider_get_crd(share, spider->search_link_idx,
tmp_time, spider, table, crd_interval, crd_mode,
#ifdef WITH_PARTITION_STORAGE_ENGINE
crd_sync,
#endif
- 1)
+ 1))
) {
- thd->clear_error();
+ if (*error_num != ER_SPIDER_SYS_TABLE_VERSION_NUM)
+ {
+ thd->clear_error();
+ } else {
+ pthread_mutex_unlock(&share->crd_mutex);
+ pthread_mutex_unlock(&share->sts_mutex);
+ goto error_after_alloc_dbton_handler;
+ }
}
}
share->init_error = FALSE;
@@ -5696,6 +5746,22 @@ SPIDER_SHARE *spider_get_share(
DBUG_PRINT("info",("spider share=%p", share));
DBUG_RETURN(share);
+error_after_alloc_dbton_handler:
+ for (roop_count = 0; roop_count < (int) share->use_dbton_count; ++roop_count)
+ {
+ uint dbton_id = share->use_dbton_ids[roop_count];
+ if (spider->dbton_handler[dbton_id])
+ {
+ delete spider->dbton_handler[dbton_id];
+ spider->dbton_handler[dbton_id] = NULL;
+ }
+ }
+error_after_alloc_conn_keys:
+ spider_free(spider_current_trx, spider->conn_keys, MYF(0));
+ spider->conn_keys = NULL;
+ spider_free_share(share);
+ goto error_but_no_delete;
+
error_hash_insert:
spider_free_share_resource_only(share);
error_alloc_share:
@@ -5774,14 +5840,7 @@ int spider_free_share(
thd,
share->lgtm_tblhnd_share->table_name,
share->lgtm_tblhnd_share->table_name_length,
- &share->data_file_length,
- &share->max_data_file_length,
- &share->index_file_length,
- &share->records,
- &share->mean_rec_length,
- &share->check_time,
- &share->create_time,
- &share->update_time,
+ &share->stat,
FALSE
);
}
@@ -6157,21 +6216,7 @@ void spider_copy_sts_to_pt_share(
SPIDER_SHARE *share
) {
DBUG_ENTER("spider_copy_sts_to_pt_share");
- memcpy(&partition_share->data_file_length, &share->data_file_length,
- sizeof(ulonglong) * 4 + sizeof(ha_rows) +
- sizeof(ulong) + sizeof(time_t) * 3);
-/*
- partition_share->data_file_length = share->data_file_length;
- partition_share->max_data_file_length = share->max_data_file_length;
- partition_share->index_file_length = share->index_file_length;
- partition_share->auto_increment_value =
- share->lgtm_tblhnd_share->auto_increment_value;
- partition_share->records = share->records;
- partition_share->mean_rec_length = share->mean_rec_length;
- partition_share->check_time = share->check_time;
- partition_share->create_time = share->create_time;
- partition_share->update_time = share->update_time;
-*/
+ partition_share->stat = share->stat;
DBUG_VOID_RETURN;
}
@@ -6180,23 +6225,7 @@ void spider_copy_sts_to_share(
SPIDER_PARTITION_SHARE *partition_share
) {
DBUG_ENTER("spider_copy_sts_to_share");
- memcpy(&share->data_file_length, &partition_share->data_file_length,
- sizeof(ulonglong) * 4 + sizeof(ha_rows) +
- sizeof(ulong) + sizeof(time_t) * 3);
-/*
- share->data_file_length = partition_share->data_file_length;
- share->max_data_file_length = partition_share->max_data_file_length;
- share->index_file_length = partition_share->index_file_length;
- share->lgtm_tblhnd_share->auto_increment_value =
- partition_share->auto_increment_value;
- DBUG_PRINT("info",("spider auto_increment_value=%llu",
- share->lgtm_tblhnd_share->auto_increment_value));
- share->records = partition_share->records;
- share->mean_rec_length = partition_share->mean_rec_length;
- share->check_time = partition_share->check_time;
- share->create_time = partition_share->create_time;
- share->update_time = partition_share->update_time;
-*/
+ share->stat = partition_share->stat;
DBUG_VOID_RETURN;
}
@@ -6542,6 +6571,30 @@ handler* spider_create_handler(
MEM_ROOT *mem_root
) {
DBUG_ENTER("spider_create_handler");
+#ifndef WITHOUT_SPIDER_BG_SEARCH
+ SPIDER_THREAD *thread = &spider_table_sts_threads[0];
+ if (unlikely(thread->init_command))
+ {
+ THD *thd = current_thd;
+ pthread_cond_t *cond = thd->mysys_var->current_cond;
+ pthread_mutex_t *mutex = thd->mysys_var->current_mutex;
+ /* wait for finishing init_command */
+ pthread_mutex_lock(&thread->mutex);
+ if (unlikely(thread->init_command))
+ {
+ thd->mysys_var->current_cond = &thread->sync_cond;
+ thd->mysys_var->current_mutex = &thread->mutex;
+ pthread_cond_wait(&thread->sync_cond, &thread->mutex);
+ }
+ pthread_mutex_unlock(&thread->mutex);
+ thd->mysys_var->current_cond = cond;
+ thd->mysys_var->current_mutex = mutex;
+ if (thd->killed)
+ {
+ DBUG_RETURN(NULL);
+ }
+ }
+#endif
DBUG_RETURN(new (mem_root) ha_spider(hton, table));
}
@@ -6953,6 +7006,10 @@ int spider_db_init(
GetProcAddress(current_module, "my_defaults_extra_file");
spd_defaults_file = (const char **)
GetProcAddress(current_module, "my_defaults_file");
+ spd_mysqld_unix_port = (const char **)
+ GetProcAddress(current_module, "?mysqld_unix_port@@3PADA");
+ spd_mysqld_port = (uint *)
+ GetProcAddress(current_module, "?mysqld_port@@3IA");
spd_abort_loop = (bool volatile *)
GetProcAddress(current_module, "?abort_loop@@3_NC");
spd_tz_system = *(Time_zone **)
@@ -6961,6 +7018,13 @@ int spider_db_init(
#else
GetProcAddress(current_module, "?my_tz_SYSTEM@@3PAVTime_zone@@A");
#endif
+ spd_mysqld_server_started = (int *)
+ GetProcAddress(current_module, "?mysqld_server_started@@3HA");
+ spd_LOCK_server_started = (pthread_mutex_t *)
+ GetProcAddress(current_module,
+ "?LOCK_server_started@@3Ust_mysql_mutex@@A");
+ spd_COND_server_started = (pthread_cond_t *)
+ GetProcAddress(current_module, "?COND_server_started@@3Ust_mysql_cond@@A");
#else
#ifndef SPIDER_HAS_NEXT_THREAD_ID
spd_db_att_thread_id = &thread_id;
@@ -6979,8 +7043,13 @@ int spider_db_init(
spd_charset_utf8_bin = &my_charset_utf8_bin;
spd_defaults_extra_file = &my_defaults_extra_file;
spd_defaults_file = &my_defaults_file;
+ spd_mysqld_unix_port = (const char **) &mysqld_unix_port;
+ spd_mysqld_port = &mysqld_port;
spd_abort_loop = &abort_loop;
spd_tz_system = my_tz_SYSTEM;
+ spd_mysqld_server_started = &mysqld_server_started;
+ spd_LOCK_server_started = &LOCK_server_started;
+ spd_COND_server_started = &COND_server_started;
#endif
#ifdef HAVE_PSI_INTERFACE
@@ -7266,6 +7335,7 @@ int spider_db_init(
NullS))
)
goto error_alloc_mon_mutxes;
+ spider_table_sts_threads[0].init_command = TRUE;
for (roop_count = 0;
roop_count < (int) spider_param_table_sts_thread_count();
@@ -7317,7 +7387,6 @@ int spider_db_init(
}
}
}
-
DBUG_RETURN(0);
#ifndef WITHOUT_SPIDER_BG_SEARCH
@@ -7618,10 +7687,8 @@ int spider_get_sts(
if (
sts_sync == 0
) {
-#endif
/* get */
get_type = 1;
-#ifdef WITH_PARTITION_STORAGE_ENGINE
} else if (
!share->partition_share->sts_init
) {
@@ -7660,14 +7727,7 @@ int spider_get_sts(
current_thd,
share->lgtm_tblhnd_share->table_name,
share->lgtm_tblhnd_share->table_name_length,
- &share->data_file_length,
- &share->max_data_file_length,
- &share->index_file_length,
- &share->records,
- &share->mean_rec_length,
- &share->check_time,
- &share->create_time,
- &share->update_time,
+ &share->stat,
FALSE
);
if (
@@ -7775,10 +7835,8 @@ int spider_get_crd(
if (
crd_sync == 0
) {
-#endif
/* get */
get_type = 1;
-#ifdef WITH_PARTITION_STORAGE_ENGINE
} else if (
!share->partition_share->crd_init
) {
@@ -8398,16 +8456,9 @@ void spider_free_tmp_dbton_handler(
TABLE_LIST *spider_get_parent_table_list(
ha_spider *spider
) {
- TABLE *table = spider->get_table();
- TABLE_LIST *table_list = table->pos_in_table_list;
+ TABLE *table = spider->get_top_table();
DBUG_ENTER("spider_get_parent_table_list");
- if (table_list)
- {
- while (table_list->parent_l)
- table_list = table_list->parent_l;
- DBUG_RETURN(table_list);
- }
- DBUG_RETURN(NULL);
+ DBUG_RETURN(table->pos_in_table_list);
}
List<Index_hint> *spider_get_index_hints(
@@ -8841,6 +8892,13 @@ bool spider_check_direct_order_limit(
break;
}
}
+ if (!spider_all_part_in_order((ORDER *) select_lex->group_list.first,
+ spider->get_table()))
+ {
+ DBUG_PRINT("info",("spider FALSE by group condition"));
+ first_check = FALSE;
+ spider->result_list.direct_distinct = FALSE;
+ }
#endif
}
@@ -8906,6 +8964,98 @@ bool spider_check_direct_order_limit(
DBUG_RETURN(FALSE);
}
+#ifdef HANDLER_HAS_DIRECT_AGGREGATE
+bool spider_all_part_in_order(
+ ORDER *order,
+ TABLE *table
+) {
+ TABLE_LIST *parent;
+ partition_info *part_info;
+ Field **part_fields;
+ ORDER *ptr;
+ Item *item;
+ Item_field *item_field;
+ DBUG_ENTER("spider_all_part_in_order");
+ while (TRUE)
+ {
+ DBUG_PRINT("info", ("spider table_name = %s", table->s->db.str));
+ DBUG_PRINT("info",("spider part_info=%p", table->part_info));
+ if ((part_info = table->part_info))
+ {
+ for (part_fields = part_info->full_part_field_array;
+ *part_fields; ++part_fields)
+ {
+ DBUG_PRINT("info", ("spider part_field = %s",
+ SPIDER_field_name_str(*part_fields)));
+ for (ptr = order; ptr; ptr = ptr->next)
+ {
+ item = *ptr->item;
+ if (item->type() != Item::FIELD_ITEM)
+ {
+ continue;
+ }
+ item_field = (Item_field *) item;
+ Field *field = item_field->field;
+ if (!field)
+ {
+ continue;
+ }
+ DBUG_PRINT("info", ("spider field_name = %s.%s",
+ field->table->s->db.str, SPIDER_field_name_str(field)));
+ if (*part_fields == spider_field_exchange(table->file, field))
+ {
+ break;
+ }
+ }
+ if (!ptr)
+ {
+ DBUG_RETURN(FALSE);
+ }
+ }
+ }
+ if (!(parent = table->pos_in_table_list->parent_l))
+ {
+ break;
+ }
+ table = parent->table;
+ }
+ DBUG_RETURN(TRUE);
+}
+
+Field *spider_field_exchange(
+ handler *handler,
+ Field *field
+) {
+ DBUG_ENTER("spider_field_exchange");
+#ifdef HA_CAN_BULK_ACCESS
+ if (handler->is_bulk_access_clone)
+ {
+ handler = handler->pt_clone_source_handler;
+ }
+#endif
+ DBUG_PRINT("info",("spider in field=%p", field));
+ DBUG_PRINT("info",("spider in field->table=%p", field->table));
+#ifdef HANDLER_HAS_TOP_TABLE_FIELDS
+ if (handler->set_top_table_fields)
+ {
+ DBUG_PRINT("info",("spider top_table=%p", handler->top_table));
+ if (field->table != handler->top_table)
+ DBUG_RETURN(NULL);
+ if (!(field = handler->top_table_field[field->field_index]))
+ DBUG_RETURN(NULL);
+ } else {
+#endif
+ DBUG_PRINT("info",("spider table=%p", handler->get_table()));
+ if (field->table != handler->get_table())
+ DBUG_RETURN(NULL);
+#ifdef HANDLER_HAS_TOP_TABLE_FIELDS
+ }
+#endif
+ DBUG_PRINT("info",("spider out field=%p", field));
+ DBUG_RETURN(field);
+}
+#endif
+
int spider_set_direct_limit_offset(
ha_spider *spider
) {
@@ -9200,7 +9350,9 @@ int spider_discover_table_structure(
str.q_append(share->table_name.str, share->table_name.length);
str.q_append(SPIDER_SQL_LCL_NAME_QUOTE_STR, SPIDER_SQL_LCL_NAME_QUOTE_LEN);
str.q_append(SPIDER_SQL_OPEN_PAREN_STR, SPIDER_SQL_OPEN_PAREN_LEN);
+#ifdef WITH_PARTITION_STORAGE_ENGINE
str_len = str.length();
+#endif
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
my_hash_value_type hash_value = my_calc_hash(&spider_open_tables,
(uchar*) table_name, table_name_length);
@@ -9875,6 +10027,53 @@ void *spider_table_bg_sts_action(
trx->thd = thd;
/* init end */
+ if (thread->init_command)
+ {
+ uint i = 0;
+ tmp_disable_binlog(thd);
+ thd->security_ctx->skip_grants();
+ thd->client_capabilities |= CLIENT_MULTI_RESULTS;
+ if (!(*spd_mysqld_server_started) && !thd->killed)
+ {
+ pthread_mutex_lock(spd_LOCK_server_started);
+ thd->mysys_var->current_cond = spd_COND_server_started;
+ thd->mysys_var->current_mutex = spd_LOCK_server_started;
+ if (!(*spd_mysqld_server_started) && !thd->killed)
+ {
+ pthread_cond_wait(spd_COND_server_started, spd_LOCK_server_started);
+ }
+ pthread_mutex_unlock(spd_LOCK_server_started);
+ thd->mysys_var->current_cond = &thread->cond;
+ thd->mysys_var->current_mutex = &thread->mutex;
+ }
+ while (spider_init_queries[i].length && !thd->killed)
+ {
+ dispatch_command(COM_QUERY, thd, spider_init_queries[i].str,
+ (uint) spider_init_queries[i].length, FALSE, FALSE);
+ if (unlikely(thd->is_error()))
+ {
+ fprintf(stderr, "[ERROR] %s\n", spider_stmt_da_message(thd));
+ thd->clear_error();
+ break;
+ }
+ ++i;
+ }
+ thd->mysys_var->current_cond = &thread->cond;
+ thd->mysys_var->current_mutex = &thread->mutex;
+ thd->client_capabilities -= CLIENT_MULTI_RESULTS;
+ reenable_binlog(thd);
+ thread->init_command = FALSE;
+ pthread_cond_broadcast(&thread->sync_cond);
+ }
+ if (thd->killed)
+ {
+ thread->killed = TRUE;
+ }
+ if (thd->killed)
+ {
+ thread->killed = TRUE;
+ }
+
while (TRUE)
{
DBUG_PRINT("info",("spider bg sts loop start"));
diff --git a/storage/spider/spd_table.h b/storage/spider/spd_table.h
index 362ebf263ca..063f459ae8d 100644
--- a/storage/spider/spd_table.h
+++ b/storage/spider/spd_table.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2017 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -179,6 +180,95 @@ typedef struct st_spider_param_string_parse
DBUG_RETURN(error_num);
}
+ inline int get_next_parameter_head(char *st, char **nx)
+ {
+ DBUG_ENTER("get_next_parameter_head");
+ char *sq = strchr(st, '\'');
+ char *dq = strchr(st, '"');
+ if (!sq && !dq)
+ {
+ DBUG_RETURN(print_param_error());
+ }
+
+ if (dq && (!sq || sq > dq))
+ {
+ while (1)
+ {
+ ++dq;
+ if (*dq == '\\')
+ {
+ ++dq;
+ }
+ else if (*dq == '"')
+ {
+ break;
+ }
+ else if (*dq == '\0')
+ {
+ DBUG_RETURN(print_param_error());
+ }
+ }
+ while (1)
+ {
+ ++dq;
+ if (*dq == '\0')
+ {
+ *nx = dq;
+ break;
+ }
+ else if (*dq == ',')
+ {
+ *dq = '\0';
+ *nx = dq + 1;
+ break;
+ }
+ else if (*dq != ' ' && *dq != '\r' && *dq != '\n' && *dq != '\t')
+ {
+ DBUG_RETURN(print_param_error());
+ }
+ }
+ }
+ else /* sq && (!dq || sq <= dq) */
+ {
+ while (1)
+ {
+ ++sq;
+ if (*sq == '\\')
+ {
+ ++sq;
+ }
+ else if (*sq == '\'')
+ {
+ break;
+ }
+ else if (*sq == '\0')
+ {
+ DBUG_RETURN(print_param_error());
+ }
+ }
+ while (1)
+ {
+ ++sq;
+ if (*sq == '\0')
+ {
+ *nx = sq;
+ break;
+ }
+ else if (*sq == ',')
+ {
+ *sq = '\0';
+ *nx = sq + 1;
+ break;
+ }
+ else if (*sq != ' ' && *sq != '\r' && *sq != '\n' && *sq != '\t')
+ {
+ DBUG_RETURN(print_param_error());
+ }
+ }
+ }
+ DBUG_RETURN(0);
+ }
+
/**
Restore the current parameter's input delimiter characters in the
parameter string. They were NULLed during parameter parsing.
@@ -638,6 +728,18 @@ bool spider_check_direct_order_limit(
ha_spider *spider
);
+#ifdef HANDLER_HAS_DIRECT_AGGREGATE
+bool spider_all_part_in_order(
+ ORDER *order,
+ TABLE *table
+);
+
+Field *spider_field_exchange(
+ handler *handler,
+ Field *field
+);
+#endif
+
int spider_set_direct_limit_offset(
ha_spider* spider
);
diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc
index bb9f11793cb..4f8296f1d01 100644
--- a/storage/spider/spd_trx.cc
+++ b/storage/spider/spd_trx.cc
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2018 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -1667,6 +1668,32 @@ int spider_check_and_set_sql_log_off(
DBUG_RETURN(0);
}
+int spider_check_and_set_wait_timeout(
+ THD *thd,
+ SPIDER_CONN *conn,
+ int *need_mon
+) {
+ int wait_timeout;
+ DBUG_ENTER("spider_check_and_set_wait_timeout");
+
+ wait_timeout = spider_param_wait_timeout(thd);
+ if (wait_timeout > 0)
+ {
+ spider_conn_queue_wait_timeout(conn, wait_timeout);
+ }
+ DBUG_RETURN(0);
+}
+
+int spider_check_and_set_sql_mode(
+ THD *thd,
+ SPIDER_CONN *conn,
+ int *need_mon
+) {
+ DBUG_ENTER("spider_check_and_set_sql_mode");
+ spider_conn_queue_sql_mode(conn, thd->variables.sql_mode);
+ DBUG_RETURN(0);
+}
+
int spider_check_and_set_time_zone(
THD *thd,
SPIDER_CONN *conn,
@@ -1690,8 +1717,9 @@ int spider_check_and_set_time_zone(
DBUG_RETURN(0);
}
-int spider_xa_lock(
- XID_STATE *xid_state
+static int spider_xa_lock(
+ XID_STATE *xid_state,
+ XID *xid
) {
THD *thd = current_thd;
int error_num;
@@ -1709,7 +1737,7 @@ int spider_xa_lock(
#endif
old_proc_info = thd_proc_info(thd, "Locking xid by Spider");
#ifdef SPIDER_XID_USES_xid_cache_iterate
- if (xid_cache_insert(thd, xid_state))
+ if (xid_cache_insert(thd, xid_state, xid))
{
error_num = (spider_stmt_da_sql_errno(thd) == ER_XAER_DUPID ?
ER_SPIDER_XA_LOCKED_NUM : HA_ERR_OUT_OF_MEM);
@@ -1774,7 +1802,7 @@ error:
DBUG_RETURN(error_num);
}
-int spider_xa_unlock(
+static int spider_xa_unlock(
XID_STATE *xid_state
) {
THD *thd = current_thd;
@@ -1866,6 +1894,11 @@ int spider_internal_start_trx(
if (
(error_num = spider_check_and_set_sql_log_off(thd, conn,
&spider->need_mons[link_idx])) ||
+ (error_num = spider_check_and_set_wait_timeout(thd, conn,
+ &spider->need_mons[link_idx])) ||
+ (spider_param_sync_sql_mode(thd) &&
+ (error_num = spider_check_and_set_sql_mode(thd, conn,
+ &spider->need_mons[link_idx]))) ||
(sync_autocommit &&
(error_num = spider_check_and_set_autocommit(thd, conn,
&spider->need_mons[link_idx])))
@@ -1891,7 +1924,7 @@ int spider_internal_start_trx(
if (!trx->trx_start)
{
if (
- thd->transaction.xid_state.xa_state == XA_ACTIVE &&
+ thd->transaction.xid_state.is_explicit_XA() &&
spider_param_support_xa()
) {
trx->trx_xa = TRUE;
@@ -1929,12 +1962,10 @@ int spider_internal_start_trx(
thd->server_id));
#endif
- trx->internal_xid_state.xa_state = XA_ACTIVE;
- trx->internal_xid_state.xid.set(&trx->xid);
#ifdef SPIDER_XID_STATE_HAS_in_thd
trx->internal_xid_state.in_thd = 1;
#endif
- if ((error_num = spider_xa_lock(&trx->internal_xid_state)))
+ if ((error_num = spider_xa_lock(&trx->internal_xid_state, &trx->xid)))
{
if (error_num == ER_SPIDER_XA_LOCKED_NUM)
my_message(error_num, ER_SPIDER_XA_LOCKED_STR, MYF(0));
@@ -2197,8 +2228,10 @@ int spider_internal_xa_commit(
spider_close_sys_table(thd, table_xa, &open_tables_backup, TRUE);
table_xa_opened = FALSE;
}
- spider_xa_unlock(&trx->internal_xid_state);
- trx->internal_xid_state.xa_state = XA_NOTR;
+ if (trx->internal_xa)
+ {
+ spider_xa_unlock(&trx->internal_xid_state);
+ }
DBUG_RETURN(0);
error:
@@ -2208,8 +2241,10 @@ error:
spider_close_sys_table(thd, table_xa_member, &open_tables_backup, TRUE);
error_in_commit:
error_open_table:
- spider_xa_unlock(&trx->internal_xid_state);
- trx->internal_xid_state.xa_state = XA_NOTR;
+ if (trx->internal_xa)
+ {
+ spider_xa_unlock(&trx->internal_xid_state);
+ }
DBUG_RETURN(error_num);
}
@@ -2435,8 +2470,10 @@ int spider_internal_xa_rollback(
spider_close_sys_table(thd, table_xa, &open_tables_backup, TRUE);
table_xa_opened = FALSE;
}
- spider_xa_unlock(&trx->internal_xid_state);
- trx->internal_xid_state.xa_state = XA_NOTR;
+ if (trx->internal_xa)
+ {
+ spider_xa_unlock(&trx->internal_xid_state);
+ }
DBUG_RETURN(0);
error:
@@ -2446,8 +2483,10 @@ error:
spider_close_sys_table(thd, table_xa_member, &open_tables_backup, TRUE);
error_in_rollback:
error_open_table:
- spider_xa_unlock(&trx->internal_xid_state);
- trx->internal_xid_state.xa_state = XA_NOTR;
+ if (trx->internal_xa)
+ {
+ spider_xa_unlock(&trx->internal_xid_state);
+ }
DBUG_RETURN(error_num);
}
@@ -2616,8 +2655,6 @@ int spider_internal_xa_prepare(
spider_close_sys_table(thd, table_xa, &open_tables_backup, TRUE);
table_xa_opened = FALSE;
}
- if (internal_xa)
- trx->internal_xid_state.xa_state = XA_PREPARED;
DBUG_RETURN(0);
error:
diff --git a/storage/spider/spd_trx.h b/storage/spider/spd_trx.h
index dec1db4d863..3883ec49723 100644
--- a/storage/spider/spd_trx.h
+++ b/storage/spider/spd_trx.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008-2014 Kentoku Shiba
+/* Copyright (C) 2008-2019 Kentoku Shiba
+ Copyright (C) 2019 MariaDB corp
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
@@ -99,18 +100,22 @@ int spider_check_and_set_sql_log_off(
int *need_mon
);
-int spider_check_and_set_time_zone(
+int spider_check_and_set_wait_timeout(
THD *thd,
SPIDER_CONN *conn,
int *need_mon
);
-int spider_xa_lock(
- XID_STATE *xid_state
+int spider_check_and_set_sql_mode(
+ THD *thd,
+ SPIDER_CONN *conn,
+ int *need_mon
);
-int spider_xa_unlock(
- XID_STATE *xid_state
+int spider_check_and_set_time_zone(
+ THD *thd,
+ SPIDER_CONN *conn,
+ int *need_mon
);
int spider_start_internal_consistent_snapshot(
diff --git a/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake b/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
index 62000959b1f..c82521db3e9 100644
--- a/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
+++ b/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
@@ -71,7 +71,6 @@ prepend_cflags_if_supported(
-Wno-error=tautological-constant-out-of-range-compare
-Wno-error=maybe-uninitialized
-Wno-error=extern-c-compat
- -fno-rtti
-fno-exceptions
-Wno-error=nonnull-compare
)
diff --git a/storage/tokudb/PerconaFT/portability/toku_crash.cc b/storage/tokudb/PerconaFT/portability/toku_crash.cc
index 0af85342a99..297cc29d9ca 100644
--- a/storage/tokudb/PerconaFT/portability/toku_crash.cc
+++ b/storage/tokudb/PerconaFT/portability/toku_crash.cc
@@ -70,7 +70,7 @@ run_gdb(pid_t parent_pid, const char *gdb_path) {
"-ex", "thread apply all bt",
"-ex", "thread apply all bt full",
exe_buf, pid_buf,
- NULL);
+ (char*) NULL);
}
static void
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc
index e529c530855..f706ab86fc9 100644
--- a/storage/tokudb/ha_tokudb.cc
+++ b/storage/tokudb/ha_tokudb.cc
@@ -3715,7 +3715,7 @@ static bool do_unique_checks_fn(THD *thd) {
#endif // defined(TOKU_INCLUDE_RFR) && TOKU_INCLUDE_RFR
-int ha_tokudb::do_uniqueness_checks(uchar* record, DB_TXN* txn, THD* thd) {
+int ha_tokudb::do_uniqueness_checks(const uchar* record, DB_TXN* txn, THD* thd) {
int error = 0;
//
// first do uniqueness checks
@@ -3758,7 +3758,7 @@ cleanup:
return error;
}
-void ha_tokudb::test_row_packing(uchar* record, DBT* pk_key, DBT* pk_val) {
+void ha_tokudb::test_row_packing(const uchar* record, DBT* pk_key, DBT* pk_val) {
int error;
DBT row, key;
//
@@ -3999,7 +3999,7 @@ out:
// 0 on success
// error otherwise
//
-int ha_tokudb::write_row(uchar * record) {
+int ha_tokudb::write_row(const uchar * record) {
TOKUDB_HANDLER_DBUG_ENTER("%p", record);
DBT row, prim_key;
@@ -5223,10 +5223,10 @@ static int smart_dbt_bf_callback(
info->key_to_compare);
}
-enum icp_result ha_tokudb::toku_handler_index_cond_check(
+check_result_t ha_tokudb::toku_handler_index_cond_check(
Item* pushed_idx_cond) {
- enum icp_result res;
+ check_result_t res;
if (end_range) {
int cmp;
#ifdef MARIADB_BASE_VERSION
@@ -5235,10 +5235,10 @@ enum icp_result ha_tokudb::toku_handler_index_cond_check(
cmp = compare_key_icp(end_range);
#endif
if (cmp > 0) {
- return ICP_OUT_OF_RANGE;
+ return CHECK_OUT_OF_RANGE;
}
}
- res = pushed_idx_cond->val_int() ? ICP_MATCH : ICP_NO_MATCH;
+ res = pushed_idx_cond->val_int() ? CHECK_POS : CHECK_NEG;
return res;
}
@@ -5278,19 +5278,19 @@ int ha_tokudb::fill_range_query_buf(
if (toku_pushed_idx_cond &&
(tokudb_active_index == toku_pushed_idx_cond_keyno)) {
unpack_key(buf, key, tokudb_active_index);
- enum icp_result result =
+ check_result_t result =
toku_handler_index_cond_check(toku_pushed_idx_cond);
// If we have reason to stop, we set icp_went_out_of_range and get out
// otherwise, if we simply see that the current key is no match,
// we tell the cursor to continue and don't store
// the key locally
- if (result == ICP_OUT_OF_RANGE || thd_kill_level(thd)) {
+ if (result == CHECK_OUT_OF_RANGE || thd_kill_level(thd)) {
icp_went_out_of_range = true;
error = 0;
DEBUG_SYNC(ha_thd(), "tokudb_icp_asc_scan_out_of_range");
goto cleanup;
- } else if (result == ICP_NO_MATCH) {
+ } else if (result == CHECK_NEG) {
// Optimizer change for MyRocks also benefits us here in TokuDB as
// opt_range.cc QUICK_SELECT::get_next now sets end_range during
// descending scan. We should not ever hit this condition, but
@@ -6942,7 +6942,7 @@ void ha_tokudb::trace_create_table_info(TABLE* form) {
field->flags);
}
for (i = 0; i < form->s->keys; i++) {
- KEY *key = &form->s->key_info[i];
+ KEY *key = &form->key_info[i];
TOKUDB_HANDLER_TRACE(
"key:%d:%s:%d",
i,
@@ -7070,7 +7070,7 @@ int ha_tokudb::create_secondary_dictionary(
sprintf(dict_name, "key-%s", key_info->name.str);
make_name(newname, newname_len, name, dict_name);
- prim_key = (hpk) ? NULL : &form->s->key_info[primary_key];
+ prim_key = (hpk) ? NULL : &form->key_info[primary_key];
//
// setup the row descriptor
@@ -7182,7 +7182,7 @@ int ha_tokudb::create_main_dictionary(
make_name(newname, newname_len, name, "main");
- prim_key = (hpk) ? NULL : &form->s->key_info[primary_key];
+ prim_key = (hpk) ? NULL : &form->key_info[primary_key];
//
// setup the row descriptor
@@ -7447,7 +7447,7 @@ int ha_tokudb::create(
error = write_key_name_to_status(
status_block,
- form->s->key_info[i].name.str,
+ form->key_info[i].name.str,
txn);
if (error) {
goto cleanup;
@@ -7793,13 +7793,18 @@ double ha_tokudb::scan_time() {
DBUG_RETURN(ret_val);
}
+bool ha_tokudb::is_clustering_key(uint index)
+{
+ return index == primary_key || key_is_clustering(&table->key_info[index]);
+}
+
double ha_tokudb::keyread_time(uint index, uint ranges, ha_rows rows)
{
TOKUDB_HANDLER_DBUG_ENTER("%u %u %" PRIu64, index, ranges, (uint64_t) rows);
- double ret_val;
- if (index == primary_key || key_is_clustering(&table->key_info[index])) {
- ret_val = read_time(index, ranges, rows);
- DBUG_RETURN(ret_val);
+ double cost;
+ if (index == primary_key || is_clustering_key(index)) {
+ cost = read_time(index, ranges, rows);
+ DBUG_RETURN(cost);
}
/*
It is assumed that we will read trough the whole key range and that all
@@ -7809,11 +7814,8 @@ double ha_tokudb::keyread_time(uint index, uint ranges, ha_rows rows)
blocks read. This model does not take into account clustered indexes -
engines that support that (e.g. InnoDB) may want to overwrite this method.
*/
- double keys_per_block= (stats.block_size/2.0/
- (table->key_info[index].key_length +
- ref_length) + 1);
- ret_val = (rows + keys_per_block - 1)/ keys_per_block;
- TOKUDB_HANDLER_DBUG_RETURN_DOUBLE(ret_val);
+ cost= handler::keyread_time(index, ranges, rows);
+ TOKUDB_HANDLER_DBUG_RETURN_DOUBLE(cost);
}
//
@@ -8175,7 +8177,7 @@ int ha_tokudb::tokudb_add_index(
for (uint i = 0; i < num_of_keys; i++) {
for (uint j = 0; j < table_arg->s->keys; j++) {
if (strcmp(key_info[i].name.str,
- table_arg->s->key_info[j].name.str) == 0) {
+ table_arg->key_info[j].name.str) == 0) {
error = HA_ERR_WRONG_COMMAND;
goto cleanup;
}
diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h
index 001df43defa..d74c99a5f8b 100644
--- a/storage/tokudb/ha_tokudb.h
+++ b/storage/tokudb/ha_tokudb.h
@@ -704,11 +704,11 @@ private:
void trace_create_table_info(TABLE* form);
int is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_info, int lock_flags);
int is_val_unique(bool* is_unique, const uchar* record, KEY* key_info, uint dict_index, DB_TXN* txn);
- int do_uniqueness_checks(uchar* record, DB_TXN* txn, THD* thd);
+ int do_uniqueness_checks(const uchar* record, DB_TXN* txn, THD* thd);
void set_main_dict_put_flags(THD* thd, bool opt_eligible, uint32_t* put_flags);
int insert_row_to_main_dictionary(DBT* pk_key, DBT* pk_val, DB_TXN* txn);
int insert_rows_to_dictionaries_mult(DBT* pk_key, DBT* pk_val, DB_TXN* txn, THD* thd);
- void test_row_packing(uchar* record, DBT* pk_key, DBT* pk_val);
+ void test_row_packing(const uchar* record, DBT* pk_key, DBT* pk_val);
uint32_t fill_row_mutator(
uchar* buf,
uint32_t* dropped_columns,
@@ -786,7 +786,7 @@ public:
int rename_table(const char *from, const char *to);
int optimize(THD * thd, HA_CHECK_OPT * check_opt);
int analyze(THD * thd, HA_CHECK_OPT * check_opt);
- int write_row(uchar * buf);
+ int write_row(const uchar * buf);
int update_row(const uchar * old_data, const uchar * new_data);
int delete_row(const uchar * buf);
#if MYSQL_VERSION_ID >= 100000
@@ -872,6 +872,7 @@ public:
bool primary_key_is_clustered() {
return true;
}
+ bool is_clustering_key(uint index);
int cmp_ref(const uchar * ref1, const uchar * ref2);
bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes);
@@ -916,6 +917,9 @@ public:
Item* idx_cond_push(uint keyno, class Item* idx_cond);
void cancel_pushed_idx_cond();
+ bool can_convert_varstring(const Field_varstring* field,
+ const Column_definition&new_type) const;
+
#if defined(TOKU_INCLUDE_ALTER_56) && TOKU_INCLUDE_ALTER_56
public:
enum_alter_inplace_result check_if_supported_inplace_alter(TABLE *altered_table, Alter_inplace_info *ha_alter_info);
@@ -1023,7 +1027,7 @@ private:
int get_next(uchar* buf, int direction, DBT* key_to_compare, bool do_key_read);
int read_data_from_range_query_buff(uchar* buf, bool need_val, bool do_key_read);
// for ICP, only in MariaDB and MySQL 5.6
- enum icp_result toku_handler_index_cond_check(Item* pushed_idx_cond);
+ check_result_t toku_handler_index_cond_check(Item* pushed_idx_cond);
void invalidate_bulk_fetch();
void invalidate_icp();
int delete_all_rows_internal();
diff --git a/storage/tokudb/ha_tokudb_alter_56.cc b/storage/tokudb/ha_tokudb_alter_56.cc
index 2bcc5dee127..4bdf2cf7bda 100644
--- a/storage/tokudb/ha_tokudb_alter_56.cc
+++ b/storage/tokudb/ha_tokudb_alter_56.cc
@@ -465,10 +465,10 @@ enum_alter_inplace_result ha_tokudb::check_if_supported_inplace_alter(
result = HA_ALTER_INPLACE_EXCLUSIVE_LOCK;
}
} else if ((ctx->handler_flags &
- ALTER_COLUMN_EQUAL_PACK_LENGTH) &&
+ ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE) &&
only_flags(
ctx->handler_flags,
- ALTER_COLUMN_EQUAL_PACK_LENGTH |
+ ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE |
ALTER_COLUMN_DEFAULT) &&
table->s->fields == altered_table->s->fields &&
find_changed_fields(
@@ -1180,6 +1180,18 @@ static bool change_varchar_length_is_supported(Field* old_field,
return true;
}
+bool ha_tokudb::can_convert_varstring(const Field_varstring* field,
+ const Column_definition& new_type) const {
+ if (new_type.length < field->field_length ||
+ new_type.char_length < field->char_length() ||
+ !new_type.compression_method() != !field->compression_method() ||
+ new_type.type_handler() != field->type_handler()) {
+ return false;
+ }
+
+ return true;
+}
+
// Return true if all changed field lengths can be changed inplace, otherwise
// return false
static bool change_length_is_supported(TABLE* table,
@@ -1606,7 +1618,7 @@ int ha_tokudb::new_row_descriptor(TABLE* altered_table,
} else {
KEY* prim_key =
hidden_primary_key ? NULL :
- &altered_table->s->key_info[primary_key];
+ &altered_table->key_info[primary_key];
if (idx == primary_key) {
row_descriptor->size = create_main_key_descriptor(
(uchar*)row_descriptor->data,
diff --git a/storage/tokudb/ha_tokudb_update.cc b/storage/tokudb/ha_tokudb_update.cc
index bb59d112680..fec0a42e063 100644
--- a/storage/tokudb/ha_tokudb_update.cc
+++ b/storage/tokudb/ha_tokudb_update.cc
@@ -451,7 +451,7 @@ static bool check_all_update_expressions(
static bool full_field_in_key(TABLE* table, Field* field) {
assert_always(table->s->primary_key < table->s->keys);
- KEY* key = &table->s->key_info[table->s->primary_key];
+ KEY* key = &table->key_info[table->s->primary_key];
for (uint i = 0; i < key->user_defined_key_parts; i++) {
KEY_PART_INFO* key_part = &key->key_part[i];
if (strcmp(field->field_name.str, key_part->field->field_name.str) == 0) {
@@ -517,7 +517,7 @@ static bool check_point_update(Item* conds, TABLE* table) {
MY_BITMAP pk_fields;
if (bitmap_init(&pk_fields, NULL, table->s->fields, FALSE)) // 1 -> failure
return false;
- KEY *key = &table->s->key_info[table->s->primary_key];
+ KEY *key = &table->key_info[table->s->primary_key];
for (uint i = 0; i < key->user_defined_key_parts; i++)
bitmap_set_bit(&pk_fields, key->key_part[i].field->field_index);
@@ -555,7 +555,7 @@ static bool check_point_update(Item* conds, TABLE* table) {
static bool clustering_keys_exist(TABLE *table) {
for (uint keynr = 0; keynr < table->s->keys; keynr++) {
if (keynr != table->s->primary_key &&
- key_is_clustering(&table->s->key_info[keynr]))
+ key_is_clustering(&table->key_info[keynr]))
return true;
}
return false;
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc
index 81355ea20ff..6002a3efd88 100644
--- a/storage/tokudb/hatoku_hton.cc
+++ b/storage/tokudb/hatoku_hton.cc
@@ -26,6 +26,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
#include "hatoku_hton.h"
#include "PerconaFT/src/ydb.h"
+#include <mutex>
#define TOKU_METADB_NAME "tokudb_meta"
@@ -239,6 +240,7 @@ tokudb::thread::rwlock_t tokudb_hton_initialized_lock;
static SHOW_VAR *toku_global_status_variables = NULL;
static uint64_t toku_global_status_max_rows;
static TOKU_ENGINE_STATUS_ROW_S* toku_global_status_rows = NULL;
+static std::mutex toku_global_status_rows_mutex;
static void handle_ydb_error(int error) {
switch (error) {
@@ -1902,6 +1904,7 @@ static int show_tokudb_vars(TOKUDB_UNUSED(THD* thd),
const int panic_string_len = 1024;
char panic_string[panic_string_len] = {'\0'};
fs_redzone_state redzone_state;
+ const std::lock_guard<std::mutex> lock(toku_global_status_rows_mutex);
uint64_t num_rows;
error = db_env->get_engine_status(
diff --git a/storage/tokudb/man/tokuft_logprint.1 b/storage/tokudb/man/tokuft_logprint.1
index 0a9ff539b73..c97f7e19f69 100644
--- a/storage/tokudb/man/tokuft_logprint.1
+++ b/storage/tokudb/man/tokuft_logprint.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBTOKUFT_LOGPRINT\FR" "1" "29 March 2019" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBTOKUFT_LOGPRINT\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/storage/tokudb/man/tokuftdump.1 b/storage/tokudb/man/tokuftdump.1
index 024b16ba631..a9c900e0045 100644
--- a/storage/tokudb/man/tokuftdump.1
+++ b/storage/tokudb/man/tokuftdump.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBTOKUFTDUMP\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
+.TH "\FBTOKUFTDUMP\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug28430.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug28430.result
index c7450a1b9c0..aea5bab7cf3 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug28430.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug28430.result
@@ -51,6 +51,10 @@ DELETE FROM test.regular_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE PROCEDURE test.proc_bykey()
BEGIN
DECLARE ins_count INT DEFAULT 1000;
@@ -72,6 +76,10 @@ DELETE FROM test.bykey_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CREATE PROCEDURE test.proc_byrange()
BEGIN
DECLARE ins_count INT DEFAULT 1000;
@@ -93,6 +101,10 @@ DELETE FROM test.byrange_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL test.proc_norm();
SELECT count(*) as "Master regular" FROM test.regular_tbl;
Master regular 500
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug30888.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug30888.result
index f3ffc908504..912b05216da 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug30888.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_bug30888.result
@@ -26,6 +26,10 @@ DELETE FROM test.regular_tbl WHERE id = del_count;
SET del_count = del_count - 2;
END WHILE;
END|
+Warnings:
+Level Warning
+Code 1287
+Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
CALL test.proc_norm();
connection slave;
connection master;
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result
index 5f41fd328c9..a639bf6e76c 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result
@@ -484,77 +484,78 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
******************** CREATE USER ********************
CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection master;
******************** GRANT ********************
GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 Y
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 Y
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 Y
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 Y
connection master;
******************** REVOKE ********************
REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection master;
******************** SET PASSWORD ********************
SET PASSWORD FOR 'user_test_rpl'@'localhost' = '*0000000000000000000000000000000000000000';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection master;
******************** RENAME USER ********************
RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection master;
******************** DROP USER ********************
DROP USER 'user_test_rpl_2'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
connection master;
INSERT INTO t1 VALUES(100, 'test');
******************** ANALYZE ********************
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test_rpl.t1 analyze status Engine-independent statistics collected
test_rpl.t1 analyze status OK
******************** CHECK TABLE ********************
@@ -679,7 +680,6 @@ DROP TRIGGER tr1;
******************** EVENTS ********************
-GRANT EVENT ON *.* TO 'root'@'localhost';
INSERT INTO t1 VALUES(1, 'test1');
CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1;
Warnings:
@@ -1103,8 +1103,6 @@ master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP TRIGGER tr1
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost'
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
master-bin.000001 # Xid # # COMMIT /* XID */
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_read_only_ft.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_read_only_ft.result
index 593f177569f..e0b6b615bb6 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_read_only_ft.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_read_only_ft.result
@@ -24,6 +24,10 @@ unix_timestamp()-@tstart <= 10
connection slave;
connection master;
include/diff_tables.inc [master:test.t, slave:test.t]
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+Warnings:
+Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
connection master;
drop table if exists t;
connection slave;
diff --git a/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc b/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc
index d637b46e8fc..1914da14bb3 100644
--- a/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc
+++ b/storage/tokudb/mysql-test/tokudb/include/cluster_key.inc
@@ -1,7 +1,10 @@
# test for TokuDB clustering keys.
# test assumes that a table 't1' exists with the following columns:
# a int, b int, c int, d int
-insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
+insert into t1 values
+ (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),
+ (5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),
+ (9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000);
#normal queries
@@ -13,20 +16,20 @@ select * from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 950;
+select * from t1 where c > 950;
#covering indexes
# ignore rows column
--replace_column 9 NULL;
-explain select a from t1 where a > 8;
-select a from t1 where a > 8;
+explain select a from t1 where a > 10;
+select a from t1 where a > 10;
# ignore rows column
--replace_column 9 NULL;
@@ -35,8 +38,8 @@ select a,b from t1 where b > 30;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where c > 750;
-select a,c from t1 where c > 750;
+explain select a,b from t1 where c > 350;
+select a,c from t1 where c > 350;
alter table t1 add index bdca(b,d,c,a) clustering=yes;
@@ -51,25 +54,25 @@ select * from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 950;
+select * from t1 where c > 950;
#covering indexes
# ignore rows column
--replace_column 9 NULL;
-explain select b from t1 where b > 30;
-select b from t1 where b > 30;
+explain select b from t1 where b > 70;
+select b from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select b from t1 where c > 750;
-select c from t1 where c > 750;
+explain select b from t1 where c > 950;
+select c from t1 where c > 950;
alter table t1 add e varchar(20);
@@ -77,25 +80,25 @@ alter table t1 add primary key (a,b,c);
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where a > 5;
-select * from t1 where a > 5;
+explain select * from t1 where a > 8;
+select * from t1 where a > 8;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 950;
+select * from t1 where c > 950;
#covering indexes
# ignore rows column
--replace_column 9 NULL;
-explain select a from t1 where a > 8;
-select a from t1 where a > 8;
+explain select a from t1 where a > 10;
+select a from t1 where a > 10;
# ignore rows column
--replace_column 9 NULL;
@@ -104,8 +107,8 @@ select a,b from t1 where b > 30;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where c > 750;
-select a,c from t1 where c > 750;
+explain select a,b from t1 where c > 350;
+select a,c from t1 where c > 350;
alter table t1 drop primary key;
@@ -116,23 +119,23 @@ select * from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 950;
+select * from t1 where c > 950;
#covering indexes
# ignore rows column
--replace_column 9 NULL;
-explain select b from t1 where b > 30;
-select b from t1 where b > 30;
+explain select b from t1 where b > 70;
+select b from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select b from t1 where c > 750;
-select c from t1 where c > 750;
+explain select b from t1 where c > 950;
+select c from t1 where c > 950;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_add_drop.result b/storage/tokudb/mysql-test/tokudb/r/card_add_drop.result
index 71a39eb1f3e..887ccd5f073 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_add_drop.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_add_drop.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, d int, key(a), key(b), key(c));
insert into tt values (0,0,0,0),(1,0,0,0),(2,0,1,0),(3,0,1,0);
show indexes from tt;
@@ -9,6 +11,7 @@ tt 1 b 1 b A 4 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -23,6 +26,7 @@ tt 1 c 1 c A 4 NULL NULL YES BTREE
tt 1 d 1 d A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -35,4 +39,5 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 1 a 1 a A 4 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
tt 1 d 1 d A 2 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_add_index.result b/storage/tokudb/mysql-test/tokudb/r/card_add_index.result
index 9a929b19a80..ab7c6e330f4 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_add_index.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_add_index.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
show indexes from tt;
@@ -7,6 +9,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -18,6 +21,7 @@ tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
tt 1 b 1 b A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -31,6 +35,7 @@ tt 1 b 1 b A 2 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -43,4 +48,5 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
tt 1 b 1 b A 2 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_drop_index.result b/storage/tokudb/mysql-test/tokudb/r/card_drop_index.result
index 2cfdfe11296..f924c8cd12b 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_drop_index.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_drop_index.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
show indexes from tt;
@@ -9,6 +11,7 @@ tt 1 b 1 b A 4 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -28,4 +31,5 @@ flush tables;
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_drop_index_2.result b/storage/tokudb/mysql-test/tokudb/r/card_drop_index_2.result
index ed28d2a3226..5980b5795d5 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_drop_index_2.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_drop_index_2.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, primary key(a), key(b), key(c));
insert into tt values (0, 0, 0), (0+1, 0, 0), (0+2, 0, 0), (0+3, 0, 0);
insert into tt values (4, 4, 0), (4+1, 4, 0), (4+2, 4, 0), (4+3, 4, 0);
@@ -136,6 +138,7 @@ tt 1 b 1 b A 500 NULL NULL YES BTREE
tt 1 c 1 c A 500 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -155,4 +158,5 @@ flush tables;
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 500 NULL NULL BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_drop_pk.result b/storage/tokudb/mysql-test/tokudb/r/card_drop_pk.result
index 2369d88c274..c560defb1fb 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_drop_pk.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_drop_pk.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
show indexes from tt;
@@ -9,6 +11,7 @@ tt 1 b 1 b A 4 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -25,4 +28,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 1 b 1 b A 4 NULL NULL YES BTREE
tt 1 c 1 c A 4 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_no_keys.result b/storage/tokudb/mysql-test/tokudb/r/card_no_keys.result
index 1302cfaf252..a96f3edd4b8 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_no_keys.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_no_keys.result
@@ -6,6 +6,7 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_pk.result b/storage/tokudb/mysql-test/tokudb/r/card_pk.result
index b0317507f7c..173fb696d69 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_pk.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_pk.result
@@ -7,6 +7,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_pk_2.result b/storage/tokudb/mysql-test/tokudb/r/card_pk_2.result
index 3c1b652db15..b1c3e679bb8 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_pk_2.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_pk_2.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, primary key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);
show indexes from tt;
@@ -8,6 +10,7 @@ tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
tt 0 PRIMARY 2 b A 4 NULL NULL BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -18,4 +21,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 4 NULL NULL BTREE
tt 0 PRIMARY 2 b A 4 NULL NULL BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_pk_sk.result b/storage/tokudb/mysql-test/tokudb/r/card_pk_sk.result
index 02c8d1f8218..2f527cbbed5 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_pk_sk.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_pk_sk.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, primary key(a), key(b));
insert into tt values (4*0,4*0+1),(4*0+1,4*0+2),(4*0+2,4*0+3),(4*0+3,4*0+4);
insert into tt values (4*1,4*1+1),(4*1+1,4*1+2),(4*1+2,4*1+3),(4*1+3,4*1+4);
@@ -1007,6 +1009,7 @@ tt 0 PRIMARY 1 a A 4000 NULL NULL BTREE
tt 1 b 1 b A 4000 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -2025,6 +2028,7 @@ tt 0 PRIMARY 1 a A 4000 NULL NULL BTREE
tt 1 b 1 b A 4000 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -2035,4 +2039,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 0 PRIMARY 1 a A 4000 NULL NULL BTREE
tt 1 b 1 b A 2 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_scale_percent.result b/storage/tokudb/mysql-test/tokudb/r/card_scale_percent.result
index 981433fac91..a452be2006a 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_scale_percent.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_scale_percent.result
@@ -1,5 +1,6 @@
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
set global tokudb_cardinality_scale_percent = 10;
show indexes from tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_sk.result b/storage/tokudb/mysql-test/tokudb/r/card_sk.result
index 310fc863a9b..1956c846e03 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_sk.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_sk.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, key(b));
insert into tt values (1,0),(2,1),(3,2),(4,3);
insert into tt values (5,0),(6,1),(7,2),(8,3);
@@ -8,6 +10,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 1 b 1 b A 8 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -16,4 +19,5 @@ flush tables;
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 1 b 1 b A 8 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_sk_2.result b/storage/tokudb/mysql-test/tokudb/r/card_sk_2.result
index 8ff57b63e5d..f0fcbac0e3a 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_sk_2.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_sk_2.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists tt;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table tt (a int, b int, key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);
show indexes from tt;
@@ -8,6 +10,7 @@ tt 1 a 1 a A 4 NULL NULL YES BTREE
tt 1 a 2 b A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -18,4 +21,5 @@ show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
tt 1 a 1 a A 4 NULL NULL YES BTREE
tt 1 a 2 b A 4 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/r/card_unique_sk.result b/storage/tokudb/mysql-test/tokudb/r/card_unique_sk.result
index cbcab7bdc44..22b0733a933 100644
--- a/storage/tokudb/mysql-test/tokudb/r/card_unique_sk.result
+++ b/storage/tokudb/mysql-test/tokudb/r/card_unique_sk.result
@@ -7,6 +7,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
tt 0 a 1 a A 4 NULL NULL YES BTREE
analyze table tt;
Table Op Msg_type Msg_text
+test.tt analyze status Engine-independent statistics collected
test.tt analyze status OK
show indexes from tt;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result
index 4c3f971770e..b2749966565 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_2968-2.result
@@ -1096,7 +1096,7 @@ t CREATE TABLE `t` (
explain select straight_join s.a,t.a from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b,b_2,b_3 b_2 10 NULL 1000 Using where; Using index
-1 SIMPLE t ref b,b_2,b_3 b_2 5 test.s.b 1 Using index
+1 SIMPLE t ref b,b_2,b_3 b_3 5 test.s.b 1 Using index
alter table s drop key b_2;
alter table t drop key b_2;
show create table s;
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result b/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result
index 02a90c66398..bbc886fb329 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_create_table.result
@@ -39,16 +39,20 @@ t1 CREATE TABLE `t1` (
KEY `foo` (`c`,`d`) `clustering`=yes,
KEY `bar` (`d`,`c`,`b`,`a`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1
-insert into t1 value (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(32,54,12,56);
+insert into t1 value
+(1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6),
+(32,54,12,56);
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 16 NULL 5 Using index
+1 SIMPLE t1 index NULL PRIMARY 16 NULL 7 Using index
select * from t1;
a b c d
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
+5 5 5 5
+6 6 6 6
32 54 12 56
explain select d from t1 where d > 30;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result b/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result
index 1fd519debef..f85845232dd 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_delete.result
@@ -1,7 +1,10 @@
SET DEFAULT_STORAGE_ENGINE='tokudb';
DROP TABLE IF EXISTS t1;
create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb;
-insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
+insert into t1 values
+(1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),
+(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),
+(9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000);
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
@@ -11,48 +14,47 @@ a b c d
7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where b > 30;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d
-4 40 400 4000
-5 50 500 5000
-6 60 600 6000
-7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where c > 750;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where c > 850;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select * from t1 where c > 750;
+1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
+select * from t1 where c > 850;
a b c d
-8 80 800 8000
9 90 900 9000
-explain select a from t1 where a > 8;
+10 100 1000 10000
+11 110 1100 11000
+explain select a from t1 where a > 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
-select a from t1 where a > 8;
+select a from t1 where a > 10;
a
-9
-explain select a,b from t1 where b > 30;
+11
+explain select a,b from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select a,b from t1 where b > 30;
+select a,b from t1 where b > 70;
a b
-4 40
-5 50
-6 60
-7 70
8 80
9 90
-explain select a,b from t1 where c > 750;
+10 100
+11 110
+explain select a,b from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select a,c from t1 where c > 750;
+select a,c from t1 where c > 950;
a c
-8 800
-9 900
+10 1000
+11 1100
delete from t1 where b>30 and b < 60;
select * from t1;
a b c d
@@ -63,15 +65,16 @@ a b c d
7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where a > 5;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where a > 8;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
-select * from t1 where a > 5;
+select * from t1 where a > 8;
a b c d
-6 60 600 6000
-7 70 700 7000
-8 80 800 8000
9 90 900 9000
+10 100 1000 10000
+11 110 1100 11000
explain select * from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
@@ -81,19 +84,25 @@ a b c d
7 70 700 7000
8 80 800 8000
9 90 900 9000
+10 100 1000 10000
+11 110 1100 11000
explain select * from t1 where c > 750;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 5 NULL NULL; Using where
+1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
select * from t1 where c > 750;
a b c d
8 80 800 8000
9 90 900 9000
+10 100 1000 10000
+11 110 1100 11000
explain select a from t1 where a > 8;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
+1 SIMPLE t1 index PRIMARY c 5 NULL NULL; Using where; Using index
select a from t1 where a > 8;
a
9
+10
+11
explain select a,b from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
@@ -103,13 +112,14 @@ a b
7 70
8 80
9 90
-explain select a,b from t1 where c > 750;
+10 100
+11 110
+explain select a,b from t1 where c > 1050;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select a,c from t1 where c > 750;
+select a,c from t1 where c > 1050;
a c
-8 800
-9 900
+11 1100
alter table t1 drop primary key;
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
@@ -120,22 +130,23 @@ a b c d
7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where b > 30;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d
-6 60 600 6000
-7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where c > 750;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where c > 1050;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select * from t1 where c > 750;
+select * from t1 where c > 1050;
a b c d
-8 80 800 8000
-9 90 900 9000
+11 110 1100 11000
explain select a from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
@@ -145,61 +156,76 @@ a
7
8
9
-explain select a,b from t1 where b > 30;
+10
+11
+explain select a,b from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select a,b from t1 where b > 30;
+select a,b from t1 where b > 70;
a b
-6 60
-7 70
8 80
9 90
-explain select a,b from t1 where c > 750;
+10 100
+11 110
+explain select a,b from t1 where c > 1050;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select a,c from t1 where c > 750;
+select a,c from t1 where c > 1050;
a c
-8 800
-9 900
+11 1100
delete from t1 where b > 10 and b < 90;
select * from t1;
a b c d
1 10 100 1000
9 90 900 9000
+10 100 1000 10000
+11 110 1100 11000
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
select * from t1 where a > 5;
a b c d
9 90 900 9000
+10 100 1000 10000
+11 110 1100 11000
explain select * from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
select * from t1 where b > 30;
a b c d
9 90 900 9000
+10 100 1000 10000
+11 110 1100 11000
explain select * from t1 where c > 750;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
select * from t1 where c > 750;
a b c d
9 90 900 9000
+10 100 1000 10000
+11 110 1100 11000
explain select a from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
select a from t1 where a > 5;
a
9
+10
+11
explain select a,b from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
select a,b from t1 where b > 30;
a b
9 90
+10 100
+11 110
explain select a,b from t1 where c > 750;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
select a,c from t1 where c > 750;
a c
9 900
+10 1000
+11 1100
drop table t1;
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result
index a594b104444..aa33246bfeb 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_key.result
@@ -7,22 +7,19 @@ insert into t1 values (2,"20",200);
insert into t1 values (3,"30",300);
insert into t1 values (4,"40",400);
insert into t1 values (5,"50",500);
-explain select * from t1 where a > 2;
+explain select * from t1 where a > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 3 Using where
-select * from t1 where a > 2;
+1 SIMPLE t1 range a a 5 NULL 2 Using where
+select * from t1 where a > 3;
a b c
-3 30 300
4 40 400
5 50 500
-select b from t1 where a > 2;
+select b from t1 where a > 3;
b
-30
40
50
-select c from t1 where a > 2;
+select c from t1 where a > 3;
c
-300
400
500
delete from t1 where a <2;
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_key.result b/storage/tokudb/mysql-test/tokudb/r/cluster_key.result
index fab288047be..4c2fc08cd48 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_key.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_key.result
@@ -1,7 +1,10 @@
SET DEFAULT_STORAGE_ENGINE='tokudb';
DROP TABLE IF EXISTS t1;
create table t1(a int, b int, c int, d int, primary key(a,b,c), key(b) clustering=yes, key (c))engine=tokudb;
-insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
+insert into t1 values
+(1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),
+(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),
+(9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000);
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
@@ -11,30 +14,30 @@ a b c d
7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where b > 30;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d
-4 40 400 4000
-5 50 500 5000
-6 60 600 6000
-7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where c > 750;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL NULL; Using where
-select * from t1 where c > 750;
+select * from t1 where c > 950;
a b c d
-8 80 800 8000
-9 90 900 9000
-explain select a from t1 where a > 8;
+10 100 1000 10000
+11 110 1100 11000
+explain select a from t1 where a > 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
-select a from t1 where a > 8;
+select a from t1 where a > 10;
a
-9
+11
explain select a,b from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b c 4 NULL NULL; Using where; Using index
@@ -46,13 +49,21 @@ a b
7 70
8 80
9 90
-explain select a,b from t1 where c > 750;
+10 100
+11 110
+explain select a,b from t1 where c > 350;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index c c 4 NULL NULL; Using where; Using index
-select a,c from t1 where c > 750;
+select a,c from t1 where c > 350;
a c
+4 400
+5 500
+6 600
+7 700
8 800
9 900
+10 1000
+11 1100
alter table t1 add index bdca(b,d,c,a) clustering=yes;
insert into t1 values (10,10,10,10);
alter table t1 drop index bdca;
@@ -67,79 +78,73 @@ a b c d
8 80 800 8000
9 90 900 9000
10 10 10 10
-explain select * from t1 where b > 30;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d
-4 40 400 4000
-5 50 500 5000
-6 60 600 6000
-7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where c > 750;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL NULL; Using where
-select * from t1 where c > 750;
+select * from t1 where c > 950;
a b c d
-8 80 800 8000
-9 90 900 9000
-explain select b from t1 where b > 30;
+10 100 1000 10000
+11 110 1100 11000
+explain select b from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index
-select b from t1 where b > 30;
+select b from t1 where b > 70;
b
-40
-50
-60
-70
80
90
-explain select b from t1 where c > 750;
+100
+110
+explain select b from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL NULL; Using where
-select c from t1 where c > 750;
+select c from t1 where c > 950;
c
-800
-900
+1000
+1100
alter table t1 add e varchar(20);
alter table t1 add primary key (a,b,c);
-explain select * from t1 where a > 5;
+explain select * from t1 where a > 8;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
-select * from t1 where a > 5;
+select * from t1 where a > 8;
a b c d e
-6 60 600 6000 NULL
-7 70 700 7000 NULL
-8 80 800 8000 NULL
9 90 900 9000 NULL
10 10 10 10 NULL
-explain select * from t1 where b > 30;
+10 100 1000 10000 NULL
+11 110 1100 11000 NULL
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d e
-4 40 400 4000 NULL
-5 50 500 5000 NULL
-6 60 600 6000 NULL
-7 70 700 7000 NULL
8 80 800 8000 NULL
9 90 900 9000 NULL
-explain select * from t1 where c > 750;
+10 100 1000 10000 NULL
+11 110 1100 11000 NULL
+explain select * from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL NULL; Using where
-select * from t1 where c > 750;
+select * from t1 where c > 950;
a b c d e
-8 80 800 8000 NULL
-9 90 900 9000 NULL
-explain select a from t1 where a > 8;
+10 100 1000 10000 NULL
+11 110 1100 11000 NULL
+explain select a from t1 where a > 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
-select a from t1 where a > 8;
+select a from t1 where a > 10;
a
-9
-10
+11
explain select a,b from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b c 4 NULL NULL; Using where; Using index
@@ -151,13 +156,21 @@ a b
7 70
8 80
9 90
-explain select a,b from t1 where c > 750;
+10 100
+11 110
+explain select a,b from t1 where c > 350;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index c c 4 NULL NULL; Using where; Using index
-select a,c from t1 where c > 750;
+select a,c from t1 where c > 350;
a c
+4 400
+5 500
+6 600
+7 700
8 800
9 900
+10 1000
+11 1100
alter table t1 drop primary key;
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
@@ -169,40 +182,38 @@ a b c d e
8 80 800 8000 NULL
9 90 900 9000 NULL
10 10 10 10 NULL
-explain select * from t1 where b > 30;
+10 100 1000 10000 NULL
+11 110 1100 11000 NULL
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d e
-4 40 400 4000 NULL
-5 50 500 5000 NULL
-6 60 600 6000 NULL
-7 70 700 7000 NULL
8 80 800 8000 NULL
9 90 900 9000 NULL
-explain select * from t1 where c > 750;
+10 100 1000 10000 NULL
+11 110 1100 11000 NULL
+explain select * from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL NULL; Using where
-select * from t1 where c > 750;
+select * from t1 where c > 950;
a b c d e
-8 80 800 8000 NULL
-9 90 900 9000 NULL
-explain select b from t1 where b > 30;
+10 100 1000 10000 NULL
+11 110 1100 11000 NULL
+explain select b from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 4 NULL NULL; Using where; Using index
-select b from t1 where b > 30;
+select b from t1 where b > 70;
b
-40
-50
-60
-70
80
90
-explain select b from t1 where c > 750;
+100
+110
+explain select b from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL NULL; Using where
-select c from t1 where c > 750;
+select c from t1 where c > 950;
c
-800
-900
+1000
+1100
drop table t1;
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result b/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result
index c6754db3981..6b458b36585 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_query_plan.result
@@ -2,16 +2,16 @@ SET DEFAULT_STORAGE_ENGINE='tokudb';
DROP TABLE IF EXISTS t1;
create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb;
insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6),(7,7,7,7),(8,8,8,8),(9,9,9,9);
-explain select * from t1 where b > 2;
+explain select * from t1 where b > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-explain select * from t1 where c > 2;
+explain select * from t1 where c > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
-explain select * from t1 where a > 4;
+explain select * from t1 where a > 7;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
-explain select * from t1 where c > 7;
+explain select * from t1 where c > 8;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
explain select * from t1 where b > 7;
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result b/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result
index 41abded2857..2dcb65cee10 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_tokudb_bug_993_2.result
@@ -32,13 +32,13 @@ max(a)
7
explain select a,b from z1 where a < 7;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE z1 range a a 5 NULL 12 Using where; Using index
+1 SIMPLE z1 index a a 10 NULL 14 Using where; Using index
select max(a) from z1 where a < 7;
max(a)
3
explain select a,b from z1 where a < 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE z1 range a a 5 NULL 9 Using where; Using index
+1 SIMPLE z1 index a a 10 NULL 14 Using where; Using index
select max(a) from z1 where a < 3;
max(a)
1
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_update.result b/storage/tokudb/mysql-test/tokudb/r/cluster_update.result
index 14ab9a27dc4..586cf2e23d9 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_update.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_update.result
@@ -1,7 +1,10 @@
SET DEFAULT_STORAGE_ENGINE='tokudb';
DROP TABLE IF EXISTS t1;
create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb;
-insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
+insert into t1 values
+(1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),
+(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),
+(9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000);
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
@@ -11,48 +14,48 @@ a b c d
7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where b > 30;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d
-4 40 400 4000
-5 50 500 5000
-6 60 600 6000
-7 70 700 7000
8 80 800 8000
9 90 900 9000
-explain select * from t1 where c > 750;
+10 100 1000 10000
+11 110 1100 11000
+explain select * from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select * from t1 where c > 750;
+select * from t1 where c > 950;
a b c d
-8 80 800 8000
-9 90 900 9000
-explain select a from t1 where a > 8;
+10 100 1000 10000
+11 110 1100 11000
+explain select a from t1 where a > 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
select a from t1 where a > 8;
a
9
-explain select a,b from t1 where b > 30;
+10
+11
+explain select a,b from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select a,b from t1 where b > 30;
+select a,b from t1 where b > 70;
a b
-4 40
-5 50
-6 60
-7 70
8 80
9 90
-explain select a,b from t1 where c > 750;
+10 100
+11 110
+explain select a,b from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select a,c from t1 where c > 750;
+select a,c from t1 where c > 950;
a c
-8 800
-9 900
+10 1000
+11 1100
update t1 set c = c+5, b = b+5 where b>30;
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
@@ -63,6 +66,8 @@ a b c d
7 75 705 7000
8 85 805 8000
9 95 905 9000
+10 105 1005 10000
+11 115 1105 11000
explain select * from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
@@ -74,6 +79,8 @@ a b c d
7 75 705 7000
8 85 805 8000
9 95 905 9000
+10 105 1005 10000
+11 115 1105 11000
explain select * from t1 where c > 750;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
@@ -81,12 +88,14 @@ select * from t1 where c > 750;
a b c d
8 85 805 8000
9 95 905 9000
-explain select a from t1 where a > 8;
+10 105 1005 10000
+11 115 1105 11000
+explain select a from t1 where a > 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
-select a from t1 where a > 8;
+select a from t1 where a > 10;
a
-9
+11
explain select a,b from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NA b b 5 NULL NULL; Using where; Using index
@@ -98,6 +107,8 @@ a b
7 75
8 85
9 95
+10 105
+11 115
explain select a,b from t1 where c > 750;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
@@ -105,6 +116,8 @@ select a,c from t1 where c > 750;
a c
8 805
9 905
+10 1005
+11 1105
alter table t1 drop primary key;
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
@@ -115,24 +128,25 @@ a b c d
7 75 705 7000
8 85 805 8000
9 95 905 9000
-explain select * from t1 where b > 30;
+10 105 1005 10000
+11 115 1105 11000
+explain select * from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select * from t1 where b > 30;
+select * from t1 where b > 70;
a b c d
-4 45 405 4000
-5 55 505 5000
-6 65 605 6000
7 75 705 7000
8 85 805 8000
9 95 905 9000
-explain select * from t1 where c > 750;
+10 105 1005 10000
+11 115 1105 11000
+explain select * from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select * from t1 where c > 750;
+select * from t1 where c > 950;
a b c d
-8 85 805 8000
-9 95 905 9000
+10 105 1005 10000
+11 115 1105 11000
explain select a from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
@@ -142,24 +156,25 @@ a
7
8
9
-explain select a,b from t1 where b > 30;
+10
+11
+explain select a,b from t1 where b > 70;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
-select a,b from t1 where b > 30;
+select a,b from t1 where b > 70;
a b
-4 45
-5 55
-6 65
7 75
8 85
9 95
-explain select a,b from t1 where c > 750;
+10 105
+11 115
+explain select a,b from t1 where c > 950;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL NULL; Using where
-select a,c from t1 where c > 750;
+select a,c from t1 where c > 950;
a c
-8 805
-9 905
+10 1005
+11 1105
update t1 set c = c+5, b = b+5 where b>30;
select * from t1;
a b c d
@@ -172,6 +187,8 @@ a b c d
7 80 710 7000
8 90 810 8000
9 100 910 9000
+10 110 1010 10000
+11 120 1110 11000
explain select * from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
@@ -181,6 +198,8 @@ a b c d
7 80 710 7000
8 90 810 8000
9 100 910 9000
+10 110 1010 10000
+11 120 1110 11000
explain select * from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
@@ -192,6 +211,8 @@ a b c d
7 80 710 7000
8 90 810 8000
9 100 910 9000
+10 110 1010 10000
+11 120 1110 11000
explain select * from t1 where c > 750;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
@@ -199,6 +220,8 @@ select * from t1 where c > 750;
a b c d
8 90 810 8000
9 100 910 9000
+10 110 1010 10000
+11 120 1110 11000
explain select a from t1 where a > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
@@ -208,6 +231,8 @@ a
7
8
9
+10
+11
explain select a,b from t1 where b > 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
@@ -219,6 +244,8 @@ a b
7 80
8 90
9 100
+10 110
+11 120
explain select a,b from t1 where c > 750;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL c NULL NULL NULL NULL; Using where
@@ -226,4 +253,6 @@ select a,c from t1 where c > 750;
a c
8 810
9 910
+10 1010
+11 1110
drop table t1;
diff --git a/storage/tokudb/mysql-test/tokudb/r/compressions.result b/storage/tokudb/mysql-test/tokudb/r/compressions.result
index 435b34b6af3..a65d431d797 100644
--- a/storage/tokudb/mysql-test/tokudb/r/compressions.result
+++ b/storage/tokudb/mysql-test/tokudb/r/compressions.result
@@ -8,4 +8,5 @@ FOUND 1 /compression_method=7/ in dump
FOUND 1 /compression_method=9/ in dump
FOUND 1 /compression_method=10/ in dump
FOUND 1 /compression_method=11/ in dump
+# restart
DROP TABLE t1, t2, t3, t4, t5;
diff --git a/storage/tokudb/mysql-test/tokudb/r/dir_per_db_rename_to_nonexisting_schema.result b/storage/tokudb/mysql-test/tokudb/r/dir_per_db_rename_to_nonexisting_schema.result
index 992f380591f..f73a9e43e4a 100644
--- a/storage/tokudb/mysql-test/tokudb/r/dir_per_db_rename_to_nonexisting_schema.result
+++ b/storage/tokudb/mysql-test/tokudb/r/dir_per_db_rename_to_nonexisting_schema.result
@@ -21,6 +21,7 @@ CALL mtr.add_suppression("because destination db does not exist");
ALTER TABLE test.t1 RENAME foo.t1;
ERROR HY000: Error on rename of './test/t1' to './foo/t1' (errno: 2 "No such file or directory")
DROP TABLE t1;
+# restart
SELECT @@tokudb_data_dir;
@@tokudb_data_dir
NULL
diff --git a/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result b/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result
index 024580d4258..fd584a3ca0f 100644
--- a/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result
+++ b/storage/tokudb/mysql-test/tokudb/r/tokudb_mrr.result
@@ -305,25 +305,25 @@ dummy INT PRIMARY KEY,
a INT UNIQUE,
b INT
) ENGINE=TokuDB;
-INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
+INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5),(7,7,7),(8,8,8),(9,9,9);
COMMIT;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT @@tx_isolation;
@@tx_isolation
REPEATABLE-READ
START TRANSACTION;
-EXPLAIN SELECT * FROM t1 WHERE a >= 2 FOR UPDATE;
+EXPLAIN SELECT * FROM t1 WHERE a >= 8 FOR UPDATE;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 2 Using where
-SELECT * FROM t1 WHERE a >= 2 FOR UPDATE;
+SELECT * FROM t1 WHERE a >= 8 FOR UPDATE;
dummy a b
-3 3 3
-5 5 5
+8 8 8
+9 9 9
connection con2;
SET AUTOCOMMIT=0;
SET TOKUDB_LOCK_TIMEOUT=2;
START TRANSACTION;
-INSERT INTO t1 VALUES (2,2,2);
+INSERT INTO t1 VALUES (8,8,8);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ROLLBACK;
connection con1;
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_bit.result b/storage/tokudb/mysql-test/tokudb/r/type_bit.result
index c147c203d43..76a032d99c4 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_bit.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_bit.result
@@ -759,7 +759,7 @@ CREATE TABLE t1 (a BIT(7), b BIT(9), KEY(a, b));
INSERT INTO t1 VALUES(0, 0), (5, 3), (5, 6), (6, 4), (7, 0);
EXPLAIN SELECT a+0, b+0 FROM t1 WHERE a > 4 and b < 7 ORDER BY 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 2 NULL 4 Using where; Using index; Using filesort
+1 SIMPLE t1 index a a 5 NULL 5 Using where; Using index; Using filesort
DROP TABLE t1;
End of 5.0 tests
create table t1(a bit(7));
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_blob.result b/storage/tokudb/mysql-test/tokudb/r/type_blob.result
index 1350bc03045..f3d634d84c1 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_blob.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_blob.result
@@ -357,8 +357,6 @@ HELLO MY 1
a 1
hello 1
drop table t1;
-create table t1 (a text, unique (a(21000)));
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
create table t1 (a text, key (a(2100)));
show create table t1;
Table Create Table
@@ -597,6 +595,9 @@ id txt
explain select * from t1 where txt='Chevy' or txt is NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL txt_index NULL NULL NULL 3 Using where
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 3 Using where
select * from t1 where txt='Chevy ';
id txt
1 Chevy
@@ -668,6 +669,9 @@ alter table t1 modify column txt blob;
explain select * from t1 where txt='Chevy' or txt is NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL txt_index NULL NULL NULL 4 Using where
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where
select * from t1 where txt='Chevy' or txt is NULL;
id txt
1 Chevy
@@ -675,6 +679,9 @@ id txt
explain select * from t1 where txt='Chevy' or txt is NULL order by txt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL txt_index NULL NULL NULL 4 Using where; Using filesort
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL order by txt;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where; Using filesort
select * from t1 where txt='Chevy' or txt is NULL order by txt;
id txt
3 NULL
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_datetime.result b/storage/tokudb/mysql-test/tokudb/r/type_datetime.result
index ed980f8cee1..dbe93b37271 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_datetime.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_datetime.result
@@ -363,7 +363,7 @@ greatest(cast('01-01-01' as date), '01-01-02') + 0
20010102
select least(cast('01-01-01' as datetime), '01-01-02') + 0;
least(cast('01-01-01' as datetime), '01-01-02') + 0
-20010101000000.000000
+20010101000000
select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed);
cast(least(cast('01-01-01' as datetime), '01-01-02') as signed)
20010101000000
@@ -401,7 +401,7 @@ if(@bug28261 = f1, '', @bug28261:= f1)
2001-01-01
2002-02-02
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1292 Truncated incorrect datetime value: ''
select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
if(@bug28261 = f1, '', @bug28261:= f1)
2001-01-01
@@ -425,11 +425,11 @@ f1
2001-01-01 00:00:00
2002-02-02 00:00:00
Warnings:
-Warning 1292 Incorrect datetime value: '2002010'
+Warning 1292 Truncated incorrect datetime value: '2002010'
select * from t1 where f1 between 20020101 and 2007010100000;
f1
Warnings:
-Warning 1292 Incorrect datetime value: '2007010100000'
+Warning 1292 Truncated incorrect datetime value: '2007010100000'
drop table t1;
#
# Bug#27216: functions with parameters of different date types may
@@ -500,7 +500,7 @@ f1
45:44:44
15:44:44
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Truncated incorrect datetime value: '1'
drop table t1;
create table t1 (a tinyint);
insert into t1 values (), (), ();
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_varchar.result b/storage/tokudb/mysql-test/tokudb/r/type_varchar.result
index 80c92bfe874..bd2dc09203b 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_varchar.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_varchar.result
@@ -13,7 +13,7 @@ t1 CREATE TABLE `t1` (
show create table vchar;
Table Create Table
vchar CREATE TABLE `vchar` (
- `v` varchar(30) DEFAULT NULL,
+ `v` varchar(30)/*old*/ DEFAULT NULL,
`c` char(3) DEFAULT NULL,
`e` enum('abc','def','ghi') DEFAULT NULL,
`t` text DEFAULT NULL
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_add_drop.test b/storage/tokudb/mysql-test/tokudb/t/card_add_drop.test
index 8563bf28ad1..66b26f20123 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_add_drop.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_add_drop.test
@@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, c int, d int, key(a), key(b), key(c));
insert into tt values (0,0,0,0),(1,0,0,0),(2,0,1,0),(3,0,1,0);
@@ -24,5 +27,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_add_index.test b/storage/tokudb/mysql-test/tokudb/t/card_add_index.test
index 455dae55236..54f29fcf289 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_add_index.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_add_index.test
@@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, c int, primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
@@ -30,5 +33,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_drop_index.test b/storage/tokudb/mysql-test/tokudb/t/card_drop_index.test
index b8e7d575dbd..a300f035519 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_drop_index.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_drop_index.test
@@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
@@ -26,5 +29,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_drop_index_2.test b/storage/tokudb/mysql-test/tokudb/t/card_drop_index_2.test
index 88e0f6a413f..9e8b412760c 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_drop_index_2.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_drop_index_2.test
@@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, c int, primary key(a), key(b), key(c));
let $a=0;
while ($a < 500) {
@@ -32,4 +35,5 @@ show indexes from tt;
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_drop_pk.test b/storage/tokudb/mysql-test/tokudb/t/card_drop_pk.test
index 365d920aa80..8de6a1dc7f2 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_drop_pk.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_drop_pk.test
@@ -7,6 +7,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, c int, key(b), key(c), primary key(a));
insert into tt values (1,0,0),(2,0,0),(3,0,1),(4,0,1);
@@ -22,5 +25,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_pk_2.test b/storage/tokudb/mysql-test/tokudb/t/card_pk_2.test
index 826714931aa..b24ff0f26f0 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_pk_2.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_pk_2.test
@@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, primary key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);
@@ -16,5 +19,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_pk_sk.test b/storage/tokudb/mysql-test/tokudb/t/card_pk_sk.test
index f1e11fbbc2a..7e66c677930 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_pk_sk.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_pk_sk.test
@@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, primary key(a), key(b));
let $i=0;
while ($i < 1000) {
@@ -40,6 +43,7 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_scale_percent.test b/storage/tokudb/mysql-test/tokudb/t/card_scale_percent.test
index 75c53611308..ded6401c09d 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_scale_percent.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_scale_percent.test
@@ -6,6 +6,9 @@ set @orig_throttle = @@session.tokudb_analyze_throttle;
set @orig_time = @@session.tokudb_analyze_time;
set @orig_scale_percent = @@global.tokudb_cardinality_scale_percent;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, c int, d int, primary key(a), key(b), key(c), key(d)) engine=tokudb;
let $i=0;
while ($i < 1000) {
@@ -50,5 +53,6 @@ drop table tt;
set session tokudb_analyze_throttle = @orig_throttle;
set session tokudb_analyze_time = @orig_time;
set global tokudb_cardinality_scale_percent = @orig_scale_percent;
+set @@use_stat_tables = @save_use_stat_tables;
-- enable_query_log
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_sk.test b/storage/tokudb/mysql-test/tokudb/t/card_sk.test
index cf50b8b167b..12c9ddbb811 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_sk.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_sk.test
@@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, key(b));
insert into tt values (1,0),(2,1),(3,2),(4,3);
insert into tt values (5,0),(6,1),(7,2),(8,3);
@@ -17,5 +20,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/card_sk_2.test b/storage/tokudb/mysql-test/tokudb/t/card_sk_2.test
index 2cd4ece972e..f29b938105f 100644
--- a/storage/tokudb/mysql-test/tokudb/t/card_sk_2.test
+++ b/storage/tokudb/mysql-test/tokudb/t/card_sk_2.test
@@ -5,6 +5,9 @@ disable_warnings;
drop table if exists tt;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table tt (a int, b int, key(a,b));
insert into tt values (0,0),(0,1),(1,0),(1,1);
@@ -16,5 +19,6 @@ show indexes from tt;
# test that cardinality is persistent
flush tables;
show indexes from tt;
+set @@use_stat_tables = @save_use_stat_tables;
drop table tt;
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test b/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test
index c2196bf681e..0cace80e092 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_create_table.test
@@ -22,7 +22,9 @@ alter table t1 drop primary key;
alter table t1 add primary key (a,b,c,d);
alter table t1 add key bar(d,c,b,a) clustering=yes;
show create table t1;
-insert into t1 value (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(32,54,12,56);
+insert into t1 value
+ (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6),
+ (32,54,12,56);
explain select * from t1;
select * from t1;
explain select d from t1 where d > 30;
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test b/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test
index 1c0ebad94e4..cb490920259 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_delete.test
@@ -7,8 +7,10 @@ DROP TABLE IF EXISTS t1;
create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb;
-insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
-
+insert into t1 values
+ (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),
+ (5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),
+ (9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000);
#normal queries
@@ -19,38 +21,38 @@ select * from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 850;
+select * from t1 where c > 850;
#covering indexes
# ignore rows column
--replace_column 9 NULL;
-explain select a from t1 where a > 8;
-select a from t1 where a > 8;
+explain select a from t1 where a > 10;
+select a from t1 where a > 10;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where b > 30;
-select a,b from t1 where b > 30;
+explain select a,b from t1 where b > 70;
+select a,b from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where c > 750;
-select a,c from t1 where c > 750;
+explain select a,b from t1 where c > 950;
+select a,c from t1 where c > 950;
delete from t1 where b>30 and b < 60;
select * from t1;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where a > 5;
-select * from t1 where a > 5;
+explain select * from t1 where a > 8;
+select * from t1 where a > 8;
# ignore rows column
--replace_column 9 NULL;
@@ -76,8 +78,8 @@ select a,b from t1 where b > 30;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where c > 750;
-select a,c from t1 where c > 750;
+explain select a,b from t1 where c > 1050;
+select a,c from t1 where c > 1050;
alter table t1 drop primary key;
@@ -88,13 +90,13 @@ select * from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 1050;
+select * from t1 where c > 1050;
#covering indexes
@@ -105,13 +107,13 @@ select a from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where b > 30;
-select a,b from t1 where b > 30;
+explain select a,b from t1 where b > 70;
+select a,b from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where c > 750;
-select a,c from t1 where c > 750;
+explain select a,b from t1 where c > 1050;
+select a,c from t1 where c > 1050;
delete from t1 where b > 10 and b < 90;
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test
index 192e56f10a1..dc788d531d6 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_key.test
@@ -13,10 +13,10 @@ insert into t1 values (3,"30",300);
insert into t1 values (4,"40",400);
insert into t1 values (5,"50",500);
-explain select * from t1 where a > 2;
-select * from t1 where a > 2;
-select b from t1 where a > 2;
-select c from t1 where a > 2;
+explain select * from t1 where a > 3;
+select * from t1 where a > 3;
+select b from t1 where a > 3;
+select c from t1 where a > 3;
#explain delete from t1 where a <2;
delete from t1 where a <2;
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test b/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test
index a438653958a..23207f277b2 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_query_plan.test
@@ -11,18 +11,18 @@ insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 2;
+explain select * from t1 where b > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 2;
+explain select * from t1 where c > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where a > 4;
+explain select * from t1 where a > 7;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 7;
+explain select * from t1 where c > 8;
# ignore rows column
--replace_column 9 NULL;
explain select * from t1 where b > 7;
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_update.test b/storage/tokudb/mysql-test/tokudb/t/cluster_update.test
index ce5a0254372..42a004f1f03 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_update.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_update.test
@@ -7,7 +7,10 @@ DROP TABLE IF EXISTS t1;
create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb;
-insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
+insert into t1 values
+ (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),
+ (5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),
+ (9,90,900,9000),(10,100,1000,10000),(11,110,1100,11000);
#normal queries
@@ -19,30 +22,30 @@ select * from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 950;
+select * from t1 where c > 950;
#covering indexes
# ignore rows column
--replace_column 9 NULL;
-explain select a from t1 where a > 8;
+explain select a from t1 where a > 10;
select a from t1 where a > 8;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where b > 30;
-select a,b from t1 where b > 30;
+explain select a,b from t1 where b > 70;
+select a,b from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where c > 750;
-select a,c from t1 where c > 750;
+explain select a,b from t1 where c > 950;
+select a,c from t1 where c > 950;
update t1 set c = c+5, b = b+5 where b>30;
@@ -64,8 +67,8 @@ select * from t1 where c > 750;
#covering indexes
# ignore rows column
--replace_column 9 NULL;
-explain select a from t1 where a > 8;
-select a from t1 where a > 8;
+explain select a from t1 where a > 10;
+select a from t1 where a > 10;
# ignore rows column
--replace_column 4 NA 9 NULL;
@@ -86,13 +89,13 @@ select * from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where b > 30;
-select * from t1 where b > 30;
+explain select * from t1 where b > 70;
+select * from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select * from t1 where c > 750;
-select * from t1 where c > 750;
+explain select * from t1 where c > 950;
+select * from t1 where c > 950;
#covering indexes
# ignore rows column
@@ -102,13 +105,13 @@ select a from t1 where a > 5;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where b > 30;
-select a,b from t1 where b > 30;
+explain select a,b from t1 where b > 70;
+select a,b from t1 where b > 70;
# ignore rows column
--replace_column 9 NULL;
-explain select a,b from t1 where c > 750;
-select a,c from t1 where c > 750;
+explain select a,b from t1 where c > 950;
+select a,c from t1 where c > 950;
update t1 set c = c+5, b = b+5 where b>30;
select * from t1;
diff --git a/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test b/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test
index 6130933b279..dcee5940907 100644
--- a/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test
+++ b/storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test
@@ -40,16 +40,16 @@ CREATE TABLE t1 (
b INT
) ENGINE=TokuDB;
-INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
+INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5),(7,7,7),(8,8,8),(9,9,9);
COMMIT;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT @@tx_isolation;
START TRANSACTION;
-EXPLAIN SELECT * FROM t1 WHERE a >= 2 FOR UPDATE;
+EXPLAIN SELECT * FROM t1 WHERE a >= 8 FOR UPDATE;
-SELECT * FROM t1 WHERE a >= 2 FOR UPDATE;
+SELECT * FROM t1 WHERE a >= 8 FOR UPDATE;
connection con2;
@@ -58,7 +58,7 @@ SET TOKUDB_LOCK_TIMEOUT=2;
START TRANSACTION;
--error ER_LOCK_WAIT_TIMEOUT
-INSERT INTO t1 VALUES (2,2,2);
+INSERT INTO t1 VALUES (8,8,8);
ROLLBACK;
connection con1;
diff --git a/storage/tokudb/mysql-test/tokudb/t/type_blob.test b/storage/tokudb/mysql-test/tokudb/t/type_blob.test
index 6a429c46a55..c66986e6c71 100644
--- a/storage/tokudb/mysql-test/tokudb/t/type_blob.test
+++ b/storage/tokudb/mysql-test/tokudb/t/type_blob.test
@@ -133,8 +133,6 @@ select c,count(*) from t1 group by c;
select d,count(*) from t1 group by d;
drop table t1;
--- error 1071
-create table t1 (a text, unique (a(21000))); # should give an error
create table t1 (a text, key (a(2100))); # key is auto-truncated
replace_regex /ENGINE=[a-zA-Z]*/ENGINE=ENGINE/;
show create table t1;
@@ -366,6 +364,7 @@ create table t1 (id integer primary key auto_increment, txt text, index txt_inde
insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL);
select * from t1 where txt='Chevy' or txt is NULL;
explain select * from t1 where txt='Chevy' or txt is NULL;
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL;
select * from t1 where txt='Chevy ';
select * from t1 where txt='Chevy ' or txt='Chevy';
select * from t1 where txt='Chevy' or txt='Chevy ';
@@ -386,8 +385,10 @@ select * from t1 where txt > 'Chevy';
select * from t1 where txt >= 'Chevy';
alter table t1 modify column txt blob;
explain select * from t1 where txt='Chevy' or txt is NULL;
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL;
select * from t1 where txt='Chevy' or txt is NULL;
explain select * from t1 where txt='Chevy' or txt is NULL order by txt;
+explain select * from t1 FORCE INDEX (`txt_index`) where txt='Chevy' or txt is NULL order by txt;
select * from t1 where txt='Chevy' or txt is NULL order by txt;
drop table t1;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result
index 88f28362119..80402df665d 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_with_lock_sps.result
@@ -20,7 +20,7 @@ z a b c
999 4 40 400
explain select * from foo where b > 20;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE foo range b b 5 NULL 2 Using where; Using index
+1 SIMPLE foo index b b 5 NULL 4 Using where; Using index
select* from foo where b > 10;
z a b c
999 2 20 200
@@ -40,7 +40,7 @@ a b c
4 40 400
explain select * from foo where b > 20;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE foo range b b 5 NULL 2 Using where; Using index
+1 SIMPLE foo index b b 5 NULL 4 Using where; Using index
select* from foo where b > 10;
a b c
2 20 200
@@ -59,7 +59,7 @@ a b c z
4 40 400 NULL
explain select * from foo where b > 20;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE foo range b b 5 NULL 2 Using where; Using index
+1 SIMPLE foo index b b 5 NULL 4 Using where; Using index
select* from foo where b > 10;
a b c z
2 20 200 NULL
@@ -94,7 +94,7 @@ a b c
3 30 300
4 40 400
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE foo range b b 5 NULL 2 Using where; Using index
+1 SIMPLE foo index b b 5 NULL 4 Using where; Using index
a b c
2 20 200
3 30 300
@@ -110,7 +110,7 @@ a b c
4 40 400
explain select * from foo where b > 20;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE foo range b b 5 NULL 2 Using where; Using index
+1 SIMPLE foo index b b 5 NULL 4 Using where; Using index
select* from foo where b > 10;
a b c
2 20 200
@@ -154,7 +154,7 @@ a b c g
4 40 400 NULL
5 50 500 NULL
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE foo range b b 5 NULL 3 Using where; Using index
+1 SIMPLE foo index b b 5 NULL 5 Using where; Using index
set autocommit=on;
explain select * from foo;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/disabled.def b/storage/tokudb/mysql-test/tokudb_bugs/disabled.def
index d0d1a47e006..b88809fadc2 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/disabled.def
+++ b/storage/tokudb/mysql-test/tokudb_bugs/disabled.def
@@ -1,2 +1,3 @@
5585: times out, too many huge insert...selects
db233: different execution path in mariadb, debug_sync point is not hit
+5733_tokudb: not stable results
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result
index 10cdb4767f6..ba21899ed92 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result
@@ -10003,25 +10003,25 @@ insert into t values (9998,0);
insert into t values (9999,0);
explain select id from t where id>0 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t where id>0 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where
explain select id from t where id>1000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t where id>1000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where
explain select id from t where id>5000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t where id>5000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where
explain select id from t where id>6000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t where id>6000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result
index 1db2c5746e2..0a736a97ec9 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result
@@ -10009,7 +10009,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where
explain select id from t where id>1000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where; Using index
+1 SIMPLE t index PRIMARY PRIMARY 8 NULL # Using where; Using index
explain select * from t where id>1000 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t range PRIMARY PRIMARY 8 NULL # Using where
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/PS-3773.result b/storage/tokudb/mysql-test/tokudb_bugs/r/PS-3773.result
index c870ac1c784..14c5554b754 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/PS-3773.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/PS-3773.result
@@ -1,3 +1,4 @@
+# restart: --log-error=MYSQLTEST_VARDIR/tmp/tokudb.bugs.PS-3773.log
CREATE TABLE t1(a INT, b INT, c INT, PRIMARY KEY(a), KEY(b)) ENGINE=TokuDB;
SET tokudb_auto_analyze=0;
INSERT INTO t1 VALUES(0,0,0), (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5);
@@ -6,3 +7,4 @@ SELECT * FROM t1 WHERE b = 2;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
DROP TABLE t1;
FOUND 1 /ha_tokudb::read_full_row on table/ in tokudb.bugs.PS-3773.log
+# restart
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/bulk_fetch.result b/storage/tokudb/mysql-test/tokudb_bugs/r/bulk_fetch.result
index 86943c2d2f6..70201e3a8bb 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/bulk_fetch.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/bulk_fetch.result
@@ -60,13 +60,11 @@ c
400
500
600
-explain select * from foo where c > 300;
+explain select * from foo where c > 500;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE foo range c c 5 NULL 3 Using where; Using index
-select * from foo where c > 300;
+1 SIMPLE foo range c c 5 NULL 1 Using where; Using index
+select * from foo where c > 500;
a b c
-4 40 400
-5 50 500
6 60 600
drop table foo;
create table foo (a int, b int);
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash.result
index 70bc86e1abc..fb4718353be 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -13,9 +15,11 @@ t 0 PRIMARY 1 id A 6 NULL NULL BTREE
t 1 x 1 x A 6 NULL NULL YES BTREE
analyze table t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 6 NULL NULL BTREE
t 1 x 1 x A 6 NULL NULL YES BTREE
+set @@use_stat_tables= @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1.result
index b6d9fd7da85..9746eb81aa1 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -12,9 +14,11 @@ t 0 PRIMARY 1 id A 4 NULL NULL BTREE
t 1 x 1 x A 4 NULL NULL YES BTREE
analyze table t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 4 NULL NULL BTREE
t 1 x 1 x A 4 NULL NULL YES BTREE
+set @@use_stat_tables= @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1_pick.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1_pick.result
index caaa963c325..f92bc361547 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1_pick.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_1_pick.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -13,9 +15,11 @@ t 0 PRIMARY 1 id A 7 NULL NULL BTREE
t 1 x 1 x A 7 NULL NULL YES BTREE
analyze table t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 7 NULL NULL BTREE
-t 1 x 1 x A 7 NULL NULL YES BTREE
+t 1 x 1 x A 3 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2.result
index 6d345d98c95..02939dba662 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -12,9 +14,11 @@ t 0 PRIMARY 1 id A 4 NULL NULL BTREE
t 1 x 1 x A 4 NULL NULL YES BTREE
analyze table t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 4 NULL NULL BTREE
t 1 x 1 x A 4 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2_pick.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2_pick.result
index 06639c311cf..cb4dfbf9d9b 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2_pick.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db756_card_part_hash_2_pick.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= 'COMPLEMENTARY';
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -13,9 +15,11 @@ t 0 PRIMARY 1 id A 7 NULL NULL BTREE
t 1 x 1 x A 7 NULL NULL YES BTREE
analyze table t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 7 NULL NULL BTREE
t 1 x 1 x A 7 NULL NULL YES BTREE
+set @@use_stat_tables= @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db757_part_alter_analyze.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db757_part_alter_analyze.result
index 62337802688..c9b32d51471 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db757_part_alter_analyze.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db757_part_alter_analyze.result
@@ -1,5 +1,7 @@
set default_storage_engine='tokudb';
drop table if exists t;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, y int, primary key (id), key (x), key (y))
partition by range(id)
( partition p0 values less than (10), partition p1 values less than maxvalue);
@@ -11,6 +13,7 @@ t 1 x 1 x A 5 NULL NULL YES BTREE
t 1 y 1 y A 5 NULL NULL YES BTREE
alter table t analyze partition p0;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -19,6 +22,7 @@ t 1 x 1 x A 5 NULL NULL YES BTREE
t 1 y 1 y A 5 NULL NULL YES BTREE
alter table t analyze partition p1;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -33,6 +37,7 @@ t 1 x 1 x A 9 NULL NULL YES BTREE
t 1 y 1 y A 9 NULL NULL YES BTREE
alter table t analyze partition p0;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -41,10 +46,12 @@ t 1 x 1 x A 9 NULL NULL YES BTREE
t 1 y 1 y A 9 NULL NULL YES BTREE
alter table t analyze partition p1;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
show indexes from t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t 0 PRIMARY 1 id A 9 NULL NULL BTREE
t 1 x 1 x A 9 NULL NULL YES BTREE
t 1 y 1 y A 9 NULL NULL YES BTREE
+set @@use_stat_tables = @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store.result b/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store.result
index 65503b908ca..2f025dcfb3d 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store.result
@@ -2,6 +2,7 @@ SET DEFAULT_STORAGE_ENGINE = 'tokudb';
DROP TABLE IF EXISTS foo,bar;
create table foo (a int, b int);
create table bar (a int, key(a));
+# restart
show create table foo;
Table Create Table
foo CREATE TABLE `foo` (
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store2.result b/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store2.result
index b202da70fcf..f661af9a20e 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store2.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store2.result
@@ -5,6 +5,7 @@ create table foo (a bigint, b bigint);
create table bar (a int);
alter table foo drop column a;
alter table bar add column b int, add column c int;
+# restart
show create table foo;
Table Create Table
foo CREATE TABLE `foo` (
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store3.result b/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store3.result
index 08f157f5223..ca33bc0c64b 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store3.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/frm_store3.result
@@ -4,6 +4,7 @@ create table foo (a int, b int, key(b,a), primary key (a))engine=TokuDB;
create table bar (a bigint)engine=TokuDB;
alter table foo drop index b;
alter table bar add index (a);
+# restart
show create table foo;
Table Create Table
foo CREATE TABLE `foo` (
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/index_read.result b/storage/tokudb/mysql-test/tokudb_bugs/r/index_read.result
index 5d5c4d43cd8..5a5ba28bb82 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/index_read.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/index_read.result
@@ -150,13 +150,11 @@ a b c
2 20 200
1 100 100
1 10 100
-explain select * from foo where a>=4;
+explain select * from foo where a>=5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo range a a 4 NULL NULL; Using where
-select * from foo where a>=4;
+select * from foo where a>=5;
a b c
-4 40 400
-4 400 400
5 50 500
5 500 500
6 60 600
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/bulk_fetch.test b/storage/tokudb/mysql-test/tokudb_bugs/t/bulk_fetch.test
index 41b8f1fa37f..11ce1e74b8c 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/bulk_fetch.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/bulk_fetch.test
@@ -26,8 +26,8 @@ alter table foo drop index b;
alter table foo add index c(c) clustering=yes;
select c from foo;
-explain select * from foo where c > 300;
-select * from foo where c > 300;
+explain select * from foo where c > 500;
+select * from foo where c > 500;
drop table foo;
# simple test on hidden primary key
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash.test
index 97dda1cb1b8..440a79a43d7 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash.test
@@ -5,6 +5,8 @@ set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
insert into t values (1,1),(3,1),(5,1);
@@ -12,4 +14,5 @@ insert into t values (2,1),(4,1),(6,1);
show indexes from t;
analyze table t;
show indexes from t;
+set @@use_stat_tables= @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1.test
index 3ef66a4b1e6..b395b70b62c 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1.test
@@ -5,10 +5,14 @@ set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= COMPLEMENTARY;
+
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
insert into t values (1,1),(3,1),(5,1);
show indexes from t;
analyze table t;
show indexes from t;
+set @@use_stat_tables= @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1_pick.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1_pick.test
index b8044641109..c96c58f31ed 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1_pick.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_1_pick.test
@@ -5,6 +5,8 @@ set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
insert into t values (1,1),(3,2),(5,3);
@@ -12,4 +14,5 @@ insert into t values (2,1),(4,1),(6,1),(8,1);
show indexes from t;
analyze table t;
show indexes from t;
+set @@use_stat_tables = @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2.test
index ca10218cb05..de32dfd7f54 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2.test
@@ -5,10 +5,14 @@ set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
+
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
insert into t values (2,1),(4,1),(6,1);
show indexes from t;
analyze table t;
show indexes from t;
+set @@use_stat_tables = @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2_pick.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2_pick.test
index 2cc55ec864d..999ce6ba14f 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2_pick.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db756_card_part_hash_2_pick.test
@@ -5,6 +5,9 @@ set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
+
+set @save_use_stat_tables= @@use_stat_tables;
+set @@use_stat_tables= 'COMPLEMENTARY';
create table t (id int, x int, primary key (id), key (x)) partition by hash(id) partitions 2;
show indexes from t;
insert into t values (1,1),(3,2),(5,3),(7,4);
@@ -12,4 +15,5 @@ insert into t values (2,1),(4,1),(6,1);
show indexes from t;
analyze table t;
show indexes from t;
+set @@use_stat_tables= @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db757_part_alter_analyze.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db757_part_alter_analyze.test
index fc1599591be..ab9d816be4b 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db757_part_alter_analyze.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db757_part_alter_analyze.test
@@ -4,6 +4,8 @@ set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
+set @save_use_stat_tables = @@use_stat_tables;
+set @@use_stat_tables = COMPLEMENTARY;
create table t (id int, x int, y int, primary key (id), key (x), key (y))
partition by range(id)
@@ -22,5 +24,6 @@ alter table t analyze partition p0;
show indexes from t;
alter table t analyze partition p1;
show indexes from t;
+set @@use_stat_tables = @save_use_stat_tables;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/index_read.test b/storage/tokudb/mysql-test/tokudb_bugs/t/index_read.test
index 03664415349..c79a6341b3a 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/index_read.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/index_read.test
@@ -117,8 +117,8 @@ select * from foo where a<3 order by a desc;
#HA_READ_KEY_OR_NEXT
# ignore rows column
--replace_column 9 NULL;
-explain select * from foo where a>=4;
-select * from foo where a>=4;
+explain select * from foo where a>=5;
+select * from foo where a>=5;
#HA_READ_KEY_OR_PREV not used anymore
diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/clustering.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/clustering.result
index 28c758ff628..fca204e28eb 100644
--- a/storage/tokudb/mysql-test/tokudb_mariadb/r/clustering.result
+++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/clustering.result
@@ -12,6 +12,7 @@ insert t1 values (1, 1, 1);
insert t1 select a+1, a+1, a+1 from t1;
insert t1 select a+2, a+2, a+2 from t1;
insert t1 select a+4, a+4, a+4 from t1;
+insert t1 select a+8, a+8, a+8 from t1;
select * from t1;
a b c
1 1 1
@@ -22,10 +23,18 @@ a b c
6 6 6
7 7 7
8 8 8
-explain select a,c from t1 where a > 2;
+9 9 9
+10 10 10
+11 11 11
+12 12 12
+13 13 13
+14 14 14
+15 15 15
+16 16 16
+explain select a,c from t1 where a > 4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 6 Using where; Using index
-explain select b,c from t1 where b > 2;
+1 SIMPLE t1 index a a 5 NULL 16 Using where; Using index
+explain select b,c from t1 where b > 4;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL b NULL NULL NULL 8 Using where
+1 SIMPLE t1 ALL b NULL NULL NULL 16 Using where
drop table t1;
diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/clustering.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/clustering.test
index 58d806ee365..ce7ef42a7f3 100644
--- a/storage/tokudb/mysql-test/tokudb_mariadb/t/clustering.test
+++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/clustering.test
@@ -6,10 +6,11 @@ insert t1 values (1, 1, 1);
insert t1 select a+1, a+1, a+1 from t1;
insert t1 select a+2, a+2, a+2 from t1;
insert t1 select a+4, a+4, a+4 from t1;
+insert t1 select a+8, a+8, a+8 from t1;
select * from t1;
-explain select a,c from t1 where a > 2;
-explain select b,c from t1 where b > 2;
+explain select a,c from t1 where a > 4;
+explain select b,c from t1 where b > 4;
drop table t1;
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result
index 410e6fd0ba2..994be80c4fe 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result
@@ -517,6 +517,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1009,6 +1010,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1516,6 +1518,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2017,6 +2020,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2516,6 +2520,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3026,6 +3031,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3538,6 +3544,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4038,6 +4045,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4531,6 +4539,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5023,6 +5032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5530,6 +5540,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6031,6 +6042,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6530,6 +6542,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7040,6 +7053,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7552,6 +7566,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8052,6 +8067,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8562,6 +8578,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9070,6 +9087,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9593,6 +9611,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10110,6 +10129,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10625,6 +10645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11151,6 +11172,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11679,6 +11701,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12195,6 +12218,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12704,6 +12728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13212,6 +13237,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13735,6 +13761,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14252,6 +14279,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14767,6 +14795,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15293,6 +15322,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15821,6 +15851,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16337,6 +16368,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16832,6 +16864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17325,6 +17358,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17833,6 +17867,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18335,6 +18370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18835,6 +18871,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19346,6 +19383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19859,6 +19897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20360,6 +20399,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20854,6 +20894,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21347,6 +21388,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21855,6 +21897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22357,6 +22400,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22857,6 +22901,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23368,6 +23413,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23881,6 +23927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24382,6 +24429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24876,6 +24924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25369,6 +25418,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25877,6 +25927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26379,6 +26430,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26879,6 +26931,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27390,6 +27443,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27903,6 +27957,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28404,6 +28459,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result
index 093dbbe11c5..8b57e929951 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result
@@ -835,6 +835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1327,6 +1328,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1834,6 +1836,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2335,6 +2338,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2836,6 +2840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3346,6 +3351,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3858,6 +3864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4358,6 +4365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4851,6 +4859,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5343,6 +5352,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5850,6 +5860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6351,6 +6362,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6852,6 +6864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7362,6 +7375,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7874,6 +7888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8374,6 +8389,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8884,6 +8900,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9392,6 +9409,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9915,6 +9933,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10432,6 +10451,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10949,6 +10969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11475,6 +11496,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12003,6 +12025,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12519,6 +12542,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13028,6 +13052,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13536,6 +13561,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14059,6 +14085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14576,6 +14603,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15093,6 +15121,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15619,6 +15648,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16147,6 +16177,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16663,6 +16694,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result
index a05ce5cb71b..7103426b454 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result
@@ -464,6 +464,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -904,6 +905,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1359,6 +1361,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1808,6 +1811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2257,6 +2261,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2715,6 +2720,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3175,6 +3181,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3623,6 +3630,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4064,6 +4072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4504,6 +4513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4959,6 +4969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5408,6 +5419,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5857,6 +5869,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6315,6 +6328,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6775,6 +6789,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7223,6 +7238,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7680,6 +7696,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8136,6 +8153,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8607,6 +8625,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9072,6 +9091,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9537,6 +9557,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10011,6 +10032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10487,6 +10509,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10951,6 +10974,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11396,6 +11420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11836,6 +11861,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12291,6 +12317,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12740,6 +12767,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13187,6 +13215,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13645,6 +13674,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14105,6 +14135,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14553,6 +14584,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14994,6 +15026,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15434,6 +15467,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15889,6 +15923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16338,6 +16373,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16785,6 +16821,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17243,6 +17280,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17703,6 +17741,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18151,6 +18190,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18609,6 +18649,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19065,6 +19106,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19536,6 +19578,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20001,6 +20044,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20464,6 +20508,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20938,6 +20983,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21414,6 +21460,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21878,6 +21925,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22335,6 +22383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22791,6 +22840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23262,6 +23312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23727,6 +23778,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24190,6 +24242,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24664,6 +24717,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25140,6 +25194,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25604,6 +25659,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26046,6 +26102,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26486,6 +26543,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26941,6 +26999,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27390,6 +27449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27837,6 +27897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28295,6 +28356,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28755,6 +28817,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29203,6 +29266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29644,6 +29708,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30084,6 +30149,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30539,6 +30605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30988,6 +31055,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31435,6 +31503,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31893,6 +31962,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32353,6 +32423,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32801,6 +32872,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33258,6 +33330,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33714,6 +33787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34185,6 +34259,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34650,6 +34725,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35113,6 +35189,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35587,6 +35664,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36063,6 +36141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36527,6 +36606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result
index a398ac33f42..eba06e441c9 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result
@@ -481,6 +481,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -937,6 +938,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1408,6 +1410,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1873,6 +1876,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2338,6 +2342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2812,6 +2817,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3288,6 +3294,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3752,6 +3759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4248,6 +4256,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4742,6 +4751,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5251,6 +5261,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5754,6 +5765,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6257,6 +6269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6769,6 +6782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7283,6 +7297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7785,6 +7800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8280,6 +8296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8774,6 +8791,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9283,6 +9301,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9786,6 +9805,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10289,6 +10309,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10801,6 +10822,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11315,6 +11337,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11817,6 +11840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12327,6 +12351,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12835,6 +12860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13358,6 +13384,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13875,6 +13902,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14392,6 +14420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14918,6 +14947,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15446,6 +15476,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15962,6 +15993,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16471,6 +16503,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16979,6 +17012,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17502,6 +17536,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18019,6 +18054,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18536,6 +18572,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19062,6 +19099,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19590,6 +19628,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20106,6 +20145,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result
index 60cc765a570..6acd1198d16 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result
@@ -477,6 +477,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -933,6 +934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1404,6 +1406,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1869,6 +1872,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2332,6 +2336,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2806,6 +2811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3282,6 +3288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3746,6 +3753,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4243,6 +4251,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4738,6 +4747,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5248,6 +5258,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5752,6 +5763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6254,6 +6266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6767,6 +6780,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7282,6 +7296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7785,6 +7800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8281,6 +8297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8776,6 +8793,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9286,6 +9304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9790,6 +9809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10292,6 +10312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10805,6 +10826,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11320,6 +11342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11823,6 +11846,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12333,6 +12357,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12841,6 +12866,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13364,6 +13390,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13881,6 +13908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14396,6 +14424,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14922,6 +14951,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15450,6 +15480,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15966,6 +15997,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16475,6 +16507,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16983,6 +17016,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17506,6 +17540,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18023,6 +18058,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18538,6 +18574,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19064,6 +19101,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19592,6 +19630,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20108,6 +20147,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result
index 0b5d8289ecc..6f58b3de45a 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result
@@ -483,6 +483,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -941,6 +942,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1414,6 +1416,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1879,6 +1882,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2346,6 +2350,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2820,6 +2825,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3298,6 +3304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3764,6 +3771,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4261,6 +4269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4757,6 +4766,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5268,6 +5278,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5771,6 +5782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6276,6 +6288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6788,6 +6801,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7304,6 +7318,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7808,6 +7823,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8305,6 +8321,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8801,6 +8818,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9312,6 +9330,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9815,6 +9834,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10320,6 +10340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10832,6 +10853,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11348,6 +11370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11852,6 +11875,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12364,6 +12388,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12874,6 +12899,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13399,6 +13425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13916,6 +13943,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14435,6 +14463,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14961,6 +14990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15491,6 +15521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16009,6 +16040,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16520,6 +16552,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17030,6 +17063,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17555,6 +17589,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18072,6 +18107,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18591,6 +18627,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19117,6 +19154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19647,6 +19685,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20165,6 +20204,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result
index 67bae3acecb..2a1049bb5ee 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result
@@ -479,6 +479,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -938,6 +939,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1412,6 +1414,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1882,6 +1885,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2350,6 +2354,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2829,6 +2834,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3308,6 +3314,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3775,6 +3782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4275,6 +4283,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4773,6 +4782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5286,6 +5296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5795,6 +5806,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6302,6 +6314,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6820,6 +6833,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7338,6 +7352,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7844,6 +7859,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8343,6 +8359,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8841,6 +8858,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9354,6 +9372,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9863,6 +9882,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10370,6 +10390,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10888,6 +10909,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11406,6 +11428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11912,6 +11935,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12425,6 +12449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12936,6 +12961,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13462,6 +13488,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13984,6 +14011,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14504,6 +14532,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15035,6 +15064,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15566,6 +15596,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16085,6 +16116,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16597,6 +16629,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17108,6 +17141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17634,6 +17668,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18156,6 +18191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18676,6 +18712,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19207,6 +19244,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19738,6 +19776,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20257,6 +20296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result
index 808f646dd48..27c473e0a5a 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result
@@ -60,6 +60,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -483,6 +484,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -519,6 +521,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -945,6 +948,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -989,6 +993,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1418,6 +1423,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1460,6 +1466,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1885,6 +1892,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1925,6 +1933,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2352,6 +2361,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2396,6 +2406,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2828,6 +2839,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2872,6 +2884,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3306,6 +3319,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3346,6 +3360,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3772,6 +3787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3810,6 +3826,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4233,6 +4250,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4269,6 +4287,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4695,6 +4714,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4739,6 +4759,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5168,6 +5189,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5210,6 +5232,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5635,6 +5658,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5675,6 +5699,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6102,6 +6127,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6146,6 +6172,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6578,6 +6605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6622,6 +6650,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7056,6 +7085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7096,6 +7126,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7522,6 +7553,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7983,6 +8015,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8445,6 +8478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8918,6 +8952,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9385,6 +9420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9852,6 +9888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10328,6 +10365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10806,6 +10844,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11272,6 +11311,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11733,6 +11773,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12195,6 +12236,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12668,6 +12710,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13135,6 +13178,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13602,6 +13646,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14078,6 +14123,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14556,6 +14602,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15022,6 +15069,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15060,6 +15108,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15483,6 +15532,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15519,6 +15569,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15945,6 +15996,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15989,6 +16041,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16418,6 +16471,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16460,6 +16514,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16885,6 +16940,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16925,6 +16981,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17352,6 +17409,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17396,6 +17454,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17828,6 +17887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17872,6 +17932,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18306,6 +18367,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18346,6 +18408,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18772,6 +18835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19236,6 +19300,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19698,6 +19763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20171,6 +20237,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20638,6 +20705,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21105,6 +21173,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21581,6 +21650,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22059,6 +22129,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22525,6 +22596,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22986,6 +23058,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23448,6 +23521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23921,6 +23995,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24388,6 +24463,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24855,6 +24931,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25331,6 +25408,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25809,6 +25887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26275,6 +26354,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26736,6 +26816,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27198,6 +27279,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27671,6 +27753,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28138,6 +28221,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28605,6 +28689,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29081,6 +29166,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29559,6 +29645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30025,6 +30112,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30486,6 +30574,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30948,6 +31037,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31421,6 +31511,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31888,6 +31979,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32355,6 +32447,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32831,6 +32924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33309,6 +33403,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33775,6 +33870,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34236,6 +34332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34698,6 +34795,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35171,6 +35269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35638,6 +35737,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36105,6 +36205,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36581,6 +36682,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37059,6 +37161,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37525,6 +37628,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37990,6 +38094,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38453,6 +38558,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38927,6 +39033,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39395,6 +39502,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39863,6 +39971,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40340,6 +40449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40819,6 +40929,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41286,6 +41397,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41748,6 +41860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42211,6 +42324,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42685,6 +42799,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43153,6 +43268,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43621,6 +43737,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44098,6 +44215,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44577,6 +44695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45044,6 +45163,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45505,6 +45625,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45967,6 +46088,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46440,6 +46562,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46907,6 +47030,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47374,6 +47498,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47850,6 +47975,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48328,6 +48454,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48794,6 +48921,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49255,6 +49383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49717,6 +49846,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50190,6 +50320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50657,6 +50788,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51124,6 +51256,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51600,6 +51733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52078,6 +52212,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52544,6 +52679,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53006,6 +53142,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53469,6 +53606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53943,6 +54081,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54411,6 +54550,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54879,6 +55019,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55356,6 +55497,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55835,6 +55977,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56302,6 +56445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56764,6 +56908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57224,6 +57369,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57695,6 +57841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58160,6 +58307,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58625,6 +58773,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59099,6 +59248,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59575,6 +59725,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60039,6 +60190,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60498,6 +60650,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60958,6 +61111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61429,6 +61583,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61894,6 +62049,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62359,6 +62515,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62833,6 +62990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63309,6 +63467,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63773,6 +63932,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -64552,6 +64712,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65012,6 +65173,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65483,6 +65645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65948,6 +66111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66413,6 +66577,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66887,6 +67052,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67363,6 +67529,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67827,6 +67994,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68291,6 +68459,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68753,6 +68922,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69226,6 +69396,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69693,6 +69864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70160,6 +70332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70636,6 +70809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71114,6 +71288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71580,6 +71755,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72041,6 +72217,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72503,6 +72680,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72976,6 +73154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73443,6 +73622,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73910,6 +74090,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74386,6 +74567,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74864,6 +75046,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75330,6 +75513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75791,6 +75975,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76253,6 +76438,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76726,6 +76912,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77193,6 +77380,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77660,6 +77848,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78136,6 +78325,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78614,6 +78804,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79080,6 +79271,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79541,6 +79733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80003,6 +80196,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80476,6 +80670,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80943,6 +81138,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81410,6 +81606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81886,6 +82083,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82364,6 +82562,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82830,6 +83029,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83291,6 +83491,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83753,6 +83954,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84226,6 +84428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84693,6 +84896,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85160,6 +85364,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85636,6 +85841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86114,6 +86320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86580,6 +86787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87039,6 +87247,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87493,6 +87702,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87955,6 +88165,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88415,6 +88626,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88873,6 +89085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89335,6 +89548,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89797,6 +90011,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -90255,6 +90470,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result
index ae20097fdda..8c19f82b9b6 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result
@@ -484,6 +484,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -939,6 +940,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1409,6 +1411,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1873,6 +1876,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2337,6 +2341,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2810,6 +2815,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3289,6 +3295,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3752,6 +3759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4209,6 +4217,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4664,6 +4673,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5134,6 +5144,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5598,6 +5609,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6060,6 +6072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6533,6 +6546,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7008,6 +7022,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7471,6 +7486,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7969,6 +7985,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8461,6 +8478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8968,6 +8986,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9469,6 +9488,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9970,6 +9990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10480,6 +10501,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10996,6 +11018,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11496,6 +11519,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11989,6 +12013,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12481,6 +12506,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12988,6 +13014,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13489,6 +13516,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13990,6 +14018,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14500,6 +14529,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15016,6 +15046,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15516,6 +15547,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16025,6 +16057,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16533,6 +16566,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17056,6 +17090,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17573,6 +17608,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18090,6 +18126,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18616,6 +18653,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19148,6 +19186,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19664,6 +19703,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20162,6 +20202,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20654,6 +20695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21161,6 +21203,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21662,6 +21705,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22161,6 +22205,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22671,6 +22716,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23183,6 +23229,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23683,6 +23730,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24176,6 +24224,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24668,6 +24717,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25175,6 +25225,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25676,6 +25727,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26175,6 +26227,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26685,6 +26738,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27197,6 +27251,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27697,6 +27752,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28206,6 +28262,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28714,6 +28771,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29237,6 +29295,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29754,6 +29813,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30269,6 +30329,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30795,6 +30856,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31323,6 +31385,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31839,6 +31902,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result
index a921ba0f56d..028809cd36b 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result
@@ -475,6 +475,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -933,6 +934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1395,6 +1397,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1920,6 +1923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2421,6 +2425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2883,6 +2888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3342,6 +3348,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3804,6 +3811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4269,6 +4277,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4723,6 +4732,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5178,6 +5188,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc0_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc0_tokudb.result
index 4c30d47f526..558c3cbdff4 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc0_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc0_tokudb.result
@@ -1020,6 +1020,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc10_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc10_tokudb.result
index 6ccd9afefab..1c2f23a277b 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc10_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc10_tokudb.result
@@ -949,6 +949,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc1_tokudb.result
index fce0d496032..76418679582 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_mgm_lc1_tokudb.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/storage/tokudb/mysql-test/tokudb_rpl/r/mdev12179.result b/storage/tokudb/mysql-test/tokudb_rpl/r/mdev12179.result
index d4532eec4e2..d79e7e59aa4 100644
--- a/storage/tokudb/mysql-test/tokudb_rpl/r/mdev12179.result
+++ b/storage/tokudb/mysql-test/tokudb_rpl/r/mdev12179.result
@@ -2,6 +2,7 @@ include/master-slave.inc
[connection master]
connection server_2;
include/stop_slave.inc
+SET GLOBAL gtid_cleanup_batch_size = 999999999;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET sql_log_bin=0;
CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos;
@@ -41,6 +42,8 @@ a
1
SELECT * FROM mysql.gtid_slave_pos ORDER BY sub_id;
domain_id sub_id server_id seq_no
+0 1 1 1
+0 2 1 2
0 3 1 3
0 4 1 4
SELECT * FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
@@ -121,6 +124,21 @@ Transactions_multi_engine 6
DELETE FROM t1 WHERE a >= 100;
DELETE FROM t2 WHERE a >= 100;
DELETE FROM t3 WHERE a >= 100;
+connection server_1;
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos;
+COUNT(*)>=10
+1
+SELECT COUNT(*)>=10 FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
+UNION ALL SELECT * FROM mysql.gtid_slave_pos_innodb_redundant) inner_select;
+COUNT(*)>=10
+1
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos_tokudb;
+COUNT(*)>=10
+1
+SET GLOBAL gtid_cleanup_batch_size = 3;
connection server_2;
include/stop_slave.inc
SET sql_log_bin=0;
diff --git a/storage/tokudb/mysql-test/tokudb_rpl/t/mdev12179.test b/storage/tokudb/mysql-test/tokudb_rpl/t/mdev12179.test
index fab7f6e1cbc..a87da95a220 100644
--- a/storage/tokudb/mysql-test/tokudb_rpl/t/mdev12179.test
+++ b/storage/tokudb/mysql-test/tokudb_rpl/t/mdev12179.test
@@ -4,6 +4,12 @@
--connection server_2
--source include/stop_slave.inc
+
+# Set GTID cleanup limit high enough that cleanup will not run and we
+# can rely on consistent table output in .result.
+--let $old_gtid_cleanup_batch_size=`SELECT @@GLOBAL.gtid_cleanup_batch_size`
+SET GLOBAL gtid_cleanup_batch_size = 999999999;
+
CHANGE MASTER TO master_use_gtid=slave_pos;
SET sql_log_bin=0;
CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos;
@@ -89,6 +95,82 @@ DELETE FROM t2 WHERE a >= 100;
DELETE FROM t3 WHERE a >= 100;
+# Create a bunch more GTIDs in mysql.gtid_slave_pos* tables to test with.
+--connection server_1
+--disable_query_log
+let $i=10;
+while ($i) {
+ eval INSERT INTO t1 VALUES (300+$i);
+ eval INSERT INTO t2 VALUES (300+$i);
+ eval INSERT INTO t3 VALUES (300+$i);
+ dec $i;
+}
+--enable_query_log
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+
+# Check that we have many rows in mysql.gtid_slave_pos now (since
+# @@gtid_cleanup_batch_size was set to a huge value). No need to check
+# for an exact number, since that will require changing .result if
+# anything changes prior to this point, and we just need to know that
+# we have still have some data in the tables to make the following
+# test effective.
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos;
+SELECT COUNT(*)>=10 FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
+ UNION ALL SELECT * FROM mysql.gtid_slave_pos_innodb_redundant) inner_select;
+SELECT COUNT(*)>=10 FROM mysql.gtid_slave_pos_tokudb;
+
+# Check that old GTID rows will be deleted when batch delete size is
+# set reasonably. Old row deletion is not 100% deterministic (by design), so
+# we must wait for it to occur, but it should occur eventually.
+SET GLOBAL gtid_cleanup_batch_size = 3;
+let $i=40;
+--disable_query_log
+--let $keep_include_silent=1
+while ($i) {
+ let N=`SELECT 1+($i MOD 3)`;
+ --connection server_1
+ eval UPDATE t$N SET a=a+1 WHERE a=(SELECT MAX(a) FROM t$N);
+ --source include/save_master_gtid.inc
+ --connection server_2
+ --source include/sync_with_master_gtid.inc
+ let $j=50;
+ while ($j) {
+ let $is_done=`SELECT SUM(a)=1 FROM (
+ SELECT COUNT(*) AS a FROM mysql.gtid_slave_pos
+ UNION ALL
+ SELECT COUNT(*) AS a FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
+ UNION ALL SELECT * FROM mysql.gtid_slave_pos_innodb_redundant) inner_select
+ UNION ALL
+ SELECT COUNT(*) AS a FROM mysql.gtid_slave_pos_tokudb) outer_select`;
+ if ($is_done) {
+ let $j=0;
+ }
+ if (!$is_done) {
+ real_sleep 0.1;
+ dec $j;
+ }
+ }
+ dec $i;
+ if ($is_done) {
+ let $i=0;
+ }
+}
+--enable_query_log
+--let $keep_include_silent=0
+if (!$is_done) {
+ --echo Timed out waiting for mysql.gtid_slave_pos* tables to be cleaned up
+}
+
+--disable_query_log
+DELETE FROM t1 WHERE a >= 100;
+DELETE FROM t2 WHERE a >= 100;
+DELETE FROM t3 WHERE a >= 100;
+--enable_query_log
+
+
# Test status variables Rpl_transactions_multi_engine and Transactions_gtid_foreign_engine.
# Have mysql.gtid_slave_pos* for myisam and innodb but not tokudb.
--connection server_2
@@ -223,6 +305,9 @@ SHOW STATUS LIKE "%transactions%engine";
SET sql_log_bin=0;
DROP TABLE mysql.gtid_slave_pos_innodb;
SET sql_log_bin=1;
+--disable_query_log
+eval SET GLOBAL gtid_cleanup_batch_size = $old_gtid_cleanup_batch_size;
+--enable_query_log
--connection server_1
DROP TABLE t1;
diff --git a/storage/tokudb/tokudb_dir_cmd.cc b/storage/tokudb/tokudb_dir_cmd.cc
index 5431cbab7aa..d0da92eab27 100644
--- a/storage/tokudb/tokudb_dir_cmd.cc
+++ b/storage/tokudb/tokudb_dir_cmd.cc
@@ -50,11 +50,11 @@ static int MDL_and_TDC(THD *thd,
table_arg.str = const_cast<char *>(table);
table_arg.length = strlen(table);
Table_ident table_ident(thd, &db_arg, &table_arg, true);;
- thd->lex->select_lex.add_table_to_list(
+ thd->lex->first_select_lex()->add_table_to_list(
thd, &table_ident, NULL, 1, TL_UNLOCK, MDL_EXCLUSIVE, 0, 0, 0);
/* The lock will be released at the end of mysq_execute_command() */
error = lock_table_names(thd,
- thd->lex->select_lex.table_list.first,
+ thd->lex->first_select_lex()->table_list.first,
NULL,
thd->variables.lock_wait_timeout,
0);
diff --git a/storage/tokudb/tokudb_sysvars.cc b/storage/tokudb/tokudb_sysvars.cc
index c9f72f6a34d..684a952750f 100644
--- a/storage/tokudb/tokudb_sysvars.cc
+++ b/storage/tokudb/tokudb_sysvars.cc
@@ -901,7 +901,7 @@ static MYSQL_THDVAR_BOOL(
NULL,
false);
-static MYSQL_THDVAR_BOOL(
+ static MYSQL_THDVAR_BOOL(
enable_fast_upsert,
PLUGIN_VAR_THDLOCAL,
"disable slow upsert",
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 58832b25e3c..91d48a36c96 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6711,6 +6711,7 @@ static MY_COLLATION_HANDLER my_collation_handler_big5_chinese_ci=
NULL, /* init */
my_strnncoll_big5_chinese_ci,
my_strnncollsp_big5_chinese_ci,
+ my_strnncollsp_nchars_big5_chinese_ci,
my_strnxfrm_big5_chinese_ci,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -6727,6 +6728,7 @@ static MY_COLLATION_HANDLER my_collation_handler_big5_bin=
NULL, /* init */
my_strnncoll_big5_bin,
my_strnncollsp_big5_bin,
+ my_strnncollsp_nchars_big5_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -6743,6 +6745,7 @@ static MY_COLLATION_HANDLER my_collation_handler_big5_chinese_nopad_ci=
NULL, /* init */
my_strnncoll_big5_chinese_ci,
my_strnncollsp_big5_chinese_nopad_ci,
+ my_strnncollsp_nchars_big5_chinese_nopad_ci,
my_strnxfrm_big5_chinese_nopad_ci,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -6759,6 +6762,7 @@ static MY_COLLATION_HANDLER my_collation_handler_big5_nopad_bin=
NULL, /* init */
my_strnncoll_big5_bin,
my_strnncollsp_big5_nopad_bin,
+ my_strnncollsp_nchars_big5_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index c052e427322..2893aadd99f 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -125,6 +125,17 @@ static int my_strnncollsp_binary(CHARSET_INFO * cs __attribute__((unused)),
}
+static int my_strnncollsp_nchars_binary(CHARSET_INFO * cs __attribute__((unused)),
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ size_t nchars)
+{
+ set_if_smaller(slen, nchars);
+ set_if_smaller(tlen, nchars);
+ return my_strnncoll_binary(cs, s, slen, t, tlen, 0);
+}
+
+
static int my_strnncoll_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
@@ -199,6 +210,17 @@ static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
}
+static int my_strnncollsp_nchars_8bit_bin(CHARSET_INFO * cs,
+ const uchar *a, size_t a_length,
+ const uchar *b, size_t b_length,
+ size_t nchars)
+{
+ set_if_smaller(a_length, nchars);
+ set_if_smaller(b_length, nchars);
+ return my_strnncollsp_8bit_bin(cs, a, a_length, b, b_length);
+}
+
+
static int my_strnncollsp_8bit_nopad_bin(CHARSET_INFO * cs
__attribute__((unused)),
const uchar *a, size_t a_length,
@@ -219,7 +241,7 @@ static size_t my_case_str_bin(CHARSET_INFO *cs __attribute__((unused)),
static size_t my_case_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *src, size_t srclen,
- char *dst, size_t dstlen)
+ char *dst, size_t dstlen __attribute__((unused)))
{
DBUG_ASSERT(srclen <= dstlen);
memcpy(dst, src, srclen);
@@ -487,6 +509,7 @@ MY_COLLATION_HANDLER my_collation_8bit_bin_handler =
my_coll_init_8bit_bin,
my_strnncoll_8bit_bin,
my_strnncollsp_8bit_bin,
+ my_strnncollsp_nchars_8bit_bin,
my_strnxfrm_8bit_bin,
my_strnxfrmlen_simple,
my_like_range_simple,
@@ -503,6 +526,7 @@ MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler =
my_coll_init_8bit_bin,
my_strnncoll_8bit_bin,
my_strnncollsp_8bit_nopad_bin,
+ my_strnncollsp_nchars_8bit_bin,
my_strnxfrm_8bit_nopad_bin,
my_strnxfrmlen_simple,
my_like_range_simple,
@@ -519,6 +543,7 @@ static MY_COLLATION_HANDLER my_collation_binary_handler =
NULL, /* init */
my_strnncoll_binary,
my_strnncollsp_binary,
+ my_strnncollsp_nchars_binary,
my_strnxfrm_8bit_bin,
my_strnxfrmlen_simple,
my_like_range_simple,
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index 3da8458575a..aeca63a86f9 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -34667,6 +34667,7 @@ static MY_COLLATION_HANDLER my_collation_handler_cp932_japanese_ci=
NULL, /* init */
my_strnncoll_cp932_japanese_ci,
my_strnncollsp_cp932_japanese_ci,
+ my_strnncollsp_nchars_cp932_japanese_ci,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -34683,6 +34684,7 @@ static MY_COLLATION_HANDLER my_collation_handler_cp932_bin=
NULL, /* init */
my_strnncoll_cp932_bin,
my_strnncollsp_cp932_bin,
+ my_strnncollsp_nchars_cp932_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -34699,6 +34701,7 @@ static MY_COLLATION_HANDLER my_collation_handler_cp932_japanese_nopad_ci=
NULL, /* init */
my_strnncoll_cp932_japanese_ci,
my_strnncollsp_cp932_japanese_nopad_ci,
+ my_strnncollsp_nchars_cp932_japanese_nopad_ci,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -34715,6 +34718,7 @@ static MY_COLLATION_HANDLER my_collation_handler_cp932_nopad_bin=
NULL, /* init */
my_strnncoll_cp932_bin,
my_strnncollsp_cp932_nopad_bin,
+ my_strnncollsp_nchars_cp932_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index 17c4c98c24e..33d43d4dd4e 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -610,6 +610,7 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler =
NULL, /* init */
my_strnncoll_czech,
my_strnncollsp_czech,
+ my_strnncollsp_nchars_generic_8bit,
my_strnxfrm_czech,
my_strnxfrmlen_czech,
my_like_range_czech,
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index 0d1685b60cb..62e42f2f942 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -9957,6 +9957,7 @@ static MY_COLLATION_HANDLER my_collation_handler_euckr_korean_ci=
NULL, /* init */
my_strnncoll_euckr_korean_ci,
my_strnncollsp_euckr_korean_ci,
+ my_strnncollsp_nchars_euckr_korean_ci,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -9973,6 +9974,7 @@ static MY_COLLATION_HANDLER my_collation_handler_euckr_bin=
NULL, /* init */
my_strnncoll_euckr_bin,
my_strnncollsp_euckr_bin,
+ my_strnncollsp_nchars_euckr_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -9989,6 +9991,7 @@ static MY_COLLATION_HANDLER my_collation_handler_euckr_korean_nopad_ci=
NULL, /* init */
my_strnncoll_euckr_korean_ci,
my_strnncollsp_euckr_korean_nopad_ci,
+ my_strnncollsp_nchars_euckr_korean_nopad_ci,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -10005,6 +10008,7 @@ static MY_COLLATION_HANDLER my_collation_handler_euckr_nopad_bin=
NULL, /* init */
my_strnncoll_euckr_bin,
my_strnncollsp_euckr_nopad_bin,
+ my_strnncollsp_nchars_euckr_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index 6fba471134f..f61e02697a6 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -67495,6 +67495,7 @@ static MY_COLLATION_HANDLER my_collation_eucjpms_japanese_ci_handler =
NULL, /* init */
my_strnncoll_eucjpms_japanese_ci,
my_strnncollsp_eucjpms_japanese_ci,
+ my_strnncollsp_nchars_eucjpms_japanese_ci,
my_strnxfrm_mb, /* strnxfrm */
my_strnxfrmlen_simple,
my_like_range_mb, /* like_range */
@@ -67511,6 +67512,7 @@ static MY_COLLATION_HANDLER my_collation_eucjpms_bin_handler =
NULL, /* init */
my_strnncoll_eucjpms_bin,
my_strnncollsp_eucjpms_bin,
+ my_strnncollsp_nchars_eucjpms_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -67527,6 +67529,7 @@ static MY_COLLATION_HANDLER my_collation_eucjpms_japanese_nopad_ci_handler =
NULL, /* init */
my_strnncoll_eucjpms_japanese_ci,
my_strnncollsp_eucjpms_japanese_nopad_ci,
+ my_strnncollsp_nchars_eucjpms_japanese_nopad_ci,
my_strnxfrm_mb_nopad, /* strnxfrm */
my_strnxfrmlen_simple,
my_like_range_mb, /* like_range */
@@ -67543,6 +67546,7 @@ static MY_COLLATION_HANDLER my_collation_eucjpms_nopad_bin_handler =
NULL, /* init */
my_strnncoll_eucjpms_bin,
my_strnncollsp_eucjpms_nopad_bin,
+ my_strnncollsp_nchars_eucjpms_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index f776b3ad1b9..f3a8a23bf18 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -6362,6 +6362,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gb2312_chinese_ci=
NULL, /* init */
my_strnncoll_gb2312_chinese_ci,
my_strnncollsp_gb2312_chinese_ci,
+ my_strnncollsp_nchars_gb2312_chinese_ci,
my_strnxfrm_mb, /* strnxfrm */
my_strnxfrmlen_simple,
my_like_range_mb, /* like_range */
@@ -6378,6 +6379,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gb2312_bin=
NULL, /* init */
my_strnncoll_gb2312_bin,
my_strnncollsp_gb2312_bin,
+ my_strnncollsp_nchars_gb2312_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -6394,6 +6396,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gb2312_chinese_nopad_ci=
NULL, /* init */
my_strnncoll_gb2312_chinese_ci,
my_strnncollsp_gb2312_chinese_nopad_ci,
+ my_strnncollsp_nchars_gb2312_chinese_nopad_ci,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -6410,6 +6413,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gb2312_nopad_bin=
NULL, /* init */
my_strnncoll_gb2312_bin,
my_strnncollsp_gb2312_nopad_bin,
+ my_strnncollsp_nchars_gb2312_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 2e757f009ed..7d6488f727b 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -10645,6 +10645,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gbk_chinese_ci=
NULL, /* init */
my_strnncoll_gbk_chinese_ci,
my_strnncollsp_gbk_chinese_ci,
+ my_strnncollsp_nchars_gbk_chinese_ci,
my_strnxfrm_gbk_chinese_ci,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -10661,6 +10662,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gbk_bin=
NULL, /* init */
my_strnncoll_gbk_bin,
my_strnncollsp_gbk_bin,
+ my_strnncollsp_nchars_gbk_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -10677,6 +10679,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gbk_chinese_nopad_ci=
NULL, /* init */
my_strnncoll_gbk_chinese_ci,
my_strnncollsp_gbk_chinese_nopad_ci,
+ my_strnncollsp_nchars_gbk_chinese_nopad_ci,
my_strnxfrm_gbk_chinese_nopad_ci,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -10693,6 +10696,7 @@ static MY_COLLATION_HANDLER my_collation_handler_gbk_nopad_bin=
NULL, /* init */
my_strnncoll_gbk_bin,
my_strnncollsp_gbk_nopad_bin,
+ my_strnncollsp_nchars_gbk_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
index f9fa1488aa6..bcf1cc6c9f1 100644
--- a/strings/ctype-latin1.c
+++ b/strings/ctype-latin1.c
@@ -726,6 +726,7 @@ static MY_COLLATION_HANDLER my_collation_german2_ci_handler=
NULL, /* init */
my_strnncoll_latin1_de,
my_strnncollsp_latin1_de,
+ my_strnncollsp_nchars_generic_8bit,
my_strnxfrm_latin1_de,
my_strnxfrmlen_simple,
my_like_range_simple,
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 17cb51ff8cb..d150e457673 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -208,6 +208,18 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
}
+static int
+my_strnncollsp_nchars_simple(CHARSET_INFO * cs,
+ const uchar *a, size_t a_length,
+ const uchar *b, size_t b_length,
+ size_t nchars)
+{
+ set_if_smaller(a_length, nchars);
+ set_if_smaller(b_length, nchars);
+ return my_strnncollsp_simple(cs, a, a_length, b, b_length);
+}
+
+
int my_strnncollsp_simple_nopad(CHARSET_INFO * cs,
const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
@@ -237,7 +249,7 @@ size_t my_casedn_str_8bit(CHARSET_INFO * cs,char *str)
size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
- char *dst, size_t dstlen)
+ char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map= cs->to_upper;
@@ -249,7 +261,7 @@ size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
size_t my_casedn_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
- char *dst, size_t dstlen)
+ char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map=cs->to_lower;
@@ -1795,9 +1807,10 @@ ret_sign:
{
if (negative)
{
- if (ull > (ulonglong) LONGLONG_MIN)
+ if (ull >= (ulonglong) LONGLONG_MIN)
{
- *error= MY_ERRNO_ERANGE;
+ if (ull != (ulonglong) LONGLONG_MIN)
+ *error= MY_ERRNO_ERANGE;
return (ulonglong) LONGLONG_MIN;
}
*error= 0;
@@ -2095,6 +2108,7 @@ MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler =
my_coll_init_simple, /* init */
my_strnncoll_simple,
my_strnncollsp_simple,
+ my_strnncollsp_nchars_simple,
my_strnxfrm_simple,
my_strnxfrmlen_simple,
my_like_range_simple,
@@ -2111,6 +2125,7 @@ MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler =
my_coll_init_simple, /* init */
my_strnncoll_simple,
my_strnncollsp_simple_nopad,
+ my_strnncollsp_nchars_simple,
my_strnxfrm_simple_nopad,
my_strnxfrmlen_simple,
my_like_range_simple,
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 4b7fa23f74c..e15ba5e36fc 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -34046,6 +34046,7 @@ static MY_COLLATION_HANDLER my_collation_handler_sjis_japanese_ci=
NULL, /* init */
my_strnncoll_sjis_japanese_ci,
my_strnncollsp_sjis_japanese_ci,
+ my_strnncollsp_nchars_sjis_japanese_ci,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -34062,6 +34063,7 @@ static MY_COLLATION_HANDLER my_collation_handler_sjis_bin=
NULL, /* init */
my_strnncoll_sjis_bin,
my_strnncollsp_sjis_bin,
+ my_strnncollsp_nchars_sjis_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -34078,6 +34080,7 @@ static MY_COLLATION_HANDLER my_collation_handler_sjis_japanese_nopad_ci=
NULL, /* init */
my_strnncoll_sjis_japanese_ci,
my_strnncollsp_sjis_japanese_nopad_ci,
+ my_strnncollsp_nchars_sjis_japanese_nopad_ci,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -34094,6 +34097,7 @@ static MY_COLLATION_HANDLER my_collation_handler_sjis_nopad_bin=
NULL, /* init */
my_strnncoll_sjis_bin,
my_strnncollsp_sjis_nopad_bin,
+ my_strnncollsp_nchars_sjis_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 9760ea25162..d5367393c86 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -852,6 +852,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler =
NULL, /* init */
my_strnncoll_tis620,
my_strnncollsp_tis620,
+ my_strnncollsp_nchars_generic_8bit,
my_strnxfrm_tis620,
my_strnxfrmlen_simple,
my_like_range_simple,
@@ -867,6 +868,7 @@ static MY_COLLATION_HANDLER my_collation_nopad_ci_handler =
NULL, /* init */
my_strnncoll_tis620,
my_strnncollsp_tis620_nopad,
+ my_strnncollsp_nchars_generic_8bit,
my_strnxfrm_tis620_nopad,
my_strnxfrmlen_simple,
my_like_range_simple,
diff --git a/strings/ctype-uca-scanner_next.inl b/strings/ctype-uca-scanner_next.inl
new file mode 100644
index 00000000000..79d25487b42
--- /dev/null
+++ b/strings/ctype-uca-scanner_next.inl
@@ -0,0 +1,179 @@
+/* Copyright (c) 2004, 2013, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2021, MariaDB
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; version 2
+ of the License.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1335 USA */
+
+
+#ifdef SCANNER_NEXT_NCHARS
+
+#define SCANNER_NEXT_RETURN(_w,_n) \
+ do { weight_and_nchars_t rc= {_w, _n}; return rc; } while(0)
+
+#define SCANNER_NEXT_RETURN_CONTRACTION(_cnt,_ignorable_nchars) \
+ do { \
+ weight_and_nchars_t rc= { _cnt->weight[0], \
+ _ignorable_nchars + \
+ my_contraction_char_length(_cnt) }; \
+ return rc; \
+ } while(0)
+
+#else
+
+#define SCANNER_NEXT_RETURN(_w,_n) do { return _w; } while (0)
+
+#define SCANNER_NEXT_RETURN_CONTRACTION(_cnt,_ignorable_nchars) \
+ do { return _cnt->weight[0]; } while(0)
+
+#endif
+
+static inline
+#ifdef SCANNER_NEXT_NCHARS
+weight_and_nchars_t
+MY_FUNCTION_NAME(scanner_next_with_nchars)(my_uca_scanner *scanner,
+ size_t nchars)
+#else
+int
+MY_FUNCTION_NAME(scanner_next)(my_uca_scanner *scanner)
+#endif
+{
+#ifdef SCANNER_NEXT_NCHARS
+ uint ignorable_nchars;
+#define LOCAL_MAX_CONTRACTION_LENGTH nchars
+#else
+#define LOCAL_MAX_CONTRACTION_LENGTH MY_UCA_MAX_CONTRACTION
+#endif
+ /*
+ Check if the weights for the previous character have been
+ already fully scanned. If yes, then get the next character and
+ initialize wbeg and wlength to its weight string.
+ */
+
+ if (scanner->wbeg[0])
+ {
+ /*
+ More weights left from the previous step.
+ Return the next weight from the current expansion.
+ Return "0" as "nchars". The real nchars was set on a previous
+ iteration.
+ */
+ SCANNER_NEXT_RETURN(*scanner->wbeg++, 0);
+ }
+
+#ifdef SCANNER_NEXT_NCHARS
+ for (ignorable_nchars= 0 ; ; ignorable_nchars++)
+#else
+ for ( ; ; )
+#endif
+ {
+ const uint16 *wpage;
+ my_wc_t wc[MY_UCA_MAX_CONTRACTION];
+ int mblen;
+
+ /* Get next character */
+#if MY_UCA_ASCII_OPTIMIZE
+ /* Get next ASCII character */
+ if (scanner->sbeg < scanner->send && scanner->sbeg[0] < 0x80)
+ {
+ wc[0]= scanner->sbeg[0];
+ scanner->sbeg+= 1;
+
+#if MY_UCA_COMPILE_CONTRACTIONS
+ if (my_uca_needs_context_handling(scanner->level, wc[0]))
+ {
+ const MY_CONTRACTION *cnt= my_uca_context_weight_find(scanner, wc,
+ LOCAL_MAX_CONTRACTION_LENGTH);
+ if (cnt)
+ SCANNER_NEXT_RETURN_CONTRACTION(cnt, ignorable_nchars);
+ }
+#endif
+
+ scanner->page= 0;
+ scanner->code= (int) wc[0];
+ scanner->wbeg= scanner->level->weights[0] + scanner->code * scanner->level->lengths[0];
+ if (scanner->wbeg[0])
+ SCANNER_NEXT_RETURN(*scanner->wbeg++, ignorable_nchars + 1);
+ continue;
+ }
+ else
+#endif
+ /* Get next MB character */
+ if (((mblen= MY_MB_WC(scanner, wc, scanner->sbeg,
+ scanner->send)) <= 0))
+ {
+ if (scanner->sbeg >= scanner->send)
+ {
+ /* No more bytes, end of line reached */
+ SCANNER_NEXT_RETURN(-1, ignorable_nchars);
+ }
+ /*
+ There are some more bytes left. Non-positive mb_len means that
+ we got an incomplete or a bad byte sequence. Consume mbminlen bytes.
+ */
+ if ((scanner->sbeg+= scanner->cs->mbminlen) > scanner->send)
+ {
+ /* For safety purposes don't go beyond the string range. */
+ scanner->sbeg= scanner->send;
+ }
+ /*
+ Treat every complete or incomplete mbminlen unit as a weight which is
+ greater than weight for any possible normal character.
+ 0xFFFF is greater than any possible weight in the UCA weight table.
+ */
+ SCANNER_NEXT_RETURN(0xFFFF, ignorable_nchars + 1);
+ }
+
+ scanner->sbeg+= mblen;
+ if (wc[0] > scanner->level->maxchar)
+ {
+ /* Return 0xFFFD as weight for all characters outside BMP */
+ scanner->wbeg= nochar;
+ SCANNER_NEXT_RETURN(0xFFFD, ignorable_nchars + 1);
+ }
+
+#if MY_UCA_COMPILE_CONTRACTIONS
+ if (my_uca_needs_context_handling(scanner->level, wc[0]))
+ {
+ const MY_CONTRACTION *cnt= my_uca_context_weight_find(scanner, wc,
+ LOCAL_MAX_CONTRACTION_LENGTH);
+ if (cnt)
+ SCANNER_NEXT_RETURN_CONTRACTION(cnt, ignorable_nchars);
+ }
+#endif
+
+ /* Process single character */
+ scanner->page= wc[0] >> 8;
+ scanner->code= wc[0] & 0xFF;
+
+ /* If weight page for w[0] does not exist, then calculate algoritmically */
+ if (!(wpage= scanner->level->weights[scanner->page]))
+ SCANNER_NEXT_RETURN(my_uca_scanner_next_implicit(scanner),
+ ignorable_nchars + 1);
+
+ /* Calculate pointer to w[0]'s weight, using page and offset */
+ scanner->wbeg= wpage +
+ scanner->code * scanner->level->lengths[scanner->page];
+ if (scanner->wbeg[0])
+ break;
+ /* Skip ignorable character and continue the loop */
+ }
+
+ SCANNER_NEXT_RETURN(*scanner->wbeg++, ignorable_nchars + 1);
+}
+
+#undef SCANNER_NEXT_NCHARS
+#undef SCANNER_NEXT_RETURN
+#undef SCANNER_NEXT_RETURN_CONTRACTION
+#undef LOCAL_MAX_CONTRACTION_LENGTH
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index 5fbbbec7874..fbca4df39e7 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -35,6 +35,12 @@
#include "strings_def.h"
#include <m_ctype.h>
+typedef struct
+{
+ int weight;
+ uint nchars;
+} weight_and_nchars_t;
+
#define MY_CS_COMMON_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NON1TO1)
#define MY_UCA_CNT_FLAG_SIZE 4096
@@ -31158,17 +31164,6 @@ typedef struct my_uca_scanner_st
CHARSET_INFO *cs;
} my_uca_scanner;
-/*
- Charset dependent scanner part, to optimize
- some character sets.
-*/
-typedef struct my_uca_scanner_handler_st
-{
- void (*init)(my_uca_scanner *scanner, CHARSET_INFO *cs,
- const MY_UCA_WEIGHT_LEVEL *level,
- const uchar *str, size_t length);
- int (*next)(my_uca_scanner *scanner);
-} my_uca_scanner_handler;
static const uint16 nochar[]= {0,0};
@@ -31421,6 +31416,28 @@ my_uca_can_be_previous_context_tail(const MY_CONTRACTIONS *list, my_wc_t wc)
/**
+ Check if a character needs previous/next context handling:
+ - can be a previois context tail
+ - can be a contraction start
+
+ @param level Pointer to an UCA weight level data
+ @param wc Code point
+
+ @return
+ @retval FALSE - does not need context handling
+ @retval TRUE - needs context handing
+*/
+
+static inline my_bool
+my_uca_needs_context_handling(const MY_UCA_WEIGHT_LEVEL *level, my_wc_t wc)
+{
+ return level->contractions.nitems > 0 &&
+ level->contractions.flags[wc & MY_UCA_CNT_FLAG_MASK] &
+ (MY_UCA_PREVIOUS_CONTEXT_TAIL | MY_UCA_CNT_HEAD);
+}
+
+
+/**
Compare two wide character strings, wide analog to strncmp().
@param a Pointer to the first string
@@ -31439,6 +31456,21 @@ my_wmemcmp(my_wc_t *a, my_wc_t *b, size_t len)
}
+/*
+ Return the number of characters in a contraction.
+*/
+static inline uint my_contraction_char_length(const MY_CONTRACTION *cnt)
+{
+ uint i;
+ for (i= 2; i < array_elements(cnt->ch); i++)
+ {
+ if (cnt->ch[i] == 0)
+ return i;
+ }
+ return array_elements(cnt->ch);
+}
+
+
/**
Check if a string is a contraction,
and return its weight array on success.
@@ -31449,19 +31481,21 @@ my_wmemcmp(my_wc_t *a, my_wc_t *b, size_t len)
@return Weight array
@retval NULL - Input string is not a known contraction
- @retval ptr - contraction weight array
+ @retval ptr - the address of the MY_CONTRACTION found
*/
-static inline uint16 *
-my_uca_contraction_weight(const MY_CONTRACTIONS *list, my_wc_t *wc, size_t len)
+static inline const MY_CONTRACTION *
+my_uca_contraction_find(const MY_CONTRACTIONS *list, my_wc_t *wc, size_t len)
{
MY_CONTRACTION *c, *last;
+ DBUG_ASSERT(len <= MY_UCA_MAX_CONTRACTION);
+
for (c= list->item, last= c + list->nitems; c < last; c++)
{
- if ((len == MY_UCA_MAX_CONTRACTION || c->ch[len] == 0) &&
+ if ((len >= MY_UCA_MAX_CONTRACTION || c->ch[len] == 0) &&
!c->with_context &&
!my_wmemcmp(c->ch, wc, len))
- return c->weight;
+ return c;
}
return NULL;
}
@@ -31474,16 +31508,18 @@ my_uca_contraction_weight(const MY_CONTRACTIONS *list, my_wc_t *wc, size_t len)
a contraction part. Then try to find real contraction among the
candidates, starting from the longest.
- @param scanner Pointer to UCA scanner
- @param[OUT] *wc Where to store the scanned string
+ @param scanner Pointer to UCA scanner
+ @param[OUT] *wc Where to store the scanned string
+ @param max_char_length The longest contraction character length allowed
@return Weight array
@retval NULL - no contraction found
- @retval ptr - contraction weight array
+ @retval ptr - the address of MY_CONTRACTION found
*/
-static uint16 *
-my_uca_scanner_contraction_find(my_uca_scanner *scanner, my_wc_t *wc)
+static const MY_CONTRACTION *
+my_uca_scanner_contraction_find(my_uca_scanner *scanner, my_wc_t *wc,
+ size_t max_char_length)
{
size_t clen= 1;
int flag;
@@ -31492,7 +31528,7 @@ my_uca_scanner_contraction_find(my_uca_scanner *scanner, my_wc_t *wc)
/* Scan all contraction candidates */
for (s= scanner->sbeg, flag= MY_UCA_CNT_MID1;
- clen < MY_UCA_MAX_CONTRACTION;
+ clen < max_char_length;
flag<<= 1)
{
int mblen;
@@ -31508,15 +31544,15 @@ my_uca_scanner_contraction_find(my_uca_scanner *scanner, my_wc_t *wc)
/* Find among candidates the longest real contraction */
for ( ; clen > 1; clen--)
{
- uint16 *cweight;
+ const MY_CONTRACTION *cnt;
if (my_uca_can_be_contraction_tail(&scanner->level->contractions,
wc[clen - 1]) &&
- (cweight= my_uca_contraction_weight(&scanner->level->contractions,
- wc, clen)))
+ (cnt= my_uca_contraction_find(&scanner->level->contractions,
+ wc, clen)))
{
- scanner->wbeg= cweight + 1;
+ scanner->wbeg= cnt->weight + 1;
scanner->sbeg= beg[clen - 1];
- return cweight;
+ return cnt;
}
}
@@ -31534,10 +31570,10 @@ my_uca_scanner_contraction_find(my_uca_scanner *scanner, my_wc_t *wc)
@return Weight array
@retval NULL - no contraction with context found
- @retval ptr - contraction weight array
+ @retval ptr - the address of MY_CONTRACTION found
*/
-static uint16 *
+static const MY_CONTRACTION *
my_uca_previous_context_find(my_uca_scanner *scanner,
my_wc_t wc0, my_wc_t wc1)
{
@@ -31548,12 +31584,69 @@ my_uca_previous_context_find(my_uca_scanner *scanner,
if (c->with_context && wc0 == c->ch[0] && wc1 == c->ch[1])
{
scanner->wbeg= c->weight + 1;
- return c->weight;
+ return c;
}
}
return NULL;
}
+
+/*
+ Find a context dependent weight of a character.
+ @param scanner - UCA weight scanner. The caller should set
+ its members "page" and "code" to the previous character
+ (or to zeros if there is no a previous character).
+ @param wc - an array of wide characters which has at least
+ MY_UCA_MAX_CONTRACTION elements, where wc[0] is set
+ to the current character (whose weight is being resolved).
+ The values of wc[i>0] is not important, but if wc[0]
+ appears to be a known contraction head, the function
+ will collect further contraction parts into wc[i>0].
+ If wc[0] and the previous character make a previous context
+ pair, then wc[1] is set to the previous character.
+
+ @param max_char_length - the longest contraction character length allowed.
+
+ @retval NULL if could not find any contextual weights for wc[0]
+ @retval non null pointer - the address of MY_CONTRACTION found
+*/
+static inline const MY_CONTRACTION *
+my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
+ size_t max_char_length)
+{
+ const MY_CONTRACTION *cnt;
+ DBUG_ASSERT(scanner->level->contractions.nitems);
+ /*
+ If we have scanned a character which can have previous context,
+ and there were some more characters already before,
+ then reconstruct codepoint of the previous character
+ from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
+ together form a real previous context pair.
+ Note, we support only 2-character long sequences with previous
+ context at the moment. CLDR does not have longer sequences.
+ */
+ if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
+ wc[0]) &&
+ scanner->wbeg != nochar && /* if not the very first character */
+ my_uca_can_be_previous_context_head(&scanner->level->contractions,
+ (wc[1]= ((scanner->page << 8) +
+ scanner->code))) &&
+ (cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
+ {
+ scanner->page= scanner->code= 0; /* Clear for the next character */
+ return cnt;
+ }
+ else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
+ wc[0]))
+ {
+ /* Check if w[0] starts a contraction */
+ if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
+ return cnt;
+ }
+ return NULL;
+}
+
+
/****************************************************************/
/**
@@ -31675,223 +31768,6 @@ my_uca_scanner_init_any(my_uca_scanner *scanner,
scanner->cs= cs;
}
-static int my_uca_scanner_next_any(my_uca_scanner *scanner)
-{
- /*
- Check if the weights for the previous character have been
- already fully scanned. If yes, then get the next character and
- initialize wbeg and wlength to its weight string.
- */
-
- if (scanner->wbeg[0]) /* More weights left from the previous step: */
- return *scanner->wbeg++; /* return the next weight from expansion */
-
- do
- {
- const uint16 *wpage;
- my_wc_t wc[MY_UCA_MAX_CONTRACTION];
- int mblen;
-
- /* Get next character */
- if (((mblen= scanner->cs->cset->mb_wc(scanner->cs, wc,
- scanner->sbeg,
- scanner->send)) <= 0))
- {
- if (scanner->sbeg >= scanner->send)
- return -1; /* No more bytes, end of line reached */
- /*
- There are some more bytes left. Non-positive mb_len means that
- we got an incomplete or a bad byte sequence. Consume mbminlen bytes.
- */
- if ((scanner->sbeg+= scanner->cs->mbminlen) > scanner->send)
- {
- /* For safety purposes don't go beyond the string range. */
- scanner->sbeg= scanner->send;
- }
- /*
- Treat every complete or incomplete mbminlen unit as a weight which is
- greater than weight for any possible normal character.
- 0xFFFF is greater than any possible weight in the UCA weight table.
- */
- return 0xFFFF;
- }
-
- scanner->sbeg+= mblen;
- if (wc[0] > scanner->level->maxchar)
- {
- /* Return 0xFFFD as weight for all characters outside BMP */
- scanner->wbeg= nochar;
- return 0xFFFD;
- }
-
- if (my_uca_have_contractions_quick(scanner->level))
- {
- uint16 *cweight;
- /*
- If we have scanned a character which can have previous context,
- and there were some more characters already before,
- then reconstruct codepoint of the previous character
- from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
- together form a real previous context pair.
- Note, we support only 2-character long sequences with previous
- context at the moment. CLDR does not have longer sequences.
- */
- if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
- wc[0]) &&
- scanner->wbeg != nochar && /* if not the very first character */
- my_uca_can_be_previous_context_head(&scanner->level->contractions,
- (wc[1]= ((scanner->page << 8) +
- scanner->code))) &&
- (cweight= my_uca_previous_context_find(scanner, wc[1], wc[0])))
- {
- scanner->page= scanner->code= 0; /* Clear for the next character */
- return *cweight;
- }
- else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
- wc[0]))
- {
- /* Check if w[0] starts a contraction */
- if ((cweight= my_uca_scanner_contraction_find(scanner, wc)))
- return *cweight;
- }
- }
-
- /* Process single character */
- scanner->page= wc[0] >> 8;
- scanner->code= wc[0] & 0xFF;
-
- /* If weight page for w[0] does not exist, then calculate algoritmically */
- if (!(wpage= scanner->level->weights[scanner->page]))
- return my_uca_scanner_next_implicit(scanner);
-
- /* Calculate pointer to w[0]'s weight, using page and offset */
- scanner->wbeg= wpage +
- scanner->code * scanner->level->lengths[scanner->page];
- } while (!scanner->wbeg[0]); /* Skip ignorable characters */
-
- return *scanner->wbeg++;
-}
-
-
-static my_uca_scanner_handler my_any_uca_scanner_handler=
-{
- my_uca_scanner_init_any,
- my_uca_scanner_next_any
-};
-
-/*
- Compares two strings according to the collation
-
- SYNOPSIS:
- my_strnncoll_uca()
- cs Character set information
- s First string
- slen First string length
- t Second string
- tlen Seconf string length
- level DUCETweight level
-
- NOTES:
- Initializes two weight scanners and gets weights
- corresponding to two strings in a loop. If weights are not
- the same at some step then returns their difference.
-
- In the while() comparison these situations are possible:
- 1. (s_res>0) and (t_res>0) and (s_res == t_res)
- Weights are the same so far, continue comparison
- 2. (s_res>0) and (t_res>0) and (s_res!=t_res)
- A difference has been found, return.
- 3. (s_res>0) and (t_res<0)
- We have reached the end of the second string, or found
- an illegal multibyte sequence in the second string.
- Return a positive number, i.e. the first string is bigger.
- 4. (s_res<0) and (t_res>0)
- We have reached the end of the first string, or found
- an illegal multibyte sequence in the first string.
- Return a negative number, i.e. the second string is bigger.
- 5. (s_res<0) and (t_res<0)
- Both scanners returned -1. It means we have riched
- the end-of-string of illegal-sequence in both strings
- at the same time. Return 0, strings are equal.
-
- RETURN
- Difference between two strings, according to the collation:
- 0 - means strings are equal
- negative number - means the first string is smaller
- positive number - means the first string is bigger
-*/
-
-static int my_strnncoll_uca_onelevel(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const MY_UCA_WEIGHT_LEVEL *level,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen,
- my_bool t_is_prefix)
-{
- my_uca_scanner sscanner;
- my_uca_scanner tscanner;
- int s_res;
- int t_res;
-
- scanner_handler->init(&sscanner, cs, level, s, slen);
- scanner_handler->init(&tscanner, cs, level, t, tlen);
-
- do
- {
- s_res= scanner_handler->next(&sscanner);
- t_res= scanner_handler->next(&tscanner);
- } while ( s_res == t_res && s_res >0);
-
- return (t_is_prefix && t_res < 0) ? 0 : (s_res - t_res);
-}
-
-static int my_strnncoll_uca(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen,
- my_bool t_is_prefix)
-{
- return my_strnncoll_uca_onelevel(cs, scanner_handler, &cs->uca->level[0],
- s, slen, t, tlen, t_is_prefix);
-}
-
-static int my_strnncoll_uca_multilevel(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen,
- my_bool t_is_prefix)
-{
- uint num_level= cs->levels_for_order;
- uint i;
- for (i= 0; i != num_level; i++)
- {
- int ret= my_strnncoll_uca_onelevel(cs, scanner_handler, &cs->uca->level[i],
- s, slen, t, tlen, t_is_prefix);
- if (ret)
- return ret;
- }
- return 0;
-}
-
-
-static int
-my_strnncollsp_generic_uca_nopad_multilevel(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- uint num_level= cs->levels_for_order;
- uint i;
- for (i= 0; i != num_level; i++)
- {
- int ret= my_strnncoll_uca_onelevel(cs, &my_any_uca_scanner_handler,
- &cs->uca->level[i],
- s, slen, t, tlen, FALSE);
- if (ret)
- return ret;
- }
- return 0;
-}
-
static inline int
my_space_weight(const MY_UCA_WEIGHT_LEVEL *level)
@@ -31924,258 +31800,6 @@ my_char_weight_addr(const MY_UCA_WEIGHT_LEVEL *level, uint wc)
}
-/*
- Compares two strings according to the collation,
- ignoring trailing spaces.
-
- SYNOPSIS:
- my_strnncollsp_uca()
- cs Character set information
- s First string
- slen First string length
- t Second string
- tlen Seconf string length
- level DUCETweight level
-
- NOTES:
- Works exactly the same with my_strnncoll_uca(),
- but ignores trailing spaces.
-
- In the while() comparison these situations are possible:
- 1. (s_res>0) and (t_res>0) and (s_res == t_res)
- Weights are the same so far, continue comparison
- 2. (s_res>0) and (t_res>0) and (s_res!=t_res)
- A difference has been found, return.
- 3. (s_res>0) and (t_res<0)
- We have reached the end of the second string, or found
- an illegal multibyte sequence in the second string.
- Compare the first string to an infinite array of
- space characters until difference is found, or until
- the end of the first string.
- 4. (s_res<0) and (t_res>0)
- We have reached the end of the first string, or found
- an illegal multibyte sequence in the first string.
- Compare the second string to an infinite array of
- space characters until difference is found or until
- the end of the second steing.
- 5. (s_res<0) and (t_res<0)
- Both scanners returned -1. It means we have riched
- the end-of-string of illegal-sequence in both strings
- at the same time. Return 0, strings are equal.
-
- RETURN
- Difference between two strings, according to the collation:
- 0 - means strings are equal
- negative number - means the first string is smaller
- positive number - means the first string is bigger
-*/
-
-static int my_strnncollsp_uca_onelevel(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const MY_UCA_WEIGHT_LEVEL *level,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- my_uca_scanner sscanner, tscanner;
- int s_res, t_res;
-
- scanner_handler->init(&sscanner, cs, level, s, slen);
- scanner_handler->init(&tscanner, cs, level, t, tlen);
-
- do
- {
- s_res= scanner_handler->next(&sscanner);
- t_res= scanner_handler->next(&tscanner);
- } while ( s_res == t_res && s_res >0);
-
- if (s_res > 0 && t_res < 0)
- {
- /* Calculate weight for SPACE character */
- t_res= my_space_weight(level);
-
- /* compare the first string to spaces */
- do
- {
- if (s_res != t_res)
- return (s_res - t_res);
- s_res= scanner_handler->next(&sscanner);
- } while (s_res > 0);
- return 0;
- }
-
- if (s_res < 0 && t_res > 0)
- {
- /* Calculate weight for SPACE character */
- s_res= my_space_weight(level);
-
- /* compare the second string to spaces */
- do
- {
- if (s_res != t_res)
- return (s_res - t_res);
- t_res= scanner_handler->next(&tscanner);
- } while (t_res > 0);
- return 0;
- }
-
- return ( s_res - t_res );
-}
-
-static int my_strnncollsp_uca(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- return my_strnncollsp_uca_onelevel(cs, scanner_handler, &cs->uca->level[0],
- s, slen, t, tlen);
-}
-
-static int my_strnncollsp_uca_multilevel(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- uint num_level= cs->levels_for_order;
- uint i;
- for (i= 0; i != num_level; i++)
- {
- int ret= my_strnncollsp_uca_onelevel(cs, scanner_handler,
- &cs->uca->level[i], s, slen, t, tlen);
- if (ret)
- return ret;
- }
- return 0;
-}
-
-/*
- Calculates hash value for the given string,
- according to the collation, and ignoring trailing spaces.
-
- SYNOPSIS:
- my_hash_sort_uca()
- cs Character set information
- s String
- slen String's length
- n1 First hash parameter
- n2 Second hash parameter
-
- NOTES:
- Scans consequently weights and updates
- hash parameters n1 and n2. In a case insensitive collation,
- upper and lower case of the same letter will return the same
- weight sequence, and thus will produce the same hash values
- in n1 and n2.
-
- This functions is used for one-level and for multi-level collations.
- We intentionally use only primary level in multi-level collations.
- This helps to have PARTITION BY KEY put primarily equal records
- into the same partition. E.g. in utf8_thai_520_ci records that differ
- only in tone marks go into the same partition.
-
- RETURN
- N/A
-*/
-
-static void my_hash_sort_uca(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const uchar *s, size_t slen,
- ulong *nr1, ulong *nr2)
-{
- int s_res;
- my_uca_scanner scanner;
- int space_weight= my_space_weight(&cs->uca->level[0]);
- register ulong m1= *nr1, m2= *nr2;
-
- scanner_handler->init(&scanner, cs, &cs->uca->level[0], s, slen);
-
- while ((s_res= scanner_handler->next(&scanner)) >0)
- {
- if (s_res == space_weight)
- {
- /* Combine all spaces to be able to skip end spaces */
- uint count= 0;
- do
- {
- count++;
- if ((s_res= scanner_handler->next(&scanner)) <= 0)
- {
- /* Skip strings at end of string */
- goto end;
- }
- }
- while (s_res == space_weight);
-
- /* Add back that has for the space characters */
- do
- {
- /*
- We can't use MY_HASH_ADD_16() here as we, because of a misstake
- in the original code, where we added the 16 byte variable the
- opposite way. Changing this would cause old partitioned tables
- to fail.
- */
- MY_HASH_ADD(m1, m2, space_weight >> 8);
- MY_HASH_ADD(m1, m2, space_weight & 0xFF);
- }
- while (--count != 0);
-
- }
- /* See comment above why we can't use MY_HASH_ADD_16() */
- MY_HASH_ADD(m1, m2, s_res >> 8);
- MY_HASH_ADD(m1, m2, s_res & 0xFF);
- }
-end:
- *nr1= m1;
- *nr2= m2;
-}
-
-
-static void my_hash_sort_uca_nopad(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- const uchar *s, size_t slen,
- ulong *nr1, ulong *nr2)
-{
- int s_res;
- my_uca_scanner scanner;
- register ulong m1= *nr1, m2= *nr2;
-
- scanner_handler->init(&scanner, cs, &cs->uca->level[0], s, slen);
-
- while ((s_res= scanner_handler->next(&scanner)) >0)
- {
- /* See comment above why we can't use MY_HASH_ADD_16() */
- MY_HASH_ADD(m1, m2, s_res >> 8);
- MY_HASH_ADD(m1, m2, s_res & 0xFF);
- }
- *nr1= m1;
- *nr2= m2;
-}
-
-
-static uchar *
-my_strnxfrm_uca_onelevel_internal(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- MY_UCA_WEIGHT_LEVEL *level,
- uchar *dst, uchar *de, uint *nweights,
- const uchar *src, size_t srclen)
-{
- my_uca_scanner scanner;
- int s_res;
-
- DBUG_ASSERT(src || !srclen);
-
- scanner_handler->init(&scanner, cs, level, src, srclen);
- for (; dst < de && *nweights &&
- (s_res= scanner_handler->next(&scanner)) > 0 ; (*nweights)--)
- {
- *dst++= s_res >> 8;
- if (dst < de)
- *dst++= s_res & 0xFF;
- }
- return dst;
-}
-
-
static uchar *
my_strnxfrm_uca_padn(uchar *dst, uchar *de, uint nweights, int weight)
{
@@ -32202,27 +31826,6 @@ my_strnxfrm_uca_pad(uchar *dst, uchar *de, int weight)
}
-static uchar *
-my_strnxfrm_uca_onelevel(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- MY_UCA_WEIGHT_LEVEL *level,
- uchar *dst, uchar *de, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- uchar *d0= dst;
-
- dst= my_strnxfrm_uca_onelevel_internal(cs, scanner_handler, level,
- dst, de, &nweights,
- src, srclen);
- DBUG_ASSERT(dst <= de);
- if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
- dst= my_strnxfrm_uca_padn(dst, de, nweights, my_space_weight(level));
- DBUG_ASSERT(dst <= de);
- my_strxfrm_desc_and_reverse(d0, dst, flags, 0);
- return dst;
-}
-
-
/*
Return the minimum possible weight on a level.
*/
@@ -32233,136 +31836,6 @@ static uint min_weight_on_level(MY_UCA_WEIGHT_LEVEL *level)
}
-static uchar *
-my_strnxfrm_uca_nopad_onelevel(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- MY_UCA_WEIGHT_LEVEL *level,
- uchar *dst, uchar *de, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- uchar *d0= dst;
-
- dst= my_strnxfrm_uca_onelevel_internal(cs, scanner_handler, level,
- dst, de, &nweights,
- src, srclen);
- DBUG_ASSERT(dst <= de);
- /* Pad with the minimum possible weight on this level */
- if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
- dst= my_strnxfrm_uca_padn(dst, de, nweights, min_weight_on_level(level));
- DBUG_ASSERT(dst <= de);
- my_strxfrm_desc_and_reverse(d0, dst, flags, 0);
- return dst;
-}
-
-
-/*
- For the given string creates its "binary image", suitable
- to be used in binary comparison, i.e. in memcmp().
-
- SYNOPSIS:
- my_strnxfrm_uca()
- cs Character set information
- dst Where to write the image
- dstlen Space available for the image, in bytes
- src The source string
- srclen Length of the source string, in bytes
-
- NOTES:
- In a loop, scans weights from the source string and writes
- them into the binary image. In a case insensitive collation,
- upper and lower cases of the same letter will produce the
- same image subsequences. When we have reached the end-of-string
- or found an illegal multibyte sequence, the loop stops.
-
- It is impossible to restore the original string using its
- binary image.
-
- Binary images are used for bulk comparison purposes,
- e.g. in ORDER BY, when it is more efficient to create
- a binary image and use it instead of weight scanner
- for the original strings for every comparison.
-
- RETURN
- Number of bytes that have been written into the binary image.
-*/
-
-
-static size_t
-my_strnxfrm_uca(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- uchar *d0= dst;
- uchar *de= dst + dstlen;
-
- dst= my_strnxfrm_uca_onelevel(cs, scanner_handler, &cs->uca->level[0],
- dst, de, nweights, src, srclen, flags);
- /*
- This can probably be changed to memset(dst, 0, de - dst),
- like my_strnxfrm_uca_multilevel() does.
- */
- if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
- dst= my_strnxfrm_uca_pad(dst, de, my_space_weight(&cs->uca->level[0]));
- return dst - d0;
-}
-
-
-static size_t
-my_strnxfrm_uca_nopad(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- uchar *d0= dst;
- uchar *de= dst + dstlen;
-
- dst= my_strnxfrm_uca_nopad_onelevel(cs, scanner_handler, &cs->uca->level[0],
- dst, de, nweights, src, srclen, flags);
- if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
- {
- memset(dst, 0, de - dst);
- dst= de;
- }
- return dst - d0;
-}
-
-
-static size_t
-my_strnxfrm_uca_multilevel(CHARSET_INFO *cs,
- my_uca_scanner_handler *scanner_handler,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- uint num_level= cs->levels_for_order;
- uchar *d0= dst;
- uchar *de= dst + dstlen;
- uint current_level;
-
- for (current_level= 0; current_level != num_level; current_level++)
- {
- if (!(flags & MY_STRXFRM_LEVEL_ALL) ||
- (flags & (MY_STRXFRM_LEVEL1 << current_level)))
- dst= cs->state & MY_CS_NOPAD ?
- my_strnxfrm_uca_nopad_onelevel(cs, scanner_handler,
- &cs->uca->level[current_level],
- dst, de, nweights,
- src, srclen, flags) :
- my_strnxfrm_uca_onelevel(cs, scanner_handler,
- &cs->uca->level[current_level],
- dst, de, nweights,
- src, srclen, flags);
- }
-
- if (dst < de && (flags & MY_STRXFRM_PAD_TO_MAXLEN))
- {
- memset(dst, 0, de - dst);
- dst= de;
- }
-
- return dst - d0;
-}
-
/*
This function compares if two characters are the same.
The sign +1 or -1 does not matter. The only
@@ -32568,6 +32041,23 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
/*
+ Tests if an optimized "no contraction" handler can be used for
+ the given collation.
+*/
+static my_bool
+my_uca_collation_can_optimize_no_contractions(CHARSET_INFO *cs)
+{
+ uint i;
+ for (i= 0; i < cs->levels_for_order ; i++)
+ {
+ if (my_uca_have_contractions_quick(&cs->uca->level[i]))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/*
Collation language is implemented according to
subset of ICU Collation Customization (tailorings):
http://icu.sourceforge.net/userguide/Collate_Customization.html
@@ -33750,8 +33240,11 @@ my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
for (chlen= len; chlen > 1; chlen--)
{
- if ((from= my_uca_contraction_weight(&dst->contractions, str, chlen)))
+ const MY_CONTRACTION *cnt;
+ if (chlen <= MY_UCA_MAX_CONTRACTION &&
+ (cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
+ from= cnt->weight;
str+= chlen;
len-= chlen;
break;
@@ -34250,8 +33743,74 @@ init_weight_level(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules,
}
-MY_COLLATION_HANDLER my_collation_any_uca_handler_multilevel;
-MY_COLLATION_HANDLER my_collation_generic_uca_nopad_handler_multilevel;
+static my_bool
+create_tailoring(struct charset_info_st *cs,
+ MY_CHARSET_LOADER *loader);
+
+static my_bool
+my_coll_init_uca(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
+{
+ cs->pad_char= ' ';
+ cs->ctype= my_charset_utf8_unicode_ci.ctype;
+ if (!cs->caseinfo)
+ cs->caseinfo= &my_unicase_default;
+ return create_tailoring(cs, loader);
+}
+
+
+static size_t my_strnxfrmlen_any_uca(CHARSET_INFO *cs, size_t len)
+{
+ /* UCA uses 2 bytes per weight */
+ return (len + cs->mbmaxlen - 1) / cs->mbmaxlen * cs->strxfrm_multiply * 2;
+}
+
+static size_t my_strnxfrmlen_any_uca_multilevel(CHARSET_INFO *cs, size_t len)
+{
+ return my_strnxfrmlen_any_uca(cs, len) * cs->levels_for_order;
+}
+
+
+/*
+ This structure is used at the collation initialization time, to switch
+ from a full-featured collation handler to a "no contraction" collation
+ handler if the collation is known not to have any contractions.
+*/
+typedef struct
+{
+ MY_COLLATION_HANDLER *pad;
+ MY_COLLATION_HANDLER *nopad;
+ MY_COLLATION_HANDLER *multilevel_pad;
+ MY_COLLATION_HANDLER *multilevel_nopad;
+} MY_COLLATION_HANDLER_PACKAGE;
+
+
+static void my_uca_handler_map(struct charset_info_st *cs,
+ const MY_COLLATION_HANDLER_PACKAGE *from,
+ const MY_COLLATION_HANDLER_PACKAGE *to)
+{
+ if (cs->coll == from->pad) cs->coll= to->pad;
+ else if (cs->coll == from->nopad) cs->coll= to->nopad;
+ else if (cs->coll == from->multilevel_pad) cs->coll= to->multilevel_pad;
+ else if (cs->coll == from->multilevel_nopad) cs->coll= to->multilevel_nopad;
+}
+
+
+/*
+ Define generic collation handlers for multi-level collations with tailoring:
+
+ my_uca_collation_handler_nopad_multilevel_generic
+ my_uca_collation_handler_multilevel_generic
+
+ TODO: Use faster character-set specific versions of MY_COLLATION_HANDLER
+ instead of generic.
+*/
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _generic
+#define MY_MB_WC(scanner, wc, beg, end) (scanner->cs->cset->mb_wc(scanner->cs, wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_generic
+#define MY_UCA_ASCII_OPTIMIZE 0
+#define MY_UCA_COMPILE_CONTRACTIONS 1
+#define MY_UCA_COLL_INIT my_coll_init_uca
+#include "ctype-uca.inl"
/*
@@ -34336,8 +33895,8 @@ create_tailoring(struct charset_info_st *cs,
cs->uca[0]= new_uca;
if (cs->levels_for_order > 1)
cs->coll= (cs->state & MY_CS_NOPAD) ?
- &my_collation_generic_uca_nopad_handler_multilevel :
- &my_collation_any_uca_handler_multilevel;
+ &my_uca_collation_handler_nopad_multilevel_generic :
+ &my_uca_collation_handler_multilevel_generic;
ex:
(loader->free)(rules.rule);
@@ -34346,235 +33905,17 @@ ex:
return rc;
}
-/*
- Universal CHARSET_INFO compatible wrappers
- for the above internal functions.
- Should work for any character set.
-*/
-
-static my_bool
-my_coll_init_uca(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
-{
- cs->pad_char= ' ';
- cs->ctype= my_charset_utf8_unicode_ci.ctype;
- if (!cs->caseinfo)
- cs->caseinfo= &my_unicase_default;
- return create_tailoring(cs, loader);
-}
-
-
-static int my_strnncoll_any_uca(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen,
- my_bool t_is_prefix)
-{
- return my_strnncoll_uca(cs, &my_any_uca_scanner_handler,
- s, slen, t, tlen, t_is_prefix);
-}
-
-static int my_strnncoll_any_uca_multilevel(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen,
- my_bool t_is_prefix)
-{
- return my_strnncoll_uca_multilevel(cs, &my_any_uca_scanner_handler,
- s, slen, t, tlen, t_is_prefix);
-}
-
-static int my_strnncollsp_any_uca(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- return my_strnncollsp_uca(cs, &my_any_uca_scanner_handler, s, slen, t, tlen);
-}
-
-
-static int my_strnncollsp_generic_uca_nopad(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- return my_strnncoll_uca(cs, &my_any_uca_scanner_handler,
- s, slen, t, tlen, FALSE);
-}
-
-
-static int my_strnncollsp_any_uca_multilevel(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- return my_strnncollsp_uca_multilevel(cs, &my_any_uca_scanner_handler,
- s, slen, t, tlen);
-}
-
-static void my_hash_sort_any_uca(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- ulong *n1, ulong *n2)
-{
- my_hash_sort_uca(cs, &my_any_uca_scanner_handler, s, slen, n1, n2);
-}
-
-static void my_hash_sort_generic_uca_nopad(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- ulong *n1, ulong *n2)
-{
- my_hash_sort_uca_nopad(cs, &my_any_uca_scanner_handler, s, slen, n1, n2);
-}
-
-static size_t my_strnxfrm_any_uca(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- return my_strnxfrm_uca(cs, &my_any_uca_scanner_handler,
- dst, dstlen, nweights, src, srclen, flags);
-}
-
-static size_t my_strnxfrm_generic_uca_nopad(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen,
- uint nweights,
- const uchar *src, size_t srclen,
- uint flags)
-{
- return my_strnxfrm_uca_nopad(cs, &my_any_uca_scanner_handler,
- dst, dstlen, nweights, src, srclen, flags);
-}
-
-static size_t my_strnxfrm_any_uca_multilevel(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen,
- uint nweights, const uchar *src,
- size_t srclen, uint flags)
-{
- return my_strnxfrm_uca_multilevel(cs, &my_any_uca_scanner_handler,
- dst, dstlen, nweights, src, srclen,
- flags);
-}
-
-static size_t my_strnxfrmlen_any_uca(CHARSET_INFO *cs, size_t len)
-{
- /* UCA uses 2 bytes per weight */
- return (len + cs->mbmaxlen - 1) / cs->mbmaxlen * cs->strxfrm_multiply * 2;
-}
-
-static size_t my_strnxfrmlen_any_uca_multilevel(CHARSET_INFO *cs, size_t len)
-{
- return my_strnxfrmlen_any_uca(cs, len) * cs->levels_for_order;
-}
-
-
-/* NO PAD handler for character sets with mbminlen==1 */
-MY_COLLATION_HANDLER my_collation_mb_uca_nopad_handler =
-{
- my_coll_init_uca,
- my_strnncoll_any_uca,
- my_strnncollsp_generic_uca_nopad,
- my_strnxfrm_generic_uca_nopad,
- my_strnxfrmlen_any_uca,
- my_like_range_mb,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_generic_uca_nopad,
- my_propagate_complex
-};
-
-
-/* NO PAD handler for character sets with mbminlen>=1 */
-MY_COLLATION_HANDLER my_collation_generic_uca_nopad_handler =
-{
- my_coll_init_uca,
- my_strnncoll_any_uca,
- my_strnncollsp_generic_uca_nopad,
- my_strnxfrm_generic_uca_nopad,
- my_strnxfrmlen_any_uca,
- my_like_range_generic,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_generic_uca_nopad,
- my_propagate_complex
-};
-
-
-MY_COLLATION_HANDLER my_collation_any_uca_handler_multilevel=
-{
- my_coll_init_uca,
- my_strnncoll_any_uca_multilevel,
- my_strnncollsp_any_uca_multilevel,
- my_strnxfrm_any_uca_multilevel,
- my_strnxfrmlen_any_uca_multilevel,
- my_like_range_generic,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_any_uca,
- my_propagate_complex
-};
-
-
-MY_COLLATION_HANDLER my_collation_generic_uca_nopad_handler_multilevel =
-{
- my_coll_init_uca,
- my_strnncoll_any_uca_multilevel,
- my_strnncollsp_generic_uca_nopad_multilevel,
- my_strnxfrm_any_uca_multilevel,
- my_strnxfrmlen_any_uca_multilevel,
- my_like_range_generic,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_generic_uca_nopad,
- my_propagate_complex
-};
-
#ifdef HAVE_CHARSET_ucs2
-/*
- UCS2 optimized CHARSET_INFO compatible wrappers.
-*/
-static int my_strnncoll_ucs2_uca(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen,
- my_bool t_is_prefix)
-{
- return my_strnncoll_uca(cs, &my_any_uca_scanner_handler,
- s, slen, t, tlen, t_is_prefix);
-}
-static int my_strnncollsp_ucs2_uca(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- const uchar *t, size_t tlen)
-{
- return my_strnncollsp_uca(cs, &my_any_uca_scanner_handler, s, slen, t, tlen);
-}
-
-static void my_hash_sort_ucs2_uca(CHARSET_INFO *cs,
- const uchar *s, size_t slen,
- ulong *n1, ulong *n2)
-{
- my_hash_sort_uca(cs, &my_any_uca_scanner_handler, s, slen, n1, n2);
-}
-
-static size_t my_strnxfrm_ucs2_uca(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- return my_strnxfrm_uca(cs, &my_any_uca_scanner_handler,
- dst, dstlen, nweights, src, srclen, flags);
-}
-
-MY_COLLATION_HANDLER my_collation_ucs2_uca_handler =
-{
- my_coll_init_uca, /* init */
- my_strnncoll_ucs2_uca,
- my_strnncollsp_ucs2_uca,
- my_strnxfrm_ucs2_uca,
- my_strnxfrmlen_any_uca,
- my_like_range_generic,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_ucs2_uca,
- my_propagate_complex
-};
+#include "ctype-ucs2.h"
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _ucs2
+#define MY_MB_WC(scanner, wc, beg, end) (my_mb_wc_ucs2_quick(wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_generic
+#define MY_UCA_ASCII_OPTIMIZE 0
+#define MY_UCA_COMPILE_CONTRACTIONS 1
+#define MY_UCA_COLL_INIT my_coll_init_uca
+#include "ctype-uca.inl"
#define MY_CS_UCS2_UCA_FLAGS (MY_CS_COMMON_UCA_FLAGS|MY_CS_NONASCII)
@@ -34609,7 +33950,7 @@ struct charset_info_st my_charset_ucs2_unicode_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_icelandic_uca_ci=
@@ -34641,7 +33982,7 @@ struct charset_info_st my_charset_ucs2_icelandic_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_latvian_uca_ci=
@@ -34673,7 +34014,7 @@ struct charset_info_st my_charset_ucs2_latvian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_romanian_uca_ci=
@@ -34705,7 +34046,7 @@ struct charset_info_st my_charset_ucs2_romanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_slovenian_uca_ci=
@@ -34737,7 +34078,7 @@ struct charset_info_st my_charset_ucs2_slovenian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_polish_uca_ci=
@@ -34769,7 +34110,7 @@ struct charset_info_st my_charset_ucs2_polish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_estonian_uca_ci=
@@ -34801,7 +34142,7 @@ struct charset_info_st my_charset_ucs2_estonian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_spanish_uca_ci=
@@ -34833,7 +34174,7 @@ struct charset_info_st my_charset_ucs2_spanish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_swedish_uca_ci=
@@ -34865,7 +34206,7 @@ struct charset_info_st my_charset_ucs2_swedish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_turkish_uca_ci=
@@ -34897,7 +34238,7 @@ struct charset_info_st my_charset_ucs2_turkish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_czech_uca_ci=
@@ -34929,7 +34270,7 @@ struct charset_info_st my_charset_ucs2_czech_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -34962,7 +34303,7 @@ struct charset_info_st my_charset_ucs2_danish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_lithuanian_uca_ci=
@@ -34994,7 +34335,7 @@ struct charset_info_st my_charset_ucs2_lithuanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_slovak_uca_ci=
@@ -35026,7 +34367,7 @@ struct charset_info_st my_charset_ucs2_slovak_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_spanish2_uca_ci=
@@ -35058,7 +34399,7 @@ struct charset_info_st my_charset_ucs2_spanish2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35091,7 +34432,7 @@ struct charset_info_st my_charset_ucs2_roman_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35124,7 +34465,7 @@ struct charset_info_st my_charset_ucs2_persian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35157,7 +34498,7 @@ struct charset_info_st my_charset_ucs2_esperanto_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35190,7 +34531,7 @@ struct charset_info_st my_charset_ucs2_hungarian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_sinhala_uca_ci=
@@ -35222,7 +34563,7 @@ struct charset_info_st my_charset_ucs2_sinhala_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35256,7 +34597,7 @@ struct charset_info_st my_charset_ucs2_german2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
struct charset_info_st my_charset_ucs2_croatian_mysql561_uca_ci=
@@ -35288,7 +34629,7 @@ struct charset_info_st my_charset_ucs2_croatian_mysql561_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35321,7 +34662,7 @@ struct charset_info_st my_charset_ucs2_croatian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35354,7 +34695,7 @@ struct charset_info_st my_charset_ucs2_myanmar_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35387,7 +34728,7 @@ struct charset_info_st my_charset_ucs2_thai_520_w2=
0, /* escape_with_backslash_is_dangerous */
2, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_any_uca_handler_multilevel
+ &my_uca_collation_handler_multilevel_ucs2
};
struct charset_info_st my_charset_ucs2_unicode_520_ci=
@@ -35419,7 +34760,7 @@ struct charset_info_st my_charset_ucs2_unicode_520_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35452,7 +34793,7 @@ struct charset_info_st my_charset_ucs2_vietnamese_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_ucs2_uca_handler
+ &my_uca_collation_handler_ucs2
};
@@ -35485,7 +34826,7 @@ struct charset_info_st my_charset_ucs2_unicode_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_generic_uca_nopad_handler
+ &my_uca_collation_handler_nopad_ucs2
};
@@ -35518,7 +34859,7 @@ struct charset_info_st my_charset_ucs2_unicode_520_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_ucs2_handler,
- &my_collation_generic_uca_nopad_handler
+ &my_uca_collation_handler_nopad_ucs2
};
@@ -35526,20 +34867,38 @@ struct charset_info_st my_charset_ucs2_unicode_520_nopad_ci=
#ifdef HAVE_CHARSET_utf8
-MY_COLLATION_HANDLER my_collation_any_uca_handler =
+
+static my_bool
+my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader);
+
+#include "ctype-utf8.h"
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _utf8mb3
+#define MY_MB_WC(scanner, wc, beg, end) (my_mb_wc_utf8mb3_quick(wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_mb
+#define MY_UCA_ASCII_OPTIMIZE 1
+#define MY_UCA_COMPILE_CONTRACTIONS 1
+#define MY_UCA_COLL_INIT my_uca_coll_init_utf8mb3
+#include "ctype-uca.inl"
+
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _no_contractions_utf8mb3
+#define MY_MB_WC(scanner, wc, beg, end) (my_mb_wc_utf8mb3_quick(wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_mb
+#define MY_UCA_ASCII_OPTIMIZE 1
+#define MY_UCA_COMPILE_CONTRACTIONS 0
+#define MY_UCA_COLL_INIT my_uca_coll_init_utf8mb3
+#include "ctype-uca.inl"
+
+
+static my_bool
+my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
- my_coll_init_uca, /* init */
- my_strnncoll_any_uca,
- my_strnncollsp_any_uca,
- my_strnxfrm_any_uca,
- my_strnxfrmlen_any_uca,
- my_like_range_mb,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_any_uca,
- my_propagate_complex
-};
+ if (my_coll_init_uca(cs, loader))
+ return TRUE;
+ if (my_uca_collation_can_optimize_no_contractions(cs))
+ my_uca_handler_map(cs, &my_uca_package_utf8mb3,
+ &my_uca_package_no_contractions_utf8mb3);
+ return FALSE;
+}
/*
@@ -35602,7 +34961,7 @@ struct charset_info_st my_charset_utf8_unicode_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
@@ -35635,7 +34994,7 @@ struct charset_info_st my_charset_utf8_icelandic_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_latvian_uca_ci=
@@ -35667,7 +35026,7 @@ struct charset_info_st my_charset_utf8_latvian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_romanian_uca_ci=
@@ -35699,7 +35058,7 @@ struct charset_info_st my_charset_utf8_romanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_slovenian_uca_ci=
@@ -35731,7 +35090,7 @@ struct charset_info_st my_charset_utf8_slovenian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_polish_uca_ci=
@@ -35763,7 +35122,7 @@ struct charset_info_st my_charset_utf8_polish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_estonian_uca_ci=
@@ -35795,7 +35154,7 @@ struct charset_info_st my_charset_utf8_estonian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_spanish_uca_ci=
@@ -35827,7 +35186,7 @@ struct charset_info_st my_charset_utf8_spanish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_swedish_uca_ci=
@@ -35859,7 +35218,7 @@ struct charset_info_st my_charset_utf8_swedish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_turkish_uca_ci=
@@ -35891,7 +35250,7 @@ struct charset_info_st my_charset_utf8_turkish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_czech_uca_ci=
@@ -35923,7 +35282,7 @@ struct charset_info_st my_charset_utf8_czech_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
@@ -35956,7 +35315,7 @@ struct charset_info_st my_charset_utf8_danish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_lithuanian_uca_ci=
@@ -35988,7 +35347,7 @@ struct charset_info_st my_charset_utf8_lithuanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_slovak_uca_ci=
@@ -36020,7 +35379,7 @@ struct charset_info_st my_charset_utf8_slovak_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_spanish2_uca_ci=
@@ -36052,7 +35411,7 @@ struct charset_info_st my_charset_utf8_spanish2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_roman_uca_ci=
@@ -36084,7 +35443,7 @@ struct charset_info_st my_charset_utf8_roman_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_persian_uca_ci=
@@ -36116,7 +35475,7 @@ struct charset_info_st my_charset_utf8_persian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_esperanto_uca_ci=
@@ -36148,7 +35507,7 @@ struct charset_info_st my_charset_utf8_esperanto_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_hungarian_uca_ci=
@@ -36180,7 +35539,7 @@ struct charset_info_st my_charset_utf8_hungarian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_sinhala_uca_ci=
@@ -36212,7 +35571,7 @@ struct charset_info_st my_charset_utf8_sinhala_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
@@ -36245,7 +35604,7 @@ struct charset_info_st my_charset_utf8_german2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_croatian_mysql561_uca_ci=
@@ -36277,7 +35636,7 @@ struct charset_info_st my_charset_utf8_croatian_mysql561_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
@@ -36310,7 +35669,7 @@ struct charset_info_st my_charset_utf8_croatian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
@@ -36343,7 +35702,7 @@ struct charset_info_st my_charset_utf8_myanmar_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
@@ -36376,7 +35735,7 @@ struct charset_info_st my_charset_utf8_unicode_520_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
struct charset_info_st my_charset_utf8_thai_520_w2=
@@ -36408,7 +35767,7 @@ struct charset_info_st my_charset_utf8_thai_520_w2=
0, /* escape_with_backslash_is_dangerous */
2, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler_multilevel
+ &my_uca_collation_handler_multilevel_utf8mb3
};
struct charset_info_st my_charset_utf8_vietnamese_ci=
@@ -36440,7 +35799,7 @@ struct charset_info_st my_charset_utf8_vietnamese_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb3
};
@@ -36473,7 +35832,7 @@ struct charset_info_st my_charset_utf8_unicode_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_mb_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf8mb3
};
@@ -36506,7 +35865,7 @@ struct charset_info_st my_charset_utf8_unicode_520_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8_handler,
- &my_collation_mb_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf8mb3
};
#endif /* HAVE_CHARSET_utf8 */
@@ -36514,6 +35873,39 @@ struct charset_info_st my_charset_utf8_unicode_520_nopad_ci=
#ifdef HAVE_CHARSET_utf8mb4
+static my_bool
+my_uca_coll_init_utf8mb4(struct charset_info_st *cs, MY_CHARSET_LOADER *loader);
+
+
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _utf8mb4
+#define MY_MB_WC(scanner, wc, beg, end) (my_mb_wc_utf8mb4_quick(wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_mb
+#define MY_UCA_ASCII_OPTIMIZE 1
+#define MY_UCA_COMPILE_CONTRACTIONS 1
+#define MY_UCA_COLL_INIT my_uca_coll_init_utf8mb4
+#include "ctype-uca.inl"
+
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _no_contractions_utf8mb4
+#define MY_MB_WC(scanner, wc, beg, end) (my_mb_wc_utf8mb4_quick(wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_mb
+#define MY_UCA_ASCII_OPTIMIZE 1
+#define MY_UCA_COMPILE_CONTRACTIONS 0
+#define MY_UCA_COLL_INIT my_uca_coll_init_utf8mb4
+#include "ctype-uca.inl"
+
+
+static my_bool
+my_uca_coll_init_utf8mb4(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
+{
+ if (my_coll_init_uca(cs, loader))
+ return TRUE;
+ if (my_uca_collation_can_optimize_no_contractions(cs))
+ my_uca_handler_map(cs, &my_uca_package_utf8mb4,
+ &my_uca_package_no_contractions_utf8mb4);
+ return FALSE;
+}
+
+
extern MY_CHARSET_HANDLER my_charset_utf8mb4_handler;
#define MY_CS_UTF8MB4_UCA_FLAGS (MY_CS_COMMON_UCA_FLAGS|MY_CS_UNICODE_SUPPLEMENT)
@@ -36548,7 +35940,7 @@ struct charset_info_st my_charset_utf8mb4_unicode_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
@@ -36581,7 +35973,7 @@ struct charset_info_st my_charset_utf8mb4_icelandic_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_latvian_uca_ci=
@@ -36613,7 +36005,7 @@ struct charset_info_st my_charset_utf8mb4_latvian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_romanian_uca_ci=
@@ -36645,7 +36037,7 @@ struct charset_info_st my_charset_utf8mb4_romanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_slovenian_uca_ci=
@@ -36677,7 +36069,7 @@ struct charset_info_st my_charset_utf8mb4_slovenian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_polish_uca_ci=
@@ -36709,7 +36101,7 @@ struct charset_info_st my_charset_utf8mb4_polish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_estonian_uca_ci=
@@ -36741,7 +36133,7 @@ struct charset_info_st my_charset_utf8mb4_estonian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_spanish_uca_ci=
@@ -36773,7 +36165,7 @@ struct charset_info_st my_charset_utf8mb4_spanish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_swedish_uca_ci=
@@ -36805,7 +36197,7 @@ struct charset_info_st my_charset_utf8mb4_swedish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_turkish_uca_ci=
@@ -36837,7 +36229,7 @@ struct charset_info_st my_charset_utf8mb4_turkish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_czech_uca_ci=
@@ -36869,7 +36261,7 @@ struct charset_info_st my_charset_utf8mb4_czech_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
@@ -36902,7 +36294,7 @@ struct charset_info_st my_charset_utf8mb4_danish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_lithuanian_uca_ci=
@@ -36934,7 +36326,7 @@ struct charset_info_st my_charset_utf8mb4_lithuanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_slovak_uca_ci=
@@ -36966,7 +36358,7 @@ struct charset_info_st my_charset_utf8mb4_slovak_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_spanish2_uca_ci=
@@ -36998,7 +36390,7 @@ struct charset_info_st my_charset_utf8mb4_spanish2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_roman_uca_ci=
@@ -37030,7 +36422,7 @@ struct charset_info_st my_charset_utf8mb4_roman_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_persian_uca_ci=
@@ -37062,7 +36454,7 @@ struct charset_info_st my_charset_utf8mb4_persian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_esperanto_uca_ci=
@@ -37094,7 +36486,7 @@ struct charset_info_st my_charset_utf8mb4_esperanto_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_hungarian_uca_ci=
@@ -37126,7 +36518,7 @@ struct charset_info_st my_charset_utf8mb4_hungarian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_sinhala_uca_ci=
@@ -37158,7 +36550,7 @@ struct charset_info_st my_charset_utf8mb4_sinhala_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_german2_uca_ci=
@@ -37190,7 +36582,7 @@ struct charset_info_st my_charset_utf8mb4_german2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_croatian_mysql561_uca_ci=
@@ -37222,7 +36614,7 @@ struct charset_info_st my_charset_utf8mb4_croatian_mysql561_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
@@ -37255,7 +36647,7 @@ struct charset_info_st my_charset_utf8mb4_croatian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
@@ -37288,7 +36680,7 @@ struct charset_info_st my_charset_utf8mb4_myanmar_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_thai_520_w2=
@@ -37320,7 +36712,7 @@ struct charset_info_st my_charset_utf8mb4_thai_520_w2=
0, /* escape_with_backslash_is_dangerous */
2, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler_multilevel
+ &my_uca_collation_handler_multilevel_utf8mb4
};
struct charset_info_st my_charset_utf8mb4_unicode_520_ci=
@@ -37352,7 +36744,7 @@ struct charset_info_st my_charset_utf8mb4_unicode_520_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
@@ -37385,7 +36777,7 @@ struct charset_info_st my_charset_utf8mb4_vietnamese_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_any_uca_handler
+ &my_uca_collation_handler_utf8mb4
};
@@ -37418,7 +36810,7 @@ struct charset_info_st my_charset_utf8mb4_unicode_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_mb_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf8mb4
};
@@ -37451,7 +36843,7 @@ struct charset_info_st my_charset_utf8mb4_unicode_520_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf8mb4_handler,
- &my_collation_mb_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf8mb4
};
@@ -37460,20 +36852,14 @@ struct charset_info_st my_charset_utf8mb4_unicode_520_nopad_ci=
#ifdef HAVE_CHARSET_utf32
-MY_COLLATION_HANDLER my_collation_utf32_uca_handler =
-{
- my_coll_init_uca, /* init */
- my_strnncoll_any_uca,
- my_strnncollsp_any_uca,
- my_strnxfrm_any_uca,
- my_strnxfrmlen_any_uca,
- my_like_range_generic,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_any_uca,
- my_propagate_complex
-};
+#include "ctype-utf32.h"
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _utf32
+#define MY_MB_WC(scanner, wc, beg, end) (my_mb_wc_utf32_quick(wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_generic
+#define MY_UCA_ASCII_OPTIMIZE 0
+#define MY_UCA_COMPILE_CONTRACTIONS 1
+#define MY_UCA_COLL_INIT my_coll_init_uca
+#include "ctype-uca.inl"
extern MY_CHARSET_HANDLER my_charset_utf32_handler;
@@ -37510,7 +36896,7 @@ struct charset_info_st my_charset_utf32_unicode_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
@@ -37543,7 +36929,7 @@ struct charset_info_st my_charset_utf32_icelandic_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_latvian_uca_ci=
@@ -37575,7 +36961,7 @@ struct charset_info_st my_charset_utf32_latvian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_romanian_uca_ci=
@@ -37607,7 +36993,7 @@ struct charset_info_st my_charset_utf32_romanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_slovenian_uca_ci=
@@ -37639,7 +37025,7 @@ struct charset_info_st my_charset_utf32_slovenian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_polish_uca_ci=
@@ -37671,7 +37057,7 @@ struct charset_info_st my_charset_utf32_polish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_estonian_uca_ci=
@@ -37703,7 +37089,7 @@ struct charset_info_st my_charset_utf32_estonian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_spanish_uca_ci=
@@ -37735,7 +37121,7 @@ struct charset_info_st my_charset_utf32_spanish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_swedish_uca_ci=
@@ -37767,7 +37153,7 @@ struct charset_info_st my_charset_utf32_swedish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_turkish_uca_ci=
@@ -37799,7 +37185,7 @@ struct charset_info_st my_charset_utf32_turkish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_czech_uca_ci=
@@ -37831,7 +37217,7 @@ struct charset_info_st my_charset_utf32_czech_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
@@ -37864,7 +37250,7 @@ struct charset_info_st my_charset_utf32_danish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_lithuanian_uca_ci=
@@ -37896,7 +37282,7 @@ struct charset_info_st my_charset_utf32_lithuanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_slovak_uca_ci=
@@ -37928,7 +37314,7 @@ struct charset_info_st my_charset_utf32_slovak_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_spanish2_uca_ci=
@@ -37960,7 +37346,7 @@ struct charset_info_st my_charset_utf32_spanish2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_roman_uca_ci=
@@ -37992,7 +37378,7 @@ struct charset_info_st my_charset_utf32_roman_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_persian_uca_ci=
@@ -38024,7 +37410,7 @@ struct charset_info_st my_charset_utf32_persian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_esperanto_uca_ci=
@@ -38056,7 +37442,7 @@ struct charset_info_st my_charset_utf32_esperanto_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_hungarian_uca_ci=
@@ -38088,7 +37474,7 @@ struct charset_info_st my_charset_utf32_hungarian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_sinhala_uca_ci=
@@ -38120,7 +37506,7 @@ struct charset_info_st my_charset_utf32_sinhala_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_german2_uca_ci=
@@ -38152,7 +37538,7 @@ struct charset_info_st my_charset_utf32_german2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_croatian_mysql561_uca_ci=
@@ -38184,7 +37570,7 @@ struct charset_info_st my_charset_utf32_croatian_mysql561_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
struct charset_info_st my_charset_utf32_croatian_uca_ci=
@@ -38216,7 +37602,7 @@ struct charset_info_st my_charset_utf32_croatian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
@@ -38249,7 +37635,7 @@ struct charset_info_st my_charset_utf32_myanmar_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
@@ -38282,7 +37668,7 @@ struct charset_info_st my_charset_utf32_thai_520_w2=
0, /* escape_with_backslash_is_dangerous */
2, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_any_uca_handler_multilevel
+ &my_uca_collation_handler_multilevel_utf32
};
@@ -38315,7 +37701,7 @@ struct charset_info_st my_charset_utf32_unicode_520_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
@@ -38348,7 +37734,7 @@ struct charset_info_st my_charset_utf32_vietnamese_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_utf32_uca_handler
+ &my_uca_collation_handler_utf32
};
@@ -38381,7 +37767,7 @@ struct charset_info_st my_charset_utf32_unicode_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_generic_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf32
};
@@ -38414,7 +37800,7 @@ struct charset_info_st my_charset_utf32_unicode_520_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf32_handler,
- &my_collation_generic_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf32
};
@@ -38424,21 +37810,14 @@ struct charset_info_st my_charset_utf32_unicode_520_nopad_ci=
#ifdef HAVE_CHARSET_utf16
-
-MY_COLLATION_HANDLER my_collation_utf16_uca_handler =
-{
- my_coll_init_uca, /* init */
- my_strnncoll_any_uca,
- my_strnncollsp_any_uca,
- my_strnxfrm_any_uca,
- my_strnxfrmlen_any_uca,
- my_like_range_generic,
- my_wildcmp_uca,
- NULL,
- my_instr_mb,
- my_hash_sort_any_uca,
- my_propagate_complex
-};
+#include "ctype-utf16.h"
+#define MY_FUNCTION_NAME(x) my_uca_ ## x ## _utf16
+#define MY_MB_WC(scanner, wc, beg, end) (my_mb_wc_utf16_quick(wc, beg, end))
+#define MY_LIKE_RANGE my_like_range_generic
+#define MY_UCA_ASCII_OPTIMIZE 0
+#define MY_UCA_COMPILE_CONTRACTIONS 1
+#define MY_UCA_COLL_INIT my_coll_init_uca
+#include "ctype-uca.inl"
extern MY_CHARSET_HANDLER my_charset_utf16_handler;
@@ -38475,7 +37854,7 @@ struct charset_info_st my_charset_utf16_unicode_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -38508,7 +37887,7 @@ struct charset_info_st my_charset_utf16_icelandic_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_latvian_uca_ci=
@@ -38540,7 +37919,7 @@ struct charset_info_st my_charset_utf16_latvian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_romanian_uca_ci=
@@ -38572,7 +37951,7 @@ struct charset_info_st my_charset_utf16_romanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_slovenian_uca_ci=
@@ -38604,7 +37983,7 @@ struct charset_info_st my_charset_utf16_slovenian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_polish_uca_ci=
@@ -38636,7 +38015,7 @@ struct charset_info_st my_charset_utf16_polish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_estonian_uca_ci=
@@ -38668,7 +38047,7 @@ struct charset_info_st my_charset_utf16_estonian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_spanish_uca_ci=
@@ -38700,7 +38079,7 @@ struct charset_info_st my_charset_utf16_spanish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_swedish_uca_ci=
@@ -38732,7 +38111,7 @@ struct charset_info_st my_charset_utf16_swedish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_turkish_uca_ci=
@@ -38764,7 +38143,7 @@ struct charset_info_st my_charset_utf16_turkish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_czech_uca_ci=
@@ -38796,7 +38175,7 @@ struct charset_info_st my_charset_utf16_czech_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -38829,7 +38208,7 @@ struct charset_info_st my_charset_utf16_danish_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_lithuanian_uca_ci=
@@ -38861,7 +38240,7 @@ struct charset_info_st my_charset_utf16_lithuanian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_slovak_uca_ci=
@@ -38893,7 +38272,7 @@ struct charset_info_st my_charset_utf16_slovak_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_spanish2_uca_ci=
@@ -38925,7 +38304,7 @@ struct charset_info_st my_charset_utf16_spanish2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_roman_uca_ci=
@@ -38957,7 +38336,7 @@ struct charset_info_st my_charset_utf16_roman_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_persian_uca_ci=
@@ -38989,7 +38368,7 @@ struct charset_info_st my_charset_utf16_persian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_esperanto_uca_ci=
@@ -39021,7 +38400,7 @@ struct charset_info_st my_charset_utf16_esperanto_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_hungarian_uca_ci=
@@ -39053,7 +38432,7 @@ struct charset_info_st my_charset_utf16_hungarian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_sinhala_uca_ci=
@@ -39085,7 +38464,7 @@ struct charset_info_st my_charset_utf16_sinhala_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
struct charset_info_st my_charset_utf16_german2_uca_ci=
@@ -39117,7 +38496,7 @@ struct charset_info_st my_charset_utf16_german2_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -39150,7 +38529,7 @@ struct charset_info_st my_charset_utf16_croatian_mysql561_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -39183,7 +38562,7 @@ struct charset_info_st my_charset_utf16_croatian_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -39216,7 +38595,7 @@ struct charset_info_st my_charset_utf16_myanmar_uca_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -39249,7 +38628,7 @@ struct charset_info_st my_charset_utf16_thai_520_w2=
0, /* escape_with_backslash_is_dangerous */
2, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_any_uca_handler_multilevel
+ &my_uca_collation_handler_multilevel_utf16
};
@@ -39282,7 +38661,7 @@ struct charset_info_st my_charset_utf16_unicode_520_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -39315,7 +38694,7 @@ struct charset_info_st my_charset_utf16_vietnamese_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_utf16_uca_handler
+ &my_uca_collation_handler_utf16
};
@@ -39348,7 +38727,7 @@ struct charset_info_st my_charset_utf16_unicode_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_generic_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf16
};
@@ -39381,7 +38760,7 @@ struct charset_info_st my_charset_utf16_unicode_520_nopad_ci=
0, /* escape_with_backslash_is_dangerous */
1, /* levels_for_order */
&my_charset_utf16_handler,
- &my_collation_generic_uca_nopad_handler
+ &my_uca_collation_handler_nopad_utf16
};
diff --git a/strings/ctype-uca.inl b/strings/ctype-uca.inl
new file mode 100644
index 00000000000..7c9d34d217e
--- /dev/null
+++ b/strings/ctype-uca.inl
@@ -0,0 +1,911 @@
+/*
+ Copyright (c) 2018 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-1301 USA
+*/
+
+
+#ifndef MY_FUNCTION_NAME
+#error MY_FUNCTION_NAME is not defined
+#endif
+#ifndef MY_MB_WC
+#error MY_MB_WC is not defined
+#endif
+#ifndef MY_LIKE_RANGE
+#error MY_LIKE_RANGE is not defined
+#endif
+#ifndef MY_UCA_ASCII_OPTIMIZE
+#error MY_ASCII_OPTIMIZE is not defined
+#endif
+#ifndef MY_UCA_COMPILE_CONTRACTIONS
+#error MY_UCA_COMPILE_CONTRACTIONS is not defined
+#endif
+#ifndef MY_UCA_COLL_INIT
+#error MY_UCA_COLL_INIT is not defined
+#endif
+
+#include "ctype-uca-scanner_next.inl"
+#define SCANNER_NEXT_NCHARS
+#include "ctype-uca-scanner_next.inl"
+
+/*
+ Compares two strings according to the collation
+
+ SYNOPSIS:
+ strnncoll_onelevel()
+ cs Character set information
+ level Weight level (0 primary, 1 secondary, 2 tertiary, etc)
+ s First string
+ slen First string length
+ t Second string
+ tlen Seconf string length
+ level DUCETweight level
+
+ NOTES:
+ Initializes two weight scanners and gets weights
+ corresponding to two strings in a loop. If weights are not
+ the same at some step then returns their difference.
+
+ In the while() comparison these situations are possible:
+ 1. (s_res>0) and (t_res>0) and (s_res == t_res)
+ Weights are the same so far, continue comparison
+ 2. (s_res>0) and (t_res>0) and (s_res!=t_res)
+ A difference has been found, return.
+ 3. (s_res>0) and (t_res<0)
+ We have reached the end of the second string, or found
+ an illegal multibyte sequence in the second string.
+ Return a positive number, i.e. the first string is bigger.
+ 4. (s_res<0) and (t_res>0)
+ We have reached the end of the first string, or found
+ an illegal multibyte sequence in the first string.
+ Return a negative number, i.e. the second string is bigger.
+ 5. (s_res<0) and (t_res<0)
+ Both scanners returned -1. It means we have riched
+ the end-of-string of illegal-sequence in both strings
+ at the same time. Return 0, strings are equal.
+
+ RETURN
+ Difference between two strings, according to the collation:
+ 0 - means strings are equal
+ negative number - means the first string is smaller
+ positive number - means the first string is bigger
+*/
+
+static int
+MY_FUNCTION_NAME(strnncoll_onelevel)(CHARSET_INFO *cs,
+ const MY_UCA_WEIGHT_LEVEL *level,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ my_bool t_is_prefix)
+{
+ my_uca_scanner sscanner;
+ my_uca_scanner tscanner;
+ int s_res;
+ int t_res;
+
+ my_uca_scanner_init_any(&sscanner, cs, level, s, slen);
+ my_uca_scanner_init_any(&tscanner, cs, level, t, tlen);
+
+ do
+ {
+ s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner);
+ t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner);
+ } while ( s_res == t_res && s_res >0);
+
+ return (t_is_prefix && t_res < 0) ? 0 : (s_res - t_res);
+}
+
+
+/*
+ One-level, PAD SPACE.
+*/
+static int
+MY_FUNCTION_NAME(strnncoll)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ my_bool t_is_prefix)
+{
+ return MY_FUNCTION_NAME(strnncoll_onelevel)(cs, &cs->uca->level[0],
+ s, slen, t, tlen, t_is_prefix);
+}
+
+
+/*
+ Multi-level, PAD SPACE.
+*/
+static int
+MY_FUNCTION_NAME(strnncoll_multilevel)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ my_bool t_is_prefix)
+{
+ uint i, num_level= cs->levels_for_order;
+ for (i= 0; i != num_level; i++)
+ {
+ int ret= MY_FUNCTION_NAME(strnncoll_onelevel)(cs, &cs->uca->level[i],
+ s, slen, t, tlen,
+ t_is_prefix);
+ if (ret)
+ return ret;
+ }
+ return 0;
+}
+
+
+/*
+ Compares two strings according to the collation,
+ ignoring trailing spaces.
+
+ SYNOPSIS:
+ strnncollsp_onelevel()
+ cs Character set information
+ level UCA weight level
+ s First string
+ slen First string length
+ t Second string
+ tlen Seconf string length
+ level DUCETweight level
+
+ NOTES:
+ Works exactly the same with my_strnncoll_uca(),
+ but ignores trailing spaces.
+
+ In the while() comparison these situations are possible:
+ 1. (s_res>0) and (t_res>0) and (s_res == t_res)
+ Weights are the same so far, continue comparison
+ 2. (s_res>0) and (t_res>0) and (s_res!=t_res)
+ A difference has been found, return.
+ 3. (s_res>0) and (t_res<0)
+ We have reached the end of the second string, or found
+ an illegal multibyte sequence in the second string.
+ Compare the first string to an infinite array of
+ space characters until difference is found, or until
+ the end of the first string.
+ 4. (s_res<0) and (t_res>0)
+ We have reached the end of the first string, or found
+ an illegal multibyte sequence in the first string.
+ Compare the second string to an infinite array of
+ space characters until difference is found or until
+ the end of the second steing.
+ 5. (s_res<0) and (t_res<0)
+ Both scanners returned -1. It means we have riched
+ the end-of-string of illegal-sequence in both strings
+ at the same time. Return 0, strings are equal.
+
+ RETURN
+ Difference between two strings, according to the collation:
+ 0 - means strings are equal
+ negative number - means the first string is smaller
+ positive number - means the first string is bigger
+*/
+
+static int
+MY_FUNCTION_NAME(strnncollsp_onelevel)(CHARSET_INFO *cs,
+ const MY_UCA_WEIGHT_LEVEL *level,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen)
+{
+ my_uca_scanner sscanner, tscanner;
+ int s_res, t_res;
+
+ my_uca_scanner_init_any(&sscanner, cs, level, s, slen);
+ my_uca_scanner_init_any(&tscanner, cs, level, t, tlen);
+
+ do
+ {
+ s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner);
+ t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner);
+ } while ( s_res == t_res && s_res >0);
+
+ if (s_res > 0 && t_res < 0)
+ {
+ /* Calculate weight for SPACE character */
+ t_res= my_space_weight(level);
+
+ /* compare the first string to spaces */
+ do
+ {
+ if (s_res != t_res)
+ return (s_res - t_res);
+ s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner);
+ } while (s_res > 0);
+ return 0;
+ }
+
+ if (s_res < 0 && t_res > 0)
+ {
+ /* Calculate weight for SPACE character */
+ s_res= my_space_weight(level);
+
+ /* compare the second string to spaces */
+ do
+ {
+ if (s_res != t_res)
+ return (s_res - t_res);
+ t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner);
+ } while (t_res > 0);
+ return 0;
+ }
+
+ return ( s_res - t_res );
+}
+
+
+/*
+ One-level, PAD SPACE
+*/
+static int
+MY_FUNCTION_NAME(strnncollsp)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen)
+{
+ return MY_FUNCTION_NAME(strnncollsp_onelevel)(cs, &cs->uca->level[0],
+ s, slen, t, tlen);
+}
+
+
+/*
+ One-level, NO PAD
+*/
+static int
+MY_FUNCTION_NAME(strnncollsp_nopad)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen)
+{
+ return MY_FUNCTION_NAME(strnncoll_onelevel)(cs, &cs->uca->level[0],
+ s, slen, t, tlen, FALSE);
+}
+
+
+/*
+ Multi-level, PAD SPACE
+*/
+static int
+MY_FUNCTION_NAME(strnncollsp_multilevel)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen)
+{
+
+ uint i, num_level= cs->levels_for_order;
+ for (i= 0; i != num_level; i++)
+ {
+ int ret= MY_FUNCTION_NAME(strnncollsp_onelevel)(cs, &cs->uca->level[i],
+ s, slen, t, tlen);
+ if (ret)
+ return ret;
+ }
+ return 0;
+}
+
+
+/*
+ Multi-level, NO PAD
+*/
+static int
+MY_FUNCTION_NAME(strnncollsp_nopad_multilevel)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen)
+{
+ uint num_level= cs->levels_for_order;
+ uint i;
+ for (i= 0; i != num_level; i++)
+ {
+ int ret= MY_FUNCTION_NAME(strnncoll_onelevel)(cs, &cs->uca->level[i],
+ s, slen, t, tlen, FALSE);
+ if (ret)
+ return ret;
+ }
+ return 0;
+}
+
+
+/*
+ Scan the next weight and perform space padding
+ or trimming according to "nchars".
+*/
+static inline weight_and_nchars_t
+MY_FUNCTION_NAME(scanner_next_pad_trim)(my_uca_scanner *scanner,
+ size_t nchars,
+ uint *generated)
+{
+ weight_and_nchars_t res;
+ if (nchars > 0 ||
+ scanner->wbeg[0] /* Some weights from a previous expansion left */)
+ {
+ if ((res= MY_FUNCTION_NAME(scanner_next_with_nchars)(scanner,
+ nchars)).weight < 0)
+ {
+ /*
+ We reached the end of the string, but the caller wants more weights.
+ Perform space padding.
+ */
+ res.weight= my_space_weight(scanner->level);
+ res.nchars= 1;
+ (*generated)++;
+ }
+ else if (res.nchars > nchars)
+ {
+ /*
+ We scanned the next collation element, but it does not fit into
+ the "nchars" limit. This is possible in case of:
+ - A contraction, e.g. Czech 'ch' with nchars=1
+ - A sequence of ignorable characters followed by non-ignorable ones,
+ e.g. CONCAT(x'00','a') with nchars=1.
+ Perform trimming.
+ */
+ res.weight= scanner->cs->state & MY_CS_NOPAD ?
+ 0 : my_space_weight(scanner->level);
+ res.nchars= (uint) nchars;
+ (*generated)++;
+ }
+ }
+ else
+ {
+ /* The caller wants nchars==0. Perform trimming. */
+ res.weight= scanner->cs->state & MY_CS_NOPAD ?
+ 0 : my_space_weight(scanner->level);
+ res.nchars= 0;
+ (*generated)++;
+ }
+ return res;
+}
+
+
+static int
+MY_FUNCTION_NAME(strnncollsp_nchars_onelevel)(CHARSET_INFO *cs,
+ const MY_UCA_WEIGHT_LEVEL *level,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ size_t nchars)
+{
+ my_uca_scanner sscanner;
+ my_uca_scanner tscanner;
+ size_t s_nchars_left= nchars;
+ size_t t_nchars_left= nchars;
+
+ my_uca_scanner_init_any(&sscanner, cs, level, s, slen);
+ my_uca_scanner_init_any(&tscanner, cs, level, t, tlen);
+
+ for ( ; ; )
+ {
+ weight_and_nchars_t s_res;
+ weight_and_nchars_t t_res;
+ uint generated= 0;
+ int diff;
+
+ s_res= MY_FUNCTION_NAME(scanner_next_pad_trim)(&sscanner, s_nchars_left,
+ &generated);
+ t_res= MY_FUNCTION_NAME(scanner_next_pad_trim)(&tscanner, t_nchars_left,
+ &generated);
+ if ((diff= (s_res.weight - t_res.weight)))
+ return diff;
+
+ if (generated == 2)
+ {
+ if (cs->state & MY_CS_NOPAD)
+ {
+ /*
+ Both values are auto-generated. There's no real data any more.
+ We need to handle the remaining virtual trailing spaces.
+ The two strings still have s_nchars_left and t_nchars_left imaginary
+ trailing spaces at the end. If s_nchars_left != t_nchars_left,
+ the strings will be not equal in case of a NOPAD collation.
+
+ Example:
+ "B" is German "U+00DF LATIN SMALL LETTER SHARP S"
+ When we have these values in a
+ CHAR(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_nopad_ci
+ column:
+ 'B ' (one character, two trailing spaces)
+ 'ss ' (two characters, one trailing space)
+ The 'B ' is greater than the 'ss '.
+ They are compared in the following steps:
+ 1. 'B' == 'ss'
+ 2. ' ' == ' '
+ 3. ' ' > ''
+
+ We need to emulate the same behavior in this function even if
+ it's called with strings 'B' and 'ss' (with space trimmed).
+ The side which has more remaining virtual spaces at the end
+ is greater.
+ */
+ if (s_nchars_left < t_nchars_left)
+ return -1;
+ if (s_nchars_left > t_nchars_left)
+ return +1;
+ }
+ return 0;
+ }
+
+ DBUG_ASSERT(s_nchars_left >= s_res.nchars);
+ DBUG_ASSERT(t_nchars_left >= t_res.nchars);
+ s_nchars_left-= s_res.nchars;
+ t_nchars_left-= t_res.nchars;
+ }
+
+ return 0;
+}
+
+
+/*
+ One-level collations.
+*/
+static int
+MY_FUNCTION_NAME(strnncollsp_nchars)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ size_t nchars)
+{
+ return MY_FUNCTION_NAME(strnncollsp_nchars_onelevel)(cs, &cs->uca->level[0],
+ s, slen, t, tlen,
+ nchars);
+}
+
+
+/*
+ Multi-level collations.
+*/
+static int
+MY_FUNCTION_NAME(strnncollsp_nchars_multilevel)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ size_t nchars)
+{
+ uint num_level= cs->levels_for_order;
+ uint i;
+ for (i= 0; i != num_level; i++)
+ {
+ int ret= MY_FUNCTION_NAME(strnncollsp_nchars_onelevel)(cs,
+ &cs->uca->level[i],
+ s, slen,
+ t, tlen,
+ nchars);
+ if (ret)
+ return ret;
+ }
+ return 0;
+}
+
+
+/*
+ Calculates hash value for the given string,
+ according to the collation, and ignoring trailing spaces.
+
+ SYNOPSIS:
+ hash_sort()
+ cs Character set information
+ s String
+ slen String's length
+ n1 First hash parameter
+ n2 Second hash parameter
+
+ NOTES:
+ Scans consequently weights and updates
+ hash parameters n1 and n2. In a case insensitive collation,
+ upper and lower case of the same letter will return the same
+ weight sequence, and thus will produce the same hash values
+ in n1 and n2.
+
+ This functions is used for one-level and for multi-level collations.
+ We intentionally use only primary level in multi-level collations.
+ This helps to have PARTITION BY KEY put primarily equal records
+ into the same partition. E.g. in utf8_thai_520_ci records that differ
+ only in tone marks go into the same partition.
+
+ RETURN
+ N/A
+*/
+
+static void
+MY_FUNCTION_NAME(hash_sort)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
+{
+ int s_res;
+ my_uca_scanner scanner;
+ int space_weight= my_space_weight(&cs->uca->level[0]);
+ register ulong m1= *nr1, m2= *nr2;
+
+ my_uca_scanner_init_any(&scanner, cs, &cs->uca->level[0], s, slen);
+
+ while ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) >0)
+ {
+ if (s_res == space_weight)
+ {
+ /* Combine all spaces to be able to skip end spaces */
+ uint count= 0;
+ do
+ {
+ count++;
+ if ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) <= 0)
+ {
+ /* Skip strings at end of string */
+ goto end;
+ }
+ }
+ while (s_res == space_weight);
+
+ /* Add back that has for the space characters */
+ do
+ {
+ /*
+ We can't use MY_HASH_ADD_16() here as we, because of a misstake
+ in the original code, where we added the 16 byte variable the
+ opposite way. Changing this would cause old partitioned tables
+ to fail.
+ */
+ MY_HASH_ADD(m1, m2, space_weight >> 8);
+ MY_HASH_ADD(m1, m2, space_weight & 0xFF);
+ }
+ while (--count != 0);
+
+ }
+ /* See comment above why we can't use MY_HASH_ADD_16() */
+ MY_HASH_ADD(m1, m2, s_res >> 8);
+ MY_HASH_ADD(m1, m2, s_res & 0xFF);
+ }
+end:
+ *nr1= m1;
+ *nr2= m2;
+}
+
+
+static void
+MY_FUNCTION_NAME(hash_sort_nopad)(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
+{
+ int s_res;
+ my_uca_scanner scanner;
+ register ulong m1= *nr1, m2= *nr2;
+
+ my_uca_scanner_init_any(&scanner, cs, &cs->uca->level[0], s, slen);
+
+ while ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) >0)
+ {
+ /* See comment above why we can't use MY_HASH_ADD_16() */
+ MY_HASH_ADD(m1, m2, s_res >> 8);
+ MY_HASH_ADD(m1, m2, s_res & 0xFF);
+ }
+ *nr1= m1;
+ *nr2= m2;
+}
+
+
+
+/*
+ For the given string creates its "binary image", suitable
+ to be used in binary comparison, i.e. in memcmp().
+
+ SYNOPSIS:
+ my_strnxfrm_uca()
+ cs Character set information
+ dst Where to write the image
+ dstlen Space available for the image, in bytes
+ src The source string
+ srclen Length of the source string, in bytes
+
+ NOTES:
+ In a loop, scans weights from the source string and writes
+ them into the binary image. In a case insensitive collation,
+ upper and lower cases of the same letter will produce the
+ same image subsequences. When we have reached the end-of-string
+ or found an illegal multibyte sequence, the loop stops.
+
+ It is impossible to restore the original string using its
+ binary image.
+
+ Binary images are used for bulk comparison purposes,
+ e.g. in ORDER BY, when it is more efficient to create
+ a binary image and use it instead of weight scanner
+ for the original strings for every comparison.
+
+ RETURN
+ Number of bytes that have been written into the binary image.
+*/
+
+static uchar *
+MY_FUNCTION_NAME(strnxfrm_onelevel_internal)(CHARSET_INFO *cs,
+ MY_UCA_WEIGHT_LEVEL *level,
+ uchar *dst, uchar *de,
+ uint *nweights,
+ const uchar *src, size_t srclen)
+{
+ my_uca_scanner scanner;
+ int s_res;
+
+ DBUG_ASSERT(src || !srclen);
+
+#if MY_UCA_ASCII_OPTIMIZE && !MY_UCA_COMPILE_CONTRACTIONS
+ /*
+ Fast path for the ASCII range with no contractions.
+ */
+ {
+ const uchar *de2= de - 1; /* Last position where 2 bytes fit */
+ const uint16 *weights0= level->weights[0];
+ uint lengths0= level->lengths[0];
+ for ( ; ; src++, srclen--)
+ {
+ const uint16 *weight;
+ if (!srclen || !*nweights)
+ return dst; /* Done */
+ if (*src > 0x7F)
+ break; /* Non-ASCII */
+
+ weight= weights0 + (((uint) *src) * lengths0);
+ if (!(s_res= *weight))
+ continue; /* Ignorable */
+ if (weight[1]) /* Expansion (e.g. in a user defined collation */
+ break;
+
+ /* Here we have a character with extactly one 2-byte UCA weight */
+ if (dst < de2) /* Most typical case is when both bytes fit */
+ {
+ *dst++= s_res >> 8;
+ *dst++= s_res & 0xFF;
+ (*nweights)--;
+ continue;
+ }
+ if (dst >= de) /* No space left in "dst" */
+ return dst;
+ *dst++= s_res >> 8; /* There is space only for one byte */
+ (*nweights)--;
+ return dst;
+ }
+ }
+#endif
+
+ my_uca_scanner_init_any(&scanner, cs, level, src, srclen);
+ for (; dst < de && *nweights &&
+ (s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) > 0 ; (*nweights)--)
+ {
+ *dst++= s_res >> 8;
+ if (dst < de)
+ *dst++= s_res & 0xFF;
+ }
+ return dst;
+}
+
+
+static uchar *
+MY_FUNCTION_NAME(strnxfrm_onelevel)(CHARSET_INFO *cs,
+ MY_UCA_WEIGHT_LEVEL *level,
+ uchar *dst, uchar *de, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *d0= dst;
+ dst= MY_FUNCTION_NAME(strnxfrm_onelevel_internal)(cs, level,
+ dst, de, &nweights,
+ src, srclen);
+ DBUG_ASSERT(dst <= de);
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ dst= my_strnxfrm_uca_padn(dst, de, nweights, my_space_weight(level));
+ DBUG_ASSERT(dst <= de);
+ my_strxfrm_desc_and_reverse(d0, dst, flags, 0);
+ return dst;
+}
+
+
+
+static uchar *
+MY_FUNCTION_NAME(strnxfrm_nopad_onelevel)(CHARSET_INFO *cs,
+ MY_UCA_WEIGHT_LEVEL *level,
+ uchar *dst, uchar *de, uint nweights,
+ const uchar *src, size_t srclen,
+ uint flags)
+{
+ uchar *d0= dst;
+ dst= MY_FUNCTION_NAME(strnxfrm_onelevel_internal)(cs, level,
+ dst, de, &nweights,
+ src, srclen);
+ DBUG_ASSERT(dst <= de);
+ /* Pad with the minimum possible weight on this level */
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ dst= my_strnxfrm_uca_padn(dst, de, nweights, min_weight_on_level(level));
+ DBUG_ASSERT(dst <= de);
+ my_strxfrm_desc_and_reverse(d0, dst, flags, 0);
+ return dst;
+}
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *d0= dst;
+ uchar *de= dst + dstlen;
+
+ /*
+ There are two ways to handle trailing spaces for PAD SPACE collations:
+ 1. Keep trailing spaces as they are, so have strnxfrm_onelevel() scan
+ spaces as normal characters. This will call scanner_next() for every
+ trailing space and calculate its weight using UCA weights.
+ 2. Strip trailing spaces before calling strnxfrm_onelevel(), as it will
+ append weights for implicit spaces anyway, up to the desired key size.
+ This will effectively generate exactly the same sortable key result.
+ The latter is much faster.
+ */
+
+ if (flags & MY_STRXFRM_PAD_WITH_SPACE)
+ srclen= cs->cset->lengthsp(cs, (const char*) src, srclen);
+ dst= MY_FUNCTION_NAME(strnxfrm_onelevel)(cs, &cs->uca->level[0],
+ dst, de, nweights,
+ src, srclen, flags);
+ /*
+ This can probably be changed to memset(dst, 0, de - dst),
+ like my_strnxfrm_uca_multilevel() does.
+ */
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ dst= my_strnxfrm_uca_pad(dst, de, my_space_weight(&cs->uca->level[0]));
+ return dst - d0;
+}
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm_nopad)(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen,
+ uint nweights,
+ const uchar *src, size_t srclen,
+ uint flags)
+{
+ uchar *d0= dst;
+ uchar *de= dst + dstlen;
+
+ dst= MY_FUNCTION_NAME(strnxfrm_nopad_onelevel)(cs, &cs->uca->level[0],
+ dst, de, nweights,
+ src, srclen, flags);
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ {
+ memset(dst, 0, de - dst);
+ dst= de;
+ }
+ return dst - d0;
+}
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm_multilevel)(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen,
+ uint nweights,
+ const uchar *src, size_t srclen,
+ uint flags)
+{
+ uint num_level= cs->levels_for_order;
+ uchar *d0= dst;
+ uchar *de= dst + dstlen;
+ uint current_level;
+
+ for (current_level= 0; current_level != num_level; current_level++)
+ {
+ if (!(flags & MY_STRXFRM_LEVEL_ALL) ||
+ (flags & (MY_STRXFRM_LEVEL1 << current_level)))
+ dst= cs->state & MY_CS_NOPAD ?
+ MY_FUNCTION_NAME(strnxfrm_nopad_onelevel)(cs,
+ &cs->uca->level[current_level],
+ dst, de, nweights,
+ src, srclen, flags) :
+ MY_FUNCTION_NAME(strnxfrm_onelevel)(cs,
+ &cs->uca->level[current_level],
+ dst, de, nweights,
+ src, srclen, flags);
+ }
+
+ if (dst < de && (flags & MY_STRXFRM_PAD_TO_MAXLEN))
+ {
+ memset(dst, 0, de - dst);
+ dst= de;
+ }
+
+ return dst - d0;
+}
+
+
+/*
+ One-level, PAD SPACE
+*/
+MY_COLLATION_HANDLER MY_FUNCTION_NAME(collation_handler)=
+{
+ MY_UCA_COLL_INIT,
+ MY_FUNCTION_NAME(strnncoll),
+ MY_FUNCTION_NAME(strnncollsp),
+ MY_FUNCTION_NAME(strnncollsp_nchars),
+ MY_FUNCTION_NAME(strnxfrm),
+ my_strnxfrmlen_any_uca,
+ MY_LIKE_RANGE,
+ my_wildcmp_uca,
+ NULL, /* strcasecmp() */
+ my_instr_mb,
+ MY_FUNCTION_NAME(hash_sort),
+ my_propagate_complex
+};
+
+
+/*
+ One-level, NO PAD
+ For character sets with mbminlen==1 use MY_LIKE_RANGE=my_like_range_mb
+ For character sets with mbminlen>=2 use MY_LIKE_RANGE=my_like_range_generic
+*/
+MY_COLLATION_HANDLER MY_FUNCTION_NAME(collation_handler_nopad)=
+{
+ MY_UCA_COLL_INIT,
+ MY_FUNCTION_NAME(strnncoll),
+ MY_FUNCTION_NAME(strnncollsp_nopad),
+ MY_FUNCTION_NAME(strnncollsp_nchars),
+ MY_FUNCTION_NAME(strnxfrm_nopad),
+ my_strnxfrmlen_any_uca,
+ MY_LIKE_RANGE, /* my_like_range_mb or my_like_range_generic */
+ my_wildcmp_uca,
+ NULL, /* strcasecmp() */
+ my_instr_mb,
+ MY_FUNCTION_NAME(hash_sort_nopad),
+ my_propagate_complex
+};
+
+
+/*
+ Multi-level, PAD SPACE
+*/
+MY_COLLATION_HANDLER MY_FUNCTION_NAME(collation_handler_multilevel)=
+{
+ MY_UCA_COLL_INIT,
+ MY_FUNCTION_NAME(strnncoll_multilevel),
+ MY_FUNCTION_NAME(strnncollsp_multilevel),
+ MY_FUNCTION_NAME(strnncollsp_nchars_multilevel),
+ MY_FUNCTION_NAME(strnxfrm_multilevel),
+ my_strnxfrmlen_any_uca_multilevel,
+ MY_LIKE_RANGE,
+ my_wildcmp_uca,
+ NULL, /* strcasecmp() */
+ my_instr_mb,
+ MY_FUNCTION_NAME(hash_sort),
+ my_propagate_complex
+};
+
+
+/*
+ Multi-level, NO PAD
+*/
+MY_COLLATION_HANDLER MY_FUNCTION_NAME(collation_handler_nopad_multilevel)=
+{
+ MY_UCA_COLL_INIT,
+ MY_FUNCTION_NAME(strnncoll_multilevel),
+ MY_FUNCTION_NAME(strnncollsp_nopad_multilevel),
+ MY_FUNCTION_NAME(strnncollsp_nchars_multilevel),
+ MY_FUNCTION_NAME(strnxfrm_multilevel),
+ my_strnxfrmlen_any_uca_multilevel,
+ MY_LIKE_RANGE,
+ my_wildcmp_uca,
+ NULL, /* strcasecmp() */
+ my_instr_mb,
+ MY_FUNCTION_NAME(hash_sort),
+ my_propagate_complex
+};
+
+
+MY_COLLATION_HANDLER_PACKAGE MY_FUNCTION_NAME(package)=
+{
+ &MY_FUNCTION_NAME(collation_handler),
+ &MY_FUNCTION_NAME(collation_handler_nopad),
+ &MY_FUNCTION_NAME(collation_handler_multilevel),
+ &MY_FUNCTION_NAME(collation_handler_nopad_multilevel)
+};
+
+
+#undef MY_FUNCTION_NAME
+#undef MY_MB_WC
+#undef MY_LIKE_RANGE
+#undef MY_UCA_ASCII_OPTIMIZE
+#undef MY_UCA_COMPILE_CONTRACTIONS
+#undef MY_UCA_COLL_INIT
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index afdd70a7944..2e6b1239c0a 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -23,6 +23,8 @@
#include <my_sys.h>
#include <stdarg.h>
+#include "ctype-unidata.h"
+
#if defined(HAVE_CHARSET_utf16) || defined(HAVE_CHARSET_ucs2)
#define HAVE_CHARSET_mb2
@@ -1187,35 +1189,7 @@ my_lengthsp_mb2(CHARSET_INFO *cs __attribute__((unused)),
but the JSON functions needed my_utf16_uni()
so the #ifdef was moved lower.
*/
-
-
-/*
- D800..DB7F - Non-provate surrogate high (896 pages)
- DB80..DBFF - Private surrogate high (128 pages)
- DC00..DFFF - Surrogate low (1024 codes in a page)
-*/
-#define MY_UTF16_SURROGATE_HIGH_FIRST 0xD800
-#define MY_UTF16_SURROGATE_HIGH_LAST 0xDBFF
-#define MY_UTF16_SURROGATE_LOW_FIRST 0xDC00
-#define MY_UTF16_SURROGATE_LOW_LAST 0xDFFF
-
-#define MY_UTF16_HIGH_HEAD(x) ((((uchar) (x)) & 0xFC) == 0xD8)
-#define MY_UTF16_LOW_HEAD(x) ((((uchar) (x)) & 0xFC) == 0xDC)
-/* Test if a byte is a leading byte of a high or low surrogate head: */
-#define MY_UTF16_SURROGATE_HEAD(x) ((((uchar) (x)) & 0xF8) == 0xD8)
-/* Test if a Unicode code point is a high or low surrogate head */
-#define MY_UTF16_SURROGATE(x) (((x) & 0xF800) == 0xD800)
-
-#define MY_UTF16_WC2(a, b) ((a << 8) + b)
-
-/*
- a= 110110?? (<< 18)
- b= ???????? (<< 10)
- c= 110111?? (<< 8)
- d= ???????? (<< 0)
-*/
-#define MY_UTF16_WC4(a, b, c, d) (((a & 3) << 18) + (b << 10) + \
- ((c & 3) << 8) + d + 0x10000)
+#include "ctype-utf16.h"
#define IS_MB2_CHAR(b0,b1) (!MY_UTF16_SURROGATE_HEAD(b0))
#define IS_MB4_CHAR(b0,b1,b2,b3) (MY_UTF16_HIGH_HEAD(b0) && MY_UTF16_LOW_HEAD(b2))
@@ -1223,10 +1197,17 @@ my_lengthsp_mb2(CHARSET_INFO *cs __attribute__((unused)),
static inline int my_weight_mb2_utf16mb2_general_ci(uchar b0, uchar b1)
{
my_wc_t wc= MY_UTF16_WC2(b0, b1);
- MY_UNICASE_CHARACTER *page= my_unicase_default.page[wc >> 8];
+ MY_UNICASE_CHARACTER *page= my_unicase_default_pages[wc >> 8];
return (int) (page ? page[wc & 0xFF].sort : wc);
}
#define MY_FUNCTION_NAME(x) my_ ## x ## _utf16_general_ci
+#define DEFINE_STRNXFRM_UNICODE
+#define DEFINE_STRNXFRM_UNICODE_NOPAD
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_utf16_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 0
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 my_unicase_default_page00
+#define UNICASE_PAGES my_unicase_default_pages
#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
#define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b0,b1)
#define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER
@@ -1264,32 +1245,7 @@ static inline int my_weight_mb2_utf16mb2_general_ci(uchar b0, uchar b1)
my_utf16_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
- if (s + 2 > e)
- return MY_CS_TOOSMALL2;
-
- /*
- High bytes: 0xD[89AB] = B'110110??'
- Low bytes: 0xD[CDEF] = B'110111??'
- Surrogate mask: 0xFC = B'11111100'
- */
-
- if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */
- {
- if (s + 4 > e)
- return MY_CS_TOOSMALL4;
-
- if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */
- return MY_CS_ILSEQ;
-
- *pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]);
- return 4;
- }
-
- if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */
- return MY_CS_ILSEQ;
-
- *pwc= MY_UTF16_WC2(s[0], s[1]);
- return 2;
+ return my_mb_wc_utf16_quick(pwc, s, e);
}
@@ -1549,7 +1505,8 @@ static MY_COLLATION_HANDLER my_collation_utf16_general_ci_handler =
NULL, /* init */
my_strnncoll_utf16_general_ci,
my_strnncollsp_utf16_general_ci,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_utf16_general_ci,
+ my_strnxfrm_utf16_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_utf16_ci,
@@ -1565,6 +1522,7 @@ static MY_COLLATION_HANDLER my_collation_utf16_bin_handler =
NULL, /* init */
my_strnncoll_utf16_bin,
my_strnncollsp_utf16_bin,
+ my_strnncollsp_nchars_utf16_bin,
my_strnxfrm_unicode_full_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_generic,
@@ -1581,7 +1539,8 @@ static MY_COLLATION_HANDLER my_collation_utf16_general_nopad_ci_handler =
NULL, /* init */
my_strnncoll_utf16_general_ci,
my_strnncollsp_utf16_general_nopad_ci,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_utf16_general_nopad_ci,
+ my_strnxfrm_nopad_utf16_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_utf16_ci,
@@ -1597,6 +1556,7 @@ static MY_COLLATION_HANDLER my_collation_utf16_nopad_bin_handler =
NULL, /* init */
my_strnncoll_utf16_bin,
my_strnncollsp_utf16_nopad_bin,
+ my_strnncollsp_nchars_utf16_nopad_bin,
my_strnxfrm_unicode_full_nopad_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_generic,
@@ -1778,6 +1738,13 @@ struct charset_info_st my_charset_utf16_nopad_bin=
#define IS_MB4_CHAR(b0,b1,b2,b3) (MY_UTF16_HIGH_HEAD(b1) && MY_UTF16_LOW_HEAD(b3))
#define MY_FUNCTION_NAME(x) my_ ## x ## _utf16le_general_ci
+#define DEFINE_STRNXFRM_UNICODE
+#define DEFINE_STRNXFRM_UNICODE_NOPAD
+#define MY_MB_WC(cs, pwc, s, e) (cs->cset->mb_wc(cs, pwc, s, e))
+#define OPTIMIZE_ASCII 0
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 my_unicase_default_page00
+#define UNICASE_PAGES my_unicase_default_pages
#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
#define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b1,b0)
#define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER
@@ -1882,7 +1849,8 @@ static MY_COLLATION_HANDLER my_collation_utf16le_general_ci_handler =
NULL, /* init */
my_strnncoll_utf16le_general_ci,
my_strnncollsp_utf16le_general_ci,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_utf16le_general_ci,
+ my_strnxfrm_utf16le_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_utf16_ci,
@@ -1898,6 +1866,7 @@ static MY_COLLATION_HANDLER my_collation_utf16le_bin_handler =
NULL, /* init */
my_strnncoll_utf16le_bin,
my_strnncollsp_utf16le_bin,
+ my_strnncollsp_nchars_utf16le_bin,
my_strnxfrm_unicode_full_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_generic,
@@ -1914,7 +1883,8 @@ static MY_COLLATION_HANDLER my_collation_utf16le_general_nopad_ci_handler =
NULL, /* init */
my_strnncoll_utf16le_general_ci,
my_strnncollsp_utf16le_general_nopad_ci,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_utf16le_general_nopad_ci,
+ my_strnxfrm_nopad_utf16le_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_utf16_ci,
@@ -1930,6 +1900,7 @@ static MY_COLLATION_HANDLER my_collation_utf16le_nopad_bin_handler =
NULL, /* init */
my_strnncoll_utf16le_bin,
my_strnncollsp_utf16le_nopad_bin,
+ my_strnncollsp_nchars_utf16le_nopad_bin,
my_strnxfrm_unicode_full_nopad_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_generic,
@@ -2112,6 +2083,8 @@ struct charset_info_st my_charset_utf16le_nopad_bin=
#ifdef HAVE_CHARSET_utf32
+#include "ctype-utf32.h"
+
/*
Check is b0 and b1 start a valid UTF32 four-byte sequence.
Don't accept characters greater than U+10FFFF.
@@ -2120,8 +2093,6 @@ struct charset_info_st my_charset_utf16le_nopad_bin=
#define IS_MB4_CHAR(b0,b1,b2,b3) (IS_UTF32_MBHEAD4(b0,b1))
-#define MY_UTF32_WC4(b0,b1,b2,b3) ((((my_wc_t)b0) << 24) + (b1 << 16) + \
- (b2 << 8) + (b3))
static inline int my_weight_utf32_general_ci(uchar b0, uchar b1,
uchar b2, uchar b3)
@@ -2129,12 +2100,19 @@ static inline int my_weight_utf32_general_ci(uchar b0, uchar b1,
my_wc_t wc= MY_UTF32_WC4(b0, b1, b2, b3);
if (wc <= 0xFFFF)
{
- MY_UNICASE_CHARACTER *page= my_unicase_default.page[wc >> 8];
+ MY_UNICASE_CHARACTER *page= my_unicase_default_pages[wc >> 8];
return (int) (page ? page[wc & 0xFF].sort : wc);
}
return MY_CS_REPLACEMENT_CHARACTER;
}
#define MY_FUNCTION_NAME(x) my_ ## x ## _utf32_general_ci
+#define DEFINE_STRNXFRM_UNICODE
+#define DEFINE_STRNXFRM_UNICODE_NOPAD
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_utf32_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 0
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 my_unicase_default_page00
+#define UNICASE_PAGES my_unicase_default_pages
#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
#define WEIGHT_MB4(b0,b1,b2,b3) my_weight_utf32_general_ci(b0, b1, b2, b3)
#include "strcoll.inl"
@@ -2164,10 +2142,7 @@ static int
my_utf32_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
- if (s + 4 > e)
- return MY_CS_TOOSMALL4;
- *pwc= MY_UTF32_WC4(s[0], s[1], s[2], s[3]);
- return *pwc > 0x10FFFF ? MY_CS_ILSEQ : 4;
+ return my_mb_wc_utf32_quick(pwc, s, e);
}
@@ -2704,7 +2679,8 @@ static MY_COLLATION_HANDLER my_collation_utf32_general_ci_handler =
NULL, /* init */
my_strnncoll_utf32_general_ci,
my_strnncollsp_utf32_general_ci,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_utf32_general_ci,
+ my_strnxfrm_utf32_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_utf32_ci,
@@ -2720,6 +2696,7 @@ static MY_COLLATION_HANDLER my_collation_utf32_bin_handler =
NULL, /* init */
my_strnncoll_utf32_bin,
my_strnncollsp_utf32_bin,
+ my_strnncollsp_nchars_utf32_bin,
my_strnxfrm_unicode_full_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_generic,
@@ -2736,7 +2713,8 @@ static MY_COLLATION_HANDLER my_collation_utf32_general_nopad_ci_handler =
NULL, /* init */
my_strnncoll_utf32_general_ci,
my_strnncollsp_utf32_general_nopad_ci,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_utf32_general_nopad_ci,
+ my_strnxfrm_nopad_utf32_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_utf32_ci,
@@ -2752,6 +2730,7 @@ static MY_COLLATION_HANDLER my_collation_utf32_nopad_bin_handler =
NULL, /* init */
my_strnncoll_utf32_bin,
my_strnncollsp_utf32_nopad_bin,
+ my_strnncollsp_nchars_utf32_nopad_bin,
my_strnxfrm_unicode_full_nopad_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_generic,
@@ -2934,6 +2913,8 @@ struct charset_info_st my_charset_utf32_nopad_bin=
#ifdef HAVE_CHARSET_ucs2
+#include "ctype-ucs2.h"
+
static const uchar ctype_ucs2[] = {
0,
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
@@ -3001,20 +2982,30 @@ static const uchar to_upper_ucs2[] = {
static inline int my_weight_mb2_ucs2_general_ci(uchar b0, uchar b1)
{
my_wc_t wc= UCS2_CODE(b0, b1);
- MY_UNICASE_CHARACTER *page= my_unicase_default.page[wc >> 8];
+ MY_UNICASE_CHARACTER *page= my_unicase_default_pages[wc >> 8];
return (int) (page ? page[wc & 0xFF].sort : wc);
}
-#define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_general_ci
-#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
-#define WEIGHT_MB2(b0,b1) my_weight_mb2_ucs2_general_ci(b0,b1)
+#define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_general_ci
+#define DEFINE_STRNXFRM_UNICODE
+#define DEFINE_STRNXFRM_UNICODE_NOPAD
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_ucs2_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 0
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 my_unicase_default_page00
+#define UNICASE_PAGES my_unicase_default_pages
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) my_weight_mb2_ucs2_general_ci(b0,b1)
#include "strcoll.inl"
-#define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_bin
-#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
-#define WEIGHT_MB2(b0,b1) UCS2_CODE(b0,b1)
+#define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_bin
+#define DEFINE_STRNXFRM_UNICODE_BIN2
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_ucs2_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 0
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) UCS2_CODE(b0,b1)
#include "strcoll.inl"
@@ -3043,11 +3034,7 @@ my_charlen_ucs2(CHARSET_INFO *cs __attribute__((unused)),
static int my_ucs2_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
- if (s+2 > e) /* Need 2 characters */
- return MY_CS_TOOSMALL2;
-
- *pwc= ((uchar)s[0]) * 256 + ((uchar)s[1]);
- return 2;
+ return my_mb_wc_ucs2_quick(pwc, s, e);
}
static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) ,
@@ -3286,7 +3273,8 @@ static MY_COLLATION_HANDLER my_collation_ucs2_general_ci_handler =
NULL, /* init */
my_strnncoll_ucs2_general_ci,
my_strnncollsp_ucs2_general_ci,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_ucs2_general_ci,
+ my_strnxfrm_ucs2_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_ucs2_ci,
@@ -3302,7 +3290,8 @@ static MY_COLLATION_HANDLER my_collation_ucs2_bin_handler =
NULL, /* init */
my_strnncoll_ucs2_bin,
my_strnncollsp_ucs2_bin,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_ucs2_bin,
+ my_strnxfrm_ucs2_bin,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_ucs2_bin,
@@ -3318,7 +3307,8 @@ static MY_COLLATION_HANDLER my_collation_ucs2_general_nopad_ci_handler =
NULL, /* init */
my_strnncoll_ucs2_general_ci,
my_strnncollsp_ucs2_general_nopad_ci,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_ucs2_general_nopad_ci,
+ my_strnxfrm_nopad_ucs2_general_ci,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_ucs2_ci,
@@ -3334,7 +3324,8 @@ static MY_COLLATION_HANDLER my_collation_ucs2_nopad_bin_handler =
NULL, /* init */
my_strnncoll_ucs2_bin,
my_strnncollsp_ucs2_nopad_bin,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_ucs2_nopad_bin,
+ my_strnxfrm_nopad_ucs2_bin,
my_strnxfrmlen_unicode,
my_like_range_generic,
my_wildcmp_ucs2_bin,
diff --git a/strings/ctype-ucs2.h b/strings/ctype-ucs2.h
new file mode 100644
index 00000000000..c989324172d
--- /dev/null
+++ b/strings/ctype-ucs2.h
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2018 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-1301 USA
+*/
+
+#ifndef _CTYPE_UCS2_H
+#define _CTYPE_UCS2_H
+
+
+static inline int
+my_mb_wc_ucs2_quick(my_wc_t * pwc, const uchar *s, const uchar *e)
+{
+ if (s+2 > e) /* Need 2 characters */
+ return MY_CS_TOOSMALL2;
+ *pwc= ((uchar)s[0]) * 256 + ((uchar)s[1]);
+ return 2;
+}
+
+
+#endif /* _CTYPE_UCS2_H */
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index f470bbd7844..356c1fc092c 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -67239,6 +67239,7 @@ static MY_COLLATION_HANDLER my_collation_ujis_japanese_ci_handler =
NULL, /* init */
my_strnncoll_ujis_japanese_ci,
my_strnncollsp_ujis_japanese_ci,
+ my_strnncollsp_nchars_ujis_japanese_ci,
my_strnxfrm_mb, /* strnxfrm */
my_strnxfrmlen_simple,
my_like_range_mb, /* like_range */
@@ -67255,6 +67256,7 @@ static MY_COLLATION_HANDLER my_collation_ujis_bin_handler =
NULL, /* init */
my_strnncoll_ujis_bin,
my_strnncollsp_ujis_bin,
+ my_strnncollsp_nchars_ujis_bin,
my_strnxfrm_mb,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -67271,6 +67273,7 @@ static MY_COLLATION_HANDLER my_collation_ujis_japanese_nopad_ci_handler =
NULL, /* init */
my_strnncoll_ujis_japanese_ci,
my_strnncollsp_ujis_japanese_nopad_ci,
+ my_strnncollsp_nchars_ujis_japanese_nopad_ci,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
@@ -67287,6 +67290,7 @@ static MY_COLLATION_HANDLER my_collation_ujis_nopad_bin_handler =
NULL, /* init */
my_strnncoll_ujis_bin,
my_strnncollsp_ujis_nopad_bin,
+ my_strnncollsp_nchars_ujis_nopad_bin,
my_strnxfrm_mb_nopad,
my_strnxfrmlen_simple,
my_like_range_mb,
diff --git a/strings/ctype-unidata.h b/strings/ctype-unidata.h
new file mode 100644
index 00000000000..6712f5e1d79
--- /dev/null
+++ b/strings/ctype-unidata.h
@@ -0,0 +1,31 @@
+#ifndef CTYPE_UNIDATA_H_INCLUDED
+#define CTYPE_UNIDATA_H_INCLUDED
+/*
+ Copyright (c) 2018 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-1301 USA
+*/
+
+#define MY_UNICASE_INFO_DEFAULT_MAXCHAR 0xFFFF
+extern MY_UNICASE_CHARACTER my_unicase_default_page00[256];
+extern MY_UNICASE_CHARACTER *my_unicase_default_pages[256];
+
+size_t my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights);
+size_t my_strxfrm_pad_unicode(uchar *str, uchar *strend);
+
+
+#define PUT_WC_BE2_HAVE_1BYTE(dst, de, wc) \
+ do { *dst++= (uchar) (wc >> 8); if (dst < de) *dst++= (uchar) (wc & 0xFF); } while(0)
+
+#endif /* CTYPE_UNIDATA_H_INCLUDED */
diff --git a/strings/ctype-utf16.h b/strings/ctype-utf16.h
new file mode 100644
index 00000000000..d4cf4664f97
--- /dev/null
+++ b/strings/ctype-utf16.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (c) 2018 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-1301 USA
+*/
+
+#ifndef _CTYPE_UTF16_H
+#define _CTYPE_UTF16_H
+
+/*
+ D800..DB7F - Non-provate surrogate high (896 pages)
+ DB80..DBFF - Private surrogate high (128 pages)
+ DC00..DFFF - Surrogate low (1024 codes in a page)
+*/
+#define MY_UTF16_SURROGATE_HIGH_FIRST 0xD800
+#define MY_UTF16_SURROGATE_HIGH_LAST 0xDBFF
+#define MY_UTF16_SURROGATE_LOW_FIRST 0xDC00
+#define MY_UTF16_SURROGATE_LOW_LAST 0xDFFF
+
+#define MY_UTF16_HIGH_HEAD(x) ((((uchar) (x)) & 0xFC) == 0xD8)
+#define MY_UTF16_LOW_HEAD(x) ((((uchar) (x)) & 0xFC) == 0xDC)
+/* Test if a byte is a leading byte of a high or low surrogate head: */
+#define MY_UTF16_SURROGATE_HEAD(x) ((((uchar) (x)) & 0xF8) == 0xD8)
+/* Test if a Unicode code point is a high or low surrogate head */
+#define MY_UTF16_SURROGATE(x) (((x) & 0xF800) == 0xD800)
+
+#define MY_UTF16_WC2(a, b) ((a << 8) + b)
+
+/*
+ a= 110110?? (<< 18)
+ b= ???????? (<< 10)
+ c= 110111?? (<< 8)
+ d= ???????? (<< 0)
+*/
+#define MY_UTF16_WC4(a, b, c, d) (((a & 3) << 18) + (b << 10) + \
+ ((c & 3) << 8) + d + 0x10000)
+
+static inline int
+my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
+{
+ if (s + 2 > e)
+ return MY_CS_TOOSMALL2;
+
+ /*
+ High bytes: 0xD[89AB] = B'110110??'
+ Low bytes: 0xD[CDEF] = B'110111??'
+ Surrogate mask: 0xFC = B'11111100'
+ */
+
+ if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */
+ {
+ if (s + 4 > e)
+ return MY_CS_TOOSMALL4;
+
+ if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */
+ return MY_CS_ILSEQ;
+
+ *pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]);
+ return 4;
+ }
+
+ if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */
+ return MY_CS_ILSEQ;
+
+ *pwc= MY_UTF16_WC2(s[0], s[1]);
+ return 2;
+}
+
+#endif /* _CTYPE_UTF16_H */
diff --git a/strings/ctype-utf32.h b/strings/ctype-utf32.h
new file mode 100644
index 00000000000..e295dc6d081
--- /dev/null
+++ b/strings/ctype-utf32.h
@@ -0,0 +1,33 @@
+/*
+ Copyright (c) 2018 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-1301 USA
+*/
+
+#ifndef _CTYPE_UTF32_H
+#define _CTYPE_UTF32_H
+
+#define MY_UTF32_WC4(b0,b1,b2,b3) ((((my_wc_t)b0) << 24) + (b1 << 16) + \
+ (b2 << 8) + (b3))
+
+static inline int
+my_mb_wc_utf32_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
+{
+ if (s + 4 > e)
+ return MY_CS_TOOSMALL4;
+ *pwc= MY_UTF32_WC4(s[0], s[1], s[2], s[3]);
+ return *pwc > 0x10FFFF ? MY_CS_ILSEQ : 4;
+}
+
+#endif /* _CTYPE_UTF32_H */
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 3ef918f50f6..69ebb6b523e 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -26,78 +26,10 @@
#define EILSEQ ENOENT
#endif
-/* Detect special bytes and sequences */
-#define IS_CONTINUATION_BYTE(c) (((uchar) (c) ^ 0x80) < 0x40)
-/*
- Check MB2 character assuming that b0 is alredy known to be >= 0xC2.
- Use this macro if the caller already checked b0 for:
- - an MB1 character
- - an unused gap between MB1 and MB2HEAD
-*/
-#define IS_UTF8MB2_STEP2(b0,b1) (((uchar) (b0) < 0xE0) && \
- IS_CONTINUATION_BYTE((uchar) b1))
+#include "ctype-utf8.h"
+#include "ctype-unidata.h"
-/*
- Check MB3 character assuming that b0 is already known to be
- in the valid MB3HEAD range [0xE0..0xEF].
-*/
-#define IS_UTF8MB3_STEP2(b0,b1,b2) (IS_CONTINUATION_BYTE(b1) && \
- IS_CONTINUATION_BYTE(b2) && \
- ((uchar) b0 >= 0xe1 || (uchar) b1 >= 0xa0))
-
-/*
- Check MB3 character assuming that b0 is already known to be >= 0xE0,
- but is not checked for the high end 0xF0 yet.
- Use this macro if the caller already checked b0 for:
- - an MB1 character
- - an unused gap between MB1 and MB2HEAD
- - an MB2HEAD
-*/
-#define IS_UTF8MB3_STEP3(b0,b1,b2) (((uchar) (b0) < 0xF0) && \
- IS_UTF8MB3_STEP2(b0,b1,b2))
-
-/*
- UTF-8 quick four-byte mask:
- 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
- Encoding allows to encode U+00010000..U+001FFFFF
-
- The maximum character defined in the Unicode standard is U+0010FFFF.
- Higher characters U+00110000..U+001FFFFF are not used.
-
- 11110000.10010000.10xxxxxx.10xxxxxx == F0.90.80.80 == U+00010000 (min)
- 11110100.10001111.10111111.10111111 == F4.8F.BF.BF == U+0010FFFF (max)
-
- Valid codes:
- [F0][90..BF][80..BF][80..BF]
- [F1][80..BF][80..BF][80..BF]
- [F2][80..BF][80..BF][80..BF]
- [F3][80..BF][80..BF][80..BF]
- [F4][80..8F][80..BF][80..BF]
-*/
-
-/*
- Check MB4 character assuming that b0 is already
- known to be in the range [0xF0..0xF4]
-*/
-#define IS_UTF8MB4_STEP2(b0,b1,b2,b3) (IS_CONTINUATION_BYTE(b1) && \
- IS_CONTINUATION_BYTE(b2) && \
- IS_CONTINUATION_BYTE(b3) && \
- (b0 >= 0xf1 || b1 >= 0x90) && \
- (b0 <= 0xf3 || b1 <= 0x8F))
-#define IS_UTF8MB4_STEP3(b0,b1,b2,b3) (((uchar) (b0) < 0xF5) && \
- IS_UTF8MB4_STEP2(b0,b1,b2,b3))
-
-/* Convert individual bytes to Unicode code points */
-#define UTF8MB2_CODE(b0,b1) (((my_wc_t) ((uchar) b0 & 0x1f) << 6) |\
- ((my_wc_t) ((uchar) b1 ^ 0x80)))
-#define UTF8MB3_CODE(b0,b1,b2) (((my_wc_t) ((uchar) b0 & 0x0f) << 12) |\
- ((my_wc_t) ((uchar) b1 ^ 0x80) << 6) |\
- ((my_wc_t) ((uchar) b2 ^ 0x80)))
-#define UTF8MB4_CODE(b0,b1,b2,b3) (((my_wc_t) ((uchar) b0 & 0x07) << 18) |\
- ((my_wc_t) ((uchar) b1 ^ 0x80) << 12) |\
- ((my_wc_t) ((uchar) b2 ^ 0x80) << 6) |\
- (my_wc_t) ((uchar) b3 ^ 0x80))
/* Definitions for strcoll.inl */
#define IS_MB1_CHAR(x) ((uchar) (x) < 0x80)
@@ -180,7 +112,7 @@ int my_valid_mbcharlen_utf8mb3(const uchar *s, const uchar *e)
#include "my_uctype.h"
-static MY_UNICASE_CHARACTER plane00[]={
+MY_UNICASE_CHARACTER my_unicase_default_page00[]={
{0x0000,0x0000,0x0000}, {0x0001,0x0001,0x0001},
{0x0002,0x0002,0x0002}, {0x0003,0x0003,0x0003},
{0x0004,0x0004,0x0004}, {0x0005,0x0005,0x0005},
@@ -313,7 +245,7 @@ static MY_UNICASE_CHARACTER plane00[]={
/*
- Almost similar to plane00, but maps sorting order
+ Almost similar to my_unicase_default_page00, but maps sorting order
for U+00DF to 0x00DF instead of 0x0053.
*/
static MY_UNICASE_CHARACTER plane00_mysql500[]={
@@ -1759,9 +1691,10 @@ static MY_UNICASE_CHARACTER planeFF[]={
};
-static MY_UNICASE_CHARACTER *my_unicase_pages_default[256]=
+MY_UNICASE_CHARACTER *my_unicase_default_pages[256]=
{
- plane00, plane01, plane02, plane03, plane04, plane05, NULL, NULL,
+ my_unicase_default_page00,
+ plane01, plane02, plane03, plane04, plane05, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, plane1E, plane1F,
@@ -1798,8 +1731,8 @@ static MY_UNICASE_CHARACTER *my_unicase_pages_default[256]=
MY_UNICASE_INFO my_unicase_default=
{
- 0xFFFF,
- my_unicase_pages_default
+ MY_UNICASE_INFO_DEFAULT_MAXCHAR,
+ my_unicase_default_pages
};
@@ -4646,7 +4579,7 @@ my_wildcmp_unicode(CHARSET_INFO *cs,
@return Result length
*/
-static size_t
+size_t
my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights)
{
uchar *str0;
@@ -4675,7 +4608,7 @@ my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights)
@return Result length
*/
-static size_t
+size_t
my_strxfrm_pad_unicode(uchar *str, uchar *strend)
{
uchar *str0= str;
@@ -4690,95 +4623,6 @@ my_strxfrm_pad_unicode(uchar *str, uchar *strend)
}
-size_t my_strnxfrm_unicode_internal(CHARSET_INFO *cs,
- uchar *dst, uchar *de, uint *nweights,
- const uchar *src, const uchar *se)
-{
- my_wc_t UNINIT_VAR(wc);
- int res;
- uchar *dst0= dst;
- MY_UNICASE_INFO *uni_plane= (cs->state & MY_CS_BINSORT) ?
- NULL : cs->caseinfo;
-
- DBUG_ASSERT(src || !se);
-
- for (; dst < de && *nweights; (*nweights)--)
- {
- if ((res= cs->cset->mb_wc(cs, &wc, src, se)) <= 0)
- break;
- src+= res;
-
- if (uni_plane)
- my_tosort_unicode(uni_plane, &wc, cs->state);
-
- *dst++= (uchar) (wc >> 8);
- if (dst < de)
- *dst++= (uchar) (wc & 0xFF);
- }
- return dst - dst0;
-}
-
-
-/*
- Store sorting weights using 2 bytes per character.
-
- This function is shared between
- - utf8mb3_general_ci, utf8_bin, ucs2_general_ci, ucs2_bin
- which support BMP only (U+0000..U+FFFF).
- - utf8mb4_general_ci, utf16_general_ci, utf32_general_ci,
- which map all supplementary characters to weight 0xFFFD.
-*/
-size_t
-my_strnxfrm_unicode(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- uchar *dst0= dst;
- uchar *de= dst + dstlen;
- dst+= my_strnxfrm_unicode_internal(cs, dst, de, &nweights,
- src, src + srclen);
- DBUG_ASSERT(dst <= de); /* Safety */
-
- if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
- dst+= my_strxfrm_pad_nweights_unicode(dst, de, nweights);
-
- my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
-
- if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
- dst+= my_strxfrm_pad_unicode(dst, de);
- return dst - dst0;
-}
-
-
-size_t
-my_strnxfrm_unicode_nopad(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
-{
- uchar *dst0= dst;
- uchar *de= dst + dstlen;
- dst+= my_strnxfrm_unicode_internal(cs, dst, de, &nweights,
- src, src + srclen);
- DBUG_ASSERT(dst <= de); /* Safety */
-
- if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
- {
- size_t len= de - dst;
- set_if_smaller(len, nweights * 2);
- memset(dst, 0x00, len);
- dst+= len;
- }
-
- my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
-
- if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
- {
- memset(dst, 0x00, de - dst);
- dst= de;
- }
- return dst - dst0;
-}
-
/*
For BMP-only collations that use 2 bytes per weight.
*/
@@ -4977,42 +4821,7 @@ static const uchar to_upper_utf8[] = {
static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
- uchar c;
-
- if (s >= e)
- return MY_CS_TOOSMALL;
-
- c= s[0];
- if (c < 0x80)
- {
- *pwc = c;
- return 1;
- }
- else if (c < 0xc2)
- return MY_CS_ILSEQ;
- else if (c < 0xe0)
- {
- if (s+2 > e) /* We need 2 characters */
- return MY_CS_TOOSMALL2;
-
- if (!(IS_CONTINUATION_BYTE(s[1])))
- return MY_CS_ILSEQ;
-
- *pwc= UTF8MB2_CODE(c, s[1]);
- return 2;
- }
- else if (c < 0xf0)
- {
- if (s+3 > e) /* We need 3 characters */
- return MY_CS_TOOSMALL3;
-
- if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
- return MY_CS_ILSEQ;
-
- *pwc= UTF8MB3_CODE(c, s[1], s[2]);
- return 3;
- }
- return MY_CS_ILSEQ;
+ return my_mb_wc_utf8mb3_quick(pwc, s, e);
}
@@ -5306,7 +5115,7 @@ int my_strcasecmp_utf8(CHARSET_INFO *cs, const char *s, const char *t)
It represents a single byte character.
Convert it into weight according to collation.
*/
- s_wc= plane00[(uchar) s[0]].tolower;
+ s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
@@ -5348,7 +5157,7 @@ int my_strcasecmp_utf8(CHARSET_INFO *cs, const char *s, const char *t)
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
- t_wc= plane00[(uchar) t[0]].tolower;
+ t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
@@ -5411,14 +5220,14 @@ int my_charlen_utf8(CHARSET_INFO *cs __attribute__((unused)),
static inline int my_weight_mb1_utf8_general_ci(uchar b)
{
- return (int) plane00[b & 0xFF].sort;
+ return (int) my_unicase_default_page00[b & 0xFF].sort;
}
static inline int my_weight_mb2_utf8_general_ci(uchar b0, uchar b1)
{
my_wc_t wc= UTF8MB2_CODE(b0, b1);
- MY_UNICASE_CHARACTER *page= my_unicase_pages_default[wc >> 8];
+ MY_UNICASE_CHARACTER *page= my_unicase_default_pages[wc >> 8];
return (int) (page ? page[wc & 0xFF].sort : wc);
}
@@ -5426,16 +5235,23 @@ static inline int my_weight_mb2_utf8_general_ci(uchar b0, uchar b1)
static inline int my_weight_mb3_utf8_general_ci(uchar b0, uchar b1, uchar b2)
{
my_wc_t wc= UTF8MB3_CODE(b0, b1, b2);
- MY_UNICASE_CHARACTER *page= my_unicase_pages_default[wc >> 8];
+ MY_UNICASE_CHARACTER *page= my_unicase_default_pages[wc >> 8];
return (int) (page ? page[wc & 0xFF].sort : wc);
}
-#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_general_ci
-#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
-#define WEIGHT_MB1(x) my_weight_mb1_utf8_general_ci(x)
-#define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_ci(x,y)
-#define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_ci(x,y,z)
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_general_ci
+#define DEFINE_STRNXFRM_UNICODE
+#define DEFINE_STRNXFRM_UNICODE_NOPAD
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_utf8mb3_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 1
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 my_unicase_default_page00
+#define UNICASE_PAGES my_unicase_default_pages
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) my_weight_mb1_utf8_general_ci(x)
+#define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_ci(x,y)
+#define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_ci(x,y,z)
#include "strcoll.inl"
@@ -5471,19 +5287,28 @@ my_weight_mb3_utf8_general_mysql500_ci(uchar b0, uchar b1, uchar b2)
}
-#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_general_mysql500_ci
-#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
-#define WEIGHT_MB1(x) my_weight_mb1_utf8_general_mysql500_ci(x)
-#define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_mysql500_ci(x,y)
-#define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_mysql500_ci(x,y,z)
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_general_mysql500_ci
+#define DEFINE_STRNXFRM_UNICODE
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_utf8mb3_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 1
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 plane00_mysql500
+#define UNICASE_PAGES my_unicase_pages_mysql500
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) my_weight_mb1_utf8_general_mysql500_ci(x)
+#define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_mysql500_ci(x,y)
+#define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_mysql500_ci(x,y,z)
#include "strcoll.inl"
-#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_bin
-#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
-#define WEIGHT_MB1(x) ((int) (uchar) (x))
-#define WEIGHT_MB2(x,y) ((int) UTF8MB2_CODE(x,y))
-#define WEIGHT_MB3(x,y,z) ((int) UTF8MB3_CODE(x,y,z))
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_bin
+#define DEFINE_STRNXFRM_UNICODE_BIN2
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_utf8mb3_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 1
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) ((int) (uchar) (x))
+#define WEIGHT_MB2(x,y) ((int) UTF8MB2_CODE(x,y))
+#define WEIGHT_MB3(x,y,z) ((int) UTF8MB3_CODE(x,y,z))
#include "strcoll.inl"
@@ -5532,7 +5357,8 @@ static MY_COLLATION_HANDLER my_collation_utf8_general_ci_handler =
NULL, /* init */
my_strnncoll_utf8_general_ci,
my_strnncollsp_utf8_general_ci,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_utf8_general_ci,
+ my_strnxfrm_utf8_general_ci,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_utf8,
@@ -5548,7 +5374,8 @@ static MY_COLLATION_HANDLER my_collation_utf8_general_mysql500_ci_handler =
NULL, /* init */
my_strnncoll_utf8_general_mysql500_ci,
my_strnncollsp_utf8_general_mysql500_ci,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_utf8_general_mysql500_ci,
+ my_strnxfrm_utf8_general_mysql500_ci,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_utf8,
@@ -5564,7 +5391,8 @@ static MY_COLLATION_HANDLER my_collation_utf8_bin_handler =
NULL, /* init */
my_strnncoll_utf8_bin,
my_strnncollsp_utf8_bin,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_utf8_bin,
+ my_strnxfrm_utf8_bin,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_mb_bin,
@@ -5580,7 +5408,8 @@ static MY_COLLATION_HANDLER my_collation_utf8_general_nopad_ci_handler =
NULL, /* init */
my_strnncoll_utf8_general_ci,
my_strnncollsp_utf8_general_nopad_ci,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_utf8_general_nopad_ci,
+ my_strnxfrm_nopad_utf8_general_ci,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_utf8,
@@ -5596,7 +5425,8 @@ static MY_COLLATION_HANDLER my_collation_utf8_nopad_bin_handler =
NULL, /* init */
my_strnncoll_utf8_bin,
my_strnncollsp_utf8_nopad_bin,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_utf8_nopad_bin,
+ my_strnxfrm_nopad_utf8_bin,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_mb_bin,
@@ -5925,7 +5755,8 @@ static MY_COLLATION_HANDLER my_collation_cs_handler =
NULL, /* init */
my_strnncoll_utf8_cs,
my_strnncollsp_utf8_cs,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_generic,
+ my_strnxfrm_utf8_general_ci,
my_strnxfrmlen_unicode,
my_like_range_simple,
my_wildcmp_mb,
@@ -7210,13 +7041,31 @@ my_charlen_filename(CHARSET_INFO *cs, const uchar *str, const uchar *end)
#undef DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN
/* my_well_formed_char_length_filename */
+#define MY_FUNCTION_NAME(x) my_ ## x ## _filename
+#define DEFINE_STRNNCOLL 0
+#define DEFINE_STRNXFRM_UNICODE
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_filename(cs, pwc, s, e)
+#define OPTIMIZE_ASCII 0
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 my_unicase_default_page00
+#define UNICASE_PAGES my_unicase_default_pages
+
+/*
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) my_weight_mb1_utf8_general_ci(x)
+#define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_ci(x,y)
+#define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_ci(x,y,z)
+*/
+#include "strcoll.inl"
+
static MY_COLLATION_HANDLER my_collation_filename_handler =
{
NULL, /* init */
my_strnncoll_simple,
my_strnncollsp_simple,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_generic,
+ my_strnxfrm_filename,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_utf8,
@@ -7373,52 +7222,7 @@ static int
my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
- uchar c;
-
- if (s >= e)
- return MY_CS_TOOSMALL;
-
- c= s[0];
- if (c < 0x80)
- {
- *pwc= c;
- return 1;
- }
- else if (c < 0xc2)
- return MY_CS_ILSEQ;
- else if (c < 0xe0)
- {
- if (s + 2 > e) /* We need 2 characters */
- return MY_CS_TOOSMALL2;
-
- if (!(IS_CONTINUATION_BYTE(s[1])))
- return MY_CS_ILSEQ;
-
- *pwc= UTF8MB2_CODE(c, s[1]);
- return 2;
- }
- else if (c < 0xf0)
- {
- if (s + 3 > e) /* We need 3 characters */
- return MY_CS_TOOSMALL3;
-
- if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
- return MY_CS_ILSEQ;
-
- *pwc= UTF8MB3_CODE(c, s[1], s[2]);
- return 3;
- }
- else if (c < 0xf5)
- {
- if (s + 4 > e) /* We need 4 characters */
- return MY_CS_TOOSMALL4;
-
- if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
- return MY_CS_ILSEQ;
- *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
- return 4;
- }
- return MY_CS_ILSEQ;
+ return my_mb_wc_utf8mb4_quick(pwc, s, e);
}
@@ -7748,7 +7552,7 @@ my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
It represents a single byte character.
Convert it into weight according to collation.
*/
- s_wc= plane00[(uchar) s[0]].tolower;
+ s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
@@ -7772,7 +7576,7 @@ my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
- t_wc= plane00[(uchar) t[0]].tolower;
+ t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
@@ -7843,6 +7647,13 @@ my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8mb4_general_ci
+#define DEFINE_STRNXFRM_UNICODE
+#define DEFINE_STRNXFRM_UNICODE_NOPAD
+#define MY_MB_WC(cs, pwc, s, e) my_mb_wc_utf8mb4_quick(pwc, s, e)
+#define OPTIMIZE_ASCII 1
+#define UNICASE_MAXCHAR MY_UNICASE_INFO_DEFAULT_MAXCHAR
+#define UNICASE_PAGE0 my_unicase_default_page00
+#define UNICASE_PAGES my_unicase_default_pages
#define IS_MB4_CHAR(b0,b1,b2,b3) IS_UTF8MB4_STEP3(b0,b1,b2,b3)
#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
#define WEIGHT_MB1(b0) my_weight_mb1_utf8_general_ci(b0)
@@ -7893,7 +7704,8 @@ static MY_COLLATION_HANDLER my_collation_utf8mb4_general_ci_handler=
NULL, /* init */
my_strnncoll_utf8mb4_general_ci,
my_strnncollsp_utf8mb4_general_ci,
- my_strnxfrm_unicode,
+ my_strnncollsp_nchars_utf8mb4_general_ci,
+ my_strnxfrm_utf8mb4_general_ci,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_utf8mb4,
@@ -7909,6 +7721,7 @@ static MY_COLLATION_HANDLER my_collation_utf8mb4_bin_handler =
NULL, /* init */
my_strnncoll_utf8mb4_bin,
my_strnncollsp_utf8mb4_bin,
+ my_strnncollsp_nchars_utf8mb4_bin,
my_strnxfrm_unicode_full_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_mb,
@@ -7925,7 +7738,8 @@ static MY_COLLATION_HANDLER my_collation_utf8mb4_general_nopad_ci_handler=
NULL, /* init */
my_strnncoll_utf8mb4_general_ci,
my_strnncollsp_utf8mb4_general_nopad_ci,
- my_strnxfrm_unicode_nopad,
+ my_strnncollsp_nchars_utf8mb4_general_nopad_ci,
+ my_strnxfrm_nopad_utf8mb4_general_ci,
my_strnxfrmlen_unicode,
my_like_range_mb,
my_wildcmp_utf8mb4,
@@ -7941,6 +7755,7 @@ static MY_COLLATION_HANDLER my_collation_utf8mb4_nopad_bin_handler =
NULL, /* init */
my_strnncoll_utf8mb4_bin,
my_strnncollsp_utf8mb4_nopad_bin,
+ my_strnncollsp_nchars_utf8mb4_nopad_bin,
my_strnxfrm_unicode_full_nopad_bin,
my_strnxfrmlen_unicode_full_bin,
my_like_range_mb,
diff --git a/strings/ctype-utf8.h b/strings/ctype-utf8.h
new file mode 100644
index 00000000000..9a44c1658f2
--- /dev/null
+++ b/strings/ctype-utf8.h
@@ -0,0 +1,190 @@
+/*
+ Copyright (c) 2018 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-1301 USA
+*/
+
+#ifndef _CTYPE_UTF8_H
+#define _CTYPE_UTF8_H
+
+/* Detect special bytes and sequences */
+#define IS_CONTINUATION_BYTE(c) (((uchar) (c) ^ 0x80) < 0x40)
+
+/*
+ Check MB2 character assuming that b0 is alredy known to be >= 0xC2.
+ Use this macro if the caller already checked b0 for:
+ - an MB1 character
+ - an unused gap between MB1 and MB2HEAD
+*/
+#define IS_UTF8MB2_STEP2(b0,b1) (((uchar) (b0) < 0xE0) && \
+ IS_CONTINUATION_BYTE((uchar) b1))
+
+/*
+ Check MB3 character assuming that b0 is already known to be
+ in the valid MB3HEAD range [0xE0..0xEF].
+*/
+#define IS_UTF8MB3_STEP2(b0,b1,b2) (IS_CONTINUATION_BYTE(b1) && \
+ IS_CONTINUATION_BYTE(b2) && \
+ ((uchar) b0 >= 0xe1 || (uchar) b1 >= 0xa0))
+
+/*
+ Check MB3 character assuming that b0 is already known to be >= 0xE0,
+ but is not checked for the high end 0xF0 yet.
+ Use this macro if the caller already checked b0 for:
+ - an MB1 character
+ - an unused gap between MB1 and MB2HEAD
+ - an MB2HEAD
+*/
+#define IS_UTF8MB3_STEP3(b0,b1,b2) (((uchar) (b0) < 0xF0) && \
+ IS_UTF8MB3_STEP2(b0,b1,b2))
+
+/*
+ UTF-8 quick four-byte mask:
+ 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ Encoding allows to encode U+00010000..U+001FFFFF
+
+ The maximum character defined in the Unicode standard is U+0010FFFF.
+ Higher characters U+00110000..U+001FFFFF are not used.
+
+ 11110000.10010000.10xxxxxx.10xxxxxx == F0.90.80.80 == U+00010000 (min)
+ 11110100.10001111.10111111.10111111 == F4.8F.BF.BF == U+0010FFFF (max)
+
+ Valid codes:
+ [F0][90..BF][80..BF][80..BF]
+ [F1][80..BF][80..BF][80..BF]
+ [F2][80..BF][80..BF][80..BF]
+ [F3][80..BF][80..BF][80..BF]
+ [F4][80..8F][80..BF][80..BF]
+*/
+
+/*
+ Check MB4 character assuming that b0 is already
+ known to be in the range [0xF0..0xF4]
+*/
+#define IS_UTF8MB4_STEP2(b0,b1,b2,b3) (IS_CONTINUATION_BYTE(b1) && \
+ IS_CONTINUATION_BYTE(b2) && \
+ IS_CONTINUATION_BYTE(b3) && \
+ (b0 >= 0xf1 || b1 >= 0x90) && \
+ (b0 <= 0xf3 || b1 <= 0x8F))
+#define IS_UTF8MB4_STEP3(b0,b1,b2,b3) (((uchar) (b0) < 0xF5) && \
+ IS_UTF8MB4_STEP2(b0,b1,b2,b3))
+
+/* Convert individual bytes to Unicode code points */
+#define UTF8MB2_CODE(b0,b1) (((my_wc_t) ((uchar) b0 & 0x1f) << 6) |\
+ ((my_wc_t) ((uchar) b1 ^ 0x80)))
+#define UTF8MB3_CODE(b0,b1,b2) (((my_wc_t) ((uchar) b0 & 0x0f) << 12) |\
+ ((my_wc_t) ((uchar) b1 ^ 0x80) << 6) |\
+ ((my_wc_t) ((uchar) b2 ^ 0x80)))
+#define UTF8MB4_CODE(b0,b1,b2,b3) (((my_wc_t) ((uchar) b0 & 0x07) << 18) |\
+ ((my_wc_t) ((uchar) b1 ^ 0x80) << 12) |\
+ ((my_wc_t) ((uchar) b2 ^ 0x80) << 6) |\
+ (my_wc_t) ((uchar) b3 ^ 0x80))
+
+static inline int
+my_mb_wc_utf8mb3_quick(my_wc_t * pwc, const uchar *s, const uchar *e)
+{
+ uchar c;
+
+ if (s >= e)
+ return MY_CS_TOOSMALL;
+
+ c= s[0];
+ if (c < 0x80)
+ {
+ *pwc = c;
+ return 1;
+ }
+ else if (c < 0xc2)
+ return MY_CS_ILSEQ;
+ else if (c < 0xe0)
+ {
+ if (s+2 > e) /* We need 2 characters */
+ return MY_CS_TOOSMALL2;
+
+ if (!(IS_CONTINUATION_BYTE(s[1])))
+ return MY_CS_ILSEQ;
+
+ *pwc= UTF8MB2_CODE(c, s[1]);
+ return 2;
+ }
+ else if (c < 0xf0)
+ {
+ if (s+3 > e) /* We need 3 characters */
+ return MY_CS_TOOSMALL3;
+
+ if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
+ return MY_CS_ILSEQ;
+
+ *pwc= UTF8MB3_CODE(c, s[1], s[2]);
+ return 3;
+ }
+ return MY_CS_ILSEQ;
+}
+
+
+#ifdef HAVE_CHARSET_utf8mb4
+static inline int
+my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
+{
+ uchar c;
+
+ if (s >= e)
+ return MY_CS_TOOSMALL;
+
+ c= s[0];
+ if (c < 0x80)
+ {
+ *pwc= c;
+ return 1;
+ }
+ else if (c < 0xc2)
+ return MY_CS_ILSEQ;
+ else if (c < 0xe0)
+ {
+ if (s + 2 > e) /* We need 2 characters */
+ return MY_CS_TOOSMALL2;
+
+ if (!(IS_CONTINUATION_BYTE(s[1])))
+ return MY_CS_ILSEQ;
+
+ *pwc= UTF8MB2_CODE(c, s[1]);
+ return 2;
+ }
+ else if (c < 0xf0)
+ {
+ if (s + 3 > e) /* We need 3 characters */
+ return MY_CS_TOOSMALL3;
+
+ if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
+ return MY_CS_ILSEQ;
+
+ *pwc= UTF8MB3_CODE(c, s[1], s[2]);
+ return 3;
+ }
+ else if (c < 0xf5)
+ {
+ if (s + 4 > e) /* We need 4 characters */
+ return MY_CS_TOOSMALL4;
+
+ if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
+ return MY_CS_ILSEQ;
+ *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
+ return 4;
+ }
+ return MY_CS_ILSEQ;
+}
+#endif /* HAVE_CHARSET_utf8mb4*/
+
+
+#endif /* _CTYPE_UTF8_H */
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index f33a83294d6..15fa6299e4e 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -674,6 +674,7 @@ static MY_COLLATION_HANDLER my_collation_czech_ci_handler =
NULL, /* init */
my_strnncoll_win1250ch,
my_strnncollsp_win1250ch,
+ my_strnncollsp_nchars_generic_8bit,
my_strnxfrm_win1250ch,
my_strnxfrmlen_simple,
my_like_range_win1250ch,
diff --git a/strings/ctype.c b/strings/ctype.c
index 32c41e6e9e7..0cf1131ab57 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -1210,3 +1210,32 @@ outp:
copy_status->m_source_end_pos= from;
return to - to_start;
}
+
+
+int my_strnncollsp_nchars_generic(CHARSET_INFO *cs,
+ const uchar *str1, size_t len1,
+ const uchar *str2, size_t len2,
+ size_t nchars)
+{
+ int error;
+ len1= my_well_formed_length(cs, (const char *) str1,
+ (const char *) str1 + len1,
+ nchars, &error);
+ len2= my_well_formed_length(cs, (const char *) str2,
+ (const char *) str2 + len2,
+ nchars, &error);
+ DBUG_ASSERT((cs->state & MY_CS_NOPAD) == 0);
+ return cs->coll->strnncollsp(cs, str1, len1, str2, len2);
+}
+
+
+int my_strnncollsp_nchars_generic_8bit(CHARSET_INFO *cs,
+ const uchar *str1, size_t len1,
+ const uchar *str2, size_t len2,
+ size_t nchars)
+{
+ set_if_smaller(len1, nchars);
+ set_if_smaller(len2, nchars);
+ DBUG_ASSERT((cs->state & MY_CS_NOPAD) == 0);
+ return cs->coll->strnncollsp(cs, str1, len1, str2, len2);
+}
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 6717d0079f1..1b9adfff117 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -933,6 +933,7 @@ int json_read_value(json_engine_t *j)
{
int t_next, c_len, res;
+ j->value_type= JSON_VALUE_UNINITALIZED;
if (j->state == JST_KEY)
{
while (json_read_keyname_chr(j) == 0) {}
@@ -1751,3 +1752,264 @@ int json_get_path_next(json_engine_t *je, json_path_t *p)
return 1;
}
+
+
+static enum json_types smart_read_value(json_engine_t *je,
+ const char **value, int *value_len)
+{
+ if (json_read_value(je))
+ goto err_return;
+
+ *value= (char *) je->value;
+
+ if (json_value_scalar(je))
+ *value_len= je->value_len;
+ else
+ {
+ if (json_skip_level(je))
+ goto err_return;
+
+ *value_len= (int) ((char *) je->s.c_str - *value);
+ }
+
+ compile_time_assert((int) JSON_VALUE_OBJECT == (int) JSV_OBJECT);
+ compile_time_assert((int) JSON_VALUE_ARRAY == (int) JSV_ARRAY);
+ compile_time_assert((int) JSON_VALUE_STRING == (int) JSV_STRING);
+ compile_time_assert((int) JSON_VALUE_NUMBER == (int) JSV_NUMBER);
+ compile_time_assert((int) JSON_VALUE_TRUE == (int) JSV_TRUE);
+ compile_time_assert((int) JSON_VALUE_FALSE == (int) JSV_FALSE);
+ compile_time_assert((int) JSON_VALUE_NULL == (int) JSV_NULL);
+
+ return (enum json_types) je->value_type;
+
+err_return:
+ return JSV_BAD_JSON;
+}
+
+
+enum json_types json_type(const char *js, const char *js_end,
+ const char **value, int *value_len)
+{
+ json_engine_t je;
+
+ json_scan_start(&je, &my_charset_utf8mb4_bin,(const uchar *) js,
+ (const uchar *) js_end);
+
+ return smart_read_value(&je, value, value_len);
+}
+
+
+enum json_types json_get_array_item(const char *js, const char *js_end,
+ int n_item,
+ const char **value, int *value_len)
+{
+ json_engine_t je;
+ int c_item= 0;
+
+ json_scan_start(&je, &my_charset_utf8mb4_bin,(const uchar *) js,
+ (const uchar *) js_end);
+
+ if (json_read_value(&je) ||
+ je.value_type != JSON_VALUE_ARRAY)
+ goto err_return;
+
+ while (!json_scan_next(&je))
+ {
+ switch (je.state)
+ {
+ case JST_VALUE:
+ if (c_item == n_item)
+ return smart_read_value(&je, value, value_len);
+
+ if (json_skip_key(&je))
+ goto err_return;
+
+ c_item++;
+ break;
+
+ case JST_ARRAY_END:
+ *value= (const char *) (je.s.c_str - je.sav_c_len);
+ *value_len= c_item;
+ return JSV_NOTHING;
+ }
+ }
+
+err_return:
+ return JSV_BAD_JSON;
+}
+
+
+/** Simple json lookup for a value by the key.
+
+ Expects JSON object.
+ Only scans the 'first level' of the object, not
+ the nested structures.
+
+ @param js [in] json object to search in
+ @param js_end [in] end of json string
+ @param key [in] key to search for
+ @param key_end [in] - " -
+ @param value_start [out] pointer into js (value or closing })
+ @param value_len [out] length of the value found or number of keys
+
+ @retval the type of the key value
+ @retval JSV_BAD_JSON - syntax error found reading JSON.
+ or not JSON object.
+ @retval JSV_NOTHING - no such key found.
+*/
+enum json_types json_get_object_key(const char *js, const char *js_end,
+ const char *key,
+ const char **value, int *value_len)
+{
+ const char *key_end= key + strlen(key);
+ json_engine_t je;
+ json_string_t key_name;
+ int n_keys= 0;
+
+ json_string_set_cs(&key_name, &my_charset_utf8mb4_bin);
+
+ json_scan_start(&je, &my_charset_utf8mb4_bin,(const uchar *) js,
+ (const uchar *) js_end);
+
+ if (json_read_value(&je) ||
+ je.value_type != JSON_VALUE_OBJECT)
+ goto err_return;
+
+ while (!json_scan_next(&je))
+ {
+ switch (je.state)
+ {
+ case JST_KEY:
+ n_keys++;
+ json_string_set_str(&key_name, (const uchar *) key,
+ (const uchar *) key_end);
+ if (json_key_matches(&je, &key_name))
+ return smart_read_value(&je, value, value_len);
+
+ if (json_skip_key(&je))
+ goto err_return;
+
+ break;
+
+ case JST_OBJ_END:
+ *value= (const char *) (je.s.c_str - je.sav_c_len);
+ *value_len= n_keys;
+ return JSV_NOTHING;
+ }
+ }
+
+err_return:
+ return JSV_BAD_JSON;
+}
+
+
+enum json_types json_get_object_nkey(const char *js __attribute__((unused)),
+ const char *js_end __attribute__((unused)),
+ int nkey __attribute__((unused)),
+ const char **keyname __attribute__((unused)),
+ const char **keyname_end __attribute__((unused)),
+ const char **value __attribute__((unused)),
+ int *value_len __attribute__((unused)))
+{
+ return JSV_NOTHING;
+}
+
+
+/** Check if json is valid (well-formed)
+
+ @retval 0 - success, json is well-formed
+ @retval 1 - error, json is invalid
+*/
+int json_valid(const char *js, size_t js_len, CHARSET_INFO *cs)
+{
+ json_engine_t je;
+ json_scan_start(&je, cs, (const uchar *) js, (const uchar *) js + js_len);
+ while (json_scan_next(&je) == 0) /* no-op */ ;
+ return je.s.error == 0;
+}
+
+
+/*
+ Expects the JSON object as an js argument, and the key name.
+ Looks for this key in the object and returns
+ the location of all the text related to it.
+ The text includes the comma, separating this key.
+
+ comma_pos - the hint where the comma is. It is important
+ if you plan to replace the key rather than just cut.
+ 1 - comma is on the left
+ 2 - comma is on the right.
+ 0 - no comma at all (the object has just this single key)
+
+ if no such key found *key_start is set to NULL.
+*/
+int json_locate_key(const char *js, const char *js_end,
+ const char *kname,
+ const char **key_start, const char **key_end,
+ int *comma_pos)
+{
+ const char *kname_end= kname + strlen(kname);
+ json_engine_t je;
+ json_string_t key_name;
+ int t_next, c_len, match_result;
+
+ json_string_set_cs(&key_name, &my_charset_utf8mb4_bin);
+
+ json_scan_start(&je, &my_charset_utf8mb4_bin,(const uchar *) js,
+ (const uchar *) js_end);
+
+ if (json_read_value(&je) ||
+ je.value_type != JSON_VALUE_OBJECT)
+ goto err_return;
+
+ *key_start= (const char *) je.s.c_str;
+ *comma_pos= 0;
+
+ while (!json_scan_next(&je))
+ {
+ switch (je.state)
+ {
+ case JST_KEY:
+ json_string_set_str(&key_name, (const uchar *) kname,
+ (const uchar *) kname_end);
+ match_result= json_key_matches(&je, &key_name);
+ if (json_skip_key(&je))
+ goto err_return;
+ get_first_nonspace(&je.s, &t_next, &c_len);
+ je.s.c_str-= c_len;
+
+ if (match_result)
+ {
+ *key_end= (const char *) je.s.c_str;
+
+ if (*comma_pos == 1)
+ return 0;
+
+ DBUG_ASSERT(*comma_pos == 0);
+
+ if (t_next == C_COMMA)
+ {
+ *key_end+= c_len;
+ *comma_pos= 2;
+ }
+ else if (t_next == C_RCURB)
+ *comma_pos= 0;
+ else
+ goto err_return;
+ return 0;
+ }
+
+ *key_start= (const char *) je.s.c_str;
+ *comma_pos= 1;
+ break;
+
+ case JST_OBJ_END:
+ *key_start= NULL;
+ return 0;
+ }
+ }
+
+err_return:
+ return 1;
+
+}
diff --git a/strings/strcoll.inl b/strings/strcoll.inl
index eb5b3d5fe9b..392a5dac589 100644
--- a/strings/strcoll.inl
+++ b/strings/strcoll.inl
@@ -15,11 +15,18 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
*/
-
#ifndef MY_FUNCTION_NAME
#error MY_FUNCTION_NAME is not defined
#endif
+/*
+ Define strnncoll() and strnncollsp() by default,
+ unless "#define DEFINE_STRNNCOLL 0" is specified.
+*/
+#ifndef DEFINE_STRNNCOLL
+#define DEFINE_STRNNCOLL 1
+#endif
+
/*
The weight for automatically padded spaces when comparing strings with
@@ -54,6 +61,8 @@
#endif
+#if DEFINE_STRNNCOLL
+
/**
Scan a valid character, or a bad byte, or an auto-padded space
from a string and calculate the weight of the scanned sequence.
@@ -279,6 +288,58 @@ MY_FUNCTION_NAME(strnncollsp)(CHARSET_INFO *cs __attribute__((unused)),
#endif
+/**
+ Compare two strings according to the collation,
+ with trailing space padding or trimming, according to "nchars".
+
+ @param cs - the character set and collation
+ @param a - the left string
+ @param a_length - the length of the left string
+ @param b - the right string
+ @param b_length - the length of the right string
+ @param nchars - compare this amount of characters only
+ @return - the comparison result
+*/
+static int
+MY_FUNCTION_NAME(strnncollsp_nchars)(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *a, size_t a_length,
+ const uchar *b, size_t b_length,
+ size_t nchars)
+{
+ const uchar *a_end= a + a_length;
+ const uchar *b_end= b + b_length;
+ for ( ; nchars ; nchars--)
+ {
+ int a_weight, b_weight, res;
+ uint a_wlen= MY_FUNCTION_NAME(scan_weight)(&a_weight, a, a_end);
+ uint b_wlen= MY_FUNCTION_NAME(scan_weight)(&b_weight, b, b_end);
+
+ if ((res= (a_weight - b_weight)))
+ {
+ /* Got two different weights. See comments in strnncollsp above. */
+ return res;
+ }
+ if (!a_wlen && !b_wlen)
+ {
+ /* Got two auto-generated trailing spaces. */
+ DBUG_ASSERT(a == a_end);
+ DBUG_ASSERT(b == b_end);
+ return 0;
+ }
+ /*
+ At least one of the strings has not ended yet, continue comparison.
+ */
+ DBUG_ASSERT(a < a_end || b < b_end);
+ a+= a_wlen;
+ b+= b_wlen;
+ }
+ return 0;
+}
+
+
+#endif /* DEFINE_STRNNCOLL */
+
+
#ifdef DEFINE_STRNXFRM
#ifndef WEIGHT_MB2_FRM
#define WEIGHT_MB2_FRM(x,y) WEIGHT_MB2(x,y)
@@ -322,11 +383,261 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
#endif /* DEFINE_STRNXFRM */
+#if defined(DEFINE_STRNXFRM_UNICODE) || defined(DEFINE_STRNXFRM_UNICODE_NOPAD)
+
+/*
+ Store sorting weights using 2 bytes per character.
+
+ This function is shared between
+ - utf8mb3_general_ci, utf8_bin, ucs2_general_ci, ucs2_bin
+ which support BMP only (U+0000..U+FFFF).
+ - utf8mb4_general_ci, utf16_general_ci, utf32_general_ci,
+ which map all supplementary characters to weight 0xFFFD.
+*/
+
+#ifndef MY_MB_WC
+#error MY_MB_WC must be defined for DEFINE_STRNXFRM_UNICODE
+#endif
+
+#ifndef OPTIMIZE_ASCII
+#error OPTIMIZE_ASCII must be defined for DEFINE_STRNXFRM_UNICODE
+#endif
+
+#ifndef UNICASE_MAXCHAR
+#error UNICASE_MAXCHAR must be defined for DEFINE_STRNXFRM_UNICODE
+#endif
+
+#ifndef UNICASE_PAGE0
+#error UNICASE_PAGE0 must be defined for DEFINE_STRNXFRM_UNICODE
+#endif
+
+#ifndef UNICASE_PAGES
+#error UNICASE_PAGES must be defined for DEFINE_STRNXFRM_UNICODE
+#endif
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm_internal)(CHARSET_INFO *cs __attribute__((unused)),
+ uchar *dst, uchar *de,
+ uint *nweights,
+ const uchar *src, const uchar *se)
+{
+ my_wc_t UNINIT_VAR(wc);
+ uchar *dst0= dst;
+
+ DBUG_ASSERT(src || !se);
+ DBUG_ASSERT((cs->state & MY_CS_LOWER_SORT) == 0);
+ DBUG_ASSERT(0x7F <= UNICASE_MAXCHAR);
+
+ for (; dst < de && *nweights; (*nweights)--)
+ {
+ int res;
+#if OPTIMIZE_ASCII
+ if (src >= se)
+ break;
+ if (src[0] <= 0x7F)
+ {
+ wc= UNICASE_PAGE0[*src++].sort;
+ PUT_WC_BE2_HAVE_1BYTE(dst, de, wc);
+ continue;
+ }
+#endif
+ if ((res= MY_MB_WC(cs, &wc, src, se)) <= 0)
+ break;
+ src+= res;
+ if (wc <= UNICASE_MAXCHAR)
+ {
+ MY_UNICASE_CHARACTER *page;
+ if ((page= UNICASE_PAGES[wc >> 8]))
+ wc= page[wc & 0xFF].sort;
+ }
+ else
+ wc= MY_CS_REPLACEMENT_CHARACTER;
+ PUT_WC_BE2_HAVE_1BYTE(dst, de, wc);
+ }
+ return dst - dst0;
+}
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+ dst+= MY_FUNCTION_NAME(strnxfrm_internal)(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
+
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ dst+= my_strxfrm_pad_nweights_unicode(dst, de, nweights);
+
+ my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
+
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ dst+= my_strxfrm_pad_unicode(dst, de);
+ return dst - dst0;
+}
+
+
+#ifdef DEFINE_STRNXFRM_UNICODE_NOPAD
+static size_t
+MY_FUNCTION_NAME(strnxfrm_nopad)(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen,
+ uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+ dst+= MY_FUNCTION_NAME(strnxfrm_internal)(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
+
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ {
+ size_t len= de - dst;
+ set_if_smaller(len, nweights * 2);
+ memset(dst, 0x00, len);
+ dst+= len;
+ }
+
+ my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
+
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ {
+ memset(dst, 0x00, de - dst);
+ dst= de;
+ }
+ return dst - dst0;
+}
+#endif
+
+#endif /* DEFINE_STRNXFRM_UNICODE || DEFINE_STRNXFRM_UNICODE_NOPAD */
+
+
+
+#ifdef DEFINE_STRNXFRM_UNICODE_BIN2
+
+/*
+ Store sorting weights using 2 bytes per character.
+
+ These functions are shared between
+ - utf8mb3_general_ci, utf8_bin, ucs2_general_ci, ucs2_bin
+ which support BMP only (U+0000..U+FFFF).
+ - utf8mb4_general_ci, utf16_general_ci, utf32_general_ci,
+ which map all supplementary characters to weight 0xFFFD.
+*/
+
+#ifndef MY_MB_WC
+#error MY_MB_WC must be defined for DEFINE_STRNXFRM_UNICODE_BIN2
+#endif
+
+#ifndef OPTIMIZE_ASCII
+#error OPTIMIZE_ASCII must be defined for DEFINE_STRNXFRM_UNICODE_BIN2
+#endif
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm_internal)(CHARSET_INFO *cs __attribute__((unused)),
+ uchar *dst, uchar *de,
+ uint *nweights,
+ const uchar *src,
+ const uchar *se)
+{
+ my_wc_t UNINIT_VAR(wc);
+ uchar *dst0= dst;
+
+ DBUG_ASSERT(src || !se);
+
+ for (; dst < de && *nweights; (*nweights)--)
+ {
+ int res;
+#if OPTIMIZE_ASCII
+ if (src >= se)
+ break;
+ if (src[0] <= 0x7F)
+ {
+ wc= *src++;
+ PUT_WC_BE2_HAVE_1BYTE(dst, de, wc);
+ continue;
+ }
+#endif
+ if ((res= MY_MB_WC(cs, &wc, src, se)) <= 0)
+ break;
+ src+= res;
+ if (wc > 0xFFFF)
+ wc= MY_CS_REPLACEMENT_CHARACTER;
+ PUT_WC_BE2_HAVE_1BYTE(dst, de, wc);
+ }
+ return dst - dst0;
+}
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+ dst+= MY_FUNCTION_NAME(strnxfrm_internal)(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
+
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ dst+= my_strxfrm_pad_nweights_unicode(dst, de, nweights);
+
+ my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
+
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ dst+= my_strxfrm_pad_unicode(dst, de);
+ return dst - dst0;
+}
+
+
+static size_t
+MY_FUNCTION_NAME(strnxfrm_nopad)(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+ dst+= MY_FUNCTION_NAME(strnxfrm_internal)(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
+
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ {
+ size_t len= de - dst;
+ set_if_smaller(len, nweights * 2);
+ memset(dst, 0x00, len);
+ dst+= len;
+ }
+
+ my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
+
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ {
+ memset(dst, 0x00, de - dst);
+ dst= de;
+ }
+ return dst - dst0;
+}
+
+#endif /* DEFINE_STRNXFRM_UNICODE_BIN2 */
+
+
/*
We usually include this file at least two times from the same source file,
for the _ci and the _bin collations. Prepare for the second inclusion.
*/
#undef MY_FUNCTION_NAME
+#undef MY_MB_WC
+#undef OPTIMIZE_ASCII
+#undef UNICASE_MAXCHAR
+#undef UNICASE_PAGE0
+#undef UNICASE_PAGES
#undef WEIGHT_ILSEQ
#undef WEIGHT_MB1
#undef WEIGHT_MB2
@@ -335,4 +646,8 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
#undef WEIGHT_PAD_SPACE
#undef WEIGHT_MB2_FRM
#undef DEFINE_STRNXFRM
+#undef DEFINE_STRNXFRM_UNICODE
+#undef DEFINE_STRNXFRM_UNICODE_NOPAD
+#undef DEFINE_STRNXFRM_UNICODE_BIN2
+#undef DEFINE_STRNNCOLL
#undef DEFINE_STRNNCOLLSP_NOPAD
diff --git a/strings/strings_def.h b/strings/strings_def.h
index b3727321e19..8bf089ec695 100644
--- a/strings/strings_def.h
+++ b/strings/strings_def.h
@@ -105,6 +105,16 @@ static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
}
+int my_strnncollsp_nchars_generic(CHARSET_INFO *cs,
+ const uchar *str1, size_t len1,
+ const uchar *str2, size_t len2,
+ size_t nchars);
+
+int my_strnncollsp_nchars_generic_8bit(CHARSET_INFO *cs,
+ const uchar *str1, size_t len1,
+ const uchar *str2, size_t len2,
+ size_t nchars);
+
uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs);
uint my_8bit_collation_flags_from_data(CHARSET_INFO *cs);
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index f59120f30eb..4c1db775c19 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -31,7 +31,7 @@ ELSE()
SET(MYSQLD_USER "mysql")
SET(MYSQLD_GROUP "mysql")
SET(ini_file_extension "cnf")
- SET(HOSTNAME "hostname")
+ SET(HOSTNAME "uname -n")
ENDIF()
# XXX: shouldn't we just have variables for all this stuff and centralise
@@ -101,8 +101,18 @@ IF(UNIX)
SET(scriptdir ${INSTALL_SCRIPTDIRABS})
SET(libexecdir ${INSTALL_SBINDIRABS})
SET(pkgdatadir ${INSTALL_MYSQLSHAREDIRABS})
- SET(sysconfdir ${INSTALL_SYSCONFDIR})
- SET(sysconf2dir ${INSTALL_SYSCONF2DIR})
+ IF(INSTALL_SYSCONFDIR)
+ SET(sysconfdir ${INSTALL_SYSCONFDIR})
+ ELSEIF(DEFAULT_SYSCONFDIR)
+ SET(sysconfdir ${DEFAULT_SYSCONFDIR})
+ ELSE()
+ SET(sysconfdir "/etc")
+ ENDIF()
+ IF(INSTALL_SYSCONF2DIR)
+ SET(sysconf2dir ${INSTALL_SYSCONF2DIR})
+ ELSE()
+ SET(sysconf2dir "${sysconfdir}/mysql")
+ ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql.server.sh
${CMAKE_CURRENT_BINARY_DIR}/mysql.server @ONLY)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/mysql.server
@@ -164,9 +174,11 @@ IF(UNIX)
IF (INSTALL_SYSCONFDIR)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql-log-rotate DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d
RENAME mysql COMPONENT SupportFiles)
- INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/mysql.server
- DESTINATION ${INSTALL_SYSCONFDIR}/init.d
- RENAME mysql COMPONENT SupportFiles)
+ IF(NOT HAVE_SYSTEMD)
+ INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/mysql.server
+ DESTINATION ${INSTALL_SYSCONFDIR}/init.d
+ RENAME mysql COMPONENT SupportFiles)
+ ENDIF()
INSTALL(FILES rpm/my.cnf DESTINATION ${INSTALL_SYSCONFDIR}
COMPONENT Common)
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index 4d9ca1c815b..92f856f7c35 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -99,17 +99,6 @@
.*/oqgraph/graphcore\.cc : may be used uninitialized in this function
#
-# Yassl
-#
-.*/include/runtime.hpp: .*pure_error.*
-.*/extra/yassl/.*taocrypt/.*: comparison with string literal
-.*/extra/yassl/taocrypt/src/blowfish\.cpp: array subscript is above array bounds
-.*/extra/yassl/taocrypt/src/file\.cpp: ignoring return value
-.*/extra/yassl/taocrypt/src/integer\.cpp: control reaches end of non-void function
-.*/mySTL/algorithm\.hpp: is used uninitialized in this function
-.*/include/pwdbased\.hpp: comparison of unsigned expression
-
-#
# OpenSSL
#
# The following comes because of different prototype between yassl and openssl.
@@ -204,7 +193,6 @@
.*/ctype-simple\.c : .*unary minus operator applied to unsigned type, result still unsigned.*
.*/sql/sys_vars\.cc : invalid access to non-static data member
.*/string3\.h : memset used with constant zero length parameter
-.*/sql/wsrep_hton\.cc : NULL used in arithmetic : 500-600
.* : missing-declarations.*is valid
#
diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
index 8b50e42ec94..b7a55596029 100644
--- a/support-files/mariadb.service.in
+++ b/support-files/mariadb.service.in
@@ -49,8 +49,15 @@ PrivateNetwork=false
User=mysql
Group=mysql
-# To allow memlock to be used as non-root user if set in configuration
-CapabilityBoundingSet=CAP_IPC_LOCK
+# CAP_IPC_LOCK To allow memlock to be used as non-root user
+# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
+# does nothing for non-root, not needed if /etc/shadow is u+r
+# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
+CapabilityBoundingSet=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
+
+# PrivateDevices=true implies NoNewPrivileges=true and
+# SUID auth_pam_tool suddenly doesn't do setuid anymore
+PrivateDevices=false
# Prevent writes to /usr, /boot, and /etc
ProtectSystem=full
@@ -60,8 +67,6 @@ ProtectSystem=full
# Doesn't yet work properly with SELinux enabled
# NoNewPrivileges=true
-PrivateDevices=true
-
# Prevent accessing /home, /root and /run/user
ProtectHome=true
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
index c14b7d2e611..8878ff27703 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
@@ -1,9 +1,10 @@
-# Multi instance version of mariadb. For if you run multiple versions at once.
+# Multi instance version of MariaDB
#
-# create config file @sysconf2dir@/my{instancename}.cnf to be used as the
-# configuration file for this service.
+# Use this if you run multiple instances of MariaDB on a single server.
+#
+# This systemd service is not suitable for Galera as specialised SST recovery
+# scripts are needed.
#
-# start as systemctl start mariadb@{instancename}.server
#
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades. If you want to customize, the
@@ -24,22 +25,144 @@
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
+#
+#
+# MULTI INSTANCES
+#
+# When multiple instances of MariaDB are running on a server they need to
+# ensure that they don't conflict with each other. This includes elements
+# like network ports, sockets and data directories listed under CONFLICTING
+# VARIABLES below. The systemd environment variable MYSQLD_MULTI_INSTANCE
+# controls each instance to ensure it is run independently. It is passed to
+# mysqld and mysql_install
+#
+# By default, a group suffix exists and within the default configuration
+# files, a group [mysqld.{instancename}] is read for each service. Other
+# default groups, like [server.{instancename}] and [mariadb.{instancename}],
+# are also read. For each instance, one of the groups will need to contain
+# the conflicting variables listed below under CONFLICTING VARIABLES.
+#
+# The MYSQLD_MULTI_INSTANCE environment used is:
+# Environment='MYSQLD_MULTI_INSTANCE=--defaults-group-suffix=.%I --basedir=@prefix@'
+#
+#
+# APPLYING YOUR MULTI INSTANCE MECHANISM
+#
+# To apply one of the non-default multi-instance mechanisms, create a file
+# "/etc/systemd/system/mariadb@.service.d/multi.conf" containing:
+#
+# [Service]
+# Environment=MYSQLD_MULTI_INSTANCE="...."
+#
+# Include any other settings you which to override. Directives like Exec* are
+# lists and adding a directive will append to the list. You can clear the list
+# by starting with "Directive=" and no value. Follow this by the list that you
+# do want. See the systemd.unit(5) manual page for more information.
+#
+# Then run "systemctl daemon-reload".
+#
+#
+# EXAMPLE MYSQLD_MULTI_INSTANCE CONFIGURATIONS
+#
+# Configuration File Based Mechanism:
+#
+# This has a configuration file per instance.
+#
+# [Unit]
+# ConditionPathExists=@sysconfdir@/my.%I.cnf
+#
+# [Service]
+# Environment=MYSQLD_MULTI_INSTANCE=--defaults-file=@sysconfdir@/my.%I.cnf
+#
+# Here you need to create a configuration file @sysconfdir@/my.%I.cnf for each
+# instance, each containing the conflicting variables to separate instances.
+#
+#
+# Multi User Based Mechanism:
+#
+# Here each user (the instance name) has their own mysql instance.
+#
+# Create instances in users home directory with abstract socket:
+#
+# [Service]
+# User=%I
+# ProtectHome=false
+# ExecStartPre=
+# ExecStartPre=@scriptdir@/mysql_install_db $MYSQLD_MULTI_INSTANCE \
+# --auth-root-authentication-method=socket --auth-root-socket-user=%I
+# Environment=MYSQLD_MULTI_INSTANCE="--defaults-file=/home/%I/my%I.cnf \
+# --datadir=/home/%I/mysqldatadir --skip-networking --socket=@mysql-%I"
+#
+#
+# Command Line Mechanism:
+#
+# This is a good way run multiple instance where there is little difference
+# in configuration between instances.
+#
+# [Service]
+# Environment=MYSQLD_MULTI_INSTANCE="--socket=/var/run/mysqld/%I.sock \
+# --datadir=/var/lib/mysqld-multi/%I \
+# --skip-networking"
+#
+#
+# CONFLICTING VARIABLES
+#
+# A number of MariaDB system variables may conflict. The main ones that need to
+# be set because their default values will conflict are:
+# * socket
+# * port
+# * datadir
+#
+#
+# PRE-10.4
+#
+# Before 10.4 MYSQLD_MULTI_INSTANCE was effectively --defaults-file=@sysconf2dir@/my%I.cnf
+# As @sysconfdir@/my.cnf included these files it was a bad choice as an
+# existing single instance would include all these files. If you want to
+# continue a file based multi-instance mysqld, recommend the Configuration File
+# Based Mechanism above and moving @sysconf2dir@/my%I.cnf files to @sysconfdir@/my%I.cnf.
+#
+#
+# SELINUX
+#
+# As basic selinux rules are written around a single instance of MariaDB you may need
+# to define labels for the files and network ports of all instances.
+#
+# See: https://mariadb.com/kb/en/library/what-to-do-if-mariadb-doesnt-start/#selinux
+#
+#
+# STARTING
+#
+# Start the instance: systemctl start mariadb@{instancename}.service
+#
+#
+# DOCUMENTATION:
+#
+# Read https://mariadb.com/kb/en/mariadb/systemd/ regarding customisation.
+#
+# Also see systemd man pages: systemd.unit(5), systemd.exec(5) and
+# systemd.service(5)
[Unit]
Description=MariaDB @VERSION@ database server (multi-instance %I)
Documentation=man:mysqld(8)
Documentation=https://mariadb.com/kb/en/library/systemd/
After=network.target
-ConditionPathExists=@sysconf2dir@/my%I.cnf
+
+# Negated condition here is because 10.3 and before had @sysconf2dir@/my%I.cnf
+# as the configuration difference for multiple instances. This condition here
+# to prevent an accidental change during an upgrade in the case the user
+# created these file(s).
+#
+## See Environment=MYSQLD_MULTI_INSTANCE below for current recommended options.
+ConditionPathExists=!@sysconf2dir@/my%I.cnf
+
[Install]
WantedBy=multi-user.target
-Alias=mysql.service
-Alias=mysqld.service
[Service]
-
##############################################################################
## Core requirements
##
@@ -54,69 +177,38 @@ PrivateNetwork=false
## Package maintainers
##
-User=mysql
-Group=mysql
+# CAP_IPC_LOCK To allow memlock to be used as non-root user
+# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
+# does nothing for non-root, not needed if /etc/shadow is u+r
+# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
+CapabilityBoundingSet=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
-# To allow memlock to be used as non-root user if set in configuration
-CapabilityBoundingSet=CAP_IPC_LOCK
+# PrivateDevices=true implies NoNewPrivileges=true and
+# SUID auth_pam_tool suddenly doesn't do setuid anymore
+PrivateDevices=false
# Prevent writes to /usr, /boot, and /etc
ProtectSystem=full
@SYSTEMD_READWRITEPATH@
-# Doesn't yet work properly with SELinux enabled
+# Requires kernel 4.14 or later and SELinux transition rule for mysqld_t
+# (https://github.com/systemd/systemd/issues/3845)
# NoNewPrivileges=true
-PrivateDevices=true
-
# Prevent accessing /home, /root and /run/user
ProtectHome=true
-# Execute pre and post scripts as root, otherwise it does it as User=
-PermissionsStartOnly=true
-
-@SYSTEMD_EXECSTARTPRE@
-
-# Perform automatic wsrep recovery. When server is started without wsrep,
-# galera_recovery simply returns an empty string. In any case, however,
-# the script is not expected to return with a non-zero status.
-# It is always safe to unset _WSREP_START_POSITION%I environment variable.
-# Do not panic if galera_recovery script is not available. (MDEV-10538)
-ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I"
-
-ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
- VAR=`cd @bindir@/..; @bindir@/galera_recovery --defaults-file=@sysconf2dir@/my%I.cnf`; [ $? -eq 0 ] \
- && systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
-
-# Alternate: (remove ConditionPathExists above)
-# use [mysqld.INSTANCENAME] as sections in my.cnf
-#
-#ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
-# VAR=`cd @bindir@/..; @bindir@/galera_recovery --defaults-group-suffix=%I`; [ $? -eq 0 ] \
-# && systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
-
# Needed to create system tables etc.
-# ExecStartPre=@scriptdir@/mysql_install_db -u mysql
+ExecStartPre=@scriptdir@/mysql_install_db $MYSQLD_MULTI_INSTANCE
# Start main service
-# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf
-# Use the [Service] section and Environment="MYSQLD_OPTS=...".
-# This isn't a replacement for my.cnf.
-# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
-
-# Note: Place $MYSQLD_OPTS at the very end for its options to take precedence.
-
-ExecStart=@sbindir@/mysqld --defaults-file=@sysconf2dir@/my%I.cnf \
- $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS
-# Alternate: (remove ConditionPathExists above)
-# use [mysqld.INSTANCENAME] as sections in my.cnf
+# A few variables are here:
+# * MYSQLD_MULTI_INSTANCE - control how multiple instances are distinguisable
+# * MYSQLD_OPTS - user definable extras - not a replacement for my.cnf
#
-# ExecStart=@sbindir@/mysqld --defaults-group-suffix=%I \
-# $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS
-
-# Unset _WSREP_START_POSITION environment variable.
-ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I"
+# Note 1: Place $MYSQLD_OPTS at the very end for its options to take precedence.
+ExecStart=@sbindir@/mysqld $MYSQLD_MULTI_INSTANCE $MYSQLD_OPTS
@SYSTEMD_EXECSTARTPOST@
@@ -160,6 +252,17 @@ PrivateTmp=false
TimeoutStartSec=900
TimeoutStopSec=900
+# Controlling how multiple instances are separated. See top of this file.
+# Note: This service isn't User=mysql by default so we need to be explicit.
+# It is as an option here as a user may want to use the MYSQLD_MULTI_INSTANCE
+# to run multiple versions.
+Environment='MYSQLD_MULTI_INSTANCE=--defaults-group-suffix=.%I'
+
+# While you can override these, you shouldn't leave them empty as that
+# will default to root.
+User=mysql
+Group=mysql
+
##
## Options previously available to be set via [mysqld_safe]
## that now needs to be set by systemd config files as mysqld_safe
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh
index 4d49f6f4e35..61c417e3e7d 100644
--- a/support-files/rpm/server-postin.sh
+++ b/support-files/rpm/server-postin.sh
@@ -69,6 +69,9 @@ if [ $1 = 1 ] ; then
chmod -R og-rw $datadir/mysql
fi
+# Set the correct filesystem ownership for the PAM v2 plugin
+chown %{mysqld_user} /usr/lib*/mysql/plugin/auth_pam_tool_dir
+
# install SELinux files - but don't override existing ones
SETARGETDIR=/etc/selinux/targeted/src/policy
SEDOMPROG=$SETARGETDIR/domains/program
diff --git a/support-files/rpm/server-posttrans.sh b/support-files/rpm/server-posttrans.sh
index 3250423da8f..d91ff65e04f 100644
--- a/support-files/rpm/server-posttrans.sh
+++ b/support-files/rpm/server-posttrans.sh
@@ -1,6 +1,6 @@
if [ -r %{restart_flag} ] ; then
rm %{restart_flag}
- # only restart the server if it was alredy running
+ # only restart the server if it was already running
if [ -x /usr/bin/systemctl ] ; then
/usr/bin/systemctl daemon-reload > /dev/null 2>&1
if /usr/bin/systemctl is-active mysql; then
diff --git a/support-files/rpm/server-preun.sh b/support-files/rpm/server-preun.sh
index 038f601f43c..34a35cbc5c5 100644
--- a/support-files/rpm/server-preun.sh
+++ b/support-files/rpm/server-preun.sh
@@ -7,9 +7,9 @@ if [ $1 = 0 ] ; then
fi
if [ -x %{_sysconfdir}/init.d/mysql ] ; then
%{_sysconfdir}/init.d/mysql stop > /dev/null
- fi
- if [ -x /sbin/chkconfig ] ; then
- /sbin/chkconfig --del mysql > /dev/null 2>&1 || :
+ if [ -x /sbin/chkconfig ] ; then
+ /sbin/chkconfig --del mysql > /dev/null 2>&1 || :
+ fi
fi
fi
diff --git a/support-files/rpm/server.cnf b/support-files/rpm/server.cnf
index f067afd0da3..a9fe564939e 100644
--- a/support-files/rpm/server.cnf
+++ b/support-files/rpm/server.cnf
@@ -39,8 +39,8 @@
# you can put MariaDB-only options here
[mariadb]
-# This group is only read by MariaDB-10.3 servers.
+# This group is only read by MariaDB-10.4 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
-[mariadb-10.3]
+[mariadb-10.4]
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 917ec458203..cb6c756cfe3 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES(BEFORE
${CMAKE_BINARY_DIR}/libmariadb/include
${CMAKE_SOURCE_DIR}/libmariadb/include)
-ADD_EXECUTABLE(mysql_client_test mysql_client_test.c)
+MYSQL_ADD_EXECUTABLE(mysql_client_test mysql_client_test.c COMPONENT Test)
SET(CLIENT_LIB mariadbclient mysys)
TARGET_LINK_LIBRARIES(mysql_client_test ${CLIENT_LIB})
@@ -34,8 +34,6 @@ IF(WITH_UNIT_TESTS)
ADD_DEPENDENCIES(bug25714 GenError ${CLIENT_LIB})
ENDIF()
-INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test)
-
CHECK_INCLUDE_FILE(event.h HAVE_EVENT_H)
FIND_LIBRARY(EVENT_LIBRARY event)
MARK_AS_ADVANCED(EVENT_LIBRARY)
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
index 8a5357efce1..e8d628e7b52 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -50,9 +50,6 @@ static char *opt_user= 0;
static char *opt_password= 0;
static char *opt_host= 0;
static char *opt_unix_socket= 0;
-#ifdef HAVE_SMEM
-static char *shared_memory_base_name= 0;
-#endif
static unsigned int opt_port;
static my_bool tty_password= 0, opt_silent= 0;
@@ -255,10 +252,6 @@ static void print_st_error(MYSQL_STMT *stmt, const char *msg)
static MYSQL *mysql_client_init(MYSQL* con)
{
MYSQL* res = mysql_init(con);
-#ifdef HAVE_SMEM
- if (res && shared_memory_base_name)
- mysql_options(res, MYSQL_SHARED_MEMORY_BASE_NAME, shared_memory_base_name);
-#endif
if (res && non_blocking_api_enabled)
mysql_options(res, MYSQL_OPT_NONBLOCK, 0);
if (opt_plugin_dir && *opt_plugin_dir)
@@ -1231,11 +1224,6 @@ static struct my_option client_test_long_options[] =
0, 0, 0, 0, 0, 0},
{"silent", 's', "Be more silent", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0,
0},
-#ifdef HAVE_SMEM
- {"shared-memory-base-name", 'm', "Base name of shared memory.",
- &shared_memory_base_name, (uchar**)&shared_memory_base_name, 0,
- GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#endif
{"socket", 'S', "Socket file to use for connection",
&opt_unix_socket, &opt_unix_socket, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 482bb106af7..d4e4f0c84a5 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -5256,10 +5256,10 @@ static void test_manual_sample()
{
unsigned int param_count;
MYSQL_STMT *stmt;
- short small_data;
- int int_data;
+ short small_data= 1;
+ int int_data= 2;
int rc;
- char str_data[50];
+ char str_data[50]= "std_data";
ulonglong affected_rows;
MYSQL_BIND my_bind[3];
my_bool is_null;
@@ -7612,8 +7612,8 @@ static void test_explain_bug()
verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_VAR_STRING,
"", "", "", NAME_CHAR_LEN * HA_MAX_KEY_SEG, 0);
- verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG,
- "", "", "", 10, 0);
+ verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_VAR_STRING,
+ "", "", "", NAME_CHAR_LEN, 0);
verify_prepare_field(result, 9, "Extra", "", MYSQL_TYPE_VAR_STRING,
"", "", "", 255, 0);
@@ -8423,6 +8423,50 @@ static void test_list_information_schema_fields()
}
+static void test_list_fields_blob()
+{
+ MYSQL_RES *result;
+ int rc;
+ myheader("test_list_fields_blob");
+
+ rc= mysql_query(mysql, "drop table if exists t1");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "create table t1(c1 tinyblob, c2 blob, c3 mediumblob, c4 longblob)");
+ myquery(rc);
+
+ result= mysql_list_fields(mysql, "t1", NULL);
+ mytest(result);
+
+ rc= my_process_result_set(result);
+ DIE_UNLESS(rc == 0);
+
+ /*
+ All BLOB variant Fields are displayed as MYSQL_TYPE_BLOB in
+ the result set metadata. Note, some Items display the exact
+ BLOB type. This inconsistency should be fixed eventually.
+ */
+ verify_prepare_field(result, 0, "c1", "c1", MYSQL_TYPE_BLOB,
+ "t1", "t1",
+ current_db, 255, NULL);
+
+ verify_prepare_field(result, 1, "c2", "c2", MYSQL_TYPE_BLOB,
+ "t1", "t1",
+ current_db, 65535, NULL);
+
+ verify_prepare_field(result, 2, "c3", "c3", MYSQL_TYPE_BLOB,
+ "t1", "t1",
+ current_db, 16777215, NULL);
+
+ verify_prepare_field(result, 3, "c4", "c4", MYSQL_TYPE_BLOB,
+ "t1", "t1",
+ current_db, 4294967295ULL, NULL);
+
+ mysql_free_result(result);
+ myquery(mysql_query(mysql, "drop table t1"));
+}
+
+
static void test_list_fields_default()
{
int rc, i;
@@ -8493,6 +8537,43 @@ static void test_list_fields_default()
}
+/**
+ Note, this test covers MDEV-18408 and MDEV-18685
+*/
+
+static void test_mdev18408()
+{
+ MYSQL_RES *result;
+ int rc;
+ myheader("test_mdev18408s");
+
+ rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "DROP VIEW IF EXISTS v1");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "CREATE TABLE t1 (c1 TIMESTAMP NULL DEFAULT NULL)");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "CREATE VIEW v1 AS SELECT c1 FROM t1");
+ myquery(rc);
+
+ result= mysql_list_fields(mysql, "v1", NULL);
+ mytest(result);
+
+ rc= my_process_result_set(result);
+ DIE_UNLESS(rc == 0);
+
+ verify_prepare_field(result, 0, "c1", "c1", MYSQL_TYPE_TIMESTAMP,
+ "v1", "v1", current_db, 19, 0);
+
+ mysql_free_result(result);
+ myquery(mysql_query(mysql, "DROP VIEW v1"));
+ myquery(mysql_query(mysql, "DROP TABLE t1"));
+}
+
+
static void test_bug19671()
{
MYSQL_RES *result;
@@ -8519,7 +8600,7 @@ static void test_bug19671()
DIE_UNLESS(rc == 0);
verify_prepare_field(result, 0, "f1", "f1", MYSQL_TYPE_LONG,
- "v1", "v1", current_db, 11, "0");
+ "v1", "v1", current_db, 11, NULL);
mysql_free_result(result);
myquery(mysql_query(mysql, "drop view v1"));
@@ -21168,6 +21249,52 @@ static void test_mdev19838()
#endif // EMBEDDED_LIBRARY
+/*
+ MDEV-20261 NULL passed to String::eq, SEGV, server crash, regression in 10.4
+*/
+static void test_mdev20261()
+{
+ int rc;
+ MYSQL_STMT *stmt;
+ MYSQL_BIND param[1];
+ const char *query= "SELECT * FROM t1 WHERE f = ? OR f = 'foo'";
+ char val[]= "";
+ my_bool is_null= TRUE;
+
+ myheader("test_mdev20261");
+
+ rc= mysql_query(mysql, "CREATE OR REPLACE TABLE t1 (f varchar(64)) ENGINE=MyISAM");
+ myquery(rc);
+
+ stmt= mysql_stmt_init(mysql);
+ check_stmt(stmt);
+ rc= mysql_stmt_prepare(stmt, query, strlen(query));
+ check_execute(stmt, rc);
+
+ verify_param_count(stmt, 1);
+
+ bzero((char*) param, sizeof(param));
+
+ param[0].buffer= &val;
+ param[0].buffer_type= MYSQL_TYPE_STRING;
+ param[0].is_null= &is_null;
+
+ rc= mysql_stmt_bind_param(stmt, param);
+ check_execute(stmt, rc);
+
+ rc= mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+
+ rc= mysql_stmt_store_result(stmt);
+ check_execute(stmt, rc);
+
+ mysql_stmt_close(stmt);
+
+ rc= mysql_query(mysql, "DROP TABLE t1");
+ myquery(rc);
+}
+
+
static struct my_tests_st my_tests[]= {
{ "test_mdev_20516", test_mdev_20516 },
{ "test_mdev24827", test_mdev24827 },
@@ -21270,6 +21397,7 @@ static struct my_tests_st my_tests[]= {
{ "test_mem_overun", test_mem_overun },
{ "test_list_fields", test_list_fields },
{ "test_list_information_schema_fields", test_list_information_schema_fields },
+ { "test_list_fields_blob", test_list_fields_blob },
{ "test_list_fields_default", test_list_fields_default },
{ "test_free_result", test_free_result },
{ "test_free_store_result", test_free_store_result },
@@ -21466,6 +21594,8 @@ static struct my_tests_st my_tests[]= {
#ifndef EMBEDDED_LIBRARY
{ "test_mdev19838", test_mdev19838 },
#endif
+ { "test_mdev18408", test_mdev18408 },
+ { "test_mdev20261", test_mdev20261 },
{ 0, 0 }
};
diff --git a/unittest/json_lib/CMakeLists.txt b/unittest/json_lib/CMakeLists.txt
index afe81eff64a..1b2a89b28cd 100644
--- a/unittest/json_lib/CMakeLists.txt
+++ b/unittest/json_lib/CMakeLists.txt
@@ -16,7 +16,6 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
- ${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/unittest/mytap)
#
diff --git a/unittest/my_decimal/CMakeLists.txt b/unittest/my_decimal/CMakeLists.txt
index d8f74b87494..0b5b228276d 100644
--- a/unittest/my_decimal/CMakeLists.txt
+++ b/unittest/my_decimal/CMakeLists.txt
@@ -16,7 +16,6 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
- ${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/unittest/mytap)
#
diff --git a/unittest/mysys/byte_order-t.c b/unittest/mysys/byte_order-t.c
index e276e597fbf..d4481a4135b 100644
--- a/unittest/mysys/byte_order-t.c
+++ b/unittest/mysys/byte_order-t.c
@@ -94,7 +94,7 @@ void test_byte_order()
#undef TEST
}
-int main(int argc, char **argv)
+int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
{
plan(68);
test_byte_order();
diff --git a/unittest/mysys/my_atomic-t.c b/unittest/mysys/my_atomic-t.c
index 52bced7ce3b..1995a8e8950 100644
--- a/unittest/mysys/my_atomic-t.c
+++ b/unittest/mysys/my_atomic-t.c
@@ -14,6 +14,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include "thr_template.c"
+#include "my_atomic.h"
volatile uint32 b32;
volatile int32 c32;
diff --git a/unittest/mysys/thr_template.c b/unittest/mysys/thr_template.c
index 080a62f1c04..1e715484687 100644
--- a/unittest/mysys/thr_template.c
+++ b/unittest/mysys/thr_template.c
@@ -16,7 +16,6 @@
#include <my_global.h>
#include <my_sys.h>
-#include <my_atomic.h>
#include <tap.h>
volatile uint32 bad;
diff --git a/unittest/sql/CMakeLists.txt b/unittest/sql/CMakeLists.txt
index a4ba1019e49..ab174680fab 100644
--- a/unittest/sql/CMakeLists.txt
+++ b/unittest/sql/CMakeLists.txt
@@ -21,10 +21,12 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/extra/yassl/include)
IF(WIN32)
- ADD_EXECUTABLE(explain_filename-t explain_filename-t.cc
- ../../sql/nt_servc.cc)
+ ADD_EXECUTABLE(explain_filename-t
+ explain_filename-t.cc
+ dummy_builtins.cc
+ ../../sql/nt_servc.cc)
ELSE()
- ADD_EXECUTABLE(explain_filename-t explain_filename-t.cc)
+ ADD_EXECUTABLE(explain_filename-t explain_filename-t.cc dummy_builtins.cc)
ENDIF()
TARGET_LINK_LIBRARIES(explain_filename-t sql mytap)
@@ -34,3 +36,8 @@ ADD_EXECUTABLE(mf_iocache-t mf_iocache-t.cc ../../sql/mf_iocache_encr.cc)
TARGET_LINK_LIBRARIES(mf_iocache-t mysys mytap mysys_ssl)
ADD_DEPENDENCIES(mf_iocache-t GenError)
MY_ADD_TEST(mf_iocache)
+
+# Json writer needs String which needs sql library
+ADD_EXECUTABLE(my_json_writer-t my_json_writer-t.cc dummy_builtins.cc)
+TARGET_LINK_LIBRARIES(my_json_writer-t sql mytap)
+MY_ADD_TEST(my_json_writer)
diff --git a/unittest/sql/dummy_builtins.cc b/unittest/sql/dummy_builtins.cc
new file mode 100644
index 00000000000..31d043d19ec
--- /dev/null
+++ b/unittest/sql/dummy_builtins.cc
@@ -0,0 +1,26 @@
+/* 2018 MariaDB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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 */
+
+#include <my_global.h>
+#include <mysql/plugin.h>
+struct st_maria_plugin *mysql_optional_plugins[]=
+{
+ 0
+};
+
+struct st_maria_plugin *mysql_mandatory_plugins[]=
+{
+ 0
+};
diff --git a/unittest/sql/my_json_writer-t.cc b/unittest/sql/my_json_writer-t.cc
new file mode 100644
index 00000000000..6398a589c33
--- /dev/null
+++ b/unittest/sql/my_json_writer-t.cc
@@ -0,0 +1,128 @@
+/*
+ Copyright (c) 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 Street, Fifth Floor, Boston, MA 02110-1335 USA */
+
+#include <my_global.h>
+#include <my_pthread.h>
+#include <my_sys.h>
+#include <stdio.h>
+#include <tap.h>
+
+/*
+ Unit tests for class Json_writer. At the moment there are only tests for the
+ "Fail an assertion if one attempts to produce invalid JSON" feature.
+*/
+
+struct TABLE;
+struct JOIN_TAB;
+class Json_writer;
+
+
+/* Several fake objects */
+class Opt_trace
+{
+public:
+ void enable_tracing_if_required() {}
+ void disable_tracing_if_required() {}
+ Json_writer *get_current_json() { return nullptr; }
+};
+
+class THD
+{
+public:
+ Opt_trace opt_trace;
+};
+
+#define JSON_WRITER_UNIT_TEST
+#include "../sql/my_json_writer.h"
+#include "../sql/my_json_writer.cc"
+
+int main(int args, char **argv)
+{
+ plan(NO_PLAN);
+ diag("Testing Json_writer checks");
+
+ {
+ Json_writer w;
+ w.start_object();
+ w.add_member("foo");
+ w.end_object();
+ ok(w.invalid_json, "Started a name but didn't add a value");
+ }
+
+ {
+ Json_writer w;
+ w.start_object();
+ w.add_ull(123);
+ ok(w.invalid_json, "Unnamed value in an object");
+ }
+
+ {
+ Json_writer w;
+ w.start_array();
+ w.add_member("bebebe").add_ull(345);
+ ok(w.invalid_json, "Named member in array");
+ }
+
+ {
+ Json_writer w;
+ w.start_object();
+ w.start_array();
+ ok(w.invalid_json, "Unnamed array in an object");
+ }
+
+ {
+ Json_writer w;
+ w.start_object();
+ w.start_object();
+ ok(w.invalid_json, "Unnamed object in an object");
+ }
+
+ {
+ Json_writer w;
+ w.start_array();
+ w.add_member("zzz");
+ w.start_object();
+ ok(w.invalid_json, "Named object in an array");
+ }
+ {
+ Json_writer w;
+ w.start_array();
+ w.add_member("zzz");
+ w.start_array();
+ ok(w.invalid_json, "Named array in an array");
+ }
+
+ {
+ Json_writer w;
+ w.start_array();
+ w.end_object();
+ ok(w.invalid_json, "JSON object end of array");
+ }
+
+ {
+ Json_writer w;
+ w.start_object();
+ w.end_array();
+ ok(w.invalid_json, "JSON array end of object");
+ }
+
+
+
+ diag("Done");
+
+ return exit_status();
+}
+
diff --git a/unittest/strings/CMakeLists.txt b/unittest/strings/CMakeLists.txt
index 245747538c9..0896e132d24 100644
--- a/unittest/strings/CMakeLists.txt
+++ b/unittest/strings/CMakeLists.txt
@@ -1,3 +1,3 @@
-MY_ADD_TESTS(strings LINK_LIBRARIES strings mysys)
+MY_ADD_TESTS(strings json LINK_LIBRARIES strings mysys)
diff --git a/unittest/strings/json-t.c b/unittest/strings/json-t.c
new file mode 100644
index 00000000000..7c5f7957d42
--- /dev/null
+++ b/unittest/strings/json-t.c
@@ -0,0 +1,103 @@
+/* Copyright (c) 2019, 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-1301 USA */
+
+#include <tap.h>
+#include <my_sys.h>
+#include <json_lib.h>
+
+const char *json="{\"int\":1,\"str\":\"foo bar\","
+ "\"array\":[10,20,{\"c\":\"d\"}],\"bool\":false}";
+
+const char *json_ar="[1,\"foo bar\",[10,20,{\"c\":\"d\"}],false]";
+
+const char *json_w="{\"int\" : 1 , "
+ "\"array\" : [10,20,{\"c\":\"d\"}] , \"bool\" : false }";
+const char *json_1="{ \"str\" : \"foo bar\" }";
+
+void do_json(const char *key, int type, const char *value)
+{
+ enum json_types value_type;
+ const char *value_start;
+ int value_len;
+
+ value_type= json_get_object_key(json, json + strlen(json),
+ key, &value_start, &value_len);
+ if (type)
+ ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len),
+ "%s: type=%u, value(%d)=\"%.*s\"", key, value_type, value_len, value_len, value_start);
+ else
+ ok(value_type == type && value_len == (int)strlen(value),
+ "%s: type=%u keys=%u end=\"%s\"", key, value_type, value_len, value_start);
+}
+
+void do_json_ar(int n, int type, const char *value)
+{
+ enum json_types value_type;
+ const char *value_start;
+ int value_len;
+
+ value_type= json_get_array_item(json_ar, json_ar + strlen(json_ar),
+ n, &value_start, &value_len);
+ if (type)
+ ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len),
+ "%i: type=%u, value(%d)=\"%.*s\"", n, value_type, value_len, value_len, value_start);
+ else
+ ok(value_type == type && value_len == (int)strlen(value),
+ "%i: type=%u keys=%u end=\"%s\"", n, value_type, value_len, value_start);
+}
+
+void do_json_locate(const char *json, const char *key, int from, int to, int cp)
+{
+ const char *key_start, *key_end;
+ int res, comma_pos;
+
+ res= json_locate_key(json, json + strlen(json),
+ key, &key_start, &key_end, &comma_pos);
+ if (key_start)
+ ok(res == 0 && key_start - json == from && key_end - json == to &&
+ comma_pos == cp, "%s: [%d,%d,%d] %.*s%s", key, (int)(key_start-json),
+ (int)(key_end-json), comma_pos, (int)(key_start - json), json, key_end);
+ else
+ ok(res == 0 && from == -1, "%s: key not found", key);
+}
+
+int main()
+{
+ plan(18);
+
+ diag("%s", json);
+ do_json("int", 4, "1");
+ do_json("str", 3, "foo bar");
+ do_json("bool", 6, "false");
+ do_json("c", 0, "1234");
+ do_json("array", 2, "[10,20,{\"c\":\"d\"}]");
+ diag("%s", json_ar);
+ do_json_ar(0, 4, "1");
+ do_json_ar(1, 3, "foo bar");
+ do_json_ar(2, 2, "[10,20,{\"c\":\"d\"}]");
+ do_json_ar(3, 6, "false");
+ do_json_ar(4, 0, "1234");
+
+ do_json_locate(json, "bool", 50, 63, 1);
+ do_json_locate(json, "int", 1, 9, 2);
+ do_json_locate(json, "array", 24, 50, 1);
+ do_json_locate(json_w, "bool", 43, 61, 1);
+ do_json_locate(json_w, "int", 1, 12, 2);
+ do_json_locate(json_w, "array", 11, 43, 1);
+ do_json_locate(json_w, "c", -1, -1, -1);
+ do_json_locate(json_1, "str", 1, 22, 0);
+
+ return exit_status();
+}
diff --git a/unittest/strings/strings-t.c b/unittest/strings/strings-t.c
index 00d49971595..97b9eb1a95e 100644
--- a/unittest/strings/strings-t.c
+++ b/unittest/strings/strings-t.c
@@ -19,6 +19,30 @@
/*
+ U+00DF LATIN SMALL LETTER SHARP S = _utf8 x'C39F' = _latin1 x'DF'
+*/
+
+#define UTF8_sz "\xC3\x9F"
+#define LATIN1_sz "\xDF"
+
+/*
+ U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE = _utf8 x'C385'
+*/
+
+#define UTF8_ARING "\xC3\x85"
+
+/*
+ U+00E4 LATIN SMALL LETTER A WITH DIAERESIS = _utf8 x'C3A4'
+*/
+#define UTF8_auml "\xC3\xA4"
+#define LATIN1_auml "\xE4"
+
+#define UCS2_a "\x00\x61"
+#define UCS2_b "\x00\x62"
+#define UCS2_sp "\x00\x20"
+
+
+/*
Test that like_range() returns well-formed results.
*/
static int
@@ -758,11 +782,483 @@ test_strcollsp()
}
-int main()
+typedef struct
+{
+ LEX_CSTRING a;
+ LEX_CSTRING b;
+ size_t nchars;
+ int res;
+} STRNNCOLLSP_CHAR_PARAM;
+
+
+/*
+ Some lines in the below test data are marked as follows:
+
+ IF - An ignorable failure. The scanner finds an ignorable character
+ followed by a normal character (or by a contraction),
+ but the "nchars" limit allows only one character to be scanned.
+ The whole sequence is ignored an is treated as end-of-line.
+ CF - A contraction failure. The scanner finds a contraction consisting
+ of two characters, but the "nchars" limit allows only one character
+ to be scanned. The whole contraction is ignored and is treated
+ as end-of-line.
+*/
+
+
+/*
+ Tests for mbminlen1 character sets,
+ for both PAD SPACE and NOPAD collations
+*/
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_mbminlen1_xpad_common[]=
+{
+ {{CSTR("a")}, {CSTR("a")}, 0, 0},
+ {{CSTR("a")}, {CSTR("a")}, 1, 0},
+ {{CSTR("a")}, {CSTR("a")}, 2, 0},
+ {{CSTR("a")}, {CSTR("a")}, 3, 0},
+ {{CSTR("a")}, {CSTR("a")}, 100, 0},
+
+ {{CSTR("a")}, {CSTR("ab")}, 0, 0},
+ {{CSTR("a")}, {CSTR("ab")}, 1, 0},
+ {{CSTR("a")}, {CSTR("ab")}, 2, -1},
+ {{CSTR("a")}, {CSTR("ab")}, 3, -1},
+ {{CSTR("a")}, {CSTR("ab")}, 100, -1},
+
+ {{CSTR("a")}, {CSTR("a ")}, 0, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 1, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 2, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 3, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 100, 0},
+
+ {{CSTR("a")}, {CSTR("a ")}, 0, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 1, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 2, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 3, 0},
+ {{CSTR("a")}, {CSTR("a ")}, 100, 0},
+
+ {{CSTR("ss")}, {CSTR("ss")}, 0, 0},
+ {{CSTR("ss")}, {CSTR("ss")}, 1, 0},
+ {{CSTR("ss")}, {CSTR("ss")}, 2, 0},
+ {{CSTR("ss")}, {CSTR("ss")}, 3, 0},
+ {{CSTR("ss")}, {CSTR("ss")}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+/* Tests for utf8, for both PAD SPACE and NOPAD collations */
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_utf8mbx_xpad_common[]=
+{
+ {{CSTR(UTF8_sz)}, {CSTR(UTF8_sz)}, 0, 0},
+ {{CSTR(UTF8_sz)}, {CSTR(UTF8_sz)}, 1, 0},
+ {{CSTR(UTF8_sz)}, {CSTR(UTF8_sz)}, 2, 0},
+ {{CSTR(UTF8_sz)}, {CSTR(UTF8_sz)}, 3, 0},
+ {{CSTR(UTF8_sz)}, {CSTR(UTF8_sz)}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+/* Tests for latin1, for both PAD and NOPAD collations */
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_latin1_xpad_common[]=
+{
+ {{CSTR(LATIN1_sz)}, {CSTR(LATIN1_sz)}, 0, 0},
+ {{CSTR(LATIN1_sz)}, {CSTR(LATIN1_sz)}, 1, 0},
+ {{CSTR(LATIN1_sz)}, {CSTR(LATIN1_sz)}, 2, 0},
+ {{CSTR(LATIN1_sz)}, {CSTR(LATIN1_sz)}, 3, 0},
+ {{CSTR(LATIN1_sz)}, {CSTR(LATIN1_sz)}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+/* Tests for utf8 collations that sort "A WITH DIAERESIS" equal to "A" */
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_utf8mbx_xpad_a_eq_auml[]=
+{
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah")}, 0, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah")}, 1, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah")}, 2, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah")}, 3, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah")}, 100, 0},
+
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah ")}, 0, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah ")}, 1, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah ")}, 2, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah ")}, 3, 0},
+ {{CSTR(UTF8_auml "h")}, {CSTR("ah ")}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_utf8mb3_unicode_ci[]=
+{
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 0, 0},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 1, 0},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}/*IF*/, 2, 1},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 3, 0},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 4, 0},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 100, 0},
+
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 0, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 1, -1},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 2, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 3, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 4, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_utf8mb3_unicode_nopad_ci[]=
+{
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 0, 0},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 1, 0},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}/*IF*/, 2, 1},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 3, 1},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 4, 1},
+ {{CSTR("ss")}, {CSTR("s" "\x00" "s")}, 100, 1},
+
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 0, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 1, -1},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 2, -1},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 3, -1},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 4, -1},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 100, -1},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_utf8mb3_danish_ci[]=
+{
+ {{CSTR("aa")}, {CSTR("")}, 0, 0},
+ {{CSTR("aa")}/*CF*/, {CSTR("")}, 1, 1},
+ {{CSTR("aa")}, {CSTR("")}, 2, 1},
+ {{CSTR("aa")}, {CSTR("")}, 3, 1},
+ {{CSTR("aa")}, {CSTR("")}, 100, 1},
+
+ {{CSTR("aa")}, {CSTR("a")}, 0, 0},
+ {{CSTR("aa")}/*CF*/, {CSTR("a")}, 1, 0},
+ {{CSTR("aa")}, {CSTR("a")}, 2, 1},
+ {{CSTR("aa")}, {CSTR("a")}, 3, 1},
+ {{CSTR("aa")}, {CSTR("a")}, 100, 1},
+
+ {{CSTR("aa")}, {CSTR("aa")}, 0, 0},
+ {{CSTR("aa")}/*CF*/, {CSTR("aa")}/*CF*/, 1, 0},
+ {{CSTR("aa")}, {CSTR("aa")}, 2, 0},
+ {{CSTR("aa")}, {CSTR("aa")}, 3, 0},
+ {{CSTR("aa")}, {CSTR("aa")}, 100, 0},
+
+ {{CSTR("aa")}, {CSTR("\x00" "a")}, 0, 0},
+ {{CSTR("aa")}/*CF*/, {CSTR("\x00" "a")}/*IF*/, 1, 1},
+ {{CSTR("aa")}, {CSTR("\x00" "a")}, 2, 1},
+ {{CSTR("aa")}, {CSTR("\x00" "a")}, 3, 1},
+ {{CSTR("aa")}, {CSTR("\x00" "a")}, 100, 1},
+
+ {{CSTR("aa")}, {CSTR("\x00" "aa")}, 0, 0},
+ {{CSTR("aa")}/*CF*/, {CSTR("\x00" "aa")}/*IF*/, 1, 1},
+ {{CSTR("aa")}, {CSTR("\x00" "aa")}/*IF*/, 2, 1},
+ {{CSTR("aa")}, {CSTR("\x00" "aa")}, 3, 0},
+ {{CSTR("aa")}, {CSTR("\x00" "aa")}, 100, 0},
+
+ {{CSTR("aa")}, {CSTR("a" "\x00" "a")}, 0, 0},
+ {{CSTR("aa")}/*CF*/, {CSTR("a" "\x00" "a")}, 1, 0},
+ {{CSTR("aa")}, {CSTR("a" "\x00" "a")}/*IF*/, 2, 1},
+ {{CSTR("aa")}, {CSTR("a" "\x00" "a")}, 3, 1},
+ {{CSTR("aa")}, {CSTR("a" "\x00" "a")}, 100, 1},
+
+ {{CSTR("aa")}, {CSTR(UTF8_ARING)}, 0, 0},
+ {{CSTR("aa")}/*CF*/, {CSTR(UTF8_ARING)}, 1, -1},
+ {{CSTR("aa")}, {CSTR(UTF8_ARING)}, 2, 0},
+ {{CSTR("aa")}, {CSTR(UTF8_ARING)}, 3, 0},
+ {{CSTR("aa")}, {CSTR(UTF8_ARING)}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_latin1_german2_ci[]=
+{
+ {{CSTR("ss")}, {CSTR(LATIN1_sz)}, 0, 0},
+ {{CSTR("ss")}, {CSTR(LATIN1_sz)}, 1, -1},
+ {{CSTR("ss")}, {CSTR(LATIN1_sz)}, 2, 0},
+ {{CSTR("ss")}, {CSTR(LATIN1_sz)}, 3, 0},
+ {{CSTR("ss")}, {CSTR(LATIN1_sz)}, 100, 0},
+
+ {{CSTR("ae")}, {CSTR(LATIN1_auml)}, 0, 0},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml)}, 1, -1},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml)}, 2, 0},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml)}, 3, 0},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml)}, 100, 0},
+
+ {{CSTR("ae")}, {CSTR(LATIN1_auml " ")}, 0, 0},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml " ")}, 1, -1},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml " ")}, 2, 0},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml " ")}, 3, 0},
+ {{CSTR("ae")}, {CSTR(LATIN1_auml " ")}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_utf8mbx_german2_ci[]=
+{
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 0, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 1, -1},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 2, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 3, 0},
+ {{CSTR("ss")}, {CSTR(UTF8_sz)}, 100, 0},
+
+ {{CSTR("ae")}, {CSTR(UTF8_auml)}, 0, 0},
+ {{CSTR("ae")}, {CSTR(UTF8_auml)}, 1, -1},
+ {{CSTR("ae")}, {CSTR(UTF8_auml)}, 2, 0},
+ {{CSTR("ae")}, {CSTR(UTF8_auml)}, 3, 0},
+ {{CSTR("ae")}, {CSTR(UTF8_auml)}, 100, 0},
+
+ {{CSTR("ae")}, {CSTR(UTF8_auml " ")}, 0, 0},
+ {{CSTR("ae")}, {CSTR(UTF8_auml " ")}, 1, -1},
+ {{CSTR("ae")}, {CSTR(UTF8_auml " ")}, 2, 0},
+ {{CSTR("ae")}, {CSTR(UTF8_auml " ")}, 3, 0},
+ {{CSTR("ae")}, {CSTR(UTF8_auml " ")}, 100, 0},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_mbminlen1_xpad_czech[]=
+{
+ {{CSTR("c")}, {CSTR("ch")}, 0, 0},
+ {{CSTR("c")}, {CSTR("ch")}, 1, 0},
+ {{CSTR("c")}, {CSTR("ch")}, 2, -1},
+
+ {{CSTR("h")}, {CSTR("ch")}, 0, 0},
+ {{CSTR("h")}, {CSTR("ch")}, 1, 1},
+ {{CSTR("h")}, {CSTR("ch")}, 2, -1},
+
+ {{CSTR("i")}, {CSTR("ch")}, 0, 0},
+ {{CSTR("i")}, {CSTR("ch")}, 1, 1},
+ {{CSTR("i")}, {CSTR("ch")}, 2, 1},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static STRNNCOLLSP_CHAR_PARAM strnncollsp_char_mbminlen2_xpad_common[]=
+{
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a)}, 0, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a)}, 1, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a)}, 2, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a)}, 3, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a)}, 100, 0},
+
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp)}, 0, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp)}, 1, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp)}, 2, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp)}, 3, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp)}, 100, 0},
+
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp UCS2_sp)}, 0, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp UCS2_sp)}, 1, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp UCS2_sp)}, 2, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp UCS2_sp)}, 3, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_sp UCS2_sp)}, 100, 0},
+
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_b)}, 0, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_b)}, 1, 0},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_b)}, 2, -1},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_b)}, 3, -1},
+ {{CSTR(UCS2_a)}, {CSTR(UCS2_a UCS2_b)}, 100, -1},
+
+ {{NULL, 0}, {NULL, 0}, 0, 0}
+};
+
+
+static int
+strnncollsp_char_one(CHARSET_INFO *cs, const STRNNCOLLSP_CHAR_PARAM *p)
+{
+ int failed= 0;
+ char ahex[64], bhex[64];
+ int res= cs->coll->strnncollsp_nchars(cs,
+ (uchar *) p->a.str, p->a.length,
+ (uchar *) p->b.str, p->b.length,
+ p->nchars);
+ str2hex(ahex, sizeof(ahex), p->a.str, p->a.length);
+ str2hex(bhex, sizeof(bhex), p->b.str, p->b.length);
+ diag("%-25s %-12s %-12s %3d %7d %7d%s",
+ cs->name, ahex, bhex, (int) p->nchars, p->res, res,
+ eqres(res, p->res) ? "" : " FAILED");
+ if (!eqres(res, p->res))
+ {
+ failed++;
+ }
+ else
+ {
+ /* Test in reverse order */
+ res= cs->coll->strnncollsp_nchars(cs,
+ (uchar *) p->b.str, p->b.length,
+ (uchar *) p->a.str, p->a.length,
+ p->nchars);
+ if (!eqres(res, -p->res))
+ {
+ diag("Comparison in reverse order failed. Expected %d, got %d",
+ -p->res, res);
+ failed++;
+ }
+ }
+ return failed;
+}
+
+
+static int
+strnncollsp_char(const char *collation, const STRNNCOLLSP_CHAR_PARAM *param)
+{
+ int failed= 0;
+ const STRNNCOLLSP_CHAR_PARAM *p;
+ CHARSET_INFO *cs= get_charset_by_name(collation, MYF(0));
+
+ if (!cs)
+ {
+ diag("get_charset_by_name() failed");
+ return 1;
+ }
+
+ diag("%-25s %-12s %-12s %-3s %7s %7s",
+ "Collation", "a", "b", "Nch", "ExpSign", "Actual");
+
+ for (p= param; p->a.str; p++)
+ {
+ failed+= strnncollsp_char_one(cs, p);
+ }
+
+ return failed;
+}
+
+
+static int
+strnncollsp_char_mbminlen1(const char *collation,
+ const STRNNCOLLSP_CHAR_PARAM *specific)
+{
+ int failed= 0;
+ failed+= strnncollsp_char(collation, strnncollsp_char_mbminlen1_xpad_common);
+ if (specific)
+ failed+= strnncollsp_char(collation, specific);
+ return failed;
+}
+
+
+static int
+strnncollsp_char_mbminlen2(const char *collation,
+ const STRNNCOLLSP_CHAR_PARAM *specific)
+{
+ int failed= 0;
+ failed+= strnncollsp_char(collation, strnncollsp_char_mbminlen2_xpad_common);
+ if (specific)
+ failed+= strnncollsp_char(collation, specific);
+ return failed;
+}
+
+
+static int
+strnncollsp_char_latin1(const char *collation,
+ const STRNNCOLLSP_CHAR_PARAM *specific)
+{
+ int failed= 0;
+ failed+= strnncollsp_char(collation, strnncollsp_char_mbminlen1_xpad_common);
+ failed+= strnncollsp_char(collation, strnncollsp_char_latin1_xpad_common);
+ if (specific)
+ failed+= strnncollsp_char(collation, specific);
+ return failed;
+}
+
+
+static int
+strnncollsp_char_utf8mbx(const char *collation,
+ const STRNNCOLLSP_CHAR_PARAM *specific)
+{
+ int failed= 0;
+ failed+= strnncollsp_char(collation, strnncollsp_char_mbminlen1_xpad_common);
+ failed+= strnncollsp_char(collation, strnncollsp_char_utf8mbx_xpad_common);
+
+ if (!strstr(collation, "_bin") &&
+ !strstr(collation, "_german2") &&
+ !strstr(collation, "_danish"))
+ failed+= strnncollsp_char(collation,
+ strnncollsp_char_utf8mbx_xpad_a_eq_auml);
+ if (specific)
+ failed+= strnncollsp_char(collation, specific);
+ return failed;
+}
+
+
+static int
+test_strnncollsp_char()
+{
+ int failed= 0;
+ failed+= strnncollsp_char_latin1("latin1_swedish_ci", NULL);
+ failed+= strnncollsp_char_latin1("latin1_swedish_nopad_ci", NULL);
+ failed+= strnncollsp_char_latin1("latin1_bin", NULL);
+ failed+= strnncollsp_char_latin1("latin1_nopad_bin", NULL);
+ failed+= strnncollsp_char_latin1("latin1_german2_ci",
+ strnncollsp_char_latin1_german2_ci);
+
+#ifdef HAVE_CHARSET_cp1250
+ failed+= strnncollsp_char_mbminlen1("cp1250_czech_cs",
+ strnncollsp_char_mbminlen1_xpad_czech);
+#endif
+
+#ifdef HAVE_CHARSET_latin2
+ failed+= strnncollsp_char_mbminlen1("latin2_czech_cs",
+ strnncollsp_char_mbminlen1_xpad_czech);
+#endif
+
+#ifdef HAVE_CHARSET_tis620
+ failed+= strnncollsp_char_mbminlen1("tis620_thai_ci", NULL);
+#endif
+
+#ifdef HAVE_CHARSET_big5
+ failed+= strnncollsp_char_mbminlen1("big5_chinese_ci", NULL);
+ failed+= strnncollsp_char_mbminlen1("big5_chinese_nopad_ci", NULL);
+ failed+= strnncollsp_char_mbminlen1("big5_bin", NULL);
+ failed+= strnncollsp_char_mbminlen1("big5_nopad_bin", NULL);
+#endif
+
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_general_ci", NULL);
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_general_nopad_ci", NULL);
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_bin", NULL);
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_nopad_bin", NULL);
+
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_unicode_ci",
+ strnncollsp_char_utf8mb3_unicode_ci);
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_unicode_nopad_ci",
+ strnncollsp_char_utf8mb3_unicode_nopad_ci);
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_danish_ci",
+ strnncollsp_char_utf8mb3_danish_ci);
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_german2_ci",
+ strnncollsp_char_utf8mbx_german2_ci);
+ failed+= strnncollsp_char_utf8mbx("utf8mb3_czech_ci",
+ strnncollsp_char_mbminlen1_xpad_czech);
+
+#ifdef HAVE_CHARSET_ucs2
+ failed+= strnncollsp_char_mbminlen2("ucs2_general_ci", NULL);
+ failed+= strnncollsp_char_mbminlen2("ucs2_general_nopad_ci", NULL);
+ failed+= strnncollsp_char_mbminlen2("ucs2_bin", NULL);
+ failed+= strnncollsp_char_mbminlen2("ucs2_nopad_bin", NULL);
+ failed+= strnncollsp_char_mbminlen2("ucs2_unicode_ci", NULL);
+ failed+= strnncollsp_char_mbminlen2("ucs2_unicode_nopad_ci", NULL);
+#endif
+
+ return failed;
+}
+
+
+int main(int ac, char **av)
{
size_t i, failed= 0;
-
- plan(2);
+
+ MY_INIT(av[0]);
+
+ plan(3);
diag("Testing my_like_range_xxx() functions");
for (i= 0; i < array_elements(charset_list); i++)
@@ -780,5 +1276,11 @@ int main()
failed= test_strcollsp();
ok(failed == 0, "Testing cs->coll->strnncollsp()");
+ diag("Testing cs->coll->strnncollsp_char()");
+ failed= test_strnncollsp_char();
+ ok(failed == 0, "Testing cs->coll->strnncollsp_char()");
+
+ my_end(0);
+
return exit_status();
}
diff --git a/vio/CMakeLists.txt b/vio/CMakeLists.txt
index 6749d3c699b..85810840273 100644
--- a/vio/CMakeLists.txt
+++ b/vio/CMakeLists.txt
@@ -17,6 +17,6 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${SSL_INCLUDE_DIRS})
ADD_DEFINITIONS(${SSL_DEFINES})
-SET(VIO_SOURCES vio.c viosocket.c viossl.c viopipe.c vioshm.c viosslfactories.c)
+SET(VIO_SOURCES vio.c viosocket.c viossl.c viopipe.c viosslfactories.c)
ADD_CONVENIENCE_LIBRARY(vio ${VIO_SOURCES})
TARGET_LINK_LIBRARIES(vio ${LIBSOCKET})
diff --git a/vio/docs/TODO b/vio/docs/TODO
deleted file mode 100644
index 7296ab73a10..00000000000
--- a/vio/docs/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-* Consistent error handling. May be the initialization should
- be taken out of constructors and be put into virtual method open().
-* The open() method is named very misleadingly().
diff --git a/vio/vio.c b/vio/vio.c
index 694d2f7b7ff..21c475f5972 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -54,18 +54,6 @@ static my_bool has_no_data(Vio *vio __attribute__((unused)))
}
#ifdef _WIN32
-my_bool vio_shared_memory_has_data(Vio *vio)
-{
- return (vio->shared_memory_remain > 0);
-}
-
-int vio_shared_memory_shutdown(Vio *vio, int how)
-{
- SetEvent(vio->event_conn_closed);
- SetEvent(vio->event_server_wrote);
- return 0;
-}
-
int vio_pipe_shutdown(Vio *vio, int how)
{
vio->shutdown_flag= how;
@@ -117,28 +105,7 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
DBUG_VOID_RETURN;
}
#endif
-#ifdef HAVE_SMEM
- if (type == VIO_TYPE_SHARED_MEMORY)
- {
- vio->viodelete =vio_delete;
- vio->vioerrno =vio_errno;
- vio->read =vio_read_shared_memory;
- vio->write =vio_write_shared_memory;
- vio->fastsend =vio_fastsend;
- vio->viokeepalive =vio_keepalive;
- vio->should_retry =vio_should_retry;
- vio->was_timeout =vio_was_timeout;
- vio->vioclose =vio_close_shared_memory;
- vio->peer_addr =vio_peer_addr;
- vio->vioblocking =vio_blocking;
- vio->is_blocking =vio_is_blocking;
- vio->io_wait =no_io_wait;
- vio->is_connected =vio_is_connected_shared_memory;
- vio->has_data =vio_shared_memory_has_data;
- vio->shutdown =vio_shared_memory_shutdown;
- DBUG_VOID_RETURN;
- }
-#endif
+
#ifdef HAVE_OPENSSL
if (type == VIO_TYPE_SSL)
{
@@ -297,31 +264,7 @@ Vio *vio_new_win32pipe(HANDLE hPipe)
DBUG_RETURN(vio);
}
-#ifdef HAVE_SMEM
-Vio *vio_new_win32shared_memory(HANDLE handle_file_map, HANDLE handle_map,
- HANDLE event_server_wrote, HANDLE event_server_read,
- HANDLE event_client_wrote, HANDLE event_client_read,
- HANDLE event_conn_closed)
-{
- Vio *vio;
- DBUG_ENTER("vio_new_win32shared_memory");
- if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME))))
- {
- vio_init(vio, VIO_TYPE_SHARED_MEMORY, 0, VIO_LOCALHOST);
- vio->desc= "shared memory";
- vio->handle_file_map= handle_file_map;
- vio->handle_map= handle_map;
- vio->event_server_wrote= event_server_wrote;
- vio->event_server_read= event_server_read;
- vio->event_client_wrote= event_client_wrote;
- vio->event_client_read= event_client_read;
- vio->event_conn_closed= event_conn_closed;
- vio->shared_memory_remain= 0;
- vio->shared_memory_pos= handle_map;
- }
- DBUG_RETURN(vio);
-}
-#endif
+
#endif
@@ -387,8 +330,8 @@ void vio_delete(Vio* vio)
*/
void vio_end(void)
{
-#ifdef HAVE_YASSL
- yaSSL_CleanUp();
+#ifdef HAVE_WOLFSSL
+ wolfSSL_Cleanup();
#elif defined(HAVE_OPENSSL)
// This one is needed on the client side
ERR_remove_state(0);
diff --git a/vio/vio_priv.h b/vio/vio_priv.h
index 6780ec5664a..3a0f826e7e8 100644
--- a/vio/vio_priv.h
+++ b/vio/vio_priv.h
@@ -36,14 +36,6 @@ int vio_shutdown_pipe(Vio *vio,int how);
uint vio_pending_pipe(Vio* vio);
#endif
-#ifdef HAVE_SMEM
-size_t vio_read_shared_memory(Vio *vio, uchar * buf, size_t size);
-size_t vio_write_shared_memory(Vio *vio, const uchar * buf, size_t size);
-my_bool vio_is_connected_shared_memory(Vio *vio);
-int vio_close_shared_memory(Vio * vio);
-my_bool vio_shared_memory_has_data(Vio *vio);
-int vio_shutdown_shared_memory(Vio *vio, int how);
-#endif
int vio_socket_shutdown(Vio *vio, int how);
my_bool vio_buff_has_data(Vio *vio);
diff --git a/vio/vioshm.c b/vio/vioshm.c
deleted file mode 100644
index 7b491b8f9b4..00000000000
--- a/vio/vioshm.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
-
-#include "vio_priv.h"
-
-#if defined(_WIN32) && defined(HAVE_SMEM)
-
-size_t vio_read_shared_memory(Vio *vio, uchar *buf, size_t size)
-{
- size_t length;
- size_t remain_local;
- char *current_position;
- HANDLE events[2];
- DWORD timeout;
- DBUG_ENTER("vio_read_shared_memory");
-
- remain_local= size;
- current_position= buf;
- timeout= vio->read_timeout >= 0 ? vio->read_timeout : INFINITE;
-
- events[0]= vio->event_server_wrote;
- events[1]= vio->event_conn_closed;
-
- do
- {
- if (vio->shared_memory_remain == 0)
- {
- DWORD wait_status;
-
- wait_status= WaitForMultipleObjects(array_elements(events), events,
- FALSE, timeout);
-
- /*
- WaitForMultipleObjects can return next values:
- WAIT_OBJECT_0+0 - event from vio->event_server_wrote
- WAIT_OBJECT_0+1 - event from vio->event_conn_closed.
- We can't read anything
- WAIT_ABANDONED_0 and WAIT_TIMEOUT - fail. We can't read anything
- */
- if (wait_status != WAIT_OBJECT_0)
- {
- /*
- If wait_status is WAIT_TIMEOUT, set error code to indicate a
- timeout error. If vio->event_conn_closed was set, use an EOF
- condition (return value of zero) to indicate that the operation
- has been aborted.
- */
- if (wait_status == WAIT_TIMEOUT)
- SetLastError(SOCKET_ETIMEDOUT);
- else if (wait_status == (WAIT_OBJECT_0 + 1))
- DBUG_RETURN(0);
-
- DBUG_RETURN(-1);
- }
-
- vio->shared_memory_pos= vio->handle_map;
- vio->shared_memory_remain= uint4korr((ulong*)vio->shared_memory_pos);
- vio->shared_memory_pos+= 4;
- }
-
- length= size;
-
- if (vio->shared_memory_remain < length)
- length= vio->shared_memory_remain;
- if (length > remain_local)
- length= remain_local;
-
- memcpy(current_position, vio->shared_memory_pos, length);
-
- vio->shared_memory_remain-= length;
- vio->shared_memory_pos+= length;
- current_position+= length;
- remain_local-= length;
-
- if (!vio->shared_memory_remain)
- {
- if (!SetEvent(vio->event_client_read))
- DBUG_RETURN(-1);
- }
- } while (remain_local);
- length= size;
-
- DBUG_RETURN(length);
-}
-
-
-size_t vio_write_shared_memory(Vio *vio, const uchar *buf, size_t size)
-{
- size_t length, remain, sz;
- HANDLE pos;
- const uchar *current_position;
- HANDLE events[2];
- DWORD timeout;
- DBUG_ENTER("vio_write_shared_memory");
-
- remain= size;
- current_position= buf;
- timeout= vio->write_timeout >= 0 ? vio->write_timeout : INFINITE;
-
- events[0]= vio->event_server_read;
- events[1]= vio->event_conn_closed;
-
- while (remain != 0)
- {
- DWORD wait_status;
-
- wait_status= WaitForMultipleObjects(array_elements(events), events,
- FALSE, timeout);
-
- if (wait_status != WAIT_OBJECT_0)
- {
- /* Set error code to indicate a timeout error or disconnect. */
- if (wait_status == WAIT_TIMEOUT)
- SetLastError(SOCKET_ETIMEDOUT);
- else
- SetLastError(ERROR_GRACEFUL_DISCONNECT);
-
- DBUG_RETURN((size_t) -1);
- }
-
- sz= (remain > shared_memory_buffer_length ? shared_memory_buffer_length :
- remain);
-
- int4store(vio->handle_map, sz);
- pos= vio->handle_map + 4;
- memcpy(pos, current_position, sz);
- remain-= sz;
- current_position+= sz;
- if (!SetEvent(vio->event_client_wrote))
- DBUG_RETURN((size_t) -1);
- }
- length= size;
-
- DBUG_RETURN(length);
-}
-
-
-my_bool vio_is_connected_shared_memory(Vio *vio)
-{
- return (WaitForSingleObject(vio->event_conn_closed, 0) != WAIT_OBJECT_0);
-}
-
-
-/**
- Close shared memory and DBUG_PRINT any errors that happen on closing.
- @return Zero if all closing functions succeed, and nonzero otherwise.
-*/
-int vio_close_shared_memory(Vio * vio)
-{
- int error_count= 0;
- DBUG_ENTER("vio_close_shared_memory");
- if (vio->type != VIO_CLOSED)
- {
- /*
- Set event_conn_closed for notification of both client and server that
- connection is closed
- */
- SetEvent(vio->event_conn_closed);
- /*
- Close all handlers. UnmapViewOfFile and CloseHandle return non-zero
- result if they are success.
- */
- if (UnmapViewOfFile(vio->handle_map) == 0)
- {
- error_count++;
- DBUG_PRINT("vio_error", ("UnmapViewOfFile() failed"));
- }
- if (CloseHandle(vio->event_server_wrote) == 0)
- {
- error_count++;
- DBUG_PRINT("vio_error", ("CloseHandle(vio->esw) failed"));
- }
- if (CloseHandle(vio->event_server_read) == 0)
- {
- error_count++;
- DBUG_PRINT("vio_error", ("CloseHandle(vio->esr) failed"));
- }
- if (CloseHandle(vio->event_client_wrote) == 0)
- {
- error_count++;
- DBUG_PRINT("vio_error", ("CloseHandle(vio->ecw) failed"));
- }
- if (CloseHandle(vio->event_client_read) == 0)
- {
- error_count++;
- DBUG_PRINT("vio_error", ("CloseHandle(vio->ecr) failed"));
- }
- if (CloseHandle(vio->handle_file_map) == 0)
- {
- error_count++;
- DBUG_PRINT("vio_error", ("CloseHandle(vio->hfm) failed"));
- }
- if (CloseHandle(vio->event_conn_closed) == 0)
- {
- error_count++;
- DBUG_PRINT("vio_error", ("CloseHandle(vio->ecc) failed"));
- }
- }
- vio->type= VIO_CLOSED;
- vio->mysql_socket= MYSQL_INVALID_SOCKET;
- DBUG_RETURN(error_count);
-}
-
-#endif /* #if defined(_WIN32) && defined(HAVE_SMEM) */
-
diff --git a/vio/viosocket.c b/vio/viosocket.c
index 6409aeb9899..0820176371d 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -74,8 +74,7 @@ int vio_errno(Vio *vio __attribute__((unused)))
{
/* These transport types are not Winsock based. */
#ifdef _WIN32
- if (vio->type == VIO_TYPE_NAMEDPIPE ||
- vio->type == VIO_TYPE_SHARED_MEMORY)
+ if (vio->type == VIO_TYPE_NAMEDPIPE)
return GetLastError();
#endif
@@ -149,6 +148,10 @@ int vio_socket_io_wait(Vio *vio, enum enum_vio_io_event event)
#define VIO_DONTWAIT 0
#endif
+#ifndef SOCKET_EAGAIN
+#define SOCKET_EAGAIN SOCKET_EWOULDBLOCK
+#endif
+
/*
returns number of bytes read or -1 in case of an error
*/
@@ -363,7 +366,7 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode)
r= set_blocking_mode ? 0 : 1;
#endif /* !defined(NO_FCNTL_NONBLOCK) */
#else /* !defined(__WIN__) */
- if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY)
+ if (vio->type != VIO_TYPE_NAMEDPIPE)
{
ulong arg;
int old_fcntl=vio->fcntl_mode;
@@ -435,13 +438,39 @@ int vio_socket_timeout(Vio *vio,
DBUG_RETURN(ret);
}
+/* Set TCP_NODELAY (disable Nagle's algorithm */
+int vio_nodelay(Vio *vio, my_bool on)
+{
+ int r;
+ int no_delay= MY_TEST(on);
+ DBUG_ENTER("vio_nodelay");
+
+ if (vio->type == VIO_TYPE_NAMEDPIPE || vio->type == VIO_TYPE_SOCKET)
+ {
+ DBUG_RETURN(0);
+ }
+
+ r = mysql_socket_setsockopt(vio->mysql_socket, IPPROTO_TCP, TCP_NODELAY,
+ IF_WIN((const char*), (void*)) &no_delay,
+ sizeof(no_delay));
-int vio_fastsend(Vio * vio __attribute__((unused)))
+ if (r)
+ {
+ DBUG_PRINT("warning",
+ ("Couldn't set socket option for fast send, error %d",
+ socket_errno));
+ r = -1;
+ }
+ DBUG_PRINT("exit", ("%d", r));
+ DBUG_RETURN(r);
+}
+
+int vio_fastsend(Vio * vio)
{
int r=0;
DBUG_ENTER("vio_fastsend");
- if (vio->type == VIO_TYPE_NAMEDPIPE ||vio->type == VIO_TYPE_SHARED_MEMORY)
+ if (vio->type == VIO_TYPE_NAMEDPIPE)
{
DBUG_RETURN(0);
}
@@ -454,18 +483,7 @@ int vio_fastsend(Vio * vio __attribute__((unused)))
}
#endif /* IPTOS_THROUGHPUT */
if (!r)
- {
-#ifdef __WIN__
- BOOL nodelay= 1;
-#else
- int nodelay = 1;
-#endif
-
- r= mysql_socket_setsockopt(vio->mysql_socket, IPPROTO_TCP, TCP_NODELAY,
- IF_WIN((const char*), (void*)) &nodelay,
- sizeof(nodelay));
-
- }
+ r = vio_nodelay(vio, TRUE);
if (r)
{
DBUG_PRINT("warning",
@@ -486,7 +504,7 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive)
(int)mysql_socket_getfd(vio->mysql_socket),
(int)set_keep_alive));
- if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY)
+ if (vio->type != VIO_TYPE_NAMEDPIPE)
{
if (set_keep_alive)
opt = 1;
@@ -505,7 +523,7 @@ int vio_set_keepalive_options(Vio* vio, const struct vio_keepalive_opts *opts)
struct tcp_keepalive s;
DWORD nbytes;
- if (vio->type == VIO_TYPE_NAMEDPIPE || vio->type == VIO_TYPE_SHARED_MEMORY)
+ if (vio->type == VIO_TYPE_NAMEDPIPE)
return 0;
if (!opts->idle && !opts->interval)
diff --git a/vio/viossl.c b/vio/viossl.c
index ebcc5246a1c..c886391a593 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -26,19 +26,7 @@
#ifdef HAVE_OPENSSL
-#ifdef HAVE_YASSL
-/*
- yassl seem to be different here, SSL_get_error() value can be
- directly passed to ERR_error_string(), and these errors don't go
- into ERR_get_error() stack.
- in openssl, apparently, SSL_get_error() values live in a different
- namespace, one needs to use ERR_get_error() as an argument
- for ERR_error_string().
-*/
-#define SSL_errno(X,Y) SSL_get_error(X,Y)
-#else
#define SSL_errno(X,Y) ERR_get_error()
-#endif
/**
Obtain the equivalent system error status for the last SSL I/O operation.
@@ -144,9 +132,7 @@ static my_bool ssl_should_retry(Vio *vio, int ret, enum enum_vio_io_event *event
should_retry= FALSE;
*should_wait= FALSE;
ssl_set_sys_error(ssl_error);
-#ifndef HAVE_YASSL
ERR_clear_error();
-#endif
break;
}
@@ -230,25 +216,6 @@ size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size)
DBUG_RETURN(ret < 0 ? -1 : ret);
}
-#ifdef HAVE_YASSL
-
-/* Emulate a blocking recv() call with vio_read(). */
-static long yassl_recv(void *ptr, void *buf, size_t len,
- int flag __attribute__((unused)))
-{
- return (long)vio_read(ptr, buf, len);
-}
-
-
-/* Emulate a blocking send() call with vio_write(). */
-static long yassl_send(void *ptr, const void *buf, size_t len,
- int flag __attribute__((unused)))
-{
- return (long)vio_write(ptr, buf, len);
-}
-
-#endif
-
int vio_ssl_close(Vio *vio)
{
int r= 0;
@@ -361,21 +328,13 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
SSL_set_fd(ssl, (int)sd);
- /*
- Since yaSSL does not support non-blocking send operations, use
- special transport functions that properly handles non-blocking
- sockets. These functions emulate the behavior of blocking I/O
- operations by waiting for I/O to become available.
- */
-#ifdef HAVE_YASSL
+#ifdef HAVE_WOLFSSL
/* Set first argument of the transport functions. */
- yaSSL_transport_set_ptr(ssl, vio);
- /* Set functions to use in order to send and receive data. */
- yaSSL_transport_set_recv_function(ssl, yassl_recv);
- yaSSL_transport_set_send_function(ssl, yassl_send);
+ wolfSSL_SetIOReadCtx(ssl, vio);
+ wolfSSL_SetIOWriteCtx(ssl, vio);
#endif
-#if !defined(HAVE_YASSL) && defined(SSL_OP_NO_COMPRESSION)
+#if defined(SSL_OP_NO_COMPRESSION)
SSL_set_options(ssl, SSL_OP_NO_COMPRESSION);
#endif
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index fe980322736..af1fc1fe4f9 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -18,16 +18,14 @@
#include <ssl_compat.h>
#ifdef HAVE_OPENSSL
-#ifndef HAVE_YASSL
#include <openssl/dh.h>
#include <openssl/bn.h>
-#endif
static my_bool ssl_algorithms_added = FALSE;
static my_bool ssl_error_strings_loaded= FALSE;
/* the function below was generated with "openssl dhparam -2 -C 2048" */
-
+#ifndef HAVE_WOLFSSL
static
DH *get_dh2048()
{
@@ -74,6 +72,7 @@ DH *get_dh2048()
}
return dh;
}
+#endif
static const char*
ssl_error_string[] =
@@ -85,7 +84,8 @@ ssl_error_string[] =
"SSL_CTX_set_default_verify_paths failed",
"Failed to set ciphers to use",
"SSL_CTX_new failed",
- "SSL_CTX_set_tmp_dh failed"
+ "SSL_CTX_set_tmp_dh failed",
+ "Unknown TLS version"
};
const char*
@@ -151,7 +151,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file,
}
-static void check_ssl_init()
+void vio_check_ssl_init()
{
if (!ssl_algorithms_added)
{
@@ -166,17 +166,71 @@ static void check_ssl_init()
}
}
+#ifdef HAVE_WOLFSSL
+static int wolfssl_recv(WOLFSSL* ssl, char* buf, int sz, void* vio)
+{
+ size_t ret;
+ (void)ssl;
+ ret = vio_read((Vio *)vio, (uchar *)buf, sz);
+ /* check if connection was closed */
+ if (ret == 0)
+ return WOLFSSL_CBIO_ERR_CONN_CLOSE;
+
+ return (int)ret;
+}
+
+static int wolfssl_send(WOLFSSL* ssl, char* buf, int sz, void* vio)
+{
+ return (int)vio_write((Vio *)vio, (unsigned char*)buf, sz);
+}
+#endif /* HAVE_WOLFSSL */
+
+static long vio_tls_protocol_options(ulonglong tls_version)
+{
+ long tls_protocol_flags=
+#ifdef TLS1_3_VERSION
+ SSL_OP_NO_TLSv1_3 |
+#endif
+#if defined(TLS1_2_VERSION) || defined(HAVE_WOLFSSL)
+ SSL_OP_NO_TLSv1_2 |
+#endif
+ SSL_OP_NO_TLSv1_1 |
+ SSL_OP_NO_TLSv1;
+ long disabled_tls_protocols= tls_protocol_flags,
+ disabled_ssl_protocols= SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
+
+ if (!tls_version)
+ return disabled_ssl_protocols;
+
+ if (tls_version & VIO_TLSv1_0)
+ disabled_tls_protocols&= ~SSL_OP_NO_TLSv1;
+ if (tls_version & VIO_TLSv1_1)
+ disabled_tls_protocols&= ~SSL_OP_NO_TLSv1_1;
+#if defined(TLS1_2_VERSION) || defined(HAVE_WOLFSSL)
+ if (tls_version & VIO_TLSv1_2)
+ disabled_tls_protocols&= ~SSL_OP_NO_TLSv1_2;
+#endif
+#ifdef TLS1_3_VERSION
+ if (tls_version & VIO_TLSv1_3)
+ disabled_tls_protocols&= ~SSL_OP_NO_TLSv1_3;
+#endif
+
+ /* some garbage was specified in tls_version option */
+ if (tls_protocol_flags == disabled_tls_protocols)
+ return -1;
+ return (disabled_tls_protocols | disabled_ssl_protocols);
+}
+
/************************ VioSSLFd **********************************/
static struct st_VioSSLFd *
new_VioSSLFd(const char *key_file, const char *cert_file,
const char *ca_file, const char *ca_path,
const char *cipher, my_bool is_client_method,
enum enum_ssl_init_error *error,
- const char *crl_file, const char *crl_path)
+ const char *crl_file, const char *crl_path, ulonglong tls_version)
{
- DH *dh;
struct st_VioSSLFd *ssl_fd;
- long ssl_ctx_options= SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
+ long ssl_ctx_options;
DBUG_ENTER("new_VioSSLFd");
/*
@@ -205,7 +259,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
DBUG_PRINT("enter",
("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' "
- "cipher: '%s' crl_file: '%s' crl_path: '%s' ",
+ "cipher: '%s' crl_file: '%s' crl_path: '%s'",
key_file ? key_file : "NULL",
cert_file ? cert_file : "NULL",
ca_file ? ca_file : "NULL",
@@ -214,7 +268,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
crl_file ? crl_file : "NULL",
crl_path ? crl_path : "NULL"));
- check_ssl_init();
+ vio_check_ssl_init();
if (!(ssl_fd= ((struct st_VioSSLFd*)
my_malloc(sizeof(struct st_VioSSLFd),MYF(0)))))
@@ -228,6 +282,14 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
goto err1;
}
+ ssl_ctx_options= vio_tls_protocol_options(tls_version);
+ if (ssl_ctx_options == -1)
+ {
+ *error= SSL_INITERR_PROTOCOL;
+ DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
+ goto err1;
+ }
+
SSL_CTX_set_options(ssl_fd->ssl_context, ssl_ctx_options);
/*
@@ -257,7 +319,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
sslGetErrString(*error)));
goto err2;
}
-
+#ifndef HAVE_WOLFSSL
/* otherwise go use the defaults */
if (SSL_CTX_set_default_verify_paths(ssl_fd->ssl_context) == 0)
{
@@ -265,13 +327,15 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
goto err2;
}
+#endif
}
if (crl_file || crl_path)
{
-#ifdef HAVE_YASSL
- DBUG_PRINT("warning", ("yaSSL doesn't support CRL"));
+#ifdef HAVE_WOLFSSL
+ /* CRL does not work with WolfSSL. */
DBUG_ASSERT(0);
+ goto err2;
#else
X509_STORE *store= SSL_CTX_get_cert_store(ssl_fd->ssl_context);
/* Load crls from the trusted ca */
@@ -294,25 +358,32 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
goto err2;
}
+#ifndef HAVE_WOLFSSL
/* DH stuff */
if (!is_client_method)
{
- dh=get_dh2048();
+ DH *dh= get_dh2048();
if (!SSL_CTX_set_tmp_dh(ssl_fd->ssl_context, dh))
{
*error= SSL_INITERR_DH;
- goto err3;
+ DH_free(dh);
+ goto err2;
}
DH_free(dh);
}
+#endif
+
+#ifdef HAVE_WOLFSSL
+ /* set IO functions used by wolfSSL */
+ wolfSSL_SetIORecv(ssl_fd->ssl_context, wolfssl_recv);
+ wolfSSL_SetIOSend(ssl_fd->ssl_context, wolfssl_send);
+#endif
DBUG_PRINT("exit", ("OK 1"));
DBUG_RETURN(ssl_fd);
-err3:
- DH_free(dh);
err2:
SSL_CTX_free(ssl_fd->ssl_context);
err1:
@@ -366,7 +437,7 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
ca_path, cipher, TRUE, error,
- crl_file, crl_path)))
+ crl_file, crl_path, 0)))
{
return 0;
}
@@ -384,7 +455,8 @@ struct st_VioSSLFd *
new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
const char *ca_file, const char *ca_path,
const char *cipher, enum enum_ssl_init_error* error,
- const char *crl_file, const char *crl_path)
+ const char *crl_file, const char *crl_path,
+ ulonglong tls_version)
{
struct st_VioSSLFd *ssl_fd;
int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE;
@@ -415,7 +487,7 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
ca_path, cipher, FALSE, error,
- crl_file, crl_path)))
+ crl_file, crl_path, tls_version)))
{
return 0;
}
diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt
index 59dc38d0ea9..591d02345be 100644
--- a/win/packaging/CMakeLists.txt
+++ b/win/packaging/CMakeLists.txt
@@ -21,8 +21,6 @@ IF(MSVC_VERSION LESS 1600)
RETURN()
ENDIF()
-
-
SET(MANUFACTURER "MariaDB Corporation Ab")
SET(WIX_BIN_PATHS)
FOREACH(WIX_VER 3.9 3.10 3.11)
@@ -178,6 +176,26 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_CFG_INTDIR}")
ENDIF()
+IF(MSVC_CRT_TYPE MATCHES "/MD" AND (NOT VCRedist_MSM))
+ # Find out CRT merge module path, we're going to use it in installer
+
+ # merge module file name depends on MSVC version.
+ MATH(EXPR VC_CRT_VER "(${MSVC_VERSION} - 1900)/10 + 140")
+ SET(VCREDIST_MSM_FILENAME Microsoft_VC${VC_CRT_VER}_CRT_${WIX_ARCH_SUFFIX}.msm)
+
+ FILE(GLOB MSM_LIST "C:/Program Files*/Microsoft Visual Studio/*/*/VC/Redist/MSVC/*/MergeModules/${VCREDIST_MSM_FILENAME}")
+ LIST(LENGTH MSM_LIST LEN)
+ IF(LEN GREATER 0)
+ LIST(GET MSM_LIST 0 VCRedist_MSM_Location)
+ ENDIF()
+ IF (NOT VCRedist_MSM_Location)
+ MESSAGE(WARNING "Can't find merge module ${VCREDIST_MSM_FILENAME}")
+ ELSE()
+ FILE(TO_NATIVE_PATH ${VCRedist_MSM_Location} VCRedist_MSM_Location)
+ SET(VCRedist_MSM "${VCRedist_MSM_Location}" CACHE INTERNAL "Location of redistributable merge module")
+ # MESSAGE("VCRedist_MSM=${VCRedist_MSM}")
+ ENDIF()
+ENDIF()
ADD_CUSTOM_TARGET(
MSI
@@ -209,44 +227,12 @@ ADD_CUSTOM_TARGET(
-DVERSION="${VERSION}"
-DWITH_THIRD_PARTY="${WITH_THIRD_PARTY}"
-DWIXCA_LOCATION="$<TARGET_FILE:wixca>"
+ -DMSVC_CRT_TYPE="${MSVC_CRT_TYPE}"
+ -DVCRedist_MSM="${VCRedist_MSM}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake
)
ADD_DEPENDENCIES(MSI wixca)
-ADD_CUSTOM_TARGET(
- MSI_ESSENTIALS
- COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -DESSENTIALS=1
- -DCANDLE_EXECUTABLE="${CANDLE_EXECUTABLE}"
- -DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}"
- -DCMAKE_FULL_VER="${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}"
- -DCMAKE_SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P}
- -DCOPYING_RTF="${COPYING_RTF}"
- -DCPACK_WIX_CONFIG="${CPACK_WIX_CONFIG}"
- -DCPACK_WIX_INCLUDE="${CPACK_WIX_INCLUDE}"
- -DCPACK_WIX_PACKAGE_BASE_NAME="${CPACK_WIX_PACKAGE_BASE_NAME}"
- -DCPACK_WIX_PACKAGE_NAME="${CPACK_WIX_PACKAGE_NAME}"
- -DCPACK_WIX_UPGRADE_CODE="${CPACK_WIX_UPGRADE_CODE}"
- -DEXTRA_WIX_PREPROCESSOR_FLAGS="${EXTRA_WIX_PREPROCESSOR_FLAGS}"
- -DLIGHT_EXECUTABLE="${LIGHT_EXECUTABLE}"
- -DMAJOR_VERSION="${MAJOR_VERSION}"
- -DMANUFACTURER="${MANUFACTURER}"
- -DMINOR_VERSION="${MINOR_VERSION}"
- -DPATCH_VERSION="${PATCH_VERSION}"
- -DSIGNCODE="${SIGNCODE}"
- -DSIGNTOOL_EXECUTABLE="${SIGNTOOL_EXECUTABLE}"
- -DSIGNTOOL_PARAMETERS="${SIGNTOOL_PARAMETERS}"
- -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}"
- -DTHIRD_PARTY_DOWNLOAD_LOCATION="${THIRD_PARTY_DOWNLOAD_LOCATION}"
- -DTHIRD_PARTY_FEATURE_CONDITION="${THIRD_PARTY_FEATURE_CONDITION}"
- -DTINY_VERSION="${TINY_VERSION}"
- -DTOP_BINDIR="${CMAKE_BINARY_DIR}"
- -DVERSION="${VERSION}"
- -DWITH_THIRD_PARTY="${WITH_THIRD_PARTY}"
- -DWIXCA_LOCATION="$<TARGET_FILE:wixca>"
- -P ${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake
-)
-ADD_DEPENDENCIES(MSI_ESSENTIALS wixca)
-
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET(CPACK_CONFIG_PARAM -C $(Configuration))
diff --git a/win/packaging/CPackWixConfig.cmake b/win/packaging/CPackWixConfig.cmake
index 994b121797a..74329e79247 100644
--- a/win/packaging/CPackWixConfig.cmake
+++ b/win/packaging/CPackWixConfig.cmake
@@ -9,7 +9,7 @@ IF(ESSENTIALS)
ENDIF()
ELSE()
SET(CPACK_COMPONENTS_USED
- "Server;Client;Development;SharedLibraries;Documentation;Readme;Common;VCCRT;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup")
+ "Server;Client;Development;SharedLibraries;Documentation;Readme;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup")
ENDIF()
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
diff --git a/win/packaging/ca/CMakeLists.txt b/win/packaging/ca/CMakeLists.txt
index 1a24ee9a082..99dc7da01fb 100644
--- a/win/packaging/ca/CMakeLists.txt
+++ b/win/packaging/ca/CMakeLists.txt
@@ -14,11 +14,23 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX_MSVC_SUFFIX}/inc)
-SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
+SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def ${CMAKE_CURRENT_BINARY_DIR}/symlinks.cc)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql ${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE(symlinks)
+LIST(LENGTH MARIADB_SYMLINK_FROMS LEN)
+MATH(EXPR max_index "${LEN}-1")
+SET(ALL_SYMLINKS "")
+FOREACH(i RANGE 0 ${max_index})
+ LIST(GET MARIADB_SYMLINK_FROMS ${i} src)
+ LIST(GET MARIADB_SYMLINK_TOS ${i} dst)
+ STRING(APPEND ALL_SYMLINKS "{L\"${src}\",L\"${dst}\"},\n")
+ENDFOREACH()
+CONFIGURE_FILE(symlinks.cc.in symlinks.cc)
+
+# Custom action should not depend on C runtime, since we do not know if CRT is installed.
+FORCE_STATIC_CRT()
ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
-ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL ${WIXCA_SOURCES})
-TARGET_LINK_LIBRARIES(wixca ${WIX_WCAUTIL_LIBRARY} ${WIX_DUTIL_LIBRARY}
- msi version winservice)
+ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL ${WIXCA_SOURCES} ${CMAKE_SOURCE_DIR}/sql/winservice.c)
+TARGET_LINK_LIBRARIES(wixca ${WIX_WCAUTIL_LIBRARY} ${WIX_DUTIL_LIBRARY} msi version)
diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp
index b9d938f4443..5acbca1e186 100644
--- a/win/packaging/ca/CustomAction.cpp
+++ b/win/packaging/ca/CustomAction.cpp
@@ -33,6 +33,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#include <shellapi.h>
#include <stdlib.h>
#include <winservice.h>
+#include <string>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <vector>
+#include <map>
+
+using namespace std;
#define ONE_MB 1048576
@@ -58,7 +66,7 @@ UINT ExecRemoveDataDirectory(wchar_t *dir)
}
-extern "C" UINT __stdcall RemoveDataDirectory(MSIHANDLE hInstall)
+extern "C" UINT __stdcall RemoveDataDirectory(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
@@ -74,13 +82,13 @@ extern "C" UINT __stdcall RemoveDataDirectory(MSIHANDLE hInstall)
er= ExecRemoveDataDirectory(dir);
WcaLog(LOGMSG_STANDARD, "SHFileOperation returned %d", er);
LExit:
- return WcaFinalize(er);
+ return WcaFinalize(er);
}
/*
Escape command line parameter fpr pass to CreateProcess().
- We assume out has enough space to include encoded string
+ We assume out has enough space to include encoded string
2*wcslen(in) is enough.
It is assumed that called will add double quotation marks before and after
@@ -108,21 +116,21 @@ static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen)
}
pos= 0;
- for(int i = 0 ; ; i++)
+ for(int i = 0 ; ; i++)
{
size_t n_backslashes = 0;
wchar_t c;
- while (in[i] == L'\\')
+ while (in[i] == L'\\')
{
i++;
n_backslashes++;
}
c= in[i];
- if (c == 0)
+ if (c == 0)
{
/*
- Escape all backslashes, but let the terminating double quotation mark
+ Escape all backslashes, but let the terminating double quotation mark
that caller adds be interpreted as a metacharacter.
*/
for(size_t j= 0; j < 2*n_backslashes;j++)
@@ -131,7 +139,7 @@ static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen)
}
break;
}
- else if (c == L'"')
+ else if (c == L'"')
{
/*
Escape all backslashes and the following double quotation mark.
@@ -142,7 +150,7 @@ static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen)
}
out[pos++]= L'"';
}
- else
+ else
{
/* Backslashes aren't special here. */
for (size_t j=0; j < n_backslashes; j++)
@@ -153,11 +161,11 @@ static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen)
}
out[pos++]= 0;
}
-/*
- Check for if directory is empty during install,
+/*
+ Check for if directory is empty during install,
sets "<PROPERTY>_NOT_EMPTY" otherise
*/
-extern "C" UINT __stdcall CheckDirectoryEmpty(MSIHANDLE hInstall,
+extern "C" UINT __stdcall CheckDirectoryEmpty(MSIHANDLE hInstall,
const wchar_t *PropertyName)
{
HRESULT hr = S_OK;
@@ -167,14 +175,14 @@ extern "C" UINT __stdcall CheckDirectoryEmpty(MSIHANDLE hInstall,
WIN32_FIND_DATAW data;
HANDLE h;
bool empty;
-
+
hr = WcaInitialize(hInstall, __FUNCTION__);
ExitOnFailure(hr, "Failed to initialize");
WcaLog(LOGMSG_STANDARD, "Initialized.");
MsiGetPropertyW(hInstall, PropertyName, buf, &len);
wcscat_s(buf, MAX_PATH, L"*.*");
-
+
WcaLog(LOGMSG_STANDARD, "Checking files in %S", buf);
h= FindFirstFile(buf, &data);
@@ -200,7 +208,7 @@ extern "C" UINT __stdcall CheckDirectoryEmpty(MSIHANDLE hInstall,
}
if(empty)
- WcaLog(LOGMSG_STANDARD, "Directory %S is empty or non-existent",
+ WcaLog(LOGMSG_STANDARD, "Directory %S is empty or non-existent",
PropertyName);
else
WcaLog(LOGMSG_STANDARD, "Directory %S is NOT empty", PropertyName);
@@ -210,7 +218,7 @@ extern "C" UINT __stdcall CheckDirectoryEmpty(MSIHANDLE hInstall,
WcaSetProperty(buf, empty? L"":L"1");
LExit:
- return WcaFinalize(er);
+ return WcaFinalize(er);
}
extern "C" UINT __stdcall CheckDataDirectoryEmpty(MSIHANDLE hInstall)
@@ -222,12 +230,12 @@ bool CheckServiceExists(const wchar_t *name)
{
SC_HANDLE manager =0, service=0;
manager = OpenSCManager( NULL, NULL, SC_MANAGER_CONNECT);
- if (!manager)
+ if (!manager)
{
return false;
}
- service = OpenService(manager, name, SC_MANAGER_CONNECT);
+ service = OpenService(manager, name, SC_MANAGER_CONNECT);
if(service)
CloseServiceHandle(service);
CloseServiceHandle(manager);
@@ -241,11 +249,11 @@ bool ExecRemoveService(const wchar_t *name)
SC_HANDLE manager =0, service=0;
manager = OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS);
bool ret;
- if (!manager)
+ if (!manager)
{
return false;
}
- service = OpenService(manager, name, DELETE);
+ service = OpenService(manager, name, DELETE);
if(service)
{
ret= DeleteService(service);
@@ -344,7 +352,7 @@ bool IsPortFree(unsigned short port)
}
-/*
+/*
Helper function used in filename normalization.
Removes leading quote and terminates string at the position of the next one
(if applicable, does not change string otherwise). Returns modified string
@@ -365,23 +373,23 @@ wchar_t *strip_quotes(wchar_t *s)
/*
Checks for consistency of service configuration.
- It can happen that SERVICENAME or DATADIR
- MSI properties are in inconsistent state after somebody upgraded database
- We catch this case during uninstall. In particular, either service is not
+ It can happen that SERVICENAME or DATADIR
+ MSI properties are in inconsistent state after somebody upgraded database
+ We catch this case during uninstall. In particular, either service is not
removed even if SERVICENAME was set (but this name is reused by someone else)
or data directory is not removed (if it is used by someone else). To find out
- whether service name and datadirectory are in use For every service,
+ whether service name and datadirectory are in use For every service,
configuration is read and checked as follows:
- look if a service has to do something with mysql
- - If so, check its name against SERVICENAME. if match, check binary path
+ - If so, check its name against SERVICENAME. if match, check binary path
against INSTALLDIR\bin. If binary path does not match, then service runs
under different installation and won't be removed.
- Check options file for datadir and look if this is inside this
installation's datadir don't remove datadir if this is the case.
- "Don't remove" in this context means that custom action is removing
- SERVICENAME property or CLEANUPDATA property, which later on in course of
+ "Don't remove" in this context means that custom action is removing
+ SERVICENAME property or CLEANUPDATA property, which later on in course of
installation mean, that either datadir or service is kept.
*/
@@ -410,7 +418,7 @@ void CheckServiceConfig(
goto end;
}
- WcaLog(LOGMSG_STANDARD, "MySQL service %S found: CommandLine= %S",
+ WcaLog(LOGMSG_STANDARD, "MySQL/MariaDB service %S found: CommandLine= %S",
other_servicename, commandline);
if (wcsstr(argv[0], bindir))
{
@@ -422,15 +430,15 @@ void CheckServiceConfig(
if(!is_my_service)
{
WcaLog(LOGMSG_STANDARD, "service does not match current service");
- /*
+ /*
TODO probably the best thing possible would be to add temporary
row to MSI ServiceConfig table with remove on uninstall
*/
}
else if (!same_bindir)
{
- WcaLog(LOGMSG_STANDARD,
- "Service name matches, but not the executable path directory, mine is %S",
+ WcaLog(LOGMSG_STANDARD,
+ "Service name matches, but not the executable path directory, mine is %S",
bindir);
WcaSetProperty(L"SERVICENAME", L"");
}
@@ -447,10 +455,10 @@ void CheckServiceConfig(
WcaLog(LOGMSG_STANDARD, "parsed defaults file is %S", defaults_file);
- if (GetPrivateProfileStringW(L"mysqld", L"datadir", NULL, current_datadir,
+ if (GetPrivateProfileStringW(L"mysqld", L"datadir", NULL, current_datadir,
MAX_PATH, defaults_file) == 0)
{
- WcaLog(LOGMSG_STANDARD,
+ WcaLog(LOGMSG_STANDARD,
"Cannot find datadir in ini file '%S'", defaults_file);
goto end;
}
@@ -459,18 +467,18 @@ void CheckServiceConfig(
strip_quotes(current_datadir);
/* Convert to Windows path */
- if (GetFullPathNameW(current_datadir, MAX_PATH, normalized_current_datadir,
+ if (GetFullPathNameW(current_datadir, MAX_PATH, normalized_current_datadir,
NULL))
{
/* Add backslash to be compatible with directory formats in MSI */
wcsncat(normalized_current_datadir, L"\\", MAX_PATH+1);
- WcaLog(LOGMSG_STANDARD, "normalized current datadir is '%S'",
+ WcaLog(LOGMSG_STANDARD, "normalized current datadir is '%S'",
normalized_current_datadir);
}
if (_wcsicmp(datadir, normalized_current_datadir) == 0 && !same_bindir)
{
- WcaLog(LOGMSG_STANDARD,
+ WcaLog(LOGMSG_STANDARD,
"database directory from current installation, but different mysqld.exe");
WcaSetProperty(L"CLEANUPDATA", L"");
}
@@ -482,13 +490,13 @@ end:
/*
Checks if database directory or service are modified by user
For example, service may point to different mysqld.exe that it was originally
- installed, or some different service might use this database directory. This
- would normally mean user has done an upgrade of the database and in this case
+ installed, or some different service might use this database directory. This
+ would normally mean user has done an upgrade of the database and in this case
uninstall should neither delete service nor database directory.
- If this function find that service is modified by user (mysqld.exe used by
+ If this function find that service is modified by user (mysqld.exe used by
service does not point to the installation bin directory), MSI public variable
- SERVICENAME is removed, if DATADIR is used by some other service, variables
+ SERVICENAME is removed, if DATADIR is used by some other service, variables
DATADIR and CLEANUPDATA are removed.
The effect of variable removal is that service does not get uninstalled and
@@ -508,11 +516,11 @@ extern "C" UINT CheckDBInUse(MSIHANDLE hInstall)
wchar_t *datadir= NULL;
wchar_t *bindir=NULL;
- SC_HANDLE scm = NULL;
- ULONG bufsize = sizeof(buf);
- ULONG bufneed = 0x00;
- ULONG num_services = 0x00;
- LPENUM_SERVICE_STATUS_PROCESS info = NULL;
+ SC_HANDLE scm = NULL;
+ ULONG bufsize = sizeof(buf);
+ ULONG bufneed = 0x00;
+ ULONG num_services = 0x00;
+ LPENUM_SERVICE_STATUS_PROCESS info = NULL;
BOOL ok;
hr = WcaInitialize(hInstall, __FUNCTION__);
@@ -522,48 +530,49 @@ extern "C" UINT CheckDBInUse(MSIHANDLE hInstall)
WcaGetProperty(L"SERVICENAME", &servicename);
WcaGetProperty(L"DATADIR", &datadir);
WcaGetFormattedString(L"[INSTALLDIR]bin\\", &bindir);
+
WcaLog(LOGMSG_STANDARD,"SERVICENAME=%S, DATADIR=%S, bindir=%S",
servicename, datadir, bindir);
- scm = OpenSCManager(NULL, NULL,
- SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_CONNECT);
- if (scm == NULL)
- {
+ scm = OpenSCManager(NULL, NULL,
+ SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_CONNECT);
+ if (scm == NULL)
+ {
ExitOnFailure(E_FAIL, "OpenSCManager failed");
}
ok = EnumServicesStatusExW( scm,
- SC_ENUM_PROCESS_INFO,
+ SC_ENUM_PROCESS_INFO,
SERVICE_WIN32,
- SERVICE_STATE_ALL,
- buf,
- bufsize,
- &bufneed,
- &num_services,
- NULL,
+ SERVICE_STATE_ALL,
+ buf,
+ bufsize,
+ &bufneed,
+ &num_services,
+ NULL,
NULL);
- if(!ok)
+ if(!ok)
{
WcaLog(LOGMSG_STANDARD, "last error %d", GetLastError());
ExitOnFailure(E_FAIL, "EnumServicesStatusExW failed");
}
- info = (LPENUM_SERVICE_STATUS_PROCESS)buf;
+ info = (LPENUM_SERVICE_STATUS_PROCESS)buf;
for (ULONG i=0; i < num_services; i++)
{
- SC_HANDLE service= OpenServiceW(scm, info[i].lpServiceName,
+ SC_HANDLE service= OpenServiceW(scm, info[i].lpServiceName,
SERVICE_QUERY_CONFIG);
if (!service)
continue;
WcaLog(LOGMSG_VERBOSE, "Checking Service %S", info[i].lpServiceName);
- QUERY_SERVICE_CONFIGW *config=
+ QUERY_SERVICE_CONFIGW *config=
(QUERY_SERVICE_CONFIGW *)(void *)config_buffer;
DWORD needed;
- BOOL ok= QueryServiceConfigW(service, config,sizeof(config_buffer),
+ BOOL ok= QueryServiceConfigW(service, config,sizeof(config_buffer),
&needed);
CloseServiceHandle(service);
if (ok)
{
- CheckServiceConfig(servicename, datadir, bindir, info[i].lpServiceName,
+ CheckServiceConfig(servicename, datadir, bindir, info[i].lpServiceName,
config);
}
}
@@ -575,18 +584,18 @@ LExit:
ReleaseStr(servicename);
ReleaseStr(datadir);
ReleaseStr(bindir);
- return WcaFinalize(er);
+ return WcaFinalize(er);
}
-/*
+/*
Get maximum size of the buffer process can allocate.
this is calculated as min(RAM,virtualmemorylimit)
For 32bit processes, virtual address memory is 2GB (x86 OS)
or 4GB(x64 OS).
-
- Fragmentation due to loaded modules, heap and stack
+
+ Fragmentation due to loaded modules, heap and stack
limit maximum size of continuous memory block further,
- so that limit for 32 bit process is about 1200 on 32 bit OS
+ so that limit for 32 bit process is about 1200 on 32 bit OS
or 2000 MB on 64 bit OS(found experimentally).
*/
unsigned long long GetMaxBufferSize(unsigned long long totalPhys)
@@ -604,9 +613,9 @@ unsigned long long GetMaxBufferSize(unsigned long long totalPhys)
/*
- Checks SERVICENAME, PORT and BUFFERSIZE parameters
+ Checks SERVICENAME, PORT and BUFFERSIZE parameters
*/
-extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
+extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
{
wchar_t ServiceName[MAX_PATH]={0};
wchar_t SkipNetworking[MAX_PATH]={0};
@@ -629,7 +638,7 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
ExitOnFailure(hr, "Failed to initialize");
WcaLog(LOGMSG_STANDARD, "Initialized.");
-
+
MsiGetPropertyW (hInstall, L"SERVICENAME", ServiceName, &ServiceNameLen);
if(ServiceName[0])
{
@@ -640,10 +649,10 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
}
for(DWORD i=0; i< ServiceNameLen;i++)
{
- if(ServiceName[i] == L'\\' || ServiceName[i] == L'/'
+ if(ServiceName[i] == L'\\' || ServiceName[i] == L'/'
|| ServiceName[i]=='\'' || ServiceName[i] ==L'"')
{
- ErrorMsg =
+ ErrorMsg =
L"Invalid service name. Forward slash and back slash are forbidden."
L"Single and double quotes are also not permitted.";
goto LExit;
@@ -663,10 +672,10 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
sizeof(EscapedPassword)/sizeof(EscapedPassword[0]));
MsiSetPropertyW(hInstall,L"ESCAPEDPASSWORD",EscapedPassword);
- MsiGetPropertyW(hInstall, L"SKIPNETWORKING", SkipNetworking,
+ MsiGetPropertyW(hInstall, L"SKIPNETWORKING", SkipNetworking,
&SkipNetworkingLen);
MsiGetPropertyW(hInstall, L"PORT", Port, &PortLen);
-
+
if(SkipNetworking[0]==0 && Port[0] != 0)
{
/* Strip spaces */
@@ -699,13 +708,13 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
unsigned short port = (unsigned short)_wtoi(Port);
if (!IsPortFree(port))
{
- ErrorMsg =
+ ErrorMsg =
L"The TCP Port you selected is already in use. "
L"Please choose a different port.";
goto LExit;
}
}
-
+
MsiGetPropertyW (hInstall, L"STDCONFIG", QuickConfig, &QuickConfigLen);
if(QuickConfig[0] !=0)
{
@@ -715,7 +724,7 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
if (!GlobalMemoryStatusEx(&memstatus))
{
- WcaLog(LOGMSG_STANDARD, "Error %u from GlobalMemoryStatusEx",
+ WcaLog(LOGMSG_STANDARD, "Error %u from GlobalMemoryStatusEx",
GetLastError());
er= ERROR_INSTALL_FAILURE;
goto LExit;
@@ -769,7 +778,7 @@ LExit:
return WcaFinalize(er);
}
-/*
+/*
Sets Innodb buffer pool size (1/8 of RAM by default), if not already specified
via command line.
Calculates innodb log file size as min(50, innodb buffer pool size/8)
@@ -792,7 +801,7 @@ extern "C" UINT __stdcall PresetDatabaseProperties(MSIHANDLE hInstall)
if (BufferPoolsizeParamLen && buff[0])
{
- WcaLog(LOGMSG_STANDARD, "BUFFERPOOLSIZE=%s, len=%u",buff, BufferPoolsizeParamLen);
+ WcaLog(LOGMSG_STANDARD, "BUFFERPOOLSIZE=%S, len=%u",buff, BufferPoolsizeParamLen);
InnodbBufferPoolSize= _wtoi64(buff);
}
else
@@ -800,7 +809,7 @@ extern "C" UINT __stdcall PresetDatabaseProperties(MSIHANDLE hInstall)
memstatus.dwLength = sizeof(memstatus);
if (!GlobalMemoryStatusEx(&memstatus))
{
- WcaLog(LOGMSG_STANDARD, "Error %u from GlobalMemoryStatusEx",
+ WcaLog(LOGMSG_STANDARD, "Error %u from GlobalMemoryStatusEx",
GetLastError());
er= ERROR_INSTALL_FAILURE;
goto LExit;
@@ -809,14 +818,14 @@ extern "C" UINT __stdcall PresetDatabaseProperties(MSIHANDLE hInstall)
/* Give innodb 12.5% of available physical memory. */
InnodbBufferPoolSize= totalPhys/ONE_MB/8;
#ifdef _M_IX86
- /*
+ /*
For 32 bit processes, take virtual address space limitation into account.
Do not try to use more than 3/4 of virtual address space, even if there
is plenty of physical memory.
*/
InnodbBufferPoolSize= min(GetMaxBufferSize(totalPhys)/ONE_MB*3/4,
InnodbBufferPoolSize);
- #endif
+ #endif
swprintf_s(buff, L"%llu",InnodbBufferPoolSize);
MsiSetPropertyW(hInstall, L"BUFFERPOOLSIZE", buff);
}
@@ -871,7 +880,7 @@ static void DumpErrorLog(const wchar_t *dir)
}
/* Remove service and data directory created by CreateDatabase operation */
-extern "C" UINT __stdcall CreateDatabaseRollback(MSIHANDLE hInstall)
+extern "C" UINT __stdcall CreateDatabaseRollback(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
@@ -912,17 +921,17 @@ extern "C" UINT __stdcall CreateDatabaseRollback(MSIHANDLE hInstall)
ExecRemoveDataDirectory(dir);
}
LExit:
- return WcaFinalize(er);
+ return WcaFinalize(er);
}
/*
- Enables/disables optional "Launch upgrade wizard" checkbox at the end of
+ Enables/disables optional "Launch upgrade wizard" checkbox at the end of
installation
*/
#define MAX_VERSION_PROPERTY_SIZE 64
-extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
+extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
@@ -939,7 +948,7 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
hr = WcaInitialize(hInstall, __FUNCTION__);
WcaLog(LOGMSG_STANDARD, "Initialized.");
- if (MsiGetPropertyW(hInstall, L"ProductVersion", installerVersion, &size)
+ if (MsiGetPropertyW(hInstall, L"ProductVersion", installerVersion, &size)
!= ERROR_SUCCESS)
{
hr = HRESULT_FROM_WIN32(GetLastError());
@@ -958,12 +967,12 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
hr = HRESULT_FROM_WIN32(GetLastError());
ExitOnFailure(hr, "MsiGetPropertyW failed");
}
-
- scm = OpenSCManager(NULL, NULL,
- SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_CONNECT);
- if (scm == NULL)
- {
+
+ scm = OpenSCManager(NULL, NULL,
+ SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_CONNECT);
+ if (scm == NULL)
+ {
hr = HRESULT_FROM_WIN32(GetLastError());
ExitOnFailure(hr,"OpenSCManager failed");
}
@@ -976,7 +985,7 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
DWORD num_services;
ok= EnumServicesStatusExW(scm, SC_ENUM_PROCESS_INFO, SERVICE_WIN32,
SERVICE_STATE_ALL, buf, bufsize, &bufneed, &num_services, NULL, NULL);
- if(!ok)
+ if(!ok)
{
hr = HRESULT_FROM_WIN32(GetLastError());
ExitOnFailure(hr,"EnumServicesStatusEx failed");
@@ -986,11 +995,11 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
index=-1;
for (ULONG i=0; i < num_services; i++)
{
- SC_HANDLE service= OpenServiceW(scm, info[i].lpServiceName,
+ SC_HANDLE service= OpenServiceW(scm, info[i].lpServiceName,
SERVICE_QUERY_CONFIG);
if (!service)
continue;
- QUERY_SERVICE_CONFIGW *config=
+ QUERY_SERVICE_CONFIGW *config=
(QUERY_SERVICE_CONFIGW*)(void *)config_buffer;
DWORD needed;
ok= QueryServiceConfigW(service, config,sizeof(config_buffer),
@@ -1001,7 +1010,7 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
mysqld_service_properties props;
if (get_mysql_service_properties(config->lpBinaryPathName, &props))
continue;
- /*
+ /*
Only look for services that have mysqld.exe outside of the current
installation directory.
*/
@@ -1010,7 +1019,7 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
WcaLog(LOGMSG_STANDARD, "found service %S, major=%d, minor=%d",
info[i].lpServiceName, props.version_major, props.version_minor);
if(props.version_major < installerMajorVersion
- || (props.version_major == installerMajorVersion &&
+ || (props.version_major == installerMajorVersion &&
props.version_minor <= installerMinorVersion))
{
upgradableServiceFound= true;
@@ -1034,7 +1043,7 @@ extern "C" UINT __stdcall CheckServiceUpgrades(MSIHANDLE hInstall)
LExit:
if(scm)
CloseServiceHandle(scm);
- return WcaFinalize(er);
+ return WcaFinalize(er);
}
@@ -1058,3 +1067,269 @@ extern "C" BOOL WINAPI DllMain(
return TRUE;
}
+
+
+static wstring MakeExePath(const wchar_t *installDir, const wchar_t *basename)
+{
+ wstring path(installDir);
+ if (path.back() != L'\\')
+ path.append(L"\\");
+ path.append(L"bin\\");
+ path.append(basename);
+ path.append(L".exe");
+ return path;
+}
+
+static wstring MakeExePath(const wchar_t *installDir, string basename)
+{
+ wstring path(installDir);
+ if (path.back() != L'\\')
+ path.append(L"\\");
+ path.append(L"bin\\");
+ for (auto c : basename)
+ path+= c;
+ path.append(L".exe");
+ return path;
+}
+static wstring MakeFixSymlinksLogPath()
+{
+ wchar_t buf[MAX_PATH];
+ if (GetTempPathW(MAX_PATH, buf))
+ return wstring(buf) + L"\\mariadb_msi_fix_symlinks.log";
+ return L"";
+}
+
+static string w2s(wstring w)
+{
+ string s;
+ for (auto wc : w)
+ s += (char)wc;
+ return s;
+}
+
+/*
+ Remove symlinks if target file does not exist.
+ Create symlink if target exists, but symlink is not.
+*/
+static void fix_symlink(const wchar_t *file, const wchar_t *link,
+ const wchar_t *installdir,
+ vector<string> &rollback_actions)
+{
+ WcaLog(LOGMSG_STANDARD, "fix_symlink %S=>%S", link, file);
+
+ auto tgt= MakeExePath(installdir, file);
+ auto lnk= MakeExePath(installdir, link);
+ auto target_path= tgt.c_str();
+ auto link_path= lnk.c_str();
+
+ auto target_attr= GetFileAttributesW(target_path);
+ auto link_attr= GetFileAttributesW(link_path);
+ WcaLog(LOGMSG_STANDARD, "%S %s", target_path,
+ target_attr == INVALID_FILE_ATTRIBUTES ? "does not exist" : "exists");
+ WcaLog(LOGMSG_STANDARD, "%S %s", link_path,
+ link_attr == INVALID_FILE_ATTRIBUTES ? "does not exist" : "exists");
+
+ if (link_attr != INVALID_FILE_ATTRIBUTES &&
+ ((link_attr & FILE_ATTRIBUTE_REPARSE_POINT) == 0))
+ {
+ WcaLog(LOGMSG_STANDARD, "%S is not a symlink!", link_path);
+ return;
+ }
+
+ if (target_attr == INVALID_FILE_ATTRIBUTES)
+ {
+ if (link_attr == INVALID_FILE_ATTRIBUTES)
+ {
+ return;
+ }
+ auto ok= DeleteFileW(link_path);
+ WcaLog(LOGMSG_STANDARD, "DeleteFileW(L\"%S\") returned %s, last error %lu",
+ link_path, ok ? "success" : "error", GetLastError());
+ if (ok)
+ {
+ rollback_actions.push_back(string("create_symlink ") + w2s(link) + " " +
+ w2s(file));
+ }
+ return;
+ }
+
+ if (link_attr != INVALID_FILE_ATTRIBUTES)
+ return;
+
+ auto ok= CreateSymbolicLinkW(link_path, target_path, 0);
+ WcaLog(LOGMSG_STANDARD,
+ "CreateSymbolicLinkW(\"%S\",\"%S\", 0) returned %s, last error %d",
+ link_path, target_path, ok ? "success" : "error",
+ (int) GetLastError());
+ if (ok)
+ rollback_actions.push_back(string("delete ") + w2s(link));
+}
+
+static string rollback_info_path()
+{
+ char tmppath[MAX_PATH];
+ if (!GetTempPathA(MAX_PATH, tmppath))
+ return "";
+ string filepath(tmppath);
+ filepath.append("\\mariadb_symlink_rollback_info.tmp");
+ return filepath;
+}
+
+
+static void save_symlink_rollback_info(vector<string> rollback_info)
+{
+ std::ofstream ofs;
+ string path = rollback_info_path();
+ ofs.open(path, std::ofstream::out | std::ofstream::trunc);
+ if (!ofs.good())
+ return;
+ WcaLog(LOGMSG_STANDARD,
+ "Storing this rollback script for custom action in %s, in case installation rolls back",
+ path.c_str());
+ for (auto line : rollback_info)
+ {
+ WcaLog(LOGMSG_STANDARD, "%s", line.c_str());
+ ofs << line << "\n";
+ }
+ WcaLog(LOGMSG_STANDARD, "End of rollback script");
+}
+
+
+#include <symlinks.h>
+/* MDEV-19781 MariaDB symlinks on Windows */
+extern "C" UINT __stdcall FixSymlinksRollback(MSIHANDLE hInstall)
+{
+ HRESULT hr= S_OK;
+ UINT er= ERROR_SUCCESS;
+ wchar_t targetdir[MAX_PATH];
+ DWORD len= MAX_PATH;
+ hr= WcaInitialize(hInstall, __FUNCTION__);
+ WcaLog(LOGMSG_STANDARD, "Initialized.");
+ std::ifstream ifs;
+ std::string command;
+
+ if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
+ ERROR_SUCCESS)
+ {
+ hr= HRESULT_FROM_WIN32(GetLastError());
+ ExitOnFailure(hr, "MsiGetPropertyW failed");
+ }
+
+ ifs.open(rollback_info_path(), std::ofstream::in);
+ if (!ifs.good())
+ goto LExit;
+
+ while (ifs >> command)
+ {
+ if (command == "create_symlink")
+ {
+ string link;
+ ifs >> link;
+ auto link_path= MakeExePath(targetdir, link);
+ string file;
+ ifs >> file;
+ auto target_path= MakeExePath(targetdir, file);
+ bool ok= CreateSymbolicLinkW(link_path.c_str(), target_path.c_str(), 0);
+ WcaLog(LOGMSG_STANDARD, "CreateSymbolicLinkW(%S,%S) %s, last error %lu",
+ link_path.c_str(), target_path.c_str(), ok ? "success" : "error",
+ GetLastError());
+ }
+ else if (command == "delete")
+ {
+ string link;
+ ifs >> link;
+ auto link_path= MakeExePath(targetdir, link);
+ auto link_attr= GetFileAttributesW(link_path.c_str());
+ if (link_attr != INVALID_FILE_ATTRIBUTES &&
+ (link_attr & FILE_ATTRIBUTE_REPARSE_POINT))
+ {
+ auto ok= DeleteFileW(link_path.c_str());
+ WcaLog(LOGMSG_STANDARD, "DeleteFile(%S) %s, last error %lu",
+ link_path.c_str(), ok ? "success" : "error", GetLastError());
+ }
+ }
+ else
+ {
+ WcaLog(LOGMSG_STANDARD, "Unknown command '%s' in rollback script ",
+ command.c_str());
+ goto LExit;
+ }
+ }
+
+LExit:
+ return WcaFinalize(er);
+}
+
+
+extern "C" UINT __stdcall SymlinksUninstall(MSIHANDLE hInstall)
+{
+ HRESULT hr = S_OK;
+ UINT er = ERROR_SUCCESS;
+ wchar_t targetdir[MAX_PATH];
+ DWORD len = MAX_PATH;
+ int i;
+ hr = WcaInitialize(hInstall, __FUNCTION__);
+ WcaLog(LOGMSG_STANDARD, "Initialized.");
+
+ if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
+ ERROR_SUCCESS)
+ {
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ ExitOnFailure(hr, "MsiGetPropertyW failed");
+ }
+
+ for (i = 0; all_symlinks[i].file; i++)
+ {
+ auto link_path = MakeExePath(targetdir, all_symlinks[i].link);
+ auto link_attr = GetFileAttributesW(link_path.c_str());
+ auto filepath = link_path.c_str();
+
+ if (link_attr == INVALID_FILE_ATTRIBUTES)
+ {
+ WcaLog(LOGMSG_STANDARD, " %S does not exist",filepath);
+ continue;
+ }
+
+ if(!(link_attr & FILE_ATTRIBUTE_REPARSE_POINT))
+ {
+ WcaLog(LOGMSG_STANDARD, " %S is not a symbolic link!",filepath);
+ continue;
+ }
+ BOOL ok = DeleteFileW(filepath);
+ WcaLog(LOGMSG_STANDARD, "DeleteFile(%S) %s, last error %lu",
+ filepath, ok? "succeeded":"failed", GetLastError());
+ }
+
+LExit:
+ return WcaFinalize(er);
+}
+
+/* MDEV-19781 MariaDB symlinks on Windows */
+extern "C" UINT __stdcall FixSymlinks(MSIHANDLE hInstall)
+{
+ HRESULT hr= S_OK;
+ UINT er= ERROR_SUCCESS;
+ wchar_t targetdir[MAX_PATH];
+ vector<string> rollback_actions;
+ DWORD len= MAX_PATH;
+ int i;
+ hr= WcaInitialize(hInstall, __FUNCTION__);
+ WcaLog(LOGMSG_STANDARD, "Initialized.");
+
+ if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
+ ERROR_SUCCESS)
+ {
+ hr= HRESULT_FROM_WIN32(GetLastError());
+ ExitOnFailure(hr, "MsiGetPropertyW failed");
+ }
+
+ for (i= 0; all_symlinks[i].file; i++)
+ fix_symlink(all_symlinks[i].file, all_symlinks[i].link, targetdir,
+ rollback_actions);
+
+ save_symlink_rollback_info(rollback_actions);
+
+LExit:
+ return WcaFinalize(er);
+}
+
diff --git a/win/packaging/ca/CustomAction.def b/win/packaging/ca/CustomAction.def
index 0be77a97a08..8169968e26b 100644
--- a/win/packaging/ca/CustomAction.def
+++ b/win/packaging/ca/CustomAction.def
@@ -8,3 +8,6 @@ CheckDatabaseProperties
CheckDataDirectoryEmpty
CheckDBInUse
CheckServiceUpgrades
+FixSymlinks
+FixSymlinksRollback
+SymlinksUninstall
diff --git a/win/packaging/ca/symlinks.cc.in b/win/packaging/ca/symlinks.cc.in
new file mode 100644
index 00000000000..62ca9884af8
--- /dev/null
+++ b/win/packaging/ca/symlinks.cc.in
@@ -0,0 +1,6 @@
+#include "symlinks.h"
+symlink all_symlinks[]=
+{
+@ALL_SYMLINKS@
+{nullptr, nullptr}
+};
diff --git a/win/packaging/ca/symlinks.h b/win/packaging/ca/symlinks.h
new file mode 100644
index 00000000000..4fc1f2cb685
--- /dev/null
+++ b/win/packaging/ca/symlinks.h
@@ -0,0 +1,8 @@
+#pragma once
+struct symlink
+{
+ const wchar_t *file;
+ const wchar_t *link;
+};
+
+extern symlink all_symlinks[];
diff --git a/win/packaging/create_msi.cmake b/win/packaging/create_msi.cmake
index 58edcef3ef9..f992915cd22 100644
--- a/win/packaging/create_msi.cmake
+++ b/win/packaging/create_msi.cmake
@@ -1,3 +1,4 @@
+
MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}")
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
@@ -61,6 +62,11 @@ IF(CMAKE_INSTALL_CONFIG_NAME)
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}")
ENDIF()
+IF((MSVC_CRT_TYPE MATCHES "/MD") AND (NOT VCRedist_MSM))
+ # Something was wrong, we package VC runtime merge modules
+ # when compiled with dynamic C runtime.
+ MESSAGE(FATAL_ERROR "Redistributable merge module was not found")
+ENDIF()
SET(COMPONENTS_ALL "${CPACK_COMPONENTS_ALL}")
FOREACH(comp ${COMPONENTS_ALL})
@@ -384,9 +390,13 @@ EXECUTE_PROCESS(
${EXTRA_CANDLE_ARGS}
)
+IF(VCRedist_MSM)
+ SET(SILENCE_VCREDIST_MSM_WARNINGS -sice:ICE82 -sice:ICE03)
+ENDIF()
+
EXECUTE_PROCESS(
COMMAND ${LIGHT_EXECUTABLE} -v -ext WixUIExtension -ext WixUtilExtension
- -ext WixFirewallExtension -sice:ICE61
+ -ext WixFirewallExtension -sice:ICE61 ${SILENCE_VCREDIST_MSM_WARNINGS}
mysql_server.wixobj extra.wixobj -out ${CPACK_PACKAGE_FILE_NAME}.msi
${EXTRA_LIGHT_ARGS}
)
diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in
index ee4753d099f..d4fcce17445 100644
--- a/win/packaging/extra.wxs.in
+++ b/win/packaging/extra.wxs.in
@@ -279,7 +279,7 @@
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next">
<Publish Property="WarningText" Value="Passwords do not match."><![CDATA[PASSWORD <> RootPasswordConfirm]]></Publish>
<Publish Event="SpawnDialog" Value="WarningDlg"><![CDATA[WarningText <>""]]></Publish>
- <Publish Property="SERVICENAME" Value="MySQL">NOT SERVICENAME AND NOT WarningText</Publish>
+ <Publish Property="SERVICENAME" Value="MariaDB">NOT SERVICENAME AND NOT WarningText</Publish>
<Publish Event="NewDialog" Value="ServicePortDlg"><![CDATA[WarningText=""]]></Publish>
<Condition Action="enable"><![CDATA[NOT ModifyRootPassword OR PASSWORD]]> </Condition>
<Condition Action="disable"><![CDATA[ModifyRootPassword AND (NOT PASSWORD)]]> </Condition>
@@ -650,11 +650,37 @@
</Feature>
<?endif ?>
+
+ <?if "@VCRedist_MSM@" != "" ?>
+ <!-- VC runtime merge module -->
+ <DirectoryRef Id="TARGETDIR">
+ <Merge Id="VCRedist" SourceFile="@VCRedist_MSM@" DiskId="1" Language="0"/>
+ </DirectoryRef>
+ <Feature Id="VCRedist" Title="Visual C++ Runtime" AllowAdvertise="no" Display="hidden" Level="1">
+ <MergeRef Id="VCRedist"/>
+ </Feature>
+ <?endif?>
- <!-- Custom action, call mysql_install_db -->
- <SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="SKIPNETWORKING" Value="--skip-networking" >SKIPNETWORKING</SetProperty>
- <SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="ALLOWREMOTEROOTACCESS" Value="--allow-remote-root-access">ALLOWREMOTEROOTACCESS</SetProperty>
- <SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="DEFAULTUSER" Value="--default-user">DEFAULTUSER</SetProperty>
+ <!-- Custom action, create symlinks -->
+ <CustomAction Id="Symlinks.SetProperty" Return="check" Property="Symlinks" Value="[INSTALLDIR]" />
+ <CustomAction Id="Symlinks" BinaryKey="wixca.dll" DllEntry="FixSymlinks" Execute="deferred" Impersonate="no" Return="ignore"/>
+ <CustomAction Id="SymlinksRollback.SetProperty" Return="check" Property="SymlinksRollback" Value="[INSTALLDIR]" />
+ <CustomAction Id="SymlinksRollback" BinaryKey="wixca.dll" DllEntry="FixSymlinksRollback" Execute="rollback" Impersonate="no" Return="ignore"/>
+ <CustomAction Id="SymlinksUninstall.SetProperty" Return="check" Property="SymlinksUninstall" Value="[INSTALLDIR]" />
+ <CustomAction Id="SymlinksUninstall" BinaryKey="wixca.dll" DllEntry="SymlinksUninstall" Execute="deferred" Impersonate="no" Return="ignore"/>
+ <InstallExecuteSequence>
+ <Custom Action="Symlinks.SetProperty" Before="Symlinks">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
+ <Custom Action="Symlinks" After="SymlinksRollback">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
+ <Custom Action="SymlinksRollback.SetProperty" Before="SymlinksRollback">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
+ <Custom Action="SymlinksRollback" After="InstallFiles">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
+ <Custom Action="SymlinksUninstall.SetProperty" Before="SymlinksUninstall">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
+ <Custom Action="SymlinksUninstall" Before="RemoveFiles">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
+ </InstallExecuteSequence>
+
+ <!-- Custom action, call mysql_install_db -->
+ <SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="SKIPNETWORKING" Value="--skip-networking" >SKIPNETWORKING</SetProperty>
+ <SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="ALLOWREMOTEROOTACCESS" Value="--allow-remote-root-access">ALLOWREMOTEROOTACCESS</SetProperty>
+ <SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="DEFAULTUSER" Value="--default-user">DEFAULTUSER</SetProperty>
<CustomAction Id='CheckDatabaseProperties' BinaryKey='wixca.dll' DllEntry='CheckDatabaseProperties' />
<CustomAction Id='PresetDatabaseProperties' BinaryKey='wixca.dll' DllEntry='PresetDatabaseProperties' />
<CustomAction Id="CreateDatabaseCommand" Property="CreateDatabase"
diff --git a/win/packaging/mysql_server.wxs.in b/win/packaging/mysql_server.wxs.in
index 6a157c56347..15a2810bfcd 100644
--- a/win/packaging/mysql_server.wxs.in
+++ b/win/packaging/mysql_server.wxs.in
@@ -12,7 +12,7 @@
Keywords='Installer'
Description='MariaDB Server'
Manufacturer='@MANUFACTURER@'
- InstallerVersion='200'
+ InstallerVersion='301'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252'
diff --git a/win/upgrade_wizard/CMakeLists.txt b/win/upgrade_wizard/CMakeLists.txt
index f4148ee98d2..7d0e774b968 100644
--- a/win/upgrade_wizard/CMakeLists.txt
+++ b/win/upgrade_wizard/CMakeLists.txt
@@ -23,21 +23,27 @@ IF(NOT MFC_FOUND)
ENDIF()
RETURN()
ENDIF()
+
IF(MSVC_CRT_TYPE MATCHES "/MD")
- # MFC should be dynamically linked
- SET(CMAKE_MFC_FLAG 2)
+ # FORCE static CRT and MFC for upgrade wizard,
+ # so we do not have to redistribute MFC.
+ FORCE_STATIC_CRT()
+ SET(UPGRADE_WIZARD_SOURCES ${CMAKE_SOURCE_DIR}/sql/winservice.c)
ELSE()
- # MFC should be statically linked
- SET(CMAKE_MFC_FLAG 1)
+ SET(UPGRADE_WIZARD_LINK_LIBRARIES winservice)
ENDIF()
+
+# MFC should be statically linked
+SET(CMAKE_MFC_FLAG 1)
+
# Enable exception handling (avoids warnings)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc -DNO_WARN_MBCS_MFC_DEPRECATION")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
MYSQL_ADD_EXECUTABLE(mysql_upgrade_wizard
- upgrade.cpp upgradeDlg.cpp upgrade.rc
+ upgrade.cpp upgradeDlg.cpp upgrade.rc ${UPGRADE_WIZARD_SOURCES}
COMPONENT Server)
-TARGET_LINK_LIBRARIES(mysql_upgrade_wizard winservice)
+TARGET_LINK_LIBRARIES(mysql_upgrade_wizard ${UPGRADE_WIZARD_LINK_LIBRARIES})
# upgrade_wizard is Windows executable, set WIN32_EXECUTABLE so it does not
# create a console.
SET_TARGET_PROPERTIES(mysql_upgrade_wizard PROPERTIES WIN32_EXECUTABLE 1)
diff --git a/wsrep-lib b/wsrep-lib
new file mode 160000
+Subproject 8bfce04189671eb1f06e0fa83dff8c880f31088
diff --git a/wsrep/CMakeLists.txt b/wsrep/CMakeLists.txt
deleted file mode 100644
index b8abcaf9613..00000000000
--- a/wsrep/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2012, Codership Oy. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
-
-SET(WSREP_SOURCES wsrep_gtid.c wsrep_uuid.c wsrep_loader.c wsrep_dummy.c)
-
-IF(NOT WITH_INNOBASE_STORAGE_ENGINE)
- MESSAGE(WARNING "WSRep is enabled, but innodb is not. This configuration is not supported")
-ENDIF()
-
-ADD_CONVENIENCE_LIBRARY(wsrep ${WSREP_SOURCES})
-DTRACE_INSTRUMENT(wsrep)
-
-#ADD_EXECUTABLE(listener wsrep_listener.c ${WSREP_SOURCES})
-#TARGET_LINK_LIBRARIES(listener ${CMAKE_DL_LIBS})
diff --git a/wsrep/wsrep_api.h b/wsrep/wsrep_api.h
deleted file mode 100644
index e362e71f829..00000000000
--- a/wsrep/wsrep_api.h
+++ /dev/null
@@ -1,1117 +0,0 @@
-/* Copyright (C) 2009-2013 Codership Oy <info@codership.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA.
- */
-
-/*!
- @file wsrep API declaration.
-
- HOW TO READ THIS FILE.
-
- Due to C language rules this header layout doesn't lend itself to intuitive
- reading. So here's the scoop: in the end this header declares two main types:
-
- * struct wsrep_init_args
-
- and
-
- * struct wsrep
-
- wsrep_init_args contains initialization parameters for wsrep provider like
- names, addresses, etc. and pointers to callbacks. The callbacks will be called
- by provider when it needs to do something application-specific, like log a
- message or apply a writeset. It should be passed to init() call from
- wsrep API. It is an application part of wsrep API contract.
-
- struct wsrep is the interface to wsrep provider. It contains all wsrep API
- calls. It is a provider part of wsrep API contract.
-
- Finally, wsrep_load() method loads (dlopens) wsrep provider library. It is
- defined in wsrep_loader.c unit and is part of libwsrep.a (which is not a
- wsrep provider, but a convenience library).
-
- wsrep_unload() does the reverse.
-
-*/
-#ifndef WSREP_H
-#define WSREP_H
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**************************************************************************
- * *
- * wsrep replication API *
- * *
- **************************************************************************/
-
-#define WSREP_INTERFACE_VERSION "25"
-
-/*! Empty backend spec */
-#define WSREP_NONE "none"
-
-
-/*!
- * @brief log severity levels, passed as first argument to log handler
- */
-typedef enum wsrep_log_level
-{
- WSREP_LOG_FATAL, //!< Unrecoverable error, application must quit.
- WSREP_LOG_ERROR, //!< Operation failed, must be repeated.
- WSREP_LOG_WARN, //!< Unexpected condition, but no operational failure.
- WSREP_LOG_INFO, //!< Informational message.
- WSREP_LOG_DEBUG //!< Debug message. Shows only of compiled with debug.
-} wsrep_log_level_t;
-
-/*!
- * @brief error log handler
- *
- * All messages from wsrep provider are directed to this
- * handler, if present.
- *
- * @param level log level
- * @param message log message
- */
-typedef void (*wsrep_log_cb_t)(wsrep_log_level_t, const char *);
-
-
-/*!
- * Certain provider capabilities application may want to know about
- */
-#define WSREP_CAP_MULTI_MASTER ( 1ULL << 0 )
-#define WSREP_CAP_CERTIFICATION ( 1ULL << 1 )
-#define WSREP_CAP_PARALLEL_APPLYING ( 1ULL << 2 )
-#define WSREP_CAP_TRX_REPLAY ( 1ULL << 3 )
-#define WSREP_CAP_ISOLATION ( 1ULL << 4 )
-#define WSREP_CAP_PAUSE ( 1ULL << 5 )
-#define WSREP_CAP_CAUSAL_READS ( 1ULL << 6 )
-#define WSREP_CAP_CAUSAL_TRX ( 1ULL << 7 )
-#define WSREP_CAP_INCREMENTAL_WRITESET ( 1ULL << 8 )
-#define WSREP_CAP_SESSION_LOCKS ( 1ULL << 9 )
-#define WSREP_CAP_DISTRIBUTED_LOCKS ( 1ULL << 10 )
-#define WSREP_CAP_CONSISTENCY_CHECK ( 1ULL << 11 )
-#define WSREP_CAP_UNORDERED ( 1ULL << 12 )
-#define WSREP_CAP_ANNOTATION ( 1ULL << 13 )
-#define WSREP_CAP_PREORDERED ( 1ULL << 14 )
-
-
-/*!
- * Writeset flags
- *
- * COMMIT the writeset and all preceding writesets must be committed
- * ROLLBACK all preceding writesets in a transaction must be rolled back
- * ISOLATION the writeset must be applied AND committed in isolation
- * PA_UNSAFE the writeset cannot be applied in parallel
- * COMMUTATIVE the order in which the writeset is applied does not matter
- * NATIVE the writeset contains another writeset in this provider format
- *
- * Note that some of the flags are mutually exclusive (e.g. COMMIT and
- * ROLLBACK).
- */
-#define WSREP_FLAG_COMMIT ( 1ULL << 0 )
-#define WSREP_FLAG_ROLLBACK ( 1ULL << 1 )
-#define WSREP_FLAG_ISOLATION ( 1ULL << 2 )
-#define WSREP_FLAG_PA_UNSAFE ( 1ULL << 3 )
-#define WSREP_FLAG_COMMUTATIVE ( 1ULL << 4 )
-#define WSREP_FLAG_NATIVE ( 1ULL << 5 )
-
-
-typedef uint64_t wsrep_trx_id_t; //!< application transaction ID
-typedef uint64_t wsrep_conn_id_t; //!< application connection ID
-typedef int64_t wsrep_seqno_t; //!< sequence number of a writeset, etc.
-#ifdef __cplusplus
-typedef bool wsrep_bool_t;
-#else
-typedef _Bool wsrep_bool_t; //!< should be the same as standard (C99) bool
-#endif /* __cplusplus */
-
-/*! undefined seqno */
-#define WSREP_SEQNO_UNDEFINED (-1)
-
-
-/*! wsrep provider status codes */
-typedef enum wsrep_status
-{
- WSREP_OK = 0, //!< success
- WSREP_WARNING, //!< minor warning, error logged
- WSREP_TRX_MISSING, //!< transaction is not known by wsrep
- WSREP_TRX_FAIL, //!< transaction aborted, server can continue
- WSREP_BF_ABORT, //!< trx was victim of brute force abort
- WSREP_SIZE_EXCEEDED, //!< data exceeded maximum supported size
- WSREP_CONN_FAIL, //!< error in client connection, must abort
- WSREP_NODE_FAIL, //!< error in node state, wsrep must reinit
- WSREP_FATAL, //!< fatal error, server must abort
- WSREP_NOT_IMPLEMENTED //!< feature not implemented
-} wsrep_status_t;
-
-
-/*! wsrep callbacks status codes */
-typedef enum wsrep_cb_status
-{
- WSREP_CB_SUCCESS = 0, //!< success (as in "not critical failure")
- WSREP_CB_FAILURE //!< critical failure (consistency violation)
- /* Technically, wsrep provider has no use for specific failure codes since
- * there is nothing it can do about it but abort execution. Therefore any
- * positive number shall indicate a critical failure. Optionally that value
- * may be used by provider to come to a consensus about state consistency
- * in a group of nodes. */
-} wsrep_cb_status_t;
-
-
-/*!
- * UUID type - for all unique IDs
- */
-typedef struct wsrep_uuid {
- uint8_t data[16];
-} wsrep_uuid_t;
-
-/*! Undefined UUID */
-static const wsrep_uuid_t WSREP_UUID_UNDEFINED = {{0,}};
-
-/*! UUID string representation length, terminating '\0' not included */
-#define WSREP_UUID_STR_LEN 36
-
-/*!
- * Scan UUID from string
- * @return length of UUID string representation or negative error code
- */
-extern int
-wsrep_uuid_scan (const char* str, size_t str_len, wsrep_uuid_t* uuid);
-
-/*!
- * Print UUID to string
- * @return length of UUID string representation or negative error code
- */
-extern int
-wsrep_uuid_print (const wsrep_uuid_t* uuid, char* str, size_t str_len);
-
-#define WSREP_MEMBER_NAME_LEN 32 //!< maximum logical member name length
-#define WSREP_INCOMING_LEN 256 //!< max Domain Name length + 0x00
-
-
-/*!
- * Global transaction identifier
- */
-typedef struct wsrep_gtid
-{
- wsrep_uuid_t uuid; /*!< History UUID */
- wsrep_seqno_t seqno; /*!< Sequence number */
-} wsrep_gtid_t;
-
-/*! Undefined GTID */
-static const wsrep_gtid_t WSREP_GTID_UNDEFINED = {{{0, }}, -1};
-
-/*! Minimum number of bytes guaranteed to store GTID string representation,
- * terminating '\0' not included (36 + 1 + 20) */
-#define WSREP_GTID_STR_LEN 57
-
-
-/*!
- * Scan GTID from string
- * @return length of GTID string representation or negative error code
- */
-extern int
-wsrep_gtid_scan(const char* str, size_t str_len, wsrep_gtid_t* gtid);
-
-/*!
- * Print GTID to string
- * @return length of GTID string representation or negative error code
- */
-extern int
-wsrep_gtid_print(const wsrep_gtid_t* gtid, char* str, size_t str_len);
-
-
-/*!
- * Transaction meta data
- */
-typedef struct wsrep_trx_meta
-{
- wsrep_gtid_t gtid; /*!< Global transaction identifier */
- wsrep_seqno_t depends_on; /*!< Sequence number part of the last transaction
- this transaction depends on */
-} wsrep_trx_meta_t;
-
-
-/*!
- * member status
- */
-typedef enum wsrep_member_status {
- WSREP_MEMBER_UNDEFINED, //!< undefined state
- WSREP_MEMBER_JOINER, //!< incomplete state, requested state transfer
- WSREP_MEMBER_DONOR, //!< complete state, donates state transfer
- WSREP_MEMBER_JOINED, //!< complete state
- WSREP_MEMBER_SYNCED, //!< complete state, synchronized with group
- WSREP_MEMBER_ERROR, //!< this and above is provider-specific error code
- WSREP_MEMBER_MAX
-} wsrep_member_status_t;
-
-/*!
- * static information about a group member (some fields are tentative yet)
- */
-typedef struct wsrep_member_info {
- wsrep_uuid_t id; //!< group-wide unique member ID
- char name[WSREP_MEMBER_NAME_LEN]; //!< human-readable name
- char incoming[WSREP_INCOMING_LEN]; //!< address for client requests
-} wsrep_member_info_t;
-
-/*!
- * group status
- */
-typedef enum wsrep_view_status {
- WSREP_VIEW_PRIMARY, //!< primary group configuration (quorum present)
- WSREP_VIEW_NON_PRIMARY, //!< non-primary group configuration (quorum lost)
- WSREP_VIEW_DISCONNECTED, //!< not connected to group, retrying.
- WSREP_VIEW_MAX
-} wsrep_view_status_t;
-
-/*!
- * view of the group
- */
-typedef struct wsrep_view_info {
- wsrep_gtid_t state_id; //!< global state ID
- wsrep_seqno_t view; //!< global view number
- wsrep_view_status_t status; //!< view status
- wsrep_bool_t state_gap; //!< gap between global and local states
- int my_idx; //!< index of this member in the view
- int memb_num; //!< number of members in the view
- int proto_ver; //!< application protocol agreed on the view
- wsrep_member_info_t members[1];//!< array of member information
-} wsrep_view_info_t;
-
-/*!
- * Magic string to tell provider to engage into trivial (empty) state transfer.
- * No data will be passed, but the node shall be considered JOINED.
- * Should be passed in sst_req parameter of wsrep_view_cb_t.
- */
-#define WSREP_STATE_TRANSFER_TRIVIAL "trivial"
-
-/*!
- * Magic string to tell provider not to engage in state transfer at all.
- * The member will stay in WSREP_MEMBER_UNDEFINED state but will keep on
- * receiving all writesets.
- * Should be passed in sst_req parameter of wsrep_view_cb_t.
- */
-#define WSREP_STATE_TRANSFER_NONE "none"
-
-/*!
- * @brief group view handler
- *
- * This handler is called in total order corresponding to the group
- * configuration change. It is to provide a vital information about
- * new group view. If view info indicates existence of discontinuity
- * between group and member states, state transfer request message
- * should be filled in by the callback implementation.
- *
- * @note Currently it is assumed that sst_req is allocated using
- * malloc()/calloc()/realloc() and it will be freed by
- * wsrep implementation.
- *
- * @param app_ctx application context
- * @param recv_ctx receiver context
- * @param view new view on the group
- * @param state current state
- * @param state_len lenght of current state
- * @param sst_req location to store SST request
- * @param sst_req_len location to store SST request length or error code,
- * value of 0 means no SST.
- */
-typedef enum wsrep_cb_status (*wsrep_view_cb_t) (
- void* app_ctx,
- void* recv_ctx,
- const wsrep_view_info_t* view,
- const char* state,
- size_t state_len,
- void** sst_req,
- size_t* sst_req_len
-);
-
-
-/*!
- * @brief apply callback
- *
- * This handler is called from wsrep library to apply replicated writeset
- * Must support brute force applying for multi-master operation
- *
- * @param recv_ctx receiver context pointer provided by the application
- * @param data data buffer containing the writeset
- * @param size data buffer size
- * @param flags WSREP_FLAG_... flags
- * @param meta transaction meta data of the writeset to be applied
- *
- * @return success code:
- * @retval WSREP_OK
- * @retval WSREP_NOT_IMPLEMENTED appl. does not support the writeset format
- * @retval WSREP_ERROR failed to apply the writeset
- */
-typedef enum wsrep_cb_status (*wsrep_apply_cb_t) (
- void* recv_ctx,
- const void* data,
- size_t size,
- uint32_t flags,
- const wsrep_trx_meta_t* meta
-);
-
-
-/*!
- * @brief commit callback
- *
- * This handler is called to commit the changes made by apply callback.
- *
- * @param recv_ctx receiver context pointer provided by the application
- * @param flags WSREP_FLAG_... flags
- * @param meta transaction meta data of the writeset to be committed
- * @param exit set to true to exit recv loop
- * @param commit true - commit writeset, false - rollback writeset
- *
- * @return success code:
- * @retval WSREP_OK
- * @retval WSREP_ERROR call failed
- */
-typedef enum wsrep_cb_status (*wsrep_commit_cb_t) (
- void* recv_ctx,
- uint32_t flags,
- const wsrep_trx_meta_t* meta,
- wsrep_bool_t* exit,
- wsrep_bool_t commit
-);
-
-
-/*!
- * @brief unordered callback
- *
- * This handler is called to execute unordered actions (actions that need not
- * to be executed in any particular order) attached to writeset.
- *
- * @param recv_ctx receiver context pointer provided by the application
- * @param data data buffer containing the writeset
- * @param size data buffer size
- */
-typedef enum wsrep_cb_status (*wsrep_unordered_cb_t) (
- void* recv_ctx,
- const void* data,
- size_t size
-);
-
-
-/*!
- * @brief a callback to donate state snapshot
- *
- * This handler is called from wsrep library when it needs this node
- * to deliver state to a new cluster member.
- * No state changes will be committed for the duration of this call.
- * Wsrep implementation may provide internal state to be transmitted
- * to new cluster member for initial state.
- *
- * @param app_ctx application context
- * @param recv_ctx receiver context
- * @param msg state transfer request message
- * @param msg_len state transfer request message length
- * @param gtid current state ID on this node
- * @param state current wsrep internal state buffer
- * @param state_len current wsrep internal state buffer len
- * @param bypass bypass snapshot transfer, only transfer uuid:seqno pair
- */
-typedef enum wsrep_cb_status (*wsrep_sst_donate_cb_t) (
- void* app_ctx,
- void* recv_ctx,
- const void* msg,
- size_t msg_len,
- const wsrep_gtid_t* state_id,
- const char* state,
- size_t state_len,
- wsrep_bool_t bypass
-);
-
-
-/*!
- * @brief a callback to signal application that wsrep state is synced
- * with cluster
- *
- * This callback is called after wsrep library has got in sync with
- * rest of the cluster.
- *
- * @param app_ctx application context
- */
-typedef void (*wsrep_synced_cb_t) (void* app_ctx);
-
-
-/*!
- * Initialization parameters for wsrep provider.
- */
-struct wsrep_init_args
-{
- void* app_ctx; //!< Application context for callbacks
-
- /* Configuration parameters */
- const char* node_name; //!< Symbolic name of this node (e.g. hostname)
- const char* node_address; //!< Address to be used by wsrep provider
- const char* node_incoming; //!< Address for incoming client connections
- const char* data_dir; //!< Directory where wsrep files are kept if any
- const char* options; //!< Provider-specific configuration string
- int proto_ver; //!< Max supported application protocol version
-
- /* Application initial state information. */
- const wsrep_gtid_t* state_id; //!< Application state GTID
- const char* state; //!< Initial state for wsrep provider
- size_t state_len; //!< Length of state buffer
-
- /* Application callbacks */
- wsrep_log_cb_t logger_cb; //!< logging handler
- wsrep_view_cb_t view_handler_cb; //!< group view change handler
-
- /* Applier callbacks */
- wsrep_apply_cb_t apply_cb; //!< apply callback
- wsrep_commit_cb_t commit_cb; //!< commit callback
- wsrep_unordered_cb_t unordered_cb; //!< callback for unordered actions
-
- /* State Snapshot Transfer callbacks */
- wsrep_sst_donate_cb_t sst_donate_cb; //!< starting to donate
- wsrep_synced_cb_t synced_cb; //!< synced with group
-};
-
-
-/*! Type of the stats variable value in struct wsrep_status_var */
-typedef enum wsrep_var_type
-{
- WSREP_VAR_STRING, //!< pointer to null-terminated string
- WSREP_VAR_INT64, //!< int64_t
- WSREP_VAR_DOUBLE //!< double
-}
-wsrep_var_type_t;
-
-/*! Generalized stats variable representation */
-struct wsrep_stats_var
-{
- const char* name; //!< variable name
- wsrep_var_type_t type; //!< variable value type
- union {
- int64_t _integer64;
- double _double;
- const char* _string;
- } value; //!< variable value
-};
-
-
-/*! Abstract data buffer structure */
-typedef struct wsrep_buf
-{
- const void* ptr; /*!< Pointer to data buffer */
- size_t len; /*!< Length of buffer */
-} wsrep_buf_t;
-
-/*! Key struct used to pass certification keys for transaction handling calls.
- * A key consists of zero or more key parts. */
-typedef struct wsrep_key
-{
- const wsrep_buf_t* key_parts; /*!< Array of key parts */
- size_t key_parts_num; /*!< Number of key parts */
-} wsrep_key_t;
-
-/*! Key type:
- * EXCLUSIVE conflicts with any key type
- * SEMI reserved. If not supported, should be interpeted as EXCLUSIVE
- * SHARED conflicts only with EXCLUSIVE keys */
-typedef enum wsrep_key_type
-{
- WSREP_KEY_SHARED = 0,
- WSREP_KEY_SEMI,
- WSREP_KEY_EXCLUSIVE
-} wsrep_key_type_t;
-
-/*! Data type:
- * ORDERED state modification event that should be applied and committed
- * in order.
- * UNORDERED some action that does not modify state and execution of which is
- * optional and does not need to happen in order.
- * ANNOTATION (human readable) writeset annotation. */
-typedef enum wsrep_data_type
-{
- WSREP_DATA_ORDERED = 0,
- WSREP_DATA_UNORDERED,
- WSREP_DATA_ANNOTATION
-} wsrep_data_type_t;
-
-
-/*! Transaction handle struct passed for wsrep transaction handling calls */
-typedef struct wsrep_ws_handle
-{
- wsrep_trx_id_t trx_id; //!< transaction ID
- void* opaque; //!< opaque provider transaction context data
-} wsrep_ws_handle_t;
-
-/*!
- * @brief Helper method to reset trx writeset handle state when trx id changes
- *
- * Instead of passing wsrep_ws_handle_t directly to wsrep calls,
- * wrapping handle with this call offloads bookkeeping from
- * application.
- */
-static inline wsrep_ws_handle_t* wsrep_ws_handle_for_trx(
- wsrep_ws_handle_t* ws_handle,
- wsrep_trx_id_t trx_id)
-{
- if (ws_handle->trx_id != trx_id)
- {
- ws_handle->trx_id = trx_id;
- ws_handle->opaque = NULL;
- }
- return ws_handle;
-}
-
-
-/*!
- * A handle for processing preordered actions.
- * Must be initialized to WSREP_PO_INITIALIZER before use.
- */
-typedef struct wsrep_po_handle { void* opaque; } wsrep_po_handle_t;
-
-static const wsrep_po_handle_t WSREP_PO_INITIALIZER = { NULL };
-
-
-typedef struct wsrep wsrep_t;
-/*!
- * wsrep interface for dynamically loadable libraries
- */
-struct wsrep {
-
- const char *version; //!< interface version string
-
- /*!
- * @brief Initializes wsrep provider
- *
- * @param wsrep provider handle
- * @param args wsrep initialization parameters
- */
- wsrep_status_t (*init) (wsrep_t* wsrep,
- const struct wsrep_init_args* args);
-
- /*!
- * @brief Returns provider capabilities flag bitmap
- *
- * @param wsrep provider handle
- */
- uint64_t (*capabilities) (wsrep_t* wsrep);
-
- /*!
- * @brief Passes provider-specific configuration string to provider.
- *
- * @param wsrep provider handle
- * @param conf configuration string
- *
- * @retval WSREP_OK configuration string was parsed successfully
- * @retval WSREP_WARNING could't not parse conf string, no action taken
- */
- wsrep_status_t (*options_set) (wsrep_t* wsrep, const char* conf);
-
- /*!
- * @brief Returns provider-specific string with current configuration values.
- *
- * @param wsrep provider handle
- *
- * @return a dynamically allocated string with current configuration
- * parameter values
- */
- char* (*options_get) (wsrep_t* wsrep);
-
- /*!
- * @brief Opens connection to cluster
- *
- * Returns when either node is ready to operate as a part of the clsuter
- * or fails to reach operating status.
- *
- * @param wsrep provider handle
- * @param cluster_name unique symbolic cluster name
- * @param cluster_url URL-like cluster address (backend://address)
- * @param state_donor name of the node to be asked for state transfer.
- * @param bootstrap a flag to request initialization of a new wsrep
- * service rather then a connection to the existing one.
- * clister_url may still carry important initialization
- * parameters, like backend spec and/or listen address.
- */
- wsrep_status_t (*connect) (wsrep_t* wsrep,
- const char* cluster_name,
- const char* cluster_url,
- const char* state_donor,
- wsrep_bool_t bootstrap);
-
- /*!
- * @brief Closes connection to cluster.
- *
- * If state_uuid and/or state_seqno is not NULL, will store final state
- * in there.
- *
- * @param wsrep this wsrep handler
- */
- wsrep_status_t (*disconnect)(wsrep_t* wsrep);
-
- /*!
- * @brief start receiving replication events
- *
- * This function never returns
- *
- * @param wsrep provider handle
- * @param recv_ctx receiver context
- */
- wsrep_status_t (*recv)(wsrep_t* wsrep, void* recv_ctx);
-
- /*!
- * @brief Replicates/logs result of transaction to other nodes and allocates
- * required resources.
- *
- * Must be called before transaction commit. Returns success code, which
- * caller must check.
- * In case of WSREP_OK, starts commit critical section, transaction can
- * commit. Otherwise transaction must rollback.
- *
- * @param wsrep provider handle
- * @param ws_handle writeset of committing transaction
- * @param conn_id connection ID
- * @param flags fine tuning the replication WSREP_FLAG_*
- * @param meta transaction meta data
- *
- * @retval WSREP_OK cluster-wide commit succeeded
- * @retval WSREP_TRX_FAIL must rollback transaction
- * @retval WSREP_CONN_FAIL must close client connection
- * @retval WSREP_NODE_FAIL must close all connections and reinit
- */
- wsrep_status_t (*pre_commit)(wsrep_t* wsrep,
- wsrep_conn_id_t conn_id,
- wsrep_ws_handle_t* ws_handle,
- uint32_t flags,
- wsrep_trx_meta_t* meta);
-
- /*!
- * @brief Releases resources after transaction commit.
- *
- * Ends commit critical section.
- *
- * @param wsrep provider handle
- * @param ws_handle writeset of committing transaction
- * @retval WSREP_OK post_commit succeeded
- */
- wsrep_status_t (*post_commit) (wsrep_t* wsrep,
- wsrep_ws_handle_t* ws_handle);
-
- /*!
- * @brief Releases resources after transaction rollback.
- *
- * @param wsrep provider handle
- * @param ws_handle writeset of committing transaction
- * @retval WSREP_OK post_rollback succeeded
- */
- wsrep_status_t (*post_rollback)(wsrep_t* wsrep,
- wsrep_ws_handle_t* ws_handle);
-
- /*!
- * @brief Replay trx as a slave writeset
- *
- * If local trx has been aborted by brute force, and it has already
- * replicated before this abort, we must try if we can apply it as
- * slave trx. Note that slave nodes see only trx writesets and certification
- * test based on write set content can be different to DBMS lock conflicts.
- *
- * @param wsrep provider handle
- * @param ws_handle writeset of committing transaction
- * @param trx_ctx transaction context
- *
- * @retval WSREP_OK cluster commit succeeded
- * @retval WSREP_TRX_FAIL must rollback transaction
- * @retval WSREP_BF_ABORT brute force abort happened after trx replicated
- * must rollback transaction and try to replay
- * @retval WSREP_CONN_FAIL must close client connection
- * @retval WSREP_NODE_FAIL must close all connections and reinit
- */
- wsrep_status_t (*replay_trx)(wsrep_t* wsrep,
- wsrep_ws_handle_t* ws_handle,
- void* trx_ctx);
-
- /*!
- * @brief Abort pre_commit() call of another thread.
- *
- * It is possible, that some high-priority transaction needs to abort
- * another transaction which is in pre_commit() call waiting for resources.
- *
- * The kill routine checks that abort is not attmpted against a transaction
- * which is front of the caller (in total order).
- *
- * @param wsrep provider handle
- * @param bf_seqno seqno of brute force trx, running this cancel
- * @param victim_trx transaction to be aborted, and which is committing
- *
- * @retval WSREP_OK abort secceded
- * @retval WSREP_WARNING abort failed
- */
- wsrep_status_t (*abort_pre_commit)(wsrep_t* wsrep,
- wsrep_seqno_t bf_seqno,
- wsrep_trx_id_t victim_trx);
-
- /*!
- * @brief Appends a row reference to transaction writeset
- *
- * Both copy flag and key_type can be ignored by provider (key type
- * interpreted as WSREP_KEY_EXCLUSIVE).
- *
- * @param wsrep provider handle
- * @param ws_handle writeset handle
- * @param keys array of keys
- * @param count length of the array of keys
- * @param type type ot the key
- * @param copy can be set to FALSE if keys persist through commit.
- */
- wsrep_status_t (*append_key)(wsrep_t* wsrep,
- wsrep_ws_handle_t* ws_handle,
- const wsrep_key_t* keys,
- size_t count,
- enum wsrep_key_type type,
- wsrep_bool_t copy);
-
- /*!
- * @brief Appends data to transaction writeset
- *
- * This method can be called any time before commit and it
- * appends a number of data buffers to transaction writeset.
- *
- * Both copy and unordered flags can be ignored by provider.
- *
- * @param wsrep provider handle
- * @param ws_handle writeset handle
- * @param data array of data buffers
- * @param count buffer count
- * @param type type of data
- * @param copy can be set to FALSE if data persists through commit.
- */
- wsrep_status_t (*append_data)(wsrep_t* wsrep,
- wsrep_ws_handle_t* ws_handle,
- const struct wsrep_buf* data,
- size_t count,
- enum wsrep_data_type type,
- wsrep_bool_t copy);
-
- /*!
- * @brief Get causal ordering for read operation
- *
- * This call will block until causal ordering with all possible
- * preceding writes in the cluster is guaranteed. If pointer to
- * gtid is non-null, the call stores the global transaction ID
- * of the last transaction which is guaranteed to be ordered
- * causally before this call.
- *
- * @param wsrep provider handle
- * @param gtid location to store GTID
- */
- wsrep_status_t (*causal_read)(wsrep_t* wsrep, wsrep_gtid_t* gtid);
-
- /*!
- * @brief Clears allocated connection context.
- *
- * Whenever a new connection ID is passed to wsrep provider through
- * any of the API calls, a connection context is allocated for this
- * connection. This call is to explicitly notify provider fo connection
- * closing.
- *
- * @param wsrep provider handle
- * @param conn_id connection ID
- * @param query the 'set database' query
- * @param query_len length of query (does not end with 0)
- */
- wsrep_status_t (*free_connection)(wsrep_t* wsrep,
- wsrep_conn_id_t conn_id);
-
- /*!
- * @brief Replicates a query and starts "total order isolation" section.
- *
- * Replicates the action spec and returns success code, which caller must
- * check. Total order isolation continues until to_execute_end() is called.
- *
- * @param wsrep provider handle
- * @param conn_id connection ID
- * @param keys array of keys
- * @param keys_num lenght of the array of keys
- * @param action action buffer array to be executed
- * @param count action buffer count
- * @param meta transaction meta data
- *
- * @retval WSREP_OK cluster commit succeeded
- * @retval WSREP_CONN_FAIL must close client connection
- * @retval WSREP_NODE_FAIL must close all connections and reinit
- */
- wsrep_status_t (*to_execute_start)(wsrep_t* wsrep,
- wsrep_conn_id_t conn_id,
- const wsrep_key_t* keys,
- size_t keys_num,
- const struct wsrep_buf* action,
- size_t count,
- wsrep_trx_meta_t* meta);
-
- /*!
- * @brief Ends the total order isolation section.
- *
- * Marks the end of total order isolation. TO locks are freed
- * and other transactions are free to commit from this point on.
- *
- * @param wsrep provider handle
- * @param conn_id connection ID
- *
- * @retval WSREP_OK cluster commit succeeded
- * @retval WSREP_CONN_FAIL must close client connection
- * @retval WSREP_NODE_FAIL must close all connections and reinit
- */
- wsrep_status_t (*to_execute_end)(wsrep_t* wsrep, wsrep_conn_id_t conn_id);
-
- /*!
- * @brief Collects preordered replication events into a writeset.
- *
- * @param wsrep wsrep provider handle
- * @param handle a handle associated with a given writeset
- * @param data an array of data buffers.
- * @param count length of data buffer array.
- * @param copy whether provider needs to make a copy of events.
- *
- * @retval WSREP_OK cluster-wide commit succeeded
- * @retval WSREP_TRX_FAIL operation failed (e.g. trx size exceeded limit)
- * @retval WSREP_NODE_FAIL must close all connections and reinit
- */
- wsrep_status_t (*preordered_collect) (wsrep_t* wsrep,
- wsrep_po_handle_t* handle,
- const struct wsrep_buf* data,
- size_t count,
- wsrep_bool_t copy);
-
- /*!
- * @brief "Commits" preordered writeset to cluster.
- *
- * The contract is that the writeset will be committed in the same (partial)
- * order this method was called. Frees resources associated with the writeset
- * handle and reinitializes the handle.
- *
- * @param wsrep wsrep provider handle
- * @param po_handle a handle associated with a given writeset
- * @param source_id ID of the event producer, also serves as the partial order
- * or stream ID - events with different source_ids won't be
- * ordered with respect to each other.
- * @param flags WSREP_FLAG_... flags
- * @param pa_range the number of preceding events this event can be processed
- * in parallel with. A value of 0 means strict serial
- * processing. Note: commits always happen in wsrep order.
- * @param commit 'true' to commit writeset to cluster (replicate) or
- * 'false' to rollback (cancel) the writeset.
- *
- * @retval WSREP_OK cluster-wide commit succeeded
- * @retval WSREP_TRX_FAIL operation failed (e.g. NON-PRIMARY component)
- * @retval WSREP_NODE_FAIL must close all connections and reinit
- */
- wsrep_status_t (*preordered_commit) (wsrep_t* wsrep,
- wsrep_po_handle_t* handle,
- const wsrep_uuid_t* source_id,
- uint32_t flags,
- int pa_range,
- wsrep_bool_t commit);
-
- /*!
- * @brief Signals to wsrep provider that state snapshot has been sent to
- * joiner.
- *
- * @param wsrep provider handle
- * @param state_id state ID
- * @param rcode 0 or negative error code of the operation.
- */
- wsrep_status_t (*sst_sent)(wsrep_t* wsrep,
- const wsrep_gtid_t* state_id,
- int rcode);
-
- /*!
- * @brief Signals to wsrep provider that new state snapshot has been received.
- * May deadlock if called from sst_prepare_cb.
- *
- * @param wsrep provider handle
- * @param state_id state ID
- * @param state initial state provided by SST donor
- * @param state_len length of state buffer
- * @param rcode 0 or negative error code of the operation.
- */
- wsrep_status_t (*sst_received)(wsrep_t* wsrep,
- const wsrep_gtid_t* state_id,
- const void* state,
- size_t state_len,
- int rcode);
-
-
- /*!
- * @brief Generate request for consistent snapshot.
- *
- * If successfull, this call will generate internally SST request
- * which in turn triggers calling SST donate callback on the nodes
- * specified in donor_spec. If donor_spec is null, callback is
- * called only locally. This call will block until sst_sent is called
- * from callback.
- *
- * @param wsrep provider handle
- * @param msg context message for SST donate callback
- * @param msg_len length of context message
- * @param donor_spec list of snapshot donors
- */
- wsrep_status_t (*snapshot)(wsrep_t* wsrep,
- const void* msg,
- size_t msg_len,
- const char* donor_spec);
-
- /*!
- * @brief Returns an array fo status variables.
- * Array is terminated by Null variable name.
- *
- * @param wsrep provider handle
- * @return array of struct wsrep_status_var.
- */
- struct wsrep_stats_var* (*stats_get) (wsrep_t* wsrep);
-
- /*!
- * @brief Release resources that might be associated with the array.
- *
- * @param wsrep provider handle.
- * @param var_array array returned by stats_get().
- */
- void (*stats_free) (wsrep_t* wsrep, struct wsrep_stats_var* var_array);
-
- /*!
- * @brief Reset some stats variables to initial value, provider-dependent.
- *
- * @param wsrep provider handle.
- */
- void (*stats_reset) (wsrep_t* wsrep);
-
- /*!
- * @brief Pauses writeset applying/committing.
- *
- * @return global sequence number of the paused state or negative error code.
- */
- wsrep_seqno_t (*pause) (wsrep_t* wsrep);
-
- /*!
- * @brief Resumes writeset applying/committing.
- */
- wsrep_status_t (*resume) (wsrep_t* wsrep);
-
- /*!
- * @brief Desynchronize from cluster
- *
- * Effectively turns off flow control for this node, allowing it
- * to fall behind the cluster.
- */
- wsrep_status_t (*desync) (wsrep_t* wsrep);
-
- /*!
- * @brief Request to resynchronize with cluster.
- *
- * Effectively turns on flow control. Asynchronous - actual synchronization
- * event to be deliverred via sync_cb.
- */
- wsrep_status_t (*resync) (wsrep_t* wsrep);
-
- /*!
- * @brief Acquire global named lock
- *
- * @param wsrep wsrep provider handle
- * @param name lock name
- * @param shared shared or exclusive lock
- * @param owner 64-bit owner ID
- * @param tout timeout in nanoseconds.
- * 0 - return immediately, -1 wait forever.
- * @return wsrep status or negative error code
- * @retval -EDEADLK lock was already acquired by this thread
- * @retval -EBUSY lock was busy
- */
- wsrep_status_t (*lock) (wsrep_t* wsrep,
- const char* name, wsrep_bool_t shared,
- uint64_t owner, int64_t tout);
-
- /*!
- * @brief Release global named lock
- *
- * @param wsrep wsrep provider handle
- * @param name lock name
- * @param owner 64-bit owner ID
- * @return wsrep status or negative error code
- * @retval -EPERM lock does not belong to this owner
- */
- wsrep_status_t (*unlock) (wsrep_t* wsrep, const char* name, uint64_t owner);
-
- /*!
- * @brief Check if global named lock is locked
- *
- * @param wsrep wsrep provider handle
- * @param name lock name
- * @param owner if not NULL will contain 64-bit owner ID
- * @param node if not NULL will contain owner's node UUID
- * @return true if lock is locked
- */
- wsrep_bool_t (*is_locked) (wsrep_t* wsrep, const char* name, uint64_t* conn,
- wsrep_uuid_t* node);
-
- /*!
- * wsrep provider name
- */
- const char* provider_name;
-
- /*!
- * wsrep provider version
- */
- const char* provider_version;
-
- /*!
- * wsrep provider vendor name
- */
- const char* provider_vendor;
-
- /*!
- * @brief Frees allocated resources before unloading the library.
- * @param wsrep provider handle
- */
- void (*free)(wsrep_t* wsrep);
-
- void *dlh; //!< reserved for future use
- void *ctx; //!< reserved for implemetation private context
-};
-
-
-/*!
- *
- * @brief Loads wsrep library
- *
- * @param spec path to wsrep library. If NULL or WSREP_NONE initialises dummy
- * pass-through implementation.
- * @param hptr wsrep handle
- * @param log_cb callback to handle loader messages. Otherwise writes to stderr.
- *
- * @return zero on success, errno on failure
- */
-int wsrep_load(const char* spec, wsrep_t** hptr, wsrep_log_cb_t log_cb);
-
-/*!
- * @brief Unloads wsrep library and frees associated resources
- *
- * @param hptr wsrep handler pointer
- */
-void wsrep_unload(wsrep_t* hptr);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WSREP_H */
diff --git a/wsrep/wsrep_dummy.c b/wsrep/wsrep_dummy.c
deleted file mode 100644
index bd9f654b86b..00000000000
--- a/wsrep/wsrep_dummy.c
+++ /dev/null
@@ -1,413 +0,0 @@
-/* Copyright (C) 2009-2010 Codership Oy <info@codersihp.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
- */
-
-/*! @file Dummy wsrep API implementation. */
-
-#include "wsrep_api.h"
-
-#include <errno.h>
-#include <string.h>
-
-/*! Dummy backend context. */
-typedef struct wsrep_dummy
-{
- wsrep_log_cb_t log_fn;
- char* options;
-} wsrep_dummy_t;
-
-/* Get pointer to wsrep_dummy context from wsrep_t pointer */
-#define WSREP_DUMMY(_p) ((wsrep_dummy_t *) (_p)->ctx)
-
-/* Trace function usage a-la DBUG */
-#define WSREP_DBUG_ENTER(_w) do { \
- if (WSREP_DUMMY(_w)) { \
- if (WSREP_DUMMY(_w)->log_fn) \
- WSREP_DUMMY(_w)->log_fn(WSREP_LOG_DEBUG, __FUNCTION__); \
- } \
- } while (0)
-
-
-static void dummy_free(wsrep_t *w)
-{
- WSREP_DBUG_ENTER(w);
- if (WSREP_DUMMY(w)->options) {
- free(WSREP_DUMMY(w)->options);
- WSREP_DUMMY(w)->options = NULL;
- }
- free(w->ctx);
- w->ctx = NULL;
-}
-
-static wsrep_status_t dummy_init (wsrep_t* w,
- const struct wsrep_init_args* args)
-{
- WSREP_DUMMY(w)->log_fn = args->logger_cb;
- WSREP_DBUG_ENTER(w);
- if (args->options) {
- WSREP_DUMMY(w)->options = strdup(args->options);
- }
- return WSREP_OK;
-}
-
-static uint64_t dummy_capabilities (wsrep_t* w __attribute__((unused)))
-{
- return 0;
-}
-
-static wsrep_status_t dummy_options_set(
- wsrep_t* w,
- const char* conf)
-{
- WSREP_DBUG_ENTER(w);
- if (WSREP_DUMMY(w)->options) {
- free(WSREP_DUMMY(w)->options);
- WSREP_DUMMY(w)->options = NULL;
- }
- if (conf) {
- WSREP_DUMMY(w)->options = strdup(conf);
- }
- return WSREP_OK;
-}
-
-static char* dummy_options_get (wsrep_t* w)
-{
- char *options;
-
- WSREP_DBUG_ENTER(w);
- options= WSREP_DUMMY(w)->options;
-
- if (options)
- options= strdup(WSREP_DUMMY(w)->options);
-
- return options;
-}
-
-static wsrep_status_t dummy_connect(
- wsrep_t* w,
- const char* name __attribute__((unused)),
- const char* url __attribute__((unused)),
- const char* donor __attribute__((unused)),
- wsrep_bool_t bootstrap __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_disconnect(wsrep_t* w)
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_recv(wsrep_t* w,
- void* recv_ctx __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_pre_commit(
- wsrep_t* w,
- const wsrep_conn_id_t conn_id __attribute__((unused)),
- wsrep_ws_handle_t* ws_handle __attribute__((unused)),
- uint32_t flags __attribute__((unused)),
- wsrep_trx_meta_t* meta __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_post_commit(
- wsrep_t* w,
- wsrep_ws_handle_t* ws_handle __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_post_rollback(
- wsrep_t* w,
- wsrep_ws_handle_t* ws_handle __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_replay_trx(
- wsrep_t* w,
- wsrep_ws_handle_t* ws_handle __attribute__((unused)),
- void* trx_ctx __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_abort_pre_commit(
- wsrep_t* w,
- const wsrep_seqno_t bf_seqno __attribute__((unused)),
- const wsrep_trx_id_t trx_id __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_append_key(
- wsrep_t* w,
- wsrep_ws_handle_t* ws_handle __attribute__((unused)),
- const wsrep_key_t* key __attribute__((unused)),
- const size_t key_num __attribute__((unused)),
- const wsrep_key_type_t key_type __attribute__((unused)),
- const wsrep_bool_t copy __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_append_data(
- wsrep_t* w,
- wsrep_ws_handle_t* ws_handle __attribute__((unused)),
- const struct wsrep_buf* data __attribute__((unused)),
- const size_t count __attribute__((unused)),
- const wsrep_data_type_t type __attribute__((unused)),
- const wsrep_bool_t copy __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_causal_read(
- wsrep_t* w,
- wsrep_gtid_t* gtid __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_free_connection(
- wsrep_t* w,
- const wsrep_conn_id_t conn_id __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_to_execute_start(
- wsrep_t* w,
- const wsrep_conn_id_t conn_id __attribute__((unused)),
- const wsrep_key_t* key __attribute__((unused)),
- const size_t key_num __attribute__((unused)),
- const struct wsrep_buf* data __attribute__((unused)),
- const size_t count __attribute__((unused)),
- wsrep_trx_meta_t* meta __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_to_execute_end(
- wsrep_t* w,
- const wsrep_conn_id_t conn_id __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_preordered_collect(
- wsrep_t* w,
- wsrep_po_handle_t* handle __attribute__((unused)),
- const struct wsrep_buf* data __attribute__((unused)),
- size_t count __attribute__((unused)),
- wsrep_bool_t copy __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_preordered_commit(
- wsrep_t* w,
- wsrep_po_handle_t* handle __attribute__((unused)),
- const wsrep_uuid_t* source_id __attribute__((unused)),
- uint32_t flags __attribute__((unused)),
- int pa_range __attribute__((unused)),
- wsrep_bool_t commit __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_sst_sent(
- wsrep_t* w,
- const wsrep_gtid_t* state_id __attribute__((unused)),
- const int rcode __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_sst_received(
- wsrep_t* w,
- const wsrep_gtid_t* state_id __attribute__((unused)),
- const void* state __attribute__((unused)),
- const size_t state_len __attribute__((unused)),
- const int rcode __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_snapshot(
- wsrep_t* w,
- const void* msg __attribute__((unused)),
- const size_t msg_len __attribute__((unused)),
- const char* donor_spec __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static struct wsrep_stats_var dummy_stats[] = {
- { NULL, WSREP_VAR_STRING, { 0 } }
-};
-
-static struct wsrep_stats_var* dummy_stats_get (wsrep_t* w)
-{
- WSREP_DBUG_ENTER(w);
- return dummy_stats;
-}
-
-static void dummy_stats_free (
- wsrep_t* w,
- struct wsrep_stats_var* stats __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
-}
-
-static void dummy_stats_reset (wsrep_t* w)
-{
- WSREP_DBUG_ENTER(w);
-}
-
-static wsrep_seqno_t dummy_pause (wsrep_t* w)
-{
- WSREP_DBUG_ENTER(w);
- return -ENOSYS;
-}
-
-static wsrep_status_t dummy_resume (wsrep_t* w)
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_desync (wsrep_t* w)
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_NOT_IMPLEMENTED;
-}
-
-static wsrep_status_t dummy_resync (wsrep_t* w)
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_status_t dummy_lock (wsrep_t* w,
- const char* s __attribute__((unused)),
- wsrep_bool_t r __attribute__((unused)),
- uint64_t o __attribute__((unused)),
- int64_t t __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_NOT_IMPLEMENTED;
-}
-
-static wsrep_status_t dummy_unlock (wsrep_t* w,
- const char* s __attribute__((unused)),
- uint64_t o __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return WSREP_OK;
-}
-
-static wsrep_bool_t dummy_is_locked (wsrep_t* w,
- const char* s __attribute__((unused)),
- uint64_t* o __attribute__((unused)),
- wsrep_uuid_t* t __attribute__((unused)))
-{
- WSREP_DBUG_ENTER(w);
- return 0;
-}
-
-static wsrep_t dummy_iface = {
- WSREP_INTERFACE_VERSION,
- &dummy_init,
- &dummy_capabilities,
- &dummy_options_set,
- &dummy_options_get,
- &dummy_connect,
- &dummy_disconnect,
- &dummy_recv,
- &dummy_pre_commit,
- &dummy_post_commit,
- &dummy_post_rollback,
- &dummy_replay_trx,
- &dummy_abort_pre_commit,
- &dummy_append_key,
- &dummy_append_data,
- &dummy_causal_read,
- &dummy_free_connection,
- &dummy_to_execute_start,
- &dummy_to_execute_end,
- &dummy_preordered_collect,
- &dummy_preordered_commit,
- &dummy_sst_sent,
- &dummy_sst_received,
- &dummy_snapshot,
- &dummy_stats_get,
- &dummy_stats_free,
- &dummy_stats_reset,
- &dummy_pause,
- &dummy_resume,
- &dummy_desync,
- &dummy_resync,
- &dummy_lock,
- &dummy_unlock,
- &dummy_is_locked,
- WSREP_NONE,
- WSREP_INTERFACE_VERSION,
- "Codership Oy <info@codership.com>",
- &dummy_free,
- NULL,
- NULL
-};
-
-int wsrep_dummy_loader(wsrep_t* w)
-{
- if (!w)
- return EINVAL;
-
- *w = dummy_iface;
-
- // allocate private context
- if (!(w->ctx = malloc(sizeof(wsrep_dummy_t))))
- return ENOMEM;
-
- // initialize private context
- WSREP_DUMMY(w)->log_fn = NULL;
- WSREP_DUMMY(w)->options = NULL;
-
- return 0;
-}
diff --git a/wsrep/wsrep_gtid.c b/wsrep/wsrep_gtid.c
deleted file mode 100644
index fc87275f4ff..00000000000
--- a/wsrep/wsrep_gtid.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (C) 2013 Codership Oy <info@codersihp.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
- */
-
-/*! @file Helper functions to deal with GTID string representations */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "wsrep_api.h"
-
-/*!
- * Read GTID from string
- * @return length of GTID string representation or -EINVAL in case of error
- */
-int
-wsrep_gtid_scan(const char* str, size_t str_len, wsrep_gtid_t* gtid)
-{
- unsigned int offset;
- char* endptr;
-
- if ((offset = wsrep_uuid_scan(str, str_len, &gtid->uuid)) > 0 &&
- offset < str_len && str[offset] == ':') {
- ++offset;
- if (offset < str_len)
- {
- errno = 0;
- gtid->seqno = strtoll(str + offset, &endptr, 0);
-
- if (errno == 0) {
- offset = (unsigned int)(endptr - str);
- return offset;
- }
- }
- }
- *gtid = WSREP_GTID_UNDEFINED;
- return -EINVAL;
-}
-
-/*!
- * Write GTID to string
- * @return length of GTID stirng representation of -EMSGSIZE if string is too
- * short
- */
-int
-wsrep_gtid_print(const wsrep_gtid_t* gtid, char* str, size_t str_len)
-{
- unsigned int offset, ret;
- if ((offset = wsrep_uuid_print(&gtid->uuid, str, str_len)) > 0)
- {
- ret = snprintf(str + offset, str_len - offset,
- ":%" PRId64, gtid->seqno);
- if (ret <= str_len - offset) {
- return (offset + ret);
- }
-
- }
-
- return -EMSGSIZE;
-}
diff --git a/wsrep/wsrep_loader.c b/wsrep/wsrep_loader.c
deleted file mode 100644
index d08632a94ce..00000000000
--- a/wsrep/wsrep_loader.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/* Copyright (C) 2009-2011 Codership Oy <info@codersihp.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
- */
-
-/*! @file wsrep implementation loader */
-
-#include <dlfcn.h>
-#include <errno.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "wsrep_api.h"
-
-// Logging stuff for the loader
-static const char* log_levels[] = {"FATAL", "ERROR", "WARN", "INFO", "DEBUG"};
-
-static void default_logger (wsrep_log_level_t lvl, const char* msg)
-{
- fprintf (stderr, "wsrep loader: [%s] %s\n", log_levels[lvl], msg);
-}
-
-static wsrep_log_cb_t logger = default_logger;
-
-/**************************************************************************
- * Library loader
- **************************************************************************/
-
-static int wsrep_check_iface_version(const char* found, const char* iface_ver)
-{
- const size_t msg_len = 128;
- char msg[128];
-
- if (strcmp(found, iface_ver)) {
- snprintf (msg, msg_len,
- "provider interface version mismatch: need '%s', found '%s'",
- iface_ver, found);
- logger (WSREP_LOG_ERROR, msg);
- return EINVAL;
- }
-
- return 0;
-}
-
-static int verify(const wsrep_t *wh, const char *iface_ver)
-{
- char msg[128];
-
-#define VERIFY(_p) if (!(_p)) { \
- snprintf(msg, sizeof(msg), "wsrep_load(): verify(): %s\n", # _p); \
- logger (WSREP_LOG_ERROR, msg); \
- return EINVAL; \
- }
-
- VERIFY(wh);
- VERIFY(wh->version);
-
- if (wsrep_check_iface_version(wh->version, iface_ver))
- return EINVAL;
-
- VERIFY(wh->init);
- VERIFY(wh->options_set);
- VERIFY(wh->options_get);
- VERIFY(wh->connect);
- VERIFY(wh->disconnect);
- VERIFY(wh->recv);
- VERIFY(wh->pre_commit);
- VERIFY(wh->post_commit);
- VERIFY(wh->post_rollback);
- VERIFY(wh->replay_trx);
- VERIFY(wh->abort_pre_commit);
- VERIFY(wh->append_key);
- VERIFY(wh->append_data);
- VERIFY(wh->free_connection);
- VERIFY(wh->to_execute_start);
- VERIFY(wh->to_execute_end);
- VERIFY(wh->preordered_collect);
- VERIFY(wh->preordered_commit);
- VERIFY(wh->sst_sent);
- VERIFY(wh->sst_received);
- VERIFY(wh->stats_get);
- VERIFY(wh->stats_free);
- VERIFY(wh->stats_reset);
- VERIFY(wh->pause);
- VERIFY(wh->resume);
- VERIFY(wh->desync);
- VERIFY(wh->resync);
- VERIFY(wh->lock);
- VERIFY(wh->unlock);
- VERIFY(wh->is_locked);
- VERIFY(wh->provider_name);
- VERIFY(wh->provider_version);
- VERIFY(wh->provider_vendor);
- VERIFY(wh->free);
- return 0;
-}
-
-typedef int (*wsrep_loader_fun)(wsrep_t*);
-
-static wsrep_loader_fun wsrep_dlf(void *dlh, const char *sym)
-{
- union {
- wsrep_loader_fun dlfun;
- void *obj;
- } alias;
- alias.obj = dlsym(dlh, sym);
- return alias.dlfun;
-}
-
-static int wsrep_check_version_symbol(void *dlh)
-{
- char** dlversion = NULL;
- dlversion = (char**) dlsym(dlh, "wsrep_interface_version");
- if (dlversion == NULL)
- return 0;
- return wsrep_check_iface_version(*dlversion, WSREP_INTERFACE_VERSION);
-}
-
-extern int wsrep_dummy_loader(wsrep_t *w);
-
-int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb)
-{
- int ret = 0;
- void *dlh = NULL;
- wsrep_loader_fun dlfun;
- char msg[1025];
- msg[sizeof(msg)-1] = 0;
-
- if (NULL != log_cb)
- logger = log_cb;
-
- if (!(spec && hptr))
- return EINVAL;
-
- snprintf (msg, sizeof(msg)-1,
- "wsrep_load(): loading provider library '%s'", spec);
- logger (WSREP_LOG_INFO, msg);
-
- if (!(*hptr = malloc(sizeof(wsrep_t)))) {
- logger (WSREP_LOG_FATAL, "wsrep_load(): out of memory");
- return ENOMEM;
- }
-
- if (!spec || strcmp(spec, WSREP_NONE) == 0) {
- if ((ret = wsrep_dummy_loader(*hptr)) != 0) {
- free (*hptr);
- *hptr = NULL;
- }
- return ret;
- }
-
- if (!(dlh = dlopen(spec, RTLD_NOW | RTLD_LOCAL))) {
- snprintf(msg, sizeof(msg)-1, "wsrep_load(): dlopen(): %s", dlerror());
- logger (WSREP_LOG_ERROR, msg);
- ret = EINVAL;
- goto out;
- }
-
- if (!(dlfun = wsrep_dlf(dlh, "wsrep_loader"))) {
- ret = EINVAL;
- goto out;
- }
-
- if (wsrep_check_version_symbol(dlh) != 0) {
- ret = EINVAL;
- goto out;
- }
-
- if ((ret = (*dlfun)(*hptr)) != 0) {
- snprintf(msg, sizeof(msg)-1, "wsrep_load(): loader failed: %s",
- strerror(ret));
- logger (WSREP_LOG_ERROR, msg);
- goto out;
- }
-
- if ((ret = verify(*hptr, WSREP_INTERFACE_VERSION)) != 0) {
- snprintf (msg, sizeof(msg)-1,
- "wsrep_load(): interface version mismatch: my version %s, "
- "provider version %s", WSREP_INTERFACE_VERSION,
- (*hptr)->version);
- logger (WSREP_LOG_ERROR, msg);
- goto out;
- }
-
- (*hptr)->dlh = dlh;
-
-out:
- if (ret != 0) {
- if (dlh) dlclose(dlh);
- free(*hptr);
- *hptr = NULL;
- } else {
- snprintf (msg, sizeof(msg)-1,
- "wsrep_load(): %s %s by %s loaded successfully.",
- (*hptr)->provider_name, (*hptr)->provider_version,
- (*hptr)->provider_vendor);
- logger (WSREP_LOG_INFO, msg);
- }
-
- return ret;
-}
-
-void wsrep_unload(wsrep_t *hptr)
-{
- if (!hptr) {
- logger (WSREP_LOG_WARN, "wsrep_unload(): null pointer.");
- } else {
- if (hptr->free)
- hptr->free(hptr);
- if (hptr->dlh)
- dlclose(hptr->dlh);
- free(hptr);
- }
-}
-
diff --git a/wsrep/wsrep_uuid.c b/wsrep/wsrep_uuid.c
deleted file mode 100644
index d525808d0da..00000000000
--- a/wsrep/wsrep_uuid.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (C) 2009 Codership Oy <info@codersihp.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
- */
-
-/*! @file Helper functions to deal with history UUID string representations */
-
-#include <errno.h>
-#include <ctype.h>
-#include <stdio.h>
-
-#include "wsrep_api.h"
-
-/*!
- * Read UUID from string
- * @return length of UUID string representation or -EINVAL in case of error
- */
-int
-wsrep_uuid_scan (const char* str, size_t str_len, wsrep_uuid_t* uuid)
-{
- unsigned int uuid_len = 0;
- unsigned int uuid_offt = 0;
-
- while (uuid_len + 1 < str_len) {
- /* We are skipping potential '-' after uuid_offt == 4, 6, 8, 10
- * which means
- * (uuid_offt >> 1) == 2, 3, 4, 5,
- * which in turn means
- * (uuid_offt >> 1) - 2 <= 3
- * since it is always >= 0, because uuid_offt is unsigned */
- if (((uuid_offt >> 1) - 2) <= 3 && str[uuid_len] == '-') {
- // skip dashes after 4th, 6th, 8th and 10th positions
- uuid_len += 1;
- continue;
- }
-
- if (isxdigit(str[uuid_len]) && isxdigit(str[uuid_len + 1])) {
- // got hex digit, scan another byte to uuid, increment uuid_offt
- sscanf (str + uuid_len, "%2hhx", uuid->data + uuid_offt);
- uuid_len += 2;
- uuid_offt += 1;
- if (sizeof (uuid->data) == uuid_offt)
- return uuid_len;
- }
- else {
- break;
- }
- }
-
- *uuid = WSREP_UUID_UNDEFINED;
- return -EINVAL;
-}
-
-/*!
- * Write UUID to string
- * @return length of UUID string representation or -EMSGSIZE if string is too
- * short
- */
-int
-wsrep_uuid_print (const wsrep_uuid_t* uuid, char* str, size_t str_len)
-{
- if (str_len > 36) {
- const unsigned char* u = uuid->data;
- return snprintf(str, str_len, "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x-%02x%02x%02x%02x%02x%02x",
- u[ 0], u[ 1], u[ 2], u[ 3], u[ 4], u[ 5], u[ 6], u[ 7],
- u[ 8], u[ 9], u[10], u[11], u[12], u[13], u[14], u[15]);
- }
- else {
- return -EMSGSIZE;
- }
-}